From: Andrea Bianco
Date: Sun, 12 Jan 2020 15:50:00 +0000 (+0100)
Subject: Built motion from commit (unavailable).|2.4.2
X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css/%22https:/fonts.googleapis.com//%22card-image.png/%22?a=commitdiff_plain;h=c475384da4dcf8e98538bf30f7180805907e6805;p=motion2.git
Built motion from commit (unavailable).|2.4.2
---
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index 6362107..719d5e5 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -1 +1 @@
-define({
"name": "xCALLY Motion API",
"version": "2.4.2",
"description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
"title": "xCALLY MOTION API",
"header": {
"title": "Introduction",
"content": "The API \nThis is the documentation for the xCALLY MOTION API.
\nWe make changes to the APIs from time to time. For more information, see Changelog .
\nThe xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.
\nThe API is a JSON API. XML is not supported. To learn more, see [Working with JSON].
\nEndpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:
\nGET /api/users\n
\nPrepend your xCALLY URL to the resource identifier to get the full endpoint URL:
\nhttps://motion.xcally.com/api/users\n
\nCurly braces, {}
, indicate values you have to supply. Example:
\nGET /api/users/{id}\n
\nThe 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].
\nThe examples use basic authentication requiring a xCALLY username and password.
\nSecurity and Authentication \nThis 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 or API Key.
\nClient-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 API Key.
\nBasic authentication \nUse the following authentication format with your username and password:\n{username}:{password}
\nExample:
\ncurl -u admin:password https://motion.xcally.com/api/users\n
\nOAuth access token \nThe xCALLY API supports OAuth authorization flows.
\nOAuth access tokens also permit client-side API requests.
\nIn your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}
\nExample:
\ncurl -H "Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo" https://motion.xcally.com/api/users\n
\nAPI Key \nIn your request, specify the API Key in apikey query parameter
\nExample:
\ncurl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\nRequest Format \nThe xCALLY API is a JSON API. You must supply a Content-Type: application/json
header in PUT
and POST
requests. You must set an Accept: application/json
header on all requests. You may get a text/plain
response in case of an error like a bad request. You should treat this as an error you need to fix.
\nResponse Format \nThe 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.
\nResponses may have the status codes described in the following sections.
\n200 range \nThe request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.
\n400 range \nThe request was not successful. The content type of the response may be text/plain
for API-level error messages, such as when trying to call the API without SSL. The content type is application/json
for business-level error messages because the response includes a JSON object with information about the error.
\nIf 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.
\n500 range \nWhen 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.
\nIf submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.
\nData Types \nThe 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.
\nID integers \nMost xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.
\nThe default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.
\nTime stamps \nTime stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z
\n"
},
"template": {
"withGenerator": false,
"withCompare": false,
"forceLanguage": "en"
},
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2020-01-12T12:30:58.327Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
});
+define({
"name": "xCALLY Motion API",
"version": "2.4.2",
"description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
"title": "xCALLY MOTION API",
"header": {
"title": "Introduction",
"content": "The API \nThis is the documentation for the xCALLY MOTION API.
\nWe make changes to the APIs from time to time. For more information, see Changelog .
\nThe xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.
\nThe API is a JSON API. XML is not supported. To learn more, see [Working with JSON].
\nEndpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:
\nGET /api/users\n
\nPrepend your xCALLY URL to the resource identifier to get the full endpoint URL:
\nhttps://motion.xcally.com/api/users\n
\nCurly braces, {}
, indicate values you have to supply. Example:
\nGET /api/users/{id}\n
\nThe 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].
\nThe examples use basic authentication requiring a xCALLY username and password.
\nSecurity and Authentication \nThis 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 or API Key.
\nClient-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 API Key.
\nBasic authentication \nUse the following authentication format with your username and password:\n{username}:{password}
\nExample:
\ncurl -u admin:password https://motion.xcally.com/api/users\n
\nOAuth access token \nThe xCALLY API supports OAuth authorization flows.
\nOAuth access tokens also permit client-side API requests.
\nIn your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}
\nExample:
\ncurl -H "Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo" https://motion.xcally.com/api/users\n
\nAPI Key \nIn your request, specify the API Key in apikey query parameter
\nExample:
\ncurl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\nRequest Format \nThe xCALLY API is a JSON API. You must supply a Content-Type: application/json
header in PUT
and POST
requests. You must set an Accept: application/json
header on all requests. You may get a text/plain
response in case of an error like a bad request. You should treat this as an error you need to fix.
\nResponse Format \nThe 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.
\nResponses may have the status codes described in the following sections.
\n200 range \nThe request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.
\n400 range \nThe request was not successful. The content type of the response may be text/plain
for API-level error messages, such as when trying to call the API without SSL. The content type is application/json
for business-level error messages because the response includes a JSON object with information about the error.
\nIf 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.
\n500 range \nWhen 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.
\nIf submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.
\nData Types \nThe 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.
\nID integers \nMost xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.
\nThe default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.
\nTime stamps \nTime stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z
\n"
},
"template": {
"withGenerator": false,
"withCompare": false,
"forceLanguage": "en"
},
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2020-01-12T15:41:50.104Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
});
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index 5c5402c..d94c048 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -1 +1 @@
-{
"name": "xCALLY Motion API",
"version": "2.4.2",
"description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
"title": "xCALLY MOTION API",
"header": {
"title": "Introduction",
"content": "The API \nThis is the documentation for the xCALLY MOTION API.
\nWe make changes to the APIs from time to time. For more information, see Changelog .
\nThe xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.
\nThe API is a JSON API. XML is not supported. To learn more, see [Working with JSON].
\nEndpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:
\nGET /api/users\n
\nPrepend your xCALLY URL to the resource identifier to get the full endpoint URL:
\nhttps://motion.xcally.com/api/users\n
\nCurly braces, {}
, indicate values you have to supply. Example:
\nGET /api/users/{id}\n
\nThe 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].
\nThe examples use basic authentication requiring a xCALLY username and password.
\nSecurity and Authentication \nThis 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 or API Key.
\nClient-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 API Key.
\nBasic authentication \nUse the following authentication format with your username and password:\n{username}:{password}
\nExample:
\ncurl -u admin:password https://motion.xcally.com/api/users\n
\nOAuth access token \nThe xCALLY API supports OAuth authorization flows.
\nOAuth access tokens also permit client-side API requests.
\nIn your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}
\nExample:
\ncurl -H "Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo" https://motion.xcally.com/api/users\n
\nAPI Key \nIn your request, specify the API Key in apikey query parameter
\nExample:
\ncurl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\nRequest Format \nThe xCALLY API is a JSON API. You must supply a Content-Type: application/json
header in PUT
and POST
requests. You must set an Accept: application/json
header on all requests. You may get a text/plain
response in case of an error like a bad request. You should treat this as an error you need to fix.
\nResponse Format \nThe 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.
\nResponses may have the status codes described in the following sections.
\n200 range \nThe request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.
\n400 range \nThe request was not successful. The content type of the response may be text/plain
for API-level error messages, such as when trying to call the API without SSL. The content type is application/json
for business-level error messages because the response includes a JSON object with information about the error.
\nIf 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.
\n500 range \nWhen 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.
\nIf submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.
\nData Types \nThe 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.
\nID integers \nMost xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.
\nThe default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.
\nTime stamps \nTime stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z
\n"
},
"template": {
"withGenerator": false,
"withCompare": false,
"forceLanguage": "en"
},
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2020-01-12T12:30:58.327Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
}
+{
"name": "xCALLY Motion API",
"version": "2.4.2",
"description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
"title": "xCALLY MOTION API",
"header": {
"title": "Introduction",
"content": "The API \nThis is the documentation for the xCALLY MOTION API.
\nWe make changes to the APIs from time to time. For more information, see Changelog .
\nThe xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.
\nThe API is a JSON API. XML is not supported. To learn more, see [Working with JSON].
\nEndpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:
\nGET /api/users\n
\nPrepend your xCALLY URL to the resource identifier to get the full endpoint URL:
\nhttps://motion.xcally.com/api/users\n
\nCurly braces, {}
, indicate values you have to supply. Example:
\nGET /api/users/{id}\n
\nThe 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].
\nThe examples use basic authentication requiring a xCALLY username and password.
\nSecurity and Authentication \nThis 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 or API Key.
\nClient-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 API Key.
\nBasic authentication \nUse the following authentication format with your username and password:\n{username}:{password}
\nExample:
\ncurl -u admin:password https://motion.xcally.com/api/users\n
\nOAuth access token \nThe xCALLY API supports OAuth authorization flows.
\nOAuth access tokens also permit client-side API requests.
\nIn your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}
\nExample:
\ncurl -H "Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo" https://motion.xcally.com/api/users\n
\nAPI Key \nIn your request, specify the API Key in apikey query parameter
\nExample:
\ncurl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\nRequest Format \nThe xCALLY API is a JSON API. You must supply a Content-Type: application/json
header in PUT
and POST
requests. You must set an Accept: application/json
header on all requests. You may get a text/plain
response in case of an error like a bad request. You should treat this as an error you need to fix.
\nResponse Format \nThe 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.
\nResponses may have the status codes described in the following sections.
\n200 range \nThe request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.
\n400 range \nThe request was not successful. The content type of the response may be text/plain
for API-level error messages, such as when trying to call the API without SSL. The content type is application/json
for business-level error messages because the response includes a JSON object with information about the error.
\nIf 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.
\n500 range \nWhen 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.
\nIf submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.
\nData Types \nThe 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.
\nID integers \nMost xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.
\nThe default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.
\nTime stamps \nTime stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z
\n"
},
"template": {
"withGenerator": false,
"withCompare": false,
"forceLanguage": "en"
},
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2020-01-12T15:41:50.104Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
}
diff --git a/package.json b/package.json
index 92d8322..e483223 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,8 @@
"Andrea Cuccaro ",
"Donatella Soldi ",
"Afnan Imtiaz ",
- "Cristian Di Sclafani "
+ "Cristian Di Sclafani ",
+ "Marco Giraldi "
],
"private": true,
"license": "EULA",
diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js
index 9474dba..efa32c9 100644
--- a/server/api/action/action.attributes.js
+++ b/server/api/action/action.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c44=['script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','contactManager[ListId],\x20integration[intName(zendesk)],\x20motionbar[Popup(0),URL(1),WinApp(2)],\x20urlForward[GET,POST],\x20browser[TemplateId(0),URL(1)]','integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20urlForward[URL]','VIRTUAL','getDataValue','action','STRING','contactManager','jscripty','browser','bot'];(function(_0x4252,_0x19e5b1){var _0x1fa0be=function(_0x20e487){while(--_0x20e487){_0x4252['push'](_0x4252['shift']());}};_0x1fa0be(++_0x19e5b1);}(_0x9c44,0x178));var _0x49c4=function(_0x5608a3,_0x5b33c5){_0x5608a3=_0x5608a3-0x0;var _0x1ed50a=_0x9c44[_0x5608a3];return _0x1ed50a;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x49c4('0x0')],'get':function(_0x18bf2d){return this[_0x49c4('0x1')](_0x49c4('0x2'));}},'action':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'validate':{'isIn':{'args':[[_0x49c4('0x4'),'integration','motionbar',_0x49c4('0x5'),'urlForward',_0x49c4('0x6'),_0x49c4('0x7'),_0x49c4('0x8')]],'msg':_0x49c4('0x9')}},'comment':_0x49c4('0x9')},'data1':{'type':Sequelize['STRING'](0x1000),'comment':_0x49c4('0xa')},'data2':{'type':Sequelize[_0x49c4('0x3')](0x1000),'comment':_0x49c4('0xb')},'data3':{'type':Sequelize[_0x49c4('0x3')](0x1000),'comment':'motionbar[NULL,NULL,WinAppArguments]'},'data4':{'type':Sequelize['STRING'](0x1000)},'data5':{'type':Sequelize[_0x49c4('0x3')](0x1000)},'data6':{'type':Sequelize[_0x49c4('0x3')]},'data7':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0xedd9=['action','STRING','contactManager','integration','jscripty','urlForward','browser','bot','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','contactManager[ListId],\x20integration[intName(zendesk)],\x20motionbar[Popup(0),URL(1),WinApp(2)],\x20urlForward[GET,POST],\x20browser[TemplateId(0),URL(1)]','integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20urlForward[URL]','motionbar[NULL,NULL,WinAppArguments]','exports','VIRTUAL','getDataValue'];(function(_0x53a936,_0x510457){var _0x32e63f=function(_0x4b324a){while(--_0x4b324a){_0x53a936['push'](_0x53a936['shift']());}};_0x32e63f(++_0x510457);}(_0xedd9,0xfc));var _0x9edd=function(_0x5d6d7b,_0x5268bb){_0x5d6d7b=_0x5d6d7b-0x0;var _0x1691fe=_0xedd9[_0x5d6d7b];return _0x1691fe;};'use strict';var Sequelize=require('sequelize');module[_0x9edd('0x0')]={'name':{'type':Sequelize[_0x9edd('0x1')],'get':function(_0x2af857){return this[_0x9edd('0x2')](_0x9edd('0x3'));}},'action':{'type':Sequelize[_0x9edd('0x4')],'allowNull':![],'validate':{'isIn':{'args':[[_0x9edd('0x5'),_0x9edd('0x6'),'motionbar',_0x9edd('0x7'),_0x9edd('0x8'),_0x9edd('0x9'),_0x9edd('0xa'),'script']],'msg':_0x9edd('0xb')}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize[_0x9edd('0x4')](0x1000),'comment':_0x9edd('0xc')},'data2':{'type':Sequelize[_0x9edd('0x4')](0x1000),'comment':_0x9edd('0xd')},'data3':{'type':Sequelize['STRING'](0x1000),'comment':_0x9edd('0xe')},'data4':{'type':Sequelize['STRING'](0x1000)},'data5':{'type':Sequelize[_0x9edd('0x4')](0x1000)},'data6':{'type':Sequelize[_0x9edd('0x4')]},'data7':{'type':Sequelize['TEXT']}};
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index 8b3061d..b0df0b0 100644
--- a/server/api/action/action.controller.js
+++ b/server/api/action/action.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe256=['json','reject','save','update','destroy','then','error','stack','name','send','body','Action','find','params','catch','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','sendStatus','end','status','offset','limit'];(function(_0x24ebf6,_0x5335bd){var _0xc4339=function(_0x462ccc){while(--_0x462ccc){_0x24ebf6['push'](_0x24ebf6['shift']());}};_0xc4339(++_0x5335bd);}(_0xe256,0x8a));var _0x6e25=function(_0x5e1699,_0x359436){_0x5e1699=_0x5e1699-0x0;var _0xd398f9=_0xe256[_0x5e1699];return _0xd398f9;};'use strict';var pdf=require(_0x6e25('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x6e25('0x1'));var zipdir=require(_0x6e25('0x2'));var jsonpatch=require(_0x6e25('0x3'));var rp=require(_0x6e25('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x6e25('0x5'));var util=require(_0x6e25('0x6'));var path=require(_0x6e25('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6e25('0x8'));var fs=require('fs');var _=require(_0x6e25('0x9'));var squel=require(_0x6e25('0xa'));var crypto=require(_0x6e25('0xb'));var jsforce=require(_0x6e25('0xc'));var deskjs=require(_0x6e25('0xd'));var toCsv=require('to-csv');var querystring=require(_0x6e25('0xe'));var Papa=require(_0x6e25('0xf'));var Redis=require(_0x6e25('0x10'));var authService=require(_0x6e25('0x11'));var qs=require(_0x6e25('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6e25('0x13'))(_0x6e25('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x412ac3,_0x397076){_0x397076=_0x397076||0xcc;return function(_0x694326){if(_0x694326){return _0x412ac3[_0x6e25('0x15')](_0x397076);}return _0x412ac3['status'](_0x397076)[_0x6e25('0x16')]();};}function respondWithResult(_0x38964d,_0x596f00){_0x596f00=_0x596f00||0xc8;return function(_0x4fc593){if(_0x4fc593){return _0x38964d[_0x6e25('0x17')](_0x596f00)['json'](_0x4fc593);}};}function respondWithFilteredResult(_0x159798,_0x3a4871){return function(_0x355a84){if(_0x355a84){var _0x4bc24c=_0x355a84['count'],_0x5aa28c=_0x3a4871['offset'],_0x3d1322=_0x3a4871[_0x6e25('0x18')]+_0x3a4871[_0x6e25('0x19')],_0x400a2b;if(_0x3d1322>=_0x4bc24c){_0x3d1322=_0x4bc24c;_0x400a2b=0xc8;}else{_0x400a2b=0xce;}_0x159798[_0x6e25('0x17')](_0x400a2b);return _0x159798['set']('Content-Range',_0x5aa28c+'-'+_0x3d1322+'/'+_0x4bc24c)[_0x6e25('0x1a')](_0x355a84);}return null;};}function patchUpdates(_0x3695fb){return function(_0x578951){try{jsonpatch['apply'](_0x578951,_0x3695fb,!![]);}catch(_0x34963e){return BPromise[_0x6e25('0x1b')](_0x34963e);}return _0x578951[_0x6e25('0x1c')]();};}function saveUpdates(_0x5a4e5f,_0x257df0){return function(_0x1716cf){if(_0x1716cf){return _0x1716cf[_0x6e25('0x1d')](_0x5a4e5f)['then'](function(_0x556cef){return _0x556cef;});}return null;};}function removeEntity(_0x566448,_0x5aca1c){return function(_0x4ae713){if(_0x4ae713){return _0x4ae713[_0x6e25('0x1e')]()[_0x6e25('0x1f')](function(){_0x566448[_0x6e25('0x17')](0xcc)[_0x6e25('0x16')]();});}};}function handleEntityNotFound(_0x5ac132,_0x3b6bdf){return function(_0x2f3e5b){if(!_0x2f3e5b){_0x5ac132[_0x6e25('0x15')](0x194);}return _0x2f3e5b;};}function handleError(_0x5b8a17,_0x2f92d9){_0x2f92d9=_0x2f92d9||0x1f4;return function(_0x30ab61){logger[_0x6e25('0x20')](_0x30ab61[_0x6e25('0x21')]);if(_0x30ab61[_0x6e25('0x22')]){delete _0x30ab61[_0x6e25('0x22')];}_0x5b8a17[_0x6e25('0x17')](_0x2f92d9)[_0x6e25('0x23')](_0x30ab61);};}exports[_0x6e25('0x1d')]=function(_0x2ba9c3,_0x17b1e1){if(_0x2ba9c3[_0x6e25('0x24')]['id']){delete _0x2ba9c3[_0x6e25('0x24')]['id'];}return db[_0x6e25('0x25')][_0x6e25('0x26')]({'where':{'id':_0x2ba9c3[_0x6e25('0x27')]['id']}})[_0x6e25('0x1f')](handleEntityNotFound(_0x17b1e1,null))['then'](saveUpdates(_0x2ba9c3[_0x6e25('0x24')],null))[_0x6e25('0x1f')](respondWithResult(_0x17b1e1,null))[_0x6e25('0x28')](handleError(_0x17b1e1,null));};exports[_0x6e25('0x1e')]=function(_0x1e90ba,_0x41aa3e){return db['Action'][_0x6e25('0x26')]({'where':{'id':_0x1e90ba[_0x6e25('0x27')]['id']}})[_0x6e25('0x1f')](handleEntityNotFound(_0x41aa3e,null))[_0x6e25('0x1f')](removeEntity(_0x41aa3e,null))[_0x6e25('0x28')](handleError(_0x41aa3e,null));};
\ No newline at end of file
+var _0x7a13=['Action','find','params','body','catch','html-pdf','zip-dir','fast-json-patch','request-promise','mustache','util','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','limit','set','apply','reject','save','then','destroy','end','error','stack','name','update'];(function(_0x3dde5a,_0x4c63bc){var _0x2d242f=function(_0x1e04a5){while(--_0x1e04a5){_0x3dde5a['push'](_0x3dde5a['shift']());}};_0x2d242f(++_0x4c63bc);}(_0x7a13,0x1f4));var _0x37a1=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x7a13[_0x14add3];return _0x4a174f;};'use strict';var pdf=require(_0x37a1('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x37a1('0x1'));var jsonpatch=require(_0x37a1('0x2'));var rp=require(_0x37a1('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x37a1('0x4'));var util=require(_0x37a1('0x5'));var path=require('path');var sox=require(_0x37a1('0x6'));var csv=require(_0x37a1('0x7'));var ejs=require(_0x37a1('0x8'));var fs=require('fs');var _=require(_0x37a1('0x9'));var squel=require('squel');var crypto=require(_0x37a1('0xa'));var jsforce=require(_0x37a1('0xb'));var deskjs=require(_0x37a1('0xc'));var toCsv=require(_0x37a1('0x7'));var querystring=require(_0x37a1('0xd'));var Papa=require(_0x37a1('0xe'));var Redis=require(_0x37a1('0xf'));var authService=require(_0x37a1('0x10'));var qs=require(_0x37a1('0x11'));var hardwareService=require(_0x37a1('0x12'));var logger=require(_0x37a1('0x13'))(_0x37a1('0x14'));var utils=require('../../config/utils');var config=require(_0x37a1('0x15'));var db=require(_0x37a1('0x16'))['db'];function respondWithStatusCode(_0x4dc2eb,_0x2b74f6){_0x2b74f6=_0x2b74f6||0xcc;return function(_0xd06f1b){if(_0xd06f1b){return _0x4dc2eb[_0x37a1('0x17')](_0x2b74f6);}return _0x4dc2eb[_0x37a1('0x18')](_0x2b74f6)['end']();};}function respondWithResult(_0x473c1a,_0x55255d){_0x55255d=_0x55255d||0xc8;return function(_0x541014){if(_0x541014){return _0x473c1a[_0x37a1('0x18')](_0x55255d)[_0x37a1('0x19')](_0x541014);}};}function respondWithFilteredResult(_0x1e0f51,_0x57021a){return function(_0x182390){if(_0x182390){var _0x48892a=_0x182390[_0x37a1('0x1a')],_0x2c0ff1=_0x57021a[_0x37a1('0x1b')],_0x48a489=_0x57021a['offset']+_0x57021a[_0x37a1('0x1c')],_0x51b9bb;if(_0x48a489>=_0x48892a){_0x48a489=_0x48892a;_0x51b9bb=0xc8;}else{_0x51b9bb=0xce;}_0x1e0f51[_0x37a1('0x18')](_0x51b9bb);return _0x1e0f51[_0x37a1('0x1d')]('Content-Range',_0x2c0ff1+'-'+_0x48a489+'/'+_0x48892a)[_0x37a1('0x19')](_0x182390);}return null;};}function patchUpdates(_0xffb529){return function(_0x53907a){try{jsonpatch[_0x37a1('0x1e')](_0x53907a,_0xffb529,!![]);}catch(_0x169a72){return BPromise[_0x37a1('0x1f')](_0x169a72);}return _0x53907a[_0x37a1('0x20')]();};}function saveUpdates(_0x45ef6a,_0x45281b){return function(_0x2e8689){if(_0x2e8689){return _0x2e8689['update'](_0x45ef6a)[_0x37a1('0x21')](function(_0x3cb0b5){return _0x3cb0b5;});}return null;};}function removeEntity(_0x179739,_0x2c1c8){return function(_0x41baa3){if(_0x41baa3){return _0x41baa3[_0x37a1('0x22')]()[_0x37a1('0x21')](function(){_0x179739[_0x37a1('0x18')](0xcc)[_0x37a1('0x23')]();});}};}function handleEntityNotFound(_0x5b6ca2,_0x2948bc){return function(_0x53ac0d){if(!_0x53ac0d){_0x5b6ca2['sendStatus'](0x194);}return _0x53ac0d;};}function handleError(_0x5c29f8,_0x3b9a02){_0x3b9a02=_0x3b9a02||0x1f4;return function(_0x4015f1){logger[_0x37a1('0x24')](_0x4015f1[_0x37a1('0x25')]);if(_0x4015f1[_0x37a1('0x26')]){delete _0x4015f1[_0x37a1('0x26')];}_0x5c29f8[_0x37a1('0x18')](_0x3b9a02)['send'](_0x4015f1);};}exports[_0x37a1('0x27')]=function(_0x17d7d4,_0xf7f814){if(_0x17d7d4['body']['id']){delete _0x17d7d4['body']['id'];}return db[_0x37a1('0x28')][_0x37a1('0x29')]({'where':{'id':_0x17d7d4[_0x37a1('0x2a')]['id']}})[_0x37a1('0x21')](handleEntityNotFound(_0xf7f814,null))['then'](saveUpdates(_0x17d7d4[_0x37a1('0x2b')],null))[_0x37a1('0x21')](respondWithResult(_0xf7f814,null))[_0x37a1('0x2c')](handleError(_0xf7f814,null));};exports[_0x37a1('0x22')]=function(_0x1c4a86,_0x44f2e3){return db['Action'][_0x37a1('0x29')]({'where':{'id':_0x1c4a86[_0x37a1('0x2a')]['id']}})[_0x37a1('0x21')](handleEntityNotFound(_0x44f2e3,null))[_0x37a1('0x21')](removeEntity(_0x44f2e3,null))[_0x37a1('0x2c')](handleError(_0x44f2e3,null));};
\ No newline at end of file
diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js
index 5d18254..67c4b98 100644
--- a/server/api/action/action.model.js
+++ b/server/api/action/action.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8751=['Action','tools_actions','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./action.attributes','define'];(function(_0x1558ee,_0x40ed70){var _0x252dba=function(_0x2dbde5){while(--_0x2dbde5){_0x1558ee['push'](_0x1558ee['shift']());}};_0x252dba(++_0x40ed70);}(_0x8751,0x106));var _0x1875=function(_0x24ee9e,_0x5a371c){_0x24ee9e=_0x24ee9e-0x0;var _0x4c9763=_0x8751[_0x24ee9e];return _0x4c9763;};'use strict';var _=require(_0x1875('0x0'));var util=require(_0x1875('0x1'));var logger=require(_0x1875('0x2'))(_0x1875('0x3'));var moment=require(_0x1875('0x4'));var BPromise=require(_0x1875('0x5'));var rp=require(_0x1875('0x6'));var fs=require('fs');var path=require(_0x1875('0x7'));var rimraf=require(_0x1875('0x8'));var config=require('../../config/environment');var attributes=require(_0x1875('0x9'));module['exports']=function(_0x46468c,_0x488dfc){return _0x46468c[_0x1875('0xa')](_0x1875('0xb'),attributes,{'tableName':_0x1875('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa554=['../../config/environment','exports','define','Action','tools_actions','lodash','../../config/logger','moment','bluebird','request-promise','rimraf'];(function(_0x3feee2,_0x1fdf65){var _0x127ee9=function(_0x22fe20){while(--_0x22fe20){_0x3feee2['push'](_0x3feee2['shift']());}};_0x127ee9(++_0x1fdf65);}(_0xa554,0x12e));var _0x4a55=function(_0x205edb,_0x31db06){_0x205edb=_0x205edb-0x0;var _0x487ee2=_0xa554[_0x205edb];return _0x487ee2;};'use strict';var _=require(_0x4a55('0x0'));var util=require('util');var logger=require(_0x4a55('0x1'))('api');var moment=require(_0x4a55('0x2'));var BPromise=require(_0x4a55('0x3'));var rp=require(_0x4a55('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4a55('0x5'));var config=require(_0x4a55('0x6'));var attributes=require('./action.attributes');module[_0x4a55('0x7')]=function(_0x2097eb,_0x18c129){return _0x2097eb[_0x4a55('0x8')](_0x4a55('0x9'),attributes,{'tableName':_0x4a55('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/action/action.rpc.js b/server/api/action/action.rpc.js
index 2c075b2..5c13577 100644
--- a/server/api/action/action.rpc.js
+++ b/server/api/action/action.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb2ff=['stringify','error','Action,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','Action,\x20%s,\x20%s,\x20%s'];(function(_0x26d538,_0x3f2ccf){var _0x183cca=function(_0x4fc1da){while(--_0x4fc1da){_0x26d538['push'](_0x26d538['shift']());}};_0x183cca(++_0x3f2ccf);}(_0xb2ff,0x123));var _0xfb2f=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xb2ff[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0xfb2f('0x0'));var util=require(_0xfb2f('0x1'));var moment=require('moment');var BPromise=require(_0xfb2f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xfb2f('0x3'));var logger=require('../../config/logger')(_0xfb2f('0x4'));var config=require(_0xfb2f('0x5'));var jayson=require(_0xfb2f('0x6'));var client=jayson[_0xfb2f('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4a0fd7,_0x28cb13,_0x4ff2df){return new BPromise(function(_0x34c04e,_0x4588d6){return client[_0xfb2f('0x8')](_0x4a0fd7,_0x4ff2df)[_0xfb2f('0x9')](function(_0x5abcdb){logger[_0xfb2f('0xa')]('Action,\x20%s,\x20%s',_0x28cb13,_0xfb2f('0xb'));logger['debug'](_0xfb2f('0xc'),_0x28cb13,_0xfb2f('0xb'),JSON[_0xfb2f('0xd')](_0x5abcdb));if(_0x5abcdb[_0xfb2f('0xe')]){if(_0x5abcdb[_0xfb2f('0xe')]['code']===0x1f4){logger[_0xfb2f('0xe')](_0xfb2f('0xf'),_0x28cb13,_0x5abcdb[_0xfb2f('0xe')][_0xfb2f('0x10')]);return _0x4588d6(_0x5abcdb[_0xfb2f('0xe')][_0xfb2f('0x10')]);}logger[_0xfb2f('0xe')](_0xfb2f('0xf'),_0x28cb13,_0x5abcdb['error'][_0xfb2f('0x10')]);return _0x34c04e(_0x5abcdb[_0xfb2f('0xe')][_0xfb2f('0x10')]);}else{logger[_0xfb2f('0xa')](_0xfb2f('0xf'),_0x28cb13,'request\x20sent');_0x34c04e(_0x5abcdb[_0xfb2f('0x11')][_0xfb2f('0x10')]);}})[_0xfb2f('0x12')](function(_0x240b79){logger[_0xfb2f('0xe')](_0xfb2f('0xf'),_0x28cb13,_0x240b79);_0x4588d6(_0x240b79);});});}
\ No newline at end of file
+var _0xc978=['bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xc978,0xcd));var _0x8c97=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc978[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x8c97('0x0'));var util=require(_0x8c97('0x1'));var moment=require(_0x8c97('0x2'));var BPromise=require(_0x8c97('0x3'));var rs=require(_0x8c97('0x4'));var fs=require('fs');var Redis=require(_0x8c97('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8c97('0x6'));var logger=require(_0x8c97('0x7'))(_0x8c97('0x8'));var config=require(_0x8c97('0x9'));var jayson=require(_0x8c97('0xa'));var client=jayson[_0x8c97('0xb')][_0x8c97('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x524196,_0x41a511,_0x1b5864){return new BPromise(function(_0x332cd1,_0x26ff40){return client[_0x8c97('0xd')](_0x524196,_0x1b5864)[_0x8c97('0xe')](function(_0x17aef0){logger['info'](_0x8c97('0xf'),_0x41a511,_0x8c97('0x10'));logger[_0x8c97('0x11')](_0x8c97('0x12'),_0x41a511,_0x8c97('0x10'),JSON[_0x8c97('0x13')](_0x17aef0));if(_0x17aef0[_0x8c97('0x14')]){if(_0x17aef0[_0x8c97('0x14')][_0x8c97('0x15')]===0x1f4){logger['error'](_0x8c97('0xf'),_0x41a511,_0x17aef0[_0x8c97('0x14')]['message']);return _0x26ff40(_0x17aef0[_0x8c97('0x14')][_0x8c97('0x16')]);}logger['error'](_0x8c97('0xf'),_0x41a511,_0x17aef0['error']['message']);return _0x332cd1(_0x17aef0['error'][_0x8c97('0x16')]);}else{logger[_0x8c97('0x17')](_0x8c97('0xf'),_0x41a511,_0x8c97('0x10'));_0x332cd1(_0x17aef0[_0x8c97('0x18')][_0x8c97('0x16')]);}})[_0x8c97('0x19')](function(_0xe3be1){logger[_0x8c97('0x14')]('Action,\x20%s,\x20%s',_0x41a511,_0xe3be1);_0x26ff40(_0xe3be1);});});}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index 2c17add..d1c0d8d 100644
--- a/server/api/action/index.js
+++ b/server/api/action/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x56bd=['path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','put','/:id','isAuthenticated','update','delete','exports','util'];(function(_0x3724a5,_0x19e4fd){var _0x29fdfd=function(_0x313198){while(--_0x313198){_0x3724a5['push'](_0x3724a5['shift']());}};_0x29fdfd(++_0x19e4fd);}(_0x56bd,0xe9));var _0xd56b=function(_0x5b9bd2,_0x1f068f){_0x5b9bd2=_0x5b9bd2-0x0;var _0x2c4d52=_0x56bd[_0x5b9bd2];return _0x2c4d52;};'use strict';var multer=require('multer');var util=require(_0xd56b('0x0'));var path=require(_0xd56b('0x1'));var timeout=require(_0xd56b('0x2'));var express=require('express');var router=express[_0xd56b('0x3')]();var auth=require(_0xd56b('0x4'));var interaction=require(_0xd56b('0x5'));var config=require(_0xd56b('0x6'));var controller=require('./action.controller');router[_0xd56b('0x7')](_0xd56b('0x8'),auth[_0xd56b('0x9')](),controller[_0xd56b('0xa')]);router[_0xd56b('0xb')](_0xd56b('0x8'),auth[_0xd56b('0x9')](),controller['destroy']);module[_0xd56b('0xc')]=router;
\ No newline at end of file
+var _0x4e34=['update','delete','/:id','isAuthenticated','destroy','exports','path','connect-timeout','../../components/auth/service','../../config/environment','./action.controller','put'];(function(_0x1e2290,_0xd8fe03){var _0x1c17f3=function(_0x13d0f1){while(--_0x13d0f1){_0x1e2290['push'](_0x1e2290['shift']());}};_0x1c17f3(++_0xd8fe03);}(_0x4e34,0x19e));var _0x44e3=function(_0x27897e,_0x261d02){_0x27897e=_0x27897e-0x0;var _0x108d00=_0x4e34[_0x27897e];return _0x108d00;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x44e3('0x0'));var timeout=require(_0x44e3('0x1'));var express=require('express');var router=express['Router']();var auth=require(_0x44e3('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x44e3('0x3'));var controller=require(_0x44e3('0x4'));router[_0x44e3('0x5')]('/:id',auth['isAuthenticated'](),controller[_0x44e3('0x6')]);router[_0x44e3('0x7')](_0x44e3('0x8'),auth[_0x44e3('0x9')](),controller[_0x44e3('0xa')]);module[_0x44e3('0xb')]=router;
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
index 248952b..69a263d 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.attributes.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcfbd=['TEXT','exports','STRING'];(function(_0x102f45,_0x1fe7a9){var _0x2fd13a=function(_0x3723a7){while(--_0x3723a7){_0x102f45['push'](_0x102f45['shift']());}};_0x2fd13a(++_0x1fe7a9);}(_0xcfbd,0x1de));var _0xdcfb=function(_0xba09ac,_0x1e71fa){_0xba09ac=_0xba09ac-0x0;var _0x58571d=_0xcfbd[_0xba09ac];return _0x58571d;};'use strict';var Sequelize=require('sequelize');module[_0xdcfb('0x0')]={'name':{'type':Sequelize[_0xdcfb('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0xdcfb('0x1')]},'table':{'type':Sequelize[_0xdcfb('0x1')]},'conditions':{'type':Sequelize[_0xdcfb('0x2')]},'joins':{'type':Sequelize[_0xdcfb('0x2')]}};
\ No newline at end of file
+var _0x7169=['STRING','TEXT','exports'];(function(_0x2aa0e7,_0x4e5145){var _0x1472c0=function(_0x4deaeb){while(--_0x4deaeb){_0x2aa0e7['push'](_0x2aa0e7['shift']());}};_0x1472c0(++_0x4e5145);}(_0x7169,0x15b));var _0x9716=function(_0x53cf8e,_0x3d290f){_0x53cf8e=_0x53cf8e-0x0;var _0x459197=_0x7169[_0x53cf8e];return _0x459197;};'use strict';var Sequelize=require('sequelize');module[_0x9716('0x0')]={'name':{'type':Sequelize[_0x9716('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x9716('0x1')]},'parent':{'type':Sequelize[_0x9716('0x1')]},'table':{'type':Sequelize[_0x9716('0x1')]},'conditions':{'type':Sequelize[_0x9716('0x2')]},'joins':{'type':Sequelize[_0x9716('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js
index 4d2a484..3913f9a 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.controller.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa44d=['../../config/environment','../../mysqldb','status','count','offset','limit','set','Content-Range','apply','reject','destroy','get','CustomReports','UserProfileResource','then','end','sendStatus','error','name','index','AnalyticCustomReport','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','params','rawAttributes','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','left_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','condition','value','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','from','table','MetricId','metric','function','replace','format','groupBy','orderBy','DESC','alias','joins','parse','parentKey','foreignTable','%s.%s\x20=\x20%s.%s','foreignKey','conditions','debug','Limited\x20Query:','sequelize','QueryTypes','SELECT','MAX(%s)','includes','select','where','clone','toString','No\x20available\x20data','web','fullPath','randomstring','generate','output','csv','cdr','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','child_process','fork','../../components/export/','savename','countTable','COUNT(*)','run','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils'];(function(_0x2c6371,_0x3be361){var _0x4098f8=function(_0x445b2e){while(--_0x445b2e){_0x2c6371['push'](_0x2c6371['shift']());}};_0x4098f8(++_0x3be361);}(_0xa44d,0x1ce));var _0xda44=function(_0x3b96cf,_0x1592f2){_0x3b96cf=_0x3b96cf-0x0;var _0x2e315a=_0xa44d[_0x3b96cf];return _0x2e315a;};'use strict';var pdf=require(_0xda44('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xda44('0x1'));var zipdir=require(_0xda44('0x2'));var jsonpatch=require(_0xda44('0x3'));var rp=require(_0xda44('0x4'));var moment=require(_0xda44('0x5'));var BPromise=require(_0xda44('0x6'));var Mustache=require(_0xda44('0x7'));var util=require(_0xda44('0x8'));var path=require(_0xda44('0x9'));var sox=require(_0xda44('0xa'));var csv=require('to-csv');var ejs=require(_0xda44('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0xda44('0xc'));var crypto=require(_0xda44('0xd'));var jsforce=require(_0xda44('0xe'));var deskjs=require(_0xda44('0xf'));var toCsv=require('to-csv');var querystring=require(_0xda44('0x10'));var Papa=require(_0xda44('0x11'));var Redis=require(_0xda44('0x12'));var authService=require(_0xda44('0x13'));var qs=require(_0xda44('0x14'));var hardwareService=require(_0xda44('0x15'));var logger=require('../../config/logger')(_0xda44('0x16'));var utils=require(_0xda44('0x17'));var config=require(_0xda44('0x18'));var db=require(_0xda44('0x19'))['db'];function respondWithStatusCode(_0x26d9f1,_0x4616cb){_0x4616cb=_0x4616cb||0xcc;return function(_0x2c02cc){if(_0x2c02cc){return _0x26d9f1['sendStatus'](_0x4616cb);}return _0x26d9f1['status'](_0x4616cb)['end']();};}function respondWithResult(_0x47da57,_0x3693aa){_0x3693aa=_0x3693aa||0xc8;return function(_0x55b545){if(_0x55b545){return _0x47da57[_0xda44('0x1a')](_0x3693aa)['json'](_0x55b545);}};}function respondWithFilteredResult(_0x275b28,_0x379616){return function(_0x29f1d7){if(_0x29f1d7){var _0x18632f=_0x29f1d7[_0xda44('0x1b')],_0x4e0205=_0x379616[_0xda44('0x1c')],_0x577206=_0x379616['offset']+_0x379616[_0xda44('0x1d')],_0x23c5c4;if(_0x577206>=_0x18632f){_0x577206=_0x18632f;_0x23c5c4=0xc8;}else{_0x23c5c4=0xce;}_0x275b28[_0xda44('0x1a')](_0x23c5c4);return _0x275b28[_0xda44('0x1e')](_0xda44('0x1f'),_0x4e0205+'-'+_0x577206+'/'+_0x18632f)['json'](_0x29f1d7);}return null;};}function patchUpdates(_0x179b10){return function(_0x3180c9){try{jsonpatch[_0xda44('0x20')](_0x3180c9,_0x179b10,!![]);}catch(_0x2d72e2){return BPromise[_0xda44('0x21')](_0x2d72e2);}return _0x3180c9['save']();};}function saveUpdates(_0x45ae1,_0x3a7714){return function(_0x11f8c4){if(_0x11f8c4){return _0x11f8c4['update'](_0x45ae1)['then'](function(_0x6101ec){return _0x6101ec;});}return null;};}function removeEntity(_0x3066b6,_0x52d9ef){return function(_0x25548c){if(_0x25548c){return _0x25548c[_0xda44('0x22')]()['then'](function(){var _0x5e5367=_0x25548c[_0xda44('0x23')]({'plain':!![]});var _0x38fd84=_0xda44('0x24');return db[_0xda44('0x25')][_0xda44('0x22')]({'where':{'type':_0x38fd84,'resourceId':_0x5e5367['id']}})[_0xda44('0x26')](function(){return _0x25548c;});})[_0xda44('0x26')](function(){_0x3066b6[_0xda44('0x1a')](0xcc)[_0xda44('0x27')]();});}};}function handleEntityNotFound(_0x45560f,_0x3b0267){return function(_0xdacfd){if(!_0xdacfd){_0x45560f[_0xda44('0x28')](0x194);}return _0xdacfd;};}function handleError(_0x138075,_0x44b144){_0x44b144=_0x44b144||0x1f4;return function(_0x517834){logger[_0xda44('0x29')](_0x517834['stack']);if(_0x517834[_0xda44('0x2a')]){delete _0x517834[_0xda44('0x2a')];}_0x138075['status'](_0x44b144)['send'](_0x517834);};}exports[_0xda44('0x2b')]=function(_0x2cdcbb,_0x353610){var _0x1a4593={},_0x3e0340={},_0xac1ab6={'count':0x0,'rows':[]};var _0x3ecbcd=db[_0xda44('0x2c')]['rawAttributes'];_0x3e0340['model']=_['keys'](_0x3ecbcd);_0x3e0340[_0xda44('0x2d')]=_[_0xda44('0x2e')](_0x2cdcbb[_0xda44('0x2d')]);_0x3e0340[_0xda44('0x2f')]=_[_0xda44('0x30')](_0x3e0340[_0xda44('0x31')],_0x3e0340['query']);_0x1a4593[_0xda44('0x32')]=_['intersection'](_0x3e0340[_0xda44('0x31')],qs[_0xda44('0x33')](_0x2cdcbb[_0xda44('0x2d')][_0xda44('0x33')]));_0x1a4593[_0xda44('0x32')]=_0x1a4593[_0xda44('0x32')][_0xda44('0x34')]?_0x1a4593[_0xda44('0x32')]:_0x3e0340[_0xda44('0x31')];if(!_0x2cdcbb[_0xda44('0x2d')][_0xda44('0x35')](_0xda44('0x36'))){_0x1a4593[_0xda44('0x1d')]=qs[_0xda44('0x1d')](_0x2cdcbb[_0xda44('0x2d')]['limit']);_0x1a4593[_0xda44('0x1c')]=qs[_0xda44('0x1c')](_0x2cdcbb[_0xda44('0x2d')][_0xda44('0x1c')]);}_0x1a4593[_0xda44('0x37')]=qs[_0xda44('0x38')](_0x2cdcbb['query'][_0xda44('0x38')]);_0x1a4593['where']=qs['filters'](_[_0xda44('0x39')](_0x2cdcbb['query'],_0x3e0340['filters']));if(_0x2cdcbb[_0xda44('0x2d')][_0xda44('0x3a')]){_0x1a4593['where']=_[_0xda44('0x3b')](_0x1a4593['where'],{'$or':_['map'](_0x3ecbcd,function(_0x1ec6c2){if(_0x1ec6c2[_0xda44('0x3c')][_0xda44('0x3d')]!==_0xda44('0x3e')){var _0xbfa755={};_0xbfa755[_0x1ec6c2[_0xda44('0x3f')]]={'$like':'%'+_0x2cdcbb[_0xda44('0x2d')]['filter']+'%'};return _0xbfa755;}})});}_0x1a4593=_[_0xda44('0x3b')]({},_0x1a4593,_0x2cdcbb[_0xda44('0x40')]);var _0x301070={'where':_0x1a4593['where']};return db['AnalyticCustomReport'][_0xda44('0x1b')](_0x301070)[_0xda44('0x26')](function(_0xdd948b){_0xac1ab6[_0xda44('0x1b')]=_0xdd948b;if(_0x2cdcbb[_0xda44('0x2d')][_0xda44('0x41')]){_0x1a4593[_0xda44('0x42')]=[{'all':!![]}];}return db[_0xda44('0x2c')][_0xda44('0x43')](_0x1a4593);})['then'](function(_0x1f5cd5){_0xac1ab6[_0xda44('0x44')]=_0x1f5cd5;return _0xac1ab6;})[_0xda44('0x26')](respondWithFilteredResult(_0x353610,_0x1a4593))[_0xda44('0x45')](handleError(_0x353610,null));};exports['show']=function(_0x43703e,_0x1ea2aa){var _0x27f557={'raw':![],'where':{'id':_0x43703e[_0xda44('0x46')]['id']}},_0x704f89={};_0x704f89[_0xda44('0x31')]=_['keys'](db[_0xda44('0x2c')][_0xda44('0x47')]);_0x704f89[_0xda44('0x2d')]=_[_0xda44('0x2e')](_0x43703e[_0xda44('0x2d')]);_0x704f89[_0xda44('0x2f')]=_['intersection'](_0x704f89[_0xda44('0x31')],_0x704f89[_0xda44('0x2d')]);_0x27f557[_0xda44('0x32')]=_[_0xda44('0x30')](_0x704f89[_0xda44('0x31')],qs[_0xda44('0x33')](_0x43703e[_0xda44('0x2d')][_0xda44('0x33')]));_0x27f557[_0xda44('0x32')]=_0x27f557[_0xda44('0x32')][_0xda44('0x34')]?_0x27f557[_0xda44('0x32')]:_0x704f89[_0xda44('0x31')];if(_0x43703e[_0xda44('0x2d')]['includeAll']){_0x27f557[_0xda44('0x42')]=[{'all':!![]}];}_0x27f557=_['merge']({},_0x27f557,_0x43703e['options']);return db[_0xda44('0x2c')][_0xda44('0x48')](_0x27f557)[_0xda44('0x26')](handleEntityNotFound(_0x1ea2aa,null))[_0xda44('0x26')](respondWithResult(_0x1ea2aa,null))[_0xda44('0x45')](handleError(_0x1ea2aa,null));};exports[_0xda44('0x49')]=function(_0x7b2da0,_0x4f4da7){return db['AnalyticCustomReport'][_0xda44('0x49')](_0x7b2da0[_0xda44('0x4a')],{})[_0xda44('0x26')](function(_0x8553fa){var _0xf46110=_0x7b2da0['user'][_0xda44('0x23')]({'plain':!![]});if(!_0xf46110)throw new Error(_0xda44('0x4b'));if(_0xf46110[_0xda44('0x4c')]==='user'){var _0x379348=_0x8553fa[_0xda44('0x23')]({'plain':!![]});var _0x5b9a9a=_0xda44('0x4d');return db['UserProfileSection'][_0xda44('0x48')]({'where':{'name':_0x5b9a9a,'userProfileId':_0xf46110[_0xda44('0x4e')]},'raw':!![]})[_0xda44('0x26')](function(_0x4b9f50){if(_0x4b9f50&&_0x4b9f50[_0xda44('0x4f')]===0x0){return db[_0xda44('0x25')][_0xda44('0x49')]({'name':_0x379348[_0xda44('0x2a')],'resourceId':_0x379348['id'],'type':'CustomReports','sectionId':_0x4b9f50['id']},{})[_0xda44('0x26')](function(){return _0x8553fa;});}else{return _0x8553fa;}})[_0xda44('0x45')](function(_0x500e88){logger['error'](_0xda44('0x50'),_0x500e88);throw _0x500e88;});}return _0x8553fa;})['then'](respondWithResult(_0x4f4da7,0xc9))[_0xda44('0x45')](handleError(_0x4f4da7,null));};exports['update']=function(_0x99bc8f,_0x20552b){if(_0x99bc8f['body']['id']){delete _0x99bc8f['body']['id'];}return db['AnalyticCustomReport'][_0xda44('0x48')]({'where':{'id':_0x99bc8f[_0xda44('0x46')]['id']}})['then'](handleEntityNotFound(_0x20552b,null))[_0xda44('0x26')](saveUpdates(_0x99bc8f[_0xda44('0x4a')],null))['then'](respondWithResult(_0x20552b,null))[_0xda44('0x45')](handleError(_0x20552b,null));};exports[_0xda44('0x22')]=function(_0x3955bc,_0x12db65){return db['AnalyticCustomReport']['find']({'where':{'id':_0x3955bc[_0xda44('0x46')]['id']}})[_0xda44('0x26')](handleEntityNotFound(_0x12db65,null))[_0xda44('0x26')](removeEntity(_0x12db65,null))[_0xda44('0x45')](handleError(_0x12db65,null));};exports[_0xda44('0x51')]=function(_0x1b8ff4,_0x60cdf6){var _0x24f1d9=0xa;var _0x1b74eb=[_0xda44('0x52'),_0xda44('0x53'),'right_join',_0xda44('0x54')];var _0x12e52c={'SUM':_0xda44('0x55'),'COUNT':_0xda44('0x56'),'COUNT DISTINCT':_0xda44('0x57'),'MAX':'MAX(%s)','MIN':_0xda44('0x58'),'AVG':_0xda44('0x59'),'GROUP_CONCAT':_0xda44('0x5a'),'GROUP_CONCAT ASC':_0xda44('0x5b'),'GROUP_CONCAT DESC':_0xda44('0x5c')};var _0x5a5da3={'SEC_TO_TIME':_0xda44('0x5d'),'DATE':_0xda44('0x5e'),'HOUR':_0xda44('0x5f'),'ROUND':_0xda44('0x60'),'UNIX_TIMESTAMP':_0xda44('0x61')};var _0x33ac53=function(_0x538b77){return!_['includes']([_0xda44('0x62'),_0xda44('0x63'),_0xda44('0x64'),_0xda44('0x65')],_0x538b77);};var _0x298f7a=function(_0x5536ad){if(!_0x5536ad||!_0x5536ad[_0xda44('0x66')][_0xda44('0x34')]){return'';}for(var _0x99af='(',_0x49a570=0x0;_0x49a570<_0x5536ad[_0xda44('0x66')][_0xda44('0x34')];_0x49a570+=0x1){_0x49a570>0x0&&(_0x99af+='\x20'+_0x5536ad[_0xda44('0x67')]+'\x20');_0x99af+=_0x5536ad['rules'][_0x49a570][_0xda44('0x68')]?_0x298f7a(_0x5536ad[_0xda44('0x66')][_0x49a570][_0xda44('0x68')]):_0x5536ad[_0xda44('0x66')][_0x49a570][_0xda44('0x3f')]+'\x20'+_0x5536ad[_0xda44('0x66')][_0x49a570][_0xda44('0x69')]+(_0x33ac53(_0x5536ad[_0xda44('0x66')][_0x49a570][_0xda44('0x69')])?'\x20'+_0x5536ad[_0xda44('0x66')][_0x49a570][_0xda44('0x6a')]:'');}return _0x99af+')';};var _0x81893={'where':{'id':_0x1b8ff4[_0xda44('0x46')]['id']}},_0x4cb9f3,_0x3d40ae,_0x38b147,_0x1ce1d4,_0x13b5f2;_0x81893=_[_0xda44('0x3b')]({},_0x81893,_0x1b8ff4[_0xda44('0x40')]);return db[_0xda44('0x2c')][_0xda44('0x48')](_0x81893)[_0xda44('0x26')](function(_0xe060e3){if(_0xe060e3){_0x4cb9f3=_0xe060e3;return _0xe060e3[_0xda44('0x6b')]();}return null;})[_0xda44('0x26')](function(_0x114fe0){if(_0x114fe0){if(!_0x114fe0['length']){throw new db[(_0xda44('0x6c'))][(_0xda44('0x6d'))](_0xda44('0x6e'),0x193);}_0x3d40ae=_0x114fe0;return db[_0xda44('0x6f')]['findAll']({'raw':!![]});}return null;})[_0xda44('0x26')](function(_0x2308ea){if(_0x2308ea){_0x38b147=_[_0xda44('0x70')](_0x2308ea,'id');var _0x29c1d4;var _0x49bc57=squel['select']();_0x49bc57[_0xda44('0x71')](_0x4cb9f3[_0xda44('0x72')]);for(var _0x2f1389=0x0;_0x2f1389<_0x3d40ae[_0xda44('0x34')];_0x2f1389+=0x1){_0x29c1d4=_0x3d40ae[_0x2f1389][_0xda44('0x73')]?_0x38b147[_0x3d40ae[_0x2f1389][_0xda44('0x73')]][_0xda44('0x74')]:_0x3d40ae[_0x2f1389]['field'];_0x29c1d4=_0x3d40ae[_0x2f1389][_0xda44('0x75')]?_[_0xda44('0x76')](_0x12e52c[_0x3d40ae[_0x2f1389]['function']],'%s',_0x29c1d4):_0x29c1d4;_0x29c1d4=_0x3d40ae[_0x2f1389][_0xda44('0x77')]?_['replace'](_0x5a5da3[_0x3d40ae[_0x2f1389][_0xda44('0x77')]],'%s',_0x29c1d4):_0x29c1d4;if(_0x3d40ae[_0x2f1389][_0xda44('0x78')]){_0x49bc57[_0xda44('0x68')](_0x29c1d4);}_0x3d40ae[_0x2f1389][_0xda44('0x79')]&&_0x49bc57[_0xda44('0x37')](_0x29c1d4,_0x3d40ae[_0x2f1389]['orderBy']===_0xda44('0x7a')?![]:!![]);_0x49bc57['field'](_0x29c1d4,_0x3d40ae[_0x2f1389][_0xda44('0x7b')]||_0x29c1d4);}if(_0x4cb9f3[_0xda44('0x7c')]){_0x4cb9f3[_0xda44('0x7c')]=JSON[_0xda44('0x7d')](_0x4cb9f3['joins']);for(var _0x61bf25=0x0;_0x61bf25<_0x4cb9f3[_0xda44('0x7c')][_0xda44('0x34')];_0x61bf25+=0x1){if(_0x4cb9f3[_0xda44('0x7c')][_0x61bf25][_0xda44('0x3c')]&&_['includes'](_0x1b74eb,_0x4cb9f3[_0xda44('0x7c')][_0x61bf25][_0xda44('0x3c')])&&_0x4cb9f3[_0xda44('0x7c')][_0x61bf25][_0xda44('0x7e')]&&_0x4cb9f3[_0xda44('0x7c')][_0x61bf25][_0xda44('0x7f')]&&_0x4cb9f3[_0xda44('0x7c')][_0x61bf25]['foreignKey']){_0x49bc57[_0x4cb9f3[_0xda44('0x7c')][_0x61bf25]['type']](_0x4cb9f3[_0xda44('0x7c')][_0x61bf25]['foreignTable'],null,util[_0xda44('0x77')](_0xda44('0x80'),_0x4cb9f3[_0xda44('0x72')],_0x4cb9f3['joins'][_0x61bf25][_0xda44('0x7e')],_0x4cb9f3[_0xda44('0x7c')][_0x61bf25]['foreignTable'],_0x4cb9f3[_0xda44('0x7c')][_0x61bf25][_0xda44('0x81')]));}}}if(_0x4cb9f3[_0xda44('0x82')]){_0x4cb9f3[_0xda44('0x82')]=JSON[_0xda44('0x7d')](_0x4cb9f3[_0xda44('0x82')]);_0x49bc57['where'](_0x298f7a(_0x4cb9f3['conditions']['group']));}_0x13b5f2=_0x49bc57['clone']();_0x49bc57['limit'](_0x24f1d9);_0x49bc57['offset'](0x0);logger[_0xda44('0x83')](_0xda44('0x84'),_0x49bc57['toString']());return db[_0xda44('0x85')][_0xda44('0x2d')](_0x49bc57['toString'](),{'type':db[_0xda44('0x85')][_0xda44('0x86')][_0xda44('0x87')]});}})['then'](respondWithResult(_0x60cdf6,null))[_0xda44('0x45')](handleError(_0x60cdf6,null));};function runReport(_0x2a644f,_0x2567fc,_0x5cc1be){var _0x56a0f0=_0x2567fc[_0xda44('0x2a')];var _0x2d8cd4=0xa;var _0x48ada8=['join','left_join','right_join','cross_join'];var _0x4e9b09={'SUM':_0xda44('0x55'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xda44('0x88'),'MIN':_0xda44('0x58'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xda44('0x5a'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x40a0c6={'SEC_TO_TIME':_0xda44('0x5d'),'DATE':_0xda44('0x5e'),'HOUR':_0xda44('0x5f'),'ROUND':_0xda44('0x60'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x3f13be=function(_0x2e65ac){return!_[_0xda44('0x89')]([_0xda44('0x62'),_0xda44('0x63'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x2e65ac);};var _0x1540b5=function(_0x1074e3){if(!_0x1074e3||!_0x1074e3[_0xda44('0x66')][_0xda44('0x34')]){return'';}for(var _0x3eb663='(',_0x117266=0x0;_0x117266<_0x1074e3[_0xda44('0x66')][_0xda44('0x34')];_0x117266+=0x1){_0x117266>0x0&&(_0x3eb663+='\x20'+_0x1074e3[_0xda44('0x67')]+'\x20');_0x3eb663+=_0x1074e3[_0xda44('0x66')][_0x117266]['group']?_0x1540b5(_0x1074e3[_0xda44('0x66')][_0x117266][_0xda44('0x68')]):_0x1074e3[_0xda44('0x66')][_0x117266][_0xda44('0x3f')]+'\x20'+_0x1074e3[_0xda44('0x66')][_0x117266][_0xda44('0x69')]+(_0x3f13be(_0x1074e3['rules'][_0x117266]['condition'])?'\x20'+_0x1074e3[_0xda44('0x66')][_0x117266][_0xda44('0x6a')]:'');}return _0x3eb663+')';};var _0x53c3c6={'where':{'id':_0x2a644f['id']}},_0x5fe574,_0x2644fc,_0x3d407d,_0x42cbd8,_0x132c5e;_0x53c3c6=_['merge']({},_0x53c3c6,_0x5cc1be);return db[_0xda44('0x2c')][_0xda44('0x48')](_0x53c3c6)[_0xda44('0x26')](function(_0x30f9ea){if(_0x30f9ea){_0x5fe574=_0x30f9ea;return _0x30f9ea[_0xda44('0x6b')]();}return null;})[_0xda44('0x26')](function(_0x113e5c){if(_0x113e5c){if(!_0x113e5c[_0xda44('0x34')]){throw new db[(_0xda44('0x6c'))][(_0xda44('0x6d'))](_0xda44('0x6e'),0x193);}_0x2644fc=_0x113e5c;return db[_0xda44('0x6f')][_0xda44('0x43')]({'raw':!![]});}return null;})[_0xda44('0x26')](function(_0x5b984c){if(_0x5b984c){_0x3d407d=_[_0xda44('0x70')](_0x5b984c,'id');var _0x346f1b;var _0x382dfc=squel[_0xda44('0x8a')]();_0x382dfc[_0xda44('0x71')](_0x5fe574[_0xda44('0x72')]);for(var _0x1f82f5=0x0;_0x1f82f5<_0x2644fc[_0xda44('0x34')];_0x1f82f5+=0x1){_0x346f1b=_0x2644fc[_0x1f82f5][_0xda44('0x73')]?_0x3d407d[_0x2644fc[_0x1f82f5][_0xda44('0x73')]][_0xda44('0x74')]:_0x2644fc[_0x1f82f5][_0xda44('0x3f')];_0x346f1b=_0x2644fc[_0x1f82f5]['function']?_['replace'](_0x4e9b09[_0x2644fc[_0x1f82f5][_0xda44('0x75')]],'%s',_0x346f1b):_0x346f1b;_0x346f1b=_0x2644fc[_0x1f82f5][_0xda44('0x77')]?_[_0xda44('0x76')](_0x40a0c6[_0x2644fc[_0x1f82f5][_0xda44('0x77')]],'%s',_0x346f1b):_0x346f1b;if(_0x2644fc[_0x1f82f5][_0xda44('0x78')]){_0x382dfc[_0xda44('0x68')](_0x346f1b);}_0x2644fc[_0x1f82f5][_0xda44('0x79')]&&_0x382dfc[_0xda44('0x37')](_0x346f1b,_0x2644fc[_0x1f82f5][_0xda44('0x79')]==='DESC'?![]:!![]);_0x382dfc['field'](_0x346f1b,_0x2644fc[_0x1f82f5][_0xda44('0x7b')]||_0x346f1b);}if(_0x5fe574[_0xda44('0x7c')]){_0x5fe574['joins']=JSON[_0xda44('0x7d')](_0x5fe574[_0xda44('0x7c')]);for(var _0x192a77=0x0;_0x192a77<_0x5fe574[_0xda44('0x7c')][_0xda44('0x34')];_0x192a77+=0x1){if(_0x5fe574['joins'][_0x192a77]['type']&&_[_0xda44('0x89')](_0x48ada8,_0x5fe574[_0xda44('0x7c')][_0x192a77]['type'])&&_0x5fe574[_0xda44('0x7c')][_0x192a77]['parentKey']&&_0x5fe574[_0xda44('0x7c')][_0x192a77][_0xda44('0x7f')]&&_0x5fe574[_0xda44('0x7c')][_0x192a77][_0xda44('0x81')]){_0x382dfc[_0x5fe574[_0xda44('0x7c')][_0x192a77]['type']](_0x5fe574[_0xda44('0x7c')][_0x192a77][_0xda44('0x7f')],null,util[_0xda44('0x77')](_0xda44('0x80'),_0x5fe574[_0xda44('0x72')],_0x5fe574['joins'][_0x192a77][_0xda44('0x7e')],_0x5fe574[_0xda44('0x7c')][_0x192a77]['foreignTable'],_0x5fe574[_0xda44('0x7c')][_0x192a77][_0xda44('0x81')]));}}}if(_0x5fe574[_0xda44('0x82')]){_0x5fe574[_0xda44('0x82')]=JSON[_0xda44('0x7d')](_0x5fe574[_0xda44('0x82')]);_0x382dfc[_0xda44('0x8b')](_0x1540b5(_0x5fe574['conditions'][_0xda44('0x68')]));}_0x132c5e=_0x382dfc[_0xda44('0x8c')]();_0x382dfc[_0xda44('0x1d')](_0x2d8cd4);_0x382dfc[_0xda44('0x1c')](0x0);logger[_0xda44('0x83')](_0xda44('0x84'),_0x382dfc[_0xda44('0x8d')]());return db[_0xda44('0x85')]['query'](_0x382dfc[_0xda44('0x8d')](),{'type':db['sequelize']['QueryTypes'][_0xda44('0x87')]});}})[_0xda44('0x26')](function(_0x52948c){if(!_0x52948c['length']){throw new db[(_0xda44('0x6c'))][(_0xda44('0x6d'))](_0xda44('0x8e'),0xcc);}if(_0x2567fc['output']===_0xda44('0x8f')){return null;}var _0x2dff31=_[_0xda44('0x3b')](_0x2567fc,{'name':_0x2567fc[_0xda44('0x90')]||_0x2567fc[_0xda44('0x2a')]||_0x5fe574[_0xda44('0x2a')],'basename':_0x56a0f0,'savename':util[_0xda44('0x77')]('%s-%s.%s',_0x2567fc[_0xda44('0x2a')]||_0x5fe574[_0xda44('0x2a')],require(_0xda44('0x91'))[_0xda44('0x92')](0x4),_0x2567fc[_0xda44('0x93')]||_0xda44('0x94')),'reportId':_0x5fe574['id'],'reportType':'custom'});return db['AnalyticExtractedReport'][_0xda44('0x49')](_0x2dff31,{'raw':!![]});})[_0xda44('0x26')](function(_0xcdbc09){if(_0x5fe574['table']===_0xda44('0x95')){_0x132c5e[_0xda44('0x8b')](_0x5fe574[_0xda44('0x72')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x2567fc[_0xda44('0x96')],_0x2567fc[_0xda44('0x97')]);}else{_0x132c5e[_0xda44('0x8b')](_0x5fe574['table']+_0xda44('0x98'),_0x2567fc[_0xda44('0x96')],_0x2567fc['endDate']);}if(_0xcdbc09){logger[_0xda44('0x99')](_0xda44('0x9a'),_0x132c5e[_0xda44('0x8d')]());require(_0xda44('0x9b'))[_0xda44('0x9c')](path[_0xda44('0x52')](__dirname,_0xda44('0x9d'),_0xcdbc09['output']),[_0xcdbc09['id'],_0x132c5e[_0xda44('0x8d')](),path[_0xda44('0x52')](__dirname,'../../files/reports',_0xcdbc09[_0xda44('0x9e')]),_0x56a0f0]);return _0xcdbc09;}else{var _0x393ccb=squel['select']();_0x393ccb[_0xda44('0x71')]('('+_0x132c5e['toString']()+')',_0xda44('0x9f'));_0x393ccb['field'](_0xda44('0xa0'),_0xda44('0x1b'));_0x132c5e[_0xda44('0x1d')](_0x2567fc[_0xda44('0x1d')]||_0x2d8cd4);_0x132c5e[_0xda44('0x1c')](_0x2567fc[_0xda44('0x1c')]||0x0);return db['sequelize'][_0xda44('0x2d')](_0x393ccb[_0xda44('0x8d')](),{'type':db[_0xda44('0x85')]['QueryTypes']['SELECT']})[_0xda44('0x26')](function(_0x14e8d3){if(!_0x14e8d3['length']){_0x42cbd8=0x0;}else{_0x42cbd8=_0x14e8d3[0x0][_0xda44('0x1b')]||0x0;}return db[_0xda44('0x85')]['query'](_0x132c5e[_0xda44('0x8d')](),{'type':db[_0xda44('0x85')][_0xda44('0x86')][_0xda44('0x87')]});})['then'](function(_0x36b653){return{'rows':_0x36b653||[],'count':_0x42cbd8};});}});}exports[_0xda44('0xa1')]=function(_0x433ed7,_0x23121a){return runReport(_0x433ed7[_0xda44('0x46')],_0x433ed7[_0xda44('0x2d')],_0x433ed7['options'])[_0xda44('0x26')](respondWithResult(_0x23121a,null))[_0xda44('0x45')](handleError(_0x23121a,null));};exports['runReport']=runReport;exports['query']=function(_0x246ca2,_0x393e89){var _0x140b93=0xa;var _0x3e262a=[_0xda44('0x52'),'left_join','right_join',_0xda44('0x54')];var _0x13aed0={'SUM':_0xda44('0x55'),'COUNT':_0xda44('0x56'),'COUNT DISTINCT':_0xda44('0x57'),'MAX':'MAX(%s)','MIN':_0xda44('0x58'),'AVG':_0xda44('0x59'),'GROUP_CONCAT':_0xda44('0x5a'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xda44('0x5c')};var _0xb3d882={'SEC_TO_TIME':_0xda44('0x5d'),'DATE':_0xda44('0x5e'),'HOUR':'HOUR(%s)','ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x4c73c6=function(_0x58be77){return!_['includes']([_0xda44('0x62'),'IS\x20NOT\x20NULL',_0xda44('0x64'),_0xda44('0x65')],_0x58be77);};var _0x488fd0=function(_0x49fa12){if(!_0x49fa12||!_0x49fa12['rules'][_0xda44('0x34')]){return'';}for(var _0x28a8ce='(',_0x42ff57=0x0;_0x42ff57<_0x49fa12[_0xda44('0x66')][_0xda44('0x34')];_0x42ff57+=0x1){_0x42ff57>0x0&&(_0x28a8ce+='\x20'+_0x49fa12['operator']+'\x20');_0x28a8ce+=_0x49fa12[_0xda44('0x66')][_0x42ff57][_0xda44('0x68')]?_0x488fd0(_0x49fa12[_0xda44('0x66')][_0x42ff57][_0xda44('0x68')]):_0x49fa12[_0xda44('0x66')][_0x42ff57][_0xda44('0x3f')]+'\x20'+_0x49fa12[_0xda44('0x66')][_0x42ff57][_0xda44('0x69')]+(_0x4c73c6(_0x49fa12['rules'][_0x42ff57][_0xda44('0x69')])?'\x20'+_0x49fa12['rules'][_0x42ff57][_0xda44('0x6a')]:'');}return _0x28a8ce+')';};var _0xdca8b9={'where':{'id':_0x246ca2[_0xda44('0x46')]['id']}},_0x1a5fbf,_0x414aa5,_0x19955e,_0x38cd97,_0x2ab5c7;_0xdca8b9=_[_0xda44('0x3b')]({},_0xdca8b9,_0x246ca2['options']);return db['AnalyticCustomReport']['find'](_0xdca8b9)[_0xda44('0x26')](function(_0xdbe98d){if(_0xdbe98d){_0x1a5fbf=_0xdbe98d;return _0xdbe98d[_0xda44('0x6b')]();}return null;})[_0xda44('0x26')](function(_0x3cd7ff){if(_0x3cd7ff){if(!_0x3cd7ff[_0xda44('0x34')]){throw new db[(_0xda44('0x6c'))][(_0xda44('0x6d'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x414aa5=_0x3cd7ff;return db['AnalyticMetric'][_0xda44('0x43')]({'raw':!![]});}return null;})[_0xda44('0x26')](function(_0x237fab){if(_0x237fab){_0x19955e=_[_0xda44('0x70')](_0x237fab,'id');var _0xa98439;var _0x1e6a68=squel['select']();_0x1e6a68['from'](_0x1a5fbf[_0xda44('0x72')]);for(var _0x3ff97d=0x0;_0x3ff97d<_0x414aa5['length'];_0x3ff97d+=0x1){_0xa98439=_0x414aa5[_0x3ff97d]['MetricId']?_0x19955e[_0x414aa5[_0x3ff97d]['MetricId']][_0xda44('0x74')]:_0x414aa5[_0x3ff97d][_0xda44('0x3f')];_0xa98439=_0x414aa5[_0x3ff97d][_0xda44('0x75')]?_[_0xda44('0x76')](_0x13aed0[_0x414aa5[_0x3ff97d]['function']],'%s',_0xa98439):_0xa98439;_0xa98439=_0x414aa5[_0x3ff97d][_0xda44('0x77')]?_[_0xda44('0x76')](_0xb3d882[_0x414aa5[_0x3ff97d][_0xda44('0x77')]],'%s',_0xa98439):_0xa98439;if(_0x414aa5[_0x3ff97d][_0xda44('0x78')]){_0x1e6a68[_0xda44('0x68')](_0xa98439);}_0x414aa5[_0x3ff97d][_0xda44('0x79')]&&_0x1e6a68[_0xda44('0x37')](_0xa98439,_0x414aa5[_0x3ff97d][_0xda44('0x79')]===_0xda44('0x7a')?![]:!![]);_0x1e6a68[_0xda44('0x3f')](_0xa98439,_0x414aa5[_0x3ff97d]['alias']||_0xa98439);}if(_0x1a5fbf[_0xda44('0x7c')]){_0x1a5fbf[_0xda44('0x7c')]=JSON[_0xda44('0x7d')](_0x1a5fbf[_0xda44('0x7c')]);for(var _0x2e1f18=0x0;_0x2e1f18<_0x1a5fbf[_0xda44('0x7c')][_0xda44('0x34')];_0x2e1f18+=0x1){if(_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x3c')]&&_[_0xda44('0x89')](_0x3e262a,_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x3c')])&&_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18]['parentKey']&&_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x7f')]&&_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x81')]){_0x1e6a68[_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x3c')]](_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x7f')],null,util[_0xda44('0x77')](_0xda44('0x80'),_0x1a5fbf[_0xda44('0x72')],_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18]['parentKey'],_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18]['foreignTable'],_0x1a5fbf[_0xda44('0x7c')][_0x2e1f18][_0xda44('0x81')]));}}}if(_0x1a5fbf[_0xda44('0x82')]){_0x1a5fbf[_0xda44('0x82')]=JSON['parse'](_0x1a5fbf[_0xda44('0x82')]);_0x1e6a68[_0xda44('0x8b')](_0x488fd0(_0x1a5fbf[_0xda44('0x82')]['group']));}_0x2ab5c7=_0x1e6a68[_0xda44('0x8c')]();_0x1e6a68['limit'](_0x140b93);_0x1e6a68[_0xda44('0x1c')](0x0);logger[_0xda44('0x83')](_0xda44('0x84'),_0x1e6a68[_0xda44('0x8d')]());return db[_0xda44('0x85')][_0xda44('0x2d')](_0x1e6a68['toString'](),{'type':db['sequelize'][_0xda44('0x86')][_0xda44('0x87')]});}})['then'](function(){return{'sql':_0x2ab5c7['toString']()};})[_0xda44('0x26')](respondWithResult(_0x393e89,null))[_0xda44('0x45')](handleError(_0x393e89,null));};
\ No newline at end of file
+var _0x80d9=['name','send','AnalyticCustomReport','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','map','type','VIRTUAL','field','options','include','findAll','catch','show','params','merge','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','Reports','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','left_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','operator','group','condition','getFields','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','keyBy','select','from','table','MetricId','function','replace','format','groupBy','orderBy','alias','joins','parentKey','foreignTable','%s.%s\x20=\x20%s.%s','foreignKey','conditions','parse','clone','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','right_join','MAX(%s)','DATE(%s)','ROUND(%s)','value','Sequelize','AnalyticMetric','DESC','debug','No\x20available\x20data','output','web','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','cdr','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','savename','countTable','run','runReport','IS\x20NOT\x20EMPTY','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','CustomReports','UserProfileResource','error','stack'];(function(_0x1c23bc,_0x38af29){var _0x5616d9=function(_0x1befec){while(--_0x1befec){_0x1c23bc['push'](_0x1c23bc['shift']());}};_0x5616d9(++_0x38af29);}(_0x80d9,0x122));var _0x980d=function(_0xd15b6f,_0x2209a3){_0xd15b6f=_0xd15b6f-0x0;var _0x4b1b97=_0x80d9[_0xd15b6f];return _0x4b1b97;};'use strict';var pdf=require(_0x980d('0x0'));var emlformat=require(_0x980d('0x1'));var rimraf=require(_0x980d('0x2'));var zipdir=require(_0x980d('0x3'));var jsonpatch=require(_0x980d('0x4'));var rp=require(_0x980d('0x5'));var moment=require(_0x980d('0x6'));var BPromise=require(_0x980d('0x7'));var Mustache=require(_0x980d('0x8'));var util=require(_0x980d('0x9'));var path=require(_0x980d('0xa'));var sox=require(_0x980d('0xb'));var csv=require('to-csv');var ejs=require(_0x980d('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0x980d('0xd'));var crypto=require(_0x980d('0xe'));var jsforce=require(_0x980d('0xf'));var deskjs=require(_0x980d('0x10'));var toCsv=require(_0x980d('0x11'));var querystring=require(_0x980d('0x12'));var Papa=require(_0x980d('0x13'));var Redis=require(_0x980d('0x14'));var authService=require('../../components/auth/service');var qs=require(_0x980d('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x980d('0x16'))(_0x980d('0x17'));var utils=require(_0x980d('0x18'));var config=require(_0x980d('0x19'));var db=require(_0x980d('0x1a'))['db'];function respondWithStatusCode(_0x43b49f,_0x24d272){_0x24d272=_0x24d272||0xcc;return function(_0xf176b6){if(_0xf176b6){return _0x43b49f[_0x980d('0x1b')](_0x24d272);}return _0x43b49f[_0x980d('0x1c')](_0x24d272)[_0x980d('0x1d')]();};}function respondWithResult(_0x36556b,_0x620444){_0x620444=_0x620444||0xc8;return function(_0x5a7592){if(_0x5a7592){return _0x36556b[_0x980d('0x1c')](_0x620444)['json'](_0x5a7592);}};}function respondWithFilteredResult(_0x750330,_0x25f768){return function(_0x265f04){if(_0x265f04){var _0x1885c5=_0x265f04[_0x980d('0x1e')],_0xf0d786=_0x25f768['offset'],_0x3b7137=_0x25f768[_0x980d('0x1f')]+_0x25f768[_0x980d('0x20')],_0x3e397d;if(_0x3b7137>=_0x1885c5){_0x3b7137=_0x1885c5;_0x3e397d=0xc8;}else{_0x3e397d=0xce;}_0x750330[_0x980d('0x1c')](_0x3e397d);return _0x750330[_0x980d('0x21')](_0x980d('0x22'),_0xf0d786+'-'+_0x3b7137+'/'+_0x1885c5)[_0x980d('0x23')](_0x265f04);}return null;};}function patchUpdates(_0xde2662){return function(_0x3e627c){try{jsonpatch[_0x980d('0x24')](_0x3e627c,_0xde2662,!![]);}catch(_0x3c7edf){return BPromise[_0x980d('0x25')](_0x3c7edf);}return _0x3e627c[_0x980d('0x26')]();};}function saveUpdates(_0x29fd4e,_0x2cf81a){return function(_0x37ecb2){if(_0x37ecb2){return _0x37ecb2[_0x980d('0x27')](_0x29fd4e)[_0x980d('0x28')](function(_0x138975){return _0x138975;});}return null;};}function removeEntity(_0x4b3153,_0x21c94e){return function(_0x2cb1e5){if(_0x2cb1e5){return _0x2cb1e5[_0x980d('0x29')]()[_0x980d('0x28')](function(){var _0x521eca=_0x2cb1e5['get']({'plain':!![]});var _0x139edc=_0x980d('0x2a');return db[_0x980d('0x2b')][_0x980d('0x29')]({'where':{'type':_0x139edc,'resourceId':_0x521eca['id']}})[_0x980d('0x28')](function(){return _0x2cb1e5;});})['then'](function(){_0x4b3153[_0x980d('0x1c')](0xcc)[_0x980d('0x1d')]();});}};}function handleEntityNotFound(_0x5973fc,_0x4edbf0){return function(_0x3b7962){if(!_0x3b7962){_0x5973fc['sendStatus'](0x194);}return _0x3b7962;};}function handleError(_0x561772,_0x4c13e4){_0x4c13e4=_0x4c13e4||0x1f4;return function(_0x20f914){logger[_0x980d('0x2c')](_0x20f914[_0x980d('0x2d')]);if(_0x20f914['name']){delete _0x20f914[_0x980d('0x2e')];}_0x561772[_0x980d('0x1c')](_0x4c13e4)[_0x980d('0x2f')](_0x20f914);};}exports['index']=function(_0x2fafe2,_0x2d1a26){var _0x478b08={},_0x358455={},_0x21c42c={'count':0x0,'rows':[]};var _0x2b162e=db[_0x980d('0x30')][_0x980d('0x31')];_0x358455[_0x980d('0x32')]=_[_0x980d('0x33')](_0x2b162e);_0x358455['query']=_[_0x980d('0x33')](_0x2fafe2[_0x980d('0x34')]);_0x358455[_0x980d('0x35')]=_[_0x980d('0x36')](_0x358455[_0x980d('0x32')],_0x358455[_0x980d('0x34')]);_0x478b08['attributes']=_[_0x980d('0x36')](_0x358455['model'],qs[_0x980d('0x37')](_0x2fafe2['query'][_0x980d('0x37')]));_0x478b08[_0x980d('0x38')]=_0x478b08[_0x980d('0x38')][_0x980d('0x39')]?_0x478b08['attributes']:_0x358455[_0x980d('0x32')];if(!_0x2fafe2[_0x980d('0x34')][_0x980d('0x3a')](_0x980d('0x3b'))){_0x478b08['limit']=qs[_0x980d('0x20')](_0x2fafe2[_0x980d('0x34')]['limit']);_0x478b08[_0x980d('0x1f')]=qs[_0x980d('0x1f')](_0x2fafe2[_0x980d('0x34')][_0x980d('0x1f')]);}_0x478b08[_0x980d('0x3c')]=qs['sort'](_0x2fafe2[_0x980d('0x34')][_0x980d('0x3d')]);_0x478b08[_0x980d('0x3e')]=qs[_0x980d('0x35')](_[_0x980d('0x3f')](_0x2fafe2['query'],_0x358455[_0x980d('0x35')]));if(_0x2fafe2['query'][_0x980d('0x40')]){_0x478b08['where']=_['merge'](_0x478b08[_0x980d('0x3e')],{'$or':_[_0x980d('0x41')](_0x2b162e,function(_0x85a22a){if(_0x85a22a[_0x980d('0x42')]['key']!==_0x980d('0x43')){var _0x458f4f={};_0x458f4f[_0x85a22a[_0x980d('0x44')]]={'$like':'%'+_0x2fafe2['query'][_0x980d('0x40')]+'%'};return _0x458f4f;}})});}_0x478b08=_['merge']({},_0x478b08,_0x2fafe2[_0x980d('0x45')]);var _0x49dad2={'where':_0x478b08[_0x980d('0x3e')]};return db['AnalyticCustomReport'][_0x980d('0x1e')](_0x49dad2)[_0x980d('0x28')](function(_0x31a0ef){_0x21c42c['count']=_0x31a0ef;if(_0x2fafe2['query']['includeAll']){_0x478b08[_0x980d('0x46')]=[{'all':!![]}];}return db[_0x980d('0x30')][_0x980d('0x47')](_0x478b08);})[_0x980d('0x28')](function(_0x53521a){_0x21c42c['rows']=_0x53521a;return _0x21c42c;})[_0x980d('0x28')](respondWithFilteredResult(_0x2d1a26,_0x478b08))[_0x980d('0x48')](handleError(_0x2d1a26,null));};exports[_0x980d('0x49')]=function(_0x3819db,_0x5d2e04){var _0x37b498={'raw':![],'where':{'id':_0x3819db[_0x980d('0x4a')]['id']}},_0x5aa4c5={};_0x5aa4c5[_0x980d('0x32')]=_[_0x980d('0x33')](db[_0x980d('0x30')]['rawAttributes']);_0x5aa4c5[_0x980d('0x34')]=_[_0x980d('0x33')](_0x3819db[_0x980d('0x34')]);_0x5aa4c5[_0x980d('0x35')]=_[_0x980d('0x36')](_0x5aa4c5[_0x980d('0x32')],_0x5aa4c5[_0x980d('0x34')]);_0x37b498['attributes']=_['intersection'](_0x5aa4c5[_0x980d('0x32')],qs[_0x980d('0x37')](_0x3819db[_0x980d('0x34')][_0x980d('0x37')]));_0x37b498['attributes']=_0x37b498[_0x980d('0x38')][_0x980d('0x39')]?_0x37b498[_0x980d('0x38')]:_0x5aa4c5['model'];if(_0x3819db[_0x980d('0x34')]['includeAll']){_0x37b498[_0x980d('0x46')]=[{'all':!![]}];}_0x37b498=_[_0x980d('0x4b')]({},_0x37b498,_0x3819db[_0x980d('0x45')]);return db[_0x980d('0x30')][_0x980d('0x4c')](_0x37b498)['then'](handleEntityNotFound(_0x5d2e04,null))['then'](respondWithResult(_0x5d2e04,null))[_0x980d('0x48')](handleError(_0x5d2e04,null));};exports[_0x980d('0x4d')]=function(_0x3bbd49,_0x1cb7bf){return db[_0x980d('0x30')][_0x980d('0x4d')](_0x3bbd49[_0x980d('0x4e')],{})[_0x980d('0x28')](function(_0x2a260b){var _0x35dc75=_0x3bbd49[_0x980d('0x4f')][_0x980d('0x50')]({'plain':!![]});if(!_0x35dc75)throw new Error(_0x980d('0x51'));if(_0x35dc75['role']===_0x980d('0x4f')){var _0x330d8f=_0x2a260b[_0x980d('0x50')]({'plain':!![]});var _0x5bda4d=_0x980d('0x52');return db['UserProfileSection'][_0x980d('0x4c')]({'where':{'name':_0x5bda4d,'userProfileId':_0x35dc75[_0x980d('0x53')]},'raw':!![]})[_0x980d('0x28')](function(_0x45eea9){if(_0x45eea9&&_0x45eea9[_0x980d('0x54')]===0x0){return db[_0x980d('0x2b')][_0x980d('0x4d')]({'name':_0x330d8f[_0x980d('0x2e')],'resourceId':_0x330d8f['id'],'type':_0x980d('0x2a'),'sectionId':_0x45eea9['id']},{})['then'](function(){return _0x2a260b;});}else{return _0x2a260b;}})['catch'](function(_0x3ff2ed){logger[_0x980d('0x2c')](_0x980d('0x55'),_0x3ff2ed);throw _0x3ff2ed;});}return _0x2a260b;})[_0x980d('0x28')](respondWithResult(_0x1cb7bf,0xc9))[_0x980d('0x48')](handleError(_0x1cb7bf,null));};exports[_0x980d('0x27')]=function(_0x325e67,_0x3206ca){if(_0x325e67[_0x980d('0x4e')]['id']){delete _0x325e67[_0x980d('0x4e')]['id'];}return db[_0x980d('0x30')]['find']({'where':{'id':_0x325e67[_0x980d('0x4a')]['id']}})[_0x980d('0x28')](handleEntityNotFound(_0x3206ca,null))[_0x980d('0x28')](saveUpdates(_0x325e67[_0x980d('0x4e')],null))['then'](respondWithResult(_0x3206ca,null))[_0x980d('0x48')](handleError(_0x3206ca,null));};exports[_0x980d('0x29')]=function(_0x12287d,_0x354d64){return db['AnalyticCustomReport'][_0x980d('0x4c')]({'where':{'id':_0x12287d['params']['id']}})[_0x980d('0x28')](handleEntityNotFound(_0x354d64,null))[_0x980d('0x28')](removeEntity(_0x354d64,null))['catch'](handleError(_0x354d64,null));};exports[_0x980d('0x56')]=function(_0x5eb29f,_0x4d274e){var _0x28e76e=0xa;var _0xdbdf32=[_0x980d('0x57'),_0x980d('0x58'),'right_join',_0x980d('0x59')];var _0x3f781e={'SUM':_0x980d('0x5a'),'COUNT':_0x980d('0x5b'),'COUNT DISTINCT':_0x980d('0x5c'),'MAX':'MAX(%s)','MIN':_0x980d('0x5d'),'AVG':_0x980d('0x5e'),'GROUP_CONCAT':_0x980d('0x5f'),'GROUP_CONCAT ASC':_0x980d('0x60'),'GROUP_CONCAT DESC':_0x980d('0x61')};var _0xc9d86a={'SEC_TO_TIME':_0x980d('0x62'),'DATE':'DATE(%s)','HOUR':_0x980d('0x63'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x980d('0x64')};var _0x15523f=function(_0x48d581){return!_[_0x980d('0x65')]([_0x980d('0x66'),_0x980d('0x67'),_0x980d('0x68'),'IS\x20NOT\x20EMPTY'],_0x48d581);};var _0x4bbaee=function(_0x27fba0){if(!_0x27fba0||!_0x27fba0[_0x980d('0x69')][_0x980d('0x39')]){return'';}for(var _0x266454='(',_0x3ff6f2=0x0;_0x3ff6f2<_0x27fba0[_0x980d('0x69')][_0x980d('0x39')];_0x3ff6f2+=0x1){_0x3ff6f2>0x0&&(_0x266454+='\x20'+_0x27fba0[_0x980d('0x6a')]+'\x20');_0x266454+=_0x27fba0[_0x980d('0x69')][_0x3ff6f2][_0x980d('0x6b')]?_0x4bbaee(_0x27fba0[_0x980d('0x69')][_0x3ff6f2][_0x980d('0x6b')]):_0x27fba0['rules'][_0x3ff6f2][_0x980d('0x44')]+'\x20'+_0x27fba0[_0x980d('0x69')][_0x3ff6f2][_0x980d('0x6c')]+(_0x15523f(_0x27fba0[_0x980d('0x69')][_0x3ff6f2][_0x980d('0x6c')])?'\x20'+_0x27fba0[_0x980d('0x69')][_0x3ff6f2]['value']:'');}return _0x266454+')';};var _0x224117={'where':{'id':_0x5eb29f['params']['id']}},_0x2f0e9a,_0x285338,_0x4ea133,_0x214107,_0x1e89cd;_0x224117=_[_0x980d('0x4b')]({},_0x224117,_0x5eb29f[_0x980d('0x45')]);return db[_0x980d('0x30')][_0x980d('0x4c')](_0x224117)['then'](function(_0x387bf1){if(_0x387bf1){_0x2f0e9a=_0x387bf1;return _0x387bf1[_0x980d('0x6d')]();}return null;})[_0x980d('0x28')](function(_0x216316){if(_0x216316){if(!_0x216316[_0x980d('0x39')]){throw new db['Sequelize'][(_0x980d('0x6e'))](_0x980d('0x6f'),0x193);}_0x285338=_0x216316;return db['AnalyticMetric'][_0x980d('0x47')]({'raw':!![]});}return null;})[_0x980d('0x28')](function(_0x32a5ed){if(_0x32a5ed){_0x4ea133=_[_0x980d('0x70')](_0x32a5ed,'id');var _0x2092b5;var _0x13eaf5=squel[_0x980d('0x71')]();_0x13eaf5[_0x980d('0x72')](_0x2f0e9a[_0x980d('0x73')]);for(var _0x303ccb=0x0;_0x303ccb<_0x285338[_0x980d('0x39')];_0x303ccb+=0x1){_0x2092b5=_0x285338[_0x303ccb]['MetricId']?_0x4ea133[_0x285338[_0x303ccb][_0x980d('0x74')]]['metric']:_0x285338[_0x303ccb][_0x980d('0x44')];_0x2092b5=_0x285338[_0x303ccb][_0x980d('0x75')]?_[_0x980d('0x76')](_0x3f781e[_0x285338[_0x303ccb][_0x980d('0x75')]],'%s',_0x2092b5):_0x2092b5;_0x2092b5=_0x285338[_0x303ccb]['format']?_[_0x980d('0x76')](_0xc9d86a[_0x285338[_0x303ccb][_0x980d('0x77')]],'%s',_0x2092b5):_0x2092b5;if(_0x285338[_0x303ccb][_0x980d('0x78')]){_0x13eaf5[_0x980d('0x6b')](_0x2092b5);}_0x285338[_0x303ccb][_0x980d('0x79')]&&_0x13eaf5[_0x980d('0x3c')](_0x2092b5,_0x285338[_0x303ccb][_0x980d('0x79')]==='DESC'?![]:!![]);_0x13eaf5[_0x980d('0x44')](_0x2092b5,_0x285338[_0x303ccb][_0x980d('0x7a')]||_0x2092b5);}if(_0x2f0e9a[_0x980d('0x7b')]){_0x2f0e9a['joins']=JSON['parse'](_0x2f0e9a[_0x980d('0x7b')]);for(var _0x4c1101=0x0;_0x4c1101<_0x2f0e9a[_0x980d('0x7b')][_0x980d('0x39')];_0x4c1101+=0x1){if(_0x2f0e9a['joins'][_0x4c1101]['type']&&_[_0x980d('0x65')](_0xdbdf32,_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x42')])&&_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x7c')]&&_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x7d')]&&_0x2f0e9a[_0x980d('0x7b')][_0x4c1101]['foreignKey']){_0x13eaf5[_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x42')]](_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x7d')],null,util['format'](_0x980d('0x7e'),_0x2f0e9a[_0x980d('0x73')],_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x7c')],_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x7d')],_0x2f0e9a[_0x980d('0x7b')][_0x4c1101][_0x980d('0x7f')]));}}}if(_0x2f0e9a['conditions']){_0x2f0e9a[_0x980d('0x80')]=JSON[_0x980d('0x81')](_0x2f0e9a[_0x980d('0x80')]);_0x13eaf5[_0x980d('0x3e')](_0x4bbaee(_0x2f0e9a[_0x980d('0x80')][_0x980d('0x6b')]));}_0x1e89cd=_0x13eaf5[_0x980d('0x82')]();_0x13eaf5['limit'](_0x28e76e);_0x13eaf5[_0x980d('0x1f')](0x0);logger['debug'](_0x980d('0x83'),_0x13eaf5[_0x980d('0x84')]());return db[_0x980d('0x85')]['query'](_0x13eaf5[_0x980d('0x84')](),{'type':db['sequelize'][_0x980d('0x86')][_0x980d('0x87')]});}})[_0x980d('0x28')](respondWithResult(_0x4d274e,null))[_0x980d('0x48')](handleError(_0x4d274e,null));};function runReport(_0x4fdff9,_0x3b0461,_0xd5ebeb){var _0x5d3d0f=_0x3b0461[_0x980d('0x2e')];var _0x558d2d=0xa;var _0x312ee6=['join',_0x980d('0x58'),_0x980d('0x88'),'cross_join'];var _0x377dd2={'SUM':_0x980d('0x5a'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x980d('0x5c'),'MAX':_0x980d('0x89'),'MIN':_0x980d('0x5d'),'AVG':_0x980d('0x5e'),'GROUP_CONCAT':_0x980d('0x5f'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x980d('0x61')};var _0x4ff985={'SEC_TO_TIME':_0x980d('0x62'),'DATE':_0x980d('0x8a'),'HOUR':_0x980d('0x63'),'ROUND':_0x980d('0x8b'),'UNIX_TIMESTAMP':_0x980d('0x64')};var _0x219ded=function(_0x13dfa5){return!_[_0x980d('0x65')]([_0x980d('0x66'),_0x980d('0x67'),_0x980d('0x68'),'IS\x20NOT\x20EMPTY'],_0x13dfa5);};var _0x50619c=function(_0x22dbfa){if(!_0x22dbfa||!_0x22dbfa[_0x980d('0x69')]['length']){return'';}for(var _0x487ba7='(',_0x498662=0x0;_0x498662<_0x22dbfa[_0x980d('0x69')][_0x980d('0x39')];_0x498662+=0x1){_0x498662>0x0&&(_0x487ba7+='\x20'+_0x22dbfa[_0x980d('0x6a')]+'\x20');_0x487ba7+=_0x22dbfa[_0x980d('0x69')][_0x498662]['group']?_0x50619c(_0x22dbfa[_0x980d('0x69')][_0x498662][_0x980d('0x6b')]):_0x22dbfa[_0x980d('0x69')][_0x498662]['field']+'\x20'+_0x22dbfa[_0x980d('0x69')][_0x498662][_0x980d('0x6c')]+(_0x219ded(_0x22dbfa[_0x980d('0x69')][_0x498662][_0x980d('0x6c')])?'\x20'+_0x22dbfa['rules'][_0x498662][_0x980d('0x8c')]:'');}return _0x487ba7+')';};var _0x464cdb={'where':{'id':_0x4fdff9['id']}},_0x478828,_0x454f09,_0xe57c5d,_0x2ef286,_0x4e3443;_0x464cdb=_[_0x980d('0x4b')]({},_0x464cdb,_0xd5ebeb);return db[_0x980d('0x30')][_0x980d('0x4c')](_0x464cdb)[_0x980d('0x28')](function(_0x53977b){if(_0x53977b){_0x478828=_0x53977b;return _0x53977b['getFields']();}return null;})[_0x980d('0x28')](function(_0x31e2b8){if(_0x31e2b8){if(!_0x31e2b8[_0x980d('0x39')]){throw new db[(_0x980d('0x8d'))]['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x454f09=_0x31e2b8;return db[_0x980d('0x8e')][_0x980d('0x47')]({'raw':!![]});}return null;})[_0x980d('0x28')](function(_0x40e0b9){if(_0x40e0b9){_0xe57c5d=_[_0x980d('0x70')](_0x40e0b9,'id');var _0x30410f;var _0x12704e=squel[_0x980d('0x71')]();_0x12704e['from'](_0x478828['table']);for(var _0x2aae13=0x0;_0x2aae13<_0x454f09[_0x980d('0x39')];_0x2aae13+=0x1){_0x30410f=_0x454f09[_0x2aae13][_0x980d('0x74')]?_0xe57c5d[_0x454f09[_0x2aae13]['MetricId']]['metric']:_0x454f09[_0x2aae13][_0x980d('0x44')];_0x30410f=_0x454f09[_0x2aae13][_0x980d('0x75')]?_['replace'](_0x377dd2[_0x454f09[_0x2aae13][_0x980d('0x75')]],'%s',_0x30410f):_0x30410f;_0x30410f=_0x454f09[_0x2aae13][_0x980d('0x77')]?_[_0x980d('0x76')](_0x4ff985[_0x454f09[_0x2aae13]['format']],'%s',_0x30410f):_0x30410f;if(_0x454f09[_0x2aae13][_0x980d('0x78')]){_0x12704e[_0x980d('0x6b')](_0x30410f);}_0x454f09[_0x2aae13][_0x980d('0x79')]&&_0x12704e[_0x980d('0x3c')](_0x30410f,_0x454f09[_0x2aae13][_0x980d('0x79')]===_0x980d('0x8f')?![]:!![]);_0x12704e[_0x980d('0x44')](_0x30410f,_0x454f09[_0x2aae13][_0x980d('0x7a')]||_0x30410f);}if(_0x478828['joins']){_0x478828['joins']=JSON[_0x980d('0x81')](_0x478828[_0x980d('0x7b')]);for(var _0x20c3cf=0x0;_0x20c3cf<_0x478828[_0x980d('0x7b')][_0x980d('0x39')];_0x20c3cf+=0x1){if(_0x478828['joins'][_0x20c3cf][_0x980d('0x42')]&&_[_0x980d('0x65')](_0x312ee6,_0x478828[_0x980d('0x7b')][_0x20c3cf][_0x980d('0x42')])&&_0x478828[_0x980d('0x7b')][_0x20c3cf]['parentKey']&&_0x478828['joins'][_0x20c3cf][_0x980d('0x7d')]&&_0x478828[_0x980d('0x7b')][_0x20c3cf][_0x980d('0x7f')]){_0x12704e[_0x478828[_0x980d('0x7b')][_0x20c3cf][_0x980d('0x42')]](_0x478828['joins'][_0x20c3cf][_0x980d('0x7d')],null,util['format'](_0x980d('0x7e'),_0x478828[_0x980d('0x73')],_0x478828['joins'][_0x20c3cf]['parentKey'],_0x478828[_0x980d('0x7b')][_0x20c3cf][_0x980d('0x7d')],_0x478828[_0x980d('0x7b')][_0x20c3cf][_0x980d('0x7f')]));}}}if(_0x478828[_0x980d('0x80')]){_0x478828[_0x980d('0x80')]=JSON[_0x980d('0x81')](_0x478828['conditions']);_0x12704e[_0x980d('0x3e')](_0x50619c(_0x478828['conditions'][_0x980d('0x6b')]));}_0x4e3443=_0x12704e['clone']();_0x12704e[_0x980d('0x20')](_0x558d2d);_0x12704e['offset'](0x0);logger[_0x980d('0x90')](_0x980d('0x83'),_0x12704e[_0x980d('0x84')]());return db['sequelize'][_0x980d('0x34')](_0x12704e['toString'](),{'type':db['sequelize']['QueryTypes'][_0x980d('0x87')]});}})['then'](function(_0x395947){if(!_0x395947[_0x980d('0x39')]){throw new db['Sequelize']['ValidationErrorItem'](_0x980d('0x91'),0xcc);}if(_0x3b0461[_0x980d('0x92')]===_0x980d('0x93')){return null;}var _0x54ba5c=_['merge'](_0x3b0461,{'name':_0x3b0461['fullPath']||_0x3b0461[_0x980d('0x2e')]||_0x478828[_0x980d('0x2e')],'basename':_0x5d3d0f,'savename':util['format'](_0x980d('0x94'),_0x3b0461['name']||_0x478828[_0x980d('0x2e')],require(_0x980d('0x95'))[_0x980d('0x96')](0x4),_0x3b0461['output']||_0x980d('0x97')),'reportId':_0x478828['id'],'reportType':'custom'});return db[_0x980d('0x98')][_0x980d('0x4d')](_0x54ba5c,{'raw':!![]});})[_0x980d('0x28')](function(_0x2233ae){if(_0x478828[_0x980d('0x73')]===_0x980d('0x99')){_0x4e3443[_0x980d('0x3e')](_0x478828[_0x980d('0x73')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x3b0461[_0x980d('0x9a')],_0x3b0461['endDate']);}else{_0x4e3443[_0x980d('0x3e')](_0x478828[_0x980d('0x73')]+_0x980d('0x9b'),_0x3b0461[_0x980d('0x9a')],_0x3b0461[_0x980d('0x9c')]);}if(_0x2233ae){logger[_0x980d('0x9d')](_0x980d('0x9e'),_0x4e3443['toString']());require(_0x980d('0x9f'))[_0x980d('0xa0')](path[_0x980d('0x57')](__dirname,_0x980d('0xa1'),_0x2233ae['output']),[_0x2233ae['id'],_0x4e3443[_0x980d('0x84')](),path[_0x980d('0x57')](__dirname,_0x980d('0xa2'),_0x2233ae[_0x980d('0xa3')]),_0x5d3d0f]);return _0x2233ae;}else{var _0x1da303=squel[_0x980d('0x71')]();_0x1da303[_0x980d('0x72')]('('+_0x4e3443['toString']()+')',_0x980d('0xa4'));_0x1da303[_0x980d('0x44')]('COUNT(*)',_0x980d('0x1e'));_0x4e3443['limit'](_0x3b0461[_0x980d('0x20')]||_0x558d2d);_0x4e3443[_0x980d('0x1f')](_0x3b0461[_0x980d('0x1f')]||0x0);return db['sequelize'][_0x980d('0x34')](_0x1da303[_0x980d('0x84')](),{'type':db['sequelize'][_0x980d('0x86')][_0x980d('0x87')]})['then'](function(_0x18f68b){if(!_0x18f68b[_0x980d('0x39')]){_0x2ef286=0x0;}else{_0x2ef286=_0x18f68b[0x0][_0x980d('0x1e')]||0x0;}return db[_0x980d('0x85')][_0x980d('0x34')](_0x4e3443[_0x980d('0x84')](),{'type':db[_0x980d('0x85')]['QueryTypes'][_0x980d('0x87')]});})[_0x980d('0x28')](function(_0x217661){return{'rows':_0x217661||[],'count':_0x2ef286};});}});}exports[_0x980d('0xa5')]=function(_0x236595,_0x313915){return runReport(_0x236595[_0x980d('0x4a')],_0x236595[_0x980d('0x34')],_0x236595['options'])[_0x980d('0x28')](respondWithResult(_0x313915,null))[_0x980d('0x48')](handleError(_0x313915,null));};exports[_0x980d('0xa6')]=runReport;exports[_0x980d('0x34')]=function(_0xa478e0,_0x12e489){var _0x2d6378=0xa;var _0x32b8e3=[_0x980d('0x57'),_0x980d('0x58'),_0x980d('0x88'),_0x980d('0x59')];var _0x5f0242={'SUM':_0x980d('0x5a'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x980d('0x5c'),'MAX':_0x980d('0x89'),'MIN':_0x980d('0x5d'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x980d('0x5f'),'GROUP_CONCAT ASC':_0x980d('0x60'),'GROUP_CONCAT DESC':_0x980d('0x61')};var _0xee985e={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x980d('0x8a'),'HOUR':_0x980d('0x63'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x605632=function(_0x1d32f3){return!_[_0x980d('0x65')]([_0x980d('0x66'),_0x980d('0x67'),_0x980d('0x68'),_0x980d('0xa7')],_0x1d32f3);};var _0x4282ae=function(_0x36f08a){if(!_0x36f08a||!_0x36f08a[_0x980d('0x69')][_0x980d('0x39')]){return'';}for(var _0x2bac93='(',_0x401222=0x0;_0x401222<_0x36f08a['rules']['length'];_0x401222+=0x1){_0x401222>0x0&&(_0x2bac93+='\x20'+_0x36f08a[_0x980d('0x6a')]+'\x20');_0x2bac93+=_0x36f08a[_0x980d('0x69')][_0x401222]['group']?_0x4282ae(_0x36f08a[_0x980d('0x69')][_0x401222][_0x980d('0x6b')]):_0x36f08a[_0x980d('0x69')][_0x401222]['field']+'\x20'+_0x36f08a[_0x980d('0x69')][_0x401222][_0x980d('0x6c')]+(_0x605632(_0x36f08a[_0x980d('0x69')][_0x401222][_0x980d('0x6c')])?'\x20'+_0x36f08a[_0x980d('0x69')][_0x401222][_0x980d('0x8c')]:'');}return _0x2bac93+')';};var _0x2054c3={'where':{'id':_0xa478e0[_0x980d('0x4a')]['id']}},_0x4795a4,_0x1805c5,_0x52a195,_0x55f6ee,_0x3be07f;_0x2054c3=_['merge']({},_0x2054c3,_0xa478e0[_0x980d('0x45')]);return db[_0x980d('0x30')][_0x980d('0x4c')](_0x2054c3)['then'](function(_0x5180b9){if(_0x5180b9){_0x4795a4=_0x5180b9;return _0x5180b9[_0x980d('0x6d')]();}return null;})['then'](function(_0x2c206a){if(_0x2c206a){if(!_0x2c206a[_0x980d('0x39')]){throw new db[(_0x980d('0x8d'))][(_0x980d('0x6e'))](_0x980d('0x6f'),0x193);}_0x1805c5=_0x2c206a;return db[_0x980d('0x8e')][_0x980d('0x47')]({'raw':!![]});}return null;})[_0x980d('0x28')](function(_0x551504){if(_0x551504){_0x52a195=_['keyBy'](_0x551504,'id');var _0x22b127;var _0x1c074c=squel[_0x980d('0x71')]();_0x1c074c[_0x980d('0x72')](_0x4795a4[_0x980d('0x73')]);for(var _0x1f7ace=0x0;_0x1f7ace<_0x1805c5['length'];_0x1f7ace+=0x1){_0x22b127=_0x1805c5[_0x1f7ace][_0x980d('0x74')]?_0x52a195[_0x1805c5[_0x1f7ace]['MetricId']]['metric']:_0x1805c5[_0x1f7ace]['field'];_0x22b127=_0x1805c5[_0x1f7ace][_0x980d('0x75')]?_[_0x980d('0x76')](_0x5f0242[_0x1805c5[_0x1f7ace][_0x980d('0x75')]],'%s',_0x22b127):_0x22b127;_0x22b127=_0x1805c5[_0x1f7ace][_0x980d('0x77')]?_[_0x980d('0x76')](_0xee985e[_0x1805c5[_0x1f7ace][_0x980d('0x77')]],'%s',_0x22b127):_0x22b127;if(_0x1805c5[_0x1f7ace][_0x980d('0x78')]){_0x1c074c['group'](_0x22b127);}_0x1805c5[_0x1f7ace][_0x980d('0x79')]&&_0x1c074c[_0x980d('0x3c')](_0x22b127,_0x1805c5[_0x1f7ace][_0x980d('0x79')]===_0x980d('0x8f')?![]:!![]);_0x1c074c[_0x980d('0x44')](_0x22b127,_0x1805c5[_0x1f7ace]['alias']||_0x22b127);}if(_0x4795a4[_0x980d('0x7b')]){_0x4795a4[_0x980d('0x7b')]=JSON[_0x980d('0x81')](_0x4795a4['joins']);for(var _0x10e3b6=0x0;_0x10e3b6<_0x4795a4[_0x980d('0x7b')][_0x980d('0x39')];_0x10e3b6+=0x1){if(_0x4795a4['joins'][_0x10e3b6][_0x980d('0x42')]&&_[_0x980d('0x65')](_0x32b8e3,_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x42')])&&_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x7c')]&&_0x4795a4['joins'][_0x10e3b6][_0x980d('0x7d')]&&_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x7f')]){_0x1c074c[_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x42')]](_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x7d')],null,util[_0x980d('0x77')]('%s.%s\x20=\x20%s.%s',_0x4795a4['table'],_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x7c')],_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x7d')],_0x4795a4[_0x980d('0x7b')][_0x10e3b6][_0x980d('0x7f')]));}}}if(_0x4795a4[_0x980d('0x80')]){_0x4795a4[_0x980d('0x80')]=JSON[_0x980d('0x81')](_0x4795a4['conditions']);_0x1c074c[_0x980d('0x3e')](_0x4282ae(_0x4795a4[_0x980d('0x80')][_0x980d('0x6b')]));}_0x3be07f=_0x1c074c[_0x980d('0x82')]();_0x1c074c[_0x980d('0x20')](_0x2d6378);_0x1c074c['offset'](0x0);logger[_0x980d('0x90')](_0x980d('0x83'),_0x1c074c[_0x980d('0x84')]());return db[_0x980d('0x85')][_0x980d('0x34')](_0x1c074c[_0x980d('0x84')](),{'type':db[_0x980d('0x85')][_0x980d('0x86')][_0x980d('0x87')]});}})[_0x980d('0x28')](function(){return{'sql':_0x3be07f[_0x980d('0x84')]()};})[_0x980d('0x28')](respondWithResult(_0x12e489,null))[_0x980d('0x48')](handleError(_0x12e489,null));};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js
index 7cc8523..2195eba 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.model.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0e4e=['bluebird','request-promise','./analyticCustomReport.attributes','exports','define','analytics_custom_reports','lodash','util'];(function(_0x1e2072,_0xe3cc90){var _0x22956b=function(_0x118dcf){while(--_0x118dcf){_0x1e2072['push'](_0x1e2072['shift']());}};_0x22956b(++_0xe3cc90);}(_0x0e4e,0x156));var _0xe0e4=function(_0x2cb1bd,_0x42b64c){_0x2cb1bd=_0x2cb1bd-0x0;var _0x393fdf=_0x0e4e[_0x2cb1bd];return _0x393fdf;};'use strict';var _=require(_0xe0e4('0x0'));var util=require(_0xe0e4('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xe0e4('0x2'));var rp=require(_0xe0e4('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xe0e4('0x4'));module[_0xe0e4('0x5')]=function(_0xd932e8,_0xdec4fe){return _0xd932e8[_0xe0e4('0x6')]('AnalyticCustomReport',attributes,{'tableName':_0xe0e4('0x7'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x56d6=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticCustomReport.attributes','define','AnalyticCustomReport','analytics_custom_reports','lodash','util','../../config/logger','api'];(function(_0x17c9c5,_0x4678bc){var _0x303151=function(_0x2dcbc4){while(--_0x2dcbc4){_0x17c9c5['push'](_0x17c9c5['shift']());}};_0x303151(++_0x4678bc);}(_0x56d6,0x1e6));var _0x656d=function(_0x5be476,_0x291955){_0x5be476=_0x5be476-0x0;var _0x49eb78=_0x56d6[_0x5be476];return _0x49eb78;};'use strict';var _=require(_0x656d('0x0'));var util=require(_0x656d('0x1'));var logger=require(_0x656d('0x2'))(_0x656d('0x3'));var moment=require(_0x656d('0x4'));var BPromise=require(_0x656d('0x5'));var rp=require(_0x656d('0x6'));var fs=require('fs');var path=require(_0x656d('0x7'));var rimraf=require(_0x656d('0x8'));var config=require(_0x656d('0x9'));var attributes=require(_0x656d('0xa'));module['exports']=function(_0x209487,_0x215918){return _0x209487[_0x656d('0xb')](_0x656d('0xc'),attributes,{'tableName':_0x656d('0xd'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.rpc.js b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
index 25cc8f4..416da79 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.rpc.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','ioredis'];(function(_0xdc4996,_0x15bedc){var _0x20fbb9=function(_0x47c811){while(--_0x47c811){_0xdc4996['push'](_0xdc4996['shift']());}};_0x20fbb9(++_0x15bedc);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0d8b('0x2'));var db=require(_0x0d8b('0x3'))['db'];var utils=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0d8b('0x7')][_0x0d8b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x39f43a,_0x4a4470,_0x413284){return new BPromise(function(_0x284169,_0x58e4e2){return client[_0x0d8b('0x9')](_0x39f43a,_0x413284)[_0x0d8b('0xa')](function(_0x3b027f){logger[_0x0d8b('0xb')](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));logger[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x4a4470,'request\x20sent',JSON[_0x0d8b('0x10')](_0x3b027f));if(_0x3b027f['error']){if(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x12')]===0x1f4){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x58e4e2(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x284169(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}else{logger['info'](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));_0x284169(_0x3b027f[_0x0d8b('0x14')][_0x0d8b('0x13')]);}})[_0x0d8b('0x15')](function(_0x5cd485){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x5cd485);_0x58e4e2(_0x5cd485);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x4f18ab,_0x26ce21){var _0x5d82ef=function(_0x429a59){while(--_0x429a59){_0x4f18ab['push'](_0x4f18ab['shift']());}};_0x5d82ef(++_0x26ce21);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xa9e0[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js
index f6266e5..93129fd 100644
--- a/server/api/analyticCustomReport/index.js
+++ b/server/api/analyticCustomReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbbbc=['../../components/auth/service','../../config/environment','./analyticCustomReport.controller','get','isAuthenticated','index','/:id','show','/:id/preview','preview','/:id/run','post','put','delete','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0xbbbc,0xf6));var _0xcbbb=function(_0xf117ab,_0x3a799d){_0xf117ab=_0xf117ab-0x0;var _0x26e28e=_0xbbbc[_0xf117ab];return _0x26e28e;};'use strict';var multer=require(_0xcbbb('0x0'));var util=require(_0xcbbb('0x1'));var path=require(_0xcbbb('0x2'));var timeout=require(_0xcbbb('0x3'));var express=require(_0xcbbb('0x4'));var router=express[_0xcbbb('0x5')]();var auth=require(_0xcbbb('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xcbbb('0x7'));var controller=require(_0xcbbb('0x8'));router[_0xcbbb('0x9')]('/',auth[_0xcbbb('0xa')](),controller[_0xcbbb('0xb')]);router['get'](_0xcbbb('0xc'),auth[_0xcbbb('0xa')](),controller[_0xcbbb('0xd')]);router[_0xcbbb('0x9')](_0xcbbb('0xe'),auth[_0xcbbb('0xa')](),controller[_0xcbbb('0xf')]);router['get'](_0xcbbb('0x10'),auth['isAuthenticated'](),controller['run']);router[_0xcbbb('0x9')]('/:id/query',auth[_0xcbbb('0xa')](),controller['query']);router[_0xcbbb('0x11')]('/',auth[_0xcbbb('0xa')](),controller['create']);router[_0xcbbb('0x12')]('/:id',auth[_0xcbbb('0xa')](),controller['update']);router[_0xcbbb('0x13')](_0xcbbb('0xc'),auth[_0xcbbb('0xa')](),controller['destroy']);module[_0xcbbb('0x14')]=router;
\ No newline at end of file
+var _0xe2cf=['create','put','exports','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','/:id/preview','preview','run','/:id/query','query','post'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe2cf,0x1a1));var _0xfe2c=function(_0x26e780,_0x5465ba){_0x26e780=_0x26e780-0x0;var _0x2e9594=_0xe2cf[_0x26e780];return _0x2e9594;};'use strict';var multer=require('multer');var util=require(_0xfe2c('0x0'));var path=require('path');var timeout=require(_0xfe2c('0x1'));var express=require('express');var router=express[_0xfe2c('0x2')]();var auth=require(_0xfe2c('0x3'));var interaction=require(_0xfe2c('0x4'));var config=require(_0xfe2c('0x5'));var controller=require('./analyticCustomReport.controller');router[_0xfe2c('0x6')]('/',auth[_0xfe2c('0x7')](),controller['index']);router['get'](_0xfe2c('0x8'),auth[_0xfe2c('0x7')](),controller['show']);router['get'](_0xfe2c('0x9'),auth[_0xfe2c('0x7')](),controller[_0xfe2c('0xa')]);router['get']('/:id/run',auth[_0xfe2c('0x7')](),controller[_0xfe2c('0xb')]);router['get'](_0xfe2c('0xc'),auth[_0xfe2c('0x7')](),controller[_0xfe2c('0xd')]);router[_0xfe2c('0xe')]('/',auth[_0xfe2c('0x7')](),controller[_0xfe2c('0xf')]);router[_0xfe2c('0x10')]('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0xfe2c('0x8'),auth['isAuthenticated'](),controller['destroy']);module[_0xfe2c('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
index 5a8867c..ae68096 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdde0=['TEXT','sequelize','STRING'];(function(_0x2ac1ca,_0x1e47d4){var _0x596155=function(_0x374f16){while(--_0x374f16){_0x2ac1ca['push'](_0x2ac1ca['shift']());}};_0x596155(++_0x1e47d4);}(_0xdde0,0x154));var _0x0dde=function(_0x1d6da7,_0x2ff9d6){_0x1d6da7=_0x1d6da7-0x0;var _0x9ebdf1=_0xdde0[_0x1d6da7];return _0x9ebdf1;};'use strict';var Sequelize=require(_0x0dde('0x0'));module['exports']={'name':{'type':Sequelize[_0x0dde('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x0dde('0x1')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0x0dde('0x1')]},'conditions':{'type':Sequelize[_0x0dde('0x2')]},'joins':{'type':Sequelize[_0x0dde('0x2')]}};
\ No newline at end of file
+var _0x47bc=['exports','STRING','sequelize'];(function(_0x3c4f1f,_0x20d3ec){var _0x19cb69=function(_0x2e04bc){while(--_0x2e04bc){_0x3c4f1f['push'](_0x3c4f1f['shift']());}};_0x19cb69(++_0x20d3ec);}(_0x47bc,0xcb));var _0xc47b=function(_0x3e95c0,_0x5cc3f1){_0x3e95c0=_0x3e95c0-0x0;var _0x29cdcd=_0x47bc[_0x3e95c0];return _0x29cdcd;};'use strict';var Sequelize=require(_0xc47b('0x0'));module[_0xc47b('0x1')]={'name':{'type':Sequelize[_0xc47b('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xc47b('0x2')]},'parent':{'type':Sequelize[_0xc47b('0x2')]},'table':{'type':Sequelize[_0xc47b('0x2')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
index 007df8d..d777e0c 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1616=['operator','group','condition','value','getFields','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','keyBy','from','table','MetricId','function','format','replace','groupBy','orderBy','DESC','alias','joins','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','parse','conditions','debug','toString','sequelize','QueryTypes','SELECT','IS\x20NOT\x20EMPTY','ValidationErrorItem','AnalyticMetric','select','No\x20available\x20data','output','web','randomstring','generate','csv','default','AnalyticExtractedReport','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','child_process','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','metric','clone','Limited\x20Query:','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','get','DefaultReports','UserProfileResource','error','stack','name','index','AnalyticDefaultReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','include','findAll','show','params','includeAll','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','find','userProfileId','autoAssociation','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','preview','join','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','rules'];(function(_0x39f8c7,_0x3da0db){var _0xf7551a=function(_0x581f89){while(--_0x581f89){_0x39f8c7['push'](_0x39f8c7['shift']());}};_0xf7551a(++_0x3da0db);}(_0x1616,0xe1));var _0x6161=function(_0x32bff9,_0x3f27d5){_0x32bff9=_0x32bff9-0x0;var _0xbab93=_0x1616[_0x32bff9];return _0xbab93;};'use strict';var pdf=require(_0x6161('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x6161('0x1'));var zipdir=require(_0x6161('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6161('0x3'));var moment=require(_0x6161('0x4'));var BPromise=require(_0x6161('0x5'));var Mustache=require(_0x6161('0x6'));var util=require(_0x6161('0x7'));var path=require(_0x6161('0x8'));var sox=require(_0x6161('0x9'));var csv=require(_0x6161('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x6161('0xb'));var squel=require('squel');var crypto=require(_0x6161('0xc'));var jsforce=require(_0x6161('0xd'));var deskjs=require(_0x6161('0xe'));var toCsv=require(_0x6161('0xa'));var querystring=require('querystring');var Papa=require(_0x6161('0xf'));var Redis=require('ioredis');var authService=require(_0x6161('0x10'));var qs=require(_0x6161('0x11'));var hardwareService=require(_0x6161('0x12'));var logger=require(_0x6161('0x13'))(_0x6161('0x14'));var utils=require('../../config/utils');var config=require(_0x6161('0x15'));var db=require(_0x6161('0x16'))['db'];function respondWithStatusCode(_0xcb34db,_0x3aa3af){_0x3aa3af=_0x3aa3af||0xcc;return function(_0x23e2b9){if(_0x23e2b9){return _0xcb34db[_0x6161('0x17')](_0x3aa3af);}return _0xcb34db[_0x6161('0x18')](_0x3aa3af)[_0x6161('0x19')]();};}function respondWithResult(_0x114309,_0x2c0c8){_0x2c0c8=_0x2c0c8||0xc8;return function(_0x1a19c9){if(_0x1a19c9){return _0x114309['status'](_0x2c0c8)['json'](_0x1a19c9);}};}function respondWithFilteredResult(_0x3c0e99,_0x329642){return function(_0x1f42c7){if(_0x1f42c7){var _0x2517cf=_0x1f42c7[_0x6161('0x1a')],_0x4c48db=_0x329642[_0x6161('0x1b')],_0x524827=_0x329642['offset']+_0x329642[_0x6161('0x1c')],_0xe8598;if(_0x524827>=_0x2517cf){_0x524827=_0x2517cf;_0xe8598=0xc8;}else{_0xe8598=0xce;}_0x3c0e99[_0x6161('0x18')](_0xe8598);return _0x3c0e99[_0x6161('0x1d')](_0x6161('0x1e'),_0x4c48db+'-'+_0x524827+'/'+_0x2517cf)[_0x6161('0x1f')](_0x1f42c7);}return null;};}function patchUpdates(_0x329bd3){return function(_0x3a0608){try{jsonpatch[_0x6161('0x20')](_0x3a0608,_0x329bd3,!![]);}catch(_0xa641cd){return BPromise[_0x6161('0x21')](_0xa641cd);}return _0x3a0608[_0x6161('0x22')]();};}function saveUpdates(_0x4e1260,_0x6d72a5){return function(_0x5bd8e8){if(_0x5bd8e8){return _0x5bd8e8[_0x6161('0x23')](_0x4e1260)[_0x6161('0x24')](function(_0x162676){return _0x162676;});}return null;};}function removeEntity(_0x36c1f1,_0x25fdcc){return function(_0x57b64d){if(_0x57b64d){return _0x57b64d[_0x6161('0x25')]()[_0x6161('0x24')](function(){var _0x99563f=_0x57b64d[_0x6161('0x26')]({'plain':!![]});var _0x354323=_0x6161('0x27');return db[_0x6161('0x28')]['destroy']({'where':{'type':_0x354323,'resourceId':_0x99563f['id']}})['then'](function(){return _0x57b64d;});})[_0x6161('0x24')](function(){_0x36c1f1[_0x6161('0x18')](0xcc)[_0x6161('0x19')]();});}};}function handleEntityNotFound(_0x53e63c,_0x4a1959){return function(_0x5dc0cf){if(!_0x5dc0cf){_0x53e63c[_0x6161('0x17')](0x194);}return _0x5dc0cf;};}function handleError(_0x4ac321,_0x1c51c8){_0x1c51c8=_0x1c51c8||0x1f4;return function(_0x1528d6){logger[_0x6161('0x29')](_0x1528d6[_0x6161('0x2a')]);if(_0x1528d6[_0x6161('0x2b')]){delete _0x1528d6[_0x6161('0x2b')];}_0x4ac321[_0x6161('0x18')](_0x1c51c8)['send'](_0x1528d6);};}exports[_0x6161('0x2c')]=function(_0x65cd72,_0x3b3b3f){var _0x143ce3={},_0x1ce0dc={},_0x3e5ad6={'count':0x0,'rows':[]};var _0x2f2fff=db[_0x6161('0x2d')][_0x6161('0x2e')];_0x1ce0dc[_0x6161('0x2f')]=_['keys'](_0x2f2fff);_0x1ce0dc['query']=_[_0x6161('0x30')](_0x65cd72[_0x6161('0x31')]);_0x1ce0dc[_0x6161('0x32')]=_[_0x6161('0x33')](_0x1ce0dc[_0x6161('0x2f')],_0x1ce0dc[_0x6161('0x31')]);_0x143ce3[_0x6161('0x34')]=_['intersection'](_0x1ce0dc[_0x6161('0x2f')],qs[_0x6161('0x35')](_0x65cd72['query'][_0x6161('0x35')]));_0x143ce3['attributes']=_0x143ce3[_0x6161('0x34')][_0x6161('0x36')]?_0x143ce3[_0x6161('0x34')]:_0x1ce0dc['model'];if(!_0x65cd72['query'][_0x6161('0x37')](_0x6161('0x38'))){_0x143ce3[_0x6161('0x1c')]=qs[_0x6161('0x1c')](_0x65cd72['query'][_0x6161('0x1c')]);_0x143ce3[_0x6161('0x1b')]=qs['offset'](_0x65cd72['query']['offset']);}_0x143ce3[_0x6161('0x39')]=qs[_0x6161('0x3a')](_0x65cd72[_0x6161('0x31')][_0x6161('0x3a')]);_0x143ce3[_0x6161('0x3b')]=qs[_0x6161('0x32')](_[_0x6161('0x3c')](_0x65cd72[_0x6161('0x31')],_0x1ce0dc[_0x6161('0x32')]));if(_0x65cd72[_0x6161('0x31')][_0x6161('0x3d')]){_0x143ce3[_0x6161('0x3b')]=_[_0x6161('0x3e')](_0x143ce3[_0x6161('0x3b')],{'$or':_[_0x6161('0x3f')](_0x2f2fff,function(_0x514963){if(_0x514963[_0x6161('0x40')][_0x6161('0x41')]!==_0x6161('0x42')){var _0x58e525={};_0x58e525[_0x514963[_0x6161('0x43')]]={'$like':'%'+_0x65cd72[_0x6161('0x31')][_0x6161('0x3d')]+'%'};return _0x58e525;}})});}_0x143ce3=_[_0x6161('0x3e')]({},_0x143ce3,_0x65cd72[_0x6161('0x44')]);var _0x3e3798={'where':_0x143ce3[_0x6161('0x3b')]};return db[_0x6161('0x2d')][_0x6161('0x1a')](_0x3e3798)['then'](function(_0x26c984){_0x3e5ad6['count']=_0x26c984;if(_0x65cd72[_0x6161('0x31')]['includeAll']){_0x143ce3[_0x6161('0x45')]=[{'all':!![]}];}return db[_0x6161('0x2d')][_0x6161('0x46')](_0x143ce3);})[_0x6161('0x24')](function(_0x23d7d0){_0x3e5ad6['rows']=_0x23d7d0;return _0x3e5ad6;})[_0x6161('0x24')](respondWithFilteredResult(_0x3b3b3f,_0x143ce3))['catch'](handleError(_0x3b3b3f,null));};exports[_0x6161('0x47')]=function(_0x1a68c8,_0xd1c454){var _0x5e0e50={'raw':!![],'where':{'id':_0x1a68c8[_0x6161('0x48')]['id']}},_0x2c9610={};_0x2c9610[_0x6161('0x2f')]=_['keys'](db[_0x6161('0x2d')][_0x6161('0x2e')]);_0x2c9610[_0x6161('0x31')]=_[_0x6161('0x30')](_0x1a68c8[_0x6161('0x31')]);_0x2c9610[_0x6161('0x32')]=_['intersection'](_0x2c9610[_0x6161('0x2f')],_0x2c9610[_0x6161('0x31')]);_0x5e0e50[_0x6161('0x34')]=_[_0x6161('0x33')](_0x2c9610[_0x6161('0x2f')],qs[_0x6161('0x35')](_0x1a68c8[_0x6161('0x31')][_0x6161('0x35')]));_0x5e0e50[_0x6161('0x34')]=_0x5e0e50[_0x6161('0x34')][_0x6161('0x36')]?_0x5e0e50[_0x6161('0x34')]:_0x2c9610['model'];if(_0x1a68c8[_0x6161('0x31')][_0x6161('0x49')]){_0x5e0e50['include']=[{'all':!![]}];}_0x5e0e50=_[_0x6161('0x3e')]({},_0x5e0e50,_0x1a68c8[_0x6161('0x44')]);return db[_0x6161('0x2d')]['find'](_0x5e0e50)[_0x6161('0x24')](handleEntityNotFound(_0xd1c454,null))['then'](respondWithResult(_0xd1c454,null))['catch'](handleError(_0xd1c454,null));};exports['create']=function(_0x391a9b,_0x5a07fc){return db[_0x6161('0x2d')][_0x6161('0x4a')](_0x391a9b['body'],{})['then'](function(_0x133aff){var _0x574a3a=_0x391a9b[_0x6161('0x4b')]['get']({'plain':!![]});if(!_0x574a3a)throw new Error(_0x6161('0x4c'));if(_0x574a3a[_0x6161('0x4d')]==='user'){var _0x290b05=_0x133aff[_0x6161('0x26')]({'plain':!![]});var _0x132ba9=_0x6161('0x4e');return db['UserProfileSection'][_0x6161('0x4f')]({'where':{'name':_0x132ba9,'userProfileId':_0x574a3a[_0x6161('0x50')]},'raw':!![]})[_0x6161('0x24')](function(_0x52882f){if(_0x52882f&&_0x52882f[_0x6161('0x51')]===0x0){return db['UserProfileResource'][_0x6161('0x4a')]({'name':_0x290b05[_0x6161('0x2b')],'resourceId':_0x290b05['id'],'type':_0x6161('0x27'),'sectionId':_0x52882f['id']},{})[_0x6161('0x24')](function(){return _0x133aff;});}else{return _0x133aff;}})[_0x6161('0x52')](function(_0x2f2b43){logger[_0x6161('0x29')](_0x6161('0x53'),_0x2f2b43);throw _0x2f2b43;});}return _0x133aff;})[_0x6161('0x24')](respondWithResult(_0x5a07fc,0xc9))[_0x6161('0x52')](handleError(_0x5a07fc,null));};exports[_0x6161('0x23')]=function(_0x5ca15f,_0x2b2322){if(_0x5ca15f['body']['id']){delete _0x5ca15f[_0x6161('0x54')]['id'];}return db[_0x6161('0x2d')]['find']({'where':{'id':_0x5ca15f[_0x6161('0x48')]['id']}})[_0x6161('0x24')](handleEntityNotFound(_0x2b2322,null))[_0x6161('0x24')](saveUpdates(_0x5ca15f[_0x6161('0x54')],null))[_0x6161('0x24')](respondWithResult(_0x2b2322,null))[_0x6161('0x52')](handleError(_0x2b2322,null));};exports[_0x6161('0x25')]=function(_0x44f7d5,_0x2edc83){return db['AnalyticDefaultReport']['find']({'where':{'id':_0x44f7d5[_0x6161('0x48')]['id']}})[_0x6161('0x24')](handleEntityNotFound(_0x2edc83,null))[_0x6161('0x24')](removeEntity(_0x2edc83,null))[_0x6161('0x52')](handleError(_0x2edc83,null));};exports[_0x6161('0x55')]=function(_0x8d7bc0,_0x232736){var _0x4a3e4a=0xa;var _0x4de312=[_0x6161('0x56'),_0x6161('0x57'),_0x6161('0x58'),_0x6161('0x59')];var _0x8325a7={'SUM':_0x6161('0x5a'),'COUNT':_0x6161('0x5b'),'COUNT DISTINCT':_0x6161('0x5c'),'MAX':_0x6161('0x5d'),'MIN':_0x6161('0x5e'),'AVG':_0x6161('0x5f'),'GROUP_CONCAT':_0x6161('0x60'),'GROUP_CONCAT ASC':_0x6161('0x61'),'GROUP_CONCAT DESC':_0x6161('0x62')};var _0x5aac96={'SEC_TO_TIME':_0x6161('0x63'),'DATE':_0x6161('0x64'),'HOUR':_0x6161('0x65'),'ROUND':_0x6161('0x66'),'UNIX_TIMESTAMP':_0x6161('0x67')};var _0x34f5ed=function(_0x52d85d){return!_[_0x6161('0x68')]([_0x6161('0x69'),_0x6161('0x6a'),_0x6161('0x6b'),'IS\x20NOT\x20EMPTY'],_0x52d85d);};var _0x3170f9=function(_0x3c7b59){if(!_0x3c7b59||!_0x3c7b59[_0x6161('0x6c')][_0x6161('0x36')]){return'';}for(var _0x312b9d='(',_0x33b4ed=0x0;_0x33b4ed<_0x3c7b59[_0x6161('0x6c')][_0x6161('0x36')];_0x33b4ed+=0x1){_0x33b4ed>0x0&&(_0x312b9d+='\x20'+_0x3c7b59[_0x6161('0x6d')]+'\x20');_0x312b9d+=_0x3c7b59[_0x6161('0x6c')][_0x33b4ed][_0x6161('0x6e')]?_0x3170f9(_0x3c7b59[_0x6161('0x6c')][_0x33b4ed]['group']):_0x3c7b59[_0x6161('0x6c')][_0x33b4ed][_0x6161('0x43')]+'\x20'+_0x3c7b59['rules'][_0x33b4ed][_0x6161('0x6f')]+(_0x34f5ed(_0x3c7b59[_0x6161('0x6c')][_0x33b4ed]['condition'])?'\x20'+_0x3c7b59['rules'][_0x33b4ed][_0x6161('0x70')]:'');}return _0x312b9d+')';};var _0x17be11={'where':{'id':_0x8d7bc0[_0x6161('0x48')]['id']}},_0x3ef5c5,_0x2517ca,_0xd0e795,_0x53b178,_0x11a83e;_0x17be11=_[_0x6161('0x3e')]({},_0x17be11,_0x8d7bc0[_0x6161('0x44')]);return db[_0x6161('0x2d')][_0x6161('0x4f')](_0x17be11)[_0x6161('0x24')](function(_0x5c9859){if(_0x5c9859){_0x3ef5c5=_0x5c9859;return _0x5c9859[_0x6161('0x71')]();}return null;})[_0x6161('0x24')](function(_0x1789b8){if(_0x1789b8){if(!_0x1789b8['length']){throw new db[(_0x6161('0x72'))]['ValidationErrorItem'](_0x6161('0x73'),0x193);}_0x2517ca=_0x1789b8;return db['AnalyticMetric'][_0x6161('0x46')]({'raw':!![]});}return null;})[_0x6161('0x24')](function(_0x2a31f4){if(_0x2a31f4){_0xd0e795=_[_0x6161('0x74')](_0x2a31f4,'id');var _0x4c2b71;var _0x55ab76=squel['select']();_0x55ab76[_0x6161('0x75')](_0x3ef5c5[_0x6161('0x76')]);for(var _0x244a4d=0x0;_0x244a4d<_0x2517ca[_0x6161('0x36')];_0x244a4d+=0x1){_0x4c2b71=_0x2517ca[_0x244a4d][_0x6161('0x77')]?_0xd0e795[_0x2517ca[_0x244a4d][_0x6161('0x77')]]['metric']:_0x2517ca[_0x244a4d]['field'];_0x4c2b71=_0x2517ca[_0x244a4d][_0x6161('0x78')]?_['replace'](_0x8325a7[_0x2517ca[_0x244a4d][_0x6161('0x78')]],'%s',_0x4c2b71):_0x4c2b71;_0x4c2b71=_0x2517ca[_0x244a4d][_0x6161('0x79')]?_[_0x6161('0x7a')](_0x5aac96[_0x2517ca[_0x244a4d][_0x6161('0x79')]],'%s',_0x4c2b71):_0x4c2b71;if(_0x2517ca[_0x244a4d][_0x6161('0x7b')]){_0x55ab76[_0x6161('0x6e')](_0x4c2b71);}_0x2517ca[_0x244a4d]['orderBy']&&_0x55ab76[_0x6161('0x39')](_0x4c2b71,_0x2517ca[_0x244a4d][_0x6161('0x7c')]===_0x6161('0x7d')?![]:!![]);_0x55ab76[_0x6161('0x43')](_0x4c2b71,_0x2517ca[_0x244a4d][_0x6161('0x7e')]||_0x4c2b71);}if(_0x3ef5c5[_0x6161('0x7f')]){_0x3ef5c5[_0x6161('0x7f')]=JSON['parse'](_0x3ef5c5[_0x6161('0x7f')]);for(var _0xdfab7d=0x0;_0xdfab7d<_0x3ef5c5[_0x6161('0x7f')][_0x6161('0x36')];_0xdfab7d+=0x1){if(_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x40')]&&_[_0x6161('0x68')](_0x4de312,_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x40')])&&_0x3ef5c5['joins'][_0xdfab7d][_0x6161('0x80')]&&_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x81')]&&_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x82')]){_0x55ab76[_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x40')]](_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x81')],null,util['format'](_0x6161('0x83'),_0x3ef5c5[_0x6161('0x76')],_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x80')],_0x3ef5c5['joins'][_0xdfab7d][_0x6161('0x81')],_0x3ef5c5[_0x6161('0x7f')][_0xdfab7d][_0x6161('0x82')]));}}}if(_0x3ef5c5['conditions']){_0x3ef5c5['conditions']=JSON[_0x6161('0x84')](_0x3ef5c5[_0x6161('0x85')]);_0x55ab76[_0x6161('0x3b')](_0x3170f9(_0x3ef5c5[_0x6161('0x85')][_0x6161('0x6e')]));}_0x11a83e=_0x55ab76['clone']();_0x55ab76[_0x6161('0x1c')](_0x4a3e4a);_0x55ab76['offset'](0x0);logger[_0x6161('0x86')]('Limited\x20Query:',_0x55ab76[_0x6161('0x87')]());return db[_0x6161('0x88')]['query'](_0x55ab76[_0x6161('0x87')](),{'type':db[_0x6161('0x88')][_0x6161('0x89')][_0x6161('0x8a')]});}})[_0x6161('0x24')](respondWithResult(_0x232736,null))['catch'](handleError(_0x232736,null));};function runReport(_0x1dc821,_0x56fc6a,_0x57fac7){var _0xe03106=_0x56fc6a[_0x6161('0x2b')];var _0x1ea12f=0xa;var _0x4242b6=[_0x6161('0x56'),_0x6161('0x57'),_0x6161('0x58'),_0x6161('0x59')];var _0x8e335f={'SUM':_0x6161('0x5a'),'COUNT':_0x6161('0x5b'),'COUNT DISTINCT':_0x6161('0x5c'),'MAX':_0x6161('0x5d'),'MIN':_0x6161('0x5e'),'AVG':_0x6161('0x5f'),'GROUP_CONCAT':_0x6161('0x60'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x586931={'SEC_TO_TIME':_0x6161('0x63'),'DATE':_0x6161('0x64'),'HOUR':_0x6161('0x65'),'ROUND':_0x6161('0x66'),'UNIX_TIMESTAMP':_0x6161('0x67')};var _0x171e08=function(_0x2a7478){return!_['includes']([_0x6161('0x69'),'IS\x20NOT\x20NULL',_0x6161('0x6b'),_0x6161('0x8b')],_0x2a7478);};var _0x2effa1=function(_0x255880){if(!_0x255880||!_0x255880['rules']['length']){return'';}for(var _0x16fe8d='(',_0x38c40c=0x0;_0x38c40c<_0x255880['rules']['length'];_0x38c40c+=0x1){_0x38c40c>0x0&&(_0x16fe8d+='\x20'+_0x255880[_0x6161('0x6d')]+'\x20');_0x16fe8d+=_0x255880['rules'][_0x38c40c]['group']?_0x2effa1(_0x255880['rules'][_0x38c40c][_0x6161('0x6e')]):_0x255880[_0x6161('0x6c')][_0x38c40c][_0x6161('0x43')]+'\x20'+_0x255880[_0x6161('0x6c')][_0x38c40c][_0x6161('0x6f')]+(_0x171e08(_0x255880[_0x6161('0x6c')][_0x38c40c][_0x6161('0x6f')])?'\x20'+_0x255880[_0x6161('0x6c')][_0x38c40c]['value']:'');}return _0x16fe8d+')';};var _0x4f4018={'where':{'id':_0x1dc821['id']}},_0x4bc4fa,_0x520246,_0x31a13f,_0x1ca454,_0x804d94;_0x4f4018=_['merge']({},_0x4f4018,_0x57fac7);return db[_0x6161('0x2d')][_0x6161('0x4f')](_0x4f4018)['then'](function(_0x37f52a){if(_0x37f52a){_0x4bc4fa=_0x37f52a;return _0x37f52a[_0x6161('0x71')]();}return null;})[_0x6161('0x24')](function(_0x20f1ee){if(_0x20f1ee){if(!_0x20f1ee[_0x6161('0x36')]){throw new db['Sequelize'][(_0x6161('0x8c'))](_0x6161('0x73'),0x193);}_0x520246=_0x20f1ee;return db[_0x6161('0x8d')][_0x6161('0x46')]({'raw':!![]});}return null;})[_0x6161('0x24')](function(_0x133b1f){if(_0x133b1f){_0x31a13f=_[_0x6161('0x74')](_0x133b1f,'id');var _0x14fb9b;var _0x235368=squel[_0x6161('0x8e')]();_0x235368['from'](_0x4bc4fa['table']);for(var _0x4fbb15=0x0;_0x4fbb15<_0x520246[_0x6161('0x36')];_0x4fbb15+=0x1){_0x14fb9b=_0x520246[_0x4fbb15][_0x6161('0x77')]?_0x31a13f[_0x520246[_0x4fbb15][_0x6161('0x77')]]['metric']:_0x520246[_0x4fbb15][_0x6161('0x43')];_0x14fb9b=_0x520246[_0x4fbb15]['function']?_[_0x6161('0x7a')](_0x8e335f[_0x520246[_0x4fbb15][_0x6161('0x78')]],'%s',_0x14fb9b):_0x14fb9b;_0x14fb9b=_0x520246[_0x4fbb15][_0x6161('0x79')]?_['replace'](_0x586931[_0x520246[_0x4fbb15]['format']],'%s',_0x14fb9b):_0x14fb9b;if(_0x520246[_0x4fbb15][_0x6161('0x7b')]){_0x235368['group'](_0x14fb9b);}_0x520246[_0x4fbb15][_0x6161('0x7c')]&&_0x235368[_0x6161('0x39')](_0x14fb9b,_0x520246[_0x4fbb15][_0x6161('0x7c')]==='DESC'?![]:!![]);_0x235368[_0x6161('0x43')](_0x14fb9b,_0x520246[_0x4fbb15][_0x6161('0x7e')]||_0x14fb9b);}if(_0x4bc4fa[_0x6161('0x7f')]){_0x4bc4fa[_0x6161('0x7f')]=JSON['parse'](_0x4bc4fa[_0x6161('0x7f')]);for(var _0x493d08=0x0;_0x493d08<_0x4bc4fa[_0x6161('0x7f')][_0x6161('0x36')];_0x493d08+=0x1){if(_0x4bc4fa[_0x6161('0x7f')][_0x493d08][_0x6161('0x40')]&&_['includes'](_0x4242b6,_0x4bc4fa[_0x6161('0x7f')][_0x493d08]['type'])&&_0x4bc4fa['joins'][_0x493d08]['parentKey']&&_0x4bc4fa[_0x6161('0x7f')][_0x493d08][_0x6161('0x81')]&&_0x4bc4fa[_0x6161('0x7f')][_0x493d08][_0x6161('0x82')]){_0x235368[_0x4bc4fa[_0x6161('0x7f')][_0x493d08]['type']](_0x4bc4fa['joins'][_0x493d08]['foreignTable'],null,util[_0x6161('0x79')](_0x6161('0x83'),_0x4bc4fa[_0x6161('0x76')],_0x4bc4fa['joins'][_0x493d08][_0x6161('0x80')],_0x4bc4fa[_0x6161('0x7f')][_0x493d08][_0x6161('0x81')],_0x4bc4fa[_0x6161('0x7f')][_0x493d08]['foreignKey']));}}}if(_0x4bc4fa[_0x6161('0x85')]){_0x4bc4fa[_0x6161('0x85')]=JSON['parse'](_0x4bc4fa[_0x6161('0x85')]);_0x235368[_0x6161('0x3b')](_0x2effa1(_0x4bc4fa[_0x6161('0x85')][_0x6161('0x6e')]));}_0x804d94=_0x235368['clone']();_0x235368['limit'](_0x1ea12f);_0x235368[_0x6161('0x1b')](0x0);logger[_0x6161('0x86')]('Limited\x20Query:',_0x235368[_0x6161('0x87')]());return db[_0x6161('0x88')][_0x6161('0x31')](_0x235368[_0x6161('0x87')](),{'type':db[_0x6161('0x88')][_0x6161('0x89')]['SELECT']});}})['then'](function(_0x5675bc){if(!_0x5675bc[_0x6161('0x36')]){throw new db[(_0x6161('0x72'))]['ValidationErrorItem'](_0x6161('0x8f'),0xcc);}if(_0x56fc6a[_0x6161('0x90')]===_0x6161('0x91')){return null;}var _0x37bab0=_[_0x6161('0x3e')](_0x56fc6a,{'name':_0x56fc6a['fullPath']||_0x56fc6a['name']||_0x4bc4fa['name'],'basename':_0xe03106,'savename':util[_0x6161('0x79')]('%s-%s.%s',_0x56fc6a[_0x6161('0x2b')]||_0x4bc4fa[_0x6161('0x2b')],require(_0x6161('0x92'))[_0x6161('0x93')](0x4),_0x56fc6a['output']||_0x6161('0x94')),'reportId':_0x4bc4fa['id'],'reportType':_0x6161('0x95')});return db[_0x6161('0x96')][_0x6161('0x4a')](_0x37bab0,{'raw':!![]});})['then'](function(_0x53ebd4){if(_0x4bc4fa[_0x6161('0x76')]==='cdr'){_0x804d94[_0x6161('0x3b')](_0x4bc4fa[_0x6161('0x76')]+_0x6161('0x97'),_0x56fc6a[_0x6161('0x98')],_0x56fc6a[_0x6161('0x99')]);}else{_0x804d94[_0x6161('0x3b')](_0x4bc4fa[_0x6161('0x76')]+_0x6161('0x9a'),_0x56fc6a[_0x6161('0x98')],_0x56fc6a[_0x6161('0x99')]);}if(_0x53ebd4){logger[_0x6161('0x9b')](_0x6161('0x9c'),_0x804d94[_0x6161('0x87')]());require(_0x6161('0x9d'))['fork'](path['join'](__dirname,_0x6161('0x9e'),_0x53ebd4[_0x6161('0x90')]),[_0x53ebd4['id'],_0x804d94['toString'](),path[_0x6161('0x56')](__dirname,_0x6161('0x9f'),_0x53ebd4[_0x6161('0xa0')]),_0xe03106]);return _0x53ebd4;}else{var _0x17dbd6=squel[_0x6161('0x8e')]();_0x17dbd6[_0x6161('0x75')]('('+_0x804d94[_0x6161('0x87')]()+')',_0x6161('0xa1'));_0x17dbd6['field'](_0x6161('0xa2'),_0x6161('0x1a'));_0x804d94[_0x6161('0x1c')](_0x56fc6a[_0x6161('0x1c')]||_0x1ea12f);_0x804d94[_0x6161('0x1b')](_0x56fc6a[_0x6161('0x1b')]||0x0);return db[_0x6161('0x88')][_0x6161('0x31')](_0x17dbd6[_0x6161('0x87')](),{'type':db['sequelize'][_0x6161('0x89')][_0x6161('0x8a')]})[_0x6161('0x24')](function(_0x1d02be){if(!_0x1d02be[_0x6161('0x36')]){_0x1ca454=0x0;}else{_0x1ca454=_0x1d02be[0x0]['count']||0x0;}return db[_0x6161('0x88')]['query'](_0x804d94[_0x6161('0x87')](),{'type':db[_0x6161('0x88')]['QueryTypes'][_0x6161('0x8a')]});})[_0x6161('0x24')](function(_0x3cb6a0){return{'rows':_0x3cb6a0||[],'count':_0x1ca454};});}});}exports[_0x6161('0xa3')]=function(_0x1758a2,_0x3bc521){return runReport(_0x1758a2[_0x6161('0x48')],_0x1758a2['query'],_0x1758a2[_0x6161('0x44')])[_0x6161('0x24')](respondWithResult(_0x3bc521,null))[_0x6161('0x52')](handleError(_0x3bc521,null));};exports['runReport']=runReport;exports[_0x6161('0x31')]=function(_0x28638d,_0x51c18f){var _0x167dd1=0xa;var _0x4f8572=['join',_0x6161('0x57'),_0x6161('0x58'),'cross_join'];var _0x4d13a3={'SUM':_0x6161('0x5a'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x6161('0x5d'),'MIN':'MIN(%s)','AVG':_0x6161('0x5f'),'GROUP_CONCAT':_0x6161('0x60'),'GROUP_CONCAT ASC':_0x6161('0x61'),'GROUP_CONCAT DESC':_0x6161('0x62')};var _0x58261d={'SEC_TO_TIME':_0x6161('0x63'),'DATE':_0x6161('0x64'),'HOUR':'HOUR(%s)','ROUND':_0x6161('0x66'),'UNIX_TIMESTAMP':_0x6161('0x67')};var _0x423562=function(_0x27bb8d){return!_[_0x6161('0x68')](['IS\x20NULL',_0x6161('0x6a'),_0x6161('0x6b'),_0x6161('0x8b')],_0x27bb8d);};var _0x2366df=function(_0x1299b5){if(!_0x1299b5||!_0x1299b5['rules']['length']){return'';}for(var _0x3f37f4='(',_0x662d60=0x0;_0x662d60<_0x1299b5['rules'][_0x6161('0x36')];_0x662d60+=0x1){_0x662d60>0x0&&(_0x3f37f4+='\x20'+_0x1299b5[_0x6161('0x6d')]+'\x20');_0x3f37f4+=_0x1299b5['rules'][_0x662d60]['group']?_0x2366df(_0x1299b5[_0x6161('0x6c')][_0x662d60]['group']):_0x1299b5[_0x6161('0x6c')][_0x662d60][_0x6161('0x43')]+'\x20'+_0x1299b5[_0x6161('0x6c')][_0x662d60][_0x6161('0x6f')]+(_0x423562(_0x1299b5[_0x6161('0x6c')][_0x662d60][_0x6161('0x6f')])?'\x20'+_0x1299b5[_0x6161('0x6c')][_0x662d60]['value']:'');}return _0x3f37f4+')';};var _0x5432bb={'where':{'id':_0x28638d[_0x6161('0x48')]['id']}},_0x1dea9e,_0x4a89e4,_0x300de0,_0x2a300e,_0x3b11b9;_0x5432bb=_[_0x6161('0x3e')]({},_0x5432bb,_0x28638d[_0x6161('0x44')]);return db['AnalyticDefaultReport']['find'](_0x5432bb)[_0x6161('0x24')](function(_0x5666ad){if(_0x5666ad){_0x1dea9e=_0x5666ad;return _0x5666ad['getFields']();}return null;})['then'](function(_0x33bb78){if(_0x33bb78){if(!_0x33bb78['length']){throw new db[(_0x6161('0x72'))][(_0x6161('0x8c'))](_0x6161('0x73'),0x193);}_0x4a89e4=_0x33bb78;return db[_0x6161('0x8d')]['findAll']({'raw':!![]});}return null;})['then'](function(_0x482473){if(_0x482473){_0x300de0=_[_0x6161('0x74')](_0x482473,'id');var _0x43a495;var _0x18eef8=squel[_0x6161('0x8e')]();_0x18eef8['from'](_0x1dea9e[_0x6161('0x76')]);for(var _0x324637=0x0;_0x324637<_0x4a89e4[_0x6161('0x36')];_0x324637+=0x1){_0x43a495=_0x4a89e4[_0x324637][_0x6161('0x77')]?_0x300de0[_0x4a89e4[_0x324637]['MetricId']][_0x6161('0xa4')]:_0x4a89e4[_0x324637][_0x6161('0x43')];_0x43a495=_0x4a89e4[_0x324637][_0x6161('0x78')]?_[_0x6161('0x7a')](_0x4d13a3[_0x4a89e4[_0x324637]['function']],'%s',_0x43a495):_0x43a495;_0x43a495=_0x4a89e4[_0x324637][_0x6161('0x79')]?_[_0x6161('0x7a')](_0x58261d[_0x4a89e4[_0x324637][_0x6161('0x79')]],'%s',_0x43a495):_0x43a495;if(_0x4a89e4[_0x324637][_0x6161('0x7b')]){_0x18eef8['group'](_0x43a495);}_0x4a89e4[_0x324637][_0x6161('0x7c')]&&_0x18eef8[_0x6161('0x39')](_0x43a495,_0x4a89e4[_0x324637][_0x6161('0x7c')]===_0x6161('0x7d')?![]:!![]);_0x18eef8[_0x6161('0x43')](_0x43a495,_0x4a89e4[_0x324637][_0x6161('0x7e')]||_0x43a495);}if(_0x1dea9e[_0x6161('0x7f')]){_0x1dea9e[_0x6161('0x7f')]=JSON[_0x6161('0x84')](_0x1dea9e['joins']);for(var _0x36e59e=0x0;_0x36e59e<_0x1dea9e[_0x6161('0x7f')][_0x6161('0x36')];_0x36e59e+=0x1){if(_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x40')]&&_[_0x6161('0x68')](_0x4f8572,_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x40')])&&_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x80')]&&_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x81')]&&_0x1dea9e['joins'][_0x36e59e][_0x6161('0x82')]){_0x18eef8[_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x40')]](_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x81')],null,util['format'](_0x6161('0x83'),_0x1dea9e[_0x6161('0x76')],_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x80')],_0x1dea9e[_0x6161('0x7f')][_0x36e59e][_0x6161('0x81')],_0x1dea9e[_0x6161('0x7f')][_0x36e59e]['foreignKey']));}}}if(_0x1dea9e[_0x6161('0x85')]){_0x1dea9e[_0x6161('0x85')]=JSON[_0x6161('0x84')](_0x1dea9e[_0x6161('0x85')]);_0x18eef8[_0x6161('0x3b')](_0x2366df(_0x1dea9e[_0x6161('0x85')][_0x6161('0x6e')]));}_0x3b11b9=_0x18eef8[_0x6161('0xa5')]();_0x18eef8[_0x6161('0x1c')](_0x167dd1);_0x18eef8[_0x6161('0x1b')](0x0);logger[_0x6161('0x86')](_0x6161('0xa6'),_0x18eef8[_0x6161('0x87')]());return db['sequelize'][_0x6161('0x31')](_0x18eef8['toString'](),{'type':db[_0x6161('0x88')][_0x6161('0x89')][_0x6161('0x8a')]});}})['then'](function(){return{'sql':_0x3b11b9[_0x6161('0x87')]()};})[_0x6161('0x24')](respondWithResult(_0x51c18f,null))[_0x6161('0x52')](handleError(_0x51c18f,null));};
\ No newline at end of file
+var _0x6176=['.createdAt\x20BETWEEN\x20?\x20AND\x20?','startDate','info','child_process','fork','../../components/export/','savename','countTable','COUNT(*)','QueryTypes','run','ValidationErrorItem','html-pdf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','json','count','offset','status','set','Content-Range','apply','reject','save','then','DefaultReports','UserProfileResource','destroy','error','stack','name','send','AnalyticDefaultReport','rawAttributes','model','keys','query','attributes','fields','length','hasOwnProperty','nolimit','limit','order','filters','merge','where','key','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','intersection','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','Reports','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','preview','join','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','IS\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','getFields','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','select','from','table','MetricId','metric','replace','format','groupBy','orderBy','DESC','alias','joins','parse','type','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','conditions','clone','debug','Limited\x20Query:','toString','sequelize','SELECT','UNIX_TIMESTAMP(%s)','includes','IS\x20NOT\x20NULL','keyBy','function','No\x20available\x20data','output','web','%s-%s.%s','randomstring','csv','default','AnalyticExtractedReport','.calldate\x20BETWEEN\x20?\x20AND\x20?','endDate'];(function(_0x38228b,_0x552c93){var _0x4adee2=function(_0xa20635){while(--_0xa20635){_0x38228b['push'](_0x38228b['shift']());}};_0x4adee2(++_0x552c93);}(_0x6176,0xab));var _0x6617=function(_0x548980,_0x241244){_0x548980=_0x548980-0x0;var _0x474a2c=_0x6176[_0x548980];return _0x474a2c;};'use strict';var pdf=require(_0x6617('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x6617('0x1'));var jsonpatch=require(_0x6617('0x2'));var rp=require(_0x6617('0x3'));var moment=require(_0x6617('0x4'));var BPromise=require(_0x6617('0x5'));var Mustache=require(_0x6617('0x6'));var util=require(_0x6617('0x7'));var path=require(_0x6617('0x8'));var sox=require(_0x6617('0x9'));var csv=require(_0x6617('0xa'));var ejs=require(_0x6617('0xb'));var fs=require('fs');var _=require(_0x6617('0xc'));var squel=require(_0x6617('0xd'));var crypto=require('crypto');var jsforce=require(_0x6617('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x6617('0xa'));var querystring=require(_0x6617('0xf'));var Papa=require(_0x6617('0x10'));var Redis=require(_0x6617('0x11'));var authService=require(_0x6617('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x6617('0x13'));var logger=require(_0x6617('0x14'))('api');var utils=require(_0x6617('0x15'));var config=require('../../config/environment');var db=require(_0x6617('0x16'))['db'];function respondWithStatusCode(_0xa8dc8b,_0x2f4826){_0x2f4826=_0x2f4826||0xcc;return function(_0x2cb760){if(_0x2cb760){return _0xa8dc8b[_0x6617('0x17')](_0x2f4826);}return _0xa8dc8b['status'](_0x2f4826)['end']();};}function respondWithResult(_0x1b668f,_0x4c8128){_0x4c8128=_0x4c8128||0xc8;return function(_0x4c41b1){if(_0x4c41b1){return _0x1b668f['status'](_0x4c8128)[_0x6617('0x18')](_0x4c41b1);}};}function respondWithFilteredResult(_0x337e4f,_0x435647){return function(_0x562b98){if(_0x562b98){var _0x264600=_0x562b98[_0x6617('0x19')],_0x515aeb=_0x435647[_0x6617('0x1a')],_0x390007=_0x435647['offset']+_0x435647['limit'],_0x3e57ed;if(_0x390007>=_0x264600){_0x390007=_0x264600;_0x3e57ed=0xc8;}else{_0x3e57ed=0xce;}_0x337e4f[_0x6617('0x1b')](_0x3e57ed);return _0x337e4f[_0x6617('0x1c')](_0x6617('0x1d'),_0x515aeb+'-'+_0x390007+'/'+_0x264600)[_0x6617('0x18')](_0x562b98);}return null;};}function patchUpdates(_0x15cb3b){return function(_0x48cbcf){try{jsonpatch[_0x6617('0x1e')](_0x48cbcf,_0x15cb3b,!![]);}catch(_0x10feb9){return BPromise[_0x6617('0x1f')](_0x10feb9);}return _0x48cbcf[_0x6617('0x20')]();};}function saveUpdates(_0x49f51a,_0x1eebee){return function(_0x55bdab){if(_0x55bdab){return _0x55bdab['update'](_0x49f51a)[_0x6617('0x21')](function(_0x5cdd21){return _0x5cdd21;});}return null;};}function removeEntity(_0x4f1a55,_0x353987){return function(_0x25fa40){if(_0x25fa40){return _0x25fa40['destroy']()[_0x6617('0x21')](function(){var _0x5c39a3=_0x25fa40['get']({'plain':!![]});var _0x181747=_0x6617('0x22');return db[_0x6617('0x23')][_0x6617('0x24')]({'where':{'type':_0x181747,'resourceId':_0x5c39a3['id']}})[_0x6617('0x21')](function(){return _0x25fa40;});})['then'](function(){_0x4f1a55[_0x6617('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3f14f3,_0x3ad507){return function(_0x5d9701){if(!_0x5d9701){_0x3f14f3['sendStatus'](0x194);}return _0x5d9701;};}function handleError(_0x31d14a,_0x4826dd){_0x4826dd=_0x4826dd||0x1f4;return function(_0x3a8dd7){logger[_0x6617('0x25')](_0x3a8dd7[_0x6617('0x26')]);if(_0x3a8dd7[_0x6617('0x27')]){delete _0x3a8dd7[_0x6617('0x27')];}_0x31d14a[_0x6617('0x1b')](_0x4826dd)[_0x6617('0x28')](_0x3a8dd7);};}exports['index']=function(_0x322784,_0x161bd2){var _0x560fa9={},_0x5721e3={},_0x288736={'count':0x0,'rows':[]};var _0x12a2ff=db[_0x6617('0x29')][_0x6617('0x2a')];_0x5721e3[_0x6617('0x2b')]=_[_0x6617('0x2c')](_0x12a2ff);_0x5721e3[_0x6617('0x2d')]=_['keys'](_0x322784[_0x6617('0x2d')]);_0x5721e3['filters']=_['intersection'](_0x5721e3[_0x6617('0x2b')],_0x5721e3[_0x6617('0x2d')]);_0x560fa9[_0x6617('0x2e')]=_['intersection'](_0x5721e3[_0x6617('0x2b')],qs[_0x6617('0x2f')](_0x322784[_0x6617('0x2d')][_0x6617('0x2f')]));_0x560fa9[_0x6617('0x2e')]=_0x560fa9[_0x6617('0x2e')][_0x6617('0x30')]?_0x560fa9[_0x6617('0x2e')]:_0x5721e3[_0x6617('0x2b')];if(!_0x322784[_0x6617('0x2d')][_0x6617('0x31')](_0x6617('0x32'))){_0x560fa9[_0x6617('0x33')]=qs[_0x6617('0x33')](_0x322784['query'][_0x6617('0x33')]);_0x560fa9[_0x6617('0x1a')]=qs[_0x6617('0x1a')](_0x322784[_0x6617('0x2d')][_0x6617('0x1a')]);}_0x560fa9[_0x6617('0x34')]=qs['sort'](_0x322784['query']['sort']);_0x560fa9['where']=qs[_0x6617('0x35')](_['pick'](_0x322784[_0x6617('0x2d')],_0x5721e3[_0x6617('0x35')]));if(_0x322784['query']['filter']){_0x560fa9['where']=_[_0x6617('0x36')](_0x560fa9[_0x6617('0x37')],{'$or':_['map'](_0x12a2ff,function(_0x58cf37){if(_0x58cf37['type'][_0x6617('0x38')]!==_0x6617('0x39')){var _0x52bd32={};_0x52bd32[_0x58cf37['field']]={'$like':'%'+_0x322784[_0x6617('0x2d')][_0x6617('0x3a')]+'%'};return _0x52bd32;}})});}_0x560fa9=_[_0x6617('0x36')]({},_0x560fa9,_0x322784[_0x6617('0x3b')]);var _0x6474ca={'where':_0x560fa9[_0x6617('0x37')]};return db[_0x6617('0x29')][_0x6617('0x19')](_0x6474ca)[_0x6617('0x21')](function(_0x5026dc){_0x288736[_0x6617('0x19')]=_0x5026dc;if(_0x322784['query'][_0x6617('0x3c')]){_0x560fa9[_0x6617('0x3d')]=[{'all':!![]}];}return db[_0x6617('0x29')][_0x6617('0x3e')](_0x560fa9);})[_0x6617('0x21')](function(_0x2fb366){_0x288736[_0x6617('0x3f')]=_0x2fb366;return _0x288736;})[_0x6617('0x21')](respondWithFilteredResult(_0x161bd2,_0x560fa9))[_0x6617('0x40')](handleError(_0x161bd2,null));};exports['show']=function(_0x28dcb5,_0x1e8b1e){var _0x1b4b4d={'raw':!![],'where':{'id':_0x28dcb5['params']['id']}},_0x1e3925={};_0x1e3925[_0x6617('0x2b')]=_[_0x6617('0x2c')](db[_0x6617('0x29')][_0x6617('0x2a')]);_0x1e3925[_0x6617('0x2d')]=_[_0x6617('0x2c')](_0x28dcb5[_0x6617('0x2d')]);_0x1e3925['filters']=_['intersection'](_0x1e3925[_0x6617('0x2b')],_0x1e3925[_0x6617('0x2d')]);_0x1b4b4d['attributes']=_[_0x6617('0x41')](_0x1e3925[_0x6617('0x2b')],qs['fields'](_0x28dcb5[_0x6617('0x2d')]['fields']));_0x1b4b4d['attributes']=_0x1b4b4d['attributes'][_0x6617('0x30')]?_0x1b4b4d[_0x6617('0x2e')]:_0x1e3925['model'];if(_0x28dcb5[_0x6617('0x2d')][_0x6617('0x3c')]){_0x1b4b4d[_0x6617('0x3d')]=[{'all':!![]}];}_0x1b4b4d=_[_0x6617('0x36')]({},_0x1b4b4d,_0x28dcb5[_0x6617('0x3b')]);return db[_0x6617('0x29')][_0x6617('0x42')](_0x1b4b4d)[_0x6617('0x21')](handleEntityNotFound(_0x1e8b1e,null))[_0x6617('0x21')](respondWithResult(_0x1e8b1e,null))[_0x6617('0x40')](handleError(_0x1e8b1e,null));};exports['create']=function(_0x541415,_0x381e3f){return db[_0x6617('0x29')][_0x6617('0x43')](_0x541415[_0x6617('0x44')],{})[_0x6617('0x21')](function(_0x3d8e6f){var _0x3a15fb=_0x541415[_0x6617('0x45')][_0x6617('0x46')]({'plain':!![]});if(!_0x3a15fb)throw new Error(_0x6617('0x47'));if(_0x3a15fb['role']==='user'){var _0xed910c=_0x3d8e6f['get']({'plain':!![]});var _0x4d6959=_0x6617('0x48');return db['UserProfileSection'][_0x6617('0x42')]({'where':{'name':_0x4d6959,'userProfileId':_0x3a15fb[_0x6617('0x49')]},'raw':!![]})['then'](function(_0x395ffb){if(_0x395ffb&&_0x395ffb['autoAssociation']===0x0){return db[_0x6617('0x23')][_0x6617('0x43')]({'name':_0xed910c['name'],'resourceId':_0xed910c['id'],'type':_0x6617('0x22'),'sectionId':_0x395ffb['id']},{})[_0x6617('0x21')](function(){return _0x3d8e6f;});}else{return _0x3d8e6f;}})[_0x6617('0x40')](function(_0x2b71d0){logger['error'](_0x6617('0x4a'),_0x2b71d0);throw _0x2b71d0;});}return _0x3d8e6f;})[_0x6617('0x21')](respondWithResult(_0x381e3f,0xc9))['catch'](handleError(_0x381e3f,null));};exports[_0x6617('0x4b')]=function(_0x17cebe,_0xd79ed1){if(_0x17cebe[_0x6617('0x44')]['id']){delete _0x17cebe[_0x6617('0x44')]['id'];}return db['AnalyticDefaultReport'][_0x6617('0x42')]({'where':{'id':_0x17cebe['params']['id']}})['then'](handleEntityNotFound(_0xd79ed1,null))[_0x6617('0x21')](saveUpdates(_0x17cebe[_0x6617('0x44')],null))['then'](respondWithResult(_0xd79ed1,null))['catch'](handleError(_0xd79ed1,null));};exports['destroy']=function(_0xd6859f,_0x334104){return db[_0x6617('0x29')]['find']({'where':{'id':_0xd6859f[_0x6617('0x4c')]['id']}})[_0x6617('0x21')](handleEntityNotFound(_0x334104,null))[_0x6617('0x21')](removeEntity(_0x334104,null))['catch'](handleError(_0x334104,null));};exports[_0x6617('0x4d')]=function(_0x59442c,_0x274474){var _0x2d8c50=0xa;var _0xc1ab48=[_0x6617('0x4e'),_0x6617('0x4f'),_0x6617('0x50'),_0x6617('0x51')];var _0x30e4fd={'SUM':_0x6617('0x52'),'COUNT':_0x6617('0x53'),'COUNT DISTINCT':_0x6617('0x54'),'MAX':_0x6617('0x55'),'MIN':_0x6617('0x56'),'AVG':_0x6617('0x57'),'GROUP_CONCAT':_0x6617('0x58'),'GROUP_CONCAT ASC':_0x6617('0x59'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x3ee3b9={'SEC_TO_TIME':_0x6617('0x5a'),'DATE':_0x6617('0x5b'),'HOUR':_0x6617('0x5c'),'ROUND':_0x6617('0x5d'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x899ea3=function(_0x18284e){return!_['includes']([_0x6617('0x5e'),'IS\x20NOT\x20NULL',_0x6617('0x5f'),_0x6617('0x60')],_0x18284e);};var _0x4cb5e4=function(_0x9b77d5){if(!_0x9b77d5||!_0x9b77d5[_0x6617('0x61')][_0x6617('0x30')]){return'';}for(var _0x239b1='(',_0x2bee9d=0x0;_0x2bee9d<_0x9b77d5['rules']['length'];_0x2bee9d+=0x1){_0x2bee9d>0x0&&(_0x239b1+='\x20'+_0x9b77d5[_0x6617('0x62')]+'\x20');_0x239b1+=_0x9b77d5['rules'][_0x2bee9d][_0x6617('0x63')]?_0x4cb5e4(_0x9b77d5['rules'][_0x2bee9d][_0x6617('0x63')]):_0x9b77d5[_0x6617('0x61')][_0x2bee9d][_0x6617('0x64')]+'\x20'+_0x9b77d5[_0x6617('0x61')][_0x2bee9d][_0x6617('0x65')]+(_0x899ea3(_0x9b77d5['rules'][_0x2bee9d][_0x6617('0x65')])?'\x20'+_0x9b77d5[_0x6617('0x61')][_0x2bee9d][_0x6617('0x66')]:'');}return _0x239b1+')';};var _0x5ad035={'where':{'id':_0x59442c[_0x6617('0x4c')]['id']}},_0x5d3bd3,_0x4b3e8f,_0x4f5e31,_0x7c6550,_0x5311f5;_0x5ad035=_[_0x6617('0x36')]({},_0x5ad035,_0x59442c[_0x6617('0x3b')]);return db[_0x6617('0x29')][_0x6617('0x42')](_0x5ad035)['then'](function(_0x340fdf){if(_0x340fdf){_0x5d3bd3=_0x340fdf;return _0x340fdf[_0x6617('0x67')]();}return null;})[_0x6617('0x21')](function(_0x852d2c){if(_0x852d2c){if(!_0x852d2c[_0x6617('0x30')]){throw new db[(_0x6617('0x68'))]['ValidationErrorItem'](_0x6617('0x69'),0x193);}_0x4b3e8f=_0x852d2c;return db[_0x6617('0x6a')][_0x6617('0x3e')]({'raw':!![]});}return null;})[_0x6617('0x21')](function(_0x184e5b){if(_0x184e5b){_0x4f5e31=_['keyBy'](_0x184e5b,'id');var _0xa85015;var _0x37bda8=squel[_0x6617('0x6b')]();_0x37bda8[_0x6617('0x6c')](_0x5d3bd3[_0x6617('0x6d')]);for(var _0x1c1438=0x0;_0x1c1438<_0x4b3e8f['length'];_0x1c1438+=0x1){_0xa85015=_0x4b3e8f[_0x1c1438][_0x6617('0x6e')]?_0x4f5e31[_0x4b3e8f[_0x1c1438][_0x6617('0x6e')]][_0x6617('0x6f')]:_0x4b3e8f[_0x1c1438][_0x6617('0x64')];_0xa85015=_0x4b3e8f[_0x1c1438]['function']?_[_0x6617('0x70')](_0x30e4fd[_0x4b3e8f[_0x1c1438]['function']],'%s',_0xa85015):_0xa85015;_0xa85015=_0x4b3e8f[_0x1c1438][_0x6617('0x71')]?_['replace'](_0x3ee3b9[_0x4b3e8f[_0x1c1438][_0x6617('0x71')]],'%s',_0xa85015):_0xa85015;if(_0x4b3e8f[_0x1c1438][_0x6617('0x72')]){_0x37bda8[_0x6617('0x63')](_0xa85015);}_0x4b3e8f[_0x1c1438][_0x6617('0x73')]&&_0x37bda8['order'](_0xa85015,_0x4b3e8f[_0x1c1438][_0x6617('0x73')]===_0x6617('0x74')?![]:!![]);_0x37bda8[_0x6617('0x64')](_0xa85015,_0x4b3e8f[_0x1c1438][_0x6617('0x75')]||_0xa85015);}if(_0x5d3bd3[_0x6617('0x76')]){_0x5d3bd3['joins']=JSON[_0x6617('0x77')](_0x5d3bd3[_0x6617('0x76')]);for(var _0x20704f=0x0;_0x20704f<_0x5d3bd3['joins'][_0x6617('0x30')];_0x20704f+=0x1){if(_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x78')]&&_['includes'](_0xc1ab48,_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x78')])&&_0x5d3bd3['joins'][_0x20704f][_0x6617('0x79')]&&_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x7a')]&&_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x7b')]){_0x37bda8[_0x5d3bd3['joins'][_0x20704f][_0x6617('0x78')]](_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x7a')],null,util[_0x6617('0x71')](_0x6617('0x7c'),_0x5d3bd3[_0x6617('0x6d')],_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x79')],_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x7a')],_0x5d3bd3[_0x6617('0x76')][_0x20704f][_0x6617('0x7b')]));}}}if(_0x5d3bd3[_0x6617('0x7d')]){_0x5d3bd3[_0x6617('0x7d')]=JSON['parse'](_0x5d3bd3['conditions']);_0x37bda8[_0x6617('0x37')](_0x4cb5e4(_0x5d3bd3['conditions'][_0x6617('0x63')]));}_0x5311f5=_0x37bda8[_0x6617('0x7e')]();_0x37bda8[_0x6617('0x33')](_0x2d8c50);_0x37bda8[_0x6617('0x1a')](0x0);logger[_0x6617('0x7f')](_0x6617('0x80'),_0x37bda8[_0x6617('0x81')]());return db[_0x6617('0x82')]['query'](_0x37bda8[_0x6617('0x81')](),{'type':db[_0x6617('0x82')]['QueryTypes'][_0x6617('0x83')]});}})['then'](respondWithResult(_0x274474,null))[_0x6617('0x40')](handleError(_0x274474,null));};function runReport(_0x1b61bf,_0x560282,_0x223014){var _0x267da1=_0x560282[_0x6617('0x27')];var _0x4d5bdd=0xa;var _0x4ad960=[_0x6617('0x4e'),'left_join',_0x6617('0x50'),_0x6617('0x51')];var _0x226697={'SUM':'SUM(%s)','COUNT':_0x6617('0x53'),'COUNT DISTINCT':_0x6617('0x54'),'MAX':_0x6617('0x55'),'MIN':_0x6617('0x56'),'AVG':_0x6617('0x57'),'GROUP_CONCAT':_0x6617('0x58'),'GROUP_CONCAT ASC':_0x6617('0x59'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x35835c={'SEC_TO_TIME':_0x6617('0x5a'),'DATE':'DATE(%s)','HOUR':_0x6617('0x5c'),'ROUND':_0x6617('0x5d'),'UNIX_TIMESTAMP':_0x6617('0x84')};var _0x2e080c=function(_0xd08eed){return!_[_0x6617('0x85')]([_0x6617('0x5e'),_0x6617('0x86'),_0x6617('0x5f'),_0x6617('0x60')],_0xd08eed);};var _0x5a2cee=function(_0x2bce46){if(!_0x2bce46||!_0x2bce46[_0x6617('0x61')][_0x6617('0x30')]){return'';}for(var _0xec0401='(',_0x30e3ba=0x0;_0x30e3ba<_0x2bce46[_0x6617('0x61')][_0x6617('0x30')];_0x30e3ba+=0x1){_0x30e3ba>0x0&&(_0xec0401+='\x20'+_0x2bce46[_0x6617('0x62')]+'\x20');_0xec0401+=_0x2bce46['rules'][_0x30e3ba][_0x6617('0x63')]?_0x5a2cee(_0x2bce46[_0x6617('0x61')][_0x30e3ba]['group']):_0x2bce46[_0x6617('0x61')][_0x30e3ba][_0x6617('0x64')]+'\x20'+_0x2bce46[_0x6617('0x61')][_0x30e3ba][_0x6617('0x65')]+(_0x2e080c(_0x2bce46['rules'][_0x30e3ba]['condition'])?'\x20'+_0x2bce46['rules'][_0x30e3ba]['value']:'');}return _0xec0401+')';};var _0x2d72e6={'where':{'id':_0x1b61bf['id']}},_0x59507c,_0x1a0ee8,_0x2c0011,_0x295d7d,_0x429aaf;_0x2d72e6=_[_0x6617('0x36')]({},_0x2d72e6,_0x223014);return db[_0x6617('0x29')][_0x6617('0x42')](_0x2d72e6)[_0x6617('0x21')](function(_0xdd7427){if(_0xdd7427){_0x59507c=_0xdd7427;return _0xdd7427['getFields']();}return null;})[_0x6617('0x21')](function(_0x52ed45){if(_0x52ed45){if(!_0x52ed45[_0x6617('0x30')]){throw new db[(_0x6617('0x68'))]['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x1a0ee8=_0x52ed45;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0x6617('0x21')](function(_0xf573d5){if(_0xf573d5){_0x2c0011=_[_0x6617('0x87')](_0xf573d5,'id');var _0x178d77;var _0x35e266=squel[_0x6617('0x6b')]();_0x35e266['from'](_0x59507c['table']);for(var _0x531194=0x0;_0x531194<_0x1a0ee8['length'];_0x531194+=0x1){_0x178d77=_0x1a0ee8[_0x531194][_0x6617('0x6e')]?_0x2c0011[_0x1a0ee8[_0x531194]['MetricId']][_0x6617('0x6f')]:_0x1a0ee8[_0x531194]['field'];_0x178d77=_0x1a0ee8[_0x531194][_0x6617('0x88')]?_['replace'](_0x226697[_0x1a0ee8[_0x531194][_0x6617('0x88')]],'%s',_0x178d77):_0x178d77;_0x178d77=_0x1a0ee8[_0x531194]['format']?_['replace'](_0x35835c[_0x1a0ee8[_0x531194][_0x6617('0x71')]],'%s',_0x178d77):_0x178d77;if(_0x1a0ee8[_0x531194][_0x6617('0x72')]){_0x35e266[_0x6617('0x63')](_0x178d77);}_0x1a0ee8[_0x531194]['orderBy']&&_0x35e266[_0x6617('0x34')](_0x178d77,_0x1a0ee8[_0x531194][_0x6617('0x73')]==='DESC'?![]:!![]);_0x35e266['field'](_0x178d77,_0x1a0ee8[_0x531194]['alias']||_0x178d77);}if(_0x59507c[_0x6617('0x76')]){_0x59507c['joins']=JSON[_0x6617('0x77')](_0x59507c[_0x6617('0x76')]);for(var _0x51f4f5=0x0;_0x51f4f5<_0x59507c['joins'][_0x6617('0x30')];_0x51f4f5+=0x1){if(_0x59507c[_0x6617('0x76')][_0x51f4f5][_0x6617('0x78')]&&_[_0x6617('0x85')](_0x4ad960,_0x59507c[_0x6617('0x76')][_0x51f4f5]['type'])&&_0x59507c[_0x6617('0x76')][_0x51f4f5]['parentKey']&&_0x59507c[_0x6617('0x76')][_0x51f4f5]['foreignTable']&&_0x59507c[_0x6617('0x76')][_0x51f4f5]['foreignKey']){_0x35e266[_0x59507c[_0x6617('0x76')][_0x51f4f5]['type']](_0x59507c['joins'][_0x51f4f5][_0x6617('0x7a')],null,util['format'](_0x6617('0x7c'),_0x59507c[_0x6617('0x6d')],_0x59507c['joins'][_0x51f4f5][_0x6617('0x79')],_0x59507c[_0x6617('0x76')][_0x51f4f5][_0x6617('0x7a')],_0x59507c[_0x6617('0x76')][_0x51f4f5][_0x6617('0x7b')]));}}}if(_0x59507c[_0x6617('0x7d')]){_0x59507c[_0x6617('0x7d')]=JSON[_0x6617('0x77')](_0x59507c[_0x6617('0x7d')]);_0x35e266[_0x6617('0x37')](_0x5a2cee(_0x59507c[_0x6617('0x7d')][_0x6617('0x63')]));}_0x429aaf=_0x35e266[_0x6617('0x7e')]();_0x35e266[_0x6617('0x33')](_0x4d5bdd);_0x35e266[_0x6617('0x1a')](0x0);logger[_0x6617('0x7f')](_0x6617('0x80'),_0x35e266[_0x6617('0x81')]());return db[_0x6617('0x82')][_0x6617('0x2d')](_0x35e266['toString'](),{'type':db[_0x6617('0x82')]['QueryTypes']['SELECT']});}})['then'](function(_0xd5a1f1){if(!_0xd5a1f1[_0x6617('0x30')]){throw new db[(_0x6617('0x68'))]['ValidationErrorItem'](_0x6617('0x89'),0xcc);}if(_0x560282[_0x6617('0x8a')]===_0x6617('0x8b')){return null;}var _0x264b52=_[_0x6617('0x36')](_0x560282,{'name':_0x560282['fullPath']||_0x560282['name']||_0x59507c[_0x6617('0x27')],'basename':_0x267da1,'savename':util[_0x6617('0x71')](_0x6617('0x8c'),_0x560282[_0x6617('0x27')]||_0x59507c['name'],require(_0x6617('0x8d'))['generate'](0x4),_0x560282[_0x6617('0x8a')]||_0x6617('0x8e')),'reportId':_0x59507c['id'],'reportType':_0x6617('0x8f')});return db[_0x6617('0x90')][_0x6617('0x43')](_0x264b52,{'raw':!![]});})[_0x6617('0x21')](function(_0x60777a){if(_0x59507c[_0x6617('0x6d')]==='cdr'){_0x429aaf['where'](_0x59507c[_0x6617('0x6d')]+_0x6617('0x91'),_0x560282['startDate'],_0x560282[_0x6617('0x92')]);}else{_0x429aaf[_0x6617('0x37')](_0x59507c[_0x6617('0x6d')]+_0x6617('0x93'),_0x560282[_0x6617('0x94')],_0x560282['endDate']);}if(_0x60777a){logger[_0x6617('0x95')]('Run\x20Query:',_0x429aaf['toString']());require(_0x6617('0x96'))[_0x6617('0x97')](path['join'](__dirname,_0x6617('0x98'),_0x60777a[_0x6617('0x8a')]),[_0x60777a['id'],_0x429aaf[_0x6617('0x81')](),path[_0x6617('0x4e')](__dirname,'../../files/reports',_0x60777a[_0x6617('0x99')]),_0x267da1]);return _0x60777a;}else{var _0xd667a3=squel[_0x6617('0x6b')]();_0xd667a3[_0x6617('0x6c')]('('+_0x429aaf[_0x6617('0x81')]()+')',_0x6617('0x9a'));_0xd667a3['field'](_0x6617('0x9b'),'count');_0x429aaf[_0x6617('0x33')](_0x560282[_0x6617('0x33')]||_0x4d5bdd);_0x429aaf['offset'](_0x560282[_0x6617('0x1a')]||0x0);return db[_0x6617('0x82')][_0x6617('0x2d')](_0xd667a3[_0x6617('0x81')](),{'type':db[_0x6617('0x82')]['QueryTypes'][_0x6617('0x83')]})[_0x6617('0x21')](function(_0x4ce164){if(!_0x4ce164[_0x6617('0x30')]){_0x295d7d=0x0;}else{_0x295d7d=_0x4ce164[0x0][_0x6617('0x19')]||0x0;}return db[_0x6617('0x82')][_0x6617('0x2d')](_0x429aaf[_0x6617('0x81')](),{'type':db[_0x6617('0x82')][_0x6617('0x9c')]['SELECT']});})[_0x6617('0x21')](function(_0x38857d){return{'rows':_0x38857d||[],'count':_0x295d7d};});}});}exports[_0x6617('0x9d')]=function(_0x343e0b,_0x3ace0c){return runReport(_0x343e0b[_0x6617('0x4c')],_0x343e0b['query'],_0x343e0b['options'])[_0x6617('0x21')](respondWithResult(_0x3ace0c,null))[_0x6617('0x40')](handleError(_0x3ace0c,null));};exports['runReport']=runReport;exports[_0x6617('0x2d')]=function(_0x1b6d1d,_0x134a7f){var _0x577527=0xa;var _0x427c1=[_0x6617('0x4e'),_0x6617('0x4f'),'right_join','cross_join'];var _0x44c50c={'SUM':_0x6617('0x52'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x6617('0x54'),'MAX':_0x6617('0x55'),'MIN':_0x6617('0x56'),'AVG':_0x6617('0x57'),'GROUP_CONCAT':_0x6617('0x58'),'GROUP_CONCAT ASC':_0x6617('0x59'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x5ef979={'SEC_TO_TIME':_0x6617('0x5a'),'DATE':_0x6617('0x5b'),'HOUR':_0x6617('0x5c'),'ROUND':_0x6617('0x5d'),'UNIX_TIMESTAMP':_0x6617('0x84')};var _0x4bca87=function(_0x5e2316){return!_[_0x6617('0x85')]([_0x6617('0x5e'),'IS\x20NOT\x20NULL',_0x6617('0x5f'),_0x6617('0x60')],_0x5e2316);};var _0x12ef5b=function(_0x3f0c2e){if(!_0x3f0c2e||!_0x3f0c2e[_0x6617('0x61')][_0x6617('0x30')]){return'';}for(var _0x51070a='(',_0x31a739=0x0;_0x31a739<_0x3f0c2e[_0x6617('0x61')][_0x6617('0x30')];_0x31a739+=0x1){_0x31a739>0x0&&(_0x51070a+='\x20'+_0x3f0c2e['operator']+'\x20');_0x51070a+=_0x3f0c2e['rules'][_0x31a739][_0x6617('0x63')]?_0x12ef5b(_0x3f0c2e['rules'][_0x31a739][_0x6617('0x63')]):_0x3f0c2e[_0x6617('0x61')][_0x31a739]['field']+'\x20'+_0x3f0c2e[_0x6617('0x61')][_0x31a739][_0x6617('0x65')]+(_0x4bca87(_0x3f0c2e[_0x6617('0x61')][_0x31a739]['condition'])?'\x20'+_0x3f0c2e[_0x6617('0x61')][_0x31a739][_0x6617('0x66')]:'');}return _0x51070a+')';};var _0x3882a1={'where':{'id':_0x1b6d1d[_0x6617('0x4c')]['id']}},_0x109c6c,_0x228f46,_0x43a034,_0x3841aa,_0x3999f2;_0x3882a1=_[_0x6617('0x36')]({},_0x3882a1,_0x1b6d1d[_0x6617('0x3b')]);return db[_0x6617('0x29')][_0x6617('0x42')](_0x3882a1)[_0x6617('0x21')](function(_0x175136){if(_0x175136){_0x109c6c=_0x175136;return _0x175136[_0x6617('0x67')]();}return null;})[_0x6617('0x21')](function(_0x4b1f4f){if(_0x4b1f4f){if(!_0x4b1f4f['length']){throw new db[(_0x6617('0x68'))][(_0x6617('0x9e'))](_0x6617('0x69'),0x193);}_0x228f46=_0x4b1f4f;return db[_0x6617('0x6a')][_0x6617('0x3e')]({'raw':!![]});}return null;})['then'](function(_0x2a2eaf){if(_0x2a2eaf){_0x43a034=_[_0x6617('0x87')](_0x2a2eaf,'id');var _0x222d09;var _0x4bf720=squel[_0x6617('0x6b')]();_0x4bf720['from'](_0x109c6c[_0x6617('0x6d')]);for(var _0x2a45bf=0x0;_0x2a45bf<_0x228f46[_0x6617('0x30')];_0x2a45bf+=0x1){_0x222d09=_0x228f46[_0x2a45bf][_0x6617('0x6e')]?_0x43a034[_0x228f46[_0x2a45bf][_0x6617('0x6e')]][_0x6617('0x6f')]:_0x228f46[_0x2a45bf][_0x6617('0x64')];_0x222d09=_0x228f46[_0x2a45bf][_0x6617('0x88')]?_[_0x6617('0x70')](_0x44c50c[_0x228f46[_0x2a45bf][_0x6617('0x88')]],'%s',_0x222d09):_0x222d09;_0x222d09=_0x228f46[_0x2a45bf][_0x6617('0x71')]?_[_0x6617('0x70')](_0x5ef979[_0x228f46[_0x2a45bf][_0x6617('0x71')]],'%s',_0x222d09):_0x222d09;if(_0x228f46[_0x2a45bf][_0x6617('0x72')]){_0x4bf720[_0x6617('0x63')](_0x222d09);}_0x228f46[_0x2a45bf][_0x6617('0x73')]&&_0x4bf720[_0x6617('0x34')](_0x222d09,_0x228f46[_0x2a45bf]['orderBy']===_0x6617('0x74')?![]:!![]);_0x4bf720[_0x6617('0x64')](_0x222d09,_0x228f46[_0x2a45bf][_0x6617('0x75')]||_0x222d09);}if(_0x109c6c[_0x6617('0x76')]){_0x109c6c[_0x6617('0x76')]=JSON[_0x6617('0x77')](_0x109c6c[_0x6617('0x76')]);for(var _0x2e0fa0=0x0;_0x2e0fa0<_0x109c6c[_0x6617('0x76')][_0x6617('0x30')];_0x2e0fa0+=0x1){if(_0x109c6c[_0x6617('0x76')][_0x2e0fa0][_0x6617('0x78')]&&_[_0x6617('0x85')](_0x427c1,_0x109c6c[_0x6617('0x76')][_0x2e0fa0]['type'])&&_0x109c6c[_0x6617('0x76')][_0x2e0fa0][_0x6617('0x79')]&&_0x109c6c[_0x6617('0x76')][_0x2e0fa0]['foreignTable']&&_0x109c6c[_0x6617('0x76')][_0x2e0fa0]['foreignKey']){_0x4bf720[_0x109c6c['joins'][_0x2e0fa0][_0x6617('0x78')]](_0x109c6c[_0x6617('0x76')][_0x2e0fa0]['foreignTable'],null,util['format']('%s.%s\x20=\x20%s.%s',_0x109c6c[_0x6617('0x6d')],_0x109c6c['joins'][_0x2e0fa0][_0x6617('0x79')],_0x109c6c[_0x6617('0x76')][_0x2e0fa0][_0x6617('0x7a')],_0x109c6c[_0x6617('0x76')][_0x2e0fa0][_0x6617('0x7b')]));}}}if(_0x109c6c['conditions']){_0x109c6c[_0x6617('0x7d')]=JSON['parse'](_0x109c6c[_0x6617('0x7d')]);_0x4bf720[_0x6617('0x37')](_0x12ef5b(_0x109c6c[_0x6617('0x7d')][_0x6617('0x63')]));}_0x3999f2=_0x4bf720['clone']();_0x4bf720[_0x6617('0x33')](_0x577527);_0x4bf720[_0x6617('0x1a')](0x0);logger[_0x6617('0x7f')]('Limited\x20Query:',_0x4bf720['toString']());return db[_0x6617('0x82')][_0x6617('0x2d')](_0x4bf720[_0x6617('0x81')](),{'type':db['sequelize'][_0x6617('0x9c')][_0x6617('0x83')]});}})[_0x6617('0x21')](function(){return{'sql':_0x3999f2[_0x6617('0x81')]()};})[_0x6617('0x21')](respondWithResult(_0x134a7f,null))[_0x6617('0x40')](handleError(_0x134a7f,null));};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
index 37cdd1e..a2f513a 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.model.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcf2e=['moment','request-promise','path','rimraf','../../config/environment','./analyticDefaultReport.attributes','exports','define','AnalyticDefaultReport','analytics_default_reports','lodash','util','api'];(function(_0x5909b0,_0x3f3470){var _0x4685cd=function(_0x5ad4cd){while(--_0x5ad4cd){_0x5909b0['push'](_0x5909b0['shift']());}};_0x4685cd(++_0x3f3470);}(_0xcf2e,0x15c));var _0xecf2=function(_0x564d53,_0x31ac8a){_0x564d53=_0x564d53-0x0;var _0x1ba891=_0xcf2e[_0x564d53];return _0x1ba891;};'use strict';var _=require(_0xecf2('0x0'));var util=require(_0xecf2('0x1'));var logger=require('../../config/logger')(_0xecf2('0x2'));var moment=require(_0xecf2('0x3'));var BPromise=require('bluebird');var rp=require(_0xecf2('0x4'));var fs=require('fs');var path=require(_0xecf2('0x5'));var rimraf=require(_0xecf2('0x6'));var config=require(_0xecf2('0x7'));var attributes=require(_0xecf2('0x8'));module[_0xecf2('0x9')]=function(_0x380d53,_0x3db393){return _0x380d53[_0xecf2('0xa')](_0xecf2('0xb'),attributes,{'tableName':_0xecf2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xea22=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','AnalyticDefaultReport','analytics_default_reports','lodash','util'];(function(_0x2c82ef,_0x3c1f87){var _0x36784f=function(_0x41bd23){while(--_0x41bd23){_0x2c82ef['push'](_0x2c82ef['shift']());}};_0x36784f(++_0x3c1f87);}(_0xea22,0x80));var _0x2ea2=function(_0x357cb8,_0x23750a){_0x357cb8=_0x357cb8-0x0;var _0x5cdb5f=_0xea22[_0x357cb8];return _0x5cdb5f;};'use strict';var _=require(_0x2ea2('0x0'));var util=require(_0x2ea2('0x1'));var logger=require(_0x2ea2('0x2'))(_0x2ea2('0x3'));var moment=require(_0x2ea2('0x4'));var BPromise=require(_0x2ea2('0x5'));var rp=require(_0x2ea2('0x6'));var fs=require('fs');var path=require(_0x2ea2('0x7'));var rimraf=require(_0x2ea2('0x8'));var config=require(_0x2ea2('0x9'));var attributes=require('./analyticDefaultReport.attributes');module['exports']=function(_0xe8d4d8,_0x77bc5e){return _0xe8d4d8[_0x2ea2('0xa')](_0x2ea2('0xb'),attributes,{'tableName':_0x2ea2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
index 2367088..6cb6d1a 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe706=['http','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x2afde1,_0x37d69f){var _0x2a5d00=function(_0x20c647){while(--_0x20c647){_0x2afde1['push'](_0x2afde1['shift']());}};_0x2a5d00(++_0x37d69f);}(_0xe706,0xa3));var _0x6e70=function(_0x4ae625,_0xf396d0){_0x4ae625=_0x4ae625-0x0;var _0x31accf=_0xe706[_0x4ae625];return _0x31accf;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var moment=require(_0x6e70('0x2'));var BPromise=require('bluebird');var rs=require(_0x6e70('0x3'));var fs=require('fs');var Redis=require(_0x6e70('0x4'));var db=require(_0x6e70('0x5'))['db'];var utils=require(_0x6e70('0x6'));var logger=require(_0x6e70('0x7'))(_0x6e70('0x8'));var config=require(_0x6e70('0x9'));var jayson=require(_0x6e70('0xa'));var client=jayson[_0x6e70('0xb')][_0x6e70('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x36357b,_0x293ce7,_0x45a2d4){return new BPromise(function(_0x188ed3,_0x3c4843){return client[_0x6e70('0xd')](_0x36357b,_0x45a2d4)[_0x6e70('0xe')](function(_0x25e61c){logger[_0x6e70('0xf')](_0x6e70('0x10'),_0x293ce7,_0x6e70('0x11'));logger[_0x6e70('0x12')](_0x6e70('0x13'),_0x293ce7,_0x6e70('0x11'),JSON['stringify'](_0x25e61c));if(_0x25e61c['error']){if(_0x25e61c[_0x6e70('0x14')][_0x6e70('0x15')]===0x1f4){logger[_0x6e70('0x14')](_0x6e70('0x10'),_0x293ce7,_0x25e61c[_0x6e70('0x14')][_0x6e70('0x16')]);return _0x3c4843(_0x25e61c[_0x6e70('0x14')][_0x6e70('0x16')]);}logger['error']('AnalyticDefaultReport,\x20%s,\x20%s',_0x293ce7,_0x25e61c['error'][_0x6e70('0x16')]);return _0x188ed3(_0x25e61c['error']['message']);}else{logger[_0x6e70('0xf')](_0x6e70('0x10'),_0x293ce7,'request\x20sent');_0x188ed3(_0x25e61c[_0x6e70('0x17')]['message']);}})[_0x6e70('0x18')](function(_0x161f23){logger['error']('AnalyticDefaultReport,\x20%s,\x20%s',_0x293ce7,_0x161f23);_0x3c4843(_0x161f23);});});}
\ No newline at end of file
+var _0x00bb=['stringify','error','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','request','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s'];(function(_0x51361c,_0x3ac7f6){var _0xafa94b=function(_0x2886ba){while(--_0x2886ba){_0x51361c['push'](_0x51361c['shift']());}};_0xafa94b(++_0x3ac7f6);}(_0x00bb,0x1d8));var _0xb00b=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x00bb[_0x1ac595];return _0x455fff;};'use strict';var _=require(_0xb00b('0x0'));var util=require(_0xb00b('0x1'));var moment=require(_0xb00b('0x2'));var BPromise=require('bluebird');var rs=require(_0xb00b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb00b('0x4'))['db'];var utils=require(_0xb00b('0x5'));var logger=require('../../config/logger')(_0xb00b('0x6'));var config=require(_0xb00b('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x36e363,_0xf737d0,_0x41dfc9){return new BPromise(function(_0x37f07d,_0xfa4181){return client[_0xb00b('0x8')](_0x36e363,_0x41dfc9)['then'](function(_0x51d12b){logger[_0xb00b('0x9')](_0xb00b('0xa'),_0xf737d0,_0xb00b('0xb'));logger[_0xb00b('0xc')](_0xb00b('0xd'),_0xf737d0,'request\x20sent',JSON[_0xb00b('0xe')](_0x51d12b));if(_0x51d12b['error']){if(_0x51d12b['error']['code']===0x1f4){logger[_0xb00b('0xf')](_0xb00b('0xa'),_0xf737d0,_0x51d12b[_0xb00b('0xf')][_0xb00b('0x10')]);return _0xfa4181(_0x51d12b[_0xb00b('0xf')][_0xb00b('0x10')]);}logger['error'](_0xb00b('0xa'),_0xf737d0,_0x51d12b[_0xb00b('0xf')]['message']);return _0x37f07d(_0x51d12b[_0xb00b('0xf')][_0xb00b('0x10')]);}else{logger['info']('AnalyticDefaultReport,\x20%s,\x20%s',_0xf737d0,_0xb00b('0xb'));_0x37f07d(_0x51d12b['result']['message']);}})[_0xb00b('0x11')](function(_0x638443){logger[_0xb00b('0xf')](_0xb00b('0xa'),_0xf737d0,_0x638443);_0xfa4181(_0x638443);});});}
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js
index d706a7c..e1c2a83 100644
--- a/server/api/analyticDefaultReport/index.js
+++ b/server/api/analyticDefaultReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe3e3=['../../components/auth/service','../../components/interaction/service','./analyticDefaultReport.controller','get','isAuthenticated','index','preview','/:id/run','run','/:id/query','query','post','put','update','delete','destroy','exports','multer','path','connect-timeout','Router'];(function(_0x404fae,_0x28dbac){var _0x4e5e36=function(_0x5de282){while(--_0x5de282){_0x404fae['push'](_0x404fae['shift']());}};_0x4e5e36(++_0x28dbac);}(_0xe3e3,0x137));var _0x3e3e=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0xe3e3[_0x2b10c6];return _0x3789d2;};'use strict';var multer=require(_0x3e3e('0x0'));var util=require('util');var path=require(_0x3e3e('0x1'));var timeout=require(_0x3e3e('0x2'));var express=require('express');var router=express[_0x3e3e('0x3')]();var auth=require(_0x3e3e('0x4'));var interaction=require(_0x3e3e('0x5'));var config=require('../../config/environment');var controller=require(_0x3e3e('0x6'));router[_0x3e3e('0x7')]('/',auth[_0x3e3e('0x8')](),controller[_0x3e3e('0x9')]);router[_0x3e3e('0x7')]('/:id',auth[_0x3e3e('0x8')](),controller['show']);router[_0x3e3e('0x7')]('/:id/preview',auth[_0x3e3e('0x8')](),controller[_0x3e3e('0xa')]);router['get'](_0x3e3e('0xb'),auth[_0x3e3e('0x8')](),controller[_0x3e3e('0xc')]);router['get'](_0x3e3e('0xd'),auth[_0x3e3e('0x8')](),controller[_0x3e3e('0xe')]);router[_0x3e3e('0xf')]('/',auth[_0x3e3e('0x8')](),controller['create']);router[_0x3e3e('0x10')]('/:id',auth[_0x3e3e('0x8')](),controller[_0x3e3e('0x11')]);router[_0x3e3e('0x12')]('/:id',auth[_0x3e3e('0x8')](),controller[_0x3e3e('0x13')]);module[_0x3e3e('0x14')]=router;
\ No newline at end of file
+var _0x0468=['query','create','update','delete','destroy','multer','util','path','express','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','index','get','/:id','show','preview','/:id/run','isAuthenticated','run','/:id/query'];(function(_0x2c55bd,_0x28867e){var _0x17ac04=function(_0x991526){while(--_0x991526){_0x2c55bd['push'](_0x2c55bd['shift']());}};_0x17ac04(++_0x28867e);}(_0x0468,0x1be));var _0x8046=function(_0xe06a6e,_0x463b42){_0xe06a6e=_0xe06a6e-0x0;var _0x5a51df=_0x0468[_0xe06a6e];return _0x5a51df;};'use strict';var multer=require(_0x8046('0x0'));var util=require(_0x8046('0x1'));var path=require(_0x8046('0x2'));var timeout=require('connect-timeout');var express=require(_0x8046('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x8046('0x4'));var config=require(_0x8046('0x5'));var controller=require(_0x8046('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x8046('0x7')]);router[_0x8046('0x8')](_0x8046('0x9'),auth['isAuthenticated'](),controller[_0x8046('0xa')]);router[_0x8046('0x8')]('/:id/preview',auth['isAuthenticated'](),controller[_0x8046('0xb')]);router['get'](_0x8046('0xc'),auth[_0x8046('0xd')](),controller[_0x8046('0xe')]);router['get'](_0x8046('0xf'),auth[_0x8046('0xd')](),controller[_0x8046('0x10')]);router['post']('/',auth[_0x8046('0xd')](),controller[_0x8046('0x11')]);router['put'](_0x8046('0x9'),auth[_0x8046('0xd')](),controller[_0x8046('0x12')]);router[_0x8046('0x13')]('/:id',auth[_0x8046('0xd')](),controller[_0x8046('0x14')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
index 722a5e6..b73e62d 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3096=['ENUM','manual','INTEGER','UNSIGNED','sequelize','moment','exports','STRING','csv','xlsx','DATE','Loading'];(function(_0x581cb5,_0x285ba6){var _0x320b83=function(_0x533db8){while(--_0x533db8){_0x581cb5['push'](_0x581cb5['shift']());}};_0x320b83(++_0x285ba6);}(_0x3096,0x190));var _0x6309=function(_0x3ce6e0,_0x1caae1){_0x3ce6e0=_0x3ce6e0-0x0;var _0x11060c=_0x3096[_0x3ce6e0];return _0x11060c;};'use strict';var Sequelize=require(_0x6309('0x0'));var moment=require(_0x6309('0x1'));module[_0x6309('0x2')]={'name':{'type':Sequelize[_0x6309('0x3')],'allowNull':![]},'basename':{'type':Sequelize[_0x6309('0x3')],'allowNull':![]},'output':{'type':Sequelize['ENUM'](_0x6309('0x4'),'pdf',_0x6309('0x5')),'allowNull':![],'defaultValue':_0x6309('0x4')},'savename':{'type':Sequelize[_0x6309('0x3')],'allowNull':![]},'startDate':{'type':Sequelize[_0x6309('0x6')]},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize[_0x6309('0x3')],'defaultValue':_0x6309('0x7')},'type':{'type':Sequelize[_0x6309('0x8')]('manual','scheduled'),'allowNull':![],'defaultValue':_0x6309('0x9')},'reportId':{'type':Sequelize[_0x6309('0xa')](0xb)[_0x6309('0xb')]},'reportType':{'type':Sequelize[_0x6309('0x3')]}};
\ No newline at end of file
+var _0x3044=['Loading','scheduled','INTEGER','STRING','ENUM','csv','xlsx','DATE'];(function(_0x558ef8,_0x20108d){var _0x16526e=function(_0xe6e89e){while(--_0xe6e89e){_0x558ef8['push'](_0x558ef8['shift']());}};_0x16526e(++_0x20108d);}(_0x3044,0xdb));var _0x4304=function(_0x2aecb2,_0x343312){_0x2aecb2=_0x2aecb2-0x0;var _0x3ebb80=_0x3044[_0x2aecb2];return _0x3ebb80;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module['exports']={'name':{'type':Sequelize[_0x4304('0x0')],'allowNull':![]},'basename':{'type':Sequelize[_0x4304('0x0')],'allowNull':![]},'output':{'type':Sequelize[_0x4304('0x1')](_0x4304('0x2'),'pdf',_0x4304('0x3')),'allowNull':![],'defaultValue':_0x4304('0x2')},'savename':{'type':Sequelize[_0x4304('0x0')],'allowNull':![]},'startDate':{'type':Sequelize[_0x4304('0x4')]},'endDate':{'type':Sequelize[_0x4304('0x4')]},'status':{'type':Sequelize[_0x4304('0x0')],'defaultValue':_0x4304('0x5')},'type':{'type':Sequelize[_0x4304('0x1')]('manual',_0x4304('0x6')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0x4304('0x7')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0x4304('0x0')]}};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
index 35b6859..0ed992f 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd732=['error','stack','name','send','AnalyticExtractedReport','rawAttributes','query','keys','model','attributes','intersection','fields','length','nolimit','offset','order','where','filters','pick','merge','type','key','field','filter','count','includeAll','include','findAll','catch','show','params','options','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','download','basename','savename','output','join','root','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','format','%s.%s','toLowerCase','html-pdf','rimraf','request-promise','moment','util','sox','to-csv','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','limit','set','json','apply','save','update','then','destroy','ExtractedReports','UserProfileResource'];(function(_0x233895,_0x17c107){var _0x128b68=function(_0x46a86c){while(--_0x46a86c){_0x233895['push'](_0x233895['shift']());}};_0x128b68(++_0x17c107);}(_0xd732,0x18e));var _0x2d73=function(_0x3b905b,_0xb1235e){_0x3b905b=_0x3b905b-0x0;var _0x237baf=_0xd732[_0x3b905b];return _0x237baf;};'use strict';var pdf=require(_0x2d73('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x2d73('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x2d73('0x2'));var moment=require(_0x2d73('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x2d73('0x4'));var path=require('path');var sox=require(_0x2d73('0x5'));var csv=require(_0x2d73('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x2d73('0x7'));var crypto=require('crypto');var jsforce=require(_0x2d73('0x8'));var deskjs=require(_0x2d73('0x9'));var toCsv=require(_0x2d73('0x6'));var querystring=require(_0x2d73('0xa'));var Papa=require('papaparse');var Redis=require(_0x2d73('0xb'));var authService=require(_0x2d73('0xc'));var qs=require(_0x2d73('0xd'));var hardwareService=require(_0x2d73('0xe'));var logger=require('../../config/logger')(_0x2d73('0xf'));var utils=require(_0x2d73('0x10'));var config=require(_0x2d73('0x11'));var db=require(_0x2d73('0x12'))['db'];function respondWithStatusCode(_0x257f26,_0x45008a){_0x45008a=_0x45008a||0xcc;return function(_0x176782){if(_0x176782){return _0x257f26[_0x2d73('0x13')](_0x45008a);}return _0x257f26[_0x2d73('0x14')](_0x45008a)[_0x2d73('0x15')]();};}function respondWithResult(_0x28b174,_0x293183){_0x293183=_0x293183||0xc8;return function(_0x4b3525){if(_0x4b3525){return _0x28b174[_0x2d73('0x14')](_0x293183)['json'](_0x4b3525);}};}function respondWithFilteredResult(_0x399e01,_0x5678e2){return function(_0x1e9bc3){if(_0x1e9bc3){var _0xe0be82=_0x1e9bc3['count'],_0x54e386=_0x5678e2['offset'],_0x238897=_0x5678e2['offset']+_0x5678e2[_0x2d73('0x16')],_0x1cb370;if(_0x238897>=_0xe0be82){_0x238897=_0xe0be82;_0x1cb370=0xc8;}else{_0x1cb370=0xce;}_0x399e01[_0x2d73('0x14')](_0x1cb370);return _0x399e01[_0x2d73('0x17')]('Content-Range',_0x54e386+'-'+_0x238897+'/'+_0xe0be82)[_0x2d73('0x18')](_0x1e9bc3);}return null;};}function patchUpdates(_0xd7e922){return function(_0x37ba35){try{jsonpatch[_0x2d73('0x19')](_0x37ba35,_0xd7e922,!![]);}catch(_0x5934e2){return BPromise['reject'](_0x5934e2);}return _0x37ba35[_0x2d73('0x1a')]();};}function saveUpdates(_0x24066c,_0x1ae947){return function(_0x350d7d){if(_0x350d7d){return _0x350d7d[_0x2d73('0x1b')](_0x24066c)[_0x2d73('0x1c')](function(_0x1e7144){return _0x1e7144;});}return null;};}function removeEntity(_0xa14d31,_0x503b49){return function(_0x408067){if(_0x408067){return _0x408067[_0x2d73('0x1d')]()[_0x2d73('0x1c')](function(){var _0x202fb3=_0x408067['get']({'plain':!![]});var _0x186b9a=_0x2d73('0x1e');return db[_0x2d73('0x1f')][_0x2d73('0x1d')]({'where':{'type':_0x186b9a,'resourceId':_0x202fb3['id']}})[_0x2d73('0x1c')](function(){return _0x408067;});})[_0x2d73('0x1c')](function(){_0xa14d31[_0x2d73('0x14')](0xcc)[_0x2d73('0x15')]();});}};}function handleEntityNotFound(_0x350848,_0x2f682b){return function(_0x361e5e){if(!_0x361e5e){_0x350848[_0x2d73('0x13')](0x194);}return _0x361e5e;};}function handleError(_0x2c97f2,_0x11d2f3){_0x11d2f3=_0x11d2f3||0x1f4;return function(_0x24aecc){logger[_0x2d73('0x20')](_0x24aecc[_0x2d73('0x21')]);if(_0x24aecc['name']){delete _0x24aecc[_0x2d73('0x22')];}_0x2c97f2[_0x2d73('0x14')](_0x11d2f3)[_0x2d73('0x23')](_0x24aecc);};}exports['index']=function(_0x59075b,_0x1458b7){var _0x133c2a={},_0x494a49={},_0x5aa9ea={'count':0x0,'rows':[]};var _0x1beaef=db[_0x2d73('0x24')][_0x2d73('0x25')];_0x494a49['model']=_['keys'](_0x1beaef);_0x494a49[_0x2d73('0x26')]=_[_0x2d73('0x27')](_0x59075b[_0x2d73('0x26')]);_0x494a49['filters']=_['intersection'](_0x494a49[_0x2d73('0x28')],_0x494a49['query']);_0x133c2a[_0x2d73('0x29')]=_[_0x2d73('0x2a')](_0x494a49[_0x2d73('0x28')],qs[_0x2d73('0x2b')](_0x59075b[_0x2d73('0x26')][_0x2d73('0x2b')]));_0x133c2a[_0x2d73('0x29')]=_0x133c2a[_0x2d73('0x29')][_0x2d73('0x2c')]?_0x133c2a[_0x2d73('0x29')]:_0x494a49['model'];if(!_0x59075b[_0x2d73('0x26')]['hasOwnProperty'](_0x2d73('0x2d'))){_0x133c2a['limit']=qs[_0x2d73('0x16')](_0x59075b[_0x2d73('0x26')][_0x2d73('0x16')]);_0x133c2a[_0x2d73('0x2e')]=qs[_0x2d73('0x2e')](_0x59075b[_0x2d73('0x26')][_0x2d73('0x2e')]);}_0x133c2a[_0x2d73('0x2f')]=qs['sort'](_0x59075b[_0x2d73('0x26')]['sort']);_0x133c2a[_0x2d73('0x30')]=qs[_0x2d73('0x31')](_[_0x2d73('0x32')](_0x59075b[_0x2d73('0x26')],_0x494a49[_0x2d73('0x31')]));if(_0x59075b[_0x2d73('0x26')]['filter']){_0x133c2a['where']=_[_0x2d73('0x33')](_0x133c2a[_0x2d73('0x30')],{'$or':_['map'](_0x1beaef,function(_0x1b7666){if(_0x1b7666[_0x2d73('0x34')][_0x2d73('0x35')]!=='VIRTUAL'){var _0x551fc7={};_0x551fc7[_0x1b7666[_0x2d73('0x36')]]={'$like':'%'+_0x59075b['query'][_0x2d73('0x37')]+'%'};return _0x551fc7;}})});}_0x133c2a=_[_0x2d73('0x33')]({},_0x133c2a,_0x59075b['options']);var _0x3a6ed1={'where':_0x133c2a['where']};return db[_0x2d73('0x24')][_0x2d73('0x38')](_0x3a6ed1)[_0x2d73('0x1c')](function(_0x40edb7){_0x5aa9ea[_0x2d73('0x38')]=_0x40edb7;if(_0x59075b[_0x2d73('0x26')][_0x2d73('0x39')]){_0x133c2a[_0x2d73('0x3a')]=[{'all':!![]}];}return db[_0x2d73('0x24')][_0x2d73('0x3b')](_0x133c2a);})['then'](function(_0x5cf801){_0x5aa9ea['rows']=_0x5cf801;return _0x5aa9ea;})[_0x2d73('0x1c')](respondWithFilteredResult(_0x1458b7,_0x133c2a))[_0x2d73('0x3c')](handleError(_0x1458b7,null));};exports[_0x2d73('0x3d')]=function(_0x547b4d,_0x12f47f){var _0x193e3a={'raw':!![],'where':{'id':_0x547b4d[_0x2d73('0x3e')]['id']}},_0x11ad78={};_0x11ad78[_0x2d73('0x28')]=_['keys'](db[_0x2d73('0x24')][_0x2d73('0x25')]);_0x11ad78[_0x2d73('0x26')]=_[_0x2d73('0x27')](_0x547b4d['query']);_0x11ad78['filters']=_[_0x2d73('0x2a')](_0x11ad78[_0x2d73('0x28')],_0x11ad78[_0x2d73('0x26')]);_0x193e3a[_0x2d73('0x29')]=_['intersection'](_0x11ad78[_0x2d73('0x28')],qs[_0x2d73('0x2b')](_0x547b4d[_0x2d73('0x26')][_0x2d73('0x2b')]));_0x193e3a['attributes']=_0x193e3a[_0x2d73('0x29')][_0x2d73('0x2c')]?_0x193e3a[_0x2d73('0x29')]:_0x11ad78[_0x2d73('0x28')];if(_0x547b4d['query']['includeAll']){_0x193e3a[_0x2d73('0x3a')]=[{'all':!![]}];}_0x193e3a=_[_0x2d73('0x33')]({},_0x193e3a,_0x547b4d[_0x2d73('0x3f')]);return db[_0x2d73('0x24')]['find'](_0x193e3a)[_0x2d73('0x1c')](handleEntityNotFound(_0x12f47f,null))[_0x2d73('0x1c')](respondWithResult(_0x12f47f,null))[_0x2d73('0x3c')](handleError(_0x12f47f,null));};exports['create']=function(_0x2648d7,_0x3a4c85){return db['AnalyticExtractedReport'][_0x2d73('0x40')](_0x2648d7[_0x2d73('0x41')],{})[_0x2d73('0x1c')](function(_0x35d9eb){var _0x503315=_0x2648d7[_0x2d73('0x42')][_0x2d73('0x43')]({'plain':!![]});if(!_0x503315)throw new Error(_0x2d73('0x44'));if(_0x503315[_0x2d73('0x45')]===_0x2d73('0x42')){var _0x5308f0=_0x35d9eb[_0x2d73('0x43')]({'plain':!![]});var _0x47e346='ExtractedReports';return db[_0x2d73('0x46')][_0x2d73('0x47')]({'where':{'name':_0x47e346,'userProfileId':_0x503315[_0x2d73('0x48')]},'raw':!![]})['then'](function(_0x2b6554){if(_0x2b6554&&_0x2b6554['autoAssociation']===0x0){return db['UserProfileResource'][_0x2d73('0x40')]({'name':_0x5308f0[_0x2d73('0x22')],'resourceId':_0x5308f0['id'],'type':_0x2b6554[_0x2d73('0x22')],'sectionId':_0x2b6554['id']},{})[_0x2d73('0x1c')](function(){return _0x35d9eb;});}else{return _0x35d9eb;}})['catch'](function(_0xdfb674){logger[_0x2d73('0x20')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xdfb674);throw _0xdfb674;});}return _0x35d9eb;})[_0x2d73('0x1c')](respondWithResult(_0x3a4c85,0xc9))['catch'](handleError(_0x3a4c85,null));};exports[_0x2d73('0x1b')]=function(_0x31e052,_0x29ce8a){if(_0x31e052[_0x2d73('0x41')]['id']){delete _0x31e052['body']['id'];}return db[_0x2d73('0x24')]['find']({'where':{'id':_0x31e052[_0x2d73('0x3e')]['id']}})['then'](handleEntityNotFound(_0x29ce8a,null))[_0x2d73('0x1c')](saveUpdates(_0x31e052[_0x2d73('0x41')],null))[_0x2d73('0x1c')](respondWithResult(_0x29ce8a,null))['catch'](handleError(_0x29ce8a,null));};exports[_0x2d73('0x1d')]=function(_0x2718b9,_0x433c83){return db[_0x2d73('0x24')]['find']({'where':{'id':_0x2718b9[_0x2d73('0x3e')]['id']}})['then'](handleEntityNotFound(_0x433c83,null))[_0x2d73('0x1c')](removeEntity(_0x433c83,null))['catch'](handleError(_0x433c83,null));};exports[_0x2d73('0x49')]=function(_0x4d5908,_0x2fa2ce,_0x37a5b7){return db[_0x2d73('0x24')][_0x2d73('0x47')]({'where':{'id':_0x4d5908[_0x2d73('0x3e')]['id']},'attributes':[_0x2d73('0x22'),_0x2d73('0x4a'),_0x2d73('0x4b'),_0x2d73('0x4c')],'raw':!![]})[_0x2d73('0x1c')](handleEntityNotFound(_0x2fa2ce,null))[_0x2d73('0x1c')](function(_0x235bec){if(_0x235bec){if(!fs['existsSync'](path[_0x2d73('0x4d')](config[_0x2d73('0x4e')],'server/files/reports',_0x235bec[_0x2d73('0x4b')]))){throw new db[(_0x2d73('0x4f'))][(_0x2d73('0x50'))](_0x2d73('0x51'));}if(_0x4d5908[_0x2d73('0x26')][_0x2d73('0x52')]){return _0x2fa2ce[_0x2d73('0x13')](0xc8);}return _0x2fa2ce[_0x2d73('0x49')](path['join'](config[_0x2d73('0x4e')],'server/files/reports',_0x235bec[_0x2d73('0x4b')]),util[_0x2d73('0x53')](_0x2d73('0x54'),_0x235bec['basename']||_0x235bec[_0x2d73('0x22')],_0x235bec[_0x2d73('0x4c')][_0x2d73('0x55')]()));}})['catch'](handleError(_0x2fa2ce,null));};
\ No newline at end of file
+var _0x7d06=['reject','destroy','then','get','ExtractedReports','UserProfileResource','stack','name','send','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','map','key','VIRTUAL','field','options','include','AnalyticExtractedReport','findAll','rows','show','params','rawAttributes','includeAll','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','download','basename','savename','existsSync','join','root','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','server/files/reports','format','%s.%s','output','toLowerCase','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../mysqldb','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply'];(function(_0x4a1e76,_0x32a127){var _0x4d878f=function(_0x6ca78b){while(--_0x6ca78b){_0x4a1e76['push'](_0x4a1e76['shift']());}};_0x4d878f(++_0x32a127);}(_0x7d06,0x158));var _0x67d0=function(_0x3d13c4,_0x20c4af){_0x3d13c4=_0x3d13c4-0x0;var _0x1add88=_0x7d06[_0x3d13c4];return _0x1add88;};'use strict';var pdf=require(_0x67d0('0x0'));var emlformat=require(_0x67d0('0x1'));var rimraf=require(_0x67d0('0x2'));var zipdir=require(_0x67d0('0x3'));var jsonpatch=require(_0x67d0('0x4'));var rp=require('request-promise');var moment=require(_0x67d0('0x5'));var BPromise=require(_0x67d0('0x6'));var Mustache=require(_0x67d0('0x7'));var util=require('util');var path=require(_0x67d0('0x8'));var sox=require('sox');var csv=require(_0x67d0('0x9'));var ejs=require(_0x67d0('0xa'));var fs=require('fs');var _=require(_0x67d0('0xb'));var squel=require(_0x67d0('0xc'));var crypto=require(_0x67d0('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x67d0('0xe'));var toCsv=require('to-csv');var querystring=require(_0x67d0('0xf'));var Papa=require('papaparse');var Redis=require(_0x67d0('0x10'));var authService=require(_0x67d0('0x11'));var qs=require(_0x67d0('0x12'));var hardwareService=require(_0x67d0('0x13'));var logger=require('../../config/logger')(_0x67d0('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x67d0('0x15'))['db'];function respondWithStatusCode(_0x7e333,_0x53f029){_0x53f029=_0x53f029||0xcc;return function(_0x1d1532){if(_0x1d1532){return _0x7e333[_0x67d0('0x16')](_0x53f029);}return _0x7e333['status'](_0x53f029)[_0x67d0('0x17')]();};}function respondWithResult(_0x556202,_0xfae4a7){_0xfae4a7=_0xfae4a7||0xc8;return function(_0x1b4833){if(_0x1b4833){return _0x556202[_0x67d0('0x18')](_0xfae4a7)[_0x67d0('0x19')](_0x1b4833);}};}function respondWithFilteredResult(_0x2263a8,_0x2fc64c){return function(_0x254293){if(_0x254293){var _0x25dd91=_0x254293[_0x67d0('0x1a')],_0x311456=_0x2fc64c[_0x67d0('0x1b')],_0x1f8046=_0x2fc64c['offset']+_0x2fc64c[_0x67d0('0x1c')],_0x579b5e;if(_0x1f8046>=_0x25dd91){_0x1f8046=_0x25dd91;_0x579b5e=0xc8;}else{_0x579b5e=0xce;}_0x2263a8[_0x67d0('0x18')](_0x579b5e);return _0x2263a8[_0x67d0('0x1d')](_0x67d0('0x1e'),_0x311456+'-'+_0x1f8046+'/'+_0x25dd91)[_0x67d0('0x19')](_0x254293);}return null;};}function patchUpdates(_0x562ad6){return function(_0x3b440e){try{jsonpatch[_0x67d0('0x1f')](_0x3b440e,_0x562ad6,!![]);}catch(_0x4886cf){return BPromise[_0x67d0('0x20')](_0x4886cf);}return _0x3b440e['save']();};}function saveUpdates(_0x27cf1e,_0xe74220){return function(_0x248856){if(_0x248856){return _0x248856['update'](_0x27cf1e)['then'](function(_0x3e19ab){return _0x3e19ab;});}return null;};}function removeEntity(_0x14fc33,_0x9f2798){return function(_0x2e0f9a){if(_0x2e0f9a){return _0x2e0f9a[_0x67d0('0x21')]()[_0x67d0('0x22')](function(){var _0x2250e5=_0x2e0f9a[_0x67d0('0x23')]({'plain':!![]});var _0xbf5d9a=_0x67d0('0x24');return db[_0x67d0('0x25')][_0x67d0('0x21')]({'where':{'type':_0xbf5d9a,'resourceId':_0x2250e5['id']}})[_0x67d0('0x22')](function(){return _0x2e0f9a;});})[_0x67d0('0x22')](function(){_0x14fc33[_0x67d0('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x27a9fe,_0x2eaa1b){return function(_0x197133){if(!_0x197133){_0x27a9fe[_0x67d0('0x16')](0x194);}return _0x197133;};}function handleError(_0x3a5ce1,_0x302278){_0x302278=_0x302278||0x1f4;return function(_0x3327be){logger['error'](_0x3327be[_0x67d0('0x26')]);if(_0x3327be['name']){delete _0x3327be[_0x67d0('0x27')];}_0x3a5ce1[_0x67d0('0x18')](_0x302278)[_0x67d0('0x28')](_0x3327be);};}exports['index']=function(_0x33b511,_0x108f41){var _0x3824a6={},_0x1256a8={},_0x4781f0={'count':0x0,'rows':[]};var _0x509d48=db['AnalyticExtractedReport']['rawAttributes'];_0x1256a8['model']=_[_0x67d0('0x29')](_0x509d48);_0x1256a8['query']=_[_0x67d0('0x29')](_0x33b511[_0x67d0('0x2a')]);_0x1256a8[_0x67d0('0x2b')]=_[_0x67d0('0x2c')](_0x1256a8[_0x67d0('0x2d')],_0x1256a8['query']);_0x3824a6[_0x67d0('0x2e')]=_['intersection'](_0x1256a8[_0x67d0('0x2d')],qs['fields'](_0x33b511['query'][_0x67d0('0x2f')]));_0x3824a6[_0x67d0('0x2e')]=_0x3824a6[_0x67d0('0x2e')][_0x67d0('0x30')]?_0x3824a6['attributes']:_0x1256a8[_0x67d0('0x2d')];if(!_0x33b511[_0x67d0('0x2a')][_0x67d0('0x31')](_0x67d0('0x32'))){_0x3824a6[_0x67d0('0x1c')]=qs[_0x67d0('0x1c')](_0x33b511['query']['limit']);_0x3824a6[_0x67d0('0x1b')]=qs[_0x67d0('0x1b')](_0x33b511[_0x67d0('0x2a')]['offset']);}_0x3824a6[_0x67d0('0x33')]=qs[_0x67d0('0x34')](_0x33b511[_0x67d0('0x2a')]['sort']);_0x3824a6['where']=qs['filters'](_[_0x67d0('0x35')](_0x33b511[_0x67d0('0x2a')],_0x1256a8[_0x67d0('0x2b')]));if(_0x33b511[_0x67d0('0x2a')][_0x67d0('0x36')]){_0x3824a6[_0x67d0('0x37')]=_[_0x67d0('0x38')](_0x3824a6[_0x67d0('0x37')],{'$or':_[_0x67d0('0x39')](_0x509d48,function(_0x52a620){if(_0x52a620['type'][_0x67d0('0x3a')]!==_0x67d0('0x3b')){var _0x424991={};_0x424991[_0x52a620[_0x67d0('0x3c')]]={'$like':'%'+_0x33b511[_0x67d0('0x2a')][_0x67d0('0x36')]+'%'};return _0x424991;}})});}_0x3824a6=_[_0x67d0('0x38')]({},_0x3824a6,_0x33b511[_0x67d0('0x3d')]);var _0x4c3a72={'where':_0x3824a6[_0x67d0('0x37')]};return db['AnalyticExtractedReport'][_0x67d0('0x1a')](_0x4c3a72)[_0x67d0('0x22')](function(_0x47a858){_0x4781f0[_0x67d0('0x1a')]=_0x47a858;if(_0x33b511[_0x67d0('0x2a')]['includeAll']){_0x3824a6[_0x67d0('0x3e')]=[{'all':!![]}];}return db[_0x67d0('0x3f')][_0x67d0('0x40')](_0x3824a6);})[_0x67d0('0x22')](function(_0x537e1a){_0x4781f0[_0x67d0('0x41')]=_0x537e1a;return _0x4781f0;})[_0x67d0('0x22')](respondWithFilteredResult(_0x108f41,_0x3824a6))['catch'](handleError(_0x108f41,null));};exports[_0x67d0('0x42')]=function(_0x1e0750,_0x1f7120){var _0x4e7984={'raw':!![],'where':{'id':_0x1e0750[_0x67d0('0x43')]['id']}},_0x2cb997={};_0x2cb997[_0x67d0('0x2d')]=_[_0x67d0('0x29')](db[_0x67d0('0x3f')][_0x67d0('0x44')]);_0x2cb997[_0x67d0('0x2a')]=_['keys'](_0x1e0750[_0x67d0('0x2a')]);_0x2cb997[_0x67d0('0x2b')]=_[_0x67d0('0x2c')](_0x2cb997[_0x67d0('0x2d')],_0x2cb997[_0x67d0('0x2a')]);_0x4e7984[_0x67d0('0x2e')]=_[_0x67d0('0x2c')](_0x2cb997['model'],qs[_0x67d0('0x2f')](_0x1e0750[_0x67d0('0x2a')][_0x67d0('0x2f')]));_0x4e7984['attributes']=_0x4e7984['attributes']['length']?_0x4e7984['attributes']:_0x2cb997[_0x67d0('0x2d')];if(_0x1e0750['query'][_0x67d0('0x45')]){_0x4e7984[_0x67d0('0x3e')]=[{'all':!![]}];}_0x4e7984=_[_0x67d0('0x38')]({},_0x4e7984,_0x1e0750[_0x67d0('0x3d')]);return db[_0x67d0('0x3f')][_0x67d0('0x46')](_0x4e7984)[_0x67d0('0x22')](handleEntityNotFound(_0x1f7120,null))[_0x67d0('0x22')](respondWithResult(_0x1f7120,null))[_0x67d0('0x47')](handleError(_0x1f7120,null));};exports[_0x67d0('0x48')]=function(_0x42a3d3,_0x522874){return db[_0x67d0('0x3f')][_0x67d0('0x48')](_0x42a3d3[_0x67d0('0x49')],{})[_0x67d0('0x22')](function(_0x18f73e){var _0x1aa968=_0x42a3d3[_0x67d0('0x4a')][_0x67d0('0x23')]({'plain':!![]});if(!_0x1aa968)throw new Error(_0x67d0('0x4b'));if(_0x1aa968[_0x67d0('0x4c')]==='user'){var _0x1c5cf5=_0x18f73e[_0x67d0('0x23')]({'plain':!![]});var _0x1a7cd3='ExtractedReports';return db['UserProfileSection'][_0x67d0('0x46')]({'where':{'name':_0x1a7cd3,'userProfileId':_0x1aa968['userProfileId']},'raw':!![]})[_0x67d0('0x22')](function(_0x2035b4){if(_0x2035b4&&_0x2035b4['autoAssociation']===0x0){return db['UserProfileResource'][_0x67d0('0x48')]({'name':_0x1c5cf5[_0x67d0('0x27')],'resourceId':_0x1c5cf5['id'],'type':_0x2035b4['name'],'sectionId':_0x2035b4['id']},{})[_0x67d0('0x22')](function(){return _0x18f73e;});}else{return _0x18f73e;}})[_0x67d0('0x47')](function(_0x39c7d8){logger[_0x67d0('0x4d')](_0x67d0('0x4e'),_0x39c7d8);throw _0x39c7d8;});}return _0x18f73e;})[_0x67d0('0x22')](respondWithResult(_0x522874,0xc9))['catch'](handleError(_0x522874,null));};exports[_0x67d0('0x4f')]=function(_0x1ec393,_0x46fafc){if(_0x1ec393[_0x67d0('0x49')]['id']){delete _0x1ec393[_0x67d0('0x49')]['id'];}return db['AnalyticExtractedReport'][_0x67d0('0x46')]({'where':{'id':_0x1ec393[_0x67d0('0x43')]['id']}})[_0x67d0('0x22')](handleEntityNotFound(_0x46fafc,null))['then'](saveUpdates(_0x1ec393[_0x67d0('0x49')],null))[_0x67d0('0x22')](respondWithResult(_0x46fafc,null))['catch'](handleError(_0x46fafc,null));};exports[_0x67d0('0x21')]=function(_0x5a2d4a,_0x47ad2b){return db[_0x67d0('0x3f')]['find']({'where':{'id':_0x5a2d4a[_0x67d0('0x43')]['id']}})[_0x67d0('0x22')](handleEntityNotFound(_0x47ad2b,null))[_0x67d0('0x22')](removeEntity(_0x47ad2b,null))[_0x67d0('0x47')](handleError(_0x47ad2b,null));};exports[_0x67d0('0x50')]=function(_0x3758a7,_0x2391f7,_0x27f660){return db[_0x67d0('0x3f')][_0x67d0('0x46')]({'where':{'id':_0x3758a7['params']['id']},'attributes':[_0x67d0('0x27'),_0x67d0('0x51'),_0x67d0('0x52'),'output'],'raw':!![]})['then'](handleEntityNotFound(_0x2391f7,null))['then'](function(_0x22da0e){if(_0x22da0e){if(!fs[_0x67d0('0x53')](path[_0x67d0('0x54')](config[_0x67d0('0x55')],'server/files/reports',_0x22da0e['savename']))){throw new db[(_0x67d0('0x56'))][(_0x67d0('0x57'))](_0x67d0('0x58'));}if(_0x3758a7[_0x67d0('0x2a')]['exists']){return _0x2391f7[_0x67d0('0x16')](0xc8);}return _0x2391f7[_0x67d0('0x50')](path['join'](config['root'],_0x67d0('0x59'),_0x22da0e[_0x67d0('0x52')]),util[_0x67d0('0x5a')](_0x67d0('0x5b'),_0x22da0e[_0x67d0('0x51')]||_0x22da0e[_0x67d0('0x27')],_0x22da0e[_0x67d0('0x5c')][_0x67d0('0x5d')]()));}})[_0x67d0('0x47')](handleError(_0x2391f7,null));};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
index 5214b5f..ab90853 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.model.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4b19=['api','moment','request-promise','path','rimraf','./analyticExtractedReport.attributes','exports','define','analytics_extracted_reports','lodash','../../config/logger'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x4b19,0x195));var _0x94b1=function(_0x1ef979,_0x43db38){_0x1ef979=_0x1ef979-0x0;var _0x170275=_0x4b19[_0x1ef979];return _0x170275;};'use strict';var _=require(_0x94b1('0x0'));var util=require('util');var logger=require(_0x94b1('0x1'))(_0x94b1('0x2'));var moment=require(_0x94b1('0x3'));var BPromise=require('bluebird');var rp=require(_0x94b1('0x4'));var fs=require('fs');var path=require(_0x94b1('0x5'));var rimraf=require(_0x94b1('0x6'));var config=require('../../config/environment');var attributes=require(_0x94b1('0x7'));module[_0x94b1('0x8')]=function(_0x52d6c1,_0x24df76){return _0x52d6c1[_0x94b1('0x9')]('AnalyticExtractedReport',attributes,{'tableName':_0x94b1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6334=['rimraf','../../config/environment','./analyticExtractedReport.attributes','exports','AnalyticExtractedReport','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x327bca,_0x39987d){var _0x33a85b=function(_0x32cf55){while(--_0x32cf55){_0x327bca['push'](_0x327bca['shift']());}};_0x33a85b(++_0x39987d);}(_0x6334,0x119));var _0x4633=function(_0x398d85,_0x2465d7){_0x398d85=_0x398d85-0x0;var _0x33c2bb=_0x6334[_0x398d85];return _0x33c2bb;};'use strict';var _=require(_0x4633('0x0'));var util=require(_0x4633('0x1'));var logger=require(_0x4633('0x2'))(_0x4633('0x3'));var moment=require(_0x4633('0x4'));var BPromise=require(_0x4633('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4633('0x6'));var rimraf=require(_0x4633('0x7'));var config=require(_0x4633('0x8'));var attributes=require(_0x4633('0x9'));module[_0x4633('0xa')]=function(_0x6493dc,_0x175e14){return _0x6493dc['define'](_0x4633('0xb'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
index 565687b..893c5a5 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xee4d=['catch','lodash','util','bluebird','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x3905be,_0x28c5d2){var _0x5163f3=function(_0x5ab76d){while(--_0x5ab76d){_0x3905be['push'](_0x3905be['shift']());}};_0x5163f3(++_0x28c5d2);}(_0xee4d,0x177));var _0xdee4=function(_0x5a79e2,_0x319b1a){_0x5a79e2=_0x5a79e2-0x0;var _0x266c45=_0xee4d[_0x5a79e2];return _0x266c45;};'use strict';var _=require(_0xdee4('0x0'));var util=require(_0xdee4('0x1'));var moment=require('moment');var BPromise=require(_0xdee4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdee4('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xdee4('0x4'))('rpc');var config=require(_0xdee4('0x5'));var jayson=require(_0xdee4('0x6'));var client=jayson[_0xdee4('0x7')][_0xdee4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4daaee,_0x2dce97,_0x1997ed){return new BPromise(function(_0x4a3d13,_0x37d0cb){return client[_0xdee4('0x9')](_0x4daaee,_0x1997ed)[_0xdee4('0xa')](function(_0x18c04e){logger[_0xdee4('0xb')](_0xdee4('0xc'),_0x2dce97,_0xdee4('0xd'));logger[_0xdee4('0xe')](_0xdee4('0xf'),_0x2dce97,'request\x20sent',JSON[_0xdee4('0x10')](_0x18c04e));if(_0x18c04e[_0xdee4('0x11')]){if(_0x18c04e['error'][_0xdee4('0x12')]===0x1f4){logger[_0xdee4('0x11')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x2dce97,_0x18c04e[_0xdee4('0x11')][_0xdee4('0x13')]);return _0x37d0cb(_0x18c04e[_0xdee4('0x11')][_0xdee4('0x13')]);}logger[_0xdee4('0x11')](_0xdee4('0xc'),_0x2dce97,_0x18c04e[_0xdee4('0x11')][_0xdee4('0x13')]);return _0x4a3d13(_0x18c04e[_0xdee4('0x11')][_0xdee4('0x13')]);}else{logger[_0xdee4('0xb')](_0xdee4('0xc'),_0x2dce97,_0xdee4('0xd'));_0x4a3d13(_0x18c04e[_0xdee4('0x14')][_0xdee4('0x13')]);}})[_0xdee4('0x15')](function(_0x208da8){logger['error'](_0xdee4('0xc'),_0x2dce97,_0x208da8);_0x37d0cb(_0x208da8);});});}
\ No newline at end of file
+var _0x2312=['../../config/logger','jayson/promise','client','http','info','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code','AnalyticExtractedReport,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x45e98e,_0x169b60){var _0x374dba=function(_0x597612){while(--_0x597612){_0x45e98e['push'](_0x45e98e['shift']());}};_0x374dba(++_0x169b60);}(_0x2312,0xad));var _0x2231=function(_0x585747,_0x2600f7){_0x585747=_0x585747-0x0;var _0x18f5d7=_0x2312[_0x585747];return _0x18f5d7;};'use strict';var _=require(_0x2231('0x0'));var util=require(_0x2231('0x1'));var moment=require(_0x2231('0x2'));var BPromise=require(_0x2231('0x3'));var rs=require(_0x2231('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2231('0x5'))['db'];var utils=require(_0x2231('0x6'));var logger=require(_0x2231('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x2231('0x8'));var client=jayson[_0x2231('0x9')][_0x2231('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4fa991,_0x2f9a06,_0x242a82){return new BPromise(function(_0x55a340,_0xa31f22){return client['request'](_0x4fa991,_0x242a82)['then'](function(_0x26431f){logger[_0x2231('0xb')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x2f9a06,_0x2231('0xc'));logger[_0x2231('0xd')](_0x2231('0xe'),_0x2f9a06,_0x2231('0xc'),JSON['stringify'](_0x26431f));if(_0x26431f[_0x2231('0xf')]){if(_0x26431f['error'][_0x2231('0x10')]===0x1f4){logger[_0x2231('0xf')](_0x2231('0x11'),_0x2f9a06,_0x26431f[_0x2231('0xf')][_0x2231('0x12')]);return _0xa31f22(_0x26431f[_0x2231('0xf')][_0x2231('0x12')]);}logger[_0x2231('0xf')](_0x2231('0x11'),_0x2f9a06,_0x26431f[_0x2231('0xf')][_0x2231('0x12')]);return _0x55a340(_0x26431f[_0x2231('0xf')][_0x2231('0x12')]);}else{logger[_0x2231('0xb')](_0x2231('0x11'),_0x2f9a06,'request\x20sent');_0x55a340(_0x26431f[_0x2231('0x13')][_0x2231('0x12')]);}})['catch'](function(_0x1f1d2e){logger[_0x2231('0xf')](_0x2231('0x11'),_0x2f9a06,_0x1f1d2e);_0xa31f22(_0x1f1d2e);});});}
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js
index b9e4f3e..5eb641e 100644
--- a/server/api/analyticExtractedReport/index.js
+++ b/server/api/analyticExtractedReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1ecb=['put','delete','destroy','exports','multer','util','connect-timeout','express','Router','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','index','/:id','show','/:id/download','post','create'];(function(_0x3196ff,_0x949f3a){var _0x3bffcf=function(_0x1da626){while(--_0x1da626){_0x3196ff['push'](_0x3196ff['shift']());}};_0x3bffcf(++_0x949f3a);}(_0x1ecb,0x193));var _0xb1ec=function(_0x175142,_0x422070){_0x175142=_0x175142-0x0;var _0x507c44=_0x1ecb[_0x175142];return _0x507c44;};'use strict';var multer=require(_0xb1ec('0x0'));var util=require(_0xb1ec('0x1'));var path=require('path');var timeout=require(_0xb1ec('0x2'));var express=require(_0xb1ec('0x3'));var router=express[_0xb1ec('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xb1ec('0x5'));var controller=require(_0xb1ec('0x6'));router[_0xb1ec('0x7')]('/',auth[_0xb1ec('0x8')](),controller[_0xb1ec('0x9')]);router[_0xb1ec('0x7')](_0xb1ec('0xa'),auth[_0xb1ec('0x8')](),controller[_0xb1ec('0xb')]);router[_0xb1ec('0x7')](_0xb1ec('0xc'),auth['isAuthenticated'](),controller['download']);router[_0xb1ec('0xd')]('/',auth['isAuthenticated'](),controller[_0xb1ec('0xe')]);router[_0xb1ec('0xf')](_0xb1ec('0xa'),auth['isAuthenticated'](),controller['update']);router[_0xb1ec('0x10')](_0xb1ec('0xa'),auth['isAuthenticated'](),controller[_0xb1ec('0x11')]);module[_0xb1ec('0x12')]=router;
\ No newline at end of file
+var _0x9bf1=['destroy','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','get','index','isAuthenticated','show','/:id/download','download','post','create','put','/:id','update','delete'];(function(_0x1b2ec2,_0x4dcf78){var _0x8d2782=function(_0x154da4){while(--_0x154da4){_0x1b2ec2['push'](_0x1b2ec2['shift']());}};_0x8d2782(++_0x4dcf78);}(_0x9bf1,0xe8));var _0x19bf=function(_0x3de8a4,_0x289a5c){_0x3de8a4=_0x3de8a4-0x0;var _0x4635cf=_0x9bf1[_0x3de8a4];return _0x4635cf;};'use strict';var multer=require('multer');var util=require(_0x19bf('0x0'));var path=require(_0x19bf('0x1'));var timeout=require(_0x19bf('0x2'));var express=require('express');var router=express[_0x19bf('0x3')]();var auth=require(_0x19bf('0x4'));var interaction=require(_0x19bf('0x5'));var config=require(_0x19bf('0x6'));var controller=require(_0x19bf('0x7'));router[_0x19bf('0x8')]('/',auth['isAuthenticated'](),controller[_0x19bf('0x9')]);router['get']('/:id',auth[_0x19bf('0xa')](),controller[_0x19bf('0xb')]);router[_0x19bf('0x8')](_0x19bf('0xc'),auth['isAuthenticated'](),controller[_0x19bf('0xd')]);router[_0x19bf('0xe')]('/',auth[_0x19bf('0xa')](),controller[_0x19bf('0xf')]);router[_0x19bf('0x10')](_0x19bf('0x11'),auth[_0x19bf('0xa')](),controller[_0x19bf('0x12')]);router[_0x19bf('0x13')](_0x19bf('0x11'),auth[_0x19bf('0xa')](),controller[_0x19bf('0x14')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
index abbfd6a..1ffbf65 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.attributes.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6235=['sequelize','exports','STRING','BOOLEAN'];(function(_0x5d8c3a,_0x52c448){var _0x5fbe1b=function(_0x5a07b4){while(--_0x5a07b4){_0x5d8c3a['push'](_0x5d8c3a['shift']());}};_0x5fbe1b(++_0x52c448);}(_0x6235,0x124));var _0x5623=function(_0x533104,_0x209a6a){_0x533104=_0x533104-0x0;var _0x56222a=_0x6235[_0x533104];return _0x56222a;};'use strict';var Sequelize=require(_0x5623('0x0'));module[_0x5623('0x1')]={'field':{'type':Sequelize['TEXT']},'alias':{'type':Sequelize['STRING']},'function':{'type':Sequelize[_0x5623('0x2')]},'format':{'type':Sequelize[_0x5623('0x2')]},'groupBy':{'type':Sequelize[_0x5623('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize['STRING']},'custom':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x7c2e=['BOOLEAN','STRING'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x7c2e,0x1c5));var _0xe7c2=function(_0x4f09fa,_0x523280){_0x4f09fa=_0x4f09fa-0x0;var _0x292ae8=_0x7c2e[_0x4f09fa];return _0x292ae8;};'use strict';var Sequelize=require('sequelize');module['exports']={'field':{'type':Sequelize['TEXT']},'alias':{'type':Sequelize[_0xe7c2('0x0')]},'function':{'type':Sequelize['STRING']},'format':{'type':Sequelize[_0xe7c2('0x0')]},'groupBy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'orderBy':{'type':Sequelize['STRING']},'custom':{'type':Sequelize[_0xe7c2('0x1')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js
index 2612dab..6f84eae 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.controller.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x213f=['query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','map','type','key','VIRTUAL','field','merge','count','include','rows','catch','show','includeAll','options','find','create','bulkCreate','body','params','bulkDestroy','ids','addFields','AnalyticCustomReport','findOne','sequelize','transaction','CustomReportId','findAll','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','squel','crypto','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','offset','limit','set','Content-Range','json','apply','save','update','then','destroy','end','error','stack','name','send','index','AnalyticFieldReport','rawAttributes','model','keys'];(function(_0x517866,_0x5a051e){var _0x5cc6e7=function(_0x2278ab){while(--_0x2278ab){_0x517866['push'](_0x517866['shift']());}};_0x5cc6e7(++_0x5a051e);}(_0x213f,0x1c7));var _0xf213=function(_0x29e49e,_0x2146ba){_0x29e49e=_0x29e49e-0x0;var _0x22d010=_0x213f[_0x29e49e];return _0x22d010;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xf213('0x0'));var rimraf=require(_0xf213('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf213('0x2'));var rp=require('request-promise');var moment=require(_0xf213('0x3'));var BPromise=require(_0xf213('0x4'));var Mustache=require(_0xf213('0x5'));var util=require(_0xf213('0x6'));var path=require(_0xf213('0x7'));var sox=require(_0xf213('0x8'));var csv=require(_0xf213('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xf213('0xa'));var crypto=require(_0xf213('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xf213('0xc'));var toCsv=require('to-csv');var querystring=require(_0xf213('0xd'));var Papa=require(_0xf213('0xe'));var Redis=require(_0xf213('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0xf213('0x10'));var logger=require('../../config/logger')(_0xf213('0x11'));var utils=require(_0xf213('0x12'));var config=require(_0xf213('0x13'));var db=require(_0xf213('0x14'))['db'];function respondWithStatusCode(_0x9091f1,_0x16781d){_0x16781d=_0x16781d||0xcc;return function(_0x57f96e){if(_0x57f96e){return _0x9091f1[_0xf213('0x15')](_0x16781d);}return _0x9091f1[_0xf213('0x16')](_0x16781d)['end']();};}function respondWithResult(_0x2f2fce,_0x10f5c4){_0x10f5c4=_0x10f5c4||0xc8;return function(_0x596cf1){if(_0x596cf1){return _0x2f2fce[_0xf213('0x16')](_0x10f5c4)['json'](_0x596cf1);}};}function respondWithFilteredResult(_0x22cc58,_0x8c1197){return function(_0xa71500){if(_0xa71500){var _0x2e3d73=_0xa71500['count'],_0x55b39a=_0x8c1197[_0xf213('0x17')],_0x10fcb6=_0x8c1197[_0xf213('0x17')]+_0x8c1197[_0xf213('0x18')],_0x2e5895;if(_0x10fcb6>=_0x2e3d73){_0x10fcb6=_0x2e3d73;_0x2e5895=0xc8;}else{_0x2e5895=0xce;}_0x22cc58[_0xf213('0x16')](_0x2e5895);return _0x22cc58[_0xf213('0x19')](_0xf213('0x1a'),_0x55b39a+'-'+_0x10fcb6+'/'+_0x2e3d73)[_0xf213('0x1b')](_0xa71500);}return null;};}function patchUpdates(_0x268794){return function(_0x280ee6){try{jsonpatch[_0xf213('0x1c')](_0x280ee6,_0x268794,!![]);}catch(_0xbf3f3b){return BPromise['reject'](_0xbf3f3b);}return _0x280ee6[_0xf213('0x1d')]();};}function saveUpdates(_0x8d75cd,_0x65f143){return function(_0x547b04){if(_0x547b04){return _0x547b04[_0xf213('0x1e')](_0x8d75cd)[_0xf213('0x1f')](function(_0x5c5740){return _0x5c5740;});}return null;};}function removeEntity(_0x5bd85e,_0x1e1761){return function(_0x43361c){if(_0x43361c){return _0x43361c[_0xf213('0x20')]()['then'](function(){_0x5bd85e[_0xf213('0x16')](0xcc)[_0xf213('0x21')]();});}};}function handleEntityNotFound(_0x501943,_0xa22d32){return function(_0x2c969c){if(!_0x2c969c){_0x501943[_0xf213('0x15')](0x194);}return _0x2c969c;};}function handleError(_0x21e16e,_0x31c066){_0x31c066=_0x31c066||0x1f4;return function(_0x374828){logger[_0xf213('0x22')](_0x374828[_0xf213('0x23')]);if(_0x374828[_0xf213('0x24')]){delete _0x374828[_0xf213('0x24')];}_0x21e16e[_0xf213('0x16')](_0x31c066)[_0xf213('0x25')](_0x374828);};}exports[_0xf213('0x26')]=function(_0x335379,_0x28cbb3){var _0x7b69a2={},_0x35bfe1={},_0x4b96bc={'count':0x0,'rows':[]};var _0x15f3e6=db[_0xf213('0x27')][_0xf213('0x28')];_0x35bfe1[_0xf213('0x29')]=_[_0xf213('0x2a')](_0x15f3e6);_0x35bfe1[_0xf213('0x2b')]=_['keys'](_0x335379[_0xf213('0x2b')]);_0x35bfe1['filters']=_[_0xf213('0x2c')](_0x35bfe1[_0xf213('0x29')],_0x35bfe1[_0xf213('0x2b')]);_0x7b69a2[_0xf213('0x2d')]=_['intersection'](_0x35bfe1[_0xf213('0x29')],qs['fields'](_0x335379['query'][_0xf213('0x2e')]));_0x7b69a2[_0xf213('0x2d')]=_0x7b69a2[_0xf213('0x2d')][_0xf213('0x2f')]?_0x7b69a2['attributes']:_0x35bfe1[_0xf213('0x29')];if(!_0x335379[_0xf213('0x2b')][_0xf213('0x30')](_0xf213('0x31'))){_0x7b69a2[_0xf213('0x18')]=qs[_0xf213('0x18')](_0x335379[_0xf213('0x2b')]['limit']);_0x7b69a2[_0xf213('0x17')]=qs[_0xf213('0x17')](_0x335379[_0xf213('0x2b')][_0xf213('0x17')]);}_0x7b69a2[_0xf213('0x32')]=qs['sort'](_0x335379[_0xf213('0x2b')][_0xf213('0x33')]);_0x7b69a2[_0xf213('0x34')]=qs[_0xf213('0x35')](_[_0xf213('0x36')](_0x335379[_0xf213('0x2b')],_0x35bfe1[_0xf213('0x35')]));if(_0x335379[_0xf213('0x2b')][_0xf213('0x37')]){_0x7b69a2[_0xf213('0x34')]=_['merge'](_0x7b69a2[_0xf213('0x34')],{'$or':_[_0xf213('0x38')](_0x15f3e6,function(_0x1c7b78){if(_0x1c7b78[_0xf213('0x39')][_0xf213('0x3a')]!==_0xf213('0x3b')){var _0x262cc6={};_0x262cc6[_0x1c7b78[_0xf213('0x3c')]]={'$like':'%'+_0x335379[_0xf213('0x2b')]['filter']+'%'};return _0x262cc6;}})});}_0x7b69a2=_[_0xf213('0x3d')]({},_0x7b69a2,_0x335379['options']);var _0x5d371b={'where':_0x7b69a2[_0xf213('0x34')]};return db[_0xf213('0x27')][_0xf213('0x3e')](_0x5d371b)[_0xf213('0x1f')](function(_0x4640ba){_0x4b96bc[_0xf213('0x3e')]=_0x4640ba;if(_0x335379[_0xf213('0x2b')]['includeAll']){_0x7b69a2[_0xf213('0x3f')]=[{'all':!![]}];}return db['AnalyticFieldReport']['findAll'](_0x7b69a2);})[_0xf213('0x1f')](function(_0x302349){_0x4b96bc[_0xf213('0x40')]=_0x302349;return _0x4b96bc;})['then'](respondWithFilteredResult(_0x28cbb3,_0x7b69a2))[_0xf213('0x41')](handleError(_0x28cbb3,null));};exports[_0xf213('0x42')]=function(_0x276fea,_0x22ff35){var _0x1de146={'raw':![],'where':{'id':_0x276fea['params']['id']}},_0x24669e={};_0x24669e[_0xf213('0x29')]=_[_0xf213('0x2a')](db['AnalyticFieldReport']['rawAttributes']);_0x24669e[_0xf213('0x2b')]=_[_0xf213('0x2a')](_0x276fea[_0xf213('0x2b')]);_0x24669e[_0xf213('0x35')]=_['intersection'](_0x24669e[_0xf213('0x29')],_0x24669e[_0xf213('0x2b')]);_0x1de146[_0xf213('0x2d')]=_[_0xf213('0x2c')](_0x24669e[_0xf213('0x29')],qs[_0xf213('0x2e')](_0x276fea[_0xf213('0x2b')][_0xf213('0x2e')]));_0x1de146[_0xf213('0x2d')]=_0x1de146['attributes'][_0xf213('0x2f')]?_0x1de146[_0xf213('0x2d')]:_0x24669e[_0xf213('0x29')];if(_0x276fea[_0xf213('0x2b')][_0xf213('0x43')]){_0x1de146[_0xf213('0x3f')]=[{'all':!![]}];}_0x1de146=_[_0xf213('0x3d')]({},_0x1de146,_0x276fea[_0xf213('0x44')]);return db[_0xf213('0x27')][_0xf213('0x45')](_0x1de146)[_0xf213('0x1f')](handleEntityNotFound(_0x22ff35,null))['then'](respondWithResult(_0x22ff35,null))['catch'](handleError(_0x22ff35,null));};exports[_0xf213('0x46')]=function(_0x3cdfd9,_0x41e74c){return db[_0xf213('0x27')]['create'](_0x3cdfd9['body'],{})[_0xf213('0x1f')](respondWithResult(_0x41e74c,0xc9))['catch'](handleError(_0x41e74c,null));};exports['bulkCreate']=function(_0x100ae0,_0x2999d1){return db[_0xf213('0x27')][_0xf213('0x47')](_0x100ae0[_0xf213('0x48')],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x2999d1,0xc9))[_0xf213('0x41')](handleError(_0x2999d1,null));};exports[_0xf213('0x1e')]=function(_0x19defe,_0xcbd4a1){if(_0x19defe[_0xf213('0x48')]['id']){delete _0x19defe[_0xf213('0x48')]['id'];}return db[_0xf213('0x27')][_0xf213('0x45')]({'where':{'id':_0x19defe[_0xf213('0x49')]['id']}})[_0xf213('0x1f')](handleEntityNotFound(_0xcbd4a1,null))[_0xf213('0x1f')](saveUpdates(_0x19defe['body'],null))['then'](respondWithResult(_0xcbd4a1,null))[_0xf213('0x41')](handleError(_0xcbd4a1,null));};exports[_0xf213('0x20')]=function(_0x598086,_0x563789){return db['AnalyticFieldReport'][_0xf213('0x45')]({'where':{'id':_0x598086[_0xf213('0x49')]['id']}})[_0xf213('0x1f')](handleEntityNotFound(_0x563789,null))[_0xf213('0x1f')](removeEntity(_0x563789,null))[_0xf213('0x41')](handleError(_0x563789,null));};exports[_0xf213('0x4a')]=function(_0x1a252d,_0x44f854){return db[_0xf213('0x27')]['destroy']({'where':{'id':_0x1a252d['query'][_0xf213('0x4b')]||[]},'raw':![],'individualHooks':!![]})[_0xf213('0x1f')](respondWithResult(_0x44f854,0xcc))[_0xf213('0x41')](handleError(_0x44f854,null));};exports[_0xf213('0x4c')]=function(_0x287be0,_0xac5144,_0x1d7cc5){return db[_0xf213('0x4d')][_0xf213('0x4e')]({'where':{'id':_0x287be0[_0xf213('0x49')]['id']}})[_0xf213('0x1f')](handleEntityNotFound(_0xac5144,null))[_0xf213('0x1f')](function(_0x43fa55){if(_0x43fa55){return db[_0xf213('0x4f')][_0xf213('0x50')](function(_0x24a8cb){return db[_0xf213('0x27')][_0xf213('0x20')]({'where':{'CustomReportId':_0x287be0[_0xf213('0x49')]['id']},'transaction':_0x24a8cb})['then'](function(_0x41f727){var _0x137c64=_[_0xf213('0x38')](_0x287be0[_0xf213('0x48')],function(_0x1a6046){delete _0x1a6046['id'];_0x1a6046[_0xf213('0x51')]=_0x287be0[_0xf213('0x49')]['id'];return _0x1a6046;});return db['AnalyticFieldReport'][_0xf213('0x47')](_0x137c64,{'transaction':_0x24a8cb});});})[_0xf213('0x1f')](function(){return db[_0xf213('0x27')][_0xf213('0x52')]({'where':{'CustomReportId':_0x287be0[_0xf213('0x49')]['id']}});});}})['then'](respondWithResult(_0xac5144,null))[_0xf213('0x41')](handleError(_0xac5144,null));};
\ No newline at end of file
+var _0xe8eb=['apply','reject','save','update','then','sendStatus','error','name','send','index','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','map','key','field','filter','options','AnalyticFieldReport','includeAll','include','findAll','rows','catch','show','params','find','body','bulkCreate','destroy','bulkDestroy','addFields','AnalyticCustomReport','sequelize','CustomReportId','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','Content-Range'];(function(_0xf2a565,_0x557037){var _0x1d7f89=function(_0x37a5f2){while(--_0x37a5f2){_0xf2a565['push'](_0xf2a565['shift']());}};_0x1d7f89(++_0x557037);}(_0xe8eb,0xce));var _0xbe8e=function(_0x197501,_0xb94a0e){_0x197501=_0x197501-0x0;var _0x2a19d6=_0xe8eb[_0x197501];return _0x2a19d6;};'use strict';var pdf=require(_0xbe8e('0x0'));var emlformat=require(_0xbe8e('0x1'));var rimraf=require(_0xbe8e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbe8e('0x3'));var rp=require(_0xbe8e('0x4'));var moment=require(_0xbe8e('0x5'));var BPromise=require(_0xbe8e('0x6'));var Mustache=require(_0xbe8e('0x7'));var util=require(_0xbe8e('0x8'));var path=require('path');var sox=require(_0xbe8e('0x9'));var csv=require(_0xbe8e('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xbe8e('0xb'));var squel=require(_0xbe8e('0xc'));var crypto=require(_0xbe8e('0xd'));var jsforce=require(_0xbe8e('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xbe8e('0xa'));var querystring=require(_0xbe8e('0xf'));var Papa=require(_0xbe8e('0x10'));var Redis=require(_0xbe8e('0x11'));var authService=require(_0xbe8e('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xbe8e('0x13'));var logger=require(_0xbe8e('0x14'))('api');var utils=require(_0xbe8e('0x15'));var config=require(_0xbe8e('0x16'));var db=require(_0xbe8e('0x17'))['db'];function respondWithStatusCode(_0x42c6ce,_0x5134ef){_0x5134ef=_0x5134ef||0xcc;return function(_0x155b15){if(_0x155b15){return _0x42c6ce['sendStatus'](_0x5134ef);}return _0x42c6ce[_0xbe8e('0x18')](_0x5134ef)[_0xbe8e('0x19')]();};}function respondWithResult(_0x11fc72,_0x19f9b0){_0x19f9b0=_0x19f9b0||0xc8;return function(_0x24aee3){if(_0x24aee3){return _0x11fc72['status'](_0x19f9b0)[_0xbe8e('0x1a')](_0x24aee3);}};}function respondWithFilteredResult(_0x22a8b7,_0x532247){return function(_0x20e413){if(_0x20e413){var _0xe2b908=_0x20e413[_0xbe8e('0x1b')],_0x52b534=_0x532247[_0xbe8e('0x1c')],_0x58cd0a=_0x532247['offset']+_0x532247[_0xbe8e('0x1d')],_0x1f6097;if(_0x58cd0a>=_0xe2b908){_0x58cd0a=_0xe2b908;_0x1f6097=0xc8;}else{_0x1f6097=0xce;}_0x22a8b7[_0xbe8e('0x18')](_0x1f6097);return _0x22a8b7['set'](_0xbe8e('0x1e'),_0x52b534+'-'+_0x58cd0a+'/'+_0xe2b908)[_0xbe8e('0x1a')](_0x20e413);}return null;};}function patchUpdates(_0x3665c9){return function(_0x3f2216){try{jsonpatch[_0xbe8e('0x1f')](_0x3f2216,_0x3665c9,!![]);}catch(_0x568f4a){return BPromise[_0xbe8e('0x20')](_0x568f4a);}return _0x3f2216[_0xbe8e('0x21')]();};}function saveUpdates(_0xbe29d8,_0x2a23da){return function(_0x4a5b60){if(_0x4a5b60){return _0x4a5b60[_0xbe8e('0x22')](_0xbe29d8)[_0xbe8e('0x23')](function(_0x1a2c30){return _0x1a2c30;});}return null;};}function removeEntity(_0x106877,_0x30f74f){return function(_0x4692fc){if(_0x4692fc){return _0x4692fc['destroy']()[_0xbe8e('0x23')](function(){_0x106877[_0xbe8e('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x57f336,_0x251432){return function(_0x338ebd){if(!_0x338ebd){_0x57f336[_0xbe8e('0x24')](0x194);}return _0x338ebd;};}function handleError(_0x46ac2a,_0x497eea){_0x497eea=_0x497eea||0x1f4;return function(_0x11c492){logger[_0xbe8e('0x25')](_0x11c492['stack']);if(_0x11c492['name']){delete _0x11c492[_0xbe8e('0x26')];}_0x46ac2a[_0xbe8e('0x18')](_0x497eea)[_0xbe8e('0x27')](_0x11c492);};}exports[_0xbe8e('0x28')]=function(_0x173c8a,_0x54af54){var _0x54b71d={},_0x4e07ea={},_0x4d0499={'count':0x0,'rows':[]};var _0x5698cb=db['AnalyticFieldReport'][_0xbe8e('0x29')];_0x4e07ea[_0xbe8e('0x2a')]=_[_0xbe8e('0x2b')](_0x5698cb);_0x4e07ea[_0xbe8e('0x2c')]=_[_0xbe8e('0x2b')](_0x173c8a[_0xbe8e('0x2c')]);_0x4e07ea[_0xbe8e('0x2d')]=_[_0xbe8e('0x2e')](_0x4e07ea[_0xbe8e('0x2a')],_0x4e07ea[_0xbe8e('0x2c')]);_0x54b71d['attributes']=_['intersection'](_0x4e07ea[_0xbe8e('0x2a')],qs[_0xbe8e('0x2f')](_0x173c8a[_0xbe8e('0x2c')][_0xbe8e('0x2f')]));_0x54b71d[_0xbe8e('0x30')]=_0x54b71d['attributes'][_0xbe8e('0x31')]?_0x54b71d['attributes']:_0x4e07ea[_0xbe8e('0x2a')];if(!_0x173c8a[_0xbe8e('0x2c')][_0xbe8e('0x32')](_0xbe8e('0x33'))){_0x54b71d[_0xbe8e('0x1d')]=qs[_0xbe8e('0x1d')](_0x173c8a['query']['limit']);_0x54b71d[_0xbe8e('0x1c')]=qs['offset'](_0x173c8a[_0xbe8e('0x2c')][_0xbe8e('0x1c')]);}_0x54b71d[_0xbe8e('0x34')]=qs[_0xbe8e('0x35')](_0x173c8a[_0xbe8e('0x2c')][_0xbe8e('0x35')]);_0x54b71d[_0xbe8e('0x36')]=qs['filters'](_[_0xbe8e('0x37')](_0x173c8a[_0xbe8e('0x2c')],_0x4e07ea['filters']));if(_0x173c8a[_0xbe8e('0x2c')]['filter']){_0x54b71d[_0xbe8e('0x36')]=_[_0xbe8e('0x38')](_0x54b71d[_0xbe8e('0x36')],{'$or':_[_0xbe8e('0x39')](_0x5698cb,function(_0x11de39){if(_0x11de39['type'][_0xbe8e('0x3a')]!=='VIRTUAL'){var _0x26dc27={};_0x26dc27[_0x11de39[_0xbe8e('0x3b')]]={'$like':'%'+_0x173c8a[_0xbe8e('0x2c')][_0xbe8e('0x3c')]+'%'};return _0x26dc27;}})});}_0x54b71d=_['merge']({},_0x54b71d,_0x173c8a[_0xbe8e('0x3d')]);var _0x4bd7c1={'where':_0x54b71d[_0xbe8e('0x36')]};return db[_0xbe8e('0x3e')]['count'](_0x4bd7c1)[_0xbe8e('0x23')](function(_0x413af1){_0x4d0499[_0xbe8e('0x1b')]=_0x413af1;if(_0x173c8a[_0xbe8e('0x2c')][_0xbe8e('0x3f')]){_0x54b71d[_0xbe8e('0x40')]=[{'all':!![]}];}return db[_0xbe8e('0x3e')][_0xbe8e('0x41')](_0x54b71d);})[_0xbe8e('0x23')](function(_0x4bfff4){_0x4d0499[_0xbe8e('0x42')]=_0x4bfff4;return _0x4d0499;})['then'](respondWithFilteredResult(_0x54af54,_0x54b71d))[_0xbe8e('0x43')](handleError(_0x54af54,null));};exports[_0xbe8e('0x44')]=function(_0x4b3e23,_0x3ff68b){var _0x850ad2={'raw':![],'where':{'id':_0x4b3e23[_0xbe8e('0x45')]['id']}},_0x522717={};_0x522717['model']=_['keys'](db[_0xbe8e('0x3e')][_0xbe8e('0x29')]);_0x522717[_0xbe8e('0x2c')]=_[_0xbe8e('0x2b')](_0x4b3e23['query']);_0x522717[_0xbe8e('0x2d')]=_['intersection'](_0x522717['model'],_0x522717['query']);_0x850ad2[_0xbe8e('0x30')]=_[_0xbe8e('0x2e')](_0x522717[_0xbe8e('0x2a')],qs[_0xbe8e('0x2f')](_0x4b3e23[_0xbe8e('0x2c')]['fields']));_0x850ad2['attributes']=_0x850ad2[_0xbe8e('0x30')]['length']?_0x850ad2[_0xbe8e('0x30')]:_0x522717['model'];if(_0x4b3e23[_0xbe8e('0x2c')][_0xbe8e('0x3f')]){_0x850ad2['include']=[{'all':!![]}];}_0x850ad2=_[_0xbe8e('0x38')]({},_0x850ad2,_0x4b3e23['options']);return db[_0xbe8e('0x3e')][_0xbe8e('0x46')](_0x850ad2)[_0xbe8e('0x23')](handleEntityNotFound(_0x3ff68b,null))[_0xbe8e('0x23')](respondWithResult(_0x3ff68b,null))[_0xbe8e('0x43')](handleError(_0x3ff68b,null));};exports['create']=function(_0x3fe37c,_0x71944){return db['AnalyticFieldReport']['create'](_0x3fe37c[_0xbe8e('0x47')],{})[_0xbe8e('0x23')](respondWithResult(_0x71944,0xc9))[_0xbe8e('0x43')](handleError(_0x71944,null));};exports[_0xbe8e('0x48')]=function(_0x4d4f7b,_0x370db1){return db['AnalyticFieldReport'][_0xbe8e('0x48')](_0x4d4f7b[_0xbe8e('0x47')],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x370db1,0xc9))[_0xbe8e('0x43')](handleError(_0x370db1,null));};exports[_0xbe8e('0x22')]=function(_0x37eb0c,_0x560d9e){if(_0x37eb0c['body']['id']){delete _0x37eb0c[_0xbe8e('0x47')]['id'];}return db['AnalyticFieldReport'][_0xbe8e('0x46')]({'where':{'id':_0x37eb0c[_0xbe8e('0x45')]['id']}})[_0xbe8e('0x23')](handleEntityNotFound(_0x560d9e,null))[_0xbe8e('0x23')](saveUpdates(_0x37eb0c[_0xbe8e('0x47')],null))[_0xbe8e('0x23')](respondWithResult(_0x560d9e,null))['catch'](handleError(_0x560d9e,null));};exports[_0xbe8e('0x49')]=function(_0x4e9793,_0x5b192e){return db[_0xbe8e('0x3e')]['find']({'where':{'id':_0x4e9793[_0xbe8e('0x45')]['id']}})[_0xbe8e('0x23')](handleEntityNotFound(_0x5b192e,null))[_0xbe8e('0x23')](removeEntity(_0x5b192e,null))[_0xbe8e('0x43')](handleError(_0x5b192e,null));};exports[_0xbe8e('0x4a')]=function(_0x599d48,_0x3dc73f){return db[_0xbe8e('0x3e')]['destroy']({'where':{'id':_0x599d48['query']['ids']||[]},'raw':![],'individualHooks':!![]})[_0xbe8e('0x23')](respondWithResult(_0x3dc73f,0xcc))[_0xbe8e('0x43')](handleError(_0x3dc73f,null));};exports[_0xbe8e('0x4b')]=function(_0x96d982,_0xaeac2b,_0x1fd689){return db[_0xbe8e('0x4c')]['findOne']({'where':{'id':_0x96d982[_0xbe8e('0x45')]['id']}})[_0xbe8e('0x23')](handleEntityNotFound(_0xaeac2b,null))[_0xbe8e('0x23')](function(_0x44bfa0){if(_0x44bfa0){return db[_0xbe8e('0x4d')]['transaction'](function(_0x479877){return db[_0xbe8e('0x3e')][_0xbe8e('0x49')]({'where':{'CustomReportId':_0x96d982[_0xbe8e('0x45')]['id']},'transaction':_0x479877})[_0xbe8e('0x23')](function(_0x5e9e32){var _0x14f32c=_[_0xbe8e('0x39')](_0x96d982[_0xbe8e('0x47')],function(_0x21b410){delete _0x21b410['id'];_0x21b410[_0xbe8e('0x4e')]=_0x96d982[_0xbe8e('0x45')]['id'];return _0x21b410;});return db[_0xbe8e('0x3e')][_0xbe8e('0x48')](_0x14f32c,{'transaction':_0x479877});});})[_0xbe8e('0x23')](function(){return db[_0xbe8e('0x3e')][_0xbe8e('0x41')]({'where':{'CustomReportId':_0x96d982[_0xbe8e('0x45')]['id']}});});}})[_0xbe8e('0x23')](respondWithResult(_0xaeac2b,null))[_0xbe8e('0x43')](handleError(_0xaeac2b,null));};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js
index fb7da3e..52d3a5c 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.model.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x81a8=['define','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticFieldReport.attributes'];(function(_0x5f2327,_0x123bcd){var _0x304698=function(_0x5eb594){while(--_0x5eb594){_0x5f2327['push'](_0x5f2327['shift']());}};_0x304698(++_0x123bcd);}(_0x81a8,0x1c4));var _0x881a=function(_0x23c02b,_0x411b4d){_0x23c02b=_0x23c02b-0x0;var _0x25efc5=_0x81a8[_0x23c02b];return _0x25efc5;};'use strict';var _=require(_0x881a('0x0'));var util=require('util');var logger=require(_0x881a('0x1'))(_0x881a('0x2'));var moment=require(_0x881a('0x3'));var BPromise=require(_0x881a('0x4'));var rp=require(_0x881a('0x5'));var fs=require('fs');var path=require(_0x881a('0x6'));var rimraf=require(_0x881a('0x7'));var config=require(_0x881a('0x8'));var attributes=require(_0x881a('0x9'));module['exports']=function(_0x2cdfad,_0x29a2bd){return _0x2cdfad[_0x881a('0xa')]('AnalyticFieldReport',attributes,{'tableName':'analytics_report_fields','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4720=['rimraf','exports','analytics_report_fields','util','../../config/logger','api','moment','path'];(function(_0x29d087,_0x35b874){var _0x4a50af=function(_0x5a5665){while(--_0x5a5665){_0x29d087['push'](_0x29d087['shift']());}};_0x4a50af(++_0x35b874);}(_0x4720,0xe3));var _0x0472=function(_0x3c43f6,_0x429058){_0x3c43f6=_0x3c43f6-0x0;var _0x5677a4=_0x4720[_0x3c43f6];return _0x5677a4;};'use strict';var _=require('lodash');var util=require(_0x0472('0x0'));var logger=require(_0x0472('0x1'))(_0x0472('0x2'));var moment=require(_0x0472('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x0472('0x4'));var rimraf=require(_0x0472('0x5'));var config=require('../../config/environment');var attributes=require('./analyticFieldReport.attributes');module[_0x0472('0x6')]=function(_0x5ca95d,_0x4d43bf){return _0x5ca95d['define']('AnalyticFieldReport',attributes,{'tableName':_0x0472('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.rpc.js b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
index 1d86701..601ffb5 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.rpc.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdbfa=['rpc','../../config/environment','jayson/promise','client','request','then','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','bluebird','ioredis','../../mysqldb','../../config/logger'];(function(_0x44bcb0,_0x235aa9){var _0xfaf881=function(_0x25d81d){while(--_0x25d81d){_0x44bcb0['push'](_0x44bcb0['shift']());}};_0xfaf881(++_0x235aa9);}(_0xdbfa,0x128));var _0xadbf=function(_0xab0dfd,_0x2e694f){_0xab0dfd=_0xab0dfd-0x0;var _0x76f1eb=_0xdbfa[_0xab0dfd];return _0x76f1eb;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xadbf('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xadbf('0x1'));var db=require(_0xadbf('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0xadbf('0x3'))(_0xadbf('0x4'));var config=require(_0xadbf('0x5'));var jayson=require(_0xadbf('0x6'));var client=jayson[_0xadbf('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1204f4,_0x30f643,_0x16704e){return new BPromise(function(_0x2bbd13,_0x4daabe){return client[_0xadbf('0x8')](_0x1204f4,_0x16704e)[_0xadbf('0x9')](function(_0x39e467){logger['info'](_0xadbf('0xa'),_0x30f643,_0xadbf('0xb'));logger[_0xadbf('0xc')](_0xadbf('0xd'),_0x30f643,_0xadbf('0xb'),JSON[_0xadbf('0xe')](_0x39e467));if(_0x39e467[_0xadbf('0xf')]){if(_0x39e467[_0xadbf('0xf')]['code']===0x1f4){logger[_0xadbf('0xf')](_0xadbf('0xa'),_0x30f643,_0x39e467['error'][_0xadbf('0x10')]);return _0x4daabe(_0x39e467[_0xadbf('0xf')]['message']);}logger['error'](_0xadbf('0xa'),_0x30f643,_0x39e467['error'][_0xadbf('0x10')]);return _0x2bbd13(_0x39e467[_0xadbf('0xf')][_0xadbf('0x10')]);}else{logger[_0xadbf('0x11')](_0xadbf('0xa'),_0x30f643,_0xadbf('0xb'));_0x2bbd13(_0x39e467[_0xadbf('0x12')][_0xadbf('0x10')]);}})[_0xadbf('0x13')](function(_0x59712){logger[_0xadbf('0xf')](_0xadbf('0xa'),_0x30f643,_0x59712);_0x4daabe(_0x59712);});});}
\ No newline at end of file
+var _0x16cc=['result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message'];(function(_0x142041,_0x3001eb){var _0x11a40b=function(_0x1ec10a){while(--_0x1ec10a){_0x142041['push'](_0x142041['shift']());}};_0x11a40b(++_0x3001eb);}(_0x16cc,0x120));var _0xc16c=function(_0xaecbb8,_0x57ef10){_0xaecbb8=_0xaecbb8-0x0;var _0x4e8c47=_0x16cc[_0xaecbb8];return _0x4e8c47;};'use strict';var _=require('lodash');var util=require(_0xc16c('0x0'));var moment=require(_0xc16c('0x1'));var BPromise=require(_0xc16c('0x2'));var rs=require(_0xc16c('0x3'));var fs=require('fs');var Redis=require(_0xc16c('0x4'));var db=require(_0xc16c('0x5'))['db'];var utils=require(_0xc16c('0x6'));var logger=require('../../config/logger')(_0xc16c('0x7'));var config=require(_0xc16c('0x8'));var jayson=require(_0xc16c('0x9'));var client=jayson[_0xc16c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3492da,_0x561b61,_0x828798){return new BPromise(function(_0x14d607,_0x37b245){return client[_0xc16c('0xb')](_0x3492da,_0x828798)['then'](function(_0x27f3e6){logger[_0xc16c('0xc')](_0xc16c('0xd'),_0x561b61,_0xc16c('0xe'));logger['debug'](_0xc16c('0xf'),_0x561b61,_0xc16c('0xe'),JSON[_0xc16c('0x10')](_0x27f3e6));if(_0x27f3e6['error']){if(_0x27f3e6['error'][_0xc16c('0x11')]===0x1f4){logger[_0xc16c('0x12')](_0xc16c('0xd'),_0x561b61,_0x27f3e6['error']['message']);return _0x37b245(_0x27f3e6['error'][_0xc16c('0x13')]);}logger[_0xc16c('0x12')](_0xc16c('0xd'),_0x561b61,_0x27f3e6[_0xc16c('0x12')][_0xc16c('0x13')]);return _0x14d607(_0x27f3e6[_0xc16c('0x12')][_0xc16c('0x13')]);}else{logger[_0xc16c('0xc')](_0xc16c('0xd'),_0x561b61,_0xc16c('0xe'));_0x14d607(_0x27f3e6[_0xc16c('0x14')][_0xc16c('0x13')]);}})[_0xc16c('0x15')](function(_0x2bf102){logger[_0xc16c('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x561b61,_0x2bf102);_0x37b245(_0x2bf102);});});}
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js
index 4e915e4..db7ed7f 100644
--- a/server/api/analyticFieldReport/index.js
+++ b/server/api/analyticFieldReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac4a=['delete','/destroy_many','destroy','exports','multer','util','path','connect-timeout','express','Router','../../config/environment','./analyticFieldReport.controller','get','index','/:id','show','post','isAuthenticated','/:id/create_many','addFields','put'];(function(_0x468fb3,_0x1357e){var _0x57109=function(_0x45c3ef){while(--_0x45c3ef){_0x468fb3['push'](_0x468fb3['shift']());}};_0x57109(++_0x1357e);}(_0xac4a,0x13f));var _0xaac4=function(_0x205bbf,_0xa1c83){_0x205bbf=_0x205bbf-0x0;var _0x2a926c=_0xac4a[_0x205bbf];return _0x2a926c;};'use strict';var multer=require(_0xaac4('0x0'));var util=require(_0xaac4('0x1'));var path=require(_0xaac4('0x2'));var timeout=require(_0xaac4('0x3'));var express=require(_0xaac4('0x4'));var router=express[_0xaac4('0x5')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xaac4('0x6'));var controller=require(_0xaac4('0x7'));router[_0xaac4('0x8')]('/',auth['isAuthenticated'](),controller[_0xaac4('0x9')]);router['get'](_0xaac4('0xa'),auth['isAuthenticated'](),controller[_0xaac4('0xb')]);router[_0xaac4('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xaac4('0xc')]('/create_many',auth[_0xaac4('0xd')](),controller['bulkCreate']);router['post'](_0xaac4('0xe'),auth[_0xaac4('0xd')](),controller[_0xaac4('0xf')]);router[_0xaac4('0x10')](_0xaac4('0xa'),auth['isAuthenticated'](),controller['update']);router[_0xaac4('0x11')](_0xaac4('0x12'),auth[_0xaac4('0xd')](),controller['bulkDestroy']);router[_0xaac4('0x11')](_0xaac4('0xa'),auth['isAuthenticated'](),controller[_0xaac4('0x13')]);module[_0xaac4('0x14')]=router;
\ No newline at end of file
+var _0x4522=['../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','isAuthenticated','index','/:id','show','post','create','/create_many','addFields','put','update','delete','/destroy_many','exports','path','connect-timeout','express','../../components/auth/service'];(function(_0x2adc73,_0x5e23ac){var _0xa2c1dc=function(_0x51b6f6){while(--_0x51b6f6){_0x2adc73['push'](_0x2adc73['shift']());}};_0xa2c1dc(++_0x5e23ac);}(_0x4522,0x1a0));var _0x2452=function(_0x43fd34,_0x320451){_0x43fd34=_0x43fd34-0x0;var _0x4ff001=_0x4522[_0x43fd34];return _0x4ff001;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2452('0x0'));var timeout=require(_0x2452('0x1'));var express=require(_0x2452('0x2'));var router=express['Router']();var auth=require(_0x2452('0x3'));var interaction=require(_0x2452('0x4'));var config=require(_0x2452('0x5'));var controller=require(_0x2452('0x6'));router[_0x2452('0x7')]('/',auth[_0x2452('0x8')](),controller[_0x2452('0x9')]);router[_0x2452('0x7')](_0x2452('0xa'),auth[_0x2452('0x8')](),controller[_0x2452('0xb')]);router[_0x2452('0xc')]('/',auth[_0x2452('0x8')](),controller[_0x2452('0xd')]);router[_0x2452('0xc')](_0x2452('0xe'),auth['isAuthenticated'](),controller['bulkCreate']);router[_0x2452('0xc')]('/:id/create_many',auth['isAuthenticated'](),controller[_0x2452('0xf')]);router[_0x2452('0x10')](_0x2452('0xa'),auth[_0x2452('0x8')](),controller[_0x2452('0x11')]);router[_0x2452('0x12')](_0x2452('0x13'),auth[_0x2452('0x8')](),controller['bulkDestroy']);router['delete']('/:id',auth[_0x2452('0x8')](),controller['destroy']);module[_0x2452('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.attributes.js b/server/api/analyticMetric/analyticMetric.attributes.js
index 23b0faf..373da6a 100644
--- a/server/api/analyticMetric/analyticMetric.attributes.js
+++ b/server/api/analyticMetric/analyticMetric.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac24=['name','sequelize','exports','STRING'];(function(_0x48a9ae,_0x2330a2){var _0x24b268=function(_0x2bce66){while(--_0x2bce66){_0x48a9ae['push'](_0x48a9ae['shift']());}};_0x24b268(++_0x2330a2);}(_0xac24,0x1ad));var _0x4ac2=function(_0x116279,_0x17fc0d){_0x116279=_0x116279-0x0;var _0x521ac8=_0xac24[_0x116279];return _0x521ac8;};'use strict';var Sequelize=require(_0x4ac2('0x0'));module[_0x4ac2('0x1')]={'name':{'type':Sequelize[_0x4ac2('0x2')],'allowNull':![],'unique':_0x4ac2('0x3')},'table':{'type':Sequelize[_0x4ac2('0x2')]},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize[_0x4ac2('0x2')]}};
\ No newline at end of file
+var _0x8ef1=['STRING','TEXT','exports'];(function(_0xa12526,_0x9b5fe3){var _0x572645=function(_0xa2f7c4){while(--_0xa2f7c4){_0xa12526['push'](_0xa12526['shift']());}};_0x572645(++_0x9b5fe3);}(_0x8ef1,0x71));var _0x18ef=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0x8ef1[_0x3e5086];return _0xfeb102;};'use strict';var Sequelize=require('sequelize');module[_0x18ef('0x0')]={'name':{'type':Sequelize[_0x18ef('0x1')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0x18ef('0x1')]},'metric':{'type':Sequelize[_0x18ef('0x2')]},'description':{'type':Sequelize[_0x18ef('0x1')]}};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js
index ce157b5..689cf0e 100644
--- a/server/api/analyticMetric/analyticMetric.controller.js
+++ b/server/api/analyticMetric/analyticMetric.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfbc3=['keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','key','field','options','AnalyticMetric','count','includeAll','include','findAll','rows','show','params','rawAttributes','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','find','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','Content-Range','apply','save','destroy','then','get','Metrics','UserProfileResource','error','stack','name','index','model'];(function(_0x2ea6ec,_0x66cffe){var _0x15bfd0=function(_0x4ff193){while(--_0x4ff193){_0x2ea6ec['push'](_0x2ea6ec['shift']());}};_0x15bfd0(++_0x66cffe);}(_0xfbc3,0x124));var _0x3fbc=function(_0x15f801,_0x21d524){_0x15f801=_0x15f801-0x0;var _0x49149e=_0xfbc3[_0x15f801];return _0x49149e;};'use strict';var pdf=require(_0x3fbc('0x0'));var emlformat=require(_0x3fbc('0x1'));var rimraf=require(_0x3fbc('0x2'));var zipdir=require(_0x3fbc('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3fbc('0x4'));var moment=require(_0x3fbc('0x5'));var BPromise=require(_0x3fbc('0x6'));var Mustache=require(_0x3fbc('0x7'));var util=require(_0x3fbc('0x8'));var path=require(_0x3fbc('0x9'));var sox=require(_0x3fbc('0xa'));var csv=require(_0x3fbc('0xb'));var ejs=require(_0x3fbc('0xc'));var fs=require('fs');var _=require(_0x3fbc('0xd'));var squel=require(_0x3fbc('0xe'));var crypto=require(_0x3fbc('0xf'));var jsforce=require(_0x3fbc('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x3fbc('0xb'));var querystring=require(_0x3fbc('0x11'));var Papa=require('papaparse');var Redis=require(_0x3fbc('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x3fbc('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3fbc('0x14'))(_0x3fbc('0x15'));var utils=require(_0x3fbc('0x16'));var config=require(_0x3fbc('0x17'));var db=require(_0x3fbc('0x18'))['db'];function respondWithStatusCode(_0x59040f,_0x5d6c67){_0x5d6c67=_0x5d6c67||0xcc;return function(_0x22554a){if(_0x22554a){return _0x59040f[_0x3fbc('0x19')](_0x5d6c67);}return _0x59040f[_0x3fbc('0x1a')](_0x5d6c67)[_0x3fbc('0x1b')]();};}function respondWithResult(_0x3f8c09,_0x2bb81f){_0x2bb81f=_0x2bb81f||0xc8;return function(_0x2f2395){if(_0x2f2395){return _0x3f8c09[_0x3fbc('0x1a')](_0x2bb81f)[_0x3fbc('0x1c')](_0x2f2395);}};}function respondWithFilteredResult(_0x4af7,_0x277152){return function(_0x50103d){if(_0x50103d){var _0x3c31cb=_0x50103d['count'],_0x30b32b=_0x277152['offset'],_0x7315f1=_0x277152[_0x3fbc('0x1d')]+_0x277152[_0x3fbc('0x1e')],_0x23168e;if(_0x7315f1>=_0x3c31cb){_0x7315f1=_0x3c31cb;_0x23168e=0xc8;}else{_0x23168e=0xce;}_0x4af7[_0x3fbc('0x1a')](_0x23168e);return _0x4af7['set'](_0x3fbc('0x1f'),_0x30b32b+'-'+_0x7315f1+'/'+_0x3c31cb)['json'](_0x50103d);}return null;};}function patchUpdates(_0x157781){return function(_0x2efd0b){try{jsonpatch[_0x3fbc('0x20')](_0x2efd0b,_0x157781,!![]);}catch(_0x3cd51f){return BPromise['reject'](_0x3cd51f);}return _0x2efd0b[_0x3fbc('0x21')]();};}function saveUpdates(_0x4db943,_0x4fb11b){return function(_0x15e47e){if(_0x15e47e){return _0x15e47e['update'](_0x4db943)['then'](function(_0x1ddc11){return _0x1ddc11;});}return null;};}function removeEntity(_0x2dbfdb,_0x4bd59f){return function(_0x1c439d){if(_0x1c439d){return _0x1c439d[_0x3fbc('0x22')]()[_0x3fbc('0x23')](function(){var _0x303078=_0x1c439d[_0x3fbc('0x24')]({'plain':!![]});var _0x5852ce=_0x3fbc('0x25');return db[_0x3fbc('0x26')]['destroy']({'where':{'type':_0x5852ce,'resourceId':_0x303078['id']}})['then'](function(){return _0x1c439d;});})[_0x3fbc('0x23')](function(){_0x2dbfdb[_0x3fbc('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x283357,_0x5ef30b){return function(_0x1412fd){if(!_0x1412fd){_0x283357[_0x3fbc('0x19')](0x194);}return _0x1412fd;};}function handleError(_0x36e90a,_0x342f9b){_0x342f9b=_0x342f9b||0x1f4;return function(_0x364267){logger[_0x3fbc('0x27')](_0x364267[_0x3fbc('0x28')]);if(_0x364267[_0x3fbc('0x29')]){delete _0x364267[_0x3fbc('0x29')];}_0x36e90a[_0x3fbc('0x1a')](_0x342f9b)['send'](_0x364267);};}exports[_0x3fbc('0x2a')]=function(_0x3a28cb,_0x11deb2){var _0x1c3905={},_0x3dc2ca={},_0x288fd1={'count':0x0,'rows':[]};var _0x42a23f=db['AnalyticMetric']['rawAttributes'];_0x3dc2ca[_0x3fbc('0x2b')]=_[_0x3fbc('0x2c')](_0x42a23f);_0x3dc2ca[_0x3fbc('0x2d')]=_[_0x3fbc('0x2c')](_0x3a28cb[_0x3fbc('0x2d')]);_0x3dc2ca[_0x3fbc('0x2e')]=_[_0x3fbc('0x2f')](_0x3dc2ca[_0x3fbc('0x2b')],_0x3dc2ca['query']);_0x1c3905['attributes']=_[_0x3fbc('0x2f')](_0x3dc2ca[_0x3fbc('0x2b')],qs[_0x3fbc('0x30')](_0x3a28cb[_0x3fbc('0x2d')][_0x3fbc('0x30')]));_0x1c3905[_0x3fbc('0x31')]=_0x1c3905[_0x3fbc('0x31')][_0x3fbc('0x32')]?_0x1c3905[_0x3fbc('0x31')]:_0x3dc2ca[_0x3fbc('0x2b')];if(!_0x3a28cb['query'][_0x3fbc('0x33')](_0x3fbc('0x34'))){_0x1c3905['limit']=qs['limit'](_0x3a28cb[_0x3fbc('0x2d')]['limit']);_0x1c3905[_0x3fbc('0x1d')]=qs[_0x3fbc('0x1d')](_0x3a28cb[_0x3fbc('0x2d')][_0x3fbc('0x1d')]);}_0x1c3905[_0x3fbc('0x35')]=qs[_0x3fbc('0x36')](_0x3a28cb['query'][_0x3fbc('0x36')]);_0x1c3905[_0x3fbc('0x37')]=qs[_0x3fbc('0x2e')](_[_0x3fbc('0x38')](_0x3a28cb[_0x3fbc('0x2d')],_0x3dc2ca[_0x3fbc('0x2e')]));if(_0x3a28cb['query'][_0x3fbc('0x39')]){_0x1c3905[_0x3fbc('0x37')]=_[_0x3fbc('0x3a')](_0x1c3905['where'],{'$or':_['map'](_0x42a23f,function(_0x10a62d){if(_0x10a62d[_0x3fbc('0x3b')][_0x3fbc('0x3c')]!=='VIRTUAL'){var _0x393a18={};_0x393a18[_0x10a62d[_0x3fbc('0x3d')]]={'$like':'%'+_0x3a28cb[_0x3fbc('0x2d')][_0x3fbc('0x39')]+'%'};return _0x393a18;}})});}_0x1c3905=_[_0x3fbc('0x3a')]({},_0x1c3905,_0x3a28cb[_0x3fbc('0x3e')]);var _0x5aee86={'where':_0x1c3905['where']};return db[_0x3fbc('0x3f')][_0x3fbc('0x40')](_0x5aee86)[_0x3fbc('0x23')](function(_0x1468c8){_0x288fd1[_0x3fbc('0x40')]=_0x1468c8;if(_0x3a28cb[_0x3fbc('0x2d')][_0x3fbc('0x41')]){_0x1c3905[_0x3fbc('0x42')]=[{'all':!![]}];}return db[_0x3fbc('0x3f')][_0x3fbc('0x43')](_0x1c3905);})[_0x3fbc('0x23')](function(_0x54511f){_0x288fd1[_0x3fbc('0x44')]=_0x54511f;return _0x288fd1;})[_0x3fbc('0x23')](respondWithFilteredResult(_0x11deb2,_0x1c3905))['catch'](handleError(_0x11deb2,null));};exports[_0x3fbc('0x45')]=function(_0x80771c,_0x22d4ad){var _0x339887={'raw':!![],'where':{'id':_0x80771c[_0x3fbc('0x46')]['id']}},_0x43d95a={};_0x43d95a['model']=_[_0x3fbc('0x2c')](db[_0x3fbc('0x3f')][_0x3fbc('0x47')]);_0x43d95a[_0x3fbc('0x2d')]=_['keys'](_0x80771c[_0x3fbc('0x2d')]);_0x43d95a[_0x3fbc('0x2e')]=_[_0x3fbc('0x2f')](_0x43d95a[_0x3fbc('0x2b')],_0x43d95a['query']);_0x339887[_0x3fbc('0x31')]=_[_0x3fbc('0x2f')](_0x43d95a[_0x3fbc('0x2b')],qs[_0x3fbc('0x30')](_0x80771c['query'][_0x3fbc('0x30')]));_0x339887['attributes']=_0x339887[_0x3fbc('0x31')]['length']?_0x339887[_0x3fbc('0x31')]:_0x43d95a[_0x3fbc('0x2b')];if(_0x80771c[_0x3fbc('0x2d')]['includeAll']){_0x339887['include']=[{'all':!![]}];}_0x339887=_[_0x3fbc('0x3a')]({},_0x339887,_0x80771c[_0x3fbc('0x3e')]);return db[_0x3fbc('0x3f')]['find'](_0x339887)[_0x3fbc('0x23')](handleEntityNotFound(_0x22d4ad,null))['then'](respondWithResult(_0x22d4ad,null))[_0x3fbc('0x48')](handleError(_0x22d4ad,null));};exports[_0x3fbc('0x49')]=function(_0x1dd960,_0x714442){return db[_0x3fbc('0x3f')][_0x3fbc('0x49')](_0x1dd960[_0x3fbc('0x4a')],{})[_0x3fbc('0x23')](function(_0x383aba){var _0x21cfd0=_0x1dd960[_0x3fbc('0x4b')][_0x3fbc('0x24')]({'plain':!![]});if(!_0x21cfd0)throw new Error(_0x3fbc('0x4c'));if(_0x21cfd0[_0x3fbc('0x4d')]===_0x3fbc('0x4b')){var _0x510f40=_0x383aba[_0x3fbc('0x24')]({'plain':!![]});var _0x29a187=_0x3fbc('0x25');return db[_0x3fbc('0x4e')]['find']({'where':{'name':_0x29a187,'userProfileId':_0x21cfd0[_0x3fbc('0x4f')]},'raw':!![]})[_0x3fbc('0x23')](function(_0x563d63){if(_0x563d63&&_0x563d63[_0x3fbc('0x50')]===0x0){return db[_0x3fbc('0x26')]['create']({'name':_0x510f40[_0x3fbc('0x29')],'resourceId':_0x510f40['id'],'type':_0x563d63[_0x3fbc('0x29')],'sectionId':_0x563d63['id']},{})[_0x3fbc('0x23')](function(){return _0x383aba;});}else{return _0x383aba;}})[_0x3fbc('0x48')](function(_0x20814c){logger[_0x3fbc('0x27')](_0x3fbc('0x51'),_0x20814c);throw _0x20814c;});}return _0x383aba;})['then'](respondWithResult(_0x714442,0xc9))[_0x3fbc('0x48')](handleError(_0x714442,null));};exports[_0x3fbc('0x52')]=function(_0x29dbc9,_0xd71bcf){if(_0x29dbc9['body']['id']){delete _0x29dbc9[_0x3fbc('0x4a')]['id'];}return db[_0x3fbc('0x3f')][_0x3fbc('0x53')]({'where':{'id':_0x29dbc9[_0x3fbc('0x46')]['id']}})[_0x3fbc('0x23')](handleEntityNotFound(_0xd71bcf,null))[_0x3fbc('0x23')](saveUpdates(_0x29dbc9[_0x3fbc('0x4a')],null))[_0x3fbc('0x23')](respondWithResult(_0xd71bcf,null))[_0x3fbc('0x48')](handleError(_0xd71bcf,null));};exports[_0x3fbc('0x22')]=function(_0x39a656,_0xa68981){return db[_0x3fbc('0x3f')][_0x3fbc('0x53')]({'where':{'id':_0x39a656[_0x3fbc('0x46')]['id']}})['then'](handleEntityNotFound(_0xa68981,null))[_0x3fbc('0x23')](removeEntity(_0xa68981,null))[_0x3fbc('0x48')](handleError(_0xa68981,null));};
\ No newline at end of file
+var _0x7c0c=['../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','count','limit','json','apply','save','then','get','Metrics','UserProfileResource','destroy','error','name','send','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','sort','where','pick','filter','type','key','field','merge','options','AnalyticMetric','includeAll','include','findAll','rows','show','rawAttributes','find','catch','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service'];(function(_0x26279c,_0x96f5b2){var _0x19bf71=function(_0x57c63d){while(--_0x57c63d){_0x26279c['push'](_0x26279c['shift']());}};_0x19bf71(++_0x96f5b2);}(_0x7c0c,0xd8));var _0xc7c0=function(_0x1ef911,_0x32a38b){_0x1ef911=_0x1ef911-0x0;var _0x5297f4=_0x7c0c[_0x1ef911];return _0x5297f4;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xc7c0('0x0'));var zipdir=require(_0xc7c0('0x1'));var jsonpatch=require(_0xc7c0('0x2'));var rp=require(_0xc7c0('0x3'));var moment=require('moment');var BPromise=require(_0xc7c0('0x4'));var Mustache=require(_0xc7c0('0x5'));var util=require(_0xc7c0('0x6'));var path=require(_0xc7c0('0x7'));var sox=require(_0xc7c0('0x8'));var csv=require(_0xc7c0('0x9'));var ejs=require(_0xc7c0('0xa'));var fs=require('fs');var _=require(_0xc7c0('0xb'));var squel=require(_0xc7c0('0xc'));var crypto=require('crypto');var jsforce=require(_0xc7c0('0xd'));var deskjs=require(_0xc7c0('0xe'));var toCsv=require('to-csv');var querystring=require(_0xc7c0('0xf'));var Papa=require(_0xc7c0('0x10'));var Redis=require('ioredis');var authService=require(_0xc7c0('0x11'));var qs=require(_0xc7c0('0x12'));var hardwareService=require(_0xc7c0('0x13'));var logger=require(_0xc7c0('0x14'))(_0xc7c0('0x15'));var utils=require(_0xc7c0('0x16'));var config=require(_0xc7c0('0x17'));var db=require(_0xc7c0('0x18'))['db'];function respondWithStatusCode(_0x509a29,_0x285e9c){_0x285e9c=_0x285e9c||0xcc;return function(_0xd71a6){if(_0xd71a6){return _0x509a29[_0xc7c0('0x19')](_0x285e9c);}return _0x509a29[_0xc7c0('0x1a')](_0x285e9c)['end']();};}function respondWithResult(_0x50de88,_0x470891){_0x470891=_0x470891||0xc8;return function(_0x3d7cab){if(_0x3d7cab){return _0x50de88[_0xc7c0('0x1a')](_0x470891)['json'](_0x3d7cab);}};}function respondWithFilteredResult(_0x1d1e93,_0x27aaaf){return function(_0x1ea359){if(_0x1ea359){var _0x5a11d7=_0x1ea359[_0xc7c0('0x1b')],_0x324f03=_0x27aaaf['offset'],_0x61bdf9=_0x27aaaf['offset']+_0x27aaaf[_0xc7c0('0x1c')],_0x1904c2;if(_0x61bdf9>=_0x5a11d7){_0x61bdf9=_0x5a11d7;_0x1904c2=0xc8;}else{_0x1904c2=0xce;}_0x1d1e93[_0xc7c0('0x1a')](_0x1904c2);return _0x1d1e93['set']('Content-Range',_0x324f03+'-'+_0x61bdf9+'/'+_0x5a11d7)[_0xc7c0('0x1d')](_0x1ea359);}return null;};}function patchUpdates(_0x2cec4c){return function(_0x3e1c2b){try{jsonpatch[_0xc7c0('0x1e')](_0x3e1c2b,_0x2cec4c,!![]);}catch(_0x2330b4){return BPromise['reject'](_0x2330b4);}return _0x3e1c2b[_0xc7c0('0x1f')]();};}function saveUpdates(_0x39d14b,_0x5a2e11){return function(_0xaaf6c4){if(_0xaaf6c4){return _0xaaf6c4['update'](_0x39d14b)[_0xc7c0('0x20')](function(_0x3c444c){return _0x3c444c;});}return null;};}function removeEntity(_0x4563e5,_0x3da568){return function(_0x28bab2){if(_0x28bab2){return _0x28bab2['destroy']()[_0xc7c0('0x20')](function(){var _0x1f5b4e=_0x28bab2[_0xc7c0('0x21')]({'plain':!![]});var _0x267cca=_0xc7c0('0x22');return db[_0xc7c0('0x23')][_0xc7c0('0x24')]({'where':{'type':_0x267cca,'resourceId':_0x1f5b4e['id']}})[_0xc7c0('0x20')](function(){return _0x28bab2;});})[_0xc7c0('0x20')](function(){_0x4563e5['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a48a9,_0x3eda37){return function(_0x4d2712){if(!_0x4d2712){_0x3a48a9['sendStatus'](0x194);}return _0x4d2712;};}function handleError(_0x56afb6,_0x57d900){_0x57d900=_0x57d900||0x1f4;return function(_0x57e0fe){logger[_0xc7c0('0x25')](_0x57e0fe['stack']);if(_0x57e0fe['name']){delete _0x57e0fe[_0xc7c0('0x26')];}_0x56afb6[_0xc7c0('0x1a')](_0x57d900)[_0xc7c0('0x27')](_0x57e0fe);};}exports['index']=function(_0x7e4a9f,_0x485f10){var _0x572332={},_0x3ed0d6={},_0x3d95dd={'count':0x0,'rows':[]};var _0x3786b4=db['AnalyticMetric']['rawAttributes'];_0x3ed0d6[_0xc7c0('0x28')]=_[_0xc7c0('0x29')](_0x3786b4);_0x3ed0d6[_0xc7c0('0x2a')]=_['keys'](_0x7e4a9f[_0xc7c0('0x2a')]);_0x3ed0d6[_0xc7c0('0x2b')]=_[_0xc7c0('0x2c')](_0x3ed0d6[_0xc7c0('0x28')],_0x3ed0d6[_0xc7c0('0x2a')]);_0x572332[_0xc7c0('0x2d')]=_[_0xc7c0('0x2c')](_0x3ed0d6[_0xc7c0('0x28')],qs[_0xc7c0('0x2e')](_0x7e4a9f[_0xc7c0('0x2a')][_0xc7c0('0x2e')]));_0x572332[_0xc7c0('0x2d')]=_0x572332['attributes'][_0xc7c0('0x2f')]?_0x572332[_0xc7c0('0x2d')]:_0x3ed0d6[_0xc7c0('0x28')];if(!_0x7e4a9f[_0xc7c0('0x2a')][_0xc7c0('0x30')](_0xc7c0('0x31'))){_0x572332[_0xc7c0('0x1c')]=qs[_0xc7c0('0x1c')](_0x7e4a9f['query'][_0xc7c0('0x1c')]);_0x572332[_0xc7c0('0x32')]=qs[_0xc7c0('0x32')](_0x7e4a9f[_0xc7c0('0x2a')][_0xc7c0('0x32')]);}_0x572332['order']=qs[_0xc7c0('0x33')](_0x7e4a9f[_0xc7c0('0x2a')]['sort']);_0x572332[_0xc7c0('0x34')]=qs[_0xc7c0('0x2b')](_[_0xc7c0('0x35')](_0x7e4a9f[_0xc7c0('0x2a')],_0x3ed0d6['filters']));if(_0x7e4a9f[_0xc7c0('0x2a')][_0xc7c0('0x36')]){_0x572332[_0xc7c0('0x34')]=_['merge'](_0x572332[_0xc7c0('0x34')],{'$or':_['map'](_0x3786b4,function(_0x232d85){if(_0x232d85[_0xc7c0('0x37')][_0xc7c0('0x38')]!=='VIRTUAL'){var _0x39b56a={};_0x39b56a[_0x232d85[_0xc7c0('0x39')]]={'$like':'%'+_0x7e4a9f[_0xc7c0('0x2a')]['filter']+'%'};return _0x39b56a;}})});}_0x572332=_[_0xc7c0('0x3a')]({},_0x572332,_0x7e4a9f[_0xc7c0('0x3b')]);var _0x2b761d={'where':_0x572332[_0xc7c0('0x34')]};return db[_0xc7c0('0x3c')][_0xc7c0('0x1b')](_0x2b761d)[_0xc7c0('0x20')](function(_0x4b955a){_0x3d95dd[_0xc7c0('0x1b')]=_0x4b955a;if(_0x7e4a9f[_0xc7c0('0x2a')][_0xc7c0('0x3d')]){_0x572332[_0xc7c0('0x3e')]=[{'all':!![]}];}return db[_0xc7c0('0x3c')][_0xc7c0('0x3f')](_0x572332);})[_0xc7c0('0x20')](function(_0x323ac7){_0x3d95dd[_0xc7c0('0x40')]=_0x323ac7;return _0x3d95dd;})[_0xc7c0('0x20')](respondWithFilteredResult(_0x485f10,_0x572332))['catch'](handleError(_0x485f10,null));};exports[_0xc7c0('0x41')]=function(_0x119de8,_0x99c3a5){var _0x487ffe={'raw':!![],'where':{'id':_0x119de8['params']['id']}},_0x485112={};_0x485112['model']=_[_0xc7c0('0x29')](db['AnalyticMetric'][_0xc7c0('0x42')]);_0x485112[_0xc7c0('0x2a')]=_[_0xc7c0('0x29')](_0x119de8[_0xc7c0('0x2a')]);_0x485112[_0xc7c0('0x2b')]=_[_0xc7c0('0x2c')](_0x485112[_0xc7c0('0x28')],_0x485112[_0xc7c0('0x2a')]);_0x487ffe['attributes']=_[_0xc7c0('0x2c')](_0x485112[_0xc7c0('0x28')],qs[_0xc7c0('0x2e')](_0x119de8[_0xc7c0('0x2a')][_0xc7c0('0x2e')]));_0x487ffe['attributes']=_0x487ffe[_0xc7c0('0x2d')][_0xc7c0('0x2f')]?_0x487ffe[_0xc7c0('0x2d')]:_0x485112[_0xc7c0('0x28')];if(_0x119de8[_0xc7c0('0x2a')][_0xc7c0('0x3d')]){_0x487ffe['include']=[{'all':!![]}];}_0x487ffe=_['merge']({},_0x487ffe,_0x119de8['options']);return db[_0xc7c0('0x3c')][_0xc7c0('0x43')](_0x487ffe)['then'](handleEntityNotFound(_0x99c3a5,null))[_0xc7c0('0x20')](respondWithResult(_0x99c3a5,null))[_0xc7c0('0x44')](handleError(_0x99c3a5,null));};exports['create']=function(_0x2a57c9,_0x24f98b){return db[_0xc7c0('0x3c')][_0xc7c0('0x45')](_0x2a57c9[_0xc7c0('0x46')],{})[_0xc7c0('0x20')](function(_0x46f1b2){var _0x27bb6d=_0x2a57c9[_0xc7c0('0x47')][_0xc7c0('0x21')]({'plain':!![]});if(!_0x27bb6d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x27bb6d[_0xc7c0('0x48')]===_0xc7c0('0x47')){var _0xd2fba=_0x46f1b2['get']({'plain':!![]});var _0x2223ac='Metrics';return db[_0xc7c0('0x49')][_0xc7c0('0x43')]({'where':{'name':_0x2223ac,'userProfileId':_0x27bb6d[_0xc7c0('0x4a')]},'raw':!![]})[_0xc7c0('0x20')](function(_0x48624f){if(_0x48624f&&_0x48624f[_0xc7c0('0x4b')]===0x0){return db[_0xc7c0('0x23')][_0xc7c0('0x45')]({'name':_0xd2fba[_0xc7c0('0x26')],'resourceId':_0xd2fba['id'],'type':_0x48624f[_0xc7c0('0x26')],'sectionId':_0x48624f['id']},{})['then'](function(){return _0x46f1b2;});}else{return _0x46f1b2;}})['catch'](function(_0x2ca7d3){logger['error'](_0xc7c0('0x4c'),_0x2ca7d3);throw _0x2ca7d3;});}return _0x46f1b2;})[_0xc7c0('0x20')](respondWithResult(_0x24f98b,0xc9))[_0xc7c0('0x44')](handleError(_0x24f98b,null));};exports['update']=function(_0x357076,_0x501e45){if(_0x357076['body']['id']){delete _0x357076['body']['id'];}return db[_0xc7c0('0x3c')][_0xc7c0('0x43')]({'where':{'id':_0x357076[_0xc7c0('0x4d')]['id']}})[_0xc7c0('0x20')](handleEntityNotFound(_0x501e45,null))['then'](saveUpdates(_0x357076['body'],null))[_0xc7c0('0x20')](respondWithResult(_0x501e45,null))[_0xc7c0('0x44')](handleError(_0x501e45,null));};exports['destroy']=function(_0x4cdc53,_0x3fd0e0){return db[_0xc7c0('0x3c')][_0xc7c0('0x43')]({'where':{'id':_0x4cdc53['params']['id']}})['then'](handleEntityNotFound(_0x3fd0e0,null))[_0xc7c0('0x20')](removeEntity(_0x3fd0e0,null))[_0xc7c0('0x44')](handleError(_0x3fd0e0,null));};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js
index baee670..f50e8bf 100644
--- a/server/api/analyticMetric/analyticMetric.model.js
+++ b/server/api/analyticMetric/analyticMetric.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf74c=['lodash','util','api','bluebird','request-promise','rimraf','../../config/environment','./analyticMetric.attributes','define','AnalyticMetric','analytics_metrics'];(function(_0x4f9b18,_0x2cb5ca){var _0x29f20c=function(_0x268b3d){while(--_0x268b3d){_0x4f9b18['push'](_0x4f9b18['shift']());}};_0x29f20c(++_0x2cb5ca);}(_0xf74c,0x129));var _0xcf74=function(_0x5d02aa,_0x284f04){_0x5d02aa=_0x5d02aa-0x0;var _0xcb4e0b=_0xf74c[_0x5d02aa];return _0xcb4e0b;};'use strict';var _=require(_0xcf74('0x0'));var util=require(_0xcf74('0x1'));var logger=require('../../config/logger')(_0xcf74('0x2'));var moment=require('moment');var BPromise=require(_0xcf74('0x3'));var rp=require(_0xcf74('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xcf74('0x5'));var config=require(_0xcf74('0x6'));var attributes=require(_0xcf74('0x7'));module['exports']=function(_0x30f51f,_0x156f91){return _0x30f51f[_0xcf74('0x8')](_0xcf74('0x9'),attributes,{'tableName':_0xcf74('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb561=['./analyticMetric.attributes','exports','define','AnalyticMetric','lodash','util','api','moment','request-promise','rimraf','../../config/environment'];(function(_0x421b78,_0x1ac6cf){var _0xad0c0a=function(_0x31be8b){while(--_0x31be8b){_0x421b78['push'](_0x421b78['shift']());}};_0xad0c0a(++_0x1ac6cf);}(_0xb561,0x1e8));var _0x1b56=function(_0x189ac2,_0x5544fb){_0x189ac2=_0x189ac2-0x0;var _0x35364c=_0xb561[_0x189ac2];return _0x35364c;};'use strict';var _=require(_0x1b56('0x0'));var util=require(_0x1b56('0x1'));var logger=require('../../config/logger')(_0x1b56('0x2'));var moment=require(_0x1b56('0x3'));var BPromise=require('bluebird');var rp=require(_0x1b56('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1b56('0x5'));var config=require(_0x1b56('0x6'));var attributes=require(_0x1b56('0x7'));module[_0x1b56('0x8')]=function(_0x3644a8,_0x3804bd){return _0x3644a8[_0x1b56('0x9')](_0x1b56('0xa'),attributes,{'tableName':'analytics_metrics','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.rpc.js b/server/api/analyticMetric/analyticMetric.rpc.js
index 3940265..34c5fed 100644
--- a/server/api/analyticMetric/analyticMetric.rpc.js
+++ b/server/api/analyticMetric/analyticMetric.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1c42=['debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','code','message','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent'];(function(_0x19b3f9,_0xade753){var _0x18c3f6=function(_0x21439f){while(--_0x21439f){_0x19b3f9['push'](_0x19b3f9['shift']());}};_0x18c3f6(++_0xade753);}(_0x1c42,0x13a));var _0x21c4=function(_0x2a5066,_0x592368){_0x2a5066=_0x2a5066-0x0;var _0x16ecb5=_0x1c42[_0x2a5066];return _0x16ecb5;};'use strict';var _=require('lodash');var util=require(_0x21c4('0x0'));var moment=require(_0x21c4('0x1'));var BPromise=require(_0x21c4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x21c4('0x3'));var db=require(_0x21c4('0x4'))['db'];var utils=require(_0x21c4('0x5'));var logger=require(_0x21c4('0x6'))(_0x21c4('0x7'));var config=require(_0x21c4('0x8'));var jayson=require(_0x21c4('0x9'));var client=jayson[_0x21c4('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x247ec9,_0x472df1,_0x54b2ea){return new BPromise(function(_0x184e75,_0x57e04f){return client[_0x21c4('0xb')](_0x247ec9,_0x54b2ea)[_0x21c4('0xc')](function(_0x1fac06){logger[_0x21c4('0xd')](_0x21c4('0xe'),_0x472df1,_0x21c4('0xf'));logger[_0x21c4('0x10')](_0x21c4('0x11'),_0x472df1,_0x21c4('0xf'),JSON['stringify'](_0x1fac06));if(_0x1fac06[_0x21c4('0x12')]){if(_0x1fac06['error'][_0x21c4('0x13')]===0x1f4){logger['error'](_0x21c4('0xe'),_0x472df1,_0x1fac06[_0x21c4('0x12')][_0x21c4('0x14')]);return _0x57e04f(_0x1fac06[_0x21c4('0x12')][_0x21c4('0x14')]);}logger[_0x21c4('0x12')](_0x21c4('0xe'),_0x472df1,_0x1fac06[_0x21c4('0x12')][_0x21c4('0x14')]);return _0x184e75(_0x1fac06[_0x21c4('0x12')][_0x21c4('0x14')]);}else{logger[_0x21c4('0xd')](_0x21c4('0xe'),_0x472df1,'request\x20sent');_0x184e75(_0x1fac06['result'][_0x21c4('0x14')]);}})[_0x21c4('0x15')](function(_0x230dce){logger[_0x21c4('0x12')](_0x21c4('0xe'),_0x472df1,_0x230dce);_0x57e04f(_0x230dce);});});}
\ No newline at end of file
+var _0x4ef1=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','AnalyticMetric,\x20%s,\x20%s','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','info','catch','lodash','util','bluebird','randomstring','ioredis'];(function(_0x277280,_0x2b812a){var _0x4009a6=function(_0x1655eb){while(--_0x1655eb){_0x277280['push'](_0x277280['shift']());}};_0x4009a6(++_0x2b812a);}(_0x4ef1,0xeb));var _0x14ef=function(_0x1658ad,_0x487c1f){_0x1658ad=_0x1658ad-0x0;var _0x3b1927=_0x4ef1[_0x1658ad];return _0x3b1927;};'use strict';var _=require(_0x14ef('0x0'));var util=require(_0x14ef('0x1'));var moment=require('moment');var BPromise=require(_0x14ef('0x2'));var rs=require(_0x14ef('0x3'));var fs=require('fs');var Redis=require(_0x14ef('0x4'));var db=require(_0x14ef('0x5'))['db'];var utils=require(_0x14ef('0x6'));var logger=require(_0x14ef('0x7'))(_0x14ef('0x8'));var config=require(_0x14ef('0x9'));var jayson=require(_0x14ef('0xa'));var client=jayson[_0x14ef('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x261fa2,_0x2dc335,_0x5b75ad){return new BPromise(function(_0x4175e7,_0x2ab217){return client[_0x14ef('0xc')](_0x261fa2,_0x5b75ad)[_0x14ef('0xd')](function(_0x17acc1){logger['info'](_0x14ef('0xe'),_0x2dc335,'request\x20sent');logger[_0x14ef('0xf')](_0x14ef('0x10'),_0x2dc335,_0x14ef('0x11'),JSON[_0x14ef('0x12')](_0x17acc1));if(_0x17acc1['error']){if(_0x17acc1['error'][_0x14ef('0x13')]===0x1f4){logger[_0x14ef('0x14')]('AnalyticMetric,\x20%s,\x20%s',_0x2dc335,_0x17acc1[_0x14ef('0x14')][_0x14ef('0x15')]);return _0x2ab217(_0x17acc1[_0x14ef('0x14')]['message']);}logger[_0x14ef('0x14')](_0x14ef('0xe'),_0x2dc335,_0x17acc1[_0x14ef('0x14')][_0x14ef('0x15')]);return _0x4175e7(_0x17acc1['error'][_0x14ef('0x15')]);}else{logger[_0x14ef('0x16')](_0x14ef('0xe'),_0x2dc335,_0x14ef('0x11'));_0x4175e7(_0x17acc1['result'][_0x14ef('0x15')]);}})[_0x14ef('0x17')](function(_0x24556b){logger[_0x14ef('0x14')](_0x14ef('0xe'),_0x2dc335,_0x24556b);_0x2ab217(_0x24556b);});});}
\ No newline at end of file
diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js
index 6578bd2..af6bcbd 100644
--- a/server/api/analyticMetric/index.js
+++ b/server/api/analyticMetric/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3423=['../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticMetric.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','exports','path','connect-timeout','express','Router'];(function(_0x2640e4,_0x2a279c){var _0x499187=function(_0x438ab9){while(--_0x438ab9){_0x2640e4['push'](_0x2640e4['shift']());}};_0x499187(++_0x2a279c);}(_0x3423,0x188));var _0x3342=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3423[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3342('0x0'));var timeout=require(_0x3342('0x1'));var express=require(_0x3342('0x2'));var router=express[_0x3342('0x3')]();var auth=require(_0x3342('0x4'));var interaction=require(_0x3342('0x5'));var config=require(_0x3342('0x6'));var controller=require(_0x3342('0x7'));router[_0x3342('0x8')]('/',auth[_0x3342('0x9')](),controller[_0x3342('0xa')]);router[_0x3342('0x8')](_0x3342('0xb'),auth[_0x3342('0x9')](),controller[_0x3342('0xc')]);router[_0x3342('0xd')]('/',auth[_0x3342('0x9')](),controller[_0x3342('0xe')]);router[_0x3342('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x3342('0x10')]);router['delete']('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0x3342('0x11')]=router;
\ No newline at end of file
+var _0x955f=['path','connect-timeout','express','../../components/auth/service','./analyticMetric.controller','isAuthenticated','index','get','show','create','put','/:id','update','delete','exports','multer','util'];(function(_0x9cd4c3,_0x1c9b2c){var _0x4c9025=function(_0x25b3c6){while(--_0x25b3c6){_0x9cd4c3['push'](_0x9cd4c3['shift']());}};_0x4c9025(++_0x1c9b2c);}(_0x955f,0x1eb));var _0xf955=function(_0x5c34c1,_0x14244c){_0x5c34c1=_0x5c34c1-0x0;var _0x2b01d0=_0x955f[_0x5c34c1];return _0x2b01d0;};'use strict';var multer=require(_0xf955('0x0'));var util=require(_0xf955('0x1'));var path=require(_0xf955('0x2'));var timeout=require(_0xf955('0x3'));var express=require(_0xf955('0x4'));var router=express['Router']();var auth=require(_0xf955('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xf955('0x6'));router['get']('/',auth[_0xf955('0x7')](),controller[_0xf955('0x8')]);router[_0xf955('0x9')]('/:id',auth[_0xf955('0x7')](),controller[_0xf955('0xa')]);router['post']('/',auth[_0xf955('0x7')](),controller[_0xf955('0xb')]);router[_0xf955('0xc')](_0xf955('0xd'),auth[_0xf955('0x7')](),controller[_0xf955('0xe')]);router[_0xf955('0xf')]('/:id',auth[_0xf955('0x7')](),controller['destroy']);module[_0xf955('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
index 4b7cfd5..9387fc5 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.attributes.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xef49=['TEXT','sequelize','exports'];(function(_0x393916,_0x3ecad8){var _0x2332bd=function(_0x5c616f){while(--_0x5c616f){_0x393916['push'](_0x393916['shift']());}};_0x2332bd(++_0x3ecad8);}(_0xef49,0xa0));var _0x9ef4=function(_0x13b02f,_0x462a53){_0x13b02f=_0x13b02f-0x0;var _0x12e9a6=_0xef49[_0x13b02f];return _0x12e9a6;};'use strict';var Sequelize=require(_0x9ef4('0x0'));module[_0x9ef4('0x1')]={'tree':{'type':Sequelize[_0x9ef4('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xce50=['sequelize'];(function(_0x2cba68,_0x18e5bd){var _0x6117fb=function(_0x58996c){while(--_0x58996c){_0x2cba68['push'](_0x2cba68['shift']());}};_0x6117fb(++_0x18e5bd);}(_0xce50,0x124));var _0x0ce5=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xce50[_0x138adb];return _0x1b27f2;};'use strict';var Sequelize=require(_0x0ce5('0x0'));module['exports']={'tree':{'type':Sequelize['TEXT'],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js
index 06f98d2..4dd3cbf 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.controller.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd58c=['mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','limit','set','apply','reject','save','update','then','destroy','end','error','index','AnalyticTreeReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','where','pick','filter','merge','map','type','field','options','count','includeAll','include','rows','catch','find','create','body','params','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird'];(function(_0x10a622,_0x1804be){var _0x707210=function(_0x557c30){while(--_0x557c30){_0x10a622['push'](_0x10a622['shift']());}};_0x707210(++_0x1804be);}(_0xd58c,0x158));var _0xcd58=function(_0xc440aa,_0x3fc1af){_0xc440aa=_0xc440aa-0x0;var _0xf69ee9=_0xd58c[_0xc440aa];return _0xf69ee9;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xcd58('0x0'));var rimraf=require(_0xcd58('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xcd58('0x2'));var rp=require(_0xcd58('0x3'));var moment=require(_0xcd58('0x4'));var BPromise=require(_0xcd58('0x5'));var Mustache=require(_0xcd58('0x6'));var util=require(_0xcd58('0x7'));var path=require(_0xcd58('0x8'));var sox=require(_0xcd58('0x9'));var csv=require(_0xcd58('0xa'));var ejs=require(_0xcd58('0xb'));var fs=require('fs');var _=require(_0xcd58('0xc'));var squel=require(_0xcd58('0xd'));var crypto=require(_0xcd58('0xe'));var jsforce=require(_0xcd58('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xcd58('0xa'));var querystring=require(_0xcd58('0x10'));var Papa=require(_0xcd58('0x11'));var Redis=require('ioredis');var authService=require(_0xcd58('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xcd58('0x13'));var logger=require(_0xcd58('0x14'))(_0xcd58('0x15'));var utils=require(_0xcd58('0x16'));var config=require(_0xcd58('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3eef96,_0xdc6765){_0xdc6765=_0xdc6765||0xcc;return function(_0x1efcca){if(_0x1efcca){return _0x3eef96[_0xcd58('0x18')](_0xdc6765);}return _0x3eef96[_0xcd58('0x19')](_0xdc6765)['end']();};}function respondWithResult(_0x3ffcc6,_0x16121a){_0x16121a=_0x16121a||0xc8;return function(_0x319acf){if(_0x319acf){return _0x3ffcc6[_0xcd58('0x19')](_0x16121a)[_0xcd58('0x1a')](_0x319acf);}};}function respondWithFilteredResult(_0x355f3f,_0x5027dd){return function(_0x1ebfa9){if(_0x1ebfa9){var _0x20f95c=_0x1ebfa9['count'],_0x3f1843=_0x5027dd['offset'],_0x6f055d=_0x5027dd['offset']+_0x5027dd[_0xcd58('0x1b')],_0x5466b9;if(_0x6f055d>=_0x20f95c){_0x6f055d=_0x20f95c;_0x5466b9=0xc8;}else{_0x5466b9=0xce;}_0x355f3f[_0xcd58('0x19')](_0x5466b9);return _0x355f3f[_0xcd58('0x1c')]('Content-Range',_0x3f1843+'-'+_0x6f055d+'/'+_0x20f95c)[_0xcd58('0x1a')](_0x1ebfa9);}return null;};}function patchUpdates(_0x55d628){return function(_0x1779f2){try{jsonpatch[_0xcd58('0x1d')](_0x1779f2,_0x55d628,!![]);}catch(_0x18b748){return BPromise[_0xcd58('0x1e')](_0x18b748);}return _0x1779f2[_0xcd58('0x1f')]();};}function saveUpdates(_0x26feb0,_0x59c79f){return function(_0x3481b3){if(_0x3481b3){return _0x3481b3[_0xcd58('0x20')](_0x26feb0)[_0xcd58('0x21')](function(_0x500d1){return _0x500d1;});}return null;};}function removeEntity(_0x5ae322,_0x87e025){return function(_0x3ca6d8){if(_0x3ca6d8){return _0x3ca6d8[_0xcd58('0x22')]()[_0xcd58('0x21')](function(){_0x5ae322[_0xcd58('0x19')](0xcc)[_0xcd58('0x23')]();});}};}function handleEntityNotFound(_0x270e32,_0x35a058){return function(_0x5e3bc2){if(!_0x5e3bc2){_0x270e32[_0xcd58('0x18')](0x194);}return _0x5e3bc2;};}function handleError(_0x31210c,_0x2ba909){_0x2ba909=_0x2ba909||0x1f4;return function(_0x48ab60){logger[_0xcd58('0x24')](_0x48ab60['stack']);if(_0x48ab60['name']){delete _0x48ab60['name'];}_0x31210c[_0xcd58('0x19')](_0x2ba909)['send'](_0x48ab60);};}exports[_0xcd58('0x25')]=function(_0x5c30b9,_0x2e2994){var _0x57de23={},_0x55bfaf={},_0x3ebb16={'count':0x0,'rows':[]};var _0x3800dd=db[_0xcd58('0x26')][_0xcd58('0x27')];_0x55bfaf[_0xcd58('0x28')]=_[_0xcd58('0x29')](_0x3800dd);_0x55bfaf[_0xcd58('0x2a')]=_[_0xcd58('0x29')](_0x5c30b9['query']);_0x55bfaf[_0xcd58('0x2b')]=_[_0xcd58('0x2c')](_0x55bfaf[_0xcd58('0x28')],_0x55bfaf[_0xcd58('0x2a')]);_0x57de23[_0xcd58('0x2d')]=_[_0xcd58('0x2c')](_0x55bfaf['model'],qs[_0xcd58('0x2e')](_0x5c30b9[_0xcd58('0x2a')]['fields']));_0x57de23[_0xcd58('0x2d')]=_0x57de23['attributes'][_0xcd58('0x2f')]?_0x57de23[_0xcd58('0x2d')]:_0x55bfaf[_0xcd58('0x28')];if(!_0x5c30b9[_0xcd58('0x2a')][_0xcd58('0x30')](_0xcd58('0x31'))){_0x57de23[_0xcd58('0x1b')]=qs[_0xcd58('0x1b')](_0x5c30b9['query'][_0xcd58('0x1b')]);_0x57de23['offset']=qs[_0xcd58('0x32')](_0x5c30b9[_0xcd58('0x2a')][_0xcd58('0x32')]);}_0x57de23[_0xcd58('0x33')]=qs[_0xcd58('0x34')](_0x5c30b9['query'][_0xcd58('0x34')]);_0x57de23[_0xcd58('0x35')]=qs[_0xcd58('0x2b')](_[_0xcd58('0x36')](_0x5c30b9[_0xcd58('0x2a')],_0x55bfaf[_0xcd58('0x2b')]));if(_0x5c30b9[_0xcd58('0x2a')][_0xcd58('0x37')]){_0x57de23[_0xcd58('0x35')]=_[_0xcd58('0x38')](_0x57de23[_0xcd58('0x35')],{'$or':_[_0xcd58('0x39')](_0x3800dd,function(_0x4b8538){if(_0x4b8538[_0xcd58('0x3a')]['key']!=='VIRTUAL'){var _0x3dbdad={};_0x3dbdad[_0x4b8538[_0xcd58('0x3b')]]={'$like':'%'+_0x5c30b9[_0xcd58('0x2a')][_0xcd58('0x37')]+'%'};return _0x3dbdad;}})});}_0x57de23=_[_0xcd58('0x38')]({},_0x57de23,_0x5c30b9[_0xcd58('0x3c')]);var _0x33d245={'where':_0x57de23[_0xcd58('0x35')]};return db[_0xcd58('0x26')][_0xcd58('0x3d')](_0x33d245)['then'](function(_0x37b758){_0x3ebb16[_0xcd58('0x3d')]=_0x37b758;if(_0x5c30b9['query'][_0xcd58('0x3e')]){_0x57de23[_0xcd58('0x3f')]=[{'all':!![]}];}return db['AnalyticTreeReport']['findAll'](_0x57de23);})[_0xcd58('0x21')](function(_0x530c9c){_0x3ebb16[_0xcd58('0x40')]=_0x530c9c;return _0x3ebb16;})[_0xcd58('0x21')](respondWithFilteredResult(_0x2e2994,_0x57de23))[_0xcd58('0x41')](handleError(_0x2e2994,null));};exports['show']=function(_0x23b65a,_0x4073a1){var _0xe3f95d={'raw':!![],'where':{'id':_0x23b65a['params']['id']}},_0x17c3fb={};_0x17c3fb[_0xcd58('0x28')]=_['keys'](db[_0xcd58('0x26')][_0xcd58('0x27')]);_0x17c3fb['query']=_[_0xcd58('0x29')](_0x23b65a[_0xcd58('0x2a')]);_0x17c3fb['filters']=_['intersection'](_0x17c3fb['model'],_0x17c3fb[_0xcd58('0x2a')]);_0xe3f95d[_0xcd58('0x2d')]=_[_0xcd58('0x2c')](_0x17c3fb[_0xcd58('0x28')],qs[_0xcd58('0x2e')](_0x23b65a[_0xcd58('0x2a')]['fields']));_0xe3f95d[_0xcd58('0x2d')]=_0xe3f95d['attributes'][_0xcd58('0x2f')]?_0xe3f95d['attributes']:_0x17c3fb[_0xcd58('0x28')];if(_0x23b65a['query']['includeAll']){_0xe3f95d[_0xcd58('0x3f')]=[{'all':!![]}];}_0xe3f95d=_[_0xcd58('0x38')]({},_0xe3f95d,_0x23b65a[_0xcd58('0x3c')]);return db[_0xcd58('0x26')][_0xcd58('0x42')](_0xe3f95d)['then'](handleEntityNotFound(_0x4073a1,null))[_0xcd58('0x21')](respondWithResult(_0x4073a1,null))[_0xcd58('0x41')](handleError(_0x4073a1,null));};exports[_0xcd58('0x43')]=function(_0x5308e4,_0x23ef03){return db[_0xcd58('0x26')][_0xcd58('0x43')](_0x5308e4[_0xcd58('0x44')],{})[_0xcd58('0x21')](respondWithResult(_0x23ef03,0xc9))[_0xcd58('0x41')](handleError(_0x23ef03,null));};exports[_0xcd58('0x20')]=function(_0x383ecf,_0x39b845){if(_0x383ecf[_0xcd58('0x44')]['id']){delete _0x383ecf[_0xcd58('0x44')]['id'];}return db[_0xcd58('0x26')][_0xcd58('0x42')]({'where':{'id':_0x383ecf[_0xcd58('0x45')]['id']}})[_0xcd58('0x21')](handleEntityNotFound(_0x39b845,null))['then'](saveUpdates(_0x383ecf[_0xcd58('0x44')],null))[_0xcd58('0x21')](respondWithResult(_0x39b845,null))['catch'](handleError(_0x39b845,null));};exports['destroy']=function(_0x21e799,_0x3659b5){return db[_0xcd58('0x26')][_0xcd58('0x42')]({'where':{'id':_0x21e799['params']['id']}})['then'](handleEntityNotFound(_0x3659b5,null))[_0xcd58('0x21')](removeEntity(_0x3659b5,null))[_0xcd58('0x41')](handleError(_0x3659b5,null));};
\ No newline at end of file
+var _0x3a8b=['include','findAll','show','params','find','catch','create','update','body','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','end','status','json','count','offset','Content-Range','apply','reject','save','then','destroy','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','map','type','VIRTUAL','options','AnalyticTreeReport','includeAll'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x3a8b,0x1b3));var _0xb3a8=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x3a8b[_0x122ef9];return _0x42fba0;};'use strict';var pdf=require(_0xb3a8('0x0'));var emlformat=require(_0xb3a8('0x1'));var rimraf=require(_0xb3a8('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb3a8('0x3'));var rp=require(_0xb3a8('0x4'));var moment=require(_0xb3a8('0x5'));var BPromise=require(_0xb3a8('0x6'));var Mustache=require(_0xb3a8('0x7'));var util=require(_0xb3a8('0x8'));var path=require(_0xb3a8('0x9'));var sox=require(_0xb3a8('0xa'));var csv=require('to-csv');var ejs=require(_0xb3a8('0xb'));var fs=require('fs');var _=require(_0xb3a8('0xc'));var squel=require(_0xb3a8('0xd'));var crypto=require(_0xb3a8('0xe'));var jsforce=require(_0xb3a8('0xf'));var deskjs=require(_0xb3a8('0x10'));var toCsv=require('to-csv');var querystring=require(_0xb3a8('0x11'));var Papa=require('papaparse');var Redis=require(_0xb3a8('0x12'));var authService=require(_0xb3a8('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xb3a8('0x14'));var logger=require('../../config/logger')(_0xb3a8('0x15'));var utils=require(_0xb3a8('0x16'));var config=require(_0xb3a8('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x45c94e,_0x3c1bb1){_0x3c1bb1=_0x3c1bb1||0xcc;return function(_0x1d3594){if(_0x1d3594){return _0x45c94e[_0xb3a8('0x18')](_0x3c1bb1);}return _0x45c94e['status'](_0x3c1bb1)[_0xb3a8('0x19')]();};}function respondWithResult(_0x1fbdc1,_0x11642d){_0x11642d=_0x11642d||0xc8;return function(_0xd3002){if(_0xd3002){return _0x1fbdc1[_0xb3a8('0x1a')](_0x11642d)[_0xb3a8('0x1b')](_0xd3002);}};}function respondWithFilteredResult(_0x207060,_0x5c06f0){return function(_0x4ccd01){if(_0x4ccd01){var _0x49db46=_0x4ccd01[_0xb3a8('0x1c')],_0x2a2ee5=_0x5c06f0[_0xb3a8('0x1d')],_0x3d4774=_0x5c06f0[_0xb3a8('0x1d')]+_0x5c06f0['limit'],_0x254877;if(_0x3d4774>=_0x49db46){_0x3d4774=_0x49db46;_0x254877=0xc8;}else{_0x254877=0xce;}_0x207060[_0xb3a8('0x1a')](_0x254877);return _0x207060['set'](_0xb3a8('0x1e'),_0x2a2ee5+'-'+_0x3d4774+'/'+_0x49db46)[_0xb3a8('0x1b')](_0x4ccd01);}return null;};}function patchUpdates(_0x459a66){return function(_0x47af76){try{jsonpatch[_0xb3a8('0x1f')](_0x47af76,_0x459a66,!![]);}catch(_0x39aac5){return BPromise[_0xb3a8('0x20')](_0x39aac5);}return _0x47af76[_0xb3a8('0x21')]();};}function saveUpdates(_0x1299be,_0x45154f){return function(_0x36c2f1){if(_0x36c2f1){return _0x36c2f1['update'](_0x1299be)[_0xb3a8('0x22')](function(_0x4b6c69){return _0x4b6c69;});}return null;};}function removeEntity(_0x3431aa,_0x1ee5a5){return function(_0x7a746b){if(_0x7a746b){return _0x7a746b[_0xb3a8('0x23')]()['then'](function(){_0x3431aa['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2b00dd,_0x31f631){return function(_0x2747d8){if(!_0x2747d8){_0x2b00dd[_0xb3a8('0x18')](0x194);}return _0x2747d8;};}function handleError(_0x7caec9,_0x1cb322){_0x1cb322=_0x1cb322||0x1f4;return function(_0x3dce30){logger['error'](_0x3dce30['stack']);if(_0x3dce30[_0xb3a8('0x24')]){delete _0x3dce30['name'];}_0x7caec9[_0xb3a8('0x1a')](_0x1cb322)[_0xb3a8('0x25')](_0x3dce30);};}exports[_0xb3a8('0x26')]=function(_0x414f08,_0xaaf82c){var _0x1a6789={},_0x391ca8={},_0x3b7a4e={'count':0x0,'rows':[]};var _0x115bd6=db['AnalyticTreeReport'][_0xb3a8('0x27')];_0x391ca8[_0xb3a8('0x28')]=_[_0xb3a8('0x29')](_0x115bd6);_0x391ca8[_0xb3a8('0x2a')]=_['keys'](_0x414f08[_0xb3a8('0x2a')]);_0x391ca8[_0xb3a8('0x2b')]=_[_0xb3a8('0x2c')](_0x391ca8[_0xb3a8('0x28')],_0x391ca8[_0xb3a8('0x2a')]);_0x1a6789[_0xb3a8('0x2d')]=_[_0xb3a8('0x2c')](_0x391ca8['model'],qs[_0xb3a8('0x2e')](_0x414f08[_0xb3a8('0x2a')]['fields']));_0x1a6789[_0xb3a8('0x2d')]=_0x1a6789['attributes'][_0xb3a8('0x2f')]?_0x1a6789[_0xb3a8('0x2d')]:_0x391ca8[_0xb3a8('0x28')];if(!_0x414f08[_0xb3a8('0x2a')][_0xb3a8('0x30')](_0xb3a8('0x31'))){_0x1a6789[_0xb3a8('0x32')]=qs[_0xb3a8('0x32')](_0x414f08['query'][_0xb3a8('0x32')]);_0x1a6789[_0xb3a8('0x1d')]=qs[_0xb3a8('0x1d')](_0x414f08[_0xb3a8('0x2a')][_0xb3a8('0x1d')]);}_0x1a6789['order']=qs[_0xb3a8('0x33')](_0x414f08[_0xb3a8('0x2a')][_0xb3a8('0x33')]);_0x1a6789[_0xb3a8('0x34')]=qs[_0xb3a8('0x2b')](_[_0xb3a8('0x35')](_0x414f08[_0xb3a8('0x2a')],_0x391ca8['filters']));if(_0x414f08[_0xb3a8('0x2a')][_0xb3a8('0x36')]){_0x1a6789[_0xb3a8('0x34')]=_[_0xb3a8('0x37')](_0x1a6789[_0xb3a8('0x34')],{'$or':_[_0xb3a8('0x38')](_0x115bd6,function(_0x53fa49){if(_0x53fa49[_0xb3a8('0x39')]['key']!==_0xb3a8('0x3a')){var _0x53f184={};_0x53f184[_0x53fa49['field']]={'$like':'%'+_0x414f08[_0xb3a8('0x2a')][_0xb3a8('0x36')]+'%'};return _0x53f184;}})});}_0x1a6789=_[_0xb3a8('0x37')]({},_0x1a6789,_0x414f08[_0xb3a8('0x3b')]);var _0x1b62e7={'where':_0x1a6789['where']};return db[_0xb3a8('0x3c')][_0xb3a8('0x1c')](_0x1b62e7)[_0xb3a8('0x22')](function(_0xebd3d4){_0x3b7a4e['count']=_0xebd3d4;if(_0x414f08['query'][_0xb3a8('0x3d')]){_0x1a6789[_0xb3a8('0x3e')]=[{'all':!![]}];}return db[_0xb3a8('0x3c')][_0xb3a8('0x3f')](_0x1a6789);})['then'](function(_0x553225){_0x3b7a4e['rows']=_0x553225;return _0x3b7a4e;})[_0xb3a8('0x22')](respondWithFilteredResult(_0xaaf82c,_0x1a6789))['catch'](handleError(_0xaaf82c,null));};exports[_0xb3a8('0x40')]=function(_0x486f9b,_0x1770f5){var _0x17fe2b={'raw':!![],'where':{'id':_0x486f9b[_0xb3a8('0x41')]['id']}},_0x1d6e20={};_0x1d6e20['model']=_[_0xb3a8('0x29')](db['AnalyticTreeReport'][_0xb3a8('0x27')]);_0x1d6e20['query']=_[_0xb3a8('0x29')](_0x486f9b[_0xb3a8('0x2a')]);_0x1d6e20[_0xb3a8('0x2b')]=_[_0xb3a8('0x2c')](_0x1d6e20['model'],_0x1d6e20[_0xb3a8('0x2a')]);_0x17fe2b['attributes']=_['intersection'](_0x1d6e20['model'],qs[_0xb3a8('0x2e')](_0x486f9b[_0xb3a8('0x2a')][_0xb3a8('0x2e')]));_0x17fe2b['attributes']=_0x17fe2b[_0xb3a8('0x2d')][_0xb3a8('0x2f')]?_0x17fe2b['attributes']:_0x1d6e20['model'];if(_0x486f9b[_0xb3a8('0x2a')][_0xb3a8('0x3d')]){_0x17fe2b[_0xb3a8('0x3e')]=[{'all':!![]}];}_0x17fe2b=_[_0xb3a8('0x37')]({},_0x17fe2b,_0x486f9b[_0xb3a8('0x3b')]);return db[_0xb3a8('0x3c')][_0xb3a8('0x42')](_0x17fe2b)[_0xb3a8('0x22')](handleEntityNotFound(_0x1770f5,null))[_0xb3a8('0x22')](respondWithResult(_0x1770f5,null))[_0xb3a8('0x43')](handleError(_0x1770f5,null));};exports[_0xb3a8('0x44')]=function(_0x5ca02a,_0x4b14a6){return db['AnalyticTreeReport'][_0xb3a8('0x44')](_0x5ca02a['body'],{})[_0xb3a8('0x22')](respondWithResult(_0x4b14a6,0xc9))['catch'](handleError(_0x4b14a6,null));};exports[_0xb3a8('0x45')]=function(_0x43b4d1,_0x39c369){if(_0x43b4d1[_0xb3a8('0x46')]['id']){delete _0x43b4d1[_0xb3a8('0x46')]['id'];}return db[_0xb3a8('0x3c')][_0xb3a8('0x42')]({'where':{'id':_0x43b4d1[_0xb3a8('0x41')]['id']}})[_0xb3a8('0x22')](handleEntityNotFound(_0x39c369,null))[_0xb3a8('0x22')](saveUpdates(_0x43b4d1[_0xb3a8('0x46')],null))['then'](respondWithResult(_0x39c369,null))['catch'](handleError(_0x39c369,null));};exports[_0xb3a8('0x23')]=function(_0x359b28,_0x2b7607){return db['AnalyticTreeReport']['find']({'where':{'id':_0x359b28[_0xb3a8('0x41')]['id']}})[_0xb3a8('0x22')](handleEntityNotFound(_0x2b7607,null))[_0xb3a8('0x22')](removeEntity(_0x2b7607,null))[_0xb3a8('0x43')](handleError(_0x2b7607,null));};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js
index 21f151c..1853907 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.model.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb41f=['bluebird','request-promise','rimraf','./analyticTreeReport.attributes','exports','define','AnalyticTreeReport','analytics_report_trees','lodash','util','../../config/logger','api'];(function(_0x1fc1f9,_0x454fb2){var _0x4987ca=function(_0x5e90dd){while(--_0x5e90dd){_0x1fc1f9['push'](_0x1fc1f9['shift']());}};_0x4987ca(++_0x454fb2);}(_0xb41f,0x104));var _0xfb41=function(_0x202d7b,_0x2903e5){_0x202d7b=_0x202d7b-0x0;var _0x74ccee=_0xb41f[_0x202d7b];return _0x74ccee;};'use strict';var _=require(_0xfb41('0x0'));var util=require(_0xfb41('0x1'));var logger=require(_0xfb41('0x2'))(_0xfb41('0x3'));var moment=require('moment');var BPromise=require(_0xfb41('0x4'));var rp=require(_0xfb41('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfb41('0x6'));var config=require('../../config/environment');var attributes=require(_0xfb41('0x7'));module[_0xfb41('0x8')]=function(_0x588de2,_0x556c40){return _0x588de2[_0xfb41('0x9')](_0xfb41('0xa'),attributes,{'tableName':_0xfb41('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf398=['lodash','util','api','moment','bluebird','request-promise','rimraf','../../config/environment','./analyticTreeReport.attributes','exports','define'];(function(_0x1828d4,_0x538df4){var _0x3665c8=function(_0x5f03fe){while(--_0x5f03fe){_0x1828d4['push'](_0x1828d4['shift']());}};_0x3665c8(++_0x538df4);}(_0xf398,0x181));var _0x8f39=function(_0x339a5f,_0x29fdad){_0x339a5f=_0x339a5f-0x0;var _0x234fb0=_0xf398[_0x339a5f];return _0x234fb0;};'use strict';var _=require(_0x8f39('0x0'));var util=require(_0x8f39('0x1'));var logger=require('../../config/logger')(_0x8f39('0x2'));var moment=require(_0x8f39('0x3'));var BPromise=require(_0x8f39('0x4'));var rp=require(_0x8f39('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x8f39('0x6'));var config=require(_0x8f39('0x7'));var attributes=require(_0x8f39('0x8'));module[_0x8f39('0x9')]=function(_0x1ffbf2,_0x4fc5b3){return _0x1ffbf2[_0x8f39('0xa')]('AnalyticTreeReport',attributes,{'tableName':'analytics_report_trees','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.rpc.js b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
index 059a3b5..35f09eb 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.rpc.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4fda=['../../config/logger','../../config/environment','http','request','then','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','error','code','AnalyticTreeReport,\x20%s,\x20%s','message','info','result','catch','util','moment','bluebird','randomstring','../../config/utils'];(function(_0x56482c,_0x16118d){var _0x5aae7a=function(_0x52512f){while(--_0x52512f){_0x56482c['push'](_0x56482c['shift']());}};_0x5aae7a(++_0x16118d);}(_0x4fda,0x113));var _0xa4fd=function(_0x4358f5,_0x5b1ac6){_0x4358f5=_0x4358f5-0x0;var _0x4d8104=_0x4fda[_0x4358f5];return _0x4d8104;};'use strict';var _=require('lodash');var util=require(_0xa4fd('0x0'));var moment=require(_0xa4fd('0x1'));var BPromise=require(_0xa4fd('0x2'));var rs=require(_0xa4fd('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xa4fd('0x4'));var logger=require(_0xa4fd('0x5'))('rpc');var config=require(_0xa4fd('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa4fd('0x7')]({'port':0x232a});function respondWithRpcPromise(_0xb1758e,_0x1ca168,_0x5e16f3){return new BPromise(function(_0x101f3c,_0x2bc68f){return client[_0xa4fd('0x8')](_0xb1758e,_0x5e16f3)[_0xa4fd('0x9')](function(_0x2de631){logger['info']('AnalyticTreeReport,\x20%s,\x20%s',_0x1ca168,_0xa4fd('0xa'));logger[_0xa4fd('0xb')](_0xa4fd('0xc'),_0x1ca168,_0xa4fd('0xa'),JSON['stringify'](_0x2de631));if(_0x2de631['error']){if(_0x2de631[_0xa4fd('0xd')][_0xa4fd('0xe')]===0x1f4){logger[_0xa4fd('0xd')](_0xa4fd('0xf'),_0x1ca168,_0x2de631[_0xa4fd('0xd')]['message']);return _0x2bc68f(_0x2de631[_0xa4fd('0xd')][_0xa4fd('0x10')]);}logger['error'](_0xa4fd('0xf'),_0x1ca168,_0x2de631[_0xa4fd('0xd')][_0xa4fd('0x10')]);return _0x101f3c(_0x2de631[_0xa4fd('0xd')][_0xa4fd('0x10')]);}else{logger[_0xa4fd('0x11')](_0xa4fd('0xf'),_0x1ca168,_0xa4fd('0xa'));_0x101f3c(_0x2de631[_0xa4fd('0x12')][_0xa4fd('0x10')]);}})[_0xa4fd('0x13')](function(_0x37a085){logger['error'](_0xa4fd('0xf'),_0x1ca168,_0x37a085);_0x2bc68f(_0x37a085);});});}
\ No newline at end of file
+var _0x770c=['../../config/logger','rpc','jayson/promise','client','http','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x15c375,_0x449bcf){var _0xe3d53=function(_0x165294){while(--_0x165294){_0x15c375['push'](_0x15c375['shift']());}};_0xe3d53(++_0x449bcf);}(_0x770c,0x159));var _0xc770=function(_0x2b2c53,_0x4bcf9b){_0x2b2c53=_0x2b2c53-0x0;var _0x311ec2=_0x770c[_0x2b2c53];return _0x311ec2;};'use strict';var _=require(_0xc770('0x0'));var util=require(_0xc770('0x1'));var moment=require('moment');var BPromise=require(_0xc770('0x2'));var rs=require(_0xc770('0x3'));var fs=require('fs');var Redis=require(_0xc770('0x4'));var db=require(_0xc770('0x5'))['db'];var utils=require(_0xc770('0x6'));var logger=require(_0xc770('0x7'))(_0xc770('0x8'));var config=require('../../config/environment');var jayson=require(_0xc770('0x9'));var client=jayson[_0xc770('0xa')][_0xc770('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5ba210,_0x2648f4,_0x466431){return new BPromise(function(_0x490aa5,_0x3c0252){return client['request'](_0x5ba210,_0x466431)['then'](function(_0x486204){logger['info'](_0xc770('0xc'),_0x2648f4,_0xc770('0xd'));logger['debug'](_0xc770('0xe'),_0x2648f4,_0xc770('0xd'),JSON[_0xc770('0xf')](_0x486204));if(_0x486204[_0xc770('0x10')]){if(_0x486204[_0xc770('0x10')][_0xc770('0x11')]===0x1f4){logger[_0xc770('0x10')](_0xc770('0xc'),_0x2648f4,_0x486204[_0xc770('0x10')]['message']);return _0x3c0252(_0x486204['error']['message']);}logger[_0xc770('0x10')](_0xc770('0xc'),_0x2648f4,_0x486204[_0xc770('0x10')]['message']);return _0x490aa5(_0x486204['error'][_0xc770('0x12')]);}else{logger[_0xc770('0x13')]('AnalyticTreeReport,\x20%s,\x20%s',_0x2648f4,_0xc770('0xd'));_0x490aa5(_0x486204[_0xc770('0x14')][_0xc770('0x12')]);}})[_0xc770('0x15')](function(_0x32a41b){logger[_0xc770('0x10')](_0xc770('0xc'),_0x2648f4,_0x32a41b);_0x3c0252(_0x32a41b);});});}
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js
index 8d0f119..2c32086 100644
--- a/server/api/analyticTreeReport/index.js
+++ b/server/api/analyticTreeReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe06e=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','put','delete','destroy','path','connect-timeout'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xe06e,0x9e));var _0xee06=function(_0x484c03,_0x13c1d2){_0x484c03=_0x484c03-0x0;var _0x294127=_0xe06e[_0x484c03];return _0x294127;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xee06('0x0'));var timeout=require(_0xee06('0x1'));var express=require('express');var router=express[_0xee06('0x2')]();var auth=require(_0xee06('0x3'));var interaction=require(_0xee06('0x4'));var config=require(_0xee06('0x5'));var controller=require('./analyticTreeReport.controller');router[_0xee06('0x6')]('/',auth[_0xee06('0x7')](),controller[_0xee06('0x8')]);router[_0xee06('0x6')](_0xee06('0x9'),auth[_0xee06('0x7')](),controller[_0xee06('0xa')]);router[_0xee06('0xb')]('/',auth[_0xee06('0x7')](),controller[_0xee06('0xc')]);router[_0xee06('0xd')](_0xee06('0x9'),auth['isAuthenticated'](),controller['update']);router[_0xee06('0xe')](_0xee06('0x9'),auth[_0xee06('0x7')](),controller[_0xee06('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0xaca1=['exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show','post','create','put','update','delete','destroy'];(function(_0x5d240d,_0x22e0e0){var _0x59701e=function(_0x47df1d){while(--_0x47df1d){_0x5d240d['push'](_0x5d240d['shift']());}};_0x59701e(++_0x22e0e0);}(_0xaca1,0xa1));var _0x1aca=function(_0x400b1b,_0x2608f2){_0x400b1b=_0x400b1b-0x0;var _0x231733=_0xaca1[_0x400b1b];return _0x231733;};'use strict';var multer=require(_0x1aca('0x0'));var util=require(_0x1aca('0x1'));var path=require(_0x1aca('0x2'));var timeout=require('connect-timeout');var express=require(_0x1aca('0x3'));var router=express[_0x1aca('0x4')]();var auth=require(_0x1aca('0x5'));var interaction=require(_0x1aca('0x6'));var config=require(_0x1aca('0x7'));var controller=require('./analyticTreeReport.controller');router[_0x1aca('0x8')]('/',auth['isAuthenticated'](),controller[_0x1aca('0x9')]);router[_0x1aca('0x8')](_0x1aca('0xa'),auth[_0x1aca('0xb')](),controller[_0x1aca('0xc')]);router[_0x1aca('0xd')]('/',auth[_0x1aca('0xb')](),controller[_0x1aca('0xe')]);router[_0x1aca('0xf')](_0x1aca('0xa'),auth['isAuthenticated'](),controller[_0x1aca('0x10')]);router[_0x1aca('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x1aca('0x12')]);module[_0x1aca('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js
index b9d1d36..3c92616 100644
--- a/server/api/attachment/attachment.attributes.js
+++ b/server/api/attachment/attachment.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x13d6=['exports','STRING','sequelize'];(function(_0xdad237,_0x361a1d){var _0x15c575=function(_0x8db2f6){while(--_0x8db2f6){_0xdad237['push'](_0xdad237['shift']());}};_0x15c575(++_0x361a1d);}(_0x13d6,0x107));var _0x613d=function(_0xa3ff70,_0x4a8609){_0xa3ff70=_0xa3ff70-0x0;var _0x538dbb=_0x13d6[_0xa3ff70];return _0x538dbb;};'use strict';var Sequelize=require(_0x613d('0x0'));module[_0x613d('0x1')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize[_0x613d('0x2')]},'type':{'type':Sequelize[_0x613d('0x2')]}};
\ No newline at end of file
+var _0x5397=['STRING','sequelize','exports'];(function(_0x3797b1,_0x110134){var _0x5092d4=function(_0x1805fd){while(--_0x1805fd){_0x3797b1['push'](_0x3797b1['shift']());}};_0x5092d4(++_0x110134);}(_0x5397,0xe2));var _0x7539=function(_0x39642a,_0xf1650e){_0x39642a=_0x39642a-0x0;var _0x2ac68b=_0x5397[_0x39642a];return _0x2ac68b;};'use strict';var Sequelize=require(_0x7539('0x0'));module[_0x7539('0x1')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize[_0x7539('0x2')]},'type':{'type':Sequelize[_0x7539('0x2')]}};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js
index 624a088..3bc6992 100644
--- a/server/api/attachment/attachment.controller.js
+++ b/server/api/attachment/attachment.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x35c1=['findOne','join','root','server/files/attachments/','basename','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','api','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','reject','update','then','destroy','error','name','index','Attachment','model','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','key','filter','options','include','findAll','rows','catch','show','params','rawAttributes','filters','length','find','body','file','originalname','filename','type','mimetype','download'];(function(_0x49d19d,_0x245cf5){var _0x4ebef1=function(_0xf0a4e6){while(--_0xf0a4e6){_0x49d19d['push'](_0x49d19d['shift']());}};_0x4ebef1(++_0x245cf5);}(_0x35c1,0x1d3));var _0x135c=function(_0x1e699f,_0x3174f2){_0x1e699f=_0x1e699f-0x0;var _0x2719d6=_0x35c1[_0x1e699f];return _0x2719d6;};'use strict';var pdf=require(_0x135c('0x0'));var emlformat=require(_0x135c('0x1'));var rimraf=require(_0x135c('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x135c('0x3'));var rp=require(_0x135c('0x4'));var moment=require(_0x135c('0x5'));var BPromise=require(_0x135c('0x6'));var Mustache=require(_0x135c('0x7'));var util=require(_0x135c('0x8'));var path=require(_0x135c('0x9'));var sox=require('sox');var csv=require(_0x135c('0xa'));var ejs=require(_0x135c('0xb'));var fs=require('fs');var _=require(_0x135c('0xc'));var squel=require(_0x135c('0xd'));var crypto=require('crypto');var jsforce=require(_0x135c('0xe'));var deskjs=require(_0x135c('0xf'));var toCsv=require('to-csv');var querystring=require(_0x135c('0x10'));var Papa=require(_0x135c('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x135c('0x12'));var hardwareService=require(_0x135c('0x13'));var logger=require('../../config/logger')(_0x135c('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x135c('0x15'))['db'];function respondWithStatusCode(_0x6bc7e1,_0x39c94e){_0x39c94e=_0x39c94e||0xcc;return function(_0x2087ec){if(_0x2087ec){return _0x6bc7e1[_0x135c('0x16')](_0x39c94e);}return _0x6bc7e1[_0x135c('0x17')](_0x39c94e)[_0x135c('0x18')]();};}function respondWithResult(_0x40f456,_0x54f830){_0x54f830=_0x54f830||0xc8;return function(_0x1ece4b){if(_0x1ece4b){return _0x40f456['status'](_0x54f830)[_0x135c('0x19')](_0x1ece4b);}};}function respondWithFilteredResult(_0x4ae4fb,_0x5cac10){return function(_0x23bef5){if(_0x23bef5){var _0x1d4677=_0x23bef5[_0x135c('0x1a')],_0x3aff12=_0x5cac10['offset'],_0x281247=_0x5cac10[_0x135c('0x1b')]+_0x5cac10[_0x135c('0x1c')],_0x6e7532;if(_0x281247>=_0x1d4677){_0x281247=_0x1d4677;_0x6e7532=0xc8;}else{_0x6e7532=0xce;}_0x4ae4fb[_0x135c('0x17')](_0x6e7532);return _0x4ae4fb['set'](_0x135c('0x1d'),_0x3aff12+'-'+_0x281247+'/'+_0x1d4677)[_0x135c('0x19')](_0x23bef5);}return null;};}function patchUpdates(_0x14e136){return function(_0x253a3d){try{jsonpatch[_0x135c('0x1e')](_0x253a3d,_0x14e136,!![]);}catch(_0x258933){return BPromise[_0x135c('0x1f')](_0x258933);}return _0x253a3d['save']();};}function saveUpdates(_0x475e6d,_0x2e0e90){return function(_0x335403){if(_0x335403){return _0x335403[_0x135c('0x20')](_0x475e6d)[_0x135c('0x21')](function(_0x4c0882){return _0x4c0882;});}return null;};}function removeEntity(_0x455056,_0x49b748){return function(_0x4cec70){if(_0x4cec70){return _0x4cec70[_0x135c('0x22')]()[_0x135c('0x21')](function(){_0x455056['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x22e512,_0x355411){return function(_0xd3e2e6){if(!_0xd3e2e6){_0x22e512[_0x135c('0x16')](0x194);}return _0xd3e2e6;};}function handleError(_0x20f5a7,_0x2114fe){_0x2114fe=_0x2114fe||0x1f4;return function(_0x3a7b9e){logger[_0x135c('0x23')](_0x3a7b9e['stack']);if(_0x3a7b9e[_0x135c('0x24')]){delete _0x3a7b9e[_0x135c('0x24')];}_0x20f5a7[_0x135c('0x17')](_0x2114fe)['send'](_0x3a7b9e);};}exports[_0x135c('0x25')]=function(_0x5c08e4,_0x40e72e){var _0x3ade14={},_0x2021df={},_0xb5a5eb={'count':0x0,'rows':[]};var _0x52fc38=db[_0x135c('0x26')]['rawAttributes'];_0x2021df[_0x135c('0x27')]=_[_0x135c('0x28')](_0x52fc38);_0x2021df[_0x135c('0x29')]=_[_0x135c('0x28')](_0x5c08e4[_0x135c('0x29')]);_0x2021df['filters']=_[_0x135c('0x2a')](_0x2021df[_0x135c('0x27')],_0x2021df[_0x135c('0x29')]);_0x3ade14[_0x135c('0x2b')]=_[_0x135c('0x2a')](_0x2021df[_0x135c('0x27')],qs[_0x135c('0x2c')](_0x5c08e4['query'][_0x135c('0x2c')]));_0x3ade14['attributes']=_0x3ade14['attributes']['length']?_0x3ade14[_0x135c('0x2b')]:_0x2021df[_0x135c('0x27')];if(!_0x5c08e4[_0x135c('0x29')][_0x135c('0x2d')](_0x135c('0x2e'))){_0x3ade14['limit']=qs[_0x135c('0x1c')](_0x5c08e4[_0x135c('0x29')][_0x135c('0x1c')]);_0x3ade14[_0x135c('0x1b')]=qs[_0x135c('0x1b')](_0x5c08e4[_0x135c('0x29')][_0x135c('0x1b')]);}_0x3ade14[_0x135c('0x2f')]=qs[_0x135c('0x30')](_0x5c08e4['query'][_0x135c('0x30')]);_0x3ade14[_0x135c('0x31')]=qs['filters'](_[_0x135c('0x32')](_0x5c08e4[_0x135c('0x29')],_0x2021df['filters']));if(_0x5c08e4['query']['filter']){_0x3ade14[_0x135c('0x31')]=_[_0x135c('0x33')](_0x3ade14[_0x135c('0x31')],{'$or':_['map'](_0x52fc38,function(_0x2ff277){if(_0x2ff277['type'][_0x135c('0x34')]!=='VIRTUAL'){var _0x10b98a={};_0x10b98a[_0x2ff277['field']]={'$like':'%'+_0x5c08e4['query'][_0x135c('0x35')]+'%'};return _0x10b98a;}})});}_0x3ade14=_[_0x135c('0x33')]({},_0x3ade14,_0x5c08e4[_0x135c('0x36')]);var _0x547fa9={'where':_0x3ade14[_0x135c('0x31')]};return db['Attachment']['count'](_0x547fa9)['then'](function(_0x38a6dd){_0xb5a5eb[_0x135c('0x1a')]=_0x38a6dd;if(_0x5c08e4['query']['includeAll']){_0x3ade14[_0x135c('0x37')]=[{'all':!![]}];}return db[_0x135c('0x26')][_0x135c('0x38')](_0x3ade14);})[_0x135c('0x21')](function(_0x3b0d01){_0xb5a5eb[_0x135c('0x39')]=_0x3b0d01;return _0xb5a5eb;})[_0x135c('0x21')](respondWithFilteredResult(_0x40e72e,_0x3ade14))[_0x135c('0x3a')](handleError(_0x40e72e,null));};exports[_0x135c('0x3b')]=function(_0x16b9ef,_0x582724){var _0x5adbef={'raw':!![],'where':{'id':_0x16b9ef[_0x135c('0x3c')]['id']}},_0xadeb79={};_0xadeb79[_0x135c('0x27')]=_[_0x135c('0x28')](db[_0x135c('0x26')][_0x135c('0x3d')]);_0xadeb79[_0x135c('0x29')]=_[_0x135c('0x28')](_0x16b9ef[_0x135c('0x29')]);_0xadeb79[_0x135c('0x3e')]=_[_0x135c('0x2a')](_0xadeb79[_0x135c('0x27')],_0xadeb79['query']);_0x5adbef['attributes']=_[_0x135c('0x2a')](_0xadeb79[_0x135c('0x27')],qs[_0x135c('0x2c')](_0x16b9ef[_0x135c('0x29')][_0x135c('0x2c')]));_0x5adbef[_0x135c('0x2b')]=_0x5adbef[_0x135c('0x2b')][_0x135c('0x3f')]?_0x5adbef['attributes']:_0xadeb79[_0x135c('0x27')];if(_0x16b9ef[_0x135c('0x29')]['includeAll']){_0x5adbef[_0x135c('0x37')]=[{'all':!![]}];}_0x5adbef=_[_0x135c('0x33')]({},_0x5adbef,_0x16b9ef['options']);return db[_0x135c('0x26')][_0x135c('0x40')](_0x5adbef)['then'](handleEntityNotFound(_0x582724,null))[_0x135c('0x21')](respondWithResult(_0x582724,null))['catch'](handleError(_0x582724,null));};exports[_0x135c('0x20')]=function(_0x3ff0f0,_0x1a9a66){if(_0x3ff0f0[_0x135c('0x41')]['id']){delete _0x3ff0f0[_0x135c('0x41')]['id'];}return db[_0x135c('0x26')]['find']({'where':{'id':_0x3ff0f0[_0x135c('0x3c')]['id']}})[_0x135c('0x21')](handleEntityNotFound(_0x1a9a66,null))[_0x135c('0x21')](saveUpdates(_0x3ff0f0[_0x135c('0x41')],null))[_0x135c('0x21')](respondWithResult(_0x1a9a66,null))[_0x135c('0x3a')](handleError(_0x1a9a66,null));};exports['destroy']=function(_0x2dd936,_0x514fb0){return db[_0x135c('0x26')]['find']({'where':{'id':_0x2dd936['params']['id']}})[_0x135c('0x21')](handleEntityNotFound(_0x514fb0,null))[_0x135c('0x21')](removeEntity(_0x514fb0,null))[_0x135c('0x3a')](handleError(_0x514fb0,null));};exports['create']=function(_0x468fbd,_0x43e1a3,_0x435676){_0x468fbd['body'][_0x135c('0x24')]=_0x468fbd[_0x135c('0x42')][_0x135c('0x43')];_0x468fbd[_0x135c('0x41')]['basename']=_0x468fbd['file'][_0x135c('0x44')];_0x468fbd[_0x135c('0x41')][_0x135c('0x45')]=_0x468fbd['file'][_0x135c('0x46')];return db[_0x135c('0x26')]['create'](_0x468fbd['body'])[_0x135c('0x21')](respondWithResult(_0x43e1a3,0xc9))[_0x135c('0x3a')](handleError(_0x43e1a3,null));};exports[_0x135c('0x47')]=function(_0x14e09a,_0x4c523e,_0x403b55){return db['Attachment'][_0x135c('0x48')]({'where':{'id':_0x14e09a['params']['id']},'raw':!![]})[_0x135c('0x21')](handleEntityNotFound(_0x4c523e,null))[_0x135c('0x21')](function(_0x12ecc0){if(_0x12ecc0){return _0x4c523e[_0x135c('0x47')](path[_0x135c('0x49')](config[_0x135c('0x4a')],_0x135c('0x4b'),_0x12ecc0[_0x135c('0x4c')]));}})[_0x135c('0x3a')](handleError(_0x4c523e,null));};
\ No newline at end of file
+var _0x2455=['stack','name','send','index','Attachment','model','keys','query','intersection','fields','attributes','length','hasOwnProperty','order','sort','filter','merge','where','map','type','key','VIRTUAL','field','options','rows','catch','show','params','rawAttributes','filters','includeAll','include','find','update','body','create','file','originalname','filename','download','findOne','server/files/attachments/','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','to-csv','squel','crypto','jsforce','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','Content-Range','apply','save','then','destroy'];(function(_0x47e7cb,_0x4c1b8d){var _0x2a8874=function(_0x36498f){while(--_0x36498f){_0x47e7cb['push'](_0x47e7cb['shift']());}};_0x2a8874(++_0x4c1b8d);}(_0x2455,0x19c));var _0x5245=function(_0x51ad4f,_0x45d87d){_0x51ad4f=_0x51ad4f-0x0;var _0x592932=_0x2455[_0x51ad4f];return _0x592932;};'use strict';var pdf=require(_0x5245('0x0'));var emlformat=require(_0x5245('0x1'));var rimraf=require(_0x5245('0x2'));var zipdir=require(_0x5245('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5245('0x4'));var BPromise=require(_0x5245('0x5'));var Mustache=require('mustache');var util=require(_0x5245('0x6'));var path=require(_0x5245('0x7'));var sox=require(_0x5245('0x8'));var csv=require(_0x5245('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x5245('0xa'));var crypto=require(_0x5245('0xb'));var jsforce=require(_0x5245('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x5245('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x5245('0xd'));var qs=require(_0x5245('0xe'));var hardwareService=require(_0x5245('0xf'));var logger=require(_0x5245('0x10'))(_0x5245('0x11'));var utils=require(_0x5245('0x12'));var config=require(_0x5245('0x13'));var db=require(_0x5245('0x14'))['db'];function respondWithStatusCode(_0x28967b,_0x37b117){_0x37b117=_0x37b117||0xcc;return function(_0x2c2df3){if(_0x2c2df3){return _0x28967b[_0x5245('0x15')](_0x37b117);}return _0x28967b[_0x5245('0x16')](_0x37b117)[_0x5245('0x17')]();};}function respondWithResult(_0x2909a6,_0x5abe11){_0x5abe11=_0x5abe11||0xc8;return function(_0x349bb4){if(_0x349bb4){return _0x2909a6[_0x5245('0x16')](_0x5abe11)['json'](_0x349bb4);}};}function respondWithFilteredResult(_0x335591,_0x464bc3){return function(_0x114619){if(_0x114619){var _0x4eeaa4=_0x114619[_0x5245('0x18')],_0x3fb677=_0x464bc3[_0x5245('0x19')],_0x4758f2=_0x464bc3[_0x5245('0x19')]+_0x464bc3[_0x5245('0x1a')],_0xb50465;if(_0x4758f2>=_0x4eeaa4){_0x4758f2=_0x4eeaa4;_0xb50465=0xc8;}else{_0xb50465=0xce;}_0x335591[_0x5245('0x16')](_0xb50465);return _0x335591['set'](_0x5245('0x1b'),_0x3fb677+'-'+_0x4758f2+'/'+_0x4eeaa4)['json'](_0x114619);}return null;};}function patchUpdates(_0x318601){return function(_0x573d25){try{jsonpatch[_0x5245('0x1c')](_0x573d25,_0x318601,!![]);}catch(_0x3e3c4f){return BPromise['reject'](_0x3e3c4f);}return _0x573d25[_0x5245('0x1d')]();};}function saveUpdates(_0x15c45d,_0x287f2c){return function(_0x27ab43){if(_0x27ab43){return _0x27ab43['update'](_0x15c45d)[_0x5245('0x1e')](function(_0x4c3b5b){return _0x4c3b5b;});}return null;};}function removeEntity(_0x48d8c7,_0x36ca2d){return function(_0x3d2fdc){if(_0x3d2fdc){return _0x3d2fdc[_0x5245('0x1f')]()['then'](function(){_0x48d8c7[_0x5245('0x16')](0xcc)[_0x5245('0x17')]();});}};}function handleEntityNotFound(_0x54954a,_0x21eab5){return function(_0x624d5e){if(!_0x624d5e){_0x54954a[_0x5245('0x15')](0x194);}return _0x624d5e;};}function handleError(_0x46111d,_0x521f93){_0x521f93=_0x521f93||0x1f4;return function(_0x34e673){logger['error'](_0x34e673[_0x5245('0x20')]);if(_0x34e673[_0x5245('0x21')]){delete _0x34e673['name'];}_0x46111d[_0x5245('0x16')](_0x521f93)[_0x5245('0x22')](_0x34e673);};}exports[_0x5245('0x23')]=function(_0x12d51e,_0x3bb57d){var _0x3c1525={},_0x1ec74e={},_0x51253e={'count':0x0,'rows':[]};var _0x1ffef1=db[_0x5245('0x24')]['rawAttributes'];_0x1ec74e[_0x5245('0x25')]=_[_0x5245('0x26')](_0x1ffef1);_0x1ec74e['query']=_['keys'](_0x12d51e[_0x5245('0x27')]);_0x1ec74e['filters']=_[_0x5245('0x28')](_0x1ec74e[_0x5245('0x25')],_0x1ec74e[_0x5245('0x27')]);_0x3c1525['attributes']=_['intersection'](_0x1ec74e[_0x5245('0x25')],qs[_0x5245('0x29')](_0x12d51e[_0x5245('0x27')]['fields']));_0x3c1525['attributes']=_0x3c1525[_0x5245('0x2a')][_0x5245('0x2b')]?_0x3c1525[_0x5245('0x2a')]:_0x1ec74e[_0x5245('0x25')];if(!_0x12d51e[_0x5245('0x27')][_0x5245('0x2c')]('nolimit')){_0x3c1525[_0x5245('0x1a')]=qs['limit'](_0x12d51e[_0x5245('0x27')][_0x5245('0x1a')]);_0x3c1525[_0x5245('0x19')]=qs[_0x5245('0x19')](_0x12d51e[_0x5245('0x27')][_0x5245('0x19')]);}_0x3c1525[_0x5245('0x2d')]=qs['sort'](_0x12d51e[_0x5245('0x27')][_0x5245('0x2e')]);_0x3c1525['where']=qs['filters'](_['pick'](_0x12d51e['query'],_0x1ec74e['filters']));if(_0x12d51e[_0x5245('0x27')][_0x5245('0x2f')]){_0x3c1525['where']=_[_0x5245('0x30')](_0x3c1525[_0x5245('0x31')],{'$or':_[_0x5245('0x32')](_0x1ffef1,function(_0x546c3c){if(_0x546c3c[_0x5245('0x33')][_0x5245('0x34')]!==_0x5245('0x35')){var _0x3aac6a={};_0x3aac6a[_0x546c3c[_0x5245('0x36')]]={'$like':'%'+_0x12d51e[_0x5245('0x27')][_0x5245('0x2f')]+'%'};return _0x3aac6a;}})});}_0x3c1525=_[_0x5245('0x30')]({},_0x3c1525,_0x12d51e[_0x5245('0x37')]);var _0x1d9b62={'where':_0x3c1525['where']};return db[_0x5245('0x24')][_0x5245('0x18')](_0x1d9b62)['then'](function(_0x223399){_0x51253e[_0x5245('0x18')]=_0x223399;if(_0x12d51e[_0x5245('0x27')]['includeAll']){_0x3c1525['include']=[{'all':!![]}];}return db[_0x5245('0x24')]['findAll'](_0x3c1525);})[_0x5245('0x1e')](function(_0x309cdd){_0x51253e[_0x5245('0x38')]=_0x309cdd;return _0x51253e;})[_0x5245('0x1e')](respondWithFilteredResult(_0x3bb57d,_0x3c1525))[_0x5245('0x39')](handleError(_0x3bb57d,null));};exports[_0x5245('0x3a')]=function(_0x158de7,_0xca9c73){var _0x5e56a9={'raw':!![],'where':{'id':_0x158de7[_0x5245('0x3b')]['id']}},_0x288808={};_0x288808['model']=_[_0x5245('0x26')](db['Attachment'][_0x5245('0x3c')]);_0x288808[_0x5245('0x27')]=_['keys'](_0x158de7[_0x5245('0x27')]);_0x288808[_0x5245('0x3d')]=_['intersection'](_0x288808[_0x5245('0x25')],_0x288808[_0x5245('0x27')]);_0x5e56a9[_0x5245('0x2a')]=_[_0x5245('0x28')](_0x288808['model'],qs['fields'](_0x158de7[_0x5245('0x27')][_0x5245('0x29')]));_0x5e56a9[_0x5245('0x2a')]=_0x5e56a9[_0x5245('0x2a')][_0x5245('0x2b')]?_0x5e56a9[_0x5245('0x2a')]:_0x288808[_0x5245('0x25')];if(_0x158de7[_0x5245('0x27')][_0x5245('0x3e')]){_0x5e56a9[_0x5245('0x3f')]=[{'all':!![]}];}_0x5e56a9=_[_0x5245('0x30')]({},_0x5e56a9,_0x158de7[_0x5245('0x37')]);return db[_0x5245('0x24')][_0x5245('0x40')](_0x5e56a9)[_0x5245('0x1e')](handleEntityNotFound(_0xca9c73,null))[_0x5245('0x1e')](respondWithResult(_0xca9c73,null))[_0x5245('0x39')](handleError(_0xca9c73,null));};exports[_0x5245('0x41')]=function(_0x2ad050,_0x10ba9c){if(_0x2ad050[_0x5245('0x42')]['id']){delete _0x2ad050[_0x5245('0x42')]['id'];}return db[_0x5245('0x24')][_0x5245('0x40')]({'where':{'id':_0x2ad050['params']['id']}})[_0x5245('0x1e')](handleEntityNotFound(_0x10ba9c,null))['then'](saveUpdates(_0x2ad050[_0x5245('0x42')],null))[_0x5245('0x1e')](respondWithResult(_0x10ba9c,null))[_0x5245('0x39')](handleError(_0x10ba9c,null));};exports[_0x5245('0x1f')]=function(_0x2f14c7,_0x53d0aa){return db[_0x5245('0x24')]['find']({'where':{'id':_0x2f14c7[_0x5245('0x3b')]['id']}})[_0x5245('0x1e')](handleEntityNotFound(_0x53d0aa,null))['then'](removeEntity(_0x53d0aa,null))[_0x5245('0x39')](handleError(_0x53d0aa,null));};exports[_0x5245('0x43')]=function(_0x180a1f,_0x4892ec,_0x42b51e){_0x180a1f[_0x5245('0x42')][_0x5245('0x21')]=_0x180a1f[_0x5245('0x44')][_0x5245('0x45')];_0x180a1f['body']['basename']=_0x180a1f[_0x5245('0x44')][_0x5245('0x46')];_0x180a1f[_0x5245('0x42')]['type']=_0x180a1f[_0x5245('0x44')]['mimetype'];return db[_0x5245('0x24')][_0x5245('0x43')](_0x180a1f[_0x5245('0x42')])[_0x5245('0x1e')](respondWithResult(_0x4892ec,0xc9))[_0x5245('0x39')](handleError(_0x4892ec,null));};exports[_0x5245('0x47')]=function(_0x2e6ecd,_0x389f56,_0x3daee1){return db[_0x5245('0x24')][_0x5245('0x48')]({'where':{'id':_0x2e6ecd[_0x5245('0x3b')]['id']},'raw':!![]})[_0x5245('0x1e')](handleEntityNotFound(_0x389f56,null))['then'](function(_0xd6a532){if(_0xd6a532){return _0x389f56['download'](path['join'](config['root'],_0x5245('0x49'),_0xd6a532['basename']));}})[_0x5245('0x39')](handleError(_0x389f56,null));};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js
index 6a3b56e..5c30bd7 100644
--- a/server/api/attachment/attachment.model.js
+++ b/server/api/attachment/attachment.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf7f3=['../../config/logger','api','moment','bluebird','rimraf','../../config/environment','exports','define','lodash','util'];(function(_0xe2d14f,_0x49fd0e){var _0x4522d2=function(_0x1bf09a){while(--_0x1bf09a){_0xe2d14f['push'](_0xe2d14f['shift']());}};_0x4522d2(++_0x49fd0e);}(_0xf7f3,0x12a));var _0x3f7f=function(_0x986a0f,_0x3cf5f5){_0x986a0f=_0x986a0f-0x0;var _0x20f92b=_0xf7f3[_0x986a0f];return _0x20f92b;};'use strict';var _=require(_0x3f7f('0x0'));var util=require(_0x3f7f('0x1'));var logger=require(_0x3f7f('0x2'))(_0x3f7f('0x3'));var moment=require(_0x3f7f('0x4'));var BPromise=require(_0x3f7f('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3f7f('0x6'));var config=require(_0x3f7f('0x7'));var attributes=require('./attachment.attributes');module[_0x3f7f('0x8')]=function(_0x4876e8,_0x2198f7){return _0x4876e8[_0x3f7f('0x9')]('Attachment',attributes,{'tableName':'attachments','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x861c=['request-promise','path','rimraf','../../config/environment','./attachment.attributes','exports','define','Attachment','attachments','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x39855f,_0x10fb4a){var _0x53fcd0=function(_0x2369b3){while(--_0x2369b3){_0x39855f['push'](_0x39855f['shift']());}};_0x53fcd0(++_0x10fb4a);}(_0x861c,0xdb));var _0xc861=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x861c[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0xc861('0x0'));var util=require(_0xc861('0x1'));var logger=require(_0xc861('0x2'))(_0xc861('0x3'));var moment=require(_0xc861('0x4'));var BPromise=require(_0xc861('0x5'));var rp=require(_0xc861('0x6'));var fs=require('fs');var path=require(_0xc861('0x7'));var rimraf=require(_0xc861('0x8'));var config=require(_0xc861('0x9'));var attributes=require(_0xc861('0xa'));module[_0xc861('0xb')]=function(_0x562f12,_0xc3b5fd){return _0x562f12[_0xc861('0xc')](_0xc861('0xd'),attributes,{'tableName':_0xc861('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.rpc.js b/server/api/attachment/attachment.rpc.js
index 16d7074..c7d77fb 100644
--- a/server/api/attachment/attachment.rpc.js
+++ b/server/api/attachment/attachment.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x25b7=['lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','CreateAttachment','Attachment','create','options','raw'];(function(_0x27232d,_0x5f4214){var _0x287fcc=function(_0x4e2d01){while(--_0x4e2d01){_0x27232d['push'](_0x27232d['shift']());}};_0x287fcc(++_0x5f4214);}(_0x25b7,0x1d4));var _0x725b=function(_0x562884,_0x12220f){_0x562884=_0x562884-0x0;var _0x5b5e02=_0x25b7[_0x562884];return _0x5b5e02;};'use strict';var _=require(_0x725b('0x0'));var util=require('util');var moment=require(_0x725b('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x725b('0x2'));var db=require(_0x725b('0x3'))['db'];var utils=require(_0x725b('0x4'));var logger=require(_0x725b('0x5'))(_0x725b('0x6'));var config=require(_0x725b('0x7'));var jayson=require(_0x725b('0x8'));var client=jayson[_0x725b('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2997d2,_0xcd7a40,_0x1dffa2){return new BPromise(function(_0x19280e,_0x408c2b){return client[_0x725b('0xa')](_0x2997d2,_0x1dffa2)[_0x725b('0xb')](function(_0x2e7466){logger[_0x725b('0xc')](_0x725b('0xd'),_0xcd7a40,_0x725b('0xe'));logger[_0x725b('0xf')]('Attachment,\x20%s,\x20%s,\x20%s',_0xcd7a40,_0x725b('0xe'),JSON[_0x725b('0x10')](_0x2e7466));if(_0x2e7466[_0x725b('0x11')]){if(_0x2e7466[_0x725b('0x11')][_0x725b('0x12')]===0x1f4){logger[_0x725b('0x11')]('Attachment,\x20%s,\x20%s',_0xcd7a40,_0x2e7466[_0x725b('0x11')][_0x725b('0x13')]);return _0x408c2b(_0x2e7466['error']['message']);}logger[_0x725b('0x11')](_0x725b('0xd'),_0xcd7a40,_0x2e7466['error'][_0x725b('0x13')]);return _0x19280e(_0x2e7466[_0x725b('0x11')][_0x725b('0x13')]);}else{logger[_0x725b('0xc')](_0x725b('0xd'),_0xcd7a40,'request\x20sent');_0x19280e(_0x2e7466['result'][_0x725b('0x13')]);}})[_0x725b('0x14')](function(_0x3bd867){logger[_0x725b('0x11')]('Attachment,\x20%s,\x20%s',_0xcd7a40,_0x3bd867);_0x408c2b(_0x3bd867);});});}exports[_0x725b('0x15')]=function(_0x194a02){var _0x41794c=this;return new Promise(function(_0x415346,_0x474aaa){return db[_0x725b('0x16')][_0x725b('0x17')](_0x194a02['body'],{'raw':_0x194a02[_0x725b('0x18')]?_0x194a02[_0x725b('0x18')][_0x725b('0x19')]===undefined?!![]:![]:!![]})[_0x725b('0xb')](function(_0x110ebf){logger[_0x725b('0xc')](_0x725b('0x15'),_0x194a02);logger[_0x725b('0xf')]('CreateAttachment',_0x194a02,JSON[_0x725b('0x10')](_0x110ebf));_0x415346(_0x110ebf);})[_0x725b('0x14')](function(_0x34cbfd){logger['error']('CreateAttachment',_0x34cbfd[_0x725b('0x13')],_0x194a02);_0x474aaa(_0x41794c[_0x725b('0x11')](0x1f4,_0x34cbfd[_0x725b('0x13')]));});});};
\ No newline at end of file
+var _0xe5ff=['rpc','jayson/promise','client','http','info','Attachment,\x20%s,\x20%s','request\x20sent','stringify','error','message','Attachment','create','body','options','CreateAttachment','debug','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x11a343,_0x3d6373){var _0x358c8b=function(_0x2c317b){while(--_0x2c317b){_0x11a343['push'](_0x11a343['shift']());}};_0x358c8b(++_0x3d6373);}(_0xe5ff,0x197));var _0xfe5f=function(_0x51f67a,_0x444ad0){_0x51f67a=_0x51f67a-0x0;var _0x5d6086=_0xe5ff[_0x51f67a];return _0x5d6086;};'use strict';var _=require(_0xfe5f('0x0'));var util=require(_0xfe5f('0x1'));var moment=require(_0xfe5f('0x2'));var BPromise=require(_0xfe5f('0x3'));var rs=require(_0xfe5f('0x4'));var fs=require('fs');var Redis=require(_0xfe5f('0x5'));var db=require(_0xfe5f('0x6'))['db'];var utils=require(_0xfe5f('0x7'));var logger=require(_0xfe5f('0x8'))(_0xfe5f('0x9'));var config=require('../../config/environment');var jayson=require(_0xfe5f('0xa'));var client=jayson[_0xfe5f('0xb')][_0xfe5f('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5db4ea,_0x25ea40,_0x5bef39){return new BPromise(function(_0x196127,_0x4d3094){return client['request'](_0x5db4ea,_0x5bef39)['then'](function(_0x570d93){logger[_0xfe5f('0xd')](_0xfe5f('0xe'),_0x25ea40,_0xfe5f('0xf'));logger['debug']('Attachment,\x20%s,\x20%s,\x20%s',_0x25ea40,'request\x20sent',JSON[_0xfe5f('0x10')](_0x570d93));if(_0x570d93[_0xfe5f('0x11')]){if(_0x570d93[_0xfe5f('0x11')]['code']===0x1f4){logger['error'](_0xfe5f('0xe'),_0x25ea40,_0x570d93[_0xfe5f('0x11')]['message']);return _0x4d3094(_0x570d93[_0xfe5f('0x11')]['message']);}logger['error'](_0xfe5f('0xe'),_0x25ea40,_0x570d93['error'][_0xfe5f('0x12')]);return _0x196127(_0x570d93['error'][_0xfe5f('0x12')]);}else{logger[_0xfe5f('0xd')]('Attachment,\x20%s,\x20%s',_0x25ea40,_0xfe5f('0xf'));_0x196127(_0x570d93['result']['message']);}})['catch'](function(_0x5a8004){logger[_0xfe5f('0x11')]('Attachment,\x20%s,\x20%s',_0x25ea40,_0x5a8004);_0x4d3094(_0x5a8004);});});}exports['CreateAttachment']=function(_0x4918cb){var _0x2e4176=this;return new Promise(function(_0x58f5a1,_0x1d0035){return db[_0xfe5f('0x13')][_0xfe5f('0x14')](_0x4918cb[_0xfe5f('0x15')],{'raw':_0x4918cb[_0xfe5f('0x16')]?_0x4918cb[_0xfe5f('0x16')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x19a5ce){logger[_0xfe5f('0xd')](_0xfe5f('0x17'),_0x4918cb);logger[_0xfe5f('0x18')](_0xfe5f('0x17'),_0x4918cb,JSON[_0xfe5f('0x10')](_0x19a5ce));_0x58f5a1(_0x19a5ce);})[_0xfe5f('0x19')](function(_0x283abb){logger[_0xfe5f('0x11')](_0xfe5f('0x17'),_0x283abb[_0xfe5f('0x12')],_0x4918cb);_0x1d0035(_0x2e4176[_0xfe5f('0x11')](0x1f4,_0x283abb['message']));});});};
\ No newline at end of file
diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js
index 043a74b..799c3a1 100644
--- a/server/api/attachment/index.js
+++ b/server/api/attachment/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3cfb=['./attachment.controller','get','isAuthenticated','/:id','download','diskStorage','join','root','server/files/attachments/','format','%s-%s','now','originalname','single','file','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x18abbb,_0x477d51){var _0x574cd0=function(_0x37e2a9){while(--_0x37e2a9){_0x18abbb['push'](_0x18abbb['shift']());}};_0x574cd0(++_0x477d51);}(_0x3cfb,0x1b8));var _0xb3cf=function(_0x51d7ba,_0x2c85ce){_0x51d7ba=_0x51d7ba-0x0;var _0x24400c=_0x3cfb[_0x51d7ba];return _0x24400c;};'use strict';var multer=require(_0xb3cf('0x0'));var util=require(_0xb3cf('0x1'));var path=require(_0xb3cf('0x2'));var timeout=require(_0xb3cf('0x3'));var express=require(_0xb3cf('0x4'));var router=express[_0xb3cf('0x5')]();var auth=require(_0xb3cf('0x6'));var interaction=require(_0xb3cf('0x7'));var config=require('../../config/environment');var controller=require(_0xb3cf('0x8'));router[_0xb3cf('0x9')]('/',auth[_0xb3cf('0xa')](),controller['index']);router[_0xb3cf('0x9')](_0xb3cf('0xb'),auth[_0xb3cf('0xa')](),controller['show']);router[_0xb3cf('0x9')]('/:id/download',auth['isAuthenticated'](),controller[_0xb3cf('0xc')]);var upload=multer({'storage':multer[_0xb3cf('0xd')]({'destination':function(_0xf60a87,_0x40df2d,_0x429c97){_0x429c97(null,path[_0xb3cf('0xe')](config[_0xb3cf('0xf')],_0xb3cf('0x10')));},'filename':function(_0x3c7123,_0x3b6401,_0x302234){_0x302234(null,util[_0xb3cf('0x11')](_0xb3cf('0x12'),Date[_0xb3cf('0x13')](),_0x3b6401[_0xb3cf('0x14')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post']('/',upload[_0xb3cf('0x15')](_0xb3cf('0x16')),controller['create']);router[_0xb3cf('0x17')]('/:id',auth['isAuthenticated'](),controller[_0xb3cf('0x18')]);router[_0xb3cf('0x19')](_0xb3cf('0xb'),auth['isAuthenticated'](),controller[_0xb3cf('0x1a')]);module[_0xb3cf('0x1b')]=router;
\ No newline at end of file
+var _0x3ef0=['isAuthenticated','index','get','show','/:id/download','diskStorage','join','root','%s-%s','now','originalname','replace','post','single','file','create','put','/:id','destroy','exports','multer','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x4e9d3c,_0x1f4b98){var _0x2d0825=function(_0x384676){while(--_0x384676){_0x4e9d3c['push'](_0x4e9d3c['shift']());}};_0x2d0825(++_0x1f4b98);}(_0x3ef0,0x19a));var _0x03ef=function(_0x57ae72,_0xc093a2){_0x57ae72=_0x57ae72-0x0;var _0x8dcc0=_0x3ef0[_0x57ae72];return _0x8dcc0;};'use strict';var multer=require(_0x03ef('0x0'));var util=require('util');var path=require(_0x03ef('0x1'));var timeout=require('connect-timeout');var express=require(_0x03ef('0x2'));var router=express['Router']();var auth=require(_0x03ef('0x3'));var interaction=require(_0x03ef('0x4'));var config=require(_0x03ef('0x5'));var controller=require('./attachment.controller');router['get']('/',auth[_0x03ef('0x6')](),controller[_0x03ef('0x7')]);router[_0x03ef('0x8')]('/:id',auth[_0x03ef('0x6')](),controller[_0x03ef('0x9')]);router[_0x03ef('0x8')](_0x03ef('0xa'),auth['isAuthenticated'](),controller['download']);var upload=multer({'storage':multer[_0x03ef('0xb')]({'destination':function(_0x6a6cd4,_0x2d3cc9,_0x52bd94){_0x52bd94(null,path[_0x03ef('0xc')](config[_0x03ef('0xd')],'server/files/attachments/'));},'filename':function(_0x269454,_0x278ff9,_0x2c7883){_0x2c7883(null,util['format'](_0x03ef('0xe'),Date[_0x03ef('0xf')](),_0x278ff9[_0x03ef('0x10')][_0x03ef('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x03ef('0x12')]('/',upload[_0x03ef('0x13')](_0x03ef('0x14')),controller[_0x03ef('0x15')]);router[_0x03ef('0x16')](_0x03ef('0x17'),auth[_0x03ef('0x6')](),controller['update']);router['delete'](_0x03ef('0x17'),auth[_0x03ef('0x6')](),controller[_0x03ef('0x18')]);module[_0x03ef('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js
index 93d321b..797f822 100644
--- a/server/api/authGoogle/authGoogle.controller.js
+++ b/server/api/authGoogle/authGoogle.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x624c=['Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','clearBlockUser','getLicense','catch','passport','passport-google-oauth20','Strategy','moment','../../mysqldb','../../components/auth/service','../../config/utils','authenticate','google','/login','profile','email','callback','use','clientID','clientSecret','secret','callbackURL','allowedLoginAttempts','then','User','find','map','emails','admin','user','agent','disabled','blockDuration','blocked','add'];(function(_0x2dbf6d,_0x1ed975){var _0x269475=function(_0x217213){while(--_0x217213){_0x2dbf6d['push'](_0x2dbf6d['shift']());}};_0x269475(++_0x1ed975);}(_0x624c,0x1ee));var _0xc624=function(_0x5de505,_0xee5804){_0x5de505=_0x5de505-0x0;var _0x1df98e=_0x624c[_0x5de505];return _0x1df98e;};'use strict';var _=require('lodash');var passport=require(_0xc624('0x0'));var GoogleStrategy=require(_0xc624('0x1'))[_0xc624('0x2')];var moment=require(_0xc624('0x3'));var db=require(_0xc624('0x4'))['db'];var config=require('../../config/environment');var signToken=require(_0xc624('0x5'))['signToken'];var utils=require(_0xc624('0x6'));exports['login']=passport[_0xc624('0x7')](_0xc624('0x8'),{'failureRedirect':_0xc624('0x9'),'scope':[_0xc624('0xa'),_0xc624('0xb')],'session':![]});exports[_0xc624('0xc')]=passport[_0xc624('0x7')]('google',{'failureRedirect':_0xc624('0x9'),'session':![]});passport[_0xc624('0xd')](new GoogleStrategy({'clientID':config[_0xc624('0x8')]?config['google'][_0xc624('0xe')]:'id','clientSecret':config[_0xc624('0x8')]?config['google'][_0xc624('0xf')]:_0xc624('0x10'),'callbackURL':config[_0xc624('0x8')]?config[_0xc624('0x8')][_0xc624('0x11')]:''},function(_0x558b51,_0x42760a,_0x25e874,_0xef673c){var _0x1a0f3d,_0x49c1e3;return db['Setting']['findOne']({'where':{'id':0x1},'attributes':[_0xc624('0x12'),'blockDuration'],'raw':!![]})[_0xc624('0x13')](function(_0x5c236e){_0x1a0f3d=_0x5c236e;return db[_0xc624('0x14')][_0xc624('0x15')]({'where':{'email':_[_0xc624('0x16')](_0x25e874[_0xc624('0x17')],'value'),'role':{'$or':[_0xc624('0x18'),_0xc624('0x19'),_0xc624('0x1a')]}}});})['then'](function(_0x190458){_0x49c1e3=_0x190458;if(_0x49c1e3){if(_0x49c1e3[_0xc624('0x1b')]){return _0xef673c('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(_0x1a0f3d[_0xc624('0x1c')]>0x0){if(_0x49c1e3[_0xc624('0x1d')]){if(moment(_0x49c1e3['blockedAt'])[_0xc624('0x1e')](_0x1a0f3d['blockDuration'],'minutes')>moment()){return _0xef673c(_0xc624('0x1f'));}else{return utils[_0xc624('0x20')](_0x49c1e3,0x0,![],null)[_0xc624('0x13')](function(){return utils[_0xc624('0x21')](_0x49c1e3);})[_0xc624('0x13')](function(){return _0xef673c(null,_0x49c1e3);});}}else{return utils['getLicense'](_0x49c1e3)[_0xc624('0x13')](function(){return _0xef673c(null,_0x49c1e3);});}}else{return utils[_0xc624('0x21')](_0x49c1e3)[_0xc624('0x13')](function(){return _0xef673c(null,_0x49c1e3);});}}return _0xef673c('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');})[_0xc624('0x22')](function(_0x5f0ac3){_0xef673c(_0x5f0ac3);});}));
\ No newline at end of file
+var _0x975f=['secret','Setting','findOne','allowedLoginAttempts','blockDuration','then','find','map','emails','value','admin','user','agent','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blocked','add','minutes','clearBlockUser','getLicense','catch','lodash','passport-google-oauth20','Strategy','moment','../../mysqldb','../../config/environment','../../components/auth/service','../../config/utils','login','google','/login','profile','email','callback','authenticate','clientID','clientSecret'];(function(_0xae9024,_0x17f58e){var _0x23e7d3=function(_0x5911fb){while(--_0x5911fb){_0xae9024['push'](_0xae9024['shift']());}};_0x23e7d3(++_0x17f58e);}(_0x975f,0x191));var _0xf975=function(_0x14363e,_0x4f0e0d){_0x14363e=_0x14363e-0x0;var _0x17c56d=_0x975f[_0x14363e];return _0x17c56d;};'use strict';var _=require(_0xf975('0x0'));var passport=require('passport');var GoogleStrategy=require(_0xf975('0x1'))[_0xf975('0x2')];var moment=require(_0xf975('0x3'));var db=require(_0xf975('0x4'))['db'];var config=require(_0xf975('0x5'));var signToken=require(_0xf975('0x6'))['signToken'];var utils=require(_0xf975('0x7'));exports[_0xf975('0x8')]=passport['authenticate'](_0xf975('0x9'),{'failureRedirect':_0xf975('0xa'),'scope':[_0xf975('0xb'),_0xf975('0xc')],'session':![]});exports[_0xf975('0xd')]=passport[_0xf975('0xe')]('google',{'failureRedirect':_0xf975('0xa'),'session':![]});passport['use'](new GoogleStrategy({'clientID':config[_0xf975('0x9')]?config['google'][_0xf975('0xf')]:'id','clientSecret':config[_0xf975('0x9')]?config['google'][_0xf975('0x10')]:_0xf975('0x11'),'callbackURL':config[_0xf975('0x9')]?config['google']['callbackURL']:''},function(_0x1c93d0,_0x1659ef,_0x549b46,_0x48177f){var _0x273011,_0x315222;return db[_0xf975('0x12')][_0xf975('0x13')]({'where':{'id':0x1},'attributes':[_0xf975('0x14'),_0xf975('0x15')],'raw':!![]})[_0xf975('0x16')](function(_0x31049d){_0x273011=_0x31049d;return db['User'][_0xf975('0x17')]({'where':{'email':_[_0xf975('0x18')](_0x549b46[_0xf975('0x19')],_0xf975('0x1a')),'role':{'$or':[_0xf975('0x1b'),_0xf975('0x1c'),_0xf975('0x1d')]}}});})[_0xf975('0x16')](function(_0x298207){_0x315222=_0x298207;if(_0x315222){if(_0x315222[_0xf975('0x1e')]){return _0x48177f(_0xf975('0x1f'));}else if(_0x273011[_0xf975('0x15')]>0x0){if(_0x315222[_0xf975('0x20')]){if(moment(_0x315222['blockedAt'])[_0xf975('0x21')](_0x273011[_0xf975('0x15')],_0xf975('0x22'))>moment()){return _0x48177f('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{return utils[_0xf975('0x23')](_0x315222,0x0,![],null)['then'](function(){return utils['getLicense'](_0x315222);})[_0xf975('0x16')](function(){return _0x48177f(null,_0x315222);});}}else{return utils[_0xf975('0x24')](_0x315222)[_0xf975('0x16')](function(){return _0x48177f(null,_0x315222);});}}else{return utils[_0xf975('0x24')](_0x315222)[_0xf975('0x16')](function(){return _0x48177f(null,_0x315222);});}}return _0x48177f(_0xf975('0x1f'));})[_0xf975('0x25')](function(_0x432c98){_0x48177f(_0x432c98);});}));
\ No newline at end of file
diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js
index 0195a91..ed1f9f9 100644
--- a/server/api/authGoogle/index.js
+++ b/server/api/authGoogle/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaab2=['setTokenCookie','exports','passport','Router','./authGoogle.controller','../../components/auth/service','get','login','/callback','isMiddleware'];(function(_0x95411e,_0x38b4c3){var _0x2c8718=function(_0x35c672){while(--_0x35c672){_0x95411e['push'](_0x95411e['shift']());}};_0x2c8718(++_0x38b4c3);}(_0xaab2,0xca));var _0x2aab=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0xaab2[_0x2b10c6];return _0x3789d2;};'use strict';var express=require('express');var passport=require(_0x2aab('0x0'));var router=express[_0x2aab('0x1')]();var controller=require(_0x2aab('0x2'));var userController=require('../user/user.controller.js');var authService=require(_0x2aab('0x3'));router[_0x2aab('0x4')]('/',controller[_0x2aab('0x5')]);router[_0x2aab('0x4')](_0x2aab('0x6'),controller['callback'],authService[_0x2aab('0x7')],userController['login'],authService[_0x2aab('0x8')]);module[_0x2aab('0x9')]=router;
\ No newline at end of file
+var _0xf211=['express','passport','Router','../user/user.controller.js','login','get','/callback','callback','isMiddleware','exports'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xf211,0x6e));var _0x1f21=function(_0x50e001,_0x45aa55){_0x50e001=_0x50e001-0x0;var _0x3fe4a2=_0xf211[_0x50e001];return _0x3fe4a2;};'use strict';var express=require(_0x1f21('0x0'));var passport=require(_0x1f21('0x1'));var router=express[_0x1f21('0x2')]();var controller=require('./authGoogle.controller');var userController=require(_0x1f21('0x3'));var authService=require('../../components/auth/service');router['get']('/',controller[_0x1f21('0x4')]);router[_0x1f21('0x5')](_0x1f21('0x6'),controller[_0x1f21('0x7')],authService[_0x1f21('0x8')],userController[_0x1f21('0x4')],authService['setTokenCookie']);module[_0x1f21('0x9')]=router;
\ No newline at end of file
diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js
index 93bd6c9..ff7ea04 100644
--- a/server/api/authLocal/authLocal.controller.js
+++ b/server/api/authLocal/authLocal.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xda63=['SendMail','error','format','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','stringify','status','message','test','authenticate','local','Something\x20went\x20wrong,\x20please\x20try\x20again.','json','forgot','email','Email\x20parameter\x20is\x20missing','generate','body','trim','toLowerCase','User','find','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','http://','headers','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','send','Reset\x20Email\x20sent!','reset','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','Setting','securePassword','resetPasswordToken','Password\x20reset!','use','passport-local','Strategy','jayson/promise','lodash','randomstring','../../mysqldb','../../components/auth/service','../../config/utils','client','findOne','then','password','salt','role','disabled','blockedAt','loginAttempts','admin','user','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','allowedLoginAttempts','blocked','add','blockDuration','minutes','clearBlockUser','catch','MailAccount','name','MailServerOut','Smtp','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','service','host','port','authentication','auth','\x22%s\x22\x20<%s>'];(function(_0x7091c,_0x1c8b47){var _0x13e015=function(_0x3f404e){while(--_0x3f404e){_0x7091c['push'](_0x7091c['shift']());}};_0x13e015(++_0x1c8b47);}(_0xda63,0x174));var _0x3da6=function(_0x11a3bb,_0x5c5466){_0x11a3bb=_0x11a3bb-0x0;var _0x3c3e36=_0xda63[_0x11a3bb];return _0x3c3e36;};'use strict';var util=require('util');var passport=require('passport');var LocalStrategy=require(_0x3da6('0x0'))[_0x3da6('0x1')];var jayson=require(_0x3da6('0x2'));var _=require(_0x3da6('0x3'));var rs=require(_0x3da6('0x4'));var moment=require('moment');var db=require(_0x3da6('0x5'))['db'];var signToken=require(_0x3da6('0x6'))['signToken'];var utils=require(_0x3da6('0x7'));var client=jayson[_0x3da6('0x8')]['http']({'port':0x232b});function localAuthenticate(_0x509e9b,_0x3de08c,_0xd96f6e,_0x300c11){var _0x1e2024,_0x58ee38;return db['Setting'][_0x3da6('0x9')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})[_0x3da6('0xa')](function(_0x5e3858){_0x1e2024=_0x5e3858;return _0x509e9b[_0x3da6('0x9')]({'attributes':['id','name',_0x3da6('0xb'),_0x3da6('0xc'),_0x3da6('0xd'),_0x3da6('0xe'),'blocked',_0x3da6('0xf'),_0x3da6('0x10')],'where':{'name':_0x3de08c,'role':{'$or':[_0x3da6('0x11'),_0x3da6('0x12'),'agent']}}});})[_0x3da6('0xa')](function(_0x58d831){if(!_0x58d831||_0x58d831&&_0x58d831['name']!==_0x3de08c){throw new Error(_0x3da6('0x13'));}else{_0x58ee38=_0x58d831;return _0x58ee38;}})['then'](function(){_0x58ee38['authenticate'](_0xd96f6e,function(_0x169b1d,_0xc2013e){var _0x1db8e1=_0x58ee38['loginAttempts']+0x1;if(_0x169b1d){return _0x300c11(_0x169b1d);}else if(!_0xc2013e){if(_0x58ee38[_0x3da6('0xe')]){return _0x300c11(null,![],{'message':_0x3da6('0x13')});}else if(_0x1e2024[_0x3da6('0x14')]>0x0){if(_0x58ee38[_0x3da6('0x15')]){if(_0x1e2024['blockDuration']>0x0){if(moment(_0x58ee38[_0x3da6('0xf')])[_0x3da6('0x16')](_0x1e2024[_0x3da6('0x17')],_0x3da6('0x18'))>moment()){return _0x300c11(null,![],{'message':_0x3da6('0x13')});}else{return utils[_0x3da6('0x19')](_0x58ee38,_0x1db8e1,![],null)['then'](function(){return _0x300c11(null,![],{'message':_0x3da6('0x13')});});}}else{return _0x300c11(null,![],{'message':_0x3da6('0x13')});}}else{if(_0x1db8e1>=_0x1e2024[_0x3da6('0x14')]){return utils['clearBlockUser'](_0x58ee38,0x0,!![],moment())[_0x3da6('0xa')](function(){return _0x300c11(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}else{return utils[_0x3da6('0x19')](_0x58ee38,_0x1db8e1,![],null)['then'](function(){return _0x300c11(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x300c11(null,![],{'message':_0x3da6('0x13')});}}else{if(_0x58ee38[_0x3da6('0xe')]){return _0x300c11(null,![],{'message':_0x3da6('0x13')});}else if(_0x1e2024[_0x3da6('0x14')]>0x0){if(_0x58ee38[_0x3da6('0x15')]){if(_0x1e2024[_0x3da6('0x17')]>0x0){if(moment(_0x58ee38[_0x3da6('0xf')])[_0x3da6('0x16')](_0x1e2024[_0x3da6('0x17')],'minutes')>moment()){return _0x300c11(null,![],{'message':_0x3da6('0x13')});}else{return utils[_0x3da6('0x19')](_0x58ee38,0x0,![],null)[_0x3da6('0xa')](function(){return utils['getLicense'](_0x58ee38);})[_0x3da6('0xa')](function(){return _0x300c11(null,_0x58ee38);});}}else{return _0x300c11(null,![],{'message':_0x3da6('0x13')});}}else{return utils[_0x3da6('0x19')](_0x58ee38,0x0,![],null)[_0x3da6('0xa')](function(){return utils['getLicense'](_0x58ee38);})[_0x3da6('0xa')](function(){return _0x300c11(null,_0x58ee38);})[_0x3da6('0x1a')](function(_0x4814bf){return _0x300c11(null,![],_0x4814bf);});}}else{if(_0x58ee38[_0x3da6('0x15')]){return _0x300c11(null,![],{'message':_0x3da6('0x13')});}else{return utils['getLicense'](_0x58ee38)[_0x3da6('0xa')](function(){return _0x300c11(null,_0x58ee38);});}}}});})[_0x3da6('0x1a')](function(_0x476af7){return _0x300c11(null,![],_0x476af7);});}function sendServiceMail(_0x387db9){return db[_0x3da6('0x1b')]['find']({'where':{'service':!![]},'attributes':['id',_0x3da6('0x1c'),'email'],'include':[{'model':db[_0x3da6('0x1d')],'as':_0x3da6('0x1e')}]})[_0x3da6('0xa')](function(_0x232cd0){if(!_0x232cd0){throw new Error(_0x3da6('0x1f'));}var _0x36ca82={'tls':{'rejectUnauthorized':![]}};if(_0x232cd0[_0x3da6('0x1e')][_0x3da6('0x20')]){_0x36ca82[_0x3da6('0x20')]=_0x232cd0[_0x3da6('0x1e')][_0x3da6('0x20')];}else{_0x36ca82[_0x3da6('0x21')]=_0x232cd0[_0x3da6('0x1e')][_0x3da6('0x21')];_0x36ca82[_0x3da6('0x22')]=_0x232cd0[_0x3da6('0x1e')][_0x3da6('0x22')];_0x36ca82['secure']=_0x232cd0[_0x3da6('0x1e')]['secure'];}if(_0x232cd0[_0x3da6('0x1e')][_0x3da6('0x23')]){_0x36ca82[_0x3da6('0x24')]={'user':_0x232cd0[_0x3da6('0x1e')][_0x3da6('0x12')],'pass':_0x232cd0[_0x3da6('0x1e')]['pass']};}var _0x306cae={'account':_0x36ca82,'message':_['merge']({'from':util['format'](_0x3da6('0x25'),_0x232cd0['name'],_0x232cd0['email']||_0x232cd0['Smtp'][_0x3da6('0x12')])},_0x387db9)};return client['request'](_0x3da6('0x26'),_0x306cae);})['then'](function(_0x111f91){if(_0x111f91[_0x3da6('0x27')]){throw new Error(util[_0x3da6('0x28')](_0x3da6('0x29'),_0x111f91['error']['message']||JSON[_0x3da6('0x2a')](_0x111f91['error'])));}return!![];});}function handleError(_0x5ce877,_0xee3dbc,_0x30d75f){return _0x5ce877[_0x3da6('0x2b')](_0xee3dbc||0x1f4)['send']({'message':_0x30d75f?_0x30d75f[_0x3da6('0x2c')]||_0x30d75f:''});}function checkPasswordPattern(_0xbd3761,_0x55e5bd,_0x1f2d9c){if(_0x1f2d9c){var _0x4b9b36=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4b9b36[_0x3da6('0x2d')](_0x55e5bd)){return _0xbd3761;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0xbd3761;}}exports['login']=function(_0x379ba4,_0x583be3,_0x3f19c8){passport[_0x3da6('0x2e')](_0x3da6('0x2f'),function(_0x5c203d,_0x17e621,_0x444b24){var _0x278e22=_0x5c203d||_0x444b24;if(_0x278e22){return handleError(_0x583be3,0x191,_0x278e22);}if(!_0x17e621){return handleError(_0x583be3,0x194,{'message':_0x3da6('0x30')});}else{var _0x47be2f=signToken(_0x17e621['id'],_0x17e621[_0x3da6('0xd')]);_0x583be3[_0x3da6('0x31')]({'id':_0x17e621['id'],'token':_0x47be2f,'statusCall':'','isAlreadyLogged':_0x17e621['online']});}})(_0x379ba4,_0x583be3,_0x3f19c8);};exports[_0x3da6('0x32')]=function(_0x375f21,_0x268c00,_0x51af48){if(!_0x375f21['body'][_0x3da6('0x33')]){return handleError(_0x268c00,0x1f4,{'message':_0x3da6('0x34')});}var _0x5c95bb=rs[_0x3da6('0x35')]();_0x375f21['body'][_0x3da6('0x33')]=_0x375f21[_0x3da6('0x36')][_0x3da6('0x33')][_0x3da6('0x37')]()[_0x3da6('0x38')]();var _0x24fc77;return db['Setting']['findOne']({'where':{'id':0x1},'attributes':[_0x3da6('0x14'),_0x3da6('0x17')],'raw':!![]})['then'](function(_0x4ff819){_0x24fc77=_0x4ff819;return db[_0x3da6('0x39')][_0x3da6('0x3a')]({'where':{'email':_0x375f21[_0x3da6('0x36')][_0x3da6('0x33')]}});})[_0x3da6('0xa')](function(_0x1cad05){if(!_0x1cad05){throw new Error(_0x3da6('0x3b'));}if(_0x1cad05[_0x3da6('0xe')]){throw new Error('The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.');}if(_0x1cad05['blocked']){if(moment(_0x1cad05[_0x3da6('0xf')])[_0x3da6('0x16')](_0x24fc77[_0x3da6('0x17')],_0x3da6('0x18'))>moment()){throw new Error(_0x3da6('0x3c'));}else{_0x1cad05[_0x3da6('0x15')]=![];_0x1cad05[_0x3da6('0xf')]=null;}}_0x1cad05['resetPasswordToken']=_0x5c95bb;_0x1cad05[_0x3da6('0x3d')]=Date[_0x3da6('0x3e')]()+0x36ee80;return _0x1cad05[_0x3da6('0x3f')]();})[_0x3da6('0xa')](function(){return sendServiceMail({'to':_0x375f21[_0x3da6('0x36')]['email'],'subject':_0x3da6('0x40'),'text':_0x3da6('0x41')+_0x3da6('0x42')+_0x3da6('0x43')+_0x375f21[_0x3da6('0x44')][_0x3da6('0x21')]+_0x3da6('0x45')+_0x5c95bb+'\x0a\x0a'+_0x3da6('0x46')});})[_0x3da6('0xa')](function(){_0x268c00[_0x3da6('0x2b')](0xc8)[_0x3da6('0x47')]({'message':_0x3da6('0x48')});})[_0x3da6('0x1a')](function(_0x3954eb){return handleError(_0x268c00,0x1f4,_0x3954eb);});};exports[_0x3da6('0x49')]=function(_0x3d3116,_0x21663f,_0x1b25b3){var _0x3a64f6;return db['User'][_0x3da6('0x3a')]({'where':{'resetPasswordToken':_0x3d3116[_0x3da6('0x4a')][_0x3da6('0x4b')],'resetPasswordExpires':{'$gt':Date[_0x3da6('0x3e')]()}}})[_0x3da6('0xa')](function(_0x3c1f4f){_0x3a64f6=_0x3c1f4f;if(!_0x3a64f6){throw new Error(_0x3da6('0x4c'));}return db[_0x3da6('0x4d')]['findOne']({'attributes':['id',_0x3da6('0x4e')]});})[_0x3da6('0xa')](function(_0x57aa75){return checkPasswordPattern(_0x57aa75,_0x3d3116[_0x3da6('0x36')][_0x3da6('0xb')],_0x57aa75[_0x3da6('0x4e')]);})['then'](function(){_0x3a64f6[_0x3da6('0xb')]=_0x3d3116['body'][_0x3da6('0xb')];_0x3a64f6[_0x3da6('0x4f')]=null;_0x3a64f6[_0x3da6('0x3d')]=null;return _0x3a64f6['save']();})[_0x3da6('0xa')](function(){_0x21663f['status'](0xc8)[_0x3da6('0x47')]({'message':_0x3da6('0x50')});})[_0x3da6('0x1a')](function(_0x2cee83){return handleError(_0x21663f,0x1f4,_0x2cee83);});};passport[_0x3da6('0x51')](new LocalStrategy({'usernameField':_0x3da6('0x1c'),'passwordField':_0x3da6('0xb')},function(_0x517bbc,_0x5715b3,_0x572b23){return localAuthenticate(db[_0x3da6('0x39')],_0x517bbc,_0x5715b3,_0x572b23);}));
\ No newline at end of file
+var _0xcc0e=['The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','login','local','json','online','forgot','Email\x20parameter\x20is\x20missing','body','trim','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','http://','headers','/reset/','find','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','resetPasswordToken','Password\x20reset!','util','passport','passport-local','randomstring','moment','client','http','Setting','findOne','allowedLoginAttempts','blockDuration','then','name','password','role','disabled','blocked','blockedAt','loginAttempts','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','add','minutes','clearBlockUser','getLicense','catch','MailAccount','email','MailServerOut','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','Smtp','service','host','port','secure','authentication','pass','merge','\x22%s\x22\x20<%s>','request','SendMail','error','format','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','status','send'];(function(_0x410612,_0x551c48){var _0xbfa860=function(_0x4fb412){while(--_0x4fb412){_0x410612['push'](_0x410612['shift']());}};_0xbfa860(++_0x551c48);}(_0xcc0e,0x10a));var _0xecc0=function(_0x32136d,_0x54433d){_0x32136d=_0x32136d-0x0;var _0x2baa85=_0xcc0e[_0x32136d];return _0x2baa85;};'use strict';var util=require(_0xecc0('0x0'));var passport=require(_0xecc0('0x1'));var LocalStrategy=require(_0xecc0('0x2'))['Strategy'];var jayson=require('jayson/promise');var _=require('lodash');var rs=require(_0xecc0('0x3'));var moment=require(_0xecc0('0x4'));var db=require('../../mysqldb')['db'];var signToken=require('../../components/auth/service')['signToken'];var utils=require('../../config/utils');var client=jayson[_0xecc0('0x5')][_0xecc0('0x6')]({'port':0x232b});function localAuthenticate(_0x8df83d,_0x4f9c44,_0x4bf038,_0x23338c){var _0x45c43e,_0x520eae;return db[_0xecc0('0x7')][_0xecc0('0x8')]({'where':{'id':0x1},'attributes':[_0xecc0('0x9'),_0xecc0('0xa')],'raw':!![]})[_0xecc0('0xb')](function(_0x2997c0){_0x45c43e=_0x2997c0;return _0x8df83d[_0xecc0('0x8')]({'attributes':['id',_0xecc0('0xc'),_0xecc0('0xd'),'salt',_0xecc0('0xe'),_0xecc0('0xf'),_0xecc0('0x10'),_0xecc0('0x11'),_0xecc0('0x12')],'where':{'name':_0x4f9c44,'role':{'$or':[_0xecc0('0x13'),_0xecc0('0x14'),_0xecc0('0x15')]}}});})['then'](function(_0x33395b){if(!_0x33395b||_0x33395b&&_0x33395b[_0xecc0('0xc')]!==_0x4f9c44){throw new Error(_0xecc0('0x16'));}else{_0x520eae=_0x33395b;return _0x520eae;}})['then'](function(){_0x520eae[_0xecc0('0x17')](_0x4bf038,function(_0x344d05,_0x4f33f0){var _0x4d2764=_0x520eae[_0xecc0('0x12')]+0x1;if(_0x344d05){return _0x23338c(_0x344d05);}else if(!_0x4f33f0){if(_0x520eae[_0xecc0('0xf')]){return _0x23338c(null,![],{'message':_0xecc0('0x16')});}else if(_0x45c43e[_0xecc0('0x9')]>0x0){if(_0x520eae[_0xecc0('0x10')]){if(_0x45c43e[_0xecc0('0xa')]>0x0){if(moment(_0x520eae['blockedAt'])[_0xecc0('0x18')](_0x45c43e[_0xecc0('0xa')],_0xecc0('0x19'))>moment()){return _0x23338c(null,![],{'message':_0xecc0('0x16')});}else{return utils[_0xecc0('0x1a')](_0x520eae,_0x4d2764,![],null)['then'](function(){return _0x23338c(null,![],{'message':_0xecc0('0x16')});});}}else{return _0x23338c(null,![],{'message':_0xecc0('0x16')});}}else{if(_0x4d2764>=_0x45c43e[_0xecc0('0x9')]){return utils[_0xecc0('0x1a')](_0x520eae,0x0,!![],moment())[_0xecc0('0xb')](function(){return _0x23338c(null,![],{'message':_0xecc0('0x16')});});}else{return utils[_0xecc0('0x1a')](_0x520eae,_0x4d2764,![],null)[_0xecc0('0xb')](function(){return _0x23338c(null,![],{'message':_0xecc0('0x16')});});}}}else{return _0x23338c(null,![],{'message':_0xecc0('0x16')});}}else{if(_0x520eae[_0xecc0('0xf')]){return _0x23338c(null,![],{'message':_0xecc0('0x16')});}else if(_0x45c43e[_0xecc0('0x9')]>0x0){if(_0x520eae[_0xecc0('0x10')]){if(_0x45c43e['blockDuration']>0x0){if(moment(_0x520eae[_0xecc0('0x11')])[_0xecc0('0x18')](_0x45c43e[_0xecc0('0xa')],_0xecc0('0x19'))>moment()){return _0x23338c(null,![],{'message':_0xecc0('0x16')});}else{return utils['clearBlockUser'](_0x520eae,0x0,![],null)['then'](function(){return utils[_0xecc0('0x1b')](_0x520eae);})[_0xecc0('0xb')](function(){return _0x23338c(null,_0x520eae);});}}else{return _0x23338c(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils[_0xecc0('0x1a')](_0x520eae,0x0,![],null)[_0xecc0('0xb')](function(){return utils[_0xecc0('0x1b')](_0x520eae);})['then'](function(){return _0x23338c(null,_0x520eae);})[_0xecc0('0x1c')](function(_0x170b91){return _0x23338c(null,![],_0x170b91);});}}else{if(_0x520eae['blocked']){return _0x23338c(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0xecc0('0x1b')](_0x520eae)[_0xecc0('0xb')](function(){return _0x23338c(null,_0x520eae);});}}}});})[_0xecc0('0x1c')](function(_0x597872){return _0x23338c(null,![],_0x597872);});}function sendServiceMail(_0xc49d56){return db[_0xecc0('0x1d')]['find']({'where':{'service':!![]},'attributes':['id','name',_0xecc0('0x1e')],'include':[{'model':db[_0xecc0('0x1f')],'as':'Smtp'}]})['then'](function(_0x13e118){if(!_0x13e118){throw new Error(_0xecc0('0x20'));}var _0x1d42e4={'tls':{'rejectUnauthorized':![]}};if(_0x13e118[_0xecc0('0x21')][_0xecc0('0x22')]){_0x1d42e4[_0xecc0('0x22')]=_0x13e118[_0xecc0('0x21')][_0xecc0('0x22')];}else{_0x1d42e4['host']=_0x13e118[_0xecc0('0x21')][_0xecc0('0x23')];_0x1d42e4[_0xecc0('0x24')]=_0x13e118[_0xecc0('0x21')]['port'];_0x1d42e4['secure']=_0x13e118[_0xecc0('0x21')][_0xecc0('0x25')];}if(_0x13e118['Smtp'][_0xecc0('0x26')]){_0x1d42e4['auth']={'user':_0x13e118[_0xecc0('0x21')][_0xecc0('0x14')],'pass':_0x13e118[_0xecc0('0x21')][_0xecc0('0x27')]};}var _0x1d9b86={'account':_0x1d42e4,'message':_[_0xecc0('0x28')]({'from':util['format'](_0xecc0('0x29'),_0x13e118[_0xecc0('0xc')],_0x13e118['email']||_0x13e118['Smtp']['user'])},_0xc49d56)};return client[_0xecc0('0x2a')](_0xecc0('0x2b'),_0x1d9b86);})[_0xecc0('0xb')](function(_0x331d2a){if(_0x331d2a[_0xecc0('0x2c')]){throw new Error(util[_0xecc0('0x2d')](_0xecc0('0x2e'),_0x331d2a['error'][_0xecc0('0x2f')]||JSON['stringify'](_0x331d2a[_0xecc0('0x2c')])));}return!![];});}function handleError(_0x3b8a77,_0x49729d,_0x2d6752){return _0x3b8a77[_0xecc0('0x30')](_0x49729d||0x1f4)[_0xecc0('0x31')]({'message':_0x2d6752?_0x2d6752[_0xecc0('0x2f')]||_0x2d6752:''});}function checkPasswordPattern(_0x3e9703,_0xf51995,_0x1d252a){if(_0x1d252a){var _0x4ad8ac=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4ad8ac['test'](_0xf51995)){return _0x3e9703;}else{throw new Error(_0xecc0('0x32'));}}else{return _0x3e9703;}}exports[_0xecc0('0x33')]=function(_0x1d41d1,_0x79cb94,_0x3c1450){passport[_0xecc0('0x17')](_0xecc0('0x34'),function(_0x23d002,_0x4b8874,_0x8f8773){var _0x52b589=_0x23d002||_0x8f8773;if(_0x52b589){return handleError(_0x79cb94,0x191,_0x52b589);}if(!_0x4b8874){return handleError(_0x79cb94,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x13e37d=signToken(_0x4b8874['id'],_0x4b8874[_0xecc0('0xe')]);_0x79cb94[_0xecc0('0x35')]({'id':_0x4b8874['id'],'token':_0x13e37d,'statusCall':'','isAlreadyLogged':_0x4b8874[_0xecc0('0x36')]});}})(_0x1d41d1,_0x79cb94,_0x3c1450);};exports[_0xecc0('0x37')]=function(_0x39c805,_0x409296,_0x37edbc){if(!_0x39c805['body']['email']){return handleError(_0x409296,0x1f4,{'message':_0xecc0('0x38')});}var _0x297394=rs['generate']();_0x39c805[_0xecc0('0x39')][_0xecc0('0x1e')]=_0x39c805[_0xecc0('0x39')][_0xecc0('0x1e')][_0xecc0('0x3a')]()[_0xecc0('0x3b')]();var _0x15b095;return db[_0xecc0('0x7')][_0xecc0('0x8')]({'where':{'id':0x1},'attributes':[_0xecc0('0x9'),_0xecc0('0xa')],'raw':!![]})[_0xecc0('0xb')](function(_0x301c3e){_0x15b095=_0x301c3e;return db[_0xecc0('0x3c')]['find']({'where':{'email':_0x39c805[_0xecc0('0x39')][_0xecc0('0x1e')]}});})['then'](function(_0x5be5d8){if(!_0x5be5d8){throw new Error(_0xecc0('0x3d'));}if(_0x5be5d8[_0xecc0('0xf')]){throw new Error(_0xecc0('0x3e'));}if(_0x5be5d8[_0xecc0('0x10')]){if(moment(_0x5be5d8[_0xecc0('0x11')])['add'](_0x15b095[_0xecc0('0xa')],_0xecc0('0x19'))>moment()){throw new Error(_0xecc0('0x3f'));}else{_0x5be5d8[_0xecc0('0x10')]=![];_0x5be5d8[_0xecc0('0x11')]=null;}}_0x5be5d8['resetPasswordToken']=_0x297394;_0x5be5d8[_0xecc0('0x40')]=Date[_0xecc0('0x41')]()+0x36ee80;return _0x5be5d8[_0xecc0('0x42')]();})['then'](function(){return sendServiceMail({'to':_0x39c805[_0xecc0('0x39')]['email'],'subject':_0xecc0('0x43'),'text':'You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a'+_0xecc0('0x44')+_0xecc0('0x45')+_0x39c805[_0xecc0('0x46')][_0xecc0('0x23')]+_0xecc0('0x47')+_0x297394+'\x0a\x0a'+'If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a'});})['then'](function(){_0x409296[_0xecc0('0x30')](0xc8)['send']({'message':'Reset\x20Email\x20sent!'});})['catch'](function(_0x485ded){return handleError(_0x409296,0x1f4,_0x485ded);});};exports['reset']=function(_0x3877e8,_0x18cd89,_0x2fe751){var _0x33b379;return db[_0xecc0('0x3c')][_0xecc0('0x48')]({'where':{'resetPasswordToken':_0x3877e8[_0xecc0('0x49')][_0xecc0('0x4a')],'resetPasswordExpires':{'$gt':Date['now']()}}})[_0xecc0('0xb')](function(_0x254d10){_0x33b379=_0x254d10;if(!_0x33b379){throw new Error(_0xecc0('0x4b'));}return db[_0xecc0('0x7')]['findOne']({'attributes':['id',_0xecc0('0x4c')]});})[_0xecc0('0xb')](function(_0x17a04d){return checkPasswordPattern(_0x17a04d,_0x3877e8[_0xecc0('0x39')][_0xecc0('0xd')],_0x17a04d[_0xecc0('0x4c')]);})[_0xecc0('0xb')](function(){_0x33b379['password']=_0x3877e8[_0xecc0('0x39')][_0xecc0('0xd')];_0x33b379[_0xecc0('0x4d')]=null;_0x33b379[_0xecc0('0x40')]=null;return _0x33b379[_0xecc0('0x42')]();})[_0xecc0('0xb')](function(){_0x18cd89['status'](0xc8)[_0xecc0('0x31')]({'message':_0xecc0('0x4e')});})['catch'](function(_0x245412){return handleError(_0x18cd89,0x1f4,_0x245412);});};passport['use'](new LocalStrategy({'usernameField':'name','passwordField':_0xecc0('0xd')},function(_0x5d9dfc,_0x5d1434,_0x327082){return localAuthenticate(db[_0xecc0('0x3c')],_0x5d9dfc,_0x5d1434,_0x327082);}));
\ No newline at end of file
diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js
index 821fdcf..59a7b98 100644
--- a/server/api/authLocal/index.js
+++ b/server/api/authLocal/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1c44=['post','login','/forgot','forgot','/reset/:token','reset','exports','express','./authLocal.controller'];(function(_0x2bc5f6,_0x459b0e){var _0x22963c=function(_0x32932c){while(--_0x32932c){_0x2bc5f6['push'](_0x2bc5f6['shift']());}};_0x22963c(++_0x459b0e);}(_0x1c44,0x16f));var _0x41c4=function(_0x5cb72e,_0x7ed69f){_0x5cb72e=_0x5cb72e-0x0;var _0xfafa53=_0x1c44[_0x5cb72e];return _0xfafa53;};'use strict';var express=require(_0x41c4('0x0'));var router=express['Router']();var controller=require(_0x41c4('0x1'));router[_0x41c4('0x2')]('/',controller[_0x41c4('0x3')]);router['post'](_0x41c4('0x4'),controller[_0x41c4('0x5')]);router['post'](_0x41c4('0x6'),controller[_0x41c4('0x7')]);module[_0x41c4('0x8')]=router;
\ No newline at end of file
+var _0xe8a6=['Router','post','login','/forgot','/reset/:token','reset','exports'];(function(_0x2aa0e7,_0x4e5145){var _0x1472c0=function(_0x4deaeb){while(--_0x4deaeb){_0x2aa0e7['push'](_0x2aa0e7['shift']());}};_0x1472c0(++_0x4e5145);}(_0xe8a6,0x1dc));var _0x6e8a=function(_0x5e6943,_0x3cc8c2){_0x5e6943=_0x5e6943-0x0;var _0x935eb1=_0xe8a6[_0x5e6943];return _0x935eb1;};'use strict';var express=require('express');var router=express[_0x6e8a('0x0')]();var controller=require('./authLocal.controller');router[_0x6e8a('0x1')]('/',controller[_0x6e8a('0x2')]);router[_0x6e8a('0x1')](_0x6e8a('0x3'),controller['forgot']);router[_0x6e8a('0x1')](_0x6e8a('0x4'),controller[_0x6e8a('0x5')]);module[_0x6e8a('0x6')]=router;
\ No newline at end of file
diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js
index 48d8bfc..0f12b97 100644
--- a/server/api/automation/automation.attributes.js
+++ b/server/api/automation/automation.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ed6=['exports','STRING','BOOLEAN','INTEGER'];(function(_0x18eaac,_0x17dea2){var _0x1c2bd4=function(_0x483740){while(--_0x483740){_0x18eaac['push'](_0x18eaac['shift']());}};_0x1c2bd4(++_0x17dea2);}(_0x2ed6,0x128));var _0x62ed=function(_0x17a83d,_0x3e343b){_0x17a83d=_0x17a83d-0x0;var _0x5ef8a3=_0x2ed6[_0x17a83d];return _0x5ef8a3;};'use strict';var Sequelize=require('sequelize');module[_0x62ed('0x0')]={'name':{'type':Sequelize[_0x62ed('0x1')],'allowNull':![]},'channel':{'type':Sequelize[_0x62ed('0x1')]},'description':{'type':Sequelize[_0x62ed('0x1')]},'status':{'type':Sequelize[_0x62ed('0x2')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x62ed('0x3')],'defaultValue':0xa}};
\ No newline at end of file
+var _0xd6ab=['BOOLEAN','INTEGER','sequelize','exports','STRING'];(function(_0x5b78e8,_0x55096b){var _0xf2c321=function(_0x4e0cff){while(--_0x4e0cff){_0x5b78e8['push'](_0x5b78e8['shift']());}};_0xf2c321(++_0x55096b);}(_0xd6ab,0x124));var _0xbd6a=function(_0x5195c3,_0x591d50){_0x5195c3=_0x5195c3-0x0;var _0x541d40=_0xd6ab[_0x5195c3];return _0x541d40;};'use strict';var Sequelize=require(_0xbd6a('0x0'));module[_0xbd6a('0x1')]={'name':{'type':Sequelize[_0xbd6a('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0xbd6a('0x2')]},'description':{'type':Sequelize[_0xbd6a('0x2')]},'status':{'type':Sequelize[_0xbd6a('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0xbd6a('0x4')],'defaultValue':0xa}};
\ No newline at end of file
diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js
index e91bb64..7c2b172 100644
--- a/server/api/automation/automation.controller.js
+++ b/server/api/automation/automation.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3b8f=['destroy','error','stack','name','send','Automation','rawAttributes','keys','query','filters','intersection','model','attributes','fields','nolimit','order','sort','where','pick','filter','map','type','key','VIRTUAL','field','merge','includeAll','include','rows','catch','show','params','length','options','create','body','find','addConditions','Condition','omit','ids','getConditions','hasOwnProperty','addActions','Action','findOne','getActions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then'];(function(_0x431eb9,_0x12c01b){var _0x5b05f1=function(_0x3c6abc){while(--_0x3c6abc){_0x431eb9['push'](_0x431eb9['shift']());}};_0x5b05f1(++_0x12c01b);}(_0x3b8f,0x83));var _0xf3b8=function(_0x15c665,_0x4d73ca){_0x15c665=_0x15c665-0x0;var _0x4e614c=_0x3b8f[_0x15c665];return _0x4e614c;};'use strict';var pdf=require(_0xf3b8('0x0'));var emlformat=require(_0xf3b8('0x1'));var rimraf=require(_0xf3b8('0x2'));var zipdir=require(_0xf3b8('0x3'));var jsonpatch=require(_0xf3b8('0x4'));var rp=require('request-promise');var moment=require(_0xf3b8('0x5'));var BPromise=require(_0xf3b8('0x6'));var Mustache=require(_0xf3b8('0x7'));var util=require('util');var path=require('path');var sox=require(_0xf3b8('0x8'));var csv=require(_0xf3b8('0x9'));var ejs=require(_0xf3b8('0xa'));var fs=require('fs');var _=require(_0xf3b8('0xb'));var squel=require(_0xf3b8('0xc'));var crypto=require(_0xf3b8('0xd'));var jsforce=require(_0xf3b8('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xf3b8('0x9'));var querystring=require(_0xf3b8('0xf'));var Papa=require(_0xf3b8('0x10'));var Redis=require(_0xf3b8('0x11'));var authService=require(_0xf3b8('0x12'));var qs=require(_0xf3b8('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf3b8('0x14'))('api');var utils=require('../../config/utils');var config=require(_0xf3b8('0x15'));var db=require(_0xf3b8('0x16'))['db'];function respondWithStatusCode(_0x5e0d5d,_0x580917){_0x580917=_0x580917||0xcc;return function(_0x38ce5a){if(_0x38ce5a){return _0x5e0d5d[_0xf3b8('0x17')](_0x580917);}return _0x5e0d5d[_0xf3b8('0x18')](_0x580917)[_0xf3b8('0x19')]();};}function respondWithResult(_0x338898,_0x513628){_0x513628=_0x513628||0xc8;return function(_0x92b6c9){if(_0x92b6c9){return _0x338898['status'](_0x513628)['json'](_0x92b6c9);}};}function respondWithFilteredResult(_0x1ee345,_0x14a772){return function(_0x3abfcd){if(_0x3abfcd){var _0x4a0454=_0x3abfcd[_0xf3b8('0x1a')],_0xe30082=_0x14a772[_0xf3b8('0x1b')],_0x57c9c7=_0x14a772[_0xf3b8('0x1b')]+_0x14a772[_0xf3b8('0x1c')],_0x4c70f4;if(_0x57c9c7>=_0x4a0454){_0x57c9c7=_0x4a0454;_0x4c70f4=0xc8;}else{_0x4c70f4=0xce;}_0x1ee345[_0xf3b8('0x18')](_0x4c70f4);return _0x1ee345[_0xf3b8('0x1d')](_0xf3b8('0x1e'),_0xe30082+'-'+_0x57c9c7+'/'+_0x4a0454)[_0xf3b8('0x1f')](_0x3abfcd);}return null;};}function patchUpdates(_0x4d8a09){return function(_0x550e4d){try{jsonpatch[_0xf3b8('0x20')](_0x550e4d,_0x4d8a09,!![]);}catch(_0x2826d8){return BPromise[_0xf3b8('0x21')](_0x2826d8);}return _0x550e4d[_0xf3b8('0x22')]();};}function saveUpdates(_0x68dbcf,_0x13eb37){return function(_0x17a417){if(_0x17a417){return _0x17a417[_0xf3b8('0x23')](_0x68dbcf)[_0xf3b8('0x24')](function(_0x1cc711){return _0x1cc711;});}return null;};}function removeEntity(_0x3187a7,_0x24dae1){return function(_0x316284){if(_0x316284){return _0x316284[_0xf3b8('0x25')]()[_0xf3b8('0x24')](function(){_0x3187a7[_0xf3b8('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x185e4b,_0x3c2cb8){return function(_0x56ff20){if(!_0x56ff20){_0x185e4b[_0xf3b8('0x17')](0x194);}return _0x56ff20;};}function handleError(_0x531a40,_0x165d84){_0x165d84=_0x165d84||0x1f4;return function(_0x56014e){logger[_0xf3b8('0x26')](_0x56014e[_0xf3b8('0x27')]);if(_0x56014e[_0xf3b8('0x28')]){delete _0x56014e[_0xf3b8('0x28')];}_0x531a40['status'](_0x165d84)[_0xf3b8('0x29')](_0x56014e);};}exports['index']=function(_0x43925e,_0x48ded){var _0x5ccf73={},_0x2dbd65={},_0x428ac3={'count':0x0,'rows':[]};var _0x479dbf=db[_0xf3b8('0x2a')][_0xf3b8('0x2b')];_0x2dbd65['model']=_[_0xf3b8('0x2c')](_0x479dbf);_0x2dbd65[_0xf3b8('0x2d')]=_[_0xf3b8('0x2c')](_0x43925e[_0xf3b8('0x2d')]);_0x2dbd65[_0xf3b8('0x2e')]=_[_0xf3b8('0x2f')](_0x2dbd65[_0xf3b8('0x30')],_0x2dbd65['query']);_0x5ccf73[_0xf3b8('0x31')]=_[_0xf3b8('0x2f')](_0x2dbd65[_0xf3b8('0x30')],qs[_0xf3b8('0x32')](_0x43925e[_0xf3b8('0x2d')]['fields']));_0x5ccf73[_0xf3b8('0x31')]=_0x5ccf73[_0xf3b8('0x31')]['length']?_0x5ccf73['attributes']:_0x2dbd65[_0xf3b8('0x30')];if(!_0x43925e[_0xf3b8('0x2d')]['hasOwnProperty'](_0xf3b8('0x33'))){_0x5ccf73[_0xf3b8('0x1c')]=qs['limit'](_0x43925e[_0xf3b8('0x2d')][_0xf3b8('0x1c')]);_0x5ccf73[_0xf3b8('0x1b')]=qs['offset'](_0x43925e[_0xf3b8('0x2d')][_0xf3b8('0x1b')]);}_0x5ccf73[_0xf3b8('0x34')]=qs['sort'](_0x43925e[_0xf3b8('0x2d')][_0xf3b8('0x35')]);_0x5ccf73[_0xf3b8('0x36')]=qs['filters'](_[_0xf3b8('0x37')](_0x43925e['query'],_0x2dbd65['filters']));if(_0x43925e[_0xf3b8('0x2d')][_0xf3b8('0x38')]){_0x5ccf73[_0xf3b8('0x36')]=_['merge'](_0x5ccf73[_0xf3b8('0x36')],{'$or':_[_0xf3b8('0x39')](_0x479dbf,function(_0x17ef41){if(_0x17ef41[_0xf3b8('0x3a')][_0xf3b8('0x3b')]!==_0xf3b8('0x3c')){var _0x34043f={};_0x34043f[_0x17ef41[_0xf3b8('0x3d')]]={'$like':'%'+_0x43925e[_0xf3b8('0x2d')]['filter']+'%'};return _0x34043f;}})});}_0x5ccf73=_[_0xf3b8('0x3e')]({},_0x5ccf73,_0x43925e['options']);var _0x162d25={'where':_0x5ccf73[_0xf3b8('0x36')]};return db[_0xf3b8('0x2a')]['count'](_0x162d25)['then'](function(_0x25ac3e){_0x428ac3[_0xf3b8('0x1a')]=_0x25ac3e;if(_0x43925e['query'][_0xf3b8('0x3f')]){_0x5ccf73[_0xf3b8('0x40')]=[{'all':!![]}];}return db[_0xf3b8('0x2a')]['findAll'](_0x5ccf73);})[_0xf3b8('0x24')](function(_0x19cfd7){_0x428ac3[_0xf3b8('0x41')]=_0x19cfd7;return _0x428ac3;})[_0xf3b8('0x24')](respondWithFilteredResult(_0x48ded,_0x5ccf73))[_0xf3b8('0x42')](handleError(_0x48ded,null));};exports[_0xf3b8('0x43')]=function(_0x371deb,_0x21fa25){var _0x3d8a13={'raw':![],'where':{'id':_0x371deb[_0xf3b8('0x44')]['id']}},_0x1863dd={};_0x1863dd[_0xf3b8('0x30')]=_[_0xf3b8('0x2c')](db[_0xf3b8('0x2a')][_0xf3b8('0x2b')]);_0x1863dd[_0xf3b8('0x2d')]=_['keys'](_0x371deb[_0xf3b8('0x2d')]);_0x1863dd[_0xf3b8('0x2e')]=_[_0xf3b8('0x2f')](_0x1863dd[_0xf3b8('0x30')],_0x1863dd[_0xf3b8('0x2d')]);_0x3d8a13[_0xf3b8('0x31')]=_['intersection'](_0x1863dd[_0xf3b8('0x30')],qs['fields'](_0x371deb[_0xf3b8('0x2d')][_0xf3b8('0x32')]));_0x3d8a13[_0xf3b8('0x31')]=_0x3d8a13[_0xf3b8('0x31')][_0xf3b8('0x45')]?_0x3d8a13[_0xf3b8('0x31')]:_0x1863dd[_0xf3b8('0x30')];if(_0x371deb[_0xf3b8('0x2d')][_0xf3b8('0x3f')]){_0x3d8a13['include']=[{'all':!![]}];}_0x3d8a13=_['merge']({},_0x3d8a13,_0x371deb[_0xf3b8('0x46')]);return db[_0xf3b8('0x2a')]['find'](_0x3d8a13)[_0xf3b8('0x24')](handleEntityNotFound(_0x21fa25,null))['then'](respondWithResult(_0x21fa25,null))[_0xf3b8('0x42')](handleError(_0x21fa25,null));};exports[_0xf3b8('0x47')]=function(_0x467a7a,_0x56e299){return db[_0xf3b8('0x2a')][_0xf3b8('0x47')](_0x467a7a[_0xf3b8('0x48')],{})[_0xf3b8('0x24')](respondWithResult(_0x56e299,0xc9))[_0xf3b8('0x42')](handleError(_0x56e299,null));};exports[_0xf3b8('0x23')]=function(_0x5bd29d,_0x223006){if(_0x5bd29d[_0xf3b8('0x48')]['id']){delete _0x5bd29d[_0xf3b8('0x48')]['id'];}return db[_0xf3b8('0x2a')][_0xf3b8('0x49')]({'where':{'id':_0x5bd29d[_0xf3b8('0x44')]['id']}})['then'](handleEntityNotFound(_0x223006,null))[_0xf3b8('0x24')](saveUpdates(_0x5bd29d['body'],null))[_0xf3b8('0x24')](respondWithResult(_0x223006,null))[_0xf3b8('0x42')](handleError(_0x223006,null));};exports['destroy']=function(_0x18ae15,_0x30119c){return db['Automation'][_0xf3b8('0x49')]({'where':{'id':_0x18ae15[_0xf3b8('0x44')]['id']}})[_0xf3b8('0x24')](handleEntityNotFound(_0x30119c,null))['then'](removeEntity(_0x30119c,null))[_0xf3b8('0x42')](handleError(_0x30119c,null));};exports[_0xf3b8('0x4a')]=function(_0x5893a1,_0xffdd15,_0x36c3b6){return db[_0xf3b8('0x4b')][_0xf3b8('0x49')]({'where':{'id':_0x5893a1[_0xf3b8('0x44')]['id']}})[_0xf3b8('0x24')](handleEntityNotFound(_0xffdd15,null))[_0xf3b8('0x24')](function(_0x3f2190){if(_0x3f2190){return _0x3f2190[_0xf3b8('0x4a')](_0x5893a1[_0xf3b8('0x48')]['ids'],_[_0xf3b8('0x4c')](_0x5893a1[_0xf3b8('0x48')],[_0xf3b8('0x4d'),'id'])||{});}})[_0xf3b8('0x24')](respondWithResult(_0xffdd15,null))[_0xf3b8('0x42')](handleError(_0xffdd15,null));};exports[_0xf3b8('0x4e')]=function(_0x54b314,_0x59853c,_0x3da577){var _0x257820={};var _0x1e4491={};var _0x1f95cc;var _0x5d32ea;return db[_0xf3b8('0x2a')]['findOne']({'where':{'id':_0x54b314[_0xf3b8('0x44')]['id']}})[_0xf3b8('0x24')](handleEntityNotFound(_0x59853c,null))['then'](function(_0x5e2d87){if(_0x5e2d87){_0x1f95cc=_0x5e2d87;_0x1e4491[_0xf3b8('0x30')]=_[_0xf3b8('0x2c')](db[_0xf3b8('0x4b')]['rawAttributes']);_0x1e4491['query']=_['keys'](_0x54b314[_0xf3b8('0x2d')]);_0x1e4491[_0xf3b8('0x2e')]=_[_0xf3b8('0x2f')](_0x1e4491[_0xf3b8('0x30')],_0x1e4491[_0xf3b8('0x2d')]);_0x257820[_0xf3b8('0x31')]=_[_0xf3b8('0x2f')](_0x1e4491[_0xf3b8('0x30')],qs['fields'](_0x54b314['query'][_0xf3b8('0x32')]));_0x257820[_0xf3b8('0x31')]=_0x257820[_0xf3b8('0x31')][_0xf3b8('0x45')]?_0x257820[_0xf3b8('0x31')]:_0x1e4491[_0xf3b8('0x30')];_0x257820[_0xf3b8('0x34')]=qs[_0xf3b8('0x35')](_0x54b314[_0xf3b8('0x2d')][_0xf3b8('0x35')]);_0x257820['where']=qs[_0xf3b8('0x2e')](_[_0xf3b8('0x37')](_0x54b314['query'],_0x1e4491[_0xf3b8('0x2e')]));if(_0x54b314[_0xf3b8('0x2d')][_0xf3b8('0x38')]){_0x257820[_0xf3b8('0x36')]=_[_0xf3b8('0x3e')](_0x257820[_0xf3b8('0x36')],{'$or':_[_0xf3b8('0x39')](_0x257820[_0xf3b8('0x31')],function(_0x490644){var _0x195274={};_0x195274[_0x490644]={'$like':'%'+_0x54b314['query'][_0xf3b8('0x38')]+'%'};return _0x195274;})});}_0x257820=_[_0xf3b8('0x3e')]({},_0x257820,_0x54b314[_0xf3b8('0x46')]);return _0x1f95cc[_0xf3b8('0x4e')](_0x257820);}})[_0xf3b8('0x24')](function(_0x90adfb){if(_0x90adfb){_0x5d32ea=_0x90adfb['length'];if(!_0x54b314['query'][_0xf3b8('0x4f')](_0xf3b8('0x33'))){_0x257820['limit']=qs['limit'](_0x54b314['query'][_0xf3b8('0x1c')]);_0x257820[_0xf3b8('0x1b')]=qs[_0xf3b8('0x1b')](_0x54b314['query'][_0xf3b8('0x1b')]);}return _0x1f95cc['getConditions'](_0x257820);}})[_0xf3b8('0x24')](function(_0x4a9d46){if(_0x4a9d46){return _0x4a9d46?{'count':_0x5d32ea,'rows':_0x4a9d46}:null;}})[_0xf3b8('0x24')](respondWithResult(_0x59853c,null))['catch'](handleError(_0x59853c,null));};exports[_0xf3b8('0x50')]=function(_0x37efe2,_0x12edf1,_0x147c4d){return db[_0xf3b8('0x51')]['find']({'where':{'id':_0x37efe2[_0xf3b8('0x44')]['id']}})[_0xf3b8('0x24')](handleEntityNotFound(_0x12edf1,null))[_0xf3b8('0x24')](function(_0x34fc25){if(_0x34fc25){return _0x34fc25[_0xf3b8('0x50')](_0x37efe2['body'][_0xf3b8('0x4d')],_[_0xf3b8('0x4c')](_0x37efe2['body'],[_0xf3b8('0x4d'),'id'])||{});}})[_0xf3b8('0x24')](respondWithResult(_0x12edf1,null))[_0xf3b8('0x42')](handleError(_0x12edf1,null));};exports['getActions']=function(_0x4ff03a,_0x22dd18,_0x4b494d){var _0x284434={};var _0x153ad4={};var _0x341a80;var _0x3f1aaf;return db[_0xf3b8('0x2a')][_0xf3b8('0x52')]({'where':{'id':_0x4ff03a['params']['id']}})[_0xf3b8('0x24')](handleEntityNotFound(_0x22dd18,null))[_0xf3b8('0x24')](function(_0x128005){if(_0x128005){_0x341a80=_0x128005;_0x153ad4[_0xf3b8('0x30')]=_[_0xf3b8('0x2c')](db[_0xf3b8('0x51')][_0xf3b8('0x2b')]);_0x153ad4[_0xf3b8('0x2d')]=_[_0xf3b8('0x2c')](_0x4ff03a[_0xf3b8('0x2d')]);_0x153ad4[_0xf3b8('0x2e')]=_[_0xf3b8('0x2f')](_0x153ad4[_0xf3b8('0x30')],_0x153ad4[_0xf3b8('0x2d')]);_0x284434[_0xf3b8('0x31')]=_[_0xf3b8('0x2f')](_0x153ad4['model'],qs[_0xf3b8('0x32')](_0x4ff03a[_0xf3b8('0x2d')][_0xf3b8('0x32')]));_0x284434[_0xf3b8('0x31')]=_0x284434['attributes'][_0xf3b8('0x45')]?_0x284434[_0xf3b8('0x31')]:_0x153ad4[_0xf3b8('0x30')];_0x284434[_0xf3b8('0x34')]=qs[_0xf3b8('0x35')](_0x4ff03a['query'][_0xf3b8('0x35')]);_0x284434['where']=qs[_0xf3b8('0x2e')](_[_0xf3b8('0x37')](_0x4ff03a[_0xf3b8('0x2d')],_0x153ad4['filters']));if(_0x4ff03a[_0xf3b8('0x2d')][_0xf3b8('0x38')]){_0x284434[_0xf3b8('0x36')]=_['merge'](_0x284434[_0xf3b8('0x36')],{'$or':_[_0xf3b8('0x39')](_0x284434['attributes'],function(_0x315c57){var _0x57cc16={};_0x57cc16[_0x315c57]={'$like':'%'+_0x4ff03a['query'][_0xf3b8('0x38')]+'%'};return _0x57cc16;})});}_0x284434=_['merge']({},_0x284434,_0x4ff03a['options']);return _0x341a80[_0xf3b8('0x53')](_0x284434);}})[_0xf3b8('0x24')](function(_0x1430eb){if(_0x1430eb){_0x3f1aaf=_0x1430eb['length'];if(!_0x4ff03a['query'][_0xf3b8('0x4f')](_0xf3b8('0x33'))){_0x284434[_0xf3b8('0x1c')]=qs[_0xf3b8('0x1c')](_0x4ff03a[_0xf3b8('0x2d')][_0xf3b8('0x1c')]);_0x284434[_0xf3b8('0x1b')]=qs[_0xf3b8('0x1b')](_0x4ff03a[_0xf3b8('0x2d')][_0xf3b8('0x1b')]);}return _0x341a80[_0xf3b8('0x53')](_0x284434);}})[_0xf3b8('0x24')](function(_0x168d57){if(_0x168d57){return _0x168d57?{'count':_0x3f1aaf,'rows':_0x168d57}:null;}})['then'](respondWithResult(_0x22dd18,null))['catch'](handleError(_0x22dd18,null));};
\ No newline at end of file
+var _0x00c2=['includeAll','findAll','rows','catch','params','length','include','options','create','body','update','find','addConditions','ids','omit','getConditions','findOne','Condition','pick','addActions','Action','getActions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','apply','reject','destroy','sendStatus','stack','name','index','Automation','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','map','type','VIRTUAL','merge','then'];(function(_0x5f3f88,_0x562baf){var _0xd08119=function(_0x42dbf7){while(--_0x42dbf7){_0x5f3f88['push'](_0x5f3f88['shift']());}};_0xd08119(++_0x562baf);}(_0x00c2,0x16e));var _0x200c=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x00c2[_0x1facfa];return _0x9ec701;};'use strict';var pdf=require(_0x200c('0x0'));var emlformat=require(_0x200c('0x1'));var rimraf=require(_0x200c('0x2'));var zipdir=require(_0x200c('0x3'));var jsonpatch=require(_0x200c('0x4'));var rp=require(_0x200c('0x5'));var moment=require(_0x200c('0x6'));var BPromise=require(_0x200c('0x7'));var Mustache=require(_0x200c('0x8'));var util=require(_0x200c('0x9'));var path=require(_0x200c('0xa'));var sox=require(_0x200c('0xb'));var csv=require(_0x200c('0xc'));var ejs=require(_0x200c('0xd'));var fs=require('fs');var _=require(_0x200c('0xe'));var squel=require(_0x200c('0xf'));var crypto=require(_0x200c('0x10'));var jsforce=require(_0x200c('0x11'));var deskjs=require(_0x200c('0x12'));var toCsv=require(_0x200c('0xc'));var querystring=require(_0x200c('0x13'));var Papa=require(_0x200c('0x14'));var Redis=require(_0x200c('0x15'));var authService=require(_0x200c('0x16'));var qs=require(_0x200c('0x17'));var hardwareService=require(_0x200c('0x18'));var logger=require(_0x200c('0x19'))(_0x200c('0x1a'));var utils=require(_0x200c('0x1b'));var config=require(_0x200c('0x1c'));var db=require(_0x200c('0x1d'))['db'];function respondWithStatusCode(_0x1a05e1,_0x817592){_0x817592=_0x817592||0xcc;return function(_0x5143db){if(_0x5143db){return _0x1a05e1['sendStatus'](_0x817592);}return _0x1a05e1[_0x200c('0x1e')](_0x817592)[_0x200c('0x1f')]();};}function respondWithResult(_0x89deba,_0x49697b){_0x49697b=_0x49697b||0xc8;return function(_0x4fa735){if(_0x4fa735){return _0x89deba[_0x200c('0x1e')](_0x49697b)[_0x200c('0x20')](_0x4fa735);}};}function respondWithFilteredResult(_0x3e5a55,_0x236892){return function(_0x465f55){if(_0x465f55){var _0x18e3fb=_0x465f55[_0x200c('0x21')],_0x290fcd=_0x236892['offset'],_0x17bc61=_0x236892[_0x200c('0x22')]+_0x236892[_0x200c('0x23')],_0x19fd45;if(_0x17bc61>=_0x18e3fb){_0x17bc61=_0x18e3fb;_0x19fd45=0xc8;}else{_0x19fd45=0xce;}_0x3e5a55['status'](_0x19fd45);return _0x3e5a55[_0x200c('0x24')]('Content-Range',_0x290fcd+'-'+_0x17bc61+'/'+_0x18e3fb)[_0x200c('0x20')](_0x465f55);}return null;};}function patchUpdates(_0x8d08af){return function(_0x1dab30){try{jsonpatch[_0x200c('0x25')](_0x1dab30,_0x8d08af,!![]);}catch(_0x2d2592){return BPromise[_0x200c('0x26')](_0x2d2592);}return _0x1dab30['save']();};}function saveUpdates(_0x3c24cd,_0x11524a){return function(_0x13120d){if(_0x13120d){return _0x13120d['update'](_0x3c24cd)['then'](function(_0x203392){return _0x203392;});}return null;};}function removeEntity(_0x109f92,_0x3f3ab4){return function(_0x4749f4){if(_0x4749f4){return _0x4749f4[_0x200c('0x27')]()['then'](function(){_0x109f92[_0x200c('0x1e')](0xcc)[_0x200c('0x1f')]();});}};}function handleEntityNotFound(_0x5423ef,_0x5a93c4){return function(_0x1b9b25){if(!_0x1b9b25){_0x5423ef[_0x200c('0x28')](0x194);}return _0x1b9b25;};}function handleError(_0x4c8443,_0x66541f){_0x66541f=_0x66541f||0x1f4;return function(_0x156ff9){logger['error'](_0x156ff9[_0x200c('0x29')]);if(_0x156ff9[_0x200c('0x2a')]){delete _0x156ff9[_0x200c('0x2a')];}_0x4c8443['status'](_0x66541f)['send'](_0x156ff9);};}exports[_0x200c('0x2b')]=function(_0x5ade71,_0xb5367c){var _0x1ba695={},_0x594641={},_0xb5d171={'count':0x0,'rows':[]};var _0x499fbe=db[_0x200c('0x2c')][_0x200c('0x2d')];_0x594641[_0x200c('0x2e')]=_[_0x200c('0x2f')](_0x499fbe);_0x594641[_0x200c('0x30')]=_['keys'](_0x5ade71['query']);_0x594641[_0x200c('0x31')]=_[_0x200c('0x32')](_0x594641['model'],_0x594641[_0x200c('0x30')]);_0x1ba695[_0x200c('0x33')]=_['intersection'](_0x594641[_0x200c('0x2e')],qs[_0x200c('0x34')](_0x5ade71[_0x200c('0x30')][_0x200c('0x34')]));_0x1ba695['attributes']=_0x1ba695[_0x200c('0x33')]['length']?_0x1ba695[_0x200c('0x33')]:_0x594641['model'];if(!_0x5ade71['query'][_0x200c('0x35')](_0x200c('0x36'))){_0x1ba695[_0x200c('0x23')]=qs[_0x200c('0x23')](_0x5ade71[_0x200c('0x30')][_0x200c('0x23')]);_0x1ba695[_0x200c('0x22')]=qs['offset'](_0x5ade71[_0x200c('0x30')][_0x200c('0x22')]);}_0x1ba695[_0x200c('0x37')]=qs['sort'](_0x5ade71[_0x200c('0x30')][_0x200c('0x38')]);_0x1ba695[_0x200c('0x39')]=qs[_0x200c('0x31')](_['pick'](_0x5ade71[_0x200c('0x30')],_0x594641[_0x200c('0x31')]));if(_0x5ade71['query'][_0x200c('0x3a')]){_0x1ba695['where']=_['merge'](_0x1ba695[_0x200c('0x39')],{'$or':_[_0x200c('0x3b')](_0x499fbe,function(_0x3976ff){if(_0x3976ff[_0x200c('0x3c')]['key']!==_0x200c('0x3d')){var _0x289afc={};_0x289afc[_0x3976ff['field']]={'$like':'%'+_0x5ade71[_0x200c('0x30')][_0x200c('0x3a')]+'%'};return _0x289afc;}})});}_0x1ba695=_[_0x200c('0x3e')]({},_0x1ba695,_0x5ade71['options']);var _0x4e35ff={'where':_0x1ba695[_0x200c('0x39')]};return db[_0x200c('0x2c')][_0x200c('0x21')](_0x4e35ff)[_0x200c('0x3f')](function(_0x9b0613){_0xb5d171[_0x200c('0x21')]=_0x9b0613;if(_0x5ade71[_0x200c('0x30')][_0x200c('0x40')]){_0x1ba695['include']=[{'all':!![]}];}return db[_0x200c('0x2c')][_0x200c('0x41')](_0x1ba695);})['then'](function(_0x469921){_0xb5d171[_0x200c('0x42')]=_0x469921;return _0xb5d171;})['then'](respondWithFilteredResult(_0xb5367c,_0x1ba695))[_0x200c('0x43')](handleError(_0xb5367c,null));};exports['show']=function(_0x3da7d6,_0x359693){var _0x462414={'raw':![],'where':{'id':_0x3da7d6[_0x200c('0x44')]['id']}},_0x205adf={};_0x205adf['model']=_[_0x200c('0x2f')](db[_0x200c('0x2c')][_0x200c('0x2d')]);_0x205adf[_0x200c('0x30')]=_['keys'](_0x3da7d6['query']);_0x205adf[_0x200c('0x31')]=_[_0x200c('0x32')](_0x205adf[_0x200c('0x2e')],_0x205adf['query']);_0x462414[_0x200c('0x33')]=_[_0x200c('0x32')](_0x205adf[_0x200c('0x2e')],qs[_0x200c('0x34')](_0x3da7d6[_0x200c('0x30')]['fields']));_0x462414[_0x200c('0x33')]=_0x462414[_0x200c('0x33')][_0x200c('0x45')]?_0x462414[_0x200c('0x33')]:_0x205adf[_0x200c('0x2e')];if(_0x3da7d6[_0x200c('0x30')][_0x200c('0x40')]){_0x462414[_0x200c('0x46')]=[{'all':!![]}];}_0x462414=_[_0x200c('0x3e')]({},_0x462414,_0x3da7d6[_0x200c('0x47')]);return db[_0x200c('0x2c')]['find'](_0x462414)[_0x200c('0x3f')](handleEntityNotFound(_0x359693,null))[_0x200c('0x3f')](respondWithResult(_0x359693,null))[_0x200c('0x43')](handleError(_0x359693,null));};exports[_0x200c('0x48')]=function(_0x1e9a46,_0x71c0be){return db[_0x200c('0x2c')][_0x200c('0x48')](_0x1e9a46[_0x200c('0x49')],{})[_0x200c('0x3f')](respondWithResult(_0x71c0be,0xc9))[_0x200c('0x43')](handleError(_0x71c0be,null));};exports[_0x200c('0x4a')]=function(_0x1a60e9,_0x24b2b5){if(_0x1a60e9['body']['id']){delete _0x1a60e9[_0x200c('0x49')]['id'];}return db[_0x200c('0x2c')][_0x200c('0x4b')]({'where':{'id':_0x1a60e9[_0x200c('0x44')]['id']}})['then'](handleEntityNotFound(_0x24b2b5,null))[_0x200c('0x3f')](saveUpdates(_0x1a60e9['body'],null))[_0x200c('0x3f')](respondWithResult(_0x24b2b5,null))['catch'](handleError(_0x24b2b5,null));};exports[_0x200c('0x27')]=function(_0x36bc2d,_0x13f4fd){return db[_0x200c('0x2c')][_0x200c('0x4b')]({'where':{'id':_0x36bc2d[_0x200c('0x44')]['id']}})[_0x200c('0x3f')](handleEntityNotFound(_0x13f4fd,null))[_0x200c('0x3f')](removeEntity(_0x13f4fd,null))[_0x200c('0x43')](handleError(_0x13f4fd,null));};exports[_0x200c('0x4c')]=function(_0x133b22,_0x50981a,_0xb8b899){return db['Condition'][_0x200c('0x4b')]({'where':{'id':_0x133b22[_0x200c('0x44')]['id']}})[_0x200c('0x3f')](handleEntityNotFound(_0x50981a,null))[_0x200c('0x3f')](function(_0x573675){if(_0x573675){return _0x573675['addConditions'](_0x133b22[_0x200c('0x49')][_0x200c('0x4d')],_[_0x200c('0x4e')](_0x133b22['body'],[_0x200c('0x4d'),'id'])||{});}})[_0x200c('0x3f')](respondWithResult(_0x50981a,null))[_0x200c('0x43')](handleError(_0x50981a,null));};exports[_0x200c('0x4f')]=function(_0x2eaeaf,_0x54df59,_0x2fca46){var _0x23df4d={};var _0x1cd73a={};var _0xd4b396;var _0x25ef59;return db['Automation'][_0x200c('0x50')]({'where':{'id':_0x2eaeaf[_0x200c('0x44')]['id']}})['then'](handleEntityNotFound(_0x54df59,null))[_0x200c('0x3f')](function(_0x4d96b9){if(_0x4d96b9){_0xd4b396=_0x4d96b9;_0x1cd73a[_0x200c('0x2e')]=_['keys'](db[_0x200c('0x51')]['rawAttributes']);_0x1cd73a[_0x200c('0x30')]=_[_0x200c('0x2f')](_0x2eaeaf[_0x200c('0x30')]);_0x1cd73a[_0x200c('0x31')]=_[_0x200c('0x32')](_0x1cd73a[_0x200c('0x2e')],_0x1cd73a['query']);_0x23df4d[_0x200c('0x33')]=_['intersection'](_0x1cd73a[_0x200c('0x2e')],qs[_0x200c('0x34')](_0x2eaeaf[_0x200c('0x30')]['fields']));_0x23df4d[_0x200c('0x33')]=_0x23df4d[_0x200c('0x33')]['length']?_0x23df4d[_0x200c('0x33')]:_0x1cd73a[_0x200c('0x2e')];_0x23df4d['order']=qs['sort'](_0x2eaeaf['query']['sort']);_0x23df4d[_0x200c('0x39')]=qs['filters'](_[_0x200c('0x52')](_0x2eaeaf[_0x200c('0x30')],_0x1cd73a['filters']));if(_0x2eaeaf[_0x200c('0x30')][_0x200c('0x3a')]){_0x23df4d[_0x200c('0x39')]=_[_0x200c('0x3e')](_0x23df4d[_0x200c('0x39')],{'$or':_[_0x200c('0x3b')](_0x23df4d[_0x200c('0x33')],function(_0x1b0aa6){var _0x786dbe={};_0x786dbe[_0x1b0aa6]={'$like':'%'+_0x2eaeaf['query'][_0x200c('0x3a')]+'%'};return _0x786dbe;})});}_0x23df4d=_[_0x200c('0x3e')]({},_0x23df4d,_0x2eaeaf[_0x200c('0x47')]);return _0xd4b396[_0x200c('0x4f')](_0x23df4d);}})[_0x200c('0x3f')](function(_0x281a42){if(_0x281a42){_0x25ef59=_0x281a42[_0x200c('0x45')];if(!_0x2eaeaf[_0x200c('0x30')][_0x200c('0x35')](_0x200c('0x36'))){_0x23df4d[_0x200c('0x23')]=qs[_0x200c('0x23')](_0x2eaeaf[_0x200c('0x30')][_0x200c('0x23')]);_0x23df4d[_0x200c('0x22')]=qs[_0x200c('0x22')](_0x2eaeaf[_0x200c('0x30')]['offset']);}return _0xd4b396['getConditions'](_0x23df4d);}})[_0x200c('0x3f')](function(_0xd8c238){if(_0xd8c238){return _0xd8c238?{'count':_0x25ef59,'rows':_0xd8c238}:null;}})[_0x200c('0x3f')](respondWithResult(_0x54df59,null))['catch'](handleError(_0x54df59,null));};exports[_0x200c('0x53')]=function(_0x2705d4,_0x29ac0b,_0x49a292){return db[_0x200c('0x54')][_0x200c('0x4b')]({'where':{'id':_0x2705d4[_0x200c('0x44')]['id']}})[_0x200c('0x3f')](handleEntityNotFound(_0x29ac0b,null))['then'](function(_0x108d21){if(_0x108d21){return _0x108d21[_0x200c('0x53')](_0x2705d4['body'][_0x200c('0x4d')],_[_0x200c('0x4e')](_0x2705d4[_0x200c('0x49')],[_0x200c('0x4d'),'id'])||{});}})['then'](respondWithResult(_0x29ac0b,null))[_0x200c('0x43')](handleError(_0x29ac0b,null));};exports[_0x200c('0x55')]=function(_0x495dcd,_0x401652,_0x387198){var _0x4d81cc={};var _0x5541ec={};var _0x403ec3;var _0x2ae5eb;return db[_0x200c('0x2c')][_0x200c('0x50')]({'where':{'id':_0x495dcd[_0x200c('0x44')]['id']}})['then'](handleEntityNotFound(_0x401652,null))[_0x200c('0x3f')](function(_0x4e2130){if(_0x4e2130){_0x403ec3=_0x4e2130;_0x5541ec[_0x200c('0x2e')]=_[_0x200c('0x2f')](db[_0x200c('0x54')][_0x200c('0x2d')]);_0x5541ec['query']=_[_0x200c('0x2f')](_0x495dcd[_0x200c('0x30')]);_0x5541ec[_0x200c('0x31')]=_[_0x200c('0x32')](_0x5541ec[_0x200c('0x2e')],_0x5541ec[_0x200c('0x30')]);_0x4d81cc['attributes']=_[_0x200c('0x32')](_0x5541ec[_0x200c('0x2e')],qs[_0x200c('0x34')](_0x495dcd[_0x200c('0x30')][_0x200c('0x34')]));_0x4d81cc[_0x200c('0x33')]=_0x4d81cc[_0x200c('0x33')][_0x200c('0x45')]?_0x4d81cc[_0x200c('0x33')]:_0x5541ec['model'];_0x4d81cc[_0x200c('0x37')]=qs[_0x200c('0x38')](_0x495dcd[_0x200c('0x30')][_0x200c('0x38')]);_0x4d81cc[_0x200c('0x39')]=qs[_0x200c('0x31')](_[_0x200c('0x52')](_0x495dcd[_0x200c('0x30')],_0x5541ec[_0x200c('0x31')]));if(_0x495dcd[_0x200c('0x30')]['filter']){_0x4d81cc[_0x200c('0x39')]=_['merge'](_0x4d81cc['where'],{'$or':_[_0x200c('0x3b')](_0x4d81cc['attributes'],function(_0x355daa){var _0xb847a5={};_0xb847a5[_0x355daa]={'$like':'%'+_0x495dcd[_0x200c('0x30')][_0x200c('0x3a')]+'%'};return _0xb847a5;})});}_0x4d81cc=_[_0x200c('0x3e')]({},_0x4d81cc,_0x495dcd[_0x200c('0x47')]);return _0x403ec3['getActions'](_0x4d81cc);}})['then'](function(_0xd4d696){if(_0xd4d696){_0x2ae5eb=_0xd4d696[_0x200c('0x45')];if(!_0x495dcd['query'][_0x200c('0x35')]('nolimit')){_0x4d81cc[_0x200c('0x23')]=qs[_0x200c('0x23')](_0x495dcd['query'][_0x200c('0x23')]);_0x4d81cc[_0x200c('0x22')]=qs[_0x200c('0x22')](_0x495dcd[_0x200c('0x30')][_0x200c('0x22')]);}return _0x403ec3[_0x200c('0x55')](_0x4d81cc);}})[_0x200c('0x3f')](function(_0x5a78b2){if(_0x5a78b2){return _0x5a78b2?{'count':_0x2ae5eb,'rows':_0x5a78b2}:null;}})[_0x200c('0x3f')](respondWithResult(_0x401652,null))[_0x200c('0x43')](handleError(_0x401652,null));};
\ No newline at end of file
diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js
index ed55856..cd18e10 100644
--- a/server/api/automation/automation.model.js
+++ b/server/api/automation/automation.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x664a=['./automation.attributes','define','Automation','tools_automations','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf'];(function(_0x3f86d9,_0x46297b){var _0x320690=function(_0x13930d){while(--_0x13930d){_0x3f86d9['push'](_0x3f86d9['shift']());}};_0x320690(++_0x46297b);}(_0x664a,0x124));var _0xa664=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x664a[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0xa664('0x0'));var util=require(_0xa664('0x1'));var logger=require(_0xa664('0x2'))('api');var moment=require(_0xa664('0x3'));var BPromise=require(_0xa664('0x4'));var rp=require(_0xa664('0x5'));var fs=require('fs');var path=require(_0xa664('0x6'));var rimraf=require(_0xa664('0x7'));var config=require('../../config/environment');var attributes=require(_0xa664('0x8'));module['exports']=function(_0x8f56b8,_0x1b04f6){return _0x8f56b8[_0xa664('0x9')](_0xa664('0xa'),attributes,{'tableName':_0xa664('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0058=['./automation.attributes','define','Automation','tools_automations','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x456fb1,_0x859a1d){var _0x4083d6=function(_0xe1d0f2){while(--_0xe1d0f2){_0x456fb1['push'](_0x456fb1['shift']());}};_0x4083d6(++_0x859a1d);}(_0x0058,0x138));var _0x8005=function(_0x1c998f,_0x2ba9bb){_0x1c998f=_0x1c998f-0x0;var _0x992c1c=_0x0058[_0x1c998f];return _0x992c1c;};'use strict';var _=require('lodash');var util=require(_0x8005('0x0'));var logger=require(_0x8005('0x1'))(_0x8005('0x2'));var moment=require(_0x8005('0x3'));var BPromise=require(_0x8005('0x4'));var rp=require(_0x8005('0x5'));var fs=require('fs');var path=require(_0x8005('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x8005('0x7'));module['exports']=function(_0x1ab4de,_0x240e5a){return _0x1ab4de[_0x8005('0x8')](_0x8005('0x9'),attributes,{'tableName':_0x8005('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/automation/automation.rpc.js b/server/api/automation/automation.rpc.js
index e6ef753..a3150f2 100644
--- a/server/api/automation/automation.rpc.js
+++ b/server/api/automation/automation.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x689f=['message','result','catch','bluebird','randomstring','../../config/utils','rpc','jayson/promise','client','http','request','info','Automation,\x20%s,\x20%s','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0x689f,0x81));var _0xf689=function(_0x4037c3,_0x1a6eb0){_0x4037c3=_0x4037c3-0x0;var _0x3b5b8a=_0x689f[_0x4037c3];return _0x3b5b8a;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf689('0x0'));var rs=require(_0xf689('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf689('0x2'));var logger=require('../../config/logger')(_0xf689('0x3'));var config=require('../../config/environment');var jayson=require(_0xf689('0x4'));var client=jayson[_0xf689('0x5')][_0xf689('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x53cf63,_0x410c91,_0x3d2db9){return new BPromise(function(_0x58dce7,_0x98edba){return client[_0xf689('0x7')](_0x53cf63,_0x3d2db9)['then'](function(_0x3c716b){logger[_0xf689('0x8')](_0xf689('0x9'),_0x410c91,_0xf689('0xa'));logger[_0xf689('0xb')](_0xf689('0xc'),_0x410c91,_0xf689('0xa'),JSON['stringify'](_0x3c716b));if(_0x3c716b[_0xf689('0xd')]){if(_0x3c716b[_0xf689('0xd')][_0xf689('0xe')]===0x1f4){logger[_0xf689('0xd')](_0xf689('0x9'),_0x410c91,_0x3c716b[_0xf689('0xd')][_0xf689('0xf')]);return _0x98edba(_0x3c716b[_0xf689('0xd')][_0xf689('0xf')]);}logger['error'](_0xf689('0x9'),_0x410c91,_0x3c716b[_0xf689('0xd')][_0xf689('0xf')]);return _0x58dce7(_0x3c716b[_0xf689('0xd')]['message']);}else{logger[_0xf689('0x8')](_0xf689('0x9'),_0x410c91,_0xf689('0xa'));_0x58dce7(_0x3c716b[_0xf689('0x10')]['message']);}})[_0xf689('0x11')](function(_0x56327e){logger[_0xf689('0xd')](_0xf689('0x9'),_0x410c91,_0x56327e);_0x98edba(_0x56327e);});});}
\ No newline at end of file
+var _0x00f0=['info','Automation,\x20%s,\x20%s','Automation,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','request','then'];(function(_0x32de0f,_0x54867d){var _0x3d52bc=function(_0x5bc2df){while(--_0x5bc2df){_0x32de0f['push'](_0x32de0f['shift']());}};_0x3d52bc(++_0x54867d);}(_0x00f0,0xec));var _0x000f=function(_0x4870a2,_0x4d3eea){_0x4870a2=_0x4870a2-0x0;var _0x139bb0=_0x00f0[_0x4870a2];return _0x139bb0;};'use strict';var _=require(_0x000f('0x0'));var util=require(_0x000f('0x1'));var moment=require(_0x000f('0x2'));var BPromise=require(_0x000f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x000f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x000f('0x5'))('rpc');var config=require(_0x000f('0x6'));var jayson=require(_0x000f('0x7'));var client=jayson['client'][_0x000f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3c54d0,_0xe9145e,_0x621ab6){return new BPromise(function(_0x330e11,_0x468e73){return client[_0x000f('0x9')](_0x3c54d0,_0x621ab6)[_0x000f('0xa')](function(_0xaf4c12){logger[_0x000f('0xb')](_0x000f('0xc'),_0xe9145e,'request\x20sent');logger['debug'](_0x000f('0xd'),_0xe9145e,_0x000f('0xe'),JSON['stringify'](_0xaf4c12));if(_0xaf4c12[_0x000f('0xf')]){if(_0xaf4c12[_0x000f('0xf')]['code']===0x1f4){logger['error'](_0x000f('0xc'),_0xe9145e,_0xaf4c12[_0x000f('0xf')]['message']);return _0x468e73(_0xaf4c12['error'][_0x000f('0x10')]);}logger[_0x000f('0xf')](_0x000f('0xc'),_0xe9145e,_0xaf4c12[_0x000f('0xf')]['message']);return _0x330e11(_0xaf4c12[_0x000f('0xf')]['message']);}else{logger['info'](_0x000f('0xc'),_0xe9145e,'request\x20sent');_0x330e11(_0xaf4c12[_0x000f('0x11')][_0x000f('0x10')]);}})[_0x000f('0x12')](function(_0x465563){logger[_0x000f('0xf')](_0x000f('0xc'),_0xe9145e,_0x465563);_0x468e73(_0x465563);});});}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index 6d9c37a..9c52404 100644
--- a/server/api/automation/index.js
+++ b/server/api/automation/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa38f=['show','/:id/conditions','getConditions','/:id/actions','getActions','post','create','addActions','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','index','/:id'];(function(_0x54e34e,_0x1916f2){var _0x1685f1=function(_0xbc4fa2){while(--_0xbc4fa2){_0x54e34e['push'](_0x54e34e['shift']());}};_0x1685f1(++_0x1916f2);}(_0xa38f,0x173));var _0xfa38=function(_0x56e6ac,_0x423a4d){_0x56e6ac=_0x56e6ac-0x0;var _0x58b75c=_0xa38f[_0x56e6ac];return _0x58b75c;};'use strict';var multer=require('multer');var util=require(_0xfa38('0x0'));var path=require(_0xfa38('0x1'));var timeout=require(_0xfa38('0x2'));var express=require(_0xfa38('0x3'));var router=express[_0xfa38('0x4')]();var auth=require(_0xfa38('0x5'));var interaction=require(_0xfa38('0x6'));var config=require(_0xfa38('0x7'));var controller=require(_0xfa38('0x8'));router[_0xfa38('0x9')]('/',auth[_0xfa38('0xa')](),controller[_0xfa38('0xb')]);router[_0xfa38('0x9')](_0xfa38('0xc'),auth['isAuthenticated'](),controller[_0xfa38('0xd')]);router[_0xfa38('0x9')](_0xfa38('0xe'),auth[_0xfa38('0xa')](),controller[_0xfa38('0xf')]);router[_0xfa38('0x9')](_0xfa38('0x10'),auth[_0xfa38('0xa')](),controller[_0xfa38('0x11')]);router[_0xfa38('0x12')]('/',auth[_0xfa38('0xa')](),controller[_0xfa38('0x13')]);router[_0xfa38('0x12')](_0xfa38('0xe'),auth[_0xfa38('0xa')](),controller['addConditions']);router['post'](_0xfa38('0x10'),auth[_0xfa38('0xa')](),controller[_0xfa38('0x14')]);router['put'](_0xfa38('0xc'),auth[_0xfa38('0xa')](),controller['update']);router[_0xfa38('0x15')]('/:id',auth[_0xfa38('0xa')](),controller[_0xfa38('0x16')]);module[_0xfa38('0x17')]=router;
\ No newline at end of file
+var _0x2411=['post','create','addConditions','addActions','put','update','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','/:id/conditions','getConditions','/:id/actions','getActions'];(function(_0x56d02a,_0x72cbc0){var _0x17d6e7=function(_0x15dc89){while(--_0x15dc89){_0x56d02a['push'](_0x56d02a['shift']());}};_0x17d6e7(++_0x72cbc0);}(_0x2411,0x104));var _0x1241=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0x2411[_0x2aec52];return _0x3b8835;};'use strict';var multer=require(_0x1241('0x0'));var util=require(_0x1241('0x1'));var path=require(_0x1241('0x2'));var timeout=require('connect-timeout');var express=require(_0x1241('0x3'));var router=express[_0x1241('0x4')]();var auth=require(_0x1241('0x5'));var interaction=require(_0x1241('0x6'));var config=require('../../config/environment');var controller=require('./automation.controller');router[_0x1241('0x7')]('/',auth[_0x1241('0x8')](),controller[_0x1241('0x9')]);router[_0x1241('0x7')](_0x1241('0xa'),auth['isAuthenticated'](),controller[_0x1241('0xb')]);router[_0x1241('0x7')](_0x1241('0xc'),auth[_0x1241('0x8')](),controller[_0x1241('0xd')]);router[_0x1241('0x7')](_0x1241('0xe'),auth[_0x1241('0x8')](),controller[_0x1241('0xf')]);router[_0x1241('0x10')]('/',auth[_0x1241('0x8')](),controller[_0x1241('0x11')]);router['post']('/:id/conditions',auth[_0x1241('0x8')](),controller[_0x1241('0x12')]);router[_0x1241('0x10')](_0x1241('0xe'),auth['isAuthenticated'](),controller[_0x1241('0x13')]);router[_0x1241('0x14')](_0x1241('0xa'),auth[_0x1241('0x8')](),controller[_0x1241('0x15')]);router['delete'](_0x1241('0xa'),auth[_0x1241('0x8')](),controller['destroy']);module[_0x1241('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js
index 0dd2f77..2fc72b2 100644
--- a/server/api/campaign/campaign.attributes.js
+++ b/server/api/campaign/campaign.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x35c5=['#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','sequelize','name','ivr','STRING','BOOLEAN','Active/Disactive\x20Campaign','UNSIGNED','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','INTEGER','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','never','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting'];(function(_0x58340f,_0x124cc7){var _0x5443fe=function(_0x323967){while(--_0x323967){_0x58340f['push'](_0x58340f['shift']());}};_0x5443fe(++_0x124cc7);}(_0x35c5,0x157));var _0x535c=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x35c5[_0x2dafbe];return _0x58a45a;};'use strict';var Sequelize=require(_0x535c('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x535c('0x1'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM'](_0x535c('0x2')),'allowNull':![],'defaultValue':_0x535c('0x2')},'description':{'type':Sequelize[_0x535c('0x3')]},'active':{'type':Sequelize[_0x535c('0x4')],'defaultValue':0x0,'comment':_0x535c('0x5')},'limitCalls':{'type':Sequelize['INTEGER'](0x4)[_0x535c('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x535c('0x7')},'dialOriginateCallerIdName':{'type':Sequelize[_0x535c('0x3')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x535c('0x3')]},'dialOriginateTimeout':{'type':Sequelize['INTEGER'](0x3)[_0x535c('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x535c('0x8')},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x535c('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x535c('0x9')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x535c('0xa')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x535c('0xb')},'dialBusyMaxRetry':{'type':Sequelize[_0x535c('0xa')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x535c('0xc')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x535c('0xa')](0x3)[_0x535c('0x6')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x535c('0xa')](0x5)[_0x535c('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x535c('0xd')},'dialGlobalMaxRetry':{'type':Sequelize[_0x535c('0xa')](0x3)[_0x535c('0x6')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x535c('0xe')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x535c('0x3')],'defaultValue':_0x535c('0xf')},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0x535c('0x10'),_0x535c('0x11'),'onlyIfOpen'),'defaultValue':_0x535c('0x10')},'dialAMDActive':{'type':Sequelize[_0x535c('0x4')],'defaultValue':0x0,'comment':_0x535c('0x12')},'dialAMDInitialSilence':{'type':Sequelize[_0x535c('0xa')](0x9)[_0x535c('0x6')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x535c('0x13')},'dialAMDGreeting':{'type':Sequelize[_0x535c('0xa')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x535c('0x14')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x535c('0xa')](0x9)[_0x535c('0x6')],'defaultValue':0x320,'validate':{'min':0x0},'comment':'#AMD\x20After\x20Greeting\x20Silence'},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x535c('0xa')](0x9)[_0x535c('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x535c('0x15')},'dialAMDMinWordLength':{'type':Sequelize[_0x535c('0xa')](0x9)[_0x535c('0x6')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x535c('0xa')](0x9)[_0x535c('0x6')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x535c('0x16')},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x535c('0x17')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0x535c('0x6')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Word\x20Length'},'dialOrderByScheduledAt':{'type':Sequelize['ENUM']('DESC',_0x535c('0x18')),'defaultValue':_0x535c('0x19')},'dialPrefix':{'type':Sequelize[_0x535c('0x3')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x535c('0xa')](0x3)[_0x535c('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x535c('0x1a')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x535c('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x535c('0x1b')}};
\ No newline at end of file
+var _0x7403=['Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','sequelize','STRING','name','ENUM','ivr','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','never','onlyIfOpen'];(function(_0x644ecd,_0x397f36){var _0x1c66ce=function(_0x4cf42b){while(--_0x4cf42b){_0x644ecd['push'](_0x644ecd['shift']());}};_0x1c66ce(++_0x397f36);}(_0x7403,0x68));var _0x3740=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7403[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x3740('0x0'));module['exports']={'name':{'type':Sequelize[_0x3740('0x1')],'unique':_0x3740('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x3740('0x3')](_0x3740('0x4')),'allowNull':![],'defaultValue':_0x3740('0x4')},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x3740('0x5')},'limitCalls':{'type':Sequelize[_0x3740('0x6')](0x4)[_0x3740('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':'Max\x20200\x20calls.'},'dialOriginateCallerIdName':{'type':Sequelize[_0x3740('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x3740('0x1')]},'dialOriginateTimeout':{'type':Sequelize['INTEGER'](0x3)[_0x3740('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3740('0x8')},'dialCongestionMaxRetry':{'type':Sequelize[_0x3740('0x6')](0x3)[_0x3740('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3740('0x9')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x3740('0x6')](0x5)[_0x3740('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3740('0xa')},'dialBusyMaxRetry':{'type':Sequelize[_0x3740('0x6')](0x3)[_0x3740('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3740('0xb')},'dialBusyRetryFrequency':{'type':Sequelize[_0x3740('0x6')](0x5)[_0x3740('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3740('0xc')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x3740('0x6')](0x3)[_0x3740('0x7')],'defaultValue':0x3,'comment':_0x3740('0xd')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x3740('0x6')](0x5)[_0x3740('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3740('0xe')},'dialGlobalMaxRetry':{'type':Sequelize[_0x3740('0x6')](0x3)[_0x3740('0x7')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x3740('0xf')},'dialTimezone':{'type':Sequelize[_0x3740('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x3740('0x1')],'defaultValue':_0x3740('0x10')},'dialCheckDuplicateType':{'type':Sequelize[_0x3740('0x3')](_0x3740('0x11'),_0x3740('0x12'),_0x3740('0x13')),'defaultValue':'always'},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x3740('0x14')},'dialAMDInitialSilence':{'type':Sequelize[_0x3740('0x6')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x3740('0x15')},'dialAMDGreeting':{'type':Sequelize['INTEGER'](0x9)[_0x3740('0x7')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x3740('0x16')},'dialAMDAfterGreetingSilence':{'type':Sequelize['INTEGER'](0x9)[_0x3740('0x7')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x3740('0x17')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x3740('0x6')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x3740('0x18')},'dialAMDMinWordLength':{'type':Sequelize[_0x3740('0x6')](0x9)[_0x3740('0x7')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x3740('0x19')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x3740('0x6')](0x9)[_0x3740('0x7')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x3740('0x1a')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x3740('0x6')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x3740('0x1b')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0x3740('0x7')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x3740('0x1c')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x3740('0x7')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x3740('0x1d')},'dialOrderByScheduledAt':{'type':Sequelize[_0x3740('0x3')](_0x3740('0x1e'),'ASC'),'defaultValue':_0x3740('0x1e')},'dialPrefix':{'type':Sequelize[_0x3740('0x1')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x3740('0x6')](0x3)[_0x3740('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Random\x20Last\x20Digit\x20(min:1,\x20max:15)'},'dialCutDigit':{'type':Sequelize[_0x3740('0x6')](0x3)[_0x3740('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'}};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js
index a46b808..a524753 100644
--- a/server/api/campaign/campaign.controller.js
+++ b/server/api/campaign/campaign.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4bd7=['cm_hopper','push','sequelize','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','removeBlackLists','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','reject','save','then','destroy','get','sendStatus','error','name','index','Campaign','rawAttributes','model','keys','query','filters','fields','attributes','nolimit','order','sort','filter','merge','where','map','key','VIRTUAL','options','include','rows','catch','show','intersection','length','includeAll','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','IvrCampaigns','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','omit','updatedAt','body','createdAt','update','getHoppers','findOne','hasOwnProperty','pick','CmHopper','findAll','CmHopperHistory','CmHopperFinal','CampaignId','CmHopperBlack','getLists','CmList','addLists','ids','spread','dialCheckDuplicateType','always','insert','into','fromQuery','phone','scheduledAt','ContactId','ListId','field','NOW()','CmListId','toString','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','select','COALESCE(calleridnum,\x27\x27)','from','cm_hopper_final','CampaignId\x20=\x20?','COALESCE(phone,\x27\x27)'];(function(_0x125161,_0x37ae6a){var _0x1a6ef3=function(_0x2ee8a1){while(--_0x2ee8a1){_0x125161['push'](_0x125161['shift']());}};_0x1a6ef3(++_0x37ae6a);}(_0x4bd7,0x8c));var _0x74bd=function(_0xcfeda9,_0xd418ae){_0xcfeda9=_0xcfeda9-0x0;var _0x4826c7=_0x4bd7[_0xcfeda9];return _0x4826c7;};'use strict';var pdf=require(_0x74bd('0x0'));var emlformat=require(_0x74bd('0x1'));var rimraf=require(_0x74bd('0x2'));var zipdir=require(_0x74bd('0x3'));var jsonpatch=require(_0x74bd('0x4'));var rp=require(_0x74bd('0x5'));var moment=require(_0x74bd('0x6'));var BPromise=require(_0x74bd('0x7'));var Mustache=require(_0x74bd('0x8'));var util=require('util');var path=require(_0x74bd('0x9'));var sox=require(_0x74bd('0xa'));var csv=require(_0x74bd('0xb'));var ejs=require(_0x74bd('0xc'));var fs=require('fs');var _=require(_0x74bd('0xd'));var squel=require('squel');var crypto=require(_0x74bd('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x74bd('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x74bd('0x10'));var Redis=require(_0x74bd('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x74bd('0x12'));var hardwareService=require(_0x74bd('0x13'));var logger=require('../../config/logger')(_0x74bd('0x14'));var utils=require(_0x74bd('0x15'));var config=require('../../config/environment');var db=require(_0x74bd('0x16'))['db'];function respondWithStatusCode(_0x4dc80a,_0x19fa6b){_0x19fa6b=_0x19fa6b||0xcc;return function(_0x4428dc){if(_0x4428dc){return _0x4dc80a['sendStatus'](_0x19fa6b);}return _0x4dc80a[_0x74bd('0x17')](_0x19fa6b)[_0x74bd('0x18')]();};}function respondWithResult(_0x4b6cb4,_0x51c305){_0x51c305=_0x51c305||0xc8;return function(_0x5529f8){if(_0x5529f8){return _0x4b6cb4[_0x74bd('0x17')](_0x51c305)[_0x74bd('0x19')](_0x5529f8);}};}function respondWithFilteredResult(_0xc6e8eb,_0x59f33d){return function(_0x3842d3){if(_0x3842d3){var _0x3b2c11=_0x3842d3[_0x74bd('0x1a')],_0xa7c1ff=_0x59f33d[_0x74bd('0x1b')],_0x21aa95=_0x59f33d[_0x74bd('0x1b')]+_0x59f33d[_0x74bd('0x1c')],_0x245249;if(_0x21aa95>=_0x3b2c11){_0x21aa95=_0x3b2c11;_0x245249=0xc8;}else{_0x245249=0xce;}_0xc6e8eb[_0x74bd('0x17')](_0x245249);return _0xc6e8eb[_0x74bd('0x1d')](_0x74bd('0x1e'),_0xa7c1ff+'-'+_0x21aa95+'/'+_0x3b2c11)['json'](_0x3842d3);}return null;};}function patchUpdates(_0x23dec1){return function(_0x568b40){try{jsonpatch['apply'](_0x568b40,_0x23dec1,!![]);}catch(_0x11c58a){return BPromise[_0x74bd('0x1f')](_0x11c58a);}return _0x568b40[_0x74bd('0x20')]();};}function saveUpdates(_0x15b33f,_0x4a2b52){return function(_0x5fc67a){if(_0x5fc67a){return _0x5fc67a['update'](_0x15b33f)[_0x74bd('0x21')](function(_0x13a9ca){return _0x13a9ca;});}return null;};}function removeEntity(_0x153412,_0x2c4d4d){return function(_0x1eb3b6){if(_0x1eb3b6){return _0x1eb3b6[_0x74bd('0x22')]()[_0x74bd('0x21')](function(){var _0x2e10b9=_0x1eb3b6[_0x74bd('0x23')]({'plain':!![]});var _0x26a663='IvrCampaigns';return db['UserProfileResource'][_0x74bd('0x22')]({'where':{'type':_0x26a663,'resourceId':_0x2e10b9['id']}})[_0x74bd('0x21')](function(){return _0x1eb3b6;});})[_0x74bd('0x21')](function(){_0x153412[_0x74bd('0x17')](0xcc)[_0x74bd('0x18')]();});}};}function handleEntityNotFound(_0x50d1d1,_0x4fa444){return function(_0x5903c0){if(!_0x5903c0){_0x50d1d1[_0x74bd('0x24')](0x194);}return _0x5903c0;};}function handleError(_0x190fcf,_0x5ac71a){_0x5ac71a=_0x5ac71a||0x1f4;return function(_0x3a45ea){logger[_0x74bd('0x25')](_0x3a45ea['stack']);if(_0x3a45ea[_0x74bd('0x26')]){delete _0x3a45ea[_0x74bd('0x26')];}_0x190fcf[_0x74bd('0x17')](_0x5ac71a)['send'](_0x3a45ea);};}exports[_0x74bd('0x27')]=function(_0x598779,_0x17f5a8){var _0x3f46bc={},_0x27e08f={},_0x50c6c7={'count':0x0,'rows':[]};var _0x344e4e=db[_0x74bd('0x28')][_0x74bd('0x29')];_0x27e08f[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](_0x344e4e);_0x27e08f['query']=_['keys'](_0x598779[_0x74bd('0x2c')]);_0x27e08f[_0x74bd('0x2d')]=_['intersection'](_0x27e08f[_0x74bd('0x2a')],_0x27e08f[_0x74bd('0x2c')]);_0x3f46bc['attributes']=_['intersection'](_0x27e08f[_0x74bd('0x2a')],qs[_0x74bd('0x2e')](_0x598779[_0x74bd('0x2c')]['fields']));_0x3f46bc[_0x74bd('0x2f')]=_0x3f46bc[_0x74bd('0x2f')]['length']?_0x3f46bc[_0x74bd('0x2f')]:_0x27e08f[_0x74bd('0x2a')];if(!_0x598779[_0x74bd('0x2c')]['hasOwnProperty'](_0x74bd('0x30'))){_0x3f46bc[_0x74bd('0x1c')]=qs['limit'](_0x598779[_0x74bd('0x2c')][_0x74bd('0x1c')]);_0x3f46bc[_0x74bd('0x1b')]=qs[_0x74bd('0x1b')](_0x598779[_0x74bd('0x2c')]['offset']);}_0x3f46bc[_0x74bd('0x31')]=qs[_0x74bd('0x32')](_0x598779['query'][_0x74bd('0x32')]);_0x3f46bc['where']=qs['filters'](_['pick'](_0x598779[_0x74bd('0x2c')],_0x27e08f[_0x74bd('0x2d')]));if(_0x598779[_0x74bd('0x2c')][_0x74bd('0x33')]){_0x3f46bc['where']=_[_0x74bd('0x34')](_0x3f46bc[_0x74bd('0x35')],{'$or':_[_0x74bd('0x36')](_0x344e4e,function(_0x2f7a2d){if(_0x2f7a2d['type'][_0x74bd('0x37')]!==_0x74bd('0x38')){var _0x3b27d6={};_0x3b27d6[_0x2f7a2d['field']]={'$like':'%'+_0x598779[_0x74bd('0x2c')][_0x74bd('0x33')]+'%'};return _0x3b27d6;}})});}_0x3f46bc=_[_0x74bd('0x34')]({},_0x3f46bc,_0x598779[_0x74bd('0x39')]);var _0x59d8e8={'where':_0x3f46bc[_0x74bd('0x35')]};return db[_0x74bd('0x28')][_0x74bd('0x1a')](_0x59d8e8)[_0x74bd('0x21')](function(_0x582014){_0x50c6c7[_0x74bd('0x1a')]=_0x582014;if(_0x598779[_0x74bd('0x2c')]['includeAll']){_0x3f46bc[_0x74bd('0x3a')]=[{'all':!![]}];}return db['Campaign']['findAll'](_0x3f46bc);})[_0x74bd('0x21')](function(_0x1154f7){_0x50c6c7[_0x74bd('0x3b')]=_0x1154f7;return _0x50c6c7;})[_0x74bd('0x21')](respondWithFilteredResult(_0x17f5a8,_0x3f46bc))[_0x74bd('0x3c')](handleError(_0x17f5a8,null));};exports[_0x74bd('0x3d')]=function(_0x1d529e,_0x537a61){var _0x3d6002={'raw':![],'where':{'id':_0x1d529e['params']['id']}},_0x442ce8={};_0x442ce8[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](db['Campaign'][_0x74bd('0x29')]);_0x442ce8[_0x74bd('0x2c')]=_[_0x74bd('0x2b')](_0x1d529e[_0x74bd('0x2c')]);_0x442ce8[_0x74bd('0x2d')]=_[_0x74bd('0x3e')](_0x442ce8[_0x74bd('0x2a')],_0x442ce8[_0x74bd('0x2c')]);_0x3d6002[_0x74bd('0x2f')]=_['intersection'](_0x442ce8[_0x74bd('0x2a')],qs[_0x74bd('0x2e')](_0x1d529e['query']['fields']));_0x3d6002['attributes']=_0x3d6002['attributes'][_0x74bd('0x3f')]?_0x3d6002[_0x74bd('0x2f')]:_0x442ce8[_0x74bd('0x2a')];if(_0x1d529e['query'][_0x74bd('0x40')]){_0x3d6002[_0x74bd('0x3a')]=[{'all':!![]}];}_0x3d6002=_['merge']({},_0x3d6002,_0x1d529e[_0x74bd('0x39')]);return db['Campaign'][_0x74bd('0x41')](_0x3d6002)['then'](handleEntityNotFound(_0x537a61,null))[_0x74bd('0x21')](respondWithResult(_0x537a61,null))[_0x74bd('0x3c')](handleError(_0x537a61,null));};exports[_0x74bd('0x42')]=function(_0x5b9e75,_0x1fba1f){return db[_0x74bd('0x28')]['create'](_0x5b9e75['body'],{})['then'](function(_0x5abdb8){var _0x1743e8=_0x5b9e75[_0x74bd('0x43')]['get']({'plain':!![]});if(!_0x1743e8)throw new Error(_0x74bd('0x44'));if(_0x1743e8[_0x74bd('0x45')]===_0x74bd('0x43')){var _0x33d716=_0x5abdb8[_0x74bd('0x23')]({'plain':!![]});var _0x17a764=_0x74bd('0x46');return db[_0x74bd('0x47')][_0x74bd('0x41')]({'where':{'name':_0x17a764,'userProfileId':_0x1743e8[_0x74bd('0x48')]},'raw':!![]})[_0x74bd('0x21')](function(_0x56cfd5){if(_0x56cfd5&&_0x56cfd5[_0x74bd('0x49')]===0x0){return db[_0x74bd('0x4a')][_0x74bd('0x42')]({'name':_0x33d716[_0x74bd('0x26')],'resourceId':_0x33d716['id'],'type':_0x56cfd5[_0x74bd('0x26')],'sectionId':_0x56cfd5['id']},{})['then'](function(){return _0x5abdb8;});}else{return _0x5abdb8;}})[_0x74bd('0x3c')](function(_0x3501c4){logger['error'](_0x74bd('0x4b'),_0x3501c4);throw _0x3501c4;});}return _0x5abdb8;})[_0x74bd('0x21')](respondWithResult(_0x1fba1f,0xc9))[_0x74bd('0x3c')](handleError(_0x1fba1f,null));};exports[_0x74bd('0x4c')]=function(_0x5848b7,_0x27e0c9){var _0x34d4c8={'raw':![],'where':{'id':_0x5848b7[_0x74bd('0x4d')]['id']}},_0x4edfe3={};_0x4edfe3[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](db['Campaign'][_0x74bd('0x29')]);_0x34d4c8[_0x74bd('0x2f')]=_[_0x74bd('0x3e')](_0x4edfe3[_0x74bd('0x2a')],qs[_0x74bd('0x2e')](_0x5848b7[_0x74bd('0x2c')][_0x74bd('0x2e')]));_0x34d4c8['attributes']=_0x34d4c8['attributes'][_0x74bd('0x3f')]?_0x34d4c8[_0x74bd('0x2f')]:_0x4edfe3[_0x74bd('0x2a')];if(_0x5848b7[_0x74bd('0x2c')][_0x74bd('0x40')]){_0x34d4c8[_0x74bd('0x3a')]=[{'all':!![]}];}_0x34d4c8=_[_0x74bd('0x34')]({},_0x34d4c8,_0x5848b7['options']);return db['Campaign'][_0x74bd('0x41')](_0x34d4c8)['then'](handleEntityNotFound(_0x27e0c9,null))[_0x74bd('0x21')](function(_0x245acb){if(_0x245acb){var _0x355e75=_0x245acb[_0x74bd('0x23')]({'plain':!![]});_0x355e75=qs[_0x74bd('0x4e')](_0x355e75,['id','createdAt',_0x74bd('0x4f')]);_0x5848b7[_0x74bd('0x50')]=_[_0x74bd('0x4e')](_0x5848b7[_0x74bd('0x50')],['id',_0x74bd('0x51'),_0x74bd('0x4f')]);return db[_0x74bd('0x28')][_0x74bd('0x42')](_[_0x74bd('0x34')](_0x355e75,_0x5848b7[_0x74bd('0x50')]),{'include':_0x5848b7[_0x74bd('0x2c')][_0x74bd('0x40')]?[{'all':!![]}]:undefined})['then'](function(_0x2e7e6b){var _0x49ee5a=_0x5848b7[_0x74bd('0x43')][_0x74bd('0x23')]({'plain':!![]});if(!_0x49ee5a)throw new Error(_0x74bd('0x44'));if(_0x49ee5a[_0x74bd('0x45')]===_0x74bd('0x43')){var _0x3ba396=_0x2e7e6b['get']({'plain':!![]});var _0x32b44a=_0x74bd('0x46');return db[_0x74bd('0x47')][_0x74bd('0x41')]({'where':{'name':_0x32b44a,'userProfileId':_0x49ee5a['userProfileId']},'raw':!![]})[_0x74bd('0x21')](function(_0x457c97){if(_0x457c97&&_0x457c97[_0x74bd('0x49')]===0x0){return db[_0x74bd('0x4a')]['create']({'name':_0x3ba396[_0x74bd('0x26')],'resourceId':_0x3ba396['id'],'type':_0x457c97[_0x74bd('0x26')],'sectionId':_0x457c97['id']},{})[_0x74bd('0x21')](function(){return _0x2e7e6b;});}else{return _0x2e7e6b;}})['catch'](function(_0x4947c0){logger['error'](_0x74bd('0x4b'),_0x4947c0);throw _0x4947c0;});}return _0x2e7e6b;});}})[_0x74bd('0x21')](respondWithResult(_0x27e0c9,0xc9))[_0x74bd('0x3c')](handleError(_0x27e0c9,null));};exports[_0x74bd('0x52')]=function(_0x3917fd,_0x2a17a1){if(_0x3917fd[_0x74bd('0x50')]['id']){delete _0x3917fd['body']['id'];}return db[_0x74bd('0x28')]['find']({'where':{'id':_0x3917fd['params']['id']}})['then'](handleEntityNotFound(_0x2a17a1,null))[_0x74bd('0x21')](saveUpdates(_0x3917fd[_0x74bd('0x50')],null))[_0x74bd('0x21')](respondWithResult(_0x2a17a1,null))[_0x74bd('0x3c')](handleError(_0x2a17a1,null));};exports['destroy']=function(_0x1d7e69,_0x6a1912){return db[_0x74bd('0x28')][_0x74bd('0x41')]({'where':{'id':_0x1d7e69[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0x6a1912,null))[_0x74bd('0x21')](removeEntity(_0x6a1912,null))[_0x74bd('0x3c')](handleError(_0x6a1912,null));};exports[_0x74bd('0x53')]=function(_0x3d1bce,_0x257731,_0x176d9b){var _0x58faba={'raw':!![],'where':{}};var _0x186813={};var _0x372749={'count':0x0,'rows':[]};return db[_0x74bd('0x28')][_0x74bd('0x54')]({'where':{'id':_0x3d1bce[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0x257731,null))[_0x74bd('0x21')](function(_0x537d99){if(_0x537d99){_0x186813['model']=_[_0x74bd('0x2b')](db['CmHopper']['rawAttributes']);_0x186813['query']=_['keys'](_0x3d1bce[_0x74bd('0x2c')]);_0x186813[_0x74bd('0x2d')]=_['intersection'](_0x186813[_0x74bd('0x2a')],_0x186813[_0x74bd('0x2c')]);_0x58faba[_0x74bd('0x2f')]=_[_0x74bd('0x3e')](_0x186813['model'],qs[_0x74bd('0x2e')](_0x3d1bce[_0x74bd('0x2c')][_0x74bd('0x2e')]));_0x58faba[_0x74bd('0x2f')]=_0x58faba['attributes'][_0x74bd('0x3f')]?_0x58faba[_0x74bd('0x2f')]:_0x186813[_0x74bd('0x2a')];if(!_0x3d1bce[_0x74bd('0x2c')][_0x74bd('0x55')](_0x74bd('0x30'))){_0x58faba['limit']=qs[_0x74bd('0x1c')](_0x3d1bce[_0x74bd('0x2c')][_0x74bd('0x1c')]);_0x58faba[_0x74bd('0x1b')]=qs[_0x74bd('0x1b')](_0x3d1bce[_0x74bd('0x2c')][_0x74bd('0x1b')]);}_0x58faba['order']=qs[_0x74bd('0x32')](_0x3d1bce[_0x74bd('0x2c')][_0x74bd('0x32')]);_0x58faba['where']=qs[_0x74bd('0x2d')](_[_0x74bd('0x56')](_0x3d1bce['query'],_0x186813[_0x74bd('0x2d')]));_0x58faba[_0x74bd('0x35')]['CampaignId']=_0x537d99['id'];if(_0x3d1bce['query']['filter']){_0x58faba[_0x74bd('0x35')]=_[_0x74bd('0x34')](_0x58faba[_0x74bd('0x35')],{'$or':_[_0x74bd('0x36')](_0x58faba['attributes'],function(_0x15473d){var _0xdd4f35={};_0xdd4f35[_0x15473d]={'$like':'%'+_0x3d1bce['query'][_0x74bd('0x33')]+'%'};return _0xdd4f35;})});}_0x58faba=_[_0x74bd('0x34')]({},_0x58faba,_0x3d1bce[_0x74bd('0x39')]);return db[_0x74bd('0x57')][_0x74bd('0x1a')]({'where':_0x58faba[_0x74bd('0x35')]})[_0x74bd('0x21')](function(_0x4808c1){_0x372749[_0x74bd('0x1a')]=_0x4808c1;if(_0x3d1bce[_0x74bd('0x2c')][_0x74bd('0x40')]){_0x58faba['include']=[{'all':!![]}];}return db['CmHopper'][_0x74bd('0x58')](_0x58faba);})[_0x74bd('0x21')](function(_0x215295){_0x372749[_0x74bd('0x3b')]=_0x215295;return _0x372749;});}})[_0x74bd('0x21')](respondWithFilteredResult(_0x257731,_0x58faba))['catch'](handleError(_0x257731,null));};exports['getHopperHistories']=function(_0x42b10c,_0x2130fe,_0x70097b){var _0x2226b5={'raw':!![],'where':{}};var _0x41eaaf={};var _0x33c88f={'count':0x0,'rows':[]};return db[_0x74bd('0x28')][_0x74bd('0x54')]({'where':{'id':_0x42b10c[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0x2130fe,null))['then'](function(_0x2310f6){if(_0x2310f6){_0x41eaaf[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](db[_0x74bd('0x59')][_0x74bd('0x29')]);_0x41eaaf[_0x74bd('0x2c')]=_['keys'](_0x42b10c[_0x74bd('0x2c')]);_0x41eaaf[_0x74bd('0x2d')]=_[_0x74bd('0x3e')](_0x41eaaf[_0x74bd('0x2a')],_0x41eaaf[_0x74bd('0x2c')]);_0x2226b5[_0x74bd('0x2f')]=_[_0x74bd('0x3e')](_0x41eaaf[_0x74bd('0x2a')],qs['fields'](_0x42b10c[_0x74bd('0x2c')][_0x74bd('0x2e')]));_0x2226b5[_0x74bd('0x2f')]=_0x2226b5[_0x74bd('0x2f')][_0x74bd('0x3f')]?_0x2226b5[_0x74bd('0x2f')]:_0x41eaaf[_0x74bd('0x2a')];if(!_0x42b10c['query'][_0x74bd('0x55')](_0x74bd('0x30'))){_0x2226b5['limit']=qs[_0x74bd('0x1c')](_0x42b10c[_0x74bd('0x2c')][_0x74bd('0x1c')]);_0x2226b5['offset']=qs[_0x74bd('0x1b')](_0x42b10c[_0x74bd('0x2c')]['offset']);}_0x2226b5[_0x74bd('0x31')]=qs[_0x74bd('0x32')](_0x42b10c['query'][_0x74bd('0x32')]);_0x2226b5[_0x74bd('0x35')]=qs[_0x74bd('0x2d')](_[_0x74bd('0x56')](_0x42b10c[_0x74bd('0x2c')],_0x41eaaf['filters']));_0x2226b5['where']['CampaignId']=_0x2310f6['id'];if(_0x42b10c['query'][_0x74bd('0x33')]){_0x2226b5[_0x74bd('0x35')]=_[_0x74bd('0x34')](_0x2226b5[_0x74bd('0x35')],{'$or':_['map'](_0x2226b5['attributes'],function(_0x2573ad){var _0x436159={};_0x436159[_0x2573ad]={'$like':'%'+_0x42b10c[_0x74bd('0x2c')][_0x74bd('0x33')]+'%'};return _0x436159;})});}_0x2226b5=_[_0x74bd('0x34')]({},_0x2226b5,_0x42b10c['options']);return db[_0x74bd('0x59')][_0x74bd('0x1a')]({'where':_0x2226b5[_0x74bd('0x35')]})[_0x74bd('0x21')](function(_0x5b9134){_0x33c88f[_0x74bd('0x1a')]=_0x5b9134;if(_0x42b10c[_0x74bd('0x2c')][_0x74bd('0x40')]){_0x2226b5['include']=[{'all':!![]}];}return db['CmHopperHistory'][_0x74bd('0x58')](_0x2226b5);})[_0x74bd('0x21')](function(_0xa38e97){_0x33c88f[_0x74bd('0x3b')]=_0xa38e97;return _0x33c88f;});}})[_0x74bd('0x21')](respondWithFilteredResult(_0x2130fe,_0x2226b5))['catch'](handleError(_0x2130fe,null));};exports['getHopperFinals']=function(_0x5ed915,_0x31f756,_0x584f80){var _0x33d0d7={'raw':!![],'where':{}};var _0x282bd1={};var _0x59096a={'count':0x0,'rows':[]};return db[_0x74bd('0x28')][_0x74bd('0x54')]({'where':{'id':_0x5ed915[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0x31f756,null))[_0x74bd('0x21')](function(_0x1d93b9){if(_0x1d93b9){_0x282bd1[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](db[_0x74bd('0x5a')][_0x74bd('0x29')]);_0x282bd1[_0x74bd('0x2c')]=_['keys'](_0x5ed915['query']);_0x282bd1['filters']=_[_0x74bd('0x3e')](_0x282bd1['model'],_0x282bd1['query']);_0x33d0d7['attributes']=_[_0x74bd('0x3e')](_0x282bd1[_0x74bd('0x2a')],qs[_0x74bd('0x2e')](_0x5ed915[_0x74bd('0x2c')][_0x74bd('0x2e')]));_0x33d0d7[_0x74bd('0x2f')]=_0x33d0d7[_0x74bd('0x2f')]['length']?_0x33d0d7[_0x74bd('0x2f')]:_0x282bd1['model'];if(!_0x5ed915[_0x74bd('0x2c')][_0x74bd('0x55')](_0x74bd('0x30'))){_0x33d0d7['limit']=qs['limit'](_0x5ed915['query']['limit']);_0x33d0d7['offset']=qs[_0x74bd('0x1b')](_0x5ed915[_0x74bd('0x2c')][_0x74bd('0x1b')]);}_0x33d0d7[_0x74bd('0x31')]=qs[_0x74bd('0x32')](_0x5ed915['query'][_0x74bd('0x32')]);_0x33d0d7['where']=qs[_0x74bd('0x2d')](_['pick'](_0x5ed915['query'],_0x282bd1[_0x74bd('0x2d')]));_0x33d0d7[_0x74bd('0x35')][_0x74bd('0x5b')]=_0x1d93b9['id'];if(_0x5ed915[_0x74bd('0x2c')][_0x74bd('0x33')]){_0x33d0d7[_0x74bd('0x35')]=_[_0x74bd('0x34')](_0x33d0d7[_0x74bd('0x35')],{'$or':_[_0x74bd('0x36')](_0x33d0d7['attributes'],function(_0x4ba1d9){var _0x1046e4={};_0x1046e4[_0x4ba1d9]={'$like':'%'+_0x5ed915['query']['filter']+'%'};return _0x1046e4;})});}_0x33d0d7=_['merge']({},_0x33d0d7,_0x5ed915['options']);return db['CmHopperFinal']['count']({'where':_0x33d0d7['where']})['then'](function(_0xc5d23e){_0x59096a[_0x74bd('0x1a')]=_0xc5d23e;if(_0x5ed915[_0x74bd('0x2c')]['includeAll']){_0x33d0d7['include']=[{'all':!![]}];}return db[_0x74bd('0x5a')][_0x74bd('0x58')](_0x33d0d7);})[_0x74bd('0x21')](function(_0x15730e){_0x59096a['rows']=_0x15730e;return _0x59096a;});}})[_0x74bd('0x21')](respondWithFilteredResult(_0x31f756,_0x33d0d7))[_0x74bd('0x3c')](handleError(_0x31f756,null));};exports['getHopperBlacks']=function(_0x390984,_0x23628d,_0x54048f){var _0x21f13f={'raw':!![],'where':{}};var _0x418aa6={};var _0x1922e8={'count':0x0,'rows':[]};return db[_0x74bd('0x28')][_0x74bd('0x54')]({'where':{'id':_0x390984[_0x74bd('0x4d')]['id']}})['then'](handleEntityNotFound(_0x23628d,null))['then'](function(_0x4d7326){if(_0x4d7326){_0x418aa6[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](db[_0x74bd('0x5c')][_0x74bd('0x29')]);_0x418aa6[_0x74bd('0x2c')]=_[_0x74bd('0x2b')](_0x390984[_0x74bd('0x2c')]);_0x418aa6[_0x74bd('0x2d')]=_['intersection'](_0x418aa6['model'],_0x418aa6[_0x74bd('0x2c')]);_0x21f13f[_0x74bd('0x2f')]=_[_0x74bd('0x3e')](_0x418aa6[_0x74bd('0x2a')],qs['fields'](_0x390984['query']['fields']));_0x21f13f[_0x74bd('0x2f')]=_0x21f13f['attributes'][_0x74bd('0x3f')]?_0x21f13f[_0x74bd('0x2f')]:_0x418aa6['model'];if(!_0x390984[_0x74bd('0x2c')][_0x74bd('0x55')](_0x74bd('0x30'))){_0x21f13f['limit']=qs['limit'](_0x390984[_0x74bd('0x2c')][_0x74bd('0x1c')]);_0x21f13f[_0x74bd('0x1b')]=qs[_0x74bd('0x1b')](_0x390984[_0x74bd('0x2c')][_0x74bd('0x1b')]);}_0x21f13f[_0x74bd('0x31')]=qs['sort'](_0x390984[_0x74bd('0x2c')][_0x74bd('0x32')]);_0x21f13f[_0x74bd('0x35')]=qs['filters'](_[_0x74bd('0x56')](_0x390984['query'],_0x418aa6[_0x74bd('0x2d')]));_0x21f13f[_0x74bd('0x35')][_0x74bd('0x5b')]=_0x4d7326['id'];if(_0x390984['query'][_0x74bd('0x33')]){_0x21f13f[_0x74bd('0x35')]=_[_0x74bd('0x34')](_0x21f13f[_0x74bd('0x35')],{'$or':_['map'](_0x21f13f[_0x74bd('0x2f')],function(_0x512b31){var _0x234f7e={};_0x234f7e[_0x512b31]={'$like':'%'+_0x390984[_0x74bd('0x2c')][_0x74bd('0x33')]+'%'};return _0x234f7e;})});}_0x21f13f=_[_0x74bd('0x34')]({},_0x21f13f,_0x390984[_0x74bd('0x39')]);return db[_0x74bd('0x5c')][_0x74bd('0x1a')]({'where':_0x21f13f[_0x74bd('0x35')]})[_0x74bd('0x21')](function(_0x1e5adc){_0x1922e8[_0x74bd('0x1a')]=_0x1e5adc;if(_0x390984[_0x74bd('0x2c')][_0x74bd('0x40')]){_0x21f13f[_0x74bd('0x3a')]=[{'all':!![]}];}return db[_0x74bd('0x5c')][_0x74bd('0x58')](_0x21f13f);})[_0x74bd('0x21')](function(_0x2265b5){_0x1922e8[_0x74bd('0x3b')]=_0x2265b5;return _0x1922e8;});}})[_0x74bd('0x21')](respondWithFilteredResult(_0x23628d,_0x21f13f))['catch'](handleError(_0x23628d,null));};exports[_0x74bd('0x5d')]=function(_0x2a4cb6,_0x43e867,_0xb5e2c6){var _0x505dbd={};var _0x40fe15={};var _0x2735ce;var _0x1ae05a;return db['Campaign'][_0x74bd('0x54')]({'where':{'id':_0x2a4cb6[_0x74bd('0x4d')]['id']}})['then'](handleEntityNotFound(_0x43e867,null))[_0x74bd('0x21')](function(_0x5cec26){if(_0x5cec26){_0x2735ce=_0x5cec26;_0x40fe15['model']=_['keys'](db[_0x74bd('0x5e')][_0x74bd('0x29')]);_0x40fe15[_0x74bd('0x2c')]=_[_0x74bd('0x2b')](_0x2a4cb6[_0x74bd('0x2c')]);_0x40fe15['filters']=_['intersection'](_0x40fe15['model'],_0x40fe15[_0x74bd('0x2c')]);_0x505dbd[_0x74bd('0x2f')]=_['intersection'](_0x40fe15[_0x74bd('0x2a')],qs[_0x74bd('0x2e')](_0x2a4cb6[_0x74bd('0x2c')]['fields']));_0x505dbd['attributes']=_0x505dbd[_0x74bd('0x2f')]['length']?_0x505dbd[_0x74bd('0x2f')]:_0x40fe15[_0x74bd('0x2a')];_0x505dbd['order']=qs[_0x74bd('0x32')](_0x2a4cb6[_0x74bd('0x2c')][_0x74bd('0x32')]);_0x505dbd[_0x74bd('0x35')]=qs[_0x74bd('0x2d')](_[_0x74bd('0x56')](_0x2a4cb6[_0x74bd('0x2c')],_0x40fe15[_0x74bd('0x2d')]));if(_0x2a4cb6['query'][_0x74bd('0x33')]){_0x505dbd[_0x74bd('0x35')]=_[_0x74bd('0x34')](_0x505dbd[_0x74bd('0x35')],{'$or':_[_0x74bd('0x36')](_0x505dbd[_0x74bd('0x2f')],function(_0x468d51){var _0x338b5c={};_0x338b5c[_0x468d51]={'$like':'%'+_0x2a4cb6['query'][_0x74bd('0x33')]+'%'};return _0x338b5c;})});}_0x505dbd=_[_0x74bd('0x34')]({},_0x505dbd,_0x2a4cb6[_0x74bd('0x39')]);return _0x2735ce[_0x74bd('0x5d')](_0x505dbd);}})[_0x74bd('0x21')](function(_0x2bdc99){if(_0x2bdc99){_0x1ae05a=_0x2bdc99[_0x74bd('0x3f')];if(!_0x2a4cb6['query']['hasOwnProperty']('nolimit')){_0x505dbd[_0x74bd('0x1c')]=qs['limit'](_0x2a4cb6[_0x74bd('0x2c')][_0x74bd('0x1c')]);_0x505dbd[_0x74bd('0x1b')]=qs['offset'](_0x2a4cb6['query'][_0x74bd('0x1b')]);}return _0x2735ce[_0x74bd('0x5d')](_0x505dbd);}})[_0x74bd('0x21')](function(_0x26cee4){if(_0x26cee4){return _0x26cee4?{'count':_0x1ae05a,'rows':_0x26cee4}:null;}})['then'](respondWithResult(_0x43e867,null))[_0x74bd('0x3c')](handleError(_0x43e867,null));};exports[_0x74bd('0x5f')]=function(_0x4ff658,_0x1318cb,_0x98f7cd){var _0x4424ec,_0x15e868;return db[_0x74bd('0x28')][_0x74bd('0x41')]({'where':{'id':_0x4ff658[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0x1318cb,null))[_0x74bd('0x21')](function(_0x13a4b7){if(_0x13a4b7){_0x15e868=_0x13a4b7;return _0x13a4b7[_0x74bd('0x5f')](_0x4ff658[_0x74bd('0x50')][_0x74bd('0x60')],_['omit'](_0x4ff658[_0x74bd('0x50')],[_0x74bd('0x60'),'id'])||{});}return null;})[_0x74bd('0x61')](function(_0x1571c2){var _0xda4ec5;_0x4424ec=_0x1571c2||[];var _0x54902e=[];if(_0x1571c2){for(var _0x1bbfb5=0x0;_0x1bbfb5<_0x1571c2[_0x74bd('0x3f')];_0x1bbfb5+=0x1){var _0x3c9cec=_0x1571c2[_0x1bbfb5][_0x74bd('0x23')]({'plain':!![]});_0x15e868[_0x74bd('0x62')]=_0x4ff658[_0x74bd('0x50')][_0x74bd('0x62')]?_0x4ff658[_0x74bd('0x50')][_0x74bd('0x62')]:_0x15e868[_0x74bd('0x62')];switch(_0x15e868['dialCheckDuplicateType']){case _0x74bd('0x63'):_0xda4ec5=squel[_0x74bd('0x64')]()[_0x74bd('0x65')]('cm_hopper')[_0x74bd('0x66')]([_0x74bd('0x67'),_0x74bd('0x68'),_0x74bd('0x69'),_0x74bd('0x6a'),_0x74bd('0x5b'),_0x74bd('0x51'),_0x74bd('0x4f')],squel['select']()[_0x74bd('0x6b')]('phone',_0x74bd('0x67'))['field'](_0x74bd('0x6c'),_0x74bd('0x68'))[_0x74bd('0x6b')]('id',_0x74bd('0x69'))[_0x74bd('0x6b')](_0x3c9cec[_0x74bd('0x6d')]['toString'](),_0x74bd('0x6a'))[_0x74bd('0x6b')](_0x4ff658[_0x74bd('0x4d')]['id'][_0x74bd('0x6e')](),_0x74bd('0x5b'))[_0x74bd('0x6b')](_0x74bd('0x6c'),_0x74bd('0x51'))[_0x74bd('0x6b')](_0x74bd('0x6c'),_0x74bd('0x4f'))['from'](_0x74bd('0x6f'))['where'](_0x74bd('0x70'))['where'](_0x74bd('0x71'),_0x3c9cec[_0x74bd('0x6d')][_0x74bd('0x6e')]())['where'](_0x74bd('0x72'))[_0x74bd('0x35')](_0x74bd('0x73'),squel[_0x74bd('0x74')]()[_0x74bd('0x6b')](_0x74bd('0x75'))[_0x74bd('0x76')](_0x74bd('0x77'))['where'](_0x74bd('0x78'),_0x4ff658[_0x74bd('0x4d')]['id'][_0x74bd('0x6e')]()))[_0x74bd('0x35')]('phone\x20NOT\x20IN\x20(?)',squel[_0x74bd('0x74')]()[_0x74bd('0x6b')](_0x74bd('0x79'))['from'](_0x74bd('0x7a'))[_0x74bd('0x35')](_0x74bd('0x78'),_0x4ff658[_0x74bd('0x4d')]['id'][_0x74bd('0x6e')]())))[_0x74bd('0x6e')]();break;case'onlyIfOpen':_0xda4ec5=squel[_0x74bd('0x64')]()[_0x74bd('0x65')](_0x74bd('0x7a'))[_0x74bd('0x66')]([_0x74bd('0x67'),'scheduledAt',_0x74bd('0x69'),_0x74bd('0x6a'),_0x74bd('0x5b'),'createdAt','updatedAt'],squel[_0x74bd('0x74')]()['field'](_0x74bd('0x67'),_0x74bd('0x67'))[_0x74bd('0x6b')](_0x74bd('0x6c'),'scheduledAt')[_0x74bd('0x6b')]('id','ContactId')['field'](_0x3c9cec[_0x74bd('0x6d')][_0x74bd('0x6e')](),_0x74bd('0x6a'))[_0x74bd('0x6b')](_0x4ff658[_0x74bd('0x4d')]['id'][_0x74bd('0x6e')](),_0x74bd('0x5b'))['field'](_0x74bd('0x6c'),_0x74bd('0x51'))[_0x74bd('0x6b')](_0x74bd('0x6c'),_0x74bd('0x4f'))[_0x74bd('0x76')](_0x74bd('0x6f'))['where'](_0x74bd('0x70'))[_0x74bd('0x35')](_0x74bd('0x71'),_0x3c9cec[_0x74bd('0x6d')][_0x74bd('0x6e')]())[_0x74bd('0x35')](_0x74bd('0x72'))[_0x74bd('0x35')](_0x74bd('0x73'),squel[_0x74bd('0x74')]()['field'](_0x74bd('0x79'))[_0x74bd('0x76')]('cm_hopper')[_0x74bd('0x35')]('CampaignId\x20=\x20?',_0x4ff658[_0x74bd('0x4d')]['id'][_0x74bd('0x6e')]())))[_0x74bd('0x6e')]();break;default:_0xda4ec5=squel['insert']()['into']('cm_hopper')[_0x74bd('0x66')]([_0x74bd('0x67'),_0x74bd('0x68'),_0x74bd('0x69'),_0x74bd('0x6a'),_0x74bd('0x5b'),'createdAt',_0x74bd('0x4f')],squel[_0x74bd('0x74')]()[_0x74bd('0x6b')]('phone',_0x74bd('0x67'))[_0x74bd('0x6b')](_0x74bd('0x6c'),_0x74bd('0x68'))['field']('id',_0x74bd('0x69'))['field'](_0x3c9cec[_0x74bd('0x6d')][_0x74bd('0x6e')](),_0x74bd('0x6a'))[_0x74bd('0x6b')](_0x4ff658[_0x74bd('0x4d')]['id']['toString'](),_0x74bd('0x5b'))['field'](_0x74bd('0x6c'),_0x74bd('0x51'))[_0x74bd('0x6b')](_0x74bd('0x6c'),_0x74bd('0x4f'))[_0x74bd('0x76')](_0x74bd('0x6f'))[_0x74bd('0x35')](_0x74bd('0x70'))[_0x74bd('0x35')]('ListId\x20=\x20?',_0x3c9cec[_0x74bd('0x6d')]['toString']())[_0x74bd('0x35')](_0x74bd('0x72')))[_0x74bd('0x6e')]();}_0x54902e[_0x74bd('0x7b')](db[_0x74bd('0x7c')][_0x74bd('0x2c')](_0xda4ec5));}return BPromise[_0x74bd('0x7d')](_0x54902e);}})['then'](function(){return _0x4424ec;})[_0x74bd('0x21')](respondWithResult(_0x1318cb,null))[_0x74bd('0x3c')](handleError(_0x1318cb,null));};exports[_0x74bd('0x7e')]=function(_0x15ef71,_0x2b1aac,_0x4661e6){return db[_0x74bd('0x28')][_0x74bd('0x41')]({'where':{'id':_0x15ef71[_0x74bd('0x4d')]['id']}})['then'](handleEntityNotFound(_0x2b1aac,null))[_0x74bd('0x21')](function(_0x29de35){if(_0x29de35){return _0x29de35[_0x74bd('0x7e')](_0x15ef71[_0x74bd('0x2c')]['ids']);}})[_0x74bd('0x21')](function(_0x2f8285){if(_0x2f8285){return db[_0x74bd('0x57')]['destroy']({'where':{'ListId':_0x15ef71['query'][_0x74bd('0x60')],'CampaignId':_0x15ef71[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](function(){return _0x2f8285;});}})[_0x74bd('0x21')](respondWithStatusCode(_0x2b1aac,null))[_0x74bd('0x3c')](handleError(_0x2b1aac,null));};exports[_0x74bd('0x7f')]=function(_0x117c01,_0xef4223,_0x41b307){var _0x38dc51={'raw':!![],'where':{}};var _0x3f3160={};var _0x393e01={'count':0x0,'rows':[]};return db[_0x74bd('0x28')]['findOne']({'where':{'id':_0x117c01[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0xef4223,null))['then'](function(_0x5ab17e){if(_0x5ab17e){_0x3f3160[_0x74bd('0x2a')]=_[_0x74bd('0x2b')](db[_0x74bd('0x5e')]['rawAttributes']);_0x3f3160[_0x74bd('0x2c')]=_[_0x74bd('0x2b')](_0x117c01['query']);_0x3f3160['filters']=_['intersection'](_0x3f3160[_0x74bd('0x2a')],_0x3f3160[_0x74bd('0x2c')]);_0x38dc51[_0x74bd('0x2f')]=_[_0x74bd('0x3e')](_0x3f3160['model'],qs[_0x74bd('0x2e')](_0x117c01[_0x74bd('0x2c')][_0x74bd('0x2e')]));_0x38dc51[_0x74bd('0x2f')]=_0x38dc51[_0x74bd('0x2f')]['length']?_0x38dc51['attributes']:_0x3f3160[_0x74bd('0x2a')];if(!_0x117c01[_0x74bd('0x2c')][_0x74bd('0x55')](_0x74bd('0x30'))){_0x38dc51['limit']=qs[_0x74bd('0x1c')](_0x117c01[_0x74bd('0x2c')][_0x74bd('0x1c')]);_0x38dc51['offset']=qs[_0x74bd('0x1b')](_0x117c01['query']['offset']);}_0x38dc51['order']=qs[_0x74bd('0x32')](_0x117c01[_0x74bd('0x2c')][_0x74bd('0x32')]);_0x38dc51[_0x74bd('0x35')]=qs[_0x74bd('0x2d')](_[_0x74bd('0x56')](_0x117c01[_0x74bd('0x2c')],_0x3f3160['filters']));_0x38dc51[_0x74bd('0x35')][_0x74bd('0x5b')]=_0x5ab17e['id'];if(_0x117c01[_0x74bd('0x2c')]['filter']){_0x38dc51[_0x74bd('0x35')]=_[_0x74bd('0x34')](_0x38dc51[_0x74bd('0x35')],{'$or':_['map'](_0x38dc51[_0x74bd('0x2f')],function(_0x56d8a5){var _0x1cbf26={};_0x1cbf26[_0x56d8a5]={'$like':'%'+_0x117c01['query']['filter']+'%'};return _0x1cbf26;})});}_0x38dc51=_['merge']({},_0x38dc51,_0x117c01[_0x74bd('0x39')]);return db[_0x74bd('0x5e')]['count']({'where':_0x38dc51[_0x74bd('0x35')]})[_0x74bd('0x21')](function(_0x2c5e23){_0x393e01[_0x74bd('0x1a')]=_0x2c5e23;if(_0x117c01[_0x74bd('0x2c')][_0x74bd('0x40')]){_0x38dc51[_0x74bd('0x3a')]=[{'all':!![]}];}return db['CmList']['findAll'](_0x38dc51);})[_0x74bd('0x21')](function(_0x1e7feb){_0x393e01[_0x74bd('0x3b')]=_0x1e7feb;return _0x393e01;});}})['then'](respondWithFilteredResult(_0xef4223,_0x38dc51))[_0x74bd('0x3c')](handleError(_0xef4223,null));};exports[_0x74bd('0x80')]=function(_0x110f24,_0x471f1e,_0x118ed1){var _0x48eae1,_0x209c10;return db['Campaign'][_0x74bd('0x41')]({'where':{'id':_0x110f24[_0x74bd('0x4d')]['id']}})['then'](handleEntityNotFound(_0x471f1e,null))['then'](function(_0x2902f6){if(_0x2902f6){_0x209c10=_0x2902f6;return _0x2902f6['addBlackLists'](_0x110f24[_0x74bd('0x50')]['ids'],_[_0x74bd('0x4e')](_0x110f24[_0x74bd('0x50')],[_0x74bd('0x60'),'id'])||{});}return null;})[_0x74bd('0x61')](function(_0x48b00c){var _0x1a5d4e;_0x48eae1=_0x48b00c||[];var _0x5815ce=[];if(_0x48b00c){for(var _0x1f99c3=0x0;_0x1f99c3<_0x48b00c[_0x74bd('0x3f')];_0x1f99c3+=0x1){var _0x4b9d27=_0x48b00c[_0x1f99c3][_0x74bd('0x23')]({'plain':!![]});_0x1a5d4e=squel[_0x74bd('0x64')]()[_0x74bd('0x65')](_0x74bd('0x81'))[_0x74bd('0x66')]([_0x74bd('0x67'),_0x74bd('0x69'),_0x74bd('0x6a'),_0x74bd('0x5b'),_0x74bd('0x51'),_0x74bd('0x4f')],squel[_0x74bd('0x74')]()[_0x74bd('0x6b')]('phone',_0x74bd('0x67'))[_0x74bd('0x6b')]('id',_0x74bd('0x69'))[_0x74bd('0x6b')](_0x4b9d27[_0x74bd('0x6d')]['toString'](),_0x74bd('0x6a'))[_0x74bd('0x6b')](_0x110f24[_0x74bd('0x4d')]['id']['toString'](),_0x74bd('0x5b'))[_0x74bd('0x6b')]('NOW()','createdAt')[_0x74bd('0x6b')](_0x74bd('0x6c'),_0x74bd('0x4f'))[_0x74bd('0x76')](_0x74bd('0x6f'))[_0x74bd('0x35')](_0x74bd('0x70'))[_0x74bd('0x35')](_0x74bd('0x71'),_0x4b9d27['CmListId'][_0x74bd('0x6e')]())[_0x74bd('0x35')](_0x74bd('0x72')))['toString']();_0x5815ce[_0x74bd('0x7b')](db['sequelize'][_0x74bd('0x2c')](_0x1a5d4e));}return BPromise[_0x74bd('0x7d')](_0x5815ce);}})[_0x74bd('0x21')](function(){return _0x48eae1;})['then'](respondWithResult(_0x471f1e,null))[_0x74bd('0x3c')](handleError(_0x471f1e,null));};exports[_0x74bd('0x82')]=function(_0x4ba5bc,_0x13dda1,_0x3d071c){return db[_0x74bd('0x28')][_0x74bd('0x41')]({'where':{'id':_0x4ba5bc[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](handleEntityNotFound(_0x13dda1,null))['then'](function(_0x236cef){if(_0x236cef){return _0x236cef[_0x74bd('0x82')](_0x4ba5bc[_0x74bd('0x2c')][_0x74bd('0x60')]);}})[_0x74bd('0x21')](function(_0x53013b){if(_0x53013b){return db[_0x74bd('0x5c')]['destroy']({'where':{'ListId':_0x4ba5bc[_0x74bd('0x2c')][_0x74bd('0x60')],'CampaignId':_0x4ba5bc[_0x74bd('0x4d')]['id']}})[_0x74bd('0x21')](function(){return _0x53013b;});}})[_0x74bd('0x21')](respondWithStatusCode(_0x13dda1,null))[_0x74bd('0x3c')](handleError(_0x13dda1,null));};
\ No newline at end of file
+var _0x0dc2=['squel','crypto','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../mysqldb','status','end','json','count','offset','limit','apply','reject','save','update','then','IvrCampaigns','UserProfileResource','destroy','sendStatus','error','name','send','index','Campaign','rawAttributes','model','keys','query','filters','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','map','key','VIRTUAL','filter','merge','options','includeAll','include','findAll','catch','show','intersection','find','create','user','get','UserProfileSection','userProfileId','autoAssociation','clone','updatedAt','body','createdAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','findOne','CmHopper','CampaignId','rows','getHopperHistories','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','addLists','ids','omit','spread','dialCheckDuplicateType','always','into','cm_hopper','fromQuery','phone','select','NOW()','scheduledAt','field','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','COALESCE(calleridnum,\x27\x27)','phone\x20NOT\x20IN\x20(?)','CampaignId\x20=\x20?','insert','ContactId','ListId','push','all','removeLists','getBlackLists','CmList','addBlackLists','cm_hopper_black','removeBlackLists','html-pdf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','lodash'];(function(_0x4d1bcf,_0x1971b9){var _0x23b600=function(_0x4b3561){while(--_0x4b3561){_0x4d1bcf['push'](_0x4d1bcf['shift']());}};_0x23b600(++_0x1971b9);}(_0x0dc2,0x1ed));var _0x20dc=function(_0x438940,_0x445e27){_0x438940=_0x438940-0x0;var _0x38d3b7=_0x0dc2[_0x438940];return _0x38d3b7;};'use strict';var pdf=require(_0x20dc('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x20dc('0x1'));var jsonpatch=require(_0x20dc('0x2'));var rp=require(_0x20dc('0x3'));var moment=require(_0x20dc('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x20dc('0x5'));var util=require(_0x20dc('0x6'));var path=require('path');var sox=require(_0x20dc('0x7'));var csv=require(_0x20dc('0x8'));var ejs=require(_0x20dc('0x9'));var fs=require('fs');var _=require(_0x20dc('0xa'));var squel=require(_0x20dc('0xb'));var crypto=require(_0x20dc('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x20dc('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x20dc('0xd'));var authService=require(_0x20dc('0xe'));var qs=require(_0x20dc('0xf'));var hardwareService=require(_0x20dc('0x10'));var logger=require('../../config/logger')(_0x20dc('0x11'));var utils=require(_0x20dc('0x12'));var config=require('../../config/environment');var db=require(_0x20dc('0x13'))['db'];function respondWithStatusCode(_0x4c67d4,_0x193978){_0x193978=_0x193978||0xcc;return function(_0x279890){if(_0x279890){return _0x4c67d4['sendStatus'](_0x193978);}return _0x4c67d4[_0x20dc('0x14')](_0x193978)[_0x20dc('0x15')]();};}function respondWithResult(_0x2b6766,_0xab200b){_0xab200b=_0xab200b||0xc8;return function(_0x498ce6){if(_0x498ce6){return _0x2b6766[_0x20dc('0x14')](_0xab200b)[_0x20dc('0x16')](_0x498ce6);}};}function respondWithFilteredResult(_0x2f93cd,_0x3775cf){return function(_0x57102f){if(_0x57102f){var _0x5734ba=_0x57102f[_0x20dc('0x17')],_0xd9fcb9=_0x3775cf[_0x20dc('0x18')],_0x3c4987=_0x3775cf['offset']+_0x3775cf[_0x20dc('0x19')],_0x191180;if(_0x3c4987>=_0x5734ba){_0x3c4987=_0x5734ba;_0x191180=0xc8;}else{_0x191180=0xce;}_0x2f93cd['status'](_0x191180);return _0x2f93cd['set']('Content-Range',_0xd9fcb9+'-'+_0x3c4987+'/'+_0x5734ba)[_0x20dc('0x16')](_0x57102f);}return null;};}function patchUpdates(_0x267473){return function(_0x7bcdce){try{jsonpatch[_0x20dc('0x1a')](_0x7bcdce,_0x267473,!![]);}catch(_0x1ee7d){return BPromise[_0x20dc('0x1b')](_0x1ee7d);}return _0x7bcdce[_0x20dc('0x1c')]();};}function saveUpdates(_0x39a4a0,_0x3ee395){return function(_0x1b0438){if(_0x1b0438){return _0x1b0438[_0x20dc('0x1d')](_0x39a4a0)[_0x20dc('0x1e')](function(_0x3dc14c){return _0x3dc14c;});}return null;};}function removeEntity(_0x4eb3fe,_0x2f18e9){return function(_0xff6c3){if(_0xff6c3){return _0xff6c3['destroy']()['then'](function(){var _0x183f6d=_0xff6c3['get']({'plain':!![]});var _0x43f68b=_0x20dc('0x1f');return db[_0x20dc('0x20')][_0x20dc('0x21')]({'where':{'type':_0x43f68b,'resourceId':_0x183f6d['id']}})[_0x20dc('0x1e')](function(){return _0xff6c3;});})[_0x20dc('0x1e')](function(){_0x4eb3fe[_0x20dc('0x14')](0xcc)[_0x20dc('0x15')]();});}};}function handleEntityNotFound(_0x833b2a,_0x2b9262){return function(_0x4301bc){if(!_0x4301bc){_0x833b2a[_0x20dc('0x22')](0x194);}return _0x4301bc;};}function handleError(_0x34f216,_0x4e923b){_0x4e923b=_0x4e923b||0x1f4;return function(_0x31702d){logger[_0x20dc('0x23')](_0x31702d['stack']);if(_0x31702d['name']){delete _0x31702d[_0x20dc('0x24')];}_0x34f216[_0x20dc('0x14')](_0x4e923b)[_0x20dc('0x25')](_0x31702d);};}exports[_0x20dc('0x26')]=function(_0x38febc,_0x41b2a1){var _0x360bb0={},_0x2c6594={},_0x5b11ee={'count':0x0,'rows':[]};var _0x165fe2=db[_0x20dc('0x27')][_0x20dc('0x28')];_0x2c6594[_0x20dc('0x29')]=_[_0x20dc('0x2a')](_0x165fe2);_0x2c6594[_0x20dc('0x2b')]=_['keys'](_0x38febc[_0x20dc('0x2b')]);_0x2c6594[_0x20dc('0x2c')]=_['intersection'](_0x2c6594['model'],_0x2c6594[_0x20dc('0x2b')]);_0x360bb0['attributes']=_['intersection'](_0x2c6594['model'],qs[_0x20dc('0x2d')](_0x38febc[_0x20dc('0x2b')]['fields']));_0x360bb0[_0x20dc('0x2e')]=_0x360bb0['attributes'][_0x20dc('0x2f')]?_0x360bb0[_0x20dc('0x2e')]:_0x2c6594[_0x20dc('0x29')];if(!_0x38febc[_0x20dc('0x2b')][_0x20dc('0x30')](_0x20dc('0x31'))){_0x360bb0[_0x20dc('0x19')]=qs[_0x20dc('0x19')](_0x38febc[_0x20dc('0x2b')][_0x20dc('0x19')]);_0x360bb0[_0x20dc('0x18')]=qs['offset'](_0x38febc[_0x20dc('0x2b')]['offset']);}_0x360bb0[_0x20dc('0x32')]=qs[_0x20dc('0x33')](_0x38febc[_0x20dc('0x2b')][_0x20dc('0x33')]);_0x360bb0[_0x20dc('0x34')]=qs['filters'](_[_0x20dc('0x35')](_0x38febc['query'],_0x2c6594[_0x20dc('0x2c')]));if(_0x38febc['query']['filter']){_0x360bb0[_0x20dc('0x34')]=_['merge'](_0x360bb0[_0x20dc('0x34')],{'$or':_[_0x20dc('0x36')](_0x165fe2,function(_0x3307be){if(_0x3307be['type'][_0x20dc('0x37')]!==_0x20dc('0x38')){var _0x3b8df4={};_0x3b8df4[_0x3307be['field']]={'$like':'%'+_0x38febc[_0x20dc('0x2b')][_0x20dc('0x39')]+'%'};return _0x3b8df4;}})});}_0x360bb0=_[_0x20dc('0x3a')]({},_0x360bb0,_0x38febc[_0x20dc('0x3b')]);var _0x1a6a5e={'where':_0x360bb0[_0x20dc('0x34')]};return db[_0x20dc('0x27')][_0x20dc('0x17')](_0x1a6a5e)[_0x20dc('0x1e')](function(_0x41c760){_0x5b11ee[_0x20dc('0x17')]=_0x41c760;if(_0x38febc['query'][_0x20dc('0x3c')]){_0x360bb0[_0x20dc('0x3d')]=[{'all':!![]}];}return db['Campaign'][_0x20dc('0x3e')](_0x360bb0);})[_0x20dc('0x1e')](function(_0x1a9eee){_0x5b11ee['rows']=_0x1a9eee;return _0x5b11ee;})['then'](respondWithFilteredResult(_0x41b2a1,_0x360bb0))[_0x20dc('0x3f')](handleError(_0x41b2a1,null));};exports[_0x20dc('0x40')]=function(_0x3e187c,_0x2ca7d0){var _0x40b939={'raw':![],'where':{'id':_0x3e187c['params']['id']}},_0xfa8d0e={};_0xfa8d0e[_0x20dc('0x29')]=_['keys'](db[_0x20dc('0x27')][_0x20dc('0x28')]);_0xfa8d0e['query']=_['keys'](_0x3e187c['query']);_0xfa8d0e[_0x20dc('0x2c')]=_[_0x20dc('0x41')](_0xfa8d0e['model'],_0xfa8d0e[_0x20dc('0x2b')]);_0x40b939[_0x20dc('0x2e')]=_[_0x20dc('0x41')](_0xfa8d0e[_0x20dc('0x29')],qs[_0x20dc('0x2d')](_0x3e187c['query'][_0x20dc('0x2d')]));_0x40b939[_0x20dc('0x2e')]=_0x40b939['attributes']['length']?_0x40b939[_0x20dc('0x2e')]:_0xfa8d0e[_0x20dc('0x29')];if(_0x3e187c[_0x20dc('0x2b')]['includeAll']){_0x40b939[_0x20dc('0x3d')]=[{'all':!![]}];}_0x40b939=_[_0x20dc('0x3a')]({},_0x40b939,_0x3e187c[_0x20dc('0x3b')]);return db['Campaign'][_0x20dc('0x42')](_0x40b939)[_0x20dc('0x1e')](handleEntityNotFound(_0x2ca7d0,null))[_0x20dc('0x1e')](respondWithResult(_0x2ca7d0,null))['catch'](handleError(_0x2ca7d0,null));};exports['create']=function(_0x2fd036,_0x4f9fae){return db[_0x20dc('0x27')][_0x20dc('0x43')](_0x2fd036['body'],{})[_0x20dc('0x1e')](function(_0x57810d){var _0x11daa4=_0x2fd036[_0x20dc('0x44')][_0x20dc('0x45')]({'plain':!![]});if(!_0x11daa4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x11daa4['role']==='user'){var _0x5505ba=_0x57810d[_0x20dc('0x45')]({'plain':!![]});var _0x5548e7='IvrCampaigns';return db[_0x20dc('0x46')][_0x20dc('0x42')]({'where':{'name':_0x5548e7,'userProfileId':_0x11daa4[_0x20dc('0x47')]},'raw':!![]})['then'](function(_0x54de12){if(_0x54de12&&_0x54de12[_0x20dc('0x48')]===0x0){return db[_0x20dc('0x20')][_0x20dc('0x43')]({'name':_0x5505ba[_0x20dc('0x24')],'resourceId':_0x5505ba['id'],'type':_0x54de12[_0x20dc('0x24')],'sectionId':_0x54de12['id']},{})[_0x20dc('0x1e')](function(){return _0x57810d;});}else{return _0x57810d;}})[_0x20dc('0x3f')](function(_0x4654ce){logger[_0x20dc('0x23')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4654ce);throw _0x4654ce;});}return _0x57810d;})['then'](respondWithResult(_0x4f9fae,0xc9))['catch'](handleError(_0x4f9fae,null));};exports[_0x20dc('0x49')]=function(_0x58c415,_0x42b872){var _0x439f90={'raw':![],'where':{'id':_0x58c415['params']['id']}},_0xf981b6={};_0xf981b6[_0x20dc('0x29')]=_['keys'](db[_0x20dc('0x27')]['rawAttributes']);_0x439f90[_0x20dc('0x2e')]=_[_0x20dc('0x41')](_0xf981b6[_0x20dc('0x29')],qs[_0x20dc('0x2d')](_0x58c415['query'][_0x20dc('0x2d')]));_0x439f90[_0x20dc('0x2e')]=_0x439f90[_0x20dc('0x2e')]['length']?_0x439f90[_0x20dc('0x2e')]:_0xf981b6[_0x20dc('0x29')];if(_0x58c415['query'][_0x20dc('0x3c')]){_0x439f90[_0x20dc('0x3d')]=[{'all':!![]}];}_0x439f90=_[_0x20dc('0x3a')]({},_0x439f90,_0x58c415[_0x20dc('0x3b')]);return db[_0x20dc('0x27')][_0x20dc('0x42')](_0x439f90)[_0x20dc('0x1e')](handleEntityNotFound(_0x42b872,null))['then'](function(_0x3af72f){if(_0x3af72f){var _0x443e76=_0x3af72f['get']({'plain':!![]});_0x443e76=qs['omit'](_0x443e76,['id','createdAt',_0x20dc('0x4a')]);_0x58c415[_0x20dc('0x4b')]=_['omit'](_0x58c415[_0x20dc('0x4b')],['id',_0x20dc('0x4c'),'updatedAt']);return db[_0x20dc('0x27')]['create'](_['merge'](_0x443e76,_0x58c415[_0x20dc('0x4b')]),{'include':_0x58c415[_0x20dc('0x2b')][_0x20dc('0x3c')]?[{'all':!![]}]:undefined})[_0x20dc('0x1e')](function(_0x2709ed){var _0x4141f1=_0x58c415[_0x20dc('0x44')][_0x20dc('0x45')]({'plain':!![]});if(!_0x4141f1)throw new Error(_0x20dc('0x4d'));if(_0x4141f1[_0x20dc('0x4e')]===_0x20dc('0x44')){var _0x311594=_0x2709ed['get']({'plain':!![]});var _0x17d19c='IvrCampaigns';return db['UserProfileSection'][_0x20dc('0x42')]({'where':{'name':_0x17d19c,'userProfileId':_0x4141f1[_0x20dc('0x47')]},'raw':!![]})[_0x20dc('0x1e')](function(_0x1b10af){if(_0x1b10af&&_0x1b10af[_0x20dc('0x48')]===0x0){return db[_0x20dc('0x20')][_0x20dc('0x43')]({'name':_0x311594[_0x20dc('0x24')],'resourceId':_0x311594['id'],'type':_0x1b10af[_0x20dc('0x24')],'sectionId':_0x1b10af['id']},{})[_0x20dc('0x1e')](function(){return _0x2709ed;});}else{return _0x2709ed;}})[_0x20dc('0x3f')](function(_0xba2689){logger[_0x20dc('0x23')](_0x20dc('0x4f'),_0xba2689);throw _0xba2689;});}return _0x2709ed;});}})[_0x20dc('0x1e')](respondWithResult(_0x42b872,0xc9))[_0x20dc('0x3f')](handleError(_0x42b872,null));};exports['update']=function(_0x40cd80,_0x1ad238){if(_0x40cd80[_0x20dc('0x4b')]['id']){delete _0x40cd80[_0x20dc('0x4b')]['id'];}return db[_0x20dc('0x27')][_0x20dc('0x42')]({'where':{'id':_0x40cd80[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x1ad238,null))[_0x20dc('0x1e')](saveUpdates(_0x40cd80[_0x20dc('0x4b')],null))[_0x20dc('0x1e')](respondWithResult(_0x1ad238,null))[_0x20dc('0x3f')](handleError(_0x1ad238,null));};exports[_0x20dc('0x21')]=function(_0x1c65af,_0x4dd8f6){return db[_0x20dc('0x27')][_0x20dc('0x42')]({'where':{'id':_0x1c65af[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x4dd8f6,null))[_0x20dc('0x1e')](removeEntity(_0x4dd8f6,null))[_0x20dc('0x3f')](handleError(_0x4dd8f6,null));};exports['getHoppers']=function(_0x1c103e,_0x4cceb4,_0x2df64d){var _0x363ca3={'raw':!![],'where':{}};var _0x468230={};var _0x35b6f1={'count':0x0,'rows':[]};return db['Campaign'][_0x20dc('0x51')]({'where':{'id':_0x1c103e[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x4cceb4,null))[_0x20dc('0x1e')](function(_0x159825){if(_0x159825){_0x468230[_0x20dc('0x29')]=_[_0x20dc('0x2a')](db[_0x20dc('0x52')]['rawAttributes']);_0x468230[_0x20dc('0x2b')]=_[_0x20dc('0x2a')](_0x1c103e['query']);_0x468230[_0x20dc('0x2c')]=_[_0x20dc('0x41')](_0x468230[_0x20dc('0x29')],_0x468230[_0x20dc('0x2b')]);_0x363ca3[_0x20dc('0x2e')]=_[_0x20dc('0x41')](_0x468230[_0x20dc('0x29')],qs[_0x20dc('0x2d')](_0x1c103e[_0x20dc('0x2b')][_0x20dc('0x2d')]));_0x363ca3['attributes']=_0x363ca3[_0x20dc('0x2e')][_0x20dc('0x2f')]?_0x363ca3[_0x20dc('0x2e')]:_0x468230[_0x20dc('0x29')];if(!_0x1c103e[_0x20dc('0x2b')][_0x20dc('0x30')](_0x20dc('0x31'))){_0x363ca3[_0x20dc('0x19')]=qs[_0x20dc('0x19')](_0x1c103e['query'][_0x20dc('0x19')]);_0x363ca3[_0x20dc('0x18')]=qs[_0x20dc('0x18')](_0x1c103e['query'][_0x20dc('0x18')]);}_0x363ca3[_0x20dc('0x32')]=qs[_0x20dc('0x33')](_0x1c103e[_0x20dc('0x2b')][_0x20dc('0x33')]);_0x363ca3[_0x20dc('0x34')]=qs[_0x20dc('0x2c')](_[_0x20dc('0x35')](_0x1c103e['query'],_0x468230[_0x20dc('0x2c')]));_0x363ca3[_0x20dc('0x34')][_0x20dc('0x53')]=_0x159825['id'];if(_0x1c103e[_0x20dc('0x2b')][_0x20dc('0x39')]){_0x363ca3['where']=_[_0x20dc('0x3a')](_0x363ca3[_0x20dc('0x34')],{'$or':_['map'](_0x363ca3[_0x20dc('0x2e')],function(_0x2f591a){var _0x5972df={};_0x5972df[_0x2f591a]={'$like':'%'+_0x1c103e[_0x20dc('0x2b')][_0x20dc('0x39')]+'%'};return _0x5972df;})});}_0x363ca3=_['merge']({},_0x363ca3,_0x1c103e[_0x20dc('0x3b')]);return db[_0x20dc('0x52')][_0x20dc('0x17')]({'where':_0x363ca3[_0x20dc('0x34')]})[_0x20dc('0x1e')](function(_0x15e5c8){_0x35b6f1[_0x20dc('0x17')]=_0x15e5c8;if(_0x1c103e[_0x20dc('0x2b')][_0x20dc('0x3c')]){_0x363ca3[_0x20dc('0x3d')]=[{'all':!![]}];}return db[_0x20dc('0x52')][_0x20dc('0x3e')](_0x363ca3);})[_0x20dc('0x1e')](function(_0x3403e0){_0x35b6f1[_0x20dc('0x54')]=_0x3403e0;return _0x35b6f1;});}})[_0x20dc('0x1e')](respondWithFilteredResult(_0x4cceb4,_0x363ca3))['catch'](handleError(_0x4cceb4,null));};exports[_0x20dc('0x55')]=function(_0x21df5c,_0x12ce7c,_0x5f5242){var _0x14425c={'raw':!![],'where':{}};var _0x4d2d2e={};var _0x2fc46e={'count':0x0,'rows':[]};return db[_0x20dc('0x27')][_0x20dc('0x51')]({'where':{'id':_0x21df5c[_0x20dc('0x50')]['id']}})['then'](handleEntityNotFound(_0x12ce7c,null))[_0x20dc('0x1e')](function(_0x2aa184){if(_0x2aa184){_0x4d2d2e[_0x20dc('0x29')]=_[_0x20dc('0x2a')](db['CmHopperHistory'][_0x20dc('0x28')]);_0x4d2d2e[_0x20dc('0x2b')]=_['keys'](_0x21df5c['query']);_0x4d2d2e['filters']=_[_0x20dc('0x41')](_0x4d2d2e[_0x20dc('0x29')],_0x4d2d2e[_0x20dc('0x2b')]);_0x14425c['attributes']=_[_0x20dc('0x41')](_0x4d2d2e[_0x20dc('0x29')],qs[_0x20dc('0x2d')](_0x21df5c[_0x20dc('0x2b')][_0x20dc('0x2d')]));_0x14425c[_0x20dc('0x2e')]=_0x14425c[_0x20dc('0x2e')][_0x20dc('0x2f')]?_0x14425c[_0x20dc('0x2e')]:_0x4d2d2e[_0x20dc('0x29')];if(!_0x21df5c['query'][_0x20dc('0x30')](_0x20dc('0x31'))){_0x14425c[_0x20dc('0x19')]=qs['limit'](_0x21df5c[_0x20dc('0x2b')]['limit']);_0x14425c[_0x20dc('0x18')]=qs['offset'](_0x21df5c['query'][_0x20dc('0x18')]);}_0x14425c[_0x20dc('0x32')]=qs['sort'](_0x21df5c[_0x20dc('0x2b')]['sort']);_0x14425c[_0x20dc('0x34')]=qs['filters'](_[_0x20dc('0x35')](_0x21df5c['query'],_0x4d2d2e['filters']));_0x14425c[_0x20dc('0x34')][_0x20dc('0x53')]=_0x2aa184['id'];if(_0x21df5c[_0x20dc('0x2b')][_0x20dc('0x39')]){_0x14425c['where']=_[_0x20dc('0x3a')](_0x14425c[_0x20dc('0x34')],{'$or':_['map'](_0x14425c['attributes'],function(_0x56b6da){var _0xb71b17={};_0xb71b17[_0x56b6da]={'$like':'%'+_0x21df5c['query'][_0x20dc('0x39')]+'%'};return _0xb71b17;})});}_0x14425c=_['merge']({},_0x14425c,_0x21df5c[_0x20dc('0x3b')]);return db[_0x20dc('0x56')][_0x20dc('0x17')]({'where':_0x14425c[_0x20dc('0x34')]})[_0x20dc('0x1e')](function(_0x7373a4){_0x2fc46e[_0x20dc('0x17')]=_0x7373a4;if(_0x21df5c[_0x20dc('0x2b')]['includeAll']){_0x14425c['include']=[{'all':!![]}];}return db[_0x20dc('0x56')]['findAll'](_0x14425c);})[_0x20dc('0x1e')](function(_0x19af3c){_0x2fc46e['rows']=_0x19af3c;return _0x2fc46e;});}})[_0x20dc('0x1e')](respondWithFilteredResult(_0x12ce7c,_0x14425c))[_0x20dc('0x3f')](handleError(_0x12ce7c,null));};exports['getHopperFinals']=function(_0x512ded,_0x7acedb,_0x1989db){var _0x3c7e9f={'raw':!![],'where':{}};var _0x58953d={};var _0x1bb6db={'count':0x0,'rows':[]};return db[_0x20dc('0x27')]['findOne']({'where':{'id':_0x512ded[_0x20dc('0x50')]['id']}})['then'](handleEntityNotFound(_0x7acedb,null))['then'](function(_0x1ef2f2){if(_0x1ef2f2){_0x58953d[_0x20dc('0x29')]=_['keys'](db[_0x20dc('0x57')]['rawAttributes']);_0x58953d['query']=_[_0x20dc('0x2a')](_0x512ded[_0x20dc('0x2b')]);_0x58953d[_0x20dc('0x2c')]=_['intersection'](_0x58953d[_0x20dc('0x29')],_0x58953d[_0x20dc('0x2b')]);_0x3c7e9f[_0x20dc('0x2e')]=_[_0x20dc('0x41')](_0x58953d['model'],qs['fields'](_0x512ded[_0x20dc('0x2b')]['fields']));_0x3c7e9f[_0x20dc('0x2e')]=_0x3c7e9f['attributes'][_0x20dc('0x2f')]?_0x3c7e9f[_0x20dc('0x2e')]:_0x58953d[_0x20dc('0x29')];if(!_0x512ded[_0x20dc('0x2b')][_0x20dc('0x30')](_0x20dc('0x31'))){_0x3c7e9f[_0x20dc('0x19')]=qs[_0x20dc('0x19')](_0x512ded['query'][_0x20dc('0x19')]);_0x3c7e9f[_0x20dc('0x18')]=qs['offset'](_0x512ded[_0x20dc('0x2b')]['offset']);}_0x3c7e9f['order']=qs[_0x20dc('0x33')](_0x512ded[_0x20dc('0x2b')][_0x20dc('0x33')]);_0x3c7e9f[_0x20dc('0x34')]=qs[_0x20dc('0x2c')](_[_0x20dc('0x35')](_0x512ded[_0x20dc('0x2b')],_0x58953d['filters']));_0x3c7e9f['where'][_0x20dc('0x53')]=_0x1ef2f2['id'];if(_0x512ded[_0x20dc('0x2b')]['filter']){_0x3c7e9f['where']=_[_0x20dc('0x3a')](_0x3c7e9f[_0x20dc('0x34')],{'$or':_[_0x20dc('0x36')](_0x3c7e9f[_0x20dc('0x2e')],function(_0x11a356){var _0x36a05b={};_0x36a05b[_0x11a356]={'$like':'%'+_0x512ded['query'][_0x20dc('0x39')]+'%'};return _0x36a05b;})});}_0x3c7e9f=_[_0x20dc('0x3a')]({},_0x3c7e9f,_0x512ded[_0x20dc('0x3b')]);return db[_0x20dc('0x57')][_0x20dc('0x17')]({'where':_0x3c7e9f[_0x20dc('0x34')]})[_0x20dc('0x1e')](function(_0x103557){_0x1bb6db[_0x20dc('0x17')]=_0x103557;if(_0x512ded[_0x20dc('0x2b')][_0x20dc('0x3c')]){_0x3c7e9f['include']=[{'all':!![]}];}return db[_0x20dc('0x57')][_0x20dc('0x3e')](_0x3c7e9f);})['then'](function(_0x36f342){_0x1bb6db['rows']=_0x36f342;return _0x1bb6db;});}})['then'](respondWithFilteredResult(_0x7acedb,_0x3c7e9f))[_0x20dc('0x3f')](handleError(_0x7acedb,null));};exports[_0x20dc('0x58')]=function(_0x590d2f,_0x2b3aeb,_0x54dec5){var _0x3ee336={'raw':!![],'where':{}};var _0x4b9f8a={};var _0x11670c={'count':0x0,'rows':[]};return db['Campaign'][_0x20dc('0x51')]({'where':{'id':_0x590d2f[_0x20dc('0x50')]['id']}})['then'](handleEntityNotFound(_0x2b3aeb,null))[_0x20dc('0x1e')](function(_0x396c7b){if(_0x396c7b){_0x4b9f8a[_0x20dc('0x29')]=_[_0x20dc('0x2a')](db[_0x20dc('0x59')][_0x20dc('0x28')]);_0x4b9f8a[_0x20dc('0x2b')]=_['keys'](_0x590d2f['query']);_0x4b9f8a[_0x20dc('0x2c')]=_[_0x20dc('0x41')](_0x4b9f8a[_0x20dc('0x29')],_0x4b9f8a[_0x20dc('0x2b')]);_0x3ee336[_0x20dc('0x2e')]=_['intersection'](_0x4b9f8a[_0x20dc('0x29')],qs[_0x20dc('0x2d')](_0x590d2f['query'][_0x20dc('0x2d')]));_0x3ee336[_0x20dc('0x2e')]=_0x3ee336[_0x20dc('0x2e')][_0x20dc('0x2f')]?_0x3ee336[_0x20dc('0x2e')]:_0x4b9f8a['model'];if(!_0x590d2f['query'][_0x20dc('0x30')](_0x20dc('0x31'))){_0x3ee336[_0x20dc('0x19')]=qs[_0x20dc('0x19')](_0x590d2f[_0x20dc('0x2b')][_0x20dc('0x19')]);_0x3ee336[_0x20dc('0x18')]=qs['offset'](_0x590d2f['query']['offset']);}_0x3ee336[_0x20dc('0x32')]=qs[_0x20dc('0x33')](_0x590d2f['query']['sort']);_0x3ee336[_0x20dc('0x34')]=qs['filters'](_[_0x20dc('0x35')](_0x590d2f['query'],_0x4b9f8a[_0x20dc('0x2c')]));_0x3ee336[_0x20dc('0x34')][_0x20dc('0x53')]=_0x396c7b['id'];if(_0x590d2f['query'][_0x20dc('0x39')]){_0x3ee336['where']=_[_0x20dc('0x3a')](_0x3ee336[_0x20dc('0x34')],{'$or':_[_0x20dc('0x36')](_0x3ee336[_0x20dc('0x2e')],function(_0x357c7a){var _0x416532={};_0x416532[_0x357c7a]={'$like':'%'+_0x590d2f[_0x20dc('0x2b')]['filter']+'%'};return _0x416532;})});}_0x3ee336=_[_0x20dc('0x3a')]({},_0x3ee336,_0x590d2f[_0x20dc('0x3b')]);return db[_0x20dc('0x59')][_0x20dc('0x17')]({'where':_0x3ee336[_0x20dc('0x34')]})[_0x20dc('0x1e')](function(_0x2b5a7d){_0x11670c[_0x20dc('0x17')]=_0x2b5a7d;if(_0x590d2f['query'][_0x20dc('0x3c')]){_0x3ee336[_0x20dc('0x3d')]=[{'all':!![]}];}return db['CmHopperBlack'][_0x20dc('0x3e')](_0x3ee336);})[_0x20dc('0x1e')](function(_0x3d4507){_0x11670c[_0x20dc('0x54')]=_0x3d4507;return _0x11670c;});}})[_0x20dc('0x1e')](respondWithFilteredResult(_0x2b3aeb,_0x3ee336))[_0x20dc('0x3f')](handleError(_0x2b3aeb,null));};exports[_0x20dc('0x5a')]=function(_0x31f206,_0x4ee698,_0x2adee0){var _0x112ac2={};var _0x4abc40={};var _0x5b337e;var _0x2cb059;return db[_0x20dc('0x27')][_0x20dc('0x51')]({'where':{'id':_0x31f206['params']['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x4ee698,null))[_0x20dc('0x1e')](function(_0xdf243a){if(_0xdf243a){_0x5b337e=_0xdf243a;_0x4abc40[_0x20dc('0x29')]=_[_0x20dc('0x2a')](db['CmList'][_0x20dc('0x28')]);_0x4abc40[_0x20dc('0x2b')]=_[_0x20dc('0x2a')](_0x31f206[_0x20dc('0x2b')]);_0x4abc40[_0x20dc('0x2c')]=_[_0x20dc('0x41')](_0x4abc40[_0x20dc('0x29')],_0x4abc40[_0x20dc('0x2b')]);_0x112ac2[_0x20dc('0x2e')]=_[_0x20dc('0x41')](_0x4abc40[_0x20dc('0x29')],qs[_0x20dc('0x2d')](_0x31f206['query'][_0x20dc('0x2d')]));_0x112ac2['attributes']=_0x112ac2['attributes'][_0x20dc('0x2f')]?_0x112ac2[_0x20dc('0x2e')]:_0x4abc40['model'];_0x112ac2['order']=qs[_0x20dc('0x33')](_0x31f206['query'][_0x20dc('0x33')]);_0x112ac2[_0x20dc('0x34')]=qs[_0x20dc('0x2c')](_[_0x20dc('0x35')](_0x31f206['query'],_0x4abc40['filters']));if(_0x31f206[_0x20dc('0x2b')][_0x20dc('0x39')]){_0x112ac2[_0x20dc('0x34')]=_[_0x20dc('0x3a')](_0x112ac2[_0x20dc('0x34')],{'$or':_['map'](_0x112ac2[_0x20dc('0x2e')],function(_0x316229){var _0x36095d={};_0x36095d[_0x316229]={'$like':'%'+_0x31f206[_0x20dc('0x2b')][_0x20dc('0x39')]+'%'};return _0x36095d;})});}_0x112ac2=_[_0x20dc('0x3a')]({},_0x112ac2,_0x31f206[_0x20dc('0x3b')]);return _0x5b337e[_0x20dc('0x5a')](_0x112ac2);}})[_0x20dc('0x1e')](function(_0x5e3422){if(_0x5e3422){_0x2cb059=_0x5e3422['length'];if(!_0x31f206[_0x20dc('0x2b')]['hasOwnProperty']('nolimit')){_0x112ac2['limit']=qs['limit'](_0x31f206[_0x20dc('0x2b')][_0x20dc('0x19')]);_0x112ac2[_0x20dc('0x18')]=qs[_0x20dc('0x18')](_0x31f206['query']['offset']);}return _0x5b337e[_0x20dc('0x5a')](_0x112ac2);}})[_0x20dc('0x1e')](function(_0x1370f1){if(_0x1370f1){return _0x1370f1?{'count':_0x2cb059,'rows':_0x1370f1}:null;}})[_0x20dc('0x1e')](respondWithResult(_0x4ee698,null))[_0x20dc('0x3f')](handleError(_0x4ee698,null));};exports[_0x20dc('0x5b')]=function(_0x42f894,_0x15aebd,_0x3f10f9){var _0x53a43b,_0x289d59;return db['Campaign'][_0x20dc('0x42')]({'where':{'id':_0x42f894['params']['id']}})['then'](handleEntityNotFound(_0x15aebd,null))[_0x20dc('0x1e')](function(_0x6801c3){if(_0x6801c3){_0x289d59=_0x6801c3;return _0x6801c3['addLists'](_0x42f894[_0x20dc('0x4b')][_0x20dc('0x5c')],_[_0x20dc('0x5d')](_0x42f894[_0x20dc('0x4b')],[_0x20dc('0x5c'),'id'])||{});}return null;})[_0x20dc('0x5e')](function(_0x3194a6){var _0x5e292b;_0x53a43b=_0x3194a6||[];var _0x25f390=[];if(_0x3194a6){for(var _0x1dbe83=0x0;_0x1dbe83<_0x3194a6[_0x20dc('0x2f')];_0x1dbe83+=0x1){var _0x213c1e=_0x3194a6[_0x1dbe83][_0x20dc('0x45')]({'plain':!![]});_0x289d59[_0x20dc('0x5f')]=_0x42f894['body'][_0x20dc('0x5f')]?_0x42f894[_0x20dc('0x4b')]['dialCheckDuplicateType']:_0x289d59[_0x20dc('0x5f')];switch(_0x289d59[_0x20dc('0x5f')]){case _0x20dc('0x60'):_0x5e292b=squel['insert']()[_0x20dc('0x61')](_0x20dc('0x62'))[_0x20dc('0x63')]([_0x20dc('0x64'),'scheduledAt','ContactId','ListId','CampaignId',_0x20dc('0x4c'),'updatedAt'],squel[_0x20dc('0x65')]()['field'](_0x20dc('0x64'),'phone')['field'](_0x20dc('0x66'),_0x20dc('0x67'))[_0x20dc('0x68')]('id','ContactId')['field'](_0x213c1e[_0x20dc('0x69')][_0x20dc('0x6a')](),'ListId')[_0x20dc('0x68')](_0x42f894[_0x20dc('0x50')]['id'][_0x20dc('0x6a')](),_0x20dc('0x53'))[_0x20dc('0x68')](_0x20dc('0x66'),_0x20dc('0x4c'))[_0x20dc('0x68')](_0x20dc('0x66'),'updatedAt')[_0x20dc('0x6b')](_0x20dc('0x6c'))[_0x20dc('0x34')](_0x20dc('0x6d'))[_0x20dc('0x34')](_0x20dc('0x6e'),_0x213c1e[_0x20dc('0x69')]['toString']())['where'](_0x20dc('0x6f'))[_0x20dc('0x34')]('phone\x20NOT\x20IN\x20(?)',squel['select']()[_0x20dc('0x68')](_0x20dc('0x70'))[_0x20dc('0x6b')]('cm_hopper_final')['where']('CampaignId\x20=\x20?',_0x42f894[_0x20dc('0x50')]['id'][_0x20dc('0x6a')]()))['where'](_0x20dc('0x71'),squel[_0x20dc('0x65')]()[_0x20dc('0x68')]('COALESCE(phone,\x27\x27)')[_0x20dc('0x6b')]('cm_hopper')[_0x20dc('0x34')](_0x20dc('0x72'),_0x42f894['params']['id'][_0x20dc('0x6a')]())))[_0x20dc('0x6a')]();break;case'onlyIfOpen':_0x5e292b=squel[_0x20dc('0x73')]()[_0x20dc('0x61')]('cm_hopper')['fromQuery']([_0x20dc('0x64'),_0x20dc('0x67'),_0x20dc('0x74'),_0x20dc('0x75'),_0x20dc('0x53'),'createdAt','updatedAt'],squel[_0x20dc('0x65')]()[_0x20dc('0x68')](_0x20dc('0x64'),_0x20dc('0x64'))[_0x20dc('0x68')](_0x20dc('0x66'),_0x20dc('0x67'))['field']('id',_0x20dc('0x74'))[_0x20dc('0x68')](_0x213c1e['CmListId'][_0x20dc('0x6a')](),_0x20dc('0x75'))[_0x20dc('0x68')](_0x42f894[_0x20dc('0x50')]['id'][_0x20dc('0x6a')](),_0x20dc('0x53'))['field'](_0x20dc('0x66'),_0x20dc('0x4c'))[_0x20dc('0x68')](_0x20dc('0x66'),_0x20dc('0x4a'))['from']('cm_contacts')[_0x20dc('0x34')](_0x20dc('0x6d'))[_0x20dc('0x34')](_0x20dc('0x6e'),_0x213c1e[_0x20dc('0x69')][_0x20dc('0x6a')]())[_0x20dc('0x34')](_0x20dc('0x6f'))[_0x20dc('0x34')](_0x20dc('0x71'),squel[_0x20dc('0x65')]()[_0x20dc('0x68')]('COALESCE(phone,\x27\x27)')[_0x20dc('0x6b')](_0x20dc('0x62'))[_0x20dc('0x34')](_0x20dc('0x72'),_0x42f894[_0x20dc('0x50')]['id'][_0x20dc('0x6a')]())))[_0x20dc('0x6a')]();break;default:_0x5e292b=squel[_0x20dc('0x73')]()['into'](_0x20dc('0x62'))[_0x20dc('0x63')]([_0x20dc('0x64'),'scheduledAt',_0x20dc('0x74'),_0x20dc('0x75'),_0x20dc('0x53'),_0x20dc('0x4c'),_0x20dc('0x4a')],squel[_0x20dc('0x65')]()[_0x20dc('0x68')](_0x20dc('0x64'),'phone')[_0x20dc('0x68')](_0x20dc('0x66'),_0x20dc('0x67'))[_0x20dc('0x68')]('id','ContactId')[_0x20dc('0x68')](_0x213c1e[_0x20dc('0x69')][_0x20dc('0x6a')](),'ListId')[_0x20dc('0x68')](_0x42f894[_0x20dc('0x50')]['id'][_0x20dc('0x6a')](),_0x20dc('0x53'))[_0x20dc('0x68')](_0x20dc('0x66'),_0x20dc('0x4c'))['field'](_0x20dc('0x66'),'updatedAt')['from'](_0x20dc('0x6c'))[_0x20dc('0x34')](_0x20dc('0x6d'))['where']('ListId\x20=\x20?',_0x213c1e['CmListId'][_0x20dc('0x6a')]())[_0x20dc('0x34')]('phone\x20IS\x20NOT\x20NULL'))[_0x20dc('0x6a')]();}_0x25f390[_0x20dc('0x76')](db['sequelize'][_0x20dc('0x2b')](_0x5e292b));}return BPromise[_0x20dc('0x77')](_0x25f390);}})['then'](function(){return _0x53a43b;})[_0x20dc('0x1e')](respondWithResult(_0x15aebd,null))[_0x20dc('0x3f')](handleError(_0x15aebd,null));};exports[_0x20dc('0x78')]=function(_0x1fc6a9,_0x1ab05e,_0x4b5a4c){return db['Campaign'][_0x20dc('0x42')]({'where':{'id':_0x1fc6a9[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x1ab05e,null))[_0x20dc('0x1e')](function(_0xb21e22){if(_0xb21e22){return _0xb21e22[_0x20dc('0x78')](_0x1fc6a9[_0x20dc('0x2b')][_0x20dc('0x5c')]);}})[_0x20dc('0x1e')](function(_0x1156e8){if(_0x1156e8){return db[_0x20dc('0x52')]['destroy']({'where':{'ListId':_0x1fc6a9[_0x20dc('0x2b')]['ids'],'CampaignId':_0x1fc6a9[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](function(){return _0x1156e8;});}})[_0x20dc('0x1e')](respondWithStatusCode(_0x1ab05e,null))[_0x20dc('0x3f')](handleError(_0x1ab05e,null));};exports[_0x20dc('0x79')]=function(_0x1d4592,_0x2d47af,_0x434a49){var _0x424f8f={'raw':!![],'where':{}};var _0x5971c9={};var _0x531066={'count':0x0,'rows':[]};return db[_0x20dc('0x27')][_0x20dc('0x51')]({'where':{'id':_0x1d4592[_0x20dc('0x50')]['id']}})['then'](handleEntityNotFound(_0x2d47af,null))[_0x20dc('0x1e')](function(_0x5a7b6c){if(_0x5a7b6c){_0x5971c9[_0x20dc('0x29')]=_[_0x20dc('0x2a')](db[_0x20dc('0x7a')][_0x20dc('0x28')]);_0x5971c9[_0x20dc('0x2b')]=_[_0x20dc('0x2a')](_0x1d4592['query']);_0x5971c9[_0x20dc('0x2c')]=_[_0x20dc('0x41')](_0x5971c9[_0x20dc('0x29')],_0x5971c9[_0x20dc('0x2b')]);_0x424f8f[_0x20dc('0x2e')]=_[_0x20dc('0x41')](_0x5971c9['model'],qs[_0x20dc('0x2d')](_0x1d4592[_0x20dc('0x2b')][_0x20dc('0x2d')]));_0x424f8f['attributes']=_0x424f8f[_0x20dc('0x2e')][_0x20dc('0x2f')]?_0x424f8f[_0x20dc('0x2e')]:_0x5971c9[_0x20dc('0x29')];if(!_0x1d4592[_0x20dc('0x2b')][_0x20dc('0x30')](_0x20dc('0x31'))){_0x424f8f['limit']=qs['limit'](_0x1d4592['query'][_0x20dc('0x19')]);_0x424f8f[_0x20dc('0x18')]=qs['offset'](_0x1d4592[_0x20dc('0x2b')][_0x20dc('0x18')]);}_0x424f8f[_0x20dc('0x32')]=qs[_0x20dc('0x33')](_0x1d4592['query'][_0x20dc('0x33')]);_0x424f8f[_0x20dc('0x34')]=qs[_0x20dc('0x2c')](_[_0x20dc('0x35')](_0x1d4592['query'],_0x5971c9[_0x20dc('0x2c')]));_0x424f8f[_0x20dc('0x34')][_0x20dc('0x53')]=_0x5a7b6c['id'];if(_0x1d4592[_0x20dc('0x2b')][_0x20dc('0x39')]){_0x424f8f[_0x20dc('0x34')]=_[_0x20dc('0x3a')](_0x424f8f['where'],{'$or':_[_0x20dc('0x36')](_0x424f8f[_0x20dc('0x2e')],function(_0x4a1812){var _0x1c25f1={};_0x1c25f1[_0x4a1812]={'$like':'%'+_0x1d4592['query'][_0x20dc('0x39')]+'%'};return _0x1c25f1;})});}_0x424f8f=_[_0x20dc('0x3a')]({},_0x424f8f,_0x1d4592[_0x20dc('0x3b')]);return db['CmList'][_0x20dc('0x17')]({'where':_0x424f8f[_0x20dc('0x34')]})['then'](function(_0x5d6738){_0x531066['count']=_0x5d6738;if(_0x1d4592['query'][_0x20dc('0x3c')]){_0x424f8f[_0x20dc('0x3d')]=[{'all':!![]}];}return db[_0x20dc('0x7a')][_0x20dc('0x3e')](_0x424f8f);})[_0x20dc('0x1e')](function(_0x4d5d61){_0x531066[_0x20dc('0x54')]=_0x4d5d61;return _0x531066;});}})['then'](respondWithFilteredResult(_0x2d47af,_0x424f8f))[_0x20dc('0x3f')](handleError(_0x2d47af,null));};exports['addBlackLists']=function(_0x3aa850,_0x40277f,_0x4d7e1c){var _0x311aef,_0x2e3365;return db[_0x20dc('0x27')][_0x20dc('0x42')]({'where':{'id':_0x3aa850[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x40277f,null))[_0x20dc('0x1e')](function(_0x183a44){if(_0x183a44){_0x2e3365=_0x183a44;return _0x183a44[_0x20dc('0x7b')](_0x3aa850['body'][_0x20dc('0x5c')],_['omit'](_0x3aa850[_0x20dc('0x4b')],[_0x20dc('0x5c'),'id'])||{});}return null;})[_0x20dc('0x5e')](function(_0x5ce266){var _0x406a52;_0x311aef=_0x5ce266||[];var _0x574122=[];if(_0x5ce266){for(var _0x51ad2e=0x0;_0x51ad2e<_0x5ce266[_0x20dc('0x2f')];_0x51ad2e+=0x1){var _0x2469ed=_0x5ce266[_0x51ad2e][_0x20dc('0x45')]({'plain':!![]});_0x406a52=squel[_0x20dc('0x73')]()[_0x20dc('0x61')](_0x20dc('0x7c'))[_0x20dc('0x63')](['phone',_0x20dc('0x74'),_0x20dc('0x75'),_0x20dc('0x53'),'createdAt','updatedAt'],squel[_0x20dc('0x65')]()[_0x20dc('0x68')](_0x20dc('0x64'),'phone')[_0x20dc('0x68')]('id',_0x20dc('0x74'))[_0x20dc('0x68')](_0x2469ed[_0x20dc('0x69')]['toString'](),'ListId')[_0x20dc('0x68')](_0x3aa850['params']['id']['toString'](),_0x20dc('0x53'))[_0x20dc('0x68')](_0x20dc('0x66'),_0x20dc('0x4c'))[_0x20dc('0x68')](_0x20dc('0x66'),'updatedAt')[_0x20dc('0x6b')](_0x20dc('0x6c'))[_0x20dc('0x34')](_0x20dc('0x6d'))[_0x20dc('0x34')](_0x20dc('0x6e'),_0x2469ed[_0x20dc('0x69')]['toString']())[_0x20dc('0x34')](_0x20dc('0x6f')))['toString']();_0x574122['push'](db['sequelize'][_0x20dc('0x2b')](_0x406a52));}return BPromise[_0x20dc('0x77')](_0x574122);}})['then'](function(){return _0x311aef;})[_0x20dc('0x1e')](respondWithResult(_0x40277f,null))['catch'](handleError(_0x40277f,null));};exports[_0x20dc('0x7d')]=function(_0x552875,_0x2637e7,_0x25cdb0){return db[_0x20dc('0x27')][_0x20dc('0x42')]({'where':{'id':_0x552875[_0x20dc('0x50')]['id']}})[_0x20dc('0x1e')](handleEntityNotFound(_0x2637e7,null))[_0x20dc('0x1e')](function(_0x21b63d){if(_0x21b63d){return _0x21b63d[_0x20dc('0x7d')](_0x552875[_0x20dc('0x2b')][_0x20dc('0x5c')]);}})[_0x20dc('0x1e')](function(_0x290572){if(_0x290572){return db[_0x20dc('0x59')][_0x20dc('0x21')]({'where':{'ListId':_0x552875['query'][_0x20dc('0x5c')],'CampaignId':_0x552875['params']['id']}})[_0x20dc('0x1e')](function(){return _0x290572;});}})['then'](respondWithStatusCode(_0x2637e7,null))[_0x20dc('0x3f')](handleError(_0x2637e7,null));};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js
index 1bd480f..bd1454f 100644
--- a/server/api/campaign/campaign.model.js
+++ b/server/api/campaign/campaign.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf144=['util','../../config/logger','api','moment','bluebird','path','../../config/environment','./campaign.attributes','define','Campaign','campaigns','lodash'];(function(_0x545c6b,_0x25054b){var _0x2297c1=function(_0x2a99a8){while(--_0x2a99a8){_0x545c6b['push'](_0x545c6b['shift']());}};_0x2297c1(++_0x25054b);}(_0xf144,0x15b));var _0x4f14=function(_0x417291,_0x1d64e6){_0x417291=_0x417291-0x0;var _0x5202b3=_0xf144[_0x417291];return _0x5202b3;};'use strict';var _=require(_0x4f14('0x0'));var util=require(_0x4f14('0x1'));var logger=require(_0x4f14('0x2'))(_0x4f14('0x3'));var moment=require(_0x4f14('0x4'));var BPromise=require(_0x4f14('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4f14('0x6'));var rimraf=require('rimraf');var config=require(_0x4f14('0x7'));var attributes=require(_0x4f14('0x8'));module['exports']=function(_0x3198dd,_0x365a1c){return _0x3198dd[_0x4f14('0x9')](_0x4f14('0xa'),attributes,{'tableName':_0x4f14('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5345=['rimraf','../../config/environment','exports','define','Campaign','campaigns','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x246c10,_0x154395){var _0x5dab91=function(_0x57ef0d){while(--_0x57ef0d){_0x246c10['push'](_0x246c10['shift']());}};_0x5dab91(++_0x154395);}(_0x5345,0x18c));var _0x5534=function(_0x187e57,_0x42d25c){_0x187e57=_0x187e57-0x0;var _0x23c01d=_0x5345[_0x187e57];return _0x23c01d;};'use strict';var _=require(_0x5534('0x0'));var util=require(_0x5534('0x1'));var logger=require(_0x5534('0x2'))(_0x5534('0x3'));var moment=require(_0x5534('0x4'));var BPromise=require('bluebird');var rp=require(_0x5534('0x5'));var fs=require('fs');var path=require(_0x5534('0x6'));var rimraf=require(_0x5534('0x7'));var config=require(_0x5534('0x8'));var attributes=require('./campaign.attributes');module[_0x5534('0x9')]=function(_0x585b17,_0x28a59a){return _0x585b17[_0x5534('0xa')](_0x5534('0xb'),attributes,{'tableName':_0x5534('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.rpc.js b/server/api/campaign/campaign.rpc.js
index 6d8551c..3f9f6c8 100644
--- a/server/api/campaign/campaign.rpc.js
+++ b/server/api/campaign/campaign.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x52bf=['Campaign','findAll','options','raw','attributes','limit','map','include','model','lodash','util','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Campaign,\x20%s,\x20%s','Campaign,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetCampaign'];(function(_0xbd5ad6,_0x9a42eb){var _0x6cc26c=function(_0x55b064){while(--_0x55b064){_0xbd5ad6['push'](_0xbd5ad6['shift']());}};_0x6cc26c(++_0x9a42eb);}(_0x52bf,0x101));var _0xf52b=function(_0x4f9a2d,_0x460891){_0x4f9a2d=_0x4f9a2d-0x0;var _0x2a6d8c=_0x52bf[_0x4f9a2d];return _0x2a6d8c;};'use strict';var _=require(_0xf52b('0x0'));var util=require(_0xf52b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf52b('0x2'))['db'];var utils=require(_0xf52b('0x3'));var logger=require('../../config/logger')(_0xf52b('0x4'));var config=require(_0xf52b('0x5'));var jayson=require(_0xf52b('0x6'));var client=jayson[_0xf52b('0x7')][_0xf52b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4ada06,_0x5654fb,_0x1e3717){return new BPromise(function(_0x579d18,_0x1b5ec5){return client[_0xf52b('0x9')](_0x4ada06,_0x1e3717)[_0xf52b('0xa')](function(_0x18d5af){logger[_0xf52b('0xb')](_0xf52b('0xc'),_0x5654fb,'request\x20sent');logger['debug'](_0xf52b('0xd'),_0x5654fb,_0xf52b('0xe'),JSON[_0xf52b('0xf')](_0x18d5af));if(_0x18d5af[_0xf52b('0x10')]){if(_0x18d5af[_0xf52b('0x10')][_0xf52b('0x11')]===0x1f4){logger[_0xf52b('0x10')](_0xf52b('0xc'),_0x5654fb,_0x18d5af['error'][_0xf52b('0x12')]);return _0x1b5ec5(_0x18d5af[_0xf52b('0x10')][_0xf52b('0x12')]);}logger[_0xf52b('0x10')]('Campaign,\x20%s,\x20%s',_0x5654fb,_0x18d5af[_0xf52b('0x10')][_0xf52b('0x12')]);return _0x579d18(_0x18d5af[_0xf52b('0x10')][_0xf52b('0x12')]);}else{logger[_0xf52b('0xb')](_0xf52b('0xc'),_0x5654fb,'request\x20sent');_0x579d18(_0x18d5af[_0xf52b('0x13')][_0xf52b('0x12')]);}})[_0xf52b('0x14')](function(_0x46cbd6){logger[_0xf52b('0x10')](_0xf52b('0xc'),_0x5654fb,_0x46cbd6);_0x1b5ec5(_0x46cbd6);});});}exports[_0xf52b('0x15')]=function(_0x5c9f9e){var _0x851d9=this;return new Promise(function(_0x566a1b,_0x53371b){return db[_0xf52b('0x16')][_0xf52b('0x17')]({'raw':_0x5c9f9e[_0xf52b('0x18')]?_0x5c9f9e[_0xf52b('0x18')][_0xf52b('0x19')]===undefined?!![]:![]:!![],'where':_0x5c9f9e[_0xf52b('0x18')]?_0x5c9f9e[_0xf52b('0x18')]['where']||null:null,'attributes':_0x5c9f9e[_0xf52b('0x18')]?_0x5c9f9e[_0xf52b('0x18')][_0xf52b('0x1a')]||null:null,'limit':_0x5c9f9e[_0xf52b('0x18')]?_0x5c9f9e[_0xf52b('0x18')][_0xf52b('0x1b')]||null:null,'include':_0x5c9f9e[_0xf52b('0x18')]?_0x5c9f9e[_0xf52b('0x18')]['include']?_[_0xf52b('0x1c')](_0x5c9f9e[_0xf52b('0x18')][_0xf52b('0x1d')],function(_0x57d541){return{'model':db[_0x57d541[_0xf52b('0x1e')]],'as':_0x57d541['as'],'attributes':_0x57d541[_0xf52b('0x1a')],'include':_0x57d541['include']?_[_0xf52b('0x1c')](_0x57d541[_0xf52b('0x1d')],function(_0x3467b1){return{'model':db[_0x3467b1['model']],'as':_0x3467b1['as'],'attributes':_0x3467b1['attributes'],'include':_0x3467b1[_0xf52b('0x1d')]?_[_0xf52b('0x1c')](_0x3467b1[_0xf52b('0x1d')],function(_0x4f1041){return{'model':db[_0x4f1041[_0xf52b('0x1e')]],'as':_0x4f1041['as'],'attributes':_0x4f1041[_0xf52b('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xf52b('0xa')](function(_0x3f7030){logger[_0xf52b('0xb')](_0xf52b('0x15'),_0x5c9f9e);logger['debug']('GetCampaign',_0x5c9f9e,JSON[_0xf52b('0xf')](_0x3f7030));_0x566a1b(_0x3f7030);})[_0xf52b('0x14')](function(_0x1b0b37){logger[_0xf52b('0x10')](_0xf52b('0x15'),_0x1b0b37[_0xf52b('0x12')],_0x5c9f9e);_0x53371b(_0x851d9[_0xf52b('0x10')](0x1f4,_0x1b0b37[_0xf52b('0x12')]));});});};
\ No newline at end of file
+var _0x9131=['map','then','debug','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','Campaign,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','GetCampaign','findAll','options','raw','where','attributes','limit','include','model'];(function(_0x50488c,_0x1615e2){var _0x3359e7=function(_0x2f355a){while(--_0x2f355a){_0x50488c['push'](_0x50488c['shift']());}};_0x3359e7(++_0x1615e2);}(_0x9131,0x183));var _0x1913=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9131[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x1913('0x0'));var util=require(_0x1913('0x1'));var moment=require('moment');var BPromise=require(_0x1913('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1913('0x3'))['db'];var utils=require(_0x1913('0x4'));var logger=require(_0x1913('0x5'))(_0x1913('0x6'));var config=require(_0x1913('0x7'));var jayson=require(_0x1913('0x8'));var client=jayson['client'][_0x1913('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3f0c22,_0xcc2dce,_0x7f934f){return new BPromise(function(_0xcec204,_0x161ae6){return client[_0x1913('0xa')](_0x3f0c22,_0x7f934f)['then'](function(_0x1c9bc6){logger['info'](_0x1913('0xb'),_0xcc2dce,_0x1913('0xc'));logger['debug']('Campaign,\x20%s,\x20%s,\x20%s',_0xcc2dce,'request\x20sent',JSON[_0x1913('0xd')](_0x1c9bc6));if(_0x1c9bc6[_0x1913('0xe')]){if(_0x1c9bc6[_0x1913('0xe')][_0x1913('0xf')]===0x1f4){logger[_0x1913('0xe')](_0x1913('0xb'),_0xcc2dce,_0x1c9bc6['error'][_0x1913('0x10')]);return _0x161ae6(_0x1c9bc6[_0x1913('0xe')]['message']);}logger[_0x1913('0xe')](_0x1913('0xb'),_0xcc2dce,_0x1c9bc6[_0x1913('0xe')][_0x1913('0x10')]);return _0xcec204(_0x1c9bc6[_0x1913('0xe')][_0x1913('0x10')]);}else{logger[_0x1913('0x11')](_0x1913('0xb'),_0xcc2dce,'request\x20sent');_0xcec204(_0x1c9bc6[_0x1913('0x12')][_0x1913('0x10')]);}})[_0x1913('0x13')](function(_0x45d997){logger['error']('Campaign,\x20%s,\x20%s',_0xcc2dce,_0x45d997);_0x161ae6(_0x45d997);});});}exports[_0x1913('0x14')]=function(_0x59f584){var _0x179a4b=this;return new Promise(function(_0x5744e6,_0x709c38){return db['Campaign'][_0x1913('0x15')]({'raw':_0x59f584[_0x1913('0x16')]?_0x59f584['options'][_0x1913('0x17')]===undefined?!![]:![]:!![],'where':_0x59f584[_0x1913('0x16')]?_0x59f584[_0x1913('0x16')][_0x1913('0x18')]||null:null,'attributes':_0x59f584[_0x1913('0x16')]?_0x59f584[_0x1913('0x16')][_0x1913('0x19')]||null:null,'limit':_0x59f584[_0x1913('0x16')]?_0x59f584[_0x1913('0x16')][_0x1913('0x1a')]||null:null,'include':_0x59f584[_0x1913('0x16')]?_0x59f584['options'][_0x1913('0x1b')]?_['map'](_0x59f584[_0x1913('0x16')]['include'],function(_0xbf7541){return{'model':db[_0xbf7541[_0x1913('0x1c')]],'as':_0xbf7541['as'],'attributes':_0xbf7541[_0x1913('0x19')],'include':_0xbf7541[_0x1913('0x1b')]?_[_0x1913('0x1d')](_0xbf7541[_0x1913('0x1b')],function(_0x263ae0){return{'model':db[_0x263ae0[_0x1913('0x1c')]],'as':_0x263ae0['as'],'attributes':_0x263ae0[_0x1913('0x19')],'include':_0x263ae0[_0x1913('0x1b')]?_['map'](_0x263ae0[_0x1913('0x1b')],function(_0x44f6a3){return{'model':db[_0x44f6a3['model']],'as':_0x44f6a3['as'],'attributes':_0x44f6a3[_0x1913('0x19')]};}):[]};}):[]};}):[]:[]})[_0x1913('0x1e')](function(_0x4190d8){logger[_0x1913('0x11')]('GetCampaign',_0x59f584);logger[_0x1913('0x1f')]('GetCampaign',_0x59f584,JSON['stringify'](_0x4190d8));_0x5744e6(_0x4190d8);})['catch'](function(_0x228787){logger[_0x1913('0xe')](_0x1913('0x14'),_0x228787['message'],_0x59f584);_0x709c38(_0x179a4b[_0x1913('0xe')](0x1f4,_0x228787[_0x1913('0x10')]));});});};
\ No newline at end of file
diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js
index 1aeb212..5b7fdb8 100644
--- a/server/api/campaign/index.js
+++ b/server/api/campaign/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xadde=['/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/lists','/:id/blacklists','getBlackLists','post','create','clone','addLists','addBlackLists','put','update','delete','destroy','removeLists','removeBlackLists','exports','multer','util','path','connect-timeout','Router','../../components/interaction/service','./campaign.controller','get','/:id','isAuthenticated','show','/:id/hoppers','getHoppers'];(function(_0x2911d4,_0x573340){var _0x5daf83=function(_0x2339c2){while(--_0x2339c2){_0x2911d4['push'](_0x2911d4['shift']());}};_0x5daf83(++_0x573340);}(_0xadde,0x1ad));var _0xeadd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xadde[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xeadd('0x0'));var util=require(_0xeadd('0x1'));var path=require(_0xeadd('0x2'));var timeout=require(_0xeadd('0x3'));var express=require('express');var router=express[_0xeadd('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xeadd('0x5'));var config=require('../../config/environment');var controller=require(_0xeadd('0x6'));router[_0xeadd('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xeadd('0x7')](_0xeadd('0x8'),auth[_0xeadd('0x9')](),controller[_0xeadd('0xa')]);router[_0xeadd('0x7')](_0xeadd('0xb'),auth[_0xeadd('0x9')](),controller[_0xeadd('0xc')]);router[_0xeadd('0x7')](_0xeadd('0xd'),auth[_0xeadd('0x9')](),controller[_0xeadd('0xe')]);router[_0xeadd('0x7')](_0xeadd('0xf'),auth[_0xeadd('0x9')](),controller[_0xeadd('0x10')]);router['get'](_0xeadd('0x11'),auth[_0xeadd('0x9')](),controller[_0xeadd('0x12')]);router[_0xeadd('0x7')](_0xeadd('0x13'),auth[_0xeadd('0x9')](),controller['getLists']);router[_0xeadd('0x7')](_0xeadd('0x14'),auth[_0xeadd('0x9')](),controller[_0xeadd('0x15')]);router[_0xeadd('0x16')]('/',auth['isAuthenticated'](),controller[_0xeadd('0x17')]);router[_0xeadd('0x16')]('/:id/clone',auth[_0xeadd('0x9')](),controller[_0xeadd('0x18')]);router[_0xeadd('0x16')]('/:id/lists',auth[_0xeadd('0x9')](),controller[_0xeadd('0x19')]);router[_0xeadd('0x16')](_0xeadd('0x14'),auth[_0xeadd('0x9')](),controller[_0xeadd('0x1a')]);router[_0xeadd('0x1b')](_0xeadd('0x8'),auth[_0xeadd('0x9')](),controller[_0xeadd('0x1c')]);router[_0xeadd('0x1d')]('/:id',auth[_0xeadd('0x9')](),controller[_0xeadd('0x1e')]);router[_0xeadd('0x1d')]('/:id/lists',auth[_0xeadd('0x9')](),controller[_0xeadd('0x1f')]);router[_0xeadd('0x1d')](_0xeadd('0x14'),auth['isAuthenticated'](),controller[_0xeadd('0x20')]);module[_0xeadd('0x21')]=router;
\ No newline at end of file
+var _0x80eb=['put','update','delete','removeBlackLists','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','create','/:id/clone','addLists'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x80eb,0x112));var _0xb80e=function(_0x169272,_0x11e58f){_0x169272=_0x169272-0x0;var _0x45d02b=_0x80eb[_0x169272];return _0x45d02b;};'use strict';var multer=require(_0xb80e('0x0'));var util=require(_0xb80e('0x1'));var path=require(_0xb80e('0x2'));var timeout=require(_0xb80e('0x3'));var express=require(_0xb80e('0x4'));var router=express['Router']();var auth=require(_0xb80e('0x5'));var interaction=require(_0xb80e('0x6'));var config=require('../../config/environment');var controller=require('./campaign.controller');router[_0xb80e('0x7')]('/',auth[_0xb80e('0x8')](),controller[_0xb80e('0x9')]);router[_0xb80e('0x7')](_0xb80e('0xa'),auth[_0xb80e('0x8')](),controller['show']);router['get'](_0xb80e('0xb'),auth[_0xb80e('0x8')](),controller[_0xb80e('0xc')]);router['get'](_0xb80e('0xd'),auth['isAuthenticated'](),controller['getHopperHistories']);router[_0xb80e('0x7')](_0xb80e('0xe'),auth['isAuthenticated'](),controller[_0xb80e('0xf')]);router[_0xb80e('0x7')](_0xb80e('0x10'),auth[_0xb80e('0x8')](),controller[_0xb80e('0x11')]);router['get'](_0xb80e('0x12'),auth[_0xb80e('0x8')](),controller[_0xb80e('0x13')]);router[_0xb80e('0x7')](_0xb80e('0x14'),auth[_0xb80e('0x8')](),controller[_0xb80e('0x15')]);router[_0xb80e('0x16')]('/',auth[_0xb80e('0x8')](),controller[_0xb80e('0x17')]);router[_0xb80e('0x16')](_0xb80e('0x18'),auth[_0xb80e('0x8')](),controller['clone']);router[_0xb80e('0x16')](_0xb80e('0x12'),auth[_0xb80e('0x8')](),controller[_0xb80e('0x19')]);router['post'](_0xb80e('0x14'),auth[_0xb80e('0x8')](),controller['addBlackLists']);router[_0xb80e('0x1a')](_0xb80e('0xa'),auth[_0xb80e('0x8')](),controller[_0xb80e('0x1b')]);router[_0xb80e('0x1c')](_0xb80e('0xa'),auth[_0xb80e('0x8')](),controller['destroy']);router['delete']('/:id/lists',auth['isAuthenticated'](),controller['removeLists']);router[_0xb80e('0x1c')](_0xb80e('0x14'),auth[_0xb80e('0x8')](),controller[_0xb80e('0x1d')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js
index 13fb7b1..9b8834c 100644
--- a/server/api/cannedAnswer/cannedAnswer.attributes.js
+++ b/server/api/cannedAnswer/cannedAnswer.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xefe4=['STRING','TEXT','VIRTUAL','getDataValue','key','exports'];(function(_0x261bd8,_0x4bd3ad){var _0x3e7c30=function(_0x2fc6af){while(--_0x2fc6af){_0x261bd8['push'](_0x261bd8['shift']());}};_0x3e7c30(++_0x4bd3ad);}(_0xefe4,0x179));var _0x4efe=function(_0x2f267e,_0x20a0d3){_0x2f267e=_0x2f267e-0x0;var _0x795df2=_0xefe4[_0x2f267e];return _0x795df2;};'use strict';var Sequelize=require('sequelize');module[_0x4efe('0x0')]={'key':{'type':Sequelize[_0x4efe('0x1')],'allowNull':![]},'value':{'type':Sequelize[_0x4efe('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x4efe('0x1')]},'name':{'type':Sequelize[_0x4efe('0x3')],'get':function(){return this[_0x4efe('0x4')](_0x4efe('0x5'));}}};
\ No newline at end of file
+var _0x6831=['getDataValue','key','sequelize','exports','TEXT','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6831,0xaa));var _0x1683=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x6831[_0x19950b];return _0x3c6b41;};'use strict';var Sequelize=require(_0x1683('0x0'));module[_0x1683('0x1')]={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x1683('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x1683('0x3')]},'name':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x1683('0x4')](_0x1683('0x5'));}}};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js
index 51a5098..9ed63ca 100644
--- a/server/api/cannedAnswer/cannedAnswer.controller.js
+++ b/server/api/cannedAnswer/cannedAnswer.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xce2b=['path','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','reject','save','update','destroy','then','get','CannedAnswers','UserProfileResource','error','name','send','index','CannedAnswer','rawAttributes','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','query','order','sort','where','pick','filter','merge','type','key','includeAll','include','findAll','show','params','options','find','body','catch','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','The\x20inserted\x20key\x20already\x20exists.','create','user','role','UserProfileSection','userProfileId','autoAssociation','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xce2b,0x9f));var _0xbce2=function(_0x433b81,_0x58f15b){_0x433b81=_0x433b81-0x0;var _0x295221=_0xce2b[_0x433b81];return _0x295221;};'use strict';var pdf=require(_0xbce2('0x0'));var emlformat=require(_0xbce2('0x1'));var rimraf=require(_0xbce2('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbce2('0x3'));var rp=require(_0xbce2('0x4'));var moment=require(_0xbce2('0x5'));var BPromise=require(_0xbce2('0x6'));var Mustache=require(_0xbce2('0x7'));var util=require(_0xbce2('0x8'));var path=require(_0xbce2('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xbce2('0xa'));var fs=require('fs');var _=require(_0xbce2('0xb'));var squel=require(_0xbce2('0xc'));var crypto=require('crypto');var jsforce=require(_0xbce2('0xd'));var deskjs=require(_0xbce2('0xe'));var toCsv=require(_0xbce2('0xf'));var querystring=require(_0xbce2('0x10'));var Papa=require(_0xbce2('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xbce2('0x12'));var hardwareService=require(_0xbce2('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0xbce2('0x14'));var config=require(_0xbce2('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x9b5ca8,_0x3bac83){_0x3bac83=_0x3bac83||0xcc;return function(_0x5e2f39){if(_0x5e2f39){return _0x9b5ca8[_0xbce2('0x16')](_0x3bac83);}return _0x9b5ca8[_0xbce2('0x17')](_0x3bac83)[_0xbce2('0x18')]();};}function respondWithResult(_0x58b025,_0x4bc7a0){_0x4bc7a0=_0x4bc7a0||0xc8;return function(_0x19a0fd){if(_0x19a0fd){return _0x58b025[_0xbce2('0x17')](_0x4bc7a0)[_0xbce2('0x19')](_0x19a0fd);}};}function respondWithFilteredResult(_0x18b706,_0x15db1b){return function(_0x524c22){if(_0x524c22){var _0x174e5d=_0x524c22[_0xbce2('0x1a')],_0x239091=_0x15db1b[_0xbce2('0x1b')],_0x2afebe=_0x15db1b[_0xbce2('0x1b')]+_0x15db1b[_0xbce2('0x1c')],_0x33e1ba;if(_0x2afebe>=_0x174e5d){_0x2afebe=_0x174e5d;_0x33e1ba=0xc8;}else{_0x33e1ba=0xce;}_0x18b706[_0xbce2('0x17')](_0x33e1ba);return _0x18b706['set'](_0xbce2('0x1d'),_0x239091+'-'+_0x2afebe+'/'+_0x174e5d)[_0xbce2('0x19')](_0x524c22);}return null;};}function patchUpdates(_0x87b83a){return function(_0x3ab73e){try{jsonpatch[_0xbce2('0x1e')](_0x3ab73e,_0x87b83a,!![]);}catch(_0xa06cba){return BPromise[_0xbce2('0x1f')](_0xa06cba);}return _0x3ab73e[_0xbce2('0x20')]();};}function saveUpdates(_0x133a4c,_0x575c9e){return function(_0x26c592){if(_0x26c592){return _0x26c592[_0xbce2('0x21')](_0x133a4c)['then'](function(_0x5cf8c0){return _0x5cf8c0;});}return null;};}function removeEntity(_0x595945,_0x3a1b02){return function(_0x52afb9){if(_0x52afb9){return _0x52afb9[_0xbce2('0x22')]()[_0xbce2('0x23')](function(){var _0x57ce33=_0x52afb9[_0xbce2('0x24')]({'plain':!![]});var _0x191c73=_0xbce2('0x25');return db[_0xbce2('0x26')][_0xbce2('0x22')]({'where':{'type':_0x191c73,'resourceId':_0x57ce33['id']}})[_0xbce2('0x23')](function(){return _0x52afb9;});})[_0xbce2('0x23')](function(){_0x595945['status'](0xcc)[_0xbce2('0x18')]();});}};}function handleEntityNotFound(_0x51cdde,_0x4b9d95){return function(_0x2af0c0){if(!_0x2af0c0){_0x51cdde[_0xbce2('0x16')](0x194);}return _0x2af0c0;};}function handleError(_0xf80b06,_0x4d2f92){_0x4d2f92=_0x4d2f92||0x1f4;return function(_0x3058a2){logger[_0xbce2('0x27')](_0x3058a2['stack']);if(_0x3058a2[_0xbce2('0x28')]){delete _0x3058a2[_0xbce2('0x28')];}_0xf80b06['status'](_0x4d2f92)[_0xbce2('0x29')](_0x3058a2);};}exports[_0xbce2('0x2a')]=function(_0x414b6f,_0x5362a2){var _0x14011a={},_0x4879b7={},_0xb98b3f={'count':0x0,'rows':[]};var _0x52c155=db[_0xbce2('0x2b')][_0xbce2('0x2c')];_0x4879b7['model']=_['keys'](_0x52c155);_0x4879b7['query']=_[_0xbce2('0x2d')](_0x414b6f['query']);_0x4879b7[_0xbce2('0x2e')]=_[_0xbce2('0x2f')](_0x4879b7[_0xbce2('0x30')],_0x4879b7['query']);_0x14011a[_0xbce2('0x31')]=_[_0xbce2('0x2f')](_0x4879b7[_0xbce2('0x30')],qs[_0xbce2('0x32')](_0x414b6f['query'][_0xbce2('0x32')]));_0x14011a['attributes']=_0x14011a[_0xbce2('0x31')][_0xbce2('0x33')]?_0x14011a[_0xbce2('0x31')]:_0x4879b7['model'];if(!_0x414b6f['query'][_0xbce2('0x34')](_0xbce2('0x35'))){_0x14011a[_0xbce2('0x1c')]=qs[_0xbce2('0x1c')](_0x414b6f[_0xbce2('0x36')]['limit']);_0x14011a[_0xbce2('0x1b')]=qs['offset'](_0x414b6f[_0xbce2('0x36')][_0xbce2('0x1b')]);}_0x14011a[_0xbce2('0x37')]=qs['sort'](_0x414b6f['query'][_0xbce2('0x38')]);_0x14011a[_0xbce2('0x39')]=qs[_0xbce2('0x2e')](_[_0xbce2('0x3a')](_0x414b6f[_0xbce2('0x36')],_0x4879b7[_0xbce2('0x2e')]));if(_0x414b6f[_0xbce2('0x36')][_0xbce2('0x3b')]){_0x14011a['where']=_[_0xbce2('0x3c')](_0x14011a[_0xbce2('0x39')],{'$or':_['map'](_0x52c155,function(_0x2e8a20){if(_0x2e8a20[_0xbce2('0x3d')][_0xbce2('0x3e')]!=='VIRTUAL'){var _0x35e1eb={};_0x35e1eb[_0x2e8a20['field']]={'$like':'%'+_0x414b6f[_0xbce2('0x36')]['filter']+'%'};return _0x35e1eb;}})});}_0x14011a=_[_0xbce2('0x3c')]({},_0x14011a,_0x414b6f['options']);var _0x430cf8={'where':_0x14011a['where']};return db['CannedAnswer']['count'](_0x430cf8)[_0xbce2('0x23')](function(_0x516057){_0xb98b3f[_0xbce2('0x1a')]=_0x516057;if(_0x414b6f[_0xbce2('0x36')][_0xbce2('0x3f')]){_0x14011a[_0xbce2('0x40')]=[{'all':!![]}];}return db[_0xbce2('0x2b')][_0xbce2('0x41')](_0x14011a);})['then'](function(_0x116ccd){_0xb98b3f['rows']=_0x116ccd;return _0xb98b3f;})[_0xbce2('0x23')](respondWithFilteredResult(_0x5362a2,_0x14011a))['catch'](handleError(_0x5362a2,null));};exports[_0xbce2('0x42')]=function(_0x196f2a,_0x4c7d15){var _0x51a7d7={'raw':!![],'where':{'id':_0x196f2a[_0xbce2('0x43')]['id']}},_0x140e1b={};_0x140e1b[_0xbce2('0x30')]=_[_0xbce2('0x2d')](db[_0xbce2('0x2b')][_0xbce2('0x2c')]);_0x140e1b[_0xbce2('0x36')]=_[_0xbce2('0x2d')](_0x196f2a[_0xbce2('0x36')]);_0x140e1b[_0xbce2('0x2e')]=_[_0xbce2('0x2f')](_0x140e1b[_0xbce2('0x30')],_0x140e1b['query']);_0x51a7d7[_0xbce2('0x31')]=_['intersection'](_0x140e1b[_0xbce2('0x30')],qs['fields'](_0x196f2a[_0xbce2('0x36')][_0xbce2('0x32')]));_0x51a7d7[_0xbce2('0x31')]=_0x51a7d7[_0xbce2('0x31')][_0xbce2('0x33')]?_0x51a7d7['attributes']:_0x140e1b[_0xbce2('0x30')];if(_0x196f2a[_0xbce2('0x36')][_0xbce2('0x3f')]){_0x51a7d7[_0xbce2('0x40')]=[{'all':!![]}];}_0x51a7d7=_[_0xbce2('0x3c')]({},_0x51a7d7,_0x196f2a[_0xbce2('0x44')]);return db[_0xbce2('0x2b')][_0xbce2('0x45')](_0x51a7d7)[_0xbce2('0x23')](handleEntityNotFound(_0x4c7d15,null))[_0xbce2('0x23')](respondWithResult(_0x4c7d15,null))['catch'](handleError(_0x4c7d15,null));};exports[_0xbce2('0x21')]=function(_0x116583,_0x5e8e4a){if(_0x116583[_0xbce2('0x46')]['id']){delete _0x116583[_0xbce2('0x46')]['id'];}return db[_0xbce2('0x2b')]['find']({'where':{'id':_0x116583[_0xbce2('0x43')]['id']}})[_0xbce2('0x23')](handleEntityNotFound(_0x5e8e4a,null))[_0xbce2('0x23')](saveUpdates(_0x116583[_0xbce2('0x46')],null))['then'](respondWithResult(_0x5e8e4a,null))[_0xbce2('0x47')](handleError(_0x5e8e4a,null));};exports[_0xbce2('0x22')]=function(_0xb9a15c,_0x5d154e){return db['CannedAnswer'][_0xbce2('0x45')]({'where':{'id':_0xb9a15c[_0xbce2('0x43')]['id']}})[_0xbce2('0x23')](handleEntityNotFound(_0x5d154e,null))[_0xbce2('0x23')](removeEntity(_0x5d154e,null))['catch'](handleError(_0x5d154e,null));};exports['create']=function(_0x151341,_0x4dde4e){var _0x460c0b={'key':_0x151341['body']['key']};if(_0x151341['body'][_0xbce2('0x48')]){_0x460c0b[_0xbce2('0x48')]=_0x151341[_0xbce2('0x46')][_0xbce2('0x48')];}else if(_0x151341[_0xbce2('0x46')]['SmsAccountId']){_0x460c0b[_0xbce2('0x49')]=_0x151341['body']['SmsAccountId'];}else if(_0x151341[_0xbce2('0x46')][_0xbce2('0x4a')]){_0x460c0b[_0xbce2('0x4a')]=_0x151341[_0xbce2('0x46')][_0xbce2('0x4a')];}else if(_0x151341[_0xbce2('0x46')][_0xbce2('0x4b')]){_0x460c0b['ChatWebsiteId']=_0x151341['body'][_0xbce2('0x4b')];}return db[_0xbce2('0x2b')][_0xbce2('0x45')]({'where':_0x460c0b})['then'](function(_0x37929c){if(_0x37929c){throw new db[(_0xbce2('0x4c'))]['ValidationError'](_0xbce2('0x4d'));}return db[_0xbce2('0x2b')][_0xbce2('0x4e')](_0x151341[_0xbce2('0x46')]);})[_0xbce2('0x23')](function(_0x2db2fe){var _0x33c889=_0x151341[_0xbce2('0x4f')]['get']({'plain':!![]});if(!_0x33c889)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x33c889[_0xbce2('0x50')]===_0xbce2('0x4f')){var _0x564bd2=_0x2db2fe['get']({'plain':!![]});return db[_0xbce2('0x51')][_0xbce2('0x45')]({'where':{'name':_0xbce2('0x25'),'userProfileId':_0x33c889[_0xbce2('0x52')]},'raw':!![]})[_0xbce2('0x23')](function(_0x43b64c){if(_0x43b64c&&_0x43b64c[_0xbce2('0x53')]===0x0){return db[_0xbce2('0x26')]['create']({'name':_0x564bd2[_0xbce2('0x28')],'resourceId':_0x564bd2['id'],'type':_0x43b64c[_0xbce2('0x28')],'sectionId':_0x43b64c['id']},{})[_0xbce2('0x23')](function(){return _0x2db2fe;});}else{return _0x2db2fe;}})[_0xbce2('0x47')](function(_0x58a5d5){logger[_0xbce2('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x58a5d5);throw _0x58a5d5;});}return _0x2db2fe;})[_0xbce2('0x23')](respondWithResult(_0x4dde4e,0xc9))[_0xbce2('0x47')](handleError(_0x4dde4e,null));};
\ No newline at end of file
+var _0xaf48=['sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','offset','limit','set','Content-Range','json','apply','reject','save','update','then','CannedAnswers','UserProfileResource','destroy','end','error','stack','name','send','index','CannedAnswer','rawAttributes','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','map','type','VIRTUAL','field','options','count','include','findAll','rows','catch','params','includeAll','merge','body','find','create','key','MailAccountId','SmsAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','get','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path'];(function(_0x3e13dc,_0x23489a){var _0x5e8b83=function(_0x5dbf01){while(--_0x5dbf01){_0x3e13dc['push'](_0x3e13dc['shift']());}};_0x5e8b83(++_0x23489a);}(_0xaf48,0x1be));var _0x8af4=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0xaf48[_0x1969a7];return _0x3d665f;};'use strict';var pdf=require(_0x8af4('0x0'));var emlformat=require(_0x8af4('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x8af4('0x2'));var jsonpatch=require(_0x8af4('0x3'));var rp=require('request-promise');var moment=require(_0x8af4('0x4'));var BPromise=require(_0x8af4('0x5'));var Mustache=require(_0x8af4('0x6'));var util=require(_0x8af4('0x7'));var path=require(_0x8af4('0x8'));var sox=require(_0x8af4('0x9'));var csv=require(_0x8af4('0xa'));var ejs=require(_0x8af4('0xb'));var fs=require('fs');var _=require(_0x8af4('0xc'));var squel=require('squel');var crypto=require(_0x8af4('0xd'));var jsforce=require(_0x8af4('0xe'));var deskjs=require(_0x8af4('0xf'));var toCsv=require(_0x8af4('0xa'));var querystring=require(_0x8af4('0x10'));var Papa=require(_0x8af4('0x11'));var Redis=require(_0x8af4('0x12'));var authService=require(_0x8af4('0x13'));var qs=require(_0x8af4('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8af4('0x15'))(_0x8af4('0x16'));var utils=require(_0x8af4('0x17'));var config=require(_0x8af4('0x18'));var db=require(_0x8af4('0x19'))['db'];function respondWithStatusCode(_0x432168,_0x1a758f){_0x1a758f=_0x1a758f||0xcc;return function(_0x583dff){if(_0x583dff){return _0x432168[_0x8af4('0x1a')](_0x1a758f);}return _0x432168['status'](_0x1a758f)['end']();};}function respondWithResult(_0x1e8fd5,_0x318692){_0x318692=_0x318692||0xc8;return function(_0x3e4741){if(_0x3e4741){return _0x1e8fd5[_0x8af4('0x1b')](_0x318692)['json'](_0x3e4741);}};}function respondWithFilteredResult(_0x4635a8,_0x296c86){return function(_0xe7c98d){if(_0xe7c98d){var _0x389378=_0xe7c98d['count'],_0x2ddf8c=_0x296c86[_0x8af4('0x1c')],_0x4dc8ed=_0x296c86[_0x8af4('0x1c')]+_0x296c86[_0x8af4('0x1d')],_0x656ea3;if(_0x4dc8ed>=_0x389378){_0x4dc8ed=_0x389378;_0x656ea3=0xc8;}else{_0x656ea3=0xce;}_0x4635a8[_0x8af4('0x1b')](_0x656ea3);return _0x4635a8[_0x8af4('0x1e')](_0x8af4('0x1f'),_0x2ddf8c+'-'+_0x4dc8ed+'/'+_0x389378)[_0x8af4('0x20')](_0xe7c98d);}return null;};}function patchUpdates(_0x34f781){return function(_0x2bd9e3){try{jsonpatch[_0x8af4('0x21')](_0x2bd9e3,_0x34f781,!![]);}catch(_0x198943){return BPromise[_0x8af4('0x22')](_0x198943);}return _0x2bd9e3[_0x8af4('0x23')]();};}function saveUpdates(_0x3230fe,_0x497681){return function(_0x692443){if(_0x692443){return _0x692443[_0x8af4('0x24')](_0x3230fe)[_0x8af4('0x25')](function(_0x208936){return _0x208936;});}return null;};}function removeEntity(_0x4b0141,_0xaad243){return function(_0x2049b5){if(_0x2049b5){return _0x2049b5['destroy']()[_0x8af4('0x25')](function(){var _0x26d90e=_0x2049b5['get']({'plain':!![]});var _0x15535d=_0x8af4('0x26');return db[_0x8af4('0x27')][_0x8af4('0x28')]({'where':{'type':_0x15535d,'resourceId':_0x26d90e['id']}})['then'](function(){return _0x2049b5;});})[_0x8af4('0x25')](function(){_0x4b0141[_0x8af4('0x1b')](0xcc)[_0x8af4('0x29')]();});}};}function handleEntityNotFound(_0x45425e,_0x49a9ef){return function(_0x5653ac){if(!_0x5653ac){_0x45425e[_0x8af4('0x1a')](0x194);}return _0x5653ac;};}function handleError(_0x48a777,_0x99b9aa){_0x99b9aa=_0x99b9aa||0x1f4;return function(_0x188f47){logger[_0x8af4('0x2a')](_0x188f47[_0x8af4('0x2b')]);if(_0x188f47[_0x8af4('0x2c')]){delete _0x188f47[_0x8af4('0x2c')];}_0x48a777['status'](_0x99b9aa)[_0x8af4('0x2d')](_0x188f47);};}exports[_0x8af4('0x2e')]=function(_0x406f4d,_0x20dded){var _0x5e83bf={},_0x3c0365={},_0x928438={'count':0x0,'rows':[]};var _0x140df2=db[_0x8af4('0x2f')][_0x8af4('0x30')];_0x3c0365[_0x8af4('0x31')]=_['keys'](_0x140df2);_0x3c0365[_0x8af4('0x32')]=_[_0x8af4('0x33')](_0x406f4d[_0x8af4('0x32')]);_0x3c0365[_0x8af4('0x34')]=_['intersection'](_0x3c0365[_0x8af4('0x31')],_0x3c0365['query']);_0x5e83bf[_0x8af4('0x35')]=_[_0x8af4('0x36')](_0x3c0365[_0x8af4('0x31')],qs['fields'](_0x406f4d[_0x8af4('0x32')][_0x8af4('0x37')]));_0x5e83bf['attributes']=_0x5e83bf['attributes'][_0x8af4('0x38')]?_0x5e83bf[_0x8af4('0x35')]:_0x3c0365[_0x8af4('0x31')];if(!_0x406f4d['query']['hasOwnProperty'](_0x8af4('0x39'))){_0x5e83bf['limit']=qs['limit'](_0x406f4d[_0x8af4('0x32')][_0x8af4('0x1d')]);_0x5e83bf[_0x8af4('0x1c')]=qs['offset'](_0x406f4d['query'][_0x8af4('0x1c')]);}_0x5e83bf[_0x8af4('0x3a')]=qs['sort'](_0x406f4d['query'][_0x8af4('0x3b')]);_0x5e83bf[_0x8af4('0x3c')]=qs[_0x8af4('0x34')](_[_0x8af4('0x3d')](_0x406f4d['query'],_0x3c0365[_0x8af4('0x34')]));if(_0x406f4d[_0x8af4('0x32')][_0x8af4('0x3e')]){_0x5e83bf[_0x8af4('0x3c')]=_['merge'](_0x5e83bf['where'],{'$or':_[_0x8af4('0x3f')](_0x140df2,function(_0x5aac26){if(_0x5aac26[_0x8af4('0x40')]['key']!==_0x8af4('0x41')){var _0x53d813={};_0x53d813[_0x5aac26[_0x8af4('0x42')]]={'$like':'%'+_0x406f4d['query'][_0x8af4('0x3e')]+'%'};return _0x53d813;}})});}_0x5e83bf=_['merge']({},_0x5e83bf,_0x406f4d[_0x8af4('0x43')]);var _0x15462d={'where':_0x5e83bf[_0x8af4('0x3c')]};return db['CannedAnswer'][_0x8af4('0x44')](_0x15462d)[_0x8af4('0x25')](function(_0x350a83){_0x928438[_0x8af4('0x44')]=_0x350a83;if(_0x406f4d[_0x8af4('0x32')]['includeAll']){_0x5e83bf[_0x8af4('0x45')]=[{'all':!![]}];}return db[_0x8af4('0x2f')][_0x8af4('0x46')](_0x5e83bf);})[_0x8af4('0x25')](function(_0x246b96){_0x928438[_0x8af4('0x47')]=_0x246b96;return _0x928438;})[_0x8af4('0x25')](respondWithFilteredResult(_0x20dded,_0x5e83bf))[_0x8af4('0x48')](handleError(_0x20dded,null));};exports['show']=function(_0x36a788,_0x45c469){var _0x4be463={'raw':!![],'where':{'id':_0x36a788[_0x8af4('0x49')]['id']}},_0x506409={};_0x506409[_0x8af4('0x31')]=_[_0x8af4('0x33')](db[_0x8af4('0x2f')][_0x8af4('0x30')]);_0x506409[_0x8af4('0x32')]=_[_0x8af4('0x33')](_0x36a788[_0x8af4('0x32')]);_0x506409[_0x8af4('0x34')]=_['intersection'](_0x506409[_0x8af4('0x31')],_0x506409[_0x8af4('0x32')]);_0x4be463[_0x8af4('0x35')]=_[_0x8af4('0x36')](_0x506409['model'],qs[_0x8af4('0x37')](_0x36a788[_0x8af4('0x32')][_0x8af4('0x37')]));_0x4be463[_0x8af4('0x35')]=_0x4be463[_0x8af4('0x35')][_0x8af4('0x38')]?_0x4be463['attributes']:_0x506409[_0x8af4('0x31')];if(_0x36a788[_0x8af4('0x32')][_0x8af4('0x4a')]){_0x4be463[_0x8af4('0x45')]=[{'all':!![]}];}_0x4be463=_[_0x8af4('0x4b')]({},_0x4be463,_0x36a788['options']);return db['CannedAnswer']['find'](_0x4be463)['then'](handleEntityNotFound(_0x45c469,null))[_0x8af4('0x25')](respondWithResult(_0x45c469,null))[_0x8af4('0x48')](handleError(_0x45c469,null));};exports['update']=function(_0x5442e3,_0x44ad3f){if(_0x5442e3[_0x8af4('0x4c')]['id']){delete _0x5442e3['body']['id'];}return db[_0x8af4('0x2f')][_0x8af4('0x4d')]({'where':{'id':_0x5442e3[_0x8af4('0x49')]['id']}})[_0x8af4('0x25')](handleEntityNotFound(_0x44ad3f,null))['then'](saveUpdates(_0x5442e3[_0x8af4('0x4c')],null))['then'](respondWithResult(_0x44ad3f,null))[_0x8af4('0x48')](handleError(_0x44ad3f,null));};exports['destroy']=function(_0x335b5b,_0x30248e){return db[_0x8af4('0x2f')][_0x8af4('0x4d')]({'where':{'id':_0x335b5b['params']['id']}})[_0x8af4('0x25')](handleEntityNotFound(_0x30248e,null))[_0x8af4('0x25')](removeEntity(_0x30248e,null))['catch'](handleError(_0x30248e,null));};exports[_0x8af4('0x4e')]=function(_0x3aba32,_0x5561e9){var _0x5c0955={'key':_0x3aba32[_0x8af4('0x4c')][_0x8af4('0x4f')]};if(_0x3aba32['body'][_0x8af4('0x50')]){_0x5c0955[_0x8af4('0x50')]=_0x3aba32[_0x8af4('0x4c')][_0x8af4('0x50')];}else if(_0x3aba32[_0x8af4('0x4c')]['SmsAccountId']){_0x5c0955['SmsAccountId']=_0x3aba32[_0x8af4('0x4c')][_0x8af4('0x51')];}else if(_0x3aba32[_0x8af4('0x4c')]['OpenchannelAccountId']){_0x5c0955['OpenchannelAccountId']=_0x3aba32[_0x8af4('0x4c')]['OpenchannelAccountId'];}else if(_0x3aba32[_0x8af4('0x4c')][_0x8af4('0x52')]){_0x5c0955[_0x8af4('0x52')]=_0x3aba32['body']['ChatWebsiteId'];}return db[_0x8af4('0x2f')][_0x8af4('0x4d')]({'where':_0x5c0955})['then'](function(_0x54f84e){if(_0x54f84e){throw new db[(_0x8af4('0x53'))][(_0x8af4('0x54'))](_0x8af4('0x55'));}return db[_0x8af4('0x2f')][_0x8af4('0x4e')](_0x3aba32[_0x8af4('0x4c')]);})['then'](function(_0x16ce38){var _0x130bb1=_0x3aba32[_0x8af4('0x56')][_0x8af4('0x57')]({'plain':!![]});if(!_0x130bb1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x130bb1['role']===_0x8af4('0x56')){var _0x13d512=_0x16ce38[_0x8af4('0x57')]({'plain':!![]});return db[_0x8af4('0x58')][_0x8af4('0x4d')]({'where':{'name':'CannedAnswers','userProfileId':_0x130bb1['userProfileId']},'raw':!![]})[_0x8af4('0x25')](function(_0x134249){if(_0x134249&&_0x134249[_0x8af4('0x59')]===0x0){return db['UserProfileResource']['create']({'name':_0x13d512[_0x8af4('0x2c')],'resourceId':_0x13d512['id'],'type':_0x134249[_0x8af4('0x2c')],'sectionId':_0x134249['id']},{})[_0x8af4('0x25')](function(){return _0x16ce38;});}else{return _0x16ce38;}})[_0x8af4('0x48')](function(_0x571154){logger[_0x8af4('0x2a')](_0x8af4('0x5a'),_0x571154);throw _0x571154;});}return _0x16ce38;})[_0x8af4('0x25')](respondWithResult(_0x5561e9,0xc9))[_0x8af4('0x48')](handleError(_0x5561e9,null));};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js
index 1d31d81..4ff559c 100644
--- a/server/api/cannedAnswer/cannedAnswer.model.js
+++ b/server/api/cannedAnswer/cannedAnswer.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xefab=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./cannedAnswer.attributes','exports','define','CannedAnswer','tools_canned_answers','utf8mb4','lodash','util'];(function(_0x3969c1,_0x522586){var _0x394313=function(_0x591779){while(--_0x591779){_0x3969c1['push'](_0x3969c1['shift']());}};_0x394313(++_0x522586);}(_0xefab,0x166));var _0xbefa=function(_0x22cea4,_0x54f16a){_0x22cea4=_0x22cea4-0x0;var _0x59d75b=_0xefab[_0x22cea4];return _0x59d75b;};'use strict';var _=require(_0xbefa('0x0'));var util=require(_0xbefa('0x1'));var logger=require(_0xbefa('0x2'))(_0xbefa('0x3'));var moment=require(_0xbefa('0x4'));var BPromise=require(_0xbefa('0x5'));var rp=require(_0xbefa('0x6'));var fs=require('fs');var path=require(_0xbefa('0x7'));var rimraf=require(_0xbefa('0x8'));var config=require('../../config/environment');var attributes=require(_0xbefa('0x9'));module[_0xbefa('0xa')]=function(_0x560345,_0x3ccd20){return _0x560345[_0xbefa('0xb')](_0xbefa('0xc'),attributes,{'tableName':_0xbefa('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xbefa('0xe'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x8193=['exports','define','CannedAnswer','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x122d9f,_0x2c9e5b){var _0x41a09e=function(_0x3d9564){while(--_0x3d9564){_0x122d9f['push'](_0x122d9f['shift']());}};_0x41a09e(++_0x2c9e5b);}(_0x8193,0x123));var _0x3819=function(_0x3e1b86,_0x3f6a43){_0x3e1b86=_0x3e1b86-0x0;var _0x15727c=_0x8193[_0x3e1b86];return _0x15727c;};'use strict';var _=require(_0x3819('0x0'));var util=require(_0x3819('0x1'));var logger=require('../../config/logger')(_0x3819('0x2'));var moment=require(_0x3819('0x3'));var BPromise=require(_0x3819('0x4'));var rp=require(_0x3819('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3819('0x6'));var config=require(_0x3819('0x7'));var attributes=require('./cannedAnswer.attributes');module[_0x3819('0x8')]=function(_0x14181f,_0x27908d){return _0x14181f[_0x3819('0x9')](_0x3819('0xa'),attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x3819('0xb'),'collate':_0x3819('0xc')});};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js
index d9a63bc..3cb8378 100644
--- a/server/api/cannedAnswer/cannedAnswer.rpc.js
+++ b/server/api/cannedAnswer/cannedAnswer.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x64c1=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','request\x20sent','stringify','error','code','CannedAnswer,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis'];(function(_0x460ab6,_0x4ff38b){var _0x3ddaa2=function(_0x658f29){while(--_0x658f29){_0x460ab6['push'](_0x460ab6['shift']());}};_0x3ddaa2(++_0x4ff38b);}(_0x64c1,0x65));var _0x164c=function(_0x123b88,_0x209ac8){_0x123b88=_0x123b88-0x0;var _0x23dfd2=_0x64c1[_0x123b88];return _0x23dfd2;};'use strict';var _=require(_0x164c('0x0'));var util=require(_0x164c('0x1'));var moment=require(_0x164c('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x164c('0x3'));var db=require(_0x164c('0x4'))['db'];var utils=require(_0x164c('0x5'));var logger=require(_0x164c('0x6'))(_0x164c('0x7'));var config=require(_0x164c('0x8'));var jayson=require(_0x164c('0x9'));var client=jayson[_0x164c('0xa')][_0x164c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3e520b,_0x2f94ec,_0x1f2b4a){return new BPromise(function(_0x5ea98d,_0x54177c){return client['request'](_0x3e520b,_0x1f2b4a)[_0x164c('0xc')](function(_0x808696){logger['info']('CannedAnswer,\x20%s,\x20%s',_0x2f94ec,_0x164c('0xd'));logger['debug']('CannedAnswer,\x20%s,\x20%s,\x20%s',_0x2f94ec,_0x164c('0xd'),JSON[_0x164c('0xe')](_0x808696));if(_0x808696[_0x164c('0xf')]){if(_0x808696[_0x164c('0xf')][_0x164c('0x10')]===0x1f4){logger[_0x164c('0xf')](_0x164c('0x11'),_0x2f94ec,_0x808696[_0x164c('0xf')][_0x164c('0x12')]);return _0x54177c(_0x808696[_0x164c('0xf')]['message']);}logger[_0x164c('0xf')](_0x164c('0x11'),_0x2f94ec,_0x808696['error'][_0x164c('0x12')]);return _0x5ea98d(_0x808696[_0x164c('0xf')][_0x164c('0x12')]);}else{logger['info']('CannedAnswer,\x20%s,\x20%s',_0x2f94ec,_0x164c('0xd'));_0x5ea98d(_0x808696[_0x164c('0x13')]['message']);}})[_0x164c('0x14')](function(_0x5c9e95){logger[_0x164c('0xf')](_0x164c('0x11'),_0x2f94ec,_0x5c9e95);_0x54177c(_0x5c9e95);});});}
\ No newline at end of file
+var _0xa298=['result','catch','util','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','client','request','then','info','request\x20sent','debug','stringify','error','CannedAnswer,\x20%s,\x20%s','message'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa298,0xd3));var _0x8a29=function(_0x5bbcaa,_0x4a6f78){_0x5bbcaa=_0x5bbcaa-0x0;var _0x20dd4e=_0xa298[_0x5bbcaa];return _0x20dd4e;};'use strict';var _=require('lodash');var util=require(_0x8a29('0x0'));var moment=require('moment');var BPromise=require(_0x8a29('0x1'));var rs=require(_0x8a29('0x2'));var fs=require('fs');var Redis=require(_0x8a29('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8a29('0x4'))(_0x8a29('0x5'));var config=require(_0x8a29('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x8a29('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x222c7f,_0x1ad176,_0x9820f7){return new BPromise(function(_0x189d3b,_0x4865d0){return client[_0x8a29('0x8')](_0x222c7f,_0x9820f7)[_0x8a29('0x9')](function(_0x34d9be){logger[_0x8a29('0xa')]('CannedAnswer,\x20%s,\x20%s',_0x1ad176,_0x8a29('0xb'));logger[_0x8a29('0xc')]('CannedAnswer,\x20%s,\x20%s,\x20%s',_0x1ad176,_0x8a29('0xb'),JSON[_0x8a29('0xd')](_0x34d9be));if(_0x34d9be[_0x8a29('0xe')]){if(_0x34d9be[_0x8a29('0xe')]['code']===0x1f4){logger[_0x8a29('0xe')](_0x8a29('0xf'),_0x1ad176,_0x34d9be[_0x8a29('0xe')][_0x8a29('0x10')]);return _0x4865d0(_0x34d9be[_0x8a29('0xe')][_0x8a29('0x10')]);}logger[_0x8a29('0xe')]('CannedAnswer,\x20%s,\x20%s',_0x1ad176,_0x34d9be['error'][_0x8a29('0x10')]);return _0x189d3b(_0x34d9be[_0x8a29('0xe')]['message']);}else{logger['info']('CannedAnswer,\x20%s,\x20%s',_0x1ad176,_0x8a29('0xb'));_0x189d3b(_0x34d9be[_0x8a29('0x11')][_0x8a29('0x10')]);}})[_0x8a29('0x12')](function(_0x3534a4){logger[_0x8a29('0xe')](_0x8a29('0xf'),_0x1ad176,_0x3534a4);_0x4865d0(_0x3534a4);});});}
\ No newline at end of file
diff --git a/server/api/cannedAnswer/index.js b/server/api/cannedAnswer/index.js
index e3574cc..35d59b0 100644
--- a/server/api/cannedAnswer/index.js
+++ b/server/api/cannedAnswer/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb43=['/:id','show','post','put','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./cannedAnswer.controller','get','isAuthenticated','index'];(function(_0xdc1c0c,_0x52be79){var _0x29afb0=function(_0x2ca8ff){while(--_0x2ca8ff){_0xdc1c0c['push'](_0xdc1c0c['shift']());}};_0x29afb0(++_0x52be79);}(_0xdb43,0x9e));var _0x3db4=function(_0x36eaaa,_0x326732){_0x36eaaa=_0x36eaaa-0x0;var _0x461349=_0xdb43[_0x36eaaa];return _0x461349;};'use strict';var multer=require(_0x3db4('0x0'));var util=require(_0x3db4('0x1'));var path=require(_0x3db4('0x2'));var timeout=require(_0x3db4('0x3'));var express=require(_0x3db4('0x4'));var router=express[_0x3db4('0x5')]();var auth=require(_0x3db4('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x3db4('0x7'));var controller=require(_0x3db4('0x8'));router[_0x3db4('0x9')]('/',auth[_0x3db4('0xa')](),controller[_0x3db4('0xb')]);router[_0x3db4('0x9')](_0x3db4('0xc'),auth[_0x3db4('0xa')](),controller[_0x3db4('0xd')]);router[_0x3db4('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x3db4('0xf')](_0x3db4('0xc'),auth[_0x3db4('0xa')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x3db4('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0x417c=['isAuthenticated','index','/:id','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get'];(function(_0x2f3508,_0x2b1faf){var _0x14672f=function(_0x3386cc){while(--_0x3386cc){_0x2f3508['push'](_0x2f3508['shift']());}};_0x14672f(++_0x2b1faf);}(_0x417c,0xce));var _0xc417=function(_0x135630,_0x12db8f){_0x135630=_0x135630-0x0;var _0x34543a=_0x417c[_0x135630];return _0x34543a;};'use strict';var multer=require(_0xc417('0x0'));var util=require(_0xc417('0x1'));var path=require(_0xc417('0x2'));var timeout=require(_0xc417('0x3'));var express=require(_0xc417('0x4'));var router=express[_0xc417('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xc417('0x6'));var config=require(_0xc417('0x7'));var controller=require(_0xc417('0x8'));router[_0xc417('0x9')]('/',auth[_0xc417('0xa')](),controller[_0xc417('0xb')]);router[_0xc417('0x9')](_0xc417('0xc'),auth[_0xc417('0xa')](),controller['show']);router['post']('/',auth[_0xc417('0xa')](),controller[_0xc417('0xd')]);router[_0xc417('0xe')](_0xc417('0xc'),auth['isAuthenticated'](),controller[_0xc417('0xf')]);router['delete']('/:id',auth[_0xc417('0xa')](),controller[_0xc417('0x10')]);module[_0xc417('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js
index 3c43aa5..e4ba492 100644
--- a/server/api/cdr/cdr.attributes.js
+++ b/server/api/cdr/cdr.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3500=['exports','DATE','1970-01-01\x2000:00:01','STRING','INTEGER','sequelize'];(function(_0x141e03,_0x18340e){var _0x2074e3=function(_0x2b7ece){while(--_0x2b7ece){_0x141e03['push'](_0x141e03['shift']());}};_0x2074e3(++_0x18340e);}(_0x3500,0x1d3));var _0x0350=function(_0x1463f3,_0x1a4098){_0x1463f3=_0x1463f3-0x0;var _0x58c44d=_0x3500[_0x1463f3];return _0x58c44d;};'use strict';var Sequelize=require(_0x0350('0x0'));module[_0x0350('0x1')]={'calldate':{'type':Sequelize[_0x0350('0x2')],'allowNull':![],'defaultValue':_0x0350('0x3')},'clid':{'type':Sequelize[_0x0350('0x4')]},'src':{'type':Sequelize[_0x0350('0x4')]},'dst':{'type':Sequelize['STRING']},'dcontext':{'type':Sequelize[_0x0350('0x4')]},'channel':{'type':Sequelize[_0x0350('0x4')]},'dstchannel':{'type':Sequelize['STRING']},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0x0350('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x0350('0x4')]},'amaflags':{'type':Sequelize[_0x0350('0x5')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x0350('0x4')]},'userfield':{'type':Sequelize[_0x0350('0x4')]},'uniqueid':{'type':Sequelize[_0x0350('0x4')]},'linkedid':{'type':Sequelize[_0x0350('0x4')]},'sequence':{'type':Sequelize['STRING']},'peeraccount':{'type':Sequelize[_0x0350('0x4')]},'type':{'type':Sequelize[_0x0350('0x4')]},'tag':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb29c=['INTEGER','sequelize','exports','1970-01-01\x2000:00:01','STRING'];(function(_0x5389d0,_0x1338bf){var _0x56a7b9=function(_0x3c5e30){while(--_0x3c5e30){_0x5389d0['push'](_0x5389d0['shift']());}};_0x56a7b9(++_0x1338bf);}(_0xb29c,0x88));var _0xcb29=function(_0x1e1962,_0x5a2061){_0x1e1962=_0x1e1962-0x0;var _0x3c06be=_0xb29c[_0x1e1962];return _0x3c06be;};'use strict';var Sequelize=require(_0xcb29('0x0'));module[_0xcb29('0x1')]={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':_0xcb29('0x2')},'clid':{'type':Sequelize[_0xcb29('0x3')]},'src':{'type':Sequelize[_0xcb29('0x3')]},'dst':{'type':Sequelize[_0xcb29('0x3')]},'dcontext':{'type':Sequelize[_0xcb29('0x3')]},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize['STRING']},'lastapp':{'type':Sequelize[_0xcb29('0x3')]},'lastdata':{'type':Sequelize[_0xcb29('0x3')]},'duration':{'type':Sequelize[_0xcb29('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0xcb29('0x4')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xcb29('0x3')]},'userfield':{'type':Sequelize[_0xcb29('0x3')]},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize['STRING']},'sequence':{'type':Sequelize[_0xcb29('0x3')]},'peeraccount':{'type':Sequelize[_0xcb29('0x3')]},'type':{'type':Sequelize[_0xcb29('0x3')]},'tag':{'type':Sequelize[_0xcb29('0x3')]}};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js
index 242fc9a..c661671 100644
--- a/server/api/cdr/cdr.controller.js
+++ b/server/api/cdr/cdr.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd950=['api','../../config/utils','sendStatus','status','end','json','offset','limit','set','reject','save','then','error','stack','name','send','rawAttributes','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','type','field','merge','options','Cdr','count','includeAll','include','findAll','rows','catch','show','params','filters','create','body','find','describe','eml-format','rimraf','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger'];(function(_0x3dae24,_0x36bbcf){var _0x5a8aea=function(_0x4e2e13){while(--_0x4e2e13){_0x3dae24['push'](_0x3dae24['shift']());}};_0x5a8aea(++_0x36bbcf);}(_0xd950,0xf6));var _0x0d95=function(_0x172746,_0x6c8ec1){_0x172746=_0x172746-0x0;var _0x539835=_0xd950[_0x172746];return _0x539835;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x0d95('0x0'));var rimraf=require(_0x0d95('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0d95('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x0d95('0x3'));var util=require(_0x0d95('0x4'));var path=require(_0x0d95('0x5'));var sox=require(_0x0d95('0x6'));var csv=require(_0x0d95('0x7'));var ejs=require(_0x0d95('0x8'));var fs=require('fs');var _=require(_0x0d95('0x9'));var squel=require(_0x0d95('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0d95('0xb'));var toCsv=require(_0x0d95('0x7'));var querystring=require(_0x0d95('0xc'));var Papa=require(_0x0d95('0xd'));var Redis=require(_0x0d95('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x0d95('0xf'));var hardwareService=require(_0x0d95('0x10'));var logger=require(_0x0d95('0x11'))(_0x0d95('0x12'));var utils=require(_0x0d95('0x13'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x397b86,_0x553f50){_0x553f50=_0x553f50||0xcc;return function(_0x3f56c8){if(_0x3f56c8){return _0x397b86[_0x0d95('0x14')](_0x553f50);}return _0x397b86[_0x0d95('0x15')](_0x553f50)[_0x0d95('0x16')]();};}function respondWithResult(_0x16bf7f,_0x55d443){_0x55d443=_0x55d443||0xc8;return function(_0x5c633c){if(_0x5c633c){return _0x16bf7f[_0x0d95('0x15')](_0x55d443)[_0x0d95('0x17')](_0x5c633c);}};}function respondWithFilteredResult(_0x2af347,_0x662d3e){return function(_0x2edc7c){if(_0x2edc7c){var _0x542abc=_0x2edc7c['count'],_0x24e759=_0x662d3e[_0x0d95('0x18')],_0x3c2969=_0x662d3e[_0x0d95('0x18')]+_0x662d3e[_0x0d95('0x19')],_0x3c028f;if(_0x3c2969>=_0x542abc){_0x3c2969=_0x542abc;_0x3c028f=0xc8;}else{_0x3c028f=0xce;}_0x2af347[_0x0d95('0x15')](_0x3c028f);return _0x2af347[_0x0d95('0x1a')]('Content-Range',_0x24e759+'-'+_0x3c2969+'/'+_0x542abc)['json'](_0x2edc7c);}return null;};}function patchUpdates(_0x2f5633){return function(_0xb48c52){try{jsonpatch['apply'](_0xb48c52,_0x2f5633,!![]);}catch(_0x50c468){return BPromise[_0x0d95('0x1b')](_0x50c468);}return _0xb48c52[_0x0d95('0x1c')]();};}function saveUpdates(_0x605bd9,_0x9dff99){return function(_0x586368){if(_0x586368){return _0x586368['update'](_0x605bd9)[_0x0d95('0x1d')](function(_0xcb4bc7){return _0xcb4bc7;});}return null;};}function removeEntity(_0x49b6b2,_0x52ec28){return function(_0xbd255f){if(_0xbd255f){return _0xbd255f['destroy']()[_0x0d95('0x1d')](function(){_0x49b6b2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1a69b0,_0x34fcfc){return function(_0x1e0642){if(!_0x1e0642){_0x1a69b0[_0x0d95('0x14')](0x194);}return _0x1e0642;};}function handleError(_0x12cc6c,_0x47dc67){_0x47dc67=_0x47dc67||0x1f4;return function(_0x3e342e){logger[_0x0d95('0x1e')](_0x3e342e[_0x0d95('0x1f')]);if(_0x3e342e[_0x0d95('0x20')]){delete _0x3e342e[_0x0d95('0x20')];}_0x12cc6c[_0x0d95('0x15')](_0x47dc67)[_0x0d95('0x21')](_0x3e342e);};}exports['index']=function(_0x478fcb,_0x33f86e){var _0x6d8043={},_0x3a922b={},_0x42a2bd={'count':0x0,'rows':[]};var _0x35046b=db['Cdr'][_0x0d95('0x22')];_0x3a922b[_0x0d95('0x23')]=_[_0x0d95('0x24')](_0x35046b);_0x3a922b[_0x0d95('0x25')]=_[_0x0d95('0x24')](_0x478fcb['query']);_0x3a922b['filters']=_[_0x0d95('0x26')](_0x3a922b[_0x0d95('0x23')],_0x3a922b[_0x0d95('0x25')]);_0x6d8043[_0x0d95('0x27')]=_[_0x0d95('0x26')](_0x3a922b[_0x0d95('0x23')],qs[_0x0d95('0x28')](_0x478fcb[_0x0d95('0x25')][_0x0d95('0x28')]));_0x6d8043[_0x0d95('0x27')]=_0x6d8043[_0x0d95('0x27')][_0x0d95('0x29')]?_0x6d8043[_0x0d95('0x27')]:_0x3a922b['model'];if(!_0x478fcb[_0x0d95('0x25')][_0x0d95('0x2a')](_0x0d95('0x2b'))){_0x6d8043[_0x0d95('0x19')]=qs[_0x0d95('0x19')](_0x478fcb[_0x0d95('0x25')][_0x0d95('0x19')]);_0x6d8043[_0x0d95('0x18')]=qs[_0x0d95('0x18')](_0x478fcb[_0x0d95('0x25')][_0x0d95('0x18')]);}_0x6d8043['order']=qs['sort'](_0x478fcb[_0x0d95('0x25')][_0x0d95('0x2c')]);_0x6d8043['where']=qs['filters'](_[_0x0d95('0x2d')](_0x478fcb[_0x0d95('0x25')],_0x3a922b['filters']));if(_0x478fcb['query'][_0x0d95('0x2e')]){_0x6d8043[_0x0d95('0x2f')]=_['merge'](_0x6d8043[_0x0d95('0x2f')],{'$or':_['map'](_0x35046b,function(_0xe2487c){if(_0xe2487c[_0x0d95('0x30')]['key']!=='VIRTUAL'){var _0x5a7f54={};_0x5a7f54[_0xe2487c[_0x0d95('0x31')]]={'$like':'%'+_0x478fcb['query'][_0x0d95('0x2e')]+'%'};return _0x5a7f54;}})});}_0x6d8043=_[_0x0d95('0x32')]({},_0x6d8043,_0x478fcb[_0x0d95('0x33')]);var _0x13d1fe={'where':_0x6d8043[_0x0d95('0x2f')]};return db[_0x0d95('0x34')]['count'](_0x13d1fe)[_0x0d95('0x1d')](function(_0x3deec6){_0x42a2bd[_0x0d95('0x35')]=_0x3deec6;if(_0x478fcb['query'][_0x0d95('0x36')]){_0x6d8043[_0x0d95('0x37')]=[{'all':!![]}];}return db[_0x0d95('0x34')][_0x0d95('0x38')](_0x6d8043);})[_0x0d95('0x1d')](function(_0xfe92f9){_0x42a2bd[_0x0d95('0x39')]=_0xfe92f9;return _0x42a2bd;})['then'](respondWithFilteredResult(_0x33f86e,_0x6d8043))[_0x0d95('0x3a')](handleError(_0x33f86e,null));};exports[_0x0d95('0x3b')]=function(_0xde0e0,_0x190378){var _0x13e927={'raw':!![],'where':{'id':_0xde0e0[_0x0d95('0x3c')]['id']}},_0x55fab6={};_0x55fab6[_0x0d95('0x23')]=_[_0x0d95('0x24')](db[_0x0d95('0x34')][_0x0d95('0x22')]);_0x55fab6['query']=_['keys'](_0xde0e0[_0x0d95('0x25')]);_0x55fab6[_0x0d95('0x3d')]=_[_0x0d95('0x26')](_0x55fab6['model'],_0x55fab6[_0x0d95('0x25')]);_0x13e927[_0x0d95('0x27')]=_[_0x0d95('0x26')](_0x55fab6['model'],qs['fields'](_0xde0e0[_0x0d95('0x25')]['fields']));_0x13e927['attributes']=_0x13e927['attributes']['length']?_0x13e927[_0x0d95('0x27')]:_0x55fab6['model'];if(_0xde0e0[_0x0d95('0x25')][_0x0d95('0x36')]){_0x13e927[_0x0d95('0x37')]=[{'all':!![]}];}_0x13e927=_[_0x0d95('0x32')]({},_0x13e927,_0xde0e0[_0x0d95('0x33')]);return db[_0x0d95('0x34')]['find'](_0x13e927)[_0x0d95('0x1d')](handleEntityNotFound(_0x190378,null))[_0x0d95('0x1d')](respondWithResult(_0x190378,null))[_0x0d95('0x3a')](handleError(_0x190378,null));};exports[_0x0d95('0x3e')]=function(_0x24c332,_0x1b8b88){return db[_0x0d95('0x34')][_0x0d95('0x3e')](_0x24c332[_0x0d95('0x3f')],{})[_0x0d95('0x1d')](respondWithResult(_0x1b8b88,0xc9))[_0x0d95('0x3a')](handleError(_0x1b8b88,null));};exports['update']=function(_0x40d52e,_0x5b4f41){if(_0x40d52e['body']['id']){delete _0x40d52e[_0x0d95('0x3f')]['id'];}return db[_0x0d95('0x34')]['find']({'where':{'id':_0x40d52e['params']['id']}})[_0x0d95('0x1d')](handleEntityNotFound(_0x5b4f41,null))[_0x0d95('0x1d')](saveUpdates(_0x40d52e['body'],null))[_0x0d95('0x1d')](respondWithResult(_0x5b4f41,null))['catch'](handleError(_0x5b4f41,null));};exports['destroy']=function(_0x548849,_0x5b55d5){return db['Cdr'][_0x0d95('0x40')]({'where':{'id':_0x548849[_0x0d95('0x3c')]['id']}})[_0x0d95('0x1d')](handleEntityNotFound(_0x5b55d5,null))['then'](removeEntity(_0x5b55d5,null))[_0x0d95('0x3a')](handleError(_0x5b55d5,null));};exports[_0x0d95('0x41')]=function(_0x47fbd8,_0xc4519e){return db[_0x0d95('0x34')][_0x0d95('0x41')]()[_0x0d95('0x1d')](respondWithResult(_0xc4519e,null))[_0x0d95('0x3a')](handleError(_0xc4519e,null));};
\ No newline at end of file
+var _0xd06d=['json','apply','save','update','then','destroy','sendStatus','name','send','Cdr','rawAttributes','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','map','type','key','VIRTUAL','field','options','count','includeAll','include','findAll','rows','catch','params','length','find','create','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','../../config/utils','../../mysqldb','status','end','offset','limit','set','Content-Range'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0xd06d,0x100));var _0xdd06=function(_0x36625f,_0x727bd6){_0x36625f=_0x36625f-0x0;var _0x135981=_0xd06d[_0x36625f];return _0x135981;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xdd06('0x0'));var rimraf=require(_0xdd06('0x1'));var zipdir=require(_0xdd06('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xdd06('0x3'));var moment=require(_0xdd06('0x4'));var BPromise=require(_0xdd06('0x5'));var Mustache=require(_0xdd06('0x6'));var util=require('util');var path=require(_0xdd06('0x7'));var sox=require(_0xdd06('0x8'));var csv=require(_0xdd06('0x9'));var ejs=require(_0xdd06('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xdd06('0xb'));var crypto=require(_0xdd06('0xc'));var jsforce=require(_0xdd06('0xd'));var deskjs=require(_0xdd06('0xe'));var toCsv=require(_0xdd06('0x9'));var querystring=require(_0xdd06('0xf'));var Papa=require(_0xdd06('0x10'));var Redis=require(_0xdd06('0x11'));var authService=require(_0xdd06('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xdd06('0x13'))('api');var utils=require(_0xdd06('0x14'));var config=require('../../config/environment');var db=require(_0xdd06('0x15'))['db'];function respondWithStatusCode(_0x39d4cc,_0x273a08){_0x273a08=_0x273a08||0xcc;return function(_0x4fabc5){if(_0x4fabc5){return _0x39d4cc['sendStatus'](_0x273a08);}return _0x39d4cc[_0xdd06('0x16')](_0x273a08)[_0xdd06('0x17')]();};}function respondWithResult(_0x432716,_0x4dffa3){_0x4dffa3=_0x4dffa3||0xc8;return function(_0x1738ce){if(_0x1738ce){return _0x432716['status'](_0x4dffa3)['json'](_0x1738ce);}};}function respondWithFilteredResult(_0x1b3ec5,_0x4563d3){return function(_0x4804c6){if(_0x4804c6){var _0x287bf0=_0x4804c6['count'],_0x49c3d5=_0x4563d3[_0xdd06('0x18')],_0x149ceb=_0x4563d3[_0xdd06('0x18')]+_0x4563d3[_0xdd06('0x19')],_0x2a7686;if(_0x149ceb>=_0x287bf0){_0x149ceb=_0x287bf0;_0x2a7686=0xc8;}else{_0x2a7686=0xce;}_0x1b3ec5[_0xdd06('0x16')](_0x2a7686);return _0x1b3ec5[_0xdd06('0x1a')](_0xdd06('0x1b'),_0x49c3d5+'-'+_0x149ceb+'/'+_0x287bf0)[_0xdd06('0x1c')](_0x4804c6);}return null;};}function patchUpdates(_0xea4880){return function(_0x51e777){try{jsonpatch[_0xdd06('0x1d')](_0x51e777,_0xea4880,!![]);}catch(_0x146b4f){return BPromise['reject'](_0x146b4f);}return _0x51e777[_0xdd06('0x1e')]();};}function saveUpdates(_0x25e49e,_0x3277a8){return function(_0x1c13b7){if(_0x1c13b7){return _0x1c13b7[_0xdd06('0x1f')](_0x25e49e)[_0xdd06('0x20')](function(_0x52f9d6){return _0x52f9d6;});}return null;};}function removeEntity(_0x57f710,_0x9d3f13){return function(_0x1deb5d){if(_0x1deb5d){return _0x1deb5d[_0xdd06('0x21')]()[_0xdd06('0x20')](function(){_0x57f710[_0xdd06('0x16')](0xcc)[_0xdd06('0x17')]();});}};}function handleEntityNotFound(_0x3e5a66,_0x25bba6){return function(_0x2688f0){if(!_0x2688f0){_0x3e5a66[_0xdd06('0x22')](0x194);}return _0x2688f0;};}function handleError(_0x34abe9,_0x298d79){_0x298d79=_0x298d79||0x1f4;return function(_0x166268){logger['error'](_0x166268['stack']);if(_0x166268[_0xdd06('0x23')]){delete _0x166268[_0xdd06('0x23')];}_0x34abe9['status'](_0x298d79)[_0xdd06('0x24')](_0x166268);};}exports['index']=function(_0x38b517,_0x35c44c){var _0x477e5c={},_0x1a337a={},_0x568e51={'count':0x0,'rows':[]};var _0x202920=db[_0xdd06('0x25')][_0xdd06('0x26')];_0x1a337a[_0xdd06('0x27')]=_['keys'](_0x202920);_0x1a337a[_0xdd06('0x28')]=_[_0xdd06('0x29')](_0x38b517['query']);_0x1a337a[_0xdd06('0x2a')]=_[_0xdd06('0x2b')](_0x1a337a[_0xdd06('0x27')],_0x1a337a['query']);_0x477e5c[_0xdd06('0x2c')]=_['intersection'](_0x1a337a[_0xdd06('0x27')],qs['fields'](_0x38b517['query'][_0xdd06('0x2d')]));_0x477e5c[_0xdd06('0x2c')]=_0x477e5c['attributes']['length']?_0x477e5c[_0xdd06('0x2c')]:_0x1a337a[_0xdd06('0x27')];if(!_0x38b517[_0xdd06('0x28')][_0xdd06('0x2e')](_0xdd06('0x2f'))){_0x477e5c[_0xdd06('0x19')]=qs[_0xdd06('0x19')](_0x38b517[_0xdd06('0x28')]['limit']);_0x477e5c[_0xdd06('0x18')]=qs[_0xdd06('0x18')](_0x38b517['query'][_0xdd06('0x18')]);}_0x477e5c[_0xdd06('0x30')]=qs['sort'](_0x38b517[_0xdd06('0x28')][_0xdd06('0x31')]);_0x477e5c[_0xdd06('0x32')]=qs[_0xdd06('0x2a')](_['pick'](_0x38b517[_0xdd06('0x28')],_0x1a337a[_0xdd06('0x2a')]));if(_0x38b517['query'][_0xdd06('0x33')]){_0x477e5c[_0xdd06('0x32')]=_[_0xdd06('0x34')](_0x477e5c['where'],{'$or':_[_0xdd06('0x35')](_0x202920,function(_0x44b89e){if(_0x44b89e[_0xdd06('0x36')][_0xdd06('0x37')]!==_0xdd06('0x38')){var _0x1df9ac={};_0x1df9ac[_0x44b89e[_0xdd06('0x39')]]={'$like':'%'+_0x38b517['query'][_0xdd06('0x33')]+'%'};return _0x1df9ac;}})});}_0x477e5c=_[_0xdd06('0x34')]({},_0x477e5c,_0x38b517[_0xdd06('0x3a')]);var _0x49a831={'where':_0x477e5c[_0xdd06('0x32')]};return db[_0xdd06('0x25')][_0xdd06('0x3b')](_0x49a831)['then'](function(_0x3cd6b8){_0x568e51['count']=_0x3cd6b8;if(_0x38b517[_0xdd06('0x28')][_0xdd06('0x3c')]){_0x477e5c[_0xdd06('0x3d')]=[{'all':!![]}];}return db[_0xdd06('0x25')][_0xdd06('0x3e')](_0x477e5c);})[_0xdd06('0x20')](function(_0x1a1c38){_0x568e51[_0xdd06('0x3f')]=_0x1a1c38;return _0x568e51;})[_0xdd06('0x20')](respondWithFilteredResult(_0x35c44c,_0x477e5c))[_0xdd06('0x40')](handleError(_0x35c44c,null));};exports['show']=function(_0x6734cb,_0xc92ec9){var _0x3e43c3={'raw':!![],'where':{'id':_0x6734cb[_0xdd06('0x41')]['id']}},_0x3ba85f={};_0x3ba85f[_0xdd06('0x27')]=_[_0xdd06('0x29')](db[_0xdd06('0x25')][_0xdd06('0x26')]);_0x3ba85f[_0xdd06('0x28')]=_[_0xdd06('0x29')](_0x6734cb['query']);_0x3ba85f[_0xdd06('0x2a')]=_[_0xdd06('0x2b')](_0x3ba85f[_0xdd06('0x27')],_0x3ba85f['query']);_0x3e43c3[_0xdd06('0x2c')]=_[_0xdd06('0x2b')](_0x3ba85f['model'],qs['fields'](_0x6734cb[_0xdd06('0x28')][_0xdd06('0x2d')]));_0x3e43c3[_0xdd06('0x2c')]=_0x3e43c3[_0xdd06('0x2c')][_0xdd06('0x42')]?_0x3e43c3[_0xdd06('0x2c')]:_0x3ba85f[_0xdd06('0x27')];if(_0x6734cb[_0xdd06('0x28')][_0xdd06('0x3c')]){_0x3e43c3['include']=[{'all':!![]}];}_0x3e43c3=_[_0xdd06('0x34')]({},_0x3e43c3,_0x6734cb[_0xdd06('0x3a')]);return db[_0xdd06('0x25')][_0xdd06('0x43')](_0x3e43c3)['then'](handleEntityNotFound(_0xc92ec9,null))['then'](respondWithResult(_0xc92ec9,null))[_0xdd06('0x40')](handleError(_0xc92ec9,null));};exports[_0xdd06('0x44')]=function(_0x5d1acb,_0x477022){return db[_0xdd06('0x25')]['create'](_0x5d1acb[_0xdd06('0x45')],{})['then'](respondWithResult(_0x477022,0xc9))[_0xdd06('0x40')](handleError(_0x477022,null));};exports['update']=function(_0x105984,_0x48e7d8){if(_0x105984[_0xdd06('0x45')]['id']){delete _0x105984[_0xdd06('0x45')]['id'];}return db[_0xdd06('0x25')]['find']({'where':{'id':_0x105984[_0xdd06('0x41')]['id']}})[_0xdd06('0x20')](handleEntityNotFound(_0x48e7d8,null))['then'](saveUpdates(_0x105984[_0xdd06('0x45')],null))['then'](respondWithResult(_0x48e7d8,null))[_0xdd06('0x40')](handleError(_0x48e7d8,null));};exports['destroy']=function(_0x461a7d,_0x209401){return db[_0xdd06('0x25')][_0xdd06('0x43')]({'where':{'id':_0x461a7d['params']['id']}})[_0xdd06('0x20')](handleEntityNotFound(_0x209401,null))['then'](removeEntity(_0x209401,null))['catch'](handleError(_0x209401,null));};exports[_0xdd06('0x46')]=function(_0x3afcf5,_0x530c90){return db['Cdr'][_0xdd06('0x46')]()[_0xdd06('0x20')](respondWithResult(_0x530c90,null))[_0xdd06('0x40')](handleError(_0x530c90,null));};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js
index 0aab1ea..1022df9 100644
--- a/server/api/cdr/cdr.model.js
+++ b/server/api/cdr/cdr.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4642=['src','uniqueid','lodash','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports','define','Cdr','accountcode','disposition','dst'];(function(_0x13e741,_0x5d3c24){var _0x3f8bb3=function(_0x4440a0){while(--_0x4440a0){_0x13e741['push'](_0x13e741['shift']());}};_0x3f8bb3(++_0x5d3c24);}(_0x4642,0xb2));var _0x2464=function(_0x2b0f4b,_0x2a4c48){_0x2b0f4b=_0x2b0f4b-0x0;var _0x2c933d=_0x4642[_0x2b0f4b];return _0x2c933d;};'use strict';var _=require(_0x2464('0x0'));var util=require('util');var logger=require(_0x2464('0x1'))('api');var moment=require(_0x2464('0x2'));var BPromise=require(_0x2464('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2464('0x4'));var rimraf=require(_0x2464('0x5'));var config=require(_0x2464('0x6'));var attributes=require(_0x2464('0x7'));module[_0x2464('0x8')]=function(_0x2bf444,_0x21ab7e){return _0x2bf444[_0x2464('0x9')](_0x2464('0xa'),attributes,{'tableName':'cdr','paranoid':![],'indexes':[{'name':_0x2464('0xb'),'fields':['accountcode']},{'name':'calldate','fields':['calldate']},{'name':_0x2464('0xc'),'fields':[_0x2464('0xc')]},{'name':_0x2464('0xd'),'fields':[_0x2464('0xd')]},{'name':'src','fields':[_0x2464('0xe')]},{'name':_0x2464('0xf'),'fields':[_0x2464('0xf')]}],'timestamps':![]});};
\ No newline at end of file
+var _0xf46b=['Cdr','cdr','accountcode','calldate','disposition','dst','src','uniqueid','lodash','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports','define'];(function(_0x22386f,_0x3da6d7){var _0x2e6d18=function(_0xc1c0a9){while(--_0xc1c0a9){_0x22386f['push'](_0x22386f['shift']());}};_0x2e6d18(++_0x3da6d7);}(_0xf46b,0xff));var _0xbf46=function(_0x39096d,_0x51f8a0){_0x39096d=_0x39096d-0x0;var _0x13da4f=_0xf46b[_0x39096d];return _0x13da4f;};'use strict';var _=require(_0xbf46('0x0'));var util=require('util');var logger=require(_0xbf46('0x1'))(_0xbf46('0x2'));var moment=require(_0xbf46('0x3'));var BPromise=require(_0xbf46('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbf46('0x5'));var rimraf=require(_0xbf46('0x6'));var config=require(_0xbf46('0x7'));var attributes=require(_0xbf46('0x8'));module[_0xbf46('0x9')]=function(_0x1ee0fc,_0x29c564){return _0x1ee0fc[_0xbf46('0xa')](_0xbf46('0xb'),attributes,{'tableName':_0xbf46('0xc'),'paranoid':![],'indexes':[{'name':_0xbf46('0xd'),'fields':[_0xbf46('0xd')]},{'name':_0xbf46('0xe'),'fields':[_0xbf46('0xe')]},{'name':_0xbf46('0xf'),'fields':['disposition']},{'name':_0xbf46('0x10'),'fields':[_0xbf46('0x10')]},{'name':_0xbf46('0x11'),'fields':[_0xbf46('0x11')]},{'name':_0xbf46('0x12'),'fields':[_0xbf46('0x12')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js
index ce392c9..91e60ff 100644
--- a/server/api/cdr/cdr.rpc.js
+++ b/server/api/cdr/cdr.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe421=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then','Cdr,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util'];(function(_0x311a98,_0x2615cf){var _0x11d5e9=function(_0x5bb002){while(--_0x5bb002){_0x311a98['push'](_0x311a98['shift']());}};_0x11d5e9(++_0x2615cf);}(_0xe421,0x174));var _0x1e42=function(_0x4dbe10,_0x25ef1c){_0x4dbe10=_0x4dbe10-0x0;var _0x53d07f=_0xe421[_0x4dbe10];return _0x53d07f;};'use strict';var _=require(_0x1e42('0x0'));var util=require(_0x1e42('0x1'));var moment=require(_0x1e42('0x2'));var BPromise=require(_0x1e42('0x3'));var rs=require(_0x1e42('0x4'));var fs=require('fs');var Redis=require(_0x1e42('0x5'));var db=require(_0x1e42('0x6'))['db'];var utils=require(_0x1e42('0x7'));var logger=require('../../config/logger')(_0x1e42('0x8'));var config=require(_0x1e42('0x9'));var jayson=require(_0x1e42('0xa'));var client=jayson['client'][_0x1e42('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2acdfa,_0x21e391,_0x4686dd){return new BPromise(function(_0x3921c9,_0x3f38a5){return client['request'](_0x2acdfa,_0x4686dd)[_0x1e42('0xc')](function(_0x413ae4){logger['info'](_0x1e42('0xd'),_0x21e391,_0x1e42('0xe'));logger[_0x1e42('0xf')]('Cdr,\x20%s,\x20%s,\x20%s',_0x21e391,_0x1e42('0xe'),JSON[_0x1e42('0x10')](_0x413ae4));if(_0x413ae4[_0x1e42('0x11')]){if(_0x413ae4['error'][_0x1e42('0x12')]===0x1f4){logger['error'](_0x1e42('0xd'),_0x21e391,_0x413ae4['error']['message']);return _0x3f38a5(_0x413ae4[_0x1e42('0x11')][_0x1e42('0x13')]);}logger[_0x1e42('0x11')](_0x1e42('0xd'),_0x21e391,_0x413ae4['error'][_0x1e42('0x13')]);return _0x3921c9(_0x413ae4['error'][_0x1e42('0x13')]);}else{logger['info'](_0x1e42('0xd'),_0x21e391,_0x1e42('0xe'));_0x3921c9(_0x413ae4[_0x1e42('0x14')][_0x1e42('0x13')]);}})[_0x1e42('0x15')](function(_0x6f9d1d){logger[_0x1e42('0x11')]('Cdr,\x20%s,\x20%s',_0x21e391,_0x6f9d1d);_0x3f38a5(_0x6f9d1d);});});}
\ No newline at end of file
+var _0xe436=['message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','Cdr,\x20%s,\x20%s','Cdr,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x403c8d,_0x5e3825){var _0x4ca60d=function(_0x9326c1){while(--_0x9326c1){_0x403c8d['push'](_0x403c8d['shift']());}};_0x4ca60d(++_0x5e3825);}(_0xe436,0x19a));var _0x6e43=function(_0x43e8d2,_0x3c46d1){_0x43e8d2=_0x43e8d2-0x0;var _0x36b528=_0xe436[_0x43e8d2];return _0x36b528;};'use strict';var _=require(_0x6e43('0x0'));var util=require(_0x6e43('0x1'));var moment=require(_0x6e43('0x2'));var BPromise=require(_0x6e43('0x3'));var rs=require(_0x6e43('0x4'));var fs=require('fs');var Redis=require(_0x6e43('0x5'));var db=require(_0x6e43('0x6'))['db'];var utils=require(_0x6e43('0x7'));var logger=require(_0x6e43('0x8'))('rpc');var config=require(_0x6e43('0x9'));var jayson=require(_0x6e43('0xa'));var client=jayson[_0x6e43('0xb')][_0x6e43('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x49fa1b,_0x3bb4cf,_0x4ea4e4){return new BPromise(function(_0x5c33b1,_0x891deb){return client[_0x6e43('0xd')](_0x49fa1b,_0x4ea4e4)[_0x6e43('0xe')](function(_0x2a47e9){logger[_0x6e43('0xf')](_0x6e43('0x10'),_0x3bb4cf,'request\x20sent');logger['debug'](_0x6e43('0x11'),_0x3bb4cf,_0x6e43('0x12'),JSON[_0x6e43('0x13')](_0x2a47e9));if(_0x2a47e9[_0x6e43('0x14')]){if(_0x2a47e9['error'][_0x6e43('0x15')]===0x1f4){logger[_0x6e43('0x14')](_0x6e43('0x10'),_0x3bb4cf,_0x2a47e9['error'][_0x6e43('0x16')]);return _0x891deb(_0x2a47e9[_0x6e43('0x14')]['message']);}logger[_0x6e43('0x14')](_0x6e43('0x10'),_0x3bb4cf,_0x2a47e9['error'][_0x6e43('0x16')]);return _0x5c33b1(_0x2a47e9['error']['message']);}else{logger[_0x6e43('0xf')]('Cdr,\x20%s,\x20%s',_0x3bb4cf,_0x6e43('0x12'));_0x5c33b1(_0x2a47e9[_0x6e43('0x17')][_0x6e43('0x16')]);}})['catch'](function(_0x20216f){logger[_0x6e43('0x14')]('Cdr,\x20%s,\x20%s',_0x3bb4cf,_0x20216f);_0x891deb(_0x20216f);});});}
\ No newline at end of file
diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js
index 660fe4d..2772074 100644
--- a/server/api/cdr/index.js
+++ b/server/api/cdr/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb66f=['destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cdr.controller','get','isAuthenticated','/describe','/:id','show','post','put','update','delete'];(function(_0x4edc38,_0x26867e){var _0x182c61=function(_0x39c3ed){while(--_0x39c3ed){_0x4edc38['push'](_0x4edc38['shift']());}};_0x182c61(++_0x26867e);}(_0xb66f,0x13d));var _0xfb66=function(_0x1e58c8,_0x29bf55){_0x1e58c8=_0x1e58c8-0x0;var _0x4cdc58=_0xb66f[_0x1e58c8];return _0x4cdc58;};'use strict';var multer=require(_0xfb66('0x0'));var util=require(_0xfb66('0x1'));var path=require(_0xfb66('0x2'));var timeout=require(_0xfb66('0x3'));var express=require(_0xfb66('0x4'));var router=express[_0xfb66('0x5')]();var auth=require(_0xfb66('0x6'));var interaction=require(_0xfb66('0x7'));var config=require(_0xfb66('0x8'));var controller=require(_0xfb66('0x9'));router[_0xfb66('0xa')]('/',auth[_0xfb66('0xb')](),controller['index']);router[_0xfb66('0xa')](_0xfb66('0xc'),auth[_0xfb66('0xb')](),controller['describe']);router['get'](_0xfb66('0xd'),auth[_0xfb66('0xb')](),controller[_0xfb66('0xe')]);router[_0xfb66('0xf')]('/',auth[_0xfb66('0xb')](),controller['create']);router[_0xfb66('0x10')](_0xfb66('0xd'),auth[_0xfb66('0xb')](),controller[_0xfb66('0x11')]);router[_0xfb66('0x12')](_0xfb66('0xd'),auth[_0xfb66('0xb')](),controller[_0xfb66('0x13')]);module[_0xfb66('0x14')]=router;
\ No newline at end of file
+var _0xcf6d=['get','isAuthenticated','describe','/:id','show','create','put','update','destroy','exports','multer','path','connect-timeout','Router','../../components/interaction/service','./cdr.controller'];(function(_0x3d467b,_0x4e5e63){var _0xcfa39c=function(_0x15118a){while(--_0x15118a){_0x3d467b['push'](_0x3d467b['shift']());}};_0xcfa39c(++_0x4e5e63);}(_0xcf6d,0x16a));var _0xdcf6=function(_0x3e8a31,_0x58a50f){_0x3e8a31=_0x3e8a31-0x0;var _0x4718d8=_0xcf6d[_0x3e8a31];return _0x4718d8;};'use strict';var multer=require(_0xdcf6('0x0'));var util=require('util');var path=require(_0xdcf6('0x1'));var timeout=require(_0xdcf6('0x2'));var express=require('express');var router=express[_0xdcf6('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xdcf6('0x4'));var config=require('../../config/environment');var controller=require(_0xdcf6('0x5'));router[_0xdcf6('0x6')]('/',auth[_0xdcf6('0x7')](),controller['index']);router[_0xdcf6('0x6')]('/describe',auth[_0xdcf6('0x7')](),controller[_0xdcf6('0x8')]);router['get'](_0xdcf6('0x9'),auth[_0xdcf6('0x7')](),controller[_0xdcf6('0xa')]);router['post']('/',auth[_0xdcf6('0x7')](),controller[_0xdcf6('0xb')]);router[_0xdcf6('0xc')]('/:id',auth[_0xdcf6('0x7')](),controller[_0xdcf6('0xd')]);router['delete']('/:id',auth[_0xdcf6('0x7')](),controller[_0xdcf6('0xe')]);module[_0xdcf6('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js
index 1fb2ff6..1333f6e 100644
--- a/server/api/chatApplication/chatApplication.attributes.js
+++ b/server/api/chatApplication/chatApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x60ca=['STRING','sequelize','exports','noop','TEXT'];(function(_0x48ada1,_0x3c1384){var _0x532f9d=function(_0xd2d25e){while(--_0xd2d25e){_0x48ada1['push'](_0x48ada1['shift']());}};_0x532f9d(++_0x3c1384);}(_0x60ca,0x92));var _0xa60c=function(_0x3f6cee,_0x20bfd1){_0x3f6cee=_0x3f6cee-0x0;var _0x857d68=_0x60ca[_0x3f6cee];return _0x857d68;};'use strict';var Sequelize=require(_0xa60c('0x0'));module[_0xa60c('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xa60c('0x2')},'appdata':{'type':Sequelize[_0xa60c('0x3')]()},'description':{'type':Sequelize[_0xa60c('0x4')]},'interval':{'type':Sequelize[_0xa60c('0x4')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
+var _0x326b=['noop','TEXT','sequelize','exports','INTEGER','STRING'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x326b,0x1dc));var _0xb326=function(_0x4f431d,_0xd51a3b){_0x4f431d=_0x4f431d-0x0;var _0x4f31e1=_0x326b[_0x4f431d];return _0x4f31e1;};'use strict';var Sequelize=require(_0xb326('0x0'));module[_0xb326('0x1')]={'priority':{'type':Sequelize[_0xb326('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xb326('0x3')],'allowNull':![],'defaultValue':_0xb326('0x4')},'appdata':{'type':Sequelize[_0xb326('0x5')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xb326('0x3')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js
index 681657f..b377c15 100644
--- a/server/api/chatApplication/chatApplication.controller.js
+++ b/server/api/chatApplication/chatApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x24b9=['../../mysqldb','sendStatus','status','end','json','offset','apply','update','then','destroy','stack','name','send','show','params','model','keys','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','include','merge','options','ChatApplication','body','find','catch','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','lodash','crypto','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x2542d1,_0xdb7645){var _0xec2ce7=function(_0x27c486){while(--_0x27c486){_0x2542d1['push'](_0x2542d1['shift']());}};_0xec2ce7(++_0xdb7645);}(_0x24b9,0xf8));var _0x924b=function(_0x2d33ba,_0x3fb323){_0x2d33ba=_0x2d33ba-0x0;var _0x518460=_0x24b9[_0x2d33ba];return _0x518460;};'use strict';var pdf=require(_0x924b('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x924b('0x1'));var zipdir=require(_0x924b('0x2'));var jsonpatch=require(_0x924b('0x3'));var rp=require(_0x924b('0x4'));var moment=require(_0x924b('0x5'));var BPromise=require(_0x924b('0x6'));var Mustache=require(_0x924b('0x7'));var util=require(_0x924b('0x8'));var path=require(_0x924b('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x924b('0xa'));var squel=require('squel');var crypto=require(_0x924b('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x924b('0xc'));var toCsv=require(_0x924b('0xd'));var querystring=require('querystring');var Papa=require(_0x924b('0xe'));var Redis=require(_0x924b('0xf'));var authService=require(_0x924b('0x10'));var qs=require(_0x924b('0x11'));var hardwareService=require(_0x924b('0x12'));var logger=require(_0x924b('0x13'))(_0x924b('0x14'));var utils=require(_0x924b('0x15'));var config=require('../../config/environment');var db=require(_0x924b('0x16'))['db'];function respondWithStatusCode(_0x35d58d,_0x196090){_0x196090=_0x196090||0xcc;return function(_0x3afb0e){if(_0x3afb0e){return _0x35d58d[_0x924b('0x17')](_0x196090);}return _0x35d58d[_0x924b('0x18')](_0x196090)[_0x924b('0x19')]();};}function respondWithResult(_0x56369d,_0x166a00){_0x166a00=_0x166a00||0xc8;return function(_0x376549){if(_0x376549){return _0x56369d[_0x924b('0x18')](_0x166a00)[_0x924b('0x1a')](_0x376549);}};}function respondWithFilteredResult(_0xb3d23b,_0x5d0fec){return function(_0xd9ebdf){if(_0xd9ebdf){var _0x21501b=_0xd9ebdf['count'],_0x4666f0=_0x5d0fec['offset'],_0x1923a2=_0x5d0fec[_0x924b('0x1b')]+_0x5d0fec['limit'],_0x16a1ee;if(_0x1923a2>=_0x21501b){_0x1923a2=_0x21501b;_0x16a1ee=0xc8;}else{_0x16a1ee=0xce;}_0xb3d23b[_0x924b('0x18')](_0x16a1ee);return _0xb3d23b['set']('Content-Range',_0x4666f0+'-'+_0x1923a2+'/'+_0x21501b)[_0x924b('0x1a')](_0xd9ebdf);}return null;};}function patchUpdates(_0x4bda9d){return function(_0x170234){try{jsonpatch[_0x924b('0x1c')](_0x170234,_0x4bda9d,!![]);}catch(_0x39bd37){return BPromise['reject'](_0x39bd37);}return _0x170234['save']();};}function saveUpdates(_0x662006,_0xae6e6){return function(_0x5a828a){if(_0x5a828a){return _0x5a828a[_0x924b('0x1d')](_0x662006)[_0x924b('0x1e')](function(_0x3d9673){return _0x3d9673;});}return null;};}function removeEntity(_0x5ad4b9,_0x3c3d97){return function(_0x74c668){if(_0x74c668){return _0x74c668[_0x924b('0x1f')]()[_0x924b('0x1e')](function(){_0x5ad4b9[_0x924b('0x18')](0xcc)[_0x924b('0x19')]();});}};}function handleEntityNotFound(_0xb4df51,_0x2cd6ce){return function(_0x4370fd){if(!_0x4370fd){_0xb4df51['sendStatus'](0x194);}return _0x4370fd;};}function handleError(_0x307ff6,_0x3cd321){_0x3cd321=_0x3cd321||0x1f4;return function(_0xcd3df5){logger['error'](_0xcd3df5[_0x924b('0x20')]);if(_0xcd3df5[_0x924b('0x21')]){delete _0xcd3df5[_0x924b('0x21')];}_0x307ff6['status'](_0x3cd321)[_0x924b('0x22')](_0xcd3df5);};}exports[_0x924b('0x23')]=function(_0x46a6a4,_0x25762e){var _0x2a8ff0={'raw':!![],'where':{'id':_0x46a6a4[_0x924b('0x24')]['id']}},_0x3c6c65={};_0x3c6c65[_0x924b('0x25')]=_[_0x924b('0x26')](db['ChatApplication'][_0x924b('0x27')]);_0x3c6c65[_0x924b('0x28')]=_[_0x924b('0x26')](_0x46a6a4[_0x924b('0x28')]);_0x3c6c65[_0x924b('0x29')]=_[_0x924b('0x2a')](_0x3c6c65['model'],_0x3c6c65[_0x924b('0x28')]);_0x2a8ff0[_0x924b('0x2b')]=_['intersection'](_0x3c6c65[_0x924b('0x25')],qs[_0x924b('0x2c')](_0x46a6a4[_0x924b('0x28')]['fields']));_0x2a8ff0[_0x924b('0x2b')]=_0x2a8ff0['attributes'][_0x924b('0x2d')]?_0x2a8ff0[_0x924b('0x2b')]:_0x3c6c65[_0x924b('0x25')];if(_0x46a6a4['query'][_0x924b('0x2e')]){_0x2a8ff0[_0x924b('0x2f')]=[{'all':!![]}];}_0x2a8ff0=_[_0x924b('0x30')]({},_0x2a8ff0,_0x46a6a4[_0x924b('0x31')]);return db[_0x924b('0x32')]['find'](_0x2a8ff0)[_0x924b('0x1e')](handleEntityNotFound(_0x25762e,null))['then'](respondWithResult(_0x25762e,null))['catch'](handleError(_0x25762e,null));};exports['update']=function(_0x4769fc,_0x45977a){if(_0x4769fc['body']['id']){delete _0x4769fc[_0x924b('0x33')]['id'];}return db['ChatApplication'][_0x924b('0x34')]({'where':{'id':_0x4769fc[_0x924b('0x24')]['id']}})[_0x924b('0x1e')](handleEntityNotFound(_0x45977a,null))[_0x924b('0x1e')](saveUpdates(_0x4769fc[_0x924b('0x33')],null))[_0x924b('0x1e')](respondWithResult(_0x45977a,null))[_0x924b('0x35')](handleError(_0x45977a,null));};exports[_0x924b('0x1f')]=function(_0x49039f,_0x4561e0){return db[_0x924b('0x32')]['find']({'where':{'id':_0x49039f[_0x924b('0x24')]['id']}})[_0x924b('0x1e')](handleEntityNotFound(_0x4561e0,null))[_0x924b('0x1e')](removeEntity(_0x4561e0,null))[_0x924b('0x35')](handleError(_0x4561e0,null));};
\ No newline at end of file
+var _0x5508=['keys','ChatApplication','rawAttributes','query','intersection','attributes','fields','length','includeAll','include','merge','options','find','body','catch','destroy','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','save','then','end','error','stack','name','send','show','params','model'];(function(_0x136e11,_0x29bd0b){var _0x36d346=function(_0x44cd38){while(--_0x44cd38){_0x136e11['push'](_0x136e11['shift']());}};_0x36d346(++_0x29bd0b);}(_0x5508,0xc1));var _0x8550=function(_0x3d940c,_0x212276){_0x3d940c=_0x3d940c-0x0;var _0x9028c3=_0x5508[_0x3d940c];return _0x9028c3;};'use strict';var pdf=require(_0x8550('0x0'));var emlformat=require(_0x8550('0x1'));var rimraf=require(_0x8550('0x2'));var zipdir=require(_0x8550('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8550('0x4'));var moment=require(_0x8550('0x5'));var BPromise=require(_0x8550('0x6'));var Mustache=require(_0x8550('0x7'));var util=require(_0x8550('0x8'));var path=require(_0x8550('0x9'));var sox=require('sox');var csv=require(_0x8550('0xa'));var ejs=require(_0x8550('0xb'));var fs=require('fs');var _=require(_0x8550('0xc'));var squel=require(_0x8550('0xd'));var crypto=require(_0x8550('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x8550('0xf'));var toCsv=require(_0x8550('0xa'));var querystring=require('querystring');var Papa=require(_0x8550('0x10'));var Redis=require(_0x8550('0x11'));var authService=require(_0x8550('0x12'));var qs=require(_0x8550('0x13'));var hardwareService=require(_0x8550('0x14'));var logger=require(_0x8550('0x15'))(_0x8550('0x16'));var utils=require('../../config/utils');var config=require(_0x8550('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3536a2,_0x28780e){_0x28780e=_0x28780e||0xcc;return function(_0x532a55){if(_0x532a55){return _0x3536a2[_0x8550('0x18')](_0x28780e);}return _0x3536a2[_0x8550('0x19')](_0x28780e)['end']();};}function respondWithResult(_0x1ac397,_0x271a73){_0x271a73=_0x271a73||0xc8;return function(_0x47cf89){if(_0x47cf89){return _0x1ac397[_0x8550('0x19')](_0x271a73)[_0x8550('0x1a')](_0x47cf89);}};}function respondWithFilteredResult(_0x5541bd,_0x433fe7){return function(_0x4f8390){if(_0x4f8390){var _0x6744c9=_0x4f8390[_0x8550('0x1b')],_0x36e4b7=_0x433fe7[_0x8550('0x1c')],_0x4c796d=_0x433fe7[_0x8550('0x1c')]+_0x433fe7[_0x8550('0x1d')],_0x11c37c;if(_0x4c796d>=_0x6744c9){_0x4c796d=_0x6744c9;_0x11c37c=0xc8;}else{_0x11c37c=0xce;}_0x5541bd[_0x8550('0x19')](_0x11c37c);return _0x5541bd[_0x8550('0x1e')](_0x8550('0x1f'),_0x36e4b7+'-'+_0x4c796d+'/'+_0x6744c9)[_0x8550('0x1a')](_0x4f8390);}return null;};}function patchUpdates(_0xaef8fb){return function(_0x24f30d){try{jsonpatch[_0x8550('0x20')](_0x24f30d,_0xaef8fb,!![]);}catch(_0x2e415b){return BPromise['reject'](_0x2e415b);}return _0x24f30d[_0x8550('0x21')]();};}function saveUpdates(_0x2cec20,_0x306378){return function(_0xcb36fb){if(_0xcb36fb){return _0xcb36fb['update'](_0x2cec20)[_0x8550('0x22')](function(_0x1c0208){return _0x1c0208;});}return null;};}function removeEntity(_0x5cdb47,_0x5c3621){return function(_0x51f462){if(_0x51f462){return _0x51f462['destroy']()[_0x8550('0x22')](function(){_0x5cdb47[_0x8550('0x19')](0xcc)[_0x8550('0x23')]();});}};}function handleEntityNotFound(_0x4d244c,_0x5f0dec){return function(_0x321291){if(!_0x321291){_0x4d244c[_0x8550('0x18')](0x194);}return _0x321291;};}function handleError(_0x567329,_0x568aae){_0x568aae=_0x568aae||0x1f4;return function(_0x2a9a3e){logger[_0x8550('0x24')](_0x2a9a3e[_0x8550('0x25')]);if(_0x2a9a3e[_0x8550('0x26')]){delete _0x2a9a3e['name'];}_0x567329[_0x8550('0x19')](_0x568aae)[_0x8550('0x27')](_0x2a9a3e);};}exports[_0x8550('0x28')]=function(_0x2342b5,_0x5c347a){var _0x50fb69={'raw':!![],'where':{'id':_0x2342b5[_0x8550('0x29')]['id']}},_0x22d648={};_0x22d648[_0x8550('0x2a')]=_[_0x8550('0x2b')](db[_0x8550('0x2c')][_0x8550('0x2d')]);_0x22d648['query']=_['keys'](_0x2342b5[_0x8550('0x2e')]);_0x22d648['filters']=_[_0x8550('0x2f')](_0x22d648[_0x8550('0x2a')],_0x22d648[_0x8550('0x2e')]);_0x50fb69[_0x8550('0x30')]=_[_0x8550('0x2f')](_0x22d648[_0x8550('0x2a')],qs[_0x8550('0x31')](_0x2342b5[_0x8550('0x2e')][_0x8550('0x31')]));_0x50fb69[_0x8550('0x30')]=_0x50fb69[_0x8550('0x30')][_0x8550('0x32')]?_0x50fb69['attributes']:_0x22d648[_0x8550('0x2a')];if(_0x2342b5[_0x8550('0x2e')][_0x8550('0x33')]){_0x50fb69[_0x8550('0x34')]=[{'all':!![]}];}_0x50fb69=_[_0x8550('0x35')]({},_0x50fb69,_0x2342b5[_0x8550('0x36')]);return db[_0x8550('0x2c')][_0x8550('0x37')](_0x50fb69)[_0x8550('0x22')](handleEntityNotFound(_0x5c347a,null))[_0x8550('0x22')](respondWithResult(_0x5c347a,null))['catch'](handleError(_0x5c347a,null));};exports['update']=function(_0x2bbcd2,_0x53f5cb){if(_0x2bbcd2[_0x8550('0x38')]['id']){delete _0x2bbcd2['body']['id'];}return db[_0x8550('0x2c')][_0x8550('0x37')]({'where':{'id':_0x2bbcd2[_0x8550('0x29')]['id']}})[_0x8550('0x22')](handleEntityNotFound(_0x53f5cb,null))['then'](saveUpdates(_0x2bbcd2['body'],null))[_0x8550('0x22')](respondWithResult(_0x53f5cb,null))[_0x8550('0x39')](handleError(_0x53f5cb,null));};exports[_0x8550('0x3a')]=function(_0x18a801,_0x246aca){return db[_0x8550('0x2c')][_0x8550('0x37')]({'where':{'id':_0x18a801['params']['id']}})['then'](handleEntityNotFound(_0x246aca,null))[_0x8550('0x22')](removeEntity(_0x246aca,null))['catch'](handleError(_0x246aca,null));};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js
index 98e928a..c56deff 100644
--- a/server/api/chatApplication/chatApplication.model.js
+++ b/server/api/chatApplication/chatApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0fd2=['chat_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','request-promise','path','./chatApplication.attributes','define','ChatApplication'];(function(_0x337d93,_0x7908a5){var _0x52a98b=function(_0x1d03d5){while(--_0x1d03d5){_0x337d93['push'](_0x337d93['shift']());}};_0x52a98b(++_0x7908a5);}(_0x0fd2,0x163));var _0x20fd=function(_0x44e3f3,_0x44baa6){_0x44e3f3=_0x44e3f3-0x0;var _0x2dc48f=_0x0fd2[_0x44e3f3];return _0x2dc48f;};'use strict';var _=require(_0x20fd('0x0'));var util=require(_0x20fd('0x1'));var logger=require(_0x20fd('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x20fd('0x3'));var fs=require('fs');var path=require(_0x20fd('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x20fd('0x5'));module['exports']=function(_0x563b45,_0xc5b5ee){return _0x563b45[_0x20fd('0x6')](_0x20fd('0x7'),attributes,{'tableName':_0x20fd('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x20fd('0x9'),'collate':_0x20fd('0xa')});};
\ No newline at end of file
+var _0x13c7=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatApplication.attributes','exports','define','ChatApplication','utf8mb4','utf8mb4_unicode_ci','util'];(function(_0x60b2c7,_0x3e87e4){var _0x7af44a=function(_0x140d1c){while(--_0x140d1c){_0x60b2c7['push'](_0x60b2c7['shift']());}};_0x7af44a(++_0x3e87e4);}(_0x13c7,0x133));var _0x713c=function(_0x4ea4de,_0x59dfb6){_0x4ea4de=_0x4ea4de-0x0;var _0x43e4d3=_0x13c7[_0x4ea4de];return _0x43e4d3;};'use strict';var _=require('lodash');var util=require(_0x713c('0x0'));var logger=require('../../config/logger')(_0x713c('0x1'));var moment=require(_0x713c('0x2'));var BPromise=require(_0x713c('0x3'));var rp=require(_0x713c('0x4'));var fs=require('fs');var path=require(_0x713c('0x5'));var rimraf=require(_0x713c('0x6'));var config=require(_0x713c('0x7'));var attributes=require(_0x713c('0x8'));module[_0x713c('0x9')]=function(_0xf2b637,_0x36631b){return _0xf2b637[_0x713c('0xa')](_0x713c('0xb'),attributes,{'tableName':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x713c('0xc'),'collate':_0x713c('0xd')});};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js
index 85996b6..9213355 100644
--- a/server/api/chatApplication/chatApplication.rpc.js
+++ b/server/api/chatApplication/chatApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1227=['request\x20sent','stringify','error','code','message','info','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','ChatApplication,\x20%s,\x20%s','debug','ChatApplication,\x20%s,\x20%s,\x20%s'];(function(_0x278458,_0xffc795){var _0x17ed7a=function(_0x36ab4f){while(--_0x36ab4f){_0x278458['push'](_0x278458['shift']());}};_0x17ed7a(++_0xffc795);}(_0x1227,0x98));var _0x7122=function(_0x38d7a1,_0x3f536e){_0x38d7a1=_0x38d7a1-0x0;var _0x2e5671=_0x1227[_0x38d7a1];return _0x2e5671;};'use strict';var _=require('lodash');var util=require(_0x7122('0x0'));var moment=require(_0x7122('0x1'));var BPromise=require(_0x7122('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7122('0x3'));var db=require(_0x7122('0x4'))['db'];var utils=require(_0x7122('0x5'));var logger=require(_0x7122('0x6'))(_0x7122('0x7'));var config=require(_0x7122('0x8'));var jayson=require(_0x7122('0x9'));var client=jayson['client'][_0x7122('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x23522c,_0x8d73e6,_0x59db96){return new BPromise(function(_0x4d5bc7,_0x1acf00){return client[_0x7122('0xb')](_0x23522c,_0x59db96)[_0x7122('0xc')](function(_0x1f17f9){logger['info'](_0x7122('0xd'),_0x8d73e6,'request\x20sent');logger[_0x7122('0xe')](_0x7122('0xf'),_0x8d73e6,_0x7122('0x10'),JSON[_0x7122('0x11')](_0x1f17f9));if(_0x1f17f9['error']){if(_0x1f17f9[_0x7122('0x12')][_0x7122('0x13')]===0x1f4){logger[_0x7122('0x12')](_0x7122('0xd'),_0x8d73e6,_0x1f17f9[_0x7122('0x12')]['message']);return _0x1acf00(_0x1f17f9['error']['message']);}logger[_0x7122('0x12')](_0x7122('0xd'),_0x8d73e6,_0x1f17f9[_0x7122('0x12')]['message']);return _0x4d5bc7(_0x1f17f9[_0x7122('0x12')][_0x7122('0x14')]);}else{logger[_0x7122('0x15')](_0x7122('0xd'),_0x8d73e6,'request\x20sent');_0x4d5bc7(_0x1f17f9[_0x7122('0x16')][_0x7122('0x14')]);}})[_0x7122('0x17')](function(_0x6f1275){logger['error']('ChatApplication,\x20%s,\x20%s',_0x8d73e6,_0x6f1275);_0x1acf00(_0x6f1275);});});}
\ No newline at end of file
+var _0x24d1=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','ChatApplication,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring'];(function(_0xdf04c1,_0x272bfc){var _0x58efd9=function(_0x13b128){while(--_0x13b128){_0xdf04c1['push'](_0xdf04c1['shift']());}};_0x58efd9(++_0x272bfc);}(_0x24d1,0x13e));var _0x124d=function(_0x3205a9,_0x112ed7){_0x3205a9=_0x3205a9-0x0;var _0x28eeef=_0x24d1[_0x3205a9];return _0x28eeef;};'use strict';var _=require(_0x124d('0x0'));var util=require(_0x124d('0x1'));var moment=require(_0x124d('0x2'));var BPromise=require('bluebird');var rs=require(_0x124d('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x124d('0x4'))['db'];var utils=require(_0x124d('0x5'));var logger=require(_0x124d('0x6'))(_0x124d('0x7'));var config=require(_0x124d('0x8'));var jayson=require(_0x124d('0x9'));var client=jayson[_0x124d('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xb60c6b,_0x5b6322,_0x5e0e01){return new BPromise(function(_0x5d1600,_0x10426c){return client[_0x124d('0xb')](_0xb60c6b,_0x5e0e01)[_0x124d('0xc')](function(_0x124f9f){logger[_0x124d('0xd')]('ChatApplication,\x20%s,\x20%s',_0x5b6322,_0x124d('0xe'));logger[_0x124d('0xf')](_0x124d('0x10'),_0x5b6322,_0x124d('0xe'),JSON[_0x124d('0x11')](_0x124f9f));if(_0x124f9f[_0x124d('0x12')]){if(_0x124f9f[_0x124d('0x12')]['code']===0x1f4){logger[_0x124d('0x12')](_0x124d('0x13'),_0x5b6322,_0x124f9f[_0x124d('0x12')][_0x124d('0x14')]);return _0x10426c(_0x124f9f[_0x124d('0x12')][_0x124d('0x14')]);}logger[_0x124d('0x12')](_0x124d('0x13'),_0x5b6322,_0x124f9f['error'][_0x124d('0x14')]);return _0x5d1600(_0x124f9f[_0x124d('0x12')]['message']);}else{logger['info']('ChatApplication,\x20%s,\x20%s',_0x5b6322,'request\x20sent');_0x5d1600(_0x124f9f[_0x124d('0x15')][_0x124d('0x14')]);}})[_0x124d('0x16')](function(_0x4800b8){logger[_0x124d('0x12')](_0x124d('0x13'),_0x5b6322,_0x4800b8);_0x10426c(_0x4800b8);});});}
\ No newline at end of file
diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js
index dffffb7..7a5b460 100644
--- a/server/api/chatApplication/index.js
+++ b/server/api/chatApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbb9e=['../../components/auth/service','../../components/interaction/service','show','put','isAuthenticated','update','destroy','multer','util','path','connect-timeout','express','Router'];(function(_0x4c5f59,_0x57ee79){var _0x2f8f8d=function(_0x3fe344){while(--_0x3fe344){_0x4c5f59['push'](_0x4c5f59['shift']());}};_0x2f8f8d(++_0x57ee79);}(_0xbb9e,0xe4));var _0xebb9=function(_0x57c20d,_0x53ebd5){_0x57c20d=_0x57c20d-0x0;var _0x505907=_0xbb9e[_0x57c20d];return _0x505907;};'use strict';var multer=require(_0xebb9('0x0'));var util=require(_0xebb9('0x1'));var path=require(_0xebb9('0x2'));var timeout=require(_0xebb9('0x3'));var express=require(_0xebb9('0x4'));var router=express[_0xebb9('0x5')]();var auth=require(_0xebb9('0x6'));var interaction=require(_0xebb9('0x7'));var config=require('../../config/environment');var controller=require('./chatApplication.controller');router['get']('/:id',auth['isAuthenticated'](),controller[_0xebb9('0x8')]);router[_0xebb9('0x9')]('/:id',auth[_0xebb9('0xa')](),controller[_0xebb9('0xb')]);router['delete']('/:id',auth[_0xebb9('0xa')](),controller[_0xebb9('0xc')]);module['exports']=router;
\ No newline at end of file
+var _0xa6ea=['./chatApplication.controller','get','/:id','isAuthenticated','show','update','delete','destroy','multer','util','path','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x26ed7e,_0x1dc49e){var _0x283907=function(_0xf85e81){while(--_0xf85e81){_0x26ed7e['push'](_0x26ed7e['shift']());}};_0x283907(++_0x1dc49e);}(_0xa6ea,0x1ba));var _0xaa6e=function(_0x267468,_0x598eab){_0x267468=_0x267468-0x0;var _0x32d61f=_0xa6ea[_0x267468];return _0x32d61f;};'use strict';var multer=require(_0xaa6e('0x0'));var util=require(_0xaa6e('0x1'));var path=require(_0xaa6e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xaa6e('0x3')]();var auth=require(_0xaa6e('0x4'));var interaction=require(_0xaa6e('0x5'));var config=require('../../config/environment');var controller=require(_0xaa6e('0x6'));router[_0xaa6e('0x7')](_0xaa6e('0x8'),auth[_0xaa6e('0x9')](),controller[_0xaa6e('0xa')]);router['put'](_0xaa6e('0x8'),auth[_0xaa6e('0x9')](),controller[_0xaa6e('0xb')]);router[_0xaa6e('0xc')](_0xaa6e('0x8'),auth['isAuthenticated'](),controller[_0xaa6e('0xd')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js
index 543974d..d89aa06 100644
--- a/server/api/chatGroup/chatGroup.attributes.js
+++ b/server/api/chatGroup/chatGroup.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1267=['sequelize','STRING','BOOLEAN'];(function(_0x286663,_0x2f1372){var _0x501b34=function(_0x2cdc4b){while(--_0x2cdc4b){_0x286663['push'](_0x286663['shift']());}};_0x501b34(++_0x2f1372);}(_0x1267,0x1ce));var _0x7126=function(_0x41135c,_0x216126){_0x41135c=_0x41135c-0x0;var _0x4886ca=_0x1267[_0x41135c];return _0x4886ca;};'use strict';var Sequelize=require(_0x7126('0x0'));module['exports']={'name':{'type':Sequelize[_0x7126('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x7126('0x1')]},'write':{'type':Sequelize[_0x7126('0x2')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x5c11=['sequelize','exports','STRING','BOOLEAN'];(function(_0x168654,_0x314d68){var _0x4afda8=function(_0x37c94c){while(--_0x37c94c){_0x168654['push'](_0x168654['shift']());}};_0x4afda8(++_0x314d68);}(_0x5c11,0x1b8));var _0x15c1=function(_0x4fb789,_0x6b8092){_0x4fb789=_0x4fb789-0x0;var _0x49b5e4=_0x5c11[_0x4fb789];return _0x49b5e4;};'use strict';var Sequelize=require(_0x15c1('0x0'));module[_0x15c1('0x1')]={'name':{'type':Sequelize[_0x15c1('0x2')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'write':{'type':Sequelize[_0x15c1('0x3')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js
index 28e6a5b..a32d3e9 100644
--- a/server/api/chatGroup/chatGroup.controller.js
+++ b/server/api/chatGroup/chatGroup.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfcb4=['fields','length','nolimit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','include','show','options','find','create','body','params','describe','ChatInternalMessage','user','toInteger','addMembers','ids','omit','getMembers','User','hasOwnProperty','removeMembers','addMessage','ChatGroupId','getMessages','findOne','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','register','request','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','name','index','ChatGroup','rawAttributes','model','keys','query','filters','intersection','attributes'];(function(_0x1e3c16,_0x372caa){var _0x47a0c9=function(_0x47f81d){while(--_0x47f81d){_0x1e3c16['push'](_0x1e3c16['shift']());}};_0x47a0c9(++_0x372caa);}(_0xfcb4,0x1cc));var _0x4fcb=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xfcb4[_0x501510];return _0x1e6ee5;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x4fcb('0x0'));var rimraf=require(_0x4fcb('0x1'));var zipdir=require(_0x4fcb('0x2'));var jsonpatch=require(_0x4fcb('0x3'));var rp=require(_0x4fcb('0x4'));var moment=require(_0x4fcb('0x5'));var BPromise=require(_0x4fcb('0x6'));var Mustache=require(_0x4fcb('0x7'));var util=require('util');var path=require(_0x4fcb('0x8'));var sox=require(_0x4fcb('0x9'));var csv=require('to-csv');var ejs=require(_0x4fcb('0xa'));var fs=require('fs');var _=require(_0x4fcb('0xb'));var squel=require(_0x4fcb('0xc'));var crypto=require(_0x4fcb('0xd'));var jsforce=require(_0x4fcb('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x4fcb('0xf'));var Papa=require(_0x4fcb('0x10'));var Redis=require(_0x4fcb('0x11'));var authService=require(_0x4fcb('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x4fcb('0x13'));var logger=require('../../config/logger')(_0x4fcb('0x14'));var utils=require(_0x4fcb('0x15'));var config=require(_0x4fcb('0x16'));var db=require(_0x4fcb('0x17'))['db'];config[_0x4fcb('0x18')]=_[_0x4fcb('0x19')](config[_0x4fcb('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x4fcb('0x1a'))(new Redis(config['redis']));require('./chatGroup.socket')[_0x4fcb('0x1b')](socket);var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0x25812f,_0x575ab2,_0x55afad){if(_0x55afad){var _0x3cebc6=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3cebc6['test'](_0x575ab2)){return _0x25812f;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x25812f;}}function respondWithRpcPromise(_0x26d492,_0x175a23,_0x3669c5,_0x345675){return new BPromise(function(_0x28f857,_0x23f2f9){var _0x5a77b8=_0x345675||client;return _0x5a77b8[_0x4fcb('0x1c')](_0x26d492,_0x3669c5)['then'](function(_0x519b49){logger[_0x4fcb('0x1d')](_0x4fcb('0x1e'),_0x175a23,_0x4fcb('0x1f'));logger[_0x4fcb('0x20')](_0x4fcb('0x21'),_0x175a23,_0x4fcb('0x1f'),JSON[_0x4fcb('0x22')](_0x519b49));if(_0x519b49['error']){if(_0x519b49[_0x4fcb('0x23')][_0x4fcb('0x24')]===0x1f4){logger['error'](_0x4fcb('0x1e'),_0x175a23,_0x519b49[_0x4fcb('0x23')][_0x4fcb('0x25')]);return _0x23f2f9(_0x519b49[_0x4fcb('0x23')][_0x4fcb('0x25')]);}logger[_0x4fcb('0x23')](_0x4fcb('0x1e'),_0x175a23,_0x519b49['error'][_0x4fcb('0x25')]);return _0x28f857(_0x519b49[_0x4fcb('0x23')][_0x4fcb('0x25')]);}else{logger[_0x4fcb('0x1d')](_0x4fcb('0x1e'),_0x175a23,_0x4fcb('0x1f'));_0x28f857(_0x519b49[_0x4fcb('0x26')]['message']);}})[_0x4fcb('0x27')](function(_0x7a1926){logger['error'](_0x4fcb('0x1e'),_0x175a23,_0x7a1926);_0x23f2f9(_0x7a1926);});});}function respondWithStatusCode(_0x59ae83,_0x298143){_0x298143=_0x298143||0xcc;return function(_0x1f7661){if(_0x1f7661){return _0x59ae83['sendStatus'](_0x298143);}return _0x59ae83[_0x4fcb('0x28')](_0x298143)[_0x4fcb('0x29')]();};}function respondWithResult(_0x2bd808,_0x5eae69){_0x5eae69=_0x5eae69||0xc8;return function(_0x24fe82){if(_0x24fe82){return _0x2bd808[_0x4fcb('0x28')](_0x5eae69)[_0x4fcb('0x2a')](_0x24fe82);}};}function respondWithFilteredResult(_0x4681b5,_0x1c7056){return function(_0x227cf2){if(_0x227cf2){var _0x396960=_0x227cf2[_0x4fcb('0x2b')],_0x4aa46e=_0x1c7056[_0x4fcb('0x2c')],_0x3f7b7b=_0x1c7056[_0x4fcb('0x2c')]+_0x1c7056[_0x4fcb('0x2d')],_0x1599b6;if(_0x3f7b7b>=_0x396960){_0x3f7b7b=_0x396960;_0x1599b6=0xc8;}else{_0x1599b6=0xce;}_0x4681b5[_0x4fcb('0x28')](_0x1599b6);return _0x4681b5[_0x4fcb('0x2e')](_0x4fcb('0x2f'),_0x4aa46e+'-'+_0x3f7b7b+'/'+_0x396960)['json'](_0x227cf2);}return null;};}function patchUpdates(_0x8b7496){return function(_0xf634a3){try{jsonpatch[_0x4fcb('0x30')](_0xf634a3,_0x8b7496,!![]);}catch(_0x2a2d8e){return BPromise[_0x4fcb('0x31')](_0x2a2d8e);}return _0xf634a3[_0x4fcb('0x32')]();};}function saveUpdates(_0x503183,_0x3e1c55){return function(_0x494d92){if(_0x494d92){return _0x494d92[_0x4fcb('0x33')](_0x503183)[_0x4fcb('0x34')](function(_0x577591){return _0x577591;});}return null;};}function removeEntity(_0x4c3f67,_0x2dccc2){return function(_0xfb3672){if(_0xfb3672){return _0xfb3672[_0x4fcb('0x35')]()[_0x4fcb('0x34')](function(){_0x4c3f67[_0x4fcb('0x28')](0xcc)[_0x4fcb('0x29')]();});}};}function handleEntityNotFound(_0x182ff6,_0xcddfa7){return function(_0x3cd195){if(!_0x3cd195){_0x182ff6[_0x4fcb('0x36')](0x194);}return _0x3cd195;};}function handleError(_0x42f090,_0x340ae7){_0x340ae7=_0x340ae7||0x1f4;return function(_0x5b2804){logger['error'](_0x5b2804['stack']);if(_0x5b2804[_0x4fcb('0x37')]){delete _0x5b2804['name'];}_0x42f090[_0x4fcb('0x28')](_0x340ae7)['send'](_0x5b2804);};}exports[_0x4fcb('0x38')]=function(_0x28418b,_0x93013d){var _0xd07742={},_0xd3b421={},_0x2bca40={'count':0x0,'rows':[]};var _0x26078d=db[_0x4fcb('0x39')][_0x4fcb('0x3a')];_0xd3b421[_0x4fcb('0x3b')]=_[_0x4fcb('0x3c')](_0x26078d);_0xd3b421[_0x4fcb('0x3d')]=_[_0x4fcb('0x3c')](_0x28418b[_0x4fcb('0x3d')]);_0xd3b421[_0x4fcb('0x3e')]=_[_0x4fcb('0x3f')](_0xd3b421[_0x4fcb('0x3b')],_0xd3b421[_0x4fcb('0x3d')]);_0xd07742[_0x4fcb('0x40')]=_['intersection'](_0xd3b421[_0x4fcb('0x3b')],qs[_0x4fcb('0x41')](_0x28418b[_0x4fcb('0x3d')][_0x4fcb('0x41')]));_0xd07742['attributes']=_0xd07742[_0x4fcb('0x40')][_0x4fcb('0x42')]?_0xd07742[_0x4fcb('0x40')]:_0xd3b421[_0x4fcb('0x3b')];if(!_0x28418b[_0x4fcb('0x3d')]['hasOwnProperty'](_0x4fcb('0x43'))){_0xd07742[_0x4fcb('0x2d')]=qs['limit'](_0x28418b[_0x4fcb('0x3d')][_0x4fcb('0x2d')]);_0xd07742[_0x4fcb('0x2c')]=qs['offset'](_0x28418b[_0x4fcb('0x3d')]['offset']);}_0xd07742[_0x4fcb('0x44')]=qs[_0x4fcb('0x45')](_0x28418b[_0x4fcb('0x3d')]['sort']);_0xd07742[_0x4fcb('0x46')]=qs[_0x4fcb('0x3e')](_[_0x4fcb('0x47')](_0x28418b[_0x4fcb('0x3d')],_0xd3b421['filters']));if(_0x28418b[_0x4fcb('0x3d')][_0x4fcb('0x48')]){_0xd07742[_0x4fcb('0x46')]=_[_0x4fcb('0x49')](_0xd07742[_0x4fcb('0x46')],{'$or':_[_0x4fcb('0x4a')](_0x26078d,function(_0x517b9d){if(_0x517b9d[_0x4fcb('0x4b')][_0x4fcb('0x4c')]!==_0x4fcb('0x4d')){var _0x33dd95={};_0x33dd95[_0x517b9d[_0x4fcb('0x4e')]]={'$like':'%'+_0x28418b[_0x4fcb('0x3d')][_0x4fcb('0x48')]+'%'};return _0x33dd95;}})});}_0xd07742=_[_0x4fcb('0x49')]({},_0xd07742,_0x28418b['options']);var _0x3ba775={'where':_0xd07742[_0x4fcb('0x46')]};return db[_0x4fcb('0x39')][_0x4fcb('0x2b')](_0x3ba775)[_0x4fcb('0x34')](function(_0x1dc95b){_0x2bca40[_0x4fcb('0x2b')]=_0x1dc95b;if(_0x28418b[_0x4fcb('0x3d')]['includeAll']){_0xd07742[_0x4fcb('0x4f')]=[{'all':!![]}];}return db[_0x4fcb('0x39')]['findAll'](_0xd07742);})[_0x4fcb('0x34')](function(_0x5c9895){_0x2bca40['rows']=_0x5c9895;return _0x2bca40;})[_0x4fcb('0x34')](respondWithFilteredResult(_0x93013d,_0xd07742))['catch'](handleError(_0x93013d,null));};exports[_0x4fcb('0x50')]=function(_0x33b97e,_0x349bd8){var _0x351dc4={'raw':!![],'where':{'id':_0x33b97e['params']['id']}},_0x5a2f14={};_0x5a2f14['model']=_[_0x4fcb('0x3c')](db[_0x4fcb('0x39')][_0x4fcb('0x3a')]);_0x5a2f14[_0x4fcb('0x3d')]=_['keys'](_0x33b97e[_0x4fcb('0x3d')]);_0x5a2f14[_0x4fcb('0x3e')]=_[_0x4fcb('0x3f')](_0x5a2f14['model'],_0x5a2f14[_0x4fcb('0x3d')]);_0x351dc4[_0x4fcb('0x40')]=_[_0x4fcb('0x3f')](_0x5a2f14[_0x4fcb('0x3b')],qs[_0x4fcb('0x41')](_0x33b97e[_0x4fcb('0x3d')][_0x4fcb('0x41')]));_0x351dc4[_0x4fcb('0x40')]=_0x351dc4[_0x4fcb('0x40')]['length']?_0x351dc4[_0x4fcb('0x40')]:_0x5a2f14[_0x4fcb('0x3b')];if(_0x33b97e['query']['includeAll']){_0x351dc4['include']=[{'all':!![]}];}_0x351dc4=_['merge']({},_0x351dc4,_0x33b97e[_0x4fcb('0x51')]);return db['ChatGroup'][_0x4fcb('0x52')](_0x351dc4)['then'](handleEntityNotFound(_0x349bd8,null))[_0x4fcb('0x34')](respondWithResult(_0x349bd8,null))[_0x4fcb('0x27')](handleError(_0x349bd8,null));};exports[_0x4fcb('0x53')]=function(_0x7ed20b,_0x3ebe40){return db['ChatGroup'][_0x4fcb('0x53')](_0x7ed20b[_0x4fcb('0x54')],{})[_0x4fcb('0x34')](respondWithResult(_0x3ebe40,0xc9))[_0x4fcb('0x27')](handleError(_0x3ebe40,null));};exports['update']=function(_0x46803a,_0x4d74f8){if(_0x46803a[_0x4fcb('0x54')]['id']){delete _0x46803a['body']['id'];}return db[_0x4fcb('0x39')]['find']({'where':{'id':_0x46803a[_0x4fcb('0x55')]['id']}})[_0x4fcb('0x34')](handleEntityNotFound(_0x4d74f8,null))['then'](saveUpdates(_0x46803a[_0x4fcb('0x54')],null))[_0x4fcb('0x34')](respondWithResult(_0x4d74f8,null))[_0x4fcb('0x27')](handleError(_0x4d74f8,null));};exports[_0x4fcb('0x35')]=function(_0xbeab09,_0x3af5bb){return db['ChatGroup'][_0x4fcb('0x52')]({'where':{'id':_0xbeab09[_0x4fcb('0x55')]['id']}})[_0x4fcb('0x34')](handleEntityNotFound(_0x3af5bb,null))[_0x4fcb('0x34')](removeEntity(_0x3af5bb,null))[_0x4fcb('0x27')](handleError(_0x3af5bb,null));};exports[_0x4fcb('0x56')]=function(_0x52813f,_0x253807){return db[_0x4fcb('0x39')]['describe']()[_0x4fcb('0x34')](respondWithResult(_0x253807,null))[_0x4fcb('0x27')](handleError(_0x253807,null));};exports['getUnread']=function(_0x5bbca1,_0xdbe86a,_0xa4f390){return db[_0x4fcb('0x57')][_0x4fcb('0x2b')]({'where':{'ChatGroupId':_0x5bbca1[_0x4fcb('0x55')]['id'],'ToId':_0x5bbca1[_0x4fcb('0x58')]['id'],'read':![]}})[_0x4fcb('0x34')](function(_0x118163){return{'id':_[_0x4fcb('0x59')](_0x5bbca1[_0x4fcb('0x55')]['id']),'count':_0x118163};})[_0x4fcb('0x34')](respondWithResult(_0xdbe86a,null))[_0x4fcb('0x27')](handleError(_0xdbe86a,null));};exports[_0x4fcb('0x5a')]=function(_0x2f3b5c,_0x10c9fe,_0x24063b){return db['ChatGroup'][_0x4fcb('0x52')]({'where':{'id':_0x2f3b5c['params']['id']}})['then'](handleEntityNotFound(_0x10c9fe,null))[_0x4fcb('0x34')](function(_0x4ab4ea){if(_0x4ab4ea){return _0x4ab4ea[_0x4fcb('0x5a')](_0x2f3b5c['body'][_0x4fcb('0x5b')],_[_0x4fcb('0x5c')](_0x2f3b5c['body'],[_0x4fcb('0x5b'),'id'])||{});}})[_0x4fcb('0x34')](respondWithResult(_0x10c9fe,null))[_0x4fcb('0x27')](handleError(_0x10c9fe,null));};exports[_0x4fcb('0x5d')]=function(_0x514034,_0x3e4101,_0x5de957){var _0x2f1355={};var _0x1845f6={};var _0xddc668;var _0x5ed866;return db[_0x4fcb('0x39')]['findOne']({'where':{'id':_0x514034[_0x4fcb('0x55')]['id']}})[_0x4fcb('0x34')](handleEntityNotFound(_0x3e4101,null))['then'](function(_0x570766){if(_0x570766){_0xddc668=_0x570766;_0x1845f6['model']=_['keys'](db[_0x4fcb('0x5e')][_0x4fcb('0x3a')]);_0x1845f6[_0x4fcb('0x3d')]=_[_0x4fcb('0x3c')](_0x514034['query']);_0x1845f6[_0x4fcb('0x3e')]=_[_0x4fcb('0x3f')](_0x1845f6['model'],_0x1845f6[_0x4fcb('0x3d')]);_0x2f1355[_0x4fcb('0x40')]=_['intersection'](_0x1845f6[_0x4fcb('0x3b')],qs[_0x4fcb('0x41')](_0x514034[_0x4fcb('0x3d')][_0x4fcb('0x41')]));_0x2f1355[_0x4fcb('0x40')]=_0x2f1355[_0x4fcb('0x40')][_0x4fcb('0x42')]?_0x2f1355[_0x4fcb('0x40')]:_0x1845f6[_0x4fcb('0x3b')];_0x2f1355[_0x4fcb('0x44')]=qs[_0x4fcb('0x45')](_0x514034['query'][_0x4fcb('0x45')]);_0x2f1355['where']=qs[_0x4fcb('0x3e')](_[_0x4fcb('0x47')](_0x514034[_0x4fcb('0x3d')],_0x1845f6[_0x4fcb('0x3e')]));if(_0x514034['query']['filter']){_0x2f1355[_0x4fcb('0x46')]=_[_0x4fcb('0x49')](_0x2f1355[_0x4fcb('0x46')],{'$or':_['map'](_0x2f1355[_0x4fcb('0x40')],function(_0x4e1098){var _0x42731e={};_0x42731e[_0x4e1098]={'$like':'%'+_0x514034[_0x4fcb('0x3d')]['filter']+'%'};return _0x42731e;})});}_0x2f1355=_[_0x4fcb('0x49')]({},_0x2f1355,_0x514034[_0x4fcb('0x51')]);return _0xddc668[_0x4fcb('0x5d')](_0x2f1355);}})['then'](function(_0x27bdb9){if(_0x27bdb9){_0x5ed866=_0x27bdb9[_0x4fcb('0x42')];if(!_0x514034[_0x4fcb('0x3d')][_0x4fcb('0x5f')](_0x4fcb('0x43'))){_0x2f1355[_0x4fcb('0x2d')]=qs[_0x4fcb('0x2d')](_0x514034['query'][_0x4fcb('0x2d')]);_0x2f1355[_0x4fcb('0x2c')]=qs[_0x4fcb('0x2c')](_0x514034[_0x4fcb('0x3d')]['offset']);}return _0xddc668[_0x4fcb('0x5d')](_0x2f1355);}})[_0x4fcb('0x34')](function(_0x88dde2){if(_0x88dde2){return _0x88dde2?{'count':_0x5ed866,'rows':_0x88dde2}:null;}})[_0x4fcb('0x34')](respondWithResult(_0x3e4101,null))[_0x4fcb('0x27')](handleError(_0x3e4101,null));};exports[_0x4fcb('0x60')]=function(_0x349b4d,_0x466745,_0x3b13de){return db[_0x4fcb('0x39')][_0x4fcb('0x52')]({'where':{'id':_0x349b4d[_0x4fcb('0x55')]['id']}})[_0x4fcb('0x34')](handleEntityNotFound(_0x466745,null))[_0x4fcb('0x34')](function(_0x255efe){if(_0x255efe){return _0x255efe[_0x4fcb('0x60')](_0x349b4d[_0x4fcb('0x3d')]['ids']);}})[_0x4fcb('0x34')](respondWithStatusCode(_0x466745,null))[_0x4fcb('0x27')](handleError(_0x466745,null));};exports[_0x4fcb('0x61')]=function(_0x19e4ca,_0x123973,_0x1d0660){if(_0x19e4ca['body']['id']){delete _0x19e4ca[_0x4fcb('0x54')]['id'];}return db[_0x4fcb('0x39')][_0x4fcb('0x52')]({'where':{'id':_0x19e4ca[_0x4fcb('0x55')]['id']}})[_0x4fcb('0x34')](handleEntityNotFound(_0x123973,null))[_0x4fcb('0x34')](function(_0x156e22){if(_0x156e22){_0x19e4ca[_0x4fcb('0x54')][_0x4fcb('0x62')]=_0x156e22['id'];return db[_0x4fcb('0x57')][_0x4fcb('0x53')](_0x19e4ca[_0x4fcb('0x54')]);}})[_0x4fcb('0x34')](respondWithResult(_0x123973,null))['catch'](handleError(_0x123973,null));};exports[_0x4fcb('0x63')]=function(_0x1fec32,_0x36019e,_0x26f7c9){var _0x34770a={};var _0x261f3e={};var _0x4a00b0;var _0x32ec82;return db[_0x4fcb('0x39')][_0x4fcb('0x64')]({'where':{'id':_0x1fec32[_0x4fcb('0x55')]['id']}})[_0x4fcb('0x34')](handleEntityNotFound(_0x36019e,null))[_0x4fcb('0x34')](function(_0x31168b){if(_0x31168b){_0x4a00b0=_0x31168b;_0x261f3e[_0x4fcb('0x3b')]=_[_0x4fcb('0x3c')](db[_0x4fcb('0x57')][_0x4fcb('0x3a')]);_0x261f3e[_0x4fcb('0x3d')]=_[_0x4fcb('0x3c')](_0x1fec32[_0x4fcb('0x3d')]);_0x261f3e[_0x4fcb('0x3e')]=_['intersection'](_0x261f3e['model'],_0x261f3e['query']);_0x34770a[_0x4fcb('0x40')]=_['intersection'](_0x261f3e[_0x4fcb('0x3b')],qs['fields'](_0x1fec32[_0x4fcb('0x3d')][_0x4fcb('0x41')]));_0x34770a[_0x4fcb('0x40')]=_0x34770a[_0x4fcb('0x40')][_0x4fcb('0x42')]?_0x34770a[_0x4fcb('0x40')]:_0x261f3e[_0x4fcb('0x3b')];_0x34770a['order']=qs[_0x4fcb('0x45')](_0x1fec32[_0x4fcb('0x3d')]['sort']);_0x34770a['where']=qs[_0x4fcb('0x3e')](_[_0x4fcb('0x47')](_0x1fec32[_0x4fcb('0x3d')],_0x261f3e[_0x4fcb('0x3e')]));if(_0x1fec32[_0x4fcb('0x3d')][_0x4fcb('0x48')]){_0x34770a[_0x4fcb('0x46')]=_[_0x4fcb('0x49')](_0x34770a['where'],{'$or':_[_0x4fcb('0x4a')](_0x34770a[_0x4fcb('0x40')],function(_0x56e70c){var _0xa2ea33={};_0xa2ea33[_0x56e70c]={'$like':'%'+_0x1fec32['query'][_0x4fcb('0x48')]+'%'};return _0xa2ea33;})});}if(_0x1fec32[_0x4fcb('0x3d')][_0x4fcb('0x65')]){var _0x42054f=_0x1fec32['query'][_0x4fcb('0x65')][_0x4fcb('0x66')](',');var _0x509597={};_0x509597[_0x42054f[0x0]]={'$gte':moment(_0x42054f[0x1])[_0x4fcb('0x67')](_0x4fcb('0x68'))};_0x34770a[_0x4fcb('0x46')]=_[_0x4fcb('0x49')](_0x34770a['where'],_0x509597);}_0x34770a=_[_0x4fcb('0x49')]({},_0x34770a,_0x1fec32[_0x4fcb('0x51')]);return _0x4a00b0[_0x4fcb('0x63')](_0x34770a);}})[_0x4fcb('0x34')](function(_0x533e0b){if(_0x533e0b){_0x32ec82=_0x533e0b[_0x4fcb('0x42')];if(!_0x1fec32[_0x4fcb('0x3d')]['hasOwnProperty'](_0x4fcb('0x43'))){_0x34770a[_0x4fcb('0x2d')]=qs[_0x4fcb('0x2d')](_0x1fec32[_0x4fcb('0x3d')][_0x4fcb('0x2d')]);_0x34770a[_0x4fcb('0x2c')]=qs['offset'](_0x1fec32[_0x4fcb('0x3d')]['offset']);}return _0x4a00b0['getMessages'](_0x34770a);}})[_0x4fcb('0x34')](function(_0x96b0dd){if(_0x96b0dd){return _0x96b0dd?{'count':_0x32ec82,'rows':_0x96b0dd}:null;}})[_0x4fcb('0x34')](respondWithResult(_0x36019e,null))[_0x4fcb('0x27')](handleError(_0x36019e,null));};
\ No newline at end of file
+var _0x25fb=['sox','to-csv','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','end','json','count','offset','status','set','Content-Range','reject','save','update','destroy','stack','name','send','index','ChatGroup','rawAttributes','model','query','keys','filters','intersection','attributes','fields','limit','order','sort','where','merge','map','type','key','VIRTUAL','field','filter','options','include','findAll','show','params','length','includeAll','find','create','body','describe','getUnread','ChatInternalMessage','toInteger','addMembers','ids','omit','getMembers','User','hasOwnProperty','nolimit','removeMembers','addMessage','ChatGroupId','getMessages','findOne','pick','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x25fb,0x1b2));var _0xb25f=function(_0x2e492e,_0x16fd2b){_0x2e492e=_0x2e492e-0x0;var _0x287bed=_0x25fb[_0x2e492e];return _0x287bed;};'use strict';var pdf=require(_0xb25f('0x0'));var emlformat=require(_0xb25f('0x1'));var rimraf=require(_0xb25f('0x2'));var zipdir=require(_0xb25f('0x3'));var jsonpatch=require(_0xb25f('0x4'));var rp=require(_0xb25f('0x5'));var moment=require(_0xb25f('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xb25f('0x7'));var util=require(_0xb25f('0x8'));var path=require(_0xb25f('0x9'));var sox=require(_0xb25f('0xa'));var csv=require(_0xb25f('0xb'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xb25f('0xc'));var squel=require(_0xb25f('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb25f('0xe'));var toCsv=require(_0xb25f('0xb'));var querystring=require(_0xb25f('0xf'));var Papa=require(_0xb25f('0x10'));var Redis=require(_0xb25f('0x11'));var authService=require(_0xb25f('0x12'));var qs=require(_0xb25f('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xb25f('0x14'));var utils=require(_0xb25f('0x15'));var config=require(_0xb25f('0x16'));var db=require(_0xb25f('0x17'))['db'];config[_0xb25f('0x18')]=_[_0xb25f('0x19')](config[_0xb25f('0x18')],{'host':_0xb25f('0x1a'),'port':0x18eb});var socket=require(_0xb25f('0x1b'))(new Redis(config[_0xb25f('0x18')]));require('./chatGroup.socket')['register'](socket);var jayson=require(_0xb25f('0x1c'));var client=jayson[_0xb25f('0x1d')]['http']({'port':0x232a});function checkPasswordPattern(_0x593a35,_0x4186cc,_0x73adbb){if(_0x73adbb){var _0x42b57f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x42b57f[_0xb25f('0x1e')](_0x4186cc)){return _0x593a35;}else{throw new Error(_0xb25f('0x1f'));}}else{return _0x593a35;}}function respondWithRpcPromise(_0x1a940f,_0x424f60,_0x584bb,_0x51b801){return new BPromise(function(_0x1be353,_0x5c1720){var _0x550139=_0x51b801||client;return _0x550139[_0xb25f('0x20')](_0x1a940f,_0x584bb)[_0xb25f('0x21')](function(_0x2028e9){logger[_0xb25f('0x22')](_0xb25f('0x23'),_0x424f60,_0xb25f('0x24'));logger['debug'](_0xb25f('0x25'),_0x424f60,_0xb25f('0x24'),JSON[_0xb25f('0x26')](_0x2028e9));if(_0x2028e9[_0xb25f('0x27')]){if(_0x2028e9[_0xb25f('0x27')][_0xb25f('0x28')]===0x1f4){logger[_0xb25f('0x27')](_0xb25f('0x23'),_0x424f60,_0x2028e9[_0xb25f('0x27')]['message']);return _0x5c1720(_0x2028e9[_0xb25f('0x27')][_0xb25f('0x29')]);}logger[_0xb25f('0x27')](_0xb25f('0x23'),_0x424f60,_0x2028e9[_0xb25f('0x27')][_0xb25f('0x29')]);return _0x1be353(_0x2028e9[_0xb25f('0x27')][_0xb25f('0x29')]);}else{logger[_0xb25f('0x22')](_0xb25f('0x23'),_0x424f60,_0xb25f('0x24'));_0x1be353(_0x2028e9[_0xb25f('0x2a')][_0xb25f('0x29')]);}})[_0xb25f('0x2b')](function(_0x4609ca){logger[_0xb25f('0x27')](_0xb25f('0x23'),_0x424f60,_0x4609ca);_0x5c1720(_0x4609ca);});});}function respondWithStatusCode(_0x5570d9,_0x2a4185){_0x2a4185=_0x2a4185||0xcc;return function(_0x1fd8e0){if(_0x1fd8e0){return _0x5570d9[_0xb25f('0x2c')](_0x2a4185);}return _0x5570d9['status'](_0x2a4185)[_0xb25f('0x2d')]();};}function respondWithResult(_0x1cd43b,_0x4720fc){_0x4720fc=_0x4720fc||0xc8;return function(_0x193f35){if(_0x193f35){return _0x1cd43b['status'](_0x4720fc)[_0xb25f('0x2e')](_0x193f35);}};}function respondWithFilteredResult(_0x378aca,_0x1df541){return function(_0x5cc93e){if(_0x5cc93e){var _0x261c9c=_0x5cc93e[_0xb25f('0x2f')],_0x7035d8=_0x1df541[_0xb25f('0x30')],_0x3171e1=_0x1df541[_0xb25f('0x30')]+_0x1df541['limit'],_0x1c3283;if(_0x3171e1>=_0x261c9c){_0x3171e1=_0x261c9c;_0x1c3283=0xc8;}else{_0x1c3283=0xce;}_0x378aca[_0xb25f('0x31')](_0x1c3283);return _0x378aca[_0xb25f('0x32')](_0xb25f('0x33'),_0x7035d8+'-'+_0x3171e1+'/'+_0x261c9c)[_0xb25f('0x2e')](_0x5cc93e);}return null;};}function patchUpdates(_0x5e0551){return function(_0x5299e4){try{jsonpatch['apply'](_0x5299e4,_0x5e0551,!![]);}catch(_0x32c441){return BPromise[_0xb25f('0x34')](_0x32c441);}return _0x5299e4[_0xb25f('0x35')]();};}function saveUpdates(_0x44d5ef,_0x5e8c08){return function(_0x2d3eab){if(_0x2d3eab){return _0x2d3eab[_0xb25f('0x36')](_0x44d5ef)[_0xb25f('0x21')](function(_0x41edf5){return _0x41edf5;});}return null;};}function removeEntity(_0x2c9fd2,_0x4fc871){return function(_0xd11f68){if(_0xd11f68){return _0xd11f68[_0xb25f('0x37')]()[_0xb25f('0x21')](function(){_0x2c9fd2[_0xb25f('0x31')](0xcc)[_0xb25f('0x2d')]();});}};}function handleEntityNotFound(_0x5bf4b9,_0x4953a3){return function(_0x1f755f){if(!_0x1f755f){_0x5bf4b9[_0xb25f('0x2c')](0x194);}return _0x1f755f;};}function handleError(_0x3a0d04,_0x3f1bac){_0x3f1bac=_0x3f1bac||0x1f4;return function(_0x4ab1c3){logger[_0xb25f('0x27')](_0x4ab1c3[_0xb25f('0x38')]);if(_0x4ab1c3[_0xb25f('0x39')]){delete _0x4ab1c3[_0xb25f('0x39')];}_0x3a0d04[_0xb25f('0x31')](_0x3f1bac)[_0xb25f('0x3a')](_0x4ab1c3);};}exports[_0xb25f('0x3b')]=function(_0x496895,_0x14ad3b){var _0x1baad6={},_0x27f462={},_0x1b4a05={'count':0x0,'rows':[]};var _0x268f64=db[_0xb25f('0x3c')][_0xb25f('0x3d')];_0x27f462[_0xb25f('0x3e')]=_['keys'](_0x268f64);_0x27f462[_0xb25f('0x3f')]=_[_0xb25f('0x40')](_0x496895['query']);_0x27f462[_0xb25f('0x41')]=_[_0xb25f('0x42')](_0x27f462[_0xb25f('0x3e')],_0x27f462[_0xb25f('0x3f')]);_0x1baad6[_0xb25f('0x43')]=_['intersection'](_0x27f462[_0xb25f('0x3e')],qs['fields'](_0x496895['query'][_0xb25f('0x44')]));_0x1baad6[_0xb25f('0x43')]=_0x1baad6[_0xb25f('0x43')]['length']?_0x1baad6[_0xb25f('0x43')]:_0x27f462[_0xb25f('0x3e')];if(!_0x496895[_0xb25f('0x3f')]['hasOwnProperty']('nolimit')){_0x1baad6[_0xb25f('0x45')]=qs[_0xb25f('0x45')](_0x496895['query'][_0xb25f('0x45')]);_0x1baad6['offset']=qs[_0xb25f('0x30')](_0x496895[_0xb25f('0x3f')][_0xb25f('0x30')]);}_0x1baad6[_0xb25f('0x46')]=qs[_0xb25f('0x47')](_0x496895[_0xb25f('0x3f')][_0xb25f('0x47')]);_0x1baad6[_0xb25f('0x48')]=qs[_0xb25f('0x41')](_['pick'](_0x496895[_0xb25f('0x3f')],_0x27f462[_0xb25f('0x41')]));if(_0x496895[_0xb25f('0x3f')]['filter']){_0x1baad6['where']=_[_0xb25f('0x49')](_0x1baad6[_0xb25f('0x48')],{'$or':_[_0xb25f('0x4a')](_0x268f64,function(_0x547b75){if(_0x547b75[_0xb25f('0x4b')][_0xb25f('0x4c')]!==_0xb25f('0x4d')){var _0x4464c7={};_0x4464c7[_0x547b75[_0xb25f('0x4e')]]={'$like':'%'+_0x496895[_0xb25f('0x3f')][_0xb25f('0x4f')]+'%'};return _0x4464c7;}})});}_0x1baad6=_[_0xb25f('0x49')]({},_0x1baad6,_0x496895[_0xb25f('0x50')]);var _0x2c1f9e={'where':_0x1baad6[_0xb25f('0x48')]};return db[_0xb25f('0x3c')][_0xb25f('0x2f')](_0x2c1f9e)[_0xb25f('0x21')](function(_0x3cb22d){_0x1b4a05[_0xb25f('0x2f')]=_0x3cb22d;if(_0x496895[_0xb25f('0x3f')]['includeAll']){_0x1baad6[_0xb25f('0x51')]=[{'all':!![]}];}return db['ChatGroup'][_0xb25f('0x52')](_0x1baad6);})[_0xb25f('0x21')](function(_0x4b2020){_0x1b4a05['rows']=_0x4b2020;return _0x1b4a05;})[_0xb25f('0x21')](respondWithFilteredResult(_0x14ad3b,_0x1baad6))[_0xb25f('0x2b')](handleError(_0x14ad3b,null));};exports[_0xb25f('0x53')]=function(_0x51ebee,_0x213d74){var _0x2e8101={'raw':!![],'where':{'id':_0x51ebee[_0xb25f('0x54')]['id']}},_0x454541={};_0x454541[_0xb25f('0x3e')]=_[_0xb25f('0x40')](db[_0xb25f('0x3c')][_0xb25f('0x3d')]);_0x454541[_0xb25f('0x3f')]=_['keys'](_0x51ebee[_0xb25f('0x3f')]);_0x454541[_0xb25f('0x41')]=_['intersection'](_0x454541['model'],_0x454541[_0xb25f('0x3f')]);_0x2e8101['attributes']=_[_0xb25f('0x42')](_0x454541[_0xb25f('0x3e')],qs['fields'](_0x51ebee[_0xb25f('0x3f')][_0xb25f('0x44')]));_0x2e8101[_0xb25f('0x43')]=_0x2e8101['attributes'][_0xb25f('0x55')]?_0x2e8101['attributes']:_0x454541[_0xb25f('0x3e')];if(_0x51ebee['query'][_0xb25f('0x56')]){_0x2e8101[_0xb25f('0x51')]=[{'all':!![]}];}_0x2e8101=_['merge']({},_0x2e8101,_0x51ebee['options']);return db[_0xb25f('0x3c')][_0xb25f('0x57')](_0x2e8101)[_0xb25f('0x21')](handleEntityNotFound(_0x213d74,null))['then'](respondWithResult(_0x213d74,null))['catch'](handleError(_0x213d74,null));};exports[_0xb25f('0x58')]=function(_0x4f3d2e,_0x777b2e){return db['ChatGroup'][_0xb25f('0x58')](_0x4f3d2e[_0xb25f('0x59')],{})[_0xb25f('0x21')](respondWithResult(_0x777b2e,0xc9))[_0xb25f('0x2b')](handleError(_0x777b2e,null));};exports[_0xb25f('0x36')]=function(_0xd2095f,_0x2d51ea){if(_0xd2095f['body']['id']){delete _0xd2095f[_0xb25f('0x59')]['id'];}return db[_0xb25f('0x3c')][_0xb25f('0x57')]({'where':{'id':_0xd2095f['params']['id']}})[_0xb25f('0x21')](handleEntityNotFound(_0x2d51ea,null))[_0xb25f('0x21')](saveUpdates(_0xd2095f[_0xb25f('0x59')],null))[_0xb25f('0x21')](respondWithResult(_0x2d51ea,null))[_0xb25f('0x2b')](handleError(_0x2d51ea,null));};exports[_0xb25f('0x37')]=function(_0x3ca601,_0x2fa999){return db['ChatGroup'][_0xb25f('0x57')]({'where':{'id':_0x3ca601[_0xb25f('0x54')]['id']}})['then'](handleEntityNotFound(_0x2fa999,null))[_0xb25f('0x21')](removeEntity(_0x2fa999,null))['catch'](handleError(_0x2fa999,null));};exports[_0xb25f('0x5a')]=function(_0x589225,_0x2974e7){return db['ChatGroup'][_0xb25f('0x5a')]()[_0xb25f('0x21')](respondWithResult(_0x2974e7,null))[_0xb25f('0x2b')](handleError(_0x2974e7,null));};exports[_0xb25f('0x5b')]=function(_0x4570b1,_0x2114fc,_0x302c91){return db[_0xb25f('0x5c')][_0xb25f('0x2f')]({'where':{'ChatGroupId':_0x4570b1[_0xb25f('0x54')]['id'],'ToId':_0x4570b1['user']['id'],'read':![]}})['then'](function(_0x28348b){return{'id':_[_0xb25f('0x5d')](_0x4570b1[_0xb25f('0x54')]['id']),'count':_0x28348b};})[_0xb25f('0x21')](respondWithResult(_0x2114fc,null))[_0xb25f('0x2b')](handleError(_0x2114fc,null));};exports[_0xb25f('0x5e')]=function(_0x204cfe,_0x559b65,_0x3d40c9){return db['ChatGroup'][_0xb25f('0x57')]({'where':{'id':_0x204cfe['params']['id']}})['then'](handleEntityNotFound(_0x559b65,null))[_0xb25f('0x21')](function(_0x5c8664){if(_0x5c8664){return _0x5c8664['addMembers'](_0x204cfe['body'][_0xb25f('0x5f')],_[_0xb25f('0x60')](_0x204cfe[_0xb25f('0x59')],[_0xb25f('0x5f'),'id'])||{});}})[_0xb25f('0x21')](respondWithResult(_0x559b65,null))[_0xb25f('0x2b')](handleError(_0x559b65,null));};exports[_0xb25f('0x61')]=function(_0x4209c9,_0x44ed18,_0x3dc191){var _0x210bbc={};var _0x1a3fe4={};var _0x2ec426;var _0x4fe5f5;return db[_0xb25f('0x3c')]['findOne']({'where':{'id':_0x4209c9['params']['id']}})[_0xb25f('0x21')](handleEntityNotFound(_0x44ed18,null))[_0xb25f('0x21')](function(_0x579f44){if(_0x579f44){_0x2ec426=_0x579f44;_0x1a3fe4[_0xb25f('0x3e')]=_[_0xb25f('0x40')](db[_0xb25f('0x62')][_0xb25f('0x3d')]);_0x1a3fe4['query']=_['keys'](_0x4209c9[_0xb25f('0x3f')]);_0x1a3fe4[_0xb25f('0x41')]=_[_0xb25f('0x42')](_0x1a3fe4[_0xb25f('0x3e')],_0x1a3fe4['query']);_0x210bbc['attributes']=_['intersection'](_0x1a3fe4[_0xb25f('0x3e')],qs['fields'](_0x4209c9[_0xb25f('0x3f')][_0xb25f('0x44')]));_0x210bbc[_0xb25f('0x43')]=_0x210bbc[_0xb25f('0x43')][_0xb25f('0x55')]?_0x210bbc[_0xb25f('0x43')]:_0x1a3fe4[_0xb25f('0x3e')];_0x210bbc[_0xb25f('0x46')]=qs[_0xb25f('0x47')](_0x4209c9[_0xb25f('0x3f')][_0xb25f('0x47')]);_0x210bbc[_0xb25f('0x48')]=qs[_0xb25f('0x41')](_['pick'](_0x4209c9[_0xb25f('0x3f')],_0x1a3fe4[_0xb25f('0x41')]));if(_0x4209c9['query'][_0xb25f('0x4f')]){_0x210bbc[_0xb25f('0x48')]=_[_0xb25f('0x49')](_0x210bbc[_0xb25f('0x48')],{'$or':_[_0xb25f('0x4a')](_0x210bbc[_0xb25f('0x43')],function(_0x1144fb){var _0x41ff2e={};_0x41ff2e[_0x1144fb]={'$like':'%'+_0x4209c9[_0xb25f('0x3f')][_0xb25f('0x4f')]+'%'};return _0x41ff2e;})});}_0x210bbc=_[_0xb25f('0x49')]({},_0x210bbc,_0x4209c9[_0xb25f('0x50')]);return _0x2ec426[_0xb25f('0x61')](_0x210bbc);}})['then'](function(_0x28149f){if(_0x28149f){_0x4fe5f5=_0x28149f['length'];if(!_0x4209c9['query'][_0xb25f('0x63')](_0xb25f('0x64'))){_0x210bbc['limit']=qs[_0xb25f('0x45')](_0x4209c9['query']['limit']);_0x210bbc[_0xb25f('0x30')]=qs[_0xb25f('0x30')](_0x4209c9[_0xb25f('0x3f')][_0xb25f('0x30')]);}return _0x2ec426['getMembers'](_0x210bbc);}})[_0xb25f('0x21')](function(_0x334b6c){if(_0x334b6c){return _0x334b6c?{'count':_0x4fe5f5,'rows':_0x334b6c}:null;}})[_0xb25f('0x21')](respondWithResult(_0x44ed18,null))[_0xb25f('0x2b')](handleError(_0x44ed18,null));};exports[_0xb25f('0x65')]=function(_0x36fc5a,_0x364e37,_0x802827){return db['ChatGroup'][_0xb25f('0x57')]({'where':{'id':_0x36fc5a[_0xb25f('0x54')]['id']}})[_0xb25f('0x21')](handleEntityNotFound(_0x364e37,null))[_0xb25f('0x21')](function(_0xf58c7d){if(_0xf58c7d){return _0xf58c7d[_0xb25f('0x65')](_0x36fc5a[_0xb25f('0x3f')][_0xb25f('0x5f')]);}})[_0xb25f('0x21')](respondWithStatusCode(_0x364e37,null))[_0xb25f('0x2b')](handleError(_0x364e37,null));};exports[_0xb25f('0x66')]=function(_0x295506,_0x1a52d2,_0x29decf){if(_0x295506[_0xb25f('0x59')]['id']){delete _0x295506[_0xb25f('0x59')]['id'];}return db[_0xb25f('0x3c')]['find']({'where':{'id':_0x295506[_0xb25f('0x54')]['id']}})['then'](handleEntityNotFound(_0x1a52d2,null))['then'](function(_0x248c38){if(_0x248c38){_0x295506[_0xb25f('0x59')][_0xb25f('0x67')]=_0x248c38['id'];return db[_0xb25f('0x5c')]['create'](_0x295506[_0xb25f('0x59')]);}})[_0xb25f('0x21')](respondWithResult(_0x1a52d2,null))[_0xb25f('0x2b')](handleError(_0x1a52d2,null));};exports[_0xb25f('0x68')]=function(_0x3b18b0,_0x140e5d,_0x592679){var _0x2a2b15={};var _0x267e07={};var _0x735567;var _0x2eb355;return db['ChatGroup'][_0xb25f('0x69')]({'where':{'id':_0x3b18b0[_0xb25f('0x54')]['id']}})[_0xb25f('0x21')](handleEntityNotFound(_0x140e5d,null))[_0xb25f('0x21')](function(_0x317de8){if(_0x317de8){_0x735567=_0x317de8;_0x267e07['model']=_[_0xb25f('0x40')](db['ChatInternalMessage'][_0xb25f('0x3d')]);_0x267e07[_0xb25f('0x3f')]=_[_0xb25f('0x40')](_0x3b18b0['query']);_0x267e07[_0xb25f('0x41')]=_[_0xb25f('0x42')](_0x267e07[_0xb25f('0x3e')],_0x267e07['query']);_0x2a2b15[_0xb25f('0x43')]=_['intersection'](_0x267e07['model'],qs[_0xb25f('0x44')](_0x3b18b0[_0xb25f('0x3f')]['fields']));_0x2a2b15['attributes']=_0x2a2b15[_0xb25f('0x43')][_0xb25f('0x55')]?_0x2a2b15[_0xb25f('0x43')]:_0x267e07['model'];_0x2a2b15['order']=qs['sort'](_0x3b18b0['query'][_0xb25f('0x47')]);_0x2a2b15[_0xb25f('0x48')]=qs[_0xb25f('0x41')](_[_0xb25f('0x6a')](_0x3b18b0['query'],_0x267e07['filters']));if(_0x3b18b0[_0xb25f('0x3f')]['filter']){_0x2a2b15[_0xb25f('0x48')]=_[_0xb25f('0x49')](_0x2a2b15[_0xb25f('0x48')],{'$or':_[_0xb25f('0x4a')](_0x2a2b15[_0xb25f('0x43')],function(_0x588651){var _0x1bb89d={};_0x1bb89d[_0x588651]={'$like':'%'+_0x3b18b0[_0xb25f('0x3f')][_0xb25f('0x4f')]+'%'};return _0x1bb89d;})});}if(_0x3b18b0['query'][_0xb25f('0x6b')]){var _0x107232=_0x3b18b0[_0xb25f('0x3f')][_0xb25f('0x6b')][_0xb25f('0x6c')](',');var _0x26d3ff={};_0x26d3ff[_0x107232[0x0]]={'$gte':moment(_0x107232[0x1])[_0xb25f('0x6d')](_0xb25f('0x6e'))};_0x2a2b15['where']=_[_0xb25f('0x49')](_0x2a2b15['where'],_0x26d3ff);}_0x2a2b15=_[_0xb25f('0x49')]({},_0x2a2b15,_0x3b18b0[_0xb25f('0x50')]);return _0x735567[_0xb25f('0x68')](_0x2a2b15);}})[_0xb25f('0x21')](function(_0x5b9235){if(_0x5b9235){_0x2eb355=_0x5b9235[_0xb25f('0x55')];if(!_0x3b18b0[_0xb25f('0x3f')]['hasOwnProperty'](_0xb25f('0x64'))){_0x2a2b15[_0xb25f('0x45')]=qs[_0xb25f('0x45')](_0x3b18b0['query'][_0xb25f('0x45')]);_0x2a2b15['offset']=qs[_0xb25f('0x30')](_0x3b18b0[_0xb25f('0x3f')][_0xb25f('0x30')]);}return _0x735567[_0xb25f('0x68')](_0x2a2b15);}})[_0xb25f('0x21')](function(_0x3e68f8){if(_0x3e68f8){return _0x3e68f8?{'count':_0x2eb355,'rows':_0x3e68f8}:null;}})[_0xb25f('0x21')](respondWithResult(_0x140e5d,null))[_0xb25f('0x2b')](handleError(_0x140e5d,null));};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js
index c0f79bb..2961eba 100644
--- a/server/api/chatGroup/chatGroup.events.js
+++ b/server/api/chatGroup/chatGroup.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf34f=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','save'];(function(_0x10763e,_0x25962e){var _0x52aad4=function(_0x129ba8){while(--_0x129ba8){_0x10763e['push'](_0x10763e['shift']());}};_0x52aad4(++_0x25962e);}(_0xf34f,0x12f));var _0xff34=function(_0x3ee1e2,_0x2e6f56){_0x3ee1e2=_0x3ee1e2-0x0;var _0x164bff=_0xf34f[_0x3ee1e2];return _0x164bff;};'use strict';var EventEmitter=require(_0xff34('0x0'));var ChatGroup=require(_0xff34('0x1'))['db']['ChatGroup'];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xff34('0x2'),'afterUpdate':_0xff34('0x3'),'afterDestroy':_0xff34('0x4')};function emitEvent(_0x4ef56a){return function(_0x1ae9dd,_0x3422ee,_0x2b216a){ChatGroupEvents[_0xff34('0x5')](_0x4ef56a+':'+_0x1ae9dd['id'],_0x1ae9dd);ChatGroupEvents['emit'](_0x4ef56a,_0x1ae9dd);_0x2b216a(null);};}for(var e in events){if(events[_0xff34('0x6')](e)){var event=events[e];ChatGroup[_0xff34('0x7')](e,emitEvent(event));}}module[_0xff34('0x8')]=ChatGroupEvents;
\ No newline at end of file
+var _0x5b2c=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatGroup'];(function(_0x232312,_0x49271a){var _0x265db1=function(_0xd9e41f){while(--_0xd9e41f){_0x232312['push'](_0x232312['shift']());}};_0x265db1(++_0x49271a);}(_0x5b2c,0xa7));var _0xc5b2=function(_0x43b1d5,_0xc75c8){_0x43b1d5=_0x43b1d5-0x0;var _0x574474=_0x5b2c[_0x43b1d5];return _0x574474;};'use strict';var EventEmitter=require(_0xc5b2('0x0'));var ChatGroup=require(_0xc5b2('0x1'))['db'][_0xc5b2('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc5b2('0x3'),'afterUpdate':_0xc5b2('0x4'),'afterDestroy':_0xc5b2('0x5')};function emitEvent(_0x412517){return function(_0x1c7e3c,_0x101c95,_0x1d75ea){ChatGroupEvents['emit'](_0x412517+':'+_0x1c7e3c['id'],_0x1c7e3c);ChatGroupEvents[_0xc5b2('0x6')](_0x412517,_0x1c7e3c);_0x1d75ea(null);};}for(var e in events){if(events[_0xc5b2('0x7')](e)){var event=events[e];ChatGroup[_0xc5b2('0x8')](e,emitEvent(event));}}module[_0xc5b2('0x9')]=ChatGroupEvents;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js
index e508d3e..edebda2 100644
--- a/server/api/chatGroup/chatGroup.model.js
+++ b/server/api/chatGroup/chatGroup.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x092a=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./chatGroup.attributes','exports','define','chat_groups'];(function(_0x580576,_0x2f107d){var _0x3f55a0=function(_0x2e180b){while(--_0x2e180b){_0x580576['push'](_0x580576['shift']());}};_0x3f55a0(++_0x2f107d);}(_0x092a,0x138));var _0xa092=function(_0x3e6aed,_0x97a2f1){_0x3e6aed=_0x3e6aed-0x0;var _0x3220dd=_0x092a[_0x3e6aed];return _0x3220dd;};'use strict';var _=require(_0xa092('0x0'));var util=require(_0xa092('0x1'));var logger=require(_0xa092('0x2'))(_0xa092('0x3'));var moment=require(_0xa092('0x4'));var BPromise=require(_0xa092('0x5'));var rp=require(_0xa092('0x6'));var fs=require('fs');var path=require(_0xa092('0x7'));var rimraf=require('rimraf');var config=require(_0xa092('0x8'));var attributes=require(_0xa092('0x9'));module[_0xa092('0xa')]=function(_0x1f9062,_0x25ab5e){return _0x1f9062[_0xa092('0xb')]('ChatGroup',attributes,{'tableName':_0xa092('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd061=['path','./chatGroup.attributes','exports','define','ChatGroup','chat_groups','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x4f1b8e,_0x2bd8e4){var _0x411ca6=function(_0x2d1769){while(--_0x2d1769){_0x4f1b8e['push'](_0x4f1b8e['shift']());}};_0x411ca6(++_0x2bd8e4);}(_0xd061,0x17a));var _0x1d06=function(_0x1d9cb2,_0x1dc3b3){_0x1d9cb2=_0x1d9cb2-0x0;var _0x1217c7=_0xd061[_0x1d9cb2];return _0x1217c7;};'use strict';var _=require(_0x1d06('0x0'));var util=require(_0x1d06('0x1'));var logger=require(_0x1d06('0x2'))('api');var moment=require(_0x1d06('0x3'));var BPromise=require(_0x1d06('0x4'));var rp=require(_0x1d06('0x5'));var fs=require('fs');var path=require(_0x1d06('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x1d06('0x7'));module[_0x1d06('0x8')]=function(_0x160645,_0x5b5c9a){return _0x160645[_0x1d06('0x9')](_0x1d06('0xa'),attributes,{'tableName':_0x1d06('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.rpc.js b/server/api/chatGroup/chatGroup.rpc.js
index ccbdb71..a47e928 100644
--- a/server/api/chatGroup/chatGroup.rpc.js
+++ b/server/api/chatGroup/chatGroup.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x50a6=['../../config/utils','../../config/logger','../../config/environment','http','redis','defaults','socket.io-emitter','./chatGroup.socket','register','then','info','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatGroup,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','../../mysqldb'];(function(_0x803eb,_0x12e141){var _0x2f893a=function(_0x54c99b){while(--_0x54c99b){_0x803eb['push'](_0x803eb['shift']());}};_0x2f893a(++_0x12e141);}(_0x50a6,0xa4));var _0x650a=function(_0x252d7e,_0x20a71c){_0x252d7e=_0x252d7e-0x0;var _0x2afaba=_0x50a6[_0x252d7e];return _0x2afaba;};'use strict';var _=require(_0x650a('0x0'));var util=require(_0x650a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x650a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x650a('0x3'))['db'];var utils=require(_0x650a('0x4'));var logger=require(_0x650a('0x5'))('rpc');var config=require(_0x650a('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0x650a('0x7')]({'port':0x232a});config[_0x650a('0x8')]=_[_0x650a('0x9')](config[_0x650a('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0x650a('0xa'))(new Redis(config['redis']));require(_0x650a('0xb'))[_0x650a('0xc')](socket);function respondWithRpcPromise(_0x495fca,_0x58ece6,_0x3bbdca){return new BPromise(function(_0x5295f4,_0x3e2406){return client['request'](_0x495fca,_0x3bbdca)[_0x650a('0xd')](function(_0x4fa19a){logger[_0x650a('0xe')]('ChatGroup,\x20%s,\x20%s',_0x58ece6,_0x650a('0xf'));logger['debug'](_0x650a('0x10'),_0x58ece6,_0x650a('0xf'),JSON[_0x650a('0x11')](_0x4fa19a));if(_0x4fa19a['error']){if(_0x4fa19a[_0x650a('0x12')][_0x650a('0x13')]===0x1f4){logger[_0x650a('0x12')](_0x650a('0x14'),_0x58ece6,_0x4fa19a[_0x650a('0x12')][_0x650a('0x15')]);return _0x3e2406(_0x4fa19a['error'][_0x650a('0x15')]);}logger['error'](_0x650a('0x14'),_0x58ece6,_0x4fa19a[_0x650a('0x12')][_0x650a('0x15')]);return _0x5295f4(_0x4fa19a['error']['message']);}else{logger['info']('ChatGroup,\x20%s,\x20%s',_0x58ece6,_0x650a('0xf'));_0x5295f4(_0x4fa19a[_0x650a('0x16')][_0x650a('0x15')]);}})[_0x650a('0x17')](function(_0x2a0f0c){logger['error']('ChatGroup,\x20%s,\x20%s',_0x58ece6,_0x2a0f0c);_0x3e2406(_0x2a0f0c);});});}
\ No newline at end of file
+var _0xeec6=['localhost','socket.io-emitter','./chatGroup.socket','register','request','info','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatGroup,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','defaults','redis'];(function(_0x462e91,_0x2f0aba){var _0x1abd29=function(_0x2da607){while(--_0x2da607){_0x462e91['push'](_0x462e91['shift']());}};_0x1abd29(++_0x2f0aba);}(_0xeec6,0x1c2));var _0x6eec=function(_0x31cb5f,_0x2df766){_0x31cb5f=_0x31cb5f-0x0;var _0x586042=_0xeec6[_0x31cb5f];return _0x586042;};'use strict';var _=require(_0x6eec('0x0'));var util=require(_0x6eec('0x1'));var moment=require(_0x6eec('0x2'));var BPromise=require(_0x6eec('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6eec('0x4'));var db=require(_0x6eec('0x5'))['db'];var utils=require(_0x6eec('0x6'));var logger=require(_0x6eec('0x7'))(_0x6eec('0x8'));var config=require(_0x6eec('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x6eec('0xa')][_0x6eec('0xb')]({'port':0x232a});config['redis']=_[_0x6eec('0xc')](config[_0x6eec('0xd')],{'host':_0x6eec('0xe'),'port':0x18eb});var socket=require(_0x6eec('0xf'))(new Redis(config['redis']));require(_0x6eec('0x10'))[_0x6eec('0x11')](socket);function respondWithRpcPromise(_0x1c774d,_0x49ad4c,_0x595dd4){return new BPromise(function(_0x5e8aba,_0x295cae){return client[_0x6eec('0x12')](_0x1c774d,_0x595dd4)['then'](function(_0x4b8de1){logger[_0x6eec('0x13')]('ChatGroup,\x20%s,\x20%s',_0x49ad4c,_0x6eec('0x14'));logger[_0x6eec('0x15')](_0x6eec('0x16'),_0x49ad4c,_0x6eec('0x14'),JSON[_0x6eec('0x17')](_0x4b8de1));if(_0x4b8de1['error']){if(_0x4b8de1[_0x6eec('0x18')][_0x6eec('0x19')]===0x1f4){logger[_0x6eec('0x18')](_0x6eec('0x1a'),_0x49ad4c,_0x4b8de1[_0x6eec('0x18')][_0x6eec('0x1b')]);return _0x295cae(_0x4b8de1[_0x6eec('0x18')][_0x6eec('0x1b')]);}logger[_0x6eec('0x18')](_0x6eec('0x1a'),_0x49ad4c,_0x4b8de1['error'][_0x6eec('0x1b')]);return _0x5e8aba(_0x4b8de1['error'][_0x6eec('0x1b')]);}else{logger[_0x6eec('0x13')]('ChatGroup,\x20%s,\x20%s',_0x49ad4c,_0x6eec('0x14'));_0x5e8aba(_0x4b8de1[_0x6eec('0x1c')][_0x6eec('0x1b')]);}})['catch'](function(_0x87f3be){logger[_0x6eec('0x18')](_0x6eec('0x1a'),_0x49ad4c,_0x87f3be);_0x295cae(_0x87f3be);});});}
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js
index 6dc9332..d7b17f1 100644
--- a/server/api/chatGroup/chatGroup.socket.js
+++ b/server/api/chatGroup/chatGroup.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5a8c=['./chatGroup.events','save','update','register','length','chatGroup:'];(function(_0x4baae2,_0x487ab6){var _0x1a2285=function(_0x1cea47){while(--_0x1cea47){_0x4baae2['push'](_0x4baae2['shift']());}};_0x1a2285(++_0x487ab6);}(_0x5a8c,0x1da));var _0xc5a8=function(_0x39e3cc,_0x424c31){_0x39e3cc=_0x39e3cc-0x0;var _0x2a86a5=_0x5a8c[_0x39e3cc];return _0x2a86a5;};'use strict';var ChatGroupEvents=require(_0xc5a8('0x0'));var events=[_0xc5a8('0x1'),'remove',_0xc5a8('0x2')];function createListener(_0x3325ec,_0x1e03e6){return function(_0x185f20){_0x1e03e6['emit'](_0x3325ec,_0x185f20);};}function removeListener(_0x2d862c,_0x4310e4){return function(){ChatGroupEvents['removeListener'](_0x2d862c,_0x4310e4);};}exports[_0xc5a8('0x3')]=function(_0x3c8f1e){for(var _0x373d40=0x0,_0x20e700=events[_0xc5a8('0x4')];_0x373d40<_0x20e700;_0x373d40++){var _0x2eb2a5=events[_0x373d40];var _0x414555=createListener(_0xc5a8('0x5')+_0x2eb2a5,_0x3c8f1e);ChatGroupEvents['on'](_0x2eb2a5,_0x414555);}};
\ No newline at end of file
+var _0x3b75=['removeListener','register','chatGroup:','./chatGroup.events','save','remove','update'];(function(_0x522951,_0x2b6511){var _0x390bbb=function(_0x9a768c){while(--_0x9a768c){_0x522951['push'](_0x522951['shift']());}};_0x390bbb(++_0x2b6511);}(_0x3b75,0xdc));var _0x53b7=function(_0x500c0,_0xdb6a03){_0x500c0=_0x500c0-0x0;var _0xdd146f=_0x3b75[_0x500c0];return _0xdd146f;};'use strict';var ChatGroupEvents=require(_0x53b7('0x0'));var events=[_0x53b7('0x1'),_0x53b7('0x2'),_0x53b7('0x3')];function createListener(_0x2eaf0c,_0x5dc9c7){return function(_0x2702db){_0x5dc9c7['emit'](_0x2eaf0c,_0x2702db);};}function removeListener(_0xa7b997,_0x4c9b8f){return function(){ChatGroupEvents[_0x53b7('0x4')](_0xa7b997,_0x4c9b8f);};}exports[_0x53b7('0x5')]=function(_0x331d88){for(var _0x287704=0x0,_0x7e5139=events['length'];_0x287704<_0x7e5139;_0x287704++){var _0x1f89b7=events[_0x287704];var _0x233482=createListener(_0x53b7('0x6')+_0x1f89b7,_0x331d88);ChatGroupEvents['on'](_0x1f89b7,_0x233482);}};
\ No newline at end of file
diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js
index bfc0170..a8b09ec 100644
--- a/server/api/chatGroup/index.js
+++ b/server/api/chatGroup/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf954=['index','show','/:id/unread','/:id/members','/:id/messages','getMessages','create','post','put','delete','/:id','removeMembers','exports','multer','path','connect-timeout','../../components/auth/service','../../components/interaction/service','./chatGroup.controller','get','isAuthenticated'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf954,0x1f0));var _0x4f95=function(_0xe75596,_0x181f3c){_0xe75596=_0xe75596-0x0;var _0x2dc99a=_0xf954[_0xe75596];return _0x2dc99a;};'use strict';var multer=require(_0x4f95('0x0'));var util=require('util');var path=require(_0x4f95('0x1'));var timeout=require(_0x4f95('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x4f95('0x3'));var interaction=require(_0x4f95('0x4'));var config=require('../../config/environment');var controller=require(_0x4f95('0x5'));router[_0x4f95('0x6')]('/',auth[_0x4f95('0x7')](),controller[_0x4f95('0x8')]);router[_0x4f95('0x6')]('/describe',auth[_0x4f95('0x7')](),controller['describe']);router[_0x4f95('0x6')]('/:id',auth[_0x4f95('0x7')](),controller[_0x4f95('0x9')]);router['get'](_0x4f95('0xa'),auth[_0x4f95('0x7')](),controller['getUnread']);router[_0x4f95('0x6')](_0x4f95('0xb'),auth[_0x4f95('0x7')](),controller['getMembers']);router[_0x4f95('0x6')](_0x4f95('0xc'),auth[_0x4f95('0x7')](),controller[_0x4f95('0xd')]);router['post']('/',auth[_0x4f95('0x7')](),controller[_0x4f95('0xe')]);router[_0x4f95('0xf')](_0x4f95('0xb'),auth[_0x4f95('0x7')](),controller['addMembers']);router[_0x4f95('0xf')](_0x4f95('0xc'),auth[_0x4f95('0x7')](),controller['addMessage']);router[_0x4f95('0x10')]('/:id',auth[_0x4f95('0x7')](),controller['update']);router[_0x4f95('0x11')](_0x4f95('0x12'),auth[_0x4f95('0x7')](),controller['destroy']);router['delete']('/:id/members',auth[_0x4f95('0x7')](),controller[_0x4f95('0x13')]);module[_0x4f95('0x14')]=router;
\ No newline at end of file
+var _0xa4ca=['getUnread','/:id/members','getMembers','/:id/messages','post','create','addMembers','addMessage','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','/:id/unread'];(function(_0x5aadc2,_0x3ff7c1){var _0x1c2d03=function(_0x55ffab){while(--_0x55ffab){_0x5aadc2['push'](_0x5aadc2['shift']());}};_0x1c2d03(++_0x3ff7c1);}(_0xa4ca,0x1bd));var _0xaa4c=function(_0x56caa0,_0x31841f){_0x56caa0=_0x56caa0-0x0;var _0x4e1ccf=_0xa4ca[_0x56caa0];return _0x4e1ccf;};'use strict';var multer=require(_0xaa4c('0x0'));var util=require(_0xaa4c('0x1'));var path=require(_0xaa4c('0x2'));var timeout=require(_0xaa4c('0x3'));var express=require(_0xaa4c('0x4'));var router=express[_0xaa4c('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xaa4c('0x6'));var config=require(_0xaa4c('0x7'));var controller=require('./chatGroup.controller');router[_0xaa4c('0x8')]('/',auth[_0xaa4c('0x9')](),controller['index']);router[_0xaa4c('0x8')](_0xaa4c('0xa'),auth[_0xaa4c('0x9')](),controller[_0xaa4c('0xb')]);router[_0xaa4c('0x8')](_0xaa4c('0xc'),auth['isAuthenticated'](),controller['show']);router[_0xaa4c('0x8')](_0xaa4c('0xd'),auth[_0xaa4c('0x9')](),controller[_0xaa4c('0xe')]);router[_0xaa4c('0x8')](_0xaa4c('0xf'),auth[_0xaa4c('0x9')](),controller[_0xaa4c('0x10')]);router[_0xaa4c('0x8')](_0xaa4c('0x11'),auth[_0xaa4c('0x9')](),controller['getMessages']);router[_0xaa4c('0x12')]('/',auth[_0xaa4c('0x9')](),controller[_0xaa4c('0x13')]);router[_0xaa4c('0x12')]('/:id/members',auth[_0xaa4c('0x9')](),controller[_0xaa4c('0x14')]);router[_0xaa4c('0x12')]('/:id/messages',auth[_0xaa4c('0x9')](),controller[_0xaa4c('0x15')]);router[_0xaa4c('0x16')]('/:id',auth[_0xaa4c('0x9')](),controller[_0xaa4c('0x17')]);router[_0xaa4c('0x18')](_0xaa4c('0xc'),auth[_0xaa4c('0x9')](),controller[_0xaa4c('0x19')]);router[_0xaa4c('0x18')](_0xaa4c('0xf'),auth[_0xaa4c('0x9')](),controller['removeMembers']);module[_0xaa4c('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js
index c71254a..6499597 100644
--- a/server/api/chatInteraction/chatInteraction.attributes.js
+++ b/server/api/chatInteraction/chatInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x34b7=['out','BOOLEAN','INTEGER','ENUM','star','thumb','STRING','DATE','long'];(function(_0x33e153,_0xac8da8){var _0x360f1a=function(_0x383966){while(--_0x383966){_0x33e153['push'](_0x33e153['shift']());}};_0x360f1a(++_0xac8da8);}(_0x34b7,0x196));var _0x734b=function(_0x4bd67a,_0x4f9725){_0x4bd67a=_0x4bd67a-0x0;var _0x2be5fb=_0x34b7[_0x4bd67a];return _0x2be5fb;};'use strict';var Sequelize=require('sequelize');module['exports']={'closed':{'type':Sequelize[_0x734b('0x0')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x734b('0x1')]},'ratingType':{'type':Sequelize[_0x734b('0x2')](_0x734b('0x3'),_0x734b('0x4')),'defaultValue':_0x734b('0x3')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize['TEXT']},'mailTranscript':{'type':Sequelize[_0x734b('0x5')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x734b('0x6')]},'disposition':{'type':Sequelize[_0x734b('0x5')]},'note':{'type':Sequelize[_0x734b('0x5')]},'browserName':{'type':Sequelize[_0x734b('0x5')]},'browserVersion':{'type':Sequelize[_0x734b('0x5')]},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize[_0x734b('0x5')]},'deviceModel':{'type':Sequelize[_0x734b('0x5')]},'deviceVendor':{'type':Sequelize['STRING']},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize['STRING']},'customerIp':{'type':Sequelize[_0x734b('0x5')]},'formData':{'type':Sequelize['TEXT'](_0x734b('0x7'))},'read1stAt':{'type':Sequelize[_0x734b('0x6')]},'lastMsgAt':{'type':Sequelize[_0x734b('0x6')]},'lastMsgDirection':{'type':Sequelize[_0x734b('0x2')]('in',_0x734b('0x8')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x734b('0x5')]}};
\ No newline at end of file
+var _0x5eb8=['thumb','TEXT','STRING','DATE','long','BOOLEAN','INTEGER','ENUM','star'];(function(_0x4113e2,_0x52dfb9){var _0xaca944=function(_0x737936){while(--_0x737936){_0x4113e2['push'](_0x4113e2['shift']());}};_0xaca944(++_0x52dfb9);}(_0x5eb8,0xb0));var _0x85eb=function(_0xc1a4cf,_0x17141b){_0xc1a4cf=_0xc1a4cf-0x0;var _0x2930d1=_0x5eb8[_0xc1a4cf];return _0x2930d1;};'use strict';var Sequelize=require('sequelize');module['exports']={'closed':{'type':Sequelize[_0x85eb('0x0')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x85eb('0x1')]},'ratingType':{'type':Sequelize[_0x85eb('0x2')](_0x85eb('0x3'),_0x85eb('0x4')),'defaultValue':_0x85eb('0x3')},'ratingMessage':{'type':Sequelize[_0x85eb('0x5')]},'pathTranscript':{'type':Sequelize[_0x85eb('0x5')]},'mailTranscript':{'type':Sequelize[_0x85eb('0x6')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x85eb('0x7')]},'disposition':{'type':Sequelize[_0x85eb('0x6')]},'note':{'type':Sequelize[_0x85eb('0x6')]},'browserName':{'type':Sequelize['STRING']},'browserVersion':{'type':Sequelize[_0x85eb('0x6')]},'osName':{'type':Sequelize[_0x85eb('0x6')]},'osVersion':{'type':Sequelize[_0x85eb('0x6')]},'deviceModel':{'type':Sequelize['STRING']},'deviceVendor':{'type':Sequelize[_0x85eb('0x6')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0x85eb('0x6')]},'customerIp':{'type':Sequelize[_0x85eb('0x6')]},'formData':{'type':Sequelize[_0x85eb('0x5')](_0x85eb('0x8'))},'read1stAt':{'type':Sequelize[_0x85eb('0x7')]},'lastMsgAt':{'type':Sequelize[_0x85eb('0x7')]},'lastMsgDirection':{'type':Sequelize[_0x85eb('0x2')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x85eb('0x6')]}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js
index 5f5bf1e..736169b 100644
--- a/server/api/chatInteraction/chatInteraction.controller.js
+++ b/server/api/chatInteraction/chatInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x85f7=['register','jayson/promise','client','http','info','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','ChatInteraction,\x20%s,\x20%s','message','request\x20sent','catch','status','end','json','count','limit','Content-Range','apply','save','update','then','destroy','name','send','closed','unreadMessages','ChatMessage','map','Tags','TagIds','split','index','ChatInteraction','rawAttributes','model','keys','query','filters','fields','attributes','length','hasOwnProperty','nolimit','offset','sort','where','pick','select','field','from','chat_messages','me.ChatInteractionId\x20=\x20i.id','me.direction\x20=\x20\x27in\x27','me.read\x20=\x20false','u.id','ui.ChatInteractionId','user_has_chat_interactions','left_join','u.id\x20=\x20ui.UserId','chat_interactions','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','users','chat_websites','a.id\x20=\x20i.ChatWebsiteId','advancedFilter','parse','forEach','createdAt','value','dateStart','startOf','day','utc','endOf','format','and','isArray','condition','TagId','Messages.count','\x20IN\x20?','\x20=\x20?','tableAlias','\x20LIKE\x20?','c.lastName','c.email','\x20<\x20?','LIKE','ContactId','\x20>\x20?','filter','isNil','isEmpty','ChatWebsiteId','i.ChatWebsiteId\x20IN\x20?','concat','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','push','toString','join','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','order','DESC','group','i.id','QueryTypes','SELECT','clone','read','%s\x20=\x200','having','`Messages.count`\x20=\x200','%s\x20>\x200','`Messages.count`\x20>\x200','tag','it.ChatInteractionId\x20=\x20i.id','tools_tags','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','mail_interaction_has_tags','it.MailInteractionId\x20=\x20i.id','sequelize','keyBy','merge','a.key','Account.key','i.*','Contact.firstName','Contact.lastName','c.phone','Contact.phone','c.mobile','Contact.mobile','Contact.fax','chat_interaction_has_tags','ui.ChatInteractionId\x20IN\x20?','groupBy','all','rows','show','params','intersection','includeAll','include','options','find','create','body','describe','customUpdate','abandonInteraction,\x20%s,\x20%s,\x20%s','abandon','entity\x20not\x20found','sendStatus','UserId','Sequelize','Interaction\x20already\x20assigned','AbandonInteraction','attachmentUpload','file','originalname','basename','filename','type','mimetype','attachmentDownload','findOne','Unauthorized','download','server/files/attachments/','close','root','transcript-%s.txt','now','pathTranscript','Messages','User','ChatWebsite','%s%d','customer','Visitor','agentIdentifier','website_alias','agentAlias','System','agent_alias','fullname','agent_fullname','[%s]\x20%s:\x20%s\x0a','appendFileSync','MailAccount','MailServerOut','Smtp','service','host','port','secure','authentication','auth','pass','SendMail','sendMail','email','user','mailTranscript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','getMessages','ChatInteractionId','getMyMessages','secret','includeAgent','findAll','addTags','setTags','spread','Tag','color','chatInteractionTags:save','removeTags','unix','tmp','server','files','attachments','transcript-%d-%s.zip','CmContact','Contact','firstName','lastName','Attachment','Account','get','40px',' \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{page}}/{{pages}} \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','%s\x20#%d','mkdirSync','Owner','YYYY-MM-DD\x20HH:mm:ss','closedAt','browserName','referer','customerIp','existsSync','createReadStream','createWriteStream','direction','out','renderFile','views','downloadInteraction.html','toFile','.pdf','log','unlinkSync','eml-format','fast-json-patch','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatInteraction.socket'];(function(_0x35e75a,_0x5ed225){var _0xb23c7f=function(_0x2fa40c){while(--_0x2fa40c){_0x35e75a['push'](_0x35e75a['shift']());}};_0xb23c7f(++_0x5ed225);}(_0x85f7,0x10c));var _0x785f=function(_0x58d981,_0x21ac48){_0x58d981=_0x58d981-0x0;var _0x6dbef6=_0x85f7[_0x58d981];return _0x6dbef6;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x785f('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x785f('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x785f('0x2'));var util=require(_0x785f('0x3'));var path=require('path');var sox=require(_0x785f('0x4'));var csv=require(_0x785f('0x5'));var ejs=require(_0x785f('0x6'));var fs=require('fs');var _=require(_0x785f('0x7'));var squel=require(_0x785f('0x8'));var crypto=require(_0x785f('0x9'));var jsforce=require(_0x785f('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x785f('0x5'));var querystring=require(_0x785f('0xb'));var Papa=require(_0x785f('0xc'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x785f('0xd'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x785f('0xe'));var utils=require(_0x785f('0xf'));var config=require(_0x785f('0x10'));var db=require(_0x785f('0x11'))['db'];config['redis']=_[_0x785f('0x12')](config[_0x785f('0x13')],{'host':_0x785f('0x14'),'port':0x18eb});var socket=require(_0x785f('0x15'))(new Redis(config[_0x785f('0x13')]));require(_0x785f('0x16'))[_0x785f('0x17')](socket);var jayson=require(_0x785f('0x18'));var client=jayson[_0x785f('0x19')][_0x785f('0x1a')]({'port':0x232b});var client9004=jayson[_0x785f('0x19')][_0x785f('0x1a')]({'port':0x232c});function checkPasswordPattern(_0x70524e,_0x1ef051,_0x2c8693){if(_0x2c8693){var _0x3f3e9e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3f3e9e['test'](_0x1ef051)){return _0x70524e;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x70524e;}}function respondWithRpcPromise(_0xfd23a2,_0x230248,_0x3632e4,_0x2c4922){return new BPromise(function(_0x294eb2,_0x5bae8e){var _0x1664d3=_0x2c4922||client;return _0x1664d3['request'](_0xfd23a2,_0x3632e4)['then'](function(_0x5de107){logger[_0x785f('0x1b')]('ChatInteraction,\x20%s,\x20%s',_0x230248,'request\x20sent');logger[_0x785f('0x1c')](_0x785f('0x1d'),_0x230248,'request\x20sent',JSON[_0x785f('0x1e')](_0x5de107));if(_0x5de107[_0x785f('0x1f')]){if(_0x5de107['error']['code']===0x1f4){logger[_0x785f('0x1f')](_0x785f('0x20'),_0x230248,_0x5de107[_0x785f('0x1f')][_0x785f('0x21')]);return _0x5bae8e(_0x5de107['error'][_0x785f('0x21')]);}logger[_0x785f('0x1f')](_0x785f('0x20'),_0x230248,_0x5de107[_0x785f('0x1f')][_0x785f('0x21')]);return _0x294eb2(_0x5de107[_0x785f('0x1f')]['message']);}else{logger[_0x785f('0x1b')]('ChatInteraction,\x20%s,\x20%s',_0x230248,_0x785f('0x22'));_0x294eb2(_0x5de107['result'][_0x785f('0x21')]);}})[_0x785f('0x23')](function(_0x3d497d){logger[_0x785f('0x1f')]('ChatInteraction,\x20%s,\x20%s',_0x230248,_0x3d497d);_0x5bae8e(_0x3d497d);});});}function respondWithStatusCode(_0x51d694,_0x346d8d){_0x346d8d=_0x346d8d||0xcc;return function(_0x6d32c7){if(_0x6d32c7){return _0x51d694['sendStatus'](_0x346d8d);}return _0x51d694[_0x785f('0x24')](_0x346d8d)[_0x785f('0x25')]();};}function respondWithResult(_0x111a0,_0x1dbc65){_0x1dbc65=_0x1dbc65||0xc8;return function(_0xa25a05){if(_0xa25a05){return _0x111a0[_0x785f('0x24')](_0x1dbc65)[_0x785f('0x26')](_0xa25a05);}};}function respondWithFilteredResult(_0x3f56dc,_0x3ce78d){return function(_0x52580e){if(_0x52580e){var _0xc93552=_0x52580e[_0x785f('0x27')],_0x409344=_0x3ce78d['offset'],_0x32d861=_0x3ce78d['offset']+_0x3ce78d[_0x785f('0x28')],_0x52bef3;if(_0x32d861>=_0xc93552){_0x32d861=_0xc93552;_0x52bef3=0xc8;}else{_0x52bef3=0xce;}_0x3f56dc[_0x785f('0x24')](_0x52bef3);return _0x3f56dc['set'](_0x785f('0x29'),_0x409344+'-'+_0x32d861+'/'+_0xc93552)['json'](_0x52580e);}return null;};}function patchUpdates(_0x38da51){return function(_0x73ac6d){try{jsonpatch[_0x785f('0x2a')](_0x73ac6d,_0x38da51,!![]);}catch(_0x4bdf54){return BPromise['reject'](_0x4bdf54);}return _0x73ac6d[_0x785f('0x2b')]();};}function saveUpdates(_0x1a1f0c,_0x3f980f){return function(_0x5926f5){if(_0x5926f5){return _0x5926f5[_0x785f('0x2c')](_0x1a1f0c)[_0x785f('0x2d')](function(_0x1a8666){return _0x1a8666;});}return null;};}function removeEntity(_0x86bcf7,_0x37090c){return function(_0x96bca1){if(_0x96bca1){return _0x96bca1[_0x785f('0x2e')]()['then'](function(){_0x86bcf7[_0x785f('0x24')](0xcc)[_0x785f('0x25')]();});}};}function handleEntityNotFound(_0x3c108e,_0xd728b5){return function(_0x95cc35){if(!_0x95cc35){_0x3c108e['sendStatus'](0x194);}return _0x95cc35;};}function handleError(_0x475eeb,_0x577487){_0x577487=_0x577487||0x1f4;return function(_0x1c31c0){logger[_0x785f('0x1f')](_0x1c31c0['stack']);if(_0x1c31c0[_0x785f('0x2f')]){delete _0x1c31c0['name'];}_0x475eeb[_0x785f('0x24')](_0x577487)[_0x785f('0x30')](_0x1c31c0);};}function getInteractionUnreadMessages(_0x4806c7){return new BPromise(function(_0xf8cc04,_0x49afbd){try{if(_0x4806c7[_0x785f('0x31')]){_0x4806c7[_0x785f('0x32')]=0x0;_0xf8cc04(_0x4806c7);}else{return db[_0x785f('0x33')]['count']({'where':{'ChatInteractionId':_0x4806c7['id'],'direction':'in','read':![]}})['then'](function(_0x46e345){_0x4806c7[_0x785f('0x32')]=_0x46e345;_0xf8cc04(_0x4806c7);});}}catch(_0x479788){_0x49afbd(_0x479788);}});}function getInteractionUsers(_0x1d8f07,_0x4eff1c){return new BPromise(function(_0x1bce3a,_0x25f498){try{if(_0x4eff1c[_0x1d8f07['id']]){_0x1d8f07['Users']=_[_0x785f('0x34')](_0x4eff1c[_0x1d8f07['id']],function(_0x4a9a0a){return{'id':_0x4a9a0a['id']};});}}catch(_0x1d13f0){_0x25f498(_0x1d13f0);}_0x1bce3a(_0x1d8f07);});}function getInteractionTags(_0x487a11,_0x295c67){return new BPromise(function(_0x13907b,_0x2869f2){try{if(_0x487a11['TagIds']){_0x487a11[_0x785f('0x35')]=[];_0x487a11[_0x785f('0x36')][_0x785f('0x37')](',')['forEach'](function(_0x1d847e){_0x487a11[_0x785f('0x35')]['push'](_0x295c67[_0x1d847e]);});}delete _0x487a11['TagIds'];}catch(_0x4e4a48){_0x2869f2(_0x4e4a48);}_0x13907b(_0x487a11);});}function updateChatInteraction(_0x45707f,_0x2baeea,_0x101675){return new BPromise(function(_0x3cf1bf,_0x46ce8b){return getInteractionUnreadMessages(_0x45707f)['then'](function(_0x5ee1c7){return getInteractionUsers(_0x5ee1c7,_0x101675);})['then'](function(_0x2ade47){return getInteractionTags(_0x2ade47,_0x2baeea);})['then'](function(_0x1ccfeb){_0x3cf1bf(_0x1ccfeb);})[_0x785f('0x23')](function(_0x2660bb){_0x46ce8b(_0x2660bb);});});}exports[_0x785f('0x38')]=function(_0x189011,_0x29de58){var _0x55df5f={},_0x5c1b23={},_0x25adee={'count':0x0,'rows':[]};var _0x1cf42a=db[_0x785f('0x39')][_0x785f('0x3a')];_0x5c1b23[_0x785f('0x3b')]=_[_0x785f('0x3c')](_0x1cf42a);_0x5c1b23[_0x785f('0x3d')]=_['keys'](_0x189011['query']);_0x5c1b23[_0x785f('0x3e')]=_['intersection'](_0x5c1b23['model'],_0x5c1b23['query']);_0x55df5f['attributes']=_['intersection'](_0x5c1b23['model'],qs[_0x785f('0x3f')](_0x189011[_0x785f('0x3d')][_0x785f('0x3f')]));_0x55df5f[_0x785f('0x40')]=_0x55df5f[_0x785f('0x40')][_0x785f('0x41')]?_0x55df5f[_0x785f('0x40')]:_0x5c1b23[_0x785f('0x3b')];if(!_0x189011[_0x785f('0x3d')][_0x785f('0x42')](_0x785f('0x43'))){_0x55df5f[_0x785f('0x28')]=qs[_0x785f('0x28')](_0x189011[_0x785f('0x3d')][_0x785f('0x28')]);_0x55df5f[_0x785f('0x44')]=qs[_0x785f('0x44')](_0x189011[_0x785f('0x3d')][_0x785f('0x44')]);}_0x55df5f['order']=qs[_0x785f('0x45')](_0x189011[_0x785f('0x3d')]['sort']);_0x55df5f[_0x785f('0x46')]=qs[_0x785f('0x3e')](_[_0x785f('0x47')](_0x189011[_0x785f('0x3d')],_0x5c1b23[_0x785f('0x3e')]));var _0x4f6fb6=[];var _0x599d54=squel[_0x785f('0x48')]()[_0x785f('0x49')]('id')[_0x785f('0x49')](_0x785f('0x2f'))[_0x785f('0x49')]('color')[_0x785f('0x4a')]('tools_tags');var _0x29df8b=squel[_0x785f('0x48')]()[_0x785f('0x49')]('COUNT(*)')[_0x785f('0x4a')](_0x785f('0x4b'),'me')['where'](_0x785f('0x4c'))['where'](_0x785f('0x4d'))[_0x785f('0x46')](_0x785f('0x4e'));var _0x406a5c=squel['select']()[_0x785f('0x49')](_0x785f('0x4f'))[_0x785f('0x49')](_0x785f('0x50'))['from'](_0x785f('0x51'),'ui')[_0x785f('0x52')]('users','u',_0x785f('0x53'));var _0x596428=squel[_0x785f('0x48')]()[_0x785f('0x4a')](_0x785f('0x54'),'i')[_0x785f('0x52')]('cm_contacts','c',_0x785f('0x55'))[_0x785f('0x52')](_0x785f('0x56'),'o','o.id\x20=\x20i.UserId')['left_join'](_0x785f('0x57'),'a',_0x785f('0x58'))['left_join'](_0x785f('0x4b'),'me',_0x785f('0x4c'));var _0x38988d=squel['expr']();if(_0x189011[_0x785f('0x3d')][_0x785f('0x59')]){var _0x4a639a=JSON[_0x785f('0x5a')](_0x189011[_0x785f('0x3d')]['advancedFilter']);_[_0x785f('0x3c')](_0x4a639a)[_0x785f('0x5b')](function(_0x33d2f1){var _0x3a1a3a=_0x4a639a[_0x33d2f1];if(_0x33d2f1===_0x785f('0x5c')){var _0x2b2f89=moment(_0x3a1a3a[_0x785f('0x5d')][_0x785f('0x5e')])[_0x785f('0x5f')](_0x785f('0x60'))['utc']()['format']();var _0x366436=moment(_0x366436)[_0x785f('0x61')]()[_0x785f('0x62')](_0x785f('0x60'))[_0x785f('0x63')]();_0x38988d[_0x785f('0x64')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x2b2f89,_0x366436);}else{if(_[_0x785f('0x65')](_0x3a1a3a['condition'])){_0x3a1a3a[_0x785f('0x66')][_0x785f('0x5b')](function(_0x16ef5f){switch(_0x3a1a3a[_0x785f('0x66')][_0x785f('0x5d')]){case'IS':if(_0x33d2f1!==_0x785f('0x67')&&_0x33d2f1!==_0x785f('0x68')){if(_[_0x785f('0x65')](_0x3a1a3a[_0x785f('0x5d')])&&_0x3a1a3a[_0x785f('0x5d')]['length']>0x1){_0x38988d[_0x785f('0x64')](_0x3a1a3a['tableAlias']+'.'+_0x33d2f1+_0x785f('0x69'),_0x3a1a3a['value']);}else{_0x38988d[_0x785f('0x64')](_0x3a1a3a['tableAlias']+'.'+_0x33d2f1+_0x785f('0x6a'),_0x3a1a3a[_0x785f('0x5d')][0x0]);}}break;case'=':_0x38988d[_0x785f('0x64')](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+_0x785f('0x6a'),_0x3a1a3a[_0x785f('0x5d')]);break;case'LIKE':if(_0x33d2f1==='ContactId'){_0x38988d[_0x785f('0x64')]('c.firstName'+_0x785f('0x6c'),'%'+_0x3a1a3a[_0x785f('0x5d')]+'%');_0x38988d['or'](_0x785f('0x6d')+'\x20LIKE\x20?','%'+_0x3a1a3a[_0x785f('0x5d')]+'%');_0x38988d['or'](_0x785f('0x6e')+_0x785f('0x6c'),'%'+_0x3a1a3a[_0x785f('0x5d')]+'%');}else{_0x38988d[_0x785f('0x64')](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+_0x785f('0x6c'),'%'+_0x3a1a3a[_0x785f('0x5d')]+'%');}break;case'>':_0x38988d['and'](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+'\x20>\x20?',_0x3a1a3a[_0x785f('0x5d')]);break;case'<':_0x38988d[_0x785f('0x64')](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+_0x785f('0x6f'),_0x3a1a3a[_0x785f('0x5d')]);break;}});}else{switch(_0x3a1a3a[_0x785f('0x66')]['value']){case'IS':if(_0x33d2f1!==_0x785f('0x67')&&_0x33d2f1!==_0x785f('0x68')){if(_[_0x785f('0x65')](_0x3a1a3a[_0x785f('0x5d')])&&_0x3a1a3a[_0x785f('0x5d')][_0x785f('0x41')]>0x1){_0x38988d[_0x785f('0x64')](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+_0x785f('0x69'),_0x3a1a3a[_0x785f('0x5d')]);}else{_0x38988d[_0x785f('0x64')](_0x3a1a3a['tableAlias']+'.'+_0x33d2f1+_0x785f('0x6a'),_0x3a1a3a['value'][0x0]);}}break;case'=':_0x38988d['and'](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+'\x20=\x20?',_0x3a1a3a[_0x785f('0x5d')]);break;case _0x785f('0x70'):if(_0x33d2f1===_0x785f('0x71')){_0x38988d[_0x785f('0x64')]('c.firstName'+_0x785f('0x6c'),'%'+_0x3a1a3a[_0x785f('0x5d')]+'%');_0x38988d['or'](_0x785f('0x6d')+'\x20LIKE\x20?','%'+_0x3a1a3a[_0x785f('0x5d')]+'%');_0x38988d['or'](_0x785f('0x6e')+'\x20LIKE\x20?','%'+_0x3a1a3a[_0x785f('0x5d')]+'%');}else{_0x38988d[_0x785f('0x64')](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+_0x785f('0x6c'),'%'+_0x3a1a3a[_0x785f('0x5d')]+'%');}break;case'>':_0x38988d[_0x785f('0x64')](_0x3a1a3a['tableAlias']+'.'+_0x33d2f1+_0x785f('0x72'),_0x3a1a3a[_0x785f('0x5d')]);break;case'<':_0x38988d['and'](_0x3a1a3a[_0x785f('0x6b')]+'.'+_0x33d2f1+_0x785f('0x6f'),_0x3a1a3a[_0x785f('0x5d')]);break;}}}});}else{var _0x59a5b4=_(Object[_0x785f('0x3c')](_0x189011[_0x785f('0x3d')]))[_0x785f('0x34')](function(_0x5def26){return _0x1cf42a[_0x785f('0x42')](_0x5def26)?_0x5def26:undefined;})[_0x785f('0x73')](function(_0x372b4a){return!_[_0x785f('0x74')](_0x372b4a);})['value']();if(!_[_0x785f('0x75')](_0x59a5b4)){_0x59a5b4[_0x785f('0x5b')](function(_0x247b47){if(_0x247b47===_0x785f('0x76')){_0x596428[_0x785f('0x46')](_0x785f('0x77'),[][_0x785f('0x78')](_0x189011[_0x785f('0x3d')][_0x247b47]));}else if(_0x247b47===_0x785f('0x5c')){var _0x3646ae=JSON[_0x785f('0x5a')](_0x189011['query'][_0x247b47])[_0x785f('0x79')];var _0x3ed169=JSON['parse'](_0x189011[_0x785f('0x3d')][_0x247b47])[_0x785f('0x7a')];_0x596428['where'](_0x785f('0x7b'),_0x3646ae,_0x3ed169);}else{if(_0x189011['query'][_0x247b47]===_0x785f('0x7c')){_0x596428[_0x785f('0x46')]('i.'+_0x247b47+_0x785f('0x7d'));}else{_0x596428['where']('i.'+_0x247b47+'\x20=\x20?',_0x189011[_0x785f('0x3d')][_0x247b47]);}}});}if(_0x189011[_0x785f('0x3d')][_0x785f('0x73')]){var _0x48f30d=_0x189011[_0x785f('0x3d')][_0x785f('0x73')][_0x785f('0x7e')]('\x5c','\x5c\x5c')['replace']('\x27\x27',_0x785f('0x7f'));if(qs[_0x785f('0x80')](_0x48f30d)){_0x38988d['or'](_0x785f('0x81'),_0x48f30d+'%');}else{var _0x4d2793=[];_0x48f30d[_0x785f('0x37')]('\x20')['forEach'](function(_0x408433){_0x4d2793[_0x785f('0x82')]('+'+_0x408433[_0x785f('0x83')]());});var _0x227be1=_0x4d2793[_0x785f('0x84')]('\x20');_0x38988d['or'](_0x785f('0x85'),_0x227be1)['or'](_0x785f('0x86'),_0x48f30d+'%');}}}_0x596428[_0x785f('0x46')](_0x38988d);if(_0x55df5f[_0x785f('0x87')]){_0x55df5f[_0x785f('0x87')][_0x785f('0x5b')](function(_0x4b37a2){_0x596428[_0x785f('0x87')]('i.'+_0x4b37a2[0x0],_0x4b37a2[0x1]===_0x785f('0x88')?![]:!![]);});}_0x596428[_0x785f('0x89')](_0x785f('0x8a'));var _0x5282ef={'type':db['Sequelize'][_0x785f('0x8b')][_0x785f('0x8c')],'raw':!![]};var _0x3b50f3=_0x596428[_0x785f('0x8d')]()[_0x785f('0x49')]('COUNT(*)');if(!_0x189011[_0x785f('0x3d')][_0x785f('0x59')]){if(_0x189011[_0x785f('0x3d')]['read']){if(_0x189011[_0x785f('0x3d')][_0x785f('0x8e')]==0x1){_0x3b50f3[_0x785f('0x46')](util['format'](_0x785f('0x8f'),_0x29df8b[_0x785f('0x83')]()));_0x596428[_0x785f('0x90')](_0x785f('0x91'));}else{_0x3b50f3[_0x785f('0x46')](util[_0x785f('0x63')](_0x785f('0x92'),_0x29df8b[_0x785f('0x83')]()));_0x596428[_0x785f('0x90')](_0x785f('0x93'));}}if(_0x189011[_0x785f('0x3d')][_0x785f('0x94')]){var _0x154a9c=_[_0x785f('0x65')](_0x189011['query'][_0x785f('0x94')])?_0x189011[_0x785f('0x3d')][_0x785f('0x94')]:new Array(_0x189011['query'][_0x785f('0x94')]);var _0x4e05a3=squel['expr']();_0x154a9c['forEach'](function(_0x2aca86){_0x4e05a3['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x2aca86+',%');});_0x596428[_0x785f('0x90')](_0x4e05a3);_0x3b50f3[_0x785f('0x52')]('chat_interaction_has_tags','it',_0x785f('0x95'));_0x3b50f3['left_join'](_0x785f('0x96'),'t',_0x785f('0x97'));_0x3b50f3[_0x785f('0x46')](_0x785f('0x98'),_0x154a9c);}}else{var _0x4a639a=JSON[_0x785f('0x5a')](_0x189011['query'][_0x785f('0x59')]);_['keys'](_0x4a639a)[_0x785f('0x5b')](function(_0x1670a5){var _0x1a5124=_0x4a639a[_0x1670a5];if(_0x1670a5===_0x785f('0x67')){var _0x578083=_0x1a5124[_0x785f('0x5d')];var _0xad379f=squel['expr']();_0x578083['forEach'](function(_0x17214c){_0xad379f['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x17214c+',%');});_0x596428[_0x785f('0x90')](_0xad379f);_0x3b50f3[_0x785f('0x52')](_0x785f('0x99'),'it',_0x785f('0x9a'));_0x3b50f3[_0x785f('0x52')](_0x785f('0x96'),'t','t.id\x20=\x20it.TagId');_0x3b50f3[_0x785f('0x46')](_0x785f('0x98'),_0x578083);}else if(_0x1670a5===_0x785f('0x68')){if(_0x1a5124[_0x785f('0x5d')][_0x785f('0x41')]===0x1){if(_0x1a5124[_0x785f('0x5d')][0x0]===0x1){_0x3b50f3['where'](util[_0x785f('0x63')]('%s\x20=\x200',_0x29df8b['toString']()));_0x596428[_0x785f('0x90')](_0x785f('0x91'));}else{_0x3b50f3[_0x785f('0x46')](util[_0x785f('0x63')](_0x785f('0x92'),_0x29df8b[_0x785f('0x83')]()));_0x596428['having']('`Messages.count`\x20>\x200');}}}});}db['sequelize'][_0x785f('0x3d')](_0x3b50f3[_0x785f('0x83')](),_0x5282ef)[_0x785f('0x2d')](function(_0x92adaa){_0x25adee[_0x785f('0x27')]=_0x92adaa[_0x785f('0x41')];if(_0x25adee[_0x785f('0x27')]===0x0)return[];return db[_0x785f('0x9b')][_0x785f('0x3d')](_0x599d54[_0x785f('0x83')](),_0x5282ef)['then'](function(_0x269677){_0x4f6fb6=_[_0x785f('0x9c')](_0x269677,'id');_0x5282ef=_[_0x785f('0x9d')](_0x5282ef,{'model':db[_0x785f('0x39')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x596428[_0x785f('0x49')](_0x785f('0x9e'),_0x785f('0x9f'));_0x596428['field'](_0x785f('0xa0'));_0x596428[_0x785f('0x49')]('c.firstName',_0x785f('0xa1'));_0x596428[_0x785f('0x49')](_0x785f('0x6d'),_0x785f('0xa2'));_0x596428[_0x785f('0x49')](_0x785f('0x6e'),'Contact.email');_0x596428[_0x785f('0x49')](_0x785f('0xa3'),_0x785f('0xa4'));_0x596428[_0x785f('0x49')](_0x785f('0xa5'),_0x785f('0xa6'));_0x596428[_0x785f('0x49')]('c.fax',_0x785f('0xa7'));_0x596428['field']('GROUP_CONCAT(DISTINCT\x20t.id)',_0x785f('0x36'));_0x596428['left_join'](_0x785f('0xa8'),'it',_0x785f('0x95'));_0x596428[_0x785f('0x52')](_0x785f('0x96'),'t','t.id\x20=\x20it.TagId');_0x596428[_0x785f('0x28')](_0x55df5f[_0x785f('0x28')]);_0x596428[_0x785f('0x44')](_0x55df5f[_0x785f('0x44')]);return db[_0x785f('0x9b')]['query'](_0x596428['toString'](),_0x5282ef);})[_0x785f('0x2d')](function(_0x1f1f9e){_0x406a5c[_0x785f('0x46')](_0x785f('0xa9'),_[_0x785f('0x34')](_0x1f1f9e,'id'));return db[_0x785f('0x9b')][_0x785f('0x3d')](_0x406a5c[_0x785f('0x83')](),_0x5282ef)[_0x785f('0x2d')](function(_0x3f90d5){var _0x55aab7=_[_0x785f('0xaa')](_0x3f90d5,'ChatInteractionId');var _0x25d098=[];_0x1f1f9e[_0x785f('0x5b')](function(_0x1db6d6){_0x25d098[_0x785f('0x82')](updateChatInteraction(_0x1db6d6,_0x4f6fb6,_0x55aab7));});return BPromise[_0x785f('0xab')](_0x25d098);});});})[_0x785f('0x2d')](function(_0x29580e){_0x25adee[_0x785f('0xac')]=_0x29580e;return _0x25adee;})['then'](respondWithFilteredResult(_0x29de58,_0x55df5f))['catch'](handleError(_0x29de58,null));};exports[_0x785f('0xad')]=function(_0x2941c0,_0x4785ad){var _0x4133af={'raw':![],'where':{'id':_0x2941c0[_0x785f('0xae')]['id']}},_0x36564b={};_0x36564b[_0x785f('0x3b')]=_[_0x785f('0x3c')](db[_0x785f('0x39')][_0x785f('0x3a')]);_0x36564b[_0x785f('0x3d')]=_[_0x785f('0x3c')](_0x2941c0['query']);_0x36564b['filters']=_[_0x785f('0xaf')](_0x36564b[_0x785f('0x3b')],_0x36564b[_0x785f('0x3d')]);_0x4133af['attributes']=_[_0x785f('0xaf')](_0x36564b['model'],qs[_0x785f('0x3f')](_0x2941c0[_0x785f('0x3d')]['fields']));_0x4133af['attributes']=_0x4133af[_0x785f('0x40')][_0x785f('0x41')]?_0x4133af[_0x785f('0x40')]:_0x36564b[_0x785f('0x3b')];if(_0x2941c0[_0x785f('0x3d')][_0x785f('0xb0')]){_0x4133af[_0x785f('0xb1')]=[{'all':!![]}];}_0x4133af=_[_0x785f('0x9d')]({},_0x4133af,_0x2941c0[_0x785f('0xb2')]);return db[_0x785f('0x39')][_0x785f('0xb3')](_0x4133af)['then'](handleEntityNotFound(_0x4785ad,null))[_0x785f('0x2d')](respondWithResult(_0x4785ad,null))[_0x785f('0x23')](handleError(_0x4785ad,null));};exports['create']=function(_0x3b383c,_0x39fcb7){return db[_0x785f('0x39')][_0x785f('0xb4')](_0x3b383c[_0x785f('0xb5')],{})[_0x785f('0x2d')](respondWithResult(_0x39fcb7,0xc9))[_0x785f('0x23')](handleError(_0x39fcb7,null));};exports[_0x785f('0x2c')]=function(_0x4456de,_0x1974ae){if(_0x4456de[_0x785f('0xb5')]['id']){delete _0x4456de[_0x785f('0xb5')]['id'];}return db[_0x785f('0x39')][_0x785f('0xb3')]({'where':{'id':_0x4456de[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x1974ae,null))[_0x785f('0x2d')](saveUpdates(_0x4456de[_0x785f('0xb5')],null))[_0x785f('0x2d')](respondWithResult(_0x1974ae,null))[_0x785f('0x23')](handleError(_0x1974ae,null));};exports[_0x785f('0x2e')]=function(_0x53c1aa,_0x53f32d){return db['ChatInteraction'][_0x785f('0xb3')]({'where':{'id':_0x53c1aa[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x53f32d,null))[_0x785f('0x2d')](removeEntity(_0x53f32d,null))[_0x785f('0x23')](handleError(_0x53f32d,null));};exports[_0x785f('0xb6')]=function(_0x23bda3,_0x5c4093){return db[_0x785f('0x39')][_0x785f('0xb6')]()[_0x785f('0x2d')](respondWithResult(_0x5c4093,null))[_0x785f('0x23')](handleError(_0x5c4093,null));};exports[_0x785f('0xb7')]=function(_0x340f4f,_0x4dcf99){if(_0x340f4f['body']['id']){delete _0x340f4f[_0x785f('0xb5')]['id'];}return db[_0x785f('0x39')][_0x785f('0xb3')]({'where':{'id':_0x340f4f[_0x785f('0xae')]['id']}})['then'](handleEntityNotFound(_0x4dcf99,null))[_0x785f('0x2d')](saveUpdates(_0x340f4f['body'],null))[_0x785f('0x2d')](respondWithResult(_0x4dcf99,null))[_0x785f('0x23')](handleError(_0x4dcf99,null));};exports['abandon']=function(_0x5305c7,_0x105c03,_0x3874d9){if(_0x5305c7[_0x785f('0xb5')]['id']){delete _0x5305c7[_0x785f('0xb5')]['id'];}return db[_0x785f('0x39')][_0x785f('0xb3')]({'where':{'id':_0x5305c7[_0x785f('0xae')]['id']}})['then'](function(_0x756fbd){if(!_0x756fbd){logger[_0x785f('0x1f')](_0x785f('0xb8'),_0x785f('0xb9'),0x194,_0x785f('0xba'));_0x105c03[_0x785f('0xbb')](0x194);}else{if(_0x756fbd[_0x785f('0xbc')]){throw new db[(_0x785f('0xbd'))]['ValidationError'](_0x785f('0xbe'));}}return _0x756fbd;})[_0x785f('0x2d')](function(_0x179cb7){if(_0x179cb7){return _0x179cb7[_0x785f('0x2c')]({'closed':_0x5305c7[_0x785f('0xb5')][_0x785f('0x31')],'disposition':_0x5305c7[_0x785f('0xb5')]['disposition']})['then'](function(_0x36f119){return _0x36f119;});}})[_0x785f('0x2d')](function(_0x2273db){return respondWithRpcPromise(_0x785f('0xbf'),'abandon',_0x5305c7[_0x785f('0xb5')],client9004);})[_0x785f('0x2d')](respondWithResult(_0x105c03,null))[_0x785f('0x23')](handleError(_0x105c03,null));};exports[_0x785f('0xc0')]=function(_0x5f0241,_0x45b844,_0x4cc7a1){_0x5f0241[_0x785f('0xb5')][_0x785f('0x2f')]=_0x5f0241[_0x785f('0xc1')][_0x785f('0xc2')];_0x5f0241[_0x785f('0xb5')][_0x785f('0xc3')]=_0x5f0241[_0x785f('0xc1')][_0x785f('0xc4')];_0x5f0241[_0x785f('0xb5')][_0x785f('0xc5')]=_0x5f0241[_0x785f('0xc1')][_0x785f('0xc6')];return db['Attachment']['create'](_0x5f0241[_0x785f('0xb5')])[_0x785f('0x2d')](respondWithResult(_0x45b844,0xc9))[_0x785f('0x23')](handleError(_0x45b844,null));};exports[_0x785f('0xc7')]=function(_0x46b508,_0x52fb9a,_0x5d9dd3){return db[_0x785f('0x39')][_0x785f('0xc8')]({'where':{'id':_0x46b508['params']['id']},'raw':!![]})[_0x785f('0x2d')](handleEntityNotFound(_0x52fb9a,null))['then'](function(_0x14501f){if(_0x14501f){if(_0x14501f[_0x785f('0x31')]){return _0x52fb9a[_0x785f('0x24')](0x193)['json']({'status':0x193,'message':_0x785f('0xc9')});}return db['Attachment'][_0x785f('0xc8')]({'where':{'id':_0x46b508['query']['attachId']},'raw':!![]})[_0x785f('0x2d')](handleEntityNotFound(_0x52fb9a,null));}})['then'](function(_0x63c309){if(_0x63c309){return _0x52fb9a[_0x785f('0xca')](path['join'](config['root'],_0x785f('0xcb'),_0x63c309[_0x785f('0xc3')]));}})[_0x785f('0x23')](handleError(_0x52fb9a,null));};exports[_0x785f('0xcc')]=function(_0x508371,_0xb9294f){var _0x443e11=null;var _0x589989=null;var _0x5566d0=null;var _0x45192d=null;if(_0x508371['body']['id']){delete _0x508371[_0x785f('0xb5')]['id'];}if(_0x508371[_0x785f('0xb5')]['mailTranscript']){_0x45192d=path[_0x785f('0x84')](config[_0x785f('0xcd')],'server/files/chat/upload/',util[_0x785f('0x63')](_0x785f('0xce'),Date[_0x785f('0xcf')]()));_0x508371[_0x785f('0xb5')][_0x785f('0xd0')]=_0x45192d;}return db[_0x785f('0x39')][_0x785f('0xb3')]({'where':{'id':_0x508371['params']['id']},'include':[{'model':db[_0x785f('0x33')],'as':_0x785f('0xd1'),'include':[{'model':db[_0x785f('0xd2')],'as':_0x785f('0xd2')}]}]})[_0x785f('0x2d')](handleEntityNotFound(_0xb9294f,null))[_0x785f('0x2d')](saveUpdates(_0x508371['body'],null))[_0x785f('0x2d')](function(_0x294204){if(_0x294204){_0x443e11=_0x294204;return db[_0x785f('0xd3')]['find']({'where':{'id':_0x443e11[_0x785f('0x76')]}});}})[_0x785f('0x2d')](function(_0x58427e){if(_0x58427e){_0x5566d0=_0x58427e;return db['CmContact'][_0x785f('0xb3')]({'where':{'id':_0x443e11[_0x785f('0x71')]}});}})[_0x785f('0x2d')](function(_0x416b8d){if(_0x416b8d){_0x589989=_0x416b8d;if(_0x45192d){var _0x1bd630=null;for(var _0x4de36e=0x1;_0x4de36e<_0x443e11['Messages'][_0x785f('0x41')];++_0x4de36e){_0x1bd630=_0x443e11[_0x785f('0xd1')][_0x4de36e];var _0x5bbb09=_0x1bd630[_0x785f('0xbc')]?util[_0x785f('0x63')](_0x785f('0xd4'),_0x5566d0['agentAlias'],_0x1bd630['UserId']):'System';var _0x49d1e4=_0x508371[_0x785f('0xb5')][_0x785f('0xd5')]||util[_0x785f('0x63')](_0x785f('0xd4'),_0x785f('0xd6'),_0x1bd630['ContactId']);switch(_0x5566d0[_0x785f('0xd7')]){case _0x785f('0xd8'):_0x5bbb09=_0x1bd630[_0x785f('0xbc')]?util[_0x785f('0x63')](_0x785f('0xd4'),_0x5566d0[_0x785f('0xd9')],_0x1bd630[_0x785f('0xbc')]):_0x785f('0xda');break;case _0x785f('0xdb'):_0x5bbb09=_0x1bd630[_0x785f('0xbc')]?_0x1bd630[_0x785f('0xd2')]['alias']||_0x1bd630['User'][_0x785f('0xdc')]:_0x785f('0xda');break;case _0x785f('0xdd'):_0x5bbb09=_0x1bd630[_0x785f('0xbc')]?_0x1bd630[_0x785f('0xd2')]['fullname']:_0x785f('0xda');break;default:_0x5bbb09=_0x1bd630['UserId']?util['format'](_0x785f('0xd4'),_0x5566d0[_0x785f('0xd9')],_0x1bd630[_0x785f('0xbc')]):'System';}var _0x1006d5=util[_0x785f('0x63')](_0x785f('0xde'),moment(_0x1bd630[_0x785f('0x5c')])[_0x785f('0x63')]('MM/DD/YYYY\x20HH:mm:ss'),_0x1bd630['direction']==='in'?_0x49d1e4:_0x5bbb09,_0x1bd630['body']);if(!_0x1bd630['secret']){fs[_0x785f('0xdf')](_0x45192d,_0x1006d5);}}return db[_0x785f('0xe0')][_0x785f('0xc8')]({'where':{'service':!![]},'include':[{'model':db[_0x785f('0xe1')],'as':_0x785f('0xe2'),'raw':!![]}]});}}})[_0x785f('0x2d')](function(_0x7e1772){if(_0x7e1772&&_0x7e1772['Smtp']&&_0x508371[_0x785f('0xb5')]){var _0x599517={'tls':{'rejectUnauthorized':![]}};if(_0x7e1772[_0x785f('0xe2')]['service']){_0x599517['service']=_0x7e1772[_0x785f('0xe2')][_0x785f('0xe3')];}else{_0x599517['host']=_0x7e1772[_0x785f('0xe2')][_0x785f('0xe4')];_0x599517[_0x785f('0xe5')]=_0x7e1772[_0x785f('0xe2')]['port'];_0x599517[_0x785f('0xe6')]=_0x7e1772['Smtp'][_0x785f('0xe6')];}if(_0x7e1772[_0x785f('0xe2')][_0x785f('0xe7')]){_0x599517[_0x785f('0xe8')]={'user':_0x7e1772['Smtp']['user'],'pass':_0x7e1772[_0x785f('0xe2')][_0x785f('0xe9')]};}return respondWithRpcPromise(_0x785f('0xea'),_0x785f('0xeb'),{'account':_0x599517,'message':{'from':util[_0x785f('0x63')]('\x22%s\x22\x20<%s>',_0x7e1772[_0x785f('0x2f')],_0x7e1772[_0x785f('0xec')]||_0x7e1772[_0x785f('0xe2')][_0x785f('0xed')]),'to':_0x508371[_0x785f('0xb5')][_0x785f('0xee')],'subject':'Mail\x20Transcript','text':util[_0x785f('0x63')](_0x785f('0xef'),_0x508371['body']['mailTranscript']),'attachments':[{'path':_0x45192d}]}})[_0x785f('0x2d')](function(){return _0x443e11;})[_0x785f('0x23')](function(_0x584b10){console[_0x785f('0x1f')](_0x584b10);});}else{return _0x443e11;}})[_0x785f('0x2d')](respondWithStatusCode(_0xb9294f,0xc8))[_0x785f('0x23')](handleError(_0xb9294f,null));};exports[_0x785f('0xf0')]=function(_0x436941,_0x2f3053,_0x118011){return db[_0x785f('0x33')][_0x785f('0xb3')]({'where':{'id':_0x436941[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x2f3053,null))[_0x785f('0x2d')](function(_0x4d2787){if(_0x4d2787){return _0x4d2787[_0x785f('0xf0')](_0x436941[_0x785f('0xb5')][_0x785f('0xf1')],_[_0x785f('0xf2')](_0x436941[_0x785f('0xb5')],[_0x785f('0xf1'),'id'])||{});}})[_0x785f('0x2d')](respondWithResult(_0x2f3053,null))[_0x785f('0x23')](handleError(_0x2f3053,null));};exports[_0x785f('0xf3')]=function(_0x4f9c73,_0x487cc6,_0x2f02cd){var _0x8ae2b2={'raw':![],'where':{}};var _0x4dfe35={};var _0xd9a2fe={'count':0x0,'rows':[]};return db[_0x785f('0x39')]['findOne']({'where':{'id':_0x4f9c73[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x487cc6,null))['then'](function(_0x2d9c13){if(_0x2d9c13){_0x4dfe35[_0x785f('0x3b')]=_['keys'](db[_0x785f('0x33')][_0x785f('0x3a')]);_0x4dfe35['query']=_[_0x785f('0x3c')](_0x4f9c73['query']);_0x4dfe35[_0x785f('0x3e')]=_[_0x785f('0xaf')](_0x4dfe35[_0x785f('0x3b')],_0x4dfe35[_0x785f('0x3d')]);_0x8ae2b2[_0x785f('0x40')]=_[_0x785f('0xaf')](_0x4dfe35[_0x785f('0x3b')],qs[_0x785f('0x3f')](_0x4f9c73[_0x785f('0x3d')][_0x785f('0x3f')]));_0x8ae2b2['attributes']=_0x8ae2b2[_0x785f('0x40')]['length']?_0x8ae2b2[_0x785f('0x40')]:_0x4dfe35[_0x785f('0x3b')];if(!_0x4f9c73[_0x785f('0x3d')][_0x785f('0x42')]('nolimit')){_0x8ae2b2[_0x785f('0x28')]=qs[_0x785f('0x28')](_0x4f9c73[_0x785f('0x3d')][_0x785f('0x28')]);_0x8ae2b2['offset']=qs[_0x785f('0x44')](_0x4f9c73[_0x785f('0x3d')]['offset']);}_0x8ae2b2['order']=qs[_0x785f('0x45')](_0x4f9c73[_0x785f('0x3d')][_0x785f('0x45')]);_0x8ae2b2[_0x785f('0x46')]=qs[_0x785f('0x3e')](_[_0x785f('0x47')](_0x4f9c73['query'],_0x4dfe35['filters']));_0x8ae2b2[_0x785f('0x46')][_0x785f('0xf4')]=_0x2d9c13['id'];if(_0x4f9c73[_0x785f('0x3d')]['filter']){_0x8ae2b2['where']=_[_0x785f('0x9d')](_0x8ae2b2[_0x785f('0x46')],{'$or':_[_0x785f('0x34')](_0x8ae2b2[_0x785f('0x40')],function(_0x431336){var _0x1d6d5b={};_0x1d6d5b[_0x431336]={'$like':'%'+_0x4f9c73[_0x785f('0x3d')][_0x785f('0x73')]+'%'};return _0x1d6d5b;})});}if(_0x4f9c73[_0x785f('0x3d')]['$gte']){var _0x24581c=_0x4f9c73[_0x785f('0x3d')][_0x785f('0x79')][_0x785f('0x37')](',');var _0xac6655={};_0xac6655[_0x24581c[0x0]]={'$gte':moment(_0x24581c[0x1])[_0x785f('0x63')]('YYYY-MM-DD\x20HH:mm:ss')};_0x8ae2b2['where']=_['merge'](_0x8ae2b2[_0x785f('0x46')],_0xac6655);}_0x8ae2b2=_['merge']({},_0x8ae2b2,_0x4f9c73[_0x785f('0xb2')]);return db[_0x785f('0x33')][_0x785f('0x27')]({'where':_0x8ae2b2[_0x785f('0x46')]})['then'](function(_0x1af587){_0xd9a2fe[_0x785f('0x27')]=_0x1af587;if(_0x4f9c73[_0x785f('0x3d')][_0x785f('0xb0')]){_0x8ae2b2[_0x785f('0xb1')]=[{'all':!![]}];}return db[_0x785f('0x33')]['findAll'](_0x8ae2b2);})[_0x785f('0x2d')](function(_0x3459be){_0xd9a2fe[_0x785f('0xac')]=_0x3459be;return _0xd9a2fe;});}})[_0x785f('0x2d')](respondWithFilteredResult(_0x487cc6,_0x8ae2b2))[_0x785f('0x23')](handleError(_0x487cc6,null));};exports[_0x785f('0xf5')]=function(_0x335dbc,_0x511cbd,_0x520611){var _0x3a3538={'where':{}},_0x47769e={},_0x1b4da7={'count':0x0,'rows':[]};return db['ChatInteraction'][_0x785f('0xc8')]({'where':{'id':_0x335dbc[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x511cbd,null))['then'](function(_0x3640be){if(_0x3640be){_0x47769e[_0x785f('0x3b')]=_[_0x785f('0x3c')](db['ChatMessage']['rawAttributes']);_0x47769e[_0x785f('0x3d')]=_['keys'](_0x335dbc[_0x785f('0x3d')]);_0x47769e[_0x785f('0x3e')]=_[_0x785f('0xaf')](_0x47769e[_0x785f('0x3b')],_0x47769e[_0x785f('0x3d')]);_0x3a3538['attributes']=_[_0x785f('0xaf')](_0x47769e[_0x785f('0x3b')],qs[_0x785f('0x3f')](_0x335dbc[_0x785f('0x3d')][_0x785f('0x3f')]));_0x3a3538[_0x785f('0x40')]=_0x3a3538[_0x785f('0x40')]['length']?_0x3a3538[_0x785f('0x40')]:_0x47769e[_0x785f('0x3b')];if(!_0x335dbc['query'][_0x785f('0x42')](_0x785f('0x43'))){_0x3a3538['limit']=qs[_0x785f('0x28')](_0x335dbc[_0x785f('0x3d')][_0x785f('0x28')]);_0x3a3538[_0x785f('0x44')]=qs[_0x785f('0x44')](_0x335dbc[_0x785f('0x3d')][_0x785f('0x44')]);}_0x3a3538[_0x785f('0x87')]=qs[_0x785f('0x45')](_0x335dbc[_0x785f('0x3d')]['sort']);_0x3a3538[_0x785f('0x46')]=qs[_0x785f('0x3e')](_['pick'](_0x335dbc['query'],_0x47769e[_0x785f('0x3e')]));_0x3a3538[_0x785f('0x46')][_0x785f('0xf4')]=_0x3640be['id'];if(_0x335dbc[_0x785f('0x3d')][_0x785f('0x73')]){_0x3a3538[_0x785f('0x46')]=_[_0x785f('0x9d')](_0x3a3538[_0x785f('0x46')],{'$or':_['map'](_0x3a3538[_0x785f('0x40')],function(_0x5cdba8){var _0x2f958d={};_0x2f958d[_0x5cdba8]={'$like':'%'+_0x335dbc[_0x785f('0x3d')][_0x785f('0x73')]+'%'};return _0x2f958d;})});}_0x3a3538[_0x785f('0x46')][_0x785f('0xf6')]=![];if(_0x335dbc[_0x785f('0x3d')]['id']){_0x3a3538['where']['id']={'$gt':_0x335dbc[_0x785f('0x3d')]['id']};}_0x3a3538=_[_0x785f('0x9d')]({},_0x3a3538,_0x335dbc[_0x785f('0xb2')]);return db['ChatMessage'][_0x785f('0x27')]({'where':_0x3a3538['where']})['then'](function(_0x331f8f){_0x1b4da7[_0x785f('0x27')]=_0x331f8f;_0x3a3538[_0x785f('0xb1')]=[];if(_0x335dbc['query'][_0x785f('0xf7')]){_0x3a3538[_0x785f('0xb1')]['push']({'model':db['User'],'as':_0x785f('0xd2'),'attributes':['id',_0x785f('0xdc'),'alias']});}if(_0x335dbc[_0x785f('0x3d')][_0x785f('0xb0')]){_0x3a3538[_0x785f('0xb1')]=[{'all':!![]}];}return db[_0x785f('0x33')][_0x785f('0xf8')](_0x3a3538);})[_0x785f('0x2d')](function(_0x23b72d){_0x1b4da7[_0x785f('0xac')]=_0x23b72d;return _0x1b4da7;});}})[_0x785f('0x2d')](respondWithFilteredResult(_0x511cbd,_0x3a3538))[_0x785f('0x23')](handleError(_0x511cbd,null));};exports[_0x785f('0xf9')]=function(_0x15e80d,_0x184f3d,_0x18770a){return db[_0x785f('0x39')][_0x785f('0xb3')]({'where':{'id':_0x15e80d[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x184f3d,null))['then'](function(_0x4b871d){if(_0x4b871d){return _0x4b871d[_0x785f('0xfa')](_0x15e80d['body']['ids'],_[_0x785f('0xf2')](_0x15e80d['body'],[_0x785f('0xf1'),'id'])||{})[_0x785f('0xfb')](function(){return db[_0x785f('0xfc')][_0x785f('0xf8')]({'attributes':['id','name',_0x785f('0xfd')],'where':{'id':_0x15e80d[_0x785f('0xb5')]['ids']}});})['then'](function(_0x3e8d6a){socket['emit'](_0x785f('0xfe'),{'id':Number(_0x15e80d[_0x785f('0xae')]['id']),'tags':_0x3e8d6a||[]});return{'id':Number(_0x15e80d[_0x785f('0xae')]['id']),'tags':_0x3e8d6a||[]};});}})['then'](respondWithResult(_0x184f3d,null))[_0x785f('0x23')](handleError(_0x184f3d,null));};exports[_0x785f('0xff')]=function(_0x471fe7,_0x545239,_0x472257){return db[_0x785f('0x39')][_0x785f('0xb3')]({'where':{'id':_0x471fe7[_0x785f('0xae')]['id']}})[_0x785f('0x2d')](handleEntityNotFound(_0x545239,null))['then'](function(_0x12e728){if(_0x12e728){return _0x12e728[_0x785f('0xff')](_0x471fe7[_0x785f('0x3d')][_0x785f('0xf1')]);}})[_0x785f('0x2d')](respondWithStatusCode(_0x545239,null))[_0x785f('0x23')](handleError(_0x545239,null));};exports[_0x785f('0xca')]=function(_0x471e0f,_0x28cb56){var _0xb81abd=moment()[_0x785f('0x100')]()[_0x785f('0x83')]();var _0x3270ee=path[_0x785f('0x84')](config['root'],'server','files',_0x785f('0x101'));var _0x289583=path[_0x785f('0x84')](config['root'],_0x785f('0x102'),_0x785f('0x103'),_0x785f('0x104'));var _0x5aab2c=path[_0x785f('0x84')](_0x3270ee,_0xb81abd);var _0x5cda6d=util[_0x785f('0x63')](_0x785f('0x105'),_0x471e0f[_0x785f('0xae')]['id'],_0xb81abd);var _0x1094a2=path['join'](_0x3270ee,_0x5cda6d);var _0x447916=![];return db['ChatInteraction'][_0x785f('0xb3')]({'where':{'id':_0x471e0f[_0x785f('0xae')]['id']},'include':[{'model':db[_0x785f('0x33')],'as':_0x785f('0xd1'),'attributes':['id',_0x785f('0xb5'),'createdAt','direction','secret'],'include':[{'model':db[_0x785f('0xd2')],'as':_0x785f('0xd2'),'attributes':['id','fullname'],'raw':!![]},{'model':db[_0x785f('0x106')],'as':_0x785f('0x107'),'attributes':['id',_0x785f('0x108'),_0x785f('0x109')],'raw':!![]},{'model':db['Attachment'],'as':_0x785f('0x10a'),'raw':!![]}]},{'model':db['ChatWebsite'],'as':_0x785f('0x10b'),'attributes':['id',_0x785f('0x2f')]},{'model':db[_0x785f('0xd2')],'as':'Owner','attributes':['id',_0x785f('0xdc')]}]})[_0x785f('0x2d')](handleEntityNotFound(_0x28cb56,null))[_0x785f('0x2d')](function(_0x7bcceb){if(_0x7bcceb){var _0xcfeed0=_0x7bcceb[_0x785f('0x10c')]({'plain':!![]});_0x447916=!![];var _0x2d323f={'format':'A4','border':'10px','header':{'height':_0x785f('0x10d'),'contents':{'first':'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Interaction\x20Transcript \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
'}},'footer':{'height':'30px','contents':{'default':util[_0x785f('0x63')](_0x785f('0x10e'),util[_0x785f('0x63')](_0x785f('0x10f'),'Chat',_0xcfeed0['id']),moment()[_0x785f('0x63')]('YYYY-MM-DD')[_0x785f('0x83')]())}}};fs[_0x785f('0x110')](_0x5aab2c);var _0x39dd5f={'channel':'Chat','account':_0xcfeed0[_0x785f('0x10b')][_0x785f('0x2f')],'agent':_0xcfeed0['Owner']?_0xcfeed0[_0x785f('0x111')]['fullname']:'N.A.','createdAt':moment(_0xcfeed0[_0x785f('0x5c')])['format'](_0x785f('0x112'))['toString'](),'closedAt':_0xcfeed0[_0x785f('0x31')]?moment(_0xcfeed0[_0x785f('0x113')])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0x785f('0x83')]():'','disposition':_0xcfeed0['disposition'],'chatInfo':{'browser':_0xcfeed0[_0x785f('0x114')],'os':_0xcfeed0['osName'],'referer':_0xcfeed0[_0x785f('0x115')],'customerIp':_0xcfeed0[_0x785f('0x116')]},'messages':_(_0xcfeed0[_0x785f('0xd1')])['tail']()[_0x785f('0x73')]({'secret':![]})[_0x785f('0x34')](function(_0x16bac3){if(_0x16bac3[_0x785f('0x10a')]){var _0x2cdbb1=path[_0x785f('0x84')](_0x289583,_0x16bac3['Attachment'][_0x785f('0xc3')]);if(fs[_0x785f('0x117')](_0x2cdbb1)){fs[_0x785f('0x118')](_0x2cdbb1)['pipe'](fs[_0x785f('0x119')](path[_0x785f('0x84')](_0x5aab2c,_0x16bac3['Attachment'][_0x785f('0xc3')])));}}return{'date':moment(_0x16bac3[_0x785f('0x5c')])[_0x785f('0x63')](_0x785f('0x112'))['toString'](),'sender':_0x16bac3[_0x785f('0x11a')]===_0x785f('0x11b')?_0x16bac3[_0x785f('0xd2')]?_0x16bac3[_0x785f('0xd2')]['fullname']:'System':_0x16bac3[_0x785f('0x107')][_0x785f('0x108')]+(_0x16bac3[_0x785f('0x107')][_0x785f('0x109')]?'\x20'+_0x16bac3[_0x785f('0x107')]['lastName']:''),'body':_0x16bac3[_0x785f('0x10a')]?_0x16bac3['Attachment'][_0x785f('0xc3')]:_0x16bac3[_0x785f('0xb5')],'direction':_0x16bac3[_0x785f('0x11a')]==='out'?'A':'C','secret':_0x16bac3['secret'],'attachment':_0x16bac3[_0x785f('0x10a')]};})[_0x785f('0x5d')]()};return ejs[_0x785f('0x11c')](path[_0x785f('0x84')](config['root'],_0x785f('0x102'),_0x785f('0x11d'),_0x785f('0x11e')),{'interaction':_0x39dd5f})[_0x785f('0x2d')](function(_0x1bc9de){return new BPromise(function(_0x5eb996,_0x3be796){pdf[_0x785f('0xb4')](_0x1bc9de,_0x2d323f)[_0x785f('0x11f')](path['join'](_0x5aab2c,'transcript-'+_0xcfeed0['id']+'-'+_0xb81abd+_0x785f('0x120')),function(_0x1ad59e,_0x443d12){if(_0x1ad59e)return _0x3be796(_0x1ad59e);_0x5eb996(_0x443d12);});});});}})[_0x785f('0x2d')](function(){if(_0x447916){return new BPromise(function(_0x32bd35,_0x4824e8){zipdir(_0x5aab2c,{'saveTo':_0x1094a2},function(_0x2ccc2b,_0x56f3a7){if(_0x2ccc2b)return _0x4824e8(_0x2ccc2b);return _0x32bd35(_0x56f3a7);});})['then'](function(){return new BPromise(function(_0x3dc072,_0x2bb081){rimraf(_0x5aab2c,function(_0x4b2c4f){if(_0x4b2c4f)_0x2bb081(_0x4b2c4f);return _0x3dc072();});});})[_0x785f('0x2d')](function(){return _0x28cb56[_0x785f('0xca')](_0x1094a2,_0x5cda6d,function(_0x5d0b85){if(_0x5d0b85){console[_0x785f('0x121')]('err',_0x5d0b85);}else{fs[_0x785f('0x122')](_0x1094a2);}});});}else{return _0x28cb56[_0x785f('0xbb')](0xc8);}})[_0x785f('0x23')](handleError(_0x28cb56,null));};
\ No newline at end of file
+var _0xd587=['out','Contact','renderFile','views','toFile','transcript-','.pdf','log','err','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','sox','to-csv','lodash','crypto','jsforce','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','./chatInteraction.socket','register','jayson/promise','client','http','request','then','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','apply','reject','update','destroy','stack','name','send','closed','unreadMessages','ChatMessage','Users','map','Tags','TagIds','split','forEach','index','ChatInteraction','rawAttributes','model','keys','query','filters','intersection','fields','length','hasOwnProperty','sort','where','pick','field','color','tools_tags','COUNT(*)','from','me.ChatInteractionId\x20=\x20i.id','me.direction\x20=\x20\x27in\x27','select','u.id','ui.ChatInteractionId','user_has_chat_interactions','users','u.id\x20=\x20ui.UserId','chat_interactions','left_join','o.id\x20=\x20i.UserId','chat_websites','a.id\x20=\x20i.ChatWebsiteId','chat_messages','expr','advancedFilter','parse','createdAt','value','startOf','day','endOf','format','and','isArray','condition','Messages.count','tableAlias','\x20IN\x20?','\x20=\x20?','LIKE','c.firstName','\x20LIKE\x20?','c.lastName','c.email','\x20>\x20?','\x20<\x20?','TagId','ContactId','filter','isNil','i.ChatWebsiteId\x20IN\x20?','concat','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','push','toString','join','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','DESC','group','Sequelize','QueryTypes','SELECT','read','%s\x20=\x200','having','`Messages.count`\x20=\x200','%s\x20>\x200','tag','chat_interaction_has_tags','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','it.MailInteractionId\x20=\x20i.id','`Messages.count`\x20>\x200','sequelize','keyBy','merge','a.key','Contact.lastName','Contact.email','c.phone','Contact.mobile','c.fax','Contact.fax','GROUP_CONCAT(DISTINCT\x20t.id)','ui.ChatInteractionId\x20IN\x20?','groupBy','rows','show','params','attributes','include','options','find','create','body','describe','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','UserId','ValidationError','Interaction\x20already\x20assigned','file','originalname','basename','filename','type','findOne','Unauthorized','attachId','download','root','server/files/attachments/','close','server/files/chat/upload/','transcript-%s.txt','now','pathTranscript','User','ChatWebsiteId','CmContact','Messages','%s%d','customer','Visitor','agentIdentifier','agentAlias','alias','fullname','agent_fullname','System','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailServerOut','Smtp','service','host','port','secure','user','\x22%s\x22\x20<%s>','email','mailTranscript','Mail\x20Transcript','addMessage','ids','omit','getMessages','nolimit','ChatInteractionId','YYYY-MM-DD\x20HH:mm:ss','findAll','getMyMessages','order','includeAgent','addTags','setTags','Tag','emit','chatInteractionTags:save','removeTags','unix','server','files','tmp','attachments','firstName','lastName','Attachment','ChatWebsite','Account',' \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{page}}/{{pages}} \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','%s\x20#%d','Chat','mkdirSync','Owner','N.A.','disposition','browserName','osName','referer','customerIp','existsSync','createReadStream','pipe','createWriteStream'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd587,0x11e));var _0x7d58=function(_0x27c5e4,_0x27dbf7){_0x27c5e4=_0x27c5e4-0x0;var _0x507f6a=_0xd587[_0x27c5e4];return _0x507f6a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x7d58('0x0'));var rimraf=require(_0x7d58('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x7d58('0x2'));var moment=require(_0x7d58('0x3'));var BPromise=require(_0x7d58('0x4'));var Mustache=require(_0x7d58('0x5'));var util=require(_0x7d58('0x6'));var path=require('path');var sox=require(_0x7d58('0x7'));var csv=require(_0x7d58('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x7d58('0x9'));var squel=require('squel');var crypto=require(_0x7d58('0xa'));var jsforce=require(_0x7d58('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x7d58('0x8'));var querystring=require('querystring');var Papa=require(_0x7d58('0xc'));var Redis=require(_0x7d58('0xd'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x7d58('0xe'));var logger=require(_0x7d58('0xf'))(_0x7d58('0x10'));var utils=require(_0x7d58('0x11'));var config=require('../../config/environment');var db=require(_0x7d58('0x12'))['db'];config[_0x7d58('0x13')]=_[_0x7d58('0x14')](config[_0x7d58('0x13')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x7d58('0x15'))[_0x7d58('0x16')](socket);var jayson=require(_0x7d58('0x17'));var client=jayson[_0x7d58('0x18')][_0x7d58('0x19')]({'port':0x232b});var client9004=jayson['client']['http']({'port':0x232c});function checkPasswordPattern(_0x32e64b,_0x336757,_0x6129e3){if(_0x6129e3){var _0x30cc43=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x30cc43['test'](_0x336757)){return _0x32e64b;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x32e64b;}}function respondWithRpcPromise(_0x26ac4c,_0x3f463c,_0x5587ea,_0x533b3e){return new BPromise(function(_0x394816,_0x52d8f9){var _0x32230=_0x533b3e||client;return _0x32230[_0x7d58('0x1a')](_0x26ac4c,_0x5587ea)[_0x7d58('0x1b')](function(_0x27863e){logger['info'](_0x7d58('0x1c'),_0x3f463c,_0x7d58('0x1d'));logger[_0x7d58('0x1e')](_0x7d58('0x1f'),_0x3f463c,'request\x20sent',JSON['stringify'](_0x27863e));if(_0x27863e[_0x7d58('0x20')]){if(_0x27863e[_0x7d58('0x20')][_0x7d58('0x21')]===0x1f4){logger[_0x7d58('0x20')]('ChatInteraction,\x20%s,\x20%s',_0x3f463c,_0x27863e[_0x7d58('0x20')][_0x7d58('0x22')]);return _0x52d8f9(_0x27863e[_0x7d58('0x20')]['message']);}logger[_0x7d58('0x20')](_0x7d58('0x1c'),_0x3f463c,_0x27863e[_0x7d58('0x20')]['message']);return _0x394816(_0x27863e[_0x7d58('0x20')][_0x7d58('0x22')]);}else{logger['info'](_0x7d58('0x1c'),_0x3f463c,'request\x20sent');_0x394816(_0x27863e[_0x7d58('0x23')][_0x7d58('0x22')]);}})[_0x7d58('0x24')](function(_0x322611){logger[_0x7d58('0x20')](_0x7d58('0x1c'),_0x3f463c,_0x322611);_0x52d8f9(_0x322611);});});}function respondWithStatusCode(_0x351c28,_0x154f1a){_0x154f1a=_0x154f1a||0xcc;return function(_0x4d3cce){if(_0x4d3cce){return _0x351c28[_0x7d58('0x25')](_0x154f1a);}return _0x351c28[_0x7d58('0x26')](_0x154f1a)[_0x7d58('0x27')]();};}function respondWithResult(_0x1c2a5b,_0x5d3b92){_0x5d3b92=_0x5d3b92||0xc8;return function(_0x316a23){if(_0x316a23){return _0x1c2a5b[_0x7d58('0x26')](_0x5d3b92)[_0x7d58('0x28')](_0x316a23);}};}function respondWithFilteredResult(_0x11ec70,_0xa1efdd){return function(_0x1dde5c){if(_0x1dde5c){var _0x44ef90=_0x1dde5c[_0x7d58('0x29')],_0x494fa1=_0xa1efdd[_0x7d58('0x2a')],_0x23bf29=_0xa1efdd[_0x7d58('0x2a')]+_0xa1efdd[_0x7d58('0x2b')],_0x1f134d;if(_0x23bf29>=_0x44ef90){_0x23bf29=_0x44ef90;_0x1f134d=0xc8;}else{_0x1f134d=0xce;}_0x11ec70['status'](_0x1f134d);return _0x11ec70[_0x7d58('0x2c')]('Content-Range',_0x494fa1+'-'+_0x23bf29+'/'+_0x44ef90)[_0x7d58('0x28')](_0x1dde5c);}return null;};}function patchUpdates(_0x5eb18b){return function(_0x4b23d1){try{jsonpatch[_0x7d58('0x2d')](_0x4b23d1,_0x5eb18b,!![]);}catch(_0x29fc51){return BPromise[_0x7d58('0x2e')](_0x29fc51);}return _0x4b23d1['save']();};}function saveUpdates(_0x449a6e,_0x5bd51b){return function(_0x1f19d5){if(_0x1f19d5){return _0x1f19d5[_0x7d58('0x2f')](_0x449a6e)[_0x7d58('0x1b')](function(_0x58d9a9){return _0x58d9a9;});}return null;};}function removeEntity(_0x169cae,_0x51979a){return function(_0x1c763d){if(_0x1c763d){return _0x1c763d[_0x7d58('0x30')]()[_0x7d58('0x1b')](function(){_0x169cae[_0x7d58('0x26')](0xcc)[_0x7d58('0x27')]();});}};}function handleEntityNotFound(_0x5e5cb9,_0x445a42){return function(_0x127f99){if(!_0x127f99){_0x5e5cb9[_0x7d58('0x25')](0x194);}return _0x127f99;};}function handleError(_0x41c211,_0x2a4e6a){_0x2a4e6a=_0x2a4e6a||0x1f4;return function(_0x490d2b){logger[_0x7d58('0x20')](_0x490d2b[_0x7d58('0x31')]);if(_0x490d2b['name']){delete _0x490d2b[_0x7d58('0x32')];}_0x41c211['status'](_0x2a4e6a)[_0x7d58('0x33')](_0x490d2b);};}function getInteractionUnreadMessages(_0x1006d6){return new BPromise(function(_0x599dc5,_0x5857d9){try{if(_0x1006d6[_0x7d58('0x34')]){_0x1006d6[_0x7d58('0x35')]=0x0;_0x599dc5(_0x1006d6);}else{return db[_0x7d58('0x36')][_0x7d58('0x29')]({'where':{'ChatInteractionId':_0x1006d6['id'],'direction':'in','read':![]}})[_0x7d58('0x1b')](function(_0x46cc79){_0x1006d6[_0x7d58('0x35')]=_0x46cc79;_0x599dc5(_0x1006d6);});}}catch(_0x4c85a0){_0x5857d9(_0x4c85a0);}});}function getInteractionUsers(_0x1acb87,_0x2ac3d9){return new BPromise(function(_0x4abfe4,_0xc84576){try{if(_0x2ac3d9[_0x1acb87['id']]){_0x1acb87[_0x7d58('0x37')]=_[_0x7d58('0x38')](_0x2ac3d9[_0x1acb87['id']],function(_0x119201){return{'id':_0x119201['id']};});}}catch(_0x350676){_0xc84576(_0x350676);}_0x4abfe4(_0x1acb87);});}function getInteractionTags(_0x35f435,_0x56d33a){return new BPromise(function(_0x40b930,_0x18ecff){try{if(_0x35f435['TagIds']){_0x35f435[_0x7d58('0x39')]=[];_0x35f435[_0x7d58('0x3a')][_0x7d58('0x3b')](',')[_0x7d58('0x3c')](function(_0x6350b0){_0x35f435[_0x7d58('0x39')]['push'](_0x56d33a[_0x6350b0]);});}delete _0x35f435['TagIds'];}catch(_0x1f5837){_0x18ecff(_0x1f5837);}_0x40b930(_0x35f435);});}function updateChatInteraction(_0x290624,_0x241740,_0x4eaacd){return new BPromise(function(_0x37303e,_0x45771f){return getInteractionUnreadMessages(_0x290624)[_0x7d58('0x1b')](function(_0x6a3642){return getInteractionUsers(_0x6a3642,_0x4eaacd);})[_0x7d58('0x1b')](function(_0x5b2f58){return getInteractionTags(_0x5b2f58,_0x241740);})[_0x7d58('0x1b')](function(_0x3f87b3){_0x37303e(_0x3f87b3);})[_0x7d58('0x24')](function(_0xc4010a){_0x45771f(_0xc4010a);});});}exports[_0x7d58('0x3d')]=function(_0x55eec9,_0x56a05c){var _0x1fe51f={},_0x3b2fef={},_0x36e7c9={'count':0x0,'rows':[]};var _0x3384a2=db[_0x7d58('0x3e')][_0x7d58('0x3f')];_0x3b2fef[_0x7d58('0x40')]=_[_0x7d58('0x41')](_0x3384a2);_0x3b2fef['query']=_[_0x7d58('0x41')](_0x55eec9[_0x7d58('0x42')]);_0x3b2fef[_0x7d58('0x43')]=_[_0x7d58('0x44')](_0x3b2fef[_0x7d58('0x40')],_0x3b2fef[_0x7d58('0x42')]);_0x1fe51f['attributes']=_[_0x7d58('0x44')](_0x3b2fef[_0x7d58('0x40')],qs['fields'](_0x55eec9[_0x7d58('0x42')][_0x7d58('0x45')]));_0x1fe51f['attributes']=_0x1fe51f['attributes'][_0x7d58('0x46')]?_0x1fe51f['attributes']:_0x3b2fef[_0x7d58('0x40')];if(!_0x55eec9[_0x7d58('0x42')][_0x7d58('0x47')]('nolimit')){_0x1fe51f[_0x7d58('0x2b')]=qs[_0x7d58('0x2b')](_0x55eec9['query']['limit']);_0x1fe51f[_0x7d58('0x2a')]=qs[_0x7d58('0x2a')](_0x55eec9[_0x7d58('0x42')][_0x7d58('0x2a')]);}_0x1fe51f['order']=qs['sort'](_0x55eec9[_0x7d58('0x42')][_0x7d58('0x48')]);_0x1fe51f[_0x7d58('0x49')]=qs[_0x7d58('0x43')](_[_0x7d58('0x4a')](_0x55eec9[_0x7d58('0x42')],_0x3b2fef[_0x7d58('0x43')]));var _0x284f8b=[];var _0x355c52=squel['select']()[_0x7d58('0x4b')]('id')['field']('name')['field'](_0x7d58('0x4c'))['from'](_0x7d58('0x4d'));var _0x2d0572=squel['select']()[_0x7d58('0x4b')](_0x7d58('0x4e'))[_0x7d58('0x4f')]('chat_messages','me')[_0x7d58('0x49')](_0x7d58('0x50'))['where'](_0x7d58('0x51'))[_0x7d58('0x49')]('me.read\x20=\x20false');var _0x5ae27b=squel[_0x7d58('0x52')]()[_0x7d58('0x4b')](_0x7d58('0x53'))[_0x7d58('0x4b')](_0x7d58('0x54'))[_0x7d58('0x4f')](_0x7d58('0x55'),'ui')['left_join'](_0x7d58('0x56'),'u',_0x7d58('0x57'));var _0x14a98f=squel['select']()[_0x7d58('0x4f')](_0x7d58('0x58'),'i')[_0x7d58('0x59')]('cm_contacts','c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x7d58('0x59')](_0x7d58('0x56'),'o',_0x7d58('0x5a'))['left_join'](_0x7d58('0x5b'),'a',_0x7d58('0x5c'))[_0x7d58('0x59')](_0x7d58('0x5d'),'me',_0x7d58('0x50'));var _0x2aa102=squel[_0x7d58('0x5e')]();if(_0x55eec9['query'][_0x7d58('0x5f')]){var _0x47587b=JSON[_0x7d58('0x60')](_0x55eec9['query'][_0x7d58('0x5f')]);_[_0x7d58('0x41')](_0x47587b)[_0x7d58('0x3c')](function(_0x1d0cac){var _0x471ce7=_0x47587b[_0x1d0cac];if(_0x1d0cac===_0x7d58('0x61')){var _0x555c11=moment(_0x471ce7[_0x7d58('0x62')]['dateStart'])[_0x7d58('0x63')](_0x7d58('0x64'))['utc']()['format']();var _0x439d1e=moment(_0x439d1e)['utc']()[_0x7d58('0x65')](_0x7d58('0x64'))[_0x7d58('0x66')]();_0x2aa102[_0x7d58('0x67')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x555c11,_0x439d1e);}else{if(_[_0x7d58('0x68')](_0x471ce7['condition'])){_0x471ce7[_0x7d58('0x69')][_0x7d58('0x3c')](function(_0x2258c7){switch(_0x471ce7[_0x7d58('0x69')]['value']){case'IS':if(_0x1d0cac!=='TagId'&&_0x1d0cac!==_0x7d58('0x6a')){if(_[_0x7d58('0x68')](_0x471ce7[_0x7d58('0x62')])&&_0x471ce7[_0x7d58('0x62')]['length']>0x1){_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x6c'),_0x471ce7[_0x7d58('0x62')]);}else{_0x2aa102['and'](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x6d'),_0x471ce7[_0x7d58('0x62')][0x0]);}}break;case'=':_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x6d'),_0x471ce7[_0x7d58('0x62')]);break;case _0x7d58('0x6e'):if(_0x1d0cac==='ContactId'){_0x2aa102[_0x7d58('0x67')](_0x7d58('0x6f')+_0x7d58('0x70'),'%'+_0x471ce7[_0x7d58('0x62')]+'%');_0x2aa102['or'](_0x7d58('0x71')+_0x7d58('0x70'),'%'+_0x471ce7[_0x7d58('0x62')]+'%');_0x2aa102['or'](_0x7d58('0x72')+_0x7d58('0x70'),'%'+_0x471ce7[_0x7d58('0x62')]+'%');}else{_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x70'),'%'+_0x471ce7['value']+'%');}break;case'>':_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x73'),_0x471ce7[_0x7d58('0x62')]);break;case'<':_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x74'),_0x471ce7[_0x7d58('0x62')]);break;}});}else{switch(_0x471ce7[_0x7d58('0x69')][_0x7d58('0x62')]){case'IS':if(_0x1d0cac!==_0x7d58('0x75')&&_0x1d0cac!==_0x7d58('0x6a')){if(_[_0x7d58('0x68')](_0x471ce7['value'])&&_0x471ce7[_0x7d58('0x62')][_0x7d58('0x46')]>0x1){_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x6c'),_0x471ce7[_0x7d58('0x62')]);}else{_0x2aa102[_0x7d58('0x67')](_0x471ce7['tableAlias']+'.'+_0x1d0cac+_0x7d58('0x6d'),_0x471ce7[_0x7d58('0x62')][0x0]);}}break;case'=':_0x2aa102['and'](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+'\x20=\x20?',_0x471ce7[_0x7d58('0x62')]);break;case _0x7d58('0x6e'):if(_0x1d0cac===_0x7d58('0x76')){_0x2aa102[_0x7d58('0x67')](_0x7d58('0x6f')+_0x7d58('0x70'),'%'+_0x471ce7[_0x7d58('0x62')]+'%');_0x2aa102['or'](_0x7d58('0x71')+_0x7d58('0x70'),'%'+_0x471ce7['value']+'%');_0x2aa102['or'](_0x7d58('0x72')+_0x7d58('0x70'),'%'+_0x471ce7['value']+'%');}else{_0x2aa102['and'](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x70'),'%'+_0x471ce7[_0x7d58('0x62')]+'%');}break;case'>':_0x2aa102['and'](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+'\x20>\x20?',_0x471ce7[_0x7d58('0x62')]);break;case'<':_0x2aa102[_0x7d58('0x67')](_0x471ce7[_0x7d58('0x6b')]+'.'+_0x1d0cac+_0x7d58('0x74'),_0x471ce7['value']);break;}}}});}else{var _0xc5ef45=_(Object[_0x7d58('0x41')](_0x55eec9[_0x7d58('0x42')]))['map'](function(_0x15418a){return _0x3384a2['hasOwnProperty'](_0x15418a)?_0x15418a:undefined;})[_0x7d58('0x77')](function(_0x409f1c){return!_[_0x7d58('0x78')](_0x409f1c);})[_0x7d58('0x62')]();if(!_['isEmpty'](_0xc5ef45)){_0xc5ef45[_0x7d58('0x3c')](function(_0xab2f9b){if(_0xab2f9b==='ChatWebsiteId'){_0x14a98f[_0x7d58('0x49')](_0x7d58('0x79'),[][_0x7d58('0x7a')](_0x55eec9[_0x7d58('0x42')][_0xab2f9b]));}else if(_0xab2f9b==='createdAt'){var _0x129ce2=JSON['parse'](_0x55eec9[_0x7d58('0x42')][_0xab2f9b])[_0x7d58('0x7b')];var _0x10edc0=JSON['parse'](_0x55eec9['query'][_0xab2f9b])[_0x7d58('0x7c')];_0x14a98f[_0x7d58('0x49')](_0x7d58('0x7d'),_0x129ce2,_0x10edc0);}else{if(_0x55eec9['query'][_0xab2f9b]===_0x7d58('0x7e')){_0x14a98f[_0x7d58('0x49')]('i.'+_0xab2f9b+'\x20IS\x20NULL');}else{_0x14a98f[_0x7d58('0x49')]('i.'+_0xab2f9b+_0x7d58('0x6d'),_0x55eec9[_0x7d58('0x42')][_0xab2f9b]);}}});}if(_0x55eec9[_0x7d58('0x42')]['filter']){var _0x5a864a=_0x55eec9[_0x7d58('0x42')]['filter'][_0x7d58('0x7f')]('\x5c','\x5c\x5c')[_0x7d58('0x7f')]('\x27\x27',_0x7d58('0x80'));if(qs[_0x7d58('0x81')](_0x5a864a)){_0x2aa102['or'](_0x7d58('0x82'),_0x5a864a+'%');}else{var _0x207247=[];_0x5a864a[_0x7d58('0x3b')]('\x20')[_0x7d58('0x3c')](function(_0xa624eb){_0x207247[_0x7d58('0x83')]('+'+_0xa624eb[_0x7d58('0x84')]());});var _0x33e91b=_0x207247[_0x7d58('0x85')]('\x20');_0x2aa102['or'](_0x7d58('0x86'),_0x33e91b)['or'](_0x7d58('0x87'),_0x5a864a+'%');}}}_0x14a98f[_0x7d58('0x49')](_0x2aa102);if(_0x1fe51f['order']){_0x1fe51f['order'][_0x7d58('0x3c')](function(_0x5336fc){_0x14a98f['order']('i.'+_0x5336fc[0x0],_0x5336fc[0x1]===_0x7d58('0x88')?![]:!![]);});}_0x14a98f[_0x7d58('0x89')]('i.id');var _0x42f44a={'type':db[_0x7d58('0x8a')][_0x7d58('0x8b')][_0x7d58('0x8c')],'raw':!![]};var _0x1e5bfa=_0x14a98f['clone']()[_0x7d58('0x4b')]('COUNT(*)');if(!_0x55eec9[_0x7d58('0x42')][_0x7d58('0x5f')]){if(_0x55eec9['query'][_0x7d58('0x8d')]){if(_0x55eec9[_0x7d58('0x42')][_0x7d58('0x8d')]==0x1){_0x1e5bfa[_0x7d58('0x49')](util[_0x7d58('0x66')](_0x7d58('0x8e'),_0x2d0572['toString']()));_0x14a98f[_0x7d58('0x8f')](_0x7d58('0x90'));}else{_0x1e5bfa[_0x7d58('0x49')](util[_0x7d58('0x66')](_0x7d58('0x91'),_0x2d0572['toString']()));_0x14a98f[_0x7d58('0x8f')]('`Messages.count`\x20>\x200');}}if(_0x55eec9['query'][_0x7d58('0x92')]){var _0x34650d=_[_0x7d58('0x68')](_0x55eec9[_0x7d58('0x42')][_0x7d58('0x92')])?_0x55eec9[_0x7d58('0x42')]['tag']:new Array(_0x55eec9[_0x7d58('0x42')][_0x7d58('0x92')]);var _0x2671ba=squel['expr']();_0x34650d[_0x7d58('0x3c')](function(_0x5052fe){_0x2671ba['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x5052fe+',%');});_0x14a98f[_0x7d58('0x8f')](_0x2671ba);_0x1e5bfa[_0x7d58('0x59')](_0x7d58('0x93'),'it','it.ChatInteractionId\x20=\x20i.id');_0x1e5bfa[_0x7d58('0x59')](_0x7d58('0x4d'),'t',_0x7d58('0x94'));_0x1e5bfa[_0x7d58('0x49')](_0x7d58('0x95'),_0x34650d);}}else{var _0x47587b=JSON[_0x7d58('0x60')](_0x55eec9[_0x7d58('0x42')][_0x7d58('0x5f')]);_['keys'](_0x47587b)['forEach'](function(_0x3ff02b){var _0x13157b=_0x47587b[_0x3ff02b];if(_0x3ff02b===_0x7d58('0x75')){var _0x4737d7=_0x13157b[_0x7d58('0x62')];var _0x282aa8=squel[_0x7d58('0x5e')]();_0x4737d7[_0x7d58('0x3c')](function(_0x5832c7){_0x282aa8['or'](_0x7d58('0x96'),'%,'+_0x5832c7+',%');});_0x14a98f['having'](_0x282aa8);_0x1e5bfa[_0x7d58('0x59')]('mail_interaction_has_tags','it',_0x7d58('0x97'));_0x1e5bfa[_0x7d58('0x59')](_0x7d58('0x4d'),'t','t.id\x20=\x20it.TagId');_0x1e5bfa[_0x7d58('0x49')](_0x7d58('0x95'),_0x4737d7);}else if(_0x3ff02b===_0x7d58('0x6a')){if(_0x13157b[_0x7d58('0x62')]['length']===0x1){if(_0x13157b[_0x7d58('0x62')][0x0]===0x1){_0x1e5bfa[_0x7d58('0x49')](util[_0x7d58('0x66')](_0x7d58('0x8e'),_0x2d0572['toString']()));_0x14a98f[_0x7d58('0x8f')]('`Messages.count`\x20=\x200');}else{_0x1e5bfa[_0x7d58('0x49')](util[_0x7d58('0x66')](_0x7d58('0x91'),_0x2d0572[_0x7d58('0x84')]()));_0x14a98f[_0x7d58('0x8f')](_0x7d58('0x98'));}}}});}db[_0x7d58('0x99')]['query'](_0x1e5bfa[_0x7d58('0x84')](),_0x42f44a)[_0x7d58('0x1b')](function(_0x42c831){_0x36e7c9[_0x7d58('0x29')]=_0x42c831[_0x7d58('0x46')];if(_0x36e7c9[_0x7d58('0x29')]===0x0)return[];return db[_0x7d58('0x99')][_0x7d58('0x42')](_0x355c52[_0x7d58('0x84')](),_0x42f44a)[_0x7d58('0x1b')](function(_0x45d741){_0x284f8b=_[_0x7d58('0x9a')](_0x45d741,'id');_0x42f44a=_[_0x7d58('0x9b')](_0x42f44a,{'model':db['ChatInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});_0x14a98f[_0x7d58('0x4b')](_0x7d58('0x9c'),'Account.key');_0x14a98f[_0x7d58('0x4b')]('i.*');_0x14a98f['field']('c.firstName','Contact.firstName');_0x14a98f[_0x7d58('0x4b')]('c.lastName',_0x7d58('0x9d'));_0x14a98f[_0x7d58('0x4b')](_0x7d58('0x72'),_0x7d58('0x9e'));_0x14a98f[_0x7d58('0x4b')](_0x7d58('0x9f'),'Contact.phone');_0x14a98f[_0x7d58('0x4b')]('c.mobile',_0x7d58('0xa0'));_0x14a98f[_0x7d58('0x4b')](_0x7d58('0xa1'),_0x7d58('0xa2'));_0x14a98f[_0x7d58('0x4b')](_0x7d58('0xa3'),_0x7d58('0x3a'));_0x14a98f[_0x7d58('0x59')](_0x7d58('0x93'),'it','it.ChatInteractionId\x20=\x20i.id');_0x14a98f[_0x7d58('0x59')](_0x7d58('0x4d'),'t',_0x7d58('0x94'));_0x14a98f[_0x7d58('0x2b')](_0x1fe51f['limit']);_0x14a98f[_0x7d58('0x2a')](_0x1fe51f[_0x7d58('0x2a')]);return db[_0x7d58('0x99')][_0x7d58('0x42')](_0x14a98f[_0x7d58('0x84')](),_0x42f44a);})['then'](function(_0x41cb1b){_0x5ae27b[_0x7d58('0x49')](_0x7d58('0xa4'),_['map'](_0x41cb1b,'id'));return db[_0x7d58('0x99')][_0x7d58('0x42')](_0x5ae27b[_0x7d58('0x84')](),_0x42f44a)[_0x7d58('0x1b')](function(_0x469486){var _0x53010f=_[_0x7d58('0xa5')](_0x469486,'ChatInteractionId');var _0x22b8cf=[];_0x41cb1b['forEach'](function(_0x2d8258){_0x22b8cf[_0x7d58('0x83')](updateChatInteraction(_0x2d8258,_0x284f8b,_0x53010f));});return BPromise['all'](_0x22b8cf);});});})[_0x7d58('0x1b')](function(_0x4a25dc){_0x36e7c9[_0x7d58('0xa6')]=_0x4a25dc;return _0x36e7c9;})[_0x7d58('0x1b')](respondWithFilteredResult(_0x56a05c,_0x1fe51f))['catch'](handleError(_0x56a05c,null));};exports[_0x7d58('0xa7')]=function(_0x2a860e,_0x1739a6){var _0x3e12a7={'raw':![],'where':{'id':_0x2a860e[_0x7d58('0xa8')]['id']}},_0x468076={};_0x468076[_0x7d58('0x40')]=_[_0x7d58('0x41')](db[_0x7d58('0x3e')][_0x7d58('0x3f')]);_0x468076[_0x7d58('0x42')]=_[_0x7d58('0x41')](_0x2a860e['query']);_0x468076[_0x7d58('0x43')]=_[_0x7d58('0x44')](_0x468076[_0x7d58('0x40')],_0x468076[_0x7d58('0x42')]);_0x3e12a7[_0x7d58('0xa9')]=_['intersection'](_0x468076[_0x7d58('0x40')],qs[_0x7d58('0x45')](_0x2a860e[_0x7d58('0x42')][_0x7d58('0x45')]));_0x3e12a7[_0x7d58('0xa9')]=_0x3e12a7[_0x7d58('0xa9')][_0x7d58('0x46')]?_0x3e12a7[_0x7d58('0xa9')]:_0x468076[_0x7d58('0x40')];if(_0x2a860e[_0x7d58('0x42')]['includeAll']){_0x3e12a7[_0x7d58('0xaa')]=[{'all':!![]}];}_0x3e12a7=_[_0x7d58('0x9b')]({},_0x3e12a7,_0x2a860e[_0x7d58('0xab')]);return db[_0x7d58('0x3e')][_0x7d58('0xac')](_0x3e12a7)[_0x7d58('0x1b')](handleEntityNotFound(_0x1739a6,null))[_0x7d58('0x1b')](respondWithResult(_0x1739a6,null))[_0x7d58('0x24')](handleError(_0x1739a6,null));};exports[_0x7d58('0xad')]=function(_0x149e05,_0x7e548a){return db[_0x7d58('0x3e')]['create'](_0x149e05['body'],{})['then'](respondWithResult(_0x7e548a,0xc9))['catch'](handleError(_0x7e548a,null));};exports[_0x7d58('0x2f')]=function(_0x1df75a,_0x271f80){if(_0x1df75a[_0x7d58('0xae')]['id']){delete _0x1df75a['body']['id'];}return db[_0x7d58('0x3e')][_0x7d58('0xac')]({'where':{'id':_0x1df75a[_0x7d58('0xa8')]['id']}})['then'](handleEntityNotFound(_0x271f80,null))['then'](saveUpdates(_0x1df75a[_0x7d58('0xae')],null))[_0x7d58('0x1b')](respondWithResult(_0x271f80,null))[_0x7d58('0x24')](handleError(_0x271f80,null));};exports['destroy']=function(_0x3c3de3,_0x2137af){return db['ChatInteraction'][_0x7d58('0xac')]({'where':{'id':_0x3c3de3[_0x7d58('0xa8')]['id']}})[_0x7d58('0x1b')](handleEntityNotFound(_0x2137af,null))['then'](removeEntity(_0x2137af,null))[_0x7d58('0x24')](handleError(_0x2137af,null));};exports[_0x7d58('0xaf')]=function(_0x43c50f,_0x5a802f){return db['ChatInteraction'][_0x7d58('0xaf')]()[_0x7d58('0x1b')](respondWithResult(_0x5a802f,null))[_0x7d58('0x24')](handleError(_0x5a802f,null));};exports['customUpdate']=function(_0xcbfde,_0x13d9c5){if(_0xcbfde[_0x7d58('0xae')]['id']){delete _0xcbfde[_0x7d58('0xae')]['id'];}return db[_0x7d58('0x3e')][_0x7d58('0xac')]({'where':{'id':_0xcbfde[_0x7d58('0xa8')]['id']}})[_0x7d58('0x1b')](handleEntityNotFound(_0x13d9c5,null))[_0x7d58('0x1b')](saveUpdates(_0xcbfde[_0x7d58('0xae')],null))[_0x7d58('0x1b')](respondWithResult(_0x13d9c5,null))['catch'](handleError(_0x13d9c5,null));};exports[_0x7d58('0xb0')]=function(_0x2c373b,_0x1a674a,_0x10f3c5){if(_0x2c373b['body']['id']){delete _0x2c373b['body']['id'];}return db[_0x7d58('0x3e')][_0x7d58('0xac')]({'where':{'id':_0x2c373b[_0x7d58('0xa8')]['id']}})['then'](function(_0x424e09){if(!_0x424e09){logger[_0x7d58('0x20')](_0x7d58('0xb1'),_0x7d58('0xb0'),0x194,_0x7d58('0xb2'));_0x1a674a[_0x7d58('0x25')](0x194);}else{if(_0x424e09[_0x7d58('0xb3')]){throw new db[(_0x7d58('0x8a'))][(_0x7d58('0xb4'))](_0x7d58('0xb5'));}}return _0x424e09;})['then'](function(_0x4d4c0){if(_0x4d4c0){return _0x4d4c0['update']({'closed':_0x2c373b[_0x7d58('0xae')]['closed'],'disposition':_0x2c373b[_0x7d58('0xae')]['disposition']})[_0x7d58('0x1b')](function(_0x48a1b4){return _0x48a1b4;});}})[_0x7d58('0x1b')](function(_0x4316be){return respondWithRpcPromise('AbandonInteraction',_0x7d58('0xb0'),_0x2c373b[_0x7d58('0xae')],client9004);})['then'](respondWithResult(_0x1a674a,null))[_0x7d58('0x24')](handleError(_0x1a674a,null));};exports['attachmentUpload']=function(_0x3f1693,_0x2e1d8b,_0x1784f6){_0x3f1693[_0x7d58('0xae')]['name']=_0x3f1693[_0x7d58('0xb6')][_0x7d58('0xb7')];_0x3f1693[_0x7d58('0xae')][_0x7d58('0xb8')]=_0x3f1693[_0x7d58('0xb6')][_0x7d58('0xb9')];_0x3f1693['body'][_0x7d58('0xba')]=_0x3f1693[_0x7d58('0xb6')]['mimetype'];return db['Attachment']['create'](_0x3f1693[_0x7d58('0xae')])[_0x7d58('0x1b')](respondWithResult(_0x2e1d8b,0xc9))[_0x7d58('0x24')](handleError(_0x2e1d8b,null));};exports['attachmentDownload']=function(_0x1b53b8,_0x27c580,_0x269e39){return db['ChatInteraction'][_0x7d58('0xbb')]({'where':{'id':_0x1b53b8['params']['id']},'raw':!![]})[_0x7d58('0x1b')](handleEntityNotFound(_0x27c580,null))[_0x7d58('0x1b')](function(_0xfb16e7){if(_0xfb16e7){if(_0xfb16e7[_0x7d58('0x34')]){return _0x27c580[_0x7d58('0x26')](0x193)[_0x7d58('0x28')]({'status':0x193,'message':_0x7d58('0xbc')});}return db['Attachment'][_0x7d58('0xbb')]({'where':{'id':_0x1b53b8[_0x7d58('0x42')][_0x7d58('0xbd')]},'raw':!![]})['then'](handleEntityNotFound(_0x27c580,null));}})[_0x7d58('0x1b')](function(_0x377b21){if(_0x377b21){return _0x27c580[_0x7d58('0xbe')](path[_0x7d58('0x85')](config[_0x7d58('0xbf')],_0x7d58('0xc0'),_0x377b21[_0x7d58('0xb8')]));}})[_0x7d58('0x24')](handleError(_0x27c580,null));};exports[_0x7d58('0xc1')]=function(_0x20fa6c,_0x353a16){var _0x1d36f2=null;var _0x460cf3=null;var _0x12f0ae=null;var _0x5e8351=null;if(_0x20fa6c[_0x7d58('0xae')]['id']){delete _0x20fa6c[_0x7d58('0xae')]['id'];}if(_0x20fa6c[_0x7d58('0xae')]['mailTranscript']){_0x5e8351=path['join'](config[_0x7d58('0xbf')],_0x7d58('0xc2'),util[_0x7d58('0x66')](_0x7d58('0xc3'),Date[_0x7d58('0xc4')]()));_0x20fa6c[_0x7d58('0xae')][_0x7d58('0xc5')]=_0x5e8351;}return db[_0x7d58('0x3e')][_0x7d58('0xac')]({'where':{'id':_0x20fa6c[_0x7d58('0xa8')]['id']},'include':[{'model':db[_0x7d58('0x36')],'as':'Messages','include':[{'model':db['User'],'as':_0x7d58('0xc6')}]}]})[_0x7d58('0x1b')](handleEntityNotFound(_0x353a16,null))[_0x7d58('0x1b')](saveUpdates(_0x20fa6c[_0x7d58('0xae')],null))['then'](function(_0x23f8e2){if(_0x23f8e2){_0x1d36f2=_0x23f8e2;return db['ChatWebsite'][_0x7d58('0xac')]({'where':{'id':_0x1d36f2[_0x7d58('0xc7')]}});}})[_0x7d58('0x1b')](function(_0x2be6cb){if(_0x2be6cb){_0x12f0ae=_0x2be6cb;return db[_0x7d58('0xc8')][_0x7d58('0xac')]({'where':{'id':_0x1d36f2[_0x7d58('0x76')]}});}})[_0x7d58('0x1b')](function(_0x1b1187){if(_0x1b1187){_0x460cf3=_0x1b1187;if(_0x5e8351){var _0x49d0bd=null;for(var _0x412e75=0x1;_0x412e75<_0x1d36f2[_0x7d58('0xc9')]['length'];++_0x412e75){_0x49d0bd=_0x1d36f2[_0x7d58('0xc9')][_0x412e75];var _0x50607b=_0x49d0bd[_0x7d58('0xb3')]?util['format'](_0x7d58('0xca'),_0x12f0ae['agentAlias'],_0x49d0bd['UserId']):'System';var _0x11b391=_0x20fa6c['body'][_0x7d58('0xcb')]||util[_0x7d58('0x66')](_0x7d58('0xca'),_0x7d58('0xcc'),_0x49d0bd[_0x7d58('0x76')]);switch(_0x12f0ae[_0x7d58('0xcd')]){case'website_alias':_0x50607b=_0x49d0bd['UserId']?util[_0x7d58('0x66')]('%s%d',_0x12f0ae[_0x7d58('0xce')],_0x49d0bd[_0x7d58('0xb3')]):'System';break;case'agent_alias':_0x50607b=_0x49d0bd[_0x7d58('0xb3')]?_0x49d0bd[_0x7d58('0xc6')][_0x7d58('0xcf')]||_0x49d0bd[_0x7d58('0xc6')][_0x7d58('0xd0')]:'System';break;case _0x7d58('0xd1'):_0x50607b=_0x49d0bd[_0x7d58('0xb3')]?_0x49d0bd[_0x7d58('0xc6')][_0x7d58('0xd0')]:_0x7d58('0xd2');break;default:_0x50607b=_0x49d0bd[_0x7d58('0xb3')]?util[_0x7d58('0x66')](_0x7d58('0xca'),_0x12f0ae['agentAlias'],_0x49d0bd[_0x7d58('0xb3')]):_0x7d58('0xd2');}var _0x77f62f=util['format']('[%s]\x20%s:\x20%s\x0a',moment(_0x49d0bd[_0x7d58('0x61')])['format'](_0x7d58('0xd3')),_0x49d0bd[_0x7d58('0xd4')]==='in'?_0x11b391:_0x50607b,_0x49d0bd['body']);if(!_0x49d0bd[_0x7d58('0xd5')]){fs[_0x7d58('0xd6')](_0x5e8351,_0x77f62f);}}return db['MailAccount'][_0x7d58('0xbb')]({'where':{'service':!![]},'include':[{'model':db[_0x7d58('0xd7')],'as':_0x7d58('0xd8'),'raw':!![]}]});}}})[_0x7d58('0x1b')](function(_0x11d726){if(_0x11d726&&_0x11d726[_0x7d58('0xd8')]&&_0x20fa6c[_0x7d58('0xae')]){var _0x36e985={'tls':{'rejectUnauthorized':![]}};if(_0x11d726[_0x7d58('0xd8')][_0x7d58('0xd9')]){_0x36e985[_0x7d58('0xd9')]=_0x11d726[_0x7d58('0xd8')]['service'];}else{_0x36e985[_0x7d58('0xda')]=_0x11d726[_0x7d58('0xd8')][_0x7d58('0xda')];_0x36e985[_0x7d58('0xdb')]=_0x11d726[_0x7d58('0xd8')][_0x7d58('0xdb')];_0x36e985['secure']=_0x11d726['Smtp'][_0x7d58('0xdc')];}if(_0x11d726[_0x7d58('0xd8')]['authentication']){_0x36e985['auth']={'user':_0x11d726['Smtp'][_0x7d58('0xdd')],'pass':_0x11d726[_0x7d58('0xd8')]['pass']};}return respondWithRpcPromise('SendMail','sendMail',{'account':_0x36e985,'message':{'from':util[_0x7d58('0x66')](_0x7d58('0xde'),_0x11d726[_0x7d58('0x32')],_0x11d726[_0x7d58('0xdf')]||_0x11d726[_0x7d58('0xd8')]['user']),'to':_0x20fa6c['body'][_0x7d58('0xe0')],'subject':_0x7d58('0xe1'),'text':util[_0x7d58('0x66')]('Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a',_0x20fa6c[_0x7d58('0xae')][_0x7d58('0xe0')]),'attachments':[{'path':_0x5e8351}]}})[_0x7d58('0x1b')](function(){return _0x1d36f2;})['catch'](function(_0x164d57){console[_0x7d58('0x20')](_0x164d57);});}else{return _0x1d36f2;}})[_0x7d58('0x1b')](respondWithStatusCode(_0x353a16,0xc8))[_0x7d58('0x24')](handleError(_0x353a16,null));};exports[_0x7d58('0xe2')]=function(_0x4bae96,_0x53b288,_0x4574e2){return db[_0x7d58('0x36')][_0x7d58('0xac')]({'where':{'id':_0x4bae96[_0x7d58('0xa8')]['id']}})[_0x7d58('0x1b')](handleEntityNotFound(_0x53b288,null))['then'](function(_0x54933f){if(_0x54933f){return _0x54933f[_0x7d58('0xe2')](_0x4bae96[_0x7d58('0xae')][_0x7d58('0xe3')],_[_0x7d58('0xe4')](_0x4bae96['body'],['ids','id'])||{});}})['then'](respondWithResult(_0x53b288,null))[_0x7d58('0x24')](handleError(_0x53b288,null));};exports[_0x7d58('0xe5')]=function(_0x456ab4,_0x2bebf9,_0x91412d){var _0x4d9421={'raw':![],'where':{}};var _0x5839c3={};var _0x34fec0={'count':0x0,'rows':[]};return db[_0x7d58('0x3e')][_0x7d58('0xbb')]({'where':{'id':_0x456ab4[_0x7d58('0xa8')]['id']}})[_0x7d58('0x1b')](handleEntityNotFound(_0x2bebf9,null))['then'](function(_0x54bf12){if(_0x54bf12){_0x5839c3['model']=_['keys'](db[_0x7d58('0x36')][_0x7d58('0x3f')]);_0x5839c3[_0x7d58('0x42')]=_[_0x7d58('0x41')](_0x456ab4['query']);_0x5839c3['filters']=_[_0x7d58('0x44')](_0x5839c3[_0x7d58('0x40')],_0x5839c3[_0x7d58('0x42')]);_0x4d9421[_0x7d58('0xa9')]=_[_0x7d58('0x44')](_0x5839c3['model'],qs[_0x7d58('0x45')](_0x456ab4['query'][_0x7d58('0x45')]));_0x4d9421[_0x7d58('0xa9')]=_0x4d9421[_0x7d58('0xa9')][_0x7d58('0x46')]?_0x4d9421[_0x7d58('0xa9')]:_0x5839c3['model'];if(!_0x456ab4[_0x7d58('0x42')][_0x7d58('0x47')](_0x7d58('0xe6'))){_0x4d9421[_0x7d58('0x2b')]=qs[_0x7d58('0x2b')](_0x456ab4[_0x7d58('0x42')][_0x7d58('0x2b')]);_0x4d9421[_0x7d58('0x2a')]=qs['offset'](_0x456ab4['query'][_0x7d58('0x2a')]);}_0x4d9421['order']=qs[_0x7d58('0x48')](_0x456ab4['query'][_0x7d58('0x48')]);_0x4d9421[_0x7d58('0x49')]=qs[_0x7d58('0x43')](_[_0x7d58('0x4a')](_0x456ab4[_0x7d58('0x42')],_0x5839c3[_0x7d58('0x43')]));_0x4d9421[_0x7d58('0x49')][_0x7d58('0xe7')]=_0x54bf12['id'];if(_0x456ab4[_0x7d58('0x42')][_0x7d58('0x77')]){_0x4d9421['where']=_[_0x7d58('0x9b')](_0x4d9421[_0x7d58('0x49')],{'$or':_[_0x7d58('0x38')](_0x4d9421['attributes'],function(_0x546af9){var _0x3b8a70={};_0x3b8a70[_0x546af9]={'$like':'%'+_0x456ab4['query'][_0x7d58('0x77')]+'%'};return _0x3b8a70;})});}if(_0x456ab4[_0x7d58('0x42')][_0x7d58('0x7b')]){var _0x3a2640=_0x456ab4['query'][_0x7d58('0x7b')][_0x7d58('0x3b')](',');var _0x20bbb8={};_0x20bbb8[_0x3a2640[0x0]]={'$gte':moment(_0x3a2640[0x1])[_0x7d58('0x66')](_0x7d58('0xe8'))};_0x4d9421[_0x7d58('0x49')]=_[_0x7d58('0x9b')](_0x4d9421['where'],_0x20bbb8);}_0x4d9421=_[_0x7d58('0x9b')]({},_0x4d9421,_0x456ab4['options']);return db['ChatMessage']['count']({'where':_0x4d9421[_0x7d58('0x49')]})[_0x7d58('0x1b')](function(_0x4795e6){_0x34fec0['count']=_0x4795e6;if(_0x456ab4[_0x7d58('0x42')]['includeAll']){_0x4d9421[_0x7d58('0xaa')]=[{'all':!![]}];}return db[_0x7d58('0x36')][_0x7d58('0xe9')](_0x4d9421);})['then'](function(_0xa62c27){_0x34fec0['rows']=_0xa62c27;return _0x34fec0;});}})['then'](respondWithFilteredResult(_0x2bebf9,_0x4d9421))[_0x7d58('0x24')](handleError(_0x2bebf9,null));};exports[_0x7d58('0xea')]=function(_0x2eb60f,_0x2bc4e5,_0x19653f){var _0xda2a74={'where':{}},_0x187b43={},_0x4201cf={'count':0x0,'rows':[]};return db[_0x7d58('0x3e')][_0x7d58('0xbb')]({'where':{'id':_0x2eb60f[_0x7d58('0xa8')]['id']}})[_0x7d58('0x1b')](handleEntityNotFound(_0x2bc4e5,null))['then'](function(_0x5965cc){if(_0x5965cc){_0x187b43[_0x7d58('0x40')]=_['keys'](db['ChatMessage'][_0x7d58('0x3f')]);_0x187b43[_0x7d58('0x42')]=_[_0x7d58('0x41')](_0x2eb60f[_0x7d58('0x42')]);_0x187b43['filters']=_['intersection'](_0x187b43[_0x7d58('0x40')],_0x187b43['query']);_0xda2a74[_0x7d58('0xa9')]=_[_0x7d58('0x44')](_0x187b43['model'],qs[_0x7d58('0x45')](_0x2eb60f[_0x7d58('0x42')][_0x7d58('0x45')]));_0xda2a74['attributes']=_0xda2a74[_0x7d58('0xa9')][_0x7d58('0x46')]?_0xda2a74[_0x7d58('0xa9')]:_0x187b43[_0x7d58('0x40')];if(!_0x2eb60f[_0x7d58('0x42')][_0x7d58('0x47')](_0x7d58('0xe6'))){_0xda2a74[_0x7d58('0x2b')]=qs['limit'](_0x2eb60f[_0x7d58('0x42')][_0x7d58('0x2b')]);_0xda2a74['offset']=qs['offset'](_0x2eb60f[_0x7d58('0x42')][_0x7d58('0x2a')]);}_0xda2a74[_0x7d58('0xeb')]=qs[_0x7d58('0x48')](_0x2eb60f[_0x7d58('0x42')][_0x7d58('0x48')]);_0xda2a74[_0x7d58('0x49')]=qs[_0x7d58('0x43')](_[_0x7d58('0x4a')](_0x2eb60f[_0x7d58('0x42')],_0x187b43[_0x7d58('0x43')]));_0xda2a74[_0x7d58('0x49')][_0x7d58('0xe7')]=_0x5965cc['id'];if(_0x2eb60f[_0x7d58('0x42')][_0x7d58('0x77')]){_0xda2a74[_0x7d58('0x49')]=_[_0x7d58('0x9b')](_0xda2a74[_0x7d58('0x49')],{'$or':_['map'](_0xda2a74[_0x7d58('0xa9')],function(_0x3784a5){var _0xc70fca={};_0xc70fca[_0x3784a5]={'$like':'%'+_0x2eb60f[_0x7d58('0x42')]['filter']+'%'};return _0xc70fca;})});}_0xda2a74[_0x7d58('0x49')][_0x7d58('0xd5')]=![];if(_0x2eb60f['query']['id']){_0xda2a74[_0x7d58('0x49')]['id']={'$gt':_0x2eb60f[_0x7d58('0x42')]['id']};}_0xda2a74=_[_0x7d58('0x9b')]({},_0xda2a74,_0x2eb60f[_0x7d58('0xab')]);return db[_0x7d58('0x36')][_0x7d58('0x29')]({'where':_0xda2a74[_0x7d58('0x49')]})[_0x7d58('0x1b')](function(_0x5715f1){_0x4201cf['count']=_0x5715f1;_0xda2a74['include']=[];if(_0x2eb60f['query'][_0x7d58('0xec')]){_0xda2a74[_0x7d58('0xaa')][_0x7d58('0x83')]({'model':db['User'],'as':_0x7d58('0xc6'),'attributes':['id',_0x7d58('0xd0'),_0x7d58('0xcf')]});}if(_0x2eb60f['query']['includeAll']){_0xda2a74[_0x7d58('0xaa')]=[{'all':!![]}];}return db[_0x7d58('0x36')][_0x7d58('0xe9')](_0xda2a74);})['then'](function(_0x3c93c9){_0x4201cf[_0x7d58('0xa6')]=_0x3c93c9;return _0x4201cf;});}})[_0x7d58('0x1b')](respondWithFilteredResult(_0x2bc4e5,_0xda2a74))[_0x7d58('0x24')](handleError(_0x2bc4e5,null));};exports[_0x7d58('0xed')]=function(_0x19cdaa,_0xf333b5,_0x53a5b2){return db[_0x7d58('0x3e')][_0x7d58('0xac')]({'where':{'id':_0x19cdaa[_0x7d58('0xa8')]['id']}})[_0x7d58('0x1b')](handleEntityNotFound(_0xf333b5,null))[_0x7d58('0x1b')](function(_0x33665d){if(_0x33665d){return _0x33665d[_0x7d58('0xee')](_0x19cdaa[_0x7d58('0xae')][_0x7d58('0xe3')],_[_0x7d58('0xe4')](_0x19cdaa[_0x7d58('0xae')],[_0x7d58('0xe3'),'id'])||{})['spread'](function(){return db[_0x7d58('0xef')][_0x7d58('0xe9')]({'attributes':['id',_0x7d58('0x32'),_0x7d58('0x4c')],'where':{'id':_0x19cdaa['body'][_0x7d58('0xe3')]}});})[_0x7d58('0x1b')](function(_0x5a719e){socket[_0x7d58('0xf0')](_0x7d58('0xf1'),{'id':Number(_0x19cdaa[_0x7d58('0xa8')]['id']),'tags':_0x5a719e||[]});return{'id':Number(_0x19cdaa[_0x7d58('0xa8')]['id']),'tags':_0x5a719e||[]};});}})[_0x7d58('0x1b')](respondWithResult(_0xf333b5,null))['catch'](handleError(_0xf333b5,null));};exports['removeTags']=function(_0xb45f78,_0x56e9c6,_0x592c9b){return db[_0x7d58('0x3e')]['find']({'where':{'id':_0xb45f78[_0x7d58('0xa8')]['id']}})['then'](handleEntityNotFound(_0x56e9c6,null))[_0x7d58('0x1b')](function(_0x811c99){if(_0x811c99){return _0x811c99[_0x7d58('0xf2')](_0xb45f78[_0x7d58('0x42')][_0x7d58('0xe3')]);}})[_0x7d58('0x1b')](respondWithStatusCode(_0x56e9c6,null))[_0x7d58('0x24')](handleError(_0x56e9c6,null));};exports[_0x7d58('0xbe')]=function(_0x3c8cec,_0x35be81){var _0x28c8ca=moment()[_0x7d58('0xf3')]()['toString']();var _0x41c0f0=path['join'](config[_0x7d58('0xbf')],_0x7d58('0xf4'),_0x7d58('0xf5'),_0x7d58('0xf6'));var _0x2596eb=path[_0x7d58('0x85')](config['root'],_0x7d58('0xf4'),_0x7d58('0xf5'),_0x7d58('0xf7'));var _0x3d5722=path[_0x7d58('0x85')](_0x41c0f0,_0x28c8ca);var _0x339ee5=util['format']('transcript-%d-%s.zip',_0x3c8cec[_0x7d58('0xa8')]['id'],_0x28c8ca);var _0x229ac5=path['join'](_0x41c0f0,_0x339ee5);var _0x1497c1=![];return db[_0x7d58('0x3e')]['find']({'where':{'id':_0x3c8cec[_0x7d58('0xa8')]['id']},'include':[{'model':db[_0x7d58('0x36')],'as':_0x7d58('0xc9'),'attributes':['id',_0x7d58('0xae'),_0x7d58('0x61'),_0x7d58('0xd4'),_0x7d58('0xd5')],'include':[{'model':db[_0x7d58('0xc6')],'as':_0x7d58('0xc6'),'attributes':['id',_0x7d58('0xd0')],'raw':!![]},{'model':db[_0x7d58('0xc8')],'as':'Contact','attributes':['id',_0x7d58('0xf8'),_0x7d58('0xf9')],'raw':!![]},{'model':db[_0x7d58('0xfa')],'as':_0x7d58('0xfa'),'raw':!![]}]},{'model':db[_0x7d58('0xfb')],'as':_0x7d58('0xfc'),'attributes':['id','name']},{'model':db['User'],'as':'Owner','attributes':['id',_0x7d58('0xd0')]}]})[_0x7d58('0x1b')](handleEntityNotFound(_0x35be81,null))[_0x7d58('0x1b')](function(_0x24ed49){if(_0x24ed49){var _0x569de5=_0x24ed49['get']({'plain':!![]});_0x1497c1=!![];var _0xa01b4a={'format':'A4','border':'10px','header':{'height':'40px','contents':{'first':'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Interaction\x20Transcript \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'}},'footer':{'height':'30px','contents':{'default':util[_0x7d58('0x66')](_0x7d58('0xfd'),util['format'](_0x7d58('0xfe'),_0x7d58('0xff'),_0x569de5['id']),moment()[_0x7d58('0x66')]('YYYY-MM-DD')[_0x7d58('0x84')]())}}};fs[_0x7d58('0x100')](_0x3d5722);var _0x1c8031={'channel':_0x7d58('0xff'),'account':_0x569de5['Account'][_0x7d58('0x32')],'agent':_0x569de5[_0x7d58('0x101')]?_0x569de5['Owner']['fullname']:_0x7d58('0x102'),'createdAt':moment(_0x569de5[_0x7d58('0x61')])['format'](_0x7d58('0xe8'))[_0x7d58('0x84')](),'closedAt':_0x569de5[_0x7d58('0x34')]?moment(_0x569de5['closedAt'])[_0x7d58('0x66')](_0x7d58('0xe8'))[_0x7d58('0x84')]():'','disposition':_0x569de5[_0x7d58('0x103')],'chatInfo':{'browser':_0x569de5[_0x7d58('0x104')],'os':_0x569de5[_0x7d58('0x105')],'referer':_0x569de5[_0x7d58('0x106')],'customerIp':_0x569de5[_0x7d58('0x107')]},'messages':_(_0x569de5[_0x7d58('0xc9')])['tail']()['filter']({'secret':![]})[_0x7d58('0x38')](function(_0x450304){if(_0x450304[_0x7d58('0xfa')]){var _0x21e635=path['join'](_0x2596eb,_0x450304[_0x7d58('0xfa')][_0x7d58('0xb8')]);if(fs[_0x7d58('0x108')](_0x21e635)){fs[_0x7d58('0x109')](_0x21e635)[_0x7d58('0x10a')](fs[_0x7d58('0x10b')](path[_0x7d58('0x85')](_0x3d5722,_0x450304[_0x7d58('0xfa')][_0x7d58('0xb8')])));}}return{'date':moment(_0x450304[_0x7d58('0x61')])[_0x7d58('0x66')](_0x7d58('0xe8'))[_0x7d58('0x84')](),'sender':_0x450304[_0x7d58('0xd4')]===_0x7d58('0x10c')?_0x450304[_0x7d58('0xc6')]?_0x450304[_0x7d58('0xc6')]['fullname']:'System':_0x450304['Contact'][_0x7d58('0xf8')]+(_0x450304['Contact']['lastName']?'\x20'+_0x450304[_0x7d58('0x10d')][_0x7d58('0xf9')]:''),'body':_0x450304[_0x7d58('0xfa')]?_0x450304[_0x7d58('0xfa')][_0x7d58('0xb8')]:_0x450304[_0x7d58('0xae')],'direction':_0x450304[_0x7d58('0xd4')]===_0x7d58('0x10c')?'A':'C','secret':_0x450304[_0x7d58('0xd5')],'attachment':_0x450304[_0x7d58('0xfa')]};})[_0x7d58('0x62')]()};return ejs[_0x7d58('0x10e')](path['join'](config[_0x7d58('0xbf')],_0x7d58('0xf4'),_0x7d58('0x10f'),'downloadInteraction.html'),{'interaction':_0x1c8031})[_0x7d58('0x1b')](function(_0x427dc7){return new BPromise(function(_0x4b61a9,_0x21c839){pdf['create'](_0x427dc7,_0xa01b4a)[_0x7d58('0x110')](path[_0x7d58('0x85')](_0x3d5722,_0x7d58('0x111')+_0x569de5['id']+'-'+_0x28c8ca+_0x7d58('0x112')),function(_0xe74e4,_0x5a9cc3){if(_0xe74e4)return _0x21c839(_0xe74e4);_0x4b61a9(_0x5a9cc3);});});});}})[_0x7d58('0x1b')](function(){if(_0x1497c1){return new BPromise(function(_0x28b7df,_0x5d96e7){zipdir(_0x3d5722,{'saveTo':_0x229ac5},function(_0xe76d2,_0x3897e0){if(_0xe76d2)return _0x5d96e7(_0xe76d2);return _0x28b7df(_0x3897e0);});})[_0x7d58('0x1b')](function(){return new BPromise(function(_0x87a9d4,_0x5ba61d){rimraf(_0x3d5722,function(_0x449246){if(_0x449246)_0x5ba61d(_0x449246);return _0x87a9d4();});});})['then'](function(){return _0x35be81['download'](_0x229ac5,_0x339ee5,function(_0x295d6a){if(_0x295d6a){console[_0x7d58('0x113')](_0x7d58('0x114'),_0x295d6a);}else{fs['unlinkSync'](_0x229ac5);}});});}else{return _0x35be81[_0x7d58('0x25')](0xc8);}})[_0x7d58('0x24')](handleError(_0x35be81,null));};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js
index 4800e17..373940f 100644
--- a/server/api/chatInteraction/chatInteraction.events.js
+++ b/server/api/chatInteraction/chatInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe971=['setDataValue','Users','map','unreadMessages','emit','catch','hook','exports','ChatInteraction','../../mysqldb','setMaxListeners','save','update','remove','getUsers','then'];(function(_0x10e41a,_0x33d506){var _0x1108cd=function(_0x3554ac){while(--_0x3554ac){_0x10e41a['push'](_0x10e41a['shift']());}};_0x1108cd(++_0x33d506);}(_0xe971,0xb8));var _0x1e97=function(_0x369eda,_0x3cb5a8){_0x369eda=_0x369eda-0x0;var _0x327632=_0xe971[_0x369eda];return _0x327632;};'use strict';var EventEmitter=require('events');var ChatInteraction=require('../../mysqldb')['db'][_0x1e97('0x0')];var ChatMessage=require(_0x1e97('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x1e97('0x2')](0x0);var events={'afterCreate':_0x1e97('0x3'),'afterUpdate':_0x1e97('0x4'),'afterDestroy':_0x1e97('0x5')};function emitEvent(_0x2cb48b){return function(_0x3e64e7,_0x3acfb0,_0x1991f6){_0x3e64e7[_0x1e97('0x6')]({'attributes':['id'],'raw':!![]})[_0x1e97('0x7')](function(_0x15f6a6){_0x3e64e7[_0x1e97('0x8')](_0x1e97('0x9'),_0x15f6a6[_0x1e97('0xa')](function(_0x380b8a){return{'id':_0x380b8a['id']};}));return ChatMessage['findAll']({'where':{'ChatInteractionId':_0x3e64e7['id'],'direction':'in','read':![]},'raw':!![]});})[_0x1e97('0x7')](function(_0x222091){_0x3e64e7[_0x1e97('0x8')](_0x1e97('0xb'),_0x222091['length']);ChatInteractionEvents[_0x1e97('0xc')](_0x2cb48b+':'+_0x3e64e7['id'],_0x3e64e7);ChatInteractionEvents[_0x1e97('0xc')](_0x2cb48b,_0x3e64e7);_0x1991f6(null);})[_0x1e97('0xd')](_0x1991f6(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInteraction[_0x1e97('0xe')](e,emitEvent(event));}}module[_0x1e97('0xf')]=ChatInteractionEvents;
\ No newline at end of file
+var _0x9782=['length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','save','update','remove','then','setDataValue','Users','map','findAll'];(function(_0x3f7a0d,_0x29e65b){var _0x2f9129=function(_0x291172){while(--_0x291172){_0x3f7a0d['push'](_0x3f7a0d['shift']());}};_0x2f9129(++_0x29e65b);}(_0x9782,0xf6));var _0x2978=function(_0x347d95,_0x2d161b){_0x347d95=_0x347d95-0x0;var _0x1a5e53=_0x9782[_0x347d95];return _0x1a5e53;};'use strict';var EventEmitter=require(_0x2978('0x0'));var ChatInteraction=require(_0x2978('0x1'))['db']['ChatInteraction'];var ChatMessage=require(_0x2978('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2978('0x2'),'afterUpdate':_0x2978('0x3'),'afterDestroy':_0x2978('0x4')};function emitEvent(_0x452f52){return function(_0x1f1502,_0x35cce1,_0x3626db){_0x1f1502['getUsers']({'attributes':['id'],'raw':!![]})[_0x2978('0x5')](function(_0x48e2d3){_0x1f1502[_0x2978('0x6')](_0x2978('0x7'),_0x48e2d3[_0x2978('0x8')](function(_0x1b5585){return{'id':_0x1b5585['id']};}));return ChatMessage[_0x2978('0x9')]({'where':{'ChatInteractionId':_0x1f1502['id'],'direction':'in','read':![]},'raw':!![]});})[_0x2978('0x5')](function(_0x228df3){_0x1f1502[_0x2978('0x6')]('unreadMessages',_0x228df3[_0x2978('0xa')]);ChatInteractionEvents[_0x2978('0xb')](_0x452f52+':'+_0x1f1502['id'],_0x1f1502);ChatInteractionEvents[_0x2978('0xb')](_0x452f52,_0x1f1502);_0x3626db(null);})[_0x2978('0xc')](_0x3626db(null));};}for(var e in events){if(events[_0x2978('0xd')](e)){var event=events[e];ChatInteraction[_0x2978('0xe')](e,emitEvent(event));}}module[_0x2978('0xf')]=ChatInteractionEvents;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js
index 1bb2d3f..245310f 100644
--- a/server/api/chatInteraction/chatInteraction.model.js
+++ b/server/api/chatInteraction/chatInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5eb8=['request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','ChatInteraction','chat_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','../../config/logger','api','moment','bluebird'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x5eb8,0xb0));var _0x85eb=function(_0x1ec65c,_0x354923){_0x1ec65c=_0x1ec65c-0x0;var _0x5249c2=_0x5eb8[_0x1ec65c];return _0x5249c2;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x85eb('0x0'))(_0x85eb('0x1'));var moment=require(_0x85eb('0x2'));var BPromise=require(_0x85eb('0x3'));var rp=require(_0x85eb('0x4'));var fs=require('fs');var path=require(_0x85eb('0x5'));var rimraf=require(_0x85eb('0x6'));var config=require(_0x85eb('0x7'));var attributes=require(_0x85eb('0x8'));module[_0x85eb('0x9')]=function(_0x2bf83c,_0x1ba1d8){return _0x2bf83c['define'](_0x85eb('0xa'),attributes,{'tableName':_0x85eb('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x448345,_0x5cd4ec,_0x2da3b0){if(_0x448345['changed'](_0x85eb('0xc'))){_0x448345[_0x85eb('0xd')]=moment()[_0x85eb('0xe')](_0x85eb('0xf'));}_0x2da3b0(null,_0x448345);}},'charset':_0x85eb('0x10'),'collate':_0x85eb('0x11')});};
\ No newline at end of file
+var _0xac4a=['changed','closedAt','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./chatInteraction.attributes','define','chat_interactions'];(function(_0x45b7bd,_0x3b488d){var _0x26bff5=function(_0x4cd815){while(--_0x4cd815){_0x45b7bd['push'](_0x45b7bd['shift']());}};_0x26bff5(++_0x3b488d);}(_0xac4a,0x13f));var _0xaac4=function(_0x1a6082,_0x3d52da){_0x1a6082=_0x1a6082-0x0;var _0x7cd434=_0xac4a[_0x1a6082];return _0x7cd434;};'use strict';var _=require(_0xaac4('0x0'));var util=require(_0xaac4('0x1'));var logger=require(_0xaac4('0x2'))(_0xaac4('0x3'));var moment=require(_0xaac4('0x4'));var BPromise=require(_0xaac4('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xaac4('0x6'));var config=require(_0xaac4('0x7'));var attributes=require(_0xaac4('0x8'));module['exports']=function(_0x1283a5,_0x53d03a){return _0x1283a5[_0xaac4('0x9')]('ChatInteraction',attributes,{'tableName':_0xaac4('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x27354c,_0x567295,_0x5cfc1b){if(_0x27354c[_0xaac4('0xb')]('closed')){_0x27354c[_0xaac4('0xc')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x5cfc1b(null,_0x27354c);}},'charset':_0xaac4('0xd'),'collate':_0xaac4('0xe')});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js
index 2583e94..2cd3717 100644
--- a/server/api/chatInteraction/chatInteraction.rpc.js
+++ b/server/api/chatInteraction/chatInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2356=['request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','UpdateChatInteraction','ChatInteraction','update','options','raw','where','then','AddTagsToChatInteraction','addTags','body','omit','ids','spread','AddTags','lodash','moment','../../config/utils','../../config/logger','rpc','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','request','ChatInteraction,\x20%s,\x20%s'];(function(_0x2a1b33,_0x409f50){var _0x4c50e7=function(_0x13e16d){while(--_0x13e16d){_0x2a1b33['push'](_0x2a1b33['shift']());}};_0x4c50e7(++_0x409f50);}(_0x2356,0x1df));var _0x6235=function(_0x491f78,_0x1c997e){_0x491f78=_0x491f78-0x0;var _0x47e9f9=_0x2356[_0x491f78];return _0x47e9f9;};'use strict';var _=require(_0x6235('0x0'));var util=require('util');var moment=require(_0x6235('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x6235('0x2'));var logger=require(_0x6235('0x3'))(_0x6235('0x4'));var config=require('../../config/environment');var jayson=require(_0x6235('0x5'));var client=jayson['client'][_0x6235('0x6')]({'port':0x232a});config[_0x6235('0x7')]=_[_0x6235('0x8')](config[_0x6235('0x7')],{'host':_0x6235('0x9'),'port':0x18eb});var socket=require(_0x6235('0xa'))(new Redis(config['redis']));require(_0x6235('0xb'))[_0x6235('0xc')](socket);function respondWithRpcPromise(_0x3a016c,_0x160042,_0x3e215b){return new BPromise(function(_0x11aba8,_0x277e10){return client[_0x6235('0xd')](_0x3a016c,_0x3e215b)['then'](function(_0x4f8549){logger['info'](_0x6235('0xe'),_0x160042,_0x6235('0xf'));logger[_0x6235('0x10')](_0x6235('0x11'),_0x160042,_0x6235('0xf'),JSON[_0x6235('0x12')](_0x4f8549));if(_0x4f8549[_0x6235('0x13')]){if(_0x4f8549[_0x6235('0x13')][_0x6235('0x14')]===0x1f4){logger[_0x6235('0x13')](_0x6235('0xe'),_0x160042,_0x4f8549[_0x6235('0x13')][_0x6235('0x15')]);return _0x277e10(_0x4f8549[_0x6235('0x13')][_0x6235('0x15')]);}logger[_0x6235('0x13')]('ChatInteraction,\x20%s,\x20%s',_0x160042,_0x4f8549[_0x6235('0x13')][_0x6235('0x15')]);return _0x11aba8(_0x4f8549[_0x6235('0x13')][_0x6235('0x15')]);}else{logger[_0x6235('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x160042,_0x6235('0xf'));_0x11aba8(_0x4f8549['result'][_0x6235('0x15')]);}})[_0x6235('0x17')](function(_0x2e2813){logger[_0x6235('0x13')](_0x6235('0xe'),_0x160042,_0x2e2813);_0x277e10(_0x2e2813);});});}exports[_0x6235('0x18')]=function(_0x393712){var _0x55da9f=this;return new Promise(function(_0x1c0a56,_0x506f30){return db[_0x6235('0x19')][_0x6235('0x1a')](_0x393712['body'],{'raw':_0x393712[_0x6235('0x1b')]?_0x393712[_0x6235('0x1b')][_0x6235('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x393712[_0x6235('0x1b')]?_0x393712[_0x6235('0x1b')][_0x6235('0x1d')]||null:null,'attributes':_0x393712['options']?_0x393712[_0x6235('0x1b')]['attributes']||null:null,'limit':_0x393712[_0x6235('0x1b')]?_0x393712['options']['limit']||null:null})[_0x6235('0x1e')](function(_0x26f1a3){logger['info'](_0x6235('0x18'),_0x393712);logger['debug'](_0x6235('0x18'),_0x393712,JSON[_0x6235('0x12')](_0x26f1a3));_0x1c0a56(_0x26f1a3);})['catch'](function(_0x4abf6f){logger[_0x6235('0x13')](_0x6235('0x18'),_0x4abf6f[_0x6235('0x15')],_0x393712);_0x506f30(_0x55da9f[_0x6235('0x13')](0x1f4,_0x4abf6f[_0x6235('0x15')]));});});};exports[_0x6235('0x1f')]=function(_0x5abeb8){return new Promise(function(_0x17330a,_0xe4433a){return db[_0x6235('0x19')]['find']({'where':_0x5abeb8['options']?_0x5abeb8['options']['where']||null:null})['then'](function(_0x24530){if(_0x24530){return _0x24530[_0x6235('0x20')](_0x5abeb8[_0x6235('0x21')]['ids'],_[_0x6235('0x22')](_0x5abeb8['body'],[_0x6235('0x23'),'id'])||{});}})[_0x6235('0x24')](function(_0x39073b){logger[_0x6235('0x16')](_0x6235('0x25'),_0x5abeb8);logger[_0x6235('0x10')]('AddTags',_0x5abeb8,JSON[_0x6235('0x12')](_0x39073b));_0x17330a(_0x39073b);})[_0x6235('0x17')](function(_0x328e8b){logger[_0x6235('0x13')]('AddTags',_0x328e8b[_0x6235('0x15')],_0x5abeb8);_0xe4433a(_this[_0x6235('0x13')](0x1f4,_0x328e8b[_0x6235('0x15')]));});});};
\ No newline at end of file
+var _0x2018=['bluebird','randomstring','../../config/utils','rpc','jayson/promise','http','redis','defaults','localhost','register','then','info','ChatInteraction,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','UpdateChatInteraction','update','body','options','raw','attributes','limit','catch','ChatInteraction','find','where','addTags','ids','spread','AddTags','lodash','moment'];(function(_0x5434e0,_0x4320cc){var _0x24996e=function(_0x5ca4fc){while(--_0x5ca4fc){_0x5434e0['push'](_0x5434e0['shift']());}};_0x24996e(++_0x4320cc);}(_0x2018,0x195));var _0x8201=function(_0x7c2035,_0x13334){_0x7c2035=_0x7c2035-0x0;var _0x50f5c1=_0x2018[_0x7c2035];return _0x50f5c1;};'use strict';var _=require(_0x8201('0x0'));var util=require('util');var moment=require(_0x8201('0x1'));var BPromise=require(_0x8201('0x2'));var rs=require(_0x8201('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8201('0x4'));var logger=require('../../config/logger')(_0x8201('0x5'));var config=require('../../config/environment');var jayson=require(_0x8201('0x6'));var client=jayson['client'][_0x8201('0x7')]({'port':0x232a});config[_0x8201('0x8')]=_[_0x8201('0x9')](config[_0x8201('0x8')],{'host':_0x8201('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./chatInteraction.socket')[_0x8201('0xb')](socket);function respondWithRpcPromise(_0x5af373,_0x3df85c,_0x2c6897){return new BPromise(function(_0x4b880f,_0x5e1dac){return client['request'](_0x5af373,_0x2c6897)[_0x8201('0xc')](function(_0x599893){logger[_0x8201('0xd')](_0x8201('0xe'),_0x3df85c,'request\x20sent');logger[_0x8201('0xf')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x3df85c,_0x8201('0x10'),JSON[_0x8201('0x11')](_0x599893));if(_0x599893[_0x8201('0x12')]){if(_0x599893['error'][_0x8201('0x13')]===0x1f4){logger[_0x8201('0x12')](_0x8201('0xe'),_0x3df85c,_0x599893[_0x8201('0x12')]['message']);return _0x5e1dac(_0x599893[_0x8201('0x12')][_0x8201('0x14')]);}logger[_0x8201('0x12')](_0x8201('0xe'),_0x3df85c,_0x599893[_0x8201('0x12')][_0x8201('0x14')]);return _0x4b880f(_0x599893[_0x8201('0x12')][_0x8201('0x14')]);}else{logger[_0x8201('0xd')]('ChatInteraction,\x20%s,\x20%s',_0x3df85c,_0x8201('0x10'));_0x4b880f(_0x599893[_0x8201('0x15')][_0x8201('0x14')]);}})['catch'](function(_0x9457d1){logger['error'](_0x8201('0xe'),_0x3df85c,_0x9457d1);_0x5e1dac(_0x9457d1);});});}exports[_0x8201('0x16')]=function(_0x517b8a){var _0x2f3546=this;return new Promise(function(_0x2d18ca,_0x133fa7){return db['ChatInteraction'][_0x8201('0x17')](_0x517b8a[_0x8201('0x18')],{'raw':_0x517b8a[_0x8201('0x19')]?_0x517b8a[_0x8201('0x19')][_0x8201('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x517b8a['options']?_0x517b8a['options']['where']||null:null,'attributes':_0x517b8a[_0x8201('0x19')]?_0x517b8a[_0x8201('0x19')][_0x8201('0x1b')]||null:null,'limit':_0x517b8a[_0x8201('0x19')]?_0x517b8a[_0x8201('0x19')][_0x8201('0x1c')]||null:null})[_0x8201('0xc')](function(_0x9b3636){logger[_0x8201('0xd')](_0x8201('0x16'),_0x517b8a);logger[_0x8201('0xf')]('UpdateChatInteraction',_0x517b8a,JSON[_0x8201('0x11')](_0x9b3636));_0x2d18ca(_0x9b3636);})[_0x8201('0x1d')](function(_0x1a6c99){logger[_0x8201('0x12')]('UpdateChatInteraction',_0x1a6c99['message'],_0x517b8a);_0x133fa7(_0x2f3546[_0x8201('0x12')](0x1f4,_0x1a6c99[_0x8201('0x14')]));});});};exports['AddTagsToChatInteraction']=function(_0x3c8b65){return new Promise(function(_0x1cba62,_0x4e2992){return db[_0x8201('0x1e')][_0x8201('0x1f')]({'where':_0x3c8b65['options']?_0x3c8b65[_0x8201('0x19')][_0x8201('0x20')]||null:null})['then'](function(_0x2c3060){if(_0x2c3060){return _0x2c3060[_0x8201('0x21')](_0x3c8b65[_0x8201('0x18')][_0x8201('0x22')],_['omit'](_0x3c8b65[_0x8201('0x18')],[_0x8201('0x22'),'id'])||{});}})[_0x8201('0x23')](function(_0x237e66){logger[_0x8201('0xd')](_0x8201('0x24'),_0x3c8b65);logger[_0x8201('0xf')](_0x8201('0x24'),_0x3c8b65,JSON[_0x8201('0x11')](_0x237e66));_0x1cba62(_0x237e66);})[_0x8201('0x1d')](function(_0x3d3e78){logger['error'](_0x8201('0x24'),_0x3d3e78[_0x8201('0x14')],_0x3c8b65);_0x4e2992(_this[_0x8201('0x12')](0x1f4,_0x3d3e78['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js
index 37ed86b..8a2bddd 100644
--- a/server/api/chatInteraction/chatInteraction.socket.js
+++ b/server/api/chatInteraction/chatInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8f73=['chatInteraction:','save','remove','update','removeListener','register'];(function(_0x1a83da,_0x34d5c6){var _0x5463d4=function(_0x22291c){while(--_0x22291c){_0x1a83da['push'](_0x1a83da['shift']());}};_0x5463d4(++_0x34d5c6);}(_0x8f73,0x16f));var _0x38f7=function(_0x2b7764,_0x2606f1){_0x2b7764=_0x2b7764-0x0;var _0x848dcb=_0x8f73[_0x2b7764];return _0x848dcb;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0x38f7('0x0'),_0x38f7('0x1'),_0x38f7('0x2')];function createListener(_0x171cd2,_0x2d7cb9){return function(_0x5e908a){_0x2d7cb9['emit'](_0x171cd2,_0x5e908a);};}function removeListener(_0x79766a,_0x1957ed){return function(){ChatInteractionEvents[_0x38f7('0x3')](_0x79766a,_0x1957ed);};}exports[_0x38f7('0x4')]=function(_0x1c90ce){for(var _0xc06080=0x0,_0x120d5a=events['length'];_0xc06080<_0x120d5a;_0xc06080++){var _0x4a0972=events[_0xc06080];var _0x2b0601=createListener(_0x38f7('0x5')+_0x4a0972,_0x1c90ce);ChatInteractionEvents['on'](_0x4a0972,_0x2b0601);}};
\ No newline at end of file
+var _0x7d71=['./chatInteraction.events','remove','removeListener','register','chatInteraction:'];(function(_0x3e6f74,_0xd6cbbd){var _0x1e255a=function(_0x2851ce){while(--_0x2851ce){_0x3e6f74['push'](_0x3e6f74['shift']());}};_0x1e255a(++_0xd6cbbd);}(_0x7d71,0x73));var _0x17d7=function(_0x273c39,_0x1052e6){_0x273c39=_0x273c39-0x0;var _0x46d6b5=_0x7d71[_0x273c39];return _0x46d6b5;};'use strict';var ChatInteractionEvents=require(_0x17d7('0x0'));var events=['save',_0x17d7('0x1'),'update'];function createListener(_0x51d4b5,_0x1416f9){return function(_0x3705e9){_0x1416f9['emit'](_0x51d4b5,_0x3705e9);};}function removeListener(_0x5642fd,_0x9e1985){return function(){ChatInteractionEvents[_0x17d7('0x2')](_0x5642fd,_0x9e1985);};}exports[_0x17d7('0x3')]=function(_0x110ab0){for(var _0x5eccd8=0x0,_0x1314e7=events['length'];_0x5eccd8<_0x1314e7;_0x5eccd8++){var _0x207d21=events[_0x5eccd8];var _0x3b06d9=createListener(_0x17d7('0x4')+_0x207d21,_0x110ab0);ChatInteractionEvents['on'](_0x207d21,_0x3b06d9);}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js
index 477414a..21bf99e 100644
--- a/server/api/chatInteraction/index.js
+++ b/server/api/chatInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x955f=['removeTags','multer','util','path','connect-timeout','express','../../components/auth/service','./chatInteraction.controller','isAuthenticated','index','get','describe','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','getMyMessages','/:id/download','download','post','create','diskStorage','join','root','format','%s-%s','now','/:id/attachment_upload','single','attachmentUpload','addMessage','/:id/tags','tracked','chatinteraction:addtags','put','chat','update','/:id/custom_update','customUpdate','/:id/abandon','/:id/close','close','delete','chatinteraction:destroy','destroy'];(function(_0x554577,_0x590a4f){var _0x5b0b90=function(_0x29ef64){while(--_0x29ef64){_0x554577['push'](_0x554577['shift']());}};_0x5b0b90(++_0x590a4f);}(_0x955f,0x1eb));var _0xf955=function(_0x23cad0,_0x46b832){_0x23cad0=_0x23cad0-0x0;var _0x363676=_0x955f[_0x23cad0];return _0x363676;};'use strict';var multer=require(_0xf955('0x0'));var util=require(_0xf955('0x1'));var path=require(_0xf955('0x2'));var timeout=require(_0xf955('0x3'));var express=require(_0xf955('0x4'));var router=express['Router']();var auth=require(_0xf955('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xf955('0x6'));router['get']('/',auth[_0xf955('0x7')](),controller[_0xf955('0x8')]);router[_0xf955('0x9')]('/describe',auth[_0xf955('0x7')](),controller[_0xf955('0xa')]);router['get'](_0xf955('0xb'),auth[_0xf955('0xc')](),controller[_0xf955('0xd')]);router[_0xf955('0x9')](_0xf955('0xe'),auth[_0xf955('0xc')](),controller[_0xf955('0xf')]);router['get'](_0xf955('0x10'),auth['isAuthenticated'](),controller[_0xf955('0x11')]);router[_0xf955('0x9')](_0xf955('0x12'),auth['isChatInteractionAuthorized'](),controller[_0xf955('0x13')]);router['get'](_0xf955('0x14'),auth['isAuthenticated'](),controller[_0xf955('0x15')]);router[_0xf955('0x16')]('/',auth[_0xf955('0x7')](),controller[_0xf955('0x17')]);var upload=multer({'storage':multer[_0xf955('0x18')]({'destination':function(_0x341b8c,_0x1c3235,_0x2783f2){_0x2783f2(null,path[_0xf955('0x19')](config[_0xf955('0x1a')],'server/files/attachments/'));},'filename':function(_0xc29b35,_0x54e60b,_0x3139d5){_0x3139d5(null,util[_0xf955('0x1b')](_0xf955('0x1c'),Date[_0xf955('0x1d')](),_0x54e60b['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xf955('0x16')](_0xf955('0x1e'),upload[_0xf955('0x1f')]('file'),controller[_0xf955('0x20')]);router[_0xf955('0x16')](_0xf955('0x10'),auth[_0xf955('0xc')](),controller[_0xf955('0x21')]);router['post'](_0xf955('0x22'),auth[_0xf955('0x7')](),interaction[_0xf955('0x23')]('chat',_0xf955('0x24')),controller['addTags']);router[_0xf955('0x25')](_0xf955('0xb'),auth[_0xf955('0x7')](),interaction[_0xf955('0x23')](_0xf955('0x26'),'chatinteraction:update'),controller[_0xf955('0x27')]);router[_0xf955('0x25')](_0xf955('0x28'),controller[_0xf955('0x29')]);router[_0xf955('0x25')](_0xf955('0x2a'),auth[_0xf955('0xc')](),controller['abandon']);router[_0xf955('0x25')](_0xf955('0x2b'),controller[_0xf955('0x2c')]);router[_0xf955('0x2d')](_0xf955('0xb'),auth[_0xf955('0x7')](),interaction[_0xf955('0x23')]('chat',_0xf955('0x2e')),controller[_0xf955('0x2f')]);router[_0xf955('0x2d')](_0xf955('0x22'),auth[_0xf955('0x7')](),controller[_0xf955('0x30')]);module['exports']=router;
\ No newline at end of file
+var _0x7072=['addTags','put','chatinteraction:update','update','/:id/custom_update','customUpdate','abandon','/:id/close','close','chatinteraction:destroy','delete','exports','util','path','connect-timeout','express','Router','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','isChatInteractionAuthorized','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','getMyMessages','/:id/download','download','create','diskStorage','join','root','server/files/attachments/','format','%s-%s','now','originalname','post','/:id/attachment_upload','single','addMessage','/:id/tags','tracked','chat','chatinteraction:addtags'];(function(_0x5223c8,_0x42e91a){var _0x4c3be1=function(_0x4bb42b){while(--_0x4bb42b){_0x5223c8['push'](_0x5223c8['shift']());}};_0x4c3be1(++_0x42e91a);}(_0x7072,0x138));var _0x2707=function(_0x2283dc,_0x2fcfc5){_0x2283dc=_0x2283dc-0x0;var _0x16db90=_0x7072[_0x2283dc];return _0x16db90;};'use strict';var multer=require('multer');var util=require(_0x2707('0x0'));var path=require(_0x2707('0x1'));var timeout=require(_0x2707('0x2'));var express=require(_0x2707('0x3'));var router=express[_0x2707('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x2707('0x5'));var controller=require('./chatInteraction.controller');router[_0x2707('0x6')]('/',auth[_0x2707('0x7')](),controller[_0x2707('0x8')]);router[_0x2707('0x6')](_0x2707('0x9'),auth[_0x2707('0x7')](),controller[_0x2707('0xa')]);router[_0x2707('0x6')](_0x2707('0xb'),auth[_0x2707('0xc')](),controller['show']);router['get'](_0x2707('0xd'),auth[_0x2707('0xc')](),controller[_0x2707('0xe')]);router[_0x2707('0x6')](_0x2707('0xf'),auth[_0x2707('0x7')](),controller[_0x2707('0x10')]);router[_0x2707('0x6')](_0x2707('0x11'),auth[_0x2707('0xc')](),controller[_0x2707('0x12')]);router[_0x2707('0x6')](_0x2707('0x13'),auth['isAuthenticated'](),controller[_0x2707('0x14')]);router['post']('/',auth[_0x2707('0x7')](),controller[_0x2707('0x15')]);var upload=multer({'storage':multer[_0x2707('0x16')]({'destination':function(_0x3a67f2,_0x13d9ac,_0x4e52a3){_0x4e52a3(null,path[_0x2707('0x17')](config[_0x2707('0x18')],_0x2707('0x19')));},'filename':function(_0x5d523f,_0x1153d7,_0x42f374){_0x42f374(null,util[_0x2707('0x1a')](_0x2707('0x1b'),Date[_0x2707('0x1c')](),_0x1153d7[_0x2707('0x1d')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x2707('0x1e')](_0x2707('0x1f'),upload[_0x2707('0x20')]('file'),controller['attachmentUpload']);router['post'](_0x2707('0xf'),auth[_0x2707('0xc')](),controller[_0x2707('0x21')]);router[_0x2707('0x1e')](_0x2707('0x22'),auth[_0x2707('0x7')](),interaction[_0x2707('0x23')](_0x2707('0x24'),_0x2707('0x25')),controller[_0x2707('0x26')]);router[_0x2707('0x27')](_0x2707('0xb'),auth[_0x2707('0x7')](),interaction[_0x2707('0x23')]('chat',_0x2707('0x28')),controller[_0x2707('0x29')]);router[_0x2707('0x27')](_0x2707('0x2a'),controller[_0x2707('0x2b')]);router[_0x2707('0x27')]('/:id/abandon',auth[_0x2707('0xc')](),controller[_0x2707('0x2c')]);router[_0x2707('0x27')](_0x2707('0x2d'),controller[_0x2707('0x2e')]);router['delete'](_0x2707('0xb'),auth['isAuthenticated'](),interaction[_0x2707('0x23')](_0x2707('0x24'),_0x2707('0x2f')),controller['destroy']);router[_0x2707('0x30')](_0x2707('0x22'),auth[_0x2707('0x7')](),controller['removeTags']);module[_0x2707('0x31')]=router;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
index f090a1d..6acf1b9 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.attributes.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2581=['TEXT','medium','BOOLEAN','sequelize','exports'];(function(_0x63c794,_0x14f52c){var _0x16f319=function(_0x149940){while(--_0x149940){_0x63c794['push'](_0x63c794['shift']());}};_0x16f319(++_0x14f52c);}(_0x2581,0xcb));var _0x1258=function(_0x4e5e79,_0x3a4d6f){_0x4e5e79=_0x4e5e79-0x0;var _0x3a537b=_0x2581[_0x4e5e79];return _0x3a537b;};'use strict';var Sequelize=require(_0x1258('0x0'));module[_0x1258('0x1')]={'body':{'type':Sequelize[_0x1258('0x2')](_0x1258('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x1258('0x4')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x33af=['exports','medium','BOOLEAN','INTEGER'];(function(_0x5f19ed,_0x30bc6f){var _0x11dd67=function(_0x392007){while(--_0x392007){_0x5f19ed['push'](_0x5f19ed['shift']());}};_0x11dd67(++_0x30bc6f);}(_0x33af,0xec));var _0xf33a=function(_0x5e34a4,_0x2e63ed){_0x5e34a4=_0x5e34a4-0x0;var _0x8d41d7=_0x33af[_0x5e34a4];return _0x8d41d7;};'use strict';var Sequelize=require('sequelize');module[_0xf33a('0x0')]={'body':{'type':Sequelize['TEXT'](_0xf33a('0x1')),'allowNull':![]},'read':{'type':Sequelize[_0xf33a('0x2')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xf33a('0x3')]}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js
index 100e9ef..97e4643 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.controller.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7566=['intersection','fields','nolimit','order','sort','where','pick','merge','map','type','VIRTUAL','field','options','includeAll','include','findAll','show','params','find','create','catch','body','describe','get','messages','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','getUsers','User','admin','userpic','internal','lastLoginAt','allowmessenger','showWebBar','-online','VoiceQueue','VoiceQueues','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','Agents','autoAssociation','UserProfileResource','isEmpty','filter','agent','length','resourceId','push','FromId','ToId','read','-createdAt','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','json','count','offset','limit','Content-Range','apply','update','then','destroy','error','stack','name','send','ChatInternalMessage','rawAttributes','keys','query','filters','model','attributes'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x7566,0x110));var _0x6756=function(_0x45161c,_0x5494fc){_0x45161c=_0x45161c-0x0;var _0x186581=_0x7566[_0x45161c];return _0x186581;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x6756('0x0'));var rimraf=require(_0x6756('0x1'));var zipdir=require(_0x6756('0x2'));var jsonpatch=require(_0x6756('0x3'));var rp=require(_0x6756('0x4'));var moment=require('moment');var BPromise=require(_0x6756('0x5'));var Mustache=require('mustache');var util=require(_0x6756('0x6'));var path=require('path');var sox=require(_0x6756('0x7'));var csv=require(_0x6756('0x8'));var ejs=require(_0x6756('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x6756('0xa'));var jsforce=require(_0x6756('0xb'));var deskjs=require(_0x6756('0xc'));var toCsv=require(_0x6756('0x8'));var querystring=require(_0x6756('0xd'));var Papa=require(_0x6756('0xe'));var Redis=require(_0x6756('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x6756('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6756('0x11'));var utils=require(_0x6756('0x12'));var config=require(_0x6756('0x13'));var db=require(_0x6756('0x14'))['db'];config[_0x6756('0x15')]=_[_0x6756('0x16')](config['redis'],{'host':_0x6756('0x17'),'port':0x18eb});var socket=require(_0x6756('0x18'))(new Redis(config[_0x6756('0x15')]));require(_0x6756('0x19'))[_0x6756('0x1a')](socket);function respondWithStatusCode(_0x846006,_0x452e11){_0x452e11=_0x452e11||0xcc;return function(_0x42994d){if(_0x42994d){return _0x846006[_0x6756('0x1b')](_0x452e11);}return _0x846006[_0x6756('0x1c')](_0x452e11)['end']();};}function respondWithResult(_0x2b996b,_0x13ae00){_0x13ae00=_0x13ae00||0xc8;return function(_0x380ac3){if(_0x380ac3){return _0x2b996b[_0x6756('0x1c')](_0x13ae00)[_0x6756('0x1d')](_0x380ac3);}};}function respondWithFilteredResult(_0x5a33c7,_0x3c88bb){return function(_0x3affb7){if(_0x3affb7){var _0x192ea2=_0x3affb7[_0x6756('0x1e')],_0x27d143=_0x3c88bb[_0x6756('0x1f')],_0xa6cdc1=_0x3c88bb['offset']+_0x3c88bb[_0x6756('0x20')],_0x17c799;if(_0xa6cdc1>=_0x192ea2){_0xa6cdc1=_0x192ea2;_0x17c799=0xc8;}else{_0x17c799=0xce;}_0x5a33c7[_0x6756('0x1c')](_0x17c799);return _0x5a33c7['set'](_0x6756('0x21'),_0x27d143+'-'+_0xa6cdc1+'/'+_0x192ea2)[_0x6756('0x1d')](_0x3affb7);}return null;};}function patchUpdates(_0x39dfa0){return function(_0x137b25){try{jsonpatch[_0x6756('0x22')](_0x137b25,_0x39dfa0,!![]);}catch(_0x2818dc){return BPromise['reject'](_0x2818dc);}return _0x137b25['save']();};}function saveUpdates(_0x306eef,_0x2acc31){return function(_0x44376a){if(_0x44376a){return _0x44376a[_0x6756('0x23')](_0x306eef)[_0x6756('0x24')](function(_0x1970a5){return _0x1970a5;});}return null;};}function removeEntity(_0x640b16,_0x29d6e4){return function(_0x1c7547){if(_0x1c7547){return _0x1c7547[_0x6756('0x25')]()[_0x6756('0x24')](function(){_0x640b16[_0x6756('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x81fa28,_0x50a91f){return function(_0x342bae){if(!_0x342bae){_0x81fa28[_0x6756('0x1b')](0x194);}return _0x342bae;};}function handleError(_0x1981b3,_0x15bda6){_0x15bda6=_0x15bda6||0x1f4;return function(_0x3e5f8a){logger[_0x6756('0x26')](_0x3e5f8a[_0x6756('0x27')]);if(_0x3e5f8a[_0x6756('0x28')]){delete _0x3e5f8a[_0x6756('0x28')];}_0x1981b3[_0x6756('0x1c')](_0x15bda6)[_0x6756('0x29')](_0x3e5f8a);};}exports['index']=function(_0x33ff33,_0x303341){var _0x472558={},_0x182985={},_0x3e992e={'count':0x0,'rows':[]};var _0x3d8545=db[_0x6756('0x2a')][_0x6756('0x2b')];_0x182985['model']=_[_0x6756('0x2c')](_0x3d8545);_0x182985[_0x6756('0x2d')]=_[_0x6756('0x2c')](_0x33ff33['query']);_0x182985[_0x6756('0x2e')]=_['intersection'](_0x182985[_0x6756('0x2f')],_0x182985[_0x6756('0x2d')]);_0x472558[_0x6756('0x30')]=_[_0x6756('0x31')](_0x182985['model'],qs[_0x6756('0x32')](_0x33ff33[_0x6756('0x2d')]['fields']));_0x472558['attributes']=_0x472558[_0x6756('0x30')]['length']?_0x472558[_0x6756('0x30')]:_0x182985[_0x6756('0x2f')];if(!_0x33ff33['query']['hasOwnProperty'](_0x6756('0x33'))){_0x472558[_0x6756('0x20')]=qs[_0x6756('0x20')](_0x33ff33[_0x6756('0x2d')][_0x6756('0x20')]);_0x472558[_0x6756('0x1f')]=qs['offset'](_0x33ff33[_0x6756('0x2d')][_0x6756('0x1f')]);}_0x472558[_0x6756('0x34')]=qs[_0x6756('0x35')](_0x33ff33[_0x6756('0x2d')][_0x6756('0x35')]);_0x472558[_0x6756('0x36')]=qs['filters'](_[_0x6756('0x37')](_0x33ff33[_0x6756('0x2d')],_0x182985['filters']));if(_0x33ff33['query']['filter']){_0x472558[_0x6756('0x36')]=_[_0x6756('0x38')](_0x472558[_0x6756('0x36')],{'$or':_[_0x6756('0x39')](_0x3d8545,function(_0x4c60a2){if(_0x4c60a2[_0x6756('0x3a')]['key']!==_0x6756('0x3b')){var _0x3b71f1={};_0x3b71f1[_0x4c60a2[_0x6756('0x3c')]]={'$like':'%'+_0x33ff33[_0x6756('0x2d')]['filter']+'%'};return _0x3b71f1;}})});}_0x472558=_[_0x6756('0x38')]({},_0x472558,_0x33ff33[_0x6756('0x3d')]);var _0x14921b={'where':_0x472558[_0x6756('0x36')]};return db['ChatInternalMessage']['count'](_0x14921b)['then'](function(_0x46a21d){_0x3e992e[_0x6756('0x1e')]=_0x46a21d;if(_0x33ff33[_0x6756('0x2d')][_0x6756('0x3e')]){_0x472558[_0x6756('0x3f')]=[{'all':!![]}];}return db[_0x6756('0x2a')][_0x6756('0x40')](_0x472558);})[_0x6756('0x24')](function(_0x468824){_0x3e992e['rows']=_0x468824;return _0x3e992e;})[_0x6756('0x24')](respondWithFilteredResult(_0x303341,_0x472558))['catch'](handleError(_0x303341,null));};exports[_0x6756('0x41')]=function(_0x138e78,_0x57469c){var _0x131655={'raw':!![],'where':{'id':_0x138e78[_0x6756('0x42')]['id']}},_0x55475e={};_0x55475e[_0x6756('0x2f')]=_[_0x6756('0x2c')](db[_0x6756('0x2a')]['rawAttributes']);_0x55475e[_0x6756('0x2d')]=_['keys'](_0x138e78[_0x6756('0x2d')]);_0x55475e[_0x6756('0x2e')]=_[_0x6756('0x31')](_0x55475e[_0x6756('0x2f')],_0x55475e['query']);_0x131655[_0x6756('0x30')]=_[_0x6756('0x31')](_0x55475e['model'],qs['fields'](_0x138e78[_0x6756('0x2d')][_0x6756('0x32')]));_0x131655[_0x6756('0x30')]=_0x131655[_0x6756('0x30')]['length']?_0x131655[_0x6756('0x30')]:_0x55475e[_0x6756('0x2f')];if(_0x138e78['query'][_0x6756('0x3e')]){_0x131655['include']=[{'all':!![]}];}_0x131655=_[_0x6756('0x38')]({},_0x131655,_0x138e78[_0x6756('0x3d')]);return db[_0x6756('0x2a')][_0x6756('0x43')](_0x131655)[_0x6756('0x24')](handleEntityNotFound(_0x57469c,null))[_0x6756('0x24')](respondWithResult(_0x57469c,null))['catch'](handleError(_0x57469c,null));};exports[_0x6756('0x44')]=function(_0x5abf66,_0x2db6f5){return db[_0x6756('0x2a')][_0x6756('0x44')](_0x5abf66['body'],{})[_0x6756('0x24')](respondWithResult(_0x2db6f5,0xc9))[_0x6756('0x45')](handleError(_0x2db6f5,null));};exports[_0x6756('0x23')]=function(_0x4487a4,_0x471e59){if(_0x4487a4[_0x6756('0x46')]['id']){delete _0x4487a4[_0x6756('0x46')]['id'];}return db['ChatInternalMessage'][_0x6756('0x43')]({'where':{'id':_0x4487a4[_0x6756('0x42')]['id']}})[_0x6756('0x24')](handleEntityNotFound(_0x471e59,null))[_0x6756('0x24')](saveUpdates(_0x4487a4[_0x6756('0x46')],null))[_0x6756('0x24')](respondWithResult(_0x471e59,null))[_0x6756('0x45')](handleError(_0x471e59,null));};exports['destroy']=function(_0x3a8bba,_0x5be608){return db[_0x6756('0x2a')][_0x6756('0x43')]({'where':{'id':_0x3a8bba['params']['id']}})[_0x6756('0x24')](handleEntityNotFound(_0x5be608,null))[_0x6756('0x24')](removeEntity(_0x5be608,null))[_0x6756('0x45')](handleError(_0x5be608,null));};exports[_0x6756('0x47')]=function(_0x33c820,_0x2d314a){return db['ChatInternalMessage'][_0x6756('0x47')]()[_0x6756('0x24')](respondWithResult(_0x2d314a,null))[_0x6756('0x45')](handleError(_0x2d314a,null));};function wrapUser(_0x5bf530){return function(_0x353ddf){var _0x46ee4b=_0x5bf530[_0x6756('0x48')]({'plain':!![]});_0x46ee4b[_0x6756('0x49')]=[];if(_0x353ddf){_0x46ee4b[_0x6756('0x4a')]=_0x353ddf[_0x6756('0x4b')];_0x46ee4b[_0x6756('0x4c')]=_0x353ddf;}else{_0x46ee4b[_0x6756('0x4a')]=moment(0x0)[_0x6756('0x4d')](_0x6756('0x4e'));_0x46ee4b['lastMessage']={};}return _0x46ee4b;};}exports[_0x6756('0x4f')]=function(_0x452a80,_0x353e18,_0x2b9fce){var _0x352a3e=[];return db[_0x6756('0x50')][_0x6756('0x40')]({'where':{'role':['agent',_0x6756('0x51'),'user']},'attributes':['id','fullname',_0x6756('0x28'),'role',_0x6756('0x52'),_0x6756('0x53'),'online',_0x6756('0x54'),_0x6756('0x55'),_0x6756('0x56')],'order':qs[_0x6756('0x35')](_0x6756('0x57')),'include':[{'model':db[_0x6756('0x58')],'as':_0x6756('0x59'),'attributes':['id',_0x6756('0x28'),'type'],'through':{'attributes':[]}}]})[_0x6756('0x24')](function(_0x2293f2){if(_0x2293f2){var _0x3495fe=_0x452a80[_0x6756('0x5a')][_0x6756('0x48')]({'plain':!![]});if(!_0x3495fe)throw new Error(_0x6756('0x5b'));if(_0x3495fe[_0x6756('0x5c')]===_0x6756('0x5a')){return db[_0x6756('0x5d')]['find']({'where':{'name':_0x6756('0x5e'),'userProfileId':_0x3495fe['userProfileId']},'raw':!![]})[_0x6756('0x24')](function(_0x7cac1){if(_0x7cac1){if(_0x7cac1[_0x6756('0x5f')]===0x0){return db[_0x6756('0x60')]['findAll']({'where':{'sectionId':_0x7cac1['id']},'raw':!![]})[_0x6756('0x24')](function(_0x3c1174){var _0x4a667c=[];if(_[_0x6756('0x61')](_0x3c1174)){_0x4a667c=_[_0x6756('0x62')](_0x2293f2,function(_0x14857e){if(_0x14857e[_0x6756('0x5c')]!==_0x6756('0x63')){return _0x14857e;}});return _0x4a667c;}else{for(var _0x24766c=0x0;_0x24766c<_0x2293f2[_0x6756('0x64')];_0x24766c++){var _0x23b915=_0x2293f2[_0x24766c];if(_0x23b915[_0x6756('0x5c')]===_0x6756('0x63')){var _0x35c611=_[_0x6756('0x43')](_0x3c1174,function(_0x59eac9){return _0x59eac9[_0x6756('0x65')]===_0x23b915['id'];});if(_0x35c611)_0x4a667c[_0x6756('0x66')](_0x23b915);}else{_0x4a667c[_0x6756('0x66')](_0x23b915);}}return _0x4a667c;}});}else{return _0x2293f2;}}else{var _0x2cfeac=_[_0x6756('0x62')](_0x2293f2,function(_0x4796cd){if(_0x4796cd[_0x6756('0x5c')]!=='agent'){return _0x4796cd;}});return _0x2cfeac;}});}else{return _0x2293f2;}}})[_0x6756('0x24')](function(_0x18cdc8){var _0x25fd3f=[];if(_0x18cdc8){_0x352a3e=_0x18cdc8;for(var _0x3650c7=0x0;_0x3650c7<_0x18cdc8[_0x6756('0x64')];_0x3650c7+=0x1){_0x352a3e[_0x3650c7]['messages']=[];_0x25fd3f[_0x6756('0x66')](db[_0x6756('0x2a')]['find']({'where':{'FromId':[_0x452a80['user']['id'],_0x18cdc8[_0x3650c7]['id']],'ToId':[_0x452a80[_0x6756('0x5a')]['id'],_0x18cdc8[_0x3650c7]['id']],'ChatGroupId':null},'attributes':['id','createdAt',_0x6756('0x67'),_0x6756('0x68'),_0x6756('0x69'),_0x6756('0x46')],'order':qs[_0x6756('0x35')](_0x6756('0x6a')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x6756('0x24')](wrapUser(_0x18cdc8[_0x3650c7])));}return BPromise['all'](_0x25fd3f);}return[];})[_0x6756('0x24')](function(_0x42094d){return{'rows':_0x42094d,'count':_0x42094d[_0x6756('0x64')]};})[_0x6756('0x24')](respondWithResult(_0x353e18,null))[_0x6756('0x45')](handleError(_0x353e18,null));};
\ No newline at end of file
+var _0x2d74=['-createdAt','all','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','defaults','localhost','redis','./chatInternalMessage.socket','register','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','sendStatus','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','map','type','key','VIRTUAL','merge','options','ChatInternalMessage','includeAll','include','findAll','params','length','find','catch','create','body','describe','get','messages','lastMessageAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','getUsers','agent','admin','user','fullname','role','internal','lastLoginAt','-online','VoiceQueue','VoiceQueues','autoAssociation','UserProfileResource','isEmpty','push','createdAt','FromId','ToId','read'];(function(_0x278f9f,_0x197e5b){var _0x37ad23=function(_0x3b73d9){while(--_0x3b73d9){_0x278f9f['push'](_0x278f9f['shift']());}};_0x37ad23(++_0x197e5b);}(_0x2d74,0x143));var _0x42d7=function(_0x3cba85,_0x2cd06b){_0x3cba85=_0x3cba85-0x0;var _0x4773df=_0x2d74[_0x3cba85];return _0x4773df;};'use strict';var pdf=require(_0x42d7('0x0'));var emlformat=require(_0x42d7('0x1'));var rimraf=require(_0x42d7('0x2'));var zipdir=require(_0x42d7('0x3'));var jsonpatch=require(_0x42d7('0x4'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x42d7('0x5'));var Mustache=require(_0x42d7('0x6'));var util=require(_0x42d7('0x7'));var path=require(_0x42d7('0x8'));var sox=require('sox');var csv=require(_0x42d7('0x9'));var ejs=require(_0x42d7('0xa'));var fs=require('fs');var _=require(_0x42d7('0xb'));var squel=require(_0x42d7('0xc'));var crypto=require(_0x42d7('0xd'));var jsforce=require(_0x42d7('0xe'));var deskjs=require(_0x42d7('0xf'));var toCsv=require(_0x42d7('0x9'));var querystring=require(_0x42d7('0x10'));var Papa=require(_0x42d7('0x11'));var Redis=require(_0x42d7('0x12'));var authService=require(_0x42d7('0x13'));var qs=require(_0x42d7('0x14'));var hardwareService=require(_0x42d7('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0x42d7('0x16'));var config=require(_0x42d7('0x17'));var db=require(_0x42d7('0x18'))['db'];config['redis']=_[_0x42d7('0x19')](config['redis'],{'host':_0x42d7('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x42d7('0x1b')]));require(_0x42d7('0x1c'))[_0x42d7('0x1d')](socket);function respondWithStatusCode(_0x4c8c37,_0x3e9925){_0x3e9925=_0x3e9925||0xcc;return function(_0x18746c){if(_0x18746c){return _0x4c8c37['sendStatus'](_0x3e9925);}return _0x4c8c37[_0x42d7('0x1e')](_0x3e9925)[_0x42d7('0x1f')]();};}function respondWithResult(_0xd40ff7,_0x251647){_0x251647=_0x251647||0xc8;return function(_0x4d418e){if(_0x4d418e){return _0xd40ff7['status'](_0x251647)[_0x42d7('0x20')](_0x4d418e);}};}function respondWithFilteredResult(_0x39b8c7,_0x51ff58){return function(_0x4a6982){if(_0x4a6982){var _0x55c6c0=_0x4a6982[_0x42d7('0x21')],_0xe4c20f=_0x51ff58[_0x42d7('0x22')],_0x20d085=_0x51ff58[_0x42d7('0x22')]+_0x51ff58[_0x42d7('0x23')],_0x4035ee;if(_0x20d085>=_0x55c6c0){_0x20d085=_0x55c6c0;_0x4035ee=0xc8;}else{_0x4035ee=0xce;}_0x39b8c7[_0x42d7('0x1e')](_0x4035ee);return _0x39b8c7[_0x42d7('0x24')](_0x42d7('0x25'),_0xe4c20f+'-'+_0x20d085+'/'+_0x55c6c0)['json'](_0x4a6982);}return null;};}function patchUpdates(_0x1fffe8){return function(_0x10e810){try{jsonpatch[_0x42d7('0x26')](_0x10e810,_0x1fffe8,!![]);}catch(_0x3371cc){return BPromise[_0x42d7('0x27')](_0x3371cc);}return _0x10e810[_0x42d7('0x28')]();};}function saveUpdates(_0x5c5c8a,_0x392b3){return function(_0x1f60f0){if(_0x1f60f0){return _0x1f60f0[_0x42d7('0x29')](_0x5c5c8a)['then'](function(_0xb1b801){return _0xb1b801;});}return null;};}function removeEntity(_0x1dc271,_0x69dcd4){return function(_0x2c8b20){if(_0x2c8b20){return _0x2c8b20[_0x42d7('0x2a')]()[_0x42d7('0x2b')](function(){_0x1dc271[_0x42d7('0x1e')](0xcc)[_0x42d7('0x1f')]();});}};}function handleEntityNotFound(_0x3d0dd4,_0x1c82ce){return function(_0x1e835d){if(!_0x1e835d){_0x3d0dd4[_0x42d7('0x2c')](0x194);}return _0x1e835d;};}function handleError(_0x33c1b9,_0x41c137){_0x41c137=_0x41c137||0x1f4;return function(_0x4c664e){logger['error'](_0x4c664e[_0x42d7('0x2d')]);if(_0x4c664e[_0x42d7('0x2e')]){delete _0x4c664e[_0x42d7('0x2e')];}_0x33c1b9['status'](_0x41c137)[_0x42d7('0x2f')](_0x4c664e);};}exports[_0x42d7('0x30')]=function(_0x511203,_0x43e8aa){var _0x24ff44={},_0x45e084={},_0x55dc86={'count':0x0,'rows':[]};var _0xc59335=db['ChatInternalMessage'][_0x42d7('0x31')];_0x45e084[_0x42d7('0x32')]=_[_0x42d7('0x33')](_0xc59335);_0x45e084[_0x42d7('0x34')]=_[_0x42d7('0x33')](_0x511203[_0x42d7('0x34')]);_0x45e084[_0x42d7('0x35')]=_[_0x42d7('0x36')](_0x45e084[_0x42d7('0x32')],_0x45e084[_0x42d7('0x34')]);_0x24ff44[_0x42d7('0x37')]=_[_0x42d7('0x36')](_0x45e084[_0x42d7('0x32')],qs[_0x42d7('0x38')](_0x511203['query'][_0x42d7('0x38')]));_0x24ff44[_0x42d7('0x37')]=_0x24ff44['attributes']['length']?_0x24ff44[_0x42d7('0x37')]:_0x45e084[_0x42d7('0x32')];if(!_0x511203[_0x42d7('0x34')][_0x42d7('0x39')]('nolimit')){_0x24ff44['limit']=qs[_0x42d7('0x23')](_0x511203[_0x42d7('0x34')][_0x42d7('0x23')]);_0x24ff44[_0x42d7('0x22')]=qs[_0x42d7('0x22')](_0x511203[_0x42d7('0x34')][_0x42d7('0x22')]);}_0x24ff44[_0x42d7('0x3a')]=qs['sort'](_0x511203['query'][_0x42d7('0x3b')]);_0x24ff44[_0x42d7('0x3c')]=qs['filters'](_[_0x42d7('0x3d')](_0x511203[_0x42d7('0x34')],_0x45e084[_0x42d7('0x35')]));if(_0x511203[_0x42d7('0x34')][_0x42d7('0x3e')]){_0x24ff44[_0x42d7('0x3c')]=_['merge'](_0x24ff44[_0x42d7('0x3c')],{'$or':_[_0x42d7('0x3f')](_0xc59335,function(_0x5ec736){if(_0x5ec736[_0x42d7('0x40')][_0x42d7('0x41')]!==_0x42d7('0x42')){var _0x27ba97={};_0x27ba97[_0x5ec736['field']]={'$like':'%'+_0x511203[_0x42d7('0x34')][_0x42d7('0x3e')]+'%'};return _0x27ba97;}})});}_0x24ff44=_[_0x42d7('0x43')]({},_0x24ff44,_0x511203[_0x42d7('0x44')]);var _0x80658c={'where':_0x24ff44[_0x42d7('0x3c')]};return db[_0x42d7('0x45')][_0x42d7('0x21')](_0x80658c)[_0x42d7('0x2b')](function(_0x3ca8a8){_0x55dc86['count']=_0x3ca8a8;if(_0x511203[_0x42d7('0x34')][_0x42d7('0x46')]){_0x24ff44[_0x42d7('0x47')]=[{'all':!![]}];}return db[_0x42d7('0x45')][_0x42d7('0x48')](_0x24ff44);})[_0x42d7('0x2b')](function(_0x1d9ffb){_0x55dc86['rows']=_0x1d9ffb;return _0x55dc86;})[_0x42d7('0x2b')](respondWithFilteredResult(_0x43e8aa,_0x24ff44))['catch'](handleError(_0x43e8aa,null));};exports['show']=function(_0x12a53c,_0x204e4e){var _0x5aee2b={'raw':!![],'where':{'id':_0x12a53c[_0x42d7('0x49')]['id']}},_0x2a7f69={};_0x2a7f69[_0x42d7('0x32')]=_['keys'](db[_0x42d7('0x45')][_0x42d7('0x31')]);_0x2a7f69['query']=_[_0x42d7('0x33')](_0x12a53c[_0x42d7('0x34')]);_0x2a7f69[_0x42d7('0x35')]=_[_0x42d7('0x36')](_0x2a7f69[_0x42d7('0x32')],_0x2a7f69[_0x42d7('0x34')]);_0x5aee2b[_0x42d7('0x37')]=_[_0x42d7('0x36')](_0x2a7f69[_0x42d7('0x32')],qs[_0x42d7('0x38')](_0x12a53c[_0x42d7('0x34')][_0x42d7('0x38')]));_0x5aee2b[_0x42d7('0x37')]=_0x5aee2b['attributes'][_0x42d7('0x4a')]?_0x5aee2b[_0x42d7('0x37')]:_0x2a7f69[_0x42d7('0x32')];if(_0x12a53c[_0x42d7('0x34')][_0x42d7('0x46')]){_0x5aee2b[_0x42d7('0x47')]=[{'all':!![]}];}_0x5aee2b=_[_0x42d7('0x43')]({},_0x5aee2b,_0x12a53c[_0x42d7('0x44')]);return db[_0x42d7('0x45')][_0x42d7('0x4b')](_0x5aee2b)[_0x42d7('0x2b')](handleEntityNotFound(_0x204e4e,null))[_0x42d7('0x2b')](respondWithResult(_0x204e4e,null))[_0x42d7('0x4c')](handleError(_0x204e4e,null));};exports[_0x42d7('0x4d')]=function(_0x3c4ece,_0x4e8f1a){return db[_0x42d7('0x45')][_0x42d7('0x4d')](_0x3c4ece[_0x42d7('0x4e')],{})[_0x42d7('0x2b')](respondWithResult(_0x4e8f1a,0xc9))['catch'](handleError(_0x4e8f1a,null));};exports[_0x42d7('0x29')]=function(_0x1a68d0,_0x2b500b){if(_0x1a68d0[_0x42d7('0x4e')]['id']){delete _0x1a68d0['body']['id'];}return db[_0x42d7('0x45')][_0x42d7('0x4b')]({'where':{'id':_0x1a68d0[_0x42d7('0x49')]['id']}})['then'](handleEntityNotFound(_0x2b500b,null))['then'](saveUpdates(_0x1a68d0['body'],null))[_0x42d7('0x2b')](respondWithResult(_0x2b500b,null))[_0x42d7('0x4c')](handleError(_0x2b500b,null));};exports[_0x42d7('0x2a')]=function(_0x56eb2d,_0x1113ab){return db[_0x42d7('0x45')][_0x42d7('0x4b')]({'where':{'id':_0x56eb2d[_0x42d7('0x49')]['id']}})['then'](handleEntityNotFound(_0x1113ab,null))['then'](removeEntity(_0x1113ab,null))['catch'](handleError(_0x1113ab,null));};exports[_0x42d7('0x4f')]=function(_0x129797,_0x42e96d){return db['ChatInternalMessage'][_0x42d7('0x4f')]()[_0x42d7('0x2b')](respondWithResult(_0x42e96d,null))[_0x42d7('0x4c')](handleError(_0x42e96d,null));};function wrapUser(_0x37a7e1){return function(_0x11d46c){var _0x4e0e6f=_0x37a7e1[_0x42d7('0x50')]({'plain':!![]});_0x4e0e6f[_0x42d7('0x51')]=[];if(_0x11d46c){_0x4e0e6f[_0x42d7('0x52')]=_0x11d46c['createdAt'];_0x4e0e6f[_0x42d7('0x53')]=_0x11d46c;}else{_0x4e0e6f[_0x42d7('0x52')]=moment(0x0)[_0x42d7('0x54')](_0x42d7('0x55'));_0x4e0e6f[_0x42d7('0x53')]={};}return _0x4e0e6f;};}exports[_0x42d7('0x56')]=function(_0x21527b,_0x4221ba,_0x14e22a){var _0xba9923=[];return db['User'][_0x42d7('0x48')]({'where':{'role':[_0x42d7('0x57'),_0x42d7('0x58'),_0x42d7('0x59')]},'attributes':['id',_0x42d7('0x5a'),'name',_0x42d7('0x5b'),'userpic',_0x42d7('0x5c'),'online',_0x42d7('0x5d'),'allowmessenger','showWebBar'],'order':qs['sort'](_0x42d7('0x5e')),'include':[{'model':db[_0x42d7('0x5f')],'as':_0x42d7('0x60'),'attributes':['id',_0x42d7('0x2e'),_0x42d7('0x40')],'through':{'attributes':[]}}]})[_0x42d7('0x2b')](function(_0x70a7a8){if(_0x70a7a8){var _0x26a529=_0x21527b[_0x42d7('0x59')][_0x42d7('0x50')]({'plain':!![]});if(!_0x26a529)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x26a529[_0x42d7('0x5b')]===_0x42d7('0x59')){return db['UserProfileSection']['find']({'where':{'name':'Agents','userProfileId':_0x26a529['userProfileId']},'raw':!![]})[_0x42d7('0x2b')](function(_0x107f83){if(_0x107f83){if(_0x107f83[_0x42d7('0x61')]===0x0){return db[_0x42d7('0x62')]['findAll']({'where':{'sectionId':_0x107f83['id']},'raw':!![]})['then'](function(_0x584115){var _0x52d8a9=[];if(_[_0x42d7('0x63')](_0x584115)){_0x52d8a9=_[_0x42d7('0x3e')](_0x70a7a8,function(_0x12f56e){if(_0x12f56e[_0x42d7('0x5b')]!==_0x42d7('0x57')){return _0x12f56e;}});return _0x52d8a9;}else{for(var _0x1874f9=0x0;_0x1874f9<_0x70a7a8[_0x42d7('0x4a')];_0x1874f9++){var _0x311d87=_0x70a7a8[_0x1874f9];if(_0x311d87['role']===_0x42d7('0x57')){var _0x6c6ddd=_[_0x42d7('0x4b')](_0x584115,function(_0x13f29c){return _0x13f29c['resourceId']===_0x311d87['id'];});if(_0x6c6ddd)_0x52d8a9[_0x42d7('0x64')](_0x311d87);}else{_0x52d8a9[_0x42d7('0x64')](_0x311d87);}}return _0x52d8a9;}});}else{return _0x70a7a8;}}else{var _0x3a5c5f=_[_0x42d7('0x3e')](_0x70a7a8,function(_0x5ed18b){if(_0x5ed18b['role']!==_0x42d7('0x57')){return _0x5ed18b;}});return _0x3a5c5f;}});}else{return _0x70a7a8;}}})[_0x42d7('0x2b')](function(_0x283f89){var _0xaeabd2=[];if(_0x283f89){_0xba9923=_0x283f89;for(var _0x15e797=0x0;_0x15e797<_0x283f89[_0x42d7('0x4a')];_0x15e797+=0x1){_0xba9923[_0x15e797]['messages']=[];_0xaeabd2[_0x42d7('0x64')](db['ChatInternalMessage'][_0x42d7('0x4b')]({'where':{'FromId':[_0x21527b[_0x42d7('0x59')]['id'],_0x283f89[_0x15e797]['id']],'ToId':[_0x21527b[_0x42d7('0x59')]['id'],_0x283f89[_0x15e797]['id']],'ChatGroupId':null},'attributes':['id',_0x42d7('0x65'),_0x42d7('0x66'),_0x42d7('0x67'),_0x42d7('0x68'),'body'],'order':qs[_0x42d7('0x3b')](_0x42d7('0x69')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x42d7('0x2b')](wrapUser(_0x283f89[_0x15e797])));}return BPromise[_0x42d7('0x6a')](_0xaeabd2);}return[];})[_0x42d7('0x2b')](function(_0x52d4a9){return{'rows':_0x52d4a9,'count':_0x52d4a9[_0x42d7('0x4a')]};})[_0x42d7('0x2b')](respondWithResult(_0x4221ba,null))[_0x42d7('0x4c')](handleError(_0x4221ba,null));};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js
index 7c904cf..e99f583 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.events.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2f68=['../../mysqldb','ChatInternalMessage','setMaxListeners','save','remove','emit','exports'];(function(_0x1b2dd6,_0x151ed9){var _0x1d1c07=function(_0xb15c1e){while(--_0xb15c1e){_0x1b2dd6['push'](_0x1b2dd6['shift']());}};_0x1d1c07(++_0x151ed9);}(_0x2f68,0x9a));var _0x82f6=function(_0x30c806,_0x322b6f){_0x30c806=_0x30c806-0x0;var _0x23cd43=_0x2f68[_0x30c806];return _0x23cd43;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require(_0x82f6('0x0'))['db'][_0x82f6('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x82f6('0x2')](0x0);var events={'afterCreate':_0x82f6('0x3'),'afterUpdate':'update','afterDestroy':_0x82f6('0x4')};function emitEvent(_0x488d61){return function(_0x2a06dc,_0x2ab73d,_0x5dad09){ChatInternalMessageEvents[_0x82f6('0x5')](_0x488d61+':'+_0x2a06dc['id'],_0x2a06dc);ChatInternalMessageEvents[_0x82f6('0x5')](_0x488d61,_0x2a06dc);_0x5dad09(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0x82f6('0x6')]=ChatInternalMessageEvents;
\ No newline at end of file
+var _0x7fce=['remove','emit','hook','exports','events','../../mysqldb','ChatInternalMessage','save'];(function(_0xaddd81,_0x2f1683){var _0x4d5c43=function(_0x13fc1c){while(--_0x13fc1c){_0xaddd81['push'](_0xaddd81['shift']());}};_0x4d5c43(++_0x2f1683);}(_0x7fce,0xdc));var _0xe7fc=function(_0x255be4,_0x3053c5){_0x255be4=_0x255be4-0x0;var _0x255c63=_0x7fce[_0x255be4];return _0x255c63;};'use strict';var EventEmitter=require(_0xe7fc('0x0'));var ChatInternalMessage=require(_0xe7fc('0x1'))['db'][_0xe7fc('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe7fc('0x3'),'afterUpdate':'update','afterDestroy':_0xe7fc('0x4')};function emitEvent(_0x51b19d){return function(_0x11cdec,_0x337972,_0x5810de){ChatInternalMessageEvents['emit'](_0x51b19d+':'+_0x11cdec['id'],_0x11cdec);ChatInternalMessageEvents[_0xe7fc('0x5')](_0x51b19d,_0x11cdec);_0x5810de(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage[_0xe7fc('0x6')](e,emitEvent(event));}}module[_0xe7fc('0x7')]=ChatInternalMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js
index f0e71aa..58339b9 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.model.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7066=['rimraf','../../config/environment','./chatInternalMessage.attributes','define','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x4178d6,_0x4e54aa){var _0x350a89=function(_0x47171a){while(--_0x47171a){_0x4178d6['push'](_0x4178d6['shift']());}};_0x350a89(++_0x4e54aa);}(_0x7066,0x1d9));var _0x6706=function(_0x19d04f,_0x278442){_0x19d04f=_0x19d04f-0x0;var _0x535b42=_0x7066[_0x19d04f];return _0x535b42;};'use strict';var _=require(_0x6706('0x0'));var util=require(_0x6706('0x1'));var logger=require(_0x6706('0x2'))(_0x6706('0x3'));var moment=require(_0x6706('0x4'));var BPromise=require(_0x6706('0x5'));var rp=require(_0x6706('0x6'));var fs=require('fs');var path=require(_0x6706('0x7'));var rimraf=require(_0x6706('0x8'));var config=require(_0x6706('0x9'));var attributes=require(_0x6706('0xa'));module['exports']=function(_0x44ad2b,_0x37aa80){return _0x44ad2b[_0x6706('0xb')]('ChatInternalMessage',attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x6706('0xc')});};
\ No newline at end of file
+var _0x6373=['utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','utf8mb4'];(function(_0x318a79,_0x3ae74e){var _0x1ba6a9=function(_0x5e7c32){while(--_0x5e7c32){_0x318a79['push'](_0x318a79['shift']());}};_0x1ba6a9(++_0x3ae74e);}(_0x6373,0xb7));var _0x3637=function(_0x21b39a,_0xdd4441){_0x21b39a=_0x21b39a-0x0;var _0x117375=_0x6373[_0x21b39a];return _0x117375;};'use strict';var _=require(_0x3637('0x0'));var util=require(_0x3637('0x1'));var logger=require(_0x3637('0x2'))(_0x3637('0x3'));var moment=require(_0x3637('0x4'));var BPromise=require(_0x3637('0x5'));var rp=require(_0x3637('0x6'));var fs=require('fs');var path=require(_0x3637('0x7'));var rimraf=require(_0x3637('0x8'));var config=require('../../config/environment');var attributes=require('./chatInternalMessage.attributes');module[_0x3637('0x9')]=function(_0x151fc8,_0x2b7783){return _0x151fc8[_0x3637('0xa')]('ChatInternalMessage',attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x3637('0xb'),'collate':_0x3637('0xc')});};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
index 674da61..f4a2b19 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.rpc.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x435a=['request\x20sent','error','code','message','info','result','catch','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./chatInternalMessage.socket','register','request','ChatInternalMessage,\x20%s,\x20%s','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s'];(function(_0x1bcb6b,_0x457008){var _0x160f1c=function(_0x394825){while(--_0x394825){_0x1bcb6b['push'](_0x1bcb6b['shift']());}};_0x160f1c(++_0x457008);}(_0x435a,0x13b));var _0xa435=function(_0x2f0b82,_0xa07e26){_0x2f0b82=_0x2f0b82-0x0;var _0x5d6fb1=_0x435a[_0x2f0b82];return _0x5d6fb1;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa435('0x0'));var db=require(_0xa435('0x1'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xa435('0x2'));var jayson=require(_0xa435('0x3'));var client=jayson[_0xa435('0x4')][_0xa435('0x5')]({'port':0x232a});config[_0xa435('0x6')]=_[_0xa435('0x7')](config[_0xa435('0x6')],{'host':'localhost','port':0x18eb});var socket=require(_0xa435('0x8'))(new Redis(config[_0xa435('0x6')]));require(_0xa435('0x9'))[_0xa435('0xa')](socket);function respondWithRpcPromise(_0x4fcf70,_0x56d9a2,_0x1fe13a){return new BPromise(function(_0x20f81c,_0x31f99b){return client[_0xa435('0xb')](_0x4fcf70,_0x1fe13a)['then'](function(_0x3f6a41){logger['info'](_0xa435('0xc'),_0x56d9a2,'request\x20sent');logger[_0xa435('0xd')](_0xa435('0xe'),_0x56d9a2,_0xa435('0xf'),JSON['stringify'](_0x3f6a41));if(_0x3f6a41['error']){if(_0x3f6a41[_0xa435('0x10')][_0xa435('0x11')]===0x1f4){logger[_0xa435('0x10')](_0xa435('0xc'),_0x56d9a2,_0x3f6a41['error'][_0xa435('0x12')]);return _0x31f99b(_0x3f6a41[_0xa435('0x10')]['message']);}logger[_0xa435('0x10')](_0xa435('0xc'),_0x56d9a2,_0x3f6a41['error'][_0xa435('0x12')]);return _0x20f81c(_0x3f6a41['error'][_0xa435('0x12')]);}else{logger[_0xa435('0x13')](_0xa435('0xc'),_0x56d9a2,'request\x20sent');_0x20f81c(_0x3f6a41[_0xa435('0x14')][_0xa435('0x12')]);}})[_0xa435('0x15')](function(_0x2090e){logger['error'](_0xa435('0xc'),_0x56d9a2,_0x2090e);_0x31f99b(_0x2090e);});});}
\ No newline at end of file
+var _0x714b=['randomstring','ioredis','../../config/utils','../../config/environment','client','redis','defaults','socket.io-emitter','./chatInternalMessage.socket','register','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','util','moment','bluebird'];(function(_0x3de59a,_0x3e28b3){var _0x36dd0a=function(_0x149543){while(--_0x149543){_0x3de59a['push'](_0x3de59a['shift']());}};_0x36dd0a(++_0x3e28b3);}(_0x714b,0xed));var _0xb714=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x714b[_0x2dafbe];return _0x58a45a;};'use strict';var _=require('lodash');var util=require(_0xb714('0x0'));var moment=require(_0xb714('0x1'));var BPromise=require(_0xb714('0x2'));var rs=require(_0xb714('0x3'));var fs=require('fs');var Redis=require(_0xb714('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb714('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xb714('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xb714('0x7')]['http']({'port':0x232a});config[_0xb714('0x8')]=_[_0xb714('0x9')](config[_0xb714('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0xb714('0xa'))(new Redis(config['redis']));require(_0xb714('0xb'))[_0xb714('0xc')](socket);function respondWithRpcPromise(_0x561f5c,_0xfb45a9,_0x3201d3){return new BPromise(function(_0x2487af,_0x2cc7e9){return client['request'](_0x561f5c,_0x3201d3)[_0xb714('0xd')](function(_0x918243){logger[_0xb714('0xe')](_0xb714('0xf'),_0xfb45a9,_0xb714('0x10'));logger[_0xb714('0x11')](_0xb714('0x12'),_0xfb45a9,_0xb714('0x10'),JSON[_0xb714('0x13')](_0x918243));if(_0x918243[_0xb714('0x14')]){if(_0x918243[_0xb714('0x14')][_0xb714('0x15')]===0x1f4){logger[_0xb714('0x14')](_0xb714('0xf'),_0xfb45a9,_0x918243['error']['message']);return _0x2cc7e9(_0x918243['error']['message']);}logger[_0xb714('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0xfb45a9,_0x918243[_0xb714('0x14')][_0xb714('0x16')]);return _0x2487af(_0x918243[_0xb714('0x14')]['message']);}else{logger[_0xb714('0xe')]('ChatInternalMessage,\x20%s,\x20%s',_0xfb45a9,_0xb714('0x10'));_0x2487af(_0x918243['result'][_0xb714('0x16')]);}})[_0xb714('0x17')](function(_0x3c2fba){logger[_0xb714('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0xfb45a9,_0x3c2fba);_0x2cc7e9(_0x3c2fba);});});}
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js
index bb8b442..ecb529a 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.socket.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdf25=['length','./chatInternalMessage.events','save','remove','update','emit'];(function(_0x1a0748,_0x1b9c41){var _0x262fb5=function(_0x3851ab){while(--_0x3851ab){_0x1a0748['push'](_0x1a0748['shift']());}};_0x262fb5(++_0x1b9c41);}(_0xdf25,0xd3));var _0x5df2=function(_0x224770,_0x5436cf){_0x224770=_0x224770-0x0;var _0x3dcf6d=_0xdf25[_0x224770];return _0x3dcf6d;};'use strict';var ChatInternalMessageEvents=require(_0x5df2('0x0'));var events=[_0x5df2('0x1'),_0x5df2('0x2'),_0x5df2('0x3')];function createListener(_0x4f671a,_0x37822b){return function(_0x1927a3){_0x37822b[_0x5df2('0x4')](_0x4f671a,_0x1927a3);};}function removeListener(_0x1ced17,_0xa89ed3){return function(){ChatInternalMessageEvents['removeListener'](_0x1ced17,_0xa89ed3);};}exports['register']=function(_0xddccee){for(var _0x27045b=0x0,_0x20edf0=events[_0x5df2('0x5')];_0x27045b<_0x20edf0;_0x27045b++){var _0x48a6d9=events[_0x27045b];var _0x3573fa=createListener('chatInternalMessage:'+_0x48a6d9,_0xddccee);ChatInternalMessageEvents['on'](_0x48a6d9,_0x3573fa);}};
\ No newline at end of file
+var _0x86ec=['./chatInternalMessage.events','save','remove','update','emit','register','length','chatInternalMessage:'];(function(_0x3f29b4,_0x2b5b02){var _0x4d8893=function(_0x464c1c){while(--_0x464c1c){_0x3f29b4['push'](_0x3f29b4['shift']());}};_0x4d8893(++_0x2b5b02);}(_0x86ec,0xb8));var _0xc86e=function(_0xade3e6,_0x55f613){_0xade3e6=_0xade3e6-0x0;var _0x25aa96=_0x86ec[_0xade3e6];return _0x25aa96;};'use strict';var ChatInternalMessageEvents=require(_0xc86e('0x0'));var events=[_0xc86e('0x1'),_0xc86e('0x2'),_0xc86e('0x3')];function createListener(_0x46f116,_0x1ce798){return function(_0x457136){_0x1ce798[_0xc86e('0x4')](_0x46f116,_0x457136);};}function removeListener(_0x516b85,_0x1afa1c){return function(){ChatInternalMessageEvents['removeListener'](_0x516b85,_0x1afa1c);};}exports[_0xc86e('0x5')]=function(_0x405f42){for(var _0x4919a1=0x0,_0x121709=events[_0xc86e('0x6')];_0x4919a1<_0x121709;_0x4919a1++){var _0x31875a=events[_0x4919a1];var _0x93f96=createListener(_0xc86e('0x7')+_0x31875a,_0x405f42);ChatInternalMessageEvents['on'](_0x31875a,_0x93f96);}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js
index d76f5d4..691f117 100644
--- a/server/api/chatInternalMessage/index.js
+++ b/server/api/chatInternalMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e31=['multer','util','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','create','update','delete','destroy','exports'];(function(_0x52a858,_0x1df8ea){var _0x247399=function(_0x398b94){while(--_0x398b94){_0x52a858['push'](_0x52a858['shift']());}};_0x247399(++_0x1df8ea);}(_0x3e31,0x156));var _0x13e3=function(_0x520621,_0x1aae24){_0x520621=_0x520621-0x0;var _0x527857=_0x3e31[_0x520621];return _0x527857;};'use strict';var multer=require(_0x13e3('0x0'));var util=require(_0x13e3('0x1'));var path=require(_0x13e3('0x2'));var timeout=require(_0x13e3('0x3'));var express=require('express');var router=express[_0x13e3('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x13e3('0x5'));var config=require(_0x13e3('0x6'));var controller=require('./chatInternalMessage.controller');router[_0x13e3('0x7')]('/',auth[_0x13e3('0x8')](),controller['index']);router[_0x13e3('0x7')](_0x13e3('0x9'),auth[_0x13e3('0x8')](),controller[_0x13e3('0xa')]);router[_0x13e3('0x7')]('/users',auth[_0x13e3('0x8')](),controller['getUsers']);router[_0x13e3('0x7')](_0x13e3('0xb'),auth[_0x13e3('0x8')](),controller[_0x13e3('0xc')]);router['post']('/',auth[_0x13e3('0x8')](),controller[_0x13e3('0xd')]);router['put'](_0x13e3('0xb'),controller[_0x13e3('0xe')]);router[_0x13e3('0xf')](_0x13e3('0xb'),auth['isAuthenticated'](),controller[_0x13e3('0x10')]);module[_0x13e3('0x11')]=router;
\ No newline at end of file
+var _0xd9fb=['../../config/environment','./chatInternalMessage.controller','isAuthenticated','get','/describe','describe','/users','/:id','show','post','create','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x232fb6,_0x3573e1){var _0x4443c5=function(_0x4b666d){while(--_0x4b666d){_0x232fb6['push'](_0x232fb6['shift']());}};_0x4443c5(++_0x3573e1);}(_0xd9fb,0x189));var _0xbd9f=function(_0xe66cf2,_0x32ba5f){_0xe66cf2=_0xe66cf2-0x0;var _0x2d84e7=_0xd9fb[_0xe66cf2];return _0x2d84e7;};'use strict';var multer=require(_0xbd9f('0x0'));var util=require(_0xbd9f('0x1'));var path=require(_0xbd9f('0x2'));var timeout=require(_0xbd9f('0x3'));var express=require(_0xbd9f('0x4'));var router=express[_0xbd9f('0x5')]();var auth=require(_0xbd9f('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xbd9f('0x7'));var controller=require(_0xbd9f('0x8'));router['get']('/',auth[_0xbd9f('0x9')](),controller['index']);router[_0xbd9f('0xa')](_0xbd9f('0xb'),auth['isAuthenticated'](),controller[_0xbd9f('0xc')]);router[_0xbd9f('0xa')](_0xbd9f('0xd'),auth[_0xbd9f('0x9')](),controller['getUsers']);router[_0xbd9f('0xa')](_0xbd9f('0xe'),auth[_0xbd9f('0x9')](),controller[_0xbd9f('0xf')]);router[_0xbd9f('0x10')]('/',auth[_0xbd9f('0x9')](),controller[_0xbd9f('0x11')]);router['put']('/:id',controller['update']);router['delete'](_0xbd9f('0xe'),auth['isAuthenticated'](),controller[_0xbd9f('0x12')]);module[_0xbd9f('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js
index 9c66d8e..52a7526 100644
--- a/server/api/chatMessage/chatMessage.attributes.js
+++ b/server/api/chatMessage/chatMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe980=['out','DATE','sequelize','exports','TEXT','BOOLEAN','ENUM'];(function(_0x5ecadc,_0x1cf9f1){var _0x565037=function(_0x22908b){while(--_0x22908b){_0x5ecadc['push'](_0x5ecadc['shift']());}};_0x565037(++_0x1cf9f1);}(_0xe980,0xb8));var _0x0e98=function(_0x4141f9,_0x5e4ac4){_0x4141f9=_0x4141f9-0x0;var _0x5ca185=_0xe980[_0x4141f9];return _0x5ca185;};'use strict';var Sequelize=require(_0x0e98('0x0'));module[_0x0e98('0x1')]={'body':{'type':Sequelize[_0x0e98('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x0e98('0x3')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x0e98('0x4')]('in','out'),'defaultValue':_0x0e98('0x5'),'allowNull':![]},'readAt':{'type':Sequelize[_0x0e98('0x6')]}};
\ No newline at end of file
+var _0xd9c0=['sequelize','BOOLEAN','ENUM','out'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xd9c0,0xb0));var _0x0d9c=function(_0xc82192,_0x2207cb){_0xc82192=_0xc82192-0x0;var _0x259206=_0xd9c0[_0xc82192];return _0x259206;};'use strict';var Sequelize=require(_0x0d9c('0x0'));module['exports']={'body':{'type':Sequelize['TEXT']('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x0d9c('0x1')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x0d9c('0x2')]('in',_0x0d9c('0x3')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js
index efd16b9..0156803 100644
--- a/server/api/chatMessage/chatMessage.controller.js
+++ b/server/api/chatMessage/chatMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd31d=['catch','sendStatus','status','json','count','offset','limit','Content-Range','apply','reject','save','update','destroy','end','name','send','index','ChatMessage','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','order','sort','pick','filter','where','merge','map','type','key','field','includeAll','include','show','params','find','create','body','describe','chat','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','CmContact','get','ChatInteraction','ChatInteractionId','isNil','read1stAt','user','role','null','AcceptMessage','acceptMessage','manual','interface','channel','accept','EventManager','acceptmessage','parse','formData','agent','interaction','RejectMessage','rejectMessage','SIP/%s','event','rejectmessage','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','register','jayson/promise','http','client','test','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x38178f,_0x4e35e1){var _0x2a01de=function(_0x4d3697){while(--_0x4d3697){_0x38178f['push'](_0x38178f['shift']());}};_0x2a01de(++_0x4e35e1);}(_0xd31d,0xc3));var _0xdd31=function(_0x4bb581,_0x6f7037){_0x4bb581=_0x4bb581-0x0;var _0x316bf5=_0xd31d[_0x4bb581];return _0x316bf5;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xdd31('0x0'));var jsonpatch=require(_0xdd31('0x1'));var rp=require(_0xdd31('0x2'));var moment=require(_0xdd31('0x3'));var BPromise=require(_0xdd31('0x4'));var Mustache=require('mustache');var util=require(_0xdd31('0x5'));var path=require(_0xdd31('0x6'));var sox=require(_0xdd31('0x7'));var csv=require(_0xdd31('0x8'));var ejs=require(_0xdd31('0x9'));var fs=require('fs');var _=require(_0xdd31('0xa'));var squel=require(_0xdd31('0xb'));var crypto=require('crypto');var jsforce=require(_0xdd31('0xc'));var deskjs=require(_0xdd31('0xd'));var toCsv=require(_0xdd31('0x8'));var querystring=require(_0xdd31('0xe'));var Papa=require('papaparse');var Redis=require(_0xdd31('0xf'));var authService=require(_0xdd31('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xdd31('0x11'));var logger=require(_0xdd31('0x12'))(_0xdd31('0x13'));var utils=require(_0xdd31('0x14'));var config=require(_0xdd31('0x15'));var db=require('../../mysqldb')['db'];config[_0xdd31('0x16')]=_[_0xdd31('0x17')](config[_0xdd31('0x16')],{'host':_0xdd31('0x18'),'port':0x18eb});var socket=require(_0xdd31('0x19'))(new Redis(config[_0xdd31('0x16')]));require(_0xdd31('0x1a'))[_0xdd31('0x1b')](socket);var jayson=require(_0xdd31('0x1c'));var client=jayson['client'][_0xdd31('0x1d')]({'port':0x232c});var client9002=jayson[_0xdd31('0x1e')][_0xdd31('0x1d')]({'port':0x232a});function checkPasswordPattern(_0x180e7d,_0x318d0f,_0x23ed81){if(_0x23ed81){var _0x5e02fa=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5e02fa[_0xdd31('0x1f')](_0x318d0f)){return _0x180e7d;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x180e7d;}}function respondWithRpcPromise(_0x11d1f5,_0x741396,_0x379d17,_0x51f4b2){return new BPromise(function(_0x12dd92,_0x55c7b2){var _0x239676=_0x51f4b2||client;return _0x239676[_0xdd31('0x20')](_0x11d1f5,_0x379d17)[_0xdd31('0x21')](function(_0x486c9c){logger[_0xdd31('0x22')](_0xdd31('0x23'),_0x741396,_0xdd31('0x24'));logger['debug']('ChatMessage,\x20%s,\x20%s,\x20%s',_0x741396,_0xdd31('0x24'),JSON[_0xdd31('0x25')](_0x486c9c));if(_0x486c9c[_0xdd31('0x26')]){if(_0x486c9c[_0xdd31('0x26')][_0xdd31('0x27')]===0x1f4){logger['error'](_0xdd31('0x23'),_0x741396,_0x486c9c['error'][_0xdd31('0x28')]);return _0x55c7b2(_0x486c9c[_0xdd31('0x26')][_0xdd31('0x28')]);}logger[_0xdd31('0x26')]('ChatMessage,\x20%s,\x20%s',_0x741396,_0x486c9c['error'][_0xdd31('0x28')]);return _0x12dd92(_0x486c9c['error'][_0xdd31('0x28')]);}else{logger[_0xdd31('0x22')]('ChatMessage,\x20%s,\x20%s',_0x741396,_0xdd31('0x24'));_0x12dd92(_0x486c9c['result'][_0xdd31('0x28')]);}})[_0xdd31('0x29')](function(_0x31ac8a){logger[_0xdd31('0x26')](_0xdd31('0x23'),_0x741396,_0x31ac8a);_0x55c7b2(_0x31ac8a);});});}function respondWithStatusCode(_0xe39d3,_0x48f5a6){_0x48f5a6=_0x48f5a6||0xcc;return function(_0x27d84a){if(_0x27d84a){return _0xe39d3[_0xdd31('0x2a')](_0x48f5a6);}return _0xe39d3['status'](_0x48f5a6)['end']();};}function respondWithResult(_0x5daacd,_0x38f8f8){_0x38f8f8=_0x38f8f8||0xc8;return function(_0x18e41f){if(_0x18e41f){return _0x5daacd[_0xdd31('0x2b')](_0x38f8f8)[_0xdd31('0x2c')](_0x18e41f);}};}function respondWithFilteredResult(_0x2da928,_0x1e3012){return function(_0x363a06){if(_0x363a06){var _0x15f015=_0x363a06[_0xdd31('0x2d')],_0x3d9239=_0x1e3012[_0xdd31('0x2e')],_0x1264fb=_0x1e3012['offset']+_0x1e3012[_0xdd31('0x2f')],_0x1717b9;if(_0x1264fb>=_0x15f015){_0x1264fb=_0x15f015;_0x1717b9=0xc8;}else{_0x1717b9=0xce;}_0x2da928[_0xdd31('0x2b')](_0x1717b9);return _0x2da928['set'](_0xdd31('0x30'),_0x3d9239+'-'+_0x1264fb+'/'+_0x15f015)['json'](_0x363a06);}return null;};}function patchUpdates(_0x3a9137){return function(_0x99d4ee){try{jsonpatch[_0xdd31('0x31')](_0x99d4ee,_0x3a9137,!![]);}catch(_0x4b5cfc){return BPromise[_0xdd31('0x32')](_0x4b5cfc);}return _0x99d4ee[_0xdd31('0x33')]();};}function saveUpdates(_0x1e33a2,_0x28f044){return function(_0x71fe46){if(_0x71fe46){return _0x71fe46[_0xdd31('0x34')](_0x1e33a2)['then'](function(_0x2154be){return _0x2154be;});}return null;};}function removeEntity(_0x4ce944,_0x240391){return function(_0x583f8b){if(_0x583f8b){return _0x583f8b[_0xdd31('0x35')]()[_0xdd31('0x21')](function(){_0x4ce944[_0xdd31('0x2b')](0xcc)[_0xdd31('0x36')]();});}};}function handleEntityNotFound(_0x4acbea,_0x189ef0){return function(_0x23074f){if(!_0x23074f){_0x4acbea[_0xdd31('0x2a')](0x194);}return _0x23074f;};}function handleError(_0x27a43d,_0x234e30){_0x234e30=_0x234e30||0x1f4;return function(_0x4c86fe){logger[_0xdd31('0x26')](_0x4c86fe['stack']);if(_0x4c86fe[_0xdd31('0x37')]){delete _0x4c86fe[_0xdd31('0x37')];}_0x27a43d[_0xdd31('0x2b')](_0x234e30)[_0xdd31('0x38')](_0x4c86fe);};}exports[_0xdd31('0x39')]=function(_0x39017d,_0x3eeed5){var _0x155b56={},_0x1a504f={},_0x1c529d={'count':0x0,'rows':[]};var _0x3be868=db[_0xdd31('0x3a')][_0xdd31('0x3b')];_0x1a504f[_0xdd31('0x3c')]=_[_0xdd31('0x3d')](_0x3be868);_0x1a504f[_0xdd31('0x3e')]=_[_0xdd31('0x3d')](_0x39017d[_0xdd31('0x3e')]);_0x1a504f[_0xdd31('0x3f')]=_[_0xdd31('0x40')](_0x1a504f[_0xdd31('0x3c')],_0x1a504f['query']);_0x155b56['attributes']=_[_0xdd31('0x40')](_0x1a504f[_0xdd31('0x3c')],qs[_0xdd31('0x41')](_0x39017d['query'][_0xdd31('0x41')]));_0x155b56['attributes']=_0x155b56[_0xdd31('0x42')][_0xdd31('0x43')]?_0x155b56[_0xdd31('0x42')]:_0x1a504f[_0xdd31('0x3c')];if(!_0x39017d[_0xdd31('0x3e')]['hasOwnProperty']('nolimit')){_0x155b56['limit']=qs[_0xdd31('0x2f')](_0x39017d[_0xdd31('0x3e')]['limit']);_0x155b56[_0xdd31('0x2e')]=qs[_0xdd31('0x2e')](_0x39017d['query'][_0xdd31('0x2e')]);}_0x155b56[_0xdd31('0x44')]=qs[_0xdd31('0x45')](_0x39017d[_0xdd31('0x3e')][_0xdd31('0x45')]);_0x155b56['where']=qs['filters'](_[_0xdd31('0x46')](_0x39017d[_0xdd31('0x3e')],_0x1a504f[_0xdd31('0x3f')]));if(_0x39017d[_0xdd31('0x3e')][_0xdd31('0x47')]){_0x155b56[_0xdd31('0x48')]=_[_0xdd31('0x49')](_0x155b56['where'],{'$or':_[_0xdd31('0x4a')](_0x3be868,function(_0x346cb4){if(_0x346cb4[_0xdd31('0x4b')][_0xdd31('0x4c')]!=='VIRTUAL'){var _0x3cfbc5={};_0x3cfbc5[_0x346cb4[_0xdd31('0x4d')]]={'$like':'%'+_0x39017d[_0xdd31('0x3e')][_0xdd31('0x47')]+'%'};return _0x3cfbc5;}})});}_0x155b56=_[_0xdd31('0x49')]({},_0x155b56,_0x39017d['options']);var _0x147ad7={'where':_0x155b56[_0xdd31('0x48')]};return db[_0xdd31('0x3a')]['count'](_0x147ad7)[_0xdd31('0x21')](function(_0x5d9598){_0x1c529d[_0xdd31('0x2d')]=_0x5d9598;if(_0x39017d[_0xdd31('0x3e')][_0xdd31('0x4e')]){_0x155b56[_0xdd31('0x4f')]=[{'all':!![]}];}return db[_0xdd31('0x3a')]['findAll'](_0x155b56);})['then'](function(_0x4c05b6){_0x1c529d['rows']=_0x4c05b6;return _0x1c529d;})[_0xdd31('0x21')](respondWithFilteredResult(_0x3eeed5,_0x155b56))[_0xdd31('0x29')](handleError(_0x3eeed5,null));};exports[_0xdd31('0x50')]=function(_0xf65de3,_0x4b8009){var _0x1c096c={'raw':!![],'where':{'id':_0xf65de3[_0xdd31('0x51')]['id']}},_0x34c215={};_0x34c215[_0xdd31('0x3c')]=_[_0xdd31('0x3d')](db['ChatMessage'][_0xdd31('0x3b')]);_0x34c215[_0xdd31('0x3e')]=_[_0xdd31('0x3d')](_0xf65de3[_0xdd31('0x3e')]);_0x34c215[_0xdd31('0x3f')]=_[_0xdd31('0x40')](_0x34c215[_0xdd31('0x3c')],_0x34c215[_0xdd31('0x3e')]);_0x1c096c['attributes']=_[_0xdd31('0x40')](_0x34c215[_0xdd31('0x3c')],qs[_0xdd31('0x41')](_0xf65de3[_0xdd31('0x3e')][_0xdd31('0x41')]));_0x1c096c['attributes']=_0x1c096c[_0xdd31('0x42')][_0xdd31('0x43')]?_0x1c096c[_0xdd31('0x42')]:_0x34c215['model'];if(_0xf65de3['query'][_0xdd31('0x4e')]){_0x1c096c['include']=[{'all':!![]}];}_0x1c096c=_[_0xdd31('0x49')]({},_0x1c096c,_0xf65de3['options']);return db[_0xdd31('0x3a')][_0xdd31('0x52')](_0x1c096c)['then'](handleEntityNotFound(_0x4b8009,null))[_0xdd31('0x21')](respondWithResult(_0x4b8009,null))[_0xdd31('0x29')](handleError(_0x4b8009,null));};exports[_0xdd31('0x53')]=function(_0x220815,_0x35a2aa){return db[_0xdd31('0x3a')][_0xdd31('0x53')](_0x220815[_0xdd31('0x54')],{})[_0xdd31('0x21')](respondWithResult(_0x35a2aa,0xc9))[_0xdd31('0x29')](handleError(_0x35a2aa,null));};exports[_0xdd31('0x34')]=function(_0x820eda,_0x20e3cf){if(_0x820eda['body']['id']){delete _0x820eda[_0xdd31('0x54')]['id'];}return db['ChatMessage'][_0xdd31('0x52')]({'where':{'id':_0x820eda[_0xdd31('0x51')]['id']}})[_0xdd31('0x21')](handleEntityNotFound(_0x20e3cf,null))[_0xdd31('0x21')](saveUpdates(_0x820eda[_0xdd31('0x54')],null))['then'](respondWithResult(_0x20e3cf,null))[_0xdd31('0x29')](handleError(_0x20e3cf,null));};exports[_0xdd31('0x35')]=function(_0x32559e,_0x5a1526){return db[_0xdd31('0x3a')][_0xdd31('0x52')]({'where':{'id':_0x32559e[_0xdd31('0x51')]['id']}})[_0xdd31('0x21')](handleEntityNotFound(_0x5a1526,null))[_0xdd31('0x21')](removeEntity(_0x5a1526,null))[_0xdd31('0x29')](handleError(_0x5a1526,null));};exports[_0xdd31('0x55')]=function(_0x5f2eb5,_0x38493d){return db[_0xdd31('0x3a')][_0xdd31('0x55')]()['then'](respondWithResult(_0x38493d,null))['catch'](handleError(_0x38493d,null));};var interaction_log=require('../../config/logger')('chat-interactions');exports['accept']=function(_0x4b54ca,_0xc43938,_0x35501c){var _0x546169={'channel':_0xdd31('0x56')};if(_0x4b54ca['body']['id']){delete _0x4b54ca[_0xdd31('0x54')]['id'];}_0x4b54ca[_0xdd31('0x54')][_0xdd31('0x57')]=!![];_0x4b54ca['body'][_0xdd31('0x58')]=moment()[_0xdd31('0x59')](_0xdd31('0x5a'));_0x4b54ca['body'][_0xdd31('0x5b')]=_0x4b54ca['body'][_0xdd31('0x5b')]||_0x4b54ca['user']['id'];return db[_0xdd31('0x3a')]['find']({'where':{'id':_0x4b54ca['params']['id'],'UserId':null},'include':[{'model':db[_0xdd31('0x5c')],'as':'Contact'}]})['then'](handleEntityNotFound(_0xc43938,null))[_0xdd31('0x21')](saveUpdates(_0x4b54ca[_0xdd31('0x54')],null))[_0xdd31('0x21')](function(_0x29b94f){if(_0x29b94f){_0x546169[_0xdd31('0x28')]=_0x29b94f[_0xdd31('0x5d')]({'plain':!![]});return db[_0xdd31('0x5e')][_0xdd31('0x52')]({'where':{'id':_0x29b94f[_0xdd31('0x5f')]}});}return null;})[_0xdd31('0x21')](handleEntityNotFound(_0xc43938,null))[_0xdd31('0x21')](function(_0x476900){if(_0x476900){return _0x476900[_0xdd31('0x34')]({'UserId':_0x4b54ca[_0xdd31('0x54')][_0xdd31('0x5b')],'read1stAt':_[_0xdd31('0x60')](_0x476900[_0xdd31('0x61')])?moment()['format'](_0xdd31('0x5a')):undefined});}return null;})[_0xdd31('0x21')](function(_0x5a05ff){if(_0x5a05ff){_0x546169['interaction']=_0x5a05ff[_0xdd31('0x5d')]({'plain':!![]});interaction_log[_0xdd31('0x22')]('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x4b54ca[_0xdd31('0x62')]['id'],_0x4b54ca[_0xdd31('0x62')][_0xdd31('0x37')],_0x4b54ca[_0xdd31('0x62')][_0xdd31('0x63')],_0x546169['interaction']['id'],_0x4b54ca[_0xdd31('0x54')]?JSON[_0xdd31('0x25')](_0x4b54ca[_0xdd31('0x54')]):_0xdd31('0x64'));return respondWithRpcPromise(_0xdd31('0x65'),_0xdd31('0x66'),_0x546169);}return null;})[_0xdd31('0x21')](function(_0x10c73e){if(_0x10c73e){if(_0x4b54ca[_0xdd31('0x54')][_0xdd31('0x67')]){_0x546169['message'][_0xdd31('0x68')]=util[_0xdd31('0x59')]('SIP/%s',_0x4b54ca[_0xdd31('0x62')][_0xdd31('0x37')]);_0x546169[_0xdd31('0x28')][_0xdd31('0x69')]=_0x546169['channel'];_0x546169['message']['event']=_0xdd31('0x6a');return respondWithRpcPromise('EventManager',_0xdd31('0x6b'),{'event':_0xdd31('0x6c'),'message':_['merge'](_0x546169['message'],JSON[_0xdd31('0x6d')](_0x546169['interaction'][_0xdd31('0x6e')]))},client9002)['then'](function(){return _0x546169;});}return _0x546169;}return null;})[_0xdd31('0x21')](respondWithResult(_0xc43938,null))[_0xdd31('0x29')](handleError(_0xc43938,null));};var interaction_log=require(_0xdd31('0x12'))('chat-interactions');exports[_0xdd31('0x32')]=function(_0xbc9b23,_0x281fe8,_0x1d617d){var _0x25160f={'agent':{},'channel':_0xdd31('0x56')};if(_0xbc9b23['body']['id']){delete _0xbc9b23[_0xdd31('0x54')]['id'];}_0xbc9b23['body']['UserId']=_0xbc9b23[_0xdd31('0x54')][_0xdd31('0x5b')]||_0xbc9b23[_0xdd31('0x62')]['id'];_0x25160f[_0xdd31('0x6f')]['id']=_0xbc9b23['body'][_0xdd31('0x5b')];return db['ChatMessage'][_0xdd31('0x52')]({'where':{'id':_0xbc9b23[_0xdd31('0x51')]['id'],'UserId':null}})[_0xdd31('0x21')](handleEntityNotFound(_0x281fe8,null))[_0xdd31('0x21')](function(_0x1edb78){if(_0x1edb78){_0x25160f[_0xdd31('0x28')]=_0x1edb78[_0xdd31('0x5d')]({'plain':!![]});return db[_0xdd31('0x5e')][_0xdd31('0x52')]({'where':{'id':_0x1edb78[_0xdd31('0x5f')]}});}return null;})[_0xdd31('0x21')](handleEntityNotFound(_0x281fe8,null))['then'](function(_0x4907ac){if(_0x4907ac){_0x25160f[_0xdd31('0x70')]=_0x4907ac['get']({'plain':!![]});interaction_log[_0xdd31('0x22')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0xbc9b23[_0xdd31('0x62')]['id'],_0xbc9b23[_0xdd31('0x62')][_0xdd31('0x37')],_0xbc9b23[_0xdd31('0x62')]['role'],_0x25160f['interaction']['id'],_0xbc9b23[_0xdd31('0x54')]?JSON['stringify'](_0xbc9b23['body']):'null');return respondWithRpcPromise(_0xdd31('0x71'),_0xdd31('0x72'),_0x25160f);}return null;})['then'](function(_0x10bd9e){if(_0x10bd9e){_0x10bd9e[_0xdd31('0x28')][_0xdd31('0x68')]=util[_0xdd31('0x59')](_0xdd31('0x73'),_0xbc9b23[_0xdd31('0x62')][_0xdd31('0x37')]);_0x10bd9e[_0xdd31('0x28')][_0xdd31('0x69')]=_0x25160f[_0xdd31('0x69')];_0x10bd9e[_0xdd31('0x28')][_0xdd31('0x74')]='reject';respondWithRpcPromise(_0xdd31('0x6b'),_0xdd31('0x6b'),{'event':_0xdd31('0x75'),'message':_0x10bd9e[_0xdd31('0x28')]},client9002);return _0x25160f;}return null;})[_0xdd31('0x21')](respondWithResult(_0x281fe8,null))['catch'](handleError(_0x281fe8,null));};
\ No newline at end of file
+var _0x3d6d=['json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','name','index','ChatMessage','model','query','keys','attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','filters','pick','filter','map','key','VIRTUAL','field','merge','options','includeAll','include','rows','show','rawAttributes','length','find','create','body','params','describe','../../config/logger','chat-interactions','chat','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','Contact','get','ChatInteraction','ChatInteractionId','isNil','read1stAt','interaction','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','stringify','null','AcceptMessage','acceptMessage','interface','SIP/%s','channel','event','accept','EventManager','acceptmessage','agent','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatMessage.socket','register','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','info','ChatMessage,\x20%s,\x20%s','request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x3d6d,0x1c6));var _0xd3d6=function(_0x872b02,_0x4f4458){_0x872b02=_0x872b02-0x0;var _0x1a6b24=_0x3d6d[_0x872b02];return _0x1a6b24;};'use strict';var pdf=require(_0xd3d6('0x0'));var emlformat=require(_0xd3d6('0x1'));var rimraf=require(_0xd3d6('0x2'));var zipdir=require(_0xd3d6('0x3'));var jsonpatch=require(_0xd3d6('0x4'));var rp=require(_0xd3d6('0x5'));var moment=require(_0xd3d6('0x6'));var BPromise=require(_0xd3d6('0x7'));var Mustache=require('mustache');var util=require(_0xd3d6('0x8'));var path=require('path');var sox=require(_0xd3d6('0x9'));var csv=require(_0xd3d6('0xa'));var ejs=require(_0xd3d6('0xb'));var fs=require('fs');var _=require(_0xd3d6('0xc'));var squel=require(_0xd3d6('0xd'));var crypto=require(_0xd3d6('0xe'));var jsforce=require(_0xd3d6('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xd3d6('0xa'));var querystring=require(_0xd3d6('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xd3d6('0x11'));var qs=require(_0xd3d6('0x12'));var hardwareService=require(_0xd3d6('0x13'));var logger=require('../../config/logger')(_0xd3d6('0x14'));var utils=require('../../config/utils');var config=require(_0xd3d6('0x15'));var db=require(_0xd3d6('0x16'))['db'];config['redis']=_[_0xd3d6('0x17')](config[_0xd3d6('0x18')],{'host':_0xd3d6('0x19'),'port':0x18eb});var socket=require(_0xd3d6('0x1a'))(new Redis(config['redis']));require(_0xd3d6('0x1b'))[_0xd3d6('0x1c')](socket);var jayson=require(_0xd3d6('0x1d'));var client=jayson[_0xd3d6('0x1e')][_0xd3d6('0x1f')]({'port':0x232c});var client9002=jayson['client'][_0xd3d6('0x1f')]({'port':0x232a});function checkPasswordPattern(_0x52580a,_0x1662bb,_0x7c1a9d){if(_0x7c1a9d){var _0x83c20b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x83c20b[_0xd3d6('0x20')](_0x1662bb)){return _0x52580a;}else{throw new Error(_0xd3d6('0x21'));}}else{return _0x52580a;}}function respondWithRpcPromise(_0x18ecdb,_0x5ee386,_0x584519,_0x26f5a3){return new BPromise(function(_0x4f8f4c,_0x496bef){var _0x19ac36=_0x26f5a3||client;return _0x19ac36['request'](_0x18ecdb,_0x584519)['then'](function(_0x179742){logger[_0xd3d6('0x22')](_0xd3d6('0x23'),_0x5ee386,_0xd3d6('0x24'));logger['debug'](_0xd3d6('0x25'),_0x5ee386,_0xd3d6('0x24'),JSON['stringify'](_0x179742));if(_0x179742[_0xd3d6('0x26')]){if(_0x179742['error'][_0xd3d6('0x27')]===0x1f4){logger['error'](_0xd3d6('0x23'),_0x5ee386,_0x179742[_0xd3d6('0x26')][_0xd3d6('0x28')]);return _0x496bef(_0x179742[_0xd3d6('0x26')][_0xd3d6('0x28')]);}logger[_0xd3d6('0x26')]('ChatMessage,\x20%s,\x20%s',_0x5ee386,_0x179742[_0xd3d6('0x26')][_0xd3d6('0x28')]);return _0x4f8f4c(_0x179742[_0xd3d6('0x26')][_0xd3d6('0x28')]);}else{logger[_0xd3d6('0x22')](_0xd3d6('0x23'),_0x5ee386,'request\x20sent');_0x4f8f4c(_0x179742[_0xd3d6('0x29')]['message']);}})[_0xd3d6('0x2a')](function(_0x5b577b){logger[_0xd3d6('0x26')](_0xd3d6('0x23'),_0x5ee386,_0x5b577b);_0x496bef(_0x5b577b);});});}function respondWithStatusCode(_0x3809c5,_0x5eab15){_0x5eab15=_0x5eab15||0xcc;return function(_0x32d5be){if(_0x32d5be){return _0x3809c5[_0xd3d6('0x2b')](_0x5eab15);}return _0x3809c5[_0xd3d6('0x2c')](_0x5eab15)[_0xd3d6('0x2d')]();};}function respondWithResult(_0x23d3b9,_0x56c08e){_0x56c08e=_0x56c08e||0xc8;return function(_0x3ed912){if(_0x3ed912){return _0x23d3b9['status'](_0x56c08e)[_0xd3d6('0x2e')](_0x3ed912);}};}function respondWithFilteredResult(_0xe8f1c0,_0x19a6e9){return function(_0x447749){if(_0x447749){var _0x6d289a=_0x447749[_0xd3d6('0x2f')],_0x4157c4=_0x19a6e9[_0xd3d6('0x30')],_0xb2177=_0x19a6e9[_0xd3d6('0x30')]+_0x19a6e9[_0xd3d6('0x31')],_0x5a8aff;if(_0xb2177>=_0x6d289a){_0xb2177=_0x6d289a;_0x5a8aff=0xc8;}else{_0x5a8aff=0xce;}_0xe8f1c0[_0xd3d6('0x2c')](_0x5a8aff);return _0xe8f1c0[_0xd3d6('0x32')](_0xd3d6('0x33'),_0x4157c4+'-'+_0xb2177+'/'+_0x6d289a)[_0xd3d6('0x2e')](_0x447749);}return null;};}function patchUpdates(_0x73c4bf){return function(_0x198f20){try{jsonpatch[_0xd3d6('0x34')](_0x198f20,_0x73c4bf,!![]);}catch(_0x21c1e8){return BPromise[_0xd3d6('0x35')](_0x21c1e8);}return _0x198f20[_0xd3d6('0x36')]();};}function saveUpdates(_0x3f932d,_0x2dea1e){return function(_0x2f79ff){if(_0x2f79ff){return _0x2f79ff[_0xd3d6('0x37')](_0x3f932d)['then'](function(_0x39f2ad){return _0x39f2ad;});}return null;};}function removeEntity(_0x500d62,_0x1d34d5){return function(_0x251989){if(_0x251989){return _0x251989[_0xd3d6('0x38')]()[_0xd3d6('0x39')](function(){_0x500d62[_0xd3d6('0x2c')](0xcc)[_0xd3d6('0x2d')]();});}};}function handleEntityNotFound(_0x113982,_0x3ac25b){return function(_0x33247a){if(!_0x33247a){_0x113982[_0xd3d6('0x2b')](0x194);}return _0x33247a;};}function handleError(_0x225726,_0x51d411){_0x51d411=_0x51d411||0x1f4;return function(_0xe31475){logger[_0xd3d6('0x26')](_0xe31475['stack']);if(_0xe31475[_0xd3d6('0x3a')]){delete _0xe31475['name'];}_0x225726[_0xd3d6('0x2c')](_0x51d411)['send'](_0xe31475);};}exports[_0xd3d6('0x3b')]=function(_0x12aa0d,_0x480e89){var _0x48f879={},_0x1d420a={},_0x2f9df5={'count':0x0,'rows':[]};var _0x33b37c=db[_0xd3d6('0x3c')]['rawAttributes'];_0x1d420a[_0xd3d6('0x3d')]=_['keys'](_0x33b37c);_0x1d420a[_0xd3d6('0x3e')]=_[_0xd3d6('0x3f')](_0x12aa0d[_0xd3d6('0x3e')]);_0x1d420a['filters']=_['intersection'](_0x1d420a[_0xd3d6('0x3d')],_0x1d420a[_0xd3d6('0x3e')]);_0x48f879[_0xd3d6('0x40')]=_[_0xd3d6('0x41')](_0x1d420a[_0xd3d6('0x3d')],qs[_0xd3d6('0x42')](_0x12aa0d[_0xd3d6('0x3e')]['fields']));_0x48f879[_0xd3d6('0x40')]=_0x48f879[_0xd3d6('0x40')]['length']?_0x48f879['attributes']:_0x1d420a['model'];if(!_0x12aa0d[_0xd3d6('0x3e')][_0xd3d6('0x43')](_0xd3d6('0x44'))){_0x48f879[_0xd3d6('0x31')]=qs[_0xd3d6('0x31')](_0x12aa0d['query'][_0xd3d6('0x31')]);_0x48f879[_0xd3d6('0x30')]=qs['offset'](_0x12aa0d[_0xd3d6('0x3e')]['offset']);}_0x48f879['order']=qs['sort'](_0x12aa0d[_0xd3d6('0x3e')][_0xd3d6('0x45')]);_0x48f879[_0xd3d6('0x46')]=qs[_0xd3d6('0x47')](_[_0xd3d6('0x48')](_0x12aa0d['query'],_0x1d420a[_0xd3d6('0x47')]));if(_0x12aa0d['query'][_0xd3d6('0x49')]){_0x48f879[_0xd3d6('0x46')]=_['merge'](_0x48f879[_0xd3d6('0x46')],{'$or':_[_0xd3d6('0x4a')](_0x33b37c,function(_0x248fb6){if(_0x248fb6['type'][_0xd3d6('0x4b')]!==_0xd3d6('0x4c')){var _0x511244={};_0x511244[_0x248fb6[_0xd3d6('0x4d')]]={'$like':'%'+_0x12aa0d[_0xd3d6('0x3e')][_0xd3d6('0x49')]+'%'};return _0x511244;}})});}_0x48f879=_[_0xd3d6('0x4e')]({},_0x48f879,_0x12aa0d[_0xd3d6('0x4f')]);var _0x2e1d4c={'where':_0x48f879[_0xd3d6('0x46')]};return db[_0xd3d6('0x3c')]['count'](_0x2e1d4c)[_0xd3d6('0x39')](function(_0x17109c){_0x2f9df5[_0xd3d6('0x2f')]=_0x17109c;if(_0x12aa0d[_0xd3d6('0x3e')][_0xd3d6('0x50')]){_0x48f879[_0xd3d6('0x51')]=[{'all':!![]}];}return db[_0xd3d6('0x3c')]['findAll'](_0x48f879);})[_0xd3d6('0x39')](function(_0x31a832){_0x2f9df5[_0xd3d6('0x52')]=_0x31a832;return _0x2f9df5;})[_0xd3d6('0x39')](respondWithFilteredResult(_0x480e89,_0x48f879))[_0xd3d6('0x2a')](handleError(_0x480e89,null));};exports[_0xd3d6('0x53')]=function(_0x2c76fb,_0x45765c){var _0x418a31={'raw':!![],'where':{'id':_0x2c76fb['params']['id']}},_0x2416f6={};_0x2416f6['model']=_[_0xd3d6('0x3f')](db['ChatMessage'][_0xd3d6('0x54')]);_0x2416f6[_0xd3d6('0x3e')]=_[_0xd3d6('0x3f')](_0x2c76fb[_0xd3d6('0x3e')]);_0x2416f6[_0xd3d6('0x47')]=_[_0xd3d6('0x41')](_0x2416f6[_0xd3d6('0x3d')],_0x2416f6[_0xd3d6('0x3e')]);_0x418a31[_0xd3d6('0x40')]=_[_0xd3d6('0x41')](_0x2416f6['model'],qs[_0xd3d6('0x42')](_0x2c76fb['query'][_0xd3d6('0x42')]));_0x418a31[_0xd3d6('0x40')]=_0x418a31['attributes'][_0xd3d6('0x55')]?_0x418a31['attributes']:_0x2416f6[_0xd3d6('0x3d')];if(_0x2c76fb[_0xd3d6('0x3e')][_0xd3d6('0x50')]){_0x418a31[_0xd3d6('0x51')]=[{'all':!![]}];}_0x418a31=_[_0xd3d6('0x4e')]({},_0x418a31,_0x2c76fb[_0xd3d6('0x4f')]);return db['ChatMessage'][_0xd3d6('0x56')](_0x418a31)['then'](handleEntityNotFound(_0x45765c,null))[_0xd3d6('0x39')](respondWithResult(_0x45765c,null))[_0xd3d6('0x2a')](handleError(_0x45765c,null));};exports[_0xd3d6('0x57')]=function(_0x51a1bb,_0x18be65){return db['ChatMessage'][_0xd3d6('0x57')](_0x51a1bb['body'],{})[_0xd3d6('0x39')](respondWithResult(_0x18be65,0xc9))[_0xd3d6('0x2a')](handleError(_0x18be65,null));};exports[_0xd3d6('0x37')]=function(_0x4b5030,_0x4925ad){if(_0x4b5030[_0xd3d6('0x58')]['id']){delete _0x4b5030[_0xd3d6('0x58')]['id'];}return db[_0xd3d6('0x3c')][_0xd3d6('0x56')]({'where':{'id':_0x4b5030[_0xd3d6('0x59')]['id']}})[_0xd3d6('0x39')](handleEntityNotFound(_0x4925ad,null))[_0xd3d6('0x39')](saveUpdates(_0x4b5030[_0xd3d6('0x58')],null))[_0xd3d6('0x39')](respondWithResult(_0x4925ad,null))[_0xd3d6('0x2a')](handleError(_0x4925ad,null));};exports[_0xd3d6('0x38')]=function(_0x3c3971,_0x53b0a1){return db[_0xd3d6('0x3c')][_0xd3d6('0x56')]({'where':{'id':_0x3c3971[_0xd3d6('0x59')]['id']}})[_0xd3d6('0x39')](handleEntityNotFound(_0x53b0a1,null))[_0xd3d6('0x39')](removeEntity(_0x53b0a1,null))['catch'](handleError(_0x53b0a1,null));};exports[_0xd3d6('0x5a')]=function(_0x382484,_0x14b824){return db[_0xd3d6('0x3c')][_0xd3d6('0x5a')]()[_0xd3d6('0x39')](respondWithResult(_0x14b824,null))[_0xd3d6('0x2a')](handleError(_0x14b824,null));};var interaction_log=require(_0xd3d6('0x5b'))(_0xd3d6('0x5c'));exports['accept']=function(_0x3d4ba4,_0x5581e5,_0x35e697){var _0x23abdf={'channel':_0xd3d6('0x5d')};if(_0x3d4ba4[_0xd3d6('0x58')]['id']){delete _0x3d4ba4[_0xd3d6('0x58')]['id'];}_0x3d4ba4[_0xd3d6('0x58')][_0xd3d6('0x5e')]=!![];_0x3d4ba4[_0xd3d6('0x58')][_0xd3d6('0x5f')]=moment()[_0xd3d6('0x60')](_0xd3d6('0x61'));_0x3d4ba4['body'][_0xd3d6('0x62')]=_0x3d4ba4['body'][_0xd3d6('0x62')]||_0x3d4ba4[_0xd3d6('0x63')]['id'];return db[_0xd3d6('0x3c')]['find']({'where':{'id':_0x3d4ba4[_0xd3d6('0x59')]['id'],'UserId':null},'include':[{'model':db[_0xd3d6('0x64')],'as':_0xd3d6('0x65')}]})[_0xd3d6('0x39')](handleEntityNotFound(_0x5581e5,null))['then'](saveUpdates(_0x3d4ba4[_0xd3d6('0x58')],null))['then'](function(_0x47712c){if(_0x47712c){_0x23abdf['message']=_0x47712c[_0xd3d6('0x66')]({'plain':!![]});return db[_0xd3d6('0x67')][_0xd3d6('0x56')]({'where':{'id':_0x47712c[_0xd3d6('0x68')]}});}return null;})[_0xd3d6('0x39')](handleEntityNotFound(_0x5581e5,null))[_0xd3d6('0x39')](function(_0x3797af){if(_0x3797af){return _0x3797af['update']({'UserId':_0x3d4ba4[_0xd3d6('0x58')]['UserId'],'read1stAt':_[_0xd3d6('0x69')](_0x3797af[_0xd3d6('0x6a')])?moment()['format'](_0xd3d6('0x61')):undefined});}return null;})[_0xd3d6('0x39')](function(_0x4e5557){if(_0x4e5557){_0x23abdf[_0xd3d6('0x6b')]=_0x4e5557[_0xd3d6('0x66')]({'plain':!![]});interaction_log[_0xd3d6('0x22')](_0xd3d6('0x6c'),_0x3d4ba4[_0xd3d6('0x63')]['id'],_0x3d4ba4['user'][_0xd3d6('0x3a')],_0x3d4ba4[_0xd3d6('0x63')][_0xd3d6('0x6d')],_0x23abdf[_0xd3d6('0x6b')]['id'],_0x3d4ba4['body']?JSON[_0xd3d6('0x6e')](_0x3d4ba4['body']):_0xd3d6('0x6f'));return respondWithRpcPromise(_0xd3d6('0x70'),_0xd3d6('0x71'),_0x23abdf);}return null;})['then'](function(_0x3b5a22){if(_0x3b5a22){if(_0x3d4ba4[_0xd3d6('0x58')]['manual']){_0x23abdf['message'][_0xd3d6('0x72')]=util[_0xd3d6('0x60')](_0xd3d6('0x73'),_0x3d4ba4[_0xd3d6('0x63')]['name']);_0x23abdf['message'][_0xd3d6('0x74')]=_0x23abdf[_0xd3d6('0x74')];_0x23abdf[_0xd3d6('0x28')][_0xd3d6('0x75')]=_0xd3d6('0x76');return respondWithRpcPromise('EventManager',_0xd3d6('0x77'),{'event':_0xd3d6('0x78'),'message':_['merge'](_0x23abdf[_0xd3d6('0x28')],JSON['parse'](_0x23abdf['interaction']['formData']))},client9002)[_0xd3d6('0x39')](function(){return _0x23abdf;});}return _0x23abdf;}return null;})[_0xd3d6('0x39')](respondWithResult(_0x5581e5,null))['catch'](handleError(_0x5581e5,null));};var interaction_log=require(_0xd3d6('0x5b'))(_0xd3d6('0x5c'));exports[_0xd3d6('0x35')]=function(_0x445c0f,_0x42b421,_0x7a5e0e){var _0x525223={'agent':{},'channel':_0xd3d6('0x5d')};if(_0x445c0f[_0xd3d6('0x58')]['id']){delete _0x445c0f['body']['id'];}_0x445c0f[_0xd3d6('0x58')]['UserId']=_0x445c0f[_0xd3d6('0x58')][_0xd3d6('0x62')]||_0x445c0f[_0xd3d6('0x63')]['id'];_0x525223[_0xd3d6('0x79')]['id']=_0x445c0f[_0xd3d6('0x58')][_0xd3d6('0x62')];return db[_0xd3d6('0x3c')][_0xd3d6('0x56')]({'where':{'id':_0x445c0f[_0xd3d6('0x59')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x42b421,null))[_0xd3d6('0x39')](function(_0x411978){if(_0x411978){_0x525223['message']=_0x411978[_0xd3d6('0x66')]({'plain':!![]});return db[_0xd3d6('0x67')]['find']({'where':{'id':_0x411978['ChatInteractionId']}});}return null;})[_0xd3d6('0x39')](handleEntityNotFound(_0x42b421,null))[_0xd3d6('0x39')](function(_0x2036e1){if(_0x2036e1){_0x525223['interaction']=_0x2036e1[_0xd3d6('0x66')]({'plain':!![]});interaction_log[_0xd3d6('0x22')](_0xd3d6('0x7a'),_0x445c0f[_0xd3d6('0x63')]['id'],_0x445c0f[_0xd3d6('0x63')][_0xd3d6('0x3a')],_0x445c0f['user'][_0xd3d6('0x6d')],_0x525223[_0xd3d6('0x6b')]['id'],_0x445c0f[_0xd3d6('0x58')]?JSON[_0xd3d6('0x6e')](_0x445c0f[_0xd3d6('0x58')]):'null');return respondWithRpcPromise(_0xd3d6('0x7b'),_0xd3d6('0x7c'),_0x525223);}return null;})[_0xd3d6('0x39')](function(_0x5011ff){if(_0x5011ff){_0x5011ff[_0xd3d6('0x28')][_0xd3d6('0x72')]=util[_0xd3d6('0x60')]('SIP/%s',_0x445c0f[_0xd3d6('0x63')]['name']);_0x5011ff['message']['channel']=_0x525223[_0xd3d6('0x74')];_0x5011ff[_0xd3d6('0x28')][_0xd3d6('0x75')]='reject';respondWithRpcPromise(_0xd3d6('0x77'),_0xd3d6('0x77'),{'event':'rejectmessage','message':_0x5011ff[_0xd3d6('0x28')]},client9002);return _0x525223;}return null;})['then'](respondWithResult(_0x42b421,null))['catch'](handleError(_0x42b421,null));};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js
index 33c34f3..54997ce 100644
--- a/server/api/chatMessage/chatMessage.events.js
+++ b/server/api/chatMessage/chatMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc0d6=['../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x121701,_0x1dc21c){var _0xe534cb=function(_0x1f6bf8){while(--_0x1f6bf8){_0x121701['push'](_0x121701['shift']());}};_0xe534cb(++_0x1dc21c);}(_0xc0d6,0x1ce));var _0x6c0d=function(_0x49e5e1,_0x4c4fea){_0x49e5e1=_0x49e5e1-0x0;var _0x4a0f2a=_0xc0d6[_0x49e5e1];return _0x4a0f2a;};'use strict';var EventEmitter=require('events');var ChatMessage=require(_0x6c0d('0x0'))['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x6c0d('0x1')](0x0);var events={'afterCreate':_0x6c0d('0x2'),'afterUpdate':_0x6c0d('0x3'),'afterDestroy':_0x6c0d('0x4')};function emitEvent(_0x22bb65){return function(_0x21857a,_0xfc2a1c,_0x15ed87){ChatMessageEvents[_0x6c0d('0x5')](_0x22bb65+':'+_0x21857a['id'],_0x21857a);ChatMessageEvents[_0x6c0d('0x5')](_0x22bb65,_0x21857a);_0x15ed87(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatMessage['hook'](e,emitEvent(event));}}module['exports']=ChatMessageEvents;
\ No newline at end of file
+var _0x9861=['remove','emit','hasOwnProperty','hook','exports','events','setMaxListeners','save','update'];(function(_0x342383,_0x159436){var _0x16a64e=function(_0x5a5311){while(--_0x5a5311){_0x342383['push'](_0x342383['shift']());}};_0x16a64e(++_0x159436);}(_0x9861,0x176));var _0x1986=function(_0x18547b,_0xf0af70){_0x18547b=_0x18547b-0x0;var _0x36bf54=_0x9861[_0x18547b];return _0x36bf54;};'use strict';var EventEmitter=require(_0x1986('0x0'));var ChatMessage=require('../../mysqldb')['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x1986('0x1')](0x0);var events={'afterCreate':_0x1986('0x2'),'afterUpdate':_0x1986('0x3'),'afterDestroy':_0x1986('0x4')};function emitEvent(_0x2c59a4){return function(_0x44e5c9,_0x5462a7,_0xe033ef){ChatMessageEvents[_0x1986('0x5')](_0x2c59a4+':'+_0x44e5c9['id'],_0x44e5c9);ChatMessageEvents[_0x1986('0x5')](_0x2c59a4,_0x44e5c9);_0xe033ef(null);};}for(var e in events){if(events[_0x1986('0x6')](e)){var event=events[e];ChatMessage[_0x1986('0x7')](e,emitEvent(event));}}module[_0x1986('0x8')]=ChatMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js
index cca9e60..5ccfa99 100644
--- a/server/api/chatMessage/chatMessage.model.js
+++ b/server/api/chatMessage/chatMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5bdd=['lodash','util','api','bluebird','path','rimraf','../../config/environment','./chatMessage.attributes','exports','ChatMessage','chat_messages','FULLTEXT','get','direction','toLowerCase','out','isNil','UserId','ChatInteraction','findOne','ChatInteractionId','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci'];(function(_0x7536f1,_0x47f171){var _0x4e5ca8=function(_0x39ed5f){while(--_0x39ed5f){_0x7536f1['push'](_0x7536f1['shift']());}};_0x4e5ca8(++_0x47f171);}(_0x5bdd,0x1e6));var _0xd5bd=function(_0x7a8a0a,_0x29d79b){_0x7a8a0a=_0x7a8a0a-0x0;var _0x25929c=_0x5bdd[_0x7a8a0a];return _0x25929c;};'use strict';var _=require(_0xd5bd('0x0'));var util=require(_0xd5bd('0x1'));var logger=require('../../config/logger')(_0xd5bd('0x2'));var moment=require('moment');var BPromise=require(_0xd5bd('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xd5bd('0x4'));var rimraf=require(_0xd5bd('0x5'));var config=require(_0xd5bd('0x6'));var attributes=require(_0xd5bd('0x7'));module[_0xd5bd('0x8')]=function(_0x32365a,_0x54257f){return _0x32365a['define'](_0xd5bd('0x9'),attributes,{'tableName':_0xd5bd('0xa'),'paranoid':![],'indexes':[{'name':'fti_chat_messages','fields':['body'],'type':_0xd5bd('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0xe3651c,_0x1d5eea,_0x55959c){var _0x35d812=_0x32365a['models'];var _0x95ba24=_0xe3651c[_0xd5bd('0xc')]({'plain':!![]});if(_0x95ba24[_0xd5bd('0xd')][_0xd5bd('0xe')]()==='in'||_0x95ba24[_0xd5bd('0xd')][_0xd5bd('0xe')]()===_0xd5bd('0xf')&&!_0x95ba24['secret']&&!_[_0xd5bd('0x10')](_0x95ba24[_0xd5bd('0x11')])){_0x35d812[_0xd5bd('0x12')][_0xd5bd('0x13')]({'where':{'id':_0x95ba24[_0xd5bd('0x14')]}})['then'](function(_0x84b93d){if(_0x84b93d){_0x84b93d[_0xd5bd('0x15')]({'lastMsgAt':_0x95ba24[_0xd5bd('0x16')],'lastMsgDirection':_0x95ba24[_0xd5bd('0xd')][_0xd5bd('0xe')]()});}})[_0xd5bd('0x17')](function(_0x53d0f1){console[_0xd5bd('0x18')](_0x53d0f1);});}_0x55959c();}},'charset':_0xd5bd('0x19'),'collate':_0xd5bd('0x1a')});};
\ No newline at end of file
+var _0xab90=['body','FULLTEXT','models','get','toLowerCase','direction','secret','isNil','UserId','ChatInteraction','ChatInteractionId','then','update','createdAt','catch','error','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatMessage.attributes','exports','define','fti_chat_messages'];(function(_0x3fe31e,_0x157ee3){var _0x1d0b1b=function(_0x2ca8bc){while(--_0x2ca8bc){_0x3fe31e['push'](_0x3fe31e['shift']());}};_0x1d0b1b(++_0x157ee3);}(_0xab90,0x1b5));var _0x0ab9=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xab90[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0x0ab9('0x0'));var util=require(_0x0ab9('0x1'));var logger=require(_0x0ab9('0x2'))(_0x0ab9('0x3'));var moment=require(_0x0ab9('0x4'));var BPromise=require('bluebird');var rp=require(_0x0ab9('0x5'));var fs=require('fs');var path=require(_0x0ab9('0x6'));var rimraf=require(_0x0ab9('0x7'));var config=require(_0x0ab9('0x8'));var attributes=require(_0x0ab9('0x9'));module[_0x0ab9('0xa')]=function(_0x5aeca4,_0x15dcc0){return _0x5aeca4[_0x0ab9('0xb')]('ChatMessage',attributes,{'tableName':'chat_messages','paranoid':![],'indexes':[{'name':_0x0ab9('0xc'),'fields':[_0x0ab9('0xd')],'type':_0x0ab9('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x4afc47,_0x32bfaf,_0x449620){var _0x5bebec=_0x5aeca4[_0x0ab9('0xf')];var _0x24e0bb=_0x4afc47[_0x0ab9('0x10')]({'plain':!![]});if(_0x24e0bb['direction'][_0x0ab9('0x11')]()==='in'||_0x24e0bb[_0x0ab9('0x12')][_0x0ab9('0x11')]()==='out'&&!_0x24e0bb[_0x0ab9('0x13')]&&!_[_0x0ab9('0x14')](_0x24e0bb[_0x0ab9('0x15')])){_0x5bebec[_0x0ab9('0x16')]['findOne']({'where':{'id':_0x24e0bb[_0x0ab9('0x17')]}})[_0x0ab9('0x18')](function(_0x8a3a1c){if(_0x8a3a1c){_0x8a3a1c[_0x0ab9('0x19')]({'lastMsgAt':_0x24e0bb[_0x0ab9('0x1a')],'lastMsgDirection':_0x24e0bb[_0x0ab9('0x12')][_0x0ab9('0x11')]()});}})[_0x0ab9('0x1b')](function(_0x2832f9){console[_0x0ab9('0x1c')](_0x2832f9);});}_0x449620();}},'charset':'utf8mb4','collate':_0x0ab9('0x1d')});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js
index 1d5327c..62f03cf 100644
--- a/server/api/chatMessage/chatMessage.rpc.js
+++ b/server/api/chatMessage/chatMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6a3d=['lodash','moment','bluebird','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','ChatMessage,\x20%s,\x20%s','request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','CreateChatMessage','ChatMessage','create','body','options','raw','info','debug','catch'];(function(_0x29bf52,_0x3fcb7b){var _0x1af523=function(_0xf3d0d3){while(--_0xf3d0d3){_0x29bf52['push'](_0x29bf52['shift']());}};_0x1af523(++_0x3fcb7b);}(_0x6a3d,0x1d1));var _0xd6a3=function(_0x56a3c2,_0x58b15f){_0x56a3c2=_0x56a3c2-0x0;var _0x3fb708=_0x6a3d[_0x56a3c2];return _0x3fb708;};'use strict';var _=require(_0xd6a3('0x0'));var util=require('util');var moment=require(_0xd6a3('0x1'));var BPromise=require(_0xd6a3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xd6a3('0x3'));var logger=require(_0xd6a3('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0xd6a3('0x5'));var client=jayson[_0xd6a3('0x6')][_0xd6a3('0x7')]({'port':0x232a});config[_0xd6a3('0x8')]=_[_0xd6a3('0x9')](config['redis'],{'host':_0xd6a3('0xa'),'port':0x18eb});var socket=require(_0xd6a3('0xb'))(new Redis(config['redis']));require('./chatMessage.socket')[_0xd6a3('0xc')](socket);function respondWithRpcPromise(_0x33d56f,_0x2f6828,_0x5112f5){return new BPromise(function(_0x4d96b2,_0xdecd6e){return client[_0xd6a3('0xd')](_0x33d56f,_0x5112f5)[_0xd6a3('0xe')](function(_0x468e1a){logger['info'](_0xd6a3('0xf'),_0x2f6828,_0xd6a3('0x10'));logger['debug'](_0xd6a3('0x11'),_0x2f6828,_0xd6a3('0x10'),JSON[_0xd6a3('0x12')](_0x468e1a));if(_0x468e1a[_0xd6a3('0x13')]){if(_0x468e1a[_0xd6a3('0x13')]['code']===0x1f4){logger[_0xd6a3('0x13')]('ChatMessage,\x20%s,\x20%s',_0x2f6828,_0x468e1a[_0xd6a3('0x13')][_0xd6a3('0x14')]);return _0xdecd6e(_0x468e1a[_0xd6a3('0x13')][_0xd6a3('0x14')]);}logger['error'](_0xd6a3('0xf'),_0x2f6828,_0x468e1a['error'][_0xd6a3('0x14')]);return _0x4d96b2(_0x468e1a['error'][_0xd6a3('0x14')]);}else{logger['info'](_0xd6a3('0xf'),_0x2f6828,_0xd6a3('0x10'));_0x4d96b2(_0x468e1a[_0xd6a3('0x15')][_0xd6a3('0x14')]);}})['catch'](function(_0x4fec84){logger['error']('ChatMessage,\x20%s,\x20%s',_0x2f6828,_0x4fec84);_0xdecd6e(_0x4fec84);});});}exports[_0xd6a3('0x16')]=function(_0x25370b){var _0x2f78e5=this;return new Promise(function(_0x2c9f4f,_0x4ac4b2){return db[_0xd6a3('0x17')][_0xd6a3('0x18')](_0x25370b[_0xd6a3('0x19')],{'raw':_0x25370b[_0xd6a3('0x1a')]?_0x25370b[_0xd6a3('0x1a')][_0xd6a3('0x1b')]===undefined?!![]:![]:!![]})[_0xd6a3('0xe')](function(_0x4509c2){logger[_0xd6a3('0x1c')](_0xd6a3('0x16'),_0x25370b);logger[_0xd6a3('0x1d')](_0xd6a3('0x16'),_0x25370b,JSON['stringify'](_0x4509c2));_0x2c9f4f(_0x4509c2);})[_0xd6a3('0x1e')](function(_0x58348e){logger[_0xd6a3('0x13')]('CreateChatMessage',_0x58348e[_0xd6a3('0x14')],_0x25370b);_0x4ac4b2(_0x2f78e5['error'](0x1f4,_0x58348e[_0xd6a3('0x14')]));});});};
\ No newline at end of file
+var _0xbfa6=['redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','register','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','create','body','options','raw','CreateChatMessage','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x35ca01,_0x2339d8){var _0x279bf5=function(_0x3409d1){while(--_0x3409d1){_0x35ca01['push'](_0x35ca01['shift']());}};_0x279bf5(++_0x2339d8);}(_0xbfa6,0xe3));var _0x6bfa=function(_0x24310a,_0x22f59f){_0x24310a=_0x24310a-0x0;var _0x34fe89=_0xbfa6[_0x24310a];return _0x34fe89;};'use strict';var _=require(_0x6bfa('0x0'));var util=require(_0x6bfa('0x1'));var moment=require(_0x6bfa('0x2'));var BPromise=require('bluebird');var rs=require(_0x6bfa('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6bfa('0x4'))['db'];var utils=require(_0x6bfa('0x5'));var logger=require(_0x6bfa('0x6'))(_0x6bfa('0x7'));var config=require(_0x6bfa('0x8'));var jayson=require(_0x6bfa('0x9'));var client=jayson[_0x6bfa('0xa')]['http']({'port':0x232a});config[_0x6bfa('0xb')]=_[_0x6bfa('0xc')](config['redis'],{'host':_0x6bfa('0xd'),'port':0x18eb});var socket=require(_0x6bfa('0xe'))(new Redis(config[_0x6bfa('0xb')]));require(_0x6bfa('0xf'))[_0x6bfa('0x10')](socket);function respondWithRpcPromise(_0x5e74e8,_0x24afed,_0x5ae6d8){return new BPromise(function(_0x9d7fcf,_0x5bbf09){return client[_0x6bfa('0x11')](_0x5e74e8,_0x5ae6d8)[_0x6bfa('0x12')](function(_0x15b17d){logger[_0x6bfa('0x13')](_0x6bfa('0x14'),_0x24afed,_0x6bfa('0x15'));logger['debug'](_0x6bfa('0x16'),_0x24afed,'request\x20sent',JSON[_0x6bfa('0x17')](_0x15b17d));if(_0x15b17d[_0x6bfa('0x18')]){if(_0x15b17d[_0x6bfa('0x18')][_0x6bfa('0x19')]===0x1f4){logger[_0x6bfa('0x18')](_0x6bfa('0x14'),_0x24afed,_0x15b17d[_0x6bfa('0x18')][_0x6bfa('0x1a')]);return _0x5bbf09(_0x15b17d[_0x6bfa('0x18')]['message']);}logger[_0x6bfa('0x18')](_0x6bfa('0x14'),_0x24afed,_0x15b17d[_0x6bfa('0x18')][_0x6bfa('0x1a')]);return _0x9d7fcf(_0x15b17d[_0x6bfa('0x18')][_0x6bfa('0x1a')]);}else{logger[_0x6bfa('0x13')]('ChatMessage,\x20%s,\x20%s',_0x24afed,_0x6bfa('0x15'));_0x9d7fcf(_0x15b17d[_0x6bfa('0x1b')][_0x6bfa('0x1a')]);}})[_0x6bfa('0x1c')](function(_0x5d55ea){logger[_0x6bfa('0x18')](_0x6bfa('0x14'),_0x24afed,_0x5d55ea);_0x5bbf09(_0x5d55ea);});});}exports['CreateChatMessage']=function(_0x16f71b){var _0x2598f1=this;return new Promise(function(_0xdd757a,_0x3a5a87){return db['ChatMessage'][_0x6bfa('0x1d')](_0x16f71b[_0x6bfa('0x1e')],{'raw':_0x16f71b['options']?_0x16f71b[_0x6bfa('0x1f')][_0x6bfa('0x20')]===undefined?!![]:![]:!![]})[_0x6bfa('0x12')](function(_0x3ae96e){logger[_0x6bfa('0x13')](_0x6bfa('0x21'),_0x16f71b);logger['debug'](_0x6bfa('0x21'),_0x16f71b,JSON[_0x6bfa('0x17')](_0x3ae96e));_0xdd757a(_0x3ae96e);})[_0x6bfa('0x1c')](function(_0x46ff49){logger['error'](_0x6bfa('0x21'),_0x46ff49[_0x6bfa('0x1a')],_0x16f71b);_0x3a5a87(_0x2598f1[_0x6bfa('0x18')](0x1f4,_0x46ff49[_0x6bfa('0x1a')]));});});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js
index 2373fcc..64788b0 100644
--- a/server/api/chatMessage/chatMessage.socket.js
+++ b/server/api/chatMessage/chatMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e0=['chatMessage:','./chatMessage.events','save','remove','emit','removeListener'];(function(_0x2dc461,_0x2da359){var _0x2beda7=function(_0x4f6ab8){while(--_0x4f6ab8){_0x2dc461['push'](_0x2dc461['shift']());}};_0x2beda7(++_0x2da359);}(_0x70e0,0x17b));var _0x070e=function(_0x4ab1b5,_0x3ff0c4){_0x4ab1b5=_0x4ab1b5-0x0;var _0x1cb9d6=_0x70e0[_0x4ab1b5];return _0x1cb9d6;};'use strict';var ChatMessageEvents=require(_0x070e('0x0'));var events=[_0x070e('0x1'),_0x070e('0x2'),'update'];function createListener(_0x579b83,_0x16e651){return function(_0xee173){_0x16e651[_0x070e('0x3')](_0x579b83,_0xee173);};}function removeListener(_0x2593e5,_0x5c90fc){return function(){ChatMessageEvents[_0x070e('0x4')](_0x2593e5,_0x5c90fc);};}exports['register']=function(_0x46fe68){for(var _0x4b041d=0x0,_0x56e420=events['length'];_0x4b041d<_0x56e420;_0x4b041d++){var _0x35ab0c=events[_0x4b041d];var _0x1e11f0=createListener(_0x070e('0x5')+_0x35ab0c,_0x46fe68);ChatMessageEvents['on'](_0x35ab0c,_0x1e11f0);}};
\ No newline at end of file
+var _0x55ca=['removeListener','register','./chatMessage.events','save'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0x55ca,0x126));var _0xa55c=function(_0x26abc4,_0x52fbef){_0x26abc4=_0x26abc4-0x0;var _0xbfcce3=_0x55ca[_0x26abc4];return _0xbfcce3;};'use strict';var ChatMessageEvents=require(_0xa55c('0x0'));var events=[_0xa55c('0x1'),'remove','update'];function createListener(_0x49875a,_0x1c6ec3){return function(_0x267ea0){_0x1c6ec3['emit'](_0x49875a,_0x267ea0);};}function removeListener(_0x3b478a,_0x2db02a){return function(){ChatMessageEvents[_0xa55c('0x2')](_0x3b478a,_0x2db02a);};}exports[_0xa55c('0x3')]=function(_0x3c97c8){for(var _0x279caa=0x0,_0x36b623=events['length'];_0x279caa<_0x36b623;_0x279caa++){var _0x2121fd=events[_0x279caa];var _0x2537f0=createListener('chatMessage:'+_0x2121fd,_0x3c97c8);ChatMessageEvents['on'](_0x2121fd,_0x2537f0);}};
\ No newline at end of file
diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js
index 1eaea55..46673e2 100644
--- a/server/api/chatMessage/index.js
+++ b/server/api/chatMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdada=['destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./chatMessage.controller','isAuthenticated','get','/describe','show','tracked','chat','chatmessage:create','create','/:id','update','put','/:id/accept','accept','/:id/reject','reject','delete'];(function(_0x25c988,_0xce8221){var _0x45fcc2=function(_0x47fba5){while(--_0x47fba5){_0x25c988['push'](_0x25c988['shift']());}};_0x45fcc2(++_0xce8221);}(_0xdada,0x1a2));var _0xadad=function(_0x13bc85,_0x262d2b){_0x13bc85=_0x13bc85-0x0;var _0x15ab52=_0xdada[_0x13bc85];return _0x15ab52;};'use strict';var multer=require(_0xadad('0x0'));var util=require(_0xadad('0x1'));var path=require(_0xadad('0x2'));var timeout=require('connect-timeout');var express=require(_0xadad('0x3'));var router=express[_0xadad('0x4')]();var auth=require(_0xadad('0x5'));var interaction=require(_0xadad('0x6'));var config=require('../../config/environment');var controller=require(_0xadad('0x7'));router['get']('/',auth[_0xadad('0x8')](),controller['index']);router[_0xadad('0x9')](_0xadad('0xa'),auth[_0xadad('0x8')](),controller['describe']);router[_0xadad('0x9')]('/:id',auth[_0xadad('0x8')](),controller[_0xadad('0xb')]);router['post']('/',auth['isAuthenticated'](),interaction[_0xadad('0xc')](_0xadad('0xd'),_0xadad('0xe')),controller[_0xadad('0xf')]);router['put'](_0xadad('0x10'),controller[_0xadad('0x11')]);router[_0xadad('0x12')](_0xadad('0x13'),auth[_0xadad('0x8')](),controller[_0xadad('0x14')]);router['put'](_0xadad('0x15'),auth[_0xadad('0x8')](),controller[_0xadad('0x16')]);router[_0xadad('0x17')](_0xadad('0x10'),auth[_0xadad('0x8')](),controller[_0xadad('0x18')]);module[_0xadad('0x19')]=router;
\ No newline at end of file
+var _0x47f1=['path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','/:id','show','post','tracked','create','put','update','/:id/accept','accept','reject','delete','destroy','exports','multer','util'];(function(_0x12a538,_0x121edb){var _0x11464d=function(_0x14287d){while(--_0x14287d){_0x12a538['push'](_0x12a538['shift']());}};_0x11464d(++_0x121edb);}(_0x47f1,0xa6));var _0x147f=function(_0x4d9a83,_0x8f1d0b){_0x4d9a83=_0x4d9a83-0x0;var _0x167e7f=_0x47f1[_0x4d9a83];return _0x167e7f;};'use strict';var multer=require(_0x147f('0x0'));var util=require(_0x147f('0x1'));var path=require(_0x147f('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x147f('0x3')]();var auth=require(_0x147f('0x4'));var interaction=require(_0x147f('0x5'));var config=require(_0x147f('0x6'));var controller=require('./chatMessage.controller');router[_0x147f('0x7')]('/',auth[_0x147f('0x8')](),controller[_0x147f('0x9')]);router[_0x147f('0x7')](_0x147f('0xa'),auth[_0x147f('0x8')](),controller['describe']);router[_0x147f('0x7')](_0x147f('0xb'),auth['isAuthenticated'](),controller[_0x147f('0xc')]);router[_0x147f('0xd')]('/',auth[_0x147f('0x8')](),interaction[_0x147f('0xe')]('chat','chatmessage:create'),controller[_0x147f('0xf')]);router[_0x147f('0x10')](_0x147f('0xb'),controller[_0x147f('0x11')]);router['put'](_0x147f('0x12'),auth[_0x147f('0x8')](),controller[_0x147f('0x13')]);router[_0x147f('0x10')]('/:id/reject',auth[_0x147f('0x8')](),controller[_0x147f('0x14')]);router[_0x147f('0x15')](_0x147f('0xb'),auth[_0x147f('0x8')](),controller[_0x147f('0x16')]);module[_0x147f('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
index d4c495e..cb7bda8 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x48e0=['TEXT','medium','exports'];(function(_0x33aeac,_0xc2f39e){var _0x153df9=function(_0x21c47e){while(--_0x21c47e){_0x33aeac['push'](_0x33aeac['shift']());}};_0x153df9(++_0xc2f39e);}(_0x48e0,0x146));var _0x048e=function(_0x14774d,_0x38d99f){_0x14774d=_0x14774d-0x0;var _0x617dc=_0x48e0[_0x14774d];return _0x617dc;};'use strict';var Sequelize=require('sequelize');module[_0x048e('0x0')]={'body':{'type':Sequelize[_0x048e('0x1')](_0x048e('0x2')),'allowNull':![]}};
\ No newline at end of file
+var _0xe10b=['TEXT','medium'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xe10b,0x98));var _0xbe10=function(_0x2432fc,_0xb7f1fe){_0x2432fc=_0x2432fc-0x0;var _0x994c53=_0xe10b[_0x2432fc];return _0x994c53;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize[_0xbe10('0x0')](_0xbe10('0x1')),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
index fd224a9..95291a7 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd757=['hasOwnProperty','nolimit','order','sort','where','filters','pick','merge','type','key','VIRTUAL','field','filter','ChatOfflineMessage','count','includeAll','include','findAll','rows','catch','show','params','length','options','find','create','body','update','describe','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','limit','set','Content-Range','apply','save','then','destroy','error','stack','name','index','rawAttributes','model','keys','query','intersection','attributes','fields'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0xd757,0x1e5));var _0x7d75=function(_0x1d4473,_0x3fb3d4){_0x1d4473=_0x1d4473-0x0;var _0x2bee03=_0xd757[_0x1d4473];return _0x2bee03;};'use strict';var pdf=require(_0x7d75('0x0'));var emlformat=require(_0x7d75('0x1'));var rimraf=require(_0x7d75('0x2'));var zipdir=require(_0x7d75('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x7d75('0x4'));var BPromise=require(_0x7d75('0x5'));var Mustache=require('mustache');var util=require(_0x7d75('0x6'));var path=require(_0x7d75('0x7'));var sox=require(_0x7d75('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x7d75('0x9'));var squel=require(_0x7d75('0xa'));var crypto=require(_0x7d75('0xb'));var jsforce=require(_0x7d75('0xc'));var deskjs=require(_0x7d75('0xd'));var toCsv=require(_0x7d75('0xe'));var querystring=require(_0x7d75('0xf'));var Papa=require(_0x7d75('0x10'));var Redis=require(_0x7d75('0x11'));var authService=require(_0x7d75('0x12'));var qs=require(_0x7d75('0x13'));var hardwareService=require(_0x7d75('0x14'));var logger=require(_0x7d75('0x15'))('api');var utils=require('../../config/utils');var config=require(_0x7d75('0x16'));var db=require(_0x7d75('0x17'))['db'];function respondWithStatusCode(_0x469592,_0x5ef6cf){_0x5ef6cf=_0x5ef6cf||0xcc;return function(_0x3e7b97){if(_0x3e7b97){return _0x469592[_0x7d75('0x18')](_0x5ef6cf);}return _0x469592['status'](_0x5ef6cf)[_0x7d75('0x19')]();};}function respondWithResult(_0x9c1a45,_0x40bb31){_0x40bb31=_0x40bb31||0xc8;return function(_0x43e546){if(_0x43e546){return _0x9c1a45[_0x7d75('0x1a')](_0x40bb31)[_0x7d75('0x1b')](_0x43e546);}};}function respondWithFilteredResult(_0x4b4994,_0x8d8bb8){return function(_0x1a460b){if(_0x1a460b){var _0x14100f=_0x1a460b['count'],_0x1a9778=_0x8d8bb8[_0x7d75('0x1c')],_0x44041e=_0x8d8bb8['offset']+_0x8d8bb8[_0x7d75('0x1d')],_0x859c4;if(_0x44041e>=_0x14100f){_0x44041e=_0x14100f;_0x859c4=0xc8;}else{_0x859c4=0xce;}_0x4b4994[_0x7d75('0x1a')](_0x859c4);return _0x4b4994[_0x7d75('0x1e')](_0x7d75('0x1f'),_0x1a9778+'-'+_0x44041e+'/'+_0x14100f)[_0x7d75('0x1b')](_0x1a460b);}return null;};}function patchUpdates(_0x12295a){return function(_0x17a61c){try{jsonpatch[_0x7d75('0x20')](_0x17a61c,_0x12295a,!![]);}catch(_0x55b89d){return BPromise['reject'](_0x55b89d);}return _0x17a61c[_0x7d75('0x21')]();};}function saveUpdates(_0x208d59,_0x404257){return function(_0xbb0322){if(_0xbb0322){return _0xbb0322['update'](_0x208d59)[_0x7d75('0x22')](function(_0x31bfa8){return _0x31bfa8;});}return null;};}function removeEntity(_0x103056,_0x3b10c2){return function(_0x232c46){if(_0x232c46){return _0x232c46[_0x7d75('0x23')]()[_0x7d75('0x22')](function(){_0x103056[_0x7d75('0x1a')](0xcc)[_0x7d75('0x19')]();});}};}function handleEntityNotFound(_0x1c0327,_0x3be591){return function(_0x21211b){if(!_0x21211b){_0x1c0327[_0x7d75('0x18')](0x194);}return _0x21211b;};}function handleError(_0x9a831b,_0x1e32d6){_0x1e32d6=_0x1e32d6||0x1f4;return function(_0x338e26){logger[_0x7d75('0x24')](_0x338e26[_0x7d75('0x25')]);if(_0x338e26['name']){delete _0x338e26[_0x7d75('0x26')];}_0x9a831b[_0x7d75('0x1a')](_0x1e32d6)['send'](_0x338e26);};}exports[_0x7d75('0x27')]=function(_0x50d798,_0x3849c3){var _0x37456d={},_0x17d83a={},_0xe66bff={'count':0x0,'rows':[]};var _0x447969=db['ChatOfflineMessage'][_0x7d75('0x28')];_0x17d83a[_0x7d75('0x29')]=_[_0x7d75('0x2a')](_0x447969);_0x17d83a[_0x7d75('0x2b')]=_[_0x7d75('0x2a')](_0x50d798[_0x7d75('0x2b')]);_0x17d83a['filters']=_[_0x7d75('0x2c')](_0x17d83a[_0x7d75('0x29')],_0x17d83a[_0x7d75('0x2b')]);_0x37456d[_0x7d75('0x2d')]=_[_0x7d75('0x2c')](_0x17d83a[_0x7d75('0x29')],qs[_0x7d75('0x2e')](_0x50d798['query']['fields']));_0x37456d['attributes']=_0x37456d[_0x7d75('0x2d')]['length']?_0x37456d[_0x7d75('0x2d')]:_0x17d83a[_0x7d75('0x29')];if(!_0x50d798[_0x7d75('0x2b')][_0x7d75('0x2f')](_0x7d75('0x30'))){_0x37456d['limit']=qs[_0x7d75('0x1d')](_0x50d798[_0x7d75('0x2b')][_0x7d75('0x1d')]);_0x37456d[_0x7d75('0x1c')]=qs[_0x7d75('0x1c')](_0x50d798[_0x7d75('0x2b')][_0x7d75('0x1c')]);}_0x37456d[_0x7d75('0x31')]=qs[_0x7d75('0x32')](_0x50d798[_0x7d75('0x2b')]['sort']);_0x37456d[_0x7d75('0x33')]=qs[_0x7d75('0x34')](_[_0x7d75('0x35')](_0x50d798[_0x7d75('0x2b')],_0x17d83a[_0x7d75('0x34')]));if(_0x50d798[_0x7d75('0x2b')]['filter']){_0x37456d[_0x7d75('0x33')]=_[_0x7d75('0x36')](_0x37456d['where'],{'$or':_['map'](_0x447969,function(_0x446d9b){if(_0x446d9b[_0x7d75('0x37')][_0x7d75('0x38')]!==_0x7d75('0x39')){var _0x8db489={};_0x8db489[_0x446d9b[_0x7d75('0x3a')]]={'$like':'%'+_0x50d798['query'][_0x7d75('0x3b')]+'%'};return _0x8db489;}})});}_0x37456d=_[_0x7d75('0x36')]({},_0x37456d,_0x50d798['options']);var _0x18e737={'where':_0x37456d[_0x7d75('0x33')]};return db[_0x7d75('0x3c')][_0x7d75('0x3d')](_0x18e737)[_0x7d75('0x22')](function(_0x25d38c){_0xe66bff[_0x7d75('0x3d')]=_0x25d38c;if(_0x50d798[_0x7d75('0x2b')][_0x7d75('0x3e')]){_0x37456d[_0x7d75('0x3f')]=[{'all':!![]}];}return db[_0x7d75('0x3c')][_0x7d75('0x40')](_0x37456d);})[_0x7d75('0x22')](function(_0x35ac15){_0xe66bff[_0x7d75('0x41')]=_0x35ac15;return _0xe66bff;})[_0x7d75('0x22')](respondWithFilteredResult(_0x3849c3,_0x37456d))[_0x7d75('0x42')](handleError(_0x3849c3,null));};exports[_0x7d75('0x43')]=function(_0x304c32,_0x326383){var _0x4e19e4={'raw':!![],'where':{'id':_0x304c32[_0x7d75('0x44')]['id']}},_0x575224={};_0x575224[_0x7d75('0x29')]=_[_0x7d75('0x2a')](db[_0x7d75('0x3c')][_0x7d75('0x28')]);_0x575224[_0x7d75('0x2b')]=_[_0x7d75('0x2a')](_0x304c32['query']);_0x575224[_0x7d75('0x34')]=_[_0x7d75('0x2c')](_0x575224[_0x7d75('0x29')],_0x575224['query']);_0x4e19e4[_0x7d75('0x2d')]=_[_0x7d75('0x2c')](_0x575224[_0x7d75('0x29')],qs[_0x7d75('0x2e')](_0x304c32[_0x7d75('0x2b')][_0x7d75('0x2e')]));_0x4e19e4[_0x7d75('0x2d')]=_0x4e19e4[_0x7d75('0x2d')][_0x7d75('0x45')]?_0x4e19e4[_0x7d75('0x2d')]:_0x575224[_0x7d75('0x29')];if(_0x304c32['query'][_0x7d75('0x3e')]){_0x4e19e4['include']=[{'all':!![]}];}_0x4e19e4=_['merge']({},_0x4e19e4,_0x304c32[_0x7d75('0x46')]);return db['ChatOfflineMessage'][_0x7d75('0x47')](_0x4e19e4)[_0x7d75('0x22')](handleEntityNotFound(_0x326383,null))['then'](respondWithResult(_0x326383,null))[_0x7d75('0x42')](handleError(_0x326383,null));};exports[_0x7d75('0x48')]=function(_0x27f0c7,_0x1db74e){return db[_0x7d75('0x3c')][_0x7d75('0x48')](_0x27f0c7[_0x7d75('0x49')],{})[_0x7d75('0x22')](respondWithResult(_0x1db74e,0xc9))['catch'](handleError(_0x1db74e,null));};exports[_0x7d75('0x4a')]=function(_0x2564ba,_0x14869d){if(_0x2564ba['body']['id']){delete _0x2564ba[_0x7d75('0x49')]['id'];}return db[_0x7d75('0x3c')][_0x7d75('0x47')]({'where':{'id':_0x2564ba[_0x7d75('0x44')]['id']}})[_0x7d75('0x22')](handleEntityNotFound(_0x14869d,null))[_0x7d75('0x22')](saveUpdates(_0x2564ba['body'],null))[_0x7d75('0x22')](respondWithResult(_0x14869d,null))[_0x7d75('0x42')](handleError(_0x14869d,null));};exports[_0x7d75('0x23')]=function(_0x31b9be,_0x4cb900){return db[_0x7d75('0x3c')]['find']({'where':{'id':_0x31b9be[_0x7d75('0x44')]['id']}})[_0x7d75('0x22')](handleEntityNotFound(_0x4cb900,null))[_0x7d75('0x22')](removeEntity(_0x4cb900,null))['catch'](handleError(_0x4cb900,null));};exports[_0x7d75('0x4b')]=function(_0x5542e4,_0x21a4d1){return db['ChatOfflineMessage'][_0x7d75('0x4b')]()[_0x7d75('0x22')](respondWithResult(_0x21a4d1,null))[_0x7d75('0x42')](handleError(_0x21a4d1,null));};
\ No newline at end of file
+var _0xe3d4=['desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','apply','reject','save','update','destroy','then','error','stack','name','index','rawAttributes','model','keys','query','attributes','fields','hasOwnProperty','limit','order','sort','where','filters','pick','filter','merge','map','type','key','VIRTUAL','options','ChatOfflineMessage','includeAll','include','rows','catch','show','params','intersection','find','create','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','path','sox','ejs','lodash','crypto','jsforce'];(function(_0x573010,_0x2923c4){var _0x84c43d=function(_0x22c44d){while(--_0x22c44d){_0x573010['push'](_0x573010['shift']());}};_0x84c43d(++_0x2923c4);}(_0xe3d4,0xc6));var _0x4e3d=function(_0x2a3c4d,_0x9c6b37){_0x2a3c4d=_0x2a3c4d-0x0;var _0x55c390=_0xe3d4[_0x2a3c4d];return _0x55c390;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x4e3d('0x0'));var rimraf=require(_0x4e3d('0x1'));var zipdir=require(_0x4e3d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4e3d('0x3'));var moment=require(_0x4e3d('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x4e3d('0x5'));var util=require('util');var path=require(_0x4e3d('0x6'));var sox=require(_0x4e3d('0x7'));var csv=require('to-csv');var ejs=require(_0x4e3d('0x8'));var fs=require('fs');var _=require(_0x4e3d('0x9'));var squel=require('squel');var crypto=require(_0x4e3d('0xa'));var jsforce=require(_0x4e3d('0xb'));var deskjs=require(_0x4e3d('0xc'));var toCsv=require(_0x4e3d('0xd'));var querystring=require(_0x4e3d('0xe'));var Papa=require(_0x4e3d('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x4e3d('0x10'));var hardwareService=require(_0x4e3d('0x11'));var logger=require(_0x4e3d('0x12'))(_0x4e3d('0x13'));var utils=require(_0x4e3d('0x14'));var config=require(_0x4e3d('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x8841bb,_0x46d51d){_0x46d51d=_0x46d51d||0xcc;return function(_0x2fc5f6){if(_0x2fc5f6){return _0x8841bb[_0x4e3d('0x16')](_0x46d51d);}return _0x8841bb[_0x4e3d('0x17')](_0x46d51d)[_0x4e3d('0x18')]();};}function respondWithResult(_0x220884,_0x37ac10){_0x37ac10=_0x37ac10||0xc8;return function(_0x54debc){if(_0x54debc){return _0x220884[_0x4e3d('0x17')](_0x37ac10)[_0x4e3d('0x19')](_0x54debc);}};}function respondWithFilteredResult(_0x3b7b45,_0x5e0d2c){return function(_0x3708be){if(_0x3708be){var _0x438973=_0x3708be[_0x4e3d('0x1a')],_0x46bf2b=_0x5e0d2c[_0x4e3d('0x1b')],_0xc20768=_0x5e0d2c[_0x4e3d('0x1b')]+_0x5e0d2c['limit'],_0x1b829e;if(_0xc20768>=_0x438973){_0xc20768=_0x438973;_0x1b829e=0xc8;}else{_0x1b829e=0xce;}_0x3b7b45[_0x4e3d('0x17')](_0x1b829e);return _0x3b7b45['set']('Content-Range',_0x46bf2b+'-'+_0xc20768+'/'+_0x438973)[_0x4e3d('0x19')](_0x3708be);}return null;};}function patchUpdates(_0x493949){return function(_0x5a2389){try{jsonpatch[_0x4e3d('0x1c')](_0x5a2389,_0x493949,!![]);}catch(_0x2e37ad){return BPromise[_0x4e3d('0x1d')](_0x2e37ad);}return _0x5a2389[_0x4e3d('0x1e')]();};}function saveUpdates(_0x4c4d76,_0x35d75c){return function(_0x552ca7){if(_0x552ca7){return _0x552ca7[_0x4e3d('0x1f')](_0x4c4d76)['then'](function(_0x170f88){return _0x170f88;});}return null;};}function removeEntity(_0x39a112,_0x3c385c){return function(_0x534185){if(_0x534185){return _0x534185[_0x4e3d('0x20')]()[_0x4e3d('0x21')](function(){_0x39a112['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x18271a,_0x7a0b3c){return function(_0x35a31b){if(!_0x35a31b){_0x18271a[_0x4e3d('0x16')](0x194);}return _0x35a31b;};}function handleError(_0x3e6b53,_0x58a9cb){_0x58a9cb=_0x58a9cb||0x1f4;return function(_0xcec7a6){logger[_0x4e3d('0x22')](_0xcec7a6[_0x4e3d('0x23')]);if(_0xcec7a6['name']){delete _0xcec7a6[_0x4e3d('0x24')];}_0x3e6b53[_0x4e3d('0x17')](_0x58a9cb)['send'](_0xcec7a6);};}exports[_0x4e3d('0x25')]=function(_0x21d7e4,_0x3dbe0c){var _0x4a7820={},_0x727783={},_0x56395b={'count':0x0,'rows':[]};var _0x13fa95=db['ChatOfflineMessage'][_0x4e3d('0x26')];_0x727783[_0x4e3d('0x27')]=_[_0x4e3d('0x28')](_0x13fa95);_0x727783['query']=_[_0x4e3d('0x28')](_0x21d7e4[_0x4e3d('0x29')]);_0x727783['filters']=_['intersection'](_0x727783[_0x4e3d('0x27')],_0x727783[_0x4e3d('0x29')]);_0x4a7820[_0x4e3d('0x2a')]=_['intersection'](_0x727783[_0x4e3d('0x27')],qs[_0x4e3d('0x2b')](_0x21d7e4['query']['fields']));_0x4a7820[_0x4e3d('0x2a')]=_0x4a7820[_0x4e3d('0x2a')]['length']?_0x4a7820[_0x4e3d('0x2a')]:_0x727783['model'];if(!_0x21d7e4[_0x4e3d('0x29')][_0x4e3d('0x2c')]('nolimit')){_0x4a7820[_0x4e3d('0x2d')]=qs[_0x4e3d('0x2d')](_0x21d7e4[_0x4e3d('0x29')]['limit']);_0x4a7820[_0x4e3d('0x1b')]=qs[_0x4e3d('0x1b')](_0x21d7e4['query'][_0x4e3d('0x1b')]);}_0x4a7820[_0x4e3d('0x2e')]=qs['sort'](_0x21d7e4[_0x4e3d('0x29')][_0x4e3d('0x2f')]);_0x4a7820[_0x4e3d('0x30')]=qs[_0x4e3d('0x31')](_[_0x4e3d('0x32')](_0x21d7e4[_0x4e3d('0x29')],_0x727783[_0x4e3d('0x31')]));if(_0x21d7e4[_0x4e3d('0x29')][_0x4e3d('0x33')]){_0x4a7820[_0x4e3d('0x30')]=_[_0x4e3d('0x34')](_0x4a7820['where'],{'$or':_[_0x4e3d('0x35')](_0x13fa95,function(_0x3c16a2){if(_0x3c16a2[_0x4e3d('0x36')][_0x4e3d('0x37')]!==_0x4e3d('0x38')){var _0xcd3499={};_0xcd3499[_0x3c16a2['field']]={'$like':'%'+_0x21d7e4[_0x4e3d('0x29')][_0x4e3d('0x33')]+'%'};return _0xcd3499;}})});}_0x4a7820=_[_0x4e3d('0x34')]({},_0x4a7820,_0x21d7e4[_0x4e3d('0x39')]);var _0x36f4eb={'where':_0x4a7820[_0x4e3d('0x30')]};return db[_0x4e3d('0x3a')][_0x4e3d('0x1a')](_0x36f4eb)[_0x4e3d('0x21')](function(_0x32d986){_0x56395b[_0x4e3d('0x1a')]=_0x32d986;if(_0x21d7e4[_0x4e3d('0x29')][_0x4e3d('0x3b')]){_0x4a7820[_0x4e3d('0x3c')]=[{'all':!![]}];}return db[_0x4e3d('0x3a')]['findAll'](_0x4a7820);})[_0x4e3d('0x21')](function(_0x4e8745){_0x56395b[_0x4e3d('0x3d')]=_0x4e8745;return _0x56395b;})[_0x4e3d('0x21')](respondWithFilteredResult(_0x3dbe0c,_0x4a7820))[_0x4e3d('0x3e')](handleError(_0x3dbe0c,null));};exports[_0x4e3d('0x3f')]=function(_0x279e69,_0x8bbc10){var _0x501d59={'raw':!![],'where':{'id':_0x279e69[_0x4e3d('0x40')]['id']}},_0x2c9f5b={};_0x2c9f5b[_0x4e3d('0x27')]=_[_0x4e3d('0x28')](db[_0x4e3d('0x3a')]['rawAttributes']);_0x2c9f5b['query']=_[_0x4e3d('0x28')](_0x279e69[_0x4e3d('0x29')]);_0x2c9f5b[_0x4e3d('0x31')]=_['intersection'](_0x2c9f5b[_0x4e3d('0x27')],_0x2c9f5b[_0x4e3d('0x29')]);_0x501d59['attributes']=_[_0x4e3d('0x41')](_0x2c9f5b['model'],qs[_0x4e3d('0x2b')](_0x279e69[_0x4e3d('0x29')][_0x4e3d('0x2b')]));_0x501d59['attributes']=_0x501d59[_0x4e3d('0x2a')]['length']?_0x501d59[_0x4e3d('0x2a')]:_0x2c9f5b[_0x4e3d('0x27')];if(_0x279e69[_0x4e3d('0x29')]['includeAll']){_0x501d59[_0x4e3d('0x3c')]=[{'all':!![]}];}_0x501d59=_[_0x4e3d('0x34')]({},_0x501d59,_0x279e69[_0x4e3d('0x39')]);return db[_0x4e3d('0x3a')][_0x4e3d('0x42')](_0x501d59)[_0x4e3d('0x21')](handleEntityNotFound(_0x8bbc10,null))[_0x4e3d('0x21')](respondWithResult(_0x8bbc10,null))[_0x4e3d('0x3e')](handleError(_0x8bbc10,null));};exports[_0x4e3d('0x43')]=function(_0x454a6f,_0x5430e5){return db[_0x4e3d('0x3a')][_0x4e3d('0x43')](_0x454a6f[_0x4e3d('0x44')],{})[_0x4e3d('0x21')](respondWithResult(_0x5430e5,0xc9))[_0x4e3d('0x3e')](handleError(_0x5430e5,null));};exports[_0x4e3d('0x1f')]=function(_0x1cb9c,_0x2ed596){if(_0x1cb9c[_0x4e3d('0x44')]['id']){delete _0x1cb9c[_0x4e3d('0x44')]['id'];}return db[_0x4e3d('0x3a')][_0x4e3d('0x42')]({'where':{'id':_0x1cb9c['params']['id']}})['then'](handleEntityNotFound(_0x2ed596,null))[_0x4e3d('0x21')](saveUpdates(_0x1cb9c['body'],null))[_0x4e3d('0x21')](respondWithResult(_0x2ed596,null))[_0x4e3d('0x3e')](handleError(_0x2ed596,null));};exports[_0x4e3d('0x20')]=function(_0x229b3f,_0x403fa7){return db['ChatOfflineMessage'][_0x4e3d('0x42')]({'where':{'id':_0x229b3f[_0x4e3d('0x40')]['id']}})['then'](handleEntityNotFound(_0x403fa7,null))['then'](removeEntity(_0x403fa7,null))['catch'](handleError(_0x403fa7,null));};exports['describe']=function(_0x393854,_0xba207d){return db[_0x4e3d('0x3a')][_0x4e3d('0x45')]()[_0x4e3d('0x21')](respondWithResult(_0xba207d,null))[_0x4e3d('0x3e')](handleError(_0xba207d,null));};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
index 0f0dd79..4968ea4 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.model.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x85d7=['path','rimraf','../../config/environment','exports','define','ChatOfflineMessage','chat_offline_messages','lodash','util','api','moment','request-promise'];(function(_0x48068b,_0x74ebac){var _0x2c09d8=function(_0x45a2a4){while(--_0x45a2a4){_0x48068b['push'](_0x48068b['shift']());}};_0x2c09d8(++_0x74ebac);}(_0x85d7,0x11b));var _0x785d=function(_0x1c8fb1,_0xb39e81){_0x1c8fb1=_0x1c8fb1-0x0;var _0x57f8e8=_0x85d7[_0x1c8fb1];return _0x57f8e8;};'use strict';var _=require(_0x785d('0x0'));var util=require(_0x785d('0x1'));var logger=require('../../config/logger')(_0x785d('0x2'));var moment=require(_0x785d('0x3'));var BPromise=require('bluebird');var rp=require(_0x785d('0x4'));var fs=require('fs');var path=require(_0x785d('0x5'));var rimraf=require(_0x785d('0x6'));var config=require(_0x785d('0x7'));var attributes=require('./chatOfflineMessage.attributes');module[_0x785d('0x8')]=function(_0x2608d5,_0x5c58b7){return _0x2608d5[_0x785d('0x9')](_0x785d('0xa'),attributes,{'tableName':_0x785d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xe1a9=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatOfflineMessage.attributes','exports','define','ChatOfflineMessage','chat_offline_messages','utf8mb4','utf8mb4_unicode_ci','lodash','util'];(function(_0x6bbc35,_0x336ae7){var _0x5959ef=function(_0x37d8de){while(--_0x37d8de){_0x6bbc35['push'](_0x6bbc35['shift']());}};_0x5959ef(++_0x336ae7);}(_0xe1a9,0x1ee));var _0x9e1a=function(_0x55123c,_0x548b66){_0x55123c=_0x55123c-0x0;var _0x18aec8=_0xe1a9[_0x55123c];return _0x18aec8;};'use strict';var _=require(_0x9e1a('0x0'));var util=require(_0x9e1a('0x1'));var logger=require('../../config/logger')(_0x9e1a('0x2'));var moment=require(_0x9e1a('0x3'));var BPromise=require(_0x9e1a('0x4'));var rp=require(_0x9e1a('0x5'));var fs=require('fs');var path=require(_0x9e1a('0x6'));var rimraf=require(_0x9e1a('0x7'));var config=require(_0x9e1a('0x8'));var attributes=require(_0x9e1a('0x9'));module[_0x9e1a('0xa')]=function(_0x501044,_0x1939ed){return _0x501044[_0x9e1a('0xb')](_0x9e1a('0xc'),attributes,{'tableName':_0x9e1a('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x9e1a('0xe'),'collate':_0x9e1a('0xf')});};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
index 61e2f6e..30035ee 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x056a=['stringify','error','message','info','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','ChatOfflineMessage,\x20%s,\x20%s','ChatOfflineMessage,\x20%s,\x20%s,\x20%s'];(function(_0x2b3ddc,_0x19a52d){var _0x5a71ec=function(_0x50b962){while(--_0x50b962){_0x2b3ddc['push'](_0x2b3ddc['shift']());}};_0x5a71ec(++_0x19a52d);}(_0x056a,0x195));var _0xa056=function(_0x45d676,_0x1dd8ad){_0x45d676=_0x45d676-0x0;var _0x4bd5c1=_0x056a[_0x45d676];return _0x4bd5c1;};'use strict';var _=require(_0xa056('0x0'));var util=require('util');var moment=require(_0xa056('0x1'));var BPromise=require(_0xa056('0x2'));var rs=require(_0xa056('0x3'));var fs=require('fs');var Redis=require(_0xa056('0x4'));var db=require(_0xa056('0x5'))['db'];var utils=require(_0xa056('0x6'));var logger=require('../../config/logger')(_0xa056('0x7'));var config=require(_0xa056('0x8'));var jayson=require(_0xa056('0x9'));var client=jayson[_0xa056('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4309a1,_0x19b264,_0x44e831){return new BPromise(function(_0x25f2bc,_0x8fefb7){return client[_0xa056('0xb')](_0x4309a1,_0x44e831)[_0xa056('0xc')](function(_0x1e2054){logger['info'](_0xa056('0xd'),_0x19b264,'request\x20sent');logger['debug'](_0xa056('0xe'),_0x19b264,'request\x20sent',JSON[_0xa056('0xf')](_0x1e2054));if(_0x1e2054[_0xa056('0x10')]){if(_0x1e2054[_0xa056('0x10')]['code']===0x1f4){logger[_0xa056('0x10')](_0xa056('0xd'),_0x19b264,_0x1e2054['error'][_0xa056('0x11')]);return _0x8fefb7(_0x1e2054[_0xa056('0x10')]['message']);}logger[_0xa056('0x10')](_0xa056('0xd'),_0x19b264,_0x1e2054[_0xa056('0x10')][_0xa056('0x11')]);return _0x25f2bc(_0x1e2054[_0xa056('0x10')]['message']);}else{logger[_0xa056('0x12')](_0xa056('0xd'),_0x19b264,'request\x20sent');_0x25f2bc(_0x1e2054[_0xa056('0x13')][_0xa056('0x11')]);}})[_0xa056('0x14')](function(_0x3f163e){logger[_0xa056('0x10')](_0xa056('0xd'),_0x19b264,_0x3f163e);_0x8fefb7(_0x3f163e);});});}
\ No newline at end of file
+var _0x868f=['request\x20sent','error','message','result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s'];(function(_0x433194,_0x44240a){var _0xc2fac4=function(_0x744f93){while(--_0x744f93){_0x433194['push'](_0x433194['shift']());}};_0xc2fac4(++_0x44240a);}(_0x868f,0x144));var _0xf868=function(_0x5c1423,_0x12aa23){_0x5c1423=_0x5c1423-0x0;var _0x2e95d2=_0x868f[_0x5c1423];return _0x2e95d2;};'use strict';var _=require(_0xf868('0x0'));var util=require('util');var moment=require(_0xf868('0x1'));var BPromise=require(_0xf868('0x2'));var rs=require(_0xf868('0x3'));var fs=require('fs');var Redis=require(_0xf868('0x4'));var db=require(_0xf868('0x5'))['db'];var utils=require(_0xf868('0x6'));var logger=require('../../config/logger')(_0xf868('0x7'));var config=require(_0xf868('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xf868('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0xd78516,_0x137fc0,_0x5ba1db){return new BPromise(function(_0x43a37f,_0xe0e3c3){return client[_0xf868('0xa')](_0xd78516,_0x5ba1db)[_0xf868('0xb')](function(_0x544285){logger[_0xf868('0xc')](_0xf868('0xd'),_0x137fc0,'request\x20sent');logger[_0xf868('0xe')](_0xf868('0xf'),_0x137fc0,_0xf868('0x10'),JSON['stringify'](_0x544285));if(_0x544285[_0xf868('0x11')]){if(_0x544285[_0xf868('0x11')]['code']===0x1f4){logger[_0xf868('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x137fc0,_0x544285[_0xf868('0x11')][_0xf868('0x12')]);return _0xe0e3c3(_0x544285[_0xf868('0x11')][_0xf868('0x12')]);}logger[_0xf868('0x11')](_0xf868('0xd'),_0x137fc0,_0x544285[_0xf868('0x11')][_0xf868('0x12')]);return _0x43a37f(_0x544285[_0xf868('0x11')][_0xf868('0x12')]);}else{logger['info']('ChatOfflineMessage,\x20%s,\x20%s',_0x137fc0,_0xf868('0x10'));_0x43a37f(_0x544285[_0xf868('0x13')][_0xf868('0x12')]);}})['catch'](function(_0x40e5df){logger[_0xf868('0x11')](_0xf868('0xd'),_0x137fc0,_0x40e5df);_0xe0e3c3(_0x40e5df);});});}
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js
index 9b2a2eb..4dd1674 100644
--- a/server/api/chatOfflineMessage/index.js
+++ b/server/api/chatOfflineMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb2b5=['isAuthenticated','/describe','/:id','show','post','create','put','update','exports','express','Router','../../config/environment','./chatOfflineMessage.controller','get'];(function(_0x2bd11a,_0x5d1c03){var _0x1e4e2a=function(_0x58d30b){while(--_0x58d30b){_0x2bd11a['push'](_0x2bd11a['shift']());}};_0x1e4e2a(++_0x5d1c03);}(_0xb2b5,0xa3));var _0x5b2b=function(_0x5608a3,_0x5b33c5){_0x5608a3=_0x5608a3-0x0;var _0x1ed50a=_0xb2b5[_0x5608a3];return _0x1ed50a;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x5b2b('0x0'));var router=express[_0x5b2b('0x1')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x5b2b('0x2'));var controller=require(_0x5b2b('0x3'));router[_0x5b2b('0x4')]('/',auth[_0x5b2b('0x5')](),controller['index']);router[_0x5b2b('0x4')](_0x5b2b('0x6'),auth['isAuthenticated'](),controller['describe']);router[_0x5b2b('0x4')](_0x5b2b('0x7'),auth[_0x5b2b('0x5')](),controller[_0x5b2b('0x8')]);router[_0x5b2b('0x9')]('/',auth[_0x5b2b('0x5')](),controller[_0x5b2b('0xa')]);router[_0x5b2b('0xb')]('/:id',auth[_0x5b2b('0x5')](),controller[_0x5b2b('0xc')]);router['delete'](_0x5b2b('0x7'),auth[_0x5b2b('0x5')](),controller['destroy']);module[_0x5b2b('0xd')]=router;
\ No newline at end of file
+var _0xbf1a=['path','connect-timeout','express','../../components/auth/service','../../config/environment','./chatOfflineMessage.controller','get','isAuthenticated','describe','/:id','show','create','put','update','destroy','exports','multer','util'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xbf1a,0x7c));var _0xabf1=function(_0x37d8af,_0x36d381){_0x37d8af=_0x37d8af-0x0;var _0x3f36f9=_0xbf1a[_0x37d8af];return _0x3f36f9;};'use strict';var multer=require(_0xabf1('0x0'));var util=require(_0xabf1('0x1'));var path=require(_0xabf1('0x2'));var timeout=require(_0xabf1('0x3'));var express=require(_0xabf1('0x4'));var router=express['Router']();var auth=require(_0xabf1('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xabf1('0x6'));var controller=require(_0xabf1('0x7'));router[_0xabf1('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xabf1('0x8')]('/describe',auth[_0xabf1('0x9')](),controller[_0xabf1('0xa')]);router[_0xabf1('0x8')](_0xabf1('0xb'),auth[_0xabf1('0x9')](),controller[_0xabf1('0xc')]);router['post']('/',auth[_0xabf1('0x9')](),controller[_0xabf1('0xd')]);router[_0xabf1('0xe')](_0xabf1('0xb'),auth[_0xabf1('0x9')](),controller[_0xabf1('0xf')]);router['delete'](_0xabf1('0xb'),auth[_0xabf1('0x9')](),controller[_0xabf1('0x10')]);module[_0xabf1('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
index 0eff8ea..2db0d08 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.attributes.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ab5=['INTEGER','STRING','ENUM','mouseOver','timeout'];(function(_0x582c4f,_0x22b05b){var _0x18ce48=function(_0x33c73e){while(--_0x33c73e){_0x582c4f['push'](_0x582c4f['shift']());}};_0x18ce48(++_0x22b05b);}(_0x9ab5,0x79));var _0x59ab=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x9ab5[_0x2d7f0e];return _0x110b07;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x59ab('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0x59ab('0x1')](_0x59ab('0x2'),_0x59ab('0x3')),'defaultValue':'mouseOver'},'selector':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x59ab('0x4')]}};
\ No newline at end of file
+var _0x9ccf=['INTEGER','sequelize','STRING','ENUM','mouseOver'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x9ccf,0x10f));var _0xf9cc=function(_0x380e75,_0x486360){_0x380e75=_0x380e75-0x0;var _0x444d96=_0x9ccf[_0x380e75];return _0x444d96;};'use strict';var Sequelize=require(_0xf9cc('0x0'));module['exports']={'name':{'type':Sequelize[_0xf9cc('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0xf9cc('0x2')](_0xf9cc('0x3'),'timeout'),'defaultValue':_0xf9cc('0x3')},'selector':{'type':Sequelize[_0xf9cc('0x1')]},'timeout':{'type':Sequelize[_0xf9cc('0x4')]}};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js
index 7d89b59..d7b5180 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.controller.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1b83=['status','end','json','offset','limit','set','apply','update','then','sendStatus','error','stack','name','send','show','params','model','rawAttributes','query','keys','filters','intersection','attributes','length','include','options','ChatProactiveAction','catch','create','body','destroy','find','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment'];(function(_0x464846,_0x3f5a5d){var _0x5a3b2f=function(_0x148667){while(--_0x148667){_0x464846['push'](_0x464846['shift']());}};_0x5a3b2f(++_0x3f5a5d);}(_0x1b83,0xf8));var _0x31b8=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x1b83[_0x502c7d];return _0x30b7ed;};'use strict';var pdf=require(_0x31b8('0x0'));var emlformat=require(_0x31b8('0x1'));var rimraf=require(_0x31b8('0x2'));var zipdir=require(_0x31b8('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x31b8('0x4'));var BPromise=require(_0x31b8('0x5'));var Mustache=require(_0x31b8('0x6'));var util=require(_0x31b8('0x7'));var path=require(_0x31b8('0x8'));var sox=require(_0x31b8('0x9'));var csv=require(_0x31b8('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x31b8('0xb'));var squel=require('squel');var crypto=require(_0x31b8('0xc'));var jsforce=require(_0x31b8('0xd'));var deskjs=require(_0x31b8('0xe'));var toCsv=require(_0x31b8('0xa'));var querystring=require(_0x31b8('0xf'));var Papa=require(_0x31b8('0x10'));var Redis=require('ioredis');var authService=require(_0x31b8('0x11'));var qs=require(_0x31b8('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x31b8('0x13'))(_0x31b8('0x14'));var utils=require('../../config/utils');var config=require(_0x31b8('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x220bdc,_0x5b8d1d){_0x5b8d1d=_0x5b8d1d||0xcc;return function(_0x1c30d3){if(_0x1c30d3){return _0x220bdc['sendStatus'](_0x5b8d1d);}return _0x220bdc[_0x31b8('0x16')](_0x5b8d1d)[_0x31b8('0x17')]();};}function respondWithResult(_0x97b890,_0x2fb615){_0x2fb615=_0x2fb615||0xc8;return function(_0x3d2f12){if(_0x3d2f12){return _0x97b890['status'](_0x2fb615)[_0x31b8('0x18')](_0x3d2f12);}};}function respondWithFilteredResult(_0x54b925,_0x3015c4){return function(_0x26f8f0){if(_0x26f8f0){var _0x2a10f5=_0x26f8f0['count'],_0xdeac0=_0x3015c4['offset'],_0x2b77d5=_0x3015c4[_0x31b8('0x19')]+_0x3015c4[_0x31b8('0x1a')],_0x5c0cbf;if(_0x2b77d5>=_0x2a10f5){_0x2b77d5=_0x2a10f5;_0x5c0cbf=0xc8;}else{_0x5c0cbf=0xce;}_0x54b925[_0x31b8('0x16')](_0x5c0cbf);return _0x54b925[_0x31b8('0x1b')]('Content-Range',_0xdeac0+'-'+_0x2b77d5+'/'+_0x2a10f5)[_0x31b8('0x18')](_0x26f8f0);}return null;};}function patchUpdates(_0x2af7d4){return function(_0xb735db){try{jsonpatch[_0x31b8('0x1c')](_0xb735db,_0x2af7d4,!![]);}catch(_0x2a0759){return BPromise['reject'](_0x2a0759);}return _0xb735db['save']();};}function saveUpdates(_0x32a89d,_0x3a0757){return function(_0x10ba24){if(_0x10ba24){return _0x10ba24[_0x31b8('0x1d')](_0x32a89d)[_0x31b8('0x1e')](function(_0x4a3c0d){return _0x4a3c0d;});}return null;};}function removeEntity(_0x1f94ba,_0x484742){return function(_0x236b93){if(_0x236b93){return _0x236b93['destroy']()[_0x31b8('0x1e')](function(){_0x1f94ba[_0x31b8('0x16')](0xcc)[_0x31b8('0x17')]();});}};}function handleEntityNotFound(_0x1320bc,_0x504517){return function(_0x2abba4){if(!_0x2abba4){_0x1320bc[_0x31b8('0x1f')](0x194);}return _0x2abba4;};}function handleError(_0x22c2f4,_0x5955c0){_0x5955c0=_0x5955c0||0x1f4;return function(_0x5e67ee){logger[_0x31b8('0x20')](_0x5e67ee[_0x31b8('0x21')]);if(_0x5e67ee[_0x31b8('0x22')]){delete _0x5e67ee[_0x31b8('0x22')];}_0x22c2f4['status'](_0x5955c0)[_0x31b8('0x23')](_0x5e67ee);};}exports[_0x31b8('0x24')]=function(_0x298522,_0x23762d){var _0x535664={'raw':!![],'where':{'id':_0x298522[_0x31b8('0x25')]['id']}},_0x36c13b={};_0x36c13b[_0x31b8('0x26')]=_['keys'](db['ChatProactiveAction'][_0x31b8('0x27')]);_0x36c13b[_0x31b8('0x28')]=_[_0x31b8('0x29')](_0x298522[_0x31b8('0x28')]);_0x36c13b[_0x31b8('0x2a')]=_[_0x31b8('0x2b')](_0x36c13b[_0x31b8('0x26')],_0x36c13b[_0x31b8('0x28')]);_0x535664[_0x31b8('0x2c')]=_[_0x31b8('0x2b')](_0x36c13b[_0x31b8('0x26')],qs['fields'](_0x298522['query']['fields']));_0x535664['attributes']=_0x535664[_0x31b8('0x2c')][_0x31b8('0x2d')]?_0x535664[_0x31b8('0x2c')]:_0x36c13b['model'];if(_0x298522[_0x31b8('0x28')]['includeAll']){_0x535664[_0x31b8('0x2e')]=[{'all':!![]}];}_0x535664=_['merge']({},_0x535664,_0x298522[_0x31b8('0x2f')]);return db[_0x31b8('0x30')]['find'](_0x535664)['then'](handleEntityNotFound(_0x23762d,null))[_0x31b8('0x1e')](respondWithResult(_0x23762d,null))[_0x31b8('0x31')](handleError(_0x23762d,null));};exports[_0x31b8('0x32')]=function(_0x14059b,_0x3e19d0){return db[_0x31b8('0x30')][_0x31b8('0x32')](_0x14059b[_0x31b8('0x33')],{})[_0x31b8('0x1e')](respondWithResult(_0x3e19d0,0xc9))[_0x31b8('0x31')](handleError(_0x3e19d0,null));};exports['update']=function(_0x41ad1e,_0x4c8549){if(_0x41ad1e[_0x31b8('0x33')]['id']){delete _0x41ad1e[_0x31b8('0x33')]['id'];}return db['ChatProactiveAction']['find']({'where':{'id':_0x41ad1e[_0x31b8('0x25')]['id']}})[_0x31b8('0x1e')](handleEntityNotFound(_0x4c8549,null))['then'](saveUpdates(_0x41ad1e['body'],null))[_0x31b8('0x1e')](respondWithResult(_0x4c8549,null))['catch'](handleError(_0x4c8549,null));};exports[_0x31b8('0x34')]=function(_0x53b803,_0x376046){return db[_0x31b8('0x30')][_0x31b8('0x35')]({'where':{'id':_0x53b803[_0x31b8('0x25')]['id']}})[_0x31b8('0x1e')](handleEntityNotFound(_0x376046,null))[_0x31b8('0x1e')](removeEntity(_0x376046,null))[_0x31b8('0x31')](handleError(_0x376046,null));};
\ No newline at end of file
+var _0x35e8=['status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','show','params','model','keys','ChatProactiveAction','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','include','merge','find','create','catch','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0x35e8,0x160));var _0x835e=function(_0x321de9,_0x189829){_0x321de9=_0x321de9-0x0;var _0x50edf8=_0x35e8[_0x321de9];return _0x50edf8;};'use strict';var pdf=require(_0x835e('0x0'));var emlformat=require(_0x835e('0x1'));var rimraf=require(_0x835e('0x2'));var zipdir=require(_0x835e('0x3'));var jsonpatch=require(_0x835e('0x4'));var rp=require(_0x835e('0x5'));var moment=require(_0x835e('0x6'));var BPromise=require(_0x835e('0x7'));var Mustache=require(_0x835e('0x8'));var util=require(_0x835e('0x9'));var path=require('path');var sox=require(_0x835e('0xa'));var csv=require(_0x835e('0xb'));var ejs=require(_0x835e('0xc'));var fs=require('fs');var _=require(_0x835e('0xd'));var squel=require(_0x835e('0xe'));var crypto=require(_0x835e('0xf'));var jsforce=require(_0x835e('0x10'));var deskjs=require(_0x835e('0x11'));var toCsv=require('to-csv');var querystring=require(_0x835e('0x12'));var Papa=require('papaparse');var Redis=require(_0x835e('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x835e('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x835e('0x15'))(_0x835e('0x16'));var utils=require(_0x835e('0x17'));var config=require(_0x835e('0x18'));var db=require(_0x835e('0x19'))['db'];function respondWithStatusCode(_0x11963a,_0x11ce28){_0x11ce28=_0x11ce28||0xcc;return function(_0x2987ec){if(_0x2987ec){return _0x11963a['sendStatus'](_0x11ce28);}return _0x11963a[_0x835e('0x1a')](_0x11ce28)[_0x835e('0x1b')]();};}function respondWithResult(_0x3560a3,_0x21ad6c){_0x21ad6c=_0x21ad6c||0xc8;return function(_0x4d70ab){if(_0x4d70ab){return _0x3560a3[_0x835e('0x1a')](_0x21ad6c)[_0x835e('0x1c')](_0x4d70ab);}};}function respondWithFilteredResult(_0x60dd1d,_0x300e75){return function(_0x430fb5){if(_0x430fb5){var _0x3da307=_0x430fb5['count'],_0x42e83a=_0x300e75[_0x835e('0x1d')],_0x1960bc=_0x300e75['offset']+_0x300e75[_0x835e('0x1e')],_0x3ec63b;if(_0x1960bc>=_0x3da307){_0x1960bc=_0x3da307;_0x3ec63b=0xc8;}else{_0x3ec63b=0xce;}_0x60dd1d[_0x835e('0x1a')](_0x3ec63b);return _0x60dd1d[_0x835e('0x1f')](_0x835e('0x20'),_0x42e83a+'-'+_0x1960bc+'/'+_0x3da307)[_0x835e('0x1c')](_0x430fb5);}return null;};}function patchUpdates(_0x5bbfe6){return function(_0x1a09f4){try{jsonpatch[_0x835e('0x21')](_0x1a09f4,_0x5bbfe6,!![]);}catch(_0x679be4){return BPromise[_0x835e('0x22')](_0x679be4);}return _0x1a09f4[_0x835e('0x23')]();};}function saveUpdates(_0x38bfc5,_0x1a612b){return function(_0x5e486c){if(_0x5e486c){return _0x5e486c[_0x835e('0x24')](_0x38bfc5)[_0x835e('0x25')](function(_0x5bae0f){return _0x5bae0f;});}return null;};}function removeEntity(_0x3878e7,_0x31e5b6){return function(_0x4775fe){if(_0x4775fe){return _0x4775fe[_0x835e('0x26')]()[_0x835e('0x25')](function(){_0x3878e7[_0x835e('0x1a')](0xcc)[_0x835e('0x1b')]();});}};}function handleEntityNotFound(_0xd2bd09,_0x4586bb){return function(_0x163895){if(!_0x163895){_0xd2bd09[_0x835e('0x27')](0x194);}return _0x163895;};}function handleError(_0x48e79b,_0x3c4aeb){_0x3c4aeb=_0x3c4aeb||0x1f4;return function(_0x21c048){logger[_0x835e('0x28')](_0x21c048[_0x835e('0x29')]);if(_0x21c048[_0x835e('0x2a')]){delete _0x21c048[_0x835e('0x2a')];}_0x48e79b['status'](_0x3c4aeb)[_0x835e('0x2b')](_0x21c048);};}exports[_0x835e('0x2c')]=function(_0x44b071,_0x3cb770){var _0x2d5d5f={'raw':!![],'where':{'id':_0x44b071[_0x835e('0x2d')]['id']}},_0x4b865d={};_0x4b865d[_0x835e('0x2e')]=_[_0x835e('0x2f')](db[_0x835e('0x30')][_0x835e('0x31')]);_0x4b865d['query']=_[_0x835e('0x2f')](_0x44b071[_0x835e('0x32')]);_0x4b865d[_0x835e('0x33')]=_[_0x835e('0x34')](_0x4b865d[_0x835e('0x2e')],_0x4b865d[_0x835e('0x32')]);_0x2d5d5f[_0x835e('0x35')]=_[_0x835e('0x34')](_0x4b865d[_0x835e('0x2e')],qs[_0x835e('0x36')](_0x44b071[_0x835e('0x32')][_0x835e('0x36')]));_0x2d5d5f[_0x835e('0x35')]=_0x2d5d5f[_0x835e('0x35')][_0x835e('0x37')]?_0x2d5d5f['attributes']:_0x4b865d[_0x835e('0x2e')];if(_0x44b071[_0x835e('0x32')][_0x835e('0x38')]){_0x2d5d5f[_0x835e('0x39')]=[{'all':!![]}];}_0x2d5d5f=_[_0x835e('0x3a')]({},_0x2d5d5f,_0x44b071['options']);return db[_0x835e('0x30')][_0x835e('0x3b')](_0x2d5d5f)[_0x835e('0x25')](handleEntityNotFound(_0x3cb770,null))['then'](respondWithResult(_0x3cb770,null))['catch'](handleError(_0x3cb770,null));};exports['create']=function(_0x447766,_0x4010fe){return db[_0x835e('0x30')][_0x835e('0x3c')](_0x447766['body'],{})[_0x835e('0x25')](respondWithResult(_0x4010fe,0xc9))[_0x835e('0x3d')](handleError(_0x4010fe,null));};exports[_0x835e('0x24')]=function(_0x1d8a17,_0x34d1a8){if(_0x1d8a17[_0x835e('0x3e')]['id']){delete _0x1d8a17[_0x835e('0x3e')]['id'];}return db[_0x835e('0x30')]['find']({'where':{'id':_0x1d8a17[_0x835e('0x2d')]['id']}})[_0x835e('0x25')](handleEntityNotFound(_0x34d1a8,null))['then'](saveUpdates(_0x1d8a17[_0x835e('0x3e')],null))[_0x835e('0x25')](respondWithResult(_0x34d1a8,null))[_0x835e('0x3d')](handleError(_0x34d1a8,null));};exports['destroy']=function(_0x4ee3fb,_0x5eee5f){return db[_0x835e('0x30')]['find']({'where':{'id':_0x4ee3fb[_0x835e('0x2d')]['id']}})[_0x835e('0x25')](handleEntityNotFound(_0x5eee5f,null))[_0x835e('0x25')](removeEntity(_0x5eee5f,null))[_0x835e('0x3d')](handleError(_0x5eee5f,null));};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js
index 1f6527a..96d6859 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.model.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x790d=['util','../../config/logger','api','moment','path','rimraf','./chatProactiveAction.attributes','exports','define','ChatProactiveAction','chat_proactive_actions'];(function(_0xaa0cb9,_0x28081b){var _0x548207=function(_0x571df6){while(--_0x571df6){_0xaa0cb9['push'](_0xaa0cb9['shift']());}};_0x548207(++_0x28081b);}(_0x790d,0xd1));var _0xd790=function(_0x45783c,_0x49c56d){_0x45783c=_0x45783c-0x0;var _0x1161da=_0x790d[_0x45783c];return _0x1161da;};'use strict';var _=require('lodash');var util=require(_0xd790('0x0'));var logger=require(_0xd790('0x1'))(_0xd790('0x2'));var moment=require(_0xd790('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xd790('0x4'));var rimraf=require(_0xd790('0x5'));var config=require('../../config/environment');var attributes=require(_0xd790('0x6'));module[_0xd790('0x7')]=function(_0x2f5399,_0x3e3791){return _0x2f5399[_0xd790('0x8')](_0xd790('0x9'),attributes,{'tableName':_0xd790('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xde23=['util','moment','request-promise','path','rimraf','../../config/environment','./chatProactiveAction.attributes','exports','define','chat_proactive_actions','lodash'];(function(_0x5540e9,_0x538cf1){var _0x23ebd5=function(_0x28698e){while(--_0x28698e){_0x5540e9['push'](_0x5540e9['shift']());}};_0x23ebd5(++_0x538cf1);}(_0xde23,0x133));var _0x3de2=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xde23[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x3de2('0x0'));var util=require(_0x3de2('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x3de2('0x2'));var BPromise=require('bluebird');var rp=require(_0x3de2('0x3'));var fs=require('fs');var path=require(_0x3de2('0x4'));var rimraf=require(_0x3de2('0x5'));var config=require(_0x3de2('0x6'));var attributes=require(_0x3de2('0x7'));module[_0x3de2('0x8')]=function(_0x5b354a,_0xbba0dd){return _0x5b354a[_0x3de2('0x9')]('ChatProactiveAction',attributes,{'tableName':_0x3de2('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
index fb245b6..59bca5b 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.rpc.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9957=['message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x53ac44,_0x4a9ce0){var _0xac66c2=function(_0x3042cb){while(--_0x3042cb){_0x53ac44['push'](_0x53ac44['shift']());}};_0xac66c2(++_0x4a9ce0);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x465276(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}else{logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));_0x465276(_0x3116fb[_0x7995('0x16')]['message']);}})[_0x7995('0x17')](function(_0x565d97){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x565d97);_0x1cad37(_0x565d97);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x395446,_0x38580a){var _0x28d342=function(_0x5d7233){while(--_0x5d7233){_0x395446['push'](_0x395446['shift']());}};_0x28d342(++_0x38580a);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0xa9e0[_0xf50820];return _0x2a9b10;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js
index 9aef9bb..f75404c 100644
--- a/server/api/chatProactiveAction/index.js
+++ b/server/api/chatProactiveAction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4c4d=['../../components/interaction/service','../../config/environment','./chatProactiveAction.controller','get','/:id','isAuthenticated','post','create','put','update','delete','destroy','exports','multer','Router'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4c4d,0x1a2));var _0xd4c4=function(_0x4a0ca9,_0x2f952c){_0x4a0ca9=_0x4a0ca9-0x0;var _0x355a37=_0x4c4d[_0x4a0ca9];return _0x355a37;};'use strict';var multer=require(_0xd4c4('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xd4c4('0x1')]();var auth=require('../../components/auth/service');var interaction=require(_0xd4c4('0x2'));var config=require(_0xd4c4('0x3'));var controller=require(_0xd4c4('0x4'));router[_0xd4c4('0x5')](_0xd4c4('0x6'),auth[_0xd4c4('0x7')](),controller['show']);router[_0xd4c4('0x8')]('/',auth[_0xd4c4('0x7')](),controller[_0xd4c4('0x9')]);router[_0xd4c4('0xa')](_0xd4c4('0x6'),auth['isAuthenticated'](),controller[_0xd4c4('0xb')]);router[_0xd4c4('0xc')](_0xd4c4('0x6'),auth[_0xd4c4('0x7')](),controller[_0xd4c4('0xd')]);module[_0xd4c4('0xe')]=router;
\ No newline at end of file
+var _0xb6fa=['multer','connect-timeout','../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','get','/:id','isAuthenticated','show','post','create','put','update','delete','destroy'];(function(_0x2de165,_0x4017d4){var _0xa0e22c=function(_0x3f53be){while(--_0x3f53be){_0x2de165['push'](_0x2de165['shift']());}};_0xa0e22c(++_0x4017d4);}(_0xb6fa,0x1c2));var _0xab6f=function(_0x4b4f24,_0x5654a8){_0x4b4f24=_0x4b4f24-0x0;var _0x1c13d4=_0xb6fa[_0x4b4f24];return _0x1c13d4;};'use strict';var multer=require(_0xab6f('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xab6f('0x1'));var express=require('express');var router=express['Router']();var auth=require(_0xab6f('0x2'));var interaction=require(_0xab6f('0x3'));var config=require('../../config/environment');var controller=require(_0xab6f('0x4'));router[_0xab6f('0x5')](_0xab6f('0x6'),auth[_0xab6f('0x7')](),controller[_0xab6f('0x8')]);router[_0xab6f('0x9')]('/',auth[_0xab6f('0x7')](),controller[_0xab6f('0xa')]);router[_0xab6f('0xb')](_0xab6f('0x6'),auth[_0xab6f('0x7')](),controller[_0xab6f('0xc')]);router[_0xab6f('0xd')](_0xab6f('0x6'),auth[_0xab6f('0x7')](),controller[_0xab6f('0xe')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js
index 9c19d16..9bcd820 100644
--- a/server/api/chatQueue/chatQueue.attributes.js
+++ b/server/api/chatQueue/chatQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5c29=['exports','STRING'];(function(_0x312b3a,_0x2e2767){var _0x3ff968=function(_0x331b89){while(--_0x331b89){_0x312b3a['push'](_0x312b3a['shift']());}};_0x3ff968(++_0x2e2767);}(_0x5c29,0x174));var _0x95c2=function(_0x2ed2ef,_0x46feff){_0x2ed2ef=_0x2ed2ef-0x0;var _0x32ace2=_0x5c29[_0x2ed2ef];return _0x32ace2;};'use strict';var Sequelize=require('sequelize');module[_0x95c2('0x0')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x95c2('0x1')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM']('rrmemory','beepall','roundrobin')}};
\ No newline at end of file
+var _0x5220=['INTEGER','rrmemory','exports','STRING'];(function(_0x4c321c,_0x3e9da0){var _0x25accb=function(_0x21bf7a){while(--_0x21bf7a){_0x4c321c['push'](_0x4c321c['shift']());}};_0x25accb(++_0x3e9da0);}(_0x5220,0xee));var _0x0522=function(_0x152ca2,_0x5abd1b){_0x152ca2=_0x152ca2-0x0;var _0x58fbd2=_0x5220[_0x152ca2];return _0x58fbd2;};'use strict';var Sequelize=require('sequelize');module[_0x0522('0x0')]={'name':{'type':Sequelize[_0x0522('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x0522('0x2')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x0522('0x3'),'beepall','roundrobin')}};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js
index d86dafb..ca44f44 100644
--- a/server/api/chatQueue/chatQueue.controller.js
+++ b/server/api/chatQueue/chatQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8f4d=['Team','hasOwnProperty','User','online','interface','flatMap','Agents','addTeams','findOrCreate','forEach','emit','removeTeams','ids','tq.TeamId','from','team_has_chat_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','toString','sequelize','QueryTypes','TeamId','includes','union','compact','transaction','removeAgents','userChatQueue:remove','addAgents','omit','spread','isArray','getAgents','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','./chatQueue.socket','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','status','end','count','offset','set','Content-Range','json','apply','reject','save','update','destroy','get','ChatQueues','UserProfileResource','sendStatus','stack','name','send','index','ChatQueue','rawAttributes','keys','query','filters','intersection','model','attributes','fields','length','nolimit','limit','sort','where','filter','map','type','key','field','options','includeAll','include','findAll','rows','show','params','merge','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','findOne','UserChatQueue','order','pick','findAndCountAll','UserId','agent','chatPause','updatedAt','createdAt','format','%s/%s','getTeams'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0x8f4d,0x14e));var _0xd8f4=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0x8f4d[_0x5d6456];return _0x4d66c1;};'use strict';var pdf=require(_0xd8f4('0x0'));var emlformat=require(_0xd8f4('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xd8f4('0x2'));var jsonpatch=require(_0xd8f4('0x3'));var rp=require(_0xd8f4('0x4'));var moment=require(_0xd8f4('0x5'));var BPromise=require(_0xd8f4('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0xd8f4('0x7'));var sox=require(_0xd8f4('0x8'));var csv=require('to-csv');var ejs=require(_0xd8f4('0x9'));var fs=require('fs');var _=require(_0xd8f4('0xa'));var squel=require(_0xd8f4('0xb'));var crypto=require('crypto');var jsforce=require(_0xd8f4('0xc'));var deskjs=require(_0xd8f4('0xd'));var toCsv=require('to-csv');var querystring=require(_0xd8f4('0xe'));var Papa=require(_0xd8f4('0xf'));var Redis=require(_0xd8f4('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xd8f4('0x11'));var hardwareService=require(_0xd8f4('0x12'));var logger=require(_0xd8f4('0x13'))(_0xd8f4('0x14'));var utils=require(_0xd8f4('0x15'));var config=require(_0xd8f4('0x16'));var db=require(_0xd8f4('0x17'))['db'];config['redis']=_[_0xd8f4('0x18')](config[_0xd8f4('0x19')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd8f4('0x19')]));require(_0xd8f4('0x1a'))['register'](socket);var jayson=require(_0xd8f4('0x1b'));var client=jayson[_0xd8f4('0x1c')]['http']({'port':0x232a});function checkPasswordPattern(_0x30ee07,_0x2506a3,_0x5db6b7){if(_0x5db6b7){var _0x31cc2e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x31cc2e[_0xd8f4('0x1d')](_0x2506a3)){return _0x30ee07;}else{throw new Error(_0xd8f4('0x1e'));}}else{return _0x30ee07;}}function respondWithRpcPromise(_0x2829b7,_0x272d8b,_0x266b62,_0x54a662){return new BPromise(function(_0x5b67b9,_0x8ff3eb){var _0x50cab2=_0x54a662||client;return _0x50cab2[_0xd8f4('0x1f')](_0x2829b7,_0x266b62)[_0xd8f4('0x20')](function(_0x469ebc){logger['info'](_0xd8f4('0x21'),_0x272d8b,_0xd8f4('0x22'));logger[_0xd8f4('0x23')](_0xd8f4('0x24'),_0x272d8b,_0xd8f4('0x22'),JSON[_0xd8f4('0x25')](_0x469ebc));if(_0x469ebc['error']){if(_0x469ebc[_0xd8f4('0x26')][_0xd8f4('0x27')]===0x1f4){logger[_0xd8f4('0x26')](_0xd8f4('0x21'),_0x272d8b,_0x469ebc[_0xd8f4('0x26')][_0xd8f4('0x28')]);return _0x8ff3eb(_0x469ebc[_0xd8f4('0x26')]['message']);}logger[_0xd8f4('0x26')](_0xd8f4('0x21'),_0x272d8b,_0x469ebc[_0xd8f4('0x26')][_0xd8f4('0x28')]);return _0x5b67b9(_0x469ebc[_0xd8f4('0x26')][_0xd8f4('0x28')]);}else{logger[_0xd8f4('0x29')](_0xd8f4('0x21'),_0x272d8b,_0xd8f4('0x22'));_0x5b67b9(_0x469ebc[_0xd8f4('0x2a')][_0xd8f4('0x28')]);}})['catch'](function(_0x49aa3a){logger[_0xd8f4('0x26')](_0xd8f4('0x21'),_0x272d8b,_0x49aa3a);_0x8ff3eb(_0x49aa3a);});});}function respondWithStatusCode(_0x3bca9e,_0x5c3718){_0x5c3718=_0x5c3718||0xcc;return function(_0x3e9029){if(_0x3e9029){return _0x3bca9e['sendStatus'](_0x5c3718);}return _0x3bca9e[_0xd8f4('0x2b')](_0x5c3718)[_0xd8f4('0x2c')]();};}function respondWithResult(_0x3cb99f,_0x4971c9){_0x4971c9=_0x4971c9||0xc8;return function(_0x3a539d){if(_0x3a539d){return _0x3cb99f[_0xd8f4('0x2b')](_0x4971c9)['json'](_0x3a539d);}};}function respondWithFilteredResult(_0x4bcf97,_0x493e4b){return function(_0xda3300){if(_0xda3300){var _0x5ecb0e=_0xda3300[_0xd8f4('0x2d')],_0x1e0942=_0x493e4b[_0xd8f4('0x2e')],_0x16a961=_0x493e4b['offset']+_0x493e4b['limit'],_0x586e38;if(_0x16a961>=_0x5ecb0e){_0x16a961=_0x5ecb0e;_0x586e38=0xc8;}else{_0x586e38=0xce;}_0x4bcf97[_0xd8f4('0x2b')](_0x586e38);return _0x4bcf97[_0xd8f4('0x2f')](_0xd8f4('0x30'),_0x1e0942+'-'+_0x16a961+'/'+_0x5ecb0e)[_0xd8f4('0x31')](_0xda3300);}return null;};}function patchUpdates(_0xad05c1){return function(_0x578a43){try{jsonpatch[_0xd8f4('0x32')](_0x578a43,_0xad05c1,!![]);}catch(_0x27428c){return BPromise[_0xd8f4('0x33')](_0x27428c);}return _0x578a43[_0xd8f4('0x34')]();};}function saveUpdates(_0x1d6b2d,_0x5971df){return function(_0xa121a5){if(_0xa121a5){return _0xa121a5[_0xd8f4('0x35')](_0x1d6b2d)[_0xd8f4('0x20')](function(_0x50af89){return _0x50af89;});}return null;};}function removeEntity(_0x3b96f2,_0x349646){return function(_0x3ad7df){if(_0x3ad7df){return _0x3ad7df[_0xd8f4('0x36')]()[_0xd8f4('0x20')](function(){var _0x18ca25=_0x3ad7df[_0xd8f4('0x37')]({'plain':!![]});var _0x2945da=_0xd8f4('0x38');return db[_0xd8f4('0x39')][_0xd8f4('0x36')]({'where':{'type':_0x2945da,'resourceId':_0x18ca25['id']}})['then'](function(){return _0x3ad7df;});})[_0xd8f4('0x20')](function(){_0x3b96f2[_0xd8f4('0x2b')](0xcc)[_0xd8f4('0x2c')]();});}};}function handleEntityNotFound(_0x5d43b3,_0x1bda6e){return function(_0x116d2d){if(!_0x116d2d){_0x5d43b3[_0xd8f4('0x3a')](0x194);}return _0x116d2d;};}function handleError(_0x2f62d9,_0x3566ac){_0x3566ac=_0x3566ac||0x1f4;return function(_0xd1ef49){logger[_0xd8f4('0x26')](_0xd1ef49[_0xd8f4('0x3b')]);if(_0xd1ef49[_0xd8f4('0x3c')]){delete _0xd1ef49[_0xd8f4('0x3c')];}_0x2f62d9[_0xd8f4('0x2b')](_0x3566ac)[_0xd8f4('0x3d')](_0xd1ef49);};}exports[_0xd8f4('0x3e')]=function(_0x43ccb9,_0x18f388){var _0x2402b9={},_0x29da05={},_0xf73374={'count':0x0,'rows':[]};var _0x1ef191=db[_0xd8f4('0x3f')][_0xd8f4('0x40')];_0x29da05['model']=_['keys'](_0x1ef191);_0x29da05['query']=_[_0xd8f4('0x41')](_0x43ccb9[_0xd8f4('0x42')]);_0x29da05[_0xd8f4('0x43')]=_[_0xd8f4('0x44')](_0x29da05[_0xd8f4('0x45')],_0x29da05[_0xd8f4('0x42')]);_0x2402b9[_0xd8f4('0x46')]=_[_0xd8f4('0x44')](_0x29da05[_0xd8f4('0x45')],qs['fields'](_0x43ccb9[_0xd8f4('0x42')][_0xd8f4('0x47')]));_0x2402b9['attributes']=_0x2402b9[_0xd8f4('0x46')][_0xd8f4('0x48')]?_0x2402b9[_0xd8f4('0x46')]:_0x29da05[_0xd8f4('0x45')];if(!_0x43ccb9['query']['hasOwnProperty'](_0xd8f4('0x49'))){_0x2402b9[_0xd8f4('0x4a')]=qs[_0xd8f4('0x4a')](_0x43ccb9[_0xd8f4('0x42')][_0xd8f4('0x4a')]);_0x2402b9['offset']=qs['offset'](_0x43ccb9['query'][_0xd8f4('0x2e')]);}_0x2402b9['order']=qs[_0xd8f4('0x4b')](_0x43ccb9[_0xd8f4('0x42')][_0xd8f4('0x4b')]);_0x2402b9[_0xd8f4('0x4c')]=qs['filters'](_['pick'](_0x43ccb9[_0xd8f4('0x42')],_0x29da05['filters']));if(_0x43ccb9[_0xd8f4('0x42')][_0xd8f4('0x4d')]){_0x2402b9[_0xd8f4('0x4c')]=_['merge'](_0x2402b9[_0xd8f4('0x4c')],{'$or':_[_0xd8f4('0x4e')](_0x1ef191,function(_0x1d871f){if(_0x1d871f[_0xd8f4('0x4f')][_0xd8f4('0x50')]!=='VIRTUAL'){var _0x4c568e={};_0x4c568e[_0x1d871f[_0xd8f4('0x51')]]={'$like':'%'+_0x43ccb9[_0xd8f4('0x42')][_0xd8f4('0x4d')]+'%'};return _0x4c568e;}})});}_0x2402b9=_['merge']({},_0x2402b9,_0x43ccb9[_0xd8f4('0x52')]);var _0x507885={'where':_0x2402b9[_0xd8f4('0x4c')]};return db[_0xd8f4('0x3f')][_0xd8f4('0x2d')](_0x507885)[_0xd8f4('0x20')](function(_0x526f2a){_0xf73374[_0xd8f4('0x2d')]=_0x526f2a;if(_0x43ccb9[_0xd8f4('0x42')][_0xd8f4('0x53')]){_0x2402b9[_0xd8f4('0x54')]=[{'all':!![]}];}return db[_0xd8f4('0x3f')][_0xd8f4('0x55')](_0x2402b9);})[_0xd8f4('0x20')](function(_0x3dc203){_0xf73374[_0xd8f4('0x56')]=_0x3dc203;return _0xf73374;})[_0xd8f4('0x20')](respondWithFilteredResult(_0x18f388,_0x2402b9))['catch'](handleError(_0x18f388,null));};exports[_0xd8f4('0x57')]=function(_0x440a89,_0x3c8f50){var _0x220a96={'raw':!![],'where':{'id':_0x440a89[_0xd8f4('0x58')]['id']}},_0x59bcf1={};_0x59bcf1[_0xd8f4('0x45')]=_[_0xd8f4('0x41')](db[_0xd8f4('0x3f')]['rawAttributes']);_0x59bcf1[_0xd8f4('0x42')]=_[_0xd8f4('0x41')](_0x440a89[_0xd8f4('0x42')]);_0x59bcf1['filters']=_[_0xd8f4('0x44')](_0x59bcf1['model'],_0x59bcf1[_0xd8f4('0x42')]);_0x220a96[_0xd8f4('0x46')]=_['intersection'](_0x59bcf1['model'],qs[_0xd8f4('0x47')](_0x440a89[_0xd8f4('0x42')][_0xd8f4('0x47')]));_0x220a96[_0xd8f4('0x46')]=_0x220a96[_0xd8f4('0x46')][_0xd8f4('0x48')]?_0x220a96[_0xd8f4('0x46')]:_0x59bcf1[_0xd8f4('0x45')];if(_0x440a89[_0xd8f4('0x42')][_0xd8f4('0x53')]){_0x220a96[_0xd8f4('0x54')]=[{'all':!![]}];}_0x220a96=_[_0xd8f4('0x59')]({},_0x220a96,_0x440a89[_0xd8f4('0x52')]);return db[_0xd8f4('0x3f')][_0xd8f4('0x5a')](_0x220a96)[_0xd8f4('0x20')](handleEntityNotFound(_0x3c8f50,null))[_0xd8f4('0x20')](respondWithResult(_0x3c8f50,null))[_0xd8f4('0x5b')](handleError(_0x3c8f50,null));};exports[_0xd8f4('0x5c')]=function(_0xfe0ff3,_0xf20533){return db[_0xd8f4('0x3f')][_0xd8f4('0x5c')](_0xfe0ff3[_0xd8f4('0x5d')],{})[_0xd8f4('0x20')](function(_0x6ec9cf){var _0x344a61=_0xfe0ff3[_0xd8f4('0x5e')][_0xd8f4('0x37')]({'plain':!![]});if(!_0x344a61)throw new Error(_0xd8f4('0x5f'));if(_0x344a61['role']===_0xd8f4('0x5e')){var _0x1847d6=_0x6ec9cf[_0xd8f4('0x37')]({'plain':!![]});var _0x83fc6e=_0xd8f4('0x38');return db['UserProfileSection']['find']({'where':{'name':_0x83fc6e,'userProfileId':_0x344a61[_0xd8f4('0x60')]},'raw':!![]})['then'](function(_0x5863a7){if(_0x5863a7&&_0x5863a7[_0xd8f4('0x61')]===0x0){return db[_0xd8f4('0x39')][_0xd8f4('0x5c')]({'name':_0x1847d6[_0xd8f4('0x3c')],'resourceId':_0x1847d6['id'],'type':_0x5863a7[_0xd8f4('0x3c')],'sectionId':_0x5863a7['id']},{})[_0xd8f4('0x20')](function(){return _0x6ec9cf;});}else{return _0x6ec9cf;}})[_0xd8f4('0x5b')](function(_0x363378){logger[_0xd8f4('0x26')](_0xd8f4('0x62'),_0x363378);throw _0x363378;});}return _0x6ec9cf;})['then'](respondWithResult(_0xf20533,0xc9))[_0xd8f4('0x5b')](handleError(_0xf20533,null));};exports[_0xd8f4('0x35')]=function(_0x387a3b,_0x571cc7){if(_0x387a3b[_0xd8f4('0x5d')]['id']){delete _0x387a3b[_0xd8f4('0x5d')]['id'];}return db[_0xd8f4('0x3f')][_0xd8f4('0x5a')]({'where':{'id':_0x387a3b[_0xd8f4('0x58')]['id']}})[_0xd8f4('0x20')](handleEntityNotFound(_0x571cc7,null))[_0xd8f4('0x20')](saveUpdates(_0x387a3b[_0xd8f4('0x5d')],null))[_0xd8f4('0x20')](respondWithResult(_0x571cc7,null))[_0xd8f4('0x5b')](handleError(_0x571cc7,null));};exports[_0xd8f4('0x36')]=function(_0x10c729,_0x5df294){return db[_0xd8f4('0x3f')]['find']({'where':{'id':_0x10c729[_0xd8f4('0x58')]['id']}})['then'](handleEntityNotFound(_0x5df294,null))[_0xd8f4('0x20')](removeEntity(_0x5df294,null))[_0xd8f4('0x5b')](handleError(_0x5df294,null));};exports[_0xd8f4('0x63')]=function(_0xbe405e,_0x1baef6){return db[_0xd8f4('0x3f')][_0xd8f4('0x63')]()[_0xd8f4('0x20')](respondWithResult(_0x1baef6,null))[_0xd8f4('0x5b')](handleError(_0x1baef6,null));};exports['getMembers']=function(_0x230874,_0x192e3c,_0x44e3a0){var _0x5d68a2={'raw':!![],'where':{}},_0x3e46f1={},_0x5b5af9;return db[_0xd8f4('0x3f')][_0xd8f4('0x64')]({'where':{'id':_0x230874[_0xd8f4('0x58')]['id']}})[_0xd8f4('0x20')](handleEntityNotFound(_0x192e3c,null))[_0xd8f4('0x20')](function(_0x7a5438){if(_0x7a5438){_0x5b5af9=_0x7a5438[_0xd8f4('0x37')]({'plain':!![]});_0x3e46f1['model']=_[_0xd8f4('0x41')](db[_0xd8f4('0x65')]['rawAttributes']);_0x3e46f1[_0xd8f4('0x42')]=_[_0xd8f4('0x41')](_0x230874[_0xd8f4('0x42')]);_0x3e46f1['filters']=_[_0xd8f4('0x44')](_0x3e46f1['model'],_0x3e46f1[_0xd8f4('0x42')]);_0x5d68a2[_0xd8f4('0x46')]=_['intersection'](_0x3e46f1[_0xd8f4('0x45')],qs[_0xd8f4('0x47')](_0x230874[_0xd8f4('0x42')][_0xd8f4('0x47')]));_0x5d68a2[_0xd8f4('0x46')]=_0x5d68a2['attributes'][_0xd8f4('0x48')]?_0x5d68a2[_0xd8f4('0x46')]:_0x3e46f1['model'];if(!_0x230874['query']['hasOwnProperty'](_0xd8f4('0x49'))){_0x5d68a2[_0xd8f4('0x4a')]=qs[_0xd8f4('0x4a')](_0x230874[_0xd8f4('0x42')]['limit']);_0x5d68a2[_0xd8f4('0x2e')]=qs[_0xd8f4('0x2e')](_0x230874[_0xd8f4('0x42')][_0xd8f4('0x2e')]);}_0x5d68a2[_0xd8f4('0x66')]=qs['sort'](_0x230874[_0xd8f4('0x42')]['sort']);_0x5d68a2['where']=qs[_0xd8f4('0x43')](_[_0xd8f4('0x67')](_0x230874['query'],_0x3e46f1['filters']));_0x5d68a2[_0xd8f4('0x4c')]['ChatQueueId']=_0x7a5438['id'];if(_0x230874[_0xd8f4('0x42')]['filter']){_0x5d68a2[_0xd8f4('0x4c')]=_['merge'](_0x5d68a2['where'],{'$or':_[_0xd8f4('0x4e')](_0x5d68a2['attributes'],function(_0x2bac6c){var _0x3a9d3d={};_0x3a9d3d[_0x2bac6c]={'$like':'%'+_0x230874[_0xd8f4('0x42')]['filter']+'%'};return _0x3a9d3d;})});}_0x5d68a2=_[_0xd8f4('0x59')]({},_0x5d68a2,_0x230874[_0xd8f4('0x52')]);return db[_0xd8f4('0x65')]['findAll'](_0x5d68a2);}})[_0xd8f4('0x20')](function(_0x5b590c){if(_0x5b590c){return db['User'][_0xd8f4('0x68')]({'where':{'id':_[_0xd8f4('0x4e')](_0x5b590c,_0xd8f4('0x69')),'role':_0xd8f4('0x6a')},'attributes':['id',_0xd8f4('0x3c'),_0xd8f4('0x6b'),_0xd8f4('0x6c'),_0xd8f4('0x6d')]});}})['then'](function(_0x467e7b){if(_0x467e7b){return{'count':_0x467e7b[_0xd8f4('0x2d')],'rows':_['map'](_0x467e7b[_0xd8f4('0x56')],function(_0x3f4c43){return{'membername':_0x3f4c43[_0xd8f4('0x3c')],'UserId':_0x3f4c43['id'],'queue_name':_0x5b5af9['name'],'ChatQueueId':_0x5b5af9['id'],'interface':util[_0xd8f4('0x6e')](_0xd8f4('0x6f'),'SIP',_0x3f4c43['name']),'penalty':0x0,'paused':_0x3f4c43[_0xd8f4('0x6b')],'createdAt':_0x3f4c43[_0xd8f4('0x6d')],'updatedAt':_0x3f4c43[_0xd8f4('0x6c')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x192e3c,_0x5d68a2))[_0xd8f4('0x5b')](handleError(_0x192e3c,null));};exports[_0xd8f4('0x70')]=function(_0x2414a7,_0x4341df,_0x317858){var _0x2ad888={};var _0x79d9f1={};var _0x54ead2;var _0x48057d;return db[_0xd8f4('0x3f')]['findOne']({'where':{'id':_0x2414a7[_0xd8f4('0x58')]['id']}})['then'](handleEntityNotFound(_0x4341df,null))[_0xd8f4('0x20')](function(_0x2a6c77){if(_0x2a6c77){_0x54ead2=_0x2a6c77;_0x79d9f1[_0xd8f4('0x45')]=_[_0xd8f4('0x41')](db[_0xd8f4('0x71')][_0xd8f4('0x40')]);_0x79d9f1['query']=_[_0xd8f4('0x41')](_0x2414a7[_0xd8f4('0x42')]);_0x79d9f1[_0xd8f4('0x43')]=_[_0xd8f4('0x44')](_0x79d9f1[_0xd8f4('0x45')],_0x79d9f1[_0xd8f4('0x42')]);_0x2ad888[_0xd8f4('0x46')]=_[_0xd8f4('0x44')](_0x79d9f1['model'],qs[_0xd8f4('0x47')](_0x2414a7[_0xd8f4('0x42')][_0xd8f4('0x47')]));_0x2ad888[_0xd8f4('0x46')]=_0x2ad888[_0xd8f4('0x46')]['length']?_0x2ad888[_0xd8f4('0x46')]:_0x79d9f1[_0xd8f4('0x45')];_0x2ad888[_0xd8f4('0x66')]=qs[_0xd8f4('0x4b')](_0x2414a7[_0xd8f4('0x42')][_0xd8f4('0x4b')]);_0x2ad888[_0xd8f4('0x4c')]=qs[_0xd8f4('0x43')](_[_0xd8f4('0x67')](_0x2414a7[_0xd8f4('0x42')],_0x79d9f1[_0xd8f4('0x43')]));if(_0x2414a7[_0xd8f4('0x42')][_0xd8f4('0x4d')]){_0x2ad888['where']=_[_0xd8f4('0x59')](_0x2ad888[_0xd8f4('0x4c')],{'$or':_[_0xd8f4('0x4e')](_0x2ad888[_0xd8f4('0x46')],function(_0x48d3c9){var _0x5ad9dc={};_0x5ad9dc[_0x48d3c9]={'$like':'%'+_0x2414a7[_0xd8f4('0x42')][_0xd8f4('0x4d')]+'%'};return _0x5ad9dc;})});}_0x2ad888=_[_0xd8f4('0x59')]({},_0x2ad888,_0x2414a7[_0xd8f4('0x52')]);return _0x54ead2[_0xd8f4('0x70')](_0x2ad888);}})[_0xd8f4('0x20')](function(_0x32d736){if(_0x32d736){_0x48057d=_0x32d736[_0xd8f4('0x48')];if(!_0x2414a7[_0xd8f4('0x42')][_0xd8f4('0x72')](_0xd8f4('0x49'))){_0x2ad888[_0xd8f4('0x4a')]=qs[_0xd8f4('0x4a')](_0x2414a7[_0xd8f4('0x42')][_0xd8f4('0x4a')]);_0x2ad888['offset']=qs[_0xd8f4('0x2e')](_0x2414a7[_0xd8f4('0x42')]['offset']);}return _0x54ead2[_0xd8f4('0x70')](_0x2ad888);}})[_0xd8f4('0x20')](function(_0x2b2dd7){if(_0x2b2dd7){return _0x2b2dd7?{'count':_0x48057d,'rows':_0x2b2dd7}:null;}})[_0xd8f4('0x20')](respondWithResult(_0x4341df,null))[_0xd8f4('0x5b')](handleError(_0x4341df,null));};exports['addTeams']=function(_0x13ba2b,_0x596b2a,_0x1f0641){var _0x506663=_0x13ba2b[_0xd8f4('0x5d')]['teams'];return db[_0xd8f4('0x71')]['findAll']({'where':{'id':_['map'](_0x506663,'id')},'attributes':['id'],'include':[{'model':db[_0xd8f4('0x73')],'as':'Agents','attributes':['id','name',_0xd8f4('0x74'),'voicePause',_0xd8f4('0x75')],'raw':!![]}]})[_0xd8f4('0x20')](function(_0x5edf2d){if(_0x5edf2d){var _0x3ef02f=_[_0xd8f4('0x76')](_0x5edf2d,function(_0x25be5b){var _0x512df9=_0x25be5b[_0xd8f4('0x37')]({'plain':!![]});return _0x512df9[_0xd8f4('0x77')];});return db[_0xd8f4('0x3f')][_0xd8f4('0x5a')]({'where':{'id':_0x13ba2b[_0xd8f4('0x58')]['id']}})[_0xd8f4('0x20')](function(_0xb5d1b9){return db['sequelize']['transaction'](function(_0x1b616d){return _0xb5d1b9[_0xd8f4('0x78')](_['map'](_0x506663,'id'),{'transaction':_0x1b616d})['then'](function(){return BPromise['each'](_0x3ef02f,function(_0x38ae28){return db[_0xd8f4('0x65')][_0xd8f4('0x79')]({'where':{'UserId':_0x38ae28['id'],'ChatQueueId':_0x13ba2b[_0xd8f4('0x58')]['id']},'transaction':_0x1b616d});});})[_0xd8f4('0x20')](function(){_0x3ef02f[_0xd8f4('0x7a')](function(_0x515014){socket[_0xd8f4('0x7b')]('userChatQueue:save',{'UserId':_0x515014['id'],'ChatQueueId':_0xb5d1b9['id']});});});});});}})['then'](respondWithStatusCode(_0x596b2a,null))[_0xd8f4('0x5b')](handleError(_0x596b2a,null));};exports[_0xd8f4('0x7c')]=function(_0x13c103,_0x58dd0f,_0x1a9f33){return db[_0xd8f4('0x71')][_0xd8f4('0x55')]({'where':{'id':_0x13c103[_0xd8f4('0x42')][_0xd8f4('0x7d')]},'attributes':['id'],'include':[{'model':db[_0xd8f4('0x73')],'as':_0xd8f4('0x77'),'attributes':['id'],'raw':!![]}]})[_0xd8f4('0x20')](handleEntityNotFound(_0x58dd0f,null))[_0xd8f4('0x20')](function(_0x2c909a){var _0x4e6c05=_[_0xd8f4('0x4e')](_0x2c909a,'id');var _0x3e4afc=[];var _0x1c7961=[];var _0x16b368=squel['select']();_0x16b368[_0xd8f4('0x51')](_0xd8f4('0x7e'))[_0xd8f4('0x7f')](_0xd8f4('0x80'),'tq')['join'](_0xd8f4('0x81'),'ut',_0xd8f4('0x82'))['where']('ChatQueueId\x20=\x20?',_0x13c103['params']['id']);for(var _0x14c714=0x0;_0x14c714<_0x2c909a[_0xd8f4('0x48')];_0x14c714+=0x1){let _0x495a03=_0x2c909a[_0x14c714];for(var _0x5ae85b=0x0;_0x5ae85b<_0x495a03['Agents'][_0xd8f4('0x48')];_0x5ae85b+=0x1){let _0x2d85ad=_0x495a03['Agents'][_0x5ae85b];var _0x4911ae=_0x16b368[_0xd8f4('0x83')]();_0x4911ae[_0xd8f4('0x4c')](_0xd8f4('0x84'),_0x2d85ad['id']);_0x1c7961[_0xd8f4('0x85')](db['sequelize'][_0xd8f4('0x42')](_0x4911ae[_0xd8f4('0x86')](),{'type':db[_0xd8f4('0x87')][_0xd8f4('0x88')]['SELECT']})[_0xd8f4('0x20')](function(_0x5e0657){if(_0x5e0657[_0xd8f4('0x48')]===0x1){return _0x2d85ad['id'];}else{var _0x455050=_['every'](_[_0xd8f4('0x4e')](_0x5e0657,_0xd8f4('0x89')),function(_0x37a88d){return _[_0xd8f4('0x8a')](_0x4e6c05,_0x37a88d);});if(_0x455050){return _0x2d85ad['id'];}}}));}}return BPromise['all'](_0x1c7961)[_0xd8f4('0x20')](function(_0x56df6e){_0x3e4afc=_(_0x3e4afc)[_0xd8f4('0x8b')](_0x56df6e)[_0xd8f4('0x8c')]()['value']();return db[_0xd8f4('0x3f')][_0xd8f4('0x5a')]({'where':{'id':_0x13c103[_0xd8f4('0x58')]['id']}})[_0xd8f4('0x20')](function(_0x275966){return db[_0xd8f4('0x87')][_0xd8f4('0x8d')](function(_0x36ffb4){return _0x275966[_0xd8f4('0x7c')](_0x13c103['query']['ids'],{'transaction':_0x36ffb4})['then'](function(){if(!_['isEmpty'](_0x3e4afc)){return _0x275966[_0xd8f4('0x8e')](_0x3e4afc,{'transaction':_0x36ffb4});}})[_0xd8f4('0x20')](function(){_0x3e4afc['forEach'](function(_0x2c1f6b){socket['emit'](_0xd8f4('0x8f'),{'UserId':_0x2c1f6b,'ChatQueueId':_0x275966['id']});});});});});});})[_0xd8f4('0x20')](respondWithStatusCode(_0x58dd0f,null))[_0xd8f4('0x5b')](handleError(_0x58dd0f,null));};exports[_0xd8f4('0x90')]=function(_0xf7d877,_0x4aa44f,_0x18925f){return db[_0xd8f4('0x3f')]['find']({'where':{'id':_0xf7d877['params']['id']}})['then'](handleEntityNotFound(_0x4aa44f,null))['then'](function(_0x200314){if(_0x200314){return _0x200314[_0xd8f4('0x90')](_0xf7d877[_0xd8f4('0x5d')][_0xd8f4('0x7d')],_[_0xd8f4('0x91')](_0xf7d877['body'],[_0xd8f4('0x7d'),'id'])||{})[_0xd8f4('0x92')](function(_0x48214e){for(var _0x5b72b6=0x0;_0x5b72b6<_0xf7d877[_0xd8f4('0x5d')][_0xd8f4('0x7d')][_0xd8f4('0x48')];_0x5b72b6+=0x1){socket[_0xd8f4('0x7b')]('userChatQueue:save',{'UserId':_0xf7d877[_0xd8f4('0x5d')]['ids'][_0x5b72b6],'ChatQueueId':_0xf7d877[_0xd8f4('0x58')]['id']});}return _0x48214e;});}})[_0xd8f4('0x20')](respondWithResult(_0x4aa44f,null))[_0xd8f4('0x5b')](handleError(_0x4aa44f,null));};exports[_0xd8f4('0x8e')]=function(_0x16df2b,_0x31f786,_0x135b02){return db['ChatQueue'][_0xd8f4('0x5a')]({'where':{'id':_0x16df2b[_0xd8f4('0x58')]['id']}})['then'](handleEntityNotFound(_0x31f786,null))[_0xd8f4('0x20')](function(_0x1005f8){if(_0x1005f8){return _0x1005f8['removeAgents'](_0x16df2b[_0xd8f4('0x42')][_0xd8f4('0x7d')])[_0xd8f4('0x20')](function(){if(_[_0xd8f4('0x93')](_0x16df2b[_0xd8f4('0x42')][_0xd8f4('0x7d')])){for(var _0x371e49=0x0;_0x371e49<_0x16df2b[_0xd8f4('0x42')][_0xd8f4('0x7d')][_0xd8f4('0x48')];_0x371e49+=0x1){socket['emit']('userChatQueue:remove',{'UserId':Number(_0x16df2b[_0xd8f4('0x42')]['ids'][_0x371e49]),'ChatQueueId':Number(_0x16df2b['params']['id'])});}}else{socket[_0xd8f4('0x7b')]('userChatQueue:remove',{'UserId':Number(_0x16df2b[_0xd8f4('0x42')][_0xd8f4('0x7d')]),'ChatQueueId':Number(_0x16df2b[_0xd8f4('0x58')]['id'])});}});}})[_0xd8f4('0x20')](respondWithStatusCode(_0x31f786,null))[_0xd8f4('0x5b')](handleError(_0x31f786,null));};exports[_0xd8f4('0x94')]=function(_0x1fed12,_0x574187,_0xb9a08d){var _0x4718bc={};var _0x5849b5={};var _0x79e1b5;var _0xa6bda3;return db[_0xd8f4('0x3f')]['findOne']({'where':{'id':_0x1fed12[_0xd8f4('0x58')]['id']}})['then'](handleEntityNotFound(_0x574187,null))['then'](function(_0x4deaa8){if(_0x4deaa8){_0x79e1b5=_0x4deaa8;_0x5849b5[_0xd8f4('0x45')]=_['keys'](db['User'][_0xd8f4('0x40')]);_0x5849b5[_0xd8f4('0x42')]=_[_0xd8f4('0x41')](_0x1fed12['query']);_0x5849b5[_0xd8f4('0x43')]=_[_0xd8f4('0x44')](_0x5849b5[_0xd8f4('0x45')],_0x5849b5[_0xd8f4('0x42')]);_0x4718bc['attributes']=_[_0xd8f4('0x44')](_0x5849b5[_0xd8f4('0x45')],qs[_0xd8f4('0x47')](_0x1fed12[_0xd8f4('0x42')][_0xd8f4('0x47')]));_0x4718bc[_0xd8f4('0x46')]=_0x4718bc[_0xd8f4('0x46')][_0xd8f4('0x48')]?_0x4718bc[_0xd8f4('0x46')]:_0x5849b5[_0xd8f4('0x45')];_0x4718bc[_0xd8f4('0x66')]=qs[_0xd8f4('0x4b')](_0x1fed12[_0xd8f4('0x42')][_0xd8f4('0x4b')]);_0x4718bc['where']=qs['filters'](_['pick'](_0x1fed12[_0xd8f4('0x42')],_0x5849b5[_0xd8f4('0x43')]));if(_0x1fed12[_0xd8f4('0x42')][_0xd8f4('0x4d')]){_0x4718bc[_0xd8f4('0x4c')]=_[_0xd8f4('0x59')](_0x4718bc[_0xd8f4('0x4c')],{'$or':_['map'](_0x4718bc['attributes'],function(_0x503230){var _0x269250={};_0x269250[_0x503230]={'$like':'%'+_0x1fed12[_0xd8f4('0x42')][_0xd8f4('0x4d')]+'%'};return _0x269250;})});}_0x4718bc=_[_0xd8f4('0x59')]({},_0x4718bc,_0x1fed12[_0xd8f4('0x52')]);return _0x79e1b5['getAgents'](_0x4718bc);}})[_0xd8f4('0x20')](function(_0x454091){if(_0x454091){_0xa6bda3=_0x454091[_0xd8f4('0x48')];if(!_0x1fed12['query'][_0xd8f4('0x72')](_0xd8f4('0x49'))){_0x4718bc['limit']=qs[_0xd8f4('0x4a')](_0x1fed12[_0xd8f4('0x42')][_0xd8f4('0x4a')]);_0x4718bc[_0xd8f4('0x2e')]=qs[_0xd8f4('0x2e')](_0x1fed12[_0xd8f4('0x42')][_0xd8f4('0x2e')]);}return _0x79e1b5[_0xd8f4('0x94')](_0x4718bc);}})[_0xd8f4('0x20')](function(_0x4180d0){if(_0x4180d0){return _0x4180d0?{'count':_0xa6bda3,'rows':_0x4180d0}:null;}})[_0xd8f4('0x20')](respondWithResult(_0x574187,null))[_0xd8f4('0x5b')](handleError(_0x574187,null));};
\ No newline at end of file
+var _0xed40=['clone','ut.UserId\x20=\x20?','includes','all','union','compact','value','isEmpty','removeAgents','addAgents','omit','spread','isArray','userChatQueue:remove','getAgents','html-pdf','eml-format','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../mysqldb','redis','defaults','localhost','register','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','end','status','count','offset','set','json','apply','update','get','ChatQueues','UserProfileResource','destroy','stack','name','send','index','ChatQueue','rawAttributes','query','filters','intersection','model','attributes','fields','length','nolimit','limit','order','sort','where','merge','map','type','VIRTUAL','field','filter','options','includeAll','include','findAll','rows','show','params','keys','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','findOne','UserChatQueue','hasOwnProperty','User','findAndCountAll','UserId','agent','updatedAt','createdAt','format','chatPause','getTeams','Team','pick','addTeams','Agents','online','voicePause','interface','flatMap','sequelize','transaction','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','ids','select','tq.TeamId','from','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?'];(function(_0xc47835,_0x461042){var _0x2cacd3=function(_0x4d51b9){while(--_0x4d51b9){_0xc47835['push'](_0xc47835['shift']());}};_0x2cacd3(++_0x461042);}(_0xed40,0x131));var _0x0ed4=function(_0xa031c7,_0x205aaf){_0xa031c7=_0xa031c7-0x0;var _0x58644e=_0xed40[_0xa031c7];return _0x58644e;};'use strict';var pdf=require(_0x0ed4('0x0'));var emlformat=require(_0x0ed4('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x0ed4('0x2'));var jsonpatch=require(_0x0ed4('0x3'));var rp=require('request-promise');var moment=require(_0x0ed4('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x0ed4('0x5'));var util=require(_0x0ed4('0x6'));var path=require(_0x0ed4('0x7'));var sox=require(_0x0ed4('0x8'));var csv=require(_0x0ed4('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x0ed4('0xa'));var squel=require(_0x0ed4('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0ed4('0xc'));var toCsv=require(_0x0ed4('0x9'));var querystring=require(_0x0ed4('0xd'));var Papa=require('papaparse');var Redis=require(_0x0ed4('0xe'));var authService=require(_0x0ed4('0xf'));var qs=require(_0x0ed4('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x0ed4('0x11'));var utils=require(_0x0ed4('0x12'));var config=require('../../config/environment');var db=require(_0x0ed4('0x13'))['db'];config[_0x0ed4('0x14')]=_[_0x0ed4('0x15')](config[_0x0ed4('0x14')],{'host':_0x0ed4('0x16'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./chatQueue.socket')[_0x0ed4('0x17')](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0x0ed4('0x18')]({'port':0x232a});function checkPasswordPattern(_0x15038b,_0x1c40a7,_0x5858fa){if(_0x5858fa){var _0x48e9df=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x48e9df[_0x0ed4('0x19')](_0x1c40a7)){return _0x15038b;}else{throw new Error(_0x0ed4('0x1a'));}}else{return _0x15038b;}}function respondWithRpcPromise(_0x168d0e,_0x3477cb,_0x3f0f18,_0x53fd0f){return new BPromise(function(_0x3a50d4,_0x56faa4){var _0x128461=_0x53fd0f||client;return _0x128461[_0x0ed4('0x1b')](_0x168d0e,_0x3f0f18)[_0x0ed4('0x1c')](function(_0x498e55){logger[_0x0ed4('0x1d')](_0x0ed4('0x1e'),_0x3477cb,_0x0ed4('0x1f'));logger[_0x0ed4('0x20')](_0x0ed4('0x21'),_0x3477cb,_0x0ed4('0x1f'),JSON[_0x0ed4('0x22')](_0x498e55));if(_0x498e55[_0x0ed4('0x23')]){if(_0x498e55[_0x0ed4('0x23')][_0x0ed4('0x24')]===0x1f4){logger[_0x0ed4('0x23')](_0x0ed4('0x1e'),_0x3477cb,_0x498e55[_0x0ed4('0x23')][_0x0ed4('0x25')]);return _0x56faa4(_0x498e55[_0x0ed4('0x23')][_0x0ed4('0x25')]);}logger[_0x0ed4('0x23')](_0x0ed4('0x1e'),_0x3477cb,_0x498e55[_0x0ed4('0x23')][_0x0ed4('0x25')]);return _0x3a50d4(_0x498e55[_0x0ed4('0x23')]['message']);}else{logger[_0x0ed4('0x1d')](_0x0ed4('0x1e'),_0x3477cb,_0x0ed4('0x1f'));_0x3a50d4(_0x498e55[_0x0ed4('0x26')][_0x0ed4('0x25')]);}})[_0x0ed4('0x27')](function(_0x4d6bff){logger[_0x0ed4('0x23')](_0x0ed4('0x1e'),_0x3477cb,_0x4d6bff);_0x56faa4(_0x4d6bff);});});}function respondWithStatusCode(_0x4dbce3,_0x2d2491){_0x2d2491=_0x2d2491||0xcc;return function(_0x167452){if(_0x167452){return _0x4dbce3[_0x0ed4('0x28')](_0x2d2491);}return _0x4dbce3['status'](_0x2d2491)[_0x0ed4('0x29')]();};}function respondWithResult(_0x3166bf,_0x1f9b75){_0x1f9b75=_0x1f9b75||0xc8;return function(_0x11bca3){if(_0x11bca3){return _0x3166bf[_0x0ed4('0x2a')](_0x1f9b75)['json'](_0x11bca3);}};}function respondWithFilteredResult(_0x2f6140,_0x3d71dd){return function(_0x3f9381){if(_0x3f9381){var _0x102f8f=_0x3f9381[_0x0ed4('0x2b')],_0x4cd1e3=_0x3d71dd['offset'],_0x4d42d7=_0x3d71dd[_0x0ed4('0x2c')]+_0x3d71dd['limit'],_0x2aad94;if(_0x4d42d7>=_0x102f8f){_0x4d42d7=_0x102f8f;_0x2aad94=0xc8;}else{_0x2aad94=0xce;}_0x2f6140[_0x0ed4('0x2a')](_0x2aad94);return _0x2f6140[_0x0ed4('0x2d')]('Content-Range',_0x4cd1e3+'-'+_0x4d42d7+'/'+_0x102f8f)[_0x0ed4('0x2e')](_0x3f9381);}return null;};}function patchUpdates(_0x31608e){return function(_0x2a9e04){try{jsonpatch[_0x0ed4('0x2f')](_0x2a9e04,_0x31608e,!![]);}catch(_0x51ba00){return BPromise['reject'](_0x51ba00);}return _0x2a9e04['save']();};}function saveUpdates(_0x162cff,_0x5a2a90){return function(_0x21c8f0){if(_0x21c8f0){return _0x21c8f0[_0x0ed4('0x30')](_0x162cff)[_0x0ed4('0x1c')](function(_0x5e5a31){return _0x5e5a31;});}return null;};}function removeEntity(_0x299137,_0x562a88){return function(_0x476623){if(_0x476623){return _0x476623['destroy']()[_0x0ed4('0x1c')](function(){var _0x318702=_0x476623[_0x0ed4('0x31')]({'plain':!![]});var _0x533c86=_0x0ed4('0x32');return db[_0x0ed4('0x33')][_0x0ed4('0x34')]({'where':{'type':_0x533c86,'resourceId':_0x318702['id']}})[_0x0ed4('0x1c')](function(){return _0x476623;});})['then'](function(){_0x299137[_0x0ed4('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x38ea2c,_0x15fb60){return function(_0x21a07e){if(!_0x21a07e){_0x38ea2c[_0x0ed4('0x28')](0x194);}return _0x21a07e;};}function handleError(_0x594db3,_0x454570){_0x454570=_0x454570||0x1f4;return function(_0x5e3a7b){logger[_0x0ed4('0x23')](_0x5e3a7b[_0x0ed4('0x35')]);if(_0x5e3a7b[_0x0ed4('0x36')]){delete _0x5e3a7b[_0x0ed4('0x36')];}_0x594db3['status'](_0x454570)[_0x0ed4('0x37')](_0x5e3a7b);};}exports[_0x0ed4('0x38')]=function(_0x4c4526,_0x28dd7f){var _0x51ae1d={},_0x4c7437={},_0x1b4d55={'count':0x0,'rows':[]};var _0x45002d=db[_0x0ed4('0x39')][_0x0ed4('0x3a')];_0x4c7437['model']=_['keys'](_0x45002d);_0x4c7437[_0x0ed4('0x3b')]=_['keys'](_0x4c4526[_0x0ed4('0x3b')]);_0x4c7437[_0x0ed4('0x3c')]=_[_0x0ed4('0x3d')](_0x4c7437[_0x0ed4('0x3e')],_0x4c7437[_0x0ed4('0x3b')]);_0x51ae1d[_0x0ed4('0x3f')]=_[_0x0ed4('0x3d')](_0x4c7437[_0x0ed4('0x3e')],qs[_0x0ed4('0x40')](_0x4c4526[_0x0ed4('0x3b')][_0x0ed4('0x40')]));_0x51ae1d['attributes']=_0x51ae1d['attributes'][_0x0ed4('0x41')]?_0x51ae1d['attributes']:_0x4c7437[_0x0ed4('0x3e')];if(!_0x4c4526[_0x0ed4('0x3b')]['hasOwnProperty'](_0x0ed4('0x42'))){_0x51ae1d[_0x0ed4('0x43')]=qs[_0x0ed4('0x43')](_0x4c4526['query']['limit']);_0x51ae1d[_0x0ed4('0x2c')]=qs['offset'](_0x4c4526[_0x0ed4('0x3b')][_0x0ed4('0x2c')]);}_0x51ae1d[_0x0ed4('0x44')]=qs[_0x0ed4('0x45')](_0x4c4526['query']['sort']);_0x51ae1d[_0x0ed4('0x46')]=qs['filters'](_['pick'](_0x4c4526[_0x0ed4('0x3b')],_0x4c7437[_0x0ed4('0x3c')]));if(_0x4c4526[_0x0ed4('0x3b')]['filter']){_0x51ae1d[_0x0ed4('0x46')]=_[_0x0ed4('0x47')](_0x51ae1d[_0x0ed4('0x46')],{'$or':_[_0x0ed4('0x48')](_0x45002d,function(_0x481ee2){if(_0x481ee2[_0x0ed4('0x49')]['key']!==_0x0ed4('0x4a')){var _0xc482e0={};_0xc482e0[_0x481ee2[_0x0ed4('0x4b')]]={'$like':'%'+_0x4c4526[_0x0ed4('0x3b')][_0x0ed4('0x4c')]+'%'};return _0xc482e0;}})});}_0x51ae1d=_[_0x0ed4('0x47')]({},_0x51ae1d,_0x4c4526[_0x0ed4('0x4d')]);var _0x4b5cb7={'where':_0x51ae1d['where']};return db[_0x0ed4('0x39')]['count'](_0x4b5cb7)[_0x0ed4('0x1c')](function(_0x40cc3e){_0x1b4d55[_0x0ed4('0x2b')]=_0x40cc3e;if(_0x4c4526[_0x0ed4('0x3b')][_0x0ed4('0x4e')]){_0x51ae1d[_0x0ed4('0x4f')]=[{'all':!![]}];}return db['ChatQueue'][_0x0ed4('0x50')](_0x51ae1d);})['then'](function(_0x1dafa3){_0x1b4d55[_0x0ed4('0x51')]=_0x1dafa3;return _0x1b4d55;})['then'](respondWithFilteredResult(_0x28dd7f,_0x51ae1d))[_0x0ed4('0x27')](handleError(_0x28dd7f,null));};exports[_0x0ed4('0x52')]=function(_0xdf809c,_0x24d87b){var _0x562edc={'raw':!![],'where':{'id':_0xdf809c[_0x0ed4('0x53')]['id']}},_0x1d28a0={};_0x1d28a0['model']=_[_0x0ed4('0x54')](db[_0x0ed4('0x39')][_0x0ed4('0x3a')]);_0x1d28a0[_0x0ed4('0x3b')]=_[_0x0ed4('0x54')](_0xdf809c[_0x0ed4('0x3b')]);_0x1d28a0[_0x0ed4('0x3c')]=_[_0x0ed4('0x3d')](_0x1d28a0[_0x0ed4('0x3e')],_0x1d28a0[_0x0ed4('0x3b')]);_0x562edc[_0x0ed4('0x3f')]=_[_0x0ed4('0x3d')](_0x1d28a0[_0x0ed4('0x3e')],qs[_0x0ed4('0x40')](_0xdf809c[_0x0ed4('0x3b')][_0x0ed4('0x40')]));_0x562edc[_0x0ed4('0x3f')]=_0x562edc[_0x0ed4('0x3f')][_0x0ed4('0x41')]?_0x562edc[_0x0ed4('0x3f')]:_0x1d28a0[_0x0ed4('0x3e')];if(_0xdf809c['query'][_0x0ed4('0x4e')]){_0x562edc[_0x0ed4('0x4f')]=[{'all':!![]}];}_0x562edc=_[_0x0ed4('0x47')]({},_0x562edc,_0xdf809c[_0x0ed4('0x4d')]);return db[_0x0ed4('0x39')]['find'](_0x562edc)[_0x0ed4('0x1c')](handleEntityNotFound(_0x24d87b,null))[_0x0ed4('0x1c')](respondWithResult(_0x24d87b,null))[_0x0ed4('0x27')](handleError(_0x24d87b,null));};exports[_0x0ed4('0x55')]=function(_0x1b0553,_0x320bbc){return db[_0x0ed4('0x39')][_0x0ed4('0x55')](_0x1b0553['body'],{})['then'](function(_0x4309cd){var _0x194a6e=_0x1b0553[_0x0ed4('0x56')][_0x0ed4('0x31')]({'plain':!![]});if(!_0x194a6e)throw new Error(_0x0ed4('0x57'));if(_0x194a6e[_0x0ed4('0x58')]==='user'){var _0x3cb3ba=_0x4309cd['get']({'plain':!![]});var _0x5d9c0d='ChatQueues';return db[_0x0ed4('0x59')][_0x0ed4('0x5a')]({'where':{'name':_0x5d9c0d,'userProfileId':_0x194a6e['userProfileId']},'raw':!![]})['then'](function(_0x4593f5){if(_0x4593f5&&_0x4593f5['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x3cb3ba[_0x0ed4('0x36')],'resourceId':_0x3cb3ba['id'],'type':_0x4593f5[_0x0ed4('0x36')],'sectionId':_0x4593f5['id']},{})[_0x0ed4('0x1c')](function(){return _0x4309cd;});}else{return _0x4309cd;}})[_0x0ed4('0x27')](function(_0x198f88){logger[_0x0ed4('0x23')](_0x0ed4('0x5b'),_0x198f88);throw _0x198f88;});}return _0x4309cd;})[_0x0ed4('0x1c')](respondWithResult(_0x320bbc,0xc9))[_0x0ed4('0x27')](handleError(_0x320bbc,null));};exports['update']=function(_0x5a60f7,_0x411562){if(_0x5a60f7[_0x0ed4('0x5c')]['id']){delete _0x5a60f7[_0x0ed4('0x5c')]['id'];}return db[_0x0ed4('0x39')][_0x0ed4('0x5a')]({'where':{'id':_0x5a60f7[_0x0ed4('0x53')]['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x411562,null))[_0x0ed4('0x1c')](saveUpdates(_0x5a60f7[_0x0ed4('0x5c')],null))[_0x0ed4('0x1c')](respondWithResult(_0x411562,null))[_0x0ed4('0x27')](handleError(_0x411562,null));};exports[_0x0ed4('0x34')]=function(_0x3c4b65,_0x12f475){return db[_0x0ed4('0x39')][_0x0ed4('0x5a')]({'where':{'id':_0x3c4b65['params']['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x12f475,null))[_0x0ed4('0x1c')](removeEntity(_0x12f475,null))[_0x0ed4('0x27')](handleError(_0x12f475,null));};exports['describe']=function(_0x5cda1f,_0x1fe30b){return db[_0x0ed4('0x39')][_0x0ed4('0x5d')]()[_0x0ed4('0x1c')](respondWithResult(_0x1fe30b,null))[_0x0ed4('0x27')](handleError(_0x1fe30b,null));};exports['getMembers']=function(_0x553a8c,_0x562fb2,_0x347d89){var _0x44888b={'raw':!![],'where':{}},_0x50abd3={},_0x281631;return db[_0x0ed4('0x39')][_0x0ed4('0x5e')]({'where':{'id':_0x553a8c[_0x0ed4('0x53')]['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x562fb2,null))['then'](function(_0x485477){if(_0x485477){_0x281631=_0x485477['get']({'plain':!![]});_0x50abd3[_0x0ed4('0x3e')]=_[_0x0ed4('0x54')](db[_0x0ed4('0x5f')]['rawAttributes']);_0x50abd3[_0x0ed4('0x3b')]=_[_0x0ed4('0x54')](_0x553a8c['query']);_0x50abd3[_0x0ed4('0x3c')]=_[_0x0ed4('0x3d')](_0x50abd3[_0x0ed4('0x3e')],_0x50abd3['query']);_0x44888b[_0x0ed4('0x3f')]=_[_0x0ed4('0x3d')](_0x50abd3[_0x0ed4('0x3e')],qs['fields'](_0x553a8c[_0x0ed4('0x3b')][_0x0ed4('0x40')]));_0x44888b[_0x0ed4('0x3f')]=_0x44888b['attributes']['length']?_0x44888b['attributes']:_0x50abd3[_0x0ed4('0x3e')];if(!_0x553a8c['query'][_0x0ed4('0x60')](_0x0ed4('0x42'))){_0x44888b[_0x0ed4('0x43')]=qs['limit'](_0x553a8c[_0x0ed4('0x3b')]['limit']);_0x44888b[_0x0ed4('0x2c')]=qs[_0x0ed4('0x2c')](_0x553a8c[_0x0ed4('0x3b')]['offset']);}_0x44888b[_0x0ed4('0x44')]=qs[_0x0ed4('0x45')](_0x553a8c[_0x0ed4('0x3b')][_0x0ed4('0x45')]);_0x44888b[_0x0ed4('0x46')]=qs[_0x0ed4('0x3c')](_['pick'](_0x553a8c[_0x0ed4('0x3b')],_0x50abd3[_0x0ed4('0x3c')]));_0x44888b['where']['ChatQueueId']=_0x485477['id'];if(_0x553a8c[_0x0ed4('0x3b')][_0x0ed4('0x4c')]){_0x44888b[_0x0ed4('0x46')]=_[_0x0ed4('0x47')](_0x44888b['where'],{'$or':_[_0x0ed4('0x48')](_0x44888b[_0x0ed4('0x3f')],function(_0x2734df){var _0x11296f={};_0x11296f[_0x2734df]={'$like':'%'+_0x553a8c['query']['filter']+'%'};return _0x11296f;})});}_0x44888b=_['merge']({},_0x44888b,_0x553a8c[_0x0ed4('0x4d')]);return db[_0x0ed4('0x5f')]['findAll'](_0x44888b);}})[_0x0ed4('0x1c')](function(_0x91311){if(_0x91311){return db[_0x0ed4('0x61')][_0x0ed4('0x62')]({'where':{'id':_[_0x0ed4('0x48')](_0x91311,_0x0ed4('0x63')),'role':_0x0ed4('0x64')},'attributes':['id',_0x0ed4('0x36'),'chatPause',_0x0ed4('0x65'),_0x0ed4('0x66')]});}})['then'](function(_0x390cac){if(_0x390cac){return{'count':_0x390cac['count'],'rows':_[_0x0ed4('0x48')](_0x390cac['rows'],function(_0x17248b){return{'membername':_0x17248b['name'],'UserId':_0x17248b['id'],'queue_name':_0x281631[_0x0ed4('0x36')],'ChatQueueId':_0x281631['id'],'interface':util[_0x0ed4('0x67')]('%s/%s','SIP',_0x17248b['name']),'penalty':0x0,'paused':_0x17248b[_0x0ed4('0x68')],'createdAt':_0x17248b[_0x0ed4('0x66')],'updatedAt':_0x17248b[_0x0ed4('0x65')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x0ed4('0x1c')](respondWithFilteredResult(_0x562fb2,_0x44888b))['catch'](handleError(_0x562fb2,null));};exports[_0x0ed4('0x69')]=function(_0x3e2a60,_0x40a489,_0x5bf99c){var _0x234734={};var _0x3a1875={};var _0x2b54a9;var _0x28484a;return db[_0x0ed4('0x39')]['findOne']({'where':{'id':_0x3e2a60[_0x0ed4('0x53')]['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x40a489,null))[_0x0ed4('0x1c')](function(_0x25d99d){if(_0x25d99d){_0x2b54a9=_0x25d99d;_0x3a1875[_0x0ed4('0x3e')]=_[_0x0ed4('0x54')](db[_0x0ed4('0x6a')][_0x0ed4('0x3a')]);_0x3a1875[_0x0ed4('0x3b')]=_['keys'](_0x3e2a60[_0x0ed4('0x3b')]);_0x3a1875['filters']=_[_0x0ed4('0x3d')](_0x3a1875[_0x0ed4('0x3e')],_0x3a1875[_0x0ed4('0x3b')]);_0x234734[_0x0ed4('0x3f')]=_[_0x0ed4('0x3d')](_0x3a1875[_0x0ed4('0x3e')],qs['fields'](_0x3e2a60[_0x0ed4('0x3b')][_0x0ed4('0x40')]));_0x234734['attributes']=_0x234734[_0x0ed4('0x3f')][_0x0ed4('0x41')]?_0x234734[_0x0ed4('0x3f')]:_0x3a1875[_0x0ed4('0x3e')];_0x234734[_0x0ed4('0x44')]=qs[_0x0ed4('0x45')](_0x3e2a60['query'][_0x0ed4('0x45')]);_0x234734[_0x0ed4('0x46')]=qs[_0x0ed4('0x3c')](_[_0x0ed4('0x6b')](_0x3e2a60['query'],_0x3a1875[_0x0ed4('0x3c')]));if(_0x3e2a60[_0x0ed4('0x3b')]['filter']){_0x234734[_0x0ed4('0x46')]=_[_0x0ed4('0x47')](_0x234734[_0x0ed4('0x46')],{'$or':_[_0x0ed4('0x48')](_0x234734[_0x0ed4('0x3f')],function(_0x47daa1){var _0x5802be={};_0x5802be[_0x47daa1]={'$like':'%'+_0x3e2a60['query'][_0x0ed4('0x4c')]+'%'};return _0x5802be;})});}_0x234734=_[_0x0ed4('0x47')]({},_0x234734,_0x3e2a60[_0x0ed4('0x4d')]);return _0x2b54a9[_0x0ed4('0x69')](_0x234734);}})[_0x0ed4('0x1c')](function(_0xa42a12){if(_0xa42a12){_0x28484a=_0xa42a12['length'];if(!_0x3e2a60[_0x0ed4('0x3b')][_0x0ed4('0x60')](_0x0ed4('0x42'))){_0x234734[_0x0ed4('0x43')]=qs[_0x0ed4('0x43')](_0x3e2a60['query']['limit']);_0x234734[_0x0ed4('0x2c')]=qs[_0x0ed4('0x2c')](_0x3e2a60['query']['offset']);}return _0x2b54a9['getTeams'](_0x234734);}})[_0x0ed4('0x1c')](function(_0x43605d){if(_0x43605d){return _0x43605d?{'count':_0x28484a,'rows':_0x43605d}:null;}})[_0x0ed4('0x1c')](respondWithResult(_0x40a489,null))[_0x0ed4('0x27')](handleError(_0x40a489,null));};exports[_0x0ed4('0x6c')]=function(_0x419661,_0x577163,_0xaaed31){var _0x53c9a2=_0x419661[_0x0ed4('0x5c')]['teams'];return db['Team']['findAll']({'where':{'id':_['map'](_0x53c9a2,'id')},'attributes':['id'],'include':[{'model':db[_0x0ed4('0x61')],'as':_0x0ed4('0x6d'),'attributes':['id','name',_0x0ed4('0x6e'),_0x0ed4('0x6f'),_0x0ed4('0x70')],'raw':!![]}]})[_0x0ed4('0x1c')](function(_0x333bde){if(_0x333bde){var _0x2fb335=_[_0x0ed4('0x71')](_0x333bde,function(_0x3d30d8){var _0x14d596=_0x3d30d8['get']({'plain':!![]});return _0x14d596['Agents'];});return db[_0x0ed4('0x39')]['find']({'where':{'id':_0x419661['params']['id']}})[_0x0ed4('0x1c')](function(_0x23b179){return db[_0x0ed4('0x72')][_0x0ed4('0x73')](function(_0x160349){return _0x23b179[_0x0ed4('0x6c')](_['map'](_0x53c9a2,'id'),{'transaction':_0x160349})[_0x0ed4('0x1c')](function(){return BPromise['each'](_0x2fb335,function(_0x3bd559){return db[_0x0ed4('0x5f')][_0x0ed4('0x74')]({'where':{'UserId':_0x3bd559['id'],'ChatQueueId':_0x419661[_0x0ed4('0x53')]['id']},'transaction':_0x160349});});})[_0x0ed4('0x1c')](function(){_0x2fb335[_0x0ed4('0x75')](function(_0x3a3d4f){socket[_0x0ed4('0x76')](_0x0ed4('0x77'),{'UserId':_0x3a3d4f['id'],'ChatQueueId':_0x23b179['id']});});});});});}})[_0x0ed4('0x1c')](respondWithStatusCode(_0x577163,null))['catch'](handleError(_0x577163,null));};exports[_0x0ed4('0x78')]=function(_0x3285d8,_0x3ef674,_0x1e3d69){return db['Team']['findAll']({'where':{'id':_0x3285d8['query'][_0x0ed4('0x79')]},'attributes':['id'],'include':[{'model':db[_0x0ed4('0x61')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x0ed4('0x1c')](handleEntityNotFound(_0x3ef674,null))['then'](function(_0x4deea2){var _0x4527a8=_[_0x0ed4('0x48')](_0x4deea2,'id');var _0x13da58=[];var _0xa8d51f=[];var _0x3fd4b6=squel[_0x0ed4('0x7a')]();_0x3fd4b6['field'](_0x0ed4('0x7b'))[_0x0ed4('0x7c')](_0x0ed4('0x7d'),'tq')[_0x0ed4('0x7e')](_0x0ed4('0x7f'),'ut',_0x0ed4('0x80'))[_0x0ed4('0x46')](_0x0ed4('0x81'),_0x3285d8[_0x0ed4('0x53')]['id']);for(var _0x396c26=0x0;_0x396c26<_0x4deea2[_0x0ed4('0x41')];_0x396c26+=0x1){let _0x1ade14=_0x4deea2[_0x396c26];for(var _0x320d86=0x0;_0x320d86<_0x1ade14['Agents'][_0x0ed4('0x41')];_0x320d86+=0x1){let _0x319186=_0x1ade14[_0x0ed4('0x6d')][_0x320d86];var _0x14ab2b=_0x3fd4b6[_0x0ed4('0x82')]();_0x14ab2b[_0x0ed4('0x46')](_0x0ed4('0x83'),_0x319186['id']);_0xa8d51f['push'](db[_0x0ed4('0x72')][_0x0ed4('0x3b')](_0x14ab2b['toString'](),{'type':db[_0x0ed4('0x72')]['QueryTypes']['SELECT']})[_0x0ed4('0x1c')](function(_0x46e071){if(_0x46e071[_0x0ed4('0x41')]===0x1){return _0x319186['id'];}else{var _0x105103=_['every'](_[_0x0ed4('0x48')](_0x46e071,'TeamId'),function(_0x18f398){return _[_0x0ed4('0x84')](_0x4527a8,_0x18f398);});if(_0x105103){return _0x319186['id'];}}}));}}return BPromise[_0x0ed4('0x85')](_0xa8d51f)[_0x0ed4('0x1c')](function(_0x5ae2e3){_0x13da58=_(_0x13da58)[_0x0ed4('0x86')](_0x5ae2e3)[_0x0ed4('0x87')]()[_0x0ed4('0x88')]();return db['ChatQueue'][_0x0ed4('0x5a')]({'where':{'id':_0x3285d8[_0x0ed4('0x53')]['id']}})[_0x0ed4('0x1c')](function(_0x365a30){return db[_0x0ed4('0x72')]['transaction'](function(_0x212b13){return _0x365a30[_0x0ed4('0x78')](_0x3285d8[_0x0ed4('0x3b')]['ids'],{'transaction':_0x212b13})[_0x0ed4('0x1c')](function(){if(!_[_0x0ed4('0x89')](_0x13da58)){return _0x365a30[_0x0ed4('0x8a')](_0x13da58,{'transaction':_0x212b13});}})['then'](function(){_0x13da58['forEach'](function(_0x5887b5){socket[_0x0ed4('0x76')]('userChatQueue:remove',{'UserId':_0x5887b5,'ChatQueueId':_0x365a30['id']});});});});});});})[_0x0ed4('0x1c')](respondWithStatusCode(_0x3ef674,null))[_0x0ed4('0x27')](handleError(_0x3ef674,null));};exports[_0x0ed4('0x8b')]=function(_0x5636d7,_0x3270de,_0x1c540e){return db['ChatQueue']['find']({'where':{'id':_0x5636d7['params']['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x3270de,null))[_0x0ed4('0x1c')](function(_0x55b53a){if(_0x55b53a){return _0x55b53a[_0x0ed4('0x8b')](_0x5636d7[_0x0ed4('0x5c')][_0x0ed4('0x79')],_[_0x0ed4('0x8c')](_0x5636d7[_0x0ed4('0x5c')],['ids','id'])||{})[_0x0ed4('0x8d')](function(_0x1254d1){for(var _0x170d0f=0x0;_0x170d0f<_0x5636d7['body'][_0x0ed4('0x79')][_0x0ed4('0x41')];_0x170d0f+=0x1){socket[_0x0ed4('0x76')](_0x0ed4('0x77'),{'UserId':_0x5636d7['body'][_0x0ed4('0x79')][_0x170d0f],'ChatQueueId':_0x5636d7[_0x0ed4('0x53')]['id']});}return _0x1254d1;});}})['then'](respondWithResult(_0x3270de,null))[_0x0ed4('0x27')](handleError(_0x3270de,null));};exports[_0x0ed4('0x8a')]=function(_0x3b8502,_0x3c7b8d,_0x5e0f78){return db[_0x0ed4('0x39')]['find']({'where':{'id':_0x3b8502[_0x0ed4('0x53')]['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x3c7b8d,null))[_0x0ed4('0x1c')](function(_0x4c1a0c){if(_0x4c1a0c){return _0x4c1a0c[_0x0ed4('0x8a')](_0x3b8502[_0x0ed4('0x3b')][_0x0ed4('0x79')])[_0x0ed4('0x1c')](function(){if(_[_0x0ed4('0x8e')](_0x3b8502[_0x0ed4('0x3b')][_0x0ed4('0x79')])){for(var _0x3f9653=0x0;_0x3f9653<_0x3b8502['query'][_0x0ed4('0x79')][_0x0ed4('0x41')];_0x3f9653+=0x1){socket[_0x0ed4('0x76')](_0x0ed4('0x8f'),{'UserId':Number(_0x3b8502[_0x0ed4('0x3b')]['ids'][_0x3f9653]),'ChatQueueId':Number(_0x3b8502[_0x0ed4('0x53')]['id'])});}}else{socket[_0x0ed4('0x76')](_0x0ed4('0x8f'),{'UserId':Number(_0x3b8502[_0x0ed4('0x3b')][_0x0ed4('0x79')]),'ChatQueueId':Number(_0x3b8502[_0x0ed4('0x53')]['id'])});}});}})[_0x0ed4('0x1c')](respondWithStatusCode(_0x3c7b8d,null))[_0x0ed4('0x27')](handleError(_0x3c7b8d,null));};exports[_0x0ed4('0x90')]=function(_0x13c5b2,_0x1b1ab5,_0x1edc74){var _0xf8653e={};var _0x11d2d5={};var _0x16012f;var _0x389dff;return db[_0x0ed4('0x39')][_0x0ed4('0x5e')]({'where':{'id':_0x13c5b2['params']['id']}})[_0x0ed4('0x1c')](handleEntityNotFound(_0x1b1ab5,null))[_0x0ed4('0x1c')](function(_0x491f76){if(_0x491f76){_0x16012f=_0x491f76;_0x11d2d5[_0x0ed4('0x3e')]=_[_0x0ed4('0x54')](db[_0x0ed4('0x61')][_0x0ed4('0x3a')]);_0x11d2d5[_0x0ed4('0x3b')]=_[_0x0ed4('0x54')](_0x13c5b2[_0x0ed4('0x3b')]);_0x11d2d5['filters']=_[_0x0ed4('0x3d')](_0x11d2d5[_0x0ed4('0x3e')],_0x11d2d5[_0x0ed4('0x3b')]);_0xf8653e['attributes']=_[_0x0ed4('0x3d')](_0x11d2d5[_0x0ed4('0x3e')],qs['fields'](_0x13c5b2['query'][_0x0ed4('0x40')]));_0xf8653e['attributes']=_0xf8653e[_0x0ed4('0x3f')][_0x0ed4('0x41')]?_0xf8653e['attributes']:_0x11d2d5[_0x0ed4('0x3e')];_0xf8653e[_0x0ed4('0x44')]=qs[_0x0ed4('0x45')](_0x13c5b2[_0x0ed4('0x3b')]['sort']);_0xf8653e[_0x0ed4('0x46')]=qs[_0x0ed4('0x3c')](_[_0x0ed4('0x6b')](_0x13c5b2[_0x0ed4('0x3b')],_0x11d2d5[_0x0ed4('0x3c')]));if(_0x13c5b2['query']['filter']){_0xf8653e[_0x0ed4('0x46')]=_[_0x0ed4('0x47')](_0xf8653e['where'],{'$or':_[_0x0ed4('0x48')](_0xf8653e['attributes'],function(_0x17cec2){var _0x1d5e1d={};_0x1d5e1d[_0x17cec2]={'$like':'%'+_0x13c5b2[_0x0ed4('0x3b')]['filter']+'%'};return _0x1d5e1d;})});}_0xf8653e=_['merge']({},_0xf8653e,_0x13c5b2[_0x0ed4('0x4d')]);return _0x16012f[_0x0ed4('0x90')](_0xf8653e);}})[_0x0ed4('0x1c')](function(_0x4c8d63){if(_0x4c8d63){_0x389dff=_0x4c8d63[_0x0ed4('0x41')];if(!_0x13c5b2[_0x0ed4('0x3b')]['hasOwnProperty']('nolimit')){_0xf8653e[_0x0ed4('0x43')]=qs[_0x0ed4('0x43')](_0x13c5b2[_0x0ed4('0x3b')][_0x0ed4('0x43')]);_0xf8653e[_0x0ed4('0x2c')]=qs[_0x0ed4('0x2c')](_0x13c5b2[_0x0ed4('0x3b')][_0x0ed4('0x2c')]);}return _0x16012f[_0x0ed4('0x90')](_0xf8653e);}})[_0x0ed4('0x1c')](function(_0x59df3f){if(_0x59df3f){return _0x59df3f?{'count':_0x389dff,'rows':_0x59df3f}:null;}})[_0x0ed4('0x1c')](respondWithResult(_0x1b1ab5,null))[_0x0ed4('0x27')](handleError(_0x1b1ab5,null));};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js
index 4e215f3..a7b8bdc 100644
--- a/server/api/chatQueue/chatQueue.events.js
+++ b/server/api/chatQueue/chatQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd139=['save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x47cd67,_0x20af6d){var _0x261c9d=function(_0x144782){while(--_0x144782){_0x47cd67['push'](_0x47cd67['shift']());}};_0x261c9d(++_0x20af6d);}(_0xd139,0x14e));var _0x9d13=function(_0x5cd0c9,_0x54b868){_0x5cd0c9=_0x5cd0c9-0x0;var _0x37517f=_0xd139[_0x5cd0c9];return _0x37517f;};'use strict';var EventEmitter=require(_0x9d13('0x0'));var ChatQueue=require(_0x9d13('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9d13('0x2'),'afterUpdate':_0x9d13('0x3'),'afterDestroy':_0x9d13('0x4')};function emitEvent(_0x1994e8){return function(_0x1d39f0,_0xdeacf6,_0x16b9f2){ChatQueueEvents['emit'](_0x1994e8+':'+_0x1d39f0['id'],_0x1d39f0);ChatQueueEvents[_0x9d13('0x5')](_0x1994e8,_0x1d39f0);_0x16b9f2(null);};}for(var e in events){if(events[_0x9d13('0x6')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0x9d13('0x7')]=ChatQueueEvents;
\ No newline at end of file
+var _0xdd6e=['emit','hasOwnProperty','exports','events','../../mysqldb','ChatQueue','setMaxListeners','update','remove'];(function(_0x501d24,_0x33face){var _0x43624d=function(_0x2ac76e){while(--_0x2ac76e){_0x501d24['push'](_0x501d24['shift']());}};_0x43624d(++_0x33face);}(_0xdd6e,0xa5));var _0xedd6=function(_0x4a3a58,_0x53484e){_0x4a3a58=_0x4a3a58-0x0;var _0x4062e3=_0xdd6e[_0x4a3a58];return _0x4062e3;};'use strict';var EventEmitter=require(_0xedd6('0x0'));var ChatQueue=require(_0xedd6('0x1'))['db'][_0xedd6('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0xedd6('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xedd6('0x4'),'afterDestroy':_0xedd6('0x5')};function emitEvent(_0x2243ce){return function(_0x2620a1,_0x5aefb8,_0x4fcb28){ChatQueueEvents['emit'](_0x2243ce+':'+_0x2620a1['id'],_0x2620a1);ChatQueueEvents[_0xedd6('0x6')](_0x2243ce,_0x2620a1);_0x4fcb28(null);};}for(var e in events){if(events[_0xedd6('0x7')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0xedd6('0x8')]=ChatQueueEvents;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js
index e5f584e..3593454 100644
--- a/server/api/chatQueue/chatQueue.model.js
+++ b/server/api/chatQueue/chatQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6d2d=['chat_queues','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatQueue.attributes','exports','ChatQueue'];(function(_0x244258,_0x379140){var _0x3d0240=function(_0x236540){while(--_0x236540){_0x244258['push'](_0x244258['shift']());}};_0x3d0240(++_0x379140);}(_0x6d2d,0xbc));var _0xd6d2=function(_0x5d5dc5,_0x332e93){_0x5d5dc5=_0x5d5dc5-0x0;var _0x1b1ad5=_0x6d2d[_0x5d5dc5];return _0x1b1ad5;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xd6d2('0x0'))(_0xd6d2('0x1'));var moment=require(_0xd6d2('0x2'));var BPromise=require('bluebird');var rp=require(_0xd6d2('0x3'));var fs=require('fs');var path=require(_0xd6d2('0x4'));var rimraf=require(_0xd6d2('0x5'));var config=require(_0xd6d2('0x6'));var attributes=require(_0xd6d2('0x7'));module[_0xd6d2('0x8')]=function(_0x32ebf,_0x2265d5){return _0x32ebf['define'](_0xd6d2('0x9'),attributes,{'tableName':_0xd6d2('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2d93=['../../config/environment','./chatQueue.attributes','exports','ChatQueue','chat_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x29baa5,_0x26e470){var _0x3fc908=function(_0x283369){while(--_0x283369){_0x29baa5['push'](_0x29baa5['shift']());}};_0x3fc908(++_0x26e470);}(_0x2d93,0xf3));var _0x32d9=function(_0x577519,_0x346daf){_0x577519=_0x577519-0x0;var _0x5b12f7=_0x2d93[_0x577519];return _0x5b12f7;};'use strict';var _=require(_0x32d9('0x0'));var util=require(_0x32d9('0x1'));var logger=require(_0x32d9('0x2'))(_0x32d9('0x3'));var moment=require(_0x32d9('0x4'));var BPromise=require(_0x32d9('0x5'));var rp=require(_0x32d9('0x6'));var fs=require('fs');var path=require(_0x32d9('0x7'));var rimraf=require(_0x32d9('0x8'));var config=require(_0x32d9('0x9'));var attributes=require(_0x32d9('0xa'));module[_0x32d9('0xb')]=function(_0x9b4979,_0x3529db){return _0x9b4979['define'](_0x32d9('0xc'),attributes,{'tableName':_0x32d9('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.rpc.js b/server/api/chatQueue/chatQueue.rpc.js
index f0e821d..a18faae 100644
--- a/server/api/chatQueue/chatQueue.rpc.js
+++ b/server/api/chatQueue/chatQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3a5e=['client','http','redis','defaults','socket.io-emitter','info','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatQueue,\x20%s,\x20%s','message','result','catch','GetChatQueue','findAll','options','raw','where','attributes','limit','include','model','map','ShowChatQueue','then','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x1e2e64,_0x2d1ccc){var _0x2e5ca9=function(_0x35eeba){while(--_0x35eeba){_0x1e2e64['push'](_0x1e2e64['shift']());}};_0x2e5ca9(++_0x2d1ccc);}(_0x3a5e,0x1e4));var _0xe3a5=function(_0x30a6a0,_0x4516cc){_0x30a6a0=_0x30a6a0-0x0;var _0x8867c3=_0x3a5e[_0x30a6a0];return _0x8867c3;};'use strict';var _=require(_0xe3a5('0x0'));var util=require(_0xe3a5('0x1'));var moment=require(_0xe3a5('0x2'));var BPromise=require('bluebird');var rs=require(_0xe3a5('0x3'));var fs=require('fs');var Redis=require(_0xe3a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe3a5('0x5'));var logger=require(_0xe3a5('0x6'))(_0xe3a5('0x7'));var config=require(_0xe3a5('0x8'));var jayson=require(_0xe3a5('0x9'));var client=jayson[_0xe3a5('0xa')][_0xe3a5('0xb')]({'port':0x232a});config[_0xe3a5('0xc')]=_[_0xe3a5('0xd')](config[_0xe3a5('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0xe3a5('0xe'))(new Redis(config['redis']));require('./chatQueue.socket')['register'](socket);function respondWithRpcPromise(_0x4a65af,_0x38cdc1,_0x315b25){return new BPromise(function(_0x43b992,_0x2a8f51){return client['request'](_0x4a65af,_0x315b25)['then'](function(_0x4b38b7){logger[_0xe3a5('0xf')]('ChatQueue,\x20%s,\x20%s',_0x38cdc1,_0xe3a5('0x10'));logger[_0xe3a5('0x11')](_0xe3a5('0x12'),_0x38cdc1,_0xe3a5('0x10'),JSON[_0xe3a5('0x13')](_0x4b38b7));if(_0x4b38b7['error']){if(_0x4b38b7[_0xe3a5('0x14')][_0xe3a5('0x15')]===0x1f4){logger[_0xe3a5('0x14')](_0xe3a5('0x16'),_0x38cdc1,_0x4b38b7[_0xe3a5('0x14')][_0xe3a5('0x17')]);return _0x2a8f51(_0x4b38b7[_0xe3a5('0x14')][_0xe3a5('0x17')]);}logger['error'](_0xe3a5('0x16'),_0x38cdc1,_0x4b38b7[_0xe3a5('0x14')][_0xe3a5('0x17')]);return _0x43b992(_0x4b38b7[_0xe3a5('0x14')]['message']);}else{logger[_0xe3a5('0xf')](_0xe3a5('0x16'),_0x38cdc1,_0xe3a5('0x10'));_0x43b992(_0x4b38b7[_0xe3a5('0x18')][_0xe3a5('0x17')]);}})[_0xe3a5('0x19')](function(_0x43a005){logger[_0xe3a5('0x14')](_0xe3a5('0x16'),_0x38cdc1,_0x43a005);_0x2a8f51(_0x43a005);});});}exports[_0xe3a5('0x1a')]=function(_0x34db9c){var _0x5e8081=this;return new Promise(function(_0x5b6efa,_0xde01e){return db['ChatQueue'][_0xe3a5('0x1b')]({'raw':_0x34db9c['options']?_0x34db9c[_0xe3a5('0x1c')][_0xe3a5('0x1d')]===undefined?!![]:![]:!![],'where':_0x34db9c['options']?_0x34db9c[_0xe3a5('0x1c')][_0xe3a5('0x1e')]||null:null,'attributes':_0x34db9c[_0xe3a5('0x1c')]?_0x34db9c[_0xe3a5('0x1c')][_0xe3a5('0x1f')]||null:null,'limit':_0x34db9c['options']?_0x34db9c[_0xe3a5('0x1c')][_0xe3a5('0x20')]||null:null,'include':_0x34db9c[_0xe3a5('0x1c')]?_0x34db9c['options'][_0xe3a5('0x21')]?_['map'](_0x34db9c[_0xe3a5('0x1c')][_0xe3a5('0x21')],function(_0x24b21a){return{'model':db[_0x24b21a[_0xe3a5('0x22')]],'as':_0x24b21a['as'],'attributes':_0x24b21a['attributes'],'include':_0x24b21a[_0xe3a5('0x21')]?_[_0xe3a5('0x23')](_0x24b21a['include'],function(_0x4d3068){return{'model':db[_0x4d3068[_0xe3a5('0x22')]],'as':_0x4d3068['as'],'attributes':_0x4d3068[_0xe3a5('0x1f')],'include':_0x4d3068[_0xe3a5('0x21')]?_[_0xe3a5('0x23')](_0x4d3068[_0xe3a5('0x21')],function(_0x1c7708){return{'model':db[_0x1c7708['model']],'as':_0x1c7708['as'],'attributes':_0x1c7708[_0xe3a5('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x390362){logger[_0xe3a5('0xf')]('GetChatQueue',_0x34db9c);logger[_0xe3a5('0x11')](_0xe3a5('0x1a'),_0x34db9c,JSON['stringify'](_0x390362));_0x5b6efa(_0x390362);})[_0xe3a5('0x19')](function(_0x4d8537){logger['error'](_0xe3a5('0x1a'),_0x4d8537['message'],_0x34db9c);_0xde01e(_0x5e8081['error'](0x1f4,_0x4d8537[_0xe3a5('0x17')]));});});};exports[_0xe3a5('0x24')]=function(_0x173b38){var _0x4f85bb=this;return new Promise(function(_0x518a20,_0x4c7f3f){return db['ChatQueue']['find']({'raw':_0x173b38[_0xe3a5('0x1c')]?_0x173b38[_0xe3a5('0x1c')][_0xe3a5('0x1d')]===undefined?!![]:![]:!![],'where':_0x173b38[_0xe3a5('0x1c')]?_0x173b38['options']['where']||null:null,'attributes':_0x173b38[_0xe3a5('0x1c')]?_0x173b38[_0xe3a5('0x1c')][_0xe3a5('0x1f')]||null:null,'include':_0x173b38['options']?_0x173b38['options'][_0xe3a5('0x21')]?_[_0xe3a5('0x23')](_0x173b38[_0xe3a5('0x1c')][_0xe3a5('0x21')],function(_0x444407){return{'model':db[_0x444407[_0xe3a5('0x22')]],'as':_0x444407['as'],'attributes':_0x444407[_0xe3a5('0x1f')],'include':_0x444407['include']?_[_0xe3a5('0x23')](_0x444407[_0xe3a5('0x21')],function(_0x226e2f){return{'model':db[_0x226e2f['model']],'as':_0x226e2f['as'],'attributes':_0x226e2f[_0xe3a5('0x1f')],'include':_0x226e2f[_0xe3a5('0x21')]?_[_0xe3a5('0x23')](_0x226e2f[_0xe3a5('0x21')],function(_0x58c0c8){return{'model':db[_0x58c0c8[_0xe3a5('0x22')]],'as':_0x58c0c8['as'],'attributes':_0x58c0c8['attributes']};}):[]};}):[]};}):[]:[]})[_0xe3a5('0x25')](function(_0x4ad27f){logger[_0xe3a5('0xf')](_0xe3a5('0x24'),_0x173b38);logger[_0xe3a5('0x11')](_0xe3a5('0x24'),_0x173b38,JSON[_0xe3a5('0x13')](_0x4ad27f));_0x518a20(_0x4ad27f);})['catch'](function(_0x430f10){logger[_0xe3a5('0x14')](_0xe3a5('0x24'),_0x430f10[_0xe3a5('0x17')],_0x173b38);_0x4c7f3f(_0x4f85bb[_0xe3a5('0x14')](0x1f4,_0x430f10[_0xe3a5('0x17')]));});});};
\ No newline at end of file
+var _0xf5a3=['catch','GetChatQueue','options','raw','attributes','limit','map','include','model','ShowChatQueue','ChatQueue','find','where','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','defaults','redis','socket.io-emitter','./chatQueue.socket','register','request','then','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x4c2e29,_0x4177be){var _0x11ab0f=function(_0x52dd8a){while(--_0x52dd8a){_0x4c2e29['push'](_0x4c2e29['shift']());}};_0x11ab0f(++_0x4177be);}(_0xf5a3,0x16c));var _0x3f5a=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0xf5a3[_0x49b207];return _0x2dc8fa;};'use strict';var _=require(_0x3f5a('0x0'));var util=require(_0x3f5a('0x1'));var moment=require(_0x3f5a('0x2'));var BPromise=require(_0x3f5a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3f5a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3f5a('0x5'))('rpc');var config=require(_0x3f5a('0x6'));var jayson=require(_0x3f5a('0x7'));var client=jayson[_0x3f5a('0x8')][_0x3f5a('0x9')]({'port':0x232a});config['redis']=_[_0x3f5a('0xa')](config[_0x3f5a('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x3f5a('0xc'))(new Redis(config[_0x3f5a('0xb')]));require(_0x3f5a('0xd'))[_0x3f5a('0xe')](socket);function respondWithRpcPromise(_0x457639,_0x2fc555,_0x593e71){return new BPromise(function(_0x3a8ab4,_0x50979d){return client[_0x3f5a('0xf')](_0x457639,_0x593e71)[_0x3f5a('0x10')](function(_0x256659){logger['info'](_0x3f5a('0x11'),_0x2fc555,_0x3f5a('0x12'));logger[_0x3f5a('0x13')](_0x3f5a('0x14'),_0x2fc555,'request\x20sent',JSON[_0x3f5a('0x15')](_0x256659));if(_0x256659[_0x3f5a('0x16')]){if(_0x256659[_0x3f5a('0x16')][_0x3f5a('0x17')]===0x1f4){logger[_0x3f5a('0x16')]('ChatQueue,\x20%s,\x20%s',_0x2fc555,_0x256659[_0x3f5a('0x16')][_0x3f5a('0x18')]);return _0x50979d(_0x256659[_0x3f5a('0x16')][_0x3f5a('0x18')]);}logger[_0x3f5a('0x16')](_0x3f5a('0x11'),_0x2fc555,_0x256659[_0x3f5a('0x16')][_0x3f5a('0x18')]);return _0x3a8ab4(_0x256659['error']['message']);}else{logger[_0x3f5a('0x19')](_0x3f5a('0x11'),_0x2fc555,_0x3f5a('0x12'));_0x3a8ab4(_0x256659['result']['message']);}})[_0x3f5a('0x1a')](function(_0xcb2aa9){logger[_0x3f5a('0x16')]('ChatQueue,\x20%s,\x20%s',_0x2fc555,_0xcb2aa9);_0x50979d(_0xcb2aa9);});});}exports[_0x3f5a('0x1b')]=function(_0x3d799b){var _0x51cf55=this;return new Promise(function(_0x3ad3a8,_0x3cc3a8){return db['ChatQueue']['findAll']({'raw':_0x3d799b[_0x3f5a('0x1c')]?_0x3d799b[_0x3f5a('0x1c')][_0x3f5a('0x1d')]===undefined?!![]:![]:!![],'where':_0x3d799b[_0x3f5a('0x1c')]?_0x3d799b[_0x3f5a('0x1c')]['where']||null:null,'attributes':_0x3d799b[_0x3f5a('0x1c')]?_0x3d799b[_0x3f5a('0x1c')][_0x3f5a('0x1e')]||null:null,'limit':_0x3d799b['options']?_0x3d799b[_0x3f5a('0x1c')][_0x3f5a('0x1f')]||null:null,'include':_0x3d799b[_0x3f5a('0x1c')]?_0x3d799b[_0x3f5a('0x1c')]['include']?_[_0x3f5a('0x20')](_0x3d799b[_0x3f5a('0x1c')]['include'],function(_0x2f2d8f){return{'model':db[_0x2f2d8f['model']],'as':_0x2f2d8f['as'],'attributes':_0x2f2d8f[_0x3f5a('0x1e')],'include':_0x2f2d8f['include']?_['map'](_0x2f2d8f[_0x3f5a('0x21')],function(_0x1c3f4f){return{'model':db[_0x1c3f4f['model']],'as':_0x1c3f4f['as'],'attributes':_0x1c3f4f[_0x3f5a('0x1e')],'include':_0x1c3f4f[_0x3f5a('0x21')]?_['map'](_0x1c3f4f['include'],function(_0x49b2bf){return{'model':db[_0x49b2bf[_0x3f5a('0x22')]],'as':_0x49b2bf['as'],'attributes':_0x49b2bf[_0x3f5a('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x348757){logger['info'](_0x3f5a('0x1b'),_0x3d799b);logger[_0x3f5a('0x13')](_0x3f5a('0x1b'),_0x3d799b,JSON[_0x3f5a('0x15')](_0x348757));_0x3ad3a8(_0x348757);})[_0x3f5a('0x1a')](function(_0x1b5c64){logger['error']('GetChatQueue',_0x1b5c64[_0x3f5a('0x18')],_0x3d799b);_0x3cc3a8(_0x51cf55['error'](0x1f4,_0x1b5c64[_0x3f5a('0x18')]));});});};exports[_0x3f5a('0x23')]=function(_0x58ba67){var _0x18b31e=this;return new Promise(function(_0x4f3389,_0x46111f){return db[_0x3f5a('0x24')][_0x3f5a('0x25')]({'raw':_0x58ba67[_0x3f5a('0x1c')]?_0x58ba67[_0x3f5a('0x1c')][_0x3f5a('0x1d')]===undefined?!![]:![]:!![],'where':_0x58ba67[_0x3f5a('0x1c')]?_0x58ba67[_0x3f5a('0x1c')][_0x3f5a('0x26')]||null:null,'attributes':_0x58ba67[_0x3f5a('0x1c')]?_0x58ba67['options']['attributes']||null:null,'include':_0x58ba67[_0x3f5a('0x1c')]?_0x58ba67[_0x3f5a('0x1c')][_0x3f5a('0x21')]?_['map'](_0x58ba67['options'][_0x3f5a('0x21')],function(_0x27fd1c){return{'model':db[_0x27fd1c['model']],'as':_0x27fd1c['as'],'attributes':_0x27fd1c[_0x3f5a('0x1e')],'include':_0x27fd1c['include']?_[_0x3f5a('0x20')](_0x27fd1c[_0x3f5a('0x21')],function(_0x82027b){return{'model':db[_0x82027b[_0x3f5a('0x22')]],'as':_0x82027b['as'],'attributes':_0x82027b[_0x3f5a('0x1e')],'include':_0x82027b[_0x3f5a('0x21')]?_[_0x3f5a('0x20')](_0x82027b['include'],function(_0x23cd7e){return{'model':db[_0x23cd7e[_0x3f5a('0x22')]],'as':_0x23cd7e['as'],'attributes':_0x23cd7e['attributes']};}):[]};}):[]};}):[]:[]})[_0x3f5a('0x10')](function(_0x9160){logger['info'](_0x3f5a('0x23'),_0x58ba67);logger[_0x3f5a('0x13')](_0x3f5a('0x23'),_0x58ba67,JSON['stringify'](_0x9160));_0x4f3389(_0x9160);})[_0x3f5a('0x1a')](function(_0x47dd81){logger['error'](_0x3f5a('0x23'),_0x47dd81[_0x3f5a('0x18')],_0x58ba67);_0x46111f(_0x18b31e[_0x3f5a('0x16')](0x1f4,_0x47dd81[_0x3f5a('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js
index 47c8c81..f4c3045 100644
--- a/server/api/chatQueue/chatQueue.socket.js
+++ b/server/api/chatQueue/chatQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['register','length','chatQueue:','./chatQueue.events','save','remove','emit','removeListener'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0xa9e0[_0x5783f4];return _0x28e380;};'use strict';var ChatQueueEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){ChatQueueEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);ChatQueueEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
+var _0xa9e0=['register','length','chatQueue:','./chatQueue.events','save','remove','emit','removeListener'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa9e0,0x123));var _0x0a9e=function(_0xae7c2f,_0xf31e04){_0xae7c2f=_0xae7c2f-0x0;var _0x5d7001=_0xa9e0[_0xae7c2f];return _0x5d7001;};'use strict';var ChatQueueEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){ChatQueueEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);ChatQueueEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js
index b9706c2..f3569ec 100644
--- a/server/api/chatQueue/index.js
+++ b/server/api/chatQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1fc6=['getTeams','/:id/users','getAgents','post','addTeams','addAgents','put','update','delete','removeAgents','exports','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueue.controller','index','get','/describe','isAuthenticated','describe','/:id','show','/:id/members','/:id/teams'];(function(_0x1169c1,_0x5458f0){var _0x281a50=function(_0x4cbcf4){while(--_0x4cbcf4){_0x1169c1['push'](_0x1169c1['shift']());}};_0x281a50(++_0x5458f0);}(_0x1fc6,0x97));var _0x61fc=function(_0x44454f,_0x4bfbe8){_0x44454f=_0x44454f-0x0;var _0x475150=_0x1fc6[_0x44454f];return _0x475150;};'use strict';var multer=require('multer');var util=require(_0x61fc('0x0'));var path=require(_0x61fc('0x1'));var timeout=require('connect-timeout');var express=require(_0x61fc('0x2'));var router=express[_0x61fc('0x3')]();var auth=require(_0x61fc('0x4'));var interaction=require(_0x61fc('0x5'));var config=require(_0x61fc('0x6'));var controller=require(_0x61fc('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x61fc('0x8')]);router[_0x61fc('0x9')](_0x61fc('0xa'),auth[_0x61fc('0xb')](),controller[_0x61fc('0xc')]);router['get'](_0x61fc('0xd'),auth['isAuthenticated'](),controller[_0x61fc('0xe')]);router[_0x61fc('0x9')](_0x61fc('0xf'),auth['isAuthenticated'](),controller['getMembers']);router[_0x61fc('0x9')](_0x61fc('0x10'),auth[_0x61fc('0xb')](),controller[_0x61fc('0x11')]);router['get'](_0x61fc('0x12'),auth[_0x61fc('0xb')](),controller[_0x61fc('0x13')]);router[_0x61fc('0x14')]('/',auth[_0x61fc('0xb')](),controller['create']);router['post']('/:id/teams',auth['isAuthenticated'](),controller[_0x61fc('0x15')]);router[_0x61fc('0x14')]('/:id/users',auth[_0x61fc('0xb')](),controller[_0x61fc('0x16')]);router[_0x61fc('0x17')](_0x61fc('0xd'),auth[_0x61fc('0xb')](),controller[_0x61fc('0x18')]);router['delete'](_0x61fc('0xd'),auth['isAuthenticated'](),controller['destroy']);router[_0x61fc('0x19')](_0x61fc('0x10'),auth[_0x61fc('0xb')](),controller['removeTeams']);router[_0x61fc('0x19')]('/:id/users',auth[_0x61fc('0xb')](),controller[_0x61fc('0x1a')]);module[_0x61fc('0x1b')]=router;
\ No newline at end of file
+var _0x6f57=['describe','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','update','delete','destroy','removeTeams','exports','multer','util','connect-timeout','express','../../components/interaction/service','../../config/environment','./chatQueue.controller','get','index','/describe','isAuthenticated'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x6f57,0xfa));var _0x76f5=function(_0x57b3df,_0x445081){_0x57b3df=_0x57b3df-0x0;var _0x206656=_0x6f57[_0x57b3df];return _0x206656;};'use strict';var multer=require(_0x76f5('0x0'));var util=require(_0x76f5('0x1'));var path=require('path');var timeout=require(_0x76f5('0x2'));var express=require(_0x76f5('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x76f5('0x4'));var config=require(_0x76f5('0x5'));var controller=require(_0x76f5('0x6'));router[_0x76f5('0x7')]('/',auth['isAuthenticated'](),controller[_0x76f5('0x8')]);router[_0x76f5('0x7')](_0x76f5('0x9'),auth[_0x76f5('0xa')](),controller[_0x76f5('0xb')]);router[_0x76f5('0x7')](_0x76f5('0xc'),auth[_0x76f5('0xa')](),controller[_0x76f5('0xd')]);router[_0x76f5('0x7')](_0x76f5('0xe'),auth[_0x76f5('0xa')](),controller[_0x76f5('0xf')]);router[_0x76f5('0x7')](_0x76f5('0x10'),auth[_0x76f5('0xa')](),controller[_0x76f5('0x11')]);router[_0x76f5('0x7')](_0x76f5('0x12'),auth[_0x76f5('0xa')](),controller[_0x76f5('0x13')]);router[_0x76f5('0x14')]('/',auth[_0x76f5('0xa')](),controller[_0x76f5('0x15')]);router['post'](_0x76f5('0x10'),auth[_0x76f5('0xa')](),controller[_0x76f5('0x16')]);router['post']('/:id/users',auth[_0x76f5('0xa')](),controller[_0x76f5('0x17')]);router['put'](_0x76f5('0xc'),auth[_0x76f5('0xa')](),controller[_0x76f5('0x18')]);router[_0x76f5('0x19')]('/:id',auth[_0x76f5('0xa')](),controller[_0x76f5('0x1a')]);router['delete'](_0x76f5('0x10'),auth['isAuthenticated'](),controller[_0x76f5('0x1b')]);router[_0x76f5('0x19')](_0x76f5('0x12'),auth['isAuthenticated'](),controller['removeAgents']);module[_0x76f5('0x1c')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js
index d6cd682..cb2a28f 100644
--- a/server/api/chatQueueReport/chatQueueReport.attributes.js
+++ b/server/api/chatQueueReport/chatQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc514=['moment','sequelize','exports','STRING','DATE'];(function(_0x3063d1,_0x22428e){var _0x1a5f7f=function(_0x4e26f4){while(--_0x4e26f4){_0x3063d1['push'](_0x3063d1['shift']());}};_0x1a5f7f(++_0x22428e);}(_0xc514,0x1a9));var _0x4c51=function(_0x1d6a82,_0x37c315){_0x1d6a82=_0x1d6a82-0x0;var _0x5834ac=_0xc514[_0x1d6a82];return _0x5834ac;};'use strict';var moment=require(_0x4c51('0x0'));var Sequelize=require(_0x4c51('0x1'));module[_0x4c51('0x2')]={'uniqueid':{'type':Sequelize[_0x4c51('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x4c51('0x3')]},'joinAt':{'type':Sequelize[_0x4c51('0x4')]},'leaveAt':{'type':Sequelize[_0x4c51('0x4')]},'acceptAt':{'type':Sequelize[_0x4c51('0x4')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb9d3=['sequelize','STRING','DATE','moment'];(function(_0x32c3ca,_0x1f9ecd){var _0x42ec9a=function(_0x57aaac){while(--_0x57aaac){_0x32c3ca['push'](_0x32c3ca['shift']());}};_0x42ec9a(++_0x1f9ecd);}(_0xb9d3,0x117));var _0x3b9d=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0xb9d3[_0x5f0089];return _0x193892;};'use strict';var moment=require(_0x3b9d('0x0'));var Sequelize=require(_0x3b9d('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x3b9d('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x3b9d('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x3b9d('0x3')]},'acceptAt':{'type':Sequelize[_0x3b9d('0x3')]},'exitAt':{'type':Sequelize[_0x3b9d('0x3')]},'reason':{'type':Sequelize[_0x3b9d('0x2')]}};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js
index c266bb3..0c1a2f6 100644
--- a/server/api/chatQueueReport/chatQueueReport.controller.js
+++ b/server/api/chatQueueReport/chatQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1186=['count','offset','limit','status','reject','save','update','then','sendStatus','stack','name','send','ChatQueueReport','rawAttributes','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','map','type','key','VIRTUAL','field','filter','merge','options','includeAll','findAll','rows','show','params','keys','include','find','catch','create','body','destroy','describe','html-pdf','eml-format','zip-dir','fast-json-patch','moment','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../mysqldb','json'];(function(_0x3635ce,_0x33a6f9){var _0x97ecd0=function(_0x123d98){while(--_0x123d98){_0x3635ce['push'](_0x3635ce['shift']());}};_0x97ecd0(++_0x33a6f9);}(_0x1186,0x75));var _0x6118=function(_0x4485aa,_0x4d60c2){_0x4485aa=_0x4485aa-0x0;var _0x39ae2e=_0x1186[_0x4485aa];return _0x39ae2e;};'use strict';var pdf=require(_0x6118('0x0'));var emlformat=require(_0x6118('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x6118('0x2'));var jsonpatch=require(_0x6118('0x3'));var rp=require('request-promise');var moment=require(_0x6118('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x6118('0x5'));var util=require('util');var path=require(_0x6118('0x6'));var sox=require(_0x6118('0x7'));var csv=require(_0x6118('0x8'));var ejs=require(_0x6118('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x6118('0xa'));var crypto=require(_0x6118('0xb'));var jsforce=require(_0x6118('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6118('0xd'));var Papa=require(_0x6118('0xe'));var Redis=require(_0x6118('0xf'));var authService=require(_0x6118('0x10'));var qs=require(_0x6118('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6118('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x6118('0x13'))['db'];function respondWithStatusCode(_0x13e78c,_0x3a6362){_0x3a6362=_0x3a6362||0xcc;return function(_0x478b21){if(_0x478b21){return _0x13e78c['sendStatus'](_0x3a6362);}return _0x13e78c['status'](_0x3a6362)['end']();};}function respondWithResult(_0x340311,_0x5e2f9b){_0x5e2f9b=_0x5e2f9b||0xc8;return function(_0x3e2c93){if(_0x3e2c93){return _0x340311['status'](_0x5e2f9b)[_0x6118('0x14')](_0x3e2c93);}};}function respondWithFilteredResult(_0x4fd075,_0x142217){return function(_0x2bd4b7){if(_0x2bd4b7){var _0x380522=_0x2bd4b7[_0x6118('0x15')],_0x425a6b=_0x142217[_0x6118('0x16')],_0x2761df=_0x142217[_0x6118('0x16')]+_0x142217[_0x6118('0x17')],_0x2a7875;if(_0x2761df>=_0x380522){_0x2761df=_0x380522;_0x2a7875=0xc8;}else{_0x2a7875=0xce;}_0x4fd075[_0x6118('0x18')](_0x2a7875);return _0x4fd075['set']('Content-Range',_0x425a6b+'-'+_0x2761df+'/'+_0x380522)[_0x6118('0x14')](_0x2bd4b7);}return null;};}function patchUpdates(_0x571def){return function(_0x442d8b){try{jsonpatch['apply'](_0x442d8b,_0x571def,!![]);}catch(_0x2751fb){return BPromise[_0x6118('0x19')](_0x2751fb);}return _0x442d8b[_0x6118('0x1a')]();};}function saveUpdates(_0x788491,_0x3ec3fa){return function(_0x18a2c0){if(_0x18a2c0){return _0x18a2c0[_0x6118('0x1b')](_0x788491)[_0x6118('0x1c')](function(_0x40bb2a){return _0x40bb2a;});}return null;};}function removeEntity(_0x4208f0,_0x239641){return function(_0x5cd2ca){if(_0x5cd2ca){return _0x5cd2ca['destroy']()[_0x6118('0x1c')](function(){_0x4208f0['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x5cd670,_0x23f507){return function(_0x48806c){if(!_0x48806c){_0x5cd670[_0x6118('0x1d')](0x194);}return _0x48806c;};}function handleError(_0x44bc41,_0xfbadc9){_0xfbadc9=_0xfbadc9||0x1f4;return function(_0x37bcc3){logger['error'](_0x37bcc3[_0x6118('0x1e')]);if(_0x37bcc3[_0x6118('0x1f')]){delete _0x37bcc3['name'];}_0x44bc41['status'](_0xfbadc9)[_0x6118('0x20')](_0x37bcc3);};}exports['index']=function(_0x5d2189,_0x3cc4d0){var _0x99c398={},_0x3044f3={},_0x49ffe2={'count':0x0,'rows':[]};var _0x5e7d2a=db[_0x6118('0x21')][_0x6118('0x22')];_0x3044f3['model']=_['keys'](_0x5e7d2a);_0x3044f3[_0x6118('0x23')]=_['keys'](_0x5d2189['query']);_0x3044f3['filters']=_[_0x6118('0x24')](_0x3044f3[_0x6118('0x25')],_0x3044f3[_0x6118('0x23')]);_0x99c398[_0x6118('0x26')]=_['intersection'](_0x3044f3[_0x6118('0x25')],qs[_0x6118('0x27')](_0x5d2189[_0x6118('0x23')][_0x6118('0x27')]));_0x99c398['attributes']=_0x99c398[_0x6118('0x26')][_0x6118('0x28')]?_0x99c398[_0x6118('0x26')]:_0x3044f3[_0x6118('0x25')];if(!_0x5d2189[_0x6118('0x23')][_0x6118('0x29')](_0x6118('0x2a'))){_0x99c398['limit']=qs['limit'](_0x5d2189[_0x6118('0x23')][_0x6118('0x17')]);_0x99c398[_0x6118('0x16')]=qs[_0x6118('0x16')](_0x5d2189['query'][_0x6118('0x16')]);}_0x99c398[_0x6118('0x2b')]=qs[_0x6118('0x2c')](_0x5d2189[_0x6118('0x23')]['sort']);_0x99c398[_0x6118('0x2d')]=qs[_0x6118('0x2e')](_[_0x6118('0x2f')](_0x5d2189[_0x6118('0x23')],_0x3044f3[_0x6118('0x2e')]));if(_0x5d2189['query']['filter']){_0x99c398[_0x6118('0x2d')]=_['merge'](_0x99c398['where'],{'$or':_[_0x6118('0x30')](_0x5e7d2a,function(_0x50cd70){if(_0x50cd70[_0x6118('0x31')][_0x6118('0x32')]!==_0x6118('0x33')){var _0x4ebb5d={};_0x4ebb5d[_0x50cd70[_0x6118('0x34')]]={'$like':'%'+_0x5d2189['query'][_0x6118('0x35')]+'%'};return _0x4ebb5d;}})});}_0x99c398=_[_0x6118('0x36')]({},_0x99c398,_0x5d2189[_0x6118('0x37')]);var _0x4cd8f5={'where':_0x99c398[_0x6118('0x2d')]};return db['ChatQueueReport']['count'](_0x4cd8f5)[_0x6118('0x1c')](function(_0x44de6c){_0x49ffe2[_0x6118('0x15')]=_0x44de6c;if(_0x5d2189[_0x6118('0x23')][_0x6118('0x38')]){_0x99c398['include']=[{'all':!![]}];}return db[_0x6118('0x21')][_0x6118('0x39')](_0x99c398);})[_0x6118('0x1c')](function(_0x58195e){_0x49ffe2[_0x6118('0x3a')]=_0x58195e;return _0x49ffe2;})[_0x6118('0x1c')](respondWithFilteredResult(_0x3cc4d0,_0x99c398))['catch'](handleError(_0x3cc4d0,null));};exports[_0x6118('0x3b')]=function(_0x2ced3c,_0x4e6a8f){var _0x435678={'raw':!![],'where':{'id':_0x2ced3c[_0x6118('0x3c')]['id']}},_0x147a8b={};_0x147a8b[_0x6118('0x25')]=_['keys'](db['ChatQueueReport'][_0x6118('0x22')]);_0x147a8b[_0x6118('0x23')]=_[_0x6118('0x3d')](_0x2ced3c[_0x6118('0x23')]);_0x147a8b[_0x6118('0x2e')]=_['intersection'](_0x147a8b[_0x6118('0x25')],_0x147a8b[_0x6118('0x23')]);_0x435678['attributes']=_[_0x6118('0x24')](_0x147a8b[_0x6118('0x25')],qs[_0x6118('0x27')](_0x2ced3c[_0x6118('0x23')][_0x6118('0x27')]));_0x435678[_0x6118('0x26')]=_0x435678['attributes'][_0x6118('0x28')]?_0x435678[_0x6118('0x26')]:_0x147a8b['model'];if(_0x2ced3c[_0x6118('0x23')][_0x6118('0x38')]){_0x435678[_0x6118('0x3e')]=[{'all':!![]}];}_0x435678=_[_0x6118('0x36')]({},_0x435678,_0x2ced3c[_0x6118('0x37')]);return db[_0x6118('0x21')][_0x6118('0x3f')](_0x435678)['then'](handleEntityNotFound(_0x4e6a8f,null))['then'](respondWithResult(_0x4e6a8f,null))[_0x6118('0x40')](handleError(_0x4e6a8f,null));};exports[_0x6118('0x41')]=function(_0x198e32,_0xa0f279){return db[_0x6118('0x21')][_0x6118('0x41')](_0x198e32[_0x6118('0x42')],{})[_0x6118('0x1c')](respondWithResult(_0xa0f279,0xc9))['catch'](handleError(_0xa0f279,null));};exports[_0x6118('0x1b')]=function(_0x1e2ee8,_0x30912f){if(_0x1e2ee8[_0x6118('0x42')]['id']){delete _0x1e2ee8[_0x6118('0x42')]['id'];}return db[_0x6118('0x21')]['find']({'where':{'id':_0x1e2ee8[_0x6118('0x3c')]['id']}})[_0x6118('0x1c')](handleEntityNotFound(_0x30912f,null))[_0x6118('0x1c')](saveUpdates(_0x1e2ee8[_0x6118('0x42')],null))[_0x6118('0x1c')](respondWithResult(_0x30912f,null))[_0x6118('0x40')](handleError(_0x30912f,null));};exports[_0x6118('0x43')]=function(_0x421a3b,_0x1d1407){return db['ChatQueueReport'][_0x6118('0x3f')]({'where':{'id':_0x421a3b['params']['id']}})[_0x6118('0x1c')](handleEntityNotFound(_0x1d1407,null))['then'](removeEntity(_0x1d1407,null))[_0x6118('0x40')](handleError(_0x1d1407,null));};exports[_0x6118('0x44')]=function(_0x34ddda,_0x486a4e){return db[_0x6118('0x21')][_0x6118('0x44')]()[_0x6118('0x1c')](respondWithResult(_0x486a4e,null))[_0x6118('0x40')](handleError(_0x486a4e,null));};
\ No newline at end of file
+var _0x434f=['html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','update','then','destroy','error','name','send','index','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','map','type','key','VIRTUAL','options','ChatQueueReport','includeAll','include','findAll','rows','catch','params','rawAttributes','create','body','find','describe'];(function(_0x2dc9d7,_0x47cce2){var _0x2dd5c8=function(_0x4bddb3){while(--_0x4bddb3){_0x2dc9d7['push'](_0x2dc9d7['shift']());}};_0x2dd5c8(++_0x47cce2);}(_0x434f,0x120));var _0xf434=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x434f[_0x321bb2];return _0x9c12ed;};'use strict';var pdf=require(_0xf434('0x0'));var emlformat=require(_0xf434('0x1'));var rimraf=require(_0xf434('0x2'));var zipdir=require(_0xf434('0x3'));var jsonpatch=require(_0xf434('0x4'));var rp=require(_0xf434('0x5'));var moment=require(_0xf434('0x6'));var BPromise=require(_0xf434('0x7'));var Mustache=require(_0xf434('0x8'));var util=require(_0xf434('0x9'));var path=require('path');var sox=require(_0xf434('0xa'));var csv=require(_0xf434('0xb'));var ejs=require(_0xf434('0xc'));var fs=require('fs');var _=require(_0xf434('0xd'));var squel=require(_0xf434('0xe'));var crypto=require('crypto');var jsforce=require(_0xf434('0xf'));var deskjs=require(_0xf434('0x10'));var toCsv=require('to-csv');var querystring=require(_0xf434('0x11'));var Papa=require(_0xf434('0x12'));var Redis=require(_0xf434('0x13'));var authService=require(_0xf434('0x14'));var qs=require(_0xf434('0x15'));var hardwareService=require(_0xf434('0x16'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xf434('0x17'));var db=require(_0xf434('0x18'))['db'];function respondWithStatusCode(_0x4de105,_0x212643){_0x212643=_0x212643||0xcc;return function(_0x44784a){if(_0x44784a){return _0x4de105[_0xf434('0x19')](_0x212643);}return _0x4de105[_0xf434('0x1a')](_0x212643)[_0xf434('0x1b')]();};}function respondWithResult(_0x1ad100,_0x3a766e){_0x3a766e=_0x3a766e||0xc8;return function(_0x43c359){if(_0x43c359){return _0x1ad100['status'](_0x3a766e)[_0xf434('0x1c')](_0x43c359);}};}function respondWithFilteredResult(_0x1bc197,_0x3115dc){return function(_0x38b594){if(_0x38b594){var _0x156bfe=_0x38b594[_0xf434('0x1d')],_0x1e0f3d=_0x3115dc[_0xf434('0x1e')],_0x30f6fe=_0x3115dc[_0xf434('0x1e')]+_0x3115dc['limit'],_0x428986;if(_0x30f6fe>=_0x156bfe){_0x30f6fe=_0x156bfe;_0x428986=0xc8;}else{_0x428986=0xce;}_0x1bc197[_0xf434('0x1a')](_0x428986);return _0x1bc197[_0xf434('0x1f')]('Content-Range',_0x1e0f3d+'-'+_0x30f6fe+'/'+_0x156bfe)['json'](_0x38b594);}return null;};}function patchUpdates(_0x5df918){return function(_0x1779c0){try{jsonpatch['apply'](_0x1779c0,_0x5df918,!![]);}catch(_0x4d9255){return BPromise['reject'](_0x4d9255);}return _0x1779c0['save']();};}function saveUpdates(_0x3193d8,_0x388f3f){return function(_0x4dd115){if(_0x4dd115){return _0x4dd115[_0xf434('0x20')](_0x3193d8)[_0xf434('0x21')](function(_0x1d74ae){return _0x1d74ae;});}return null;};}function removeEntity(_0x5ee879,_0x2a5483){return function(_0x41aa61){if(_0x41aa61){return _0x41aa61[_0xf434('0x22')]()[_0xf434('0x21')](function(){_0x5ee879[_0xf434('0x1a')](0xcc)[_0xf434('0x1b')]();});}};}function handleEntityNotFound(_0x3057a3,_0x105d92){return function(_0x5d26f3){if(!_0x5d26f3){_0x3057a3[_0xf434('0x19')](0x194);}return _0x5d26f3;};}function handleError(_0x5a1b1b,_0x4b8e7e){_0x4b8e7e=_0x4b8e7e||0x1f4;return function(_0x47bf8f){logger[_0xf434('0x23')](_0x47bf8f['stack']);if(_0x47bf8f[_0xf434('0x24')]){delete _0x47bf8f['name'];}_0x5a1b1b['status'](_0x4b8e7e)[_0xf434('0x25')](_0x47bf8f);};}exports[_0xf434('0x26')]=function(_0x4ebafa,_0x255701){var _0x45b640={},_0x2a0a9e={},_0x26cc9e={'count':0x0,'rows':[]};var _0x34b03b=db['ChatQueueReport']['rawAttributes'];_0x2a0a9e[_0xf434('0x27')]=_[_0xf434('0x28')](_0x34b03b);_0x2a0a9e['query']=_['keys'](_0x4ebafa[_0xf434('0x29')]);_0x2a0a9e[_0xf434('0x2a')]=_[_0xf434('0x2b')](_0x2a0a9e['model'],_0x2a0a9e[_0xf434('0x29')]);_0x45b640[_0xf434('0x2c')]=_[_0xf434('0x2b')](_0x2a0a9e[_0xf434('0x27')],qs[_0xf434('0x2d')](_0x4ebafa[_0xf434('0x29')][_0xf434('0x2d')]));_0x45b640[_0xf434('0x2c')]=_0x45b640[_0xf434('0x2c')][_0xf434('0x2e')]?_0x45b640[_0xf434('0x2c')]:_0x2a0a9e[_0xf434('0x27')];if(!_0x4ebafa[_0xf434('0x29')][_0xf434('0x2f')](_0xf434('0x30'))){_0x45b640[_0xf434('0x31')]=qs[_0xf434('0x31')](_0x4ebafa[_0xf434('0x29')]['limit']);_0x45b640[_0xf434('0x1e')]=qs[_0xf434('0x1e')](_0x4ebafa[_0xf434('0x29')][_0xf434('0x1e')]);}_0x45b640['order']=qs['sort'](_0x4ebafa[_0xf434('0x29')][_0xf434('0x32')]);_0x45b640[_0xf434('0x33')]=qs[_0xf434('0x2a')](_[_0xf434('0x34')](_0x4ebafa['query'],_0x2a0a9e[_0xf434('0x2a')]));if(_0x4ebafa[_0xf434('0x29')][_0xf434('0x35')]){_0x45b640[_0xf434('0x33')]=_[_0xf434('0x36')](_0x45b640[_0xf434('0x33')],{'$or':_[_0xf434('0x37')](_0x34b03b,function(_0xb29b03){if(_0xb29b03[_0xf434('0x38')][_0xf434('0x39')]!==_0xf434('0x3a')){var _0x58aef5={};_0x58aef5[_0xb29b03['field']]={'$like':'%'+_0x4ebafa[_0xf434('0x29')]['filter']+'%'};return _0x58aef5;}})});}_0x45b640=_[_0xf434('0x36')]({},_0x45b640,_0x4ebafa[_0xf434('0x3b')]);var _0x3e6945={'where':_0x45b640[_0xf434('0x33')]};return db[_0xf434('0x3c')][_0xf434('0x1d')](_0x3e6945)[_0xf434('0x21')](function(_0x4a51f7){_0x26cc9e[_0xf434('0x1d')]=_0x4a51f7;if(_0x4ebafa[_0xf434('0x29')][_0xf434('0x3d')]){_0x45b640[_0xf434('0x3e')]=[{'all':!![]}];}return db['ChatQueueReport'][_0xf434('0x3f')](_0x45b640);})[_0xf434('0x21')](function(_0x1be04e){_0x26cc9e[_0xf434('0x40')]=_0x1be04e;return _0x26cc9e;})[_0xf434('0x21')](respondWithFilteredResult(_0x255701,_0x45b640))[_0xf434('0x41')](handleError(_0x255701,null));};exports['show']=function(_0x3022a9,_0x2ca433){var _0x42bbc8={'raw':!![],'where':{'id':_0x3022a9[_0xf434('0x42')]['id']}},_0x3f6c57={};_0x3f6c57[_0xf434('0x27')]=_['keys'](db[_0xf434('0x3c')][_0xf434('0x43')]);_0x3f6c57['query']=_[_0xf434('0x28')](_0x3022a9[_0xf434('0x29')]);_0x3f6c57[_0xf434('0x2a')]=_[_0xf434('0x2b')](_0x3f6c57[_0xf434('0x27')],_0x3f6c57[_0xf434('0x29')]);_0x42bbc8[_0xf434('0x2c')]=_[_0xf434('0x2b')](_0x3f6c57[_0xf434('0x27')],qs[_0xf434('0x2d')](_0x3022a9[_0xf434('0x29')][_0xf434('0x2d')]));_0x42bbc8[_0xf434('0x2c')]=_0x42bbc8[_0xf434('0x2c')][_0xf434('0x2e')]?_0x42bbc8[_0xf434('0x2c')]:_0x3f6c57[_0xf434('0x27')];if(_0x3022a9[_0xf434('0x29')][_0xf434('0x3d')]){_0x42bbc8['include']=[{'all':!![]}];}_0x42bbc8=_[_0xf434('0x36')]({},_0x42bbc8,_0x3022a9[_0xf434('0x3b')]);return db[_0xf434('0x3c')]['find'](_0x42bbc8)[_0xf434('0x21')](handleEntityNotFound(_0x2ca433,null))[_0xf434('0x21')](respondWithResult(_0x2ca433,null))[_0xf434('0x41')](handleError(_0x2ca433,null));};exports[_0xf434('0x44')]=function(_0x272442,_0x4b2936){return db[_0xf434('0x3c')][_0xf434('0x44')](_0x272442['body'],{})[_0xf434('0x21')](respondWithResult(_0x4b2936,0xc9))[_0xf434('0x41')](handleError(_0x4b2936,null));};exports['update']=function(_0x58806f,_0x1de99e){if(_0x58806f[_0xf434('0x45')]['id']){delete _0x58806f[_0xf434('0x45')]['id'];}return db[_0xf434('0x3c')][_0xf434('0x46')]({'where':{'id':_0x58806f[_0xf434('0x42')]['id']}})['then'](handleEntityNotFound(_0x1de99e,null))[_0xf434('0x21')](saveUpdates(_0x58806f['body'],null))[_0xf434('0x21')](respondWithResult(_0x1de99e,null))[_0xf434('0x41')](handleError(_0x1de99e,null));};exports[_0xf434('0x22')]=function(_0x1ffcd2,_0x26bbbc){return db[_0xf434('0x3c')][_0xf434('0x46')]({'where':{'id':_0x1ffcd2[_0xf434('0x42')]['id']}})[_0xf434('0x21')](handleEntityNotFound(_0x26bbbc,null))[_0xf434('0x21')](removeEntity(_0x26bbbc,null))[_0xf434('0x41')](handleError(_0x26bbbc,null));};exports[_0xf434('0x47')]=function(_0x1f75d8,_0x3065b9){return db['ChatQueueReport'][_0xf434('0x47')]()['then'](respondWithResult(_0x3065b9,null))['catch'](handleError(_0x3065b9,null));};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js
index 3893653..289e740 100644
--- a/server/api/chatQueueReport/chatQueueReport.model.js
+++ b/server/api/chatQueueReport/chatQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcc9b=['moment','bluebird','request-promise','path','../../config/environment','./chatQueueReport.attributes','exports','define','ChatQueueReport','report_chat_queue','uniqueid','lodash','api'];(function(_0x4120cd,_0x283ec0){var _0x3a03a1=function(_0x41f0ec){while(--_0x41f0ec){_0x4120cd['push'](_0x4120cd['shift']());}};_0x3a03a1(++_0x283ec0);}(_0xcc9b,0x80));var _0xbcc9=function(_0x3d3845,_0x198036){_0x3d3845=_0x3d3845-0x0;var _0x27c984=_0xcc9b[_0x3d3845];return _0x27c984;};'use strict';var _=require(_0xbcc9('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xbcc9('0x1'));var moment=require(_0xbcc9('0x2'));var BPromise=require(_0xbcc9('0x3'));var rp=require(_0xbcc9('0x4'));var fs=require('fs');var path=require(_0xbcc9('0x5'));var rimraf=require('rimraf');var config=require(_0xbcc9('0x6'));var attributes=require(_0xbcc9('0x7'));module[_0xbcc9('0x8')]=function(_0x1896cb,_0x172323){return _0x1896cb[_0xbcc9('0x9')](_0xbcc9('0xa'),attributes,{'tableName':_0xbcc9('0xb'),'paranoid':![],'indexes':[{'name':_0xbcc9('0xc'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa5ef=['bluebird','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define','ChatQueueReport','report_chat_queue','uniqueid','lodash','util','../../config/logger','api'];(function(_0x130ef8,_0x5b554d){var _0x573436=function(_0x1f5c34){while(--_0x1f5c34){_0x130ef8['push'](_0x130ef8['shift']());}};_0x573436(++_0x5b554d);}(_0xa5ef,0x83));var _0xfa5e=function(_0x31e961,_0x4b5ec9){_0x31e961=_0x31e961-0x0;var _0x24801e=_0xa5ef[_0x31e961];return _0x24801e;};'use strict';var _=require(_0xfa5e('0x0'));var util=require(_0xfa5e('0x1'));var logger=require(_0xfa5e('0x2'))(_0xfa5e('0x3'));var moment=require('moment');var BPromise=require(_0xfa5e('0x4'));var rp=require(_0xfa5e('0x5'));var fs=require('fs');var path=require(_0xfa5e('0x6'));var rimraf=require(_0xfa5e('0x7'));var config=require(_0xfa5e('0x8'));var attributes=require(_0xfa5e('0x9'));module[_0xfa5e('0xa')]=function(_0x4a1f29,_0x1b8588){return _0x4a1f29[_0xfa5e('0xb')](_0xfa5e('0xc'),attributes,{'tableName':_0xfa5e('0xd'),'paranoid':![],'indexes':[{'name':_0xfa5e('0xe'),'fields':[_0xfa5e('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js
index 0a91edc..7f8dc35 100644
--- a/server/api/chatQueueReport/chatQueueReport.rpc.js
+++ b/server/api/chatQueueReport/chatQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf8a4=['result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','then','UpdateChatQueueReport','update','raw','where','attributes','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','info','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatQueueReport,\x20%s,\x20%s','message'];(function(_0x39e825,_0x167d08){var _0x55250e=function(_0x24407a){while(--_0x24407a){_0x39e825['push'](_0x39e825['shift']());}};_0x55250e(++_0x167d08);}(_0xf8a4,0x18e));var _0x4f8a=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0xf8a4[_0x13d07a];return _0x5ee0ee;};'use strict';var _=require(_0x4f8a('0x0'));var util=require(_0x4f8a('0x1'));var moment=require(_0x4f8a('0x2'));var BPromise=require(_0x4f8a('0x3'));var rs=require(_0x4f8a('0x4'));var fs=require('fs');var Redis=require(_0x4f8a('0x5'));var db=require(_0x4f8a('0x6'))['db'];var utils=require(_0x4f8a('0x7'));var logger=require(_0x4f8a('0x8'))('rpc');var config=require(_0x4f8a('0x9'));var jayson=require(_0x4f8a('0xa'));var client=jayson[_0x4f8a('0xb')][_0x4f8a('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x130bd7,_0x138bce,_0x25b3c7){return new BPromise(function(_0x2088cb,_0x23fad3){return client['request'](_0x130bd7,_0x25b3c7)['then'](function(_0x23bd30){logger[_0x4f8a('0xd')]('ChatQueueReport,\x20%s,\x20%s',_0x138bce,_0x4f8a('0xe'));logger[_0x4f8a('0xf')](_0x4f8a('0x10'),_0x138bce,_0x4f8a('0xe'),JSON[_0x4f8a('0x11')](_0x23bd30));if(_0x23bd30[_0x4f8a('0x12')]){if(_0x23bd30[_0x4f8a('0x12')][_0x4f8a('0x13')]===0x1f4){logger[_0x4f8a('0x12')](_0x4f8a('0x14'),_0x138bce,_0x23bd30[_0x4f8a('0x12')][_0x4f8a('0x15')]);return _0x23fad3(_0x23bd30[_0x4f8a('0x12')][_0x4f8a('0x15')]);}logger[_0x4f8a('0x12')](_0x4f8a('0x14'),_0x138bce,_0x23bd30[_0x4f8a('0x12')][_0x4f8a('0x15')]);return _0x2088cb(_0x23bd30[_0x4f8a('0x12')][_0x4f8a('0x15')]);}else{logger[_0x4f8a('0xd')](_0x4f8a('0x14'),_0x138bce,_0x4f8a('0xe'));_0x2088cb(_0x23bd30[_0x4f8a('0x16')][_0x4f8a('0x15')]);}})[_0x4f8a('0x17')](function(_0x58070a){logger[_0x4f8a('0x12')](_0x4f8a('0x14'),_0x138bce,_0x58070a);_0x23fad3(_0x58070a);});});}exports[_0x4f8a('0x18')]=function(_0x33b9da){var _0x1fbeda=this;return new Promise(function(_0x5e0b59,_0x51c8f5){return db[_0x4f8a('0x19')][_0x4f8a('0x1a')](_0x33b9da[_0x4f8a('0x1b')],{'raw':_0x33b9da['options']?_0x33b9da[_0x4f8a('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0x4f8a('0x1d')](function(_0x38ff09){logger[_0x4f8a('0xd')](_0x4f8a('0x18'),_0x33b9da);logger['debug'](_0x4f8a('0x18'),_0x33b9da,JSON[_0x4f8a('0x11')](_0x38ff09));_0x5e0b59(_0x38ff09);})[_0x4f8a('0x17')](function(_0x31e973){logger[_0x4f8a('0x12')]('CreateChatQueueReport',_0x31e973[_0x4f8a('0x15')],_0x33b9da);_0x51c8f5(_0x1fbeda[_0x4f8a('0x12')](0x1f4,_0x31e973[_0x4f8a('0x15')]));});});};exports[_0x4f8a('0x1e')]=function(_0x51c92f){var _0x5342a7=this;return new Promise(function(_0xf98f1a,_0x35dc5f){return db['ChatQueueReport'][_0x4f8a('0x1f')](_0x51c92f[_0x4f8a('0x1b')],{'raw':_0x51c92f[_0x4f8a('0x1c')]?_0x51c92f[_0x4f8a('0x1c')][_0x4f8a('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x51c92f['options']?_0x51c92f[_0x4f8a('0x1c')][_0x4f8a('0x21')]||null:null,'attributes':_0x51c92f[_0x4f8a('0x1c')]?_0x51c92f[_0x4f8a('0x1c')][_0x4f8a('0x22')]||null:null,'limit':_0x51c92f[_0x4f8a('0x1c')]?_0x51c92f['options']['limit']||null:null})[_0x4f8a('0x1d')](function(_0x17b465){logger['info']('UpdateChatQueueReport',_0x51c92f);logger[_0x4f8a('0xf')](_0x4f8a('0x1e'),_0x51c92f,JSON[_0x4f8a('0x11')](_0x17b465));_0xf98f1a(_0x17b465);})[_0x4f8a('0x17')](function(_0x1a6e38){logger[_0x4f8a('0x12')](_0x4f8a('0x1e'),_0x1a6e38[_0x4f8a('0x15')],_0x51c92f);_0x35dc5f(_0x5342a7[_0x4f8a('0x12')](0x1f4,_0x1a6e38[_0x4f8a('0x15')]));});});};
\ No newline at end of file
+var _0xadc7=['ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','raw','update','where','attributes','limit','UpdateChatQueueReport','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x3e2ba9,_0x55a716){var _0x36d031=function(_0x212617){while(--_0x212617){_0x3e2ba9['push'](_0x3e2ba9['shift']());}};_0x36d031(++_0x55a716);}(_0xadc7,0x109));var _0x7adc=function(_0x3f4568,_0x9eb0ee){_0x3f4568=_0x3f4568-0x0;var _0xee2340=_0xadc7[_0x3f4568];return _0xee2340;};'use strict';var _=require(_0x7adc('0x0'));var util=require(_0x7adc('0x1'));var moment=require(_0x7adc('0x2'));var BPromise=require(_0x7adc('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7adc('0x4'));var db=require(_0x7adc('0x5'))['db'];var utils=require(_0x7adc('0x6'));var logger=require(_0x7adc('0x7'))(_0x7adc('0x8'));var config=require(_0x7adc('0x9'));var jayson=require(_0x7adc('0xa'));var client=jayson[_0x7adc('0xb')][_0x7adc('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5b9789,_0x19631b,_0x46f9a0){return new BPromise(function(_0xa911b8,_0x555fee){return client['request'](_0x5b9789,_0x46f9a0)[_0x7adc('0xd')](function(_0x328f2e){logger[_0x7adc('0xe')](_0x7adc('0xf'),_0x19631b,_0x7adc('0x10'));logger[_0x7adc('0x11')](_0x7adc('0x12'),_0x19631b,_0x7adc('0x10'),JSON[_0x7adc('0x13')](_0x328f2e));if(_0x328f2e[_0x7adc('0x14')]){if(_0x328f2e[_0x7adc('0x14')][_0x7adc('0x15')]===0x1f4){logger[_0x7adc('0x14')]('ChatQueueReport,\x20%s,\x20%s',_0x19631b,_0x328f2e[_0x7adc('0x14')][_0x7adc('0x16')]);return _0x555fee(_0x328f2e[_0x7adc('0x14')][_0x7adc('0x16')]);}logger['error'](_0x7adc('0xf'),_0x19631b,_0x328f2e[_0x7adc('0x14')]['message']);return _0xa911b8(_0x328f2e[_0x7adc('0x14')][_0x7adc('0x16')]);}else{logger['info'](_0x7adc('0xf'),_0x19631b,_0x7adc('0x10'));_0xa911b8(_0x328f2e['result'][_0x7adc('0x16')]);}})[_0x7adc('0x17')](function(_0x5dcc4e){logger[_0x7adc('0x14')](_0x7adc('0xf'),_0x19631b,_0x5dcc4e);_0x555fee(_0x5dcc4e);});});}exports[_0x7adc('0x18')]=function(_0x2fb59a){var _0x3a1ffb=this;return new Promise(function(_0x4b094c,_0x26470c){return db[_0x7adc('0x19')][_0x7adc('0x1a')](_0x2fb59a[_0x7adc('0x1b')],{'raw':_0x2fb59a[_0x7adc('0x1c')]?_0x2fb59a[_0x7adc('0x1c')][_0x7adc('0x1d')]===undefined?!![]:![]:!![]})[_0x7adc('0xd')](function(_0x45538d){logger[_0x7adc('0xe')](_0x7adc('0x18'),_0x2fb59a);logger[_0x7adc('0x11')](_0x7adc('0x18'),_0x2fb59a,JSON[_0x7adc('0x13')](_0x45538d));_0x4b094c(_0x45538d);})['catch'](function(_0x25623b){logger[_0x7adc('0x14')](_0x7adc('0x18'),_0x25623b[_0x7adc('0x16')],_0x2fb59a);_0x26470c(_0x3a1ffb[_0x7adc('0x14')](0x1f4,_0x25623b[_0x7adc('0x16')]));});});};exports['UpdateChatQueueReport']=function(_0x52d34f){var _0xa9f0f0=this;return new Promise(function(_0x545008,_0x2089b5){return db['ChatQueueReport'][_0x7adc('0x1e')](_0x52d34f['body'],{'raw':_0x52d34f['options']?_0x52d34f['options'][_0x7adc('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x52d34f[_0x7adc('0x1c')]?_0x52d34f[_0x7adc('0x1c')][_0x7adc('0x1f')]||null:null,'attributes':_0x52d34f[_0x7adc('0x1c')]?_0x52d34f[_0x7adc('0x1c')][_0x7adc('0x20')]||null:null,'limit':_0x52d34f[_0x7adc('0x1c')]?_0x52d34f[_0x7adc('0x1c')][_0x7adc('0x21')]||null:null})[_0x7adc('0xd')](function(_0xa4dc36){logger['info'](_0x7adc('0x22'),_0x52d34f);logger[_0x7adc('0x11')](_0x7adc('0x22'),_0x52d34f,JSON[_0x7adc('0x13')](_0xa4dc36));_0x545008(_0xa4dc36);})[_0x7adc('0x17')](function(_0x1ebe8c){logger[_0x7adc('0x14')](_0x7adc('0x22'),_0x1ebe8c[_0x7adc('0x16')],_0x52d34f);_0x2089b5(_0xa9f0f0[_0x7adc('0x14')](0x1f4,_0x1ebe8c['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js
index 4e02cab..595fddc 100644
--- a/server/api/chatQueueReport/index.js
+++ b/server/api/chatQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfa17=['create','put','update','destroy','exports','multer','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','index','get','/describe','describe','/:id','isAuthenticated'];(function(_0xf9044a,_0x33e5db){var _0x27816b=function(_0x49fd68){while(--_0x49fd68){_0xf9044a['push'](_0xf9044a['shift']());}};_0x27816b(++_0x33e5db);}(_0xfa17,0x148));var _0x7fa1=function(_0x16a566,_0x272a4b){_0x16a566=_0x16a566-0x0;var _0x16a524=_0xfa17[_0x16a566];return _0x16a524;};'use strict';var multer=require(_0x7fa1('0x0'));var util=require(_0x7fa1('0x1'));var path=require('path');var timeout=require(_0x7fa1('0x2'));var express=require('express');var router=express[_0x7fa1('0x3')]();var auth=require(_0x7fa1('0x4'));var interaction=require(_0x7fa1('0x5'));var config=require(_0x7fa1('0x6'));var controller=require(_0x7fa1('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x7fa1('0x8')]);router[_0x7fa1('0x9')](_0x7fa1('0xa'),auth['isAuthenticated'](),controller[_0x7fa1('0xb')]);router['get'](_0x7fa1('0xc'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x7fa1('0xd')](),controller[_0x7fa1('0xe')]);router[_0x7fa1('0xf')](_0x7fa1('0xc'),auth[_0x7fa1('0xd')](),controller[_0x7fa1('0x10')]);router['delete'](_0x7fa1('0xc'),auth[_0x7fa1('0xd')](),controller[_0x7fa1('0x11')]);module[_0x7fa1('0x12')]=router;
\ No newline at end of file
+var _0xd2c2=['create','put','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','isAuthenticated','index','get','/:id','show'];(function(_0x54c695,_0x5d6677){var _0x3ce06b=function(_0x55bdf1){while(--_0x55bdf1){_0x54c695['push'](_0x54c695['shift']());}};_0x3ce06b(++_0x5d6677);}(_0xd2c2,0x172));var _0x2d2c=function(_0x32894b,_0x5c9f22){_0x32894b=_0x32894b-0x0;var _0x5a98b9=_0xd2c2[_0x32894b];return _0x5a98b9;};'use strict';var multer=require(_0x2d2c('0x0'));var util=require(_0x2d2c('0x1'));var path=require(_0x2d2c('0x2'));var timeout=require(_0x2d2c('0x3'));var express=require(_0x2d2c('0x4'));var router=express[_0x2d2c('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x2d2c('0x6'));var config=require(_0x2d2c('0x7'));var controller=require(_0x2d2c('0x8'));router['get']('/',auth[_0x2d2c('0x9')](),controller[_0x2d2c('0xa')]);router[_0x2d2c('0xb')]('/describe',auth[_0x2d2c('0x9')](),controller['describe']);router[_0x2d2c('0xb')](_0x2d2c('0xc'),auth[_0x2d2c('0x9')](),controller[_0x2d2c('0xd')]);router['post']('/',auth[_0x2d2c('0x9')](),controller[_0x2d2c('0xe')]);router[_0x2d2c('0xf')](_0x2d2c('0xc'),auth[_0x2d2c('0x9')](),controller['update']);router['delete'](_0x2d2c('0xc'),auth[_0x2d2c('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js
index 11ce26b..493fc26 100644
--- a/server/api/chatTransferReport/chatTransferReport.attributes.js
+++ b/server/api/chatTransferReport/chatTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd89c=['NOW','moment','sequelize','exports','STRING','ENUM','agent','queue'];(function(_0x5416db,_0x55683a){var _0x243e35=function(_0x1eb623){while(--_0x1eb623){_0x5416db['push'](_0x5416db['shift']());}};_0x243e35(++_0x55683a);}(_0xd89c,0x1d1));var _0xcd89=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0xd89c[_0x13ea00];return _0x1f7347;};'use strict';var moment=require(_0xcd89('0x0'));var Sequelize=require(_0xcd89('0x1'));module[_0xcd89('0x2')]={'uniqueid':{'type':Sequelize[_0xcd89('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xcd89('0x4')]('account',_0xcd89('0x5'),_0xcd89('0x6')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0xcd89('0x7')]}};
\ No newline at end of file
+var _0x2696=['ENUM','account','agent','queue','DATE','NOW','moment','sequelize','exports'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x2696,0x16e));var _0x6269=function(_0x2916ce,_0x399a9e){_0x2916ce=_0x2916ce-0x0;var _0x4a1d66=_0x2696[_0x2916ce];return _0x4a1d66;};'use strict';var moment=require(_0x6269('0x0'));var Sequelize=require(_0x6269('0x1'));module[_0x6269('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x6269('0x3')](_0x6269('0x4'),_0x6269('0x5'),_0x6269('0x6')),'allowNull':![],'defaultValue':_0x6269('0x6')},'transferredAt':{'type':Sequelize[_0x6269('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x6269('0x8')]}};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js
index e1c59a8..7789d34 100644
--- a/server/api/chatTransferReport/chatTransferReport.controller.js
+++ b/server/api/chatTransferReport/chatTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf9c5=['name','send','index','ChatTransferReport','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','key','VIRTUAL','field','options','include','findAll','catch','params','rawAttributes','includeAll','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','mustache','sox','ejs','lodash','squel','jsforce','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','count','offset','limit','set','Content-Range','json','reject','update','then','destroy','end','stack'];(function(_0x825b02,_0x2ff597){var _0x33c5ad=function(_0x14c4f7){while(--_0x14c4f7){_0x825b02['push'](_0x825b02['shift']());}};_0x33c5ad(++_0x2ff597);}(_0xf9c5,0xf7));var _0x5f9c=function(_0x5c2e3e,_0x26ecd3){_0x5c2e3e=_0x5c2e3e-0x0;var _0x53f64a=_0xf9c5[_0x5c2e3e];return _0x53f64a;};'use strict';var pdf=require(_0x5f9c('0x0'));var emlformat=require(_0x5f9c('0x1'));var rimraf=require(_0x5f9c('0x2'));var zipdir=require(_0x5f9c('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5f9c('0x4'));var BPromise=require(_0x5f9c('0x5'));var Mustache=require(_0x5f9c('0x6'));var util=require('util');var path=require('path');var sox=require(_0x5f9c('0x7'));var csv=require('to-csv');var ejs=require(_0x5f9c('0x8'));var fs=require('fs');var _=require(_0x5f9c('0x9'));var squel=require(_0x5f9c('0xa'));var crypto=require('crypto');var jsforce=require(_0x5f9c('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x5f9c('0xc'));var querystring=require(_0x5f9c('0xd'));var Papa=require(_0x5f9c('0xe'));var Redis=require('ioredis');var authService=require(_0x5f9c('0xf'));var qs=require(_0x5f9c('0x10'));var hardwareService=require(_0x5f9c('0x11'));var logger=require(_0x5f9c('0x12'))(_0x5f9c('0x13'));var utils=require(_0x5f9c('0x14'));var config=require(_0x5f9c('0x15'));var db=require(_0x5f9c('0x16'))['db'];function respondWithStatusCode(_0x470ab7,_0x5a88c2){_0x5a88c2=_0x5a88c2||0xcc;return function(_0x7db269){if(_0x7db269){return _0x470ab7[_0x5f9c('0x17')](_0x5a88c2);}return _0x470ab7[_0x5f9c('0x18')](_0x5a88c2)['end']();};}function respondWithResult(_0x5f199c,_0x1c6c0e){_0x1c6c0e=_0x1c6c0e||0xc8;return function(_0x205c8d){if(_0x205c8d){return _0x5f199c[_0x5f9c('0x18')](_0x1c6c0e)['json'](_0x205c8d);}};}function respondWithFilteredResult(_0x1c9d46,_0x2e5d1b){return function(_0x45b054){if(_0x45b054){var _0x4dbe59=_0x45b054[_0x5f9c('0x19')],_0x24c37a=_0x2e5d1b[_0x5f9c('0x1a')],_0x4880e3=_0x2e5d1b[_0x5f9c('0x1a')]+_0x2e5d1b[_0x5f9c('0x1b')],_0xf57371;if(_0x4880e3>=_0x4dbe59){_0x4880e3=_0x4dbe59;_0xf57371=0xc8;}else{_0xf57371=0xce;}_0x1c9d46[_0x5f9c('0x18')](_0xf57371);return _0x1c9d46[_0x5f9c('0x1c')](_0x5f9c('0x1d'),_0x24c37a+'-'+_0x4880e3+'/'+_0x4dbe59)[_0x5f9c('0x1e')](_0x45b054);}return null;};}function patchUpdates(_0xd6784f){return function(_0xf597d2){try{jsonpatch['apply'](_0xf597d2,_0xd6784f,!![]);}catch(_0x3c72eb){return BPromise[_0x5f9c('0x1f')](_0x3c72eb);}return _0xf597d2['save']();};}function saveUpdates(_0x1bf0f5,_0x4464cf){return function(_0xa82296){if(_0xa82296){return _0xa82296[_0x5f9c('0x20')](_0x1bf0f5)[_0x5f9c('0x21')](function(_0x369df3){return _0x369df3;});}return null;};}function removeEntity(_0x293c87,_0x2caee7){return function(_0x38bf4c){if(_0x38bf4c){return _0x38bf4c[_0x5f9c('0x22')]()[_0x5f9c('0x21')](function(){_0x293c87[_0x5f9c('0x18')](0xcc)[_0x5f9c('0x23')]();});}};}function handleEntityNotFound(_0x4c544b,_0x1eeb05){return function(_0x76670a){if(!_0x76670a){_0x4c544b[_0x5f9c('0x17')](0x194);}return _0x76670a;};}function handleError(_0x166240,_0x24a8df){_0x24a8df=_0x24a8df||0x1f4;return function(_0x2950a0){logger['error'](_0x2950a0[_0x5f9c('0x24')]);if(_0x2950a0[_0x5f9c('0x25')]){delete _0x2950a0[_0x5f9c('0x25')];}_0x166240[_0x5f9c('0x18')](_0x24a8df)[_0x5f9c('0x26')](_0x2950a0);};}exports[_0x5f9c('0x27')]=function(_0x1325f8,_0x3a744f){var _0x12d947={},_0xcfa851={},_0x176de6={'count':0x0,'rows':[]};var _0x24ef03=db[_0x5f9c('0x28')]['rawAttributes'];_0xcfa851[_0x5f9c('0x29')]=_[_0x5f9c('0x2a')](_0x24ef03);_0xcfa851['query']=_[_0x5f9c('0x2a')](_0x1325f8[_0x5f9c('0x2b')]);_0xcfa851['filters']=_[_0x5f9c('0x2c')](_0xcfa851[_0x5f9c('0x29')],_0xcfa851[_0x5f9c('0x2b')]);_0x12d947[_0x5f9c('0x2d')]=_[_0x5f9c('0x2c')](_0xcfa851[_0x5f9c('0x29')],qs[_0x5f9c('0x2e')](_0x1325f8[_0x5f9c('0x2b')]['fields']));_0x12d947[_0x5f9c('0x2d')]=_0x12d947['attributes'][_0x5f9c('0x2f')]?_0x12d947[_0x5f9c('0x2d')]:_0xcfa851['model'];if(!_0x1325f8[_0x5f9c('0x2b')][_0x5f9c('0x30')](_0x5f9c('0x31'))){_0x12d947[_0x5f9c('0x1b')]=qs[_0x5f9c('0x1b')](_0x1325f8[_0x5f9c('0x2b')][_0x5f9c('0x1b')]);_0x12d947['offset']=qs['offset'](_0x1325f8['query'][_0x5f9c('0x1a')]);}_0x12d947[_0x5f9c('0x32')]=qs[_0x5f9c('0x33')](_0x1325f8['query']['sort']);_0x12d947[_0x5f9c('0x34')]=qs[_0x5f9c('0x35')](_[_0x5f9c('0x36')](_0x1325f8['query'],_0xcfa851[_0x5f9c('0x35')]));if(_0x1325f8[_0x5f9c('0x2b')][_0x5f9c('0x37')]){_0x12d947[_0x5f9c('0x34')]=_[_0x5f9c('0x38')](_0x12d947[_0x5f9c('0x34')],{'$or':_['map'](_0x24ef03,function(_0x28be47){if(_0x28be47['type'][_0x5f9c('0x39')]!==_0x5f9c('0x3a')){var _0xa3097e={};_0xa3097e[_0x28be47[_0x5f9c('0x3b')]]={'$like':'%'+_0x1325f8[_0x5f9c('0x2b')][_0x5f9c('0x37')]+'%'};return _0xa3097e;}})});}_0x12d947=_[_0x5f9c('0x38')]({},_0x12d947,_0x1325f8[_0x5f9c('0x3c')]);var _0xf84298={'where':_0x12d947[_0x5f9c('0x34')]};return db[_0x5f9c('0x28')][_0x5f9c('0x19')](_0xf84298)[_0x5f9c('0x21')](function(_0x3fdcaa){_0x176de6[_0x5f9c('0x19')]=_0x3fdcaa;if(_0x1325f8[_0x5f9c('0x2b')]['includeAll']){_0x12d947[_0x5f9c('0x3d')]=[{'all':!![]}];}return db['ChatTransferReport'][_0x5f9c('0x3e')](_0x12d947);})['then'](function(_0x28832c){_0x176de6['rows']=_0x28832c;return _0x176de6;})[_0x5f9c('0x21')](respondWithFilteredResult(_0x3a744f,_0x12d947))[_0x5f9c('0x3f')](handleError(_0x3a744f,null));};exports['show']=function(_0x305bb2,_0x4fb518){var _0x36bfe2={'raw':!![],'where':{'id':_0x305bb2[_0x5f9c('0x40')]['id']}},_0x449af9={};_0x449af9['model']=_[_0x5f9c('0x2a')](db['ChatTransferReport'][_0x5f9c('0x41')]);_0x449af9[_0x5f9c('0x2b')]=_[_0x5f9c('0x2a')](_0x305bb2[_0x5f9c('0x2b')]);_0x449af9[_0x5f9c('0x35')]=_[_0x5f9c('0x2c')](_0x449af9[_0x5f9c('0x29')],_0x449af9[_0x5f9c('0x2b')]);_0x36bfe2[_0x5f9c('0x2d')]=_[_0x5f9c('0x2c')](_0x449af9['model'],qs[_0x5f9c('0x2e')](_0x305bb2[_0x5f9c('0x2b')][_0x5f9c('0x2e')]));_0x36bfe2[_0x5f9c('0x2d')]=_0x36bfe2[_0x5f9c('0x2d')]['length']?_0x36bfe2[_0x5f9c('0x2d')]:_0x449af9['model'];if(_0x305bb2[_0x5f9c('0x2b')][_0x5f9c('0x42')]){_0x36bfe2[_0x5f9c('0x3d')]=[{'all':!![]}];}_0x36bfe2=_[_0x5f9c('0x38')]({},_0x36bfe2,_0x305bb2['options']);return db[_0x5f9c('0x28')][_0x5f9c('0x43')](_0x36bfe2)[_0x5f9c('0x21')](handleEntityNotFound(_0x4fb518,null))[_0x5f9c('0x21')](respondWithResult(_0x4fb518,null))[_0x5f9c('0x3f')](handleError(_0x4fb518,null));};exports[_0x5f9c('0x44')]=function(_0x325424,_0x38cd60){return db[_0x5f9c('0x28')][_0x5f9c('0x44')](_0x325424['body'],{})[_0x5f9c('0x21')](respondWithResult(_0x38cd60,0xc9))['catch'](handleError(_0x38cd60,null));};exports[_0x5f9c('0x20')]=function(_0x315366,_0x295df0){if(_0x315366[_0x5f9c('0x45')]['id']){delete _0x315366['body']['id'];}return db[_0x5f9c('0x28')][_0x5f9c('0x43')]({'where':{'id':_0x315366[_0x5f9c('0x40')]['id']}})['then'](handleEntityNotFound(_0x295df0,null))[_0x5f9c('0x21')](saveUpdates(_0x315366['body'],null))[_0x5f9c('0x21')](respondWithResult(_0x295df0,null))[_0x5f9c('0x3f')](handleError(_0x295df0,null));};exports['destroy']=function(_0x2bb48a,_0x2fd603){return db[_0x5f9c('0x28')]['find']({'where':{'id':_0x2bb48a['params']['id']}})[_0x5f9c('0x21')](handleEntityNotFound(_0x2fd603,null))['then'](removeEntity(_0x2fd603,null))[_0x5f9c('0x3f')](handleError(_0x2fd603,null));};exports['describe']=function(_0x57e602,_0x2bdf95){return db[_0x5f9c('0x28')][_0x5f9c('0x46')]()['then'](respondWithResult(_0x2bdf95,null))[_0x5f9c('0x3f')](handleError(_0x2bdf95,null));};
\ No newline at end of file
+var _0x58b4=['attributes','length','hasOwnProperty','nolimit','limit','sort','pick','filter','merge','where','map','type','key','field','ChatTransferReport','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','update','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','end','count','offset','set','Content-Range','apply','reject','save','destroy','then','sendStatus','error','stack','name','send','index','model','keys','query','filters','intersection','fields'];(function(_0x27683f,_0x3f77ef){var _0x4448d0=function(_0x3b0815){while(--_0x3b0815){_0x27683f['push'](_0x27683f['shift']());}};_0x4448d0(++_0x3f77ef);}(_0x58b4,0xb7));var _0x458b=function(_0x44b177,_0x3cbf09){_0x44b177=_0x44b177-0x0;var _0x28ea32=_0x58b4[_0x44b177];return _0x28ea32;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x458b('0x0'));var rimraf=require(_0x458b('0x1'));var zipdir=require(_0x458b('0x2'));var jsonpatch=require(_0x458b('0x3'));var rp=require(_0x458b('0x4'));var moment=require(_0x458b('0x5'));var BPromise=require(_0x458b('0x6'));var Mustache=require(_0x458b('0x7'));var util=require(_0x458b('0x8'));var path=require('path');var sox=require(_0x458b('0x9'));var csv=require(_0x458b('0xa'));var ejs=require(_0x458b('0xb'));var fs=require('fs');var _=require(_0x458b('0xc'));var squel=require(_0x458b('0xd'));var crypto=require(_0x458b('0xe'));var jsforce=require(_0x458b('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x458b('0xa'));var querystring=require('querystring');var Papa=require(_0x458b('0x10'));var Redis=require(_0x458b('0x11'));var authService=require(_0x458b('0x12'));var qs=require(_0x458b('0x13'));var hardwareService=require(_0x458b('0x14'));var logger=require(_0x458b('0x15'))('api');var utils=require(_0x458b('0x16'));var config=require(_0x458b('0x17'));var db=require(_0x458b('0x18'))['db'];function respondWithStatusCode(_0x2ff98b,_0x4a270b){_0x4a270b=_0x4a270b||0xcc;return function(_0x111b34){if(_0x111b34){return _0x2ff98b['sendStatus'](_0x4a270b);}return _0x2ff98b[_0x458b('0x19')](_0x4a270b)[_0x458b('0x1a')]();};}function respondWithResult(_0x570855,_0x3f2cf0){_0x3f2cf0=_0x3f2cf0||0xc8;return function(_0x3d57b7){if(_0x3d57b7){return _0x570855[_0x458b('0x19')](_0x3f2cf0)['json'](_0x3d57b7);}};}function respondWithFilteredResult(_0x29b7c4,_0x1bb199){return function(_0x18e424){if(_0x18e424){var _0x314aee=_0x18e424[_0x458b('0x1b')],_0x3b2339=_0x1bb199[_0x458b('0x1c')],_0x463c0b=_0x1bb199['offset']+_0x1bb199['limit'],_0x2c4299;if(_0x463c0b>=_0x314aee){_0x463c0b=_0x314aee;_0x2c4299=0xc8;}else{_0x2c4299=0xce;}_0x29b7c4['status'](_0x2c4299);return _0x29b7c4[_0x458b('0x1d')](_0x458b('0x1e'),_0x3b2339+'-'+_0x463c0b+'/'+_0x314aee)['json'](_0x18e424);}return null;};}function patchUpdates(_0x3411a1){return function(_0x5c8c6e){try{jsonpatch[_0x458b('0x1f')](_0x5c8c6e,_0x3411a1,!![]);}catch(_0x4a2b67){return BPromise[_0x458b('0x20')](_0x4a2b67);}return _0x5c8c6e[_0x458b('0x21')]();};}function saveUpdates(_0x20ba43,_0x4bd98c){return function(_0x25ef98){if(_0x25ef98){return _0x25ef98['update'](_0x20ba43)['then'](function(_0x49ad67){return _0x49ad67;});}return null;};}function removeEntity(_0x43ab5c,_0x138c14){return function(_0x28984c){if(_0x28984c){return _0x28984c[_0x458b('0x22')]()[_0x458b('0x23')](function(){_0x43ab5c[_0x458b('0x19')](0xcc)[_0x458b('0x1a')]();});}};}function handleEntityNotFound(_0x4591f7,_0x27dbb8){return function(_0x235173){if(!_0x235173){_0x4591f7[_0x458b('0x24')](0x194);}return _0x235173;};}function handleError(_0x54d1d1,_0x5a33fe){_0x5a33fe=_0x5a33fe||0x1f4;return function(_0x5e5c8f){logger[_0x458b('0x25')](_0x5e5c8f[_0x458b('0x26')]);if(_0x5e5c8f[_0x458b('0x27')]){delete _0x5e5c8f[_0x458b('0x27')];}_0x54d1d1['status'](_0x5a33fe)[_0x458b('0x28')](_0x5e5c8f);};}exports[_0x458b('0x29')]=function(_0xf5b8fb,_0x270ed3){var _0x1af5e6={},_0xffa61d={},_0x2d4492={'count':0x0,'rows':[]};var _0x226cde=db['ChatTransferReport']['rawAttributes'];_0xffa61d[_0x458b('0x2a')]=_[_0x458b('0x2b')](_0x226cde);_0xffa61d['query']=_[_0x458b('0x2b')](_0xf5b8fb[_0x458b('0x2c')]);_0xffa61d[_0x458b('0x2d')]=_['intersection'](_0xffa61d[_0x458b('0x2a')],_0xffa61d[_0x458b('0x2c')]);_0x1af5e6['attributes']=_[_0x458b('0x2e')](_0xffa61d[_0x458b('0x2a')],qs[_0x458b('0x2f')](_0xf5b8fb[_0x458b('0x2c')][_0x458b('0x2f')]));_0x1af5e6[_0x458b('0x30')]=_0x1af5e6[_0x458b('0x30')][_0x458b('0x31')]?_0x1af5e6[_0x458b('0x30')]:_0xffa61d[_0x458b('0x2a')];if(!_0xf5b8fb[_0x458b('0x2c')][_0x458b('0x32')](_0x458b('0x33'))){_0x1af5e6[_0x458b('0x34')]=qs['limit'](_0xf5b8fb['query']['limit']);_0x1af5e6[_0x458b('0x1c')]=qs[_0x458b('0x1c')](_0xf5b8fb[_0x458b('0x2c')][_0x458b('0x1c')]);}_0x1af5e6['order']=qs[_0x458b('0x35')](_0xf5b8fb[_0x458b('0x2c')][_0x458b('0x35')]);_0x1af5e6['where']=qs[_0x458b('0x2d')](_[_0x458b('0x36')](_0xf5b8fb[_0x458b('0x2c')],_0xffa61d['filters']));if(_0xf5b8fb[_0x458b('0x2c')][_0x458b('0x37')]){_0x1af5e6['where']=_[_0x458b('0x38')](_0x1af5e6[_0x458b('0x39')],{'$or':_[_0x458b('0x3a')](_0x226cde,function(_0x6261ba){if(_0x6261ba[_0x458b('0x3b')][_0x458b('0x3c')]!=='VIRTUAL'){var _0xf6b0a0={};_0xf6b0a0[_0x6261ba[_0x458b('0x3d')]]={'$like':'%'+_0xf5b8fb[_0x458b('0x2c')]['filter']+'%'};return _0xf6b0a0;}})});}_0x1af5e6=_[_0x458b('0x38')]({},_0x1af5e6,_0xf5b8fb['options']);var _0x1f7e31={'where':_0x1af5e6['where']};return db[_0x458b('0x3e')][_0x458b('0x1b')](_0x1f7e31)[_0x458b('0x23')](function(_0x1e0ed2){_0x2d4492['count']=_0x1e0ed2;if(_0xf5b8fb[_0x458b('0x2c')][_0x458b('0x3f')]){_0x1af5e6[_0x458b('0x40')]=[{'all':!![]}];}return db[_0x458b('0x3e')][_0x458b('0x41')](_0x1af5e6);})[_0x458b('0x23')](function(_0x397c46){_0x2d4492[_0x458b('0x42')]=_0x397c46;return _0x2d4492;})[_0x458b('0x23')](respondWithFilteredResult(_0x270ed3,_0x1af5e6))[_0x458b('0x43')](handleError(_0x270ed3,null));};exports[_0x458b('0x44')]=function(_0x15ab62,_0x3148cd){var _0x57bc06={'raw':!![],'where':{'id':_0x15ab62[_0x458b('0x45')]['id']}},_0x20db16={};_0x20db16[_0x458b('0x2a')]=_[_0x458b('0x2b')](db[_0x458b('0x3e')][_0x458b('0x46')]);_0x20db16['query']=_[_0x458b('0x2b')](_0x15ab62['query']);_0x20db16['filters']=_[_0x458b('0x2e')](_0x20db16[_0x458b('0x2a')],_0x20db16[_0x458b('0x2c')]);_0x57bc06['attributes']=_['intersection'](_0x20db16['model'],qs[_0x458b('0x2f')](_0x15ab62[_0x458b('0x2c')][_0x458b('0x2f')]));_0x57bc06[_0x458b('0x30')]=_0x57bc06[_0x458b('0x30')]['length']?_0x57bc06[_0x458b('0x30')]:_0x20db16[_0x458b('0x2a')];if(_0x15ab62['query']['includeAll']){_0x57bc06[_0x458b('0x40')]=[{'all':!![]}];}_0x57bc06=_['merge']({},_0x57bc06,_0x15ab62[_0x458b('0x47')]);return db['ChatTransferReport'][_0x458b('0x48')](_0x57bc06)[_0x458b('0x23')](handleEntityNotFound(_0x3148cd,null))[_0x458b('0x23')](respondWithResult(_0x3148cd,null))[_0x458b('0x43')](handleError(_0x3148cd,null));};exports[_0x458b('0x49')]=function(_0x2b321b,_0x24b699){return db[_0x458b('0x3e')][_0x458b('0x49')](_0x2b321b[_0x458b('0x4a')],{})[_0x458b('0x23')](respondWithResult(_0x24b699,0xc9))['catch'](handleError(_0x24b699,null));};exports[_0x458b('0x4b')]=function(_0xccf952,_0x5622a3){if(_0xccf952[_0x458b('0x4a')]['id']){delete _0xccf952[_0x458b('0x4a')]['id'];}return db[_0x458b('0x3e')][_0x458b('0x48')]({'where':{'id':_0xccf952[_0x458b('0x45')]['id']}})['then'](handleEntityNotFound(_0x5622a3,null))['then'](saveUpdates(_0xccf952[_0x458b('0x4a')],null))[_0x458b('0x23')](respondWithResult(_0x5622a3,null))['catch'](handleError(_0x5622a3,null));};exports['destroy']=function(_0x265d98,_0x5791a0){return db[_0x458b('0x3e')]['find']({'where':{'id':_0x265d98['params']['id']}})['then'](handleEntityNotFound(_0x5791a0,null))['then'](removeEntity(_0x5791a0,null))[_0x458b('0x43')](handleError(_0x5791a0,null));};exports[_0x458b('0x4c')]=function(_0x104188,_0x5daaa7){return db[_0x458b('0x3e')]['describe']()['then'](respondWithResult(_0x5daaa7,null))[_0x458b('0x43')](handleError(_0x5daaa7,null));};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js
index 9c6e28e..0491f1f 100644
--- a/server/api/chatTransferReport/chatTransferReport.model.js
+++ b/server/api/chatTransferReport/chatTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfcc5=['util','../../config/logger','api','moment','request-promise','../../config/environment','./chatTransferReport.attributes','define','ChatTransferReport','report_chat_transfer','uniqueid'];(function(_0x14686a,_0x540f0d){var _0xeafc86=function(_0x3be641){while(--_0x3be641){_0x14686a['push'](_0x14686a['shift']());}};_0xeafc86(++_0x540f0d);}(_0xfcc5,0x14a));var _0x5fcc=function(_0xd582c5,_0xb3ea1b){_0xd582c5=_0xd582c5-0x0;var _0x40539c=_0xfcc5[_0xd582c5];return _0x40539c;};'use strict';var _=require('lodash');var util=require(_0x5fcc('0x0'));var logger=require(_0x5fcc('0x1'))(_0x5fcc('0x2'));var moment=require(_0x5fcc('0x3'));var BPromise=require('bluebird');var rp=require(_0x5fcc('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x5fcc('0x5'));var attributes=require(_0x5fcc('0x6'));module['exports']=function(_0x4a781a,_0x154c05){return _0x4a781a[_0x5fcc('0x7')](_0x5fcc('0x8'),attributes,{'tableName':_0x5fcc('0x9'),'paranoid':![],'indexes':[{'name':_0x5fcc('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x205d=['util','../../config/logger','bluebird','request-promise','path','../../config/environment','./chatTransferReport.attributes','exports','define','ChatTransferReport','report_chat_transfer','uniqueid','lodash'];(function(_0xcc65e9,_0x4ccf83){var _0x45a8c5=function(_0x24e9fe){while(--_0x24e9fe){_0xcc65e9['push'](_0xcc65e9['shift']());}};_0x45a8c5(++_0x4ccf83);}(_0x205d,0xf6));var _0xd205=function(_0x402983,_0x5b1129){_0x402983=_0x402983-0x0;var _0x2dfa7e=_0x205d[_0x402983];return _0x2dfa7e;};'use strict';var _=require(_0xd205('0x0'));var util=require(_0xd205('0x1'));var logger=require(_0xd205('0x2'))('api');var moment=require('moment');var BPromise=require(_0xd205('0x3'));var rp=require(_0xd205('0x4'));var fs=require('fs');var path=require(_0xd205('0x5'));var rimraf=require('rimraf');var config=require(_0xd205('0x6'));var attributes=require(_0xd205('0x7'));module[_0xd205('0x8')]=function(_0x45a533,_0x4c078b){return _0x45a533[_0xd205('0x9')](_0xd205('0xa'),attributes,{'tableName':_0xd205('0xb'),'paranoid':![],'indexes':[{'name':_0xd205('0xc'),'fields':[_0xd205('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js
index 4437dc8..e933aa4 100644
--- a/server/api/chatTransferReport/chatTransferReport.rpc.js
+++ b/server/api/chatTransferReport/chatTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4711=['message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x229774,_0x3073e4){var _0x32f56d=function(_0x11526f){while(--_0x11526f){_0x229774['push'](_0x229774['shift']());}};_0x32f56d(++_0x3073e4);}(_0x4711,0x10c));var _0x1471=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x4711[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x1471('0x0'));var util=require(_0x1471('0x1'));var moment=require(_0x1471('0x2'));var BPromise=require(_0x1471('0x3'));var rs=require(_0x1471('0x4'));var fs=require('fs');var Redis=require(_0x1471('0x5'));var db=require(_0x1471('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x1471('0x7'))('rpc');var config=require(_0x1471('0x8'));var jayson=require(_0x1471('0x9'));var client=jayson[_0x1471('0xa')][_0x1471('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1be347,_0x4d1a90,_0x1cf7db){return new BPromise(function(_0x853506,_0x319c27){return client[_0x1471('0xc')](_0x1be347,_0x1cf7db)[_0x1471('0xd')](function(_0x4ddede){logger['info'](_0x1471('0xe'),_0x4d1a90,_0x1471('0xf'));logger[_0x1471('0x10')](_0x1471('0x11'),_0x4d1a90,_0x1471('0xf'),JSON[_0x1471('0x12')](_0x4ddede));if(_0x4ddede[_0x1471('0x13')]){if(_0x4ddede[_0x1471('0x13')]['code']===0x1f4){logger[_0x1471('0x13')](_0x1471('0xe'),_0x4d1a90,_0x4ddede[_0x1471('0x13')][_0x1471('0x14')]);return _0x319c27(_0x4ddede[_0x1471('0x13')]['message']);}logger[_0x1471('0x13')](_0x1471('0xe'),_0x4d1a90,_0x4ddede[_0x1471('0x13')]['message']);return _0x853506(_0x4ddede[_0x1471('0x13')][_0x1471('0x14')]);}else{logger[_0x1471('0x15')](_0x1471('0xe'),_0x4d1a90,_0x1471('0xf'));_0x853506(_0x4ddede[_0x1471('0x16')][_0x1471('0x14')]);}})[_0x1471('0x17')](function(_0x11ea35){logger[_0x1471('0x13')](_0x1471('0xe'),_0x4d1a90,_0x11ea35);_0x319c27(_0x11ea35);});});}
\ No newline at end of file
+var _0xd8eb=['result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','then','request\x20sent','debug','error','code','ChatTransferReport,\x20%s,\x20%s','message','info'];(function(_0x4cf856,_0x4ae30d){var _0x317752=function(_0xc8f702){while(--_0xc8f702){_0x4cf856['push'](_0x4cf856['shift']());}};_0x317752(++_0x4ae30d);}(_0xd8eb,0x66));var _0xbd8e=function(_0x17406e,_0x1049fd){_0x17406e=_0x17406e-0x0;var _0x2bfc5a=_0xd8eb[_0x17406e];return _0x2bfc5a;};'use strict';var _=require(_0xbd8e('0x0'));var util=require(_0xbd8e('0x1'));var moment=require('moment');var BPromise=require(_0xbd8e('0x2'));var rs=require(_0xbd8e('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbd8e('0x4'))['db'];var utils=require(_0xbd8e('0x5'));var logger=require(_0xbd8e('0x6'))(_0xbd8e('0x7'));var config=require(_0xbd8e('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xbd8e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4a24dd,_0xbe29da,_0x7602aa){return new BPromise(function(_0x485c4f,_0x4501b8){return client['request'](_0x4a24dd,_0x7602aa)[_0xbd8e('0xa')](function(_0x469e17){logger['info']('ChatTransferReport,\x20%s,\x20%s',_0xbe29da,_0xbd8e('0xb'));logger[_0xbd8e('0xc')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0xbe29da,_0xbd8e('0xb'),JSON['stringify'](_0x469e17));if(_0x469e17[_0xbd8e('0xd')]){if(_0x469e17[_0xbd8e('0xd')][_0xbd8e('0xe')]===0x1f4){logger['error'](_0xbd8e('0xf'),_0xbe29da,_0x469e17['error']['message']);return _0x4501b8(_0x469e17[_0xbd8e('0xd')][_0xbd8e('0x10')]);}logger[_0xbd8e('0xd')](_0xbd8e('0xf'),_0xbe29da,_0x469e17[_0xbd8e('0xd')][_0xbd8e('0x10')]);return _0x485c4f(_0x469e17[_0xbd8e('0xd')][_0xbd8e('0x10')]);}else{logger[_0xbd8e('0x11')](_0xbd8e('0xf'),_0xbe29da,_0xbd8e('0xb'));_0x485c4f(_0x469e17[_0xbd8e('0x12')][_0xbd8e('0x10')]);}})[_0xbd8e('0x13')](function(_0x4bcae0){logger[_0xbd8e('0xd')](_0xbd8e('0xf'),_0xbe29da,_0x4bcae0);_0x4501b8(_0x4bcae0);});});}
\ No newline at end of file
diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js
index 9340b9e..77fc48a 100644
--- a/server/api/chatTransferReport/index.js
+++ b/server/api/chatTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2dd3=['get','isAuthenticated','index','/describe','describe','/:id','show','post','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x392b58,_0x31de06){var _0x300a06=function(_0x34d09f){while(--_0x34d09f){_0x392b58['push'](_0x392b58['shift']());}};_0x300a06(++_0x31de06);}(_0x2dd3,0x75));var _0x32dd=function(_0xc7fa34,_0x3deb58){_0xc7fa34=_0xc7fa34-0x0;var _0x2dafab=_0x2dd3[_0xc7fa34];return _0x2dafab;};'use strict';var multer=require(_0x32dd('0x0'));var util=require(_0x32dd('0x1'));var path=require(_0x32dd('0x2'));var timeout=require(_0x32dd('0x3'));var express=require(_0x32dd('0x4'));var router=express[_0x32dd('0x5')]();var auth=require(_0x32dd('0x6'));var interaction=require(_0x32dd('0x7'));var config=require(_0x32dd('0x8'));var controller=require('./chatTransferReport.controller');router[_0x32dd('0x9')]('/',auth[_0x32dd('0xa')](),controller[_0x32dd('0xb')]);router['get'](_0x32dd('0xc'),auth[_0x32dd('0xa')](),controller[_0x32dd('0xd')]);router[_0x32dd('0x9')](_0x32dd('0xe'),auth[_0x32dd('0xa')](),controller[_0x32dd('0xf')]);router[_0x32dd('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0x32dd('0x11')](_0x32dd('0xe'),auth[_0x32dd('0xa')](),controller[_0x32dd('0x12')]);router[_0x32dd('0x13')](_0x32dd('0xe'),auth[_0x32dd('0xa')](),controller[_0x32dd('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xf230=['Router','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','/describe','describe','/:id','show','post','put','exports','multer','util','path','connect-timeout'];(function(_0x4f431d,_0xd51a3b){var _0x4f31e1=function(_0x1c688d){while(--_0x1c688d){_0x4f431d['push'](_0x4f431d['shift']());}};_0x4f31e1(++_0xd51a3b);}(_0xf230,0x1c7));var _0x0f23=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xf230[_0x2641f9];return _0x585741;};'use strict';var multer=require(_0x0f23('0x0'));var util=require(_0x0f23('0x1'));var path=require(_0x0f23('0x2'));var timeout=require(_0x0f23('0x3'));var express=require('express');var router=express[_0x0f23('0x4')]();var auth=require(_0x0f23('0x5'));var interaction=require(_0x0f23('0x6'));var config=require('../../config/environment');var controller=require('./chatTransferReport.controller');router['get']('/',auth[_0x0f23('0x7')](),controller[_0x0f23('0x8')]);router[_0x0f23('0x9')](_0x0f23('0xa'),auth[_0x0f23('0x7')](),controller[_0x0f23('0xb')]);router['get'](_0x0f23('0xc'),auth[_0x0f23('0x7')](),controller[_0x0f23('0xd')]);router[_0x0f23('0xe')]('/',auth[_0x0f23('0x7')](),controller['create']);router[_0x0f23('0xf')](_0x0f23('0xc'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x0f23('0xc'),auth[_0x0f23('0x7')](),controller['destroy']);module[_0x0f23('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js
index a49f0fe..7837f00 100644
--- a/server/api/chatWebsite/chatWebsite.attributes.js
+++ b/server/api/chatWebsite/chatWebsite.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3562=['offlineForm','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','website_alias','bottom_right','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','exports','address','STRING','email','Agent','#9f946a','#ffffff','INTEGER','BOOLEAN','ENUM','rounded','We\x20are\x20here!','Chat','Send','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Form\x20submission\x20error','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','thumb','input','name','text','onlineForm','parse','getDataValue','setDataValue','stringify','textarea','Comments','Leave\x20your\x20comments'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x3562,0x17d));var _0x2356=function(_0x31c5fd,_0x33131f){_0x31c5fd=_0x31c5fd-0x0;var _0x3799ab=_0x3562[_0x31c5fd];return _0x3799ab;};'use strict';var Sequelize=require('sequelize');var rs=require('randomstring');module[_0x2356('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x2356('0x1')},'description':{'type':Sequelize[_0x2356('0x2')]},'mapKey':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x3')},'mapKeyOffline':{'type':Sequelize[_0x2356('0x2')],'defaultValue':'email'},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x4')},'customerAlias':{'type':Sequelize[_0x2356('0x2')],'defaultValue':'Me'},'color':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#9f946a','validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x2356('0x2')],'allowNull':![],'defaultValue':_0x2356('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x2356('0x2')],'allowNull':![],'defaultValue':_0x2356('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x2356('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize['STRING']},'animation':{'type':Sequelize[_0x2356('0x8')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x2356('0x9')](_0x2356('0xa'),'squared'),'defaultValue':_0x2356('0xa')},'header_online':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0xb')},'start_chat_button':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0xc')},'offline_chat_button':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0xd')},'header_offline':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0xe')},'download_transcript':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x2356('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0xf')},'defaultWhiteLabel':{'type':Sequelize[_0x2356('0x8')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x2356('0x10')]},'closingQuestion':{'type':Sequelize[_0x2356('0x2')],'defaultValue':'Do\x20you\x20want\x20to\x20close\x20the\x20interaction?'},'formSubmitSuccessMessage':{'type':Sequelize[_0x2356('0x2')],'defaultValue':'Form\x20properly\x20submitted'},'formSubmitFailureMessage':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x11')},'noteTitle':{'type':Sequelize['STRING'],'defaultValue':'Note'},'placeholderMessage':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x12')},'closingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x13')},'closingMessageButton':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0xd')},'skipMessageButton':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x14')},'conditionAgreement':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingType':{'type':Sequelize[_0x2356('0x9')]('star',_0x2356('0x15')),'defaultValue':'star'},'ratingStarsNumber':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x2356('0x10')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x2356('0x16'),'variable':null,'config':{'placeholder':_0x2356('0x17'),'type':_0x2356('0x18'),'required':!![]},'props':{'title':_0x2356('0x17'),'helpText':''}},{'type':_0x2356('0x16'),'props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x2356('0x3')},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue'](_0x2356('0x19'))?JSON[_0x2356('0x1a')](this[_0x2356('0x1b')]('onlineForm')):{};},'set':function(_0x5e19d3){return this[_0x2356('0x1c')]('onlineForm',JSON['stringify'](_0x5e19d3));}},'offlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0x2356('0x1d')]({'items':[{'type':_0x2356('0x16'),'props':{'title':_0x2356('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0x2356('0x3'),'type':_0x2356('0x3')},'variable':null},{'type':_0x2356('0x1e'),'config':{'placeholder':_0x2356('0x1f')},'props':{'title':_0x2356('0x1f'),'helpText':_0x2356('0x20')}}],'fromKey':0x0});},'get':function(){return this[_0x2356('0x1b')](_0x2356('0x21'))?JSON[_0x2356('0x1a')](this[_0x2356('0x1b')](_0x2356('0x21'))):{};},'set':function(_0x1c21ce){return this[_0x2356('0x1c')](_0x2356('0x21'),JSON[_0x2356('0x1d')](_0x1c21ce));}},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs['generate']();}},'autoclose':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x2356('0x2')]},'forwardOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x2356('0x2')]},'waitingTitle':{'type':Sequelize[_0x2356('0x2')],'defaultValue':'All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.'},'waitingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x22')},'offlineMessageSubject':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x23')},'offlineMessageBody':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x24')},'enableUnmanagedNote':{'type':Sequelize[_0x2356('0x8')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x25')},'skipUnmanaged':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x14')},'sendUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0xd')},'enableCustomerAttachment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x2356('0x10')]},'showAgentAvatar':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x2356('0x2')]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x2356('0x26');}},'notificationSound':{'type':Sequelize[_0x2356('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x27')},'waitForTheAssignedAgent':{'type':Sequelize[_0x2356('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x28')},'verticalAlignment':{'type':Sequelize[_0x2356('0x7')],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize['STRING'],'defaultValue':_0x2356('0x29')},'defaultTitle':{'type':Sequelize[_0x2356('0x2')]},'customerAvatar':{'type':Sequelize[_0x2356('0x10')]},'showCustomerAvatar':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x2356('0x7')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x2356('0x2')],'allowNull':![],'defaultValue':_0x2356('0x2a'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x2356('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x2356('0x2')],'defaultValue':_0x2356('0x2b')},'systemAvatar':{'type':Sequelize['TEXT']},'mandatoryDispositionPauseId':{'type':Sequelize[_0x2356('0x7')],'comment':_0x2356('0x2c')},'mandatoryDisposition':{'type':Sequelize[_0x2356('0x8')],'defaultValue':![],'comment':_0x2356('0x2d'),'set':function(_0x234b0b){if(!_0x234b0b)this['setDataValue']('mandatoryDispositionPauseId',null);this[_0x2356('0x1c')]('mandatoryDisposition',_0x234b0b);}}};
\ No newline at end of file
+var _0xbfe0=['Send','Skip','thumb','star','input','text','name','getDataValue','onlineForm','parse','setDataValue','stringify','textarea','Comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','website_alias','bottom_right','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','address','email','Agent','#9f946a','#ffffff','BOOLEAN','ENUM','rounded','squared','Chat','Contact\x20us','INTEGER','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!'];(function(_0x2adb39,_0x16b799){var _0x2d31b4=function(_0x43ac20){while(--_0x43ac20){_0x2adb39['push'](_0x2adb39['shift']());}};_0x2d31b4(++_0x16b799);}(_0xbfe0,0x1f2));var _0x0bfe=function(_0x2cfb58,_0x3d9412){_0x2cfb58=_0x2cfb58-0x0;var _0xd99951=_0xbfe0[_0x2cfb58];return _0xd99951;};'use strict';var Sequelize=require(_0x0bfe('0x0'));var rs=require(_0x0bfe('0x1'));module[_0x0bfe('0x2')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize[_0x0bfe('0x3')],'allowNull':![],'unique':_0x0bfe('0x4')},'description':{'type':Sequelize[_0x0bfe('0x3')]},'mapKey':{'type':Sequelize['STRING'],'defaultValue':'email'},'mapKeyOffline':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x5')},'key':{'type':Sequelize[_0x0bfe('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize['STRING'],'defaultValue':_0x0bfe('0x6')},'customerAlias':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x0bfe('0x3')],'allowNull':![],'defaultValue':_0x0bfe('0x7'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x0bfe('0x3')],'allowNull':![],'defaultValue':_0x0bfe('0x7'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x0bfe('0x3')],'allowNull':![],'defaultValue':_0x0bfe('0x8'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xf},'remote':{'type':Sequelize[_0x0bfe('0x3')]},'animation':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x0bfe('0xa')](_0x0bfe('0xb'),_0x0bfe('0xc')),'defaultValue':_0x0bfe('0xb')},'header_online':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':'We\x20are\x20here!'},'start_chat_button':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0xd')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':'Send'},'header_offline':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0xe')},'download_transcript':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x0bfe('0xf')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize['STRING'],'defaultValue':_0x0bfe('0x10')},'defaultWhiteLabel':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x0bfe('0x11')]},'closingQuestion':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x12')},'formSubmitSuccessMessage':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x13')},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':'Note'},'placeholderMessage':{'type':Sequelize['STRING'],'defaultValue':_0x0bfe('0x14')},'closingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x0bfe('0x15')},'closingMessageButton':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x16')},'skipMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0x0bfe('0x17')},'conditionAgreement':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'ratingType':{'type':Sequelize[_0x0bfe('0xa')]('star',_0x0bfe('0x18')),'defaultValue':_0x0bfe('0x19')},'ratingStarsNumber':{'type':Sequelize[_0x0bfe('0xf')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x0bfe('0x11')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x0bfe('0x1a'),'variable':null,'config':{'placeholder':'name','type':_0x0bfe('0x1b'),'required':!![]},'props':{'title':_0x0bfe('0x1c'),'helpText':''}},{'type':_0x0bfe('0x1a'),'props':{'title':_0x0bfe('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0x0bfe('0x5'),'type':_0x0bfe('0x5')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x0bfe('0x1d')](_0x0bfe('0x1e'))?JSON[_0x0bfe('0x1f')](this[_0x0bfe('0x1d')]('onlineForm')):{};},'set':function(_0x4572fb){return this[_0x0bfe('0x20')](_0x0bfe('0x1e'),JSON[_0x0bfe('0x21')](_0x4572fb));}},'offlineForm':{'type':Sequelize[_0x0bfe('0x11')],'defaultValue':function(){return JSON[_0x0bfe('0x21')]({'items':[{'type':_0x0bfe('0x1a'),'props':{'title':_0x0bfe('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0x0bfe('0x5'),'type':_0x0bfe('0x5')},'variable':null},{'type':_0x0bfe('0x22'),'config':{'placeholder':_0x0bfe('0x23')},'props':{'title':_0x0bfe('0x23'),'helpText':'Leave\x20your\x20comments'}}],'fromKey':0x0});},'get':function(){return this[_0x0bfe('0x1d')](_0x0bfe('0x24'))?JSON[_0x0bfe('0x1f')](this['getDataValue'](_0x0bfe('0x24'))):{};},'set':function(_0x1b8dca){return this[_0x0bfe('0x20')](_0x0bfe('0x24'),JSON[_0x0bfe('0x21')](_0x1b8dca));}},'token':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':function(){return rs[_0x0bfe('0x25')]();}},'autoclose':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x0bfe('0x3')]},'forwardOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x0bfe('0x3')]},'waitingTitle':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x26')},'waitingMessage':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':'Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'},'offlineMessageSubject':{'type':Sequelize['STRING'],'defaultValue':_0x0bfe('0x27')},'offlineMessageBody':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x28')},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x29')},'skipUnmanaged':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':'Skip'},'sendUnmanaged':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':'Send'},'enableCustomerAttachment':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x0bfe('0x11')]},'showAgentAvatar':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x0bfe('0x2a');}},'notificationSound':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x2b')},'waitForTheAssignedAgent':{'type':Sequelize[_0x0bfe('0xf')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x2c')},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x2d')},'defaultTitle':{'type':Sequelize[_0x0bfe('0x3')]},'customerAvatar':{'type':Sequelize[_0x0bfe('0x11')]},'showCustomerAvatar':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x0bfe('0xf')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x0bfe('0x3')],'allowNull':![],'defaultValue':_0x0bfe('0x2e'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x0bfe('0x3')],'defaultValue':_0x0bfe('0x2f')},'systemAvatar':{'type':Sequelize[_0x0bfe('0x11')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0bfe('0xf')],'comment':_0x0bfe('0x30')},'mandatoryDisposition':{'type':Sequelize[_0x0bfe('0x9')],'defaultValue':![],'comment':_0x0bfe('0x31'),'set':function(_0x6bd8cf){if(!_0x6bd8cf)this[_0x0bfe('0x20')](_0x0bfe('0x32'),null);this['setDataValue'](_0x0bfe('0x33'),_0x6bd8cf);}}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js
index 950b1d4..adb0381 100644
--- a/server/api/chatWebsite/chatWebsite.controller.js
+++ b/server/api/chatWebsite/chatWebsite.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5c12=['addDisposition','params','ChatWebsiteId','findOne','Disposition','nolimit','pick','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','rows','removeAnswers','sitepic','file','filename','addAvatar','agentAvatar','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','root','server/files/images/logos/default_logo.png','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','server/files/images/avatars/system_avatar.png','user-agent-parser','setUA','headers','user-agent','getResult','chat','difference','createdAt','updatedAt','CompanyId','ListId','Sequelize','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','CmContact','Contacts','DESC','account','applications','Applications','list','orderBy','priority','asc','from','lastName','customerIp','referer','browser','version','format','%s\x20%s','unknown','device','vendor','type','threadId','ChatInteraction','ContactId','interaction','spread','firstName','messageId','created','push','close','unmanaged','*,*,*,*','AttachmentId','UserId','User','unshift','waitForTheAssignedAgent','forcedOwnership','EventManager','notify','offline','no\x20available\x20attributes','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','findOrCreate','readFileSync','server/files/templates/chatOfflineMessage.ejs','render','offlineMessageBody','ChatOfflineMessage','MailAccount','MailServerOut','Smtp','forwardOfflineAddress','service','host','port','secure','authentication','auth','pass','SendMail','sendMail','\x22%s\x22\x20<%s>','addInteraction','Contact','fullname','internal','Tag','Tags','tag','Command','getSnippet','iftime\x20%s,%s','interval','timezone','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','OFFLINE','No\x20timezone','inspect','Interval','Intervals','getProactiveActions','../../config/license/util','virtual','License','increment','all','server/files/chat/iframe.js','x-forwarded-for','x-real-ip','connection','remoteAddress','replace','alignment','verticalAlignment','addApplications','transaction','ChatApplication','bulkCreate','findAndCountAll','getApplications','addProactiveActions','chatProactiveAction','omit','ChatProactiveAction','offlineForm','onlineForm','items','fromKey','getOfflineMessages','addAgents','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','http','client','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','offset','limit','set','Content-Range','json','apply','reject','save','update','destroy','get','ChatWebsites','UserProfileResource','stack','name','send','index','ChatWebsite','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','merge','map','key','VIRTUAL','field','filter','options','count','includeAll','include','findAll','show','Pause','mandatoryDispositionPause','length','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe'];(function(_0x5a0f09,_0x55601f){var _0x8fe217=function(_0x6a6ce2){while(--_0x6a6ce2){_0x5a0f09['push'](_0x5a0f09['shift']());}};_0x8fe217(++_0x55601f);}(_0x5c12,0x1cd));var _0x25c1=function(_0x3e6729,_0x16d4af){_0x3e6729=_0x3e6729-0x0;var _0x535bcd=_0x5c12[_0x3e6729];return _0x535bcd;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x25c1('0x0'));var rimraf=require(_0x25c1('0x1'));var zipdir=require(_0x25c1('0x2'));var jsonpatch=require(_0x25c1('0x3'));var rp=require(_0x25c1('0x4'));var moment=require('moment');var BPromise=require(_0x25c1('0x5'));var Mustache=require(_0x25c1('0x6'));var util=require(_0x25c1('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x25c1('0x8'));var ejs=require(_0x25c1('0x9'));var fs=require('fs');var _=require(_0x25c1('0xa'));var squel=require(_0x25c1('0xb'));var crypto=require(_0x25c1('0xc'));var jsforce=require(_0x25c1('0xd'));var deskjs=require(_0x25c1('0xe'));var toCsv=require(_0x25c1('0x8'));var querystring=require(_0x25c1('0xf'));var Papa=require('papaparse');var Redis=require(_0x25c1('0x10'));var authService=require(_0x25c1('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x25c1('0x12'));var logger=require(_0x25c1('0x13'))('api');var utils=require(_0x25c1('0x14'));var config=require('../../config/environment');var db=require(_0x25c1('0x15'))['db'];config[_0x25c1('0x16')]=_[_0x25c1('0x17')](config['redis'],{'host':_0x25c1('0x18'),'port':0x18eb});var socket=require(_0x25c1('0x19'))(new Redis(config[_0x25c1('0x16')]));require(_0x25c1('0x1a'))[_0x25c1('0x1b')](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0x25c1('0x1c')]({'port':0x232c});var client9002=jayson[_0x25c1('0x1d')][_0x25c1('0x1c')]({'port':0x232a});var client9003=jayson[_0x25c1('0x1d')][_0x25c1('0x1c')]({'port':0x232b});function checkPasswordPattern(_0xd2e811,_0x285ac4,_0x5e81ad){if(_0x5e81ad){var _0x4752b7=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4752b7['test'](_0x285ac4)){return _0xd2e811;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0xd2e811;}}function respondWithRpcPromise(_0x1575e3,_0x464737,_0x51f0df,_0x144a79){return new BPromise(function(_0x3bdc6d,_0x5b6443){var _0x495354=_0x144a79||client;return _0x495354[_0x25c1('0x1e')](_0x1575e3,_0x51f0df)[_0x25c1('0x1f')](function(_0x1ad64c){logger[_0x25c1('0x20')](_0x25c1('0x21'),_0x464737,_0x25c1('0x22'));logger[_0x25c1('0x23')](_0x25c1('0x24'),_0x464737,'request\x20sent',JSON[_0x25c1('0x25')](_0x1ad64c));if(_0x1ad64c['error']){if(_0x1ad64c[_0x25c1('0x26')][_0x25c1('0x27')]===0x1f4){logger[_0x25c1('0x26')]('ChatWebsite,\x20%s,\x20%s',_0x464737,_0x1ad64c[_0x25c1('0x26')][_0x25c1('0x28')]);return _0x5b6443(_0x1ad64c[_0x25c1('0x26')][_0x25c1('0x28')]);}logger[_0x25c1('0x26')](_0x25c1('0x21'),_0x464737,_0x1ad64c[_0x25c1('0x26')][_0x25c1('0x28')]);return _0x3bdc6d(_0x1ad64c[_0x25c1('0x26')][_0x25c1('0x28')]);}else{logger[_0x25c1('0x20')](_0x25c1('0x21'),_0x464737,_0x25c1('0x22'));_0x3bdc6d(_0x1ad64c[_0x25c1('0x29')]['message']);}})[_0x25c1('0x2a')](function(_0x3ae4fc){logger['error'](_0x25c1('0x21'),_0x464737,_0x3ae4fc);_0x5b6443(_0x3ae4fc);});});}function respondWithStatusCode(_0x2af44c,_0x6580fc){_0x6580fc=_0x6580fc||0xcc;return function(_0x4cde84){if(_0x4cde84){return _0x2af44c[_0x25c1('0x2b')](_0x6580fc);}return _0x2af44c[_0x25c1('0x2c')](_0x6580fc)[_0x25c1('0x2d')]();};}function respondWithResult(_0x16cc48,_0x39eaaa){_0x39eaaa=_0x39eaaa||0xc8;return function(_0x37a391){if(_0x37a391){return _0x16cc48[_0x25c1('0x2c')](_0x39eaaa)['json'](_0x37a391);}};}function respondWithFilteredResult(_0x4d2f08,_0x1ac94a){return function(_0x5a89fa){if(_0x5a89fa){var _0x345b10=_0x5a89fa['count'],_0x38f6fd=_0x1ac94a[_0x25c1('0x2e')],_0x4bd674=_0x1ac94a['offset']+_0x1ac94a[_0x25c1('0x2f')],_0xe943fe;if(_0x4bd674>=_0x345b10){_0x4bd674=_0x345b10;_0xe943fe=0xc8;}else{_0xe943fe=0xce;}_0x4d2f08[_0x25c1('0x2c')](_0xe943fe);return _0x4d2f08[_0x25c1('0x30')](_0x25c1('0x31'),_0x38f6fd+'-'+_0x4bd674+'/'+_0x345b10)[_0x25c1('0x32')](_0x5a89fa);}return null;};}function patchUpdates(_0x52aaa8){return function(_0x57a736){try{jsonpatch[_0x25c1('0x33')](_0x57a736,_0x52aaa8,!![]);}catch(_0x1ad3a8){return BPromise[_0x25c1('0x34')](_0x1ad3a8);}return _0x57a736[_0x25c1('0x35')]();};}function saveUpdates(_0x56aed7,_0x4d5155){return function(_0x531d10){if(_0x531d10){return _0x531d10[_0x25c1('0x36')](_0x56aed7)[_0x25c1('0x1f')](function(_0x5ed280){return _0x5ed280;});}return null;};}function removeEntity(_0xb89427,_0x143fbf){return function(_0x46d055){if(_0x46d055){return _0x46d055[_0x25c1('0x37')]()[_0x25c1('0x1f')](function(){var _0x24b443=_0x46d055[_0x25c1('0x38')]({'plain':!![]});var _0x406391=_0x25c1('0x39');return db[_0x25c1('0x3a')][_0x25c1('0x37')]({'where':{'type':_0x406391,'resourceId':_0x24b443['id']}})[_0x25c1('0x1f')](function(){return _0x46d055;});})[_0x25c1('0x1f')](function(){_0xb89427[_0x25c1('0x2c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x55c8de,_0x289a5d){return function(_0x297b71){if(!_0x297b71){_0x55c8de[_0x25c1('0x2b')](0x194);}return _0x297b71;};}function handleError(_0x25d49d,_0x1bc141){_0x1bc141=_0x1bc141||0x1f4;return function(_0x904e7d){logger['error'](_0x904e7d[_0x25c1('0x3b')]);if(_0x904e7d['name']){delete _0x904e7d[_0x25c1('0x3c')];}_0x25d49d[_0x25c1('0x2c')](_0x1bc141)[_0x25c1('0x3d')](_0x904e7d);};}exports[_0x25c1('0x3e')]=function(_0xad5be6,_0x45c92e){var _0x5342e2={'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x45393e={},_0x414b85={'count':0x0,'rows':[]};var _0x6306c8=db[_0x25c1('0x3f')][_0x25c1('0x40')];_0x45393e[_0x25c1('0x41')]=_[_0x25c1('0x42')](_0x6306c8);_0x45393e['query']=_[_0x25c1('0x42')](_0xad5be6[_0x25c1('0x43')]);_0x45393e[_0x25c1('0x44')]=_[_0x25c1('0x45')](_0x45393e[_0x25c1('0x41')],_0x45393e[_0x25c1('0x43')]);_0x5342e2[_0x25c1('0x46')]=_['intersection'](_0x45393e[_0x25c1('0x41')],qs['fields'](_0xad5be6[_0x25c1('0x43')][_0x25c1('0x47')]));_0x5342e2[_0x25c1('0x46')]=_0x5342e2[_0x25c1('0x46')]['length']?_0x5342e2[_0x25c1('0x46')]:_0x45393e[_0x25c1('0x41')];if(!_0xad5be6[_0x25c1('0x43')][_0x25c1('0x48')]('nolimit')){_0x5342e2[_0x25c1('0x2f')]=qs[_0x25c1('0x2f')](_0xad5be6['query'][_0x25c1('0x2f')]);_0x5342e2[_0x25c1('0x2e')]=qs[_0x25c1('0x2e')](_0xad5be6['query']['offset']);}_0x5342e2[_0x25c1('0x49')]=qs[_0x25c1('0x4a')](_0xad5be6[_0x25c1('0x43')]['sort']);_0x5342e2[_0x25c1('0x4b')]=qs['filters'](_['pick'](_0xad5be6['query'],_0x45393e[_0x25c1('0x44')]));if(_0xad5be6[_0x25c1('0x43')]['filter']){_0x5342e2[_0x25c1('0x4b')]=_[_0x25c1('0x4c')](_0x5342e2['where'],{'$or':_[_0x25c1('0x4d')](_0x6306c8,function(_0x3d21fd){if(_0x3d21fd['type'][_0x25c1('0x4e')]!==_0x25c1('0x4f')){var _0x3d4980={};_0x3d4980[_0x3d21fd[_0x25c1('0x50')]]={'$like':'%'+_0xad5be6[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0x3d4980;}})});}_0x5342e2=_[_0x25c1('0x4c')]({},_0x5342e2,_0xad5be6[_0x25c1('0x52')]);var _0x319a9d={'where':_0x5342e2[_0x25c1('0x4b')]};return db[_0x25c1('0x3f')]['count'](_0x319a9d)[_0x25c1('0x1f')](function(_0x5bbff7){_0x414b85[_0x25c1('0x53')]=_0x5bbff7;if(_0xad5be6[_0x25c1('0x43')][_0x25c1('0x54')]){_0x5342e2[_0x25c1('0x55')]=[{'all':!![]}];}return db['ChatWebsite'][_0x25c1('0x56')](_0x5342e2);})[_0x25c1('0x1f')](function(_0x2f9caf){_0x414b85['rows']=_0x2f9caf;return _0x414b85;})[_0x25c1('0x1f')](respondWithFilteredResult(_0x45c92e,_0x5342e2))[_0x25c1('0x2a')](handleError(_0x45c92e,null));};exports[_0x25c1('0x57')]=function(_0x83e650,_0x2b93ee){var _0x160e30={'raw':![],'where':{'id':_0x83e650['params']['id']},'include':[{'model':db[_0x25c1('0x58')],'as':_0x25c1('0x59')}]},_0x1791ae={};_0x1791ae[_0x25c1('0x41')]=_[_0x25c1('0x42')](db['ChatWebsite'][_0x25c1('0x40')]);_0x1791ae['query']=_[_0x25c1('0x42')](_0x83e650[_0x25c1('0x43')]);_0x1791ae['filters']=_[_0x25c1('0x45')](_0x1791ae[_0x25c1('0x41')],_0x1791ae[_0x25c1('0x43')]);_0x160e30['attributes']=_['intersection'](_0x1791ae[_0x25c1('0x41')],qs[_0x25c1('0x47')](_0x83e650[_0x25c1('0x43')][_0x25c1('0x47')]));_0x160e30[_0x25c1('0x46')]=_0x160e30[_0x25c1('0x46')][_0x25c1('0x5a')]?_0x160e30[_0x25c1('0x46')]:_0x1791ae['model'];if(_0x83e650[_0x25c1('0x43')][_0x25c1('0x54')]){_0x160e30['include']=[{'all':!![]}];}_0x160e30=_[_0x25c1('0x4c')]({},_0x160e30,_0x83e650[_0x25c1('0x52')]);return db['ChatWebsite'][_0x25c1('0x5b')](_0x160e30)[_0x25c1('0x1f')](handleEntityNotFound(_0x2b93ee,null))[_0x25c1('0x1f')](respondWithResult(_0x2b93ee,null))[_0x25c1('0x2a')](handleError(_0x2b93ee,null));};exports[_0x25c1('0x5c')]=function(_0x80fd6a,_0x2f94a4){return db[_0x25c1('0x3f')][_0x25c1('0x5c')](_0x80fd6a['body'],{})[_0x25c1('0x1f')](function(_0x1aeab5){var _0x1988a6=_0x80fd6a['user'][_0x25c1('0x38')]({'plain':!![]});if(!_0x1988a6)throw new Error(_0x25c1('0x5d'));if(_0x1988a6[_0x25c1('0x5e')]===_0x25c1('0x5f')){var _0x488c03=_0x1aeab5[_0x25c1('0x38')]({'plain':!![]});var _0x4c7a30=_0x25c1('0x39');return db['UserProfileSection'][_0x25c1('0x5b')]({'where':{'name':_0x4c7a30,'userProfileId':_0x1988a6[_0x25c1('0x60')]},'raw':!![]})[_0x25c1('0x1f')](function(_0x445c69){if(_0x445c69&&_0x445c69[_0x25c1('0x61')]===0x0){return db[_0x25c1('0x3a')][_0x25c1('0x5c')]({'name':_0x488c03[_0x25c1('0x3c')],'resourceId':_0x488c03['id'],'type':_0x445c69[_0x25c1('0x3c')],'sectionId':_0x445c69['id']},{})[_0x25c1('0x1f')](function(){return _0x1aeab5;});}else{return _0x1aeab5;}})['catch'](function(_0x42c2dc){logger[_0x25c1('0x26')](_0x25c1('0x62'),_0x42c2dc);throw _0x42c2dc;});}return _0x1aeab5;})[_0x25c1('0x1f')](respondWithResult(_0x2f94a4,0xc9))[_0x25c1('0x2a')](handleError(_0x2f94a4,null));};exports[_0x25c1('0x36')]=function(_0x57ffed,_0x3193c5){if(_0x57ffed[_0x25c1('0x63')]['id']){delete _0x57ffed[_0x25c1('0x63')]['id'];}return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x57ffed['params']['id']},'include':[{'model':db[_0x25c1('0x58')],'as':'mandatoryDispositionPause'}]})[_0x25c1('0x1f')](handleEntityNotFound(_0x3193c5,null))[_0x25c1('0x1f')](saveUpdates(_0x57ffed[_0x25c1('0x63')],null))['then'](respondWithResult(_0x3193c5,null))[_0x25c1('0x2a')](handleError(_0x3193c5,null));};exports[_0x25c1('0x37')]=function(_0x35a107,_0x59eaca){return db['ChatWebsite'][_0x25c1('0x5b')]({'where':{'id':_0x35a107['params']['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x59eaca,null))[_0x25c1('0x1f')](removeEntity(_0x59eaca,null))[_0x25c1('0x2a')](handleError(_0x59eaca,null));};exports[_0x25c1('0x64')]=function(_0x2f066a,_0x5ab025){return db[_0x25c1('0x3f')][_0x25c1('0x64')]()[_0x25c1('0x1f')](respondWithResult(_0x5ab025,null))[_0x25c1('0x2a')](handleError(_0x5ab025,null));};exports[_0x25c1('0x65')]=function(_0x5745d4,_0x507542,_0x585d1c){if(_0x5745d4[_0x25c1('0x63')]['id']){delete _0x5745d4[_0x25c1('0x63')]['id'];}return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x5745d4[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x507542,null))[_0x25c1('0x1f')](function(_0x144260){if(_0x144260){_0x5745d4['body'][_0x25c1('0x67')]=_0x144260['id'];return db['Disposition'][_0x25c1('0x5c')](_0x5745d4[_0x25c1('0x63')]);}})[_0x25c1('0x1f')](respondWithResult(_0x507542,null))[_0x25c1('0x2a')](handleError(_0x507542,null));};exports['getDispositions']=function(_0x1a60a4,_0x6401c7,_0x105bf7){var _0x406981={'raw':![],'where':{}};var _0x32d790={};var _0x4c57ef={'count':0x0,'rows':[]};return db[_0x25c1('0x3f')][_0x25c1('0x68')]({'where':{'id':_0x1a60a4[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x6401c7,null))[_0x25c1('0x1f')](function(_0x453298){if(_0x453298){_0x32d790[_0x25c1('0x41')]=_[_0x25c1('0x42')](db[_0x25c1('0x69')][_0x25c1('0x40')]);_0x32d790[_0x25c1('0x43')]=_[_0x25c1('0x42')](_0x1a60a4[_0x25c1('0x43')]);_0x32d790['filters']=_[_0x25c1('0x45')](_0x32d790[_0x25c1('0x41')],_0x32d790[_0x25c1('0x43')]);_0x406981['attributes']=_['intersection'](_0x32d790[_0x25c1('0x41')],qs['fields'](_0x1a60a4[_0x25c1('0x43')][_0x25c1('0x47')]));_0x406981[_0x25c1('0x46')]=_0x406981[_0x25c1('0x46')][_0x25c1('0x5a')]?_0x406981[_0x25c1('0x46')]:_0x32d790[_0x25c1('0x41')];if(!_0x1a60a4['query'][_0x25c1('0x48')](_0x25c1('0x6a'))){_0x406981[_0x25c1('0x2f')]=qs[_0x25c1('0x2f')](_0x1a60a4[_0x25c1('0x43')]['limit']);_0x406981[_0x25c1('0x2e')]=qs[_0x25c1('0x2e')](_0x1a60a4[_0x25c1('0x43')][_0x25c1('0x2e')]);}_0x406981['order']=qs[_0x25c1('0x4a')](_0x1a60a4[_0x25c1('0x43')][_0x25c1('0x4a')]);_0x406981[_0x25c1('0x4b')]=qs[_0x25c1('0x44')](_[_0x25c1('0x6b')](_0x1a60a4[_0x25c1('0x43')],_0x32d790[_0x25c1('0x44')]));_0x406981['where']['ChatWebsiteId']=_0x453298['id'];if(_0x1a60a4['query'][_0x25c1('0x51')]){_0x406981[_0x25c1('0x4b')]=_['merge'](_0x406981[_0x25c1('0x4b')],{'$or':_[_0x25c1('0x4d')](_0x406981['attributes'],function(_0x348c9f){var _0xb518d6={};_0xb518d6[_0x348c9f]={'$like':'%'+_0x1a60a4[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0xb518d6;})});}_0x406981=_['merge']({},_0x406981,_0x1a60a4[_0x25c1('0x52')]);return db[_0x25c1('0x69')][_0x25c1('0x53')]({'where':_0x406981[_0x25c1('0x4b')]})[_0x25c1('0x1f')](function(_0x50de1c){_0x4c57ef[_0x25c1('0x53')]=_0x50de1c;if(_0x1a60a4[_0x25c1('0x43')][_0x25c1('0x54')]){_0x406981[_0x25c1('0x55')]=[{'all':!![]}];}return db[_0x25c1('0x69')]['findAll'](_0x406981);})[_0x25c1('0x1f')](function(_0x4f1ab6){_0x4c57ef['rows']=_0x4f1ab6;return _0x4c57ef;});}})[_0x25c1('0x1f')](respondWithFilteredResult(_0x6401c7,_0x406981))['catch'](handleError(_0x6401c7,null));};exports[_0x25c1('0x6c')]=function(_0x24d0e8,_0x272437,_0x2b1d7a){return db[_0x25c1('0x3f')]['find']({'where':{'id':_0x24d0e8[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x272437,null))[_0x25c1('0x1f')](function(_0x4fd02f){if(_0x4fd02f){return _0x4fd02f[_0x25c1('0x6c')](_0x24d0e8['query'][_0x25c1('0x6d')]);}})[_0x25c1('0x1f')](respondWithStatusCode(_0x272437,null))[_0x25c1('0x2a')](handleError(_0x272437,null));};exports[_0x25c1('0x6e')]=function(_0x4349e0,_0x10f851,_0x3ac633){if(_0x4349e0[_0x25c1('0x63')]['id']){delete _0x4349e0[_0x25c1('0x63')]['id'];}return db[_0x25c1('0x3f')]['find']({'where':{'id':_0x4349e0[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x10f851,null))[_0x25c1('0x1f')](function(_0x180737){if(_0x180737){_0x4349e0['body'][_0x25c1('0x67')]=_0x180737['id'];return db[_0x25c1('0x6f')][_0x25c1('0x5c')](_0x4349e0[_0x25c1('0x63')]);}})[_0x25c1('0x1f')](respondWithResult(_0x10f851,null))[_0x25c1('0x2a')](handleError(_0x10f851,null));};exports[_0x25c1('0x70')]=function(_0x5ef42a,_0x2316d4,_0x4c4a1a){var _0x10093e={'raw':![],'where':{}};var _0x254443={};var _0x4b5856={'count':0x0,'rows':[]};return db[_0x25c1('0x3f')]['findOne']({'where':{'id':_0x5ef42a[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x2316d4,null))[_0x25c1('0x1f')](function(_0xf45aeb){if(_0xf45aeb){_0x254443[_0x25c1('0x41')]=_[_0x25c1('0x42')](db[_0x25c1('0x6f')]['rawAttributes']);_0x254443[_0x25c1('0x43')]=_[_0x25c1('0x42')](_0x5ef42a[_0x25c1('0x43')]);_0x254443[_0x25c1('0x44')]=_['intersection'](_0x254443[_0x25c1('0x41')],_0x254443[_0x25c1('0x43')]);_0x10093e[_0x25c1('0x46')]=_[_0x25c1('0x45')](_0x254443['model'],qs[_0x25c1('0x47')](_0x5ef42a[_0x25c1('0x43')][_0x25c1('0x47')]));_0x10093e[_0x25c1('0x46')]=_0x10093e['attributes'][_0x25c1('0x5a')]?_0x10093e[_0x25c1('0x46')]:_0x254443['model'];if(!_0x5ef42a[_0x25c1('0x43')][_0x25c1('0x48')](_0x25c1('0x6a'))){_0x10093e['limit']=qs[_0x25c1('0x2f')](_0x5ef42a['query']['limit']);_0x10093e[_0x25c1('0x2e')]=qs[_0x25c1('0x2e')](_0x5ef42a[_0x25c1('0x43')]['offset']);}_0x10093e[_0x25c1('0x49')]=qs[_0x25c1('0x4a')](_0x5ef42a['query'][_0x25c1('0x4a')]);_0x10093e[_0x25c1('0x4b')]=qs[_0x25c1('0x44')](_[_0x25c1('0x6b')](_0x5ef42a[_0x25c1('0x43')],_0x254443[_0x25c1('0x44')]));_0x10093e[_0x25c1('0x4b')]['ChatWebsiteId']=_0xf45aeb['id'];if(_0x5ef42a[_0x25c1('0x43')][_0x25c1('0x51')]){_0x10093e['where']=_[_0x25c1('0x4c')](_0x10093e[_0x25c1('0x4b')],{'$or':_['map'](_0x10093e[_0x25c1('0x46')],function(_0x457ed5){var _0x40d05c={};_0x40d05c[_0x457ed5]={'$like':'%'+_0x5ef42a[_0x25c1('0x43')]['filter']+'%'};return _0x40d05c;})});}_0x10093e=_[_0x25c1('0x4c')]({},_0x10093e,_0x5ef42a[_0x25c1('0x52')]);return db[_0x25c1('0x6f')]['count']({'where':_0x10093e[_0x25c1('0x4b')]})['then'](function(_0x362021){_0x4b5856['count']=_0x362021;if(_0x5ef42a['query'][_0x25c1('0x54')]){_0x10093e[_0x25c1('0x55')]=[{'all':!![]}];}return db[_0x25c1('0x6f')][_0x25c1('0x56')](_0x10093e);})[_0x25c1('0x1f')](function(_0x4a491d){_0x4b5856[_0x25c1('0x71')]=_0x4a491d;return _0x4b5856;});}})[_0x25c1('0x1f')](respondWithFilteredResult(_0x2316d4,_0x10093e))[_0x25c1('0x2a')](handleError(_0x2316d4,null));};exports[_0x25c1('0x72')]=function(_0x584684,_0x2eae84,_0x1a0422){return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x584684[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x2eae84,null))['then'](function(_0x23af91){if(_0x23af91){return _0x23af91['removeAnswers'](_0x584684[_0x25c1('0x43')]['ids']);}})[_0x25c1('0x1f')](respondWithStatusCode(_0x2eae84,null))[_0x25c1('0x2a')](handleError(_0x2eae84,null));};exports['addLogo']=function(_0x2033e7,_0x22bd30,_0xa139db){_0x2033e7[_0x25c1('0x63')][_0x25c1('0x73')]=_0x2033e7[_0x25c1('0x74')][_0x25c1('0x75')];return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x2033e7[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x22bd30,null))[_0x25c1('0x1f')](saveUpdates(_0x2033e7[_0x25c1('0x63')],null))[_0x25c1('0x1f')](respondWithResult(_0x22bd30,null))[_0x25c1('0x2a')](handleError(_0x22bd30,null));};exports[_0x25c1('0x76')]=function(_0x5460e8,_0x3aa429,_0x7f2786){_0x5460e8[_0x25c1('0x63')][_0x25c1('0x77')]=_0x5460e8[_0x25c1('0x74')]['filename'];return db['ChatWebsite'][_0x25c1('0x5b')]({'where':{'id':_0x5460e8[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x3aa429,null))[_0x25c1('0x1f')](saveUpdates(_0x5460e8[_0x25c1('0x63')],null))[_0x25c1('0x1f')](respondWithResult(_0x3aa429,null))[_0x25c1('0x2a')](handleError(_0x3aa429,null));};exports[_0x25c1('0x78')]=function(_0x3cce8c,_0x2a1be3,_0x514640){_0x3cce8c[_0x25c1('0x63')][_0x25c1('0x79')]=_0x3cce8c[_0x25c1('0x74')][_0x25c1('0x75')];return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x3cce8c[_0x25c1('0x66')]['id']}})['then'](handleEntityNotFound(_0x2a1be3,null))[_0x25c1('0x1f')](saveUpdates(_0x3cce8c[_0x25c1('0x63')],null))[_0x25c1('0x1f')](respondWithResult(_0x2a1be3,null))[_0x25c1('0x2a')](handleError(_0x2a1be3,null));};exports[_0x25c1('0x7a')]=function(_0x34819b,_0x5b2072,_0x6b7c97){_0x34819b[_0x25c1('0x63')][_0x25c1('0x7b')]=_0x34819b[_0x25c1('0x74')][_0x25c1('0x75')];return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x34819b[_0x25c1('0x66')]['id']}})['then'](handleEntityNotFound(_0x5b2072,null))[_0x25c1('0x1f')](saveUpdates(_0x34819b[_0x25c1('0x63')],null))['then'](respondWithResult(_0x5b2072,null))[_0x25c1('0x2a')](handleError(_0x5b2072,null));};exports[_0x25c1('0x7c')]=function(_0x5d8cc8,_0x56085a,_0x33737a){var _0x25bd99=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x7f'));var _0x1cffd5={'where':{'id':_0x5d8cc8[_0x25c1('0x66')]['id']},'attributes':['id','sitepic'],'raw':!![]};var _0x1507a5=![];return require('../../config/license/util')[_0x25c1('0x80')]()[_0x25c1('0x1f')](function(_0x41058c){if(_0x41058c){_0x1507a5=_0x41058c[_0x25c1('0x81')];}})['then'](function(){return db[_0x25c1('0x3f')][_0x25c1('0x5b')](_0x1cffd5);})['then'](handleEntityNotFound(_0x56085a,null))[_0x25c1('0x1f')](function(_0x46ba91){if(_0x46ba91){if(!_[_0x25c1('0x82')](_0x46ba91['sitepic'])){if(fs[_0x25c1('0x83')](path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x84'),_0x46ba91[_0x25c1('0x73')]))&&_0x1507a5){_0x25bd99=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x84'),_0x46ba91[_0x25c1('0x73')]);}}return _0x56085a[_0x25c1('0x85')](_0x25bd99);}})['catch'](handleError(_0x56085a,null));};exports['getAvatar']=function(_0x2d95f0,_0x3e157e,_0x28c830){var _0xe3e24b=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x86'));var _0x3f2b4f={'where':{'id':_0x2d95f0['params']['id']},'attributes':['id',_0x25c1('0x77')],'raw':!![]};return db[_0x25c1('0x3f')]['find'](_0x3f2b4f)[_0x25c1('0x1f')](handleEntityNotFound(_0x3e157e,null))['then'](function(_0x1e916c){if(_0x1e916c){if(!_[_0x25c1('0x82')](_0x1e916c[_0x25c1('0x77')])){if(fs['existsSync'](path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x87'),_0x1e916c[_0x25c1('0x77')]))){_0xe3e24b=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x87'),_0x1e916c[_0x25c1('0x77')]);}}return _0x3e157e[_0x25c1('0x85')](_0xe3e24b);}})[_0x25c1('0x2a')](handleError(_0x3e157e,null));};exports['getCustomerAvatar']=function(_0x4912c2,_0x2bbd67,_0x10d809){var _0x10ca5c=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x88'));var _0x2b7182={'where':{'id':_0x4912c2[_0x25c1('0x66')]['id']},'attributes':['id','customerAvatar','showCustomerAvatar'],'raw':!![]};return db[_0x25c1('0x3f')][_0x25c1('0x5b')](_0x2b7182)['then'](handleEntityNotFound(_0x2bbd67,null))[_0x25c1('0x1f')](function(_0x1ecd92){if(_0x1ecd92){if(!_[_0x25c1('0x82')](_0x1ecd92[_0x25c1('0x79')])){if(fs[_0x25c1('0x83')](path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x87'),_0x1ecd92[_0x25c1('0x79')]))&&_0x1ecd92[_0x25c1('0x89')]){_0x10ca5c=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x87'),_0x1ecd92[_0x25c1('0x79')]);}}return _0x2bbd67[_0x25c1('0x85')](_0x10ca5c);}})[_0x25c1('0x2a')](handleError(_0x2bbd67,null));};exports['getSystemAvatar']=function(_0x441818,_0x3ef5f5,_0x34b816){var _0x7b6de4=path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0x8a'));var _0x193530={'where':{'id':_0x441818[_0x25c1('0x66')]['id']},'attributes':['id','systemAvatar'],'raw':!![]};return db['ChatWebsite'][_0x25c1('0x5b')](_0x193530)[_0x25c1('0x1f')](handleEntityNotFound(_0x3ef5f5,null))[_0x25c1('0x1f')](function(_0x39914a){if(_0x39914a){if(!_[_0x25c1('0x82')](_0x39914a[_0x25c1('0x7b')])){if(fs[_0x25c1('0x83')](path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],'server/files/images/avatars/',_0x39914a[_0x25c1('0x7b')]))){_0x7b6de4=path[_0x25c1('0x7d')](config['root'],_0x25c1('0x87'),_0x39914a[_0x25c1('0x7b')]);}}return _0x3ef5f5[_0x25c1('0x85')](_0x7b6de4);}})['catch'](handleError(_0x3ef5f5,null));};exports['notify']=function(_0x12a3fe,_0x8e53a1,_0x2e8706){var _0x302c7b=require(_0x25c1('0x8b'));var _0x28daa3=new _0x302c7b();var _0x3e4c8a=_0x28daa3[_0x25c1('0x8c')](_0x12a3fe[_0x25c1('0x8d')][_0x25c1('0x8e')])[_0x25c1('0x8f')]();var _0x13827e={'body':_0x12a3fe['body'],'channel':_0x25c1('0x90')};var _0x230a51=[];var _0x4e1f64=[];var _0x1f053c={};var _0xc14843=![];return db['CmContact'][_0x25c1('0x64')]()[_0x25c1('0x1f')](function(_0x3eae18){if(!_0x3eae18){throw new db['Sequelize']['ValidationError']('no\x20available\x20attributes');}_0x230a51=_[_0x25c1('0x91')](_['keys'](_0x3eae18),[_0x25c1('0x92'),_0x25c1('0x93')]);_0x4e1f64=_[_0x25c1('0x91')](_[_0x25c1('0x42')](_0x3eae18),[_0x25c1('0x92'),_0x25c1('0x93'),_0x25c1('0x94'),_0x25c1('0x95')]);if(_0x12a3fe[_0x25c1('0x63')]['id']){delete _0x12a3fe[_0x25c1('0x63')]['id'];}if(_[_0x25c1('0x82')](_0x12a3fe[_0x25c1('0x63')]['from'])){throw new db[(_0x25c1('0x96'))][(_0x25c1('0x97'))](_0x25c1('0x98'));}if(_['isNil'](_0x12a3fe['body'][_0x25c1('0x63')])||_0x12a3fe['body'][_0x25c1('0x63')]===''){throw new db[(_0x25c1('0x96'))]['ValidationError'](_0x25c1('0x99'));}if(_[_0x25c1('0x82')](_0x12a3fe['body']['mapKey'])){throw new db['Sequelize'][(_0x25c1('0x97'))](_0x25c1('0x9a')+_0x4e1f64);}if(!_['includes'](_0x4e1f64,_0x12a3fe[_0x25c1('0x63')][_0x25c1('0x9b')])){throw new db['Sequelize']['ValidationError'](_0x25c1('0x9c')+_0x4e1f64);}_0x1f053c[_0x12a3fe['body'][_0x25c1('0x9b')]]=_0x12a3fe['body']['from'];})[_0x25c1('0x1f')](function(){return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x12a3fe[_0x25c1('0x66')]['id']},'include':[{'model':db[_0x25c1('0x9d')],'as':_0x25c1('0x9e'),'include':[{'model':db[_0x25c1('0x9f')],'as':_0x25c1('0xa0'),'where':_0x1f053c,'limit':0x1,'order':[[_0x25c1('0x93'),_0x25c1('0xa1')]]}]},{'model':db['ChatApplication'],'as':'Applications'}]});})[_0x25c1('0x1f')](handleEntityNotFound(_0x8e53a1,null))[_0x25c1('0x1f')](function(_0x5ca557){if(_0x5ca557&&_0x5ca557[_0x25c1('0x9e')]){_0x13827e[_0x25c1('0xa2')]=_0x5ca557;_0x13827e[_0x25c1('0xa3')]=_0x5ca557[_0x25c1('0xa4')];_0x13827e[_0x25c1('0xa5')]=_0x5ca557['List'];_0x13827e[_0x25c1('0xa3')]=_[_0x25c1('0xa6')](_0x13827e[_0x25c1('0xa3')],[_0x25c1('0xa7')],[_0x25c1('0xa8')]);if(_0x13827e['account'][_0x25c1('0xa4')]){delete _0x13827e[_0x25c1('0xa2')][_0x25c1('0xa4')];}if(_0x13827e['account'][_0x25c1('0x9e')]&&_0x13827e[_0x25c1('0xa2')]['List'][_0x25c1('0xa0')][_0x25c1('0x5a')]){return _0x13827e[_0x25c1('0xa2')][_0x25c1('0x9e')][_0x25c1('0xa0')][0x0];}var _0x3346c7=_[_0x25c1('0x17')](_0x12a3fe[_0x25c1('0x63')],{'firstName':_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xa9')],'ListId':_0x5ca557[_0x25c1('0x95')]});_0x3346c7[_0x12a3fe[_0x25c1('0x63')][_0x25c1('0x9b')]]=_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xa9')];return db[_0x25c1('0x9f')][_0x25c1('0x5c')](_0x3346c7,{'fields':_0x230a51,'raw':!![]});}})['then'](handleEntityNotFound(_0x8e53a1,null))[_0x25c1('0x1f')](function(_0x161a58){_0x13827e['contact']=_0x161a58;if(_0x161a58){var _0x23551a={'ContactId':_0x161a58['id'],'ChatWebsiteId':_0x12a3fe[_0x25c1('0x66')]['id'],'from':(_0x161a58['firstName']||'')+'\x20'+(_0x161a58[_0x25c1('0xaa')]||''),'customerIp':_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xab')],'referer':_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xac')],'browserName':_0x3e4c8a[_0x25c1('0xad')][_0x25c1('0x3c')]&&_0x3e4c8a[_0x25c1('0xad')][_0x25c1('0xae')]?util[_0x25c1('0xaf')](_0x25c1('0xb0'),_0x3e4c8a[_0x25c1('0xad')]['name'],_0x3e4c8a[_0x25c1('0xad')]['version']):_0x25c1('0xb1'),'browserVersion':_0x3e4c8a['browser']['version']||_0x25c1('0xb1'),'osName':util[_0x25c1('0xaf')](_0x25c1('0xb0'),_0x3e4c8a['os'][_0x25c1('0x3c')],_0x3e4c8a['os'][_0x25c1('0xae')]),'osVersion':_0x3e4c8a['os'][_0x25c1('0xae')],'deviceModel':_0x3e4c8a[_0x25c1('0xb2')][_0x25c1('0x41')]&&_0x3e4c8a[_0x25c1('0xb2')][_0x25c1('0xb3')]?util[_0x25c1('0xaf')]('%s\x20%s\x20%s',_0x3e4c8a[_0x25c1('0xb2')]['model'],_0x3e4c8a[_0x25c1('0xb2')][_0x25c1('0xb3')],_0x3e4c8a['device']['type']):null,'deviceVendor':_0x3e4c8a[_0x25c1('0xb2')][_0x25c1('0xb3')],'deviceType':_0x3e4c8a[_0x25c1('0xb2')][_0x25c1('0xb4')],'formData':JSON[_0x25c1('0x25')](_0x12a3fe['body'])};var _0x1e0241={'ChatWebsiteId':_0x12a3fe[_0x25c1('0x66')]['id'],'closed':![]};if(_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xb5')]){_0x1e0241[_0x25c1('0xb5')]=_0x12a3fe['body'][_0x25c1('0xb5')];return db[_0x25c1('0xb6')][_0x25c1('0x5b')]({'where':_0x1e0241})[_0x25c1('0x1f')](function(_0x21dd61){if(_0x21dd61){return[_0x21dd61,![]];}_0x23551a[_0x25c1('0xb5')]=_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xb5')];_0x23551a['externalUrl']=_0x12a3fe[_0x25c1('0x63')]['externalUrl'];return db[_0x25c1('0xb6')][_0x25c1('0x5c')](_0x23551a)['then'](function(_0x277301){return[_0x277301,!![]];});});}_0x1e0241[_0x25c1('0xb7')]=_0x161a58['id'];if(_0x12a3fe['body'][_0x25c1('0xb8')]&&_0x12a3fe[_0x25c1('0x63')]['interaction']['id']){_0x1e0241['id']=_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xb8')]['id'];return db[_0x25c1('0xb6')]['find']({'where':_0x1e0241})[_0x25c1('0x1f')](function(_0x3b73ba){if(_0x3b73ba){return[_0x3b73ba,![]];}return db['ChatInteraction'][_0x25c1('0x5c')](_0x23551a)[_0x25c1('0x1f')](function(_0x34385e){return[_0x34385e,!![]];});});}return db[_0x25c1('0xb6')][_0x25c1('0x5c')](_0x23551a)[_0x25c1('0x1f')](function(_0x3cde79){return[_0x3cde79,!![]];});}})[_0x25c1('0xb9')](function(_0x2d3955,_0x4ad46e){if(_0x2d3955){_0xc14843=_0x4ad46e;if(!_0x4ad46e){var _0x15d4cf={'from':(_0x13827e['contact'][_0x25c1('0xba')]||'')+'\x20'+(_0x13827e['contact']['lastName']||'')};if(_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xb5')]&&_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xbb')]&&_0x12a3fe['body'][_0x25c1('0xb5')]!=_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xbb')]){_0x15d4cf[_0x25c1('0xb5')]=_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xbb')];}return _0x2d3955[_0x25c1('0x36')](_0x15d4cf);}else{return _0x2d3955;}}})[_0x25c1('0x1f')](function(_0x2f8aaf){_0x13827e[_0x25c1('0xb8')]=_0x2f8aaf[_0x25c1('0x38')]({'plain':!![]});_0x13827e[_0x25c1('0xb8')]['created']=_0xc14843;if(_0x13827e['interaction'][_0x25c1('0xbc')]){if(_0x13827e[_0x25c1('0xa2')]['autoclose']){_0x13827e[_0x25c1('0xa3')][_0x25c1('0xbd')]({'id':0x0,'priority':_0x13827e[_0x25c1('0xa3')]['length']+0x1,'app':_0x25c1('0xbe'),'appdata':_0x25c1('0xbf'),'interval':_0x25c1('0xc0')});}}return db['ChatMessage'][_0x25c1('0x5c')]({'body':_0x12a3fe[_0x25c1('0x63')][_0x25c1('0x63')],'ChatWebsiteId':_0x12a3fe[_0x25c1('0x66')]['id'],'ChatInteractionId':_0x2f8aaf['id'],'direction':'in','ContactId':_0x13827e['contact']['id'],'AttachmentId':_0x12a3fe[_0x25c1('0x63')][_0x25c1('0xc1')]});})['then'](function(_0x314ab5){_0x13827e['message']=_0x314ab5;if(_0x13827e[_0x25c1('0xb8')][_0x25c1('0xc2')]){return db[_0x25c1('0xc3')][_0x25c1('0x5b')]({'attributes':['id',_0x25c1('0x3c')],'where':{'id':_0x13827e[_0x25c1('0xb8')]['UserId']}})['then'](function(_0x5c37bc){if(_0x5c37bc){_0x13827e[_0x25c1('0xa3')][_0x25c1('0xc4')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x5c37bc[_0x25c1('0x3c')]+','+(_0x13827e[_0x25c1('0xa2')][_0x25c1('0xc5')]||0xa),'interval':_0x25c1('0xc0')});_0x13827e[_0x25c1('0xc6')]=!![];}return respondWithRpcPromise('Start','startRouting',_0x13827e);});}return respondWithRpcPromise('Start','startRouting',_0x13827e);})[_0x25c1('0x1f')](function(_0x4ab871){respondWithRpcPromise(_0x25c1('0xc7'),_0x25c1('0xc7'),{'event':_0x25c1('0xc8'),'message':_0x4ab871},client9002);return _0x4ab871;})[_0x25c1('0x1f')](respondWithResult(_0x8e53a1,null))[_0x25c1('0x2a')](handleError(_0x8e53a1,null));};exports[_0x25c1('0xc9')]=function(_0x494e45,_0x59fa04,_0x47eb9e){var _0x220a2c,_0x3c8087,_0x95bdce;var _0x5cff6d=[];var _0x3e188b=[];var _0x5a569a={};return db[_0x25c1('0x9f')][_0x25c1('0x64')]()['then'](function(_0x27b027){if(!_0x27b027){throw new db[(_0x25c1('0x96'))][(_0x25c1('0x97'))](_0x25c1('0xca'));}_0x3e188b=_[_0x25c1('0x91')](_['keys'](_0x27b027),['createdAt',_0x25c1('0x93')]);_0x5cff6d=_['difference'](_[_0x25c1('0x42')](_0x27b027),[_0x25c1('0x92'),_0x25c1('0x93'),_0x25c1('0x94'),_0x25c1('0x95')]);if(_0x494e45[_0x25c1('0x63')]['id']){delete _0x494e45[_0x25c1('0x63')]['id'];}if(_[_0x25c1('0x82')](_0x494e45[_0x25c1('0x63')]['from'])){throw _0x59fa04[_0x25c1('0x2c')](0x1f4)['send'](new db['Sequelize'][(_0x25c1('0x97'))](_0x25c1('0x98')));}if(_['isNil'](_0x494e45['body'][_0x25c1('0x63')])||_0x494e45[_0x25c1('0x63')][_0x25c1('0x63')]===''){throw _0x59fa04[_0x25c1('0x2c')](0x1f4)[_0x25c1('0x3d')](new db[(_0x25c1('0x96'))][(_0x25c1('0x97'))](_0x25c1('0x99')));}if(_[_0x25c1('0x82')](_0x494e45[_0x25c1('0x63')][_0x25c1('0xcb')])){throw _0x59fa04[_0x25c1('0x2c')](0x1f4)[_0x25c1('0x3d')](new db[(_0x25c1('0x96'))][(_0x25c1('0x97'))](_0x25c1('0xcc')+_0x5cff6d));}if(!_[_0x25c1('0xcd')](_0x5cff6d,_0x494e45['body']['mapKeyOffline'])){throw _0x59fa04[_0x25c1('0x2c')](0x1f4)[_0x25c1('0x3d')](new db['Sequelize'][(_0x25c1('0x97'))](_0x25c1('0xce')+_0x5cff6d));}_0x5a569a[_0x494e45[_0x25c1('0x63')][_0x25c1('0xcb')]]=_0x494e45[_0x25c1('0x63')][_0x25c1('0xa9')];})[_0x25c1('0x1f')](function(){return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x494e45['params']['id']},'include':[{'model':db[_0x25c1('0x9d')],'as':'List'}]});})['then'](handleEntityNotFound(_0x59fa04,null))[_0x25c1('0x1f')](function(_0x15ad7b){if(_0x15ad7b&&_0x15ad7b[_0x25c1('0x9e')]){_0x3c8087=_0x15ad7b;var _0x516851=_[_0x25c1('0x17')](_0x494e45['body'],{'firstName':_0x494e45['body'][_0x25c1('0xa9')],'phone':_0x494e45[_0x25c1('0x63')][_0x25c1('0xa9')],'ListId':_0x15ad7b[_0x25c1('0x95')]});_0x516851[_0x494e45[_0x25c1('0x63')][_0x25c1('0xcb')]]=_0x494e45[_0x25c1('0x63')][_0x25c1('0xa9')];return db['CmContact'][_0x25c1('0xcf')]({'where':_0x5a569a,'defaults':_0x516851});}})['spread'](function(_0x407bce){if(_0x407bce){_0x95bdce=_0x407bce;var _0x21df26=fs[_0x25c1('0xd0')](path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0xd1')),'utf8');var _0x48698f=ejs[_0x25c1('0xd2')](_0x21df26,{'body':_['toPairs'](_0x494e45['body'][_0x25c1('0x63')]),'bodyTitle':_0x3c8087[_0x25c1('0xd3')]});return db[_0x25c1('0xd4')][_0x25c1('0x5c')]({'body':_0x48698f,'ContactId':_0x407bce['id'],'ChatWebsiteId':_0x3c8087['id']});}})['then'](function(_0x2a8a97){if(_0x2a8a97){_0x220a2c=_0x2a8a97;return db[_0x25c1('0xd5')][_0x25c1('0x68')]({'where':{'service':!![]},'include':[{'model':db[_0x25c1('0xd6')],'as':'Smtp','raw':!![]}]});}})[_0x25c1('0x1f')](function(_0x55fa99){if(_0x55fa99&&_0x55fa99[_0x25c1('0xd7')]&&_0x3c8087[_0x25c1('0xd8')]){var _0x275398={'tls':{'rejectUnauthorized':![]}};if(_0x55fa99[_0x25c1('0xd7')][_0x25c1('0xd9')]){_0x275398[_0x25c1('0xd9')]=_0x55fa99[_0x25c1('0xd7')][_0x25c1('0xd9')];}else{_0x275398[_0x25c1('0xda')]=_0x55fa99[_0x25c1('0xd7')][_0x25c1('0xda')];_0x275398[_0x25c1('0xdb')]=_0x55fa99[_0x25c1('0xd7')][_0x25c1('0xdb')];_0x275398['secure']=_0x55fa99['Smtp'][_0x25c1('0xdc')];}if(_0x55fa99[_0x25c1('0xd7')][_0x25c1('0xdd')]){_0x275398[_0x25c1('0xde')]={'user':_0x55fa99['Smtp'][_0x25c1('0x5f')],'pass':_0x55fa99['Smtp'][_0x25c1('0xdf')]};}return respondWithRpcPromise(_0x25c1('0xe0'),_0x25c1('0xe1'),{'account':_0x275398,'message':{'from':util[_0x25c1('0xaf')](_0x25c1('0xe2'),_0x55fa99[_0x25c1('0x3c')],_0x55fa99['email']||_0x55fa99['Smtp']['user']),'to':_0x3c8087[_0x25c1('0xd8')],'subject':_0x3c8087['offlineMessageSubject'],'text':_0x220a2c[_0x25c1('0x63')]}},client9003)['then'](function(){return _0x220a2c;})[_0x25c1('0x2a')](function(_0x1c3b6b){console['error'](_0x1c3b6b);});}})[_0x25c1('0x1f')](function(){if(_0x220a2c){return _0x220a2c;}})['then'](respondWithResult(_0x59fa04,null))['catch'](handleError(_0x59fa04,null));};exports[_0x25c1('0xe3')]=function(_0x2ff3,_0x3f5031,_0x779e89){return db[_0x25c1('0xb6')]['find']({'where':{'id':_0x2ff3[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x3f5031,null))['then'](function(_0x2842e7){if(_0x2842e7){return _0x2842e7[_0x25c1('0xe3')](_0x2ff3['body'][_0x25c1('0x6d')],_['omit'](_0x2ff3[_0x25c1('0x63')],['ids','id'])||{});}})['then'](respondWithResult(_0x3f5031,null))[_0x25c1('0x2a')](handleError(_0x3f5031,null));};exports['getInteractions']=function(_0x4dd732,_0x3213a,_0x1a6cfe){var _0x7249cb={'raw':![],'where':{}};var _0x415662={};var _0x340a57={'count':0x0,'rows':[]};return db[_0x25c1('0x3f')]['findOne']({'where':{'id':_0x4dd732[_0x25c1('0x66')]['id']}})['then'](handleEntityNotFound(_0x3213a,null))['then'](function(_0x86d62e){if(_0x86d62e){_0x415662['model']=_[_0x25c1('0x42')](db[_0x25c1('0xb6')][_0x25c1('0x40')]);_0x415662['query']=_[_0x25c1('0x42')](_0x4dd732[_0x25c1('0x43')]);_0x415662[_0x25c1('0x44')]=_[_0x25c1('0x45')](_0x415662[_0x25c1('0x41')],_0x415662[_0x25c1('0x43')]);_0x7249cb[_0x25c1('0x46')]=_[_0x25c1('0x45')](_0x415662[_0x25c1('0x41')],qs['fields'](_0x4dd732[_0x25c1('0x43')][_0x25c1('0x47')]));_0x7249cb[_0x25c1('0x46')]=_0x7249cb[_0x25c1('0x46')][_0x25c1('0x5a')]?_0x7249cb['attributes']:_0x415662[_0x25c1('0x41')];if(!_0x4dd732[_0x25c1('0x43')]['hasOwnProperty']('nolimit')){_0x7249cb[_0x25c1('0x2f')]=qs[_0x25c1('0x2f')](_0x4dd732[_0x25c1('0x43')][_0x25c1('0x2f')]);_0x7249cb[_0x25c1('0x2e')]=qs[_0x25c1('0x2e')](_0x4dd732[_0x25c1('0x43')]['offset']);}_0x7249cb[_0x25c1('0x49')]=qs[_0x25c1('0x4a')](_0x4dd732['query'][_0x25c1('0x4a')]);_0x7249cb[_0x25c1('0x4b')]=qs[_0x25c1('0x44')](_[_0x25c1('0x6b')](_0x4dd732['query'],_0x415662[_0x25c1('0x44')]));_0x7249cb['where'][_0x25c1('0x67')]=_0x86d62e['id'];if(_0x4dd732[_0x25c1('0x43')][_0x25c1('0x51')]){_0x7249cb[_0x25c1('0x4b')]=_[_0x25c1('0x4c')](_0x7249cb[_0x25c1('0x4b')],{'$or':_['map'](_0x7249cb[_0x25c1('0x46')],function(_0x520c4d){var _0xcde26c={};_0xcde26c[_0x520c4d]={'$like':'%'+_0x4dd732[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0xcde26c;})});}_0x7249cb=_[_0x25c1('0x4c')]({},_0x7249cb,_0x4dd732['options']);return db[_0x25c1('0xb6')][_0x25c1('0x53')]({'where':_0x7249cb[_0x25c1('0x4b')]})['then'](function(_0x41282d){_0x340a57[_0x25c1('0x53')]=_0x41282d;if(_0x4dd732['query'][_0x25c1('0x54')]){_0x7249cb[_0x25c1('0x55')]=[{'model':db[_0x25c1('0x9f')],'as':_0x25c1('0xe4'),'required':![]},{'model':db[_0x25c1('0xc3')],'as':'Owner','attributes':[_0x25c1('0x3c'),_0x25c1('0xe5'),_0x25c1('0xe6')],'required':![]},{'model':db[_0x25c1('0xe7')],'as':_0x25c1('0xe8'),'attributes':['id','name','color'],'where':_0x4dd732[_0x25c1('0x43')][_0x25c1('0xe9')]?{'id':_0x4dd732[_0x25c1('0x43')][_0x25c1('0xe9')]}:undefined,'required':_0x4dd732[_0x25c1('0x43')][_0x25c1('0xe9')]?!![]:![]}];}return db[_0x25c1('0xb6')][_0x25c1('0x56')](_0x7249cb);})[_0x25c1('0x1f')](function(_0x3120b8){_0x340a57[_0x25c1('0x71')]=_0x3120b8;return _0x340a57;});}})[_0x25c1('0x1f')](respondWithFilteredResult(_0x3213a,_0x7249cb))[_0x25c1('0x2a')](handleError(_0x3213a,null));};function iftimePromise(_0x95505,_0x852e5){return respondWithRpcPromise(_0x25c1('0xea'),_0x25c1('0xeb'),{'command':_0x852e5['timezone']?util[_0x25c1('0xaf')](_0x25c1('0xec'),_0x95505[_0x25c1('0xed')],_0x852e5[_0x25c1('0xee')]):util[_0x25c1('0xaf')]('iftime\x20%s',_0x95505[_0x25c1('0xed')])},client9002)[_0x25c1('0x1f')](function(_0x827f97){var _0x33bc4d=_0x827f97&&_0x827f97['indexOf'](_0x25c1('0xef'))>=0x0?!![]:![];logger[_0x25c1('0x20')](_0x25c1('0xf0'),_0x852e5['id'],_0x95505['id'],_0x95505[_0x25c1('0xed')],_0x33bc4d?'ONLINE':_0x25c1('0xf1'),_0x852e5[_0x25c1('0xee')]?_0x852e5['timezone']:_0x25c1('0xf2'));return _0x33bc4d;})[_0x25c1('0x2a')](function(_0x1f60d8){logger['error']('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x852e5['id'],_0x95505['id'],_0x95505[_0x25c1('0xed')],util[_0x25c1('0xf3')](_0x1f60d8,{'showHidden':![],'depth':null}),_0x852e5[_0x25c1('0xee')]?_0x852e5[_0x25c1('0xee')]:_0x25c1('0xf2'));return![];});}exports['getSnippet']=function(_0x475d13,_0x15b8bf,_0x423d72){var _0x272b3e=0x0;var _0x359b69=0x0;var _0x3f59ed=![];var _0x4ca00f;var _0x5d96e7;return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x475d13['params']['id']},'include':[{'model':db[_0x25c1('0xf4')],'as':_0x25c1('0xf4'),'include':[{'model':db['Interval'],'as':_0x25c1('0xf5'),'attributes':['id','interval'],'raw':!![]}]}]})['then'](handleEntityNotFound(_0x15b8bf,null))[_0x25c1('0x1f')](function(_0x281ced){if(_0x281ced){_0x4ca00f=_0x281ced;return _0x281ced[_0x25c1('0xf6')]({'raw':!![]});}})['then'](function(_0x1ecccc){if(_0x4ca00f){if(_0x1ecccc){_0x5d96e7=_0x1ecccc;}}return require(_0x25c1('0xf7'))[_0x25c1('0x80')]();})[_0x25c1('0x1f')](function(_0x45b875){if(_0x45b875){_0x359b69=_0x45b875[_0x25c1('0xf8')];_0x3f59ed=_0x45b875['custom'];}})[_0x25c1('0x1f')](function(){return db[_0x25c1('0xb6')]['count']({'where':{'closed':![]}});})['then'](function(_0x246b78){_0x272b3e=_0x246b78;if(_0x359b69&&_0x246b78>_0x359b69){return db[_0x25c1('0xf9')][_0x25c1('0x68')]({'where':{'id':0x1}})['then'](function(_0x10b695){if(_0x10b695){_0x10b695[_0x25c1('0xfa')]('chatLicenseExceeded');}});}})['then'](function(){if(_0x4ca00f[_0x25c1('0xf4')]&&_0x4ca00f[_0x25c1('0xf4')]['Intervals']){var _0x2f7102=[];for(var _0x1b8347=0x0;_0x1b8347<_0x4ca00f['Interval'][_0x25c1('0xf5')][_0x25c1('0x5a')];_0x1b8347++){var _0x397a16=_0x4ca00f[_0x25c1('0xf4')][_0x25c1('0xf5')][_0x1b8347][_0x25c1('0x38')]({'plain':!![]});_0x2f7102[_0x25c1('0xbd')](iftimePromise(_0x397a16,_0x4ca00f));}return BPromise[_0x25c1('0xfb')](_0x2f7102)[_0x25c1('0x1f')](function(_0xa9ef85){return _['some'](_0xa9ef85);});}else{return!![];}})[_0x25c1('0x1f')](function(_0x15a71d){var _0x410fc2=fs['readFileSync'](path[_0x25c1('0x7d')](config[_0x25c1('0x7e')],_0x25c1('0xfc')),'utf8');var _0x3df6b6={'remote':_0x4ca00f['remote'],'query':querystring[_0x25c1('0x25')](_['merge'](_0x4ca00f[_0x25c1('0x38')]({'plain':!![]}),{'customerIp':_0x475d13[_0x25c1('0x8d')][_0x25c1('0xfd')]||_0x475d13[_0x25c1('0x8d')][_0x25c1('0xfe')]||_0x475d13[_0x25c1('0xff')][_0x25c1('0x100')]||_0x475d13['ip'],'referer':_0x475d13[_0x25c1('0x8d')][_0x25c1('0xac')],'openedInteractions':_0x272b3e,'maxInteractions':_0x359b69,'virtual':_0x3f59ed[_0x25c1('0xf8')],'online':_0x15a71d,'custom':_0x3f59ed}))[_0x25c1('0x101')](/'/g,'\x5c\x27')};_0x15b8bf[_0x25c1('0x3d')](ejs['render'](Mustache[_0x25c1('0xd2')](_0x410fc2,_0x3df6b6),{'proactiveActions':_0x5d96e7,'alignment':_0x4ca00f[_0x25c1('0x102')],'verticalAlignment':_0x4ca00f[_0x25c1('0x103')]}));})[_0x25c1('0x2a')](handleError(_0x15b8bf,null));};exports[_0x25c1('0x104')]=function(_0x426409,_0x348ae3,_0x44e81a){return db[_0x25c1('0x3f')][_0x25c1('0x68')]({'where':{'id':_0x426409[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x348ae3,null))['then'](function(_0x1e2f6d){if(_0x1e2f6d){return db['sequelize'][_0x25c1('0x105')](function(_0x241ca8){return db[_0x25c1('0x106')][_0x25c1('0x37')]({'where':{'ChatWebsiteId':_0x426409[_0x25c1('0x66')]['id']},'transaction':_0x241ca8})['then'](function(_0x5dbb3b){var _0x307d41=_['map'](_0x426409[_0x25c1('0x63')],function(_0x6851d7){_0x6851d7[_0x25c1('0x67')]=_0x426409[_0x25c1('0x66')]['id'];return _0x6851d7;});return db[_0x25c1('0x106')][_0x25c1('0x107')](_0x307d41,{'transaction':_0x241ca8});});})[_0x25c1('0x1f')](function(){return db[_0x25c1('0x106')][_0x25c1('0x108')]({'where':{'ChatWebsiteId':_0x426409[_0x25c1('0x66')]['id']},'order':'priority'});});}})['then'](respondWithResult(_0x348ae3,null))['catch'](handleError(_0x348ae3,null));};exports[_0x25c1('0x109')]=function(_0x45b1fa,_0x5463ba,_0x2038c2){var _0x40c797={};var _0x579b63={};var _0x2752ec;var _0x4ddc80;return db['ChatWebsite'][_0x25c1('0x68')]({'where':{'id':_0x45b1fa[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x5463ba,null))['then'](function(_0x836b09){if(_0x836b09){_0x2752ec=_0x836b09;_0x579b63[_0x25c1('0x41')]=_[_0x25c1('0x42')](db[_0x25c1('0x106')][_0x25c1('0x40')]);_0x579b63[_0x25c1('0x43')]=_[_0x25c1('0x42')](_0x45b1fa[_0x25c1('0x43')]);_0x579b63[_0x25c1('0x44')]=_[_0x25c1('0x45')](_0x579b63['model'],_0x579b63[_0x25c1('0x43')]);_0x40c797['attributes']=_[_0x25c1('0x45')](_0x579b63['model'],qs['fields'](_0x45b1fa[_0x25c1('0x43')]['fields']));_0x40c797[_0x25c1('0x46')]=_0x40c797[_0x25c1('0x46')][_0x25c1('0x5a')]?_0x40c797[_0x25c1('0x46')]:_0x579b63[_0x25c1('0x41')];_0x40c797['order']=qs['sort'](_0x45b1fa[_0x25c1('0x43')][_0x25c1('0x4a')]);_0x40c797[_0x25c1('0x4b')]=qs[_0x25c1('0x44')](_[_0x25c1('0x6b')](_0x45b1fa['query'],_0x579b63[_0x25c1('0x44')]));if(_0x45b1fa['query']['filter']){_0x40c797[_0x25c1('0x4b')]=_[_0x25c1('0x4c')](_0x40c797[_0x25c1('0x4b')],{'$or':_['map'](_0x40c797[_0x25c1('0x46')],function(_0xf3a8b6){var _0xdb10a5={};_0xdb10a5[_0xf3a8b6]={'$like':'%'+_0x45b1fa[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0xdb10a5;})});}_0x40c797=_[_0x25c1('0x4c')]({},_0x40c797,_0x45b1fa[_0x25c1('0x52')]);return _0x2752ec[_0x25c1('0x109')](_0x40c797);}})[_0x25c1('0x1f')](function(_0x11c035){if(_0x11c035){_0x4ddc80=_0x11c035[_0x25c1('0x5a')];if(!_0x45b1fa['query'][_0x25c1('0x48')]('nolimit')){_0x40c797[_0x25c1('0x2f')]=qs[_0x25c1('0x2f')](_0x45b1fa[_0x25c1('0x43')][_0x25c1('0x2f')]);_0x40c797[_0x25c1('0x2e')]=qs[_0x25c1('0x2e')](_0x45b1fa[_0x25c1('0x43')][_0x25c1('0x2e')]);}return _0x2752ec[_0x25c1('0x109')](_0x40c797);}})['then'](function(_0x51401d){if(_0x51401d){return _0x51401d?{'count':_0x4ddc80,'rows':_0x51401d}:null;}})[_0x25c1('0x1f')](respondWithResult(_0x5463ba,null))[_0x25c1('0x2a')](handleError(_0x5463ba,null));};exports[_0x25c1('0x10a')]=function(_0x4fcb70,_0x3245b5,_0xf6b73f){return db[_0x25c1('0x10b')][_0x25c1('0x5b')]({'where':{'id':_0x4fcb70['params']['id']}})['then'](handleEntityNotFound(_0x3245b5,null))[_0x25c1('0x1f')](function(_0x15d940){if(_0x15d940){return _0x15d940[_0x25c1('0x10a')](_0x4fcb70[_0x25c1('0x63')]['ids'],_[_0x25c1('0x10c')](_0x4fcb70[_0x25c1('0x63')],[_0x25c1('0x6d'),'id'])||{});}})[_0x25c1('0x1f')](respondWithResult(_0x3245b5,null))[_0x25c1('0x2a')](handleError(_0x3245b5,null));};exports['getProactiveActions']=function(_0x3fadf2,_0x14ebcc,_0x307ac9){var _0x470e44={};var _0x536d5a={};var _0x42cacd;var _0xb0cb75;return db[_0x25c1('0x3f')]['findOne']({'where':{'id':_0x3fadf2['params']['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x14ebcc,null))[_0x25c1('0x1f')](function(_0x12bc04){if(_0x12bc04){_0x42cacd=_0x12bc04;_0x536d5a['model']=_[_0x25c1('0x42')](db[_0x25c1('0x10d')]['rawAttributes']);_0x536d5a['query']=_[_0x25c1('0x42')](_0x3fadf2['query']);_0x536d5a[_0x25c1('0x44')]=_[_0x25c1('0x45')](_0x536d5a[_0x25c1('0x41')],_0x536d5a[_0x25c1('0x43')]);_0x470e44[_0x25c1('0x46')]=_[_0x25c1('0x45')](_0x536d5a[_0x25c1('0x41')],qs[_0x25c1('0x47')](_0x3fadf2[_0x25c1('0x43')][_0x25c1('0x47')]));_0x470e44[_0x25c1('0x46')]=_0x470e44[_0x25c1('0x46')][_0x25c1('0x5a')]?_0x470e44[_0x25c1('0x46')]:_0x536d5a['model'];_0x470e44[_0x25c1('0x49')]=qs['sort'](_0x3fadf2[_0x25c1('0x43')][_0x25c1('0x4a')]);_0x470e44[_0x25c1('0x4b')]=qs['filters'](_[_0x25c1('0x6b')](_0x3fadf2[_0x25c1('0x43')],_0x536d5a['filters']));if(_0x3fadf2[_0x25c1('0x43')]['filter']){_0x470e44['where']=_[_0x25c1('0x4c')](_0x470e44[_0x25c1('0x4b')],{'$or':_[_0x25c1('0x4d')](_0x470e44[_0x25c1('0x46')],function(_0x48ab8a){var _0x1d31c4={};_0x1d31c4[_0x48ab8a]={'$like':'%'+_0x3fadf2[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0x1d31c4;})});}_0x470e44=_[_0x25c1('0x4c')]({},_0x470e44,_0x3fadf2[_0x25c1('0x52')]);return _0x42cacd[_0x25c1('0xf6')](_0x470e44);}})['then'](function(_0x143c07){if(_0x143c07){_0xb0cb75=_0x143c07[_0x25c1('0x5a')];if(!_0x3fadf2[_0x25c1('0x43')][_0x25c1('0x48')](_0x25c1('0x6a'))){_0x470e44[_0x25c1('0x2f')]=qs[_0x25c1('0x2f')](_0x3fadf2[_0x25c1('0x43')][_0x25c1('0x2f')]);_0x470e44['offset']=qs['offset'](_0x3fadf2[_0x25c1('0x43')][_0x25c1('0x2e')]);}return _0x42cacd[_0x25c1('0xf6')](_0x470e44);}})['then'](function(_0x218664){if(_0x218664){return _0x218664?{'count':_0xb0cb75,'rows':_0x218664}:null;}})['then'](respondWithResult(_0x14ebcc,null))[_0x25c1('0x2a')](handleError(_0x14ebcc,null));};exports['getFields']=function(_0x38d7d5,_0xc1d756,_0x3a8cf7){var _0x2e0ad8=_0x38d7d5[_0x25c1('0x43')]['online']==='false'?_0x25c1('0x10e'):_0x25c1('0x10f');return db['ChatWebsite'][_0x25c1('0x5b')]({'attributes':['id',_0x2e0ad8],'where':{'id':_0x38d7d5[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0xc1d756,null))['then'](function(_0x4bc1e8){if(_0x4bc1e8){var _0x581460=_0x4bc1e8[_0x2e0ad8];var _0x222c60=_0x581460&&_0x581460[_0x25c1('0x110')]?_0x581460[_0x25c1('0x110')]:[];_0xc1d756[_0x25c1('0x3d')]({'fromKey':_[_0x25c1('0x82')](_0x581460[_0x25c1('0x111')])?undefined:_0x581460[_0x25c1('0x111')],'count':_0x222c60[_0x25c1('0x5a')],'rows':_0x222c60});}})[_0x25c1('0x2a')](handleError(_0xc1d756,null));};exports[_0x25c1('0x112')]=function(_0x4738d0,_0x466ef6,_0x4fb5c6){var _0x259f86={'raw':!![],'where':{}};var _0x9832a5={};var _0x4a8220={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x4738d0['params']['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x466ef6,null))[_0x25c1('0x1f')](function(_0x2532bd){if(_0x2532bd){_0x9832a5[_0x25c1('0x41')]=_[_0x25c1('0x42')](db[_0x25c1('0xd4')]['rawAttributes']);_0x9832a5[_0x25c1('0x43')]=_[_0x25c1('0x42')](_0x4738d0[_0x25c1('0x43')]);_0x9832a5['filters']=_[_0x25c1('0x45')](_0x9832a5['model'],_0x9832a5['query']);_0x259f86[_0x25c1('0x46')]=_[_0x25c1('0x45')](_0x9832a5[_0x25c1('0x41')],qs[_0x25c1('0x47')](_0x4738d0[_0x25c1('0x43')][_0x25c1('0x47')]));_0x259f86[_0x25c1('0x46')]=_0x259f86['attributes']['length']?_0x259f86[_0x25c1('0x46')]:_0x9832a5[_0x25c1('0x41')];if(!_0x4738d0['query'][_0x25c1('0x48')](_0x25c1('0x6a'))){_0x259f86['limit']=qs[_0x25c1('0x2f')](_0x4738d0[_0x25c1('0x43')][_0x25c1('0x2f')]);_0x259f86[_0x25c1('0x2e')]=qs[_0x25c1('0x2e')](_0x4738d0['query'][_0x25c1('0x2e')]);}_0x259f86[_0x25c1('0x49')]=qs['sort'](_0x4738d0['query']['sort']);_0x259f86[_0x25c1('0x4b')]=qs[_0x25c1('0x44')](_[_0x25c1('0x6b')](_0x4738d0[_0x25c1('0x43')],_0x9832a5[_0x25c1('0x44')]));_0x259f86[_0x25c1('0x4b')][_0x25c1('0x67')]=_0x2532bd['id'];if(_0x4738d0[_0x25c1('0x43')][_0x25c1('0x51')]){_0x259f86[_0x25c1('0x4b')]=_['merge'](_0x259f86['where'],{'$or':_['map'](_0x259f86['attributes'],function(_0x1bb835){var _0x42f760={};_0x42f760[_0x1bb835]={'$like':'%'+_0x4738d0[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0x42f760;})});}_0x259f86=_[_0x25c1('0x4c')]({},_0x259f86,_0x4738d0['options']);return db['ChatOfflineMessage'][_0x25c1('0x53')]({'where':_0x259f86['where']})[_0x25c1('0x1f')](function(_0x1d51cf){_0x4a8220[_0x25c1('0x53')]=_0x1d51cf;if(_0x4738d0[_0x25c1('0x43')][_0x25c1('0x54')]){_0x259f86[_0x25c1('0x55')]=[{'all':!![]}];}return db[_0x25c1('0xd4')][_0x25c1('0x56')](_0x259f86);})['then'](function(_0x590255){_0x4a8220[_0x25c1('0x71')]=_0x590255;return _0x4a8220;});}})[_0x25c1('0x1f')](respondWithFilteredResult(_0x466ef6,_0x259f86))[_0x25c1('0x2a')](handleError(_0x466ef6,null));};exports['addAgents']=function(_0x3100a0,_0x4d40cc,_0x41a550){return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0x3100a0['params']['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x4d40cc,null))[_0x25c1('0x1f')](function(_0x15cf63){if(_0x15cf63){return _0x15cf63[_0x25c1('0x113')](_0x3100a0[_0x25c1('0x63')][_0x25c1('0x6d')],_[_0x25c1('0x10c')](_0x3100a0[_0x25c1('0x63')],[_0x25c1('0x6d'),'id'])||{})['spread'](function(_0x3ce64f){for(var _0x361ba6=0x0;_0x361ba6<_0x3100a0[_0x25c1('0x63')]['ids']['length'];_0x361ba6+=0x1){socket['emit'](_0x25c1('0x114'),{'UserId':_0x3100a0[_0x25c1('0x63')]['ids'][_0x361ba6],'ChatWebsiteId':_0x3100a0[_0x25c1('0x66')]['id']});}return _0x3ce64f;});}})[_0x25c1('0x1f')](respondWithResult(_0x4d40cc,null))[_0x25c1('0x2a')](handleError(_0x4d40cc,null));};exports[_0x25c1('0x115')]=function(_0xe56d7a,_0x362426,_0x137485){return db[_0x25c1('0x3f')][_0x25c1('0x5b')]({'where':{'id':_0xe56d7a[_0x25c1('0x66')]['id']}})['then'](handleEntityNotFound(_0x362426,null))[_0x25c1('0x1f')](function(_0x84177){if(_0x84177){return _0x84177['removeAgents'](_0xe56d7a[_0x25c1('0x43')][_0x25c1('0x6d')])[_0x25c1('0x1f')](function(){if(_[_0x25c1('0x116')](_0xe56d7a[_0x25c1('0x43')][_0x25c1('0x6d')])){for(var _0x587a9c=0x0;_0x587a9c<_0xe56d7a[_0x25c1('0x43')][_0x25c1('0x6d')]['length'];_0x587a9c+=0x1){socket['emit']('userChatWebsite:remove',{'UserId':Number(_0xe56d7a[_0x25c1('0x43')][_0x25c1('0x6d')][_0x587a9c]),'ChatWebsiteId':Number(_0xe56d7a[_0x25c1('0x66')]['id'])});}}else{socket['emit'](_0x25c1('0x117'),{'UserId':Number(_0xe56d7a[_0x25c1('0x43')][_0x25c1('0x6d')]),'ChatWebsiteId':Number(_0xe56d7a[_0x25c1('0x66')]['id'])});}});}})[_0x25c1('0x1f')](respondWithStatusCode(_0x362426,null))[_0x25c1('0x2a')](handleError(_0x362426,null));};exports[_0x25c1('0x118')]=function(_0x5f5624,_0x2e9e62,_0x1b6c46){var _0x308c49={};var _0x57a066={};var _0x454d9e;var _0x4d69b6;return db['ChatWebsite'][_0x25c1('0x68')]({'where':{'id':_0x5f5624[_0x25c1('0x66')]['id']}})[_0x25c1('0x1f')](handleEntityNotFound(_0x2e9e62,null))['then'](function(_0x2e3a80){if(_0x2e3a80){_0x454d9e=_0x2e3a80;_0x57a066['model']=_[_0x25c1('0x42')](db['User'][_0x25c1('0x40')]);_0x57a066[_0x25c1('0x43')]=_[_0x25c1('0x42')](_0x5f5624['query']);_0x57a066[_0x25c1('0x44')]=_[_0x25c1('0x45')](_0x57a066[_0x25c1('0x41')],_0x57a066[_0x25c1('0x43')]);_0x308c49[_0x25c1('0x46')]=_[_0x25c1('0x45')](_0x57a066[_0x25c1('0x41')],qs[_0x25c1('0x47')](_0x5f5624['query'][_0x25c1('0x47')]));_0x308c49['attributes']=_0x308c49[_0x25c1('0x46')][_0x25c1('0x5a')]?_0x308c49[_0x25c1('0x46')]:_0x57a066[_0x25c1('0x41')];_0x308c49[_0x25c1('0x49')]=qs[_0x25c1('0x4a')](_0x5f5624['query'][_0x25c1('0x4a')]);_0x308c49[_0x25c1('0x4b')]=qs[_0x25c1('0x44')](_[_0x25c1('0x6b')](_0x5f5624[_0x25c1('0x43')],_0x57a066['filters']));if(_0x5f5624[_0x25c1('0x43')][_0x25c1('0x51')]){_0x308c49[_0x25c1('0x4b')]=_[_0x25c1('0x4c')](_0x308c49[_0x25c1('0x4b')],{'$or':_[_0x25c1('0x4d')](_0x308c49['attributes'],function(_0x49d9de){var _0x317410={};_0x317410[_0x49d9de]={'$like':'%'+_0x5f5624[_0x25c1('0x43')][_0x25c1('0x51')]+'%'};return _0x317410;})});}_0x308c49=_[_0x25c1('0x4c')]({},_0x308c49,_0x5f5624[_0x25c1('0x52')]);return _0x454d9e[_0x25c1('0x118')](_0x308c49);}})['then'](function(_0x24d73f){if(_0x24d73f){_0x4d69b6=_0x24d73f['length'];if(!_0x5f5624['query'][_0x25c1('0x48')](_0x25c1('0x6a'))){_0x308c49[_0x25c1('0x2f')]=qs['limit'](_0x5f5624[_0x25c1('0x43')][_0x25c1('0x2f')]);_0x308c49[_0x25c1('0x2e')]=qs['offset'](_0x5f5624[_0x25c1('0x43')]['offset']);}return _0x454d9e['getAgents'](_0x308c49);}})[_0x25c1('0x1f')](function(_0x189c46){if(_0x189c46){return _0x189c46?{'count':_0x4d69b6,'rows':_0x189c46}:null;}})[_0x25c1('0x1f')](respondWithResult(_0x2e9e62,null))[_0x25c1('0x2a')](handleError(_0x2e9e62,null));};
\ No newline at end of file
+var _0x3311=['send','from\x20is\x20mandatory','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','findOrCreate','server/files/templates/chatOfflineMessage.ejs','utf8','render','MailServerOut','Smtp','service','host','port','secure','auth','pass','SendMail','sendMail','\x22%s\x22\x20<%s>','email','forwardOfflineAddress','offlineMessageSubject','addInteraction','omit','getInteractions','Contact','fullname','internal','Tag','Tags','tag','Command','getSnippet','timezone','interval','iftime\x20%s','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','No\x20timezone','Interval','virtual','License','increment','Intervals','all','some','server/files/chat/iframe.js','remote','x-forwarded-for','remoteAddress','alignment','verticalAlignment','addApplications','sequelize','transaction','getApplications','addProactiveActions','ChatProactiveAction','getProactiveActions','getFields','online','false','offlineForm','onlineForm','items','getOfflineMessages','ChatOfflineMessage','addAgents','emit','removeAgents','isArray','userChatWebsite:remove','getAgents','User','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','jayson/promise','client','http','test','request','then','info','ChatWebsite,\x20%s,\x20%s','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','apply','reject','save','update','destroy','get','ChatWebsites','name','index','Pause','mandatoryDispositionPause','ChatWebsite','rawAttributes','model','query','keys','filters','attributes','fields','nolimit','sort','where','pick','merge','type','VIRTUAL','field','filter','options','includeAll','findAll','rows','params','intersection','length','include','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','describe','addDisposition','ChatWebsiteId','Disposition','order','map','removeDispositions','ids','addAnswer','getAnswers','findOne','CannedAnswer','hasOwnProperty','removeAnswers','addLogo','sitepic','file','filename','addAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','server/files/images/logos/default_logo.png','../../config/license/util','getLicense','custom','isNil','server/files/images/logos/','root','download','server/files/images/avatars/default_avatar.png','existsSync','server/files/images/avatars/','agentAvatar','showCustomerAvatar','getSystemAvatar','server/files/images/avatars/system_avatar.png','notify','setUA','headers','getResult','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','from','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','List','DESC','ChatApplication','Applications','account','applications','list','orderBy','priority','asc','firstName','customerIp','referer','browser','version','format','unknown','%s\x20%s','device','vendor','stringify','threadId','ChatInteraction','externalUrl','ContactId','interaction','spread','contact','lastName','messageId','created','autoclose','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','offline'];(function(_0x31218c,_0x28ae34){var _0x13e4ab=function(_0x3e0521){while(--_0x3e0521){_0x31218c['push'](_0x31218c['shift']());}};_0x13e4ab(++_0x28ae34);}(_0x3311,0x165));var _0x1331=function(_0x478cb6,_0x3b9e9b){_0x478cb6=_0x478cb6-0x0;var _0x5205d7=_0x3311[_0x478cb6];return _0x5205d7;};'use strict';var pdf=require(_0x1331('0x0'));var emlformat=require(_0x1331('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x1331('0x2'));var jsonpatch=require(_0x1331('0x3'));var rp=require(_0x1331('0x4'));var moment=require(_0x1331('0x5'));var BPromise=require(_0x1331('0x6'));var Mustache=require(_0x1331('0x7'));var util=require(_0x1331('0x8'));var path=require(_0x1331('0x9'));var sox=require(_0x1331('0xa'));var csv=require(_0x1331('0xb'));var ejs=require(_0x1331('0xc'));var fs=require('fs');var _=require(_0x1331('0xd'));var squel=require(_0x1331('0xe'));var crypto=require(_0x1331('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x1331('0x10'));var toCsv=require(_0x1331('0xb'));var querystring=require(_0x1331('0x11'));var Papa=require('papaparse');var Redis=require(_0x1331('0x12'));var authService=require(_0x1331('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x1331('0x14'));var logger=require(_0x1331('0x15'))(_0x1331('0x16'));var utils=require(_0x1331('0x17'));var config=require(_0x1331('0x18'));var db=require(_0x1331('0x19'))['db'];config['redis']=_[_0x1331('0x1a')](config[_0x1331('0x1b')],{'host':_0x1331('0x1c'),'port':0x18eb});var socket=require(_0x1331('0x1d'))(new Redis(config[_0x1331('0x1b')]));require('./chatWebsite.socket')[_0x1331('0x1e')](socket);var jayson=require(_0x1331('0x1f'));var client=jayson[_0x1331('0x20')][_0x1331('0x21')]({'port':0x232c});var client9002=jayson['client'][_0x1331('0x21')]({'port':0x232a});var client9003=jayson[_0x1331('0x20')][_0x1331('0x21')]({'port':0x232b});function checkPasswordPattern(_0xfab67c,_0x109028,_0x4e076e){if(_0x4e076e){var _0x438497=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x438497[_0x1331('0x22')](_0x109028)){return _0xfab67c;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0xfab67c;}}function respondWithRpcPromise(_0x460c1c,_0x92f1db,_0x4faa1d,_0x20bb0b){return new BPromise(function(_0xf4a528,_0xe2f1bd){var _0x45288b=_0x20bb0b||client;return _0x45288b[_0x1331('0x23')](_0x460c1c,_0x4faa1d)[_0x1331('0x24')](function(_0x1f9ccd){logger[_0x1331('0x25')](_0x1331('0x26'),_0x92f1db,'request\x20sent');logger['debug'](_0x1331('0x27'),_0x92f1db,_0x1331('0x28'),JSON['stringify'](_0x1f9ccd));if(_0x1f9ccd[_0x1331('0x29')]){if(_0x1f9ccd[_0x1331('0x29')][_0x1331('0x2a')]===0x1f4){logger[_0x1331('0x29')](_0x1331('0x26'),_0x92f1db,_0x1f9ccd['error']['message']);return _0xe2f1bd(_0x1f9ccd['error'][_0x1331('0x2b')]);}logger['error'](_0x1331('0x26'),_0x92f1db,_0x1f9ccd[_0x1331('0x29')][_0x1331('0x2b')]);return _0xf4a528(_0x1f9ccd[_0x1331('0x29')][_0x1331('0x2b')]);}else{logger['info'](_0x1331('0x26'),_0x92f1db,'request\x20sent');_0xf4a528(_0x1f9ccd[_0x1331('0x2c')][_0x1331('0x2b')]);}})[_0x1331('0x2d')](function(_0x29ea7d){logger[_0x1331('0x29')](_0x1331('0x26'),_0x92f1db,_0x29ea7d);_0xe2f1bd(_0x29ea7d);});});}function respondWithStatusCode(_0xefa2e4,_0x5842f3){_0x5842f3=_0x5842f3||0xcc;return function(_0x54067d){if(_0x54067d){return _0xefa2e4[_0x1331('0x2e')](_0x5842f3);}return _0xefa2e4[_0x1331('0x2f')](_0x5842f3)[_0x1331('0x30')]();};}function respondWithResult(_0x26b651,_0x23e3aa){_0x23e3aa=_0x23e3aa||0xc8;return function(_0x21d299){if(_0x21d299){return _0x26b651[_0x1331('0x2f')](_0x23e3aa)[_0x1331('0x31')](_0x21d299);}};}function respondWithFilteredResult(_0x5ee568,_0x60b563){return function(_0x1cedbd){if(_0x1cedbd){var _0x18dad2=_0x1cedbd[_0x1331('0x32')],_0x2a3420=_0x60b563[_0x1331('0x33')],_0x3bdcba=_0x60b563[_0x1331('0x33')]+_0x60b563[_0x1331('0x34')],_0x8925e7;if(_0x3bdcba>=_0x18dad2){_0x3bdcba=_0x18dad2;_0x8925e7=0xc8;}else{_0x8925e7=0xce;}_0x5ee568[_0x1331('0x2f')](_0x8925e7);return _0x5ee568[_0x1331('0x35')]('Content-Range',_0x2a3420+'-'+_0x3bdcba+'/'+_0x18dad2)[_0x1331('0x31')](_0x1cedbd);}return null;};}function patchUpdates(_0x3717be){return function(_0x35d94c){try{jsonpatch[_0x1331('0x36')](_0x35d94c,_0x3717be,!![]);}catch(_0x5b9826){return BPromise[_0x1331('0x37')](_0x5b9826);}return _0x35d94c[_0x1331('0x38')]();};}function saveUpdates(_0x1527af,_0x3b283e){return function(_0x5f379e){if(_0x5f379e){return _0x5f379e[_0x1331('0x39')](_0x1527af)['then'](function(_0x3a5647){return _0x3a5647;});}return null;};}function removeEntity(_0xd387b8,_0x441c20){return function(_0x324d2e){if(_0x324d2e){return _0x324d2e[_0x1331('0x3a')]()['then'](function(){var _0x52cfcc=_0x324d2e[_0x1331('0x3b')]({'plain':!![]});var _0x3f18a9=_0x1331('0x3c');return db['UserProfileResource'][_0x1331('0x3a')]({'where':{'type':_0x3f18a9,'resourceId':_0x52cfcc['id']}})['then'](function(){return _0x324d2e;});})[_0x1331('0x24')](function(){_0xd387b8[_0x1331('0x2f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x16405e,_0x5220d9){return function(_0x3bb947){if(!_0x3bb947){_0x16405e['sendStatus'](0x194);}return _0x3bb947;};}function handleError(_0x2d1760,_0x108c58){_0x108c58=_0x108c58||0x1f4;return function(_0x399802){logger['error'](_0x399802['stack']);if(_0x399802[_0x1331('0x3d')]){delete _0x399802[_0x1331('0x3d')];}_0x2d1760['status'](_0x108c58)['send'](_0x399802);};}exports[_0x1331('0x3e')]=function(_0x194fa1,_0x3585f3){var _0x3b4b51={'include':[{'model':db[_0x1331('0x3f')],'as':_0x1331('0x40')}]},_0x29cfad={},_0x392b1f={'count':0x0,'rows':[]};var _0x242008=db[_0x1331('0x41')][_0x1331('0x42')];_0x29cfad[_0x1331('0x43')]=_['keys'](_0x242008);_0x29cfad[_0x1331('0x44')]=_[_0x1331('0x45')](_0x194fa1['query']);_0x29cfad[_0x1331('0x46')]=_['intersection'](_0x29cfad['model'],_0x29cfad[_0x1331('0x44')]);_0x3b4b51[_0x1331('0x47')]=_['intersection'](_0x29cfad[_0x1331('0x43')],qs[_0x1331('0x48')](_0x194fa1[_0x1331('0x44')]['fields']));_0x3b4b51[_0x1331('0x47')]=_0x3b4b51[_0x1331('0x47')]['length']?_0x3b4b51['attributes']:_0x29cfad[_0x1331('0x43')];if(!_0x194fa1['query']['hasOwnProperty'](_0x1331('0x49'))){_0x3b4b51[_0x1331('0x34')]=qs[_0x1331('0x34')](_0x194fa1[_0x1331('0x44')][_0x1331('0x34')]);_0x3b4b51['offset']=qs[_0x1331('0x33')](_0x194fa1[_0x1331('0x44')][_0x1331('0x33')]);}_0x3b4b51['order']=qs[_0x1331('0x4a')](_0x194fa1[_0x1331('0x44')][_0x1331('0x4a')]);_0x3b4b51[_0x1331('0x4b')]=qs['filters'](_[_0x1331('0x4c')](_0x194fa1[_0x1331('0x44')],_0x29cfad['filters']));if(_0x194fa1[_0x1331('0x44')]['filter']){_0x3b4b51[_0x1331('0x4b')]=_[_0x1331('0x4d')](_0x3b4b51['where'],{'$or':_['map'](_0x242008,function(_0x1e185b){if(_0x1e185b[_0x1331('0x4e')]['key']!==_0x1331('0x4f')){var _0x412478={};_0x412478[_0x1e185b[_0x1331('0x50')]]={'$like':'%'+_0x194fa1[_0x1331('0x44')][_0x1331('0x51')]+'%'};return _0x412478;}})});}_0x3b4b51=_[_0x1331('0x4d')]({},_0x3b4b51,_0x194fa1[_0x1331('0x52')]);var _0x18f882={'where':_0x3b4b51[_0x1331('0x4b')]};return db[_0x1331('0x41')]['count'](_0x18f882)[_0x1331('0x24')](function(_0x2889ca){_0x392b1f['count']=_0x2889ca;if(_0x194fa1[_0x1331('0x44')][_0x1331('0x53')]){_0x3b4b51['include']=[{'all':!![]}];}return db[_0x1331('0x41')][_0x1331('0x54')](_0x3b4b51);})[_0x1331('0x24')](function(_0x11f9cb){_0x392b1f[_0x1331('0x55')]=_0x11f9cb;return _0x392b1f;})[_0x1331('0x24')](respondWithFilteredResult(_0x3585f3,_0x3b4b51))['catch'](handleError(_0x3585f3,null));};exports['show']=function(_0x40340a,_0x1484ea){var _0x11d9d0={'raw':![],'where':{'id':_0x40340a[_0x1331('0x56')]['id']},'include':[{'model':db[_0x1331('0x3f')],'as':_0x1331('0x40')}]},_0x5905fa={};_0x5905fa[_0x1331('0x43')]=_['keys'](db[_0x1331('0x41')][_0x1331('0x42')]);_0x5905fa[_0x1331('0x44')]=_[_0x1331('0x45')](_0x40340a[_0x1331('0x44')]);_0x5905fa[_0x1331('0x46')]=_[_0x1331('0x57')](_0x5905fa[_0x1331('0x43')],_0x5905fa[_0x1331('0x44')]);_0x11d9d0[_0x1331('0x47')]=_[_0x1331('0x57')](_0x5905fa[_0x1331('0x43')],qs[_0x1331('0x48')](_0x40340a[_0x1331('0x44')]['fields']));_0x11d9d0['attributes']=_0x11d9d0[_0x1331('0x47')][_0x1331('0x58')]?_0x11d9d0[_0x1331('0x47')]:_0x5905fa['model'];if(_0x40340a[_0x1331('0x44')][_0x1331('0x53')]){_0x11d9d0[_0x1331('0x59')]=[{'all':!![]}];}_0x11d9d0=_[_0x1331('0x4d')]({},_0x11d9d0,_0x40340a[_0x1331('0x52')]);return db['ChatWebsite']['find'](_0x11d9d0)['then'](handleEntityNotFound(_0x1484ea,null))[_0x1331('0x24')](respondWithResult(_0x1484ea,null))['catch'](handleError(_0x1484ea,null));};exports[_0x1331('0x5a')]=function(_0xbfb9ae,_0x2016bc){return db[_0x1331('0x41')]['create'](_0xbfb9ae[_0x1331('0x5b')],{})[_0x1331('0x24')](function(_0x434594){var _0x5c746b=_0xbfb9ae[_0x1331('0x5c')][_0x1331('0x3b')]({'plain':!![]});if(!_0x5c746b)throw new Error(_0x1331('0x5d'));if(_0x5c746b[_0x1331('0x5e')]===_0x1331('0x5c')){var _0x253361=_0x434594[_0x1331('0x3b')]({'plain':!![]});var _0x58c7fc=_0x1331('0x3c');return db[_0x1331('0x5f')]['find']({'where':{'name':_0x58c7fc,'userProfileId':_0x5c746b[_0x1331('0x60')]},'raw':!![]})[_0x1331('0x24')](function(_0x38a7cc){if(_0x38a7cc&&_0x38a7cc[_0x1331('0x61')]===0x0){return db['UserProfileResource'][_0x1331('0x5a')]({'name':_0x253361[_0x1331('0x3d')],'resourceId':_0x253361['id'],'type':_0x38a7cc[_0x1331('0x3d')],'sectionId':_0x38a7cc['id']},{})['then'](function(){return _0x434594;});}else{return _0x434594;}})[_0x1331('0x2d')](function(_0x6d4c11){logger['error'](_0x1331('0x62'),_0x6d4c11);throw _0x6d4c11;});}return _0x434594;})['then'](respondWithResult(_0x2016bc,0xc9))[_0x1331('0x2d')](handleError(_0x2016bc,null));};exports[_0x1331('0x39')]=function(_0x50abd7,_0x53e515){if(_0x50abd7['body']['id']){delete _0x50abd7[_0x1331('0x5b')]['id'];}return db['ChatWebsite'][_0x1331('0x63')]({'where':{'id':_0x50abd7[_0x1331('0x56')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]})[_0x1331('0x24')](handleEntityNotFound(_0x53e515,null))[_0x1331('0x24')](saveUpdates(_0x50abd7[_0x1331('0x5b')],null))['then'](respondWithResult(_0x53e515,null))[_0x1331('0x2d')](handleError(_0x53e515,null));};exports[_0x1331('0x3a')]=function(_0x1beec7,_0x45f252){return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x1beec7[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x45f252,null))[_0x1331('0x24')](removeEntity(_0x45f252,null))[_0x1331('0x2d')](handleError(_0x45f252,null));};exports[_0x1331('0x64')]=function(_0x3183b5,_0x106507){return db['ChatWebsite'][_0x1331('0x64')]()[_0x1331('0x24')](respondWithResult(_0x106507,null))[_0x1331('0x2d')](handleError(_0x106507,null));};exports[_0x1331('0x65')]=function(_0x33b5ed,_0x10c230,_0x43ce7b){if(_0x33b5ed['body']['id']){delete _0x33b5ed[_0x1331('0x5b')]['id'];}return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x33b5ed['params']['id']}})['then'](handleEntityNotFound(_0x10c230,null))[_0x1331('0x24')](function(_0x2cee84){if(_0x2cee84){_0x33b5ed[_0x1331('0x5b')][_0x1331('0x66')]=_0x2cee84['id'];return db[_0x1331('0x67')]['create'](_0x33b5ed[_0x1331('0x5b')]);}})[_0x1331('0x24')](respondWithResult(_0x10c230,null))[_0x1331('0x2d')](handleError(_0x10c230,null));};exports['getDispositions']=function(_0xe63ae8,_0x4ace41,_0x2ed7d8){var _0x336911={'raw':![],'where':{}};var _0x3f8477={};var _0x3736ae={'count':0x0,'rows':[]};return db[_0x1331('0x41')]['findOne']({'where':{'id':_0xe63ae8[_0x1331('0x56')]['id']}})['then'](handleEntityNotFound(_0x4ace41,null))[_0x1331('0x24')](function(_0x3ff7f9){if(_0x3ff7f9){_0x3f8477['model']=_[_0x1331('0x45')](db['Disposition'][_0x1331('0x42')]);_0x3f8477[_0x1331('0x44')]=_[_0x1331('0x45')](_0xe63ae8[_0x1331('0x44')]);_0x3f8477[_0x1331('0x46')]=_['intersection'](_0x3f8477[_0x1331('0x43')],_0x3f8477[_0x1331('0x44')]);_0x336911[_0x1331('0x47')]=_['intersection'](_0x3f8477[_0x1331('0x43')],qs['fields'](_0xe63ae8['query']['fields']));_0x336911[_0x1331('0x47')]=_0x336911[_0x1331('0x47')][_0x1331('0x58')]?_0x336911['attributes']:_0x3f8477[_0x1331('0x43')];if(!_0xe63ae8[_0x1331('0x44')]['hasOwnProperty']('nolimit')){_0x336911[_0x1331('0x34')]=qs['limit'](_0xe63ae8[_0x1331('0x44')][_0x1331('0x34')]);_0x336911['offset']=qs[_0x1331('0x33')](_0xe63ae8[_0x1331('0x44')][_0x1331('0x33')]);}_0x336911[_0x1331('0x68')]=qs[_0x1331('0x4a')](_0xe63ae8['query'][_0x1331('0x4a')]);_0x336911['where']=qs[_0x1331('0x46')](_[_0x1331('0x4c')](_0xe63ae8[_0x1331('0x44')],_0x3f8477[_0x1331('0x46')]));_0x336911[_0x1331('0x4b')]['ChatWebsiteId']=_0x3ff7f9['id'];if(_0xe63ae8[_0x1331('0x44')][_0x1331('0x51')]){_0x336911['where']=_[_0x1331('0x4d')](_0x336911[_0x1331('0x4b')],{'$or':_[_0x1331('0x69')](_0x336911[_0x1331('0x47')],function(_0x304100){var _0xdaf9e0={};_0xdaf9e0[_0x304100]={'$like':'%'+_0xe63ae8[_0x1331('0x44')][_0x1331('0x51')]+'%'};return _0xdaf9e0;})});}_0x336911=_[_0x1331('0x4d')]({},_0x336911,_0xe63ae8[_0x1331('0x52')]);return db[_0x1331('0x67')][_0x1331('0x32')]({'where':_0x336911[_0x1331('0x4b')]})[_0x1331('0x24')](function(_0x47f780){_0x3736ae[_0x1331('0x32')]=_0x47f780;if(_0xe63ae8[_0x1331('0x44')]['includeAll']){_0x336911[_0x1331('0x59')]=[{'all':!![]}];}return db[_0x1331('0x67')][_0x1331('0x54')](_0x336911);})['then'](function(_0x4d5f3f){_0x3736ae[_0x1331('0x55')]=_0x4d5f3f;return _0x3736ae;});}})[_0x1331('0x24')](respondWithFilteredResult(_0x4ace41,_0x336911))[_0x1331('0x2d')](handleError(_0x4ace41,null));};exports[_0x1331('0x6a')]=function(_0x3bd746,_0x52160f,_0x492086){return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x3bd746[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x52160f,null))[_0x1331('0x24')](function(_0xe6d1ac){if(_0xe6d1ac){return _0xe6d1ac[_0x1331('0x6a')](_0x3bd746[_0x1331('0x44')][_0x1331('0x6b')]);}})[_0x1331('0x24')](respondWithStatusCode(_0x52160f,null))[_0x1331('0x2d')](handleError(_0x52160f,null));};exports[_0x1331('0x6c')]=function(_0xbca5a5,_0x1b7fdf,_0x501b4f){if(_0xbca5a5[_0x1331('0x5b')]['id']){delete _0xbca5a5[_0x1331('0x5b')]['id'];}return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0xbca5a5[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x1b7fdf,null))['then'](function(_0x1b85fc){if(_0x1b85fc){_0xbca5a5['body']['ChatWebsiteId']=_0x1b85fc['id'];return db['CannedAnswer']['create'](_0xbca5a5[_0x1331('0x5b')]);}})['then'](respondWithResult(_0x1b7fdf,null))[_0x1331('0x2d')](handleError(_0x1b7fdf,null));};exports[_0x1331('0x6d')]=function(_0x7c7e1a,_0x4dfac7,_0x3127f5){var _0x5e853e={'raw':![],'where':{}};var _0x38b585={};var _0x2185d1={'count':0x0,'rows':[]};return db[_0x1331('0x41')][_0x1331('0x6e')]({'where':{'id':_0x7c7e1a[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x4dfac7,null))[_0x1331('0x24')](function(_0x4143d1){if(_0x4143d1){_0x38b585[_0x1331('0x43')]=_[_0x1331('0x45')](db[_0x1331('0x6f')][_0x1331('0x42')]);_0x38b585['query']=_[_0x1331('0x45')](_0x7c7e1a[_0x1331('0x44')]);_0x38b585[_0x1331('0x46')]=_['intersection'](_0x38b585['model'],_0x38b585[_0x1331('0x44')]);_0x5e853e[_0x1331('0x47')]=_[_0x1331('0x57')](_0x38b585['model'],qs['fields'](_0x7c7e1a[_0x1331('0x44')][_0x1331('0x48')]));_0x5e853e[_0x1331('0x47')]=_0x5e853e[_0x1331('0x47')][_0x1331('0x58')]?_0x5e853e[_0x1331('0x47')]:_0x38b585[_0x1331('0x43')];if(!_0x7c7e1a[_0x1331('0x44')][_0x1331('0x70')](_0x1331('0x49'))){_0x5e853e[_0x1331('0x34')]=qs[_0x1331('0x34')](_0x7c7e1a[_0x1331('0x44')][_0x1331('0x34')]);_0x5e853e['offset']=qs[_0x1331('0x33')](_0x7c7e1a[_0x1331('0x44')][_0x1331('0x33')]);}_0x5e853e[_0x1331('0x68')]=qs[_0x1331('0x4a')](_0x7c7e1a[_0x1331('0x44')][_0x1331('0x4a')]);_0x5e853e[_0x1331('0x4b')]=qs[_0x1331('0x46')](_['pick'](_0x7c7e1a['query'],_0x38b585[_0x1331('0x46')]));_0x5e853e[_0x1331('0x4b')]['ChatWebsiteId']=_0x4143d1['id'];if(_0x7c7e1a[_0x1331('0x44')]['filter']){_0x5e853e['where']=_[_0x1331('0x4d')](_0x5e853e[_0x1331('0x4b')],{'$or':_[_0x1331('0x69')](_0x5e853e[_0x1331('0x47')],function(_0x3cdac1){var _0x4d6afa={};_0x4d6afa[_0x3cdac1]={'$like':'%'+_0x7c7e1a['query'][_0x1331('0x51')]+'%'};return _0x4d6afa;})});}_0x5e853e=_[_0x1331('0x4d')]({},_0x5e853e,_0x7c7e1a[_0x1331('0x52')]);return db[_0x1331('0x6f')][_0x1331('0x32')]({'where':_0x5e853e[_0x1331('0x4b')]})[_0x1331('0x24')](function(_0x362637){_0x2185d1['count']=_0x362637;if(_0x7c7e1a['query'][_0x1331('0x53')]){_0x5e853e['include']=[{'all':!![]}];}return db[_0x1331('0x6f')][_0x1331('0x54')](_0x5e853e);})['then'](function(_0x25af60){_0x2185d1[_0x1331('0x55')]=_0x25af60;return _0x2185d1;});}})['then'](respondWithFilteredResult(_0x4dfac7,_0x5e853e))['catch'](handleError(_0x4dfac7,null));};exports[_0x1331('0x71')]=function(_0x25e2a4,_0x2fbe7b,_0x1a132d){return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x25e2a4[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x2fbe7b,null))[_0x1331('0x24')](function(_0xa90244){if(_0xa90244){return _0xa90244[_0x1331('0x71')](_0x25e2a4[_0x1331('0x44')][_0x1331('0x6b')]);}})[_0x1331('0x24')](respondWithStatusCode(_0x2fbe7b,null))[_0x1331('0x2d')](handleError(_0x2fbe7b,null));};exports[_0x1331('0x72')]=function(_0x4a2668,_0xf58bbd,_0x1b85c3){_0x4a2668[_0x1331('0x5b')][_0x1331('0x73')]=_0x4a2668[_0x1331('0x74')][_0x1331('0x75')];return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x4a2668[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0xf58bbd,null))[_0x1331('0x24')](saveUpdates(_0x4a2668['body'],null))['then'](respondWithResult(_0xf58bbd,null))[_0x1331('0x2d')](handleError(_0xf58bbd,null));};exports[_0x1331('0x76')]=function(_0x843f9e,_0x3c04be,_0x2d1445){_0x843f9e[_0x1331('0x5b')]['agentAvatar']=_0x843f9e[_0x1331('0x74')][_0x1331('0x75')];return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x843f9e[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x3c04be,null))[_0x1331('0x24')](saveUpdates(_0x843f9e[_0x1331('0x5b')],null))['then'](respondWithResult(_0x3c04be,null))['catch'](handleError(_0x3c04be,null));};exports['addCustomerAvatar']=function(_0x542d01,_0x2dc1da,_0x15760c){_0x542d01[_0x1331('0x5b')][_0x1331('0x77')]=_0x542d01['file'][_0x1331('0x75')];return db['ChatWebsite'][_0x1331('0x63')]({'where':{'id':_0x542d01[_0x1331('0x56')]['id']}})['then'](handleEntityNotFound(_0x2dc1da,null))['then'](saveUpdates(_0x542d01[_0x1331('0x5b')],null))[_0x1331('0x24')](respondWithResult(_0x2dc1da,null))[_0x1331('0x2d')](handleError(_0x2dc1da,null));};exports[_0x1331('0x78')]=function(_0xf8299a,_0x3619e2,_0x384939){_0xf8299a[_0x1331('0x5b')][_0x1331('0x79')]=_0xf8299a[_0x1331('0x74')][_0x1331('0x75')];return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0xf8299a['params']['id']}})['then'](handleEntityNotFound(_0x3619e2,null))['then'](saveUpdates(_0xf8299a[_0x1331('0x5b')],null))['then'](respondWithResult(_0x3619e2,null))[_0x1331('0x2d')](handleError(_0x3619e2,null));};exports[_0x1331('0x7a')]=function(_0x3bee9c,_0xc5c383,_0x20f749){var _0x5bbc50=path[_0x1331('0x7b')](config['root'],_0x1331('0x7c'));var _0x13de72={'where':{'id':_0x3bee9c[_0x1331('0x56')]['id']},'attributes':['id',_0x1331('0x73')],'raw':!![]};var _0x328f0f=![];return require(_0x1331('0x7d'))[_0x1331('0x7e')]()['then'](function(_0x3b9593){if(_0x3b9593){_0x328f0f=_0x3b9593[_0x1331('0x7f')];}})[_0x1331('0x24')](function(){return db[_0x1331('0x41')][_0x1331('0x63')](_0x13de72);})[_0x1331('0x24')](handleEntityNotFound(_0xc5c383,null))[_0x1331('0x24')](function(_0x5c0d9f){if(_0x5c0d9f){if(!_[_0x1331('0x80')](_0x5c0d9f['sitepic'])){if(fs['existsSync'](path['join'](config['root'],_0x1331('0x81'),_0x5c0d9f[_0x1331('0x73')]))&&_0x328f0f){_0x5bbc50=path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0x81'),_0x5c0d9f[_0x1331('0x73')]);}}return _0xc5c383[_0x1331('0x83')](_0x5bbc50);}})[_0x1331('0x2d')](handleError(_0xc5c383,null));};exports['getAvatar']=function(_0x2e60b1,_0x467ef0,_0x34ad9d){var _0x247310=path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0x84'));var _0x10f66a={'where':{'id':_0x2e60b1['params']['id']},'attributes':['id','agentAvatar'],'raw':!![]};return db['ChatWebsite'][_0x1331('0x63')](_0x10f66a)[_0x1331('0x24')](handleEntityNotFound(_0x467ef0,null))['then'](function(_0x6ba1b0){if(_0x6ba1b0){if(!_['isNil'](_0x6ba1b0['agentAvatar'])){if(fs[_0x1331('0x85')](path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0x86'),_0x6ba1b0[_0x1331('0x87')]))){_0x247310=path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0x86'),_0x6ba1b0[_0x1331('0x87')]);}}return _0x467ef0[_0x1331('0x83')](_0x247310);}})[_0x1331('0x2d')](handleError(_0x467ef0,null));};exports['getCustomerAvatar']=function(_0x43253d,_0x546d8c,_0x3d3ede){var _0x506c0e=path[_0x1331('0x7b')](config['root'],'server/files/images/avatars/customer_avatar.png');var _0x5bac67={'where':{'id':_0x43253d['params']['id']},'attributes':['id',_0x1331('0x77'),_0x1331('0x88')],'raw':!![]};return db[_0x1331('0x41')][_0x1331('0x63')](_0x5bac67)[_0x1331('0x24')](handleEntityNotFound(_0x546d8c,null))[_0x1331('0x24')](function(_0x45b64b){if(_0x45b64b){if(!_['isNil'](_0x45b64b[_0x1331('0x77')])){if(fs[_0x1331('0x85')](path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0x86'),_0x45b64b['customerAvatar']))&&_0x45b64b[_0x1331('0x88')]){_0x506c0e=path['join'](config['root'],'server/files/images/avatars/',_0x45b64b[_0x1331('0x77')]);}}return _0x546d8c[_0x1331('0x83')](_0x506c0e);}})[_0x1331('0x2d')](handleError(_0x546d8c,null));};exports[_0x1331('0x89')]=function(_0x4bff3d,_0x33b461,_0x4a4563){var _0x201445=path['join'](config[_0x1331('0x82')],_0x1331('0x8a'));var _0x169ce8={'where':{'id':_0x4bff3d[_0x1331('0x56')]['id']},'attributes':['id',_0x1331('0x79')],'raw':!![]};return db['ChatWebsite'][_0x1331('0x63')](_0x169ce8)[_0x1331('0x24')](handleEntityNotFound(_0x33b461,null))['then'](function(_0x2db432){if(_0x2db432){if(!_[_0x1331('0x80')](_0x2db432[_0x1331('0x79')])){if(fs[_0x1331('0x85')](path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0x86'),_0x2db432[_0x1331('0x79')]))){_0x201445=path['join'](config['root'],_0x1331('0x86'),_0x2db432['systemAvatar']);}}return _0x33b461[_0x1331('0x83')](_0x201445);}})[_0x1331('0x2d')](handleError(_0x33b461,null));};exports[_0x1331('0x8b')]=function(_0x7b6bcd,_0x279aed,_0x126e7f){var _0x4841c5=require('user-agent-parser');var _0x2c9206=new _0x4841c5();var _0x5b4164=_0x2c9206[_0x1331('0x8c')](_0x7b6bcd[_0x1331('0x8d')]['user-agent'])[_0x1331('0x8e')]();var _0x1e2a21={'body':_0x7b6bcd['body'],'channel':'chat'};var _0x11bb83=[];var _0x356f3c=[];var _0x2b053c={};var _0x549e0f=![];return db[_0x1331('0x8f')][_0x1331('0x64')]()[_0x1331('0x24')](function(_0x2c6e7e){if(!_0x2c6e7e){throw new db[(_0x1331('0x90'))][(_0x1331('0x91'))](_0x1331('0x92'));}_0x11bb83=_[_0x1331('0x93')](_['keys'](_0x2c6e7e),[_0x1331('0x94'),_0x1331('0x95')]);_0x356f3c=_[_0x1331('0x93')](_[_0x1331('0x45')](_0x2c6e7e),[_0x1331('0x94'),_0x1331('0x95'),_0x1331('0x96'),_0x1331('0x97')]);if(_0x7b6bcd[_0x1331('0x5b')]['id']){delete _0x7b6bcd[_0x1331('0x5b')]['id'];}if(_[_0x1331('0x80')](_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x98')])){throw new db[(_0x1331('0x90'))]['ValidationError']('from\x20is\x20mandatory');}if(_[_0x1331('0x80')](_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x5b')])||_0x7b6bcd['body']['body']===''){throw new db['Sequelize'][(_0x1331('0x91'))](_0x1331('0x99'));}if(_[_0x1331('0x80')](_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x9a')])){throw new db[(_0x1331('0x90'))][(_0x1331('0x91'))](_0x1331('0x9b')+_0x356f3c);}if(!_[_0x1331('0x9c')](_0x356f3c,_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x9a')])){throw new db[(_0x1331('0x90'))][(_0x1331('0x91'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x356f3c);}_0x2b053c[_0x7b6bcd['body'][_0x1331('0x9a')]]=_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x98')];})[_0x1331('0x24')](function(){return db['ChatWebsite']['find']({'where':{'id':_0x7b6bcd['params']['id']},'include':[{'model':db[_0x1331('0x9d')],'as':_0x1331('0x9e'),'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x2b053c,'limit':0x1,'order':[[_0x1331('0x95'),_0x1331('0x9f')]]}]},{'model':db[_0x1331('0xa0')],'as':_0x1331('0xa1')}]});})[_0x1331('0x24')](handleEntityNotFound(_0x279aed,null))[_0x1331('0x24')](function(_0x70e204){if(_0x70e204&&_0x70e204['List']){_0x1e2a21[_0x1331('0xa2')]=_0x70e204;_0x1e2a21[_0x1331('0xa3')]=_0x70e204[_0x1331('0xa1')];_0x1e2a21[_0x1331('0xa4')]=_0x70e204[_0x1331('0x9e')];_0x1e2a21[_0x1331('0xa3')]=_[_0x1331('0xa5')](_0x1e2a21[_0x1331('0xa3')],[_0x1331('0xa6')],[_0x1331('0xa7')]);if(_0x1e2a21[_0x1331('0xa2')][_0x1331('0xa1')]){delete _0x1e2a21[_0x1331('0xa2')][_0x1331('0xa1')];}if(_0x1e2a21[_0x1331('0xa2')][_0x1331('0x9e')]&&_0x1e2a21[_0x1331('0xa2')]['List']['Contacts'][_0x1331('0x58')]){return _0x1e2a21[_0x1331('0xa2')][_0x1331('0x9e')]['Contacts'][0x0];}var _0xadee73=_[_0x1331('0x1a')](_0x7b6bcd[_0x1331('0x5b')],{'firstName':_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x98')],'ListId':_0x70e204['ListId']});_0xadee73[_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x9a')]]=_0x7b6bcd['body']['from'];return db[_0x1331('0x8f')]['create'](_0xadee73,{'fields':_0x11bb83,'raw':!![]});}})[_0x1331('0x24')](handleEntityNotFound(_0x279aed,null))[_0x1331('0x24')](function(_0x57b1c5){_0x1e2a21['contact']=_0x57b1c5;if(_0x57b1c5){var _0x211c45={'ContactId':_0x57b1c5['id'],'ChatWebsiteId':_0x7b6bcd[_0x1331('0x56')]['id'],'from':(_0x57b1c5[_0x1331('0xa8')]||'')+'\x20'+(_0x57b1c5['lastName']||''),'customerIp':_0x7b6bcd['body'][_0x1331('0xa9')],'referer':_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xaa')],'browserName':_0x5b4164[_0x1331('0xab')][_0x1331('0x3d')]&&_0x5b4164['browser'][_0x1331('0xac')]?util[_0x1331('0xad')]('%s\x20%s',_0x5b4164[_0x1331('0xab')]['name'],_0x5b4164[_0x1331('0xab')][_0x1331('0xac')]):'unknown','browserVersion':_0x5b4164[_0x1331('0xab')][_0x1331('0xac')]||_0x1331('0xae'),'osName':util[_0x1331('0xad')](_0x1331('0xaf'),_0x5b4164['os'][_0x1331('0x3d')],_0x5b4164['os']['version']),'osVersion':_0x5b4164['os'][_0x1331('0xac')],'deviceModel':_0x5b4164['device'][_0x1331('0x43')]&&_0x5b4164[_0x1331('0xb0')][_0x1331('0xb1')]?util['format']('%s\x20%s\x20%s',_0x5b4164[_0x1331('0xb0')][_0x1331('0x43')],_0x5b4164[_0x1331('0xb0')][_0x1331('0xb1')],_0x5b4164[_0x1331('0xb0')][_0x1331('0x4e')]):null,'deviceVendor':_0x5b4164[_0x1331('0xb0')][_0x1331('0xb1')],'deviceType':_0x5b4164[_0x1331('0xb0')][_0x1331('0x4e')],'formData':JSON[_0x1331('0xb2')](_0x7b6bcd[_0x1331('0x5b')])};var _0x5f498f={'ChatWebsiteId':_0x7b6bcd[_0x1331('0x56')]['id'],'closed':![]};if(_0x7b6bcd['body'][_0x1331('0xb3')]){_0x5f498f[_0x1331('0xb3')]=_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xb3')];return db[_0x1331('0xb4')][_0x1331('0x63')]({'where':_0x5f498f})[_0x1331('0x24')](function(_0xef9d8){if(_0xef9d8){return[_0xef9d8,![]];}_0x211c45[_0x1331('0xb3')]=_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xb3')];_0x211c45[_0x1331('0xb5')]=_0x7b6bcd[_0x1331('0x5b')]['externalUrl'];return db[_0x1331('0xb4')][_0x1331('0x5a')](_0x211c45)[_0x1331('0x24')](function(_0x106bdf){return[_0x106bdf,!![]];});});}_0x5f498f[_0x1331('0xb6')]=_0x57b1c5['id'];if(_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xb7')]&&_0x7b6bcd['body'][_0x1331('0xb7')]['id']){_0x5f498f['id']=_0x7b6bcd[_0x1331('0x5b')]['interaction']['id'];return db[_0x1331('0xb4')]['find']({'where':_0x5f498f})[_0x1331('0x24')](function(_0x16b6d9){if(_0x16b6d9){return[_0x16b6d9,![]];}return db[_0x1331('0xb4')][_0x1331('0x5a')](_0x211c45)[_0x1331('0x24')](function(_0x18a3ee){return[_0x18a3ee,!![]];});});}return db['ChatInteraction'][_0x1331('0x5a')](_0x211c45)[_0x1331('0x24')](function(_0x3caffb){return[_0x3caffb,!![]];});}})[_0x1331('0xb8')](function(_0x26597d,_0x4df81b){if(_0x26597d){_0x549e0f=_0x4df81b;if(!_0x4df81b){var _0x2421ba={'from':(_0x1e2a21[_0x1331('0xb9')][_0x1331('0xa8')]||'')+'\x20'+(_0x1e2a21[_0x1331('0xb9')][_0x1331('0xba')]||'')};if(_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xb3')]&&_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xbb')]&&_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xb3')]!=_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xbb')]){_0x2421ba[_0x1331('0xb3')]=_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xbb')];}return _0x26597d[_0x1331('0x39')](_0x2421ba);}else{return _0x26597d;}}})[_0x1331('0x24')](function(_0x1c1e8a){_0x1e2a21[_0x1331('0xb7')]=_0x1c1e8a[_0x1331('0x3b')]({'plain':!![]});_0x1e2a21[_0x1331('0xb7')][_0x1331('0xbc')]=_0x549e0f;if(_0x1e2a21[_0x1331('0xb7')]['created']){if(_0x1e2a21[_0x1331('0xa2')][_0x1331('0xbd')]){_0x1e2a21[_0x1331('0xa3')][_0x1331('0xbe')]({'id':0x0,'priority':_0x1e2a21['applications'][_0x1331('0x58')]+0x1,'app':_0x1331('0xbf'),'appdata':_0x1331('0xc0'),'interval':_0x1331('0xc1')});}}return db[_0x1331('0xc2')][_0x1331('0x5a')]({'body':_0x7b6bcd[_0x1331('0x5b')][_0x1331('0x5b')],'ChatWebsiteId':_0x7b6bcd[_0x1331('0x56')]['id'],'ChatInteractionId':_0x1c1e8a['id'],'direction':'in','ContactId':_0x1e2a21[_0x1331('0xb9')]['id'],'AttachmentId':_0x7b6bcd[_0x1331('0x5b')][_0x1331('0xc3')]});})[_0x1331('0x24')](function(_0x31de09){_0x1e2a21['message']=_0x31de09;if(_0x1e2a21[_0x1331('0xb7')]['UserId']){return db['User'][_0x1331('0x63')]({'attributes':['id','name'],'where':{'id':_0x1e2a21[_0x1331('0xb7')][_0x1331('0xc4')]}})['then'](function(_0x8ee8e5){if(_0x8ee8e5){_0x1e2a21['applications'][_0x1331('0xc5')]({'id':0x0,'priority':0x0,'app':_0x1331('0xc6'),'appdata':_0x8ee8e5[_0x1331('0x3d')]+','+(_0x1e2a21[_0x1331('0xa2')][_0x1331('0xc7')]||0xa),'interval':_0x1331('0xc1')});_0x1e2a21[_0x1331('0xc8')]=!![];}return respondWithRpcPromise(_0x1331('0xc9'),'startRouting',_0x1e2a21);});}return respondWithRpcPromise(_0x1331('0xc9'),_0x1331('0xca'),_0x1e2a21);})[_0x1331('0x24')](function(_0x3a6b62){respondWithRpcPromise(_0x1331('0xcb'),_0x1331('0xcb'),{'event':_0x1331('0x8b'),'message':_0x3a6b62},client9002);return _0x3a6b62;})[_0x1331('0x24')](respondWithResult(_0x279aed,null))['catch'](handleError(_0x279aed,null));};exports[_0x1331('0xcc')]=function(_0x4cdb75,_0x3bd3a7,_0x5a28c3){var _0x52238f,_0x219ade,_0x407dd4;var _0x60021c=[];var _0x4c96f8=[];var _0x581068={};return db[_0x1331('0x8f')][_0x1331('0x64')]()[_0x1331('0x24')](function(_0x13ef49){if(!_0x13ef49){throw new db['Sequelize'][(_0x1331('0x91'))](_0x1331('0x92'));}_0x4c96f8=_[_0x1331('0x93')](_[_0x1331('0x45')](_0x13ef49),[_0x1331('0x94'),_0x1331('0x95')]);_0x60021c=_[_0x1331('0x93')](_['keys'](_0x13ef49),[_0x1331('0x94'),_0x1331('0x95'),_0x1331('0x96'),_0x1331('0x97')]);if(_0x4cdb75[_0x1331('0x5b')]['id']){delete _0x4cdb75['body']['id'];}if(_[_0x1331('0x80')](_0x4cdb75[_0x1331('0x5b')][_0x1331('0x98')])){throw _0x3bd3a7[_0x1331('0x2f')](0x1f4)[_0x1331('0xcd')](new db[(_0x1331('0x90'))][(_0x1331('0x91'))](_0x1331('0xce')));}if(_['isNil'](_0x4cdb75[_0x1331('0x5b')][_0x1331('0x5b')])||_0x4cdb75[_0x1331('0x5b')][_0x1331('0x5b')]===''){throw _0x3bd3a7['status'](0x1f4)[_0x1331('0xcd')](new db['Sequelize'][(_0x1331('0x91'))]('body\x20is\x20mandatory\x20and\x20not\x20empty'));}if(_[_0x1331('0x80')](_0x4cdb75['body'][_0x1331('0xcf')])){throw _0x3bd3a7[_0x1331('0x2f')](0x1f4)[_0x1331('0xcd')](new db['Sequelize'][(_0x1331('0x91'))]('mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x60021c));}if(!_[_0x1331('0x9c')](_0x60021c,_0x4cdb75[_0x1331('0x5b')][_0x1331('0xcf')])){throw _0x3bd3a7[_0x1331('0x2f')](0x1f4)[_0x1331('0xcd')](new db[(_0x1331('0x90'))][(_0x1331('0x91'))](_0x1331('0xd0')+_0x60021c));}_0x581068[_0x4cdb75['body']['mapKeyOffline']]=_0x4cdb75[_0x1331('0x5b')]['from'];})[_0x1331('0x24')](function(){return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x4cdb75[_0x1331('0x56')]['id']},'include':[{'model':db[_0x1331('0x9d')],'as':'List'}]});})[_0x1331('0x24')](handleEntityNotFound(_0x3bd3a7,null))[_0x1331('0x24')](function(_0x525d0e){if(_0x525d0e&&_0x525d0e[_0x1331('0x9e')]){_0x219ade=_0x525d0e;var _0x96abad=_[_0x1331('0x1a')](_0x4cdb75[_0x1331('0x5b')],{'firstName':_0x4cdb75[_0x1331('0x5b')]['from'],'phone':_0x4cdb75[_0x1331('0x5b')][_0x1331('0x98')],'ListId':_0x525d0e[_0x1331('0x97')]});_0x96abad[_0x4cdb75['body'][_0x1331('0xcf')]]=_0x4cdb75[_0x1331('0x5b')][_0x1331('0x98')];return db[_0x1331('0x8f')][_0x1331('0xd1')]({'where':_0x581068,'defaults':_0x96abad});}})[_0x1331('0xb8')](function(_0x516e25){if(_0x516e25){_0x407dd4=_0x516e25;var _0x287032=fs['readFileSync'](path['join'](config['root'],_0x1331('0xd2')),_0x1331('0xd3'));var _0x55fe1d=ejs[_0x1331('0xd4')](_0x287032,{'body':_['toPairs'](_0x4cdb75[_0x1331('0x5b')][_0x1331('0x5b')]),'bodyTitle':_0x219ade['offlineMessageBody']});return db['ChatOfflineMessage']['create']({'body':_0x55fe1d,'ContactId':_0x516e25['id'],'ChatWebsiteId':_0x219ade['id']});}})[_0x1331('0x24')](function(_0x4dc1f0){if(_0x4dc1f0){_0x52238f=_0x4dc1f0;return db['MailAccount']['findOne']({'where':{'service':!![]},'include':[{'model':db[_0x1331('0xd5')],'as':_0x1331('0xd6'),'raw':!![]}]});}})[_0x1331('0x24')](function(_0x42f145){if(_0x42f145&&_0x42f145[_0x1331('0xd6')]&&_0x219ade['forwardOfflineAddress']){var _0x12da8d={'tls':{'rejectUnauthorized':![]}};if(_0x42f145[_0x1331('0xd6')][_0x1331('0xd7')]){_0x12da8d[_0x1331('0xd7')]=_0x42f145['Smtp'][_0x1331('0xd7')];}else{_0x12da8d[_0x1331('0xd8')]=_0x42f145[_0x1331('0xd6')]['host'];_0x12da8d[_0x1331('0xd9')]=_0x42f145[_0x1331('0xd6')][_0x1331('0xd9')];_0x12da8d[_0x1331('0xda')]=_0x42f145[_0x1331('0xd6')]['secure'];}if(_0x42f145[_0x1331('0xd6')]['authentication']){_0x12da8d[_0x1331('0xdb')]={'user':_0x42f145[_0x1331('0xd6')]['user'],'pass':_0x42f145[_0x1331('0xd6')][_0x1331('0xdc')]};}return respondWithRpcPromise(_0x1331('0xdd'),_0x1331('0xde'),{'account':_0x12da8d,'message':{'from':util[_0x1331('0xad')](_0x1331('0xdf'),_0x42f145['name'],_0x42f145[_0x1331('0xe0')]||_0x42f145[_0x1331('0xd6')][_0x1331('0x5c')]),'to':_0x219ade[_0x1331('0xe1')],'subject':_0x219ade[_0x1331('0xe2')],'text':_0x52238f[_0x1331('0x5b')]}},client9003)[_0x1331('0x24')](function(){return _0x52238f;})['catch'](function(_0x1fb452){console[_0x1331('0x29')](_0x1fb452);});}})[_0x1331('0x24')](function(){if(_0x52238f){return _0x52238f;}})[_0x1331('0x24')](respondWithResult(_0x3bd3a7,null))[_0x1331('0x2d')](handleError(_0x3bd3a7,null));};exports[_0x1331('0xe3')]=function(_0x111696,_0x277054,_0xa2dc4b){return db[_0x1331('0xb4')][_0x1331('0x63')]({'where':{'id':_0x111696[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x277054,null))[_0x1331('0x24')](function(_0x1267c2){if(_0x1267c2){return _0x1267c2[_0x1331('0xe3')](_0x111696[_0x1331('0x5b')][_0x1331('0x6b')],_[_0x1331('0xe4')](_0x111696[_0x1331('0x5b')],[_0x1331('0x6b'),'id'])||{});}})['then'](respondWithResult(_0x277054,null))[_0x1331('0x2d')](handleError(_0x277054,null));};exports[_0x1331('0xe5')]=function(_0x1c9602,_0x217f55,_0xc5559e){var _0x37ae29={'raw':![],'where':{}};var _0x5d307e={};var _0x291902={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x1331('0x6e')]({'where':{'id':_0x1c9602[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x217f55,null))[_0x1331('0x24')](function(_0x7029fe){if(_0x7029fe){_0x5d307e[_0x1331('0x43')]=_[_0x1331('0x45')](db['ChatInteraction']['rawAttributes']);_0x5d307e['query']=_[_0x1331('0x45')](_0x1c9602[_0x1331('0x44')]);_0x5d307e[_0x1331('0x46')]=_['intersection'](_0x5d307e[_0x1331('0x43')],_0x5d307e[_0x1331('0x44')]);_0x37ae29['attributes']=_[_0x1331('0x57')](_0x5d307e[_0x1331('0x43')],qs['fields'](_0x1c9602[_0x1331('0x44')][_0x1331('0x48')]));_0x37ae29['attributes']=_0x37ae29[_0x1331('0x47')]['length']?_0x37ae29['attributes']:_0x5d307e['model'];if(!_0x1c9602[_0x1331('0x44')]['hasOwnProperty'](_0x1331('0x49'))){_0x37ae29[_0x1331('0x34')]=qs[_0x1331('0x34')](_0x1c9602[_0x1331('0x44')][_0x1331('0x34')]);_0x37ae29[_0x1331('0x33')]=qs[_0x1331('0x33')](_0x1c9602[_0x1331('0x44')][_0x1331('0x33')]);}_0x37ae29['order']=qs[_0x1331('0x4a')](_0x1c9602['query'][_0x1331('0x4a')]);_0x37ae29[_0x1331('0x4b')]=qs[_0x1331('0x46')](_[_0x1331('0x4c')](_0x1c9602[_0x1331('0x44')],_0x5d307e[_0x1331('0x46')]));_0x37ae29['where'][_0x1331('0x66')]=_0x7029fe['id'];if(_0x1c9602['query'][_0x1331('0x51')]){_0x37ae29[_0x1331('0x4b')]=_[_0x1331('0x4d')](_0x37ae29[_0x1331('0x4b')],{'$or':_[_0x1331('0x69')](_0x37ae29[_0x1331('0x47')],function(_0xf46de1){var _0x310470={};_0x310470[_0xf46de1]={'$like':'%'+_0x1c9602[_0x1331('0x44')][_0x1331('0x51')]+'%'};return _0x310470;})});}_0x37ae29=_['merge']({},_0x37ae29,_0x1c9602[_0x1331('0x52')]);return db[_0x1331('0xb4')]['count']({'where':_0x37ae29[_0x1331('0x4b')]})[_0x1331('0x24')](function(_0x28f268){_0x291902[_0x1331('0x32')]=_0x28f268;if(_0x1c9602['query'][_0x1331('0x53')]){_0x37ae29[_0x1331('0x59')]=[{'model':db[_0x1331('0x8f')],'as':_0x1331('0xe6'),'required':![]},{'model':db['User'],'as':'Owner','attributes':[_0x1331('0x3d'),_0x1331('0xe7'),_0x1331('0xe8')],'required':![]},{'model':db[_0x1331('0xe9')],'as':_0x1331('0xea'),'attributes':['id',_0x1331('0x3d'),'color'],'where':_0x1c9602[_0x1331('0x44')][_0x1331('0xeb')]?{'id':_0x1c9602['query']['tag']}:undefined,'required':_0x1c9602[_0x1331('0x44')][_0x1331('0xeb')]?!![]:![]}];}return db[_0x1331('0xb4')][_0x1331('0x54')](_0x37ae29);})[_0x1331('0x24')](function(_0x11aa1b){_0x291902['rows']=_0x11aa1b;return _0x291902;});}})[_0x1331('0x24')](respondWithFilteredResult(_0x217f55,_0x37ae29))[_0x1331('0x2d')](handleError(_0x217f55,null));};function iftimePromise(_0x4f2be7,_0x179541){return respondWithRpcPromise(_0x1331('0xec'),_0x1331('0xed'),{'command':_0x179541[_0x1331('0xee')]?util['format']('iftime\x20%s,%s',_0x4f2be7[_0x1331('0xef')],_0x179541['timezone']):util['format'](_0x1331('0xf0'),_0x4f2be7[_0x1331('0xef')])},client9002)[_0x1331('0x24')](function(_0x5e6882){var _0xb8d585=_0x5e6882&&_0x5e6882['indexOf'](_0x1331('0xf1'))>=0x0?!![]:![];logger[_0x1331('0x25')](_0x1331('0xf2'),_0x179541['id'],_0x4f2be7['id'],_0x4f2be7[_0x1331('0xef')],_0xb8d585?_0x1331('0xf3'):_0x1331('0xf4'),_0x179541[_0x1331('0xee')]?_0x179541[_0x1331('0xee')]:_0x1331('0xf5'));return _0xb8d585;})[_0x1331('0x2d')](function(_0x225ebc){logger[_0x1331('0x29')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x179541['id'],_0x4f2be7['id'],_0x4f2be7['interval'],util['inspect'](_0x225ebc,{'showHidden':![],'depth':null}),_0x179541[_0x1331('0xee')]?_0x179541[_0x1331('0xee')]:_0x1331('0xf5'));return![];});}exports['getSnippet']=function(_0xf2a171,_0x589832,_0x251618){var _0x3ad5cf=0x0;var _0x317753=0x0;var _0x4da6e2=![];var _0x5918cf;var _0x9da2cc;return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0xf2a171['params']['id']},'include':[{'model':db[_0x1331('0xf6')],'as':_0x1331('0xf6'),'include':[{'model':db[_0x1331('0xf6')],'as':'Intervals','attributes':['id',_0x1331('0xef')],'raw':!![]}]}]})['then'](handleEntityNotFound(_0x589832,null))[_0x1331('0x24')](function(_0x25cd02){if(_0x25cd02){_0x5918cf=_0x25cd02;return _0x25cd02['getProactiveActions']({'raw':!![]});}})[_0x1331('0x24')](function(_0x35fdd4){if(_0x5918cf){if(_0x35fdd4){_0x9da2cc=_0x35fdd4;}}return require(_0x1331('0x7d'))[_0x1331('0x7e')]();})['then'](function(_0x4f4cd4){if(_0x4f4cd4){_0x317753=_0x4f4cd4[_0x1331('0xf7')];_0x4da6e2=_0x4f4cd4[_0x1331('0x7f')];}})[_0x1331('0x24')](function(){return db[_0x1331('0xb4')][_0x1331('0x32')]({'where':{'closed':![]}});})['then'](function(_0x22de95){_0x3ad5cf=_0x22de95;if(_0x317753&&_0x22de95>_0x317753){return db[_0x1331('0xf8')]['findOne']({'where':{'id':0x1}})['then'](function(_0x232766){if(_0x232766){_0x232766[_0x1331('0xf9')]('chatLicenseExceeded');}});}})[_0x1331('0x24')](function(){if(_0x5918cf[_0x1331('0xf6')]&&_0x5918cf[_0x1331('0xf6')][_0x1331('0xfa')]){var _0x1e3728=[];for(var _0x578913=0x0;_0x578913<_0x5918cf[_0x1331('0xf6')][_0x1331('0xfa')][_0x1331('0x58')];_0x578913++){var _0x582947=_0x5918cf[_0x1331('0xf6')][_0x1331('0xfa')][_0x578913][_0x1331('0x3b')]({'plain':!![]});_0x1e3728[_0x1331('0xbe')](iftimePromise(_0x582947,_0x5918cf));}return BPromise[_0x1331('0xfb')](_0x1e3728)['then'](function(_0x423eef){return _[_0x1331('0xfc')](_0x423eef);});}else{return!![];}})['then'](function(_0x5468d9){var _0x5c3a10=fs['readFileSync'](path[_0x1331('0x7b')](config[_0x1331('0x82')],_0x1331('0xfd')),_0x1331('0xd3'));var _0xb064b2={'remote':_0x5918cf[_0x1331('0xfe')],'query':querystring[_0x1331('0xb2')](_[_0x1331('0x4d')](_0x5918cf['get']({'plain':!![]}),{'customerIp':_0xf2a171['headers'][_0x1331('0xff')]||_0xf2a171[_0x1331('0x8d')]['x-real-ip']||_0xf2a171['connection'][_0x1331('0x100')]||_0xf2a171['ip'],'referer':_0xf2a171[_0x1331('0x8d')]['referer'],'openedInteractions':_0x3ad5cf,'maxInteractions':_0x317753,'virtual':_0x4da6e2['virtual'],'online':_0x5468d9,'custom':_0x4da6e2}))['replace'](/'/g,'\x5c\x27')};_0x589832[_0x1331('0xcd')](ejs[_0x1331('0xd4')](Mustache[_0x1331('0xd4')](_0x5c3a10,_0xb064b2),{'proactiveActions':_0x9da2cc,'alignment':_0x5918cf[_0x1331('0x101')],'verticalAlignment':_0x5918cf[_0x1331('0x102')]}));})[_0x1331('0x2d')](handleError(_0x589832,null));};exports[_0x1331('0x103')]=function(_0x1e1301,_0x2f8036,_0x1812d1){return db[_0x1331('0x41')][_0x1331('0x6e')]({'where':{'id':_0x1e1301[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x2f8036,null))[_0x1331('0x24')](function(_0x5c4e80){if(_0x5c4e80){return db[_0x1331('0x104')][_0x1331('0x105')](function(_0xe5998){return db['ChatApplication'][_0x1331('0x3a')]({'where':{'ChatWebsiteId':_0x1e1301['params']['id']},'transaction':_0xe5998})['then'](function(_0x1f9e6e){var _0x3056e5=_[_0x1331('0x69')](_0x1e1301[_0x1331('0x5b')],function(_0x1f955a){_0x1f955a['ChatWebsiteId']=_0x1e1301[_0x1331('0x56')]['id'];return _0x1f955a;});return db[_0x1331('0xa0')]['bulkCreate'](_0x3056e5,{'transaction':_0xe5998});});})[_0x1331('0x24')](function(){return db[_0x1331('0xa0')]['findAndCountAll']({'where':{'ChatWebsiteId':_0x1e1301[_0x1331('0x56')]['id']},'order':_0x1331('0xa6')});});}})[_0x1331('0x24')](respondWithResult(_0x2f8036,null))[_0x1331('0x2d')](handleError(_0x2f8036,null));};exports[_0x1331('0x106')]=function(_0x4b89f9,_0x12e932,_0x2480b9){var _0x3a9104={};var _0x4d71d3={};var _0x5162d9;var _0x4f4350;return db['ChatWebsite'][_0x1331('0x6e')]({'where':{'id':_0x4b89f9['params']['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x12e932,null))[_0x1331('0x24')](function(_0x1f0d35){if(_0x1f0d35){_0x5162d9=_0x1f0d35;_0x4d71d3[_0x1331('0x43')]=_[_0x1331('0x45')](db[_0x1331('0xa0')][_0x1331('0x42')]);_0x4d71d3[_0x1331('0x44')]=_[_0x1331('0x45')](_0x4b89f9[_0x1331('0x44')]);_0x4d71d3['filters']=_[_0x1331('0x57')](_0x4d71d3[_0x1331('0x43')],_0x4d71d3[_0x1331('0x44')]);_0x3a9104['attributes']=_[_0x1331('0x57')](_0x4d71d3['model'],qs[_0x1331('0x48')](_0x4b89f9[_0x1331('0x44')][_0x1331('0x48')]));_0x3a9104['attributes']=_0x3a9104[_0x1331('0x47')][_0x1331('0x58')]?_0x3a9104['attributes']:_0x4d71d3[_0x1331('0x43')];_0x3a9104[_0x1331('0x68')]=qs[_0x1331('0x4a')](_0x4b89f9[_0x1331('0x44')][_0x1331('0x4a')]);_0x3a9104[_0x1331('0x4b')]=qs[_0x1331('0x46')](_[_0x1331('0x4c')](_0x4b89f9[_0x1331('0x44')],_0x4d71d3[_0x1331('0x46')]));if(_0x4b89f9[_0x1331('0x44')]['filter']){_0x3a9104[_0x1331('0x4b')]=_[_0x1331('0x4d')](_0x3a9104[_0x1331('0x4b')],{'$or':_[_0x1331('0x69')](_0x3a9104[_0x1331('0x47')],function(_0xea7ea0){var _0x541ee2={};_0x541ee2[_0xea7ea0]={'$like':'%'+_0x4b89f9[_0x1331('0x44')][_0x1331('0x51')]+'%'};return _0x541ee2;})});}_0x3a9104=_[_0x1331('0x4d')]({},_0x3a9104,_0x4b89f9[_0x1331('0x52')]);return _0x5162d9[_0x1331('0x106')](_0x3a9104);}})[_0x1331('0x24')](function(_0x47aeef){if(_0x47aeef){_0x4f4350=_0x47aeef[_0x1331('0x58')];if(!_0x4b89f9['query'][_0x1331('0x70')]('nolimit')){_0x3a9104['limit']=qs['limit'](_0x4b89f9[_0x1331('0x44')]['limit']);_0x3a9104[_0x1331('0x33')]=qs['offset'](_0x4b89f9[_0x1331('0x44')]['offset']);}return _0x5162d9[_0x1331('0x106')](_0x3a9104);}})[_0x1331('0x24')](function(_0x4869ed){if(_0x4869ed){return _0x4869ed?{'count':_0x4f4350,'rows':_0x4869ed}:null;}})['then'](respondWithResult(_0x12e932,null))['catch'](handleError(_0x12e932,null));};exports[_0x1331('0x107')]=function(_0x3ebabd,_0x25f0c0,_0xa21fed){return db['chatProactiveAction'][_0x1331('0x63')]({'where':{'id':_0x3ebabd[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x25f0c0,null))[_0x1331('0x24')](function(_0x1d8a18){if(_0x1d8a18){return _0x1d8a18['addProactiveActions'](_0x3ebabd[_0x1331('0x5b')][_0x1331('0x6b')],_['omit'](_0x3ebabd['body'],['ids','id'])||{});}})['then'](respondWithResult(_0x25f0c0,null))['catch'](handleError(_0x25f0c0,null));};exports['getProactiveActions']=function(_0x1a3c28,_0x529196,_0xdbde5c){var _0x591379={};var _0x27add5={};var _0x4f3a3c;var _0x445d33;return db['ChatWebsite'][_0x1331('0x6e')]({'where':{'id':_0x1a3c28[_0x1331('0x56')]['id']}})['then'](handleEntityNotFound(_0x529196,null))['then'](function(_0x7da410){if(_0x7da410){_0x4f3a3c=_0x7da410;_0x27add5[_0x1331('0x43')]=_['keys'](db[_0x1331('0x108')][_0x1331('0x42')]);_0x27add5[_0x1331('0x44')]=_[_0x1331('0x45')](_0x1a3c28['query']);_0x27add5['filters']=_[_0x1331('0x57')](_0x27add5['model'],_0x27add5[_0x1331('0x44')]);_0x591379[_0x1331('0x47')]=_[_0x1331('0x57')](_0x27add5[_0x1331('0x43')],qs[_0x1331('0x48')](_0x1a3c28[_0x1331('0x44')][_0x1331('0x48')]));_0x591379[_0x1331('0x47')]=_0x591379[_0x1331('0x47')][_0x1331('0x58')]?_0x591379[_0x1331('0x47')]:_0x27add5[_0x1331('0x43')];_0x591379[_0x1331('0x68')]=qs['sort'](_0x1a3c28['query']['sort']);_0x591379[_0x1331('0x4b')]=qs['filters'](_[_0x1331('0x4c')](_0x1a3c28[_0x1331('0x44')],_0x27add5[_0x1331('0x46')]));if(_0x1a3c28[_0x1331('0x44')][_0x1331('0x51')]){_0x591379[_0x1331('0x4b')]=_['merge'](_0x591379[_0x1331('0x4b')],{'$or':_[_0x1331('0x69')](_0x591379[_0x1331('0x47')],function(_0x41991c){var _0x103546={};_0x103546[_0x41991c]={'$like':'%'+_0x1a3c28[_0x1331('0x44')]['filter']+'%'};return _0x103546;})});}_0x591379=_['merge']({},_0x591379,_0x1a3c28[_0x1331('0x52')]);return _0x4f3a3c['getProactiveActions'](_0x591379);}})[_0x1331('0x24')](function(_0x2d68d8){if(_0x2d68d8){_0x445d33=_0x2d68d8[_0x1331('0x58')];if(!_0x1a3c28[_0x1331('0x44')]['hasOwnProperty']('nolimit')){_0x591379[_0x1331('0x34')]=qs[_0x1331('0x34')](_0x1a3c28[_0x1331('0x44')][_0x1331('0x34')]);_0x591379['offset']=qs['offset'](_0x1a3c28['query'][_0x1331('0x33')]);}return _0x4f3a3c[_0x1331('0x109')](_0x591379);}})[_0x1331('0x24')](function(_0x12db9d){if(_0x12db9d){return _0x12db9d?{'count':_0x445d33,'rows':_0x12db9d}:null;}})['then'](respondWithResult(_0x529196,null))[_0x1331('0x2d')](handleError(_0x529196,null));};exports[_0x1331('0x10a')]=function(_0x2c97dd,_0xe8f2cd,_0x2318d2){var _0x12c2cb=_0x2c97dd[_0x1331('0x44')][_0x1331('0x10b')]===_0x1331('0x10c')?_0x1331('0x10d'):_0x1331('0x10e');return db['ChatWebsite']['find']({'attributes':['id',_0x12c2cb],'where':{'id':_0x2c97dd[_0x1331('0x56')]['id']}})[_0x1331('0x24')](handleEntityNotFound(_0xe8f2cd,null))[_0x1331('0x24')](function(_0x3de107){if(_0x3de107){var _0xbe3e40=_0x3de107[_0x12c2cb];var _0x2e66f3=_0xbe3e40&&_0xbe3e40[_0x1331('0x10f')]?_0xbe3e40[_0x1331('0x10f')]:[];_0xe8f2cd[_0x1331('0xcd')]({'fromKey':_[_0x1331('0x80')](_0xbe3e40['fromKey'])?undefined:_0xbe3e40['fromKey'],'count':_0x2e66f3[_0x1331('0x58')],'rows':_0x2e66f3});}})[_0x1331('0x2d')](handleError(_0xe8f2cd,null));};exports[_0x1331('0x110')]=function(_0x104d1c,_0xd989a6,_0x1ee1e2){var _0x49c76d={'raw':!![],'where':{}};var _0x36468c={};var _0x53bf53={'count':0x0,'rows':[]};return db[_0x1331('0x41')][_0x1331('0x6e')]({'where':{'id':_0x104d1c[_0x1331('0x56')]['id']}})['then'](handleEntityNotFound(_0xd989a6,null))['then'](function(_0x2e0d75){if(_0x2e0d75){_0x36468c['model']=_['keys'](db['ChatOfflineMessage'][_0x1331('0x42')]);_0x36468c[_0x1331('0x44')]=_[_0x1331('0x45')](_0x104d1c[_0x1331('0x44')]);_0x36468c['filters']=_[_0x1331('0x57')](_0x36468c[_0x1331('0x43')],_0x36468c[_0x1331('0x44')]);_0x49c76d['attributes']=_['intersection'](_0x36468c[_0x1331('0x43')],qs[_0x1331('0x48')](_0x104d1c[_0x1331('0x44')]['fields']));_0x49c76d['attributes']=_0x49c76d[_0x1331('0x47')][_0x1331('0x58')]?_0x49c76d[_0x1331('0x47')]:_0x36468c[_0x1331('0x43')];if(!_0x104d1c[_0x1331('0x44')][_0x1331('0x70')](_0x1331('0x49'))){_0x49c76d['limit']=qs[_0x1331('0x34')](_0x104d1c[_0x1331('0x44')][_0x1331('0x34')]);_0x49c76d[_0x1331('0x33')]=qs[_0x1331('0x33')](_0x104d1c[_0x1331('0x44')][_0x1331('0x33')]);}_0x49c76d[_0x1331('0x68')]=qs[_0x1331('0x4a')](_0x104d1c[_0x1331('0x44')][_0x1331('0x4a')]);_0x49c76d[_0x1331('0x4b')]=qs[_0x1331('0x46')](_[_0x1331('0x4c')](_0x104d1c[_0x1331('0x44')],_0x36468c[_0x1331('0x46')]));_0x49c76d[_0x1331('0x4b')][_0x1331('0x66')]=_0x2e0d75['id'];if(_0x104d1c['query'][_0x1331('0x51')]){_0x49c76d['where']=_[_0x1331('0x4d')](_0x49c76d[_0x1331('0x4b')],{'$or':_[_0x1331('0x69')](_0x49c76d[_0x1331('0x47')],function(_0x1c59a5){var _0x22d68f={};_0x22d68f[_0x1c59a5]={'$like':'%'+_0x104d1c['query'][_0x1331('0x51')]+'%'};return _0x22d68f;})});}_0x49c76d=_[_0x1331('0x4d')]({},_0x49c76d,_0x104d1c[_0x1331('0x52')]);return db[_0x1331('0x111')][_0x1331('0x32')]({'where':_0x49c76d[_0x1331('0x4b')]})[_0x1331('0x24')](function(_0xd15a3f){_0x53bf53[_0x1331('0x32')]=_0xd15a3f;if(_0x104d1c[_0x1331('0x44')]['includeAll']){_0x49c76d[_0x1331('0x59')]=[{'all':!![]}];}return db[_0x1331('0x111')][_0x1331('0x54')](_0x49c76d);})['then'](function(_0x2dd07a){_0x53bf53[_0x1331('0x55')]=_0x2dd07a;return _0x53bf53;});}})[_0x1331('0x24')](respondWithFilteredResult(_0xd989a6,_0x49c76d))['catch'](handleError(_0xd989a6,null));};exports['addAgents']=function(_0x1c8de1,_0x42a999,_0x29e7f8){return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x1c8de1['params']['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x42a999,null))[_0x1331('0x24')](function(_0x41ed64){if(_0x41ed64){return _0x41ed64[_0x1331('0x112')](_0x1c8de1[_0x1331('0x5b')][_0x1331('0x6b')],_[_0x1331('0xe4')](_0x1c8de1[_0x1331('0x5b')],['ids','id'])||{})[_0x1331('0xb8')](function(_0x90661d){for(var _0x9e4fa8=0x0;_0x9e4fa8<_0x1c8de1['body'][_0x1331('0x6b')][_0x1331('0x58')];_0x9e4fa8+=0x1){socket[_0x1331('0x113')]('userChatWebsite:save',{'UserId':_0x1c8de1[_0x1331('0x5b')][_0x1331('0x6b')][_0x9e4fa8],'ChatWebsiteId':_0x1c8de1[_0x1331('0x56')]['id']});}return _0x90661d;});}})[_0x1331('0x24')](respondWithResult(_0x42a999,null))['catch'](handleError(_0x42a999,null));};exports[_0x1331('0x114')]=function(_0x19af2d,_0x33f040,_0x36fec3){return db[_0x1331('0x41')][_0x1331('0x63')]({'where':{'id':_0x19af2d['params']['id']}})[_0x1331('0x24')](handleEntityNotFound(_0x33f040,null))[_0x1331('0x24')](function(_0x59d513){if(_0x59d513){return _0x59d513[_0x1331('0x114')](_0x19af2d[_0x1331('0x44')]['ids'])[_0x1331('0x24')](function(){if(_[_0x1331('0x115')](_0x19af2d[_0x1331('0x44')][_0x1331('0x6b')])){for(var _0x46d7f3=0x0;_0x46d7f3<_0x19af2d['query'][_0x1331('0x6b')][_0x1331('0x58')];_0x46d7f3+=0x1){socket[_0x1331('0x113')](_0x1331('0x116'),{'UserId':Number(_0x19af2d[_0x1331('0x44')][_0x1331('0x6b')][_0x46d7f3]),'ChatWebsiteId':Number(_0x19af2d[_0x1331('0x56')]['id'])});}}else{socket[_0x1331('0x113')](_0x1331('0x116'),{'UserId':Number(_0x19af2d[_0x1331('0x44')][_0x1331('0x6b')]),'ChatWebsiteId':Number(_0x19af2d[_0x1331('0x56')]['id'])});}});}})[_0x1331('0x24')](respondWithStatusCode(_0x33f040,null))[_0x1331('0x2d')](handleError(_0x33f040,null));};exports[_0x1331('0x117')]=function(_0x28c8b9,_0x1b5200,_0x2d797f){var _0x3d4273={};var _0x14326d={};var _0x59cafc;var _0x560aad;return db[_0x1331('0x41')][_0x1331('0x6e')]({'where':{'id':_0x28c8b9['params']['id']}})['then'](handleEntityNotFound(_0x1b5200,null))[_0x1331('0x24')](function(_0x2ca4a3){if(_0x2ca4a3){_0x59cafc=_0x2ca4a3;_0x14326d[_0x1331('0x43')]=_['keys'](db[_0x1331('0x118')][_0x1331('0x42')]);_0x14326d[_0x1331('0x44')]=_[_0x1331('0x45')](_0x28c8b9[_0x1331('0x44')]);_0x14326d[_0x1331('0x46')]=_['intersection'](_0x14326d[_0x1331('0x43')],_0x14326d[_0x1331('0x44')]);_0x3d4273['attributes']=_[_0x1331('0x57')](_0x14326d['model'],qs[_0x1331('0x48')](_0x28c8b9[_0x1331('0x44')][_0x1331('0x48')]));_0x3d4273['attributes']=_0x3d4273[_0x1331('0x47')][_0x1331('0x58')]?_0x3d4273[_0x1331('0x47')]:_0x14326d['model'];_0x3d4273['order']=qs[_0x1331('0x4a')](_0x28c8b9[_0x1331('0x44')][_0x1331('0x4a')]);_0x3d4273[_0x1331('0x4b')]=qs[_0x1331('0x46')](_[_0x1331('0x4c')](_0x28c8b9['query'],_0x14326d[_0x1331('0x46')]));if(_0x28c8b9['query']['filter']){_0x3d4273[_0x1331('0x4b')]=_[_0x1331('0x4d')](_0x3d4273['where'],{'$or':_[_0x1331('0x69')](_0x3d4273[_0x1331('0x47')],function(_0x466ce0){var _0x3501c5={};_0x3501c5[_0x466ce0]={'$like':'%'+_0x28c8b9[_0x1331('0x44')][_0x1331('0x51')]+'%'};return _0x3501c5;})});}_0x3d4273=_[_0x1331('0x4d')]({},_0x3d4273,_0x28c8b9[_0x1331('0x52')]);return _0x59cafc['getAgents'](_0x3d4273);}})[_0x1331('0x24')](function(_0x32f94b){if(_0x32f94b){_0x560aad=_0x32f94b[_0x1331('0x58')];if(!_0x28c8b9['query']['hasOwnProperty'](_0x1331('0x49'))){_0x3d4273[_0x1331('0x34')]=qs[_0x1331('0x34')](_0x28c8b9[_0x1331('0x44')][_0x1331('0x34')]);_0x3d4273[_0x1331('0x33')]=qs[_0x1331('0x33')](_0x28c8b9[_0x1331('0x44')][_0x1331('0x33')]);}return _0x59cafc[_0x1331('0x117')](_0x3d4273);}})[_0x1331('0x24')](function(_0x35ffd0){if(_0x35ffd0){return _0x35ffd0?{'count':_0x560aad,'rows':_0x35ffd0}:null;}})['then'](respondWithResult(_0x1b5200,null))[_0x1331('0x2d')](handleError(_0x1b5200,null));};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js
index 4fd7973..099bde5 100644
--- a/server/api/chatWebsite/chatWebsite.events.js
+++ b/server/api/chatWebsite/chatWebsite.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbc92=['../../mysqldb','ChatWebsite','setMaxListeners','save','update','emit','hasOwnProperty','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbc92,0x68));var _0x2bc9=function(_0x9ffdd8,_0x414bbd){_0x9ffdd8=_0x9ffdd8-0x0;var _0x222710=_0xbc92[_0x9ffdd8];return _0x222710;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0x2bc9('0x0'))['db'][_0x2bc9('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x2bc9('0x2')](0x0);var events={'afterCreate':_0x2bc9('0x3'),'afterUpdate':_0x2bc9('0x4'),'afterDestroy':'remove'};function emitEvent(_0x253c06){return function(_0x3a0883,_0x303e15,_0x4d6ef0){ChatWebsiteEvents[_0x2bc9('0x5')](_0x253c06+':'+_0x3a0883['id'],_0x3a0883);ChatWebsiteEvents[_0x2bc9('0x5')](_0x253c06,_0x3a0883);_0x4d6ef0(null);};}for(var e in events){if(events[_0x2bc9('0x6')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0x2bc9('0x7')]=ChatWebsiteEvents;
\ No newline at end of file
+var _0x4d2e=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatWebsite','setMaxListeners'];(function(_0x22a589,_0x1ee896){var _0x7d42c=function(_0x53fe67){while(--_0x53fe67){_0x22a589['push'](_0x22a589['shift']());}};_0x7d42c(++_0x1ee896);}(_0x4d2e,0x130));var _0xe4d2=function(_0x4c04b2,_0x2269c4){_0x4c04b2=_0x4c04b2-0x0;var _0x3839a9=_0x4d2e[_0x4c04b2];return _0x3839a9;};'use strict';var EventEmitter=require(_0xe4d2('0x0'));var ChatWebsite=require(_0xe4d2('0x1'))['db'][_0xe4d2('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xe4d2('0x3')](0x0);var events={'afterCreate':_0xe4d2('0x4'),'afterUpdate':_0xe4d2('0x5'),'afterDestroy':_0xe4d2('0x6')};function emitEvent(_0x40ff27){return function(_0xd3845b,_0x1b10db,_0x418224){ChatWebsiteEvents[_0xe4d2('0x7')](_0x40ff27+':'+_0xd3845b['id'],_0xd3845b);ChatWebsiteEvents[_0xe4d2('0x7')](_0x40ff27,_0xd3845b);_0x418224(null);};}for(var e in events){if(events[_0xe4d2('0x8')](e)){var event=events[e];ChatWebsite[_0xe4d2('0x9')](e,emitEvent(event));}}module[_0xe4d2('0xa')]=ChatWebsiteEvents;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js
index 65f1641..a014af2 100644
--- a/server/api/chatWebsite/chatWebsite.model.js
+++ b/server/api/chatWebsite/chatWebsite.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1fa1=['request-promise','./chatWebsite.attributes','define','ChatWebsite','chat_websites','lodash','../../config/logger','api','moment','bluebird'];(function(_0x494094,_0x36a14c){var _0x3621b7=function(_0x3e0ff1){while(--_0x3e0ff1){_0x494094['push'](_0x494094['shift']());}};_0x3621b7(++_0x36a14c);}(_0x1fa1,0x18b));var _0x11fa=function(_0x20fb02,_0x96c029){_0x20fb02=_0x20fb02-0x0;var _0x24a33e=_0x1fa1[_0x20fb02];return _0x24a33e;};'use strict';var _=require(_0x11fa('0x0'));var util=require('util');var logger=require(_0x11fa('0x1'))(_0x11fa('0x2'));var moment=require(_0x11fa('0x3'));var BPromise=require(_0x11fa('0x4'));var rp=require(_0x11fa('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x11fa('0x6'));module['exports']=function(_0xd39863,_0x2423dd){return _0xd39863[_0x11fa('0x7')](_0x11fa('0x8'),attributes,{'tableName':_0x11fa('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x39ad=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','exports','ChatWebsite','lodash','util'];(function(_0x5494e8,_0x54c5ed){var _0x57b727=function(_0xef22c5){while(--_0xef22c5){_0x5494e8['push'](_0x5494e8['shift']());}};_0x57b727(++_0x54c5ed);}(_0x39ad,0xcf));var _0xd39a=function(_0x2aad20,_0x1b7ffb){_0x2aad20=_0x2aad20-0x0;var _0x17960b=_0x39ad[_0x2aad20];return _0x17960b;};'use strict';var _=require(_0xd39a('0x0'));var util=require(_0xd39a('0x1'));var logger=require(_0xd39a('0x2'))(_0xd39a('0x3'));var moment=require(_0xd39a('0x4'));var BPromise=require(_0xd39a('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xd39a('0x6'));var rimraf=require(_0xd39a('0x7'));var config=require(_0xd39a('0x8'));var attributes=require('./chatWebsite.attributes');module[_0xd39a('0x9')]=function(_0xb6f2,_0x1579b8){return _0xb6f2['define'](_0xd39a('0xa'),attributes,{'tableName':'chat_websites','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.rpc.js b/server/api/chatWebsite/chatWebsite.rpc.js
index 4e021a0..0aeaba6 100644
--- a/server/api/chatWebsite/chatWebsite.rpc.js
+++ b/server/api/chatWebsite/chatWebsite.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x02a0=['client','redis','defaults','localhost','socket.io-emitter','register','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x471fcf,_0xc57e0c){var _0x597c29=function(_0x53ca9e){while(--_0x53ca9e){_0x471fcf['push'](_0x471fcf['shift']());}};_0x597c29(++_0xc57e0c);}(_0x02a0,0x86));var _0x002a=function(_0x39c271,_0x13770a){_0x39c271=_0x39c271-0x0;var _0x3626b0=_0x02a0[_0x39c271];return _0x3626b0;};'use strict';var _=require(_0x002a('0x0'));var util=require(_0x002a('0x1'));var moment=require(_0x002a('0x2'));var BPromise=require(_0x002a('0x3'));var rs=require(_0x002a('0x4'));var fs=require('fs');var Redis=require(_0x002a('0x5'));var db=require(_0x002a('0x6'))['db'];var utils=require(_0x002a('0x7'));var logger=require(_0x002a('0x8'))('rpc');var config=require(_0x002a('0x9'));var jayson=require(_0x002a('0xa'));var client=jayson[_0x002a('0xb')]['http']({'port':0x232a});config[_0x002a('0xc')]=_[_0x002a('0xd')](config[_0x002a('0xc')],{'host':_0x002a('0xe'),'port':0x18eb});var socket=require(_0x002a('0xf'))(new Redis(config[_0x002a('0xc')]));require('./chatWebsite.socket')[_0x002a('0x10')](socket);function respondWithRpcPromise(_0x16232a,_0x2f64fc,_0x10c3cf){return new BPromise(function(_0x264f23,_0x533250){return client[_0x002a('0x11')](_0x16232a,_0x10c3cf)[_0x002a('0x12')](function(_0x769770){logger[_0x002a('0x13')](_0x002a('0x14'),_0x2f64fc,_0x002a('0x15'));logger[_0x002a('0x16')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x2f64fc,_0x002a('0x15'),JSON[_0x002a('0x17')](_0x769770));if(_0x769770[_0x002a('0x18')]){if(_0x769770[_0x002a('0x18')][_0x002a('0x19')]===0x1f4){logger['error'](_0x002a('0x14'),_0x2f64fc,_0x769770['error'][_0x002a('0x1a')]);return _0x533250(_0x769770[_0x002a('0x18')][_0x002a('0x1a')]);}logger['error'](_0x002a('0x14'),_0x2f64fc,_0x769770['error'][_0x002a('0x1a')]);return _0x264f23(_0x769770[_0x002a('0x18')]['message']);}else{logger[_0x002a('0x13')](_0x002a('0x14'),_0x2f64fc,_0x002a('0x15'));_0x264f23(_0x769770[_0x002a('0x1b')][_0x002a('0x1a')]);}})[_0x002a('0x1c')](function(_0x4139c7){logger['error'](_0x002a('0x14'),_0x2f64fc,_0x4139c7);_0x533250(_0x4139c7);});});}
\ No newline at end of file
+var _0x261c=['redis','defaults','socket.io-emitter','register','request','then','info','ChatWebsite,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client','http'];(function(_0x54c30a,_0x54e928){var _0x44121d=function(_0x9b05fd){while(--_0x9b05fd){_0x54c30a['push'](_0x54c30a['shift']());}};_0x44121d(++_0x54e928);}(_0x261c,0x1b8));var _0xc261=function(_0x952282,_0x51a614){_0x952282=_0x952282-0x0;var _0x613507=_0x261c[_0x952282];return _0x613507;};'use strict';var _=require(_0xc261('0x0'));var util=require(_0xc261('0x1'));var moment=require('moment');var BPromise=require(_0xc261('0x2'));var rs=require(_0xc261('0x3'));var fs=require('fs');var Redis=require(_0xc261('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xc261('0x5'));var logger=require('../../config/logger')(_0xc261('0x6'));var config=require('../../config/environment');var jayson=require(_0xc261('0x7'));var client=jayson[_0xc261('0x8')][_0xc261('0x9')]({'port':0x232a});config[_0xc261('0xa')]=_[_0xc261('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xc261('0xc'))(new Redis(config['redis']));require('./chatWebsite.socket')[_0xc261('0xd')](socket);function respondWithRpcPromise(_0x1777f7,_0x23dda8,_0x39e6fe){return new BPromise(function(_0x2ff64e,_0x233b9f){return client[_0xc261('0xe')](_0x1777f7,_0x39e6fe)[_0xc261('0xf')](function(_0x4f59e8){logger[_0xc261('0x10')](_0xc261('0x11'),_0x23dda8,'request\x20sent');logger[_0xc261('0x12')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x23dda8,_0xc261('0x13'),JSON[_0xc261('0x14')](_0x4f59e8));if(_0x4f59e8[_0xc261('0x15')]){if(_0x4f59e8[_0xc261('0x15')][_0xc261('0x16')]===0x1f4){logger['error']('ChatWebsite,\x20%s,\x20%s',_0x23dda8,_0x4f59e8[_0xc261('0x15')][_0xc261('0x17')]);return _0x233b9f(_0x4f59e8[_0xc261('0x15')]['message']);}logger[_0xc261('0x15')](_0xc261('0x11'),_0x23dda8,_0x4f59e8[_0xc261('0x15')][_0xc261('0x17')]);return _0x2ff64e(_0x4f59e8['error'][_0xc261('0x17')]);}else{logger[_0xc261('0x10')](_0xc261('0x11'),_0x23dda8,'request\x20sent');_0x2ff64e(_0x4f59e8['result'][_0xc261('0x17')]);}})[_0xc261('0x18')](function(_0x4a0f43){logger[_0xc261('0x15')](_0xc261('0x11'),_0x23dda8,_0x4a0f43);_0x233b9f(_0x4a0f43);});});}
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js
index 096c131..4ae6072 100644
--- a/server/api/chatWebsite/chatWebsite.socket.js
+++ b/server/api/chatWebsite/chatWebsite.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3aab=['emit','register','length','chatWebsite:','./chatWebsite.events','save'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x3aab,0x64));var _0xb3aa=function(_0xfb366c,_0x1dae37){_0xfb366c=_0xfb366c-0x0;var _0x9da781=_0x3aab[_0xfb366c];return _0x9da781;};'use strict';var ChatWebsiteEvents=require(_0xb3aa('0x0'));var events=[_0xb3aa('0x1'),'remove','update'];function createListener(_0x26590d,_0x4c0f2f){return function(_0x9e0a7d){_0x4c0f2f[_0xb3aa('0x2')](_0x26590d,_0x9e0a7d);};}function removeListener(_0x5b2762,_0x3c4393){return function(){ChatWebsiteEvents['removeListener'](_0x5b2762,_0x3c4393);};}exports[_0xb3aa('0x3')]=function(_0x52cea2){for(var _0x279ac=0x0,_0x7f0b06=events[_0xb3aa('0x4')];_0x279ac<_0x7f0b06;_0x279ac++){var _0x36c2b9=events[_0x279ac];var _0x2e567d=createListener(_0xb3aa('0x5')+_0x36c2b9,_0x52cea2);ChatWebsiteEvents['on'](_0x36c2b9,_0x2e567d);}};
\ No newline at end of file
+var _0x4c48=['removeListener','register','length','./chatWebsite.events','save','emit'];(function(_0x1547e9,_0xf449bf){var _0x3b4efe=function(_0x54664e){while(--_0x54664e){_0x1547e9['push'](_0x1547e9['shift']());}};_0x3b4efe(++_0xf449bf);}(_0x4c48,0x129));var _0x84c4=function(_0x764874,_0x3ed544){_0x764874=_0x764874-0x0;var _0x29f9d5=_0x4c48[_0x764874];return _0x29f9d5;};'use strict';var ChatWebsiteEvents=require(_0x84c4('0x0'));var events=[_0x84c4('0x1'),'remove','update'];function createListener(_0x3215fe,_0x2d8232){return function(_0x134582){_0x2d8232[_0x84c4('0x2')](_0x3215fe,_0x134582);};}function removeListener(_0x5f2322,_0x29280c){return function(){ChatWebsiteEvents[_0x84c4('0x3')](_0x5f2322,_0x29280c);};}exports[_0x84c4('0x4')]=function(_0x91c377){for(var _0x3f1ac2=0x0,_0x2bcadf=events[_0x84c4('0x5')];_0x3f1ac2<_0x2bcadf;_0x3f1ac2++){var _0x5afff4=events[_0x3f1ac2];var _0x4927e0=createListener('chatWebsite:'+_0x5afff4,_0x91c377);ChatWebsiteEvents['on'](_0x5afff4,_0x4927e0);}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js
index 59c8df0..cb5d4fb 100644
--- a/server/api/chatWebsite/index.js
+++ b/server/api/chatWebsite/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x684c=['../../components/interaction/service','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','getAnswers','/:id/logo','getLogo','getAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','/:id/snippet','/:id/proactive_actions','getProactiveActions','getFields','getOfflineMessages','getAgents','post','create','addDisposition','addAnswer','diskStorage','server/files/images/logos/','format','now','originalname','single','addLogo','join','root','server/files/images/avatars/','%s-%s','/:id/avatar','/:id/customer_avatar','addCustomerAvatar','file','addSystemAvatar','/:id/notify','notify','/:id/applications','addApplications','addProactiveActions','/:id/users','addAgents','put','update','delete','destroy','/:id/canned_answers','exports','multer','util','connect-timeout','express','Router','../../components/auth/service'];(function(_0x45f1c4,_0x5b4204){var _0x3e76b2=function(_0x924d82){while(--_0x924d82){_0x45f1c4['push'](_0x45f1c4['shift']());}};_0x3e76b2(++_0x5b4204);}(_0x684c,0x1b3));var _0xc684=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x684c[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xc684('0x0'));var util=require(_0xc684('0x1'));var path=require('path');var timeout=require(_0xc684('0x2'));var express=require(_0xc684('0x3'));var router=express[_0xc684('0x4')]();var auth=require(_0xc684('0x5'));var interaction=require(_0xc684('0x6'));var config=require('../../config/environment');var controller=require(_0xc684('0x7'));router[_0xc684('0x8')]('/',auth[_0xc684('0x9')](),controller[_0xc684('0xa')]);router[_0xc684('0x8')](_0xc684('0xb'),auth[_0xc684('0x9')](),controller[_0xc684('0xc')]);router[_0xc684('0x8')](_0xc684('0xd'),auth[_0xc684('0x9')](),controller[_0xc684('0xe')]);router[_0xc684('0x8')](_0xc684('0xf'),auth[_0xc684('0x9')](),controller[_0xc684('0x10')]);router[_0xc684('0x8')]('/:id/canned_answers',auth[_0xc684('0x9')](),controller[_0xc684('0x11')]);router[_0xc684('0x8')](_0xc684('0x12'),controller[_0xc684('0x13')]);router[_0xc684('0x8')]('/:id/avatar',controller[_0xc684('0x14')]);router[_0xc684('0x8')]('/:id/customer_avatar',controller['getCustomerAvatar']);router[_0xc684('0x8')](_0xc684('0x15'),controller[_0xc684('0x16')]);router[_0xc684('0x8')](_0xc684('0x17'),auth[_0xc684('0x9')](),controller['getInteractions']);router['get'](_0xc684('0x18'),controller['getSnippet']);router['get']('/:id/applications',auth['isAuthenticated'](),controller['getApplications']);router[_0xc684('0x8')](_0xc684('0x19'),auth[_0xc684('0x9')](),controller[_0xc684('0x1a')]);router[_0xc684('0x8')]('/:id/fields',controller[_0xc684('0x1b')]);router[_0xc684('0x8')]('/:id/offline_messages',auth[_0xc684('0x9')](),controller[_0xc684('0x1c')]);router[_0xc684('0x8')]('/:id/users',auth[_0xc684('0x9')](),controller[_0xc684('0x1d')]);router[_0xc684('0x1e')]('/',auth[_0xc684('0x9')](),controller[_0xc684('0x1f')]);router['post'](_0xc684('0xf'),auth[_0xc684('0x9')](),controller[_0xc684('0x20')]);router['post']('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xc684('0x21')]);var upload=multer({'storage':multer[_0xc684('0x22')]({'destination':function(_0xd2a943,_0x4c6e46,_0x491b6a){_0x491b6a(null,path['join'](config['root'],_0xc684('0x23')));},'filename':function(_0x321a88,_0x236f02,_0x4edb38){_0x4edb38(null,util[_0xc684('0x24')]('%s-%s',Date[_0xc684('0x25')](),_0x236f02[_0xc684('0x26')]));}})});router[_0xc684('0x1e')]('/:id/logo',upload[_0xc684('0x27')]('file'),controller[_0xc684('0x28')]);var upload=multer({'storage':multer[_0xc684('0x22')]({'destination':function(_0x210dcd,_0x9fdc2c,_0x5df482){_0x5df482(null,path[_0xc684('0x29')](config[_0xc684('0x2a')],_0xc684('0x2b')));},'filename':function(_0x3c8a4d,_0x1baa49,_0x1e029c){_0x1e029c(null,util[_0xc684('0x24')](_0xc684('0x2c'),Date['now'](),_0x1baa49['originalname']));}})});router['post'](_0xc684('0x2d'),upload[_0xc684('0x27')]('file'),controller['addAvatar']);var upload=multer({'storage':multer[_0xc684('0x22')]({'destination':function(_0x597356,_0x16129c,_0x164da7){_0x164da7(null,path[_0xc684('0x29')](config['root'],'server/files/images/avatars/'));},'filename':function(_0x160856,_0xcdff45,_0x577ebe){_0x577ebe(null,util['format'](_0xc684('0x2c'),Date[_0xc684('0x25')](),_0xcdff45[_0xc684('0x26')]));}})});router[_0xc684('0x1e')](_0xc684('0x2e'),upload[_0xc684('0x27')]('file'),controller[_0xc684('0x2f')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5b25ec,_0x289116,_0x46e014){_0x46e014(null,path['join'](config['root'],_0xc684('0x2b')));},'filename':function(_0x1e5fb8,_0x217712,_0x65854f){_0x65854f(null,util[_0xc684('0x24')]('%s-%s',Date[_0xc684('0x25')](),_0x217712[_0xc684('0x26')]));}})});router['post']('/:id/system_avatar',upload[_0xc684('0x27')](_0xc684('0x30')),controller[_0xc684('0x31')]);router[_0xc684('0x1e')](_0xc684('0x32'),controller[_0xc684('0x33')]);router[_0xc684('0x1e')]('/:id/offline',controller['offline']);router[_0xc684('0x1e')](_0xc684('0x17'),auth['isAuthenticated'](),controller['addInteraction']);router['post'](_0xc684('0x34'),auth[_0xc684('0x9')](),controller[_0xc684('0x35')]);router[_0xc684('0x1e')](_0xc684('0x19'),auth['isAuthenticated'](),controller[_0xc684('0x36')]);router['post'](_0xc684('0x37'),auth[_0xc684('0x9')](),controller[_0xc684('0x38')]);router[_0xc684('0x39')]('/:id',auth[_0xc684('0x9')](),controller[_0xc684('0x3a')]);router[_0xc684('0x3b')](_0xc684('0xd'),auth[_0xc684('0x9')](),controller[_0xc684('0x3c')]);router['delete'](_0xc684('0xf'),auth['isAuthenticated'](),controller['removeDispositions']);router[_0xc684('0x3b')](_0xc684('0x3d'),auth[_0xc684('0x9')](),controller['removeAnswers']);router['delete']('/:id/users',auth['isAuthenticated'](),controller['removeAgents']);module[_0xc684('0x3e')]=router;
\ No newline at end of file
+var _0xbb53=['single','addCustomerAvatar','addSystemAvatar','notify','offline','addInteraction','/:id/applications','addApplications','addProactiveActions','addAgents','/:id','update','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','index','get','/describe','isAuthenticated','describe','show','/:id/dispositions','getDispositions','getAnswers','/:id/logo','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getSnippet','getApplications','/:id/proactive_actions','getProactiveActions','/:id/fields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','addDisposition','/:id/canned_answers','addAnswer','root','server/files/images/logos/','format','%s-%s','now','file','addLogo','diskStorage','join','server/files/images/avatars/','originalname','/:id/avatar'];(function(_0x54c73a,_0x1a56e4){var _0x8de51d=function(_0x18ca98){while(--_0x18ca98){_0x54c73a['push'](_0x54c73a['shift']());}};_0x8de51d(++_0x1a56e4);}(_0xbb53,0x121));var _0x3bb5=function(_0x1f76a2,_0x59e592){_0x1f76a2=_0x1f76a2-0x0;var _0x4da05d=_0xbb53[_0x1f76a2];return _0x4da05d;};'use strict';var multer=require(_0x3bb5('0x0'));var util=require(_0x3bb5('0x1'));var path=require(_0x3bb5('0x2'));var timeout=require(_0x3bb5('0x3'));var express=require(_0x3bb5('0x4'));var router=express[_0x3bb5('0x5')]();var auth=require(_0x3bb5('0x6'));var interaction=require(_0x3bb5('0x7'));var config=require(_0x3bb5('0x8'));var controller=require(_0x3bb5('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0x3bb5('0xa')]);router[_0x3bb5('0xb')](_0x3bb5('0xc'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0xe')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x3bb5('0xf')]);router[_0x3bb5('0xb')](_0x3bb5('0x10'),auth['isAuthenticated'](),controller[_0x3bb5('0x11')]);router['get']('/:id/canned_answers',auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x12')]);router['get'](_0x3bb5('0x13'),controller['getLogo']);router[_0x3bb5('0xb')]('/:id/avatar',controller['getAvatar']);router[_0x3bb5('0xb')](_0x3bb5('0x14'),controller[_0x3bb5('0x15')]);router['get'](_0x3bb5('0x16'),controller[_0x3bb5('0x17')]);router['get'](_0x3bb5('0x18'),auth[_0x3bb5('0xd')](),controller['getInteractions']);router['get']('/:id/snippet',controller[_0x3bb5('0x19')]);router[_0x3bb5('0xb')]('/:id/applications',auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x1a')]);router[_0x3bb5('0xb')](_0x3bb5('0x1b'),auth['isAuthenticated'](),controller[_0x3bb5('0x1c')]);router[_0x3bb5('0xb')](_0x3bb5('0x1d'),controller['getFields']);router['get'](_0x3bb5('0x1e'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x1f')]);router['get'](_0x3bb5('0x20'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x21')]);router[_0x3bb5('0x22')]('/',auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x23')]);router['post'](_0x3bb5('0x10'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x24')]);router[_0x3bb5('0x22')](_0x3bb5('0x25'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x26')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1d2a24,_0x3ef331,_0x559720){_0x559720(null,path['join'](config[_0x3bb5('0x27')],_0x3bb5('0x28')));},'filename':function(_0x58acdb,_0x483689,_0x477d1f){_0x477d1f(null,util[_0x3bb5('0x29')](_0x3bb5('0x2a'),Date[_0x3bb5('0x2b')](),_0x483689['originalname']));}})});router['post'](_0x3bb5('0x13'),upload['single'](_0x3bb5('0x2c')),controller[_0x3bb5('0x2d')]);var upload=multer({'storage':multer[_0x3bb5('0x2e')]({'destination':function(_0x534b15,_0x5f40ac,_0x19e61d){_0x19e61d(null,path[_0x3bb5('0x2f')](config[_0x3bb5('0x27')],_0x3bb5('0x30')));},'filename':function(_0x311680,_0x33571b,_0x3ed2cc){_0x3ed2cc(null,util['format'](_0x3bb5('0x2a'),Date[_0x3bb5('0x2b')](),_0x33571b[_0x3bb5('0x31')]));}})});router[_0x3bb5('0x22')](_0x3bb5('0x32'),upload[_0x3bb5('0x33')](_0x3bb5('0x2c')),controller['addAvatar']);var upload=multer({'storage':multer[_0x3bb5('0x2e')]({'destination':function(_0x25ba4c,_0x53654b,_0x396345){_0x396345(null,path[_0x3bb5('0x2f')](config[_0x3bb5('0x27')],_0x3bb5('0x30')));},'filename':function(_0x18ce1f,_0x50fb44,_0x31a1f9){_0x31a1f9(null,util[_0x3bb5('0x29')](_0x3bb5('0x2a'),Date[_0x3bb5('0x2b')](),_0x50fb44['originalname']));}})});router['post'](_0x3bb5('0x14'),upload[_0x3bb5('0x33')](_0x3bb5('0x2c')),controller[_0x3bb5('0x34')]);var upload=multer({'storage':multer[_0x3bb5('0x2e')]({'destination':function(_0x43a455,_0x2a2419,_0x2a0a19){_0x2a0a19(null,path[_0x3bb5('0x2f')](config['root'],_0x3bb5('0x30')));},'filename':function(_0x6b70e4,_0x5b3033,_0x5f3bf0){_0x5f3bf0(null,util[_0x3bb5('0x29')](_0x3bb5('0x2a'),Date[_0x3bb5('0x2b')](),_0x5b3033[_0x3bb5('0x31')]));}})});router['post']('/:id/system_avatar',upload[_0x3bb5('0x33')]('file'),controller[_0x3bb5('0x35')]);router['post']('/:id/notify',controller[_0x3bb5('0x36')]);router['post']('/:id/offline',controller[_0x3bb5('0x37')]);router[_0x3bb5('0x22')](_0x3bb5('0x18'),auth['isAuthenticated'](),controller[_0x3bb5('0x38')]);router['post'](_0x3bb5('0x39'),auth['isAuthenticated'](),controller[_0x3bb5('0x3a')]);router[_0x3bb5('0x22')](_0x3bb5('0x1b'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x3b')]);router[_0x3bb5('0x22')]('/:id/users',auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x3c')]);router['put'](_0x3bb5('0x3d'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x3e')]);router['delete'](_0x3bb5('0x3d'),auth[_0x3bb5('0xd')](),controller['destroy']);router[_0x3bb5('0x3f')](_0x3bb5('0x10'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x40')]);router[_0x3bb5('0x3f')](_0x3bb5('0x25'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x41')]);router[_0x3bb5('0x3f')](_0x3bb5('0x20'),auth[_0x3bb5('0xd')](),controller[_0x3bb5('0x42')]);module[_0x3bb5('0x43')]=router;
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js
index a289d6a..75be5cb 100644
--- a/server/api/cmCompany/cmCompany.attributes.js
+++ b/server/api/cmCompany/cmCompany.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd23e=['exports','STRING','name'];(function(_0x130f52,_0xa43f3e){var _0x334057=function(_0x39743d){while(--_0x39743d){_0x130f52['push'](_0x130f52['shift']());}};_0x334057(++_0xa43f3e);}(_0xd23e,0xc6));var _0xed23=function(_0xe3d4a2,_0x5dbf95){_0xe3d4a2=_0xe3d4a2-0x0;var _0x131efb=_0xd23e[_0xe3d4a2];return _0x131efb;};'use strict';var Sequelize=require('sequelize');module[_0xed23('0x0')]={'name':{'type':Sequelize[_0xed23('0x1')],'unique':_0xed23('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize['STRING']},'companyId':{'type':Sequelize[_0xed23('0x1')]},'website':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0xed23('0x1')]},'fax':{'type':Sequelize[_0xed23('0x1')]},'type':{'type':Sequelize[_0xed23('0x1')]},'street':{'type':Sequelize[_0xed23('0x1')]},'postalCode':{'type':Sequelize[_0xed23('0x1')]},'city':{'type':Sequelize[_0xed23('0x1')]},'country':{'type':Sequelize[_0xed23('0x1')]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xed23('0x1')]},'sStreet':{'type':Sequelize[_0xed23('0x1')]},'sPostalCode':{'type':Sequelize[_0xed23('0x1')]},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize[_0xed23('0x1')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xe483=['sequelize','exports','STRING','name'];(function(_0x58cd4d,_0x21f7a2){var _0x102010=function(_0x16c6f4){while(--_0x16c6f4){_0x58cd4d['push'](_0x58cd4d['shift']());}};_0x102010(++_0x21f7a2);}(_0xe483,0x7c));var _0x3e48=function(_0x354ac0,_0x44731a){_0x354ac0=_0x354ac0-0x0;var _0x1a737d=_0xe483[_0x354ac0];return _0x1a737d;};'use strict';var Sequelize=require(_0x3e48('0x0'));module[_0x3e48('0x1')]={'name':{'type':Sequelize[_0x3e48('0x2')],'unique':_0x3e48('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0x3e48('0x2')]},'companyId':{'type':Sequelize['STRING']},'website':{'type':Sequelize[_0x3e48('0x2')]},'phone':{'type':Sequelize['STRING']},'fax':{'type':Sequelize[_0x3e48('0x2')]},'type':{'type':Sequelize[_0x3e48('0x2')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0x3e48('0x2')]},'city':{'type':Sequelize[_0x3e48('0x2')]},'country':{'type':Sequelize[_0x3e48('0x2')]},'email':{'type':Sequelize[_0x3e48('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x3e48('0x2')]},'sStreet':{'type':Sequelize[_0x3e48('0x2')]},'sPostalCode':{'type':Sequelize['STRING']},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js
index 56dd859..3e59179 100644
--- a/server/api/cmCompany/cmCompany.controller.js
+++ b/server/api/cmCompany/cmCompany.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf3d6=['sox','to-csv','ejs','lodash','../../components/auth/service','../../components/parsers/qs','api','../../config/environment','end','status','json','count','offset','limit','Content-Range','update','then','get','Companies','UserProfileResource','destroy','sendStatus','stack','name','send','index','CmCompany','rawAttributes','keys','query','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','show','params','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','create','error','addContacts','omit','ids','getContacts','findOne','CmContact','hasOwnProperty','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path'];(function(_0x2adef8,_0x2800de){var _0x53a789=function(_0x56eb4b){while(--_0x56eb4b){_0x2adef8['push'](_0x2adef8['shift']());}};_0x53a789(++_0x2800de);}(_0xf3d6,0x17e));var _0x6f3d=function(_0x4ab866,_0x40e607){_0x4ab866=_0x4ab866-0x0;var _0x56047a=_0xf3d6[_0x4ab866];return _0x56047a;};'use strict';var pdf=require(_0x6f3d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x6f3d('0x1'));var zipdir=require(_0x6f3d('0x2'));var jsonpatch=require(_0x6f3d('0x3'));var rp=require(_0x6f3d('0x4'));var moment=require('moment');var BPromise=require(_0x6f3d('0x5'));var Mustache=require('mustache');var util=require(_0x6f3d('0x6'));var path=require(_0x6f3d('0x7'));var sox=require(_0x6f3d('0x8'));var csv=require(_0x6f3d('0x9'));var ejs=require(_0x6f3d('0xa'));var fs=require('fs');var _=require(_0x6f3d('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x6f3d('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x6f3d('0xc'));var qs=require(_0x6f3d('0xd'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6f3d('0xe'));var utils=require('../../config/utils');var config=require(_0x6f3d('0xf'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x46663a,_0x139351){_0x139351=_0x139351||0xcc;return function(_0x3e4604){if(_0x3e4604){return _0x46663a['sendStatus'](_0x139351);}return _0x46663a['status'](_0x139351)[_0x6f3d('0x10')]();};}function respondWithResult(_0x2a3e56,_0x26a6d1){_0x26a6d1=_0x26a6d1||0xc8;return function(_0x3d64f5){if(_0x3d64f5){return _0x2a3e56[_0x6f3d('0x11')](_0x26a6d1)[_0x6f3d('0x12')](_0x3d64f5);}};}function respondWithFilteredResult(_0x5441fe,_0x2d403c){return function(_0x19a37f){if(_0x19a37f){var _0x2d3487=_0x19a37f[_0x6f3d('0x13')],_0x457277=_0x2d403c[_0x6f3d('0x14')],_0x44766e=_0x2d403c[_0x6f3d('0x14')]+_0x2d403c[_0x6f3d('0x15')],_0x422a8d;if(_0x44766e>=_0x2d3487){_0x44766e=_0x2d3487;_0x422a8d=0xc8;}else{_0x422a8d=0xce;}_0x5441fe[_0x6f3d('0x11')](_0x422a8d);return _0x5441fe['set'](_0x6f3d('0x16'),_0x457277+'-'+_0x44766e+'/'+_0x2d3487)[_0x6f3d('0x12')](_0x19a37f);}return null;};}function patchUpdates(_0x36bb10){return function(_0x1b1985){try{jsonpatch['apply'](_0x1b1985,_0x36bb10,!![]);}catch(_0x3a431d){return BPromise['reject'](_0x3a431d);}return _0x1b1985['save']();};}function saveUpdates(_0x364ab5,_0xd09da1){return function(_0x3df059){if(_0x3df059){return _0x3df059[_0x6f3d('0x17')](_0x364ab5)['then'](function(_0x544282){return _0x544282;});}return null;};}function removeEntity(_0x25151a,_0x1b1ca5){return function(_0x1bbb07){if(_0x1bbb07){return _0x1bbb07['destroy']()[_0x6f3d('0x18')](function(){var _0x43b815=_0x1bbb07[_0x6f3d('0x19')]({'plain':!![]});var _0x4ac201=_0x6f3d('0x1a');return db[_0x6f3d('0x1b')][_0x6f3d('0x1c')]({'where':{'type':_0x4ac201,'resourceId':_0x43b815['id']}})[_0x6f3d('0x18')](function(){return _0x1bbb07;});})[_0x6f3d('0x18')](function(){_0x25151a[_0x6f3d('0x11')](0xcc)[_0x6f3d('0x10')]();});}};}function handleEntityNotFound(_0x24f4c4,_0x37ac2c){return function(_0x301ccb){if(!_0x301ccb){_0x24f4c4[_0x6f3d('0x1d')](0x194);}return _0x301ccb;};}function handleError(_0x2b87a4,_0x262340){_0x262340=_0x262340||0x1f4;return function(_0x53f905){logger['error'](_0x53f905[_0x6f3d('0x1e')]);if(_0x53f905[_0x6f3d('0x1f')]){delete _0x53f905[_0x6f3d('0x1f')];}_0x2b87a4['status'](_0x262340)[_0x6f3d('0x20')](_0x53f905);};}exports[_0x6f3d('0x21')]=function(_0x4548ed,_0x591e04){var _0x4833e9={},_0x28a40c={},_0xbd904f={'count':0x0,'rows':[]};var _0x53068d=db[_0x6f3d('0x22')][_0x6f3d('0x23')];_0x28a40c['model']=_[_0x6f3d('0x24')](_0x53068d);_0x28a40c[_0x6f3d('0x25')]=_[_0x6f3d('0x24')](_0x4548ed[_0x6f3d('0x25')]);_0x28a40c[_0x6f3d('0x26')]=_[_0x6f3d('0x27')](_0x28a40c[_0x6f3d('0x28')],_0x28a40c[_0x6f3d('0x25')]);_0x4833e9[_0x6f3d('0x29')]=_[_0x6f3d('0x27')](_0x28a40c[_0x6f3d('0x28')],qs[_0x6f3d('0x2a')](_0x4548ed[_0x6f3d('0x25')][_0x6f3d('0x2a')]));_0x4833e9[_0x6f3d('0x29')]=_0x4833e9['attributes'][_0x6f3d('0x2b')]?_0x4833e9['attributes']:_0x28a40c['model'];if(!_0x4548ed[_0x6f3d('0x25')]['hasOwnProperty'](_0x6f3d('0x2c'))){_0x4833e9[_0x6f3d('0x15')]=qs['limit'](_0x4548ed[_0x6f3d('0x25')][_0x6f3d('0x15')]);_0x4833e9['offset']=qs[_0x6f3d('0x14')](_0x4548ed[_0x6f3d('0x25')][_0x6f3d('0x14')]);}_0x4833e9[_0x6f3d('0x2d')]=qs[_0x6f3d('0x2e')](_0x4548ed[_0x6f3d('0x25')][_0x6f3d('0x2e')]);_0x4833e9[_0x6f3d('0x2f')]=qs['filters'](_[_0x6f3d('0x30')](_0x4548ed[_0x6f3d('0x25')],_0x28a40c[_0x6f3d('0x26')]));if(_0x4548ed[_0x6f3d('0x25')][_0x6f3d('0x31')]){_0x4833e9[_0x6f3d('0x2f')]=_[_0x6f3d('0x32')](_0x4833e9['where'],{'$or':_[_0x6f3d('0x33')](_0x53068d,function(_0x365b74){if(_0x365b74['type']['key']!==_0x6f3d('0x34')){var _0x2b11ab={};_0x2b11ab[_0x365b74[_0x6f3d('0x35')]]={'$like':'%'+_0x4548ed['query'][_0x6f3d('0x31')]+'%'};return _0x2b11ab;}})});}_0x4833e9=_[_0x6f3d('0x32')]({},_0x4833e9,_0x4548ed[_0x6f3d('0x36')]);var _0x13387e={'where':_0x4833e9[_0x6f3d('0x2f')]};return db[_0x6f3d('0x22')]['count'](_0x13387e)['then'](function(_0x45532f){_0xbd904f[_0x6f3d('0x13')]=_0x45532f;if(_0x4548ed[_0x6f3d('0x25')][_0x6f3d('0x37')]){_0x4833e9[_0x6f3d('0x38')]=[{'all':!![]}];}return db['CmCompany'][_0x6f3d('0x39')](_0x4833e9);})[_0x6f3d('0x18')](function(_0x4ab7a9){_0xbd904f[_0x6f3d('0x3a')]=_0x4ab7a9;return _0xbd904f;})[_0x6f3d('0x18')](respondWithFilteredResult(_0x591e04,_0x4833e9))[_0x6f3d('0x3b')](handleError(_0x591e04,null));};exports[_0x6f3d('0x3c')]=function(_0x3ed48d,_0x403f15){var _0x529216={'raw':![],'where':{'id':_0x3ed48d[_0x6f3d('0x3d')]['id']}},_0x1db317={};_0x1db317[_0x6f3d('0x28')]=_[_0x6f3d('0x24')](db[_0x6f3d('0x22')]['rawAttributes']);_0x1db317[_0x6f3d('0x25')]=_[_0x6f3d('0x24')](_0x3ed48d[_0x6f3d('0x25')]);_0x1db317[_0x6f3d('0x26')]=_[_0x6f3d('0x27')](_0x1db317['model'],_0x1db317[_0x6f3d('0x25')]);_0x529216[_0x6f3d('0x29')]=_['intersection'](_0x1db317[_0x6f3d('0x28')],qs['fields'](_0x3ed48d[_0x6f3d('0x25')][_0x6f3d('0x2a')]));_0x529216[_0x6f3d('0x29')]=_0x529216[_0x6f3d('0x29')][_0x6f3d('0x2b')]?_0x529216[_0x6f3d('0x29')]:_0x1db317['model'];if(_0x3ed48d[_0x6f3d('0x25')][_0x6f3d('0x37')]){_0x529216['include']=[{'all':!![]}];}_0x529216=_[_0x6f3d('0x32')]({},_0x529216,_0x3ed48d[_0x6f3d('0x36')]);return db[_0x6f3d('0x22')][_0x6f3d('0x3e')](_0x529216)[_0x6f3d('0x18')](handleEntityNotFound(_0x403f15,null))['then'](respondWithResult(_0x403f15,null))[_0x6f3d('0x3b')](handleError(_0x403f15,null));};exports['create']=function(_0x55703c,_0x3bdbda){return db[_0x6f3d('0x22')]['create'](_0x55703c[_0x6f3d('0x3f')],{})[_0x6f3d('0x18')](function(_0x4cc18f){var _0x52732f=_0x55703c[_0x6f3d('0x40')][_0x6f3d('0x19')]({'plain':!![]});if(!_0x52732f)throw new Error(_0x6f3d('0x41'));if(_0x52732f[_0x6f3d('0x42')]===_0x6f3d('0x40')){var _0x8d5c69=_0x4cc18f[_0x6f3d('0x19')]({'plain':!![]});var _0x3d9915=_0x6f3d('0x1a');return db[_0x6f3d('0x43')][_0x6f3d('0x3e')]({'where':{'name':_0x3d9915,'userProfileId':_0x52732f[_0x6f3d('0x44')]},'raw':!![]})[_0x6f3d('0x18')](function(_0x51819a){if(_0x51819a&&_0x51819a['autoAssociation']===0x0){return db[_0x6f3d('0x1b')][_0x6f3d('0x45')]({'name':_0x8d5c69['name'],'resourceId':_0x8d5c69['id'],'type':_0x51819a[_0x6f3d('0x1f')],'sectionId':_0x51819a['id']},{})[_0x6f3d('0x18')](function(){return _0x4cc18f;});}else{return _0x4cc18f;}})['catch'](function(_0x452db5){logger[_0x6f3d('0x46')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x452db5);throw _0x452db5;});}return _0x4cc18f;})[_0x6f3d('0x18')](respondWithResult(_0x3bdbda,0xc9))[_0x6f3d('0x3b')](handleError(_0x3bdbda,null));};exports[_0x6f3d('0x17')]=function(_0x36caca,_0x3b100f){if(_0x36caca['body']['id']){delete _0x36caca[_0x6f3d('0x3f')]['id'];}return db[_0x6f3d('0x22')][_0x6f3d('0x3e')]({'where':{'id':_0x36caca[_0x6f3d('0x3d')]['id']}})[_0x6f3d('0x18')](handleEntityNotFound(_0x3b100f,null))[_0x6f3d('0x18')](saveUpdates(_0x36caca[_0x6f3d('0x3f')],null))[_0x6f3d('0x18')](respondWithResult(_0x3b100f,null))[_0x6f3d('0x3b')](handleError(_0x3b100f,null));};exports[_0x6f3d('0x1c')]=function(_0x5bd413,_0xa2d944){return db[_0x6f3d('0x22')]['find']({'where':{'id':_0x5bd413['params']['id']}})['then'](handleEntityNotFound(_0xa2d944,null))[_0x6f3d('0x18')](removeEntity(_0xa2d944,null))[_0x6f3d('0x3b')](handleError(_0xa2d944,null));};exports[_0x6f3d('0x47')]=function(_0x20cf2b,_0x159572,_0x25b8c7){return db['CmContact']['find']({'where':{'id':_0x20cf2b['params']['id']}})['then'](handleEntityNotFound(_0x159572,null))[_0x6f3d('0x18')](function(_0x4c0750){if(_0x4c0750){return _0x4c0750[_0x6f3d('0x47')](_0x20cf2b[_0x6f3d('0x3f')]['ids'],_[_0x6f3d('0x48')](_0x20cf2b[_0x6f3d('0x3f')],[_0x6f3d('0x49'),'id'])||{});}})['then'](respondWithResult(_0x159572,null))[_0x6f3d('0x3b')](handleError(_0x159572,null));};exports[_0x6f3d('0x4a')]=function(_0x4c1675,_0x25e9d6,_0xe21281){var _0x5d1f5f={};var _0x2704ed={};var _0x136d47;var _0x3af1d2;return db[_0x6f3d('0x22')][_0x6f3d('0x4b')]({'where':{'id':_0x4c1675[_0x6f3d('0x3d')]['id']}})[_0x6f3d('0x18')](handleEntityNotFound(_0x25e9d6,null))[_0x6f3d('0x18')](function(_0x2af6fa){if(_0x2af6fa){_0x136d47=_0x2af6fa;_0x2704ed[_0x6f3d('0x28')]=_[_0x6f3d('0x24')](db[_0x6f3d('0x4c')][_0x6f3d('0x23')]);_0x2704ed[_0x6f3d('0x25')]=_[_0x6f3d('0x24')](_0x4c1675['query']);_0x2704ed[_0x6f3d('0x26')]=_[_0x6f3d('0x27')](_0x2704ed[_0x6f3d('0x28')],_0x2704ed['query']);_0x5d1f5f['attributes']=_[_0x6f3d('0x27')](_0x2704ed[_0x6f3d('0x28')],qs['fields'](_0x4c1675[_0x6f3d('0x25')]['fields']));_0x5d1f5f['attributes']=_0x5d1f5f[_0x6f3d('0x29')]['length']?_0x5d1f5f[_0x6f3d('0x29')]:_0x2704ed['model'];_0x5d1f5f[_0x6f3d('0x2d')]=qs[_0x6f3d('0x2e')](_0x4c1675['query'][_0x6f3d('0x2e')]);_0x5d1f5f['where']=qs[_0x6f3d('0x26')](_['pick'](_0x4c1675[_0x6f3d('0x25')],_0x2704ed[_0x6f3d('0x26')]));if(_0x4c1675['query'][_0x6f3d('0x31')]){_0x5d1f5f['where']=_['merge'](_0x5d1f5f[_0x6f3d('0x2f')],{'$or':_[_0x6f3d('0x33')](_0x5d1f5f['attributes'],function(_0x5ced62){var _0x807a40={};_0x807a40[_0x5ced62]={'$like':'%'+_0x4c1675['query'][_0x6f3d('0x31')]+'%'};return _0x807a40;})});}_0x5d1f5f=_[_0x6f3d('0x32')]({},_0x5d1f5f,_0x4c1675[_0x6f3d('0x36')]);return _0x136d47[_0x6f3d('0x4a')](_0x5d1f5f);}})[_0x6f3d('0x18')](function(_0xbc71df){if(_0xbc71df){_0x3af1d2=_0xbc71df[_0x6f3d('0x2b')];if(!_0x4c1675[_0x6f3d('0x25')][_0x6f3d('0x4d')]('nolimit')){_0x5d1f5f[_0x6f3d('0x15')]=qs[_0x6f3d('0x15')](_0x4c1675[_0x6f3d('0x25')]['limit']);_0x5d1f5f[_0x6f3d('0x14')]=qs[_0x6f3d('0x14')](_0x4c1675[_0x6f3d('0x25')][_0x6f3d('0x14')]);}return _0x136d47[_0x6f3d('0x4a')](_0x5d1f5f);}})[_0x6f3d('0x18')](function(_0x48e463){if(_0x48e463){return _0x48e463?{'count':_0x3af1d2,'rows':_0x48e463}:null;}})['then'](respondWithResult(_0x25e9d6,null))[_0x6f3d('0x3b')](handleError(_0x25e9d6,null));};
\ No newline at end of file
+var _0x66cd=['offset','status','set','Content-Range','apply','reject','update','then','destroy','get','Companies','UserProfileResource','end','stack','name','send','index','CmCompany','rawAttributes','keys','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','count','include','findAll','catch','show','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','addContacts','omit','getContacts','findOne','CmContact','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','sendStatus','json'];(function(_0x6118c8,_0x18a56f){var _0x2e16c9=function(_0x11fb3e){while(--_0x11fb3e){_0x6118c8['push'](_0x6118c8['shift']());}};_0x2e16c9(++_0x18a56f);}(_0x66cd,0xef));var _0xd66c=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x66cd[_0x4cf98e];return _0x1623ac;};'use strict';var pdf=require(_0xd66c('0x0'));var emlformat=require(_0xd66c('0x1'));var rimraf=require(_0xd66c('0x2'));var zipdir=require(_0xd66c('0x3'));var jsonpatch=require(_0xd66c('0x4'));var rp=require(_0xd66c('0x5'));var moment=require(_0xd66c('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xd66c('0x7'));var util=require('util');var path=require('path');var sox=require(_0xd66c('0x8'));var csv=require(_0xd66c('0x9'));var ejs=require(_0xd66c('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xd66c('0xb'));var crypto=require(_0xd66c('0xc'));var jsforce=require(_0xd66c('0xd'));var deskjs=require(_0xd66c('0xe'));var toCsv=require(_0xd66c('0x9'));var querystring=require(_0xd66c('0xf'));var Papa=require(_0xd66c('0x10'));var Redis=require(_0xd66c('0x11'));var authService=require(_0xd66c('0x12'));var qs=require(_0xd66c('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd66c('0x14'))(_0xd66c('0x15'));var utils=require('../../config/utils');var config=require(_0xd66c('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x28005b,_0x3652dc){_0x3652dc=_0x3652dc||0xcc;return function(_0x2b009b){if(_0x2b009b){return _0x28005b[_0xd66c('0x17')](_0x3652dc);}return _0x28005b['status'](_0x3652dc)['end']();};}function respondWithResult(_0x4aa1d3,_0x799071){_0x799071=_0x799071||0xc8;return function(_0x54d8be){if(_0x54d8be){return _0x4aa1d3['status'](_0x799071)[_0xd66c('0x18')](_0x54d8be);}};}function respondWithFilteredResult(_0x5f4c69,_0x5c66fa){return function(_0x20b1f0){if(_0x20b1f0){var _0x520382=_0x20b1f0['count'],_0x270a58=_0x5c66fa[_0xd66c('0x19')],_0x51df4a=_0x5c66fa[_0xd66c('0x19')]+_0x5c66fa['limit'],_0x2b9f77;if(_0x51df4a>=_0x520382){_0x51df4a=_0x520382;_0x2b9f77=0xc8;}else{_0x2b9f77=0xce;}_0x5f4c69[_0xd66c('0x1a')](_0x2b9f77);return _0x5f4c69[_0xd66c('0x1b')](_0xd66c('0x1c'),_0x270a58+'-'+_0x51df4a+'/'+_0x520382)[_0xd66c('0x18')](_0x20b1f0);}return null;};}function patchUpdates(_0x2e9eb5){return function(_0x10b0de){try{jsonpatch[_0xd66c('0x1d')](_0x10b0de,_0x2e9eb5,!![]);}catch(_0x25233f){return BPromise[_0xd66c('0x1e')](_0x25233f);}return _0x10b0de['save']();};}function saveUpdates(_0x2d3af0,_0x865a43){return function(_0x5b7f4){if(_0x5b7f4){return _0x5b7f4[_0xd66c('0x1f')](_0x2d3af0)[_0xd66c('0x20')](function(_0xb34e35){return _0xb34e35;});}return null;};}function removeEntity(_0x15cb05,_0xde95c6){return function(_0x4f1560){if(_0x4f1560){return _0x4f1560[_0xd66c('0x21')]()[_0xd66c('0x20')](function(){var _0x252335=_0x4f1560[_0xd66c('0x22')]({'plain':!![]});var _0x352df1=_0xd66c('0x23');return db[_0xd66c('0x24')][_0xd66c('0x21')]({'where':{'type':_0x352df1,'resourceId':_0x252335['id']}})['then'](function(){return _0x4f1560;});})[_0xd66c('0x20')](function(){_0x15cb05[_0xd66c('0x1a')](0xcc)[_0xd66c('0x25')]();});}};}function handleEntityNotFound(_0x24ca60,_0x389871){return function(_0x4e4b0a){if(!_0x4e4b0a){_0x24ca60[_0xd66c('0x17')](0x194);}return _0x4e4b0a;};}function handleError(_0x4aa687,_0x45341b){_0x45341b=_0x45341b||0x1f4;return function(_0x196050){logger['error'](_0x196050[_0xd66c('0x26')]);if(_0x196050['name']){delete _0x196050[_0xd66c('0x27')];}_0x4aa687[_0xd66c('0x1a')](_0x45341b)[_0xd66c('0x28')](_0x196050);};}exports[_0xd66c('0x29')]=function(_0x6fb715,_0x152bbb){var _0x84fa01={},_0xba85e7={},_0x2fb4f4={'count':0x0,'rows':[]};var _0x36f5f6=db[_0xd66c('0x2a')][_0xd66c('0x2b')];_0xba85e7['model']=_[_0xd66c('0x2c')](_0x36f5f6);_0xba85e7[_0xd66c('0x2d')]=_[_0xd66c('0x2c')](_0x6fb715[_0xd66c('0x2d')]);_0xba85e7[_0xd66c('0x2e')]=_[_0xd66c('0x2f')](_0xba85e7[_0xd66c('0x30')],_0xba85e7[_0xd66c('0x2d')]);_0x84fa01['attributes']=_[_0xd66c('0x2f')](_0xba85e7[_0xd66c('0x30')],qs[_0xd66c('0x31')](_0x6fb715[_0xd66c('0x2d')][_0xd66c('0x31')]));_0x84fa01[_0xd66c('0x32')]=_0x84fa01[_0xd66c('0x32')][_0xd66c('0x33')]?_0x84fa01[_0xd66c('0x32')]:_0xba85e7[_0xd66c('0x30')];if(!_0x6fb715['query'][_0xd66c('0x34')](_0xd66c('0x35'))){_0x84fa01[_0xd66c('0x36')]=qs[_0xd66c('0x36')](_0x6fb715['query'][_0xd66c('0x36')]);_0x84fa01[_0xd66c('0x19')]=qs['offset'](_0x6fb715[_0xd66c('0x2d')][_0xd66c('0x19')]);}_0x84fa01[_0xd66c('0x37')]=qs['sort'](_0x6fb715['query'][_0xd66c('0x38')]);_0x84fa01[_0xd66c('0x39')]=qs[_0xd66c('0x2e')](_[_0xd66c('0x3a')](_0x6fb715[_0xd66c('0x2d')],_0xba85e7[_0xd66c('0x2e')]));if(_0x6fb715['query'][_0xd66c('0x3b')]){_0x84fa01['where']=_[_0xd66c('0x3c')](_0x84fa01[_0xd66c('0x39')],{'$or':_[_0xd66c('0x3d')](_0x36f5f6,function(_0x22a86b){if(_0x22a86b[_0xd66c('0x3e')][_0xd66c('0x3f')]!==_0xd66c('0x40')){var _0x79b49f={};_0x79b49f[_0x22a86b[_0xd66c('0x41')]]={'$like':'%'+_0x6fb715['query'][_0xd66c('0x3b')]+'%'};return _0x79b49f;}})});}_0x84fa01=_[_0xd66c('0x3c')]({},_0x84fa01,_0x6fb715[_0xd66c('0x42')]);var _0x204265={'where':_0x84fa01['where']};return db[_0xd66c('0x2a')][_0xd66c('0x43')](_0x204265)[_0xd66c('0x20')](function(_0x478185){_0x2fb4f4[_0xd66c('0x43')]=_0x478185;if(_0x6fb715[_0xd66c('0x2d')]['includeAll']){_0x84fa01[_0xd66c('0x44')]=[{'all':!![]}];}return db['CmCompany'][_0xd66c('0x45')](_0x84fa01);})['then'](function(_0x1f93c5){_0x2fb4f4['rows']=_0x1f93c5;return _0x2fb4f4;})[_0xd66c('0x20')](respondWithFilteredResult(_0x152bbb,_0x84fa01))[_0xd66c('0x46')](handleError(_0x152bbb,null));};exports[_0xd66c('0x47')]=function(_0x195ceb,_0x48a902){var _0x24a6d2={'raw':![],'where':{'id':_0x195ceb['params']['id']}},_0x2aa649={};_0x2aa649[_0xd66c('0x30')]=_[_0xd66c('0x2c')](db[_0xd66c('0x2a')]['rawAttributes']);_0x2aa649[_0xd66c('0x2d')]=_[_0xd66c('0x2c')](_0x195ceb[_0xd66c('0x2d')]);_0x2aa649[_0xd66c('0x2e')]=_[_0xd66c('0x2f')](_0x2aa649[_0xd66c('0x30')],_0x2aa649['query']);_0x24a6d2['attributes']=_[_0xd66c('0x2f')](_0x2aa649[_0xd66c('0x30')],qs[_0xd66c('0x31')](_0x195ceb['query'][_0xd66c('0x31')]));_0x24a6d2['attributes']=_0x24a6d2[_0xd66c('0x32')][_0xd66c('0x33')]?_0x24a6d2[_0xd66c('0x32')]:_0x2aa649['model'];if(_0x195ceb[_0xd66c('0x2d')][_0xd66c('0x48')]){_0x24a6d2[_0xd66c('0x44')]=[{'all':!![]}];}_0x24a6d2=_['merge']({},_0x24a6d2,_0x195ceb['options']);return db['CmCompany'][_0xd66c('0x49')](_0x24a6d2)['then'](handleEntityNotFound(_0x48a902,null))[_0xd66c('0x20')](respondWithResult(_0x48a902,null))[_0xd66c('0x46')](handleError(_0x48a902,null));};exports[_0xd66c('0x4a')]=function(_0x55dbc3,_0x38ac86){return db[_0xd66c('0x2a')][_0xd66c('0x4a')](_0x55dbc3[_0xd66c('0x4b')],{})[_0xd66c('0x20')](function(_0x30768a){var _0x5cb5c2=_0x55dbc3[_0xd66c('0x4c')][_0xd66c('0x22')]({'plain':!![]});if(!_0x5cb5c2)throw new Error(_0xd66c('0x4d'));if(_0x5cb5c2[_0xd66c('0x4e')]===_0xd66c('0x4c')){var _0xafea2c=_0x30768a[_0xd66c('0x22')]({'plain':!![]});var _0x11836b=_0xd66c('0x23');return db[_0xd66c('0x4f')][_0xd66c('0x49')]({'where':{'name':_0x11836b,'userProfileId':_0x5cb5c2['userProfileId']},'raw':!![]})[_0xd66c('0x20')](function(_0x2580b8){if(_0x2580b8&&_0x2580b8['autoAssociation']===0x0){return db['UserProfileResource'][_0xd66c('0x4a')]({'name':_0xafea2c['name'],'resourceId':_0xafea2c['id'],'type':_0x2580b8[_0xd66c('0x27')],'sectionId':_0x2580b8['id']},{})[_0xd66c('0x20')](function(){return _0x30768a;});}else{return _0x30768a;}})[_0xd66c('0x46')](function(_0x309303){logger[_0xd66c('0x50')](_0xd66c('0x51'),_0x309303);throw _0x309303;});}return _0x30768a;})[_0xd66c('0x20')](respondWithResult(_0x38ac86,0xc9))[_0xd66c('0x46')](handleError(_0x38ac86,null));};exports[_0xd66c('0x1f')]=function(_0x22bb3d,_0x5429a9){if(_0x22bb3d[_0xd66c('0x4b')]['id']){delete _0x22bb3d[_0xd66c('0x4b')]['id'];}return db[_0xd66c('0x2a')][_0xd66c('0x49')]({'where':{'id':_0x22bb3d[_0xd66c('0x52')]['id']}})[_0xd66c('0x20')](handleEntityNotFound(_0x5429a9,null))[_0xd66c('0x20')](saveUpdates(_0x22bb3d[_0xd66c('0x4b')],null))[_0xd66c('0x20')](respondWithResult(_0x5429a9,null))[_0xd66c('0x46')](handleError(_0x5429a9,null));};exports[_0xd66c('0x21')]=function(_0x58084d,_0x4d964b){return db[_0xd66c('0x2a')][_0xd66c('0x49')]({'where':{'id':_0x58084d[_0xd66c('0x52')]['id']}})[_0xd66c('0x20')](handleEntityNotFound(_0x4d964b,null))[_0xd66c('0x20')](removeEntity(_0x4d964b,null))[_0xd66c('0x46')](handleError(_0x4d964b,null));};exports[_0xd66c('0x53')]=function(_0x1d67ee,_0x3d853d,_0x3ff1f7){return db['CmContact'][_0xd66c('0x49')]({'where':{'id':_0x1d67ee[_0xd66c('0x52')]['id']}})[_0xd66c('0x20')](handleEntityNotFound(_0x3d853d,null))[_0xd66c('0x20')](function(_0x4a7367){if(_0x4a7367){return _0x4a7367[_0xd66c('0x53')](_0x1d67ee['body']['ids'],_[_0xd66c('0x54')](_0x1d67ee['body'],['ids','id'])||{});}})['then'](respondWithResult(_0x3d853d,null))[_0xd66c('0x46')](handleError(_0x3d853d,null));};exports[_0xd66c('0x55')]=function(_0x523cd7,_0x5642c5,_0x2df46d){var _0x3dd65c={};var _0x1379a0={};var _0x216344;var _0x56c02f;return db['CmCompany'][_0xd66c('0x56')]({'where':{'id':_0x523cd7['params']['id']}})[_0xd66c('0x20')](handleEntityNotFound(_0x5642c5,null))['then'](function(_0x4235dd){if(_0x4235dd){_0x216344=_0x4235dd;_0x1379a0[_0xd66c('0x30')]=_[_0xd66c('0x2c')](db[_0xd66c('0x57')][_0xd66c('0x2b')]);_0x1379a0[_0xd66c('0x2d')]=_[_0xd66c('0x2c')](_0x523cd7['query']);_0x1379a0['filters']=_[_0xd66c('0x2f')](_0x1379a0[_0xd66c('0x30')],_0x1379a0[_0xd66c('0x2d')]);_0x3dd65c['attributes']=_['intersection'](_0x1379a0[_0xd66c('0x30')],qs['fields'](_0x523cd7['query'][_0xd66c('0x31')]));_0x3dd65c[_0xd66c('0x32')]=_0x3dd65c[_0xd66c('0x32')][_0xd66c('0x33')]?_0x3dd65c[_0xd66c('0x32')]:_0x1379a0[_0xd66c('0x30')];_0x3dd65c[_0xd66c('0x37')]=qs['sort'](_0x523cd7[_0xd66c('0x2d')][_0xd66c('0x38')]);_0x3dd65c['where']=qs[_0xd66c('0x2e')](_['pick'](_0x523cd7[_0xd66c('0x2d')],_0x1379a0[_0xd66c('0x2e')]));if(_0x523cd7[_0xd66c('0x2d')][_0xd66c('0x3b')]){_0x3dd65c[_0xd66c('0x39')]=_[_0xd66c('0x3c')](_0x3dd65c[_0xd66c('0x39')],{'$or':_[_0xd66c('0x3d')](_0x3dd65c['attributes'],function(_0x102cf5){var _0x2f165d={};_0x2f165d[_0x102cf5]={'$like':'%'+_0x523cd7[_0xd66c('0x2d')][_0xd66c('0x3b')]+'%'};return _0x2f165d;})});}_0x3dd65c=_[_0xd66c('0x3c')]({},_0x3dd65c,_0x523cd7[_0xd66c('0x42')]);return _0x216344[_0xd66c('0x55')](_0x3dd65c);}})[_0xd66c('0x20')](function(_0x2f2646){if(_0x2f2646){_0x56c02f=_0x2f2646['length'];if(!_0x523cd7[_0xd66c('0x2d')][_0xd66c('0x34')]('nolimit')){_0x3dd65c[_0xd66c('0x36')]=qs[_0xd66c('0x36')](_0x523cd7[_0xd66c('0x2d')][_0xd66c('0x36')]);_0x3dd65c[_0xd66c('0x19')]=qs['offset'](_0x523cd7[_0xd66c('0x2d')][_0xd66c('0x19')]);}return _0x216344[_0xd66c('0x55')](_0x3dd65c);}})[_0xd66c('0x20')](function(_0x360d39){if(_0x360d39){return _0x360d39?{'count':_0x56c02f,'rows':_0x360d39}:null;}})['then'](respondWithResult(_0x5642c5,null))[_0xd66c('0x46')](handleError(_0x5642c5,null));};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js
index cd1c833..175e40c 100644
--- a/server/api/cmCompany/cmCompany.model.js
+++ b/server/api/cmCompany/cmCompany.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x93e9=['moment','bluebird','request-promise','../../config/environment','./cmCompany.attributes','exports','define','CmCompany','cm_companies','lodash','util','../../config/logger','api'];(function(_0x25cdf3,_0x4321ad){var _0x60ca0=function(_0x3a71cc){while(--_0x3a71cc){_0x25cdf3['push'](_0x25cdf3['shift']());}};_0x60ca0(++_0x4321ad);}(_0x93e9,0xcc));var _0x993e=function(_0x24ec84,_0xf05dff){_0x24ec84=_0x24ec84-0x0;var _0x4f3167=_0x93e9[_0x24ec84];return _0x4f3167;};'use strict';var _=require(_0x993e('0x0'));var util=require(_0x993e('0x1'));var logger=require(_0x993e('0x2'))(_0x993e('0x3'));var moment=require(_0x993e('0x4'));var BPromise=require(_0x993e('0x5'));var rp=require(_0x993e('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x993e('0x7'));var attributes=require(_0x993e('0x8'));module[_0x993e('0x9')]=function(_0x45f52e,_0x1da414){return _0x45f52e[_0x993e('0xa')](_0x993e('0xb'),attributes,{'tableName':_0x993e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x02ce=['util','../../config/logger','moment','request-promise','path','rimraf','../../config/environment','./cmCompany.attributes','exports','define','lodash'];(function(_0x3a8b8c,_0x34d266){var _0x476c10=function(_0x1fec08){while(--_0x1fec08){_0x3a8b8c['push'](_0x3a8b8c['shift']());}};_0x476c10(++_0x34d266);}(_0x02ce,0x1ac));var _0xe02c=function(_0x5d2f93,_0x2b3c81){_0x5d2f93=_0x5d2f93-0x0;var _0xa1c2f4=_0x02ce[_0x5d2f93];return _0xa1c2f4;};'use strict';var _=require(_0xe02c('0x0'));var util=require(_0xe02c('0x1'));var logger=require(_0xe02c('0x2'))('api');var moment=require(_0xe02c('0x3'));var BPromise=require('bluebird');var rp=require(_0xe02c('0x4'));var fs=require('fs');var path=require(_0xe02c('0x5'));var rimraf=require(_0xe02c('0x6'));var config=require(_0xe02c('0x7'));var attributes=require(_0xe02c('0x8'));module[_0xe02c('0x9')]=function(_0x3f7436,_0x2b804f){return _0x3f7436[_0xe02c('0xa')]('CmCompany',attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.rpc.js b/server/api/cmCompany/cmCompany.rpc.js
index 6de86a1..41e6851 100644
--- a/server/api/cmCompany/cmCompany.rpc.js
+++ b/server/api/cmCompany/cmCompany.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3310=['lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','stringify','error','code','CmCompany,\x20%s,\x20%s','message','result'];(function(_0x263ad6,_0x316d30){var _0x2f90ce=function(_0x3b7eb6){while(--_0x3b7eb6){_0x263ad6['push'](_0x263ad6['shift']());}};_0x2f90ce(++_0x316d30);}(_0x3310,0x160));var _0x0331=function(_0x6f3354,_0x4ce5b4){_0x6f3354=_0x6f3354-0x0;var _0x12741a=_0x3310[_0x6f3354];return _0x12741a;};'use strict';var _=require(_0x0331('0x0'));var util=require('util');var moment=require(_0x0331('0x1'));var BPromise=require(_0x0331('0x2'));var rs=require(_0x0331('0x3'));var fs=require('fs');var Redis=require(_0x0331('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x0331('0x5'));var logger=require(_0x0331('0x6'))(_0x0331('0x7'));var config=require(_0x0331('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0331('0x9')][_0x0331('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x197e57,_0x2433f2,_0xfa80be){return new BPromise(function(_0x3732f7,_0x36c569){return client[_0x0331('0xb')](_0x197e57,_0xfa80be)[_0x0331('0xc')](function(_0x5e9555){logger[_0x0331('0xd')]('CmCompany,\x20%s,\x20%s',_0x2433f2,_0x0331('0xe'));logger[_0x0331('0xf')]('CmCompany,\x20%s,\x20%s,\x20%s',_0x2433f2,_0x0331('0xe'),JSON[_0x0331('0x10')](_0x5e9555));if(_0x5e9555[_0x0331('0x11')]){if(_0x5e9555[_0x0331('0x11')][_0x0331('0x12')]===0x1f4){logger['error'](_0x0331('0x13'),_0x2433f2,_0x5e9555['error'][_0x0331('0x14')]);return _0x36c569(_0x5e9555[_0x0331('0x11')]['message']);}logger[_0x0331('0x11')](_0x0331('0x13'),_0x2433f2,_0x5e9555['error']['message']);return _0x3732f7(_0x5e9555[_0x0331('0x11')][_0x0331('0x14')]);}else{logger['info']('CmCompany,\x20%s,\x20%s',_0x2433f2,_0x0331('0xe'));_0x3732f7(_0x5e9555[_0x0331('0x15')][_0x0331('0x14')]);}})['catch'](function(_0x5262c0){logger[_0x0331('0x11')](_0x0331('0x13'),_0x2433f2,_0x5262c0);_0x36c569(_0x5262c0);});});}
\ No newline at end of file
+var _0xcd4b=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','moment','randomstring'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0xcd4b,0xed));var _0xbcd4=function(_0x400d0f,_0x195810){_0x400d0f=_0x400d0f-0x0;var _0x2087ba=_0xcd4b[_0x400d0f];return _0x2087ba;};'use strict';var _=require(_0xbcd4('0x0'));var util=require('util');var moment=require(_0xbcd4('0x1'));var BPromise=require('bluebird');var rs=require(_0xbcd4('0x2'));var fs=require('fs');var Redis=require(_0xbcd4('0x3'));var db=require(_0xbcd4('0x4'))['db'];var utils=require(_0xbcd4('0x5'));var logger=require(_0xbcd4('0x6'))(_0xbcd4('0x7'));var config=require(_0xbcd4('0x8'));var jayson=require(_0xbcd4('0x9'));var client=jayson[_0xbcd4('0xa')][_0xbcd4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x44f722,_0x282a20,_0x151d45){return new BPromise(function(_0xa05a26,_0x59268f){return client[_0xbcd4('0xc')](_0x44f722,_0x151d45)[_0xbcd4('0xd')](function(_0x2105c3){logger[_0xbcd4('0xe')](_0xbcd4('0xf'),_0x282a20,_0xbcd4('0x10'));logger[_0xbcd4('0x11')](_0xbcd4('0x12'),_0x282a20,_0xbcd4('0x10'),JSON['stringify'](_0x2105c3));if(_0x2105c3[_0xbcd4('0x13')]){if(_0x2105c3[_0xbcd4('0x13')][_0xbcd4('0x14')]===0x1f4){logger[_0xbcd4('0x13')](_0xbcd4('0xf'),_0x282a20,_0x2105c3[_0xbcd4('0x13')][_0xbcd4('0x15')]);return _0x59268f(_0x2105c3['error'][_0xbcd4('0x15')]);}logger[_0xbcd4('0x13')](_0xbcd4('0xf'),_0x282a20,_0x2105c3['error'][_0xbcd4('0x15')]);return _0xa05a26(_0x2105c3[_0xbcd4('0x13')][_0xbcd4('0x15')]);}else{logger['info']('CmCompany,\x20%s,\x20%s',_0x282a20,_0xbcd4('0x10'));_0xa05a26(_0x2105c3[_0xbcd4('0x16')][_0xbcd4('0x15')]);}})[_0xbcd4('0x17')](function(_0x1b888e){logger[_0xbcd4('0x13')](_0xbcd4('0xf'),_0x282a20,_0x1b888e);_0x59268f(_0x1b888e);});});}
\ No newline at end of file
diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js
index dab7934..8049b85 100644
--- a/server/api/cmCompany/index.js
+++ b/server/api/cmCompany/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa941=['/:id/contacts','post','create','put','destroy','util','path','connect-timeout','express','Router','./cmCompany.controller','get','isAuthenticated','index','/:id'];(function(_0x591cc3,_0x351865){var _0x58419c=function(_0x3fab30){while(--_0x3fab30){_0x591cc3['push'](_0x591cc3['shift']());}};_0x58419c(++_0x351865);}(_0xa941,0x15e));var _0x1a94=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xa941[_0x40a045];return _0x1a687c;};'use strict';var multer=require('multer');var util=require(_0x1a94('0x0'));var path=require(_0x1a94('0x1'));var timeout=require(_0x1a94('0x2'));var express=require(_0x1a94('0x3'));var router=express[_0x1a94('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x1a94('0x5'));router[_0x1a94('0x6')]('/',auth[_0x1a94('0x7')](),controller[_0x1a94('0x8')]);router['get'](_0x1a94('0x9'),auth[_0x1a94('0x7')](),controller['show']);router[_0x1a94('0x6')](_0x1a94('0xa'),auth[_0x1a94('0x7')](),controller['getContacts']);router[_0x1a94('0xb')]('/',auth['isAuthenticated'](),controller[_0x1a94('0xc')]);router[_0x1a94('0xb')](_0x1a94('0xa'),auth[_0x1a94('0x7')](),controller['addContacts']);router[_0x1a94('0xd')](_0x1a94('0x9'),auth[_0x1a94('0x7')](),controller['update']);router['delete'](_0x1a94('0x9'),auth[_0x1a94('0x7')](),controller[_0x1a94('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0x882a=['delete','destroy','exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','get','index','/:id','isAuthenticated','show','/:id/contacts','getContacts','post','create','addContacts','put'];(function(_0xc65399,_0x4a1070){var _0x4829a9=function(_0x5606d4){while(--_0x5606d4){_0xc65399['push'](_0xc65399['shift']());}};_0x4829a9(++_0x4a1070);}(_0x882a,0xa3));var _0xa882=function(_0x17b8b0,_0xb9c0b9){_0x17b8b0=_0x17b8b0-0x0;var _0x354d9a=_0x882a[_0x17b8b0];return _0x354d9a;};'use strict';var multer=require(_0xa882('0x0'));var util=require('util');var path=require(_0xa882('0x1'));var timeout=require(_0xa882('0x2'));var express=require('express');var router=express[_0xa882('0x3')]();var auth=require(_0xa882('0x4'));var interaction=require(_0xa882('0x5'));var config=require('../../config/environment');var controller=require('./cmCompany.controller');router[_0xa882('0x6')]('/',auth['isAuthenticated'](),controller[_0xa882('0x7')]);router[_0xa882('0x6')](_0xa882('0x8'),auth[_0xa882('0x9')](),controller[_0xa882('0xa')]);router[_0xa882('0x6')](_0xa882('0xb'),auth[_0xa882('0x9')](),controller[_0xa882('0xc')]);router[_0xa882('0xd')]('/',auth[_0xa882('0x9')](),controller[_0xa882('0xe')]);router[_0xa882('0xd')](_0xa882('0xb'),auth['isAuthenticated'](),controller[_0xa882('0xf')]);router[_0xa882('0x10')](_0xa882('0x8'),auth['isAuthenticated'](),controller['update']);router[_0xa882('0x11')]('/:id',auth['isAuthenticated'](),controller[_0xa882('0x12')]);module[_0xa882('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js
index cc64401..ee4ff8a 100644
--- a/server/api/cmContact/cmContact.attributes.js
+++ b/server/api/cmContact/cmContact.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8d49=['NOW','lodash','sequelize','exports','STRING','TEXT','INTEGER','UNSIGNED'];(function(_0x162c7f,_0x3e5049){var _0x4c314c=function(_0x5230b5){while(--_0x5230b5){_0x162c7f['push'](_0x162c7f['shift']());}};_0x4c314c(++_0x3e5049);}(_0x8d49,0xc9));var _0x98d4=function(_0x462d88,_0xd0f5eb){_0x462d88=_0x462d88-0x0;var _0xc47fc1=_0x8d49[_0x462d88];return _0xc47fc1;};'use strict';var _=require(_0x98d4('0x0'));var Sequelize=require(_0x98d4('0x1'));module[_0x98d4('0x2')]={'firstName':{'type':Sequelize[_0x98d4('0x3')],'allowNull':![]},'lastName':{'type':Sequelize[_0x98d4('0x3')]},'street':{'type':Sequelize[_0x98d4('0x3')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x98d4('0x3')]},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize[_0x98d4('0x3')]},'description':{'type':Sequelize[_0x98d4('0x4')]},'phone':{'type':Sequelize[_0x98d4('0x3')]},'mobile':{'type':Sequelize[_0x98d4('0x3')]},'fax':{'type':Sequelize[_0x98d4('0x3')]},'email':{'type':Sequelize[_0x98d4('0x3')]},'url':{'type':Sequelize[_0x98d4('0x3')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize[_0x98d4('0x3')]},'skype':{'type':Sequelize[_0x98d4('0x3')]},'teams':{'type':Sequelize['STRING']},'viber':{'type':Sequelize[_0x98d4('0x3')]},'line':{'type':Sequelize[_0x98d4('0x3')]},'wechat':{'type':Sequelize[_0x98d4('0x3')]},'telegram':{'type':Sequelize[_0x98d4('0x3')]},'UserId':{'type':Sequelize[_0x98d4('0x5')]},'priority':{'type':Sequelize[_0x98d4('0x5')](0x2)[_0x98d4('0x6')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':Sequelize[_0x98d4('0x7')]}};
\ No newline at end of file
+var _0x74c1=['UNSIGNED','DATE','NOW','sequelize','STRING','TEXT','INTEGER'];(function(_0x4b4baf,_0xd15ea6){var _0xd2824c=function(_0x276012){while(--_0x276012){_0x4b4baf['push'](_0x4b4baf['shift']());}};_0xd2824c(++_0xd15ea6);}(_0x74c1,0xc7));var _0x174c=function(_0x156e9a,_0x12e50e){_0x156e9a=_0x156e9a-0x0;var _0x5f372c=_0x74c1[_0x156e9a];return _0x5f372c;};'use strict';var _=require('lodash');var Sequelize=require(_0x174c('0x0'));module['exports']={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize[_0x174c('0x1')]},'street':{'type':Sequelize[_0x174c('0x1')]},'postalCode':{'type':Sequelize[_0x174c('0x1')]},'city':{'type':Sequelize[_0x174c('0x1')]},'country':{'type':Sequelize[_0x174c('0x1')]},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x174c('0x2')]},'phone':{'type':Sequelize[_0x174c('0x1')]},'mobile':{'type':Sequelize[_0x174c('0x1')]},'fax':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x174c('0x1')]},'url':{'type':Sequelize[_0x174c('0x1')]},'facebook':{'type':Sequelize[_0x174c('0x1')]},'fb_data':{'type':Sequelize[_0x174c('0x1')]},'twitter':{'type':Sequelize[_0x174c('0x1')]},'skype':{'type':Sequelize[_0x174c('0x1')]},'teams':{'type':Sequelize[_0x174c('0x1')]},'viber':{'type':Sequelize[_0x174c('0x1')]},'line':{'type':Sequelize[_0x174c('0x1')]},'wechat':{'type':Sequelize[_0x174c('0x1')]},'telegram':{'type':Sequelize[_0x174c('0x1')]},'UserId':{'type':Sequelize[_0x174c('0x3')]},'priority':{'type':Sequelize[_0x174c('0x3')](0x2)[_0x174c('0x4')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x174c('0x5')],'defaultValue':Sequelize[_0x174c('0x6')]}};
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js
index dbbff4b..df55b54 100644
--- a/server/api/cmContact/cmContact.controller.js
+++ b/server/api/cmContact/cmContact.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3218=['ct.CmContactId\x20=\x20c.id','t.id\x20IN\x20?','sequelize','toString','keyBy','merge','c.*','t.id\x20=\x20ct.TagId','TagIds','Tags','split','destroy','find','params','catch','startsWith','cf_','columnName','displayName','custom','type','values','hasOwnProperty','body','findAll','get','mergeWith','tags','join','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','ChatOfflineMessage','MailMessage','MailInteraction','SmsInteraction','SmsMessage','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmHopperFinal','CmHopperHistory','ReportAgentPreview','VoiceCallReport','ChatQueueReport','MailQueueReport','OpenchannelQueueReport','JscriptySessionReport','duplicates','$or','push','ListId','spread','show','Tag','$and','omit','format','CmCustomField','cf_%d','table','setFields','toParam','text','getTags','findOne','intersection','setTags','ids','getHoppers','rawAttributes','pick','ContactId','includeAll','include','rows','getHopperHistories','options','getHopperFinals','getJscriptySessions','No\x20ListId\x20specified','binding_keys','No\x20association\x20values\x20specified!','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','Incorrect\x20binding\x20parameters\x20passed!','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','file','filename','chmodSync','child_process','fork','../../components/import/cm/csv','binding_values','CompanyId','socket_timestamp','File\x20uploaded\x20correctly!','createReadStream','import','agent','binding','../../components/import/cm/csv2','stringify','message','exit','error\x20child\x20process','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','ejs','lodash','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','redis','defaults','localhost','./cmContact.socket','register','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','error','stack','name','send','index','CmContact','describe','then','model','query','keys','filters','attributes','fields','length','nolimit','order','sort','where','select','field','color','from','tools_tags','cm_contacts','c.deletedAt\x20IS\x20NULL','advancedFilter','parse','forEach','condition','value','and','\x20=\x20?','LIKE','\x20LIKE\x20?','tableAlias','\x20>\x20?','\x20<\x20?','map','filter','isEmpty','c.ListId\x20IN\x20?','concat','replace','\x27\x27\x27\x27','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.fax\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','c.firstName\x20LIKE\x20?','c.lastName\x20LIKE\x20?','DESC','c.id','Sequelize','QueryTypes','clone','COUNT(*)','isArray','tag','expr','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','having','left_join','cm_contact_has_tags'];(function(_0x3ec17e,_0x52fc79){var _0x1e56d5=function(_0x2b3bf6){while(--_0x2b3bf6){_0x3ec17e['push'](_0x3ec17e['shift']());}};_0x1e56d5(++_0x52fc79);}(_0x3218,0x74));var _0x8321=function(_0x5db99b,_0xdee23a){_0x5db99b=_0x5db99b-0x0;var _0x4b2d0e=_0x3218[_0x5db99b];return _0x4b2d0e;};'use strict';var pdf=require(_0x8321('0x0'));var emlformat=require(_0x8321('0x1'));var rimraf=require(_0x8321('0x2'));var zipdir=require(_0x8321('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8321('0x4'));var moment=require(_0x8321('0x5'));var BPromise=require(_0x8321('0x6'));var Mustache=require(_0x8321('0x7'));var util=require('util');var path=require(_0x8321('0x8'));var sox=require(_0x8321('0x9'));var csv=require('to-csv');var ejs=require(_0x8321('0xa'));var fs=require('fs');var _=require(_0x8321('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x8321('0xc'));var toCsv=require(_0x8321('0xd'));var querystring=require('querystring');var Papa=require(_0x8321('0xe'));var Redis=require(_0x8321('0xf'));var authService=require(_0x8321('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x8321('0x11'));var logger=require('../../config/logger')(_0x8321('0x12'));var utils=require(_0x8321('0x13'));var config=require(_0x8321('0x14'));var db=require('../../mysqldb')['db'];config[_0x8321('0x15')]=_[_0x8321('0x16')](config[_0x8321('0x15')],{'host':_0x8321('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8321('0x15')]));require(_0x8321('0x18'))[_0x8321('0x19')](socket);function respondWithStatusCode(_0x4c9d41,_0xa0601d){_0xa0601d=_0xa0601d||0xcc;return function(_0x2a2bc6){if(_0x2a2bc6){return _0x4c9d41[_0x8321('0x1a')](_0xa0601d);}return _0x4c9d41[_0x8321('0x1b')](_0xa0601d)[_0x8321('0x1c')]();};}function respondWithResult(_0x45b8ac,_0x2b9120){_0x2b9120=_0x2b9120||0xc8;return function(_0x43d7f8){if(_0x43d7f8){return _0x45b8ac[_0x8321('0x1b')](_0x2b9120)[_0x8321('0x1d')](_0x43d7f8);}};}function respondWithFilteredResult(_0x4dbd34,_0x307f56){return function(_0x3daccd){if(_0x3daccd){var _0x29ed78=_0x3daccd[_0x8321('0x1e')],_0x2d1ce1=_0x307f56[_0x8321('0x1f')],_0x2be60b=_0x307f56['offset']+_0x307f56[_0x8321('0x20')],_0x1fe43d;if(_0x2be60b>=_0x29ed78){_0x2be60b=_0x29ed78;_0x1fe43d=0xc8;}else{_0x1fe43d=0xce;}_0x4dbd34['status'](_0x1fe43d);return _0x4dbd34[_0x8321('0x21')](_0x8321('0x22'),_0x2d1ce1+'-'+_0x2be60b+'/'+_0x29ed78)[_0x8321('0x1d')](_0x3daccd);}return null;};}function patchUpdates(_0x83230f){return function(_0x42f417){try{jsonpatch[_0x8321('0x23')](_0x42f417,_0x83230f,!![]);}catch(_0x1187d4){return BPromise[_0x8321('0x24')](_0x1187d4);}return _0x42f417['save']();};}function saveUpdates(_0xb1fce6,_0x28aed4){return function(_0x1773ca){if(_0x1773ca){return _0x1773ca[_0x8321('0x25')](_0xb1fce6)['then'](function(_0x45375f){return _0x45375f;});}return null;};}function removeEntity(_0x511366,_0x557c58){return function(_0x514a99){if(_0x514a99){return _0x514a99['destroy']()['then'](function(){_0x511366['status'](0xcc)[_0x8321('0x1c')]();});}};}function handleEntityNotFound(_0x59087e,_0x17ccbc){return function(_0x39ccaa){if(!_0x39ccaa){_0x59087e['sendStatus'](0x194);}return _0x39ccaa;};}function handleError(_0x5e5ef1,_0x5b3214){_0x5b3214=_0x5b3214||0x1f4;return function(_0x4eb763){logger[_0x8321('0x26')](_0x4eb763[_0x8321('0x27')]);if(_0x4eb763[_0x8321('0x28')]){delete _0x4eb763['name'];}_0x5e5ef1[_0x8321('0x1b')](_0x5b3214)[_0x8321('0x29')](_0x4eb763);};}exports[_0x8321('0x2a')]=function(_0x5083ec,_0x27a77b){var _0x3fd92f={},_0x34c83e={},_0x278db2={'count':0x0,'rows':[]};return db[_0x8321('0x2b')][_0x8321('0x2c')]()[_0x8321('0x2d')](function(_0x28d13c){_0x34c83e[_0x8321('0x2e')]=_['keys'](_0x28d13c);_0x34c83e[_0x8321('0x2f')]=_[_0x8321('0x30')](_0x5083ec[_0x8321('0x2f')]);_0x34c83e[_0x8321('0x31')]=_['intersection'](_0x34c83e[_0x8321('0x2e')],_0x34c83e[_0x8321('0x2f')]);_0x3fd92f[_0x8321('0x32')]=_['intersection'](_0x34c83e[_0x8321('0x2e')],qs['fields'](_0x5083ec[_0x8321('0x2f')][_0x8321('0x33')]));_0x3fd92f[_0x8321('0x32')]=_0x3fd92f[_0x8321('0x32')][_0x8321('0x34')]?_0x3fd92f['attributes']:_0x34c83e[_0x8321('0x2e')];if(!_0x5083ec['query']['hasOwnProperty'](_0x8321('0x35'))){_0x3fd92f['limit']=qs['limit'](_0x5083ec[_0x8321('0x2f')][_0x8321('0x20')]);_0x3fd92f[_0x8321('0x1f')]=qs['offset'](_0x5083ec[_0x8321('0x2f')][_0x8321('0x1f')]);}_0x3fd92f[_0x8321('0x36')]=qs['sort'](_0x5083ec[_0x8321('0x2f')][_0x8321('0x37')]);_0x3fd92f[_0x8321('0x38')]=qs[_0x8321('0x31')](_['pick'](_0x5083ec['query'],_0x34c83e[_0x8321('0x31')]));var _0x1118b9=[];var _0x5315b7=squel[_0x8321('0x39')]()[_0x8321('0x3a')]('id')[_0x8321('0x3a')](_0x8321('0x28'))[_0x8321('0x3a')](_0x8321('0x3b'))[_0x8321('0x3c')](_0x8321('0x3d'));var _0x599243=squel[_0x8321('0x39')]()[_0x8321('0x3c')](_0x8321('0x3e'),'c')[_0x8321('0x38')](_0x8321('0x3f'));var _0x19bd50=squel['expr']();if(_0x5083ec['query'][_0x8321('0x40')]){var _0x5be2a4=JSON[_0x8321('0x41')](_0x5083ec[_0x8321('0x2f')][_0x8321('0x40')]);_['keys'](_0x5be2a4)[_0x8321('0x42')](function(_0x4c2939){var _0x46fda5=_0x5be2a4[_0x4c2939];switch(_0x46fda5[_0x8321('0x43')]){case'IS':if(_['isArray'](_0x46fda5[_0x8321('0x44')])&&_0x46fda5[_0x8321('0x44')][_0x8321('0x34')]>0x1){_0x19bd50[_0x8321('0x45')](_0x46fda5['tableAlias']+'.'+_0x4c2939+'\x20IN\x20?',_0x46fda5[_0x8321('0x44')]);}else{_0x19bd50[_0x8321('0x45')](_0x46fda5['tableAlias']+'.'+_0x4c2939+_0x8321('0x46'),_0x46fda5['value'][0x0]);}break;case'=':_0x19bd50[_0x8321('0x45')](_0x46fda5['tableAlias']+'.'+_0x4c2939+_0x8321('0x46'),_0x46fda5[_0x8321('0x44')]);break;case _0x8321('0x47'):_0x19bd50[_0x8321('0x45')](_0x46fda5['tableAlias']+'.'+_0x4c2939+_0x8321('0x48'),'%'+_0x46fda5['value']+'%');break;case'>':_0x19bd50[_0x8321('0x45')](_0x46fda5[_0x8321('0x49')]+'.'+_0x4c2939+_0x8321('0x4a'),_0x46fda5[_0x8321('0x44')]);break;case'<':_0x19bd50[_0x8321('0x45')](_0x46fda5[_0x8321('0x49')]+'.'+_0x4c2939+_0x8321('0x4b'),_0x46fda5['value']);break;}});}else{var _0x51ded3=_(Object[_0x8321('0x30')](_0x5083ec[_0x8321('0x2f')]))[_0x8321('0x4c')](function(_0x2ca6f6){return _0x28d13c['hasOwnProperty'](_0x2ca6f6)?_0x2ca6f6:undefined;})[_0x8321('0x4d')](function(_0x1440a9){return!_['isNil'](_0x1440a9);})[_0x8321('0x44')]();if(!_[_0x8321('0x4e')](_0x51ded3)){_0x51ded3[_0x8321('0x42')](function(_0x5d53e5){if(_0x5d53e5==='ListId'){_0x599243[_0x8321('0x38')](_0x8321('0x4f'),[][_0x8321('0x50')](_0x5083ec['query'][_0x5d53e5]));}else{_0x599243['where']('c.'+_0x5d53e5+'\x20=\x20?',_0x5083ec[_0x8321('0x2f')][_0x5d53e5]);}});}if(_0x5083ec['query'][_0x8321('0x4d')]){var _0x3cbb0d=_0x5083ec[_0x8321('0x2f')]['filter'][_0x8321('0x51')]('\x5c','\x5c\x5c')[_0x8321('0x51')]('\x27\x27',_0x8321('0x52'));if(qs[_0x8321('0x53')](_0x3cbb0d)){_0x19bd50['or'](_0x8321('0x54'),_0x3cbb0d+'%');_0x19bd50['or'](_0x8321('0x55'),_0x3cbb0d+'%');_0x19bd50['or'](_0x8321('0x56'),_0x3cbb0d+'%');_0x19bd50['or'](_0x8321('0x57'),_0x3cbb0d+'%');}else if(qs[_0x8321('0x58')](_0x3cbb0d)){_0x19bd50['or'](_0x8321('0x59'),_0x3cbb0d+'%');}else{_0x19bd50['or'](_0x8321('0x59'),_0x3cbb0d+'%');_0x19bd50['or'](_0x8321('0x5a'),_0x3cbb0d+'%');_0x19bd50['or'](_0x8321('0x5b'),_0x3cbb0d+'%');}}}_0x599243['where'](_0x19bd50);if(_0x3fd92f['order']){_0x3fd92f[_0x8321('0x36')][_0x8321('0x42')](function(_0x505c4a){_0x599243[_0x8321('0x36')]('c.'+_0x505c4a[0x0],_0x505c4a[0x1]===_0x8321('0x5c')?![]:!![]);});}_0x599243['group'](_0x8321('0x5d'));var _0x5e27b2={'type':db[_0x8321('0x5e')][_0x8321('0x5f')]['SELECT'],'raw':!![]};var _0x1f40d8=_0x599243[_0x8321('0x60')]()[_0x8321('0x3a')](_0x8321('0x61'));if(!_0x5083ec[_0x8321('0x2f')][_0x8321('0x40')]){if(_0x5083ec[_0x8321('0x2f')]['tag']){var _0x1c3d80=_[_0x8321('0x62')](_0x5083ec[_0x8321('0x2f')][_0x8321('0x63')])?_0x5083ec[_0x8321('0x2f')]['tag']:new Array(_0x5083ec['query'][_0x8321('0x63')]);var _0x266bd9=squel[_0x8321('0x64')]();_0x1c3d80[_0x8321('0x42')](function(_0x44f576){_0x266bd9['or'](_0x8321('0x65'),'%,'+_0x44f576+',%');});_0x599243[_0x8321('0x66')](_0x266bd9);_0x1f40d8[_0x8321('0x67')](_0x8321('0x68'),'ct',_0x8321('0x69'));_0x1f40d8[_0x8321('0x67')](_0x8321('0x3d'),'t','t.id\x20=\x20ct.TagId');_0x1f40d8['where'](_0x8321('0x6a'),_0x1c3d80);}}db[_0x8321('0x6b')][_0x8321('0x2f')](_0x5315b7[_0x8321('0x6c')](),_0x5e27b2)[_0x8321('0x2d')](function(_0x1c20ac){_0x1118b9=_[_0x8321('0x6d')](_0x1c20ac,'id');return db[_0x8321('0x6b')]['query'](_0x1f40d8[_0x8321('0x6c')](),_0x5e27b2);})[_0x8321('0x2d')](function(_0x460add){_0x278db2['count']=_0x460add[_0x8321('0x34')];_0x5e27b2=_[_0x8321('0x6e')](_0x5e27b2,{'model':db[_0x8321('0x2b')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x599243[_0x8321('0x3a')](_0x8321('0x6f'));_0x599243[_0x8321('0x3a')]('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds');_0x599243[_0x8321('0x67')](_0x8321('0x68'),'ct',_0x8321('0x69'));_0x599243[_0x8321('0x67')](_0x8321('0x3d'),'t',_0x8321('0x70'));if(_0x3fd92f[_0x8321('0x20')]){_0x599243[_0x8321('0x20')](_0x3fd92f['limit']);}if(_0x3fd92f[_0x8321('0x1f')]){_0x599243[_0x8321('0x1f')](_0x3fd92f[_0x8321('0x1f')]);}db[_0x8321('0x6b')][_0x8321('0x2f')](_0x599243[_0x8321('0x6c')](),_0x5e27b2)['then'](function(_0x422906){_0x422906[_0x8321('0x42')](function(_0x301df9){if(_0x301df9[_0x8321('0x71')]){_0x301df9[_0x8321('0x72')]=[];_0x301df9[_0x8321('0x71')][_0x8321('0x73')](',')[_0x8321('0x42')](function(_0x2de5d1){_0x301df9[_0x8321('0x72')]['push'](_0x1118b9[_0x2de5d1]);});}delete _0x301df9[_0x8321('0x71')];});_0x278db2['rows']=_0x422906;return _0x278db2;})['then'](respondWithFilteredResult(_0x27a77b,_0x3fd92f))['catch'](handleError(_0x27a77b,null));});});};exports[_0x8321('0x74')]=function(_0x1dce2d,_0xc8ece7){return db[_0x8321('0x2b')][_0x8321('0x75')]({'where':{'id':_0x1dce2d[_0x8321('0x76')]['id']}})[_0x8321('0x2d')](handleEntityNotFound(_0xc8ece7,null))[_0x8321('0x2d')](removeEntity(_0xc8ece7,null))[_0x8321('0x77')](handleError(_0xc8ece7,null));};exports[_0x8321('0x2c')]=function(_0x2406a1,_0x35a9d4){return db[_0x8321('0x2b')]['describe']()[_0x8321('0x2d')](function(_0x514a2a){for(var _0x157220=0x0;_0x157220\x20?','filter','isNil','isEmpty','ListId','c.ListId\x20IN\x20?','concat','replace','\x27\x27\x27\x27','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.fax\x20LIKE\x20?','c.email\x20LIKE\x20?','DESC','group','Sequelize','SELECT','COUNT(*)','tag','expr','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','having','left_join','cm_contact_has_tags','ct.CmContactId\x20=\x20c.id','t.id\x20=\x20ct.TagId','t.id\x20IN\x20?','sequelize','keyBy','toString','merge','c.*','GROUP_CONCAT(DISTINCT\x20t.id)','TagIds','Tags','split','push','catch','find','cf_','CmCustomField','findAll','columnName','displayName','alias','custom','type','body','get','mergeWith','tags','join','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','ChatInteraction','ChatMessage','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmHopperFinal','CmHopperHistory','ReportAgentPreview','VoiceCallReport','ChatQueueReport','FaxQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','create','bulkCreate','duplicates','$or','findOrCreate','error','show','params','Tag','$and','map','format','omit','pickBy','startsWith','cf_%d','table','setFields','id\x20=\x20?','toParam','text','values','phone','findOne','rawAttributes','options','getTags','setTags','ids','getHoppers','ContactId','includeAll','rows','getHopperHistories','include','getHopperFinals','uploadCsv','No\x20ListId\x20specified','No\x20association\x20keys\x20specified!','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','binding_values','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','file','chmodSync','0777','child_process','../../components/import/cm/csv','binding_keys','File\x20uploaded\x20correctly!','meta','import'];(function(_0x151518,_0x4519bd){var _0x1517e6=function(_0x2f51c2){while(--_0x2f51c2){_0x151518['push'](_0x151518['shift']());}};_0x1517e6(++_0x4519bd);}(_0x9b71,0xed));var _0x19b7=function(_0x3215f3,_0x9becf1){_0x3215f3=_0x3215f3-0x0;var _0x5ea89a=_0x9b71[_0x3215f3];return _0x5ea89a;};'use strict';var pdf=require(_0x19b7('0x0'));var emlformat=require(_0x19b7('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x19b7('0x2'));var jsonpatch=require(_0x19b7('0x3'));var rp=require(_0x19b7('0x4'));var moment=require(_0x19b7('0x5'));var BPromise=require(_0x19b7('0x6'));var Mustache=require(_0x19b7('0x7'));var util=require(_0x19b7('0x8'));var path=require(_0x19b7('0x9'));var sox=require(_0x19b7('0xa'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x19b7('0xb'));var crypto=require(_0x19b7('0xc'));var jsforce=require(_0x19b7('0xd'));var deskjs=require(_0x19b7('0xe'));var toCsv=require(_0x19b7('0xf'));var querystring=require(_0x19b7('0x10'));var Papa=require('papaparse');var Redis=require(_0x19b7('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x19b7('0x12'));var hardwareService=require(_0x19b7('0x13'));var logger=require(_0x19b7('0x14'))(_0x19b7('0x15'));var utils=require(_0x19b7('0x16'));var config=require('../../config/environment');var db=require(_0x19b7('0x17'))['db'];config[_0x19b7('0x18')]=_[_0x19b7('0x19')](config[_0x19b7('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x19b7('0x1a'))(new Redis(config[_0x19b7('0x18')]));require('./cmContact.socket')['register'](socket);function respondWithStatusCode(_0xde0428,_0x3a6a59){_0x3a6a59=_0x3a6a59||0xcc;return function(_0x590080){if(_0x590080){return _0xde0428[_0x19b7('0x1b')](_0x3a6a59);}return _0xde0428['status'](_0x3a6a59)[_0x19b7('0x1c')]();};}function respondWithResult(_0x518d7c,_0x138215){_0x138215=_0x138215||0xc8;return function(_0x273a51){if(_0x273a51){return _0x518d7c[_0x19b7('0x1d')](_0x138215)[_0x19b7('0x1e')](_0x273a51);}};}function respondWithFilteredResult(_0xda5966,_0x165f42){return function(_0x18c7eb){if(_0x18c7eb){var _0x4e3b03=_0x18c7eb[_0x19b7('0x1f')],_0x2d8ad3=_0x165f42[_0x19b7('0x20')],_0x3458f8=_0x165f42['offset']+_0x165f42[_0x19b7('0x21')],_0x45f727;if(_0x3458f8>=_0x4e3b03){_0x3458f8=_0x4e3b03;_0x45f727=0xc8;}else{_0x45f727=0xce;}_0xda5966[_0x19b7('0x1d')](_0x45f727);return _0xda5966[_0x19b7('0x22')](_0x19b7('0x23'),_0x2d8ad3+'-'+_0x3458f8+'/'+_0x4e3b03)['json'](_0x18c7eb);}return null;};}function patchUpdates(_0x20d9d5){return function(_0x307d73){try{jsonpatch['apply'](_0x307d73,_0x20d9d5,!![]);}catch(_0x175fe0){return BPromise[_0x19b7('0x24')](_0x175fe0);}return _0x307d73[_0x19b7('0x25')]();};}function saveUpdates(_0x3e2bd0,_0x2df4a0){return function(_0x532fa6){if(_0x532fa6){return _0x532fa6[_0x19b7('0x26')](_0x3e2bd0)[_0x19b7('0x27')](function(_0x28e9da){return _0x28e9da;});}return null;};}function removeEntity(_0x45ec52,_0x1e4f97){return function(_0x43a5d9){if(_0x43a5d9){return _0x43a5d9[_0x19b7('0x28')]()[_0x19b7('0x27')](function(){_0x45ec52[_0x19b7('0x1d')](0xcc)[_0x19b7('0x1c')]();});}};}function handleEntityNotFound(_0x6e00c8,_0x22b194){return function(_0x1f0af9){if(!_0x1f0af9){_0x6e00c8[_0x19b7('0x1b')](0x194);}return _0x1f0af9;};}function handleError(_0x2f0665,_0x573ae6){_0x573ae6=_0x573ae6||0x1f4;return function(_0x590069){logger['error'](_0x590069[_0x19b7('0x29')]);if(_0x590069[_0x19b7('0x2a')]){delete _0x590069[_0x19b7('0x2a')];}_0x2f0665[_0x19b7('0x1d')](_0x573ae6)[_0x19b7('0x2b')](_0x590069);};}exports[_0x19b7('0x2c')]=function(_0x4303b1,_0x32cae6){var _0x50c880={},_0x77a542={},_0x242ef0={'count':0x0,'rows':[]};return db[_0x19b7('0x2d')][_0x19b7('0x2e')]()[_0x19b7('0x27')](function(_0x176bb1){_0x77a542[_0x19b7('0x2f')]=_[_0x19b7('0x30')](_0x176bb1);_0x77a542['query']=_[_0x19b7('0x30')](_0x4303b1[_0x19b7('0x31')]);_0x77a542['filters']=_[_0x19b7('0x32')](_0x77a542[_0x19b7('0x2f')],_0x77a542['query']);_0x50c880[_0x19b7('0x33')]=_[_0x19b7('0x32')](_0x77a542[_0x19b7('0x2f')],qs['fields'](_0x4303b1[_0x19b7('0x31')][_0x19b7('0x34')]));_0x50c880[_0x19b7('0x33')]=_0x50c880[_0x19b7('0x33')]['length']?_0x50c880[_0x19b7('0x33')]:_0x77a542[_0x19b7('0x2f')];if(!_0x4303b1['query'][_0x19b7('0x35')](_0x19b7('0x36'))){_0x50c880['limit']=qs[_0x19b7('0x21')](_0x4303b1[_0x19b7('0x31')]['limit']);_0x50c880[_0x19b7('0x20')]=qs[_0x19b7('0x20')](_0x4303b1[_0x19b7('0x31')][_0x19b7('0x20')]);}_0x50c880[_0x19b7('0x37')]=qs[_0x19b7('0x38')](_0x4303b1[_0x19b7('0x31')]['sort']);_0x50c880['where']=qs['filters'](_[_0x19b7('0x39')](_0x4303b1[_0x19b7('0x31')],_0x77a542[_0x19b7('0x3a')]));var _0x406f00=[];var _0x18af98=squel[_0x19b7('0x3b')]()['field']('id')[_0x19b7('0x3c')](_0x19b7('0x2a'))[_0x19b7('0x3c')](_0x19b7('0x3d'))[_0x19b7('0x3e')](_0x19b7('0x3f'));var _0x15b564=squel['select']()['from'](_0x19b7('0x40'),'c')[_0x19b7('0x41')](_0x19b7('0x42'));var _0x40e269=squel['expr']();if(_0x4303b1[_0x19b7('0x31')][_0x19b7('0x43')]){var _0x58c122=JSON[_0x19b7('0x44')](_0x4303b1[_0x19b7('0x31')][_0x19b7('0x43')]);_['keys'](_0x58c122)[_0x19b7('0x45')](function(_0x176299){var _0x5c2e51=_0x58c122[_0x176299];switch(_0x5c2e51[_0x19b7('0x46')]){case'IS':if(_[_0x19b7('0x47')](_0x5c2e51[_0x19b7('0x48')])&&_0x5c2e51[_0x19b7('0x48')][_0x19b7('0x49')]>0x1){_0x40e269[_0x19b7('0x4a')](_0x5c2e51[_0x19b7('0x4b')]+'.'+_0x176299+_0x19b7('0x4c'),_0x5c2e51['value']);}else{_0x40e269[_0x19b7('0x4a')](_0x5c2e51[_0x19b7('0x4b')]+'.'+_0x176299+_0x19b7('0x4d'),_0x5c2e51[_0x19b7('0x48')][0x0]);}break;case'=':_0x40e269[_0x19b7('0x4a')](_0x5c2e51[_0x19b7('0x4b')]+'.'+_0x176299+_0x19b7('0x4d'),_0x5c2e51[_0x19b7('0x48')]);break;case _0x19b7('0x4e'):_0x40e269[_0x19b7('0x4a')](_0x5c2e51[_0x19b7('0x4b')]+'.'+_0x176299+_0x19b7('0x4f'),'%'+_0x5c2e51[_0x19b7('0x48')]+'%');break;case'>':_0x40e269[_0x19b7('0x4a')](_0x5c2e51[_0x19b7('0x4b')]+'.'+_0x176299+_0x19b7('0x50'),_0x5c2e51[_0x19b7('0x48')]);break;case'<':_0x40e269['and'](_0x5c2e51[_0x19b7('0x4b')]+'.'+_0x176299+'\x20<\x20?',_0x5c2e51[_0x19b7('0x48')]);break;}});}else{var _0x47dadf=_(Object[_0x19b7('0x30')](_0x4303b1[_0x19b7('0x31')]))['map'](function(_0x36a582){return _0x176bb1['hasOwnProperty'](_0x36a582)?_0x36a582:undefined;})[_0x19b7('0x51')](function(_0x3cb231){return!_[_0x19b7('0x52')](_0x3cb231);})[_0x19b7('0x48')]();if(!_[_0x19b7('0x53')](_0x47dadf)){_0x47dadf[_0x19b7('0x45')](function(_0x97198b){if(_0x97198b===_0x19b7('0x54')){_0x15b564[_0x19b7('0x41')](_0x19b7('0x55'),[][_0x19b7('0x56')](_0x4303b1[_0x19b7('0x31')][_0x97198b]));}else{_0x15b564[_0x19b7('0x41')]('c.'+_0x97198b+_0x19b7('0x4d'),_0x4303b1[_0x19b7('0x31')][_0x97198b]);}});}if(_0x4303b1['query']['filter']){var _0x34da2a=_0x4303b1[_0x19b7('0x31')]['filter'][_0x19b7('0x57')]('\x5c','\x5c\x5c')[_0x19b7('0x57')]('\x27\x27',_0x19b7('0x58'));if(qs[_0x19b7('0x59')](_0x34da2a)){_0x40e269['or'](_0x19b7('0x5a'),_0x34da2a+'%');_0x40e269['or'](_0x19b7('0x5b'),_0x34da2a+'%');_0x40e269['or'](_0x19b7('0x5c'),_0x34da2a+'%');_0x40e269['or'](_0x19b7('0x5d'),_0x34da2a+'%');}else if(qs['isEmail'](_0x34da2a)){_0x40e269['or'](_0x19b7('0x5e'),_0x34da2a+'%');}else{_0x40e269['or'](_0x19b7('0x5e'),_0x34da2a+'%');_0x40e269['or']('c.firstName\x20LIKE\x20?',_0x34da2a+'%');_0x40e269['or']('c.lastName\x20LIKE\x20?',_0x34da2a+'%');}}}_0x15b564[_0x19b7('0x41')](_0x40e269);if(_0x50c880[_0x19b7('0x37')]){_0x50c880[_0x19b7('0x37')]['forEach'](function(_0x2e9fc2){_0x15b564[_0x19b7('0x37')]('c.'+_0x2e9fc2[0x0],_0x2e9fc2[0x1]===_0x19b7('0x5f')?![]:!![]);});}_0x15b564[_0x19b7('0x60')]('c.id');var _0x509f26={'type':db[_0x19b7('0x61')]['QueryTypes'][_0x19b7('0x62')],'raw':!![]};var _0x1278ea=_0x15b564['clone']()[_0x19b7('0x3c')](_0x19b7('0x63'));if(!_0x4303b1['query'][_0x19b7('0x43')]){if(_0x4303b1[_0x19b7('0x31')]['tag']){var _0x447721=_[_0x19b7('0x47')](_0x4303b1[_0x19b7('0x31')]['tag'])?_0x4303b1[_0x19b7('0x31')][_0x19b7('0x64')]:new Array(_0x4303b1[_0x19b7('0x31')][_0x19b7('0x64')]);var _0xe328da=squel[_0x19b7('0x65')]();_0x447721['forEach'](function(_0x2025f1){_0xe328da['or'](_0x19b7('0x66'),'%,'+_0x2025f1+',%');});_0x15b564[_0x19b7('0x67')](_0xe328da);_0x1278ea[_0x19b7('0x68')](_0x19b7('0x69'),'ct',_0x19b7('0x6a'));_0x1278ea[_0x19b7('0x68')](_0x19b7('0x3f'),'t',_0x19b7('0x6b'));_0x1278ea['where'](_0x19b7('0x6c'),_0x447721);}}db[_0x19b7('0x6d')][_0x19b7('0x31')](_0x18af98['toString'](),_0x509f26)['then'](function(_0x291ea7){_0x406f00=_[_0x19b7('0x6e')](_0x291ea7,'id');return db['sequelize'][_0x19b7('0x31')](_0x1278ea[_0x19b7('0x6f')](),_0x509f26);})['then'](function(_0x1dbf95){_0x242ef0[_0x19b7('0x1f')]=_0x1dbf95[_0x19b7('0x49')];_0x509f26=_[_0x19b7('0x70')](_0x509f26,{'model':db[_0x19b7('0x2d')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x15b564['field'](_0x19b7('0x71'));_0x15b564[_0x19b7('0x3c')](_0x19b7('0x72'),_0x19b7('0x73'));_0x15b564[_0x19b7('0x68')]('cm_contact_has_tags','ct','ct.CmContactId\x20=\x20c.id');_0x15b564[_0x19b7('0x68')](_0x19b7('0x3f'),'t',_0x19b7('0x6b'));if(_0x50c880[_0x19b7('0x21')]){_0x15b564[_0x19b7('0x21')](_0x50c880[_0x19b7('0x21')]);}if(_0x50c880[_0x19b7('0x20')]){_0x15b564[_0x19b7('0x20')](_0x50c880[_0x19b7('0x20')]);}db['sequelize'][_0x19b7('0x31')](_0x15b564[_0x19b7('0x6f')](),_0x509f26)[_0x19b7('0x27')](function(_0xa0d2ed){_0xa0d2ed[_0x19b7('0x45')](function(_0x1be9e6){if(_0x1be9e6['TagIds']){_0x1be9e6[_0x19b7('0x74')]=[];_0x1be9e6['TagIds'][_0x19b7('0x75')](',')['forEach'](function(_0x3be0a6){_0x1be9e6['Tags'][_0x19b7('0x76')](_0x406f00[_0x3be0a6]);});}delete _0x1be9e6['TagIds'];});_0x242ef0['rows']=_0xa0d2ed;return _0x242ef0;})['then'](respondWithFilteredResult(_0x32cae6,_0x50c880))[_0x19b7('0x77')](handleError(_0x32cae6,null));});});};exports[_0x19b7('0x28')]=function(_0x5288c0,_0x550b0b){return db[_0x19b7('0x2d')][_0x19b7('0x78')]({'where':{'id':_0x5288c0['params']['id']}})['then'](handleEntityNotFound(_0x550b0b,null))[_0x19b7('0x27')](removeEntity(_0x550b0b,null))[_0x19b7('0x77')](handleError(_0x550b0b,null));};exports[_0x19b7('0x2e')]=function(_0x222a0e,_0x70fefe){return db[_0x19b7('0x2d')][_0x19b7('0x2e')]()[_0x19b7('0x27')](function(_0x4fce39){for(var _0x5c54e9=0x0;_0x5c54e9{}\s\\|]/g,'-');_0x209007(null,util[_0x9772('0x21')](_0x9772('0x22'),path[_0x9772('0x23')](_0x1d89f2['originalname'],path[_0x9772('0x24')](_0x1d89f2[_0x9772('0x20')])),Date['now'](),path[_0x9772('0x24')](_0x1d89f2['originalname'])));}})});router[_0x9772('0x17')](_0x9772('0x25'),upload['single'](_0x9772('0x26')),controller[_0x9772('0x27')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1e3c74,_0x125136,_0x346cd1){_0x346cd1(null,path[_0x9772('0x1d')](config['root'],_0x9772('0x1f')));},'filename':function(_0x2587dd,_0x4861e8,_0x81d945){_0x4861e8[_0x9772('0x20')]=_0x4861e8[_0x9772('0x20')][_0x9772('0x28')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x81d945(null,util[_0x9772('0x21')](_0x9772('0x22'),path[_0x9772('0x23')](_0x4861e8['originalname'],path[_0x9772('0x24')](_0x4861e8[_0x9772('0x20')])),Date[_0x9772('0x29')](),path[_0x9772('0x24')](_0x4861e8[_0x9772('0x20')])));}})});router[_0x9772('0x17')]('/upload',upload['single'](_0x9772('0x26')),controller['upload']);router['post']('/upload/:id',auth[_0x9772('0x8')](),controller[_0x9772('0x2a')]);router['put'](_0x9772('0xa'),auth['isAuthenticated'](),controller[_0x9772('0x2b')]);router[_0x9772('0x2c')]('/:id',auth[_0x9772('0x8')](),controller['destroy']);module[_0x9772('0x2d')]=router;
\ No newline at end of file
+var _0xe4e7=['replace','format','%s-%s%s','basename','now','extname','/csv','single','file','uploadCsv','/upload/:id','import','delete','destroy','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContact.controller','isAuthenticated','index','get','/describe','describe','/:id','/:id/tags','/:id/hoppers','/:id/hopper_histories','getHopperHistories','getHopperFinals','getJscriptySessions','post','/merge','merge','/create_many','setTags','diskStorage','join','root','server/files/tmp','originalname'];(function(_0x242e7d,_0x4545ac){var _0x2caafa=function(_0x58cf60){while(--_0x58cf60){_0x242e7d['push'](_0x242e7d['shift']());}};_0x2caafa(++_0x4545ac);}(_0xe4e7,0x19a));var _0x7e4e=function(_0x19982f,_0x518412){_0x19982f=_0x19982f-0x0;var _0x13f7d1=_0xe4e7[_0x19982f];return _0x13f7d1;};'use strict';var multer=require(_0x7e4e('0x0'));var util=require(_0x7e4e('0x1'));var path=require(_0x7e4e('0x2'));var timeout=require('connect-timeout');var express=require(_0x7e4e('0x3'));var router=express['Router']();var auth=require(_0x7e4e('0x4'));var interaction=require(_0x7e4e('0x5'));var config=require(_0x7e4e('0x6'));var controller=require(_0x7e4e('0x7'));router['get']('/',auth[_0x7e4e('0x8')](),controller[_0x7e4e('0x9')]);router[_0x7e4e('0xa')](_0x7e4e('0xb'),auth['isAuthenticated'](),controller[_0x7e4e('0xc')]);router['get'](_0x7e4e('0xd'),auth[_0x7e4e('0x8')](),controller['show']);router['get'](_0x7e4e('0xe'),auth['isAuthenticated'](),controller['getTags']);router[_0x7e4e('0xa')](_0x7e4e('0xf'),auth[_0x7e4e('0x8')](),controller['getHoppers']);router[_0x7e4e('0xa')](_0x7e4e('0x10'),auth['isAuthenticated'](),controller[_0x7e4e('0x11')]);router[_0x7e4e('0xa')]('/:id/hopper_finals',auth[_0x7e4e('0x8')](),controller[_0x7e4e('0x12')]);router[_0x7e4e('0xa')]('/:id/jscripty_sessions',auth[_0x7e4e('0x8')](),controller[_0x7e4e('0x13')]);router[_0x7e4e('0x14')](_0x7e4e('0x15'),auth['isAuthenticated'](),controller[_0x7e4e('0x16')]);router[_0x7e4e('0x14')]('/',auth['isAuthenticated'](),controller['create']);router[_0x7e4e('0x14')](_0x7e4e('0x17'),auth['isAuthenticated'](),controller['bulkCreate']);router['post'](_0x7e4e('0xe'),auth[_0x7e4e('0x8')](),controller[_0x7e4e('0x18')]);var upload=multer({'storage':multer[_0x7e4e('0x19')]({'destination':function(_0x8a9bbc,_0x41542f,_0x29cfc7){_0x29cfc7(null,path[_0x7e4e('0x1a')](config[_0x7e4e('0x1b')],_0x7e4e('0x1c')));},'filename':function(_0x2043e4,_0x594f4f,_0x49eba6){_0x594f4f[_0x7e4e('0x1d')]=_0x594f4f['originalname'][_0x7e4e('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x49eba6(null,util[_0x7e4e('0x1f')](_0x7e4e('0x20'),path[_0x7e4e('0x21')](_0x594f4f['originalname'],path['extname'](_0x594f4f[_0x7e4e('0x1d')])),Date[_0x7e4e('0x22')](),path[_0x7e4e('0x23')](_0x594f4f[_0x7e4e('0x1d')])));}})});router['post'](_0x7e4e('0x24'),upload[_0x7e4e('0x25')](_0x7e4e('0x26')),controller[_0x7e4e('0x27')]);var upload=multer({'storage':multer[_0x7e4e('0x19')]({'destination':function(_0x1dd9cf,_0xffa509,_0x5858c9){_0x5858c9(null,path[_0x7e4e('0x1a')](config[_0x7e4e('0x1b')],_0x7e4e('0x1c')));},'filename':function(_0x280b42,_0x5af4f6,_0x1a8ded){_0x5af4f6[_0x7e4e('0x1d')]=_0x5af4f6[_0x7e4e('0x1d')][_0x7e4e('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x1a8ded(null,util[_0x7e4e('0x1f')](_0x7e4e('0x20'),path[_0x7e4e('0x21')](_0x5af4f6[_0x7e4e('0x1d')],path[_0x7e4e('0x23')](_0x5af4f6[_0x7e4e('0x1d')])),Date[_0x7e4e('0x22')](),path[_0x7e4e('0x23')](_0x5af4f6[_0x7e4e('0x1d')])));}})});router[_0x7e4e('0x14')]('/upload',upload[_0x7e4e('0x25')](_0x7e4e('0x26')),controller['upload']);router[_0x7e4e('0x14')](_0x7e4e('0x28'),auth[_0x7e4e('0x8')](),controller[_0x7e4e('0x29')]);router['put'](_0x7e4e('0xd'),auth[_0x7e4e('0x8')](),controller['update']);router[_0x7e4e('0x2a')](_0x7e4e('0xd'),auth[_0x7e4e('0x8')](),controller[_0x7e4e('0x2b')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.attributes.js b/server/api/cmCustomField/cmCustomField.attributes.js
index 4d8d67e..c238ddd 100644
--- a/server/api/cmCustomField/cmCustomField.attributes.js
+++ b/server/api/cmCustomField/cmCustomField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4c48=['BOOLEAN','sequelize','VIRTUAL','getDataValue','alias','STRING','setDataValue','TEXT','long','type','parse','values','isArray'];(function(_0x19b3f9,_0xade753){var _0x18c3f6=function(_0x21439f){while(--_0x21439f){_0x19b3f9['push'](_0x19b3f9['shift']());}};_0x18c3f6(++_0xade753);}(_0x4c48,0x194));var _0x84c4=function(_0x837dad,_0x1d9098){_0x837dad=_0x837dad-0x0;var _0x1d62d3=_0x4c48[_0x837dad];return _0x1d62d3;};'use strict';var Sequelize=require(_0x84c4('0x0'));var _=require('lodash');module['exports']={'name':{'type':Sequelize[_0x84c4('0x1')],'get':function(_0x4ae096){return this[_0x84c4('0x2')](_0x84c4('0x3'));}},'alias':{'type':Sequelize[_0x84c4('0x4')],'allowNull':![],'set':function(_0x399eb8){this[_0x84c4('0x5')](_0x84c4('0x3'),_0x399eb8?_0x399eb8:this['getDataValue']('name'));}},'type':{'type':Sequelize[_0x84c4('0x4')],'allowNull':![]},'values':{'type':Sequelize[_0x84c4('0x6')](_0x84c4('0x7')),'get':function(){if(this[_0x84c4('0x2')](_0x84c4('0x8'))==='select'){return JSON[_0x84c4('0x9')](this[_0x84c4('0x2')](_0x84c4('0xa')));}else{return this[_0x84c4('0x2')](_0x84c4('0xa'));}},'set':function(_0x511a21){if(Array[_0x84c4('0xb')](_0x511a21)){this['setDataValue'](_0x84c4('0xa'),JSON['stringify'](_0x511a21));}else{this[_0x84c4('0x5')](_0x84c4('0xa'),_0x511a21);}}},'required':{'type':Sequelize[_0x84c4('0xc')],'defaultValue':![]}};
\ No newline at end of file
+var _0x9987=['name','STRING','TEXT','long','type','select','parse','values','isArray','stringify','sequelize','lodash','exports','getDataValue','setDataValue','alias'];(function(_0x599f41,_0x4db732){var _0x2e4d58=function(_0x14c882){while(--_0x14c882){_0x599f41['push'](_0x599f41['shift']());}};_0x2e4d58(++_0x4db732);}(_0x9987,0xea));var _0x7998=function(_0x3a6731,_0x2745ce){_0x3a6731=_0x3a6731-0x0;var _0x461bed=_0x9987[_0x3a6731];return _0x461bed;};'use strict';var Sequelize=require(_0x7998('0x0'));var _=require(_0x7998('0x1'));module[_0x7998('0x2')]={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x147a02){return this[_0x7998('0x3')]('alias');}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0xcd0f34){this[_0x7998('0x4')](_0x7998('0x5'),_0xcd0f34?_0xcd0f34:this[_0x7998('0x3')](_0x7998('0x6')));}},'type':{'type':Sequelize[_0x7998('0x7')],'allowNull':![]},'values':{'type':Sequelize[_0x7998('0x8')](_0x7998('0x9')),'get':function(){if(this[_0x7998('0x3')](_0x7998('0xa'))===_0x7998('0xb')){return JSON[_0x7998('0xc')](this[_0x7998('0x3')](_0x7998('0xd')));}else{return this['getDataValue'](_0x7998('0xd'));}},'set':function(_0x21f324){if(Array[_0x7998('0xe')](_0x21f324)){this[_0x7998('0x4')](_0x7998('0xd'),JSON[_0x7998('0xf')](_0x21f324));}else{this[_0x7998('0x4')](_0x7998('0xd'),_0x21f324);}}},'required':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.controller.js b/server/api/cmCustomField/cmCustomField.controller.js
index 6a00120..be855a5 100644
--- a/server/api/cmCustomField/cmCustomField.controller.js
+++ b/server/api/cmCustomField/cmCustomField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x99cb=['options','where','include','findAll','catch','show','params','find','create','sequelize','body','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','CmCustomField','rawAttributes','differenceBy','keys','filters','intersection','model','query','fields','attributes','length','nolimit','order','sort','pick','filter','map','type','VIRTUAL','field','merge'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x99cb,0x127));var _0xb99c=function(_0x3aa007,_0x3bd14d){_0x3aa007=_0x3aa007-0x0;var _0x2e8173=_0x99cb[_0x3aa007];return _0x2e8173;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xb99c('0x0'));var rimraf=require(_0xb99c('0x1'));var zipdir=require(_0xb99c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xb99c('0x3'));var BPromise=require(_0xb99c('0x4'));var Mustache=require('mustache');var util=require(_0xb99c('0x5'));var path=require(_0xb99c('0x6'));var sox=require(_0xb99c('0x7'));var csv=require(_0xb99c('0x8'));var ejs=require(_0xb99c('0x9'));var fs=require('fs');var _=require(_0xb99c('0xa'));var squel=require(_0xb99c('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb99c('0xc'));var toCsv=require(_0xb99c('0x8'));var querystring=require('querystring');var Papa=require(_0xb99c('0xd'));var Redis=require(_0xb99c('0xe'));var authService=require(_0xb99c('0xf'));var qs=require(_0xb99c('0x10'));var hardwareService=require(_0xb99c('0x11'));var logger=require(_0xb99c('0x12'))('api');var utils=require(_0xb99c('0x13'));var config=require(_0xb99c('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2eb281,_0x4d0abe){_0x4d0abe=_0x4d0abe||0xcc;return function(_0x558368){if(_0x558368){return _0x2eb281[_0xb99c('0x15')](_0x4d0abe);}return _0x2eb281['status'](_0x4d0abe)[_0xb99c('0x16')]();};}function respondWithResult(_0x5c6999,_0x3f574b){_0x3f574b=_0x3f574b||0xc8;return function(_0x14d7cb){if(_0x14d7cb){return _0x5c6999[_0xb99c('0x17')](_0x3f574b)[_0xb99c('0x18')](_0x14d7cb);}};}function respondWithFilteredResult(_0x54d506,_0x5d60f0){return function(_0x2b41c7){if(_0x2b41c7){var _0x2c7134=_0x2b41c7[_0xb99c('0x19')],_0x4e7ae2=_0x5d60f0[_0xb99c('0x1a')],_0x5e96ce=_0x5d60f0[_0xb99c('0x1a')]+_0x5d60f0[_0xb99c('0x1b')],_0x475801;if(_0x5e96ce>=_0x2c7134){_0x5e96ce=_0x2c7134;_0x475801=0xc8;}else{_0x475801=0xce;}_0x54d506[_0xb99c('0x17')](_0x475801);return _0x54d506[_0xb99c('0x1c')](_0xb99c('0x1d'),_0x4e7ae2+'-'+_0x5e96ce+'/'+_0x2c7134)[_0xb99c('0x18')](_0x2b41c7);}return null;};}function patchUpdates(_0x3254d7){return function(_0x1faa9c){try{jsonpatch[_0xb99c('0x1e')](_0x1faa9c,_0x3254d7,!![]);}catch(_0x2e69c3){return BPromise[_0xb99c('0x1f')](_0x2e69c3);}return _0x1faa9c['save']();};}function saveUpdates(_0x53b589,_0x28dab7){return function(_0x42eb02){if(_0x42eb02){return _0x42eb02[_0xb99c('0x20')](_0x53b589)[_0xb99c('0x21')](function(_0x3f0cdf){return _0x3f0cdf;});}return null;};}function removeEntity(_0x1f5bb9,_0x38bce2){return function(_0x11428c){if(_0x11428c){return _0x11428c[_0xb99c('0x22')]()[_0xb99c('0x21')](function(){_0x1f5bb9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x47e170,_0x2d33a2){return function(_0x7746de){if(!_0x7746de){_0x47e170[_0xb99c('0x15')](0x194);}return _0x7746de;};}function handleError(_0x24c8d7,_0x73b591){_0x73b591=_0x73b591||0x1f4;return function(_0x4e0ee6){logger[_0xb99c('0x23')](_0x4e0ee6[_0xb99c('0x24')]);if(_0x4e0ee6[_0xb99c('0x25')]){delete _0x4e0ee6[_0xb99c('0x25')];}_0x24c8d7[_0xb99c('0x17')](_0x73b591)[_0xb99c('0x26')](_0x4e0ee6);};}exports['index']=function(_0x4d536f,_0x2fa6fd){var _0xf3e267={},_0x59e1f8={},_0x507568={'count':0x0,'rows':[]};var _0x55baac=db[_0xb99c('0x27')][_0xb99c('0x28')];_0x59e1f8['model']=_[_0xb99c('0x29')](_[_0xb99c('0x2a')](_0x55baac),[_0xb99c('0x25')]);_0x59e1f8['query']=_['keys'](_0x4d536f['query']);_0x59e1f8[_0xb99c('0x2b')]=_[_0xb99c('0x2c')](_0x59e1f8[_0xb99c('0x2d')],_0x59e1f8[_0xb99c('0x2e')]);_0xf3e267['attributes']=_[_0xb99c('0x2c')](_0x59e1f8['model'],qs[_0xb99c('0x2f')](_0x4d536f[_0xb99c('0x2e')][_0xb99c('0x2f')]));_0xf3e267[_0xb99c('0x30')]=_0xf3e267[_0xb99c('0x30')][_0xb99c('0x31')]?_0xf3e267[_0xb99c('0x30')]:_0x59e1f8['model'];if(!_0x4d536f[_0xb99c('0x2e')]['hasOwnProperty'](_0xb99c('0x32'))){_0xf3e267['limit']=qs['limit'](_0x4d536f['query'][_0xb99c('0x1b')]);_0xf3e267[_0xb99c('0x1a')]=qs[_0xb99c('0x1a')](_0x4d536f[_0xb99c('0x2e')]['offset']);}_0xf3e267[_0xb99c('0x33')]=qs[_0xb99c('0x34')](_0x4d536f['query'][_0xb99c('0x34')]);_0xf3e267['where']=qs[_0xb99c('0x2b')](_[_0xb99c('0x35')](_0x4d536f[_0xb99c('0x2e')],_0x59e1f8[_0xb99c('0x2b')]));if(_0x4d536f[_0xb99c('0x2e')][_0xb99c('0x36')]){_0xf3e267['where']=_['merge'](_0xf3e267['where'],{'$or':_[_0xb99c('0x37')](_0x55baac,function(_0x3ae17b){if(_0x3ae17b[_0xb99c('0x38')]['key']!==_0xb99c('0x39')){var _0x1b4986={};_0x1b4986[_0x3ae17b[_0xb99c('0x3a')]]={'$like':'%'+_0x4d536f[_0xb99c('0x2e')][_0xb99c('0x36')]+'%'};return _0x1b4986;}})});}_0xf3e267=_[_0xb99c('0x3b')]({},_0xf3e267,_0x4d536f[_0xb99c('0x3c')]);var _0x38c1c3={'where':_0xf3e267[_0xb99c('0x3d')]};return db[_0xb99c('0x27')]['count'](_0x38c1c3)['then'](function(_0x39b4e0){_0x507568[_0xb99c('0x19')]=_0x39b4e0;if(_0x4d536f['query']['includeAll']){_0xf3e267[_0xb99c('0x3e')]=[{'all':!![]}];}return db[_0xb99c('0x27')][_0xb99c('0x3f')](_0xf3e267);})[_0xb99c('0x21')](function(_0x107314){_0x507568['rows']=_0x107314;return _0x507568;})['then'](respondWithFilteredResult(_0x2fa6fd,_0xf3e267))[_0xb99c('0x40')](handleError(_0x2fa6fd,null));};exports[_0xb99c('0x41')]=function(_0x2508bb,_0x84aae4){var _0x2d0d56={'raw':!![],'where':{'id':_0x2508bb[_0xb99c('0x42')]['id']}},_0x3080b9={};_0x3080b9[_0xb99c('0x2d')]=_[_0xb99c('0x2a')](db['CmCustomField'][_0xb99c('0x28')]);_0x3080b9[_0xb99c('0x2e')]=_['keys'](_0x2508bb[_0xb99c('0x2e')]);_0x3080b9[_0xb99c('0x2b')]=_[_0xb99c('0x2c')](_0x3080b9[_0xb99c('0x2d')],_0x3080b9['query']);_0x2d0d56[_0xb99c('0x30')]=_[_0xb99c('0x2c')](_0x3080b9[_0xb99c('0x2d')],qs[_0xb99c('0x2f')](_0x2508bb[_0xb99c('0x2e')][_0xb99c('0x2f')]));_0x2d0d56[_0xb99c('0x30')]=_0x2d0d56[_0xb99c('0x30')][_0xb99c('0x31')]?_0x2d0d56[_0xb99c('0x30')]:_0x3080b9[_0xb99c('0x2d')];if(_0x2508bb['query']['includeAll']){_0x2d0d56[_0xb99c('0x3e')]=[{'all':!![]}];}_0x2d0d56=_[_0xb99c('0x3b')]({},_0x2d0d56,_0x2508bb[_0xb99c('0x3c')]);return db[_0xb99c('0x27')][_0xb99c('0x43')](_0x2d0d56)['then'](handleEntityNotFound(_0x84aae4,null))['then'](respondWithResult(_0x84aae4,null))[_0xb99c('0x40')](handleError(_0x84aae4,null));};exports[_0xb99c('0x44')]=function(_0xc34fd9,_0xb484c3){return db[_0xb99c('0x45')]['transaction'](function(_0x3a7968){return db[_0xb99c('0x27')][_0xb99c('0x44')](_0xc34fd9['body'],{'transaction':_0x3a7968});})['then'](respondWithResult(_0xb484c3,0xc9))['catch'](handleError(_0xb484c3,null));};exports[_0xb99c('0x20')]=function(_0x9eefd9,_0x3dcf0a){if(_0x9eefd9[_0xb99c('0x46')]['id']){delete _0x9eefd9[_0xb99c('0x46')]['id'];}return db[_0xb99c('0x27')][_0xb99c('0x43')]({'where':{'id':_0x9eefd9[_0xb99c('0x42')]['id']}})[_0xb99c('0x21')](handleEntityNotFound(_0x3dcf0a,null))['then'](saveUpdates(_0x9eefd9[_0xb99c('0x46')],null))[_0xb99c('0x21')](respondWithResult(_0x3dcf0a,null))['catch'](handleError(_0x3dcf0a,null));};exports[_0xb99c('0x22')]=function(_0x166b28,_0x29daa7){return db['CmCustomField'][_0xb99c('0x43')]({'where':{'id':_0x166b28[_0xb99c('0x42')]['id']}})[_0xb99c('0x21')](handleEntityNotFound(_0x29daa7,null))['then'](removeEntity(_0x29daa7,null))['catch'](handleError(_0x29daa7,null));};
\ No newline at end of file
+var _0xe983=['filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','type','key','VIRTUAL','field','options','includeAll','include','catch','show','params','create','sequelize','find','body','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','update','then','destroy','stack','name','send','CmCustomField','rawAttributes','model','differenceBy','keys','query'];(function(_0x10edf9,_0xf9655c){var _0x26a414=function(_0x3eaef6){while(--_0x3eaef6){_0x10edf9['push'](_0x10edf9['shift']());}};_0x26a414(++_0xf9655c);}(_0xe983,0x1de));var _0x3e98=function(_0x730189,_0x2b9c57){_0x730189=_0x730189-0x0;var _0x50d140=_0xe983[_0x730189];return _0x50d140;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x3e98('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3e98('0x1'));var jsonpatch=require(_0x3e98('0x2'));var rp=require(_0x3e98('0x3'));var moment=require(_0x3e98('0x4'));var BPromise=require(_0x3e98('0x5'));var Mustache=require(_0x3e98('0x6'));var util=require(_0x3e98('0x7'));var path=require(_0x3e98('0x8'));var sox=require('sox');var csv=require(_0x3e98('0x9'));var ejs=require(_0x3e98('0xa'));var fs=require('fs');var _=require(_0x3e98('0xb'));var squel=require(_0x3e98('0xc'));var crypto=require(_0x3e98('0xd'));var jsforce=require(_0x3e98('0xe'));var deskjs=require(_0x3e98('0xf'));var toCsv=require(_0x3e98('0x9'));var querystring=require(_0x3e98('0x10'));var Papa=require(_0x3e98('0x11'));var Redis=require(_0x3e98('0x12'));var authService=require(_0x3e98('0x13'));var qs=require(_0x3e98('0x14'));var hardwareService=require(_0x3e98('0x15'));var logger=require(_0x3e98('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x3e98('0x17'));var db=require(_0x3e98('0x18'))['db'];function respondWithStatusCode(_0x347f30,_0x506051){_0x506051=_0x506051||0xcc;return function(_0xb6762c){if(_0xb6762c){return _0x347f30[_0x3e98('0x19')](_0x506051);}return _0x347f30[_0x3e98('0x1a')](_0x506051)[_0x3e98('0x1b')]();};}function respondWithResult(_0x3f1cf5,_0x18a2e0){_0x18a2e0=_0x18a2e0||0xc8;return function(_0x327c4e){if(_0x327c4e){return _0x3f1cf5[_0x3e98('0x1a')](_0x18a2e0)[_0x3e98('0x1c')](_0x327c4e);}};}function respondWithFilteredResult(_0x1876ae,_0x2cfa59){return function(_0x377ae3){if(_0x377ae3){var _0x4de543=_0x377ae3[_0x3e98('0x1d')],_0x557411=_0x2cfa59[_0x3e98('0x1e')],_0x31c9c5=_0x2cfa59[_0x3e98('0x1e')]+_0x2cfa59['limit'],_0x3ed987;if(_0x31c9c5>=_0x4de543){_0x31c9c5=_0x4de543;_0x3ed987=0xc8;}else{_0x3ed987=0xce;}_0x1876ae[_0x3e98('0x1a')](_0x3ed987);return _0x1876ae[_0x3e98('0x1f')](_0x3e98('0x20'),_0x557411+'-'+_0x31c9c5+'/'+_0x4de543)[_0x3e98('0x1c')](_0x377ae3);}return null;};}function patchUpdates(_0x90b42f){return function(_0x2f251b){try{jsonpatch[_0x3e98('0x21')](_0x2f251b,_0x90b42f,!![]);}catch(_0x326136){return BPromise[_0x3e98('0x22')](_0x326136);}return _0x2f251b['save']();};}function saveUpdates(_0x74d584,_0x5713c1){return function(_0x44cad9){if(_0x44cad9){return _0x44cad9[_0x3e98('0x23')](_0x74d584)[_0x3e98('0x24')](function(_0x2e9d45){return _0x2e9d45;});}return null;};}function removeEntity(_0x54265d,_0x4f931c){return function(_0x4da0e4){if(_0x4da0e4){return _0x4da0e4[_0x3e98('0x25')]()[_0x3e98('0x24')](function(){_0x54265d[_0x3e98('0x1a')](0xcc)[_0x3e98('0x1b')]();});}};}function handleEntityNotFound(_0x2c1c44,_0x3aa934){return function(_0x4a7680){if(!_0x4a7680){_0x2c1c44[_0x3e98('0x19')](0x194);}return _0x4a7680;};}function handleError(_0x1ec12b,_0x1a3dab){_0x1a3dab=_0x1a3dab||0x1f4;return function(_0x58b036){logger['error'](_0x58b036[_0x3e98('0x26')]);if(_0x58b036['name']){delete _0x58b036[_0x3e98('0x27')];}_0x1ec12b[_0x3e98('0x1a')](_0x1a3dab)[_0x3e98('0x28')](_0x58b036);};}exports['index']=function(_0x239125,_0x42181f){var _0x4c50c5={},_0x22e3c8={},_0x3a1a52={'count':0x0,'rows':[]};var _0x2f46ad=db[_0x3e98('0x29')][_0x3e98('0x2a')];_0x22e3c8[_0x3e98('0x2b')]=_[_0x3e98('0x2c')](_[_0x3e98('0x2d')](_0x2f46ad),['name']);_0x22e3c8['query']=_[_0x3e98('0x2d')](_0x239125[_0x3e98('0x2e')]);_0x22e3c8[_0x3e98('0x2f')]=_[_0x3e98('0x30')](_0x22e3c8['model'],_0x22e3c8['query']);_0x4c50c5['attributes']=_[_0x3e98('0x30')](_0x22e3c8['model'],qs[_0x3e98('0x31')](_0x239125[_0x3e98('0x2e')][_0x3e98('0x31')]));_0x4c50c5[_0x3e98('0x32')]=_0x4c50c5[_0x3e98('0x32')][_0x3e98('0x33')]?_0x4c50c5[_0x3e98('0x32')]:_0x22e3c8[_0x3e98('0x2b')];if(!_0x239125[_0x3e98('0x2e')][_0x3e98('0x34')](_0x3e98('0x35'))){_0x4c50c5[_0x3e98('0x36')]=qs['limit'](_0x239125['query'][_0x3e98('0x36')]);_0x4c50c5[_0x3e98('0x1e')]=qs[_0x3e98('0x1e')](_0x239125[_0x3e98('0x2e')][_0x3e98('0x1e')]);}_0x4c50c5[_0x3e98('0x37')]=qs[_0x3e98('0x38')](_0x239125[_0x3e98('0x2e')]['sort']);_0x4c50c5[_0x3e98('0x39')]=qs[_0x3e98('0x2f')](_[_0x3e98('0x3a')](_0x239125[_0x3e98('0x2e')],_0x22e3c8[_0x3e98('0x2f')]));if(_0x239125[_0x3e98('0x2e')][_0x3e98('0x3b')]){_0x4c50c5[_0x3e98('0x39')]=_[_0x3e98('0x3c')](_0x4c50c5[_0x3e98('0x39')],{'$or':_['map'](_0x2f46ad,function(_0x5ed089){if(_0x5ed089[_0x3e98('0x3d')][_0x3e98('0x3e')]!==_0x3e98('0x3f')){var _0x4a95cf={};_0x4a95cf[_0x5ed089[_0x3e98('0x40')]]={'$like':'%'+_0x239125[_0x3e98('0x2e')][_0x3e98('0x3b')]+'%'};return _0x4a95cf;}})});}_0x4c50c5=_[_0x3e98('0x3c')]({},_0x4c50c5,_0x239125[_0x3e98('0x41')]);var _0xe32b75={'where':_0x4c50c5[_0x3e98('0x39')]};return db[_0x3e98('0x29')]['count'](_0xe32b75)[_0x3e98('0x24')](function(_0x568410){_0x3a1a52[_0x3e98('0x1d')]=_0x568410;if(_0x239125[_0x3e98('0x2e')][_0x3e98('0x42')]){_0x4c50c5[_0x3e98('0x43')]=[{'all':!![]}];}return db[_0x3e98('0x29')]['findAll'](_0x4c50c5);})['then'](function(_0x37ba7d){_0x3a1a52['rows']=_0x37ba7d;return _0x3a1a52;})[_0x3e98('0x24')](respondWithFilteredResult(_0x42181f,_0x4c50c5))[_0x3e98('0x44')](handleError(_0x42181f,null));};exports[_0x3e98('0x45')]=function(_0x5ce0ee,_0x154832){var _0x2dfd17={'raw':!![],'where':{'id':_0x5ce0ee[_0x3e98('0x46')]['id']}},_0x4a3756={};_0x4a3756[_0x3e98('0x2b')]=_[_0x3e98('0x2d')](db[_0x3e98('0x29')][_0x3e98('0x2a')]);_0x4a3756[_0x3e98('0x2e')]=_[_0x3e98('0x2d')](_0x5ce0ee[_0x3e98('0x2e')]);_0x4a3756['filters']=_[_0x3e98('0x30')](_0x4a3756[_0x3e98('0x2b')],_0x4a3756[_0x3e98('0x2e')]);_0x2dfd17[_0x3e98('0x32')]=_[_0x3e98('0x30')](_0x4a3756[_0x3e98('0x2b')],qs[_0x3e98('0x31')](_0x5ce0ee[_0x3e98('0x2e')][_0x3e98('0x31')]));_0x2dfd17[_0x3e98('0x32')]=_0x2dfd17[_0x3e98('0x32')][_0x3e98('0x33')]?_0x2dfd17[_0x3e98('0x32')]:_0x4a3756[_0x3e98('0x2b')];if(_0x5ce0ee[_0x3e98('0x2e')][_0x3e98('0x42')]){_0x2dfd17[_0x3e98('0x43')]=[{'all':!![]}];}_0x2dfd17=_[_0x3e98('0x3c')]({},_0x2dfd17,_0x5ce0ee[_0x3e98('0x41')]);return db[_0x3e98('0x29')]['find'](_0x2dfd17)[_0x3e98('0x24')](handleEntityNotFound(_0x154832,null))[_0x3e98('0x24')](respondWithResult(_0x154832,null))['catch'](handleError(_0x154832,null));};exports[_0x3e98('0x47')]=function(_0x1d651f,_0x5a19b7){return db[_0x3e98('0x48')]['transaction'](function(_0x4d8f76){return db['CmCustomField'][_0x3e98('0x47')](_0x1d651f['body'],{'transaction':_0x4d8f76});})[_0x3e98('0x24')](respondWithResult(_0x5a19b7,0xc9))['catch'](handleError(_0x5a19b7,null));};exports[_0x3e98('0x23')]=function(_0x4fc03e,_0x4302df){if(_0x4fc03e['body']['id']){delete _0x4fc03e['body']['id'];}return db[_0x3e98('0x29')][_0x3e98('0x49')]({'where':{'id':_0x4fc03e[_0x3e98('0x46')]['id']}})[_0x3e98('0x24')](handleEntityNotFound(_0x4302df,null))[_0x3e98('0x24')](saveUpdates(_0x4fc03e[_0x3e98('0x4a')],null))[_0x3e98('0x24')](respondWithResult(_0x4302df,null))['catch'](handleError(_0x4302df,null));};exports[_0x3e98('0x25')]=function(_0x1c7c29,_0x6efdaa){return db['CmCustomField']['find']({'where':{'id':_0x1c7c29['params']['id']}})['then'](handleEntityNotFound(_0x6efdaa,null))[_0x3e98('0x24')](removeEntity(_0x6efdaa,null))['catch'](handleError(_0x6efdaa,null));};
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.model.js b/server/api/cmCustomField/cmCustomField.model.js
index 8fd5544..bb6cb85 100644
--- a/server/api/cmCustomField/cmCustomField.model.js
+++ b/server/api/cmCustomField/cmCustomField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x48e9=['rimraf','../../config/environment','./cmCustomField.attributes','exports','define','CmCustomField','cm_custom_fields','get','TEXT','transaction','type','text','number','INTEGER','switch','queryInterface','addColumn','cm_contacts','format','cf_%d','lodash','util','api','request-promise','path'];(function(_0x294689,_0x4ea74b){var _0x1e700e=function(_0x295b17){while(--_0x295b17){_0x294689['push'](_0x294689['shift']());}};_0x1e700e(++_0x4ea74b);}(_0x48e9,0x18b));var _0x948e=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x48e9[_0x40a045];return _0x1a687c;};'use strict';var _=require(_0x948e('0x0'));var util=require(_0x948e('0x1'));var logger=require('../../config/logger')(_0x948e('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x948e('0x3'));var fs=require('fs');var path=require(_0x948e('0x4'));var rimraf=require(_0x948e('0x5'));var config=require(_0x948e('0x6'));var attributes=require(_0x948e('0x7'));module[_0x948e('0x8')]=function(_0x2d3a6c,_0x33cc63){return _0x2d3a6c[_0x948e('0x9')](_0x948e('0xa'),attributes,{'tableName':_0x948e('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0xe33dd1,_0x1bd8b0,_0x59826f){var _0x26eb1b=_0xe33dd1[_0x948e('0xc')]({'plain':!![]});var _0x2ff087={'type':_0x33cc63[_0x948e('0xd')],'transaction':_0x1bd8b0[_0x948e('0xe')]};switch(_0x26eb1b[_0x948e('0xf')]){case _0x948e('0x10'):_0x2ff087[_0x948e('0xf')]=_0x33cc63[_0x948e('0xd')];break;case _0x948e('0x11'):_0x2ff087['type']=_0x33cc63[_0x948e('0x12')];break;case _0x948e('0x13'):_0x2ff087[_0x948e('0xf')]=_0x33cc63['BOOLEAN'];_0x2ff087['defaultValue']=![];break;}_0x2d3a6c[_0x948e('0x14')][_0x948e('0x15')](_0x948e('0x16'),util[_0x948e('0x17')](_0x948e('0x18'),_0x26eb1b['id']),_0x2ff087);_0x59826f();}}});};
\ No newline at end of file
+var _0xffd0=['exports','define','CmCustomField','cm_custom_fields','TEXT','transaction','type','text','INTEGER','switch','BOOLEAN','defaultValue','queryInterface','addColumn','cf_%d','lodash','util','moment','bluebird','request-promise','path','rimraf','./cmCustomField.attributes'];(function(_0x29122d,_0x3089e5){var _0x7469ba=function(_0x19fec7){while(--_0x19fec7){_0x29122d['push'](_0x29122d['shift']());}};_0x7469ba(++_0x3089e5);}(_0xffd0,0x1db));var _0x0ffd=function(_0x3fb6d4,_0x51875e){_0x3fb6d4=_0x3fb6d4-0x0;var _0x474ee6=_0xffd0[_0x3fb6d4];return _0x474ee6;};'use strict';var _=require(_0x0ffd('0x0'));var util=require(_0x0ffd('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x0ffd('0x2'));var BPromise=require(_0x0ffd('0x3'));var rp=require(_0x0ffd('0x4'));var fs=require('fs');var path=require(_0x0ffd('0x5'));var rimraf=require(_0x0ffd('0x6'));var config=require('../../config/environment');var attributes=require(_0x0ffd('0x7'));module[_0x0ffd('0x8')]=function(_0x17235d,_0x2d64ad){return _0x17235d[_0x0ffd('0x9')](_0x0ffd('0xa'),attributes,{'tableName':_0x0ffd('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x2a7696,_0x26e527,_0x50de9f){var _0x210e84=_0x2a7696['get']({'plain':!![]});var _0x2e45b4={'type':_0x2d64ad[_0x0ffd('0xc')],'transaction':_0x26e527[_0x0ffd('0xd')]};switch(_0x210e84[_0x0ffd('0xe')]){case _0x0ffd('0xf'):_0x2e45b4['type']=_0x2d64ad[_0x0ffd('0xc')];break;case'number':_0x2e45b4['type']=_0x2d64ad[_0x0ffd('0x10')];break;case _0x0ffd('0x11'):_0x2e45b4['type']=_0x2d64ad[_0x0ffd('0x12')];_0x2e45b4[_0x0ffd('0x13')]=![];break;}_0x17235d[_0x0ffd('0x14')][_0x0ffd('0x15')]('cm_contacts',util['format'](_0x0ffd('0x16'),_0x210e84['id']),_0x2e45b4);_0x50de9f();}}});};
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.rpc.js b/server/api/cmCustomField/cmCustomField.rpc.js
index e0bd8f8..6523be0 100644
--- a/server/api/cmCustomField/cmCustomField.rpc.js
+++ b/server/api/cmCustomField/cmCustomField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xce9a=['http','request','info','CmCustomField,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client'];(function(_0x31d732,_0x254946){var _0x4e817f=function(_0x2e2941){while(--_0x2e2941){_0x31d732['push'](_0x31d732['shift']());}};_0x4e817f(++_0x254946);}(_0xce9a,0x1dd));var _0xace9=function(_0x193b09,_0x4133f5){_0x193b09=_0x193b09-0x0;var _0x43b006=_0xce9a[_0x193b09];return _0x43b006;};'use strict';var _=require(_0xace9('0x0'));var util=require(_0xace9('0x1'));var moment=require('moment');var BPromise=require(_0xace9('0x2'));var rs=require(_0xace9('0x3'));var fs=require('fs');var Redis=require(_0xace9('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xace9('0x5'));var logger=require('../../config/logger')(_0xace9('0x6'));var config=require('../../config/environment');var jayson=require(_0xace9('0x7'));var client=jayson[_0xace9('0x8')][_0xace9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3dc7eb,_0x16d4ca,_0x3f9f57){return new BPromise(function(_0x5af80a,_0x5dbda1){return client[_0xace9('0xa')](_0x3dc7eb,_0x3f9f57)['then'](function(_0x4fc490){logger[_0xace9('0xb')](_0xace9('0xc'),_0x16d4ca,'request\x20sent');logger['debug']('CmCustomField,\x20%s,\x20%s,\x20%s',_0x16d4ca,_0xace9('0xd'),JSON[_0xace9('0xe')](_0x4fc490));if(_0x4fc490[_0xace9('0xf')]){if(_0x4fc490['error'][_0xace9('0x10')]===0x1f4){logger[_0xace9('0xf')](_0xace9('0xc'),_0x16d4ca,_0x4fc490[_0xace9('0xf')]['message']);return _0x5dbda1(_0x4fc490[_0xace9('0xf')][_0xace9('0x11')]);}logger[_0xace9('0xf')](_0xace9('0xc'),_0x16d4ca,_0x4fc490[_0xace9('0xf')]['message']);return _0x5af80a(_0x4fc490[_0xace9('0xf')][_0xace9('0x11')]);}else{logger[_0xace9('0xb')](_0xace9('0xc'),_0x16d4ca,_0xace9('0xd'));_0x5af80a(_0x4fc490['result'][_0xace9('0x11')]);}})['catch'](function(_0x12cdfa){logger[_0xace9('0xf')]('CmCustomField,\x20%s,\x20%s',_0x16d4ca,_0x12cdfa);_0x5dbda1(_0x12cdfa);});});}
\ No newline at end of file
+var _0x219d=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCustomField,\x20%s,\x20%s','request\x20sent','CmCustomField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring'];(function(_0x8406f8,_0x1911c0){var _0x8ff072=function(_0x476e05){while(--_0x476e05){_0x8406f8['push'](_0x8406f8['shift']());}};_0x8ff072(++_0x1911c0);}(_0x219d,0x10f));var _0xd219=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x219d[_0x432682];return _0x463d05;};'use strict';var _=require('lodash');var util=require(_0xd219('0x0'));var moment=require(_0xd219('0x1'));var BPromise=require(_0xd219('0x2'));var rs=require(_0xd219('0x3'));var fs=require('fs');var Redis=require(_0xd219('0x4'));var db=require(_0xd219('0x5'))['db'];var utils=require(_0xd219('0x6'));var logger=require(_0xd219('0x7'))(_0xd219('0x8'));var config=require(_0xd219('0x9'));var jayson=require(_0xd219('0xa'));var client=jayson[_0xd219('0xb')][_0xd219('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4159d5,_0x226cf5,_0x90d965){return new BPromise(function(_0x2e1232,_0x3acb92){return client[_0xd219('0xd')](_0x4159d5,_0x90d965)[_0xd219('0xe')](function(_0x13bff6){logger[_0xd219('0xf')](_0xd219('0x10'),_0x226cf5,_0xd219('0x11'));logger['debug'](_0xd219('0x12'),_0x226cf5,'request\x20sent',JSON[_0xd219('0x13')](_0x13bff6));if(_0x13bff6[_0xd219('0x14')]){if(_0x13bff6[_0xd219('0x14')][_0xd219('0x15')]===0x1f4){logger['error']('CmCustomField,\x20%s,\x20%s',_0x226cf5,_0x13bff6[_0xd219('0x14')][_0xd219('0x16')]);return _0x3acb92(_0x13bff6['error'][_0xd219('0x16')]);}logger[_0xd219('0x14')](_0xd219('0x10'),_0x226cf5,_0x13bff6['error'][_0xd219('0x16')]);return _0x2e1232(_0x13bff6[_0xd219('0x14')][_0xd219('0x16')]);}else{logger['info']('CmCustomField,\x20%s,\x20%s',_0x226cf5,_0xd219('0x11'));_0x2e1232(_0x13bff6[_0xd219('0x17')][_0xd219('0x16')]);}})[_0xd219('0x18')](function(_0x1dfcd0){logger[_0xd219('0x14')](_0xd219('0x10'),_0x226cf5,_0x1dfcd0);_0x3acb92(_0x1dfcd0);});});}
\ No newline at end of file
diff --git a/server/api/cmCustomField/index.js b/server/api/cmCustomField/index.js
index 0ea3b57..02df733 100644
--- a/server/api/cmCustomField/index.js
+++ b/server/api/cmCustomField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0262=['../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show','update','delete','destroy','exports','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x38c632,_0x14e8e6){var _0x12737e=function(_0x3e0fe4){while(--_0x3e0fe4){_0x38c632['push'](_0x38c632['shift']());}};_0x12737e(++_0x14e8e6);}(_0x0262,0xbb));var _0x2026=function(_0x264491,_0x1e5d84){_0x264491=_0x264491-0x0;var _0x23db93=_0x0262[_0x264491];return _0x23db93;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2026('0x0'));var timeout=require(_0x2026('0x1'));var express=require(_0x2026('0x2'));var router=express[_0x2026('0x3')]();var auth=require(_0x2026('0x4'));var interaction=require(_0x2026('0x5'));var config=require(_0x2026('0x6'));var controller=require('./cmCustomField.controller');router[_0x2026('0x7')]('/',auth['isAuthenticated'](),controller[_0x2026('0x8')]);router[_0x2026('0x7')](_0x2026('0x9'),auth[_0x2026('0xa')](),controller[_0x2026('0xb')]);router['post']('/',auth[_0x2026('0xa')](),controller['create']);router['put'](_0x2026('0x9'),auth['isAuthenticated'](),controller[_0x2026('0xc')]);router[_0x2026('0xd')](_0x2026('0x9'),auth[_0x2026('0xa')](),controller[_0x2026('0xe')]);module[_0x2026('0xf')]=router;
\ No newline at end of file
+var _0xacba=['./cmCustomField.controller','isAuthenticated','index','get','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x16a101,_0x12caba){var _0x47b258=function(_0x1d4a8b){while(--_0x1d4a8b){_0x16a101['push'](_0x16a101['shift']());}};_0x47b258(++_0x12caba);}(_0xacba,0xb5));var _0xaacb=function(_0x4b213c,_0x34f7b2){_0x4b213c=_0x4b213c-0x0;var _0x5cc384=_0xacba[_0x4b213c];return _0x5cc384;};'use strict';var multer=require(_0xaacb('0x0'));var util=require(_0xaacb('0x1'));var path=require(_0xaacb('0x2'));var timeout=require(_0xaacb('0x3'));var express=require(_0xaacb('0x4'));var router=express['Router']();var auth=require(_0xaacb('0x5'));var interaction=require(_0xaacb('0x6'));var config=require(_0xaacb('0x7'));var controller=require(_0xaacb('0x8'));router['get']('/',auth[_0xaacb('0x9')](),controller[_0xaacb('0xa')]);router[_0xaacb('0xb')](_0xaacb('0xc'),auth[_0xaacb('0x9')](),controller[_0xaacb('0xd')]);router[_0xaacb('0xe')]('/',auth['isAuthenticated'](),controller[_0xaacb('0xf')]);router[_0xaacb('0x10')](_0xaacb('0xc'),auth[_0xaacb('0x9')](),controller[_0xaacb('0x11')]);router[_0xaacb('0x12')](_0xaacb('0xc'),auth[_0xaacb('0x9')](),controller[_0xaacb('0x13')]);module[_0xaacb('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.attributes.js b/server/api/cmHopper/cmHopper.attributes.js
index cbde860..0c31a98 100644
--- a/server/api/cmHopper/cmHopper.attributes.js
+++ b/server/api/cmHopper/cmHopper.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x525d=['YYYY-MM-DD\x20HH:mm:ss','INTEGER','BOOLEAN','STRING','UNSIGNED','moment','sequelize','exports','DATE'];(function(_0x23492f,_0x5d277f){var _0x83eb1a=function(_0x4b220b){while(--_0x4b220b){_0x23492f['push'](_0x23492f['shift']());}};_0x83eb1a(++_0x5d277f);}(_0x525d,0x7a));var _0xd525=function(_0x91c5f9,_0x139210){_0x91c5f9=_0x91c5f9-0x0;var _0x3a0510=_0x525d[_0x91c5f9];return _0x3a0510;};'use strict';var moment=require(_0xd525('0x0'));var Sequelize=require(_0xd525('0x1'));module[_0xd525('0x2')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0xd525('0x3')],'defaultValue':moment()['format'](_0xd525('0x4'))},'countbusyretry':{'type':Sequelize[_0xd525('0x5')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xd525('0x5')],'defaultValue':0x0},'callback':{'type':Sequelize[_0xd525('0x6')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0xd525('0x7')],'defaultValue':null},'callbackat':{'type':Sequelize[_0xd525('0x3')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0xd525('0x8')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0xd525('0x6')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0xd525('0x5')],'unique':'contactListQueue'},'ListId':{'type':Sequelize[_0xd525('0x5')],'unique':'contactListQueue'},'UserId':{'type':Sequelize['INTEGER']},'VoiceQueueId':{'type':Sequelize[_0xd525('0x5')],'unique':'contactListQueue'},'CampaignId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0xb8cc=['contactListQueue','moment','exports','STRING','DATE','format','YYYY-MM-DD\x20HH:mm:ss','INTEGER','BOOLEAN'];(function(_0x17cc18,_0x4d99b6){var _0x5519f9=function(_0x288f8c){while(--_0x288f8c){_0x17cc18['push'](_0x17cc18['shift']());}};_0x5519f9(++_0x4d99b6);}(_0xb8cc,0x145));var _0xcb8c=function(_0x3c2a62,_0x5f48f7){_0x3c2a62=_0x3c2a62-0x0;var _0x2948c9=_0xb8cc[_0x3c2a62];return _0x2948c9;};'use strict';var moment=require(_0xcb8c('0x0'));var Sequelize=require('sequelize');module[_0xcb8c('0x1')]={'phone':{'type':Sequelize[_0xcb8c('0x2')],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0xcb8c('0x3')],'defaultValue':moment()[_0xcb8c('0x4')](_0xcb8c('0x5'))},'countbusyretry':{'type':Sequelize[_0xcb8c('0x6')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xcb8c('0x6')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'callback':{'type':Sequelize[_0xcb8c('0x7')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0xcb8c('0x3')]},'priority':{'type':Sequelize[_0xcb8c('0x6')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ContactId':{'type':Sequelize[_0xcb8c('0x6')],'unique':_0xcb8c('0x8')},'ListId':{'type':Sequelize[_0xcb8c('0x6')],'unique':_0xcb8c('0x8')},'UserId':{'type':Sequelize[_0xcb8c('0x6')]},'VoiceQueueId':{'type':Sequelize['INTEGER'],'unique':_0xcb8c('0x8')},'CampaignId':{'type':Sequelize[_0xcb8c('0x6')]}};
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.controller.js b/server/api/cmHopper/cmHopper.controller.js
index 7df8ecc..784597d 100644
--- a/server/api/cmHopper/cmHopper.controller.js
+++ b/server/api/cmHopper/cmHopper.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8524=['finally','CmHopperFinal','getPreview','describe','getVoiceQueues','outbound','preview','dialOrderByScheduledAt','transaction','map','prev','isEmpty','hopperIds','priority','ASC','DESC','COALESCE(CmHopper.UserId,\x200)\x20ASC','scheduledAt','sequelize','literal','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','scheduledat','LOCK','UPDATE','Company','CmList','List','dialActive','getOpenContacts','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','rawAttributes','model','query','keys','filters','$and','$or','$gte','$ne','$not','$between','$notBetween','$notIn','$like','$iLike','$notILike','$overlap','$contained','$any','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','type','key','VIRTUAL','field','options','CmHopper','findAll','catch','includeAll','include','create','body','find','params','VoiceQueueId','CampaignId','VoiceQueue','Campaign','createdAt','statedesc','deleted','campaign','membername','user','UserId','deletedat','format','YYYY-MM-DD\x20HH:mm:ss','calleridnum','campaigntype','queue','ivr','CmContact','firstName','isNil','calleridname','lastName'];(function(_0x5732c7,_0x89833d){var _0x8006b7=function(_0x28a3a5){while(--_0x28a3a5){_0x5732c7['push'](_0x5732c7['shift']());}};_0x8006b7(++_0x89833d);}(_0x8524,0x1d4));var _0x4852=function(_0x2e5642,_0x16e104){_0x2e5642=_0x2e5642-0x0;var _0x8fe073=_0x8524[_0x2e5642];return _0x8fe073;};'use strict';var pdf=require(_0x4852('0x0'));var emlformat=require(_0x4852('0x1'));var rimraf=require(_0x4852('0x2'));var zipdir=require(_0x4852('0x3'));var jsonpatch=require(_0x4852('0x4'));var rp=require(_0x4852('0x5'));var moment=require(_0x4852('0x6'));var BPromise=require(_0x4852('0x7'));var Mustache=require(_0x4852('0x8'));var util=require(_0x4852('0x9'));var path=require(_0x4852('0xa'));var sox=require('sox');var csv=require(_0x4852('0xb'));var ejs=require(_0x4852('0xc'));var fs=require('fs');var _=require(_0x4852('0xd'));var squel=require(_0x4852('0xe'));var crypto=require(_0x4852('0xf'));var jsforce=require(_0x4852('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x4852('0xb'));var querystring=require(_0x4852('0x11'));var Papa=require(_0x4852('0x12'));var Redis=require(_0x4852('0x13'));var authService=require(_0x4852('0x14'));var qs=require(_0x4852('0x15'));var hardwareService=require(_0x4852('0x16'));var logger=require(_0x4852('0x17'))(_0x4852('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x4852('0x19'))['db'];function respondWithStatusCode(_0x406b11,_0x10b508){_0x10b508=_0x10b508||0xcc;return function(_0x15689d){if(_0x15689d){return _0x406b11[_0x4852('0x1a')](_0x10b508);}return _0x406b11['status'](_0x10b508)[_0x4852('0x1b')]();};}function respondWithResult(_0x582f0e,_0x152a41){_0x152a41=_0x152a41||0xc8;return function(_0x5058fa){if(_0x5058fa){return _0x582f0e[_0x4852('0x1c')](_0x152a41)[_0x4852('0x1d')](_0x5058fa);}};}function respondWithFilteredResult(_0xc2c458,_0x8a8bdb){return function(_0x429766){if(_0x429766){var _0x257777=_0x429766[_0x4852('0x1e')],_0x277660=_0x8a8bdb[_0x4852('0x1f')],_0x2cf053=_0x8a8bdb[_0x4852('0x1f')]+_0x8a8bdb[_0x4852('0x20')],_0x7a8f18;if(_0x2cf053>=_0x257777){_0x2cf053=_0x257777;_0x7a8f18=0xc8;}else{_0x7a8f18=0xce;}_0xc2c458[_0x4852('0x1c')](_0x7a8f18);return _0xc2c458[_0x4852('0x21')](_0x4852('0x22'),_0x277660+'-'+_0x2cf053+'/'+_0x257777)[_0x4852('0x1d')](_0x429766);}return null;};}function patchUpdates(_0x53e8bf){return function(_0x53488d){try{jsonpatch[_0x4852('0x23')](_0x53488d,_0x53e8bf,!![]);}catch(_0x37f9a5){return BPromise[_0x4852('0x24')](_0x37f9a5);}return _0x53488d[_0x4852('0x25')]();};}function saveUpdates(_0x2edb12,_0x19d8b0){return function(_0x3ce90c){if(_0x3ce90c){return _0x3ce90c[_0x4852('0x26')](_0x2edb12)[_0x4852('0x27')](function(_0x5a4f99){return _0x5a4f99;});}return null;};}function removeEntity(_0x5d472d,_0x38677d){return function(_0x1f3282){if(_0x1f3282){return _0x1f3282[_0x4852('0x28')]()[_0x4852('0x27')](function(){_0x5d472d[_0x4852('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x19c8b2,_0x48035a){return function(_0x44b182){if(!_0x44b182){_0x19c8b2['sendStatus'](0x194);}return _0x44b182;};}function handleError(_0x22c206,_0x11d6e1){_0x11d6e1=_0x11d6e1||0x1f4;return function(_0x5850da){logger[_0x4852('0x29')](_0x5850da[_0x4852('0x2a')]);if(_0x5850da[_0x4852('0x2b')]){delete _0x5850da[_0x4852('0x2b')];}_0x22c206[_0x4852('0x1c')](_0x11d6e1)[_0x4852('0x2c')](_0x5850da);};}exports[_0x4852('0x2d')]=function(_0x2f6bbf,_0xeadeb2){var _0x437552={},_0x563f04={},_0x16cc01={'count':0x0,'rows':[]};var _0x44298e=db['CmHopper'][_0x4852('0x2e')];_0x563f04[_0x4852('0x2f')]=_['keys'](_0x44298e);_0x563f04[_0x4852('0x30')]=_[_0x4852('0x31')](_0x2f6bbf[_0x4852('0x30')]);_0x563f04[_0x4852('0x32')]=_['intersection'](_0x563f04[_0x4852('0x2f')],_0x563f04[_0x4852('0x30')]);_0x563f04[_0x4852('0x32')]=_['concat'](_0x563f04[_0x4852('0x32')],[_0x4852('0x33'),_0x4852('0x34'),'$gt',_0x4852('0x35'),'$lt','$lte',_0x4852('0x36'),'$eq',_0x4852('0x37'),_0x4852('0x38'),_0x4852('0x39'),'$in',_0x4852('0x3a'),_0x4852('0x3b'),'$notLike',_0x4852('0x3c'),_0x4852('0x3d'),'$like',_0x4852('0x3e'),'$contains',_0x4852('0x3f'),_0x4852('0x40')]);_0x437552[_0x4852('0x41')]=_[_0x4852('0x42')](_0x563f04[_0x4852('0x2f')],qs[_0x4852('0x43')](_0x2f6bbf['query'][_0x4852('0x43')]));_0x437552[_0x4852('0x41')]=_0x437552[_0x4852('0x41')][_0x4852('0x44')]?_0x437552[_0x4852('0x41')]:_0x563f04[_0x4852('0x2f')];if(!_0x2f6bbf[_0x4852('0x30')][_0x4852('0x45')](_0x4852('0x46'))){_0x437552[_0x4852('0x20')]=qs[_0x4852('0x20')](_0x2f6bbf[_0x4852('0x30')][_0x4852('0x20')]);_0x437552['offset']=qs[_0x4852('0x1f')](_0x2f6bbf[_0x4852('0x30')][_0x4852('0x1f')]);}_0x437552[_0x4852('0x47')]=qs[_0x4852('0x48')](_0x2f6bbf[_0x4852('0x30')][_0x4852('0x48')]);_0x437552[_0x4852('0x49')]=qs[_0x4852('0x32')](_['pick'](_0x2f6bbf['query'],_0x563f04[_0x4852('0x32')]));if(_0x2f6bbf[_0x4852('0x30')]['filter']){_0x437552[_0x4852('0x49')]=_[_0x4852('0x4a')](_0x437552[_0x4852('0x49')],{'$or':_['map'](_0x44298e,function(_0x5e98fd){if(_0x5e98fd[_0x4852('0x4b')][_0x4852('0x4c')]!==_0x4852('0x4d')){var _0x18bafa={};_0x18bafa[_0x5e98fd[_0x4852('0x4e')]]={'$like':'%'+_0x2f6bbf['query']['filter']+'%'};return _0x18bafa;}})});}_0x437552=_[_0x4852('0x4a')]({},_0x437552,_0x2f6bbf[_0x4852('0x4f')]);var _0x58dfd0={'where':_0x437552[_0x4852('0x49')]};return db[_0x4852('0x50')][_0x4852('0x1e')](_0x58dfd0)[_0x4852('0x27')](function(_0x472f4d){_0x16cc01[_0x4852('0x1e')]=_0x472f4d;if(_0x2f6bbf['query']['includeAll']){_0x437552['include']=[{'all':!![]}];}return db['CmHopper'][_0x4852('0x51')](_0x437552);})['then'](function(_0x434895){_0x16cc01['rows']=_0x434895;return _0x16cc01;})[_0x4852('0x27')](respondWithFilteredResult(_0xeadeb2,_0x437552))[_0x4852('0x52')](handleError(_0xeadeb2,null));};exports['show']=function(_0x471d2c,_0x120a22){var _0x580954={'raw':!![],'where':{'id':_0x471d2c['params']['id']}},_0x55035d={};_0x55035d[_0x4852('0x2f')]=_[_0x4852('0x31')](db[_0x4852('0x50')]['rawAttributes']);_0x55035d[_0x4852('0x30')]=_[_0x4852('0x31')](_0x471d2c[_0x4852('0x30')]);_0x55035d['filters']=_[_0x4852('0x42')](_0x55035d[_0x4852('0x2f')],_0x55035d[_0x4852('0x30')]);_0x580954[_0x4852('0x41')]=_['intersection'](_0x55035d[_0x4852('0x2f')],qs[_0x4852('0x43')](_0x471d2c[_0x4852('0x30')]['fields']));_0x580954[_0x4852('0x41')]=_0x580954['attributes'][_0x4852('0x44')]?_0x580954['attributes']:_0x55035d[_0x4852('0x2f')];if(_0x471d2c[_0x4852('0x30')][_0x4852('0x53')]){_0x580954[_0x4852('0x54')]=[{'all':!![]}];}_0x580954=_[_0x4852('0x4a')]({},_0x580954,_0x471d2c[_0x4852('0x4f')]);return db[_0x4852('0x50')]['find'](_0x580954)[_0x4852('0x27')](handleEntityNotFound(_0x120a22,null))['then'](respondWithResult(_0x120a22,null))[_0x4852('0x52')](handleError(_0x120a22,null));};exports[_0x4852('0x55')]=function(_0x155bae,_0x2b6d76){return db[_0x4852('0x50')]['create'](_0x155bae[_0x4852('0x56')],{})[_0x4852('0x27')](respondWithResult(_0x2b6d76,0xc9))['catch'](handleError(_0x2b6d76,null));};exports['update']=function(_0x335e37,_0x24d332){if(_0x335e37['body']['id']){delete _0x335e37[_0x4852('0x56')]['id'];}return db[_0x4852('0x50')][_0x4852('0x57')]({'where':{'id':_0x335e37[_0x4852('0x58')]['id']}})[_0x4852('0x27')](handleEntityNotFound(_0x24d332,null))['then'](saveUpdates(_0x335e37[_0x4852('0x56')],null))['then'](respondWithResult(_0x24d332,null))[_0x4852('0x52')](handleError(_0x24d332,null));};exports['describe']=function(_0x4af058,_0x4090ea){return db[_0x4852('0x50')]['describe']()[_0x4852('0x27')](respondWithResult(_0x4090ea,null))[_0x4852('0x52')](handleError(_0x4090ea,null));};exports[_0x4852('0x28')]=function(_0x1f3fff,_0x228249){var _0x11e9c5;return db['CmHopper'][_0x4852('0x57')]({'where':{'id':_0x1f3fff[_0x4852('0x58')]['id']}})[_0x4852('0x27')](handleEntityNotFound(_0x228249,null))[_0x4852('0x27')](function(_0x1b749a){if(_0x1b749a){return _0x1b749a['destroy']()[_0x4852('0x27')](function(_0x16f73a){return _0x16f73a;});}})[_0x4852('0x27')](function(_0x58b2e6){_0x11e9c5=_0x58b2e6;if(_0x58b2e6){if(_0x58b2e6[_0x4852('0x59')]||_0x58b2e6[_0x4852('0x5a')]){return db[_0x58b2e6[_0x4852('0x59')]?_0x4852('0x5b'):_0x4852('0x5c')]['find']({'where':{'id':_0x58b2e6[_0x4852('0x59')]?_0x58b2e6[_0x4852('0x59')]:_0x58b2e6[_0x4852('0x5a')]},'attributes':['id',_0x4852('0x2b')],'raw':!![]});}}})[_0x4852('0x27')](function(_0x17d614){var _0x2876e3={};if(_0x17d614){_['merge'](_0x2876e3,_['omit'](_0x11e9c5['dataValues'],[_0x4852('0x5d'),'updatedAt','id']));_0x2876e3['state']=0x15;_0x2876e3[_0x4852('0x5e')]=_0x4852('0x5f');_0x2876e3[_0x4852('0x60')]=_0x17d614['name'];_0x2876e3[_0x4852('0x61')]=_0x1f3fff[_0x4852('0x62')][_0x4852('0x2b')];_0x2876e3[_0x4852('0x63')]=_0x1f3fff[_0x4852('0x62')]['id'];_0x2876e3[_0x4852('0x5f')]=!![];_0x2876e3[_0x4852('0x64')]=moment()[_0x4852('0x65')](_0x4852('0x66'));_0x2876e3[_0x4852('0x67')]=_0x11e9c5['phone'];_0x2876e3[_0x4852('0x68')]=_0x11e9c5[_0x4852('0x59')]?_0x4852('0x69'):_0x4852('0x6a');return db[_0x4852('0x6b')][_0x4852('0x57')]({'where':{'id':_0x2876e3['ContactId']},'attributes':[_0x4852('0x6c'),'lastName']})[_0x4852('0x27')](function(_0x43d3b6){if(!_[_0x4852('0x6d')](_0x228249)&&!_[_0x4852('0x6d')](_0x43d3b6['firstName'])){_0x2876e3[_0x4852('0x6e')]=_0x43d3b6[_0x4852('0x6c')];if(!_[_0x4852('0x6d')](_0x43d3b6[_0x4852('0x6f')])){_0x2876e3['calleridname']+='\x20'+_0x43d3b6[_0x4852('0x6f')];}}})[_0x4852('0x70')](function(){return db[_0x4852('0x71')][_0x4852('0x55')](_0x2876e3);});}})[_0x4852('0x27')](function(){return _0x228249[_0x4852('0x1c')](0xcc)[_0x4852('0x1b')]();})[_0x4852('0x52')](handleError(_0x228249,null));};exports[_0x4852('0x72')]=function(_0x4417a1,_0x13d021,_0x30344f){var _0x2edcc5=[];return db[_0x4852('0x6b')][_0x4852('0x73')]()[_0x4852('0x27')](function(_0x1abade){_0x2edcc5=_[_0x4852('0x31')](_0x1abade);return _0x4417a1[_0x4852('0x62')][_0x4852('0x74')]({'where':{'type':_0x4852('0x75'),'dialActive':!![],'dialMethod':_0x4852('0x76')},'attributes':['id',_0x4852('0x77')],'raw':!![]});})[_0x4852('0x27')](function(_0x1064da){if(_0x1064da&&_0x1064da[_0x4852('0x44')]){return db['sequelize'][_0x4852('0x78')](function(_0x1197c5){var _0xec02e={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x4852('0x65')](_0x4852('0x66'))},'VoiceQueueId':{'$in':_[_0x4852('0x79')](_0x1064da,'id')},'$or':[{'UserId':null},{'UserId':_0x4417a1[_0x4852('0x62')]['id']}]};var _0x25fefe=[];if(_0x4417a1['body']['direction']&&_0x4417a1[_0x4852('0x56')]['direction']===_0x4852('0x7a')){if(!_[_0x4852('0x7b')](_0x4417a1['body'][_0x4852('0x7c')])){_0xec02e['id']={'$in':_0x4417a1['body'][_0x4852('0x7c')]};}_0x25fefe=[[_0x4852('0x7d'),_0x4852('0x7e')],['scheduledAt',_0x1064da[0x0][_0x4852('0x77')]===_0x4852('0x7e')?_0x4852('0x7f'):'ASC'],db['sequelize']['literal'](_0x4852('0x80')),['id',_0x4852('0x7f')]];}else{if(!_[_0x4852('0x7b')](_0x4417a1[_0x4852('0x56')][_0x4852('0x7c')])){_0xec02e['id']={'$notIn':_0x4417a1[_0x4852('0x56')][_0x4852('0x7c')]};}_0x25fefe=[[_0x4852('0x7d'),_0x4852('0x7f')],[_0x4852('0x81'),_0x1064da[0x0][_0x4852('0x77')]],db[_0x4852('0x82')][_0x4852('0x83')](_0x4852('0x84')),['id',_0x4852('0x7e')]];}return db['CmHopper'][_0x4852('0x85')]({'attributes':['id',_0x4852('0x86')],'where':_0xec02e,'order':_0x25fefe,'transaction':_0x1197c5,'lock':_0x1197c5[_0x4852('0x87')][_0x4852('0x88')],'include':[{'model':db[_0x4852('0x6b')],'as':'Contact','attributes':_0x2edcc5,'include':[{'model':db['CmCompany'],'as':_0x4852('0x89'),'attributes':['id',_0x4852('0x2b')]}]},{'model':db[_0x4852('0x8a')],'as':_0x4852('0x8b'),'attributes':['id',_0x4852('0x2b')]},{'model':db[_0x4852('0x5b')],'as':'Queue','attributes':['id',_0x4852('0x2b'),_0x4852('0x8c')]}]})['then'](function(_0x226b66){if(_0x226b66){return _0x226b66['update']({'UserId':_0x4417a1[_0x4852('0x62')]['id']},{'transaction':_0x1197c5});}});});}})[_0x4852('0x27')](handleEntityNotFound(_0x13d021,null))['then'](respondWithResult(_0x13d021,null))[_0x4852('0x52')](handleError(_0x13d021,null));};exports[_0x4852('0x8d')]=function(_0x457e75,_0x4c880a,_0x26f016){return _0x457e75[_0x4852('0x62')][_0x4852('0x74')]({'where':{'type':_0x4852('0x75'),'dialActive':!![],'dialMethod':_0x4852('0x76')},'attributes':['id'],'raw':!![]})[_0x4852('0x27')](function(_0x552f70){if(_0x552f70&&_0x552f70[_0x4852('0x44')]){return db[_0x4852('0x50')][_0x4852('0x1e')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x4852('0x65')](_0x4852('0x66'))},'VoiceQueueId':{'$in':_['map'](_0x552f70,'id')},'$or':[{'UserId':null},{'UserId':_0x457e75['user']['id']}]}});}return 0x0;})['then'](function(_0x502706){if(!_[_0x4852('0x6d')](_0x502706)&&_[_0x4852('0x8e')](_0x502706)){return _0x4c880a[_0x4852('0x1c')](0xc8)[_0x4852('0x1d')]({'contacts':_0x502706});}else{logger[_0x4852('0x29')](_0x4852('0x8f'),'getOpenContacts',0x194,_0x4852('0x90'));_0x4c880a[_0x4852('0x1a')](0x194);}})[_0x4852('0x52')](handleError(_0x4c880a,null));};
\ No newline at end of file
+var _0x95d9=['CmList','List','getOpenContacts','outbound','entity\x20not\x20found','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','sendStatus','status','end','json','count','offset','set','apply','reject','save','update','then','destroy','stack','name','index','CmHopper','rawAttributes','model','keys','query','intersection','filters','concat','$and','$gte','$lt','$lte','$ne','$eq','$in','$notIn','$like','$notLike','$iLike','$notILike','$overlap','$contains','$contained','fields','attributes','length','nolimit','limit','order','sort','where','pick','merge','map','VIRTUAL','field','filter','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','describe','VoiceQueueId','CampaignId','VoiceQueue','Campaign','omit','dataValues','state','deleted','campaign','membername','user','format','calleridnum','phone','campaigntype','queue','ivr','CmContact','ContactId','firstName','lastName','isNil','calleridname','getPreview','getVoiceQueues','preview','dialOrderByScheduledAt','sequelize','transaction','YYYY-MM-DD\x20HH:mm:ss','isEmpty','hopperIds','priority','ASC','DESC','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','scheduledAt','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','LOCK','Contact','CmCompany','Company'];(function(_0x3be975,_0x468e4c){var _0x118f02=function(_0x4cd57e){while(--_0x4cd57e){_0x3be975['push'](_0x3be975['shift']());}};_0x118f02(++_0x468e4c);}(_0x95d9,0x8d));var _0x995d=function(_0x1ae5ab,_0xc5d441){_0x1ae5ab=_0x1ae5ab-0x0;var _0x1ce001=_0x95d9[_0x1ae5ab];return _0x1ce001;};'use strict';var pdf=require(_0x995d('0x0'));var emlformat=require(_0x995d('0x1'));var rimraf=require(_0x995d('0x2'));var zipdir=require(_0x995d('0x3'));var jsonpatch=require(_0x995d('0x4'));var rp=require('request-promise');var moment=require(_0x995d('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x995d('0x6'));var path=require(_0x995d('0x7'));var sox=require(_0x995d('0x8'));var csv=require(_0x995d('0x9'));var ejs=require(_0x995d('0xa'));var fs=require('fs');var _=require(_0x995d('0xb'));var squel=require(_0x995d('0xc'));var crypto=require(_0x995d('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x995d('0x9'));var querystring=require(_0x995d('0xe'));var Papa=require(_0x995d('0xf'));var Redis=require(_0x995d('0x10'));var authService=require(_0x995d('0x11'));var qs=require(_0x995d('0x12'));var hardwareService=require(_0x995d('0x13'));var logger=require(_0x995d('0x14'))('api');var utils=require('../../config/utils');var config=require(_0x995d('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3d05e1,_0x3ebcf2){_0x3ebcf2=_0x3ebcf2||0xcc;return function(_0x90b515){if(_0x90b515){return _0x3d05e1[_0x995d('0x16')](_0x3ebcf2);}return _0x3d05e1[_0x995d('0x17')](_0x3ebcf2)[_0x995d('0x18')]();};}function respondWithResult(_0x51eb7a,_0xbf3259){_0xbf3259=_0xbf3259||0xc8;return function(_0x49906d){if(_0x49906d){return _0x51eb7a[_0x995d('0x17')](_0xbf3259)[_0x995d('0x19')](_0x49906d);}};}function respondWithFilteredResult(_0x2c27a2,_0x24bcc6){return function(_0x4c1bcb){if(_0x4c1bcb){var _0x4b3e36=_0x4c1bcb[_0x995d('0x1a')],_0x213d76=_0x24bcc6[_0x995d('0x1b')],_0x26aa80=_0x24bcc6[_0x995d('0x1b')]+_0x24bcc6['limit'],_0x594233;if(_0x26aa80>=_0x4b3e36){_0x26aa80=_0x4b3e36;_0x594233=0xc8;}else{_0x594233=0xce;}_0x2c27a2[_0x995d('0x17')](_0x594233);return _0x2c27a2[_0x995d('0x1c')]('Content-Range',_0x213d76+'-'+_0x26aa80+'/'+_0x4b3e36)['json'](_0x4c1bcb);}return null;};}function patchUpdates(_0x1af5af){return function(_0xecc8b6){try{jsonpatch[_0x995d('0x1d')](_0xecc8b6,_0x1af5af,!![]);}catch(_0x52d7d2){return BPromise[_0x995d('0x1e')](_0x52d7d2);}return _0xecc8b6[_0x995d('0x1f')]();};}function saveUpdates(_0x5b050f,_0x270004){return function(_0x2c67e1){if(_0x2c67e1){return _0x2c67e1[_0x995d('0x20')](_0x5b050f)[_0x995d('0x21')](function(_0x14e987){return _0x14e987;});}return null;};}function removeEntity(_0x2355b9,_0x39e4ea){return function(_0x29a282){if(_0x29a282){return _0x29a282[_0x995d('0x22')]()[_0x995d('0x21')](function(){_0x2355b9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2d91fe,_0x465128){return function(_0xdd1ccc){if(!_0xdd1ccc){_0x2d91fe['sendStatus'](0x194);}return _0xdd1ccc;};}function handleError(_0x42675f,_0x5a22e3){_0x5a22e3=_0x5a22e3||0x1f4;return function(_0x234af5){logger['error'](_0x234af5[_0x995d('0x23')]);if(_0x234af5[_0x995d('0x24')]){delete _0x234af5[_0x995d('0x24')];}_0x42675f['status'](_0x5a22e3)['send'](_0x234af5);};}exports[_0x995d('0x25')]=function(_0x2a6711,_0x29e964){var _0x5cc408={},_0x41b168={},_0x381afe={'count':0x0,'rows':[]};var _0x4f65b6=db[_0x995d('0x26')][_0x995d('0x27')];_0x41b168[_0x995d('0x28')]=_[_0x995d('0x29')](_0x4f65b6);_0x41b168[_0x995d('0x2a')]=_[_0x995d('0x29')](_0x2a6711[_0x995d('0x2a')]);_0x41b168['filters']=_[_0x995d('0x2b')](_0x41b168[_0x995d('0x28')],_0x41b168[_0x995d('0x2a')]);_0x41b168[_0x995d('0x2c')]=_[_0x995d('0x2d')](_0x41b168['filters'],[_0x995d('0x2e'),'$or','$gt',_0x995d('0x2f'),_0x995d('0x30'),_0x995d('0x31'),_0x995d('0x32'),_0x995d('0x33'),'$not','$between','$notBetween',_0x995d('0x34'),_0x995d('0x35'),_0x995d('0x36'),_0x995d('0x37'),_0x995d('0x38'),_0x995d('0x39'),_0x995d('0x36'),_0x995d('0x3a'),_0x995d('0x3b'),_0x995d('0x3c'),'$any']);_0x5cc408['attributes']=_[_0x995d('0x2b')](_0x41b168[_0x995d('0x28')],qs[_0x995d('0x3d')](_0x2a6711[_0x995d('0x2a')][_0x995d('0x3d')]));_0x5cc408['attributes']=_0x5cc408[_0x995d('0x3e')][_0x995d('0x3f')]?_0x5cc408[_0x995d('0x3e')]:_0x41b168['model'];if(!_0x2a6711[_0x995d('0x2a')]['hasOwnProperty'](_0x995d('0x40'))){_0x5cc408['limit']=qs[_0x995d('0x41')](_0x2a6711[_0x995d('0x2a')][_0x995d('0x41')]);_0x5cc408[_0x995d('0x1b')]=qs[_0x995d('0x1b')](_0x2a6711[_0x995d('0x2a')][_0x995d('0x1b')]);}_0x5cc408[_0x995d('0x42')]=qs[_0x995d('0x43')](_0x2a6711[_0x995d('0x2a')][_0x995d('0x43')]);_0x5cc408[_0x995d('0x44')]=qs[_0x995d('0x2c')](_[_0x995d('0x45')](_0x2a6711[_0x995d('0x2a')],_0x41b168[_0x995d('0x2c')]));if(_0x2a6711[_0x995d('0x2a')]['filter']){_0x5cc408['where']=_[_0x995d('0x46')](_0x5cc408[_0x995d('0x44')],{'$or':_[_0x995d('0x47')](_0x4f65b6,function(_0x4ca103){if(_0x4ca103['type']['key']!==_0x995d('0x48')){var _0x5283fd={};_0x5283fd[_0x4ca103[_0x995d('0x49')]]={'$like':'%'+_0x2a6711[_0x995d('0x2a')][_0x995d('0x4a')]+'%'};return _0x5283fd;}})});}_0x5cc408=_['merge']({},_0x5cc408,_0x2a6711[_0x995d('0x4b')]);var _0x297664={'where':_0x5cc408[_0x995d('0x44')]};return db[_0x995d('0x26')]['count'](_0x297664)['then'](function(_0x505b9a){_0x381afe[_0x995d('0x1a')]=_0x505b9a;if(_0x2a6711['query'][_0x995d('0x4c')]){_0x5cc408[_0x995d('0x4d')]=[{'all':!![]}];}return db[_0x995d('0x26')][_0x995d('0x4e')](_0x5cc408);})[_0x995d('0x21')](function(_0x4eba39){_0x381afe[_0x995d('0x4f')]=_0x4eba39;return _0x381afe;})[_0x995d('0x21')](respondWithFilteredResult(_0x29e964,_0x5cc408))['catch'](handleError(_0x29e964,null));};exports[_0x995d('0x50')]=function(_0x377565,_0x3aaf00){var _0x2a1c04={'raw':!![],'where':{'id':_0x377565[_0x995d('0x51')]['id']}},_0x394a52={};_0x394a52[_0x995d('0x28')]=_[_0x995d('0x29')](db[_0x995d('0x26')][_0x995d('0x27')]);_0x394a52[_0x995d('0x2a')]=_[_0x995d('0x29')](_0x377565[_0x995d('0x2a')]);_0x394a52[_0x995d('0x2c')]=_['intersection'](_0x394a52[_0x995d('0x28')],_0x394a52[_0x995d('0x2a')]);_0x2a1c04[_0x995d('0x3e')]=_['intersection'](_0x394a52[_0x995d('0x28')],qs['fields'](_0x377565[_0x995d('0x2a')][_0x995d('0x3d')]));_0x2a1c04['attributes']=_0x2a1c04['attributes'][_0x995d('0x3f')]?_0x2a1c04['attributes']:_0x394a52[_0x995d('0x28')];if(_0x377565[_0x995d('0x2a')][_0x995d('0x4c')]){_0x2a1c04[_0x995d('0x4d')]=[{'all':!![]}];}_0x2a1c04=_[_0x995d('0x46')]({},_0x2a1c04,_0x377565[_0x995d('0x4b')]);return db[_0x995d('0x26')][_0x995d('0x52')](_0x2a1c04)['then'](handleEntityNotFound(_0x3aaf00,null))[_0x995d('0x21')](respondWithResult(_0x3aaf00,null))[_0x995d('0x53')](handleError(_0x3aaf00,null));};exports[_0x995d('0x54')]=function(_0x1979d4,_0x1c2ef0){return db[_0x995d('0x26')]['create'](_0x1979d4[_0x995d('0x55')],{})[_0x995d('0x21')](respondWithResult(_0x1c2ef0,0xc9))[_0x995d('0x53')](handleError(_0x1c2ef0,null));};exports[_0x995d('0x20')]=function(_0x118b25,_0x2f101a){if(_0x118b25['body']['id']){delete _0x118b25['body']['id'];}return db[_0x995d('0x26')]['find']({'where':{'id':_0x118b25[_0x995d('0x51')]['id']}})[_0x995d('0x21')](handleEntityNotFound(_0x2f101a,null))[_0x995d('0x21')](saveUpdates(_0x118b25[_0x995d('0x55')],null))[_0x995d('0x21')](respondWithResult(_0x2f101a,null))[_0x995d('0x53')](handleError(_0x2f101a,null));};exports[_0x995d('0x56')]=function(_0x1bbe82,_0x286f3b){return db['CmHopper'][_0x995d('0x56')]()[_0x995d('0x21')](respondWithResult(_0x286f3b,null))['catch'](handleError(_0x286f3b,null));};exports['destroy']=function(_0x2e3ec7,_0x4e4337){var _0x110e3c;return db[_0x995d('0x26')]['find']({'where':{'id':_0x2e3ec7[_0x995d('0x51')]['id']}})[_0x995d('0x21')](handleEntityNotFound(_0x4e4337,null))[_0x995d('0x21')](function(_0xad74de){if(_0xad74de){return _0xad74de[_0x995d('0x22')]()[_0x995d('0x21')](function(_0x340d23){return _0x340d23;});}})[_0x995d('0x21')](function(_0x19f268){_0x110e3c=_0x19f268;if(_0x19f268){if(_0x19f268[_0x995d('0x57')]||_0x19f268[_0x995d('0x58')]){return db[_0x19f268['VoiceQueueId']?_0x995d('0x59'):_0x995d('0x5a')][_0x995d('0x52')]({'where':{'id':_0x19f268[_0x995d('0x57')]?_0x19f268[_0x995d('0x57')]:_0x19f268['CampaignId']},'attributes':['id',_0x995d('0x24')],'raw':!![]});}}})[_0x995d('0x21')](function(_0xe8de22){var _0x258591={};if(_0xe8de22){_[_0x995d('0x46')](_0x258591,_[_0x995d('0x5b')](_0x110e3c[_0x995d('0x5c')],['createdAt','updatedAt','id']));_0x258591[_0x995d('0x5d')]=0x15;_0x258591['statedesc']=_0x995d('0x5e');_0x258591[_0x995d('0x5f')]=_0xe8de22[_0x995d('0x24')];_0x258591[_0x995d('0x60')]=_0x2e3ec7[_0x995d('0x61')]['name'];_0x258591['UserId']=_0x2e3ec7[_0x995d('0x61')]['id'];_0x258591[_0x995d('0x5e')]=!![];_0x258591['deletedat']=moment()[_0x995d('0x62')]('YYYY-MM-DD\x20HH:mm:ss');_0x258591[_0x995d('0x63')]=_0x110e3c[_0x995d('0x64')];_0x258591[_0x995d('0x65')]=_0x110e3c['VoiceQueueId']?_0x995d('0x66'):_0x995d('0x67');return db[_0x995d('0x68')][_0x995d('0x52')]({'where':{'id':_0x258591[_0x995d('0x69')]},'attributes':[_0x995d('0x6a'),_0x995d('0x6b')]})[_0x995d('0x21')](function(_0x51edbc){if(!_['isNil'](_0x4e4337)&&!_['isNil'](_0x51edbc['firstName'])){_0x258591['calleridname']=_0x51edbc[_0x995d('0x6a')];if(!_[_0x995d('0x6c')](_0x51edbc[_0x995d('0x6b')])){_0x258591[_0x995d('0x6d')]+='\x20'+_0x51edbc[_0x995d('0x6b')];}}})['finally'](function(){return db['CmHopperFinal']['create'](_0x258591);});}})[_0x995d('0x21')](function(){return _0x4e4337[_0x995d('0x17')](0xcc)[_0x995d('0x18')]();})[_0x995d('0x53')](handleError(_0x4e4337,null));};exports[_0x995d('0x6e')]=function(_0x1780e0,_0xa77635,_0x3e2bea){var _0x2d1d5c=[];return db['CmContact'][_0x995d('0x56')]()[_0x995d('0x21')](function(_0x52b059){_0x2d1d5c=_[_0x995d('0x29')](_0x52b059);return _0x1780e0[_0x995d('0x61')][_0x995d('0x6f')]({'where':{'type':'outbound','dialActive':!![],'dialMethod':_0x995d('0x70')},'attributes':['id',_0x995d('0x71')],'raw':!![]});})[_0x995d('0x21')](function(_0xf142e6){if(_0xf142e6&&_0xf142e6[_0x995d('0x3f')]){return db[_0x995d('0x72')][_0x995d('0x73')](function(_0x463684){var _0x2f12d6={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x995d('0x62')](_0x995d('0x74'))},'VoiceQueueId':{'$in':_[_0x995d('0x47')](_0xf142e6,'id')},'$or':[{'UserId':null},{'UserId':_0x1780e0[_0x995d('0x61')]['id']}]};var _0x2a07f9=[];if(_0x1780e0['body']['direction']&&_0x1780e0[_0x995d('0x55')]['direction']==='prev'){if(!_[_0x995d('0x75')](_0x1780e0[_0x995d('0x55')][_0x995d('0x76')])){_0x2f12d6['id']={'$in':_0x1780e0[_0x995d('0x55')][_0x995d('0x76')]};}_0x2a07f9=[[_0x995d('0x77'),_0x995d('0x78')],['scheduledAt',_0xf142e6[0x0][_0x995d('0x71')]===_0x995d('0x78')?_0x995d('0x79'):_0x995d('0x78')],db[_0x995d('0x72')][_0x995d('0x7a')](_0x995d('0x7b')),['id',_0x995d('0x79')]];}else{if(!_['isEmpty'](_0x1780e0[_0x995d('0x55')][_0x995d('0x76')])){_0x2f12d6['id']={'$notIn':_0x1780e0[_0x995d('0x55')][_0x995d('0x76')]};}_0x2a07f9=[[_0x995d('0x77'),_0x995d('0x79')],[_0x995d('0x7c'),_0xf142e6[0x0][_0x995d('0x71')]],db[_0x995d('0x72')][_0x995d('0x7a')](_0x995d('0x7d')),['id',_0x995d('0x78')]];}return db[_0x995d('0x26')][_0x995d('0x7e')]({'attributes':['id','scheduledat'],'where':_0x2f12d6,'order':_0x2a07f9,'transaction':_0x463684,'lock':_0x463684[_0x995d('0x7f')]['UPDATE'],'include':[{'model':db[_0x995d('0x68')],'as':_0x995d('0x80'),'attributes':_0x2d1d5c,'include':[{'model':db[_0x995d('0x81')],'as':_0x995d('0x82'),'attributes':['id','name']}]},{'model':db[_0x995d('0x83')],'as':_0x995d('0x84'),'attributes':['id',_0x995d('0x24')]},{'model':db[_0x995d('0x59')],'as':'Queue','attributes':['id','name','dialActive']}]})['then'](function(_0x1be9f5){if(_0x1be9f5){return _0x1be9f5[_0x995d('0x20')]({'UserId':_0x1780e0[_0x995d('0x61')]['id']},{'transaction':_0x463684});}});});}})['then'](handleEntityNotFound(_0xa77635,null))[_0x995d('0x21')](respondWithResult(_0xa77635,null))[_0x995d('0x53')](handleError(_0xa77635,null));};exports[_0x995d('0x85')]=function(_0x4a09bb,_0x4e7fbd,_0x132232){return _0x4a09bb[_0x995d('0x61')]['getVoiceQueues']({'where':{'type':_0x995d('0x86'),'dialActive':!![],'dialMethod':_0x995d('0x70')},'attributes':['id'],'raw':!![]})['then'](function(_0x1edfdd){if(_0x1edfdd&&_0x1edfdd[_0x995d('0x3f')]){return db['CmHopper'][_0x995d('0x1a')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x995d('0x62')]('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_[_0x995d('0x47')](_0x1edfdd,'id')},'$or':[{'UserId':null},{'UserId':_0x4a09bb['user']['id']}]}});}return 0x0;})[_0x995d('0x21')](function(_0x2ee12c){if(!_[_0x995d('0x6c')](_0x2ee12c)&&_['isNumber'](_0x2ee12c)){return _0x4e7fbd[_0x995d('0x17')](0xc8)[_0x995d('0x19')]({'contacts':_0x2ee12c});}else{logger['error']('CmHopper,\x20%s,\x20%s,\x20%s',_0x995d('0x85'),0x194,_0x995d('0x87'));_0x4e7fbd['sendStatus'](0x194);}})[_0x995d('0x53')](handleError(_0x4e7fbd,null));};
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.model.js b/server/api/cmHopper/cmHopper.model.js
index 6109432..0c8898a 100644
--- a/server/api/cmHopper/cmHopper.model.js
+++ b/server/api/cmHopper/cmHopper.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0713=['exports','define','CmHopper','cm_hopper','scheduledat','phone','priority','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./cmHopper.attributes'];(function(_0x3726d4,_0x3a66cb){var _0x16877c=function(_0x408375){while(--_0x408375){_0x3726d4['push'](_0x3726d4['shift']());}};_0x16877c(++_0x3a66cb);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));module[_0x3071('0x8')]=function(_0xabd7b6,_0x41cf76){return _0xabd7b6[_0x3071('0x9')](_0x3071('0xa'),attributes,{'tableName':_0x3071('0xb'),'paranoid':![],'indexes':[{'name':_0x3071('0xc'),'fields':[_0x3071('0xc')]},{'name':_0x3071('0xd'),'fields':[_0x3071('0xd')]},{'name':'priority','fields':[_0x3071('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x4e81=['../../config/environment','./cmHopper.attributes','exports','define','CmHopper','cm_hopper','scheduledat','phone','priority','lodash','util','../../config/logger','request-promise','path','rimraf'];(function(_0x34f17e,_0x2771c0){var _0x1e6a56=function(_0x5f33d3){while(--_0x5f33d3){_0x34f17e['push'](_0x34f17e['shift']());}};_0x1e6a56(++_0x2771c0);}(_0x4e81,0x1bc));var _0x14e8=function(_0x20b29c,_0xe22528){_0x20b29c=_0x20b29c-0x0;var _0x20d81b=_0x4e81[_0x20b29c];return _0x20d81b;};'use strict';var _=require(_0x14e8('0x0'));var util=require(_0x14e8('0x1'));var logger=require(_0x14e8('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x14e8('0x3'));var fs=require('fs');var path=require(_0x14e8('0x4'));var rimraf=require(_0x14e8('0x5'));var config=require(_0x14e8('0x6'));var attributes=require(_0x14e8('0x7'));module[_0x14e8('0x8')]=function(_0x56a266,_0x57c79b){return _0x56a266[_0x14e8('0x9')](_0x14e8('0xa'),attributes,{'tableName':_0x14e8('0xb'),'paranoid':![],'indexes':[{'name':_0x14e8('0xc'),'fields':[_0x14e8('0xc')]},{'name':_0x14e8('0xd'),'fields':[_0x14e8('0xd')]},{'name':_0x14e8('0xe'),'fields':[_0x14e8('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.rpc.js b/server/api/cmHopper/cmHopper.rpc.js
index cbe0f7f..9305a28 100644
--- a/server/api/cmHopper/cmHopper.rpc.js
+++ b/server/api/cmHopper/cmHopper.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd3e8=['../../config/environment','jayson/promise','client','http','request','then','debug','CmHopper,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','CmHopper,\x20%s,\x20%s','message','info','result','catch','GetCmHopper','CmHopper','options','raw','where','limit','include','map','model','attributes','ShowCmHopper','find','create','body','CreateCmHopper','UpdateCmHopper','DestroyCmHopper','GetContactDialer','CmContact','describe','sequelize','transaction','findAll','Contact','push','CmHopperFinal','destroy','MoveContactManagedDialer','CountReScheduled','COUNT','`scheduledat`\x20>=\x20','format','\x22%s\x22','\x20,\x201,\x20null','contactsRescheduled','GetContactRecallMe','order','UserId','LOCK','length','all','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc'];(function(_0x93942f,_0xb48547){var _0x23fcd8=function(_0x4728be){while(--_0x4728be){_0x93942f['push'](_0x93942f['shift']());}};_0x23fcd8(++_0xb48547);}(_0xd3e8,0xfc));var _0x8d3e=function(_0x415157,_0x4f970f){_0x415157=_0x415157-0x0;var _0x134345=_0xd3e8[_0x415157];return _0x134345;};'use strict';var _=require(_0x8d3e('0x0'));var util=require(_0x8d3e('0x1'));var moment=require(_0x8d3e('0x2'));var BPromise=require(_0x8d3e('0x3'));var rs=require(_0x8d3e('0x4'));var fs=require('fs');var Redis=require(_0x8d3e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8d3e('0x6'));var logger=require('../../config/logger')(_0x8d3e('0x7'));var config=require(_0x8d3e('0x8'));var jayson=require(_0x8d3e('0x9'));var client=jayson[_0x8d3e('0xa')][_0x8d3e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x49b045,_0xeec1e,_0x33a306){return new BPromise(function(_0x6f0af8,_0x3679bc){return client[_0x8d3e('0xc')](_0x49b045,_0x33a306)[_0x8d3e('0xd')](function(_0x569dc4){logger['info']('CmHopper,\x20%s,\x20%s',_0xeec1e,'request\x20sent');logger[_0x8d3e('0xe')](_0x8d3e('0xf'),_0xeec1e,_0x8d3e('0x10'),JSON[_0x8d3e('0x11')](_0x569dc4));if(_0x569dc4[_0x8d3e('0x12')]){if(_0x569dc4[_0x8d3e('0x12')]['code']===0x1f4){logger[_0x8d3e('0x12')](_0x8d3e('0x13'),_0xeec1e,_0x569dc4[_0x8d3e('0x12')][_0x8d3e('0x14')]);return _0x3679bc(_0x569dc4['error']['message']);}logger[_0x8d3e('0x12')](_0x8d3e('0x13'),_0xeec1e,_0x569dc4[_0x8d3e('0x12')][_0x8d3e('0x14')]);return _0x6f0af8(_0x569dc4['error'][_0x8d3e('0x14')]);}else{logger[_0x8d3e('0x15')]('CmHopper,\x20%s,\x20%s',_0xeec1e,'request\x20sent');_0x6f0af8(_0x569dc4[_0x8d3e('0x16')][_0x8d3e('0x14')]);}})[_0x8d3e('0x17')](function(_0x515b1d){logger[_0x8d3e('0x12')](_0x8d3e('0x13'),_0xeec1e,_0x515b1d);_0x3679bc(_0x515b1d);});});}exports[_0x8d3e('0x18')]=function(_0x5309eb){var _0x4509bb=this;return new Promise(function(_0x1fef36,_0x1b60fc){return db[_0x8d3e('0x19')]['findAll']({'raw':_0x5309eb[_0x8d3e('0x1a')]?_0x5309eb[_0x8d3e('0x1a')][_0x8d3e('0x1b')]===undefined?!![]:![]:!![],'where':_0x5309eb[_0x8d3e('0x1a')]?_0x5309eb[_0x8d3e('0x1a')][_0x8d3e('0x1c')]||null:null,'attributes':_0x5309eb[_0x8d3e('0x1a')]?_0x5309eb['options']['attributes']||null:null,'limit':_0x5309eb[_0x8d3e('0x1a')]?_0x5309eb[_0x8d3e('0x1a')][_0x8d3e('0x1d')]||null:null,'include':_0x5309eb[_0x8d3e('0x1a')]?_0x5309eb[_0x8d3e('0x1a')][_0x8d3e('0x1e')]?_[_0x8d3e('0x1f')](_0x5309eb[_0x8d3e('0x1a')]['include'],function(_0x494fec){return{'model':db[_0x494fec[_0x8d3e('0x20')]],'as':_0x494fec['as'],'attributes':_0x494fec[_0x8d3e('0x21')],'include':_0x494fec[_0x8d3e('0x1e')]?_[_0x8d3e('0x1f')](_0x494fec[_0x8d3e('0x1e')],function(_0x55bb88){return{'model':db[_0x55bb88['model']],'as':_0x55bb88['as'],'attributes':_0x55bb88['attributes'],'include':_0x55bb88[_0x8d3e('0x1e')]?_[_0x8d3e('0x1f')](_0x55bb88[_0x8d3e('0x1e')],function(_0x523a2a){return{'model':db[_0x523a2a[_0x8d3e('0x20')]],'as':_0x523a2a['as'],'attributes':_0x523a2a[_0x8d3e('0x21')]};}):[]};}):[]};}):[]:[]})[_0x8d3e('0xd')](function(_0x4e64fc){logger['info'](_0x8d3e('0x18'),_0x5309eb);logger[_0x8d3e('0xe')](_0x8d3e('0x18'),_0x5309eb,JSON[_0x8d3e('0x11')](_0x4e64fc));_0x1fef36(_0x4e64fc);})[_0x8d3e('0x17')](function(_0x1ac0be){logger[_0x8d3e('0x12')](_0x8d3e('0x18'),_0x1ac0be[_0x8d3e('0x14')],_0x5309eb);_0x1b60fc(_0x4509bb['error'](0x1f4,_0x1ac0be[_0x8d3e('0x14')]));});});};exports[_0x8d3e('0x22')]=function(_0x3c1561){var _0x240869=this;return new Promise(function(_0x1b7258,_0x2b7b95){return db[_0x8d3e('0x19')][_0x8d3e('0x23')]({'raw':_0x3c1561['options']?_0x3c1561['options'][_0x8d3e('0x1b')]===undefined?!![]:![]:!![],'where':_0x3c1561[_0x8d3e('0x1a')]?_0x3c1561['options']['where']||null:null,'attributes':_0x3c1561[_0x8d3e('0x1a')]?_0x3c1561[_0x8d3e('0x1a')][_0x8d3e('0x21')]||null:null,'include':_0x3c1561[_0x8d3e('0x1a')]?_0x3c1561[_0x8d3e('0x1a')][_0x8d3e('0x1e')]?_[_0x8d3e('0x1f')](_0x3c1561['options'][_0x8d3e('0x1e')],function(_0x188009){return{'model':db[_0x188009[_0x8d3e('0x20')]],'as':_0x188009['as'],'attributes':_0x188009['attributes'],'include':_0x188009[_0x8d3e('0x1e')]?_[_0x8d3e('0x1f')](_0x188009[_0x8d3e('0x1e')],function(_0x3429fc){return{'model':db[_0x3429fc[_0x8d3e('0x20')]],'as':_0x3429fc['as'],'attributes':_0x3429fc['attributes'],'include':_0x3429fc[_0x8d3e('0x1e')]?_[_0x8d3e('0x1f')](_0x3429fc[_0x8d3e('0x1e')],function(_0x35977e){return{'model':db[_0x35977e[_0x8d3e('0x20')]],'as':_0x35977e['as'],'attributes':_0x35977e['attributes']};}):[]};}):[]};}):[]:[]})[_0x8d3e('0xd')](function(_0x11b85c){logger[_0x8d3e('0x15')](_0x8d3e('0x22'),_0x3c1561);logger[_0x8d3e('0xe')](_0x8d3e('0x22'),_0x3c1561,JSON[_0x8d3e('0x11')](_0x11b85c));_0x1b7258(_0x11b85c);})[_0x8d3e('0x17')](function(_0x3756c1){logger[_0x8d3e('0x12')](_0x8d3e('0x22'),_0x3756c1[_0x8d3e('0x14')],_0x3c1561);_0x2b7b95(_0x240869['error'](0x1f4,_0x3756c1[_0x8d3e('0x14')]));});});};exports['CreateCmHopper']=function(_0xef85dd){var _0x3aaf26=this;return new Promise(function(_0x116f6b,_0x78e517){return db[_0x8d3e('0x19')][_0x8d3e('0x24')](_0xef85dd[_0x8d3e('0x25')],{'raw':_0xef85dd[_0x8d3e('0x1a')]?_0xef85dd['options']['raw']===undefined?!![]:![]:!![]})[_0x8d3e('0xd')](function(_0x433591){logger['info'](_0x8d3e('0x26'),_0xef85dd);logger[_0x8d3e('0xe')](_0x8d3e('0x26'),_0xef85dd,JSON[_0x8d3e('0x11')](_0x433591));_0x116f6b(_0x433591);})[_0x8d3e('0x17')](function(_0x148515){logger[_0x8d3e('0x12')]('CreateCmHopper',_0x148515[_0x8d3e('0x14')],_0xef85dd);_0x78e517(_0x3aaf26['error'](0x1f4,_0x148515[_0x8d3e('0x14')]));});});};exports[_0x8d3e('0x27')]=function(_0x59a2a2){var _0x3f9638=this;return new Promise(function(_0x25b868,_0x341423){return db[_0x8d3e('0x19')]['update'](_0x59a2a2[_0x8d3e('0x25')],{'raw':_0x59a2a2[_0x8d3e('0x1a')]?_0x59a2a2[_0x8d3e('0x1a')][_0x8d3e('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59a2a2[_0x8d3e('0x1a')]?_0x59a2a2['options']['where']||null:null,'attributes':_0x59a2a2['options']?_0x59a2a2['options'][_0x8d3e('0x21')]||null:null,'limit':_0x59a2a2[_0x8d3e('0x1a')]?_0x59a2a2[_0x8d3e('0x1a')][_0x8d3e('0x1d')]||null:null})[_0x8d3e('0xd')](function(_0x33ac2e){logger[_0x8d3e('0x15')](_0x8d3e('0x27'),_0x59a2a2);logger[_0x8d3e('0xe')](_0x8d3e('0x27'),_0x59a2a2,JSON[_0x8d3e('0x11')](_0x33ac2e));_0x25b868(_0x33ac2e);})['catch'](function(_0xa23f86){logger[_0x8d3e('0x12')](_0x8d3e('0x27'),_0xa23f86['message'],_0x59a2a2);_0x341423(_0x3f9638[_0x8d3e('0x12')](0x1f4,_0xa23f86[_0x8d3e('0x14')]));});});};exports[_0x8d3e('0x28')]=function(_0x52c3d5){var _0x256f08=this;return new Promise(function(_0x51e7c9,_0x12c56f){return db['CmHopper']['destroy']({'where':_0x52c3d5[_0x8d3e('0x1a')]?_0x52c3d5[_0x8d3e('0x1a')][_0x8d3e('0x1c')]||null:null})['then'](function(_0x92bb){logger[_0x8d3e('0x15')](_0x8d3e('0x28'),_0x52c3d5);logger[_0x8d3e('0xe')](_0x8d3e('0x28'),_0x52c3d5,JSON[_0x8d3e('0x11')](_0x92bb));_0x51e7c9(_0x92bb);})[_0x8d3e('0x17')](function(_0x2e6745){logger[_0x8d3e('0x12')](_0x8d3e('0x28'),_0x2e6745[_0x8d3e('0x14')],_0x52c3d5);_0x12c56f(_0x256f08[_0x8d3e('0x12')](0x1f4,_0x2e6745['message']));});});};exports[_0x8d3e('0x29')]=function(_0xfaf9b8){var _0x54f8a9=this;return new Promise(function(_0x2e16b9,_0x1caad7){return db[_0x8d3e('0x2a')][_0x8d3e('0x2b')]()['then'](function(_0x3fb83e){return db[_0x8d3e('0x2c')][_0x8d3e('0x2d')](function(_0x70bde){return db[_0x8d3e('0x19')][_0x8d3e('0x2e')]({'where':_0xfaf9b8[_0x8d3e('0x1a')]?_0xfaf9b8[_0x8d3e('0x1a')]['where']||null:null,'attributes':_0xfaf9b8['options']?_0xfaf9b8['options'][_0x8d3e('0x21')]||null:null,'limit':_0xfaf9b8[_0x8d3e('0x1a')]?_0xfaf9b8[_0x8d3e('0x1a')][_0x8d3e('0x1d')]||null:null,'order':_0xfaf9b8[_0x8d3e('0x1a')]?_0xfaf9b8[_0x8d3e('0x1a')]['order']||null:null,'transaction':_0x70bde,'lock':_0x70bde['LOCK']['UPDATE'],'include':[{'model':db[_0x8d3e('0x2a')],'as':_0x8d3e('0x2f'),'attributes':_['keys'](_0x3fb83e)}]})['then'](function(_0x3a170c){var _0x12f848=[];for(var _0x18f557=0x0;_0x18f557<_0x3a170c['length'];_0x18f557+=0x1){_0x12f848[_0x8d3e('0x30')](_0x3a170c[_0x18f557]['update'](_0xfaf9b8['body'],{'transaction':_0x70bde}));}return BPromise['all'](_0x12f848);});})['then'](function(_0xe3e042){logger[_0x8d3e('0x15')](_0x8d3e('0x29'),_0xfaf9b8);logger['debug'](_0x8d3e('0x29'),_0xfaf9b8,JSON['stringify'](_0xe3e042));_0x2e16b9(_0xe3e042);})['catch'](function(_0x2ef149){logger[_0x8d3e('0x12')](_0x8d3e('0x29'),_0x2ef149[_0x8d3e('0x14')],_0xfaf9b8);_0x1caad7(_0x54f8a9[_0x8d3e('0x12')](0x1f4,_0x2ef149[_0x8d3e('0x14')]));});});});};exports['MoveContactManagedDialer']=function(_0x53724c){var _0x3ec31a=this;return new Promise(function(_0x344e79,_0x30e042){return db[_0x8d3e('0x2c')]['transaction'](function(_0x5919a9){return db[_0x8d3e('0x31')][_0x8d3e('0x24')](_0x53724c[_0x8d3e('0x25')],{'raw':_0x53724c['options']?_0x53724c[_0x8d3e('0x1a')][_0x8d3e('0x1b')]===undefined?!![]:![]:!![],'transaction':_0x5919a9})['then'](function(){return db[_0x8d3e('0x19')][_0x8d3e('0x32')]({'where':_0x53724c['options']?_0x53724c[_0x8d3e('0x1a')][_0x8d3e('0x1c')]||null:null,'transaction':_0x5919a9});});})[_0x8d3e('0xd')](function(_0x59964a){logger[_0x8d3e('0x15')](_0x8d3e('0x33'),_0x53724c);logger[_0x8d3e('0xe')](_0x8d3e('0x33'),_0x53724c,JSON['stringify'](_0x59964a));_0x344e79(_0x59964a);})[_0x8d3e('0x17')](function(_0x3b7598){logger['error'](_0x8d3e('0x33'),_0x3b7598[_0x8d3e('0x14')],_0x53724c);_0x30e042(_0x3ec31a['error'](0x1f4,_0x3b7598['message']));});});};exports[_0x8d3e('0x34')]=function(_0x55334d){var _0xb9c0a5=this;return new Promise(function(_0x57e13e,_0x58d1a9){return db[_0x8d3e('0x19')]['findAll']({'raw':_0x55334d[_0x8d3e('0x1a')]?_0x55334d['options'][_0x8d3e('0x1b')]===undefined?!![]:![]:!![],'where':_0x55334d[_0x8d3e('0x1a')]?_0x55334d[_0x8d3e('0x1a')]['where']||null:null,'attributes':[[db[_0x8d3e('0x2c')]['fn'](_0x8d3e('0x35'),db[_0x8d3e('0x2c')]['fn']('IF',db['sequelize']['literal'](_0x8d3e('0x36')+util[_0x8d3e('0x37')](_0x8d3e('0x38'),moment()['format']('YYYY-MM-DD\x20HH:mm:ss'))+_0x8d3e('0x39')))),_0x8d3e('0x3a')]]})[_0x8d3e('0xd')](function(_0x35be53){logger['info'](_0x8d3e('0x34'),_0x55334d);logger[_0x8d3e('0xe')](_0x8d3e('0x34'),_0x55334d,JSON[_0x8d3e('0x11')](_0x35be53));_0x57e13e(_0x35be53);})[_0x8d3e('0x17')](function(_0x279dc5){logger['error'](_0x8d3e('0x34'),_0x279dc5[_0x8d3e('0x14')],_0x55334d);_0x58d1a9(_0xb9c0a5[_0x8d3e('0x12')](0x1f4,_0x279dc5[_0x8d3e('0x14')]));});});};exports[_0x8d3e('0x3b')]=function(_0x168b80){var _0x41f4c6=this;return new Promise(function(_0x45e112,_0x16a314){return db[_0x8d3e('0x2a')]['describe']()[_0x8d3e('0xd')](function(_0x59473e){return db[_0x8d3e('0x2c')][_0x8d3e('0x2d')](function(_0x2d05e8){return db[_0x8d3e('0x19')][_0x8d3e('0x2e')]({'where':_0x168b80[_0x8d3e('0x1a')]?_0x168b80[_0x8d3e('0x1a')][_0x8d3e('0x1c')]||null:null,'attributes':_0x168b80[_0x8d3e('0x1a')]?_0x168b80[_0x8d3e('0x1a')][_0x8d3e('0x21')]||null:null,'limit':0x1,'order':_0x168b80['options']?_0x168b80[_0x8d3e('0x1a')][_0x8d3e('0x3c')]||null:null,'group':db[_0x8d3e('0x19')][_0x8d3e('0x3d')],'transaction':_0x2d05e8,'lock':_0x2d05e8[_0x8d3e('0x3e')]['UPDATE'],'include':_0x168b80[_0x8d3e('0x1a')]?_0x168b80[_0x8d3e('0x1a')][_0x8d3e('0x1e')]?_['map'](_0x168b80[_0x8d3e('0x1a')]['include'],function(_0x4dcbee){return{'model':db[_0x4dcbee[_0x8d3e('0x20')]],'as':_0x4dcbee['as'],'attributes':_0x4dcbee[_0x8d3e('0x21')],'include':_0x4dcbee[_0x8d3e('0x1e')]?_['map'](_0x4dcbee[_0x8d3e('0x1e')],function(_0x536440){return{'model':db[_0x536440['model']],'as':_0x536440['as'],'attributes':_0x536440[_0x8d3e('0x21')],'include':_0x536440[_0x8d3e('0x1e')]?_['map'](_0x536440['include'],function(_0x24c970){return{'model':db[_0x24c970['model']],'as':_0x24c970['as'],'attributes':_0x24c970[_0x8d3e('0x21')]};}):[]};}):[]};}):[]:[]})[_0x8d3e('0xd')](function(_0x4fc0c2){var _0x3998f3=[];for(var _0xf66753=0x0;_0xf66753<_0x4fc0c2[_0x8d3e('0x3f')];_0xf66753+=0x1){_0x3998f3[_0x8d3e('0x30')](_0x4fc0c2[_0xf66753]['update'](_0x168b80['body'],{'transaction':_0x2d05e8}));}return BPromise[_0x8d3e('0x40')](_0x3998f3);});})[_0x8d3e('0xd')](function(_0x4c1581){logger['info'](_0x8d3e('0x3b'),_0x168b80);logger[_0x8d3e('0xe')](_0x8d3e('0x3b'),_0x168b80,JSON[_0x8d3e('0x11')](_0x4c1581));_0x45e112(_0x4c1581);})[_0x8d3e('0x17')](function(_0x5b2c1d){logger[_0x8d3e('0x12')](_0x8d3e('0x3b'),_0x5b2c1d[_0x8d3e('0x14')],_0x168b80);_0x16a314(_0x41f4c6[_0x8d3e('0x12')](0x1f4,_0x5b2c1d[_0x8d3e('0x14')]));});});});};
\ No newline at end of file
+var _0x4eb1=['find','ShowCmHopper','create','body','CreateCmHopper','UpdateCmHopper','update','DestroyCmHopper','destroy','describe','sequelize','transaction','UPDATE','CmContact','Contact','keys','length','push','all','GetContactDialer','CmHopperFinal','MoveContactManagedDialer','CountReScheduled','COUNT','literal','`scheduledat`\x20>=\x20','format','\x22%s\x22','YYYY-MM-DD\x20HH:mm:ss','\x20,\x201,\x20null','contactsRescheduled','order','UserId','LOCK','GetContactRecallMe','lodash','util','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','http','request','then','info','CmHopper,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetCmHopper','CmHopper','findAll','options','raw','where','attributes','limit','include','model','map','debug'];(function(_0x506926,_0x5a58c1){var _0x1e12c7=function(_0x4b29a8){while(--_0x4b29a8){_0x506926['push'](_0x506926['shift']());}};_0x1e12c7(++_0x5a58c1);}(_0x4eb1,0x1af));var _0x14eb=function(_0x47394e,_0x5f26f2){_0x47394e=_0x47394e-0x0;var _0x4390f2=_0x4eb1[_0x47394e];return _0x4390f2;};'use strict';var _=require(_0x14eb('0x0'));var util=require(_0x14eb('0x1'));var moment=require('moment');var BPromise=require(_0x14eb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x14eb('0x3'))['db'];var utils=require(_0x14eb('0x4'));var logger=require('../../config/logger')(_0x14eb('0x5'));var config=require(_0x14eb('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0x14eb('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x56d682,_0x263388,_0x18ba8e){return new BPromise(function(_0x4c41a3,_0x5bf1de){return client[_0x14eb('0x8')](_0x56d682,_0x18ba8e)[_0x14eb('0x9')](function(_0x5cb4e0){logger[_0x14eb('0xa')](_0x14eb('0xb'),_0x263388,_0x14eb('0xc'));logger['debug']('CmHopper,\x20%s,\x20%s,\x20%s',_0x263388,_0x14eb('0xc'),JSON[_0x14eb('0xd')](_0x5cb4e0));if(_0x5cb4e0[_0x14eb('0xe')]){if(_0x5cb4e0[_0x14eb('0xe')][_0x14eb('0xf')]===0x1f4){logger[_0x14eb('0xe')]('CmHopper,\x20%s,\x20%s',_0x263388,_0x5cb4e0[_0x14eb('0xe')][_0x14eb('0x10')]);return _0x5bf1de(_0x5cb4e0[_0x14eb('0xe')][_0x14eb('0x10')]);}logger[_0x14eb('0xe')](_0x14eb('0xb'),_0x263388,_0x5cb4e0[_0x14eb('0xe')][_0x14eb('0x10')]);return _0x4c41a3(_0x5cb4e0[_0x14eb('0xe')][_0x14eb('0x10')]);}else{logger['info'](_0x14eb('0xb'),_0x263388,_0x14eb('0xc'));_0x4c41a3(_0x5cb4e0[_0x14eb('0x11')]['message']);}})[_0x14eb('0x12')](function(_0x1a749a){logger[_0x14eb('0xe')](_0x14eb('0xb'),_0x263388,_0x1a749a);_0x5bf1de(_0x1a749a);});});}exports[_0x14eb('0x13')]=function(_0x1d43fe){var _0x499338=this;return new Promise(function(_0x2b6fe7,_0x42f9d0){return db[_0x14eb('0x14')][_0x14eb('0x15')]({'raw':_0x1d43fe[_0x14eb('0x16')]?_0x1d43fe[_0x14eb('0x16')][_0x14eb('0x17')]===undefined?!![]:![]:!![],'where':_0x1d43fe[_0x14eb('0x16')]?_0x1d43fe[_0x14eb('0x16')][_0x14eb('0x18')]||null:null,'attributes':_0x1d43fe['options']?_0x1d43fe[_0x14eb('0x16')][_0x14eb('0x19')]||null:null,'limit':_0x1d43fe[_0x14eb('0x16')]?_0x1d43fe[_0x14eb('0x16')][_0x14eb('0x1a')]||null:null,'include':_0x1d43fe[_0x14eb('0x16')]?_0x1d43fe[_0x14eb('0x16')]['include']?_['map'](_0x1d43fe[_0x14eb('0x16')][_0x14eb('0x1b')],function(_0x2f1a68){return{'model':db[_0x2f1a68['model']],'as':_0x2f1a68['as'],'attributes':_0x2f1a68[_0x14eb('0x19')],'include':_0x2f1a68[_0x14eb('0x1b')]?_['map'](_0x2f1a68['include'],function(_0x404d56){return{'model':db[_0x404d56[_0x14eb('0x1c')]],'as':_0x404d56['as'],'attributes':_0x404d56[_0x14eb('0x19')],'include':_0x404d56[_0x14eb('0x1b')]?_[_0x14eb('0x1d')](_0x404d56['include'],function(_0x5166de){return{'model':db[_0x5166de[_0x14eb('0x1c')]],'as':_0x5166de['as'],'attributes':_0x5166de['attributes']};}):[]};}):[]};}):[]:[]})[_0x14eb('0x9')](function(_0x5a89c6){logger[_0x14eb('0xa')](_0x14eb('0x13'),_0x1d43fe);logger[_0x14eb('0x1e')]('GetCmHopper',_0x1d43fe,JSON['stringify'](_0x5a89c6));_0x2b6fe7(_0x5a89c6);})['catch'](function(_0x5e5e1d){logger['error']('GetCmHopper',_0x5e5e1d['message'],_0x1d43fe);_0x42f9d0(_0x499338[_0x14eb('0xe')](0x1f4,_0x5e5e1d[_0x14eb('0x10')]));});});};exports['ShowCmHopper']=function(_0x344aa2){var _0x3ec4cb=this;return new Promise(function(_0x2836f5,_0x191e00){return db['CmHopper'][_0x14eb('0x1f')]({'raw':_0x344aa2[_0x14eb('0x16')]?_0x344aa2['options']['raw']===undefined?!![]:![]:!![],'where':_0x344aa2[_0x14eb('0x16')]?_0x344aa2['options'][_0x14eb('0x18')]||null:null,'attributes':_0x344aa2[_0x14eb('0x16')]?_0x344aa2[_0x14eb('0x16')]['attributes']||null:null,'include':_0x344aa2['options']?_0x344aa2['options'][_0x14eb('0x1b')]?_[_0x14eb('0x1d')](_0x344aa2[_0x14eb('0x16')]['include'],function(_0x2e8761){return{'model':db[_0x2e8761[_0x14eb('0x1c')]],'as':_0x2e8761['as'],'attributes':_0x2e8761[_0x14eb('0x19')],'include':_0x2e8761[_0x14eb('0x1b')]?_[_0x14eb('0x1d')](_0x2e8761[_0x14eb('0x1b')],function(_0x2167f1){return{'model':db[_0x2167f1[_0x14eb('0x1c')]],'as':_0x2167f1['as'],'attributes':_0x2167f1['attributes'],'include':_0x2167f1[_0x14eb('0x1b')]?_[_0x14eb('0x1d')](_0x2167f1[_0x14eb('0x1b')],function(_0x40823c){return{'model':db[_0x40823c['model']],'as':_0x40823c['as'],'attributes':_0x40823c['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0xdb0f12){logger['info'](_0x14eb('0x20'),_0x344aa2);logger[_0x14eb('0x1e')](_0x14eb('0x20'),_0x344aa2,JSON[_0x14eb('0xd')](_0xdb0f12));_0x2836f5(_0xdb0f12);})[_0x14eb('0x12')](function(_0x2e9d34){logger['error']('ShowCmHopper',_0x2e9d34[_0x14eb('0x10')],_0x344aa2);_0x191e00(_0x3ec4cb[_0x14eb('0xe')](0x1f4,_0x2e9d34[_0x14eb('0x10')]));});});};exports['CreateCmHopper']=function(_0x2e4f65){var _0x5aa070=this;return new Promise(function(_0x4dae55,_0x17c914){return db[_0x14eb('0x14')][_0x14eb('0x21')](_0x2e4f65[_0x14eb('0x22')],{'raw':_0x2e4f65[_0x14eb('0x16')]?_0x2e4f65[_0x14eb('0x16')][_0x14eb('0x17')]===undefined?!![]:![]:!![]})[_0x14eb('0x9')](function(_0x38aa61){logger[_0x14eb('0xa')](_0x14eb('0x23'),_0x2e4f65);logger[_0x14eb('0x1e')](_0x14eb('0x23'),_0x2e4f65,JSON[_0x14eb('0xd')](_0x38aa61));_0x4dae55(_0x38aa61);})[_0x14eb('0x12')](function(_0x31558d){logger[_0x14eb('0xe')](_0x14eb('0x23'),_0x31558d[_0x14eb('0x10')],_0x2e4f65);_0x17c914(_0x5aa070['error'](0x1f4,_0x31558d[_0x14eb('0x10')]));});});};exports[_0x14eb('0x24')]=function(_0x568dee){var _0x4aec62=this;return new Promise(function(_0x3a95c1,_0x16f1f9){return db[_0x14eb('0x14')][_0x14eb('0x25')](_0x568dee[_0x14eb('0x22')],{'raw':_0x568dee[_0x14eb('0x16')]?_0x568dee[_0x14eb('0x16')][_0x14eb('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x568dee[_0x14eb('0x16')]?_0x568dee['options']['where']||null:null,'attributes':_0x568dee['options']?_0x568dee[_0x14eb('0x16')][_0x14eb('0x19')]||null:null,'limit':_0x568dee[_0x14eb('0x16')]?_0x568dee['options'][_0x14eb('0x1a')]||null:null})[_0x14eb('0x9')](function(_0x3b1693){logger['info'](_0x14eb('0x24'),_0x568dee);logger['debug'](_0x14eb('0x24'),_0x568dee,JSON[_0x14eb('0xd')](_0x3b1693));_0x3a95c1(_0x3b1693);})[_0x14eb('0x12')](function(_0xd02f37){logger[_0x14eb('0xe')]('UpdateCmHopper',_0xd02f37['message'],_0x568dee);_0x16f1f9(_0x4aec62[_0x14eb('0xe')](0x1f4,_0xd02f37[_0x14eb('0x10')]));});});};exports[_0x14eb('0x26')]=function(_0x24398d){var _0x11caa4=this;return new Promise(function(_0x200932,_0xf70e01){return db['CmHopper'][_0x14eb('0x27')]({'where':_0x24398d[_0x14eb('0x16')]?_0x24398d[_0x14eb('0x16')][_0x14eb('0x18')]||null:null})['then'](function(_0xeef253){logger[_0x14eb('0xa')](_0x14eb('0x26'),_0x24398d);logger[_0x14eb('0x1e')](_0x14eb('0x26'),_0x24398d,JSON[_0x14eb('0xd')](_0xeef253));_0x200932(_0xeef253);})[_0x14eb('0x12')](function(_0x4fb766){logger['error'](_0x14eb('0x26'),_0x4fb766['message'],_0x24398d);_0xf70e01(_0x11caa4[_0x14eb('0xe')](0x1f4,_0x4fb766['message']));});});};exports['GetContactDialer']=function(_0x95c42c){var _0x537be1=this;return new Promise(function(_0x1c4a71,_0x26d066){return db['CmContact'][_0x14eb('0x28')]()['then'](function(_0x24d4a2){return db[_0x14eb('0x29')][_0x14eb('0x2a')](function(_0x29b3b7){return db[_0x14eb('0x14')][_0x14eb('0x15')]({'where':_0x95c42c[_0x14eb('0x16')]?_0x95c42c['options'][_0x14eb('0x18')]||null:null,'attributes':_0x95c42c[_0x14eb('0x16')]?_0x95c42c[_0x14eb('0x16')]['attributes']||null:null,'limit':_0x95c42c['options']?_0x95c42c[_0x14eb('0x16')]['limit']||null:null,'order':_0x95c42c[_0x14eb('0x16')]?_0x95c42c[_0x14eb('0x16')]['order']||null:null,'transaction':_0x29b3b7,'lock':_0x29b3b7['LOCK'][_0x14eb('0x2b')],'include':[{'model':db[_0x14eb('0x2c')],'as':_0x14eb('0x2d'),'attributes':_[_0x14eb('0x2e')](_0x24d4a2)}]})[_0x14eb('0x9')](function(_0x5126dc){var _0xfa2b22=[];for(var _0x5db618=0x0;_0x5db618<_0x5126dc[_0x14eb('0x2f')];_0x5db618+=0x1){_0xfa2b22[_0x14eb('0x30')](_0x5126dc[_0x5db618][_0x14eb('0x25')](_0x95c42c[_0x14eb('0x22')],{'transaction':_0x29b3b7}));}return BPromise[_0x14eb('0x31')](_0xfa2b22);});})[_0x14eb('0x9')](function(_0x4e6f90){logger['info'](_0x14eb('0x32'),_0x95c42c);logger['debug'](_0x14eb('0x32'),_0x95c42c,JSON[_0x14eb('0xd')](_0x4e6f90));_0x1c4a71(_0x4e6f90);})[_0x14eb('0x12')](function(_0x1a4606){logger['error'](_0x14eb('0x32'),_0x1a4606[_0x14eb('0x10')],_0x95c42c);_0x26d066(_0x537be1[_0x14eb('0xe')](0x1f4,_0x1a4606[_0x14eb('0x10')]));});});});};exports['MoveContactManagedDialer']=function(_0x5cdbbe){var _0x2f4e87=this;return new Promise(function(_0xd84e2f,_0x435f16){return db[_0x14eb('0x29')][_0x14eb('0x2a')](function(_0x530b78){return db[_0x14eb('0x33')][_0x14eb('0x21')](_0x5cdbbe['body'],{'raw':_0x5cdbbe[_0x14eb('0x16')]?_0x5cdbbe[_0x14eb('0x16')][_0x14eb('0x17')]===undefined?!![]:![]:!![],'transaction':_0x530b78})[_0x14eb('0x9')](function(){return db[_0x14eb('0x14')][_0x14eb('0x27')]({'where':_0x5cdbbe[_0x14eb('0x16')]?_0x5cdbbe[_0x14eb('0x16')][_0x14eb('0x18')]||null:null,'transaction':_0x530b78});});})['then'](function(_0x18c63f){logger[_0x14eb('0xa')](_0x14eb('0x34'),_0x5cdbbe);logger[_0x14eb('0x1e')]('MoveContactManagedDialer',_0x5cdbbe,JSON[_0x14eb('0xd')](_0x18c63f));_0xd84e2f(_0x18c63f);})[_0x14eb('0x12')](function(_0x2c0589){logger[_0x14eb('0xe')]('MoveContactManagedDialer',_0x2c0589[_0x14eb('0x10')],_0x5cdbbe);_0x435f16(_0x2f4e87['error'](0x1f4,_0x2c0589['message']));});});};exports[_0x14eb('0x35')]=function(_0x4ac436){var _0x185f96=this;return new Promise(function(_0x2014d7,_0x1d4a2d){return db[_0x14eb('0x14')][_0x14eb('0x15')]({'raw':_0x4ac436[_0x14eb('0x16')]?_0x4ac436['options'][_0x14eb('0x17')]===undefined?!![]:![]:!![],'where':_0x4ac436[_0x14eb('0x16')]?_0x4ac436[_0x14eb('0x16')][_0x14eb('0x18')]||null:null,'attributes':[[db[_0x14eb('0x29')]['fn'](_0x14eb('0x36'),db['sequelize']['fn']('IF',db['sequelize'][_0x14eb('0x37')](_0x14eb('0x38')+util[_0x14eb('0x39')](_0x14eb('0x3a'),moment()[_0x14eb('0x39')](_0x14eb('0x3b')))+_0x14eb('0x3c')))),_0x14eb('0x3d')]]})[_0x14eb('0x9')](function(_0x20c7d5){logger[_0x14eb('0xa')](_0x14eb('0x35'),_0x4ac436);logger['debug']('CountReScheduled',_0x4ac436,JSON[_0x14eb('0xd')](_0x20c7d5));_0x2014d7(_0x20c7d5);})[_0x14eb('0x12')](function(_0x57dad8){logger[_0x14eb('0xe')](_0x14eb('0x35'),_0x57dad8[_0x14eb('0x10')],_0x4ac436);_0x1d4a2d(_0x185f96[_0x14eb('0xe')](0x1f4,_0x57dad8[_0x14eb('0x10')]));});});};exports['GetContactRecallMe']=function(_0x32d866){var _0x877283=this;return new Promise(function(_0xb35122,_0x1eec02){return db['CmContact']['describe']()[_0x14eb('0x9')](function(_0x1f7ee9){return db[_0x14eb('0x29')]['transaction'](function(_0x1dc415){return db['CmHopper'][_0x14eb('0x15')]({'where':_0x32d866[_0x14eb('0x16')]?_0x32d866['options']['where']||null:null,'attributes':_0x32d866['options']?_0x32d866[_0x14eb('0x16')][_0x14eb('0x19')]||null:null,'limit':0x1,'order':_0x32d866[_0x14eb('0x16')]?_0x32d866[_0x14eb('0x16')][_0x14eb('0x3e')]||null:null,'group':db[_0x14eb('0x14')][_0x14eb('0x3f')],'transaction':_0x1dc415,'lock':_0x1dc415[_0x14eb('0x40')][_0x14eb('0x2b')],'include':_0x32d866[_0x14eb('0x16')]?_0x32d866[_0x14eb('0x16')]['include']?_[_0x14eb('0x1d')](_0x32d866[_0x14eb('0x16')]['include'],function(_0x1d4b52){return{'model':db[_0x1d4b52[_0x14eb('0x1c')]],'as':_0x1d4b52['as'],'attributes':_0x1d4b52[_0x14eb('0x19')],'include':_0x1d4b52[_0x14eb('0x1b')]?_['map'](_0x1d4b52[_0x14eb('0x1b')],function(_0x5abf1d){return{'model':db[_0x5abf1d[_0x14eb('0x1c')]],'as':_0x5abf1d['as'],'attributes':_0x5abf1d[_0x14eb('0x19')],'include':_0x5abf1d[_0x14eb('0x1b')]?_[_0x14eb('0x1d')](_0x5abf1d['include'],function(_0x50166f){return{'model':db[_0x50166f['model']],'as':_0x50166f['as'],'attributes':_0x50166f[_0x14eb('0x19')]};}):[]};}):[]};}):[]:[]})[_0x14eb('0x9')](function(_0x587448){var _0x5db181=[];for(var _0x45936f=0x0;_0x45936f<_0x587448[_0x14eb('0x2f')];_0x45936f+=0x1){_0x5db181[_0x14eb('0x30')](_0x587448[_0x45936f][_0x14eb('0x25')](_0x32d866[_0x14eb('0x22')],{'transaction':_0x1dc415}));}return BPromise[_0x14eb('0x31')](_0x5db181);});})['then'](function(_0x34e607){logger[_0x14eb('0xa')](_0x14eb('0x41'),_0x32d866);logger['debug'](_0x14eb('0x41'),_0x32d866,JSON[_0x14eb('0xd')](_0x34e607));_0xb35122(_0x34e607);})[_0x14eb('0x12')](function(_0x32aa40){logger[_0x14eb('0xe')](_0x14eb('0x41'),_0x32aa40[_0x14eb('0x10')],_0x32d866);_0x1eec02(_0x877283[_0x14eb('0xe')](0x1f4,_0x32aa40['message']));});});});};
\ No newline at end of file
diff --git a/server/api/cmHopper/index.js b/server/api/cmHopper/index.js
index 4dc1094..294f1d8 100644
--- a/server/api/cmHopper/index.js
+++ b/server/api/cmHopper/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['destroy','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./cmHopper.controller','get','isAuthenticated','describe','/opencontacts','/:id','post','/preview','getPreview','put','delete'];(function(_0x4fc7b2,_0x1f0bc1){var _0x3f12b=function(_0x55d853){while(--_0x55d853){_0x4fc7b2['push'](_0x4fc7b2['shift']());}};_0x3f12b(++_0x1f0bc1);}(_0x7a54,0x106));var _0x47a5=function(_0x173a3c,_0x17b889){_0x173a3c=_0x173a3c-0x0;var _0x41dc74=_0x7a54[_0x173a3c];return _0x41dc74;};'use strict';var multer=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var path=require(_0x47a5('0x2'));var timeout=require('connect-timeout');var express=require(_0x47a5('0x3'));var router=express[_0x47a5('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x47a5('0x5'));var config=require(_0x47a5('0x6'));var controller=require(_0x47a5('0x7'));router[_0x47a5('0x8')]('/',auth[_0x47a5('0x9')](),controller['index']);router[_0x47a5('0x8')]('/describe',auth[_0x47a5('0x9')](),controller[_0x47a5('0xa')]);router['get'](_0x47a5('0xb'),auth['isAuthenticated'](),controller['getOpenContacts']);router['get'](_0x47a5('0xc'),auth[_0x47a5('0x9')](),controller['show']);router[_0x47a5('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0x47a5('0xd')](_0x47a5('0xe'),auth[_0x47a5('0x9')](),controller[_0x47a5('0xf')]);router[_0x47a5('0x10')](_0x47a5('0xc'),auth[_0x47a5('0x9')](),controller['update']);router[_0x47a5('0x11')](_0x47a5('0xc'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x12')]);module[_0x47a5('0x13')]=router;
\ No newline at end of file
+var _0x9957=['/:id','show','post','/preview','getPreview','put','update','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','/opencontacts','getOpenContacts'];(function(_0xe66cf2,_0x32ba5f){var _0x2d84e7=function(_0x58a7d8){while(--_0x58a7d8){_0xe66cf2['push'](_0xe66cf2['shift']());}};_0x2d84e7(++_0x32ba5f);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var auth=require(_0x7995('0x5'));var interaction=require(_0x7995('0x6'));var config=require(_0x7995('0x7'));var controller=require('./cmHopper.controller');router[_0x7995('0x8')]('/',auth[_0x7995('0x9')](),controller[_0x7995('0xa')]);router[_0x7995('0x8')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller['describe']);router[_0x7995('0x8')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x8')](_0x7995('0xe'),auth[_0x7995('0x9')](),controller[_0x7995('0xf')]);router[_0x7995('0x10')]('/',auth[_0x7995('0x9')](),controller['create']);router[_0x7995('0x10')](_0x7995('0x11'),auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x13')](_0x7995('0xe'),auth[_0x7995('0x9')](),controller[_0x7995('0x14')]);router[_0x7995('0x15')](_0x7995('0xe'),auth['isAuthenticated'](),controller['destroy']);module[_0x7995('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.attributes.js b/server/api/cmHopperBlack/cmHopperBlack.attributes.js
index 600363c..6da3218 100644
--- a/server/api/cmHopperBlack/cmHopperBlack.attributes.js
+++ b/server/api/cmHopperBlack/cmHopperBlack.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc649=['exports','STRING','contactListQueue','sequelize'];(function(_0x1878db,_0x18d9f6){var _0x1ae242=function(_0x5a66d7){while(--_0x5a66d7){_0x1878db['push'](_0x1878db['shift']());}};_0x1ae242(++_0x18d9f6);}(_0xc649,0xaf));var _0x9c64=function(_0x274f3b,_0x4082bd){_0x274f3b=_0x274f3b-0x0;var _0x32cfba=_0xc649[_0x274f3b];return _0x32cfba;};'use strict';var moment=require('moment');var Sequelize=require(_0x9c64('0x0'));module[_0x9c64('0x1')]={'phone':{'type':Sequelize[_0x9c64('0x2')],'allowNull':![]},'ContactId':{'type':Sequelize['INTEGER'],'unique':_0x9c64('0x3')},'ListId':{'type':Sequelize['INTEGER'],'unique':_0x9c64('0x3')},'VoiceQueueId':{'type':Sequelize['INTEGER'],'unique':'contactListQueue'}};
\ No newline at end of file
+var _0x89c8=['contactListQueue','moment','sequelize','exports','INTEGER'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x89c8,0x17d));var _0x889c=function(_0x46f974,_0x5b3a26){_0x46f974=_0x46f974-0x0;var _0x33baa6=_0x89c8[_0x46f974];return _0x33baa6;};'use strict';var moment=require(_0x889c('0x0'));var Sequelize=require(_0x889c('0x1'));module[_0x889c('0x2')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'ContactId':{'type':Sequelize[_0x889c('0x3')],'unique':_0x889c('0x4')},'ListId':{'type':Sequelize[_0x889c('0x3')],'unique':_0x889c('0x4')},'VoiceQueueId':{'type':Sequelize[_0x889c('0x3')],'unique':_0x889c('0x4')}};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.controller.js b/server/api/cmHopperBlack/cmHopperBlack.controller.js
index fdb2d04..92de33b 100644
--- a/server/api/cmHopperBlack/cmHopperBlack.controller.js
+++ b/server/api/cmHopperBlack/cmHopperBlack.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3d65=['describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','ejs','lodash','squel','crypto','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','end','status','count','offset','limit','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','CmHopperBlack','rawAttributes','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','sort','where','pick','filter','merge','map','type','field','options','then','includeAll','include','findAll','rows','catch','show','params','find','body'];(function(_0x424416,_0x2138a5){var _0x5d6148=function(_0x37008d){while(--_0x37008d){_0x424416['push'](_0x424416['shift']());}};_0x5d6148(++_0x2138a5);}(_0x3d65,0x1a5));var _0x53d6=function(_0x44a101,_0x3729bc){_0x44a101=_0x44a101-0x0;var _0x351900=_0x3d65[_0x44a101];return _0x351900;};'use strict';var pdf=require(_0x53d6('0x0'));var emlformat=require(_0x53d6('0x1'));var rimraf=require(_0x53d6('0x2'));var zipdir=require(_0x53d6('0x3'));var jsonpatch=require(_0x53d6('0x4'));var rp=require(_0x53d6('0x5'));var moment=require(_0x53d6('0x6'));var BPromise=require(_0x53d6('0x7'));var Mustache=require('mustache');var util=require(_0x53d6('0x8'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x53d6('0x9'));var fs=require('fs');var _=require(_0x53d6('0xa'));var squel=require(_0x53d6('0xb'));var crypto=require(_0x53d6('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x53d6('0xd'));var querystring=require(_0x53d6('0xe'));var Papa=require(_0x53d6('0xf'));var Redis=require(_0x53d6('0x10'));var authService=require(_0x53d6('0x11'));var qs=require(_0x53d6('0x12'));var hardwareService=require(_0x53d6('0x13'));var logger=require('../../config/logger')(_0x53d6('0x14'));var utils=require(_0x53d6('0x15'));var config=require('../../config/environment');var db=require(_0x53d6('0x16'))['db'];function respondWithStatusCode(_0x1f7cfc,_0x10260f){_0x10260f=_0x10260f||0xcc;return function(_0xc080d5){if(_0xc080d5){return _0x1f7cfc[_0x53d6('0x17')](_0x10260f);}return _0x1f7cfc['status'](_0x10260f)[_0x53d6('0x18')]();};}function respondWithResult(_0x40e159,_0x4037ee){_0x4037ee=_0x4037ee||0xc8;return function(_0x1ce361){if(_0x1ce361){return _0x40e159[_0x53d6('0x19')](_0x4037ee)['json'](_0x1ce361);}};}function respondWithFilteredResult(_0x1bc773,_0x269137){return function(_0x27873e){if(_0x27873e){var _0x58bd9b=_0x27873e[_0x53d6('0x1a')],_0x177987=_0x269137['offset'],_0x438737=_0x269137[_0x53d6('0x1b')]+_0x269137[_0x53d6('0x1c')],_0x4d2cd2;if(_0x438737>=_0x58bd9b){_0x438737=_0x58bd9b;_0x4d2cd2=0xc8;}else{_0x4d2cd2=0xce;}_0x1bc773[_0x53d6('0x19')](_0x4d2cd2);return _0x1bc773['set'](_0x53d6('0x1d'),_0x177987+'-'+_0x438737+'/'+_0x58bd9b)['json'](_0x27873e);}return null;};}function patchUpdates(_0x1005d5){return function(_0x2da702){try{jsonpatch[_0x53d6('0x1e')](_0x2da702,_0x1005d5,!![]);}catch(_0x175099){return BPromise[_0x53d6('0x1f')](_0x175099);}return _0x2da702[_0x53d6('0x20')]();};}function saveUpdates(_0x1c3503,_0x1eb08e){return function(_0x506bb3){if(_0x506bb3){return _0x506bb3[_0x53d6('0x21')](_0x1c3503)['then'](function(_0xdb88cc){return _0xdb88cc;});}return null;};}function removeEntity(_0x2218d1,_0x528bd1){return function(_0xd04288){if(_0xd04288){return _0xd04288[_0x53d6('0x22')]()['then'](function(){_0x2218d1[_0x53d6('0x19')](0xcc)[_0x53d6('0x18')]();});}};}function handleEntityNotFound(_0x2adca7,_0xf4a3fc){return function(_0x4aff96){if(!_0x4aff96){_0x2adca7[_0x53d6('0x17')](0x194);}return _0x4aff96;};}function handleError(_0x51a631,_0x3ce4ed){_0x3ce4ed=_0x3ce4ed||0x1f4;return function(_0x402e9b){logger['error'](_0x402e9b[_0x53d6('0x23')]);if(_0x402e9b[_0x53d6('0x24')]){delete _0x402e9b[_0x53d6('0x24')];}_0x51a631[_0x53d6('0x19')](_0x3ce4ed)[_0x53d6('0x25')](_0x402e9b);};}exports[_0x53d6('0x26')]=function(_0x4d6976,_0x4ca62c){var _0x5e6ad6={},_0x4e8180={},_0x36befb={'count':0x0,'rows':[]};var _0x1faf7b=db[_0x53d6('0x27')][_0x53d6('0x28')];_0x4e8180[_0x53d6('0x29')]=_[_0x53d6('0x2a')](_0x1faf7b);_0x4e8180[_0x53d6('0x2b')]=_[_0x53d6('0x2a')](_0x4d6976[_0x53d6('0x2b')]);_0x4e8180[_0x53d6('0x2c')]=_['intersection'](_0x4e8180[_0x53d6('0x29')],_0x4e8180[_0x53d6('0x2b')]);_0x5e6ad6[_0x53d6('0x2d')]=_[_0x53d6('0x2e')](_0x4e8180[_0x53d6('0x29')],qs[_0x53d6('0x2f')](_0x4d6976[_0x53d6('0x2b')][_0x53d6('0x2f')]));_0x5e6ad6[_0x53d6('0x2d')]=_0x5e6ad6[_0x53d6('0x2d')][_0x53d6('0x30')]?_0x5e6ad6[_0x53d6('0x2d')]:_0x4e8180[_0x53d6('0x29')];if(!_0x4d6976[_0x53d6('0x2b')][_0x53d6('0x31')]('nolimit')){_0x5e6ad6['limit']=qs[_0x53d6('0x1c')](_0x4d6976[_0x53d6('0x2b')][_0x53d6('0x1c')]);_0x5e6ad6[_0x53d6('0x1b')]=qs[_0x53d6('0x1b')](_0x4d6976['query'][_0x53d6('0x1b')]);}_0x5e6ad6['order']=qs[_0x53d6('0x32')](_0x4d6976[_0x53d6('0x2b')]['sort']);_0x5e6ad6[_0x53d6('0x33')]=qs[_0x53d6('0x2c')](_[_0x53d6('0x34')](_0x4d6976[_0x53d6('0x2b')],_0x4e8180[_0x53d6('0x2c')]));if(_0x4d6976[_0x53d6('0x2b')][_0x53d6('0x35')]){_0x5e6ad6['where']=_[_0x53d6('0x36')](_0x5e6ad6[_0x53d6('0x33')],{'$or':_[_0x53d6('0x37')](_0x1faf7b,function(_0x23e966){if(_0x23e966[_0x53d6('0x38')]['key']!=='VIRTUAL'){var _0x4af288={};_0x4af288[_0x23e966[_0x53d6('0x39')]]={'$like':'%'+_0x4d6976[_0x53d6('0x2b')]['filter']+'%'};return _0x4af288;}})});}_0x5e6ad6=_[_0x53d6('0x36')]({},_0x5e6ad6,_0x4d6976[_0x53d6('0x3a')]);var _0x3e89d3={'where':_0x5e6ad6[_0x53d6('0x33')]};return db[_0x53d6('0x27')]['count'](_0x3e89d3)[_0x53d6('0x3b')](function(_0xf2cc85){_0x36befb[_0x53d6('0x1a')]=_0xf2cc85;if(_0x4d6976[_0x53d6('0x2b')][_0x53d6('0x3c')]){_0x5e6ad6[_0x53d6('0x3d')]=[{'all':!![]}];}return db[_0x53d6('0x27')][_0x53d6('0x3e')](_0x5e6ad6);})[_0x53d6('0x3b')](function(_0x4c6a0f){_0x36befb[_0x53d6('0x3f')]=_0x4c6a0f;return _0x36befb;})['then'](respondWithFilteredResult(_0x4ca62c,_0x5e6ad6))[_0x53d6('0x40')](handleError(_0x4ca62c,null));};exports[_0x53d6('0x41')]=function(_0x48195a,_0x235cea){var _0x33c74f={'raw':!![],'where':{'id':_0x48195a[_0x53d6('0x42')]['id']}},_0x12b2a5={};_0x12b2a5[_0x53d6('0x29')]=_[_0x53d6('0x2a')](db[_0x53d6('0x27')][_0x53d6('0x28')]);_0x12b2a5[_0x53d6('0x2b')]=_[_0x53d6('0x2a')](_0x48195a[_0x53d6('0x2b')]);_0x12b2a5[_0x53d6('0x2c')]=_['intersection'](_0x12b2a5[_0x53d6('0x29')],_0x12b2a5[_0x53d6('0x2b')]);_0x33c74f['attributes']=_[_0x53d6('0x2e')](_0x12b2a5['model'],qs[_0x53d6('0x2f')](_0x48195a[_0x53d6('0x2b')][_0x53d6('0x2f')]));_0x33c74f[_0x53d6('0x2d')]=_0x33c74f[_0x53d6('0x2d')]['length']?_0x33c74f[_0x53d6('0x2d')]:_0x12b2a5[_0x53d6('0x29')];if(_0x48195a[_0x53d6('0x2b')][_0x53d6('0x3c')]){_0x33c74f[_0x53d6('0x3d')]=[{'all':!![]}];}_0x33c74f=_[_0x53d6('0x36')]({},_0x33c74f,_0x48195a['options']);return db[_0x53d6('0x27')][_0x53d6('0x43')](_0x33c74f)['then'](handleEntityNotFound(_0x235cea,null))[_0x53d6('0x3b')](respondWithResult(_0x235cea,null))['catch'](handleError(_0x235cea,null));};exports[_0x53d6('0x21')]=function(_0x2a5abc,_0x1d6c11){if(_0x2a5abc[_0x53d6('0x44')]['id']){delete _0x2a5abc[_0x53d6('0x44')]['id'];}return db[_0x53d6('0x27')][_0x53d6('0x43')]({'where':{'id':_0x2a5abc['params']['id']}})[_0x53d6('0x3b')](handleEntityNotFound(_0x1d6c11,null))[_0x53d6('0x3b')](saveUpdates(_0x2a5abc[_0x53d6('0x44')],null))[_0x53d6('0x3b')](respondWithResult(_0x1d6c11,null))['catch'](handleError(_0x1d6c11,null));};exports[_0x53d6('0x22')]=function(_0x5bd184,_0x553df0){return db[_0x53d6('0x27')][_0x53d6('0x43')]({'where':{'id':_0x5bd184['params']['id']}})['then'](handleEntityNotFound(_0x553df0,null))['then'](removeEntity(_0x553df0,null))[_0x53d6('0x40')](handleError(_0x553df0,null));};exports[_0x53d6('0x45')]=function(_0x2a18c5,_0x2ad1a8){return db[_0x53d6('0x27')][_0x53d6('0x45')]()[_0x53d6('0x3b')](respondWithResult(_0x2ad1a8,null))['catch'](handleError(_0x2ad1a8,null));};
\ No newline at end of file
+var _0x7efe=['query','filters','model','attributes','fields','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','key','field','options','CmHopperBlack','includeAll','include','findAll','then','catch','show','params','keys','intersection','length','find','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','save','update','destroy','error','name','send','index','rawAttributes'];(function(_0x1c1db5,_0x2ee9c8){var _0x41d4d6=function(_0x4c659a){while(--_0x4c659a){_0x1c1db5['push'](_0x1c1db5['shift']());}};_0x41d4d6(++_0x2ee9c8);}(_0x7efe,0xac));var _0xe7ef=function(_0x50d583,_0x53e478){_0x50d583=_0x50d583-0x0;var _0x531c1a=_0x7efe[_0x50d583];return _0x531c1a;};'use strict';var pdf=require(_0xe7ef('0x0'));var emlformat=require(_0xe7ef('0x1'));var rimraf=require(_0xe7ef('0x2'));var zipdir=require(_0xe7ef('0x3'));var jsonpatch=require(_0xe7ef('0x4'));var rp=require(_0xe7ef('0x5'));var moment=require(_0xe7ef('0x6'));var BPromise=require(_0xe7ef('0x7'));var Mustache=require('mustache');var util=require(_0xe7ef('0x8'));var path=require(_0xe7ef('0x9'));var sox=require(_0xe7ef('0xa'));var csv=require(_0xe7ef('0xb'));var ejs=require(_0xe7ef('0xc'));var fs=require('fs');var _=require(_0xe7ef('0xd'));var squel=require(_0xe7ef('0xe'));var crypto=require(_0xe7ef('0xf'));var jsforce=require(_0xe7ef('0x10'));var deskjs=require(_0xe7ef('0x11'));var toCsv=require('to-csv');var querystring=require(_0xe7ef('0x12'));var Papa=require('papaparse');var Redis=require(_0xe7ef('0x13'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xe7ef('0x14'))(_0xe7ef('0x15'));var utils=require(_0xe7ef('0x16'));var config=require('../../config/environment');var db=require(_0xe7ef('0x17'))['db'];function respondWithStatusCode(_0x337d83,_0x2bfe00){_0x2bfe00=_0x2bfe00||0xcc;return function(_0x499ce5){if(_0x499ce5){return _0x337d83[_0xe7ef('0x18')](_0x2bfe00);}return _0x337d83[_0xe7ef('0x19')](_0x2bfe00)[_0xe7ef('0x1a')]();};}function respondWithResult(_0x3b6896,_0xfd1bdc){_0xfd1bdc=_0xfd1bdc||0xc8;return function(_0x45f7eb){if(_0x45f7eb){return _0x3b6896[_0xe7ef('0x19')](_0xfd1bdc)[_0xe7ef('0x1b')](_0x45f7eb);}};}function respondWithFilteredResult(_0x4cf08b,_0x5bad0c){return function(_0x386b03){if(_0x386b03){var _0x5c0a48=_0x386b03[_0xe7ef('0x1c')],_0x401b85=_0x5bad0c[_0xe7ef('0x1d')],_0x82760f=_0x5bad0c['offset']+_0x5bad0c['limit'],_0x29a023;if(_0x82760f>=_0x5c0a48){_0x82760f=_0x5c0a48;_0x29a023=0xc8;}else{_0x29a023=0xce;}_0x4cf08b[_0xe7ef('0x19')](_0x29a023);return _0x4cf08b[_0xe7ef('0x1e')](_0xe7ef('0x1f'),_0x401b85+'-'+_0x82760f+'/'+_0x5c0a48)[_0xe7ef('0x1b')](_0x386b03);}return null;};}function patchUpdates(_0x6263d1){return function(_0x2d8c91){try{jsonpatch[_0xe7ef('0x20')](_0x2d8c91,_0x6263d1,!![]);}catch(_0x5d54eb){return BPromise['reject'](_0x5d54eb);}return _0x2d8c91[_0xe7ef('0x21')]();};}function saveUpdates(_0xffa238,_0x19c289){return function(_0x1d4b62){if(_0x1d4b62){return _0x1d4b62[_0xe7ef('0x22')](_0xffa238)['then'](function(_0x2cccfb){return _0x2cccfb;});}return null;};}function removeEntity(_0x2332e8,_0x365953){return function(_0x197fd6){if(_0x197fd6){return _0x197fd6[_0xe7ef('0x23')]()['then'](function(){_0x2332e8[_0xe7ef('0x19')](0xcc)[_0xe7ef('0x1a')]();});}};}function handleEntityNotFound(_0x3b8de1,_0x1e3cc3){return function(_0x406d4b){if(!_0x406d4b){_0x3b8de1[_0xe7ef('0x18')](0x194);}return _0x406d4b;};}function handleError(_0x20b0fa,_0x2a0c2a){_0x2a0c2a=_0x2a0c2a||0x1f4;return function(_0x13c14f){logger[_0xe7ef('0x24')](_0x13c14f['stack']);if(_0x13c14f[_0xe7ef('0x25')]){delete _0x13c14f[_0xe7ef('0x25')];}_0x20b0fa['status'](_0x2a0c2a)[_0xe7ef('0x26')](_0x13c14f);};}exports[_0xe7ef('0x27')]=function(_0x1ae629,_0x459f5a){var _0x51c54a={},_0x2b15ed={},_0x1033a2={'count':0x0,'rows':[]};var _0x13da97=db['CmHopperBlack'][_0xe7ef('0x28')];_0x2b15ed['model']=_['keys'](_0x13da97);_0x2b15ed[_0xe7ef('0x29')]=_['keys'](_0x1ae629[_0xe7ef('0x29')]);_0x2b15ed[_0xe7ef('0x2a')]=_['intersection'](_0x2b15ed[_0xe7ef('0x2b')],_0x2b15ed[_0xe7ef('0x29')]);_0x51c54a[_0xe7ef('0x2c')]=_['intersection'](_0x2b15ed[_0xe7ef('0x2b')],qs[_0xe7ef('0x2d')](_0x1ae629[_0xe7ef('0x29')][_0xe7ef('0x2d')]));_0x51c54a['attributes']=_0x51c54a[_0xe7ef('0x2c')]['length']?_0x51c54a[_0xe7ef('0x2c')]:_0x2b15ed[_0xe7ef('0x2b')];if(!_0x1ae629[_0xe7ef('0x29')][_0xe7ef('0x2e')](_0xe7ef('0x2f'))){_0x51c54a[_0xe7ef('0x30')]=qs[_0xe7ef('0x30')](_0x1ae629[_0xe7ef('0x29')]['limit']);_0x51c54a[_0xe7ef('0x1d')]=qs[_0xe7ef('0x1d')](_0x1ae629[_0xe7ef('0x29')][_0xe7ef('0x1d')]);}_0x51c54a['order']=qs[_0xe7ef('0x31')](_0x1ae629[_0xe7ef('0x29')][_0xe7ef('0x31')]);_0x51c54a[_0xe7ef('0x32')]=qs[_0xe7ef('0x2a')](_[_0xe7ef('0x33')](_0x1ae629[_0xe7ef('0x29')],_0x2b15ed[_0xe7ef('0x2a')]));if(_0x1ae629['query'][_0xe7ef('0x34')]){_0x51c54a[_0xe7ef('0x32')]=_[_0xe7ef('0x35')](_0x51c54a['where'],{'$or':_['map'](_0x13da97,function(_0x1fe59c){if(_0x1fe59c['type'][_0xe7ef('0x36')]!=='VIRTUAL'){var _0x3f9027={};_0x3f9027[_0x1fe59c[_0xe7ef('0x37')]]={'$like':'%'+_0x1ae629['query'][_0xe7ef('0x34')]+'%'};return _0x3f9027;}})});}_0x51c54a=_['merge']({},_0x51c54a,_0x1ae629[_0xe7ef('0x38')]);var _0x51674e={'where':_0x51c54a[_0xe7ef('0x32')]};return db[_0xe7ef('0x39')][_0xe7ef('0x1c')](_0x51674e)['then'](function(_0x5b202d){_0x1033a2[_0xe7ef('0x1c')]=_0x5b202d;if(_0x1ae629[_0xe7ef('0x29')][_0xe7ef('0x3a')]){_0x51c54a[_0xe7ef('0x3b')]=[{'all':!![]}];}return db['CmHopperBlack'][_0xe7ef('0x3c')](_0x51c54a);})[_0xe7ef('0x3d')](function(_0x2320e6){_0x1033a2['rows']=_0x2320e6;return _0x1033a2;})['then'](respondWithFilteredResult(_0x459f5a,_0x51c54a))[_0xe7ef('0x3e')](handleError(_0x459f5a,null));};exports[_0xe7ef('0x3f')]=function(_0x44c20f,_0x18ef3f){var _0x4fc286={'raw':!![],'where':{'id':_0x44c20f[_0xe7ef('0x40')]['id']}},_0xa0be74={};_0xa0be74[_0xe7ef('0x2b')]=_[_0xe7ef('0x41')](db['CmHopperBlack'][_0xe7ef('0x28')]);_0xa0be74[_0xe7ef('0x29')]=_[_0xe7ef('0x41')](_0x44c20f[_0xe7ef('0x29')]);_0xa0be74[_0xe7ef('0x2a')]=_[_0xe7ef('0x42')](_0xa0be74[_0xe7ef('0x2b')],_0xa0be74[_0xe7ef('0x29')]);_0x4fc286[_0xe7ef('0x2c')]=_[_0xe7ef('0x42')](_0xa0be74[_0xe7ef('0x2b')],qs[_0xe7ef('0x2d')](_0x44c20f[_0xe7ef('0x29')]['fields']));_0x4fc286['attributes']=_0x4fc286[_0xe7ef('0x2c')][_0xe7ef('0x43')]?_0x4fc286[_0xe7ef('0x2c')]:_0xa0be74[_0xe7ef('0x2b')];if(_0x44c20f[_0xe7ef('0x29')][_0xe7ef('0x3a')]){_0x4fc286[_0xe7ef('0x3b')]=[{'all':!![]}];}_0x4fc286=_[_0xe7ef('0x35')]({},_0x4fc286,_0x44c20f[_0xe7ef('0x38')]);return db[_0xe7ef('0x39')][_0xe7ef('0x44')](_0x4fc286)[_0xe7ef('0x3d')](handleEntityNotFound(_0x18ef3f,null))[_0xe7ef('0x3d')](respondWithResult(_0x18ef3f,null))['catch'](handleError(_0x18ef3f,null));};exports[_0xe7ef('0x22')]=function(_0x114c21,_0x311fb9){if(_0x114c21[_0xe7ef('0x45')]['id']){delete _0x114c21[_0xe7ef('0x45')]['id'];}return db[_0xe7ef('0x39')]['find']({'where':{'id':_0x114c21[_0xe7ef('0x40')]['id']}})[_0xe7ef('0x3d')](handleEntityNotFound(_0x311fb9,null))[_0xe7ef('0x3d')](saveUpdates(_0x114c21['body'],null))[_0xe7ef('0x3d')](respondWithResult(_0x311fb9,null))[_0xe7ef('0x3e')](handleError(_0x311fb9,null));};exports['destroy']=function(_0x527c11,_0x57607f){return db[_0xe7ef('0x39')][_0xe7ef('0x44')]({'where':{'id':_0x527c11[_0xe7ef('0x40')]['id']}})[_0xe7ef('0x3d')](handleEntityNotFound(_0x57607f,null))[_0xe7ef('0x3d')](removeEntity(_0x57607f,null))[_0xe7ef('0x3e')](handleError(_0x57607f,null));};exports[_0xe7ef('0x46')]=function(_0x562225,_0x58cc9f){return db[_0xe7ef('0x39')][_0xe7ef('0x46')]()['then'](respondWithResult(_0x58cc9f,null))[_0xe7ef('0x3e')](handleError(_0x58cc9f,null));};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.model.js b/server/api/cmHopperBlack/cmHopperBlack.model.js
index 0be1b5f..67c8573 100644
--- a/server/api/cmHopperBlack/cmHopperBlack.model.js
+++ b/server/api/cmHopperBlack/cmHopperBlack.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf3cd=['path','rimraf','../../config/environment','exports','define','CmHopperBlack','cm_hopper_black','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x18bd33,_0xf0a8d2){var _0x12f15b=function(_0x26e864){while(--_0x26e864){_0x18bd33['push'](_0x18bd33['shift']());}};_0x12f15b(++_0xf0a8d2);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x4b64a4,_0x1bdc50){_0x4b64a4=_0x4b64a4-0x0;var _0xd19b0e=_0xf3cd[_0x4b64a4];return _0xd19b0e;};'use strict';var _=require(_0xdf3c('0x0'));var util=require(_0xdf3c('0x1'));var logger=require(_0xdf3c('0x2'))(_0xdf3c('0x3'));var moment=require(_0xdf3c('0x4'));var BPromise=require(_0xdf3c('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdf3c('0x6'));var rimraf=require(_0xdf3c('0x7'));var config=require(_0xdf3c('0x8'));var attributes=require('./cmHopperBlack.attributes');module[_0xdf3c('0x9')]=function(_0x17d42a,_0x1313d5){return _0x17d42a[_0xdf3c('0xa')](_0xdf3c('0xb'),attributes,{'tableName':_0xdf3c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x34e8=['cm_hopper_black','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./cmHopperBlack.attributes','exports','CmHopperBlack'];(function(_0x4ae0a0,_0x5b3f3b){var _0x392131=function(_0x5d9a84){while(--_0x5d9a84){_0x4ae0a0['push'](_0x4ae0a0['shift']());}};_0x392131(++_0x5b3f3b);}(_0x34e8,0x12c));var _0x834e=function(_0x1bc7b7,_0x1c4bd5){_0x1bc7b7=_0x1bc7b7-0x0;var _0x2e723f=_0x34e8[_0x1bc7b7];return _0x2e723f;};'use strict';var _=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var logger=require(_0x834e('0x2'))(_0x834e('0x3'));var moment=require('moment');var BPromise=require(_0x834e('0x4'));var rp=require(_0x834e('0x5'));var fs=require('fs');var path=require(_0x834e('0x6'));var rimraf=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var attributes=require(_0x834e('0x9'));module[_0x834e('0xa')]=function(_0x4a2018,_0x858aa1){return _0x4a2018['define'](_0x834e('0xb'),attributes,{'tableName':_0x834e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.rpc.js b/server/api/cmHopperBlack/cmHopperBlack.rpc.js
index 8c56d4f..25bde70 100644
--- a/server/api/cmHopperBlack/cmHopperBlack.rpc.js
+++ b/server/api/cmHopperBlack/cmHopperBlack.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdc43=['then','CmHopperBlack','DestroyCmHopperBlack','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','info','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','code','CmHopperBlack,\x20%s,\x20%s','message','request\x20sent','catch','GetCmHopperBlack','findAll','options','raw','include','map','attributes','model','UpdateCmHopperBlack','update','body','where','limit'];(function(_0x262a0b,_0x20d859){var _0x15f521=function(_0x317318){while(--_0x317318){_0x262a0b['push'](_0x262a0b['shift']());}};_0x15f521(++_0x20d859);}(_0xdc43,0x1a7));var _0x3dc4=function(_0x218d8a,_0x13b59a){_0x218d8a=_0x218d8a-0x0;var _0x320c6b=_0xdc43[_0x218d8a];return _0x320c6b;};'use strict';var _=require(_0x3dc4('0x0'));var util=require(_0x3dc4('0x1'));var moment=require(_0x3dc4('0x2'));var BPromise=require(_0x3dc4('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3dc4('0x4'))['db'];var utils=require(_0x3dc4('0x5'));var logger=require(_0x3dc4('0x6'))(_0x3dc4('0x7'));var config=require('../../config/environment');var jayson=require(_0x3dc4('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x311f7b,_0x4c2524,_0x160ac5){return new BPromise(function(_0x10a40c,_0x164c80){return client['request'](_0x311f7b,_0x160ac5)['then'](function(_0x21a39a){logger[_0x3dc4('0x9')]('CmHopperBlack,\x20%s,\x20%s',_0x4c2524,'request\x20sent');logger[_0x3dc4('0xa')](_0x3dc4('0xb'),_0x4c2524,'request\x20sent',JSON[_0x3dc4('0xc')](_0x21a39a));if(_0x21a39a[_0x3dc4('0xd')]){if(_0x21a39a[_0x3dc4('0xd')][_0x3dc4('0xe')]===0x1f4){logger[_0x3dc4('0xd')](_0x3dc4('0xf'),_0x4c2524,_0x21a39a[_0x3dc4('0xd')][_0x3dc4('0x10')]);return _0x164c80(_0x21a39a[_0x3dc4('0xd')][_0x3dc4('0x10')]);}logger[_0x3dc4('0xd')](_0x3dc4('0xf'),_0x4c2524,_0x21a39a[_0x3dc4('0xd')]['message']);return _0x10a40c(_0x21a39a['error'][_0x3dc4('0x10')]);}else{logger['info']('CmHopperBlack,\x20%s,\x20%s',_0x4c2524,_0x3dc4('0x11'));_0x10a40c(_0x21a39a['result']['message']);}})[_0x3dc4('0x12')](function(_0x2c8243){logger[_0x3dc4('0xd')](_0x3dc4('0xf'),_0x4c2524,_0x2c8243);_0x164c80(_0x2c8243);});});}exports[_0x3dc4('0x13')]=function(_0x1a23d0){var _0x21b80a=this;return new Promise(function(_0x5e197e,_0x44b557){return db['CmHopperBlack'][_0x3dc4('0x14')]({'raw':_0x1a23d0['options']?_0x1a23d0[_0x3dc4('0x15')][_0x3dc4('0x16')]===undefined?!![]:![]:!![],'where':_0x1a23d0[_0x3dc4('0x15')]?_0x1a23d0[_0x3dc4('0x15')]['where']||null:null,'attributes':_0x1a23d0[_0x3dc4('0x15')]?_0x1a23d0[_0x3dc4('0x15')]['attributes']||null:null,'limit':_0x1a23d0[_0x3dc4('0x15')]?_0x1a23d0[_0x3dc4('0x15')]['limit']||null:null,'include':_0x1a23d0[_0x3dc4('0x15')]?_0x1a23d0['options'][_0x3dc4('0x17')]?_[_0x3dc4('0x18')](_0x1a23d0[_0x3dc4('0x15')][_0x3dc4('0x17')],function(_0x44849b){return{'model':db[_0x44849b['model']],'as':_0x44849b['as'],'attributes':_0x44849b[_0x3dc4('0x19')],'include':_0x44849b['include']?_[_0x3dc4('0x18')](_0x44849b[_0x3dc4('0x17')],function(_0x22c4e5){return{'model':db[_0x22c4e5[_0x3dc4('0x1a')]],'as':_0x22c4e5['as'],'attributes':_0x22c4e5[_0x3dc4('0x19')],'include':_0x22c4e5['include']?_['map'](_0x22c4e5['include'],function(_0x4d95d2){return{'model':db[_0x4d95d2[_0x3dc4('0x1a')]],'as':_0x4d95d2['as'],'attributes':_0x4d95d2['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0xaa86e9){logger[_0x3dc4('0x9')](_0x3dc4('0x13'),_0x1a23d0);logger['debug'](_0x3dc4('0x13'),_0x1a23d0,JSON[_0x3dc4('0xc')](_0xaa86e9));_0x5e197e(_0xaa86e9);})[_0x3dc4('0x12')](function(_0x5ec76b){logger[_0x3dc4('0xd')](_0x3dc4('0x13'),_0x5ec76b['message'],_0x1a23d0);_0x44b557(_0x21b80a[_0x3dc4('0xd')](0x1f4,_0x5ec76b[_0x3dc4('0x10')]));});});};exports[_0x3dc4('0x1b')]=function(_0x53fcf7){var _0x5c1e6a=this;return new Promise(function(_0x4676f4,_0x55ec62){return db['CmHopperBlack'][_0x3dc4('0x1c')](_0x53fcf7[_0x3dc4('0x1d')],{'raw':_0x53fcf7[_0x3dc4('0x15')]?_0x53fcf7[_0x3dc4('0x15')][_0x3dc4('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x53fcf7[_0x3dc4('0x15')]?_0x53fcf7[_0x3dc4('0x15')][_0x3dc4('0x1e')]||null:null,'attributes':_0x53fcf7[_0x3dc4('0x15')]?_0x53fcf7[_0x3dc4('0x15')][_0x3dc4('0x19')]||null:null,'limit':_0x53fcf7[_0x3dc4('0x15')]?_0x53fcf7[_0x3dc4('0x15')][_0x3dc4('0x1f')]||null:null})[_0x3dc4('0x20')](function(_0x1d5c77){logger[_0x3dc4('0x9')](_0x3dc4('0x1b'),_0x53fcf7);logger[_0x3dc4('0xa')]('UpdateCmHopperBlack',_0x53fcf7,JSON['stringify'](_0x1d5c77));_0x4676f4(_0x1d5c77);})[_0x3dc4('0x12')](function(_0x1d960e){logger[_0x3dc4('0xd')](_0x3dc4('0x1b'),_0x1d960e[_0x3dc4('0x10')],_0x53fcf7);_0x55ec62(_0x5c1e6a[_0x3dc4('0xd')](0x1f4,_0x1d960e[_0x3dc4('0x10')]));});});};exports['DestroyCmHopperBlack']=function(_0x38ec4b){var _0x14e063=this;return new Promise(function(_0x494aa3,_0x236bd7){return db[_0x3dc4('0x21')]['destroy']({'where':_0x38ec4b[_0x3dc4('0x15')]?_0x38ec4b[_0x3dc4('0x15')][_0x3dc4('0x1e')]||null:null})['then'](function(_0x39d037){logger[_0x3dc4('0x9')]('DestroyCmHopperBlack',_0x38ec4b);logger[_0x3dc4('0xa')](_0x3dc4('0x22'),_0x38ec4b,JSON['stringify'](_0x39d037));_0x494aa3(_0x39d037);})['catch'](function(_0x3d49d2){logger[_0x3dc4('0xd')]('DestroyCmHopperBlack',_0x3d49d2[_0x3dc4('0x10')],_0x38ec4b);_0x236bd7(_0x14e063[_0x3dc4('0xd')](0x1f4,_0x3d49d2[_0x3dc4('0x10')]));});});};
\ No newline at end of file
+var _0x7bb1=['limit','include','model','map','UpdateCmHopperBlack','CmHopperBlack','raw','DestroyCmHopperBlack','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmHopperBlack,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','GetCmHopperBlack','options','where','attributes'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x7bb1,0x130));var _0x17bb=function(_0x2f1762,_0xab43df){_0x2f1762=_0x2f1762-0x0;var _0x8ab21=_0x7bb1[_0x2f1762];return _0x8ab21;};'use strict';var _=require(_0x17bb('0x0'));var util=require('util');var moment=require(_0x17bb('0x1'));var BPromise=require(_0x17bb('0x2'));var rs=require(_0x17bb('0x3'));var fs=require('fs');var Redis=require(_0x17bb('0x4'));var db=require(_0x17bb('0x5'))['db'];var utils=require(_0x17bb('0x6'));var logger=require(_0x17bb('0x7'))(_0x17bb('0x8'));var config=require(_0x17bb('0x9'));var jayson=require(_0x17bb('0xa'));var client=jayson[_0x17bb('0xb')][_0x17bb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1e74ba,_0x27e6c,_0x2b7e3f){return new BPromise(function(_0x365181,_0x51d3b0){return client[_0x17bb('0xd')](_0x1e74ba,_0x2b7e3f)[_0x17bb('0xe')](function(_0x17bed0){logger[_0x17bb('0xf')](_0x17bb('0x10'),_0x27e6c,'request\x20sent');logger[_0x17bb('0x11')]('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x27e6c,'request\x20sent',JSON[_0x17bb('0x12')](_0x17bed0));if(_0x17bed0['error']){if(_0x17bed0[_0x17bb('0x13')][_0x17bb('0x14')]===0x1f4){logger['error'](_0x17bb('0x10'),_0x27e6c,_0x17bed0[_0x17bb('0x13')]['message']);return _0x51d3b0(_0x17bed0['error']['message']);}logger['error']('CmHopperBlack,\x20%s,\x20%s',_0x27e6c,_0x17bed0[_0x17bb('0x13')][_0x17bb('0x15')]);return _0x365181(_0x17bed0['error'][_0x17bb('0x15')]);}else{logger[_0x17bb('0xf')](_0x17bb('0x10'),_0x27e6c,_0x17bb('0x16'));_0x365181(_0x17bed0[_0x17bb('0x17')]['message']);}})[_0x17bb('0x18')](function(_0x543bd4){logger[_0x17bb('0x13')](_0x17bb('0x10'),_0x27e6c,_0x543bd4);_0x51d3b0(_0x543bd4);});});}exports[_0x17bb('0x19')]=function(_0x3a0d25){var _0x37ce51=this;return new Promise(function(_0x110665,_0x309a31){return db['CmHopperBlack']['findAll']({'raw':_0x3a0d25[_0x17bb('0x1a')]?_0x3a0d25[_0x17bb('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x3a0d25[_0x17bb('0x1a')]?_0x3a0d25[_0x17bb('0x1a')][_0x17bb('0x1b')]||null:null,'attributes':_0x3a0d25[_0x17bb('0x1a')]?_0x3a0d25[_0x17bb('0x1a')][_0x17bb('0x1c')]||null:null,'limit':_0x3a0d25[_0x17bb('0x1a')]?_0x3a0d25[_0x17bb('0x1a')][_0x17bb('0x1d')]||null:null,'include':_0x3a0d25[_0x17bb('0x1a')]?_0x3a0d25['options'][_0x17bb('0x1e')]?_['map'](_0x3a0d25['options'][_0x17bb('0x1e')],function(_0x184b56){return{'model':db[_0x184b56[_0x17bb('0x1f')]],'as':_0x184b56['as'],'attributes':_0x184b56['attributes'],'include':_0x184b56[_0x17bb('0x1e')]?_[_0x17bb('0x20')](_0x184b56[_0x17bb('0x1e')],function(_0x1d9900){return{'model':db[_0x1d9900[_0x17bb('0x1f')]],'as':_0x1d9900['as'],'attributes':_0x1d9900[_0x17bb('0x1c')],'include':_0x1d9900[_0x17bb('0x1e')]?_[_0x17bb('0x20')](_0x1d9900['include'],function(_0x458d21){return{'model':db[_0x458d21[_0x17bb('0x1f')]],'as':_0x458d21['as'],'attributes':_0x458d21['attributes']};}):[]};}):[]};}):[]:[]})[_0x17bb('0xe')](function(_0x5624b7){logger[_0x17bb('0xf')](_0x17bb('0x19'),_0x3a0d25);logger['debug'](_0x17bb('0x19'),_0x3a0d25,JSON['stringify'](_0x5624b7));_0x110665(_0x5624b7);})[_0x17bb('0x18')](function(_0x36b0bf){logger[_0x17bb('0x13')]('GetCmHopperBlack',_0x36b0bf[_0x17bb('0x15')],_0x3a0d25);_0x309a31(_0x37ce51[_0x17bb('0x13')](0x1f4,_0x36b0bf[_0x17bb('0x15')]));});});};exports[_0x17bb('0x21')]=function(_0x1249cd){var _0x2adb67=this;return new Promise(function(_0x3b1049,_0x3d7118){return db[_0x17bb('0x22')]['update'](_0x1249cd['body'],{'raw':_0x1249cd['options']?_0x1249cd[_0x17bb('0x1a')][_0x17bb('0x23')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1249cd[_0x17bb('0x1a')]?_0x1249cd['options']['where']||null:null,'attributes':_0x1249cd[_0x17bb('0x1a')]?_0x1249cd[_0x17bb('0x1a')][_0x17bb('0x1c')]||null:null,'limit':_0x1249cd[_0x17bb('0x1a')]?_0x1249cd[_0x17bb('0x1a')][_0x17bb('0x1d')]||null:null})[_0x17bb('0xe')](function(_0x3e814f){logger[_0x17bb('0xf')](_0x17bb('0x21'),_0x1249cd);logger['debug'](_0x17bb('0x21'),_0x1249cd,JSON[_0x17bb('0x12')](_0x3e814f));_0x3b1049(_0x3e814f);})[_0x17bb('0x18')](function(_0x343b87){logger[_0x17bb('0x13')](_0x17bb('0x21'),_0x343b87[_0x17bb('0x15')],_0x1249cd);_0x3d7118(_0x2adb67['error'](0x1f4,_0x343b87['message']));});});};exports[_0x17bb('0x24')]=function(_0x153f29){var _0x223d36=this;return new Promise(function(_0x2e315e,_0x3925c9){return db[_0x17bb('0x22')]['destroy']({'where':_0x153f29[_0x17bb('0x1a')]?_0x153f29[_0x17bb('0x1a')][_0x17bb('0x1b')]||null:null})[_0x17bb('0xe')](function(_0x5564d7){logger[_0x17bb('0xf')](_0x17bb('0x24'),_0x153f29);logger[_0x17bb('0x11')](_0x17bb('0x24'),_0x153f29,JSON[_0x17bb('0x12')](_0x5564d7));_0x2e315e(_0x5564d7);})[_0x17bb('0x18')](function(_0x7702d1){logger['error'](_0x17bb('0x24'),_0x7702d1['message'],_0x153f29);_0x3925c9(_0x223d36[_0x17bb('0x13')](0x1f4,_0x7702d1[_0x17bb('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/index.js b/server/api/cmHopperBlack/index.js
index 59cb02b..280a313 100644
--- a/server/api/cmHopperBlack/index.js
+++ b/server/api/cmHopperBlack/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8393=['../../components/interaction/service','../../config/environment','./cmHopperBlack.controller','get','isAuthenticated','index','/describe','describe','/:id','show','delete','destroy','exports','multer','util','path','connect-timeout','Router'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x8393,0x1e1));var _0x3839=function(_0x4b3d2e,_0x1d11f7){_0x4b3d2e=_0x4b3d2e-0x0;var _0x4bc4c7=_0x8393[_0x4b3d2e];return _0x4bc4c7;};'use strict';var multer=require(_0x3839('0x0'));var util=require(_0x3839('0x1'));var path=require(_0x3839('0x2'));var timeout=require(_0x3839('0x3'));var express=require('express');var router=express[_0x3839('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x3839('0x5'));var config=require(_0x3839('0x6'));var controller=require(_0x3839('0x7'));router[_0x3839('0x8')]('/',auth[_0x3839('0x9')](),controller[_0x3839('0xa')]);router[_0x3839('0x8')](_0x3839('0xb'),auth['isAuthenticated'](),controller[_0x3839('0xc')]);router[_0x3839('0x8')](_0x3839('0xd'),auth[_0x3839('0x9')](),controller[_0x3839('0xe')]);router['put'](_0x3839('0xd'),auth[_0x3839('0x9')](),controller['update']);router[_0x3839('0xf')](_0x3839('0xd'),auth[_0x3839('0x9')](),controller[_0x3839('0x10')]);module[_0x3839('0x11')]=router;
\ No newline at end of file
+var _0x4ddd=['update','delete','destroy','multer','../../components/interaction/service','../../config/environment','./cmHopperBlack.controller','isAuthenticated','index','get','/describe','describe','show','/:id'];(function(_0x4709c0,_0x3396c7){var _0x13348b=function(_0x426235){while(--_0x426235){_0x4709c0['push'](_0x4709c0['shift']());}};_0x13348b(++_0x3396c7);}(_0x4ddd,0x18b));var _0xd4dd=function(_0x4bfac3,_0x58324d){_0x4bfac3=_0x4bfac3-0x0;var _0x15f0f2=_0x4ddd[_0x4bfac3];return _0x15f0f2;};'use strict';var multer=require(_0xd4dd('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xd4dd('0x1'));var config=require(_0xd4dd('0x2'));var controller=require(_0xd4dd('0x3'));router['get']('/',auth[_0xd4dd('0x4')](),controller[_0xd4dd('0x5')]);router[_0xd4dd('0x6')](_0xd4dd('0x7'),auth[_0xd4dd('0x4')](),controller[_0xd4dd('0x8')]);router[_0xd4dd('0x6')]('/:id',auth[_0xd4dd('0x4')](),controller[_0xd4dd('0x9')]);router['put'](_0xd4dd('0xa'),auth[_0xd4dd('0x4')](),controller[_0xd4dd('0xb')]);router[_0xd4dd('0xc')]('/:id',auth['isAuthenticated'](),controller[_0xd4dd('0xd')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.attributes.js b/server/api/cmHopperFinal/cmHopperFinal.attributes.js
index e0c0be0..d6b9001 100644
--- a/server/api/cmHopperFinal/cmHopperFinal.attributes.js
+++ b/server/api/cmHopperFinal/cmHopperFinal.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf5f1=['endtime','setDataValue','diff','seconds','BOOLEAN','sequelize','moment','exports','INTEGER','DATE','STRING','getDataValue'];(function(_0x3a83c8,_0x489ffd){var _0x5c89db=function(_0x35a94a){while(--_0x35a94a){_0x3a83c8['push'](_0x3a83c8['shift']());}};_0x5c89db(++_0x489ffd);}(_0xf5f1,0x149));var _0x1f5f=function(_0x90315c,_0x3ee135){_0x90315c=_0x90315c-0x0;var _0x2bb624=_0xf5f1[_0x90315c];return _0x2bb624;};'use strict';var Sequelize=require(_0x1f5f('0x0'));var moment=require(_0x1f5f('0x1'));module[_0x1f5f('0x2')]={'state':{'type':Sequelize[_0x1f5f('0x3')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0x1f5f('0x4')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x1f5f('0x5')]},'originatecalleridnum':{'type':Sequelize[_0x1f5f('0x5')]},'originatecalleridname':{'type':Sequelize[_0x1f5f('0x5')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x1f5f('0x5')]},'starttime':{'type':Sequelize[_0x1f5f('0x4')]},'responsetime':{'type':Sequelize[_0x1f5f('0x4')]},'answertime':{'type':Sequelize[_0x1f5f('0x4')]},'droptime':{'type':Sequelize[_0x1f5f('0x4')]},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x1f5f('0x3')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x1f5f('0x5')]},'campaign':{'type':Sequelize[_0x1f5f('0x5')]},'campaigntype':{'type':Sequelize['STRING']},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize[_0x1f5f('0x5')]},'disposition':{'type':Sequelize[_0x1f5f('0x5')]},'dispositionat':{'type':Sequelize[_0x1f5f('0x4')],'set':function(_0x2160c8){var _0x29f7bc=this[_0x1f5f('0x6')](_0x1f5f('0x7'));if(_0x29f7bc&&_0x2160c8){this[_0x1f5f('0x8')]('followuptime',moment(_0x2160c8)[_0x1f5f('0x9')](moment(_0x29f7bc),_0x1f5f('0xa')));}return this[_0x1f5f('0x8')]('dispositionat',_0x2160c8);}},'amd':{'type':Sequelize[_0x1f5f('0xb')],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x1f5f('0xb')],'defaultValue':![]},'rescheduled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduledat':{'type':Sequelize['DATE']},'callback':{'type':Sequelize[_0x1f5f('0xb')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x1f5f('0x5')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x1f5f('0x4')]},'deleted':{'type':Sequelize['STRING'],'defaultValue':null},'deletedat':{'type':Sequelize[_0x1f5f('0x4')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x1f5f('0x4')]}};
\ No newline at end of file
+var _0xbd4c=['BOOLEAN','sequelize','moment','exports','INTEGER','STRING','DATE','getDataValue','diff','setDataValue','dispositionat'];(function(_0x2c3c3d,_0x3a25d2){var _0x341677=function(_0x1aeda9){while(--_0x1aeda9){_0x2c3c3d['push'](_0x2c3c3d['shift']());}};_0x341677(++_0x3a25d2);}(_0xbd4c,0x1cf));var _0xcbd4=function(_0x3405b6,_0x244ef7){_0x3405b6=_0x3405b6-0x0;var _0x2748d6=_0xbd4c[_0x3405b6];return _0x2748d6;};'use strict';var Sequelize=require(_0xcbd4('0x0'));var moment=require(_0xcbd4('0x1'));module[_0xcbd4('0x2')]={'state':{'type':Sequelize[_0xcbd4('0x3')](0x2)},'statedesc':{'type':Sequelize[_0xcbd4('0x4')]},'scheduledat':{'type':Sequelize[_0xcbd4('0x5')]},'countbusyretry':{'type':Sequelize[_0xcbd4('0x3')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xcbd4('0x3')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xcbd4('0x3')],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xcbd4('0x4')]},'originatecalleridnum':{'type':Sequelize[_0xcbd4('0x4')]},'originatecalleridname':{'type':Sequelize[_0xcbd4('0x4')]},'calleridnum':{'type':Sequelize[_0xcbd4('0x4')]},'calleridname':{'type':Sequelize[_0xcbd4('0x4')]},'starttime':{'type':Sequelize[_0xcbd4('0x5')]},'responsetime':{'type':Sequelize[_0xcbd4('0x5')]},'answertime':{'type':Sequelize[_0xcbd4('0x5')]},'droptime':{'type':Sequelize[_0xcbd4('0x5')]},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0xcbd4('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0xcbd4('0x3')],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize['STRING']},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0xcbd4('0x4')]},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize[_0xcbd4('0x4')]},'disposition':{'type':Sequelize[_0xcbd4('0x4')]},'dispositionat':{'type':Sequelize[_0xcbd4('0x5')],'set':function(_0x3039a6){var _0x58dc97=this[_0xcbd4('0x6')]('endtime');if(_0x58dc97&&_0x3039a6){this['setDataValue']('followuptime',moment(_0x3039a6)[_0xcbd4('0x7')](moment(_0x58dc97),'seconds'));}return this[_0xcbd4('0x8')](_0xcbd4('0x9'),_0x3039a6);}},'amd':{'type':Sequelize[_0xcbd4('0xa')],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'blacklist':{'type':Sequelize[_0xcbd4('0xa')],'defaultValue':![]},'rescheduled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduledat':{'type':Sequelize['DATE']},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0xcbd4('0x5')]},'deleted':{'type':Sequelize['STRING'],'defaultValue':null},'deletedat':{'type':Sequelize[_0xcbd4('0x5')]},'recallme':{'type':Sequelize[_0xcbd4('0xa')],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0xcbd4('0x5')]}};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.controller.js b/server/api/cmHopperFinal/cmHopperFinal.controller.js
index ff0717f..c37f15d 100644
--- a/server/api/cmHopperFinal/cmHopperFinal.controller.js
+++ b/server/api/cmHopperFinal/cmHopperFinal.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6bef=['body','uniqueid','params','countContactsQueueCampaignHopperFinal','sequelize','COUNT','literal','`state`\x20=\x200,\x201,\x20null','noSuchContacts','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','busyContacts','abandonedContacts','answeringMachine','catch','moveContactsQueueCampaignHopperFinal','VoiceQueue','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','createdAt','updatedAt','select','ANY_VALUE(calleridnum)','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(ListId)','ANY_VALUE(VoiceQueueId)','VoiceQueueId','from','cm_hopper_final','VoiceQueueId\x20=\x20?','toString','state\x20=\x20?','state','calleridnum\x20NOT\x20IN\x20(?)','calleridnum','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','CampaignId','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','calleridnum\x20IS\x20NOT\x20NULL','findOne','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','json','offset','limit','Content-Range','reject','then','error','name','send','CmHopperFinal','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','key','field','options','count','includeAll','include','findAll','rows','find','describe'];(function(_0x2cbb78,_0x282b39){var _0x53ee5e=function(_0x2a4786){while(--_0x2a4786){_0x2cbb78['push'](_0x2cbb78['shift']());}};_0x53ee5e(++_0x282b39);}(_0x6bef,0x1ac));var _0xf6be=function(_0x2bee49,_0x1676f7){_0x2bee49=_0x2bee49-0x0;var _0x45c20f=_0x6bef[_0x2bee49];return _0x45c20f;};'use strict';var pdf=require(_0xf6be('0x0'));var emlformat=require(_0xf6be('0x1'));var rimraf=require(_0xf6be('0x2'));var zipdir=require(_0xf6be('0x3'));var jsonpatch=require(_0xf6be('0x4'));var rp=require(_0xf6be('0x5'));var moment=require(_0xf6be('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xf6be('0x7'));var util=require(_0xf6be('0x8'));var path=require(_0xf6be('0x9'));var sox=require(_0xf6be('0xa'));var csv=require(_0xf6be('0xb'));var ejs=require(_0xf6be('0xc'));var fs=require('fs');var _=require(_0xf6be('0xd'));var squel=require('squel');var crypto=require(_0xf6be('0xe'));var jsforce=require(_0xf6be('0xf'));var deskjs=require(_0xf6be('0x10'));var toCsv=require(_0xf6be('0xb'));var querystring=require(_0xf6be('0x11'));var Papa=require(_0xf6be('0x12'));var Redis=require(_0xf6be('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xf6be('0x14'));var hardwareService=require(_0xf6be('0x15'));var logger=require(_0xf6be('0x16'))(_0xf6be('0x17'));var utils=require(_0xf6be('0x18'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x254413,_0x34ecc7){_0x34ecc7=_0x34ecc7||0xcc;return function(_0x417292){if(_0x417292){return _0x254413[_0xf6be('0x19')](_0x34ecc7);}return _0x254413[_0xf6be('0x1a')](_0x34ecc7)['end']();};}function respondWithResult(_0x51b1c2,_0x4b3844){_0x4b3844=_0x4b3844||0xc8;return function(_0x3e805d){if(_0x3e805d){return _0x51b1c2['status'](_0x4b3844)[_0xf6be('0x1b')](_0x3e805d);}};}function respondWithFilteredResult(_0xaf3b3b,_0x2564ed){return function(_0x4c5f62){if(_0x4c5f62){var _0x349c2a=_0x4c5f62['count'],_0x4a005a=_0x2564ed[_0xf6be('0x1c')],_0x4e3afc=_0x2564ed[_0xf6be('0x1c')]+_0x2564ed[_0xf6be('0x1d')],_0x2c93d7;if(_0x4e3afc>=_0x349c2a){_0x4e3afc=_0x349c2a;_0x2c93d7=0xc8;}else{_0x2c93d7=0xce;}_0xaf3b3b[_0xf6be('0x1a')](_0x2c93d7);return _0xaf3b3b['set'](_0xf6be('0x1e'),_0x4a005a+'-'+_0x4e3afc+'/'+_0x349c2a)['json'](_0x4c5f62);}return null;};}function patchUpdates(_0x3abca5){return function(_0x327819){try{jsonpatch['apply'](_0x327819,_0x3abca5,!![]);}catch(_0x203682){return BPromise[_0xf6be('0x1f')](_0x203682);}return _0x327819['save']();};}function saveUpdates(_0x534fe9,_0x554592){return function(_0x1f7914){if(_0x1f7914){return _0x1f7914['update'](_0x534fe9)[_0xf6be('0x20')](function(_0x1dbaa9){return _0x1dbaa9;});}return null;};}function removeEntity(_0x5e3d9b,_0x3679cf){return function(_0x3f7240){if(_0x3f7240){return _0x3f7240['destroy']()['then'](function(){_0x5e3d9b['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x55b537,_0x132f35){return function(_0x5ed778){if(!_0x5ed778){_0x55b537[_0xf6be('0x19')](0x194);}return _0x5ed778;};}function handleError(_0x1413fe,_0x20485b){_0x20485b=_0x20485b||0x1f4;return function(_0x3bc6e5){logger[_0xf6be('0x21')](_0x3bc6e5['stack']);if(_0x3bc6e5[_0xf6be('0x22')]){delete _0x3bc6e5[_0xf6be('0x22')];}_0x1413fe[_0xf6be('0x1a')](_0x20485b)[_0xf6be('0x23')](_0x3bc6e5);};}exports['index']=function(_0x518828,_0x12cd53){var _0x2a8e90={},_0x55b25c={},_0x3a51ff={'count':0x0,'rows':[]};var _0x10c60c=db[_0xf6be('0x24')][_0xf6be('0x25')];_0x55b25c[_0xf6be('0x26')]=_[_0xf6be('0x27')](_0x10c60c);_0x55b25c['query']=_[_0xf6be('0x27')](_0x518828[_0xf6be('0x28')]);_0x55b25c[_0xf6be('0x29')]=_[_0xf6be('0x2a')](_0x55b25c[_0xf6be('0x26')],_0x55b25c['query']);_0x2a8e90[_0xf6be('0x2b')]=_[_0xf6be('0x2a')](_0x55b25c[_0xf6be('0x26')],qs[_0xf6be('0x2c')](_0x518828['query'][_0xf6be('0x2c')]));_0x2a8e90[_0xf6be('0x2b')]=_0x2a8e90['attributes'][_0xf6be('0x2d')]?_0x2a8e90[_0xf6be('0x2b')]:_0x55b25c[_0xf6be('0x26')];if(!_0x518828[_0xf6be('0x28')][_0xf6be('0x2e')](_0xf6be('0x2f'))){_0x2a8e90[_0xf6be('0x1d')]=qs[_0xf6be('0x1d')](_0x518828[_0xf6be('0x28')][_0xf6be('0x1d')]);_0x2a8e90[_0xf6be('0x1c')]=qs[_0xf6be('0x1c')](_0x518828[_0xf6be('0x28')][_0xf6be('0x1c')]);}_0x2a8e90['order']=qs['sort'](_0x518828[_0xf6be('0x28')][_0xf6be('0x30')]);_0x2a8e90[_0xf6be('0x31')]=qs[_0xf6be('0x29')](_[_0xf6be('0x32')](_0x518828[_0xf6be('0x28')],_0x55b25c[_0xf6be('0x29')]));if(_0x518828[_0xf6be('0x28')][_0xf6be('0x33')]){_0x2a8e90[_0xf6be('0x31')]=_[_0xf6be('0x34')](_0x2a8e90[_0xf6be('0x31')],{'$or':_[_0xf6be('0x35')](_0x10c60c,function(_0x59c60c){if(_0x59c60c['type'][_0xf6be('0x36')]!=='VIRTUAL'){var _0x47c54f={};_0x47c54f[_0x59c60c[_0xf6be('0x37')]]={'$like':'%'+_0x518828['query'][_0xf6be('0x33')]+'%'};return _0x47c54f;}})});}_0x2a8e90=_[_0xf6be('0x34')]({},_0x2a8e90,_0x518828[_0xf6be('0x38')]);var _0x2e07c2={'where':_0x2a8e90[_0xf6be('0x31')]};return db['CmHopperFinal']['count'](_0x2e07c2)[_0xf6be('0x20')](function(_0x1a1f1d){_0x3a51ff[_0xf6be('0x39')]=_0x1a1f1d;if(_0x518828[_0xf6be('0x28')][_0xf6be('0x3a')]){_0x2a8e90[_0xf6be('0x3b')]=[{'all':!![]}];}return db[_0xf6be('0x24')][_0xf6be('0x3c')](_0x2a8e90);})[_0xf6be('0x20')](function(_0x48ccd9){_0x3a51ff[_0xf6be('0x3d')]=_0x48ccd9;return _0x3a51ff;})[_0xf6be('0x20')](respondWithFilteredResult(_0x12cd53,_0x2a8e90))['catch'](handleError(_0x12cd53,null));};exports['show']=function(_0x2b7aca,_0x4dd3f5){var _0x501b5c={'raw':!![],'where':{'id':_0x2b7aca['params']['id']}},_0x525f26={};_0x525f26['model']=_['keys'](db[_0xf6be('0x24')][_0xf6be('0x25')]);_0x525f26['query']=_[_0xf6be('0x27')](_0x2b7aca['query']);_0x525f26['filters']=_[_0xf6be('0x2a')](_0x525f26[_0xf6be('0x26')],_0x525f26[_0xf6be('0x28')]);_0x501b5c['attributes']=_[_0xf6be('0x2a')](_0x525f26[_0xf6be('0x26')],qs['fields'](_0x2b7aca['query'][_0xf6be('0x2c')]));_0x501b5c['attributes']=_0x501b5c[_0xf6be('0x2b')]['length']?_0x501b5c[_0xf6be('0x2b')]:_0x525f26[_0xf6be('0x26')];if(_0x2b7aca[_0xf6be('0x28')][_0xf6be('0x3a')]){_0x501b5c[_0xf6be('0x3b')]=[{'all':!![]}];}_0x501b5c=_[_0xf6be('0x34')]({},_0x501b5c,_0x2b7aca['options']);return db['CmHopperFinal'][_0xf6be('0x3e')](_0x501b5c)['then'](handleEntityNotFound(_0x4dd3f5,null))[_0xf6be('0x20')](respondWithResult(_0x4dd3f5,null))['catch'](handleError(_0x4dd3f5,null));};exports[_0xf6be('0x3f')]=function(_0x6d873e,_0x26f4af){return db[_0xf6be('0x24')][_0xf6be('0x3f')]()[_0xf6be('0x20')](respondWithResult(_0x26f4af,null))['catch'](handleError(_0x26f4af,null));};exports['update']=function(_0x3bd562,_0x14ad32){if(_0x3bd562[_0xf6be('0x40')][_0xf6be('0x41')]){delete _0x3bd562['body'][_0xf6be('0x41')];}return db['CmHopperFinal'][_0xf6be('0x3e')]({'where':{'uniqueid':_0x3bd562[_0xf6be('0x42')]['id']}})[_0xf6be('0x20')](handleEntityNotFound(_0x14ad32,null))['then'](saveUpdates(_0x3bd562['body'],null))['then'](respondWithResult(_0x14ad32,null))['catch'](handleError(_0x14ad32,null));};exports[_0xf6be('0x43')]=function(_0x55ee4c,_0x5e6afc,_0x7a2e12){return db['CmHopperFinal'][_0xf6be('0x3c')]({'raw':![],'where':{'VoiceQueueId':_0x55ee4c[_0xf6be('0x42')]['id']},'attributes':[[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db['sequelize']['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x47')))),_0xf6be('0x48')],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x49')))),_0xf6be('0x4a')],[db[_0xf6be('0x44')]['fn']('COUNT',db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')]['literal'](_0xf6be('0x4b')))),'busyContacts'],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db['sequelize']['fn']('IF',db[_0xf6be('0x44')]['literal'](_0xf6be('0x4c')))),_0xf6be('0x4d')],[db['sequelize']['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x4e')))),_0xf6be('0x4f')],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db['sequelize'][_0xf6be('0x46')](_0xf6be('0x50')))),'abandonedContacts'],[db[_0xf6be('0x44')]['fn']('COUNT',db[_0xf6be('0x44')]['fn']('IF',db['sequelize']['literal'](_0xf6be('0x51')))),_0xf6be('0x52')],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')]['literal'](_0xf6be('0x53')))),'answeringMachine']]})['then'](handleEntityNotFound(_0x5e6afc,null))['then'](respondWithResult(_0x5e6afc,null))['catch'](handleError(_0x5e6afc,null));};exports['countContactsIvrCampaignHopperFinal']=function(_0x12d68e,_0xa30837,_0x4c926d){return db['CmHopperFinal'][_0xf6be('0x3c')]({'raw':![],'where':{'CampaignId':_0x12d68e[_0xf6be('0x42')]['id']},'attributes':[[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x47')))),_0xf6be('0x48')],[db[_0xf6be('0x44')]['fn']('COUNT',db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x49')))),_0xf6be('0x4a')],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x4b')))),_0xf6be('0x54')],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db['sequelize'][_0xf6be('0x46')](_0xf6be('0x4c')))),_0xf6be('0x4d')],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db['sequelize']['fn']('IF',db[_0xf6be('0x44')]['literal'](_0xf6be('0x4e')))),_0xf6be('0x4f')],[db['sequelize']['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db['sequelize'][_0xf6be('0x46')](_0xf6be('0x50')))),_0xf6be('0x55')],[db[_0xf6be('0x44')]['fn']('COUNT',db[_0xf6be('0x44')]['fn']('IF',db['sequelize'][_0xf6be('0x46')](_0xf6be('0x51')))),'reCallContacts'],[db[_0xf6be('0x44')]['fn'](_0xf6be('0x45'),db[_0xf6be('0x44')]['fn']('IF',db[_0xf6be('0x44')][_0xf6be('0x46')](_0xf6be('0x53')))),_0xf6be('0x56')]]})[_0xf6be('0x20')](handleEntityNotFound(_0xa30837,null))[_0xf6be('0x20')](respondWithResult(_0xa30837,null))[_0xf6be('0x57')](handleError(_0xa30837,null));};exports[_0xf6be('0x58')]=function(_0x58f190,_0x1f007e,_0x447d53){return db[_0xf6be('0x59')][_0xf6be('0x3e')]({'where':{'id':_0x58f190[_0xf6be('0x42')]['id']}})[_0xf6be('0x20')](handleEntityNotFound(_0x1f007e,null))[_0xf6be('0x20')](function(_0x5e8f95){var _0x4c96b9;if(_0x5e8f95){_0x4c96b9=squel[_0xf6be('0x5a')]()[_0xf6be('0x5b')](_0xf6be('0x5c'))[_0xf6be('0x5d')]([_0xf6be('0x5e'),_0xf6be('0x5f'),_0xf6be('0x60'),_0xf6be('0x61'),'VoiceQueueId',_0xf6be('0x62'),_0xf6be('0x63')],squel[_0xf6be('0x64')]()[_0xf6be('0x37')](_0xf6be('0x65'),'phone')[_0xf6be('0x37')](_0xf6be('0x66'),'scheduledAt')[_0xf6be('0x37')](_0xf6be('0x67'),_0xf6be('0x60'))[_0xf6be('0x37')](_0xf6be('0x68'),_0xf6be('0x61'))[_0xf6be('0x37')](_0xf6be('0x69'),_0xf6be('0x6a'))[_0xf6be('0x37')](_0xf6be('0x66'),_0xf6be('0x62'))[_0xf6be('0x37')](_0xf6be('0x66'),_0xf6be('0x63'))[_0xf6be('0x6b')](_0xf6be('0x6c'))[_0xf6be('0x31')](_0xf6be('0x6d'),_0x58f190[_0xf6be('0x42')]['id'][_0xf6be('0x6e')]())['where'](_0xf6be('0x6f'),_0x58f190[_0xf6be('0x40')][_0xf6be('0x70')][_0xf6be('0x6e')]())[_0xf6be('0x31')]('calleridnum\x20IS\x20NOT\x20NULL')[_0xf6be('0x31')](_0xf6be('0x71'),squel[_0xf6be('0x64')]()[_0xf6be('0x37')]('phone')[_0xf6be('0x6b')](_0xf6be('0x5c'))[_0xf6be('0x31')](_0xf6be('0x6d'),_0x58f190['params']['id'][_0xf6be('0x6e')]()))[_0xf6be('0x31')](_0xf6be('0x71'),squel['select']()[_0xf6be('0x37')](_0xf6be('0x72'))[_0xf6be('0x6b')](_0xf6be('0x6c'))[_0xf6be('0x31')](_0xf6be('0x6d'),_0x58f190['params']['id'][_0xf6be('0x6e')]())['where'](_0xf6be('0x73')))[_0xf6be('0x74')](_0xf6be('0x60')))[_0xf6be('0x6e')]();return db['sequelize'][_0xf6be('0x28')](_0x4c96b9);}return[];})['then'](respondWithResult(_0x1f007e,null))[_0xf6be('0x57')](handleError(_0x1f007e,null));};exports[_0xf6be('0x75')]=function(_0x5f4b37,_0xddaf8c,_0xfc5f53){return db['Campaign'][_0xf6be('0x3e')]({'where':{'id':_0x5f4b37[_0xf6be('0x42')]['id']}})[_0xf6be('0x20')](handleEntityNotFound(_0xddaf8c,null))['then'](function(_0x3f91e6){var _0xb99838;if(_0x3f91e6){_0xb99838=squel['insert']()[_0xf6be('0x5b')]('cm_hopper')[_0xf6be('0x5d')]([_0xf6be('0x5e'),_0xf6be('0x5f'),'ContactId','ListId',_0xf6be('0x76'),_0xf6be('0x62'),_0xf6be('0x63')],squel[_0xf6be('0x64')]()[_0xf6be('0x37')]('ANY_VALUE(calleridnum)',_0xf6be('0x5e'))[_0xf6be('0x37')](_0xf6be('0x66'),_0xf6be('0x5f'))[_0xf6be('0x37')](_0xf6be('0x67'),_0xf6be('0x60'))[_0xf6be('0x37')](_0xf6be('0x68'),_0xf6be('0x61'))[_0xf6be('0x37')](_0xf6be('0x77'),_0xf6be('0x76'))['field'](_0xf6be('0x66'),_0xf6be('0x62'))[_0xf6be('0x37')]('NOW()',_0xf6be('0x63'))['from'](_0xf6be('0x6c'))[_0xf6be('0x31')](_0xf6be('0x78'),_0x5f4b37['params']['id'][_0xf6be('0x6e')]())[_0xf6be('0x31')](_0xf6be('0x6f'),_0x5f4b37['body'][_0xf6be('0x70')][_0xf6be('0x6e')]())[_0xf6be('0x31')](_0xf6be('0x79'))[_0xf6be('0x31')](_0xf6be('0x71'),squel[_0xf6be('0x64')]()['field'](_0xf6be('0x5e'))[_0xf6be('0x6b')]('cm_hopper')['where']('CampaignId\x20=\x20?',_0x5f4b37['params']['id'][_0xf6be('0x6e')]()))[_0xf6be('0x31')]('calleridnum\x20NOT\x20IN\x20(?)',squel['select']()[_0xf6be('0x37')](_0xf6be('0x72'))[_0xf6be('0x6b')](_0xf6be('0x6c'))['where'](_0xf6be('0x78'),_0x5f4b37[_0xf6be('0x42')]['id'][_0xf6be('0x6e')]())[_0xf6be('0x31')](_0xf6be('0x73')))[_0xf6be('0x74')](_0xf6be('0x60')))[_0xf6be('0x6e')]();return db[_0xf6be('0x44')][_0xf6be('0x28')](_0xb99838);}return[];})[_0xf6be('0x20')](respondWithResult(_0xddaf8c,null))[_0xf6be('0x57')](handleError(_0xddaf8c,null));};exports['checkContactHopper']=function(_0x4fdbf8,_0x518700,_0x57291b){return db['CmHopper'][_0xf6be('0x7a')]({'where':{'VoiceQueueId':_0x4fdbf8['body'][_0xf6be('0x6a')],'CampaignId':_0x4fdbf8[_0xf6be('0x40')][_0xf6be('0x76')],'ContactId':_0x4fdbf8[_0xf6be('0x40')][_0xf6be('0x60')]}})[_0xf6be('0x20')](handleEntityNotFound(_0x518700,null))[_0xf6be('0x20')](function(_0x46689e){if(_0x46689e){return _0x46689e;}return null;})[_0xf6be('0x20')](respondWithResult(_0x518700,null))['catch'](handleError(_0x518700,null));};
\ No newline at end of file
+var _0x2056=['../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','index','rawAttributes','keys','query','filters','attributes','intersection','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','VIRTUAL','field','options','CmHopperFinal','include','rows','catch','show','params','includeAll','describe','uniqueid','body','countContactsQueueCampaignHopperFinal','findAll','sequelize','COUNT','literal','`state`\x20=\x200,\x201,\x20null','noSuchContacts','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','answeringMachine','countContactsIvrCampaignHopperFinal','moveContactsQueueCampaignHopperFinal','find','insert','cm_hopper','fromQuery','scheduledAt','ContactId','ListId','VoiceQueueId','select','ANY_VALUE(calleridnum)','phone','NOW()','ANY_VALUE(ListId)','createdAt','from','cm_hopper_final','VoiceQueueId\x20=\x20?','toString','state\x20=\x20?','state','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','calleridnum','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','Campaign','CampaignId','updatedAt','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','checkContactHopper','CmHopper','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x34ac75,_0x75b3a2){var _0x389365=function(_0x4a47dc){while(--_0x4a47dc){_0x34ac75['push'](_0x34ac75['shift']());}};_0x389365(++_0x75b3a2);}(_0x2056,0x1ec));var _0x6205=function(_0x1b852e,_0x185f0d){_0x1b852e=_0x1b852e-0x0;var _0x2fd5cf=_0x2056[_0x1b852e];return _0x2fd5cf;};'use strict';var pdf=require(_0x6205('0x0'));var emlformat=require(_0x6205('0x1'));var rimraf=require(_0x6205('0x2'));var zipdir=require(_0x6205('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6205('0x4'));var BPromise=require(_0x6205('0x5'));var Mustache=require(_0x6205('0x6'));var util=require(_0x6205('0x7'));var path=require(_0x6205('0x8'));var sox=require(_0x6205('0x9'));var csv=require(_0x6205('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x6205('0xb'));var squel=require('squel');var crypto=require(_0x6205('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x6205('0xd'));var toCsv=require(_0x6205('0xa'));var querystring=require(_0x6205('0xe'));var Papa=require(_0x6205('0xf'));var Redis=require(_0x6205('0x10'));var authService=require(_0x6205('0x11'));var qs=require(_0x6205('0x12'));var hardwareService=require(_0x6205('0x13'));var logger=require(_0x6205('0x14'))(_0x6205('0x15'));var utils=require(_0x6205('0x16'));var config=require(_0x6205('0x17'));var db=require(_0x6205('0x18'))['db'];function respondWithStatusCode(_0x1ba075,_0x921716){_0x921716=_0x921716||0xcc;return function(_0x2d804b){if(_0x2d804b){return _0x1ba075[_0x6205('0x19')](_0x921716);}return _0x1ba075[_0x6205('0x1a')](_0x921716)[_0x6205('0x1b')]();};}function respondWithResult(_0x24485c,_0x2c1801){_0x2c1801=_0x2c1801||0xc8;return function(_0x2d075f){if(_0x2d075f){return _0x24485c[_0x6205('0x1a')](_0x2c1801)['json'](_0x2d075f);}};}function respondWithFilteredResult(_0x5abfbc,_0xc842a0){return function(_0xf30a7a){if(_0xf30a7a){var _0x4381e0=_0xf30a7a[_0x6205('0x1c')],_0x540f14=_0xc842a0[_0x6205('0x1d')],_0x92ef3c=_0xc842a0['offset']+_0xc842a0[_0x6205('0x1e')],_0x3f0f02;if(_0x92ef3c>=_0x4381e0){_0x92ef3c=_0x4381e0;_0x3f0f02=0xc8;}else{_0x3f0f02=0xce;}_0x5abfbc[_0x6205('0x1a')](_0x3f0f02);return _0x5abfbc[_0x6205('0x1f')](_0x6205('0x20'),_0x540f14+'-'+_0x92ef3c+'/'+_0x4381e0)['json'](_0xf30a7a);}return null;};}function patchUpdates(_0x4c89ea){return function(_0x121d5e){try{jsonpatch[_0x6205('0x21')](_0x121d5e,_0x4c89ea,!![]);}catch(_0x399917){return BPromise[_0x6205('0x22')](_0x399917);}return _0x121d5e['save']();};}function saveUpdates(_0x1a9574,_0x2127d2){return function(_0x185380){if(_0x185380){return _0x185380[_0x6205('0x23')](_0x1a9574)[_0x6205('0x24')](function(_0x542bf9){return _0x542bf9;});}return null;};}function removeEntity(_0x34f534,_0x166e79){return function(_0x539538){if(_0x539538){return _0x539538[_0x6205('0x25')]()[_0x6205('0x24')](function(){_0x34f534[_0x6205('0x1a')](0xcc)[_0x6205('0x1b')]();});}};}function handleEntityNotFound(_0x3719c5,_0x5c9b92){return function(_0x29c9e6){if(!_0x29c9e6){_0x3719c5[_0x6205('0x19')](0x194);}return _0x29c9e6;};}function handleError(_0x1b9e29,_0x40d081){_0x40d081=_0x40d081||0x1f4;return function(_0x3089e7){logger[_0x6205('0x26')](_0x3089e7[_0x6205('0x27')]);if(_0x3089e7['name']){delete _0x3089e7[_0x6205('0x28')];}_0x1b9e29[_0x6205('0x1a')](_0x40d081)[_0x6205('0x29')](_0x3089e7);};}exports[_0x6205('0x2a')]=function(_0x170a62,_0x5997ac){var _0x1d3b07={},_0x1b8b0b={},_0x45d533={'count':0x0,'rows':[]};var _0x2eb2fc=db['CmHopperFinal'][_0x6205('0x2b')];_0x1b8b0b['model']=_[_0x6205('0x2c')](_0x2eb2fc);_0x1b8b0b[_0x6205('0x2d')]=_['keys'](_0x170a62['query']);_0x1b8b0b[_0x6205('0x2e')]=_['intersection'](_0x1b8b0b['model'],_0x1b8b0b[_0x6205('0x2d')]);_0x1d3b07[_0x6205('0x2f')]=_[_0x6205('0x30')](_0x1b8b0b[_0x6205('0x31')],qs[_0x6205('0x32')](_0x170a62[_0x6205('0x2d')][_0x6205('0x32')]));_0x1d3b07[_0x6205('0x2f')]=_0x1d3b07[_0x6205('0x2f')][_0x6205('0x33')]?_0x1d3b07[_0x6205('0x2f')]:_0x1b8b0b[_0x6205('0x31')];if(!_0x170a62['query'][_0x6205('0x34')](_0x6205('0x35'))){_0x1d3b07[_0x6205('0x1e')]=qs['limit'](_0x170a62[_0x6205('0x2d')][_0x6205('0x1e')]);_0x1d3b07['offset']=qs[_0x6205('0x1d')](_0x170a62[_0x6205('0x2d')]['offset']);}_0x1d3b07[_0x6205('0x36')]=qs[_0x6205('0x37')](_0x170a62[_0x6205('0x2d')][_0x6205('0x37')]);_0x1d3b07[_0x6205('0x38')]=qs[_0x6205('0x2e')](_[_0x6205('0x39')](_0x170a62[_0x6205('0x2d')],_0x1b8b0b[_0x6205('0x2e')]));if(_0x170a62[_0x6205('0x2d')][_0x6205('0x3a')]){_0x1d3b07[_0x6205('0x38')]=_[_0x6205('0x3b')](_0x1d3b07[_0x6205('0x38')],{'$or':_[_0x6205('0x3c')](_0x2eb2fc,function(_0x4ed38d){if(_0x4ed38d[_0x6205('0x3d')]['key']!==_0x6205('0x3e')){var _0x32c424={};_0x32c424[_0x4ed38d[_0x6205('0x3f')]]={'$like':'%'+_0x170a62[_0x6205('0x2d')]['filter']+'%'};return _0x32c424;}})});}_0x1d3b07=_[_0x6205('0x3b')]({},_0x1d3b07,_0x170a62[_0x6205('0x40')]);var _0x5959e3={'where':_0x1d3b07['where']};return db[_0x6205('0x41')][_0x6205('0x1c')](_0x5959e3)[_0x6205('0x24')](function(_0x557960){_0x45d533[_0x6205('0x1c')]=_0x557960;if(_0x170a62[_0x6205('0x2d')]['includeAll']){_0x1d3b07[_0x6205('0x42')]=[{'all':!![]}];}return db['CmHopperFinal']['findAll'](_0x1d3b07);})['then'](function(_0x83a2f7){_0x45d533[_0x6205('0x43')]=_0x83a2f7;return _0x45d533;})[_0x6205('0x24')](respondWithFilteredResult(_0x5997ac,_0x1d3b07))[_0x6205('0x44')](handleError(_0x5997ac,null));};exports[_0x6205('0x45')]=function(_0x2b73c6,_0x463d2d){var _0x435258={'raw':!![],'where':{'id':_0x2b73c6[_0x6205('0x46')]['id']}},_0x24ec45={};_0x24ec45[_0x6205('0x31')]=_[_0x6205('0x2c')](db[_0x6205('0x41')][_0x6205('0x2b')]);_0x24ec45[_0x6205('0x2d')]=_[_0x6205('0x2c')](_0x2b73c6[_0x6205('0x2d')]);_0x24ec45[_0x6205('0x2e')]=_[_0x6205('0x30')](_0x24ec45['model'],_0x24ec45[_0x6205('0x2d')]);_0x435258[_0x6205('0x2f')]=_['intersection'](_0x24ec45[_0x6205('0x31')],qs['fields'](_0x2b73c6[_0x6205('0x2d')][_0x6205('0x32')]));_0x435258['attributes']=_0x435258[_0x6205('0x2f')][_0x6205('0x33')]?_0x435258[_0x6205('0x2f')]:_0x24ec45[_0x6205('0x31')];if(_0x2b73c6[_0x6205('0x2d')][_0x6205('0x47')]){_0x435258[_0x6205('0x42')]=[{'all':!![]}];}_0x435258=_['merge']({},_0x435258,_0x2b73c6[_0x6205('0x40')]);return db[_0x6205('0x41')]['find'](_0x435258)[_0x6205('0x24')](handleEntityNotFound(_0x463d2d,null))[_0x6205('0x24')](respondWithResult(_0x463d2d,null))[_0x6205('0x44')](handleError(_0x463d2d,null));};exports[_0x6205('0x48')]=function(_0x318ca2,_0x5c222c){return db[_0x6205('0x41')][_0x6205('0x48')]()['then'](respondWithResult(_0x5c222c,null))[_0x6205('0x44')](handleError(_0x5c222c,null));};exports[_0x6205('0x23')]=function(_0x45b3d1,_0x1d811c){if(_0x45b3d1['body'][_0x6205('0x49')]){delete _0x45b3d1[_0x6205('0x4a')]['uniqueid'];}return db['CmHopperFinal']['find']({'where':{'uniqueid':_0x45b3d1['params']['id']}})[_0x6205('0x24')](handleEntityNotFound(_0x1d811c,null))[_0x6205('0x24')](saveUpdates(_0x45b3d1[_0x6205('0x4a')],null))[_0x6205('0x24')](respondWithResult(_0x1d811c,null))[_0x6205('0x44')](handleError(_0x1d811c,null));};exports[_0x6205('0x4b')]=function(_0x5a2357,_0x2d18f1,_0x4262a9){return db[_0x6205('0x41')][_0x6205('0x4c')]({'raw':![],'where':{'VoiceQueueId':_0x5a2357[_0x6205('0x46')]['id']},'attributes':[[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db['sequelize'][_0x6205('0x4f')](_0x6205('0x50')))),_0x6205('0x51')],[db[_0x6205('0x4d')]['fn']('COUNT',db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')]('`state`\x20=\x203,\x201,\x20null'))),_0x6205('0x52')],[db[_0x6205('0x4d')]['fn']('COUNT',db[_0x6205('0x4d')]['fn']('IF',db['sequelize'][_0x6205('0x4f')](_0x6205('0x53')))),'busyContacts'],[db[_0x6205('0x4d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')](_0x6205('0x54')))),_0x6205('0x55')],[db[_0x6205('0x4d')]['fn']('COUNT',db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')]['literal'](_0x6205('0x56')))),_0x6205('0x57')],[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')](_0x6205('0x58')))),_0x6205('0x59')],[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')](_0x6205('0x5a')))),_0x6205('0x5b')],[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')](_0x6205('0x5c')))),_0x6205('0x5d')]]})[_0x6205('0x24')](handleEntityNotFound(_0x2d18f1,null))[_0x6205('0x24')](respondWithResult(_0x2d18f1,null))[_0x6205('0x44')](handleError(_0x2d18f1,null));};exports[_0x6205('0x5e')]=function(_0x571047,_0x13a352,_0x242a63){return db[_0x6205('0x41')][_0x6205('0x4c')]({'raw':![],'where':{'CampaignId':_0x571047[_0x6205('0x46')]['id']},'attributes':[[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db['sequelize']['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')](_0x6205('0x50')))),_0x6205('0x51')],[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')]['literal']('`state`\x20=\x203,\x201,\x20null'))),'noAnswerContacts'],[db['sequelize']['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')]['literal'](_0x6205('0x53')))),'busyContacts'],[db[_0x6205('0x4d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6205('0x4d')]['literal'](_0x6205('0x54')))),_0x6205('0x55')],[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db['sequelize'][_0x6205('0x4f')](_0x6205('0x56')))),_0x6205('0x57')],[db[_0x6205('0x4d')]['fn'](_0x6205('0x4e'),db[_0x6205('0x4d')]['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x6205('0x59')],[db['sequelize']['fn'](_0x6205('0x4e'),db['sequelize']['fn']('IF',db['sequelize'][_0x6205('0x4f')](_0x6205('0x5a')))),_0x6205('0x5b')],[db[_0x6205('0x4d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6205('0x4d')][_0x6205('0x4f')](_0x6205('0x5c')))),_0x6205('0x5d')]]})[_0x6205('0x24')](handleEntityNotFound(_0x13a352,null))[_0x6205('0x24')](respondWithResult(_0x13a352,null))['catch'](handleError(_0x13a352,null));};exports[_0x6205('0x5f')]=function(_0x76f0a8,_0x35296a,_0x2d04b4){return db['VoiceQueue'][_0x6205('0x60')]({'where':{'id':_0x76f0a8[_0x6205('0x46')]['id']}})[_0x6205('0x24')](handleEntityNotFound(_0x35296a,null))[_0x6205('0x24')](function(_0x4cb1c7){var _0x1b6953;if(_0x4cb1c7){_0x1b6953=squel[_0x6205('0x61')]()['into'](_0x6205('0x62'))[_0x6205('0x63')](['phone',_0x6205('0x64'),_0x6205('0x65'),_0x6205('0x66'),_0x6205('0x67'),'createdAt','updatedAt'],squel[_0x6205('0x68')]()['field'](_0x6205('0x69'),_0x6205('0x6a'))[_0x6205('0x3f')](_0x6205('0x6b'),_0x6205('0x64'))['field']('ANY_VALUE(ContactId)',_0x6205('0x65'))[_0x6205('0x3f')](_0x6205('0x6c'),'ListId')[_0x6205('0x3f')]('ANY_VALUE(VoiceQueueId)','VoiceQueueId')[_0x6205('0x3f')](_0x6205('0x6b'),_0x6205('0x6d'))['field'](_0x6205('0x6b'),'updatedAt')[_0x6205('0x6e')](_0x6205('0x6f'))['where'](_0x6205('0x70'),_0x76f0a8[_0x6205('0x46')]['id'][_0x6205('0x71')]())['where'](_0x6205('0x72'),_0x76f0a8[_0x6205('0x4a')][_0x6205('0x73')][_0x6205('0x71')]())[_0x6205('0x38')](_0x6205('0x74'))[_0x6205('0x38')](_0x6205('0x75'),squel[_0x6205('0x68')]()[_0x6205('0x3f')](_0x6205('0x6a'))[_0x6205('0x6e')](_0x6205('0x62'))[_0x6205('0x38')](_0x6205('0x70'),_0x76f0a8[_0x6205('0x46')]['id'][_0x6205('0x71')]()))[_0x6205('0x38')]('calleridnum\x20NOT\x20IN\x20(?)',squel['select']()[_0x6205('0x3f')](_0x6205('0x76'))[_0x6205('0x6e')](_0x6205('0x6f'))[_0x6205('0x38')]('VoiceQueueId\x20=\x20?',_0x76f0a8[_0x6205('0x46')]['id']['toString']())['where'](_0x6205('0x77')))[_0x6205('0x78')](_0x6205('0x65')))[_0x6205('0x71')]();return db[_0x6205('0x4d')][_0x6205('0x2d')](_0x1b6953);}return[];})[_0x6205('0x24')](respondWithResult(_0x35296a,null))[_0x6205('0x44')](handleError(_0x35296a,null));};exports[_0x6205('0x79')]=function(_0x1e4233,_0x2eba7c,_0x5929f8){return db[_0x6205('0x7a')]['find']({'where':{'id':_0x1e4233[_0x6205('0x46')]['id']}})['then'](handleEntityNotFound(_0x2eba7c,null))[_0x6205('0x24')](function(_0x4e1688){var _0x2f9ac2;if(_0x4e1688){_0x2f9ac2=squel['insert']()['into'](_0x6205('0x62'))['fromQuery']([_0x6205('0x6a'),_0x6205('0x64'),_0x6205('0x65'),_0x6205('0x66'),_0x6205('0x7b'),_0x6205('0x6d'),_0x6205('0x7c')],squel[_0x6205('0x68')]()[_0x6205('0x3f')](_0x6205('0x69'),'phone')['field'](_0x6205('0x6b'),'scheduledAt')[_0x6205('0x3f')]('ANY_VALUE(ContactId)',_0x6205('0x65'))[_0x6205('0x3f')]('ANY_VALUE(ListId)',_0x6205('0x66'))[_0x6205('0x3f')](_0x6205('0x7d'),_0x6205('0x7b'))[_0x6205('0x3f')](_0x6205('0x6b'),'createdAt')['field'](_0x6205('0x6b'),_0x6205('0x7c'))[_0x6205('0x6e')](_0x6205('0x6f'))[_0x6205('0x38')](_0x6205('0x7e'),_0x1e4233[_0x6205('0x46')]['id'][_0x6205('0x71')]())[_0x6205('0x38')](_0x6205('0x72'),_0x1e4233[_0x6205('0x4a')][_0x6205('0x73')][_0x6205('0x71')]())[_0x6205('0x38')](_0x6205('0x74'))[_0x6205('0x38')](_0x6205('0x75'),squel[_0x6205('0x68')]()['field'](_0x6205('0x6a'))['from'](_0x6205('0x62'))[_0x6205('0x38')]('CampaignId\x20=\x20?',_0x1e4233[_0x6205('0x46')]['id'][_0x6205('0x71')]()))[_0x6205('0x38')](_0x6205('0x75'),squel[_0x6205('0x68')]()['field']('calleridnum')['from']('cm_hopper_final')[_0x6205('0x38')](_0x6205('0x7e'),_0x1e4233['params']['id'][_0x6205('0x71')]())[_0x6205('0x38')](_0x6205('0x77')))[_0x6205('0x78')]('ContactId'))[_0x6205('0x71')]();return db['sequelize'][_0x6205('0x2d')](_0x2f9ac2);}return[];})[_0x6205('0x24')](respondWithResult(_0x2eba7c,null))[_0x6205('0x44')](handleError(_0x2eba7c,null));};exports[_0x6205('0x7f')]=function(_0x2ae883,_0x3ee53e,_0x24e537){return db[_0x6205('0x80')]['findOne']({'where':{'VoiceQueueId':_0x2ae883[_0x6205('0x4a')][_0x6205('0x67')],'CampaignId':_0x2ae883[_0x6205('0x4a')]['CampaignId'],'ContactId':_0x2ae883[_0x6205('0x4a')][_0x6205('0x65')]}})[_0x6205('0x24')](handleEntityNotFound(_0x3ee53e,null))[_0x6205('0x24')](function(_0x59826c){if(_0x59826c){return _0x59826c;}return null;})[_0x6205('0x24')](respondWithResult(_0x3ee53e,null))[_0x6205('0x44')](handleError(_0x3ee53e,null));};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.model.js b/server/api/cmHopperFinal/cmHopperFinal.model.js
index 6171e0b..56f3642 100644
--- a/server/api/cmHopperFinal/cmHopperFinal.model.js
+++ b/server/api/cmHopperFinal/cmHopperFinal.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfdc3=['define','CmHopperFinal','cm_hopper_final','calleridnum','uniqueid','lodash','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./cmHopperFinal.attributes'];(function(_0x2b7219,_0x3ddaa9){var _0x5d5e8d=function(_0x3f9935){while(--_0x3f9935){_0x2b7219['push'](_0x2b7219['shift']());}};_0x5d5e8d(++_0x3ddaa9);}(_0xfdc3,0x101));var _0x3fdc=function(_0x5b8d91,_0x4cc890){_0x5b8d91=_0x5b8d91-0x0;var _0x4daf58=_0xfdc3[_0x5b8d91];return _0x4daf58;};'use strict';var _=require(_0x3fdc('0x0'));var util=require(_0x3fdc('0x1'));var logger=require(_0x3fdc('0x2'))(_0x3fdc('0x3'));var moment=require('moment');var BPromise=require(_0x3fdc('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3fdc('0x5'));var rimraf=require(_0x3fdc('0x6'));var config=require(_0x3fdc('0x7'));var attributes=require(_0x3fdc('0x8'));module['exports']=function(_0x2d76b0,_0x3e10df){return _0x2d76b0[_0x3fdc('0x9')](_0x3fdc('0xa'),attributes,{'tableName':_0x3fdc('0xb'),'paranoid':![],'indexes':[{'name':_0x3fdc('0xc'),'fields':['calleridnum']},{'name':_0x3fdc('0xd'),'fields':[_0x3fdc('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x129a=['exports','define','CmHopperFinal','cm_hopper_final','calleridnum','uniqueid','lodash','../../config/logger','moment','bluebird','request-promise'];(function(_0x542c11,_0x35d5df){var _0xd5ba30=function(_0x352bff){while(--_0x352bff){_0x542c11['push'](_0x542c11['shift']());}};_0xd5ba30(++_0x35d5df);}(_0x129a,0x10e));var _0xa129=function(_0x43a6b4,_0x14070b){_0x43a6b4=_0x43a6b4-0x0;var _0x160884=_0x129a[_0x43a6b4];return _0x160884;};'use strict';var _=require(_0xa129('0x0'));var util=require('util');var logger=require(_0xa129('0x1'))('api');var moment=require(_0xa129('0x2'));var BPromise=require(_0xa129('0x3'));var rp=require(_0xa129('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./cmHopperFinal.attributes');module[_0xa129('0x5')]=function(_0x27aa43,_0x3b19b8){return _0x27aa43[_0xa129('0x6')](_0xa129('0x7'),attributes,{'tableName':_0xa129('0x8'),'paranoid':![],'indexes':[{'name':_0xa129('0x9'),'fields':[_0xa129('0x9')]},{'name':_0xa129('0xa'),'fields':[_0xa129('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.rpc.js b/server/api/cmHopperFinal/cmHopperFinal.rpc.js
index 33a7efe..a642b60 100644
--- a/server/api/cmHopperFinal/cmHopperFinal.rpc.js
+++ b/server/api/cmHopperFinal/cmHopperFinal.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2e54=['CmHopperFinal,\x20%s,\x20%s,\x20%s','error','message','result','catch','CreateCmHopperFinal','CmHopperFinal','options','stringify','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','CmHopperFinal,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x2f5e08,_0x30b70a){var _0x2e3105=function(_0x35cfb3){while(--_0x35cfb3){_0x2f5e08['push'](_0x2f5e08['shift']());}};_0x2e3105(++_0x30b70a);}(_0x2e54,0x1dd));var _0x42e5=function(_0x4b67e6,_0x473945){_0x4b67e6=_0x4b67e6-0x0;var _0xb9fcf3=_0x2e54[_0x4b67e6];return _0xb9fcf3;};'use strict';var _=require(_0x42e5('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x42e5('0x1'));var rs=require(_0x42e5('0x2'));var fs=require('fs');var Redis=require(_0x42e5('0x3'));var db=require(_0x42e5('0x4'))['db'];var utils=require(_0x42e5('0x5'));var logger=require(_0x42e5('0x6'))(_0x42e5('0x7'));var config=require('../../config/environment');var jayson=require(_0x42e5('0x8'));var client=jayson[_0x42e5('0x9')][_0x42e5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4bed10,_0x2af5bb,_0x56be20){return new BPromise(function(_0x335b92,_0x490b99){return client[_0x42e5('0xb')](_0x4bed10,_0x56be20)[_0x42e5('0xc')](function(_0x10ee5a){logger[_0x42e5('0xd')](_0x42e5('0xe'),_0x2af5bb,_0x42e5('0xf'));logger[_0x42e5('0x10')](_0x42e5('0x11'),_0x2af5bb,_0x42e5('0xf'),JSON['stringify'](_0x10ee5a));if(_0x10ee5a[_0x42e5('0x12')]){if(_0x10ee5a[_0x42e5('0x12')]['code']===0x1f4){logger[_0x42e5('0x12')](_0x42e5('0xe'),_0x2af5bb,_0x10ee5a[_0x42e5('0x12')][_0x42e5('0x13')]);return _0x490b99(_0x10ee5a[_0x42e5('0x12')][_0x42e5('0x13')]);}logger[_0x42e5('0x12')](_0x42e5('0xe'),_0x2af5bb,_0x10ee5a[_0x42e5('0x12')][_0x42e5('0x13')]);return _0x335b92(_0x10ee5a['error'][_0x42e5('0x13')]);}else{logger[_0x42e5('0xd')](_0x42e5('0xe'),_0x2af5bb,_0x42e5('0xf'));_0x335b92(_0x10ee5a[_0x42e5('0x14')][_0x42e5('0x13')]);}})[_0x42e5('0x15')](function(_0x3abe3d){logger[_0x42e5('0x12')](_0x42e5('0xe'),_0x2af5bb,_0x3abe3d);_0x490b99(_0x3abe3d);});});}exports[_0x42e5('0x16')]=function(_0x38282d){var _0x11550e=this;return new Promise(function(_0x23fe09,_0x54fcfc){return db[_0x42e5('0x17')]['create'](_0x38282d['body'],{'raw':_0x38282d[_0x42e5('0x18')]?_0x38282d[_0x42e5('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x42e5('0xc')](function(_0x39a3e2){logger[_0x42e5('0xd')](_0x42e5('0x16'),_0x38282d);logger[_0x42e5('0x10')](_0x42e5('0x16'),_0x38282d,JSON[_0x42e5('0x19')](_0x39a3e2));_0x23fe09(_0x39a3e2);})['catch'](function(_0x4da508){logger[_0x42e5('0x12')]('CreateCmHopperFinal',_0x4da508[_0x42e5('0x13')],_0x38282d);_0x54fcfc(_0x11550e[_0x42e5('0x12')](0x1f4,_0x4da508[_0x42e5('0x13')]));});});};
\ No newline at end of file
+var _0xc368=['request\x20sent','debug','stringify','error','code','CmHopperFinal,\x20%s,\x20%s','message','info','result','catch','CmHopperFinal','body','options','raw','CreateCmHopperFinal','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x48ad8d,_0x16332b){var _0xe00479=function(_0x4dd3a4){while(--_0x4dd3a4){_0x48ad8d['push'](_0x48ad8d['shift']());}};_0xe00479(++_0x16332b);}(_0xc368,0x7b));var _0x8c36=function(_0x4f642f,_0x4e3efa){_0x4f642f=_0x4f642f-0x0;var _0xc7bcf7=_0xc368[_0x4f642f];return _0xc7bcf7;};'use strict';var _=require('lodash');var util=require(_0x8c36('0x0'));var moment=require('moment');var BPromise=require(_0x8c36('0x1'));var rs=require(_0x8c36('0x2'));var fs=require('fs');var Redis=require(_0x8c36('0x3'));var db=require(_0x8c36('0x4'))['db'];var utils=require(_0x8c36('0x5'));var logger=require('../../config/logger')(_0x8c36('0x6'));var config=require(_0x8c36('0x7'));var jayson=require(_0x8c36('0x8'));var client=jayson[_0x8c36('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x554022,_0x8ed437,_0x384867){return new BPromise(function(_0x3e76be,_0x26bad1){return client[_0x8c36('0xa')](_0x554022,_0x384867)[_0x8c36('0xb')](function(_0x569f29){logger['info']('CmHopperFinal,\x20%s,\x20%s',_0x8ed437,_0x8c36('0xc'));logger[_0x8c36('0xd')]('CmHopperFinal,\x20%s,\x20%s,\x20%s',_0x8ed437,_0x8c36('0xc'),JSON[_0x8c36('0xe')](_0x569f29));if(_0x569f29[_0x8c36('0xf')]){if(_0x569f29[_0x8c36('0xf')][_0x8c36('0x10')]===0x1f4){logger[_0x8c36('0xf')](_0x8c36('0x11'),_0x8ed437,_0x569f29[_0x8c36('0xf')][_0x8c36('0x12')]);return _0x26bad1(_0x569f29[_0x8c36('0xf')][_0x8c36('0x12')]);}logger[_0x8c36('0xf')](_0x8c36('0x11'),_0x8ed437,_0x569f29[_0x8c36('0xf')]['message']);return _0x3e76be(_0x569f29[_0x8c36('0xf')]['message']);}else{logger[_0x8c36('0x13')](_0x8c36('0x11'),_0x8ed437,_0x8c36('0xc'));_0x3e76be(_0x569f29[_0x8c36('0x14')][_0x8c36('0x12')]);}})[_0x8c36('0x15')](function(_0x3c10eb){logger[_0x8c36('0xf')](_0x8c36('0x11'),_0x8ed437,_0x3c10eb);_0x26bad1(_0x3c10eb);});});}exports['CreateCmHopperFinal']=function(_0x2be9b0){var _0x46ae6e=this;return new Promise(function(_0x47832a,_0x2d5e5b){return db[_0x8c36('0x16')]['create'](_0x2be9b0[_0x8c36('0x17')],{'raw':_0x2be9b0[_0x8c36('0x18')]?_0x2be9b0[_0x8c36('0x18')][_0x8c36('0x19')]===undefined?!![]:![]:!![]})[_0x8c36('0xb')](function(_0x2b07ad){logger[_0x8c36('0x13')](_0x8c36('0x1a'),_0x2be9b0);logger[_0x8c36('0xd')](_0x8c36('0x1a'),_0x2be9b0,JSON[_0x8c36('0xe')](_0x2b07ad));_0x47832a(_0x2b07ad);})[_0x8c36('0x15')](function(_0x46645d){logger['error']('CreateCmHopperFinal',_0x46645d['message'],_0x2be9b0);_0x2d5e5b(_0x46ae6e['error'](0x1f4,_0x46645d[_0x8c36('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/index.js b/server/api/cmHopperFinal/index.js
index 1390d5c..894ca27 100644
--- a/server/api/cmHopperFinal/index.js
+++ b/server/api/cmHopperFinal/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x34e8=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperFinal.controller','get','isAuthenticated','describe','/:id','show','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','post','/voice/queue/moveContacts/:id','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','/checkContactHopper','put','update'];(function(_0x245e1b,_0x27445b){var _0x4ab0ef=function(_0x4f24df){while(--_0x4f24df){_0x245e1b['push'](_0x245e1b['shift']());}};_0x4ab0ef(++_0x27445b);}(_0x34e8,0x12c));var _0x834e=function(_0x30b0b7,_0xbac735){_0x30b0b7=_0x30b0b7-0x0;var _0x2093f9=_0x34e8[_0x30b0b7];return _0x2093f9;};'use strict';var multer=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var path=require(_0x834e('0x2'));var timeout=require(_0x834e('0x3'));var express=require('express');var router=express[_0x834e('0x4')]();var auth=require(_0x834e('0x5'));var interaction=require(_0x834e('0x6'));var config=require(_0x834e('0x7'));var controller=require(_0x834e('0x8'));router[_0x834e('0x9')]('/',auth[_0x834e('0xa')](),controller['index']);router[_0x834e('0x9')]('/describe',auth[_0x834e('0xa')](),controller[_0x834e('0xb')]);router[_0x834e('0x9')](_0x834e('0xc'),auth[_0x834e('0xa')](),controller[_0x834e('0xd')]);router[_0x834e('0x9')](_0x834e('0xe'),auth[_0x834e('0xa')](),controller[_0x834e('0xf')]);router[_0x834e('0x9')](_0x834e('0x10'),auth[_0x834e('0xa')](),controller[_0x834e('0x11')]);router[_0x834e('0x12')](_0x834e('0x13'),auth[_0x834e('0xa')](),controller['moveContactsQueueCampaignHopperFinal']);router[_0x834e('0x12')](_0x834e('0x14'),auth['isAuthenticated'](),controller[_0x834e('0x15')]);router[_0x834e('0x12')](_0x834e('0x16'),auth[_0x834e('0xa')](),controller['checkContactHopper']);router[_0x834e('0x17')](_0x834e('0xc'),auth['isAuthenticated'](),controller[_0x834e('0x18')]);module['exports']=router;
\ No newline at end of file
+var _0x9c44=['put','update','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','index','/describe','isAuthenticated','describe','/:id','show','countContactsQueueCampaignHopperFinal','countContactsIvrCampaignHopperFinal','moveContactsQueueCampaignHopperFinal','/voice/campaign/moveContacts/:id','post','/checkContactHopper','checkContactHopper'];(function(_0x84620,_0xa30b79){var _0x126e13=function(_0x385f52){while(--_0x385f52){_0x84620['push'](_0x84620['shift']());}};_0x126e13(++_0xa30b79);}(_0x9c44,0x178));var _0x49c4=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0x9c44[_0x2d2c16];return _0x53f2fb;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var auth=require(_0x49c4('0x4'));var interaction=require(_0x49c4('0x5'));var config=require('../../config/environment');var controller=require('./cmHopperFinal.controller');router[_0x49c4('0x6')]('/',auth['isAuthenticated'](),controller[_0x49c4('0x7')]);router[_0x49c4('0x6')](_0x49c4('0x8'),auth[_0x49c4('0x9')](),controller[_0x49c4('0xa')]);router['get'](_0x49c4('0xb'),auth[_0x49c4('0x9')](),controller[_0x49c4('0xc')]);router[_0x49c4('0x6')]('/voice/queue/countAttributes/:id',auth['isAuthenticated'](),controller[_0x49c4('0xd')]);router[_0x49c4('0x6')]('/campaign/countAttributes/:id',auth[_0x49c4('0x9')](),controller[_0x49c4('0xe')]);router['post']('/voice/queue/moveContacts/:id',auth[_0x49c4('0x9')](),controller[_0x49c4('0xf')]);router['post'](_0x49c4('0x10'),auth[_0x49c4('0x9')](),controller['moveContactsIvrCampaignHopperFinal']);router[_0x49c4('0x11')](_0x49c4('0x12'),auth[_0x49c4('0x9')](),controller[_0x49c4('0x13')]);router[_0x49c4('0x14')](_0x49c4('0xb'),auth[_0x49c4('0x9')](),controller[_0x49c4('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.attributes.js b/server/api/cmHopperHistory/cmHopperHistory.attributes.js
index cb9568f..536af13 100644
--- a/server/api/cmHopperHistory/cmHopperHistory.attributes.js
+++ b/server/api/cmHopperHistory/cmHopperHistory.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x975f=['BOOLEAN','sequelize','exports','DATE','INTEGER','STRING'];(function(_0x325586,_0x4b353f){var _0x2fb115=function(_0x34522d){while(--_0x34522d){_0x325586['push'](_0x325586['shift']());}};_0x2fb115(++_0x4b353f);}(_0x975f,0x109));var _0xf975=function(_0x160248,_0x2a57e6){_0x160248=_0x160248-0x0;var _0x4e589d=_0x975f[_0x160248];return _0x4e589d;};'use strict';var Sequelize=require(_0xf975('0x0'));module[_0xf975('0x1')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0xf975('0x2')]},'countbusyretry':{'type':Sequelize[_0xf975('0x3')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xf975('0x3')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0xf975('0x3')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xf975('0x4')]},'originatecalleridnum':{'type':Sequelize[_0xf975('0x4')]},'originatecalleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xf975('0x4')]},'calleridname':{'type':Sequelize[_0xf975('0x4')]},'starttime':{'type':Sequelize[_0xf975('0x2')]},'responsetime':{'type':Sequelize[_0xf975('0x2')]},'answertime':{'type':Sequelize['DATE']},'droptime':{'type':Sequelize[_0xf975('0x2')]},'endtime':{'type':Sequelize[_0xf975('0x2')]},'ringtime':{'type':Sequelize[_0xf975('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0xf975('0x3')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0xf975('0x3')],'defaultValue':0x0},'dropreason':{'type':Sequelize['STRING']},'campaign':{'type':Sequelize[_0xf975('0x4')]},'campaigntype':{'type':Sequelize[_0xf975('0x4')]},'membername':{'type':Sequelize[_0xf975('0x4')]},'reason':{'type':Sequelize[_0xf975('0x4')]},'amd':{'type':Sequelize[_0xf975('0x5')],'defaultValue':![]},'fax':{'type':Sequelize[_0xf975('0x5')],'defaultValue':![]},'callback':{'type':Sequelize[_0xf975('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0xf975('0x2')]},'recallme':{'type':Sequelize[_0xf975('0x5')],'defaultValue':![]},'editedat':{'type':Sequelize['DATE']},'edited':{'type':Sequelize[_0xf975('0x5')],'defaultValue':![]}};
\ No newline at end of file
+var _0xdbf5=['BOOLEAN','exports','DATE','INTEGER','STRING'];(function(_0x1098db,_0x39ba6b){var _0x14f090=function(_0x473ffe){while(--_0x473ffe){_0x1098db['push'](_0x1098db['shift']());}};_0x14f090(++_0x39ba6b);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x221662,_0x35c467){_0x221662=_0x221662-0x0;var _0x922ec5=_0xdbf5[_0x221662];return _0x922ec5;};'use strict';var Sequelize=require('sequelize');module[_0x5dbf('0x0')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0x5dbf('0x1')]},'countbusyretry':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x5dbf('0x3')]},'originatecalleridnum':{'type':Sequelize[_0x5dbf('0x3')]},'originatecalleridname':{'type':Sequelize[_0x5dbf('0x3')]},'calleridnum':{'type':Sequelize[_0x5dbf('0x3')]},'calleridname':{'type':Sequelize[_0x5dbf('0x3')]},'starttime':{'type':Sequelize[_0x5dbf('0x1')]},'responsetime':{'type':Sequelize[_0x5dbf('0x1')]},'answertime':{'type':Sequelize[_0x5dbf('0x1')]},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0x5dbf('0x1')]},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x5dbf('0x2')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x5dbf('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x5dbf('0x3')]},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize['STRING']},'amd':{'type':Sequelize[_0x5dbf('0x4')],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x5dbf('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'recallme':{'type':Sequelize[_0x5dbf('0x4')],'defaultValue':![]},'editedat':{'type':Sequelize[_0x5dbf('0x1')]},'edited':{'type':Sequelize[_0x5dbf('0x4')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.controller.js b/server/api/cmHopperHistory/cmHopperHistory.controller.js
index 63b8b63..f7d7913 100644
--- a/server/api/cmHopperHistory/cmHopperHistory.controller.js
+++ b/server/api/cmHopperHistory/cmHopperHistory.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb10b=['options','find','create','describe','body','uniqueid','html-pdf','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','error','send','index','CmHopperHistory','rawAttributes','keys','query','filters','intersection','fields','length','attributes','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','key','VIRTUAL','field','count','includeAll','findAll','catch','params','model'];(function(_0x4c8833,_0x14e755){var _0x30df54=function(_0x197811){while(--_0x197811){_0x4c8833['push'](_0x4c8833['shift']());}};_0x30df54(++_0x14e755);}(_0xb10b,0x12a));var _0xbb10=function(_0x2b6593,_0x2c5e04){_0x2b6593=_0x2b6593-0x0;var _0x59ccf4=_0xb10b[_0x2b6593];return _0x59ccf4;};'use strict';var pdf=require(_0xbb10('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xbb10('0x1'));var zipdir=require(_0xbb10('0x2'));var jsonpatch=require(_0xbb10('0x3'));var rp=require('request-promise');var moment=require(_0xbb10('0x4'));var BPromise=require(_0xbb10('0x5'));var Mustache=require(_0xbb10('0x6'));var util=require(_0xbb10('0x7'));var path=require(_0xbb10('0x8'));var sox=require(_0xbb10('0x9'));var csv=require('to-csv');var ejs=require(_0xbb10('0xa'));var fs=require('fs');var _=require(_0xbb10('0xb'));var squel=require('squel');var crypto=require(_0xbb10('0xc'));var jsforce=require(_0xbb10('0xd'));var deskjs=require(_0xbb10('0xe'));var toCsv=require(_0xbb10('0xf'));var querystring=require(_0xbb10('0x10'));var Papa=require(_0xbb10('0x11'));var Redis=require(_0xbb10('0x12'));var authService=require(_0xbb10('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xbb10('0x14'))(_0xbb10('0x15'));var utils=require(_0xbb10('0x16'));var config=require('../../config/environment');var db=require(_0xbb10('0x17'))['db'];function respondWithStatusCode(_0x5be7e0,_0x44fb19){_0x44fb19=_0x44fb19||0xcc;return function(_0x916a32){if(_0x916a32){return _0x5be7e0[_0xbb10('0x18')](_0x44fb19);}return _0x5be7e0[_0xbb10('0x19')](_0x44fb19)[_0xbb10('0x1a')]();};}function respondWithResult(_0x147230,_0x58a612){_0x58a612=_0x58a612||0xc8;return function(_0x26e021){if(_0x26e021){return _0x147230[_0xbb10('0x19')](_0x58a612)[_0xbb10('0x1b')](_0x26e021);}};}function respondWithFilteredResult(_0x17fd46,_0x3df17b){return function(_0x2f2ebf){if(_0x2f2ebf){var _0x24a57b=_0x2f2ebf['count'],_0x36b5e8=_0x3df17b[_0xbb10('0x1c')],_0x3e26f4=_0x3df17b[_0xbb10('0x1c')]+_0x3df17b[_0xbb10('0x1d')],_0x2b184e;if(_0x3e26f4>=_0x24a57b){_0x3e26f4=_0x24a57b;_0x2b184e=0xc8;}else{_0x2b184e=0xce;}_0x17fd46[_0xbb10('0x19')](_0x2b184e);return _0x17fd46[_0xbb10('0x1e')](_0xbb10('0x1f'),_0x36b5e8+'-'+_0x3e26f4+'/'+_0x24a57b)[_0xbb10('0x1b')](_0x2f2ebf);}return null;};}function patchUpdates(_0x30efc6){return function(_0xbf2906){try{jsonpatch[_0xbb10('0x20')](_0xbf2906,_0x30efc6,!![]);}catch(_0x48b6e9){return BPromise[_0xbb10('0x21')](_0x48b6e9);}return _0xbf2906[_0xbb10('0x22')]();};}function saveUpdates(_0x388fab,_0x109908){return function(_0xdf237d){if(_0xdf237d){return _0xdf237d[_0xbb10('0x23')](_0x388fab)['then'](function(_0x12f888){return _0x12f888;});}return null;};}function removeEntity(_0x12ef77,_0x50aea1){return function(_0x4c4b0d){if(_0x4c4b0d){return _0x4c4b0d[_0xbb10('0x24')]()[_0xbb10('0x25')](function(){_0x12ef77[_0xbb10('0x19')](0xcc)[_0xbb10('0x1a')]();});}};}function handleEntityNotFound(_0x445761,_0x1824b7){return function(_0x407cb4){if(!_0x407cb4){_0x445761[_0xbb10('0x18')](0x194);}return _0x407cb4;};}function handleError(_0x7f2377,_0x395404){_0x395404=_0x395404||0x1f4;return function(_0x3ba6cd){logger[_0xbb10('0x26')](_0x3ba6cd['stack']);if(_0x3ba6cd['name']){delete _0x3ba6cd['name'];}_0x7f2377[_0xbb10('0x19')](_0x395404)[_0xbb10('0x27')](_0x3ba6cd);};}exports[_0xbb10('0x28')]=function(_0x4e25ff,_0x2fdde9){var _0x24d586={},_0x6ed43b={},_0x1d5e95={'count':0x0,'rows':[]};var _0x1acce9=db[_0xbb10('0x29')][_0xbb10('0x2a')];_0x6ed43b['model']=_[_0xbb10('0x2b')](_0x1acce9);_0x6ed43b[_0xbb10('0x2c')]=_[_0xbb10('0x2b')](_0x4e25ff[_0xbb10('0x2c')]);_0x6ed43b[_0xbb10('0x2d')]=_[_0xbb10('0x2e')](_0x6ed43b['model'],_0x6ed43b[_0xbb10('0x2c')]);_0x24d586['attributes']=_[_0xbb10('0x2e')](_0x6ed43b['model'],qs[_0xbb10('0x2f')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x2f')]));_0x24d586['attributes']=_0x24d586['attributes'][_0xbb10('0x30')]?_0x24d586[_0xbb10('0x31')]:_0x6ed43b['model'];if(!_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x32')](_0xbb10('0x33'))){_0x24d586[_0xbb10('0x1d')]=qs[_0xbb10('0x1d')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x1d')]);_0x24d586['offset']=qs[_0xbb10('0x1c')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x1c')]);}_0x24d586[_0xbb10('0x34')]=qs[_0xbb10('0x35')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x35')]);_0x24d586[_0xbb10('0x36')]=qs[_0xbb10('0x2d')](_['pick'](_0x4e25ff[_0xbb10('0x2c')],_0x6ed43b[_0xbb10('0x2d')]));if(_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x37')]){_0x24d586['where']=_[_0xbb10('0x38')](_0x24d586['where'],{'$or':_['map'](_0x1acce9,function(_0x3eb3cc){if(_0x3eb3cc[_0xbb10('0x39')][_0xbb10('0x3a')]!==_0xbb10('0x3b')){var _0x15d895={};_0x15d895[_0x3eb3cc[_0xbb10('0x3c')]]={'$like':'%'+_0x4e25ff['query'][_0xbb10('0x37')]+'%'};return _0x15d895;}})});}_0x24d586=_[_0xbb10('0x38')]({},_0x24d586,_0x4e25ff['options']);var _0x5e3fbd={'where':_0x24d586['where']};return db[_0xbb10('0x29')][_0xbb10('0x3d')](_0x5e3fbd)[_0xbb10('0x25')](function(_0x4d5a9b){_0x1d5e95[_0xbb10('0x3d')]=_0x4d5a9b;if(_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x3e')]){_0x24d586['include']=[{'all':!![]}];}return db[_0xbb10('0x29')][_0xbb10('0x3f')](_0x24d586);})[_0xbb10('0x25')](function(_0x446f49){_0x1d5e95['rows']=_0x446f49;return _0x1d5e95;})[_0xbb10('0x25')](respondWithFilteredResult(_0x2fdde9,_0x24d586))[_0xbb10('0x40')](handleError(_0x2fdde9,null));};exports['show']=function(_0xe2040f,_0x2e3214){var _0x44d6ae={'raw':!![],'where':{'id':_0xe2040f[_0xbb10('0x41')]['id']}},_0x3a9934={};_0x3a9934[_0xbb10('0x42')]=_['keys'](db[_0xbb10('0x29')][_0xbb10('0x2a')]);_0x3a9934[_0xbb10('0x2c')]=_[_0xbb10('0x2b')](_0xe2040f['query']);_0x3a9934[_0xbb10('0x2d')]=_[_0xbb10('0x2e')](_0x3a9934[_0xbb10('0x42')],_0x3a9934[_0xbb10('0x2c')]);_0x44d6ae['attributes']=_[_0xbb10('0x2e')](_0x3a9934[_0xbb10('0x42')],qs['fields'](_0xe2040f['query'][_0xbb10('0x2f')]));_0x44d6ae['attributes']=_0x44d6ae[_0xbb10('0x31')][_0xbb10('0x30')]?_0x44d6ae['attributes']:_0x3a9934[_0xbb10('0x42')];if(_0xe2040f[_0xbb10('0x2c')][_0xbb10('0x3e')]){_0x44d6ae['include']=[{'all':!![]}];}_0x44d6ae=_[_0xbb10('0x38')]({},_0x44d6ae,_0xe2040f[_0xbb10('0x43')]);return db[_0xbb10('0x29')][_0xbb10('0x44')](_0x44d6ae)[_0xbb10('0x25')](handleEntityNotFound(_0x2e3214,null))[_0xbb10('0x25')](respondWithResult(_0x2e3214,null))[_0xbb10('0x40')](handleError(_0x2e3214,null));};exports[_0xbb10('0x45')]=function(_0x205bb4,_0x43b948){return db[_0xbb10('0x29')][_0xbb10('0x45')](_0x205bb4['body'],{})[_0xbb10('0x25')](respondWithResult(_0x43b948,0xc9))[_0xbb10('0x40')](handleError(_0x43b948,null));};exports['describe']=function(_0x14e1cb,_0x2f5027){return db[_0xbb10('0x29')][_0xbb10('0x46')]()[_0xbb10('0x25')](respondWithResult(_0x2f5027,null))[_0xbb10('0x40')](handleError(_0x2f5027,null));};exports[_0xbb10('0x23')]=function(_0x5be85e,_0x4a9793){if(_0x5be85e[_0xbb10('0x47')][_0xbb10('0x48')]){delete _0x5be85e[_0xbb10('0x47')]['uniqueid'];}return db['CmHopperHistory'][_0xbb10('0x44')]({'where':{'uniqueid':_0x5be85e[_0xbb10('0x41')]['id']}})[_0xbb10('0x25')](handleEntityNotFound(_0x4a9793,null))[_0xbb10('0x25')](saveUpdates(_0x5be85e[_0xbb10('0x47')],null))[_0xbb10('0x25')](respondWithResult(_0x4a9793,null))[_0xbb10('0x40')](handleError(_0x4a9793,null));};
\ No newline at end of file
+var _0xb10b=['options','find','create','describe','body','uniqueid','html-pdf','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','error','send','index','CmHopperHistory','rawAttributes','keys','query','filters','intersection','fields','length','attributes','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','key','VIRTUAL','field','count','includeAll','findAll','catch','params','model'];(function(_0x1d7b23,_0x75416d){var _0x50fd26=function(_0x433395){while(--_0x433395){_0x1d7b23['push'](_0x1d7b23['shift']());}};_0x50fd26(++_0x75416d);}(_0xb10b,0x12a));var _0xbb10=function(_0x6090f2,_0x90b872){_0x6090f2=_0x6090f2-0x0;var _0x2618d2=_0xb10b[_0x6090f2];return _0x2618d2;};'use strict';var pdf=require(_0xbb10('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xbb10('0x1'));var zipdir=require(_0xbb10('0x2'));var jsonpatch=require(_0xbb10('0x3'));var rp=require('request-promise');var moment=require(_0xbb10('0x4'));var BPromise=require(_0xbb10('0x5'));var Mustache=require(_0xbb10('0x6'));var util=require(_0xbb10('0x7'));var path=require(_0xbb10('0x8'));var sox=require(_0xbb10('0x9'));var csv=require('to-csv');var ejs=require(_0xbb10('0xa'));var fs=require('fs');var _=require(_0xbb10('0xb'));var squel=require('squel');var crypto=require(_0xbb10('0xc'));var jsforce=require(_0xbb10('0xd'));var deskjs=require(_0xbb10('0xe'));var toCsv=require(_0xbb10('0xf'));var querystring=require(_0xbb10('0x10'));var Papa=require(_0xbb10('0x11'));var Redis=require(_0xbb10('0x12'));var authService=require(_0xbb10('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xbb10('0x14'))(_0xbb10('0x15'));var utils=require(_0xbb10('0x16'));var config=require('../../config/environment');var db=require(_0xbb10('0x17'))['db'];function respondWithStatusCode(_0x5be7e0,_0x44fb19){_0x44fb19=_0x44fb19||0xcc;return function(_0x916a32){if(_0x916a32){return _0x5be7e0[_0xbb10('0x18')](_0x44fb19);}return _0x5be7e0[_0xbb10('0x19')](_0x44fb19)[_0xbb10('0x1a')]();};}function respondWithResult(_0x147230,_0x58a612){_0x58a612=_0x58a612||0xc8;return function(_0x26e021){if(_0x26e021){return _0x147230[_0xbb10('0x19')](_0x58a612)[_0xbb10('0x1b')](_0x26e021);}};}function respondWithFilteredResult(_0x17fd46,_0x3df17b){return function(_0x2f2ebf){if(_0x2f2ebf){var _0x24a57b=_0x2f2ebf['count'],_0x36b5e8=_0x3df17b[_0xbb10('0x1c')],_0x3e26f4=_0x3df17b[_0xbb10('0x1c')]+_0x3df17b[_0xbb10('0x1d')],_0x2b184e;if(_0x3e26f4>=_0x24a57b){_0x3e26f4=_0x24a57b;_0x2b184e=0xc8;}else{_0x2b184e=0xce;}_0x17fd46[_0xbb10('0x19')](_0x2b184e);return _0x17fd46[_0xbb10('0x1e')](_0xbb10('0x1f'),_0x36b5e8+'-'+_0x3e26f4+'/'+_0x24a57b)[_0xbb10('0x1b')](_0x2f2ebf);}return null;};}function patchUpdates(_0x30efc6){return function(_0xbf2906){try{jsonpatch[_0xbb10('0x20')](_0xbf2906,_0x30efc6,!![]);}catch(_0x48b6e9){return BPromise[_0xbb10('0x21')](_0x48b6e9);}return _0xbf2906[_0xbb10('0x22')]();};}function saveUpdates(_0x388fab,_0x109908){return function(_0xdf237d){if(_0xdf237d){return _0xdf237d[_0xbb10('0x23')](_0x388fab)['then'](function(_0x12f888){return _0x12f888;});}return null;};}function removeEntity(_0x12ef77,_0x50aea1){return function(_0x4c4b0d){if(_0x4c4b0d){return _0x4c4b0d[_0xbb10('0x24')]()[_0xbb10('0x25')](function(){_0x12ef77[_0xbb10('0x19')](0xcc)[_0xbb10('0x1a')]();});}};}function handleEntityNotFound(_0x445761,_0x1824b7){return function(_0x407cb4){if(!_0x407cb4){_0x445761[_0xbb10('0x18')](0x194);}return _0x407cb4;};}function handleError(_0x7f2377,_0x395404){_0x395404=_0x395404||0x1f4;return function(_0x3ba6cd){logger[_0xbb10('0x26')](_0x3ba6cd['stack']);if(_0x3ba6cd['name']){delete _0x3ba6cd['name'];}_0x7f2377[_0xbb10('0x19')](_0x395404)[_0xbb10('0x27')](_0x3ba6cd);};}exports[_0xbb10('0x28')]=function(_0x4e25ff,_0x2fdde9){var _0x24d586={},_0x6ed43b={},_0x1d5e95={'count':0x0,'rows':[]};var _0x1acce9=db[_0xbb10('0x29')][_0xbb10('0x2a')];_0x6ed43b['model']=_[_0xbb10('0x2b')](_0x1acce9);_0x6ed43b[_0xbb10('0x2c')]=_[_0xbb10('0x2b')](_0x4e25ff[_0xbb10('0x2c')]);_0x6ed43b[_0xbb10('0x2d')]=_[_0xbb10('0x2e')](_0x6ed43b['model'],_0x6ed43b[_0xbb10('0x2c')]);_0x24d586['attributes']=_[_0xbb10('0x2e')](_0x6ed43b['model'],qs[_0xbb10('0x2f')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x2f')]));_0x24d586['attributes']=_0x24d586['attributes'][_0xbb10('0x30')]?_0x24d586[_0xbb10('0x31')]:_0x6ed43b['model'];if(!_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x32')](_0xbb10('0x33'))){_0x24d586[_0xbb10('0x1d')]=qs[_0xbb10('0x1d')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x1d')]);_0x24d586['offset']=qs[_0xbb10('0x1c')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x1c')]);}_0x24d586[_0xbb10('0x34')]=qs[_0xbb10('0x35')](_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x35')]);_0x24d586[_0xbb10('0x36')]=qs[_0xbb10('0x2d')](_['pick'](_0x4e25ff[_0xbb10('0x2c')],_0x6ed43b[_0xbb10('0x2d')]));if(_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x37')]){_0x24d586['where']=_[_0xbb10('0x38')](_0x24d586['where'],{'$or':_['map'](_0x1acce9,function(_0x3eb3cc){if(_0x3eb3cc[_0xbb10('0x39')][_0xbb10('0x3a')]!==_0xbb10('0x3b')){var _0x15d895={};_0x15d895[_0x3eb3cc[_0xbb10('0x3c')]]={'$like':'%'+_0x4e25ff['query'][_0xbb10('0x37')]+'%'};return _0x15d895;}})});}_0x24d586=_[_0xbb10('0x38')]({},_0x24d586,_0x4e25ff['options']);var _0x5e3fbd={'where':_0x24d586['where']};return db[_0xbb10('0x29')][_0xbb10('0x3d')](_0x5e3fbd)[_0xbb10('0x25')](function(_0x4d5a9b){_0x1d5e95[_0xbb10('0x3d')]=_0x4d5a9b;if(_0x4e25ff[_0xbb10('0x2c')][_0xbb10('0x3e')]){_0x24d586['include']=[{'all':!![]}];}return db[_0xbb10('0x29')][_0xbb10('0x3f')](_0x24d586);})[_0xbb10('0x25')](function(_0x446f49){_0x1d5e95['rows']=_0x446f49;return _0x1d5e95;})[_0xbb10('0x25')](respondWithFilteredResult(_0x2fdde9,_0x24d586))[_0xbb10('0x40')](handleError(_0x2fdde9,null));};exports['show']=function(_0xe2040f,_0x2e3214){var _0x44d6ae={'raw':!![],'where':{'id':_0xe2040f[_0xbb10('0x41')]['id']}},_0x3a9934={};_0x3a9934[_0xbb10('0x42')]=_['keys'](db[_0xbb10('0x29')][_0xbb10('0x2a')]);_0x3a9934[_0xbb10('0x2c')]=_[_0xbb10('0x2b')](_0xe2040f['query']);_0x3a9934[_0xbb10('0x2d')]=_[_0xbb10('0x2e')](_0x3a9934[_0xbb10('0x42')],_0x3a9934[_0xbb10('0x2c')]);_0x44d6ae['attributes']=_[_0xbb10('0x2e')](_0x3a9934[_0xbb10('0x42')],qs['fields'](_0xe2040f['query'][_0xbb10('0x2f')]));_0x44d6ae['attributes']=_0x44d6ae[_0xbb10('0x31')][_0xbb10('0x30')]?_0x44d6ae['attributes']:_0x3a9934[_0xbb10('0x42')];if(_0xe2040f[_0xbb10('0x2c')][_0xbb10('0x3e')]){_0x44d6ae['include']=[{'all':!![]}];}_0x44d6ae=_[_0xbb10('0x38')]({},_0x44d6ae,_0xe2040f[_0xbb10('0x43')]);return db[_0xbb10('0x29')][_0xbb10('0x44')](_0x44d6ae)[_0xbb10('0x25')](handleEntityNotFound(_0x2e3214,null))[_0xbb10('0x25')](respondWithResult(_0x2e3214,null))[_0xbb10('0x40')](handleError(_0x2e3214,null));};exports[_0xbb10('0x45')]=function(_0x205bb4,_0x43b948){return db[_0xbb10('0x29')][_0xbb10('0x45')](_0x205bb4['body'],{})[_0xbb10('0x25')](respondWithResult(_0x43b948,0xc9))[_0xbb10('0x40')](handleError(_0x43b948,null));};exports['describe']=function(_0x14e1cb,_0x2f5027){return db[_0xbb10('0x29')][_0xbb10('0x46')]()[_0xbb10('0x25')](respondWithResult(_0x2f5027,null))[_0xbb10('0x40')](handleError(_0x2f5027,null));};exports[_0xbb10('0x23')]=function(_0x5be85e,_0x4a9793){if(_0x5be85e[_0xbb10('0x47')][_0xbb10('0x48')]){delete _0x5be85e[_0xbb10('0x47')]['uniqueid'];}return db['CmHopperHistory'][_0xbb10('0x44')]({'where':{'uniqueid':_0x5be85e[_0xbb10('0x41')]['id']}})[_0xbb10('0x25')](handleEntityNotFound(_0x4a9793,null))[_0xbb10('0x25')](saveUpdates(_0x5be85e[_0xbb10('0x47')],null))[_0xbb10('0x25')](respondWithResult(_0x4a9793,null))[_0xbb10('0x40')](handleError(_0x4a9793,null));};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.model.js b/server/api/cmHopperHistory/cmHopperHistory.model.js
index 56680ed..8673d8c 100644
--- a/server/api/cmHopperHistory/cmHopperHistory.model.js
+++ b/server/api/cmHopperHistory/cmHopperHistory.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c44=['CmHopperHistory','cm_hopper_history','endtime','uniqueid','../../config/logger','api','moment','bluebird','request-promise','path','./cmHopperHistory.attributes','define'];(function(_0x4f6809,_0x237351){var _0x4fad30=function(_0x58c3c2){while(--_0x58c3c2){_0x4f6809['push'](_0x4f6809['shift']());}};_0x4fad30(++_0x237351);}(_0x9c44,0x178));var _0x49c4=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x9c44[_0x167cc1];return _0x10bc4b;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x49c4('0x0'))(_0x49c4('0x1'));var moment=require(_0x49c4('0x2'));var BPromise=require(_0x49c4('0x3'));var rp=require(_0x49c4('0x4'));var fs=require('fs');var path=require(_0x49c4('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x49c4('0x6'));module['exports']=function(_0xc1278f,_0x6030ae){return _0xc1278f[_0x49c4('0x7')](_0x49c4('0x8'),attributes,{'tableName':_0x49c4('0x9'),'paranoid':![],'indexes':[{'name':'endtime','fields':[_0x49c4('0xa')]},{'name':_0x49c4('0xb'),'fields':[_0x49c4('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xe706=['cm_hopper_history','endtime','uniqueid','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cmHopperHistory.attributes','exports','define','CmHopperHistory'];(function(_0x326331,_0x1d644d){var _0x4bfce8=function(_0x19ec4f){while(--_0x19ec4f){_0x326331['push'](_0x326331['shift']());}};_0x4bfce8(++_0x1d644d);}(_0xe706,0xa3));var _0x6e70=function(_0xe7c36a,_0x641105){_0xe7c36a=_0xe7c36a-0x0;var _0x8b1186=_0xe706[_0xe7c36a];return _0x8b1186;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('api');var moment=require(_0x6e70('0x3'));var BPromise=require(_0x6e70('0x4'));var rp=require(_0x6e70('0x5'));var fs=require('fs');var path=require(_0x6e70('0x6'));var rimraf=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var attributes=require(_0x6e70('0x9'));module[_0x6e70('0xa')]=function(_0x1b0389,_0x4381d1){return _0x1b0389[_0x6e70('0xb')](_0x6e70('0xc'),attributes,{'tableName':_0x6e70('0xd'),'paranoid':![],'indexes':[{'name':_0x6e70('0xe'),'fields':[_0x6e70('0xe')]},{'name':_0x6e70('0xf'),'fields':[_0x6e70('0xf')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.rpc.js b/server/api/cmHopperHistory/cmHopperHistory.rpc.js
index 20d5860..9a9493b 100644
--- a/server/api/cmHopperHistory/cmHopperHistory.rpc.js
+++ b/server/api/cmHopperHistory/cmHopperHistory.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x720e=['options','raw','CreateCmHopperHistory','AvgHandleTime','findAll','where','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','COUNT','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','campaign','GetVoiceQueueHopperHistory','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','CmHopperHistory,\x20%s,\x20%s','message','result','catch','CmHopperHistory','body'];(function(_0x5f186b,_0x47dcd3){var _0x533832=function(_0x51ee9f){while(--_0x51ee9f){_0x5f186b['push'](_0x5f186b['shift']());}};_0x533832(++_0x47dcd3);}(_0x720e,0x1cb));var _0xe720=function(_0x2e5069,_0x3a1115){_0x2e5069=_0x2e5069-0x0;var _0x2f00ad=_0x720e[_0x2e5069];return _0x2f00ad;};'use strict';var _=require(_0xe720('0x0'));var util=require(_0xe720('0x1'));var moment=require(_0xe720('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe720('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xe720('0x4'));var logger=require(_0xe720('0x5'))(_0xe720('0x6'));var config=require(_0xe720('0x7'));var jayson=require(_0xe720('0x8'));var client=jayson[_0xe720('0x9')][_0xe720('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4ffe24,_0x3e38ca,_0x19642d){return new BPromise(function(_0x4e715c,_0x4a3b70){return client['request'](_0x4ffe24,_0x19642d)[_0xe720('0xb')](function(_0x2e08e7){logger[_0xe720('0xc')]('CmHopperHistory,\x20%s,\x20%s',_0x3e38ca,_0xe720('0xd'));logger[_0xe720('0xe')](_0xe720('0xf'),_0x3e38ca,_0xe720('0xd'),JSON[_0xe720('0x10')](_0x2e08e7));if(_0x2e08e7[_0xe720('0x11')]){if(_0x2e08e7['error']['code']===0x1f4){logger[_0xe720('0x11')](_0xe720('0x12'),_0x3e38ca,_0x2e08e7[_0xe720('0x11')][_0xe720('0x13')]);return _0x4a3b70(_0x2e08e7[_0xe720('0x11')][_0xe720('0x13')]);}logger[_0xe720('0x11')](_0xe720('0x12'),_0x3e38ca,_0x2e08e7[_0xe720('0x11')]['message']);return _0x4e715c(_0x2e08e7['error'][_0xe720('0x13')]);}else{logger[_0xe720('0xc')]('CmHopperHistory,\x20%s,\x20%s',_0x3e38ca,_0xe720('0xd'));_0x4e715c(_0x2e08e7[_0xe720('0x14')]['message']);}})[_0xe720('0x15')](function(_0x5ac1e2){logger[_0xe720('0x11')](_0xe720('0x12'),_0x3e38ca,_0x5ac1e2);_0x4a3b70(_0x5ac1e2);});});}exports['CreateCmHopperHistory']=function(_0x3428d3){var _0x5e4a0c=this;return new Promise(function(_0x1d75e7,_0x113590){return db[_0xe720('0x16')]['create'](_0x3428d3[_0xe720('0x17')],{'raw':_0x3428d3['options']?_0x3428d3[_0xe720('0x18')][_0xe720('0x19')]===undefined?!![]:![]:!![]})[_0xe720('0xb')](function(_0x5b0c9b){logger['info'](_0xe720('0x1a'),_0x3428d3);logger['debug'](_0xe720('0x1a'),_0x3428d3,JSON[_0xe720('0x10')](_0x5b0c9b));_0x1d75e7(_0x5b0c9b);})[_0xe720('0x15')](function(_0xaa596f){logger[_0xe720('0x11')](_0xe720('0x1a'),_0xaa596f['message'],_0x3428d3);_0x113590(_0x5e4a0c[_0xe720('0x11')](0x1f4,_0xaa596f[_0xe720('0x13')]));});});};exports[_0xe720('0x1b')]=function(_0x47b367){var _0x210a27=this;return new Promise(function(_0x14ecca,_0x3bc303){return db[_0xe720('0x16')][_0xe720('0x1c')]({'raw':_0x47b367[_0xe720('0x18')]?_0x47b367[_0xe720('0x18')][_0xe720('0x19')]===undefined?!![]:![]:!![],'where':_0x47b367[_0xe720('0x18')]?_0x47b367[_0xe720('0x18')][_0xe720('0x1d')]||null:null,'attributes':[[db[_0xe720('0x1e')]['fn']('COUNT',db[_0xe720('0x1e')][_0xe720('0x1f')]('id')),_0xe720('0x20')],[db[_0xe720('0x1e')]['fn']('COUNT',db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')](_0xe720('0x22')))),_0xe720('0x23')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')](_0xe720('0x25')))),'predictiveIntervalDroppedCallsTimeout'],[db['sequelize']['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')]['literal']('`state`\x20=\x2011,\x201,\x20null'))),_0xe720('0x26')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x27'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')](_0xe720('0x28')))),_0xe720('0x29')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x27'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')](_0xe720('0x2a')))),'predictiveIntervalAvgTalktime']]})['then'](function(_0x43e06a){logger['info'](_0xe720('0x1b'),_0x47b367);logger[_0xe720('0xe')](_0xe720('0x1b'),_0x47b367,JSON[_0xe720('0x10')](_0x43e06a));_0x14ecca(_0x43e06a);})[_0xe720('0x15')](function(_0x571c23){logger[_0xe720('0x11')]('AvgHandleTime',_0x571c23[_0xe720('0x13')],_0x47b367);_0x3bc303(_0x210a27[_0xe720('0x11')](0x1f4,_0x571c23[_0xe720('0x13')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x54e89e){var _0x121708=this;return new Promise(function(_0x1394fb,_0x182a4b){return db[_0xe720('0x16')][_0xe720('0x1c')]({'raw':_0x54e89e['options']?_0x54e89e[_0xe720('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x54e89e['options']?_0x54e89e[_0xe720('0x18')][_0xe720('0x1d')]||null:null,'attributes':[['campaign',_0xe720('0x2b')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')]['literal'](_0xe720('0x2c')))),_0xe720('0x2d')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')](_0xe720('0x2e')))),_0xe720('0x2f')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')](_0xe720('0x22')))),_0xe720('0x30')],[db['sequelize']['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')](_0xe720('0x31')))),_0xe720('0x32')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')]('`state`\x20=\x208,\x201,\x20null'))),'outboundCongestionCallsDay'],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0xe720('0x33')],[db[_0xe720('0x1e')]['fn']('COUNT',db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')]['literal'](_0xe720('0x34')))),_0xe720('0x35')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')]('`state`\x20=\x2012,\x201,\x20null'))),_0xe720('0x36')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')](_0xe720('0x37')))),_0xe720('0x38')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')](_0xe720('0x39')))),'outboundOriginateFailureCallsDay'],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize'][_0xe720('0x21')](_0xe720('0x3a')))),_0xe720('0x3b')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db['sequelize']['fn']('IF',db[_0xe720('0x1e')]['literal'](_0xe720('0x3c')))),_0xe720('0x3d')],[db['sequelize']['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db[_0xe720('0x1e')][_0xe720('0x21')](_0xe720('0x3e')))),_0xe720('0x3b')],[db['sequelize']['fn'](_0xe720('0x24'),db['sequelize']['fn']('IF',db[_0xe720('0x1e')]['literal'](_0xe720('0x3f')))),_0xe720('0x40')]],'group':[_0xe720('0x41')]})['then'](function(_0x5c1e87){logger[_0xe720('0xc')](_0xe720('0x42'),_0x54e89e);logger[_0xe720('0xe')](_0xe720('0x42'),_0x54e89e,JSON[_0xe720('0x10')](_0x5c1e87));_0x1394fb(_0x5c1e87);})[_0xe720('0x15')](function(_0x22b720){logger[_0xe720('0x11')](_0xe720('0x42'),_0x22b720['message'],_0x54e89e);_0x182a4b(_0x121708[_0xe720('0x11')](0x1f4,_0x22b720[_0xe720('0x13')]));});});};exports['GetCampaignHopperHistory']=function(_0x2b02b0){var _0x131b9f=this;return new Promise(function(_0x265b51,_0x2cecac){return db[_0xe720('0x16')]['findAll']({'raw':_0x2b02b0[_0xe720('0x18')]?_0x2b02b0['options'][_0xe720('0x19')]===undefined?!![]:![]:!![],'where':_0x2b02b0[_0xe720('0x18')]?_0x2b02b0['options'][_0xe720('0x1d')]||null:null,'attributes':[[_0xe720('0x41'),_0xe720('0x2b')],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')][_0xe720('0x1f')]('id')),'ivrTotalCallsDays'],[db[_0xe720('0x1e')]['fn'](_0xe720('0x24'),db[_0xe720('0x1e')]['fn']('IF',db['sequelize']['literal'](_0xe720('0x22')))),_0xe720('0x43')]],'group':[_0xe720('0x41')]})[_0xe720('0xb')](function(_0x435161){logger[_0xe720('0xc')](_0xe720('0x44'),_0x2b02b0);logger[_0xe720('0xe')](_0xe720('0x44'),_0x2b02b0,JSON[_0xe720('0x10')](_0x435161));_0x265b51(_0x435161);})[_0xe720('0x15')](function(_0x4b9f73){logger[_0xe720('0x11')](_0xe720('0x44'),_0x4b9f73[_0xe720('0x13')],_0x2b02b0);_0x2cecac(_0x131b9f[_0xe720('0x11')](0x1f4,_0x4b9f73[_0xe720('0x13')]));});});};
\ No newline at end of file
+var _0x6427=['CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateCmHopperHistory','create','body','options','raw','AvgHandleTime','CmHopperHistory','findAll','where','COUNT','sequelize','col','`state`\x20=\x204,\x201,\x20null','literal','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','GetVoiceQueueHopperHistory','campaign','name','outboundNoSuchCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x3132c7,_0x1e0452){var _0x49e30e=function(_0x5bf337){while(--_0x5bf337){_0x3132c7['push'](_0x3132c7['shift']());}};_0x49e30e(++_0x1e0452);}(_0x6427,0xbe));var _0x7642=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6427[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x7642('0x0'));var moment=require(_0x7642('0x1'));var BPromise=require(_0x7642('0x2'));var rs=require(_0x7642('0x3'));var fs=require('fs');var Redis=require(_0x7642('0x4'));var db=require(_0x7642('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x7642('0x6'))(_0x7642('0x7'));var config=require(_0x7642('0x8'));var jayson=require(_0x7642('0x9'));var client=jayson[_0x7642('0xa')][_0x7642('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1cd5f4,_0x266b9b,_0xd37092){return new BPromise(function(_0x30946f,_0x5e4b1f){return client['request'](_0x1cd5f4,_0xd37092)[_0x7642('0xc')](function(_0x17527f){logger[_0x7642('0xd')](_0x7642('0xe'),_0x266b9b,_0x7642('0xf'));logger[_0x7642('0x10')](_0x7642('0x11'),_0x266b9b,_0x7642('0xf'),JSON[_0x7642('0x12')](_0x17527f));if(_0x17527f[_0x7642('0x13')]){if(_0x17527f[_0x7642('0x13')][_0x7642('0x14')]===0x1f4){logger[_0x7642('0x13')](_0x7642('0xe'),_0x266b9b,_0x17527f[_0x7642('0x13')][_0x7642('0x15')]);return _0x5e4b1f(_0x17527f[_0x7642('0x13')]['message']);}logger[_0x7642('0x13')](_0x7642('0xe'),_0x266b9b,_0x17527f['error'][_0x7642('0x15')]);return _0x30946f(_0x17527f['error'][_0x7642('0x15')]);}else{logger['info'](_0x7642('0xe'),_0x266b9b,_0x7642('0xf'));_0x30946f(_0x17527f[_0x7642('0x16')][_0x7642('0x15')]);}})[_0x7642('0x17')](function(_0x2febf8){logger[_0x7642('0x13')]('CmHopperHistory,\x20%s,\x20%s',_0x266b9b,_0x2febf8);_0x5e4b1f(_0x2febf8);});});}exports[_0x7642('0x18')]=function(_0x392686){var _0x123f99=this;return new Promise(function(_0x96bc79,_0x543f00){return db['CmHopperHistory'][_0x7642('0x19')](_0x392686[_0x7642('0x1a')],{'raw':_0x392686['options']?_0x392686[_0x7642('0x1b')][_0x7642('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x503c13){logger[_0x7642('0xd')](_0x7642('0x18'),_0x392686);logger['debug']('CreateCmHopperHistory',_0x392686,JSON[_0x7642('0x12')](_0x503c13));_0x96bc79(_0x503c13);})[_0x7642('0x17')](function(_0x37de2b){logger['error'](_0x7642('0x18'),_0x37de2b[_0x7642('0x15')],_0x392686);_0x543f00(_0x123f99['error'](0x1f4,_0x37de2b[_0x7642('0x15')]));});});};exports[_0x7642('0x1d')]=function(_0xf31489){var _0x21cdfe=this;return new Promise(function(_0x5174fa,_0x1987bb){return db[_0x7642('0x1e')][_0x7642('0x1f')]({'raw':_0xf31489[_0x7642('0x1b')]?_0xf31489['options'][_0x7642('0x1c')]===undefined?!![]:![]:!![],'where':_0xf31489[_0x7642('0x1b')]?_0xf31489[_0x7642('0x1b')][_0x7642('0x20')]||null:null,'attributes':[[db['sequelize']['fn'](_0x7642('0x21'),db[_0x7642('0x22')][_0x7642('0x23')]('id')),'predictiveIntervalTotalCalls'],[db[_0x7642('0x22')]['fn']('COUNT',db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')]['literal'](_0x7642('0x24')))),'predictiveIntervalAnsweredCalls'],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')](_0x7642('0x26')))),_0x7642('0x27')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')]('`state`\x20=\x2011,\x201,\x20null'))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x7642('0x22')]['fn'](_0x7642('0x28'),db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')](_0x7642('0x29')))),'predictiveIntervalAvgHoldtime'],[db[_0x7642('0x22')]['fn']('AVG',db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),'predictiveIntervalAvgTalktime']]})[_0x7642('0xc')](function(_0x5b7f24){logger['info']('AvgHandleTime',_0xf31489);logger['debug'](_0x7642('0x1d'),_0xf31489,JSON[_0x7642('0x12')](_0x5b7f24));_0x5174fa(_0x5b7f24);})[_0x7642('0x17')](function(_0x40c778){logger[_0x7642('0x13')](_0x7642('0x1d'),_0x40c778[_0x7642('0x15')],_0xf31489);_0x1987bb(_0x21cdfe[_0x7642('0x13')](0x1f4,_0x40c778[_0x7642('0x15')]));});});};exports[_0x7642('0x2a')]=function(_0x4e5aec){var _0x4975c5=this;return new Promise(function(_0x5600d9,_0xc5edf3){return db[_0x7642('0x1e')][_0x7642('0x1f')]({'raw':_0x4e5aec[_0x7642('0x1b')]?_0x4e5aec[_0x7642('0x1b')][_0x7642('0x1c')]===undefined?!![]:![]:!![],'where':_0x4e5aec[_0x7642('0x1b')]?_0x4e5aec[_0x7642('0x1b')]['where']||null:null,'attributes':[[_0x7642('0x2b'),_0x7642('0x2c')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')]('`state`\x20=\x200,\x201,\x20null'))),_0x7642('0x2d')],[db[_0x7642('0x22')]['fn']('COUNT',db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')]('`state`\x20=\x203,\x201,\x20null'))),'outboundNoAnswerCallsDay'],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db['sequelize']['fn']('IF',db['sequelize'][_0x7642('0x25')](_0x7642('0x24')))),_0x7642('0x2e')],[db['sequelize']['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')](_0x7642('0x2f')))),_0x7642('0x30')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')]['literal'](_0x7642('0x31')))),_0x7642('0x32')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')](_0x7642('0x33')))),'outboundDropCallsDayTimeout'],[db[_0x7642('0x22')]['fn']('COUNT',db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')](_0x7642('0x34')))),_0x7642('0x35')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')](_0x7642('0x36')))),_0x7642('0x37')],[db['sequelize']['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')](_0x7642('0x38')))),_0x7642('0x39')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')]['literal'](_0x7642('0x3a')))),'outboundOriginateFailureCallsDay'],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')](_0x7642('0x3b')))),_0x7642('0x3c')],[db['sequelize']['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db[_0x7642('0x22')][_0x7642('0x25')]('`state`\x20=\x2016,\x201,\x20null'))),_0x7642('0x3d')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')](_0x7642('0x3e')))),_0x7642('0x3c')],[db[_0x7642('0x22')]['fn']('COUNT',db[_0x7642('0x22')]['fn']('IF',db['sequelize']['literal'](_0x7642('0x3f')))),_0x7642('0x40')]],'group':[_0x7642('0x2b')]})[_0x7642('0xc')](function(_0x193624){logger[_0x7642('0xd')](_0x7642('0x2a'),_0x4e5aec);logger['debug'](_0x7642('0x2a'),_0x4e5aec,JSON[_0x7642('0x12')](_0x193624));_0x5600d9(_0x193624);})['catch'](function(_0x1952ea){logger[_0x7642('0x13')](_0x7642('0x2a'),_0x1952ea['message'],_0x4e5aec);_0xc5edf3(_0x4975c5[_0x7642('0x13')](0x1f4,_0x1952ea[_0x7642('0x15')]));});});};exports[_0x7642('0x41')]=function(_0x566b41){var _0x3ad09e=this;return new Promise(function(_0x2a97a6,_0x12914f){return db[_0x7642('0x1e')][_0x7642('0x1f')]({'raw':_0x566b41['options']?_0x566b41[_0x7642('0x1b')][_0x7642('0x1c')]===undefined?!![]:![]:!![],'where':_0x566b41[_0x7642('0x1b')]?_0x566b41['options'][_0x7642('0x20')]||null:null,'attributes':[[_0x7642('0x2b'),_0x7642('0x2c')],[db[_0x7642('0x22')]['fn'](_0x7642('0x21'),db['sequelize'][_0x7642('0x23')]('id')),_0x7642('0x42')],[db[_0x7642('0x22')]['fn']('COUNT',db[_0x7642('0x22')]['fn']('IF',db['sequelize'][_0x7642('0x25')](_0x7642('0x24')))),_0x7642('0x43')]],'group':[_0x7642('0x2b')]})[_0x7642('0xc')](function(_0x1cad79){logger['info']('GetCampaignHopperHistory',_0x566b41);logger['debug'](_0x7642('0x41'),_0x566b41,JSON['stringify'](_0x1cad79));_0x2a97a6(_0x1cad79);})['catch'](function(_0xa3ba0d){logger[_0x7642('0x13')](_0x7642('0x41'),_0xa3ba0d[_0x7642('0x15')],_0x566b41);_0x12914f(_0x3ad09e['error'](0x1f4,_0xa3ba0d[_0x7642('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/index.js b/server/api/cmHopperHistory/index.js
index adbdb0c..35eec14 100644
--- a/server/api/cmHopperHistory/index.js
+++ b/server/api/cmHopperHistory/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1561=['Router','../../components/auth/service','../../config/environment','./cmHopperHistory.controller','get','isAuthenticated','describe','/:id','post','put','update','path','connect-timeout','express'];(function(_0x231f80,_0x455941){var _0x36e1a0=function(_0x48692a){while(--_0x48692a){_0x231f80['push'](_0x231f80['shift']());}};_0x36e1a0(++_0x455941);}(_0x1561,0x1bd));var _0x1156=function(_0x56c352,_0x93662b){_0x56c352=_0x56c352-0x0;var _0x35537a=_0x1561[_0x56c352];return _0x35537a;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1156('0x0'));var timeout=require(_0x1156('0x1'));var express=require(_0x1156('0x2'));var router=express[_0x1156('0x3')]();var auth=require(_0x1156('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x1156('0x5'));var controller=require(_0x1156('0x6'));router[_0x1156('0x7')]('/',auth[_0x1156('0x8')](),controller['index']);router[_0x1156('0x7')]('/describe',auth[_0x1156('0x8')](),controller[_0x1156('0x9')]);router[_0x1156('0x7')](_0x1156('0xa'),auth[_0x1156('0x8')](),controller['show']);router[_0x1156('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x1156('0xc')](_0x1156('0xa'),auth['isAuthenticated'](),controller[_0x1156('0xd')]);module['exports']=router;
\ No newline at end of file
+var _0xdf98=['/:id','update','exports','multer','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperHistory.controller','get','isAuthenticated','index','describe','show','create','put'];(function(_0x3b9b2e,_0x1d3afe){var _0x3e1a74=function(_0x1d5439){while(--_0x1d5439){_0x3b9b2e['push'](_0x3b9b2e['shift']());}};_0x3e1a74(++_0x1d3afe);}(_0xdf98,0xcf));var _0x8df9=function(_0x52e363,_0x48062a){_0x52e363=_0x52e363-0x0;var _0x3fc2b5=_0xdf98[_0x52e363];return _0x3fc2b5;};'use strict';var multer=require(_0x8df9('0x0'));var util=require('util');var path=require(_0x8df9('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x8df9('0x2')]();var auth=require(_0x8df9('0x3'));var interaction=require(_0x8df9('0x4'));var config=require(_0x8df9('0x5'));var controller=require(_0x8df9('0x6'));router[_0x8df9('0x7')]('/',auth[_0x8df9('0x8')](),controller[_0x8df9('0x9')]);router[_0x8df9('0x7')]('/describe',auth[_0x8df9('0x8')](),controller[_0x8df9('0xa')]);router[_0x8df9('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x8df9('0xb')]);router['post']('/',auth[_0x8df9('0x8')](),controller[_0x8df9('0xc')]);router[_0x8df9('0xd')](_0x8df9('0xe'),auth[_0x8df9('0x8')](),controller[_0x8df9('0xf')]);module[_0x8df9('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/cmList/cmList.attributes.js b/server/api/cmList/cmList.attributes.js
index e9ac1ea..a224ef1 100644
--- a/server/api/cmList/cmList.attributes.js
+++ b/server/api/cmList/cmList.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc4aa=['exports','STRING','name','sequelize'];(function(_0x23f829,_0x55a05b){var _0x5d7ede=function(_0x3febc2){while(--_0x3febc2){_0x23f829['push'](_0x23f829['shift']());}};_0x5d7ede(++_0x55a05b);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x199572,_0x33e667){_0x199572=_0x199572-0x0;var _0x13cfa3=_0xc4aa[_0x199572];return _0x13cfa3;};'use strict';var Sequelize=require(_0xac4a('0x0'));module[_0xac4a('0x1')]={'name':{'type':Sequelize[_0xac4a('0x2')],'unique':_0xac4a('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xac4a('0x2')]},'dialPrefix':{'type':Sequelize[_0xac4a('0x2')]}};
\ No newline at end of file
+var _0x9957=['exports','STRING','name','sequelize'];(function(_0x1ae541,_0xf7f46f){var _0xf81bb1=function(_0x1ac58a){while(--_0x1ac58a){_0x1ae541['push'](_0x1ae541['shift']());}};_0xf81bb1(++_0xf7f46f);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'name':{'type':Sequelize[_0x7995('0x2')],'unique':_0x7995('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']},'dialPrefix':{'type':Sequelize[_0x7995('0x2')]}};
\ No newline at end of file
diff --git a/server/api/cmList/cmList.controller.js b/server/api/cmList/cmList.controller.js
index 29d3246..d85391c 100644
--- a/server/api/cmList/cmList.controller.js
+++ b/server/api/cmList/cmList.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3fe4=['Content-type','text/csv','download','addCustomField','sequelize','transaction','addCustomFields','Sequelize','TEXT','INTEGER','BOOLEAN','queryInterface','addColumn','getCustomFields','findAndCountAll','addAgents','ids','emit','removeAgents','userCmList:remove','getAgents','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','api','../../config/utils','defaults','redis','socket.io-emitter','./cmList.socket','register','status','end','json','count','offset','limit','set','apply','reject','update','then','destroy','get','Lists','UserProfileResource','sendStatus','error','stack','name','send','index','CmList','rawAttributes','keys','query','filters','intersection','model','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','map','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','create','body','role','user','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','addDisposition','ListId','Disposition','getDispositions','findOne','hasOwnProperty','removeDispositions','addContacts','CmContact','describe','tags','isArray','each','omit','push','dataValues','errors','getContacts','CmCustomField','CustomFields','concat','format','cf_%d','raw','getContactsCsv','isEmpty','writeFileSync','/tmp/list_%d_%s.csv','setHeader','Content-disposition','list_%d_%s.csv'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x3fe4,0x121));var _0x43fe=function(_0xd6f683,_0x544905){_0xd6f683=_0xd6f683-0x0;var _0x52d65b=_0x3fe4[_0xd6f683];return _0x52d65b;};'use strict';var pdf=require(_0x43fe('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x43fe('0x1'));var zipdir=require(_0x43fe('0x2'));var jsonpatch=require(_0x43fe('0x3'));var rp=require(_0x43fe('0x4'));var moment=require(_0x43fe('0x5'));var BPromise=require(_0x43fe('0x6'));var Mustache=require(_0x43fe('0x7'));var util=require(_0x43fe('0x8'));var path=require(_0x43fe('0x9'));var sox=require(_0x43fe('0xa'));var csv=require(_0x43fe('0xb'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x43fe('0xc'));var squel=require(_0x43fe('0xd'));var crypto=require(_0x43fe('0xe'));var jsforce=require(_0x43fe('0xf'));var deskjs=require(_0x43fe('0x10'));var toCsv=require(_0x43fe('0xb'));var querystring=require(_0x43fe('0x11'));var Papa=require(_0x43fe('0x12'));var Redis=require('ioredis');var authService=require(_0x43fe('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x43fe('0x14'));var utils=require(_0x43fe('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x43fe('0x16')](config[_0x43fe('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0x43fe('0x18'))(new Redis(config[_0x43fe('0x17')]));require(_0x43fe('0x19'))[_0x43fe('0x1a')](socket);function respondWithStatusCode(_0x1e44ad,_0x4021f1){_0x4021f1=_0x4021f1||0xcc;return function(_0x3965bb){if(_0x3965bb){return _0x1e44ad['sendStatus'](_0x4021f1);}return _0x1e44ad[_0x43fe('0x1b')](_0x4021f1)[_0x43fe('0x1c')]();};}function respondWithResult(_0x56af6e,_0x516f2a){_0x516f2a=_0x516f2a||0xc8;return function(_0xf3f5a8){if(_0xf3f5a8){return _0x56af6e[_0x43fe('0x1b')](_0x516f2a)[_0x43fe('0x1d')](_0xf3f5a8);}};}function respondWithFilteredResult(_0x427f2e,_0x18a715){return function(_0x2454a8){if(_0x2454a8){var _0x2f4d26=_0x2454a8[_0x43fe('0x1e')],_0x2fc9fe=_0x18a715[_0x43fe('0x1f')],_0x45b055=_0x18a715[_0x43fe('0x1f')]+_0x18a715[_0x43fe('0x20')],_0x3a78f6;if(_0x45b055>=_0x2f4d26){_0x45b055=_0x2f4d26;_0x3a78f6=0xc8;}else{_0x3a78f6=0xce;}_0x427f2e[_0x43fe('0x1b')](_0x3a78f6);return _0x427f2e[_0x43fe('0x21')]('Content-Range',_0x2fc9fe+'-'+_0x45b055+'/'+_0x2f4d26)['json'](_0x2454a8);}return null;};}function patchUpdates(_0x6f903f){return function(_0x2b2891){try{jsonpatch[_0x43fe('0x22')](_0x2b2891,_0x6f903f,!![]);}catch(_0x4a0e3e){return BPromise[_0x43fe('0x23')](_0x4a0e3e);}return _0x2b2891['save']();};}function saveUpdates(_0xa60e68,_0xe578d7){return function(_0x3318b9){if(_0x3318b9){return _0x3318b9[_0x43fe('0x24')](_0xa60e68)[_0x43fe('0x25')](function(_0x387569){return _0x387569;});}return null;};}function removeEntity(_0x2a90e4,_0x3e96b7){return function(_0x49517e){if(_0x49517e){return _0x49517e[_0x43fe('0x26')]()[_0x43fe('0x25')](function(){var _0x2c70d3=_0x49517e[_0x43fe('0x27')]({'plain':!![]});var _0x248740=_0x43fe('0x28');return db[_0x43fe('0x29')]['destroy']({'where':{'type':_0x248740,'resourceId':_0x2c70d3['id']}})['then'](function(){return _0x49517e;});})[_0x43fe('0x25')](function(){_0x2a90e4['status'](0xcc)[_0x43fe('0x1c')]();});}};}function handleEntityNotFound(_0x4642a6,_0x387198){return function(_0x4ab0b1){if(!_0x4ab0b1){_0x4642a6[_0x43fe('0x2a')](0x194);}return _0x4ab0b1;};}function handleError(_0x5639b3,_0x54eb36){_0x54eb36=_0x54eb36||0x1f4;return function(_0xec95f6){logger[_0x43fe('0x2b')](_0xec95f6[_0x43fe('0x2c')]);if(_0xec95f6[_0x43fe('0x2d')]){delete _0xec95f6[_0x43fe('0x2d')];}_0x5639b3['status'](_0x54eb36)[_0x43fe('0x2e')](_0xec95f6);};}exports[_0x43fe('0x2f')]=function(_0xd70646,_0x55888d){var _0x368b5d={},_0x1087ea={},_0x538b3d={'count':0x0,'rows':[]};var _0x2cea7e=db[_0x43fe('0x30')][_0x43fe('0x31')];_0x1087ea['model']=_[_0x43fe('0x32')](_0x2cea7e);_0x1087ea['query']=_[_0x43fe('0x32')](_0xd70646[_0x43fe('0x33')]);_0x1087ea[_0x43fe('0x34')]=_[_0x43fe('0x35')](_0x1087ea[_0x43fe('0x36')],_0x1087ea[_0x43fe('0x33')]);_0x368b5d['attributes']=_[_0x43fe('0x35')](_0x1087ea[_0x43fe('0x36')],qs[_0x43fe('0x37')](_0xd70646[_0x43fe('0x33')][_0x43fe('0x37')]));_0x368b5d[_0x43fe('0x38')]=_0x368b5d[_0x43fe('0x38')][_0x43fe('0x39')]?_0x368b5d[_0x43fe('0x38')]:_0x1087ea['model'];if(!_0xd70646[_0x43fe('0x33')]['hasOwnProperty'](_0x43fe('0x3a'))){_0x368b5d[_0x43fe('0x20')]=qs[_0x43fe('0x20')](_0xd70646[_0x43fe('0x33')][_0x43fe('0x20')]);_0x368b5d[_0x43fe('0x1f')]=qs[_0x43fe('0x1f')](_0xd70646[_0x43fe('0x33')][_0x43fe('0x1f')]);}_0x368b5d[_0x43fe('0x3b')]=qs[_0x43fe('0x3c')](_0xd70646[_0x43fe('0x33')][_0x43fe('0x3c')]);_0x368b5d[_0x43fe('0x3d')]=qs[_0x43fe('0x34')](_[_0x43fe('0x3e')](_0xd70646[_0x43fe('0x33')],_0x1087ea[_0x43fe('0x34')]));if(_0xd70646[_0x43fe('0x33')][_0x43fe('0x3f')]){_0x368b5d[_0x43fe('0x3d')]=_[_0x43fe('0x40')](_0x368b5d[_0x43fe('0x3d')],{'$or':_[_0x43fe('0x41')](_0x2cea7e,function(_0x1267a1){if(_0x1267a1[_0x43fe('0x42')]['key']!==_0x43fe('0x43')){var _0x398e16={};_0x398e16[_0x1267a1['field']]={'$like':'%'+_0xd70646[_0x43fe('0x33')][_0x43fe('0x3f')]+'%'};return _0x398e16;}})});}_0x368b5d=_[_0x43fe('0x40')]({},_0x368b5d,_0xd70646[_0x43fe('0x44')]);var _0x4233e1={'where':_0x368b5d[_0x43fe('0x3d')]};return db[_0x43fe('0x30')][_0x43fe('0x1e')](_0x4233e1)[_0x43fe('0x25')](function(_0x107142){_0x538b3d[_0x43fe('0x1e')]=_0x107142;if(_0xd70646[_0x43fe('0x33')][_0x43fe('0x45')]){_0x368b5d[_0x43fe('0x46')]=[{'all':!![]}];}return db[_0x43fe('0x30')][_0x43fe('0x47')](_0x368b5d);})[_0x43fe('0x25')](function(_0x5bc516){_0x538b3d[_0x43fe('0x48')]=_0x5bc516;return _0x538b3d;})[_0x43fe('0x25')](respondWithFilteredResult(_0x55888d,_0x368b5d))[_0x43fe('0x49')](handleError(_0x55888d,null));};exports['show']=function(_0x2ee2ae,_0x5dae5d){var _0x3d8da5={'raw':![],'where':{'id':_0x2ee2ae[_0x43fe('0x4a')]['id']}},_0x114ecc={};_0x114ecc['model']=_[_0x43fe('0x32')](db[_0x43fe('0x30')][_0x43fe('0x31')]);_0x114ecc['query']=_[_0x43fe('0x32')](_0x2ee2ae[_0x43fe('0x33')]);_0x114ecc['filters']=_[_0x43fe('0x35')](_0x114ecc['model'],_0x114ecc[_0x43fe('0x33')]);_0x3d8da5[_0x43fe('0x38')]=_[_0x43fe('0x35')](_0x114ecc[_0x43fe('0x36')],qs[_0x43fe('0x37')](_0x2ee2ae[_0x43fe('0x33')][_0x43fe('0x37')]));_0x3d8da5[_0x43fe('0x38')]=_0x3d8da5[_0x43fe('0x38')][_0x43fe('0x39')]?_0x3d8da5[_0x43fe('0x38')]:_0x114ecc[_0x43fe('0x36')];if(_0x2ee2ae[_0x43fe('0x33')][_0x43fe('0x45')]){_0x3d8da5[_0x43fe('0x46')]=[{'all':!![]}];}_0x3d8da5=_[_0x43fe('0x40')]({},_0x3d8da5,_0x2ee2ae[_0x43fe('0x44')]);return db[_0x43fe('0x30')]['find'](_0x3d8da5)['then'](handleEntityNotFound(_0x5dae5d,null))[_0x43fe('0x25')](respondWithResult(_0x5dae5d,null))[_0x43fe('0x49')](handleError(_0x5dae5d,null));};exports['create']=function(_0xd37fbc,_0x306dab){return db[_0x43fe('0x30')][_0x43fe('0x4b')](_0xd37fbc[_0x43fe('0x4c')],{})[_0x43fe('0x25')](function(_0x30c0d7){var _0x3fe67b=_0xd37fbc['user'][_0x43fe('0x27')]({'plain':!![]});if(!_0x3fe67b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3fe67b[_0x43fe('0x4d')]===_0x43fe('0x4e')){var _0x58f067=_0x30c0d7['get']({'plain':!![]});var _0x5b1991=_0x43fe('0x28');return db['UserProfileSection']['find']({'where':{'name':_0x5b1991,'userProfileId':_0x3fe67b['userProfileId']},'raw':!![]})['then'](function(_0x2708e0){if(_0x2708e0&&_0x2708e0[_0x43fe('0x4f')]===0x0){return db['UserProfileResource'][_0x43fe('0x4b')]({'name':_0x58f067[_0x43fe('0x2d')],'resourceId':_0x58f067['id'],'type':_0x2708e0[_0x43fe('0x2d')],'sectionId':_0x2708e0['id']},{})[_0x43fe('0x25')](function(){return _0x30c0d7;});}else{return _0x30c0d7;}})[_0x43fe('0x49')](function(_0x4b1b20){logger[_0x43fe('0x2b')](_0x43fe('0x50'),_0x4b1b20);throw _0x4b1b20;});}return _0x30c0d7;})[_0x43fe('0x25')](respondWithResult(_0x306dab,0xc9))[_0x43fe('0x49')](handleError(_0x306dab,null));};exports[_0x43fe('0x24')]=function(_0x569e32,_0x4dc929){if(_0x569e32[_0x43fe('0x4c')]['id']){delete _0x569e32[_0x43fe('0x4c')]['id'];}return db[_0x43fe('0x30')][_0x43fe('0x51')]({'where':{'id':_0x569e32[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x4dc929,null))[_0x43fe('0x25')](saveUpdates(_0x569e32[_0x43fe('0x4c')],null))[_0x43fe('0x25')](respondWithResult(_0x4dc929,null))[_0x43fe('0x49')](handleError(_0x4dc929,null));};exports[_0x43fe('0x26')]=function(_0x149d90,_0x5ae389){return db['CmList'][_0x43fe('0x51')]({'where':{'id':_0x149d90['params']['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x5ae389,null))['then'](removeEntity(_0x5ae389,null))['catch'](handleError(_0x5ae389,null));};exports['describe']=function(_0x5ae420,_0x346b16){return db[_0x43fe('0x30')]['describe']()[_0x43fe('0x25')](respondWithResult(_0x346b16,null))['catch'](handleError(_0x346b16,null));};exports[_0x43fe('0x52')]=function(_0x48a574,_0x2f81ce,_0x573e4f){if(_0x48a574['body']['id']){delete _0x48a574[_0x43fe('0x4c')]['id'];}return db[_0x43fe('0x30')][_0x43fe('0x51')]({'where':{'id':_0x48a574[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x2f81ce,null))[_0x43fe('0x25')](function(_0x4b850b){if(_0x4b850b){_0x48a574[_0x43fe('0x4c')][_0x43fe('0x53')]=_0x4b850b['id'];return db[_0x43fe('0x54')][_0x43fe('0x4b')](_0x48a574[_0x43fe('0x4c')]);}})[_0x43fe('0x25')](respondWithResult(_0x2f81ce,null))[_0x43fe('0x49')](handleError(_0x2f81ce,null));};exports[_0x43fe('0x55')]=function(_0x24c301,_0x15c55c,_0x33594b){var _0x218944={'raw':![],'where':{}};var _0x262992={};var _0x4f7648={'count':0x0,'rows':[]};return db[_0x43fe('0x30')][_0x43fe('0x56')]({'where':{'id':_0x24c301[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x15c55c,null))[_0x43fe('0x25')](function(_0x10fd5a){if(_0x10fd5a){_0x262992[_0x43fe('0x36')]=_[_0x43fe('0x32')](db[_0x43fe('0x54')][_0x43fe('0x31')]);_0x262992['query']=_[_0x43fe('0x32')](_0x24c301['query']);_0x262992[_0x43fe('0x34')]=_[_0x43fe('0x35')](_0x262992[_0x43fe('0x36')],_0x262992[_0x43fe('0x33')]);_0x218944[_0x43fe('0x38')]=_[_0x43fe('0x35')](_0x262992[_0x43fe('0x36')],qs['fields'](_0x24c301[_0x43fe('0x33')][_0x43fe('0x37')]));_0x218944[_0x43fe('0x38')]=_0x218944[_0x43fe('0x38')]['length']?_0x218944[_0x43fe('0x38')]:_0x262992['model'];if(!_0x24c301[_0x43fe('0x33')][_0x43fe('0x57')]('nolimit')){_0x218944[_0x43fe('0x20')]=qs['limit'](_0x24c301[_0x43fe('0x33')][_0x43fe('0x20')]);_0x218944['offset']=qs[_0x43fe('0x1f')](_0x24c301[_0x43fe('0x33')][_0x43fe('0x1f')]);}_0x218944[_0x43fe('0x3b')]=qs[_0x43fe('0x3c')](_0x24c301['query'][_0x43fe('0x3c')]);_0x218944[_0x43fe('0x3d')]=qs[_0x43fe('0x34')](_[_0x43fe('0x3e')](_0x24c301[_0x43fe('0x33')],_0x262992[_0x43fe('0x34')]));_0x218944[_0x43fe('0x3d')]['ListId']=_0x10fd5a['id'];if(_0x24c301[_0x43fe('0x33')][_0x43fe('0x3f')]){_0x218944[_0x43fe('0x3d')]=_[_0x43fe('0x40')](_0x218944['where'],{'$or':_[_0x43fe('0x41')](_0x218944['attributes'],function(_0x6c86f8){var _0x15be66={};_0x15be66[_0x6c86f8]={'$like':'%'+_0x24c301[_0x43fe('0x33')][_0x43fe('0x3f')]+'%'};return _0x15be66;})});}_0x218944=_[_0x43fe('0x40')]({},_0x218944,_0x24c301[_0x43fe('0x44')]);return db[_0x43fe('0x54')][_0x43fe('0x1e')]({'where':_0x218944[_0x43fe('0x3d')]})[_0x43fe('0x25')](function(_0x5d79d5){_0x4f7648['count']=_0x5d79d5;if(_0x24c301[_0x43fe('0x33')][_0x43fe('0x45')]){_0x218944[_0x43fe('0x46')]=[{'all':!![]}];}return db['Disposition'][_0x43fe('0x47')](_0x218944);})[_0x43fe('0x25')](function(_0x18afdd){_0x4f7648[_0x43fe('0x48')]=_0x18afdd;return _0x4f7648;});}})['then'](respondWithFilteredResult(_0x15c55c,_0x218944))['catch'](handleError(_0x15c55c,null));};exports['removeDispositions']=function(_0x313064,_0x236eda,_0x12e257){return db[_0x43fe('0x30')][_0x43fe('0x51')]({'where':{'id':_0x313064[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x236eda,null))[_0x43fe('0x25')](function(_0x2bfa4f){if(_0x2bfa4f){return _0x2bfa4f[_0x43fe('0x58')](_0x313064[_0x43fe('0x33')]['ids']);}})['then'](respondWithStatusCode(_0x236eda,null))['catch'](handleError(_0x236eda,null));};exports[_0x43fe('0x59')]=function(_0x46626f,_0x3e4a2c,_0x23a81b){return db[_0x43fe('0x30')][_0x43fe('0x51')]({'where':{'id':_0x46626f[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x3e4a2c,null))[_0x43fe('0x25')](function(_0x3b308a){if(_0x3b308a){var _0x3afaaa=[];var _0x17619f={'success':[],'errors':[]};return db[_0x43fe('0x5a')][_0x43fe('0x5b')]()['then'](function(_0x18f4bd){if(_0x46626f['body'][_0x43fe('0x5c')]&&_[_0x43fe('0x5d')](_0x46626f[_0x43fe('0x4c')]['tags'])){if(_0x46626f[_0x43fe('0x4c')][_0x43fe('0x5c')][_0x43fe('0x39')]){_0x46626f[_0x43fe('0x4c')][_0x43fe('0x5c')]=_0x46626f['body'][_0x43fe('0x5c')]['join'](';')+';';}else{_0x46626f[_0x43fe('0x4c')][_0x43fe('0x5c')]=null;}}else{_0x46626f['body']['tags']=null;}if(_0x46626f[_0x43fe('0x4c')]&&_[_0x43fe('0x5d')](_0x46626f[_0x43fe('0x4c')])){for(var _0x24f5b6=0x0;_0x24f5b6<_0x46626f[_0x43fe('0x4c')][_0x43fe('0x39')];_0x24f5b6+=0x1){_0x46626f[_0x43fe('0x4c')][_0x24f5b6]['ListId']=_0x46626f[_0x43fe('0x4a')]['id'];_0x3afaaa['push'](_0x46626f[_0x43fe('0x4c')][_0x24f5b6]);}return BPromise[_0x43fe('0x5e')](_0x3afaaa,function(_0x19515d){return db[_0x43fe('0x5a')][_0x43fe('0x4b')](_[_0x43fe('0x5f')](_0x19515d,['ids','id'])||{},{'fields':_[_0x43fe('0x32')](_0x18f4bd),'raw':!![]})[_0x43fe('0x25')](function(_0x47cc13){_0x17619f['success'][_0x43fe('0x60')](_0x47cc13[_0x43fe('0x61')]);})[_0x43fe('0x49')](function(_0x1850c9){_0x17619f[_0x43fe('0x62')][_0x43fe('0x60')]({'data':_0x19515d,'error':_0x1850c9['message']});});})[_0x43fe('0x25')](function(_0x5c8eb8){return _0x17619f;})[_0x43fe('0x49')](function(_0x12334d){return _0x12334d;});}else{_0x3e4a2c[_0x43fe('0x1b')](0x190)[_0x43fe('0x1d')]({'message':'Malformed\x20request\x20syntax'});}});}})[_0x43fe('0x25')](respondWithResult(_0x3e4a2c,null))['catch'](handleError(_0x3e4a2c,null));};exports[_0x43fe('0x63')]=function(_0x240722,_0x5f46ed,_0x3ac061){var _0x41ddc9;return db[_0x43fe('0x30')][_0x43fe('0x51')]({'where':{'id':_0x240722[_0x43fe('0x4a')]['id']},'include':[{'model':db[_0x43fe('0x64')],'as':_0x43fe('0x65')}]})['then'](handleEntityNotFound(_0x5f46ed,null))[_0x43fe('0x25')](function(_0x47c7d6){if(_0x47c7d6){_0x41ddc9=_0x47c7d6;return db[_0x43fe('0x5a')][_0x43fe('0x31')];}})[_0x43fe('0x25')](function(_0x2b79d4){if(_0x2b79d4){var _0xc0554c={};var _0x1436d4={};_0x1436d4[_0x43fe('0x36')]=_[_0x43fe('0x66')](_['keys'](_0x2b79d4),_['map'](_0x41ddc9[_0x43fe('0x65')],function(_0xf55bc){return util[_0x43fe('0x67')](_0x43fe('0x68'),_0xf55bc['id']);}));_0x1436d4[_0x43fe('0x33')]=_[_0x43fe('0x32')](_0x240722['query']);_0x1436d4[_0x43fe('0x34')]=_['intersection'](_0x1436d4[_0x43fe('0x36')],_0x1436d4[_0x43fe('0x33')]);_0xc0554c[_0x43fe('0x38')]=_['intersection'](_0x1436d4['model'],qs['fields'](_0x240722[_0x43fe('0x33')]['fields']));_0xc0554c['attributes']=_0xc0554c[_0x43fe('0x38')][_0x43fe('0x39')]?_0xc0554c[_0x43fe('0x38')]:_0x1436d4[_0x43fe('0x36')];if(!_0x240722[_0x43fe('0x33')][_0x43fe('0x57')](_0x43fe('0x3a'))){_0xc0554c[_0x43fe('0x20')]=qs[_0x43fe('0x20')](_0x240722['query']['limit']);_0xc0554c['offset']=qs[_0x43fe('0x1f')](_0x240722[_0x43fe('0x33')][_0x43fe('0x1f')]);}_0xc0554c[_0x43fe('0x3b')]=qs[_0x43fe('0x3c')](_0x240722[_0x43fe('0x33')]['sort']);_0xc0554c['where']=qs[_0x43fe('0x34')](_[_0x43fe('0x3e')](_0x240722['query'],_0x1436d4['filters']));_0xc0554c[_0x43fe('0x69')]=!![];if(_0x240722['query'][_0x43fe('0x3f')]){_0xc0554c['where']=_[_0x43fe('0x40')](_0xc0554c['where'],{'$or':_['map'](_0xc0554c[_0x43fe('0x38')],function(_0x29243a){var _0x827475={};_0x827475[_0x29243a]={'$like':'%'+_0x240722[_0x43fe('0x33')][_0x43fe('0x3f')]+'%'};return _0x827475;})});}_0xc0554c=_[_0x43fe('0x40')]({},_0xc0554c,_0x240722[_0x43fe('0x44')]);return _0x41ddc9[_0x43fe('0x63')](_0xc0554c);}})[_0x43fe('0x25')](respondWithResult(_0x5f46ed,null))[_0x43fe('0x49')](handleError(_0x5f46ed,null));};exports[_0x43fe('0x6a')]=function(_0x3e9db1,_0x478d57,_0x53ce95){var _0x1e6cb6;return db[_0x43fe('0x30')]['find']({'where':{'id':_0x3e9db1[_0x43fe('0x4a')]['id']},'include':[{'model':db[_0x43fe('0x64')],'as':_0x43fe('0x65')}]})[_0x43fe('0x25')](handleEntityNotFound(_0x478d57,null))[_0x43fe('0x25')](function(_0x27b582){if(_0x27b582){_0x1e6cb6=_0x27b582;return db['CmContact'][_0x43fe('0x31')];}})[_0x43fe('0x25')](function(_0x3b49d0){if(_0x3b49d0){var _0x51c218={};var _0x1a231c={};_0x1a231c[_0x43fe('0x36')]=_[_0x43fe('0x66')](_['keys'](_0x3b49d0),_[_0x43fe('0x41')](_0x1e6cb6['CustomFields'],function(_0x1eded4){return util[_0x43fe('0x67')](_0x43fe('0x68'),_0x1eded4['id']);}));_0x1a231c[_0x43fe('0x33')]=_['keys'](_0x3e9db1[_0x43fe('0x33')]);_0x1a231c['filters']=_[_0x43fe('0x35')](_0x1a231c[_0x43fe('0x36')],_0x1a231c['query']);_0x51c218[_0x43fe('0x38')]=_[_0x43fe('0x35')](_0x1a231c[_0x43fe('0x36')],qs[_0x43fe('0x37')](_0x3e9db1[_0x43fe('0x33')]['fields']));_0x51c218[_0x43fe('0x38')]=_0x51c218[_0x43fe('0x38')][_0x43fe('0x39')]?_0x51c218[_0x43fe('0x38')]:_0x1a231c[_0x43fe('0x36')];if(!_0x3e9db1[_0x43fe('0x33')][_0x43fe('0x57')](_0x43fe('0x3a'))){_0x51c218[_0x43fe('0x20')]=qs[_0x43fe('0x20')](_0x3e9db1[_0x43fe('0x33')][_0x43fe('0x20')]);_0x51c218['offset']=qs['offset'](_0x3e9db1[_0x43fe('0x33')]['offset']);}_0x51c218[_0x43fe('0x3b')]=qs[_0x43fe('0x3c')](_0x3e9db1[_0x43fe('0x33')]['sort']);_0x51c218[_0x43fe('0x3d')]=qs[_0x43fe('0x34')](_['pick'](_0x3e9db1[_0x43fe('0x33')],_0x1a231c[_0x43fe('0x34')]));_0x51c218[_0x43fe('0x69')]=!![];if(_0x3e9db1[_0x43fe('0x33')][_0x43fe('0x3f')]){_0x51c218[_0x43fe('0x3d')]=_[_0x43fe('0x40')](_0x51c218[_0x43fe('0x3d')],{'$or':_[_0x43fe('0x41')](_0x51c218[_0x43fe('0x38')],function(_0x471854){var _0x30f293={};_0x30f293[_0x471854]={'$like':'%'+_0x3e9db1[_0x43fe('0x33')][_0x43fe('0x3f')]+'%'};return _0x30f293;})});}_0x51c218=_[_0x43fe('0x40')]({},_0x51c218,_0x3e9db1[_0x43fe('0x44')]);return _0x1e6cb6[_0x43fe('0x63')](_0x51c218);}})[_0x43fe('0x25')](function(_0x22d267){if(!_[_0x43fe('0x6b')](_0x22d267)){var _0x84816b=toCsv(_0x22d267);var _0x198c76=Date['now']();fs[_0x43fe('0x6c')](util['format'](_0x43fe('0x6d'),_0x1e6cb6['id'],_0x198c76),_0x84816b);_0x478d57[_0x43fe('0x6e')](_0x43fe('0x6f'),'attachment;\x20filename='+util[_0x43fe('0x67')](_0x43fe('0x70'),_0x1e6cb6['id'],_0x198c76));_0x478d57['setHeader'](_0x43fe('0x71'),_0x43fe('0x72'));return _0x478d57[_0x43fe('0x73')](util[_0x43fe('0x67')]('/tmp/list_%d_%s.csv',_0x1e6cb6['id'],_0x198c76));}else{return _0x478d57[_0x43fe('0x2a')](0xcc);}})[_0x43fe('0x49')](handleError(_0x478d57,null));};exports[_0x43fe('0x74')]=function(_0x295299,_0xe4f5f3,_0x2c3109){var _0x40d9c3;delete _0x295299['body']['id'];return db[_0x43fe('0x30')][_0x43fe('0x56')]({'where':{'id':_0x295299[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0xe4f5f3,null))[_0x43fe('0x25')](function(_0x207fc2){if(_0x207fc2){return db[_0x43fe('0x75')][_0x43fe('0x76')](function(_0x1c2d08){return db[_0x43fe('0x64')][_0x43fe('0x4b')](_0x295299[_0x43fe('0x4c')],{'transaction':_0x1c2d08})[_0x43fe('0x25')](function(_0xd60501){_0x40d9c3=_0xd60501;return _0x207fc2[_0x43fe('0x77')](_0xd60501,{'transaction':_0x1c2d08});})[_0x43fe('0x25')](function(){var _0x24e258={'type':db[_0x43fe('0x78')][_0x43fe('0x79')],'transaction':_0x1c2d08};switch(_0x295299[_0x43fe('0x4c')][_0x43fe('0x42')]){case'text':_0x24e258['type']=db[_0x43fe('0x78')][_0x43fe('0x79')];break;case'number':_0x24e258[_0x43fe('0x42')]=db['Sequelize'][_0x43fe('0x7a')];break;case'switch':_0x24e258[_0x43fe('0x42')]=db[_0x43fe('0x78')][_0x43fe('0x7b')];_0x24e258['defaultValue']=![];break;default:}return db[_0x43fe('0x75')][_0x43fe('0x7c')][_0x43fe('0x7d')]('cm_contacts',util[_0x43fe('0x67')]('cf_%s',_0x40d9c3['id']),_0x24e258);})[_0x43fe('0x25')](function(){return _0x40d9c3;});});}})[_0x43fe('0x25')](respondWithResult(_0xe4f5f3,null))[_0x43fe('0x49')](handleError(_0xe4f5f3,null));};exports[_0x43fe('0x7e')]=function(_0x417499,_0x78141f,_0x76b748){var _0x44bd31={};var _0x399d9c={};var _0x59c598;var _0x24c3bf;return db[_0x43fe('0x30')][_0x43fe('0x56')]({'where':{'id':_0x417499[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x78141f,null))[_0x43fe('0x25')](function(_0x4c3256){if(_0x4c3256){_0x59c598=_0x4c3256;_0x399d9c[_0x43fe('0x36')]=_['keys'](db['CmCustomField'][_0x43fe('0x31')]);_0x399d9c[_0x43fe('0x33')]=_[_0x43fe('0x32')](_0x417499[_0x43fe('0x33')]);_0x399d9c['filters']=_['intersection'](_0x399d9c[_0x43fe('0x36')],_0x399d9c[_0x43fe('0x33')]);_0x44bd31[_0x43fe('0x38')]=_[_0x43fe('0x35')](_0x399d9c[_0x43fe('0x36')],qs[_0x43fe('0x37')](_0x417499[_0x43fe('0x33')][_0x43fe('0x37')]));_0x44bd31['attributes']=_0x44bd31[_0x43fe('0x38')][_0x43fe('0x39')]?_0x44bd31['attributes']:_0x399d9c['model'];_0x44bd31[_0x43fe('0x3b')]=qs[_0x43fe('0x3c')](_0x417499[_0x43fe('0x33')]['sort']);_0x44bd31[_0x43fe('0x3d')]=qs[_0x43fe('0x34')](_['pick'](_0x417499[_0x43fe('0x33')],_0x399d9c[_0x43fe('0x34')]));_0x44bd31[_0x43fe('0x3d')]=_[_0x43fe('0x40')](_0x44bd31[_0x43fe('0x3d')],{'$or':[{'ListId':_0x4c3256['id']},{'ListId':null}]});if(_0x417499['query'][_0x43fe('0x3f')]){_0x44bd31[_0x43fe('0x3d')]=_[_0x43fe('0x40')](_0x44bd31[_0x43fe('0x3d')],{'$or':_[_0x43fe('0x41')](_0x44bd31['attributes'],function(_0x8f828f){var _0x1ec036={};_0x1ec036[_0x8f828f]={'$like':'%'+_0x417499[_0x43fe('0x33')][_0x43fe('0x3f')]+'%'};return _0x1ec036;})});}_0x44bd31=_[_0x43fe('0x40')]({},_0x44bd31,_0x417499['options']);return db[_0x43fe('0x64')][_0x43fe('0x7f')](_0x44bd31);}})[_0x43fe('0x25')](respondWithResult(_0x78141f,null))[_0x43fe('0x49')](handleError(_0x78141f,null));};exports['addAgents']=function(_0x2d817d,_0x7205fc,_0x267ecc){return db[_0x43fe('0x30')][_0x43fe('0x51')]({'where':{'id':_0x2d817d[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x7205fc,null))[_0x43fe('0x25')](function(_0x3da9aa){if(_0x3da9aa){return _0x3da9aa[_0x43fe('0x80')](_0x2d817d['body'][_0x43fe('0x81')],_[_0x43fe('0x5f')](_0x2d817d[_0x43fe('0x4c')],[_0x43fe('0x81'),'id'])||{})['spread'](function(_0x34291b){for(var _0x2141a2=0x0;_0x2141a2<_0x2d817d[_0x43fe('0x4c')]['ids'][_0x43fe('0x39')];_0x2141a2+=0x1){socket[_0x43fe('0x82')]('userCmList:save',{'UserId':_0x2d817d['body'][_0x43fe('0x81')][_0x2141a2],'CmListId':_0x2d817d[_0x43fe('0x4a')]['id']});}return _0x34291b;});}})['then'](respondWithResult(_0x7205fc,null))[_0x43fe('0x49')](handleError(_0x7205fc,null));};exports[_0x43fe('0x83')]=function(_0x5742bf,_0x354b82,_0x3ab3a5){return db['CmList'][_0x43fe('0x51')]({'where':{'id':_0x5742bf[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x354b82,null))[_0x43fe('0x25')](function(_0x53dc59){if(_0x53dc59){return _0x53dc59[_0x43fe('0x83')](_0x5742bf['query'][_0x43fe('0x81')])[_0x43fe('0x25')](function(){if(_[_0x43fe('0x5d')](_0x5742bf[_0x43fe('0x33')]['ids'])){for(var _0x58b942=0x0;_0x58b942<_0x5742bf[_0x43fe('0x33')][_0x43fe('0x81')][_0x43fe('0x39')];_0x58b942+=0x1){socket['emit'](_0x43fe('0x84'),{'UserId':Number(_0x5742bf[_0x43fe('0x33')][_0x43fe('0x81')][_0x58b942]),'CmListId':Number(_0x5742bf[_0x43fe('0x4a')]['id'])});}}else{socket[_0x43fe('0x82')](_0x43fe('0x84'),{'UserId':Number(_0x5742bf[_0x43fe('0x33')][_0x43fe('0x81')]),'CmListId':Number(_0x5742bf[_0x43fe('0x4a')]['id'])});}});}})[_0x43fe('0x25')](respondWithStatusCode(_0x354b82,null))[_0x43fe('0x49')](handleError(_0x354b82,null));};exports[_0x43fe('0x85')]=function(_0x1c0356,_0x241543,_0x58791e){var _0x4568a5={};var _0x3c6d45={};var _0x178e9a;var _0xd233ce;return db['CmList'][_0x43fe('0x56')]({'where':{'id':_0x1c0356[_0x43fe('0x4a')]['id']}})[_0x43fe('0x25')](handleEntityNotFound(_0x241543,null))[_0x43fe('0x25')](function(_0x34bac1){if(_0x34bac1){_0x178e9a=_0x34bac1;_0x3c6d45[_0x43fe('0x36')]=_[_0x43fe('0x32')](db['User'][_0x43fe('0x31')]);_0x3c6d45['query']=_[_0x43fe('0x32')](_0x1c0356[_0x43fe('0x33')]);_0x3c6d45[_0x43fe('0x34')]=_[_0x43fe('0x35')](_0x3c6d45[_0x43fe('0x36')],_0x3c6d45[_0x43fe('0x33')]);_0x4568a5[_0x43fe('0x38')]=_[_0x43fe('0x35')](_0x3c6d45[_0x43fe('0x36')],qs[_0x43fe('0x37')](_0x1c0356[_0x43fe('0x33')][_0x43fe('0x37')]));_0x4568a5[_0x43fe('0x38')]=_0x4568a5['attributes'][_0x43fe('0x39')]?_0x4568a5[_0x43fe('0x38')]:_0x3c6d45[_0x43fe('0x36')];_0x4568a5[_0x43fe('0x3b')]=qs[_0x43fe('0x3c')](_0x1c0356[_0x43fe('0x33')][_0x43fe('0x3c')]);_0x4568a5[_0x43fe('0x3d')]=qs[_0x43fe('0x34')](_['pick'](_0x1c0356[_0x43fe('0x33')],_0x3c6d45[_0x43fe('0x34')]));if(_0x1c0356[_0x43fe('0x33')][_0x43fe('0x3f')]){_0x4568a5[_0x43fe('0x3d')]=_[_0x43fe('0x40')](_0x4568a5[_0x43fe('0x3d')],{'$or':_['map'](_0x4568a5[_0x43fe('0x38')],function(_0x50cdb9){var _0x39a407={};_0x39a407[_0x50cdb9]={'$like':'%'+_0x1c0356['query']['filter']+'%'};return _0x39a407;})});}_0x4568a5=_[_0x43fe('0x40')]({},_0x4568a5,_0x1c0356[_0x43fe('0x44')]);return _0x178e9a['getAgents'](_0x4568a5);}})['then'](function(_0x13a9c5){if(_0x13a9c5){_0xd233ce=_0x13a9c5[_0x43fe('0x39')];if(!_0x1c0356['query'][_0x43fe('0x57')](_0x43fe('0x3a'))){_0x4568a5[_0x43fe('0x20')]=qs[_0x43fe('0x20')](_0x1c0356['query'][_0x43fe('0x20')]);_0x4568a5[_0x43fe('0x1f')]=qs[_0x43fe('0x1f')](_0x1c0356[_0x43fe('0x33')][_0x43fe('0x1f')]);}return _0x178e9a[_0x43fe('0x85')](_0x4568a5);}})[_0x43fe('0x25')](function(_0x51b390){if(_0x51b390){return _0x51b390?{'count':_0xd233ce,'rows':_0x51b390}:null;}})['then'](respondWithResult(_0x241543,null))[_0x43fe('0x49')](handleError(_0x241543,null));};
\ No newline at end of file
+var _0x172e=['CmContact','tags','isArray','join','push','each','success','dataValues','errors','message','Malformed\x20request\x20syntax','CustomFields','concat','cf_%d','raw','getContacts','format','isEmpty','now','writeFileSync','/tmp/list_%d_%s.csv','setHeader','Content-disposition','Content-type','download','addCustomField','sequelize','transaction','CmCustomField','addCustomFields','Sequelize','TEXT','text','number','INTEGER','BOOLEAN','defaultValue','queryInterface','addColumn','cm_contacts','cf_%s','getCustomFields','findAndCountAll','addAgents','omit','spread','emit','userCmList:save','removeAgents','userCmList:remove','getAgents','User','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','defaults','redis','./cmList.socket','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','destroy','get','Lists','UserProfileResource','error','stack','name','send','CmList','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','merge','type','field','filter','includeAll','include','show','params','options','find','catch','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','describe','ListId','Disposition','getDispositions','findOne','nolimit','pick','map','findAll','rows','ids','addContacts'];(function(_0x5a7f64,_0x347d57){var _0x3d30f1=function(_0x4bd1d6){while(--_0x4bd1d6){_0x5a7f64['push'](_0x5a7f64['shift']());}};_0x3d30f1(++_0x347d57);}(_0x172e,0x150));var _0xe172=function(_0x3c6eb1,_0x3bcb78){_0x3c6eb1=_0x3c6eb1-0x0;var _0x4856ff=_0x172e[_0x3c6eb1];return _0x4856ff;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xe172('0x0'));var zipdir=require(_0xe172('0x1'));var jsonpatch=require(_0xe172('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe172('0x3'));var Mustache=require(_0xe172('0x4'));var util=require(_0xe172('0x5'));var path=require(_0xe172('0x6'));var sox=require(_0xe172('0x7'));var csv=require(_0xe172('0x8'));var ejs=require(_0xe172('0x9'));var fs=require('fs');var _=require(_0xe172('0xa'));var squel=require('squel');var crypto=require(_0xe172('0xb'));var jsforce=require(_0xe172('0xc'));var deskjs=require(_0xe172('0xd'));var toCsv=require(_0xe172('0x8'));var querystring=require('querystring');var Papa=require(_0xe172('0xe'));var Redis=require('ioredis');var authService=require(_0xe172('0xf'));var qs=require(_0xe172('0x10'));var hardwareService=require(_0xe172('0x11'));var logger=require(_0xe172('0x12'))(_0xe172('0x13'));var utils=require(_0xe172('0x14'));var config=require(_0xe172('0x15'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xe172('0x16')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe172('0x17')]));require(_0xe172('0x18'))['register'](socket);function respondWithStatusCode(_0x2f8847,_0x59be50){_0x59be50=_0x59be50||0xcc;return function(_0x47591e){if(_0x47591e){return _0x2f8847[_0xe172('0x19')](_0x59be50);}return _0x2f8847[_0xe172('0x1a')](_0x59be50)[_0xe172('0x1b')]();};}function respondWithResult(_0x2a7eba,_0xf6c018){_0xf6c018=_0xf6c018||0xc8;return function(_0x373ccb){if(_0x373ccb){return _0x2a7eba[_0xe172('0x1a')](_0xf6c018)[_0xe172('0x1c')](_0x373ccb);}};}function respondWithFilteredResult(_0x39fd5e,_0x4cd728){return function(_0x3d826b){if(_0x3d826b){var _0x21418d=_0x3d826b[_0xe172('0x1d')],_0xd2497d=_0x4cd728[_0xe172('0x1e')],_0x2da2ac=_0x4cd728[_0xe172('0x1e')]+_0x4cd728[_0xe172('0x1f')],_0x2d0000;if(_0x2da2ac>=_0x21418d){_0x2da2ac=_0x21418d;_0x2d0000=0xc8;}else{_0x2d0000=0xce;}_0x39fd5e[_0xe172('0x1a')](_0x2d0000);return _0x39fd5e[_0xe172('0x20')](_0xe172('0x21'),_0xd2497d+'-'+_0x2da2ac+'/'+_0x21418d)[_0xe172('0x1c')](_0x3d826b);}return null;};}function patchUpdates(_0x51e336){return function(_0x29b2ef){try{jsonpatch['apply'](_0x29b2ef,_0x51e336,!![]);}catch(_0xf501ab){return BPromise[_0xe172('0x22')](_0xf501ab);}return _0x29b2ef[_0xe172('0x23')]();};}function saveUpdates(_0x222171,_0x39b61a){return function(_0x218c8b){if(_0x218c8b){return _0x218c8b[_0xe172('0x24')](_0x222171)[_0xe172('0x25')](function(_0x3a8ef4){return _0x3a8ef4;});}return null;};}function removeEntity(_0x505bf6,_0x2fa799){return function(_0x1f4178){if(_0x1f4178){return _0x1f4178[_0xe172('0x26')]()[_0xe172('0x25')](function(){var _0x2076d4=_0x1f4178[_0xe172('0x27')]({'plain':!![]});var _0x5c64d5=_0xe172('0x28');return db[_0xe172('0x29')][_0xe172('0x26')]({'where':{'type':_0x5c64d5,'resourceId':_0x2076d4['id']}})['then'](function(){return _0x1f4178;});})[_0xe172('0x25')](function(){_0x505bf6['status'](0xcc)[_0xe172('0x1b')]();});}};}function handleEntityNotFound(_0x297bb1,_0x452a0e){return function(_0x4e276c){if(!_0x4e276c){_0x297bb1[_0xe172('0x19')](0x194);}return _0x4e276c;};}function handleError(_0x489049,_0x591ace){_0x591ace=_0x591ace||0x1f4;return function(_0x2a18a0){logger[_0xe172('0x2a')](_0x2a18a0[_0xe172('0x2b')]);if(_0x2a18a0[_0xe172('0x2c')]){delete _0x2a18a0['name'];}_0x489049[_0xe172('0x1a')](_0x591ace)[_0xe172('0x2d')](_0x2a18a0);};}exports['index']=function(_0x5a838a,_0x4142c6){var _0x373a7b={},_0x4b41bc={},_0x251fde={'count':0x0,'rows':[]};var _0x1e0a10=db[_0xe172('0x2e')][_0xe172('0x2f')];_0x4b41bc[_0xe172('0x30')]=_[_0xe172('0x31')](_0x1e0a10);_0x4b41bc[_0xe172('0x32')]=_[_0xe172('0x31')](_0x5a838a[_0xe172('0x32')]);_0x4b41bc[_0xe172('0x33')]=_[_0xe172('0x34')](_0x4b41bc[_0xe172('0x30')],_0x4b41bc[_0xe172('0x32')]);_0x373a7b[_0xe172('0x35')]=_['intersection'](_0x4b41bc[_0xe172('0x30')],qs[_0xe172('0x36')](_0x5a838a[_0xe172('0x32')][_0xe172('0x36')]));_0x373a7b['attributes']=_0x373a7b['attributes'][_0xe172('0x37')]?_0x373a7b[_0xe172('0x35')]:_0x4b41bc['model'];if(!_0x5a838a['query'][_0xe172('0x38')]('nolimit')){_0x373a7b[_0xe172('0x1f')]=qs[_0xe172('0x1f')](_0x5a838a[_0xe172('0x32')]['limit']);_0x373a7b[_0xe172('0x1e')]=qs[_0xe172('0x1e')](_0x5a838a[_0xe172('0x32')][_0xe172('0x1e')]);}_0x373a7b[_0xe172('0x39')]=qs[_0xe172('0x3a')](_0x5a838a[_0xe172('0x32')][_0xe172('0x3a')]);_0x373a7b[_0xe172('0x3b')]=qs[_0xe172('0x33')](_['pick'](_0x5a838a[_0xe172('0x32')],_0x4b41bc['filters']));if(_0x5a838a[_0xe172('0x32')]['filter']){_0x373a7b[_0xe172('0x3b')]=_[_0xe172('0x3c')](_0x373a7b[_0xe172('0x3b')],{'$or':_['map'](_0x1e0a10,function(_0x4f7593){if(_0x4f7593[_0xe172('0x3d')]['key']!=='VIRTUAL'){var _0x16a2a1={};_0x16a2a1[_0x4f7593[_0xe172('0x3e')]]={'$like':'%'+_0x5a838a[_0xe172('0x32')][_0xe172('0x3f')]+'%'};return _0x16a2a1;}})});}_0x373a7b=_[_0xe172('0x3c')]({},_0x373a7b,_0x5a838a['options']);var _0x134d43={'where':_0x373a7b[_0xe172('0x3b')]};return db[_0xe172('0x2e')][_0xe172('0x1d')](_0x134d43)[_0xe172('0x25')](function(_0x30a3a4){_0x251fde[_0xe172('0x1d')]=_0x30a3a4;if(_0x5a838a[_0xe172('0x32')][_0xe172('0x40')]){_0x373a7b[_0xe172('0x41')]=[{'all':!![]}];}return db[_0xe172('0x2e')]['findAll'](_0x373a7b);})[_0xe172('0x25')](function(_0x43e817){_0x251fde['rows']=_0x43e817;return _0x251fde;})['then'](respondWithFilteredResult(_0x4142c6,_0x373a7b))['catch'](handleError(_0x4142c6,null));};exports[_0xe172('0x42')]=function(_0x1565a0,_0x46b30f){var _0x407d04={'raw':![],'where':{'id':_0x1565a0[_0xe172('0x43')]['id']}},_0x172ecb={};_0x172ecb[_0xe172('0x30')]=_['keys'](db[_0xe172('0x2e')][_0xe172('0x2f')]);_0x172ecb[_0xe172('0x32')]=_[_0xe172('0x31')](_0x1565a0[_0xe172('0x32')]);_0x172ecb['filters']=_[_0xe172('0x34')](_0x172ecb[_0xe172('0x30')],_0x172ecb[_0xe172('0x32')]);_0x407d04[_0xe172('0x35')]=_[_0xe172('0x34')](_0x172ecb[_0xe172('0x30')],qs[_0xe172('0x36')](_0x1565a0['query']['fields']));_0x407d04['attributes']=_0x407d04['attributes'][_0xe172('0x37')]?_0x407d04['attributes']:_0x172ecb[_0xe172('0x30')];if(_0x1565a0[_0xe172('0x32')]['includeAll']){_0x407d04['include']=[{'all':!![]}];}_0x407d04=_['merge']({},_0x407d04,_0x1565a0[_0xe172('0x44')]);return db[_0xe172('0x2e')][_0xe172('0x45')](_0x407d04)[_0xe172('0x25')](handleEntityNotFound(_0x46b30f,null))[_0xe172('0x25')](respondWithResult(_0x46b30f,null))[_0xe172('0x46')](handleError(_0x46b30f,null));};exports[_0xe172('0x47')]=function(_0x3229b6,_0x591b58){return db[_0xe172('0x2e')][_0xe172('0x47')](_0x3229b6[_0xe172('0x48')],{})[_0xe172('0x25')](function(_0xc9f5f8){var _0x1ce639=_0x3229b6[_0xe172('0x49')][_0xe172('0x27')]({'plain':!![]});if(!_0x1ce639)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1ce639[_0xe172('0x4a')]===_0xe172('0x49')){var _0x498233=_0xc9f5f8[_0xe172('0x27')]({'plain':!![]});var _0x1720b9=_0xe172('0x28');return db[_0xe172('0x4b')]['find']({'where':{'name':_0x1720b9,'userProfileId':_0x1ce639[_0xe172('0x4c')]},'raw':!![]})[_0xe172('0x25')](function(_0x290985){if(_0x290985&&_0x290985[_0xe172('0x4d')]===0x0){return db[_0xe172('0x29')][_0xe172('0x47')]({'name':_0x498233[_0xe172('0x2c')],'resourceId':_0x498233['id'],'type':_0x290985[_0xe172('0x2c')],'sectionId':_0x290985['id']},{})[_0xe172('0x25')](function(){return _0xc9f5f8;});}else{return _0xc9f5f8;}})[_0xe172('0x46')](function(_0x4d0fc6){logger[_0xe172('0x2a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4d0fc6);throw _0x4d0fc6;});}return _0xc9f5f8;})[_0xe172('0x25')](respondWithResult(_0x591b58,0xc9))[_0xe172('0x46')](handleError(_0x591b58,null));};exports[_0xe172('0x24')]=function(_0x3dcd62,_0xe4e8b){if(_0x3dcd62[_0xe172('0x48')]['id']){delete _0x3dcd62['body']['id'];}return db[_0xe172('0x2e')][_0xe172('0x45')]({'where':{'id':_0x3dcd62[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0xe4e8b,null))['then'](saveUpdates(_0x3dcd62[_0xe172('0x48')],null))[_0xe172('0x25')](respondWithResult(_0xe4e8b,null))[_0xe172('0x46')](handleError(_0xe4e8b,null));};exports['destroy']=function(_0x4725d9,_0x3f5164){return db[_0xe172('0x2e')][_0xe172('0x45')]({'where':{'id':_0x4725d9[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x3f5164,null))[_0xe172('0x25')](removeEntity(_0x3f5164,null))[_0xe172('0x46')](handleError(_0x3f5164,null));};exports[_0xe172('0x4e')]=function(_0x16dc70,_0x5bb048){return db[_0xe172('0x2e')][_0xe172('0x4e')]()['then'](respondWithResult(_0x5bb048,null))['catch'](handleError(_0x5bb048,null));};exports['addDisposition']=function(_0x1ee3c1,_0x5ac6d8,_0x1204b6){if(_0x1ee3c1['body']['id']){delete _0x1ee3c1['body']['id'];}return db[_0xe172('0x2e')][_0xe172('0x45')]({'where':{'id':_0x1ee3c1[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x5ac6d8,null))[_0xe172('0x25')](function(_0x5893be){if(_0x5893be){_0x1ee3c1[_0xe172('0x48')][_0xe172('0x4f')]=_0x5893be['id'];return db[_0xe172('0x50')][_0xe172('0x47')](_0x1ee3c1[_0xe172('0x48')]);}})['then'](respondWithResult(_0x5ac6d8,null))[_0xe172('0x46')](handleError(_0x5ac6d8,null));};exports[_0xe172('0x51')]=function(_0x1646a2,_0x60a8df,_0x27011e){var _0x19dab5={'raw':![],'where':{}};var _0x1260e8={};var _0x5420af={'count':0x0,'rows':[]};return db[_0xe172('0x2e')][_0xe172('0x52')]({'where':{'id':_0x1646a2['params']['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x60a8df,null))[_0xe172('0x25')](function(_0x3112f8){if(_0x3112f8){_0x1260e8[_0xe172('0x30')]=_[_0xe172('0x31')](db['Disposition']['rawAttributes']);_0x1260e8[_0xe172('0x32')]=_[_0xe172('0x31')](_0x1646a2[_0xe172('0x32')]);_0x1260e8['filters']=_[_0xe172('0x34')](_0x1260e8['model'],_0x1260e8[_0xe172('0x32')]);_0x19dab5[_0xe172('0x35')]=_[_0xe172('0x34')](_0x1260e8['model'],qs[_0xe172('0x36')](_0x1646a2[_0xe172('0x32')][_0xe172('0x36')]));_0x19dab5[_0xe172('0x35')]=_0x19dab5['attributes'][_0xe172('0x37')]?_0x19dab5[_0xe172('0x35')]:_0x1260e8['model'];if(!_0x1646a2['query'][_0xe172('0x38')](_0xe172('0x53'))){_0x19dab5[_0xe172('0x1f')]=qs[_0xe172('0x1f')](_0x1646a2[_0xe172('0x32')][_0xe172('0x1f')]);_0x19dab5['offset']=qs[_0xe172('0x1e')](_0x1646a2[_0xe172('0x32')][_0xe172('0x1e')]);}_0x19dab5[_0xe172('0x39')]=qs[_0xe172('0x3a')](_0x1646a2['query'][_0xe172('0x3a')]);_0x19dab5[_0xe172('0x3b')]=qs['filters'](_[_0xe172('0x54')](_0x1646a2[_0xe172('0x32')],_0x1260e8[_0xe172('0x33')]));_0x19dab5['where']['ListId']=_0x3112f8['id'];if(_0x1646a2[_0xe172('0x32')]['filter']){_0x19dab5['where']=_[_0xe172('0x3c')](_0x19dab5[_0xe172('0x3b')],{'$or':_[_0xe172('0x55')](_0x19dab5[_0xe172('0x35')],function(_0x433136){var _0x581a80={};_0x581a80[_0x433136]={'$like':'%'+_0x1646a2[_0xe172('0x32')]['filter']+'%'};return _0x581a80;})});}_0x19dab5=_['merge']({},_0x19dab5,_0x1646a2[_0xe172('0x44')]);return db[_0xe172('0x50')][_0xe172('0x1d')]({'where':_0x19dab5[_0xe172('0x3b')]})[_0xe172('0x25')](function(_0x13f7cc){_0x5420af[_0xe172('0x1d')]=_0x13f7cc;if(_0x1646a2[_0xe172('0x32')]['includeAll']){_0x19dab5['include']=[{'all':!![]}];}return db[_0xe172('0x50')][_0xe172('0x56')](_0x19dab5);})[_0xe172('0x25')](function(_0x1e3247){_0x5420af[_0xe172('0x57')]=_0x1e3247;return _0x5420af;});}})[_0xe172('0x25')](respondWithFilteredResult(_0x60a8df,_0x19dab5))[_0xe172('0x46')](handleError(_0x60a8df,null));};exports['removeDispositions']=function(_0x5d63fd,_0x51da47,_0x389ba7){return db[_0xe172('0x2e')]['find']({'where':{'id':_0x5d63fd[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x51da47,null))[_0xe172('0x25')](function(_0xd9eb21){if(_0xd9eb21){return _0xd9eb21['removeDispositions'](_0x5d63fd[_0xe172('0x32')][_0xe172('0x58')]);}})[_0xe172('0x25')](respondWithStatusCode(_0x51da47,null))[_0xe172('0x46')](handleError(_0x51da47,null));};exports[_0xe172('0x59')]=function(_0x28f1ec,_0x55c726,_0x131cc3){return db[_0xe172('0x2e')][_0xe172('0x45')]({'where':{'id':_0x28f1ec[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x55c726,null))[_0xe172('0x25')](function(_0x4abd33){if(_0x4abd33){var _0x573d2e=[];var _0x23b929={'success':[],'errors':[]};return db[_0xe172('0x5a')][_0xe172('0x4e')]()['then'](function(_0x490328){if(_0x28f1ec[_0xe172('0x48')][_0xe172('0x5b')]&&_[_0xe172('0x5c')](_0x28f1ec[_0xe172('0x48')][_0xe172('0x5b')])){if(_0x28f1ec[_0xe172('0x48')][_0xe172('0x5b')][_0xe172('0x37')]){_0x28f1ec[_0xe172('0x48')][_0xe172('0x5b')]=_0x28f1ec[_0xe172('0x48')][_0xe172('0x5b')][_0xe172('0x5d')](';')+';';}else{_0x28f1ec['body']['tags']=null;}}else{_0x28f1ec[_0xe172('0x48')][_0xe172('0x5b')]=null;}if(_0x28f1ec[_0xe172('0x48')]&&_[_0xe172('0x5c')](_0x28f1ec[_0xe172('0x48')])){for(var _0x5a7f55=0x0;_0x5a7f55<_0x28f1ec[_0xe172('0x48')][_0xe172('0x37')];_0x5a7f55+=0x1){_0x28f1ec[_0xe172('0x48')][_0x5a7f55][_0xe172('0x4f')]=_0x28f1ec['params']['id'];_0x573d2e[_0xe172('0x5e')](_0x28f1ec[_0xe172('0x48')][_0x5a7f55]);}return BPromise[_0xe172('0x5f')](_0x573d2e,function(_0x31f5ec){return db[_0xe172('0x5a')][_0xe172('0x47')](_['omit'](_0x31f5ec,[_0xe172('0x58'),'id'])||{},{'fields':_['keys'](_0x490328),'raw':!![]})[_0xe172('0x25')](function(_0x5b9784){_0x23b929[_0xe172('0x60')][_0xe172('0x5e')](_0x5b9784[_0xe172('0x61')]);})[_0xe172('0x46')](function(_0x5d9d66){_0x23b929[_0xe172('0x62')][_0xe172('0x5e')]({'data':_0x31f5ec,'error':_0x5d9d66[_0xe172('0x63')]});});})[_0xe172('0x25')](function(_0x1592a6){return _0x23b929;})[_0xe172('0x46')](function(_0x217f15){return _0x217f15;});}else{_0x55c726[_0xe172('0x1a')](0x190)[_0xe172('0x1c')]({'message':_0xe172('0x64')});}});}})[_0xe172('0x25')](respondWithResult(_0x55c726,null))[_0xe172('0x46')](handleError(_0x55c726,null));};exports['getContacts']=function(_0x1a3e28,_0x4aa13e,_0x35ca77){var _0x57bac4;return db['CmList'][_0xe172('0x45')]({'where':{'id':_0x1a3e28[_0xe172('0x43')]['id']},'include':[{'model':db['CmCustomField'],'as':_0xe172('0x65')}]})[_0xe172('0x25')](handleEntityNotFound(_0x4aa13e,null))[_0xe172('0x25')](function(_0x44d442){if(_0x44d442){_0x57bac4=_0x44d442;return db[_0xe172('0x5a')]['rawAttributes'];}})[_0xe172('0x25')](function(_0x4c8d04){if(_0x4c8d04){var _0xbe1cf={};var _0x3927ee={};_0x3927ee['model']=_[_0xe172('0x66')](_['keys'](_0x4c8d04),_[_0xe172('0x55')](_0x57bac4[_0xe172('0x65')],function(_0x19d01c){return util['format'](_0xe172('0x67'),_0x19d01c['id']);}));_0x3927ee[_0xe172('0x32')]=_['keys'](_0x1a3e28['query']);_0x3927ee[_0xe172('0x33')]=_[_0xe172('0x34')](_0x3927ee[_0xe172('0x30')],_0x3927ee['query']);_0xbe1cf[_0xe172('0x35')]=_[_0xe172('0x34')](_0x3927ee[_0xe172('0x30')],qs[_0xe172('0x36')](_0x1a3e28[_0xe172('0x32')]['fields']));_0xbe1cf['attributes']=_0xbe1cf['attributes'][_0xe172('0x37')]?_0xbe1cf[_0xe172('0x35')]:_0x3927ee['model'];if(!_0x1a3e28[_0xe172('0x32')][_0xe172('0x38')](_0xe172('0x53'))){_0xbe1cf[_0xe172('0x1f')]=qs[_0xe172('0x1f')](_0x1a3e28[_0xe172('0x32')][_0xe172('0x1f')]);_0xbe1cf[_0xe172('0x1e')]=qs[_0xe172('0x1e')](_0x1a3e28[_0xe172('0x32')][_0xe172('0x1e')]);}_0xbe1cf['order']=qs[_0xe172('0x3a')](_0x1a3e28['query'][_0xe172('0x3a')]);_0xbe1cf['where']=qs[_0xe172('0x33')](_[_0xe172('0x54')](_0x1a3e28['query'],_0x3927ee[_0xe172('0x33')]));_0xbe1cf[_0xe172('0x68')]=!![];if(_0x1a3e28['query']['filter']){_0xbe1cf[_0xe172('0x3b')]=_[_0xe172('0x3c')](_0xbe1cf[_0xe172('0x3b')],{'$or':_[_0xe172('0x55')](_0xbe1cf[_0xe172('0x35')],function(_0x4fbc84){var _0x4100ef={};_0x4100ef[_0x4fbc84]={'$like':'%'+_0x1a3e28[_0xe172('0x32')][_0xe172('0x3f')]+'%'};return _0x4100ef;})});}_0xbe1cf=_[_0xe172('0x3c')]({},_0xbe1cf,_0x1a3e28['options']);return _0x57bac4[_0xe172('0x69')](_0xbe1cf);}})[_0xe172('0x25')](respondWithResult(_0x4aa13e,null))['catch'](handleError(_0x4aa13e,null));};exports['getContactsCsv']=function(_0x28b6b0,_0x5c6a98,_0x20d75c){var _0x5c85a3;return db[_0xe172('0x2e')][_0xe172('0x45')]({'where':{'id':_0x28b6b0[_0xe172('0x43')]['id']},'include':[{'model':db['CmCustomField'],'as':'CustomFields'}]})['then'](handleEntityNotFound(_0x5c6a98,null))['then'](function(_0x22d123){if(_0x22d123){_0x5c85a3=_0x22d123;return db[_0xe172('0x5a')]['rawAttributes'];}})[_0xe172('0x25')](function(_0x386606){if(_0x386606){var _0x2d7695={};var _0x15ad37={};_0x15ad37['model']=_[_0xe172('0x66')](_[_0xe172('0x31')](_0x386606),_[_0xe172('0x55')](_0x5c85a3['CustomFields'],function(_0x50d495){return util[_0xe172('0x6a')](_0xe172('0x67'),_0x50d495['id']);}));_0x15ad37[_0xe172('0x32')]=_[_0xe172('0x31')](_0x28b6b0[_0xe172('0x32')]);_0x15ad37[_0xe172('0x33')]=_[_0xe172('0x34')](_0x15ad37[_0xe172('0x30')],_0x15ad37[_0xe172('0x32')]);_0x2d7695[_0xe172('0x35')]=_['intersection'](_0x15ad37[_0xe172('0x30')],qs['fields'](_0x28b6b0[_0xe172('0x32')][_0xe172('0x36')]));_0x2d7695[_0xe172('0x35')]=_0x2d7695[_0xe172('0x35')]['length']?_0x2d7695[_0xe172('0x35')]:_0x15ad37[_0xe172('0x30')];if(!_0x28b6b0[_0xe172('0x32')][_0xe172('0x38')]('nolimit')){_0x2d7695['limit']=qs[_0xe172('0x1f')](_0x28b6b0[_0xe172('0x32')][_0xe172('0x1f')]);_0x2d7695[_0xe172('0x1e')]=qs[_0xe172('0x1e')](_0x28b6b0['query']['offset']);}_0x2d7695[_0xe172('0x39')]=qs[_0xe172('0x3a')](_0x28b6b0[_0xe172('0x32')][_0xe172('0x3a')]);_0x2d7695[_0xe172('0x3b')]=qs[_0xe172('0x33')](_[_0xe172('0x54')](_0x28b6b0[_0xe172('0x32')],_0x15ad37[_0xe172('0x33')]));_0x2d7695[_0xe172('0x68')]=!![];if(_0x28b6b0[_0xe172('0x32')][_0xe172('0x3f')]){_0x2d7695[_0xe172('0x3b')]=_['merge'](_0x2d7695[_0xe172('0x3b')],{'$or':_[_0xe172('0x55')](_0x2d7695['attributes'],function(_0x4eca33){var _0x13e137={};_0x13e137[_0x4eca33]={'$like':'%'+_0x28b6b0['query']['filter']+'%'};return _0x13e137;})});}_0x2d7695=_[_0xe172('0x3c')]({},_0x2d7695,_0x28b6b0['options']);return _0x5c85a3[_0xe172('0x69')](_0x2d7695);}})[_0xe172('0x25')](function(_0x41f8ea){if(!_[_0xe172('0x6b')](_0x41f8ea)){var _0x4c2881=toCsv(_0x41f8ea);var _0x8f0847=Date[_0xe172('0x6c')]();fs[_0xe172('0x6d')](util['format'](_0xe172('0x6e'),_0x5c85a3['id'],_0x8f0847),_0x4c2881);_0x5c6a98[_0xe172('0x6f')](_0xe172('0x70'),'attachment;\x20filename='+util[_0xe172('0x6a')]('list_%d_%s.csv',_0x5c85a3['id'],_0x8f0847));_0x5c6a98[_0xe172('0x6f')](_0xe172('0x71'),'text/csv');return _0x5c6a98[_0xe172('0x72')](util[_0xe172('0x6a')](_0xe172('0x6e'),_0x5c85a3['id'],_0x8f0847));}else{return _0x5c6a98[_0xe172('0x19')](0xcc);}})['catch'](handleError(_0x5c6a98,null));};exports[_0xe172('0x73')]=function(_0x20d8a3,_0x3b68cf,_0x3bf935){var _0x3339e2;delete _0x20d8a3[_0xe172('0x48')]['id'];return db[_0xe172('0x2e')][_0xe172('0x52')]({'where':{'id':_0x20d8a3[_0xe172('0x43')]['id']}})['then'](handleEntityNotFound(_0x3b68cf,null))[_0xe172('0x25')](function(_0x6ebc93){if(_0x6ebc93){return db[_0xe172('0x74')][_0xe172('0x75')](function(_0x41f26e){return db[_0xe172('0x76')][_0xe172('0x47')](_0x20d8a3['body'],{'transaction':_0x41f26e})['then'](function(_0x12e43a){_0x3339e2=_0x12e43a;return _0x6ebc93[_0xe172('0x77')](_0x12e43a,{'transaction':_0x41f26e});})[_0xe172('0x25')](function(){var _0x44e917={'type':db[_0xe172('0x78')][_0xe172('0x79')],'transaction':_0x41f26e};switch(_0x20d8a3[_0xe172('0x48')]['type']){case _0xe172('0x7a'):_0x44e917[_0xe172('0x3d')]=db['Sequelize'][_0xe172('0x79')];break;case _0xe172('0x7b'):_0x44e917['type']=db[_0xe172('0x78')][_0xe172('0x7c')];break;case'switch':_0x44e917[_0xe172('0x3d')]=db[_0xe172('0x78')][_0xe172('0x7d')];_0x44e917[_0xe172('0x7e')]=![];break;default:}return db['sequelize'][_0xe172('0x7f')][_0xe172('0x80')](_0xe172('0x81'),util[_0xe172('0x6a')](_0xe172('0x82'),_0x3339e2['id']),_0x44e917);})[_0xe172('0x25')](function(){return _0x3339e2;});});}})['then'](respondWithResult(_0x3b68cf,null))[_0xe172('0x46')](handleError(_0x3b68cf,null));};exports[_0xe172('0x83')]=function(_0x2b1587,_0x3a5a24,_0x304301){var _0xe20bcc={};var _0x354221={};var _0x18803d;var _0x55af0a;return db['CmList'][_0xe172('0x52')]({'where':{'id':_0x2b1587[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x3a5a24,null))[_0xe172('0x25')](function(_0x12c4aa){if(_0x12c4aa){_0x18803d=_0x12c4aa;_0x354221[_0xe172('0x30')]=_['keys'](db[_0xe172('0x76')][_0xe172('0x2f')]);_0x354221[_0xe172('0x32')]=_[_0xe172('0x31')](_0x2b1587[_0xe172('0x32')]);_0x354221[_0xe172('0x33')]=_[_0xe172('0x34')](_0x354221[_0xe172('0x30')],_0x354221['query']);_0xe20bcc[_0xe172('0x35')]=_[_0xe172('0x34')](_0x354221['model'],qs[_0xe172('0x36')](_0x2b1587[_0xe172('0x32')][_0xe172('0x36')]));_0xe20bcc[_0xe172('0x35')]=_0xe20bcc[_0xe172('0x35')]['length']?_0xe20bcc['attributes']:_0x354221[_0xe172('0x30')];_0xe20bcc[_0xe172('0x39')]=qs[_0xe172('0x3a')](_0x2b1587[_0xe172('0x32')][_0xe172('0x3a')]);_0xe20bcc[_0xe172('0x3b')]=qs[_0xe172('0x33')](_['pick'](_0x2b1587['query'],_0x354221['filters']));_0xe20bcc[_0xe172('0x3b')]=_[_0xe172('0x3c')](_0xe20bcc['where'],{'$or':[{'ListId':_0x12c4aa['id']},{'ListId':null}]});if(_0x2b1587['query'][_0xe172('0x3f')]){_0xe20bcc[_0xe172('0x3b')]=_[_0xe172('0x3c')](_0xe20bcc['where'],{'$or':_[_0xe172('0x55')](_0xe20bcc[_0xe172('0x35')],function(_0x3c8baf){var _0xc6ef5a={};_0xc6ef5a[_0x3c8baf]={'$like':'%'+_0x2b1587['query'][_0xe172('0x3f')]+'%'};return _0xc6ef5a;})});}_0xe20bcc=_[_0xe172('0x3c')]({},_0xe20bcc,_0x2b1587[_0xe172('0x44')]);return db[_0xe172('0x76')][_0xe172('0x84')](_0xe20bcc);}})[_0xe172('0x25')](respondWithResult(_0x3a5a24,null))['catch'](handleError(_0x3a5a24,null));};exports[_0xe172('0x85')]=function(_0x4b29ba,_0x1195a8,_0xbcac17){return db[_0xe172('0x2e')][_0xe172('0x45')]({'where':{'id':_0x4b29ba[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x1195a8,null))[_0xe172('0x25')](function(_0x4b16d2){if(_0x4b16d2){return _0x4b16d2['addAgents'](_0x4b29ba[_0xe172('0x48')][_0xe172('0x58')],_[_0xe172('0x86')](_0x4b29ba[_0xe172('0x48')],[_0xe172('0x58'),'id'])||{})[_0xe172('0x87')](function(_0x1f2c1e){for(var _0x5b69f2=0x0;_0x5b69f2<_0x4b29ba['body'][_0xe172('0x58')][_0xe172('0x37')];_0x5b69f2+=0x1){socket[_0xe172('0x88')](_0xe172('0x89'),{'UserId':_0x4b29ba[_0xe172('0x48')]['ids'][_0x5b69f2],'CmListId':_0x4b29ba[_0xe172('0x43')]['id']});}return _0x1f2c1e;});}})['then'](respondWithResult(_0x1195a8,null))[_0xe172('0x46')](handleError(_0x1195a8,null));};exports[_0xe172('0x8a')]=function(_0xb22f3a,_0x380cd9,_0xf19a45){return db['CmList']['find']({'where':{'id':_0xb22f3a[_0xe172('0x43')]['id']}})[_0xe172('0x25')](handleEntityNotFound(_0x380cd9,null))['then'](function(_0x39ba84){if(_0x39ba84){return _0x39ba84[_0xe172('0x8a')](_0xb22f3a[_0xe172('0x32')]['ids'])['then'](function(){if(_[_0xe172('0x5c')](_0xb22f3a['query'][_0xe172('0x58')])){for(var _0x4f45ef=0x0;_0x4f45ef<_0xb22f3a[_0xe172('0x32')][_0xe172('0x58')]['length'];_0x4f45ef+=0x1){socket[_0xe172('0x88')]('userCmList:remove',{'UserId':Number(_0xb22f3a[_0xe172('0x32')]['ids'][_0x4f45ef]),'CmListId':Number(_0xb22f3a['params']['id'])});}}else{socket[_0xe172('0x88')](_0xe172('0x8b'),{'UserId':Number(_0xb22f3a['query']['ids']),'CmListId':Number(_0xb22f3a[_0xe172('0x43')]['id'])});}});}})[_0xe172('0x25')](respondWithStatusCode(_0x380cd9,null))[_0xe172('0x46')](handleError(_0x380cd9,null));};exports[_0xe172('0x8c')]=function(_0x354380,_0x362b64,_0x36cb38){var _0x17b5fe={};var _0x55ef05={};var _0x19ccfb;var _0x326a54;return db[_0xe172('0x2e')][_0xe172('0x52')]({'where':{'id':_0x354380[_0xe172('0x43')]['id']}})['then'](handleEntityNotFound(_0x362b64,null))[_0xe172('0x25')](function(_0x2afd65){if(_0x2afd65){_0x19ccfb=_0x2afd65;_0x55ef05[_0xe172('0x30')]=_[_0xe172('0x31')](db[_0xe172('0x8d')][_0xe172('0x2f')]);_0x55ef05[_0xe172('0x32')]=_[_0xe172('0x31')](_0x354380[_0xe172('0x32')]);_0x55ef05[_0xe172('0x33')]=_['intersection'](_0x55ef05[_0xe172('0x30')],_0x55ef05[_0xe172('0x32')]);_0x17b5fe[_0xe172('0x35')]=_[_0xe172('0x34')](_0x55ef05[_0xe172('0x30')],qs[_0xe172('0x36')](_0x354380[_0xe172('0x32')][_0xe172('0x36')]));_0x17b5fe[_0xe172('0x35')]=_0x17b5fe[_0xe172('0x35')][_0xe172('0x37')]?_0x17b5fe['attributes']:_0x55ef05['model'];_0x17b5fe['order']=qs[_0xe172('0x3a')](_0x354380[_0xe172('0x32')]['sort']);_0x17b5fe['where']=qs[_0xe172('0x33')](_[_0xe172('0x54')](_0x354380[_0xe172('0x32')],_0x55ef05[_0xe172('0x33')]));if(_0x354380[_0xe172('0x32')][_0xe172('0x3f')]){_0x17b5fe[_0xe172('0x3b')]=_[_0xe172('0x3c')](_0x17b5fe[_0xe172('0x3b')],{'$or':_[_0xe172('0x55')](_0x17b5fe['attributes'],function(_0xd1da4f){var _0x3edb5b={};_0x3edb5b[_0xd1da4f]={'$like':'%'+_0x354380['query'][_0xe172('0x3f')]+'%'};return _0x3edb5b;})});}_0x17b5fe=_[_0xe172('0x3c')]({},_0x17b5fe,_0x354380[_0xe172('0x44')]);return _0x19ccfb[_0xe172('0x8c')](_0x17b5fe);}})['then'](function(_0x1cdd3f){if(_0x1cdd3f){_0x326a54=_0x1cdd3f[_0xe172('0x37')];if(!_0x354380[_0xe172('0x32')][_0xe172('0x38')](_0xe172('0x53'))){_0x17b5fe[_0xe172('0x1f')]=qs[_0xe172('0x1f')](_0x354380[_0xe172('0x32')]['limit']);_0x17b5fe[_0xe172('0x1e')]=qs['offset'](_0x354380[_0xe172('0x32')][_0xe172('0x1e')]);}return _0x19ccfb['getAgents'](_0x17b5fe);}})['then'](function(_0xd5885c){if(_0xd5885c){return _0xd5885c?{'count':_0x326a54,'rows':_0xd5885c}:null;}})[_0xe172('0x25')](respondWithResult(_0x362b64,null))[_0xe172('0x46')](handleError(_0x362b64,null));};
\ No newline at end of file
diff --git a/server/api/cmList/cmList.events.js b/server/api/cmList/cmList.events.js
index 31e28a8..f483188 100644
--- a/server/api/cmList/cmList.events.js
+++ b/server/api/cmList/cmList.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1cef=['update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','CmList','setMaxListeners'];(function(_0xb33c66,_0x4d2507){var _0x5c9349=function(_0x5af4e3){while(--_0x5af4e3){_0xb33c66['push'](_0xb33c66['shift']());}};_0x5c9349(++_0x4d2507);}(_0x1cef,0x141));var _0xf1ce=function(_0x4ea69d,_0x290f53){_0x4ea69d=_0x4ea69d-0x0;var _0x5318e0=_0x1cef[_0x4ea69d];return _0x5318e0;};'use strict';var EventEmitter=require('events');var CmList=require(_0xf1ce('0x0'))['db'][_0xf1ce('0x1')];var CmListEvents=new EventEmitter();CmListEvents[_0xf1ce('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf1ce('0x3'),'afterDestroy':_0xf1ce('0x4')};function emitEvent(_0xbef0e8){return function(_0x4796dd,_0x17c50b,_0x1c4091){CmListEvents[_0xf1ce('0x5')](_0xbef0e8+':'+_0x4796dd['id'],_0x4796dd);CmListEvents[_0xf1ce('0x5')](_0xbef0e8,_0x4796dd);_0x1c4091(null);};}for(var e in events){if(events[_0xf1ce('0x6')](e)){var event=events[e];CmList[_0xf1ce('0x7')](e,emitEvent(event));}}module[_0xf1ce('0x8')]=CmListEvents;
\ No newline at end of file
+var _0xaa28=['update','remove','emit','hook','exports','../../mysqldb','CmList','save'];(function(_0x5b6589,_0x1fd9f0){var _0x1eb149=function(_0x3aa2af){while(--_0x3aa2af){_0x5b6589['push'](_0x5b6589['shift']());}};_0x1eb149(++_0x1fd9f0);}(_0xaa28,0x135));var _0x8aa2=function(_0x18cac4,_0x57a4d5){_0x18cac4=_0x18cac4-0x0;var _0x2227c6=_0xaa28[_0x18cac4];return _0x2227c6;};'use strict';var EventEmitter=require('events');var CmList=require(_0x8aa2('0x0'))['db'][_0x8aa2('0x1')];var CmListEvents=new EventEmitter();CmListEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x8aa2('0x2'),'afterUpdate':_0x8aa2('0x3'),'afterDestroy':_0x8aa2('0x4')};function emitEvent(_0x29e366){return function(_0x25482f,_0x542dfb,_0x29ee30){CmListEvents[_0x8aa2('0x5')](_0x29e366+':'+_0x25482f['id'],_0x25482f);CmListEvents['emit'](_0x29e366,_0x25482f);_0x29ee30(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];CmList[_0x8aa2('0x6')](e,emitEvent(event));}}module[_0x8aa2('0x7')]=CmListEvents;
\ No newline at end of file
diff --git a/server/api/cmList/cmList.model.js b/server/api/cmList/cmList.model.js
index e59b593..d082013 100644
--- a/server/api/cmList/cmList.model.js
+++ b/server/api/cmList/cmList.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2bbb=['cm_lists','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./cmList.attributes','CmList'];(function(_0x131e22,_0x1a279f){var _0x378dc5=function(_0x13ebbf){while(--_0x13ebbf){_0x131e22['push'](_0x131e22['shift']());}};_0x378dc5(++_0x1a279f);}(_0x2bbb,0x85));var _0xb2bb=function(_0x3dfbae,_0x14ed4b){_0x3dfbae=_0x3dfbae-0x0;var _0xae6c18=_0x2bbb[_0x3dfbae];return _0xae6c18;};'use strict';var _=require('lodash');var util=require(_0xb2bb('0x0'));var logger=require(_0xb2bb('0x1'))(_0xb2bb('0x2'));var moment=require('moment');var BPromise=require(_0xb2bb('0x3'));var rp=require(_0xb2bb('0x4'));var fs=require('fs');var path=require(_0xb2bb('0x5'));var rimraf=require(_0xb2bb('0x6'));var config=require(_0xb2bb('0x7'));var attributes=require(_0xb2bb('0x8'));module['exports']=function(_0x3581e2,_0x5bee47){return _0x3581e2['define'](_0xb2bb('0x9'),attributes,{'tableName':_0xb2bb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0e35=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','CmList','cm_lists','lodash'];(function(_0x24cc79,_0x3ec5be){var _0x856ac7=function(_0x32c7dc){while(--_0x32c7dc){_0x24cc79['push'](_0x24cc79['shift']());}};_0x856ac7(++_0x3ec5be);}(_0x0e35,0xc2));var _0x50e3=function(_0x17097e,_0x2594cf){_0x17097e=_0x17097e-0x0;var _0x72b5ac=_0x0e35[_0x17097e];return _0x72b5ac;};'use strict';var _=require(_0x50e3('0x0'));var util=require(_0x50e3('0x1'));var logger=require(_0x50e3('0x2'))(_0x50e3('0x3'));var moment=require(_0x50e3('0x4'));var BPromise=require(_0x50e3('0x5'));var rp=require(_0x50e3('0x6'));var fs=require('fs');var path=require(_0x50e3('0x7'));var rimraf=require(_0x50e3('0x8'));var config=require(_0x50e3('0x9'));var attributes=require('./cmList.attributes');module[_0x50e3('0xa')]=function(_0x35e2b1,_0x47c955){return _0x35e2b1['define'](_0x50e3('0xb'),attributes,{'tableName':_0x50e3('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmList/cmList.rpc.js b/server/api/cmList/cmList.rpc.js
index 0b61b63..376d2f6 100644
--- a/server/api/cmList/cmList.rpc.js
+++ b/server/api/cmList/cmList.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8b7b=['CmList,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','socket.io-emitter','./cmList.socket','register','request','then','info','CmList,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x2553c8,_0x2282f5){var _0xdf2938=function(_0x56ba80){while(--_0x56ba80){_0x2553c8['push'](_0x2553c8['shift']());}};_0xdf2938(++_0x2282f5);}(_0x8b7b,0x1c9));var _0xb8b7=function(_0x154611,_0x5b1db3){_0x154611=_0x154611-0x0;var _0x144127=_0x8b7b[_0x154611];return _0x144127;};'use strict';var _=require(_0xb8b7('0x0'));var util=require(_0xb8b7('0x1'));var moment=require(_0xb8b7('0x2'));var BPromise=require('bluebird');var rs=require(_0xb8b7('0x3'));var fs=require('fs');var Redis=require(_0xb8b7('0x4'));var db=require(_0xb8b7('0x5'))['db'];var utils=require(_0xb8b7('0x6'));var logger=require(_0xb8b7('0x7'))(_0xb8b7('0x8'));var config=require('../../config/environment');var jayson=require(_0xb8b7('0x9'));var client=jayson[_0xb8b7('0xa')][_0xb8b7('0xb')]({'port':0x232a});config[_0xb8b7('0xc')]=_['defaults'](config[_0xb8b7('0xc')],{'host':_0xb8b7('0xd'),'port':0x18eb});var socket=require(_0xb8b7('0xe'))(new Redis(config['redis']));require(_0xb8b7('0xf'))[_0xb8b7('0x10')](socket);function respondWithRpcPromise(_0x3a194b,_0x35e70a,_0x1c94c3){return new BPromise(function(_0x41bb88,_0x204ba3){return client[_0xb8b7('0x11')](_0x3a194b,_0x1c94c3)[_0xb8b7('0x12')](function(_0x2803fe){logger[_0xb8b7('0x13')](_0xb8b7('0x14'),_0x35e70a,_0xb8b7('0x15'));logger[_0xb8b7('0x16')](_0xb8b7('0x17'),_0x35e70a,_0xb8b7('0x15'),JSON[_0xb8b7('0x18')](_0x2803fe));if(_0x2803fe[_0xb8b7('0x19')]){if(_0x2803fe[_0xb8b7('0x19')][_0xb8b7('0x1a')]===0x1f4){logger[_0xb8b7('0x19')](_0xb8b7('0x14'),_0x35e70a,_0x2803fe[_0xb8b7('0x19')][_0xb8b7('0x1b')]);return _0x204ba3(_0x2803fe[_0xb8b7('0x19')][_0xb8b7('0x1b')]);}logger[_0xb8b7('0x19')](_0xb8b7('0x14'),_0x35e70a,_0x2803fe[_0xb8b7('0x19')]['message']);return _0x41bb88(_0x2803fe['error']['message']);}else{logger[_0xb8b7('0x13')](_0xb8b7('0x14'),_0x35e70a,_0xb8b7('0x15'));_0x41bb88(_0x2803fe[_0xb8b7('0x1c')][_0xb8b7('0x1b')]);}})[_0xb8b7('0x1d')](function(_0x594f94){logger[_0xb8b7('0x19')]('CmList,\x20%s,\x20%s',_0x35e70a,_0x594f94);_0x204ba3(_0x594f94);});});}
\ No newline at end of file
+var _0x25f7=['../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./cmList.socket','register','request','CmList,\x20%s,\x20%s','request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1d211b,_0x475f3b){var _0x47c88b=function(_0x3126f5){while(--_0x3126f5){_0x1d211b['push'](_0x1d211b['shift']());}};_0x47c88b(++_0x475f3b);}(_0x25f7,0x165));var _0x725f=function(_0x13252b,_0x58f9f0){_0x13252b=_0x13252b-0x0;var _0x5dd995=_0x25f7[_0x13252b];return _0x5dd995;};'use strict';var _=require(_0x725f('0x0'));var util=require(_0x725f('0x1'));var moment=require(_0x725f('0x2'));var BPromise=require(_0x725f('0x3'));var rs=require(_0x725f('0x4'));var fs=require('fs');var Redis=require(_0x725f('0x5'));var db=require(_0x725f('0x6'))['db'];var utils=require(_0x725f('0x7'));var logger=require(_0x725f('0x8'))(_0x725f('0x9'));var config=require('../../config/environment');var jayson=require(_0x725f('0xa'));var client=jayson[_0x725f('0xb')]['http']({'port':0x232a});config[_0x725f('0xc')]=_[_0x725f('0xd')](config[_0x725f('0xc')],{'host':_0x725f('0xe'),'port':0x18eb});var socket=require(_0x725f('0xf'))(new Redis(config[_0x725f('0xc')]));require(_0x725f('0x10'))[_0x725f('0x11')](socket);function respondWithRpcPromise(_0x3fca93,_0x104261,_0x32c171){return new BPromise(function(_0x76e2e,_0x129107){return client[_0x725f('0x12')](_0x3fca93,_0x32c171)['then'](function(_0x5437a6){logger['info'](_0x725f('0x13'),_0x104261,_0x725f('0x14'));logger[_0x725f('0x15')](_0x725f('0x16'),_0x104261,'request\x20sent',JSON[_0x725f('0x17')](_0x5437a6));if(_0x5437a6[_0x725f('0x18')]){if(_0x5437a6['error']['code']===0x1f4){logger[_0x725f('0x18')](_0x725f('0x13'),_0x104261,_0x5437a6[_0x725f('0x18')][_0x725f('0x19')]);return _0x129107(_0x5437a6[_0x725f('0x18')][_0x725f('0x19')]);}logger[_0x725f('0x18')](_0x725f('0x13'),_0x104261,_0x5437a6[_0x725f('0x18')]['message']);return _0x76e2e(_0x5437a6[_0x725f('0x18')][_0x725f('0x19')]);}else{logger[_0x725f('0x1a')](_0x725f('0x13'),_0x104261,_0x725f('0x14'));_0x76e2e(_0x5437a6[_0x725f('0x1b')][_0x725f('0x19')]);}})['catch'](function(_0x8a53a){logger[_0x725f('0x18')](_0x725f('0x13'),_0x104261,_0x8a53a);_0x129107(_0x8a53a);});});}
\ No newline at end of file
diff --git a/server/api/cmList/cmList.socket.js b/server/api/cmList/cmList.socket.js
index 5e3f6a9..d52db9b 100644
--- a/server/api/cmList/cmList.socket.js
+++ b/server/api/cmList/cmList.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2781=['./cmList.events','save','remove','update','emit','register'];(function(_0x7a277b,_0x32c9cb){var _0x5603b2=function(_0x5f571c){while(--_0x5f571c){_0x7a277b['push'](_0x7a277b['shift']());}};_0x5603b2(++_0x32c9cb);}(_0x2781,0xe4));var _0x1278=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x2781[_0x8c43de];return _0xa6591b;};'use strict';var CmListEvents=require(_0x1278('0x0'));var events=[_0x1278('0x1'),_0x1278('0x2'),_0x1278('0x3')];function createListener(_0x230714,_0x3d207d){return function(_0x104be9){_0x3d207d[_0x1278('0x4')](_0x230714,_0x104be9);};}function removeListener(_0x1ef54c,_0x102fd4){return function(){CmListEvents['removeListener'](_0x1ef54c,_0x102fd4);};}exports[_0x1278('0x5')]=function(_0x216adf){for(var _0x5646b6=0x0,_0x387240=events['length'];_0x5646b6<_0x387240;_0x5646b6++){var _0x2b3476=events[_0x5646b6];var _0x31afae=createListener('cmList:'+_0x2b3476,_0x216adf);CmListEvents['on'](_0x2b3476,_0x31afae);}};
\ No newline at end of file
+var _0x6758=['save','remove','update','emit','removeListener','cmList:'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0x6758,0x1b6));var _0x8675=function(_0x468ff7,_0x594519){_0x468ff7=_0x468ff7-0x0;var _0x4eada2=_0x6758[_0x468ff7];return _0x4eada2;};'use strict';var CmListEvents=require('./cmList.events');var events=[_0x8675('0x0'),_0x8675('0x1'),_0x8675('0x2')];function createListener(_0x517844,_0x3e6df1){return function(_0xfb9987){_0x3e6df1[_0x8675('0x3')](_0x517844,_0xfb9987);};}function removeListener(_0x418c0f,_0x1949b0){return function(){CmListEvents[_0x8675('0x4')](_0x418c0f,_0x1949b0);};}exports['register']=function(_0x3ae273){for(var _0x5005fd=0x0,_0x4660d8=events['length'];_0x5005fd<_0x4660d8;_0x5005fd++){var _0x18f86c=events[_0x5005fd];var _0x477851=createListener(_0x8675('0x5')+_0x18f86c,_0x3ae273);CmListEvents['on'](_0x18f86c,_0x477851);}};
\ No newline at end of file
diff --git a/server/api/cmList/index.js b/server/api/cmList/index.js
index 4c7a670..3cf384e 100644
--- a/server/api/cmList/index.js
+++ b/server/api/cmList/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xca19=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./cmList.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/dispositions','/:id/contacts','getContacts','/:id/contacts/csv','getContactsCsv','/:id/fields','getCustomFields','/:id/users','getAgents','post','addDisposition','addContacts','addCustomField','put','delete','destroy','removeDispositions','removeAgents','exports','multer','util'];(function(_0x36eb7f,_0x57dca4){var _0x50023b=function(_0x58e7f2){while(--_0x58e7f2){_0x36eb7f['push'](_0x36eb7f['shift']());}};_0x50023b(++_0x57dca4);}(_0xca19,0x10e));var _0x9ca1=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xca19[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x9ca1('0x0'));var util=require(_0x9ca1('0x1'));var path=require(_0x9ca1('0x2'));var timeout=require(_0x9ca1('0x3'));var express=require(_0x9ca1('0x4'));var router=express[_0x9ca1('0x5')]();var auth=require(_0x9ca1('0x6'));var interaction=require(_0x9ca1('0x7'));var config=require('../../config/environment');var controller=require(_0x9ca1('0x8'));router[_0x9ca1('0x9')]('/',auth[_0x9ca1('0xa')](),controller[_0x9ca1('0xb')]);router['get'](_0x9ca1('0xc'),auth['isAuthenticated'](),controller['describe']);router[_0x9ca1('0x9')](_0x9ca1('0xd'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0xe')]);router[_0x9ca1('0x9')](_0x9ca1('0xf'),auth[_0x9ca1('0xa')](),controller['getDispositions']);router[_0x9ca1('0x9')](_0x9ca1('0x10'),auth['isAuthenticated'](),controller[_0x9ca1('0x11')]);router['get'](_0x9ca1('0x12'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x13')]);router[_0x9ca1('0x9')](_0x9ca1('0x14'),auth['isAuthenticated'](),controller[_0x9ca1('0x15')]);router[_0x9ca1('0x9')](_0x9ca1('0x16'),auth['isAuthenticated'](),controller[_0x9ca1('0x17')]);router[_0x9ca1('0x18')]('/',auth[_0x9ca1('0xa')](),controller['create']);router[_0x9ca1('0x18')](_0x9ca1('0xf'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x19')]);router['post'](_0x9ca1('0x10'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x1a')]);router[_0x9ca1('0x18')](_0x9ca1('0x14'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x1b')]);router['post']('/:id/users',auth[_0x9ca1('0xa')](),controller['addAgents']);router[_0x9ca1('0x1c')](_0x9ca1('0xd'),auth[_0x9ca1('0xa')](),controller['update']);router[_0x9ca1('0x1d')](_0x9ca1('0xd'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x1e')]);router[_0x9ca1('0x1d')](_0x9ca1('0xf'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x1f')]);router[_0x9ca1('0x1d')](_0x9ca1('0x16'),auth[_0x9ca1('0xa')](),controller[_0x9ca1('0x20')]);module[_0x9ca1('0x21')]=router;
\ No newline at end of file
+var _0x4384=['delete','destroy','removeDispositions','removeAgents','exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmList.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/contacts','/:id/contacts/csv','getCustomFields','create','post','/:id/dispositions','addDisposition','addContacts','addCustomField','/:id/users','addAgents','put','update'];(function(_0x2366fc,_0x2468d4){var _0xb65077=function(_0x585ba3){while(--_0x585ba3){_0x2366fc['push'](_0x2366fc['shift']());}};_0xb65077(++_0x2468d4);}(_0x4384,0x1e5));var _0x4438=function(_0x211c5a,_0x50492a){_0x211c5a=_0x211c5a-0x0;var _0x2d0cd9=_0x4384[_0x211c5a];return _0x2d0cd9;};'use strict';var multer=require(_0x4438('0x0'));var util=require('util');var path=require(_0x4438('0x1'));var timeout=require(_0x4438('0x2'));var express=require('express');var router=express[_0x4438('0x3')]();var auth=require(_0x4438('0x4'));var interaction=require(_0x4438('0x5'));var config=require(_0x4438('0x6'));var controller=require(_0x4438('0x7'));router[_0x4438('0x8')]('/',auth[_0x4438('0x9')](),controller[_0x4438('0xa')]);router[_0x4438('0x8')](_0x4438('0xb'),auth[_0x4438('0x9')](),controller[_0x4438('0xc')]);router[_0x4438('0x8')](_0x4438('0xd'),auth[_0x4438('0x9')](),controller['show']);router[_0x4438('0x8')]('/:id/dispositions',auth[_0x4438('0x9')](),controller['getDispositions']);router[_0x4438('0x8')](_0x4438('0xe'),auth['isAuthenticated'](),controller['getContacts']);router[_0x4438('0x8')](_0x4438('0xf'),auth[_0x4438('0x9')](),controller['getContactsCsv']);router[_0x4438('0x8')]('/:id/fields',auth[_0x4438('0x9')](),controller[_0x4438('0x10')]);router['get']('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router['post']('/',auth[_0x4438('0x9')](),controller[_0x4438('0x11')]);router[_0x4438('0x12')](_0x4438('0x13'),auth[_0x4438('0x9')](),controller[_0x4438('0x14')]);router[_0x4438('0x12')]('/:id/contacts',auth['isAuthenticated'](),controller[_0x4438('0x15')]);router['post']('/:id/fields',auth[_0x4438('0x9')](),controller[_0x4438('0x16')]);router['post'](_0x4438('0x17'),auth[_0x4438('0x9')](),controller[_0x4438('0x18')]);router[_0x4438('0x19')](_0x4438('0xd'),auth[_0x4438('0x9')](),controller[_0x4438('0x1a')]);router[_0x4438('0x1b')](_0x4438('0xd'),auth[_0x4438('0x9')](),controller[_0x4438('0x1c')]);router[_0x4438('0x1b')](_0x4438('0x13'),auth['isAuthenticated'](),controller[_0x4438('0x1d')]);router['delete']('/:id/users',auth[_0x4438('0x9')](),controller[_0x4438('0x1e')]);module[_0x4438('0x1f')]=router;
\ No newline at end of file
diff --git a/server/api/condition/condition.attributes.js b/server/api/condition/condition.attributes.js
index e5f71fb..1f70e52 100644
--- a/server/api/condition/condition.attributes.js
+++ b/server/api/condition/condition.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4f06=['getDataValue','STRING','sequelize'];(function(_0x170772,_0x1f1ee7){var _0x3ef69c=function(_0x4cde12){while(--_0x4cde12){_0x170772['push'](_0x170772['shift']());}};_0x3ef69c(++_0x1f1ee7);}(_0x4f06,0x83));var _0x64f0=function(_0x16433e,_0x353748){_0x16433e=_0x16433e-0x0;var _0x5b07d3=_0x4f06[_0x16433e];return _0x5b07d3;};'use strict';var Sequelize=require(_0x64f0('0x0'));module['exports']={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x33d887){return this[_0x64f0('0x1')]('field');}},'field':{'type':Sequelize['STRING'],'allowNull':![]},'operator':{'type':Sequelize[_0x64f0('0x2')],'allowNull':![]},'value':{'type':Sequelize[_0x64f0('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x46b1=['exports','VIRTUAL','getDataValue','field','STRING','sequelize'];(function(_0x393db8,_0x3e1157){var _0x4295cc=function(_0x59aaf2){while(--_0x59aaf2){_0x393db8['push'](_0x393db8['shift']());}};_0x4295cc(++_0x3e1157);}(_0x46b1,0x143));var _0x146b=function(_0x2d64fc,_0x42b2a7){_0x2d64fc=_0x2d64fc-0x0;var _0x2c8556=_0x46b1[_0x2d64fc];return _0x2c8556;};'use strict';var Sequelize=require(_0x146b('0x0'));module[_0x146b('0x1')]={'name':{'type':Sequelize[_0x146b('0x2')],'get':function(_0x591384){return this[_0x146b('0x3')](_0x146b('0x4'));}},'field':{'type':Sequelize[_0x146b('0x5')],'allowNull':![]},'operator':{'type':Sequelize[_0x146b('0x5')],'allowNull':![]},'value':{'type':Sequelize[_0x146b('0x5')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/condition/condition.controller.js b/server/api/condition/condition.controller.js
index df77e50..6956353 100644
--- a/server/api/condition/condition.controller.js
+++ b/server/api/condition/condition.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9d9=['count','offset','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','body','Condition','find','params','catch','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json'];(function(_0x39bfb6,_0x4272c8){var _0x23fef9=function(_0x5f83c1){while(--_0x5f83c1){_0x39bfb6['push'](_0x39bfb6['shift']());}};_0x23fef9(++_0x4272c8);}(_0xa9d9,0x15b));var _0x9a9d=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0xa9d9[_0xbca1b1];return _0x4e1686;};'use strict';var pdf=require(_0x9a9d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x9a9d('0x1'));var zipdir=require(_0x9a9d('0x2'));var jsonpatch=require(_0x9a9d('0x3'));var rp=require(_0x9a9d('0x4'));var moment=require(_0x9a9d('0x5'));var BPromise=require(_0x9a9d('0x6'));var Mustache=require('mustache');var util=require(_0x9a9d('0x7'));var path=require(_0x9a9d('0x8'));var sox=require(_0x9a9d('0x9'));var csv=require('to-csv');var ejs=require(_0x9a9d('0xa'));var fs=require('fs');var _=require(_0x9a9d('0xb'));var squel=require('squel');var crypto=require(_0x9a9d('0xc'));var jsforce=require(_0x9a9d('0xd'));var deskjs=require(_0x9a9d('0xe'));var toCsv=require(_0x9a9d('0xf'));var querystring=require('querystring');var Papa=require(_0x9a9d('0x10'));var Redis=require(_0x9a9d('0x11'));var authService=require(_0x9a9d('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x9a9d('0x13'));var logger=require(_0x9a9d('0x14'))(_0x9a9d('0x15'));var utils=require(_0x9a9d('0x16'));var config=require(_0x9a9d('0x17'));var db=require(_0x9a9d('0x18'))['db'];function respondWithStatusCode(_0x103463,_0x311a2b){_0x311a2b=_0x311a2b||0xcc;return function(_0x5ba37e){if(_0x5ba37e){return _0x103463[_0x9a9d('0x19')](_0x311a2b);}return _0x103463['status'](_0x311a2b)[_0x9a9d('0x1a')]();};}function respondWithResult(_0x4003af,_0x597709){_0x597709=_0x597709||0xc8;return function(_0x350d72){if(_0x350d72){return _0x4003af[_0x9a9d('0x1b')](_0x597709)[_0x9a9d('0x1c')](_0x350d72);}};}function respondWithFilteredResult(_0x588ff7,_0x2f3e31){return function(_0x3140ab){if(_0x3140ab){var _0x13afa8=_0x3140ab[_0x9a9d('0x1d')],_0x5d349e=_0x2f3e31[_0x9a9d('0x1e')],_0x4ece22=_0x2f3e31['offset']+_0x2f3e31[_0x9a9d('0x1f')],_0x4dc2e5;if(_0x4ece22>=_0x13afa8){_0x4ece22=_0x13afa8;_0x4dc2e5=0xc8;}else{_0x4dc2e5=0xce;}_0x588ff7[_0x9a9d('0x1b')](_0x4dc2e5);return _0x588ff7[_0x9a9d('0x20')](_0x9a9d('0x21'),_0x5d349e+'-'+_0x4ece22+'/'+_0x13afa8)[_0x9a9d('0x1c')](_0x3140ab);}return null;};}function patchUpdates(_0x44ae7f){return function(_0x36b1f4){try{jsonpatch['apply'](_0x36b1f4,_0x44ae7f,!![]);}catch(_0x54f661){return BPromise[_0x9a9d('0x22')](_0x54f661);}return _0x36b1f4[_0x9a9d('0x23')]();};}function saveUpdates(_0x362bd8,_0x448b88){return function(_0x53498a){if(_0x53498a){return _0x53498a[_0x9a9d('0x24')](_0x362bd8)[_0x9a9d('0x25')](function(_0x410f97){return _0x410f97;});}return null;};}function removeEntity(_0x4d7401,_0xb5429){return function(_0x32c711){if(_0x32c711){return _0x32c711[_0x9a9d('0x26')]()[_0x9a9d('0x25')](function(){_0x4d7401[_0x9a9d('0x1b')](0xcc)[_0x9a9d('0x1a')]();});}};}function handleEntityNotFound(_0x15e897,_0x36d162){return function(_0x14438f){if(!_0x14438f){_0x15e897[_0x9a9d('0x19')](0x194);}return _0x14438f;};}function handleError(_0x1b9926,_0xc3656a){_0xc3656a=_0xc3656a||0x1f4;return function(_0x2f84f5){logger[_0x9a9d('0x27')](_0x2f84f5[_0x9a9d('0x28')]);if(_0x2f84f5['name']){delete _0x2f84f5[_0x9a9d('0x29')];}_0x1b9926[_0x9a9d('0x1b')](_0xc3656a)['send'](_0x2f84f5);};}exports[_0x9a9d('0x24')]=function(_0x438a78,_0x9f8d54){if(_0x438a78[_0x9a9d('0x2a')]['id']){delete _0x438a78[_0x9a9d('0x2a')]['id'];}return db[_0x9a9d('0x2b')][_0x9a9d('0x2c')]({'where':{'id':_0x438a78[_0x9a9d('0x2d')]['id']}})[_0x9a9d('0x25')](handleEntityNotFound(_0x9f8d54,null))['then'](saveUpdates(_0x438a78[_0x9a9d('0x2a')],null))[_0x9a9d('0x25')](respondWithResult(_0x9f8d54,null))['catch'](handleError(_0x9f8d54,null));};exports['destroy']=function(_0x4dfe88,_0xe137b4){return db[_0x9a9d('0x2b')]['find']({'where':{'id':_0x4dfe88[_0x9a9d('0x2d')]['id']}})['then'](handleEntityNotFound(_0xe137b4,null))[_0x9a9d('0x25')](removeEntity(_0xe137b4,null))[_0x9a9d('0x2e')](handleError(_0xe137b4,null));};
\ No newline at end of file
+var _0xa8ec=['querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','apply','save','update','then','stack','name','send','body','Condition','params','catch','destroy','find','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','to-csv','ejs','lodash','squel','crypto','jsforce'];(function(_0x1232ec,_0x2df4b1){var _0x4483b4=function(_0x39bfff){while(--_0x39bfff){_0x1232ec['push'](_0x1232ec['shift']());}};_0x4483b4(++_0x2df4b1);}(_0xa8ec,0x71));var _0xca8e=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0xa8ec[_0x36ed48];return _0x51c63a;};'use strict';var pdf=require(_0xca8e('0x0'));var emlformat=require(_0xca8e('0x1'));var rimraf=require(_0xca8e('0x2'));var zipdir=require(_0xca8e('0x3'));var jsonpatch=require(_0xca8e('0x4'));var rp=require(_0xca8e('0x5'));var moment=require('moment');var BPromise=require(_0xca8e('0x6'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xca8e('0x7'));var ejs=require(_0xca8e('0x8'));var fs=require('fs');var _=require(_0xca8e('0x9'));var squel=require(_0xca8e('0xa'));var crypto=require(_0xca8e('0xb'));var jsforce=require(_0xca8e('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xca8e('0xd'));var Papa=require('papaparse');var Redis=require(_0xca8e('0xe'));var authService=require(_0xca8e('0xf'));var qs=require(_0xca8e('0x10'));var hardwareService=require(_0xca8e('0x11'));var logger=require('../../config/logger')(_0xca8e('0x12'));var utils=require(_0xca8e('0x13'));var config=require(_0xca8e('0x14'));var db=require(_0xca8e('0x15'))['db'];function respondWithStatusCode(_0x5e7cad,_0x2de500){_0x2de500=_0x2de500||0xcc;return function(_0x14630b){if(_0x14630b){return _0x5e7cad[_0xca8e('0x16')](_0x2de500);}return _0x5e7cad[_0xca8e('0x17')](_0x2de500)[_0xca8e('0x18')]();};}function respondWithResult(_0xc610c9,_0x519020){_0x519020=_0x519020||0xc8;return function(_0x15f1cf){if(_0x15f1cf){return _0xc610c9[_0xca8e('0x17')](_0x519020)[_0xca8e('0x19')](_0x15f1cf);}};}function respondWithFilteredResult(_0x4a64c9,_0x2615a4){return function(_0x4b26cb){if(_0x4b26cb){var _0x59278b=_0x4b26cb[_0xca8e('0x1a')],_0x1587ae=_0x2615a4[_0xca8e('0x1b')],_0x1290c0=_0x2615a4[_0xca8e('0x1b')]+_0x2615a4[_0xca8e('0x1c')],_0x43ec54;if(_0x1290c0>=_0x59278b){_0x1290c0=_0x59278b;_0x43ec54=0xc8;}else{_0x43ec54=0xce;}_0x4a64c9[_0xca8e('0x17')](_0x43ec54);return _0x4a64c9['set']('Content-Range',_0x1587ae+'-'+_0x1290c0+'/'+_0x59278b)['json'](_0x4b26cb);}return null;};}function patchUpdates(_0x1fe837){return function(_0x57d899){try{jsonpatch[_0xca8e('0x1d')](_0x57d899,_0x1fe837,!![]);}catch(_0x292c28){return BPromise['reject'](_0x292c28);}return _0x57d899[_0xca8e('0x1e')]();};}function saveUpdates(_0x6d831a,_0x320e39){return function(_0x14c1ea){if(_0x14c1ea){return _0x14c1ea[_0xca8e('0x1f')](_0x6d831a)[_0xca8e('0x20')](function(_0x5b03e0){return _0x5b03e0;});}return null;};}function removeEntity(_0xe4a18d,_0x21f90d){return function(_0x50a423){if(_0x50a423){return _0x50a423['destroy']()['then'](function(){_0xe4a18d[_0xca8e('0x17')](0xcc)[_0xca8e('0x18')]();});}};}function handleEntityNotFound(_0x3059da,_0x36107c){return function(_0x4be244){if(!_0x4be244){_0x3059da[_0xca8e('0x16')](0x194);}return _0x4be244;};}function handleError(_0x23f609,_0x5109a0){_0x5109a0=_0x5109a0||0x1f4;return function(_0x135e3a){logger['error'](_0x135e3a[_0xca8e('0x21')]);if(_0x135e3a[_0xca8e('0x22')]){delete _0x135e3a[_0xca8e('0x22')];}_0x23f609[_0xca8e('0x17')](_0x5109a0)[_0xca8e('0x23')](_0x135e3a);};}exports['update']=function(_0x16c703,_0x442563){if(_0x16c703['body']['id']){delete _0x16c703[_0xca8e('0x24')]['id'];}return db[_0xca8e('0x25')]['find']({'where':{'id':_0x16c703[_0xca8e('0x26')]['id']}})[_0xca8e('0x20')](handleEntityNotFound(_0x442563,null))[_0xca8e('0x20')](saveUpdates(_0x16c703[_0xca8e('0x24')],null))[_0xca8e('0x20')](respondWithResult(_0x442563,null))[_0xca8e('0x27')](handleError(_0x442563,null));};exports[_0xca8e('0x28')]=function(_0x25ebcd,_0x3613d1){return db['Condition'][_0xca8e('0x29')]({'where':{'id':_0x25ebcd[_0xca8e('0x26')]['id']}})[_0xca8e('0x20')](handleEntityNotFound(_0x3613d1,null))['then'](removeEntity(_0x3613d1,null))[_0xca8e('0x27')](handleError(_0x3613d1,null));};
\ No newline at end of file
diff --git a/server/api/condition/condition.model.js b/server/api/condition/condition.model.js
index 831197d..3c90098 100644
--- a/server/api/condition/condition.model.js
+++ b/server/api/condition/condition.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6ae0=['../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./condition.attributes','define','tools_conditions','lodash','util'];(function(_0x2da738,_0x365bfc){var _0x31f907=function(_0x5a6741){while(--_0x5a6741){_0x2da738['push'](_0x2da738['shift']());}};_0x31f907(++_0x365bfc);}(_0x6ae0,0x1d2));var _0x06ae=function(_0x39649f,_0x4e0e87){_0x39649f=_0x39649f-0x0;var _0x4edf8a=_0x6ae0[_0x39649f];return _0x4edf8a;};'use strict';var _=require(_0x06ae('0x0'));var util=require(_0x06ae('0x1'));var logger=require(_0x06ae('0x2'))(_0x06ae('0x3'));var moment=require(_0x06ae('0x4'));var BPromise=require(_0x06ae('0x5'));var rp=require(_0x06ae('0x6'));var fs=require('fs');var path=require(_0x06ae('0x7'));var rimraf=require('rimraf');var config=require(_0x06ae('0x8'));var attributes=require(_0x06ae('0x9'));module['exports']=function(_0x224888,_0x23a3d0){return _0x224888[_0x06ae('0xa')]('Condition',attributes,{'tableName':_0x06ae('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x888a=['bluebird','request-promise','path','../../config/environment','exports','define','Condition','tools_conditions','util','../../config/logger','api','moment'];(function(_0x5de6ad,_0x51aa5d){var _0x3511bc=function(_0x357def){while(--_0x357def){_0x5de6ad['push'](_0x5de6ad['shift']());}};_0x3511bc(++_0x51aa5d);}(_0x888a,0x1f4));var _0xa888=function(_0x1902da,_0x1c465a){_0x1902da=_0x1902da-0x0;var _0x2fdcd7=_0x888a[_0x1902da];return _0x2fdcd7;};'use strict';var _=require('lodash');var util=require(_0xa888('0x0'));var logger=require(_0xa888('0x1'))(_0xa888('0x2'));var moment=require(_0xa888('0x3'));var BPromise=require(_0xa888('0x4'));var rp=require(_0xa888('0x5'));var fs=require('fs');var path=require(_0xa888('0x6'));var rimraf=require('rimraf');var config=require(_0xa888('0x7'));var attributes=require('./condition.attributes');module[_0xa888('0x8')]=function(_0x31da1a,_0x21a111){return _0x31da1a[_0xa888('0x9')](_0xa888('0xa'),attributes,{'tableName':_0xa888('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/condition/condition.rpc.js b/server/api/condition/condition.rpc.js
index c180fcd..99ba292 100644
--- a/server/api/condition/condition.rpc.js
+++ b/server/api/condition/condition.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdcef=['lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Condition,\x20%s,\x20%s','debug','Condition,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch'];(function(_0x57a50d,_0x2871f8){var _0x1b25b3=function(_0x45691e){while(--_0x45691e){_0x57a50d['push'](_0x57a50d['shift']());}};_0x1b25b3(++_0x2871f8);}(_0xdcef,0x16c));var _0xfdce=function(_0x3cef58,_0x20fef9){_0x3cef58=_0x3cef58-0x0;var _0x323950=_0xdcef[_0x3cef58];return _0x323950;};'use strict';var _=require(_0xfdce('0x0'));var util=require('util');var moment=require(_0xfdce('0x1'));var BPromise=require(_0xfdce('0x2'));var rs=require(_0xfdce('0x3'));var fs=require('fs');var Redis=require(_0xfdce('0x4'));var db=require(_0xfdce('0x5'))['db'];var utils=require(_0xfdce('0x6'));var logger=require(_0xfdce('0x7'))(_0xfdce('0x8'));var config=require(_0xfdce('0x9'));var jayson=require(_0xfdce('0xa'));var client=jayson[_0xfdce('0xb')][_0xfdce('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x105307,_0x1446cd,_0x17eae2){return new BPromise(function(_0x14e4e2,_0x3b139f){return client[_0xfdce('0xd')](_0x105307,_0x17eae2)[_0xfdce('0xe')](function(_0x59a722){logger[_0xfdce('0xf')](_0xfdce('0x10'),_0x1446cd,'request\x20sent');logger[_0xfdce('0x11')](_0xfdce('0x12'),_0x1446cd,_0xfdce('0x13'),JSON[_0xfdce('0x14')](_0x59a722));if(_0x59a722[_0xfdce('0x15')]){if(_0x59a722[_0xfdce('0x15')][_0xfdce('0x16')]===0x1f4){logger[_0xfdce('0x15')](_0xfdce('0x10'),_0x1446cd,_0x59a722[_0xfdce('0x15')][_0xfdce('0x17')]);return _0x3b139f(_0x59a722['error'][_0xfdce('0x17')]);}logger['error'](_0xfdce('0x10'),_0x1446cd,_0x59a722['error'][_0xfdce('0x17')]);return _0x14e4e2(_0x59a722[_0xfdce('0x15')][_0xfdce('0x17')]);}else{logger[_0xfdce('0xf')]('Condition,\x20%s,\x20%s',_0x1446cd,'request\x20sent');_0x14e4e2(_0x59a722[_0xfdce('0x18')][_0xfdce('0x17')]);}})[_0xfdce('0x19')](function(_0x3b270b){logger[_0xfdce('0x15')]('Condition,\x20%s,\x20%s',_0x1446cd,_0x3b270b);_0x3b139f(_0x3b270b);});});}
\ No newline at end of file
+var _0x6ace=['debug','Condition,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','Condition,\x20%s,\x20%s'];(function(_0x5f5720,_0x5445c3){var _0x4a1e70=function(_0x4d3290){while(--_0x4d3290){_0x5f5720['push'](_0x5f5720['shift']());}};_0x4a1e70(++_0x5445c3);}(_0x6ace,0x105));var _0xe6ac=function(_0xb1ee0e,_0x2126df){_0xb1ee0e=_0xb1ee0e-0x0;var _0x376116=_0x6ace[_0xb1ee0e];return _0x376116;};'use strict';var _=require(_0xe6ac('0x0'));var util=require(_0xe6ac('0x1'));var moment=require(_0xe6ac('0x2'));var BPromise=require(_0xe6ac('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe6ac('0x4'));var db=require(_0xe6ac('0x5'))['db'];var utils=require(_0xe6ac('0x6'));var logger=require(_0xe6ac('0x7'))(_0xe6ac('0x8'));var config=require(_0xe6ac('0x9'));var jayson=require(_0xe6ac('0xa'));var client=jayson['client'][_0xe6ac('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3ff63d,_0xe54729,_0x48cd43){return new BPromise(function(_0x8a5a0f,_0x159abc){return client[_0xe6ac('0xc')](_0x3ff63d,_0x48cd43)[_0xe6ac('0xd')](function(_0x511204){logger['info'](_0xe6ac('0xe'),_0xe54729,'request\x20sent');logger[_0xe6ac('0xf')](_0xe6ac('0x10'),_0xe54729,_0xe6ac('0x11'),JSON[_0xe6ac('0x12')](_0x511204));if(_0x511204['error']){if(_0x511204[_0xe6ac('0x13')]['code']===0x1f4){logger[_0xe6ac('0x13')](_0xe6ac('0xe'),_0xe54729,_0x511204[_0xe6ac('0x13')]['message']);return _0x159abc(_0x511204['error'][_0xe6ac('0x14')]);}logger['error']('Condition,\x20%s,\x20%s',_0xe54729,_0x511204[_0xe6ac('0x13')]['message']);return _0x8a5a0f(_0x511204['error'][_0xe6ac('0x14')]);}else{logger[_0xe6ac('0x15')](_0xe6ac('0xe'),_0xe54729,_0xe6ac('0x11'));_0x8a5a0f(_0x511204[_0xe6ac('0x16')][_0xe6ac('0x14')]);}})['catch'](function(_0x5eb6a8){logger[_0xe6ac('0x13')](_0xe6ac('0xe'),_0xe54729,_0x5eb6a8);_0x159abc(_0x5eb6a8);});});}
\ No newline at end of file
diff --git a/server/api/condition/index.js b/server/api/condition/index.js
index 4eb447b..0995ee9 100644
--- a/server/api/condition/index.js
+++ b/server/api/condition/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x589f=['delete','util','path','express','Router','../../components/interaction/service','../../config/environment','./condition.controller','/:id','isAuthenticated','update'];(function(_0x2a1b33,_0x409f50){var _0x4c50e7=function(_0x13e16d){while(--_0x13e16d){_0x2a1b33['push'](_0x2a1b33['shift']());}};_0x4c50e7(++_0x409f50);}(_0x589f,0x1b9));var _0xf589=function(_0x1966ad,_0x43f2f3){_0x1966ad=_0x1966ad-0x0;var _0x5d7637=_0x589f[_0x1966ad];return _0x5d7637;};'use strict';var multer=require('multer');var util=require(_0xf589('0x0'));var path=require(_0xf589('0x1'));var timeout=require('connect-timeout');var express=require(_0xf589('0x2'));var router=express[_0xf589('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xf589('0x4'));var config=require(_0xf589('0x5'));var controller=require(_0xf589('0x6'));router['put'](_0xf589('0x7'),auth[_0xf589('0x8')](),controller[_0xf589('0x9')]);router[_0xf589('0xa')]('/:id',auth[_0xf589('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x3fdc=['multer','connect-timeout','express','../../components/auth/service','../../config/environment','./condition.controller','put','/:id','isAuthenticated','update','delete','destroy','exports'];(function(_0x3f8d12,_0x388aba){var _0x647228=function(_0xc4981a){while(--_0xc4981a){_0x3f8d12['push'](_0x3f8d12['shift']());}};_0x647228(++_0x388aba);}(_0x3fdc,0x68));var _0xc3fd=function(_0x33e7e8,_0xd561da){_0x33e7e8=_0x33e7e8-0x0;var _0x379242=_0x3fdc[_0x33e7e8];return _0x379242;};'use strict';var multer=require(_0xc3fd('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xc3fd('0x1'));var express=require(_0xc3fd('0x2'));var router=express['Router']();var auth=require(_0xc3fd('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xc3fd('0x4'));var controller=require(_0xc3fd('0x5'));router[_0xc3fd('0x6')](_0xc3fd('0x7'),auth[_0xc3fd('0x8')](),controller[_0xc3fd('0x9')]);router[_0xc3fd('0xa')](_0xc3fd('0x7'),auth[_0xc3fd('0x8')](),controller[_0xc3fd('0xb')]);module[_0xc3fd('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.attributes.js b/server/api/dashboard/dashboard.attributes.js
index ebf2280..3153104 100644
--- a/server/api/dashboard/dashboard.attributes.js
+++ b/server/api/dashboard/dashboard.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4d1d=['STRING'];(function(_0x49f446,_0x36608b){var _0x4218b9=function(_0xd2c2a2){while(--_0xd2c2a2){_0x49f446['push'](_0x49f446['shift']());}};_0x4218b9(++_0x36608b);}(_0x4d1d,0x84));var _0xd4d1=function(_0x372659,_0x4dfe56){_0x372659=_0x372659-0x0;var _0x541894=_0x4d1d[_0x372659];return _0x541894;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'description':{'type':Sequelize[_0xd4d1('0x0')]}};
\ No newline at end of file
+var _0xf7ca=['name','exports','STRING'];(function(_0x2a67e7,_0x55bf7a){var _0x5c483d=function(_0x245abd){while(--_0x245abd){_0x2a67e7['push'](_0x2a67e7['shift']());}};_0x5c483d(++_0x55bf7a);}(_0xf7ca,0x1cc));var _0xaf7c=function(_0xfe1a0b,_0x46695a){_0xfe1a0b=_0xfe1a0b-0x0;var _0xac233e=_0xf7ca[_0xfe1a0b];return _0xac233e;};'use strict';var Sequelize=require('sequelize');module[_0xaf7c('0x0')]={'name':{'type':Sequelize[_0xaf7c('0x1')],'allowNull':![],'unique':_0xaf7c('0x2')},'description':{'type':Sequelize[_0xaf7c('0x1')]}};
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js
index 9d46c4d..7107e0a 100644
--- a/server/api/dashboard/dashboard.controller.js
+++ b/server/api/dashboard/dashboard.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf73f=['eml-format','moment','bluebird','mustache','util','path','sox','to-csv','lodash','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','Content-Range','apply','reject','update','then','get','CustomDashboards','UserProfileResource','error','Dashboard','rawAttributes','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','merge','key','VIRTUAL','field','options','count','includeAll','include','findAll','rows','catch','show','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','name','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','omit','createdAt','updatedAt','type','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','counter','attrMetric','attrVoiceQueues','attrFontSize','multibar-chart','attrSerie1','total','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','addItem','DashboardId','DashboardItem','findOne','map','html-pdf'];(function(_0x5efd92,_0x22fc62){var _0x458b68=function(_0x4f3147){while(--_0x4f3147){_0x5efd92['push'](_0x5efd92['shift']());}};_0x458b68(++_0x22fc62);}(_0xf73f,0x1d7));var _0xff73=function(_0x31137a,_0x40d359){_0x31137a=_0x31137a-0x0;var _0x3d1869=_0xf73f[_0x31137a];return _0x3d1869;};'use strict';var pdf=require(_0xff73('0x0'));var emlformat=require(_0xff73('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xff73('0x2'));var BPromise=require(_0xff73('0x3'));var Mustache=require(_0xff73('0x4'));var util=require(_0xff73('0x5'));var path=require(_0xff73('0x6'));var sox=require(_0xff73('0x7'));var csv=require(_0xff73('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xff73('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xff73('0xa'));var deskjs=require(_0xff73('0xb'));var toCsv=require(_0xff73('0x8'));var querystring=require(_0xff73('0xc'));var Papa=require('papaparse');var Redis=require(_0xff73('0xd'));var authService=require(_0xff73('0xe'));var qs=require(_0xff73('0xf'));var hardwareService=require(_0xff73('0x10'));var logger=require(_0xff73('0x11'))(_0xff73('0x12'));var utils=require(_0xff73('0x13'));var config=require(_0xff73('0x14'));var db=require(_0xff73('0x15'))['db'];config[_0xff73('0x16')]=_['defaults'](config['redis'],{'host':_0xff73('0x17'),'port':0x18eb});var socket=require(_0xff73('0x18'))(new Redis(config[_0xff73('0x16')]));require('./dashboard.socket')[_0xff73('0x19')](socket);function respondWithStatusCode(_0x50285f,_0x28f592){_0x28f592=_0x28f592||0xcc;return function(_0x6b2675){if(_0x6b2675){return _0x50285f[_0xff73('0x1a')](_0x28f592);}return _0x50285f[_0xff73('0x1b')](_0x28f592)[_0xff73('0x1c')]();};}function respondWithResult(_0x2340f1,_0x1b984b){_0x1b984b=_0x1b984b||0xc8;return function(_0x178626){if(_0x178626){return _0x2340f1[_0xff73('0x1b')](_0x1b984b)[_0xff73('0x1d')](_0x178626);}};}function respondWithFilteredResult(_0x21bfe1,_0x25bed8){return function(_0x1a13a2){if(_0x1a13a2){var _0x5a184c=_0x1a13a2['count'],_0x4b5ae8=_0x25bed8[_0xff73('0x1e')],_0x3cf816=_0x25bed8['offset']+_0x25bed8[_0xff73('0x1f')],_0x2f7f32;if(_0x3cf816>=_0x5a184c){_0x3cf816=_0x5a184c;_0x2f7f32=0xc8;}else{_0x2f7f32=0xce;}_0x21bfe1[_0xff73('0x1b')](_0x2f7f32);return _0x21bfe1['set'](_0xff73('0x20'),_0x4b5ae8+'-'+_0x3cf816+'/'+_0x5a184c)[_0xff73('0x1d')](_0x1a13a2);}return null;};}function patchUpdates(_0x4d5a17){return function(_0x2ffd9a){try{jsonpatch[_0xff73('0x21')](_0x2ffd9a,_0x4d5a17,!![]);}catch(_0x3c09c9){return BPromise[_0xff73('0x22')](_0x3c09c9);}return _0x2ffd9a['save']();};}function saveUpdates(_0x40919b,_0x3e4271){return function(_0x23e077){if(_0x23e077){return _0x23e077[_0xff73('0x23')](_0x40919b)[_0xff73('0x24')](function(_0x3b8b49){return _0x3b8b49;});}return null;};}function removeEntity(_0x2a0d22,_0x501af8){return function(_0x1eefa7){if(_0x1eefa7){return _0x1eefa7['destroy']()[_0xff73('0x24')](function(){var _0x166663=_0x1eefa7[_0xff73('0x25')]({'plain':!![]});var _0x217f78=_0xff73('0x26');return db[_0xff73('0x27')]['destroy']({'where':{'type':_0x217f78,'resourceId':_0x166663['id']}})[_0xff73('0x24')](function(){return _0x1eefa7;});})[_0xff73('0x24')](function(){_0x2a0d22[_0xff73('0x1b')](0xcc)[_0xff73('0x1c')]();});}};}function handleEntityNotFound(_0x9f7ec9,_0x3832c9){return function(_0xac81f0){if(!_0xac81f0){_0x9f7ec9['sendStatus'](0x194);}return _0xac81f0;};}function handleError(_0x18310a,_0x18bca3){_0x18bca3=_0x18bca3||0x1f4;return function(_0x42f2e6){logger[_0xff73('0x28')](_0x42f2e6['stack']);if(_0x42f2e6['name']){delete _0x42f2e6['name'];}_0x18310a[_0xff73('0x1b')](_0x18bca3)['send'](_0x42f2e6);};}exports['index']=function(_0x413d26,_0x578d0d){var _0x4a39b6={},_0x660291={},_0x30e63d={'count':0x0,'rows':[]};var _0x64d7b1=db[_0xff73('0x29')][_0xff73('0x2a')];_0x660291[_0xff73('0x2b')]=_['keys'](_0x64d7b1);_0x660291[_0xff73('0x2c')]=_[_0xff73('0x2d')](_0x413d26['query']);_0x660291['filters']=_[_0xff73('0x2e')](_0x660291[_0xff73('0x2b')],_0x660291['query']);_0x4a39b6[_0xff73('0x2f')]=_[_0xff73('0x2e')](_0x660291[_0xff73('0x2b')],qs[_0xff73('0x30')](_0x413d26['query']['fields']));_0x4a39b6[_0xff73('0x2f')]=_0x4a39b6['attributes'][_0xff73('0x31')]?_0x4a39b6[_0xff73('0x2f')]:_0x660291[_0xff73('0x2b')];if(!_0x413d26[_0xff73('0x2c')][_0xff73('0x32')](_0xff73('0x33'))){_0x4a39b6[_0xff73('0x1f')]=qs[_0xff73('0x1f')](_0x413d26[_0xff73('0x2c')][_0xff73('0x1f')]);_0x4a39b6['offset']=qs[_0xff73('0x1e')](_0x413d26[_0xff73('0x2c')][_0xff73('0x1e')]);}_0x4a39b6[_0xff73('0x34')]=qs['sort'](_0x413d26['query'][_0xff73('0x35')]);_0x4a39b6[_0xff73('0x36')]=qs['filters'](_[_0xff73('0x37')](_0x413d26[_0xff73('0x2c')],_0x660291[_0xff73('0x38')]));if(_0x413d26['query'][_0xff73('0x39')]){_0x4a39b6['where']=_[_0xff73('0x3a')](_0x4a39b6[_0xff73('0x36')],{'$or':_['map'](_0x64d7b1,function(_0x55b7dd){if(_0x55b7dd['type'][_0xff73('0x3b')]!==_0xff73('0x3c')){var _0x1f642d={};_0x1f642d[_0x55b7dd[_0xff73('0x3d')]]={'$like':'%'+_0x413d26[_0xff73('0x2c')][_0xff73('0x39')]+'%'};return _0x1f642d;}})});}_0x4a39b6=_[_0xff73('0x3a')]({},_0x4a39b6,_0x413d26[_0xff73('0x3e')]);var _0x209971={'where':_0x4a39b6['where']};return db['Dashboard']['count'](_0x209971)[_0xff73('0x24')](function(_0x3a8419){_0x30e63d[_0xff73('0x3f')]=_0x3a8419;if(_0x413d26['query'][_0xff73('0x40')]){_0x4a39b6[_0xff73('0x41')]=[{'all':!![]}];}return db[_0xff73('0x29')][_0xff73('0x42')](_0x4a39b6);})[_0xff73('0x24')](function(_0x339c93){_0x30e63d[_0xff73('0x43')]=_0x339c93;return _0x30e63d;})[_0xff73('0x24')](respondWithFilteredResult(_0x578d0d,_0x4a39b6))[_0xff73('0x44')](handleError(_0x578d0d,null));};exports[_0xff73('0x45')]=function(_0x448d14,_0x128340){var _0x171d08={'raw':![],'where':{'id':_0x448d14['params']['id']}},_0x1a69ea={};_0x1a69ea[_0xff73('0x2b')]=_['keys'](db[_0xff73('0x29')]['rawAttributes']);_0x1a69ea[_0xff73('0x2c')]=_[_0xff73('0x2d')](_0x448d14[_0xff73('0x2c')]);_0x1a69ea[_0xff73('0x38')]=_[_0xff73('0x2e')](_0x1a69ea[_0xff73('0x2b')],_0x1a69ea[_0xff73('0x2c')]);_0x171d08[_0xff73('0x2f')]=_[_0xff73('0x2e')](_0x1a69ea[_0xff73('0x2b')],qs[_0xff73('0x30')](_0x448d14[_0xff73('0x2c')]['fields']));_0x171d08[_0xff73('0x2f')]=_0x171d08[_0xff73('0x2f')][_0xff73('0x31')]?_0x171d08['attributes']:_0x1a69ea[_0xff73('0x2b')];if(_0x448d14[_0xff73('0x2c')]['includeAll']){_0x171d08[_0xff73('0x41')]=[{'all':!![]}];}_0x171d08=_[_0xff73('0x3a')]({},_0x171d08,_0x448d14[_0xff73('0x3e')]);return db[_0xff73('0x29')][_0xff73('0x46')](_0x171d08)[_0xff73('0x24')](handleEntityNotFound(_0x128340,null))[_0xff73('0x24')](respondWithResult(_0x128340,null))[_0xff73('0x44')](handleError(_0x128340,null));};exports[_0xff73('0x47')]=function(_0x1a188c,_0x160cc6){return db['Dashboard'][_0xff73('0x47')](_0x1a188c[_0xff73('0x48')],{})['then'](function(_0x4b59f3){var _0x853368=_0x1a188c['user']['get']({'plain':!![]});if(!_0x853368)throw new Error(_0xff73('0x49'));if(_0x853368[_0xff73('0x4a')]===_0xff73('0x4b')){var _0x1e2ec4=_0x4b59f3[_0xff73('0x25')]({'plain':!![]});var _0x13f9ea=_0xff73('0x26');return db[_0xff73('0x4c')][_0xff73('0x46')]({'where':{'name':_0x13f9ea,'userProfileId':_0x853368[_0xff73('0x4d')]},'raw':!![]})[_0xff73('0x24')](function(_0x27f425){if(_0x27f425&&_0x27f425[_0xff73('0x4e')]===0x0){return db['UserProfileResource']['create']({'name':_0x1e2ec4[_0xff73('0x4f')],'resourceId':_0x1e2ec4['id'],'type':_0x27f425[_0xff73('0x4f')],'sectionId':_0x27f425['id']},{})[_0xff73('0x24')](function(){return _0x4b59f3;});}else{return _0x4b59f3;}})[_0xff73('0x44')](function(_0x42c83d){logger[_0xff73('0x28')](_0xff73('0x50'),_0x42c83d);throw _0x42c83d;});}return _0x4b59f3;})['then'](respondWithResult(_0x160cc6,0xc9))[_0xff73('0x44')](handleError(_0x160cc6,null));};exports[_0xff73('0x51')]=function(_0x3596c8,_0x9f5a26){var _0x54f98a={'raw':![],'where':{'id':_0x3596c8[_0xff73('0x52')]['id']}},_0x535f23={};_0x535f23['model']=_[_0xff73('0x2d')](db[_0xff73('0x29')][_0xff73('0x2a')]);_0x54f98a[_0xff73('0x2f')]=_['intersection'](_0x535f23[_0xff73('0x2b')],qs[_0xff73('0x30')](_0x3596c8[_0xff73('0x2c')][_0xff73('0x30')]));_0x54f98a['attributes']=_0x54f98a[_0xff73('0x2f')]['length']?_0x54f98a['attributes']:_0x535f23['model'];if(_0x3596c8[_0xff73('0x2c')][_0xff73('0x40')]){_0x54f98a[_0xff73('0x41')]=[{'all':!![]}];}_0x54f98a=_[_0xff73('0x3a')]({},_0x54f98a,_0x3596c8[_0xff73('0x3e')]);return db[_0xff73('0x29')][_0xff73('0x46')](_0x54f98a)['then'](handleEntityNotFound(_0x9f5a26,null))['then'](function(_0x324306){if(_0x324306){var _0x5eb652=_0x324306['get']({'plain':!![]});_0x5eb652=qs[_0xff73('0x53')](_0x5eb652,['id',_0xff73('0x54'),_0xff73('0x55')]);_0x3596c8[_0xff73('0x48')]=_['omit'](_0x3596c8['body'],['id','createdAt',_0xff73('0x55')]);return db[_0xff73('0x29')]['create'](_[_0xff73('0x3a')](_0x5eb652,_0x3596c8[_0xff73('0x48')]),{'include':_0x3596c8[_0xff73('0x2c')][_0xff73('0x40')]?[{'all':!![]}]:undefined})[_0xff73('0x24')](function(_0x953926){var _0x1a494d=_0x3596c8[_0xff73('0x4b')][_0xff73('0x25')]({'plain':!![]});if(!_0x1a494d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1a494d[_0xff73('0x4a')]===_0xff73('0x4b')){var _0x162ef1=_0x953926['get']({'plain':!![]});var _0x375f19=_0xff73('0x26');return db['UserProfileSection'][_0xff73('0x46')]({'where':{'name':_0x375f19,'userProfileId':_0x1a494d[_0xff73('0x4d')]},'raw':!![]})[_0xff73('0x24')](function(_0x1ed610){if(_0x1ed610&&_0x1ed610[_0xff73('0x4e')]===0x0){return db[_0xff73('0x27')][_0xff73('0x47')]({'name':_0x162ef1[_0xff73('0x4f')],'resourceId':_0x162ef1['id'],'type':_0x1ed610[_0xff73('0x4f')],'sectionId':_0x1ed610['id']},{})['then'](function(){return _0x953926;});}else{return _0x953926;}})[_0xff73('0x44')](function(_0x1c54cc){logger[_0xff73('0x28')](_0xff73('0x50'),_0x1c54cc);throw _0x1c54cc;});}return _0x953926;});}})[_0xff73('0x24')](respondWithResult(_0x9f5a26,0xc9))[_0xff73('0x44')](handleError(_0x9f5a26,null));};exports[_0xff73('0x23')]=function(_0x34dd3a,_0x17df11){if(_0x34dd3a[_0xff73('0x48')]['id']){delete _0x34dd3a[_0xff73('0x48')]['id'];}return db['Dashboard'][_0xff73('0x46')]({'where':{'id':_0x34dd3a[_0xff73('0x52')]['id']}})['then'](handleEntityNotFound(_0x17df11,null))['then'](saveUpdates(_0x34dd3a[_0xff73('0x48')],null))[_0xff73('0x24')](respondWithResult(_0x17df11,null))['catch'](handleError(_0x17df11,null));};exports['destroy']=function(_0xf6d55a,_0x3129f2){return db['Dashboard']['find']({'where':{'id':_0xf6d55a['params']['id']}})[_0xff73('0x24')](handleEntityNotFound(_0x3129f2,null))[_0xff73('0x24')](removeEntity(_0x3129f2,null))['catch'](handleError(_0x3129f2,null));};function widgetAttributes(_0x2df574){try{switch(_0x2df574[_0xff73('0x56')]){case _0xff73('0x57'):return[{'name':_0xff73('0x58'),'value':_0x2df574[_0xff73('0x58')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x0]?_0x2df574['attrs'][0x0][_0xff73('0x5a')]:undefined)||_0xff73('0x5b')}];case _0xff73('0x5c'):return[{'name':'attrPath','value':_0x2df574[_0xff73('0x5d')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574['attrs'][0x0]?_0x2df574[_0xff73('0x59')][0x0][_0xff73('0x5a')]:undefined)||''}];case _0xff73('0x5e'):return[{'name':_0xff73('0x5f'),'value':_0x2df574[_0xff73('0x5f')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x0]?_0x2df574[_0xff73('0x59')][0x0]['value']:undefined)||_0xff73('0x60')},{'name':_0xff73('0x61'),'value':_0x2df574[_0xff73('0x61')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574['attrs'][0x1]?_0x2df574[_0xff73('0x59')][0x1][_0xff73('0x5a')]:undefined)||_0xff73('0x62')},{'name':'attrFontSize','value':_0x2df574['attrFontSize']||(_0x2df574[_0xff73('0x59')]&&_0x2df574['attrs'][0x2]?_0x2df574[_0xff73('0x59')][0x2][_0xff73('0x5a')]:undefined)||0xc}];case _0xff73('0x63'):return[{'name':_0xff73('0x64'),'value':_0x2df574['attrMetric']||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x0]?_0x2df574['attrs'][0x0][_0xff73('0x5a')]:undefined)||'total'},{'name':'attrVoiceQueues','value':_0x2df574[_0xff73('0x65')]||(_0x2df574['attrs']&&_0x2df574[_0xff73('0x59')][0x1]?_0x2df574['attrs'][0x1][_0xff73('0x5a')]:undefined)||[]},{'name':_0xff73('0x66'),'value':_0x2df574['attrFontSize']||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x2]?_0x2df574[_0xff73('0x59')][0x2][_0xff73('0x5a')]:undefined)||0x14}];case _0xff73('0x67'):case'pie-chart':return[{'name':_0xff73('0x68'),'value':_0x2df574['attrSerie1']||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x0]?_0x2df574[_0xff73('0x59')][0x0][_0xff73('0x5a')]:undefined)||_0xff73('0x69')},{'name':_0xff73('0x6a'),'value':_0x2df574[_0xff73('0x6a')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x1]?_0x2df574[_0xff73('0x59')][0x1][_0xff73('0x5a')]:undefined)||null},{'name':'attrSerie3','value':_0x2df574[_0xff73('0x6b')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x2]?_0x2df574[_0xff73('0x59')][0x2]['value']:undefined)||null},{'name':_0xff73('0x65'),'value':_0x2df574['attrVoiceQueues']||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x3]?_0x2df574[_0xff73('0x59')][0x3][_0xff73('0x5a')]:undefined)||[]}];case _0xff73('0x6c'):return[{'name':_0xff73('0x6d'),'type':_0x2df574[_0xff73('0x6e')]||(_0x2df574['attrs']&&_0x2df574[_0xff73('0x59')][0x0]?_0x2df574[_0xff73('0x59')][0x0]['type']:undefined)||null,'value':_0x2df574['attrReport']||(_0x2df574[_0xff73('0x59')]&&_0x2df574[_0xff73('0x59')][0x0]?_0x2df574[_0xff73('0x59')][0x0]['value']:undefined)||null},{'name':'attrRefresh','value':_0x2df574[_0xff73('0x6f')]||(_0x2df574[_0xff73('0x59')]&&_0x2df574['attrs'][0x1]?_0x2df574['attrs'][0x1]['value']:undefined)||0x0}];default:return[];}}catch(_0x43087a){logger[_0xff73('0x28')](_0xff73('0x70'),JSON['stringify'](_0x43087a));return[];}}exports[_0xff73('0x71')]=function(_0x1e5860,_0x5dc9e8,_0x5bc8be){if(_0x1e5860[_0xff73('0x48')]['id']){delete _0x1e5860[_0xff73('0x48')]['id'];}return db[_0xff73('0x29')][_0xff73('0x46')]({'where':{'id':_0x1e5860['params']['id']}})[_0xff73('0x24')](handleEntityNotFound(_0x5dc9e8,null))['then'](function(_0x31d5c9){if(_0x31d5c9){_0x1e5860[_0xff73('0x48')][_0xff73('0x72')]=_0x31d5c9['id'];_0x1e5860[_0xff73('0x48')][_0xff73('0x59')]=widgetAttributes(_0x1e5860[_0xff73('0x48')]);return db[_0xff73('0x73')][_0xff73('0x47')](_0x1e5860['body']);}})[_0xff73('0x24')](respondWithResult(_0x5dc9e8,null))[_0xff73('0x44')](handleError(_0x5dc9e8,null));};exports['getItems']=function(_0x31617d,_0x2745db,_0x56b3ee){var _0x33a9b0={};var _0x10274c={};var _0x564aa8;var _0x2b7ad5;return db[_0xff73('0x29')][_0xff73('0x74')]({'where':{'id':_0x31617d['params']['id']}})[_0xff73('0x24')](handleEntityNotFound(_0x2745db,null))[_0xff73('0x24')](function(_0x39e5e9){if(_0x39e5e9){_0x564aa8=_0x39e5e9;_0x10274c['model']=_[_0xff73('0x2d')](db[_0xff73('0x73')]['rawAttributes']);_0x10274c[_0xff73('0x2c')]=_['keys'](_0x31617d['query']);_0x10274c[_0xff73('0x38')]=_['intersection'](_0x10274c[_0xff73('0x2b')],_0x10274c[_0xff73('0x2c')]);_0x33a9b0[_0xff73('0x2f')]=_[_0xff73('0x2e')](_0x10274c[_0xff73('0x2b')],qs[_0xff73('0x30')](_0x31617d['query'][_0xff73('0x30')]));_0x33a9b0['attributes']=_0x33a9b0['attributes'][_0xff73('0x31')]?_0x33a9b0[_0xff73('0x2f')]:_0x10274c[_0xff73('0x2b')];_0x33a9b0['order']=qs['sort'](_0x31617d[_0xff73('0x2c')][_0xff73('0x35')]);_0x33a9b0[_0xff73('0x36')]=qs['filters'](_[_0xff73('0x37')](_0x31617d['query'],_0x10274c['filters']));if(_0x31617d[_0xff73('0x2c')][_0xff73('0x39')]){_0x33a9b0[_0xff73('0x36')]=_[_0xff73('0x3a')](_0x33a9b0[_0xff73('0x36')],{'$or':_[_0xff73('0x75')](_0x33a9b0['attributes'],function(_0xa4febe){var _0x52b965={};_0x52b965[_0xa4febe]={'$like':'%'+_0x31617d[_0xff73('0x2c')][_0xff73('0x39')]+'%'};return _0x52b965;})});}_0x33a9b0=_[_0xff73('0x3a')]({},_0x33a9b0,_0x31617d[_0xff73('0x3e')]);return _0x564aa8['getItems'](_0x33a9b0);}})[_0xff73('0x24')](function(_0x354707){if(_0x354707){_0x2b7ad5=_0x354707[_0xff73('0x31')];if(!_0x31617d[_0xff73('0x2c')][_0xff73('0x32')](_0xff73('0x33'))){_0x33a9b0[_0xff73('0x1f')]=qs[_0xff73('0x1f')](_0x31617d[_0xff73('0x2c')]['limit']);_0x33a9b0[_0xff73('0x1e')]=qs['offset'](_0x31617d[_0xff73('0x2c')][_0xff73('0x1e')]);}return _0x564aa8['getItems'](_0x33a9b0);}})[_0xff73('0x24')](function(_0x1fd161){if(_0x1fd161){return _0x1fd161?{'count':_0x2b7ad5,'rows':_0x1fd161}:null;}})[_0xff73('0x24')](respondWithResult(_0x2745db,null))[_0xff73('0x44')](handleError(_0x2745db,null));};
\ No newline at end of file
+var _0x5c5e=['include','findAll','rows','catch','show','intersection','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','updatedAt','params','type','iframe','attrUrl','attrs','value','custom','attrPath','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','total','attrVoiceQueues','multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','stringify','addItem','DashboardId','DashboardItem','getItems','findOne','html-pdf','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','to-csv','ejs','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./dashboard.socket','register','sendStatus','end','json','count','offset','limit','status','apply','save','update','destroy','get','CustomDashboards','UserProfileResource','then','error','stack','name','send','index','Dashboard','rawAttributes','model','keys','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','key','field','options','includeAll'];(function(_0x294ebc,_0x32ee52){var _0x1087bd=function(_0x50dbf9){while(--_0x50dbf9){_0x294ebc['push'](_0x294ebc['shift']());}};_0x1087bd(++_0x32ee52);}(_0x5c5e,0x194));var _0xe5c5=function(_0x8fc26d,_0x2335ea){_0x8fc26d=_0x8fc26d-0x0;var _0x8e7068=_0x5c5e[_0x8fc26d];return _0x8e7068;};'use strict';var pdf=require(_0xe5c5('0x0'));var emlformat=require(_0xe5c5('0x1'));var rimraf=require(_0xe5c5('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xe5c5('0x3'));var moment=require(_0xe5c5('0x4'));var BPromise=require(_0xe5c5('0x5'));var Mustache=require(_0xe5c5('0x6'));var util=require('util');var path=require(_0xe5c5('0x7'));var sox=require('sox');var csv=require(_0xe5c5('0x8'));var ejs=require(_0xe5c5('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xe5c5('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xe5c5('0xb'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xe5c5('0xc'));var Redis=require(_0xe5c5('0xd'));var authService=require(_0xe5c5('0xe'));var qs=require(_0xe5c5('0xf'));var hardwareService=require(_0xe5c5('0x10'));var logger=require(_0xe5c5('0x11'))('api');var utils=require('../../config/utils');var config=require(_0xe5c5('0x12'));var db=require(_0xe5c5('0x13'))['db'];config['redis']=_[_0xe5c5('0x14')](config[_0xe5c5('0x15')],{'host':_0xe5c5('0x16'),'port':0x18eb});var socket=require(_0xe5c5('0x17'))(new Redis(config[_0xe5c5('0x15')]));require(_0xe5c5('0x18'))[_0xe5c5('0x19')](socket);function respondWithStatusCode(_0x2100b0,_0x13a2d0){_0x13a2d0=_0x13a2d0||0xcc;return function(_0x3ef75b){if(_0x3ef75b){return _0x2100b0[_0xe5c5('0x1a')](_0x13a2d0);}return _0x2100b0['status'](_0x13a2d0)[_0xe5c5('0x1b')]();};}function respondWithResult(_0x39b2fe,_0x29d8ae){_0x29d8ae=_0x29d8ae||0xc8;return function(_0x14fc97){if(_0x14fc97){return _0x39b2fe['status'](_0x29d8ae)[_0xe5c5('0x1c')](_0x14fc97);}};}function respondWithFilteredResult(_0x379348,_0x3ed297){return function(_0x318986){if(_0x318986){var _0xd48180=_0x318986[_0xe5c5('0x1d')],_0x2794a7=_0x3ed297['offset'],_0x4ce74e=_0x3ed297[_0xe5c5('0x1e')]+_0x3ed297[_0xe5c5('0x1f')],_0x3dfd33;if(_0x4ce74e>=_0xd48180){_0x4ce74e=_0xd48180;_0x3dfd33=0xc8;}else{_0x3dfd33=0xce;}_0x379348[_0xe5c5('0x20')](_0x3dfd33);return _0x379348['set']('Content-Range',_0x2794a7+'-'+_0x4ce74e+'/'+_0xd48180)[_0xe5c5('0x1c')](_0x318986);}return null;};}function patchUpdates(_0x13c6b8){return function(_0x162f71){try{jsonpatch[_0xe5c5('0x21')](_0x162f71,_0x13c6b8,!![]);}catch(_0x402924){return BPromise['reject'](_0x402924);}return _0x162f71[_0xe5c5('0x22')]();};}function saveUpdates(_0x209c24,_0x4b3bc5){return function(_0x3221fc){if(_0x3221fc){return _0x3221fc[_0xe5c5('0x23')](_0x209c24)['then'](function(_0x46f4f9){return _0x46f4f9;});}return null;};}function removeEntity(_0x972fcd,_0x4c1f42){return function(_0x5a5811){if(_0x5a5811){return _0x5a5811[_0xe5c5('0x24')]()['then'](function(){var _0x35e5e9=_0x5a5811[_0xe5c5('0x25')]({'plain':!![]});var _0x3c2031=_0xe5c5('0x26');return db[_0xe5c5('0x27')][_0xe5c5('0x24')]({'where':{'type':_0x3c2031,'resourceId':_0x35e5e9['id']}})[_0xe5c5('0x28')](function(){return _0x5a5811;});})['then'](function(){_0x972fcd[_0xe5c5('0x20')](0xcc)[_0xe5c5('0x1b')]();});}};}function handleEntityNotFound(_0x364d72,_0x1a571f){return function(_0x54d83d){if(!_0x54d83d){_0x364d72[_0xe5c5('0x1a')](0x194);}return _0x54d83d;};}function handleError(_0x3b02da,_0x3635a1){_0x3635a1=_0x3635a1||0x1f4;return function(_0x58da9f){logger[_0xe5c5('0x29')](_0x58da9f[_0xe5c5('0x2a')]);if(_0x58da9f[_0xe5c5('0x2b')]){delete _0x58da9f[_0xe5c5('0x2b')];}_0x3b02da[_0xe5c5('0x20')](_0x3635a1)[_0xe5c5('0x2c')](_0x58da9f);};}exports[_0xe5c5('0x2d')]=function(_0x200e9b,_0x18bfd2){var _0x53bc3b={},_0x2d849d={},_0xaab773={'count':0x0,'rows':[]};var _0xe6ae3c=db[_0xe5c5('0x2e')][_0xe5c5('0x2f')];_0x2d849d[_0xe5c5('0x30')]=_[_0xe5c5('0x31')](_0xe6ae3c);_0x2d849d[_0xe5c5('0x32')]=_[_0xe5c5('0x31')](_0x200e9b[_0xe5c5('0x32')]);_0x2d849d[_0xe5c5('0x33')]=_['intersection'](_0x2d849d[_0xe5c5('0x30')],_0x2d849d[_0xe5c5('0x32')]);_0x53bc3b[_0xe5c5('0x34')]=_['intersection'](_0x2d849d[_0xe5c5('0x30')],qs[_0xe5c5('0x35')](_0x200e9b[_0xe5c5('0x32')][_0xe5c5('0x35')]));_0x53bc3b[_0xe5c5('0x34')]=_0x53bc3b[_0xe5c5('0x34')][_0xe5c5('0x36')]?_0x53bc3b[_0xe5c5('0x34')]:_0x2d849d[_0xe5c5('0x30')];if(!_0x200e9b[_0xe5c5('0x32')][_0xe5c5('0x37')](_0xe5c5('0x38'))){_0x53bc3b[_0xe5c5('0x1f')]=qs[_0xe5c5('0x1f')](_0x200e9b['query'][_0xe5c5('0x1f')]);_0x53bc3b['offset']=qs[_0xe5c5('0x1e')](_0x200e9b[_0xe5c5('0x32')][_0xe5c5('0x1e')]);}_0x53bc3b[_0xe5c5('0x39')]=qs[_0xe5c5('0x3a')](_0x200e9b[_0xe5c5('0x32')][_0xe5c5('0x3a')]);_0x53bc3b[_0xe5c5('0x3b')]=qs[_0xe5c5('0x33')](_[_0xe5c5('0x3c')](_0x200e9b[_0xe5c5('0x32')],_0x2d849d[_0xe5c5('0x33')]));if(_0x200e9b[_0xe5c5('0x32')][_0xe5c5('0x3d')]){_0x53bc3b['where']=_[_0xe5c5('0x3e')](_0x53bc3b[_0xe5c5('0x3b')],{'$or':_[_0xe5c5('0x3f')](_0xe6ae3c,function(_0x5692a9){if(_0x5692a9['type'][_0xe5c5('0x40')]!=='VIRTUAL'){var _0x30f7c7={};_0x30f7c7[_0x5692a9[_0xe5c5('0x41')]]={'$like':'%'+_0x200e9b[_0xe5c5('0x32')]['filter']+'%'};return _0x30f7c7;}})});}_0x53bc3b=_[_0xe5c5('0x3e')]({},_0x53bc3b,_0x200e9b[_0xe5c5('0x42')]);var _0xc3179e={'where':_0x53bc3b[_0xe5c5('0x3b')]};return db[_0xe5c5('0x2e')][_0xe5c5('0x1d')](_0xc3179e)[_0xe5c5('0x28')](function(_0x343528){_0xaab773['count']=_0x343528;if(_0x200e9b['query'][_0xe5c5('0x43')]){_0x53bc3b[_0xe5c5('0x44')]=[{'all':!![]}];}return db[_0xe5c5('0x2e')][_0xe5c5('0x45')](_0x53bc3b);})['then'](function(_0x257399){_0xaab773[_0xe5c5('0x46')]=_0x257399;return _0xaab773;})['then'](respondWithFilteredResult(_0x18bfd2,_0x53bc3b))[_0xe5c5('0x47')](handleError(_0x18bfd2,null));};exports[_0xe5c5('0x48')]=function(_0x45fcc5,_0x4e32c){var _0xccf016={'raw':![],'where':{'id':_0x45fcc5['params']['id']}},_0x4d82e0={};_0x4d82e0[_0xe5c5('0x30')]=_[_0xe5c5('0x31')](db[_0xe5c5('0x2e')][_0xe5c5('0x2f')]);_0x4d82e0[_0xe5c5('0x32')]=_[_0xe5c5('0x31')](_0x45fcc5[_0xe5c5('0x32')]);_0x4d82e0['filters']=_[_0xe5c5('0x49')](_0x4d82e0[_0xe5c5('0x30')],_0x4d82e0[_0xe5c5('0x32')]);_0xccf016[_0xe5c5('0x34')]=_[_0xe5c5('0x49')](_0x4d82e0[_0xe5c5('0x30')],qs[_0xe5c5('0x35')](_0x45fcc5[_0xe5c5('0x32')][_0xe5c5('0x35')]));_0xccf016[_0xe5c5('0x34')]=_0xccf016[_0xe5c5('0x34')][_0xe5c5('0x36')]?_0xccf016['attributes']:_0x4d82e0[_0xe5c5('0x30')];if(_0x45fcc5[_0xe5c5('0x32')]['includeAll']){_0xccf016[_0xe5c5('0x44')]=[{'all':!![]}];}_0xccf016=_[_0xe5c5('0x3e')]({},_0xccf016,_0x45fcc5[_0xe5c5('0x42')]);return db[_0xe5c5('0x2e')][_0xe5c5('0x4a')](_0xccf016)['then'](handleEntityNotFound(_0x4e32c,null))['then'](respondWithResult(_0x4e32c,null))[_0xe5c5('0x47')](handleError(_0x4e32c,null));};exports[_0xe5c5('0x4b')]=function(_0x4ff990,_0x5d213e){return db[_0xe5c5('0x2e')]['create'](_0x4ff990[_0xe5c5('0x4c')],{})[_0xe5c5('0x28')](function(_0x44c9e3){var _0x4b76f7=_0x4ff990[_0xe5c5('0x4d')][_0xe5c5('0x25')]({'plain':!![]});if(!_0x4b76f7)throw new Error(_0xe5c5('0x4e'));if(_0x4b76f7[_0xe5c5('0x4f')]===_0xe5c5('0x4d')){var _0x29fc7f=_0x44c9e3['get']({'plain':!![]});var _0x15e675=_0xe5c5('0x26');return db['UserProfileSection'][_0xe5c5('0x4a')]({'where':{'name':_0x15e675,'userProfileId':_0x4b76f7[_0xe5c5('0x50')]},'raw':!![]})[_0xe5c5('0x28')](function(_0x30de22){if(_0x30de22&&_0x30de22[_0xe5c5('0x51')]===0x0){return db[_0xe5c5('0x27')][_0xe5c5('0x4b')]({'name':_0x29fc7f['name'],'resourceId':_0x29fc7f['id'],'type':_0x30de22['name'],'sectionId':_0x30de22['id']},{})[_0xe5c5('0x28')](function(){return _0x44c9e3;});}else{return _0x44c9e3;}})['catch'](function(_0x5070e0){logger[_0xe5c5('0x29')](_0xe5c5('0x52'),_0x5070e0);throw _0x5070e0;});}return _0x44c9e3;})['then'](respondWithResult(_0x5d213e,0xc9))[_0xe5c5('0x47')](handleError(_0x5d213e,null));};exports[_0xe5c5('0x53')]=function(_0x2b6b3e,_0x47cdee){var _0x543feb={'raw':![],'where':{'id':_0x2b6b3e['params']['id']}},_0x181486={};_0x181486['model']=_['keys'](db[_0xe5c5('0x2e')][_0xe5c5('0x2f')]);_0x543feb[_0xe5c5('0x34')]=_[_0xe5c5('0x49')](_0x181486[_0xe5c5('0x30')],qs[_0xe5c5('0x35')](_0x2b6b3e[_0xe5c5('0x32')]['fields']));_0x543feb[_0xe5c5('0x34')]=_0x543feb[_0xe5c5('0x34')][_0xe5c5('0x36')]?_0x543feb[_0xe5c5('0x34')]:_0x181486[_0xe5c5('0x30')];if(_0x2b6b3e[_0xe5c5('0x32')][_0xe5c5('0x43')]){_0x543feb['include']=[{'all':!![]}];}_0x543feb=_['merge']({},_0x543feb,_0x2b6b3e['options']);return db['Dashboard'][_0xe5c5('0x4a')](_0x543feb)['then'](handleEntityNotFound(_0x47cdee,null))[_0xe5c5('0x28')](function(_0x9cd622){if(_0x9cd622){var _0x3c0b2b=_0x9cd622[_0xe5c5('0x25')]({'plain':!![]});_0x3c0b2b=qs[_0xe5c5('0x54')](_0x3c0b2b,['id','createdAt','updatedAt']);_0x2b6b3e[_0xe5c5('0x4c')]=_[_0xe5c5('0x54')](_0x2b6b3e['body'],['id','createdAt',_0xe5c5('0x55')]);return db[_0xe5c5('0x2e')][_0xe5c5('0x4b')](_['merge'](_0x3c0b2b,_0x2b6b3e[_0xe5c5('0x4c')]),{'include':_0x2b6b3e['query'][_0xe5c5('0x43')]?[{'all':!![]}]:undefined})['then'](function(_0x111c40){var _0xe419e7=_0x2b6b3e[_0xe5c5('0x4d')][_0xe5c5('0x25')]({'plain':!![]});if(!_0xe419e7)throw new Error(_0xe5c5('0x4e'));if(_0xe419e7['role']===_0xe5c5('0x4d')){var _0x87a703=_0x111c40[_0xe5c5('0x25')]({'plain':!![]});var _0x48bdc4='CustomDashboards';return db['UserProfileSection'][_0xe5c5('0x4a')]({'where':{'name':_0x48bdc4,'userProfileId':_0xe419e7[_0xe5c5('0x50')]},'raw':!![]})[_0xe5c5('0x28')](function(_0x554814){if(_0x554814&&_0x554814[_0xe5c5('0x51')]===0x0){return db[_0xe5c5('0x27')]['create']({'name':_0x87a703[_0xe5c5('0x2b')],'resourceId':_0x87a703['id'],'type':_0x554814[_0xe5c5('0x2b')],'sectionId':_0x554814['id']},{})[_0xe5c5('0x28')](function(){return _0x111c40;});}else{return _0x111c40;}})[_0xe5c5('0x47')](function(_0x275094){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x275094);throw _0x275094;});}return _0x111c40;});}})[_0xe5c5('0x28')](respondWithResult(_0x47cdee,0xc9))[_0xe5c5('0x47')](handleError(_0x47cdee,null));};exports[_0xe5c5('0x23')]=function(_0x504af2,_0x495590){if(_0x504af2[_0xe5c5('0x4c')]['id']){delete _0x504af2['body']['id'];}return db[_0xe5c5('0x2e')][_0xe5c5('0x4a')]({'where':{'id':_0x504af2[_0xe5c5('0x56')]['id']}})['then'](handleEntityNotFound(_0x495590,null))[_0xe5c5('0x28')](saveUpdates(_0x504af2['body'],null))[_0xe5c5('0x28')](respondWithResult(_0x495590,null))[_0xe5c5('0x47')](handleError(_0x495590,null));};exports[_0xe5c5('0x24')]=function(_0x9f5b89,_0x2efd51){return db['Dashboard'][_0xe5c5('0x4a')]({'where':{'id':_0x9f5b89[_0xe5c5('0x56')]['id']}})[_0xe5c5('0x28')](handleEntityNotFound(_0x2efd51,null))[_0xe5c5('0x28')](removeEntity(_0x2efd51,null))[_0xe5c5('0x47')](handleError(_0x2efd51,null));};function widgetAttributes(_0x16b4ca){try{switch(_0x16b4ca[_0xe5c5('0x57')]){case _0xe5c5('0x58'):return[{'name':_0xe5c5('0x59'),'value':_0x16b4ca[_0xe5c5('0x59')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x0]?_0x16b4ca[_0xe5c5('0x5a')][0x0][_0xe5c5('0x5b')]:undefined)||'https://'}];case _0xe5c5('0x5c'):return[{'name':_0xe5c5('0x5d'),'value':_0x16b4ca[_0xe5c5('0x5d')]||(_0x16b4ca['attrs']&&_0x16b4ca[_0xe5c5('0x5a')][0x0]?_0x16b4ca[_0xe5c5('0x5a')][0x0][_0xe5c5('0x5b')]:undefined)||''}];case'clock':return[{'name':'attrHourFormat','value':_0x16b4ca[_0xe5c5('0x5e')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca['attrs'][0x0]?_0x16b4ca['attrs'][0x0][_0xe5c5('0x5b')]:undefined)||_0xe5c5('0x5f')},{'name':_0xe5c5('0x60'),'value':_0x16b4ca[_0xe5c5('0x60')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x1]?_0x16b4ca[_0xe5c5('0x5a')][0x1]['value']:undefined)||'0.00'},{'name':_0xe5c5('0x61'),'value':_0x16b4ca['attrFontSize']||(_0x16b4ca['attrs']&&_0x16b4ca[_0xe5c5('0x5a')][0x2]?_0x16b4ca[_0xe5c5('0x5a')][0x2]['value']:undefined)||0xc}];case _0xe5c5('0x62'):return[{'name':_0xe5c5('0x63'),'value':_0x16b4ca[_0xe5c5('0x63')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x0]?_0x16b4ca[_0xe5c5('0x5a')][0x0][_0xe5c5('0x5b')]:undefined)||_0xe5c5('0x64')},{'name':_0xe5c5('0x65'),'value':_0x16b4ca[_0xe5c5('0x65')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x1]?_0x16b4ca[_0xe5c5('0x5a')][0x1][_0xe5c5('0x5b')]:undefined)||[]},{'name':'attrFontSize','value':_0x16b4ca[_0xe5c5('0x61')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x2]?_0x16b4ca[_0xe5c5('0x5a')][0x2][_0xe5c5('0x5b')]:undefined)||0x14}];case _0xe5c5('0x66'):case _0xe5c5('0x67'):return[{'name':_0xe5c5('0x68'),'value':_0x16b4ca[_0xe5c5('0x68')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x0]?_0x16b4ca[_0xe5c5('0x5a')][0x0][_0xe5c5('0x5b')]:undefined)||_0xe5c5('0x64')},{'name':_0xe5c5('0x69'),'value':_0x16b4ca[_0xe5c5('0x69')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x1]?_0x16b4ca[_0xe5c5('0x5a')][0x1][_0xe5c5('0x5b')]:undefined)||null},{'name':_0xe5c5('0x6a'),'value':_0x16b4ca[_0xe5c5('0x6a')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x2]?_0x16b4ca[_0xe5c5('0x5a')][0x2][_0xe5c5('0x5b')]:undefined)||null},{'name':_0xe5c5('0x65'),'value':_0x16b4ca[_0xe5c5('0x65')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x3]?_0x16b4ca[_0xe5c5('0x5a')][0x3]['value']:undefined)||[]}];case _0xe5c5('0x6b'):return[{'name':_0xe5c5('0x6c'),'type':_0x16b4ca[_0xe5c5('0x6d')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x0]?_0x16b4ca[_0xe5c5('0x5a')][0x0][_0xe5c5('0x57')]:undefined)||null,'value':_0x16b4ca[_0xe5c5('0x6c')]||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x0]?_0x16b4ca[_0xe5c5('0x5a')][0x0][_0xe5c5('0x5b')]:undefined)||null},{'name':_0xe5c5('0x6e'),'value':_0x16b4ca['attrRefresh']||(_0x16b4ca[_0xe5c5('0x5a')]&&_0x16b4ca[_0xe5c5('0x5a')][0x1]?_0x16b4ca[_0xe5c5('0x5a')][0x1][_0xe5c5('0x5b')]:undefined)||0x0}];default:return[];}}catch(_0x4879ce){logger[_0xe5c5('0x29')](_0xe5c5('0x6f'),JSON[_0xe5c5('0x70')](_0x4879ce));return[];}}exports[_0xe5c5('0x71')]=function(_0x426c2,_0x2d0e38,_0x154644){if(_0x426c2[_0xe5c5('0x4c')]['id']){delete _0x426c2[_0xe5c5('0x4c')]['id'];}return db[_0xe5c5('0x2e')][_0xe5c5('0x4a')]({'where':{'id':_0x426c2[_0xe5c5('0x56')]['id']}})[_0xe5c5('0x28')](handleEntityNotFound(_0x2d0e38,null))[_0xe5c5('0x28')](function(_0x5a2ad7){if(_0x5a2ad7){_0x426c2[_0xe5c5('0x4c')][_0xe5c5('0x72')]=_0x5a2ad7['id'];_0x426c2[_0xe5c5('0x4c')][_0xe5c5('0x5a')]=widgetAttributes(_0x426c2[_0xe5c5('0x4c')]);return db[_0xe5c5('0x73')][_0xe5c5('0x4b')](_0x426c2[_0xe5c5('0x4c')]);}})['then'](respondWithResult(_0x2d0e38,null))[_0xe5c5('0x47')](handleError(_0x2d0e38,null));};exports[_0xe5c5('0x74')]=function(_0x25b646,_0x216804,_0x409d78){var _0x2222e8={};var _0x580be0={};var _0x43ad0c;var _0x35d902;return db[_0xe5c5('0x2e')][_0xe5c5('0x75')]({'where':{'id':_0x25b646[_0xe5c5('0x56')]['id']}})[_0xe5c5('0x28')](handleEntityNotFound(_0x216804,null))[_0xe5c5('0x28')](function(_0xeb5e39){if(_0xeb5e39){_0x43ad0c=_0xeb5e39;_0x580be0[_0xe5c5('0x30')]=_[_0xe5c5('0x31')](db['DashboardItem']['rawAttributes']);_0x580be0[_0xe5c5('0x32')]=_[_0xe5c5('0x31')](_0x25b646['query']);_0x580be0[_0xe5c5('0x33')]=_[_0xe5c5('0x49')](_0x580be0[_0xe5c5('0x30')],_0x580be0[_0xe5c5('0x32')]);_0x2222e8[_0xe5c5('0x34')]=_['intersection'](_0x580be0[_0xe5c5('0x30')],qs[_0xe5c5('0x35')](_0x25b646[_0xe5c5('0x32')]['fields']));_0x2222e8[_0xe5c5('0x34')]=_0x2222e8[_0xe5c5('0x34')][_0xe5c5('0x36')]?_0x2222e8[_0xe5c5('0x34')]:_0x580be0['model'];_0x2222e8['order']=qs[_0xe5c5('0x3a')](_0x25b646['query'][_0xe5c5('0x3a')]);_0x2222e8[_0xe5c5('0x3b')]=qs['filters'](_[_0xe5c5('0x3c')](_0x25b646[_0xe5c5('0x32')],_0x580be0[_0xe5c5('0x33')]));if(_0x25b646['query'][_0xe5c5('0x3d')]){_0x2222e8[_0xe5c5('0x3b')]=_[_0xe5c5('0x3e')](_0x2222e8['where'],{'$or':_[_0xe5c5('0x3f')](_0x2222e8[_0xe5c5('0x34')],function(_0x2cd000){var _0x1a6fb5={};_0x1a6fb5[_0x2cd000]={'$like':'%'+_0x25b646[_0xe5c5('0x32')][_0xe5c5('0x3d')]+'%'};return _0x1a6fb5;})});}_0x2222e8=_['merge']({},_0x2222e8,_0x25b646[_0xe5c5('0x42')]);return _0x43ad0c[_0xe5c5('0x74')](_0x2222e8);}})[_0xe5c5('0x28')](function(_0x9e431b){if(_0x9e431b){_0x35d902=_0x9e431b[_0xe5c5('0x36')];if(!_0x25b646[_0xe5c5('0x32')]['hasOwnProperty'](_0xe5c5('0x38'))){_0x2222e8[_0xe5c5('0x1f')]=qs[_0xe5c5('0x1f')](_0x25b646[_0xe5c5('0x32')][_0xe5c5('0x1f')]);_0x2222e8[_0xe5c5('0x1e')]=qs['offset'](_0x25b646[_0xe5c5('0x32')][_0xe5c5('0x1e')]);}return _0x43ad0c[_0xe5c5('0x74')](_0x2222e8);}})['then'](function(_0x4bcdde){if(_0x4bcdde){return _0x4bcdde?{'count':_0x35d902,'rows':_0x4bcdde}:null;}})[_0xe5c5('0x28')](respondWithResult(_0x216804,null))[_0xe5c5('0x47')](handleError(_0x216804,null));};
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js
index 9ec1846..e0485c4 100644
--- a/server/api/dashboard/dashboard.events.js
+++ b/server/api/dashboard/dashboard.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xed5f=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','Dashboard'];(function(_0x1840dc,_0x2ced85){var _0x29d747=function(_0x5d4fc1){while(--_0x5d4fc1){_0x1840dc['push'](_0x1840dc['shift']());}};_0x29d747(++_0x2ced85);}(_0xed5f,0x1de));var _0xfed5=function(_0xb98d6f,_0xc10327){_0xb98d6f=_0xb98d6f-0x0;var _0x3aae43=_0xed5f[_0xb98d6f];return _0x3aae43;};'use strict';var EventEmitter=require(_0xfed5('0x0'));var Dashboard=require('../../mysqldb')['db'][_0xfed5('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xfed5('0x2')](0x0);var events={'afterCreate':_0xfed5('0x3'),'afterUpdate':_0xfed5('0x4'),'afterDestroy':_0xfed5('0x5')};function emitEvent(_0x562d89){return function(_0x2dee02,_0x19f842,_0x36702d){DashboardEvents[_0xfed5('0x6')](_0x562d89+':'+_0x2dee02['id'],_0x2dee02);DashboardEvents[_0xfed5('0x6')](_0x562d89,_0x2dee02);_0x36702d(null);};}for(var e in events){if(events[_0xfed5('0x7')](e)){var event=events[e];Dashboard[_0xfed5('0x8')](e,emitEvent(event));}}module[_0xfed5('0x9')]=DashboardEvents;
\ No newline at end of file
+var _0xd217=['exports','../../mysqldb','Dashboard','save','update','remove','emit','hook'];(function(_0x365c62,_0x1845a3){var _0x18e25f=function(_0x46858d){while(--_0x46858d){_0x365c62['push'](_0x365c62['shift']());}};_0x18e25f(++_0x1845a3);}(_0xd217,0x141));var _0x7d21=function(_0x3f9044,_0x5942ed){_0x3f9044=_0x3f9044-0x0;var _0x399e08=_0xd217[_0x3f9044];return _0x399e08;};'use strict';var EventEmitter=require('events');var Dashboard=require(_0x7d21('0x0'))['db'][_0x7d21('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7d21('0x2'),'afterUpdate':_0x7d21('0x3'),'afterDestroy':_0x7d21('0x4')};function emitEvent(_0x3dd45a){return function(_0x17825a,_0x42d0c3,_0x2ea580){DashboardEvents[_0x7d21('0x5')](_0x3dd45a+':'+_0x17825a['id'],_0x17825a);DashboardEvents['emit'](_0x3dd45a,_0x17825a);_0x2ea580(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard[_0x7d21('0x6')](e,emitEvent(event));}}module[_0x7d21('0x7')]=DashboardEvents;
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.model.js b/server/api/dashboard/dashboard.model.js
index c061c9f..c72540e 100644
--- a/server/api/dashboard/dashboard.model.js
+++ b/server/api/dashboard/dashboard.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xad86=['dashboards','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./dashboard.attributes','exports','define','Dashboard'];(function(_0x292827,_0x95f387){var _0x485407=function(_0x3096eb){while(--_0x3096eb){_0x292827['push'](_0x292827['shift']());}};_0x485407(++_0x95f387);}(_0xad86,0x194));var _0x6ad8=function(_0x1fe1c1,_0x4a2603){_0x1fe1c1=_0x1fe1c1-0x0;var _0x13901e=_0xad86[_0x1fe1c1];return _0x13901e;};'use strict';var _=require(_0x6ad8('0x0'));var util=require(_0x6ad8('0x1'));var logger=require(_0x6ad8('0x2'))(_0x6ad8('0x3'));var moment=require(_0x6ad8('0x4'));var BPromise=require(_0x6ad8('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x6ad8('0x6'));var config=require(_0x6ad8('0x7'));var attributes=require(_0x6ad8('0x8'));module[_0x6ad8('0x9')]=function(_0x59fb87,_0x4d498c){return _0x59fb87[_0x6ad8('0xa')](_0x6ad8('0xb'),attributes,{'tableName':_0x6ad8('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe9b9=['exports','Dashboard','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x24edc6,_0x19d60a){var _0xf782f8=function(_0x58641e){while(--_0x58641e){_0x24edc6['push'](_0x24edc6['shift']());}};_0xf782f8(++_0x19d60a);}(_0xe9b9,0xd4));var _0x9e9b=function(_0x174583,_0x468485){_0x174583=_0x174583-0x0;var _0x14e46f=_0xe9b9[_0x174583];return _0x14e46f;};'use strict';var _=require(_0x9e9b('0x0'));var util=require(_0x9e9b('0x1'));var logger=require(_0x9e9b('0x2'))(_0x9e9b('0x3'));var moment=require(_0x9e9b('0x4'));var BPromise=require(_0x9e9b('0x5'));var rp=require(_0x9e9b('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9e9b('0x7'));var config=require('../../config/environment');var attributes=require('./dashboard.attributes');module[_0x9e9b('0x8')]=function(_0x35e077,_0x49ac7c){return _0x35e077['define'](_0x9e9b('0x9'),attributes,{'tableName':'dashboards','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.rpc.js b/server/api/dashboard/dashboard.rpc.js
index 455a7ff..ba8a58a 100644
--- a/server/api/dashboard/dashboard.rpc.js
+++ b/server/api/dashboard/dashboard.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e56=['moment','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./dashboard.socket','register','request','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','error','code','Dashboard,\x20%s,\x20%s','message','info','result','catch','lodash','util'];(function(_0x344a3f,_0x579a22){var _0x264712=function(_0x34c9f0){while(--_0x34c9f0){_0x344a3f['push'](_0x344a3f['shift']());}};_0x264712(++_0x579a22);}(_0x9e56,0xbb));var _0x69e5=function(_0x265c81,_0x4d539a){_0x265c81=_0x265c81-0x0;var _0x3e63d1=_0x9e56[_0x265c81];return _0x3e63d1;};'use strict';var _=require(_0x69e5('0x0'));var util=require(_0x69e5('0x1'));var moment=require(_0x69e5('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x69e5('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x69e5('0x4'))(_0x69e5('0x5'));var config=require(_0x69e5('0x6'));var jayson=require(_0x69e5('0x7'));var client=jayson[_0x69e5('0x8')][_0x69e5('0x9')]({'port':0x232a});config['redis']=_[_0x69e5('0xa')](config[_0x69e5('0xb')],{'host':_0x69e5('0xc'),'port':0x18eb});var socket=require(_0x69e5('0xd'))(new Redis(config[_0x69e5('0xb')]));require(_0x69e5('0xe'))[_0x69e5('0xf')](socket);function respondWithRpcPromise(_0x53a085,_0x2f61a7,_0x1b37a9){return new BPromise(function(_0x215a58,_0xf57d8c){return client[_0x69e5('0x10')](_0x53a085,_0x1b37a9)['then'](function(_0x456016){logger['info']('Dashboard,\x20%s,\x20%s',_0x2f61a7,_0x69e5('0x11'));logger[_0x69e5('0x12')](_0x69e5('0x13'),_0x2f61a7,_0x69e5('0x11'),JSON['stringify'](_0x456016));if(_0x456016[_0x69e5('0x14')]){if(_0x456016[_0x69e5('0x14')][_0x69e5('0x15')]===0x1f4){logger[_0x69e5('0x14')](_0x69e5('0x16'),_0x2f61a7,_0x456016[_0x69e5('0x14')]['message']);return _0xf57d8c(_0x456016['error'][_0x69e5('0x17')]);}logger[_0x69e5('0x14')](_0x69e5('0x16'),_0x2f61a7,_0x456016[_0x69e5('0x14')][_0x69e5('0x17')]);return _0x215a58(_0x456016[_0x69e5('0x14')][_0x69e5('0x17')]);}else{logger[_0x69e5('0x18')](_0x69e5('0x16'),_0x2f61a7,_0x69e5('0x11'));_0x215a58(_0x456016[_0x69e5('0x19')][_0x69e5('0x17')]);}})[_0x69e5('0x1a')](function(_0x2e4c7f){logger[_0x69e5('0x14')](_0x69e5('0x16'),_0x2f61a7,_0x2e4c7f);_0xf57d8c(_0x2e4c7f);});});}
\ No newline at end of file
+var _0x1dc8=['then','Dashboard,\x20%s,\x20%s','request\x20sent','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','util','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','http','redis','defaults','localhost','./dashboard.socket'];(function(_0x1a72f3,_0x217011){var _0x57ef47=function(_0x20123d){while(--_0x20123d){_0x1a72f3['push'](_0x1a72f3['shift']());}};_0x57ef47(++_0x217011);}(_0x1dc8,0x78));var _0x81dc=function(_0x5cfe8e,_0x5e7250){_0x5cfe8e=_0x5cfe8e-0x0;var _0x3f8b08=_0x1dc8[_0x5cfe8e];return _0x3f8b08;};'use strict';var _=require(_0x81dc('0x0'));var util=require(_0x81dc('0x1'));var moment=require('moment');var BPromise=require(_0x81dc('0x2'));var rs=require(_0x81dc('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x81dc('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x81dc('0x5'));var config=require(_0x81dc('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0x81dc('0x7')]({'port':0x232a});config[_0x81dc('0x8')]=_[_0x81dc('0x9')](config[_0x81dc('0x8')],{'host':_0x81dc('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x81dc('0x8')]));require(_0x81dc('0xb'))['register'](socket);function respondWithRpcPromise(_0x186c18,_0x57c836,_0x95fba7){return new BPromise(function(_0x2e0957,_0x256e93){return client['request'](_0x186c18,_0x95fba7)[_0x81dc('0xc')](function(_0x3f2fc5){logger['info'](_0x81dc('0xd'),_0x57c836,_0x81dc('0xe'));logger['debug'](_0x81dc('0xf'),_0x57c836,_0x81dc('0xe'),JSON[_0x81dc('0x10')](_0x3f2fc5));if(_0x3f2fc5[_0x81dc('0x11')]){if(_0x3f2fc5[_0x81dc('0x11')][_0x81dc('0x12')]===0x1f4){logger[_0x81dc('0x11')](_0x81dc('0xd'),_0x57c836,_0x3f2fc5[_0x81dc('0x11')][_0x81dc('0x13')]);return _0x256e93(_0x3f2fc5[_0x81dc('0x11')][_0x81dc('0x13')]);}logger[_0x81dc('0x11')](_0x81dc('0xd'),_0x57c836,_0x3f2fc5[_0x81dc('0x11')][_0x81dc('0x13')]);return _0x2e0957(_0x3f2fc5[_0x81dc('0x11')][_0x81dc('0x13')]);}else{logger[_0x81dc('0x14')]('Dashboard,\x20%s,\x20%s',_0x57c836,_0x81dc('0xe'));_0x2e0957(_0x3f2fc5['result'][_0x81dc('0x13')]);}})[_0x81dc('0x15')](function(_0x5b9701){logger[_0x81dc('0x11')](_0x81dc('0xd'),_0x57c836,_0x5b9701);_0x256e93(_0x5b9701);});});}
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js
index 10fc354..d735465 100644
--- a/server/api/dashboard/dashboard.socket.js
+++ b/server/api/dashboard/dashboard.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc9d6=['update','emit','removeListener','register','dashboard:','./dashboard.events','save','remove'];(function(_0xdc7ebc,_0x5b1898){var _0x2d4933=function(_0x16f914){while(--_0x16f914){_0xdc7ebc['push'](_0xdc7ebc['shift']());}};_0x2d4933(++_0x5b1898);}(_0xc9d6,0x9d));var _0x6c9d=function(_0x10e87a,_0x39b801){_0x10e87a=_0x10e87a-0x0;var _0x30274d=_0xc9d6[_0x10e87a];return _0x30274d;};'use strict';var DashboardEvents=require(_0x6c9d('0x0'));var events=[_0x6c9d('0x1'),_0x6c9d('0x2'),_0x6c9d('0x3')];function createListener(_0x599ff2,_0x193e7d){return function(_0x26e05f){_0x193e7d[_0x6c9d('0x4')](_0x599ff2,_0x26e05f);};}function removeListener(_0x12c21e,_0x1312fe){return function(){DashboardEvents[_0x6c9d('0x5')](_0x12c21e,_0x1312fe);};}exports[_0x6c9d('0x6')]=function(_0x19bda5){for(var _0x2101f3=0x0,_0x1256ee=events['length'];_0x2101f3<_0x1256ee;_0x2101f3++){var _0x89d91c=events[_0x2101f3];var _0x531bee=createListener(_0x6c9d('0x7')+_0x89d91c,_0x19bda5);DashboardEvents['on'](_0x89d91c,_0x531bee);}};
\ No newline at end of file
+var _0x4b60=['update','removeListener','length','dashboard:','./dashboard.events','remove'];(function(_0x8f7d2b,_0x1bebaf){var _0x13c298=function(_0x54717e){while(--_0x54717e){_0x8f7d2b['push'](_0x8f7d2b['shift']());}};_0x13c298(++_0x1bebaf);}(_0x4b60,0x178));var _0x04b6=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x4b60[_0x14add3];return _0x4a174f;};'use strict';var DashboardEvents=require(_0x04b6('0x0'));var events=['save',_0x04b6('0x1'),_0x04b6('0x2')];function createListener(_0xf93770,_0x2da6de){return function(_0x324e0f){_0x2da6de['emit'](_0xf93770,_0x324e0f);};}function removeListener(_0x382ee5,_0x3e98d3){return function(){DashboardEvents[_0x04b6('0x3')](_0x382ee5,_0x3e98d3);};}exports['register']=function(_0x6b0126){for(var _0xb7c1e7=0x0,_0x4bd0b6=events[_0x04b6('0x4')];_0xb7c1e7<_0x4bd0b6;_0xb7c1e7++){var _0x180b0b=events[_0xb7c1e7];var _0x57fd29=createListener(_0x04b6('0x5')+_0x180b0b,_0x6b0126);DashboardEvents['on'](_0x180b0b,_0x57fd29);}};
\ No newline at end of file
diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js
index 764087f..1dc6249 100644
--- a/server/api/dashboard/index.js
+++ b/server/api/dashboard/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xddd2=['destroy','exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboard.controller','get','index','/:id','isAuthenticated','show','getItems','post','create','/:id/clone','clone','addItem','put','update','delete'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xddd2,0x1e2));var _0x2ddd=function(_0x4e2f0c,_0x3457aa){_0x4e2f0c=_0x4e2f0c-0x0;var _0x1c9501=_0xddd2[_0x4e2f0c];return _0x1c9501;};'use strict';var multer=require(_0x2ddd('0x0'));var util=require('util');var path=require(_0x2ddd('0x1'));var timeout=require('connect-timeout');var express=require(_0x2ddd('0x2'));var router=express[_0x2ddd('0x3')]();var auth=require(_0x2ddd('0x4'));var interaction=require(_0x2ddd('0x5'));var config=require(_0x2ddd('0x6'));var controller=require(_0x2ddd('0x7'));router[_0x2ddd('0x8')]('/',auth['isAuthenticated'](),controller[_0x2ddd('0x9')]);router[_0x2ddd('0x8')](_0x2ddd('0xa'),auth[_0x2ddd('0xb')](),controller[_0x2ddd('0xc')]);router[_0x2ddd('0x8')]('/:id/items',auth[_0x2ddd('0xb')](),controller[_0x2ddd('0xd')]);router[_0x2ddd('0xe')]('/',auth[_0x2ddd('0xb')](),controller[_0x2ddd('0xf')]);router[_0x2ddd('0xe')](_0x2ddd('0x10'),auth[_0x2ddd('0xb')](),controller[_0x2ddd('0x11')]);router[_0x2ddd('0xe')]('/:id/items',auth[_0x2ddd('0xb')](),controller[_0x2ddd('0x12')]);router[_0x2ddd('0x13')](_0x2ddd('0xa'),auth[_0x2ddd('0xb')](),controller[_0x2ddd('0x14')]);router[_0x2ddd('0x15')](_0x2ddd('0xa'),auth['isAuthenticated'](),controller[_0x2ddd('0x16')]);module[_0x2ddd('0x17')]=router;
\ No newline at end of file
+var _0x2675=['../../components/interaction/service','../../config/environment','./dashboard.controller','isAuthenticated','get','show','getItems','post','create','/:id/clone','clone','/:id/items','addItem','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0x2675,0x165));var _0x5267=function(_0x304c51,_0x48e0b5){_0x304c51=_0x304c51-0x0;var _0x483e41=_0x2675[_0x304c51];return _0x483e41;};'use strict';var multer=require(_0x5267('0x0'));var util=require(_0x5267('0x1'));var path=require(_0x5267('0x2'));var timeout=require(_0x5267('0x3'));var express=require(_0x5267('0x4'));var router=express[_0x5267('0x5')]();var auth=require(_0x5267('0x6'));var interaction=require(_0x5267('0x7'));var config=require(_0x5267('0x8'));var controller=require(_0x5267('0x9'));router['get']('/',auth[_0x5267('0xa')](),controller['index']);router[_0x5267('0xb')]('/:id',auth['isAuthenticated'](),controller[_0x5267('0xc')]);router[_0x5267('0xb')]('/:id/items',auth[_0x5267('0xa')](),controller[_0x5267('0xd')]);router[_0x5267('0xe')]('/',auth[_0x5267('0xa')](),controller[_0x5267('0xf')]);router[_0x5267('0xe')](_0x5267('0x10'),auth[_0x5267('0xa')](),controller[_0x5267('0x11')]);router[_0x5267('0xe')](_0x5267('0x12'),auth[_0x5267('0xa')](),controller[_0x5267('0x13')]);router[_0x5267('0x14')](_0x5267('0x15'),auth[_0x5267('0xa')](),controller[_0x5267('0x16')]);router[_0x5267('0x17')](_0x5267('0x15'),auth[_0x5267('0xa')](),controller[_0x5267('0x18')]);module[_0x5267('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.attributes.js b/server/api/dashboardItem/dashboardItem.attributes.js
index ac895fe..2d4dab6 100644
--- a/server/api/dashboardItem/dashboardItem.attributes.js
+++ b/server/api/dashboardItem/dashboardItem.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfe87=['sequelize','squel','lodash','exports','STRING','TEXT','long','parse','getDataValue','setDataValue','attrs','stringify','INTEGER','#ffffff','#2196f3'];(function(_0x139a3c,_0x4fc883){var _0x2b375b=function(_0x525dbf){while(--_0x525dbf){_0x139a3c['push'](_0x139a3c['shift']());}};_0x2b375b(++_0x4fc883);}(_0xfe87,0x159));var _0x7fe8=function(_0x382787,_0x4175d3){_0x382787=_0x382787-0x0;var _0x58f86d=_0xfe87[_0x382787];return _0x58f86d;};'use strict';var Sequelize=require(_0x7fe8('0x0'));var squel=require(_0x7fe8('0x1'));var _=require(_0x7fe8('0x2'));module[_0x7fe8('0x3')]={'title':{'type':Sequelize[_0x7fe8('0x4')],'allowNull':![]},'type':{'type':Sequelize['STRING'](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x7fe8('0x5')](_0x7fe8('0x6')),'get':function(){try{return JSON[_0x7fe8('0x7')](this[_0x7fe8('0x8')]('attrs'));}catch(_0x29877e){return[];}},'set':function(_0x369a9b){try{this[_0x7fe8('0x9')](_0x7fe8('0xa'),JSON[_0x7fe8('0xb')](_0x369a9b));}catch(_0x135dde){this['setDataValue'](_0x7fe8('0xa'),JSON[_0x7fe8('0xb')]([]));}}},'sizeX':{'type':Sequelize[_0x7fe8('0xc')],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x7fe8('0xc')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x7fe8('0xc')]},'col':{'type':Sequelize['INTEGER']},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7fe8('0xd'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize[_0x7fe8('0x4')],'allowNull':![],'defaultValue':_0x7fe8('0xe'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x7fe8('0x4')]}};
\ No newline at end of file
+var _0xea8d=['sequelize','squel','lodash','exports','STRING','TEXT','long','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff'];(function(_0x485bb8,_0x3757e7){var _0x5d5c74=function(_0x58ae3d){while(--_0x58ae3d){_0x485bb8['push'](_0x485bb8['shift']());}};_0x5d5c74(++_0x3757e7);}(_0xea8d,0x10a));var _0xdea8=function(_0x256efe,_0x42bac2){_0x256efe=_0x256efe-0x0;var _0x3ef15b=_0xea8d[_0x256efe];return _0x3ef15b;};'use strict';var Sequelize=require(_0xdea8('0x0'));var squel=require(_0xdea8('0x1'));var _=require(_0xdea8('0x2'));module[_0xdea8('0x3')]={'title':{'type':Sequelize[_0xdea8('0x4')],'allowNull':![]},'type':{'type':Sequelize[_0xdea8('0x4')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0xdea8('0x5')](_0xdea8('0x6')),'get':function(){try{return JSON[_0xdea8('0x7')](this[_0xdea8('0x8')](_0xdea8('0x9')));}catch(_0x57cb02){return[];}},'set':function(_0x7ddec2){try{this['setDataValue'](_0xdea8('0x9'),JSON['stringify'](_0x7ddec2));}catch(_0x3dd601){this[_0xdea8('0xa')](_0xdea8('0x9'),JSON[_0xdea8('0xb')]([]));}}},'sizeX':{'type':Sequelize[_0xdea8('0xc')],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0xdea8('0xc')]},'col':{'type':Sequelize[_0xdea8('0xc')]},'background':{'type':Sequelize[_0xdea8('0x4')],'allowNull':![],'defaultValue':_0xdea8('0xd'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#2196f3','validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0xdea8('0x4')]}};
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.controller.js b/server/api/dashboardItem/dashboardItem.controller.js
index 60001ab..bd1ddd5 100644
--- a/server/api/dashboardItem/dashboardItem.controller.js
+++ b/server/api/dashboardItem/dashboardItem.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb4b=['attrVoiceQueues','multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','reportType','type','attrReport','attrRefresh','widgetAttributes:\x20%s','stringify','create','body','update','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','sendStatus','status','end','json','count','offset','Content-Range','save','destroy','error','name','send','show','model','keys','DashboardItem','rawAttributes','query','attributes','intersection','fields','length','includeAll','merge','then','catch','find','params','iframe','attrUrl','attrs','value','https://','attrPath','clock','attrHourFormat','attrTimezone','attrFontSize','counter','attrMetric','total'];(function(_0x1c8222,_0x13db80){var _0x4f0256=function(_0x384d1b){while(--_0x384d1b){_0x1c8222['push'](_0x1c8222['shift']());}};_0x4f0256(++_0x13db80);}(_0xdb4b,0x16b));var _0xbdb4=function(_0x1760e9,_0xbbfd0b){_0x1760e9=_0x1760e9-0x0;var _0x3fe586=_0xdb4b[_0x1760e9];return _0x3fe586;};'use strict';var pdf=require(_0xbdb4('0x0'));var emlformat=require(_0xbdb4('0x1'));var rimraf=require(_0xbdb4('0x2'));var zipdir=require(_0xbdb4('0x3'));var jsonpatch=require(_0xbdb4('0x4'));var rp=require(_0xbdb4('0x5'));var moment=require(_0xbdb4('0x6'));var BPromise=require(_0xbdb4('0x7'));var Mustache=require(_0xbdb4('0x8'));var util=require(_0xbdb4('0x9'));var path=require(_0xbdb4('0xa'));var sox=require(_0xbdb4('0xb'));var csv=require(_0xbdb4('0xc'));var ejs=require(_0xbdb4('0xd'));var fs=require('fs');var _=require(_0xbdb4('0xe'));var squel=require('squel');var crypto=require(_0xbdb4('0xf'));var jsforce=require(_0xbdb4('0x10'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xbdb4('0x11'));var Papa=require('papaparse');var Redis=require(_0xbdb4('0x12'));var authService=require(_0xbdb4('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xbdb4('0x14'));var logger=require(_0xbdb4('0x15'))(_0xbdb4('0x16'));var utils=require(_0xbdb4('0x17'));var config=require(_0xbdb4('0x18'));var db=require('../../mysqldb')['db'];config[_0xbdb4('0x19')]=_[_0xbdb4('0x1a')](config[_0xbdb4('0x19')],{'host':_0xbdb4('0x1b'),'port':0x18eb});var socket=require(_0xbdb4('0x1c'))(new Redis(config['redis']));require(_0xbdb4('0x1d'))[_0xbdb4('0x1e')](socket);function respondWithStatusCode(_0x17681a,_0x174d52){_0x174d52=_0x174d52||0xcc;return function(_0x384a53){if(_0x384a53){return _0x17681a[_0xbdb4('0x1f')](_0x174d52);}return _0x17681a[_0xbdb4('0x20')](_0x174d52)[_0xbdb4('0x21')]();};}function respondWithResult(_0x297fd7,_0x339152){_0x339152=_0x339152||0xc8;return function(_0x37d138){if(_0x37d138){return _0x297fd7[_0xbdb4('0x20')](_0x339152)[_0xbdb4('0x22')](_0x37d138);}};}function respondWithFilteredResult(_0x1ececc,_0x55317c){return function(_0x267fbf){if(_0x267fbf){var _0x5bf48e=_0x267fbf[_0xbdb4('0x23')],_0x253482=_0x55317c[_0xbdb4('0x24')],_0x359111=_0x55317c[_0xbdb4('0x24')]+_0x55317c['limit'],_0x4d78f5;if(_0x359111>=_0x5bf48e){_0x359111=_0x5bf48e;_0x4d78f5=0xc8;}else{_0x4d78f5=0xce;}_0x1ececc[_0xbdb4('0x20')](_0x4d78f5);return _0x1ececc['set'](_0xbdb4('0x25'),_0x253482+'-'+_0x359111+'/'+_0x5bf48e)['json'](_0x267fbf);}return null;};}function patchUpdates(_0xcf5aa8){return function(_0x2f1e45){try{jsonpatch['apply'](_0x2f1e45,_0xcf5aa8,!![]);}catch(_0x5ef305){return BPromise['reject'](_0x5ef305);}return _0x2f1e45[_0xbdb4('0x26')]();};}function saveUpdates(_0x548efc,_0x18f45e){return function(_0x1a5782){if(_0x1a5782){return _0x1a5782['update'](_0x548efc)['then'](function(_0x22d29b){return _0x22d29b;});}return null;};}function removeEntity(_0x237deb,_0xfc625f){return function(_0x3c5db1){if(_0x3c5db1){return _0x3c5db1[_0xbdb4('0x27')]()['then'](function(){_0x237deb[_0xbdb4('0x20')](0xcc)[_0xbdb4('0x21')]();});}};}function handleEntityNotFound(_0x52b044,_0x3db99a){return function(_0x26a80f){if(!_0x26a80f){_0x52b044['sendStatus'](0x194);}return _0x26a80f;};}function handleError(_0x1e2a73,_0x1ed2e1){_0x1ed2e1=_0x1ed2e1||0x1f4;return function(_0x40b5c2){logger[_0xbdb4('0x28')](_0x40b5c2['stack']);if(_0x40b5c2[_0xbdb4('0x29')]){delete _0x40b5c2['name'];}_0x1e2a73[_0xbdb4('0x20')](_0x1ed2e1)[_0xbdb4('0x2a')](_0x40b5c2);};}exports[_0xbdb4('0x2b')]=function(_0x28f522,_0x4e56fe){var _0x8e4e45={'raw':![],'where':{'id':_0x28f522['params']['id']}},_0x4b0e3c={};_0x4b0e3c[_0xbdb4('0x2c')]=_[_0xbdb4('0x2d')](db[_0xbdb4('0x2e')][_0xbdb4('0x2f')]);_0x4b0e3c['query']=_[_0xbdb4('0x2d')](_0x28f522[_0xbdb4('0x30')]);_0x4b0e3c['filters']=_['intersection'](_0x4b0e3c[_0xbdb4('0x2c')],_0x4b0e3c[_0xbdb4('0x30')]);_0x8e4e45[_0xbdb4('0x31')]=_[_0xbdb4('0x32')](_0x4b0e3c[_0xbdb4('0x2c')],qs[_0xbdb4('0x33')](_0x28f522[_0xbdb4('0x30')]['fields']));_0x8e4e45[_0xbdb4('0x31')]=_0x8e4e45[_0xbdb4('0x31')][_0xbdb4('0x34')]?_0x8e4e45[_0xbdb4('0x31')]:_0x4b0e3c[_0xbdb4('0x2c')];if(_0x28f522[_0xbdb4('0x30')][_0xbdb4('0x35')]){_0x8e4e45['include']=[{'all':!![]}];}_0x8e4e45=_[_0xbdb4('0x36')]({},_0x8e4e45,_0x28f522['options']);return db['DashboardItem']['find'](_0x8e4e45)['then'](handleEntityNotFound(_0x4e56fe,null))[_0xbdb4('0x37')](respondWithResult(_0x4e56fe,null))[_0xbdb4('0x38')](handleError(_0x4e56fe,null));};exports[_0xbdb4('0x27')]=function(_0x42f2e6,_0x585ce1){return db[_0xbdb4('0x2e')][_0xbdb4('0x39')]({'where':{'id':_0x42f2e6[_0xbdb4('0x3a')]['id']}})[_0xbdb4('0x37')](handleEntityNotFound(_0x585ce1,null))[_0xbdb4('0x37')](removeEntity(_0x585ce1,null))[_0xbdb4('0x38')](handleError(_0x585ce1,null));};function widgetAttributes(_0x242181){try{switch(_0x242181['type']){case _0xbdb4('0x3b'):return[{'name':_0xbdb4('0x3c'),'value':_0x242181[_0xbdb4('0x3c')]||(_0x242181[_0xbdb4('0x3d')]&&_0x242181[_0xbdb4('0x3d')][0x0]?_0x242181[_0xbdb4('0x3d')][0x0][_0xbdb4('0x3e')]:undefined)||_0xbdb4('0x3f')}];case'custom':return[{'name':_0xbdb4('0x40'),'value':_0x242181['attrPath']||(_0x242181['attrs']&&_0x242181['attrs'][0x0]?_0x242181[_0xbdb4('0x3d')][0x0]['value']:undefined)||''}];case _0xbdb4('0x41'):return[{'name':_0xbdb4('0x42'),'value':_0x242181[_0xbdb4('0x42')]||(_0x242181['attrs']&&_0x242181[_0xbdb4('0x3d')][0x0]?_0x242181[_0xbdb4('0x3d')][0x0]['value']:undefined)||'HH:mm:ss'},{'name':_0xbdb4('0x43'),'value':_0x242181['attrTimezone']||(_0x242181[_0xbdb4('0x3d')]&&_0x242181[_0xbdb4('0x3d')][0x1]?_0x242181[_0xbdb4('0x3d')][0x1]['value']:undefined)||'0.00'},{'name':_0xbdb4('0x44'),'value':_0x242181[_0xbdb4('0x44')]||(_0x242181[_0xbdb4('0x3d')]&&_0x242181[_0xbdb4('0x3d')][0x2]?_0x242181[_0xbdb4('0x3d')][0x2][_0xbdb4('0x3e')]:undefined)||0xc}];case _0xbdb4('0x45'):return[{'name':_0xbdb4('0x46'),'value':_0x242181['attrMetric']||(_0x242181[_0xbdb4('0x3d')]&&_0x242181[_0xbdb4('0x3d')][0x0]?_0x242181[_0xbdb4('0x3d')][0x0][_0xbdb4('0x3e')]:undefined)||_0xbdb4('0x47')},{'name':_0xbdb4('0x48'),'value':_0x242181[_0xbdb4('0x48')]||(_0x242181[_0xbdb4('0x3d')]&&_0x242181['attrs'][0x1]?_0x242181[_0xbdb4('0x3d')][0x1][_0xbdb4('0x3e')]:undefined)||[]},{'name':_0xbdb4('0x44'),'value':_0x242181[_0xbdb4('0x44')]||(_0x242181['attrs']&&_0x242181[_0xbdb4('0x3d')][0x2]?_0x242181[_0xbdb4('0x3d')][0x2][_0xbdb4('0x3e')]:undefined)||0x14}];case _0xbdb4('0x49'):case _0xbdb4('0x4a'):return[{'name':_0xbdb4('0x4b'),'value':_0x242181[_0xbdb4('0x4b')]||(_0x242181['attrs']&&_0x242181[_0xbdb4('0x3d')][0x0]?_0x242181[_0xbdb4('0x3d')][0x0]['value']:undefined)||'total'},{'name':_0xbdb4('0x4c'),'value':_0x242181[_0xbdb4('0x4c')]||(_0x242181[_0xbdb4('0x3d')]&&_0x242181[_0xbdb4('0x3d')][0x1]?_0x242181['attrs'][0x1][_0xbdb4('0x3e')]:undefined)||null},{'name':'attrSerie3','value':_0x242181[_0xbdb4('0x4d')]||(_0x242181['attrs']&&_0x242181[_0xbdb4('0x3d')][0x2]?_0x242181[_0xbdb4('0x3d')][0x2][_0xbdb4('0x3e')]:undefined)||null},{'name':'attrVoiceQueues','value':_0x242181[_0xbdb4('0x48')]||(_0x242181[_0xbdb4('0x3d')]&&_0x242181['attrs'][0x3]?_0x242181[_0xbdb4('0x3d')][0x3]['value']:undefined)||[]}];case'web-report':return[{'name':'attrReport','type':_0x242181[_0xbdb4('0x4e')]||(_0x242181['attrs']&&_0x242181[_0xbdb4('0x3d')][0x0]?_0x242181[_0xbdb4('0x3d')][0x0][_0xbdb4('0x4f')]:undefined)||null,'value':_0x242181[_0xbdb4('0x50')]||(_0x242181[_0xbdb4('0x3d')]&&_0x242181[_0xbdb4('0x3d')][0x0]?_0x242181[_0xbdb4('0x3d')][0x0][_0xbdb4('0x3e')]:undefined)||null},{'name':_0xbdb4('0x51'),'value':_0x242181[_0xbdb4('0x51')]||(_0x242181['attrs']&&_0x242181['attrs'][0x1]?_0x242181[_0xbdb4('0x3d')][0x1]['value']:undefined)||0x0}];default:return[];}}catch(_0x3ecc97){logger[_0xbdb4('0x28')](_0xbdb4('0x52'),JSON[_0xbdb4('0x53')](_0x3ecc97));return[];}}exports[_0xbdb4('0x54')]=function(_0x1a6baf,_0x1f29f7){if(_0x1a6baf[_0xbdb4('0x55')]){_0x1a6baf[_0xbdb4('0x55')]['attrs']=widgetAttributes(_0x1a6baf['body']);}return db[_0xbdb4('0x2e')][_0xbdb4('0x54')](_0x1a6baf[_0xbdb4('0x55')],{})['then'](respondWithResult(_0x1f29f7,0xc9))[_0xbdb4('0x38')](handleError(_0x1f29f7,null));};exports[_0xbdb4('0x56')]=function(_0x1032ac,_0x18fd43){if(_0x1032ac['body']['id']){delete _0x1032ac[_0xbdb4('0x55')]['id'];}_0x1032ac['body'][_0xbdb4('0x3d')]=widgetAttributes(_0x1032ac['body']);return db['DashboardItem'][_0xbdb4('0x39')]({'where':{'id':_0x1032ac[_0xbdb4('0x3a')]['id']}})[_0xbdb4('0x37')](handleEntityNotFound(_0x18fd43,null))[_0xbdb4('0x37')](saveUpdates(_0x1032ac[_0xbdb4('0x55')],null))[_0xbdb4('0x37')](respondWithResult(_0x18fd43,null))[_0xbdb4('0x38')](handleError(_0x18fd43,null));};
\ No newline at end of file
+var _0x4ccc=['includeAll','include','options','find','catch','type','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','total','attrVoiceQueues','multibar-chart','attrSerie1','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','create','body','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','./dashboardItem.socket','register','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','send','params','model','keys','DashboardItem','rawAttributes','query','filters','intersection','attributes','fields','length'];(function(_0x49db50,_0x49ede7){var _0x378121=function(_0x58b61c){while(--_0x58b61c){_0x49db50['push'](_0x49db50['shift']());}};_0x378121(++_0x49ede7);}(_0x4ccc,0x1cd));var _0xc4cc=function(_0x854260,_0x2d478c){_0x854260=_0x854260-0x0;var _0x30d816=_0x4ccc[_0x854260];return _0x30d816;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc4cc('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc4cc('0x1'));var jsonpatch=require(_0xc4cc('0x2'));var rp=require(_0xc4cc('0x3'));var moment=require(_0xc4cc('0x4'));var BPromise=require(_0xc4cc('0x5'));var Mustache=require(_0xc4cc('0x6'));var util=require('util');var path=require(_0xc4cc('0x7'));var sox=require(_0xc4cc('0x8'));var csv=require(_0xc4cc('0x9'));var ejs=require(_0xc4cc('0xa'));var fs=require('fs');var _=require(_0xc4cc('0xb'));var squel=require(_0xc4cc('0xc'));var crypto=require(_0xc4cc('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xc4cc('0xe'));var toCsv=require(_0xc4cc('0x9'));var querystring=require(_0xc4cc('0xf'));var Papa=require(_0xc4cc('0x10'));var Redis=require(_0xc4cc('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xc4cc('0x12'))(_0xc4cc('0x13'));var utils=require(_0xc4cc('0x14'));var config=require(_0xc4cc('0x15'));var db=require(_0xc4cc('0x16'))['db'];config[_0xc4cc('0x17')]=_['defaults'](config['redis'],{'host':_0xc4cc('0x18'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc4cc('0x17')]));require(_0xc4cc('0x19'))[_0xc4cc('0x1a')](socket);function respondWithStatusCode(_0x15b7fd,_0x34d411){_0x34d411=_0x34d411||0xcc;return function(_0x7058a){if(_0x7058a){return _0x15b7fd[_0xc4cc('0x1b')](_0x34d411);}return _0x15b7fd[_0xc4cc('0x1c')](_0x34d411)[_0xc4cc('0x1d')]();};}function respondWithResult(_0x250afe,_0x49fde4){_0x49fde4=_0x49fde4||0xc8;return function(_0x2ff731){if(_0x2ff731){return _0x250afe['status'](_0x49fde4)[_0xc4cc('0x1e')](_0x2ff731);}};}function respondWithFilteredResult(_0x5d903d,_0xd0372d){return function(_0x344692){if(_0x344692){var _0x13953e=_0x344692[_0xc4cc('0x1f')],_0x4f6e10=_0xd0372d['offset'],_0x221086=_0xd0372d[_0xc4cc('0x20')]+_0xd0372d['limit'],_0x48b8f4;if(_0x221086>=_0x13953e){_0x221086=_0x13953e;_0x48b8f4=0xc8;}else{_0x48b8f4=0xce;}_0x5d903d['status'](_0x48b8f4);return _0x5d903d['set'](_0xc4cc('0x21'),_0x4f6e10+'-'+_0x221086+'/'+_0x13953e)['json'](_0x344692);}return null;};}function patchUpdates(_0x3c98d6){return function(_0x40e00f){try{jsonpatch[_0xc4cc('0x22')](_0x40e00f,_0x3c98d6,!![]);}catch(_0x1d03ca){return BPromise[_0xc4cc('0x23')](_0x1d03ca);}return _0x40e00f[_0xc4cc('0x24')]();};}function saveUpdates(_0x1d62fd,_0x23b923){return function(_0x281af7){if(_0x281af7){return _0x281af7[_0xc4cc('0x25')](_0x1d62fd)['then'](function(_0x4714ee){return _0x4714ee;});}return null;};}function removeEntity(_0x2ddcfb,_0x1c238c){return function(_0x3611a1){if(_0x3611a1){return _0x3611a1[_0xc4cc('0x26')]()[_0xc4cc('0x27')](function(){_0x2ddcfb['status'](0xcc)[_0xc4cc('0x1d')]();});}};}function handleEntityNotFound(_0x2505b6,_0x4db9b7){return function(_0x2144f0){if(!_0x2144f0){_0x2505b6[_0xc4cc('0x1b')](0x194);}return _0x2144f0;};}function handleError(_0x1a61fb,_0x4ca1e4){_0x4ca1e4=_0x4ca1e4||0x1f4;return function(_0x1a0d46){logger[_0xc4cc('0x28')](_0x1a0d46[_0xc4cc('0x29')]);if(_0x1a0d46[_0xc4cc('0x2a')]){delete _0x1a0d46[_0xc4cc('0x2a')];}_0x1a61fb[_0xc4cc('0x1c')](_0x4ca1e4)[_0xc4cc('0x2b')](_0x1a0d46);};}exports['show']=function(_0x387042,_0x806a39){var _0xabccdc={'raw':![],'where':{'id':_0x387042[_0xc4cc('0x2c')]['id']}},_0x534169={};_0x534169[_0xc4cc('0x2d')]=_[_0xc4cc('0x2e')](db[_0xc4cc('0x2f')][_0xc4cc('0x30')]);_0x534169[_0xc4cc('0x31')]=_[_0xc4cc('0x2e')](_0x387042['query']);_0x534169[_0xc4cc('0x32')]=_[_0xc4cc('0x33')](_0x534169[_0xc4cc('0x2d')],_0x534169[_0xc4cc('0x31')]);_0xabccdc[_0xc4cc('0x34')]=_['intersection'](_0x534169[_0xc4cc('0x2d')],qs[_0xc4cc('0x35')](_0x387042['query'][_0xc4cc('0x35')]));_0xabccdc[_0xc4cc('0x34')]=_0xabccdc[_0xc4cc('0x34')][_0xc4cc('0x36')]?_0xabccdc[_0xc4cc('0x34')]:_0x534169[_0xc4cc('0x2d')];if(_0x387042['query'][_0xc4cc('0x37')]){_0xabccdc[_0xc4cc('0x38')]=[{'all':!![]}];}_0xabccdc=_['merge']({},_0xabccdc,_0x387042[_0xc4cc('0x39')]);return db[_0xc4cc('0x2f')][_0xc4cc('0x3a')](_0xabccdc)[_0xc4cc('0x27')](handleEntityNotFound(_0x806a39,null))[_0xc4cc('0x27')](respondWithResult(_0x806a39,null))[_0xc4cc('0x3b')](handleError(_0x806a39,null));};exports[_0xc4cc('0x26')]=function(_0x514d72,_0x593a06){return db[_0xc4cc('0x2f')][_0xc4cc('0x3a')]({'where':{'id':_0x514d72['params']['id']}})['then'](handleEntityNotFound(_0x593a06,null))[_0xc4cc('0x27')](removeEntity(_0x593a06,null))['catch'](handleError(_0x593a06,null));};function widgetAttributes(_0x55cb54){try{switch(_0x55cb54[_0xc4cc('0x3c')]){case'iframe':return[{'name':_0xc4cc('0x3d'),'value':_0x55cb54[_0xc4cc('0x3d')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54['attrs'][0x0]?_0x55cb54['attrs'][0x0][_0xc4cc('0x3f')]:undefined)||_0xc4cc('0x40')}];case _0xc4cc('0x41'):return[{'name':_0xc4cc('0x42'),'value':_0x55cb54[_0xc4cc('0x42')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54['attrs'][0x0]?_0x55cb54[_0xc4cc('0x3e')][0x0]['value']:undefined)||''}];case _0xc4cc('0x43'):return[{'name':_0xc4cc('0x44'),'value':_0x55cb54[_0xc4cc('0x44')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54['attrs'][0x0]?_0x55cb54[_0xc4cc('0x3e')][0x0][_0xc4cc('0x3f')]:undefined)||_0xc4cc('0x45')},{'name':_0xc4cc('0x46'),'value':_0x55cb54[_0xc4cc('0x46')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54[_0xc4cc('0x3e')][0x1]?_0x55cb54[_0xc4cc('0x3e')][0x1][_0xc4cc('0x3f')]:undefined)||'0.00'},{'name':_0xc4cc('0x47'),'value':_0x55cb54[_0xc4cc('0x47')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54[_0xc4cc('0x3e')][0x2]?_0x55cb54[_0xc4cc('0x3e')][0x2][_0xc4cc('0x3f')]:undefined)||0xc}];case _0xc4cc('0x48'):return[{'name':_0xc4cc('0x49'),'value':_0x55cb54[_0xc4cc('0x49')]||(_0x55cb54['attrs']&&_0x55cb54[_0xc4cc('0x3e')][0x0]?_0x55cb54['attrs'][0x0][_0xc4cc('0x3f')]:undefined)||_0xc4cc('0x4a')},{'name':_0xc4cc('0x4b'),'value':_0x55cb54[_0xc4cc('0x4b')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54['attrs'][0x1]?_0x55cb54[_0xc4cc('0x3e')][0x1][_0xc4cc('0x3f')]:undefined)||[]},{'name':_0xc4cc('0x47'),'value':_0x55cb54[_0xc4cc('0x47')]||(_0x55cb54['attrs']&&_0x55cb54[_0xc4cc('0x3e')][0x2]?_0x55cb54[_0xc4cc('0x3e')][0x2][_0xc4cc('0x3f')]:undefined)||0x14}];case _0xc4cc('0x4c'):case'pie-chart':return[{'name':_0xc4cc('0x4d'),'value':_0x55cb54[_0xc4cc('0x4d')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54['attrs'][0x0]?_0x55cb54[_0xc4cc('0x3e')][0x0][_0xc4cc('0x3f')]:undefined)||_0xc4cc('0x4a')},{'name':'attrSerie2','value':_0x55cb54[_0xc4cc('0x4e')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54['attrs'][0x1]?_0x55cb54[_0xc4cc('0x3e')][0x1][_0xc4cc('0x3f')]:undefined)||null},{'name':_0xc4cc('0x4f'),'value':_0x55cb54[_0xc4cc('0x4f')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54[_0xc4cc('0x3e')][0x2]?_0x55cb54['attrs'][0x2][_0xc4cc('0x3f')]:undefined)||null},{'name':_0xc4cc('0x4b'),'value':_0x55cb54[_0xc4cc('0x4b')]||(_0x55cb54['attrs']&&_0x55cb54[_0xc4cc('0x3e')][0x3]?_0x55cb54[_0xc4cc('0x3e')][0x3][_0xc4cc('0x3f')]:undefined)||[]}];case _0xc4cc('0x50'):return[{'name':_0xc4cc('0x51'),'type':_0x55cb54[_0xc4cc('0x52')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54[_0xc4cc('0x3e')][0x0]?_0x55cb54[_0xc4cc('0x3e')][0x0][_0xc4cc('0x3c')]:undefined)||null,'value':_0x55cb54[_0xc4cc('0x51')]||(_0x55cb54[_0xc4cc('0x3e')]&&_0x55cb54[_0xc4cc('0x3e')][0x0]?_0x55cb54[_0xc4cc('0x3e')][0x0]['value']:undefined)||null},{'name':_0xc4cc('0x53'),'value':_0x55cb54[_0xc4cc('0x53')]||(_0x55cb54['attrs']&&_0x55cb54[_0xc4cc('0x3e')][0x1]?_0x55cb54[_0xc4cc('0x3e')][0x1][_0xc4cc('0x3f')]:undefined)||0x0}];default:return[];}}catch(_0x27fa51){logger['error']('widgetAttributes:\x20%s',JSON['stringify'](_0x27fa51));return[];}}exports[_0xc4cc('0x54')]=function(_0xef2083,_0x5b58e4){if(_0xef2083[_0xc4cc('0x55')]){_0xef2083[_0xc4cc('0x55')]['attrs']=widgetAttributes(_0xef2083[_0xc4cc('0x55')]);}return db['DashboardItem'][_0xc4cc('0x54')](_0xef2083['body'],{})['then'](respondWithResult(_0x5b58e4,0xc9))[_0xc4cc('0x3b')](handleError(_0x5b58e4,null));};exports[_0xc4cc('0x25')]=function(_0x271c44,_0x493db2){if(_0x271c44[_0xc4cc('0x55')]['id']){delete _0x271c44[_0xc4cc('0x55')]['id'];}_0x271c44[_0xc4cc('0x55')][_0xc4cc('0x3e')]=widgetAttributes(_0x271c44[_0xc4cc('0x55')]);return db['DashboardItem']['find']({'where':{'id':_0x271c44['params']['id']}})['then'](handleEntityNotFound(_0x493db2,null))['then'](saveUpdates(_0x271c44[_0xc4cc('0x55')],null))['then'](respondWithResult(_0x493db2,null))[_0xc4cc('0x3b')](handleError(_0x493db2,null));};
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.events.js b/server/api/dashboardItem/dashboardItem.events.js
index cff734f..fae77ec 100644
--- a/server/api/dashboardItem/dashboardItem.events.js
+++ b/server/api/dashboardItem/dashboardItem.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1c3d=['../../mysqldb','DashboardItem','setMaxListeners','save','update','emit','hasOwnProperty','exports'];(function(_0x2bd0d5,_0x4ace31){var _0x3a963e=function(_0x254974){while(--_0x254974){_0x2bd0d5['push'](_0x2bd0d5['shift']());}};_0x3a963e(++_0x4ace31);}(_0x1c3d,0x1b8));var _0xd1c3=function(_0x1363ed,_0x58557f){_0x1363ed=_0x1363ed-0x0;var _0x416984=_0x1c3d[_0x1363ed];return _0x416984;};'use strict';var EventEmitter=require('events');var DashboardItem=require(_0xd1c3('0x0'))['db'][_0xd1c3('0x1')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0xd1c3('0x2')](0x0);var events={'afterCreate':_0xd1c3('0x3'),'afterUpdate':_0xd1c3('0x4'),'afterDestroy':'remove'};function emitEvent(_0x577efa){return function(_0xffc3d0,_0x3cc8a4,_0x793c5c){DashboardItemEvents[_0xd1c3('0x5')](_0x577efa+':'+_0xffc3d0['id'],_0xffc3d0);DashboardItemEvents[_0xd1c3('0x5')](_0x577efa,_0xffc3d0);_0x793c5c(null);};}for(var e in events){if(events[_0xd1c3('0x6')](e)){var event=events[e];DashboardItem['hook'](e,emitEvent(event));}}module[_0xd1c3('0x7')]=DashboardItemEvents;
\ No newline at end of file
+var _0xf19c=['save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','DashboardItem'];(function(_0x34b821,_0x504e55){var _0x5e00a0=function(_0x242892){while(--_0x242892){_0x34b821['push'](_0x34b821['shift']());}};_0x5e00a0(++_0x504e55);}(_0xf19c,0x10b));var _0xcf19=function(_0x4764ed,_0x45b1a3){_0x4764ed=_0x4764ed-0x0;var _0x5789ad=_0xf19c[_0x4764ed];return _0x5789ad;};'use strict';var EventEmitter=require(_0xcf19('0x0'));var DashboardItem=require(_0xcf19('0x1'))['db'][_0xcf19('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xcf19('0x3'),'afterUpdate':_0xcf19('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1fa8dc){return function(_0x2addca,_0x460b4f,_0x87534f){DashboardItemEvents[_0xcf19('0x5')](_0x1fa8dc+':'+_0x2addca['id'],_0x2addca);DashboardItemEvents['emit'](_0x1fa8dc,_0x2addca);_0x87534f(null);};}for(var e in events){if(events[_0xcf19('0x6')](e)){var event=events[e];DashboardItem[_0xcf19('0x7')](e,emitEvent(event));}}module[_0xcf19('0x8')]=DashboardItemEvents;
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.model.js b/server/api/dashboardItem/dashboardItem.model.js
index 0c09498..4be1257 100644
--- a/server/api/dashboardItem/dashboardItem.model.js
+++ b/server/api/dashboardItem/dashboardItem.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x65c7=['dashboard_items','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','define','DashboardItem'];(function(_0x5d1d25,_0x763b36){var _0x5d5dce=function(_0x4e813c){while(--_0x4e813c){_0x5d1d25['push'](_0x5d1d25['shift']());}};_0x5d5dce(++_0x763b36);}(_0x65c7,0x1cf));var _0x765c=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x65c7[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0x765c('0x0'));var util=require(_0x765c('0x1'));var logger=require(_0x765c('0x2'))(_0x765c('0x3'));var moment=require(_0x765c('0x4'));var BPromise=require('bluebird');var rp=require(_0x765c('0x5'));var fs=require('fs');var path=require(_0x765c('0x6'));var rimraf=require(_0x765c('0x7'));var config=require('../../config/environment');var attributes=require('./dashboardItem.attributes');module['exports']=function(_0x17b2a8,_0x546825){return _0x17b2a8[_0x765c('0x8')](_0x765c('0x9'),attributes,{'tableName':_0x765c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcd07=['dashboard_items','../../config/logger','moment','request-promise','path','rimraf','./dashboardItem.attributes','define','DashboardItem'];(function(_0x3f7979,_0x3e80a8){var _0x48507e=function(_0x45ddb9){while(--_0x45ddb9){_0x3f7979['push'](_0x3f7979['shift']());}};_0x48507e(++_0x3e80a8);}(_0xcd07,0xf4));var _0x7cd0=function(_0x225bd6,_0xa696ad){_0x225bd6=_0x225bd6-0x0;var _0x406c9e=_0xcd07[_0x225bd6];return _0x406c9e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x7cd0('0x0'))('api');var moment=require(_0x7cd0('0x1'));var BPromise=require('bluebird');var rp=require(_0x7cd0('0x2'));var fs=require('fs');var path=require(_0x7cd0('0x3'));var rimraf=require(_0x7cd0('0x4'));var config=require('../../config/environment');var attributes=require(_0x7cd0('0x5'));module['exports']=function(_0x21ca26,_0x50d3c4){return _0x21ca26[_0x7cd0('0x6')](_0x7cd0('0x7'),attributes,{'tableName':_0x7cd0('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.rpc.js b/server/api/dashboardItem/dashboardItem.rpc.js
index 25b95fb..399e789 100644
--- a/server/api/dashboardItem/dashboardItem.rpc.js
+++ b/server/api/dashboardItem/dashboardItem.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5eec=['../../config/logger','rpc','redis','defaults','register','request','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','lodash','moment','bluebird','randomstring','../../mysqldb'];(function(_0x5c7194,_0x2fbc5e){var _0xbd33e0=function(_0x3f1c52){while(--_0x3f1c52){_0x5c7194['push'](_0x5c7194['shift']());}};_0xbd33e0(++_0x2fbc5e);}(_0x5eec,0x187));var _0xc5ee=function(_0x46fcca,_0x369adb){_0x46fcca=_0x46fcca-0x0;var _0xcc3a1b=_0x5eec[_0x46fcca];return _0xcc3a1b;};'use strict';var _=require(_0xc5ee('0x0'));var util=require('util');var moment=require(_0xc5ee('0x1'));var BPromise=require(_0xc5ee('0x2'));var rs=require(_0xc5ee('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc5ee('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xc5ee('0x5'))(_0xc5ee('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0xc5ee('0x7')]=_[_0xc5ee('0x8')](config[_0xc5ee('0x7')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./dashboardItem.socket')[_0xc5ee('0x9')](socket);function respondWithRpcPromise(_0x38a020,_0x1bb6e2,_0x36609a){return new BPromise(function(_0x18d3fc,_0x10c0a1){return client[_0xc5ee('0xa')](_0x38a020,_0x36609a)['then'](function(_0x21e11f){logger[_0xc5ee('0xb')](_0xc5ee('0xc'),_0x1bb6e2,_0xc5ee('0xd'));logger[_0xc5ee('0xe')](_0xc5ee('0xf'),_0x1bb6e2,_0xc5ee('0xd'),JSON[_0xc5ee('0x10')](_0x21e11f));if(_0x21e11f['error']){if(_0x21e11f['error'][_0xc5ee('0x11')]===0x1f4){logger[_0xc5ee('0x12')]('DashboardItem,\x20%s,\x20%s',_0x1bb6e2,_0x21e11f[_0xc5ee('0x12')]['message']);return _0x10c0a1(_0x21e11f[_0xc5ee('0x12')]['message']);}logger['error'](_0xc5ee('0xc'),_0x1bb6e2,_0x21e11f[_0xc5ee('0x12')][_0xc5ee('0x13')]);return _0x18d3fc(_0x21e11f[_0xc5ee('0x12')][_0xc5ee('0x13')]);}else{logger[_0xc5ee('0xb')](_0xc5ee('0xc'),_0x1bb6e2,_0xc5ee('0xd'));_0x18d3fc(_0x21e11f[_0xc5ee('0x14')][_0xc5ee('0x13')]);}})[_0xc5ee('0x15')](function(_0x19ab8e){logger[_0xc5ee('0x12')](_0xc5ee('0xc'),_0x1bb6e2,_0x19ab8e);_0x10c0a1(_0x19ab8e);});});}
\ No newline at end of file
+var _0xd631=['register','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','error','code','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./dashboardItem.socket'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0xd631,0x14f));var _0x1d63=function(_0x33554b,_0x48162b){_0x33554b=_0x33554b-0x0;var _0x256954=_0xd631[_0x33554b];return _0x256954;};'use strict';var _=require(_0x1d63('0x0'));var util=require(_0x1d63('0x1'));var moment=require(_0x1d63('0x2'));var BPromise=require('bluebird');var rs=require(_0x1d63('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1d63('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x1d63('0x5'))(_0x1d63('0x6'));var config=require(_0x1d63('0x7'));var jayson=require(_0x1d63('0x8'));var client=jayson[_0x1d63('0x9')][_0x1d63('0xa')]({'port':0x232a});config[_0x1d63('0xb')]=_[_0x1d63('0xc')](config['redis'],{'host':_0x1d63('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1d63('0xb')]));require(_0x1d63('0xe'))[_0x1d63('0xf')](socket);function respondWithRpcPromise(_0x3f44da,_0x3bfb5e,_0x641aaa){return new BPromise(function(_0x4d8cf9,_0x339c94){return client['request'](_0x3f44da,_0x641aaa)['then'](function(_0x95731a){logger[_0x1d63('0x10')](_0x1d63('0x11'),_0x3bfb5e,_0x1d63('0x12'));logger[_0x1d63('0x13')](_0x1d63('0x14'),_0x3bfb5e,_0x1d63('0x12'),JSON['stringify'](_0x95731a));if(_0x95731a[_0x1d63('0x15')]){if(_0x95731a[_0x1d63('0x15')][_0x1d63('0x16')]===0x1f4){logger[_0x1d63('0x15')](_0x1d63('0x11'),_0x3bfb5e,_0x95731a[_0x1d63('0x15')]['message']);return _0x339c94(_0x95731a[_0x1d63('0x15')][_0x1d63('0x17')]);}logger[_0x1d63('0x15')](_0x1d63('0x11'),_0x3bfb5e,_0x95731a[_0x1d63('0x15')]['message']);return _0x4d8cf9(_0x95731a[_0x1d63('0x15')][_0x1d63('0x17')]);}else{logger['info'](_0x1d63('0x11'),_0x3bfb5e,'request\x20sent');_0x4d8cf9(_0x95731a['result']['message']);}})[_0x1d63('0x18')](function(_0xb782bd){logger[_0x1d63('0x15')](_0x1d63('0x11'),_0x3bfb5e,_0xb782bd);_0x339c94(_0xb782bd);});});}
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.socket.js b/server/api/dashboardItem/dashboardItem.socket.js
index 04b0a23..ef1748e 100644
--- a/server/api/dashboardItem/dashboardItem.socket.js
+++ b/server/api/dashboardItem/dashboardItem.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xedd9=['removeListener','register','length','dashboardItem:','save','remove','update','emit'];(function(_0x1db4a5,_0x13e3ed){var _0x5d211c=function(_0x136665){while(--_0x136665){_0x1db4a5['push'](_0x1db4a5['shift']());}};_0x5d211c(++_0x13e3ed);}(_0xedd9,0xfc));var _0x9edd=function(_0x1c6079,_0x4b6dd4){_0x1c6079=_0x1c6079-0x0;var _0x3f1037=_0xedd9[_0x1c6079];return _0x3f1037;};'use strict';var DashboardItemEvents=require('./dashboardItem.events');var events=[_0x9edd('0x0'),_0x9edd('0x1'),_0x9edd('0x2')];function createListener(_0x2c16b8,_0x3b51bc){return function(_0x127cbe){_0x3b51bc[_0x9edd('0x3')](_0x2c16b8,_0x127cbe);};}function removeListener(_0x36b53f,_0x5943b3){return function(){DashboardItemEvents[_0x9edd('0x4')](_0x36b53f,_0x5943b3);};}exports[_0x9edd('0x5')]=function(_0x268f9e){for(var _0x34c1a7=0x0,_0x5319f7=events[_0x9edd('0x6')];_0x34c1a7<_0x5319f7;_0x34c1a7++){var _0x571af9=events[_0x34c1a7];var _0x172522=createListener(_0x9edd('0x7')+_0x571af9,_0x268f9e);DashboardItemEvents['on'](_0x571af9,_0x172522);}};
\ No newline at end of file
+var _0x9957=['register','length','dashboardItem:','./dashboardItem.events','save','remove','update','emit','removeListener'];(function(_0x4cbf20,_0x1bfa66){var _0x582ae4=function(_0x5eca38){while(--_0x5eca38){_0x4cbf20['push'](_0x4cbf20['shift']());}};_0x582ae4(++_0x1bfa66);}(_0x9957,0x93));var _0x7995=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x9957[_0x2f5ac5];return _0x37c9a8;};'use strict';var DashboardItemEvents=require(_0x7995('0x0'));var events=[_0x7995('0x1'),_0x7995('0x2'),_0x7995('0x3')];function createListener(_0x5b96eb,_0x86c128){return function(_0x3c58eb){_0x86c128[_0x7995('0x4')](_0x5b96eb,_0x3c58eb);};}function removeListener(_0x462a03,_0x576d89){return function(){DashboardItemEvents[_0x7995('0x5')](_0x462a03,_0x576d89);};}exports[_0x7995('0x6')]=function(_0x137b6b){for(var _0x219534=0x0,_0xbda126=events[_0x7995('0x7')];_0x219534<_0xbda126;_0x219534++){var _0x4996ca=events[_0x219534];var _0x465276=createListener(_0x7995('0x8')+_0x4996ca,_0x137b6b);DashboardItemEvents['on'](_0x4996ca,_0x465276);}};
\ No newline at end of file
diff --git a/server/api/dashboardItem/index.js b/server/api/dashboardItem/index.js
index f2b5f29..d14f9dd 100644
--- a/server/api/dashboardItem/index.js
+++ b/server/api/dashboardItem/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdfab=['/:id','isAuthenticated','show','post','create','put','delete','destroy','exports','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','get'];(function(_0x17406e,_0x1049fd){var _0x2bfc5a=function(_0x2aae05){while(--_0x2aae05){_0x17406e['push'](_0x17406e['shift']());}};_0x2bfc5a(++_0x1049fd);}(_0xdfab,0xae));var _0xbdfa=function(_0x43a37c,_0x25a567){_0x43a37c=_0x43a37c-0x0;var _0x5d1d40=_0xdfab[_0x43a37c];return _0x5d1d40;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xbdfa('0x0'));var timeout=require(_0xbdfa('0x1'));var express=require(_0xbdfa('0x2'));var router=express['Router']();var auth=require(_0xbdfa('0x3'));var interaction=require(_0xbdfa('0x4'));var config=require('../../config/environment');var controller=require('./dashboardItem.controller');router[_0xbdfa('0x5')](_0xbdfa('0x6'),auth[_0xbdfa('0x7')](),controller[_0xbdfa('0x8')]);router[_0xbdfa('0x9')]('/',auth[_0xbdfa('0x7')](),controller[_0xbdfa('0xa')]);router[_0xbdfa('0xb')](_0xbdfa('0x6'),auth[_0xbdfa('0x7')](),controller['update']);router[_0xbdfa('0xc')](_0xbdfa('0x6'),auth[_0xbdfa('0x7')](),controller[_0xbdfa('0xd')]);module[_0xbdfa('0xe')]=router;
\ No newline at end of file
+var _0x856b=['path','../../components/interaction/service','./dashboardItem.controller','/:id','isAuthenticated','show','post','create','update','destroy','exports','util'];(function(_0x267510,_0x19f897){var _0x4232fc=function(_0x417972){while(--_0x417972){_0x267510['push'](_0x267510['shift']());}};_0x4232fc(++_0x19f897);}(_0x856b,0x173));var _0xb856=function(_0x551bc1,_0x47cff3){_0x551bc1=_0x551bc1-0x0;var _0x12ea5e=_0x856b[_0x551bc1];return _0x12ea5e;};'use strict';var multer=require('multer');var util=require(_0xb856('0x0'));var path=require(_0xb856('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xb856('0x2'));var config=require('../../config/environment');var controller=require(_0xb856('0x3'));router['get'](_0xb856('0x4'),auth[_0xb856('0x5')](),controller[_0xb856('0x6')]);router[_0xb856('0x7')]('/',auth[_0xb856('0x5')](),controller[_0xb856('0x8')]);router['put']('/:id',auth[_0xb856('0x5')](),controller[_0xb856('0x9')]);router['delete'](_0xb856('0x4'),auth[_0xb856('0x5')](),controller[_0xb856('0xa')]);module[_0xb856('0xb')]=router;
\ No newline at end of file
diff --git a/server/api/disposition/disposition.attributes.js b/server/api/disposition/disposition.attributes.js
index 70172a9..7712f49 100644
--- a/server/api/disposition/disposition.attributes.js
+++ b/server/api/disposition/disposition.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8184=['sequelize','exports','STRING'];(function(_0x4f46a0,_0x3801c9){var _0x59b0ee=function(_0x56f1f3){while(--_0x56f1f3){_0x4f46a0['push'](_0x4f46a0['shift']());}};_0x59b0ee(++_0x3801c9);}(_0x8184,0x1aa));var _0x4818=function(_0x3906c7,_0x4ad79c){_0x3906c7=_0x3906c7-0x0;var _0x3084be=_0x8184[_0x3906c7];return _0x3084be;};'use strict';var Sequelize=require(_0x4818('0x0'));module[_0x4818('0x1')]={'name':{'type':Sequelize[_0x4818('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x45f6=['sequelize'];(function(_0xb8dc9f,_0xb603be){var _0x1f9922=function(_0x2e24ce){while(--_0x2e24ce){_0xb8dc9f['push'](_0xb8dc9f['shift']());}};_0x1f9922(++_0xb603be);}(_0x45f6,0xa0));var _0x645f=function(_0x20ebb5,_0x237d88){_0x20ebb5=_0x20ebb5-0x0;var _0x487182=_0x45f6[_0x20ebb5];return _0x487182;};'use strict';var Sequelize=require(_0x645f('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/disposition/disposition.controller.js b/server/api/disposition/disposition.controller.js
index 26cf4f0..2205117 100644
--- a/server/api/disposition/disposition.controller.js
+++ b/server/api/disposition/disposition.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6edd=['../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','then','destroy','get','Dispositions','error','stack','name','send','index','rawAttributes','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','limit','order','sort','filters','filter','where','map','type','key','field','merge','options','include','Disposition','findAll','rows','catch','show','includeAll','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','params','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0xc05620,_0x36f927){var _0x45cbe0=function(_0x5415fc){while(--_0x5415fc){_0xc05620['push'](_0xc05620['shift']());}};_0x45cbe0(++_0x36f927);}(_0x6edd,0x1e2));var _0xd6ed=function(_0x58af17,_0x160773){_0x58af17=_0x58af17-0x0;var _0xa49dc4=_0x6edd[_0x58af17];return _0xa49dc4;};'use strict';var pdf=require(_0xd6ed('0x0'));var emlformat=require(_0xd6ed('0x1'));var rimraf=require(_0xd6ed('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd6ed('0x3'));var rp=require(_0xd6ed('0x4'));var moment=require('moment');var BPromise=require(_0xd6ed('0x5'));var Mustache=require(_0xd6ed('0x6'));var util=require(_0xd6ed('0x7'));var path=require(_0xd6ed('0x8'));var sox=require(_0xd6ed('0x9'));var csv=require(_0xd6ed('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xd6ed('0xb'));var squel=require('squel');var crypto=require(_0xd6ed('0xc'));var jsforce=require(_0xd6ed('0xd'));var deskjs=require(_0xd6ed('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xd6ed('0xf'));var Redis=require(_0xd6ed('0x10'));var authService=require(_0xd6ed('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xd6ed('0x12'));var logger=require(_0xd6ed('0x13'))(_0xd6ed('0x14'));var utils=require(_0xd6ed('0x15'));var config=require(_0xd6ed('0x16'));var db=require(_0xd6ed('0x17'))['db'];function respondWithStatusCode(_0x5796a7,_0x5d8db6){_0x5d8db6=_0x5d8db6||0xcc;return function(_0x325d4a){if(_0x325d4a){return _0x5796a7[_0xd6ed('0x18')](_0x5d8db6);}return _0x5796a7[_0xd6ed('0x19')](_0x5d8db6)[_0xd6ed('0x1a')]();};}function respondWithResult(_0x46cd3e,_0xa653f8){_0xa653f8=_0xa653f8||0xc8;return function(_0x50ed6e){if(_0x50ed6e){return _0x46cd3e[_0xd6ed('0x19')](_0xa653f8)[_0xd6ed('0x1b')](_0x50ed6e);}};}function respondWithFilteredResult(_0x32cc51,_0x1b8885){return function(_0x224a59){if(_0x224a59){var _0x32766e=_0x224a59[_0xd6ed('0x1c')],_0x16015a=_0x1b8885['offset'],_0x1be0ae=_0x1b8885[_0xd6ed('0x1d')]+_0x1b8885['limit'],_0x4b1750;if(_0x1be0ae>=_0x32766e){_0x1be0ae=_0x32766e;_0x4b1750=0xc8;}else{_0x4b1750=0xce;}_0x32cc51[_0xd6ed('0x19')](_0x4b1750);return _0x32cc51[_0xd6ed('0x1e')](_0xd6ed('0x1f'),_0x16015a+'-'+_0x1be0ae+'/'+_0x32766e)[_0xd6ed('0x1b')](_0x224a59);}return null;};}function patchUpdates(_0xb055af){return function(_0x3ac4ac){try{jsonpatch[_0xd6ed('0x20')](_0x3ac4ac,_0xb055af,!![]);}catch(_0x379dfa){return BPromise[_0xd6ed('0x21')](_0x379dfa);}return _0x3ac4ac[_0xd6ed('0x22')]();};}function saveUpdates(_0x57a058,_0x1fbe57){return function(_0x5342f2){if(_0x5342f2){return _0x5342f2['update'](_0x57a058)[_0xd6ed('0x23')](function(_0x1e84d1){return _0x1e84d1;});}return null;};}function removeEntity(_0xfa5bca,_0x2ca8a2){return function(_0x58b1fd){if(_0x58b1fd){return _0x58b1fd[_0xd6ed('0x24')]()[_0xd6ed('0x23')](function(){var _0xafcb95=_0x58b1fd[_0xd6ed('0x25')]({'plain':!![]});var _0x257d1d=_0xd6ed('0x26');return db['UserProfileResource'][_0xd6ed('0x24')]({'where':{'type':_0x257d1d,'resourceId':_0xafcb95['id']}})[_0xd6ed('0x23')](function(){return _0x58b1fd;});})[_0xd6ed('0x23')](function(){_0xfa5bca['status'](0xcc)[_0xd6ed('0x1a')]();});}};}function handleEntityNotFound(_0xbea1d4,_0x44b4ea){return function(_0xb5c0de){if(!_0xb5c0de){_0xbea1d4['sendStatus'](0x194);}return _0xb5c0de;};}function handleError(_0x50c356,_0x37bb92){_0x37bb92=_0x37bb92||0x1f4;return function(_0x1eac8c){logger[_0xd6ed('0x27')](_0x1eac8c[_0xd6ed('0x28')]);if(_0x1eac8c[_0xd6ed('0x29')]){delete _0x1eac8c[_0xd6ed('0x29')];}_0x50c356[_0xd6ed('0x19')](_0x37bb92)[_0xd6ed('0x2a')](_0x1eac8c);};}exports[_0xd6ed('0x2b')]=function(_0x579dd4,_0x3d5b9d){var _0x407ea8={},_0x10bccc={},_0x253c7e={'count':0x0,'rows':[]};var _0x55bcb8=db['Disposition'][_0xd6ed('0x2c')];_0x10bccc[_0xd6ed('0x2d')]=_['keys'](_0x55bcb8);_0x10bccc[_0xd6ed('0x2e')]=_[_0xd6ed('0x2f')](_0x579dd4[_0xd6ed('0x2e')]);_0x10bccc['filters']=_['intersection'](_0x10bccc[_0xd6ed('0x2d')],_0x10bccc[_0xd6ed('0x2e')]);_0x407ea8[_0xd6ed('0x30')]=_[_0xd6ed('0x31')](_0x10bccc[_0xd6ed('0x2d')],qs[_0xd6ed('0x32')](_0x579dd4[_0xd6ed('0x2e')][_0xd6ed('0x32')]));_0x407ea8[_0xd6ed('0x30')]=_0x407ea8[_0xd6ed('0x30')][_0xd6ed('0x33')]?_0x407ea8['attributes']:_0x10bccc[_0xd6ed('0x2d')];if(!_0x579dd4[_0xd6ed('0x2e')][_0xd6ed('0x34')]('nolimit')){_0x407ea8[_0xd6ed('0x35')]=qs[_0xd6ed('0x35')](_0x579dd4[_0xd6ed('0x2e')][_0xd6ed('0x35')]);_0x407ea8[_0xd6ed('0x1d')]=qs[_0xd6ed('0x1d')](_0x579dd4['query'][_0xd6ed('0x1d')]);}_0x407ea8[_0xd6ed('0x36')]=qs[_0xd6ed('0x37')](_0x579dd4[_0xd6ed('0x2e')][_0xd6ed('0x37')]);_0x407ea8['where']=qs[_0xd6ed('0x38')](_['pick'](_0x579dd4['query'],_0x10bccc[_0xd6ed('0x38')]));if(_0x579dd4[_0xd6ed('0x2e')][_0xd6ed('0x39')]){_0x407ea8[_0xd6ed('0x3a')]=_['merge'](_0x407ea8['where'],{'$or':_[_0xd6ed('0x3b')](_0x55bcb8,function(_0x2ba0ca){if(_0x2ba0ca[_0xd6ed('0x3c')][_0xd6ed('0x3d')]!=='VIRTUAL'){var _0x1bf9fa={};_0x1bf9fa[_0x2ba0ca[_0xd6ed('0x3e')]]={'$like':'%'+_0x579dd4['query'][_0xd6ed('0x39')]+'%'};return _0x1bf9fa;}})});}_0x407ea8=_[_0xd6ed('0x3f')]({},_0x407ea8,_0x579dd4[_0xd6ed('0x40')]);var _0x3aa7d2={'where':_0x407ea8[_0xd6ed('0x3a')]};return db['Disposition'][_0xd6ed('0x1c')](_0x3aa7d2)[_0xd6ed('0x23')](function(_0x4cb4f6){_0x253c7e[_0xd6ed('0x1c')]=_0x4cb4f6;if(_0x579dd4[_0xd6ed('0x2e')]['includeAll']){_0x407ea8[_0xd6ed('0x41')]=[{'all':!![]}];}return db[_0xd6ed('0x42')][_0xd6ed('0x43')](_0x407ea8);})['then'](function(_0x3fe13f){_0x253c7e[_0xd6ed('0x44')]=_0x3fe13f;return _0x253c7e;})[_0xd6ed('0x23')](respondWithFilteredResult(_0x3d5b9d,_0x407ea8))[_0xd6ed('0x45')](handleError(_0x3d5b9d,null));};exports[_0xd6ed('0x46')]=function(_0x204021,_0x42fddd){var _0x542243={'raw':!![],'where':{'id':_0x204021['params']['id']}},_0x2a0f72={};_0x2a0f72[_0xd6ed('0x2d')]=_[_0xd6ed('0x2f')](db[_0xd6ed('0x42')]['rawAttributes']);_0x2a0f72[_0xd6ed('0x2e')]=_['keys'](_0x204021[_0xd6ed('0x2e')]);_0x2a0f72[_0xd6ed('0x38')]=_[_0xd6ed('0x31')](_0x2a0f72['model'],_0x2a0f72['query']);_0x542243[_0xd6ed('0x30')]=_['intersection'](_0x2a0f72[_0xd6ed('0x2d')],qs[_0xd6ed('0x32')](_0x204021[_0xd6ed('0x2e')]['fields']));_0x542243['attributes']=_0x542243[_0xd6ed('0x30')][_0xd6ed('0x33')]?_0x542243['attributes']:_0x2a0f72['model'];if(_0x204021['query'][_0xd6ed('0x47')]){_0x542243[_0xd6ed('0x41')]=[{'all':!![]}];}_0x542243=_[_0xd6ed('0x3f')]({},_0x542243,_0x204021['options']);return db[_0xd6ed('0x42')][_0xd6ed('0x48')](_0x542243)[_0xd6ed('0x23')](handleEntityNotFound(_0x42fddd,null))[_0xd6ed('0x23')](respondWithResult(_0x42fddd,null))[_0xd6ed('0x45')](handleError(_0x42fddd,null));};exports[_0xd6ed('0x49')]=function(_0x2b4056,_0x59a165){return db[_0xd6ed('0x42')][_0xd6ed('0x49')](_0x2b4056['body'],{})[_0xd6ed('0x23')](function(_0x1acdc8){var _0x2ab629=_0x2b4056[_0xd6ed('0x4a')][_0xd6ed('0x25')]({'plain':!![]});if(!_0x2ab629)throw new Error(_0xd6ed('0x4b'));if(_0x2ab629[_0xd6ed('0x4c')]===_0xd6ed('0x4a')){var _0xb79155=_0x1acdc8[_0xd6ed('0x25')]({'plain':!![]});var _0x3b3968=_0xd6ed('0x26');return db[_0xd6ed('0x4d')][_0xd6ed('0x48')]({'where':{'name':_0x3b3968,'userProfileId':_0x2ab629['userProfileId']},'raw':!![]})[_0xd6ed('0x23')](function(_0x20b5b7){if(_0x20b5b7&&_0x20b5b7[_0xd6ed('0x4e')]===0x0){return db[_0xd6ed('0x4f')][_0xd6ed('0x49')]({'name':_0xb79155[_0xd6ed('0x29')],'resourceId':_0xb79155['id'],'type':_0x20b5b7[_0xd6ed('0x29')],'sectionId':_0x20b5b7['id']},{})[_0xd6ed('0x23')](function(){return _0x1acdc8;});}else{return _0x1acdc8;}})[_0xd6ed('0x45')](function(_0x2b76b7){logger[_0xd6ed('0x27')](_0xd6ed('0x50'),_0x2b76b7);throw _0x2b76b7;});}return _0x1acdc8;})['then'](respondWithResult(_0x59a165,0xc9))[_0xd6ed('0x45')](handleError(_0x59a165,null));};exports[_0xd6ed('0x51')]=function(_0x8f797a,_0x52cf78){if(_0x8f797a['body']['id']){delete _0x8f797a[_0xd6ed('0x52')]['id'];}return db[_0xd6ed('0x42')]['find']({'where':{'id':_0x8f797a[_0xd6ed('0x53')]['id']}})[_0xd6ed('0x23')](handleEntityNotFound(_0x52cf78,null))[_0xd6ed('0x23')](saveUpdates(_0x8f797a[_0xd6ed('0x52')],null))[_0xd6ed('0x23')](respondWithResult(_0x52cf78,null))[_0xd6ed('0x45')](handleError(_0x52cf78,null));};exports[_0xd6ed('0x24')]=function(_0x40d952,_0x4eb060){return db[_0xd6ed('0x42')]['find']({'where':{'id':_0x40d952[_0xd6ed('0x53')]['id']}})['then'](handleEntityNotFound(_0x4eb060,null))[_0xd6ed('0x23')](removeEntity(_0x4eb060,null))[_0xd6ed('0x45')](handleError(_0x4eb060,null));};
\ No newline at end of file
+var _0xd001=['destroy','then','get','UserProfileResource','error','stack','name','Disposition','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','map','type','key','VIRTUAL','field','merge','options','count','includeAll','include','catch','show','find','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Dispositions','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','jsforce','desk.js','papaparse','ioredis','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','offset','limit','set','Content-Range','json','reject','save','update'];(function(_0x5e2cb4,_0x592c64){var _0x282902=function(_0x1c1836){while(--_0x1c1836){_0x5e2cb4['push'](_0x5e2cb4['shift']());}};_0x282902(++_0x592c64);}(_0xd001,0x120));var _0x1d00=function(_0x32b5e1,_0x43f2c1){_0x32b5e1=_0x32b5e1-0x0;var _0xc5f102=_0xd001[_0x32b5e1];return _0xc5f102;};'use strict';var pdf=require(_0x1d00('0x0'));var emlformat=require(_0x1d00('0x1'));var rimraf=require(_0x1d00('0x2'));var zipdir=require(_0x1d00('0x3'));var jsonpatch=require(_0x1d00('0x4'));var rp=require(_0x1d00('0x5'));var moment=require(_0x1d00('0x6'));var BPromise=require(_0x1d00('0x7'));var Mustache=require('mustache');var util=require(_0x1d00('0x8'));var path=require(_0x1d00('0x9'));var sox=require(_0x1d00('0xa'));var csv=require(_0x1d00('0xb'));var ejs=require(_0x1d00('0xc'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x1d00('0xd'));var deskjs=require(_0x1d00('0xe'));var toCsv=require(_0x1d00('0xb'));var querystring=require('querystring');var Papa=require(_0x1d00('0xf'));var Redis=require(_0x1d00('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0x1d00('0x11'))(_0x1d00('0x12'));var utils=require(_0x1d00('0x13'));var config=require(_0x1d00('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2c1914,_0xf34f23){_0xf34f23=_0xf34f23||0xcc;return function(_0x492e7f){if(_0x492e7f){return _0x2c1914[_0x1d00('0x15')](_0xf34f23);}return _0x2c1914[_0x1d00('0x16')](_0xf34f23)[_0x1d00('0x17')]();};}function respondWithResult(_0xf0d423,_0x2bc3b7){_0x2bc3b7=_0x2bc3b7||0xc8;return function(_0x47b75b){if(_0x47b75b){return _0xf0d423[_0x1d00('0x16')](_0x2bc3b7)['json'](_0x47b75b);}};}function respondWithFilteredResult(_0x1bd5de,_0x3a3777){return function(_0x473f26){if(_0x473f26){var _0x30b7ba=_0x473f26['count'],_0x5f2811=_0x3a3777[_0x1d00('0x18')],_0x5832e6=_0x3a3777[_0x1d00('0x18')]+_0x3a3777[_0x1d00('0x19')],_0x309813;if(_0x5832e6>=_0x30b7ba){_0x5832e6=_0x30b7ba;_0x309813=0xc8;}else{_0x309813=0xce;}_0x1bd5de['status'](_0x309813);return _0x1bd5de[_0x1d00('0x1a')](_0x1d00('0x1b'),_0x5f2811+'-'+_0x5832e6+'/'+_0x30b7ba)[_0x1d00('0x1c')](_0x473f26);}return null;};}function patchUpdates(_0x4f9b3d){return function(_0x1c92b3){try{jsonpatch['apply'](_0x1c92b3,_0x4f9b3d,!![]);}catch(_0x451769){return BPromise[_0x1d00('0x1d')](_0x451769);}return _0x1c92b3[_0x1d00('0x1e')]();};}function saveUpdates(_0x10f87c,_0x372351){return function(_0x39f180){if(_0x39f180){return _0x39f180[_0x1d00('0x1f')](_0x10f87c)['then'](function(_0x3ae303){return _0x3ae303;});}return null;};}function removeEntity(_0x587732,_0x1bca36){return function(_0xf9c604){if(_0xf9c604){return _0xf9c604[_0x1d00('0x20')]()[_0x1d00('0x21')](function(){var _0x4de6cb=_0xf9c604[_0x1d00('0x22')]({'plain':!![]});var _0x4b07b8='Dispositions';return db[_0x1d00('0x23')][_0x1d00('0x20')]({'where':{'type':_0x4b07b8,'resourceId':_0x4de6cb['id']}})[_0x1d00('0x21')](function(){return _0xf9c604;});})[_0x1d00('0x21')](function(){_0x587732['status'](0xcc)[_0x1d00('0x17')]();});}};}function handleEntityNotFound(_0x65b75f,_0x2bf4fe){return function(_0x4dc027){if(!_0x4dc027){_0x65b75f[_0x1d00('0x15')](0x194);}return _0x4dc027;};}function handleError(_0x42107e,_0x5c3c38){_0x5c3c38=_0x5c3c38||0x1f4;return function(_0x35eaa5){logger[_0x1d00('0x24')](_0x35eaa5[_0x1d00('0x25')]);if(_0x35eaa5[_0x1d00('0x26')]){delete _0x35eaa5[_0x1d00('0x26')];}_0x42107e[_0x1d00('0x16')](_0x5c3c38)['send'](_0x35eaa5);};}exports['index']=function(_0x324496,_0x2313de){var _0x3c4e23={},_0x33b20b={},_0xf4ab80={'count':0x0,'rows':[]};var _0x23a09e=db[_0x1d00('0x27')][_0x1d00('0x28')];_0x33b20b[_0x1d00('0x29')]=_[_0x1d00('0x2a')](_0x23a09e);_0x33b20b[_0x1d00('0x2b')]=_[_0x1d00('0x2a')](_0x324496['query']);_0x33b20b[_0x1d00('0x2c')]=_[_0x1d00('0x2d')](_0x33b20b[_0x1d00('0x29')],_0x33b20b[_0x1d00('0x2b')]);_0x3c4e23['attributes']=_[_0x1d00('0x2d')](_0x33b20b['model'],qs[_0x1d00('0x2e')](_0x324496[_0x1d00('0x2b')][_0x1d00('0x2e')]));_0x3c4e23['attributes']=_0x3c4e23[_0x1d00('0x2f')][_0x1d00('0x30')]?_0x3c4e23[_0x1d00('0x2f')]:_0x33b20b[_0x1d00('0x29')];if(!_0x324496[_0x1d00('0x2b')][_0x1d00('0x31')](_0x1d00('0x32'))){_0x3c4e23[_0x1d00('0x19')]=qs['limit'](_0x324496['query'][_0x1d00('0x19')]);_0x3c4e23['offset']=qs[_0x1d00('0x18')](_0x324496['query'][_0x1d00('0x18')]);}_0x3c4e23[_0x1d00('0x33')]=qs[_0x1d00('0x34')](_0x324496['query'][_0x1d00('0x34')]);_0x3c4e23[_0x1d00('0x35')]=qs['filters'](_[_0x1d00('0x36')](_0x324496[_0x1d00('0x2b')],_0x33b20b['filters']));if(_0x324496[_0x1d00('0x2b')][_0x1d00('0x37')]){_0x3c4e23['where']=_['merge'](_0x3c4e23['where'],{'$or':_[_0x1d00('0x38')](_0x23a09e,function(_0x3a59ff){if(_0x3a59ff[_0x1d00('0x39')][_0x1d00('0x3a')]!==_0x1d00('0x3b')){var _0x1abcd4={};_0x1abcd4[_0x3a59ff[_0x1d00('0x3c')]]={'$like':'%'+_0x324496[_0x1d00('0x2b')][_0x1d00('0x37')]+'%'};return _0x1abcd4;}})});}_0x3c4e23=_[_0x1d00('0x3d')]({},_0x3c4e23,_0x324496[_0x1d00('0x3e')]);var _0x3396e8={'where':_0x3c4e23['where']};return db[_0x1d00('0x27')][_0x1d00('0x3f')](_0x3396e8)[_0x1d00('0x21')](function(_0x29f133){_0xf4ab80['count']=_0x29f133;if(_0x324496['query'][_0x1d00('0x40')]){_0x3c4e23[_0x1d00('0x41')]=[{'all':!![]}];}return db[_0x1d00('0x27')]['findAll'](_0x3c4e23);})[_0x1d00('0x21')](function(_0x190378){_0xf4ab80['rows']=_0x190378;return _0xf4ab80;})['then'](respondWithFilteredResult(_0x2313de,_0x3c4e23))[_0x1d00('0x42')](handleError(_0x2313de,null));};exports[_0x1d00('0x43')]=function(_0x2ea4db,_0xfa979b){var _0x44f83c={'raw':!![],'where':{'id':_0x2ea4db['params']['id']}},_0x32836b={};_0x32836b[_0x1d00('0x29')]=_[_0x1d00('0x2a')](db['Disposition'][_0x1d00('0x28')]);_0x32836b['query']=_[_0x1d00('0x2a')](_0x2ea4db['query']);_0x32836b[_0x1d00('0x2c')]=_[_0x1d00('0x2d')](_0x32836b[_0x1d00('0x29')],_0x32836b[_0x1d00('0x2b')]);_0x44f83c[_0x1d00('0x2f')]=_['intersection'](_0x32836b['model'],qs[_0x1d00('0x2e')](_0x2ea4db[_0x1d00('0x2b')][_0x1d00('0x2e')]));_0x44f83c[_0x1d00('0x2f')]=_0x44f83c[_0x1d00('0x2f')][_0x1d00('0x30')]?_0x44f83c[_0x1d00('0x2f')]:_0x32836b[_0x1d00('0x29')];if(_0x2ea4db[_0x1d00('0x2b')][_0x1d00('0x40')]){_0x44f83c[_0x1d00('0x41')]=[{'all':!![]}];}_0x44f83c=_[_0x1d00('0x3d')]({},_0x44f83c,_0x2ea4db['options']);return db['Disposition'][_0x1d00('0x44')](_0x44f83c)[_0x1d00('0x21')](handleEntityNotFound(_0xfa979b,null))[_0x1d00('0x21')](respondWithResult(_0xfa979b,null))[_0x1d00('0x42')](handleError(_0xfa979b,null));};exports['create']=function(_0x116970,_0xafbb1a){return db[_0x1d00('0x27')]['create'](_0x116970['body'],{})[_0x1d00('0x21')](function(_0x1794e7){var _0x26a7c7=_0x116970['user'][_0x1d00('0x22')]({'plain':!![]});if(!_0x26a7c7)throw new Error(_0x1d00('0x45'));if(_0x26a7c7[_0x1d00('0x46')]===_0x1d00('0x47')){var _0x2e67d0=_0x1794e7[_0x1d00('0x22')]({'plain':!![]});var _0x2b6ae0=_0x1d00('0x48');return db[_0x1d00('0x49')]['find']({'where':{'name':_0x2b6ae0,'userProfileId':_0x26a7c7[_0x1d00('0x4a')]},'raw':!![]})['then'](function(_0x1ff223){if(_0x1ff223&&_0x1ff223[_0x1d00('0x4b')]===0x0){return db[_0x1d00('0x23')][_0x1d00('0x4c')]({'name':_0x2e67d0['name'],'resourceId':_0x2e67d0['id'],'type':_0x1ff223['name'],'sectionId':_0x1ff223['id']},{})[_0x1d00('0x21')](function(){return _0x1794e7;});}else{return _0x1794e7;}})[_0x1d00('0x42')](function(_0x3afbfa){logger[_0x1d00('0x24')](_0x1d00('0x4d'),_0x3afbfa);throw _0x3afbfa;});}return _0x1794e7;})[_0x1d00('0x21')](respondWithResult(_0xafbb1a,0xc9))[_0x1d00('0x42')](handleError(_0xafbb1a,null));};exports['update']=function(_0xe17b3c,_0x362848){if(_0xe17b3c[_0x1d00('0x4e')]['id']){delete _0xe17b3c[_0x1d00('0x4e')]['id'];}return db[_0x1d00('0x27')][_0x1d00('0x44')]({'where':{'id':_0xe17b3c[_0x1d00('0x4f')]['id']}})[_0x1d00('0x21')](handleEntityNotFound(_0x362848,null))[_0x1d00('0x21')](saveUpdates(_0xe17b3c['body'],null))[_0x1d00('0x21')](respondWithResult(_0x362848,null))['catch'](handleError(_0x362848,null));};exports['destroy']=function(_0x3ed7cb,_0x1a1bec){return db[_0x1d00('0x27')][_0x1d00('0x44')]({'where':{'id':_0x3ed7cb[_0x1d00('0x4f')]['id']}})[_0x1d00('0x21')](handleEntityNotFound(_0x1a1bec,null))[_0x1d00('0x21')](removeEntity(_0x1a1bec,null))[_0x1d00('0x42')](handleError(_0x1a1bec,null));};
\ No newline at end of file
diff --git a/server/api/disposition/disposition.model.js b/server/api/disposition/disposition.model.js
index ab924cf..4b40571 100644
--- a/server/api/disposition/disposition.model.js
+++ b/server/api/disposition/disposition.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x07a4=['ChatWebsiteId','name_mail','name_sms','SmsAccountId','name_fax','FaxAccountId','name_openchannel','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./disposition.attributes','exports','define','Disposition','name_voice','name','ListId','name_chat'];(function(_0x55d839,_0x252286){var _0x5054d5=function(_0x3ee260){while(--_0x3ee260){_0x55d839['push'](_0x55d839['shift']());}};_0x5054d5(++_0x252286);}(_0x07a4,0xa8));var _0x407a=function(_0x4d46af,_0x200cf8){_0x4d46af=_0x4d46af-0x0;var _0x72d0d4=_0x07a4[_0x4d46af];return _0x72d0d4;};'use strict';var _=require('lodash');var util=require(_0x407a('0x0'));var logger=require('../../config/logger')(_0x407a('0x1'));var moment=require(_0x407a('0x2'));var BPromise=require(_0x407a('0x3'));var rp=require(_0x407a('0x4'));var fs=require('fs');var path=require(_0x407a('0x5'));var rimraf=require(_0x407a('0x6'));var config=require(_0x407a('0x7'));var attributes=require(_0x407a('0x8'));module[_0x407a('0x9')]=function(_0x5bb8cf,_0x29036f){return _0x5bb8cf[_0x407a('0xa')](_0x407a('0xb'),attributes,{'tableName':'tools_dispositions','paranoid':![],'indexes':[{'unique':!![],'name':_0x407a('0xc'),'fields':[_0x407a('0xd'),_0x407a('0xe')]},{'unique':!![],'name':_0x407a('0xf'),'fields':['name',_0x407a('0x10')]},{'unique':!![],'name':_0x407a('0x11'),'fields':['name','MailAccountId']},{'unique':!![],'name':_0x407a('0x12'),'fields':[_0x407a('0xd'),_0x407a('0x13')]},{'unique':!![],'name':_0x407a('0x14'),'fields':[_0x407a('0xd'),_0x407a('0x15')]},{'unique':!![],'name':_0x407a('0x16'),'fields':[_0x407a('0xd'),'OpenchannelAccountId']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xdc1c=['path','rimraf','../../config/environment','exports','define','Disposition','tools_dispositions','name_voice','name','ListId','name_chat','ChatWebsiteId','MailAccountId','name_sms','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x24b5b3,_0x4b5c87){var _0xd20ead=function(_0x127970){while(--_0x127970){_0x24b5b3['push'](_0x24b5b3['shift']());}};_0xd20ead(++_0x4b5c87);}(_0xdc1c,0xf3));var _0xcdc1=function(_0x40aaf3,_0x29c257){_0x40aaf3=_0x40aaf3-0x0;var _0x2b6b2a=_0xdc1c[_0x40aaf3];return _0x2b6b2a;};'use strict';var _=require(_0xcdc1('0x0'));var util=require(_0xcdc1('0x1'));var logger=require(_0xcdc1('0x2'))(_0xcdc1('0x3'));var moment=require(_0xcdc1('0x4'));var BPromise=require(_0xcdc1('0x5'));var rp=require(_0xcdc1('0x6'));var fs=require('fs');var path=require(_0xcdc1('0x7'));var rimraf=require(_0xcdc1('0x8'));var config=require(_0xcdc1('0x9'));var attributes=require('./disposition.attributes');module[_0xcdc1('0xa')]=function(_0x2b275c,_0x34404e){return _0x2b275c[_0xcdc1('0xb')](_0xcdc1('0xc'),attributes,{'tableName':_0xcdc1('0xd'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xcdc1('0xe'),'fields':[_0xcdc1('0xf'),_0xcdc1('0x10')]},{'unique':!![],'name':_0xcdc1('0x11'),'fields':[_0xcdc1('0xf'),_0xcdc1('0x12')]},{'unique':!![],'name':'name_mail','fields':[_0xcdc1('0xf'),_0xcdc1('0x13')]},{'unique':!![],'name':_0xcdc1('0x14'),'fields':[_0xcdc1('0xf'),'SmsAccountId']},{'unique':!![],'name':_0xcdc1('0x15'),'fields':[_0xcdc1('0xf'),_0xcdc1('0x16')]},{'unique':!![],'name':_0xcdc1('0x17'),'fields':[_0xcdc1('0xf'),_0xcdc1('0x18')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/disposition/disposition.rpc.js b/server/api/disposition/disposition.rpc.js
index d535dad..a72a4e0 100644
--- a/server/api/disposition/disposition.rpc.js
+++ b/server/api/disposition/disposition.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4074=['jayson/promise','client','http','request','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4074,0xf0));var _0x4407=function(_0x191ac7,_0x35c7af){_0x191ac7=_0x191ac7-0x0;var _0x33f0a5=_0x4074[_0x191ac7];return _0x33f0a5;};'use strict';var _=require(_0x4407('0x0'));var util=require(_0x4407('0x1'));var moment=require(_0x4407('0x2'));var BPromise=require('bluebird');var rs=require(_0x4407('0x3'));var fs=require('fs');var Redis=require(_0x4407('0x4'));var db=require(_0x4407('0x5'))['db'];var utils=require(_0x4407('0x6'));var logger=require(_0x4407('0x7'))(_0x4407('0x8'));var config=require(_0x4407('0x9'));var jayson=require(_0x4407('0xa'));var client=jayson[_0x4407('0xb')][_0x4407('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4933cf,_0x988538,_0x5f0699){return new BPromise(function(_0x414f0a,_0x3c1aee){return client[_0x4407('0xd')](_0x4933cf,_0x5f0699)['then'](function(_0x5e70a5){logger['info'](_0x4407('0xe'),_0x988538,_0x4407('0xf'));logger[_0x4407('0x10')](_0x4407('0x11'),_0x988538,_0x4407('0xf'),JSON[_0x4407('0x12')](_0x5e70a5));if(_0x5e70a5[_0x4407('0x13')]){if(_0x5e70a5[_0x4407('0x13')][_0x4407('0x14')]===0x1f4){logger[_0x4407('0x13')](_0x4407('0xe'),_0x988538,_0x5e70a5['error'][_0x4407('0x15')]);return _0x3c1aee(_0x5e70a5[_0x4407('0x13')]['message']);}logger[_0x4407('0x13')]('Disposition,\x20%s,\x20%s',_0x988538,_0x5e70a5[_0x4407('0x13')][_0x4407('0x15')]);return _0x414f0a(_0x5e70a5[_0x4407('0x13')][_0x4407('0x15')]);}else{logger[_0x4407('0x16')](_0x4407('0xe'),_0x988538,_0x4407('0xf'));_0x414f0a(_0x5e70a5[_0x4407('0x17')]['message']);}})[_0x4407('0x18')](function(_0x65b20b){logger[_0x4407('0x13')](_0x4407('0xe'),_0x988538,_0x65b20b);_0x3c1aee(_0x65b20b);});});}
\ No newline at end of file
+var _0x8ca9=['info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','http','request','then'];(function(_0x44c0b5,_0x35ab95){var _0x54a31c=function(_0x457f0d){while(--_0x457f0d){_0x44c0b5['push'](_0x44c0b5['shift']());}};_0x54a31c(++_0x35ab95);}(_0x8ca9,0x9c));var _0x98ca=function(_0xdb23fd,_0x2c4714){_0xdb23fd=_0xdb23fd-0x0;var _0x541393=_0x8ca9[_0xdb23fd];return _0x541393;};'use strict';var _=require(_0x98ca('0x0'));var util=require(_0x98ca('0x1'));var moment=require(_0x98ca('0x2'));var BPromise=require(_0x98ca('0x3'));var rs=require(_0x98ca('0x4'));var fs=require('fs');var Redis=require(_0x98ca('0x5'));var db=require(_0x98ca('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x98ca('0x7'));var config=require('../../config/environment');var jayson=require(_0x98ca('0x8'));var client=jayson['client'][_0x98ca('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xca4097,_0x18c349,_0x2852a0){return new BPromise(function(_0x323c95,_0x28a37a){return client[_0x98ca('0xa')](_0xca4097,_0x2852a0)[_0x98ca('0xb')](function(_0x277c29){logger[_0x98ca('0xc')](_0x98ca('0xd'),_0x18c349,_0x98ca('0xe'));logger[_0x98ca('0xf')](_0x98ca('0x10'),_0x18c349,_0x98ca('0xe'),JSON[_0x98ca('0x11')](_0x277c29));if(_0x277c29[_0x98ca('0x12')]){if(_0x277c29[_0x98ca('0x12')]['code']===0x1f4){logger[_0x98ca('0x12')](_0x98ca('0xd'),_0x18c349,_0x277c29[_0x98ca('0x12')][_0x98ca('0x13')]);return _0x28a37a(_0x277c29['error'][_0x98ca('0x13')]);}logger[_0x98ca('0x12')](_0x98ca('0xd'),_0x18c349,_0x277c29[_0x98ca('0x12')][_0x98ca('0x13')]);return _0x323c95(_0x277c29[_0x98ca('0x12')][_0x98ca('0x13')]);}else{logger['info'](_0x98ca('0xd'),_0x18c349,_0x98ca('0xe'));_0x323c95(_0x277c29[_0x98ca('0x14')][_0x98ca('0x13')]);}})['catch'](function(_0x238c1a){logger[_0x98ca('0x12')](_0x98ca('0xd'),_0x18c349,_0x238c1a);_0x28a37a(_0x238c1a);});});}
\ No newline at end of file
diff --git a/server/api/disposition/index.js b/server/api/disposition/index.js
index e3eed71..e932546 100644
--- a/server/api/disposition/index.js
+++ b/server/api/disposition/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd7c4=['multer','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','show','post','create','/:id','update','delete','destroy','exports'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0xd7c4,0x70));var _0x4d7c=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xd7c4[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x4d7c('0x0'));var util=require('util');var path=require(_0x4d7c('0x1'));var timeout=require('connect-timeout');var express=require(_0x4d7c('0x2'));var router=express['Router']();var auth=require(_0x4d7c('0x3'));var interaction=require(_0x4d7c('0x4'));var config=require(_0x4d7c('0x5'));var controller=require('./disposition.controller');router[_0x4d7c('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0x4d7c('0x6')]('/:id',auth[_0x4d7c('0x7')](),controller[_0x4d7c('0x8')]);router[_0x4d7c('0x9')]('/',auth['isAuthenticated'](),controller[_0x4d7c('0xa')]);router['put'](_0x4d7c('0xb'),auth[_0x4d7c('0x7')](),controller[_0x4d7c('0xc')]);router[_0x4d7c('0xd')]('/:id',auth['isAuthenticated'](),controller[_0x4d7c('0xe')]);module[_0x4d7c('0xf')]=router;
\ No newline at end of file
+var _0x90e2=['util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./disposition.controller','get','isAuthenticated','index','/:id','show','create','put','delete','destroy','exports','multer'];(function(_0x50b6e7,_0x2cb441){var _0x4a5887=function(_0x3b1e75){while(--_0x3b1e75){_0x50b6e7['push'](_0x50b6e7['shift']());}};_0x4a5887(++_0x2cb441);}(_0x90e2,0x143));var _0x290e=function(_0x32f072,_0x194fca){_0x32f072=_0x32f072-0x0;var _0x4f5aa2=_0x90e2[_0x32f072];return _0x4f5aa2;};'use strict';var multer=require(_0x290e('0x0'));var util=require(_0x290e('0x1'));var path=require('path');var timeout=require(_0x290e('0x2'));var express=require(_0x290e('0x3'));var router=express['Router']();var auth=require(_0x290e('0x4'));var interaction=require(_0x290e('0x5'));var config=require(_0x290e('0x6'));var controller=require(_0x290e('0x7'));router[_0x290e('0x8')]('/',auth[_0x290e('0x9')](),controller[_0x290e('0xa')]);router[_0x290e('0x8')](_0x290e('0xb'),auth['isAuthenticated'](),controller[_0x290e('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x290e('0xd')]);router[_0x290e('0xe')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x290e('0xf')]('/:id',auth[_0x290e('0x9')](),controller[_0x290e('0x10')]);module[_0x290e('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.attributes.js b/server/api/faxAccount/faxAccount.attributes.js
index 7974cbd..b1ee59a 100644
--- a/server/api/faxAccount/faxAccount.attributes.js
+++ b/server/api/faxAccount/faxAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x33f4=['Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','STRING','yes','xCALLY\x20Motion\x20Fax','localstationid','ENUM','12000','14400','4800','2400','7200','v17,v27,v29','INTEGER','SIP','IAX','DADHI','KHOMP','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'];(function(_0x11005e,_0x20c3d2){var _0x29338f=function(_0x3384e9){while(--_0x3384e9){_0x11005e['push'](_0x11005e['shift']());}};_0x29338f(++_0x20c3d2);}(_0x33f4,0x18b));var _0x433f=function(_0x4ebebd,_0x2029ab){_0x4ebebd=_0x4ebebd-0x0;var _0x4b1768=_0x33f4[_0x4ebebd];return _0x4b1768;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x433f('0x0')]},'ecm':{'type':Sequelize['ENUM'](_0x433f('0x1'),'no'),'defaultValue':_0x433f('0x1')},'headerinfo':{'type':Sequelize[_0x433f('0x0')],'defaultValue':_0x433f('0x2')},'localstationid':{'type':Sequelize[_0x433f('0x0')],'unique':_0x433f('0x3')},'minrate':{'type':Sequelize[_0x433f('0x4')]('2400','4800','7200','9600',_0x433f('0x5'),_0x433f('0x6')),'defaultValue':_0x433f('0x7')},'maxrate':{'type':Sequelize['ENUM'](_0x433f('0x8'),'4800',_0x433f('0x9'),'9600',_0x433f('0x5'),_0x433f('0x6')),'defaultValue':_0x433f('0x6')},'modem':{'type':Sequelize[_0x433f('0x0')],'defaultValue':_0x433f('0xa')},'gateway':{'type':Sequelize[_0x433f('0x0')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x433f('0x0')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x433f('0xb')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize['ENUM'](_0x433f('0xc'),_0x433f('0xd'),_0x433f('0xe'),_0x433f('0xf')),'defaultValue':_0x433f('0xc')},'key':{'type':Sequelize[_0x433f('0x0')],'allowNull':![]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x433f('0x10');}},'notificationSound':{'type':Sequelize[_0x433f('0x11')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x433f('0x11')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x433f('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x433f('0x11')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x433f('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x433f('0x12')},'mandatoryDisposition':{'type':Sequelize[_0x433f('0x11')],'defaultValue':![],'comment':_0x433f('0x13'),'set':function(_0x5b23fb){if(!_0x5b23fb)this[_0x433f('0x14')](_0x433f('0x15'),null);this[_0x433f('0x14')](_0x433f('0x16'),_0x5b23fb);}}};
\ No newline at end of file
+var _0xc59c=['STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','2400','4800','9600','12000','14400','7200','INTEGER','IAX','DADHI','KHOMP','SIP','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId'];(function(_0x1d708d,_0x5a5f50){var _0x46ceea=function(_0x2fe775){while(--_0x2fe775){_0x1d708d['push'](_0x1d708d['shift']());}};_0x46ceea(++_0x5a5f50);}(_0xc59c,0xcf));var _0xcc59=function(_0x4d50b4,_0x314aaa){_0x4d50b4=_0x4d50b4-0x0;var _0x18bcbf=_0xc59c[_0x4d50b4];return _0x18bcbf;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xcc59('0x0')]},'ecm':{'type':Sequelize[_0xcc59('0x1')](_0xcc59('0x2'),'no'),'defaultValue':_0xcc59('0x2')},'headerinfo':{'type':Sequelize[_0xcc59('0x0')],'defaultValue':_0xcc59('0x3')},'localstationid':{'type':Sequelize[_0xcc59('0x0')],'unique':_0xcc59('0x4')},'minrate':{'type':Sequelize['ENUM'](_0xcc59('0x5'),_0xcc59('0x6'),'7200',_0xcc59('0x7'),_0xcc59('0x8'),_0xcc59('0x9')),'defaultValue':_0xcc59('0x6')},'maxrate':{'type':Sequelize[_0xcc59('0x1')](_0xcc59('0x5'),_0xcc59('0x6'),_0xcc59('0xa'),'9600',_0xcc59('0x8'),'14400'),'defaultValue':_0xcc59('0x9')},'modem':{'type':Sequelize['STRING'],'defaultValue':'v17,v27,v29'},'gateway':{'type':Sequelize[_0xcc59('0x0')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0xcc59('0x0')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0xcc59('0xb')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0xcc59('0x1')]('SIP',_0xcc59('0xc'),_0xcc59('0xd'),_0xcc59('0xe')),'defaultValue':_0xcc59('0xf')},'key':{'type':Sequelize[_0xcc59('0x0')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0xcc59('0x10')],'defaultValue':function(){return _0xcc59('0x11');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xcc59('0x12')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xcc59('0x12')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xcc59('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0xcc59('0xb')],'allowNull':!![],'defaultValue':null,'comment':_0xcc59('0x13')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0xcc59('0x14'),'set':function(_0xfade55){if(!_0xfade55)this[_0xcc59('0x15')](_0xcc59('0x16'),null);this['setDataValue']('mandatoryDisposition',_0xfade55);}}};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.controller.js b/server/api/faxAccount/faxAccount.controller.js
index f188e2c..d0c32b2 100644
--- a/server/api/faxAccount/faxAccount.controller.js
+++ b/server/api/faxAccount/faxAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5ff5=['modem','t38timeout','FAXOPT(','Set','Wait','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','addAccountApplications','VoiceExtension','bulkCreate','updateAccountApplications','tech','createdAt','updatedAt','TrunkId','ListId','findById','getMessages','FaxMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','CmList','Contacts','DESC','attachments','join','basename','CheckAfterSend','isNil','from','\x22%s\x22\x20<%s>','fax','List','List\x20not\x20found','filename','Messages','Contact\x20not\x20found','out','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','getAgents','User','html-pdf','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxAccount.socket','register','jayson/promise','test','request','then','info','FaxAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','result','catch','status','count','offset','limit','Content-Range','json','apply','reject','save','update','destroy','get','UserProfileResource','sendStatus','stack','name','send','index','FaxAccount','rawAttributes','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','map','type','key','field','merge','options','includeAll','include','rows','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Pause','mandatoryDispositionPause','describe','addDisposition','Disposition','getDispositions','FaxAccountId','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','addInteraction','FaxInteraction','omit','getInteractions','CmContact','Contact','Owner','fullname','internal','Tag','Tags','color','tag','addApplications','sequelize','transaction','FaxApplication','findAndCountAll','getApplications','context','from-voip-provider','exten','localstationid','app','Fax\x20Extension','priority','appdata','Answer','push','CDR(type)=inbound-fax','ecm','gateway','faxdetect','headerinfo','minrate'];(function(_0xfb00b,_0x305917){var _0x4c12a1=function(_0x4fd4b2){while(--_0x4fd4b2){_0xfb00b['push'](_0xfb00b['shift']());}};_0x4c12a1(++_0x305917);}(_0x5ff5,0x1b9));var _0x55ff=function(_0x1ee376,_0x46af18){_0x1ee376=_0x1ee376-0x0;var _0xab0026=_0x5ff5[_0x1ee376];return _0xab0026;};'use strict';var pdf=require(_0x55ff('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x55ff('0x1'));var zipdir=require(_0x55ff('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x55ff('0x3'));var moment=require(_0x55ff('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x55ff('0x5'));var util=require(_0x55ff('0x6'));var path=require(_0x55ff('0x7'));var sox=require(_0x55ff('0x8'));var csv=require(_0x55ff('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x55ff('0xa'));var squel=require('squel');var crypto=require(_0x55ff('0xb'));var jsforce=require(_0x55ff('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x55ff('0x9'));var querystring=require(_0x55ff('0xd'));var Papa=require(_0x55ff('0xe'));var Redis=require(_0x55ff('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x55ff('0x10'));var logger=require(_0x55ff('0x11'))(_0x55ff('0x12'));var utils=require('../../config/utils');var config=require(_0x55ff('0x13'));var db=require(_0x55ff('0x14'))['db'];config[_0x55ff('0x15')]=_[_0x55ff('0x16')](config['redis'],{'host':_0x55ff('0x17'),'port':0x18eb});var socket=require(_0x55ff('0x18'))(new Redis(config[_0x55ff('0x15')]));require(_0x55ff('0x19'))[_0x55ff('0x1a')](socket);var jayson=require(_0x55ff('0x1b'));var client=jayson['client']['http']({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0xcf486e,_0x1428d4,_0x4ff512){if(_0x4ff512){var _0x8094de=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x8094de[_0x55ff('0x1c')](_0x1428d4)){return _0xcf486e;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0xcf486e;}}function respondWithRpcPromise(_0xcb9760,_0x218919,_0x2f9e06,_0x49cfd4){return new BPromise(function(_0x1449c0,_0x88781d){var _0x547eae=_0x49cfd4||client;return _0x547eae[_0x55ff('0x1d')](_0xcb9760,_0x2f9e06)[_0x55ff('0x1e')](function(_0x4c677c){logger[_0x55ff('0x1f')](_0x55ff('0x20'),_0x218919,'request\x20sent');logger[_0x55ff('0x21')]('FaxAccount,\x20%s,\x20%s,\x20%s',_0x218919,_0x55ff('0x22'),JSON[_0x55ff('0x23')](_0x4c677c));if(_0x4c677c['error']){if(_0x4c677c['error']['code']===0x1f4){logger[_0x55ff('0x24')](_0x55ff('0x20'),_0x218919,_0x4c677c[_0x55ff('0x24')]['message']);return _0x88781d(_0x4c677c['error'][_0x55ff('0x25')]);}logger[_0x55ff('0x24')](_0x55ff('0x20'),_0x218919,_0x4c677c[_0x55ff('0x24')][_0x55ff('0x25')]);return _0x1449c0(_0x4c677c[_0x55ff('0x24')][_0x55ff('0x25')]);}else{logger[_0x55ff('0x1f')]('FaxAccount,\x20%s,\x20%s',_0x218919,_0x55ff('0x22'));_0x1449c0(_0x4c677c[_0x55ff('0x26')][_0x55ff('0x25')]);}})[_0x55ff('0x27')](function(_0x4a0541){logger['error'](_0x55ff('0x20'),_0x218919,_0x4a0541);_0x88781d(_0x4a0541);});});}function respondWithStatusCode(_0x25173d,_0x5c578b){_0x5c578b=_0x5c578b||0xcc;return function(_0x44708e){if(_0x44708e){return _0x25173d['sendStatus'](_0x5c578b);}return _0x25173d['status'](_0x5c578b)['end']();};}function respondWithResult(_0x4e3939,_0x18233b){_0x18233b=_0x18233b||0xc8;return function(_0x199085){if(_0x199085){return _0x4e3939[_0x55ff('0x28')](_0x18233b)['json'](_0x199085);}};}function respondWithFilteredResult(_0x1022d9,_0x4b84d0){return function(_0x513b08){if(_0x513b08){var _0x1e26bb=_0x513b08[_0x55ff('0x29')],_0x145c7e=_0x4b84d0['offset'],_0x3d67aa=_0x4b84d0[_0x55ff('0x2a')]+_0x4b84d0[_0x55ff('0x2b')],_0x309d5e;if(_0x3d67aa>=_0x1e26bb){_0x3d67aa=_0x1e26bb;_0x309d5e=0xc8;}else{_0x309d5e=0xce;}_0x1022d9['status'](_0x309d5e);return _0x1022d9['set'](_0x55ff('0x2c'),_0x145c7e+'-'+_0x3d67aa+'/'+_0x1e26bb)[_0x55ff('0x2d')](_0x513b08);}return null;};}function patchUpdates(_0x21d843){return function(_0x38b7ce){try{jsonpatch[_0x55ff('0x2e')](_0x38b7ce,_0x21d843,!![]);}catch(_0x48834e){return BPromise[_0x55ff('0x2f')](_0x48834e);}return _0x38b7ce[_0x55ff('0x30')]();};}function saveUpdates(_0x26b3db,_0x4de5f1){return function(_0x41cbb4){if(_0x41cbb4){return _0x41cbb4[_0x55ff('0x31')](_0x26b3db)['then'](function(_0x359b6f){return _0x359b6f;});}return null;};}function removeEntity(_0xbd2253,_0x490b2a){return function(_0x2d465c){if(_0x2d465c){return _0x2d465c[_0x55ff('0x32')]()[_0x55ff('0x1e')](function(){var _0x3e8890=_0x2d465c[_0x55ff('0x33')]({'plain':!![]});var _0x4bce6a='FaxAccounts';return db[_0x55ff('0x34')][_0x55ff('0x32')]({'where':{'type':_0x4bce6a,'resourceId':_0x3e8890['id']}})[_0x55ff('0x1e')](function(){return _0x2d465c;});})['then'](function(){_0xbd2253[_0x55ff('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0xce4f3c,_0x55d485){return function(_0x446df8){if(!_0x446df8){_0xce4f3c[_0x55ff('0x35')](0x194);}return _0x446df8;};}function handleError(_0x329e9b,_0x39846e){_0x39846e=_0x39846e||0x1f4;return function(_0x295ab4){logger[_0x55ff('0x24')](_0x295ab4[_0x55ff('0x36')]);if(_0x295ab4[_0x55ff('0x37')]){delete _0x295ab4[_0x55ff('0x37')];}_0x329e9b[_0x55ff('0x28')](_0x39846e)[_0x55ff('0x38')](_0x295ab4);};}exports[_0x55ff('0x39')]=function(_0x3161ba,_0x5dd16d){var _0x454c78={'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x2338f7={},_0x3e3ecb={'count':0x0,'rows':[]};var _0x1516c3=db[_0x55ff('0x3a')][_0x55ff('0x3b')];_0x2338f7['model']=_[_0x55ff('0x3c')](_0x1516c3);_0x2338f7[_0x55ff('0x3d')]=_['keys'](_0x3161ba['query']);_0x2338f7[_0x55ff('0x3e')]=_[_0x55ff('0x3f')](_0x2338f7[_0x55ff('0x40')],_0x2338f7[_0x55ff('0x3d')]);_0x454c78[_0x55ff('0x41')]=_[_0x55ff('0x3f')](_0x2338f7[_0x55ff('0x40')],qs[_0x55ff('0x42')](_0x3161ba[_0x55ff('0x3d')]['fields']));_0x454c78[_0x55ff('0x41')]=_0x454c78['attributes'][_0x55ff('0x43')]?_0x454c78['attributes']:_0x2338f7[_0x55ff('0x40')];if(!_0x3161ba['query'][_0x55ff('0x44')](_0x55ff('0x45'))){_0x454c78[_0x55ff('0x2b')]=qs[_0x55ff('0x2b')](_0x3161ba[_0x55ff('0x3d')][_0x55ff('0x2b')]);_0x454c78[_0x55ff('0x2a')]=qs['offset'](_0x3161ba[_0x55ff('0x3d')][_0x55ff('0x2a')]);}_0x454c78[_0x55ff('0x46')]=qs[_0x55ff('0x47')](_0x3161ba['query'][_0x55ff('0x47')]);_0x454c78[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_[_0x55ff('0x49')](_0x3161ba[_0x55ff('0x3d')],_0x2338f7[_0x55ff('0x3e')]));if(_0x3161ba[_0x55ff('0x3d')][_0x55ff('0x4a')]){_0x454c78[_0x55ff('0x48')]=_['merge'](_0x454c78[_0x55ff('0x48')],{'$or':_[_0x55ff('0x4b')](_0x1516c3,function(_0x441f3d){if(_0x441f3d[_0x55ff('0x4c')][_0x55ff('0x4d')]!=='VIRTUAL'){var _0x710d16={};_0x710d16[_0x441f3d[_0x55ff('0x4e')]]={'$like':'%'+_0x3161ba[_0x55ff('0x3d')][_0x55ff('0x4a')]+'%'};return _0x710d16;}})});}_0x454c78=_[_0x55ff('0x4f')]({},_0x454c78,_0x3161ba[_0x55ff('0x50')]);var _0x2dc884={'where':_0x454c78['where']};return db[_0x55ff('0x3a')][_0x55ff('0x29')](_0x2dc884)['then'](function(_0x542890){_0x3e3ecb[_0x55ff('0x29')]=_0x542890;if(_0x3161ba[_0x55ff('0x3d')][_0x55ff('0x51')]){_0x454c78[_0x55ff('0x52')]=[{'all':!![]}];}return db[_0x55ff('0x3a')]['findAll'](_0x454c78);})[_0x55ff('0x1e')](function(_0x3c98b7){_0x3e3ecb[_0x55ff('0x53')]=_0x3c98b7;return _0x3e3ecb;})[_0x55ff('0x1e')](respondWithFilteredResult(_0x5dd16d,_0x454c78))[_0x55ff('0x27')](handleError(_0x5dd16d,null));};exports[_0x55ff('0x54')]=function(_0x2bda0c,_0x4a2613){var _0x4e65e6={'raw':![],'where':{'id':_0x2bda0c[_0x55ff('0x55')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x5c1417={};_0x5c1417[_0x55ff('0x40')]=_[_0x55ff('0x3c')](db[_0x55ff('0x3a')]['rawAttributes']);_0x5c1417[_0x55ff('0x3d')]=_[_0x55ff('0x3c')](_0x2bda0c[_0x55ff('0x3d')]);_0x5c1417[_0x55ff('0x3e')]=_[_0x55ff('0x3f')](_0x5c1417[_0x55ff('0x40')],_0x5c1417['query']);_0x4e65e6['attributes']=_['intersection'](_0x5c1417[_0x55ff('0x40')],qs['fields'](_0x2bda0c[_0x55ff('0x3d')][_0x55ff('0x42')]));_0x4e65e6[_0x55ff('0x41')]=_0x4e65e6['attributes'][_0x55ff('0x43')]?_0x4e65e6[_0x55ff('0x41')]:_0x5c1417[_0x55ff('0x40')];if(_0x2bda0c[_0x55ff('0x3d')]['includeAll']){_0x4e65e6[_0x55ff('0x52')]=[{'all':!![]}];}_0x4e65e6=_['merge']({},_0x4e65e6,_0x2bda0c['options']);return db[_0x55ff('0x3a')][_0x55ff('0x56')](_0x4e65e6)[_0x55ff('0x1e')](handleEntityNotFound(_0x4a2613,null))[_0x55ff('0x1e')](respondWithResult(_0x4a2613,null))[_0x55ff('0x27')](handleError(_0x4a2613,null));};exports[_0x55ff('0x57')]=function(_0x471256,_0x52c630){return db[_0x55ff('0x3a')][_0x55ff('0x57')](_0x471256[_0x55ff('0x58')],{})[_0x55ff('0x1e')](function(_0x43570b){var _0x354e37=_0x471256['user'][_0x55ff('0x33')]({'plain':!![]});if(!_0x354e37)throw new Error(_0x55ff('0x59'));if(_0x354e37['role']===_0x55ff('0x5a')){var _0x360df2=_0x43570b[_0x55ff('0x33')]({'plain':!![]});var _0x461a13='FaxAccounts';return db[_0x55ff('0x5b')][_0x55ff('0x56')]({'where':{'name':_0x461a13,'userProfileId':_0x354e37[_0x55ff('0x5c')]},'raw':!![]})['then'](function(_0x3b9bbc){if(_0x3b9bbc&&_0x3b9bbc['autoAssociation']===0x0){return db['UserProfileResource'][_0x55ff('0x57')]({'name':_0x360df2[_0x55ff('0x37')],'resourceId':_0x360df2['id'],'type':_0x3b9bbc[_0x55ff('0x37')],'sectionId':_0x3b9bbc['id']},{})[_0x55ff('0x1e')](function(){return _0x43570b;});}else{return _0x43570b;}})[_0x55ff('0x27')](function(_0xceaebb){logger[_0x55ff('0x24')](_0x55ff('0x5d'),_0xceaebb);throw _0xceaebb;});}return _0x43570b;})[_0x55ff('0x1e')](respondWithResult(_0x52c630,0xc9))['catch'](handleError(_0x52c630,null));};exports[_0x55ff('0x31')]=function(_0x2b6244,_0x214e02){if(_0x2b6244[_0x55ff('0x58')]['id']){delete _0x2b6244[_0x55ff('0x58')]['id'];}return db['FaxAccount'][_0x55ff('0x56')]({'where':{'id':_0x2b6244[_0x55ff('0x55')]['id']},'include':[{'model':db[_0x55ff('0x5e')],'as':_0x55ff('0x5f')}]})[_0x55ff('0x1e')](handleEntityNotFound(_0x214e02,null))[_0x55ff('0x1e')](saveUpdates(_0x2b6244[_0x55ff('0x58')],null))[_0x55ff('0x1e')](respondWithResult(_0x214e02,null))[_0x55ff('0x27')](handleError(_0x214e02,null));};exports['destroy']=function(_0xc0cb79,_0x1330d3){return db[_0x55ff('0x3a')]['find']({'where':{'id':_0xc0cb79[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x1330d3,null))[_0x55ff('0x1e')](removeEntity(_0x1330d3,null))['catch'](handleError(_0x1330d3,null));};exports[_0x55ff('0x60')]=function(_0x5a7ef3,_0xc8a6de){return db[_0x55ff('0x3a')]['describe']()[_0x55ff('0x1e')](respondWithResult(_0xc8a6de,null))[_0x55ff('0x27')](handleError(_0xc8a6de,null));};exports[_0x55ff('0x61')]=function(_0x3e087e,_0x273c9a,_0x599414){if(_0x3e087e[_0x55ff('0x58')]['id']){delete _0x3e087e['body']['id'];}return db['FaxAccount'][_0x55ff('0x56')]({'where':{'id':_0x3e087e[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x273c9a,null))['then'](function(_0x4bbf95){if(_0x4bbf95){_0x3e087e[_0x55ff('0x58')]['FaxAccountId']=_0x4bbf95['id'];return db[_0x55ff('0x62')][_0x55ff('0x57')](_0x3e087e[_0x55ff('0x58')]);}})[_0x55ff('0x1e')](respondWithResult(_0x273c9a,null))[_0x55ff('0x27')](handleError(_0x273c9a,null));};exports[_0x55ff('0x63')]=function(_0x473ace,_0x1f2b6b,_0x35179b){var _0x3331ad={'raw':![],'where':{}};var _0xdb379a={};var _0x575aaa={'count':0x0,'rows':[]};return db['FaxAccount']['findOne']({'where':{'id':_0x473ace[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x1f2b6b,null))[_0x55ff('0x1e')](function(_0x362577){if(_0x362577){_0xdb379a['model']=_['keys'](db['Disposition']['rawAttributes']);_0xdb379a[_0x55ff('0x3d')]=_['keys'](_0x473ace['query']);_0xdb379a[_0x55ff('0x3e')]=_[_0x55ff('0x3f')](_0xdb379a['model'],_0xdb379a['query']);_0x3331ad[_0x55ff('0x41')]=_[_0x55ff('0x3f')](_0xdb379a[_0x55ff('0x40')],qs['fields'](_0x473ace[_0x55ff('0x3d')]['fields']));_0x3331ad[_0x55ff('0x41')]=_0x3331ad[_0x55ff('0x41')][_0x55ff('0x43')]?_0x3331ad['attributes']:_0xdb379a[_0x55ff('0x40')];if(!_0x473ace[_0x55ff('0x3d')][_0x55ff('0x44')](_0x55ff('0x45'))){_0x3331ad[_0x55ff('0x2b')]=qs[_0x55ff('0x2b')](_0x473ace[_0x55ff('0x3d')][_0x55ff('0x2b')]);_0x3331ad[_0x55ff('0x2a')]=qs['offset'](_0x473ace[_0x55ff('0x3d')]['offset']);}_0x3331ad[_0x55ff('0x46')]=qs[_0x55ff('0x47')](_0x473ace[_0x55ff('0x3d')]['sort']);_0x3331ad[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_['pick'](_0x473ace[_0x55ff('0x3d')],_0xdb379a[_0x55ff('0x3e')]));_0x3331ad[_0x55ff('0x48')][_0x55ff('0x64')]=_0x362577['id'];if(_0x473ace['query'][_0x55ff('0x4a')]){_0x3331ad[_0x55ff('0x48')]=_['merge'](_0x3331ad[_0x55ff('0x48')],{'$or':_[_0x55ff('0x4b')](_0x3331ad[_0x55ff('0x41')],function(_0x2f6b8b){var _0x343b4d={};_0x343b4d[_0x2f6b8b]={'$like':'%'+_0x473ace[_0x55ff('0x3d')][_0x55ff('0x4a')]+'%'};return _0x343b4d;})});}_0x3331ad=_['merge']({},_0x3331ad,_0x473ace[_0x55ff('0x50')]);return db['Disposition'][_0x55ff('0x29')]({'where':_0x3331ad['where']})[_0x55ff('0x1e')](function(_0x56c04d){_0x575aaa['count']=_0x56c04d;if(_0x473ace[_0x55ff('0x3d')][_0x55ff('0x51')]){_0x3331ad[_0x55ff('0x52')]=[{'all':!![]}];}return db[_0x55ff('0x62')][_0x55ff('0x65')](_0x3331ad);})[_0x55ff('0x1e')](function(_0x431645){_0x575aaa[_0x55ff('0x53')]=_0x431645;return _0x575aaa;});}})[_0x55ff('0x1e')](respondWithFilteredResult(_0x1f2b6b,_0x3331ad))[_0x55ff('0x27')](handleError(_0x1f2b6b,null));};exports['removeDispositions']=function(_0x577fd8,_0x356e6b,_0x14948b){return db[_0x55ff('0x3a')]['find']({'where':{'id':_0x577fd8[_0x55ff('0x55')]['id']}})['then'](handleEntityNotFound(_0x356e6b,null))[_0x55ff('0x1e')](function(_0x5846b5){if(_0x5846b5){return _0x5846b5[_0x55ff('0x66')](_0x577fd8['query'][_0x55ff('0x67')]);}})[_0x55ff('0x1e')](respondWithStatusCode(_0x356e6b,null))[_0x55ff('0x27')](handleError(_0x356e6b,null));};exports[_0x55ff('0x68')]=function(_0x1ca136,_0x5736fc,_0x42b16d){if(_0x1ca136[_0x55ff('0x58')]['id']){delete _0x1ca136[_0x55ff('0x58')]['id'];}return db[_0x55ff('0x3a')]['find']({'where':{'id':_0x1ca136[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x5736fc,null))[_0x55ff('0x1e')](function(_0x39ef8b){if(_0x39ef8b){_0x1ca136[_0x55ff('0x58')][_0x55ff('0x64')]=_0x39ef8b['id'];return db[_0x55ff('0x69')]['create'](_0x1ca136['body']);}})[_0x55ff('0x1e')](respondWithResult(_0x5736fc,null))[_0x55ff('0x27')](handleError(_0x5736fc,null));};exports[_0x55ff('0x6a')]=function(_0x20079a,_0x27ee51,_0x442641){var _0xc9e0cc={'raw':![],'where':{}};var _0x5ab680={};var _0x1e13ac={'count':0x0,'rows':[]};return db['FaxAccount'][_0x55ff('0x6b')]({'where':{'id':_0x20079a[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x27ee51,null))[_0x55ff('0x1e')](function(_0x32c97d){if(_0x32c97d){_0x5ab680['model']=_['keys'](db[_0x55ff('0x69')][_0x55ff('0x3b')]);_0x5ab680['query']=_[_0x55ff('0x3c')](_0x20079a[_0x55ff('0x3d')]);_0x5ab680[_0x55ff('0x3e')]=_[_0x55ff('0x3f')](_0x5ab680[_0x55ff('0x40')],_0x5ab680['query']);_0xc9e0cc[_0x55ff('0x41')]=_[_0x55ff('0x3f')](_0x5ab680[_0x55ff('0x40')],qs['fields'](_0x20079a['query'][_0x55ff('0x42')]));_0xc9e0cc[_0x55ff('0x41')]=_0xc9e0cc[_0x55ff('0x41')]['length']?_0xc9e0cc[_0x55ff('0x41')]:_0x5ab680[_0x55ff('0x40')];if(!_0x20079a[_0x55ff('0x3d')]['hasOwnProperty'](_0x55ff('0x45'))){_0xc9e0cc[_0x55ff('0x2b')]=qs[_0x55ff('0x2b')](_0x20079a['query'][_0x55ff('0x2b')]);_0xc9e0cc['offset']=qs['offset'](_0x20079a[_0x55ff('0x3d')][_0x55ff('0x2a')]);}_0xc9e0cc[_0x55ff('0x46')]=qs['sort'](_0x20079a[_0x55ff('0x3d')][_0x55ff('0x47')]);_0xc9e0cc[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_[_0x55ff('0x49')](_0x20079a[_0x55ff('0x3d')],_0x5ab680[_0x55ff('0x3e')]));_0xc9e0cc[_0x55ff('0x48')][_0x55ff('0x64')]=_0x32c97d['id'];if(_0x20079a[_0x55ff('0x3d')][_0x55ff('0x4a')]){_0xc9e0cc['where']=_[_0x55ff('0x4f')](_0xc9e0cc[_0x55ff('0x48')],{'$or':_[_0x55ff('0x4b')](_0xc9e0cc[_0x55ff('0x41')],function(_0x107ec8){var _0x363708={};_0x363708[_0x107ec8]={'$like':'%'+_0x20079a[_0x55ff('0x3d')][_0x55ff('0x4a')]+'%'};return _0x363708;})});}_0xc9e0cc=_[_0x55ff('0x4f')]({},_0xc9e0cc,_0x20079a[_0x55ff('0x50')]);return db[_0x55ff('0x69')]['count']({'where':_0xc9e0cc['where']})[_0x55ff('0x1e')](function(_0x59cd5b){_0x1e13ac[_0x55ff('0x29')]=_0x59cd5b;if(_0x20079a[_0x55ff('0x3d')][_0x55ff('0x51')]){_0xc9e0cc[_0x55ff('0x52')]=[{'all':!![]}];}return db[_0x55ff('0x69')]['findAll'](_0xc9e0cc);})['then'](function(_0x52346d){_0x1e13ac['rows']=_0x52346d;return _0x1e13ac;});}})[_0x55ff('0x1e')](respondWithFilteredResult(_0x27ee51,_0xc9e0cc))[_0x55ff('0x27')](handleError(_0x27ee51,null));};exports[_0x55ff('0x6c')]=function(_0x4b47f5,_0x39fde1,_0x2753b7){return db[_0x55ff('0x3a')][_0x55ff('0x56')]({'where':{'id':_0x4b47f5[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x39fde1,null))[_0x55ff('0x1e')](function(_0x1ad517){if(_0x1ad517){return _0x1ad517[_0x55ff('0x6c')](_0x4b47f5[_0x55ff('0x3d')][_0x55ff('0x67')]);}})[_0x55ff('0x1e')](respondWithStatusCode(_0x39fde1,null))[_0x55ff('0x27')](handleError(_0x39fde1,null));};exports[_0x55ff('0x6d')]=function(_0x3ab89e,_0x9cd612,_0x45f42c){return db[_0x55ff('0x6e')][_0x55ff('0x56')]({'where':{'id':_0x3ab89e[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x9cd612,null))['then'](function(_0x16665c){if(_0x16665c){return _0x16665c[_0x55ff('0x6d')](_0x3ab89e['body'][_0x55ff('0x67')],_[_0x55ff('0x6f')](_0x3ab89e[_0x55ff('0x58')],[_0x55ff('0x67'),'id'])||{});}})[_0x55ff('0x1e')](respondWithResult(_0x9cd612,null))[_0x55ff('0x27')](handleError(_0x9cd612,null));};exports[_0x55ff('0x70')]=function(_0x3ac33c,_0x14f20c,_0x182ac5){var _0x43ee63={'raw':![],'where':{}};var _0x1bd7da={};var _0x5d62c3={'count':0x0,'rows':[]};return db['FaxAccount'][_0x55ff('0x6b')]({'where':{'id':_0x3ac33c[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x14f20c,null))['then'](function(_0x185d0e){if(_0x185d0e){_0x1bd7da[_0x55ff('0x40')]=_[_0x55ff('0x3c')](db[_0x55ff('0x6e')][_0x55ff('0x3b')]);_0x1bd7da[_0x55ff('0x3d')]=_[_0x55ff('0x3c')](_0x3ac33c[_0x55ff('0x3d')]);_0x1bd7da['filters']=_[_0x55ff('0x3f')](_0x1bd7da[_0x55ff('0x40')],_0x1bd7da[_0x55ff('0x3d')]);_0x43ee63[_0x55ff('0x41')]=_[_0x55ff('0x3f')](_0x1bd7da[_0x55ff('0x40')],qs['fields'](_0x3ac33c['query'][_0x55ff('0x42')]));_0x43ee63[_0x55ff('0x41')]=_0x43ee63['attributes'][_0x55ff('0x43')]?_0x43ee63[_0x55ff('0x41')]:_0x1bd7da[_0x55ff('0x40')];if(!_0x3ac33c[_0x55ff('0x3d')]['hasOwnProperty'](_0x55ff('0x45'))){_0x43ee63[_0x55ff('0x2b')]=qs['limit'](_0x3ac33c[_0x55ff('0x3d')]['limit']);_0x43ee63[_0x55ff('0x2a')]=qs[_0x55ff('0x2a')](_0x3ac33c[_0x55ff('0x3d')][_0x55ff('0x2a')]);}_0x43ee63['order']=qs[_0x55ff('0x47')](_0x3ac33c[_0x55ff('0x3d')]['sort']);_0x43ee63[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_['pick'](_0x3ac33c[_0x55ff('0x3d')],_0x1bd7da[_0x55ff('0x3e')]));_0x43ee63['where']['FaxAccountId']=_0x185d0e['id'];if(_0x3ac33c[_0x55ff('0x3d')][_0x55ff('0x4a')]){_0x43ee63[_0x55ff('0x48')]=_[_0x55ff('0x4f')](_0x43ee63[_0x55ff('0x48')],{'$or':_['map'](_0x43ee63[_0x55ff('0x41')],function(_0x3b188f){var _0x6f99fe={};_0x6f99fe[_0x3b188f]={'$like':'%'+_0x3ac33c[_0x55ff('0x3d')][_0x55ff('0x4a')]+'%'};return _0x6f99fe;})});}_0x43ee63=_[_0x55ff('0x4f')]({},_0x43ee63,_0x3ac33c[_0x55ff('0x50')]);return db[_0x55ff('0x6e')][_0x55ff('0x29')]({'where':_0x43ee63[_0x55ff('0x48')]})[_0x55ff('0x1e')](function(_0x2b4dcf){_0x5d62c3[_0x55ff('0x29')]=_0x2b4dcf;if(_0x3ac33c[_0x55ff('0x3d')][_0x55ff('0x51')]){_0x43ee63[_0x55ff('0x52')]=[{'model':db[_0x55ff('0x71')],'as':_0x55ff('0x72'),'required':![]},{'model':db['User'],'as':_0x55ff('0x73'),'attributes':[_0x55ff('0x37'),_0x55ff('0x74'),_0x55ff('0x75')],'required':![]},{'model':db[_0x55ff('0x76')],'as':_0x55ff('0x77'),'attributes':['id','name',_0x55ff('0x78')],'where':_0x3ac33c[_0x55ff('0x3d')][_0x55ff('0x79')]?{'id':_0x3ac33c[_0x55ff('0x3d')]['tag']}:undefined,'required':_0x3ac33c[_0x55ff('0x3d')][_0x55ff('0x79')]?!![]:![]}];}return db['FaxInteraction'][_0x55ff('0x65')](_0x43ee63);})[_0x55ff('0x1e')](function(_0x1abc59){_0x5d62c3['rows']=_0x1abc59;return _0x5d62c3;});}})[_0x55ff('0x1e')](respondWithFilteredResult(_0x14f20c,_0x43ee63))[_0x55ff('0x27')](handleError(_0x14f20c,null));};exports[_0x55ff('0x7a')]=function(_0x5ec4b6,_0x3cec6e,_0x1614e9){return db[_0x55ff('0x3a')][_0x55ff('0x6b')]({'where':{'id':_0x5ec4b6['params']['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x3cec6e,null))[_0x55ff('0x1e')](function(_0x51d034){if(_0x51d034){return db[_0x55ff('0x7b')][_0x55ff('0x7c')](function(_0x4e6b2){return db[_0x55ff('0x7d')][_0x55ff('0x32')]({'where':{'FaxAccountId':_0x5ec4b6[_0x55ff('0x55')]['id']},'transaction':_0x4e6b2})[_0x55ff('0x1e')](function(_0x90e3dd){var _0x4a0df4=_['map'](_0x5ec4b6['body'],function(_0x10b106){_0x10b106[_0x55ff('0x64')]=_0x5ec4b6['params']['id'];return _0x10b106;});return db[_0x55ff('0x7d')]['bulkCreate'](_0x4a0df4,{'transaction':_0x4e6b2});});})[_0x55ff('0x1e')](function(){return db[_0x55ff('0x7d')][_0x55ff('0x7e')]({'where':{'FaxAccountId':_0x5ec4b6['params']['id']},'order':'priority'});});}})[_0x55ff('0x1e')](respondWithResult(_0x3cec6e,null))[_0x55ff('0x27')](handleError(_0x3cec6e,null));};exports[_0x55ff('0x7f')]=function(_0x3eeb9f,_0x38d411,_0x47099d){var _0x383946={};var _0x53d2b2={};var _0xc8fc77;var _0x288531;return db[_0x55ff('0x3a')][_0x55ff('0x6b')]({'where':{'id':_0x3eeb9f['params']['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x38d411,null))[_0x55ff('0x1e')](function(_0x5ddbe2){if(_0x5ddbe2){_0xc8fc77=_0x5ddbe2;_0x53d2b2['model']=_[_0x55ff('0x3c')](db['FaxApplication'][_0x55ff('0x3b')]);_0x53d2b2[_0x55ff('0x3d')]=_['keys'](_0x3eeb9f[_0x55ff('0x3d')]);_0x53d2b2[_0x55ff('0x3e')]=_[_0x55ff('0x3f')](_0x53d2b2[_0x55ff('0x40')],_0x53d2b2[_0x55ff('0x3d')]);_0x383946['attributes']=_[_0x55ff('0x3f')](_0x53d2b2['model'],qs[_0x55ff('0x42')](_0x3eeb9f[_0x55ff('0x3d')][_0x55ff('0x42')]));_0x383946[_0x55ff('0x41')]=_0x383946[_0x55ff('0x41')][_0x55ff('0x43')]?_0x383946[_0x55ff('0x41')]:_0x53d2b2[_0x55ff('0x40')];_0x383946[_0x55ff('0x46')]=qs[_0x55ff('0x47')](_0x3eeb9f['query'][_0x55ff('0x47')]);_0x383946[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_[_0x55ff('0x49')](_0x3eeb9f[_0x55ff('0x3d')],_0x53d2b2[_0x55ff('0x3e')]));if(_0x3eeb9f[_0x55ff('0x3d')][_0x55ff('0x4a')]){_0x383946[_0x55ff('0x48')]=_['merge'](_0x383946[_0x55ff('0x48')],{'$or':_['map'](_0x383946[_0x55ff('0x41')],function(_0x4a6f94){var _0x75779c={};_0x75779c[_0x4a6f94]={'$like':'%'+_0x3eeb9f[_0x55ff('0x3d')][_0x55ff('0x4a')]+'%'};return _0x75779c;})});}_0x383946=_[_0x55ff('0x4f')]({},_0x383946,_0x3eeb9f[_0x55ff('0x50')]);return _0xc8fc77[_0x55ff('0x7f')](_0x383946);}})[_0x55ff('0x1e')](function(_0x114402){if(_0x114402){_0x288531=_0x114402[_0x55ff('0x43')];if(!_0x3eeb9f[_0x55ff('0x3d')]['hasOwnProperty'](_0x55ff('0x45'))){_0x383946['limit']=qs[_0x55ff('0x2b')](_0x3eeb9f[_0x55ff('0x3d')]['limit']);_0x383946[_0x55ff('0x2a')]=qs[_0x55ff('0x2a')](_0x3eeb9f[_0x55ff('0x3d')][_0x55ff('0x2a')]);}return _0xc8fc77[_0x55ff('0x7f')](_0x383946);}})[_0x55ff('0x1e')](function(_0x45aa10){if(_0x45aa10){return _0x45aa10?{'count':_0x288531,'rows':_0x45aa10}:null;}})[_0x55ff('0x1e')](respondWithResult(_0x38d411,null))['catch'](handleError(_0x38d411,null));};function Extension(_0x22f88f,_0x4a1fc4,_0x30789a,_0x22344d){this[_0x55ff('0x80')]=_0x55ff('0x81');this[_0x55ff('0x82')]=_0x22f88f[_0x55ff('0x83')];this[_0x55ff('0x84')]=_0x22344d;this['type']='system';this['description']=_0x55ff('0x85');this[_0x55ff('0x64')]=_0x22f88f['id'];this[_0x55ff('0x86')]=_0x4a1fc4;this[_0x55ff('0x87')]=_0x30789a;}function createExtensionsReciveFax(_0xcf71f2){var _0x58cfd6=0x1;var _0x523597=[];_0x523597['push'](new Extension(_0xcf71f2,_0x58cfd6,'',_0x55ff('0x88')));_0x58cfd6+=0x1;_0x523597[_0x55ff('0x89')](new Extension(_0xcf71f2,_0x58cfd6,_0x55ff('0x8a'),'Set'));_0x58cfd6+=0x1;for(var _0x36c7c9 in _0xcf71f2){if(_0xcf71f2[_0x55ff('0x44')](_0x36c7c9)&&(_0x36c7c9===_0x55ff('0x8b')||_0x36c7c9==='localstationid'||_0x36c7c9===_0x55ff('0x8c')||_0x36c7c9===_0x55ff('0x8d')||_0x36c7c9===_0x55ff('0x8e')||_0x36c7c9==='maxrate'||_0x36c7c9===_0x55ff('0x8f')||_0x36c7c9===_0x55ff('0x90')||_0x36c7c9===_0x55ff('0x91'))){_0x523597[_0x55ff('0x89')](new Extension(_0xcf71f2,_0x58cfd6,_0x55ff('0x92')+_0x36c7c9+')='+_0xcf71f2[_0x36c7c9],_0x55ff('0x93')));_0x58cfd6+=0x1;}}_0x523597[_0x55ff('0x89')](new Extension(_0xcf71f2,_0x58cfd6,'6',_0x55ff('0x94')));_0x58cfd6+=0x1;_0x523597[_0x55ff('0x89')](new Extension(_0xcf71f2,_0x58cfd6,_0x55ff('0x95'),_0x55ff('0x96')));_0x58cfd6=0x0;return _0x523597;}exports[_0x55ff('0x97')]=function(_0x28ec78,_0x13e288,_0x1002e1){var _0x433964;return db[_0x55ff('0x7b')][_0x55ff('0x7c')](function(_0x1fd4a2){return db['FaxAccount'][_0x55ff('0x57')](_0x28ec78['body'],{'transaction':_0x1fd4a2})[_0x55ff('0x1e')](function(_0x351203){_0x433964=_0x351203[_0x55ff('0x33')]({'plain':!![]});return db[_0x55ff('0x98')][_0x55ff('0x99')](createExtensionsReciveFax(_0x433964),{'transaction':_0x1fd4a2});});})[_0x55ff('0x1e')](function(){return _0x433964;})['then'](respondWithResult(_0x13e288,null))[_0x55ff('0x27')](handleError(_0x13e288,null));};exports[_0x55ff('0x9a')]=function(_0x538de4,_0x3fec95,_0x495053){var _0x2c03aa;return db[_0x55ff('0x7b')][_0x55ff('0x7c')](function(_0x390620){return db[_0x55ff('0x3a')][_0x55ff('0x31')](_0x538de4[_0x55ff('0x58')],{'where':{'id':_0x538de4['body']['id']},'transaction':_0x390620})[_0x55ff('0x1e')](function(_0x318f66){return db[_0x55ff('0x98')][_0x55ff('0x32')]({'where':{'FaxAccountId':_0x538de4[_0x55ff('0x58')]['id']},'transaction':_0x390620})['then'](function(_0x27a02d){return db[_0x55ff('0x98')][_0x55ff('0x99')](createExtensionsReciveFax(_[_0x55ff('0x6f')](_0x538de4[_0x55ff('0x58')],[_0x55ff('0x9b'),_0x55ff('0x4d'),_0x55ff('0x9c'),_0x55ff('0x9d'),_0x55ff('0x9e'),_0x55ff('0x9f')])),{'transaction':_0x390620});});});})[_0x55ff('0x1e')](function(){return db[_0x55ff('0x3a')][_0x55ff('0xa0')](_0x538de4[_0x55ff('0x58')]['id']);})[_0x55ff('0x1e')](respondWithResult(_0x3fec95,null))[_0x55ff('0x27')](handleError(_0x3fec95,null));};exports[_0x55ff('0xa1')]=function(_0x546a58,_0x12e6be,_0x37add1){var _0x44eb5f={'raw':!![],'where':{}};var _0x195876={};var _0x2d9dd5={'count':0x0,'rows':[]};return db['FaxAccount'][_0x55ff('0x6b')]({'where':{'id':_0x546a58[_0x55ff('0x55')]['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x12e6be,null))[_0x55ff('0x1e')](function(_0x4696ae){if(_0x4696ae){_0x195876[_0x55ff('0x40')]=_[_0x55ff('0x3c')](db[_0x55ff('0xa2')]['rawAttributes']);_0x195876[_0x55ff('0x3d')]=_[_0x55ff('0x3c')](_0x546a58[_0x55ff('0x3d')]);_0x195876[_0x55ff('0x3e')]=_['intersection'](_0x195876['model'],_0x195876[_0x55ff('0x3d')]);_0x44eb5f[_0x55ff('0x41')]=_[_0x55ff('0x3f')](_0x195876['model'],qs[_0x55ff('0x42')](_0x546a58[_0x55ff('0x3d')]['fields']));_0x44eb5f['attributes']=_0x44eb5f[_0x55ff('0x41')]['length']?_0x44eb5f['attributes']:_0x195876['model'];if(!_0x546a58['query'][_0x55ff('0x44')](_0x55ff('0x45'))){_0x44eb5f[_0x55ff('0x2b')]=qs['limit'](_0x546a58[_0x55ff('0x3d')][_0x55ff('0x2b')]);_0x44eb5f[_0x55ff('0x2a')]=qs[_0x55ff('0x2a')](_0x546a58[_0x55ff('0x3d')][_0x55ff('0x2a')]);}_0x44eb5f[_0x55ff('0x46')]=qs[_0x55ff('0x47')](_0x546a58[_0x55ff('0x3d')][_0x55ff('0x47')]);_0x44eb5f[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_[_0x55ff('0x49')](_0x546a58[_0x55ff('0x3d')],_0x195876['filters']));_0x44eb5f[_0x55ff('0x48')]['FaxAccountId']=_0x4696ae['id'];if(_0x546a58['query']['filter']){_0x44eb5f['where']=_[_0x55ff('0x4f')](_0x44eb5f[_0x55ff('0x48')],{'$or':_[_0x55ff('0x4b')](_0x44eb5f[_0x55ff('0x41')],function(_0x2142d0){var _0x29321a={};_0x29321a[_0x2142d0]={'$like':'%'+_0x546a58[_0x55ff('0x3d')][_0x55ff('0x4a')]+'%'};return _0x29321a;})});}if(_0x546a58[_0x55ff('0x3d')][_0x55ff('0xa3')]){var _0x1db590=_0x546a58[_0x55ff('0x3d')]['$gte'][_0x55ff('0xa4')](',');var _0x9e19b0={};_0x9e19b0[_0x1db590[0x0]]={'$gte':moment(_0x1db590[0x1])[_0x55ff('0xa5')](_0x55ff('0xa6'))};_0x44eb5f[_0x55ff('0x48')]=_[_0x55ff('0x4f')](_0x44eb5f[_0x55ff('0x48')],_0x9e19b0);}_0x44eb5f=_[_0x55ff('0x4f')]({},_0x44eb5f,_0x546a58[_0x55ff('0x50')]);return db[_0x55ff('0xa2')][_0x55ff('0x29')]({'where':_0x44eb5f['where']})['then'](function(_0x4c6c1f){_0x2d9dd5[_0x55ff('0x29')]=_0x4c6c1f;if(_0x546a58[_0x55ff('0x3d')][_0x55ff('0x51')]){_0x44eb5f[_0x55ff('0x52')]=[{'all':!![]}];}return db[_0x55ff('0xa2')]['findAll'](_0x44eb5f);})[_0x55ff('0x1e')](function(_0x13bb11){_0x2d9dd5[_0x55ff('0x53')]=_0x13bb11;return _0x2d9dd5;});}})[_0x55ff('0x1e')](respondWithFilteredResult(_0x12e6be,_0x44eb5f))[_0x55ff('0x27')](handleError(_0x12e6be,null));};exports[_0x55ff('0x38')]=function(_0x588c7f,_0xb2260f,_0xcfe3c8){var _0x3540e1,_0x5fea1e={},_0xa8e518;if(_0x588c7f[_0x55ff('0x58')]['to']){_0xa8e518=_0x588c7f[_0x55ff('0x58')]['to'][0x0];}return db[_0x55ff('0x3a')][_0x55ff('0x56')]({'where':{'id':_0x588c7f['params']['id']},'include':[{'model':db[_0x55ff('0xa7')],'as':'List','include':[{'model':db[_0x55ff('0x71')],'as':_0x55ff('0xa8'),'where':{'fax':_0xa8e518},'limit':0x1,'order':[['updatedAt',_0x55ff('0xa9')]]}]}]})[_0x55ff('0x1e')](handleEntityNotFound(_0xb2260f,null))['then'](function(_0x30ed98){_0x3540e1=_0x30ed98;if(_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')]&&_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')]['length']){for(var _0x16834f=0x0;_0x16834f<_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')]['length'];_0x16834f+=0x1){_0x588c7f[_0x55ff('0x58')]['attachments'][_0x16834f]={'filename':_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][_0x16834f][_0x55ff('0x37')],'id':_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][_0x16834f]['id'],'path':path[_0x55ff('0xab')](config['root'],'server/files/attachments',_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][_0x16834f][_0x55ff('0xac')])};}}return respondWithRpcPromise(_0x55ff('0xad'),'CheckAfterSend',{'FaxAccountId':_['isNil'](_0x588c7f[_0x55ff('0x55')]['id'])?undefined:_0x588c7f[_0x55ff('0x55')]['id'],'path':_[_0x55ff('0xae')](_0x588c7f['body']['attachments'][0x0][_0x55ff('0x7')])?undefined:_0x588c7f[_0x55ff('0x58')]['attachments'][0x0][_0x55ff('0x7')],'fax':_['isNil'](_0x588c7f[_0x55ff('0x58')]['to'][0x0])?undefined:_0x588c7f[_0x55ff('0x58')]['to'][0x0]},client9002);})[_0x55ff('0x1e')](function(){if(_0x3540e1){if(_[_0x55ff('0xae')](_0x588c7f[_0x55ff('0x58')]['from'])){_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaf')]=util[_0x55ff('0xa5')](_0x55ff('0xb0'),_0x3540e1[_0x55ff('0x37')],_0x3540e1[_0x55ff('0xb1')]);}if(_0x3540e1[_0x55ff('0xb2')]){if(_0x3540e1[_0x55ff('0xb2')][_0x55ff('0xa8')][_0x55ff('0x43')]){return _0x3540e1[_0x55ff('0xb2')][_0x55ff('0xa8')][0x0];}else{return db['CmContact'][_0x55ff('0x57')](_['defaults'](_0x588c7f[_0x55ff('0x58')],{'firstName':_0x588c7f[_0x55ff('0x58')]['to'][0x0],'phone':_0x588c7f[_0x55ff('0x58')]['to'][0x0],'fax':_0x588c7f['body']['to'][0x0],'ListId':_0x3540e1['ListId']}));}}else{throw new Error(_0x55ff('0xb3'));}}else{throw new Error('Send\x20Fax\x20failed');}})[_0x55ff('0x1e')](function(_0x5957d9){if(_0x5957d9){return db[_0x55ff('0x6e')][_0x55ff('0x56')]({'where':{'ContactId':_0x5957d9['id'],'closed':![],'FaxAccountId':_0x3540e1['id']}})[_0x55ff('0x1e')](function(_0x1e75f1){if(_0x1e75f1){return[_0x1e75f1,![]];}return db['FaxInteraction'][_0x55ff('0x57')]({'UserId':_0x588c7f[_0x55ff('0x5a')]['id'],'ContactId':_0x5957d9['id'],'FaxAccountId':_0x3540e1['id'],'fax':_0x588c7f[_0x55ff('0x58')]['to'][0x0],'firstMsgDirection':'out','Messages':[_[_0x55ff('0x4f')](_0x588c7f[_0x55ff('0x58')],{'read':![],'body':_0x588c7f['body'][_0x55ff('0xaa')][0x0][_0x55ff('0xb4')],'FaxAccountId':_0x3540e1['id'],'UserId':_0x588c7f[_0x55ff('0x5a')]['id'],'ContactId':_0x5957d9['id'],'AttachmentId':_0x588c7f['body'][_0x55ff('0xaa')][0x0]['id']})]},{'include':[{'model':db['FaxMessage'],'as':_0x55ff('0xb5')}]})[_0x55ff('0x1e')](function(_0x429cce){return[_0x429cce,!![]];});});}else{throw new Error(_0x55ff('0xb6'));}})['spread'](function(_0xc8bec2,_0x16de5c){if(_0x16de5c){return _0xc8bec2;}return db['FaxMessage'][_0x55ff('0x57')]({'direction':_0x55ff('0xb7'),'read':![],'body':_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][0x0]['filename'],'FaxAccountId':_0x3540e1['id'],'FaxInteractionId':_0xc8bec2['id'],'UserId':_0x588c7f[_0x55ff('0x5a')]['id'],'ContactId':_0xc8bec2['ContactId'],'AttachmentId':_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][0x0]['id']})[_0x55ff('0x1e')](function(_0x52c723){_0xc8bec2[_0x55ff('0xb8')][_0x55ff('0xb5')]=[];_0xc8bec2['dataValues'][_0x55ff('0xb5')]['push'](_0x52c723['dataValues']);return _0xc8bec2;});})['then'](function(_0x324449){respondWithRpcPromise(_0x55ff('0xb9'),_0x55ff('0xb9'),{'FaxAccountId':_[_0x55ff('0xae')](_0x588c7f['params']['id'])?undefined:_0x588c7f['params']['id'],'path':_[_0x55ff('0xae')](_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][0x0][_0x55ff('0x7')])?undefined:_0x588c7f[_0x55ff('0x58')][_0x55ff('0xaa')][0x0][_0x55ff('0x7')],'fax':_[_0x55ff('0xae')](_0x588c7f[_0x55ff('0x58')]['to'][0x0])?undefined:_0x588c7f[_0x55ff('0x58')]['to'][0x0],'AttachmentId':_0x588c7f['body']['attachments'][0x0]['id']},client9002)[_0x55ff('0x1e')](function(_0x3bbd6d){logger[_0x55ff('0x1f')](_0x55ff('0xba'),_0x3bbd6d);})[_0x55ff('0x27')](function(_0x5213a9){logger[_0x55ff('0x1f')](_0x55ff('0xba'),_0x5213a9);});return _0x324449;})[_0x55ff('0x1e')](respondWithResult(_0xb2260f,null))[_0x55ff('0x27')](handleError(_0xb2260f,null));};exports[_0x55ff('0xbb')]=function(_0x344bac,_0x38eab5,_0x3fa80a){return db[_0x55ff('0x3a')]['find']({'where':{'id':_0x344bac[_0x55ff('0x55')]['id']}})['then'](handleEntityNotFound(_0x38eab5,null))[_0x55ff('0x1e')](function(_0x2d9539){if(_0x2d9539){return _0x2d9539[_0x55ff('0xbb')](_0x344bac[_0x55ff('0x58')]['ids'],_['omit'](_0x344bac['body'],[_0x55ff('0x67'),'id'])||{})['spread'](function(_0x13692e){for(var _0xcc1c77=0x0;_0xcc1c77<_0x344bac[_0x55ff('0x58')][_0x55ff('0x67')][_0x55ff('0x43')];_0xcc1c77+=0x1){socket[_0x55ff('0xbc')](_0x55ff('0xbd'),{'UserId':_0x344bac[_0x55ff('0x58')][_0x55ff('0x67')][_0xcc1c77],'FaxAccountId':_0x344bac[_0x55ff('0x55')]['id']});}return _0x13692e;});}})[_0x55ff('0x1e')](respondWithResult(_0x38eab5,null))[_0x55ff('0x27')](handleError(_0x38eab5,null));};exports['removeAgents']=function(_0x45ed6b,_0x5b38c9,_0x6c22e5){return db[_0x55ff('0x3a')][_0x55ff('0x56')]({'where':{'id':_0x45ed6b['params']['id']}})['then'](handleEntityNotFound(_0x5b38c9,null))[_0x55ff('0x1e')](function(_0x27d426){if(_0x27d426){return _0x27d426[_0x55ff('0xbe')](_0x45ed6b['query'][_0x55ff('0x67')])['then'](function(){if(_[_0x55ff('0xbf')](_0x45ed6b[_0x55ff('0x3d')][_0x55ff('0x67')])){for(var _0x49d62d=0x0;_0x49d62d<_0x45ed6b[_0x55ff('0x3d')]['ids'][_0x55ff('0x43')];_0x49d62d+=0x1){socket['emit'](_0x55ff('0xc0'),{'UserId':Number(_0x45ed6b[_0x55ff('0x3d')]['ids'][_0x49d62d]),'FaxAccountId':Number(_0x45ed6b[_0x55ff('0x55')]['id'])});}}else{socket['emit'](_0x55ff('0xc0'),{'UserId':Number(_0x45ed6b['query'][_0x55ff('0x67')]),'FaxAccountId':Number(_0x45ed6b[_0x55ff('0x55')]['id'])});}});}})[_0x55ff('0x1e')](respondWithStatusCode(_0x5b38c9,null))[_0x55ff('0x27')](handleError(_0x5b38c9,null));};exports[_0x55ff('0xc1')]=function(_0x950b63,_0x20135c,_0x3402ed){var _0x418b99={};var _0x146de1={};var _0x35de11;var _0x4bad28;return db['FaxAccount']['findOne']({'where':{'id':_0x950b63['params']['id']}})[_0x55ff('0x1e')](handleEntityNotFound(_0x20135c,null))[_0x55ff('0x1e')](function(_0x1c6d70){if(_0x1c6d70){_0x35de11=_0x1c6d70;_0x146de1[_0x55ff('0x40')]=_[_0x55ff('0x3c')](db[_0x55ff('0xc2')][_0x55ff('0x3b')]);_0x146de1[_0x55ff('0x3d')]=_[_0x55ff('0x3c')](_0x950b63[_0x55ff('0x3d')]);_0x146de1[_0x55ff('0x3e')]=_[_0x55ff('0x3f')](_0x146de1[_0x55ff('0x40')],_0x146de1[_0x55ff('0x3d')]);_0x418b99[_0x55ff('0x41')]=_[_0x55ff('0x3f')](_0x146de1[_0x55ff('0x40')],qs[_0x55ff('0x42')](_0x950b63[_0x55ff('0x3d')][_0x55ff('0x42')]));_0x418b99[_0x55ff('0x41')]=_0x418b99['attributes'][_0x55ff('0x43')]?_0x418b99['attributes']:_0x146de1['model'];_0x418b99[_0x55ff('0x46')]=qs[_0x55ff('0x47')](_0x950b63[_0x55ff('0x3d')]['sort']);_0x418b99[_0x55ff('0x48')]=qs[_0x55ff('0x3e')](_['pick'](_0x950b63['query'],_0x146de1[_0x55ff('0x3e')]));if(_0x950b63['query']['filter']){_0x418b99[_0x55ff('0x48')]=_[_0x55ff('0x4f')](_0x418b99[_0x55ff('0x48')],{'$or':_[_0x55ff('0x4b')](_0x418b99[_0x55ff('0x41')],function(_0x22f7b7){var _0x7da6a0={};_0x7da6a0[_0x22f7b7]={'$like':'%'+_0x950b63['query'][_0x55ff('0x4a')]+'%'};return _0x7da6a0;})});}_0x418b99=_[_0x55ff('0x4f')]({},_0x418b99,_0x950b63[_0x55ff('0x50')]);return _0x35de11['getAgents'](_0x418b99);}})['then'](function(_0x2ef15a){if(_0x2ef15a){_0x4bad28=_0x2ef15a[_0x55ff('0x43')];if(!_0x950b63[_0x55ff('0x3d')][_0x55ff('0x44')](_0x55ff('0x45'))){_0x418b99['limit']=qs['limit'](_0x950b63[_0x55ff('0x3d')]['limit']);_0x418b99[_0x55ff('0x2a')]=qs['offset'](_0x950b63[_0x55ff('0x3d')][_0x55ff('0x2a')]);}return _0x35de11[_0x55ff('0xc1')](_0x418b99);}})[_0x55ff('0x1e')](function(_0x470bc4){if(_0x470bc4){return _0x470bc4?{'count':_0x4bad28,'rows':_0x470bc4}:null;}})['then'](respondWithResult(_0x20135c,null))[_0x55ff('0x27')](handleError(_0x20135c,null));};
\ No newline at end of file
+var _0xfb9d=['offset','limit','Content-Range','apply','reject','save','update','get','FaxAccounts','UserProfileResource','destroy','sendStatus','stack','name','send','FaxAccount','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','type','VIRTUAL','field','options','count','includeAll','include','findAll','rows','show','params','Pause','mandatoryDispositionPause','rawAttributes','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','find','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','FaxAccountId','getDispositions','Disposition','order','removeDispositions','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','ids','addInteraction','FaxInteraction','getInteractions','CmContact','User','Owner','fullname','internal','Tag','color','tag','addApplications','sequelize','transaction','FaxApplication','bulkCreate','findAndCountAll','priority','getApplications','from-voip-provider','exten','localstationid','description','appdata','push','Answer','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect','headerinfo','minrate','modem','FAXOPT(','addAccountApplications','VoiceExtension','updateAccountApplications','omit','tech','key','updatedAt','TrunkId','ListId','findById','getMessages','FaxMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','CmList','List','Contacts','DESC','attachments','root','server/files/attachments','basename','CheckAfterSend','isNil','\x22%s\x22\x20<%s>','fax','Send\x20Fax\x20failed','out','filename','Contact\x20not\x20found','spread','dataValues','Messages','SendFax','path','SendFaxRpc,\x20%s','addAgents','emit','userFaxAccount:save','removeAgents','userFaxAccount:remove','getAgents','eml-format','rimraf','zip-dir','request-promise','mustache','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxAccount.socket','register','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','FaxAccount,\x20%s,\x20%s','message','result','catch','status','end','json'];(function(_0x424a9a,_0x2dd9af){var _0xa7831c=function(_0x512534){while(--_0x512534){_0x424a9a['push'](_0x424a9a['shift']());}};_0xa7831c(++_0x2dd9af);}(_0xfb9d,0x92));var _0xdfb9=function(_0x119763,_0x1747b2){_0x119763=_0x119763-0x0;var _0x14282d=_0xfb9d[_0x119763];return _0x14282d;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xdfb9('0x0'));var rimraf=require(_0xdfb9('0x1'));var zipdir=require(_0xdfb9('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xdfb9('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xdfb9('0x4'));var util=require('util');var path=require('path');var sox=require(_0xdfb9('0x5'));var csv=require('to-csv');var ejs=require(_0xdfb9('0x6'));var fs=require('fs');var _=require(_0xdfb9('0x7'));var squel=require('squel');var crypto=require(_0xdfb9('0x8'));var jsforce=require(_0xdfb9('0x9'));var deskjs=require(_0xdfb9('0xa'));var toCsv=require(_0xdfb9('0xb'));var querystring=require(_0xdfb9('0xc'));var Papa=require(_0xdfb9('0xd'));var Redis=require(_0xdfb9('0xe'));var authService=require(_0xdfb9('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xdfb9('0x10'));var logger=require(_0xdfb9('0x11'))(_0xdfb9('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xdfb9('0x13'))['db'];config[_0xdfb9('0x14')]=_[_0xdfb9('0x15')](config[_0xdfb9('0x14')],{'host':_0xdfb9('0x16'),'port':0x18eb});var socket=require(_0xdfb9('0x17'))(new Redis(config['redis']));require(_0xdfb9('0x18'))[_0xdfb9('0x19')](socket);var jayson=require(_0xdfb9('0x1a'));var client=jayson[_0xdfb9('0x1b')]['http']({'port':0x232c});var client9002=jayson['client'][_0xdfb9('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x4f5369,_0x52ec98,_0x139b06){if(_0x139b06){var _0x556b59=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x556b59['test'](_0x52ec98)){return _0x4f5369;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x4f5369;}}function respondWithRpcPromise(_0x426153,_0x5732d4,_0x1bff9c,_0x5dace7){return new BPromise(function(_0x15359a,_0x3f48b9){var _0x5a8f27=_0x5dace7||client;return _0x5a8f27[_0xdfb9('0x1d')](_0x426153,_0x1bff9c)[_0xdfb9('0x1e')](function(_0x3f507c){logger[_0xdfb9('0x1f')]('FaxAccount,\x20%s,\x20%s',_0x5732d4,_0xdfb9('0x20'));logger[_0xdfb9('0x21')]('FaxAccount,\x20%s,\x20%s,\x20%s',_0x5732d4,_0xdfb9('0x20'),JSON[_0xdfb9('0x22')](_0x3f507c));if(_0x3f507c[_0xdfb9('0x23')]){if(_0x3f507c[_0xdfb9('0x23')][_0xdfb9('0x24')]===0x1f4){logger[_0xdfb9('0x23')](_0xdfb9('0x25'),_0x5732d4,_0x3f507c['error'][_0xdfb9('0x26')]);return _0x3f48b9(_0x3f507c[_0xdfb9('0x23')][_0xdfb9('0x26')]);}logger[_0xdfb9('0x23')](_0xdfb9('0x25'),_0x5732d4,_0x3f507c[_0xdfb9('0x23')][_0xdfb9('0x26')]);return _0x15359a(_0x3f507c[_0xdfb9('0x23')][_0xdfb9('0x26')]);}else{logger[_0xdfb9('0x1f')]('FaxAccount,\x20%s,\x20%s',_0x5732d4,_0xdfb9('0x20'));_0x15359a(_0x3f507c[_0xdfb9('0x27')][_0xdfb9('0x26')]);}})[_0xdfb9('0x28')](function(_0x46433f){logger[_0xdfb9('0x23')](_0xdfb9('0x25'),_0x5732d4,_0x46433f);_0x3f48b9(_0x46433f);});});}function respondWithStatusCode(_0x393b6e,_0x4fe695){_0x4fe695=_0x4fe695||0xcc;return function(_0x5a5452){if(_0x5a5452){return _0x393b6e['sendStatus'](_0x4fe695);}return _0x393b6e[_0xdfb9('0x29')](_0x4fe695)[_0xdfb9('0x2a')]();};}function respondWithResult(_0x3dcc13,_0x27ede7){_0x27ede7=_0x27ede7||0xc8;return function(_0x2ced6c){if(_0x2ced6c){return _0x3dcc13['status'](_0x27ede7)[_0xdfb9('0x2b')](_0x2ced6c);}};}function respondWithFilteredResult(_0x4be881,_0x1b093a){return function(_0xdc5856){if(_0xdc5856){var _0x4e2274=_0xdc5856['count'],_0x15a5c6=_0x1b093a[_0xdfb9('0x2c')],_0x358576=_0x1b093a[_0xdfb9('0x2c')]+_0x1b093a[_0xdfb9('0x2d')],_0x32cb4f;if(_0x358576>=_0x4e2274){_0x358576=_0x4e2274;_0x32cb4f=0xc8;}else{_0x32cb4f=0xce;}_0x4be881[_0xdfb9('0x29')](_0x32cb4f);return _0x4be881['set'](_0xdfb9('0x2e'),_0x15a5c6+'-'+_0x358576+'/'+_0x4e2274)['json'](_0xdc5856);}return null;};}function patchUpdates(_0x573b52){return function(_0x19a2df){try{jsonpatch[_0xdfb9('0x2f')](_0x19a2df,_0x573b52,!![]);}catch(_0x453e02){return BPromise[_0xdfb9('0x30')](_0x453e02);}return _0x19a2df[_0xdfb9('0x31')]();};}function saveUpdates(_0x128577,_0x2fcf55){return function(_0x2238f0){if(_0x2238f0){return _0x2238f0[_0xdfb9('0x32')](_0x128577)[_0xdfb9('0x1e')](function(_0x13239e){return _0x13239e;});}return null;};}function removeEntity(_0x326a71,_0x50901f){return function(_0x18ad1b){if(_0x18ad1b){return _0x18ad1b['destroy']()[_0xdfb9('0x1e')](function(){var _0xd55226=_0x18ad1b[_0xdfb9('0x33')]({'plain':!![]});var _0x23565e=_0xdfb9('0x34');return db[_0xdfb9('0x35')][_0xdfb9('0x36')]({'where':{'type':_0x23565e,'resourceId':_0xd55226['id']}})[_0xdfb9('0x1e')](function(){return _0x18ad1b;});})[_0xdfb9('0x1e')](function(){_0x326a71[_0xdfb9('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3b78c5,_0x3ca425){return function(_0x568e8d){if(!_0x568e8d){_0x3b78c5[_0xdfb9('0x37')](0x194);}return _0x568e8d;};}function handleError(_0x5df28a,_0x3dc479){_0x3dc479=_0x3dc479||0x1f4;return function(_0x21ce76){logger['error'](_0x21ce76[_0xdfb9('0x38')]);if(_0x21ce76[_0xdfb9('0x39')]){delete _0x21ce76[_0xdfb9('0x39')];}_0x5df28a['status'](_0x3dc479)[_0xdfb9('0x3a')](_0x21ce76);};}exports['index']=function(_0x262874,_0x5ab5cd){var _0x11bd29={'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x45c98e={},_0x550c83={'count':0x0,'rows':[]};var _0x2c239d=db[_0xdfb9('0x3b')]['rawAttributes'];_0x45c98e[_0xdfb9('0x3c')]=_[_0xdfb9('0x3d')](_0x2c239d);_0x45c98e[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x262874[_0xdfb9('0x3e')]);_0x45c98e[_0xdfb9('0x3f')]=_[_0xdfb9('0x40')](_0x45c98e['model'],_0x45c98e['query']);_0x11bd29[_0xdfb9('0x41')]=_[_0xdfb9('0x40')](_0x45c98e[_0xdfb9('0x3c')],qs['fields'](_0x262874['query'][_0xdfb9('0x42')]));_0x11bd29['attributes']=_0x11bd29[_0xdfb9('0x41')][_0xdfb9('0x43')]?_0x11bd29[_0xdfb9('0x41')]:_0x45c98e[_0xdfb9('0x3c')];if(!_0x262874[_0xdfb9('0x3e')][_0xdfb9('0x44')](_0xdfb9('0x45'))){_0x11bd29['limit']=qs[_0xdfb9('0x2d')](_0x262874[_0xdfb9('0x3e')][_0xdfb9('0x2d')]);_0x11bd29[_0xdfb9('0x2c')]=qs[_0xdfb9('0x2c')](_0x262874[_0xdfb9('0x3e')][_0xdfb9('0x2c')]);}_0x11bd29['order']=qs[_0xdfb9('0x46')](_0x262874['query'][_0xdfb9('0x46')]);_0x11bd29[_0xdfb9('0x47')]=qs[_0xdfb9('0x3f')](_[_0xdfb9('0x48')](_0x262874[_0xdfb9('0x3e')],_0x45c98e['filters']));if(_0x262874[_0xdfb9('0x3e')][_0xdfb9('0x49')]){_0x11bd29['where']=_[_0xdfb9('0x4a')](_0x11bd29[_0xdfb9('0x47')],{'$or':_[_0xdfb9('0x4b')](_0x2c239d,function(_0x3c8f52){if(_0x3c8f52[_0xdfb9('0x4c')]['key']!==_0xdfb9('0x4d')){var _0x1647f8={};_0x1647f8[_0x3c8f52[_0xdfb9('0x4e')]]={'$like':'%'+_0x262874[_0xdfb9('0x3e')][_0xdfb9('0x49')]+'%'};return _0x1647f8;}})});}_0x11bd29=_[_0xdfb9('0x4a')]({},_0x11bd29,_0x262874[_0xdfb9('0x4f')]);var _0x2d8d30={'where':_0x11bd29['where']};return db[_0xdfb9('0x3b')]['count'](_0x2d8d30)['then'](function(_0x1ca03c){_0x550c83[_0xdfb9('0x50')]=_0x1ca03c;if(_0x262874[_0xdfb9('0x3e')][_0xdfb9('0x51')]){_0x11bd29[_0xdfb9('0x52')]=[{'all':!![]}];}return db[_0xdfb9('0x3b')][_0xdfb9('0x53')](_0x11bd29);})[_0xdfb9('0x1e')](function(_0x31527e){_0x550c83[_0xdfb9('0x54')]=_0x31527e;return _0x550c83;})['then'](respondWithFilteredResult(_0x5ab5cd,_0x11bd29))[_0xdfb9('0x28')](handleError(_0x5ab5cd,null));};exports[_0xdfb9('0x55')]=function(_0x24a1f3,_0xb0ed5d){var _0x5d90a3={'raw':![],'where':{'id':_0x24a1f3[_0xdfb9('0x56')]['id']},'include':[{'model':db[_0xdfb9('0x57')],'as':_0xdfb9('0x58')}]},_0x29b1e3={};_0x29b1e3[_0xdfb9('0x3c')]=_[_0xdfb9('0x3d')](db[_0xdfb9('0x3b')][_0xdfb9('0x59')]);_0x29b1e3[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x24a1f3['query']);_0x29b1e3[_0xdfb9('0x3f')]=_['intersection'](_0x29b1e3[_0xdfb9('0x3c')],_0x29b1e3['query']);_0x5d90a3['attributes']=_[_0xdfb9('0x40')](_0x29b1e3[_0xdfb9('0x3c')],qs['fields'](_0x24a1f3['query'][_0xdfb9('0x42')]));_0x5d90a3[_0xdfb9('0x41')]=_0x5d90a3[_0xdfb9('0x41')]['length']?_0x5d90a3[_0xdfb9('0x41')]:_0x29b1e3[_0xdfb9('0x3c')];if(_0x24a1f3[_0xdfb9('0x3e')][_0xdfb9('0x51')]){_0x5d90a3[_0xdfb9('0x52')]=[{'all':!![]}];}_0x5d90a3=_[_0xdfb9('0x4a')]({},_0x5d90a3,_0x24a1f3[_0xdfb9('0x4f')]);return db[_0xdfb9('0x3b')]['find'](_0x5d90a3)[_0xdfb9('0x1e')](handleEntityNotFound(_0xb0ed5d,null))[_0xdfb9('0x1e')](respondWithResult(_0xb0ed5d,null))['catch'](handleError(_0xb0ed5d,null));};exports['create']=function(_0x294145,_0xbe481){return db['FaxAccount']['create'](_0x294145['body'],{})[_0xdfb9('0x1e')](function(_0x197aeb){var _0x36bf66=_0x294145['user']['get']({'plain':!![]});if(!_0x36bf66)throw new Error(_0xdfb9('0x5a'));if(_0x36bf66['role']===_0xdfb9('0x5b')){var _0x474af2=_0x197aeb[_0xdfb9('0x33')]({'plain':!![]});var _0x5a1fcf=_0xdfb9('0x34');return db[_0xdfb9('0x5c')][_0xdfb9('0x5d')]({'where':{'name':_0x5a1fcf,'userProfileId':_0x36bf66['userProfileId']},'raw':!![]})[_0xdfb9('0x1e')](function(_0x3f2776){if(_0x3f2776&&_0x3f2776[_0xdfb9('0x5e')]===0x0){return db[_0xdfb9('0x35')][_0xdfb9('0x5f')]({'name':_0x474af2['name'],'resourceId':_0x474af2['id'],'type':_0x3f2776[_0xdfb9('0x39')],'sectionId':_0x3f2776['id']},{})[_0xdfb9('0x1e')](function(){return _0x197aeb;});}else{return _0x197aeb;}})[_0xdfb9('0x28')](function(_0x16dce3){logger['error'](_0xdfb9('0x60'),_0x16dce3);throw _0x16dce3;});}return _0x197aeb;})[_0xdfb9('0x1e')](respondWithResult(_0xbe481,0xc9))[_0xdfb9('0x28')](handleError(_0xbe481,null));};exports[_0xdfb9('0x32')]=function(_0x3344da,_0x162609){if(_0x3344da[_0xdfb9('0x61')]['id']){delete _0x3344da[_0xdfb9('0x61')]['id'];}return db[_0xdfb9('0x3b')]['find']({'where':{'id':_0x3344da[_0xdfb9('0x56')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]})['then'](handleEntityNotFound(_0x162609,null))[_0xdfb9('0x1e')](saveUpdates(_0x3344da[_0xdfb9('0x61')],null))[_0xdfb9('0x1e')](respondWithResult(_0x162609,null))['catch'](handleError(_0x162609,null));};exports[_0xdfb9('0x36')]=function(_0x550129,_0x4eb916){return db[_0xdfb9('0x3b')][_0xdfb9('0x5d')]({'where':{'id':_0x550129[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x4eb916,null))['then'](removeEntity(_0x4eb916,null))[_0xdfb9('0x28')](handleError(_0x4eb916,null));};exports['describe']=function(_0x19f0b3,_0x4339ea){return db[_0xdfb9('0x3b')][_0xdfb9('0x62')]()[_0xdfb9('0x1e')](respondWithResult(_0x4339ea,null))[_0xdfb9('0x28')](handleError(_0x4339ea,null));};exports[_0xdfb9('0x63')]=function(_0x519cd1,_0x404054,_0xedb0ff){if(_0x519cd1['body']['id']){delete _0x519cd1[_0xdfb9('0x61')]['id'];}return db['FaxAccount'][_0xdfb9('0x5d')]({'where':{'id':_0x519cd1[_0xdfb9('0x56')]['id']}})['then'](handleEntityNotFound(_0x404054,null))[_0xdfb9('0x1e')](function(_0x404e90){if(_0x404e90){_0x519cd1['body'][_0xdfb9('0x64')]=_0x404e90['id'];return db['Disposition'][_0xdfb9('0x5f')](_0x519cd1[_0xdfb9('0x61')]);}})[_0xdfb9('0x1e')](respondWithResult(_0x404054,null))[_0xdfb9('0x28')](handleError(_0x404054,null));};exports[_0xdfb9('0x65')]=function(_0x23517a,_0x4da04f,_0x575199){var _0x2fbc02={'raw':![],'where':{}};var _0x38c124={};var _0x3dce6f={'count':0x0,'rows':[]};return db[_0xdfb9('0x3b')]['findOne']({'where':{'id':_0x23517a[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x4da04f,null))[_0xdfb9('0x1e')](function(_0xa320f3){if(_0xa320f3){_0x38c124[_0xdfb9('0x3c')]=_[_0xdfb9('0x3d')](db[_0xdfb9('0x66')][_0xdfb9('0x59')]);_0x38c124[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x23517a['query']);_0x38c124[_0xdfb9('0x3f')]=_[_0xdfb9('0x40')](_0x38c124[_0xdfb9('0x3c')],_0x38c124['query']);_0x2fbc02[_0xdfb9('0x41')]=_[_0xdfb9('0x40')](_0x38c124[_0xdfb9('0x3c')],qs[_0xdfb9('0x42')](_0x23517a[_0xdfb9('0x3e')][_0xdfb9('0x42')]));_0x2fbc02['attributes']=_0x2fbc02[_0xdfb9('0x41')]['length']?_0x2fbc02['attributes']:_0x38c124[_0xdfb9('0x3c')];if(!_0x23517a['query'][_0xdfb9('0x44')](_0xdfb9('0x45'))){_0x2fbc02[_0xdfb9('0x2d')]=qs[_0xdfb9('0x2d')](_0x23517a[_0xdfb9('0x3e')]['limit']);_0x2fbc02[_0xdfb9('0x2c')]=qs['offset'](_0x23517a[_0xdfb9('0x3e')][_0xdfb9('0x2c')]);}_0x2fbc02[_0xdfb9('0x67')]=qs[_0xdfb9('0x46')](_0x23517a['query'][_0xdfb9('0x46')]);_0x2fbc02['where']=qs[_0xdfb9('0x3f')](_[_0xdfb9('0x48')](_0x23517a[_0xdfb9('0x3e')],_0x38c124[_0xdfb9('0x3f')]));_0x2fbc02['where']['FaxAccountId']=_0xa320f3['id'];if(_0x23517a[_0xdfb9('0x3e')]['filter']){_0x2fbc02['where']=_[_0xdfb9('0x4a')](_0x2fbc02[_0xdfb9('0x47')],{'$or':_[_0xdfb9('0x4b')](_0x2fbc02['attributes'],function(_0x442062){var _0x36aa7a={};_0x36aa7a[_0x442062]={'$like':'%'+_0x23517a[_0xdfb9('0x3e')][_0xdfb9('0x49')]+'%'};return _0x36aa7a;})});}_0x2fbc02=_['merge']({},_0x2fbc02,_0x23517a[_0xdfb9('0x4f')]);return db[_0xdfb9('0x66')][_0xdfb9('0x50')]({'where':_0x2fbc02[_0xdfb9('0x47')]})[_0xdfb9('0x1e')](function(_0x835cd6){_0x3dce6f[_0xdfb9('0x50')]=_0x835cd6;if(_0x23517a['query']['includeAll']){_0x2fbc02[_0xdfb9('0x52')]=[{'all':!![]}];}return db[_0xdfb9('0x66')][_0xdfb9('0x53')](_0x2fbc02);})[_0xdfb9('0x1e')](function(_0x3943ae){_0x3dce6f[_0xdfb9('0x54')]=_0x3943ae;return _0x3dce6f;});}})[_0xdfb9('0x1e')](respondWithFilteredResult(_0x4da04f,_0x2fbc02))[_0xdfb9('0x28')](handleError(_0x4da04f,null));};exports['removeDispositions']=function(_0x5124f3,_0x48c9d7,_0x334e08){return db[_0xdfb9('0x3b')]['find']({'where':{'id':_0x5124f3[_0xdfb9('0x56')]['id']}})['then'](handleEntityNotFound(_0x48c9d7,null))[_0xdfb9('0x1e')](function(_0x556c44){if(_0x556c44){return _0x556c44[_0xdfb9('0x68')](_0x5124f3[_0xdfb9('0x3e')]['ids']);}})[_0xdfb9('0x1e')](respondWithStatusCode(_0x48c9d7,null))[_0xdfb9('0x28')](handleError(_0x48c9d7,null));};exports[_0xdfb9('0x69')]=function(_0x583c65,_0x5a169f,_0x4da58f){if(_0x583c65[_0xdfb9('0x61')]['id']){delete _0x583c65[_0xdfb9('0x61')]['id'];}return db['FaxAccount']['find']({'where':{'id':_0x583c65['params']['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x5a169f,null))[_0xdfb9('0x1e')](function(_0x2eff9b){if(_0x2eff9b){_0x583c65[_0xdfb9('0x61')][_0xdfb9('0x64')]=_0x2eff9b['id'];return db[_0xdfb9('0x6a')][_0xdfb9('0x5f')](_0x583c65['body']);}})['then'](respondWithResult(_0x5a169f,null))[_0xdfb9('0x28')](handleError(_0x5a169f,null));};exports[_0xdfb9('0x6b')]=function(_0x528d11,_0x49708b,_0x3c2dd1){var _0x5961cb={'raw':![],'where':{}};var _0x471406={};var _0x1ad99a={'count':0x0,'rows':[]};return db['FaxAccount'][_0xdfb9('0x6c')]({'where':{'id':_0x528d11[_0xdfb9('0x56')]['id']}})['then'](handleEntityNotFound(_0x49708b,null))[_0xdfb9('0x1e')](function(_0x3245ab){if(_0x3245ab){_0x471406['model']=_[_0xdfb9('0x3d')](db[_0xdfb9('0x6a')]['rawAttributes']);_0x471406[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x528d11[_0xdfb9('0x3e')]);_0x471406[_0xdfb9('0x3f')]=_['intersection'](_0x471406[_0xdfb9('0x3c')],_0x471406[_0xdfb9('0x3e')]);_0x5961cb[_0xdfb9('0x41')]=_[_0xdfb9('0x40')](_0x471406[_0xdfb9('0x3c')],qs['fields'](_0x528d11[_0xdfb9('0x3e')][_0xdfb9('0x42')]));_0x5961cb[_0xdfb9('0x41')]=_0x5961cb['attributes'][_0xdfb9('0x43')]?_0x5961cb['attributes']:_0x471406[_0xdfb9('0x3c')];if(!_0x528d11[_0xdfb9('0x3e')][_0xdfb9('0x44')](_0xdfb9('0x45'))){_0x5961cb[_0xdfb9('0x2d')]=qs['limit'](_0x528d11[_0xdfb9('0x3e')][_0xdfb9('0x2d')]);_0x5961cb[_0xdfb9('0x2c')]=qs[_0xdfb9('0x2c')](_0x528d11[_0xdfb9('0x3e')][_0xdfb9('0x2c')]);}_0x5961cb[_0xdfb9('0x67')]=qs[_0xdfb9('0x46')](_0x528d11[_0xdfb9('0x3e')]['sort']);_0x5961cb[_0xdfb9('0x47')]=qs[_0xdfb9('0x3f')](_[_0xdfb9('0x48')](_0x528d11['query'],_0x471406[_0xdfb9('0x3f')]));_0x5961cb[_0xdfb9('0x47')][_0xdfb9('0x64')]=_0x3245ab['id'];if(_0x528d11[_0xdfb9('0x3e')][_0xdfb9('0x49')]){_0x5961cb[_0xdfb9('0x47')]=_[_0xdfb9('0x4a')](_0x5961cb['where'],{'$or':_[_0xdfb9('0x4b')](_0x5961cb[_0xdfb9('0x41')],function(_0x107293){var _0x45dea3={};_0x45dea3[_0x107293]={'$like':'%'+_0x528d11['query'][_0xdfb9('0x49')]+'%'};return _0x45dea3;})});}_0x5961cb=_[_0xdfb9('0x4a')]({},_0x5961cb,_0x528d11[_0xdfb9('0x4f')]);return db[_0xdfb9('0x6a')][_0xdfb9('0x50')]({'where':_0x5961cb[_0xdfb9('0x47')]})[_0xdfb9('0x1e')](function(_0x34aaf3){_0x1ad99a[_0xdfb9('0x50')]=_0x34aaf3;if(_0x528d11[_0xdfb9('0x3e')][_0xdfb9('0x51')]){_0x5961cb[_0xdfb9('0x52')]=[{'all':!![]}];}return db[_0xdfb9('0x6a')][_0xdfb9('0x53')](_0x5961cb);})[_0xdfb9('0x1e')](function(_0x4f3ed3){_0x1ad99a[_0xdfb9('0x54')]=_0x4f3ed3;return _0x1ad99a;});}})[_0xdfb9('0x1e')](respondWithFilteredResult(_0x49708b,_0x5961cb))['catch'](handleError(_0x49708b,null));};exports[_0xdfb9('0x6d')]=function(_0x2cb24c,_0x47a084,_0x5cee7c){return db[_0xdfb9('0x3b')][_0xdfb9('0x5d')]({'where':{'id':_0x2cb24c['params']['id']}})['then'](handleEntityNotFound(_0x47a084,null))[_0xdfb9('0x1e')](function(_0x203f36){if(_0x203f36){return _0x203f36[_0xdfb9('0x6d')](_0x2cb24c[_0xdfb9('0x3e')][_0xdfb9('0x6e')]);}})[_0xdfb9('0x1e')](respondWithStatusCode(_0x47a084,null))['catch'](handleError(_0x47a084,null));};exports[_0xdfb9('0x6f')]=function(_0x9629a,_0x18c804,_0x5adb94){return db[_0xdfb9('0x70')][_0xdfb9('0x5d')]({'where':{'id':_0x9629a['params']['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x18c804,null))[_0xdfb9('0x1e')](function(_0x45ca3b){if(_0x45ca3b){return _0x45ca3b[_0xdfb9('0x6f')](_0x9629a[_0xdfb9('0x61')][_0xdfb9('0x6e')],_['omit'](_0x9629a[_0xdfb9('0x61')],[_0xdfb9('0x6e'),'id'])||{});}})[_0xdfb9('0x1e')](respondWithResult(_0x18c804,null))[_0xdfb9('0x28')](handleError(_0x18c804,null));};exports[_0xdfb9('0x71')]=function(_0x11667e,_0x3978b1,_0x58fd79){var _0x2e1318={'raw':![],'where':{}};var _0x283cd9={};var _0x19bdc5={'count':0x0,'rows':[]};return db[_0xdfb9('0x3b')][_0xdfb9('0x6c')]({'where':{'id':_0x11667e[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x3978b1,null))[_0xdfb9('0x1e')](function(_0x47c766){if(_0x47c766){_0x283cd9['model']=_[_0xdfb9('0x3d')](db['FaxInteraction'][_0xdfb9('0x59')]);_0x283cd9[_0xdfb9('0x3e')]=_['keys'](_0x11667e['query']);_0x283cd9[_0xdfb9('0x3f')]=_['intersection'](_0x283cd9[_0xdfb9('0x3c')],_0x283cd9['query']);_0x2e1318[_0xdfb9('0x41')]=_['intersection'](_0x283cd9[_0xdfb9('0x3c')],qs[_0xdfb9('0x42')](_0x11667e[_0xdfb9('0x3e')][_0xdfb9('0x42')]));_0x2e1318['attributes']=_0x2e1318[_0xdfb9('0x41')][_0xdfb9('0x43')]?_0x2e1318['attributes']:_0x283cd9[_0xdfb9('0x3c')];if(!_0x11667e['query'][_0xdfb9('0x44')](_0xdfb9('0x45'))){_0x2e1318['limit']=qs['limit'](_0x11667e[_0xdfb9('0x3e')][_0xdfb9('0x2d')]);_0x2e1318['offset']=qs[_0xdfb9('0x2c')](_0x11667e['query'][_0xdfb9('0x2c')]);}_0x2e1318[_0xdfb9('0x67')]=qs[_0xdfb9('0x46')](_0x11667e[_0xdfb9('0x3e')]['sort']);_0x2e1318['where']=qs['filters'](_[_0xdfb9('0x48')](_0x11667e[_0xdfb9('0x3e')],_0x283cd9[_0xdfb9('0x3f')]));_0x2e1318['where'][_0xdfb9('0x64')]=_0x47c766['id'];if(_0x11667e[_0xdfb9('0x3e')]['filter']){_0x2e1318[_0xdfb9('0x47')]=_[_0xdfb9('0x4a')](_0x2e1318['where'],{'$or':_[_0xdfb9('0x4b')](_0x2e1318[_0xdfb9('0x41')],function(_0x5a400c){var _0x425eab={};_0x425eab[_0x5a400c]={'$like':'%'+_0x11667e[_0xdfb9('0x3e')][_0xdfb9('0x49')]+'%'};return _0x425eab;})});}_0x2e1318=_['merge']({},_0x2e1318,_0x11667e['options']);return db[_0xdfb9('0x70')][_0xdfb9('0x50')]({'where':_0x2e1318[_0xdfb9('0x47')]})[_0xdfb9('0x1e')](function(_0x565ab9){_0x19bdc5[_0xdfb9('0x50')]=_0x565ab9;if(_0x11667e[_0xdfb9('0x3e')][_0xdfb9('0x51')]){_0x2e1318[_0xdfb9('0x52')]=[{'model':db[_0xdfb9('0x72')],'as':'Contact','required':![]},{'model':db[_0xdfb9('0x73')],'as':_0xdfb9('0x74'),'attributes':['name',_0xdfb9('0x75'),_0xdfb9('0x76')],'required':![]},{'model':db[_0xdfb9('0x77')],'as':'Tags','attributes':['id',_0xdfb9('0x39'),_0xdfb9('0x78')],'where':_0x11667e[_0xdfb9('0x3e')]['tag']?{'id':_0x11667e[_0xdfb9('0x3e')][_0xdfb9('0x79')]}:undefined,'required':_0x11667e['query']['tag']?!![]:![]}];}return db[_0xdfb9('0x70')][_0xdfb9('0x53')](_0x2e1318);})[_0xdfb9('0x1e')](function(_0x3805e5){_0x19bdc5[_0xdfb9('0x54')]=_0x3805e5;return _0x19bdc5;});}})[_0xdfb9('0x1e')](respondWithFilteredResult(_0x3978b1,_0x2e1318))[_0xdfb9('0x28')](handleError(_0x3978b1,null));};exports[_0xdfb9('0x7a')]=function(_0x456468,_0x2bb471,_0x4a38d8){return db['FaxAccount'][_0xdfb9('0x6c')]({'where':{'id':_0x456468['params']['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x2bb471,null))[_0xdfb9('0x1e')](function(_0x35717b){if(_0x35717b){return db[_0xdfb9('0x7b')][_0xdfb9('0x7c')](function(_0x1bde19){return db[_0xdfb9('0x7d')][_0xdfb9('0x36')]({'where':{'FaxAccountId':_0x456468[_0xdfb9('0x56')]['id']},'transaction':_0x1bde19})[_0xdfb9('0x1e')](function(_0x4fe059){var _0x1d4cbd=_[_0xdfb9('0x4b')](_0x456468[_0xdfb9('0x61')],function(_0x12fe03){_0x12fe03['FaxAccountId']=_0x456468['params']['id'];return _0x12fe03;});return db[_0xdfb9('0x7d')][_0xdfb9('0x7e')](_0x1d4cbd,{'transaction':_0x1bde19});});})[_0xdfb9('0x1e')](function(){return db['FaxApplication'][_0xdfb9('0x7f')]({'where':{'FaxAccountId':_0x456468['params']['id']},'order':_0xdfb9('0x80')});});}})[_0xdfb9('0x1e')](respondWithResult(_0x2bb471,null))['catch'](handleError(_0x2bb471,null));};exports['getApplications']=function(_0x5debac,_0x35d8d2,_0x426e14){var _0x48ce2d={};var _0x8b631e={};var _0x5e0003;var _0x33fb72;return db[_0xdfb9('0x3b')][_0xdfb9('0x6c')]({'where':{'id':_0x5debac[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x35d8d2,null))['then'](function(_0x41a482){if(_0x41a482){_0x5e0003=_0x41a482;_0x8b631e[_0xdfb9('0x3c')]=_[_0xdfb9('0x3d')](db[_0xdfb9('0x7d')][_0xdfb9('0x59')]);_0x8b631e[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x5debac[_0xdfb9('0x3e')]);_0x8b631e[_0xdfb9('0x3f')]=_[_0xdfb9('0x40')](_0x8b631e[_0xdfb9('0x3c')],_0x8b631e[_0xdfb9('0x3e')]);_0x48ce2d['attributes']=_[_0xdfb9('0x40')](_0x8b631e['model'],qs[_0xdfb9('0x42')](_0x5debac[_0xdfb9('0x3e')][_0xdfb9('0x42')]));_0x48ce2d[_0xdfb9('0x41')]=_0x48ce2d[_0xdfb9('0x41')][_0xdfb9('0x43')]?_0x48ce2d[_0xdfb9('0x41')]:_0x8b631e['model'];_0x48ce2d[_0xdfb9('0x67')]=qs[_0xdfb9('0x46')](_0x5debac['query']['sort']);_0x48ce2d[_0xdfb9('0x47')]=qs[_0xdfb9('0x3f')](_[_0xdfb9('0x48')](_0x5debac[_0xdfb9('0x3e')],_0x8b631e['filters']));if(_0x5debac[_0xdfb9('0x3e')][_0xdfb9('0x49')]){_0x48ce2d[_0xdfb9('0x47')]=_[_0xdfb9('0x4a')](_0x48ce2d[_0xdfb9('0x47')],{'$or':_[_0xdfb9('0x4b')](_0x48ce2d[_0xdfb9('0x41')],function(_0x355cec){var _0x507a6c={};_0x507a6c[_0x355cec]={'$like':'%'+_0x5debac[_0xdfb9('0x3e')][_0xdfb9('0x49')]+'%'};return _0x507a6c;})});}_0x48ce2d=_[_0xdfb9('0x4a')]({},_0x48ce2d,_0x5debac[_0xdfb9('0x4f')]);return _0x5e0003[_0xdfb9('0x81')](_0x48ce2d);}})[_0xdfb9('0x1e')](function(_0xff4338){if(_0xff4338){_0x33fb72=_0xff4338[_0xdfb9('0x43')];if(!_0x5debac['query'][_0xdfb9('0x44')](_0xdfb9('0x45'))){_0x48ce2d[_0xdfb9('0x2d')]=qs[_0xdfb9('0x2d')](_0x5debac[_0xdfb9('0x3e')][_0xdfb9('0x2d')]);_0x48ce2d['offset']=qs['offset'](_0x5debac[_0xdfb9('0x3e')][_0xdfb9('0x2c')]);}return _0x5e0003[_0xdfb9('0x81')](_0x48ce2d);}})[_0xdfb9('0x1e')](function(_0x4b0f3d){if(_0x4b0f3d){return _0x4b0f3d?{'count':_0x33fb72,'rows':_0x4b0f3d}:null;}})[_0xdfb9('0x1e')](respondWithResult(_0x35d8d2,null))[_0xdfb9('0x28')](handleError(_0x35d8d2,null));};function Extension(_0x5116a1,_0x540edf,_0x43f391,_0x503a35){this['context']=_0xdfb9('0x82');this[_0xdfb9('0x83')]=_0x5116a1[_0xdfb9('0x84')];this['app']=_0x503a35;this['type']='system';this[_0xdfb9('0x85')]='Fax\x20Extension';this[_0xdfb9('0x64')]=_0x5116a1['id'];this[_0xdfb9('0x80')]=_0x540edf;this[_0xdfb9('0x86')]=_0x43f391;}function createExtensionsReciveFax(_0x5393d9){var _0x46da33=0x1;var _0x14519d=[];_0x14519d[_0xdfb9('0x87')](new Extension(_0x5393d9,_0x46da33,'',_0xdfb9('0x88')));_0x46da33+=0x1;_0x14519d['push'](new Extension(_0x5393d9,_0x46da33,_0xdfb9('0x89'),_0xdfb9('0x8a')));_0x46da33+=0x1;for(var _0x2bc57b in _0x5393d9){if(_0x5393d9['hasOwnProperty'](_0x2bc57b)&&(_0x2bc57b===_0xdfb9('0x8b')||_0x2bc57b===_0xdfb9('0x84')||_0x2bc57b===_0xdfb9('0x8c')||_0x2bc57b===_0xdfb9('0x8d')||_0x2bc57b===_0xdfb9('0x8e')||_0x2bc57b==='maxrate'||_0x2bc57b===_0xdfb9('0x8f')||_0x2bc57b===_0xdfb9('0x90')||_0x2bc57b==='t38timeout')){_0x14519d[_0xdfb9('0x87')](new Extension(_0x5393d9,_0x46da33,_0xdfb9('0x91')+_0x2bc57b+')='+_0x5393d9[_0x2bc57b],'Set'));_0x46da33+=0x1;}}_0x14519d[_0xdfb9('0x87')](new Extension(_0x5393d9,_0x46da33,'6','Wait'));_0x46da33+=0x1;_0x14519d[_0xdfb9('0x87')](new Extension(_0x5393d9,_0x46da33,'/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax'));_0x46da33=0x0;return _0x14519d;}exports[_0xdfb9('0x92')]=function(_0x4f2ee6,_0x3d5a14,_0xee4315){var _0x2a3321;return db[_0xdfb9('0x7b')][_0xdfb9('0x7c')](function(_0x90a008){return db['FaxAccount']['create'](_0x4f2ee6[_0xdfb9('0x61')],{'transaction':_0x90a008})[_0xdfb9('0x1e')](function(_0x4b83ce){_0x2a3321=_0x4b83ce[_0xdfb9('0x33')]({'plain':!![]});return db[_0xdfb9('0x93')][_0xdfb9('0x7e')](createExtensionsReciveFax(_0x2a3321),{'transaction':_0x90a008});});})[_0xdfb9('0x1e')](function(){return _0x2a3321;})['then'](respondWithResult(_0x3d5a14,null))['catch'](handleError(_0x3d5a14,null));};exports[_0xdfb9('0x94')]=function(_0x516d5f,_0x486293,_0x265c24){var _0x2cab62;return db[_0xdfb9('0x7b')]['transaction'](function(_0x2b013c){return db[_0xdfb9('0x3b')]['update'](_0x516d5f[_0xdfb9('0x61')],{'where':{'id':_0x516d5f[_0xdfb9('0x61')]['id']},'transaction':_0x2b013c})[_0xdfb9('0x1e')](function(_0x53c25d){return db[_0xdfb9('0x93')]['destroy']({'where':{'FaxAccountId':_0x516d5f[_0xdfb9('0x61')]['id']},'transaction':_0x2b013c})[_0xdfb9('0x1e')](function(_0x10165a){return db[_0xdfb9('0x93')][_0xdfb9('0x7e')](createExtensionsReciveFax(_[_0xdfb9('0x95')](_0x516d5f['body'],[_0xdfb9('0x96'),_0xdfb9('0x97'),'createdAt',_0xdfb9('0x98'),_0xdfb9('0x99'),_0xdfb9('0x9a')])),{'transaction':_0x2b013c});});});})[_0xdfb9('0x1e')](function(){return db[_0xdfb9('0x3b')][_0xdfb9('0x9b')](_0x516d5f[_0xdfb9('0x61')]['id']);})[_0xdfb9('0x1e')](respondWithResult(_0x486293,null))[_0xdfb9('0x28')](handleError(_0x486293,null));};exports[_0xdfb9('0x9c')]=function(_0x22f3a6,_0x1a4506,_0x45bf3a){var _0x44c361={'raw':!![],'where':{}};var _0x51fb8e={};var _0x26cf66={'count':0x0,'rows':[]};return db['FaxAccount'][_0xdfb9('0x6c')]({'where':{'id':_0x22f3a6[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x1a4506,null))['then'](function(_0x26b018){if(_0x26b018){_0x51fb8e[_0xdfb9('0x3c')]=_[_0xdfb9('0x3d')](db[_0xdfb9('0x9d')][_0xdfb9('0x59')]);_0x51fb8e[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x22f3a6['query']);_0x51fb8e[_0xdfb9('0x3f')]=_[_0xdfb9('0x40')](_0x51fb8e['model'],_0x51fb8e['query']);_0x44c361[_0xdfb9('0x41')]=_['intersection'](_0x51fb8e[_0xdfb9('0x3c')],qs[_0xdfb9('0x42')](_0x22f3a6['query']['fields']));_0x44c361[_0xdfb9('0x41')]=_0x44c361[_0xdfb9('0x41')][_0xdfb9('0x43')]?_0x44c361['attributes']:_0x51fb8e[_0xdfb9('0x3c')];if(!_0x22f3a6[_0xdfb9('0x3e')][_0xdfb9('0x44')]('nolimit')){_0x44c361[_0xdfb9('0x2d')]=qs['limit'](_0x22f3a6[_0xdfb9('0x3e')]['limit']);_0x44c361[_0xdfb9('0x2c')]=qs['offset'](_0x22f3a6['query'][_0xdfb9('0x2c')]);}_0x44c361[_0xdfb9('0x67')]=qs[_0xdfb9('0x46')](_0x22f3a6['query'][_0xdfb9('0x46')]);_0x44c361[_0xdfb9('0x47')]=qs[_0xdfb9('0x3f')](_[_0xdfb9('0x48')](_0x22f3a6[_0xdfb9('0x3e')],_0x51fb8e[_0xdfb9('0x3f')]));_0x44c361[_0xdfb9('0x47')][_0xdfb9('0x64')]=_0x26b018['id'];if(_0x22f3a6[_0xdfb9('0x3e')][_0xdfb9('0x49')]){_0x44c361[_0xdfb9('0x47')]=_[_0xdfb9('0x4a')](_0x44c361[_0xdfb9('0x47')],{'$or':_[_0xdfb9('0x4b')](_0x44c361[_0xdfb9('0x41')],function(_0x5f4a34){var _0x24b069={};_0x24b069[_0x5f4a34]={'$like':'%'+_0x22f3a6[_0xdfb9('0x3e')][_0xdfb9('0x49')]+'%'};return _0x24b069;})});}if(_0x22f3a6['query']['$gte']){var _0x42be71=_0x22f3a6['query'][_0xdfb9('0x9e')][_0xdfb9('0x9f')](',');var _0x1bae0e={};_0x1bae0e[_0x42be71[0x0]]={'$gte':moment(_0x42be71[0x1])[_0xdfb9('0xa0')](_0xdfb9('0xa1'))};_0x44c361[_0xdfb9('0x47')]=_['merge'](_0x44c361['where'],_0x1bae0e);}_0x44c361=_[_0xdfb9('0x4a')]({},_0x44c361,_0x22f3a6[_0xdfb9('0x4f')]);return db[_0xdfb9('0x9d')]['count']({'where':_0x44c361['where']})[_0xdfb9('0x1e')](function(_0x37deb9){_0x26cf66[_0xdfb9('0x50')]=_0x37deb9;if(_0x22f3a6[_0xdfb9('0x3e')][_0xdfb9('0x51')]){_0x44c361[_0xdfb9('0x52')]=[{'all':!![]}];}return db[_0xdfb9('0x9d')]['findAll'](_0x44c361);})[_0xdfb9('0x1e')](function(_0x4293fa){_0x26cf66[_0xdfb9('0x54')]=_0x4293fa;return _0x26cf66;});}})[_0xdfb9('0x1e')](respondWithFilteredResult(_0x1a4506,_0x44c361))[_0xdfb9('0x28')](handleError(_0x1a4506,null));};exports[_0xdfb9('0x3a')]=function(_0x12b4e5,_0x10446f,_0x349a6d){var _0x32b448,_0x4097be={},_0x42a441;if(_0x12b4e5[_0xdfb9('0x61')]['to']){_0x42a441=_0x12b4e5[_0xdfb9('0x61')]['to'][0x0];}return db['FaxAccount'][_0xdfb9('0x5d')]({'where':{'id':_0x12b4e5[_0xdfb9('0x56')]['id']},'include':[{'model':db[_0xdfb9('0xa2')],'as':_0xdfb9('0xa3'),'include':[{'model':db[_0xdfb9('0x72')],'as':_0xdfb9('0xa4'),'where':{'fax':_0x42a441},'limit':0x1,'order':[[_0xdfb9('0x98'),_0xdfb9('0xa5')]]}]}]})[_0xdfb9('0x1e')](handleEntityNotFound(_0x10446f,null))[_0xdfb9('0x1e')](function(_0x35efc2){_0x32b448=_0x35efc2;if(_0x12b4e5['body'][_0xdfb9('0xa6')]&&_0x12b4e5['body'][_0xdfb9('0xa6')][_0xdfb9('0x43')]){for(var _0x4455f7=0x0;_0x4455f7<_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')]['length'];_0x4455f7+=0x1){_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')][_0x4455f7]={'filename':_0x12b4e5[_0xdfb9('0x61')]['attachments'][_0x4455f7][_0xdfb9('0x39')],'id':_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')][_0x4455f7]['id'],'path':path['join'](config[_0xdfb9('0xa7')],_0xdfb9('0xa8'),_0x12b4e5[_0xdfb9('0x61')]['attachments'][_0x4455f7][_0xdfb9('0xa9')])};}}return respondWithRpcPromise('CheckAfterSend',_0xdfb9('0xaa'),{'FaxAccountId':_['isNil'](_0x12b4e5[_0xdfb9('0x56')]['id'])?undefined:_0x12b4e5['params']['id'],'path':_[_0xdfb9('0xab')](_0x12b4e5[_0xdfb9('0x61')]['attachments'][0x0]['path'])?undefined:_0x12b4e5[_0xdfb9('0x61')]['attachments'][0x0]['path'],'fax':_['isNil'](_0x12b4e5[_0xdfb9('0x61')]['to'][0x0])?undefined:_0x12b4e5[_0xdfb9('0x61')]['to'][0x0]},client9002);})[_0xdfb9('0x1e')](function(){if(_0x32b448){if(_[_0xdfb9('0xab')](_0x12b4e5[_0xdfb9('0x61')]['from'])){_0x12b4e5[_0xdfb9('0x61')]['from']=util[_0xdfb9('0xa0')](_0xdfb9('0xac'),_0x32b448[_0xdfb9('0x39')],_0x32b448[_0xdfb9('0xad')]);}if(_0x32b448['List']){if(_0x32b448['List'][_0xdfb9('0xa4')][_0xdfb9('0x43')]){return _0x32b448[_0xdfb9('0xa3')][_0xdfb9('0xa4')][0x0];}else{return db['CmContact'][_0xdfb9('0x5f')](_['defaults'](_0x12b4e5[_0xdfb9('0x61')],{'firstName':_0x12b4e5[_0xdfb9('0x61')]['to'][0x0],'phone':_0x12b4e5['body']['to'][0x0],'fax':_0x12b4e5['body']['to'][0x0],'ListId':_0x32b448[_0xdfb9('0x9a')]}));}}else{throw new Error('List\x20not\x20found');}}else{throw new Error(_0xdfb9('0xae'));}})['then'](function(_0x5c4205){if(_0x5c4205){return db[_0xdfb9('0x70')][_0xdfb9('0x5d')]({'where':{'ContactId':_0x5c4205['id'],'closed':![],'FaxAccountId':_0x32b448['id']}})[_0xdfb9('0x1e')](function(_0x30bd8d){if(_0x30bd8d){return[_0x30bd8d,![]];}return db[_0xdfb9('0x70')]['create']({'UserId':_0x12b4e5[_0xdfb9('0x5b')]['id'],'ContactId':_0x5c4205['id'],'FaxAccountId':_0x32b448['id'],'fax':_0x12b4e5[_0xdfb9('0x61')]['to'][0x0],'firstMsgDirection':_0xdfb9('0xaf'),'Messages':[_[_0xdfb9('0x4a')](_0x12b4e5[_0xdfb9('0x61')],{'read':![],'body':_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')][0x0][_0xdfb9('0xb0')],'FaxAccountId':_0x32b448['id'],'UserId':_0x12b4e5[_0xdfb9('0x5b')]['id'],'ContactId':_0x5c4205['id'],'AttachmentId':_0x12b4e5[_0xdfb9('0x61')]['attachments'][0x0]['id']})]},{'include':[{'model':db[_0xdfb9('0x9d')],'as':'Messages'}]})[_0xdfb9('0x1e')](function(_0x1b9e12){return[_0x1b9e12,!![]];});});}else{throw new Error(_0xdfb9('0xb1'));}})[_0xdfb9('0xb2')](function(_0x1c2721,_0x592956){if(_0x592956){return _0x1c2721;}return db[_0xdfb9('0x9d')][_0xdfb9('0x5f')]({'direction':_0xdfb9('0xaf'),'read':![],'body':_0x12b4e5[_0xdfb9('0x61')]['attachments'][0x0]['filename'],'FaxAccountId':_0x32b448['id'],'FaxInteractionId':_0x1c2721['id'],'UserId':_0x12b4e5[_0xdfb9('0x5b')]['id'],'ContactId':_0x1c2721['ContactId'],'AttachmentId':_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')][0x0]['id']})[_0xdfb9('0x1e')](function(_0x2eb7bb){_0x1c2721[_0xdfb9('0xb3')][_0xdfb9('0xb4')]=[];_0x1c2721[_0xdfb9('0xb3')]['Messages'][_0xdfb9('0x87')](_0x2eb7bb[_0xdfb9('0xb3')]);return _0x1c2721;});})['then'](function(_0x8f661f){respondWithRpcPromise(_0xdfb9('0xb5'),_0xdfb9('0xb5'),{'FaxAccountId':_[_0xdfb9('0xab')](_0x12b4e5[_0xdfb9('0x56')]['id'])?undefined:_0x12b4e5[_0xdfb9('0x56')]['id'],'path':_[_0xdfb9('0xab')](_0x12b4e5['body'][_0xdfb9('0xa6')][0x0]['path'])?undefined:_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')][0x0][_0xdfb9('0xb6')],'fax':_['isNil'](_0x12b4e5[_0xdfb9('0x61')]['to'][0x0])?undefined:_0x12b4e5[_0xdfb9('0x61')]['to'][0x0],'AttachmentId':_0x12b4e5[_0xdfb9('0x61')][_0xdfb9('0xa6')][0x0]['id']},client9002)[_0xdfb9('0x1e')](function(_0x5c38d3){logger['info']('SendFaxRpc,\x20%s',_0x5c38d3);})[_0xdfb9('0x28')](function(_0x382262){logger[_0xdfb9('0x1f')](_0xdfb9('0xb7'),_0x382262);});return _0x8f661f;})[_0xdfb9('0x1e')](respondWithResult(_0x10446f,null))[_0xdfb9('0x28')](handleError(_0x10446f,null));};exports['addAgents']=function(_0x533fbc,_0x2cf9cc,_0x3c0e15){return db['FaxAccount'][_0xdfb9('0x5d')]({'where':{'id':_0x533fbc[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x2cf9cc,null))[_0xdfb9('0x1e')](function(_0x571ea2){if(_0x571ea2){return _0x571ea2[_0xdfb9('0xb8')](_0x533fbc[_0xdfb9('0x61')][_0xdfb9('0x6e')],_['omit'](_0x533fbc[_0xdfb9('0x61')],[_0xdfb9('0x6e'),'id'])||{})[_0xdfb9('0xb2')](function(_0x319cd7){for(var _0x494ddc=0x0;_0x494ddc<_0x533fbc[_0xdfb9('0x61')][_0xdfb9('0x6e')]['length'];_0x494ddc+=0x1){socket[_0xdfb9('0xb9')](_0xdfb9('0xba'),{'UserId':_0x533fbc['body']['ids'][_0x494ddc],'FaxAccountId':_0x533fbc[_0xdfb9('0x56')]['id']});}return _0x319cd7;});}})[_0xdfb9('0x1e')](respondWithResult(_0x2cf9cc,null))[_0xdfb9('0x28')](handleError(_0x2cf9cc,null));};exports[_0xdfb9('0xbb')]=function(_0x326081,_0x201fb6,_0x2b77a7){return db[_0xdfb9('0x3b')]['find']({'where':{'id':_0x326081[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0x201fb6,null))[_0xdfb9('0x1e')](function(_0x3d740a){if(_0x3d740a){return _0x3d740a['removeAgents'](_0x326081[_0xdfb9('0x3e')]['ids'])[_0xdfb9('0x1e')](function(){if(_['isArray'](_0x326081[_0xdfb9('0x3e')]['ids'])){for(var _0x3d5335=0x0;_0x3d5335<_0x326081[_0xdfb9('0x3e')][_0xdfb9('0x6e')][_0xdfb9('0x43')];_0x3d5335+=0x1){socket['emit']('userFaxAccount:remove',{'UserId':Number(_0x326081[_0xdfb9('0x3e')][_0xdfb9('0x6e')][_0x3d5335]),'FaxAccountId':Number(_0x326081[_0xdfb9('0x56')]['id'])});}}else{socket['emit'](_0xdfb9('0xbc'),{'UserId':Number(_0x326081[_0xdfb9('0x3e')][_0xdfb9('0x6e')]),'FaxAccountId':Number(_0x326081['params']['id'])});}});}})['then'](respondWithStatusCode(_0x201fb6,null))['catch'](handleError(_0x201fb6,null));};exports['getAgents']=function(_0x1e3c5b,_0xf4b898,_0x5c3ef1){var _0x5064bc={};var _0x3d2109={};var _0x56a44e;var _0x2d5c56;return db[_0xdfb9('0x3b')][_0xdfb9('0x6c')]({'where':{'id':_0x1e3c5b[_0xdfb9('0x56')]['id']}})[_0xdfb9('0x1e')](handleEntityNotFound(_0xf4b898,null))['then'](function(_0x494d4a){if(_0x494d4a){_0x56a44e=_0x494d4a;_0x3d2109['model']=_['keys'](db[_0xdfb9('0x73')]['rawAttributes']);_0x3d2109[_0xdfb9('0x3e')]=_[_0xdfb9('0x3d')](_0x1e3c5b[_0xdfb9('0x3e')]);_0x3d2109[_0xdfb9('0x3f')]=_[_0xdfb9('0x40')](_0x3d2109[_0xdfb9('0x3c')],_0x3d2109[_0xdfb9('0x3e')]);_0x5064bc[_0xdfb9('0x41')]=_[_0xdfb9('0x40')](_0x3d2109[_0xdfb9('0x3c')],qs[_0xdfb9('0x42')](_0x1e3c5b[_0xdfb9('0x3e')]['fields']));_0x5064bc[_0xdfb9('0x41')]=_0x5064bc[_0xdfb9('0x41')]['length']?_0x5064bc[_0xdfb9('0x41')]:_0x3d2109['model'];_0x5064bc[_0xdfb9('0x67')]=qs[_0xdfb9('0x46')](_0x1e3c5b[_0xdfb9('0x3e')][_0xdfb9('0x46')]);_0x5064bc[_0xdfb9('0x47')]=qs[_0xdfb9('0x3f')](_['pick'](_0x1e3c5b[_0xdfb9('0x3e')],_0x3d2109[_0xdfb9('0x3f')]));if(_0x1e3c5b[_0xdfb9('0x3e')]['filter']){_0x5064bc[_0xdfb9('0x47')]=_[_0xdfb9('0x4a')](_0x5064bc['where'],{'$or':_['map'](_0x5064bc[_0xdfb9('0x41')],function(_0x29d3e4){var _0x20bee8={};_0x20bee8[_0x29d3e4]={'$like':'%'+_0x1e3c5b[_0xdfb9('0x3e')]['filter']+'%'};return _0x20bee8;})});}_0x5064bc=_['merge']({},_0x5064bc,_0x1e3c5b[_0xdfb9('0x4f')]);return _0x56a44e[_0xdfb9('0xbd')](_0x5064bc);}})['then'](function(_0xb389e3){if(_0xb389e3){_0x2d5c56=_0xb389e3[_0xdfb9('0x43')];if(!_0x1e3c5b[_0xdfb9('0x3e')][_0xdfb9('0x44')](_0xdfb9('0x45'))){_0x5064bc['limit']=qs[_0xdfb9('0x2d')](_0x1e3c5b[_0xdfb9('0x3e')][_0xdfb9('0x2d')]);_0x5064bc['offset']=qs[_0xdfb9('0x2c')](_0x1e3c5b[_0xdfb9('0x3e')][_0xdfb9('0x2c')]);}return _0x56a44e[_0xdfb9('0xbd')](_0x5064bc);}})[_0xdfb9('0x1e')](function(_0x1807a1){if(_0x1807a1){return _0x1807a1?{'count':_0x2d5c56,'rows':_0x1807a1}:null;}})[_0xdfb9('0x1e')](respondWithResult(_0xf4b898,null))[_0xdfb9('0x28')](handleError(_0xf4b898,null));};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.events.js b/server/api/faxAccount/faxAccount.events.js
index ed0dfa9..73f94cf 100644
--- a/server/api/faxAccount/faxAccount.events.js
+++ b/server/api/faxAccount/faxAccount.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x24c9=['save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','FaxAccount'];(function(_0x1cb18a,_0x33167a){var _0x22442e=function(_0x46c611){while(--_0x46c611){_0x1cb18a['push'](_0x1cb18a['shift']());}};_0x22442e(++_0x33167a);}(_0x24c9,0x10b));var _0x924c=function(_0x4167c9,_0x3341a1){_0x4167c9=_0x4167c9-0x0;var _0x4d57ed=_0x24c9[_0x4167c9];return _0x4d57ed;};'use strict';var EventEmitter=require(_0x924c('0x0'));var FaxAccount=require(_0x924c('0x1'))['db'][_0x924c('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x924c('0x3'),'afterUpdate':_0x924c('0x4'),'afterDestroy':_0x924c('0x5')};function emitEvent(_0x115751){return function(_0x471440,_0x5d4b1d,_0x3bdaec){FaxAccountEvents[_0x924c('0x6')](_0x115751+':'+_0x471440['id'],_0x471440);FaxAccountEvents[_0x924c('0x6')](_0x115751,_0x471440);_0x3bdaec(null);};}for(var e in events){if(events[_0x924c('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x924c('0x8')]=FaxAccountEvents;
\ No newline at end of file
+var _0xa2fb=['events','FaxAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0xac151d,_0x4ea1d2){var _0x111dba=function(_0x13d7f4){while(--_0x13d7f4){_0xac151d['push'](_0xac151d['shift']());}};_0x111dba(++_0x4ea1d2);}(_0xa2fb,0x1a8));var _0xba2f=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa2fb[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require(_0xba2f('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0xba2f('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xba2f('0x2')](0x0);var events={'afterCreate':_0xba2f('0x3'),'afterUpdate':_0xba2f('0x4'),'afterDestroy':_0xba2f('0x5')};function emitEvent(_0x1fc9ca){return function(_0x22409d,_0x2d1d0b,_0x465860){FaxAccountEvents[_0xba2f('0x6')](_0x1fc9ca+':'+_0x22409d['id'],_0x22409d);FaxAccountEvents['emit'](_0x1fc9ca,_0x22409d);_0x465860(null);};}for(var e in events){if(events[_0xba2f('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module['exports']=FaxAccountEvents;
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.model.js b/server/api/faxAccount/faxAccount.model.js
index 0d2bfaa..ba0b8db 100644
--- a/server/api/faxAccount/faxAccount.model.js
+++ b/server/api/faxAccount/faxAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9821=['rimraf','../../config/environment','./faxAccount.attributes','exports','define','FaxAccount','fax_accounts','lodash','../../config/logger','bluebird','request-promise','path'];(function(_0x224056,_0x17c025){var _0x71a42e=function(_0x2588ca){while(--_0x2588ca){_0x224056['push'](_0x224056['shift']());}};_0x71a42e(++_0x17c025);}(_0x9821,0x1b7));var _0x1982=function(_0x5a95fa,_0x4a2fc9){_0x5a95fa=_0x5a95fa-0x0;var _0x1a61b8=_0x9821[_0x5a95fa];return _0x1a61b8;};'use strict';var _=require(_0x1982('0x0'));var util=require('util');var logger=require(_0x1982('0x1'))('api');var moment=require('moment');var BPromise=require(_0x1982('0x2'));var rp=require(_0x1982('0x3'));var fs=require('fs');var path=require(_0x1982('0x4'));var rimraf=require(_0x1982('0x5'));var config=require(_0x1982('0x6'));var attributes=require(_0x1982('0x7'));module[_0x1982('0x8')]=function(_0x1266c5,_0x82fbcb){return _0x1266c5[_0x1982('0x9')](_0x1982('0xa'),attributes,{'tableName':_0x1982('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe3ab=['bluebird','rimraf','../../config/environment','./faxAccount.attributes','exports','define','FaxAccount','fax_accounts','lodash','util','../../config/logger','api','moment'];(function(_0x52be73,_0x1b4cbd){var _0x26f66a=function(_0x4d56e0){while(--_0x4d56e0){_0x52be73['push'](_0x52be73['shift']());}};_0x26f66a(++_0x1b4cbd);}(_0xe3ab,0x181));var _0xbe3a=function(_0x5b114b,_0x58d78e){_0x5b114b=_0x5b114b-0x0;var _0x55fb49=_0xe3ab[_0x5b114b];return _0x55fb49;};'use strict';var _=require(_0xbe3a('0x0'));var util=require(_0xbe3a('0x1'));var logger=require(_0xbe3a('0x2'))(_0xbe3a('0x3'));var moment=require(_0xbe3a('0x4'));var BPromise=require(_0xbe3a('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xbe3a('0x6'));var config=require(_0xbe3a('0x7'));var attributes=require(_0xbe3a('0x8'));module[_0xbe3a('0x9')]=function(_0x13116d,_0xb5632d){return _0x13116d[_0xbe3a('0xa')](_0xbe3a('0xb'),attributes,{'tableName':_0xbe3a('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.rpc.js b/server/api/faxAccount/faxAccount.rpc.js
index 1a99125..743233c 100644
--- a/server/api/faxAccount/faxAccount.rpc.js
+++ b/server/api/faxAccount/faxAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0b0e=['contact','FaxInteraction','Contact\x20not\x20found','spread','autoclose','close','unmanaged','*,*,*,*','created','interaction','AttachmentId','UserId','User','unshift','agent','name','waitForTheAssignedAgent','Start','startRouting','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./faxAccount.socket','then','info','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxAccount,\x20%s,\x20%s','message','result','FaxAccount','findAll','options','raw','where','attributes','include','map','model','GetFaxAccount','catch','NotifyFaxAccount','fax','CmContact','describe','Sequelize','ValidationError','no\x20available\x20attributes','difference','keys','createdAt','updatedAt','CompanyId','ListId','body','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','find','account','CmList','List','Contacts','DESC','FaxApplication','get','applications','Applications','list','priority','length','defaults','create'];(function(_0x28ca2f,_0x535bd1){var _0x3019c7=function(_0x4721f3){while(--_0x4721f3){_0x28ca2f['push'](_0x28ca2f['shift']());}};_0x3019c7(++_0x535bd1);}(_0x0b0e,0x187));var _0xe0b0=function(_0x368587,_0x1b6554){_0x368587=_0x368587-0x0;var _0x42d33c=_0x0b0e[_0x368587];return _0x42d33c;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var moment=require(_0xe0b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xe0b0('0x2'));var fs=require('fs');var Redis=require(_0xe0b0('0x3'));var db=require(_0xe0b0('0x4'))['db'];var utils=require(_0xe0b0('0x5'));var logger=require(_0xe0b0('0x6'))(_0xe0b0('0x7'));var config=require(_0xe0b0('0x8'));var jayson=require(_0xe0b0('0x9'));var client=jayson[_0xe0b0('0xa')][_0xe0b0('0xb')]({'port':0x232c});config[_0xe0b0('0xc')]=_['defaults'](config['redis'],{'host':_0xe0b0('0xd'),'port':0x18eb});var socket=require(_0xe0b0('0xe'))(new Redis(config[_0xe0b0('0xc')]));require(_0xe0b0('0xf'))['register'](socket);function respondWithRpcPromise(_0x338e7c,_0x1dd3b8,_0x553d4f){return new BPromise(function(_0x1fef28,_0x2f32b6){return client['request'](_0x338e7c,_0x553d4f)[_0xe0b0('0x10')](function(_0x2cdad2){logger[_0xe0b0('0x11')]('FaxAccount,\x20%s,\x20%s',_0x1dd3b8,_0xe0b0('0x12'));logger[_0xe0b0('0x13')](_0xe0b0('0x14'),_0x1dd3b8,_0xe0b0('0x12'),JSON[_0xe0b0('0x15')](_0x2cdad2));if(_0x2cdad2['error']){if(_0x2cdad2[_0xe0b0('0x16')][_0xe0b0('0x17')]===0x1f4){logger[_0xe0b0('0x16')](_0xe0b0('0x18'),_0x1dd3b8,_0x2cdad2[_0xe0b0('0x16')]['message']);return _0x2f32b6(_0x2cdad2[_0xe0b0('0x16')]['message']);}logger[_0xe0b0('0x16')](_0xe0b0('0x18'),_0x1dd3b8,_0x2cdad2['error'][_0xe0b0('0x19')]);return _0x1fef28(_0x2cdad2['error'][_0xe0b0('0x19')]);}else{logger[_0xe0b0('0x11')]('FaxAccount,\x20%s,\x20%s',_0x1dd3b8,'request\x20sent');_0x1fef28(_0x2cdad2[_0xe0b0('0x1a')]['message']);}})['catch'](function(_0x4bce65){logger[_0xe0b0('0x16')]('FaxAccount,\x20%s,\x20%s',_0x1dd3b8,_0x4bce65);_0x2f32b6(_0x4bce65);});});}exports['GetFaxAccount']=function(_0x10cde1){var _0x59dff5=this;return new Promise(function(_0x472286,_0x5dba2f){return db[_0xe0b0('0x1b')][_0xe0b0('0x1c')]({'raw':_0x10cde1[_0xe0b0('0x1d')]?_0x10cde1[_0xe0b0('0x1d')][_0xe0b0('0x1e')]===undefined?!![]:![]:!![],'where':_0x10cde1['options']?_0x10cde1['options'][_0xe0b0('0x1f')]||null:null,'attributes':_0x10cde1['options']?_0x10cde1[_0xe0b0('0x1d')][_0xe0b0('0x20')]||null:null,'limit':_0x10cde1['options']?_0x10cde1[_0xe0b0('0x1d')]['limit']||null:null,'include':_0x10cde1[_0xe0b0('0x1d')]?_0x10cde1['options'][_0xe0b0('0x21')]?_['map'](_0x10cde1[_0xe0b0('0x1d')]['include'],function(_0x4700cc){return{'model':db[_0x4700cc['model']],'as':_0x4700cc['as'],'attributes':_0x4700cc[_0xe0b0('0x20')],'include':_0x4700cc['include']?_[_0xe0b0('0x22')](_0x4700cc[_0xe0b0('0x21')],function(_0x1f1ebd){return{'model':db[_0x1f1ebd[_0xe0b0('0x23')]],'as':_0x1f1ebd['as'],'attributes':_0x1f1ebd[_0xe0b0('0x20')],'include':_0x1f1ebd[_0xe0b0('0x21')]?_['map'](_0x1f1ebd[_0xe0b0('0x21')],function(_0x1b8aa8){return{'model':db[_0x1b8aa8['model']],'as':_0x1b8aa8['as'],'attributes':_0x1b8aa8[_0xe0b0('0x20')]};}):[]};}):[]};}):[]:[]})[_0xe0b0('0x10')](function(_0x36d137){logger[_0xe0b0('0x11')](_0xe0b0('0x24'),_0x10cde1);logger[_0xe0b0('0x13')](_0xe0b0('0x24'),_0x10cde1,JSON['stringify'](_0x36d137));_0x472286(_0x36d137);})[_0xe0b0('0x25')](function(_0x3c0109){logger['error']('GetFaxAccount',_0x3c0109[_0xe0b0('0x19')],_0x10cde1);_0x5dba2f(_0x59dff5[_0xe0b0('0x16')](0x1f4,_0x3c0109[_0xe0b0('0x19')]));});});};exports[_0xe0b0('0x26')]=function(_0x2ab1b1,_0x5866e5,_0x32acfe){var _0x3231fc=this;return new Promise(function(_0x7867c4,_0x29d725){var _0x27158f={'body':_0x2ab1b1['body'],'channel':_0xe0b0('0x27')};var _0x208945=[];var _0xfc51d3=[];var _0x31c6f5={};return db[_0xe0b0('0x28')][_0xe0b0('0x29')]()[_0xe0b0('0x10')](function(_0x20908f){if(!_0x20908f){throw new db[(_0xe0b0('0x2a'))][(_0xe0b0('0x2b'))](_0xe0b0('0x2c'));}_0x208945=_[_0xe0b0('0x2d')](_[_0xe0b0('0x2e')](_0x20908f),[_0xe0b0('0x2f'),_0xe0b0('0x30')]);_0xfc51d3=_['difference'](_[_0xe0b0('0x2e')](_0x20908f),[_0xe0b0('0x2f'),_0xe0b0('0x30'),_0xe0b0('0x31'),_0xe0b0('0x32')]);if(_0x2ab1b1[_0xe0b0('0x33')]['id']){delete _0x2ab1b1[_0xe0b0('0x33')]['id'];}if(_['isNil'](_0x2ab1b1['body']['from'])){throw new db['Sequelize'][(_0xe0b0('0x2b'))](_0xe0b0('0x34'));}if(_[_0xe0b0('0x35')](_0x2ab1b1['body'][_0xe0b0('0x33')])||_0x2ab1b1[_0xe0b0('0x33')][_0xe0b0('0x33')]===''){throw new db[(_0xe0b0('0x2a'))]['ValidationError'](_0xe0b0('0x36'));}if(_[_0xe0b0('0x35')](_0x2ab1b1[_0xe0b0('0x33')][_0xe0b0('0x37')])){throw new db[(_0xe0b0('0x2a'))][(_0xe0b0('0x2b'))](_0xe0b0('0x38')+_0xfc51d3);}if(!_[_0xe0b0('0x39')](_0xfc51d3,_0x2ab1b1[_0xe0b0('0x33')]['mapKey'])){throw new db[(_0xe0b0('0x2a'))]['ValidationError'](_0xe0b0('0x3a')+_0xfc51d3);}_0x31c6f5[_0x2ab1b1[_0xe0b0('0x33')][_0xe0b0('0x37')]]=_0x2ab1b1[_0xe0b0('0x33')]['from'];})[_0xe0b0('0x10')](function(){return db[_0xe0b0('0x1b')][_0xe0b0('0x3b')]({'where':{'id':_0x2ab1b1[_0xe0b0('0x3c')]['id']},'include':[{'model':db[_0xe0b0('0x3d')],'as':_0xe0b0('0x3e'),'include':[{'model':db[_0xe0b0('0x28')],'as':_0xe0b0('0x3f'),'where':_0x31c6f5,'limit':0x1,'order':[['updatedAt',_0xe0b0('0x40')]]}]},{'model':db[_0xe0b0('0x41')],'as':'Applications'}]});})['then'](function(_0x327fb4){if(_0x327fb4&&_0x327fb4[_0xe0b0('0x3e')]){var _0x56e7df=_0x327fb4[_0xe0b0('0x42')]({'plain':!![]});_0x27158f[_0xe0b0('0x3c')]=_0x56e7df;_0x27158f[_0xe0b0('0x43')]=_0x56e7df[_0xe0b0('0x44')];_0x27158f[_0xe0b0('0x45')]=_0x56e7df['List'];_0x27158f['applications']=_['orderBy'](_0x27158f[_0xe0b0('0x43')],[_0xe0b0('0x46')],['asc']);if(_0x27158f[_0xe0b0('0x3c')][_0xe0b0('0x44')]){delete _0x27158f[_0xe0b0('0x3c')][_0xe0b0('0x44')];}if(_0x27158f[_0xe0b0('0x3c')]['List']&&_0x27158f['account'][_0xe0b0('0x3e')][_0xe0b0('0x3f')][_0xe0b0('0x47')]){return _0x27158f[_0xe0b0('0x3c')][_0xe0b0('0x3e')]['Contacts'][0x0];}var _0x3b1474=_[_0xe0b0('0x48')](_0x2ab1b1['body'],{'firstName':_0x2ab1b1['body']['from'],'ListId':_0x56e7df[_0xe0b0('0x32')]});_0x3b1474[_0x2ab1b1[_0xe0b0('0x33')][_0xe0b0('0x37')]]=_0x2ab1b1[_0xe0b0('0x33')]['from'];return db[_0xe0b0('0x28')][_0xe0b0('0x49')](_0x3b1474,{'fields':_0x208945,'raw':!![]});}})['then'](function(_0x58b69c){_0x27158f[_0xe0b0('0x4a')]=_0x58b69c;if(_0x58b69c){var _0x1bc6e0={'ContactId':_0x58b69c['id'],'FaxAccountId':_0x2ab1b1['account']['id'],'fax':_0x58b69c[_0xe0b0('0x27')]};return db[_0xe0b0('0x4b')]['find']({'where':{'ContactId':_0x58b69c['id'],'closed':![],'FaxAccountId':_0x2ab1b1['account']['id']}})[_0xe0b0('0x10')](function(_0x511679){if(_0x511679){return[_0x511679,![]];}return db[_0xe0b0('0x4b')][_0xe0b0('0x49')](_0x1bc6e0)[_0xe0b0('0x10')](function(_0x45cc4e){return[_0x45cc4e,!![]];});});}else{throw new Error(_0xe0b0('0x4c'));}})[_0xe0b0('0x4d')](function(_0x5f5486,_0x5d018d){var _0x2ef908=_0x5f5486['get']({'plain':!![]});if(_0x5d018d){if(_0x27158f['account'][_0xe0b0('0x4e')]){_0x27158f[_0xe0b0('0x43')]['push']({'id':0x0,'priority':_0x27158f['applications'][_0xe0b0('0x47')]+0x1,'app':_0xe0b0('0x4f'),'appdata':_0xe0b0('0x50'),'interval':_0xe0b0('0x51')});}_0x2ef908[_0xe0b0('0x52')]=!![];}else{_0x2ef908[_0xe0b0('0x52')]=![];}_0x27158f[_0xe0b0('0x53')]=_0x2ef908;return db['FaxMessage'][_0xe0b0('0x49')]({'body':_0x2ab1b1['body'][_0xe0b0('0x33')],'FaxAccountId':_0x2ab1b1['account']['id'],'FaxInteractionId':_0x5f5486['id'],'direction':'in','ContactId':_0x5f5486['ContactId'],'AttachmentId':_0x2ab1b1[_0xe0b0('0x33')][_0xe0b0('0x54')]});})[_0xe0b0('0x10')](function(_0x2f1712){_0x27158f[_0xe0b0('0x19')]=_0x2f1712;if(_0x27158f[_0xe0b0('0x53')][_0xe0b0('0x55')]){return db[_0xe0b0('0x56')][_0xe0b0('0x3b')]({'attributes':['id','name'],'where':{'id':_0x27158f[_0xe0b0('0x53')]['UserId']}})[_0xe0b0('0x10')](function(_0x3ae36e){if(_0x3ae36e){_0x27158f[_0xe0b0('0x43')][_0xe0b0('0x57')]({'id':0x0,'priority':0x0,'app':_0xe0b0('0x58'),'appdata':_0x3ae36e[_0xe0b0('0x59')]+','+(_0x27158f['account'][_0xe0b0('0x5a')]||0xa),'interval':_0xe0b0('0x51')});}return respondWithRpcPromise(_0xe0b0('0x5b'),_0xe0b0('0x5c'),_0x27158f);});}return respondWithRpcPromise(_0xe0b0('0x5b'),_0xe0b0('0x5c'),_0x27158f);})[_0xe0b0('0x10')](function(_0x1a60d2){_0x7867c4(_0x1a60d2);})[_0xe0b0('0x25')](function(_0xf331df){_0x29d725(_0x3231fc[_0xe0b0('0x16')](0x1f4,_0xf331df[_0xe0b0('0x19')]));});});};
\ No newline at end of file
+var _0x7d0e=['client','http','redis','defaults','localhost','register','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','error','message','result','GetFaxAccount','FaxAccount','findAll','raw','options','where','attributes','limit','include','map','model','catch','NotifyFaxAccount','CmContact','describe','Sequelize','ValidationError','no\x20available\x20attributes','difference','keys','createdAt','updatedAt','CompanyId','body','from','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','find','account','CmList','List','Contacts','DESC','applications','Applications','orderBy','priority','ListId','create','contact','fax','FaxInteraction','Contact\x20not\x20found','spread','get','autoclose','unmanaged','*,*,*,*','created','interaction','UserId','User','name','unshift','agent','waitForTheAssignedAgent','Start','startRouting','lodash','moment','ioredis','../../config/utils','rpc','jayson/promise'];(function(_0x5af579,_0x2503e4){var _0x1af24b=function(_0x3433c4){while(--_0x3433c4){_0x5af579['push'](_0x5af579['shift']());}};_0x1af24b(++_0x2503e4);}(_0x7d0e,0x1f2));var _0xe7d0=function(_0x4a746b,_0x550aea){_0x4a746b=_0x4a746b-0x0;var _0x2d04ec=_0x7d0e[_0x4a746b];return _0x2d04ec;};'use strict';var _=require(_0xe7d0('0x0'));var util=require('util');var moment=require(_0xe7d0('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe7d0('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xe7d0('0x3'));var logger=require('../../config/logger')(_0xe7d0('0x4'));var config=require('../../config/environment');var jayson=require(_0xe7d0('0x5'));var client=jayson[_0xe7d0('0x6')][_0xe7d0('0x7')]({'port':0x232c});config[_0xe7d0('0x8')]=_[_0xe7d0('0x9')](config[_0xe7d0('0x8')],{'host':_0xe7d0('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./faxAccount.socket')[_0xe7d0('0xb')](socket);function respondWithRpcPromise(_0x98f3a5,_0xd7d597,_0x368e4f){return new BPromise(function(_0x63d18a,_0x289b24){return client[_0xe7d0('0xc')](_0x98f3a5,_0x368e4f)[_0xe7d0('0xd')](function(_0x36b4e4){logger[_0xe7d0('0xe')](_0xe7d0('0xf'),_0xd7d597,_0xe7d0('0x10'));logger[_0xe7d0('0x11')]('FaxAccount,\x20%s,\x20%s,\x20%s',_0xd7d597,_0xe7d0('0x10'),JSON['stringify'](_0x36b4e4));if(_0x36b4e4[_0xe7d0('0x12')]){if(_0x36b4e4[_0xe7d0('0x12')]['code']===0x1f4){logger[_0xe7d0('0x12')](_0xe7d0('0xf'),_0xd7d597,_0x36b4e4['error'][_0xe7d0('0x13')]);return _0x289b24(_0x36b4e4[_0xe7d0('0x12')][_0xe7d0('0x13')]);}logger[_0xe7d0('0x12')]('FaxAccount,\x20%s,\x20%s',_0xd7d597,_0x36b4e4[_0xe7d0('0x12')][_0xe7d0('0x13')]);return _0x63d18a(_0x36b4e4['error'][_0xe7d0('0x13')]);}else{logger['info'](_0xe7d0('0xf'),_0xd7d597,_0xe7d0('0x10'));_0x63d18a(_0x36b4e4[_0xe7d0('0x14')][_0xe7d0('0x13')]);}})['catch'](function(_0x33f4c4){logger[_0xe7d0('0x12')](_0xe7d0('0xf'),_0xd7d597,_0x33f4c4);_0x289b24(_0x33f4c4);});});}exports[_0xe7d0('0x15')]=function(_0x261e44){var _0x3a6cec=this;return new Promise(function(_0x174ced,_0x35621a){return db[_0xe7d0('0x16')][_0xe7d0('0x17')]({'raw':_0x261e44['options']?_0x261e44['options'][_0xe7d0('0x18')]===undefined?!![]:![]:!![],'where':_0x261e44[_0xe7d0('0x19')]?_0x261e44[_0xe7d0('0x19')][_0xe7d0('0x1a')]||null:null,'attributes':_0x261e44['options']?_0x261e44['options'][_0xe7d0('0x1b')]||null:null,'limit':_0x261e44['options']?_0x261e44[_0xe7d0('0x19')][_0xe7d0('0x1c')]||null:null,'include':_0x261e44[_0xe7d0('0x19')]?_0x261e44[_0xe7d0('0x19')][_0xe7d0('0x1d')]?_[_0xe7d0('0x1e')](_0x261e44[_0xe7d0('0x19')][_0xe7d0('0x1d')],function(_0x1ef236){return{'model':db[_0x1ef236[_0xe7d0('0x1f')]],'as':_0x1ef236['as'],'attributes':_0x1ef236[_0xe7d0('0x1b')],'include':_0x1ef236[_0xe7d0('0x1d')]?_[_0xe7d0('0x1e')](_0x1ef236[_0xe7d0('0x1d')],function(_0x12b062){return{'model':db[_0x12b062[_0xe7d0('0x1f')]],'as':_0x12b062['as'],'attributes':_0x12b062[_0xe7d0('0x1b')],'include':_0x12b062[_0xe7d0('0x1d')]?_['map'](_0x12b062['include'],function(_0x103e78){return{'model':db[_0x103e78[_0xe7d0('0x1f')]],'as':_0x103e78['as'],'attributes':_0x103e78[_0xe7d0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xe7d0('0xd')](function(_0x3e8edb){logger[_0xe7d0('0xe')](_0xe7d0('0x15'),_0x261e44);logger[_0xe7d0('0x11')]('GetFaxAccount',_0x261e44,JSON['stringify'](_0x3e8edb));_0x174ced(_0x3e8edb);})[_0xe7d0('0x20')](function(_0x318488){logger['error'](_0xe7d0('0x15'),_0x318488[_0xe7d0('0x13')],_0x261e44);_0x35621a(_0x3a6cec[_0xe7d0('0x12')](0x1f4,_0x318488[_0xe7d0('0x13')]));});});};exports[_0xe7d0('0x21')]=function(_0x2f0d30,_0x4d13f9,_0x113ec1){var _0x322954=this;return new Promise(function(_0x5bb6fc,_0x2c839f){var _0x1828c0={'body':_0x2f0d30['body'],'channel':'fax'};var _0x24f32c=[];var _0xdcfc7f=[];var _0x21dd81={};return db[_0xe7d0('0x22')][_0xe7d0('0x23')]()['then'](function(_0x28b820){if(!_0x28b820){throw new db[(_0xe7d0('0x24'))][(_0xe7d0('0x25'))](_0xe7d0('0x26'));}_0x24f32c=_[_0xe7d0('0x27')](_[_0xe7d0('0x28')](_0x28b820),[_0xe7d0('0x29'),'updatedAt']);_0xdcfc7f=_[_0xe7d0('0x27')](_[_0xe7d0('0x28')](_0x28b820),[_0xe7d0('0x29'),_0xe7d0('0x2a'),_0xe7d0('0x2b'),'ListId']);if(_0x2f0d30[_0xe7d0('0x2c')]['id']){delete _0x2f0d30[_0xe7d0('0x2c')]['id'];}if(_['isNil'](_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x2d')])){throw new db[(_0xe7d0('0x24'))]['ValidationError'](_0xe7d0('0x2e'));}if(_[_0xe7d0('0x2f')](_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x2c')])||_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x2c')]===''){throw new db['Sequelize'][(_0xe7d0('0x25'))](_0xe7d0('0x30'));}if(_[_0xe7d0('0x2f')](_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x31')])){throw new db['Sequelize'][(_0xe7d0('0x25'))](_0xe7d0('0x32')+_0xdcfc7f);}if(!_[_0xe7d0('0x33')](_0xdcfc7f,_0x2f0d30['body'][_0xe7d0('0x31')])){throw new db[(_0xe7d0('0x24'))][(_0xe7d0('0x25'))](_0xe7d0('0x34')+_0xdcfc7f);}_0x21dd81[_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x31')]]=_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x2d')];})[_0xe7d0('0xd')](function(){return db[_0xe7d0('0x16')][_0xe7d0('0x35')]({'where':{'id':_0x2f0d30[_0xe7d0('0x36')]['id']},'include':[{'model':db[_0xe7d0('0x37')],'as':_0xe7d0('0x38'),'include':[{'model':db[_0xe7d0('0x22')],'as':_0xe7d0('0x39'),'where':_0x21dd81,'limit':0x1,'order':[['updatedAt',_0xe7d0('0x3a')]]}]},{'model':db['FaxApplication'],'as':'Applications'}]});})[_0xe7d0('0xd')](function(_0x1ccd82){if(_0x1ccd82&&_0x1ccd82[_0xe7d0('0x38')]){var _0x495d99=_0x1ccd82['get']({'plain':!![]});_0x1828c0[_0xe7d0('0x36')]=_0x495d99;_0x1828c0[_0xe7d0('0x3b')]=_0x495d99[_0xe7d0('0x3c')];_0x1828c0['list']=_0x495d99[_0xe7d0('0x38')];_0x1828c0[_0xe7d0('0x3b')]=_[_0xe7d0('0x3d')](_0x1828c0[_0xe7d0('0x3b')],[_0xe7d0('0x3e')],['asc']);if(_0x1828c0[_0xe7d0('0x36')][_0xe7d0('0x3c')]){delete _0x1828c0[_0xe7d0('0x36')]['Applications'];}if(_0x1828c0[_0xe7d0('0x36')][_0xe7d0('0x38')]&&_0x1828c0['account'][_0xe7d0('0x38')]['Contacts']['length']){return _0x1828c0['account']['List']['Contacts'][0x0];}var _0x533b42=_[_0xe7d0('0x9')](_0x2f0d30[_0xe7d0('0x2c')],{'firstName':_0x2f0d30['body'][_0xe7d0('0x2d')],'ListId':_0x495d99[_0xe7d0('0x3f')]});_0x533b42[_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x31')]]=_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x2d')];return db[_0xe7d0('0x22')][_0xe7d0('0x40')](_0x533b42,{'fields':_0x24f32c,'raw':!![]});}})[_0xe7d0('0xd')](function(_0x35d0a9){_0x1828c0[_0xe7d0('0x41')]=_0x35d0a9;if(_0x35d0a9){var _0xd85fd8={'ContactId':_0x35d0a9['id'],'FaxAccountId':_0x2f0d30['account']['id'],'fax':_0x35d0a9[_0xe7d0('0x42')]};return db[_0xe7d0('0x43')][_0xe7d0('0x35')]({'where':{'ContactId':_0x35d0a9['id'],'closed':![],'FaxAccountId':_0x2f0d30[_0xe7d0('0x36')]['id']}})['then'](function(_0x3d5f11){if(_0x3d5f11){return[_0x3d5f11,![]];}return db[_0xe7d0('0x43')]['create'](_0xd85fd8)[_0xe7d0('0xd')](function(_0x1a5caa){return[_0x1a5caa,!![]];});});}else{throw new Error(_0xe7d0('0x44'));}})[_0xe7d0('0x45')](function(_0x4f539c,_0x19045c){var _0x45f4dc=_0x4f539c[_0xe7d0('0x46')]({'plain':!![]});if(_0x19045c){if(_0x1828c0[_0xe7d0('0x36')][_0xe7d0('0x47')]){_0x1828c0[_0xe7d0('0x3b')]['push']({'id':0x0,'priority':_0x1828c0['applications']['length']+0x1,'app':'close','appdata':_0xe7d0('0x48'),'interval':_0xe7d0('0x49')});}_0x45f4dc[_0xe7d0('0x4a')]=!![];}else{_0x45f4dc['created']=![];}_0x1828c0[_0xe7d0('0x4b')]=_0x45f4dc;return db['FaxMessage']['create']({'body':_0x2f0d30[_0xe7d0('0x2c')][_0xe7d0('0x2c')],'FaxAccountId':_0x2f0d30[_0xe7d0('0x36')]['id'],'FaxInteractionId':_0x4f539c['id'],'direction':'in','ContactId':_0x4f539c['ContactId'],'AttachmentId':_0x2f0d30[_0xe7d0('0x2c')]['AttachmentId']});})['then'](function(_0x27e1fc){_0x1828c0[_0xe7d0('0x13')]=_0x27e1fc;if(_0x1828c0['interaction'][_0xe7d0('0x4c')]){return db[_0xe7d0('0x4d')]['find']({'attributes':['id',_0xe7d0('0x4e')],'where':{'id':_0x1828c0[_0xe7d0('0x4b')]['UserId']}})[_0xe7d0('0xd')](function(_0x50d8c9){if(_0x50d8c9){_0x1828c0['applications'][_0xe7d0('0x4f')]({'id':0x0,'priority':0x0,'app':_0xe7d0('0x50'),'appdata':_0x50d8c9[_0xe7d0('0x4e')]+','+(_0x1828c0['account'][_0xe7d0('0x51')]||0xa),'interval':_0xe7d0('0x49')});}return respondWithRpcPromise(_0xe7d0('0x52'),_0xe7d0('0x53'),_0x1828c0);});}return respondWithRpcPromise(_0xe7d0('0x52'),_0xe7d0('0x53'),_0x1828c0);})['then'](function(_0x366372){_0x5bb6fc(_0x366372);})['catch'](function(_0x1e6b49){_0x2c839f(_0x322954[_0xe7d0('0x12')](0x1f4,_0x1e6b49['message']));});});};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.socket.js b/server/api/faxAccount/faxAccount.socket.js
index 74a01c7..fe253fa 100644
--- a/server/api/faxAccount/faxAccount.socket.js
+++ b/server/api/faxAccount/faxAccount.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb292=['faxAccount:','./faxAccount.events','remove','emit','register'];(function(_0x263f23,_0x3fc860){var _0x189927=function(_0x2dc197){while(--_0x2dc197){_0x263f23['push'](_0x263f23['shift']());}};_0x189927(++_0x3fc860);}(_0xb292,0x19b));var _0x2b29=function(_0x49efb2,_0x4b9081){_0x49efb2=_0x49efb2-0x0;var _0x2cd91b=_0xb292[_0x49efb2];return _0x2cd91b;};'use strict';var FaxAccountEvents=require(_0x2b29('0x0'));var events=['save',_0x2b29('0x1'),'update'];function createListener(_0x2b73f8,_0x2c88b0){return function(_0x3aa745){_0x2c88b0[_0x2b29('0x2')](_0x2b73f8,_0x3aa745);};}function removeListener(_0x3a8db3,_0x1904ce){return function(){FaxAccountEvents['removeListener'](_0x3a8db3,_0x1904ce);};}exports[_0x2b29('0x3')]=function(_0x4f22ef){for(var _0x1fdb2b=0x0,_0x49b613=events['length'];_0x1fdb2b<_0x49b613;_0x1fdb2b++){var _0x1a2fba=events[_0x1fdb2b];var _0x153cab=createListener(_0x2b29('0x4')+_0x1a2fba,_0x4f22ef);FaxAccountEvents['on'](_0x1a2fba,_0x153cab);}};
\ No newline at end of file
+var _0x6e9a=['register','length','./faxAccount.events','update','removeListener'];(function(_0x462a8a,_0x527861){var _0x322725=function(_0x5d9fef){while(--_0x5d9fef){_0x462a8a['push'](_0x462a8a['shift']());}};_0x322725(++_0x527861);}(_0x6e9a,0x18d));var _0xa6e9=function(_0x4ca89a,_0x33ffb8){_0x4ca89a=_0x4ca89a-0x0;var _0xfeb04d=_0x6e9a[_0x4ca89a];return _0xfeb04d;};'use strict';var FaxAccountEvents=require(_0xa6e9('0x0'));var events=['save','remove',_0xa6e9('0x1')];function createListener(_0xc9cdb4,_0x310bf5){return function(_0x4a41f3){_0x310bf5['emit'](_0xc9cdb4,_0x4a41f3);};}function removeListener(_0x595e02,_0x4fa8af){return function(){FaxAccountEvents[_0xa6e9('0x2')](_0x595e02,_0x4fa8af);};}exports[_0xa6e9('0x3')]=function(_0x586b0b){for(var _0x599cb8=0x0,_0x102a20=events[_0xa6e9('0x4')];_0x599cb8<_0x102a20;_0x599cb8++){var _0x918489=events[_0x599cb8];var _0x2bd461=createListener('faxAccount:'+_0x918489,_0x586b0b);FaxAccountEvents['on'](_0x918489,_0x2bd461);}};
\ No newline at end of file
diff --git a/server/api/faxAccount/index.js b/server/api/faxAccount/index.js
index fcc2663..ab686fa 100644
--- a/server/api/faxAccount/index.js
+++ b/server/api/faxAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x758c=['describe','/:id','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/messages','getMessages','/:id/users','getAgents','create','post','addDisposition','addAnswer','addInteraction','addApplications','/addaccountapplications','addAccountApplications','/:id/send','addAgents','put','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','isAuthenticated'];(function(_0xb89931,_0x461b9e){var _0x324b86=function(_0x4be23d){while(--_0x4be23d){_0xb89931['push'](_0xb89931['shift']());}};_0x324b86(++_0x461b9e);}(_0x758c,0x10e));var _0xc758=function(_0x988203,_0x3e2bf6){_0x988203=_0x988203-0x0;var _0x434bb5=_0x758c[_0x988203];return _0x434bb5;};'use strict';var multer=require('multer');var util=require(_0xc758('0x0'));var path=require(_0xc758('0x1'));var timeout=require('connect-timeout');var express=require(_0xc758('0x2'));var router=express[_0xc758('0x3')]();var auth=require(_0xc758('0x4'));var interaction=require(_0xc758('0x5'));var config=require(_0xc758('0x6'));var controller=require(_0xc758('0x7'));router[_0xc758('0x8')]('/',auth[_0xc758('0x9')](),controller['index']);router[_0xc758('0x8')]('/describe',auth[_0xc758('0x9')](),controller[_0xc758('0xa')]);router[_0xc758('0x8')](_0xc758('0xb'),auth[_0xc758('0x9')](),controller['show']);router[_0xc758('0x8')](_0xc758('0xc'),auth[_0xc758('0x9')](),controller[_0xc758('0xd')]);router[_0xc758('0x8')](_0xc758('0xe'),auth[_0xc758('0x9')](),controller['getAnswers']);router['get'](_0xc758('0xf'),auth[_0xc758('0x9')](),controller[_0xc758('0x10')]);router[_0xc758('0x8')](_0xc758('0x11'),auth['isAuthenticated'](),controller[_0xc758('0x12')]);router[_0xc758('0x8')](_0xc758('0x13'),auth[_0xc758('0x9')](),controller[_0xc758('0x14')]);router['get'](_0xc758('0x15'),auth[_0xc758('0x9')](),controller[_0xc758('0x16')]);router['post']('/',auth[_0xc758('0x9')](),controller[_0xc758('0x17')]);router[_0xc758('0x18')]('/:id/dispositions',auth[_0xc758('0x9')](),controller[_0xc758('0x19')]);router[_0xc758('0x18')](_0xc758('0xe'),auth['isAuthenticated'](),controller[_0xc758('0x1a')]);router[_0xc758('0x18')]('/:id/interactions',auth[_0xc758('0x9')](),controller[_0xc758('0x1b')]);router['post'](_0xc758('0x11'),auth['isAuthenticated'](),controller[_0xc758('0x1c')]);router[_0xc758('0x18')](_0xc758('0x1d'),auth['isAuthenticated'](),controller[_0xc758('0x1e')]);router[_0xc758('0x18')]('/updateaccountapplications',auth[_0xc758('0x9')](),controller['updateAccountApplications']);router[_0xc758('0x18')](_0xc758('0x1f'),auth['isAuthenticated'](),controller['send']);router['post'](_0xc758('0x15'),auth[_0xc758('0x9')](),controller[_0xc758('0x20')]);router[_0xc758('0x21')](_0xc758('0xb'),auth[_0xc758('0x9')](),controller[_0xc758('0x22')]);router[_0xc758('0x23')](_0xc758('0xb'),auth[_0xc758('0x9')](),controller[_0xc758('0x24')]);router[_0xc758('0x23')](_0xc758('0xc'),auth[_0xc758('0x9')](),controller[_0xc758('0x25')]);router[_0xc758('0x23')]('/:id/canned_answers',auth[_0xc758('0x9')](),controller[_0xc758('0x26')]);router[_0xc758('0x23')](_0xc758('0x15'),auth[_0xc758('0x9')](),controller[_0xc758('0x27')]);module['exports']=router;
\ No newline at end of file
+var _0x1518=['../../config/environment','./faxAccount.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','getDispositions','getAnswers','getInteractions','/:id/applications','getApplications','/:id/messages','/:id/users','getAgents','post','addDisposition','addAnswer','/:id/interactions','addInteraction','/addaccountapplications','addAccountApplications','/updateaccountapplications','updateAccountApplications','put','/:id','update','delete','destroy','removeDispositions','/:id/canned_answers','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x52d4ad,_0x25e611){var _0x34a767=function(_0x1f3daa){while(--_0x1f3daa){_0x52d4ad['push'](_0x52d4ad['shift']());}};_0x34a767(++_0x25e611);}(_0x1518,0x7c));var _0x8151=function(_0x1b4155,_0x4817ea){_0x1b4155=_0x1b4155-0x0;var _0x8804ea=_0x1518[_0x1b4155];return _0x8804ea;};'use strict';var multer=require(_0x8151('0x0'));var util=require(_0x8151('0x1'));var path=require(_0x8151('0x2'));var timeout=require(_0x8151('0x3'));var express=require(_0x8151('0x4'));var router=express[_0x8151('0x5')]();var auth=require(_0x8151('0x6'));var interaction=require(_0x8151('0x7'));var config=require(_0x8151('0x8'));var controller=require(_0x8151('0x9'));router[_0x8151('0xa')]('/',auth[_0x8151('0xb')](),controller[_0x8151('0xc')]);router[_0x8151('0xa')](_0x8151('0xd'),auth['isAuthenticated'](),controller[_0x8151('0xe')]);router[_0x8151('0xa')]('/:id',auth[_0x8151('0xb')](),controller[_0x8151('0xf')]);router[_0x8151('0xa')](_0x8151('0x10'),auth[_0x8151('0xb')](),controller[_0x8151('0x11')]);router['get']('/:id/canned_answers',auth[_0x8151('0xb')](),controller[_0x8151('0x12')]);router[_0x8151('0xa')]('/:id/interactions',auth['isAuthenticated'](),controller[_0x8151('0x13')]);router['get'](_0x8151('0x14'),auth['isAuthenticated'](),controller[_0x8151('0x15')]);router[_0x8151('0xa')](_0x8151('0x16'),auth['isAuthenticated'](),controller['getMessages']);router[_0x8151('0xa')](_0x8151('0x17'),auth['isAuthenticated'](),controller[_0x8151('0x18')]);router[_0x8151('0x19')]('/',auth[_0x8151('0xb')](),controller['create']);router[_0x8151('0x19')](_0x8151('0x10'),auth[_0x8151('0xb')](),controller[_0x8151('0x1a')]);router[_0x8151('0x19')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x8151('0x1b')]);router[_0x8151('0x19')](_0x8151('0x1c'),auth['isAuthenticated'](),controller[_0x8151('0x1d')]);router[_0x8151('0x19')](_0x8151('0x14'),auth['isAuthenticated'](),controller['addApplications']);router[_0x8151('0x19')](_0x8151('0x1e'),auth[_0x8151('0xb')](),controller[_0x8151('0x1f')]);router['post'](_0x8151('0x20'),auth[_0x8151('0xb')](),controller[_0x8151('0x21')]);router['post']('/:id/send',auth[_0x8151('0xb')](),controller['send']);router[_0x8151('0x19')](_0x8151('0x17'),auth[_0x8151('0xb')](),controller['addAgents']);router[_0x8151('0x22')](_0x8151('0x23'),auth[_0x8151('0xb')](),controller[_0x8151('0x24')]);router[_0x8151('0x25')](_0x8151('0x23'),auth[_0x8151('0xb')](),controller[_0x8151('0x26')]);router[_0x8151('0x25')]('/:id/dispositions',auth[_0x8151('0xb')](),controller[_0x8151('0x27')]);router[_0x8151('0x25')](_0x8151('0x28'),auth['isAuthenticated'](),controller[_0x8151('0x29')]);router[_0x8151('0x25')](_0x8151('0x17'),auth[_0x8151('0xb')](),controller[_0x8151('0x2a')]);module[_0x8151('0x2b')]=router;
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.attributes.js b/server/api/faxApplication/faxApplication.attributes.js
index 0265fb5..085d893 100644
--- a/server/api/faxApplication/faxApplication.attributes.js
+++ b/server/api/faxApplication/faxApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7753=['*,*,*,*','sequelize','exports','INTEGER','STRING','noop'];(function(_0x206129,_0x3a984f){var _0x375e95=function(_0x1d1172){while(--_0x1d1172){_0x206129['push'](_0x206129['shift']());}};_0x375e95(++_0x3a984f);}(_0x7753,0xfd));var _0x3775=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x7753[_0x5d4607];return _0x5e4a86;};'use strict';var Sequelize=require(_0x3775('0x0'));module[_0x3775('0x1')]={'priority':{'type':Sequelize[_0x3775('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x3775('0x3')],'allowNull':![],'defaultValue':_0x3775('0x4')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x3775('0x3')]},'interval':{'type':Sequelize[_0x3775('0x3')],'defaultValue':_0x3775('0x5')}};
\ No newline at end of file
+var _0x1867=['*,*,*,*','sequelize','exports','STRING','TEXT'];(function(_0x6decac,_0x351eb7){var _0x2a247c=function(_0xc9adce){while(--_0xc9adce){_0x6decac['push'](_0x6decac['shift']());}};_0x2a247c(++_0x351eb7);}(_0x1867,0xb5));var _0x7186=function(_0x4972bd,_0x2484dc){_0x4972bd=_0x4972bd-0x0;var _0x301b5d=_0x1867[_0x4972bd];return _0x301b5d;};'use strict';var Sequelize=require(_0x7186('0x0'));module[_0x7186('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x7186('0x2')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x7186('0x3')]()},'description':{'type':Sequelize[_0x7186('0x2')]},'interval':{'type':Sequelize[_0x7186('0x2')],'defaultValue':_0x7186('0x4')}};
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.controller.js b/server/api/faxApplication/faxApplication.controller.js
index daa209b..43e941f 100644
--- a/server/api/faxApplication/faxApplication.controller.js
+++ b/server/api/faxApplication/faxApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6673=['moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','status','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error','name','send','index','FaxApplication','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','limit','sort','where','pick','filter','merge','map','type','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','options','find','create','body','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x45d3f0,_0x4be53f){var _0x314b79=function(_0x563d32){while(--_0x563d32){_0x45d3f0['push'](_0x45d3f0['shift']());}};_0x314b79(++_0x4be53f);}(_0x6673,0x8b));var _0x3667=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x6673[_0x2dafbe];return _0x58a45a;};'use strict';var pdf=require(_0x3667('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x3667('0x1'));var zipdir=require(_0x3667('0x2'));var jsonpatch=require(_0x3667('0x3'));var rp=require(_0x3667('0x4'));var moment=require(_0x3667('0x5'));var BPromise=require(_0x3667('0x6'));var Mustache=require(_0x3667('0x7'));var util=require('util');var path=require(_0x3667('0x8'));var sox=require(_0x3667('0x9'));var csv=require(_0x3667('0xa'));var ejs=require(_0x3667('0xb'));var fs=require('fs');var _=require(_0x3667('0xc'));var squel=require(_0x3667('0xd'));var crypto=require(_0x3667('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x3667('0xf'));var toCsv=require(_0x3667('0xa'));var querystring=require(_0x3667('0x10'));var Papa=require(_0x3667('0x11'));var Redis=require(_0x3667('0x12'));var authService=require(_0x3667('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x3667('0x14'));var logger=require('../../config/logger')(_0x3667('0x15'));var utils=require(_0x3667('0x16'));var config=require(_0x3667('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x251d02,_0x14c62b){_0x14c62b=_0x14c62b||0xcc;return function(_0x4291b4){if(_0x4291b4){return _0x251d02[_0x3667('0x18')](_0x14c62b);}return _0x251d02[_0x3667('0x19')](_0x14c62b)['end']();};}function respondWithResult(_0x1a1181,_0x4c941d){_0x4c941d=_0x4c941d||0xc8;return function(_0x3830d8){if(_0x3830d8){return _0x1a1181[_0x3667('0x19')](_0x4c941d)['json'](_0x3830d8);}};}function respondWithFilteredResult(_0x23e3b8,_0x19374a){return function(_0x5c24c8){if(_0x5c24c8){var _0x137728=_0x5c24c8[_0x3667('0x1a')],_0x14a8c0=_0x19374a['offset'],_0x2578a4=_0x19374a[_0x3667('0x1b')]+_0x19374a['limit'],_0x32e06f;if(_0x2578a4>=_0x137728){_0x2578a4=_0x137728;_0x32e06f=0xc8;}else{_0x32e06f=0xce;}_0x23e3b8['status'](_0x32e06f);return _0x23e3b8[_0x3667('0x1c')](_0x3667('0x1d'),_0x14a8c0+'-'+_0x2578a4+'/'+_0x137728)[_0x3667('0x1e')](_0x5c24c8);}return null;};}function patchUpdates(_0x55d8b6){return function(_0x204078){try{jsonpatch[_0x3667('0x1f')](_0x204078,_0x55d8b6,!![]);}catch(_0x1a78f6){return BPromise[_0x3667('0x20')](_0x1a78f6);}return _0x204078[_0x3667('0x21')]();};}function saveUpdates(_0x5d979d,_0x53858c){return function(_0x5d1cb6){if(_0x5d1cb6){return _0x5d1cb6[_0x3667('0x22')](_0x5d979d)[_0x3667('0x23')](function(_0x5ddcaa){return _0x5ddcaa;});}return null;};}function removeEntity(_0x310685,_0xa6624d){return function(_0x1c1a18){if(_0x1c1a18){return _0x1c1a18[_0x3667('0x24')]()[_0x3667('0x23')](function(){_0x310685[_0x3667('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x55a972,_0x4dc202){return function(_0x1cbb21){if(!_0x1cbb21){_0x55a972[_0x3667('0x18')](0x194);}return _0x1cbb21;};}function handleError(_0x3a8c06,_0x4b9c17){_0x4b9c17=_0x4b9c17||0x1f4;return function(_0x2c6ea3){logger[_0x3667('0x25')](_0x2c6ea3['stack']);if(_0x2c6ea3[_0x3667('0x26')]){delete _0x2c6ea3['name'];}_0x3a8c06[_0x3667('0x19')](_0x4b9c17)[_0x3667('0x27')](_0x2c6ea3);};}exports[_0x3667('0x28')]=function(_0x3a40b3,_0x4d75ab){var _0x1162fc={},_0x547121={},_0x423c87={'count':0x0,'rows':[]};var _0x5c18a6=db[_0x3667('0x29')][_0x3667('0x2a')];_0x547121[_0x3667('0x2b')]=_['keys'](_0x5c18a6);_0x547121[_0x3667('0x2c')]=_[_0x3667('0x2d')](_0x3a40b3[_0x3667('0x2c')]);_0x547121[_0x3667('0x2e')]=_[_0x3667('0x2f')](_0x547121['model'],_0x547121[_0x3667('0x2c')]);_0x1162fc[_0x3667('0x30')]=_[_0x3667('0x2f')](_0x547121['model'],qs[_0x3667('0x31')](_0x3a40b3['query'][_0x3667('0x31')]));_0x1162fc[_0x3667('0x30')]=_0x1162fc['attributes'][_0x3667('0x32')]?_0x1162fc[_0x3667('0x30')]:_0x547121[_0x3667('0x2b')];if(!_0x3a40b3[_0x3667('0x2c')][_0x3667('0x33')]('nolimit')){_0x1162fc[_0x3667('0x34')]=qs['limit'](_0x3a40b3['query'][_0x3667('0x34')]);_0x1162fc[_0x3667('0x1b')]=qs[_0x3667('0x1b')](_0x3a40b3[_0x3667('0x2c')][_0x3667('0x1b')]);}_0x1162fc['order']=qs[_0x3667('0x35')](_0x3a40b3[_0x3667('0x2c')][_0x3667('0x35')]);_0x1162fc[_0x3667('0x36')]=qs[_0x3667('0x2e')](_[_0x3667('0x37')](_0x3a40b3[_0x3667('0x2c')],_0x547121['filters']));if(_0x3a40b3[_0x3667('0x2c')][_0x3667('0x38')]){_0x1162fc[_0x3667('0x36')]=_[_0x3667('0x39')](_0x1162fc['where'],{'$or':_[_0x3667('0x3a')](_0x5c18a6,function(_0x4436ef){if(_0x4436ef[_0x3667('0x3b')]['key']!==_0x3667('0x3c')){var _0x4498c7={};_0x4498c7[_0x4436ef['field']]={'$like':'%'+_0x3a40b3['query'][_0x3667('0x38')]+'%'};return _0x4498c7;}})});}_0x1162fc=_[_0x3667('0x39')]({},_0x1162fc,_0x3a40b3['options']);var _0x34e634={'where':_0x1162fc[_0x3667('0x36')]};return db[_0x3667('0x29')][_0x3667('0x1a')](_0x34e634)['then'](function(_0x14a727){_0x423c87[_0x3667('0x1a')]=_0x14a727;if(_0x3a40b3[_0x3667('0x2c')][_0x3667('0x3d')]){_0x1162fc[_0x3667('0x3e')]=[{'all':!![]}];}return db['FaxApplication'][_0x3667('0x3f')](_0x1162fc);})[_0x3667('0x23')](function(_0x253f32){_0x423c87[_0x3667('0x40')]=_0x253f32;return _0x423c87;})[_0x3667('0x23')](respondWithFilteredResult(_0x4d75ab,_0x1162fc))[_0x3667('0x41')](handleError(_0x4d75ab,null));};exports[_0x3667('0x42')]=function(_0xaf3e12,_0x527ed3){var _0xa5865b={'raw':!![],'where':{'id':_0xaf3e12[_0x3667('0x43')]['id']}},_0x179aab={};_0x179aab[_0x3667('0x2b')]=_[_0x3667('0x2d')](db[_0x3667('0x29')][_0x3667('0x2a')]);_0x179aab[_0x3667('0x2c')]=_[_0x3667('0x2d')](_0xaf3e12['query']);_0x179aab[_0x3667('0x2e')]=_[_0x3667('0x2f')](_0x179aab[_0x3667('0x2b')],_0x179aab[_0x3667('0x2c')]);_0xa5865b[_0x3667('0x30')]=_['intersection'](_0x179aab[_0x3667('0x2b')],qs[_0x3667('0x31')](_0xaf3e12[_0x3667('0x2c')][_0x3667('0x31')]));_0xa5865b[_0x3667('0x30')]=_0xa5865b[_0x3667('0x30')][_0x3667('0x32')]?_0xa5865b[_0x3667('0x30')]:_0x179aab[_0x3667('0x2b')];if(_0xaf3e12[_0x3667('0x2c')][_0x3667('0x3d')]){_0xa5865b['include']=[{'all':!![]}];}_0xa5865b=_[_0x3667('0x39')]({},_0xa5865b,_0xaf3e12[_0x3667('0x44')]);return db[_0x3667('0x29')][_0x3667('0x45')](_0xa5865b)[_0x3667('0x23')](handleEntityNotFound(_0x527ed3,null))[_0x3667('0x23')](respondWithResult(_0x527ed3,null))[_0x3667('0x41')](handleError(_0x527ed3,null));};exports['create']=function(_0x50ddea,_0x75103e){return db[_0x3667('0x29')][_0x3667('0x46')](_0x50ddea[_0x3667('0x47')],{})[_0x3667('0x23')](respondWithResult(_0x75103e,0xc9))[_0x3667('0x41')](handleError(_0x75103e,null));};exports[_0x3667('0x22')]=function(_0x1a2f64,_0x586ea5){if(_0x1a2f64[_0x3667('0x47')]['id']){delete _0x1a2f64[_0x3667('0x47')]['id'];}return db['FaxApplication'][_0x3667('0x45')]({'where':{'id':_0x1a2f64['params']['id']}})[_0x3667('0x23')](handleEntityNotFound(_0x586ea5,null))[_0x3667('0x23')](saveUpdates(_0x1a2f64[_0x3667('0x47')],null))[_0x3667('0x23')](respondWithResult(_0x586ea5,null))[_0x3667('0x41')](handleError(_0x586ea5,null));};exports[_0x3667('0x24')]=function(_0x55b4fd,_0x5da82c){return db[_0x3667('0x29')][_0x3667('0x45')]({'where':{'id':_0x55b4fd[_0x3667('0x43')]['id']}})[_0x3667('0x23')](handleEntityNotFound(_0x5da82c,null))[_0x3667('0x23')](removeEntity(_0x5da82c,null))['catch'](handleError(_0x5da82c,null));};
\ No newline at end of file
+var _0xf5c2=['rows','show','params','attributes','find','catch','create','body','destroy','html-pdf','eml-format','zip-dir','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','status','json','offset','limit','reject','save','update','then','end','sendStatus','error','stack','name','send','index','FaxApplication','model','query','keys','filters','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','options','count','includeAll','findAll'];(function(_0x13ff53,_0x5e1424){var _0x290228=function(_0x3e3133){while(--_0x3e3133){_0x13ff53['push'](_0x13ff53['shift']());}};_0x290228(++_0x5e1424);}(_0xf5c2,0x95));var _0x2f5c=function(_0x5d949e,_0x555707){_0x5d949e=_0x5d949e-0x0;var _0x445c1e=_0xf5c2[_0x5d949e];return _0x445c1e;};'use strict';var pdf=require(_0x2f5c('0x0'));var emlformat=require(_0x2f5c('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x2f5c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2f5c('0x3'));var moment=require(_0x2f5c('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2f5c('0x5'));var util=require('util');var path=require(_0x2f5c('0x6'));var sox=require(_0x2f5c('0x7'));var csv=require(_0x2f5c('0x8'));var ejs=require(_0x2f5c('0x9'));var fs=require('fs');var _=require(_0x2f5c('0xa'));var squel=require(_0x2f5c('0xb'));var crypto=require(_0x2f5c('0xc'));var jsforce=require(_0x2f5c('0xd'));var deskjs=require(_0x2f5c('0xe'));var toCsv=require(_0x2f5c('0x8'));var querystring=require(_0x2f5c('0xf'));var Papa=require('papaparse');var Redis=require(_0x2f5c('0x10'));var authService=require(_0x2f5c('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x2f5c('0x12'));var logger=require(_0x2f5c('0x13'))(_0x2f5c('0x14'));var utils=require(_0x2f5c('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2d4f78,_0x17f055){_0x17f055=_0x17f055||0xcc;return function(_0x1e7343){if(_0x1e7343){return _0x2d4f78['sendStatus'](_0x17f055);}return _0x2d4f78[_0x2f5c('0x16')](_0x17f055)['end']();};}function respondWithResult(_0x576479,_0x10f420){_0x10f420=_0x10f420||0xc8;return function(_0x45827d){if(_0x45827d){return _0x576479['status'](_0x10f420)[_0x2f5c('0x17')](_0x45827d);}};}function respondWithFilteredResult(_0x39cd43,_0x580572){return function(_0x8719a7){if(_0x8719a7){var _0x263e33=_0x8719a7['count'],_0x140e0f=_0x580572[_0x2f5c('0x18')],_0x126d21=_0x580572[_0x2f5c('0x18')]+_0x580572[_0x2f5c('0x19')],_0x50e8eb;if(_0x126d21>=_0x263e33){_0x126d21=_0x263e33;_0x50e8eb=0xc8;}else{_0x50e8eb=0xce;}_0x39cd43['status'](_0x50e8eb);return _0x39cd43['set']('Content-Range',_0x140e0f+'-'+_0x126d21+'/'+_0x263e33)[_0x2f5c('0x17')](_0x8719a7);}return null;};}function patchUpdates(_0x223970){return function(_0x575859){try{jsonpatch['apply'](_0x575859,_0x223970,!![]);}catch(_0x446543){return BPromise[_0x2f5c('0x1a')](_0x446543);}return _0x575859[_0x2f5c('0x1b')]();};}function saveUpdates(_0x1763d1,_0x3cd904){return function(_0x50eaf2){if(_0x50eaf2){return _0x50eaf2[_0x2f5c('0x1c')](_0x1763d1)[_0x2f5c('0x1d')](function(_0x4d721e){return _0x4d721e;});}return null;};}function removeEntity(_0x12587e,_0x24253f){return function(_0x5ecd8a){if(_0x5ecd8a){return _0x5ecd8a['destroy']()[_0x2f5c('0x1d')](function(){_0x12587e['status'](0xcc)[_0x2f5c('0x1e')]();});}};}function handleEntityNotFound(_0x5275ee,_0xede48e){return function(_0x24f870){if(!_0x24f870){_0x5275ee[_0x2f5c('0x1f')](0x194);}return _0x24f870;};}function handleError(_0x3adef6,_0x1eac2c){_0x1eac2c=_0x1eac2c||0x1f4;return function(_0x19e7fd){logger[_0x2f5c('0x20')](_0x19e7fd[_0x2f5c('0x21')]);if(_0x19e7fd[_0x2f5c('0x22')]){delete _0x19e7fd['name'];}_0x3adef6[_0x2f5c('0x16')](_0x1eac2c)[_0x2f5c('0x23')](_0x19e7fd);};}exports[_0x2f5c('0x24')]=function(_0x40e4b7,_0x301d52){var _0x1b8269={},_0x34c8c9={},_0x38e259={'count':0x0,'rows':[]};var _0xf47f0e=db[_0x2f5c('0x25')]['rawAttributes'];_0x34c8c9[_0x2f5c('0x26')]=_['keys'](_0xf47f0e);_0x34c8c9[_0x2f5c('0x27')]=_[_0x2f5c('0x28')](_0x40e4b7['query']);_0x34c8c9[_0x2f5c('0x29')]=_[_0x2f5c('0x2a')](_0x34c8c9['model'],_0x34c8c9[_0x2f5c('0x27')]);_0x1b8269['attributes']=_[_0x2f5c('0x2a')](_0x34c8c9[_0x2f5c('0x26')],qs[_0x2f5c('0x2b')](_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x2b')]));_0x1b8269['attributes']=_0x1b8269['attributes'][_0x2f5c('0x2c')]?_0x1b8269['attributes']:_0x34c8c9[_0x2f5c('0x26')];if(!_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x2d')](_0x2f5c('0x2e'))){_0x1b8269[_0x2f5c('0x19')]=qs[_0x2f5c('0x19')](_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x19')]);_0x1b8269[_0x2f5c('0x18')]=qs[_0x2f5c('0x18')](_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x18')]);}_0x1b8269[_0x2f5c('0x2f')]=qs[_0x2f5c('0x30')](_0x40e4b7[_0x2f5c('0x27')]['sort']);_0x1b8269[_0x2f5c('0x31')]=qs[_0x2f5c('0x29')](_[_0x2f5c('0x32')](_0x40e4b7[_0x2f5c('0x27')],_0x34c8c9[_0x2f5c('0x29')]));if(_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x33')]){_0x1b8269[_0x2f5c('0x31')]=_[_0x2f5c('0x34')](_0x1b8269[_0x2f5c('0x31')],{'$or':_[_0x2f5c('0x35')](_0xf47f0e,function(_0x1c7492){if(_0x1c7492[_0x2f5c('0x36')][_0x2f5c('0x37')]!==_0x2f5c('0x38')){var _0x3517a3={};_0x3517a3[_0x1c7492['field']]={'$like':'%'+_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x33')]+'%'};return _0x3517a3;}})});}_0x1b8269=_[_0x2f5c('0x34')]({},_0x1b8269,_0x40e4b7[_0x2f5c('0x39')]);var _0x4dd618={'where':_0x1b8269[_0x2f5c('0x31')]};return db['FaxApplication'][_0x2f5c('0x3a')](_0x4dd618)[_0x2f5c('0x1d')](function(_0xd66236){_0x38e259['count']=_0xd66236;if(_0x40e4b7[_0x2f5c('0x27')][_0x2f5c('0x3b')]){_0x1b8269['include']=[{'all':!![]}];}return db[_0x2f5c('0x25')][_0x2f5c('0x3c')](_0x1b8269);})['then'](function(_0x1e5bef){_0x38e259[_0x2f5c('0x3d')]=_0x1e5bef;return _0x38e259;})[_0x2f5c('0x1d')](respondWithFilteredResult(_0x301d52,_0x1b8269))['catch'](handleError(_0x301d52,null));};exports[_0x2f5c('0x3e')]=function(_0x1d5326,_0x2b84d0){var _0x3fb111={'raw':!![],'where':{'id':_0x1d5326[_0x2f5c('0x3f')]['id']}},_0x55b3e4={};_0x55b3e4[_0x2f5c('0x26')]=_[_0x2f5c('0x28')](db['FaxApplication']['rawAttributes']);_0x55b3e4[_0x2f5c('0x27')]=_[_0x2f5c('0x28')](_0x1d5326[_0x2f5c('0x27')]);_0x55b3e4[_0x2f5c('0x29')]=_['intersection'](_0x55b3e4[_0x2f5c('0x26')],_0x55b3e4[_0x2f5c('0x27')]);_0x3fb111[_0x2f5c('0x40')]=_[_0x2f5c('0x2a')](_0x55b3e4[_0x2f5c('0x26')],qs[_0x2f5c('0x2b')](_0x1d5326[_0x2f5c('0x27')][_0x2f5c('0x2b')]));_0x3fb111[_0x2f5c('0x40')]=_0x3fb111[_0x2f5c('0x40')][_0x2f5c('0x2c')]?_0x3fb111[_0x2f5c('0x40')]:_0x55b3e4[_0x2f5c('0x26')];if(_0x1d5326[_0x2f5c('0x27')][_0x2f5c('0x3b')]){_0x3fb111['include']=[{'all':!![]}];}_0x3fb111=_['merge']({},_0x3fb111,_0x1d5326['options']);return db[_0x2f5c('0x25')][_0x2f5c('0x41')](_0x3fb111)[_0x2f5c('0x1d')](handleEntityNotFound(_0x2b84d0,null))['then'](respondWithResult(_0x2b84d0,null))[_0x2f5c('0x42')](handleError(_0x2b84d0,null));};exports[_0x2f5c('0x43')]=function(_0x3bf1c0,_0x4f2dec){return db[_0x2f5c('0x25')][_0x2f5c('0x43')](_0x3bf1c0[_0x2f5c('0x44')],{})['then'](respondWithResult(_0x4f2dec,0xc9))[_0x2f5c('0x42')](handleError(_0x4f2dec,null));};exports[_0x2f5c('0x1c')]=function(_0xf62a99,_0xacf9ee){if(_0xf62a99[_0x2f5c('0x44')]['id']){delete _0xf62a99[_0x2f5c('0x44')]['id'];}return db[_0x2f5c('0x25')][_0x2f5c('0x41')]({'where':{'id':_0xf62a99[_0x2f5c('0x3f')]['id']}})[_0x2f5c('0x1d')](handleEntityNotFound(_0xacf9ee,null))['then'](saveUpdates(_0xf62a99['body'],null))[_0x2f5c('0x1d')](respondWithResult(_0xacf9ee,null))[_0x2f5c('0x42')](handleError(_0xacf9ee,null));};exports[_0x2f5c('0x45')]=function(_0x5d0d03,_0x5b2d1b){return db[_0x2f5c('0x25')][_0x2f5c('0x41')]({'where':{'id':_0x5d0d03['params']['id']}})[_0x2f5c('0x1d')](handleEntityNotFound(_0x5b2d1b,null))[_0x2f5c('0x1d')](removeEntity(_0x5b2d1b,null))[_0x2f5c('0x42')](handleError(_0x5b2d1b,null));};
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.model.js b/server/api/faxApplication/faxApplication.model.js
index 319b383..f772cac 100644
--- a/server/api/faxApplication/faxApplication.model.js
+++ b/server/api/faxApplication/faxApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe107=['../../config/logger','api','moment','request-promise','../../config/environment','./faxApplication.attributes','exports','define','FaxApplication','fax_applications','utf8mb4','lodash'];(function(_0x3439dc,_0x5d2041){var _0xd69060=function(_0x3858e8){while(--_0x3858e8){_0x3439dc['push'](_0x3439dc['shift']());}};_0xd69060(++_0x5d2041);}(_0xe107,0xb3));var _0x7e10=function(_0x41a7be,_0x4ea182){_0x41a7be=_0x41a7be-0x0;var _0x4279c0=_0xe107[_0x41a7be];return _0x4279c0;};'use strict';var _=require(_0x7e10('0x0'));var util=require('util');var logger=require(_0x7e10('0x1'))(_0x7e10('0x2'));var moment=require(_0x7e10('0x3'));var BPromise=require('bluebird');var rp=require(_0x7e10('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7e10('0x5'));var attributes=require(_0x7e10('0x6'));module[_0x7e10('0x7')]=function(_0x5be19f,_0x5f1edf){return _0x5be19f[_0x7e10('0x8')](_0x7e10('0x9'),attributes,{'tableName':_0x7e10('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x7e10('0xb'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x0fda=['lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','FaxApplication','fax_applications','utf8mb4'];(function(_0x1cd674,_0x8d3638){var _0x27928f=function(_0x5e3c70){while(--_0x5e3c70){_0x1cd674['push'](_0x1cd674['shift']());}};_0x27928f(++_0x8d3638);}(_0x0fda,0x1a0));var _0xa0fd=function(_0xeabfc8,_0x4c435a){_0xeabfc8=_0xeabfc8-0x0;var _0x340e86=_0x0fda[_0xeabfc8];return _0x340e86;};'use strict';var _=require(_0xa0fd('0x0'));var util=require('util');var logger=require(_0xa0fd('0x1'))(_0xa0fd('0x2'));var moment=require(_0xa0fd('0x3'));var BPromise=require(_0xa0fd('0x4'));var rp=require(_0xa0fd('0x5'));var fs=require('fs');var path=require(_0xa0fd('0x6'));var rimraf=require(_0xa0fd('0x7'));var config=require('../../config/environment');var attributes=require('./faxApplication.attributes');module[_0xa0fd('0x8')]=function(_0x4aec58,_0x49b3c1){return _0x4aec58[_0xa0fd('0x9')](_0xa0fd('0xa'),attributes,{'tableName':_0xa0fd('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xa0fd('0xc'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.rpc.js b/server/api/faxApplication/faxApplication.rpc.js
index 8b0d457..6d1d31f 100644
--- a/server/api/faxApplication/faxApplication.rpc.js
+++ b/server/api/faxApplication/faxApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f9a=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','info','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxApplication,\x20%s,\x20%s','message','request\x20sent','result','catch','UpdateFaxApplication','FaxApplication','update','body','options','raw','attributes','limit','util','moment','bluebird','randomstring'];(function(_0xa2795f,_0x2d5d82){var _0x2ccb64=function(_0x416fc9){while(--_0x416fc9){_0xa2795f['push'](_0xa2795f['shift']());}};_0x2ccb64(++_0x2d5d82);}(_0x5f9a,0x1dc));var _0xa5f9=function(_0x2591b1,_0x3e84e0){_0x2591b1=_0x2591b1-0x0;var _0x4b7d03=_0x5f9a[_0x2591b1];return _0x4b7d03;};'use strict';var _=require('lodash');var util=require(_0xa5f9('0x0'));var moment=require(_0xa5f9('0x1'));var BPromise=require(_0xa5f9('0x2'));var rs=require(_0xa5f9('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa5f9('0x4'))['db'];var utils=require(_0xa5f9('0x5'));var logger=require(_0xa5f9('0x6'))(_0xa5f9('0x7'));var config=require('../../config/environment');var jayson=require(_0xa5f9('0x8'));var client=jayson['client'][_0xa5f9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x332fb6,_0x39a826,_0x51f824){return new BPromise(function(_0x52eb16,_0x24a4cc){return client[_0xa5f9('0xa')](_0x332fb6,_0x51f824)['then'](function(_0x42c013){logger[_0xa5f9('0xb')]('FaxApplication,\x20%s,\x20%s',_0x39a826,'request\x20sent');logger[_0xa5f9('0xc')](_0xa5f9('0xd'),_0x39a826,'request\x20sent',JSON[_0xa5f9('0xe')](_0x42c013));if(_0x42c013[_0xa5f9('0xf')]){if(_0x42c013[_0xa5f9('0xf')][_0xa5f9('0x10')]===0x1f4){logger[_0xa5f9('0xf')](_0xa5f9('0x11'),_0x39a826,_0x42c013[_0xa5f9('0xf')][_0xa5f9('0x12')]);return _0x24a4cc(_0x42c013['error'][_0xa5f9('0x12')]);}logger[_0xa5f9('0xf')](_0xa5f9('0x11'),_0x39a826,_0x42c013['error'][_0xa5f9('0x12')]);return _0x52eb16(_0x42c013[_0xa5f9('0xf')][_0xa5f9('0x12')]);}else{logger[_0xa5f9('0xb')](_0xa5f9('0x11'),_0x39a826,_0xa5f9('0x13'));_0x52eb16(_0x42c013[_0xa5f9('0x14')][_0xa5f9('0x12')]);}})[_0xa5f9('0x15')](function(_0x3ab0a7){logger[_0xa5f9('0xf')](_0xa5f9('0x11'),_0x39a826,_0x3ab0a7);_0x24a4cc(_0x3ab0a7);});});}exports[_0xa5f9('0x16')]=function(_0x1f0a3c){var _0x2499e6=this;return new Promise(function(_0xabf98f,_0x552162){return db[_0xa5f9('0x17')][_0xa5f9('0x18')](_0x1f0a3c[_0xa5f9('0x19')],{'raw':_0x1f0a3c[_0xa5f9('0x1a')]?_0x1f0a3c['options'][_0xa5f9('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1f0a3c['options']?_0x1f0a3c[_0xa5f9('0x1a')]['where']||null:null,'attributes':_0x1f0a3c[_0xa5f9('0x1a')]?_0x1f0a3c[_0xa5f9('0x1a')][_0xa5f9('0x1c')]||null:null,'limit':_0x1f0a3c[_0xa5f9('0x1a')]?_0x1f0a3c[_0xa5f9('0x1a')][_0xa5f9('0x1d')]||null:null})['then'](function(_0x260a91){logger['info'](_0xa5f9('0x16'),_0x1f0a3c);logger[_0xa5f9('0xc')](_0xa5f9('0x16'),_0x1f0a3c,JSON[_0xa5f9('0xe')](_0x260a91));_0xabf98f(_0x260a91);})['catch'](function(_0x4caec8){logger[_0xa5f9('0xf')](_0xa5f9('0x16'),_0x4caec8[_0xa5f9('0x12')],_0x1f0a3c);_0x552162(_0x2499e6[_0xa5f9('0xf')](0x1f4,_0x4caec8[_0xa5f9('0x12')]));});});};
\ No newline at end of file
+var _0x5604=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FaxApplication,\x20%s,\x20%s','debug','FaxApplication,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','FaxApplication','update','body','options','raw','where','attributes','UpdateFaxApplication','stringify','util','moment','randomstring','../../mysqldb','../../config/utils'];(function(_0x82da2,_0x5f0f32){var _0x1b2a2f=function(_0x84472c){while(--_0x84472c){_0x82da2['push'](_0x82da2['shift']());}};_0x1b2a2f(++_0x5f0f32);}(_0x5604,0x1db));var _0x4560=function(_0x51c819,_0xd812db){_0x51c819=_0x51c819-0x0;var _0x15c5d2=_0x5604[_0x51c819];return _0x15c5d2;};'use strict';var _=require('lodash');var util=require(_0x4560('0x0'));var moment=require(_0x4560('0x1'));var BPromise=require('bluebird');var rs=require(_0x4560('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4560('0x3'))['db'];var utils=require(_0x4560('0x4'));var logger=require(_0x4560('0x5'))(_0x4560('0x6'));var config=require(_0x4560('0x7'));var jayson=require(_0x4560('0x8'));var client=jayson[_0x4560('0x9')][_0x4560('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d4c36,_0x5f286a,_0x21c851){return new BPromise(function(_0x239e7f,_0xfaf76){return client[_0x4560('0xb')](_0x1d4c36,_0x21c851)[_0x4560('0xc')](function(_0x408cf8){logger[_0x4560('0xd')](_0x4560('0xe'),_0x5f286a,'request\x20sent');logger[_0x4560('0xf')](_0x4560('0x10'),_0x5f286a,_0x4560('0x11'),JSON['stringify'](_0x408cf8));if(_0x408cf8[_0x4560('0x12')]){if(_0x408cf8[_0x4560('0x12')][_0x4560('0x13')]===0x1f4){logger[_0x4560('0x12')](_0x4560('0xe'),_0x5f286a,_0x408cf8[_0x4560('0x12')][_0x4560('0x14')]);return _0xfaf76(_0x408cf8[_0x4560('0x12')]['message']);}logger[_0x4560('0x12')](_0x4560('0xe'),_0x5f286a,_0x408cf8['error'][_0x4560('0x14')]);return _0x239e7f(_0x408cf8[_0x4560('0x12')][_0x4560('0x14')]);}else{logger[_0x4560('0xd')](_0x4560('0xe'),_0x5f286a,'request\x20sent');_0x239e7f(_0x408cf8[_0x4560('0x15')][_0x4560('0x14')]);}})[_0x4560('0x16')](function(_0x2f92ca){logger[_0x4560('0x12')]('FaxApplication,\x20%s,\x20%s',_0x5f286a,_0x2f92ca);_0xfaf76(_0x2f92ca);});});}exports['UpdateFaxApplication']=function(_0x300010){var _0x359bae=this;return new Promise(function(_0x2e1ee0,_0x391242){return db[_0x4560('0x17')][_0x4560('0x18')](_0x300010[_0x4560('0x19')],{'raw':_0x300010[_0x4560('0x1a')]?_0x300010[_0x4560('0x1a')][_0x4560('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x300010[_0x4560('0x1a')]?_0x300010[_0x4560('0x1a')][_0x4560('0x1c')]||null:null,'attributes':_0x300010[_0x4560('0x1a')]?_0x300010[_0x4560('0x1a')][_0x4560('0x1d')]||null:null,'limit':_0x300010[_0x4560('0x1a')]?_0x300010[_0x4560('0x1a')]['limit']||null:null})[_0x4560('0xc')](function(_0x2eb999){logger[_0x4560('0xd')](_0x4560('0x1e'),_0x300010);logger[_0x4560('0xf')](_0x4560('0x1e'),_0x300010,JSON[_0x4560('0x1f')](_0x2eb999));_0x2e1ee0(_0x2eb999);})['catch'](function(_0x3c675f){logger['error']('UpdateFaxApplication',_0x3c675f[_0x4560('0x14')],_0x300010);_0x391242(_0x359bae[_0x4560('0x12')](0x1f4,_0x3c675f[_0x4560('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/faxApplication/index.js b/server/api/faxApplication/index.js
index cbe8a73..121bfff 100644
--- a/server/api/faxApplication/index.js
+++ b/server/api/faxApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb78e=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxApplication.controller','get','index','/:id','isAuthenticated','show','post','put','update','delete','destroy','exports','multer','util','connect-timeout'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xb78e,0x1c9));var _0xeb78=function(_0x48c943,_0xb3a774){_0x48c943=_0x48c943-0x0;var _0x36507c=_0xb78e[_0x48c943];return _0x36507c;};'use strict';var multer=require(_0xeb78('0x0'));var util=require(_0xeb78('0x1'));var path=require('path');var timeout=require(_0xeb78('0x2'));var express=require(_0xeb78('0x3'));var router=express[_0xeb78('0x4')]();var auth=require(_0xeb78('0x5'));var interaction=require(_0xeb78('0x6'));var config=require(_0xeb78('0x7'));var controller=require(_0xeb78('0x8'));router[_0xeb78('0x9')]('/',auth['isAuthenticated'](),controller[_0xeb78('0xa')]);router[_0xeb78('0x9')](_0xeb78('0xb'),auth[_0xeb78('0xc')](),controller[_0xeb78('0xd')]);router[_0xeb78('0xe')]('/',auth[_0xeb78('0xc')](),controller['create']);router[_0xeb78('0xf')](_0xeb78('0xb'),auth[_0xeb78('0xc')](),controller[_0xeb78('0x10')]);router[_0xeb78('0x11')](_0xeb78('0xb'),auth[_0xeb78('0xc')](),controller[_0xeb78('0x12')]);module[_0xeb78('0x13')]=router;
\ No newline at end of file
+var _0x236c=['exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./faxApplication.controller','get','isAuthenticated','index','show','put','update','delete','/:id'];(function(_0x2a5e6c,_0xaae743){var _0x91e0c8=function(_0x4729cf){while(--_0x4729cf){_0x2a5e6c['push'](_0x2a5e6c['shift']());}};_0x91e0c8(++_0xaae743);}(_0x236c,0x155));var _0xc236=function(_0x4a7c10,_0x1d5961){_0x4a7c10=_0x4a7c10-0x0;var _0x528ac3=_0x236c[_0x4a7c10];return _0x528ac3;};'use strict';var multer=require(_0xc236('0x0'));var util=require('util');var path=require(_0xc236('0x1'));var timeout=require(_0xc236('0x2'));var express=require(_0xc236('0x3'));var router=express[_0xc236('0x4')]();var auth=require(_0xc236('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xc236('0x6'));var controller=require(_0xc236('0x7'));router[_0xc236('0x8')]('/',auth[_0xc236('0x9')](),controller[_0xc236('0xa')]);router[_0xc236('0x8')]('/:id',auth[_0xc236('0x9')](),controller[_0xc236('0xb')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0xc236('0xc')]('/:id',auth[_0xc236('0x9')](),controller[_0xc236('0xd')]);router[_0xc236('0xe')](_0xc236('0xf'),auth[_0xc236('0x9')](),controller['destroy']);module[_0xc236('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.attributes.js b/server/api/faxInteraction/faxInteraction.attributes.js
index 53418e7..ae59434 100644
--- a/server/api/faxInteraction/faxInteraction.attributes.js
+++ b/server/api/faxInteraction/faxInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x365a=['BOOLEAN','DATE','STRING','out','ENUM','sequelize','exports'];(function(_0x20f119,_0x35c1b0){var _0x138cb7=function(_0x367cb2){while(--_0x367cb2){_0x20f119['push'](_0x20f119['shift']());}};_0x138cb7(++_0x35c1b0);}(_0x365a,0x18d));var _0xa365=function(_0x7c32eb,_0x1f7ed1){_0x7c32eb=_0x7c32eb-0x0;var _0x292e91=_0x365a[_0x7c32eb];return _0x292e91;};'use strict';var Sequelize=require(_0xa365('0x0'));module[_0xa365('0x1')]={'closed':{'type':Sequelize[_0xa365('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xa365('0x3')]},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0xa365('0x3')]},'fax':{'type':Sequelize[_0xa365('0x4')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xa365('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xa365('0x3')]},'lastMsgDirection':{'type':Sequelize[_0xa365('0x6')]('in',_0xa365('0x5')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
+var _0xf1b1=['out','sequelize','exports','BOOLEAN','DATE','STRING','ENUM'];(function(_0x18cc1e,_0x541e17){var _0x46a42f=function(_0x53c9be){while(--_0x53c9be){_0x18cc1e['push'](_0x18cc1e['shift']());}};_0x46a42f(++_0x541e17);}(_0xf1b1,0x189));var _0x1f1b=function(_0x42ba3b,_0x355441){_0x42ba3b=_0x42ba3b-0x0;var _0x17634b=_0xf1b1[_0x42ba3b];return _0x17634b;};'use strict';var Sequelize=require(_0x1f1b('0x0'));module[_0x1f1b('0x1')]={'closed':{'type':Sequelize[_0x1f1b('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x1f1b('0x3')]},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x1f1b('0x4')]},'read1stAt':{'type':Sequelize[_0x1f1b('0x3')]},'fax':{'type':Sequelize[_0x1f1b('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x1f1b('0x5')]('in',_0x1f1b('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x1f1b('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x1f1b('0x5')]('in','out'),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.controller.js b/server/api/faxInteraction/faxInteraction.controller.js
index 5b65010..2227f68 100644
--- a/server/api/faxInteraction/faxInteraction.controller.js
+++ b/server/api/faxInteraction/faxInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e0=['localhost','socket.io-emitter','register','sendStatus','status','json','offset','limit','set','apply','save','update','then','end','error','stack','name','send','closed','unreadMessages','count','Users','map','TagIds','split','Tags','push','catch','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','select','field','from','tools_tags','COUNT(*)','fax_messages','where','me.FaxInteractionId\x20=\x20i.id','me.direction\x20=\x20\x27in\x27','u.id','ui.FaxInteractionId','user_has_fax_interactions','left_join','users','u.id\x20=\x20ui.UserId','fax_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','a.id\x20=\x20i.FaxAccountId','expr','advancedFilter','forEach','createdAt','value','dateStart','startOf','day','format','endOf','and','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','isArray','condition','TagId','Messages.count','length','tableAlias','\x20IN\x20?','\x20=\x20?','LIKE','c.firstName','\x20LIKE\x20?','c.lastName','c.email','\x20>\x20?','\x20<\x20?','ContactId','filter','isNil','isEmpty','FaxAccountId','i.FaxAccountId\x20IN\x20?','$lte','null','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','i.fax\x20LIKE\x20?','DESC','group','i.id','Sequelize','QueryTypes','SELECT','clone','read','%s\x20=\x200','toString','having','`Messages.count`\x20=\x200','`Messages.count`\x20>\x200','tag','fax_interaction_has_tags','it.FaxInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','parse','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','it.MailInteractionId\x20=\x20i.id','%s\x20>\x200','sequelize','keyBy','merge','FaxInteraction','Account.key','i.*','Contact.firstName','Contact.lastName','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','groupBy','FaxInteractionId','all','rows','show','params','include','options','create','body','destroy','find','describe','addMessage','FaxMessage','ids','getMessages','findOne','pick','$gte','YYYY-MM-DD\x20HH:mm:ss','findAll','addTags','setTags','omit','spread','color','emit','removeTags','download','unix','files','attachments','join','root','tmp','interaction-%s.zip','Attachment','basename','pipe','createWriteStream','log','html-pdf','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','to-csv','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults'];(function(_0xdea41a,_0x552987){var _0x15d0d8=function(_0x1e0d0b){while(--_0x1e0d0b){_0xdea41a['push'](_0xdea41a['shift']());}};_0x15d0d8(++_0x552987);}(_0x70e0,0x17b));var _0x070e=function(_0x5ade22,_0x3a06f3){_0x5ade22=_0x5ade22-0x0;var _0x2c2337=_0x70e0[_0x5ade22];return _0x2c2337;};'use strict';var pdf=require(_0x070e('0x0'));var emlformat=require(_0x070e('0x1'));var rimraf=require(_0x070e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x070e('0x3'));var moment=require(_0x070e('0x4'));var BPromise=require(_0x070e('0x5'));var Mustache=require(_0x070e('0x6'));var util=require('util');var path=require(_0x070e('0x7'));var sox=require('sox');var csv=require(_0x070e('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x070e('0x9'));var jsforce=require(_0x070e('0xa'));var deskjs=require(_0x070e('0xb'));var toCsv=require(_0x070e('0x8'));var querystring=require(_0x070e('0xc'));var Papa=require(_0x070e('0xd'));var Redis=require(_0x070e('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x070e('0xf'));var logger=require(_0x070e('0x10'))(_0x070e('0x11'));var utils=require(_0x070e('0x12'));var config=require(_0x070e('0x13'));var db=require(_0x070e('0x14'))['db'];config[_0x070e('0x15')]=_[_0x070e('0x16')](config[_0x070e('0x15')],{'host':_0x070e('0x17'),'port':0x18eb});var socket=require(_0x070e('0x18'))(new Redis(config['redis']));require('./faxInteraction.socket')[_0x070e('0x19')](socket);function respondWithStatusCode(_0x56c7ba,_0x4a33d2){_0x4a33d2=_0x4a33d2||0xcc;return function(_0x5bae0f){if(_0x5bae0f){return _0x56c7ba[_0x070e('0x1a')](_0x4a33d2);}return _0x56c7ba[_0x070e('0x1b')](_0x4a33d2)['end']();};}function respondWithResult(_0x5d3a38,_0x373d86){_0x373d86=_0x373d86||0xc8;return function(_0xeae1a5){if(_0xeae1a5){return _0x5d3a38[_0x070e('0x1b')](_0x373d86)[_0x070e('0x1c')](_0xeae1a5);}};}function respondWithFilteredResult(_0x5bc71e,_0x49861b){return function(_0x17e2e4){if(_0x17e2e4){var _0x2bd937=_0x17e2e4['count'],_0x38f6e6=_0x49861b[_0x070e('0x1d')],_0x2060cc=_0x49861b[_0x070e('0x1d')]+_0x49861b[_0x070e('0x1e')],_0x364b3f;if(_0x2060cc>=_0x2bd937){_0x2060cc=_0x2bd937;_0x364b3f=0xc8;}else{_0x364b3f=0xce;}_0x5bc71e[_0x070e('0x1b')](_0x364b3f);return _0x5bc71e[_0x070e('0x1f')]('Content-Range',_0x38f6e6+'-'+_0x2060cc+'/'+_0x2bd937)['json'](_0x17e2e4);}return null;};}function patchUpdates(_0x4e958f){return function(_0x9907cf){try{jsonpatch[_0x070e('0x20')](_0x9907cf,_0x4e958f,!![]);}catch(_0x20dc60){return BPromise['reject'](_0x20dc60);}return _0x9907cf[_0x070e('0x21')]();};}function saveUpdates(_0x5dc5d2,_0xf8dd5d){return function(_0x3f6985){if(_0x3f6985){return _0x3f6985[_0x070e('0x22')](_0x5dc5d2)[_0x070e('0x23')](function(_0x28a1c3){return _0x28a1c3;});}return null;};}function removeEntity(_0xa86797,_0xe405e){return function(_0x164cdf){if(_0x164cdf){return _0x164cdf['destroy']()[_0x070e('0x23')](function(){_0xa86797[_0x070e('0x1b')](0xcc)[_0x070e('0x24')]();});}};}function handleEntityNotFound(_0x503f4d,_0xf17c56){return function(_0x5f3e9d){if(!_0x5f3e9d){_0x503f4d['sendStatus'](0x194);}return _0x5f3e9d;};}function handleError(_0x2ccbd7,_0x25f6e){_0x25f6e=_0x25f6e||0x1f4;return function(_0x41deb1){logger[_0x070e('0x25')](_0x41deb1[_0x070e('0x26')]);if(_0x41deb1['name']){delete _0x41deb1[_0x070e('0x27')];}_0x2ccbd7[_0x070e('0x1b')](_0x25f6e)[_0x070e('0x28')](_0x41deb1);};}function getInteractionUnreadMessages(_0x1d2a34){return new BPromise(function(_0x43dd96,_0x28d7f2){try{if(_0x1d2a34[_0x070e('0x29')]){_0x1d2a34[_0x070e('0x2a')]=0x0;_0x43dd96(_0x1d2a34);}else{return db['FaxMessage'][_0x070e('0x2b')]({'where':{'FaxInteractionId':_0x1d2a34['id'],'direction':'in','read':![]}})[_0x070e('0x23')](function(_0x3a16d0){_0x1d2a34['unreadMessages']=_0x3a16d0;_0x43dd96(_0x1d2a34);});}}catch(_0x5c5f0d){_0x28d7f2(_0x5c5f0d);}});}function getInteractionUsers(_0x13097f,_0x46065c){return new BPromise(function(_0xa6c0ab,_0x51402c){try{if(_0x46065c[_0x13097f['id']]){_0x13097f[_0x070e('0x2c')]=_[_0x070e('0x2d')](_0x46065c[_0x13097f['id']],function(_0x3a9425){return{'id':_0x3a9425['id']};});}}catch(_0x5f2bee){_0x51402c(_0x5f2bee);}_0xa6c0ab(_0x13097f);});}function getInteractionTags(_0x53d473,_0x5bf522){return new BPromise(function(_0x523b75,_0x59c5b4){try{if(_0x53d473[_0x070e('0x2e')]){_0x53d473['Tags']=[];_0x53d473[_0x070e('0x2e')][_0x070e('0x2f')](',')['forEach'](function(_0x47a739){_0x53d473[_0x070e('0x30')][_0x070e('0x31')](_0x5bf522[_0x47a739]);});}delete _0x53d473['TagIds'];}catch(_0x546a16){_0x59c5b4(_0x546a16);}_0x523b75(_0x53d473);});}function updateFaxInteraction(_0x41ade4,_0x27dd1f,_0x444d02){return new BPromise(function(_0x31fdc5,_0x18f0ad){return getInteractionUnreadMessages(_0x41ade4)['then'](function(_0x482cc2){return getInteractionUsers(_0x482cc2,_0x444d02);})[_0x070e('0x23')](function(_0x3011c4){return getInteractionTags(_0x3011c4,_0x27dd1f);})[_0x070e('0x23')](function(_0xf57ed){_0x31fdc5(_0xf57ed);})[_0x070e('0x32')](function(_0x4deaf8){_0x18f0ad(_0x4deaf8);});});}exports[_0x070e('0x33')]=function(_0x1927f4,_0x534150){var _0x2d6bb6={},_0x34746e={},_0x4ba6f0={'count':0x0,'rows':[]};var _0x4d4ee8=db['FaxInteraction'][_0x070e('0x34')];_0x34746e[_0x070e('0x35')]=_[_0x070e('0x36')](_0x4d4ee8);_0x34746e[_0x070e('0x37')]=_[_0x070e('0x36')](_0x1927f4['query']);_0x34746e[_0x070e('0x38')]=_[_0x070e('0x39')](_0x34746e[_0x070e('0x35')],_0x34746e['query']);_0x2d6bb6[_0x070e('0x3a')]=_[_0x070e('0x39')](_0x34746e[_0x070e('0x35')],qs['fields'](_0x1927f4[_0x070e('0x37')][_0x070e('0x3b')]));_0x2d6bb6['attributes']=_0x2d6bb6[_0x070e('0x3a')]['length']?_0x2d6bb6[_0x070e('0x3a')]:_0x34746e[_0x070e('0x35')];if(!_0x1927f4[_0x070e('0x37')][_0x070e('0x3c')](_0x070e('0x3d'))){_0x2d6bb6['limit']=qs[_0x070e('0x1e')](_0x1927f4['query']['limit']);_0x2d6bb6[_0x070e('0x1d')]=qs[_0x070e('0x1d')](_0x1927f4[_0x070e('0x37')]['offset']);}_0x2d6bb6[_0x070e('0x3e')]=qs[_0x070e('0x3f')](_0x1927f4[_0x070e('0x37')][_0x070e('0x3f')]);_0x2d6bb6['where']=qs[_0x070e('0x38')](_['pick'](_0x1927f4['query'],_0x34746e['filters']));var _0x3feb83=[];var _0x926533=squel[_0x070e('0x40')]()[_0x070e('0x41')]('id')[_0x070e('0x41')]('name')[_0x070e('0x41')]('color')[_0x070e('0x42')](_0x070e('0x43'));var _0xff760c=squel['select']()['field'](_0x070e('0x44'))['from'](_0x070e('0x45'),'me')[_0x070e('0x46')](_0x070e('0x47'))['where'](_0x070e('0x48'))[_0x070e('0x46')]('me.read\x20=\x20false');var _0x589b97=squel[_0x070e('0x40')]()[_0x070e('0x41')](_0x070e('0x49'))[_0x070e('0x41')](_0x070e('0x4a'))['from'](_0x070e('0x4b'),'ui')[_0x070e('0x4c')](_0x070e('0x4d'),'u',_0x070e('0x4e'));var _0x79eaa0=squel[_0x070e('0x40')]()[_0x070e('0x42')](_0x070e('0x4f'),'i')[_0x070e('0x4c')](_0x070e('0x50'),'c',_0x070e('0x51'))[_0x070e('0x4c')](_0x070e('0x4d'),'o',_0x070e('0x52'))[_0x070e('0x4c')]('fax_accounts','a',_0x070e('0x53'))[_0x070e('0x4c')](_0x070e('0x45'),'me',_0x070e('0x47'));var _0x2760fc=squel[_0x070e('0x54')]();if(_0x1927f4[_0x070e('0x37')][_0x070e('0x55')]){var _0x31ab81=JSON['parse'](_0x1927f4[_0x070e('0x37')]['advancedFilter']);_[_0x070e('0x36')](_0x31ab81)[_0x070e('0x56')](function(_0x4abbe9){var _0x991d23=_0x31ab81[_0x4abbe9];if(_0x4abbe9===_0x070e('0x57')){var _0x25466f=moment(_0x991d23[_0x070e('0x58')][_0x070e('0x59')])[_0x070e('0x5a')](_0x070e('0x5b'))['utc']()[_0x070e('0x5c')]();var _0x5bacbd=moment(_0x5bacbd)['utc']()[_0x070e('0x5d')](_0x070e('0x5b'))[_0x070e('0x5c')]();_0x2760fc[_0x070e('0x5e')](_0x070e('0x5f'),_0x25466f,_0x5bacbd);}else{if(_[_0x070e('0x60')](_0x991d23[_0x070e('0x61')])){_0x991d23[_0x070e('0x61')]['forEach'](function(_0x477e69){switch(_0x991d23['condition']['value']){case'IS':if(_0x4abbe9!==_0x070e('0x62')&&_0x4abbe9!==_0x070e('0x63')){if(_['isArray'](_0x991d23[_0x070e('0x58')])&&_0x991d23[_0x070e('0x58')][_0x070e('0x64')]>0x1){_0x2760fc[_0x070e('0x5e')](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x66'),_0x991d23[_0x070e('0x58')]);}else{_0x2760fc['and'](_0x991d23['tableAlias']+'.'+_0x4abbe9+'\x20=\x20?',_0x991d23[_0x070e('0x58')][0x0]);}}break;case'=':_0x2760fc[_0x070e('0x5e')](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x67'),_0x991d23['value']);break;case _0x070e('0x68'):if(_0x4abbe9==='ContactId'){_0x2760fc[_0x070e('0x5e')](_0x070e('0x69')+_0x070e('0x6a'),'%'+_0x991d23[_0x070e('0x58')]+'%');_0x2760fc['or'](_0x070e('0x6b')+_0x070e('0x6a'),'%'+_0x991d23['value']+'%');_0x2760fc['or'](_0x070e('0x6c')+_0x070e('0x6a'),'%'+_0x991d23[_0x070e('0x58')]+'%');}else{_0x2760fc['and'](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x6a'),'%'+_0x991d23['value']+'%');}break;case'>':_0x2760fc[_0x070e('0x5e')](_0x991d23['tableAlias']+'.'+_0x4abbe9+_0x070e('0x6d'),_0x991d23['value']);break;case'<':_0x2760fc['and'](_0x991d23['tableAlias']+'.'+_0x4abbe9+_0x070e('0x6e'),_0x991d23[_0x070e('0x58')]);break;}});}else{switch(_0x991d23[_0x070e('0x61')][_0x070e('0x58')]){case'IS':if(_0x4abbe9!==_0x070e('0x62')&&_0x4abbe9!==_0x070e('0x63')){if(_['isArray'](_0x991d23[_0x070e('0x58')])&&_0x991d23['value'][_0x070e('0x64')]>0x1){_0x2760fc['and'](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x66'),_0x991d23['value']);}else{_0x2760fc[_0x070e('0x5e')](_0x991d23['tableAlias']+'.'+_0x4abbe9+_0x070e('0x67'),_0x991d23[_0x070e('0x58')][0x0]);}}break;case'=':_0x2760fc[_0x070e('0x5e')](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x67'),_0x991d23[_0x070e('0x58')]);break;case _0x070e('0x68'):if(_0x4abbe9===_0x070e('0x6f')){_0x2760fc[_0x070e('0x5e')](_0x070e('0x69')+_0x070e('0x6a'),'%'+_0x991d23[_0x070e('0x58')]+'%');_0x2760fc['or'](_0x070e('0x6b')+_0x070e('0x6a'),'%'+_0x991d23['value']+'%');_0x2760fc['or'](_0x070e('0x6c')+_0x070e('0x6a'),'%'+_0x991d23[_0x070e('0x58')]+'%');}else{_0x2760fc[_0x070e('0x5e')](_0x991d23['tableAlias']+'.'+_0x4abbe9+_0x070e('0x6a'),'%'+_0x991d23[_0x070e('0x58')]+'%');}break;case'>':_0x2760fc[_0x070e('0x5e')](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x6d'),_0x991d23[_0x070e('0x58')]);break;case'<':_0x2760fc['and'](_0x991d23[_0x070e('0x65')]+'.'+_0x4abbe9+_0x070e('0x6e'),_0x991d23[_0x070e('0x58')]);break;}}}});}else{var _0x2fe202=_(Object['keys'](_0x1927f4[_0x070e('0x37')]))['map'](function(_0x10d95d){return _0x4d4ee8[_0x070e('0x3c')](_0x10d95d)?_0x10d95d:undefined;})[_0x070e('0x70')](function(_0x150bf6){return!_[_0x070e('0x71')](_0x150bf6);})['value']();if(!_[_0x070e('0x72')](_0x2fe202)){_0x2fe202[_0x070e('0x56')](function(_0x8cc913){if(_0x8cc913===_0x070e('0x73')){_0x79eaa0['where'](_0x070e('0x74'),[]['concat'](_0x1927f4[_0x070e('0x37')][_0x8cc913]));}else if(_0x8cc913===_0x070e('0x57')){var _0x1214d2=JSON['parse'](_0x1927f4[_0x070e('0x37')][_0x8cc913])['$gte'];var _0x1e6e6a=JSON['parse'](_0x1927f4[_0x070e('0x37')][_0x8cc913])[_0x070e('0x75')];_0x79eaa0['where'](_0x070e('0x5f'),_0x1214d2,_0x1e6e6a);}else{if(_0x1927f4['query'][_0x8cc913]===_0x070e('0x76')){_0x79eaa0[_0x070e('0x46')]('i.'+_0x8cc913+'\x20IS\x20NULL');}else{_0x79eaa0['where']('i.'+_0x8cc913+_0x070e('0x67'),_0x1927f4[_0x070e('0x37')][_0x8cc913]);}}});}if(_0x1927f4[_0x070e('0x37')][_0x070e('0x70')]){var _0x25f1d0=_0x1927f4[_0x070e('0x37')][_0x070e('0x70')][_0x070e('0x77')]('\x5c','\x5c\x5c')[_0x070e('0x77')]('\x27\x27',_0x070e('0x78'));if(qs[_0x070e('0x79')](_0x25f1d0)){_0x2760fc['or'](_0x070e('0x7a'),_0x25f1d0+'%')['or'](_0x070e('0x7b'),_0x25f1d0+'%');}_0x2760fc['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x25f1d0+'%');}}_0x79eaa0[_0x070e('0x46')](_0x2760fc);if(_0x2d6bb6[_0x070e('0x3e')]){_0x2d6bb6['order']['forEach'](function(_0x1916f4){_0x79eaa0[_0x070e('0x3e')]('i.'+_0x1916f4[0x0],_0x1916f4[0x1]===_0x070e('0x7c')?![]:!![]);});}_0x79eaa0[_0x070e('0x7d')](_0x070e('0x7e'));var _0x12fe4f={'type':db[_0x070e('0x7f')][_0x070e('0x80')][_0x070e('0x81')],'raw':!![]};var _0x2c80e3=_0x79eaa0[_0x070e('0x82')]()[_0x070e('0x41')](_0x070e('0x44'));if(!_0x1927f4['query']['advancedFilter']){if(_0x1927f4['query'][_0x070e('0x83')]){if(_0x1927f4[_0x070e('0x37')][_0x070e('0x83')]==0x1){_0x2c80e3[_0x070e('0x46')](util['format'](_0x070e('0x84'),_0xff760c[_0x070e('0x85')]()));_0x79eaa0[_0x070e('0x86')](_0x070e('0x87'));}else{_0x2c80e3[_0x070e('0x46')](util[_0x070e('0x5c')]('%s\x20>\x200',_0xff760c[_0x070e('0x85')]()));_0x79eaa0['having'](_0x070e('0x88'));}}if(_0x1927f4[_0x070e('0x37')][_0x070e('0x89')]){var _0x3aa620=_[_0x070e('0x60')](_0x1927f4['query'][_0x070e('0x89')])?_0x1927f4[_0x070e('0x37')]['tag']:new Array(_0x1927f4[_0x070e('0x37')][_0x070e('0x89')]);var _0x553ea1=squel[_0x070e('0x54')]();_0x3aa620[_0x070e('0x56')](function(_0xf0aef8){_0x553ea1['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0xf0aef8+',%');});_0x79eaa0[_0x070e('0x86')](_0x553ea1);_0x2c80e3[_0x070e('0x4c')](_0x070e('0x8a'),'it',_0x070e('0x8b'));_0x2c80e3[_0x070e('0x4c')](_0x070e('0x43'),'t',_0x070e('0x8c'));_0x2c80e3[_0x070e('0x46')](_0x070e('0x8d'),_0x3aa620);}}else{var _0x31ab81=JSON[_0x070e('0x8e')](_0x1927f4[_0x070e('0x37')][_0x070e('0x55')]);_['keys'](_0x31ab81)[_0x070e('0x56')](function(_0x2df184){var _0x392c45=_0x31ab81[_0x2df184];if(_0x2df184===_0x070e('0x62')){var _0x1dceda=_0x392c45[_0x070e('0x58')];var _0x5c4352=squel['expr']();_0x1dceda['forEach'](function(_0x3c9abf){_0x5c4352['or'](_0x070e('0x8f'),'%,'+_0x3c9abf+',%');});_0x79eaa0[_0x070e('0x86')](_0x5c4352);_0x2c80e3[_0x070e('0x4c')]('mail_interaction_has_tags','it',_0x070e('0x90'));_0x2c80e3[_0x070e('0x4c')](_0x070e('0x43'),'t','t.id\x20=\x20it.TagId');_0x2c80e3[_0x070e('0x46')]('t.id\x20IN\x20?',_0x1dceda);}else if(_0x2df184===_0x070e('0x63')){if(_0x392c45[_0x070e('0x58')]['length']===0x1){if(_0x392c45['value'][0x0]===0x1){_0x2c80e3[_0x070e('0x46')](util[_0x070e('0x5c')]('%s\x20=\x200',_0xff760c[_0x070e('0x85')]()));_0x79eaa0['having']('`Messages.count`\x20=\x200');}else{_0x2c80e3['where'](util[_0x070e('0x5c')](_0x070e('0x91'),_0xff760c[_0x070e('0x85')]()));_0x79eaa0[_0x070e('0x86')](_0x070e('0x88'));}}}});}db[_0x070e('0x92')][_0x070e('0x37')](_0x2c80e3[_0x070e('0x85')](),_0x12fe4f)[_0x070e('0x23')](function(_0xdcc60a){_0x4ba6f0[_0x070e('0x2b')]=_0xdcc60a[_0x070e('0x64')];if(_0x4ba6f0[_0x070e('0x2b')]===0x0)return[];return db[_0x070e('0x92')][_0x070e('0x37')](_0x926533[_0x070e('0x85')](),_0x12fe4f)[_0x070e('0x23')](function(_0x3f9e15){_0x3feb83=_[_0x070e('0x93')](_0x3f9e15,'id');_0x12fe4f=_[_0x070e('0x94')](_0x12fe4f,{'model':db[_0x070e('0x95')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x79eaa0[_0x070e('0x41')]('a.key',_0x070e('0x96'));_0x79eaa0[_0x070e('0x41')](_0x070e('0x97'));_0x79eaa0[_0x070e('0x41')]('c.firstName',_0x070e('0x98'));_0x79eaa0[_0x070e('0x41')](_0x070e('0x6b'),_0x070e('0x99'));_0x79eaa0[_0x070e('0x41')](_0x070e('0x6c'),'Contact.email');_0x79eaa0['field']('c.phone',_0x070e('0x9a'));_0x79eaa0['field'](_0x070e('0x9b'),_0x070e('0x9c'));_0x79eaa0['field'](_0x070e('0x9d'),_0x070e('0x9e'));_0x79eaa0['field']('GROUP_CONCAT(DISTINCT\x20t.id)',_0x070e('0x2e'));_0x79eaa0[_0x070e('0x4c')](_0x070e('0x8a'),'it',_0x070e('0x8b'));_0x79eaa0[_0x070e('0x4c')]('tools_tags','t',_0x070e('0x8c'));_0x79eaa0['limit'](_0x2d6bb6[_0x070e('0x1e')]);_0x79eaa0[_0x070e('0x1d')](_0x2d6bb6['offset']);return db[_0x070e('0x92')][_0x070e('0x37')](_0x79eaa0[_0x070e('0x85')](),_0x12fe4f);})[_0x070e('0x23')](function(_0x174ca6){_0x589b97[_0x070e('0x46')]('ui.FaxInteractionId\x20IN\x20?',_[_0x070e('0x2d')](_0x174ca6,'id'));return db[_0x070e('0x92')][_0x070e('0x37')](_0x589b97[_0x070e('0x85')](),_0x12fe4f)[_0x070e('0x23')](function(_0x4b3282){var _0x2531f7=_[_0x070e('0x9f')](_0x4b3282,_0x070e('0xa0'));var _0x350c28=[];_0x174ca6[_0x070e('0x56')](function(_0x31ceee){_0x350c28[_0x070e('0x31')](updateFaxInteraction(_0x31ceee,_0x3feb83,_0x2531f7));});return BPromise[_0x070e('0xa1')](_0x350c28);});});})[_0x070e('0x23')](function(_0xfe61be){_0x4ba6f0[_0x070e('0xa2')]=_0xfe61be;return _0x4ba6f0;})[_0x070e('0x23')](respondWithFilteredResult(_0x534150,_0x2d6bb6))[_0x070e('0x32')](handleError(_0x534150,null));};exports[_0x070e('0xa3')]=function(_0xf0fde5,_0x3ecfe5){var _0x4df50c={'raw':![],'where':{'id':_0xf0fde5[_0x070e('0xa4')]['id']}},_0x48fe1d={};_0x48fe1d[_0x070e('0x35')]=_['keys'](db['FaxInteraction']['rawAttributes']);_0x48fe1d['query']=_[_0x070e('0x36')](_0xf0fde5[_0x070e('0x37')]);_0x48fe1d[_0x070e('0x38')]=_[_0x070e('0x39')](_0x48fe1d[_0x070e('0x35')],_0x48fe1d[_0x070e('0x37')]);_0x4df50c[_0x070e('0x3a')]=_[_0x070e('0x39')](_0x48fe1d[_0x070e('0x35')],qs[_0x070e('0x3b')](_0xf0fde5['query'][_0x070e('0x3b')]));_0x4df50c[_0x070e('0x3a')]=_0x4df50c['attributes'][_0x070e('0x64')]?_0x4df50c[_0x070e('0x3a')]:_0x48fe1d[_0x070e('0x35')];if(_0xf0fde5[_0x070e('0x37')]['includeAll']){_0x4df50c[_0x070e('0xa5')]=[{'all':!![]}];}_0x4df50c=_[_0x070e('0x94')]({},_0x4df50c,_0xf0fde5[_0x070e('0xa6')]);return db[_0x070e('0x95')]['find'](_0x4df50c)[_0x070e('0x23')](handleEntityNotFound(_0x3ecfe5,null))[_0x070e('0x23')](respondWithResult(_0x3ecfe5,null))[_0x070e('0x32')](handleError(_0x3ecfe5,null));};exports[_0x070e('0xa7')]=function(_0xdb8036,_0x27b51c){return db[_0x070e('0x95')][_0x070e('0xa7')](_0xdb8036[_0x070e('0xa8')],{})[_0x070e('0x23')](respondWithResult(_0x27b51c,0xc9))[_0x070e('0x32')](handleError(_0x27b51c,null));};exports['update']=function(_0x25aac7,_0x2b5210){if(_0x25aac7['body']['id']){delete _0x25aac7['body']['id'];}return db[_0x070e('0x95')]['find']({'where':{'id':_0x25aac7[_0x070e('0xa4')]['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x2b5210,null))[_0x070e('0x23')](saveUpdates(_0x25aac7[_0x070e('0xa8')],null))[_0x070e('0x23')](respondWithResult(_0x2b5210,null))[_0x070e('0x32')](handleError(_0x2b5210,null));};exports[_0x070e('0xa9')]=function(_0x5186d8,_0x20493c){return db[_0x070e('0x95')][_0x070e('0xaa')]({'where':{'id':_0x5186d8[_0x070e('0xa4')]['id']}})['then'](handleEntityNotFound(_0x20493c,null))['then'](removeEntity(_0x20493c,null))[_0x070e('0x32')](handleError(_0x20493c,null));};exports[_0x070e('0xab')]=function(_0x2e92f0,_0x5b727f){return db[_0x070e('0x95')][_0x070e('0xab')]()['then'](respondWithResult(_0x5b727f,null))[_0x070e('0x32')](handleError(_0x5b727f,null));};exports[_0x070e('0xac')]=function(_0x7af3cd,_0x33009c,_0x2ea3ae){return db[_0x070e('0xad')]['find']({'where':{'id':_0x7af3cd['params']['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x33009c,null))['then'](function(_0xc7f214){if(_0xc7f214){return _0xc7f214[_0x070e('0xac')](_0x7af3cd['body'][_0x070e('0xae')],_['omit'](_0x7af3cd[_0x070e('0xa8')],[_0x070e('0xae'),'id'])||{});}})[_0x070e('0x23')](respondWithResult(_0x33009c,null))[_0x070e('0x32')](handleError(_0x33009c,null));};exports[_0x070e('0xaf')]=function(_0x21ffd6,_0x5b30df,_0x434723){var _0x406e44={'raw':![],'where':{}};var _0x58434f={};var _0x4d275a={'count':0x0,'rows':[]};return db[_0x070e('0x95')][_0x070e('0xb0')]({'where':{'id':_0x21ffd6[_0x070e('0xa4')]['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x5b30df,null))[_0x070e('0x23')](function(_0x3e2c30){if(_0x3e2c30){_0x58434f[_0x070e('0x35')]=_[_0x070e('0x36')](db['FaxMessage'][_0x070e('0x34')]);_0x58434f[_0x070e('0x37')]=_[_0x070e('0x36')](_0x21ffd6[_0x070e('0x37')]);_0x58434f[_0x070e('0x38')]=_[_0x070e('0x39')](_0x58434f[_0x070e('0x35')],_0x58434f[_0x070e('0x37')]);_0x406e44['attributes']=_[_0x070e('0x39')](_0x58434f[_0x070e('0x35')],qs[_0x070e('0x3b')](_0x21ffd6[_0x070e('0x37')][_0x070e('0x3b')]));_0x406e44[_0x070e('0x3a')]=_0x406e44[_0x070e('0x3a')][_0x070e('0x64')]?_0x406e44[_0x070e('0x3a')]:_0x58434f[_0x070e('0x35')];if(!_0x21ffd6['query']['hasOwnProperty'](_0x070e('0x3d'))){_0x406e44[_0x070e('0x1e')]=qs[_0x070e('0x1e')](_0x21ffd6['query'][_0x070e('0x1e')]);_0x406e44[_0x070e('0x1d')]=qs['offset'](_0x21ffd6[_0x070e('0x37')][_0x070e('0x1d')]);}_0x406e44[_0x070e('0x3e')]=qs[_0x070e('0x3f')](_0x21ffd6[_0x070e('0x37')][_0x070e('0x3f')]);_0x406e44['where']=qs['filters'](_[_0x070e('0xb1')](_0x21ffd6[_0x070e('0x37')],_0x58434f['filters']));_0x406e44[_0x070e('0x46')][_0x070e('0xa0')]=_0x3e2c30['id'];if(_0x21ffd6[_0x070e('0x37')][_0x070e('0x70')]){_0x406e44[_0x070e('0x46')]=_[_0x070e('0x94')](_0x406e44['where'],{'$or':_[_0x070e('0x2d')](_0x406e44[_0x070e('0x3a')],function(_0x5d7a66){var _0x44ab7c={};_0x44ab7c[_0x5d7a66]={'$like':'%'+_0x21ffd6[_0x070e('0x37')][_0x070e('0x70')]+'%'};return _0x44ab7c;})});}if(_0x21ffd6[_0x070e('0x37')]['$gte']){var _0x4c621a=_0x21ffd6[_0x070e('0x37')][_0x070e('0xb2')][_0x070e('0x2f')](',');var _0x326948={};_0x326948[_0x4c621a[0x0]]={'$gte':moment(_0x4c621a[0x1])[_0x070e('0x5c')](_0x070e('0xb3'))};_0x406e44[_0x070e('0x46')]=_[_0x070e('0x94')](_0x406e44[_0x070e('0x46')],_0x326948);}_0x406e44=_[_0x070e('0x94')]({},_0x406e44,_0x21ffd6['options']);return db[_0x070e('0xad')][_0x070e('0x2b')]({'where':_0x406e44[_0x070e('0x46')]})[_0x070e('0x23')](function(_0x49f3df){_0x4d275a[_0x070e('0x2b')]=_0x49f3df;if(_0x21ffd6[_0x070e('0x37')]['includeAll']){_0x406e44['include']=[{'all':!![]}];}return db[_0x070e('0xad')][_0x070e('0xb4')](_0x406e44);})[_0x070e('0x23')](function(_0x5f0d6a){_0x4d275a[_0x070e('0xa2')]=_0x5f0d6a;return _0x4d275a;});}})[_0x070e('0x23')](respondWithFilteredResult(_0x5b30df,_0x406e44))[_0x070e('0x32')](handleError(_0x5b30df,null));};exports[_0x070e('0xb5')]=function(_0x34b5ae,_0x5605da,_0x271bb9){return db[_0x070e('0x95')]['find']({'where':{'id':_0x34b5ae[_0x070e('0xa4')]['id']}})['then'](handleEntityNotFound(_0x5605da,null))['then'](function(_0x48b0aa){if(_0x48b0aa){return _0x48b0aa[_0x070e('0xb6')](_0x34b5ae[_0x070e('0xa8')][_0x070e('0xae')],_[_0x070e('0xb7')](_0x34b5ae['body'],[_0x070e('0xae'),'id'])||{})[_0x070e('0xb8')](function(){return db['Tag'][_0x070e('0xb4')]({'attributes':['id',_0x070e('0x27'),_0x070e('0xb9')],'where':{'id':_0x34b5ae[_0x070e('0xa8')][_0x070e('0xae')]}});})[_0x070e('0x23')](function(_0x50fbb4){socket[_0x070e('0xba')]('faxInteractionTags:save',{'id':Number(_0x34b5ae[_0x070e('0xa4')]['id']),'tags':_0x50fbb4||[]});return{'id':Number(_0x34b5ae[_0x070e('0xa4')]['id']),'tags':_0x50fbb4||[]};});}})[_0x070e('0x23')](respondWithResult(_0x5605da,null))['catch'](handleError(_0x5605da,null));};exports[_0x070e('0xbb')]=function(_0x458f92,_0x13f444,_0x5dabff){return db[_0x070e('0x95')][_0x070e('0xaa')]({'where':{'id':_0x458f92['params']['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x13f444,null))[_0x070e('0x23')](function(_0x478e5b){if(_0x478e5b){return _0x478e5b['removeTags'](_0x458f92['query']['ids']);}})[_0x070e('0x23')](respondWithStatusCode(_0x13f444,null))[_0x070e('0x32')](handleError(_0x13f444,null));};exports[_0x070e('0xbc')]=function(_0x277ca5,_0x1204d7){var _0x6ecdb1=moment()[_0x070e('0xbd')]()[_0x070e('0x85')]();var _0x569425=path['join'](config['root'],'server',_0x070e('0xbe'),_0x070e('0xbf'));var _0x28208d=path[_0x070e('0xc0')](config[_0x070e('0xc1')],'server','files',_0x070e('0xc2'));var _0x3de3eb=path['join'](_0x28208d,_0x6ecdb1);var _0xb73d95=util[_0x070e('0x5c')](_0x070e('0xc3'),_0x6ecdb1);var _0x75ea53=path[_0x070e('0xc0')](_0x28208d,_0xb73d95);var _0x15b1f6=![];return db['FaxInteraction'][_0x070e('0xaa')]({'where':{'id':_0x277ca5[_0x070e('0xa4')]['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x1204d7,null))['then'](function(_0x2d6a3d){if(_0x2d6a3d){return _0x2d6a3d[_0x070e('0xaf')]({'attributes':['id',_0x070e('0xa8'),_0x070e('0x57')],'include':[{'model':db['Attachment'],'as':_0x070e('0xc4')}]});}return[];})[_0x070e('0x23')](function(_0x490ad3){_0x15b1f6=_0x490ad3[_0x070e('0x64')];if(_0x490ad3[_0x070e('0x64')]){fs['mkdirSync'](_0x3de3eb);for(var _0x369de9=0x0;_0x369de9<_0x490ad3['length'];_0x369de9++){var _0x438384=_0x490ad3[_0x369de9];var _0x54f8d3=_0x438384[_0x070e('0xc4')];if(_0x54f8d3){var _0x49f218=path['join'](_0x569425,_0x54f8d3[_0x070e('0xc5')]);if(fs['existsSync'](_0x49f218)){fs['createReadStream'](_0x49f218)[_0x070e('0xc6')](fs[_0x070e('0xc7')](path[_0x070e('0xc0')](_0x3de3eb,_0x54f8d3[_0x070e('0xc5')])));}}}}})[_0x070e('0x23')](function(){if(_0x15b1f6){return new BPromise(function(_0x5413dc,_0x29e1f8){zipdir(_0x3de3eb,{'saveTo':_0x75ea53},function(_0x1c084b,_0x203989){if(_0x1c084b)return _0x29e1f8(_0x1c084b);return _0x5413dc(_0x203989);});});}})[_0x070e('0x23')](function(){if(_0x15b1f6){return new BPromise(function(_0x41a292,_0x300a75){rimraf(_0x3de3eb,function(_0x4f44be){if(_0x4f44be)_0x300a75(_0x4f44be);return _0x41a292();});});}})[_0x070e('0x23')](function(){if(_0x15b1f6){return _0x1204d7[_0x070e('0xbc')](_0x75ea53,_0xb73d95,function(_0x6aca88){if(_0x6aca88){console[_0x070e('0xc8')]('err',_0x6aca88);}else{fs['unlinkSync'](_0x75ea53);}});}else{return _0x1204d7[_0x070e('0x1a')](0xc8);}})[_0x070e('0x32')](handleError(_0x1204d7,null));};
\ No newline at end of file
+var _0xaa88=['cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','users','fax_accounts','expr','advancedFilter','parse','createdAt','startOf','utc','format','endOf','day','and','condition','TagId','Messages.count','isArray','value','\x20=\x20?','c.firstName','\x20LIKE\x20?','tableAlias','\x20>\x20?','\x20IN\x20?','LIKE','ContactId','c.lastName','c.email','\x20<\x20?','map','filter','isNil','FaxAccountId','i.FaxAccountId\x20IN\x20?','concat','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20IS\x20NULL','replace','i.id\x20LIKE\x20?','i.fax\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','DESC','group','Sequelize','QueryTypes','SELECT','clone','read','toString','having','`Messages.count`\x20=\x200','`Messages.count`\x20>\x200','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','fax_interaction_has_tags','it.FaxInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','mail_interaction_has_tags','it.MailInteractionId\x20=\x20i.id','t.id\x20IN\x20?','%s\x20=\x200','%s\x20>\x200','sequelize','keyBy','merge','Account.key','i.*','Contact.firstName','Contact.email','c.phone','Contact.phone','c.mobile','c.fax','ui.FaxInteractionId\x20IN\x20?','groupBy','FaxInteractionId','rows','show','rawAttributes','includeAll','include','find','create','body','params','describe','ids','omit','getMessages','findOne','sort','YYYY-MM-DD\x20HH:mm:ss','options','findAll','addTags','spread','Tag','emit','removeTags','download','unix','join','server','files','root','interaction-%s.zip','Attachment','mkdirSync','createReadStream','pipe','createWriteStream','basename','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','defaults','redis','localhost','./faxInteraction.socket','register','status','end','json','count','offset','limit','set','apply','reject','then','sendStatus','stack','name','send','unreadMessages','FaxMessage','Users','TagIds','Tags','split','forEach','push','catch','index','FaxInteraction','model','keys','filters','intersection','query','fields','attributes','length','hasOwnProperty','nolimit','order','pick','select','field','color','from','tools_tags','COUNT(*)','fax_messages','where','me.FaxInteractionId\x20=\x20i.id','me.direction\x20=\x20\x27in\x27','ui.FaxInteractionId','fax_interactions','left_join'];(function(_0x4344e9,_0x2b0c07){var _0x3322b4=function(_0x58a597){while(--_0x58a597){_0x4344e9['push'](_0x4344e9['shift']());}};_0x3322b4(++_0x2b0c07);}(_0xaa88,0x137));var _0x8aa8=function(_0x592df4,_0x4e719b){_0x592df4=_0x592df4-0x0;var _0x3b4fe4=_0xaa88[_0x592df4];return _0x3b4fe4;};'use strict';var pdf=require(_0x8aa8('0x0'));var emlformat=require(_0x8aa8('0x1'));var rimraf=require(_0x8aa8('0x2'));var zipdir=require(_0x8aa8('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8aa8('0x4'));var moment=require(_0x8aa8('0x5'));var BPromise=require(_0x8aa8('0x6'));var Mustache=require(_0x8aa8('0x7'));var util=require(_0x8aa8('0x8'));var path=require(_0x8aa8('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8aa8('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x8aa8('0xb'));var crypto=require(_0x8aa8('0xc'));var jsforce=require(_0x8aa8('0xd'));var deskjs=require(_0x8aa8('0xe'));var toCsv=require('to-csv');var querystring=require(_0x8aa8('0xf'));var Papa=require(_0x8aa8('0x10'));var Redis=require(_0x8aa8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x8aa8('0x12'));var hardwareService=require(_0x8aa8('0x13'));var logger=require(_0x8aa8('0x14'))(_0x8aa8('0x15'));var utils=require('../../config/utils');var config=require(_0x8aa8('0x16'));var db=require(_0x8aa8('0x17'))['db'];config['redis']=_[_0x8aa8('0x18')](config[_0x8aa8('0x19')],{'host':_0x8aa8('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8aa8('0x19')]));require(_0x8aa8('0x1b'))[_0x8aa8('0x1c')](socket);function respondWithStatusCode(_0x4b686e,_0x391642){_0x391642=_0x391642||0xcc;return function(_0x4af534){if(_0x4af534){return _0x4b686e['sendStatus'](_0x391642);}return _0x4b686e[_0x8aa8('0x1d')](_0x391642)[_0x8aa8('0x1e')]();};}function respondWithResult(_0xae81a0,_0xa6c2af){_0xa6c2af=_0xa6c2af||0xc8;return function(_0x42a6a4){if(_0x42a6a4){return _0xae81a0[_0x8aa8('0x1d')](_0xa6c2af)[_0x8aa8('0x1f')](_0x42a6a4);}};}function respondWithFilteredResult(_0xd59fb8,_0x20d303){return function(_0x4e8ce3){if(_0x4e8ce3){var _0x4843f5=_0x4e8ce3[_0x8aa8('0x20')],_0x2c1b9a=_0x20d303['offset'],_0x49d80d=_0x20d303[_0x8aa8('0x21')]+_0x20d303[_0x8aa8('0x22')],_0x557adc;if(_0x49d80d>=_0x4843f5){_0x49d80d=_0x4843f5;_0x557adc=0xc8;}else{_0x557adc=0xce;}_0xd59fb8[_0x8aa8('0x1d')](_0x557adc);return _0xd59fb8[_0x8aa8('0x23')]('Content-Range',_0x2c1b9a+'-'+_0x49d80d+'/'+_0x4843f5)[_0x8aa8('0x1f')](_0x4e8ce3);}return null;};}function patchUpdates(_0x36c445){return function(_0x2825fd){try{jsonpatch[_0x8aa8('0x24')](_0x2825fd,_0x36c445,!![]);}catch(_0x4c754e){return BPromise[_0x8aa8('0x25')](_0x4c754e);}return _0x2825fd['save']();};}function saveUpdates(_0x26cf63,_0x4cc455){return function(_0x1fdadd){if(_0x1fdadd){return _0x1fdadd['update'](_0x26cf63)[_0x8aa8('0x26')](function(_0x557e4e){return _0x557e4e;});}return null;};}function removeEntity(_0x65945b,_0x40adb5){return function(_0x3ca7dc){if(_0x3ca7dc){return _0x3ca7dc['destroy']()[_0x8aa8('0x26')](function(){_0x65945b[_0x8aa8('0x1d')](0xcc)[_0x8aa8('0x1e')]();});}};}function handleEntityNotFound(_0x547a7b,_0x57acd2){return function(_0x2d1508){if(!_0x2d1508){_0x547a7b[_0x8aa8('0x27')](0x194);}return _0x2d1508;};}function handleError(_0x2f91f3,_0x3a3c7a){_0x3a3c7a=_0x3a3c7a||0x1f4;return function(_0x24143e){logger['error'](_0x24143e[_0x8aa8('0x28')]);if(_0x24143e['name']){delete _0x24143e[_0x8aa8('0x29')];}_0x2f91f3[_0x8aa8('0x1d')](_0x3a3c7a)[_0x8aa8('0x2a')](_0x24143e);};}function getInteractionUnreadMessages(_0x519ac0){return new BPromise(function(_0x4c5c5c,_0x10810d){try{if(_0x519ac0['closed']){_0x519ac0[_0x8aa8('0x2b')]=0x0;_0x4c5c5c(_0x519ac0);}else{return db[_0x8aa8('0x2c')][_0x8aa8('0x20')]({'where':{'FaxInteractionId':_0x519ac0['id'],'direction':'in','read':![]}})[_0x8aa8('0x26')](function(_0xe07a83){_0x519ac0['unreadMessages']=_0xe07a83;_0x4c5c5c(_0x519ac0);});}}catch(_0x267f4c){_0x10810d(_0x267f4c);}});}function getInteractionUsers(_0x3003e5,_0x4b67f5){return new BPromise(function(_0x99f74e,_0xee2f61){try{if(_0x4b67f5[_0x3003e5['id']]){_0x3003e5[_0x8aa8('0x2d')]=_['map'](_0x4b67f5[_0x3003e5['id']],function(_0x28182b){return{'id':_0x28182b['id']};});}}catch(_0x3a0dce){_0xee2f61(_0x3a0dce);}_0x99f74e(_0x3003e5);});}function getInteractionTags(_0x23a37c,_0x423b02){return new BPromise(function(_0x1313f8,_0x356be7){try{if(_0x23a37c[_0x8aa8('0x2e')]){_0x23a37c[_0x8aa8('0x2f')]=[];_0x23a37c[_0x8aa8('0x2e')][_0x8aa8('0x30')](',')[_0x8aa8('0x31')](function(_0x5bf1a7){_0x23a37c['Tags'][_0x8aa8('0x32')](_0x423b02[_0x5bf1a7]);});}delete _0x23a37c[_0x8aa8('0x2e')];}catch(_0x201d8d){_0x356be7(_0x201d8d);}_0x1313f8(_0x23a37c);});}function updateFaxInteraction(_0x106ccb,_0xbe7639,_0x2f27cd){return new BPromise(function(_0x4b6f91,_0x4b8118){return getInteractionUnreadMessages(_0x106ccb)[_0x8aa8('0x26')](function(_0x5755b5){return getInteractionUsers(_0x5755b5,_0x2f27cd);})[_0x8aa8('0x26')](function(_0x2c5c84){return getInteractionTags(_0x2c5c84,_0xbe7639);})[_0x8aa8('0x26')](function(_0x59041c){_0x4b6f91(_0x59041c);})[_0x8aa8('0x33')](function(_0x38b8d4){_0x4b8118(_0x38b8d4);});});}exports[_0x8aa8('0x34')]=function(_0x5c28fa,_0x526779){var _0x22b511={},_0x1f90fc={},_0x52f87d={'count':0x0,'rows':[]};var _0x24eb18=db[_0x8aa8('0x35')]['rawAttributes'];_0x1f90fc[_0x8aa8('0x36')]=_['keys'](_0x24eb18);_0x1f90fc['query']=_[_0x8aa8('0x37')](_0x5c28fa['query']);_0x1f90fc[_0x8aa8('0x38')]=_[_0x8aa8('0x39')](_0x1f90fc[_0x8aa8('0x36')],_0x1f90fc[_0x8aa8('0x3a')]);_0x22b511['attributes']=_[_0x8aa8('0x39')](_0x1f90fc[_0x8aa8('0x36')],qs['fields'](_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x3b')]));_0x22b511['attributes']=_0x22b511[_0x8aa8('0x3c')][_0x8aa8('0x3d')]?_0x22b511[_0x8aa8('0x3c')]:_0x1f90fc[_0x8aa8('0x36')];if(!_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x3e')](_0x8aa8('0x3f'))){_0x22b511[_0x8aa8('0x22')]=qs[_0x8aa8('0x22')](_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x22')]);_0x22b511[_0x8aa8('0x21')]=qs[_0x8aa8('0x21')](_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x21')]);}_0x22b511[_0x8aa8('0x40')]=qs['sort'](_0x5c28fa[_0x8aa8('0x3a')]['sort']);_0x22b511['where']=qs['filters'](_[_0x8aa8('0x41')](_0x5c28fa['query'],_0x1f90fc['filters']));var _0x336cf9=[];var _0x4da4d8=squel[_0x8aa8('0x42')]()['field']('id')['field'](_0x8aa8('0x29'))[_0x8aa8('0x43')](_0x8aa8('0x44'))[_0x8aa8('0x45')](_0x8aa8('0x46'));var _0x34f440=squel[_0x8aa8('0x42')]()['field'](_0x8aa8('0x47'))['from'](_0x8aa8('0x48'),'me')[_0x8aa8('0x49')](_0x8aa8('0x4a'))[_0x8aa8('0x49')](_0x8aa8('0x4b'))[_0x8aa8('0x49')]('me.read\x20=\x20false');var _0x56e13f=squel[_0x8aa8('0x42')]()[_0x8aa8('0x43')]('u.id')[_0x8aa8('0x43')](_0x8aa8('0x4c'))[_0x8aa8('0x45')]('user_has_fax_interactions','ui')['left_join']('users','u','u.id\x20=\x20ui.UserId');var _0x2bd2ae=squel[_0x8aa8('0x42')]()['from'](_0x8aa8('0x4d'),'i')[_0x8aa8('0x4e')](_0x8aa8('0x4f'),'c',_0x8aa8('0x50'))[_0x8aa8('0x4e')](_0x8aa8('0x51'),'o','o.id\x20=\x20i.UserId')['left_join'](_0x8aa8('0x52'),'a','a.id\x20=\x20i.FaxAccountId')[_0x8aa8('0x4e')]('fax_messages','me',_0x8aa8('0x4a'));var _0x263620=squel[_0x8aa8('0x53')]();if(_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x54')]){var _0x839d86=JSON[_0x8aa8('0x55')](_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x54')]);_[_0x8aa8('0x37')](_0x839d86)[_0x8aa8('0x31')](function(_0x344c42){var _0x4fc51d=_0x839d86[_0x344c42];if(_0x344c42===_0x8aa8('0x56')){var _0x548b6f=moment(_0x4fc51d['value']['dateStart'])[_0x8aa8('0x57')]('day')[_0x8aa8('0x58')]()[_0x8aa8('0x59')]();var _0x7e3227=moment(_0x7e3227)['utc']()[_0x8aa8('0x5a')](_0x8aa8('0x5b'))[_0x8aa8('0x59')]();_0x263620[_0x8aa8('0x5c')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x548b6f,_0x7e3227);}else{if(_['isArray'](_0x4fc51d[_0x8aa8('0x5d')])){_0x4fc51d[_0x8aa8('0x5d')][_0x8aa8('0x31')](function(_0x110d3f){switch(_0x4fc51d['condition']['value']){case'IS':if(_0x344c42!==_0x8aa8('0x5e')&&_0x344c42!==_0x8aa8('0x5f')){if(_[_0x8aa8('0x60')](_0x4fc51d['value'])&&_0x4fc51d[_0x8aa8('0x61')][_0x8aa8('0x3d')]>0x1){_0x263620['and'](_0x4fc51d['tableAlias']+'.'+_0x344c42+'\x20IN\x20?',_0x4fc51d['value']);}else{_0x263620[_0x8aa8('0x5c')](_0x4fc51d['tableAlias']+'.'+_0x344c42+_0x8aa8('0x62'),_0x4fc51d[_0x8aa8('0x61')][0x0]);}}break;case'=':_0x263620['and'](_0x4fc51d['tableAlias']+'.'+_0x344c42+_0x8aa8('0x62'),_0x4fc51d[_0x8aa8('0x61')]);break;case'LIKE':if(_0x344c42==='ContactId'){_0x263620['and'](_0x8aa8('0x63')+_0x8aa8('0x64'),'%'+_0x4fc51d['value']+'%');_0x263620['or']('c.lastName'+_0x8aa8('0x64'),'%'+_0x4fc51d[_0x8aa8('0x61')]+'%');_0x263620['or']('c.email'+_0x8aa8('0x64'),'%'+_0x4fc51d[_0x8aa8('0x61')]+'%');}else{_0x263620['and'](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+'\x20LIKE\x20?','%'+_0x4fc51d[_0x8aa8('0x61')]+'%');}break;case'>':_0x263620['and'](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+_0x8aa8('0x66'),_0x4fc51d[_0x8aa8('0x61')]);break;case'<':_0x263620[_0x8aa8('0x5c')](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+'\x20<\x20?',_0x4fc51d[_0x8aa8('0x61')]);break;}});}else{switch(_0x4fc51d[_0x8aa8('0x5d')][_0x8aa8('0x61')]){case'IS':if(_0x344c42!==_0x8aa8('0x5e')&&_0x344c42!=='Messages.count'){if(_[_0x8aa8('0x60')](_0x4fc51d[_0x8aa8('0x61')])&&_0x4fc51d['value'][_0x8aa8('0x3d')]>0x1){_0x263620[_0x8aa8('0x5c')](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+_0x8aa8('0x67'),_0x4fc51d[_0x8aa8('0x61')]);}else{_0x263620[_0x8aa8('0x5c')](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+'\x20=\x20?',_0x4fc51d['value'][0x0]);}}break;case'=':_0x263620['and'](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+_0x8aa8('0x62'),_0x4fc51d[_0x8aa8('0x61')]);break;case _0x8aa8('0x68'):if(_0x344c42===_0x8aa8('0x69')){_0x263620[_0x8aa8('0x5c')](_0x8aa8('0x63')+_0x8aa8('0x64'),'%'+_0x4fc51d[_0x8aa8('0x61')]+'%');_0x263620['or'](_0x8aa8('0x6a')+_0x8aa8('0x64'),'%'+_0x4fc51d[_0x8aa8('0x61')]+'%');_0x263620['or'](_0x8aa8('0x6b')+_0x8aa8('0x64'),'%'+_0x4fc51d[_0x8aa8('0x61')]+'%');}else{_0x263620[_0x8aa8('0x5c')](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+_0x8aa8('0x64'),'%'+_0x4fc51d[_0x8aa8('0x61')]+'%');}break;case'>':_0x263620['and'](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+_0x8aa8('0x66'),_0x4fc51d[_0x8aa8('0x61')]);break;case'<':_0x263620[_0x8aa8('0x5c')](_0x4fc51d[_0x8aa8('0x65')]+'.'+_0x344c42+_0x8aa8('0x6c'),_0x4fc51d[_0x8aa8('0x61')]);break;}}}});}else{var _0x41ce34=_(Object[_0x8aa8('0x37')](_0x5c28fa['query']))[_0x8aa8('0x6d')](function(_0x3d2c0e){return _0x24eb18['hasOwnProperty'](_0x3d2c0e)?_0x3d2c0e:undefined;})[_0x8aa8('0x6e')](function(_0x5d72d0){return!_[_0x8aa8('0x6f')](_0x5d72d0);})[_0x8aa8('0x61')]();if(!_['isEmpty'](_0x41ce34)){_0x41ce34[_0x8aa8('0x31')](function(_0x16036a){if(_0x16036a===_0x8aa8('0x70')){_0x2bd2ae[_0x8aa8('0x49')](_0x8aa8('0x71'),[][_0x8aa8('0x72')](_0x5c28fa[_0x8aa8('0x3a')][_0x16036a]));}else if(_0x16036a==='createdAt'){var _0x35fb7a=JSON[_0x8aa8('0x55')](_0x5c28fa[_0x8aa8('0x3a')][_0x16036a])[_0x8aa8('0x73')];var _0x4f72a4=JSON['parse'](_0x5c28fa[_0x8aa8('0x3a')][_0x16036a])[_0x8aa8('0x74')];_0x2bd2ae[_0x8aa8('0x49')](_0x8aa8('0x75'),_0x35fb7a,_0x4f72a4);}else{if(_0x5c28fa['query'][_0x16036a]==='null'){_0x2bd2ae['where']('i.'+_0x16036a+_0x8aa8('0x76'));}else{_0x2bd2ae[_0x8aa8('0x49')]('i.'+_0x16036a+_0x8aa8('0x62'),_0x5c28fa[_0x8aa8('0x3a')][_0x16036a]);}}});}if(_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x6e')]){var _0x35e7c4=_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x6e')]['replace']('\x5c','\x5c\x5c')[_0x8aa8('0x77')]('\x27\x27','\x27\x27\x27\x27');if(qs['isNumeric'](_0x35e7c4)){_0x263620['or'](_0x8aa8('0x78'),_0x35e7c4+'%')['or'](_0x8aa8('0x79'),_0x35e7c4+'%');}_0x263620['or'](_0x8aa8('0x7a'),_0x35e7c4+'%');}}_0x2bd2ae['where'](_0x263620);if(_0x22b511[_0x8aa8('0x40')]){_0x22b511['order'][_0x8aa8('0x31')](function(_0x18ca34){_0x2bd2ae[_0x8aa8('0x40')]('i.'+_0x18ca34[0x0],_0x18ca34[0x1]===_0x8aa8('0x7b')?![]:!![]);});}_0x2bd2ae[_0x8aa8('0x7c')]('i.id');var _0x5d504c={'type':db[_0x8aa8('0x7d')][_0x8aa8('0x7e')][_0x8aa8('0x7f')],'raw':!![]};var _0x21f3f8=_0x2bd2ae[_0x8aa8('0x80')]()[_0x8aa8('0x43')](_0x8aa8('0x47'));if(!_0x5c28fa[_0x8aa8('0x3a')]['advancedFilter']){if(_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x81')]){if(_0x5c28fa['query']['read']==0x1){_0x21f3f8[_0x8aa8('0x49')](util[_0x8aa8('0x59')]('%s\x20=\x200',_0x34f440[_0x8aa8('0x82')]()));_0x2bd2ae[_0x8aa8('0x83')](_0x8aa8('0x84'));}else{_0x21f3f8['where'](util['format']('%s\x20>\x200',_0x34f440[_0x8aa8('0x82')]()));_0x2bd2ae[_0x8aa8('0x83')](_0x8aa8('0x85'));}}if(_0x5c28fa[_0x8aa8('0x3a')]['tag']){var _0x4274dc=_[_0x8aa8('0x60')](_0x5c28fa[_0x8aa8('0x3a')][_0x8aa8('0x86')])?_0x5c28fa['query'][_0x8aa8('0x86')]:new Array(_0x5c28fa['query']['tag']);var _0x430bb1=squel['expr']();_0x4274dc[_0x8aa8('0x31')](function(_0x34a5a9){_0x430bb1['or'](_0x8aa8('0x87'),'%,'+_0x34a5a9+',%');});_0x2bd2ae['having'](_0x430bb1);_0x21f3f8[_0x8aa8('0x4e')](_0x8aa8('0x88'),'it',_0x8aa8('0x89'));_0x21f3f8[_0x8aa8('0x4e')](_0x8aa8('0x46'),'t',_0x8aa8('0x8a'));_0x21f3f8['where']('t.id\x20IN\x20?',_0x4274dc);}}else{var _0x839d86=JSON['parse'](_0x5c28fa['query']['advancedFilter']);_['keys'](_0x839d86)['forEach'](function(_0x33392b){var _0x26092c=_0x839d86[_0x33392b];if(_0x33392b===_0x8aa8('0x5e')){var _0x1ab514=_0x26092c[_0x8aa8('0x61')];var _0xb9fb0=squel[_0x8aa8('0x53')]();_0x1ab514[_0x8aa8('0x31')](function(_0x1582bd){_0xb9fb0['or'](_0x8aa8('0x87'),'%,'+_0x1582bd+',%');});_0x2bd2ae['having'](_0xb9fb0);_0x21f3f8['left_join'](_0x8aa8('0x8b'),'it',_0x8aa8('0x8c'));_0x21f3f8[_0x8aa8('0x4e')](_0x8aa8('0x46'),'t',_0x8aa8('0x8a'));_0x21f3f8[_0x8aa8('0x49')](_0x8aa8('0x8d'),_0x1ab514);}else if(_0x33392b===_0x8aa8('0x5f')){if(_0x26092c['value'][_0x8aa8('0x3d')]===0x1){if(_0x26092c[_0x8aa8('0x61')][0x0]===0x1){_0x21f3f8[_0x8aa8('0x49')](util['format'](_0x8aa8('0x8e'),_0x34f440[_0x8aa8('0x82')]()));_0x2bd2ae['having'](_0x8aa8('0x84'));}else{_0x21f3f8[_0x8aa8('0x49')](util[_0x8aa8('0x59')](_0x8aa8('0x8f'),_0x34f440[_0x8aa8('0x82')]()));_0x2bd2ae['having'](_0x8aa8('0x85'));}}}});}db[_0x8aa8('0x90')][_0x8aa8('0x3a')](_0x21f3f8['toString'](),_0x5d504c)[_0x8aa8('0x26')](function(_0x13e9c9){_0x52f87d[_0x8aa8('0x20')]=_0x13e9c9[_0x8aa8('0x3d')];if(_0x52f87d[_0x8aa8('0x20')]===0x0)return[];return db[_0x8aa8('0x90')]['query'](_0x4da4d8[_0x8aa8('0x82')](),_0x5d504c)['then'](function(_0x1df869){_0x336cf9=_[_0x8aa8('0x91')](_0x1df869,'id');_0x5d504c=_[_0x8aa8('0x92')](_0x5d504c,{'model':db[_0x8aa8('0x35')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x2bd2ae[_0x8aa8('0x43')]('a.key',_0x8aa8('0x93'));_0x2bd2ae[_0x8aa8('0x43')](_0x8aa8('0x94'));_0x2bd2ae[_0x8aa8('0x43')](_0x8aa8('0x63'),_0x8aa8('0x95'));_0x2bd2ae[_0x8aa8('0x43')]('c.lastName','Contact.lastName');_0x2bd2ae[_0x8aa8('0x43')](_0x8aa8('0x6b'),_0x8aa8('0x96'));_0x2bd2ae[_0x8aa8('0x43')](_0x8aa8('0x97'),_0x8aa8('0x98'));_0x2bd2ae[_0x8aa8('0x43')](_0x8aa8('0x99'),'Contact.mobile');_0x2bd2ae[_0x8aa8('0x43')](_0x8aa8('0x9a'),'Contact.fax');_0x2bd2ae[_0x8aa8('0x43')]('GROUP_CONCAT(DISTINCT\x20t.id)',_0x8aa8('0x2e'));_0x2bd2ae[_0x8aa8('0x4e')](_0x8aa8('0x88'),'it',_0x8aa8('0x89'));_0x2bd2ae[_0x8aa8('0x4e')](_0x8aa8('0x46'),'t','t.id\x20=\x20it.TagId');_0x2bd2ae[_0x8aa8('0x22')](_0x22b511[_0x8aa8('0x22')]);_0x2bd2ae[_0x8aa8('0x21')](_0x22b511[_0x8aa8('0x21')]);return db[_0x8aa8('0x90')]['query'](_0x2bd2ae[_0x8aa8('0x82')](),_0x5d504c);})[_0x8aa8('0x26')](function(_0x111254){_0x56e13f[_0x8aa8('0x49')](_0x8aa8('0x9b'),_[_0x8aa8('0x6d')](_0x111254,'id'));return db[_0x8aa8('0x90')][_0x8aa8('0x3a')](_0x56e13f[_0x8aa8('0x82')](),_0x5d504c)[_0x8aa8('0x26')](function(_0x55f52d){var _0x57ea52=_[_0x8aa8('0x9c')](_0x55f52d,_0x8aa8('0x9d'));var _0x44919b=[];_0x111254[_0x8aa8('0x31')](function(_0x1683b3){_0x44919b[_0x8aa8('0x32')](updateFaxInteraction(_0x1683b3,_0x336cf9,_0x57ea52));});return BPromise['all'](_0x44919b);});});})[_0x8aa8('0x26')](function(_0x52d477){_0x52f87d[_0x8aa8('0x9e')]=_0x52d477;return _0x52f87d;})[_0x8aa8('0x26')](respondWithFilteredResult(_0x526779,_0x22b511))[_0x8aa8('0x33')](handleError(_0x526779,null));};exports[_0x8aa8('0x9f')]=function(_0x50b8a7,_0x41b117){var _0x4b98a7={'raw':![],'where':{'id':_0x50b8a7['params']['id']}},_0x481a72={};_0x481a72[_0x8aa8('0x36')]=_['keys'](db['FaxInteraction'][_0x8aa8('0xa0')]);_0x481a72[_0x8aa8('0x3a')]=_['keys'](_0x50b8a7[_0x8aa8('0x3a')]);_0x481a72[_0x8aa8('0x38')]=_[_0x8aa8('0x39')](_0x481a72[_0x8aa8('0x36')],_0x481a72['query']);_0x4b98a7[_0x8aa8('0x3c')]=_[_0x8aa8('0x39')](_0x481a72[_0x8aa8('0x36')],qs[_0x8aa8('0x3b')](_0x50b8a7[_0x8aa8('0x3a')][_0x8aa8('0x3b')]));_0x4b98a7[_0x8aa8('0x3c')]=_0x4b98a7[_0x8aa8('0x3c')][_0x8aa8('0x3d')]?_0x4b98a7[_0x8aa8('0x3c')]:_0x481a72['model'];if(_0x50b8a7[_0x8aa8('0x3a')][_0x8aa8('0xa1')]){_0x4b98a7[_0x8aa8('0xa2')]=[{'all':!![]}];}_0x4b98a7=_[_0x8aa8('0x92')]({},_0x4b98a7,_0x50b8a7['options']);return db[_0x8aa8('0x35')][_0x8aa8('0xa3')](_0x4b98a7)[_0x8aa8('0x26')](handleEntityNotFound(_0x41b117,null))[_0x8aa8('0x26')](respondWithResult(_0x41b117,null))['catch'](handleError(_0x41b117,null));};exports[_0x8aa8('0xa4')]=function(_0xb8456e,_0x4977e7){return db['FaxInteraction'][_0x8aa8('0xa4')](_0xb8456e['body'],{})[_0x8aa8('0x26')](respondWithResult(_0x4977e7,0xc9))['catch'](handleError(_0x4977e7,null));};exports['update']=function(_0x3bb148,_0x195d10){if(_0x3bb148[_0x8aa8('0xa5')]['id']){delete _0x3bb148[_0x8aa8('0xa5')]['id'];}return db['FaxInteraction'][_0x8aa8('0xa3')]({'where':{'id':_0x3bb148[_0x8aa8('0xa6')]['id']}})[_0x8aa8('0x26')](handleEntityNotFound(_0x195d10,null))[_0x8aa8('0x26')](saveUpdates(_0x3bb148[_0x8aa8('0xa5')],null))[_0x8aa8('0x26')](respondWithResult(_0x195d10,null))['catch'](handleError(_0x195d10,null));};exports['destroy']=function(_0x1dc515,_0x1075cb){return db[_0x8aa8('0x35')][_0x8aa8('0xa3')]({'where':{'id':_0x1dc515[_0x8aa8('0xa6')]['id']}})['then'](handleEntityNotFound(_0x1075cb,null))['then'](removeEntity(_0x1075cb,null))['catch'](handleError(_0x1075cb,null));};exports['describe']=function(_0x3f9075,_0x12a9bf){return db['FaxInteraction'][_0x8aa8('0xa7')]()[_0x8aa8('0x26')](respondWithResult(_0x12a9bf,null))[_0x8aa8('0x33')](handleError(_0x12a9bf,null));};exports['addMessage']=function(_0x4e1165,_0x10dc20,_0x2d600d){return db[_0x8aa8('0x2c')]['find']({'where':{'id':_0x4e1165[_0x8aa8('0xa6')]['id']}})['then'](handleEntityNotFound(_0x10dc20,null))[_0x8aa8('0x26')](function(_0xc35a92){if(_0xc35a92){return _0xc35a92['addMessage'](_0x4e1165[_0x8aa8('0xa5')][_0x8aa8('0xa8')],_[_0x8aa8('0xa9')](_0x4e1165[_0x8aa8('0xa5')],['ids','id'])||{});}})[_0x8aa8('0x26')](respondWithResult(_0x10dc20,null))['catch'](handleError(_0x10dc20,null));};exports[_0x8aa8('0xaa')]=function(_0x7f67c3,_0x2ec0a8,_0x585fc9){var _0x5b0f06={'raw':![],'where':{}};var _0x22a831={};var _0x11b5f6={'count':0x0,'rows':[]};return db[_0x8aa8('0x35')][_0x8aa8('0xab')]({'where':{'id':_0x7f67c3[_0x8aa8('0xa6')]['id']}})['then'](handleEntityNotFound(_0x2ec0a8,null))[_0x8aa8('0x26')](function(_0x3a620a){if(_0x3a620a){_0x22a831[_0x8aa8('0x36')]=_[_0x8aa8('0x37')](db[_0x8aa8('0x2c')][_0x8aa8('0xa0')]);_0x22a831[_0x8aa8('0x3a')]=_[_0x8aa8('0x37')](_0x7f67c3[_0x8aa8('0x3a')]);_0x22a831[_0x8aa8('0x38')]=_[_0x8aa8('0x39')](_0x22a831['model'],_0x22a831[_0x8aa8('0x3a')]);_0x5b0f06['attributes']=_[_0x8aa8('0x39')](_0x22a831[_0x8aa8('0x36')],qs[_0x8aa8('0x3b')](_0x7f67c3[_0x8aa8('0x3a')][_0x8aa8('0x3b')]));_0x5b0f06[_0x8aa8('0x3c')]=_0x5b0f06['attributes']['length']?_0x5b0f06['attributes']:_0x22a831[_0x8aa8('0x36')];if(!_0x7f67c3[_0x8aa8('0x3a')][_0x8aa8('0x3e')](_0x8aa8('0x3f'))){_0x5b0f06['limit']=qs[_0x8aa8('0x22')](_0x7f67c3[_0x8aa8('0x3a')][_0x8aa8('0x22')]);_0x5b0f06[_0x8aa8('0x21')]=qs[_0x8aa8('0x21')](_0x7f67c3['query'][_0x8aa8('0x21')]);}_0x5b0f06[_0x8aa8('0x40')]=qs[_0x8aa8('0xac')](_0x7f67c3[_0x8aa8('0x3a')][_0x8aa8('0xac')]);_0x5b0f06[_0x8aa8('0x49')]=qs['filters'](_[_0x8aa8('0x41')](_0x7f67c3[_0x8aa8('0x3a')],_0x22a831['filters']));_0x5b0f06['where'][_0x8aa8('0x9d')]=_0x3a620a['id'];if(_0x7f67c3['query']['filter']){_0x5b0f06['where']=_[_0x8aa8('0x92')](_0x5b0f06['where'],{'$or':_['map'](_0x5b0f06[_0x8aa8('0x3c')],function(_0x2aabbc){var _0x11ab19={};_0x11ab19[_0x2aabbc]={'$like':'%'+_0x7f67c3[_0x8aa8('0x3a')][_0x8aa8('0x6e')]+'%'};return _0x11ab19;})});}if(_0x7f67c3[_0x8aa8('0x3a')][_0x8aa8('0x73')]){var _0x241097=_0x7f67c3['query'][_0x8aa8('0x73')][_0x8aa8('0x30')](',');var _0x1c685e={};_0x1c685e[_0x241097[0x0]]={'$gte':moment(_0x241097[0x1])['format'](_0x8aa8('0xad'))};_0x5b0f06[_0x8aa8('0x49')]=_[_0x8aa8('0x92')](_0x5b0f06['where'],_0x1c685e);}_0x5b0f06=_[_0x8aa8('0x92')]({},_0x5b0f06,_0x7f67c3[_0x8aa8('0xae')]);return db[_0x8aa8('0x2c')][_0x8aa8('0x20')]({'where':_0x5b0f06[_0x8aa8('0x49')]})['then'](function(_0x5eb681){_0x11b5f6[_0x8aa8('0x20')]=_0x5eb681;if(_0x7f67c3[_0x8aa8('0x3a')]['includeAll']){_0x5b0f06[_0x8aa8('0xa2')]=[{'all':!![]}];}return db[_0x8aa8('0x2c')][_0x8aa8('0xaf')](_0x5b0f06);})[_0x8aa8('0x26')](function(_0x3d0748){_0x11b5f6[_0x8aa8('0x9e')]=_0x3d0748;return _0x11b5f6;});}})['then'](respondWithFilteredResult(_0x2ec0a8,_0x5b0f06))[_0x8aa8('0x33')](handleError(_0x2ec0a8,null));};exports[_0x8aa8('0xb0')]=function(_0x51bddc,_0x304777,_0x56c4a2){return db[_0x8aa8('0x35')][_0x8aa8('0xa3')]({'where':{'id':_0x51bddc[_0x8aa8('0xa6')]['id']}})['then'](handleEntityNotFound(_0x304777,null))['then'](function(_0x4c733a){if(_0x4c733a){return _0x4c733a['setTags'](_0x51bddc[_0x8aa8('0xa5')][_0x8aa8('0xa8')],_['omit'](_0x51bddc[_0x8aa8('0xa5')],['ids','id'])||{})[_0x8aa8('0xb1')](function(){return db[_0x8aa8('0xb2')][_0x8aa8('0xaf')]({'attributes':['id',_0x8aa8('0x29'),'color'],'where':{'id':_0x51bddc[_0x8aa8('0xa5')]['ids']}});})[_0x8aa8('0x26')](function(_0x5dd1c7){socket[_0x8aa8('0xb3')]('faxInteractionTags:save',{'id':Number(_0x51bddc[_0x8aa8('0xa6')]['id']),'tags':_0x5dd1c7||[]});return{'id':Number(_0x51bddc[_0x8aa8('0xa6')]['id']),'tags':_0x5dd1c7||[]};});}})['then'](respondWithResult(_0x304777,null))['catch'](handleError(_0x304777,null));};exports['removeTags']=function(_0xb79b26,_0x4696bf,_0x1d872c){return db[_0x8aa8('0x35')][_0x8aa8('0xa3')]({'where':{'id':_0xb79b26[_0x8aa8('0xa6')]['id']}})[_0x8aa8('0x26')](handleEntityNotFound(_0x4696bf,null))['then'](function(_0x1e5ed8){if(_0x1e5ed8){return _0x1e5ed8[_0x8aa8('0xb4')](_0xb79b26[_0x8aa8('0x3a')][_0x8aa8('0xa8')]);}})[_0x8aa8('0x26')](respondWithStatusCode(_0x4696bf,null))[_0x8aa8('0x33')](handleError(_0x4696bf,null));};exports[_0x8aa8('0xb5')]=function(_0x3db4b5,_0x3f8060){var _0x2c2d9a=moment()[_0x8aa8('0xb6')]()[_0x8aa8('0x82')]();var _0x19b724=path[_0x8aa8('0xb7')](config['root'],_0x8aa8('0xb8'),_0x8aa8('0xb9'),'attachments');var _0x54b167=path['join'](config[_0x8aa8('0xba')],_0x8aa8('0xb8'),_0x8aa8('0xb9'),'tmp');var _0x25428f=path[_0x8aa8('0xb7')](_0x54b167,_0x2c2d9a);var _0x304a4f=util[_0x8aa8('0x59')](_0x8aa8('0xbb'),_0x2c2d9a);var _0x11ea68=path[_0x8aa8('0xb7')](_0x54b167,_0x304a4f);var _0x1fc225=![];return db[_0x8aa8('0x35')][_0x8aa8('0xa3')]({'where':{'id':_0x3db4b5[_0x8aa8('0xa6')]['id']}})[_0x8aa8('0x26')](handleEntityNotFound(_0x3f8060,null))[_0x8aa8('0x26')](function(_0xb1bc53){if(_0xb1bc53){return _0xb1bc53[_0x8aa8('0xaa')]({'attributes':['id','body',_0x8aa8('0x56')],'include':[{'model':db['Attachment'],'as':_0x8aa8('0xbc')}]});}return[];})[_0x8aa8('0x26')](function(_0x5d0297){_0x1fc225=_0x5d0297[_0x8aa8('0x3d')];if(_0x5d0297['length']){fs[_0x8aa8('0xbd')](_0x25428f);for(var _0x23337f=0x0;_0x23337f<_0x5d0297[_0x8aa8('0x3d')];_0x23337f++){var _0x4bb398=_0x5d0297[_0x23337f];var _0xc2d8bb=_0x4bb398[_0x8aa8('0xbc')];if(_0xc2d8bb){var _0x4bd1ee=path['join'](_0x19b724,_0xc2d8bb['basename']);if(fs['existsSync'](_0x4bd1ee)){fs[_0x8aa8('0xbe')](_0x4bd1ee)[_0x8aa8('0xbf')](fs[_0x8aa8('0xc0')](path[_0x8aa8('0xb7')](_0x25428f,_0xc2d8bb[_0x8aa8('0xc1')])));}}}}})[_0x8aa8('0x26')](function(){if(_0x1fc225){return new BPromise(function(_0x51cfd8,_0xbb19c4){zipdir(_0x25428f,{'saveTo':_0x11ea68},function(_0x1f75f1,_0x3bb329){if(_0x1f75f1)return _0xbb19c4(_0x1f75f1);return _0x51cfd8(_0x3bb329);});});}})[_0x8aa8('0x26')](function(){if(_0x1fc225){return new BPromise(function(_0x5bec09,_0x4b8e78){rimraf(_0x25428f,function(_0x47a0fa){if(_0x47a0fa)_0x4b8e78(_0x47a0fa);return _0x5bec09();});});}})[_0x8aa8('0x26')](function(){if(_0x1fc225){return _0x3f8060[_0x8aa8('0xb5')](_0x11ea68,_0x304a4f,function(_0x327dfa){if(_0x327dfa){console['log']('err',_0x327dfa);}else{fs[_0x8aa8('0xc2')](_0x11ea68);}});}else{return _0x3f8060[_0x8aa8('0x27')](0xc8);}})['catch'](handleError(_0x3f8060,null));};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.events.js b/server/api/faxInteraction/faxInteraction.events.js
index 6f0771e..de63e43 100644
--- a/server/api/faxInteraction/faxInteraction.events.js
+++ b/server/api/faxInteraction/faxInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x165d=['unreadMessages','length','emit','catch','hook','exports','events','../../mysqldb','FaxMessage','setMaxListeners','save','remove','getUsers','then','setDataValue','Users','map','findAll'];(function(_0x2f55e2,_0x43a8b9){var _0x532ff3=function(_0x5cc797){while(--_0x5cc797){_0x2f55e2['push'](_0x2f55e2['shift']());}};_0x532ff3(++_0x43a8b9);}(_0x165d,0x72));var _0xd165=function(_0x5780e2,_0x4d8cde){_0x5780e2=_0x5780e2-0x0;var _0xf7515f=_0x165d[_0x5780e2];return _0xf7515f;};'use strict';var EventEmitter=require(_0xd165('0x0'));var FaxInteraction=require(_0xd165('0x1'))['db']['FaxInteraction'];var FaxMessage=require('../../mysqldb')['db'][_0xd165('0x2')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0xd165('0x3')](0x0);var events={'afterCreate':_0xd165('0x4'),'afterUpdate':'update','afterDestroy':_0xd165('0x5')};function emitEvent(_0x170257){return function(_0x4908ea,_0x1b2077,_0x158434){_0x4908ea[_0xd165('0x6')]({'attributes':['id'],'raw':!![]})[_0xd165('0x7')](function(_0x45f474){_0x4908ea[_0xd165('0x8')](_0xd165('0x9'),_0x45f474[_0xd165('0xa')](function(_0x5341c8){return{'id':_0x5341c8['id']};}));return FaxMessage[_0xd165('0xb')]({'where':{'FaxInteractionId':_0x4908ea['id'],'direction':'in','read':![]},'raw':!![]});})[_0xd165('0x7')](function(_0x3d2df3){_0x4908ea[_0xd165('0x8')](_0xd165('0xc'),_0x3d2df3[_0xd165('0xd')]);FaxInteractionEvents[_0xd165('0xe')](_0x170257+':'+_0x4908ea['id'],_0x4908ea);FaxInteractionEvents[_0xd165('0xe')](_0x170257,_0x4908ea);_0x158434(null);})[_0xd165('0xf')](_0x158434(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxInteraction[_0xd165('0x10')](e,emitEvent(event));}}module[_0xd165('0x11')]=FaxInteractionEvents;
\ No newline at end of file
+var _0xef5c=['then','Users','findAll','setDataValue','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','update','getUsers'];(function(_0x8d3b4a,_0x17c578){var _0x260494=function(_0x2445ed){while(--_0x2445ed){_0x8d3b4a['push'](_0x8d3b4a['shift']());}};_0x260494(++_0x17c578);}(_0xef5c,0x77));var _0xcef5=function(_0x47d9e1,_0x507cb1){_0x47d9e1=_0x47d9e1-0x0;var _0x124eca=_0xef5c[_0x47d9e1];return _0x124eca;};'use strict';var EventEmitter=require(_0xcef5('0x0'));var FaxInteraction=require(_0xcef5('0x1'))['db'][_0xcef5('0x2')];var FaxMessage=require(_0xcef5('0x1'))['db'][_0xcef5('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0xcef5('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':_0xcef5('0x5'),'afterDestroy':'remove'};function emitEvent(_0x25d12b){return function(_0x21e863,_0x16ff03,_0x52d573){_0x21e863[_0xcef5('0x6')]({'attributes':['id'],'raw':!![]})[_0xcef5('0x7')](function(_0x4a8bfb){_0x21e863['setDataValue'](_0xcef5('0x8'),_0x4a8bfb['map'](function(_0x334b05){return{'id':_0x334b05['id']};}));return FaxMessage[_0xcef5('0x9')]({'where':{'FaxInteractionId':_0x21e863['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x43fe97){_0x21e863[_0xcef5('0xa')](_0xcef5('0xb'),_0x43fe97[_0xcef5('0xc')]);FaxInteractionEvents[_0xcef5('0xd')](_0x25d12b+':'+_0x21e863['id'],_0x21e863);FaxInteractionEvents[_0xcef5('0xd')](_0x25d12b,_0x21e863);_0x52d573(null);})[_0xcef5('0xe')](_0x52d573(null));};}for(var e in events){if(events[_0xcef5('0xf')](e)){var event=events[e];FaxInteraction[_0xcef5('0x10')](e,emitEvent(event));}}module[_0xcef5('0x11')]=FaxInteractionEvents;
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.model.js b/server/api/faxInteraction/faxInteraction.model.js
index a62113e..d95c330 100644
--- a/server/api/faxInteraction/faxInteraction.model.js
+++ b/server/api/faxInteraction/faxInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4f22=['api','request-promise','path','rimraf','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','closedAt','format','lodash','../../config/logger'];(function(_0x248377,_0x4e0a6b){var _0xf177bc=function(_0x3c71fe){while(--_0x3c71fe){_0x248377['push'](_0x248377['shift']());}};_0xf177bc(++_0x4e0a6b);}(_0x4f22,0x12a));var _0x24f2=function(_0x5ab357,_0x2e080e){_0x5ab357=_0x5ab357-0x0;var _0x814228=_0x4f22[_0x5ab357];return _0x814228;};'use strict';var _=require(_0x24f2('0x0'));var util=require('util');var logger=require(_0x24f2('0x1'))(_0x24f2('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x24f2('0x3'));var fs=require('fs');var path=require(_0x24f2('0x4'));var rimraf=require(_0x24f2('0x5'));var config=require('../../config/environment');var attributes=require(_0x24f2('0x6'));module['exports']=function(_0x35d1b0,_0x1ff548){return _0x35d1b0[_0x24f2('0x7')](_0x24f2('0x8'),attributes,{'tableName':_0x24f2('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x444b0b,_0x411cf7,_0x55c6f3){if(_0x444b0b['changed']('closed')){_0x444b0b[_0x24f2('0xa')]=moment()[_0x24f2('0xb')]('YYYY-MM-DD\x20HH:mm:ss');}_0x55c6f3(null,_0x444b0b);}}});};
\ No newline at end of file
+var _0x5cf6=['format','lodash','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','fax_interactions','closed','closedAt'];(function(_0x488884,_0x1050cd){var _0x4fb2ee=function(_0x4dda5b){while(--_0x4dda5b){_0x488884['push'](_0x488884['shift']());}};_0x4fb2ee(++_0x1050cd);}(_0x5cf6,0x1a5));var _0x65cf=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x5cf6[_0x27af45];return _0x18df21;};'use strict';var _=require(_0x65cf('0x0'));var util=require(_0x65cf('0x1'));var logger=require(_0x65cf('0x2'))(_0x65cf('0x3'));var moment=require(_0x65cf('0x4'));var BPromise=require('bluebird');var rp=require(_0x65cf('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x65cf('0x6'));var config=require(_0x65cf('0x7'));var attributes=require(_0x65cf('0x8'));module[_0x65cf('0x9')]=function(_0x8a7858,_0x197cf1){return _0x8a7858[_0x65cf('0xa')]('FaxInteraction',attributes,{'tableName':_0x65cf('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1bca6c,_0x1d6081,_0x1007e0){if(_0x1bca6c['changed'](_0x65cf('0xc'))){_0x1bca6c[_0x65cf('0xd')]=moment()[_0x65cf('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x1007e0(null,_0x1bca6c);}}});};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.rpc.js b/server/api/faxInteraction/faxInteraction.rpc.js
index 8e43b37..340c69f 100644
--- a/server/api/faxInteraction/faxInteraction.rpc.js
+++ b/server/api/faxInteraction/faxInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0865=['ids','omit','AddTags','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','redis','defaults','./faxInteraction.socket','register','request','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','UpdateFaxInteraction','body','options','raw','where','AddTagsToFaxInteraction','find','addTags'];(function(_0x57109b,_0x10a298){var _0x3764d9=function(_0x22022e){while(--_0x22022e){_0x57109b['push'](_0x57109b['shift']());}};_0x3764d9(++_0x10a298);}(_0x0865,0x1b3));var _0x5086=function(_0x1ce850,_0x23a8ec){_0x1ce850=_0x1ce850-0x0;var _0x27bdbf=_0x0865[_0x1ce850];return _0x27bdbf;};'use strict';var _=require(_0x5086('0x0'));var util=require('util');var moment=require(_0x5086('0x1'));var BPromise=require('bluebird');var rs=require(_0x5086('0x2'));var fs=require('fs');var Redis=require(_0x5086('0x3'));var db=require(_0x5086('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x5086('0x5'))(_0x5086('0x6'));var config=require('../../config/environment');var jayson=require(_0x5086('0x7'));var client=jayson['client'][_0x5086('0x8')]({'port':0x232a});config[_0x5086('0x9')]=_[_0x5086('0xa')](config[_0x5086('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5086('0x9')]));require(_0x5086('0xb'))[_0x5086('0xc')](socket);function respondWithRpcPromise(_0x5632a9,_0x15635f,_0x58bb7b){return new BPromise(function(_0x5f2971,_0x36d777){return client[_0x5086('0xd')](_0x5632a9,_0x58bb7b)[_0x5086('0xe')](function(_0x407866){logger[_0x5086('0xf')](_0x5086('0x10'),_0x15635f,_0x5086('0x11'));logger[_0x5086('0x12')](_0x5086('0x13'),_0x15635f,_0x5086('0x11'),JSON[_0x5086('0x14')](_0x407866));if(_0x407866['error']){if(_0x407866[_0x5086('0x15')][_0x5086('0x16')]===0x1f4){logger[_0x5086('0x15')](_0x5086('0x10'),_0x15635f,_0x407866[_0x5086('0x15')][_0x5086('0x17')]);return _0x36d777(_0x407866[_0x5086('0x15')][_0x5086('0x17')]);}logger[_0x5086('0x15')](_0x5086('0x10'),_0x15635f,_0x407866[_0x5086('0x15')][_0x5086('0x17')]);return _0x5f2971(_0x407866[_0x5086('0x15')][_0x5086('0x17')]);}else{logger[_0x5086('0xf')]('FaxInteraction,\x20%s,\x20%s',_0x15635f,'request\x20sent');_0x5f2971(_0x407866['result'][_0x5086('0x17')]);}})[_0x5086('0x18')](function(_0x5a6548){logger[_0x5086('0x15')](_0x5086('0x10'),_0x15635f,_0x5a6548);_0x36d777(_0x5a6548);});});}exports[_0x5086('0x19')]=function(_0x23d17d){var _0x2846ca=this;return new Promise(function(_0x1afbc6,_0x982191){return db['FaxInteraction']['update'](_0x23d17d[_0x5086('0x1a')],{'raw':_0x23d17d[_0x5086('0x1b')]?_0x23d17d[_0x5086('0x1b')][_0x5086('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x23d17d[_0x5086('0x1b')]?_0x23d17d[_0x5086('0x1b')][_0x5086('0x1d')]||null:null,'attributes':_0x23d17d[_0x5086('0x1b')]?_0x23d17d[_0x5086('0x1b')]['attributes']||null:null,'limit':_0x23d17d[_0x5086('0x1b')]?_0x23d17d[_0x5086('0x1b')]['limit']||null:null})[_0x5086('0xe')](function(_0x400864){logger[_0x5086('0xf')]('UpdateFaxInteraction',_0x23d17d);logger[_0x5086('0x12')]('UpdateFaxInteraction',_0x23d17d,JSON[_0x5086('0x14')](_0x400864));_0x1afbc6(_0x400864);})['catch'](function(_0x10e8af){logger['error'](_0x5086('0x19'),_0x10e8af[_0x5086('0x17')],_0x23d17d);_0x982191(_0x2846ca[_0x5086('0x15')](0x1f4,_0x10e8af[_0x5086('0x17')]));});});};exports[_0x5086('0x1e')]=function(_0x30919c){return new Promise(function(_0x182daf,_0x2be2c5){return db['FaxInteraction'][_0x5086('0x1f')]({'where':_0x30919c[_0x5086('0x1b')]?_0x30919c[_0x5086('0x1b')][_0x5086('0x1d')]||null:null})['then'](function(_0x283379){if(_0x283379){return _0x283379[_0x5086('0x20')](_0x30919c['body'][_0x5086('0x21')],_[_0x5086('0x22')](_0x30919c[_0x5086('0x1a')],[_0x5086('0x21'),'id'])||{});}})['spread'](function(_0x41f3fc){logger[_0x5086('0xf')](_0x5086('0x23'),_0x30919c);logger[_0x5086('0x12')](_0x5086('0x23'),_0x30919c,JSON[_0x5086('0x14')](_0x41f3fc));_0x182daf(_0x41f3fc);})[_0x5086('0x18')](function(_0x10d709){logger[_0x5086('0x15')]('AddTags',_0x10d709[_0x5086('0x17')],_0x30919c);_0x2be2c5(_this[_0x5086('0x15')](0x1f4,_0x10d709['message']));});});};
\ No newline at end of file
+var _0x9783=['ids','omit','spread','AddTags','lodash','util','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','./faxInteraction.socket','register','request','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','UpdateFaxInteraction','FaxInteraction','update','body','options','raw','where','attributes','limit','stringify','find','addTags'];(function(_0x5eb22e,_0x27cbac){var _0x27fed5=function(_0x565467){while(--_0x565467){_0x5eb22e['push'](_0x5eb22e['shift']());}};_0x27fed5(++_0x27cbac);}(_0x9783,0x123));var _0x3978=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9783[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3978('0x0'));var util=require(_0x3978('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3978('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x3978('0x3'))(_0x3978('0x4'));var config=require(_0x3978('0x5'));var jayson=require(_0x3978('0x6'));var client=jayson[_0x3978('0x7')][_0x3978('0x8')]({'port':0x232a});config[_0x3978('0x9')]=_[_0x3978('0xa')](config[_0x3978('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x3978('0xb'))[_0x3978('0xc')](socket);function respondWithRpcPromise(_0x1eaa59,_0xfd93a3,_0x13ddb3){return new BPromise(function(_0x1c9772,_0x52b4ec){return client[_0x3978('0xd')](_0x1eaa59,_0x13ddb3)[_0x3978('0xe')](function(_0x132bde){logger[_0x3978('0xf')](_0x3978('0x10'),_0xfd93a3,_0x3978('0x11'));logger[_0x3978('0x12')](_0x3978('0x13'),_0xfd93a3,_0x3978('0x11'),JSON['stringify'](_0x132bde));if(_0x132bde[_0x3978('0x14')]){if(_0x132bde['error'][_0x3978('0x15')]===0x1f4){logger[_0x3978('0x14')]('FaxInteraction,\x20%s,\x20%s',_0xfd93a3,_0x132bde[_0x3978('0x14')][_0x3978('0x16')]);return _0x52b4ec(_0x132bde['error']['message']);}logger[_0x3978('0x14')](_0x3978('0x10'),_0xfd93a3,_0x132bde[_0x3978('0x14')]['message']);return _0x1c9772(_0x132bde[_0x3978('0x14')][_0x3978('0x16')]);}else{logger['info'](_0x3978('0x10'),_0xfd93a3,_0x3978('0x11'));_0x1c9772(_0x132bde[_0x3978('0x17')][_0x3978('0x16')]);}})[_0x3978('0x18')](function(_0x158e23){logger[_0x3978('0x14')](_0x3978('0x10'),_0xfd93a3,_0x158e23);_0x52b4ec(_0x158e23);});});}exports[_0x3978('0x19')]=function(_0x519e98){var _0x4b88cd=this;return new Promise(function(_0x2a59b0,_0x1843e3){return db[_0x3978('0x1a')][_0x3978('0x1b')](_0x519e98[_0x3978('0x1c')],{'raw':_0x519e98[_0x3978('0x1d')]?_0x519e98[_0x3978('0x1d')][_0x3978('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x519e98[_0x3978('0x1d')]?_0x519e98[_0x3978('0x1d')][_0x3978('0x1f')]||null:null,'attributes':_0x519e98[_0x3978('0x1d')]?_0x519e98['options'][_0x3978('0x20')]||null:null,'limit':_0x519e98['options']?_0x519e98[_0x3978('0x1d')][_0x3978('0x21')]||null:null})[_0x3978('0xe')](function(_0x39e04a){logger[_0x3978('0xf')]('UpdateFaxInteraction',_0x519e98);logger[_0x3978('0x12')](_0x3978('0x19'),_0x519e98,JSON[_0x3978('0x22')](_0x39e04a));_0x2a59b0(_0x39e04a);})[_0x3978('0x18')](function(_0x10aa31){logger[_0x3978('0x14')](_0x3978('0x19'),_0x10aa31['message'],_0x519e98);_0x1843e3(_0x4b88cd['error'](0x1f4,_0x10aa31[_0x3978('0x16')]));});});};exports['AddTagsToFaxInteraction']=function(_0x5096a1){return new Promise(function(_0x4ead18,_0x22e27a){return db[_0x3978('0x1a')][_0x3978('0x23')]({'where':_0x5096a1[_0x3978('0x1d')]?_0x5096a1[_0x3978('0x1d')]['where']||null:null})[_0x3978('0xe')](function(_0x1007ad){if(_0x1007ad){return _0x1007ad[_0x3978('0x24')](_0x5096a1[_0x3978('0x1c')][_0x3978('0x25')],_[_0x3978('0x26')](_0x5096a1['body'],[_0x3978('0x25'),'id'])||{});}})[_0x3978('0x27')](function(_0x203ee7){logger[_0x3978('0xf')]('AddTags',_0x5096a1);logger[_0x3978('0x12')](_0x3978('0x28'),_0x5096a1,JSON['stringify'](_0x203ee7));_0x4ead18(_0x203ee7);})[_0x3978('0x18')](function(_0x2b0ee3){logger['error'](_0x3978('0x28'),_0x2b0ee3[_0x3978('0x16')],_0x5096a1);_0x22e27a(_this[_0x3978('0x14')](0x1f4,_0x2b0ee3[_0x3978('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.socket.js b/server/api/faxInteraction/faxInteraction.socket.js
index 31054ae..c16e8a6 100644
--- a/server/api/faxInteraction/faxInteraction.socket.js
+++ b/server/api/faxInteraction/faxInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbe93=['faxInteraction:','save','remove','update','emit','length'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbe93,0x1e7));var _0x3be9=function(_0x3dd859,_0x98e91d){_0x3dd859=_0x3dd859-0x0;var _0x4d954f=_0xbe93[_0x3dd859];return _0x4d954f;};'use strict';var FaxInteractionEvents=require('./faxInteraction.events');var events=[_0x3be9('0x0'),_0x3be9('0x1'),_0x3be9('0x2')];function createListener(_0xa1af19,_0x3dedfa){return function(_0x1f21ad){_0x3dedfa[_0x3be9('0x3')](_0xa1af19,_0x1f21ad);};}function removeListener(_0x2ed98c,_0x42d8be){return function(){FaxInteractionEvents['removeListener'](_0x2ed98c,_0x42d8be);};}exports['register']=function(_0xfc84da){for(var _0x836434=0x0,_0x4de290=events[_0x3be9('0x4')];_0x836434<_0x4de290;_0x836434++){var _0x1b67cf=events[_0x836434];var _0x555e4f=createListener(_0x3be9('0x5')+_0x1b67cf,_0xfc84da);FaxInteractionEvents['on'](_0x1b67cf,_0x555e4f);}};
\ No newline at end of file
+var _0x0af1=['remove','update','emit','removeListener','register','length','faxInteraction:','./faxInteraction.events'];(function(_0x190131,_0x4f8913){var _0x3b7500=function(_0x2a6eba){while(--_0x2a6eba){_0x190131['push'](_0x190131['shift']());}};_0x3b7500(++_0x4f8913);}(_0x0af1,0xbf));var _0x10af=function(_0x26c8f8,_0x233b26){_0x26c8f8=_0x26c8f8-0x0;var _0x477130=_0x0af1[_0x26c8f8];return _0x477130;};'use strict';var FaxInteractionEvents=require(_0x10af('0x0'));var events=['save',_0x10af('0x1'),_0x10af('0x2')];function createListener(_0x4954f5,_0x5c8881){return function(_0x2e371a){_0x5c8881[_0x10af('0x3')](_0x4954f5,_0x2e371a);};}function removeListener(_0x1aaf71,_0x4ff390){return function(){FaxInteractionEvents[_0x10af('0x4')](_0x1aaf71,_0x4ff390);};}exports[_0x10af('0x5')]=function(_0x42a52b){for(var _0x36342d=0x0,_0x1c0e5c=events[_0x10af('0x6')];_0x36342d<_0x1c0e5c;_0x36342d++){var _0x3e64d0=events[_0x36342d];var _0x22ae46=createListener(_0x10af('0x7')+_0x3e64d0,_0x42a52b);FaxInteractionEvents['on'](_0x3e64d0,_0x22ae46);}};
\ No newline at end of file
diff --git a/server/api/faxInteraction/index.js b/server/api/faxInteraction/index.js
index 61fff8b..880d083 100644
--- a/server/api/faxInteraction/index.js
+++ b/server/api/faxInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x840e=['put','fax','faxinteraction:update','delete','/:id','destroy','/:id/tags','exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxInteraction.controller','get','/describe','isAuthenticated','show','getMessages','/:id/download','download','post','create','/:id/messages','addMessage','tracked','faxinteraction:addtags','addTags'];(function(_0x4528c3,_0x91c49e){var _0x2c5dc0=function(_0x5614c6){while(--_0x5614c6){_0x4528c3['push'](_0x4528c3['shift']());}};_0x2c5dc0(++_0x91c49e);}(_0x840e,0x152));var _0xe840=function(_0x98e64,_0x216f4d){_0x98e64=_0x98e64-0x0;var _0x48d537=_0x840e[_0x98e64];return _0x48d537;};'use strict';var multer=require(_0xe840('0x0'));var util=require('util');var path=require(_0xe840('0x1'));var timeout=require('connect-timeout');var express=require(_0xe840('0x2'));var router=express[_0xe840('0x3')]();var auth=require(_0xe840('0x4'));var interaction=require(_0xe840('0x5'));var config=require(_0xe840('0x6'));var controller=require(_0xe840('0x7'));router[_0xe840('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xe840('0x8')](_0xe840('0x9'),auth[_0xe840('0xa')](),controller['describe']);router[_0xe840('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xe840('0xb')]);router['get']('/:id/messages',auth['isAuthenticated'](),controller[_0xe840('0xc')]);router['get'](_0xe840('0xd'),auth['isAuthenticated'](),controller[_0xe840('0xe')]);router[_0xe840('0xf')]('/',auth['isAuthenticated'](),controller[_0xe840('0x10')]);router['post'](_0xe840('0x11'),auth[_0xe840('0xa')](),controller[_0xe840('0x12')]);router[_0xe840('0xf')]('/:id/tags',auth[_0xe840('0xa')](),interaction[_0xe840('0x13')]('fax',_0xe840('0x14')),controller[_0xe840('0x15')]);router[_0xe840('0x16')]('/:id',auth[_0xe840('0xa')](),interaction[_0xe840('0x13')](_0xe840('0x17'),_0xe840('0x18')),controller['update']);router[_0xe840('0x19')](_0xe840('0x1a'),auth[_0xe840('0xa')](),interaction[_0xe840('0x13')](_0xe840('0x17'),'faxinteraction:destroy'),controller[_0xe840('0x1b')]);router[_0xe840('0x19')](_0xe840('0x1c'),auth['isAuthenticated'](),controller['removeTags']);module[_0xe840('0x1d')]=router;
\ No newline at end of file
+var _0x86fe=['/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','fax','faxinteraction:addtags','addTags','faxinteraction:destroy','destroy','delete','removeTags','multer','util','path','connect-timeout','express','Router','../../components/auth/service','get','isAuthenticated','/describe','describe'];(function(_0x5037ab,_0x43209e){var _0x512adb=function(_0x261783){while(--_0x261783){_0x5037ab['push'](_0x5037ab['shift']());}};_0x512adb(++_0x43209e);}(_0x86fe,0x16e));var _0xe86f=function(_0x8e832c,_0x33b359){_0x8e832c=_0x8e832c-0x0;var _0x34b66c=_0x86fe[_0x8e832c];return _0x34b66c;};'use strict';var multer=require(_0xe86f('0x0'));var util=require(_0xe86f('0x1'));var path=require(_0xe86f('0x2'));var timeout=require(_0xe86f('0x3'));var express=require(_0xe86f('0x4'));var router=express[_0xe86f('0x5')]();var auth=require(_0xe86f('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./faxInteraction.controller');router[_0xe86f('0x7')]('/',auth[_0xe86f('0x8')](),controller['index']);router[_0xe86f('0x7')](_0xe86f('0x9'),auth['isAuthenticated'](),controller[_0xe86f('0xa')]);router[_0xe86f('0x7')](_0xe86f('0xb'),auth['isAuthenticated'](),controller[_0xe86f('0xc')]);router[_0xe86f('0x7')](_0xe86f('0xd'),auth['isAuthenticated'](),controller[_0xe86f('0xe')]);router[_0xe86f('0x7')](_0xe86f('0xf'),auth[_0xe86f('0x8')](),controller[_0xe86f('0x10')]);router[_0xe86f('0x11')]('/',auth[_0xe86f('0x8')](),controller[_0xe86f('0x12')]);router['post'](_0xe86f('0xd'),auth[_0xe86f('0x8')](),controller[_0xe86f('0x13')]);router[_0xe86f('0x11')](_0xe86f('0x14'),auth[_0xe86f('0x8')](),interaction[_0xe86f('0x15')](_0xe86f('0x16'),_0xe86f('0x17')),controller[_0xe86f('0x18')]);router['put']('/:id',auth['isAuthenticated'](),interaction[_0xe86f('0x15')](_0xe86f('0x16'),'faxinteraction:update'),controller['update']);router['delete']('/:id',auth[_0xe86f('0x8')](),interaction['tracked'](_0xe86f('0x16'),_0xe86f('0x19')),controller[_0xe86f('0x1a')]);router[_0xe86f('0x1b')]('/:id/tags',auth[_0xe86f('0x8')](),controller[_0xe86f('0x1c')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.attributes.js b/server/api/faxMessage/faxMessage.attributes.js
index 1702a68..6f96224 100644
--- a/server/api/faxMessage/faxMessage.attributes.js
+++ b/server/api/faxMessage/faxMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb76c=['BOOLEAN','ENUM','out','sequelize','exports','TEXT','medium'];(function(_0x2509e0,_0x412133){var _0x302f8f=function(_0x47ecb7){while(--_0x47ecb7){_0x2509e0['push'](_0x2509e0['shift']());}};_0x302f8f(++_0x412133);}(_0xb76c,0x81));var _0xcb76=function(_0x4704dc,_0x575a5f){_0x4704dc=_0x4704dc-0x0;var _0x254d81=_0xb76c[_0x4704dc];return _0x254d81;};'use strict';var Sequelize=require(_0xcb76('0x0'));module[_0xcb76('0x1')]={'body':{'type':Sequelize[_0xcb76('0x2')](_0xcb76('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0xcb76('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0xcb76('0x5')]('in','out'),'defaultValue':_0xcb76('0x6'),'allowNull':![]},'failMessage':{'type':Sequelize[_0xcb76('0x2')],'defaultValue':null},'readAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
+var _0x886d=['DATE','sequelize','exports','TEXT','medium','BOOLEAN','ENUM','out'];(function(_0x5207a2,_0x316913){var _0x314716=function(_0x2ca663){while(--_0x2ca663){_0x5207a2['push'](_0x5207a2['shift']());}};_0x314716(++_0x316913);}(_0x886d,0xe9));var _0xd886=function(_0xfacee2,_0x29c3b0){_0xfacee2=_0xfacee2-0x0;var _0x4cc9ea=_0x886d[_0xfacee2];return _0x4cc9ea;};'use strict';var Sequelize=require(_0xd886('0x0'));module[_0xd886('0x1')]={'body':{'type':Sequelize[_0xd886('0x2')](_0xd886('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0xd886('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0xd886('0x5')]('in',_0xd886('0x6')),'defaultValue':_0xd886('0x6'),'allowNull':![]},'failMessage':{'type':Sequelize['TEXT'],'defaultValue':null},'readAt':{'type':Sequelize[_0xd886('0x7')]}};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.controller.js b/server/api/faxMessage/faxMessage.controller.js
index b35b394..a97195b 100644
--- a/server/api/faxMessage/faxMessage.controller.js
+++ b/server/api/faxMessage/faxMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3036=['readAt','format','UserId','user','CmContact','Contact','get','FaxInteraction','FaxInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','manual','interface','channel','event','EventManager','reject','agent','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','SIP/%s','rejectmessage','findOne','ContactId','fax','Attachment','AttachmentId','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','root','download','join','basename','rimraf','zip-dir','fast-json-patch','moment','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','client','http','test','request','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','end','json','count','offset','apply','save','destroy','stack','name','index','FaxMessage','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','sort','pick','filter','where','merge','map','type','VIRTUAL','field','include','findAll','rows','show','params','includeAll','options','find','update','body','describe','fax-interactions','read'];(function(_0x2ea9d6,_0x389fd3){var _0x1039a9=function(_0x3ea797){while(--_0x3ea797){_0x2ea9d6['push'](_0x2ea9d6['shift']());}};_0x1039a9(++_0x389fd3);}(_0x3036,0x1a9));var _0x6303=function(_0x3869a6,_0x2e9f88){_0x3869a6=_0x3869a6-0x0;var _0x9880c=_0x3036[_0x3869a6];return _0x9880c;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x6303('0x0'));var zipdir=require(_0x6303('0x1'));var jsonpatch=require(_0x6303('0x2'));var rp=require('request-promise');var moment=require(_0x6303('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x6303('0x4'));var sox=require('sox');var csv=require(_0x6303('0x5'));var ejs=require(_0x6303('0x6'));var fs=require('fs');var _=require(_0x6303('0x7'));var squel=require('squel');var crypto=require(_0x6303('0x8'));var jsforce=require(_0x6303('0x9'));var deskjs=require(_0x6303('0xa'));var toCsv=require(_0x6303('0x5'));var querystring=require(_0x6303('0xb'));var Papa=require(_0x6303('0xc'));var Redis=require(_0x6303('0xd'));var authService=require(_0x6303('0xe'));var qs=require(_0x6303('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6303('0x10'))(_0x6303('0x11'));var utils=require(_0x6303('0x12'));var config=require(_0x6303('0x13'));var db=require(_0x6303('0x14'))['db'];config['redis']=_[_0x6303('0x15')](config[_0x6303('0x16')],{'host':_0x6303('0x17'),'port':0x18eb});var socket=require(_0x6303('0x18'))(new Redis(config[_0x6303('0x16')]));require('./faxMessage.socket')['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x6303('0x19')][_0x6303('0x1a')]({'port':0x232c});var client9002=jayson[_0x6303('0x19')][_0x6303('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x2bbc57,_0x43526d,_0x3395e0){if(_0x3395e0){var _0x2c4cbd=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2c4cbd[_0x6303('0x1b')](_0x43526d)){return _0x2bbc57;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x2bbc57;}}function respondWithRpcPromise(_0x50a19c,_0x45cf9f,_0xc26f2c,_0x46c724){return new BPromise(function(_0x748520,_0x36a6af){var _0x4fe5cf=_0x46c724||client;return _0x4fe5cf[_0x6303('0x1c')](_0x50a19c,_0xc26f2c)[_0x6303('0x1d')](function(_0x3b9390){logger[_0x6303('0x1e')](_0x6303('0x1f'),_0x45cf9f,_0x6303('0x20'));logger[_0x6303('0x21')](_0x6303('0x22'),_0x45cf9f,_0x6303('0x20'),JSON[_0x6303('0x23')](_0x3b9390));if(_0x3b9390[_0x6303('0x24')]){if(_0x3b9390['error']['code']===0x1f4){logger[_0x6303('0x24')](_0x6303('0x1f'),_0x45cf9f,_0x3b9390[_0x6303('0x24')][_0x6303('0x25')]);return _0x36a6af(_0x3b9390['error'][_0x6303('0x25')]);}logger[_0x6303('0x24')](_0x6303('0x1f'),_0x45cf9f,_0x3b9390[_0x6303('0x24')][_0x6303('0x25')]);return _0x748520(_0x3b9390[_0x6303('0x24')][_0x6303('0x25')]);}else{logger['info']('FaxMessage,\x20%s,\x20%s',_0x45cf9f,_0x6303('0x20'));_0x748520(_0x3b9390[_0x6303('0x26')]['message']);}})[_0x6303('0x27')](function(_0x38605f){logger[_0x6303('0x24')]('FaxMessage,\x20%s,\x20%s',_0x45cf9f,_0x38605f);_0x36a6af(_0x38605f);});});}function respondWithStatusCode(_0x1e7d33,_0x45843f){_0x45843f=_0x45843f||0xcc;return function(_0x389ff5){if(_0x389ff5){return _0x1e7d33[_0x6303('0x28')](_0x45843f);}return _0x1e7d33[_0x6303('0x29')](_0x45843f)[_0x6303('0x2a')]();};}function respondWithResult(_0x411c12,_0x3bcf79){_0x3bcf79=_0x3bcf79||0xc8;return function(_0x62e4b){if(_0x62e4b){return _0x411c12[_0x6303('0x29')](_0x3bcf79)[_0x6303('0x2b')](_0x62e4b);}};}function respondWithFilteredResult(_0x5ae660,_0x6fe268){return function(_0x4d1e98){if(_0x4d1e98){var _0x206878=_0x4d1e98[_0x6303('0x2c')],_0x544107=_0x6fe268[_0x6303('0x2d')],_0x4d2c79=_0x6fe268['offset']+_0x6fe268['limit'],_0xb9f2e3;if(_0x4d2c79>=_0x206878){_0x4d2c79=_0x206878;_0xb9f2e3=0xc8;}else{_0xb9f2e3=0xce;}_0x5ae660[_0x6303('0x29')](_0xb9f2e3);return _0x5ae660['set']('Content-Range',_0x544107+'-'+_0x4d2c79+'/'+_0x206878)[_0x6303('0x2b')](_0x4d1e98);}return null;};}function patchUpdates(_0x37ff87){return function(_0x2584aa){try{jsonpatch[_0x6303('0x2e')](_0x2584aa,_0x37ff87,!![]);}catch(_0x16df21){return BPromise['reject'](_0x16df21);}return _0x2584aa[_0x6303('0x2f')]();};}function saveUpdates(_0x32ac2e,_0x9c492a){return function(_0x591fdb){if(_0x591fdb){return _0x591fdb['update'](_0x32ac2e)[_0x6303('0x1d')](function(_0x561766){return _0x561766;});}return null;};}function removeEntity(_0x1afd81,_0x11b368){return function(_0x3e4767){if(_0x3e4767){return _0x3e4767[_0x6303('0x30')]()[_0x6303('0x1d')](function(){_0x1afd81['status'](0xcc)[_0x6303('0x2a')]();});}};}function handleEntityNotFound(_0x42936a,_0x112cfb){return function(_0x1b2b70){if(!_0x1b2b70){_0x42936a[_0x6303('0x28')](0x194);}return _0x1b2b70;};}function handleError(_0x50731e,_0xfeaac9){_0xfeaac9=_0xfeaac9||0x1f4;return function(_0x3df648){logger[_0x6303('0x24')](_0x3df648[_0x6303('0x31')]);if(_0x3df648[_0x6303('0x32')]){delete _0x3df648['name'];}_0x50731e[_0x6303('0x29')](_0xfeaac9)['send'](_0x3df648);};}exports[_0x6303('0x33')]=function(_0x1d30ff,_0x38f5f3){var _0x4a88d4={},_0x5c9375={},_0x7e2e9a={'count':0x0,'rows':[]};var _0x4b8d3b=db[_0x6303('0x34')][_0x6303('0x35')];_0x5c9375[_0x6303('0x36')]=_['keys'](_0x4b8d3b);_0x5c9375['query']=_[_0x6303('0x37')](_0x1d30ff[_0x6303('0x38')]);_0x5c9375[_0x6303('0x39')]=_[_0x6303('0x3a')](_0x5c9375[_0x6303('0x36')],_0x5c9375[_0x6303('0x38')]);_0x4a88d4['attributes']=_[_0x6303('0x3a')](_0x5c9375['model'],qs[_0x6303('0x3b')](_0x1d30ff['query'][_0x6303('0x3b')]));_0x4a88d4[_0x6303('0x3c')]=_0x4a88d4[_0x6303('0x3c')][_0x6303('0x3d')]?_0x4a88d4['attributes']:_0x5c9375[_0x6303('0x36')];if(!_0x1d30ff['query'][_0x6303('0x3e')](_0x6303('0x3f'))){_0x4a88d4['limit']=qs[_0x6303('0x40')](_0x1d30ff[_0x6303('0x38')]['limit']);_0x4a88d4[_0x6303('0x2d')]=qs['offset'](_0x1d30ff[_0x6303('0x38')]['offset']);}_0x4a88d4['order']=qs['sort'](_0x1d30ff[_0x6303('0x38')][_0x6303('0x41')]);_0x4a88d4['where']=qs['filters'](_[_0x6303('0x42')](_0x1d30ff[_0x6303('0x38')],_0x5c9375['filters']));if(_0x1d30ff[_0x6303('0x38')][_0x6303('0x43')]){_0x4a88d4[_0x6303('0x44')]=_[_0x6303('0x45')](_0x4a88d4['where'],{'$or':_[_0x6303('0x46')](_0x4b8d3b,function(_0x317852){if(_0x317852[_0x6303('0x47')]['key']!==_0x6303('0x48')){var _0x1f72e7={};_0x1f72e7[_0x317852[_0x6303('0x49')]]={'$like':'%'+_0x1d30ff[_0x6303('0x38')][_0x6303('0x43')]+'%'};return _0x1f72e7;}})});}_0x4a88d4=_[_0x6303('0x45')]({},_0x4a88d4,_0x1d30ff['options']);var _0x4c78d7={'where':_0x4a88d4[_0x6303('0x44')]};return db[_0x6303('0x34')]['count'](_0x4c78d7)[_0x6303('0x1d')](function(_0x40b40a){_0x7e2e9a[_0x6303('0x2c')]=_0x40b40a;if(_0x1d30ff[_0x6303('0x38')]['includeAll']){_0x4a88d4[_0x6303('0x4a')]=[{'all':!![]}];}return db[_0x6303('0x34')][_0x6303('0x4b')](_0x4a88d4);})[_0x6303('0x1d')](function(_0x4b5e69){_0x7e2e9a[_0x6303('0x4c')]=_0x4b5e69;return _0x7e2e9a;})[_0x6303('0x1d')](respondWithFilteredResult(_0x38f5f3,_0x4a88d4))['catch'](handleError(_0x38f5f3,null));};exports[_0x6303('0x4d')]=function(_0x174121,_0x3be866){var _0x1df252={'raw':!![],'where':{'id':_0x174121[_0x6303('0x4e')]['id']}},_0x46dedc={};_0x46dedc[_0x6303('0x36')]=_[_0x6303('0x37')](db[_0x6303('0x34')][_0x6303('0x35')]);_0x46dedc[_0x6303('0x38')]=_[_0x6303('0x37')](_0x174121[_0x6303('0x38')]);_0x46dedc['filters']=_[_0x6303('0x3a')](_0x46dedc['model'],_0x46dedc[_0x6303('0x38')]);_0x1df252[_0x6303('0x3c')]=_['intersection'](_0x46dedc['model'],qs[_0x6303('0x3b')](_0x174121[_0x6303('0x38')][_0x6303('0x3b')]));_0x1df252[_0x6303('0x3c')]=_0x1df252[_0x6303('0x3c')][_0x6303('0x3d')]?_0x1df252[_0x6303('0x3c')]:_0x46dedc[_0x6303('0x36')];if(_0x174121[_0x6303('0x38')][_0x6303('0x4f')]){_0x1df252[_0x6303('0x4a')]=[{'all':!![]}];}_0x1df252=_[_0x6303('0x45')]({},_0x1df252,_0x174121[_0x6303('0x50')]);return db['FaxMessage'][_0x6303('0x51')](_0x1df252)['then'](handleEntityNotFound(_0x3be866,null))['then'](respondWithResult(_0x3be866,null))['catch'](handleError(_0x3be866,null));};exports[_0x6303('0x52')]=function(_0x4a01ac,_0x5b40b0){if(_0x4a01ac['body']['id']){delete _0x4a01ac[_0x6303('0x53')]['id'];}return db[_0x6303('0x34')]['find']({'where':{'id':_0x4a01ac[_0x6303('0x4e')]['id']}})['then'](handleEntityNotFound(_0x5b40b0,null))['then'](saveUpdates(_0x4a01ac[_0x6303('0x53')],null))[_0x6303('0x1d')](respondWithResult(_0x5b40b0,null))[_0x6303('0x27')](handleError(_0x5b40b0,null));};exports[_0x6303('0x30')]=function(_0x4568c0,_0x3d2a52){return db[_0x6303('0x34')][_0x6303('0x51')]({'where':{'id':_0x4568c0[_0x6303('0x4e')]['id']}})[_0x6303('0x1d')](handleEntityNotFound(_0x3d2a52,null))['then'](removeEntity(_0x3d2a52,null))[_0x6303('0x27')](handleError(_0x3d2a52,null));};exports['describe']=function(_0x6925dd,_0x2aa59c){return db[_0x6303('0x34')][_0x6303('0x54')]()[_0x6303('0x1d')](respondWithResult(_0x2aa59c,null))['catch'](handleError(_0x2aa59c,null));};var interaction_log=require('../../config/logger')(_0x6303('0x55'));exports['accept']=function(_0x36dc30,_0x512f4a,_0x4215da){var _0x559e17={'channel':'fax'};if(_0x36dc30[_0x6303('0x53')]['id']){delete _0x36dc30[_0x6303('0x53')]['id'];}_0x36dc30['body'][_0x6303('0x56')]=!![];_0x36dc30[_0x6303('0x53')][_0x6303('0x57')]=moment()[_0x6303('0x58')]('YYYY-MM-DD\x20HH:mm:ss');_0x36dc30[_0x6303('0x53')][_0x6303('0x59')]=_0x36dc30[_0x6303('0x53')][_0x6303('0x59')]||_0x36dc30[_0x6303('0x5a')]['id'];return db['FaxMessage']['find']({'where':{'id':_0x36dc30[_0x6303('0x4e')]['id'],'UserId':null},'include':[{'model':db[_0x6303('0x5b')],'as':_0x6303('0x5c')}]})['then'](handleEntityNotFound(_0x512f4a,null))[_0x6303('0x1d')](saveUpdates(_0x36dc30[_0x6303('0x53')],null))[_0x6303('0x1d')](function(_0x311436){if(_0x311436){_0x559e17[_0x6303('0x25')]=_0x311436[_0x6303('0x5d')]({'plain':!![]});return db[_0x6303('0x5e')]['find']({'where':{'id':_0x311436[_0x6303('0x5f')]}});}return null;})[_0x6303('0x1d')](handleEntityNotFound(_0x512f4a,null))[_0x6303('0x1d')](function(_0x557eeb){if(_0x557eeb){return _0x557eeb[_0x6303('0x52')]({'UserId':_0x36dc30[_0x6303('0x53')]['UserId'],'read1stAt':_[_0x6303('0x60')](_0x557eeb[_0x6303('0x61')])?moment()['format'](_0x6303('0x62')):undefined});}return null;})[_0x6303('0x1d')](function(_0x420b4c){if(_0x420b4c){_0x559e17[_0x6303('0x63')]=_0x420b4c[_0x6303('0x5d')]({'plain':!![]});interaction_log[_0x6303('0x1e')](_0x6303('0x64'),_0x36dc30[_0x6303('0x5a')]['id'],_0x36dc30['user'][_0x6303('0x32')],_0x36dc30[_0x6303('0x5a')][_0x6303('0x65')],_0x559e17[_0x6303('0x63')]['id'],_0x36dc30[_0x6303('0x53')]?JSON[_0x6303('0x23')](_0x36dc30[_0x6303('0x53')]):_0x6303('0x66'));return respondWithRpcPromise(_0x6303('0x67'),_0x6303('0x68'),_0x559e17);}return null;})[_0x6303('0x1d')](function(_0x5c64ae){if(_0x5c64ae){if(_0x36dc30['body'][_0x6303('0x69')]){_0x559e17[_0x6303('0x25')][_0x6303('0x6a')]=util['format']('SIP/%s',_0x36dc30[_0x6303('0x5a')][_0x6303('0x32')]);_0x559e17['message'][_0x6303('0x6b')]=_0x559e17['channel'];_0x559e17[_0x6303('0x25')][_0x6303('0x6c')]='accept';return respondWithRpcPromise('EventManager',_0x6303('0x6d'),{'event':'acceptmessage','message':_0x559e17[_0x6303('0x25')]},client9002)[_0x6303('0x1d')](function(){return _0x559e17;});}return _0x559e17;}return null;})[_0x6303('0x1d')](respondWithResult(_0x512f4a,null))[_0x6303('0x27')](handleError(_0x512f4a,null));};var interaction_log=require('../../config/logger')('fax-interactions');exports[_0x6303('0x6e')]=function(_0xf0382e,_0x205be5,_0x3910ff){var _0x4bcde3={'agent':{},'channel':'fax'};if(_0xf0382e['body']['id']){delete _0xf0382e['body']['id'];}_0xf0382e[_0x6303('0x53')][_0x6303('0x59')]=_0xf0382e['body'][_0x6303('0x59')]||_0xf0382e[_0x6303('0x5a')]['id'];_0x4bcde3[_0x6303('0x6f')]['id']=_0xf0382e[_0x6303('0x53')][_0x6303('0x59')];return db['FaxMessage']['find']({'where':{'id':_0xf0382e[_0x6303('0x4e')]['id'],'UserId':null}})[_0x6303('0x1d')](handleEntityNotFound(_0x205be5,null))['then'](function(_0x25f34b){if(_0x25f34b){_0x4bcde3[_0x6303('0x25')]=_0x25f34b[_0x6303('0x5d')]({'plain':!![]});return db[_0x6303('0x5e')][_0x6303('0x51')]({'where':{'id':_0x25f34b['FaxInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x205be5,null))[_0x6303('0x1d')](function(_0xc97984){if(_0xc97984){_0x4bcde3['interaction']=_0xc97984['get']({'plain':!![]});interaction_log['info'](_0x6303('0x70'),_0xf0382e['user']['id'],_0xf0382e[_0x6303('0x5a')][_0x6303('0x32')],_0xf0382e[_0x6303('0x5a')][_0x6303('0x65')],_0x4bcde3[_0x6303('0x63')]['id'],_0xf0382e['body']?JSON[_0x6303('0x23')](_0xf0382e['body']):_0x6303('0x66'));return respondWithRpcPromise('RejectMessage',_0x6303('0x71'),_0x4bcde3);}return null;})[_0x6303('0x1d')](function(_0x3df9d1){if(_0x3df9d1){_0x3df9d1['message'][_0x6303('0x6a')]=util[_0x6303('0x58')](_0x6303('0x72'),_0xf0382e[_0x6303('0x5a')][_0x6303('0x32')]);_0x3df9d1[_0x6303('0x25')][_0x6303('0x6b')]=_0x4bcde3['channel'];_0x3df9d1[_0x6303('0x25')][_0x6303('0x6c')]=_0x6303('0x6e');respondWithRpcPromise(_0x6303('0x6d'),_0x6303('0x6d'),{'event':_0x6303('0x73'),'message':_0x3df9d1[_0x6303('0x25')]},client9002);return _0x4bcde3;}return null;})['then'](respondWithResult(_0x205be5,null))[_0x6303('0x27')](handleError(_0x205be5,null));};exports['create']=function(_0x592aa0,_0x46d250){var _0x3ff316;return db['FaxMessage']['create'](_0x592aa0['body'],{})[_0x6303('0x1d')](function(_0xeb08a){_0x3ff316=_0xeb08a;return db[_0x6303('0x5b')][_0x6303('0x74')]({'where':{'id':_0x3ff316[_0x6303('0x75')]}});})[_0x6303('0x1d')](function(_0xc321db){if(_[_0x6303('0x60')](_0xc321db)){return;}else{_0x3ff316['fax']=_0xc321db[_0x6303('0x76')];return db[_0x6303('0x77')]['findOne']({'where':{'id':_0x3ff316[_0x6303('0x78')]}});}})[_0x6303('0x1d')](function(_0x2375b7){return respondWithRpcPromise('SendFax',_0x6303('0x79'),{'FaxAccountId':_['isNil'](_0x592aa0['body'])?undefined:_0x592aa0[_0x6303('0x53')][_0x6303('0x7a')],'path':_[_0x6303('0x60')](_0x2375b7)?undefined:util['format'](_0x6303('0x7b'),_0x2375b7['basename']),'fax':_[_0x6303('0x60')](_0x3ff316[_0x6303('0x76')])?undefined:_0x3ff316[_0x6303('0x76')],'AttachmentId':_0x3ff316[_0x6303('0x78')]},client9002);})[_0x6303('0x1d')](respondWithResult(_0x46d250,0xc9))['catch'](handleError(_0x46d250,null));};exports['download']=function(_0xcb713,_0x11ac49){var _0x8b5aa8=path['join'](config[_0x6303('0x7c')],'server','files','attachments');return db[_0x6303('0x34')]['find']({'where':{'id':_0xcb713['params']['id']},'include':[{'model':db['Attachment'],'as':_0x6303('0x77')}]})[_0x6303('0x1d')](handleEntityNotFound(_0x11ac49,null))[_0x6303('0x1d')](function(_0x41ba78){if(_0x41ba78){return _0x11ac49[_0x6303('0x7d')](path[_0x6303('0x7e')](_0x8b5aa8,_0x41ba78[_0x6303('0x77')][_0x6303('0x7f')]));}})[_0x6303('0x27')](handleError(_0x11ac49,null));};
\ No newline at end of file
+var _0x24a6=['intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','map','key','VIRTUAL','field','merge','options','then','include','rows','body','find','params','describe','../../config/logger','fax-interactions','fax','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','CmContact','Contact','FaxInteractionId','isNil','read1stAt','interaction','get','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','null','AcceptMessage','acceptMessage','manual','interface','SIP/%s','channel','EventManager','agent','FaxInteraction','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','RejectMessage','rejectMessage','event','rejectmessage','create','ContactId','Attachment','findOne','AttachmentId','SendFax','/var/opt/motion2/server/files/attachments/%s','basename','download','join','root','server','files','attachments','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','redis','defaults','register','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','FaxMessage,\x20%s,\x20%s','debug','FaxMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','sendStatus','status','json','count','offset','set','apply','reject','update','destroy','stack','name','send','FaxMessage','rawAttributes','model','keys','query','filters'];(function(_0x3760b4,_0x226cce){var _0x45ba7d=function(_0x292f6d){while(--_0x292f6d){_0x3760b4['push'](_0x3760b4['shift']());}};_0x45ba7d(++_0x226cce);}(_0x24a6,0x14f));var _0x624a=function(_0xf419f7,_0x34e0c1){_0xf419f7=_0xf419f7-0x0;var _0x4d7af3=_0x24a6[_0xf419f7];return _0x4d7af3;};'use strict';var pdf=require(_0x624a('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x624a('0x1'));var zipdir=require(_0x624a('0x2'));var jsonpatch=require(_0x624a('0x3'));var rp=require(_0x624a('0x4'));var moment=require(_0x624a('0x5'));var BPromise=require(_0x624a('0x6'));var Mustache=require(_0x624a('0x7'));var util=require(_0x624a('0x8'));var path=require(_0x624a('0x9'));var sox=require(_0x624a('0xa'));var csv=require(_0x624a('0xb'));var ejs=require(_0x624a('0xc'));var fs=require('fs');var _=require(_0x624a('0xd'));var squel=require(_0x624a('0xe'));var crypto=require(_0x624a('0xf'));var jsforce=require(_0x624a('0x10'));var deskjs=require(_0x624a('0x11'));var toCsv=require(_0x624a('0xb'));var querystring=require(_0x624a('0x12'));var Papa=require(_0x624a('0x13'));var Redis=require(_0x624a('0x14'));var authService=require(_0x624a('0x15'));var qs=require(_0x624a('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x624a('0x17'));var utils=require(_0x624a('0x18'));var config=require(_0x624a('0x19'));var db=require('../../mysqldb')['db'];config[_0x624a('0x1a')]=_[_0x624a('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x624a('0x1a')]));require('./faxMessage.socket')[_0x624a('0x1c')](socket);var jayson=require(_0x624a('0x1d'));var client=jayson[_0x624a('0x1e')][_0x624a('0x1f')]({'port':0x232c});var client9002=jayson['client'][_0x624a('0x1f')]({'port':0x232a});function checkPasswordPattern(_0x4935f4,_0x424200,_0x195bfc){if(_0x195bfc){var _0x53005e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x53005e[_0x624a('0x20')](_0x424200)){return _0x4935f4;}else{throw new Error(_0x624a('0x21'));}}else{return _0x4935f4;}}function respondWithRpcPromise(_0x3b6414,_0x1082a0,_0xce9cd5,_0x158b72){return new BPromise(function(_0x364867,_0x32d6a0){var _0x35342c=_0x158b72||client;return _0x35342c[_0x624a('0x22')](_0x3b6414,_0xce9cd5)['then'](function(_0x32a44d){logger['info'](_0x624a('0x23'),_0x1082a0,'request\x20sent');logger[_0x624a('0x24')](_0x624a('0x25'),_0x1082a0,_0x624a('0x26'),JSON[_0x624a('0x27')](_0x32a44d));if(_0x32a44d[_0x624a('0x28')]){if(_0x32a44d['error'][_0x624a('0x29')]===0x1f4){logger[_0x624a('0x28')](_0x624a('0x23'),_0x1082a0,_0x32a44d[_0x624a('0x28')]['message']);return _0x32d6a0(_0x32a44d[_0x624a('0x28')][_0x624a('0x2a')]);}logger[_0x624a('0x28')]('FaxMessage,\x20%s,\x20%s',_0x1082a0,_0x32a44d['error']['message']);return _0x364867(_0x32a44d[_0x624a('0x28')][_0x624a('0x2a')]);}else{logger[_0x624a('0x2b')](_0x624a('0x23'),_0x1082a0,'request\x20sent');_0x364867(_0x32a44d['result'][_0x624a('0x2a')]);}})[_0x624a('0x2c')](function(_0x57eb2e){logger[_0x624a('0x28')](_0x624a('0x23'),_0x1082a0,_0x57eb2e);_0x32d6a0(_0x57eb2e);});});}function respondWithStatusCode(_0x534c41,_0x5366c4){_0x5366c4=_0x5366c4||0xcc;return function(_0x585126){if(_0x585126){return _0x534c41[_0x624a('0x2d')](_0x5366c4);}return _0x534c41[_0x624a('0x2e')](_0x5366c4)['end']();};}function respondWithResult(_0x57d2d5,_0x59917f){_0x59917f=_0x59917f||0xc8;return function(_0x422c20){if(_0x422c20){return _0x57d2d5[_0x624a('0x2e')](_0x59917f)[_0x624a('0x2f')](_0x422c20);}};}function respondWithFilteredResult(_0x55dff7,_0x16178d){return function(_0x1ba339){if(_0x1ba339){var _0x56dfb2=_0x1ba339[_0x624a('0x30')],_0x466af4=_0x16178d[_0x624a('0x31')],_0x59df8f=_0x16178d[_0x624a('0x31')]+_0x16178d['limit'],_0x209ca5;if(_0x59df8f>=_0x56dfb2){_0x59df8f=_0x56dfb2;_0x209ca5=0xc8;}else{_0x209ca5=0xce;}_0x55dff7[_0x624a('0x2e')](_0x209ca5);return _0x55dff7[_0x624a('0x32')]('Content-Range',_0x466af4+'-'+_0x59df8f+'/'+_0x56dfb2)[_0x624a('0x2f')](_0x1ba339);}return null;};}function patchUpdates(_0x11dcf4){return function(_0x100545){try{jsonpatch[_0x624a('0x33')](_0x100545,_0x11dcf4,!![]);}catch(_0x3b91ec){return BPromise[_0x624a('0x34')](_0x3b91ec);}return _0x100545['save']();};}function saveUpdates(_0x55d8f5,_0x45a3c2){return function(_0x3315aa){if(_0x3315aa){return _0x3315aa[_0x624a('0x35')](_0x55d8f5)['then'](function(_0x35b323){return _0x35b323;});}return null;};}function removeEntity(_0x5080a4,_0x54b4f7){return function(_0x5aa5ce){if(_0x5aa5ce){return _0x5aa5ce[_0x624a('0x36')]()['then'](function(){_0x5080a4[_0x624a('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x21df69,_0x50f561){return function(_0x4d9bee){if(!_0x4d9bee){_0x21df69[_0x624a('0x2d')](0x194);}return _0x4d9bee;};}function handleError(_0x109899,_0x475fe6){_0x475fe6=_0x475fe6||0x1f4;return function(_0xa7b840){logger[_0x624a('0x28')](_0xa7b840[_0x624a('0x37')]);if(_0xa7b840[_0x624a('0x38')]){delete _0xa7b840[_0x624a('0x38')];}_0x109899[_0x624a('0x2e')](_0x475fe6)[_0x624a('0x39')](_0xa7b840);};}exports['index']=function(_0x3a784e,_0x14f9dc){var _0x24ccd4={},_0x4e44bb={},_0x3bbf38={'count':0x0,'rows':[]};var _0x5e9e7c=db[_0x624a('0x3a')][_0x624a('0x3b')];_0x4e44bb[_0x624a('0x3c')]=_[_0x624a('0x3d')](_0x5e9e7c);_0x4e44bb[_0x624a('0x3e')]=_[_0x624a('0x3d')](_0x3a784e['query']);_0x4e44bb[_0x624a('0x3f')]=_[_0x624a('0x40')](_0x4e44bb[_0x624a('0x3c')],_0x4e44bb['query']);_0x24ccd4[_0x624a('0x41')]=_['intersection'](_0x4e44bb['model'],qs[_0x624a('0x42')](_0x3a784e[_0x624a('0x3e')][_0x624a('0x42')]));_0x24ccd4['attributes']=_0x24ccd4['attributes'][_0x624a('0x43')]?_0x24ccd4[_0x624a('0x41')]:_0x4e44bb['model'];if(!_0x3a784e[_0x624a('0x3e')][_0x624a('0x44')]('nolimit')){_0x24ccd4[_0x624a('0x45')]=qs[_0x624a('0x45')](_0x3a784e[_0x624a('0x3e')][_0x624a('0x45')]);_0x24ccd4['offset']=qs['offset'](_0x3a784e['query'][_0x624a('0x31')]);}_0x24ccd4[_0x624a('0x46')]=qs[_0x624a('0x47')](_0x3a784e[_0x624a('0x3e')][_0x624a('0x47')]);_0x24ccd4[_0x624a('0x48')]=qs[_0x624a('0x3f')](_['pick'](_0x3a784e[_0x624a('0x3e')],_0x4e44bb[_0x624a('0x3f')]));if(_0x3a784e['query']['filter']){_0x24ccd4[_0x624a('0x48')]=_['merge'](_0x24ccd4[_0x624a('0x48')],{'$or':_[_0x624a('0x49')](_0x5e9e7c,function(_0x935e19){if(_0x935e19['type'][_0x624a('0x4a')]!==_0x624a('0x4b')){var _0x96a1a8={};_0x96a1a8[_0x935e19[_0x624a('0x4c')]]={'$like':'%'+_0x3a784e[_0x624a('0x3e')]['filter']+'%'};return _0x96a1a8;}})});}_0x24ccd4=_[_0x624a('0x4d')]({},_0x24ccd4,_0x3a784e[_0x624a('0x4e')]);var _0x20d2e2={'where':_0x24ccd4['where']};return db[_0x624a('0x3a')][_0x624a('0x30')](_0x20d2e2)[_0x624a('0x4f')](function(_0x18f37f){_0x3bbf38[_0x624a('0x30')]=_0x18f37f;if(_0x3a784e[_0x624a('0x3e')]['includeAll']){_0x24ccd4[_0x624a('0x50')]=[{'all':!![]}];}return db['FaxMessage']['findAll'](_0x24ccd4);})['then'](function(_0xc2884b){_0x3bbf38[_0x624a('0x51')]=_0xc2884b;return _0x3bbf38;})[_0x624a('0x4f')](respondWithFilteredResult(_0x14f9dc,_0x24ccd4))[_0x624a('0x2c')](handleError(_0x14f9dc,null));};exports['show']=function(_0x18c318,_0x4283ff){var _0x6528a0={'raw':!![],'where':{'id':_0x18c318['params']['id']}},_0x5469bf={};_0x5469bf[_0x624a('0x3c')]=_[_0x624a('0x3d')](db[_0x624a('0x3a')][_0x624a('0x3b')]);_0x5469bf[_0x624a('0x3e')]=_[_0x624a('0x3d')](_0x18c318['query']);_0x5469bf[_0x624a('0x3f')]=_[_0x624a('0x40')](_0x5469bf['model'],_0x5469bf[_0x624a('0x3e')]);_0x6528a0[_0x624a('0x41')]=_[_0x624a('0x40')](_0x5469bf[_0x624a('0x3c')],qs[_0x624a('0x42')](_0x18c318[_0x624a('0x3e')]['fields']));_0x6528a0[_0x624a('0x41')]=_0x6528a0[_0x624a('0x41')]['length']?_0x6528a0[_0x624a('0x41')]:_0x5469bf[_0x624a('0x3c')];if(_0x18c318[_0x624a('0x3e')]['includeAll']){_0x6528a0[_0x624a('0x50')]=[{'all':!![]}];}_0x6528a0=_[_0x624a('0x4d')]({},_0x6528a0,_0x18c318[_0x624a('0x4e')]);return db['FaxMessage']['find'](_0x6528a0)['then'](handleEntityNotFound(_0x4283ff,null))[_0x624a('0x4f')](respondWithResult(_0x4283ff,null))[_0x624a('0x2c')](handleError(_0x4283ff,null));};exports[_0x624a('0x35')]=function(_0x3c116f,_0x1f7c86){if(_0x3c116f['body']['id']){delete _0x3c116f[_0x624a('0x52')]['id'];}return db[_0x624a('0x3a')][_0x624a('0x53')]({'where':{'id':_0x3c116f[_0x624a('0x54')]['id']}})['then'](handleEntityNotFound(_0x1f7c86,null))['then'](saveUpdates(_0x3c116f[_0x624a('0x52')],null))[_0x624a('0x4f')](respondWithResult(_0x1f7c86,null))['catch'](handleError(_0x1f7c86,null));};exports['destroy']=function(_0x21d1a0,_0x10e330){return db[_0x624a('0x3a')]['find']({'where':{'id':_0x21d1a0['params']['id']}})[_0x624a('0x4f')](handleEntityNotFound(_0x10e330,null))['then'](removeEntity(_0x10e330,null))[_0x624a('0x2c')](handleError(_0x10e330,null));};exports[_0x624a('0x55')]=function(_0x10ff3e,_0x28c700){return db['FaxMessage'][_0x624a('0x55')]()[_0x624a('0x4f')](respondWithResult(_0x28c700,null))[_0x624a('0x2c')](handleError(_0x28c700,null));};var interaction_log=require(_0x624a('0x56'))(_0x624a('0x57'));exports['accept']=function(_0x466df6,_0x23cf77,_0x466078){var _0x765502={'channel':_0x624a('0x58')};if(_0x466df6['body']['id']){delete _0x466df6[_0x624a('0x52')]['id'];}_0x466df6['body'][_0x624a('0x59')]=!![];_0x466df6[_0x624a('0x52')][_0x624a('0x5a')]=moment()[_0x624a('0x5b')](_0x624a('0x5c'));_0x466df6[_0x624a('0x52')][_0x624a('0x5d')]=_0x466df6[_0x624a('0x52')][_0x624a('0x5d')]||_0x466df6['user']['id'];return db[_0x624a('0x3a')][_0x624a('0x53')]({'where':{'id':_0x466df6[_0x624a('0x54')]['id'],'UserId':null},'include':[{'model':db[_0x624a('0x5e')],'as':_0x624a('0x5f')}]})['then'](handleEntityNotFound(_0x23cf77,null))['then'](saveUpdates(_0x466df6['body'],null))[_0x624a('0x4f')](function(_0x501db3){if(_0x501db3){_0x765502[_0x624a('0x2a')]=_0x501db3['get']({'plain':!![]});return db['FaxInteraction'][_0x624a('0x53')]({'where':{'id':_0x501db3[_0x624a('0x60')]}});}return null;})[_0x624a('0x4f')](handleEntityNotFound(_0x23cf77,null))['then'](function(_0x6d88d7){if(_0x6d88d7){return _0x6d88d7[_0x624a('0x35')]({'UserId':_0x466df6['body']['UserId'],'read1stAt':_[_0x624a('0x61')](_0x6d88d7[_0x624a('0x62')])?moment()[_0x624a('0x5b')](_0x624a('0x5c')):undefined});}return null;})['then'](function(_0x1db2f7){if(_0x1db2f7){_0x765502[_0x624a('0x63')]=_0x1db2f7[_0x624a('0x64')]({'plain':!![]});interaction_log['info'](_0x624a('0x65'),_0x466df6[_0x624a('0x66')]['id'],_0x466df6[_0x624a('0x66')][_0x624a('0x38')],_0x466df6[_0x624a('0x66')]['role'],_0x765502[_0x624a('0x63')]['id'],_0x466df6[_0x624a('0x52')]?JSON[_0x624a('0x27')](_0x466df6[_0x624a('0x52')]):_0x624a('0x67'));return respondWithRpcPromise(_0x624a('0x68'),_0x624a('0x69'),_0x765502);}return null;})['then'](function(_0xa3dbef){if(_0xa3dbef){if(_0x466df6[_0x624a('0x52')][_0x624a('0x6a')]){_0x765502[_0x624a('0x2a')][_0x624a('0x6b')]=util[_0x624a('0x5b')](_0x624a('0x6c'),_0x466df6[_0x624a('0x66')]['name']);_0x765502[_0x624a('0x2a')][_0x624a('0x6d')]=_0x765502[_0x624a('0x6d')];_0x765502[_0x624a('0x2a')]['event']='accept';return respondWithRpcPromise(_0x624a('0x6e'),_0x624a('0x6e'),{'event':'acceptmessage','message':_0x765502[_0x624a('0x2a')]},client9002)[_0x624a('0x4f')](function(){return _0x765502;});}return _0x765502;}return null;})[_0x624a('0x4f')](respondWithResult(_0x23cf77,null))[_0x624a('0x2c')](handleError(_0x23cf77,null));};var interaction_log=require(_0x624a('0x56'))(_0x624a('0x57'));exports[_0x624a('0x34')]=function(_0x28ed5b,_0x35dc45,_0x284925){var _0x3b1e43={'agent':{},'channel':_0x624a('0x58')};if(_0x28ed5b[_0x624a('0x52')]['id']){delete _0x28ed5b['body']['id'];}_0x28ed5b['body'][_0x624a('0x5d')]=_0x28ed5b[_0x624a('0x52')]['UserId']||_0x28ed5b[_0x624a('0x66')]['id'];_0x3b1e43[_0x624a('0x6f')]['id']=_0x28ed5b[_0x624a('0x52')][_0x624a('0x5d')];return db['FaxMessage']['find']({'where':{'id':_0x28ed5b[_0x624a('0x54')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x35dc45,null))[_0x624a('0x4f')](function(_0x5cc0a7){if(_0x5cc0a7){_0x3b1e43[_0x624a('0x2a')]=_0x5cc0a7['get']({'plain':!![]});return db[_0x624a('0x70')][_0x624a('0x53')]({'where':{'id':_0x5cc0a7[_0x624a('0x60')]}});}return null;})[_0x624a('0x4f')](handleEntityNotFound(_0x35dc45,null))[_0x624a('0x4f')](function(_0x3ea486){if(_0x3ea486){_0x3b1e43[_0x624a('0x63')]=_0x3ea486[_0x624a('0x64')]({'plain':!![]});interaction_log[_0x624a('0x2b')](_0x624a('0x71'),_0x28ed5b['user']['id'],_0x28ed5b[_0x624a('0x66')][_0x624a('0x38')],_0x28ed5b[_0x624a('0x66')][_0x624a('0x72')],_0x3b1e43[_0x624a('0x63')]['id'],_0x28ed5b[_0x624a('0x52')]?JSON['stringify'](_0x28ed5b['body']):_0x624a('0x67'));return respondWithRpcPromise(_0x624a('0x73'),_0x624a('0x74'),_0x3b1e43);}return null;})[_0x624a('0x4f')](function(_0xb2245a){if(_0xb2245a){_0xb2245a['message'][_0x624a('0x6b')]=util['format']('SIP/%s',_0x28ed5b[_0x624a('0x66')][_0x624a('0x38')]);_0xb2245a[_0x624a('0x2a')][_0x624a('0x6d')]=_0x3b1e43[_0x624a('0x6d')];_0xb2245a[_0x624a('0x2a')][_0x624a('0x75')]=_0x624a('0x34');respondWithRpcPromise(_0x624a('0x6e'),_0x624a('0x6e'),{'event':_0x624a('0x76'),'message':_0xb2245a[_0x624a('0x2a')]},client9002);return _0x3b1e43;}return null;})[_0x624a('0x4f')](respondWithResult(_0x35dc45,null))[_0x624a('0x2c')](handleError(_0x35dc45,null));};exports[_0x624a('0x77')]=function(_0x22ac0a,_0x53abf0){var _0x48a842;return db[_0x624a('0x3a')][_0x624a('0x77')](_0x22ac0a[_0x624a('0x52')],{})['then'](function(_0x1b7c74){_0x48a842=_0x1b7c74;return db[_0x624a('0x5e')]['findOne']({'where':{'id':_0x48a842[_0x624a('0x78')]}});})['then'](function(_0xb4cbba){if(_[_0x624a('0x61')](_0xb4cbba)){return;}else{_0x48a842[_0x624a('0x58')]=_0xb4cbba[_0x624a('0x58')];return db[_0x624a('0x79')][_0x624a('0x7a')]({'where':{'id':_0x48a842[_0x624a('0x7b')]}});}})[_0x624a('0x4f')](function(_0x7d1ff2){return respondWithRpcPromise(_0x624a('0x7c'),_0x624a('0x7c'),{'FaxAccountId':_[_0x624a('0x61')](_0x22ac0a['body'])?undefined:_0x22ac0a['body']['FaxAccountId'],'path':_[_0x624a('0x61')](_0x7d1ff2)?undefined:util[_0x624a('0x5b')](_0x624a('0x7d'),_0x7d1ff2[_0x624a('0x7e')]),'fax':_[_0x624a('0x61')](_0x48a842[_0x624a('0x58')])?undefined:_0x48a842[_0x624a('0x58')],'AttachmentId':_0x48a842['AttachmentId']},client9002);})[_0x624a('0x4f')](respondWithResult(_0x53abf0,0xc9))['catch'](handleError(_0x53abf0,null));};exports[_0x624a('0x7f')]=function(_0x31df3f,_0x4dc7cc){var _0x54bd4a=path[_0x624a('0x80')](config[_0x624a('0x81')],_0x624a('0x82'),_0x624a('0x83'),_0x624a('0x84'));return db['FaxMessage'][_0x624a('0x53')]({'where':{'id':_0x31df3f[_0x624a('0x54')]['id']},'include':[{'model':db[_0x624a('0x79')],'as':_0x624a('0x79')}]})[_0x624a('0x4f')](handleEntityNotFound(_0x4dc7cc,null))['then'](function(_0x4c0979){if(_0x4c0979){return _0x4dc7cc['download'](path[_0x624a('0x80')](_0x54bd4a,_0x4c0979[_0x624a('0x79')]['basename']));}})[_0x624a('0x2c')](handleError(_0x4dc7cc,null));};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.events.js b/server/api/faxMessage/faxMessage.events.js
index 519dab3..7dcccf0 100644
--- a/server/api/faxMessage/faxMessage.events.js
+++ b/server/api/faxMessage/faxMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb263=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxMessage'];(function(_0x6481e6,_0x1014dd){var _0x289961=function(_0x434ca2){while(--_0x434ca2){_0x6481e6['push'](_0x6481e6['shift']());}};_0x289961(++_0x1014dd);}(_0xb263,0x1d6));var _0x3b26=function(_0x19cbbd,_0x2de6f5){_0x19cbbd=_0x19cbbd-0x0;var _0x2d0f30=_0xb263[_0x19cbbd];return _0x2d0f30;};'use strict';var EventEmitter=require(_0x3b26('0x0'));var FaxMessage=require(_0x3b26('0x1'))['db'][_0x3b26('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x3b26('0x3')](0x0);var events={'afterCreate':_0x3b26('0x4'),'afterUpdate':_0x3b26('0x5'),'afterDestroy':_0x3b26('0x6')};function emitEvent(_0x533439){return function(_0x443e6c,_0x552fc0,_0x4d8c5){FaxMessageEvents['emit'](_0x533439+':'+_0x443e6c['id'],_0x443e6c);FaxMessageEvents[_0x3b26('0x7')](_0x533439,_0x443e6c);_0x4d8c5(null);};}for(var e in events){if(events[_0x3b26('0x8')](e)){var event=events[e];FaxMessage[_0x3b26('0x9')](e,emitEvent(event));}}module[_0x3b26('0xa')]=FaxMessageEvents;
\ No newline at end of file
+var _0xfd65=['exports','FaxMessage','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x60df74,_0x458e29){var _0x5ee872=function(_0x356888){while(--_0x356888){_0x60df74['push'](_0x60df74['shift']());}};_0x5ee872(++_0x458e29);}(_0xfd65,0xc7));var _0x5fd6=function(_0x3b0731,_0xcf9925){_0x3b0731=_0x3b0731-0x0;var _0x4204d7=_0xfd65[_0x3b0731];return _0x4204d7;};'use strict';var EventEmitter=require('events');var FaxMessage=require('../../mysqldb')['db'][_0x5fd6('0x0')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x5fd6('0x1')](0x0);var events={'afterCreate':_0x5fd6('0x2'),'afterUpdate':_0x5fd6('0x3'),'afterDestroy':_0x5fd6('0x4')};function emitEvent(_0x58b430){return function(_0x55e4a4,_0x201099,_0x12cdce){FaxMessageEvents[_0x5fd6('0x5')](_0x58b430+':'+_0x55e4a4['id'],_0x55e4a4);FaxMessageEvents[_0x5fd6('0x5')](_0x58b430,_0x55e4a4);_0x12cdce(null);};}for(var e in events){if(events[_0x5fd6('0x6')](e)){var event=events[e];FaxMessage[_0x5fd6('0x7')](e,emitEvent(event));}}module[_0x5fd6('0x8')]=FaxMessageEvents;
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.model.js b/server/api/faxMessage/faxMessage.model.js
index 2d186de..9f1baa1 100644
--- a/server/api/faxMessage/faxMessage.model.js
+++ b/server/api/faxMessage/faxMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x53c5=['isNil','findOne','then','update','createdAt','catch','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment','./faxMessage.attributes','exports','define','FaxMessage','fax_messages','fti_fax_messages','body','FULLTEXT','models','direction','toLowerCase'];(function(_0x161ec6,_0x580285){var _0x477176=function(_0x1afa52){while(--_0x1afa52){_0x161ec6['push'](_0x161ec6['shift']());}};_0x477176(++_0x580285);}(_0x53c5,0xf6));var _0x553c=function(_0x298327,_0x8426da){_0x298327=_0x298327-0x0;var _0x898f57=_0x53c5[_0x298327];return _0x898f57;};'use strict';var _=require(_0x553c('0x0'));var util=require(_0x553c('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x553c('0x2'));var rp=require(_0x553c('0x3'));var fs=require('fs');var path=require(_0x553c('0x4'));var rimraf=require(_0x553c('0x5'));var config=require(_0x553c('0x6'));var attributes=require(_0x553c('0x7'));module[_0x553c('0x8')]=function(_0x504ab2,_0x21575a){return _0x504ab2[_0x553c('0x9')](_0x553c('0xa'),attributes,{'tableName':_0x553c('0xb'),'paranoid':![],'indexes':[{'name':_0x553c('0xc'),'fields':[_0x553c('0xd')],'type':_0x553c('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x3e2bc5,_0x4e2cf3,_0x183d2d){var _0x363391=_0x504ab2[_0x553c('0xf')];var _0x35deb7=_0x3e2bc5['get']({'plain':!![]});if(_0x35deb7[_0x553c('0x10')][_0x553c('0x11')]()==='in'||_0x35deb7[_0x553c('0x10')][_0x553c('0x11')]()==='out'&&!_0x35deb7['secret']&&!_[_0x553c('0x12')](_0x35deb7['UserId'])){_0x363391['FaxInteraction'][_0x553c('0x13')]({'where':{'id':_0x35deb7['FaxInteractionId']}})[_0x553c('0x14')](function(_0x49ce8a){if(_0x49ce8a){_0x49ce8a[_0x553c('0x15')]({'lastMsgAt':_0x35deb7[_0x553c('0x16')],'lastMsgDirection':_0x35deb7['direction'][_0x553c('0x11')]()});}})[_0x553c('0x17')](function(_0x4fad00){console['error'](_0x4fad00);});}_0x183d2d();}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x7640=['../../config/environment','./faxMessage.attributes','FaxMessage','fti_fax_messages','body','models','get','direction','toLowerCase','out','isNil','UserId','FaxInteraction','findOne','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','rimraf'];(function(_0x5437e2,_0x929f89){var _0x1d7022=function(_0x5035a1){while(--_0x5035a1){_0x5437e2['push'](_0x5437e2['shift']());}};_0x1d7022(++_0x929f89);}(_0x7640,0x19d));var _0x0764=function(_0x2e4e19,_0x493b50){_0x2e4e19=_0x2e4e19-0x0;var _0x9ba20b=_0x7640[_0x2e4e19];return _0x9ba20b;};'use strict';var _=require(_0x0764('0x0'));var util=require(_0x0764('0x1'));var logger=require(_0x0764('0x2'))(_0x0764('0x3'));var moment=require(_0x0764('0x4'));var BPromise=require('bluebird');var rp=require(_0x0764('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0764('0x6'));var config=require(_0x0764('0x7'));var attributes=require(_0x0764('0x8'));module['exports']=function(_0x3f4986,_0x2db758){return _0x3f4986['define'](_0x0764('0x9'),attributes,{'tableName':'fax_messages','paranoid':![],'indexes':[{'name':_0x0764('0xa'),'fields':[_0x0764('0xb')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x130aaf,_0x419e82,_0x452faf){var _0x1e807f=_0x3f4986[_0x0764('0xc')];var _0x352597=_0x130aaf[_0x0764('0xd')]({'plain':!![]});if(_0x352597[_0x0764('0xe')][_0x0764('0xf')]()==='in'||_0x352597[_0x0764('0xe')]['toLowerCase']()===_0x0764('0x10')&&!_0x352597['secret']&&!_[_0x0764('0x11')](_0x352597[_0x0764('0x12')])){_0x1e807f[_0x0764('0x13')][_0x0764('0x14')]({'where':{'id':_0x352597['FaxInteractionId']}})[_0x0764('0x15')](function(_0x61a2ab){if(_0x61a2ab){_0x61a2ab[_0x0764('0x16')]({'lastMsgAt':_0x352597[_0x0764('0x17')],'lastMsgDirection':_0x352597[_0x0764('0xe')][_0x0764('0xf')]()});}})[_0x0764('0x18')](function(_0xcdd2ab){console[_0x0764('0x19')](_0xcdd2ab);});}_0x452faf();}},'charset':_0x0764('0x1a'),'collate':_0x0764('0x1b')});};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.rpc.js b/server/api/faxMessage/faxMessage.rpc.js
index 51e9309..d3abbd6 100644
--- a/server/api/faxMessage/faxMessage.rpc.js
+++ b/server/api/faxMessage/faxMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbacd=['message','result','catch','CreateFaxMessage','create','options','raw','UpdateFaxMessage','FaxMessage','update','body','where','attributes','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./faxMessage.socket','register','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x11a220,_0x4e470a){var _0x20d8fe=function(_0xbedfd){while(--_0xbedfd){_0x11a220['push'](_0x11a220['shift']());}};_0x20d8fe(++_0x4e470a);}(_0xbacd,0x1c5));var _0xdbac=function(_0x3b9685,_0x336638){_0x3b9685=_0x3b9685-0x0;var _0x961cdd=_0xbacd[_0x3b9685];return _0x961cdd;};'use strict';var _=require(_0xdbac('0x0'));var util=require(_0xdbac('0x1'));var moment=require('moment');var BPromise=require(_0xdbac('0x2'));var rs=require(_0xdbac('0x3'));var fs=require('fs');var Redis=require(_0xdbac('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xdbac('0x5'));var logger=require(_0xdbac('0x6'))(_0xdbac('0x7'));var config=require(_0xdbac('0x8'));var jayson=require(_0xdbac('0x9'));var client=jayson[_0xdbac('0xa')][_0xdbac('0xb')]({'port':0x232a});config[_0xdbac('0xc')]=_[_0xdbac('0xd')](config[_0xdbac('0xc')],{'host':_0xdbac('0xe'),'port':0x18eb});var socket=require(_0xdbac('0xf'))(new Redis(config[_0xdbac('0xc')]));require(_0xdbac('0x10'))[_0xdbac('0x11')](socket);function respondWithRpcPromise(_0x4d025f,_0x18f3ad,_0x258f7e){return new BPromise(function(_0x5abcff,_0x30a135){return client['request'](_0x4d025f,_0x258f7e)[_0xdbac('0x12')](function(_0x354884){logger[_0xdbac('0x13')](_0xdbac('0x14'),_0x18f3ad,_0xdbac('0x15'));logger[_0xdbac('0x16')](_0xdbac('0x17'),_0x18f3ad,_0xdbac('0x15'),JSON[_0xdbac('0x18')](_0x354884));if(_0x354884['error']){if(_0x354884[_0xdbac('0x19')][_0xdbac('0x1a')]===0x1f4){logger[_0xdbac('0x19')](_0xdbac('0x14'),_0x18f3ad,_0x354884[_0xdbac('0x19')][_0xdbac('0x1b')]);return _0x30a135(_0x354884[_0xdbac('0x19')][_0xdbac('0x1b')]);}logger['error'](_0xdbac('0x14'),_0x18f3ad,_0x354884[_0xdbac('0x19')][_0xdbac('0x1b')]);return _0x5abcff(_0x354884['error'][_0xdbac('0x1b')]);}else{logger[_0xdbac('0x13')](_0xdbac('0x14'),_0x18f3ad,_0xdbac('0x15'));_0x5abcff(_0x354884[_0xdbac('0x1c')][_0xdbac('0x1b')]);}})[_0xdbac('0x1d')](function(_0x43fea9){logger[_0xdbac('0x19')](_0xdbac('0x14'),_0x18f3ad,_0x43fea9);_0x30a135(_0x43fea9);});});}exports[_0xdbac('0x1e')]=function(_0x9c74a5){var _0x5ec67c=this;return new Promise(function(_0x3de274,_0x323801){return db['FaxMessage'][_0xdbac('0x1f')](_0x9c74a5['body'],{'raw':_0x9c74a5[_0xdbac('0x20')]?_0x9c74a5['options'][_0xdbac('0x21')]===undefined?!![]:![]:!![]})[_0xdbac('0x12')](function(_0x20642c){logger[_0xdbac('0x13')](_0xdbac('0x1e'),_0x9c74a5);logger[_0xdbac('0x16')](_0xdbac('0x1e'),_0x9c74a5,JSON['stringify'](_0x20642c));_0x3de274(_0x20642c);})[_0xdbac('0x1d')](function(_0x822567){logger[_0xdbac('0x19')](_0xdbac('0x1e'),_0x822567[_0xdbac('0x1b')],_0x9c74a5);_0x323801(_0x5ec67c[_0xdbac('0x19')](0x1f4,_0x822567[_0xdbac('0x1b')]));});});};exports[_0xdbac('0x22')]=function(_0x1a8e46){var _0x175ebc=this;return new Promise(function(_0x2cb8b4,_0x1ea3c3){return db[_0xdbac('0x23')][_0xdbac('0x24')](_0x1a8e46[_0xdbac('0x25')],{'raw':_0x1a8e46[_0xdbac('0x20')]?_0x1a8e46[_0xdbac('0x20')][_0xdbac('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1a8e46[_0xdbac('0x20')]?_0x1a8e46[_0xdbac('0x20')][_0xdbac('0x26')]||null:null,'attributes':_0x1a8e46['options']?_0x1a8e46[_0xdbac('0x20')][_0xdbac('0x27')]||null:null,'limit':_0x1a8e46[_0xdbac('0x20')]?_0x1a8e46[_0xdbac('0x20')]['limit']||null:null})['then'](function(_0x10c3c8){logger[_0xdbac('0x13')](_0xdbac('0x22'),_0x1a8e46);logger[_0xdbac('0x16')]('UpdateFaxMessage',_0x1a8e46,JSON[_0xdbac('0x18')](_0x10c3c8));_0x2cb8b4(_0x10c3c8);})[_0xdbac('0x1d')](function(_0x1659e4){logger[_0xdbac('0x19')](_0xdbac('0x22'),_0x1659e4[_0xdbac('0x1b')],_0x1a8e46);_0x1ea3c3(_0x175ebc[_0xdbac('0x19')](0x1f4,_0x1659e4[_0xdbac('0x1b')]));});});};
\ No newline at end of file
+var _0x39d9=['UpdateFaxMessage','options','attributes','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','defaults','redis','localhost','socket.io-emitter','./faxMessage.socket','register','request','then','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxMessage,\x20%s,\x20%s','message','info','catch','CreateFaxMessage','FaxMessage','create','body','raw'];(function(_0x2ce1af,_0x18d743){var _0x29440f=function(_0x5ac105){while(--_0x5ac105){_0x2ce1af['push'](_0x2ce1af['shift']());}};_0x29440f(++_0x18d743);}(_0x39d9,0x17f));var _0x939d=function(_0x6e3157,_0x3c5117){_0x6e3157=_0x6e3157-0x0;var _0x2729eb=_0x39d9[_0x6e3157];return _0x2729eb;};'use strict';var _=require(_0x939d('0x0'));var util=require(_0x939d('0x1'));var moment=require(_0x939d('0x2'));var BPromise=require(_0x939d('0x3'));var rs=require(_0x939d('0x4'));var fs=require('fs');var Redis=require(_0x939d('0x5'));var db=require(_0x939d('0x6'))['db'];var utils=require(_0x939d('0x7'));var logger=require('../../config/logger')(_0x939d('0x8'));var config=require(_0x939d('0x9'));var jayson=require(_0x939d('0xa'));var client=jayson['client'][_0x939d('0xb')]({'port':0x232a});config['redis']=_[_0x939d('0xc')](config[_0x939d('0xd')],{'host':_0x939d('0xe'),'port':0x18eb});var socket=require(_0x939d('0xf'))(new Redis(config[_0x939d('0xd')]));require(_0x939d('0x10'))[_0x939d('0x11')](socket);function respondWithRpcPromise(_0x553693,_0x5566a5,_0x1187a9){return new BPromise(function(_0x2efa9e,_0x106bc9){return client[_0x939d('0x12')](_0x553693,_0x1187a9)[_0x939d('0x13')](function(_0x4be816){logger['info']('FaxMessage,\x20%s,\x20%s',_0x5566a5,_0x939d('0x14'));logger[_0x939d('0x15')](_0x939d('0x16'),_0x5566a5,'request\x20sent',JSON[_0x939d('0x17')](_0x4be816));if(_0x4be816[_0x939d('0x18')]){if(_0x4be816[_0x939d('0x18')][_0x939d('0x19')]===0x1f4){logger[_0x939d('0x18')](_0x939d('0x1a'),_0x5566a5,_0x4be816[_0x939d('0x18')][_0x939d('0x1b')]);return _0x106bc9(_0x4be816[_0x939d('0x18')]['message']);}logger['error'](_0x939d('0x1a'),_0x5566a5,_0x4be816['error'][_0x939d('0x1b')]);return _0x2efa9e(_0x4be816[_0x939d('0x18')]['message']);}else{logger[_0x939d('0x1c')](_0x939d('0x1a'),_0x5566a5,_0x939d('0x14'));_0x2efa9e(_0x4be816['result'][_0x939d('0x1b')]);}})[_0x939d('0x1d')](function(_0x2ff0db){logger[_0x939d('0x18')](_0x939d('0x1a'),_0x5566a5,_0x2ff0db);_0x106bc9(_0x2ff0db);});});}exports[_0x939d('0x1e')]=function(_0x4d8811){var _0x4c960c=this;return new Promise(function(_0x2a6fa6,_0x586626){return db[_0x939d('0x1f')][_0x939d('0x20')](_0x4d8811[_0x939d('0x21')],{'raw':_0x4d8811['options']?_0x4d8811['options'][_0x939d('0x22')]===undefined?!![]:![]:!![]})['then'](function(_0x5483e0){logger['info'](_0x939d('0x1e'),_0x4d8811);logger[_0x939d('0x15')](_0x939d('0x1e'),_0x4d8811,JSON[_0x939d('0x17')](_0x5483e0));_0x2a6fa6(_0x5483e0);})['catch'](function(_0x215b66){logger[_0x939d('0x18')]('CreateFaxMessage',_0x215b66[_0x939d('0x1b')],_0x4d8811);_0x586626(_0x4c960c['error'](0x1f4,_0x215b66['message']));});});};exports[_0x939d('0x23')]=function(_0x3ab3b2){var _0x448364=this;return new Promise(function(_0x30f643,_0x4ab0e6){return db[_0x939d('0x1f')]['update'](_0x3ab3b2[_0x939d('0x21')],{'raw':_0x3ab3b2[_0x939d('0x24')]?_0x3ab3b2[_0x939d('0x24')][_0x939d('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3ab3b2[_0x939d('0x24')]?_0x3ab3b2[_0x939d('0x24')]['where']||null:null,'attributes':_0x3ab3b2[_0x939d('0x24')]?_0x3ab3b2[_0x939d('0x24')][_0x939d('0x25')]||null:null,'limit':_0x3ab3b2[_0x939d('0x24')]?_0x3ab3b2[_0x939d('0x24')]['limit']||null:null})['then'](function(_0x254072){logger[_0x939d('0x1c')](_0x939d('0x23'),_0x3ab3b2);logger[_0x939d('0x15')](_0x939d('0x23'),_0x3ab3b2,JSON[_0x939d('0x17')](_0x254072));_0x30f643(_0x254072);})['catch'](function(_0x2b1ef7){logger['error'](_0x939d('0x23'),_0x2b1ef7[_0x939d('0x1b')],_0x3ab3b2);_0x4ab0e6(_0x448364['error'](0x1f4,_0x2b1ef7['message']));});});};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.socket.js b/server/api/faxMessage/faxMessage.socket.js
index 4c8e976..36c8b00 100644
--- a/server/api/faxMessage/faxMessage.socket.js
+++ b/server/api/faxMessage/faxMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x535f=['removeListener','register','faxMessage:','save','remove','emit'];(function(_0x2d9751,_0x14a273){var _0x144da6=function(_0x4001b3){while(--_0x4001b3){_0x2d9751['push'](_0x2d9751['shift']());}};_0x144da6(++_0x14a273);}(_0x535f,0x111));var _0xf535=function(_0x2d8783,_0x2d73c6){_0x2d8783=_0x2d8783-0x0;var _0x1d04f1=_0x535f[_0x2d8783];return _0x1d04f1;};'use strict';var FaxMessageEvents=require('./faxMessage.events');var events=[_0xf535('0x0'),_0xf535('0x1'),'update'];function createListener(_0x3d9c4d,_0x3a8c17){return function(_0x64d0bc){_0x3a8c17[_0xf535('0x2')](_0x3d9c4d,_0x64d0bc);};}function removeListener(_0x4ff0b3,_0xd1ee93){return function(){FaxMessageEvents[_0xf535('0x3')](_0x4ff0b3,_0xd1ee93);};}exports[_0xf535('0x4')]=function(_0x30936d){for(var _0x41ca74=0x0,_0xc74104=events['length'];_0x41ca74<_0xc74104;_0x41ca74++){var _0x510b86=events[_0x41ca74];var _0x17f72e=createListener(_0xf535('0x5')+_0x510b86,_0x30936d);FaxMessageEvents['on'](_0x510b86,_0x17f72e);}};
\ No newline at end of file
+var _0x38ca=['removeListener','faxMessage:','./faxMessage.events','remove','update','emit'];(function(_0x125a01,_0x220d36){var _0xf5329b=function(_0x13f407){while(--_0x13f407){_0x125a01['push'](_0x125a01['shift']());}};_0xf5329b(++_0x220d36);}(_0x38ca,0xb0));var _0xa38c=function(_0x54806c,_0x4b660d){_0x54806c=_0x54806c-0x0;var _0x543398=_0x38ca[_0x54806c];return _0x543398;};'use strict';var FaxMessageEvents=require(_0xa38c('0x0'));var events=['save',_0xa38c('0x1'),_0xa38c('0x2')];function createListener(_0x1cf953,_0x85c69f){return function(_0x548b85){_0x85c69f[_0xa38c('0x3')](_0x1cf953,_0x548b85);};}function removeListener(_0x2ccf9d,_0x2b713d){return function(){FaxMessageEvents[_0xa38c('0x4')](_0x2ccf9d,_0x2b713d);};}exports['register']=function(_0xe4cde2){for(var _0x4487ef=0x0,_0x5a54ee=events['length'];_0x4487ef<_0x5a54ee;_0x4487ef++){var _0x36830c=events[_0x4487ef];var _0x2b1a3e=createListener(_0xa38c('0x5')+_0x36830c,_0xe4cde2);FaxMessageEvents['on'](_0x36830c,_0x2b1a3e);}};
\ No newline at end of file
diff --git a/server/api/faxMessage/index.js b/server/api/faxMessage/index.js
index 99f8b15..71efad7 100644
--- a/server/api/faxMessage/index.js
+++ b/server/api/faxMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4975=['/:id/reject','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxMessage.controller','get','isAuthenticated','describe','/:id/download','download','post','tracked','fax','/:id','update','put','/:id/accept','accept'];(function(_0x49b0ea,_0x35200c){var _0x1aa8c6=function(_0xf397e0){while(--_0xf397e0){_0x49b0ea['push'](_0x49b0ea['shift']());}};_0x1aa8c6(++_0x35200c);}(_0x4975,0x86));var _0x5497=function(_0x34dd23,_0x4f6a9e){_0x34dd23=_0x34dd23-0x0;var _0x464f65=_0x4975[_0x34dd23];return _0x464f65;};'use strict';var multer=require(_0x5497('0x0'));var util=require('util');var path=require(_0x5497('0x1'));var timeout=require(_0x5497('0x2'));var express=require(_0x5497('0x3'));var router=express[_0x5497('0x4')]();var auth=require(_0x5497('0x5'));var interaction=require(_0x5497('0x6'));var config=require(_0x5497('0x7'));var controller=require(_0x5497('0x8'));router[_0x5497('0x9')]('/',auth[_0x5497('0xa')](),controller['index']);router[_0x5497('0x9')]('/describe',auth[_0x5497('0xa')](),controller[_0x5497('0xb')]);router[_0x5497('0x9')]('/:id',auth[_0x5497('0xa')](),controller['show']);router[_0x5497('0x9')](_0x5497('0xc'),auth[_0x5497('0xa')](),controller[_0x5497('0xd')]);router[_0x5497('0xe')]('/',auth[_0x5497('0xa')](),interaction[_0x5497('0xf')](_0x5497('0x10'),'faxmessage:create'),controller['create']);router['put'](_0x5497('0x11'),auth[_0x5497('0xa')](),controller[_0x5497('0x12')]);router[_0x5497('0x13')](_0x5497('0x14'),auth[_0x5497('0xa')](),controller[_0x5497('0x15')]);router[_0x5497('0x13')](_0x5497('0x16'),auth[_0x5497('0xa')](),controller['reject']);router[_0x5497('0x17')]('/:id',auth[_0x5497('0xa')](),controller[_0x5497('0x18')]);module[_0x5497('0x19')]=router;
\ No newline at end of file
+var _0xf2e3=['accept','reject','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxMessage.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/download','download','post','tracked','fax','faxmessage:create','create','put','/:id/accept'];(function(_0x330776,_0x167574){var _0x43c5d7=function(_0x52697a){while(--_0x52697a){_0x330776['push'](_0x330776['shift']());}};_0x43c5d7(++_0x167574);}(_0xf2e3,0x9b));var _0x3f2e=function(_0x59d89e,_0x55edf5){_0x59d89e=_0x59d89e-0x0;var _0x554e93=_0xf2e3[_0x59d89e];return _0x554e93;};'use strict';var multer=require(_0x3f2e('0x0'));var util=require('util');var path=require(_0x3f2e('0x1'));var timeout=require(_0x3f2e('0x2'));var express=require(_0x3f2e('0x3'));var router=express[_0x3f2e('0x4')]();var auth=require(_0x3f2e('0x5'));var interaction=require(_0x3f2e('0x6'));var config=require(_0x3f2e('0x7'));var controller=require(_0x3f2e('0x8'));router[_0x3f2e('0x9')]('/',auth['isAuthenticated'](),controller[_0x3f2e('0xa')]);router[_0x3f2e('0x9')](_0x3f2e('0xb'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0xd')]);router[_0x3f2e('0x9')](_0x3f2e('0xe'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0xf')]);router[_0x3f2e('0x9')](_0x3f2e('0x10'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x11')]);router[_0x3f2e('0x12')]('/',auth[_0x3f2e('0xc')](),interaction[_0x3f2e('0x13')](_0x3f2e('0x14'),_0x3f2e('0x15')),controller[_0x3f2e('0x16')]);router['put'](_0x3f2e('0xe'),auth[_0x3f2e('0xc')](),controller['update']);router[_0x3f2e('0x17')](_0x3f2e('0x18'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x19')]);router[_0x3f2e('0x17')]('/:id/reject',auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x1a')]);router[_0x3f2e('0x1b')]('/:id',auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x1c')]);module[_0x3f2e('0x1d')]=router;
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.attributes.js b/server/api/faxQueue/faxQueue.attributes.js
index 65b4ffc..207e195 100644
--- a/server/api/faxQueue/faxQueue.attributes.js
+++ b/server/api/faxQueue/faxQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe1fd=['sequelize','exports','STRING','name','INTEGER','ENUM','rrmemory','beepall','roundrobin'];(function(_0x2b8a71,_0x1d4af9){var _0x125463=function(_0x39f7d8){while(--_0x39f7d8){_0x2b8a71['push'](_0x2b8a71['shift']());}};_0x125463(++_0x1d4af9);}(_0xe1fd,0x1dd));var _0xde1f=function(_0x3d21a5,_0x450615){_0x3d21a5=_0x3d21a5-0x0;var _0x34323f=_0xe1fd[_0x3d21a5];return _0x34323f;};'use strict';var Sequelize=require(_0xde1f('0x0'));module[_0xde1f('0x1')]={'name':{'type':Sequelize[_0xde1f('0x2')],'unique':_0xde1f('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xde1f('0x2')]},'timeout':{'type':Sequelize[_0xde1f('0x4')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xde1f('0x5')](_0xde1f('0x6'),_0xde1f('0x7'),_0xde1f('0x8')),'allowNull':![]},'lastAgent':{'type':Sequelize[_0xde1f('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x3842=['STRING','INTEGER','rrmemory','beepall','roundrobin','exports'];(function(_0x1f1c98,_0x132e98){var _0x5ee779=function(_0x38e5ce){while(--_0x38e5ce){_0x1f1c98['push'](_0x1f1c98['shift']());}};_0x5ee779(++_0x132e98);}(_0x3842,0x14f));var _0x2384=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3842[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require('sequelize');module[_0x2384('0x0')]={'name':{'type':Sequelize[_0x2384('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x2384('0x2')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x2384('0x3'),_0x2384('0x4'),_0x2384('0x5')),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x2384('0x2')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.controller.js b/server/api/faxQueue/faxQueue.controller.js
index c51c4bc..3349db6 100644
--- a/server/api/faxQueue/faxQueue.controller.js
+++ b/server/api/faxQueue/faxQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6274=['create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserFaxQueue','nolimit','sort','FaxQueueId','User','UserId','faxPause','updatedAt','createdAt','format','SIP','getTeams','Team','hasOwnProperty','addTeams','Agents','online','voicePause','interface','flatMap','sequelize','transaction','each','findOrCreate','forEach','emit','userFaxQueue:save','removeTeams','ids','select','tq.TeamId','from','team_has_fax_queues','user_has_teams','FaxQueueId\x20=\x20?','clone','push','toString','QueryTypes','SELECT','every','TeamId','includes','all','compact','value','isEmpty','removeAgents','addAgents','omit','spread','isArray','userFaxQueue:remove','getAgents','html-pdf','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','register','sendStatus','status','json','count','offset','limit','set','Content-Range','reject','update','then','destroy','get','FaxQueues','UserProfileResource','end','error','stack','name','send','index','FaxQueue','rawAttributes','model','keys','filters','query','intersection','fields','attributes','length','order','where','pick','filter','merge','map','type','field','options','includeAll','include','findAll','rows','catch','show','params','find'];(function(_0x1e2d94,_0x5aefee){var _0x50dddc=function(_0x5417db){while(--_0x5417db){_0x1e2d94['push'](_0x1e2d94['shift']());}};_0x50dddc(++_0x5aefee);}(_0x6274,0x159));var _0x4627=function(_0xce711,_0x40238e){_0xce711=_0xce711-0x0;var _0x187426=_0x6274[_0xce711];return _0x187426;};'use strict';var pdf=require(_0x4627('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x4627('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4627('0x2'));var rp=require(_0x4627('0x3'));var moment=require('moment');var BPromise=require(_0x4627('0x4'));var Mustache=require(_0x4627('0x5'));var util=require(_0x4627('0x6'));var path=require(_0x4627('0x7'));var sox=require(_0x4627('0x8'));var csv=require(_0x4627('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x4627('0xa'));var crypto=require(_0x4627('0xb'));var jsforce=require(_0x4627('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x4627('0x9'));var querystring=require('querystring');var Papa=require(_0x4627('0xd'));var Redis=require(_0x4627('0xe'));var authService=require(_0x4627('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x4627('0x10'));var logger=require('../../config/logger')(_0x4627('0x11'));var utils=require(_0x4627('0x12'));var config=require(_0x4627('0x13'));var db=require(_0x4627('0x14'))['db'];config[_0x4627('0x15')]=_[_0x4627('0x16')](config[_0x4627('0x15')],{'host':_0x4627('0x17'),'port':0x18eb});var socket=require(_0x4627('0x18'))(new Redis(config[_0x4627('0x15')]));require(_0x4627('0x19'))[_0x4627('0x1a')](socket);function respondWithStatusCode(_0x4edf3d,_0x97a1ae){_0x97a1ae=_0x97a1ae||0xcc;return function(_0x4f8ed7){if(_0x4f8ed7){return _0x4edf3d[_0x4627('0x1b')](_0x97a1ae);}return _0x4edf3d[_0x4627('0x1c')](_0x97a1ae)['end']();};}function respondWithResult(_0x55e183,_0x5814f2){_0x5814f2=_0x5814f2||0xc8;return function(_0x1aa7b7){if(_0x1aa7b7){return _0x55e183[_0x4627('0x1c')](_0x5814f2)[_0x4627('0x1d')](_0x1aa7b7);}};}function respondWithFilteredResult(_0x4392ba,_0x2ef97d){return function(_0x4def4d){if(_0x4def4d){var _0x6f89a5=_0x4def4d[_0x4627('0x1e')],_0x2dacbe=_0x2ef97d[_0x4627('0x1f')],_0x1ab5d0=_0x2ef97d[_0x4627('0x1f')]+_0x2ef97d[_0x4627('0x20')],_0x4aa308;if(_0x1ab5d0>=_0x6f89a5){_0x1ab5d0=_0x6f89a5;_0x4aa308=0xc8;}else{_0x4aa308=0xce;}_0x4392ba[_0x4627('0x1c')](_0x4aa308);return _0x4392ba[_0x4627('0x21')](_0x4627('0x22'),_0x2dacbe+'-'+_0x1ab5d0+'/'+_0x6f89a5)['json'](_0x4def4d);}return null;};}function patchUpdates(_0x25cf33){return function(_0x111dad){try{jsonpatch['apply'](_0x111dad,_0x25cf33,!![]);}catch(_0x5d7540){return BPromise[_0x4627('0x23')](_0x5d7540);}return _0x111dad['save']();};}function saveUpdates(_0x4de471,_0x113655){return function(_0x44134a){if(_0x44134a){return _0x44134a[_0x4627('0x24')](_0x4de471)[_0x4627('0x25')](function(_0x549e4b){return _0x549e4b;});}return null;};}function removeEntity(_0x936794,_0x1dca92){return function(_0x1585e4){if(_0x1585e4){return _0x1585e4[_0x4627('0x26')]()[_0x4627('0x25')](function(){var _0x3e1da4=_0x1585e4[_0x4627('0x27')]({'plain':!![]});var _0x2f0d88=_0x4627('0x28');return db[_0x4627('0x29')]['destroy']({'where':{'type':_0x2f0d88,'resourceId':_0x3e1da4['id']}})['then'](function(){return _0x1585e4;});})[_0x4627('0x25')](function(){_0x936794['status'](0xcc)[_0x4627('0x2a')]();});}};}function handleEntityNotFound(_0x460b2e,_0x1cb08c){return function(_0x1b0c59){if(!_0x1b0c59){_0x460b2e[_0x4627('0x1b')](0x194);}return _0x1b0c59;};}function handleError(_0x2a0d50,_0x589f3e){_0x589f3e=_0x589f3e||0x1f4;return function(_0x39ab27){logger[_0x4627('0x2b')](_0x39ab27[_0x4627('0x2c')]);if(_0x39ab27[_0x4627('0x2d')]){delete _0x39ab27[_0x4627('0x2d')];}_0x2a0d50[_0x4627('0x1c')](_0x589f3e)[_0x4627('0x2e')](_0x39ab27);};}exports[_0x4627('0x2f')]=function(_0x2c3687,_0x4172c8){var _0x3f551c={},_0x3a451f={},_0x8b8d90={'count':0x0,'rows':[]};var _0x535956=db[_0x4627('0x30')][_0x4627('0x31')];_0x3a451f[_0x4627('0x32')]=_[_0x4627('0x33')](_0x535956);_0x3a451f['query']=_['keys'](_0x2c3687['query']);_0x3a451f[_0x4627('0x34')]=_['intersection'](_0x3a451f[_0x4627('0x32')],_0x3a451f[_0x4627('0x35')]);_0x3f551c['attributes']=_[_0x4627('0x36')](_0x3a451f['model'],qs['fields'](_0x2c3687[_0x4627('0x35')][_0x4627('0x37')]));_0x3f551c[_0x4627('0x38')]=_0x3f551c[_0x4627('0x38')][_0x4627('0x39')]?_0x3f551c[_0x4627('0x38')]:_0x3a451f[_0x4627('0x32')];if(!_0x2c3687['query']['hasOwnProperty']('nolimit')){_0x3f551c['limit']=qs[_0x4627('0x20')](_0x2c3687[_0x4627('0x35')]['limit']);_0x3f551c['offset']=qs[_0x4627('0x1f')](_0x2c3687[_0x4627('0x35')]['offset']);}_0x3f551c[_0x4627('0x3a')]=qs['sort'](_0x2c3687[_0x4627('0x35')]['sort']);_0x3f551c[_0x4627('0x3b')]=qs[_0x4627('0x34')](_[_0x4627('0x3c')](_0x2c3687['query'],_0x3a451f[_0x4627('0x34')]));if(_0x2c3687[_0x4627('0x35')][_0x4627('0x3d')]){_0x3f551c['where']=_[_0x4627('0x3e')](_0x3f551c['where'],{'$or':_[_0x4627('0x3f')](_0x535956,function(_0x464ba3){if(_0x464ba3[_0x4627('0x40')]['key']!=='VIRTUAL'){var _0x221043={};_0x221043[_0x464ba3[_0x4627('0x41')]]={'$like':'%'+_0x2c3687[_0x4627('0x35')][_0x4627('0x3d')]+'%'};return _0x221043;}})});}_0x3f551c=_[_0x4627('0x3e')]({},_0x3f551c,_0x2c3687[_0x4627('0x42')]);var _0x5ec73d={'where':_0x3f551c[_0x4627('0x3b')]};return db[_0x4627('0x30')][_0x4627('0x1e')](_0x5ec73d)[_0x4627('0x25')](function(_0x6532ff){_0x8b8d90['count']=_0x6532ff;if(_0x2c3687[_0x4627('0x35')][_0x4627('0x43')]){_0x3f551c[_0x4627('0x44')]=[{'all':!![]}];}return db[_0x4627('0x30')][_0x4627('0x45')](_0x3f551c);})[_0x4627('0x25')](function(_0x46b588){_0x8b8d90[_0x4627('0x46')]=_0x46b588;return _0x8b8d90;})[_0x4627('0x25')](respondWithFilteredResult(_0x4172c8,_0x3f551c))[_0x4627('0x47')](handleError(_0x4172c8,null));};exports[_0x4627('0x48')]=function(_0xc80a67,_0x3e0078){var _0x4741d4={'raw':!![],'where':{'id':_0xc80a67[_0x4627('0x49')]['id']}},_0x4fc974={};_0x4fc974[_0x4627('0x32')]=_[_0x4627('0x33')](db['FaxQueue'][_0x4627('0x31')]);_0x4fc974[_0x4627('0x35')]=_[_0x4627('0x33')](_0xc80a67[_0x4627('0x35')]);_0x4fc974[_0x4627('0x34')]=_[_0x4627('0x36')](_0x4fc974['model'],_0x4fc974[_0x4627('0x35')]);_0x4741d4[_0x4627('0x38')]=_[_0x4627('0x36')](_0x4fc974[_0x4627('0x32')],qs[_0x4627('0x37')](_0xc80a67[_0x4627('0x35')][_0x4627('0x37')]));_0x4741d4[_0x4627('0x38')]=_0x4741d4[_0x4627('0x38')][_0x4627('0x39')]?_0x4741d4[_0x4627('0x38')]:_0x4fc974[_0x4627('0x32')];if(_0xc80a67[_0x4627('0x35')][_0x4627('0x43')]){_0x4741d4['include']=[{'all':!![]}];}_0x4741d4=_[_0x4627('0x3e')]({},_0x4741d4,_0xc80a67['options']);return db['FaxQueue'][_0x4627('0x4a')](_0x4741d4)[_0x4627('0x25')](handleEntityNotFound(_0x3e0078,null))[_0x4627('0x25')](respondWithResult(_0x3e0078,null))[_0x4627('0x47')](handleError(_0x3e0078,null));};exports[_0x4627('0x4b')]=function(_0x1c376f,_0x36350d){return db[_0x4627('0x30')][_0x4627('0x4b')](_0x1c376f[_0x4627('0x4c')],{})['then'](function(_0x1e73b3){var _0x287489=_0x1c376f[_0x4627('0x4d')][_0x4627('0x27')]({'plain':!![]});if(!_0x287489)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x287489[_0x4627('0x4e')]==='user'){var _0x1a66b6=_0x1e73b3[_0x4627('0x27')]({'plain':!![]});var _0x139e21=_0x4627('0x28');return db[_0x4627('0x4f')][_0x4627('0x4a')]({'where':{'name':_0x139e21,'userProfileId':_0x287489[_0x4627('0x50')]},'raw':!![]})[_0x4627('0x25')](function(_0x5196e4){if(_0x5196e4&&_0x5196e4[_0x4627('0x51')]===0x0){return db['UserProfileResource'][_0x4627('0x4b')]({'name':_0x1a66b6[_0x4627('0x2d')],'resourceId':_0x1a66b6['id'],'type':_0x5196e4['name'],'sectionId':_0x5196e4['id']},{})['then'](function(){return _0x1e73b3;});}else{return _0x1e73b3;}})['catch'](function(_0x1e02bd){logger[_0x4627('0x2b')](_0x4627('0x52'),_0x1e02bd);throw _0x1e02bd;});}return _0x1e73b3;})[_0x4627('0x25')](respondWithResult(_0x36350d,0xc9))[_0x4627('0x47')](handleError(_0x36350d,null));};exports['update']=function(_0x2d0f47,_0x103ceb){if(_0x2d0f47[_0x4627('0x4c')]['id']){delete _0x2d0f47[_0x4627('0x4c')]['id'];}return db['FaxQueue']['find']({'where':{'id':_0x2d0f47[_0x4627('0x49')]['id']}})[_0x4627('0x25')](handleEntityNotFound(_0x103ceb,null))[_0x4627('0x25')](saveUpdates(_0x2d0f47['body'],null))[_0x4627('0x25')](respondWithResult(_0x103ceb,null))[_0x4627('0x47')](handleError(_0x103ceb,null));};exports[_0x4627('0x26')]=function(_0x21d38c,_0x386d0d){return db['FaxQueue'][_0x4627('0x4a')]({'where':{'id':_0x21d38c[_0x4627('0x49')]['id']}})[_0x4627('0x25')](handleEntityNotFound(_0x386d0d,null))[_0x4627('0x25')](removeEntity(_0x386d0d,null))['catch'](handleError(_0x386d0d,null));};exports[_0x4627('0x53')]=function(_0x266d16,_0x64ad7a){return db['FaxQueue']['describe']()[_0x4627('0x25')](respondWithResult(_0x64ad7a,null))['catch'](handleError(_0x64ad7a,null));};exports[_0x4627('0x54')]=function(_0x40fe79,_0x4b18ac,_0x201719){var _0x17f01b={'raw':!![],'where':{}},_0x550e2b={},_0x2487fd;return db[_0x4627('0x30')][_0x4627('0x55')]({'where':{'id':_0x40fe79[_0x4627('0x49')]['id']}})[_0x4627('0x25')](handleEntityNotFound(_0x4b18ac,null))[_0x4627('0x25')](function(_0x2e953e){if(_0x2e953e){_0x2487fd=_0x2e953e[_0x4627('0x27')]({'plain':!![]});_0x550e2b['model']=_[_0x4627('0x33')](db[_0x4627('0x56')][_0x4627('0x31')]);_0x550e2b[_0x4627('0x35')]=_[_0x4627('0x33')](_0x40fe79[_0x4627('0x35')]);_0x550e2b['filters']=_[_0x4627('0x36')](_0x550e2b[_0x4627('0x32')],_0x550e2b[_0x4627('0x35')]);_0x17f01b[_0x4627('0x38')]=_['intersection'](_0x550e2b[_0x4627('0x32')],qs['fields'](_0x40fe79['query']['fields']));_0x17f01b[_0x4627('0x38')]=_0x17f01b[_0x4627('0x38')][_0x4627('0x39')]?_0x17f01b['attributes']:_0x550e2b[_0x4627('0x32')];if(!_0x40fe79[_0x4627('0x35')]['hasOwnProperty'](_0x4627('0x57'))){_0x17f01b[_0x4627('0x20')]=qs[_0x4627('0x20')](_0x40fe79[_0x4627('0x35')][_0x4627('0x20')]);_0x17f01b[_0x4627('0x1f')]=qs[_0x4627('0x1f')](_0x40fe79['query']['offset']);}_0x17f01b['order']=qs[_0x4627('0x58')](_0x40fe79[_0x4627('0x35')][_0x4627('0x58')]);_0x17f01b[_0x4627('0x3b')]=qs[_0x4627('0x34')](_[_0x4627('0x3c')](_0x40fe79[_0x4627('0x35')],_0x550e2b[_0x4627('0x34')]));_0x17f01b[_0x4627('0x3b')][_0x4627('0x59')]=_0x2e953e['id'];if(_0x40fe79[_0x4627('0x35')][_0x4627('0x3d')]){_0x17f01b[_0x4627('0x3b')]=_['merge'](_0x17f01b[_0x4627('0x3b')],{'$or':_[_0x4627('0x3f')](_0x17f01b[_0x4627('0x38')],function(_0x57eed3){var _0x1df9ab={};_0x1df9ab[_0x57eed3]={'$like':'%'+_0x40fe79['query'][_0x4627('0x3d')]+'%'};return _0x1df9ab;})});}_0x17f01b=_[_0x4627('0x3e')]({},_0x17f01b,_0x40fe79['options']);return db[_0x4627('0x56')]['findAll'](_0x17f01b);}})[_0x4627('0x25')](function(_0xd78941){if(_0xd78941){return db[_0x4627('0x5a')]['findAndCountAll']({'where':{'id':_['map'](_0xd78941,_0x4627('0x5b')),'role':'agent'},'attributes':['id','name',_0x4627('0x5c'),_0x4627('0x5d'),_0x4627('0x5e')]});}})[_0x4627('0x25')](function(_0x5896b2){if(_0x5896b2){return{'count':_0x5896b2[_0x4627('0x1e')],'rows':_[_0x4627('0x3f')](_0x5896b2[_0x4627('0x46')],function(_0x212faa){return{'membername':_0x212faa[_0x4627('0x2d')],'UserId':_0x212faa['id'],'queue_name':_0x2487fd[_0x4627('0x2d')],'FaxQueueId':_0x2487fd['id'],'interface':util[_0x4627('0x5f')]('%s/%s',_0x4627('0x60'),_0x212faa[_0x4627('0x2d')]),'penalty':0x0,'paused':_0x212faa[_0x4627('0x5c')],'createdAt':_0x212faa[_0x4627('0x5e')],'updatedAt':_0x212faa['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x4627('0x25')](respondWithFilteredResult(_0x4b18ac,_0x17f01b))['catch'](handleError(_0x4b18ac,null));};exports[_0x4627('0x61')]=function(_0x12d988,_0x17d4da,_0x17885f){var _0x51d74f={};var _0x2076db={};var _0x432d35;var _0x28cd32;return db[_0x4627('0x30')][_0x4627('0x55')]({'where':{'id':_0x12d988[_0x4627('0x49')]['id']}})['then'](handleEntityNotFound(_0x17d4da,null))[_0x4627('0x25')](function(_0x592271){if(_0x592271){_0x432d35=_0x592271;_0x2076db[_0x4627('0x32')]=_[_0x4627('0x33')](db[_0x4627('0x62')][_0x4627('0x31')]);_0x2076db[_0x4627('0x35')]=_['keys'](_0x12d988[_0x4627('0x35')]);_0x2076db[_0x4627('0x34')]=_['intersection'](_0x2076db[_0x4627('0x32')],_0x2076db[_0x4627('0x35')]);_0x51d74f[_0x4627('0x38')]=_[_0x4627('0x36')](_0x2076db[_0x4627('0x32')],qs[_0x4627('0x37')](_0x12d988['query'][_0x4627('0x37')]));_0x51d74f[_0x4627('0x38')]=_0x51d74f[_0x4627('0x38')]['length']?_0x51d74f[_0x4627('0x38')]:_0x2076db[_0x4627('0x32')];_0x51d74f[_0x4627('0x3a')]=qs[_0x4627('0x58')](_0x12d988[_0x4627('0x35')][_0x4627('0x58')]);_0x51d74f['where']=qs[_0x4627('0x34')](_[_0x4627('0x3c')](_0x12d988['query'],_0x2076db['filters']));if(_0x12d988[_0x4627('0x35')][_0x4627('0x3d')]){_0x51d74f['where']=_[_0x4627('0x3e')](_0x51d74f[_0x4627('0x3b')],{'$or':_['map'](_0x51d74f[_0x4627('0x38')],function(_0x3b1fbc){var _0x18c39b={};_0x18c39b[_0x3b1fbc]={'$like':'%'+_0x12d988[_0x4627('0x35')][_0x4627('0x3d')]+'%'};return _0x18c39b;})});}_0x51d74f=_[_0x4627('0x3e')]({},_0x51d74f,_0x12d988[_0x4627('0x42')]);return _0x432d35[_0x4627('0x61')](_0x51d74f);}})[_0x4627('0x25')](function(_0x34ca1c){if(_0x34ca1c){_0x28cd32=_0x34ca1c['length'];if(!_0x12d988['query'][_0x4627('0x63')]('nolimit')){_0x51d74f['limit']=qs[_0x4627('0x20')](_0x12d988[_0x4627('0x35')][_0x4627('0x20')]);_0x51d74f[_0x4627('0x1f')]=qs[_0x4627('0x1f')](_0x12d988[_0x4627('0x35')][_0x4627('0x1f')]);}return _0x432d35['getTeams'](_0x51d74f);}})[_0x4627('0x25')](function(_0x50656c){if(_0x50656c){return _0x50656c?{'count':_0x28cd32,'rows':_0x50656c}:null;}})[_0x4627('0x25')](respondWithResult(_0x17d4da,null))[_0x4627('0x47')](handleError(_0x17d4da,null));};exports[_0x4627('0x64')]=function(_0x4b4f7d,_0x4e4312,_0x4e954b){var _0x45e2da=_0x4b4f7d[_0x4627('0x4c')]['teams'];return db[_0x4627('0x62')][_0x4627('0x45')]({'where':{'id':_[_0x4627('0x3f')](_0x45e2da,'id')},'attributes':['id'],'include':[{'model':db[_0x4627('0x5a')],'as':_0x4627('0x65'),'attributes':['id','name',_0x4627('0x66'),_0x4627('0x67'),_0x4627('0x68')],'raw':!![]}]})[_0x4627('0x25')](function(_0x17d78b){if(_0x17d78b){var _0x3c4218=_[_0x4627('0x69')](_0x17d78b,function(_0x44b8d2){var _0xe4fcf3=_0x44b8d2[_0x4627('0x27')]({'plain':!![]});return _0xe4fcf3[_0x4627('0x65')];});return db[_0x4627('0x30')][_0x4627('0x4a')]({'where':{'id':_0x4b4f7d[_0x4627('0x49')]['id']}})[_0x4627('0x25')](function(_0x1a3479){return db[_0x4627('0x6a')][_0x4627('0x6b')](function(_0x444237){return _0x1a3479[_0x4627('0x64')](_[_0x4627('0x3f')](_0x45e2da,'id'),{'transaction':_0x444237})[_0x4627('0x25')](function(){return BPromise[_0x4627('0x6c')](_0x3c4218,function(_0x22118d){return db[_0x4627('0x56')][_0x4627('0x6d')]({'where':{'UserId':_0x22118d['id'],'FaxQueueId':_0x4b4f7d['params']['id']},'transaction':_0x444237});});})[_0x4627('0x25')](function(){_0x3c4218[_0x4627('0x6e')](function(_0x2a9fa9){socket[_0x4627('0x6f')](_0x4627('0x70'),{'UserId':_0x2a9fa9['id'],'FaxQueueId':_0x1a3479['id']});});});});});}})[_0x4627('0x25')](respondWithStatusCode(_0x4e4312,null))['catch'](handleError(_0x4e4312,null));};exports[_0x4627('0x71')]=function(_0x2acf80,_0x4093bd,_0x2f2bbd){return db[_0x4627('0x62')][_0x4627('0x45')]({'where':{'id':_0x2acf80[_0x4627('0x35')][_0x4627('0x72')]},'attributes':['id'],'include':[{'model':db[_0x4627('0x5a')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x4627('0x25')](handleEntityNotFound(_0x4093bd,null))['then'](function(_0x4752f2){var _0x1df438=_['map'](_0x4752f2,'id');var _0x409ca5=[];var _0x22070e=[];var _0x1c346c=squel[_0x4627('0x73')]();_0x1c346c['field'](_0x4627('0x74'))[_0x4627('0x75')](_0x4627('0x76'),'tq')['join'](_0x4627('0x77'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x4627('0x3b')](_0x4627('0x78'),_0x2acf80['params']['id']);for(var _0x2d1f49=0x0;_0x2d1f49<_0x4752f2['length'];_0x2d1f49+=0x1){let _0x2a958a=_0x4752f2[_0x2d1f49];for(var _0x2575bc=0x0;_0x2575bc<_0x2a958a[_0x4627('0x65')]['length'];_0x2575bc+=0x1){let _0x4864f7=_0x2a958a[_0x4627('0x65')][_0x2575bc];var _0x181b43=_0x1c346c[_0x4627('0x79')]();_0x181b43[_0x4627('0x3b')]('ut.UserId\x20=\x20?',_0x4864f7['id']);_0x22070e[_0x4627('0x7a')](db['sequelize']['query'](_0x181b43[_0x4627('0x7b')](),{'type':db[_0x4627('0x6a')][_0x4627('0x7c')][_0x4627('0x7d')]})['then'](function(_0x450491){if(_0x450491[_0x4627('0x39')]===0x1){return _0x4864f7['id'];}else{var _0x24358d=_[_0x4627('0x7e')](_[_0x4627('0x3f')](_0x450491,_0x4627('0x7f')),function(_0x25d5df){return _[_0x4627('0x80')](_0x1df438,_0x25d5df);});if(_0x24358d){return _0x4864f7['id'];}}}));}}return BPromise[_0x4627('0x81')](_0x22070e)['then'](function(_0x3100ed){_0x409ca5=_(_0x409ca5)['union'](_0x3100ed)[_0x4627('0x82')]()[_0x4627('0x83')]();return db[_0x4627('0x30')][_0x4627('0x4a')]({'where':{'id':_0x2acf80['params']['id']}})[_0x4627('0x25')](function(_0x347765){return db[_0x4627('0x6a')][_0x4627('0x6b')](function(_0x2e9a7a){return _0x347765[_0x4627('0x71')](_0x2acf80[_0x4627('0x35')]['ids'],{'transaction':_0x2e9a7a})[_0x4627('0x25')](function(){if(!_[_0x4627('0x84')](_0x409ca5)){return _0x347765[_0x4627('0x85')](_0x409ca5,{'transaction':_0x2e9a7a});}})[_0x4627('0x25')](function(){_0x409ca5[_0x4627('0x6e')](function(_0x3ac267){socket[_0x4627('0x6f')]('userFaxQueue:remove',{'UserId':_0x3ac267,'FaxQueueId':_0x347765['id']});});});});});});})['then'](respondWithStatusCode(_0x4093bd,null))[_0x4627('0x47')](handleError(_0x4093bd,null));};exports['addAgents']=function(_0x56a9d3,_0x172799,_0x2e412f){return db['FaxQueue'][_0x4627('0x4a')]({'where':{'id':_0x56a9d3[_0x4627('0x49')]['id']}})['then'](handleEntityNotFound(_0x172799,null))['then'](function(_0x51a347){if(_0x51a347){return _0x51a347[_0x4627('0x86')](_0x56a9d3['body'][_0x4627('0x72')],_[_0x4627('0x87')](_0x56a9d3['body'],['ids','id'])||{})[_0x4627('0x88')](function(_0x43aab0){for(var _0x134c93=0x0;_0x134c93<_0x56a9d3['body'][_0x4627('0x72')]['length'];_0x134c93+=0x1){socket[_0x4627('0x6f')](_0x4627('0x70'),{'UserId':_0x56a9d3[_0x4627('0x4c')][_0x4627('0x72')][_0x134c93],'FaxQueueId':_0x56a9d3[_0x4627('0x49')]['id']});}return _0x43aab0;});}})[_0x4627('0x25')](respondWithResult(_0x172799,null))['catch'](handleError(_0x172799,null));};exports[_0x4627('0x85')]=function(_0x465761,_0x1ae549,_0x269eaf){return db['FaxQueue'][_0x4627('0x4a')]({'where':{'id':_0x465761[_0x4627('0x49')]['id']}})[_0x4627('0x25')](handleEntityNotFound(_0x1ae549,null))[_0x4627('0x25')](function(_0x140757){if(_0x140757){return _0x140757['removeAgents'](_0x465761['query']['ids'])[_0x4627('0x25')](function(){if(_[_0x4627('0x89')](_0x465761[_0x4627('0x35')][_0x4627('0x72')])){for(var _0x37ad21=0x0;_0x37ad21<_0x465761[_0x4627('0x35')][_0x4627('0x72')]['length'];_0x37ad21+=0x1){socket[_0x4627('0x6f')](_0x4627('0x8a'),{'UserId':Number(_0x465761['query']['ids'][_0x37ad21]),'FaxQueueId':Number(_0x465761[_0x4627('0x49')]['id'])});}}else{socket[_0x4627('0x6f')](_0x4627('0x8a'),{'UserId':Number(_0x465761[_0x4627('0x35')][_0x4627('0x72')]),'FaxQueueId':Number(_0x465761[_0x4627('0x49')]['id'])});}});}})[_0x4627('0x25')](respondWithStatusCode(_0x1ae549,null))['catch'](handleError(_0x1ae549,null));};exports[_0x4627('0x8b')]=function(_0x58c8d1,_0x31117b,_0x445387){var _0x278d12={};var _0x392a85={};var _0x4244b5;var _0x1629bb;return db[_0x4627('0x30')][_0x4627('0x55')]({'where':{'id':_0x58c8d1[_0x4627('0x49')]['id']}})[_0x4627('0x25')](handleEntityNotFound(_0x31117b,null))[_0x4627('0x25')](function(_0x43ae57){if(_0x43ae57){_0x4244b5=_0x43ae57;_0x392a85[_0x4627('0x32')]=_[_0x4627('0x33')](db['User'][_0x4627('0x31')]);_0x392a85[_0x4627('0x35')]=_[_0x4627('0x33')](_0x58c8d1[_0x4627('0x35')]);_0x392a85[_0x4627('0x34')]=_[_0x4627('0x36')](_0x392a85[_0x4627('0x32')],_0x392a85[_0x4627('0x35')]);_0x278d12[_0x4627('0x38')]=_['intersection'](_0x392a85[_0x4627('0x32')],qs[_0x4627('0x37')](_0x58c8d1['query'][_0x4627('0x37')]));_0x278d12[_0x4627('0x38')]=_0x278d12[_0x4627('0x38')][_0x4627('0x39')]?_0x278d12['attributes']:_0x392a85[_0x4627('0x32')];_0x278d12[_0x4627('0x3a')]=qs[_0x4627('0x58')](_0x58c8d1[_0x4627('0x35')][_0x4627('0x58')]);_0x278d12[_0x4627('0x3b')]=qs[_0x4627('0x34')](_[_0x4627('0x3c')](_0x58c8d1[_0x4627('0x35')],_0x392a85['filters']));if(_0x58c8d1['query'][_0x4627('0x3d')]){_0x278d12[_0x4627('0x3b')]=_[_0x4627('0x3e')](_0x278d12[_0x4627('0x3b')],{'$or':_['map'](_0x278d12[_0x4627('0x38')],function(_0xd40992){var _0x35e9fc={};_0x35e9fc[_0xd40992]={'$like':'%'+_0x58c8d1[_0x4627('0x35')][_0x4627('0x3d')]+'%'};return _0x35e9fc;})});}_0x278d12=_['merge']({},_0x278d12,_0x58c8d1[_0x4627('0x42')]);return _0x4244b5['getAgents'](_0x278d12);}})[_0x4627('0x25')](function(_0x5454ef){if(_0x5454ef){_0x1629bb=_0x5454ef['length'];if(!_0x58c8d1[_0x4627('0x35')]['hasOwnProperty'](_0x4627('0x57'))){_0x278d12[_0x4627('0x20')]=qs[_0x4627('0x20')](_0x58c8d1[_0x4627('0x35')][_0x4627('0x20')]);_0x278d12[_0x4627('0x1f')]=qs[_0x4627('0x1f')](_0x58c8d1[_0x4627('0x35')][_0x4627('0x1f')]);}return _0x4244b5[_0x4627('0x8b')](_0x278d12);}})['then'](function(_0x3d45ca){if(_0x3d45ca){return _0x3d45ca?{'count':_0x1629bb,'rows':_0x3d45ca}:null;}})[_0x4627('0x25')](respondWithResult(_0x31117b,null))['catch'](handleError(_0x31117b,null));};
\ No newline at end of file
+var _0xbab3=['crypto','querystring','papaparse','../../components/auth/service','../../config/license/hardware','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','offset','limit','set','reject','save','update','then','get','FaxQueues','UserProfileResource','error','stack','name','send','rawAttributes','model','keys','query','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','merge','map','type','key','field','options','FaxQueue','count','includeAll','include','findAll','rows','show','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','params','describe','getMembers','findOne','hasOwnProperty','FaxQueueId','UserFaxQueue','User','findAndCountAll','UserId','agent','updatedAt','createdAt','%s/%s','SIP','faxPause','getTeams','Agents','online','voicePause','interface','flatMap','sequelize','transaction','addTeams','findOrCreate','forEach','userFaxQueue:save','removeTeams','ids','select','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','FaxQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','TeamId','includes','union','compact','value','isEmpty','removeAgents','userFaxQueue:remove','addAgents','omit','emit','getAgents','html-pdf','eml-format','zip-dir','request-promise','moment','mustache','util','sox','to-csv','ejs'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0xbab3,0x78));var _0x3bab=function(_0x3e1fe8,_0x223c26){_0x3e1fe8=_0x3e1fe8-0x0;var _0x55d8e5=_0xbab3[_0x3e1fe8];return _0x55d8e5;};'use strict';var pdf=require(_0x3bab('0x0'));var emlformat=require(_0x3bab('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x3bab('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3bab('0x3'));var moment=require(_0x3bab('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x3bab('0x5'));var util=require(_0x3bab('0x6'));var path=require('path');var sox=require(_0x3bab('0x7'));var csv=require(_0x3bab('0x8'));var ejs=require(_0x3bab('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x3bab('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x3bab('0xb'));var Papa=require(_0x3bab('0xc'));var Redis=require('ioredis');var authService=require(_0x3bab('0xd'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x3bab('0xe'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x3bab('0xf')]=_[_0x3bab('0x10')](config[_0x3bab('0xf')],{'host':_0x3bab('0x11'),'port':0x18eb});var socket=require(_0x3bab('0x12'))(new Redis(config['redis']));require('./faxQueue.socket')[_0x3bab('0x13')](socket);function respondWithStatusCode(_0x2e94ec,_0x2cd726){_0x2cd726=_0x2cd726||0xcc;return function(_0x330fd8){if(_0x330fd8){return _0x2e94ec[_0x3bab('0x14')](_0x2cd726);}return _0x2e94ec[_0x3bab('0x15')](_0x2cd726)[_0x3bab('0x16')]();};}function respondWithResult(_0x2f598e,_0x13b2f1){_0x13b2f1=_0x13b2f1||0xc8;return function(_0x2ab580){if(_0x2ab580){return _0x2f598e['status'](_0x13b2f1)['json'](_0x2ab580);}};}function respondWithFilteredResult(_0x36bb7a,_0x20b5b1){return function(_0x48b3bb){if(_0x48b3bb){var _0x1084e9=_0x48b3bb['count'],_0xc02a51=_0x20b5b1[_0x3bab('0x17')],_0x1d1731=_0x20b5b1['offset']+_0x20b5b1[_0x3bab('0x18')],_0x50e43b;if(_0x1d1731>=_0x1084e9){_0x1d1731=_0x1084e9;_0x50e43b=0xc8;}else{_0x50e43b=0xce;}_0x36bb7a[_0x3bab('0x15')](_0x50e43b);return _0x36bb7a[_0x3bab('0x19')]('Content-Range',_0xc02a51+'-'+_0x1d1731+'/'+_0x1084e9)['json'](_0x48b3bb);}return null;};}function patchUpdates(_0x1e9bd3){return function(_0x45b32c){try{jsonpatch['apply'](_0x45b32c,_0x1e9bd3,!![]);}catch(_0x287caa){return BPromise[_0x3bab('0x1a')](_0x287caa);}return _0x45b32c[_0x3bab('0x1b')]();};}function saveUpdates(_0x4bf779,_0x12239d){return function(_0x11e275){if(_0x11e275){return _0x11e275[_0x3bab('0x1c')](_0x4bf779)[_0x3bab('0x1d')](function(_0x30d052){return _0x30d052;});}return null;};}function removeEntity(_0x52e96f,_0x46fdc1){return function(_0x19dd84){if(_0x19dd84){return _0x19dd84['destroy']()['then'](function(){var _0x590917=_0x19dd84[_0x3bab('0x1e')]({'plain':!![]});var _0x72717d=_0x3bab('0x1f');return db[_0x3bab('0x20')]['destroy']({'where':{'type':_0x72717d,'resourceId':_0x590917['id']}})[_0x3bab('0x1d')](function(){return _0x19dd84;});})[_0x3bab('0x1d')](function(){_0x52e96f[_0x3bab('0x15')](0xcc)[_0x3bab('0x16')]();});}};}function handleEntityNotFound(_0x1889f4,_0xfa7192){return function(_0x2f2a8e){if(!_0x2f2a8e){_0x1889f4['sendStatus'](0x194);}return _0x2f2a8e;};}function handleError(_0x4bef1b,_0x4e5a74){_0x4e5a74=_0x4e5a74||0x1f4;return function(_0x1d60e3){logger[_0x3bab('0x21')](_0x1d60e3[_0x3bab('0x22')]);if(_0x1d60e3[_0x3bab('0x23')]){delete _0x1d60e3['name'];}_0x4bef1b[_0x3bab('0x15')](_0x4e5a74)[_0x3bab('0x24')](_0x1d60e3);};}exports['index']=function(_0x3eec2e,_0x5c3507){var _0x41d9f9={},_0x47bac1={},_0x48b9de={'count':0x0,'rows':[]};var _0x2f77dc=db['FaxQueue'][_0x3bab('0x25')];_0x47bac1[_0x3bab('0x26')]=_['keys'](_0x2f77dc);_0x47bac1['query']=_[_0x3bab('0x27')](_0x3eec2e[_0x3bab('0x28')]);_0x47bac1['filters']=_[_0x3bab('0x29')](_0x47bac1[_0x3bab('0x26')],_0x47bac1['query']);_0x41d9f9[_0x3bab('0x2a')]=_[_0x3bab('0x29')](_0x47bac1[_0x3bab('0x26')],qs['fields'](_0x3eec2e[_0x3bab('0x28')][_0x3bab('0x2b')]));_0x41d9f9['attributes']=_0x41d9f9['attributes'][_0x3bab('0x2c')]?_0x41d9f9[_0x3bab('0x2a')]:_0x47bac1[_0x3bab('0x26')];if(!_0x3eec2e['query']['hasOwnProperty'](_0x3bab('0x2d'))){_0x41d9f9[_0x3bab('0x18')]=qs['limit'](_0x3eec2e['query'][_0x3bab('0x18')]);_0x41d9f9['offset']=qs[_0x3bab('0x17')](_0x3eec2e[_0x3bab('0x28')][_0x3bab('0x17')]);}_0x41d9f9[_0x3bab('0x2e')]=qs['sort'](_0x3eec2e[_0x3bab('0x28')][_0x3bab('0x2f')]);_0x41d9f9[_0x3bab('0x30')]=qs[_0x3bab('0x31')](_[_0x3bab('0x32')](_0x3eec2e[_0x3bab('0x28')],_0x47bac1[_0x3bab('0x31')]));if(_0x3eec2e[_0x3bab('0x28')][_0x3bab('0x33')]){_0x41d9f9[_0x3bab('0x30')]=_[_0x3bab('0x34')](_0x41d9f9[_0x3bab('0x30')],{'$or':_[_0x3bab('0x35')](_0x2f77dc,function(_0x8bb752){if(_0x8bb752[_0x3bab('0x36')][_0x3bab('0x37')]!=='VIRTUAL'){var _0x2e968a={};_0x2e968a[_0x8bb752[_0x3bab('0x38')]]={'$like':'%'+_0x3eec2e[_0x3bab('0x28')]['filter']+'%'};return _0x2e968a;}})});}_0x41d9f9=_[_0x3bab('0x34')]({},_0x41d9f9,_0x3eec2e[_0x3bab('0x39')]);var _0x5a905d={'where':_0x41d9f9[_0x3bab('0x30')]};return db[_0x3bab('0x3a')][_0x3bab('0x3b')](_0x5a905d)[_0x3bab('0x1d')](function(_0x20866b){_0x48b9de[_0x3bab('0x3b')]=_0x20866b;if(_0x3eec2e['query'][_0x3bab('0x3c')]){_0x41d9f9[_0x3bab('0x3d')]=[{'all':!![]}];}return db[_0x3bab('0x3a')][_0x3bab('0x3e')](_0x41d9f9);})[_0x3bab('0x1d')](function(_0x387ace){_0x48b9de[_0x3bab('0x3f')]=_0x387ace;return _0x48b9de;})[_0x3bab('0x1d')](respondWithFilteredResult(_0x5c3507,_0x41d9f9))['catch'](handleError(_0x5c3507,null));};exports[_0x3bab('0x40')]=function(_0x23168a,_0x5256cb){var _0x2535df={'raw':!![],'where':{'id':_0x23168a['params']['id']}},_0x4dd6bd={};_0x4dd6bd['model']=_[_0x3bab('0x27')](db[_0x3bab('0x3a')]['rawAttributes']);_0x4dd6bd[_0x3bab('0x28')]=_[_0x3bab('0x27')](_0x23168a[_0x3bab('0x28')]);_0x4dd6bd[_0x3bab('0x31')]=_[_0x3bab('0x29')](_0x4dd6bd[_0x3bab('0x26')],_0x4dd6bd[_0x3bab('0x28')]);_0x2535df['attributes']=_['intersection'](_0x4dd6bd[_0x3bab('0x26')],qs[_0x3bab('0x2b')](_0x23168a[_0x3bab('0x28')]['fields']));_0x2535df[_0x3bab('0x2a')]=_0x2535df[_0x3bab('0x2a')][_0x3bab('0x2c')]?_0x2535df[_0x3bab('0x2a')]:_0x4dd6bd[_0x3bab('0x26')];if(_0x23168a[_0x3bab('0x28')][_0x3bab('0x3c')]){_0x2535df[_0x3bab('0x3d')]=[{'all':!![]}];}_0x2535df=_['merge']({},_0x2535df,_0x23168a[_0x3bab('0x39')]);return db[_0x3bab('0x3a')][_0x3bab('0x41')](_0x2535df)['then'](handleEntityNotFound(_0x5256cb,null))[_0x3bab('0x1d')](respondWithResult(_0x5256cb,null))[_0x3bab('0x42')](handleError(_0x5256cb,null));};exports['create']=function(_0x242ef5,_0x580762){return db['FaxQueue'][_0x3bab('0x43')](_0x242ef5[_0x3bab('0x44')],{})['then'](function(_0x17375e){var _0x245f3d=_0x242ef5[_0x3bab('0x45')][_0x3bab('0x1e')]({'plain':!![]});if(!_0x245f3d)throw new Error(_0x3bab('0x46'));if(_0x245f3d[_0x3bab('0x47')]==='user'){var _0x53f8aa=_0x17375e[_0x3bab('0x1e')]({'plain':!![]});var _0x4dfbc8=_0x3bab('0x1f');return db['UserProfileSection']['find']({'where':{'name':_0x4dfbc8,'userProfileId':_0x245f3d[_0x3bab('0x48')]},'raw':!![]})[_0x3bab('0x1d')](function(_0x48a5b2){if(_0x48a5b2&&_0x48a5b2[_0x3bab('0x49')]===0x0){return db[_0x3bab('0x20')]['create']({'name':_0x53f8aa['name'],'resourceId':_0x53f8aa['id'],'type':_0x48a5b2[_0x3bab('0x23')],'sectionId':_0x48a5b2['id']},{})['then'](function(){return _0x17375e;});}else{return _0x17375e;}})[_0x3bab('0x42')](function(_0x41d654){logger[_0x3bab('0x21')](_0x3bab('0x4a'),_0x41d654);throw _0x41d654;});}return _0x17375e;})[_0x3bab('0x1d')](respondWithResult(_0x580762,0xc9))[_0x3bab('0x42')](handleError(_0x580762,null));};exports['update']=function(_0x26f0f0,_0x41d237){if(_0x26f0f0['body']['id']){delete _0x26f0f0['body']['id'];}return db[_0x3bab('0x3a')]['find']({'where':{'id':_0x26f0f0['params']['id']}})[_0x3bab('0x1d')](handleEntityNotFound(_0x41d237,null))[_0x3bab('0x1d')](saveUpdates(_0x26f0f0[_0x3bab('0x44')],null))['then'](respondWithResult(_0x41d237,null))[_0x3bab('0x42')](handleError(_0x41d237,null));};exports[_0x3bab('0x4b')]=function(_0x47168c,_0x354db7){return db['FaxQueue']['find']({'where':{'id':_0x47168c[_0x3bab('0x4c')]['id']}})['then'](handleEntityNotFound(_0x354db7,null))['then'](removeEntity(_0x354db7,null))[_0x3bab('0x42')](handleError(_0x354db7,null));};exports[_0x3bab('0x4d')]=function(_0x46d6fd,_0x38af0c){return db[_0x3bab('0x3a')][_0x3bab('0x4d')]()[_0x3bab('0x1d')](respondWithResult(_0x38af0c,null))[_0x3bab('0x42')](handleError(_0x38af0c,null));};exports[_0x3bab('0x4e')]=function(_0x973555,_0x4eb94c,_0x4a58c1){var _0x219fc4={'raw':!![],'where':{}},_0x16e080={},_0x51ac7f;return db[_0x3bab('0x3a')][_0x3bab('0x4f')]({'where':{'id':_0x973555[_0x3bab('0x4c')]['id']}})[_0x3bab('0x1d')](handleEntityNotFound(_0x4eb94c,null))[_0x3bab('0x1d')](function(_0x2731f6){if(_0x2731f6){_0x51ac7f=_0x2731f6[_0x3bab('0x1e')]({'plain':!![]});_0x16e080[_0x3bab('0x26')]=_['keys'](db['UserFaxQueue'][_0x3bab('0x25')]);_0x16e080['query']=_[_0x3bab('0x27')](_0x973555[_0x3bab('0x28')]);_0x16e080[_0x3bab('0x31')]=_[_0x3bab('0x29')](_0x16e080[_0x3bab('0x26')],_0x16e080[_0x3bab('0x28')]);_0x219fc4[_0x3bab('0x2a')]=_[_0x3bab('0x29')](_0x16e080[_0x3bab('0x26')],qs['fields'](_0x973555[_0x3bab('0x28')][_0x3bab('0x2b')]));_0x219fc4[_0x3bab('0x2a')]=_0x219fc4['attributes'][_0x3bab('0x2c')]?_0x219fc4[_0x3bab('0x2a')]:_0x16e080[_0x3bab('0x26')];if(!_0x973555[_0x3bab('0x28')][_0x3bab('0x50')]('nolimit')){_0x219fc4[_0x3bab('0x18')]=qs[_0x3bab('0x18')](_0x973555[_0x3bab('0x28')][_0x3bab('0x18')]);_0x219fc4['offset']=qs[_0x3bab('0x17')](_0x973555[_0x3bab('0x28')][_0x3bab('0x17')]);}_0x219fc4[_0x3bab('0x2e')]=qs['sort'](_0x973555[_0x3bab('0x28')][_0x3bab('0x2f')]);_0x219fc4[_0x3bab('0x30')]=qs[_0x3bab('0x31')](_[_0x3bab('0x32')](_0x973555[_0x3bab('0x28')],_0x16e080[_0x3bab('0x31')]));_0x219fc4[_0x3bab('0x30')][_0x3bab('0x51')]=_0x2731f6['id'];if(_0x973555['query']['filter']){_0x219fc4['where']=_[_0x3bab('0x34')](_0x219fc4[_0x3bab('0x30')],{'$or':_[_0x3bab('0x35')](_0x219fc4[_0x3bab('0x2a')],function(_0x466ffa){var _0x5ed9a0={};_0x5ed9a0[_0x466ffa]={'$like':'%'+_0x973555['query'][_0x3bab('0x33')]+'%'};return _0x5ed9a0;})});}_0x219fc4=_['merge']({},_0x219fc4,_0x973555[_0x3bab('0x39')]);return db[_0x3bab('0x52')][_0x3bab('0x3e')](_0x219fc4);}})[_0x3bab('0x1d')](function(_0x2701ca){if(_0x2701ca){return db[_0x3bab('0x53')][_0x3bab('0x54')]({'where':{'id':_[_0x3bab('0x35')](_0x2701ca,_0x3bab('0x55')),'role':_0x3bab('0x56')},'attributes':['id',_0x3bab('0x23'),'faxPause',_0x3bab('0x57'),_0x3bab('0x58')]});}})[_0x3bab('0x1d')](function(_0x1d2b40){if(_0x1d2b40){return{'count':_0x1d2b40[_0x3bab('0x3b')],'rows':_[_0x3bab('0x35')](_0x1d2b40['rows'],function(_0x22df1d){return{'membername':_0x22df1d[_0x3bab('0x23')],'UserId':_0x22df1d['id'],'queue_name':_0x51ac7f[_0x3bab('0x23')],'FaxQueueId':_0x51ac7f['id'],'interface':util['format'](_0x3bab('0x59'),_0x3bab('0x5a'),_0x22df1d[_0x3bab('0x23')]),'penalty':0x0,'paused':_0x22df1d[_0x3bab('0x5b')],'createdAt':_0x22df1d[_0x3bab('0x58')],'updatedAt':_0x22df1d[_0x3bab('0x57')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x3bab('0x1d')](respondWithFilteredResult(_0x4eb94c,_0x219fc4))[_0x3bab('0x42')](handleError(_0x4eb94c,null));};exports[_0x3bab('0x5c')]=function(_0x5c985f,_0x596f96,_0x1fcbfa){var _0x36e6a1={};var _0x470715={};var _0x3a32eb;var _0x49811d;return db[_0x3bab('0x3a')][_0x3bab('0x4f')]({'where':{'id':_0x5c985f['params']['id']}})[_0x3bab('0x1d')](handleEntityNotFound(_0x596f96,null))[_0x3bab('0x1d')](function(_0x4afb00){if(_0x4afb00){_0x3a32eb=_0x4afb00;_0x470715[_0x3bab('0x26')]=_[_0x3bab('0x27')](db['Team'][_0x3bab('0x25')]);_0x470715['query']=_[_0x3bab('0x27')](_0x5c985f['query']);_0x470715['filters']=_[_0x3bab('0x29')](_0x470715[_0x3bab('0x26')],_0x470715[_0x3bab('0x28')]);_0x36e6a1[_0x3bab('0x2a')]=_['intersection'](_0x470715[_0x3bab('0x26')],qs['fields'](_0x5c985f[_0x3bab('0x28')]['fields']));_0x36e6a1['attributes']=_0x36e6a1[_0x3bab('0x2a')]['length']?_0x36e6a1[_0x3bab('0x2a')]:_0x470715[_0x3bab('0x26')];_0x36e6a1[_0x3bab('0x2e')]=qs[_0x3bab('0x2f')](_0x5c985f[_0x3bab('0x28')][_0x3bab('0x2f')]);_0x36e6a1[_0x3bab('0x30')]=qs[_0x3bab('0x31')](_['pick'](_0x5c985f['query'],_0x470715[_0x3bab('0x31')]));if(_0x5c985f[_0x3bab('0x28')]['filter']){_0x36e6a1['where']=_[_0x3bab('0x34')](_0x36e6a1[_0x3bab('0x30')],{'$or':_[_0x3bab('0x35')](_0x36e6a1[_0x3bab('0x2a')],function(_0x4342c3){var _0x18a243={};_0x18a243[_0x4342c3]={'$like':'%'+_0x5c985f[_0x3bab('0x28')]['filter']+'%'};return _0x18a243;})});}_0x36e6a1=_[_0x3bab('0x34')]({},_0x36e6a1,_0x5c985f[_0x3bab('0x39')]);return _0x3a32eb[_0x3bab('0x5c')](_0x36e6a1);}})[_0x3bab('0x1d')](function(_0x2005ac){if(_0x2005ac){_0x49811d=_0x2005ac[_0x3bab('0x2c')];if(!_0x5c985f[_0x3bab('0x28')][_0x3bab('0x50')]('nolimit')){_0x36e6a1['limit']=qs[_0x3bab('0x18')](_0x5c985f[_0x3bab('0x28')][_0x3bab('0x18')]);_0x36e6a1[_0x3bab('0x17')]=qs['offset'](_0x5c985f[_0x3bab('0x28')][_0x3bab('0x17')]);}return _0x3a32eb[_0x3bab('0x5c')](_0x36e6a1);}})[_0x3bab('0x1d')](function(_0x137eef){if(_0x137eef){return _0x137eef?{'count':_0x49811d,'rows':_0x137eef}:null;}})[_0x3bab('0x1d')](respondWithResult(_0x596f96,null))[_0x3bab('0x42')](handleError(_0x596f96,null));};exports['addTeams']=function(_0x43dd1c,_0x5caf34,_0xe1dab4){var _0x45a391=_0x43dd1c[_0x3bab('0x44')]['teams'];return db['Team'][_0x3bab('0x3e')]({'where':{'id':_[_0x3bab('0x35')](_0x45a391,'id')},'attributes':['id'],'include':[{'model':db[_0x3bab('0x53')],'as':_0x3bab('0x5d'),'attributes':['id',_0x3bab('0x23'),_0x3bab('0x5e'),_0x3bab('0x5f'),_0x3bab('0x60')],'raw':!![]}]})['then'](function(_0x45d34e){if(_0x45d34e){var _0x68d606=_[_0x3bab('0x61')](_0x45d34e,function(_0x444127){var _0x1d25f5=_0x444127[_0x3bab('0x1e')]({'plain':!![]});return _0x1d25f5[_0x3bab('0x5d')];});return db[_0x3bab('0x3a')]['find']({'where':{'id':_0x43dd1c[_0x3bab('0x4c')]['id']}})[_0x3bab('0x1d')](function(_0x590dcb){return db[_0x3bab('0x62')][_0x3bab('0x63')](function(_0x5615a6){return _0x590dcb[_0x3bab('0x64')](_['map'](_0x45a391,'id'),{'transaction':_0x5615a6})[_0x3bab('0x1d')](function(){return BPromise['each'](_0x68d606,function(_0x14af58){return db['UserFaxQueue'][_0x3bab('0x65')]({'where':{'UserId':_0x14af58['id'],'FaxQueueId':_0x43dd1c[_0x3bab('0x4c')]['id']},'transaction':_0x5615a6});});})['then'](function(){_0x68d606[_0x3bab('0x66')](function(_0x3feabb){socket['emit'](_0x3bab('0x67'),{'UserId':_0x3feabb['id'],'FaxQueueId':_0x590dcb['id']});});});});});}})[_0x3bab('0x1d')](respondWithStatusCode(_0x5caf34,null))[_0x3bab('0x42')](handleError(_0x5caf34,null));};exports[_0x3bab('0x68')]=function(_0xaea416,_0x4015d3,_0x483115){return db['Team'][_0x3bab('0x3e')]({'where':{'id':_0xaea416[_0x3bab('0x28')][_0x3bab('0x69')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x3bab('0x5d'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x4015d3,null))[_0x3bab('0x1d')](function(_0x2d4b78){var _0x2534d9=_['map'](_0x2d4b78,'id');var _0x4b0d6d=[];var _0x25dd69=[];var _0x4bf514=squel[_0x3bab('0x6a')]();_0x4bf514[_0x3bab('0x38')]('tq.TeamId')[_0x3bab('0x6b')]('team_has_fax_queues','tq')[_0x3bab('0x6c')](_0x3bab('0x6d'),'ut',_0x3bab('0x6e'))[_0x3bab('0x30')](_0x3bab('0x6f'),_0xaea416['params']['id']);for(var _0x5cb528=0x0;_0x5cb528<_0x2d4b78['length'];_0x5cb528+=0x1){let _0x2a7c5e=_0x2d4b78[_0x5cb528];for(var _0x3250cf=0x0;_0x3250cf<_0x2a7c5e[_0x3bab('0x5d')][_0x3bab('0x2c')];_0x3250cf+=0x1){let _0x471752=_0x2a7c5e[_0x3bab('0x5d')][_0x3250cf];var _0x525873=_0x4bf514[_0x3bab('0x70')]();_0x525873[_0x3bab('0x30')](_0x3bab('0x71'),_0x471752['id']);_0x25dd69[_0x3bab('0x72')](db[_0x3bab('0x62')][_0x3bab('0x28')](_0x525873[_0x3bab('0x73')](),{'type':db[_0x3bab('0x62')][_0x3bab('0x74')][_0x3bab('0x75')]})[_0x3bab('0x1d')](function(_0x1de504){if(_0x1de504['length']===0x1){return _0x471752['id'];}else{var _0x33b87e=_['every'](_[_0x3bab('0x35')](_0x1de504,_0x3bab('0x76')),function(_0x51c915){return _[_0x3bab('0x77')](_0x2534d9,_0x51c915);});if(_0x33b87e){return _0x471752['id'];}}}));}}return BPromise['all'](_0x25dd69)[_0x3bab('0x1d')](function(_0x48a598){_0x4b0d6d=_(_0x4b0d6d)[_0x3bab('0x78')](_0x48a598)[_0x3bab('0x79')]()[_0x3bab('0x7a')]();return db[_0x3bab('0x3a')]['find']({'where':{'id':_0xaea416['params']['id']}})['then'](function(_0x3d78d9){return db['sequelize'][_0x3bab('0x63')](function(_0x557cb1){return _0x3d78d9['removeTeams'](_0xaea416[_0x3bab('0x28')]['ids'],{'transaction':_0x557cb1})[_0x3bab('0x1d')](function(){if(!_[_0x3bab('0x7b')](_0x4b0d6d)){return _0x3d78d9[_0x3bab('0x7c')](_0x4b0d6d,{'transaction':_0x557cb1});}})[_0x3bab('0x1d')](function(){_0x4b0d6d[_0x3bab('0x66')](function(_0x48aa1e){socket['emit'](_0x3bab('0x7d'),{'UserId':_0x48aa1e,'FaxQueueId':_0x3d78d9['id']});});});});});});})[_0x3bab('0x1d')](respondWithStatusCode(_0x4015d3,null))['catch'](handleError(_0x4015d3,null));};exports[_0x3bab('0x7e')]=function(_0x2bb303,_0x1fbf06,_0x98ec0d){return db['FaxQueue'][_0x3bab('0x41')]({'where':{'id':_0x2bb303['params']['id']}})['then'](handleEntityNotFound(_0x1fbf06,null))[_0x3bab('0x1d')](function(_0x3bf6e7){if(_0x3bf6e7){return _0x3bf6e7[_0x3bab('0x7e')](_0x2bb303['body'][_0x3bab('0x69')],_[_0x3bab('0x7f')](_0x2bb303['body'],['ids','id'])||{})['spread'](function(_0x4725fe){for(var _0x2bdba7=0x0;_0x2bdba7<_0x2bb303['body'][_0x3bab('0x69')][_0x3bab('0x2c')];_0x2bdba7+=0x1){socket[_0x3bab('0x80')](_0x3bab('0x67'),{'UserId':_0x2bb303['body']['ids'][_0x2bdba7],'FaxQueueId':_0x2bb303[_0x3bab('0x4c')]['id']});}return _0x4725fe;});}})['then'](respondWithResult(_0x1fbf06,null))[_0x3bab('0x42')](handleError(_0x1fbf06,null));};exports[_0x3bab('0x7c')]=function(_0x5cf0ce,_0x17c43d,_0x3d04d2){return db['FaxQueue']['find']({'where':{'id':_0x5cf0ce['params']['id']}})[_0x3bab('0x1d')](handleEntityNotFound(_0x17c43d,null))['then'](function(_0x104acc){if(_0x104acc){return _0x104acc[_0x3bab('0x7c')](_0x5cf0ce['query'][_0x3bab('0x69')])[_0x3bab('0x1d')](function(){if(_['isArray'](_0x5cf0ce[_0x3bab('0x28')][_0x3bab('0x69')])){for(var _0x28fb26=0x0;_0x28fb26<_0x5cf0ce[_0x3bab('0x28')][_0x3bab('0x69')][_0x3bab('0x2c')];_0x28fb26+=0x1){socket[_0x3bab('0x80')]('userFaxQueue:remove',{'UserId':Number(_0x5cf0ce['query'][_0x3bab('0x69')][_0x28fb26]),'FaxQueueId':Number(_0x5cf0ce[_0x3bab('0x4c')]['id'])});}}else{socket[_0x3bab('0x80')](_0x3bab('0x7d'),{'UserId':Number(_0x5cf0ce[_0x3bab('0x28')][_0x3bab('0x69')]),'FaxQueueId':Number(_0x5cf0ce['params']['id'])});}});}})[_0x3bab('0x1d')](respondWithStatusCode(_0x17c43d,null))[_0x3bab('0x42')](handleError(_0x17c43d,null));};exports[_0x3bab('0x81')]=function(_0x3cb618,_0x1923e5,_0x22e97f){var _0x5aeb23={};var _0x54da28={};var _0x230ffb;var _0x482106;return db['FaxQueue']['findOne']({'where':{'id':_0x3cb618[_0x3bab('0x4c')]['id']}})[_0x3bab('0x1d')](handleEntityNotFound(_0x1923e5,null))[_0x3bab('0x1d')](function(_0x80c67f){if(_0x80c67f){_0x230ffb=_0x80c67f;_0x54da28[_0x3bab('0x26')]=_[_0x3bab('0x27')](db[_0x3bab('0x53')][_0x3bab('0x25')]);_0x54da28[_0x3bab('0x28')]=_[_0x3bab('0x27')](_0x3cb618[_0x3bab('0x28')]);_0x54da28[_0x3bab('0x31')]=_[_0x3bab('0x29')](_0x54da28[_0x3bab('0x26')],_0x54da28['query']);_0x5aeb23[_0x3bab('0x2a')]=_['intersection'](_0x54da28[_0x3bab('0x26')],qs[_0x3bab('0x2b')](_0x3cb618[_0x3bab('0x28')][_0x3bab('0x2b')]));_0x5aeb23[_0x3bab('0x2a')]=_0x5aeb23[_0x3bab('0x2a')][_0x3bab('0x2c')]?_0x5aeb23['attributes']:_0x54da28[_0x3bab('0x26')];_0x5aeb23[_0x3bab('0x2e')]=qs[_0x3bab('0x2f')](_0x3cb618['query'][_0x3bab('0x2f')]);_0x5aeb23[_0x3bab('0x30')]=qs[_0x3bab('0x31')](_['pick'](_0x3cb618[_0x3bab('0x28')],_0x54da28[_0x3bab('0x31')]));if(_0x3cb618[_0x3bab('0x28')]['filter']){_0x5aeb23[_0x3bab('0x30')]=_[_0x3bab('0x34')](_0x5aeb23[_0x3bab('0x30')],{'$or':_[_0x3bab('0x35')](_0x5aeb23[_0x3bab('0x2a')],function(_0xa285ec){var _0x29cc6f={};_0x29cc6f[_0xa285ec]={'$like':'%'+_0x3cb618[_0x3bab('0x28')]['filter']+'%'};return _0x29cc6f;})});}_0x5aeb23=_['merge']({},_0x5aeb23,_0x3cb618[_0x3bab('0x39')]);return _0x230ffb[_0x3bab('0x81')](_0x5aeb23);}})[_0x3bab('0x1d')](function(_0x17f2a5){if(_0x17f2a5){_0x482106=_0x17f2a5[_0x3bab('0x2c')];if(!_0x3cb618[_0x3bab('0x28')][_0x3bab('0x50')](_0x3bab('0x2d'))){_0x5aeb23[_0x3bab('0x18')]=qs[_0x3bab('0x18')](_0x3cb618[_0x3bab('0x28')][_0x3bab('0x18')]);_0x5aeb23[_0x3bab('0x17')]=qs[_0x3bab('0x17')](_0x3cb618[_0x3bab('0x28')]['offset']);}return _0x230ffb[_0x3bab('0x81')](_0x5aeb23);}})['then'](function(_0x4306e5){if(_0x4306e5){return _0x4306e5?{'count':_0x482106,'rows':_0x4306e5}:null;}})['then'](respondWithResult(_0x1923e5,null))[_0x3bab('0x42')](handleError(_0x1923e5,null));};
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.events.js b/server/api/faxQueue/faxQueue.events.js
index 002d7e7..86f3d20 100644
--- a/server/api/faxQueue/faxQueue.events.js
+++ b/server/api/faxQueue/faxQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa571=['hasOwnProperty','hook','exports','events','../../mysqldb','FaxQueue','setMaxListeners','update','remove','emit'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xa571,0x107));var _0x1a57=function(_0x18e9ef,_0x2943ec){_0x18e9ef=_0x18e9ef-0x0;var _0x1b9dde=_0xa571[_0x18e9ef];return _0x1b9dde;};'use strict';var EventEmitter=require(_0x1a57('0x0'));var FaxQueue=require(_0x1a57('0x1'))['db'][_0x1a57('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x1a57('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1a57('0x4'),'afterDestroy':_0x1a57('0x5')};function emitEvent(_0x4d5f7a){return function(_0x5ec815,_0x1f2c44,_0x5067fa){FaxQueueEvents[_0x1a57('0x6')](_0x4d5f7a+':'+_0x5ec815['id'],_0x5ec815);FaxQueueEvents[_0x1a57('0x6')](_0x4d5f7a,_0x5ec815);_0x5067fa(null);};}for(var e in events){if(events[_0x1a57('0x7')](e)){var event=events[e];FaxQueue[_0x1a57('0x8')](e,emitEvent(event));}}module[_0x1a57('0x9')]=FaxQueueEvents;
\ No newline at end of file
+var _0xfe57=['events','../../mysqldb','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x52b929,_0x16e3b3){var _0x343503=function(_0x14c099){while(--_0x14c099){_0x52b929['push'](_0x52b929['shift']());}};_0x343503(++_0x16e3b3);}(_0xfe57,0x195));var _0x7fe5=function(_0xa8883,_0x1f107f){_0xa8883=_0xa8883-0x0;var _0x479426=_0xfe57[_0xa8883];return _0x479426;};'use strict';var EventEmitter=require(_0x7fe5('0x0'));var FaxQueue=require(_0x7fe5('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7fe5('0x2'),'afterUpdate':_0x7fe5('0x3'),'afterDestroy':_0x7fe5('0x4')};function emitEvent(_0x421809){return function(_0x89ad5f,_0x1254d2,_0x41f5f4){FaxQueueEvents[_0x7fe5('0x5')](_0x421809+':'+_0x89ad5f['id'],_0x89ad5f);FaxQueueEvents[_0x7fe5('0x5')](_0x421809,_0x89ad5f);_0x41f5f4(null);};}for(var e in events){if(events[_0x7fe5('0x6')](e)){var event=events[e];FaxQueue[_0x7fe5('0x7')](e,emitEvent(event));}}module[_0x7fe5('0x8')]=FaxQueueEvents;
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.model.js b/server/api/faxQueue/faxQueue.model.js
index 41c82b4..b1ba944 100644
--- a/server/api/faxQueue/faxQueue.model.js
+++ b/server/api/faxQueue/faxQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0b0e=['path','rimraf','../../config/environment','./faxQueue.attributes','exports','define','lodash','../../config/logger','moment','bluebird','request-promise'];(function(_0x2e8af0,_0x202dd7){var _0x72bfd=function(_0x35590f){while(--_0x35590f){_0x2e8af0['push'](_0x2e8af0['shift']());}};_0x72bfd(++_0x202dd7);}(_0x0b0e,0x187));var _0xe0b0=function(_0x2351c4,_0x1dca54){_0x2351c4=_0x2351c4-0x0;var _0x1dd3f8=_0x0b0e[_0x2351c4];return _0x1dd3f8;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var logger=require(_0xe0b0('0x1'))('api');var moment=require(_0xe0b0('0x2'));var BPromise=require(_0xe0b0('0x3'));var rp=require(_0xe0b0('0x4'));var fs=require('fs');var path=require(_0xe0b0('0x5'));var rimraf=require(_0xe0b0('0x6'));var config=require(_0xe0b0('0x7'));var attributes=require(_0xe0b0('0x8'));module[_0xe0b0('0x9')]=function(_0x30e20d,_0x28e40f){return _0x30e20d[_0xe0b0('0xa')]('FaxQueue',attributes,{'tableName':'fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5f2f=['bluebird','request-promise','path','./faxQueue.attributes','exports','define','FaxQueue','lodash','util','../../config/logger','api','moment'];(function(_0xd541d2,_0xe6cd11){var _0x140e98=function(_0x2b3640){while(--_0x2b3640){_0xd541d2['push'](_0xd541d2['shift']());}};_0x140e98(++_0xe6cd11);}(_0x5f2f,0x73));var _0xf5f2=function(_0xb3910c,_0x1f9b14){_0xb3910c=_0xb3910c-0x0;var _0x1092c8=_0x5f2f[_0xb3910c];return _0x1092c8;};'use strict';var _=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var logger=require(_0xf5f2('0x2'))(_0xf5f2('0x3'));var moment=require(_0xf5f2('0x4'));var BPromise=require(_0xf5f2('0x5'));var rp=require(_0xf5f2('0x6'));var fs=require('fs');var path=require(_0xf5f2('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xf5f2('0x8'));module[_0xf5f2('0x9')]=function(_0xad7f65,_0x3eebf6){return _0xad7f65[_0xf5f2('0xa')](_0xf5f2('0xb'),attributes,{'tableName':'fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.rpc.js b/server/api/faxQueue/faxQueue.rpc.js
index ef8b477..af530b2 100644
--- a/server/api/faxQueue/faxQueue.rpc.js
+++ b/server/api/faxQueue/faxQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x56fc=['then','find','where','ShowFaxQueue','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','register','request','info','debug','FaxQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','FaxQueue,\x20%s,\x20%s','message','result','catch','GetFaxQueue','FaxQueue','findAll','options','raw','attributes','limit','include','map','model'];(function(_0x437d7f,_0x1feb46){var _0x31058c=function(_0x49dd1a){while(--_0x49dd1a){_0x437d7f['push'](_0x437d7f['shift']());}};_0x31058c(++_0x1feb46);}(_0x56fc,0x7c));var _0xc56f=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0x56fc[_0x160c73];return _0xd9302;};'use strict';var _=require(_0xc56f('0x0'));var util=require(_0xc56f('0x1'));var moment=require(_0xc56f('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc56f('0x3'));var db=require(_0xc56f('0x4'))['db'];var utils=require(_0xc56f('0x5'));var logger=require(_0xc56f('0x6'))('rpc');var config=require(_0xc56f('0x7'));var jayson=require(_0xc56f('0x8'));var client=jayson[_0xc56f('0x9')]['http']({'port':0x232a});config['redis']=_[_0xc56f('0xa')](config[_0xc56f('0xb')],{'host':_0xc56f('0xc'),'port':0x18eb});var socket=require(_0xc56f('0xd'))(new Redis(config[_0xc56f('0xb')]));require('./faxQueue.socket')[_0xc56f('0xe')](socket);function respondWithRpcPromise(_0x77eeec,_0x58d6df,_0x2e0d61){return new BPromise(function(_0x27db69,_0x5e0f2a){return client[_0xc56f('0xf')](_0x77eeec,_0x2e0d61)['then'](function(_0x1cd171){logger[_0xc56f('0x10')]('FaxQueue,\x20%s,\x20%s',_0x58d6df,'request\x20sent');logger[_0xc56f('0x11')](_0xc56f('0x12'),_0x58d6df,_0xc56f('0x13'),JSON[_0xc56f('0x14')](_0x1cd171));if(_0x1cd171['error']){if(_0x1cd171[_0xc56f('0x15')]['code']===0x1f4){logger['error'](_0xc56f('0x16'),_0x58d6df,_0x1cd171[_0xc56f('0x15')][_0xc56f('0x17')]);return _0x5e0f2a(_0x1cd171[_0xc56f('0x15')]['message']);}logger[_0xc56f('0x15')](_0xc56f('0x16'),_0x58d6df,_0x1cd171[_0xc56f('0x15')][_0xc56f('0x17')]);return _0x27db69(_0x1cd171[_0xc56f('0x15')]['message']);}else{logger[_0xc56f('0x10')]('FaxQueue,\x20%s,\x20%s',_0x58d6df,'request\x20sent');_0x27db69(_0x1cd171[_0xc56f('0x18')]['message']);}})[_0xc56f('0x19')](function(_0x402dd7){logger[_0xc56f('0x15')](_0xc56f('0x16'),_0x58d6df,_0x402dd7);_0x5e0f2a(_0x402dd7);});});}exports[_0xc56f('0x1a')]=function(_0x46764b){var _0x570fe6=this;return new Promise(function(_0x50bc76,_0x556a98){return db[_0xc56f('0x1b')][_0xc56f('0x1c')]({'raw':_0x46764b[_0xc56f('0x1d')]?_0x46764b[_0xc56f('0x1d')][_0xc56f('0x1e')]===undefined?!![]:![]:!![],'where':_0x46764b['options']?_0x46764b[_0xc56f('0x1d')]['where']||null:null,'attributes':_0x46764b[_0xc56f('0x1d')]?_0x46764b[_0xc56f('0x1d')][_0xc56f('0x1f')]||null:null,'limit':_0x46764b[_0xc56f('0x1d')]?_0x46764b[_0xc56f('0x1d')][_0xc56f('0x20')]||null:null,'include':_0x46764b[_0xc56f('0x1d')]?_0x46764b['options'][_0xc56f('0x21')]?_['map'](_0x46764b[_0xc56f('0x1d')][_0xc56f('0x21')],function(_0x3a2f2b){return{'model':db[_0x3a2f2b['model']],'as':_0x3a2f2b['as'],'attributes':_0x3a2f2b['attributes'],'include':_0x3a2f2b['include']?_[_0xc56f('0x22')](_0x3a2f2b[_0xc56f('0x21')],function(_0x28977f){return{'model':db[_0x28977f[_0xc56f('0x23')]],'as':_0x28977f['as'],'attributes':_0x28977f[_0xc56f('0x1f')],'include':_0x28977f['include']?_[_0xc56f('0x22')](_0x28977f[_0xc56f('0x21')],function(_0x3842fa){return{'model':db[_0x3842fa[_0xc56f('0x23')]],'as':_0x3842fa['as'],'attributes':_0x3842fa['attributes']};}):[]};}):[]};}):[]:[]})[_0xc56f('0x24')](function(_0x377270){logger[_0xc56f('0x10')]('GetFaxQueue',_0x46764b);logger['debug']('GetFaxQueue',_0x46764b,JSON[_0xc56f('0x14')](_0x377270));_0x50bc76(_0x377270);})['catch'](function(_0x35e84a){logger[_0xc56f('0x15')](_0xc56f('0x1a'),_0x35e84a[_0xc56f('0x17')],_0x46764b);_0x556a98(_0x570fe6[_0xc56f('0x15')](0x1f4,_0x35e84a[_0xc56f('0x17')]));});});};exports['ShowFaxQueue']=function(_0x101610){var _0x15a0bc=this;return new Promise(function(_0x5acb88,_0x99173){return db[_0xc56f('0x1b')][_0xc56f('0x25')]({'raw':_0x101610[_0xc56f('0x1d')]?_0x101610['options'][_0xc56f('0x1e')]===undefined?!![]:![]:!![],'where':_0x101610[_0xc56f('0x1d')]?_0x101610[_0xc56f('0x1d')][_0xc56f('0x26')]||null:null,'attributes':_0x101610[_0xc56f('0x1d')]?_0x101610[_0xc56f('0x1d')][_0xc56f('0x1f')]||null:null,'include':_0x101610[_0xc56f('0x1d')]?_0x101610[_0xc56f('0x1d')][_0xc56f('0x21')]?_[_0xc56f('0x22')](_0x101610[_0xc56f('0x1d')][_0xc56f('0x21')],function(_0x123eec){return{'model':db[_0x123eec[_0xc56f('0x23')]],'as':_0x123eec['as'],'attributes':_0x123eec[_0xc56f('0x1f')],'include':_0x123eec[_0xc56f('0x21')]?_[_0xc56f('0x22')](_0x123eec[_0xc56f('0x21')],function(_0x537b88){return{'model':db[_0x537b88[_0xc56f('0x23')]],'as':_0x537b88['as'],'attributes':_0x537b88[_0xc56f('0x1f')],'include':_0x537b88[_0xc56f('0x21')]?_['map'](_0x537b88[_0xc56f('0x21')],function(_0x4d3f5a){return{'model':db[_0x4d3f5a['model']],'as':_0x4d3f5a['as'],'attributes':_0x4d3f5a['attributes']};}):[]};}):[]};}):[]:[]})[_0xc56f('0x24')](function(_0xfe5c5b){logger['info'](_0xc56f('0x27'),_0x101610);logger[_0xc56f('0x11')](_0xc56f('0x27'),_0x101610,JSON['stringify'](_0xfe5c5b));_0x5acb88(_0xfe5c5b);})[_0xc56f('0x19')](function(_0x4c0e2a){logger[_0xc56f('0x15')](_0xc56f('0x27'),_0x4c0e2a[_0xc56f('0x17')],_0x101610);_0x99173(_0x15a0bc[_0xc56f('0x15')](0x1f4,_0x4c0e2a[_0xc56f('0x17')]));});});};
\ No newline at end of file
+var _0xdc6e=['localhost','request','info','FaxQueue,\x20%s,\x20%s','debug','FaxQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','FaxQueue','findAll','options','raw','where','attributes','include','map','model','then','GetFaxQueue','ShowFaxQueue','find','lodash','moment','bluebird','randomstring','../../config/utils','rpc','jayson/promise','client','http','redis','defaults'];(function(_0x3af7d4,_0x2f817b){var _0x4c8da4=function(_0x1b4c4f){while(--_0x1b4c4f){_0x3af7d4['push'](_0x3af7d4['shift']());}};_0x4c8da4(++_0x2f817b);}(_0xdc6e,0x1d6));var _0xedc6=function(_0x59820d,_0xc8e6ba){_0x59820d=_0x59820d-0x0;var _0x3c72b1=_0xdc6e[_0x59820d];return _0x3c72b1;};'use strict';var _=require(_0xedc6('0x0'));var util=require('util');var moment=require(_0xedc6('0x1'));var BPromise=require(_0xedc6('0x2'));var rs=require(_0xedc6('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xedc6('0x4'));var logger=require('../../config/logger')(_0xedc6('0x5'));var config=require('../../config/environment');var jayson=require(_0xedc6('0x6'));var client=jayson[_0xedc6('0x7')][_0xedc6('0x8')]({'port':0x232a});config[_0xedc6('0x9')]=_[_0xedc6('0xa')](config['redis'],{'host':_0xedc6('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xedc6('0x9')]));require('./faxQueue.socket')['register'](socket);function respondWithRpcPromise(_0x7e846,_0x4a721a,_0x351bdd){return new BPromise(function(_0x428f96,_0x1f5796){return client[_0xedc6('0xc')](_0x7e846,_0x351bdd)['then'](function(_0x66389){logger[_0xedc6('0xd')](_0xedc6('0xe'),_0x4a721a,'request\x20sent');logger[_0xedc6('0xf')](_0xedc6('0x10'),_0x4a721a,_0xedc6('0x11'),JSON[_0xedc6('0x12')](_0x66389));if(_0x66389[_0xedc6('0x13')]){if(_0x66389[_0xedc6('0x13')][_0xedc6('0x14')]===0x1f4){logger[_0xedc6('0x13')](_0xedc6('0xe'),_0x4a721a,_0x66389[_0xedc6('0x13')][_0xedc6('0x15')]);return _0x1f5796(_0x66389[_0xedc6('0x13')][_0xedc6('0x15')]);}logger[_0xedc6('0x13')]('FaxQueue,\x20%s,\x20%s',_0x4a721a,_0x66389['error'][_0xedc6('0x15')]);return _0x428f96(_0x66389[_0xedc6('0x13')][_0xedc6('0x15')]);}else{logger[_0xedc6('0xd')]('FaxQueue,\x20%s,\x20%s',_0x4a721a,'request\x20sent');_0x428f96(_0x66389[_0xedc6('0x16')][_0xedc6('0x15')]);}})[_0xedc6('0x17')](function(_0x4bbda7){logger[_0xedc6('0x13')]('FaxQueue,\x20%s,\x20%s',_0x4a721a,_0x4bbda7);_0x1f5796(_0x4bbda7);});});}exports['GetFaxQueue']=function(_0x3ed539){var _0x486b9d=this;return new Promise(function(_0x3e2b90,_0x4c3f63){return db[_0xedc6('0x18')][_0xedc6('0x19')]({'raw':_0x3ed539[_0xedc6('0x1a')]?_0x3ed539[_0xedc6('0x1a')][_0xedc6('0x1b')]===undefined?!![]:![]:!![],'where':_0x3ed539[_0xedc6('0x1a')]?_0x3ed539[_0xedc6('0x1a')][_0xedc6('0x1c')]||null:null,'attributes':_0x3ed539[_0xedc6('0x1a')]?_0x3ed539['options'][_0xedc6('0x1d')]||null:null,'limit':_0x3ed539[_0xedc6('0x1a')]?_0x3ed539[_0xedc6('0x1a')]['limit']||null:null,'include':_0x3ed539[_0xedc6('0x1a')]?_0x3ed539[_0xedc6('0x1a')][_0xedc6('0x1e')]?_[_0xedc6('0x1f')](_0x3ed539[_0xedc6('0x1a')][_0xedc6('0x1e')],function(_0x28c521){return{'model':db[_0x28c521[_0xedc6('0x20')]],'as':_0x28c521['as'],'attributes':_0x28c521[_0xedc6('0x1d')],'include':_0x28c521['include']?_[_0xedc6('0x1f')](_0x28c521['include'],function(_0x9a3e63){return{'model':db[_0x9a3e63['model']],'as':_0x9a3e63['as'],'attributes':_0x9a3e63[_0xedc6('0x1d')],'include':_0x9a3e63[_0xedc6('0x1e')]?_[_0xedc6('0x1f')](_0x9a3e63[_0xedc6('0x1e')],function(_0x5cd92a){return{'model':db[_0x5cd92a['model']],'as':_0x5cd92a['as'],'attributes':_0x5cd92a[_0xedc6('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xedc6('0x21')](function(_0x3e1c7d){logger[_0xedc6('0xd')](_0xedc6('0x22'),_0x3ed539);logger[_0xedc6('0xf')](_0xedc6('0x22'),_0x3ed539,JSON[_0xedc6('0x12')](_0x3e1c7d));_0x3e2b90(_0x3e1c7d);})[_0xedc6('0x17')](function(_0x1c56e1){logger['error'](_0xedc6('0x22'),_0x1c56e1[_0xedc6('0x15')],_0x3ed539);_0x4c3f63(_0x486b9d[_0xedc6('0x13')](0x1f4,_0x1c56e1['message']));});});};exports[_0xedc6('0x23')]=function(_0x2783f7){var _0x1bcfdb=this;return new Promise(function(_0x47a464,_0x4fcaa9){return db[_0xedc6('0x18')][_0xedc6('0x24')]({'raw':_0x2783f7[_0xedc6('0x1a')]?_0x2783f7[_0xedc6('0x1a')][_0xedc6('0x1b')]===undefined?!![]:![]:!![],'where':_0x2783f7[_0xedc6('0x1a')]?_0x2783f7[_0xedc6('0x1a')][_0xedc6('0x1c')]||null:null,'attributes':_0x2783f7[_0xedc6('0x1a')]?_0x2783f7['options'][_0xedc6('0x1d')]||null:null,'include':_0x2783f7['options']?_0x2783f7['options'][_0xedc6('0x1e')]?_[_0xedc6('0x1f')](_0x2783f7[_0xedc6('0x1a')][_0xedc6('0x1e')],function(_0x512697){return{'model':db[_0x512697[_0xedc6('0x20')]],'as':_0x512697['as'],'attributes':_0x512697[_0xedc6('0x1d')],'include':_0x512697[_0xedc6('0x1e')]?_[_0xedc6('0x1f')](_0x512697[_0xedc6('0x1e')],function(_0xb466c7){return{'model':db[_0xb466c7['model']],'as':_0xb466c7['as'],'attributes':_0xb466c7['attributes'],'include':_0xb466c7[_0xedc6('0x1e')]?_['map'](_0xb466c7[_0xedc6('0x1e')],function(_0x5f34a8){return{'model':db[_0x5f34a8[_0xedc6('0x20')]],'as':_0x5f34a8['as'],'attributes':_0x5f34a8[_0xedc6('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xedc6('0x21')](function(_0x563499){logger[_0xedc6('0xd')](_0xedc6('0x23'),_0x2783f7);logger[_0xedc6('0xf')]('ShowFaxQueue',_0x2783f7,JSON[_0xedc6('0x12')](_0x563499));_0x47a464(_0x563499);})[_0xedc6('0x17')](function(_0x1783bd){logger[_0xedc6('0x13')]('ShowFaxQueue',_0x1783bd[_0xedc6('0x15')],_0x2783f7);_0x4fcaa9(_0x1bcfdb['error'](0x1f4,_0x1783bd[_0xedc6('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.socket.js b/server/api/faxQueue/faxQueue.socket.js
index cfc9bef..c4ee5f7 100644
--- a/server/api/faxQueue/faxQueue.socket.js
+++ b/server/api/faxQueue/faxQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7add=['save','update','emit','removeListener','register','length','faxQueue:','./faxQueue.events'];(function(_0x295d68,_0x4120c1){var _0x81a272=function(_0x4553c0){while(--_0x4553c0){_0x295d68['push'](_0x295d68['shift']());}};_0x81a272(++_0x4120c1);}(_0x7add,0xd7));var _0xd7ad=function(_0x5b1530,_0x527c09){_0x5b1530=_0x5b1530-0x0;var _0xa3527c=_0x7add[_0x5b1530];return _0xa3527c;};'use strict';var FaxQueueEvents=require(_0xd7ad('0x0'));var events=[_0xd7ad('0x1'),'remove',_0xd7ad('0x2')];function createListener(_0x4f757c,_0x56a94c){return function(_0xc8cd23){_0x56a94c[_0xd7ad('0x3')](_0x4f757c,_0xc8cd23);};}function removeListener(_0x289e04,_0x2714ea){return function(){FaxQueueEvents[_0xd7ad('0x4')](_0x289e04,_0x2714ea);};}exports[_0xd7ad('0x5')]=function(_0x59a0d9){for(var _0x3d07b2=0x0,_0x4ac855=events[_0xd7ad('0x6')];_0x3d07b2<_0x4ac855;_0x3d07b2++){var _0x4aeea7=events[_0x3d07b2];var _0x1c8748=createListener(_0xd7ad('0x7')+_0x4aeea7,_0x59a0d9);FaxQueueEvents['on'](_0x4aeea7,_0x1c8748);}};
\ No newline at end of file
+var _0x33f0=['./faxQueue.events','remove','update','emit','removeListener','register','length','faxQueue:'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x33f0,0x1a0));var _0x033f=function(_0x4ee737,_0x2b2bbf){_0x4ee737=_0x4ee737-0x0;var _0x5ed19b=_0x33f0[_0x4ee737];return _0x5ed19b;};'use strict';var FaxQueueEvents=require(_0x033f('0x0'));var events=['save',_0x033f('0x1'),_0x033f('0x2')];function createListener(_0x4d1298,_0x1c6656){return function(_0x208aba){_0x1c6656[_0x033f('0x3')](_0x4d1298,_0x208aba);};}function removeListener(_0x37f115,_0x1266d1){return function(){FaxQueueEvents[_0x033f('0x4')](_0x37f115,_0x1266d1);};}exports[_0x033f('0x5')]=function(_0x117f0f){for(var _0x2b60f6=0x0,_0x2b8e39=events[_0x033f('0x6')];_0x2b60f6<_0x2b8e39;_0x2b60f6++){var _0x2f8d0c=events[_0x2b60f6];var _0x6e6464=createListener(_0x033f('0x7')+_0x2f8d0c,_0x117f0f);FaxQueueEvents['on'](_0x2f8d0c,_0x6e6464);}};
\ No newline at end of file
diff --git a/server/api/faxQueue/index.js b/server/api/faxQueue/index.js
index dcbfd03..7413e5b 100644
--- a/server/api/faxQueue/index.js
+++ b/server/api/faxQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8dff=['update','delete','removeTeams','removeAgents','exports','multer','util','express','Router','../../components/interaction/service','../../config/environment','./faxQueue.controller','get','isAuthenticated','/describe','describe','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','create','/:id/teams','addTeams','addAgents','put','/:id'];(function(_0x2e655a,_0x6d5799){var _0x26f13b=function(_0x2dd535){while(--_0x2dd535){_0x2e655a['push'](_0x2e655a['shift']());}};_0x26f13b(++_0x6d5799);}(_0x8dff,0xd0));var _0xf8df=function(_0x545ad4,_0x3bedfe){_0x545ad4=_0x545ad4-0x0;var _0x5d835b=_0x8dff[_0x545ad4];return _0x5d835b;};'use strict';var multer=require(_0xf8df('0x0'));var util=require(_0xf8df('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xf8df('0x2'));var router=express[_0xf8df('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xf8df('0x4'));var config=require(_0xf8df('0x5'));var controller=require(_0xf8df('0x6'));router[_0xf8df('0x7')]('/',auth[_0xf8df('0x8')](),controller['index']);router[_0xf8df('0x7')](_0xf8df('0x9'),auth[_0xf8df('0x8')](),controller[_0xf8df('0xa')]);router[_0xf8df('0x7')]('/:id',auth[_0xf8df('0x8')](),controller[_0xf8df('0xb')]);router['get'](_0xf8df('0xc'),auth[_0xf8df('0x8')](),controller[_0xf8df('0xd')]);router[_0xf8df('0x7')]('/:id/teams',auth[_0xf8df('0x8')](),controller[_0xf8df('0xe')]);router['get'](_0xf8df('0xf'),auth[_0xf8df('0x8')](),controller[_0xf8df('0x10')]);router[_0xf8df('0x11')]('/',auth[_0xf8df('0x8')](),controller[_0xf8df('0x12')]);router['post'](_0xf8df('0x13'),auth[_0xf8df('0x8')](),controller[_0xf8df('0x14')]);router['post'](_0xf8df('0xf'),auth[_0xf8df('0x8')](),controller[_0xf8df('0x15')]);router[_0xf8df('0x16')](_0xf8df('0x17'),auth[_0xf8df('0x8')](),controller[_0xf8df('0x18')]);router[_0xf8df('0x19')]('/:id',auth[_0xf8df('0x8')](),controller['destroy']);router[_0xf8df('0x19')](_0xf8df('0x13'),auth[_0xf8df('0x8')](),controller[_0xf8df('0x1a')]);router[_0xf8df('0x19')]('/:id/users',auth[_0xf8df('0x8')](),controller[_0xf8df('0x1b')]);module[_0xf8df('0x1c')]=router;
\ No newline at end of file
+var _0x3b07=['/:id','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','create','/:id/teams','addTeams','addAgents','removeAgents','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueue.controller','get','isAuthenticated','describe'];(function(_0x4e1aad,_0x4cb031){var _0x1a1abd=function(_0x1d111a){while(--_0x1d111a){_0x4e1aad['push'](_0x4e1aad['shift']());}};_0x1a1abd(++_0x4cb031);}(_0x3b07,0x120));var _0x73b0=function(_0x1c7538,_0x3e0842){_0x1c7538=_0x1c7538-0x0;var _0x2bea3e=_0x3b07[_0x1c7538];return _0x2bea3e;};'use strict';var multer=require('multer');var util=require(_0x73b0('0x0'));var path=require(_0x73b0('0x1'));var timeout=require(_0x73b0('0x2'));var express=require(_0x73b0('0x3'));var router=express[_0x73b0('0x4')]();var auth=require(_0x73b0('0x5'));var interaction=require(_0x73b0('0x6'));var config=require(_0x73b0('0x7'));var controller=require(_0x73b0('0x8'));router[_0x73b0('0x9')]('/',auth[_0x73b0('0xa')](),controller['index']);router[_0x73b0('0x9')]('/describe',auth[_0x73b0('0xa')](),controller[_0x73b0('0xb')]);router[_0x73b0('0x9')](_0x73b0('0xc'),auth[_0x73b0('0xa')](),controller[_0x73b0('0xd')]);router[_0x73b0('0x9')](_0x73b0('0xe'),auth['isAuthenticated'](),controller[_0x73b0('0xf')]);router['get']('/:id/teams',auth[_0x73b0('0xa')](),controller[_0x73b0('0x10')]);router[_0x73b0('0x9')](_0x73b0('0x11'),auth['isAuthenticated'](),controller[_0x73b0('0x12')]);router[_0x73b0('0x13')]('/',auth[_0x73b0('0xa')](),controller[_0x73b0('0x14')]);router[_0x73b0('0x13')](_0x73b0('0x15'),auth[_0x73b0('0xa')](),controller[_0x73b0('0x16')]);router[_0x73b0('0x13')](_0x73b0('0x11'),auth[_0x73b0('0xa')](),controller[_0x73b0('0x17')]);router['put'](_0x73b0('0xc'),auth['isAuthenticated'](),controller['update']);router['delete']('/:id',auth[_0x73b0('0xa')](),controller['destroy']);router['delete'](_0x73b0('0x15'),auth[_0x73b0('0xa')](),controller['removeTeams']);router['delete'](_0x73b0('0x11'),auth[_0x73b0('0xa')](),controller[_0x73b0('0x18')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.attributes.js b/server/api/faxQueueReport/faxQueueReport.attributes.js
index e9ce5c8..81f02f3 100644
--- a/server/api/faxQueueReport/faxQueueReport.attributes.js
+++ b/server/api/faxQueueReport/faxQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9647=['moment','sequelize','exports','DATE'];(function(_0x378c13,_0x487a46){var _0x1d25d6=function(_0x3c84cf){while(--_0x3c84cf){_0x378c13['push'](_0x378c13['shift']());}};_0x1d25d6(++_0x487a46);}(_0x9647,0x1e0));var _0x7964=function(_0x3f191c,_0x317439){_0x3f191c=_0x3f191c-0x0;var _0xc1c39f=_0x9647[_0x3f191c];return _0xc1c39f;};'use strict';var moment=require(_0x7964('0x0'));var Sequelize=require(_0x7964('0x1'));module[_0x7964('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x7964('0x3')]},'acceptAt':{'type':Sequelize[_0x7964('0x3')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb295=['STRING','DATE','moment','exports'];(function(_0x131585,_0x1abd33){var _0x1fcca2=function(_0x8f165b){while(--_0x8f165b){_0x131585['push'](_0x131585['shift']());}};_0x1fcca2(++_0x1abd33);}(_0xb295,0x172));var _0x5b29=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0xb295[_0x27af45];return _0x18df21;};'use strict';var moment=require(_0x5b29('0x0'));var Sequelize=require('sequelize');module[_0x5b29('0x1')]={'uniqueid':{'type':Sequelize[_0x5b29('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x5b29('0x2')]},'joinAt':{'type':Sequelize[_0x5b29('0x3')]},'leaveAt':{'type':Sequelize[_0x5b29('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x5b29('0x3')]},'reason':{'type':Sequelize[_0x5b29('0x2')]}};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.controller.js b/server/api/faxQueueReport/faxQueueReport.controller.js
index f2b5d01..dcea3c1 100644
--- a/server/api/faxQueueReport/faxQueueReport.controller.js
+++ b/server/api/faxQueueReport/faxQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8d8c=['sort','where','pick','merge','key','filter','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','count','offset','set','json','apply','save','update','then','destroy','error','stack','name','send','index','FaxQueueReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order'];(function(_0x296a21,_0x1ed07d){var _0x328c11=function(_0x4335e3){while(--_0x4335e3){_0x296a21['push'](_0x296a21['shift']());}};_0x328c11(++_0x1ed07d);}(_0x8d8c,0x1b6));var _0xc8d8=function(_0x40171b,_0x3f9fb2){_0x40171b=_0x40171b-0x0;var _0x847390=_0x8d8c[_0x40171b];return _0x847390;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc8d8('0x0'));var rimraf=require(_0xc8d8('0x1'));var zipdir=require(_0xc8d8('0x2'));var jsonpatch=require(_0xc8d8('0x3'));var rp=require(_0xc8d8('0x4'));var moment=require(_0xc8d8('0x5'));var BPromise=require(_0xc8d8('0x6'));var Mustache=require(_0xc8d8('0x7'));var util=require(_0xc8d8('0x8'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xc8d8('0x9'));var squel=require('squel');var crypto=require(_0xc8d8('0xa'));var jsforce=require(_0xc8d8('0xb'));var deskjs=require(_0xc8d8('0xc'));var toCsv=require(_0xc8d8('0xd'));var querystring=require(_0xc8d8('0xe'));var Papa=require(_0xc8d8('0xf'));var Redis=require(_0xc8d8('0x10'));var authService=require(_0xc8d8('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc8d8('0x12'));var utils=require(_0xc8d8('0x13'));var config=require(_0xc8d8('0x14'));var db=require(_0xc8d8('0x15'))['db'];function respondWithStatusCode(_0x10a20e,_0xbf9aa){_0xbf9aa=_0xbf9aa||0xcc;return function(_0x7bbf7f){if(_0x7bbf7f){return _0x10a20e[_0xc8d8('0x16')](_0xbf9aa);}return _0x10a20e['status'](_0xbf9aa)[_0xc8d8('0x17')]();};}function respondWithResult(_0x519f7b,_0x2201cd){_0x2201cd=_0x2201cd||0xc8;return function(_0x3edd1d){if(_0x3edd1d){return _0x519f7b[_0xc8d8('0x18')](_0x2201cd)['json'](_0x3edd1d);}};}function respondWithFilteredResult(_0x4c4645,_0x2011de){return function(_0x532123){if(_0x532123){var _0x4add9f=_0x532123[_0xc8d8('0x19')],_0x32d39e=_0x2011de['offset'],_0x13ce49=_0x2011de[_0xc8d8('0x1a')]+_0x2011de['limit'],_0xc7d33b;if(_0x13ce49>=_0x4add9f){_0x13ce49=_0x4add9f;_0xc7d33b=0xc8;}else{_0xc7d33b=0xce;}_0x4c4645['status'](_0xc7d33b);return _0x4c4645[_0xc8d8('0x1b')]('Content-Range',_0x32d39e+'-'+_0x13ce49+'/'+_0x4add9f)[_0xc8d8('0x1c')](_0x532123);}return null;};}function patchUpdates(_0x281bfc){return function(_0x4a624f){try{jsonpatch[_0xc8d8('0x1d')](_0x4a624f,_0x281bfc,!![]);}catch(_0x3d7c29){return BPromise['reject'](_0x3d7c29);}return _0x4a624f[_0xc8d8('0x1e')]();};}function saveUpdates(_0x9c71f1,_0x446d4c){return function(_0xdabfec){if(_0xdabfec){return _0xdabfec[_0xc8d8('0x1f')](_0x9c71f1)[_0xc8d8('0x20')](function(_0x5e2484){return _0x5e2484;});}return null;};}function removeEntity(_0x4f491e,_0x2b1272){return function(_0x4be61f){if(_0x4be61f){return _0x4be61f[_0xc8d8('0x21')]()[_0xc8d8('0x20')](function(){_0x4f491e[_0xc8d8('0x18')](0xcc)[_0xc8d8('0x17')]();});}};}function handleEntityNotFound(_0x1f422d,_0x32611b){return function(_0xe3703c){if(!_0xe3703c){_0x1f422d[_0xc8d8('0x16')](0x194);}return _0xe3703c;};}function handleError(_0x282796,_0x3f5473){_0x3f5473=_0x3f5473||0x1f4;return function(_0xb218ea){logger[_0xc8d8('0x22')](_0xb218ea[_0xc8d8('0x23')]);if(_0xb218ea[_0xc8d8('0x24')]){delete _0xb218ea[_0xc8d8('0x24')];}_0x282796[_0xc8d8('0x18')](_0x3f5473)[_0xc8d8('0x25')](_0xb218ea);};}exports[_0xc8d8('0x26')]=function(_0x434ec0,_0x45152c){var _0x439149={},_0x5e48c4={},_0x510530={'count':0x0,'rows':[]};var _0x405eba=db[_0xc8d8('0x27')][_0xc8d8('0x28')];_0x5e48c4[_0xc8d8('0x29')]=_[_0xc8d8('0x2a')](_0x405eba);_0x5e48c4[_0xc8d8('0x2b')]=_[_0xc8d8('0x2a')](_0x434ec0[_0xc8d8('0x2b')]);_0x5e48c4[_0xc8d8('0x2c')]=_[_0xc8d8('0x2d')](_0x5e48c4[_0xc8d8('0x29')],_0x5e48c4[_0xc8d8('0x2b')]);_0x439149[_0xc8d8('0x2e')]=_[_0xc8d8('0x2d')](_0x5e48c4[_0xc8d8('0x29')],qs[_0xc8d8('0x2f')](_0x434ec0['query']['fields']));_0x439149['attributes']=_0x439149[_0xc8d8('0x2e')][_0xc8d8('0x30')]?_0x439149[_0xc8d8('0x2e')]:_0x5e48c4[_0xc8d8('0x29')];if(!_0x434ec0['query'][_0xc8d8('0x31')]('nolimit')){_0x439149[_0xc8d8('0x32')]=qs['limit'](_0x434ec0[_0xc8d8('0x2b')][_0xc8d8('0x32')]);_0x439149['offset']=qs[_0xc8d8('0x1a')](_0x434ec0['query'][_0xc8d8('0x1a')]);}_0x439149[_0xc8d8('0x33')]=qs[_0xc8d8('0x34')](_0x434ec0[_0xc8d8('0x2b')][_0xc8d8('0x34')]);_0x439149[_0xc8d8('0x35')]=qs[_0xc8d8('0x2c')](_[_0xc8d8('0x36')](_0x434ec0['query'],_0x5e48c4[_0xc8d8('0x2c')]));if(_0x434ec0[_0xc8d8('0x2b')]['filter']){_0x439149[_0xc8d8('0x35')]=_[_0xc8d8('0x37')](_0x439149[_0xc8d8('0x35')],{'$or':_['map'](_0x405eba,function(_0x16c52c){if(_0x16c52c['type'][_0xc8d8('0x38')]!=='VIRTUAL'){var _0x1193de={};_0x1193de[_0x16c52c['field']]={'$like':'%'+_0x434ec0[_0xc8d8('0x2b')][_0xc8d8('0x39')]+'%'};return _0x1193de;}})});}_0x439149=_[_0xc8d8('0x37')]({},_0x439149,_0x434ec0[_0xc8d8('0x3a')]);var _0x1f4f89={'where':_0x439149[_0xc8d8('0x35')]};return db[_0xc8d8('0x27')][_0xc8d8('0x19')](_0x1f4f89)[_0xc8d8('0x20')](function(_0x389015){_0x510530['count']=_0x389015;if(_0x434ec0[_0xc8d8('0x2b')]['includeAll']){_0x439149[_0xc8d8('0x3b')]=[{'all':!![]}];}return db[_0xc8d8('0x27')][_0xc8d8('0x3c')](_0x439149);})[_0xc8d8('0x20')](function(_0x550291){_0x510530[_0xc8d8('0x3d')]=_0x550291;return _0x510530;})[_0xc8d8('0x20')](respondWithFilteredResult(_0x45152c,_0x439149))[_0xc8d8('0x3e')](handleError(_0x45152c,null));};exports[_0xc8d8('0x3f')]=function(_0x44beb3,_0x223f31){var _0x4423a7={'raw':!![],'where':{'id':_0x44beb3[_0xc8d8('0x40')]['id']}},_0x1474bc={};_0x1474bc['model']=_[_0xc8d8('0x2a')](db['FaxQueueReport'][_0xc8d8('0x28')]);_0x1474bc[_0xc8d8('0x2b')]=_['keys'](_0x44beb3[_0xc8d8('0x2b')]);_0x1474bc[_0xc8d8('0x2c')]=_[_0xc8d8('0x2d')](_0x1474bc[_0xc8d8('0x29')],_0x1474bc['query']);_0x4423a7[_0xc8d8('0x2e')]=_[_0xc8d8('0x2d')](_0x1474bc[_0xc8d8('0x29')],qs[_0xc8d8('0x2f')](_0x44beb3[_0xc8d8('0x2b')][_0xc8d8('0x2f')]));_0x4423a7[_0xc8d8('0x2e')]=_0x4423a7[_0xc8d8('0x2e')][_0xc8d8('0x30')]?_0x4423a7['attributes']:_0x1474bc['model'];if(_0x44beb3[_0xc8d8('0x2b')][_0xc8d8('0x41')]){_0x4423a7['include']=[{'all':!![]}];}_0x4423a7=_['merge']({},_0x4423a7,_0x44beb3[_0xc8d8('0x3a')]);return db[_0xc8d8('0x27')][_0xc8d8('0x42')](_0x4423a7)[_0xc8d8('0x20')](handleEntityNotFound(_0x223f31,null))[_0xc8d8('0x20')](respondWithResult(_0x223f31,null))[_0xc8d8('0x3e')](handleError(_0x223f31,null));};exports[_0xc8d8('0x43')]=function(_0x159d15,_0x2d4600){return db[_0xc8d8('0x27')][_0xc8d8('0x43')](_0x159d15[_0xc8d8('0x44')],{})[_0xc8d8('0x20')](respondWithResult(_0x2d4600,0xc9))[_0xc8d8('0x3e')](handleError(_0x2d4600,null));};exports[_0xc8d8('0x1f')]=function(_0xade950,_0x4df3c7){if(_0xade950['body']['id']){delete _0xade950['body']['id'];}return db[_0xc8d8('0x27')][_0xc8d8('0x42')]({'where':{'id':_0xade950[_0xc8d8('0x40')]['id']}})[_0xc8d8('0x20')](handleEntityNotFound(_0x4df3c7,null))['then'](saveUpdates(_0xade950[_0xc8d8('0x44')],null))[_0xc8d8('0x20')](respondWithResult(_0x4df3c7,null))[_0xc8d8('0x3e')](handleError(_0x4df3c7,null));};exports[_0xc8d8('0x21')]=function(_0x40d474,_0x19b2a9){return db[_0xc8d8('0x27')][_0xc8d8('0x42')]({'where':{'id':_0x40d474[_0xc8d8('0x40')]['id']}})[_0xc8d8('0x20')](handleEntityNotFound(_0x19b2a9,null))['then'](removeEntity(_0x19b2a9,null))['catch'](handleError(_0x19b2a9,null));};exports[_0xc8d8('0x45')]=function(_0x1ba65f,_0x606f89){return db[_0xc8d8('0x27')]['describe']()[_0xc8d8('0x20')](respondWithResult(_0x606f89,null))['catch'](handleError(_0x606f89,null));};
\ No newline at end of file
+var _0x8a03=['eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','FaxQueueReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','merge','map','type','key','VIRTUAL','field','options','includeAll','catch','show','params','find','create','body','describe','html-pdf'];(function(_0xf25001,_0xcaff40){var _0x3d593a=function(_0x15a786){while(--_0x15a786){_0xf25001['push'](_0xf25001['shift']());}};_0x3d593a(++_0xcaff40);}(_0x8a03,0x17b));var _0x38a0=function(_0x5953d5,_0x30d19c){_0x5953d5=_0x5953d5-0x0;var _0xd91698=_0x8a03[_0x5953d5];return _0xd91698;};'use strict';var pdf=require(_0x38a0('0x0'));var emlformat=require(_0x38a0('0x1'));var rimraf=require(_0x38a0('0x2'));var zipdir=require(_0x38a0('0x3'));var jsonpatch=require(_0x38a0('0x4'));var rp=require(_0x38a0('0x5'));var moment=require(_0x38a0('0x6'));var BPromise=require(_0x38a0('0x7'));var Mustache=require(_0x38a0('0x8'));var util=require(_0x38a0('0x9'));var path=require(_0x38a0('0xa'));var sox=require('sox');var csv=require(_0x38a0('0xb'));var ejs=require(_0x38a0('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0x38a0('0xd'));var crypto=require('crypto');var jsforce=require(_0x38a0('0xe'));var deskjs=require(_0x38a0('0xf'));var toCsv=require('to-csv');var querystring=require(_0x38a0('0x10'));var Papa=require('papaparse');var Redis=require(_0x38a0('0x11'));var authService=require(_0x38a0('0x12'));var qs=require(_0x38a0('0x13'));var hardwareService=require(_0x38a0('0x14'));var logger=require('../../config/logger')(_0x38a0('0x15'));var utils=require(_0x38a0('0x16'));var config=require(_0x38a0('0x17'));var db=require(_0x38a0('0x18'))['db'];function respondWithStatusCode(_0x596227,_0x56757e){_0x56757e=_0x56757e||0xcc;return function(_0x2af84f){if(_0x2af84f){return _0x596227[_0x38a0('0x19')](_0x56757e);}return _0x596227[_0x38a0('0x1a')](_0x56757e)[_0x38a0('0x1b')]();};}function respondWithResult(_0x239486,_0x4906d1){_0x4906d1=_0x4906d1||0xc8;return function(_0x1499ac){if(_0x1499ac){return _0x239486['status'](_0x4906d1)[_0x38a0('0x1c')](_0x1499ac);}};}function respondWithFilteredResult(_0x57e921,_0x1bfdbd){return function(_0x4de4f6){if(_0x4de4f6){var _0x326705=_0x4de4f6[_0x38a0('0x1d')],_0xeed3c2=_0x1bfdbd['offset'],_0x185810=_0x1bfdbd[_0x38a0('0x1e')]+_0x1bfdbd['limit'],_0x375489;if(_0x185810>=_0x326705){_0x185810=_0x326705;_0x375489=0xc8;}else{_0x375489=0xce;}_0x57e921[_0x38a0('0x1a')](_0x375489);return _0x57e921[_0x38a0('0x1f')](_0x38a0('0x20'),_0xeed3c2+'-'+_0x185810+'/'+_0x326705)['json'](_0x4de4f6);}return null;};}function patchUpdates(_0x4133b9){return function(_0x570335){try{jsonpatch[_0x38a0('0x21')](_0x570335,_0x4133b9,!![]);}catch(_0x2d7e2a){return BPromise[_0x38a0('0x22')](_0x2d7e2a);}return _0x570335[_0x38a0('0x23')]();};}function saveUpdates(_0x413325,_0x4c877f){return function(_0x5528a7){if(_0x5528a7){return _0x5528a7[_0x38a0('0x24')](_0x413325)[_0x38a0('0x25')](function(_0x20c5ff){return _0x20c5ff;});}return null;};}function removeEntity(_0x5d0163,_0x376b77){return function(_0x42f0b8){if(_0x42f0b8){return _0x42f0b8['destroy']()[_0x38a0('0x25')](function(){_0x5d0163[_0x38a0('0x1a')](0xcc)[_0x38a0('0x1b')]();});}};}function handleEntityNotFound(_0x3ce4ae,_0x306519){return function(_0x3f5bcb){if(!_0x3f5bcb){_0x3ce4ae['sendStatus'](0x194);}return _0x3f5bcb;};}function handleError(_0x133a4e,_0x2e2650){_0x2e2650=_0x2e2650||0x1f4;return function(_0x1fea89){logger[_0x38a0('0x26')](_0x1fea89[_0x38a0('0x27')]);if(_0x1fea89[_0x38a0('0x28')]){delete _0x1fea89[_0x38a0('0x28')];}_0x133a4e[_0x38a0('0x1a')](_0x2e2650)[_0x38a0('0x29')](_0x1fea89);};}exports[_0x38a0('0x2a')]=function(_0x5b99a4,_0xc9867d){var _0x4c7daf={},_0x2fda14={},_0x1e4f03={'count':0x0,'rows':[]};var _0x116b6f=db[_0x38a0('0x2b')][_0x38a0('0x2c')];_0x2fda14[_0x38a0('0x2d')]=_[_0x38a0('0x2e')](_0x116b6f);_0x2fda14[_0x38a0('0x2f')]=_[_0x38a0('0x2e')](_0x5b99a4[_0x38a0('0x2f')]);_0x2fda14[_0x38a0('0x30')]=_[_0x38a0('0x31')](_0x2fda14[_0x38a0('0x2d')],_0x2fda14['query']);_0x4c7daf[_0x38a0('0x32')]=_['intersection'](_0x2fda14[_0x38a0('0x2d')],qs[_0x38a0('0x33')](_0x5b99a4['query']['fields']));_0x4c7daf['attributes']=_0x4c7daf[_0x38a0('0x32')][_0x38a0('0x34')]?_0x4c7daf[_0x38a0('0x32')]:_0x2fda14[_0x38a0('0x2d')];if(!_0x5b99a4[_0x38a0('0x2f')][_0x38a0('0x35')](_0x38a0('0x36'))){_0x4c7daf[_0x38a0('0x37')]=qs[_0x38a0('0x37')](_0x5b99a4[_0x38a0('0x2f')]['limit']);_0x4c7daf[_0x38a0('0x1e')]=qs[_0x38a0('0x1e')](_0x5b99a4[_0x38a0('0x2f')][_0x38a0('0x1e')]);}_0x4c7daf[_0x38a0('0x38')]=qs[_0x38a0('0x39')](_0x5b99a4['query'][_0x38a0('0x39')]);_0x4c7daf['where']=qs[_0x38a0('0x30')](_[_0x38a0('0x3a')](_0x5b99a4['query'],_0x2fda14[_0x38a0('0x30')]));if(_0x5b99a4[_0x38a0('0x2f')][_0x38a0('0x3b')]){_0x4c7daf[_0x38a0('0x3c')]=_[_0x38a0('0x3d')](_0x4c7daf[_0x38a0('0x3c')],{'$or':_[_0x38a0('0x3e')](_0x116b6f,function(_0x1fe4b9){if(_0x1fe4b9[_0x38a0('0x3f')][_0x38a0('0x40')]!==_0x38a0('0x41')){var _0x8d280e={};_0x8d280e[_0x1fe4b9[_0x38a0('0x42')]]={'$like':'%'+_0x5b99a4[_0x38a0('0x2f')][_0x38a0('0x3b')]+'%'};return _0x8d280e;}})});}_0x4c7daf=_[_0x38a0('0x3d')]({},_0x4c7daf,_0x5b99a4[_0x38a0('0x43')]);var _0x1a67d6={'where':_0x4c7daf[_0x38a0('0x3c')]};return db[_0x38a0('0x2b')]['count'](_0x1a67d6)['then'](function(_0x5d6df9){_0x1e4f03[_0x38a0('0x1d')]=_0x5d6df9;if(_0x5b99a4[_0x38a0('0x2f')][_0x38a0('0x44')]){_0x4c7daf['include']=[{'all':!![]}];}return db['FaxQueueReport']['findAll'](_0x4c7daf);})['then'](function(_0x5e77f8){_0x1e4f03['rows']=_0x5e77f8;return _0x1e4f03;})[_0x38a0('0x25')](respondWithFilteredResult(_0xc9867d,_0x4c7daf))[_0x38a0('0x45')](handleError(_0xc9867d,null));};exports[_0x38a0('0x46')]=function(_0x11af7d,_0x29c9a1){var _0x237088={'raw':!![],'where':{'id':_0x11af7d[_0x38a0('0x47')]['id']}},_0x5a0c37={};_0x5a0c37[_0x38a0('0x2d')]=_['keys'](db[_0x38a0('0x2b')][_0x38a0('0x2c')]);_0x5a0c37[_0x38a0('0x2f')]=_[_0x38a0('0x2e')](_0x11af7d[_0x38a0('0x2f')]);_0x5a0c37['filters']=_[_0x38a0('0x31')](_0x5a0c37[_0x38a0('0x2d')],_0x5a0c37[_0x38a0('0x2f')]);_0x237088[_0x38a0('0x32')]=_[_0x38a0('0x31')](_0x5a0c37[_0x38a0('0x2d')],qs[_0x38a0('0x33')](_0x11af7d[_0x38a0('0x2f')]['fields']));_0x237088[_0x38a0('0x32')]=_0x237088['attributes'][_0x38a0('0x34')]?_0x237088['attributes']:_0x5a0c37[_0x38a0('0x2d')];if(_0x11af7d['query'][_0x38a0('0x44')]){_0x237088['include']=[{'all':!![]}];}_0x237088=_[_0x38a0('0x3d')]({},_0x237088,_0x11af7d[_0x38a0('0x43')]);return db[_0x38a0('0x2b')][_0x38a0('0x48')](_0x237088)[_0x38a0('0x25')](handleEntityNotFound(_0x29c9a1,null))['then'](respondWithResult(_0x29c9a1,null))[_0x38a0('0x45')](handleError(_0x29c9a1,null));};exports[_0x38a0('0x49')]=function(_0x18c647,_0x48fb7c){return db[_0x38a0('0x2b')][_0x38a0('0x49')](_0x18c647[_0x38a0('0x4a')],{})[_0x38a0('0x25')](respondWithResult(_0x48fb7c,0xc9))[_0x38a0('0x45')](handleError(_0x48fb7c,null));};exports[_0x38a0('0x24')]=function(_0x26ce18,_0x2735ce){if(_0x26ce18[_0x38a0('0x4a')]['id']){delete _0x26ce18[_0x38a0('0x4a')]['id'];}return db[_0x38a0('0x2b')][_0x38a0('0x48')]({'where':{'id':_0x26ce18['params']['id']}})['then'](handleEntityNotFound(_0x2735ce,null))[_0x38a0('0x25')](saveUpdates(_0x26ce18[_0x38a0('0x4a')],null))[_0x38a0('0x25')](respondWithResult(_0x2735ce,null))[_0x38a0('0x45')](handleError(_0x2735ce,null));};exports['destroy']=function(_0xd5be7b,_0x157e64){return db[_0x38a0('0x2b')]['find']({'where':{'id':_0xd5be7b[_0x38a0('0x47')]['id']}})[_0x38a0('0x25')](handleEntityNotFound(_0x157e64,null))[_0x38a0('0x25')](removeEntity(_0x157e64,null))[_0x38a0('0x45')](handleError(_0x157e64,null));};exports[_0x38a0('0x4b')]=function(_0x3264a3,_0x5211a2){return db[_0x38a0('0x2b')][_0x38a0('0x4b')]()[_0x38a0('0x25')](respondWithResult(_0x5211a2,null))[_0x38a0('0x45')](handleError(_0x5211a2,null));};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.model.js b/server/api/faxQueueReport/faxQueueReport.model.js
index 16bcee8..747f441 100644
--- a/server/api/faxQueueReport/faxQueueReport.model.js
+++ b/server/api/faxQueueReport/faxQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x13e0=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','./faxQueueReport.attributes','define','FaxQueueReport','report_fax_queue','uniqueid'];(function(_0xbb2c0d,_0x4bd915){var _0xd21284=function(_0x75105b){while(--_0x75105b){_0xbb2c0d['push'](_0xbb2c0d['shift']());}};_0xd21284(++_0x4bd915);}(_0x13e0,0x1ba));var _0x013e=function(_0x48b520,_0x1c8858){_0x48b520=_0x48b520-0x0;var _0x231bf0=_0x13e0[_0x48b520];return _0x231bf0;};'use strict';var _=require(_0x013e('0x0'));var util=require(_0x013e('0x1'));var logger=require(_0x013e('0x2'))(_0x013e('0x3'));var moment=require(_0x013e('0x4'));var BPromise=require(_0x013e('0x5'));var rp=require(_0x013e('0x6'));var fs=require('fs');var path=require(_0x013e('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x013e('0x8'));module['exports']=function(_0x4de67b,_0x22efa2){return _0x4de67b[_0x013e('0x9')](_0x013e('0xa'),attributes,{'tableName':_0x013e('0xb'),'paranoid':![],'indexes':[{'name':_0x013e('0xc'),'fields':[_0x013e('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6054=['uniqueid','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./faxQueueReport.attributes'];(function(_0x312e70,_0x418674){var _0x3527e1=function(_0x21f30d){while(--_0x21f30d){_0x312e70['push'](_0x312e70['shift']());}};_0x3527e1(++_0x418674);}(_0x6054,0x14b));var _0x4605=function(_0x4c3ba1,_0x5d942d){_0x4c3ba1=_0x4c3ba1-0x0;var _0x326fa2=_0x6054[_0x4c3ba1];return _0x326fa2;};'use strict';var _=require(_0x4605('0x0'));var util=require(_0x4605('0x1'));var logger=require(_0x4605('0x2'))(_0x4605('0x3'));var moment=require(_0x4605('0x4'));var BPromise=require(_0x4605('0x5'));var rp=require(_0x4605('0x6'));var fs=require('fs');var path=require(_0x4605('0x7'));var rimraf=require(_0x4605('0x8'));var config=require('../../config/environment');var attributes=require(_0x4605('0x9'));module['exports']=function(_0x8585df,_0x5e36cd){return _0x8585df['define']('FaxQueueReport',attributes,{'tableName':'report_fax_queue','paranoid':![],'indexes':[{'name':_0x4605('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.rpc.js b/server/api/faxQueueReport/faxQueueReport.rpc.js
index 7798347..79f59dd 100644
--- a/server/api/faxQueueReport/faxQueueReport.rpc.js
+++ b/server/api/faxQueueReport/faxQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3ee7=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','FaxQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','result','FaxQueueReport','create','options','raw','CreateFaxQueueReport','debug','stringify','catch','UpdateFaxQueueReport','body','where','limit','util','randomstring','../../mysqldb'];(function(_0x47242d,_0x13f993){var _0x30273a=function(_0x322cd2){while(--_0x322cd2){_0x47242d['push'](_0x47242d['shift']());}};_0x30273a(++_0x13f993);}(_0x3ee7,0x98));var _0x73ee=function(_0x5af565,_0xe531a7){_0x5af565=_0x5af565-0x0;var _0x2a311f=_0x3ee7[_0x5af565];return _0x2a311f;};'use strict';var _=require('lodash');var util=require(_0x73ee('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x73ee('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x73ee('0x2'))['db'];var utils=require(_0x73ee('0x3'));var logger=require(_0x73ee('0x4'))(_0x73ee('0x5'));var config=require(_0x73ee('0x6'));var jayson=require(_0x73ee('0x7'));var client=jayson[_0x73ee('0x8')][_0x73ee('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4c78de,_0x36cb7c,_0x2a7359){return new BPromise(function(_0x48ec48,_0x32c472){return client['request'](_0x4c78de,_0x2a7359)[_0x73ee('0xa')](function(_0x4692e0){logger[_0x73ee('0xb')](_0x73ee('0xc'),_0x36cb7c,_0x73ee('0xd'));logger['debug'](_0x73ee('0xe'),_0x36cb7c,'request\x20sent',JSON['stringify'](_0x4692e0));if(_0x4692e0[_0x73ee('0xf')]){if(_0x4692e0['error'][_0x73ee('0x10')]===0x1f4){logger[_0x73ee('0xf')]('FaxQueueReport,\x20%s,\x20%s',_0x36cb7c,_0x4692e0['error'][_0x73ee('0x11')]);return _0x32c472(_0x4692e0[_0x73ee('0xf')]['message']);}logger[_0x73ee('0xf')]('FaxQueueReport,\x20%s,\x20%s',_0x36cb7c,_0x4692e0[_0x73ee('0xf')]['message']);return _0x48ec48(_0x4692e0[_0x73ee('0xf')][_0x73ee('0x11')]);}else{logger[_0x73ee('0xb')]('FaxQueueReport,\x20%s,\x20%s',_0x36cb7c,'request\x20sent');_0x48ec48(_0x4692e0[_0x73ee('0x12')][_0x73ee('0x11')]);}})['catch'](function(_0x4a9850){logger['error']('FaxQueueReport,\x20%s,\x20%s',_0x36cb7c,_0x4a9850);_0x32c472(_0x4a9850);});});}exports['CreateFaxQueueReport']=function(_0x17af51){var _0x280a37=this;return new Promise(function(_0x492593,_0x35ea7b){return db[_0x73ee('0x13')][_0x73ee('0x14')](_0x17af51['body'],{'raw':_0x17af51[_0x73ee('0x15')]?_0x17af51['options'][_0x73ee('0x16')]===undefined?!![]:![]:!![]})[_0x73ee('0xa')](function(_0x1b4a19){logger['info'](_0x73ee('0x17'),_0x17af51);logger[_0x73ee('0x18')](_0x73ee('0x17'),_0x17af51,JSON[_0x73ee('0x19')](_0x1b4a19));_0x492593(_0x1b4a19);})[_0x73ee('0x1a')](function(_0x4a924a){logger[_0x73ee('0xf')](_0x73ee('0x17'),_0x4a924a[_0x73ee('0x11')],_0x17af51);_0x35ea7b(_0x280a37['error'](0x1f4,_0x4a924a['message']));});});};exports[_0x73ee('0x1b')]=function(_0x183d62){var _0xfef750=this;return new Promise(function(_0x121984,_0xa91906){return db[_0x73ee('0x13')]['update'](_0x183d62[_0x73ee('0x1c')],{'raw':_0x183d62[_0x73ee('0x15')]?_0x183d62[_0x73ee('0x15')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x183d62['options']?_0x183d62[_0x73ee('0x15')][_0x73ee('0x1d')]||null:null,'attributes':_0x183d62['options']?_0x183d62[_0x73ee('0x15')]['attributes']||null:null,'limit':_0x183d62[_0x73ee('0x15')]?_0x183d62[_0x73ee('0x15')][_0x73ee('0x1e')]||null:null})[_0x73ee('0xa')](function(_0x47bf15){logger[_0x73ee('0xb')](_0x73ee('0x1b'),_0x183d62);logger[_0x73ee('0x18')](_0x73ee('0x1b'),_0x183d62,JSON[_0x73ee('0x19')](_0x47bf15));_0x121984(_0x47bf15);})[_0x73ee('0x1a')](function(_0x5cb803){logger[_0x73ee('0xf')](_0x73ee('0x1b'),_0x5cb803[_0x73ee('0x11')],_0x183d62);_0xa91906(_0xfef750['error'](0x1f4,_0x5cb803['message']));});});};
\ No newline at end of file
+var _0x9e6b=['request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateFaxQueueReport','create','body','options','then','UpdateFaxQueueReport','FaxQueueReport','update','raw','where','attributes','limit','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','FaxQueueReport,\x20%s,\x20%s'];(function(_0x8ed5e1,_0x423e3b){var _0xbc4db6=function(_0x928f93){while(--_0x928f93){_0x8ed5e1['push'](_0x8ed5e1['shift']());}};_0xbc4db6(++_0x423e3b);}(_0x9e6b,0x11c));var _0xb9e6=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x9e6b[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0xb9e6('0x0'));var util=require(_0xb9e6('0x1'));var moment=require('moment');var BPromise=require(_0xb9e6('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb9e6('0x3'))['db'];var utils=require(_0xb9e6('0x4'));var logger=require(_0xb9e6('0x5'))(_0xb9e6('0x6'));var config=require('../../config/environment');var jayson=require(_0xb9e6('0x7'));var client=jayson[_0xb9e6('0x8')][_0xb9e6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4bb674,_0x2cbcf7,_0x49565c){return new BPromise(function(_0x5a54db,_0x4cc018){return client[_0xb9e6('0xa')](_0x4bb674,_0x49565c)['then'](function(_0x378e17){logger[_0xb9e6('0xb')](_0xb9e6('0xc'),_0x2cbcf7,_0xb9e6('0xd'));logger[_0xb9e6('0xe')](_0xb9e6('0xf'),_0x2cbcf7,_0xb9e6('0xd'),JSON[_0xb9e6('0x10')](_0x378e17));if(_0x378e17[_0xb9e6('0x11')]){if(_0x378e17[_0xb9e6('0x11')]['code']===0x1f4){logger[_0xb9e6('0x11')](_0xb9e6('0xc'),_0x2cbcf7,_0x378e17[_0xb9e6('0x11')][_0xb9e6('0x12')]);return _0x4cc018(_0x378e17['error'][_0xb9e6('0x12')]);}logger[_0xb9e6('0x11')]('FaxQueueReport,\x20%s,\x20%s',_0x2cbcf7,_0x378e17['error'][_0xb9e6('0x12')]);return _0x5a54db(_0x378e17[_0xb9e6('0x11')][_0xb9e6('0x12')]);}else{logger[_0xb9e6('0xb')]('FaxQueueReport,\x20%s,\x20%s',_0x2cbcf7,_0xb9e6('0xd'));_0x5a54db(_0x378e17[_0xb9e6('0x13')][_0xb9e6('0x12')]);}})[_0xb9e6('0x14')](function(_0x15aa3d){logger[_0xb9e6('0x11')](_0xb9e6('0xc'),_0x2cbcf7,_0x15aa3d);_0x4cc018(_0x15aa3d);});});}exports[_0xb9e6('0x15')]=function(_0x8d7ea3){var _0x1931f2=this;return new Promise(function(_0x47bd4d,_0xffcdad){return db['FaxQueueReport'][_0xb9e6('0x16')](_0x8d7ea3[_0xb9e6('0x17')],{'raw':_0x8d7ea3[_0xb9e6('0x18')]?_0x8d7ea3[_0xb9e6('0x18')]['raw']===undefined?!![]:![]:!![]})[_0xb9e6('0x19')](function(_0x2de3ab){logger[_0xb9e6('0xb')](_0xb9e6('0x15'),_0x8d7ea3);logger['debug']('CreateFaxQueueReport',_0x8d7ea3,JSON['stringify'](_0x2de3ab));_0x47bd4d(_0x2de3ab);})[_0xb9e6('0x14')](function(_0x112675){logger['error'](_0xb9e6('0x15'),_0x112675['message'],_0x8d7ea3);_0xffcdad(_0x1931f2[_0xb9e6('0x11')](0x1f4,_0x112675[_0xb9e6('0x12')]));});});};exports[_0xb9e6('0x1a')]=function(_0x467aa4){var _0x17885d=this;return new Promise(function(_0x5cc468,_0x1b8ea3){return db[_0xb9e6('0x1b')][_0xb9e6('0x1c')](_0x467aa4[_0xb9e6('0x17')],{'raw':_0x467aa4[_0xb9e6('0x18')]?_0x467aa4['options'][_0xb9e6('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x467aa4[_0xb9e6('0x18')]?_0x467aa4[_0xb9e6('0x18')][_0xb9e6('0x1e')]||null:null,'attributes':_0x467aa4['options']?_0x467aa4[_0xb9e6('0x18')][_0xb9e6('0x1f')]||null:null,'limit':_0x467aa4[_0xb9e6('0x18')]?_0x467aa4[_0xb9e6('0x18')][_0xb9e6('0x20')]||null:null})[_0xb9e6('0x19')](function(_0x3ee163){logger[_0xb9e6('0xb')]('UpdateFaxQueueReport',_0x467aa4);logger[_0xb9e6('0xe')](_0xb9e6('0x1a'),_0x467aa4,JSON['stringify'](_0x3ee163));_0x5cc468(_0x3ee163);})[_0xb9e6('0x14')](function(_0xda86d5){logger['error'](_0xb9e6('0x1a'),_0xda86d5[_0xb9e6('0x12')],_0x467aa4);_0x1b8ea3(_0x17885d[_0xb9e6('0x11')](0x1f4,_0xda86d5[_0xb9e6('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/index.js b/server/api/faxQueueReport/index.js
index f0f05c0..b17b352 100644
--- a/server/api/faxQueueReport/index.js
+++ b/server/api/faxQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7052=['Router','../../components/auth/service','../../config/environment','./faxQueueReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','create','put','delete','destroy','exports','multer','connect-timeout','express'];(function(_0x3a6b78,_0x2d62be){var _0x4943d4=function(_0x33ab64){while(--_0x33ab64){_0x3a6b78['push'](_0x3a6b78['shift']());}};_0x4943d4(++_0x2d62be);}(_0x7052,0x1eb));var _0x2705=function(_0x21ecc8,_0x2bdead){_0x21ecc8=_0x21ecc8-0x0;var _0x510c1d=_0x7052[_0x21ecc8];return _0x510c1d;};'use strict';var multer=require(_0x2705('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x2705('0x1'));var express=require(_0x2705('0x2'));var router=express[_0x2705('0x3')]();var auth=require(_0x2705('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x2705('0x5'));var controller=require(_0x2705('0x6'));router[_0x2705('0x7')]('/',auth[_0x2705('0x8')](),controller[_0x2705('0x9')]);router[_0x2705('0x7')](_0x2705('0xa'),auth[_0x2705('0x8')](),controller[_0x2705('0xb')]);router[_0x2705('0x7')](_0x2705('0xc'),auth[_0x2705('0x8')](),controller['show']);router[_0x2705('0xd')]('/',auth['isAuthenticated'](),controller[_0x2705('0xe')]);router[_0x2705('0xf')](_0x2705('0xc'),auth[_0x2705('0x8')](),controller['update']);router[_0x2705('0x10')]('/:id',auth[_0x2705('0x8')](),controller[_0x2705('0x11')]);module[_0x2705('0x12')]=router;
\ No newline at end of file
+var _0x026f=['./faxQueueReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','update','delete','destroy','multer','util','path','express','../../components/auth/service','../../components/interaction/service'];(function(_0x5e8ad6,_0x13d864){var _0x19883f=function(_0x2881f8){while(--_0x2881f8){_0x5e8ad6['push'](_0x5e8ad6['shift']());}};_0x19883f(++_0x13d864);}(_0x026f,0x150));var _0xf026=function(_0x26fba3,_0x284c1a){_0x26fba3=_0x26fba3-0x0;var _0x5365cc=_0x026f[_0x26fba3];return _0x5365cc;};'use strict';var multer=require(_0xf026('0x0'));var util=require(_0xf026('0x1'));var path=require(_0xf026('0x2'));var timeout=require('connect-timeout');var express=require(_0xf026('0x3'));var router=express['Router']();var auth=require(_0xf026('0x4'));var interaction=require(_0xf026('0x5'));var config=require('../../config/environment');var controller=require(_0xf026('0x6'));router[_0xf026('0x7')]('/',auth[_0xf026('0x8')](),controller[_0xf026('0x9')]);router[_0xf026('0x7')](_0xf026('0xa'),auth[_0xf026('0x8')](),controller[_0xf026('0xb')]);router[_0xf026('0x7')](_0xf026('0xc'),auth['isAuthenticated'](),controller[_0xf026('0xd')]);router[_0xf026('0xe')]('/',auth[_0xf026('0x8')](),controller['create']);router['put'](_0xf026('0xc'),auth[_0xf026('0x8')](),controller[_0xf026('0xf')]);router[_0xf026('0x10')](_0xf026('0xc'),auth[_0xf026('0x8')](),controller[_0xf026('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.attributes.js b/server/api/faxTransferReport/faxTransferReport.attributes.js
index be1c7fa..ef629b9 100644
--- a/server/api/faxTransferReport/faxTransferReport.attributes.js
+++ b/server/api/faxTransferReport/faxTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6d74=['account','agent','queue','DATE','moment','sequelize','STRING'];(function(_0x3aba3f,_0x4b104d){var _0x5d19b8=function(_0x13f74a){while(--_0x13f74a){_0x3aba3f['push'](_0x3aba3f['shift']());}};_0x5d19b8(++_0x4b104d);}(_0x6d74,0x74));var _0x46d7=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0x6d74[_0xf50820];return _0x2a9b10;};'use strict';var moment=require(_0x46d7('0x0'));var Sequelize=require(_0x46d7('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x46d7('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x46d7('0x3'),_0x46d7('0x4'),_0x46d7('0x5')),'allowNull':![],'defaultValue':_0x46d7('0x5')},'transferredAt':{'type':Sequelize[_0x46d7('0x6')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
+var _0x6ca8=['agent','queue','DATE','moment','sequelize','exports','STRING','ENUM'];(function(_0xddfbdc,_0x561a0b){var _0x395d72=function(_0x2b7de6){while(--_0x2b7de6){_0xddfbdc['push'](_0xddfbdc['shift']());}};_0x395d72(++_0x561a0b);}(_0x6ca8,0x1eb));var _0x86ca=function(_0x4030c0,_0x21585a){_0x4030c0=_0x4030c0-0x0;var _0x265dce=_0x6ca8[_0x4030c0];return _0x265dce;};'use strict';var moment=require(_0x86ca('0x0'));var Sequelize=require(_0x86ca('0x1'));module[_0x86ca('0x2')]={'uniqueid':{'type':Sequelize[_0x86ca('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x86ca('0x4')]('account',_0x86ca('0x5'),_0x86ca('0x6')),'allowNull':![],'defaultValue':_0x86ca('0x6')},'transferredAt':{'type':Sequelize[_0x86ca('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.controller.js b/server/api/faxTransferReport/faxTransferReport.controller.js
index 3ce06f8..ef810f3 100644
--- a/server/api/faxTransferReport/faxTransferReport.controller.js
+++ b/server/api/faxTransferReport/faxTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x17cb=['ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','count','offset','limit','json','reject','save','update','destroy','then','stack','name','index','rawAttributes','keys','query','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','map','type','key','field','merge','options','includeAll','FaxTransferReport','rows','show','params','fields','include','find','catch','create','body','describe','html-pdf','rimraf','fast-json-patch','bluebird','mustache','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse'];(function(_0x97db75,_0x3abdb8){var _0x259a53=function(_0x4af802){while(--_0x4af802){_0x97db75['push'](_0x97db75['shift']());}};_0x259a53(++_0x3abdb8);}(_0x17cb,0x14f));var _0xb17c=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x17cb[_0x321bb2];return _0x9c12ed;};'use strict';var pdf=require(_0xb17c('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xb17c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb17c('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xb17c('0x3'));var Mustache=require(_0xb17c('0x4'));var util=require('util');var path=require(_0xb17c('0x5'));var sox=require(_0xb17c('0x6'));var csv=require(_0xb17c('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xb17c('0x8'));var squel=require(_0xb17c('0x9'));var crypto=require(_0xb17c('0xa'));var jsforce=require(_0xb17c('0xb'));var deskjs=require(_0xb17c('0xc'));var toCsv=require(_0xb17c('0x7'));var querystring=require(_0xb17c('0xd'));var Papa=require(_0xb17c('0xe'));var Redis=require(_0xb17c('0xf'));var authService=require(_0xb17c('0x10'));var qs=require(_0xb17c('0x11'));var hardwareService=require(_0xb17c('0x12'));var logger=require(_0xb17c('0x13'))(_0xb17c('0x14'));var utils=require(_0xb17c('0x15'));var config=require('../../config/environment');var db=require(_0xb17c('0x16'))['db'];function respondWithStatusCode(_0x2073d1,_0x4845b5){_0x4845b5=_0x4845b5||0xcc;return function(_0x37351b){if(_0x37351b){return _0x2073d1[_0xb17c('0x17')](_0x4845b5);}return _0x2073d1[_0xb17c('0x18')](_0x4845b5)[_0xb17c('0x19')]();};}function respondWithResult(_0x478537,_0x512336){_0x512336=_0x512336||0xc8;return function(_0x17a82d){if(_0x17a82d){return _0x478537[_0xb17c('0x18')](_0x512336)['json'](_0x17a82d);}};}function respondWithFilteredResult(_0x532ed9,_0x3cd414){return function(_0x2d90be){if(_0x2d90be){var _0x534afe=_0x2d90be[_0xb17c('0x1a')],_0xe4cc4d=_0x3cd414[_0xb17c('0x1b')],_0x5067cc=_0x3cd414[_0xb17c('0x1b')]+_0x3cd414[_0xb17c('0x1c')],_0x5a1f57;if(_0x5067cc>=_0x534afe){_0x5067cc=_0x534afe;_0x5a1f57=0xc8;}else{_0x5a1f57=0xce;}_0x532ed9[_0xb17c('0x18')](_0x5a1f57);return _0x532ed9['set']('Content-Range',_0xe4cc4d+'-'+_0x5067cc+'/'+_0x534afe)[_0xb17c('0x1d')](_0x2d90be);}return null;};}function patchUpdates(_0x2a739f){return function(_0x23ddda){try{jsonpatch['apply'](_0x23ddda,_0x2a739f,!![]);}catch(_0x20ed38){return BPromise[_0xb17c('0x1e')](_0x20ed38);}return _0x23ddda[_0xb17c('0x1f')]();};}function saveUpdates(_0x13eeb0,_0x555875){return function(_0x565706){if(_0x565706){return _0x565706[_0xb17c('0x20')](_0x13eeb0)['then'](function(_0x3c0eaa){return _0x3c0eaa;});}return null;};}function removeEntity(_0x5afe31,_0x3f07b6){return function(_0x418605){if(_0x418605){return _0x418605[_0xb17c('0x21')]()[_0xb17c('0x22')](function(){_0x5afe31[_0xb17c('0x18')](0xcc)[_0xb17c('0x19')]();});}};}function handleEntityNotFound(_0x5982e1,_0x53e84c){return function(_0x5a013f){if(!_0x5a013f){_0x5982e1['sendStatus'](0x194);}return _0x5a013f;};}function handleError(_0x18d5e7,_0x4abc97){_0x4abc97=_0x4abc97||0x1f4;return function(_0x431396){logger['error'](_0x431396[_0xb17c('0x23')]);if(_0x431396[_0xb17c('0x24')]){delete _0x431396[_0xb17c('0x24')];}_0x18d5e7[_0xb17c('0x18')](_0x4abc97)['send'](_0x431396);};}exports[_0xb17c('0x25')]=function(_0x14f568,_0x1350c8){var _0x41c097={},_0x3ac583={},_0x436376={'count':0x0,'rows':[]};var _0x381002=db['FaxTransferReport'][_0xb17c('0x26')];_0x3ac583['model']=_[_0xb17c('0x27')](_0x381002);_0x3ac583[_0xb17c('0x28')]=_[_0xb17c('0x27')](_0x14f568[_0xb17c('0x28')]);_0x3ac583[_0xb17c('0x29')]=_[_0xb17c('0x2a')](_0x3ac583[_0xb17c('0x2b')],_0x3ac583[_0xb17c('0x28')]);_0x41c097['attributes']=_[_0xb17c('0x2a')](_0x3ac583[_0xb17c('0x2b')],qs['fields'](_0x14f568[_0xb17c('0x28')]['fields']));_0x41c097[_0xb17c('0x2c')]=_0x41c097[_0xb17c('0x2c')][_0xb17c('0x2d')]?_0x41c097['attributes']:_0x3ac583['model'];if(!_0x14f568[_0xb17c('0x28')][_0xb17c('0x2e')](_0xb17c('0x2f'))){_0x41c097['limit']=qs[_0xb17c('0x1c')](_0x14f568['query'][_0xb17c('0x1c')]);_0x41c097[_0xb17c('0x1b')]=qs[_0xb17c('0x1b')](_0x14f568[_0xb17c('0x28')][_0xb17c('0x1b')]);}_0x41c097['order']=qs[_0xb17c('0x30')](_0x14f568[_0xb17c('0x28')]['sort']);_0x41c097[_0xb17c('0x31')]=qs['filters'](_[_0xb17c('0x32')](_0x14f568[_0xb17c('0x28')],_0x3ac583['filters']));if(_0x14f568[_0xb17c('0x28')][_0xb17c('0x33')]){_0x41c097['where']=_['merge'](_0x41c097[_0xb17c('0x31')],{'$or':_[_0xb17c('0x34')](_0x381002,function(_0x5c47c8){if(_0x5c47c8[_0xb17c('0x35')][_0xb17c('0x36')]!=='VIRTUAL'){var _0x2852d3={};_0x2852d3[_0x5c47c8[_0xb17c('0x37')]]={'$like':'%'+_0x14f568[_0xb17c('0x28')][_0xb17c('0x33')]+'%'};return _0x2852d3;}})});}_0x41c097=_[_0xb17c('0x38')]({},_0x41c097,_0x14f568[_0xb17c('0x39')]);var _0x3e7653={'where':_0x41c097[_0xb17c('0x31')]};return db['FaxTransferReport'][_0xb17c('0x1a')](_0x3e7653)[_0xb17c('0x22')](function(_0x50e5f7){_0x436376[_0xb17c('0x1a')]=_0x50e5f7;if(_0x14f568['query'][_0xb17c('0x3a')]){_0x41c097['include']=[{'all':!![]}];}return db[_0xb17c('0x3b')]['findAll'](_0x41c097);})[_0xb17c('0x22')](function(_0x104d76){_0x436376[_0xb17c('0x3c')]=_0x104d76;return _0x436376;})[_0xb17c('0x22')](respondWithFilteredResult(_0x1350c8,_0x41c097))['catch'](handleError(_0x1350c8,null));};exports[_0xb17c('0x3d')]=function(_0x17a3a3,_0x4d57b9){var _0x2870b2={'raw':!![],'where':{'id':_0x17a3a3[_0xb17c('0x3e')]['id']}},_0x14f948={};_0x14f948[_0xb17c('0x2b')]=_['keys'](db[_0xb17c('0x3b')][_0xb17c('0x26')]);_0x14f948[_0xb17c('0x28')]=_[_0xb17c('0x27')](_0x17a3a3['query']);_0x14f948[_0xb17c('0x29')]=_['intersection'](_0x14f948[_0xb17c('0x2b')],_0x14f948[_0xb17c('0x28')]);_0x2870b2[_0xb17c('0x2c')]=_[_0xb17c('0x2a')](_0x14f948[_0xb17c('0x2b')],qs[_0xb17c('0x3f')](_0x17a3a3[_0xb17c('0x28')][_0xb17c('0x3f')]));_0x2870b2[_0xb17c('0x2c')]=_0x2870b2['attributes'][_0xb17c('0x2d')]?_0x2870b2[_0xb17c('0x2c')]:_0x14f948[_0xb17c('0x2b')];if(_0x17a3a3[_0xb17c('0x28')][_0xb17c('0x3a')]){_0x2870b2[_0xb17c('0x40')]=[{'all':!![]}];}_0x2870b2=_[_0xb17c('0x38')]({},_0x2870b2,_0x17a3a3['options']);return db['FaxTransferReport'][_0xb17c('0x41')](_0x2870b2)[_0xb17c('0x22')](handleEntityNotFound(_0x4d57b9,null))[_0xb17c('0x22')](respondWithResult(_0x4d57b9,null))[_0xb17c('0x42')](handleError(_0x4d57b9,null));};exports[_0xb17c('0x43')]=function(_0x3b99cf,_0x473a61){return db[_0xb17c('0x3b')][_0xb17c('0x43')](_0x3b99cf[_0xb17c('0x44')],{})[_0xb17c('0x22')](respondWithResult(_0x473a61,0xc9))[_0xb17c('0x42')](handleError(_0x473a61,null));};exports[_0xb17c('0x20')]=function(_0x58201b,_0x4bd24b){if(_0x58201b[_0xb17c('0x44')]['id']){delete _0x58201b[_0xb17c('0x44')]['id'];}return db[_0xb17c('0x3b')]['find']({'where':{'id':_0x58201b[_0xb17c('0x3e')]['id']}})['then'](handleEntityNotFound(_0x4bd24b,null))[_0xb17c('0x22')](saveUpdates(_0x58201b[_0xb17c('0x44')],null))[_0xb17c('0x22')](respondWithResult(_0x4bd24b,null))[_0xb17c('0x42')](handleError(_0x4bd24b,null));};exports[_0xb17c('0x21')]=function(_0x4bbad9,_0x26e4ad){return db[_0xb17c('0x3b')]['find']({'where':{'id':_0x4bbad9[_0xb17c('0x3e')]['id']}})[_0xb17c('0x22')](handleEntityNotFound(_0x26e4ad,null))[_0xb17c('0x22')](removeEntity(_0x26e4ad,null))['catch'](handleError(_0x26e4ad,null));};exports[_0xb17c('0x45')]=function(_0x5e7c04,_0x1b88b0){return db[_0xb17c('0x3b')][_0xb17c('0x45')]()['then'](respondWithResult(_0x1b88b0,null))[_0xb17c('0x42')](handleError(_0x1b88b0,null));};
\ No newline at end of file
+var _0xd213=['key','VIRTUAL','field','filter','options','then','includeAll','include','catch','show','params','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','save','update','destroy','stack','name','send','index','FaxTransferReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','merge'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xd213,0x9b));var _0x3d21=function(_0x3ef951,_0xae273a){_0x3ef951=_0x3ef951-0x0;var _0x2e8659=_0xd213[_0x3ef951];return _0x2e8659;};'use strict';var pdf=require(_0x3d21('0x0'));var emlformat=require(_0x3d21('0x1'));var rimraf=require(_0x3d21('0x2'));var zipdir=require(_0x3d21('0x3'));var jsonpatch=require(_0x3d21('0x4'));var rp=require(_0x3d21('0x5'));var moment=require(_0x3d21('0x6'));var BPromise=require(_0x3d21('0x7'));var Mustache=require(_0x3d21('0x8'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x3d21('0x9'));var ejs=require(_0x3d21('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x3d21('0xb'));var crypto=require(_0x3d21('0xc'));var jsforce=require(_0x3d21('0xd'));var deskjs=require(_0x3d21('0xe'));var toCsv=require('to-csv');var querystring=require(_0x3d21('0xf'));var Papa=require('papaparse');var Redis=require(_0x3d21('0x10'));var authService=require(_0x3d21('0x11'));var qs=require(_0x3d21('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3d21('0x13'))(_0x3d21('0x14'));var utils=require(_0x3d21('0x15'));var config=require('../../config/environment');var db=require(_0x3d21('0x16'))['db'];function respondWithStatusCode(_0x495d75,_0x82ea6c){_0x82ea6c=_0x82ea6c||0xcc;return function(_0x744094){if(_0x744094){return _0x495d75[_0x3d21('0x17')](_0x82ea6c);}return _0x495d75[_0x3d21('0x18')](_0x82ea6c)[_0x3d21('0x19')]();};}function respondWithResult(_0x514b6b,_0x78ec8e){_0x78ec8e=_0x78ec8e||0xc8;return function(_0x13369){if(_0x13369){return _0x514b6b['status'](_0x78ec8e)[_0x3d21('0x1a')](_0x13369);}};}function respondWithFilteredResult(_0x1550d9,_0x4f65dd){return function(_0x169fea){if(_0x169fea){var _0x102ba5=_0x169fea[_0x3d21('0x1b')],_0x516c89=_0x4f65dd['offset'],_0x749fd0=_0x4f65dd[_0x3d21('0x1c')]+_0x4f65dd[_0x3d21('0x1d')],_0x295e2c;if(_0x749fd0>=_0x102ba5){_0x749fd0=_0x102ba5;_0x295e2c=0xc8;}else{_0x295e2c=0xce;}_0x1550d9[_0x3d21('0x18')](_0x295e2c);return _0x1550d9[_0x3d21('0x1e')](_0x3d21('0x1f'),_0x516c89+'-'+_0x749fd0+'/'+_0x102ba5)['json'](_0x169fea);}return null;};}function patchUpdates(_0x5c2694){return function(_0x210fae){try{jsonpatch[_0x3d21('0x20')](_0x210fae,_0x5c2694,!![]);}catch(_0x4cf706){return BPromise['reject'](_0x4cf706);}return _0x210fae[_0x3d21('0x21')]();};}function saveUpdates(_0x4f7362,_0x401086){return function(_0xe099f9){if(_0xe099f9){return _0xe099f9[_0x3d21('0x22')](_0x4f7362)['then'](function(_0x3158d0){return _0x3158d0;});}return null;};}function removeEntity(_0x2036a4,_0x1cc7eb){return function(_0x2b4570){if(_0x2b4570){return _0x2b4570[_0x3d21('0x23')]()['then'](function(){_0x2036a4[_0x3d21('0x18')](0xcc)[_0x3d21('0x19')]();});}};}function handleEntityNotFound(_0x2a0e21,_0x41107f){return function(_0x55915f){if(!_0x55915f){_0x2a0e21[_0x3d21('0x17')](0x194);}return _0x55915f;};}function handleError(_0xd6e16d,_0x10b5e9){_0x10b5e9=_0x10b5e9||0x1f4;return function(_0x3ef1c8){logger['error'](_0x3ef1c8[_0x3d21('0x24')]);if(_0x3ef1c8[_0x3d21('0x25')]){delete _0x3ef1c8[_0x3d21('0x25')];}_0xd6e16d[_0x3d21('0x18')](_0x10b5e9)[_0x3d21('0x26')](_0x3ef1c8);};}exports[_0x3d21('0x27')]=function(_0x1f85ce,_0x479400){var _0x47fe88={},_0x7d2ef6={},_0x42c797={'count':0x0,'rows':[]};var _0x4030da=db[_0x3d21('0x28')][_0x3d21('0x29')];_0x7d2ef6[_0x3d21('0x2a')]=_[_0x3d21('0x2b')](_0x4030da);_0x7d2ef6['query']=_[_0x3d21('0x2b')](_0x1f85ce[_0x3d21('0x2c')]);_0x7d2ef6[_0x3d21('0x2d')]=_[_0x3d21('0x2e')](_0x7d2ef6[_0x3d21('0x2a')],_0x7d2ef6['query']);_0x47fe88[_0x3d21('0x2f')]=_[_0x3d21('0x2e')](_0x7d2ef6[_0x3d21('0x2a')],qs[_0x3d21('0x30')](_0x1f85ce[_0x3d21('0x2c')][_0x3d21('0x30')]));_0x47fe88[_0x3d21('0x2f')]=_0x47fe88[_0x3d21('0x2f')][_0x3d21('0x31')]?_0x47fe88['attributes']:_0x7d2ef6[_0x3d21('0x2a')];if(!_0x1f85ce[_0x3d21('0x2c')][_0x3d21('0x32')]('nolimit')){_0x47fe88[_0x3d21('0x1d')]=qs['limit'](_0x1f85ce[_0x3d21('0x2c')]['limit']);_0x47fe88[_0x3d21('0x1c')]=qs[_0x3d21('0x1c')](_0x1f85ce['query'][_0x3d21('0x1c')]);}_0x47fe88[_0x3d21('0x33')]=qs[_0x3d21('0x34')](_0x1f85ce[_0x3d21('0x2c')][_0x3d21('0x34')]);_0x47fe88[_0x3d21('0x35')]=qs[_0x3d21('0x2d')](_['pick'](_0x1f85ce[_0x3d21('0x2c')],_0x7d2ef6[_0x3d21('0x2d')]));if(_0x1f85ce[_0x3d21('0x2c')]['filter']){_0x47fe88['where']=_[_0x3d21('0x36')](_0x47fe88[_0x3d21('0x35')],{'$or':_['map'](_0x4030da,function(_0x106aa0){if(_0x106aa0['type'][_0x3d21('0x37')]!==_0x3d21('0x38')){var _0x56be64={};_0x56be64[_0x106aa0[_0x3d21('0x39')]]={'$like':'%'+_0x1f85ce[_0x3d21('0x2c')][_0x3d21('0x3a')]+'%'};return _0x56be64;}})});}_0x47fe88=_[_0x3d21('0x36')]({},_0x47fe88,_0x1f85ce[_0x3d21('0x3b')]);var _0x2152c3={'where':_0x47fe88[_0x3d21('0x35')]};return db[_0x3d21('0x28')][_0x3d21('0x1b')](_0x2152c3)[_0x3d21('0x3c')](function(_0x295a64){_0x42c797[_0x3d21('0x1b')]=_0x295a64;if(_0x1f85ce[_0x3d21('0x2c')][_0x3d21('0x3d')]){_0x47fe88[_0x3d21('0x3e')]=[{'all':!![]}];}return db[_0x3d21('0x28')]['findAll'](_0x47fe88);})[_0x3d21('0x3c')](function(_0x47de16){_0x42c797['rows']=_0x47de16;return _0x42c797;})['then'](respondWithFilteredResult(_0x479400,_0x47fe88))[_0x3d21('0x3f')](handleError(_0x479400,null));};exports[_0x3d21('0x40')]=function(_0x3ced16,_0x3c37ef){var _0x26ccf5={'raw':!![],'where':{'id':_0x3ced16[_0x3d21('0x41')]['id']}},_0xcc27cc={};_0xcc27cc[_0x3d21('0x2a')]=_[_0x3d21('0x2b')](db[_0x3d21('0x28')]['rawAttributes']);_0xcc27cc[_0x3d21('0x2c')]=_['keys'](_0x3ced16['query']);_0xcc27cc[_0x3d21('0x2d')]=_['intersection'](_0xcc27cc[_0x3d21('0x2a')],_0xcc27cc['query']);_0x26ccf5[_0x3d21('0x2f')]=_['intersection'](_0xcc27cc[_0x3d21('0x2a')],qs[_0x3d21('0x30')](_0x3ced16[_0x3d21('0x2c')][_0x3d21('0x30')]));_0x26ccf5[_0x3d21('0x2f')]=_0x26ccf5['attributes'][_0x3d21('0x31')]?_0x26ccf5['attributes']:_0xcc27cc[_0x3d21('0x2a')];if(_0x3ced16[_0x3d21('0x2c')][_0x3d21('0x3d')]){_0x26ccf5[_0x3d21('0x3e')]=[{'all':!![]}];}_0x26ccf5=_[_0x3d21('0x36')]({},_0x26ccf5,_0x3ced16[_0x3d21('0x3b')]);return db[_0x3d21('0x28')][_0x3d21('0x42')](_0x26ccf5)['then'](handleEntityNotFound(_0x3c37ef,null))['then'](respondWithResult(_0x3c37ef,null))[_0x3d21('0x3f')](handleError(_0x3c37ef,null));};exports[_0x3d21('0x43')]=function(_0x40144b,_0x4528e0){return db[_0x3d21('0x28')][_0x3d21('0x43')](_0x40144b[_0x3d21('0x44')],{})[_0x3d21('0x3c')](respondWithResult(_0x4528e0,0xc9))[_0x3d21('0x3f')](handleError(_0x4528e0,null));};exports[_0x3d21('0x22')]=function(_0x4746f1,_0x22aeea){if(_0x4746f1[_0x3d21('0x44')]['id']){delete _0x4746f1[_0x3d21('0x44')]['id'];}return db[_0x3d21('0x28')][_0x3d21('0x42')]({'where':{'id':_0x4746f1[_0x3d21('0x41')]['id']}})[_0x3d21('0x3c')](handleEntityNotFound(_0x22aeea,null))[_0x3d21('0x3c')](saveUpdates(_0x4746f1[_0x3d21('0x44')],null))[_0x3d21('0x3c')](respondWithResult(_0x22aeea,null))[_0x3d21('0x3f')](handleError(_0x22aeea,null));};exports[_0x3d21('0x23')]=function(_0xcec3b,_0x396232){return db[_0x3d21('0x28')][_0x3d21('0x42')]({'where':{'id':_0xcec3b[_0x3d21('0x41')]['id']}})[_0x3d21('0x3c')](handleEntityNotFound(_0x396232,null))[_0x3d21('0x3c')](removeEntity(_0x396232,null))[_0x3d21('0x3f')](handleError(_0x396232,null));};exports[_0x3d21('0x45')]=function(_0x593ee8,_0x17f71d){return db['FaxTransferReport']['describe']()['then'](respondWithResult(_0x17f71d,null))[_0x3d21('0x3f')](handleError(_0x17f71d,null));};
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.model.js b/server/api/faxTransferReport/faxTransferReport.model.js
index d5f9a4c..5b44134 100644
--- a/server/api/faxTransferReport/faxTransferReport.model.js
+++ b/server/api/faxTransferReport/faxTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0990=['FaxTransferReport','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxTransferReport.attributes','exports','define'];(function(_0x1e7b16,_0x4607a1){var _0x37fadc=function(_0x1fc9ce){while(--_0x1fc9ce){_0x1e7b16['push'](_0x1e7b16['shift']());}};_0x37fadc(++_0x4607a1);}(_0x0990,0x11f));var _0x0099=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0x0990[_0x5783f4];return _0x28e380;};'use strict';var _=require(_0x0099('0x0'));var util=require(_0x0099('0x1'));var logger=require(_0x0099('0x2'))(_0x0099('0x3'));var moment=require(_0x0099('0x4'));var BPromise=require(_0x0099('0x5'));var rp=require(_0x0099('0x6'));var fs=require('fs');var path=require(_0x0099('0x7'));var rimraf=require(_0x0099('0x8'));var config=require(_0x0099('0x9'));var attributes=require(_0x0099('0xa'));module[_0x0099('0xb')]=function(_0x70c3c8,_0x48609d){return _0x70c3c8[_0x0099('0xc')](_0x0099('0xd'),attributes,{'tableName':'report_fax_transfer','paranoid':![],'indexes':[{'name':_0x0099('0xe'),'fields':[_0x0099('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8fbc=['define','report_fax_transfer','uniqueid','lodash','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0xf40652,_0xf47f4a){var _0xe23894=function(_0x5284d3){while(--_0x5284d3){_0xf40652['push'](_0xf40652['shift']());}};_0xe23894(++_0xf47f4a);}(_0x8fbc,0xa8));var _0xc8fb=function(_0x423b69,_0x242087){_0x423b69=_0x423b69-0x0;var _0x31039f=_0x8fbc[_0x423b69];return _0x31039f;};'use strict';var _=require(_0xc8fb('0x0'));var util=require(_0xc8fb('0x1'));var logger=require('../../config/logger')(_0xc8fb('0x2'));var moment=require(_0xc8fb('0x3'));var BPromise=require(_0xc8fb('0x4'));var rp=require(_0xc8fb('0x5'));var fs=require('fs');var path=require(_0xc8fb('0x6'));var rimraf=require(_0xc8fb('0x7'));var config=require('../../config/environment');var attributes=require('./faxTransferReport.attributes');module['exports']=function(_0x104117,_0x1c5da3){return _0x104117[_0xc8fb('0x8')]('FaxTransferReport',attributes,{'tableName':_0xc8fb('0x9'),'paranoid':![],'indexes':[{'name':_0xc8fb('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.rpc.js b/server/api/faxTransferReport/faxTransferReport.rpc.js
index 4a16b88..5438010 100644
--- a/server/api/faxTransferReport/faxTransferReport.rpc.js
+++ b/server/api/faxTransferReport/faxTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x505d=['stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x505d,0x1c8));var _0xd505=function(_0x47a7d0,_0x4e182d){_0x47a7d0=_0x47a7d0-0x0;var _0xb9bd08=_0x505d[_0x47a7d0];return _0xb9bd08;};'use strict';var _=require(_0xd505('0x0'));var util=require(_0xd505('0x1'));var moment=require(_0xd505('0x2'));var BPromise=require(_0xd505('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd505('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xd505('0x5'));var logger=require(_0xd505('0x6'))(_0xd505('0x7'));var config=require(_0xd505('0x8'));var jayson=require(_0xd505('0x9'));var client=jayson[_0xd505('0xa')][_0xd505('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x193cb3,_0x482fdf,_0x42228d){return new BPromise(function(_0x3b0f0d,_0x3bf16c){return client[_0xd505('0xc')](_0x193cb3,_0x42228d)[_0xd505('0xd')](function(_0x3872fe){logger[_0xd505('0xe')](_0xd505('0xf'),_0x482fdf,_0xd505('0x10'));logger[_0xd505('0x11')](_0xd505('0x12'),_0x482fdf,_0xd505('0x10'),JSON[_0xd505('0x13')](_0x3872fe));if(_0x3872fe[_0xd505('0x14')]){if(_0x3872fe['error'][_0xd505('0x15')]===0x1f4){logger[_0xd505('0x14')](_0xd505('0xf'),_0x482fdf,_0x3872fe[_0xd505('0x14')][_0xd505('0x16')]);return _0x3bf16c(_0x3872fe[_0xd505('0x14')][_0xd505('0x16')]);}logger['error'](_0xd505('0xf'),_0x482fdf,_0x3872fe[_0xd505('0x14')][_0xd505('0x16')]);return _0x3b0f0d(_0x3872fe['error'][_0xd505('0x16')]);}else{logger[_0xd505('0xe')](_0xd505('0xf'),_0x482fdf,_0xd505('0x10'));_0x3b0f0d(_0x3872fe[_0xd505('0x17')][_0xd505('0x16')]);}})[_0xd505('0x18')](function(_0x441922){logger[_0xd505('0x14')](_0xd505('0xf'),_0x482fdf,_0x441922);_0x3bf16c(_0x441922);});});}
\ No newline at end of file
+var _0x9c58=['FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','FaxTransferReport,\x20%s,\x20%s','result','catch','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x46f43a,_0x39111e){var _0xd03ee8=function(_0x2937c5){while(--_0x2937c5){_0x46f43a['push'](_0x46f43a['shift']());}};_0xd03ee8(++_0x39111e);}(_0x9c58,0x126));var _0x89c5=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x9c58[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x89c5('0x0'));var util=require(_0x89c5('0x1'));var moment=require('moment');var BPromise=require(_0x89c5('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x89c5('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x89c5('0x4'));var logger=require(_0x89c5('0x5'))('rpc');var config=require(_0x89c5('0x6'));var jayson=require(_0x89c5('0x7'));var client=jayson[_0x89c5('0x8')][_0x89c5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x57457c,_0x25c50a,_0x1ad025){return new BPromise(function(_0x2fbef2,_0x5e3618){return client[_0x89c5('0xa')](_0x57457c,_0x1ad025)[_0x89c5('0xb')](function(_0x5d8586){logger[_0x89c5('0xc')]('FaxTransferReport,\x20%s,\x20%s',_0x25c50a,_0x89c5('0xd'));logger['debug'](_0x89c5('0xe'),_0x25c50a,_0x89c5('0xd'),JSON[_0x89c5('0xf')](_0x5d8586));if(_0x5d8586[_0x89c5('0x10')]){if(_0x5d8586[_0x89c5('0x10')][_0x89c5('0x11')]===0x1f4){logger[_0x89c5('0x10')]('FaxTransferReport,\x20%s,\x20%s',_0x25c50a,_0x5d8586[_0x89c5('0x10')][_0x89c5('0x12')]);return _0x5e3618(_0x5d8586[_0x89c5('0x10')][_0x89c5('0x12')]);}logger[_0x89c5('0x10')](_0x89c5('0x13'),_0x25c50a,_0x5d8586['error'][_0x89c5('0x12')]);return _0x2fbef2(_0x5d8586[_0x89c5('0x10')][_0x89c5('0x12')]);}else{logger[_0x89c5('0xc')](_0x89c5('0x13'),_0x25c50a,'request\x20sent');_0x2fbef2(_0x5d8586[_0x89c5('0x14')]['message']);}})[_0x89c5('0x15')](function(_0x1cf9c7){logger['error']('FaxTransferReport,\x20%s,\x20%s',_0x25c50a,_0x1cf9c7);_0x5e3618(_0x1cf9c7);});});}
\ No newline at end of file
diff --git a/server/api/faxTransferReport/index.js b/server/api/faxTransferReport/index.js
index 36bbaad..f1ce444 100644
--- a/server/api/faxTransferReport/index.js
+++ b/server/api/faxTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4bc3=['/:id','show','post','update','destroy','exports','multer','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxTransferReport.controller','get','isAuthenticated','index','/describe'];(function(_0x2d9b7c,_0x29d4a7){var _0x9bac37=function(_0x35d075){while(--_0x35d075){_0x2d9b7c['push'](_0x2d9b7c['shift']());}};_0x9bac37(++_0x29d4a7);}(_0x4bc3,0x16e));var _0x34bc=function(_0x29d94e,_0xf386d6){_0x29d94e=_0x29d94e-0x0;var _0x106237=_0x4bc3[_0x29d94e];return _0x106237;};'use strict';var multer=require(_0x34bc('0x0'));var util=require(_0x34bc('0x1'));var path=require('path');var timeout=require(_0x34bc('0x2'));var express=require(_0x34bc('0x3'));var router=express['Router']();var auth=require(_0x34bc('0x4'));var interaction=require(_0x34bc('0x5'));var config=require(_0x34bc('0x6'));var controller=require(_0x34bc('0x7'));router[_0x34bc('0x8')]('/',auth[_0x34bc('0x9')](),controller[_0x34bc('0xa')]);router['get'](_0x34bc('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0x34bc('0x8')](_0x34bc('0xc'),auth[_0x34bc('0x9')](),controller[_0x34bc('0xd')]);router[_0x34bc('0xe')]('/',auth[_0x34bc('0x9')](),controller['create']);router['put'](_0x34bc('0xc'),auth[_0x34bc('0x9')](),controller[_0x34bc('0xf')]);router['delete'](_0x34bc('0xc'),auth['isAuthenticated'](),controller[_0x34bc('0x10')]);module[_0x34bc('0x11')]=router;
\ No newline at end of file
+var _0x8d0e=['describe','/:id','show','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/describe','isAuthenticated'];(function(_0xde4c5,_0x3d959a){var _0x54e570=function(_0x4a3ceb){while(--_0x4a3ceb){_0xde4c5['push'](_0xde4c5['shift']());}};_0x54e570(++_0x3d959a);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x31e55a,_0x3a8b24){_0x31e55a=_0x31e55a-0x0;var _0x3b3dcd=_0x8d0e[_0x31e55a];return _0x3b3dcd;};'use strict';var multer=require(_0xe8d0('0x0'));var util=require(_0xe8d0('0x1'));var path=require(_0xe8d0('0x2'));var timeout=require(_0xe8d0('0x3'));var express=require(_0xe8d0('0x4'));var router=express[_0xe8d0('0x5')]();var auth=require(_0xe8d0('0x6'));var interaction=require(_0xe8d0('0x7'));var config=require(_0xe8d0('0x8'));var controller=require('./faxTransferReport.controller');router[_0xe8d0('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xe8d0('0x9')](_0xe8d0('0xa'),auth[_0xe8d0('0xb')](),controller[_0xe8d0('0xc')]);router[_0xe8d0('0x9')](_0xe8d0('0xd'),auth[_0xe8d0('0xb')](),controller[_0xe8d0('0xe')]);router['post']('/',auth[_0xe8d0('0xb')](),controller[_0xe8d0('0xf')]);router[_0xe8d0('0x10')]('/:id',auth['isAuthenticated'](),controller[_0xe8d0('0x11')]);router[_0xe8d0('0x12')](_0xe8d0('0xd'),auth[_0xe8d0('0xb')](),controller[_0xe8d0('0x13')]);module[_0xe8d0('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/intDeskAccount/index.js b/server/api/intDeskAccount/index.js
index 68bca06..a41dfe0 100644
--- a/server/api/intDeskAccount/index.js
+++ b/server/api/intDeskAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ee8=['getConfigurations','post','put','update','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','/:id/configurations'];(function(_0x1537c0,_0x22c923){var _0x12e6b1=function(_0x1ab8bd){while(--_0x1ab8bd){_0x1537c0['push'](_0x1537c0['shift']());}};_0x12e6b1(++_0x22c923);}(_0x9ee8,0x137));var _0x89ee=function(_0x2a7218,_0xacf556){_0x2a7218=_0x2a7218-0x0;var _0x42104f=_0x9ee8[_0x2a7218];return _0x42104f;};'use strict';var multer=require(_0x89ee('0x0'));var util=require(_0x89ee('0x1'));var path=require(_0x89ee('0x2'));var timeout=require(_0x89ee('0x3'));var express=require('express');var router=express[_0x89ee('0x4')]();var auth=require(_0x89ee('0x5'));var interaction=require(_0x89ee('0x6'));var config=require('../../config/environment');var controller=require('./intDeskAccount.controller');router[_0x89ee('0x7')]('/',auth[_0x89ee('0x8')](),controller[_0x89ee('0x9')]);router[_0x89ee('0x7')](_0x89ee('0xa'),auth['isAuthenticated'](),controller[_0x89ee('0xb')]);router[_0x89ee('0x7')](_0x89ee('0xc'),auth[_0x89ee('0x8')](),controller[_0x89ee('0xd')]);router[_0x89ee('0x7')]('/:id/fields',auth[_0x89ee('0x8')](),controller['getFields']);router[_0x89ee('0xe')]('/',auth[_0x89ee('0x8')](),controller['create']);router[_0x89ee('0xe')](_0x89ee('0xc'),auth['isAuthenticated'](),controller['addConfiguration']);router[_0x89ee('0xf')](_0x89ee('0xa'),auth['isAuthenticated'](),controller[_0x89ee('0x10')]);router['delete'](_0x89ee('0xa'),auth[_0x89ee('0x8')](),controller['destroy']);module[_0x89ee('0x11')]=router;
\ No newline at end of file
+var _0xa101=['create','addConfiguration','put','delete','destroy','multer','util','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','./intDeskAccount.controller','isAuthenticated','index','/:id','show','get','/:id/configurations','getConfigurations','/:id/fields','getFields','post'];(function(_0x4c742f,_0x2bd40a){var _0x2913ae=function(_0x4e2759){while(--_0x4e2759){_0x4c742f['push'](_0x4c742f['shift']());}};_0x2913ae(++_0x2bd40a);}(_0xa101,0xeb));var _0x1a10=function(_0x460666,_0x24bfa0){_0x460666=_0x460666-0x0;var _0x555cbf=_0xa101[_0x460666];return _0x555cbf;};'use strict';var multer=require(_0x1a10('0x0'));var util=require(_0x1a10('0x1'));var path=require(_0x1a10('0x2'));var timeout=require(_0x1a10('0x3'));var express=require('express');var router=express[_0x1a10('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x1a10('0x5'));var config=require(_0x1a10('0x6'));var controller=require(_0x1a10('0x7'));router['get']('/',auth[_0x1a10('0x8')](),controller[_0x1a10('0x9')]);router['get'](_0x1a10('0xa'),auth[_0x1a10('0x8')](),controller[_0x1a10('0xb')]);router[_0x1a10('0xc')](_0x1a10('0xd'),auth[_0x1a10('0x8')](),controller[_0x1a10('0xe')]);router[_0x1a10('0xc')](_0x1a10('0xf'),auth[_0x1a10('0x8')](),controller[_0x1a10('0x10')]);router[_0x1a10('0x11')]('/',auth[_0x1a10('0x8')](),controller[_0x1a10('0x12')]);router[_0x1a10('0x11')](_0x1a10('0xd'),auth[_0x1a10('0x8')](),controller[_0x1a10('0x13')]);router[_0x1a10('0x14')](_0x1a10('0xa'),auth[_0x1a10('0x8')](),controller['update']);router[_0x1a10('0x15')](_0x1a10('0xa'),auth['isAuthenticated'](),controller[_0x1a10('0x16')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intDeskAccount/intDeskAccount.attributes.js b/server/api/intDeskAccount/intDeskAccount.attributes.js
index e6771b2..34268b7 100644
--- a/server/api/intDeskAccount/intDeskAccount.attributes.js
+++ b/server/api/intDeskAccount/intDeskAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0ad5=['STRING','ENUM','basic','integrationTab','newTab'];(function(_0x13db6d,_0x3e0feb){var _0x5890d6=function(_0x875c77){while(--_0x875c77){_0x13db6d['push'](_0x13db6d['shift']());}};_0x5890d6(++_0x3e0feb);}(_0x0ad5,0x168));var _0x50ad=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x0ad5[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x50ad('0x0')]},'username':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize['STRING']},'authType':{'type':Sequelize[_0x50ad('0x1')]('basic'),'defaultValue':_0x50ad('0x2')},'password':{'type':Sequelize[_0x50ad('0x0')]},'consumerKey':{'type':Sequelize[_0x50ad('0x0')]},'consumerSecret':{'type':Sequelize[_0x50ad('0x0')]},'token':{'type':Sequelize['STRING']},'tokenSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize[_0x50ad('0x0')]},'type':{'type':Sequelize['ENUM'](_0x50ad('0x3'),_0x50ad('0x4')),'defaultValue':'integrationTab'}};
\ No newline at end of file
+var _0xde60=['basic','integrationTab','newTab','exports','STRING','ENUM'];(function(_0xc29a7b,_0x1b93a7){var _0xd7fbdf=function(_0x267da5){while(--_0x267da5){_0xc29a7b['push'](_0xc29a7b['shift']());}};_0xd7fbdf(++_0x1b93a7);}(_0xde60,0x135));var _0x0de6=function(_0x531cb8,_0x8ef36f){_0x531cb8=_0x531cb8-0x0;var _0x5cf297=_0xde60[_0x531cb8];return _0x5cf297;};'use strict';var Sequelize=require('sequelize');module[_0x0de6('0x0')]={'name':{'type':Sequelize[_0x0de6('0x1')]},'description':{'type':Sequelize[_0x0de6('0x1')]},'username':{'type':Sequelize[_0x0de6('0x1')]},'remoteUri':{'type':Sequelize[_0x0de6('0x1')]},'authType':{'type':Sequelize[_0x0de6('0x2')]('basic'),'defaultValue':_0x0de6('0x3')},'password':{'type':Sequelize[_0x0de6('0x1')]},'consumerKey':{'type':Sequelize[_0x0de6('0x1')]},'consumerSecret':{'type':Sequelize[_0x0de6('0x1')]},'token':{'type':Sequelize[_0x0de6('0x1')]},'tokenSecret':{'type':Sequelize[_0x0de6('0x1')]},'serverUrl':{'type':Sequelize[_0x0de6('0x1')]},'type':{'type':Sequelize[_0x0de6('0x2')](_0x0de6('0x4'),_0x0de6('0x5')),'defaultValue':_0x0de6('0x4')}};
\ No newline at end of file
diff --git a/server/api/intDeskAccount/intDeskAccount.controller.js b/server/api/intDeskAccount/intDeskAccount.controller.js
index 0b17400..8df8f5a 100644
--- a/server/api/intDeskAccount/intDeskAccount.controller.js
+++ b/server/api/intDeskAccount/intDeskAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['includeAll','include','findAll','rows','params','model','rawAttributes','find','body','findOne','DeskConfiguration','getConfigurations','addConfiguration','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','DeskField','getFields','priority','authType','username','password','consumerKey','token','tokenSecret','remoteUri','slice','substring','lastIndexOf','GET','format','%s/custom_fields','application/json','basic','Authorization','Basic\x20%s','toString','concat','entries','active','label','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../components/integrations/configuration','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','DeskAccount,\x20%s,\x20%s','debug','DeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','status','sendStatus','stack','name','send','index','DeskAccount','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','field','options'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0x521929,_0x479be5){_0x521929=_0x521929-0x0;var _0x632436=_0xa9e0[_0x521929];return _0x632436;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var integrations=require(_0x0a9e('0x13'));var jayson=require(_0x0a9e('0x14'));var client=jayson[_0x0a9e('0x15')][_0x0a9e('0x16')]({'port':0x232a});function checkPasswordPattern(_0x32d742,_0x69aeb7,_0x5db4b0){if(_0x5db4b0){var _0x4283ce=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4283ce[_0x0a9e('0x17')](_0x69aeb7)){return _0x32d742;}else{throw new Error(_0x0a9e('0x18'));}}else{return _0x32d742;}}function respondWithRpcPromise(_0x281129,_0x44dcfd,_0x4d5611,_0x52a03d){return new BPromise(function(_0x22dccb,_0x5d0880){var _0x1985b6=_0x52a03d||client;return _0x1985b6['request'](_0x281129,_0x4d5611)[_0x0a9e('0x19')](function(_0x12066b){logger['info'](_0x0a9e('0x1a'),_0x44dcfd,'request\x20sent');logger[_0x0a9e('0x1b')](_0x0a9e('0x1c'),_0x44dcfd,_0x0a9e('0x1d'),JSON[_0x0a9e('0x1e')](_0x12066b));if(_0x12066b[_0x0a9e('0x1f')]){if(_0x12066b[_0x0a9e('0x1f')][_0x0a9e('0x20')]===0x1f4){logger[_0x0a9e('0x1f')](_0x0a9e('0x1a'),_0x44dcfd,_0x12066b[_0x0a9e('0x1f')][_0x0a9e('0x21')]);return _0x5d0880(_0x12066b[_0x0a9e('0x1f')]['message']);}logger[_0x0a9e('0x1f')](_0x0a9e('0x1a'),_0x44dcfd,_0x12066b['error'][_0x0a9e('0x21')]);return _0x22dccb(_0x12066b['error']['message']);}else{logger[_0x0a9e('0x22')](_0x0a9e('0x1a'),_0x44dcfd,_0x0a9e('0x1d'));_0x22dccb(_0x12066b[_0x0a9e('0x23')]['message']);}})[_0x0a9e('0x24')](function(_0x2fb0e4){logger[_0x0a9e('0x1f')](_0x0a9e('0x1a'),_0x44dcfd,_0x2fb0e4);_0x5d0880(_0x2fb0e4);});});}function respondWithStatusCode(_0x370d86,_0x42ac8f){_0x42ac8f=_0x42ac8f||0xcc;return function(_0x16b1ca){if(_0x16b1ca){return _0x370d86['sendStatus'](_0x42ac8f);}return _0x370d86['status'](_0x42ac8f)[_0x0a9e('0x25')]();};}function respondWithResult(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0xc8;return function(_0x33161b){if(_0x33161b){return _0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);}};}function respondWithFilteredResult(_0x479bc4,_0x45a1e7){return function(_0x5bfb33){if(_0x5bfb33){var _0x1dc186=_0x5bfb33[_0x0a9e('0x27')],_0x34dc65=_0x45a1e7[_0x0a9e('0x28')],_0x25fba9=_0x45a1e7[_0x0a9e('0x28')]+_0x45a1e7[_0x0a9e('0x29')],_0x14433c;if(_0x25fba9>=_0x1dc186){_0x25fba9=_0x1dc186;_0x14433c=0xc8;}else{_0x14433c=0xce;}_0x479bc4['status'](_0x14433c);return _0x479bc4[_0x0a9e('0x2a')](_0x0a9e('0x2b'),_0x34dc65+'-'+_0x25fba9+'/'+_0x1dc186)[_0x0a9e('0x26')](_0x5bfb33);}return null;};}function patchUpdates(_0x2ec755){return function(_0x5c877d){try{jsonpatch[_0x0a9e('0x2c')](_0x5c877d,_0x2ec755,!![]);}catch(_0x40e7a3){return BPromise[_0x0a9e('0x2d')](_0x40e7a3);}return _0x5c877d[_0x0a9e('0x2e')]();};}function saveUpdates(_0x58b06f,_0x563b45){return function(_0x296f41){if(_0x296f41){return _0x296f41[_0x0a9e('0x2f')](_0x58b06f)[_0x0a9e('0x19')](function(_0x540530){return _0x540530;});}return null;};}function removeEntity(_0x426950,_0x5d1e0e){return function(_0x2407f9){if(_0x2407f9){return _0x2407f9[_0x0a9e('0x30')]()[_0x0a9e('0x19')](function(){_0x426950[_0x0a9e('0x31')](0xcc)[_0x0a9e('0x25')]();});}};}function handleEntityNotFound(_0x5180f1,_0x66c1d2){return function(_0x46f0a5){if(!_0x46f0a5){_0x5180f1[_0x0a9e('0x32')](0x194);}return _0x46f0a5;};}function handleError(_0x2da5c0,_0x2b45ea){_0x2b45ea=_0x2b45ea||0x1f4;return function(_0x409319){logger[_0x0a9e('0x1f')](_0x409319[_0x0a9e('0x33')]);if(_0x409319['name']){delete _0x409319[_0x0a9e('0x34')];}_0x2da5c0['status'](_0x2b45ea)[_0x0a9e('0x35')](_0x409319);};}exports[_0x0a9e('0x36')]=function(_0x2b7e7f,_0x3f3d41){var _0x567193={},_0x191e91={},_0xd1836d={'count':0x0,'rows':[]};var _0x1fa90d=db[_0x0a9e('0x37')]['rawAttributes'];_0x191e91['model']=_[_0x0a9e('0x38')](_0x1fa90d);_0x191e91['query']=_[_0x0a9e('0x38')](_0x2b7e7f[_0x0a9e('0x39')]);_0x191e91[_0x0a9e('0x3a')]=_[_0x0a9e('0x3b')](_0x191e91['model'],_0x191e91[_0x0a9e('0x39')]);_0x567193[_0x0a9e('0x3c')]=_[_0x0a9e('0x3b')](_0x191e91['model'],qs[_0x0a9e('0x3d')](_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x3d')]));_0x567193['attributes']=_0x567193['attributes'][_0x0a9e('0x3e')]?_0x567193[_0x0a9e('0x3c')]:_0x191e91['model'];if(!_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x3f')](_0x0a9e('0x40'))){_0x567193[_0x0a9e('0x29')]=qs['limit'](_0x2b7e7f['query'][_0x0a9e('0x29')]);_0x567193[_0x0a9e('0x28')]=qs['offset'](_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x28')]);}_0x567193[_0x0a9e('0x41')]=qs['sort'](_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x42')]);_0x567193[_0x0a9e('0x43')]=qs[_0x0a9e('0x3a')](_[_0x0a9e('0x44')](_0x2b7e7f[_0x0a9e('0x39')],_0x191e91[_0x0a9e('0x3a')]));if(_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x45')]){_0x567193[_0x0a9e('0x43')]=_[_0x0a9e('0x46')](_0x567193[_0x0a9e('0x43')],{'$or':_[_0x0a9e('0x47')](_0x1fa90d,function(_0x11ca30){if(_0x11ca30[_0x0a9e('0x48')]['key']!=='VIRTUAL'){var _0x473fdc={};_0x473fdc[_0x11ca30[_0x0a9e('0x49')]]={'$like':'%'+_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x45')]+'%'};return _0x473fdc;}})});}_0x567193=_[_0x0a9e('0x46')]({},_0x567193,_0x2b7e7f[_0x0a9e('0x4a')]);var _0x10b040={'where':_0x567193[_0x0a9e('0x43')]};return db[_0x0a9e('0x37')][_0x0a9e('0x27')](_0x10b040)[_0x0a9e('0x19')](function(_0x35ed4a){_0xd1836d['count']=_0x35ed4a;if(_0x2b7e7f[_0x0a9e('0x39')][_0x0a9e('0x4b')]){_0x567193[_0x0a9e('0x4c')]=[{'all':!![]}];}return db[_0x0a9e('0x37')][_0x0a9e('0x4d')](_0x567193);})[_0x0a9e('0x19')](function(_0x21eb86){_0xd1836d[_0x0a9e('0x4e')]=_0x21eb86;return _0xd1836d;})['then'](respondWithFilteredResult(_0x3f3d41,_0x567193))[_0x0a9e('0x24')](handleError(_0x3f3d41,null));};exports['show']=function(_0x473dc8,_0x476688){var _0x8d6dd1={'raw':![],'where':{'id':_0x473dc8[_0x0a9e('0x4f')]['id']}},_0x562fb4={};_0x562fb4[_0x0a9e('0x50')]=_[_0x0a9e('0x38')](db[_0x0a9e('0x37')][_0x0a9e('0x51')]);_0x562fb4[_0x0a9e('0x39')]=_[_0x0a9e('0x38')](_0x473dc8['query']);_0x562fb4[_0x0a9e('0x3a')]=_[_0x0a9e('0x3b')](_0x562fb4[_0x0a9e('0x50')],_0x562fb4[_0x0a9e('0x39')]);_0x8d6dd1[_0x0a9e('0x3c')]=_[_0x0a9e('0x3b')](_0x562fb4[_0x0a9e('0x50')],qs[_0x0a9e('0x3d')](_0x473dc8[_0x0a9e('0x39')]['fields']));_0x8d6dd1[_0x0a9e('0x3c')]=_0x8d6dd1[_0x0a9e('0x3c')]['length']?_0x8d6dd1['attributes']:_0x562fb4['model'];if(_0x473dc8[_0x0a9e('0x39')][_0x0a9e('0x4b')]){_0x8d6dd1[_0x0a9e('0x4c')]=[{'all':!![]}];}_0x8d6dd1=_[_0x0a9e('0x46')]({},_0x8d6dd1,_0x473dc8[_0x0a9e('0x4a')]);return db[_0x0a9e('0x37')][_0x0a9e('0x52')](_0x8d6dd1)[_0x0a9e('0x19')](handleEntityNotFound(_0x476688,null))['then'](respondWithResult(_0x476688,null))['catch'](handleError(_0x476688,null));};exports['create']=function(_0x39d77d,_0x204173){return db[_0x0a9e('0x37')]['create'](_0x39d77d[_0x0a9e('0x53')],{})[_0x0a9e('0x19')](respondWithResult(_0x204173,0xc9))['catch'](handleError(_0x204173,null));};exports['update']=function(_0x2ef381,_0x59c6ff){if(_0x2ef381[_0x0a9e('0x53')]['id']){delete _0x2ef381['body']['id'];}return db[_0x0a9e('0x37')][_0x0a9e('0x52')]({'where':{'id':_0x2ef381[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x59c6ff,null))[_0x0a9e('0x19')](saveUpdates(_0x2ef381[_0x0a9e('0x53')],null))['then'](respondWithResult(_0x59c6ff,null))['catch'](handleError(_0x59c6ff,null));};exports[_0x0a9e('0x30')]=function(_0x3aedd0,_0x49c095){return db[_0x0a9e('0x37')]['find']({'where':{'id':_0x3aedd0[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x49c095,null))[_0x0a9e('0x19')](removeEntity(_0x49c095,null))['catch'](handleError(_0x49c095,null));};exports['getConfigurations']=function(_0x5df0ad,_0x2da03c,_0x47de4c){var _0x2f7092={};var _0x65432={};var _0x3cfd00;var _0x19b4df;return db[_0x0a9e('0x37')][_0x0a9e('0x54')]({'where':{'id':_0x5df0ad[_0x0a9e('0x4f')]['id']}})[_0x0a9e('0x19')](handleEntityNotFound(_0x2da03c,null))['then'](function(_0x1c693e){if(_0x1c693e){_0x3cfd00=_0x1c693e;_0x65432[_0x0a9e('0x50')]=_[_0x0a9e('0x38')](db[_0x0a9e('0x55')][_0x0a9e('0x51')]);_0x65432[_0x0a9e('0x39')]=_['keys'](_0x5df0ad[_0x0a9e('0x39')]);_0x65432[_0x0a9e('0x3a')]=_['intersection'](_0x65432[_0x0a9e('0x50')],_0x65432['query']);_0x2f7092[_0x0a9e('0x3c')]=_['intersection'](_0x65432['model'],qs['fields'](_0x5df0ad[_0x0a9e('0x39')]['fields']));_0x2f7092[_0x0a9e('0x3c')]=_0x2f7092[_0x0a9e('0x3c')][_0x0a9e('0x3e')]?_0x2f7092[_0x0a9e('0x3c')]:_0x65432[_0x0a9e('0x50')];_0x2f7092[_0x0a9e('0x41')]=qs['sort'](_0x5df0ad[_0x0a9e('0x39')]['sort']);_0x2f7092[_0x0a9e('0x43')]=qs[_0x0a9e('0x3a')](_[_0x0a9e('0x44')](_0x5df0ad['query'],_0x65432[_0x0a9e('0x3a')]));if(_0x5df0ad[_0x0a9e('0x39')][_0x0a9e('0x45')]){_0x2f7092[_0x0a9e('0x43')]=_['merge'](_0x2f7092[_0x0a9e('0x43')],{'$or':_[_0x0a9e('0x47')](_0x2f7092['attributes'],function(_0x797b45){var _0x17e88c={};_0x17e88c[_0x797b45]={'$like':'%'+_0x5df0ad[_0x0a9e('0x39')][_0x0a9e('0x45')]+'%'};return _0x17e88c;})});}_0x2f7092=_[_0x0a9e('0x46')]({},_0x2f7092,_0x5df0ad['options']);return _0x3cfd00[_0x0a9e('0x56')](_0x2f7092);}})[_0x0a9e('0x19')](function(_0x281c7d){if(_0x281c7d){_0x19b4df=_0x281c7d['length'];if(!_0x5df0ad[_0x0a9e('0x39')]['hasOwnProperty']('nolimit')){_0x2f7092[_0x0a9e('0x29')]=qs[_0x0a9e('0x29')](_0x5df0ad[_0x0a9e('0x39')][_0x0a9e('0x29')]);_0x2f7092[_0x0a9e('0x28')]=qs[_0x0a9e('0x28')](_0x5df0ad[_0x0a9e('0x39')][_0x0a9e('0x28')]);}return _0x3cfd00[_0x0a9e('0x56')](_0x2f7092);}})[_0x0a9e('0x19')](function(_0x2e89b7){if(_0x2e89b7){return _0x2e89b7?{'count':_0x19b4df,'rows':_0x2e89b7}:null;}})[_0x0a9e('0x19')](respondWithResult(_0x2da03c,null))[_0x0a9e('0x24')](handleError(_0x2da03c,null));};exports[_0x0a9e('0x57')]=function(_0x320898,_0x412a72,_0x2a28c0){if(_0x320898[_0x0a9e('0x53')]['id']){delete _0x320898['body']['id'];}return db[_0x0a9e('0x37')][_0x0a9e('0x54')]({'where':{'id':_0x320898[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x412a72,null))[_0x0a9e('0x19')](function(_0x30944e){if(_0x30944e){_0x320898['body'][_0x0a9e('0x58')]=_0x30944e['id'];_0x320898[_0x0a9e('0x53')][_0x0a9e('0x59')]=integrations[_0x0a9e('0x5a')](_0x320898[_0x0a9e('0x53')]['channel'],_0x320898['body']['type']);_0x320898[_0x0a9e('0x53')][_0x0a9e('0x5b')]=integrations[_0x0a9e('0x5c')](_0x320898[_0x0a9e('0x53')][_0x0a9e('0x5d')],_0x320898[_0x0a9e('0x53')][_0x0a9e('0x48')]);return db[_0x0a9e('0x55')]['create'](_0x320898[_0x0a9e('0x53')],{'include':[{'model':db[_0x0a9e('0x5e')],'as':_0x0a9e('0x59')},{'model':db['DeskField'],'as':_0x0a9e('0x5b')}]});}return null;})['then'](respondWithResult(_0x412a72,null))[_0x0a9e('0x24')](handleError(_0x412a72,null));};exports[_0x0a9e('0x5f')]=function(_0x4c46c1,_0x2ed01e,_0x75912a){var _0x2cc7a7=[{'name':_0x0a9e('0x60'),'label':'priority','custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x1d442c='';return db[_0x0a9e('0x37')][_0x0a9e('0x54')]({'where':{'id':_0x4c46c1[_0x0a9e('0x4f')]['id']},'attributes':['id','remoteUri',_0x0a9e('0x61'),_0x0a9e('0x62'),_0x0a9e('0x63'),_0x0a9e('0x64'),'consumerSecret',_0x0a9e('0x65'),_0x0a9e('0x66')]})[_0x0a9e('0x19')](handleEntityNotFound(_0x2ed01e,null))[_0x0a9e('0x19')](function(_0x332367){if(_0x332367){_0x1d442c=_0x332367[_0x0a9e('0x67')];var _0x40fc56=_0x1d442c[_0x0a9e('0x68')](-0x1);if(_0x40fc56==='/'){_0x1d442c=_0x1d442c[_0x0a9e('0x69')](0x0,_0x1d442c[_0x0a9e('0x6a')](_0x40fc56));}var _0xc4c230={'method':_0x0a9e('0x6b'),'uri':util[_0x0a9e('0x6c')](_0x0a9e('0x6d'),_0x1d442c),'headers':{'Content-Type':'application/json','Accept':_0x0a9e('0x6e')},'json':!![]};if(_0x332367[_0x0a9e('0x61')]===_0x0a9e('0x6f')){_0xc4c230['headers'][_0x0a9e('0x70')]=util[_0x0a9e('0x6c')](_0x0a9e('0x71'),new Buffer(util[_0x0a9e('0x6c')]('%s:%s',_0x332367['username'],_0x332367[_0x0a9e('0x63')]))[_0x0a9e('0x72')]('base64'));}return rp(_0xc4c230)[_0x0a9e('0x19')](function(_0x53a6a1){return _0x2cc7a7[_0x0a9e('0x73')](_[_0x0a9e('0x47')](_0x53a6a1['_embedded'][_0x0a9e('0x74')],function(_0x41cf12){return{'id':_0x41cf12[_0x0a9e('0x34')],'name':_0x41cf12[_0x0a9e('0x34')],'type':_0x41cf12[_0x0a9e('0x48')],'active':_0x41cf12[_0x0a9e('0x75')],'label':_0x41cf12[_0x0a9e('0x76')],'custom':!![]};}));});}})['then'](function(_0x2973d3){return{'count':_0x2973d3[_0x0a9e('0x3e')],'rows':_0x2973d3};})[_0x0a9e('0x19')](respondWithResult(_0x2ed01e,null))[_0x0a9e('0x24')](function(_0x492543){var _0xf51744=_0x4c46c1[_0x0a9e('0x39')]['test']?0x1f4:_0x492543[_0x0a9e('0x77')]||0x1f4;logger['error'](_0x0a9e('0x78'),_0x0a9e('0x5f'),_0xf51744,JSON[_0x0a9e('0x1e')](_0x492543));delete _0x492543[_0x0a9e('0x34')];if(_0xf51744===0x191){_0xf51744=0x190;}_0x2ed01e['status'](_0xf51744)['send'](_0x4c46c1[_0x0a9e('0x39')][_0x0a9e('0x17')]?{'message':_0x0a9e('0x79'),'statusCode':_0x492543['statusCode']}:_0x492543);});};
\ No newline at end of file
+var _0xd8b0=['findAll','rows','show','params','rawAttributes','find','create','body','getConfigurations','findOne','DeskConfiguration','pick','options','addConfiguration','AccountId','Subjects','channel','Descriptions','getDescriptions','DeskField','getFields','priority','remoteUri','authType','username','password','consumerKey','consumerSecret','token','tokenSecret','slice','substring','GET','format','%s/custom_fields','basic','headers','Authorization','Basic\x20%s','%s:%s','toString','base64','concat','map','active','label','getFields,\x20%s,\x20%s,\x20%s','send','Wrong\x20credentials','statusCode','html-pdf','eml-format','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','end','status','offset','limit','set','json','save','destroy','stack','name','index','DeskAccount','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','key','field','count','include'];(function(_0x2f31de,_0x585892){var _0x54566f=function(_0x253379){while(--_0x253379){_0x2f31de['push'](_0x2f31de['shift']());}};_0x54566f(++_0x585892);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var pdf=require(_0x0d8b('0x0'));var emlformat=require(_0x0d8b('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0d8b('0x2'));var moment=require(_0x0d8b('0x3'));var BPromise=require(_0x0d8b('0x4'));var Mustache=require(_0x0d8b('0x5'));var util=require(_0x0d8b('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x0d8b('0x7'));var ejs=require(_0x0d8b('0x8'));var fs=require('fs');var _=require(_0x0d8b('0x9'));var squel=require('squel');var crypto=require(_0x0d8b('0xa'));var jsforce=require(_0x0d8b('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x0d8b('0x7'));var querystring=require(_0x0d8b('0xc'));var Papa=require(_0x0d8b('0xd'));var Redis=require(_0x0d8b('0xe'));var authService=require(_0x0d8b('0xf'));var qs=require(_0x0d8b('0x10'));var hardwareService=require(_0x0d8b('0x11'));var logger=require(_0x0d8b('0x12'))('api');var utils=require(_0x0d8b('0x13'));var config=require('../../config/environment');var db=require(_0x0d8b('0x14'))['db'];var integrations=require(_0x0d8b('0x15'));var jayson=require(_0x0d8b('0x16'));var client=jayson[_0x0d8b('0x17')][_0x0d8b('0x18')]({'port':0x232a});function checkPasswordPattern(_0x32bb1a,_0x15dd0f,_0x31a8cc){if(_0x31a8cc){var _0x1d4bbc=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1d4bbc[_0x0d8b('0x19')](_0x15dd0f)){return _0x32bb1a;}else{throw new Error(_0x0d8b('0x1a'));}}else{return _0x32bb1a;}}function respondWithRpcPromise(_0xe65334,_0x1567ce,_0x2d4e1c,_0x4f6f21){return new BPromise(function(_0x23eb7b,_0xa86349){var _0x17f7df=_0x4f6f21||client;return _0x17f7df[_0x0d8b('0x1b')](_0xe65334,_0x2d4e1c)[_0x0d8b('0x1c')](function(_0x5cd485){logger[_0x0d8b('0x1d')](_0x0d8b('0x1e'),_0x1567ce,_0x0d8b('0x1f'));logger[_0x0d8b('0x20')](_0x0d8b('0x21'),_0x1567ce,_0x0d8b('0x1f'),JSON[_0x0d8b('0x22')](_0x5cd485));if(_0x5cd485[_0x0d8b('0x23')]){if(_0x5cd485['error'][_0x0d8b('0x24')]===0x1f4){logger[_0x0d8b('0x23')](_0x0d8b('0x1e'),_0x1567ce,_0x5cd485[_0x0d8b('0x23')][_0x0d8b('0x25')]);return _0xa86349(_0x5cd485[_0x0d8b('0x23')][_0x0d8b('0x25')]);}logger[_0x0d8b('0x23')]('DeskAccount,\x20%s,\x20%s',_0x1567ce,_0x5cd485['error'][_0x0d8b('0x25')]);return _0x23eb7b(_0x5cd485['error']['message']);}else{logger['info'](_0x0d8b('0x1e'),_0x1567ce,_0x0d8b('0x1f'));_0x23eb7b(_0x5cd485[_0x0d8b('0x26')][_0x0d8b('0x25')]);}})[_0x0d8b('0x27')](function(_0x2c64e2){logger[_0x0d8b('0x23')](_0x0d8b('0x1e'),_0x1567ce,_0x2c64e2);_0xa86349(_0x2c64e2);});});}function respondWithStatusCode(_0x27b695,_0x5e5bc3){_0x5e5bc3=_0x5e5bc3||0xcc;return function(_0xe8bbee){if(_0xe8bbee){return _0x27b695[_0x0d8b('0x28')](_0x5e5bc3);}return _0x27b695['status'](_0x5e5bc3)[_0x0d8b('0x29')]();};}function respondWithResult(_0x4a0ae4,_0x3dd149){_0x3dd149=_0x3dd149||0xc8;return function(_0x234bdd){if(_0x234bdd){return _0x4a0ae4[_0x0d8b('0x2a')](_0x3dd149)['json'](_0x234bdd);}};}function respondWithFilteredResult(_0x59a905,_0x28f639){return function(_0x3ef745){if(_0x3ef745){var _0x4c05ee=_0x3ef745['count'],_0xcbc4ac=_0x28f639[_0x0d8b('0x2b')],_0x59aa83=_0x28f639['offset']+_0x28f639[_0x0d8b('0x2c')],_0x1b2b59;if(_0x59aa83>=_0x4c05ee){_0x59aa83=_0x4c05ee;_0x1b2b59=0xc8;}else{_0x1b2b59=0xce;}_0x59a905['status'](_0x1b2b59);return _0x59a905[_0x0d8b('0x2d')]('Content-Range',_0xcbc4ac+'-'+_0x59aa83+'/'+_0x4c05ee)[_0x0d8b('0x2e')](_0x3ef745);}return null;};}function patchUpdates(_0x106e4c){return function(_0x2c058d){try{jsonpatch['apply'](_0x2c058d,_0x106e4c,!![]);}catch(_0x4c80a2){return BPromise['reject'](_0x4c80a2);}return _0x2c058d[_0x0d8b('0x2f')]();};}function saveUpdates(_0x5515d2,_0x3cdf3c){return function(_0x54f6f3){if(_0x54f6f3){return _0x54f6f3['update'](_0x5515d2)[_0x0d8b('0x1c')](function(_0x1b6920){return _0x1b6920;});}return null;};}function removeEntity(_0x109c14,_0xdeee5d){return function(_0x183220){if(_0x183220){return _0x183220[_0x0d8b('0x30')]()[_0x0d8b('0x1c')](function(){_0x109c14[_0x0d8b('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x37ca42,_0x3ef48d){return function(_0x4b3ea0){if(!_0x4b3ea0){_0x37ca42[_0x0d8b('0x28')](0x194);}return _0x4b3ea0;};}function handleError(_0x23f7f6,_0x18a905){_0x18a905=_0x18a905||0x1f4;return function(_0x4f2ed2){logger[_0x0d8b('0x23')](_0x4f2ed2[_0x0d8b('0x31')]);if(_0x4f2ed2[_0x0d8b('0x32')]){delete _0x4f2ed2[_0x0d8b('0x32')];}_0x23f7f6[_0x0d8b('0x2a')](_0x18a905)['send'](_0x4f2ed2);};}exports[_0x0d8b('0x33')]=function(_0x1649fc,_0x5ad0fe){var _0x1180ac={},_0x3cc3ee={},_0x188af2={'count':0x0,'rows':[]};var _0x974b9b=db[_0x0d8b('0x34')]['rawAttributes'];_0x3cc3ee['model']=_[_0x0d8b('0x35')](_0x974b9b);_0x3cc3ee['query']=_['keys'](_0x1649fc[_0x0d8b('0x36')]);_0x3cc3ee[_0x0d8b('0x37')]=_[_0x0d8b('0x38')](_0x3cc3ee[_0x0d8b('0x39')],_0x3cc3ee[_0x0d8b('0x36')]);_0x1180ac[_0x0d8b('0x3a')]=_['intersection'](_0x3cc3ee[_0x0d8b('0x39')],qs[_0x0d8b('0x3b')](_0x1649fc[_0x0d8b('0x36')][_0x0d8b('0x3b')]));_0x1180ac[_0x0d8b('0x3a')]=_0x1180ac[_0x0d8b('0x3a')][_0x0d8b('0x3c')]?_0x1180ac['attributes']:_0x3cc3ee[_0x0d8b('0x39')];if(!_0x1649fc[_0x0d8b('0x36')][_0x0d8b('0x3d')](_0x0d8b('0x3e'))){_0x1180ac['limit']=qs[_0x0d8b('0x2c')](_0x1649fc['query'][_0x0d8b('0x2c')]);_0x1180ac[_0x0d8b('0x2b')]=qs[_0x0d8b('0x2b')](_0x1649fc[_0x0d8b('0x36')][_0x0d8b('0x2b')]);}_0x1180ac[_0x0d8b('0x3f')]=qs[_0x0d8b('0x40')](_0x1649fc[_0x0d8b('0x36')][_0x0d8b('0x40')]);_0x1180ac[_0x0d8b('0x41')]=qs['filters'](_['pick'](_0x1649fc['query'],_0x3cc3ee['filters']));if(_0x1649fc['query'][_0x0d8b('0x42')]){_0x1180ac[_0x0d8b('0x41')]=_[_0x0d8b('0x43')](_0x1180ac['where'],{'$or':_['map'](_0x974b9b,function(_0x1b216d){if(_0x1b216d[_0x0d8b('0x44')][_0x0d8b('0x45')]!=='VIRTUAL'){var _0x214583={};_0x214583[_0x1b216d[_0x0d8b('0x46')]]={'$like':'%'+_0x1649fc['query']['filter']+'%'};return _0x214583;}})});}_0x1180ac=_[_0x0d8b('0x43')]({},_0x1180ac,_0x1649fc['options']);var _0x1e22e5={'where':_0x1180ac['where']};return db['DeskAccount'][_0x0d8b('0x47')](_0x1e22e5)[_0x0d8b('0x1c')](function(_0x5a75c7){_0x188af2['count']=_0x5a75c7;if(_0x1649fc['query']['includeAll']){_0x1180ac[_0x0d8b('0x48')]=[{'all':!![]}];}return db[_0x0d8b('0x34')][_0x0d8b('0x49')](_0x1180ac);})['then'](function(_0xb0910e){_0x188af2[_0x0d8b('0x4a')]=_0xb0910e;return _0x188af2;})[_0x0d8b('0x1c')](respondWithFilteredResult(_0x5ad0fe,_0x1180ac))[_0x0d8b('0x27')](handleError(_0x5ad0fe,null));};exports[_0x0d8b('0x4b')]=function(_0x2d5246,_0x11d22b){var _0x1d5067={'raw':![],'where':{'id':_0x2d5246[_0x0d8b('0x4c')]['id']}},_0x384a5e={};_0x384a5e[_0x0d8b('0x39')]=_[_0x0d8b('0x35')](db[_0x0d8b('0x34')][_0x0d8b('0x4d')]);_0x384a5e[_0x0d8b('0x36')]=_[_0x0d8b('0x35')](_0x2d5246[_0x0d8b('0x36')]);_0x384a5e[_0x0d8b('0x37')]=_[_0x0d8b('0x38')](_0x384a5e['model'],_0x384a5e[_0x0d8b('0x36')]);_0x1d5067['attributes']=_['intersection'](_0x384a5e[_0x0d8b('0x39')],qs[_0x0d8b('0x3b')](_0x2d5246[_0x0d8b('0x36')][_0x0d8b('0x3b')]));_0x1d5067['attributes']=_0x1d5067[_0x0d8b('0x3a')][_0x0d8b('0x3c')]?_0x1d5067[_0x0d8b('0x3a')]:_0x384a5e[_0x0d8b('0x39')];if(_0x2d5246[_0x0d8b('0x36')]['includeAll']){_0x1d5067['include']=[{'all':!![]}];}_0x1d5067=_['merge']({},_0x1d5067,_0x2d5246['options']);return db[_0x0d8b('0x34')][_0x0d8b('0x4e')](_0x1d5067)['then'](handleEntityNotFound(_0x11d22b,null))['then'](respondWithResult(_0x11d22b,null))[_0x0d8b('0x27')](handleError(_0x11d22b,null));};exports[_0x0d8b('0x4f')]=function(_0x5c5bd7,_0x5ef6c3){return db[_0x0d8b('0x34')][_0x0d8b('0x4f')](_0x5c5bd7[_0x0d8b('0x50')],{})[_0x0d8b('0x1c')](respondWithResult(_0x5ef6c3,0xc9))[_0x0d8b('0x27')](handleError(_0x5ef6c3,null));};exports['update']=function(_0x2de903,_0x2afe34){if(_0x2de903['body']['id']){delete _0x2de903['body']['id'];}return db[_0x0d8b('0x34')][_0x0d8b('0x4e')]({'where':{'id':_0x2de903['params']['id']}})['then'](handleEntityNotFound(_0x2afe34,null))[_0x0d8b('0x1c')](saveUpdates(_0x2de903[_0x0d8b('0x50')],null))[_0x0d8b('0x1c')](respondWithResult(_0x2afe34,null))[_0x0d8b('0x27')](handleError(_0x2afe34,null));};exports['destroy']=function(_0x356b3d,_0x598e03){return db['DeskAccount'][_0x0d8b('0x4e')]({'where':{'id':_0x356b3d[_0x0d8b('0x4c')]['id']}})['then'](handleEntityNotFound(_0x598e03,null))['then'](removeEntity(_0x598e03,null))[_0x0d8b('0x27')](handleError(_0x598e03,null));};exports[_0x0d8b('0x51')]=function(_0xccc2a9,_0x2c1eb0,_0x3afc3a){var _0xb66e76={};var _0x3978e5={};var _0x3bead7;var _0x5418d8;return db[_0x0d8b('0x34')][_0x0d8b('0x52')]({'where':{'id':_0xccc2a9[_0x0d8b('0x4c')]['id']}})[_0x0d8b('0x1c')](handleEntityNotFound(_0x2c1eb0,null))[_0x0d8b('0x1c')](function(_0x47104e){if(_0x47104e){_0x3bead7=_0x47104e;_0x3978e5[_0x0d8b('0x39')]=_[_0x0d8b('0x35')](db[_0x0d8b('0x53')]['rawAttributes']);_0x3978e5[_0x0d8b('0x36')]=_[_0x0d8b('0x35')](_0xccc2a9[_0x0d8b('0x36')]);_0x3978e5[_0x0d8b('0x37')]=_[_0x0d8b('0x38')](_0x3978e5['model'],_0x3978e5[_0x0d8b('0x36')]);_0xb66e76[_0x0d8b('0x3a')]=_[_0x0d8b('0x38')](_0x3978e5[_0x0d8b('0x39')],qs[_0x0d8b('0x3b')](_0xccc2a9['query']['fields']));_0xb66e76[_0x0d8b('0x3a')]=_0xb66e76[_0x0d8b('0x3a')][_0x0d8b('0x3c')]?_0xb66e76[_0x0d8b('0x3a')]:_0x3978e5['model'];_0xb66e76[_0x0d8b('0x3f')]=qs[_0x0d8b('0x40')](_0xccc2a9[_0x0d8b('0x36')]['sort']);_0xb66e76[_0x0d8b('0x41')]=qs['filters'](_[_0x0d8b('0x54')](_0xccc2a9[_0x0d8b('0x36')],_0x3978e5[_0x0d8b('0x37')]));if(_0xccc2a9[_0x0d8b('0x36')][_0x0d8b('0x42')]){_0xb66e76[_0x0d8b('0x41')]=_['merge'](_0xb66e76[_0x0d8b('0x41')],{'$or':_['map'](_0xb66e76[_0x0d8b('0x3a')],function(_0x4577c8){var _0xafeeb0={};_0xafeeb0[_0x4577c8]={'$like':'%'+_0xccc2a9[_0x0d8b('0x36')]['filter']+'%'};return _0xafeeb0;})});}_0xb66e76=_[_0x0d8b('0x43')]({},_0xb66e76,_0xccc2a9[_0x0d8b('0x55')]);return _0x3bead7[_0x0d8b('0x51')](_0xb66e76);}})[_0x0d8b('0x1c')](function(_0x2ccdae){if(_0x2ccdae){_0x5418d8=_0x2ccdae[_0x0d8b('0x3c')];if(!_0xccc2a9[_0x0d8b('0x36')][_0x0d8b('0x3d')](_0x0d8b('0x3e'))){_0xb66e76[_0x0d8b('0x2c')]=qs['limit'](_0xccc2a9['query'][_0x0d8b('0x2c')]);_0xb66e76[_0x0d8b('0x2b')]=qs['offset'](_0xccc2a9[_0x0d8b('0x36')]['offset']);}return _0x3bead7['getConfigurations'](_0xb66e76);}})[_0x0d8b('0x1c')](function(_0x1c4e96){if(_0x1c4e96){return _0x1c4e96?{'count':_0x5418d8,'rows':_0x1c4e96}:null;}})['then'](respondWithResult(_0x2c1eb0,null))['catch'](handleError(_0x2c1eb0,null));};exports[_0x0d8b('0x56')]=function(_0x1c007b,_0x70e4b2,_0x435090){if(_0x1c007b[_0x0d8b('0x50')]['id']){delete _0x1c007b[_0x0d8b('0x50')]['id'];}return db[_0x0d8b('0x34')]['findOne']({'where':{'id':_0x1c007b[_0x0d8b('0x4c')]['id']}})['then'](handleEntityNotFound(_0x70e4b2,null))[_0x0d8b('0x1c')](function(_0x2c6242){if(_0x2c6242){_0x1c007b[_0x0d8b('0x50')][_0x0d8b('0x57')]=_0x2c6242['id'];_0x1c007b['body'][_0x0d8b('0x58')]=integrations['getSubjects'](_0x1c007b[_0x0d8b('0x50')][_0x0d8b('0x59')],_0x1c007b[_0x0d8b('0x50')][_0x0d8b('0x44')]);_0x1c007b[_0x0d8b('0x50')][_0x0d8b('0x5a')]=integrations[_0x0d8b('0x5b')](_0x1c007b[_0x0d8b('0x50')][_0x0d8b('0x59')],_0x1c007b[_0x0d8b('0x50')]['type']);return db[_0x0d8b('0x53')]['create'](_0x1c007b[_0x0d8b('0x50')],{'include':[{'model':db[_0x0d8b('0x5c')],'as':'Subjects'},{'model':db[_0x0d8b('0x5c')],'as':'Descriptions'}]});}return null;})[_0x0d8b('0x1c')](respondWithResult(_0x70e4b2,null))[_0x0d8b('0x27')](handleError(_0x70e4b2,null));};exports[_0x0d8b('0x5d')]=function(_0x259ac9,_0x2242cd,_0x299f98){var _0x3a073b=[{'name':_0x0d8b('0x5e'),'label':'priority','custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x10eca6='';return db[_0x0d8b('0x34')]['findOne']({'where':{'id':_0x259ac9[_0x0d8b('0x4c')]['id']},'attributes':['id',_0x0d8b('0x5f'),_0x0d8b('0x60'),_0x0d8b('0x61'),_0x0d8b('0x62'),_0x0d8b('0x63'),_0x0d8b('0x64'),_0x0d8b('0x65'),_0x0d8b('0x66')]})[_0x0d8b('0x1c')](handleEntityNotFound(_0x2242cd,null))[_0x0d8b('0x1c')](function(_0x16df83){if(_0x16df83){_0x10eca6=_0x16df83['remoteUri'];var _0x1ece98=_0x10eca6[_0x0d8b('0x67')](-0x1);if(_0x1ece98==='/'){_0x10eca6=_0x10eca6[_0x0d8b('0x68')](0x0,_0x10eca6['lastIndexOf'](_0x1ece98));}var _0x5db3b4={'method':_0x0d8b('0x69'),'uri':util[_0x0d8b('0x6a')](_0x0d8b('0x6b'),_0x10eca6),'headers':{'Content-Type':'application/json','Accept':'application/json'},'json':!![]};if(_0x16df83[_0x0d8b('0x60')]===_0x0d8b('0x6c')){_0x5db3b4[_0x0d8b('0x6d')][_0x0d8b('0x6e')]=util[_0x0d8b('0x6a')](_0x0d8b('0x6f'),new Buffer(util[_0x0d8b('0x6a')](_0x0d8b('0x70'),_0x16df83[_0x0d8b('0x61')],_0x16df83[_0x0d8b('0x62')]))[_0x0d8b('0x71')](_0x0d8b('0x72')));}return rp(_0x5db3b4)[_0x0d8b('0x1c')](function(_0x5dbc6b){return _0x3a073b[_0x0d8b('0x73')](_[_0x0d8b('0x74')](_0x5dbc6b['_embedded']['entries'],function(_0x1a1029){return{'id':_0x1a1029[_0x0d8b('0x32')],'name':_0x1a1029[_0x0d8b('0x32')],'type':_0x1a1029[_0x0d8b('0x44')],'active':_0x1a1029[_0x0d8b('0x75')],'label':_0x1a1029[_0x0d8b('0x76')],'custom':!![]};}));});}})['then'](function(_0x502715){return{'count':_0x502715['length'],'rows':_0x502715};})[_0x0d8b('0x1c')](respondWithResult(_0x2242cd,null))[_0x0d8b('0x27')](function(_0x466442){var _0x28f9b7=_0x259ac9[_0x0d8b('0x36')][_0x0d8b('0x19')]?0x1f4:_0x466442['statusCode']||0x1f4;logger[_0x0d8b('0x23')](_0x0d8b('0x77'),'getFields',_0x28f9b7,JSON[_0x0d8b('0x22')](_0x466442));delete _0x466442['name'];if(_0x28f9b7===0x191){_0x28f9b7=0x190;}_0x2242cd[_0x0d8b('0x2a')](_0x28f9b7)[_0x0d8b('0x78')](_0x259ac9[_0x0d8b('0x36')][_0x0d8b('0x19')]?{'message':_0x0d8b('0x79'),'statusCode':_0x466442[_0x0d8b('0x7a')]}:_0x466442);});};
\ No newline at end of file
diff --git a/server/api/intDeskAccount/intDeskAccount.model.js b/server/api/intDeskAccount/intDeskAccount.model.js
index ab0056a..f29841f 100644
--- a/server/api/intDeskAccount/intDeskAccount.model.js
+++ b/server/api/intDeskAccount/intDeskAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe14d=['lodash','util','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','./intDeskAccount.attributes','../../components/integrations/configuration','exports','DeskAccount','int_desk_accounts'];(function(_0x1335ca,_0x44df43){var _0x50d2d5=function(_0x493850){while(--_0x493850){_0x1335ca['push'](_0x1335ca['shift']());}};_0x50d2d5(++_0x44df43);}(_0xe14d,0x1ee));var _0xde14=function(_0x5416db,_0x55683a){_0x5416db=_0x5416db-0x0;var _0x243e35=_0xe14d[_0x5416db];return _0x243e35;};'use strict';var _=require(_0xde14('0x0'));var util=require(_0xde14('0x1'));var logger=require(_0xde14('0x2'))(_0xde14('0x3'));var moment=require('moment');var BPromise=require(_0xde14('0x4'));var rp=require(_0xde14('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xde14('0x6'));var config=require(_0xde14('0x7'));var attributes=require(_0xde14('0x8'));var integrations=require(_0xde14('0x9'));module[_0xde14('0xa')]=function(_0xba1514,_0x4b1f6b){return _0xba1514['define'](_0xde14('0xb'),attributes,{'tableName':_0xde14('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd2ea=['DeskAccount','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./intDeskAccount.attributes','../../components/integrations/configuration','exports','define'];(function(_0x4b30b4,_0x46a26c){var _0x14d95c=function(_0x55241c){while(--_0x55241c){_0x4b30b4['push'](_0x4b30b4['shift']());}};_0x14d95c(++_0x46a26c);}(_0xd2ea,0x15f));var _0xad2e=function(_0x23f8d2,_0x301fec){_0x23f8d2=_0x23f8d2-0x0;var _0x5d174b=_0xd2ea[_0x23f8d2];return _0x5d174b;};'use strict';var _=require(_0xad2e('0x0'));var util=require(_0xad2e('0x1'));var logger=require(_0xad2e('0x2'))(_0xad2e('0x3'));var moment=require(_0xad2e('0x4'));var BPromise=require('bluebird');var rp=require(_0xad2e('0x5'));var fs=require('fs');var path=require(_0xad2e('0x6'));var rimraf=require(_0xad2e('0x7'));var config=require(_0xad2e('0x8'));var attributes=require(_0xad2e('0x9'));var integrations=require(_0xad2e('0xa'));module[_0xad2e('0xb')]=function(_0x592e8b,_0x3b5170){return _0x592e8b[_0xad2e('0xc')](_0xad2e('0xd'),attributes,{'tableName':'int_desk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intDeskAccount/intDeskAccount.rpc.js b/server/api/intDeskAccount/intDeskAccount.rpc.js
index 450cfcf..e7e969c 100644
--- a/server/api/intDeskAccount/intDeskAccount.rpc.js
+++ b/server/api/intDeskAccount/intDeskAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9be8=['GetDeskAccount','DeskAccount','findAll','options','raw','attributes','include','map','model','debug','stringify','catch','find','ShowDeskAccount','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','DeskAccount,\x20%s,\x20%s,\x20%s','error','code','message','result'];(function(_0x491587,_0x3a629c){var _0x2539d8=function(_0x154b33){while(--_0x154b33){_0x491587['push'](_0x491587['shift']());}};_0x2539d8(++_0x3a629c);}(_0x9be8,0x103));var _0x89be=function(_0x5ecff9,_0x473070){_0x5ecff9=_0x5ecff9-0x0;var _0x5e1415=_0x9be8[_0x5ecff9];return _0x5e1415;};'use strict';var _=require(_0x89be('0x0'));var util=require('util');var moment=require(_0x89be('0x1'));var BPromise=require(_0x89be('0x2'));var rs=require(_0x89be('0x3'));var fs=require('fs');var Redis=require(_0x89be('0x4'));var db=require(_0x89be('0x5'))['db'];var utils=require(_0x89be('0x6'));var logger=require(_0x89be('0x7'))('rpc');var config=require(_0x89be('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x89be('0x9')][_0x89be('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2ed40e,_0x3c8356,_0x49f31c){return new BPromise(function(_0x5008ed,_0x10a2e4){return client[_0x89be('0xb')](_0x2ed40e,_0x49f31c)[_0x89be('0xc')](function(_0x523bbf){logger[_0x89be('0xd')](_0x89be('0xe'),_0x3c8356,_0x89be('0xf'));logger['debug'](_0x89be('0x10'),_0x3c8356,_0x89be('0xf'),JSON['stringify'](_0x523bbf));if(_0x523bbf['error']){if(_0x523bbf[_0x89be('0x11')][_0x89be('0x12')]===0x1f4){logger[_0x89be('0x11')](_0x89be('0xe'),_0x3c8356,_0x523bbf[_0x89be('0x11')][_0x89be('0x13')]);return _0x10a2e4(_0x523bbf[_0x89be('0x11')][_0x89be('0x13')]);}logger[_0x89be('0x11')](_0x89be('0xe'),_0x3c8356,_0x523bbf[_0x89be('0x11')][_0x89be('0x13')]);return _0x5008ed(_0x523bbf[_0x89be('0x11')]['message']);}else{logger[_0x89be('0xd')](_0x89be('0xe'),_0x3c8356,_0x89be('0xf'));_0x5008ed(_0x523bbf[_0x89be('0x14')]['message']);}})['catch'](function(_0x40c801){logger['error'](_0x89be('0xe'),_0x3c8356,_0x40c801);_0x10a2e4(_0x40c801);});});}exports[_0x89be('0x15')]=function(_0x45173e){var _0x4a77ac=this;return new Promise(function(_0x1f7d89,_0x423413){return db[_0x89be('0x16')][_0x89be('0x17')]({'raw':_0x45173e['options']?_0x45173e[_0x89be('0x18')][_0x89be('0x19')]===undefined?!![]:![]:!![],'where':_0x45173e[_0x89be('0x18')]?_0x45173e[_0x89be('0x18')]['where']||null:null,'attributes':_0x45173e[_0x89be('0x18')]?_0x45173e[_0x89be('0x18')][_0x89be('0x1a')]||null:null,'limit':_0x45173e['options']?_0x45173e[_0x89be('0x18')]['limit']||null:null,'include':_0x45173e['options']?_0x45173e[_0x89be('0x18')][_0x89be('0x1b')]?_[_0x89be('0x1c')](_0x45173e[_0x89be('0x18')][_0x89be('0x1b')],function(_0x58bf71){return{'model':db[_0x58bf71['model']],'as':_0x58bf71['as'],'attributes':_0x58bf71[_0x89be('0x1a')],'include':_0x58bf71[_0x89be('0x1b')]?_[_0x89be('0x1c')](_0x58bf71['include'],function(_0x3d2ff6){return{'model':db[_0x3d2ff6[_0x89be('0x1d')]],'as':_0x3d2ff6['as'],'attributes':_0x3d2ff6[_0x89be('0x1a')],'include':_0x3d2ff6[_0x89be('0x1b')]?_[_0x89be('0x1c')](_0x3d2ff6['include'],function(_0x184f7d){return{'model':db[_0x184f7d[_0x89be('0x1d')]],'as':_0x184f7d['as'],'attributes':_0x184f7d[_0x89be('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x140eb6){logger['info']('GetDeskAccount',_0x45173e);logger[_0x89be('0x1e')](_0x89be('0x15'),_0x45173e,JSON[_0x89be('0x1f')](_0x140eb6));_0x1f7d89(_0x140eb6);})[_0x89be('0x20')](function(_0x3be5bc){logger[_0x89be('0x11')](_0x89be('0x15'),_0x3be5bc['message'],_0x45173e);_0x423413(_0x4a77ac['error'](0x1f4,_0x3be5bc[_0x89be('0x13')]));});});};exports['ShowDeskAccount']=function(_0x45ed5f){var _0x409f78=this;return new Promise(function(_0x5a07fb,_0x480cc7){return db['DeskAccount'][_0x89be('0x21')]({'raw':_0x45ed5f['options']?_0x45ed5f['options'][_0x89be('0x19')]===undefined?!![]:![]:!![],'where':_0x45ed5f['options']?_0x45ed5f[_0x89be('0x18')]['where']||null:null,'attributes':_0x45ed5f[_0x89be('0x18')]?_0x45ed5f[_0x89be('0x18')][_0x89be('0x1a')]||null:null,'include':_0x45ed5f[_0x89be('0x18')]?_0x45ed5f[_0x89be('0x18')]['include']?_[_0x89be('0x1c')](_0x45ed5f['options'][_0x89be('0x1b')],function(_0x1ca7e7){return{'model':db[_0x1ca7e7[_0x89be('0x1d')]],'as':_0x1ca7e7['as'],'attributes':_0x1ca7e7[_0x89be('0x1a')],'include':_0x1ca7e7['include']?_[_0x89be('0x1c')](_0x1ca7e7[_0x89be('0x1b')],function(_0x284b0d){return{'model':db[_0x284b0d[_0x89be('0x1d')]],'as':_0x284b0d['as'],'attributes':_0x284b0d[_0x89be('0x1a')],'include':_0x284b0d[_0x89be('0x1b')]?_[_0x89be('0x1c')](_0x284b0d[_0x89be('0x1b')],function(_0x3a7530){return{'model':db[_0x3a7530['model']],'as':_0x3a7530['as'],'attributes':_0x3a7530['attributes']};}):[]};}):[]};}):[]:[]})[_0x89be('0xc')](function(_0x212539){logger[_0x89be('0xd')](_0x89be('0x22'),_0x45ed5f);logger[_0x89be('0x1e')](_0x89be('0x22'),_0x45ed5f,JSON[_0x89be('0x1f')](_0x212539));_0x5a07fb(_0x212539);})[_0x89be('0x20')](function(_0x5a3baf){logger[_0x89be('0x11')]('ShowDeskAccount',_0x5a3baf[_0x89be('0x13')],_0x45ed5f);_0x480cc7(_0x409f78[_0x89be('0x11')](0x1f4,_0x5a3baf['message']));});});};
\ No newline at end of file
+var _0x6829=['client','http','then','DeskAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','info','DeskAccount','findAll','options','raw','attributes','limit','include','map','model','GetDeskAccount','catch','ShowDeskAccount','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0xed4d6f,_0x3b89d3){var _0x151462=function(_0x16f321){while(--_0x16f321){_0xed4d6f['push'](_0xed4d6f['shift']());}};_0x151462(++_0x3b89d3);}(_0x6829,0x14c));var _0x9682=function(_0x525c7b,_0x488fcc){_0x525c7b=_0x525c7b-0x0;var _0x27b33e=_0x6829[_0x525c7b];return _0x27b33e;};'use strict';var _=require(_0x9682('0x0'));var util=require(_0x9682('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9682('0x2'));var db=require(_0x9682('0x3'))['db'];var utils=require(_0x9682('0x4'));var logger=require(_0x9682('0x5'))(_0x9682('0x6'));var config=require(_0x9682('0x7'));var jayson=require(_0x9682('0x8'));var client=jayson[_0x9682('0x9')][_0x9682('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4cec91,_0x37ab0a,_0x1cca2f){return new BPromise(function(_0x576a39,_0x519138){return client['request'](_0x4cec91,_0x1cca2f)[_0x9682('0xb')](function(_0x1b27c2){logger['info'](_0x9682('0xc'),_0x37ab0a,'request\x20sent');logger[_0x9682('0xd')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x37ab0a,_0x9682('0xe'),JSON[_0x9682('0xf')](_0x1b27c2));if(_0x1b27c2[_0x9682('0x10')]){if(_0x1b27c2['error']['code']===0x1f4){logger[_0x9682('0x10')](_0x9682('0xc'),_0x37ab0a,_0x1b27c2['error'][_0x9682('0x11')]);return _0x519138(_0x1b27c2['error'][_0x9682('0x11')]);}logger[_0x9682('0x10')](_0x9682('0xc'),_0x37ab0a,_0x1b27c2[_0x9682('0x10')][_0x9682('0x11')]);return _0x576a39(_0x1b27c2[_0x9682('0x10')][_0x9682('0x11')]);}else{logger[_0x9682('0x12')](_0x9682('0xc'),_0x37ab0a,_0x9682('0xe'));_0x576a39(_0x1b27c2['result'][_0x9682('0x11')]);}})['catch'](function(_0x23eef6){logger[_0x9682('0x10')](_0x9682('0xc'),_0x37ab0a,_0x23eef6);_0x519138(_0x23eef6);});});}exports['GetDeskAccount']=function(_0x1c73ee){var _0x4e0dfb=this;return new Promise(function(_0x107291,_0x51c1a8){return db[_0x9682('0x13')][_0x9682('0x14')]({'raw':_0x1c73ee[_0x9682('0x15')]?_0x1c73ee[_0x9682('0x15')][_0x9682('0x16')]===undefined?!![]:![]:!![],'where':_0x1c73ee['options']?_0x1c73ee['options']['where']||null:null,'attributes':_0x1c73ee[_0x9682('0x15')]?_0x1c73ee['options'][_0x9682('0x17')]||null:null,'limit':_0x1c73ee[_0x9682('0x15')]?_0x1c73ee['options'][_0x9682('0x18')]||null:null,'include':_0x1c73ee[_0x9682('0x15')]?_0x1c73ee[_0x9682('0x15')][_0x9682('0x19')]?_[_0x9682('0x1a')](_0x1c73ee[_0x9682('0x15')][_0x9682('0x19')],function(_0x40e927){return{'model':db[_0x40e927[_0x9682('0x1b')]],'as':_0x40e927['as'],'attributes':_0x40e927[_0x9682('0x17')],'include':_0x40e927['include']?_[_0x9682('0x1a')](_0x40e927[_0x9682('0x19')],function(_0x88419f){return{'model':db[_0x88419f[_0x9682('0x1b')]],'as':_0x88419f['as'],'attributes':_0x88419f[_0x9682('0x17')],'include':_0x88419f['include']?_[_0x9682('0x1a')](_0x88419f[_0x9682('0x19')],function(_0x44808c){return{'model':db[_0x44808c[_0x9682('0x1b')]],'as':_0x44808c['as'],'attributes':_0x44808c[_0x9682('0x17')]};}):[]};}):[]};}):[]:[]})[_0x9682('0xb')](function(_0x48e821){logger[_0x9682('0x12')](_0x9682('0x1c'),_0x1c73ee);logger[_0x9682('0xd')](_0x9682('0x1c'),_0x1c73ee,JSON[_0x9682('0xf')](_0x48e821));_0x107291(_0x48e821);})[_0x9682('0x1d')](function(_0x176624){logger[_0x9682('0x10')]('GetDeskAccount',_0x176624[_0x9682('0x11')],_0x1c73ee);_0x51c1a8(_0x4e0dfb['error'](0x1f4,_0x176624[_0x9682('0x11')]));});});};exports[_0x9682('0x1e')]=function(_0x598248){var _0x54c860=this;return new Promise(function(_0x4b4c5d,_0x5a2ad3){return db[_0x9682('0x13')]['find']({'raw':_0x598248[_0x9682('0x15')]?_0x598248[_0x9682('0x15')][_0x9682('0x16')]===undefined?!![]:![]:!![],'where':_0x598248[_0x9682('0x15')]?_0x598248['options']['where']||null:null,'attributes':_0x598248[_0x9682('0x15')]?_0x598248[_0x9682('0x15')][_0x9682('0x17')]||null:null,'include':_0x598248[_0x9682('0x15')]?_0x598248[_0x9682('0x15')]['include']?_['map'](_0x598248[_0x9682('0x15')][_0x9682('0x19')],function(_0x76f489){return{'model':db[_0x76f489[_0x9682('0x1b')]],'as':_0x76f489['as'],'attributes':_0x76f489[_0x9682('0x17')],'include':_0x76f489[_0x9682('0x19')]?_[_0x9682('0x1a')](_0x76f489['include'],function(_0x27c9dd){return{'model':db[_0x27c9dd[_0x9682('0x1b')]],'as':_0x27c9dd['as'],'attributes':_0x27c9dd[_0x9682('0x17')],'include':_0x27c9dd[_0x9682('0x19')]?_[_0x9682('0x1a')](_0x27c9dd['include'],function(_0x194bda){return{'model':db[_0x194bda['model']],'as':_0x194bda['as'],'attributes':_0x194bda[_0x9682('0x17')]};}):[]};}):[]};}):[]:[]})[_0x9682('0xb')](function(_0x43d782){logger[_0x9682('0x12')](_0x9682('0x1e'),_0x598248);logger[_0x9682('0xd')](_0x9682('0x1e'),_0x598248,JSON['stringify'](_0x43d782));_0x4b4c5d(_0x43d782);})[_0x9682('0x1d')](function(_0x555634){logger[_0x9682('0x10')]('ShowDeskAccount',_0x555634[_0x9682('0x11')],_0x598248);_0x5a2ad3(_0x54c860[_0x9682('0x10')](0x1f4,_0x555634[_0x9682('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/index.js b/server/api/intDeskConfiguration/index.js
index 3020d69..a7cfe83 100644
--- a/server/api/intDeskConfiguration/index.js
+++ b/server/api/intDeskConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7457=['./intDeskConfiguration.controller','get','isAuthenticated','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getTags','post','create','/:id/tags','setTags','put','update','destroy','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x2a883c,_0x38cda2){var _0x21801c=function(_0x283033){while(--_0x283033){_0x2a883c['push'](_0x2a883c['shift']());}};_0x21801c(++_0x38cda2);}(_0x7457,0x7b));var _0x7745=function(_0x5a3cf0,_0x160a68){_0x5a3cf0=_0x5a3cf0-0x0;var _0x5a64ee=_0x7457[_0x5a3cf0];return _0x5a64ee;};'use strict';var multer=require('multer');var util=require(_0x7745('0x0'));var path=require('path');var timeout=require(_0x7745('0x1'));var express=require(_0x7745('0x2'));var router=express[_0x7745('0x3')]();var auth=require(_0x7745('0x4'));var interaction=require(_0x7745('0x5'));var config=require(_0x7745('0x6'));var controller=require(_0x7745('0x7'));router[_0x7745('0x8')]('/',auth[_0x7745('0x9')](),controller['index']);router['get'](_0x7745('0xa'),auth[_0x7745('0x9')](),controller[_0x7745('0xb')]);router['get'](_0x7745('0xc'),auth[_0x7745('0x9')](),controller[_0x7745('0xd')]);router[_0x7745('0x8')](_0x7745('0xe'),auth[_0x7745('0x9')](),controller[_0x7745('0xf')]);router['get'](_0x7745('0x10'),auth[_0x7745('0x9')](),controller['getDescriptions']);router['get']('/:id/tags',auth['isAuthenticated'](),controller[_0x7745('0x11')]);router[_0x7745('0x12')]('/',auth['isAuthenticated'](),controller[_0x7745('0x13')]);router[_0x7745('0x12')](_0x7745('0x14'),auth['isAuthenticated'](),controller[_0x7745('0x15')]);router[_0x7745('0x16')](_0x7745('0xa'),auth['isAuthenticated'](),controller[_0x7745('0x17')]);router['delete'](_0x7745('0xa'),auth['isAuthenticated'](),controller[_0x7745('0x18')]);module[_0x7745('0x19')]=router;
\ No newline at end of file
+var _0x0733=['index','/:id','show','getFields','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','create','setTags','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskConfiguration.controller','get','isAuthenticated'];(function(_0x5dc45d,_0x55f90f){var _0x4ce697=function(_0x4e6e21){while(--_0x4e6e21){_0x5dc45d['push'](_0x5dc45d['shift']());}};_0x4ce697(++_0x55f90f);}(_0x0733,0xcd));var _0x3073=function(_0x2351ab,_0x5680f0){_0x2351ab=_0x2351ab-0x0;var _0x428ca4=_0x0733[_0x2351ab];return _0x428ca4;};'use strict';var multer=require(_0x3073('0x0'));var util=require('util');var path=require(_0x3073('0x1'));var timeout=require(_0x3073('0x2'));var express=require(_0x3073('0x3'));var router=express[_0x3073('0x4')]();var auth=require(_0x3073('0x5'));var interaction=require(_0x3073('0x6'));var config=require(_0x3073('0x7'));var controller=require(_0x3073('0x8'));router[_0x3073('0x9')]('/',auth[_0x3073('0xa')](),controller[_0x3073('0xb')]);router['get'](_0x3073('0xc'),auth[_0x3073('0xa')](),controller[_0x3073('0xd')]);router[_0x3073('0x9')]('/:id/fields',auth[_0x3073('0xa')](),controller[_0x3073('0xe')]);router[_0x3073('0x9')]('/:id/subjects',auth['isAuthenticated'](),controller['getSubjects']);router[_0x3073('0x9')](_0x3073('0xf'),auth['isAuthenticated'](),controller[_0x3073('0x10')]);router[_0x3073('0x9')](_0x3073('0x11'),auth[_0x3073('0xa')](),controller[_0x3073('0x12')]);router[_0x3073('0x13')]('/',auth[_0x3073('0xa')](),controller[_0x3073('0x14')]);router[_0x3073('0x13')](_0x3073('0x11'),auth['isAuthenticated'](),controller[_0x3073('0x15')]);router[_0x3073('0x16')](_0x3073('0xc'),auth['isAuthenticated'](),controller[_0x3073('0x17')]);router[_0x3073('0x18')](_0x3073('0xc'),auth['isAuthenticated'](),controller[_0x3073('0x19')]);module[_0x3073('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js
index 3f17b2c..a29976a 100644
--- a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js
+++ b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2025=['STRING','sequelize','exports'];(function(_0x103a07,_0x35acb4){var _0x404596=function(_0x5b6cf8){while(--_0x5b6cf8){_0x103a07['push'](_0x103a07['shift']());}};_0x404596(++_0x35acb4);}(_0x2025,0x12a));var _0x5202=function(_0x19d4cc,_0x41c307){_0x19d4cc=_0x19d4cc-0x0;var _0x3c790c=_0x2025[_0x19d4cc];return _0x3c790c;};'use strict';var Sequelize=require(_0x5202('0x0'));module[_0x5202('0x1')]={'name':{'type':Sequelize[_0x5202('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb64f=['STRING','sequelize'];(function(_0x18c6e6,_0x137fa9){var _0x24519c=function(_0x4a7ab6){while(--_0x4a7ab6){_0x18c6e6['push'](_0x18c6e6['shift']());}};_0x24519c(++_0x137fa9);}(_0xb64f,0xc9));var _0xfb64=function(_0x4f3b2d,_0x3bbf46){_0x4f3b2d=_0x4f3b2d-0x0;var _0x3dddfa=_0xb64f[_0x4f3b2d];return _0x3dddfa;};'use strict';var Sequelize=require(_0xfb64('0x0'));module['exports']={'name':{'type':Sequelize[_0xfb64('0x1')]},'description':{'type':Sequelize[_0xfb64('0x1')]}};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js
index 3eec038..b5510d8 100644
--- a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js
+++ b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0faf=['filter','merge','map','key','VIRTUAL','field','options','include','rows','show','params','length','includeAll','create','body','update','destroy','find','getFields','pick','findOne','DeskField','getSubjects','getDescriptions','getTags','setTags','ids','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','jayson/promise','http','request','then','DeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','result','catch','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','name','index','DeskConfiguration','rawAttributes','model','keys','intersection','fields','query','attributes','hasOwnProperty','nolimit','limit','order','sort','where','filters'];(function(_0x106ae2,_0x130b0c){var _0x5f43e9=function(_0xab3788){while(--_0xab3788){_0x106ae2['push'](_0x106ae2['shift']());}};_0x5f43e9(++_0x130b0c);}(_0x0faf,0x132));var _0xf0fa=function(_0x10b1bb,_0x2a5815){_0x10b1bb=_0x10b1bb-0x0;var _0x2d4e05=_0x0faf[_0x10b1bb];return _0x2d4e05;};'use strict';var pdf=require(_0xf0fa('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xf0fa('0x1'));var zipdir=require(_0xf0fa('0x2'));var jsonpatch=require(_0xf0fa('0x3'));var rp=require(_0xf0fa('0x4'));var moment=require(_0xf0fa('0x5'));var BPromise=require(_0xf0fa('0x6'));var Mustache=require(_0xf0fa('0x7'));var util=require(_0xf0fa('0x8'));var path=require(_0xf0fa('0x9'));var sox=require('sox');var csv=require(_0xf0fa('0xa'));var ejs=require(_0xf0fa('0xb'));var fs=require('fs');var _=require(_0xf0fa('0xc'));var squel=require(_0xf0fa('0xd'));var crypto=require(_0xf0fa('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xf0fa('0xf'));var toCsv=require(_0xf0fa('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xf0fa('0x10'));var authService=require(_0xf0fa('0x11'));var qs=require(_0xf0fa('0x12'));var hardwareService=require(_0xf0fa('0x13'));var logger=require(_0xf0fa('0x14'))(_0xf0fa('0x15'));var utils=require(_0xf0fa('0x16'));var config=require(_0xf0fa('0x17'));var db=require('../../mysqldb')['db'];var jayson=require(_0xf0fa('0x18'));var client=jayson['client'][_0xf0fa('0x19')]({'port':0x232a});function checkPasswordPattern(_0x521034,_0x39ae2b,_0x17326f){if(_0x17326f){var _0x39a086=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x39a086['test'](_0x39ae2b)){return _0x521034;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x521034;}}function respondWithRpcPromise(_0x42591b,_0x540a04,_0x1f7159,_0x81fc49){return new BPromise(function(_0x10ce43,_0x3203ce){var _0x467d5f=_0x81fc49||client;return _0x467d5f[_0xf0fa('0x1a')](_0x42591b,_0x1f7159)[_0xf0fa('0x1b')](function(_0x3f3bb7){logger['info'](_0xf0fa('0x1c'),_0x540a04,_0xf0fa('0x1d'));logger[_0xf0fa('0x1e')](_0xf0fa('0x1f'),_0x540a04,_0xf0fa('0x1d'),JSON[_0xf0fa('0x20')](_0x3f3bb7));if(_0x3f3bb7['error']){if(_0x3f3bb7['error'][_0xf0fa('0x21')]===0x1f4){logger[_0xf0fa('0x22')](_0xf0fa('0x1c'),_0x540a04,_0x3f3bb7[_0xf0fa('0x22')][_0xf0fa('0x23')]);return _0x3203ce(_0x3f3bb7[_0xf0fa('0x22')][_0xf0fa('0x23')]);}logger[_0xf0fa('0x22')](_0xf0fa('0x1c'),_0x540a04,_0x3f3bb7[_0xf0fa('0x22')][_0xf0fa('0x23')]);return _0x10ce43(_0x3f3bb7['error'][_0xf0fa('0x23')]);}else{logger[_0xf0fa('0x24')](_0xf0fa('0x1c'),_0x540a04,_0xf0fa('0x1d'));_0x10ce43(_0x3f3bb7[_0xf0fa('0x25')][_0xf0fa('0x23')]);}})[_0xf0fa('0x26')](function(_0x1f0eaf){logger[_0xf0fa('0x22')]('DeskConfiguration,\x20%s,\x20%s',_0x540a04,_0x1f0eaf);_0x3203ce(_0x1f0eaf);});});}function respondWithStatusCode(_0xeb86a9,_0x19e392){_0x19e392=_0x19e392||0xcc;return function(_0x56134e){if(_0x56134e){return _0xeb86a9[_0xf0fa('0x27')](_0x19e392);}return _0xeb86a9[_0xf0fa('0x28')](_0x19e392)[_0xf0fa('0x29')]();};}function respondWithResult(_0x59e007,_0xded80d){_0xded80d=_0xded80d||0xc8;return function(_0x284499){if(_0x284499){return _0x59e007[_0xf0fa('0x28')](_0xded80d)[_0xf0fa('0x2a')](_0x284499);}};}function respondWithFilteredResult(_0x4e6eef,_0x4be235){return function(_0x287810){if(_0x287810){var _0x1c5eaf=_0x287810[_0xf0fa('0x2b')],_0x1679cf=_0x4be235[_0xf0fa('0x2c')],_0x11085f=_0x4be235[_0xf0fa('0x2c')]+_0x4be235['limit'],_0x57b8e9;if(_0x11085f>=_0x1c5eaf){_0x11085f=_0x1c5eaf;_0x57b8e9=0xc8;}else{_0x57b8e9=0xce;}_0x4e6eef[_0xf0fa('0x28')](_0x57b8e9);return _0x4e6eef['set'](_0xf0fa('0x2d'),_0x1679cf+'-'+_0x11085f+'/'+_0x1c5eaf)[_0xf0fa('0x2a')](_0x287810);}return null;};}function patchUpdates(_0x28e057){return function(_0x519661){try{jsonpatch[_0xf0fa('0x2e')](_0x519661,_0x28e057,!![]);}catch(_0x33cc64){return BPromise[_0xf0fa('0x2f')](_0x33cc64);}return _0x519661[_0xf0fa('0x30')]();};}function saveUpdates(_0x2cb17d,_0x9436e3){return function(_0x490613){if(_0x490613){return _0x490613['update'](_0x2cb17d)[_0xf0fa('0x1b')](function(_0x255f9d){return _0x255f9d;});}return null;};}function removeEntity(_0x485fe2,_0x38cf8c){return function(_0x50e0bd){if(_0x50e0bd){return _0x50e0bd['destroy']()['then'](function(){_0x485fe2[_0xf0fa('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2c0721,_0x1243c4){return function(_0x5e1d57){if(!_0x5e1d57){_0x2c0721[_0xf0fa('0x27')](0x194);}return _0x5e1d57;};}function handleError(_0x19c97e,_0x36f853){_0x36f853=_0x36f853||0x1f4;return function(_0x3c15d4){logger[_0xf0fa('0x22')](_0x3c15d4['stack']);if(_0x3c15d4[_0xf0fa('0x31')]){delete _0x3c15d4[_0xf0fa('0x31')];}_0x19c97e[_0xf0fa('0x28')](_0x36f853)['send'](_0x3c15d4);};}exports[_0xf0fa('0x32')]=function(_0x114feb,_0x19b137){var _0xb29ae5={},_0x4879ef={},_0x5c474e={'count':0x0,'rows':[]};var _0x2a9f4b=db[_0xf0fa('0x33')][_0xf0fa('0x34')];_0x4879ef[_0xf0fa('0x35')]=_[_0xf0fa('0x36')](_0x2a9f4b);_0x4879ef['query']=_['keys'](_0x114feb['query']);_0x4879ef['filters']=_[_0xf0fa('0x37')](_0x4879ef[_0xf0fa('0x35')],_0x4879ef['query']);_0xb29ae5['attributes']=_[_0xf0fa('0x37')](_0x4879ef[_0xf0fa('0x35')],qs[_0xf0fa('0x38')](_0x114feb[_0xf0fa('0x39')][_0xf0fa('0x38')]));_0xb29ae5[_0xf0fa('0x3a')]=_0xb29ae5[_0xf0fa('0x3a')]['length']?_0xb29ae5['attributes']:_0x4879ef[_0xf0fa('0x35')];if(!_0x114feb[_0xf0fa('0x39')][_0xf0fa('0x3b')](_0xf0fa('0x3c'))){_0xb29ae5[_0xf0fa('0x3d')]=qs[_0xf0fa('0x3d')](_0x114feb['query'][_0xf0fa('0x3d')]);_0xb29ae5['offset']=qs[_0xf0fa('0x2c')](_0x114feb[_0xf0fa('0x39')][_0xf0fa('0x2c')]);}_0xb29ae5[_0xf0fa('0x3e')]=qs[_0xf0fa('0x3f')](_0x114feb[_0xf0fa('0x39')][_0xf0fa('0x3f')]);_0xb29ae5[_0xf0fa('0x40')]=qs[_0xf0fa('0x41')](_['pick'](_0x114feb['query'],_0x4879ef['filters']));if(_0x114feb[_0xf0fa('0x39')][_0xf0fa('0x42')]){_0xb29ae5['where']=_[_0xf0fa('0x43')](_0xb29ae5[_0xf0fa('0x40')],{'$or':_[_0xf0fa('0x44')](_0x2a9f4b,function(_0x32ade6){if(_0x32ade6['type'][_0xf0fa('0x45')]!==_0xf0fa('0x46')){var _0x3d6233={};_0x3d6233[_0x32ade6[_0xf0fa('0x47')]]={'$like':'%'+_0x114feb[_0xf0fa('0x39')][_0xf0fa('0x42')]+'%'};return _0x3d6233;}})});}_0xb29ae5=_[_0xf0fa('0x43')]({},_0xb29ae5,_0x114feb[_0xf0fa('0x48')]);var _0x1b435f={'where':_0xb29ae5['where']};return db[_0xf0fa('0x33')][_0xf0fa('0x2b')](_0x1b435f)[_0xf0fa('0x1b')](function(_0x24ae12){_0x5c474e[_0xf0fa('0x2b')]=_0x24ae12;if(_0x114feb[_0xf0fa('0x39')]['includeAll']){_0xb29ae5[_0xf0fa('0x49')]=[{'all':!![]}];}return db[_0xf0fa('0x33')]['findAll'](_0xb29ae5);})[_0xf0fa('0x1b')](function(_0x235e99){_0x5c474e[_0xf0fa('0x4a')]=_0x235e99;return _0x5c474e;})[_0xf0fa('0x1b')](respondWithFilteredResult(_0x19b137,_0xb29ae5))[_0xf0fa('0x26')](handleError(_0x19b137,null));};exports[_0xf0fa('0x4b')]=function(_0x41d83d,_0x32bf89){var _0x35272e={'raw':![],'where':{'id':_0x41d83d[_0xf0fa('0x4c')]['id']}},_0x4cd85e={};_0x4cd85e['model']=_[_0xf0fa('0x36')](db[_0xf0fa('0x33')][_0xf0fa('0x34')]);_0x4cd85e['query']=_[_0xf0fa('0x36')](_0x41d83d[_0xf0fa('0x39')]);_0x4cd85e[_0xf0fa('0x41')]=_[_0xf0fa('0x37')](_0x4cd85e[_0xf0fa('0x35')],_0x4cd85e['query']);_0x35272e[_0xf0fa('0x3a')]=_['intersection'](_0x4cd85e[_0xf0fa('0x35')],qs[_0xf0fa('0x38')](_0x41d83d[_0xf0fa('0x39')][_0xf0fa('0x38')]));_0x35272e[_0xf0fa('0x3a')]=_0x35272e['attributes'][_0xf0fa('0x4d')]?_0x35272e[_0xf0fa('0x3a')]:_0x4cd85e[_0xf0fa('0x35')];if(_0x41d83d[_0xf0fa('0x39')][_0xf0fa('0x4e')]){_0x35272e[_0xf0fa('0x49')]=[{'all':!![]}];}_0x35272e=_['merge']({},_0x35272e,_0x41d83d[_0xf0fa('0x48')]);return db['DeskConfiguration']['find'](_0x35272e)['then'](handleEntityNotFound(_0x32bf89,null))[_0xf0fa('0x1b')](respondWithResult(_0x32bf89,null))[_0xf0fa('0x26')](handleError(_0x32bf89,null));};exports[_0xf0fa('0x4f')]=function(_0x63ef16,_0x3670fa){return db[_0xf0fa('0x33')][_0xf0fa('0x4f')](_0x63ef16[_0xf0fa('0x50')],{})[_0xf0fa('0x1b')](respondWithResult(_0x3670fa,0xc9))['catch'](handleError(_0x3670fa,null));};exports[_0xf0fa('0x51')]=function(_0x5c4f0c,_0x1cb635){if(_0x5c4f0c[_0xf0fa('0x50')]['id']){delete _0x5c4f0c[_0xf0fa('0x50')]['id'];}return db[_0xf0fa('0x33')]['find']({'where':{'id':_0x5c4f0c[_0xf0fa('0x4c')]['id']}})['then'](handleEntityNotFound(_0x1cb635,null))[_0xf0fa('0x1b')](saveUpdates(_0x5c4f0c[_0xf0fa('0x50')],null))[_0xf0fa('0x1b')](respondWithResult(_0x1cb635,null))[_0xf0fa('0x26')](handleError(_0x1cb635,null));};exports[_0xf0fa('0x52')]=function(_0x1fad44,_0x4fa721){return db[_0xf0fa('0x33')][_0xf0fa('0x53')]({'where':{'id':_0x1fad44['params']['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x4fa721,null))[_0xf0fa('0x1b')](removeEntity(_0x4fa721,null))['catch'](handleError(_0x4fa721,null));};exports[_0xf0fa('0x54')]=function(_0x2857ae,_0x57dccd,_0xd01a7a){var _0x3c5014={};var _0xd7cd1a={};var _0x4db972;var _0x2a3b50;return db[_0xf0fa('0x33')]['findOne']({'where':{'id':_0x2857ae[_0xf0fa('0x4c')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x57dccd,null))[_0xf0fa('0x1b')](function(_0x588843){if(_0x588843){_0x4db972=_0x588843;_0xd7cd1a[_0xf0fa('0x35')]=_[_0xf0fa('0x36')](db['DeskField'][_0xf0fa('0x34')]);_0xd7cd1a[_0xf0fa('0x39')]=_[_0xf0fa('0x36')](_0x2857ae[_0xf0fa('0x39')]);_0xd7cd1a[_0xf0fa('0x41')]=_[_0xf0fa('0x37')](_0xd7cd1a[_0xf0fa('0x35')],_0xd7cd1a[_0xf0fa('0x39')]);_0x3c5014[_0xf0fa('0x3a')]=_[_0xf0fa('0x37')](_0xd7cd1a['model'],qs[_0xf0fa('0x38')](_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x38')]));_0x3c5014[_0xf0fa('0x3a')]=_0x3c5014[_0xf0fa('0x3a')][_0xf0fa('0x4d')]?_0x3c5014[_0xf0fa('0x3a')]:_0xd7cd1a['model'];_0x3c5014[_0xf0fa('0x3e')]=qs[_0xf0fa('0x3f')](_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x3f')]);_0x3c5014[_0xf0fa('0x40')]=qs[_0xf0fa('0x41')](_[_0xf0fa('0x55')](_0x2857ae['query'],_0xd7cd1a[_0xf0fa('0x41')]));if(_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x42')]){_0x3c5014[_0xf0fa('0x40')]=_[_0xf0fa('0x43')](_0x3c5014['where'],{'$or':_['map'](_0x3c5014['attributes'],function(_0x23a25e){var _0x29c996={};_0x29c996[_0x23a25e]={'$like':'%'+_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x42')]+'%'};return _0x29c996;})});}_0x3c5014=_['merge']({},_0x3c5014,_0x2857ae['options']);return _0x4db972[_0xf0fa('0x54')](_0x3c5014);}})['then'](function(_0x1cd327){if(_0x1cd327){_0x2a3b50=_0x1cd327[_0xf0fa('0x4d')];if(!_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x3b')](_0xf0fa('0x3c'))){_0x3c5014['limit']=qs[_0xf0fa('0x3d')](_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x3d')]);_0x3c5014[_0xf0fa('0x2c')]=qs[_0xf0fa('0x2c')](_0x2857ae[_0xf0fa('0x39')][_0xf0fa('0x2c')]);}return _0x4db972[_0xf0fa('0x54')](_0x3c5014);}})[_0xf0fa('0x1b')](function(_0x4c2fdd){if(_0x4c2fdd){return _0x4c2fdd?{'count':_0x2a3b50,'rows':_0x4c2fdd}:null;}})['then'](respondWithResult(_0x57dccd,null))[_0xf0fa('0x26')](handleError(_0x57dccd,null));};exports['getSubjects']=function(_0x17d7a4,_0x583a0b,_0x4b3cb6){var _0x4a851b={};var _0x3d1354={};var _0x415a1b;var _0x735e07;return db[_0xf0fa('0x33')][_0xf0fa('0x56')]({'where':{'id':_0x17d7a4[_0xf0fa('0x4c')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x583a0b,null))[_0xf0fa('0x1b')](function(_0x2a5a11){if(_0x2a5a11){_0x415a1b=_0x2a5a11;_0x3d1354[_0xf0fa('0x35')]=_['keys'](db[_0xf0fa('0x57')]['rawAttributes']);_0x3d1354[_0xf0fa('0x39')]=_['keys'](_0x17d7a4[_0xf0fa('0x39')]);_0x3d1354['filters']=_[_0xf0fa('0x37')](_0x3d1354['model'],_0x3d1354[_0xf0fa('0x39')]);_0x4a851b[_0xf0fa('0x3a')]=_[_0xf0fa('0x37')](_0x3d1354[_0xf0fa('0x35')],qs[_0xf0fa('0x38')](_0x17d7a4['query']['fields']));_0x4a851b[_0xf0fa('0x3a')]=_0x4a851b[_0xf0fa('0x3a')]['length']?_0x4a851b['attributes']:_0x3d1354[_0xf0fa('0x35')];_0x4a851b[_0xf0fa('0x3e')]=qs[_0xf0fa('0x3f')](_0x17d7a4[_0xf0fa('0x39')][_0xf0fa('0x3f')]);_0x4a851b['where']=qs[_0xf0fa('0x41')](_[_0xf0fa('0x55')](_0x17d7a4[_0xf0fa('0x39')],_0x3d1354['filters']));if(_0x17d7a4['query'][_0xf0fa('0x42')]){_0x4a851b[_0xf0fa('0x40')]=_['merge'](_0x4a851b['where'],{'$or':_[_0xf0fa('0x44')](_0x4a851b[_0xf0fa('0x3a')],function(_0x22cf95){var _0x509891={};_0x509891[_0x22cf95]={'$like':'%'+_0x17d7a4['query']['filter']+'%'};return _0x509891;})});}_0x4a851b=_[_0xf0fa('0x43')]({},_0x4a851b,_0x17d7a4['options']);return _0x415a1b['getSubjects'](_0x4a851b);}})[_0xf0fa('0x1b')](function(_0xfb68fd){if(_0xfb68fd){_0x735e07=_0xfb68fd[_0xf0fa('0x4d')];if(!_0x17d7a4[_0xf0fa('0x39')][_0xf0fa('0x3b')](_0xf0fa('0x3c'))){_0x4a851b['limit']=qs[_0xf0fa('0x3d')](_0x17d7a4[_0xf0fa('0x39')][_0xf0fa('0x3d')]);_0x4a851b['offset']=qs[_0xf0fa('0x2c')](_0x17d7a4['query']['offset']);}return _0x415a1b[_0xf0fa('0x58')](_0x4a851b);}})['then'](function(_0x58811b){if(_0x58811b){return _0x58811b?{'count':_0x735e07,'rows':_0x58811b}:null;}})[_0xf0fa('0x1b')](respondWithResult(_0x583a0b,null))[_0xf0fa('0x26')](handleError(_0x583a0b,null));};exports[_0xf0fa('0x59')]=function(_0x581f37,_0xe1b0ff,_0x168099){var _0x552b9e={};var _0x6fc2af={};var _0xb8aff2;var _0x22c518;return db[_0xf0fa('0x33')][_0xf0fa('0x56')]({'where':{'id':_0x581f37[_0xf0fa('0x4c')]['id']}})['then'](handleEntityNotFound(_0xe1b0ff,null))[_0xf0fa('0x1b')](function(_0x5c91f7){if(_0x5c91f7){_0xb8aff2=_0x5c91f7;_0x6fc2af[_0xf0fa('0x35')]=_[_0xf0fa('0x36')](db[_0xf0fa('0x57')][_0xf0fa('0x34')]);_0x6fc2af[_0xf0fa('0x39')]=_[_0xf0fa('0x36')](_0x581f37[_0xf0fa('0x39')]);_0x6fc2af['filters']=_['intersection'](_0x6fc2af[_0xf0fa('0x35')],_0x6fc2af[_0xf0fa('0x39')]);_0x552b9e['attributes']=_[_0xf0fa('0x37')](_0x6fc2af['model'],qs['fields'](_0x581f37[_0xf0fa('0x39')][_0xf0fa('0x38')]));_0x552b9e['attributes']=_0x552b9e['attributes'][_0xf0fa('0x4d')]?_0x552b9e[_0xf0fa('0x3a')]:_0x6fc2af[_0xf0fa('0x35')];_0x552b9e[_0xf0fa('0x3e')]=qs[_0xf0fa('0x3f')](_0x581f37[_0xf0fa('0x39')]['sort']);_0x552b9e[_0xf0fa('0x40')]=qs[_0xf0fa('0x41')](_['pick'](_0x581f37[_0xf0fa('0x39')],_0x6fc2af['filters']));if(_0x581f37[_0xf0fa('0x39')]['filter']){_0x552b9e['where']=_[_0xf0fa('0x43')](_0x552b9e['where'],{'$or':_['map'](_0x552b9e['attributes'],function(_0x590a5b){var _0x2c86d7={};_0x2c86d7[_0x590a5b]={'$like':'%'+_0x581f37['query'][_0xf0fa('0x42')]+'%'};return _0x2c86d7;})});}_0x552b9e=_[_0xf0fa('0x43')]({},_0x552b9e,_0x581f37['options']);return _0xb8aff2[_0xf0fa('0x59')](_0x552b9e);}})[_0xf0fa('0x1b')](function(_0x2d22b9){if(_0x2d22b9){_0x22c518=_0x2d22b9[_0xf0fa('0x4d')];if(!_0x581f37['query'][_0xf0fa('0x3b')]('nolimit')){_0x552b9e[_0xf0fa('0x3d')]=qs['limit'](_0x581f37[_0xf0fa('0x39')][_0xf0fa('0x3d')]);_0x552b9e[_0xf0fa('0x2c')]=qs[_0xf0fa('0x2c')](_0x581f37['query']['offset']);}return _0xb8aff2[_0xf0fa('0x59')](_0x552b9e);}})['then'](function(_0x197792){if(_0x197792){return _0x197792?{'count':_0x22c518,'rows':_0x197792}:null;}})[_0xf0fa('0x1b')](respondWithResult(_0xe1b0ff,null))[_0xf0fa('0x26')](handleError(_0xe1b0ff,null));};exports['getTags']=function(_0x142f4f,_0x52e8db,_0x1c8a56){var _0x2d4e61={};var _0x13f9d5={};var _0x52cf85;var _0x227fda;return db['DeskConfiguration'][_0xf0fa('0x56')]({'where':{'id':_0x142f4f[_0xf0fa('0x4c')]['id']}})['then'](handleEntityNotFound(_0x52e8db,null))[_0xf0fa('0x1b')](function(_0x47317b){if(_0x47317b){_0x52cf85=_0x47317b;_0x13f9d5[_0xf0fa('0x35')]=_[_0xf0fa('0x36')](db['Tag'][_0xf0fa('0x34')]);_0x13f9d5['query']=_['keys'](_0x142f4f[_0xf0fa('0x39')]);_0x13f9d5[_0xf0fa('0x41')]=_['intersection'](_0x13f9d5['model'],_0x13f9d5[_0xf0fa('0x39')]);_0x2d4e61[_0xf0fa('0x3a')]=_['intersection'](_0x13f9d5[_0xf0fa('0x35')],qs['fields'](_0x142f4f[_0xf0fa('0x39')][_0xf0fa('0x38')]));_0x2d4e61['attributes']=_0x2d4e61['attributes'][_0xf0fa('0x4d')]?_0x2d4e61['attributes']:_0x13f9d5[_0xf0fa('0x35')];_0x2d4e61[_0xf0fa('0x3e')]=qs[_0xf0fa('0x3f')](_0x142f4f['query']['sort']);_0x2d4e61[_0xf0fa('0x40')]=qs['filters'](_[_0xf0fa('0x55')](_0x142f4f[_0xf0fa('0x39')],_0x13f9d5['filters']));if(_0x142f4f[_0xf0fa('0x39')]['filter']){_0x2d4e61[_0xf0fa('0x40')]=_[_0xf0fa('0x43')](_0x2d4e61[_0xf0fa('0x40')],{'$or':_[_0xf0fa('0x44')](_0x2d4e61['attributes'],function(_0x54f5bb){var _0x13d530={};_0x13d530[_0x54f5bb]={'$like':'%'+_0x142f4f['query'][_0xf0fa('0x42')]+'%'};return _0x13d530;})});}_0x2d4e61=_['merge']({},_0x2d4e61,_0x142f4f['options']);return _0x52cf85[_0xf0fa('0x5a')](_0x2d4e61);}})['then'](function(_0x49e7ea){if(_0x49e7ea){_0x227fda=_0x49e7ea[_0xf0fa('0x4d')];if(!_0x142f4f['query']['hasOwnProperty'](_0xf0fa('0x3c'))){_0x2d4e61[_0xf0fa('0x3d')]=qs['limit'](_0x142f4f[_0xf0fa('0x39')]['limit']);_0x2d4e61['offset']=qs[_0xf0fa('0x2c')](_0x142f4f['query']['offset']);}return _0x52cf85[_0xf0fa('0x5a')](_0x2d4e61);}})['then'](function(_0x2b2608){if(_0x2b2608){return _0x2b2608?{'count':_0x227fda,'rows':_0x2b2608}:null;}})[_0xf0fa('0x1b')](respondWithResult(_0x52e8db,null))['catch'](handleError(_0x52e8db,null));};exports[_0xf0fa('0x5b')]=function(_0x41abf7,_0x2db9ee,_0x52f89e){if(_0x41abf7[_0xf0fa('0x50')]['id']){delete _0x41abf7[_0xf0fa('0x50')]['id'];}return db['DeskConfiguration']['findOne']({'where':{'id':_0x41abf7[_0xf0fa('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2db9ee,null))['then'](function(_0xca1bd){if(_0xca1bd){return _0xca1bd['setTags'](_0x41abf7['body'][_0xf0fa('0x5c')]||[]);}return null;})['then'](respondWithResult(_0x2db9ee,null))[_0xf0fa('0x26')](handleError(_0x2db9ee,null));};
\ No newline at end of file
+var _0x94b1=['request\x20sent','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','DeskConfiguration,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','destroy','stack','name','index','DeskConfiguration','rawAttributes','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','limit','where','filter','map','type','key','VIRTUAL','merge','options','includeAll','include','rows','show','find','create','body','update','params','findOne','order','sort','getFields','getSubjects','DeskField','pick','getDescriptions','getTags','Tag','setTags','ids','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then'];(function(_0x1a2e34,_0x2ec871){var _0x534d64=function(_0x5f14fa){while(--_0x5f14fa){_0x1a2e34['push'](_0x1a2e34['shift']());}};_0x534d64(++_0x2ec871);}(_0x94b1,0x102));var _0x194b=function(_0x44c19c,_0x4843f5){_0x44c19c=_0x44c19c-0x0;var _0x364e38=_0x94b1[_0x44c19c];return _0x364e38;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x194b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x194b('0x1'));var jsonpatch=require(_0x194b('0x2'));var rp=require(_0x194b('0x3'));var moment=require('moment');var BPromise=require(_0x194b('0x4'));var Mustache=require(_0x194b('0x5'));var util=require(_0x194b('0x6'));var path=require(_0x194b('0x7'));var sox=require('sox');var csv=require(_0x194b('0x8'));var ejs=require(_0x194b('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x194b('0xa'));var crypto=require(_0x194b('0xb'));var jsforce=require(_0x194b('0xc'));var deskjs=require(_0x194b('0xd'));var toCsv=require(_0x194b('0x8'));var querystring=require(_0x194b('0xe'));var Papa=require(_0x194b('0xf'));var Redis=require(_0x194b('0x10'));var authService=require(_0x194b('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x194b('0x12'));var logger=require(_0x194b('0x13'))(_0x194b('0x14'));var utils=require('../../config/utils');var config=require(_0x194b('0x15'));var db=require(_0x194b('0x16'))['db'];var jayson=require(_0x194b('0x17'));var client=jayson[_0x194b('0x18')][_0x194b('0x19')]({'port':0x232a});function checkPasswordPattern(_0x69d003,_0x394f1d,_0x382d38){if(_0x382d38){var _0xa7b256=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0xa7b256[_0x194b('0x1a')](_0x394f1d)){return _0x69d003;}else{throw new Error(_0x194b('0x1b'));}}else{return _0x69d003;}}function respondWithRpcPromise(_0xb5776f,_0x2a181c,_0x30e66e,_0x37638f){return new BPromise(function(_0x15bac5,_0x1efd3f){var _0x15e7de=_0x37638f||client;return _0x15e7de[_0x194b('0x1c')](_0xb5776f,_0x30e66e)[_0x194b('0x1d')](function(_0x21649e){logger['info']('DeskConfiguration,\x20%s,\x20%s',_0x2a181c,_0x194b('0x1e'));logger[_0x194b('0x1f')](_0x194b('0x20'),_0x2a181c,_0x194b('0x1e'),JSON[_0x194b('0x21')](_0x21649e));if(_0x21649e[_0x194b('0x22')]){if(_0x21649e[_0x194b('0x22')][_0x194b('0x23')]===0x1f4){logger['error'](_0x194b('0x24'),_0x2a181c,_0x21649e['error'][_0x194b('0x25')]);return _0x1efd3f(_0x21649e[_0x194b('0x22')][_0x194b('0x25')]);}logger[_0x194b('0x22')](_0x194b('0x24'),_0x2a181c,_0x21649e[_0x194b('0x22')][_0x194b('0x25')]);return _0x15bac5(_0x21649e['error'][_0x194b('0x25')]);}else{logger['info'](_0x194b('0x24'),_0x2a181c,_0x194b('0x1e'));_0x15bac5(_0x21649e[_0x194b('0x26')][_0x194b('0x25')]);}})[_0x194b('0x27')](function(_0x2a9776){logger[_0x194b('0x22')]('DeskConfiguration,\x20%s,\x20%s',_0x2a181c,_0x2a9776);_0x1efd3f(_0x2a9776);});});}function respondWithStatusCode(_0xb704de,_0x25eed2){_0x25eed2=_0x25eed2||0xcc;return function(_0x13fc16){if(_0x13fc16){return _0xb704de[_0x194b('0x28')](_0x25eed2);}return _0xb704de[_0x194b('0x29')](_0x25eed2)[_0x194b('0x2a')]();};}function respondWithResult(_0x9c08a7,_0x1f3d2c){_0x1f3d2c=_0x1f3d2c||0xc8;return function(_0x15a865){if(_0x15a865){return _0x9c08a7[_0x194b('0x29')](_0x1f3d2c)[_0x194b('0x2b')](_0x15a865);}};}function respondWithFilteredResult(_0x34e107,_0x3173e8){return function(_0x21d397){if(_0x21d397){var _0x29ffd1=_0x21d397[_0x194b('0x2c')],_0x2a44c6=_0x3173e8[_0x194b('0x2d')],_0x250741=_0x3173e8[_0x194b('0x2d')]+_0x3173e8['limit'],_0x15da96;if(_0x250741>=_0x29ffd1){_0x250741=_0x29ffd1;_0x15da96=0xc8;}else{_0x15da96=0xce;}_0x34e107[_0x194b('0x29')](_0x15da96);return _0x34e107[_0x194b('0x2e')](_0x194b('0x2f'),_0x2a44c6+'-'+_0x250741+'/'+_0x29ffd1)['json'](_0x21d397);}return null;};}function patchUpdates(_0x5d1052){return function(_0x2225e7){try{jsonpatch[_0x194b('0x30')](_0x2225e7,_0x5d1052,!![]);}catch(_0x42e690){return BPromise[_0x194b('0x31')](_0x42e690);}return _0x2225e7['save']();};}function saveUpdates(_0x251058,_0x342f93){return function(_0x25d42d){if(_0x25d42d){return _0x25d42d['update'](_0x251058)['then'](function(_0x1eb76e){return _0x1eb76e;});}return null;};}function removeEntity(_0x1fc9ed,_0x45bb82){return function(_0x472c36){if(_0x472c36){return _0x472c36[_0x194b('0x32')]()[_0x194b('0x1d')](function(){_0x1fc9ed[_0x194b('0x29')](0xcc)[_0x194b('0x2a')]();});}};}function handleEntityNotFound(_0x21915b,_0x3f3f62){return function(_0xb951d4){if(!_0xb951d4){_0x21915b['sendStatus'](0x194);}return _0xb951d4;};}function handleError(_0xf4c85b,_0x4f69a1){_0x4f69a1=_0x4f69a1||0x1f4;return function(_0x161192){logger[_0x194b('0x22')](_0x161192[_0x194b('0x33')]);if(_0x161192[_0x194b('0x34')]){delete _0x161192['name'];}_0xf4c85b['status'](_0x4f69a1)['send'](_0x161192);};}exports[_0x194b('0x35')]=function(_0x20e629,_0x195a48){var _0x5cf69e={},_0x312d2b={},_0x367c04={'count':0x0,'rows':[]};var _0x4cef3d=db[_0x194b('0x36')][_0x194b('0x37')];_0x312d2b[_0x194b('0x38')]=_['keys'](_0x4cef3d);_0x312d2b['query']=_[_0x194b('0x39')](_0x20e629['query']);_0x312d2b[_0x194b('0x3a')]=_[_0x194b('0x3b')](_0x312d2b[_0x194b('0x38')],_0x312d2b[_0x194b('0x3c')]);_0x5cf69e[_0x194b('0x3d')]=_[_0x194b('0x3b')](_0x312d2b[_0x194b('0x38')],qs[_0x194b('0x3e')](_0x20e629['query'][_0x194b('0x3e')]));_0x5cf69e[_0x194b('0x3d')]=_0x5cf69e['attributes'][_0x194b('0x3f')]?_0x5cf69e['attributes']:_0x312d2b[_0x194b('0x38')];if(!_0x20e629[_0x194b('0x3c')][_0x194b('0x40')](_0x194b('0x41'))){_0x5cf69e['limit']=qs['limit'](_0x20e629['query'][_0x194b('0x42')]);_0x5cf69e[_0x194b('0x2d')]=qs[_0x194b('0x2d')](_0x20e629['query'][_0x194b('0x2d')]);}_0x5cf69e['order']=qs['sort'](_0x20e629[_0x194b('0x3c')]['sort']);_0x5cf69e[_0x194b('0x43')]=qs['filters'](_['pick'](_0x20e629['query'],_0x312d2b[_0x194b('0x3a')]));if(_0x20e629['query'][_0x194b('0x44')]){_0x5cf69e[_0x194b('0x43')]=_['merge'](_0x5cf69e[_0x194b('0x43')],{'$or':_[_0x194b('0x45')](_0x4cef3d,function(_0x372e7e){if(_0x372e7e[_0x194b('0x46')][_0x194b('0x47')]!==_0x194b('0x48')){var _0x2bbe73={};_0x2bbe73[_0x372e7e['field']]={'$like':'%'+_0x20e629[_0x194b('0x3c')][_0x194b('0x44')]+'%'};return _0x2bbe73;}})});}_0x5cf69e=_[_0x194b('0x49')]({},_0x5cf69e,_0x20e629[_0x194b('0x4a')]);var _0x2e2504={'where':_0x5cf69e[_0x194b('0x43')]};return db['DeskConfiguration']['count'](_0x2e2504)[_0x194b('0x1d')](function(_0x1d8422){_0x367c04[_0x194b('0x2c')]=_0x1d8422;if(_0x20e629[_0x194b('0x3c')][_0x194b('0x4b')]){_0x5cf69e[_0x194b('0x4c')]=[{'all':!![]}];}return db[_0x194b('0x36')]['findAll'](_0x5cf69e);})[_0x194b('0x1d')](function(_0x1a3db0){_0x367c04[_0x194b('0x4d')]=_0x1a3db0;return _0x367c04;})['then'](respondWithFilteredResult(_0x195a48,_0x5cf69e))[_0x194b('0x27')](handleError(_0x195a48,null));};exports[_0x194b('0x4e')]=function(_0x3a4b7a,_0x541037){var _0x3e372e={'raw':![],'where':{'id':_0x3a4b7a['params']['id']}},_0x4a7c83={};_0x4a7c83['model']=_[_0x194b('0x39')](db[_0x194b('0x36')][_0x194b('0x37')]);_0x4a7c83[_0x194b('0x3c')]=_['keys'](_0x3a4b7a[_0x194b('0x3c')]);_0x4a7c83[_0x194b('0x3a')]=_['intersection'](_0x4a7c83['model'],_0x4a7c83[_0x194b('0x3c')]);_0x3e372e[_0x194b('0x3d')]=_[_0x194b('0x3b')](_0x4a7c83[_0x194b('0x38')],qs[_0x194b('0x3e')](_0x3a4b7a[_0x194b('0x3c')][_0x194b('0x3e')]));_0x3e372e[_0x194b('0x3d')]=_0x3e372e[_0x194b('0x3d')][_0x194b('0x3f')]?_0x3e372e['attributes']:_0x4a7c83[_0x194b('0x38')];if(_0x3a4b7a[_0x194b('0x3c')][_0x194b('0x4b')]){_0x3e372e['include']=[{'all':!![]}];}_0x3e372e=_[_0x194b('0x49')]({},_0x3e372e,_0x3a4b7a['options']);return db[_0x194b('0x36')][_0x194b('0x4f')](_0x3e372e)[_0x194b('0x1d')](handleEntityNotFound(_0x541037,null))[_0x194b('0x1d')](respondWithResult(_0x541037,null))[_0x194b('0x27')](handleError(_0x541037,null));};exports['create']=function(_0x1bbe25,_0x33684f){return db[_0x194b('0x36')][_0x194b('0x50')](_0x1bbe25[_0x194b('0x51')],{})[_0x194b('0x1d')](respondWithResult(_0x33684f,0xc9))['catch'](handleError(_0x33684f,null));};exports[_0x194b('0x52')]=function(_0x56e01f,_0x5a01d7){if(_0x56e01f[_0x194b('0x51')]['id']){delete _0x56e01f[_0x194b('0x51')]['id'];}return db[_0x194b('0x36')]['find']({'where':{'id':_0x56e01f['params']['id']}})['then'](handleEntityNotFound(_0x5a01d7,null))[_0x194b('0x1d')](saveUpdates(_0x56e01f[_0x194b('0x51')],null))['then'](respondWithResult(_0x5a01d7,null))[_0x194b('0x27')](handleError(_0x5a01d7,null));};exports[_0x194b('0x32')]=function(_0x2f92aa,_0x261c92){return db['DeskConfiguration'][_0x194b('0x4f')]({'where':{'id':_0x2f92aa[_0x194b('0x53')]['id']}})[_0x194b('0x1d')](handleEntityNotFound(_0x261c92,null))['then'](removeEntity(_0x261c92,null))[_0x194b('0x27')](handleError(_0x261c92,null));};exports['getFields']=function(_0x435c6a,_0x4c9478,_0x1f8f48){var _0x5582d8={};var _0x1dc889={};var _0x1a7180;var _0x2a8935;return db[_0x194b('0x36')][_0x194b('0x54')]({'where':{'id':_0x435c6a['params']['id']}})[_0x194b('0x1d')](handleEntityNotFound(_0x4c9478,null))['then'](function(_0x468d9d){if(_0x468d9d){_0x1a7180=_0x468d9d;_0x1dc889[_0x194b('0x38')]=_[_0x194b('0x39')](db['DeskField'][_0x194b('0x37')]);_0x1dc889[_0x194b('0x3c')]=_[_0x194b('0x39')](_0x435c6a[_0x194b('0x3c')]);_0x1dc889['filters']=_[_0x194b('0x3b')](_0x1dc889['model'],_0x1dc889[_0x194b('0x3c')]);_0x5582d8[_0x194b('0x3d')]=_[_0x194b('0x3b')](_0x1dc889[_0x194b('0x38')],qs['fields'](_0x435c6a['query'][_0x194b('0x3e')]));_0x5582d8[_0x194b('0x3d')]=_0x5582d8[_0x194b('0x3d')][_0x194b('0x3f')]?_0x5582d8[_0x194b('0x3d')]:_0x1dc889[_0x194b('0x38')];_0x5582d8[_0x194b('0x55')]=qs[_0x194b('0x56')](_0x435c6a[_0x194b('0x3c')][_0x194b('0x56')]);_0x5582d8[_0x194b('0x43')]=qs[_0x194b('0x3a')](_['pick'](_0x435c6a[_0x194b('0x3c')],_0x1dc889['filters']));if(_0x435c6a[_0x194b('0x3c')][_0x194b('0x44')]){_0x5582d8['where']=_[_0x194b('0x49')](_0x5582d8[_0x194b('0x43')],{'$or':_[_0x194b('0x45')](_0x5582d8[_0x194b('0x3d')],function(_0x45b16f){var _0x2c3d29={};_0x2c3d29[_0x45b16f]={'$like':'%'+_0x435c6a['query'][_0x194b('0x44')]+'%'};return _0x2c3d29;})});}_0x5582d8=_[_0x194b('0x49')]({},_0x5582d8,_0x435c6a[_0x194b('0x4a')]);return _0x1a7180[_0x194b('0x57')](_0x5582d8);}})[_0x194b('0x1d')](function(_0x8180d){if(_0x8180d){_0x2a8935=_0x8180d['length'];if(!_0x435c6a[_0x194b('0x3c')]['hasOwnProperty']('nolimit')){_0x5582d8['limit']=qs[_0x194b('0x42')](_0x435c6a[_0x194b('0x3c')][_0x194b('0x42')]);_0x5582d8[_0x194b('0x2d')]=qs['offset'](_0x435c6a[_0x194b('0x3c')][_0x194b('0x2d')]);}return _0x1a7180[_0x194b('0x57')](_0x5582d8);}})[_0x194b('0x1d')](function(_0x3b094d){if(_0x3b094d){return _0x3b094d?{'count':_0x2a8935,'rows':_0x3b094d}:null;}})['then'](respondWithResult(_0x4c9478,null))[_0x194b('0x27')](handleError(_0x4c9478,null));};exports[_0x194b('0x58')]=function(_0x751c2,_0x6d004,_0x218940){var _0x1f3cc2={};var _0x4cd288={};var _0x16ad56;var _0x5e3b7d;return db[_0x194b('0x36')][_0x194b('0x54')]({'where':{'id':_0x751c2[_0x194b('0x53')]['id']}})[_0x194b('0x1d')](handleEntityNotFound(_0x6d004,null))[_0x194b('0x1d')](function(_0x4455c9){if(_0x4455c9){_0x16ad56=_0x4455c9;_0x4cd288['model']=_[_0x194b('0x39')](db[_0x194b('0x59')][_0x194b('0x37')]);_0x4cd288[_0x194b('0x3c')]=_['keys'](_0x751c2[_0x194b('0x3c')]);_0x4cd288[_0x194b('0x3a')]=_['intersection'](_0x4cd288[_0x194b('0x38')],_0x4cd288[_0x194b('0x3c')]);_0x1f3cc2[_0x194b('0x3d')]=_[_0x194b('0x3b')](_0x4cd288[_0x194b('0x38')],qs[_0x194b('0x3e')](_0x751c2[_0x194b('0x3c')]['fields']));_0x1f3cc2[_0x194b('0x3d')]=_0x1f3cc2[_0x194b('0x3d')]['length']?_0x1f3cc2[_0x194b('0x3d')]:_0x4cd288[_0x194b('0x38')];_0x1f3cc2[_0x194b('0x55')]=qs[_0x194b('0x56')](_0x751c2[_0x194b('0x3c')]['sort']);_0x1f3cc2[_0x194b('0x43')]=qs[_0x194b('0x3a')](_[_0x194b('0x5a')](_0x751c2[_0x194b('0x3c')],_0x4cd288[_0x194b('0x3a')]));if(_0x751c2['query']['filter']){_0x1f3cc2[_0x194b('0x43')]=_[_0x194b('0x49')](_0x1f3cc2['where'],{'$or':_['map'](_0x1f3cc2[_0x194b('0x3d')],function(_0x8cfe){var _0x7f1a83={};_0x7f1a83[_0x8cfe]={'$like':'%'+_0x751c2['query'][_0x194b('0x44')]+'%'};return _0x7f1a83;})});}_0x1f3cc2=_[_0x194b('0x49')]({},_0x1f3cc2,_0x751c2[_0x194b('0x4a')]);return _0x16ad56['getSubjects'](_0x1f3cc2);}})['then'](function(_0x491d7c){if(_0x491d7c){_0x5e3b7d=_0x491d7c['length'];if(!_0x751c2[_0x194b('0x3c')][_0x194b('0x40')]('nolimit')){_0x1f3cc2['limit']=qs[_0x194b('0x42')](_0x751c2[_0x194b('0x3c')][_0x194b('0x42')]);_0x1f3cc2[_0x194b('0x2d')]=qs[_0x194b('0x2d')](_0x751c2[_0x194b('0x3c')][_0x194b('0x2d')]);}return _0x16ad56[_0x194b('0x58')](_0x1f3cc2);}})[_0x194b('0x1d')](function(_0x41637e){if(_0x41637e){return _0x41637e?{'count':_0x5e3b7d,'rows':_0x41637e}:null;}})['then'](respondWithResult(_0x6d004,null))['catch'](handleError(_0x6d004,null));};exports[_0x194b('0x5b')]=function(_0x3fb219,_0x3e801c,_0x19f6da){var _0x1fc483={};var _0x15ce4b={};var _0x24a7cb;var _0x2d1331;return db[_0x194b('0x36')][_0x194b('0x54')]({'where':{'id':_0x3fb219[_0x194b('0x53')]['id']}})[_0x194b('0x1d')](handleEntityNotFound(_0x3e801c,null))[_0x194b('0x1d')](function(_0x2afeb3){if(_0x2afeb3){_0x24a7cb=_0x2afeb3;_0x15ce4b['model']=_[_0x194b('0x39')](db['DeskField'][_0x194b('0x37')]);_0x15ce4b[_0x194b('0x3c')]=_['keys'](_0x3fb219[_0x194b('0x3c')]);_0x15ce4b['filters']=_[_0x194b('0x3b')](_0x15ce4b['model'],_0x15ce4b[_0x194b('0x3c')]);_0x1fc483[_0x194b('0x3d')]=_[_0x194b('0x3b')](_0x15ce4b[_0x194b('0x38')],qs[_0x194b('0x3e')](_0x3fb219[_0x194b('0x3c')][_0x194b('0x3e')]));_0x1fc483[_0x194b('0x3d')]=_0x1fc483[_0x194b('0x3d')][_0x194b('0x3f')]?_0x1fc483['attributes']:_0x15ce4b[_0x194b('0x38')];_0x1fc483['order']=qs['sort'](_0x3fb219[_0x194b('0x3c')]['sort']);_0x1fc483['where']=qs[_0x194b('0x3a')](_[_0x194b('0x5a')](_0x3fb219[_0x194b('0x3c')],_0x15ce4b[_0x194b('0x3a')]));if(_0x3fb219['query']['filter']){_0x1fc483[_0x194b('0x43')]=_[_0x194b('0x49')](_0x1fc483[_0x194b('0x43')],{'$or':_[_0x194b('0x45')](_0x1fc483[_0x194b('0x3d')],function(_0x4b2093){var _0xd1c8e7={};_0xd1c8e7[_0x4b2093]={'$like':'%'+_0x3fb219[_0x194b('0x3c')][_0x194b('0x44')]+'%'};return _0xd1c8e7;})});}_0x1fc483=_[_0x194b('0x49')]({},_0x1fc483,_0x3fb219[_0x194b('0x4a')]);return _0x24a7cb['getDescriptions'](_0x1fc483);}})[_0x194b('0x1d')](function(_0x2f1bca){if(_0x2f1bca){_0x2d1331=_0x2f1bca[_0x194b('0x3f')];if(!_0x3fb219[_0x194b('0x3c')][_0x194b('0x40')](_0x194b('0x41'))){_0x1fc483[_0x194b('0x42')]=qs[_0x194b('0x42')](_0x3fb219[_0x194b('0x3c')][_0x194b('0x42')]);_0x1fc483[_0x194b('0x2d')]=qs[_0x194b('0x2d')](_0x3fb219[_0x194b('0x3c')][_0x194b('0x2d')]);}return _0x24a7cb['getDescriptions'](_0x1fc483);}})['then'](function(_0x36ed55){if(_0x36ed55){return _0x36ed55?{'count':_0x2d1331,'rows':_0x36ed55}:null;}})[_0x194b('0x1d')](respondWithResult(_0x3e801c,null))[_0x194b('0x27')](handleError(_0x3e801c,null));};exports[_0x194b('0x5c')]=function(_0x22c728,_0xfa8f9e,_0x5855ef){var _0x31f96a={};var _0xe15e92={};var _0x28a791;var _0x4f57c2;return db[_0x194b('0x36')][_0x194b('0x54')]({'where':{'id':_0x22c728[_0x194b('0x53')]['id']}})[_0x194b('0x1d')](handleEntityNotFound(_0xfa8f9e,null))[_0x194b('0x1d')](function(_0x31a71f){if(_0x31a71f){_0x28a791=_0x31a71f;_0xe15e92[_0x194b('0x38')]=_[_0x194b('0x39')](db[_0x194b('0x5d')][_0x194b('0x37')]);_0xe15e92[_0x194b('0x3c')]=_[_0x194b('0x39')](_0x22c728[_0x194b('0x3c')]);_0xe15e92[_0x194b('0x3a')]=_[_0x194b('0x3b')](_0xe15e92[_0x194b('0x38')],_0xe15e92[_0x194b('0x3c')]);_0x31f96a['attributes']=_['intersection'](_0xe15e92[_0x194b('0x38')],qs[_0x194b('0x3e')](_0x22c728['query'][_0x194b('0x3e')]));_0x31f96a[_0x194b('0x3d')]=_0x31f96a[_0x194b('0x3d')][_0x194b('0x3f')]?_0x31f96a[_0x194b('0x3d')]:_0xe15e92[_0x194b('0x38')];_0x31f96a['order']=qs[_0x194b('0x56')](_0x22c728[_0x194b('0x3c')][_0x194b('0x56')]);_0x31f96a[_0x194b('0x43')]=qs['filters'](_[_0x194b('0x5a')](_0x22c728[_0x194b('0x3c')],_0xe15e92['filters']));if(_0x22c728[_0x194b('0x3c')]['filter']){_0x31f96a[_0x194b('0x43')]=_[_0x194b('0x49')](_0x31f96a[_0x194b('0x43')],{'$or':_[_0x194b('0x45')](_0x31f96a[_0x194b('0x3d')],function(_0x9ed846){var _0x330064={};_0x330064[_0x9ed846]={'$like':'%'+_0x22c728[_0x194b('0x3c')][_0x194b('0x44')]+'%'};return _0x330064;})});}_0x31f96a=_[_0x194b('0x49')]({},_0x31f96a,_0x22c728[_0x194b('0x4a')]);return _0x28a791[_0x194b('0x5c')](_0x31f96a);}})[_0x194b('0x1d')](function(_0x463f63){if(_0x463f63){_0x4f57c2=_0x463f63[_0x194b('0x3f')];if(!_0x22c728[_0x194b('0x3c')][_0x194b('0x40')]('nolimit')){_0x31f96a[_0x194b('0x42')]=qs[_0x194b('0x42')](_0x22c728['query']['limit']);_0x31f96a[_0x194b('0x2d')]=qs[_0x194b('0x2d')](_0x22c728['query'][_0x194b('0x2d')]);}return _0x28a791[_0x194b('0x5c')](_0x31f96a);}})[_0x194b('0x1d')](function(_0x11a9b5){if(_0x11a9b5){return _0x11a9b5?{'count':_0x4f57c2,'rows':_0x11a9b5}:null;}})[_0x194b('0x1d')](respondWithResult(_0xfa8f9e,null))[_0x194b('0x27')](handleError(_0xfa8f9e,null));};exports['setTags']=function(_0x584528,_0x5e40ce,_0x3edb24){if(_0x584528['body']['id']){delete _0x584528[_0x194b('0x51')]['id'];}return db[_0x194b('0x36')]['findOne']({'where':{'id':_0x584528[_0x194b('0x53')]['id']}})[_0x194b('0x1d')](handleEntityNotFound(_0x5e40ce,null))[_0x194b('0x1d')](function(_0x1100ac){if(_0x1100ac){return _0x1100ac[_0x194b('0x5e')](_0x584528['body'][_0x194b('0x5f')]||[]);}return null;})[_0x194b('0x1d')](respondWithResult(_0x5e40ce,null))[_0x194b('0x27')](handleError(_0x5e40ce,null));};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.model.js b/server/api/intDeskConfiguration/intDeskConfiguration.model.js
index 503c1d3..8f196eb 100644
--- a/server/api/intDeskConfiguration/intDeskConfiguration.model.js
+++ b/server/api/intDeskConfiguration/intDeskConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0e02=['./intDeskConfiguration.attributes','DeskConfiguration','int_desk_configurations','lodash','../../config/logger','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x4709c0,_0x3396c7){var _0x13348b=function(_0x426235){while(--_0x426235){_0x4709c0['push'](_0x4709c0['shift']());}};_0x13348b(++_0x3396c7);}(_0x0e02,0x161));var _0x20e0=function(_0x36a009,_0x2987a8){_0x36a009=_0x36a009-0x0;var _0x4c43b2=_0x0e02[_0x36a009];return _0x4c43b2;};'use strict';var _=require(_0x20e0('0x0'));var util=require('util');var logger=require(_0x20e0('0x1'))('api');var moment=require(_0x20e0('0x2'));var BPromise=require(_0x20e0('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x20e0('0x4'));var rimraf=require(_0x20e0('0x5'));var config=require(_0x20e0('0x6'));var attributes=require(_0x20e0('0x7'));module['exports']=function(_0x47bbee,_0xdc306b){return _0x47bbee['define'](_0x20e0('0x8'),attributes,{'tableName':_0x20e0('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x16e5=['moment','bluebird','request-promise','path','./intDeskConfiguration.attributes','exports','define','DeskConfiguration','lodash','util','../../config/logger','api'];(function(_0x16f5cf,_0x542b42){var _0xeecea0=function(_0x1e8dd2){while(--_0x1e8dd2){_0x16f5cf['push'](_0x16f5cf['shift']());}};_0xeecea0(++_0x542b42);}(_0x16e5,0x1ac));var _0x516e=function(_0x3a9661,_0x530b12){_0x3a9661=_0x3a9661-0x0;var _0x5bb119=_0x16e5[_0x3a9661];return _0x5bb119;};'use strict';var _=require(_0x516e('0x0'));var util=require(_0x516e('0x1'));var logger=require(_0x516e('0x2'))(_0x516e('0x3'));var moment=require(_0x516e('0x4'));var BPromise=require(_0x516e('0x5'));var rp=require(_0x516e('0x6'));var fs=require('fs');var path=require(_0x516e('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x516e('0x8'));module[_0x516e('0x9')]=function(_0x24fe2b,_0x43aa66){return _0x24fe2b[_0x516e('0xa')](_0x516e('0xb'),attributes,{'tableName':'int_desk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js b/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js
index bb594c7..50f12b6 100644
--- a/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js
+++ b/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c5a=['http','then','DeskConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise'];(function(_0x596fb3,_0x307c74){var _0x183346=function(_0xd44e03){while(--_0xd44e03){_0x596fb3['push'](_0x596fb3['shift']());}};_0x183346(++_0x307c74);}(_0x9c5a,0x1c3));var _0xa9c5=function(_0x177729,_0x18ef3e){_0x177729=_0x177729-0x0;var _0x296852=_0x9c5a[_0x177729];return _0x296852;};'use strict';var _=require(_0xa9c5('0x0'));var util=require(_0xa9c5('0x1'));var moment=require('moment');var BPromise=require(_0xa9c5('0x2'));var rs=require(_0xa9c5('0x3'));var fs=require('fs');var Redis=require(_0xa9c5('0x4'));var db=require(_0xa9c5('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa9c5('0x6'))(_0xa9c5('0x7'));var config=require('../../config/environment');var jayson=require(_0xa9c5('0x8'));var client=jayson['client'][_0xa9c5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3df556,_0x4cb597,_0x4b6db6){return new BPromise(function(_0x3d6b50,_0x16f331){return client['request'](_0x3df556,_0x4b6db6)[_0xa9c5('0xa')](function(_0x97f9e2){logger['info'](_0xa9c5('0xb'),_0x4cb597,_0xa9c5('0xc'));logger['debug']('DeskConfiguration,\x20%s,\x20%s,\x20%s',_0x4cb597,_0xa9c5('0xc'),JSON[_0xa9c5('0xd')](_0x97f9e2));if(_0x97f9e2[_0xa9c5('0xe')]){if(_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0xf')]===0x1f4){logger[_0xa9c5('0xe')](_0xa9c5('0xb'),_0x4cb597,_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0x10')]);return _0x16f331(_0x97f9e2[_0xa9c5('0xe')]['message']);}logger[_0xa9c5('0xe')](_0xa9c5('0xb'),_0x4cb597,_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0x10')]);return _0x3d6b50(_0x97f9e2[_0xa9c5('0xe')][_0xa9c5('0x10')]);}else{logger[_0xa9c5('0x11')](_0xa9c5('0xb'),_0x4cb597,_0xa9c5('0xc'));_0x3d6b50(_0x97f9e2[_0xa9c5('0x12')]['message']);}})[_0xa9c5('0x13')](function(_0xd85c32){logger[_0xa9c5('0xe')]('DeskConfiguration,\x20%s,\x20%s',_0x4cb597,_0xd85c32);_0x16f331(_0xd85c32);});});}
\ No newline at end of file
+var _0x1cb9=['error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','DeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x1cb9,0x14e));var _0x91cb=function(_0x14db94,_0x354225){_0x14db94=_0x14db94-0x0;var _0x14388d=_0x1cb9[_0x14db94];return _0x14388d;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var moment=require(_0x91cb('0x1'));var BPromise=require(_0x91cb('0x2'));var rs=require(_0x91cb('0x3'));var fs=require('fs');var Redis=require(_0x91cb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x91cb('0x5'));var logger=require(_0x91cb('0x6'))('rpc');var config=require(_0x91cb('0x7'));var jayson=require(_0x91cb('0x8'));var client=jayson[_0x91cb('0x9')][_0x91cb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3b9d98,_0x8f8a3b,_0x4c1f56){return new BPromise(function(_0x15c517,_0x5bda2f){return client[_0x91cb('0xb')](_0x3b9d98,_0x4c1f56)['then'](function(_0xa43e7a){logger[_0x91cb('0xc')](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));logger[_0x91cb('0xf')](_0x91cb('0x10'),_0x8f8a3b,_0x91cb('0xe'),JSON[_0x91cb('0x11')](_0xa43e7a));if(_0xa43e7a[_0x91cb('0x12')]){if(_0xa43e7a[_0x91cb('0x12')]['code']===0x1f4){logger[_0x91cb('0x12')](_0x91cb('0xd'),_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x5bda2f(_0xa43e7a[_0x91cb('0x12')][_0x91cb('0x13')]);}logger[_0x91cb('0x12')]('DeskConfiguration,\x20%s,\x20%s',_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x15c517(_0xa43e7a[_0x91cb('0x12')]['message']);}else{logger['info'](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));_0x15c517(_0xa43e7a[_0x91cb('0x14')]['message']);}})[_0x91cb('0x15')](function(_0x135890){logger['error'](_0x91cb('0xd'),_0x8f8a3b,_0x135890);_0x5bda2f(_0x135890);});});}
\ No newline at end of file
diff --git a/server/api/intDeskField/index.js b/server/api/intDeskField/index.js
index 0e59c49..0449941 100644
--- a/server/api/intDeskField/index.js
+++ b/server/api/intDeskField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdcd8=['util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','/:id','show','create','put','destroy','exports','multer'];(function(_0x1da527,_0x2dc953){var _0x40fc7c=function(_0x9949f5){while(--_0x9949f5){_0x1da527['push'](_0x1da527['shift']());}};_0x40fc7c(++_0x2dc953);}(_0xdcd8,0x1df));var _0x8dcd=function(_0x97bbfd,_0xd00fda){_0x97bbfd=_0x97bbfd-0x0;var _0x288aaa=_0xdcd8[_0x97bbfd];return _0x288aaa;};'use strict';var multer=require(_0x8dcd('0x0'));var util=require(_0x8dcd('0x1'));var path=require(_0x8dcd('0x2'));var timeout=require(_0x8dcd('0x3'));var express=require('express');var router=express[_0x8dcd('0x4')]();var auth=require(_0x8dcd('0x5'));var interaction=require(_0x8dcd('0x6'));var config=require('../../config/environment');var controller=require('./intDeskField.controller');router['get']('/',auth[_0x8dcd('0x7')](),controller[_0x8dcd('0x8')]);router[_0x8dcd('0x9')](_0x8dcd('0xa'),auth[_0x8dcd('0x7')](),controller[_0x8dcd('0xb')]);router['post']('/',auth[_0x8dcd('0x7')](),controller[_0x8dcd('0xc')]);router[_0x8dcd('0xd')](_0x8dcd('0xa'),auth[_0x8dcd('0x7')](),controller['update']);router['delete'](_0x8dcd('0xa'),auth['isAuthenticated'](),controller[_0x8dcd('0xe')]);module[_0x8dcd('0xf')]=router;
\ No newline at end of file
+var _0xa5f8=['exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskField.controller','index','isAuthenticated','show','post','create','put','delete','destroy'];(function(_0x525687,_0x1f61fe){var _0x2f57ca=function(_0x13a24a){while(--_0x13a24a){_0x525687['push'](_0x525687['shift']());}};_0x2f57ca(++_0x1f61fe);}(_0xa5f8,0x144));var _0x8a5f=function(_0x1761b0,_0x2e89ea){_0x1761b0=_0x1761b0-0x0;var _0x2bbe7a=_0xa5f8[_0x1761b0];return _0x2bbe7a;};'use strict';var multer=require(_0x8a5f('0x0'));var util=require('util');var path=require(_0x8a5f('0x1'));var timeout=require('connect-timeout');var express=require(_0x8a5f('0x2'));var router=express[_0x8a5f('0x3')]();var auth=require(_0x8a5f('0x4'));var interaction=require(_0x8a5f('0x5'));var config=require(_0x8a5f('0x6'));var controller=require(_0x8a5f('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x8a5f('0x8')]);router['get']('/:id',auth[_0x8a5f('0x9')](),controller[_0x8a5f('0xa')]);router[_0x8a5f('0xb')]('/',auth[_0x8a5f('0x9')](),controller[_0x8a5f('0xc')]);router[_0x8a5f('0xd')]('/:id',auth[_0x8a5f('0x9')](),controller['update']);router[_0x8a5f('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x8a5f('0xf')]);module[_0x8a5f('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/intDeskField/intDeskField.attributes.js b/server/api/intDeskField/intDeskField.attributes.js
index 5f6ba3f..797c2a6 100644
--- a/server/api/intDeskField/intDeskField.attributes.js
+++ b/server/api/intDeskField/intDeskField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2547=['variable','customVariable','keyValue','STRING','BOOLEAN','exports','ENUM','string'];(function(_0x4cbe11,_0x1ca892){var _0x443e65=function(_0x23df76){while(--_0x23df76){_0x4cbe11['push'](_0x4cbe11['shift']());}};_0x443e65(++_0x1ca892);}(_0x2547,0x1cd));var _0x7254=function(_0x93a29b,_0xfe2329){_0x93a29b=_0x93a29b-0x0;var _0x228d2e=_0x2547[_0x93a29b];return _0x228d2e;};'use strict';var Sequelize=require('sequelize');module[_0x7254('0x0')]={'type':{'type':Sequelize[_0x7254('0x1')](_0x7254('0x2'),_0x7254('0x3'),_0x7254('0x4'),_0x7254('0x5')),'defaultValue':_0x7254('0x2')},'content':{'type':Sequelize[_0x7254('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x7254('0x1')](_0x7254('0x2'),_0x7254('0x3'),_0x7254('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x7254('0x6')]},'nameField':{'type':Sequelize[_0x7254('0x6')]},'customField':{'type':Sequelize[_0x7254('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x9bde=['BOOLEAN','exports','string','customVariable','keyValue','STRING','ENUM'];(function(_0x22093a,_0xa7acf1){var _0x2f4989=function(_0x5bf12b){while(--_0x5bf12b){_0x22093a['push'](_0x22093a['shift']());}};_0x2f4989(++_0xa7acf1);}(_0x9bde,0xe1));var _0xe9bd=function(_0x13d91b,_0x30d38e){_0x13d91b=_0x13d91b-0x0;var _0x4c6160=_0x9bde[_0x13d91b];return _0x4c6160;};'use strict';var Sequelize=require('sequelize');module[_0xe9bd('0x0')]={'type':{'type':Sequelize['ENUM'](_0xe9bd('0x1'),'variable',_0xe9bd('0x2'),_0xe9bd('0x3')),'defaultValue':_0xe9bd('0x1')},'content':{'type':Sequelize[_0xe9bd('0x4')]},'key':{'type':Sequelize[_0xe9bd('0x4')]},'keyType':{'type':Sequelize[_0xe9bd('0x5')](_0xe9bd('0x1'),'variable',_0xe9bd('0x2'))},'keyContent':{'type':Sequelize[_0xe9bd('0x4')]},'idField':{'type':Sequelize[_0xe9bd('0x4')]},'nameField':{'type':Sequelize[_0xe9bd('0x4')]},'customField':{'type':Sequelize[_0xe9bd('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xe9bd('0x4')]}};
\ No newline at end of file
diff --git a/server/api/intDeskField/intDeskField.controller.js b/server/api/intDeskField/intDeskField.controller.js
index 1b5bf1f..d175e20 100644
--- a/server/api/intDeskField/intDeskField.controller.js
+++ b/server/api/intDeskField/intDeskField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbe45=['filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','key','field','filter','options','includeAll','include','findAll','rows','show','find','catch','body','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','send','index','DeskField','rawAttributes','model','keys','query'];(function(_0x57a5e5,_0x18b0d6){var _0x354012=function(_0x34d87b){while(--_0x34d87b){_0x57a5e5['push'](_0x57a5e5['shift']());}};_0x354012(++_0x18b0d6);}(_0xbe45,0xf0));var _0x5be4=function(_0x3a10c8,_0x1b22a6){_0x3a10c8=_0x3a10c8-0x0;var _0x2d29a2=_0xbe45[_0x3a10c8];return _0x2d29a2;};'use strict';var pdf=require(_0x5be4('0x0'));var emlformat=require(_0x5be4('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x5be4('0x2'));var jsonpatch=require(_0x5be4('0x3'));var rp=require(_0x5be4('0x4'));var moment=require(_0x5be4('0x5'));var BPromise=require(_0x5be4('0x6'));var Mustache=require(_0x5be4('0x7'));var util=require('util');var path=require(_0x5be4('0x8'));var sox=require(_0x5be4('0x9'));var csv=require(_0x5be4('0xa'));var ejs=require(_0x5be4('0xb'));var fs=require('fs');var _=require(_0x5be4('0xc'));var squel=require(_0x5be4('0xd'));var crypto=require(_0x5be4('0xe'));var jsforce=require(_0x5be4('0xf'));var deskjs=require(_0x5be4('0x10'));var toCsv=require(_0x5be4('0xa'));var querystring=require(_0x5be4('0x11'));var Papa=require(_0x5be4('0x12'));var Redis=require(_0x5be4('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x5be4('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x5be4('0x15'));var utils=require('../../config/utils');var config=require(_0x5be4('0x16'));var db=require(_0x5be4('0x17'))['db'];function respondWithStatusCode(_0x4c9df0,_0x1397ec){_0x1397ec=_0x1397ec||0xcc;return function(_0x43a60f){if(_0x43a60f){return _0x4c9df0[_0x5be4('0x18')](_0x1397ec);}return _0x4c9df0['status'](_0x1397ec)[_0x5be4('0x19')]();};}function respondWithResult(_0x4a84c5,_0x246d2e){_0x246d2e=_0x246d2e||0xc8;return function(_0x2afee8){if(_0x2afee8){return _0x4a84c5[_0x5be4('0x1a')](_0x246d2e)[_0x5be4('0x1b')](_0x2afee8);}};}function respondWithFilteredResult(_0x246499,_0x3b3dd1){return function(_0x3980fc){if(_0x3980fc){var _0x5ebe65=_0x3980fc[_0x5be4('0x1c')],_0x3e830e=_0x3b3dd1[_0x5be4('0x1d')],_0x8466a7=_0x3b3dd1[_0x5be4('0x1d')]+_0x3b3dd1[_0x5be4('0x1e')],_0x1d7db7;if(_0x8466a7>=_0x5ebe65){_0x8466a7=_0x5ebe65;_0x1d7db7=0xc8;}else{_0x1d7db7=0xce;}_0x246499[_0x5be4('0x1a')](_0x1d7db7);return _0x246499['set'](_0x5be4('0x1f'),_0x3e830e+'-'+_0x8466a7+'/'+_0x5ebe65)['json'](_0x3980fc);}return null;};}function patchUpdates(_0x5172d2){return function(_0x3ab388){try{jsonpatch[_0x5be4('0x20')](_0x3ab388,_0x5172d2,!![]);}catch(_0x4cce93){return BPromise[_0x5be4('0x21')](_0x4cce93);}return _0x3ab388[_0x5be4('0x22')]();};}function saveUpdates(_0x4d2a47,_0x4af89d){return function(_0x2690be){if(_0x2690be){return _0x2690be[_0x5be4('0x23')](_0x4d2a47)['then'](function(_0x553f59){return _0x553f59;});}return null;};}function removeEntity(_0x9bdadd,_0x132489){return function(_0x2843e3){if(_0x2843e3){return _0x2843e3[_0x5be4('0x24')]()[_0x5be4('0x25')](function(){_0x9bdadd['status'](0xcc)[_0x5be4('0x19')]();});}};}function handleEntityNotFound(_0x51d7a7,_0x242005){return function(_0x12b9cd){if(!_0x12b9cd){_0x51d7a7['sendStatus'](0x194);}return _0x12b9cd;};}function handleError(_0xf74e0c,_0x2ed4b6){_0x2ed4b6=_0x2ed4b6||0x1f4;return function(_0x560c57){logger[_0x5be4('0x26')](_0x560c57[_0x5be4('0x27')]);if(_0x560c57[_0x5be4('0x28')]){delete _0x560c57[_0x5be4('0x28')];}_0xf74e0c[_0x5be4('0x1a')](_0x2ed4b6)[_0x5be4('0x29')](_0x560c57);};}exports[_0x5be4('0x2a')]=function(_0x5b49ea,_0x50e5be){var _0x51584f={},_0x29b1f4={},_0x39430a={'count':0x0,'rows':[]};var _0x5c489e=db[_0x5be4('0x2b')][_0x5be4('0x2c')];_0x29b1f4[_0x5be4('0x2d')]=_[_0x5be4('0x2e')](_0x5c489e);_0x29b1f4[_0x5be4('0x2f')]=_[_0x5be4('0x2e')](_0x5b49ea['query']);_0x29b1f4[_0x5be4('0x30')]=_[_0x5be4('0x31')](_0x29b1f4['model'],_0x29b1f4[_0x5be4('0x2f')]);_0x51584f['attributes']=_[_0x5be4('0x31')](_0x29b1f4[_0x5be4('0x2d')],qs['fields'](_0x5b49ea[_0x5be4('0x2f')]['fields']));_0x51584f['attributes']=_0x51584f[_0x5be4('0x32')][_0x5be4('0x33')]?_0x51584f[_0x5be4('0x32')]:_0x29b1f4[_0x5be4('0x2d')];if(!_0x5b49ea[_0x5be4('0x2f')][_0x5be4('0x34')](_0x5be4('0x35'))){_0x51584f[_0x5be4('0x1e')]=qs[_0x5be4('0x1e')](_0x5b49ea[_0x5be4('0x2f')][_0x5be4('0x1e')]);_0x51584f[_0x5be4('0x1d')]=qs['offset'](_0x5b49ea['query'][_0x5be4('0x1d')]);}_0x51584f[_0x5be4('0x36')]=qs[_0x5be4('0x37')](_0x5b49ea[_0x5be4('0x2f')]['sort']);_0x51584f[_0x5be4('0x38')]=qs['filters'](_[_0x5be4('0x39')](_0x5b49ea['query'],_0x29b1f4[_0x5be4('0x30')]));if(_0x5b49ea[_0x5be4('0x2f')]['filter']){_0x51584f['where']=_[_0x5be4('0x3a')](_0x51584f['where'],{'$or':_['map'](_0x5c489e,function(_0x1b1ee9){if(_0x1b1ee9[_0x5be4('0x3b')][_0x5be4('0x3c')]!=='VIRTUAL'){var _0x3dc4f9={};_0x3dc4f9[_0x1b1ee9[_0x5be4('0x3d')]]={'$like':'%'+_0x5b49ea['query'][_0x5be4('0x3e')]+'%'};return _0x3dc4f9;}})});}_0x51584f=_[_0x5be4('0x3a')]({},_0x51584f,_0x5b49ea[_0x5be4('0x3f')]);var _0x2f8442={'where':_0x51584f['where']};return db[_0x5be4('0x2b')][_0x5be4('0x1c')](_0x2f8442)[_0x5be4('0x25')](function(_0x428f20){_0x39430a[_0x5be4('0x1c')]=_0x428f20;if(_0x5b49ea[_0x5be4('0x2f')][_0x5be4('0x40')]){_0x51584f[_0x5be4('0x41')]=[{'all':!![]}];}return db['DeskField'][_0x5be4('0x42')](_0x51584f);})[_0x5be4('0x25')](function(_0x348c30){_0x39430a[_0x5be4('0x43')]=_0x348c30;return _0x39430a;})[_0x5be4('0x25')](respondWithFilteredResult(_0x50e5be,_0x51584f))['catch'](handleError(_0x50e5be,null));};exports[_0x5be4('0x44')]=function(_0x344411,_0x5ba52e){var _0x2b64be={'raw':!![],'where':{'id':_0x344411['params']['id']}},_0xe44f9={};_0xe44f9[_0x5be4('0x2d')]=_[_0x5be4('0x2e')](db[_0x5be4('0x2b')][_0x5be4('0x2c')]);_0xe44f9[_0x5be4('0x2f')]=_[_0x5be4('0x2e')](_0x344411[_0x5be4('0x2f')]);_0xe44f9[_0x5be4('0x30')]=_[_0x5be4('0x31')](_0xe44f9['model'],_0xe44f9[_0x5be4('0x2f')]);_0x2b64be['attributes']=_[_0x5be4('0x31')](_0xe44f9[_0x5be4('0x2d')],qs['fields'](_0x344411[_0x5be4('0x2f')]['fields']));_0x2b64be['attributes']=_0x2b64be[_0x5be4('0x32')][_0x5be4('0x33')]?_0x2b64be[_0x5be4('0x32')]:_0xe44f9[_0x5be4('0x2d')];if(_0x344411[_0x5be4('0x2f')][_0x5be4('0x40')]){_0x2b64be[_0x5be4('0x41')]=[{'all':!![]}];}_0x2b64be=_['merge']({},_0x2b64be,_0x344411[_0x5be4('0x3f')]);return db['DeskField'][_0x5be4('0x45')](_0x2b64be)['then'](handleEntityNotFound(_0x5ba52e,null))[_0x5be4('0x25')](respondWithResult(_0x5ba52e,null))[_0x5be4('0x46')](handleError(_0x5ba52e,null));};exports['create']=function(_0xf1f992,_0x7432ab){return db[_0x5be4('0x2b')]['create'](_0xf1f992[_0x5be4('0x47')],{})[_0x5be4('0x25')](respondWithResult(_0x7432ab,0xc9))['catch'](handleError(_0x7432ab,null));};exports[_0x5be4('0x23')]=function(_0x4d9bbb,_0x509a62){if(_0x4d9bbb[_0x5be4('0x47')]['id']){delete _0x4d9bbb[_0x5be4('0x47')]['id'];}return db['DeskField'][_0x5be4('0x45')]({'where':{'id':_0x4d9bbb['params']['id']}})['then'](handleEntityNotFound(_0x509a62,null))[_0x5be4('0x25')](saveUpdates(_0x4d9bbb[_0x5be4('0x47')],null))[_0x5be4('0x25')](respondWithResult(_0x509a62,null))['catch'](handleError(_0x509a62,null));};exports['destroy']=function(_0x378ae7,_0x2fb7cd){return db[_0x5be4('0x2b')][_0x5be4('0x45')]({'where':{'id':_0x378ae7['params']['id']}})[_0x5be4('0x25')](handleEntityNotFound(_0x2fb7cd,null))[_0x5be4('0x25')](removeEntity(_0x2fb7cd,null))['catch'](handleError(_0x2fb7cd,null));};
\ No newline at end of file
+var _0x5793=['then','destroy','sendStatus','error','stack','name','index','DeskField','rawAttributes','model','keys','query','filters','intersection','attributes','fields','nolimit','order','sort','where','filter','merge','type','VIRTUAL','field','options','include','rows','catch','params','length','includeAll','find','create','body','html-pdf','eml-format','rimraf','zip-dir','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','end','count','offset','limit','set','Content-Range','json','apply','save','update'];(function(_0x553150,_0x589ff3){var _0x18193d=function(_0x3a5ae6){while(--_0x3a5ae6){_0x553150['push'](_0x553150['shift']());}};_0x18193d(++_0x589ff3);}(_0x5793,0xb1));var _0x3579=function(_0x44233b,_0x5bfd95){_0x44233b=_0x44233b-0x0;var _0x239a36=_0x5793[_0x44233b];return _0x239a36;};'use strict';var pdf=require(_0x3579('0x0'));var emlformat=require(_0x3579('0x1'));var rimraf=require(_0x3579('0x2'));var zipdir=require(_0x3579('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x3579('0x4'));var Mustache=require(_0x3579('0x5'));var util=require(_0x3579('0x6'));var path=require(_0x3579('0x7'));var sox=require(_0x3579('0x8'));var csv=require('to-csv');var ejs=require(_0x3579('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x3579('0xa'));var crypto=require(_0x3579('0xb'));var jsforce=require(_0x3579('0xc'));var deskjs=require(_0x3579('0xd'));var toCsv=require(_0x3579('0xe'));var querystring=require(_0x3579('0xf'));var Papa=require(_0x3579('0x10'));var Redis=require(_0x3579('0x11'));var authService=require(_0x3579('0x12'));var qs=require(_0x3579('0x13'));var hardwareService=require(_0x3579('0x14'));var logger=require(_0x3579('0x15'))('api');var utils=require(_0x3579('0x16'));var config=require(_0x3579('0x17'));var db=require(_0x3579('0x18'))['db'];function respondWithStatusCode(_0x2bddda,_0x2465f7){_0x2465f7=_0x2465f7||0xcc;return function(_0x2bd955){if(_0x2bd955){return _0x2bddda['sendStatus'](_0x2465f7);}return _0x2bddda[_0x3579('0x19')](_0x2465f7)[_0x3579('0x1a')]();};}function respondWithResult(_0x5105ba,_0x358d68){_0x358d68=_0x358d68||0xc8;return function(_0x42d40f){if(_0x42d40f){return _0x5105ba[_0x3579('0x19')](_0x358d68)['json'](_0x42d40f);}};}function respondWithFilteredResult(_0xa8ed,_0x14ec99){return function(_0x33c400){if(_0x33c400){var _0x58405b=_0x33c400[_0x3579('0x1b')],_0x56696c=_0x14ec99[_0x3579('0x1c')],_0x41903b=_0x14ec99[_0x3579('0x1c')]+_0x14ec99[_0x3579('0x1d')],_0x256518;if(_0x41903b>=_0x58405b){_0x41903b=_0x58405b;_0x256518=0xc8;}else{_0x256518=0xce;}_0xa8ed[_0x3579('0x19')](_0x256518);return _0xa8ed[_0x3579('0x1e')](_0x3579('0x1f'),_0x56696c+'-'+_0x41903b+'/'+_0x58405b)[_0x3579('0x20')](_0x33c400);}return null;};}function patchUpdates(_0x2145f0){return function(_0x553f9f){try{jsonpatch[_0x3579('0x21')](_0x553f9f,_0x2145f0,!![]);}catch(_0x11c8d7){return BPromise['reject'](_0x11c8d7);}return _0x553f9f[_0x3579('0x22')]();};}function saveUpdates(_0x4e27a7,_0x6789c8){return function(_0x477107){if(_0x477107){return _0x477107[_0x3579('0x23')](_0x4e27a7)[_0x3579('0x24')](function(_0x5d8660){return _0x5d8660;});}return null;};}function removeEntity(_0x2e2020,_0x491bf7){return function(_0x1deada){if(_0x1deada){return _0x1deada[_0x3579('0x25')]()[_0x3579('0x24')](function(){_0x2e2020[_0x3579('0x19')](0xcc)[_0x3579('0x1a')]();});}};}function handleEntityNotFound(_0xe9265b,_0x20f88){return function(_0x1b3327){if(!_0x1b3327){_0xe9265b[_0x3579('0x26')](0x194);}return _0x1b3327;};}function handleError(_0xc3573a,_0x9b1fc0){_0x9b1fc0=_0x9b1fc0||0x1f4;return function(_0x22a57b){logger[_0x3579('0x27')](_0x22a57b[_0x3579('0x28')]);if(_0x22a57b[_0x3579('0x29')]){delete _0x22a57b[_0x3579('0x29')];}_0xc3573a[_0x3579('0x19')](_0x9b1fc0)['send'](_0x22a57b);};}exports[_0x3579('0x2a')]=function(_0x529512,_0x3108c3){var _0x42bc83={},_0x2d7f93={},_0x159e0f={'count':0x0,'rows':[]};var _0x484e1e=db[_0x3579('0x2b')][_0x3579('0x2c')];_0x2d7f93[_0x3579('0x2d')]=_[_0x3579('0x2e')](_0x484e1e);_0x2d7f93[_0x3579('0x2f')]=_[_0x3579('0x2e')](_0x529512[_0x3579('0x2f')]);_0x2d7f93[_0x3579('0x30')]=_[_0x3579('0x31')](_0x2d7f93[_0x3579('0x2d')],_0x2d7f93['query']);_0x42bc83[_0x3579('0x32')]=_[_0x3579('0x31')](_0x2d7f93[_0x3579('0x2d')],qs[_0x3579('0x33')](_0x529512['query'][_0x3579('0x33')]));_0x42bc83['attributes']=_0x42bc83[_0x3579('0x32')]['length']?_0x42bc83[_0x3579('0x32')]:_0x2d7f93['model'];if(!_0x529512[_0x3579('0x2f')]['hasOwnProperty'](_0x3579('0x34'))){_0x42bc83['limit']=qs[_0x3579('0x1d')](_0x529512[_0x3579('0x2f')]['limit']);_0x42bc83[_0x3579('0x1c')]=qs['offset'](_0x529512[_0x3579('0x2f')][_0x3579('0x1c')]);}_0x42bc83[_0x3579('0x35')]=qs[_0x3579('0x36')](_0x529512[_0x3579('0x2f')][_0x3579('0x36')]);_0x42bc83[_0x3579('0x37')]=qs[_0x3579('0x30')](_['pick'](_0x529512[_0x3579('0x2f')],_0x2d7f93[_0x3579('0x30')]));if(_0x529512[_0x3579('0x2f')][_0x3579('0x38')]){_0x42bc83[_0x3579('0x37')]=_[_0x3579('0x39')](_0x42bc83[_0x3579('0x37')],{'$or':_['map'](_0x484e1e,function(_0x148edf){if(_0x148edf[_0x3579('0x3a')]['key']!==_0x3579('0x3b')){var _0x1fe43a={};_0x1fe43a[_0x148edf[_0x3579('0x3c')]]={'$like':'%'+_0x529512[_0x3579('0x2f')][_0x3579('0x38')]+'%'};return _0x1fe43a;}})});}_0x42bc83=_[_0x3579('0x39')]({},_0x42bc83,_0x529512[_0x3579('0x3d')]);var _0x2994ff={'where':_0x42bc83['where']};return db['DeskField'][_0x3579('0x1b')](_0x2994ff)[_0x3579('0x24')](function(_0x2240b7){_0x159e0f[_0x3579('0x1b')]=_0x2240b7;if(_0x529512[_0x3579('0x2f')]['includeAll']){_0x42bc83[_0x3579('0x3e')]=[{'all':!![]}];}return db['DeskField']['findAll'](_0x42bc83);})[_0x3579('0x24')](function(_0x4dd80d){_0x159e0f[_0x3579('0x3f')]=_0x4dd80d;return _0x159e0f;})['then'](respondWithFilteredResult(_0x3108c3,_0x42bc83))[_0x3579('0x40')](handleError(_0x3108c3,null));};exports['show']=function(_0xc94106,_0x1010c9){var _0x3980ac={'raw':!![],'where':{'id':_0xc94106[_0x3579('0x41')]['id']}},_0xa942af={};_0xa942af[_0x3579('0x2d')]=_[_0x3579('0x2e')](db[_0x3579('0x2b')]['rawAttributes']);_0xa942af[_0x3579('0x2f')]=_[_0x3579('0x2e')](_0xc94106['query']);_0xa942af[_0x3579('0x30')]=_[_0x3579('0x31')](_0xa942af[_0x3579('0x2d')],_0xa942af[_0x3579('0x2f')]);_0x3980ac[_0x3579('0x32')]=_[_0x3579('0x31')](_0xa942af[_0x3579('0x2d')],qs[_0x3579('0x33')](_0xc94106[_0x3579('0x2f')][_0x3579('0x33')]));_0x3980ac[_0x3579('0x32')]=_0x3980ac[_0x3579('0x32')][_0x3579('0x42')]?_0x3980ac[_0x3579('0x32')]:_0xa942af[_0x3579('0x2d')];if(_0xc94106[_0x3579('0x2f')][_0x3579('0x43')]){_0x3980ac[_0x3579('0x3e')]=[{'all':!![]}];}_0x3980ac=_[_0x3579('0x39')]({},_0x3980ac,_0xc94106['options']);return db[_0x3579('0x2b')][_0x3579('0x44')](_0x3980ac)[_0x3579('0x24')](handleEntityNotFound(_0x1010c9,null))[_0x3579('0x24')](respondWithResult(_0x1010c9,null))['catch'](handleError(_0x1010c9,null));};exports[_0x3579('0x45')]=function(_0x504742,_0x5071d4){return db['DeskField'][_0x3579('0x45')](_0x504742[_0x3579('0x46')],{})[_0x3579('0x24')](respondWithResult(_0x5071d4,0xc9))[_0x3579('0x40')](handleError(_0x5071d4,null));};exports[_0x3579('0x23')]=function(_0x430b3d,_0x4c7ff1){if(_0x430b3d['body']['id']){delete _0x430b3d[_0x3579('0x46')]['id'];}return db['DeskField'][_0x3579('0x44')]({'where':{'id':_0x430b3d[_0x3579('0x41')]['id']}})['then'](handleEntityNotFound(_0x4c7ff1,null))[_0x3579('0x24')](saveUpdates(_0x430b3d[_0x3579('0x46')],null))[_0x3579('0x24')](respondWithResult(_0x4c7ff1,null))[_0x3579('0x40')](handleError(_0x4c7ff1,null));};exports[_0x3579('0x25')]=function(_0x21d03c,_0x4c36a4){return db['DeskField'][_0x3579('0x44')]({'where':{'id':_0x21d03c[_0x3579('0x41')]['id']}})[_0x3579('0x24')](handleEntityNotFound(_0x4c36a4,null))[_0x3579('0x24')](removeEntity(_0x4c36a4,null))[_0x3579('0x40')](handleError(_0x4c36a4,null));};
\ No newline at end of file
diff --git a/server/api/intDeskField/intDeskField.model.js b/server/api/intDeskField/intDeskField.model.js
index 0d9d22e..48eaf83 100644
--- a/server/api/intDeskField/intDeskField.model.js
+++ b/server/api/intDeskField/intDeskField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0aac=['lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','DeskField','int_desk_fields','desk_unique_index','idField'];(function(_0x2cef86,_0xbae0a6){var _0x46dfd6=function(_0x52e464){while(--_0x52e464){_0x2cef86['push'](_0x2cef86['shift']());}};_0x46dfd6(++_0xbae0a6);}(_0x0aac,0x11e));var _0xc0aa=function(_0x2b076b,_0x455a17){_0x2b076b=_0x2b076b-0x0;var _0x98ef20=_0x0aac[_0x2b076b];return _0x98ef20;};'use strict';var _=require(_0xc0aa('0x0'));var util=require('util');var logger=require(_0xc0aa('0x1'))('api');var moment=require(_0xc0aa('0x2'));var BPromise=require(_0xc0aa('0x3'));var rp=require(_0xc0aa('0x4'));var fs=require('fs');var path=require(_0xc0aa('0x5'));var rimraf=require(_0xc0aa('0x6'));var config=require(_0xc0aa('0x7'));var attributes=require('./intDeskField.attributes');module['exports']=function(_0x8705a0,_0x8f7f13){return _0x8705a0[_0xc0aa('0x8')](_0xc0aa('0x9'),attributes,{'tableName':_0xc0aa('0xa'),'paranoid':![],'indexes':[{'name':_0xc0aa('0xb'),'fields':[_0xc0aa('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xacef=['../../config/logger','api','request-promise','path','rimraf','../../config/environment','./intDeskField.attributes','define','DeskField','desk_unique_index','idField','FieldId','lodash','util'];(function(_0x59a569,_0x18b35d){var _0x4be845=function(_0x4c01f7){while(--_0x4c01f7){_0x59a569['push'](_0x59a569['shift']());}};_0x4be845(++_0x18b35d);}(_0xacef,0xec));var _0xface=function(_0x4edfad,_0x4dd50e){_0x4edfad=_0x4edfad-0x0;var _0x3548ec=_0xacef[_0x4edfad];return _0x3548ec;};'use strict';var _=require(_0xface('0x0'));var util=require(_0xface('0x1'));var logger=require(_0xface('0x2'))(_0xface('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xface('0x4'));var fs=require('fs');var path=require(_0xface('0x5'));var rimraf=require(_0xface('0x6'));var config=require(_0xface('0x7'));var attributes=require(_0xface('0x8'));module['exports']=function(_0x3d47e1,_0x4bf9b3){return _0x3d47e1[_0xface('0x9')](_0xface('0xa'),attributes,{'tableName':'int_desk_fields','paranoid':![],'indexes':[{'name':_0xface('0xb'),'fields':[_0xface('0xc'),_0xface('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intDeskField/intDeskField.rpc.js b/server/api/intDeskField/intDeskField.rpc.js
index c373079..0cb4321 100644
--- a/server/api/intDeskField/intDeskField.rpc.js
+++ b/server/api/intDeskField/intDeskField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2750=['jayson/promise','http','request','then','DeskField,\x20%s,\x20%s','debug','DeskField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x32f94f,_0x3012a5){var _0x40d3cf=function(_0x27e04f){while(--_0x27e04f){_0x32f94f['push'](_0x32f94f['shift']());}};_0x40d3cf(++_0x3012a5);}(_0x2750,0x13b));var _0x0275=function(_0x727233,_0x1b633c){_0x727233=_0x727233-0x0;var _0x18aeec=_0x2750[_0x727233];return _0x18aeec;};'use strict';var _=require(_0x0275('0x0'));var util=require('util');var moment=require(_0x0275('0x1'));var BPromise=require(_0x0275('0x2'));var rs=require(_0x0275('0x3'));var fs=require('fs');var Redis=require(_0x0275('0x4'));var db=require(_0x0275('0x5'))['db'];var utils=require(_0x0275('0x6'));var logger=require(_0x0275('0x7'))(_0x0275('0x8'));var config=require(_0x0275('0x9'));var jayson=require(_0x0275('0xa'));var client=jayson['client'][_0x0275('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2421fd,_0x2fa0eb,_0x2e4b5c){return new BPromise(function(_0x4dffd1,_0x1f7c4a){return client[_0x0275('0xc')](_0x2421fd,_0x2e4b5c)[_0x0275('0xd')](function(_0x5e0e4a){logger['info'](_0x0275('0xe'),_0x2fa0eb,'request\x20sent');logger[_0x0275('0xf')](_0x0275('0x10'),_0x2fa0eb,_0x0275('0x11'),JSON[_0x0275('0x12')](_0x5e0e4a));if(_0x5e0e4a[_0x0275('0x13')]){if(_0x5e0e4a['error'][_0x0275('0x14')]===0x1f4){logger[_0x0275('0x13')](_0x0275('0xe'),_0x2fa0eb,_0x5e0e4a['error']['message']);return _0x1f7c4a(_0x5e0e4a[_0x0275('0x13')][_0x0275('0x15')]);}logger[_0x0275('0x13')](_0x0275('0xe'),_0x2fa0eb,_0x5e0e4a[_0x0275('0x13')][_0x0275('0x15')]);return _0x4dffd1(_0x5e0e4a['error'][_0x0275('0x15')]);}else{logger[_0x0275('0x16')]('DeskField,\x20%s,\x20%s',_0x2fa0eb,_0x0275('0x11'));_0x4dffd1(_0x5e0e4a[_0x0275('0x17')]['message']);}})[_0x0275('0x18')](function(_0x31c76b){logger['error']('DeskField,\x20%s,\x20%s',_0x2fa0eb,_0x31c76b);_0x1f7c4a(_0x31c76b);});});}
\ No newline at end of file
+var _0x6f0d=['DeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','then','info','DeskField,\x20%s,\x20%s','request\x20sent'];(function(_0x106f6f,_0x207628){var _0x3961a1=function(_0x38f8a1){while(--_0x38f8a1){_0x106f6f['push'](_0x106f6f['shift']());}};_0x3961a1(++_0x207628);}(_0x6f0d,0x16c));var _0xd6f0=function(_0xcef563,_0x582ca3){_0xcef563=_0xcef563-0x0;var _0x4b2b47=_0x6f0d[_0xcef563];return _0x4b2b47;};'use strict';var _=require('lodash');var util=require(_0xd6f0('0x0'));var moment=require(_0xd6f0('0x1'));var BPromise=require(_0xd6f0('0x2'));var rs=require(_0xd6f0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd6f0('0x4'))['db'];var utils=require(_0xd6f0('0x5'));var logger=require(_0xd6f0('0x6'))(_0xd6f0('0x7'));var config=require(_0xd6f0('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd6f0('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0xe21ac4,_0x1af29c,_0x8b89a9){return new BPromise(function(_0x1a48a0,_0x4c4916){return client['request'](_0xe21ac4,_0x8b89a9)[_0xd6f0('0xa')](function(_0x272c4e){logger[_0xd6f0('0xb')](_0xd6f0('0xc'),_0x1af29c,_0xd6f0('0xd'));logger['debug'](_0xd6f0('0xe'),_0x1af29c,_0xd6f0('0xd'),JSON[_0xd6f0('0xf')](_0x272c4e));if(_0x272c4e[_0xd6f0('0x10')]){if(_0x272c4e['error'][_0xd6f0('0x11')]===0x1f4){logger[_0xd6f0('0x10')](_0xd6f0('0xc'),_0x1af29c,_0x272c4e[_0xd6f0('0x10')][_0xd6f0('0x12')]);return _0x4c4916(_0x272c4e[_0xd6f0('0x10')][_0xd6f0('0x12')]);}logger[_0xd6f0('0x10')](_0xd6f0('0xc'),_0x1af29c,_0x272c4e['error'][_0xd6f0('0x12')]);return _0x1a48a0(_0x272c4e[_0xd6f0('0x10')]['message']);}else{logger[_0xd6f0('0xb')]('DeskField,\x20%s,\x20%s',_0x1af29c,_0xd6f0('0xd'));_0x1a48a0(_0x272c4e[_0xd6f0('0x13')][_0xd6f0('0x12')]);}})[_0xd6f0('0x14')](function(_0x64ff5f){logger[_0xd6f0('0x10')](_0xd6f0('0xc'),_0x1af29c,_0x64ff5f);_0x4c4916(_0x64ff5f);});});}
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/index.js b/server/api/intDynamics365Account/index.js
index 31acf9c..b861c9f 100644
--- a/server/api/intDynamics365Account/index.js
+++ b/server/api/intDynamics365Account/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2210=['index','get','/:id','isAuthenticated','show','/:id/configurations','/:id/fields','create','post','put','update','delete','destroy','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service'];(function(_0x43330e,_0x3ddaae){var _0x9fedf4=function(_0x3b0708){while(--_0x3b0708){_0x43330e['push'](_0x43330e['shift']());}};_0x9fedf4(++_0x3ddaae);}(_0x2210,0x1da));var _0x0221=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x2210[_0x297fd3];return _0x2af381;};'use strict';var multer=require(_0x0221('0x0'));var util=require(_0x0221('0x1'));var path=require(_0x0221('0x2'));var timeout=require('connect-timeout');var express=require(_0x0221('0x3'));var router=express['Router']();var auth=require(_0x0221('0x4'));var interaction=require(_0x0221('0x5'));var config=require('../../config/environment');var controller=require('./intDynamics365Account.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x0221('0x6')]);router[_0x0221('0x7')](_0x0221('0x8'),auth[_0x0221('0x9')](),controller[_0x0221('0xa')]);router['get'](_0x0221('0xb'),auth[_0x0221('0x9')](),controller['getConfigurations']);router[_0x0221('0x7')](_0x0221('0xc'),auth['isAuthenticated'](),controller['getFields']);router['post']('/',auth['isAuthenticated'](),controller[_0x0221('0xd')]);router[_0x0221('0xe')](_0x0221('0xb'),auth[_0x0221('0x9')](),controller['addConfiguration']);router[_0x0221('0xf')](_0x0221('0x8'),auth['isAuthenticated'](),controller[_0x0221('0x10')]);router[_0x0221('0x11')]('/:id',auth[_0x0221('0x9')](),controller[_0x0221('0x12')]);module[_0x0221('0x13')]=router;
\ No newline at end of file
+var _0xb7e2=['util','path','connect-timeout','../../components/auth/service','../../config/environment','./intDynamics365Account.controller','get','index','/:id','isAuthenticated','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','destroy','exports','multer'];(function(_0x1695db,_0x337e35){var _0x1dc552=function(_0x47498f){while(--_0x47498f){_0x1695db['push'](_0x1695db['shift']());}};_0x1dc552(++_0x337e35);}(_0xb7e2,0x16f));var _0x2b7e=function(_0x5c4b1e,_0xa7236e){_0x5c4b1e=_0x5c4b1e-0x0;var _0x880648=_0xb7e2[_0x5c4b1e];return _0x880648;};'use strict';var multer=require(_0x2b7e('0x0'));var util=require(_0x2b7e('0x1'));var path=require(_0x2b7e('0x2'));var timeout=require(_0x2b7e('0x3'));var express=require('express');var router=express['Router']();var auth=require(_0x2b7e('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x2b7e('0x5'));var controller=require(_0x2b7e('0x6'));router[_0x2b7e('0x7')]('/',auth['isAuthenticated'](),controller[_0x2b7e('0x8')]);router[_0x2b7e('0x7')](_0x2b7e('0x9'),auth[_0x2b7e('0xa')](),controller[_0x2b7e('0xb')]);router[_0x2b7e('0x7')](_0x2b7e('0xc'),auth['isAuthenticated'](),controller[_0x2b7e('0xd')]);router[_0x2b7e('0x7')](_0x2b7e('0xe'),auth[_0x2b7e('0xa')](),controller[_0x2b7e('0xf')]);router[_0x2b7e('0x10')]('/',auth[_0x2b7e('0xa')](),controller[_0x2b7e('0x11')]);router['post']('/:id/configurations',auth[_0x2b7e('0xa')](),controller[_0x2b7e('0x12')]);router[_0x2b7e('0x13')](_0x2b7e('0x9'),auth['isAuthenticated'](),controller[_0x2b7e('0x14')]);router['delete'](_0x2b7e('0x9'),auth[_0x2b7e('0xa')](),controller[_0x2b7e('0x15')]);module[_0x2b7e('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.attributes.js b/server/api/intDynamics365Account/intDynamics365Account.attributes.js
index 6ff714a..22208ca 100644
--- a/server/api/intDynamics365Account/intDynamics365Account.attributes.js
+++ b/server/api/intDynamics365Account/intDynamics365Account.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1821=['sequelize','exports','STRING'];(function(_0x4f3dee,_0x46bb90){var _0x291aad=function(_0x3ca8f5){while(--_0x3ca8f5){_0x4f3dee['push'](_0x4f3dee['shift']());}};_0x291aad(++_0x46bb90);}(_0x1821,0x162));var _0x1182=function(_0x4566e7,_0x2dd55d){_0x4566e7=_0x4566e7-0x0;var _0xda451f=_0x1821[_0x4566e7];return _0xda451f;};'use strict';var Sequelize=require(_0x1182('0x0'));module[_0x1182('0x1')]={'name':{'type':Sequelize[_0x1182('0x2')]},'username':{'type':Sequelize[_0x1182('0x2')]},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x1182('0x2')]},'tenantId':{'type':Sequelize[_0x1182('0x2')]},'clientId':{'type':Sequelize[_0x1182('0x2')]},'clientSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize[_0x1182('0x2')]},'description':{'type':Sequelize[_0x1182('0x2')]}};
\ No newline at end of file
+var _0xa997=['STRING','sequelize','exports'];(function(_0x35b18a,_0x6b2fbe){var _0x4db1bd=function(_0x389e62){while(--_0x389e62){_0x35b18a['push'](_0x35b18a['shift']());}};_0x4db1bd(++_0x6b2fbe);}(_0xa997,0x145));var _0x7a99=function(_0x3bcf9e,_0x148a5d){_0x3bcf9e=_0x3bcf9e-0x0;var _0x1bb37c=_0xa997[_0x3bcf9e];return _0x1bb37c;};'use strict';var Sequelize=require(_0x7a99('0x0'));module[_0x7a99('0x1')]={'name':{'type':Sequelize[_0x7a99('0x2')]},'username':{'type':Sequelize[_0x7a99('0x2')]},'password':{'type':Sequelize[_0x7a99('0x2')]},'remoteUri':{'type':Sequelize[_0x7a99('0x2')]},'tenantId':{'type':Sequelize[_0x7a99('0x2')]},'clientId':{'type':Sequelize[_0x7a99('0x2')]},'clientSecret':{'type':Sequelize[_0x7a99('0x2')]},'serverUrl':{'type':Sequelize[_0x7a99('0x2')]},'description':{'type':Sequelize[_0x7a99('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.controller.js b/server/api/intDynamics365Account/intDynamics365Account.controller.js
index 1e901ed..e7e0dcd 100644
--- a/server/api/intDynamics365Account/intDynamics365Account.controller.js
+++ b/server/api/intDynamics365Account/intDynamics365Account.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0715=['papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','count','offset','limit','set','json','apply','reject','update','stack','name','send','index','rawAttributes','model','keys','query','attributes','intersection','fields','nolimit','order','sort','filters','filter','where','map','VIRTUAL','Dynamics365Account','includeAll','include','rows','show','merge','options','find','create','body','destroy','getConfigurations','params','Dynamics365Configuration','length','pick','findOne','type','Descriptions','getDescriptions','channel','Dynamics365Field','Subjects','ticketType','incident','Incident','PhoneCall','title','description','customerid','ownerid','caseorigincode','subject','regardingobjectid','directioncode','phonecall_activity_parties','accountidname','accountidyominame','actualserviceunits','billedserviceunits','contactidname','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdonbehalfbyname','createdonbehalfbyyominame','customeridname','customeridtype','customeridyominame','entitlementidname','entityimage_timestamp','entityimage_url','escalatedon','exchangerate','firstresponsebykpiidname','followupby','influencescore','lastonholdtime','masteridname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame','modifiedon','modifiedonbehalfbyname','msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents','onholdtime','overriddencreatedon','owneridtype','owneridyominame','primarycontactidname','primarycontactidyominame','prioritycodename','productserialnumber','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','sentimentvalue','slainvokedidname','slaname','statecode','statuscode','subjectidname','ticketnumber','timezoneruleversionnumber','transactioncurrencyidname','traversedpath','utcconversiontimezonecode','versionnumber','username','remoteUri','tenantId','clientId','clientSecret','slice','substring','lastIndexOf','%s/api/data/v9.0/','https://login.microsoftonline.com/','password','GET','4.0','value','MetadataId','EntityDefinitions(','Attributes','remove','LogicalName','@odata.type','PicklistAttributeMetadata','isNil','BooleanAttributeMetadata','forEach','StringAttributeMetadata','DoubleAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','MemoAttributeMetadata','DateTimeAttributeMetadata','StatusAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','push','concat','log','Dynamics365\x20error:\x20','Wrong\x20credentials','statusCode',')/Attributes(','Bearer\x20','OptionSet','Options','Label','Value','DisplayName',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','UserLocalizedLabel','true','FalseOption','false',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','squel','crypto','desk.js','querystring'];(function(_0x34bf97,_0xc60f9d){var _0x292719=function(_0x31354e){while(--_0x31354e){_0x34bf97['push'](_0x34bf97['shift']());}};_0x292719(++_0xc60f9d);}(_0x0715,0xce));var _0x5071=function(_0x175160,_0x3979c5){_0x175160=_0x175160-0x0;var _0x47e443=_0x0715[_0x175160];return _0x47e443;};'use strict';var pdf=require(_0x5071('0x0'));var emlformat=require(_0x5071('0x1'));var rimraf=require(_0x5071('0x2'));var zipdir=require(_0x5071('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5071('0x4'));var moment=require(_0x5071('0x5'));var BPromise=require(_0x5071('0x6'));var Mustache=require(_0x5071('0x7'));var util=require(_0x5071('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x5071('0x9'));var ejs=require(_0x5071('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x5071('0xb'));var crypto=require(_0x5071('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x5071('0xd'));var toCsv=require(_0x5071('0x9'));var querystring=require(_0x5071('0xe'));var Papa=require(_0x5071('0xf'));var Redis=require(_0x5071('0x10'));var authService=require(_0x5071('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x5071('0x12'));var logger=require(_0x5071('0x13'))(_0x5071('0x14'));var utils=require(_0x5071('0x15'));var config=require(_0x5071('0x16'));var db=require(_0x5071('0x17'))['db'];var integrations=require(_0x5071('0x18'));var jayson=require(_0x5071('0x19'));var client=jayson[_0x5071('0x1a')][_0x5071('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x3bfa2e,_0x2658b7,_0x4491d0){if(_0x4491d0){var _0x3864db=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3864db[_0x5071('0x1c')](_0x2658b7)){return _0x3bfa2e;}else{throw new Error(_0x5071('0x1d'));}}else{return _0x3bfa2e;}}function respondWithRpcPromise(_0x4b3700,_0x3810ff,_0xea7d07,_0x1845a6){return new BPromise(function(_0x33b370,_0x586cff){var _0x3bc016=_0x1845a6||client;return _0x3bc016[_0x5071('0x1e')](_0x4b3700,_0xea7d07)[_0x5071('0x1f')](function(_0x5f3474){logger[_0x5071('0x20')](_0x5071('0x21'),_0x3810ff,_0x5071('0x22'));logger['debug']('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x3810ff,'request\x20sent',JSON[_0x5071('0x23')](_0x5f3474));if(_0x5f3474['error']){if(_0x5f3474[_0x5071('0x24')][_0x5071('0x25')]===0x1f4){logger['error'](_0x5071('0x21'),_0x3810ff,_0x5f3474[_0x5071('0x24')][_0x5071('0x26')]);return _0x586cff(_0x5f3474['error'][_0x5071('0x26')]);}logger[_0x5071('0x24')](_0x5071('0x21'),_0x3810ff,_0x5f3474[_0x5071('0x24')][_0x5071('0x26')]);return _0x33b370(_0x5f3474[_0x5071('0x24')]['message']);}else{logger[_0x5071('0x20')](_0x5071('0x21'),_0x3810ff,_0x5071('0x22'));_0x33b370(_0x5f3474[_0x5071('0x27')]['message']);}})[_0x5071('0x28')](function(_0x3b58d7){logger['error'](_0x5071('0x21'),_0x3810ff,_0x3b58d7);_0x586cff(_0x3b58d7);});});}function respondWithStatusCode(_0x1a60f7,_0xc4b638){_0xc4b638=_0xc4b638||0xcc;return function(_0x334a4f){if(_0x334a4f){return _0x1a60f7[_0x5071('0x29')](_0xc4b638);}return _0x1a60f7[_0x5071('0x2a')](_0xc4b638)[_0x5071('0x2b')]();};}function respondWithResult(_0x399a6d,_0x556579){_0x556579=_0x556579||0xc8;return function(_0x168bce){if(_0x168bce){return _0x399a6d['status'](_0x556579)['json'](_0x168bce);}};}function respondWithFilteredResult(_0xdcd3bd,_0x37c32d){return function(_0x4e9ed4){if(_0x4e9ed4){var _0x2d1e72=_0x4e9ed4[_0x5071('0x2c')],_0x4a66dc=_0x37c32d[_0x5071('0x2d')],_0x5ebc99=_0x37c32d[_0x5071('0x2d')]+_0x37c32d[_0x5071('0x2e')],_0x459b28;if(_0x5ebc99>=_0x2d1e72){_0x5ebc99=_0x2d1e72;_0x459b28=0xc8;}else{_0x459b28=0xce;}_0xdcd3bd[_0x5071('0x2a')](_0x459b28);return _0xdcd3bd[_0x5071('0x2f')]('Content-Range',_0x4a66dc+'-'+_0x5ebc99+'/'+_0x2d1e72)[_0x5071('0x30')](_0x4e9ed4);}return null;};}function patchUpdates(_0x2436d2){return function(_0x5c682d){try{jsonpatch[_0x5071('0x31')](_0x5c682d,_0x2436d2,!![]);}catch(_0x4e908b){return BPromise[_0x5071('0x32')](_0x4e908b);}return _0x5c682d['save']();};}function saveUpdates(_0xb19c3c,_0x59a7e4){return function(_0x34a7fb){if(_0x34a7fb){return _0x34a7fb[_0x5071('0x33')](_0xb19c3c)['then'](function(_0xa2520e){return _0xa2520e;});}return null;};}function removeEntity(_0x306510,_0x2af728){return function(_0x3c6f16){if(_0x3c6f16){return _0x3c6f16['destroy']()[_0x5071('0x1f')](function(){_0x306510[_0x5071('0x2a')](0xcc)[_0x5071('0x2b')]();});}};}function handleEntityNotFound(_0x4d611e,_0x4576b6){return function(_0x545281){if(!_0x545281){_0x4d611e[_0x5071('0x29')](0x194);}return _0x545281;};}function handleError(_0x1bc61a,_0x5cdffe){_0x5cdffe=_0x5cdffe||0x1f4;return function(_0x4d30f9){logger[_0x5071('0x24')](_0x4d30f9[_0x5071('0x34')]);if(_0x4d30f9[_0x5071('0x35')]){delete _0x4d30f9[_0x5071('0x35')];}_0x1bc61a[_0x5071('0x2a')](_0x5cdffe)[_0x5071('0x36')](_0x4d30f9);};}exports[_0x5071('0x37')]=function(_0x4958c0,_0x4742f1){var _0x4228c7={},_0x96c89f={},_0x38a595={'count':0x0,'rows':[]};var _0x2f55d9=db['Dynamics365Account'][_0x5071('0x38')];_0x96c89f[_0x5071('0x39')]=_['keys'](_0x2f55d9);_0x96c89f['query']=_[_0x5071('0x3a')](_0x4958c0[_0x5071('0x3b')]);_0x96c89f['filters']=_['intersection'](_0x96c89f[_0x5071('0x39')],_0x96c89f[_0x5071('0x3b')]);_0x4228c7[_0x5071('0x3c')]=_[_0x5071('0x3d')](_0x96c89f['model'],qs[_0x5071('0x3e')](_0x4958c0[_0x5071('0x3b')][_0x5071('0x3e')]));_0x4228c7['attributes']=_0x4228c7[_0x5071('0x3c')]['length']?_0x4228c7[_0x5071('0x3c')]:_0x96c89f[_0x5071('0x39')];if(!_0x4958c0['query']['hasOwnProperty'](_0x5071('0x3f'))){_0x4228c7[_0x5071('0x2e')]=qs[_0x5071('0x2e')](_0x4958c0[_0x5071('0x3b')]['limit']);_0x4228c7[_0x5071('0x2d')]=qs['offset'](_0x4958c0[_0x5071('0x3b')]['offset']);}_0x4228c7[_0x5071('0x40')]=qs[_0x5071('0x41')](_0x4958c0[_0x5071('0x3b')][_0x5071('0x41')]);_0x4228c7['where']=qs[_0x5071('0x42')](_['pick'](_0x4958c0['query'],_0x96c89f['filters']));if(_0x4958c0[_0x5071('0x3b')][_0x5071('0x43')]){_0x4228c7[_0x5071('0x44')]=_['merge'](_0x4228c7[_0x5071('0x44')],{'$or':_[_0x5071('0x45')](_0x2f55d9,function(_0x4bac2a){if(_0x4bac2a['type']['key']!==_0x5071('0x46')){var _0x52a203={};_0x52a203[_0x4bac2a['field']]={'$like':'%'+_0x4958c0['query'][_0x5071('0x43')]+'%'};return _0x52a203;}})});}_0x4228c7=_['merge']({},_0x4228c7,_0x4958c0['options']);var _0x43d05={'where':_0x4228c7[_0x5071('0x44')]};return db[_0x5071('0x47')][_0x5071('0x2c')](_0x43d05)[_0x5071('0x1f')](function(_0x4d774d){_0x38a595[_0x5071('0x2c')]=_0x4d774d;if(_0x4958c0['query'][_0x5071('0x48')]){_0x4228c7[_0x5071('0x49')]=[{'all':!![]}];}return db[_0x5071('0x47')]['findAll'](_0x4228c7);})[_0x5071('0x1f')](function(_0x46bbca){_0x38a595[_0x5071('0x4a')]=_0x46bbca;return _0x38a595;})[_0x5071('0x1f')](respondWithFilteredResult(_0x4742f1,_0x4228c7))[_0x5071('0x28')](handleError(_0x4742f1,null));};exports[_0x5071('0x4b')]=function(_0x380488,_0x5dd869){var _0x203934={'raw':![],'where':{'id':_0x380488['params']['id']}},_0x18064a={};_0x18064a[_0x5071('0x39')]=_[_0x5071('0x3a')](db[_0x5071('0x47')][_0x5071('0x38')]);_0x18064a[_0x5071('0x3b')]=_[_0x5071('0x3a')](_0x380488[_0x5071('0x3b')]);_0x18064a[_0x5071('0x42')]=_[_0x5071('0x3d')](_0x18064a['model'],_0x18064a[_0x5071('0x3b')]);_0x203934[_0x5071('0x3c')]=_[_0x5071('0x3d')](_0x18064a['model'],qs[_0x5071('0x3e')](_0x380488[_0x5071('0x3b')][_0x5071('0x3e')]));_0x203934[_0x5071('0x3c')]=_0x203934[_0x5071('0x3c')]['length']?_0x203934[_0x5071('0x3c')]:_0x18064a['model'];if(_0x380488[_0x5071('0x3b')][_0x5071('0x48')]){_0x203934[_0x5071('0x49')]=[{'all':!![]}];}_0x203934=_[_0x5071('0x4c')]({},_0x203934,_0x380488[_0x5071('0x4d')]);return db[_0x5071('0x47')][_0x5071('0x4e')](_0x203934)[_0x5071('0x1f')](handleEntityNotFound(_0x5dd869,null))[_0x5071('0x1f')](respondWithResult(_0x5dd869,null))['catch'](handleError(_0x5dd869,null));};exports['create']=function(_0x4c6903,_0x409981){return db[_0x5071('0x47')][_0x5071('0x4f')](_0x4c6903[_0x5071('0x50')],{})[_0x5071('0x1f')](respondWithResult(_0x409981,0xc9))['catch'](handleError(_0x409981,null));};exports[_0x5071('0x33')]=function(_0x1eae49,_0x51220d){if(_0x1eae49['body']['id']){delete _0x1eae49[_0x5071('0x50')]['id'];}return db['Dynamics365Account'][_0x5071('0x4e')]({'where':{'id':_0x1eae49['params']['id']}})[_0x5071('0x1f')](handleEntityNotFound(_0x51220d,null))[_0x5071('0x1f')](saveUpdates(_0x1eae49['body'],null))[_0x5071('0x1f')](respondWithResult(_0x51220d,null))[_0x5071('0x28')](handleError(_0x51220d,null));};exports[_0x5071('0x51')]=function(_0x4da9cf,_0x5acf9b){return db[_0x5071('0x47')][_0x5071('0x4e')]({'where':{'id':_0x4da9cf['params']['id']}})['then'](handleEntityNotFound(_0x5acf9b,null))[_0x5071('0x1f')](removeEntity(_0x5acf9b,null))['catch'](handleError(_0x5acf9b,null));};exports[_0x5071('0x52')]=function(_0x501509,_0x44cdb9,_0xb3a2a7){var _0x57caa3={};var _0x29ee4d={};var _0x2e3151;var _0x10a441;return db[_0x5071('0x47')]['findOne']({'where':{'id':_0x501509[_0x5071('0x53')]['id']}})[_0x5071('0x1f')](handleEntityNotFound(_0x44cdb9,null))[_0x5071('0x1f')](function(_0x4d5416){if(_0x4d5416){_0x2e3151=_0x4d5416;_0x29ee4d[_0x5071('0x39')]=_[_0x5071('0x3a')](db[_0x5071('0x54')][_0x5071('0x38')]);_0x29ee4d[_0x5071('0x3b')]=_['keys'](_0x501509['query']);_0x29ee4d[_0x5071('0x42')]=_['intersection'](_0x29ee4d[_0x5071('0x39')],_0x29ee4d['query']);_0x57caa3[_0x5071('0x3c')]=_[_0x5071('0x3d')](_0x29ee4d['model'],qs[_0x5071('0x3e')](_0x501509[_0x5071('0x3b')][_0x5071('0x3e')]));_0x57caa3['attributes']=_0x57caa3[_0x5071('0x3c')][_0x5071('0x55')]?_0x57caa3[_0x5071('0x3c')]:_0x29ee4d[_0x5071('0x39')];_0x57caa3[_0x5071('0x40')]=qs[_0x5071('0x41')](_0x501509[_0x5071('0x3b')]['sort']);_0x57caa3[_0x5071('0x44')]=qs['filters'](_[_0x5071('0x56')](_0x501509[_0x5071('0x3b')],_0x29ee4d[_0x5071('0x42')]));if(_0x501509['query'][_0x5071('0x43')]){_0x57caa3['where']=_[_0x5071('0x4c')](_0x57caa3[_0x5071('0x44')],{'$or':_[_0x5071('0x45')](_0x57caa3['attributes'],function(_0x23ef56){var _0x36aa7f={};_0x36aa7f[_0x23ef56]={'$like':'%'+_0x501509[_0x5071('0x3b')][_0x5071('0x43')]+'%'};return _0x36aa7f;})});}_0x57caa3=_[_0x5071('0x4c')]({},_0x57caa3,_0x501509['options']);return _0x2e3151[_0x5071('0x52')](_0x57caa3);}})[_0x5071('0x1f')](function(_0x2c89a6){if(_0x2c89a6){_0x10a441=_0x2c89a6['length'];if(!_0x501509[_0x5071('0x3b')]['hasOwnProperty'](_0x5071('0x3f'))){_0x57caa3['limit']=qs[_0x5071('0x2e')](_0x501509[_0x5071('0x3b')][_0x5071('0x2e')]);_0x57caa3[_0x5071('0x2d')]=qs[_0x5071('0x2d')](_0x501509[_0x5071('0x3b')]['offset']);}return _0x2e3151['getConfigurations'](_0x57caa3);}})[_0x5071('0x1f')](function(_0x3f70fc){if(_0x3f70fc){return _0x3f70fc?{'count':_0x10a441,'rows':_0x3f70fc}:null;}})['then'](respondWithResult(_0x44cdb9,null))[_0x5071('0x28')](handleError(_0x44cdb9,null));};exports['addConfiguration']=function(_0x1069c4,_0x4d5b8d,_0x3d788b){if(_0x1069c4[_0x5071('0x50')]['id']){delete _0x1069c4[_0x5071('0x50')]['id'];}return db['Dynamics365Account'][_0x5071('0x57')]({'where':{'id':_0x1069c4[_0x5071('0x53')]['id']}})[_0x5071('0x1f')](handleEntityNotFound(_0x4d5b8d,null))['then'](function(_0x2653eb){if(_0x2653eb){_0x1069c4['body']['AccountId']=_0x2653eb['id'];_0x1069c4['body']['Subjects']=integrations['getSubjects'](_0x1069c4[_0x5071('0x50')]['channel'],_0x1069c4[_0x5071('0x50')][_0x5071('0x58')]);_0x1069c4['body'][_0x5071('0x59')]=integrations[_0x5071('0x5a')](_0x1069c4[_0x5071('0x50')][_0x5071('0x5b')],_0x1069c4[_0x5071('0x50')][_0x5071('0x58')]);return db['Dynamics365Configuration'][_0x5071('0x4f')](_0x1069c4[_0x5071('0x50')],{'include':[{'model':db[_0x5071('0x5c')],'as':_0x5071('0x5d')},{'model':db[_0x5071('0x5c')],'as':_0x5071('0x59')}]});}return null;})[_0x5071('0x1f')](respondWithResult(_0x4d5b8d,null))['catch'](handleError(_0x4d5b8d,null));};exports['getFields']=function(_0x18ddb0,_0x4de0e,_0x6cbab6){var _0x1061e9=_0x18ddb0[_0x5071('0x3b')][_0x5071('0x5e')];var _0x42a693=_0x1061e9===_0x5071('0x5f')?_0x5071('0x60'):_0x5071('0x61');var _0x23c081='';var _0x11c966='';var _0x5dc97d='';var _0x448a3f='';var _0x2103e6='';var _0x20a5e3='';var _0x13e6d1='';var _0x229240='';var _0x42ab54=[_0x5071('0x62'),_0x5071('0x63'),_0x5071('0x64'),_0x5071('0x65'),_0x5071('0x66'),_0x5071('0x67'),'phonenumber',_0x5071('0x68'),_0x5071('0x69'),_0x5071('0x6a')];var _0x12d5eb=[_0x5071('0x6b'),_0x5071('0x6c'),_0x5071('0x6d'),_0x5071('0x6e'),_0x5071('0x6f'),_0x5071('0x70'),_0x5071('0x71'),_0x5071('0x72'),_0x5071('0x73'),_0x5071('0x74'),_0x5071('0x75'),'createdbyyominame','createdon',_0x5071('0x76'),_0x5071('0x77'),_0x5071('0x78'),_0x5071('0x79'),_0x5071('0x7a'),'emailaddress',_0x5071('0x7b'),_0x5071('0x7c'),_0x5071('0x7d'),_0x5071('0x7e'),_0x5071('0x7f'),_0x5071('0x80'),_0x5071('0x81'),'importsequencenumber',_0x5071('0x82'),'kbarticleidname',_0x5071('0x83'),_0x5071('0x84'),'modifiedbyexternalpartyname',_0x5071('0x85'),_0x5071('0x86'),_0x5071('0x87'),_0x5071('0x88'),_0x5071('0x89'),'modifiedonbehalfbyyominame',_0x5071('0x8a'),_0x5071('0x8b'),_0x5071('0x8c'),_0x5071('0x8d'),_0x5071('0x8e'),'owneridname',_0x5071('0x8f'),_0x5071('0x90'),'parentcaseidname',_0x5071('0x91'),_0x5071('0x92'),_0x5071('0x93'),'productidname',_0x5071('0x94'),_0x5071('0x95'),_0x5071('0x96'),_0x5071('0x97'),_0x5071('0x98'),_0x5071('0x99'),_0x5071('0x9a'),_0x5071('0x9b'),_0x5071('0x9c'),'socialprofileidname',_0x5071('0x9d'),_0x5071('0x9e'),_0x5071('0x9f'),_0x5071('0xa0'),_0x5071('0xa1'),_0x5071('0xa2'),_0x5071('0xa3'),_0x5071('0xa4'),_0x5071('0xa5')];var _0x4a90a1=_0x42ab54['concat'](_0x12d5eb);return db[_0x5071('0x47')]['findOne']({'where':{'id':_0x18ddb0[_0x5071('0x53')]['id']},'attributes':['id',_0x5071('0xa6'),'password',_0x5071('0xa7'),_0x5071('0xa8'),_0x5071('0xa9'),_0x5071('0xaa')]})['then'](handleEntityNotFound(_0x4de0e,null))[_0x5071('0x1f')](function(_0x5a24c7){if(_0x5a24c7){_0x229240=_0x5a24c7[_0x5071('0xa7')];var _0x1159fc=_0x229240[_0x5071('0xab')](-0x1);if(_0x1159fc==='/'){_0x229240=_0x229240[_0x5071('0xac')](0x0,_0x229240[_0x5071('0xad')](_0x1159fc));}_0x13e6d1=util['format'](_0x5071('0xae'),_0x229240);var _0x5370b2={'method':'POST','uri':_0x5071('0xaf')+_0x5a24c7[_0x5071('0xa8')]+'/oauth2/token','form':{'client_id':_0x5a24c7['clientId'],'resource':_0x229240,'username':_0x5a24c7[_0x5071('0xa6')],'password':_0x5a24c7[_0x5071('0xb0')],'grant_type':_0x5071('0xb0'),'client_secret':_0x5a24c7[_0x5071('0xaa')]},'json':!![]};return rp(_0x5370b2);}})[_0x5071('0x1f')](function(_0x261d51){_0x20a5e3=_0x261d51['access_token'];var _0x3196e2={'method':_0x5071('0xb1'),'uri':encodeURI(_0x13e6d1+'EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27'+_0x42a693+'\x27'),'headers':{'Authorization':'Bearer\x20'+_0x20a5e3,'If-None-Match':null,'OData-Version':_0x5071('0xb2')},'json':!![]};return rp(_0x3196e2);})[_0x5071('0x1f')](function(_0x19c36d){var _0x376020=_0x19c36d[_0x5071('0xb3')][0x0];var _0x16e50d=_0x376020[_0x5071('0xb4')];var _0x938374={'method':_0x5071('0xb1'),'uri':_0x13e6d1+_0x5071('0xb5')+_0x16e50d+')?$select=LogicalName&$expand=Attributes($select=LogicalName)','headers':{'Authorization':'Bearer\x20'+_0x20a5e3,'If-None-Match':null,'OData-Version':_0x5071('0xb2')},'json':!![]};return rp(_0x938374);})[_0x5071('0x1f')](function(_0x4d1b2f){_0x23c081=_0x4d1b2f;_0x11c966=_0x23c081[_0x5071('0xb6')];_0x11c966=_[_0x5071('0xb7')](_0x11c966,function(_0x181326){return!_0x4a90a1['includes'](_0x181326[_0x5071('0xb8')]);});var _0x1b9de7=[];var _0x547c2c=[];_0x11c966['forEach'](function(_0x24a0fa){if(_0x24a0fa[_0x5071('0xb9')]){var _0x458b8b=_0x24a0fa['@odata.type'][_0x5071('0xac')](_0x24a0fa[_0x5071('0xb9')]['lastIndexOf']('.')+0x1);if(_0x458b8b===_0x5071('0xba')){_0x1b9de7['push'](getSelectList(_0x13e6d1,_0x1061e9,_0x547c2c,_0x23c081[_0x5071('0xb4')],_0x24a0fa[_0x5071('0xb4')],_0x20a5e3));}}});return Promise['all'](_0x1b9de7);})[_0x5071('0x1f')](function(_0x349e26){_0x5dc97d=_0x349e26[0x0];var _0xa8250=[];var _0x23fe0f=[];_0x11c966['forEach'](function(_0x5d9801){if(!_[_0x5071('0xbb')](_0x5d9801[_0x5071('0xb9')])){var _0xaf0677=_0x5d9801[_0x5071('0xb9')]['substring'](_0x5d9801[_0x5071('0xb9')][_0x5071('0xad')]('.')+0x1);if(_0xaf0677===_0x5071('0xbc')){_0xa8250['push'](getBooleanList(_0x13e6d1,_0x1061e9,_0x23fe0f,_0x23c081[_0x5071('0xb4')],_0x5d9801[_0x5071('0xb4')],_0x20a5e3));}}});return Promise['all'](_0xa8250);})[_0x5071('0x1f')](function(_0x181f6d){_0x448a3f=_0x181f6d[0x0];var _0x11dc89=[];var _0x116f9e=[];_0x11c966[_0x5071('0xbd')](function(_0x489d9b){if(_0x489d9b[_0x5071('0xb9')]){var _0x1716c8=_0x489d9b[_0x5071('0xb9')][_0x5071('0xac')](_0x489d9b[_0x5071('0xb9')][_0x5071('0xad')]('.')+0x1);if(_0x1716c8===_0x5071('0xbe')||_0x1716c8===_0x5071('0xbf')||_0x1716c8===_0x5071('0xc0')||_0x1716c8===_0x5071('0xc1')||_0x1716c8===_0x5071('0xc2')||_0x1716c8===_0x5071('0xc3')||_0x1716c8===_0x5071('0xc4')||_0x1716c8===_0x5071('0xc5')||_0x1716c8===_0x5071('0xc6')||_0x1716c8===_0x5071('0xc7')){_0x11dc89[_0x5071('0xc8')](getInputList(_0x13e6d1,_0x1061e9,_0x1716c8,_0x116f9e,_0x23c081[_0x5071('0xb4')],_0x489d9b[_0x5071('0xb4')],_0x20a5e3));}}});return Promise['all'](_0x11dc89);})[_0x5071('0x1f')](function(_0x5525e8){_0x2103e6=_0x5525e8[0x0];var _0x5508e6=_0x5dc97d['concat'](_0x448a3f)[_0x5071('0xc9')](_0x2103e6);var _0x227917={'count':_0x5508e6['length'],'rows':_0x5508e6};return _0x227917;})[_0x5071('0x1f')](respondWithResult(_0x4de0e,null))[_0x5071('0x28')](function(_0x4d6bf7){console[_0x5071('0xca')](_0x5071('0xcb')+_0x4d6bf7);var _0x3a16f9=_0x18ddb0['query']['test']?0x1f4:_0x4d6bf7['statusCode']||0x1f4;logger[_0x5071('0x24')](_0x4d6bf7[_0x5071('0x34')]);delete _0x4d6bf7[_0x5071('0x35')];if(_0x3a16f9===0x191){_0x3a16f9=0x190;}_0x4de0e['status'](_0x3a16f9)['send'](_0x18ddb0[_0x5071('0x3b')]['test']?{'message':_0x5071('0xcc'),'statusCode':_0x4d6bf7[_0x5071('0xcd')]}:_0x4d6bf7);});};function getSelectList(_0x5dce1d,_0x3a2850,_0x3505d2,_0x5b5f24,_0x173c2a,_0x3e43fd){var _0x57c250={'method':_0x5071('0xb1'),'uri':_0x5dce1d+'EntityDefinitions('+_0x5b5f24+_0x5071('0xce')+_0x173c2a+')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?'+'$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','headers':{'Authorization':_0x5071('0xcf')+_0x3e43fd,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x57c250)['then'](function(_0x24792a){var _0x3fbf8a=[];var _0xb1d104=_0x24792a[_0x5071('0xd0')][_0x5071('0xd1')];_0xb1d104[_0x5071('0xbd')](function(_0x3fbc91){_0x3fbf8a['push']({'name':_0x3fbc91[_0x5071('0xd2')]['UserLocalizedLabel'][_0x5071('0xd2')],'value':String(_0x3fbc91[_0x5071('0xd3')])});});var _0x451745={'id':_0x3a2850+'_'+_0x24792a[_0x5071('0xb8')],'name':_0x24792a[_0x5071('0xd4')]['UserLocalizedLabel'][_0x5071('0xd2')],'custom':![],'options':_0x3fbf8a};_0x3505d2[_0x5071('0xc8')](_0x451745);return _0x3505d2;});}function getBooleanList(_0x4d5fa8,_0x3f3ea4,_0x238663,_0x184d1b,_0x255732,_0x299d22){var _0x477718={'method':_0x5071('0xb1'),'uri':_0x4d5fa8+_0x5071('0xb5')+_0x184d1b+_0x5071('0xce')+_0x255732+_0x5071('0xd5'),'headers':{'Authorization':_0x5071('0xcf')+_0x299d22,'If-None-Match':null,'OData-Version':_0x5071('0xb2')},'json':!![]};return rp(_0x477718)['then'](function(_0xa3b8ab){var _0x408b0e=[];_0x408b0e[_0x5071('0xc8')]({'name':_0xa3b8ab[_0x5071('0xd0')][_0x5071('0xd6')][_0x5071('0xd2')][_0x5071('0xd7')][_0x5071('0xd2')],'value':_0x5071('0xd8')},{'name':_0xa3b8ab[_0x5071('0xd0')][_0x5071('0xd9')]['Label'][_0x5071('0xd7')]['Label'],'value':_0x5071('0xda')});var _0x4c0335={'id':_0x3f3ea4+'_'+_0xa3b8ab[_0x5071('0xb8')],'name':_0xa3b8ab[_0x5071('0xd4')][_0x5071('0xd7')]['Label'],'custom':![],'options':_0x408b0e};_0x238663[_0x5071('0xc8')](_0x4c0335);return _0x238663;});}function getInputList(_0x268b30,_0x555c10,_0x5b9251,_0x217554,_0x439bab,_0xdf0683,_0x562add){var _0x4b3609={'method':_0x5071('0xb1'),'uri':_0x268b30+_0x5071('0xb5')+_0x439bab+_0x5071('0xce')+_0xdf0683+_0x5071('0xdb')+_0x5b9251+_0x5071('0xdc'),'headers':{'Authorization':'Bearer\x20'+_0x562add,'If-None-Match':null,'OData-Version':_0x5071('0xb2')},'json':!![]};return rp(_0x4b3609)['then'](function(_0x39a6e4){var _0x19ccff={'id':_0x555c10+'_'+_0x39a6e4[_0x5071('0xb8')],'name':_0x39a6e4[_0x5071('0xd4')][_0x5071('0xd7')]?_0x39a6e4[_0x5071('0xd4')][_0x5071('0xd7')][_0x5071('0xd2')]:_0x39a6e4[_0x5071('0xb8')],'custom':![],'options':[]};_0x217554[_0x5071('0xc8')](_0x19ccff);return _0x217554;});}
\ No newline at end of file
+var _0x78a6=['zip-dir','fast-json-patch','moment','bluebird','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','destroy','stack','name','send','Dynamics365Account','rawAttributes','keys','query','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','merge','type','key','VIRTUAL','field','filter','options','includeAll','include','rows','params','find','create','body','findOne','getConfigurations','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','Dynamics365Configuration','Dynamics365Field','getFields','ticketType','PhoneCall','title','description','ownerid','caseorigincode','subject','phonenumber','regardingobjectid','directioncode','phonecall_activity_parties','accountidname','accountidyominame','actualserviceunits','billedserviceunits','contactidname','contractdetailidname','createdbyexternalpartyyominame','createdbyname','createdon','createdonbehalfbyname','createdonbehalfbyyominame','customeridname','customeridtype','customeridyominame','emailaddress','entitlementidname','entityimage_timestamp','entityimage_url','escalatedon','exchangerate','firstresponsebykpiidname','importsequencenumber','influencescore','kbarticleidname','lastonholdtime','masteridname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedonbehalfbyyominame','msdyn_incidenttypename','numberofchildincidents','onholdtime','owneridname','owneridyominame','parentcaseidname','primarycontactidname','primarycontactidyominame','prioritycodename','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','sentimentvalue','slainvokedidname','socialprofileidname','statecode','statuscode','ticketnumber','timezoneruleversionnumber','transactioncurrencyidname','traversedpath','utcconversiontimezonecode','versionnumber','concat','username','remoteUri','tenantId','clientId','clientSecret','slice','substring','lastIndexOf','format','%s/api/data/v9.0/','https://login.microsoftonline.com/','/oauth2/token','password','GET','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','value','MetadataId','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Attributes','forEach','@odata.type','push','all','isNil','DoubleAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','MemoAttributeMetadata','DateTimeAttributeMetadata','StatusAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','log','statusCode','Wrong\x20credentials',')/Attributes(','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','Options','Label','UserLocalizedLabel','Value','LogicalName','DisplayName','OptionSet','TrueOption','true','FalseOption','?$select=DisplayName,LogicalName','eml-format','rimraf'];(function(_0x49d5a6,_0x3a1f12){var _0x56d4fa=function(_0x1faeb8){while(--_0x1faeb8){_0x49d5a6['push'](_0x49d5a6['shift']());}};_0x56d4fa(++_0x3a1f12);}(_0x78a6,0xd1));var _0x678a=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0x78a6[_0x34bf97];return _0x292719;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x678a('0x0'));var rimraf=require(_0x678a('0x1'));var zipdir=require(_0x678a('0x2'));var jsonpatch=require(_0x678a('0x3'));var rp=require('request-promise');var moment=require(_0x678a('0x4'));var BPromise=require(_0x678a('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x678a('0x6'));var ejs=require(_0x678a('0x7'));var fs=require('fs');var _=require(_0x678a('0x8'));var squel=require('squel');var crypto=require(_0x678a('0x9'));var jsforce=require(_0x678a('0xa'));var deskjs=require(_0x678a('0xb'));var toCsv=require(_0x678a('0x6'));var querystring=require(_0x678a('0xc'));var Papa=require(_0x678a('0xd'));var Redis=require('ioredis');var authService=require(_0x678a('0xe'));var qs=require(_0x678a('0xf'));var hardwareService=require(_0x678a('0x10'));var logger=require(_0x678a('0x11'))(_0x678a('0x12'));var utils=require(_0x678a('0x13'));var config=require(_0x678a('0x14'));var db=require(_0x678a('0x15'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0x678a('0x16'));var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0x149b2c,_0x238cc4,_0x496790){if(_0x496790){var _0x39453d=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x39453d[_0x678a('0x17')](_0x238cc4)){return _0x149b2c;}else{throw new Error(_0x678a('0x18'));}}else{return _0x149b2c;}}function respondWithRpcPromise(_0x529eb9,_0x5066ee,_0x261a52,_0x936146){return new BPromise(function(_0x2f77e6,_0x5b5ac4){var _0x3f5b6f=_0x936146||client;return _0x3f5b6f[_0x678a('0x19')](_0x529eb9,_0x261a52)[_0x678a('0x1a')](function(_0x40f31c){logger[_0x678a('0x1b')](_0x678a('0x1c'),_0x5066ee,_0x678a('0x1d'));logger['debug'](_0x678a('0x1e'),_0x5066ee,_0x678a('0x1d'),JSON[_0x678a('0x1f')](_0x40f31c));if(_0x40f31c[_0x678a('0x20')]){if(_0x40f31c[_0x678a('0x20')]['code']===0x1f4){logger[_0x678a('0x20')](_0x678a('0x1c'),_0x5066ee,_0x40f31c[_0x678a('0x20')]['message']);return _0x5b5ac4(_0x40f31c['error'][_0x678a('0x21')]);}logger[_0x678a('0x20')](_0x678a('0x1c'),_0x5066ee,_0x40f31c[_0x678a('0x20')][_0x678a('0x21')]);return _0x2f77e6(_0x40f31c[_0x678a('0x20')][_0x678a('0x21')]);}else{logger['info'](_0x678a('0x1c'),_0x5066ee,'request\x20sent');_0x2f77e6(_0x40f31c[_0x678a('0x22')][_0x678a('0x21')]);}})[_0x678a('0x23')](function(_0x449bad){logger[_0x678a('0x20')](_0x678a('0x1c'),_0x5066ee,_0x449bad);_0x5b5ac4(_0x449bad);});});}function respondWithStatusCode(_0x4fd847,_0x4d47e8){_0x4d47e8=_0x4d47e8||0xcc;return function(_0x4483ba){if(_0x4483ba){return _0x4fd847[_0x678a('0x24')](_0x4d47e8);}return _0x4fd847[_0x678a('0x25')](_0x4d47e8)[_0x678a('0x26')]();};}function respondWithResult(_0x53e1e3,_0x3df3d5){_0x3df3d5=_0x3df3d5||0xc8;return function(_0x2348fd){if(_0x2348fd){return _0x53e1e3[_0x678a('0x25')](_0x3df3d5)[_0x678a('0x27')](_0x2348fd);}};}function respondWithFilteredResult(_0x2f7146,_0x443f76){return function(_0x44b6a5){if(_0x44b6a5){var _0x5df5ab=_0x44b6a5[_0x678a('0x28')],_0x5f59c4=_0x443f76[_0x678a('0x29')],_0xb08292=_0x443f76[_0x678a('0x29')]+_0x443f76[_0x678a('0x2a')],_0x4bc11b;if(_0xb08292>=_0x5df5ab){_0xb08292=_0x5df5ab;_0x4bc11b=0xc8;}else{_0x4bc11b=0xce;}_0x2f7146[_0x678a('0x25')](_0x4bc11b);return _0x2f7146[_0x678a('0x2b')](_0x678a('0x2c'),_0x5f59c4+'-'+_0xb08292+'/'+_0x5df5ab)[_0x678a('0x27')](_0x44b6a5);}return null;};}function patchUpdates(_0x5f1428){return function(_0x50f76e){try{jsonpatch['apply'](_0x50f76e,_0x5f1428,!![]);}catch(_0x592213){return BPromise[_0x678a('0x2d')](_0x592213);}return _0x50f76e[_0x678a('0x2e')]();};}function saveUpdates(_0x5a388f,_0x22bf77){return function(_0x25d7fa){if(_0x25d7fa){return _0x25d7fa[_0x678a('0x2f')](_0x5a388f)[_0x678a('0x1a')](function(_0x4ea61f){return _0x4ea61f;});}return null;};}function removeEntity(_0x71e0d9,_0x4c7abe){return function(_0x45b880){if(_0x45b880){return _0x45b880[_0x678a('0x30')]()[_0x678a('0x1a')](function(){_0x71e0d9[_0x678a('0x25')](0xcc)[_0x678a('0x26')]();});}};}function handleEntityNotFound(_0x378ba1,_0x28dd1e){return function(_0x23652e){if(!_0x23652e){_0x378ba1[_0x678a('0x24')](0x194);}return _0x23652e;};}function handleError(_0x106dd5,_0x24627f){_0x24627f=_0x24627f||0x1f4;return function(_0x47682f){logger[_0x678a('0x20')](_0x47682f[_0x678a('0x31')]);if(_0x47682f[_0x678a('0x32')]){delete _0x47682f[_0x678a('0x32')];}_0x106dd5[_0x678a('0x25')](_0x24627f)[_0x678a('0x33')](_0x47682f);};}exports['index']=function(_0x5cacb6,_0x15d59e){var _0x3dfc15={},_0x855e2d={},_0x451982={'count':0x0,'rows':[]};var _0x55f352=db[_0x678a('0x34')][_0x678a('0x35')];_0x855e2d['model']=_[_0x678a('0x36')](_0x55f352);_0x855e2d[_0x678a('0x37')]=_[_0x678a('0x36')](_0x5cacb6[_0x678a('0x37')]);_0x855e2d['filters']=_[_0x678a('0x38')](_0x855e2d['model'],_0x855e2d[_0x678a('0x37')]);_0x3dfc15[_0x678a('0x39')]=_[_0x678a('0x38')](_0x855e2d[_0x678a('0x3a')],qs['fields'](_0x5cacb6[_0x678a('0x37')][_0x678a('0x3b')]));_0x3dfc15['attributes']=_0x3dfc15[_0x678a('0x39')][_0x678a('0x3c')]?_0x3dfc15[_0x678a('0x39')]:_0x855e2d['model'];if(!_0x5cacb6['query'][_0x678a('0x3d')](_0x678a('0x3e'))){_0x3dfc15[_0x678a('0x2a')]=qs['limit'](_0x5cacb6['query'][_0x678a('0x2a')]);_0x3dfc15['offset']=qs[_0x678a('0x29')](_0x5cacb6['query'][_0x678a('0x29')]);}_0x3dfc15[_0x678a('0x3f')]=qs[_0x678a('0x40')](_0x5cacb6['query'][_0x678a('0x40')]);_0x3dfc15[_0x678a('0x41')]=qs[_0x678a('0x42')](_[_0x678a('0x43')](_0x5cacb6[_0x678a('0x37')],_0x855e2d[_0x678a('0x42')]));if(_0x5cacb6[_0x678a('0x37')]['filter']){_0x3dfc15[_0x678a('0x41')]=_[_0x678a('0x44')](_0x3dfc15[_0x678a('0x41')],{'$or':_['map'](_0x55f352,function(_0x1d4816){if(_0x1d4816[_0x678a('0x45')][_0x678a('0x46')]!==_0x678a('0x47')){var _0x35a73e={};_0x35a73e[_0x1d4816[_0x678a('0x48')]]={'$like':'%'+_0x5cacb6[_0x678a('0x37')][_0x678a('0x49')]+'%'};return _0x35a73e;}})});}_0x3dfc15=_[_0x678a('0x44')]({},_0x3dfc15,_0x5cacb6[_0x678a('0x4a')]);var _0xe10b16={'where':_0x3dfc15[_0x678a('0x41')]};return db[_0x678a('0x34')][_0x678a('0x28')](_0xe10b16)[_0x678a('0x1a')](function(_0xfafaba){_0x451982[_0x678a('0x28')]=_0xfafaba;if(_0x5cacb6[_0x678a('0x37')][_0x678a('0x4b')]){_0x3dfc15[_0x678a('0x4c')]=[{'all':!![]}];}return db[_0x678a('0x34')]['findAll'](_0x3dfc15);})[_0x678a('0x1a')](function(_0x264afd){_0x451982[_0x678a('0x4d')]=_0x264afd;return _0x451982;})[_0x678a('0x1a')](respondWithFilteredResult(_0x15d59e,_0x3dfc15))[_0x678a('0x23')](handleError(_0x15d59e,null));};exports['show']=function(_0x5f33e0,_0x3460dc){var _0x46aa33={'raw':![],'where':{'id':_0x5f33e0[_0x678a('0x4e')]['id']}},_0xb8a622={};_0xb8a622[_0x678a('0x3a')]=_[_0x678a('0x36')](db[_0x678a('0x34')][_0x678a('0x35')]);_0xb8a622['query']=_[_0x678a('0x36')](_0x5f33e0[_0x678a('0x37')]);_0xb8a622['filters']=_[_0x678a('0x38')](_0xb8a622[_0x678a('0x3a')],_0xb8a622[_0x678a('0x37')]);_0x46aa33[_0x678a('0x39')]=_[_0x678a('0x38')](_0xb8a622[_0x678a('0x3a')],qs[_0x678a('0x3b')](_0x5f33e0[_0x678a('0x37')][_0x678a('0x3b')]));_0x46aa33[_0x678a('0x39')]=_0x46aa33['attributes'][_0x678a('0x3c')]?_0x46aa33['attributes']:_0xb8a622[_0x678a('0x3a')];if(_0x5f33e0[_0x678a('0x37')][_0x678a('0x4b')]){_0x46aa33[_0x678a('0x4c')]=[{'all':!![]}];}_0x46aa33=_['merge']({},_0x46aa33,_0x5f33e0[_0x678a('0x4a')]);return db[_0x678a('0x34')][_0x678a('0x4f')](_0x46aa33)['then'](handleEntityNotFound(_0x3460dc,null))[_0x678a('0x1a')](respondWithResult(_0x3460dc,null))[_0x678a('0x23')](handleError(_0x3460dc,null));};exports[_0x678a('0x50')]=function(_0x6460d5,_0x58c8e4){return db[_0x678a('0x34')][_0x678a('0x50')](_0x6460d5[_0x678a('0x51')],{})[_0x678a('0x1a')](respondWithResult(_0x58c8e4,0xc9))[_0x678a('0x23')](handleError(_0x58c8e4,null));};exports['update']=function(_0x1f37f2,_0x28d727){if(_0x1f37f2[_0x678a('0x51')]['id']){delete _0x1f37f2[_0x678a('0x51')]['id'];}return db[_0x678a('0x34')][_0x678a('0x4f')]({'where':{'id':_0x1f37f2[_0x678a('0x4e')]['id']}})['then'](handleEntityNotFound(_0x28d727,null))[_0x678a('0x1a')](saveUpdates(_0x1f37f2[_0x678a('0x51')],null))[_0x678a('0x1a')](respondWithResult(_0x28d727,null))['catch'](handleError(_0x28d727,null));};exports[_0x678a('0x30')]=function(_0x17b53b,_0x1492a1){return db['Dynamics365Account'][_0x678a('0x4f')]({'where':{'id':_0x17b53b['params']['id']}})[_0x678a('0x1a')](handleEntityNotFound(_0x1492a1,null))['then'](removeEntity(_0x1492a1,null))[_0x678a('0x23')](handleError(_0x1492a1,null));};exports['getConfigurations']=function(_0x361506,_0x42cc7e,_0x3a3538){var _0x113097={};var _0x19690c={};var _0x6b4417;var _0x1a91e9;return db['Dynamics365Account'][_0x678a('0x52')]({'where':{'id':_0x361506[_0x678a('0x4e')]['id']}})[_0x678a('0x1a')](handleEntityNotFound(_0x42cc7e,null))['then'](function(_0x11808a){if(_0x11808a){_0x6b4417=_0x11808a;_0x19690c[_0x678a('0x3a')]=_[_0x678a('0x36')](db['Dynamics365Configuration'][_0x678a('0x35')]);_0x19690c[_0x678a('0x37')]=_[_0x678a('0x36')](_0x361506[_0x678a('0x37')]);_0x19690c['filters']=_[_0x678a('0x38')](_0x19690c['model'],_0x19690c[_0x678a('0x37')]);_0x113097['attributes']=_['intersection'](_0x19690c[_0x678a('0x3a')],qs['fields'](_0x361506[_0x678a('0x37')][_0x678a('0x3b')]));_0x113097['attributes']=_0x113097[_0x678a('0x39')][_0x678a('0x3c')]?_0x113097[_0x678a('0x39')]:_0x19690c[_0x678a('0x3a')];_0x113097['order']=qs[_0x678a('0x40')](_0x361506[_0x678a('0x37')][_0x678a('0x40')]);_0x113097[_0x678a('0x41')]=qs[_0x678a('0x42')](_[_0x678a('0x43')](_0x361506[_0x678a('0x37')],_0x19690c[_0x678a('0x42')]));if(_0x361506[_0x678a('0x37')]['filter']){_0x113097[_0x678a('0x41')]=_['merge'](_0x113097[_0x678a('0x41')],{'$or':_['map'](_0x113097[_0x678a('0x39')],function(_0x4a0717){var _0x366d5d={};_0x366d5d[_0x4a0717]={'$like':'%'+_0x361506['query'][_0x678a('0x49')]+'%'};return _0x366d5d;})});}_0x113097=_[_0x678a('0x44')]({},_0x113097,_0x361506[_0x678a('0x4a')]);return _0x6b4417['getConfigurations'](_0x113097);}})[_0x678a('0x1a')](function(_0x4d883a){if(_0x4d883a){_0x1a91e9=_0x4d883a[_0x678a('0x3c')];if(!_0x361506['query'][_0x678a('0x3d')](_0x678a('0x3e'))){_0x113097['limit']=qs[_0x678a('0x2a')](_0x361506[_0x678a('0x37')][_0x678a('0x2a')]);_0x113097[_0x678a('0x29')]=qs[_0x678a('0x29')](_0x361506[_0x678a('0x37')][_0x678a('0x29')]);}return _0x6b4417[_0x678a('0x53')](_0x113097);}})[_0x678a('0x1a')](function(_0x347c3d){if(_0x347c3d){return _0x347c3d?{'count':_0x1a91e9,'rows':_0x347c3d}:null;}})['then'](respondWithResult(_0x42cc7e,null))[_0x678a('0x23')](handleError(_0x42cc7e,null));};exports['addConfiguration']=function(_0x4efcf4,_0x3b44a1,_0x6b4e5c){if(_0x4efcf4[_0x678a('0x51')]['id']){delete _0x4efcf4[_0x678a('0x51')]['id'];}return db[_0x678a('0x34')][_0x678a('0x52')]({'where':{'id':_0x4efcf4[_0x678a('0x4e')]['id']}})['then'](handleEntityNotFound(_0x3b44a1,null))[_0x678a('0x1a')](function(_0x46d7a5){if(_0x46d7a5){_0x4efcf4[_0x678a('0x51')][_0x678a('0x54')]=_0x46d7a5['id'];_0x4efcf4[_0x678a('0x51')][_0x678a('0x55')]=integrations[_0x678a('0x56')](_0x4efcf4[_0x678a('0x51')][_0x678a('0x57')],_0x4efcf4[_0x678a('0x51')][_0x678a('0x45')]);_0x4efcf4['body'][_0x678a('0x58')]=integrations[_0x678a('0x59')](_0x4efcf4[_0x678a('0x51')][_0x678a('0x57')],_0x4efcf4[_0x678a('0x51')][_0x678a('0x45')]);return db[_0x678a('0x5a')][_0x678a('0x50')](_0x4efcf4[_0x678a('0x51')],{'include':[{'model':db[_0x678a('0x5b')],'as':_0x678a('0x55')},{'model':db['Dynamics365Field'],'as':_0x678a('0x58')}]});}return null;})[_0x678a('0x1a')](respondWithResult(_0x3b44a1,null))[_0x678a('0x23')](handleError(_0x3b44a1,null));};exports[_0x678a('0x5c')]=function(_0x362470,_0x31a2d7,_0x47ea15){var _0x3cf847=_0x362470[_0x678a('0x37')][_0x678a('0x5d')];var _0x3beb1e=_0x3cf847==='incident'?'Incident':_0x678a('0x5e');var _0x3607fb='';var _0x564731='';var _0x527fca='';var _0x30b45c='';var _0x53b98c='';var _0x266d34='';var _0x42eb07='';var _0x4b0de5='';var _0x51fafb=[_0x678a('0x5f'),_0x678a('0x60'),'customerid',_0x678a('0x61'),_0x678a('0x62'),_0x678a('0x63'),_0x678a('0x64'),_0x678a('0x65'),_0x678a('0x66'),_0x678a('0x67')];var _0x586acd=[_0x678a('0x68'),_0x678a('0x69'),_0x678a('0x6a'),_0x678a('0x6b'),_0x678a('0x6c'),'contactidyominame',_0x678a('0x6d'),'contractidname','createdbyexternalpartyname',_0x678a('0x6e'),_0x678a('0x6f'),'createdbyyominame',_0x678a('0x70'),_0x678a('0x71'),_0x678a('0x72'),_0x678a('0x73'),_0x678a('0x74'),_0x678a('0x75'),_0x678a('0x76'),_0x678a('0x77'),_0x678a('0x78'),_0x678a('0x79'),_0x678a('0x7a'),_0x678a('0x7b'),_0x678a('0x7c'),'followupby',_0x678a('0x7d'),_0x678a('0x7e'),_0x678a('0x7f'),_0x678a('0x80'),_0x678a('0x81'),'modifiedbyexternalpartyname',_0x678a('0x82'),_0x678a('0x83'),'modifiedbyyominame','modifiedon','modifiedonbehalfbyname',_0x678a('0x84'),_0x678a('0x85'),'msdyn_iotalertname',_0x678a('0x86'),_0x678a('0x87'),'overriddencreatedon',_0x678a('0x88'),'owneridtype',_0x678a('0x89'),_0x678a('0x8a'),_0x678a('0x8b'),_0x678a('0x8c'),_0x678a('0x8d'),'productidname','productserialnumber',_0x678a('0x8e'),_0x678a('0x8f'),_0x678a('0x90'),_0x678a('0x91'),_0x678a('0x92'),_0x678a('0x93'),_0x678a('0x94'),'slaname',_0x678a('0x95'),_0x678a('0x96'),_0x678a('0x97'),'subjectidname',_0x678a('0x98'),_0x678a('0x99'),_0x678a('0x9a'),_0x678a('0x9b'),_0x678a('0x9c'),_0x678a('0x9d')];var _0x47f11b=_0x51fafb[_0x678a('0x9e')](_0x586acd);return db['Dynamics365Account'][_0x678a('0x52')]({'where':{'id':_0x362470[_0x678a('0x4e')]['id']},'attributes':['id',_0x678a('0x9f'),'password',_0x678a('0xa0'),_0x678a('0xa1'),_0x678a('0xa2'),_0x678a('0xa3')]})[_0x678a('0x1a')](handleEntityNotFound(_0x31a2d7,null))['then'](function(_0x2f4881){if(_0x2f4881){_0x4b0de5=_0x2f4881[_0x678a('0xa0')];var _0x59acb9=_0x4b0de5[_0x678a('0xa4')](-0x1);if(_0x59acb9==='/'){_0x4b0de5=_0x4b0de5[_0x678a('0xa5')](0x0,_0x4b0de5[_0x678a('0xa6')](_0x59acb9));}_0x42eb07=util[_0x678a('0xa7')](_0x678a('0xa8'),_0x4b0de5);var _0x53861f={'method':'POST','uri':_0x678a('0xa9')+_0x2f4881[_0x678a('0xa1')]+_0x678a('0xaa'),'form':{'client_id':_0x2f4881[_0x678a('0xa2')],'resource':_0x4b0de5,'username':_0x2f4881[_0x678a('0x9f')],'password':_0x2f4881['password'],'grant_type':_0x678a('0xab'),'client_secret':_0x2f4881[_0x678a('0xa3')]},'json':!![]};return rp(_0x53861f);}})[_0x678a('0x1a')](function(_0x3682d6){_0x266d34=_0x3682d6['access_token'];var _0x77c2e6={'method':_0x678a('0xac'),'uri':encodeURI(_0x42eb07+_0x678a('0xad')+_0x3beb1e+'\x27'),'headers':{'Authorization':_0x678a('0xae')+_0x266d34,'If-None-Match':null,'OData-Version':_0x678a('0xaf')},'json':!![]};return rp(_0x77c2e6);})[_0x678a('0x1a')](function(_0x27552e){var _0x1e55fa=_0x27552e[_0x678a('0xb0')][0x0];var _0xddecab=_0x1e55fa[_0x678a('0xb1')];var _0x57716e={'method':'GET','uri':_0x42eb07+_0x678a('0xb2')+_0xddecab+_0x678a('0xb3'),'headers':{'Authorization':'Bearer\x20'+_0x266d34,'If-None-Match':null,'OData-Version':_0x678a('0xaf')},'json':!![]};return rp(_0x57716e);})[_0x678a('0x1a')](function(_0x5c6a76){_0x3607fb=_0x5c6a76;_0x564731=_0x3607fb[_0x678a('0xb4')];_0x564731=_['remove'](_0x564731,function(_0x251b0b){return!_0x47f11b['includes'](_0x251b0b['LogicalName']);});var _0x1f28a1=[];var _0x3a06a5=[];_0x564731[_0x678a('0xb5')](function(_0x192036){if(_0x192036[_0x678a('0xb6')]){var _0x132cbb=_0x192036[_0x678a('0xb6')][_0x678a('0xa5')](_0x192036['@odata.type'][_0x678a('0xa6')]('.')+0x1);if(_0x132cbb==='PicklistAttributeMetadata'){_0x1f28a1[_0x678a('0xb7')](getSelectList(_0x42eb07,_0x3cf847,_0x3a06a5,_0x3607fb[_0x678a('0xb1')],_0x192036[_0x678a('0xb1')],_0x266d34));}}});return Promise[_0x678a('0xb8')](_0x1f28a1);})[_0x678a('0x1a')](function(_0xc6de34){_0x527fca=_0xc6de34[0x0];var _0x305d6f=[];var _0xbf55ec=[];_0x564731[_0x678a('0xb5')](function(_0xb10fca){if(!_[_0x678a('0xb9')](_0xb10fca[_0x678a('0xb6')])){var _0x3d00c3=_0xb10fca[_0x678a('0xb6')][_0x678a('0xa5')](_0xb10fca[_0x678a('0xb6')][_0x678a('0xa6')]('.')+0x1);if(_0x3d00c3==='BooleanAttributeMetadata'){_0x305d6f[_0x678a('0xb7')](getBooleanList(_0x42eb07,_0x3cf847,_0xbf55ec,_0x3607fb[_0x678a('0xb1')],_0xb10fca['MetadataId'],_0x266d34));}}});return Promise['all'](_0x305d6f);})['then'](function(_0x23e198){_0x30b45c=_0x23e198[0x0];var _0x12df68=[];var _0x3feeae=[];_0x564731['forEach'](function(_0x4918ac){if(_0x4918ac['@odata.type']){var _0x23c064=_0x4918ac[_0x678a('0xb6')][_0x678a('0xa5')](_0x4918ac[_0x678a('0xb6')][_0x678a('0xa6')]('.')+0x1);if(_0x23c064==='StringAttributeMetadata'||_0x23c064===_0x678a('0xba')||_0x23c064===_0x678a('0xbb')||_0x23c064===_0x678a('0xbc')||_0x23c064===_0x678a('0xbd')||_0x23c064===_0x678a('0xbe')||_0x23c064===_0x678a('0xbf')||_0x23c064===_0x678a('0xc0')||_0x23c064===_0x678a('0xc1')||_0x23c064===_0x678a('0xc2')){_0x12df68['push'](getInputList(_0x42eb07,_0x3cf847,_0x23c064,_0x3feeae,_0x3607fb[_0x678a('0xb1')],_0x4918ac[_0x678a('0xb1')],_0x266d34));}}});return Promise[_0x678a('0xb8')](_0x12df68);})[_0x678a('0x1a')](function(_0x4697c2){_0x53b98c=_0x4697c2[0x0];var _0x4b5e4a=_0x527fca['concat'](_0x30b45c)[_0x678a('0x9e')](_0x53b98c);var _0x13c8e3={'count':_0x4b5e4a['length'],'rows':_0x4b5e4a};return _0x13c8e3;})[_0x678a('0x1a')](respondWithResult(_0x31a2d7,null))['catch'](function(_0x394829){console[_0x678a('0xc3')]('Dynamics365\x20error:\x20'+_0x394829);var _0x45dd61=_0x362470['query'][_0x678a('0x17')]?0x1f4:_0x394829[_0x678a('0xc4')]||0x1f4;logger['error'](_0x394829[_0x678a('0x31')]);delete _0x394829['name'];if(_0x45dd61===0x191){_0x45dd61=0x190;}_0x31a2d7[_0x678a('0x25')](_0x45dd61)[_0x678a('0x33')](_0x362470[_0x678a('0x37')][_0x678a('0x17')]?{'message':_0x678a('0xc5'),'statusCode':_0x394829[_0x678a('0xc4')]}:_0x394829);});};function getSelectList(_0x177a80,_0x43f9d9,_0x1c0b79,_0x37224c,_0x24a19b,_0x270943){var _0x1f3db1={'method':_0x678a('0xac'),'uri':_0x177a80+_0x678a('0xb2')+_0x37224c+_0x678a('0xc6')+_0x24a19b+')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?'+_0x678a('0xc7'),'headers':{'Authorization':_0x678a('0xae')+_0x270943,'If-None-Match':null,'OData-Version':_0x678a('0xaf')},'json':!![]};return rp(_0x1f3db1)[_0x678a('0x1a')](function(_0x34d57c){var _0xc518c=[];var _0x45ee0f=_0x34d57c['OptionSet'][_0x678a('0xc8')];_0x45ee0f[_0x678a('0xb5')](function(_0x59b050){_0xc518c['push']({'name':_0x59b050[_0x678a('0xc9')][_0x678a('0xca')]['Label'],'value':String(_0x59b050[_0x678a('0xcb')])});});var _0x2a72e2={'id':_0x43f9d9+'_'+_0x34d57c[_0x678a('0xcc')],'name':_0x34d57c[_0x678a('0xcd')]['UserLocalizedLabel'][_0x678a('0xc9')],'custom':![],'options':_0xc518c};_0x1c0b79[_0x678a('0xb7')](_0x2a72e2);return _0x1c0b79;});}function getBooleanList(_0xb9dc2,_0x26a81c,_0x44253c,_0x5c7095,_0x418cd1,_0x2d32d6){var _0x5e36b2={'method':_0x678a('0xac'),'uri':_0xb9dc2+_0x678a('0xb2')+_0x5c7095+_0x678a('0xc6')+_0x418cd1+')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','headers':{'Authorization':_0x678a('0xae')+_0x2d32d6,'If-None-Match':null,'OData-Version':_0x678a('0xaf')},'json':!![]};return rp(_0x5e36b2)[_0x678a('0x1a')](function(_0x1dedf8){var _0x428e2c=[];_0x428e2c[_0x678a('0xb7')]({'name':_0x1dedf8[_0x678a('0xce')][_0x678a('0xcf')][_0x678a('0xc9')][_0x678a('0xca')][_0x678a('0xc9')],'value':_0x678a('0xd0')},{'name':_0x1dedf8[_0x678a('0xce')][_0x678a('0xd1')][_0x678a('0xc9')][_0x678a('0xca')]['Label'],'value':'false'});var _0x5d17e1={'id':_0x26a81c+'_'+_0x1dedf8[_0x678a('0xcc')],'name':_0x1dedf8['DisplayName']['UserLocalizedLabel'][_0x678a('0xc9')],'custom':![],'options':_0x428e2c};_0x44253c[_0x678a('0xb7')](_0x5d17e1);return _0x44253c;});}function getInputList(_0x3e8ec4,_0x14dd0d,_0x3684a3,_0x42165e,_0x1a0127,_0x4fbbc9,_0x3321dc){var _0x37d004={'method':_0x678a('0xac'),'uri':_0x3e8ec4+_0x678a('0xb2')+_0x1a0127+_0x678a('0xc6')+_0x4fbbc9+')/Microsoft.Dynamics.CRM.'+_0x3684a3+_0x678a('0xd2'),'headers':{'Authorization':_0x678a('0xae')+_0x3321dc,'If-None-Match':null,'OData-Version':_0x678a('0xaf')},'json':!![]};return rp(_0x37d004)[_0x678a('0x1a')](function(_0x22aeab){var _0x100df9={'id':_0x14dd0d+'_'+_0x22aeab[_0x678a('0xcc')],'name':_0x22aeab[_0x678a('0xcd')][_0x678a('0xca')]?_0x22aeab[_0x678a('0xcd')][_0x678a('0xca')][_0x678a('0xc9')]:_0x22aeab['LogicalName'],'custom':![],'options':[]};_0x42165e[_0x678a('0xb7')](_0x100df9);return _0x42165e;});}
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.model.js b/server/api/intDynamics365Account/intDynamics365Account.model.js
index f4666f6..b5e0c83 100644
--- a/server/api/intDynamics365Account/intDynamics365Account.model.js
+++ b/server/api/intDynamics365Account/intDynamics365Account.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4d3c=['int_dynamics365_accounts','util','../../config/logger','moment','bluebird','path','../../config/environment','../../components/integrations/configuration','Dynamics365Account'];(function(_0x220d13,_0x11b336){var _0x3d48f3=function(_0x151396){while(--_0x151396){_0x220d13['push'](_0x220d13['shift']());}};_0x3d48f3(++_0x11b336);}(_0x4d3c,0x118));var _0xc4d3=function(_0x497a21,_0x12e763){_0x497a21=_0x497a21-0x0;var _0xc55a89=_0x4d3c[_0x497a21];return _0xc55a89;};'use strict';var _=require('lodash');var util=require(_0xc4d3('0x0'));var logger=require(_0xc4d3('0x1'))('api');var moment=require(_0xc4d3('0x2'));var BPromise=require(_0xc4d3('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc4d3('0x4'));var rimraf=require('rimraf');var config=require(_0xc4d3('0x5'));var attributes=require('./intDynamics365Account.attributes');var integrations=require(_0xc4d3('0x6'));module['exports']=function(_0x1be50c,_0xcfcff3){return _0x1be50c['define'](_0xc4d3('0x7'),attributes,{'tableName':_0xc4d3('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x047a=['request-promise','path','../../config/environment','exports','Dynamics365Account','int_dynamics365_accounts','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x2a0738,_0x3c0bc5){var _0x159679=function(_0x9c9ec7){while(--_0x9c9ec7){_0x2a0738['push'](_0x2a0738['shift']());}};_0x159679(++_0x3c0bc5);}(_0x047a,0xba));var _0xa047=function(_0x4bc53b,_0x39fc31){_0x4bc53b=_0x4bc53b-0x0;var _0x5743f5=_0x047a[_0x4bc53b];return _0x5743f5;};'use strict';var _=require(_0xa047('0x0'));var util=require(_0xa047('0x1'));var logger=require(_0xa047('0x2'))(_0xa047('0x3'));var moment=require(_0xa047('0x4'));var BPromise=require(_0xa047('0x5'));var rp=require(_0xa047('0x6'));var fs=require('fs');var path=require(_0xa047('0x7'));var rimraf=require('rimraf');var config=require(_0xa047('0x8'));var attributes=require('./intDynamics365Account.attributes');var integrations=require('../../components/integrations/configuration');module[_0xa047('0x9')]=function(_0x4b53d1,_0x3c4c25){return _0x4b53d1['define'](_0xa047('0xa'),attributes,{'tableName':_0xa047('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.rpc.js b/server/api/intDynamics365Account/intDynamics365Account.rpc.js
index a39efe8..f6ab240 100644
--- a/server/api/intDynamics365Account/intDynamics365Account.rpc.js
+++ b/server/api/intDynamics365Account/intDynamics365Account.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5b75=['http','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetDynamics365Account','Dynamics365Account','findAll','options','raw','where','limit','attributes','include','map','model','ShowDynamics365Account','find','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client'];(function(_0x328bde,_0x54bb4c){var _0x508ec1=function(_0xe31c18){while(--_0xe31c18){_0x328bde['push'](_0x328bde['shift']());}};_0x508ec1(++_0x54bb4c);}(_0x5b75,0x1a7));var _0x55b7=function(_0x479984,_0x3ab4f0){_0x479984=_0x479984-0x0;var _0x5bb351=_0x5b75[_0x479984];return _0x5bb351;};'use strict';var _=require('lodash');var util=require(_0x55b7('0x0'));var moment=require('moment');var BPromise=require(_0x55b7('0x1'));var rs=require(_0x55b7('0x2'));var fs=require('fs');var Redis=require(_0x55b7('0x3'));var db=require(_0x55b7('0x4'))['db'];var utils=require(_0x55b7('0x5'));var logger=require('../../config/logger')(_0x55b7('0x6'));var config=require(_0x55b7('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x55b7('0x8')][_0x55b7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x976046,_0x509891,_0x4f3cba){return new BPromise(function(_0x10f8f2,_0xc9955f){return client[_0x55b7('0xa')](_0x976046,_0x4f3cba)[_0x55b7('0xb')](function(_0x9a529){logger[_0x55b7('0xc')](_0x55b7('0xd'),_0x509891,_0x55b7('0xe'));logger[_0x55b7('0xf')](_0x55b7('0x10'),_0x509891,_0x55b7('0xe'),JSON[_0x55b7('0x11')](_0x9a529));if(_0x9a529[_0x55b7('0x12')]){if(_0x9a529[_0x55b7('0x12')][_0x55b7('0x13')]===0x1f4){logger['error'](_0x55b7('0xd'),_0x509891,_0x9a529[_0x55b7('0x12')][_0x55b7('0x14')]);return _0xc9955f(_0x9a529[_0x55b7('0x12')][_0x55b7('0x14')]);}logger[_0x55b7('0x12')](_0x55b7('0xd'),_0x509891,_0x9a529[_0x55b7('0x12')][_0x55b7('0x14')]);return _0x10f8f2(_0x9a529['error']['message']);}else{logger[_0x55b7('0xc')](_0x55b7('0xd'),_0x509891,_0x55b7('0xe'));_0x10f8f2(_0x9a529[_0x55b7('0x15')]['message']);}})[_0x55b7('0x16')](function(_0x52ee5b){logger[_0x55b7('0x12')](_0x55b7('0xd'),_0x509891,_0x52ee5b);_0xc9955f(_0x52ee5b);});});}exports[_0x55b7('0x17')]=function(_0x1dd4d4){var _0x3d5e4a=this;return new Promise(function(_0x216b18,_0x395c49){return db[_0x55b7('0x18')][_0x55b7('0x19')]({'raw':_0x1dd4d4[_0x55b7('0x1a')]?_0x1dd4d4[_0x55b7('0x1a')][_0x55b7('0x1b')]===undefined?!![]:![]:!![],'where':_0x1dd4d4[_0x55b7('0x1a')]?_0x1dd4d4[_0x55b7('0x1a')][_0x55b7('0x1c')]||null:null,'attributes':_0x1dd4d4[_0x55b7('0x1a')]?_0x1dd4d4[_0x55b7('0x1a')]['attributes']||null:null,'limit':_0x1dd4d4['options']?_0x1dd4d4[_0x55b7('0x1a')][_0x55b7('0x1d')]||null:null,'include':_0x1dd4d4[_0x55b7('0x1a')]?_0x1dd4d4[_0x55b7('0x1a')]['include']?_['map'](_0x1dd4d4[_0x55b7('0x1a')]['include'],function(_0x346441){return{'model':db[_0x346441['model']],'as':_0x346441['as'],'attributes':_0x346441[_0x55b7('0x1e')],'include':_0x346441[_0x55b7('0x1f')]?_[_0x55b7('0x20')](_0x346441[_0x55b7('0x1f')],function(_0xec3ebb){return{'model':db[_0xec3ebb[_0x55b7('0x21')]],'as':_0xec3ebb['as'],'attributes':_0xec3ebb[_0x55b7('0x1e')],'include':_0xec3ebb['include']?_[_0x55b7('0x20')](_0xec3ebb['include'],function(_0x5af2d4){return{'model':db[_0x5af2d4[_0x55b7('0x21')]],'as':_0x5af2d4['as'],'attributes':_0x5af2d4[_0x55b7('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x233deb){logger[_0x55b7('0xc')](_0x55b7('0x17'),_0x1dd4d4);logger[_0x55b7('0xf')](_0x55b7('0x17'),_0x1dd4d4,JSON[_0x55b7('0x11')](_0x233deb));_0x216b18(_0x233deb);})[_0x55b7('0x16')](function(_0x287e43){logger[_0x55b7('0x12')](_0x55b7('0x17'),_0x287e43[_0x55b7('0x14')],_0x1dd4d4);_0x395c49(_0x3d5e4a['error'](0x1f4,_0x287e43['message']));});});};exports[_0x55b7('0x22')]=function(_0x595deb){var _0x2f4323=this;return new Promise(function(_0x473264,_0x33e6ad){return db[_0x55b7('0x18')][_0x55b7('0x23')]({'raw':_0x595deb[_0x55b7('0x1a')]?_0x595deb['options'][_0x55b7('0x1b')]===undefined?!![]:![]:!![],'where':_0x595deb['options']?_0x595deb[_0x55b7('0x1a')][_0x55b7('0x1c')]||null:null,'attributes':_0x595deb[_0x55b7('0x1a')]?_0x595deb[_0x55b7('0x1a')]['attributes']||null:null,'include':_0x595deb[_0x55b7('0x1a')]?_0x595deb[_0x55b7('0x1a')][_0x55b7('0x1f')]?_[_0x55b7('0x20')](_0x595deb['options'][_0x55b7('0x1f')],function(_0x199209){return{'model':db[_0x199209[_0x55b7('0x21')]],'as':_0x199209['as'],'attributes':_0x199209[_0x55b7('0x1e')],'include':_0x199209[_0x55b7('0x1f')]?_[_0x55b7('0x20')](_0x199209['include'],function(_0x1bb5d3){return{'model':db[_0x1bb5d3['model']],'as':_0x1bb5d3['as'],'attributes':_0x1bb5d3['attributes'],'include':_0x1bb5d3['include']?_[_0x55b7('0x20')](_0x1bb5d3[_0x55b7('0x1f')],function(_0x22b31b){return{'model':db[_0x22b31b[_0x55b7('0x21')]],'as':_0x22b31b['as'],'attributes':_0x22b31b[_0x55b7('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x55b7('0xb')](function(_0x3b4994){logger[_0x55b7('0xc')](_0x55b7('0x22'),_0x595deb);logger[_0x55b7('0xf')](_0x55b7('0x22'),_0x595deb,JSON[_0x55b7('0x11')](_0x3b4994));_0x473264(_0x3b4994);})[_0x55b7('0x16')](function(_0x19e386){logger['error'](_0x55b7('0x22'),_0x19e386[_0x55b7('0x14')],_0x595deb);_0x33e6ad(_0x2f4323[_0x55b7('0x12')](0x1f4,_0x19e386['message']));});});};
\ No newline at end of file
+var _0xa7be=['randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','result','catch','GetDynamics365Account','findAll','raw','options','attributes','limit','map','include','model','debug','find','where','ShowDynamics365Account','util','moment','bluebird'];(function(_0x19d807,_0x1ed89e){var _0x59b0a6=function(_0x244521){while(--_0x244521){_0x19d807['push'](_0x19d807['shift']());}};_0x59b0a6(++_0x1ed89e);}(_0xa7be,0x11d));var _0xea7b=function(_0x1a44a8,_0x21722a){_0x1a44a8=_0x1a44a8-0x0;var _0x518a99=_0xa7be[_0x1a44a8];return _0x518a99;};'use strict';var _=require('lodash');var util=require(_0xea7b('0x0'));var moment=require(_0xea7b('0x1'));var BPromise=require(_0xea7b('0x2'));var rs=require(_0xea7b('0x3'));var fs=require('fs');var Redis=require(_0xea7b('0x4'));var db=require(_0xea7b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xea7b('0x6'))(_0xea7b('0x7'));var config=require(_0xea7b('0x8'));var jayson=require(_0xea7b('0x9'));var client=jayson[_0xea7b('0xa')][_0xea7b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5815a2,_0x523ab5,_0x1d577d){return new BPromise(function(_0xaa1dce,_0x1e2361){return client[_0xea7b('0xc')](_0x5815a2,_0x1d577d)[_0xea7b('0xd')](function(_0x3c91fc){logger[_0xea7b('0xe')]('Dynamics365Account,\x20%s,\x20%s',_0x523ab5,_0xea7b('0xf'));logger['debug']('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x523ab5,_0xea7b('0xf'),JSON[_0xea7b('0x10')](_0x3c91fc));if(_0x3c91fc[_0xea7b('0x11')]){if(_0x3c91fc[_0xea7b('0x11')][_0xea7b('0x12')]===0x1f4){logger[_0xea7b('0x11')](_0xea7b('0x13'),_0x523ab5,_0x3c91fc['error'][_0xea7b('0x14')]);return _0x1e2361(_0x3c91fc[_0xea7b('0x11')][_0xea7b('0x14')]);}logger[_0xea7b('0x11')](_0xea7b('0x13'),_0x523ab5,_0x3c91fc[_0xea7b('0x11')][_0xea7b('0x14')]);return _0xaa1dce(_0x3c91fc['error'][_0xea7b('0x14')]);}else{logger[_0xea7b('0xe')](_0xea7b('0x13'),_0x523ab5,_0xea7b('0xf'));_0xaa1dce(_0x3c91fc[_0xea7b('0x15')]['message']);}})[_0xea7b('0x16')](function(_0x372a42){logger[_0xea7b('0x11')](_0xea7b('0x13'),_0x523ab5,_0x372a42);_0x1e2361(_0x372a42);});});}exports[_0xea7b('0x17')]=function(_0x1ec5dc){var _0x3f4429=this;return new Promise(function(_0x5a7a27,_0x43afeb){return db['Dynamics365Account'][_0xea7b('0x18')]({'raw':_0x1ec5dc['options']?_0x1ec5dc['options'][_0xea7b('0x19')]===undefined?!![]:![]:!![],'where':_0x1ec5dc[_0xea7b('0x1a')]?_0x1ec5dc[_0xea7b('0x1a')]['where']||null:null,'attributes':_0x1ec5dc[_0xea7b('0x1a')]?_0x1ec5dc['options'][_0xea7b('0x1b')]||null:null,'limit':_0x1ec5dc[_0xea7b('0x1a')]?_0x1ec5dc[_0xea7b('0x1a')][_0xea7b('0x1c')]||null:null,'include':_0x1ec5dc[_0xea7b('0x1a')]?_0x1ec5dc[_0xea7b('0x1a')]['include']?_[_0xea7b('0x1d')](_0x1ec5dc[_0xea7b('0x1a')][_0xea7b('0x1e')],function(_0x1624b0){return{'model':db[_0x1624b0[_0xea7b('0x1f')]],'as':_0x1624b0['as'],'attributes':_0x1624b0[_0xea7b('0x1b')],'include':_0x1624b0[_0xea7b('0x1e')]?_[_0xea7b('0x1d')](_0x1624b0[_0xea7b('0x1e')],function(_0x962626){return{'model':db[_0x962626[_0xea7b('0x1f')]],'as':_0x962626['as'],'attributes':_0x962626['attributes'],'include':_0x962626[_0xea7b('0x1e')]?_[_0xea7b('0x1d')](_0x962626[_0xea7b('0x1e')],function(_0x2e8dbf){return{'model':db[_0x2e8dbf[_0xea7b('0x1f')]],'as':_0x2e8dbf['as'],'attributes':_0x2e8dbf[_0xea7b('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xea7b('0xd')](function(_0x2ad97f){logger[_0xea7b('0xe')](_0xea7b('0x17'),_0x1ec5dc);logger[_0xea7b('0x20')]('GetDynamics365Account',_0x1ec5dc,JSON[_0xea7b('0x10')](_0x2ad97f));_0x5a7a27(_0x2ad97f);})[_0xea7b('0x16')](function(_0x2bbf8c){logger[_0xea7b('0x11')](_0xea7b('0x17'),_0x2bbf8c[_0xea7b('0x14')],_0x1ec5dc);_0x43afeb(_0x3f4429[_0xea7b('0x11')](0x1f4,_0x2bbf8c[_0xea7b('0x14')]));});});};exports['ShowDynamics365Account']=function(_0x5b7f34){var _0x83521f=this;return new Promise(function(_0x53c4f2,_0x56f867){return db['Dynamics365Account'][_0xea7b('0x21')]({'raw':_0x5b7f34[_0xea7b('0x1a')]?_0x5b7f34[_0xea7b('0x1a')][_0xea7b('0x19')]===undefined?!![]:![]:!![],'where':_0x5b7f34[_0xea7b('0x1a')]?_0x5b7f34['options'][_0xea7b('0x22')]||null:null,'attributes':_0x5b7f34[_0xea7b('0x1a')]?_0x5b7f34[_0xea7b('0x1a')][_0xea7b('0x1b')]||null:null,'include':_0x5b7f34[_0xea7b('0x1a')]?_0x5b7f34[_0xea7b('0x1a')][_0xea7b('0x1e')]?_[_0xea7b('0x1d')](_0x5b7f34[_0xea7b('0x1a')]['include'],function(_0x5a9284){return{'model':db[_0x5a9284[_0xea7b('0x1f')]],'as':_0x5a9284['as'],'attributes':_0x5a9284[_0xea7b('0x1b')],'include':_0x5a9284[_0xea7b('0x1e')]?_[_0xea7b('0x1d')](_0x5a9284[_0xea7b('0x1e')],function(_0x34d545){return{'model':db[_0x34d545[_0xea7b('0x1f')]],'as':_0x34d545['as'],'attributes':_0x34d545[_0xea7b('0x1b')],'include':_0x34d545[_0xea7b('0x1e')]?_['map'](_0x34d545['include'],function(_0xcb9cf1){return{'model':db[_0xcb9cf1[_0xea7b('0x1f')]],'as':_0xcb9cf1['as'],'attributes':_0xcb9cf1[_0xea7b('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xea7b('0xd')](function(_0x11eeaf){logger[_0xea7b('0xe')](_0xea7b('0x23'),_0x5b7f34);logger[_0xea7b('0x20')](_0xea7b('0x23'),_0x5b7f34,JSON['stringify'](_0x11eeaf));_0x53c4f2(_0x11eeaf);})[_0xea7b('0x16')](function(_0xb453fc){logger[_0xea7b('0x11')]('ShowDynamics365Account',_0xb453fc['message'],_0x5b7f34);_0x56f867(_0x83521f['error'](0x1f4,_0xb453fc[_0xea7b('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/index.js b/server/api/intDynamics365Configuration/index.js
index 78dc224..4fd331f 100644
--- a/server/api/intDynamics365Configuration/index.js
+++ b/server/api/intDynamics365Configuration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x61a4=['getDescriptions','post','create','put','update','delete','destroy','exports','util','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Configuration.controller','get','isAuthenticated','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions'];(function(_0xe32d52,_0x152bcd){var _0x4f1450=function(_0x2b6496){while(--_0x2b6496){_0xe32d52['push'](_0xe32d52['shift']());}};_0x4f1450(++_0x152bcd);}(_0x61a4,0x8c));var _0x461a=function(_0x416300,_0x2622e3){_0x416300=_0x416300-0x0;var _0x502ec1=_0x61a4[_0x416300];return _0x502ec1;};'use strict';var multer=require('multer');var util=require(_0x461a('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x461a('0x1'));var router=express['Router']();var auth=require(_0x461a('0x2'));var interaction=require(_0x461a('0x3'));var config=require(_0x461a('0x4'));var controller=require(_0x461a('0x5'));router[_0x461a('0x6')]('/',auth[_0x461a('0x7')](),controller['index']);router[_0x461a('0x6')](_0x461a('0x8'),auth['isAuthenticated'](),controller[_0x461a('0x9')]);router[_0x461a('0x6')]('/:id/fields',auth['isAuthenticated'](),controller[_0x461a('0xa')]);router[_0x461a('0x6')](_0x461a('0xb'),auth[_0x461a('0x7')](),controller[_0x461a('0xc')]);router['get'](_0x461a('0xd'),auth[_0x461a('0x7')](),controller[_0x461a('0xe')]);router[_0x461a('0xf')]('/',auth[_0x461a('0x7')](),controller[_0x461a('0x10')]);router[_0x461a('0x11')](_0x461a('0x8'),auth['isAuthenticated'](),controller[_0x461a('0x12')]);router[_0x461a('0x13')](_0x461a('0x8'),auth[_0x461a('0x7')](),controller[_0x461a('0x14')]);module[_0x461a('0x15')]=router;
\ No newline at end of file
+var _0xda5c=['create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','post'];(function(_0x10a212,_0x579d85){var _0x23c82b=function(_0x412ea9){while(--_0x412ea9){_0x10a212['push'](_0x10a212['shift']());}};_0x23c82b(++_0x579d85);}(_0xda5c,0xbd));var _0xcda5=function(_0x2f6160,_0x13925e){_0x2f6160=_0x2f6160-0x0;var _0x4333c8=_0xda5c[_0x2f6160];return _0x4333c8;};'use strict';var multer=require(_0xcda5('0x0'));var util=require(_0xcda5('0x1'));var path=require(_0xcda5('0x2'));var timeout=require(_0xcda5('0x3'));var express=require(_0xcda5('0x4'));var router=express[_0xcda5('0x5')]();var auth=require(_0xcda5('0x6'));var interaction=require(_0xcda5('0x7'));var config=require(_0xcda5('0x8'));var controller=require('./intDynamics365Configuration.controller');router[_0xcda5('0x9')]('/',auth[_0xcda5('0xa')](),controller['index']);router[_0xcda5('0x9')](_0xcda5('0xb'),auth[_0xcda5('0xa')](),controller[_0xcda5('0xc')]);router[_0xcda5('0x9')](_0xcda5('0xd'),auth[_0xcda5('0xa')](),controller[_0xcda5('0xe')]);router[_0xcda5('0x9')](_0xcda5('0xf'),auth[_0xcda5('0xa')](),controller[_0xcda5('0x10')]);router[_0xcda5('0x9')]('/:id/descriptions',auth[_0xcda5('0xa')](),controller['getDescriptions']);router[_0xcda5('0x11')]('/',auth['isAuthenticated'](),controller[_0xcda5('0x12')]);router[_0xcda5('0x13')](_0xcda5('0xb'),auth['isAuthenticated'](),controller[_0xcda5('0x14')]);router['delete'](_0xcda5('0xb'),auth[_0xcda5('0xa')](),controller[_0xcda5('0x15')]);module[_0xcda5('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js
index 1c7c4d2..9345ff5 100644
--- a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js
+++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x843f=['ENUM','phonecall','incident','exports','STRING'];(function(_0x237b4f,_0x5da3f3){var _0x5dbfda=function(_0x67fdc6){while(--_0x67fdc6){_0x237b4f['push'](_0x237b4f['shift']());}};_0x5dbfda(++_0x5da3f3);}(_0x843f,0x170));var _0xf843=function(_0x492607,_0x2fb9a0){_0x492607=_0x492607-0x0;var _0x5e1c1d=_0x843f[_0x492607];return _0x5e1c1d;};'use strict';var Sequelize=require('sequelize');module[_0xf843('0x0')]={'name':{'type':Sequelize[_0xf843('0x1')]},'description':{'type':Sequelize[_0xf843('0x1')]},'ticketType':{'type':Sequelize[_0xf843('0x2')]('incident',_0xf843('0x3')),'defaultValue':_0xf843('0x4')}};
\ No newline at end of file
+var _0x9d60=['exports','STRING','ENUM','incident','phonecall'];(function(_0x17289e,_0x178569){var _0xb5fa1=function(_0x259078){while(--_0x259078){_0x17289e['push'](_0x17289e['shift']());}};_0xb5fa1(++_0x178569);}(_0x9d60,0xe6));var _0x09d6=function(_0x552fce,_0x3f24bc){_0x552fce=_0x552fce-0x0;var _0x3e27a2=_0x9d60[_0x552fce];return _0x3e27a2;};'use strict';var Sequelize=require('sequelize');module[_0x09d6('0x0')]={'name':{'type':Sequelize[_0x09d6('0x1')]},'description':{'type':Sequelize[_0x09d6('0x1')]},'ticketType':{'type':Sequelize[_0x09d6('0x2')](_0x09d6('0x3'),_0x09d6('0x4')),'defaultValue':_0x09d6('0x3')}};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js
index 87d95bb..27eea72 100644
--- a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js
+++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x55ec=['field','options','includeAll','include','findAll','rows','show','length','body','update','find','params','getFields','Dynamics365Field','hasOwnProperty','getSubjects','findOne','order','getDescriptions','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','test','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','reject','destroy','stack','name','send','index','Dynamics365Configuration','rawAttributes','keys','filters','intersection','model','attributes','fields','query','nolimit','sort','where','pick','filter','merge','map','type','key','VIRTUAL'];(function(_0x2e821d,_0xef6841){var _0x3268c1=function(_0x20f43b){while(--_0x20f43b){_0x2e821d['push'](_0x2e821d['shift']());}};_0x3268c1(++_0xef6841);}(_0x55ec,0x187));var _0xc55e=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0x55ec[_0x373dee];return _0x46798f;};'use strict';var pdf=require(_0xc55e('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xc55e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc55e('0x2'));var rp=require(_0xc55e('0x3'));var moment=require(_0xc55e('0x4'));var BPromise=require(_0xc55e('0x5'));var Mustache=require('mustache');var util=require(_0xc55e('0x6'));var path=require(_0xc55e('0x7'));var sox=require(_0xc55e('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xc55e('0x9'));var squel=require(_0xc55e('0xa'));var crypto=require(_0xc55e('0xb'));var jsforce=require(_0xc55e('0xc'));var deskjs=require(_0xc55e('0xd'));var toCsv=require(_0xc55e('0xe'));var querystring=require('querystring');var Papa=require(_0xc55e('0xf'));var Redis=require(_0xc55e('0x10'));var authService=require(_0xc55e('0x11'));var qs=require(_0xc55e('0x12'));var hardwareService=require(_0xc55e('0x13'));var logger=require(_0xc55e('0x14'))(_0xc55e('0x15'));var utils=require(_0xc55e('0x16'));var config=require(_0xc55e('0x17'));var db=require(_0xc55e('0x18'))['db'];var jayson=require(_0xc55e('0x19'));var client=jayson[_0xc55e('0x1a')][_0xc55e('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x54dcc1,_0x3bc127,_0x19cfed){if(_0x19cfed){var _0x5eb377=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5eb377[_0xc55e('0x1c')](_0x3bc127)){return _0x54dcc1;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x54dcc1;}}function respondWithRpcPromise(_0x50733d,_0x30ff63,_0x33db5a,_0x47beb4){return new BPromise(function(_0x92fa7f,_0x277134){var _0x1a1316=_0x47beb4||client;return _0x1a1316[_0xc55e('0x1d')](_0x50733d,_0x33db5a)[_0xc55e('0x1e')](function(_0x38c8ea){logger[_0xc55e('0x1f')](_0xc55e('0x20'),_0x30ff63,_0xc55e('0x21'));logger[_0xc55e('0x22')]('Dynamics365Configuration,\x20%s,\x20%s,\x20%s',_0x30ff63,_0xc55e('0x21'),JSON['stringify'](_0x38c8ea));if(_0x38c8ea['error']){if(_0x38c8ea[_0xc55e('0x23')]['code']===0x1f4){logger[_0xc55e('0x23')](_0xc55e('0x20'),_0x30ff63,_0x38c8ea[_0xc55e('0x23')][_0xc55e('0x24')]);return _0x277134(_0x38c8ea[_0xc55e('0x23')][_0xc55e('0x24')]);}logger[_0xc55e('0x23')](_0xc55e('0x20'),_0x30ff63,_0x38c8ea[_0xc55e('0x23')]['message']);return _0x92fa7f(_0x38c8ea['error'][_0xc55e('0x24')]);}else{logger[_0xc55e('0x1f')](_0xc55e('0x20'),_0x30ff63,_0xc55e('0x21'));_0x92fa7f(_0x38c8ea[_0xc55e('0x25')][_0xc55e('0x24')]);}})[_0xc55e('0x26')](function(_0x2f1721){logger[_0xc55e('0x23')](_0xc55e('0x20'),_0x30ff63,_0x2f1721);_0x277134(_0x2f1721);});});}function respondWithStatusCode(_0x49fade,_0x3e6c03){_0x3e6c03=_0x3e6c03||0xcc;return function(_0x3f28aa){if(_0x3f28aa){return _0x49fade[_0xc55e('0x27')](_0x3e6c03);}return _0x49fade['status'](_0x3e6c03)[_0xc55e('0x28')]();};}function respondWithResult(_0x7270c8,_0x27623f){_0x27623f=_0x27623f||0xc8;return function(_0x18bda4){if(_0x18bda4){return _0x7270c8[_0xc55e('0x29')](_0x27623f)[_0xc55e('0x2a')](_0x18bda4);}};}function respondWithFilteredResult(_0x3ad8a2,_0x360c98){return function(_0xe54f68){if(_0xe54f68){var _0x174dd0=_0xe54f68[_0xc55e('0x2b')],_0x398bf3=_0x360c98[_0xc55e('0x2c')],_0x34aeb6=_0x360c98['offset']+_0x360c98[_0xc55e('0x2d')],_0x5d4cf5;if(_0x34aeb6>=_0x174dd0){_0x34aeb6=_0x174dd0;_0x5d4cf5=0xc8;}else{_0x5d4cf5=0xce;}_0x3ad8a2[_0xc55e('0x29')](_0x5d4cf5);return _0x3ad8a2[_0xc55e('0x2e')](_0xc55e('0x2f'),_0x398bf3+'-'+_0x34aeb6+'/'+_0x174dd0)['json'](_0xe54f68);}return null;};}function patchUpdates(_0x3051c9){return function(_0x596ba4){try{jsonpatch[_0xc55e('0x30')](_0x596ba4,_0x3051c9,!![]);}catch(_0xf6050f){return BPromise[_0xc55e('0x31')](_0xf6050f);}return _0x596ba4['save']();};}function saveUpdates(_0x919990,_0x495075){return function(_0x25f5eb){if(_0x25f5eb){return _0x25f5eb['update'](_0x919990)[_0xc55e('0x1e')](function(_0xfd00f6){return _0xfd00f6;});}return null;};}function removeEntity(_0xceab2,_0x2817cf){return function(_0x1a4809){if(_0x1a4809){return _0x1a4809[_0xc55e('0x32')]()[_0xc55e('0x1e')](function(){_0xceab2['status'](0xcc)[_0xc55e('0x28')]();});}};}function handleEntityNotFound(_0x50a542,_0x51d7d0){return function(_0x31becd){if(!_0x31becd){_0x50a542[_0xc55e('0x27')](0x194);}return _0x31becd;};}function handleError(_0x5c2beb,_0x35926d){_0x35926d=_0x35926d||0x1f4;return function(_0x50256c){logger[_0xc55e('0x23')](_0x50256c[_0xc55e('0x33')]);if(_0x50256c[_0xc55e('0x34')]){delete _0x50256c[_0xc55e('0x34')];}_0x5c2beb[_0xc55e('0x29')](_0x35926d)[_0xc55e('0x35')](_0x50256c);};}exports[_0xc55e('0x36')]=function(_0x49670e,_0x1dc2a7){var _0x4143b2={},_0x148802={},_0x336109={'count':0x0,'rows':[]};var _0x330ada=db[_0xc55e('0x37')][_0xc55e('0x38')];_0x148802['model']=_[_0xc55e('0x39')](_0x330ada);_0x148802['query']=_['keys'](_0x49670e['query']);_0x148802[_0xc55e('0x3a')]=_[_0xc55e('0x3b')](_0x148802[_0xc55e('0x3c')],_0x148802['query']);_0x4143b2[_0xc55e('0x3d')]=_[_0xc55e('0x3b')](_0x148802[_0xc55e('0x3c')],qs[_0xc55e('0x3e')](_0x49670e[_0xc55e('0x3f')][_0xc55e('0x3e')]));_0x4143b2[_0xc55e('0x3d')]=_0x4143b2[_0xc55e('0x3d')]['length']?_0x4143b2[_0xc55e('0x3d')]:_0x148802[_0xc55e('0x3c')];if(!_0x49670e[_0xc55e('0x3f')]['hasOwnProperty'](_0xc55e('0x40'))){_0x4143b2[_0xc55e('0x2d')]=qs['limit'](_0x49670e[_0xc55e('0x3f')]['limit']);_0x4143b2['offset']=qs[_0xc55e('0x2c')](_0x49670e['query'][_0xc55e('0x2c')]);}_0x4143b2['order']=qs[_0xc55e('0x41')](_0x49670e['query'][_0xc55e('0x41')]);_0x4143b2[_0xc55e('0x42')]=qs['filters'](_[_0xc55e('0x43')](_0x49670e['query'],_0x148802[_0xc55e('0x3a')]));if(_0x49670e[_0xc55e('0x3f')][_0xc55e('0x44')]){_0x4143b2[_0xc55e('0x42')]=_[_0xc55e('0x45')](_0x4143b2[_0xc55e('0x42')],{'$or':_[_0xc55e('0x46')](_0x330ada,function(_0x14f2dd){if(_0x14f2dd[_0xc55e('0x47')][_0xc55e('0x48')]!==_0xc55e('0x49')){var _0xecd74c={};_0xecd74c[_0x14f2dd[_0xc55e('0x4a')]]={'$like':'%'+_0x49670e[_0xc55e('0x3f')]['filter']+'%'};return _0xecd74c;}})});}_0x4143b2=_['merge']({},_0x4143b2,_0x49670e[_0xc55e('0x4b')]);var _0x5a0a25={'where':_0x4143b2[_0xc55e('0x42')]};return db['Dynamics365Configuration'][_0xc55e('0x2b')](_0x5a0a25)[_0xc55e('0x1e')](function(_0x498294){_0x336109[_0xc55e('0x2b')]=_0x498294;if(_0x49670e['query'][_0xc55e('0x4c')]){_0x4143b2[_0xc55e('0x4d')]=[{'all':!![]}];}return db[_0xc55e('0x37')][_0xc55e('0x4e')](_0x4143b2);})['then'](function(_0x1f7033){_0x336109[_0xc55e('0x4f')]=_0x1f7033;return _0x336109;})[_0xc55e('0x1e')](respondWithFilteredResult(_0x1dc2a7,_0x4143b2))['catch'](handleError(_0x1dc2a7,null));};exports[_0xc55e('0x50')]=function(_0x301b22,_0x58a19a){var _0xea1411={'raw':![],'where':{'id':_0x301b22['params']['id']}},_0x4a6ad0={};_0x4a6ad0[_0xc55e('0x3c')]=_[_0xc55e('0x39')](db['Dynamics365Configuration'][_0xc55e('0x38')]);_0x4a6ad0[_0xc55e('0x3f')]=_[_0xc55e('0x39')](_0x301b22[_0xc55e('0x3f')]);_0x4a6ad0['filters']=_[_0xc55e('0x3b')](_0x4a6ad0[_0xc55e('0x3c')],_0x4a6ad0['query']);_0xea1411[_0xc55e('0x3d')]=_[_0xc55e('0x3b')](_0x4a6ad0['model'],qs[_0xc55e('0x3e')](_0x301b22[_0xc55e('0x3f')][_0xc55e('0x3e')]));_0xea1411[_0xc55e('0x3d')]=_0xea1411[_0xc55e('0x3d')][_0xc55e('0x51')]?_0xea1411[_0xc55e('0x3d')]:_0x4a6ad0['model'];if(_0x301b22['query']['includeAll']){_0xea1411['include']=[{'all':!![]}];}_0xea1411=_[_0xc55e('0x45')]({},_0xea1411,_0x301b22[_0xc55e('0x4b')]);return db[_0xc55e('0x37')]['find'](_0xea1411)[_0xc55e('0x1e')](handleEntityNotFound(_0x58a19a,null))[_0xc55e('0x1e')](respondWithResult(_0x58a19a,null))[_0xc55e('0x26')](handleError(_0x58a19a,null));};exports['create']=function(_0x569e84,_0x17e77b){return db[_0xc55e('0x37')]['create'](_0x569e84[_0xc55e('0x52')],{})['then'](respondWithResult(_0x17e77b,0xc9))[_0xc55e('0x26')](handleError(_0x17e77b,null));};exports[_0xc55e('0x53')]=function(_0x110a55,_0x278f6b){if(_0x110a55[_0xc55e('0x52')]['id']){delete _0x110a55[_0xc55e('0x52')]['id'];}return db[_0xc55e('0x37')][_0xc55e('0x54')]({'where':{'id':_0x110a55['params']['id']}})[_0xc55e('0x1e')](handleEntityNotFound(_0x278f6b,null))['then'](saveUpdates(_0x110a55[_0xc55e('0x52')],null))[_0xc55e('0x1e')](respondWithResult(_0x278f6b,null))[_0xc55e('0x26')](handleError(_0x278f6b,null));};exports[_0xc55e('0x32')]=function(_0x4760dd,_0x231351){return db['Dynamics365Configuration'][_0xc55e('0x54')]({'where':{'id':_0x4760dd[_0xc55e('0x55')]['id']}})[_0xc55e('0x1e')](handleEntityNotFound(_0x231351,null))[_0xc55e('0x1e')](removeEntity(_0x231351,null))[_0xc55e('0x26')](handleError(_0x231351,null));};exports[_0xc55e('0x56')]=function(_0x151064,_0x546b0e,_0x14cc6d){var _0x67fb79={};var _0xeb2be3={};var _0x4f16c2;var _0x433fec;return db[_0xc55e('0x37')]['findOne']({'where':{'id':_0x151064[_0xc55e('0x55')]['id']}})[_0xc55e('0x1e')](handleEntityNotFound(_0x546b0e,null))[_0xc55e('0x1e')](function(_0x2ddbb3){if(_0x2ddbb3){_0x4f16c2=_0x2ddbb3;_0xeb2be3[_0xc55e('0x3c')]=_['keys'](db[_0xc55e('0x57')][_0xc55e('0x38')]);_0xeb2be3[_0xc55e('0x3f')]=_[_0xc55e('0x39')](_0x151064[_0xc55e('0x3f')]);_0xeb2be3[_0xc55e('0x3a')]=_[_0xc55e('0x3b')](_0xeb2be3[_0xc55e('0x3c')],_0xeb2be3[_0xc55e('0x3f')]);_0x67fb79['attributes']=_['intersection'](_0xeb2be3['model'],qs[_0xc55e('0x3e')](_0x151064[_0xc55e('0x3f')][_0xc55e('0x3e')]));_0x67fb79[_0xc55e('0x3d')]=_0x67fb79[_0xc55e('0x3d')][_0xc55e('0x51')]?_0x67fb79[_0xc55e('0x3d')]:_0xeb2be3['model'];_0x67fb79['order']=qs[_0xc55e('0x41')](_0x151064['query'][_0xc55e('0x41')]);_0x67fb79[_0xc55e('0x42')]=qs[_0xc55e('0x3a')](_['pick'](_0x151064[_0xc55e('0x3f')],_0xeb2be3[_0xc55e('0x3a')]));if(_0x151064[_0xc55e('0x3f')]['filter']){_0x67fb79[_0xc55e('0x42')]=_[_0xc55e('0x45')](_0x67fb79[_0xc55e('0x42')],{'$or':_[_0xc55e('0x46')](_0x67fb79[_0xc55e('0x3d')],function(_0x5bc82d){var _0x842007={};_0x842007[_0x5bc82d]={'$like':'%'+_0x151064[_0xc55e('0x3f')]['filter']+'%'};return _0x842007;})});}_0x67fb79=_[_0xc55e('0x45')]({},_0x67fb79,_0x151064['options']);return _0x4f16c2[_0xc55e('0x56')](_0x67fb79);}})[_0xc55e('0x1e')](function(_0x10342c){if(_0x10342c){_0x433fec=_0x10342c[_0xc55e('0x51')];if(!_0x151064[_0xc55e('0x3f')][_0xc55e('0x58')](_0xc55e('0x40'))){_0x67fb79[_0xc55e('0x2d')]=qs['limit'](_0x151064[_0xc55e('0x3f')][_0xc55e('0x2d')]);_0x67fb79['offset']=qs[_0xc55e('0x2c')](_0x151064[_0xc55e('0x3f')][_0xc55e('0x2c')]);}return _0x4f16c2[_0xc55e('0x56')](_0x67fb79);}})['then'](function(_0x10117d){if(_0x10117d){return _0x10117d?{'count':_0x433fec,'rows':_0x10117d}:null;}})[_0xc55e('0x1e')](respondWithResult(_0x546b0e,null))['catch'](handleError(_0x546b0e,null));};exports[_0xc55e('0x59')]=function(_0x54d8a3,_0x474c8c,_0x4ce559){var _0x45e969={};var _0x297415={};var _0x85b839;var _0xa24fb7;return db[_0xc55e('0x37')][_0xc55e('0x5a')]({'where':{'id':_0x54d8a3[_0xc55e('0x55')]['id']}})[_0xc55e('0x1e')](handleEntityNotFound(_0x474c8c,null))[_0xc55e('0x1e')](function(_0x443842){if(_0x443842){_0x85b839=_0x443842;_0x297415[_0xc55e('0x3c')]=_['keys'](db[_0xc55e('0x57')][_0xc55e('0x38')]);_0x297415[_0xc55e('0x3f')]=_[_0xc55e('0x39')](_0x54d8a3['query']);_0x297415[_0xc55e('0x3a')]=_['intersection'](_0x297415[_0xc55e('0x3c')],_0x297415[_0xc55e('0x3f')]);_0x45e969['attributes']=_[_0xc55e('0x3b')](_0x297415['model'],qs[_0xc55e('0x3e')](_0x54d8a3[_0xc55e('0x3f')][_0xc55e('0x3e')]));_0x45e969['attributes']=_0x45e969[_0xc55e('0x3d')][_0xc55e('0x51')]?_0x45e969[_0xc55e('0x3d')]:_0x297415[_0xc55e('0x3c')];_0x45e969[_0xc55e('0x5b')]=qs[_0xc55e('0x41')](_0x54d8a3[_0xc55e('0x3f')][_0xc55e('0x41')]);_0x45e969[_0xc55e('0x42')]=qs['filters'](_[_0xc55e('0x43')](_0x54d8a3[_0xc55e('0x3f')],_0x297415['filters']));if(_0x54d8a3[_0xc55e('0x3f')]['filter']){_0x45e969[_0xc55e('0x42')]=_[_0xc55e('0x45')](_0x45e969[_0xc55e('0x42')],{'$or':_['map'](_0x45e969['attributes'],function(_0x505edb){var _0x43decc={};_0x43decc[_0x505edb]={'$like':'%'+_0x54d8a3[_0xc55e('0x3f')]['filter']+'%'};return _0x43decc;})});}_0x45e969=_['merge']({},_0x45e969,_0x54d8a3[_0xc55e('0x4b')]);return _0x85b839[_0xc55e('0x59')](_0x45e969);}})[_0xc55e('0x1e')](function(_0x2c959a){if(_0x2c959a){_0xa24fb7=_0x2c959a[_0xc55e('0x51')];if(!_0x54d8a3['query'][_0xc55e('0x58')](_0xc55e('0x40'))){_0x45e969[_0xc55e('0x2d')]=qs[_0xc55e('0x2d')](_0x54d8a3['query'][_0xc55e('0x2d')]);_0x45e969[_0xc55e('0x2c')]=qs['offset'](_0x54d8a3['query'][_0xc55e('0x2c')]);}return _0x85b839[_0xc55e('0x59')](_0x45e969);}})[_0xc55e('0x1e')](function(_0x4a9237){if(_0x4a9237){return _0x4a9237?{'count':_0xa24fb7,'rows':_0x4a9237}:null;}})[_0xc55e('0x1e')](respondWithResult(_0x474c8c,null))[_0xc55e('0x26')](handleError(_0x474c8c,null));};exports[_0xc55e('0x5c')]=function(_0x5145b,_0x4fcf79,_0xc29ba9){var _0x5c072={};var _0x21febc={};var _0x1820b5;var _0x5301e5;return db['Dynamics365Configuration']['findOne']({'where':{'id':_0x5145b['params']['id']}})[_0xc55e('0x1e')](handleEntityNotFound(_0x4fcf79,null))[_0xc55e('0x1e')](function(_0x843577){if(_0x843577){_0x1820b5=_0x843577;_0x21febc[_0xc55e('0x3c')]=_['keys'](db[_0xc55e('0x57')]['rawAttributes']);_0x21febc[_0xc55e('0x3f')]=_['keys'](_0x5145b[_0xc55e('0x3f')]);_0x21febc[_0xc55e('0x3a')]=_[_0xc55e('0x3b')](_0x21febc['model'],_0x21febc[_0xc55e('0x3f')]);_0x5c072[_0xc55e('0x3d')]=_['intersection'](_0x21febc[_0xc55e('0x3c')],qs[_0xc55e('0x3e')](_0x5145b[_0xc55e('0x3f')][_0xc55e('0x3e')]));_0x5c072[_0xc55e('0x3d')]=_0x5c072['attributes'][_0xc55e('0x51')]?_0x5c072[_0xc55e('0x3d')]:_0x21febc[_0xc55e('0x3c')];_0x5c072[_0xc55e('0x5b')]=qs[_0xc55e('0x41')](_0x5145b[_0xc55e('0x3f')][_0xc55e('0x41')]);_0x5c072[_0xc55e('0x42')]=qs[_0xc55e('0x3a')](_[_0xc55e('0x43')](_0x5145b['query'],_0x21febc[_0xc55e('0x3a')]));if(_0x5145b[_0xc55e('0x3f')]['filter']){_0x5c072[_0xc55e('0x42')]=_['merge'](_0x5c072['where'],{'$or':_[_0xc55e('0x46')](_0x5c072[_0xc55e('0x3d')],function(_0x479a81){var _0x227d2d={};_0x227d2d[_0x479a81]={'$like':'%'+_0x5145b['query'][_0xc55e('0x44')]+'%'};return _0x227d2d;})});}_0x5c072=_[_0xc55e('0x45')]({},_0x5c072,_0x5145b[_0xc55e('0x4b')]);return _0x1820b5[_0xc55e('0x5c')](_0x5c072);}})['then'](function(_0x30d836){if(_0x30d836){_0x5301e5=_0x30d836[_0xc55e('0x51')];if(!_0x5145b[_0xc55e('0x3f')][_0xc55e('0x58')](_0xc55e('0x40'))){_0x5c072[_0xc55e('0x2d')]=qs[_0xc55e('0x2d')](_0x5145b['query'][_0xc55e('0x2d')]);_0x5c072['offset']=qs[_0xc55e('0x2c')](_0x5145b[_0xc55e('0x3f')]['offset']);}return _0x1820b5['getDescriptions'](_0x5c072);}})[_0xc55e('0x1e')](function(_0x37a16b){if(_0x37a16b){return _0x37a16b?{'count':_0x5301e5,'rows':_0x37a16b}:null;}})[_0xc55e('0x1e')](respondWithResult(_0x4fcf79,null))[_0xc55e('0x26')](handleError(_0x4fcf79,null));};
\ No newline at end of file
+var _0x241a=['Dynamics365Configuration','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','limit','order','sort','pick','filter','merge','map','type','key','VIRTUAL','field','options','where','include','findAll','rows','show','params','rawAttributes','length','find','body','update','getFields','findOne','Dynamics365Field','getSubjects','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','count','offset','Content-Range','apply','reject','save','sendStatus','name','index'];(function(_0x4515a6,_0x45695d){var _0x36f33b=function(_0x26a369){while(--_0x26a369){_0x4515a6['push'](_0x4515a6['shift']());}};_0x36f33b(++_0x45695d);}(_0x241a,0x137));var _0xa241=function(_0x2f1762,_0xab43df){_0x2f1762=_0x2f1762-0x0;var _0x8ab21=_0x241a[_0x2f1762];return _0x8ab21;};'use strict';var pdf=require(_0xa241('0x0'));var emlformat=require(_0xa241('0x1'));var rimraf=require(_0xa241('0x2'));var zipdir=require(_0xa241('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa241('0x4'));var moment=require(_0xa241('0x5'));var BPromise=require(_0xa241('0x6'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xa241('0x7'));var csv=require('to-csv');var ejs=require(_0xa241('0x8'));var fs=require('fs');var _=require(_0xa241('0x9'));var squel=require(_0xa241('0xa'));var crypto=require(_0xa241('0xb'));var jsforce=require(_0xa241('0xc'));var deskjs=require(_0xa241('0xd'));var toCsv=require(_0xa241('0xe'));var querystring=require(_0xa241('0xf'));var Papa=require(_0xa241('0x10'));var Redis=require(_0xa241('0x11'));var authService=require(_0xa241('0x12'));var qs=require(_0xa241('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa241('0x14'))(_0xa241('0x15'));var utils=require(_0xa241('0x16'));var config=require(_0xa241('0x17'));var db=require(_0xa241('0x18'))['db'];var jayson=require(_0xa241('0x19'));var client=jayson[_0xa241('0x1a')][_0xa241('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x3e48f5,_0x4fe827,_0x5a3629){if(_0x5a3629){var _0x42d486=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x42d486['test'](_0x4fe827)){return _0x3e48f5;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x3e48f5;}}function respondWithRpcPromise(_0x34b4bf,_0x50ce75,_0x5bcf3d,_0xb05f46){return new BPromise(function(_0x1fa213,_0xcac6d1){var _0x1e4d47=_0xb05f46||client;return _0x1e4d47[_0xa241('0x1c')](_0x34b4bf,_0x5bcf3d)[_0xa241('0x1d')](function(_0x32ff1e){logger[_0xa241('0x1e')](_0xa241('0x1f'),_0x50ce75,_0xa241('0x20'));logger[_0xa241('0x21')](_0xa241('0x22'),_0x50ce75,_0xa241('0x20'),JSON[_0xa241('0x23')](_0x32ff1e));if(_0x32ff1e[_0xa241('0x24')]){if(_0x32ff1e['error'][_0xa241('0x25')]===0x1f4){logger[_0xa241('0x24')](_0xa241('0x1f'),_0x50ce75,_0x32ff1e[_0xa241('0x24')][_0xa241('0x26')]);return _0xcac6d1(_0x32ff1e[_0xa241('0x24')][_0xa241('0x26')]);}logger[_0xa241('0x24')](_0xa241('0x1f'),_0x50ce75,_0x32ff1e[_0xa241('0x24')][_0xa241('0x26')]);return _0x1fa213(_0x32ff1e[_0xa241('0x24')]['message']);}else{logger[_0xa241('0x1e')](_0xa241('0x1f'),_0x50ce75,'request\x20sent');_0x1fa213(_0x32ff1e[_0xa241('0x27')]['message']);}})[_0xa241('0x28')](function(_0x223c87){logger[_0xa241('0x24')](_0xa241('0x1f'),_0x50ce75,_0x223c87);_0xcac6d1(_0x223c87);});});}function respondWithStatusCode(_0x18d6d0,_0x8908d2){_0x8908d2=_0x8908d2||0xcc;return function(_0xd0b57f){if(_0xd0b57f){return _0x18d6d0['sendStatus'](_0x8908d2);}return _0x18d6d0[_0xa241('0x29')](_0x8908d2)[_0xa241('0x2a')]();};}function respondWithResult(_0x5bbd97,_0x4faba6){_0x4faba6=_0x4faba6||0xc8;return function(_0x51d048){if(_0x51d048){return _0x5bbd97[_0xa241('0x29')](_0x4faba6)[_0xa241('0x2b')](_0x51d048);}};}function respondWithFilteredResult(_0x2ffcb7,_0x493e30){return function(_0x33a05d){if(_0x33a05d){var _0x2c0660=_0x33a05d[_0xa241('0x2c')],_0x3d4671=_0x493e30[_0xa241('0x2d')],_0x417ee6=_0x493e30[_0xa241('0x2d')]+_0x493e30['limit'],_0x1ced3d;if(_0x417ee6>=_0x2c0660){_0x417ee6=_0x2c0660;_0x1ced3d=0xc8;}else{_0x1ced3d=0xce;}_0x2ffcb7[_0xa241('0x29')](_0x1ced3d);return _0x2ffcb7['set'](_0xa241('0x2e'),_0x3d4671+'-'+_0x417ee6+'/'+_0x2c0660)[_0xa241('0x2b')](_0x33a05d);}return null;};}function patchUpdates(_0x55bd58){return function(_0x23ab0c){try{jsonpatch[_0xa241('0x2f')](_0x23ab0c,_0x55bd58,!![]);}catch(_0x330659){return BPromise[_0xa241('0x30')](_0x330659);}return _0x23ab0c[_0xa241('0x31')]();};}function saveUpdates(_0x30ac1a,_0x239c17){return function(_0x49ecce){if(_0x49ecce){return _0x49ecce['update'](_0x30ac1a)[_0xa241('0x1d')](function(_0x20acd2){return _0x20acd2;});}return null;};}function removeEntity(_0x1cd854,_0xae3b24){return function(_0xab340d){if(_0xab340d){return _0xab340d['destroy']()['then'](function(){_0x1cd854[_0xa241('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0xa7de82,_0x261b1f){return function(_0x2839e0){if(!_0x2839e0){_0xa7de82[_0xa241('0x32')](0x194);}return _0x2839e0;};}function handleError(_0x2d660d,_0x3ad37f){_0x3ad37f=_0x3ad37f||0x1f4;return function(_0x2e9901){logger['error'](_0x2e9901['stack']);if(_0x2e9901['name']){delete _0x2e9901[_0xa241('0x33')];}_0x2d660d[_0xa241('0x29')](_0x3ad37f)['send'](_0x2e9901);};}exports[_0xa241('0x34')]=function(_0x6f1e7c,_0x297bcc){var _0x6ee801={},_0x5ed06e={},_0x2999bb={'count':0x0,'rows':[]};var _0x3266d6=db[_0xa241('0x35')]['rawAttributes'];_0x5ed06e[_0xa241('0x36')]=_[_0xa241('0x37')](_0x3266d6);_0x5ed06e[_0xa241('0x38')]=_[_0xa241('0x37')](_0x6f1e7c['query']);_0x5ed06e[_0xa241('0x39')]=_[_0xa241('0x3a')](_0x5ed06e['model'],_0x5ed06e[_0xa241('0x38')]);_0x6ee801['attributes']=_[_0xa241('0x3a')](_0x5ed06e[_0xa241('0x36')],qs[_0xa241('0x3b')](_0x6f1e7c[_0xa241('0x38')][_0xa241('0x3b')]));_0x6ee801[_0xa241('0x3c')]=_0x6ee801[_0xa241('0x3c')]['length']?_0x6ee801[_0xa241('0x3c')]:_0x5ed06e['model'];if(!_0x6f1e7c['query'][_0xa241('0x3d')](_0xa241('0x3e'))){_0x6ee801[_0xa241('0x3f')]=qs[_0xa241('0x3f')](_0x6f1e7c[_0xa241('0x38')][_0xa241('0x3f')]);_0x6ee801[_0xa241('0x2d')]=qs['offset'](_0x6f1e7c[_0xa241('0x38')]['offset']);}_0x6ee801[_0xa241('0x40')]=qs[_0xa241('0x41')](_0x6f1e7c['query'][_0xa241('0x41')]);_0x6ee801['where']=qs[_0xa241('0x39')](_[_0xa241('0x42')](_0x6f1e7c[_0xa241('0x38')],_0x5ed06e[_0xa241('0x39')]));if(_0x6f1e7c[_0xa241('0x38')][_0xa241('0x43')]){_0x6ee801['where']=_[_0xa241('0x44')](_0x6ee801['where'],{'$or':_[_0xa241('0x45')](_0x3266d6,function(_0x131988){if(_0x131988[_0xa241('0x46')][_0xa241('0x47')]!==_0xa241('0x48')){var _0x4680df={};_0x4680df[_0x131988[_0xa241('0x49')]]={'$like':'%'+_0x6f1e7c[_0xa241('0x38')][_0xa241('0x43')]+'%'};return _0x4680df;}})});}_0x6ee801=_[_0xa241('0x44')]({},_0x6ee801,_0x6f1e7c[_0xa241('0x4a')]);var _0x353014={'where':_0x6ee801[_0xa241('0x4b')]};return db[_0xa241('0x35')][_0xa241('0x2c')](_0x353014)[_0xa241('0x1d')](function(_0x2e1c38){_0x2999bb[_0xa241('0x2c')]=_0x2e1c38;if(_0x6f1e7c[_0xa241('0x38')]['includeAll']){_0x6ee801[_0xa241('0x4c')]=[{'all':!![]}];}return db['Dynamics365Configuration'][_0xa241('0x4d')](_0x6ee801);})[_0xa241('0x1d')](function(_0x5097ba){_0x2999bb[_0xa241('0x4e')]=_0x5097ba;return _0x2999bb;})[_0xa241('0x1d')](respondWithFilteredResult(_0x297bcc,_0x6ee801))['catch'](handleError(_0x297bcc,null));};exports[_0xa241('0x4f')]=function(_0x3b4c7b,_0x167c2c){var _0xeaef52={'raw':![],'where':{'id':_0x3b4c7b[_0xa241('0x50')]['id']}},_0x247470={};_0x247470[_0xa241('0x36')]=_[_0xa241('0x37')](db['Dynamics365Configuration'][_0xa241('0x51')]);_0x247470['query']=_[_0xa241('0x37')](_0x3b4c7b[_0xa241('0x38')]);_0x247470[_0xa241('0x39')]=_[_0xa241('0x3a')](_0x247470[_0xa241('0x36')],_0x247470[_0xa241('0x38')]);_0xeaef52['attributes']=_[_0xa241('0x3a')](_0x247470[_0xa241('0x36')],qs[_0xa241('0x3b')](_0x3b4c7b[_0xa241('0x38')][_0xa241('0x3b')]));_0xeaef52[_0xa241('0x3c')]=_0xeaef52[_0xa241('0x3c')][_0xa241('0x52')]?_0xeaef52['attributes']:_0x247470['model'];if(_0x3b4c7b['query']['includeAll']){_0xeaef52[_0xa241('0x4c')]=[{'all':!![]}];}_0xeaef52=_[_0xa241('0x44')]({},_0xeaef52,_0x3b4c7b[_0xa241('0x4a')]);return db[_0xa241('0x35')][_0xa241('0x53')](_0xeaef52)[_0xa241('0x1d')](handleEntityNotFound(_0x167c2c,null))[_0xa241('0x1d')](respondWithResult(_0x167c2c,null))[_0xa241('0x28')](handleError(_0x167c2c,null));};exports['create']=function(_0x51a635,_0x3e49e1){return db[_0xa241('0x35')]['create'](_0x51a635[_0xa241('0x54')],{})[_0xa241('0x1d')](respondWithResult(_0x3e49e1,0xc9))['catch'](handleError(_0x3e49e1,null));};exports[_0xa241('0x55')]=function(_0x2a0ce9,_0x2cba8d){if(_0x2a0ce9[_0xa241('0x54')]['id']){delete _0x2a0ce9[_0xa241('0x54')]['id'];}return db[_0xa241('0x35')][_0xa241('0x53')]({'where':{'id':_0x2a0ce9[_0xa241('0x50')]['id']}})['then'](handleEntityNotFound(_0x2cba8d,null))[_0xa241('0x1d')](saveUpdates(_0x2a0ce9['body'],null))['then'](respondWithResult(_0x2cba8d,null))['catch'](handleError(_0x2cba8d,null));};exports['destroy']=function(_0x9b229b,_0x7b4fbb){return db['Dynamics365Configuration']['find']({'where':{'id':_0x9b229b[_0xa241('0x50')]['id']}})['then'](handleEntityNotFound(_0x7b4fbb,null))['then'](removeEntity(_0x7b4fbb,null))[_0xa241('0x28')](handleError(_0x7b4fbb,null));};exports[_0xa241('0x56')]=function(_0xe8db50,_0x2b7166,_0x1bd528){var _0x354e74={};var _0x1215f3={};var _0x10d16a;var _0x556438;return db['Dynamics365Configuration'][_0xa241('0x57')]({'where':{'id':_0xe8db50[_0xa241('0x50')]['id']}})[_0xa241('0x1d')](handleEntityNotFound(_0x2b7166,null))[_0xa241('0x1d')](function(_0x26323e){if(_0x26323e){_0x10d16a=_0x26323e;_0x1215f3['model']=_[_0xa241('0x37')](db[_0xa241('0x58')][_0xa241('0x51')]);_0x1215f3[_0xa241('0x38')]=_[_0xa241('0x37')](_0xe8db50[_0xa241('0x38')]);_0x1215f3[_0xa241('0x39')]=_['intersection'](_0x1215f3[_0xa241('0x36')],_0x1215f3['query']);_0x354e74[_0xa241('0x3c')]=_['intersection'](_0x1215f3[_0xa241('0x36')],qs[_0xa241('0x3b')](_0xe8db50[_0xa241('0x38')][_0xa241('0x3b')]));_0x354e74[_0xa241('0x3c')]=_0x354e74[_0xa241('0x3c')][_0xa241('0x52')]?_0x354e74[_0xa241('0x3c')]:_0x1215f3[_0xa241('0x36')];_0x354e74[_0xa241('0x40')]=qs[_0xa241('0x41')](_0xe8db50['query'][_0xa241('0x41')]);_0x354e74[_0xa241('0x4b')]=qs[_0xa241('0x39')](_[_0xa241('0x42')](_0xe8db50[_0xa241('0x38')],_0x1215f3[_0xa241('0x39')]));if(_0xe8db50[_0xa241('0x38')][_0xa241('0x43')]){_0x354e74[_0xa241('0x4b')]=_[_0xa241('0x44')](_0x354e74[_0xa241('0x4b')],{'$or':_[_0xa241('0x45')](_0x354e74[_0xa241('0x3c')],function(_0x5be6a0){var _0x3a1bb0={};_0x3a1bb0[_0x5be6a0]={'$like':'%'+_0xe8db50[_0xa241('0x38')]['filter']+'%'};return _0x3a1bb0;})});}_0x354e74=_['merge']({},_0x354e74,_0xe8db50[_0xa241('0x4a')]);return _0x10d16a['getFields'](_0x354e74);}})[_0xa241('0x1d')](function(_0x3d0dca){if(_0x3d0dca){_0x556438=_0x3d0dca['length'];if(!_0xe8db50[_0xa241('0x38')][_0xa241('0x3d')](_0xa241('0x3e'))){_0x354e74[_0xa241('0x3f')]=qs[_0xa241('0x3f')](_0xe8db50[_0xa241('0x38')][_0xa241('0x3f')]);_0x354e74['offset']=qs[_0xa241('0x2d')](_0xe8db50[_0xa241('0x38')][_0xa241('0x2d')]);}return _0x10d16a[_0xa241('0x56')](_0x354e74);}})[_0xa241('0x1d')](function(_0x19a929){if(_0x19a929){return _0x19a929?{'count':_0x556438,'rows':_0x19a929}:null;}})['then'](respondWithResult(_0x2b7166,null))['catch'](handleError(_0x2b7166,null));};exports[_0xa241('0x59')]=function(_0x422ca2,_0x58356c,_0x12f713){var _0x326cfb={};var _0x233963={};var _0x41ed5a;var _0xb671ef;return db['Dynamics365Configuration'][_0xa241('0x57')]({'where':{'id':_0x422ca2[_0xa241('0x50')]['id']}})[_0xa241('0x1d')](handleEntityNotFound(_0x58356c,null))['then'](function(_0x2a6962){if(_0x2a6962){_0x41ed5a=_0x2a6962;_0x233963['model']=_[_0xa241('0x37')](db[_0xa241('0x58')]['rawAttributes']);_0x233963[_0xa241('0x38')]=_['keys'](_0x422ca2['query']);_0x233963['filters']=_['intersection'](_0x233963['model'],_0x233963[_0xa241('0x38')]);_0x326cfb[_0xa241('0x3c')]=_['intersection'](_0x233963['model'],qs[_0xa241('0x3b')](_0x422ca2['query']['fields']));_0x326cfb[_0xa241('0x3c')]=_0x326cfb[_0xa241('0x3c')][_0xa241('0x52')]?_0x326cfb[_0xa241('0x3c')]:_0x233963[_0xa241('0x36')];_0x326cfb[_0xa241('0x40')]=qs['sort'](_0x422ca2[_0xa241('0x38')][_0xa241('0x41')]);_0x326cfb['where']=qs[_0xa241('0x39')](_['pick'](_0x422ca2[_0xa241('0x38')],_0x233963[_0xa241('0x39')]));if(_0x422ca2['query'][_0xa241('0x43')]){_0x326cfb['where']=_['merge'](_0x326cfb[_0xa241('0x4b')],{'$or':_[_0xa241('0x45')](_0x326cfb[_0xa241('0x3c')],function(_0x4cf6bd){var _0x4dfb64={};_0x4dfb64[_0x4cf6bd]={'$like':'%'+_0x422ca2[_0xa241('0x38')][_0xa241('0x43')]+'%'};return _0x4dfb64;})});}_0x326cfb=_[_0xa241('0x44')]({},_0x326cfb,_0x422ca2[_0xa241('0x4a')]);return _0x41ed5a[_0xa241('0x59')](_0x326cfb);}})[_0xa241('0x1d')](function(_0x5a6ea6){if(_0x5a6ea6){_0xb671ef=_0x5a6ea6[_0xa241('0x52')];if(!_0x422ca2[_0xa241('0x38')][_0xa241('0x3d')]('nolimit')){_0x326cfb[_0xa241('0x3f')]=qs[_0xa241('0x3f')](_0x422ca2[_0xa241('0x38')][_0xa241('0x3f')]);_0x326cfb[_0xa241('0x2d')]=qs[_0xa241('0x2d')](_0x422ca2[_0xa241('0x38')]['offset']);}return _0x41ed5a[_0xa241('0x59')](_0x326cfb);}})['then'](function(_0x1734f7){if(_0x1734f7){return _0x1734f7?{'count':_0xb671ef,'rows':_0x1734f7}:null;}})['then'](respondWithResult(_0x58356c,null))[_0xa241('0x28')](handleError(_0x58356c,null));};exports[_0xa241('0x5a')]=function(_0x7d09d5,_0x1e693c,_0x9a5cd2){var _0x3b0892={};var _0x37bca5={};var _0x50cb11;var _0x40ab57;return db[_0xa241('0x35')][_0xa241('0x57')]({'where':{'id':_0x7d09d5[_0xa241('0x50')]['id']}})[_0xa241('0x1d')](handleEntityNotFound(_0x1e693c,null))['then'](function(_0x408407){if(_0x408407){_0x50cb11=_0x408407;_0x37bca5[_0xa241('0x36')]=_[_0xa241('0x37')](db[_0xa241('0x58')]['rawAttributes']);_0x37bca5['query']=_[_0xa241('0x37')](_0x7d09d5[_0xa241('0x38')]);_0x37bca5[_0xa241('0x39')]=_[_0xa241('0x3a')](_0x37bca5['model'],_0x37bca5[_0xa241('0x38')]);_0x3b0892['attributes']=_['intersection'](_0x37bca5[_0xa241('0x36')],qs[_0xa241('0x3b')](_0x7d09d5[_0xa241('0x38')][_0xa241('0x3b')]));_0x3b0892['attributes']=_0x3b0892[_0xa241('0x3c')]['length']?_0x3b0892['attributes']:_0x37bca5[_0xa241('0x36')];_0x3b0892['order']=qs[_0xa241('0x41')](_0x7d09d5['query'][_0xa241('0x41')]);_0x3b0892[_0xa241('0x4b')]=qs[_0xa241('0x39')](_[_0xa241('0x42')](_0x7d09d5[_0xa241('0x38')],_0x37bca5[_0xa241('0x39')]));if(_0x7d09d5[_0xa241('0x38')]['filter']){_0x3b0892[_0xa241('0x4b')]=_[_0xa241('0x44')](_0x3b0892['where'],{'$or':_['map'](_0x3b0892[_0xa241('0x3c')],function(_0x17a1cb){var _0x19be34={};_0x19be34[_0x17a1cb]={'$like':'%'+_0x7d09d5[_0xa241('0x38')][_0xa241('0x43')]+'%'};return _0x19be34;})});}_0x3b0892=_[_0xa241('0x44')]({},_0x3b0892,_0x7d09d5[_0xa241('0x4a')]);return _0x50cb11[_0xa241('0x5a')](_0x3b0892);}})[_0xa241('0x1d')](function(_0x48674c){if(_0x48674c){_0x40ab57=_0x48674c[_0xa241('0x52')];if(!_0x7d09d5[_0xa241('0x38')][_0xa241('0x3d')](_0xa241('0x3e'))){_0x3b0892[_0xa241('0x3f')]=qs[_0xa241('0x3f')](_0x7d09d5['query'][_0xa241('0x3f')]);_0x3b0892[_0xa241('0x2d')]=qs['offset'](_0x7d09d5[_0xa241('0x38')][_0xa241('0x2d')]);}return _0x50cb11[_0xa241('0x5a')](_0x3b0892);}})[_0xa241('0x1d')](function(_0x6207a2){if(_0x6207a2){return _0x6207a2?{'count':_0x40ab57,'rows':_0x6207a2}:null;}})['then'](respondWithResult(_0x1e693c,null))['catch'](handleError(_0x1e693c,null));};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js
index 2828439..8286ed6 100644
--- a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js
+++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9202=['../../config/logger','api','bluebird','request-promise','path','../../config/environment','./intDynamics365Configuration.attributes','define','lodash','util'];(function(_0xd9803d,_0x25e62a){var _0x2f8326=function(_0x394e1f){while(--_0x394e1f){_0xd9803d['push'](_0xd9803d['shift']());}};_0x2f8326(++_0x25e62a);}(_0x9202,0x80));var _0x2920=function(_0x3203c7,_0x4e601a){_0x3203c7=_0x3203c7-0x0;var _0x59336a=_0x9202[_0x3203c7];return _0x59336a;};'use strict';var _=require(_0x2920('0x0'));var util=require(_0x2920('0x1'));var logger=require(_0x2920('0x2'))(_0x2920('0x3'));var moment=require('moment');var BPromise=require(_0x2920('0x4'));var rp=require(_0x2920('0x5'));var fs=require('fs');var path=require(_0x2920('0x6'));var rimraf=require('rimraf');var config=require(_0x2920('0x7'));var attributes=require(_0x2920('0x8'));module['exports']=function(_0x291112,_0x2f822c){return _0x291112[_0x2920('0x9')]('Dynamics365Configuration',attributes,{'tableName':'int_dynamics365_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa020=['Dynamics365Configuration','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./intDynamics365Configuration.attributes','exports'];(function(_0x5d12fe,_0x17acc9){var _0x46629c=function(_0x4bb5f2){while(--_0x4bb5f2){_0x5d12fe['push'](_0x5d12fe['shift']());}};_0x46629c(++_0x17acc9);}(_0xa020,0x1ed));var _0x0a02=function(_0x1d966c,_0x118e3f){_0x1d966c=_0x1d966c-0x0;var _0x4bc41=_0xa020[_0x1d966c];return _0x4bc41;};'use strict';var _=require(_0x0a02('0x0'));var util=require(_0x0a02('0x1'));var logger=require(_0x0a02('0x2'))(_0x0a02('0x3'));var moment=require(_0x0a02('0x4'));var BPromise=require(_0x0a02('0x5'));var rp=require(_0x0a02('0x6'));var fs=require('fs');var path=require(_0x0a02('0x7'));var rimraf=require('rimraf');var config=require(_0x0a02('0x8'));var attributes=require(_0x0a02('0x9'));module[_0x0a02('0xa')]=function(_0x521205,_0x134083){return _0x521205['define'](_0x0a02('0xb'),attributes,{'tableName':'int_dynamics365_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js
index abcf35b..d9727d3 100644
--- a/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js
+++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x978a=['ioredis','../../config/utils','client','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','util','moment','bluebird','randomstring'];(function(_0x4150f2,_0x14a32d){var _0x3d8028=function(_0x552bad){while(--_0x552bad){_0x4150f2['push'](_0x4150f2['shift']());}};_0x3d8028(++_0x14a32d);}(_0x978a,0xb0));var _0xa978=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x978a[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xa978('0x0'));var moment=require(_0xa978('0x1'));var BPromise=require(_0xa978('0x2'));var rs=require(_0xa978('0x3'));var fs=require('fs');var Redis=require(_0xa978('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa978('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xa978('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x278d5a,_0x31b7ee,_0x66b7ee){return new BPromise(function(_0x44cf26,_0x4d3607){return client['request'](_0x278d5a,_0x66b7ee)['then'](function(_0x2ecfdd){logger[_0xa978('0x7')](_0xa978('0x8'),_0x31b7ee,_0xa978('0x9'));logger[_0xa978('0xa')]('Dynamics365Configuration,\x20%s,\x20%s,\x20%s',_0x31b7ee,_0xa978('0x9'),JSON['stringify'](_0x2ecfdd));if(_0x2ecfdd[_0xa978('0xb')]){if(_0x2ecfdd[_0xa978('0xb')][_0xa978('0xc')]===0x1f4){logger[_0xa978('0xb')](_0xa978('0x8'),_0x31b7ee,_0x2ecfdd[_0xa978('0xb')][_0xa978('0xd')]);return _0x4d3607(_0x2ecfdd['error'][_0xa978('0xd')]);}logger[_0xa978('0xb')](_0xa978('0x8'),_0x31b7ee,_0x2ecfdd[_0xa978('0xb')][_0xa978('0xd')]);return _0x44cf26(_0x2ecfdd['error']['message']);}else{logger[_0xa978('0x7')]('Dynamics365Configuration,\x20%s,\x20%s',_0x31b7ee,_0xa978('0x9'));_0x44cf26(_0x2ecfdd['result'][_0xa978('0xd')]);}})[_0xa978('0xe')](function(_0x349c14){logger[_0xa978('0xb')](_0xa978('0x8'),_0x31b7ee,_0x349c14);_0x4d3607(_0x349c14);});});}
\ No newline at end of file
+var _0x18c3=['request\x20sent','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s'];(function(_0x589781,_0x84e018){var _0x15c4a2=function(_0x4f5de9){while(--_0x4f5de9){_0x589781['push'](_0x589781['shift']());}};_0x15c4a2(++_0x84e018);}(_0x18c3,0xae));var _0x318c=function(_0x2d428f,_0x15848b){_0x2d428f=_0x2d428f-0x0;var _0x1aaa05=_0x18c3[_0x2d428f];return _0x1aaa05;};'use strict';var _=require(_0x318c('0x0'));var util=require(_0x318c('0x1'));var moment=require(_0x318c('0x2'));var BPromise=require(_0x318c('0x3'));var rs=require(_0x318c('0x4'));var fs=require('fs');var Redis=require(_0x318c('0x5'));var db=require(_0x318c('0x6'))['db'];var utils=require(_0x318c('0x7'));var logger=require(_0x318c('0x8'))(_0x318c('0x9'));var config=require(_0x318c('0xa'));var jayson=require(_0x318c('0xb'));var client=jayson[_0x318c('0xc')][_0x318c('0xd')]({'port':0x232a});function respondWithRpcPromise(_0xf8ccd8,_0x218666,_0x346d38){return new BPromise(function(_0x33ebac,_0x17a4a6){return client[_0x318c('0xe')](_0xf8ccd8,_0x346d38)[_0x318c('0xf')](function(_0x234cb9){logger[_0x318c('0x10')](_0x318c('0x11'),_0x218666,_0x318c('0x12'));logger['debug'](_0x318c('0x13'),_0x218666,_0x318c('0x12'),JSON['stringify'](_0x234cb9));if(_0x234cb9['error']){if(_0x234cb9[_0x318c('0x14')][_0x318c('0x15')]===0x1f4){logger[_0x318c('0x14')]('Dynamics365Configuration,\x20%s,\x20%s',_0x218666,_0x234cb9[_0x318c('0x14')]['message']);return _0x17a4a6(_0x234cb9['error']['message']);}logger[_0x318c('0x14')](_0x318c('0x11'),_0x218666,_0x234cb9['error'][_0x318c('0x16')]);return _0x33ebac(_0x234cb9[_0x318c('0x14')]['message']);}else{logger[_0x318c('0x10')](_0x318c('0x11'),_0x218666,_0x318c('0x12'));_0x33ebac(_0x234cb9['result'][_0x318c('0x16')]);}})[_0x318c('0x17')](function(_0x3fc783){logger['error'](_0x318c('0x11'),_0x218666,_0x3fc783);_0x17a4a6(_0x3fc783);});});}
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/index.js b/server/api/intDynamics365Field/index.js
index f917049..42e33d3 100644
--- a/server/api/intDynamics365Field/index.js
+++ b/server/api/intDynamics365Field/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5314=['delete','destroy','exports','multer','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Field.controller','index','get','/:id','isAuthenticated','show','post','create','put'];(function(_0x592978,_0x507e13){var _0x10e5e9=function(_0x429640){while(--_0x429640){_0x592978['push'](_0x592978['shift']());}};_0x10e5e9(++_0x507e13);}(_0x5314,0x18f));var _0x4531=function(_0x2c9a46,_0x337926){_0x2c9a46=_0x2c9a46-0x0;var _0x39fdd8=_0x5314[_0x2c9a46];return _0x39fdd8;};'use strict';var multer=require(_0x4531('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x4531('0x1'));var express=require(_0x4531('0x2'));var router=express['Router']();var auth=require(_0x4531('0x3'));var interaction=require(_0x4531('0x4'));var config=require(_0x4531('0x5'));var controller=require(_0x4531('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x4531('0x7')]);router[_0x4531('0x8')](_0x4531('0x9'),auth[_0x4531('0xa')](),controller[_0x4531('0xb')]);router[_0x4531('0xc')]('/',auth['isAuthenticated'](),controller[_0x4531('0xd')]);router[_0x4531('0xe')](_0x4531('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x4531('0xf')]('/:id',auth[_0x4531('0xa')](),controller[_0x4531('0x10')]);module[_0x4531('0x11')]=router;
\ No newline at end of file
+var _0x3c8e=['post','create','put','update','delete','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./intDynamics365Field.controller','get','/:id','isAuthenticated'];(function(_0x27e36f,_0xa0fa74){var _0x20159c=function(_0x1bf9e9){while(--_0x1bf9e9){_0x27e36f['push'](_0x27e36f['shift']());}};_0x20159c(++_0xa0fa74);}(_0x3c8e,0x15a));var _0xe3c8=function(_0x3a6cf7,_0x206242){_0x3a6cf7=_0x3a6cf7-0x0;var _0x247bf8=_0x3c8e[_0x3a6cf7];return _0x247bf8;};'use strict';var multer=require(_0xe3c8('0x0'));var util=require(_0xe3c8('0x1'));var path=require(_0xe3c8('0x2'));var timeout=require('connect-timeout');var express=require(_0xe3c8('0x3'));var router=express[_0xe3c8('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xe3c8('0x5'));var config=require(_0xe3c8('0x6'));var controller=require(_0xe3c8('0x7'));router[_0xe3c8('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xe3c8('0x8')](_0xe3c8('0x9'),auth[_0xe3c8('0xa')](),controller['show']);router[_0xe3c8('0xb')]('/',auth['isAuthenticated'](),controller[_0xe3c8('0xc')]);router[_0xe3c8('0xd')](_0xe3c8('0x9'),auth[_0xe3c8('0xa')](),controller[_0xe3c8('0xe')]);router[_0xe3c8('0xf')](_0xe3c8('0x9'),auth[_0xe3c8('0xa')](),controller['destroy']);module[_0xe3c8('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.attributes.js b/server/api/intDynamics365Field/intDynamics365Field.attributes.js
index b05be06..79d3ae0 100644
--- a/server/api/intDynamics365Field/intDynamics365Field.attributes.js
+++ b/server/api/intDynamics365Field/intDynamics365Field.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xee5b=['keyValue','STRING','variable','sequelize','ENUM','string','customVariable'];(function(_0x57299f,_0x4a88dc){var _0x44ff55=function(_0x3966c8){while(--_0x3966c8){_0x57299f['push'](_0x57299f['shift']());}};_0x44ff55(++_0x4a88dc);}(_0xee5b,0x1f4));var _0xbee5=function(_0x56bd16,_0x11ee1a){_0x56bd16=_0x56bd16-0x0;var _0x3a76e6=_0xee5b[_0x56bd16];return _0x3a76e6;};'use strict';var Sequelize=require(_0xbee5('0x0'));module['exports']={'type':{'type':Sequelize[_0xbee5('0x1')](_0xbee5('0x2'),'variable',_0xbee5('0x3'),_0xbee5('0x4')),'defaultValue':_0xbee5('0x2')},'content':{'type':Sequelize[_0xbee5('0x5')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM'](_0xbee5('0x2'),_0xbee5('0x6'),_0xbee5('0x3'))},'keyContent':{'type':Sequelize[_0xbee5('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x5c00=['string','STRING','customVariable','BOOLEAN','sequelize','exports','ENUM','variable','keyValue'];(function(_0x843467,_0x4c6e32){var _0x5e5c2d=function(_0x286db3){while(--_0x286db3){_0x843467['push'](_0x843467['shift']());}};_0x5e5c2d(++_0x4c6e32);}(_0x5c00,0x17e));var _0x05c0=function(_0x5dc45d,_0x55f90f){_0x5dc45d=_0x5dc45d-0x0;var _0x4ce697=_0x5c00[_0x5dc45d];return _0x4ce697;};'use strict';var Sequelize=require(_0x05c0('0x0'));module[_0x05c0('0x1')]={'type':{'type':Sequelize[_0x05c0('0x2')]('string',_0x05c0('0x3'),'customVariable',_0x05c0('0x4')),'defaultValue':_0x05c0('0x5')},'content':{'type':Sequelize[_0x05c0('0x6')]},'key':{'type':Sequelize[_0x05c0('0x6')]},'keyType':{'type':Sequelize['ENUM'](_0x05c0('0x5'),_0x05c0('0x3'),_0x05c0('0x7'))},'keyContent':{'type':Sequelize[_0x05c0('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x05c0('0x6')]},'customField':{'type':Sequelize[_0x05c0('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x05c0('0x6')]}};
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.controller.js b/server/api/intDynamics365Field/intDynamics365Field.controller.js
index 4172014..3de0ec0 100644
--- a/server/api/intDynamics365Field/intDynamics365Field.controller.js
+++ b/server/api/intDynamics365Field/intDynamics365Field.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['fields','length','nolimit','order','sort','where','pick','filter','merge','type','key','VIRTUAL','options','includeAll','include','catch','show','params','find','create','body','update','destroy','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','then','error','stack','send','index','Dynamics365Field','rawAttributes','model','keys','query','filters','attributes','intersection'];(function(_0x1127ff,_0x382e79){var _0x21e479=function(_0x7009ab){while(--_0x7009ab){_0x1127ff['push'](_0x1127ff['shift']());}};_0x21e479(++_0x382e79);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xa9e0[_0xbe200f];return _0x192597;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x273d4d,_0x36471c){_0x36471c=_0x36471c||0xcc;return function(_0xd5b662){if(_0xd5b662){return _0x273d4d[_0x0a9e('0x13')](_0x36471c);}return _0x273d4d[_0x0a9e('0x14')](_0x36471c)[_0x0a9e('0x15')]();};}function respondWithResult(_0x5db4b0,_0x4283ce){_0x4283ce=_0x4283ce||0xc8;return function(_0x239b12){if(_0x239b12){return _0x5db4b0[_0x0a9e('0x14')](_0x4283ce)[_0x0a9e('0x16')](_0x239b12);}};}function respondWithFilteredResult(_0x44dcfd,_0x4d5611){return function(_0x52a03d){if(_0x52a03d){var _0x22dccb=_0x52a03d[_0x0a9e('0x17')],_0x5d0880=_0x4d5611[_0x0a9e('0x18')],_0x1985b6=_0x4d5611['offset']+_0x4d5611[_0x0a9e('0x19')],_0x519dfd;if(_0x1985b6>=_0x22dccb){_0x1985b6=_0x22dccb;_0x519dfd=0xc8;}else{_0x519dfd=0xce;}_0x44dcfd['status'](_0x519dfd);return _0x44dcfd[_0x0a9e('0x1a')](_0x0a9e('0x1b'),_0x5d0880+'-'+_0x1985b6+'/'+_0x22dccb)[_0x0a9e('0x16')](_0x52a03d);}return null;};}function patchUpdates(_0x205fd6){return function(_0x31b1ca){try{jsonpatch[_0x0a9e('0x1c')](_0x31b1ca,_0x205fd6,!![]);}catch(_0x530eb7){return BPromise[_0x0a9e('0x1d')](_0x530eb7);}return _0x31b1ca[_0x0a9e('0x1e')]();};}function saveUpdates(_0x112016,_0x1c696a){return function(_0x105080){if(_0x105080){return _0x105080['update'](_0x112016)[_0x0a9e('0x1f')](function(_0x155cce){return _0x155cce;});}return null;};}function removeEntity(_0x53682f,_0x20f109){return function(_0x5a09ef){if(_0x5a09ef){return _0x5a09ef['destroy']()[_0x0a9e('0x1f')](function(){_0x53682f[_0x0a9e('0x14')](0xcc)[_0x0a9e('0x15')]();});}};}function handleEntityNotFound(_0x30bae6,_0x4abc77){return function(_0xfb6e48){if(!_0xfb6e48){_0x30bae6[_0x0a9e('0x13')](0x194);}return _0xfb6e48;};}function handleError(_0x3b45bc,_0x4d00e6){_0x4d00e6=_0x4d00e6||0x1f4;return function(_0x370d86){logger[_0x0a9e('0x20')](_0x370d86[_0x0a9e('0x21')]);if(_0x370d86['name']){delete _0x370d86['name'];}_0x3b45bc[_0x0a9e('0x14')](_0x4d00e6)[_0x0a9e('0x22')](_0x370d86);};}exports[_0x0a9e('0x23')]=function(_0x33161b,_0x526cf3){var _0x384319={},_0x479bc4={},_0x45a1e7={'count':0x0,'rows':[]};var _0x5bfb33=db[_0x0a9e('0x24')][_0x0a9e('0x25')];_0x479bc4[_0x0a9e('0x26')]=_[_0x0a9e('0x27')](_0x5bfb33);_0x479bc4[_0x0a9e('0x28')]=_[_0x0a9e('0x27')](_0x33161b[_0x0a9e('0x28')]);_0x479bc4[_0x0a9e('0x29')]=_['intersection'](_0x479bc4[_0x0a9e('0x26')],_0x479bc4[_0x0a9e('0x28')]);_0x384319[_0x0a9e('0x2a')]=_[_0x0a9e('0x2b')](_0x479bc4['model'],qs[_0x0a9e('0x2c')](_0x33161b[_0x0a9e('0x28')][_0x0a9e('0x2c')]));_0x384319[_0x0a9e('0x2a')]=_0x384319[_0x0a9e('0x2a')][_0x0a9e('0x2d')]?_0x384319[_0x0a9e('0x2a')]:_0x479bc4[_0x0a9e('0x26')];if(!_0x33161b[_0x0a9e('0x28')]['hasOwnProperty'](_0x0a9e('0x2e'))){_0x384319['limit']=qs[_0x0a9e('0x19')](_0x33161b[_0x0a9e('0x28')][_0x0a9e('0x19')]);_0x384319[_0x0a9e('0x18')]=qs[_0x0a9e('0x18')](_0x33161b['query'][_0x0a9e('0x18')]);}_0x384319[_0x0a9e('0x2f')]=qs[_0x0a9e('0x30')](_0x33161b[_0x0a9e('0x28')][_0x0a9e('0x30')]);_0x384319[_0x0a9e('0x31')]=qs[_0x0a9e('0x29')](_[_0x0a9e('0x32')](_0x33161b['query'],_0x479bc4[_0x0a9e('0x29')]));if(_0x33161b['query'][_0x0a9e('0x33')]){_0x384319[_0x0a9e('0x31')]=_[_0x0a9e('0x34')](_0x384319[_0x0a9e('0x31')],{'$or':_['map'](_0x5bfb33,function(_0x191e91){if(_0x191e91[_0x0a9e('0x35')][_0x0a9e('0x36')]!==_0x0a9e('0x37')){var _0x4853b1={};_0x4853b1[_0x191e91['field']]={'$like':'%'+_0x33161b[_0x0a9e('0x28')]['filter']+'%'};return _0x4853b1;}})});}_0x384319=_[_0x0a9e('0x34')]({},_0x384319,_0x33161b[_0x0a9e('0x38')]);var _0x381c37={'where':_0x384319[_0x0a9e('0x31')]};return db['Dynamics365Field'][_0x0a9e('0x17')](_0x381c37)[_0x0a9e('0x1f')](function(_0x3cae){_0x45a1e7['count']=_0x3cae;if(_0x33161b[_0x0a9e('0x28')][_0x0a9e('0x39')]){_0x384319[_0x0a9e('0x3a')]=[{'all':!![]}];}return db['Dynamics365Field']['findAll'](_0x384319);})[_0x0a9e('0x1f')](function(_0x40d766){_0x45a1e7['rows']=_0x40d766;return _0x45a1e7;})[_0x0a9e('0x1f')](respondWithFilteredResult(_0x526cf3,_0x384319))[_0x0a9e('0x3b')](handleError(_0x526cf3,null));};exports[_0x0a9e('0x3c')]=function(_0x148f55,_0x4b38d9){var _0x5a594b={'raw':!![],'where':{'id':_0x148f55[_0x0a9e('0x3d')]['id']}},_0x15e37d={};_0x15e37d['model']=_[_0x0a9e('0x27')](db[_0x0a9e('0x24')][_0x0a9e('0x25')]);_0x15e37d['query']=_[_0x0a9e('0x27')](_0x148f55[_0x0a9e('0x28')]);_0x15e37d[_0x0a9e('0x29')]=_[_0x0a9e('0x2b')](_0x15e37d[_0x0a9e('0x26')],_0x15e37d[_0x0a9e('0x28')]);_0x5a594b[_0x0a9e('0x2a')]=_[_0x0a9e('0x2b')](_0x15e37d[_0x0a9e('0x26')],qs[_0x0a9e('0x2c')](_0x148f55[_0x0a9e('0x28')][_0x0a9e('0x2c')]));_0x5a594b[_0x0a9e('0x2a')]=_0x5a594b[_0x0a9e('0x2a')][_0x0a9e('0x2d')]?_0x5a594b['attributes']:_0x15e37d['model'];if(_0x148f55[_0x0a9e('0x28')][_0x0a9e('0x39')]){_0x5a594b[_0x0a9e('0x3a')]=[{'all':!![]}];}_0x5a594b=_[_0x0a9e('0x34')]({},_0x5a594b,_0x148f55[_0x0a9e('0x38')]);return db[_0x0a9e('0x24')][_0x0a9e('0x3e')](_0x5a594b)[_0x0a9e('0x1f')](handleEntityNotFound(_0x4b38d9,null))[_0x0a9e('0x1f')](respondWithResult(_0x4b38d9,null))[_0x0a9e('0x3b')](handleError(_0x4b38d9,null));};exports[_0x0a9e('0x3f')]=function(_0x35ed4a,_0x5026aa){return db[_0x0a9e('0x24')][_0x0a9e('0x3f')](_0x35ed4a[_0x0a9e('0x40')],{})[_0x0a9e('0x1f')](respondWithResult(_0x5026aa,0xc9))[_0x0a9e('0x3b')](handleError(_0x5026aa,null));};exports[_0x0a9e('0x41')]=function(_0x21eb86,_0x44dd99){if(_0x21eb86['body']['id']){delete _0x21eb86[_0x0a9e('0x40')]['id'];}return db['Dynamics365Field'][_0x0a9e('0x3e')]({'where':{'id':_0x21eb86[_0x0a9e('0x3d')]['id']}})[_0x0a9e('0x1f')](handleEntityNotFound(_0x44dd99,null))['then'](saveUpdates(_0x21eb86[_0x0a9e('0x40')],null))[_0x0a9e('0x1f')](respondWithResult(_0x44dd99,null))[_0x0a9e('0x3b')](handleError(_0x44dd99,null));};exports[_0x0a9e('0x42')]=function(_0x45c845,_0x37be73){return db[_0x0a9e('0x24')]['find']({'where':{'id':_0x45c845[_0x0a9e('0x3d')]['id']}})[_0x0a9e('0x1f')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x1f')](removeEntity(_0x37be73,null))[_0x0a9e('0x3b')](handleError(_0x37be73,null));};
\ No newline at end of file
+var _0x70e0=['error','name','send','index','Dynamics365Field','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','nolimit','offset','sort','where','filter','merge','map','key','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','html-pdf','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','to-csv','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','count','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','end'];(function(_0x3a1cca,_0xf9cf7e){var _0x53b71c=function(_0x56c49f){while(--_0x56c49f){_0x3a1cca['push'](_0x3a1cca['shift']());}};_0x53b71c(++_0xf9cf7e);}(_0x70e0,0x17b));var _0x070e=function(_0x169b17,_0x44eee2){_0x169b17=_0x169b17-0x0;var _0x4d46fa=_0x70e0[_0x169b17];return _0x4d46fa;};'use strict';var pdf=require(_0x070e('0x0'));var emlformat=require(_0x070e('0x1'));var rimraf=require(_0x070e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x070e('0x3'));var moment=require(_0x070e('0x4'));var BPromise=require(_0x070e('0x5'));var Mustache=require(_0x070e('0x6'));var util=require('util');var path=require(_0x070e('0x7'));var sox=require('sox');var csv=require(_0x070e('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x070e('0x9'));var jsforce=require(_0x070e('0xa'));var deskjs=require(_0x070e('0xb'));var toCsv=require(_0x070e('0x8'));var querystring=require(_0x070e('0xc'));var Papa=require(_0x070e('0xd'));var Redis=require(_0x070e('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x070e('0xf'));var logger=require(_0x070e('0x10'))(_0x070e('0x11'));var utils=require(_0x070e('0x12'));var config=require(_0x070e('0x13'));var db=require(_0x070e('0x14'))['db'];function respondWithStatusCode(_0x25cfe1,_0x1baa12){_0x1baa12=_0x1baa12||0xcc;return function(_0x39d2b9){if(_0x39d2b9){return _0x25cfe1[_0x070e('0x15')](_0x1baa12);}return _0x25cfe1[_0x070e('0x16')](_0x1baa12)['end']();};}function respondWithResult(_0x5dca0f,_0x24baba){_0x24baba=_0x24baba||0xc8;return function(_0x56c7ba){if(_0x56c7ba){return _0x5dca0f['status'](_0x24baba)['json'](_0x56c7ba);}};}function respondWithFilteredResult(_0x11d2ce,_0x14c3fd){return function(_0x51d14d){if(_0x51d14d){var _0x5d3a38=_0x51d14d[_0x070e('0x17')],_0x373d86=_0x14c3fd['offset'],_0xeae1a5=_0x14c3fd['offset']+_0x14c3fd[_0x070e('0x18')],_0x180897;if(_0xeae1a5>=_0x5d3a38){_0xeae1a5=_0x5d3a38;_0x180897=0xc8;}else{_0x180897=0xce;}_0x11d2ce[_0x070e('0x16')](_0x180897);return _0x11d2ce[_0x070e('0x19')](_0x070e('0x1a'),_0x373d86+'-'+_0xeae1a5+'/'+_0x5d3a38)[_0x070e('0x1b')](_0x51d14d);}return null;};}function patchUpdates(_0x5037eb){return function(_0x3938b5){try{jsonpatch[_0x070e('0x1c')](_0x3938b5,_0x5037eb,!![]);}catch(_0x1ad3de){return BPromise[_0x070e('0x1d')](_0x1ad3de);}return _0x3938b5[_0x070e('0x1e')]();};}function saveUpdates(_0x5c16fd,_0x5b2f48){return function(_0x4e958f){if(_0x4e958f){return _0x4e958f[_0x070e('0x1f')](_0x5c16fd)[_0x070e('0x20')](function(_0x20dc60){return _0x20dc60;});}return null;};}function removeEntity(_0x4be0d7,_0x5b184){return function(_0x5dc5d2){if(_0x5dc5d2){return _0x5dc5d2[_0x070e('0x21')]()[_0x070e('0x20')](function(){_0x4be0d7[_0x070e('0x16')](0xcc)[_0x070e('0x22')]();});}};}function handleEntityNotFound(_0x28a1c3,_0xa86797){return function(_0xe405e){if(!_0xe405e){_0x28a1c3[_0x070e('0x15')](0x194);}return _0xe405e;};}function handleError(_0x595c7e,_0x2f8055){_0x2f8055=_0x2f8055||0x1f4;return function(_0x270061){logger[_0x070e('0x23')](_0x270061['stack']);if(_0x270061[_0x070e('0x24')]){delete _0x270061['name'];}_0x595c7e['status'](_0x2f8055)[_0x070e('0x25')](_0x270061);};}exports[_0x070e('0x26')]=function(_0x41deb1,_0x1743cc){var _0x4763c6={},_0x497f58={},_0x374c54={'count':0x0,'rows':[]};var _0x219e48=db[_0x070e('0x27')][_0x070e('0x28')];_0x497f58[_0x070e('0x29')]=_[_0x070e('0x2a')](_0x219e48);_0x497f58[_0x070e('0x2b')]=_[_0x070e('0x2a')](_0x41deb1['query']);_0x497f58[_0x070e('0x2c')]=_[_0x070e('0x2d')](_0x497f58[_0x070e('0x29')],_0x497f58['query']);_0x4763c6['attributes']=_[_0x070e('0x2d')](_0x497f58[_0x070e('0x29')],qs[_0x070e('0x2e')](_0x41deb1['query'][_0x070e('0x2e')]));_0x4763c6[_0x070e('0x2f')]=_0x4763c6[_0x070e('0x2f')][_0x070e('0x30')]?_0x4763c6['attributes']:_0x497f58['model'];if(!_0x41deb1['query']['hasOwnProperty'](_0x070e('0x31'))){_0x4763c6['limit']=qs[_0x070e('0x18')](_0x41deb1[_0x070e('0x2b')]['limit']);_0x4763c6['offset']=qs[_0x070e('0x32')](_0x41deb1[_0x070e('0x2b')]['offset']);}_0x4763c6['order']=qs[_0x070e('0x33')](_0x41deb1[_0x070e('0x2b')][_0x070e('0x33')]);_0x4763c6[_0x070e('0x34')]=qs[_0x070e('0x2c')](_['pick'](_0x41deb1['query'],_0x497f58[_0x070e('0x2c')]));if(_0x41deb1[_0x070e('0x2b')][_0x070e('0x35')]){_0x4763c6[_0x070e('0x34')]=_[_0x070e('0x36')](_0x4763c6['where'],{'$or':_[_0x070e('0x37')](_0x219e48,function(_0x1927f4){if(_0x1927f4['type'][_0x070e('0x38')]!==_0x070e('0x39')){var _0x4ba6f0={};_0x4ba6f0[_0x1927f4['field']]={'$like':'%'+_0x41deb1['query'][_0x070e('0x35')]+'%'};return _0x4ba6f0;}})});}_0x4763c6=_[_0x070e('0x36')]({},_0x4763c6,_0x41deb1[_0x070e('0x3a')]);var _0x334733={'where':_0x4763c6[_0x070e('0x34')]};return db['Dynamics365Field'][_0x070e('0x17')](_0x334733)[_0x070e('0x20')](function(_0xb53332){_0x374c54['count']=_0xb53332;if(_0x41deb1[_0x070e('0x2b')][_0x070e('0x3b')]){_0x4763c6[_0x070e('0x3c')]=[{'all':!![]}];}return db['Dynamics365Field'][_0x070e('0x3d')](_0x4763c6);})[_0x070e('0x20')](function(_0x4800a9){_0x374c54[_0x070e('0x3e')]=_0x4800a9;return _0x374c54;})['then'](respondWithFilteredResult(_0x1743cc,_0x4763c6))[_0x070e('0x3f')](handleError(_0x1743cc,null));};exports[_0x070e('0x40')]=function(_0x3462d3,_0x30319c){var _0xd03404={'raw':!![],'where':{'id':_0x3462d3[_0x070e('0x41')]['id']}},_0x47b929={};_0x47b929['model']=_['keys'](db[_0x070e('0x27')][_0x070e('0x28')]);_0x47b929[_0x070e('0x2b')]=_['keys'](_0x3462d3[_0x070e('0x2b')]);_0x47b929[_0x070e('0x2c')]=_[_0x070e('0x2d')](_0x47b929[_0x070e('0x29')],_0x47b929['query']);_0xd03404[_0x070e('0x2f')]=_['intersection'](_0x47b929['model'],qs['fields'](_0x3462d3[_0x070e('0x2b')][_0x070e('0x2e')]));_0xd03404[_0x070e('0x2f')]=_0xd03404[_0x070e('0x2f')][_0x070e('0x30')]?_0xd03404['attributes']:_0x47b929[_0x070e('0x29')];if(_0x3462d3['query'][_0x070e('0x3b')]){_0xd03404[_0x070e('0x3c')]=[{'all':!![]}];}_0xd03404=_[_0x070e('0x36')]({},_0xd03404,_0x3462d3['options']);return db['Dynamics365Field'][_0x070e('0x42')](_0xd03404)['then'](handleEntityNotFound(_0x30319c,null))[_0x070e('0x20')](respondWithResult(_0x30319c,null))[_0x070e('0x3f')](handleError(_0x30319c,null));};exports[_0x070e('0x43')]=function(_0x5f5675,_0x7c15f9){return db[_0x070e('0x27')]['create'](_0x5f5675['body'],{})[_0x070e('0x20')](respondWithResult(_0x7c15f9,0xc9))[_0x070e('0x3f')](handleError(_0x7c15f9,null));};exports[_0x070e('0x1f')]=function(_0x1fc7c4,_0x253e11){if(_0x1fc7c4['body']['id']){delete _0x1fc7c4[_0x070e('0x44')]['id'];}return db[_0x070e('0x27')][_0x070e('0x42')]({'where':{'id':_0x1fc7c4[_0x070e('0x41')]['id']}})[_0x070e('0x20')](handleEntityNotFound(_0x253e11,null))[_0x070e('0x20')](saveUpdates(_0x1fc7c4[_0x070e('0x44')],null))[_0x070e('0x20')](respondWithResult(_0x253e11,null))[_0x070e('0x3f')](handleError(_0x253e11,null));};exports[_0x070e('0x21')]=function(_0x210c4d,_0x3be553){return db[_0x070e('0x27')][_0x070e('0x42')]({'where':{'id':_0x210c4d[_0x070e('0x41')]['id']}})['then'](handleEntityNotFound(_0x3be553,null))[_0x070e('0x20')](removeEntity(_0x3be553,null))[_0x070e('0x3f')](handleError(_0x3be553,null));};
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.model.js b/server/api/intDynamics365Field/intDynamics365Field.model.js
index 1987c14..eac3c95 100644
--- a/server/api/intDynamics365Field/intDynamics365Field.model.js
+++ b/server/api/intDynamics365Field/intDynamics365Field.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['int_dynamics365_fields','idField','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./intDynamics365Field.attributes','exports','Dynamics365Field'];(function(_0x1d987a,_0x44164b){var _0x3a8123=function(_0x3bdc77){while(--_0x3bdc77){_0x1d987a['push'](_0x1d987a['shift']());}};_0x3a8123(++_0x44164b);}(_0x7a54,0x106));var _0x47a5=function(_0x25c1af,_0x51723d){_0x25c1af=_0x25c1af-0x0;var _0x5a5b34=_0x7a54[_0x25c1af];return _0x5a5b34;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'dynamics365_unique_index','fields':[_0x47a5('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x7a54=['int_dynamics365_fields','idField','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./intDynamics365Field.attributes','exports','Dynamics365Field'];(function(_0x4a89e6,_0x3a4e77){var _0x1b9e18=function(_0x1d4050){while(--_0x1d4050){_0x4a89e6['push'](_0x4a89e6['shift']());}};_0x1b9e18(++_0x3a4e77);}(_0x7a54,0x106));var _0x47a5=function(_0x20fba0,_0x27414c){_0x20fba0=_0x20fba0-0x0;var _0xfd1471=_0x7a54[_0x20fba0];return _0xfd1471;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'dynamics365_unique_index','fields':[_0x47a5('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.rpc.js b/server/api/intDynamics365Field/intDynamics365Field.rpc.js
index 06a6a68..dbc773e 100644
--- a/server/api/intDynamics365Field/intDynamics365Field.rpc.js
+++ b/server/api/intDynamics365Field/intDynamics365Field.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaf6e=['debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent'];(function(_0xf50820,_0x56f041){var _0x2a9b10=function(_0x33f0f4){while(--_0x33f0f4){_0xf50820['push'](_0xf50820['shift']());}};_0x2a9b10(++_0x56f041);}(_0xaf6e,0x16e));var _0xeaf6=function(_0xd2faf,_0x9a2759){_0xd2faf=_0xd2faf-0x0;var _0x78cad8=_0xaf6e[_0xd2faf];return _0x78cad8;};'use strict';var _=require(_0xeaf6('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xeaf6('0x1'));var rs=require(_0xeaf6('0x2'));var fs=require('fs');var Redis=require(_0xeaf6('0x3'));var db=require(_0xeaf6('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xeaf6('0x5'))(_0xeaf6('0x6'));var config=require(_0xeaf6('0x7'));var jayson=require(_0xeaf6('0x8'));var client=jayson[_0xeaf6('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x595fc8,_0x4f82d1,_0xfa0e5d){return new BPromise(function(_0x4b55e6,_0x7655a5){return client['request'](_0x595fc8,_0xfa0e5d)[_0xeaf6('0xa')](function(_0x3d5ac7){logger[_0xeaf6('0xb')](_0xeaf6('0xc'),_0x4f82d1,_0xeaf6('0xd'));logger[_0xeaf6('0xe')](_0xeaf6('0xf'),_0x4f82d1,_0xeaf6('0xd'),JSON[_0xeaf6('0x10')](_0x3d5ac7));if(_0x3d5ac7[_0xeaf6('0x11')]){if(_0x3d5ac7[_0xeaf6('0x11')]['code']===0x1f4){logger[_0xeaf6('0x11')](_0xeaf6('0xc'),_0x4f82d1,_0x3d5ac7[_0xeaf6('0x11')][_0xeaf6('0x12')]);return _0x7655a5(_0x3d5ac7[_0xeaf6('0x11')][_0xeaf6('0x12')]);}logger[_0xeaf6('0x11')](_0xeaf6('0xc'),_0x4f82d1,_0x3d5ac7['error']['message']);return _0x4b55e6(_0x3d5ac7[_0xeaf6('0x11')][_0xeaf6('0x12')]);}else{logger[_0xeaf6('0xb')](_0xeaf6('0xc'),_0x4f82d1,_0xeaf6('0xd'));_0x4b55e6(_0x3d5ac7['result'][_0xeaf6('0x12')]);}})[_0xeaf6('0x13')](function(_0x382059){logger[_0xeaf6('0x11')](_0xeaf6('0xc'),_0x4f82d1,_0x382059);_0x7655a5(_0x382059);});});}
\ No newline at end of file
+var _0x3ece=['../../config/logger','../../config/environment','client','http','request','then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils'];(function(_0x1155bb,_0x578a0c){var _0x2ac9af=function(_0x44df0c){while(--_0x44df0c){_0x1155bb['push'](_0x1155bb['shift']());}};_0x2ac9af(++_0x578a0c);}(_0x3ece,0x10e));var _0xe3ec=function(_0x343047,_0xf6dfcb){_0x343047=_0x343047-0x0;var _0x416623=_0x3ece[_0x343047];return _0x416623;};'use strict';var _=require(_0xe3ec('0x0'));var util=require(_0xe3ec('0x1'));var moment=require(_0xe3ec('0x2'));var BPromise=require(_0xe3ec('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe3ec('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe3ec('0x5'));var logger=require(_0xe3ec('0x6'))('rpc');var config=require(_0xe3ec('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xe3ec('0x8')][_0xe3ec('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x6eefce,_0x582839,_0x11d048){return new BPromise(function(_0x2c1309,_0x4f3a9c){return client[_0xe3ec('0xa')](_0x6eefce,_0x11d048)[_0xe3ec('0xb')](function(_0x24140c){logger[_0xe3ec('0xc')](_0xe3ec('0xd'),_0x582839,_0xe3ec('0xe'));logger[_0xe3ec('0xf')](_0xe3ec('0x10'),_0x582839,'request\x20sent',JSON[_0xe3ec('0x11')](_0x24140c));if(_0x24140c[_0xe3ec('0x12')]){if(_0x24140c[_0xe3ec('0x12')][_0xe3ec('0x13')]===0x1f4){logger[_0xe3ec('0x12')](_0xe3ec('0xd'),_0x582839,_0x24140c[_0xe3ec('0x12')]['message']);return _0x4f3a9c(_0x24140c[_0xe3ec('0x12')][_0xe3ec('0x14')]);}logger['error'](_0xe3ec('0xd'),_0x582839,_0x24140c[_0xe3ec('0x12')][_0xe3ec('0x14')]);return _0x2c1309(_0x24140c[_0xe3ec('0x12')][_0xe3ec('0x14')]);}else{logger[_0xe3ec('0xc')]('Dynamics365Field,\x20%s,\x20%s',_0x582839,_0xe3ec('0xe'));_0x2c1309(_0x24140c[_0xe3ec('0x15')][_0xe3ec('0x14')]);}})[_0xe3ec('0x16')](function(_0x5b5ab5){logger[_0xe3ec('0x12')](_0xe3ec('0xd'),_0x582839,_0x5b5ab5);_0x4f3a9c(_0x5b5ab5);});});}
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/index.js b/server/api/intFreshdeskAccount/index.js
index ee594fb..41aee75 100644
--- a/server/api/intFreshdeskAccount/index.js
+++ b/server/api/intFreshdeskAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x791e=['show','getConfigurations','post','/:id/configurations','update','delete','destroy','exports','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service','./intFreshdeskAccount.controller','get','/:id','isAuthenticated'];(function(_0x2618d4,_0x38b038){var _0xdd4cfc=function(_0x271071){while(--_0x271071){_0x2618d4['push'](_0x2618d4['shift']());}};_0xdd4cfc(++_0x38b038);}(_0x791e,0x16d));var _0xe791=function(_0x3cb12f,_0x5692c9){_0x3cb12f=_0x3cb12f-0x0;var _0x28cd58=_0x791e[_0x3cb12f];return _0x28cd58;};'use strict';var multer=require('multer');var util=require(_0xe791('0x0'));var path=require(_0xe791('0x1'));var timeout=require(_0xe791('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xe791('0x3'));var interaction=require(_0xe791('0x4'));var config=require('../../config/environment');var controller=require(_0xe791('0x5'));router[_0xe791('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0xe791('0x6')](_0xe791('0x7'),auth[_0xe791('0x8')](),controller[_0xe791('0x9')]);router['get']('/:id/configurations',auth[_0xe791('0x8')](),controller[_0xe791('0xa')]);router[_0xe791('0x6')]('/:id/fields',auth['isAuthenticated'](),controller['getFields']);router[_0xe791('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0xe791('0xb')](_0xe791('0xc'),auth[_0xe791('0x8')](),controller['addConfiguration']);router['put'](_0xe791('0x7'),auth['isAuthenticated'](),controller[_0xe791('0xd')]);router[_0xe791('0xe')](_0xe791('0x7'),auth[_0xe791('0x8')](),controller[_0xe791('0xf')]);module[_0xe791('0x10')]=router;
\ No newline at end of file
+var _0x9fe9=['isAuthenticated','index','show','/:id/configurations','/:id/fields','getFields','post','create','addConfiguration','put','/:id','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskAccount.controller','get'];(function(_0x52544f,_0x251b08){var _0x1248cb=function(_0x429bae){while(--_0x429bae){_0x52544f['push'](_0x52544f['shift']());}};_0x1248cb(++_0x251b08);}(_0x9fe9,0xce));var _0x99fe=function(_0x4210ed,_0x1ab215){_0x4210ed=_0x4210ed-0x0;var _0x394e18=_0x9fe9[_0x4210ed];return _0x394e18;};'use strict';var multer=require(_0x99fe('0x0'));var util=require(_0x99fe('0x1'));var path=require(_0x99fe('0x2'));var timeout=require('connect-timeout');var express=require(_0x99fe('0x3'));var router=express[_0x99fe('0x4')]();var auth=require(_0x99fe('0x5'));var interaction=require(_0x99fe('0x6'));var config=require(_0x99fe('0x7'));var controller=require(_0x99fe('0x8'));router[_0x99fe('0x9')]('/',auth[_0x99fe('0xa')](),controller[_0x99fe('0xb')]);router['get']('/:id',auth[_0x99fe('0xa')](),controller[_0x99fe('0xc')]);router[_0x99fe('0x9')](_0x99fe('0xd'),auth[_0x99fe('0xa')](),controller['getConfigurations']);router['get'](_0x99fe('0xe'),auth['isAuthenticated'](),controller[_0x99fe('0xf')]);router[_0x99fe('0x10')]('/',auth[_0x99fe('0xa')](),controller[_0x99fe('0x11')]);router[_0x99fe('0x10')](_0x99fe('0xd'),auth[_0x99fe('0xa')](),controller[_0x99fe('0x12')]);router[_0x99fe('0x13')](_0x99fe('0x14'),auth[_0x99fe('0xa')](),controller['update']);router[_0x99fe('0x15')](_0x99fe('0x14'),auth['isAuthenticated'](),controller[_0x99fe('0x16')]);module[_0x99fe('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js
index 9dbd90a..c534da7 100644
--- a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js
+++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x771e=['exports','STRING','username','sequelize'];(function(_0x291662,_0x59d320){var _0x3a921e=function(_0x520c08){while(--_0x520c08){_0x291662['push'](_0x291662['shift']());}};_0x3a921e(++_0x59d320);}(_0x771e,0xa7));var _0xe771=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x771e[_0x19950b];return _0x3c6b41;};'use strict';var Sequelize=require(_0xe771('0x0'));module[_0xe771('0x1')]={'name':{'type':Sequelize[_0xe771('0x2')]},'description':{'type':Sequelize[_0xe771('0x2')]},'username':{'type':Sequelize[_0xe771('0x2')],'unique':_0xe771('0x3')},'apiKey':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xe771('0x2')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0xe771('0x2')]}};
\ No newline at end of file
+var _0xa918=['exports','STRING','username','remoteUri','sequelize'];(function(_0x93a34d,_0x25feee){var _0x567363=function(_0x4e7384){while(--_0x4e7384){_0x93a34d['push'](_0x93a34d['shift']());}};_0x567363(++_0x25feee);}(_0xa918,0x11c));var _0x8a91=function(_0x1e98c3,_0x4df38b){_0x1e98c3=_0x1e98c3-0x0;var _0x1eac8e=_0xa918[_0x1e98c3];return _0x1eac8e;};'use strict';var Sequelize=require(_0x8a91('0x0'));module[_0x8a91('0x1')]={'name':{'type':Sequelize[_0x8a91('0x2')]},'description':{'type':Sequelize[_0x8a91('0x2')]},'username':{'type':Sequelize[_0x8a91('0x2')],'unique':_0x8a91('0x3')},'apiKey':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x8a91('0x2')],'unique':_0x8a91('0x4')},'serverUrl':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js
index 852879b..913854e 100644
--- a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js
+++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc7da=['../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','http','test','request','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','error','message','catch','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','name','send','index','FreshdeskAccount','keys','filters','intersection','model','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','key','field','options','rows','params','includeAll','merge','find','create','body','getConfigurations','findOne','rawAttributes','map','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','FreshdeskConfiguration','FreshdeskField','getFields','remoteUri','apiKey','slice','substring','GET','api/v2/ticket_fields','format','Basic\x20%s','base64','requester','subject','agent','description','priority','group','source','ticket_type','company','remove','includes','default','custom_text','type','custom_dropdown','label','choices','capitalize','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis'];(function(_0x124096,_0xbb4341){var _0x123aed=function(_0x4db081){while(--_0x4db081){_0x124096['push'](_0x124096['shift']());}};_0x123aed(++_0xbb4341);}(_0xc7da,0x1de));var _0xac7d=function(_0x36b5a1,_0x3a8581){_0x36b5a1=_0x36b5a1-0x0;var _0x38e75e=_0xc7da[_0x36b5a1];return _0x38e75e;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xac7d('0x0'));var rimraf=require(_0xac7d('0x1'));var zipdir=require(_0xac7d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xac7d('0x3'));var moment=require(_0xac7d('0x4'));var BPromise=require(_0xac7d('0x5'));var Mustache=require('mustache');var util=require(_0xac7d('0x6'));var path=require(_0xac7d('0x7'));var sox=require(_0xac7d('0x8'));var csv=require(_0xac7d('0x9'));var ejs=require(_0xac7d('0xa'));var fs=require('fs');var _=require(_0xac7d('0xb'));var squel=require(_0xac7d('0xc'));var crypto=require(_0xac7d('0xd'));var jsforce=require(_0xac7d('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xac7d('0xf'));var Papa=require(_0xac7d('0x10'));var Redis=require(_0xac7d('0x11'));var authService=require(_0xac7d('0x12'));var qs=require(_0xac7d('0x13'));var hardwareService=require(_0xac7d('0x14'));var logger=require(_0xac7d('0x15'))('api');var utils=require(_0xac7d('0x16'));var config=require('../../config/environment');var db=require(_0xac7d('0x17'))['db'];var integrations=require(_0xac7d('0x18'));var jayson=require(_0xac7d('0x19'));var client=jayson['client'][_0xac7d('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x1d0f6c,_0x3314ae,_0x17515f){if(_0x17515f){var _0xa40773=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0xa40773[_0xac7d('0x1b')](_0x3314ae)){return _0x1d0f6c;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x1d0f6c;}}function respondWithRpcPromise(_0x412ccc,_0x14ad90,_0x5d630b,_0x3d26a8){return new BPromise(function(_0x23ccd3,_0x61e666){var _0x5c03f5=_0x3d26a8||client;return _0x5c03f5[_0xac7d('0x1c')](_0x412ccc,_0x5d630b)[_0xac7d('0x1d')](function(_0x14177b){logger[_0xac7d('0x1e')](_0xac7d('0x1f'),_0x14ad90,_0xac7d('0x20'));logger[_0xac7d('0x21')](_0xac7d('0x22'),_0x14ad90,'request\x20sent',JSON['stringify'](_0x14177b));if(_0x14177b[_0xac7d('0x23')]){if(_0x14177b['error']['code']===0x1f4){logger['error'](_0xac7d('0x1f'),_0x14ad90,_0x14177b[_0xac7d('0x23')]['message']);return _0x61e666(_0x14177b[_0xac7d('0x23')][_0xac7d('0x24')]);}logger[_0xac7d('0x23')]('FreshdeskAccount,\x20%s,\x20%s',_0x14ad90,_0x14177b[_0xac7d('0x23')][_0xac7d('0x24')]);return _0x23ccd3(_0x14177b[_0xac7d('0x23')][_0xac7d('0x24')]);}else{logger[_0xac7d('0x1e')]('FreshdeskAccount,\x20%s,\x20%s',_0x14ad90,'request\x20sent');_0x23ccd3(_0x14177b['result'][_0xac7d('0x24')]);}})[_0xac7d('0x25')](function(_0x41ae14){logger['error'](_0xac7d('0x1f'),_0x14ad90,_0x41ae14);_0x61e666(_0x41ae14);});});}function respondWithStatusCode(_0x92bc33,_0x4584de){_0x4584de=_0x4584de||0xcc;return function(_0x277463){if(_0x277463){return _0x92bc33[_0xac7d('0x26')](_0x4584de);}return _0x92bc33['status'](_0x4584de)['end']();};}function respondWithResult(_0x2ef40d,_0xc72379){_0xc72379=_0xc72379||0xc8;return function(_0x4e3c13){if(_0x4e3c13){return _0x2ef40d[_0xac7d('0x27')](_0xc72379)[_0xac7d('0x28')](_0x4e3c13);}};}function respondWithFilteredResult(_0xcae2e3,_0x2143b0){return function(_0x3869ec){if(_0x3869ec){var _0x2c4c95=_0x3869ec[_0xac7d('0x29')],_0x34c176=_0x2143b0[_0xac7d('0x2a')],_0x375d80=_0x2143b0['offset']+_0x2143b0[_0xac7d('0x2b')],_0x4126fa;if(_0x375d80>=_0x2c4c95){_0x375d80=_0x2c4c95;_0x4126fa=0xc8;}else{_0x4126fa=0xce;}_0xcae2e3[_0xac7d('0x27')](_0x4126fa);return _0xcae2e3[_0xac7d('0x2c')](_0xac7d('0x2d'),_0x34c176+'-'+_0x375d80+'/'+_0x2c4c95)[_0xac7d('0x28')](_0x3869ec);}return null;};}function patchUpdates(_0x492af4){return function(_0x32a5c1){try{jsonpatch[_0xac7d('0x2e')](_0x32a5c1,_0x492af4,!![]);}catch(_0x39ce94){return BPromise[_0xac7d('0x2f')](_0x39ce94);}return _0x32a5c1[_0xac7d('0x30')]();};}function saveUpdates(_0xf59aaa,_0x2ffe43){return function(_0xcad3ba){if(_0xcad3ba){return _0xcad3ba[_0xac7d('0x31')](_0xf59aaa)[_0xac7d('0x1d')](function(_0x35ae14){return _0x35ae14;});}return null;};}function removeEntity(_0x5723b0,_0x44f839){return function(_0x36caa9){if(_0x36caa9){return _0x36caa9[_0xac7d('0x32')]()[_0xac7d('0x1d')](function(){_0x5723b0[_0xac7d('0x27')](0xcc)['end']();});}};}function handleEntityNotFound(_0x24ba1e,_0x137af7){return function(_0x2ef012){if(!_0x2ef012){_0x24ba1e[_0xac7d('0x26')](0x194);}return _0x2ef012;};}function handleError(_0x538af8,_0x429211){_0x429211=_0x429211||0x1f4;return function(_0x28680e){logger[_0xac7d('0x23')](_0x28680e['stack']);if(_0x28680e[_0xac7d('0x33')]){delete _0x28680e[_0xac7d('0x33')];}_0x538af8[_0xac7d('0x27')](_0x429211)[_0xac7d('0x34')](_0x28680e);};}exports[_0xac7d('0x35')]=function(_0x5d3275,_0x51af76){var _0x2aed2c={},_0x2a1b44={},_0x5f26f3={'count':0x0,'rows':[]};var _0x2878e3=db[_0xac7d('0x36')]['rawAttributes'];_0x2a1b44['model']=_['keys'](_0x2878e3);_0x2a1b44['query']=_[_0xac7d('0x37')](_0x5d3275['query']);_0x2a1b44[_0xac7d('0x38')]=_[_0xac7d('0x39')](_0x2a1b44[_0xac7d('0x3a')],_0x2a1b44[_0xac7d('0x3b')]);_0x2aed2c[_0xac7d('0x3c')]=_[_0xac7d('0x39')](_0x2a1b44[_0xac7d('0x3a')],qs['fields'](_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x3d')]));_0x2aed2c[_0xac7d('0x3c')]=_0x2aed2c[_0xac7d('0x3c')][_0xac7d('0x3e')]?_0x2aed2c[_0xac7d('0x3c')]:_0x2a1b44[_0xac7d('0x3a')];if(!_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x3f')](_0xac7d('0x40'))){_0x2aed2c[_0xac7d('0x2b')]=qs[_0xac7d('0x2b')](_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x2b')]);_0x2aed2c[_0xac7d('0x2a')]=qs['offset'](_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x2a')]);}_0x2aed2c[_0xac7d('0x41')]=qs[_0xac7d('0x42')](_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x42')]);_0x2aed2c[_0xac7d('0x43')]=qs['filters'](_[_0xac7d('0x44')](_0x5d3275[_0xac7d('0x3b')],_0x2a1b44[_0xac7d('0x38')]));if(_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x45')]){_0x2aed2c[_0xac7d('0x43')]=_['merge'](_0x2aed2c[_0xac7d('0x43')],{'$or':_['map'](_0x2878e3,function(_0x5c1e3e){if(_0x5c1e3e['type'][_0xac7d('0x46')]!=='VIRTUAL'){var _0x46cc32={};_0x46cc32[_0x5c1e3e[_0xac7d('0x47')]]={'$like':'%'+_0x5d3275[_0xac7d('0x3b')][_0xac7d('0x45')]+'%'};return _0x46cc32;}})});}_0x2aed2c=_['merge']({},_0x2aed2c,_0x5d3275[_0xac7d('0x48')]);var _0x160443={'where':_0x2aed2c[_0xac7d('0x43')]};return db['FreshdeskAccount']['count'](_0x160443)[_0xac7d('0x1d')](function(_0x1ce6af){_0x5f26f3[_0xac7d('0x29')]=_0x1ce6af;if(_0x5d3275['query']['includeAll']){_0x2aed2c['include']=[{'all':!![]}];}return db[_0xac7d('0x36')]['findAll'](_0x2aed2c);})[_0xac7d('0x1d')](function(_0x2a842d){_0x5f26f3[_0xac7d('0x49')]=_0x2a842d;return _0x5f26f3;})['then'](respondWithFilteredResult(_0x51af76,_0x2aed2c))[_0xac7d('0x25')](handleError(_0x51af76,null));};exports['show']=function(_0x2ea705,_0x9cd78f){var _0x3284e3={'raw':![],'where':{'id':_0x2ea705[_0xac7d('0x4a')]['id']}},_0x1ada19={};_0x1ada19[_0xac7d('0x3a')]=_[_0xac7d('0x37')](db[_0xac7d('0x36')]['rawAttributes']);_0x1ada19['query']=_['keys'](_0x2ea705['query']);_0x1ada19[_0xac7d('0x38')]=_[_0xac7d('0x39')](_0x1ada19[_0xac7d('0x3a')],_0x1ada19['query']);_0x3284e3[_0xac7d('0x3c')]=_[_0xac7d('0x39')](_0x1ada19['model'],qs[_0xac7d('0x3d')](_0x2ea705[_0xac7d('0x3b')]['fields']));_0x3284e3['attributes']=_0x3284e3[_0xac7d('0x3c')][_0xac7d('0x3e')]?_0x3284e3['attributes']:_0x1ada19[_0xac7d('0x3a')];if(_0x2ea705[_0xac7d('0x3b')][_0xac7d('0x4b')]){_0x3284e3['include']=[{'all':!![]}];}_0x3284e3=_[_0xac7d('0x4c')]({},_0x3284e3,_0x2ea705[_0xac7d('0x48')]);return db[_0xac7d('0x36')][_0xac7d('0x4d')](_0x3284e3)['then'](handleEntityNotFound(_0x9cd78f,null))[_0xac7d('0x1d')](respondWithResult(_0x9cd78f,null))[_0xac7d('0x25')](handleError(_0x9cd78f,null));};exports[_0xac7d('0x4e')]=function(_0xab61f2,_0x36f430){return db[_0xac7d('0x36')][_0xac7d('0x4e')](_0xab61f2['body'],{})[_0xac7d('0x1d')](respondWithResult(_0x36f430,0xc9))[_0xac7d('0x25')](handleError(_0x36f430,null));};exports['update']=function(_0x35a440,_0x2d122e){if(_0x35a440['body']['id']){delete _0x35a440[_0xac7d('0x4f')]['id'];}return db[_0xac7d('0x36')][_0xac7d('0x4d')]({'where':{'id':_0x35a440[_0xac7d('0x4a')]['id']}})[_0xac7d('0x1d')](handleEntityNotFound(_0x2d122e,null))[_0xac7d('0x1d')](saveUpdates(_0x35a440[_0xac7d('0x4f')],null))[_0xac7d('0x1d')](respondWithResult(_0x2d122e,null))[_0xac7d('0x25')](handleError(_0x2d122e,null));};exports['destroy']=function(_0x49a6de,_0x2ae3c7){return db[_0xac7d('0x36')][_0xac7d('0x4d')]({'where':{'id':_0x49a6de[_0xac7d('0x4a')]['id']}})[_0xac7d('0x1d')](handleEntityNotFound(_0x2ae3c7,null))[_0xac7d('0x1d')](removeEntity(_0x2ae3c7,null))[_0xac7d('0x25')](handleError(_0x2ae3c7,null));};exports[_0xac7d('0x50')]=function(_0xe574d7,_0x38f2e1,_0x4d5618){var _0x4e8fe7={};var _0x1a97df={};var _0x1b6c85;var _0x528df6;return db[_0xac7d('0x36')][_0xac7d('0x51')]({'where':{'id':_0xe574d7[_0xac7d('0x4a')]['id']}})[_0xac7d('0x1d')](handleEntityNotFound(_0x38f2e1,null))[_0xac7d('0x1d')](function(_0x5445b8){if(_0x5445b8){_0x1b6c85=_0x5445b8;_0x1a97df[_0xac7d('0x3a')]=_['keys'](db['FreshdeskConfiguration'][_0xac7d('0x52')]);_0x1a97df[_0xac7d('0x3b')]=_[_0xac7d('0x37')](_0xe574d7[_0xac7d('0x3b')]);_0x1a97df[_0xac7d('0x38')]=_['intersection'](_0x1a97df[_0xac7d('0x3a')],_0x1a97df['query']);_0x4e8fe7['attributes']=_['intersection'](_0x1a97df['model'],qs['fields'](_0xe574d7[_0xac7d('0x3b')]['fields']));_0x4e8fe7[_0xac7d('0x3c')]=_0x4e8fe7[_0xac7d('0x3c')][_0xac7d('0x3e')]?_0x4e8fe7[_0xac7d('0x3c')]:_0x1a97df[_0xac7d('0x3a')];_0x4e8fe7['order']=qs[_0xac7d('0x42')](_0xe574d7[_0xac7d('0x3b')]['sort']);_0x4e8fe7[_0xac7d('0x43')]=qs[_0xac7d('0x38')](_['pick'](_0xe574d7[_0xac7d('0x3b')],_0x1a97df['filters']));if(_0xe574d7[_0xac7d('0x3b')][_0xac7d('0x45')]){_0x4e8fe7[_0xac7d('0x43')]=_[_0xac7d('0x4c')](_0x4e8fe7[_0xac7d('0x43')],{'$or':_[_0xac7d('0x53')](_0x4e8fe7[_0xac7d('0x3c')],function(_0x337fc8){var _0x3a3056={};_0x3a3056[_0x337fc8]={'$like':'%'+_0xe574d7[_0xac7d('0x3b')]['filter']+'%'};return _0x3a3056;})});}_0x4e8fe7=_['merge']({},_0x4e8fe7,_0xe574d7['options']);return _0x1b6c85[_0xac7d('0x50')](_0x4e8fe7);}})[_0xac7d('0x1d')](function(_0x3c0c3c){if(_0x3c0c3c){_0x528df6=_0x3c0c3c[_0xac7d('0x3e')];if(!_0xe574d7[_0xac7d('0x3b')][_0xac7d('0x3f')](_0xac7d('0x40'))){_0x4e8fe7[_0xac7d('0x2b')]=qs[_0xac7d('0x2b')](_0xe574d7[_0xac7d('0x3b')][_0xac7d('0x2b')]);_0x4e8fe7[_0xac7d('0x2a')]=qs[_0xac7d('0x2a')](_0xe574d7[_0xac7d('0x3b')][_0xac7d('0x2a')]);}return _0x1b6c85[_0xac7d('0x50')](_0x4e8fe7);}})[_0xac7d('0x1d')](function(_0x5e2bf1){if(_0x5e2bf1){return _0x5e2bf1?{'count':_0x528df6,'rows':_0x5e2bf1}:null;}})[_0xac7d('0x1d')](respondWithResult(_0x38f2e1,null))[_0xac7d('0x25')](handleError(_0x38f2e1,null));};exports[_0xac7d('0x54')]=function(_0x2496da,_0x11b5d0,_0x59d396){if(_0x2496da[_0xac7d('0x4f')]['id']){delete _0x2496da[_0xac7d('0x4f')]['id'];}return db[_0xac7d('0x36')][_0xac7d('0x51')]({'where':{'id':_0x2496da[_0xac7d('0x4a')]['id']}})[_0xac7d('0x1d')](handleEntityNotFound(_0x11b5d0,null))[_0xac7d('0x1d')](function(_0x1d811b){if(_0x1d811b){_0x2496da[_0xac7d('0x4f')][_0xac7d('0x55')]=_0x1d811b['id'];_0x2496da['body'][_0xac7d('0x56')]=integrations[_0xac7d('0x57')](_0x2496da[_0xac7d('0x4f')][_0xac7d('0x58')],_0x2496da[_0xac7d('0x4f')]['type']);_0x2496da[_0xac7d('0x4f')][_0xac7d('0x59')]=integrations['getDescriptions'](_0x2496da['body'][_0xac7d('0x58')],_0x2496da[_0xac7d('0x4f')]['type']);return db[_0xac7d('0x5a')][_0xac7d('0x4e')](_0x2496da[_0xac7d('0x4f')],{'include':[{'model':db[_0xac7d('0x5b')],'as':_0xac7d('0x56')},{'model':db[_0xac7d('0x5b')],'as':_0xac7d('0x59')}]});}return null;})[_0xac7d('0x1d')](respondWithResult(_0x11b5d0,null))[_0xac7d('0x25')](handleError(_0x11b5d0,null));};exports[_0xac7d('0x5c')]=function(_0x3a7e4c,_0x544ce8,_0x1e2915){var _0x19d11f='';return db[_0xac7d('0x36')][_0xac7d('0x51')]({'where':{'id':_0x3a7e4c['params']['id']},'attributes':['id',_0xac7d('0x5d'),_0xac7d('0x5e')]})[_0xac7d('0x1d')](handleEntityNotFound(_0x544ce8,null))[_0xac7d('0x1d')](function(_0x5ae14a){if(_0x5ae14a){_0x19d11f=_0x5ae14a[_0xac7d('0x5d')];var _0x43df6c=_0x19d11f[_0xac7d('0x5f')](-0x1);if(_0x43df6c==='/'){_0x19d11f=_0x19d11f[_0xac7d('0x60')](0x0,_0x19d11f['lastIndexOf'](_0x43df6c));}return rp({'method':_0xac7d('0x61'),'uri':util['format']('%s/%s',_0x19d11f,_0xac7d('0x62')),'headers':{'Authorization':util[_0xac7d('0x63')](_0xac7d('0x64'),new Buffer(util['format']('%s:X',_0x5ae14a[_0xac7d('0x5e')]))['toString'](_0xac7d('0x65')))},'json':!![]});}})[_0xac7d('0x1d')](function(_0x587f0c){if(_0x587f0c){var _0x1884b4=[_0xac7d('0x66'),_0xac7d('0x67'),_0xac7d('0x68'),_0xac7d('0x69'),_0xac7d('0x27'),_0xac7d('0x6a'),_0xac7d('0x6b'),_0xac7d('0x6c'),_0xac7d('0x6d'),_0xac7d('0x6b'),_0xac7d('0x6e')];_[_0xac7d('0x6f')](_0x587f0c,function(_0x3e864d){return _0x1884b4[_0xac7d('0x70')](_0x3e864d[_0xac7d('0x33')])||!_0x3e864d[_0xac7d('0x71')]&&_0x3e864d['type']!==_0xac7d('0x72')&&_0x3e864d[_0xac7d('0x73')]!==_0xac7d('0x74');});return{'count':_0x587f0c[_0xac7d('0x3e')],'rows':_[_0xac7d('0x53')](_0x587f0c,function(_0x5bc0ac){return{'id':_0x5bc0ac['name'],'name':_0x5bc0ac[_0xac7d('0x75')],'custom':!_0x5bc0ac['default'],'options':_0x5bc0ac[_0xac7d('0x76')]?_[_0xac7d('0x53')](_0x5bc0ac['choices'],function(_0xe787da){return{'name':_[_0xac7d('0x77')](_0xe787da),'value':_0xe787da};}):[]};})};}})['then'](respondWithResult(_0x544ce8,null))['catch'](function(_0x4210a6){var _0x290120=_0x3a7e4c[_0xac7d('0x3b')][_0xac7d('0x1b')]?0x1f4:_0x4210a6[_0xac7d('0x78')]||0x1f4;logger['error'](_0xac7d('0x79'),_0xac7d('0x5c'),_0x290120,JSON[_0xac7d('0x7a')](_0x4210a6));delete _0x4210a6[_0xac7d('0x33')];if(_0x290120===0x191){_0x290120=0x190;}_0x544ce8['status'](_0x290120)[_0xac7d('0x34')](_0x3a7e4c[_0xac7d('0x3b')][_0xac7d('0x1b')]?{'message':_0xac7d('0x7b'),'statusCode':_0x4210a6[_0xac7d('0x78')]}:_0x4210a6);});};
\ No newline at end of file
+var _0x335a=['error','code','message','result','catch','sendStatus','end','json','count','offset','limit','status','Content-Range','apply','reject','save','update','destroy','stack','name','index','FreshdeskAccount','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','include','findAll','rows','show','params','find','create','body','getConfigurations','findOne','FreshdeskConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','FreshdeskField','getFields','remoteUri','slice','substring','lastIndexOf','format','Basic\x20%s','%s:X','apiKey','toString','base64','requester','subject','agent','description','ticket_type','company','remove','includes','default','custom_text','choices','capitalize','statusCode','getFields,\x20%s,\x20%s,\x20%s','send','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','to-csv','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','request','then','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x4ff9c1,_0x57d31b){var _0x4bd1a7=function(_0x508013){while(--_0x508013){_0x4ff9c1['push'](_0x4ff9c1['shift']());}};_0x4bd1a7(++_0x57d31b);}(_0x335a,0x150));var _0xa335=function(_0x2e9693,_0x5dca3f){_0x2e9693=_0x2e9693-0x0;var _0x219b5a=_0x335a[_0x2e9693];return _0x219b5a;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xa335('0x0'));var zipdir=require(_0xa335('0x1'));var jsonpatch=require(_0xa335('0x2'));var rp=require(_0xa335('0x3'));var moment=require(_0xa335('0x4'));var BPromise=require(_0xa335('0x5'));var Mustache=require(_0xa335('0x6'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xa335('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xa335('0x8'));var squel=require(_0xa335('0x9'));var crypto=require(_0xa335('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xa335('0x7'));var querystring=require(_0xa335('0xb'));var Papa=require(_0xa335('0xc'));var Redis=require(_0xa335('0xd'));var authService=require(_0xa335('0xe'));var qs=require(_0xa335('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa335('0x10'))(_0xa335('0x11'));var utils=require(_0xa335('0x12'));var config=require(_0xa335('0x13'));var db=require(_0xa335('0x14'))['db'];var integrations=require(_0xa335('0x15'));var jayson=require(_0xa335('0x16'));var client=jayson[_0xa335('0x17')][_0xa335('0x18')]({'port':0x232a});function checkPasswordPattern(_0x217cb9,_0x56c376,_0x285d0e){if(_0x285d0e){var _0x51daa9=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x51daa9[_0xa335('0x19')](_0x56c376)){return _0x217cb9;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x217cb9;}}function respondWithRpcPromise(_0x94421e,_0x539ec5,_0x292b29,_0x5c9acf){return new BPromise(function(_0x43f080,_0x4d7824){var _0x56608b=_0x5c9acf||client;return _0x56608b[_0xa335('0x1a')](_0x94421e,_0x292b29)[_0xa335('0x1b')](function(_0x2f2f12){logger['info'](_0xa335('0x1c'),_0x539ec5,_0xa335('0x1d'));logger[_0xa335('0x1e')](_0xa335('0x1f'),_0x539ec5,_0xa335('0x1d'),JSON[_0xa335('0x20')](_0x2f2f12));if(_0x2f2f12[_0xa335('0x21')]){if(_0x2f2f12[_0xa335('0x21')][_0xa335('0x22')]===0x1f4){logger[_0xa335('0x21')]('FreshdeskAccount,\x20%s,\x20%s',_0x539ec5,_0x2f2f12['error']['message']);return _0x4d7824(_0x2f2f12['error'][_0xa335('0x23')]);}logger['error']('FreshdeskAccount,\x20%s,\x20%s',_0x539ec5,_0x2f2f12[_0xa335('0x21')][_0xa335('0x23')]);return _0x43f080(_0x2f2f12[_0xa335('0x21')]['message']);}else{logger['info']('FreshdeskAccount,\x20%s,\x20%s',_0x539ec5,_0xa335('0x1d'));_0x43f080(_0x2f2f12[_0xa335('0x24')][_0xa335('0x23')]);}})[_0xa335('0x25')](function(_0x2f593f){logger[_0xa335('0x21')](_0xa335('0x1c'),_0x539ec5,_0x2f593f);_0x4d7824(_0x2f593f);});});}function respondWithStatusCode(_0x552e61,_0x4f7202){_0x4f7202=_0x4f7202||0xcc;return function(_0x5c3653){if(_0x5c3653){return _0x552e61[_0xa335('0x26')](_0x4f7202);}return _0x552e61['status'](_0x4f7202)[_0xa335('0x27')]();};}function respondWithResult(_0x3cb9f4,_0x26c081){_0x26c081=_0x26c081||0xc8;return function(_0x4dcac4){if(_0x4dcac4){return _0x3cb9f4['status'](_0x26c081)[_0xa335('0x28')](_0x4dcac4);}};}function respondWithFilteredResult(_0x1f2653,_0x34d041){return function(_0x3ae893){if(_0x3ae893){var _0x16f104=_0x3ae893[_0xa335('0x29')],_0x1231db=_0x34d041[_0xa335('0x2a')],_0x5a7d84=_0x34d041[_0xa335('0x2a')]+_0x34d041[_0xa335('0x2b')],_0x1f76c5;if(_0x5a7d84>=_0x16f104){_0x5a7d84=_0x16f104;_0x1f76c5=0xc8;}else{_0x1f76c5=0xce;}_0x1f2653[_0xa335('0x2c')](_0x1f76c5);return _0x1f2653['set'](_0xa335('0x2d'),_0x1231db+'-'+_0x5a7d84+'/'+_0x16f104)[_0xa335('0x28')](_0x3ae893);}return null;};}function patchUpdates(_0x4b5634){return function(_0x57a40b){try{jsonpatch[_0xa335('0x2e')](_0x57a40b,_0x4b5634,!![]);}catch(_0x1522e8){return BPromise[_0xa335('0x2f')](_0x1522e8);}return _0x57a40b[_0xa335('0x30')]();};}function saveUpdates(_0x54b01e,_0x397e0f){return function(_0x1e9cfe){if(_0x1e9cfe){return _0x1e9cfe[_0xa335('0x31')](_0x54b01e)['then'](function(_0x5aa23b){return _0x5aa23b;});}return null;};}function removeEntity(_0x4dbcf2,_0x9191ab){return function(_0x4cd46e){if(_0x4cd46e){return _0x4cd46e[_0xa335('0x32')]()[_0xa335('0x1b')](function(){_0x4dbcf2[_0xa335('0x2c')](0xcc)[_0xa335('0x27')]();});}};}function handleEntityNotFound(_0x44f196,_0x3119ce){return function(_0x749323){if(!_0x749323){_0x44f196[_0xa335('0x26')](0x194);}return _0x749323;};}function handleError(_0x132f9c,_0x51a0c3){_0x51a0c3=_0x51a0c3||0x1f4;return function(_0x154f8e){logger[_0xa335('0x21')](_0x154f8e[_0xa335('0x33')]);if(_0x154f8e[_0xa335('0x34')]){delete _0x154f8e['name'];}_0x132f9c['status'](_0x51a0c3)['send'](_0x154f8e);};}exports[_0xa335('0x35')]=function(_0x578ecc,_0x2b125d){var _0x4a3eb1={},_0x45ca10={},_0x30a11d={'count':0x0,'rows':[]};var _0x2928b5=db[_0xa335('0x36')][_0xa335('0x37')];_0x45ca10[_0xa335('0x38')]=_['keys'](_0x2928b5);_0x45ca10[_0xa335('0x39')]=_[_0xa335('0x3a')](_0x578ecc[_0xa335('0x39')]);_0x45ca10[_0xa335('0x3b')]=_[_0xa335('0x3c')](_0x45ca10[_0xa335('0x38')],_0x45ca10['query']);_0x4a3eb1[_0xa335('0x3d')]=_[_0xa335('0x3c')](_0x45ca10[_0xa335('0x38')],qs[_0xa335('0x3e')](_0x578ecc[_0xa335('0x39')][_0xa335('0x3e')]));_0x4a3eb1['attributes']=_0x4a3eb1[_0xa335('0x3d')][_0xa335('0x3f')]?_0x4a3eb1['attributes']:_0x45ca10['model'];if(!_0x578ecc['query'][_0xa335('0x40')](_0xa335('0x41'))){_0x4a3eb1[_0xa335('0x2b')]=qs[_0xa335('0x2b')](_0x578ecc[_0xa335('0x39')][_0xa335('0x2b')]);_0x4a3eb1[_0xa335('0x2a')]=qs['offset'](_0x578ecc[_0xa335('0x39')]['offset']);}_0x4a3eb1[_0xa335('0x42')]=qs[_0xa335('0x43')](_0x578ecc[_0xa335('0x39')][_0xa335('0x43')]);_0x4a3eb1[_0xa335('0x44')]=qs[_0xa335('0x3b')](_[_0xa335('0x45')](_0x578ecc[_0xa335('0x39')],_0x45ca10[_0xa335('0x3b')]));if(_0x578ecc[_0xa335('0x39')][_0xa335('0x46')]){_0x4a3eb1[_0xa335('0x44')]=_[_0xa335('0x47')](_0x4a3eb1['where'],{'$or':_[_0xa335('0x48')](_0x2928b5,function(_0x24613c){if(_0x24613c[_0xa335('0x49')][_0xa335('0x4a')]!==_0xa335('0x4b')){var _0x52fb90={};_0x52fb90[_0x24613c[_0xa335('0x4c')]]={'$like':'%'+_0x578ecc[_0xa335('0x39')][_0xa335('0x46')]+'%'};return _0x52fb90;}})});}_0x4a3eb1=_[_0xa335('0x47')]({},_0x4a3eb1,_0x578ecc[_0xa335('0x4d')]);var _0x758050={'where':_0x4a3eb1[_0xa335('0x44')]};return db['FreshdeskAccount'][_0xa335('0x29')](_0x758050)[_0xa335('0x1b')](function(_0xb411ea){_0x30a11d['count']=_0xb411ea;if(_0x578ecc['query']['includeAll']){_0x4a3eb1[_0xa335('0x4e')]=[{'all':!![]}];}return db[_0xa335('0x36')][_0xa335('0x4f')](_0x4a3eb1);})['then'](function(_0xc09857){_0x30a11d[_0xa335('0x50')]=_0xc09857;return _0x30a11d;})[_0xa335('0x1b')](respondWithFilteredResult(_0x2b125d,_0x4a3eb1))[_0xa335('0x25')](handleError(_0x2b125d,null));};exports[_0xa335('0x51')]=function(_0x553bb6,_0x3ae0e0){var _0x58a02e={'raw':![],'where':{'id':_0x553bb6[_0xa335('0x52')]['id']}},_0x3f1c2d={};_0x3f1c2d[_0xa335('0x38')]=_[_0xa335('0x3a')](db[_0xa335('0x36')][_0xa335('0x37')]);_0x3f1c2d[_0xa335('0x39')]=_[_0xa335('0x3a')](_0x553bb6['query']);_0x3f1c2d[_0xa335('0x3b')]=_[_0xa335('0x3c')](_0x3f1c2d[_0xa335('0x38')],_0x3f1c2d['query']);_0x58a02e[_0xa335('0x3d')]=_['intersection'](_0x3f1c2d['model'],qs[_0xa335('0x3e')](_0x553bb6[_0xa335('0x39')][_0xa335('0x3e')]));_0x58a02e[_0xa335('0x3d')]=_0x58a02e['attributes'][_0xa335('0x3f')]?_0x58a02e[_0xa335('0x3d')]:_0x3f1c2d['model'];if(_0x553bb6[_0xa335('0x39')]['includeAll']){_0x58a02e[_0xa335('0x4e')]=[{'all':!![]}];}_0x58a02e=_[_0xa335('0x47')]({},_0x58a02e,_0x553bb6[_0xa335('0x4d')]);return db[_0xa335('0x36')][_0xa335('0x53')](_0x58a02e)[_0xa335('0x1b')](handleEntityNotFound(_0x3ae0e0,null))[_0xa335('0x1b')](respondWithResult(_0x3ae0e0,null))['catch'](handleError(_0x3ae0e0,null));};exports[_0xa335('0x54')]=function(_0x4d540f,_0x2d6e89){return db[_0xa335('0x36')]['create'](_0x4d540f[_0xa335('0x55')],{})[_0xa335('0x1b')](respondWithResult(_0x2d6e89,0xc9))[_0xa335('0x25')](handleError(_0x2d6e89,null));};exports[_0xa335('0x31')]=function(_0x2493b8,_0x209636){if(_0x2493b8[_0xa335('0x55')]['id']){delete _0x2493b8[_0xa335('0x55')]['id'];}return db['FreshdeskAccount'][_0xa335('0x53')]({'where':{'id':_0x2493b8[_0xa335('0x52')]['id']}})['then'](handleEntityNotFound(_0x209636,null))[_0xa335('0x1b')](saveUpdates(_0x2493b8[_0xa335('0x55')],null))['then'](respondWithResult(_0x209636,null))['catch'](handleError(_0x209636,null));};exports[_0xa335('0x32')]=function(_0x20f539,_0x712df){return db[_0xa335('0x36')]['find']({'where':{'id':_0x20f539[_0xa335('0x52')]['id']}})[_0xa335('0x1b')](handleEntityNotFound(_0x712df,null))[_0xa335('0x1b')](removeEntity(_0x712df,null))[_0xa335('0x25')](handleError(_0x712df,null));};exports[_0xa335('0x56')]=function(_0x1485fc,_0x5b0145,_0x57591b){var _0x134256={};var _0x277ecb={};var _0x6e17a8;var _0x3ce8d5;return db[_0xa335('0x36')][_0xa335('0x57')]({'where':{'id':_0x1485fc[_0xa335('0x52')]['id']}})['then'](handleEntityNotFound(_0x5b0145,null))['then'](function(_0x29fa55){if(_0x29fa55){_0x6e17a8=_0x29fa55;_0x277ecb[_0xa335('0x38')]=_[_0xa335('0x3a')](db[_0xa335('0x58')][_0xa335('0x37')]);_0x277ecb[_0xa335('0x39')]=_[_0xa335('0x3a')](_0x1485fc[_0xa335('0x39')]);_0x277ecb[_0xa335('0x3b')]=_[_0xa335('0x3c')](_0x277ecb[_0xa335('0x38')],_0x277ecb[_0xa335('0x39')]);_0x134256[_0xa335('0x3d')]=_[_0xa335('0x3c')](_0x277ecb['model'],qs[_0xa335('0x3e')](_0x1485fc['query']['fields']));_0x134256[_0xa335('0x3d')]=_0x134256[_0xa335('0x3d')][_0xa335('0x3f')]?_0x134256['attributes']:_0x277ecb[_0xa335('0x38')];_0x134256[_0xa335('0x42')]=qs[_0xa335('0x43')](_0x1485fc['query'][_0xa335('0x43')]);_0x134256[_0xa335('0x44')]=qs[_0xa335('0x3b')](_[_0xa335('0x45')](_0x1485fc[_0xa335('0x39')],_0x277ecb[_0xa335('0x3b')]));if(_0x1485fc[_0xa335('0x39')][_0xa335('0x46')]){_0x134256[_0xa335('0x44')]=_[_0xa335('0x47')](_0x134256[_0xa335('0x44')],{'$or':_[_0xa335('0x48')](_0x134256[_0xa335('0x3d')],function(_0x1a6619){var _0x25d451={};_0x25d451[_0x1a6619]={'$like':'%'+_0x1485fc[_0xa335('0x39')][_0xa335('0x46')]+'%'};return _0x25d451;})});}_0x134256=_[_0xa335('0x47')]({},_0x134256,_0x1485fc[_0xa335('0x4d')]);return _0x6e17a8[_0xa335('0x56')](_0x134256);}})[_0xa335('0x1b')](function(_0x18aa9d){if(_0x18aa9d){_0x3ce8d5=_0x18aa9d[_0xa335('0x3f')];if(!_0x1485fc[_0xa335('0x39')][_0xa335('0x40')](_0xa335('0x41'))){_0x134256['limit']=qs['limit'](_0x1485fc['query'][_0xa335('0x2b')]);_0x134256['offset']=qs[_0xa335('0x2a')](_0x1485fc['query'][_0xa335('0x2a')]);}return _0x6e17a8[_0xa335('0x56')](_0x134256);}})[_0xa335('0x1b')](function(_0x2689d9){if(_0x2689d9){return _0x2689d9?{'count':_0x3ce8d5,'rows':_0x2689d9}:null;}})[_0xa335('0x1b')](respondWithResult(_0x5b0145,null))['catch'](handleError(_0x5b0145,null));};exports[_0xa335('0x59')]=function(_0x4eee25,_0x3264ec,_0x889e07){if(_0x4eee25[_0xa335('0x55')]['id']){delete _0x4eee25[_0xa335('0x55')]['id'];}return db[_0xa335('0x36')]['findOne']({'where':{'id':_0x4eee25[_0xa335('0x52')]['id']}})[_0xa335('0x1b')](handleEntityNotFound(_0x3264ec,null))['then'](function(_0x617e79){if(_0x617e79){_0x4eee25[_0xa335('0x55')][_0xa335('0x5a')]=_0x617e79['id'];_0x4eee25['body'][_0xa335('0x5b')]=integrations[_0xa335('0x5c')](_0x4eee25[_0xa335('0x55')][_0xa335('0x5d')],_0x4eee25['body'][_0xa335('0x49')]);_0x4eee25[_0xa335('0x55')][_0xa335('0x5e')]=integrations[_0xa335('0x5f')](_0x4eee25['body'][_0xa335('0x5d')],_0x4eee25[_0xa335('0x55')]['type']);return db[_0xa335('0x58')][_0xa335('0x54')](_0x4eee25['body'],{'include':[{'model':db[_0xa335('0x60')],'as':_0xa335('0x5b')},{'model':db[_0xa335('0x60')],'as':_0xa335('0x5e')}]});}return null;})[_0xa335('0x1b')](respondWithResult(_0x3264ec,null))[_0xa335('0x25')](handleError(_0x3264ec,null));};exports[_0xa335('0x61')]=function(_0x40c0cc,_0x9d7e0c,_0x2eabbc){var _0x40f0cf='';return db[_0xa335('0x36')]['findOne']({'where':{'id':_0x40c0cc[_0xa335('0x52')]['id']},'attributes':['id','remoteUri','apiKey']})[_0xa335('0x1b')](handleEntityNotFound(_0x9d7e0c,null))[_0xa335('0x1b')](function(_0x307e41){if(_0x307e41){_0x40f0cf=_0x307e41[_0xa335('0x62')];var _0x4b6fb6=_0x40f0cf[_0xa335('0x63')](-0x1);if(_0x4b6fb6==='/'){_0x40f0cf=_0x40f0cf[_0xa335('0x64')](0x0,_0x40f0cf[_0xa335('0x65')](_0x4b6fb6));}return rp({'method':'GET','uri':util['format']('%s/%s',_0x40f0cf,'api/v2/ticket_fields'),'headers':{'Authorization':util[_0xa335('0x66')](_0xa335('0x67'),new Buffer(util[_0xa335('0x66')](_0xa335('0x68'),_0x307e41[_0xa335('0x69')]))[_0xa335('0x6a')](_0xa335('0x6b')))},'json':!![]});}})[_0xa335('0x1b')](function(_0x17aea6){if(_0x17aea6){var _0x5d76c0=[_0xa335('0x6c'),_0xa335('0x6d'),_0xa335('0x6e'),_0xa335('0x6f'),_0xa335('0x2c'),'priority','group','source',_0xa335('0x70'),'group',_0xa335('0x71')];_[_0xa335('0x72')](_0x17aea6,function(_0x3254ee){return _0x5d76c0[_0xa335('0x73')](_0x3254ee[_0xa335('0x34')])||!_0x3254ee[_0xa335('0x74')]&&_0x3254ee[_0xa335('0x49')]!==_0xa335('0x75')&&_0x3254ee['type']!=='custom_dropdown';});return{'count':_0x17aea6[_0xa335('0x3f')],'rows':_[_0xa335('0x48')](_0x17aea6,function(_0x331990){return{'id':_0x331990['name'],'name':_0x331990['label'],'custom':!_0x331990['default'],'options':_0x331990[_0xa335('0x76')]?_[_0xa335('0x48')](_0x331990[_0xa335('0x76')],function(_0x477635){return{'name':_[_0xa335('0x77')](_0x477635),'value':_0x477635};}):[]};})};}})['then'](respondWithResult(_0x9d7e0c,null))[_0xa335('0x25')](function(_0x43222c){var _0x43eb02=_0x40c0cc[_0xa335('0x39')][_0xa335('0x19')]?0x1f4:_0x43222c[_0xa335('0x78')]||0x1f4;logger['error'](_0xa335('0x79'),'getFields',_0x43eb02,JSON[_0xa335('0x20')](_0x43222c));delete _0x43222c[_0xa335('0x34')];if(_0x43eb02===0x191){_0x43eb02=0x190;}_0x9d7e0c['status'](_0x43eb02)[_0xa335('0x7a')](_0x40c0cc[_0xa335('0x39')][_0xa335('0x19')]?{'message':'Wrong\x20credentials','statusCode':_0x43222c[_0xa335('0x78')]}:_0x43222c);});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js
index a158135..1436751 100644
--- a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js
+++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe66f=['path','rimraf','../../config/environment','./intFreshdeskAccount.attributes','exports','define','FreshdeskAccount','int_freshdesk_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x316ec1,_0x1961cf){var _0x4ed0b2=function(_0x346723){while(--_0x346723){_0x316ec1['push'](_0x316ec1['shift']());}};_0x4ed0b2(++_0x1961cf);}(_0xe66f,0x1ca));var _0xfe66=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xe66f[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0xfe66('0x0'));var util=require(_0xfe66('0x1'));var logger=require(_0xfe66('0x2'))(_0xfe66('0x3'));var moment=require(_0xfe66('0x4'));var BPromise=require(_0xfe66('0x5'));var rp=require(_0xfe66('0x6'));var fs=require('fs');var path=require(_0xfe66('0x7'));var rimraf=require(_0xfe66('0x8'));var config=require(_0xfe66('0x9'));var attributes=require(_0xfe66('0xa'));var integrations=require('../../components/integrations/configuration');module[_0xfe66('0xb')]=function(_0x50c39b,_0x4305b5){return _0x50c39b[_0xfe66('0xc')](_0xfe66('0xd'),attributes,{'tableName':_0xfe66('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x87c4=['rimraf','../../config/environment','../../components/integrations/configuration','exports','define','FreshdeskAccount','int_freshdesk_accounts','lodash','util','../../config/logger','api','path'];(function(_0x25cd2c,_0x1d1fe5){var _0x38cd1c=function(_0x103190){while(--_0x103190){_0x25cd2c['push'](_0x25cd2c['shift']());}};_0x38cd1c(++_0x1d1fe5);}(_0x87c4,0x73));var _0x487c=function(_0x44dca1,_0x3535d8){_0x44dca1=_0x44dca1-0x0;var _0x459e63=_0x87c4[_0x44dca1];return _0x459e63;};'use strict';var _=require(_0x487c('0x0'));var util=require(_0x487c('0x1'));var logger=require(_0x487c('0x2'))(_0x487c('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x487c('0x4'));var rimraf=require(_0x487c('0x5'));var config=require(_0x487c('0x6'));var attributes=require('./intFreshdeskAccount.attributes');var integrations=require(_0x487c('0x7'));module[_0x487c('0x8')]=function(_0xdf6182,_0x49e157){return _0xdf6182[_0x487c('0x9')](_0x487c('0xa'),attributes,{'tableName':_0x487c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js
index ca5d922..ad9219b 100644
--- a/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js
+++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x43a4=['find','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','stringify','error','FreshdeskAccount,\x20%s,\x20%s','message','result','GetFreshdeskAccount','findAll','options','raw','attributes','limit','include','model','map','catch','ShowFreshdeskAccount','FreshdeskAccount'];(function(_0x518020,_0x2623fe){var _0x118da1=function(_0x183233){while(--_0x183233){_0x518020['push'](_0x518020['shift']());}};_0x118da1(++_0x2623fe);}(_0x43a4,0xf0));var _0x443a=function(_0x37849c,_0xfc1063){_0x37849c=_0x37849c-0x0;var _0x242cb0=_0x43a4[_0x37849c];return _0x242cb0;};'use strict';var _=require(_0x443a('0x0'));var util=require(_0x443a('0x1'));var moment=require(_0x443a('0x2'));var BPromise=require(_0x443a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x443a('0x4'));var db=require(_0x443a('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x443a('0x6'));var config=require(_0x443a('0x7'));var jayson=require(_0x443a('0x8'));var client=jayson[_0x443a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1820d7,_0x51ad90,_0x2d5f34){return new BPromise(function(_0x2aba7b,_0x1bf20c){return client[_0x443a('0xa')](_0x1820d7,_0x2d5f34)[_0x443a('0xb')](function(_0x5a25c4){logger[_0x443a('0xc')]('FreshdeskAccount,\x20%s,\x20%s',_0x51ad90,_0x443a('0xd'));logger[_0x443a('0xe')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x51ad90,_0x443a('0xd'),JSON[_0x443a('0xf')](_0x5a25c4));if(_0x5a25c4[_0x443a('0x10')]){if(_0x5a25c4[_0x443a('0x10')]['code']===0x1f4){logger[_0x443a('0x10')](_0x443a('0x11'),_0x51ad90,_0x5a25c4[_0x443a('0x10')]['message']);return _0x1bf20c(_0x5a25c4['error']['message']);}logger[_0x443a('0x10')](_0x443a('0x11'),_0x51ad90,_0x5a25c4[_0x443a('0x10')]['message']);return _0x2aba7b(_0x5a25c4[_0x443a('0x10')][_0x443a('0x12')]);}else{logger[_0x443a('0xc')]('FreshdeskAccount,\x20%s,\x20%s',_0x51ad90,_0x443a('0xd'));_0x2aba7b(_0x5a25c4[_0x443a('0x13')]['message']);}})['catch'](function(_0x4c035f){logger[_0x443a('0x10')]('FreshdeskAccount,\x20%s,\x20%s',_0x51ad90,_0x4c035f);_0x1bf20c(_0x4c035f);});});}exports[_0x443a('0x14')]=function(_0x306a92){var _0x44b3d0=this;return new Promise(function(_0x286963,_0x3935ab){return db['FreshdeskAccount'][_0x443a('0x15')]({'raw':_0x306a92[_0x443a('0x16')]?_0x306a92[_0x443a('0x16')][_0x443a('0x17')]===undefined?!![]:![]:!![],'where':_0x306a92[_0x443a('0x16')]?_0x306a92[_0x443a('0x16')]['where']||null:null,'attributes':_0x306a92[_0x443a('0x16')]?_0x306a92['options'][_0x443a('0x18')]||null:null,'limit':_0x306a92[_0x443a('0x16')]?_0x306a92[_0x443a('0x16')][_0x443a('0x19')]||null:null,'include':_0x306a92['options']?_0x306a92[_0x443a('0x16')][_0x443a('0x1a')]?_['map'](_0x306a92['options']['include'],function(_0x14ed56){return{'model':db[_0x14ed56[_0x443a('0x1b')]],'as':_0x14ed56['as'],'attributes':_0x14ed56[_0x443a('0x18')],'include':_0x14ed56['include']?_[_0x443a('0x1c')](_0x14ed56['include'],function(_0x2d536a){return{'model':db[_0x2d536a[_0x443a('0x1b')]],'as':_0x2d536a['as'],'attributes':_0x2d536a[_0x443a('0x18')],'include':_0x2d536a[_0x443a('0x1a')]?_[_0x443a('0x1c')](_0x2d536a['include'],function(_0x123693){return{'model':db[_0x123693[_0x443a('0x1b')]],'as':_0x123693['as'],'attributes':_0x123693[_0x443a('0x18')]};}):[]};}):[]};}):[]:[]})[_0x443a('0xb')](function(_0x3e3225){logger[_0x443a('0xc')](_0x443a('0x14'),_0x306a92);logger[_0x443a('0xe')](_0x443a('0x14'),_0x306a92,JSON[_0x443a('0xf')](_0x3e3225));_0x286963(_0x3e3225);})[_0x443a('0x1d')](function(_0x78d73d){logger[_0x443a('0x10')]('GetFreshdeskAccount',_0x78d73d['message'],_0x306a92);_0x3935ab(_0x44b3d0[_0x443a('0x10')](0x1f4,_0x78d73d['message']));});});};exports[_0x443a('0x1e')]=function(_0x5cc3c6){var _0x1236e6=this;return new Promise(function(_0x31090f,_0x1178f6){return db[_0x443a('0x1f')][_0x443a('0x20')]({'raw':_0x5cc3c6['options']?_0x5cc3c6[_0x443a('0x16')][_0x443a('0x17')]===undefined?!![]:![]:!![],'where':_0x5cc3c6['options']?_0x5cc3c6[_0x443a('0x16')][_0x443a('0x21')]||null:null,'attributes':_0x5cc3c6[_0x443a('0x16')]?_0x5cc3c6[_0x443a('0x16')][_0x443a('0x18')]||null:null,'include':_0x5cc3c6[_0x443a('0x16')]?_0x5cc3c6[_0x443a('0x16')][_0x443a('0x1a')]?_[_0x443a('0x1c')](_0x5cc3c6[_0x443a('0x16')][_0x443a('0x1a')],function(_0x279192){return{'model':db[_0x279192[_0x443a('0x1b')]],'as':_0x279192['as'],'attributes':_0x279192['attributes'],'include':_0x279192['include']?_['map'](_0x279192['include'],function(_0x1b5ce8){return{'model':db[_0x1b5ce8[_0x443a('0x1b')]],'as':_0x1b5ce8['as'],'attributes':_0x1b5ce8[_0x443a('0x18')],'include':_0x1b5ce8[_0x443a('0x1a')]?_[_0x443a('0x1c')](_0x1b5ce8[_0x443a('0x1a')],function(_0x3f2f9e){return{'model':db[_0x3f2f9e['model']],'as':_0x3f2f9e['as'],'attributes':_0x3f2f9e[_0x443a('0x18')]};}):[]};}):[]};}):[]:[]})[_0x443a('0xb')](function(_0x21a643){logger['info'](_0x443a('0x1e'),_0x5cc3c6);logger[_0x443a('0xe')](_0x443a('0x1e'),_0x5cc3c6,JSON[_0x443a('0xf')](_0x21a643));_0x31090f(_0x21a643);})[_0x443a('0x1d')](function(_0x2ac71f){logger[_0x443a('0x10')](_0x443a('0x1e'),_0x2ac71f[_0x443a('0x12')],_0x5cc3c6);_0x1178f6(_0x1236e6[_0x443a('0x10')](0x1f4,_0x2ac71f[_0x443a('0x12')]));});});};
\ No newline at end of file
+var _0x2d75=['result','catch','GetFreshdeskAccount','FreshdeskAccount','options','raw','where','attributes','limit','map','model','include','debug','find','ShowFreshdeskAccount','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','FreshdeskAccount,\x20%s,\x20%s','FreshdeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x59bcb1,_0x5a4b6c){var _0x4a737f=function(_0x546a49){while(--_0x546a49){_0x59bcb1['push'](_0x59bcb1['shift']());}};_0x4a737f(++_0x5a4b6c);}(_0x2d75,0xc3));var _0x52d7=function(_0x2181b1,_0x569637){_0x2181b1=_0x2181b1-0x0;var _0x530548=_0x2d75[_0x2181b1];return _0x530548;};'use strict';var _=require(_0x52d7('0x0'));var util=require(_0x52d7('0x1'));var moment=require(_0x52d7('0x2'));var BPromise=require(_0x52d7('0x3'));var rs=require(_0x52d7('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x52d7('0x5'));var logger=require(_0x52d7('0x6'))(_0x52d7('0x7'));var config=require(_0x52d7('0x8'));var jayson=require(_0x52d7('0x9'));var client=jayson[_0x52d7('0xa')][_0x52d7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x431da3,_0x28fb69,_0x178fd5){return new BPromise(function(_0x345423,_0x52be7b){return client['request'](_0x431da3,_0x178fd5)[_0x52d7('0xc')](function(_0x3dec03){logger[_0x52d7('0xd')](_0x52d7('0xe'),_0x28fb69,'request\x20sent');logger['debug'](_0x52d7('0xf'),_0x28fb69,_0x52d7('0x10'),JSON[_0x52d7('0x11')](_0x3dec03));if(_0x3dec03[_0x52d7('0x12')]){if(_0x3dec03[_0x52d7('0x12')][_0x52d7('0x13')]===0x1f4){logger[_0x52d7('0x12')](_0x52d7('0xe'),_0x28fb69,_0x3dec03['error'][_0x52d7('0x14')]);return _0x52be7b(_0x3dec03[_0x52d7('0x12')][_0x52d7('0x14')]);}logger[_0x52d7('0x12')](_0x52d7('0xe'),_0x28fb69,_0x3dec03['error'][_0x52d7('0x14')]);return _0x345423(_0x3dec03[_0x52d7('0x12')][_0x52d7('0x14')]);}else{logger[_0x52d7('0xd')](_0x52d7('0xe'),_0x28fb69,_0x52d7('0x10'));_0x345423(_0x3dec03[_0x52d7('0x15')]['message']);}})[_0x52d7('0x16')](function(_0x1b9974){logger[_0x52d7('0x12')]('FreshdeskAccount,\x20%s,\x20%s',_0x28fb69,_0x1b9974);_0x52be7b(_0x1b9974);});});}exports[_0x52d7('0x17')]=function(_0x1c9972){var _0xf35779=this;return new Promise(function(_0x34ab10,_0x277af4){return db[_0x52d7('0x18')]['findAll']({'raw':_0x1c9972[_0x52d7('0x19')]?_0x1c9972['options'][_0x52d7('0x1a')]===undefined?!![]:![]:!![],'where':_0x1c9972[_0x52d7('0x19')]?_0x1c9972[_0x52d7('0x19')][_0x52d7('0x1b')]||null:null,'attributes':_0x1c9972['options']?_0x1c9972[_0x52d7('0x19')][_0x52d7('0x1c')]||null:null,'limit':_0x1c9972[_0x52d7('0x19')]?_0x1c9972[_0x52d7('0x19')][_0x52d7('0x1d')]||null:null,'include':_0x1c9972[_0x52d7('0x19')]?_0x1c9972['options']['include']?_[_0x52d7('0x1e')](_0x1c9972['options']['include'],function(_0x5b632d){return{'model':db[_0x5b632d[_0x52d7('0x1f')]],'as':_0x5b632d['as'],'attributes':_0x5b632d[_0x52d7('0x1c')],'include':_0x5b632d[_0x52d7('0x20')]?_['map'](_0x5b632d[_0x52d7('0x20')],function(_0x57d2c4){return{'model':db[_0x57d2c4[_0x52d7('0x1f')]],'as':_0x57d2c4['as'],'attributes':_0x57d2c4[_0x52d7('0x1c')],'include':_0x57d2c4[_0x52d7('0x20')]?_['map'](_0x57d2c4[_0x52d7('0x20')],function(_0x346212){return{'model':db[_0x346212[_0x52d7('0x1f')]],'as':_0x346212['as'],'attributes':_0x346212[_0x52d7('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4a092e){logger[_0x52d7('0xd')](_0x52d7('0x17'),_0x1c9972);logger[_0x52d7('0x21')](_0x52d7('0x17'),_0x1c9972,JSON[_0x52d7('0x11')](_0x4a092e));_0x34ab10(_0x4a092e);})[_0x52d7('0x16')](function(_0x490b35){logger[_0x52d7('0x12')]('GetFreshdeskAccount',_0x490b35[_0x52d7('0x14')],_0x1c9972);_0x277af4(_0xf35779['error'](0x1f4,_0x490b35[_0x52d7('0x14')]));});});};exports['ShowFreshdeskAccount']=function(_0x103966){var _0x1ae06d=this;return new Promise(function(_0x4e54c5,_0x3826c7){return db['FreshdeskAccount'][_0x52d7('0x22')]({'raw':_0x103966[_0x52d7('0x19')]?_0x103966['options'][_0x52d7('0x1a')]===undefined?!![]:![]:!![],'where':_0x103966[_0x52d7('0x19')]?_0x103966[_0x52d7('0x19')][_0x52d7('0x1b')]||null:null,'attributes':_0x103966[_0x52d7('0x19')]?_0x103966[_0x52d7('0x19')][_0x52d7('0x1c')]||null:null,'include':_0x103966[_0x52d7('0x19')]?_0x103966[_0x52d7('0x19')]['include']?_[_0x52d7('0x1e')](_0x103966[_0x52d7('0x19')][_0x52d7('0x20')],function(_0x1d22e3){return{'model':db[_0x1d22e3[_0x52d7('0x1f')]],'as':_0x1d22e3['as'],'attributes':_0x1d22e3['attributes'],'include':_0x1d22e3[_0x52d7('0x20')]?_['map'](_0x1d22e3[_0x52d7('0x20')],function(_0x3f2e94){return{'model':db[_0x3f2e94[_0x52d7('0x1f')]],'as':_0x3f2e94['as'],'attributes':_0x3f2e94['attributes'],'include':_0x3f2e94[_0x52d7('0x20')]?_[_0x52d7('0x1e')](_0x3f2e94[_0x52d7('0x20')],function(_0x5b05d2){return{'model':db[_0x5b05d2[_0x52d7('0x1f')]],'as':_0x5b05d2['as'],'attributes':_0x5b05d2[_0x52d7('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x52d7('0xc')](function(_0x3559e4){logger[_0x52d7('0xd')](_0x52d7('0x23'),_0x103966);logger[_0x52d7('0x21')](_0x52d7('0x23'),_0x103966,JSON[_0x52d7('0x11')](_0x3559e4));_0x4e54c5(_0x3559e4);})[_0x52d7('0x16')](function(_0x5e92ef){logger[_0x52d7('0x12')](_0x52d7('0x23'),_0x5e92ef[_0x52d7('0x14')],_0x103966);_0x3826c7(_0x1ae06d['error'](0x1f4,_0x5e92ef[_0x52d7('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/index.js b/server/api/intFreshdeskConfiguration/index.js
index bb12623..13fb5cc 100644
--- a/server/api/intFreshdeskConfiguration/index.js
+++ b/server/api/intFreshdeskConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe015=['multer','util','path','Router','../../components/interaction/service','../../config/environment','./intFreshdeskConfiguration.controller','get','index','show','/:id/fields','isAuthenticated','getFields','getDescriptions','/:id/tags','create','post','setTags','/:id','delete','destroy'];(function(_0x461a18,_0x38b5c0){var _0x2dbe4c=function(_0x6f9265){while(--_0x6f9265){_0x461a18['push'](_0x461a18['shift']());}};_0x2dbe4c(++_0x38b5c0);}(_0xe015,0x13b));var _0x5e01=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xe015[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x5e01('0x0'));var util=require(_0x5e01('0x1'));var path=require(_0x5e01('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x5e01('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x5e01('0x4'));var config=require(_0x5e01('0x5'));var controller=require(_0x5e01('0x6'));router[_0x5e01('0x7')]('/',auth['isAuthenticated'](),controller[_0x5e01('0x8')]);router[_0x5e01('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x5e01('0x9')]);router[_0x5e01('0x7')](_0x5e01('0xa'),auth[_0x5e01('0xb')](),controller[_0x5e01('0xc')]);router[_0x5e01('0x7')]('/:id/subjects',auth[_0x5e01('0xb')](),controller['getSubjects']);router[_0x5e01('0x7')]('/:id/descriptions',auth[_0x5e01('0xb')](),controller[_0x5e01('0xd')]);router['get'](_0x5e01('0xe'),auth[_0x5e01('0xb')](),controller['getTags']);router['post']('/',auth[_0x5e01('0xb')](),controller[_0x5e01('0xf')]);router[_0x5e01('0x10')](_0x5e01('0xe'),auth[_0x5e01('0xb')](),controller[_0x5e01('0x11')]);router['put'](_0x5e01('0x12'),auth['isAuthenticated'](),controller['update']);router[_0x5e01('0x13')](_0x5e01('0x12'),auth['isAuthenticated'](),controller[_0x5e01('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xa41a=['post','create','setTags','/:id','update','delete','destroy','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskConfiguration.controller','get','index','show','isAuthenticated','getFields','/:id/subjects','getSubjects','/:id/descriptions','/:id/tags'];(function(_0x149055,_0x42bd96){var _0x2862bf=function(_0x39a5dc){while(--_0x39a5dc){_0x149055['push'](_0x149055['shift']());}};_0x2862bf(++_0x42bd96);}(_0xa41a,0x6b));var _0xaa41=function(_0x1305ce,_0x22a49b){_0x1305ce=_0x1305ce-0x0;var _0x4d7ed5=_0xa41a[_0x1305ce];return _0x4d7ed5;};'use strict';var multer=require(_0xaa41('0x0'));var util=require(_0xaa41('0x1'));var path=require('path');var timeout=require(_0xaa41('0x2'));var express=require(_0xaa41('0x3'));var router=express[_0xaa41('0x4')]();var auth=require(_0xaa41('0x5'));var interaction=require(_0xaa41('0x6'));var config=require(_0xaa41('0x7'));var controller=require(_0xaa41('0x8'));router[_0xaa41('0x9')]('/',auth['isAuthenticated'](),controller[_0xaa41('0xa')]);router[_0xaa41('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xaa41('0xb')]);router[_0xaa41('0x9')]('/:id/fields',auth[_0xaa41('0xc')](),controller[_0xaa41('0xd')]);router[_0xaa41('0x9')](_0xaa41('0xe'),auth[_0xaa41('0xc')](),controller[_0xaa41('0xf')]);router[_0xaa41('0x9')](_0xaa41('0x10'),auth[_0xaa41('0xc')](),controller['getDescriptions']);router[_0xaa41('0x9')](_0xaa41('0x11'),auth['isAuthenticated'](),controller['getTags']);router[_0xaa41('0x12')]('/',auth['isAuthenticated'](),controller[_0xaa41('0x13')]);router[_0xaa41('0x12')](_0xaa41('0x11'),auth[_0xaa41('0xc')](),controller[_0xaa41('0x14')]);router['put'](_0xaa41('0x15'),auth[_0xaa41('0xc')](),controller[_0xaa41('0x16')]);router[_0xaa41('0x17')](_0xaa41('0x15'),auth[_0xaa41('0xc')](),controller[_0xaa41('0x18')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js
index b29cc42..f60e182 100644
--- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js
+++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9b16=['STRING','sequelize','exports'];(function(_0x3f0d37,_0x294a19){var _0x3eb4af=function(_0x259d0b){while(--_0x259d0b){_0x3f0d37['push'](_0x3f0d37['shift']());}};_0x3eb4af(++_0x294a19);}(_0x9b16,0xf4));var _0x69b1=function(_0x8229ba,_0x4be2d8){_0x8229ba=_0x8229ba-0x0;var _0x42282e=_0x9b16[_0x8229ba];return _0x42282e;};'use strict';var Sequelize=require(_0x69b1('0x0'));module[_0x69b1('0x1')]={'name':{'type':Sequelize[_0x69b1('0x2')]},'description':{'type':Sequelize[_0x69b1('0x2')]}};
\ No newline at end of file
+var _0x3c66=['STRING'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x3c66,0x1de));var _0x63c6=function(_0x5d20ab,_0x9c4b87){_0x5d20ab=_0x5d20ab-0x0;var _0xd18208=_0x3c66[_0x5d20ab];return _0xd18208;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x63c6('0x0')]},'description':{'type':Sequelize[_0x63c6('0x0')]}};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js
index 841c4c7..8fb99a8 100644
--- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js
+++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6c45=['../../config/logger','api','../../config/environment','../../mysqldb','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','sendStatus','status','count','offset','limit','set','Content-Range','json','apply','save','update','destroy','end','stack','name','send','index','FreshdeskConfiguration','rawAttributes','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','where','pick','merge','map','type','key','field','findAll','show','params','keys','length','includeAll','include','create','body','find','catch','findOne','FreshdeskField','sort','filter','options','getFields','getSubjects','getDescriptions','getTags','Tag','setTags','ids','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0x6c45,0xb1));var _0x56c4=function(_0x2441d4,_0x3f8677){_0x2441d4=_0x2441d4-0x0;var _0x4972fe=_0x6c45[_0x2441d4];return _0x4972fe;};'use strict';var pdf=require(_0x56c4('0x0'));var emlformat=require(_0x56c4('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x56c4('0x2'));var jsonpatch=require(_0x56c4('0x3'));var rp=require(_0x56c4('0x4'));var moment=require(_0x56c4('0x5'));var BPromise=require(_0x56c4('0x6'));var Mustache=require(_0x56c4('0x7'));var util=require(_0x56c4('0x8'));var path=require(_0x56c4('0x9'));var sox=require(_0x56c4('0xa'));var csv=require(_0x56c4('0xb'));var ejs=require(_0x56c4('0xc'));var fs=require('fs');var _=require(_0x56c4('0xd'));var squel=require(_0x56c4('0xe'));var crypto=require(_0x56c4('0xf'));var jsforce=require(_0x56c4('0x10'));var deskjs=require(_0x56c4('0x11'));var toCsv=require(_0x56c4('0xb'));var querystring=require(_0x56c4('0x12'));var Papa=require(_0x56c4('0x13'));var Redis=require(_0x56c4('0x14'));var authService=require('../../components/auth/service');var qs=require(_0x56c4('0x15'));var hardwareService=require(_0x56c4('0x16'));var logger=require(_0x56c4('0x17'))(_0x56c4('0x18'));var utils=require('../../config/utils');var config=require(_0x56c4('0x19'));var db=require(_0x56c4('0x1a'))['db'];var jayson=require(_0x56c4('0x1b'));var client=jayson[_0x56c4('0x1c')]['http']({'port':0x232a});function checkPasswordPattern(_0x6d9810,_0x5ec318,_0x512d7e){if(_0x512d7e){var _0x2cb56e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2cb56e[_0x56c4('0x1d')](_0x5ec318)){return _0x6d9810;}else{throw new Error(_0x56c4('0x1e'));}}else{return _0x6d9810;}}function respondWithRpcPromise(_0x1f9bfb,_0x3f3c45,_0x52e67c,_0x38216c){return new BPromise(function(_0x4279ac,_0x533968){var _0x9b7664=_0x38216c||client;return _0x9b7664[_0x56c4('0x1f')](_0x1f9bfb,_0x52e67c)[_0x56c4('0x20')](function(_0x2f0bb2){logger['info'](_0x56c4('0x21'),_0x3f3c45,_0x56c4('0x22'));logger['debug'](_0x56c4('0x23'),_0x3f3c45,_0x56c4('0x22'),JSON[_0x56c4('0x24')](_0x2f0bb2));if(_0x2f0bb2[_0x56c4('0x25')]){if(_0x2f0bb2['error'][_0x56c4('0x26')]===0x1f4){logger[_0x56c4('0x25')](_0x56c4('0x21'),_0x3f3c45,_0x2f0bb2[_0x56c4('0x25')][_0x56c4('0x27')]);return _0x533968(_0x2f0bb2[_0x56c4('0x25')]['message']);}logger['error'](_0x56c4('0x21'),_0x3f3c45,_0x2f0bb2[_0x56c4('0x25')]['message']);return _0x4279ac(_0x2f0bb2[_0x56c4('0x25')][_0x56c4('0x27')]);}else{logger[_0x56c4('0x28')](_0x56c4('0x21'),_0x3f3c45,_0x56c4('0x22'));_0x4279ac(_0x2f0bb2[_0x56c4('0x29')][_0x56c4('0x27')]);}})['catch'](function(_0x1313a4){logger[_0x56c4('0x25')](_0x56c4('0x21'),_0x3f3c45,_0x1313a4);_0x533968(_0x1313a4);});});}function respondWithStatusCode(_0x5e7da1,_0xc8ed28){_0xc8ed28=_0xc8ed28||0xcc;return function(_0x4d1d9c){if(_0x4d1d9c){return _0x5e7da1[_0x56c4('0x2a')](_0xc8ed28);}return _0x5e7da1[_0x56c4('0x2b')](_0xc8ed28)['end']();};}function respondWithResult(_0x148268,_0x292b66){_0x292b66=_0x292b66||0xc8;return function(_0x51dcf8){if(_0x51dcf8){return _0x148268['status'](_0x292b66)['json'](_0x51dcf8);}};}function respondWithFilteredResult(_0x23fadb,_0x2ac814){return function(_0x3fe97d){if(_0x3fe97d){var _0x514d96=_0x3fe97d[_0x56c4('0x2c')],_0x237a9f=_0x2ac814[_0x56c4('0x2d')],_0x575d79=_0x2ac814[_0x56c4('0x2d')]+_0x2ac814[_0x56c4('0x2e')],_0x4ce20d;if(_0x575d79>=_0x514d96){_0x575d79=_0x514d96;_0x4ce20d=0xc8;}else{_0x4ce20d=0xce;}_0x23fadb[_0x56c4('0x2b')](_0x4ce20d);return _0x23fadb[_0x56c4('0x2f')](_0x56c4('0x30'),_0x237a9f+'-'+_0x575d79+'/'+_0x514d96)[_0x56c4('0x31')](_0x3fe97d);}return null;};}function patchUpdates(_0x49171e){return function(_0x36f430){try{jsonpatch[_0x56c4('0x32')](_0x36f430,_0x49171e,!![]);}catch(_0x3af58b){return BPromise['reject'](_0x3af58b);}return _0x36f430[_0x56c4('0x33')]();};}function saveUpdates(_0x367fec,_0x3894ba){return function(_0x5ad71c){if(_0x5ad71c){return _0x5ad71c[_0x56c4('0x34')](_0x367fec)[_0x56c4('0x20')](function(_0x5ceeed){return _0x5ceeed;});}return null;};}function removeEntity(_0x3de2e7,_0x5f1e92){return function(_0x266aa6){if(_0x266aa6){return _0x266aa6[_0x56c4('0x35')]()[_0x56c4('0x20')](function(){_0x3de2e7[_0x56c4('0x2b')](0xcc)[_0x56c4('0x36')]();});}};}function handleEntityNotFound(_0x4985f2,_0x5533cc){return function(_0xffb979){if(!_0xffb979){_0x4985f2[_0x56c4('0x2a')](0x194);}return _0xffb979;};}function handleError(_0x420bb0,_0x33a9e7){_0x33a9e7=_0x33a9e7||0x1f4;return function(_0x35460d){logger['error'](_0x35460d[_0x56c4('0x37')]);if(_0x35460d[_0x56c4('0x38')]){delete _0x35460d[_0x56c4('0x38')];}_0x420bb0[_0x56c4('0x2b')](_0x33a9e7)[_0x56c4('0x39')](_0x35460d);};}exports[_0x56c4('0x3a')]=function(_0x102f4e,_0x517f57){var _0x4c11da={},_0x3b03cd={},_0x4036d3={'count':0x0,'rows':[]};var _0x29d3c4=db[_0x56c4('0x3b')][_0x56c4('0x3c')];_0x3b03cd['model']=_['keys'](_0x29d3c4);_0x3b03cd[_0x56c4('0x3d')]=_['keys'](_0x102f4e[_0x56c4('0x3d')]);_0x3b03cd[_0x56c4('0x3e')]=_[_0x56c4('0x3f')](_0x3b03cd[_0x56c4('0x40')],_0x3b03cd['query']);_0x4c11da[_0x56c4('0x41')]=_[_0x56c4('0x3f')](_0x3b03cd[_0x56c4('0x40')],qs[_0x56c4('0x42')](_0x102f4e[_0x56c4('0x3d')][_0x56c4('0x42')]));_0x4c11da[_0x56c4('0x41')]=_0x4c11da['attributes']['length']?_0x4c11da[_0x56c4('0x41')]:_0x3b03cd[_0x56c4('0x40')];if(!_0x102f4e['query'][_0x56c4('0x43')](_0x56c4('0x44'))){_0x4c11da['limit']=qs[_0x56c4('0x2e')](_0x102f4e[_0x56c4('0x3d')]['limit']);_0x4c11da['offset']=qs[_0x56c4('0x2d')](_0x102f4e[_0x56c4('0x3d')][_0x56c4('0x2d')]);}_0x4c11da[_0x56c4('0x45')]=qs['sort'](_0x102f4e['query']['sort']);_0x4c11da[_0x56c4('0x46')]=qs[_0x56c4('0x3e')](_[_0x56c4('0x47')](_0x102f4e['query'],_0x3b03cd[_0x56c4('0x3e')]));if(_0x102f4e[_0x56c4('0x3d')]['filter']){_0x4c11da[_0x56c4('0x46')]=_[_0x56c4('0x48')](_0x4c11da[_0x56c4('0x46')],{'$or':_[_0x56c4('0x49')](_0x29d3c4,function(_0x28c702){if(_0x28c702[_0x56c4('0x4a')][_0x56c4('0x4b')]!=='VIRTUAL'){var _0x5f182b={};_0x5f182b[_0x28c702[_0x56c4('0x4c')]]={'$like':'%'+_0x102f4e['query']['filter']+'%'};return _0x5f182b;}})});}_0x4c11da=_[_0x56c4('0x48')]({},_0x4c11da,_0x102f4e['options']);var _0x314d65={'where':_0x4c11da[_0x56c4('0x46')]};return db[_0x56c4('0x3b')][_0x56c4('0x2c')](_0x314d65)['then'](function(_0x44d604){_0x4036d3[_0x56c4('0x2c')]=_0x44d604;if(_0x102f4e['query']['includeAll']){_0x4c11da['include']=[{'all':!![]}];}return db['FreshdeskConfiguration'][_0x56c4('0x4d')](_0x4c11da);})['then'](function(_0xd3b676){_0x4036d3['rows']=_0xd3b676;return _0x4036d3;})[_0x56c4('0x20')](respondWithFilteredResult(_0x517f57,_0x4c11da))['catch'](handleError(_0x517f57,null));};exports[_0x56c4('0x4e')]=function(_0x593a2d,_0xde1b7c){var _0x4c676c={'raw':![],'where':{'id':_0x593a2d[_0x56c4('0x4f')]['id']}},_0x5950e5={};_0x5950e5[_0x56c4('0x40')]=_[_0x56c4('0x50')](db[_0x56c4('0x3b')][_0x56c4('0x3c')]);_0x5950e5[_0x56c4('0x3d')]=_['keys'](_0x593a2d[_0x56c4('0x3d')]);_0x5950e5[_0x56c4('0x3e')]=_[_0x56c4('0x3f')](_0x5950e5[_0x56c4('0x40')],_0x5950e5[_0x56c4('0x3d')]);_0x4c676c[_0x56c4('0x41')]=_[_0x56c4('0x3f')](_0x5950e5[_0x56c4('0x40')],qs['fields'](_0x593a2d[_0x56c4('0x3d')][_0x56c4('0x42')]));_0x4c676c['attributes']=_0x4c676c[_0x56c4('0x41')][_0x56c4('0x51')]?_0x4c676c['attributes']:_0x5950e5[_0x56c4('0x40')];if(_0x593a2d[_0x56c4('0x3d')][_0x56c4('0x52')]){_0x4c676c[_0x56c4('0x53')]=[{'all':!![]}];}_0x4c676c=_[_0x56c4('0x48')]({},_0x4c676c,_0x593a2d['options']);return db[_0x56c4('0x3b')]['find'](_0x4c676c)[_0x56c4('0x20')](handleEntityNotFound(_0xde1b7c,null))[_0x56c4('0x20')](respondWithResult(_0xde1b7c,null))['catch'](handleError(_0xde1b7c,null));};exports[_0x56c4('0x54')]=function(_0x2f7193,_0x308734){return db['FreshdeskConfiguration'][_0x56c4('0x54')](_0x2f7193[_0x56c4('0x55')],{})[_0x56c4('0x20')](respondWithResult(_0x308734,0xc9))['catch'](handleError(_0x308734,null));};exports['update']=function(_0x42545d,_0x3aa090){if(_0x42545d['body']['id']){delete _0x42545d[_0x56c4('0x55')]['id'];}return db[_0x56c4('0x3b')][_0x56c4('0x56')]({'where':{'id':_0x42545d[_0x56c4('0x4f')]['id']}})['then'](handleEntityNotFound(_0x3aa090,null))[_0x56c4('0x20')](saveUpdates(_0x42545d[_0x56c4('0x55')],null))[_0x56c4('0x20')](respondWithResult(_0x3aa090,null))[_0x56c4('0x57')](handleError(_0x3aa090,null));};exports['destroy']=function(_0x3d4d40,_0x58a32a){return db[_0x56c4('0x3b')][_0x56c4('0x56')]({'where':{'id':_0x3d4d40['params']['id']}})[_0x56c4('0x20')](handleEntityNotFound(_0x58a32a,null))[_0x56c4('0x20')](removeEntity(_0x58a32a,null))['catch'](handleError(_0x58a32a,null));};exports['getFields']=function(_0x16fc48,_0x1b9272,_0x5e27a8){var _0x3192d8={};var _0x19ab2c={};var _0x2fc3dd;var _0x31bcb3;return db[_0x56c4('0x3b')][_0x56c4('0x58')]({'where':{'id':_0x16fc48[_0x56c4('0x4f')]['id']}})[_0x56c4('0x20')](handleEntityNotFound(_0x1b9272,null))[_0x56c4('0x20')](function(_0x1487ac){if(_0x1487ac){_0x2fc3dd=_0x1487ac;_0x19ab2c['model']=_[_0x56c4('0x50')](db[_0x56c4('0x59')][_0x56c4('0x3c')]);_0x19ab2c[_0x56c4('0x3d')]=_[_0x56c4('0x50')](_0x16fc48[_0x56c4('0x3d')]);_0x19ab2c[_0x56c4('0x3e')]=_[_0x56c4('0x3f')](_0x19ab2c[_0x56c4('0x40')],_0x19ab2c[_0x56c4('0x3d')]);_0x3192d8['attributes']=_[_0x56c4('0x3f')](_0x19ab2c[_0x56c4('0x40')],qs[_0x56c4('0x42')](_0x16fc48['query'][_0x56c4('0x42')]));_0x3192d8['attributes']=_0x3192d8[_0x56c4('0x41')][_0x56c4('0x51')]?_0x3192d8[_0x56c4('0x41')]:_0x19ab2c[_0x56c4('0x40')];_0x3192d8[_0x56c4('0x45')]=qs[_0x56c4('0x5a')](_0x16fc48[_0x56c4('0x3d')][_0x56c4('0x5a')]);_0x3192d8[_0x56c4('0x46')]=qs['filters'](_[_0x56c4('0x47')](_0x16fc48['query'],_0x19ab2c['filters']));if(_0x16fc48[_0x56c4('0x3d')][_0x56c4('0x5b')]){_0x3192d8['where']=_[_0x56c4('0x48')](_0x3192d8['where'],{'$or':_['map'](_0x3192d8[_0x56c4('0x41')],function(_0x59e158){var _0x5bda11={};_0x5bda11[_0x59e158]={'$like':'%'+_0x16fc48[_0x56c4('0x3d')][_0x56c4('0x5b')]+'%'};return _0x5bda11;})});}_0x3192d8=_[_0x56c4('0x48')]({},_0x3192d8,_0x16fc48[_0x56c4('0x5c')]);return _0x2fc3dd[_0x56c4('0x5d')](_0x3192d8);}})[_0x56c4('0x20')](function(_0x196904){if(_0x196904){_0x31bcb3=_0x196904[_0x56c4('0x51')];if(!_0x16fc48['query'][_0x56c4('0x43')](_0x56c4('0x44'))){_0x3192d8['limit']=qs[_0x56c4('0x2e')](_0x16fc48['query']['limit']);_0x3192d8[_0x56c4('0x2d')]=qs[_0x56c4('0x2d')](_0x16fc48[_0x56c4('0x3d')][_0x56c4('0x2d')]);}return _0x2fc3dd['getFields'](_0x3192d8);}})[_0x56c4('0x20')](function(_0x1aabd6){if(_0x1aabd6){return _0x1aabd6?{'count':_0x31bcb3,'rows':_0x1aabd6}:null;}})[_0x56c4('0x20')](respondWithResult(_0x1b9272,null))[_0x56c4('0x57')](handleError(_0x1b9272,null));};exports[_0x56c4('0x5e')]=function(_0x27789b,_0x2a4f44,_0x4110fd){var _0x4a313d={};var _0x2c45f6={};var _0x3e4f3a;var _0x40301c;return db[_0x56c4('0x3b')]['findOne']({'where':{'id':_0x27789b[_0x56c4('0x4f')]['id']}})['then'](handleEntityNotFound(_0x2a4f44,null))[_0x56c4('0x20')](function(_0x4b0d9c){if(_0x4b0d9c){_0x3e4f3a=_0x4b0d9c;_0x2c45f6['model']=_[_0x56c4('0x50')](db['FreshdeskField']['rawAttributes']);_0x2c45f6['query']=_['keys'](_0x27789b[_0x56c4('0x3d')]);_0x2c45f6[_0x56c4('0x3e')]=_[_0x56c4('0x3f')](_0x2c45f6['model'],_0x2c45f6[_0x56c4('0x3d')]);_0x4a313d['attributes']=_[_0x56c4('0x3f')](_0x2c45f6['model'],qs[_0x56c4('0x42')](_0x27789b[_0x56c4('0x3d')][_0x56c4('0x42')]));_0x4a313d['attributes']=_0x4a313d[_0x56c4('0x41')][_0x56c4('0x51')]?_0x4a313d['attributes']:_0x2c45f6['model'];_0x4a313d[_0x56c4('0x45')]=qs[_0x56c4('0x5a')](_0x27789b['query'][_0x56c4('0x5a')]);_0x4a313d[_0x56c4('0x46')]=qs['filters'](_['pick'](_0x27789b['query'],_0x2c45f6[_0x56c4('0x3e')]));if(_0x27789b[_0x56c4('0x3d')][_0x56c4('0x5b')]){_0x4a313d['where']=_[_0x56c4('0x48')](_0x4a313d[_0x56c4('0x46')],{'$or':_[_0x56c4('0x49')](_0x4a313d['attributes'],function(_0x4eb10c){var _0x29eb2a={};_0x29eb2a[_0x4eb10c]={'$like':'%'+_0x27789b[_0x56c4('0x3d')]['filter']+'%'};return _0x29eb2a;})});}_0x4a313d=_[_0x56c4('0x48')]({},_0x4a313d,_0x27789b['options']);return _0x3e4f3a['getSubjects'](_0x4a313d);}})['then'](function(_0x2efc89){if(_0x2efc89){_0x40301c=_0x2efc89[_0x56c4('0x51')];if(!_0x27789b[_0x56c4('0x3d')][_0x56c4('0x43')](_0x56c4('0x44'))){_0x4a313d[_0x56c4('0x2e')]=qs[_0x56c4('0x2e')](_0x27789b[_0x56c4('0x3d')]['limit']);_0x4a313d[_0x56c4('0x2d')]=qs[_0x56c4('0x2d')](_0x27789b['query'][_0x56c4('0x2d')]);}return _0x3e4f3a[_0x56c4('0x5e')](_0x4a313d);}})[_0x56c4('0x20')](function(_0x2f24ad){if(_0x2f24ad){return _0x2f24ad?{'count':_0x40301c,'rows':_0x2f24ad}:null;}})['then'](respondWithResult(_0x2a4f44,null))[_0x56c4('0x57')](handleError(_0x2a4f44,null));};exports[_0x56c4('0x5f')]=function(_0x5568ad,_0x4eddc5,_0x20eac4){var _0x35b7f1={};var _0x127489={};var _0x55c7ab;var _0x441dcd;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x5568ad['params']['id']}})[_0x56c4('0x20')](handleEntityNotFound(_0x4eddc5,null))['then'](function(_0x280e9f){if(_0x280e9f){_0x55c7ab=_0x280e9f;_0x127489[_0x56c4('0x40')]=_[_0x56c4('0x50')](db[_0x56c4('0x59')]['rawAttributes']);_0x127489['query']=_[_0x56c4('0x50')](_0x5568ad['query']);_0x127489[_0x56c4('0x3e')]=_[_0x56c4('0x3f')](_0x127489[_0x56c4('0x40')],_0x127489['query']);_0x35b7f1[_0x56c4('0x41')]=_[_0x56c4('0x3f')](_0x127489[_0x56c4('0x40')],qs[_0x56c4('0x42')](_0x5568ad[_0x56c4('0x3d')][_0x56c4('0x42')]));_0x35b7f1['attributes']=_0x35b7f1['attributes'][_0x56c4('0x51')]?_0x35b7f1[_0x56c4('0x41')]:_0x127489[_0x56c4('0x40')];_0x35b7f1[_0x56c4('0x45')]=qs[_0x56c4('0x5a')](_0x5568ad[_0x56c4('0x3d')][_0x56c4('0x5a')]);_0x35b7f1[_0x56c4('0x46')]=qs['filters'](_['pick'](_0x5568ad[_0x56c4('0x3d')],_0x127489['filters']));if(_0x5568ad[_0x56c4('0x3d')][_0x56c4('0x5b')]){_0x35b7f1[_0x56c4('0x46')]=_[_0x56c4('0x48')](_0x35b7f1[_0x56c4('0x46')],{'$or':_['map'](_0x35b7f1[_0x56c4('0x41')],function(_0x3cbb4f){var _0x3a40f2={};_0x3a40f2[_0x3cbb4f]={'$like':'%'+_0x5568ad['query'][_0x56c4('0x5b')]+'%'};return _0x3a40f2;})});}_0x35b7f1=_[_0x56c4('0x48')]({},_0x35b7f1,_0x5568ad[_0x56c4('0x5c')]);return _0x55c7ab[_0x56c4('0x5f')](_0x35b7f1);}})[_0x56c4('0x20')](function(_0x3293b3){if(_0x3293b3){_0x441dcd=_0x3293b3[_0x56c4('0x51')];if(!_0x5568ad[_0x56c4('0x3d')]['hasOwnProperty']('nolimit')){_0x35b7f1['limit']=qs['limit'](_0x5568ad[_0x56c4('0x3d')][_0x56c4('0x2e')]);_0x35b7f1[_0x56c4('0x2d')]=qs[_0x56c4('0x2d')](_0x5568ad[_0x56c4('0x3d')][_0x56c4('0x2d')]);}return _0x55c7ab[_0x56c4('0x5f')](_0x35b7f1);}})[_0x56c4('0x20')](function(_0xbf9eb1){if(_0xbf9eb1){return _0xbf9eb1?{'count':_0x441dcd,'rows':_0xbf9eb1}:null;}})[_0x56c4('0x20')](respondWithResult(_0x4eddc5,null))[_0x56c4('0x57')](handleError(_0x4eddc5,null));};exports[_0x56c4('0x60')]=function(_0x3202d6,_0xaa6920,_0x5a57f9){var _0xabe3c3={};var _0x51aec3={};var _0x43a81d;var _0xd8fbad;return db[_0x56c4('0x3b')][_0x56c4('0x58')]({'where':{'id':_0x3202d6[_0x56c4('0x4f')]['id']}})['then'](handleEntityNotFound(_0xaa6920,null))[_0x56c4('0x20')](function(_0xc4a2ab){if(_0xc4a2ab){_0x43a81d=_0xc4a2ab;_0x51aec3[_0x56c4('0x40')]=_[_0x56c4('0x50')](db[_0x56c4('0x61')][_0x56c4('0x3c')]);_0x51aec3[_0x56c4('0x3d')]=_[_0x56c4('0x50')](_0x3202d6[_0x56c4('0x3d')]);_0x51aec3['filters']=_[_0x56c4('0x3f')](_0x51aec3[_0x56c4('0x40')],_0x51aec3[_0x56c4('0x3d')]);_0xabe3c3[_0x56c4('0x41')]=_[_0x56c4('0x3f')](_0x51aec3['model'],qs[_0x56c4('0x42')](_0x3202d6[_0x56c4('0x3d')]['fields']));_0xabe3c3[_0x56c4('0x41')]=_0xabe3c3['attributes']['length']?_0xabe3c3['attributes']:_0x51aec3['model'];_0xabe3c3[_0x56c4('0x45')]=qs[_0x56c4('0x5a')](_0x3202d6['query'][_0x56c4('0x5a')]);_0xabe3c3[_0x56c4('0x46')]=qs[_0x56c4('0x3e')](_['pick'](_0x3202d6[_0x56c4('0x3d')],_0x51aec3[_0x56c4('0x3e')]));if(_0x3202d6[_0x56c4('0x3d')]['filter']){_0xabe3c3[_0x56c4('0x46')]=_[_0x56c4('0x48')](_0xabe3c3[_0x56c4('0x46')],{'$or':_['map'](_0xabe3c3['attributes'],function(_0x4f814f){var _0x312444={};_0x312444[_0x4f814f]={'$like':'%'+_0x3202d6[_0x56c4('0x3d')][_0x56c4('0x5b')]+'%'};return _0x312444;})});}_0xabe3c3=_[_0x56c4('0x48')]({},_0xabe3c3,_0x3202d6[_0x56c4('0x5c')]);return _0x43a81d[_0x56c4('0x60')](_0xabe3c3);}})[_0x56c4('0x20')](function(_0x1d2b53){if(_0x1d2b53){_0xd8fbad=_0x1d2b53[_0x56c4('0x51')];if(!_0x3202d6['query']['hasOwnProperty']('nolimit')){_0xabe3c3['limit']=qs[_0x56c4('0x2e')](_0x3202d6[_0x56c4('0x3d')][_0x56c4('0x2e')]);_0xabe3c3['offset']=qs[_0x56c4('0x2d')](_0x3202d6[_0x56c4('0x3d')]['offset']);}return _0x43a81d['getTags'](_0xabe3c3);}})[_0x56c4('0x20')](function(_0x5b96e6){if(_0x5b96e6){return _0x5b96e6?{'count':_0xd8fbad,'rows':_0x5b96e6}:null;}})[_0x56c4('0x20')](respondWithResult(_0xaa6920,null))[_0x56c4('0x57')](handleError(_0xaa6920,null));};exports[_0x56c4('0x62')]=function(_0x2078eb,_0x3818a3,_0x3f9a5a){if(_0x2078eb[_0x56c4('0x55')]['id']){delete _0x2078eb[_0x56c4('0x55')]['id'];}return db[_0x56c4('0x3b')][_0x56c4('0x58')]({'where':{'id':_0x2078eb[_0x56c4('0x4f')]['id']}})[_0x56c4('0x20')](handleEntityNotFound(_0x3818a3,null))[_0x56c4('0x20')](function(_0x4f0d73){if(_0x4f0d73){return _0x4f0d73[_0x56c4('0x62')](_0x2078eb[_0x56c4('0x55')][_0x56c4('0x63')]||[]);}return null;})[_0x56c4('0x20')](respondWithResult(_0x3818a3,null))['catch'](handleError(_0x3818a3,null));};
\ No newline at end of file
+var _0x707d=['attributes','intersection','fields','length','hasOwnProperty','limit','order','sort','where','filters','pick','map','VIRTUAL','field','filter','includeAll','include','findAll','catch','show','params','options','find','create','body','destroy','FreshdeskField','merge','getFields','getDescriptions','nolimit','getTags','setTags','findOne','ids','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','jayson/promise','client','http','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','status','end','json','count','offset','set','Content-Range','reject','save','update','name','send','index','FreshdeskConfiguration','rawAttributes','model','keys','query'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0x707d,0x18b));var _0xd707=function(_0x33e952,_0x365a0f){_0x33e952=_0x33e952-0x0;var _0x3143b7=_0x707d[_0x33e952];return _0x3143b7;};'use strict';var pdf=require(_0xd707('0x0'));var emlformat=require(_0xd707('0x1'));var rimraf=require(_0xd707('0x2'));var zipdir=require(_0xd707('0x3'));var jsonpatch=require(_0xd707('0x4'));var rp=require(_0xd707('0x5'));var moment=require(_0xd707('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xd707('0x7'));var util=require(_0xd707('0x8'));var path=require(_0xd707('0x9'));var sox=require(_0xd707('0xa'));var csv=require('to-csv');var ejs=require(_0xd707('0xb'));var fs=require('fs');var _=require(_0xd707('0xc'));var squel=require('squel');var crypto=require(_0xd707('0xd'));var jsforce=require(_0xd707('0xe'));var deskjs=require(_0xd707('0xf'));var toCsv=require('to-csv');var querystring=require(_0xd707('0x10'));var Papa=require(_0xd707('0x11'));var Redis=require('ioredis');var authService=require(_0xd707('0x12'));var qs=require(_0xd707('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xd707('0x14'));var utils=require(_0xd707('0x15'));var config=require(_0xd707('0x16'));var db=require('../../mysqldb')['db'];var jayson=require(_0xd707('0x17'));var client=jayson[_0xd707('0x18')][_0xd707('0x19')]({'port':0x232a});function checkPasswordPattern(_0x5c8366,_0x552d8b,_0x59cb75){if(_0x59cb75){var _0x19b5f9=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x19b5f9['test'](_0x552d8b)){return _0x5c8366;}else{throw new Error(_0xd707('0x1a'));}}else{return _0x5c8366;}}function respondWithRpcPromise(_0x1efc13,_0x55207e,_0x1c7487,_0x2be27e){return new BPromise(function(_0x4ef57a,_0x4f5e4e){var _0x8d4e1c=_0x2be27e||client;return _0x8d4e1c['request'](_0x1efc13,_0x1c7487)[_0xd707('0x1b')](function(_0x18211b){logger['info'](_0xd707('0x1c'),_0x55207e,_0xd707('0x1d'));logger[_0xd707('0x1e')](_0xd707('0x1f'),_0x55207e,_0xd707('0x1d'),JSON[_0xd707('0x20')](_0x18211b));if(_0x18211b['error']){if(_0x18211b['error'][_0xd707('0x21')]===0x1f4){logger['error'](_0xd707('0x1c'),_0x55207e,_0x18211b[_0xd707('0x22')][_0xd707('0x23')]);return _0x4f5e4e(_0x18211b['error']['message']);}logger[_0xd707('0x22')](_0xd707('0x1c'),_0x55207e,_0x18211b[_0xd707('0x22')][_0xd707('0x23')]);return _0x4ef57a(_0x18211b[_0xd707('0x22')][_0xd707('0x23')]);}else{logger[_0xd707('0x24')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x55207e,_0xd707('0x1d'));_0x4ef57a(_0x18211b['result'][_0xd707('0x23')]);}})['catch'](function(_0x3a4fa2){logger[_0xd707('0x22')](_0xd707('0x1c'),_0x55207e,_0x3a4fa2);_0x4f5e4e(_0x3a4fa2);});});}function respondWithStatusCode(_0x495f5a,_0xef6093){_0xef6093=_0xef6093||0xcc;return function(_0x20695f){if(_0x20695f){return _0x495f5a['sendStatus'](_0xef6093);}return _0x495f5a[_0xd707('0x25')](_0xef6093)[_0xd707('0x26')]();};}function respondWithResult(_0xdf8e03,_0xdc96a5){_0xdc96a5=_0xdc96a5||0xc8;return function(_0x2a41cb){if(_0x2a41cb){return _0xdf8e03[_0xd707('0x25')](_0xdc96a5)[_0xd707('0x27')](_0x2a41cb);}};}function respondWithFilteredResult(_0x3330e6,_0x3feb7f){return function(_0x1f752e){if(_0x1f752e){var _0x27d15b=_0x1f752e[_0xd707('0x28')],_0x53d5db=_0x3feb7f[_0xd707('0x29')],_0x2c0750=_0x3feb7f[_0xd707('0x29')]+_0x3feb7f['limit'],_0x340b79;if(_0x2c0750>=_0x27d15b){_0x2c0750=_0x27d15b;_0x340b79=0xc8;}else{_0x340b79=0xce;}_0x3330e6[_0xd707('0x25')](_0x340b79);return _0x3330e6[_0xd707('0x2a')](_0xd707('0x2b'),_0x53d5db+'-'+_0x2c0750+'/'+_0x27d15b)[_0xd707('0x27')](_0x1f752e);}return null;};}function patchUpdates(_0x3ed13a){return function(_0xd340a){try{jsonpatch['apply'](_0xd340a,_0x3ed13a,!![]);}catch(_0x2db6c6){return BPromise[_0xd707('0x2c')](_0x2db6c6);}return _0xd340a[_0xd707('0x2d')]();};}function saveUpdates(_0x4eb43c,_0x56e642){return function(_0x40eef5){if(_0x40eef5){return _0x40eef5[_0xd707('0x2e')](_0x4eb43c)['then'](function(_0x345382){return _0x345382;});}return null;};}function removeEntity(_0x11b05b,_0x3b05d5){return function(_0x2dde56){if(_0x2dde56){return _0x2dde56['destroy']()['then'](function(){_0x11b05b[_0xd707('0x25')](0xcc)[_0xd707('0x26')]();});}};}function handleEntityNotFound(_0x4903da,_0x385378){return function(_0x2b385c){if(!_0x2b385c){_0x4903da['sendStatus'](0x194);}return _0x2b385c;};}function handleError(_0x4cb9fd,_0x31be53){_0x31be53=_0x31be53||0x1f4;return function(_0x4b69d4){logger[_0xd707('0x22')](_0x4b69d4['stack']);if(_0x4b69d4[_0xd707('0x2f')]){delete _0x4b69d4[_0xd707('0x2f')];}_0x4cb9fd['status'](_0x31be53)[_0xd707('0x30')](_0x4b69d4);};}exports[_0xd707('0x31')]=function(_0x1fd80e,_0x431161){var _0xf41631={},_0x34ab5f={},_0x5424f7={'count':0x0,'rows':[]};var _0x1b0ac8=db[_0xd707('0x32')][_0xd707('0x33')];_0x34ab5f[_0xd707('0x34')]=_[_0xd707('0x35')](_0x1b0ac8);_0x34ab5f[_0xd707('0x36')]=_[_0xd707('0x35')](_0x1fd80e['query']);_0x34ab5f['filters']=_['intersection'](_0x34ab5f['model'],_0x34ab5f[_0xd707('0x36')]);_0xf41631[_0xd707('0x37')]=_[_0xd707('0x38')](_0x34ab5f[_0xd707('0x34')],qs[_0xd707('0x39')](_0x1fd80e['query']['fields']));_0xf41631[_0xd707('0x37')]=_0xf41631[_0xd707('0x37')][_0xd707('0x3a')]?_0xf41631[_0xd707('0x37')]:_0x34ab5f[_0xd707('0x34')];if(!_0x1fd80e[_0xd707('0x36')][_0xd707('0x3b')]('nolimit')){_0xf41631[_0xd707('0x3c')]=qs['limit'](_0x1fd80e[_0xd707('0x36')][_0xd707('0x3c')]);_0xf41631[_0xd707('0x29')]=qs[_0xd707('0x29')](_0x1fd80e['query'][_0xd707('0x29')]);}_0xf41631[_0xd707('0x3d')]=qs[_0xd707('0x3e')](_0x1fd80e[_0xd707('0x36')][_0xd707('0x3e')]);_0xf41631[_0xd707('0x3f')]=qs[_0xd707('0x40')](_[_0xd707('0x41')](_0x1fd80e[_0xd707('0x36')],_0x34ab5f[_0xd707('0x40')]));if(_0x1fd80e[_0xd707('0x36')]['filter']){_0xf41631[_0xd707('0x3f')]=_['merge'](_0xf41631[_0xd707('0x3f')],{'$or':_[_0xd707('0x42')](_0x1b0ac8,function(_0x56f230){if(_0x56f230['type']['key']!==_0xd707('0x43')){var _0x1916f5={};_0x1916f5[_0x56f230[_0xd707('0x44')]]={'$like':'%'+_0x1fd80e[_0xd707('0x36')][_0xd707('0x45')]+'%'};return _0x1916f5;}})});}_0xf41631=_['merge']({},_0xf41631,_0x1fd80e['options']);var _0x2e9c9b={'where':_0xf41631[_0xd707('0x3f')]};return db[_0xd707('0x32')][_0xd707('0x28')](_0x2e9c9b)['then'](function(_0x34fb1a){_0x5424f7[_0xd707('0x28')]=_0x34fb1a;if(_0x1fd80e[_0xd707('0x36')][_0xd707('0x46')]){_0xf41631[_0xd707('0x47')]=[{'all':!![]}];}return db[_0xd707('0x32')][_0xd707('0x48')](_0xf41631);})[_0xd707('0x1b')](function(_0x4086b4){_0x5424f7['rows']=_0x4086b4;return _0x5424f7;})[_0xd707('0x1b')](respondWithFilteredResult(_0x431161,_0xf41631))[_0xd707('0x49')](handleError(_0x431161,null));};exports[_0xd707('0x4a')]=function(_0x5ab41c,_0x198d79){var _0x47e45c={'raw':![],'where':{'id':_0x5ab41c[_0xd707('0x4b')]['id']}},_0x5d02cf={};_0x5d02cf['model']=_[_0xd707('0x35')](db[_0xd707('0x32')]['rawAttributes']);_0x5d02cf[_0xd707('0x36')]=_[_0xd707('0x35')](_0x5ab41c['query']);_0x5d02cf[_0xd707('0x40')]=_[_0xd707('0x38')](_0x5d02cf[_0xd707('0x34')],_0x5d02cf[_0xd707('0x36')]);_0x47e45c[_0xd707('0x37')]=_[_0xd707('0x38')](_0x5d02cf[_0xd707('0x34')],qs['fields'](_0x5ab41c[_0xd707('0x36')][_0xd707('0x39')]));_0x47e45c[_0xd707('0x37')]=_0x47e45c[_0xd707('0x37')][_0xd707('0x3a')]?_0x47e45c[_0xd707('0x37')]:_0x5d02cf['model'];if(_0x5ab41c[_0xd707('0x36')][_0xd707('0x46')]){_0x47e45c[_0xd707('0x47')]=[{'all':!![]}];}_0x47e45c=_['merge']({},_0x47e45c,_0x5ab41c[_0xd707('0x4c')]);return db['FreshdeskConfiguration'][_0xd707('0x4d')](_0x47e45c)[_0xd707('0x1b')](handleEntityNotFound(_0x198d79,null))['then'](respondWithResult(_0x198d79,null))[_0xd707('0x49')](handleError(_0x198d79,null));};exports[_0xd707('0x4e')]=function(_0x56d431,_0x1a0ba8){return db[_0xd707('0x32')][_0xd707('0x4e')](_0x56d431['body'],{})[_0xd707('0x1b')](respondWithResult(_0x1a0ba8,0xc9))[_0xd707('0x49')](handleError(_0x1a0ba8,null));};exports[_0xd707('0x2e')]=function(_0xbf4822,_0x3d1de1){if(_0xbf4822['body']['id']){delete _0xbf4822[_0xd707('0x4f')]['id'];}return db[_0xd707('0x32')][_0xd707('0x4d')]({'where':{'id':_0xbf4822['params']['id']}})[_0xd707('0x1b')](handleEntityNotFound(_0x3d1de1,null))['then'](saveUpdates(_0xbf4822[_0xd707('0x4f')],null))[_0xd707('0x1b')](respondWithResult(_0x3d1de1,null))[_0xd707('0x49')](handleError(_0x3d1de1,null));};exports[_0xd707('0x50')]=function(_0x325cef,_0x294b25){return db[_0xd707('0x32')][_0xd707('0x4d')]({'where':{'id':_0x325cef[_0xd707('0x4b')]['id']}})[_0xd707('0x1b')](handleEntityNotFound(_0x294b25,null))[_0xd707('0x1b')](removeEntity(_0x294b25,null))[_0xd707('0x49')](handleError(_0x294b25,null));};exports['getFields']=function(_0xd7c202,_0x21f3a5,_0x51b6f5){var _0x351832={};var _0x28073d={};var _0x409dbf;var _0x5604a7;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0xd7c202[_0xd707('0x4b')]['id']}})['then'](handleEntityNotFound(_0x21f3a5,null))[_0xd707('0x1b')](function(_0x261d34){if(_0x261d34){_0x409dbf=_0x261d34;_0x28073d[_0xd707('0x34')]=_[_0xd707('0x35')](db[_0xd707('0x51')]['rawAttributes']);_0x28073d['query']=_[_0xd707('0x35')](_0xd7c202[_0xd707('0x36')]);_0x28073d['filters']=_[_0xd707('0x38')](_0x28073d['model'],_0x28073d[_0xd707('0x36')]);_0x351832[_0xd707('0x37')]=_[_0xd707('0x38')](_0x28073d[_0xd707('0x34')],qs['fields'](_0xd7c202[_0xd707('0x36')][_0xd707('0x39')]));_0x351832[_0xd707('0x37')]=_0x351832[_0xd707('0x37')][_0xd707('0x3a')]?_0x351832[_0xd707('0x37')]:_0x28073d['model'];_0x351832[_0xd707('0x3d')]=qs[_0xd707('0x3e')](_0xd7c202[_0xd707('0x36')]['sort']);_0x351832[_0xd707('0x3f')]=qs[_0xd707('0x40')](_['pick'](_0xd7c202[_0xd707('0x36')],_0x28073d[_0xd707('0x40')]));if(_0xd7c202['query']['filter']){_0x351832[_0xd707('0x3f')]=_[_0xd707('0x52')](_0x351832['where'],{'$or':_['map'](_0x351832[_0xd707('0x37')],function(_0x206a93){var _0x44adb7={};_0x44adb7[_0x206a93]={'$like':'%'+_0xd7c202[_0xd707('0x36')][_0xd707('0x45')]+'%'};return _0x44adb7;})});}_0x351832=_['merge']({},_0x351832,_0xd7c202[_0xd707('0x4c')]);return _0x409dbf[_0xd707('0x53')](_0x351832);}})['then'](function(_0x409cf5){if(_0x409cf5){_0x5604a7=_0x409cf5[_0xd707('0x3a')];if(!_0xd7c202[_0xd707('0x36')][_0xd707('0x3b')]('nolimit')){_0x351832[_0xd707('0x3c')]=qs[_0xd707('0x3c')](_0xd7c202[_0xd707('0x36')]['limit']);_0x351832[_0xd707('0x29')]=qs['offset'](_0xd7c202['query']['offset']);}return _0x409dbf[_0xd707('0x53')](_0x351832);}})[_0xd707('0x1b')](function(_0xa99005){if(_0xa99005){return _0xa99005?{'count':_0x5604a7,'rows':_0xa99005}:null;}})[_0xd707('0x1b')](respondWithResult(_0x21f3a5,null))['catch'](handleError(_0x21f3a5,null));};exports['getSubjects']=function(_0x189185,_0x10b62d,_0x333d10){var _0x1f7d06={};var _0x25ebf4={};var _0x281b81;var _0x493769;return db[_0xd707('0x32')]['findOne']({'where':{'id':_0x189185['params']['id']}})['then'](handleEntityNotFound(_0x10b62d,null))[_0xd707('0x1b')](function(_0x47d153){if(_0x47d153){_0x281b81=_0x47d153;_0x25ebf4[_0xd707('0x34')]=_[_0xd707('0x35')](db[_0xd707('0x51')][_0xd707('0x33')]);_0x25ebf4[_0xd707('0x36')]=_[_0xd707('0x35')](_0x189185[_0xd707('0x36')]);_0x25ebf4[_0xd707('0x40')]=_[_0xd707('0x38')](_0x25ebf4[_0xd707('0x34')],_0x25ebf4[_0xd707('0x36')]);_0x1f7d06[_0xd707('0x37')]=_[_0xd707('0x38')](_0x25ebf4['model'],qs[_0xd707('0x39')](_0x189185[_0xd707('0x36')]['fields']));_0x1f7d06[_0xd707('0x37')]=_0x1f7d06[_0xd707('0x37')][_0xd707('0x3a')]?_0x1f7d06[_0xd707('0x37')]:_0x25ebf4['model'];_0x1f7d06[_0xd707('0x3d')]=qs[_0xd707('0x3e')](_0x189185[_0xd707('0x36')]['sort']);_0x1f7d06['where']=qs['filters'](_[_0xd707('0x41')](_0x189185[_0xd707('0x36')],_0x25ebf4[_0xd707('0x40')]));if(_0x189185[_0xd707('0x36')][_0xd707('0x45')]){_0x1f7d06[_0xd707('0x3f')]=_[_0xd707('0x52')](_0x1f7d06[_0xd707('0x3f')],{'$or':_[_0xd707('0x42')](_0x1f7d06[_0xd707('0x37')],function(_0x2cfdcb){var _0x14ac65={};_0x14ac65[_0x2cfdcb]={'$like':'%'+_0x189185[_0xd707('0x36')][_0xd707('0x45')]+'%'};return _0x14ac65;})});}_0x1f7d06=_[_0xd707('0x52')]({},_0x1f7d06,_0x189185[_0xd707('0x4c')]);return _0x281b81['getSubjects'](_0x1f7d06);}})[_0xd707('0x1b')](function(_0x3c5ac5){if(_0x3c5ac5){_0x493769=_0x3c5ac5[_0xd707('0x3a')];if(!_0x189185[_0xd707('0x36')][_0xd707('0x3b')]('nolimit')){_0x1f7d06[_0xd707('0x3c')]=qs['limit'](_0x189185['query'][_0xd707('0x3c')]);_0x1f7d06[_0xd707('0x29')]=qs[_0xd707('0x29')](_0x189185['query']['offset']);}return _0x281b81['getSubjects'](_0x1f7d06);}})[_0xd707('0x1b')](function(_0x39e5f1){if(_0x39e5f1){return _0x39e5f1?{'count':_0x493769,'rows':_0x39e5f1}:null;}})[_0xd707('0x1b')](respondWithResult(_0x10b62d,null))[_0xd707('0x49')](handleError(_0x10b62d,null));};exports[_0xd707('0x54')]=function(_0x4e7a7f,_0x54115d,_0x55361f){var _0x44317d={};var _0x4a369d={};var _0x1c0f99;var _0x4de75c;return db[_0xd707('0x32')]['findOne']({'where':{'id':_0x4e7a7f[_0xd707('0x4b')]['id']}})['then'](handleEntityNotFound(_0x54115d,null))[_0xd707('0x1b')](function(_0x1a7e5a){if(_0x1a7e5a){_0x1c0f99=_0x1a7e5a;_0x4a369d[_0xd707('0x34')]=_[_0xd707('0x35')](db['FreshdeskField'][_0xd707('0x33')]);_0x4a369d['query']=_[_0xd707('0x35')](_0x4e7a7f[_0xd707('0x36')]);_0x4a369d[_0xd707('0x40')]=_[_0xd707('0x38')](_0x4a369d[_0xd707('0x34')],_0x4a369d[_0xd707('0x36')]);_0x44317d['attributes']=_[_0xd707('0x38')](_0x4a369d[_0xd707('0x34')],qs[_0xd707('0x39')](_0x4e7a7f[_0xd707('0x36')]['fields']));_0x44317d[_0xd707('0x37')]=_0x44317d['attributes']['length']?_0x44317d[_0xd707('0x37')]:_0x4a369d['model'];_0x44317d[_0xd707('0x3d')]=qs[_0xd707('0x3e')](_0x4e7a7f['query'][_0xd707('0x3e')]);_0x44317d['where']=qs[_0xd707('0x40')](_[_0xd707('0x41')](_0x4e7a7f[_0xd707('0x36')],_0x4a369d[_0xd707('0x40')]));if(_0x4e7a7f[_0xd707('0x36')][_0xd707('0x45')]){_0x44317d[_0xd707('0x3f')]=_[_0xd707('0x52')](_0x44317d['where'],{'$or':_[_0xd707('0x42')](_0x44317d['attributes'],function(_0x2aeb5e){var _0xec28e2={};_0xec28e2[_0x2aeb5e]={'$like':'%'+_0x4e7a7f[_0xd707('0x36')]['filter']+'%'};return _0xec28e2;})});}_0x44317d=_[_0xd707('0x52')]({},_0x44317d,_0x4e7a7f[_0xd707('0x4c')]);return _0x1c0f99[_0xd707('0x54')](_0x44317d);}})[_0xd707('0x1b')](function(_0x1c6da2){if(_0x1c6da2){_0x4de75c=_0x1c6da2['length'];if(!_0x4e7a7f[_0xd707('0x36')][_0xd707('0x3b')](_0xd707('0x55'))){_0x44317d[_0xd707('0x3c')]=qs['limit'](_0x4e7a7f[_0xd707('0x36')][_0xd707('0x3c')]);_0x44317d[_0xd707('0x29')]=qs[_0xd707('0x29')](_0x4e7a7f[_0xd707('0x36')][_0xd707('0x29')]);}return _0x1c0f99['getDescriptions'](_0x44317d);}})[_0xd707('0x1b')](function(_0x3f855f){if(_0x3f855f){return _0x3f855f?{'count':_0x4de75c,'rows':_0x3f855f}:null;}})['then'](respondWithResult(_0x54115d,null))[_0xd707('0x49')](handleError(_0x54115d,null));};exports[_0xd707('0x56')]=function(_0x1b0232,_0x191f87,_0x1b9b79){var _0x56e614={};var _0xebe03f={};var _0x1e165b;var _0x104105;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x1b0232[_0xd707('0x4b')]['id']}})[_0xd707('0x1b')](handleEntityNotFound(_0x191f87,null))[_0xd707('0x1b')](function(_0xfdab1e){if(_0xfdab1e){_0x1e165b=_0xfdab1e;_0xebe03f[_0xd707('0x34')]=_['keys'](db['Tag'][_0xd707('0x33')]);_0xebe03f[_0xd707('0x36')]=_[_0xd707('0x35')](_0x1b0232[_0xd707('0x36')]);_0xebe03f[_0xd707('0x40')]=_[_0xd707('0x38')](_0xebe03f[_0xd707('0x34')],_0xebe03f[_0xd707('0x36')]);_0x56e614[_0xd707('0x37')]=_[_0xd707('0x38')](_0xebe03f[_0xd707('0x34')],qs[_0xd707('0x39')](_0x1b0232[_0xd707('0x36')][_0xd707('0x39')]));_0x56e614[_0xd707('0x37')]=_0x56e614[_0xd707('0x37')]['length']?_0x56e614[_0xd707('0x37')]:_0xebe03f['model'];_0x56e614['order']=qs['sort'](_0x1b0232[_0xd707('0x36')][_0xd707('0x3e')]);_0x56e614[_0xd707('0x3f')]=qs['filters'](_[_0xd707('0x41')](_0x1b0232['query'],_0xebe03f[_0xd707('0x40')]));if(_0x1b0232['query']['filter']){_0x56e614['where']=_[_0xd707('0x52')](_0x56e614[_0xd707('0x3f')],{'$or':_[_0xd707('0x42')](_0x56e614['attributes'],function(_0xb3aa2b){var _0x2f0ea5={};_0x2f0ea5[_0xb3aa2b]={'$like':'%'+_0x1b0232['query'][_0xd707('0x45')]+'%'};return _0x2f0ea5;})});}_0x56e614=_['merge']({},_0x56e614,_0x1b0232[_0xd707('0x4c')]);return _0x1e165b['getTags'](_0x56e614);}})['then'](function(_0x32b8d0){if(_0x32b8d0){_0x104105=_0x32b8d0['length'];if(!_0x1b0232[_0xd707('0x36')][_0xd707('0x3b')]('nolimit')){_0x56e614['limit']=qs[_0xd707('0x3c')](_0x1b0232[_0xd707('0x36')]['limit']);_0x56e614[_0xd707('0x29')]=qs[_0xd707('0x29')](_0x1b0232[_0xd707('0x36')][_0xd707('0x29')]);}return _0x1e165b[_0xd707('0x56')](_0x56e614);}})[_0xd707('0x1b')](function(_0x3f59fe){if(_0x3f59fe){return _0x3f59fe?{'count':_0x104105,'rows':_0x3f59fe}:null;}})[_0xd707('0x1b')](respondWithResult(_0x191f87,null))['catch'](handleError(_0x191f87,null));};exports[_0xd707('0x57')]=function(_0x470e8d,_0x4ba5d5,_0x518c18){if(_0x470e8d[_0xd707('0x4f')]['id']){delete _0x470e8d['body']['id'];}return db[_0xd707('0x32')][_0xd707('0x58')]({'where':{'id':_0x470e8d['params']['id']}})['then'](handleEntityNotFound(_0x4ba5d5,null))[_0xd707('0x1b')](function(_0x195a46){if(_0x195a46){return _0x195a46[_0xd707('0x57')](_0x470e8d['body'][_0xd707('0x59')]||[]);}return null;})['then'](respondWithResult(_0x4ba5d5,null))['catch'](handleError(_0x4ba5d5,null));};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js
index 3e3ec83..0e208ed 100644
--- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js
+++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfbaf=['../../config/environment','./intFreshdeskConfiguration.attributes','exports','define','int_freshdesk_configurations','util','moment','bluebird','request-promise','path'];(function(_0x29b620,_0x397de3){var _0x25361c=function(_0x4ffe28){while(--_0x4ffe28){_0x29b620['push'](_0x29b620['shift']());}};_0x25361c(++_0x397de3);}(_0xfbaf,0xff));var _0xffba=function(_0xe91e80,_0x1201fe){_0xe91e80=_0xe91e80-0x0;var _0x400579=_0xfbaf[_0xe91e80];return _0x400579;};'use strict';var _=require('lodash');var util=require(_0xffba('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0xffba('0x1'));var BPromise=require(_0xffba('0x2'));var rp=require(_0xffba('0x3'));var fs=require('fs');var path=require(_0xffba('0x4'));var rimraf=require('rimraf');var config=require(_0xffba('0x5'));var attributes=require(_0xffba('0x6'));module[_0xffba('0x7')]=function(_0x145bfc,_0x40b9da){return _0x145bfc[_0xffba('0x8')]('FreshdeskConfiguration',attributes,{'tableName':_0xffba('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc8a2=['bluebird','request-promise','exports','define','FreshdeskConfiguration','int_freshdesk_configurations','lodash','util','../../config/logger'];(function(_0x49873f,_0xebd2b8){var _0x518b6d=function(_0x258b41){while(--_0x258b41){_0x49873f['push'](_0x49873f['shift']());}};_0x518b6d(++_0xebd2b8);}(_0xc8a2,0x14a));var _0x2c8a=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc8a2[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x2c8a('0x0'));var util=require(_0x2c8a('0x1'));var logger=require(_0x2c8a('0x2'))('api');var moment=require('moment');var BPromise=require(_0x2c8a('0x3'));var rp=require(_0x2c8a('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intFreshdeskConfiguration.attributes');module[_0x2c8a('0x5')]=function(_0x2f55c8,_0x3ede46){return _0x2f55c8[_0x2c8a('0x6')](_0x2c8a('0x7'),attributes,{'tableName':_0x2c8a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js
index f6ffb6a..bc0d7af 100644
--- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js
+++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7f6a=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','error','code','message','catch','lodash','moment','randomstring','ioredis'];(function(_0x578aa4,_0x3b20d8){var _0x4bbe66=function(_0x13b4cd){while(--_0x13b4cd){_0x578aa4['push'](_0x578aa4['shift']());}};_0x4bbe66(++_0x3b20d8);}(_0x7f6a,0x188));var _0xa7f6=function(_0xbe8311,_0x3eaf10){_0xbe8311=_0xbe8311-0x0;var _0x259d6d=_0x7f6a[_0xbe8311];return _0x259d6d;};'use strict';var _=require(_0xa7f6('0x0'));var util=require('util');var moment=require(_0xa7f6('0x1'));var BPromise=require('bluebird');var rs=require(_0xa7f6('0x2'));var fs=require('fs');var Redis=require(_0xa7f6('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xa7f6('0x4'));var logger=require(_0xa7f6('0x5'))(_0xa7f6('0x6'));var config=require(_0xa7f6('0x7'));var jayson=require(_0xa7f6('0x8'));var client=jayson[_0xa7f6('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x432b2e,_0x525dfc,_0x4cfe3c){return new BPromise(function(_0x10a299,_0x34ce19){return client['request'](_0x432b2e,_0x4cfe3c)[_0xa7f6('0xa')](function(_0x1aea6b){logger[_0xa7f6('0xb')](_0xa7f6('0xc'),_0x525dfc,_0xa7f6('0xd'));logger['debug']('FreshdeskConfiguration,\x20%s,\x20%s,\x20%s',_0x525dfc,'request\x20sent',JSON['stringify'](_0x1aea6b));if(_0x1aea6b[_0xa7f6('0xe')]){if(_0x1aea6b[_0xa7f6('0xe')][_0xa7f6('0xf')]===0x1f4){logger[_0xa7f6('0xe')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x525dfc,_0x1aea6b[_0xa7f6('0xe')][_0xa7f6('0x10')]);return _0x34ce19(_0x1aea6b[_0xa7f6('0xe')][_0xa7f6('0x10')]);}logger[_0xa7f6('0xe')](_0xa7f6('0xc'),_0x525dfc,_0x1aea6b['error'][_0xa7f6('0x10')]);return _0x10a299(_0x1aea6b[_0xa7f6('0xe')][_0xa7f6('0x10')]);}else{logger[_0xa7f6('0xb')](_0xa7f6('0xc'),_0x525dfc,'request\x20sent');_0x10a299(_0x1aea6b['result']['message']);}})[_0xa7f6('0x11')](function(_0x47362b){logger[_0xa7f6('0xe')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x525dfc,_0x47362b);_0x34ce19(_0x47362b);});});}
\ No newline at end of file
+var _0x1037=['FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1037,0xf0));var _0x7103=function(_0xe15270,_0x227d06){_0xe15270=_0xe15270-0x0;var _0x1e813b=_0x1037[_0xe15270];return _0x1e813b;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7103('0x0'));var BPromise=require(_0x7103('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7103('0x2'));var db=require(_0x7103('0x3'))['db'];var utils=require(_0x7103('0x4'));var logger=require('../../config/logger')(_0x7103('0x5'));var config=require(_0x7103('0x6'));var jayson=require(_0x7103('0x7'));var client=jayson[_0x7103('0x8')][_0x7103('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x43f966,_0x455256,_0x5eabf1){return new BPromise(function(_0x3399b1,_0x189efe){return client[_0x7103('0xa')](_0x43f966,_0x5eabf1)['then'](function(_0x107a2d){logger[_0x7103('0xb')](_0x7103('0xc'),_0x455256,_0x7103('0xd'));logger['debug'](_0x7103('0xe'),_0x455256,'request\x20sent',JSON[_0x7103('0xf')](_0x107a2d));if(_0x107a2d[_0x7103('0x10')]){if(_0x107a2d['error'][_0x7103('0x11')]===0x1f4){logger['error'](_0x7103('0xc'),_0x455256,_0x107a2d[_0x7103('0x10')][_0x7103('0x12')]);return _0x189efe(_0x107a2d[_0x7103('0x10')][_0x7103('0x12')]);}logger[_0x7103('0x10')](_0x7103('0xc'),_0x455256,_0x107a2d[_0x7103('0x10')]['message']);return _0x3399b1(_0x107a2d[_0x7103('0x10')]['message']);}else{logger[_0x7103('0xb')](_0x7103('0xc'),_0x455256,_0x7103('0xd'));_0x3399b1(_0x107a2d[_0x7103('0x13')][_0x7103('0x12')]);}})[_0x7103('0x14')](function(_0x2c14e7){logger[_0x7103('0x10')](_0x7103('0xc'),_0x455256,_0x2c14e7);_0x189efe(_0x2c14e7);});});}
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/index.js b/server/api/intFreshdeskField/index.js
index 5d4dff2..32a65f5 100644
--- a/server/api/intFreshdeskField/index.js
+++ b/server/api/intFreshdeskField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7116=['get','isAuthenticated','index','/:id','show','post','put','update','delete','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./intFreshdeskField.controller'];(function(_0x585d94,_0x5bfc51){var _0x1eed00=function(_0xf58097){while(--_0xf58097){_0x585d94['push'](_0x585d94['shift']());}};_0x1eed00(++_0x5bfc51);}(_0x7116,0x17f));var _0x6711=function(_0x53ff2a,_0x21757a){_0x53ff2a=_0x53ff2a-0x0;var _0x45f84d=_0x7116[_0x53ff2a];return _0x45f84d;};'use strict';var multer=require(_0x6711('0x0'));var util=require('util');var path=require(_0x6711('0x1'));var timeout=require(_0x6711('0x2'));var express=require(_0x6711('0x3'));var router=express[_0x6711('0x4')]();var auth=require(_0x6711('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x6711('0x6'));var controller=require(_0x6711('0x7'));router[_0x6711('0x8')]('/',auth[_0x6711('0x9')](),controller[_0x6711('0xa')]);router['get'](_0x6711('0xb'),auth['isAuthenticated'](),controller[_0x6711('0xc')]);router[_0x6711('0xd')]('/',auth[_0x6711('0x9')](),controller['create']);router[_0x6711('0xe')](_0x6711('0xb'),auth[_0x6711('0x9')](),controller[_0x6711('0xf')]);router[_0x6711('0x10')](_0x6711('0xb'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x0b3a=['path','Router','../../components/auth/service','./intFreshdeskField.controller','isAuthenticated','/:id','post','create','put','update','destroy','exports','util'];(function(_0x5e1043,_0x5bf223){var _0x2cd368=function(_0x22a91b){while(--_0x22a91b){_0x5e1043['push'](_0x5e1043['shift']());}};_0x2cd368(++_0x5bf223);}(_0x0b3a,0x178));var _0xa0b3=function(_0x53d172,_0x46611b){_0x53d172=_0x53d172-0x0;var _0x1bd0a2=_0x0b3a[_0x53d172];return _0x1bd0a2;};'use strict';var multer=require('multer');var util=require(_0xa0b3('0x0'));var path=require(_0xa0b3('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xa0b3('0x2')]();var auth=require(_0xa0b3('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xa0b3('0x4'));router['get']('/',auth[_0xa0b3('0x5')](),controller['index']);router['get'](_0xa0b3('0x6'),auth[_0xa0b3('0x5')](),controller['show']);router[_0xa0b3('0x7')]('/',auth[_0xa0b3('0x5')](),controller[_0xa0b3('0x8')]);router[_0xa0b3('0x9')](_0xa0b3('0x6'),auth[_0xa0b3('0x5')](),controller[_0xa0b3('0xa')]);router['delete'](_0xa0b3('0x6'),auth['isAuthenticated'](),controller[_0xa0b3('0xb')]);module[_0xa0b3('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.attributes.js b/server/api/intFreshdeskField/intFreshdeskField.attributes.js
index eed823c..429efe5 100644
--- a/server/api/intFreshdeskField/intFreshdeskField.attributes.js
+++ b/server/api/intFreshdeskField/intFreshdeskField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9354=['variable','customVariable','keyValue','string','STRING','BOOLEAN','exports','ENUM'];(function(_0x253fc1,_0x2bea33){var _0x5b7dda=function(_0xf4adf9){while(--_0xf4adf9){_0x253fc1['push'](_0x253fc1['shift']());}};_0x5b7dda(++_0x2bea33);}(_0x9354,0x96));var _0x4935=function(_0x26d9b3,_0x591f4e){_0x26d9b3=_0x26d9b3-0x0;var _0x15c226=_0x9354[_0x26d9b3];return _0x15c226;};'use strict';var Sequelize=require('sequelize');module[_0x4935('0x0')]={'type':{'type':Sequelize[_0x4935('0x1')]('string',_0x4935('0x2'),_0x4935('0x3'),_0x4935('0x4')),'defaultValue':_0x4935('0x5')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x4935('0x6')]},'keyType':{'type':Sequelize[_0x4935('0x1')](_0x4935('0x5'),_0x4935('0x2'),_0x4935('0x3'))},'keyContent':{'type':Sequelize[_0x4935('0x6')]},'idField':{'type':Sequelize[_0x4935('0x6')]},'nameField':{'type':Sequelize[_0x4935('0x6')]},'customField':{'type':Sequelize[_0x4935('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x702d=['STRING','customVariable','BOOLEAN','sequelize','exports','ENUM','string','variable','keyValue'];(function(_0x3964c3,_0x566ce6){var _0x34286a=function(_0x539a54){while(--_0x539a54){_0x3964c3['push'](_0x3964c3['shift']());}};_0x34286a(++_0x566ce6);}(_0x702d,0x147));var _0xd702=function(_0x45461d,_0x248e3a){_0x45461d=_0x45461d-0x0;var _0x162da6=_0x702d[_0x45461d];return _0x162da6;};'use strict';var Sequelize=require(_0xd702('0x0'));module[_0xd702('0x1')]={'type':{'type':Sequelize[_0xd702('0x2')](_0xd702('0x3'),_0xd702('0x4'),'customVariable',_0xd702('0x5')),'defaultValue':_0xd702('0x3')},'content':{'type':Sequelize[_0xd702('0x6')]},'key':{'type':Sequelize[_0xd702('0x6')]},'keyType':{'type':Sequelize['ENUM'](_0xd702('0x3'),'variable',_0xd702('0x7'))},'keyContent':{'type':Sequelize[_0xd702('0x6')]},'idField':{'type':Sequelize[_0xd702('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0xd702('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.controller.js b/server/api/intFreshdeskField/intFreshdeskField.controller.js
index b2cc8f3..62dee81 100644
--- a/server/api/intFreshdeskField/intFreshdeskField.controller.js
+++ b/server/api/intFreshdeskField/intFreshdeskField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x38e2=['index','FreshdeskField','rawAttributes','keys','query','filters','attributes','intersection','fields','model','hasOwnProperty','nolimit','order','sort','pick','where','merge','map','type','key','VIRTUAL','field','filter','options','includeAll','include','findAll','rows','show','params','length','find','catch','create','body','update','eml-format','rimraf','request-promise','moment','util','path','sox','to-csv','ejs','squel','crypto','jsforce','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','count','offset','limit','set','Content-Range','json','apply','reject','save','destroy','then','error','stack','name','send'];(function(_0x1bee9a,_0x247b63){var _0x2fc9b0=function(_0x7e352d){while(--_0x7e352d){_0x1bee9a['push'](_0x1bee9a['shift']());}};_0x2fc9b0(++_0x247b63);}(_0x38e2,0xff));var _0x238e=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x38e2[_0x321bb2];return _0x9c12ed;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x238e('0x0'));var rimraf=require(_0x238e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x238e('0x2'));var moment=require(_0x238e('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x238e('0x4'));var path=require(_0x238e('0x5'));var sox=require(_0x238e('0x6'));var csv=require(_0x238e('0x7'));var ejs=require(_0x238e('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x238e('0x9'));var crypto=require(_0x238e('0xa'));var jsforce=require(_0x238e('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x238e('0x7'));var querystring=require('querystring');var Papa=require(_0x238e('0xc'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x238e('0xd'));var hardwareService=require(_0x238e('0xe'));var logger=require(_0x238e('0xf'))('api');var utils=require(_0x238e('0x10'));var config=require(_0x238e('0x11'));var db=require(_0x238e('0x12'))['db'];function respondWithStatusCode(_0x2a5a6a,_0x38963c){_0x38963c=_0x38963c||0xcc;return function(_0x4adc80){if(_0x4adc80){return _0x2a5a6a[_0x238e('0x13')](_0x38963c);}return _0x2a5a6a['status'](_0x38963c)[_0x238e('0x14')]();};}function respondWithResult(_0x343a0f,_0x231a74){_0x231a74=_0x231a74||0xc8;return function(_0x164131){if(_0x164131){return _0x343a0f[_0x238e('0x15')](_0x231a74)['json'](_0x164131);}};}function respondWithFilteredResult(_0x37418d,_0x8a8780){return function(_0x5be8b9){if(_0x5be8b9){var _0x52c321=_0x5be8b9[_0x238e('0x16')],_0x12a96c=_0x8a8780[_0x238e('0x17')],_0x1016d9=_0x8a8780[_0x238e('0x17')]+_0x8a8780[_0x238e('0x18')],_0x56cc0e;if(_0x1016d9>=_0x52c321){_0x1016d9=_0x52c321;_0x56cc0e=0xc8;}else{_0x56cc0e=0xce;}_0x37418d[_0x238e('0x15')](_0x56cc0e);return _0x37418d[_0x238e('0x19')](_0x238e('0x1a'),_0x12a96c+'-'+_0x1016d9+'/'+_0x52c321)[_0x238e('0x1b')](_0x5be8b9);}return null;};}function patchUpdates(_0x4ed984){return function(_0x442ef0){try{jsonpatch[_0x238e('0x1c')](_0x442ef0,_0x4ed984,!![]);}catch(_0x24f70a){return BPromise[_0x238e('0x1d')](_0x24f70a);}return _0x442ef0[_0x238e('0x1e')]();};}function saveUpdates(_0xa95b54,_0x1bd994){return function(_0x16ce46){if(_0x16ce46){return _0x16ce46['update'](_0xa95b54)['then'](function(_0x34dd67){return _0x34dd67;});}return null;};}function removeEntity(_0x2f37a6,_0x37c4c5){return function(_0x56cefa){if(_0x56cefa){return _0x56cefa[_0x238e('0x1f')]()[_0x238e('0x20')](function(){_0x2f37a6[_0x238e('0x15')](0xcc)[_0x238e('0x14')]();});}};}function handleEntityNotFound(_0x1bbfc2,_0x606443){return function(_0x344726){if(!_0x344726){_0x1bbfc2[_0x238e('0x13')](0x194);}return _0x344726;};}function handleError(_0x16e540,_0x1b4b9c){_0x1b4b9c=_0x1b4b9c||0x1f4;return function(_0x509409){logger[_0x238e('0x21')](_0x509409[_0x238e('0x22')]);if(_0x509409[_0x238e('0x23')]){delete _0x509409['name'];}_0x16e540[_0x238e('0x15')](_0x1b4b9c)[_0x238e('0x24')](_0x509409);};}exports[_0x238e('0x25')]=function(_0x1ad6a7,_0x5e9c7e){var _0x291a0d={},_0x595357={},_0x1334de={'count':0x0,'rows':[]};var _0x105da6=db[_0x238e('0x26')][_0x238e('0x27')];_0x595357['model']=_['keys'](_0x105da6);_0x595357['query']=_[_0x238e('0x28')](_0x1ad6a7[_0x238e('0x29')]);_0x595357[_0x238e('0x2a')]=_['intersection'](_0x595357['model'],_0x595357['query']);_0x291a0d[_0x238e('0x2b')]=_[_0x238e('0x2c')](_0x595357['model'],qs[_0x238e('0x2d')](_0x1ad6a7['query'][_0x238e('0x2d')]));_0x291a0d[_0x238e('0x2b')]=_0x291a0d[_0x238e('0x2b')]['length']?_0x291a0d[_0x238e('0x2b')]:_0x595357[_0x238e('0x2e')];if(!_0x1ad6a7[_0x238e('0x29')][_0x238e('0x2f')](_0x238e('0x30'))){_0x291a0d[_0x238e('0x18')]=qs[_0x238e('0x18')](_0x1ad6a7[_0x238e('0x29')][_0x238e('0x18')]);_0x291a0d['offset']=qs[_0x238e('0x17')](_0x1ad6a7['query'][_0x238e('0x17')]);}_0x291a0d[_0x238e('0x31')]=qs[_0x238e('0x32')](_0x1ad6a7[_0x238e('0x29')][_0x238e('0x32')]);_0x291a0d['where']=qs[_0x238e('0x2a')](_[_0x238e('0x33')](_0x1ad6a7['query'],_0x595357[_0x238e('0x2a')]));if(_0x1ad6a7[_0x238e('0x29')]['filter']){_0x291a0d[_0x238e('0x34')]=_[_0x238e('0x35')](_0x291a0d[_0x238e('0x34')],{'$or':_[_0x238e('0x36')](_0x105da6,function(_0xb8672d){if(_0xb8672d[_0x238e('0x37')][_0x238e('0x38')]!==_0x238e('0x39')){var _0x86a250={};_0x86a250[_0xb8672d[_0x238e('0x3a')]]={'$like':'%'+_0x1ad6a7['query'][_0x238e('0x3b')]+'%'};return _0x86a250;}})});}_0x291a0d=_[_0x238e('0x35')]({},_0x291a0d,_0x1ad6a7[_0x238e('0x3c')]);var _0x1f47fa={'where':_0x291a0d[_0x238e('0x34')]};return db[_0x238e('0x26')]['count'](_0x1f47fa)[_0x238e('0x20')](function(_0x3c4960){_0x1334de[_0x238e('0x16')]=_0x3c4960;if(_0x1ad6a7[_0x238e('0x29')][_0x238e('0x3d')]){_0x291a0d[_0x238e('0x3e')]=[{'all':!![]}];}return db['FreshdeskField'][_0x238e('0x3f')](_0x291a0d);})[_0x238e('0x20')](function(_0x89d96c){_0x1334de[_0x238e('0x40')]=_0x89d96c;return _0x1334de;})[_0x238e('0x20')](respondWithFilteredResult(_0x5e9c7e,_0x291a0d))['catch'](handleError(_0x5e9c7e,null));};exports[_0x238e('0x41')]=function(_0x57844e,_0xd69ac1){var _0x5492f0={'raw':!![],'where':{'id':_0x57844e[_0x238e('0x42')]['id']}},_0x1e83b6={};_0x1e83b6[_0x238e('0x2e')]=_[_0x238e('0x28')](db['FreshdeskField'][_0x238e('0x27')]);_0x1e83b6['query']=_[_0x238e('0x28')](_0x57844e[_0x238e('0x29')]);_0x1e83b6[_0x238e('0x2a')]=_[_0x238e('0x2c')](_0x1e83b6[_0x238e('0x2e')],_0x1e83b6['query']);_0x5492f0[_0x238e('0x2b')]=_[_0x238e('0x2c')](_0x1e83b6['model'],qs[_0x238e('0x2d')](_0x57844e[_0x238e('0x29')][_0x238e('0x2d')]));_0x5492f0['attributes']=_0x5492f0[_0x238e('0x2b')][_0x238e('0x43')]?_0x5492f0[_0x238e('0x2b')]:_0x1e83b6['model'];if(_0x57844e['query'][_0x238e('0x3d')]){_0x5492f0[_0x238e('0x3e')]=[{'all':!![]}];}_0x5492f0=_[_0x238e('0x35')]({},_0x5492f0,_0x57844e[_0x238e('0x3c')]);return db[_0x238e('0x26')][_0x238e('0x44')](_0x5492f0)[_0x238e('0x20')](handleEntityNotFound(_0xd69ac1,null))['then'](respondWithResult(_0xd69ac1,null))[_0x238e('0x45')](handleError(_0xd69ac1,null));};exports[_0x238e('0x46')]=function(_0x2b5e79,_0x123a44){return db[_0x238e('0x26')][_0x238e('0x46')](_0x2b5e79[_0x238e('0x47')],{})[_0x238e('0x20')](respondWithResult(_0x123a44,0xc9))[_0x238e('0x45')](handleError(_0x123a44,null));};exports[_0x238e('0x48')]=function(_0x4d584c,_0x56a95c){if(_0x4d584c[_0x238e('0x47')]['id']){delete _0x4d584c[_0x238e('0x47')]['id'];}return db[_0x238e('0x26')][_0x238e('0x44')]({'where':{'id':_0x4d584c[_0x238e('0x42')]['id']}})[_0x238e('0x20')](handleEntityNotFound(_0x56a95c,null))[_0x238e('0x20')](saveUpdates(_0x4d584c[_0x238e('0x47')],null))['then'](respondWithResult(_0x56a95c,null))[_0x238e('0x45')](handleError(_0x56a95c,null));};exports[_0x238e('0x1f')]=function(_0x250666,_0x37dd29){return db[_0x238e('0x26')][_0x238e('0x44')]({'where':{'id':_0x250666[_0x238e('0x42')]['id']}})[_0x238e('0x20')](handleEntityNotFound(_0x37dd29,null))[_0x238e('0x20')](removeEntity(_0x37dd29,null))[_0x238e('0x45')](handleError(_0x37dd29,null));};
\ No newline at end of file
+var _0xa899=['create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','crypto','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','sendStatus','status','end','json','offset','set','Content-Range','apply','reject','save','update','then','destroy','name','FreshdeskField','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','nolimit','limit','order','sort','where','pick','filter','merge','map','key','VIRTUAL','field','options','count','include','findAll','rows','catch','params','find'];(function(_0x502c83,_0x1db15d){var _0x40dd62=function(_0x405dfa){while(--_0x405dfa){_0x502c83['push'](_0x502c83['shift']());}};_0x40dd62(++_0x1db15d);}(_0xa899,0x147));var _0x9a89=function(_0x4ed520,_0x21be63){_0x4ed520=_0x4ed520-0x0;var _0x4415a6=_0xa899[_0x4ed520];return _0x4415a6;};'use strict';var pdf=require(_0x9a89('0x0'));var emlformat=require(_0x9a89('0x1'));var rimraf=require(_0x9a89('0x2'));var zipdir=require(_0x9a89('0x3'));var jsonpatch=require(_0x9a89('0x4'));var rp=require('request-promise');var moment=require(_0x9a89('0x5'));var BPromise=require(_0x9a89('0x6'));var Mustache=require(_0x9a89('0x7'));var util=require('util');var path=require(_0x9a89('0x8'));var sox=require(_0x9a89('0x9'));var csv=require(_0x9a89('0xa'));var ejs=require(_0x9a89('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x9a89('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x9a89('0xa'));var querystring=require('querystring');var Papa=require(_0x9a89('0xd'));var Redis=require(_0x9a89('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x9a89('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9a89('0x10'))(_0x9a89('0x11'));var utils=require(_0x9a89('0x12'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x56ef60,_0x4e3665){_0x4e3665=_0x4e3665||0xcc;return function(_0x5a1723){if(_0x5a1723){return _0x56ef60[_0x9a89('0x13')](_0x4e3665);}return _0x56ef60[_0x9a89('0x14')](_0x4e3665)[_0x9a89('0x15')]();};}function respondWithResult(_0x2d4c40,_0x4c03ae){_0x4c03ae=_0x4c03ae||0xc8;return function(_0x4f53bd){if(_0x4f53bd){return _0x2d4c40['status'](_0x4c03ae)[_0x9a89('0x16')](_0x4f53bd);}};}function respondWithFilteredResult(_0x554235,_0x5df49b){return function(_0x27ec51){if(_0x27ec51){var _0x3630e7=_0x27ec51['count'],_0x20d568=_0x5df49b['offset'],_0x266832=_0x5df49b[_0x9a89('0x17')]+_0x5df49b['limit'],_0x24af1a;if(_0x266832>=_0x3630e7){_0x266832=_0x3630e7;_0x24af1a=0xc8;}else{_0x24af1a=0xce;}_0x554235['status'](_0x24af1a);return _0x554235[_0x9a89('0x18')](_0x9a89('0x19'),_0x20d568+'-'+_0x266832+'/'+_0x3630e7)['json'](_0x27ec51);}return null;};}function patchUpdates(_0x261624){return function(_0x535dd2){try{jsonpatch[_0x9a89('0x1a')](_0x535dd2,_0x261624,!![]);}catch(_0x51a5fc){return BPromise[_0x9a89('0x1b')](_0x51a5fc);}return _0x535dd2[_0x9a89('0x1c')]();};}function saveUpdates(_0x2126a2,_0xcad715){return function(_0x3015a4){if(_0x3015a4){return _0x3015a4[_0x9a89('0x1d')](_0x2126a2)[_0x9a89('0x1e')](function(_0x1e6a37){return _0x1e6a37;});}return null;};}function removeEntity(_0x2ce716,_0x516c5f){return function(_0x2a58fb){if(_0x2a58fb){return _0x2a58fb[_0x9a89('0x1f')]()[_0x9a89('0x1e')](function(){_0x2ce716[_0x9a89('0x14')](0xcc)[_0x9a89('0x15')]();});}};}function handleEntityNotFound(_0x4cd232,_0x34d40b){return function(_0x29061f){if(!_0x29061f){_0x4cd232['sendStatus'](0x194);}return _0x29061f;};}function handleError(_0x4e7ba6,_0x29bb08){_0x29bb08=_0x29bb08||0x1f4;return function(_0x3fa08d){logger['error'](_0x3fa08d['stack']);if(_0x3fa08d[_0x9a89('0x20')]){delete _0x3fa08d[_0x9a89('0x20')];}_0x4e7ba6[_0x9a89('0x14')](_0x29bb08)['send'](_0x3fa08d);};}exports['index']=function(_0x447fd4,_0x3ee5ef){var _0x1985b2={},_0x4f9cfa={},_0x3efa4d={'count':0x0,'rows':[]};var _0xe46a88=db[_0x9a89('0x21')][_0x9a89('0x22')];_0x4f9cfa[_0x9a89('0x23')]=_[_0x9a89('0x24')](_0xe46a88);_0x4f9cfa[_0x9a89('0x25')]=_[_0x9a89('0x24')](_0x447fd4[_0x9a89('0x25')]);_0x4f9cfa[_0x9a89('0x26')]=_[_0x9a89('0x27')](_0x4f9cfa[_0x9a89('0x23')],_0x4f9cfa[_0x9a89('0x25')]);_0x1985b2['attributes']=_[_0x9a89('0x27')](_0x4f9cfa['model'],qs[_0x9a89('0x28')](_0x447fd4[_0x9a89('0x25')][_0x9a89('0x28')]));_0x1985b2[_0x9a89('0x29')]=_0x1985b2['attributes'][_0x9a89('0x2a')]?_0x1985b2[_0x9a89('0x29')]:_0x4f9cfa[_0x9a89('0x23')];if(!_0x447fd4[_0x9a89('0x25')]['hasOwnProperty'](_0x9a89('0x2b'))){_0x1985b2[_0x9a89('0x2c')]=qs[_0x9a89('0x2c')](_0x447fd4[_0x9a89('0x25')][_0x9a89('0x2c')]);_0x1985b2['offset']=qs[_0x9a89('0x17')](_0x447fd4[_0x9a89('0x25')][_0x9a89('0x17')]);}_0x1985b2[_0x9a89('0x2d')]=qs[_0x9a89('0x2e')](_0x447fd4[_0x9a89('0x25')][_0x9a89('0x2e')]);_0x1985b2[_0x9a89('0x2f')]=qs[_0x9a89('0x26')](_[_0x9a89('0x30')](_0x447fd4[_0x9a89('0x25')],_0x4f9cfa[_0x9a89('0x26')]));if(_0x447fd4['query'][_0x9a89('0x31')]){_0x1985b2[_0x9a89('0x2f')]=_[_0x9a89('0x32')](_0x1985b2['where'],{'$or':_[_0x9a89('0x33')](_0xe46a88,function(_0x2b37e5){if(_0x2b37e5['type'][_0x9a89('0x34')]!==_0x9a89('0x35')){var _0x4798a8={};_0x4798a8[_0x2b37e5[_0x9a89('0x36')]]={'$like':'%'+_0x447fd4[_0x9a89('0x25')][_0x9a89('0x31')]+'%'};return _0x4798a8;}})});}_0x1985b2=_[_0x9a89('0x32')]({},_0x1985b2,_0x447fd4[_0x9a89('0x37')]);var _0x47de98={'where':_0x1985b2[_0x9a89('0x2f')]};return db[_0x9a89('0x21')][_0x9a89('0x38')](_0x47de98)[_0x9a89('0x1e')](function(_0x252e43){_0x3efa4d[_0x9a89('0x38')]=_0x252e43;if(_0x447fd4[_0x9a89('0x25')]['includeAll']){_0x1985b2[_0x9a89('0x39')]=[{'all':!![]}];}return db[_0x9a89('0x21')][_0x9a89('0x3a')](_0x1985b2);})['then'](function(_0x9da2cd){_0x3efa4d[_0x9a89('0x3b')]=_0x9da2cd;return _0x3efa4d;})['then'](respondWithFilteredResult(_0x3ee5ef,_0x1985b2))[_0x9a89('0x3c')](handleError(_0x3ee5ef,null));};exports['show']=function(_0x24f6d0,_0x1a970c){var _0x362a12={'raw':!![],'where':{'id':_0x24f6d0[_0x9a89('0x3d')]['id']}},_0x5917d4={};_0x5917d4[_0x9a89('0x23')]=_['keys'](db[_0x9a89('0x21')][_0x9a89('0x22')]);_0x5917d4[_0x9a89('0x25')]=_['keys'](_0x24f6d0[_0x9a89('0x25')]);_0x5917d4[_0x9a89('0x26')]=_[_0x9a89('0x27')](_0x5917d4[_0x9a89('0x23')],_0x5917d4[_0x9a89('0x25')]);_0x362a12['attributes']=_[_0x9a89('0x27')](_0x5917d4[_0x9a89('0x23')],qs[_0x9a89('0x28')](_0x24f6d0[_0x9a89('0x25')]['fields']));_0x362a12[_0x9a89('0x29')]=_0x362a12[_0x9a89('0x29')][_0x9a89('0x2a')]?_0x362a12[_0x9a89('0x29')]:_0x5917d4[_0x9a89('0x23')];if(_0x24f6d0[_0x9a89('0x25')]['includeAll']){_0x362a12[_0x9a89('0x39')]=[{'all':!![]}];}_0x362a12=_[_0x9a89('0x32')]({},_0x362a12,_0x24f6d0['options']);return db[_0x9a89('0x21')][_0x9a89('0x3e')](_0x362a12)[_0x9a89('0x1e')](handleEntityNotFound(_0x1a970c,null))[_0x9a89('0x1e')](respondWithResult(_0x1a970c,null))[_0x9a89('0x3c')](handleError(_0x1a970c,null));};exports[_0x9a89('0x3f')]=function(_0x49fdce,_0x1d66b6){return db['FreshdeskField'][_0x9a89('0x3f')](_0x49fdce[_0x9a89('0x40')],{})[_0x9a89('0x1e')](respondWithResult(_0x1d66b6,0xc9))[_0x9a89('0x3c')](handleError(_0x1d66b6,null));};exports[_0x9a89('0x1d')]=function(_0x2aff6d,_0x2a78bf){if(_0x2aff6d[_0x9a89('0x40')]['id']){delete _0x2aff6d[_0x9a89('0x40')]['id'];}return db['FreshdeskField'][_0x9a89('0x3e')]({'where':{'id':_0x2aff6d[_0x9a89('0x3d')]['id']}})['then'](handleEntityNotFound(_0x2a78bf,null))['then'](saveUpdates(_0x2aff6d[_0x9a89('0x40')],null))[_0x9a89('0x1e')](respondWithResult(_0x2a78bf,null))[_0x9a89('0x3c')](handleError(_0x2a78bf,null));};exports['destroy']=function(_0x8d0cc8,_0xb1e5c5){return db['FreshdeskField'][_0x9a89('0x3e')]({'where':{'id':_0x8d0cc8[_0x9a89('0x3d')]['id']}})['then'](handleEntityNotFound(_0xb1e5c5,null))[_0x9a89('0x1e')](removeEntity(_0xb1e5c5,null))['catch'](handleError(_0xb1e5c5,null));};
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.model.js b/server/api/intFreshdeskField/intFreshdeskField.model.js
index e6f8d99..0cc80dc 100644
--- a/server/api/intFreshdeskField/intFreshdeskField.model.js
+++ b/server/api/intFreshdeskField/intFreshdeskField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x977c=['moment','bluebird','request-promise','path','../../config/environment','./intFreshdeskField.attributes','exports','define','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','FieldId','lodash','util','../../config/logger','api'];(function(_0x2e1423,_0x15bbed){var _0x13018e=function(_0x2cedc4){while(--_0x2cedc4){_0x2e1423['push'](_0x2e1423['shift']());}};_0x13018e(++_0x15bbed);}(_0x977c,0x73));var _0xc977=function(_0x4726a0,_0x3e0162){_0x4726a0=_0x4726a0-0x0;var _0x193cd1=_0x977c[_0x4726a0];return _0x193cd1;};'use strict';var _=require(_0xc977('0x0'));var util=require(_0xc977('0x1'));var logger=require(_0xc977('0x2'))(_0xc977('0x3'));var moment=require(_0xc977('0x4'));var BPromise=require(_0xc977('0x5'));var rp=require(_0xc977('0x6'));var fs=require('fs');var path=require(_0xc977('0x7'));var rimraf=require('rimraf');var config=require(_0xc977('0x8'));var attributes=require(_0xc977('0x9'));module[_0xc977('0xa')]=function(_0x175057,_0x36d22f){return _0x175057[_0xc977('0xb')](_0xc977('0xc'),attributes,{'tableName':_0xc977('0xd'),'paranoid':![],'indexes':[{'name':_0xc977('0xe'),'fields':[_0xc977('0xf'),_0xc977('0x10')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xe5e7=['freshdesk_unique_index','idField','FieldId','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshdeskField.attributes','FreshdeskField','int_freshdesk_fields'];(function(_0x381e5a,_0x489b08){var _0xd4d7cb=function(_0x567c5b){while(--_0x567c5b){_0x381e5a['push'](_0x381e5a['shift']());}};_0xd4d7cb(++_0x489b08);}(_0xe5e7,0x10d));var _0x7e5e=function(_0x35f119,_0x2d3850){_0x35f119=_0x35f119-0x0;var _0x3c59e8=_0xe5e7[_0x35f119];return _0x3c59e8;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x7e5e('0x0'))(_0x7e5e('0x1'));var moment=require(_0x7e5e('0x2'));var BPromise=require(_0x7e5e('0x3'));var rp=require(_0x7e5e('0x4'));var fs=require('fs');var path=require(_0x7e5e('0x5'));var rimraf=require(_0x7e5e('0x6'));var config=require(_0x7e5e('0x7'));var attributes=require(_0x7e5e('0x8'));module['exports']=function(_0x5d0438,_0x15e04a){return _0x5d0438['define'](_0x7e5e('0x9'),attributes,{'tableName':_0x7e5e('0xa'),'paranoid':![],'indexes':[{'name':_0x7e5e('0xb'),'fields':[_0x7e5e('0xc'),_0x7e5e('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.rpc.js b/server/api/intFreshdeskField/intFreshdeskField.rpc.js
index f1a1a28..ad219d3 100644
--- a/server/api/intFreshdeskField/intFreshdeskField.rpc.js
+++ b/server/api/intFreshdeskField/intFreshdeskField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfd28=['error','code','message','info','result','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','FreshdeskField,\x20%s,\x20%s','debug','request\x20sent'];(function(_0x24734d,_0x1faa70){var _0x657c5a=function(_0x34480d){while(--_0x34480d){_0x24734d['push'](_0x24734d['shift']());}};_0x657c5a(++_0x1faa70);}(_0xfd28,0x148));var _0x8fd2=function(_0x3db122,_0x5e6bee){_0x3db122=_0x3db122-0x0;var _0x325b67=_0xfd28[_0x3db122];return _0x325b67;};'use strict';var _=require('lodash');var util=require(_0x8fd2('0x0'));var moment=require(_0x8fd2('0x1'));var BPromise=require('bluebird');var rs=require(_0x8fd2('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8fd2('0x3'))['db'];var utils=require(_0x8fd2('0x4'));var logger=require(_0x8fd2('0x5'))('rpc');var config=require(_0x8fd2('0x6'));var jayson=require(_0x8fd2('0x7'));var client=jayson[_0x8fd2('0x8')][_0x8fd2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2f0afc,_0x4bdc1a,_0x53d938){return new BPromise(function(_0x10fccf,_0x466c3d){return client[_0x8fd2('0xa')](_0x2f0afc,_0x53d938)['then'](function(_0x13cc69){logger['info'](_0x8fd2('0xb'),_0x4bdc1a,'request\x20sent');logger[_0x8fd2('0xc')]('FreshdeskField,\x20%s,\x20%s,\x20%s',_0x4bdc1a,_0x8fd2('0xd'),JSON['stringify'](_0x13cc69));if(_0x13cc69[_0x8fd2('0xe')]){if(_0x13cc69['error'][_0x8fd2('0xf')]===0x1f4){logger[_0x8fd2('0xe')](_0x8fd2('0xb'),_0x4bdc1a,_0x13cc69[_0x8fd2('0xe')][_0x8fd2('0x10')]);return _0x466c3d(_0x13cc69[_0x8fd2('0xe')][_0x8fd2('0x10')]);}logger[_0x8fd2('0xe')](_0x8fd2('0xb'),_0x4bdc1a,_0x13cc69[_0x8fd2('0xe')][_0x8fd2('0x10')]);return _0x10fccf(_0x13cc69[_0x8fd2('0xe')][_0x8fd2('0x10')]);}else{logger[_0x8fd2('0x11')](_0x8fd2('0xb'),_0x4bdc1a,'request\x20sent');_0x10fccf(_0x13cc69[_0x8fd2('0x12')]['message']);}})['catch'](function(_0x56f75d){logger[_0x8fd2('0xe')](_0x8fd2('0xb'),_0x4bdc1a,_0x56f75d);_0x466c3d(_0x56f75d);});});}
\ No newline at end of file
+var _0x2356=['then','info','FreshdeskField,\x20%s,\x20%s','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','ioredis','../../mysqldb','rpc','client','http'];(function(_0xff565,_0x149ae5){var _0x5c0e6c=function(_0x348802){while(--_0x348802){_0xff565['push'](_0xff565['shift']());}};_0x5c0e6c(++_0x149ae5);}(_0x2356,0x14f));var _0x6235=function(_0x3b5045,_0xb0bea7){_0x3b5045=_0x3b5045-0x0;var _0x3fa262=_0x2356[_0x3b5045];return _0x3fa262;};'use strict';var _=require('lodash');var util=require(_0x6235('0x0'));var moment=require(_0x6235('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6235('0x2'));var db=require(_0x6235('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x6235('0x4'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6235('0x5')][_0x6235('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x3663e7,_0x47f3a5,_0x4c15c6){return new BPromise(function(_0x547159,_0x3a5750){return client['request'](_0x3663e7,_0x4c15c6)[_0x6235('0x7')](function(_0x11d1f9){logger[_0x6235('0x8')](_0x6235('0x9'),_0x47f3a5,'request\x20sent');logger[_0x6235('0xa')](_0x6235('0xb'),_0x47f3a5,_0x6235('0xc'),JSON[_0x6235('0xd')](_0x11d1f9));if(_0x11d1f9[_0x6235('0xe')]){if(_0x11d1f9['error'][_0x6235('0xf')]===0x1f4){logger[_0x6235('0xe')](_0x6235('0x9'),_0x47f3a5,_0x11d1f9[_0x6235('0xe')]['message']);return _0x3a5750(_0x11d1f9[_0x6235('0xe')][_0x6235('0x10')]);}logger['error'](_0x6235('0x9'),_0x47f3a5,_0x11d1f9['error'][_0x6235('0x10')]);return _0x547159(_0x11d1f9[_0x6235('0xe')]['message']);}else{logger[_0x6235('0x8')](_0x6235('0x9'),_0x47f3a5,_0x6235('0xc'));_0x547159(_0x11d1f9[_0x6235('0x11')]['message']);}})[_0x6235('0x12')](function(_0x190d7c){logger[_0x6235('0xe')](_0x6235('0x9'),_0x47f3a5,_0x190d7c);_0x3a5750(_0x190d7c);});});}
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/index.js b/server/api/intSalesforceAccount/index.js
index 35d49aa..b7d801d 100644
--- a/server/api/intSalesforceAccount/index.js
+++ b/server/api/intSalesforceAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x87b0=['/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','isAuthenticated','index','get'];(function(_0x5a776b,_0x46f785){var _0xbbef59=function(_0x38313e){while(--_0x38313e){_0x5a776b['push'](_0x5a776b['shift']());}};_0xbbef59(++_0x46f785);}(_0x87b0,0x9d));var _0x087b=function(_0x21c1f2,_0x1c307c){_0x21c1f2=_0x21c1f2-0x0;var _0x54d10e=_0x87b0[_0x21c1f2];return _0x54d10e;};'use strict';var multer=require(_0x087b('0x0'));var util=require(_0x087b('0x1'));var path=require(_0x087b('0x2'));var timeout=require(_0x087b('0x3'));var express=require(_0x087b('0x4'));var router=express[_0x087b('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x087b('0x6'));var config=require(_0x087b('0x7'));var controller=require('./intSalesforceAccount.controller');router['get']('/',auth[_0x087b('0x8')](),controller[_0x087b('0x9')]);router[_0x087b('0xa')](_0x087b('0xb'),auth[_0x087b('0x8')](),controller[_0x087b('0xc')]);router[_0x087b('0xa')](_0x087b('0xd'),auth['isAuthenticated'](),controller[_0x087b('0xe')]);router[_0x087b('0xa')](_0x087b('0xf'),auth[_0x087b('0x8')](),controller[_0x087b('0x10')]);router[_0x087b('0x11')]('/',auth[_0x087b('0x8')](),controller[_0x087b('0x12')]);router[_0x087b('0x11')](_0x087b('0xd'),auth[_0x087b('0x8')](),controller[_0x087b('0x13')]);router[_0x087b('0x14')](_0x087b('0xb'),auth[_0x087b('0x8')](),controller[_0x087b('0x15')]);router['delete'](_0x087b('0xb'),auth[_0x087b('0x8')](),controller[_0x087b('0x16')]);module[_0x087b('0x17')]=router;
\ No newline at end of file
+var _0x78d2=['express','Router','../../config/environment','./intSalesforceAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x3e8983,_0x29d12a){var _0x2e95ae=function(_0x1b28c6){while(--_0x1b28c6){_0x3e8983['push'](_0x3e8983['shift']());}};_0x2e95ae(++_0x29d12a);}(_0x78d2,0x1c4));var _0x278d=function(_0x367e3b,_0x5d92ad){_0x367e3b=_0x367e3b-0x0;var _0x35568d=_0x78d2[_0x367e3b];return _0x35568d;};'use strict';var multer=require(_0x278d('0x0'));var util=require(_0x278d('0x1'));var path=require(_0x278d('0x2'));var timeout=require(_0x278d('0x3'));var express=require(_0x278d('0x4'));var router=express[_0x278d('0x5')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x278d('0x6'));var controller=require(_0x278d('0x7'));router[_0x278d('0x8')]('/',auth[_0x278d('0x9')](),controller[_0x278d('0xa')]);router[_0x278d('0x8')](_0x278d('0xb'),auth[_0x278d('0x9')](),controller[_0x278d('0xc')]);router[_0x278d('0x8')](_0x278d('0xd'),auth['isAuthenticated'](),controller[_0x278d('0xe')]);router[_0x278d('0x8')]('/:id/fields',auth[_0x278d('0x9')](),controller[_0x278d('0xf')]);router[_0x278d('0x10')]('/',auth[_0x278d('0x9')](),controller[_0x278d('0x11')]);router[_0x278d('0x10')](_0x278d('0xd'),auth[_0x278d('0x9')](),controller[_0x278d('0x12')]);router[_0x278d('0x13')](_0x278d('0xb'),auth[_0x278d('0x9')](),controller[_0x278d('0x14')]);router[_0x278d('0x15')](_0x278d('0xb'),auth[_0x278d('0x9')](),controller[_0x278d('0x16')]);module[_0x278d('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js
index d24c670..85dc038 100644
--- a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js
+++ b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1df7=['exports','STRING','ENUM','integrationTab','newTab','sequelize'];(function(_0x205ac0,_0x2b4998){var _0x3c3a6a=function(_0x1490f9){while(--_0x1490f9){_0x205ac0['push'](_0x205ac0['shift']());}};_0x3c3a6a(++_0x2b4998);}(_0x1df7,0xb9));var _0x71df=function(_0x17cef1,_0x583018){_0x17cef1=_0x17cef1-0x0;var _0x44bf3f=_0x1df7[_0x17cef1];return _0x44bf3f;};'use strict';var Sequelize=require(_0x71df('0x0'));module[_0x71df('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x71df('0x2')]},'username':{'type':Sequelize[_0x71df('0x2')],'unique':'username'},'remoteUri':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0x71df('0x2')]},'clientId':{'type':Sequelize[_0x71df('0x2')]},'clientSecret':{'type':Sequelize[_0x71df('0x2')]},'securityToken':{'type':Sequelize[_0x71df('0x2')]},'serverUrl':{'type':Sequelize[_0x71df('0x2')]},'type':{'type':Sequelize[_0x71df('0x3')](_0x71df('0x4'),_0x71df('0x5')),'defaultValue':_0x71df('0x4')}};
\ No newline at end of file
+var _0x8bfa=['ENUM','integrationTab','sequelize','STRING'];(function(_0x30a2de,_0x21035a){var _0x1b0c2c=function(_0x14f27d){while(--_0x14f27d){_0x30a2de['push'](_0x30a2de['shift']());}};_0x1b0c2c(++_0x21035a);}(_0x8bfa,0x1d2));var _0xa8bf=function(_0x39b316,_0x3def1e){_0x39b316=_0x39b316-0x0;var _0x182ab1=_0x8bfa[_0x39b316];return _0x182ab1;};'use strict';var Sequelize=require(_0xa8bf('0x0'));module['exports']={'name':{'type':Sequelize[_0xa8bf('0x1')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xa8bf('0x1')],'unique':'username'},'remoteUri':{'type':Sequelize[_0xa8bf('0x1')]},'password':{'type':Sequelize[_0xa8bf('0x1')]},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize[_0xa8bf('0x1')]},'securityToken':{'type':Sequelize[_0xa8bf('0x1')]},'serverUrl':{'type':Sequelize[_0xa8bf('0x1')]},'type':{'type':Sequelize[_0xa8bf('0x2')]('integrationTab','newTab'),'defaultValue':_0xa8bf('0x3')}};
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js
index d5b130f..0ac5a56 100644
--- a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js
+++ b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeb5d=['reject','save','update','stack','name','send','index','SalesforceAccount','rawAttributes','model','keys','query','filters','intersection','attributes','length','nolimit','limit','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','fields','find','create','body','params','destroy','getConfigurations','findOne','SalesforceConfiguration','addConfiguration','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceField','getFields','remoteUri','clientId','clientSecret','username','password','securityToken','slice','login','concat','isNil','ticketType','sobject','describe','CallDisposition','CallDurationInSeconds','CallObject','IsArchived','Priority','Status','Type','Origin','Reason','SuppliedName','SuppliedCompany','custom','includes','label','picklistValues','value','boolean','True','true','False','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','SalesforceAccount,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','json','count','offset','set','Content-Range','apply'];(function(_0x513441,_0x20bfba){var _0x5a49c8=function(_0x2cc7d9){while(--_0x2cc7d9){_0x513441['push'](_0x513441['shift']());}};_0x5a49c8(++_0x20bfba);}(_0xeb5d,0x16b));var _0xdeb5=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0xeb5d[_0x5d6456];return _0x4d66c1;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xdeb5('0x0'));var rimraf=require(_0xdeb5('0x1'));var zipdir=require(_0xdeb5('0x2'));var jsonpatch=require(_0xdeb5('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xdeb5('0x4'));var Mustache=require(_0xdeb5('0x5'));var util=require('util');var path=require(_0xdeb5('0x6'));var sox=require(_0xdeb5('0x7'));var csv=require(_0xdeb5('0x8'));var ejs=require(_0xdeb5('0x9'));var fs=require('fs');var _=require(_0xdeb5('0xa'));var squel=require(_0xdeb5('0xb'));var crypto=require(_0xdeb5('0xc'));var jsforce=require(_0xdeb5('0xd'));var deskjs=require(_0xdeb5('0xe'));var toCsv=require(_0xdeb5('0x8'));var querystring=require(_0xdeb5('0xf'));var Papa=require(_0xdeb5('0x10'));var Redis=require(_0xdeb5('0x11'));var authService=require(_0xdeb5('0x12'));var qs=require(_0xdeb5('0x13'));var hardwareService=require(_0xdeb5('0x14'));var logger=require(_0xdeb5('0x15'))('api');var utils=require(_0xdeb5('0x16'));var config=require(_0xdeb5('0x17'));var db=require(_0xdeb5('0x18'))['db'];var integrations=require(_0xdeb5('0x19'));var jayson=require(_0xdeb5('0x1a'));var client=jayson[_0xdeb5('0x1b')][_0xdeb5('0x1c')]({'port':0x232a});function checkPasswordPattern(_0xb55c82,_0x59f62e,_0x162a5e){if(_0x162a5e){var _0x5e2853=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5e2853[_0xdeb5('0x1d')](_0x59f62e)){return _0xb55c82;}else{throw new Error(_0xdeb5('0x1e'));}}else{return _0xb55c82;}}function respondWithRpcPromise(_0x266aa2,_0x3a63c8,_0x2633aa,_0x57e4e7){return new BPromise(function(_0x82d3ba,_0x384145){var _0x5caec0=_0x57e4e7||client;return _0x5caec0[_0xdeb5('0x1f')](_0x266aa2,_0x2633aa)[_0xdeb5('0x20')](function(_0x3521b2){logger['info']('SalesforceAccount,\x20%s,\x20%s',_0x3a63c8,_0xdeb5('0x21'));logger['debug'](_0xdeb5('0x22'),_0x3a63c8,_0xdeb5('0x21'),JSON[_0xdeb5('0x23')](_0x3521b2));if(_0x3521b2['error']){if(_0x3521b2[_0xdeb5('0x24')]['code']===0x1f4){logger[_0xdeb5('0x24')](_0xdeb5('0x25'),_0x3a63c8,_0x3521b2[_0xdeb5('0x24')][_0xdeb5('0x26')]);return _0x384145(_0x3521b2[_0xdeb5('0x24')]['message']);}logger[_0xdeb5('0x24')](_0xdeb5('0x25'),_0x3a63c8,_0x3521b2['error']['message']);return _0x82d3ba(_0x3521b2['error'][_0xdeb5('0x26')]);}else{logger[_0xdeb5('0x27')](_0xdeb5('0x25'),_0x3a63c8,'request\x20sent');_0x82d3ba(_0x3521b2[_0xdeb5('0x28')]['message']);}})[_0xdeb5('0x29')](function(_0x30e5c3){logger[_0xdeb5('0x24')](_0xdeb5('0x25'),_0x3a63c8,_0x30e5c3);_0x384145(_0x30e5c3);});});}function respondWithStatusCode(_0x31684a,_0x364c90){_0x364c90=_0x364c90||0xcc;return function(_0x200e56){if(_0x200e56){return _0x31684a[_0xdeb5('0x2a')](_0x364c90);}return _0x31684a[_0xdeb5('0x2b')](_0x364c90)[_0xdeb5('0x2c')]();};}function respondWithResult(_0x5675a4,_0x466ca7){_0x466ca7=_0x466ca7||0xc8;return function(_0x3bcc76){if(_0x3bcc76){return _0x5675a4[_0xdeb5('0x2b')](_0x466ca7)[_0xdeb5('0x2d')](_0x3bcc76);}};}function respondWithFilteredResult(_0x546f86,_0x484d6e){return function(_0x25e2f0){if(_0x25e2f0){var _0x2d3f85=_0x25e2f0[_0xdeb5('0x2e')],_0x51841f=_0x484d6e[_0xdeb5('0x2f')],_0x1321ba=_0x484d6e['offset']+_0x484d6e['limit'],_0x4eb19b;if(_0x1321ba>=_0x2d3f85){_0x1321ba=_0x2d3f85;_0x4eb19b=0xc8;}else{_0x4eb19b=0xce;}_0x546f86[_0xdeb5('0x2b')](_0x4eb19b);return _0x546f86[_0xdeb5('0x30')](_0xdeb5('0x31'),_0x51841f+'-'+_0x1321ba+'/'+_0x2d3f85)[_0xdeb5('0x2d')](_0x25e2f0);}return null;};}function patchUpdates(_0x12931a){return function(_0x58fb5f){try{jsonpatch[_0xdeb5('0x32')](_0x58fb5f,_0x12931a,!![]);}catch(_0x1b571d){return BPromise[_0xdeb5('0x33')](_0x1b571d);}return _0x58fb5f[_0xdeb5('0x34')]();};}function saveUpdates(_0x3d5dfc,_0x3aa284){return function(_0x1d9d14){if(_0x1d9d14){return _0x1d9d14[_0xdeb5('0x35')](_0x3d5dfc)[_0xdeb5('0x20')](function(_0x30f75f){return _0x30f75f;});}return null;};}function removeEntity(_0x50a38a,_0x316747){return function(_0x256c77){if(_0x256c77){return _0x256c77['destroy']()[_0xdeb5('0x20')](function(){_0x50a38a['status'](0xcc)[_0xdeb5('0x2c')]();});}};}function handleEntityNotFound(_0x44cac8,_0x11c72e){return function(_0x5ad00b){if(!_0x5ad00b){_0x44cac8[_0xdeb5('0x2a')](0x194);}return _0x5ad00b;};}function handleError(_0x4fcf9f,_0x51bfdb){_0x51bfdb=_0x51bfdb||0x1f4;return function(_0x341ccd){logger['error'](_0x341ccd[_0xdeb5('0x36')]);if(_0x341ccd[_0xdeb5('0x37')]){delete _0x341ccd[_0xdeb5('0x37')];}_0x4fcf9f[_0xdeb5('0x2b')](_0x51bfdb)[_0xdeb5('0x38')](_0x341ccd);};}exports[_0xdeb5('0x39')]=function(_0x2b2bdc,_0x56af64){var _0x50fd23={},_0x9befbf={},_0x47885d={'count':0x0,'rows':[]};var _0x105c3a=db[_0xdeb5('0x3a')][_0xdeb5('0x3b')];_0x9befbf[_0xdeb5('0x3c')]=_[_0xdeb5('0x3d')](_0x105c3a);_0x9befbf[_0xdeb5('0x3e')]=_[_0xdeb5('0x3d')](_0x2b2bdc[_0xdeb5('0x3e')]);_0x9befbf[_0xdeb5('0x3f')]=_[_0xdeb5('0x40')](_0x9befbf[_0xdeb5('0x3c')],_0x9befbf[_0xdeb5('0x3e')]);_0x50fd23[_0xdeb5('0x41')]=_[_0xdeb5('0x40')](_0x9befbf[_0xdeb5('0x3c')],qs['fields'](_0x2b2bdc[_0xdeb5('0x3e')]['fields']));_0x50fd23[_0xdeb5('0x41')]=_0x50fd23[_0xdeb5('0x41')][_0xdeb5('0x42')]?_0x50fd23[_0xdeb5('0x41')]:_0x9befbf[_0xdeb5('0x3c')];if(!_0x2b2bdc['query']['hasOwnProperty'](_0xdeb5('0x43'))){_0x50fd23[_0xdeb5('0x44')]=qs[_0xdeb5('0x44')](_0x2b2bdc['query'][_0xdeb5('0x44')]);_0x50fd23['offset']=qs[_0xdeb5('0x2f')](_0x2b2bdc[_0xdeb5('0x3e')][_0xdeb5('0x2f')]);}_0x50fd23['order']=qs[_0xdeb5('0x45')](_0x2b2bdc[_0xdeb5('0x3e')][_0xdeb5('0x45')]);_0x50fd23[_0xdeb5('0x46')]=qs['filters'](_[_0xdeb5('0x47')](_0x2b2bdc[_0xdeb5('0x3e')],_0x9befbf['filters']));if(_0x2b2bdc[_0xdeb5('0x3e')][_0xdeb5('0x48')]){_0x50fd23[_0xdeb5('0x46')]=_[_0xdeb5('0x49')](_0x50fd23[_0xdeb5('0x46')],{'$or':_[_0xdeb5('0x4a')](_0x105c3a,function(_0x2dfbce){if(_0x2dfbce[_0xdeb5('0x4b')][_0xdeb5('0x4c')]!==_0xdeb5('0x4d')){var _0x4a5604={};_0x4a5604[_0x2dfbce[_0xdeb5('0x4e')]]={'$like':'%'+_0x2b2bdc[_0xdeb5('0x3e')][_0xdeb5('0x48')]+'%'};return _0x4a5604;}})});}_0x50fd23=_[_0xdeb5('0x49')]({},_0x50fd23,_0x2b2bdc[_0xdeb5('0x4f')]);var _0x111a04={'where':_0x50fd23[_0xdeb5('0x46')]};return db[_0xdeb5('0x3a')][_0xdeb5('0x2e')](_0x111a04)['then'](function(_0x20e72f){_0x47885d[_0xdeb5('0x2e')]=_0x20e72f;if(_0x2b2bdc['query'][_0xdeb5('0x50')]){_0x50fd23[_0xdeb5('0x51')]=[{'all':!![]}];}return db[_0xdeb5('0x3a')][_0xdeb5('0x52')](_0x50fd23);})['then'](function(_0x3fec09){_0x47885d[_0xdeb5('0x53')]=_0x3fec09;return _0x47885d;})['then'](respondWithFilteredResult(_0x56af64,_0x50fd23))['catch'](handleError(_0x56af64,null));};exports[_0xdeb5('0x54')]=function(_0x1898e4,_0x214d5c){var _0x23b6f4={'raw':![],'where':{'id':_0x1898e4['params']['id']}},_0x1ae0ba={};_0x1ae0ba[_0xdeb5('0x3c')]=_[_0xdeb5('0x3d')](db[_0xdeb5('0x3a')][_0xdeb5('0x3b')]);_0x1ae0ba[_0xdeb5('0x3e')]=_[_0xdeb5('0x3d')](_0x1898e4[_0xdeb5('0x3e')]);_0x1ae0ba[_0xdeb5('0x3f')]=_[_0xdeb5('0x40')](_0x1ae0ba['model'],_0x1ae0ba[_0xdeb5('0x3e')]);_0x23b6f4['attributes']=_[_0xdeb5('0x40')](_0x1ae0ba['model'],qs[_0xdeb5('0x55')](_0x1898e4[_0xdeb5('0x3e')][_0xdeb5('0x55')]));_0x23b6f4[_0xdeb5('0x41')]=_0x23b6f4[_0xdeb5('0x41')][_0xdeb5('0x42')]?_0x23b6f4[_0xdeb5('0x41')]:_0x1ae0ba[_0xdeb5('0x3c')];if(_0x1898e4[_0xdeb5('0x3e')][_0xdeb5('0x50')]){_0x23b6f4[_0xdeb5('0x51')]=[{'all':!![]}];}_0x23b6f4=_[_0xdeb5('0x49')]({},_0x23b6f4,_0x1898e4['options']);return db[_0xdeb5('0x3a')][_0xdeb5('0x56')](_0x23b6f4)[_0xdeb5('0x20')](handleEntityNotFound(_0x214d5c,null))['then'](respondWithResult(_0x214d5c,null))[_0xdeb5('0x29')](handleError(_0x214d5c,null));};exports[_0xdeb5('0x57')]=function(_0xf42704,_0x5db541){return db[_0xdeb5('0x3a')][_0xdeb5('0x57')](_0xf42704[_0xdeb5('0x58')],{})[_0xdeb5('0x20')](respondWithResult(_0x5db541,0xc9))['catch'](handleError(_0x5db541,null));};exports[_0xdeb5('0x35')]=function(_0x4a3460,_0xce2086){if(_0x4a3460[_0xdeb5('0x58')]['id']){delete _0x4a3460['body']['id'];}return db[_0xdeb5('0x3a')][_0xdeb5('0x56')]({'where':{'id':_0x4a3460[_0xdeb5('0x59')]['id']}})[_0xdeb5('0x20')](handleEntityNotFound(_0xce2086,null))[_0xdeb5('0x20')](saveUpdates(_0x4a3460['body'],null))['then'](respondWithResult(_0xce2086,null))[_0xdeb5('0x29')](handleError(_0xce2086,null));};exports[_0xdeb5('0x5a')]=function(_0x4b472f,_0x598ca6){return db[_0xdeb5('0x3a')][_0xdeb5('0x56')]({'where':{'id':_0x4b472f[_0xdeb5('0x59')]['id']}})['then'](handleEntityNotFound(_0x598ca6,null))['then'](removeEntity(_0x598ca6,null))['catch'](handleError(_0x598ca6,null));};exports[_0xdeb5('0x5b')]=function(_0x279fc9,_0x1d0ff3,_0x2419e0){var _0x3bf9e4={};var _0x74b881={};var _0xf12c77;var _0x4471c8;return db[_0xdeb5('0x3a')][_0xdeb5('0x5c')]({'where':{'id':_0x279fc9['params']['id']}})[_0xdeb5('0x20')](handleEntityNotFound(_0x1d0ff3,null))[_0xdeb5('0x20')](function(_0x3f2013){if(_0x3f2013){_0xf12c77=_0x3f2013;_0x74b881[_0xdeb5('0x3c')]=_['keys'](db[_0xdeb5('0x5d')][_0xdeb5('0x3b')]);_0x74b881[_0xdeb5('0x3e')]=_['keys'](_0x279fc9[_0xdeb5('0x3e')]);_0x74b881[_0xdeb5('0x3f')]=_['intersection'](_0x74b881['model'],_0x74b881[_0xdeb5('0x3e')]);_0x3bf9e4[_0xdeb5('0x41')]=_[_0xdeb5('0x40')](_0x74b881[_0xdeb5('0x3c')],qs[_0xdeb5('0x55')](_0x279fc9['query'][_0xdeb5('0x55')]));_0x3bf9e4['attributes']=_0x3bf9e4[_0xdeb5('0x41')][_0xdeb5('0x42')]?_0x3bf9e4[_0xdeb5('0x41')]:_0x74b881[_0xdeb5('0x3c')];_0x3bf9e4['order']=qs[_0xdeb5('0x45')](_0x279fc9['query'][_0xdeb5('0x45')]);_0x3bf9e4[_0xdeb5('0x46')]=qs['filters'](_[_0xdeb5('0x47')](_0x279fc9[_0xdeb5('0x3e')],_0x74b881[_0xdeb5('0x3f')]));if(_0x279fc9[_0xdeb5('0x3e')][_0xdeb5('0x48')]){_0x3bf9e4[_0xdeb5('0x46')]=_[_0xdeb5('0x49')](_0x3bf9e4[_0xdeb5('0x46')],{'$or':_['map'](_0x3bf9e4['attributes'],function(_0x12e961){var _0x3da715={};_0x3da715[_0x12e961]={'$like':'%'+_0x279fc9[_0xdeb5('0x3e')][_0xdeb5('0x48')]+'%'};return _0x3da715;})});}_0x3bf9e4=_[_0xdeb5('0x49')]({},_0x3bf9e4,_0x279fc9['options']);return _0xf12c77[_0xdeb5('0x5b')](_0x3bf9e4);}})[_0xdeb5('0x20')](function(_0x91bcb1){if(_0x91bcb1){_0x4471c8=_0x91bcb1[_0xdeb5('0x42')];if(!_0x279fc9[_0xdeb5('0x3e')]['hasOwnProperty'](_0xdeb5('0x43'))){_0x3bf9e4[_0xdeb5('0x44')]=qs[_0xdeb5('0x44')](_0x279fc9['query']['limit']);_0x3bf9e4['offset']=qs[_0xdeb5('0x2f')](_0x279fc9[_0xdeb5('0x3e')][_0xdeb5('0x2f')]);}return _0xf12c77[_0xdeb5('0x5b')](_0x3bf9e4);}})[_0xdeb5('0x20')](function(_0x1d7d1a){if(_0x1d7d1a){return _0x1d7d1a?{'count':_0x4471c8,'rows':_0x1d7d1a}:null;}})['then'](respondWithResult(_0x1d0ff3,null))[_0xdeb5('0x29')](handleError(_0x1d0ff3,null));};exports[_0xdeb5('0x5e')]=function(_0x52fd3a,_0x3f2401,_0xc926a0){if(_0x52fd3a[_0xdeb5('0x58')]['id']){delete _0x52fd3a[_0xdeb5('0x58')]['id'];}return db[_0xdeb5('0x3a')][_0xdeb5('0x5c')]({'where':{'id':_0x52fd3a[_0xdeb5('0x59')]['id']}})[_0xdeb5('0x20')](handleEntityNotFound(_0x3f2401,null))['then'](function(_0x17f5ee){if(_0x17f5ee){_0x52fd3a[_0xdeb5('0x58')]['AccountId']=_0x17f5ee['id'];_0x52fd3a[_0xdeb5('0x58')][_0xdeb5('0x5f')]=integrations[_0xdeb5('0x60')](_0x52fd3a[_0xdeb5('0x58')][_0xdeb5('0x61')],_0x52fd3a[_0xdeb5('0x58')][_0xdeb5('0x4b')]);_0x52fd3a[_0xdeb5('0x58')][_0xdeb5('0x62')]=integrations[_0xdeb5('0x63')](_0x52fd3a[_0xdeb5('0x58')][_0xdeb5('0x61')],_0x52fd3a[_0xdeb5('0x58')][_0xdeb5('0x4b')]);return db[_0xdeb5('0x5d')][_0xdeb5('0x57')](_0x52fd3a[_0xdeb5('0x58')],{'include':[{'model':db[_0xdeb5('0x64')],'as':'Subjects'},{'model':db['SalesforceField'],'as':_0xdeb5('0x62')}]});}return null;})[_0xdeb5('0x20')](respondWithResult(_0x3f2401,null))[_0xdeb5('0x29')](handleError(_0x3f2401,null));};exports[_0xdeb5('0x65')]=function(_0xd1c353,_0x1daf3b,_0x226576){var _0x21935e;var _0x482168='';var _0x18754d='Task';return db[_0xdeb5('0x3a')]['findOne']({'where':{'id':_0xd1c353[_0xdeb5('0x59')]['id']},'attributes':['id',_0xdeb5('0x66'),_0xdeb5('0x67'),_0xdeb5('0x68'),_0xdeb5('0x69'),_0xdeb5('0x6a'),_0xdeb5('0x6b')]})[_0xdeb5('0x20')](handleEntityNotFound(_0x1daf3b,null))['then'](function(_0x54b6cc){if(_0x54b6cc){_0x482168=_0x54b6cc[_0xdeb5('0x66')];var _0x1ee12d=_0x482168[_0xdeb5('0x6c')](-0x1);if(_0x1ee12d==='/'){_0x482168=_0x482168['substring'](0x0,_0x482168['lastIndexOf'](_0x1ee12d));}_0x21935e=new jsforce['Connection']({'oauth2':{'loginUrl':_0x482168,'clientId':_0x54b6cc[_0xdeb5('0x67')],'clientSecret':_0x54b6cc['clientSecret']}});return _0x21935e[_0xdeb5('0x6d')](_0x54b6cc[_0xdeb5('0x69')],_0x54b6cc['password'][_0xdeb5('0x6e')](_0x54b6cc[_0xdeb5('0x6b')]));}})[_0xdeb5('0x20')](function(_0xfc85cf){if(_0xfc85cf){if(!_[_0xdeb5('0x6f')](_0xd1c353[_0xdeb5('0x3e')]['ticketType'])){_0x18754d=_0xd1c353[_0xdeb5('0x3e')][_0xdeb5('0x70')];}return _0x21935e[_0xdeb5('0x71')](_0x18754d)[_0xdeb5('0x72')]();}})['then'](function(_0x7c0eff){var _0x3b8194=[_0xdeb5('0x73'),_0xdeb5('0x74'),_0xdeb5('0x75'),'CallType',_0xdeb5('0x76'),_0xdeb5('0x77'),_0xdeb5('0x78'),_0xdeb5('0x79')];if(!_[_0xdeb5('0x6f')](_0xd1c353[_0xdeb5('0x3e')][_0xdeb5('0x70')])&&_0xd1c353['query'][_0xdeb5('0x70')]==='Case'){_0x3b8194=[_0xdeb5('0x79'),_0xdeb5('0x7a'),_0xdeb5('0x7b'),_0xdeb5('0x78'),_0xdeb5('0x77'),'IsEscalated',_0xdeb5('0x7c'),_0xdeb5('0x7d')];}if(_0x7c0eff){_['remove'](_0x7c0eff[_0xdeb5('0x55')],function(_0x22b94c){return _0x22b94c[_0xdeb5('0x7e')]===![]&&!_0x3b8194[_0xdeb5('0x7f')](_0x22b94c[_0xdeb5('0x37')]);});return{'count':_0x7c0eff[_0xdeb5('0x55')][_0xdeb5('0x42')],'rows':_[_0xdeb5('0x4a')](_0x7c0eff['fields'],function(_0x104d95){return{'id':_0x104d95[_0xdeb5('0x37')],'name':_0x104d95[_0xdeb5('0x80')],'custom':_0x104d95['custom'],'options':_0x104d95[_0xdeb5('0x81')][_0xdeb5('0x42')]>0x0?_['map'](_0x104d95[_0xdeb5('0x81')],function(_0x4dd476){return{'name':_0x4dd476['label'],'value':_0x4dd476[_0xdeb5('0x82')]};}):_0x104d95[_0xdeb5('0x4b')]==_0xdeb5('0x83')?[{'name':_0xdeb5('0x84'),'value':_0xdeb5('0x85')},{'name':_0xdeb5('0x86'),'value':'false'}]:[]};})};}})[_0xdeb5('0x20')](respondWithResult(_0x1daf3b,null))['catch'](function(_0x24d6e6){var _0x135c4a=_0xd1c353[_0xdeb5('0x3e')][_0xdeb5('0x1d')]?0x1f4:_0x24d6e6[_0xdeb5('0x87')]||0x1f4;logger['error'](_0xdeb5('0x88'),'getFields',_0x135c4a,JSON[_0xdeb5('0x23')](_0x24d6e6));delete _0x24d6e6[_0xdeb5('0x37')];if(_0x135c4a===0x191){_0x135c4a=0x190;}_0x1daf3b[_0xdeb5('0x2b')](_0x135c4a)[_0xdeb5('0x38')](_0xd1c353[_0xdeb5('0x3e')]['test']?{'message':_0xdeb5('0x89'),'statusCode':_0x24d6e6[_0xdeb5('0x87')]}:_0x24d6e6);});};
\ No newline at end of file
+var _0xf84a=['body','findOne','getConfigurations','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','SalesforceConfiguration','SalesforceField','Task','remoteUri','clientId','clientSecret','username','password','securityToken','slice','lastIndexOf','Connection','isNil','ticketType','sobject','describe','CallObject','IsArchived','Status','Case','Type','Origin','Reason','IsEscalated','SuppliedCompany','custom','includes','map','label','picklistValues','value','boolean','True','true','False','false','test','getFields,\x20%s,\x20%s,\x20%s','getFields','send','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','sendStatus','status','count','offset','set','json','reject','save','update','destroy','end','stack','name','index','SalesforceAccount','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','merge','type','VIRTUAL','field','filter','options','where','includeAll','findAll','rows','show','params','rawAttributes','include','find','catch','create'];(function(_0x5ac5c7,_0x3e5ecd){var _0x1eede1=function(_0x128357){while(--_0x128357){_0x5ac5c7['push'](_0x5ac5c7['shift']());}};_0x1eede1(++_0x3e5ecd);}(_0xf84a,0x1c7));var _0xaf84=function(_0x2ad162,_0x53e26e){_0x2ad162=_0x2ad162-0x0;var _0x2be5e3=_0xf84a[_0x2ad162];return _0x2be5e3;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xaf84('0x0'));var rimraf=require(_0xaf84('0x1'));var zipdir=require(_0xaf84('0x2'));var jsonpatch=require(_0xaf84('0x3'));var rp=require(_0xaf84('0x4'));var moment=require(_0xaf84('0x5'));var BPromise=require(_0xaf84('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0xaf84('0x7'));var sox=require(_0xaf84('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xaf84('0x9'));var squel=require(_0xaf84('0xa'));var crypto=require(_0xaf84('0xb'));var jsforce=require(_0xaf84('0xc'));var deskjs=require(_0xaf84('0xd'));var toCsv=require(_0xaf84('0xe'));var querystring=require('querystring');var Papa=require(_0xaf84('0xf'));var Redis=require('ioredis');var authService=require(_0xaf84('0x10'));var qs=require(_0xaf84('0x11'));var hardwareService=require(_0xaf84('0x12'));var logger=require(_0xaf84('0x13'))(_0xaf84('0x14'));var utils=require(_0xaf84('0x15'));var config=require(_0xaf84('0x16'));var db=require(_0xaf84('0x17'))['db'];var integrations=require(_0xaf84('0x18'));var jayson=require('jayson/promise');var client=jayson[_0xaf84('0x19')][_0xaf84('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x555aab,_0x484397,_0x2879ad){if(_0x2879ad){var _0x593e4f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x593e4f['test'](_0x484397)){return _0x555aab;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x555aab;}}function respondWithRpcPromise(_0x223f2c,_0x5f4408,_0x2bab0b,_0x1075c0){return new BPromise(function(_0x3f77eb,_0x37cdab){var _0x2fc4ef=_0x1075c0||client;return _0x2fc4ef[_0xaf84('0x1b')](_0x223f2c,_0x2bab0b)[_0xaf84('0x1c')](function(_0x50587d){logger[_0xaf84('0x1d')](_0xaf84('0x1e'),_0x5f4408,_0xaf84('0x1f'));logger[_0xaf84('0x20')](_0xaf84('0x21'),_0x5f4408,_0xaf84('0x1f'),JSON[_0xaf84('0x22')](_0x50587d));if(_0x50587d['error']){if(_0x50587d['error'][_0xaf84('0x23')]===0x1f4){logger['error']('SalesforceAccount,\x20%s,\x20%s',_0x5f4408,_0x50587d[_0xaf84('0x24')]['message']);return _0x37cdab(_0x50587d['error'][_0xaf84('0x25')]);}logger['error']('SalesforceAccount,\x20%s,\x20%s',_0x5f4408,_0x50587d['error'][_0xaf84('0x25')]);return _0x3f77eb(_0x50587d[_0xaf84('0x24')][_0xaf84('0x25')]);}else{logger[_0xaf84('0x1d')]('SalesforceAccount,\x20%s,\x20%s',_0x5f4408,'request\x20sent');_0x3f77eb(_0x50587d[_0xaf84('0x26')][_0xaf84('0x25')]);}})['catch'](function(_0x32e612){logger[_0xaf84('0x24')](_0xaf84('0x1e'),_0x5f4408,_0x32e612);_0x37cdab(_0x32e612);});});}function respondWithStatusCode(_0x344901,_0x4634bb){_0x4634bb=_0x4634bb||0xcc;return function(_0x5cdad1){if(_0x5cdad1){return _0x344901[_0xaf84('0x27')](_0x4634bb);}return _0x344901[_0xaf84('0x28')](_0x4634bb)['end']();};}function respondWithResult(_0x1f8d47,_0x58b8c9){_0x58b8c9=_0x58b8c9||0xc8;return function(_0x46b26d){if(_0x46b26d){return _0x1f8d47[_0xaf84('0x28')](_0x58b8c9)['json'](_0x46b26d);}};}function respondWithFilteredResult(_0x4dbd93,_0x153008){return function(_0x4ba1a5){if(_0x4ba1a5){var _0x125590=_0x4ba1a5[_0xaf84('0x29')],_0x2c81f8=_0x153008[_0xaf84('0x2a')],_0x38fe68=_0x153008['offset']+_0x153008['limit'],_0x3234a8;if(_0x38fe68>=_0x125590){_0x38fe68=_0x125590;_0x3234a8=0xc8;}else{_0x3234a8=0xce;}_0x4dbd93[_0xaf84('0x28')](_0x3234a8);return _0x4dbd93[_0xaf84('0x2b')]('Content-Range',_0x2c81f8+'-'+_0x38fe68+'/'+_0x125590)[_0xaf84('0x2c')](_0x4ba1a5);}return null;};}function patchUpdates(_0x457f03){return function(_0x2802ee){try{jsonpatch['apply'](_0x2802ee,_0x457f03,!![]);}catch(_0x445838){return BPromise[_0xaf84('0x2d')](_0x445838);}return _0x2802ee[_0xaf84('0x2e')]();};}function saveUpdates(_0x581a46,_0x2554b4){return function(_0x1e302e){if(_0x1e302e){return _0x1e302e[_0xaf84('0x2f')](_0x581a46)['then'](function(_0x40d4ca){return _0x40d4ca;});}return null;};}function removeEntity(_0x344cca,_0x382a5e){return function(_0x145ce3){if(_0x145ce3){return _0x145ce3[_0xaf84('0x30')]()['then'](function(){_0x344cca[_0xaf84('0x28')](0xcc)[_0xaf84('0x31')]();});}};}function handleEntityNotFound(_0x5d0f43,_0x5e6147){return function(_0x5607fd){if(!_0x5607fd){_0x5d0f43['sendStatus'](0x194);}return _0x5607fd;};}function handleError(_0x1d90d2,_0x5dbc43){_0x5dbc43=_0x5dbc43||0x1f4;return function(_0x5592e4){logger['error'](_0x5592e4[_0xaf84('0x32')]);if(_0x5592e4[_0xaf84('0x33')]){delete _0x5592e4[_0xaf84('0x33')];}_0x1d90d2[_0xaf84('0x28')](_0x5dbc43)['send'](_0x5592e4);};}exports[_0xaf84('0x34')]=function(_0x22809b,_0x4b6ba1){var _0x56f013={},_0x18ac16={},_0x3e7989={'count':0x0,'rows':[]};var _0x43c1a3=db[_0xaf84('0x35')]['rawAttributes'];_0x18ac16['model']=_[_0xaf84('0x36')](_0x43c1a3);_0x18ac16['query']=_['keys'](_0x22809b[_0xaf84('0x37')]);_0x18ac16[_0xaf84('0x38')]=_[_0xaf84('0x39')](_0x18ac16[_0xaf84('0x3a')],_0x18ac16['query']);_0x56f013[_0xaf84('0x3b')]=_['intersection'](_0x18ac16[_0xaf84('0x3a')],qs[_0xaf84('0x3c')](_0x22809b[_0xaf84('0x37')][_0xaf84('0x3c')]));_0x56f013[_0xaf84('0x3b')]=_0x56f013[_0xaf84('0x3b')][_0xaf84('0x3d')]?_0x56f013['attributes']:_0x18ac16[_0xaf84('0x3a')];if(!_0x22809b['query'][_0xaf84('0x3e')](_0xaf84('0x3f'))){_0x56f013[_0xaf84('0x40')]=qs[_0xaf84('0x40')](_0x22809b['query'][_0xaf84('0x40')]);_0x56f013['offset']=qs['offset'](_0x22809b[_0xaf84('0x37')][_0xaf84('0x2a')]);}_0x56f013[_0xaf84('0x41')]=qs[_0xaf84('0x42')](_0x22809b['query'][_0xaf84('0x42')]);_0x56f013['where']=qs[_0xaf84('0x38')](_[_0xaf84('0x43')](_0x22809b[_0xaf84('0x37')],_0x18ac16[_0xaf84('0x38')]));if(_0x22809b[_0xaf84('0x37')]['filter']){_0x56f013['where']=_[_0xaf84('0x44')](_0x56f013['where'],{'$or':_['map'](_0x43c1a3,function(_0x1b2355){if(_0x1b2355[_0xaf84('0x45')]['key']!==_0xaf84('0x46')){var _0x2db55a={};_0x2db55a[_0x1b2355[_0xaf84('0x47')]]={'$like':'%'+_0x22809b[_0xaf84('0x37')][_0xaf84('0x48')]+'%'};return _0x2db55a;}})});}_0x56f013=_['merge']({},_0x56f013,_0x22809b[_0xaf84('0x49')]);var _0x77708={'where':_0x56f013[_0xaf84('0x4a')]};return db['SalesforceAccount'][_0xaf84('0x29')](_0x77708)['then'](function(_0x28c35b){_0x3e7989[_0xaf84('0x29')]=_0x28c35b;if(_0x22809b[_0xaf84('0x37')][_0xaf84('0x4b')]){_0x56f013['include']=[{'all':!![]}];}return db[_0xaf84('0x35')][_0xaf84('0x4c')](_0x56f013);})[_0xaf84('0x1c')](function(_0x39fd1b){_0x3e7989[_0xaf84('0x4d')]=_0x39fd1b;return _0x3e7989;})[_0xaf84('0x1c')](respondWithFilteredResult(_0x4b6ba1,_0x56f013))['catch'](handleError(_0x4b6ba1,null));};exports[_0xaf84('0x4e')]=function(_0x5968fe,_0x3d07a3){var _0x256d53={'raw':![],'where':{'id':_0x5968fe[_0xaf84('0x4f')]['id']}},_0x5cd960={};_0x5cd960[_0xaf84('0x3a')]=_['keys'](db[_0xaf84('0x35')][_0xaf84('0x50')]);_0x5cd960[_0xaf84('0x37')]=_['keys'](_0x5968fe[_0xaf84('0x37')]);_0x5cd960['filters']=_[_0xaf84('0x39')](_0x5cd960[_0xaf84('0x3a')],_0x5cd960[_0xaf84('0x37')]);_0x256d53[_0xaf84('0x3b')]=_['intersection'](_0x5cd960[_0xaf84('0x3a')],qs[_0xaf84('0x3c')](_0x5968fe[_0xaf84('0x37')][_0xaf84('0x3c')]));_0x256d53[_0xaf84('0x3b')]=_0x256d53['attributes'][_0xaf84('0x3d')]?_0x256d53[_0xaf84('0x3b')]:_0x5cd960[_0xaf84('0x3a')];if(_0x5968fe['query'][_0xaf84('0x4b')]){_0x256d53[_0xaf84('0x51')]=[{'all':!![]}];}_0x256d53=_[_0xaf84('0x44')]({},_0x256d53,_0x5968fe[_0xaf84('0x49')]);return db[_0xaf84('0x35')][_0xaf84('0x52')](_0x256d53)[_0xaf84('0x1c')](handleEntityNotFound(_0x3d07a3,null))[_0xaf84('0x1c')](respondWithResult(_0x3d07a3,null))[_0xaf84('0x53')](handleError(_0x3d07a3,null));};exports[_0xaf84('0x54')]=function(_0x4977f3,_0x2bb1a5){return db[_0xaf84('0x35')][_0xaf84('0x54')](_0x4977f3[_0xaf84('0x55')],{})[_0xaf84('0x1c')](respondWithResult(_0x2bb1a5,0xc9))[_0xaf84('0x53')](handleError(_0x2bb1a5,null));};exports['update']=function(_0x47f6e1,_0x29c30d){if(_0x47f6e1[_0xaf84('0x55')]['id']){delete _0x47f6e1['body']['id'];}return db[_0xaf84('0x35')][_0xaf84('0x52')]({'where':{'id':_0x47f6e1[_0xaf84('0x4f')]['id']}})['then'](handleEntityNotFound(_0x29c30d,null))['then'](saveUpdates(_0x47f6e1['body'],null))[_0xaf84('0x1c')](respondWithResult(_0x29c30d,null))[_0xaf84('0x53')](handleError(_0x29c30d,null));};exports[_0xaf84('0x30')]=function(_0x282807,_0x139170){return db[_0xaf84('0x35')][_0xaf84('0x52')]({'where':{'id':_0x282807[_0xaf84('0x4f')]['id']}})['then'](handleEntityNotFound(_0x139170,null))[_0xaf84('0x1c')](removeEntity(_0x139170,null))[_0xaf84('0x53')](handleError(_0x139170,null));};exports['getConfigurations']=function(_0x383842,_0x4caf6c,_0x2eca18){var _0x5a288b={};var _0x3479d={};var _0x3c2081;var _0x385c59;return db[_0xaf84('0x35')][_0xaf84('0x56')]({'where':{'id':_0x383842[_0xaf84('0x4f')]['id']}})[_0xaf84('0x1c')](handleEntityNotFound(_0x4caf6c,null))[_0xaf84('0x1c')](function(_0x208d02){if(_0x208d02){_0x3c2081=_0x208d02;_0x3479d['model']=_[_0xaf84('0x36')](db['SalesforceConfiguration'][_0xaf84('0x50')]);_0x3479d[_0xaf84('0x37')]=_[_0xaf84('0x36')](_0x383842['query']);_0x3479d[_0xaf84('0x38')]=_[_0xaf84('0x39')](_0x3479d['model'],_0x3479d[_0xaf84('0x37')]);_0x5a288b['attributes']=_['intersection'](_0x3479d['model'],qs['fields'](_0x383842[_0xaf84('0x37')][_0xaf84('0x3c')]));_0x5a288b['attributes']=_0x5a288b[_0xaf84('0x3b')]['length']?_0x5a288b[_0xaf84('0x3b')]:_0x3479d[_0xaf84('0x3a')];_0x5a288b[_0xaf84('0x41')]=qs[_0xaf84('0x42')](_0x383842['query'][_0xaf84('0x42')]);_0x5a288b['where']=qs[_0xaf84('0x38')](_['pick'](_0x383842[_0xaf84('0x37')],_0x3479d[_0xaf84('0x38')]));if(_0x383842[_0xaf84('0x37')]['filter']){_0x5a288b['where']=_[_0xaf84('0x44')](_0x5a288b[_0xaf84('0x4a')],{'$or':_['map'](_0x5a288b[_0xaf84('0x3b')],function(_0x2b7826){var _0xd9a426={};_0xd9a426[_0x2b7826]={'$like':'%'+_0x383842[_0xaf84('0x37')][_0xaf84('0x48')]+'%'};return _0xd9a426;})});}_0x5a288b=_[_0xaf84('0x44')]({},_0x5a288b,_0x383842[_0xaf84('0x49')]);return _0x3c2081[_0xaf84('0x57')](_0x5a288b);}})['then'](function(_0x5d520c){if(_0x5d520c){_0x385c59=_0x5d520c[_0xaf84('0x3d')];if(!_0x383842[_0xaf84('0x37')][_0xaf84('0x3e')](_0xaf84('0x3f'))){_0x5a288b[_0xaf84('0x40')]=qs['limit'](_0x383842[_0xaf84('0x37')]['limit']);_0x5a288b[_0xaf84('0x2a')]=qs[_0xaf84('0x2a')](_0x383842[_0xaf84('0x37')][_0xaf84('0x2a')]);}return _0x3c2081[_0xaf84('0x57')](_0x5a288b);}})[_0xaf84('0x1c')](function(_0x24c41c){if(_0x24c41c){return _0x24c41c?{'count':_0x385c59,'rows':_0x24c41c}:null;}})['then'](respondWithResult(_0x4caf6c,null))[_0xaf84('0x53')](handleError(_0x4caf6c,null));};exports[_0xaf84('0x58')]=function(_0x4363bb,_0x553d3e,_0x200db0){if(_0x4363bb[_0xaf84('0x55')]['id']){delete _0x4363bb[_0xaf84('0x55')]['id'];}return db[_0xaf84('0x35')][_0xaf84('0x56')]({'where':{'id':_0x4363bb[_0xaf84('0x4f')]['id']}})[_0xaf84('0x1c')](handleEntityNotFound(_0x553d3e,null))[_0xaf84('0x1c')](function(_0x55ce87){if(_0x55ce87){_0x4363bb[_0xaf84('0x55')][_0xaf84('0x59')]=_0x55ce87['id'];_0x4363bb[_0xaf84('0x55')][_0xaf84('0x5a')]=integrations[_0xaf84('0x5b')](_0x4363bb[_0xaf84('0x55')][_0xaf84('0x5c')],_0x4363bb[_0xaf84('0x55')][_0xaf84('0x45')]);_0x4363bb[_0xaf84('0x55')][_0xaf84('0x5d')]=integrations['getDescriptions'](_0x4363bb[_0xaf84('0x55')][_0xaf84('0x5c')],_0x4363bb['body']['type']);return db[_0xaf84('0x5e')]['create'](_0x4363bb[_0xaf84('0x55')],{'include':[{'model':db[_0xaf84('0x5f')],'as':'Subjects'},{'model':db[_0xaf84('0x5f')],'as':_0xaf84('0x5d')}]});}return null;})[_0xaf84('0x1c')](respondWithResult(_0x553d3e,null))[_0xaf84('0x53')](handleError(_0x553d3e,null));};exports['getFields']=function(_0x3a1991,_0x20ecf3,_0x1935c6){var _0x204ec3;var _0x42b557='';var _0x39ff7a=_0xaf84('0x60');return db['SalesforceAccount'][_0xaf84('0x56')]({'where':{'id':_0x3a1991[_0xaf84('0x4f')]['id']},'attributes':['id',_0xaf84('0x61'),_0xaf84('0x62'),_0xaf84('0x63'),_0xaf84('0x64'),_0xaf84('0x65'),_0xaf84('0x66')]})[_0xaf84('0x1c')](handleEntityNotFound(_0x20ecf3,null))['then'](function(_0x2134fd){if(_0x2134fd){_0x42b557=_0x2134fd[_0xaf84('0x61')];var _0x26e38e=_0x42b557[_0xaf84('0x67')](-0x1);if(_0x26e38e==='/'){_0x42b557=_0x42b557['substring'](0x0,_0x42b557[_0xaf84('0x68')](_0x26e38e));}_0x204ec3=new jsforce[(_0xaf84('0x69'))]({'oauth2':{'loginUrl':_0x42b557,'clientId':_0x2134fd[_0xaf84('0x62')],'clientSecret':_0x2134fd[_0xaf84('0x63')]}});return _0x204ec3['login'](_0x2134fd[_0xaf84('0x64')],_0x2134fd[_0xaf84('0x65')]['concat'](_0x2134fd[_0xaf84('0x66')]));}})[_0xaf84('0x1c')](function(_0x179fca){if(_0x179fca){if(!_[_0xaf84('0x6a')](_0x3a1991[_0xaf84('0x37')][_0xaf84('0x6b')])){_0x39ff7a=_0x3a1991[_0xaf84('0x37')][_0xaf84('0x6b')];}return _0x204ec3[_0xaf84('0x6c')](_0x39ff7a)[_0xaf84('0x6d')]();}})[_0xaf84('0x1c')](function(_0x433ae8){var _0x3196b9=['CallDisposition','CallDurationInSeconds',_0xaf84('0x6e'),'CallType',_0xaf84('0x6f'),'Priority',_0xaf84('0x70'),'Type'];if(!_['isNil'](_0x3a1991[_0xaf84('0x37')][_0xaf84('0x6b')])&&_0x3a1991[_0xaf84('0x37')][_0xaf84('0x6b')]===_0xaf84('0x71')){_0x3196b9=[_0xaf84('0x72'),_0xaf84('0x73'),_0xaf84('0x74'),_0xaf84('0x70'),'Priority',_0xaf84('0x75'),'SuppliedName',_0xaf84('0x76')];}if(_0x433ae8){_['remove'](_0x433ae8[_0xaf84('0x3c')],function(_0x2c3deb){return _0x2c3deb[_0xaf84('0x77')]===![]&&!_0x3196b9[_0xaf84('0x78')](_0x2c3deb['name']);});return{'count':_0x433ae8[_0xaf84('0x3c')][_0xaf84('0x3d')],'rows':_[_0xaf84('0x79')](_0x433ae8[_0xaf84('0x3c')],function(_0x2ecfb0){return{'id':_0x2ecfb0[_0xaf84('0x33')],'name':_0x2ecfb0[_0xaf84('0x7a')],'custom':_0x2ecfb0['custom'],'options':_0x2ecfb0[_0xaf84('0x7b')][_0xaf84('0x3d')]>0x0?_[_0xaf84('0x79')](_0x2ecfb0['picklistValues'],function(_0x4deaec){return{'name':_0x4deaec[_0xaf84('0x7a')],'value':_0x4deaec[_0xaf84('0x7c')]};}):_0x2ecfb0[_0xaf84('0x45')]==_0xaf84('0x7d')?[{'name':_0xaf84('0x7e'),'value':_0xaf84('0x7f')},{'name':_0xaf84('0x80'),'value':_0xaf84('0x81')}]:[]};})};}})[_0xaf84('0x1c')](respondWithResult(_0x20ecf3,null))[_0xaf84('0x53')](function(_0x2cb51c){var _0x307a1d=_0x3a1991[_0xaf84('0x37')][_0xaf84('0x82')]?0x1f4:_0x2cb51c['statusCode']||0x1f4;logger[_0xaf84('0x24')](_0xaf84('0x83'),_0xaf84('0x84'),_0x307a1d,JSON[_0xaf84('0x22')](_0x2cb51c));delete _0x2cb51c[_0xaf84('0x33')];if(_0x307a1d===0x191){_0x307a1d=0x190;}_0x20ecf3[_0xaf84('0x28')](_0x307a1d)[_0xaf84('0x85')](_0x3a1991[_0xaf84('0x37')][_0xaf84('0x82')]?{'message':'Wrong\x20credentials','statusCode':_0x2cb51c[_0xaf84('0x86')]}:_0x2cb51c);});};
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.model.js b/server/api/intSalesforceAccount/intSalesforceAccount.model.js
index 7ac0c42..d3a3bfa 100644
--- a/server/api/intSalesforceAccount/intSalesforceAccount.model.js
+++ b/server/api/intSalesforceAccount/intSalesforceAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe706=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intSalesforceAccount.attributes','../../components/integrations/configuration','exports','define','SalesforceAccount','int_salesforce_accounts','lodash','util'];(function(_0x2287d7,_0x329582){var _0x48926c=function(_0x59e229){while(--_0x59e229){_0x2287d7['push'](_0x2287d7['shift']());}};_0x48926c(++_0x329582);}(_0xe706,0xa3));var _0x6e70=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xe706[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('api');var moment=require(_0x6e70('0x3'));var BPromise=require(_0x6e70('0x4'));var rp=require(_0x6e70('0x5'));var fs=require('fs');var path=require(_0x6e70('0x6'));var rimraf=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var attributes=require(_0x6e70('0x9'));var integrations=require(_0x6e70('0xa'));module[_0x6e70('0xb')]=function(_0x4381d1,_0x36357b){return _0x4381d1[_0x6e70('0xc')](_0x6e70('0xd'),attributes,{'tableName':_0x6e70('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5c00=['../../config/logger','moment','request-promise','path','rimraf','../../config/environment','../../components/integrations/configuration','exports','SalesforceAccount','int_salesforce_accounts','lodash','util'];(function(_0x1ea756,_0x53549b){var _0x1dbe16=function(_0x223dfc){while(--_0x223dfc){_0x1ea756['push'](_0x1ea756['shift']());}};_0x1dbe16(++_0x53549b);}(_0x5c00,0x17e));var _0x05c0=function(_0x27d443,_0x4ee5ec){_0x27d443=_0x27d443-0x0;var _0x21b822=_0x5c00[_0x27d443];return _0x21b822;};'use strict';var _=require(_0x05c0('0x0'));var util=require(_0x05c0('0x1'));var logger=require(_0x05c0('0x2'))('api');var moment=require(_0x05c0('0x3'));var BPromise=require('bluebird');var rp=require(_0x05c0('0x4'));var fs=require('fs');var path=require(_0x05c0('0x5'));var rimraf=require(_0x05c0('0x6'));var config=require(_0x05c0('0x7'));var attributes=require('./intSalesforceAccount.attributes');var integrations=require(_0x05c0('0x8'));module[_0x05c0('0x9')]=function(_0x261624,_0x27dc10){return _0x261624['define'](_0x05c0('0xa'),attributes,{'tableName':_0x05c0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js b/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js
index 2baad4e..9525b6b 100644
--- a/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js
+++ b/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfcab=['moment','bluebird','randomstring','ioredis','../../config/utils','client','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','message','result','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','where','attributes','include','map','model','debug','stringify','ShowSalesforceAccount','lodash','util'];(function(_0x220860,_0x16e34f){var _0x3c10a3=function(_0x1d6fad){while(--_0x1d6fad){_0x220860['push'](_0x220860['shift']());}};_0x3c10a3(++_0x16e34f);}(_0xfcab,0x13d));var _0xbfca=function(_0x44d9ab,_0x76bc69){_0x44d9ab=_0x44d9ab-0x0;var _0x31485e=_0xfcab[_0x44d9ab];return _0x31485e;};'use strict';var _=require(_0xbfca('0x0'));var util=require(_0xbfca('0x1'));var moment=require(_0xbfca('0x2'));var BPromise=require(_0xbfca('0x3'));var rs=require(_0xbfca('0x4'));var fs=require('fs');var Redis=require(_0xbfca('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xbfca('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xbfca('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0xb6bc4,_0x2054bd,_0xf397c3){return new BPromise(function(_0x2582c4,_0x5febf1){return client['request'](_0xb6bc4,_0xf397c3)[_0xbfca('0x8')](function(_0x229b71){logger[_0xbfca('0x9')](_0xbfca('0xa'),_0x2054bd,_0xbfca('0xb'));logger['debug'](_0xbfca('0xc'),_0x2054bd,_0xbfca('0xb'),JSON['stringify'](_0x229b71));if(_0x229b71[_0xbfca('0xd')]){if(_0x229b71[_0xbfca('0xd')]['code']===0x1f4){logger['error'](_0xbfca('0xa'),_0x2054bd,_0x229b71['error'][_0xbfca('0xe')]);return _0x5febf1(_0x229b71[_0xbfca('0xd')]['message']);}logger[_0xbfca('0xd')]('SalesforceAccount,\x20%s,\x20%s',_0x2054bd,_0x229b71[_0xbfca('0xd')]['message']);return _0x2582c4(_0x229b71[_0xbfca('0xd')]['message']);}else{logger[_0xbfca('0x9')](_0xbfca('0xa'),_0x2054bd,_0xbfca('0xb'));_0x2582c4(_0x229b71[_0xbfca('0xf')][_0xbfca('0xe')]);}})[_0xbfca('0x10')](function(_0x322604){logger[_0xbfca('0xd')](_0xbfca('0xa'),_0x2054bd,_0x322604);_0x5febf1(_0x322604);});});}exports[_0xbfca('0x11')]=function(_0x45280e){var _0xbf691a=this;return new Promise(function(_0x9c532,_0x3a3630){return db[_0xbfca('0x12')][_0xbfca('0x13')]({'raw':_0x45280e['options']?_0x45280e[_0xbfca('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x45280e[_0xbfca('0x14')]?_0x45280e['options'][_0xbfca('0x15')]||null:null,'attributes':_0x45280e['options']?_0x45280e['options'][_0xbfca('0x16')]||null:null,'limit':_0x45280e['options']?_0x45280e['options']['limit']||null:null,'include':_0x45280e['options']?_0x45280e[_0xbfca('0x14')][_0xbfca('0x17')]?_[_0xbfca('0x18')](_0x45280e[_0xbfca('0x14')][_0xbfca('0x17')],function(_0x1a64fb){return{'model':db[_0x1a64fb[_0xbfca('0x19')]],'as':_0x1a64fb['as'],'attributes':_0x1a64fb[_0xbfca('0x16')],'include':_0x1a64fb[_0xbfca('0x17')]?_[_0xbfca('0x18')](_0x1a64fb['include'],function(_0x3cb5da){return{'model':db[_0x3cb5da[_0xbfca('0x19')]],'as':_0x3cb5da['as'],'attributes':_0x3cb5da[_0xbfca('0x16')],'include':_0x3cb5da[_0xbfca('0x17')]?_['map'](_0x3cb5da[_0xbfca('0x17')],function(_0x166f69){return{'model':db[_0x166f69[_0xbfca('0x19')]],'as':_0x166f69['as'],'attributes':_0x166f69[_0xbfca('0x16')]};}):[]};}):[]};}):[]:[]})[_0xbfca('0x8')](function(_0x31501e){logger[_0xbfca('0x9')](_0xbfca('0x11'),_0x45280e);logger[_0xbfca('0x1a')](_0xbfca('0x11'),_0x45280e,JSON[_0xbfca('0x1b')](_0x31501e));_0x9c532(_0x31501e);})[_0xbfca('0x10')](function(_0x55dddc){logger[_0xbfca('0xd')](_0xbfca('0x11'),_0x55dddc[_0xbfca('0xe')],_0x45280e);_0x3a3630(_0xbf691a[_0xbfca('0xd')](0x1f4,_0x55dddc[_0xbfca('0xe')]));});});};exports[_0xbfca('0x1c')]=function(_0xedb94){var _0x1b29f8=this;return new Promise(function(_0x1ce411,_0x5e957b){return db[_0xbfca('0x12')]['find']({'raw':_0xedb94['options']?_0xedb94[_0xbfca('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0xedb94[_0xbfca('0x14')]?_0xedb94[_0xbfca('0x14')][_0xbfca('0x15')]||null:null,'attributes':_0xedb94[_0xbfca('0x14')]?_0xedb94[_0xbfca('0x14')]['attributes']||null:null,'include':_0xedb94[_0xbfca('0x14')]?_0xedb94[_0xbfca('0x14')][_0xbfca('0x17')]?_[_0xbfca('0x18')](_0xedb94[_0xbfca('0x14')][_0xbfca('0x17')],function(_0x158322){return{'model':db[_0x158322[_0xbfca('0x19')]],'as':_0x158322['as'],'attributes':_0x158322[_0xbfca('0x16')],'include':_0x158322[_0xbfca('0x17')]?_[_0xbfca('0x18')](_0x158322[_0xbfca('0x17')],function(_0x50b866){return{'model':db[_0x50b866[_0xbfca('0x19')]],'as':_0x50b866['as'],'attributes':_0x50b866[_0xbfca('0x16')],'include':_0x50b866[_0xbfca('0x17')]?_[_0xbfca('0x18')](_0x50b866['include'],function(_0x18073c){return{'model':db[_0x18073c['model']],'as':_0x18073c['as'],'attributes':_0x18073c[_0xbfca('0x16')]};}):[]};}):[]};}):[]:[]})[_0xbfca('0x8')](function(_0x1b3e9d){logger[_0xbfca('0x9')](_0xbfca('0x1c'),_0xedb94);logger[_0xbfca('0x1a')](_0xbfca('0x1c'),_0xedb94,JSON[_0xbfca('0x1b')](_0x1b3e9d));_0x1ce411(_0x1b3e9d);})[_0xbfca('0x10')](function(_0x3aed64){logger[_0xbfca('0xd')](_0xbfca('0x1c'),_0x3aed64[_0xbfca('0xe')],_0xedb94);_0x5e957b(_0x1b29f8['error'](0x1f4,_0x3aed64['message']));});});};
\ No newline at end of file
+var _0x9a1b=['randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','code','message','catch','GetSalesforceAccount','SalesforceAccount','options','raw','where','attributes','include','map','model','stringify','ShowSalesforceAccount','find','lodash','moment','bluebird'];(function(_0x3b2000,_0x386e2d){var _0x51d5b1=function(_0x1ae0c5){while(--_0x1ae0c5){_0x3b2000['push'](_0x3b2000['shift']());}};_0x51d5b1(++_0x386e2d);}(_0x9a1b,0x17e));var _0xb9a1=function(_0x37c657,_0x41e62d){_0x37c657=_0x37c657-0x0;var _0x165959=_0x9a1b[_0x37c657];return _0x165959;};'use strict';var _=require(_0xb9a1('0x0'));var util=require('util');var moment=require(_0xb9a1('0x1'));var BPromise=require(_0xb9a1('0x2'));var rs=require(_0xb9a1('0x3'));var fs=require('fs');var Redis=require(_0xb9a1('0x4'));var db=require(_0xb9a1('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb9a1('0x6'))(_0xb9a1('0x7'));var config=require(_0xb9a1('0x8'));var jayson=require(_0xb9a1('0x9'));var client=jayson[_0xb9a1('0xa')][_0xb9a1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1a7787,_0x52828f,_0x51941a){return new BPromise(function(_0x232730,_0x409e87){return client[_0xb9a1('0xc')](_0x1a7787,_0x51941a)[_0xb9a1('0xd')](function(_0x5517d6){logger[_0xb9a1('0xe')](_0xb9a1('0xf'),_0x52828f,_0xb9a1('0x10'));logger[_0xb9a1('0x11')](_0xb9a1('0x12'),_0x52828f,_0xb9a1('0x10'),JSON['stringify'](_0x5517d6));if(_0x5517d6[_0xb9a1('0x13')]){if(_0x5517d6[_0xb9a1('0x13')][_0xb9a1('0x14')]===0x1f4){logger[_0xb9a1('0x13')]('SalesforceAccount,\x20%s,\x20%s',_0x52828f,_0x5517d6[_0xb9a1('0x13')][_0xb9a1('0x15')]);return _0x409e87(_0x5517d6[_0xb9a1('0x13')][_0xb9a1('0x15')]);}logger[_0xb9a1('0x13')]('SalesforceAccount,\x20%s,\x20%s',_0x52828f,_0x5517d6[_0xb9a1('0x13')][_0xb9a1('0x15')]);return _0x232730(_0x5517d6['error'][_0xb9a1('0x15')]);}else{logger[_0xb9a1('0xe')](_0xb9a1('0xf'),_0x52828f,'request\x20sent');_0x232730(_0x5517d6['result'][_0xb9a1('0x15')]);}})[_0xb9a1('0x16')](function(_0x347ed4){logger[_0xb9a1('0x13')](_0xb9a1('0xf'),_0x52828f,_0x347ed4);_0x409e87(_0x347ed4);});});}exports[_0xb9a1('0x17')]=function(_0x5322eb){var _0x568c17=this;return new Promise(function(_0x456108,_0x4b9acc){return db[_0xb9a1('0x18')]['findAll']({'raw':_0x5322eb[_0xb9a1('0x19')]?_0x5322eb[_0xb9a1('0x19')][_0xb9a1('0x1a')]===undefined?!![]:![]:!![],'where':_0x5322eb[_0xb9a1('0x19')]?_0x5322eb[_0xb9a1('0x19')][_0xb9a1('0x1b')]||null:null,'attributes':_0x5322eb[_0xb9a1('0x19')]?_0x5322eb[_0xb9a1('0x19')][_0xb9a1('0x1c')]||null:null,'limit':_0x5322eb[_0xb9a1('0x19')]?_0x5322eb[_0xb9a1('0x19')]['limit']||null:null,'include':_0x5322eb['options']?_0x5322eb[_0xb9a1('0x19')][_0xb9a1('0x1d')]?_[_0xb9a1('0x1e')](_0x5322eb[_0xb9a1('0x19')][_0xb9a1('0x1d')],function(_0x151267){return{'model':db[_0x151267[_0xb9a1('0x1f')]],'as':_0x151267['as'],'attributes':_0x151267[_0xb9a1('0x1c')],'include':_0x151267[_0xb9a1('0x1d')]?_['map'](_0x151267[_0xb9a1('0x1d')],function(_0x1fed8e){return{'model':db[_0x1fed8e[_0xb9a1('0x1f')]],'as':_0x1fed8e['as'],'attributes':_0x1fed8e[_0xb9a1('0x1c')],'include':_0x1fed8e[_0xb9a1('0x1d')]?_[_0xb9a1('0x1e')](_0x1fed8e[_0xb9a1('0x1d')],function(_0x41e599){return{'model':db[_0x41e599['model']],'as':_0x41e599['as'],'attributes':_0x41e599[_0xb9a1('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xb9a1('0xd')](function(_0xe89179){logger[_0xb9a1('0xe')]('GetSalesforceAccount',_0x5322eb);logger['debug']('GetSalesforceAccount',_0x5322eb,JSON[_0xb9a1('0x20')](_0xe89179));_0x456108(_0xe89179);})[_0xb9a1('0x16')](function(_0x1de624){logger[_0xb9a1('0x13')](_0xb9a1('0x17'),_0x1de624[_0xb9a1('0x15')],_0x5322eb);_0x4b9acc(_0x568c17['error'](0x1f4,_0x1de624[_0xb9a1('0x15')]));});});};exports[_0xb9a1('0x21')]=function(_0x308703){var _0xfec40f=this;return new Promise(function(_0x4fb0bf,_0x4c3d80){return db['SalesforceAccount'][_0xb9a1('0x22')]({'raw':_0x308703[_0xb9a1('0x19')]?_0x308703[_0xb9a1('0x19')][_0xb9a1('0x1a')]===undefined?!![]:![]:!![],'where':_0x308703['options']?_0x308703[_0xb9a1('0x19')][_0xb9a1('0x1b')]||null:null,'attributes':_0x308703['options']?_0x308703[_0xb9a1('0x19')]['attributes']||null:null,'include':_0x308703[_0xb9a1('0x19')]?_0x308703[_0xb9a1('0x19')][_0xb9a1('0x1d')]?_[_0xb9a1('0x1e')](_0x308703[_0xb9a1('0x19')][_0xb9a1('0x1d')],function(_0x45441f){return{'model':db[_0x45441f[_0xb9a1('0x1f')]],'as':_0x45441f['as'],'attributes':_0x45441f[_0xb9a1('0x1c')],'include':_0x45441f['include']?_[_0xb9a1('0x1e')](_0x45441f[_0xb9a1('0x1d')],function(_0x16b268){return{'model':db[_0x16b268[_0xb9a1('0x1f')]],'as':_0x16b268['as'],'attributes':_0x16b268[_0xb9a1('0x1c')],'include':_0x16b268[_0xb9a1('0x1d')]?_[_0xb9a1('0x1e')](_0x16b268['include'],function(_0x12a630){return{'model':db[_0x12a630['model']],'as':_0x12a630['as'],'attributes':_0x12a630[_0xb9a1('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xb9a1('0xd')](function(_0xe958e7){logger['info'](_0xb9a1('0x21'),_0x308703);logger[_0xb9a1('0x11')](_0xb9a1('0x21'),_0x308703,JSON['stringify'](_0xe958e7));_0x4fb0bf(_0xe958e7);})[_0xb9a1('0x16')](function(_0x585724){logger[_0xb9a1('0x13')](_0xb9a1('0x21'),_0x585724['message'],_0x308703);_0x4c3d80(_0xfec40f[_0xb9a1('0x13')](0x1f4,_0x585724[_0xb9a1('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/index.js b/server/api/intSalesforceConfiguration/index.js
index 93bcfa6..6aacf39 100644
--- a/server/api/intSalesforceConfiguration/index.js
+++ b/server/api/intSalesforceConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1ff7=['get','isAuthenticated','show','getFields','/:id/subjects','/:id/descriptions','getDescriptions','create','put','update','delete','/:id','exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./intSalesforceConfiguration.controller'];(function(_0x15ad3f,_0x1d6280){var _0xfb1d10=function(_0x2730f7){while(--_0x2730f7){_0x15ad3f['push'](_0x15ad3f['shift']());}};_0xfb1d10(++_0x1d6280);}(_0x1ff7,0x189));var _0x71ff=function(_0x128cd6,_0x316f70){_0x128cd6=_0x128cd6-0x0;var _0x193a57=_0x1ff7[_0x128cd6];return _0x193a57;};'use strict';var multer=require(_0x71ff('0x0'));var util=require(_0x71ff('0x1'));var path=require('path');var timeout=require(_0x71ff('0x2'));var express=require(_0x71ff('0x3'));var router=express['Router']();var auth=require(_0x71ff('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x71ff('0x5'));var controller=require(_0x71ff('0x6'));router[_0x71ff('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x71ff('0x7')]('/:id',auth[_0x71ff('0x8')](),controller[_0x71ff('0x9')]);router[_0x71ff('0x7')]('/:id/fields',auth[_0x71ff('0x8')](),controller[_0x71ff('0xa')]);router['get'](_0x71ff('0xb'),auth['isAuthenticated'](),controller['getSubjects']);router['get'](_0x71ff('0xc'),auth[_0x71ff('0x8')](),controller[_0x71ff('0xd')]);router['post']('/',auth[_0x71ff('0x8')](),controller[_0x71ff('0xe')]);router[_0x71ff('0xf')]('/:id',auth[_0x71ff('0x8')](),controller[_0x71ff('0x10')]);router[_0x71ff('0x11')](_0x71ff('0x12'),auth['isAuthenticated'](),controller['destroy']);module[_0x71ff('0x13')]=router;
\ No newline at end of file
+var _0x44b3=['express','../../components/auth/service','../../config/environment','get','index','/:id','isAuthenticated','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x473d5b,_0xf1f27d){var _0x5564c9=function(_0x3f1074){while(--_0x3f1074){_0x473d5b['push'](_0x473d5b['shift']());}};_0x5564c9(++_0xf1f27d);}(_0x44b3,0x137));var _0x344b=function(_0x45fdb3,_0x374161){_0x45fdb3=_0x45fdb3-0x0;var _0x25575e=_0x44b3[_0x45fdb3];return _0x25575e;};'use strict';var multer=require(_0x344b('0x0'));var util=require(_0x344b('0x1'));var path=require(_0x344b('0x2'));var timeout=require(_0x344b('0x3'));var express=require(_0x344b('0x4'));var router=express['Router']();var auth=require(_0x344b('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x344b('0x6'));var controller=require('./intSalesforceConfiguration.controller');router[_0x344b('0x7')]('/',auth['isAuthenticated'](),controller[_0x344b('0x8')]);router[_0x344b('0x7')](_0x344b('0x9'),auth[_0x344b('0xa')](),controller['show']);router[_0x344b('0x7')](_0x344b('0xb'),auth[_0x344b('0xa')](),controller['getFields']);router['get'](_0x344b('0xc'),auth[_0x344b('0xa')](),controller[_0x344b('0xd')]);router['get'](_0x344b('0xe'),auth[_0x344b('0xa')](),controller['getDescriptions']);router[_0x344b('0xf')]('/',auth[_0x344b('0xa')](),controller[_0x344b('0x10')]);router['put'](_0x344b('0x9'),auth[_0x344b('0xa')](),controller[_0x344b('0x11')]);router[_0x344b('0x12')](_0x344b('0x9'),auth['isAuthenticated'](),controller[_0x344b('0x13')]);module[_0x344b('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js
index 2a1f94e..8067d8d 100644
--- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js
+++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf9f8=['Task','Case','contact_lead','contact','lead','nothing','exports','STRING','ENUM'];(function(_0x568309,_0x1884b0){var _0x3184d3=function(_0x5c1c0b){while(--_0x5c1c0b){_0x568309['push'](_0x568309['shift']());}};_0x3184d3(++_0x1884b0);}(_0xf9f8,0x1c8));var _0x8f9f=function(_0x270681,_0x3f6167){_0x270681=_0x270681-0x0;var _0x699e6a=_0xf9f8[_0x270681];return _0x699e6a;};'use strict';var Sequelize=require('sequelize');module[_0x8f9f('0x0')]={'name':{'type':Sequelize[_0x8f9f('0x1')]},'description':{'type':Sequelize[_0x8f9f('0x1')]},'ticketType':{'type':Sequelize[_0x8f9f('0x2')](_0x8f9f('0x3'),_0x8f9f('0x4')),'defaultValue':_0x8f9f('0x3')},'moduleSearch':{'type':Sequelize['ENUM'](_0x8f9f('0x5'),_0x8f9f('0x6'),_0x8f9f('0x7')),'defaultValue':_0x8f9f('0x5')},'moduleCreate':{'type':Sequelize['ENUM'](_0x8f9f('0x8'),_0x8f9f('0x6'),'lead'),'defaultValue':_0x8f9f('0x7')}};
\ No newline at end of file
+var _0x1eec=['contact','lead','sequelize','exports','STRING','Case','ENUM','contact_lead'];(function(_0x367a3d,_0x452717){var _0x460539=function(_0x1e8beb){while(--_0x1e8beb){_0x367a3d['push'](_0x367a3d['shift']());}};_0x460539(++_0x452717);}(_0x1eec,0x1a2));var _0xc1ee=function(_0x2e4e19,_0x493b50){_0x2e4e19=_0x2e4e19-0x0;var _0x9ba20b=_0x1eec[_0x2e4e19];return _0x9ba20b;};'use strict';var Sequelize=require(_0xc1ee('0x0'));module[_0xc1ee('0x1')]={'name':{'type':Sequelize[_0xc1ee('0x2')]},'description':{'type':Sequelize[_0xc1ee('0x2')]},'ticketType':{'type':Sequelize['ENUM']('Task',_0xc1ee('0x3')),'defaultValue':'Task'},'moduleSearch':{'type':Sequelize[_0xc1ee('0x4')](_0xc1ee('0x5'),_0xc1ee('0x6'),_0xc1ee('0x7')),'defaultValue':_0xc1ee('0x5')},'moduleCreate':{'type':Sequelize['ENUM']('nothing','contact',_0xc1ee('0x7')),'defaultValue':_0xc1ee('0x7')}};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js
index 012a03e..6c0fcbf 100644
--- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js
+++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x99a4=['options','count','includeAll','include','show','params','rawAttributes','filters','find','create','body','destroy','findOne','SalesforceField','order','getFields','getSubjects','getDescriptions','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','request\x20sent','stringify','error','code','SalesforceConfiguration,\x20%s,\x20%s','message','result','catch','end','json','status','set','Content-Range','apply','reject','update','sendStatus','stack','name','index','SalesforceConfiguration','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','offset','sort','pick','filter','where','merge','map','type','key','field'];(function(_0xb4ec3a,_0x2bace0){var _0x1b83db=function(_0x5278f3){while(--_0x5278f3){_0xb4ec3a['push'](_0xb4ec3a['shift']());}};_0x1b83db(++_0x2bace0);}(_0x99a4,0x6a));var _0x499a=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0x99a4[_0x465a0c];return _0x1e202e;};'use strict';var pdf=require(_0x499a('0x0'));var emlformat=require(_0x499a('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x499a('0x2'));var jsonpatch=require(_0x499a('0x3'));var rp=require(_0x499a('0x4'));var moment=require(_0x499a('0x5'));var BPromise=require(_0x499a('0x6'));var Mustache=require(_0x499a('0x7'));var util=require('util');var path=require(_0x499a('0x8'));var sox=require('sox');var csv=require(_0x499a('0x9'));var ejs=require(_0x499a('0xa'));var fs=require('fs');var _=require(_0x499a('0xb'));var squel=require('squel');var crypto=require(_0x499a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x499a('0xd'));var toCsv=require(_0x499a('0x9'));var querystring=require(_0x499a('0xe'));var Papa=require(_0x499a('0xf'));var Redis=require(_0x499a('0x10'));var authService=require(_0x499a('0x11'));var qs=require(_0x499a('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x499a('0x13'));var config=require(_0x499a('0x14'));var db=require(_0x499a('0x15'))['db'];var jayson=require(_0x499a('0x16'));var client=jayson[_0x499a('0x17')][_0x499a('0x18')]({'port':0x232a});function checkPasswordPattern(_0x48eb5a,_0x42ec97,_0xc3bcde){if(_0xc3bcde){var _0x1c7c74=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1c7c74['test'](_0x42ec97)){return _0x48eb5a;}else{throw new Error(_0x499a('0x19'));}}else{return _0x48eb5a;}}function respondWithRpcPromise(_0x18c3e0,_0x32abb3,_0x4ad6b9,_0x25824d){return new BPromise(function(_0x4fd9f1,_0xd50842){var _0x2ea0d5=_0x25824d||client;return _0x2ea0d5[_0x499a('0x1a')](_0x18c3e0,_0x4ad6b9)[_0x499a('0x1b')](function(_0x1790be){logger[_0x499a('0x1c')]('SalesforceConfiguration,\x20%s,\x20%s',_0x32abb3,_0x499a('0x1d'));logger['debug']('SalesforceConfiguration,\x20%s,\x20%s,\x20%s',_0x32abb3,_0x499a('0x1d'),JSON[_0x499a('0x1e')](_0x1790be));if(_0x1790be[_0x499a('0x1f')]){if(_0x1790be[_0x499a('0x1f')][_0x499a('0x20')]===0x1f4){logger[_0x499a('0x1f')](_0x499a('0x21'),_0x32abb3,_0x1790be['error'][_0x499a('0x22')]);return _0xd50842(_0x1790be[_0x499a('0x1f')][_0x499a('0x22')]);}logger[_0x499a('0x1f')](_0x499a('0x21'),_0x32abb3,_0x1790be[_0x499a('0x1f')]['message']);return _0x4fd9f1(_0x1790be[_0x499a('0x1f')][_0x499a('0x22')]);}else{logger['info'](_0x499a('0x21'),_0x32abb3,_0x499a('0x1d'));_0x4fd9f1(_0x1790be[_0x499a('0x23')]['message']);}})[_0x499a('0x24')](function(_0x101ada){logger[_0x499a('0x1f')](_0x499a('0x21'),_0x32abb3,_0x101ada);_0xd50842(_0x101ada);});});}function respondWithStatusCode(_0x1b529d,_0x35ce6f){_0x35ce6f=_0x35ce6f||0xcc;return function(_0x484975){if(_0x484975){return _0x1b529d['sendStatus'](_0x35ce6f);}return _0x1b529d['status'](_0x35ce6f)[_0x499a('0x25')]();};}function respondWithResult(_0x1676d8,_0xb34f3f){_0xb34f3f=_0xb34f3f||0xc8;return function(_0x3cabd2){if(_0x3cabd2){return _0x1676d8['status'](_0xb34f3f)[_0x499a('0x26')](_0x3cabd2);}};}function respondWithFilteredResult(_0x4e5792,_0x520fe5){return function(_0x445a82){if(_0x445a82){var _0x224eb4=_0x445a82['count'],_0x239dd9=_0x520fe5['offset'],_0x34c420=_0x520fe5['offset']+_0x520fe5['limit'],_0x486777;if(_0x34c420>=_0x224eb4){_0x34c420=_0x224eb4;_0x486777=0xc8;}else{_0x486777=0xce;}_0x4e5792[_0x499a('0x27')](_0x486777);return _0x4e5792[_0x499a('0x28')](_0x499a('0x29'),_0x239dd9+'-'+_0x34c420+'/'+_0x224eb4)[_0x499a('0x26')](_0x445a82);}return null;};}function patchUpdates(_0x1c511c){return function(_0x2ff5fb){try{jsonpatch[_0x499a('0x2a')](_0x2ff5fb,_0x1c511c,!![]);}catch(_0x20e74a){return BPromise[_0x499a('0x2b')](_0x20e74a);}return _0x2ff5fb['save']();};}function saveUpdates(_0xde819b,_0x1fad86){return function(_0x22ee4b){if(_0x22ee4b){return _0x22ee4b[_0x499a('0x2c')](_0xde819b)['then'](function(_0x5373cf){return _0x5373cf;});}return null;};}function removeEntity(_0x4b8fb6,_0x484e8b){return function(_0x31da4a){if(_0x31da4a){return _0x31da4a['destroy']()[_0x499a('0x1b')](function(){_0x4b8fb6[_0x499a('0x27')](0xcc)[_0x499a('0x25')]();});}};}function handleEntityNotFound(_0xae386a,_0x579f75){return function(_0x2afc82){if(!_0x2afc82){_0xae386a[_0x499a('0x2d')](0x194);}return _0x2afc82;};}function handleError(_0x17d964,_0x1092c1){_0x1092c1=_0x1092c1||0x1f4;return function(_0x4af688){logger[_0x499a('0x1f')](_0x4af688[_0x499a('0x2e')]);if(_0x4af688[_0x499a('0x2f')]){delete _0x4af688[_0x499a('0x2f')];}_0x17d964[_0x499a('0x27')](_0x1092c1)['send'](_0x4af688);};}exports[_0x499a('0x30')]=function(_0x3e95cb,_0x3f50bf){var _0x524a93={},_0x3ce44d={},_0x31e5d3={'count':0x0,'rows':[]};var _0x389e46=db[_0x499a('0x31')]['rawAttributes'];_0x3ce44d[_0x499a('0x32')]=_[_0x499a('0x33')](_0x389e46);_0x3ce44d[_0x499a('0x34')]=_[_0x499a('0x33')](_0x3e95cb[_0x499a('0x34')]);_0x3ce44d['filters']=_[_0x499a('0x35')](_0x3ce44d[_0x499a('0x32')],_0x3ce44d[_0x499a('0x34')]);_0x524a93[_0x499a('0x36')]=_[_0x499a('0x35')](_0x3ce44d['model'],qs[_0x499a('0x37')](_0x3e95cb[_0x499a('0x34')]['fields']));_0x524a93[_0x499a('0x36')]=_0x524a93[_0x499a('0x36')][_0x499a('0x38')]?_0x524a93['attributes']:_0x3ce44d[_0x499a('0x32')];if(!_0x3e95cb[_0x499a('0x34')][_0x499a('0x39')](_0x499a('0x3a'))){_0x524a93[_0x499a('0x3b')]=qs[_0x499a('0x3b')](_0x3e95cb['query'][_0x499a('0x3b')]);_0x524a93[_0x499a('0x3c')]=qs['offset'](_0x3e95cb['query'][_0x499a('0x3c')]);}_0x524a93['order']=qs[_0x499a('0x3d')](_0x3e95cb[_0x499a('0x34')][_0x499a('0x3d')]);_0x524a93['where']=qs['filters'](_[_0x499a('0x3e')](_0x3e95cb['query'],_0x3ce44d['filters']));if(_0x3e95cb[_0x499a('0x34')][_0x499a('0x3f')]){_0x524a93[_0x499a('0x40')]=_[_0x499a('0x41')](_0x524a93[_0x499a('0x40')],{'$or':_[_0x499a('0x42')](_0x389e46,function(_0x21647f){if(_0x21647f[_0x499a('0x43')][_0x499a('0x44')]!=='VIRTUAL'){var _0x51f790={};_0x51f790[_0x21647f[_0x499a('0x45')]]={'$like':'%'+_0x3e95cb['query'][_0x499a('0x3f')]+'%'};return _0x51f790;}})});}_0x524a93=_[_0x499a('0x41')]({},_0x524a93,_0x3e95cb[_0x499a('0x46')]);var _0x1bbe8e={'where':_0x524a93['where']};return db['SalesforceConfiguration'][_0x499a('0x47')](_0x1bbe8e)[_0x499a('0x1b')](function(_0x40568e){_0x31e5d3[_0x499a('0x47')]=_0x40568e;if(_0x3e95cb[_0x499a('0x34')][_0x499a('0x48')]){_0x524a93[_0x499a('0x49')]=[{'all':!![]}];}return db['SalesforceConfiguration']['findAll'](_0x524a93);})[_0x499a('0x1b')](function(_0x1c0d78){_0x31e5d3['rows']=_0x1c0d78;return _0x31e5d3;})['then'](respondWithFilteredResult(_0x3f50bf,_0x524a93))['catch'](handleError(_0x3f50bf,null));};exports[_0x499a('0x4a')]=function(_0x299205,_0x4cc33c){var _0x4afe63={'raw':![],'where':{'id':_0x299205[_0x499a('0x4b')]['id']}},_0x181728={};_0x181728['model']=_[_0x499a('0x33')](db[_0x499a('0x31')][_0x499a('0x4c')]);_0x181728[_0x499a('0x34')]=_[_0x499a('0x33')](_0x299205[_0x499a('0x34')]);_0x181728[_0x499a('0x4d')]=_[_0x499a('0x35')](_0x181728[_0x499a('0x32')],_0x181728[_0x499a('0x34')]);_0x4afe63['attributes']=_[_0x499a('0x35')](_0x181728[_0x499a('0x32')],qs[_0x499a('0x37')](_0x299205[_0x499a('0x34')][_0x499a('0x37')]));_0x4afe63[_0x499a('0x36')]=_0x4afe63[_0x499a('0x36')]['length']?_0x4afe63[_0x499a('0x36')]:_0x181728['model'];if(_0x299205[_0x499a('0x34')]['includeAll']){_0x4afe63[_0x499a('0x49')]=[{'all':!![]}];}_0x4afe63=_[_0x499a('0x41')]({},_0x4afe63,_0x299205[_0x499a('0x46')]);return db[_0x499a('0x31')][_0x499a('0x4e')](_0x4afe63)[_0x499a('0x1b')](handleEntityNotFound(_0x4cc33c,null))[_0x499a('0x1b')](respondWithResult(_0x4cc33c,null))[_0x499a('0x24')](handleError(_0x4cc33c,null));};exports[_0x499a('0x4f')]=function(_0xf39253,_0x39d208){return db[_0x499a('0x31')][_0x499a('0x4f')](_0xf39253[_0x499a('0x50')],{})[_0x499a('0x1b')](respondWithResult(_0x39d208,0xc9))[_0x499a('0x24')](handleError(_0x39d208,null));};exports[_0x499a('0x2c')]=function(_0x183691,_0x14a1e0){if(_0x183691[_0x499a('0x50')]['id']){delete _0x183691['body']['id'];}return db[_0x499a('0x31')]['find']({'where':{'id':_0x183691[_0x499a('0x4b')]['id']}})[_0x499a('0x1b')](handleEntityNotFound(_0x14a1e0,null))[_0x499a('0x1b')](saveUpdates(_0x183691[_0x499a('0x50')],null))[_0x499a('0x1b')](respondWithResult(_0x14a1e0,null))[_0x499a('0x24')](handleError(_0x14a1e0,null));};exports[_0x499a('0x51')]=function(_0xa41bcc,_0xa19a6){return db['SalesforceConfiguration']['find']({'where':{'id':_0xa41bcc[_0x499a('0x4b')]['id']}})[_0x499a('0x1b')](handleEntityNotFound(_0xa19a6,null))['then'](removeEntity(_0xa19a6,null))[_0x499a('0x24')](handleError(_0xa19a6,null));};exports['getFields']=function(_0x9c1528,_0x58180b,_0x2e6c83){var _0x41c031={};var _0x4519c5={};var _0x2952f4;var _0x202ba2;return db['SalesforceConfiguration'][_0x499a('0x52')]({'where':{'id':_0x9c1528[_0x499a('0x4b')]['id']}})[_0x499a('0x1b')](handleEntityNotFound(_0x58180b,null))[_0x499a('0x1b')](function(_0x3717ae){if(_0x3717ae){_0x2952f4=_0x3717ae;_0x4519c5[_0x499a('0x32')]=_['keys'](db[_0x499a('0x53')][_0x499a('0x4c')]);_0x4519c5[_0x499a('0x34')]=_[_0x499a('0x33')](_0x9c1528[_0x499a('0x34')]);_0x4519c5[_0x499a('0x4d')]=_[_0x499a('0x35')](_0x4519c5[_0x499a('0x32')],_0x4519c5[_0x499a('0x34')]);_0x41c031[_0x499a('0x36')]=_[_0x499a('0x35')](_0x4519c5[_0x499a('0x32')],qs[_0x499a('0x37')](_0x9c1528[_0x499a('0x34')][_0x499a('0x37')]));_0x41c031[_0x499a('0x36')]=_0x41c031['attributes'][_0x499a('0x38')]?_0x41c031['attributes']:_0x4519c5[_0x499a('0x32')];_0x41c031[_0x499a('0x54')]=qs[_0x499a('0x3d')](_0x9c1528[_0x499a('0x34')][_0x499a('0x3d')]);_0x41c031[_0x499a('0x40')]=qs[_0x499a('0x4d')](_[_0x499a('0x3e')](_0x9c1528[_0x499a('0x34')],_0x4519c5[_0x499a('0x4d')]));if(_0x9c1528[_0x499a('0x34')]['filter']){_0x41c031[_0x499a('0x40')]=_[_0x499a('0x41')](_0x41c031[_0x499a('0x40')],{'$or':_[_0x499a('0x42')](_0x41c031[_0x499a('0x36')],function(_0x265f40){var _0x18b298={};_0x18b298[_0x265f40]={'$like':'%'+_0x9c1528[_0x499a('0x34')]['filter']+'%'};return _0x18b298;})});}_0x41c031=_['merge']({},_0x41c031,_0x9c1528[_0x499a('0x46')]);return _0x2952f4['getFields'](_0x41c031);}})[_0x499a('0x1b')](function(_0x1a5c5e){if(_0x1a5c5e){_0x202ba2=_0x1a5c5e[_0x499a('0x38')];if(!_0x9c1528[_0x499a('0x34')]['hasOwnProperty'](_0x499a('0x3a'))){_0x41c031['limit']=qs[_0x499a('0x3b')](_0x9c1528['query'][_0x499a('0x3b')]);_0x41c031['offset']=qs[_0x499a('0x3c')](_0x9c1528[_0x499a('0x34')][_0x499a('0x3c')]);}return _0x2952f4[_0x499a('0x55')](_0x41c031);}})[_0x499a('0x1b')](function(_0x24566d){if(_0x24566d){return _0x24566d?{'count':_0x202ba2,'rows':_0x24566d}:null;}})['then'](respondWithResult(_0x58180b,null))[_0x499a('0x24')](handleError(_0x58180b,null));};exports[_0x499a('0x56')]=function(_0x1bb231,_0x3d6e62,_0x26306f){var _0x222aca={};var _0x515030={};var _0x2f24b5;var _0x5017f0;return db[_0x499a('0x31')]['findOne']({'where':{'id':_0x1bb231[_0x499a('0x4b')]['id']}})[_0x499a('0x1b')](handleEntityNotFound(_0x3d6e62,null))[_0x499a('0x1b')](function(_0x290851){if(_0x290851){_0x2f24b5=_0x290851;_0x515030[_0x499a('0x32')]=_[_0x499a('0x33')](db['SalesforceField'][_0x499a('0x4c')]);_0x515030[_0x499a('0x34')]=_['keys'](_0x1bb231[_0x499a('0x34')]);_0x515030[_0x499a('0x4d')]=_['intersection'](_0x515030['model'],_0x515030[_0x499a('0x34')]);_0x222aca['attributes']=_[_0x499a('0x35')](_0x515030[_0x499a('0x32')],qs[_0x499a('0x37')](_0x1bb231[_0x499a('0x34')][_0x499a('0x37')]));_0x222aca[_0x499a('0x36')]=_0x222aca[_0x499a('0x36')][_0x499a('0x38')]?_0x222aca[_0x499a('0x36')]:_0x515030[_0x499a('0x32')];_0x222aca['order']=qs[_0x499a('0x3d')](_0x1bb231[_0x499a('0x34')]['sort']);_0x222aca[_0x499a('0x40')]=qs[_0x499a('0x4d')](_[_0x499a('0x3e')](_0x1bb231[_0x499a('0x34')],_0x515030[_0x499a('0x4d')]));if(_0x1bb231[_0x499a('0x34')][_0x499a('0x3f')]){_0x222aca[_0x499a('0x40')]=_['merge'](_0x222aca['where'],{'$or':_[_0x499a('0x42')](_0x222aca[_0x499a('0x36')],function(_0x1072cb){var _0x34a8cb={};_0x34a8cb[_0x1072cb]={'$like':'%'+_0x1bb231[_0x499a('0x34')]['filter']+'%'};return _0x34a8cb;})});}_0x222aca=_['merge']({},_0x222aca,_0x1bb231[_0x499a('0x46')]);return _0x2f24b5[_0x499a('0x56')](_0x222aca);}})[_0x499a('0x1b')](function(_0x28770f){if(_0x28770f){_0x5017f0=_0x28770f['length'];if(!_0x1bb231[_0x499a('0x34')][_0x499a('0x39')](_0x499a('0x3a'))){_0x222aca[_0x499a('0x3b')]=qs[_0x499a('0x3b')](_0x1bb231[_0x499a('0x34')]['limit']);_0x222aca[_0x499a('0x3c')]=qs[_0x499a('0x3c')](_0x1bb231[_0x499a('0x34')][_0x499a('0x3c')]);}return _0x2f24b5[_0x499a('0x56')](_0x222aca);}})[_0x499a('0x1b')](function(_0xf92513){if(_0xf92513){return _0xf92513?{'count':_0x5017f0,'rows':_0xf92513}:null;}})[_0x499a('0x1b')](respondWithResult(_0x3d6e62,null))[_0x499a('0x24')](handleError(_0x3d6e62,null));};exports[_0x499a('0x57')]=function(_0x59b1ea,_0xfcfb5e,_0x2ea281){var _0x5d6efb={};var _0x29834={};var _0x408527;var _0x7d3302;return db['SalesforceConfiguration'][_0x499a('0x52')]({'where':{'id':_0x59b1ea['params']['id']}})['then'](handleEntityNotFound(_0xfcfb5e,null))[_0x499a('0x1b')](function(_0x532401){if(_0x532401){_0x408527=_0x532401;_0x29834['model']=_[_0x499a('0x33')](db[_0x499a('0x53')][_0x499a('0x4c')]);_0x29834[_0x499a('0x34')]=_[_0x499a('0x33')](_0x59b1ea[_0x499a('0x34')]);_0x29834['filters']=_[_0x499a('0x35')](_0x29834[_0x499a('0x32')],_0x29834[_0x499a('0x34')]);_0x5d6efb[_0x499a('0x36')]=_[_0x499a('0x35')](_0x29834['model'],qs[_0x499a('0x37')](_0x59b1ea[_0x499a('0x34')][_0x499a('0x37')]));_0x5d6efb[_0x499a('0x36')]=_0x5d6efb[_0x499a('0x36')]['length']?_0x5d6efb[_0x499a('0x36')]:_0x29834[_0x499a('0x32')];_0x5d6efb[_0x499a('0x54')]=qs[_0x499a('0x3d')](_0x59b1ea[_0x499a('0x34')][_0x499a('0x3d')]);_0x5d6efb[_0x499a('0x40')]=qs[_0x499a('0x4d')](_[_0x499a('0x3e')](_0x59b1ea[_0x499a('0x34')],_0x29834[_0x499a('0x4d')]));if(_0x59b1ea[_0x499a('0x34')][_0x499a('0x3f')]){_0x5d6efb[_0x499a('0x40')]=_[_0x499a('0x41')](_0x5d6efb[_0x499a('0x40')],{'$or':_['map'](_0x5d6efb[_0x499a('0x36')],function(_0xe61009){var _0x474b6e={};_0x474b6e[_0xe61009]={'$like':'%'+_0x59b1ea['query'][_0x499a('0x3f')]+'%'};return _0x474b6e;})});}_0x5d6efb=_['merge']({},_0x5d6efb,_0x59b1ea[_0x499a('0x46')]);return _0x408527[_0x499a('0x57')](_0x5d6efb);}})['then'](function(_0x3153b1){if(_0x3153b1){_0x7d3302=_0x3153b1[_0x499a('0x38')];if(!_0x59b1ea[_0x499a('0x34')][_0x499a('0x39')](_0x499a('0x3a'))){_0x5d6efb[_0x499a('0x3b')]=qs[_0x499a('0x3b')](_0x59b1ea['query'][_0x499a('0x3b')]);_0x5d6efb[_0x499a('0x3c')]=qs[_0x499a('0x3c')](_0x59b1ea[_0x499a('0x34')]['offset']);}return _0x408527[_0x499a('0x57')](_0x5d6efb);}})[_0x499a('0x1b')](function(_0x11304c){if(_0x11304c){return _0x11304c?{'count':_0x7d3302,'rows':_0x11304c}:null;}})[_0x499a('0x1b')](respondWithResult(_0xfcfb5e,null))[_0x499a('0x24')](handleError(_0xfcfb5e,null));};
\ No newline at end of file
+var _0x6282=['catch','show','params','create','body','destroy','find','getFields','findOne','SalesforceField','order','map','hasOwnProperty','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','moment','bluebird','to-csv','lodash','squel','crypto','jsforce','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','jayson/promise','client','http','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','end','status','json','count','offset','limit','set','apply','reject','save','update','stack','name','send','SalesforceConfiguration','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','nolimit','sort','where','pick','filter','merge','type','key','options','includeAll','include','findAll','rows'];(function(_0x4e904e,_0x33e4ef){var _0x14601a=function(_0x4bc023){while(--_0x4bc023){_0x4e904e['push'](_0x4e904e['shift']());}};_0x14601a(++_0x33e4ef);}(_0x6282,0x10e));var _0x2628=function(_0x40d015,_0x4fc6e6){_0x40d015=_0x40d015-0x0;var _0x2af92e=_0x6282[_0x40d015];return _0x2af92e;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x2628('0x0'));var rimraf=require(_0x2628('0x1'));var zipdir=require(_0x2628('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x2628('0x3'));var BPromise=require(_0x2628('0x4'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x2628('0x5'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x2628('0x6'));var squel=require(_0x2628('0x7'));var crypto=require(_0x2628('0x8'));var jsforce=require(_0x2628('0x9'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x2628('0xa'));var authService=require('../../components/auth/service');var qs=require(_0x2628('0xb'));var hardwareService=require(_0x2628('0xc'));var logger=require(_0x2628('0xd'))('api');var utils=require('../../config/utils');var config=require(_0x2628('0xe'));var db=require(_0x2628('0xf'))['db'];var jayson=require(_0x2628('0x10'));var client=jayson[_0x2628('0x11')][_0x2628('0x12')]({'port':0x232a});function checkPasswordPattern(_0x2f3838,_0x4b97c,_0x5e6e7b){if(_0x5e6e7b){var _0x5b8560=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5b8560['test'](_0x4b97c)){return _0x2f3838;}else{throw new Error(_0x2628('0x13'));}}else{return _0x2f3838;}}function respondWithRpcPromise(_0x5f080c,_0x59b966,_0x167de8,_0x190ae5){return new BPromise(function(_0x231b08,_0x30fdb8){var _0x465c8c=_0x190ae5||client;return _0x465c8c[_0x2628('0x14')](_0x5f080c,_0x167de8)[_0x2628('0x15')](function(_0x315fe3){logger[_0x2628('0x16')](_0x2628('0x17'),_0x59b966,_0x2628('0x18'));logger[_0x2628('0x19')](_0x2628('0x1a'),_0x59b966,_0x2628('0x18'),JSON[_0x2628('0x1b')](_0x315fe3));if(_0x315fe3[_0x2628('0x1c')]){if(_0x315fe3[_0x2628('0x1c')][_0x2628('0x1d')]===0x1f4){logger[_0x2628('0x1c')]('SalesforceConfiguration,\x20%s,\x20%s',_0x59b966,_0x315fe3['error']['message']);return _0x30fdb8(_0x315fe3['error'][_0x2628('0x1e')]);}logger[_0x2628('0x1c')](_0x2628('0x17'),_0x59b966,_0x315fe3[_0x2628('0x1c')]['message']);return _0x231b08(_0x315fe3['error'][_0x2628('0x1e')]);}else{logger[_0x2628('0x16')]('SalesforceConfiguration,\x20%s,\x20%s',_0x59b966,_0x2628('0x18'));_0x231b08(_0x315fe3[_0x2628('0x1f')][_0x2628('0x1e')]);}})['catch'](function(_0xe5ca07){logger[_0x2628('0x1c')](_0x2628('0x17'),_0x59b966,_0xe5ca07);_0x30fdb8(_0xe5ca07);});});}function respondWithStatusCode(_0x2412ef,_0x2565c0){_0x2565c0=_0x2565c0||0xcc;return function(_0x29c5b8){if(_0x29c5b8){return _0x2412ef[_0x2628('0x20')](_0x2565c0);}return _0x2412ef['status'](_0x2565c0)[_0x2628('0x21')]();};}function respondWithResult(_0x37be28,_0x2da193){_0x2da193=_0x2da193||0xc8;return function(_0x496d22){if(_0x496d22){return _0x37be28[_0x2628('0x22')](_0x2da193)[_0x2628('0x23')](_0x496d22);}};}function respondWithFilteredResult(_0x46a022,_0x4013ff){return function(_0x23e133){if(_0x23e133){var _0x22cabc=_0x23e133[_0x2628('0x24')],_0x2614d9=_0x4013ff[_0x2628('0x25')],_0x4d4f7d=_0x4013ff[_0x2628('0x25')]+_0x4013ff[_0x2628('0x26')],_0x1909a2;if(_0x4d4f7d>=_0x22cabc){_0x4d4f7d=_0x22cabc;_0x1909a2=0xc8;}else{_0x1909a2=0xce;}_0x46a022[_0x2628('0x22')](_0x1909a2);return _0x46a022[_0x2628('0x27')]('Content-Range',_0x2614d9+'-'+_0x4d4f7d+'/'+_0x22cabc)[_0x2628('0x23')](_0x23e133);}return null;};}function patchUpdates(_0x64cf42){return function(_0x2a8b53){try{jsonpatch[_0x2628('0x28')](_0x2a8b53,_0x64cf42,!![]);}catch(_0x2f5e36){return BPromise[_0x2628('0x29')](_0x2f5e36);}return _0x2a8b53[_0x2628('0x2a')]();};}function saveUpdates(_0x4b50eb,_0x10d59a){return function(_0x23fb69){if(_0x23fb69){return _0x23fb69[_0x2628('0x2b')](_0x4b50eb)[_0x2628('0x15')](function(_0x56326e){return _0x56326e;});}return null;};}function removeEntity(_0x122a9a,_0x4b0c90){return function(_0x5d2a06){if(_0x5d2a06){return _0x5d2a06['destroy']()[_0x2628('0x15')](function(){_0x122a9a[_0x2628('0x22')](0xcc)[_0x2628('0x21')]();});}};}function handleEntityNotFound(_0x1010b5,_0x317e37){return function(_0x2f6e6c){if(!_0x2f6e6c){_0x1010b5[_0x2628('0x20')](0x194);}return _0x2f6e6c;};}function handleError(_0x473007,_0x39a56d){_0x39a56d=_0x39a56d||0x1f4;return function(_0x50dbd9){logger[_0x2628('0x1c')](_0x50dbd9[_0x2628('0x2c')]);if(_0x50dbd9[_0x2628('0x2d')]){delete _0x50dbd9['name'];}_0x473007['status'](_0x39a56d)[_0x2628('0x2e')](_0x50dbd9);};}exports['index']=function(_0x3112f8,_0x5d5450){var _0x297eaf={},_0x284b86={},_0x359304={'count':0x0,'rows':[]};var _0x3894fe=db[_0x2628('0x2f')][_0x2628('0x30')];_0x284b86[_0x2628('0x31')]=_[_0x2628('0x32')](_0x3894fe);_0x284b86[_0x2628('0x33')]=_[_0x2628('0x32')](_0x3112f8[_0x2628('0x33')]);_0x284b86[_0x2628('0x34')]=_['intersection'](_0x284b86[_0x2628('0x31')],_0x284b86[_0x2628('0x33')]);_0x297eaf['attributes']=_[_0x2628('0x35')](_0x284b86['model'],qs[_0x2628('0x36')](_0x3112f8['query'][_0x2628('0x36')]));_0x297eaf[_0x2628('0x37')]=_0x297eaf[_0x2628('0x37')][_0x2628('0x38')]?_0x297eaf[_0x2628('0x37')]:_0x284b86[_0x2628('0x31')];if(!_0x3112f8[_0x2628('0x33')]['hasOwnProperty'](_0x2628('0x39'))){_0x297eaf['limit']=qs[_0x2628('0x26')](_0x3112f8[_0x2628('0x33')][_0x2628('0x26')]);_0x297eaf[_0x2628('0x25')]=qs['offset'](_0x3112f8['query'][_0x2628('0x25')]);}_0x297eaf['order']=qs['sort'](_0x3112f8[_0x2628('0x33')][_0x2628('0x3a')]);_0x297eaf[_0x2628('0x3b')]=qs[_0x2628('0x34')](_[_0x2628('0x3c')](_0x3112f8[_0x2628('0x33')],_0x284b86[_0x2628('0x34')]));if(_0x3112f8[_0x2628('0x33')][_0x2628('0x3d')]){_0x297eaf['where']=_[_0x2628('0x3e')](_0x297eaf[_0x2628('0x3b')],{'$or':_['map'](_0x3894fe,function(_0x426d75){if(_0x426d75[_0x2628('0x3f')][_0x2628('0x40')]!=='VIRTUAL'){var _0x45feda={};_0x45feda[_0x426d75['field']]={'$like':'%'+_0x3112f8[_0x2628('0x33')]['filter']+'%'};return _0x45feda;}})});}_0x297eaf=_[_0x2628('0x3e')]({},_0x297eaf,_0x3112f8[_0x2628('0x41')]);var _0x4c6bfd={'where':_0x297eaf[_0x2628('0x3b')]};return db[_0x2628('0x2f')][_0x2628('0x24')](_0x4c6bfd)['then'](function(_0x46e299){_0x359304['count']=_0x46e299;if(_0x3112f8[_0x2628('0x33')][_0x2628('0x42')]){_0x297eaf[_0x2628('0x43')]=[{'all':!![]}];}return db[_0x2628('0x2f')][_0x2628('0x44')](_0x297eaf);})[_0x2628('0x15')](function(_0x5403c0){_0x359304[_0x2628('0x45')]=_0x5403c0;return _0x359304;})[_0x2628('0x15')](respondWithFilteredResult(_0x5d5450,_0x297eaf))[_0x2628('0x46')](handleError(_0x5d5450,null));};exports[_0x2628('0x47')]=function(_0x2e703c,_0x40ac29){var _0xd1758d={'raw':![],'where':{'id':_0x2e703c[_0x2628('0x48')]['id']}},_0x249c17={};_0x249c17[_0x2628('0x31')]=_[_0x2628('0x32')](db[_0x2628('0x2f')]['rawAttributes']);_0x249c17[_0x2628('0x33')]=_[_0x2628('0x32')](_0x2e703c[_0x2628('0x33')]);_0x249c17[_0x2628('0x34')]=_[_0x2628('0x35')](_0x249c17[_0x2628('0x31')],_0x249c17[_0x2628('0x33')]);_0xd1758d['attributes']=_['intersection'](_0x249c17[_0x2628('0x31')],qs[_0x2628('0x36')](_0x2e703c[_0x2628('0x33')]['fields']));_0xd1758d[_0x2628('0x37')]=_0xd1758d[_0x2628('0x37')][_0x2628('0x38')]?_0xd1758d[_0x2628('0x37')]:_0x249c17[_0x2628('0x31')];if(_0x2e703c[_0x2628('0x33')][_0x2628('0x42')]){_0xd1758d[_0x2628('0x43')]=[{'all':!![]}];}_0xd1758d=_['merge']({},_0xd1758d,_0x2e703c[_0x2628('0x41')]);return db[_0x2628('0x2f')]['find'](_0xd1758d)[_0x2628('0x15')](handleEntityNotFound(_0x40ac29,null))[_0x2628('0x15')](respondWithResult(_0x40ac29,null))[_0x2628('0x46')](handleError(_0x40ac29,null));};exports[_0x2628('0x49')]=function(_0x41cf2b,_0x3f334e){return db[_0x2628('0x2f')][_0x2628('0x49')](_0x41cf2b[_0x2628('0x4a')],{})[_0x2628('0x15')](respondWithResult(_0x3f334e,0xc9))[_0x2628('0x46')](handleError(_0x3f334e,null));};exports[_0x2628('0x2b')]=function(_0x5e3890,_0x5def65){if(_0x5e3890[_0x2628('0x4a')]['id']){delete _0x5e3890['body']['id'];}return db[_0x2628('0x2f')]['find']({'where':{'id':_0x5e3890[_0x2628('0x48')]['id']}})[_0x2628('0x15')](handleEntityNotFound(_0x5def65,null))[_0x2628('0x15')](saveUpdates(_0x5e3890[_0x2628('0x4a')],null))[_0x2628('0x15')](respondWithResult(_0x5def65,null))[_0x2628('0x46')](handleError(_0x5def65,null));};exports[_0x2628('0x4b')]=function(_0x4f8d6f,_0x4ac27a){return db[_0x2628('0x2f')][_0x2628('0x4c')]({'where':{'id':_0x4f8d6f[_0x2628('0x48')]['id']}})[_0x2628('0x15')](handleEntityNotFound(_0x4ac27a,null))[_0x2628('0x15')](removeEntity(_0x4ac27a,null))['catch'](handleError(_0x4ac27a,null));};exports[_0x2628('0x4d')]=function(_0x2f4fa0,_0x583394,_0x41e8ac){var _0x15296d={};var _0x172733={};var _0x4c989a;var _0x24d18a;return db[_0x2628('0x2f')][_0x2628('0x4e')]({'where':{'id':_0x2f4fa0[_0x2628('0x48')]['id']}})[_0x2628('0x15')](handleEntityNotFound(_0x583394,null))[_0x2628('0x15')](function(_0x27d830){if(_0x27d830){_0x4c989a=_0x27d830;_0x172733['model']=_[_0x2628('0x32')](db[_0x2628('0x4f')][_0x2628('0x30')]);_0x172733[_0x2628('0x33')]=_[_0x2628('0x32')](_0x2f4fa0[_0x2628('0x33')]);_0x172733[_0x2628('0x34')]=_[_0x2628('0x35')](_0x172733['model'],_0x172733[_0x2628('0x33')]);_0x15296d['attributes']=_[_0x2628('0x35')](_0x172733[_0x2628('0x31')],qs[_0x2628('0x36')](_0x2f4fa0['query'][_0x2628('0x36')]));_0x15296d['attributes']=_0x15296d[_0x2628('0x37')]['length']?_0x15296d[_0x2628('0x37')]:_0x172733[_0x2628('0x31')];_0x15296d[_0x2628('0x50')]=qs[_0x2628('0x3a')](_0x2f4fa0[_0x2628('0x33')][_0x2628('0x3a')]);_0x15296d[_0x2628('0x3b')]=qs[_0x2628('0x34')](_[_0x2628('0x3c')](_0x2f4fa0['query'],_0x172733[_0x2628('0x34')]));if(_0x2f4fa0[_0x2628('0x33')][_0x2628('0x3d')]){_0x15296d['where']=_[_0x2628('0x3e')](_0x15296d[_0x2628('0x3b')],{'$or':_[_0x2628('0x51')](_0x15296d['attributes'],function(_0x2750fb){var _0x337762={};_0x337762[_0x2750fb]={'$like':'%'+_0x2f4fa0[_0x2628('0x33')][_0x2628('0x3d')]+'%'};return _0x337762;})});}_0x15296d=_[_0x2628('0x3e')]({},_0x15296d,_0x2f4fa0[_0x2628('0x41')]);return _0x4c989a['getFields'](_0x15296d);}})[_0x2628('0x15')](function(_0x121f2e){if(_0x121f2e){_0x24d18a=_0x121f2e[_0x2628('0x38')];if(!_0x2f4fa0[_0x2628('0x33')][_0x2628('0x52')](_0x2628('0x39'))){_0x15296d[_0x2628('0x26')]=qs[_0x2628('0x26')](_0x2f4fa0[_0x2628('0x33')][_0x2628('0x26')]);_0x15296d['offset']=qs[_0x2628('0x25')](_0x2f4fa0['query'][_0x2628('0x25')]);}return _0x4c989a[_0x2628('0x4d')](_0x15296d);}})[_0x2628('0x15')](function(_0x581b0a){if(_0x581b0a){return _0x581b0a?{'count':_0x24d18a,'rows':_0x581b0a}:null;}})[_0x2628('0x15')](respondWithResult(_0x583394,null))[_0x2628('0x46')](handleError(_0x583394,null));};exports['getSubjects']=function(_0xa37a9b,_0x46e1a0,_0x247038){var _0x40237a={};var _0x2abfcb={};var _0x43da10;var _0x4887f8;return db[_0x2628('0x2f')][_0x2628('0x4e')]({'where':{'id':_0xa37a9b['params']['id']}})['then'](handleEntityNotFound(_0x46e1a0,null))['then'](function(_0x1a4e66){if(_0x1a4e66){_0x43da10=_0x1a4e66;_0x2abfcb['model']=_[_0x2628('0x32')](db['SalesforceField'][_0x2628('0x30')]);_0x2abfcb[_0x2628('0x33')]=_[_0x2628('0x32')](_0xa37a9b[_0x2628('0x33')]);_0x2abfcb['filters']=_[_0x2628('0x35')](_0x2abfcb['model'],_0x2abfcb[_0x2628('0x33')]);_0x40237a[_0x2628('0x37')]=_['intersection'](_0x2abfcb[_0x2628('0x31')],qs[_0x2628('0x36')](_0xa37a9b[_0x2628('0x33')][_0x2628('0x36')]));_0x40237a[_0x2628('0x37')]=_0x40237a['attributes'][_0x2628('0x38')]?_0x40237a[_0x2628('0x37')]:_0x2abfcb[_0x2628('0x31')];_0x40237a[_0x2628('0x50')]=qs[_0x2628('0x3a')](_0xa37a9b[_0x2628('0x33')][_0x2628('0x3a')]);_0x40237a[_0x2628('0x3b')]=qs[_0x2628('0x34')](_['pick'](_0xa37a9b[_0x2628('0x33')],_0x2abfcb[_0x2628('0x34')]));if(_0xa37a9b[_0x2628('0x33')][_0x2628('0x3d')]){_0x40237a[_0x2628('0x3b')]=_[_0x2628('0x3e')](_0x40237a[_0x2628('0x3b')],{'$or':_[_0x2628('0x51')](_0x40237a[_0x2628('0x37')],function(_0x107ddd){var _0x2e691b={};_0x2e691b[_0x107ddd]={'$like':'%'+_0xa37a9b[_0x2628('0x33')][_0x2628('0x3d')]+'%'};return _0x2e691b;})});}_0x40237a=_[_0x2628('0x3e')]({},_0x40237a,_0xa37a9b[_0x2628('0x41')]);return _0x43da10[_0x2628('0x53')](_0x40237a);}})['then'](function(_0x52717c){if(_0x52717c){_0x4887f8=_0x52717c[_0x2628('0x38')];if(!_0xa37a9b[_0x2628('0x33')][_0x2628('0x52')]('nolimit')){_0x40237a[_0x2628('0x26')]=qs[_0x2628('0x26')](_0xa37a9b[_0x2628('0x33')][_0x2628('0x26')]);_0x40237a[_0x2628('0x25')]=qs[_0x2628('0x25')](_0xa37a9b['query'][_0x2628('0x25')]);}return _0x43da10[_0x2628('0x53')](_0x40237a);}})[_0x2628('0x15')](function(_0x1d8dcc){if(_0x1d8dcc){return _0x1d8dcc?{'count':_0x4887f8,'rows':_0x1d8dcc}:null;}})['then'](respondWithResult(_0x46e1a0,null))[_0x2628('0x46')](handleError(_0x46e1a0,null));};exports[_0x2628('0x54')]=function(_0x45f3f1,_0x4a132c,_0x9ad4ca){var _0x300cd5={};var _0x56673e={};var _0xaf2ec0;var _0x5ba6d5;return db['SalesforceConfiguration'][_0x2628('0x4e')]({'where':{'id':_0x45f3f1[_0x2628('0x48')]['id']}})[_0x2628('0x15')](handleEntityNotFound(_0x4a132c,null))[_0x2628('0x15')](function(_0x5f40b8){if(_0x5f40b8){_0xaf2ec0=_0x5f40b8;_0x56673e[_0x2628('0x31')]=_['keys'](db[_0x2628('0x4f')][_0x2628('0x30')]);_0x56673e[_0x2628('0x33')]=_[_0x2628('0x32')](_0x45f3f1[_0x2628('0x33')]);_0x56673e[_0x2628('0x34')]=_['intersection'](_0x56673e[_0x2628('0x31')],_0x56673e[_0x2628('0x33')]);_0x300cd5['attributes']=_[_0x2628('0x35')](_0x56673e[_0x2628('0x31')],qs[_0x2628('0x36')](_0x45f3f1[_0x2628('0x33')]['fields']));_0x300cd5[_0x2628('0x37')]=_0x300cd5[_0x2628('0x37')][_0x2628('0x38')]?_0x300cd5['attributes']:_0x56673e[_0x2628('0x31')];_0x300cd5[_0x2628('0x50')]=qs['sort'](_0x45f3f1['query'][_0x2628('0x3a')]);_0x300cd5[_0x2628('0x3b')]=qs[_0x2628('0x34')](_[_0x2628('0x3c')](_0x45f3f1['query'],_0x56673e[_0x2628('0x34')]));if(_0x45f3f1[_0x2628('0x33')]['filter']){_0x300cd5['where']=_[_0x2628('0x3e')](_0x300cd5[_0x2628('0x3b')],{'$or':_[_0x2628('0x51')](_0x300cd5[_0x2628('0x37')],function(_0x452c89){var _0x3876af={};_0x3876af[_0x452c89]={'$like':'%'+_0x45f3f1[_0x2628('0x33')]['filter']+'%'};return _0x3876af;})});}_0x300cd5=_[_0x2628('0x3e')]({},_0x300cd5,_0x45f3f1[_0x2628('0x41')]);return _0xaf2ec0[_0x2628('0x54')](_0x300cd5);}})[_0x2628('0x15')](function(_0x571ed8){if(_0x571ed8){_0x5ba6d5=_0x571ed8['length'];if(!_0x45f3f1[_0x2628('0x33')][_0x2628('0x52')](_0x2628('0x39'))){_0x300cd5[_0x2628('0x26')]=qs[_0x2628('0x26')](_0x45f3f1[_0x2628('0x33')][_0x2628('0x26')]);_0x300cd5[_0x2628('0x25')]=qs[_0x2628('0x25')](_0x45f3f1[_0x2628('0x33')][_0x2628('0x25')]);}return _0xaf2ec0[_0x2628('0x54')](_0x300cd5);}})[_0x2628('0x15')](function(_0x3d6960){if(_0x3d6960){return _0x3d6960?{'count':_0x5ba6d5,'rows':_0x3d6960}:null;}})[_0x2628('0x15')](respondWithResult(_0x4a132c,null))[_0x2628('0x46')](handleError(_0x4a132c,null));};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js
index d961762..b2a5d5c 100644
--- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js
+++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe9c0=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','SalesforceConfiguration','int_salesforce_configurations','lodash','api'];(function(_0x39772f,_0x5605cb){var _0xc9edbf=function(_0x106a39){while(--_0x106a39){_0x39772f['push'](_0x39772f['shift']());}};_0xc9edbf(++_0x5605cb);}(_0xe9c0,0x142));var _0x0e9c=function(_0x1e1b18,_0x5d471b){_0x1e1b18=_0x1e1b18-0x0;var _0x3da8f2=_0xe9c0[_0x1e1b18];return _0x3da8f2;};'use strict';var _=require(_0x0e9c('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x0e9c('0x1'));var moment=require(_0x0e9c('0x2'));var BPromise=require(_0x0e9c('0x3'));var rp=require(_0x0e9c('0x4'));var fs=require('fs');var path=require(_0x0e9c('0x5'));var rimraf=require(_0x0e9c('0x6'));var config=require(_0x0e9c('0x7'));var attributes=require('./intSalesforceConfiguration.attributes');module[_0x0e9c('0x8')]=function(_0x3362e9,_0x5538e4){return _0x3362e9[_0x0e9c('0x9')](_0x0e9c('0xa'),attributes,{'tableName':_0x0e9c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2f54=['../../config/environment','./intSalesforceConfiguration.attributes','int_salesforce_configurations','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x58b398,_0xa599c1){var _0x3ffd7e=function(_0x4cf5dc){while(--_0x4cf5dc){_0x58b398['push'](_0x58b398['shift']());}};_0x3ffd7e(++_0xa599c1);}(_0x2f54,0x19a));var _0x42f5=function(_0x2f4e7a,_0x4c3f4e){_0x2f4e7a=_0x2f4e7a-0x0;var _0x3299a0=_0x2f54[_0x2f4e7a];return _0x3299a0;};'use strict';var _=require(_0x42f5('0x0'));var util=require(_0x42f5('0x1'));var logger=require(_0x42f5('0x2'))(_0x42f5('0x3'));var moment=require(_0x42f5('0x4'));var BPromise=require(_0x42f5('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x42f5('0x6'));var rimraf=require(_0x42f5('0x7'));var config=require(_0x42f5('0x8'));var attributes=require(_0x42f5('0x9'));module['exports']=function(_0x7a7abe,_0x4292ba){return _0x7a7abe['define']('SalesforceConfiguration',attributes,{'tableName':_0x42f5('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js
index ccfb243..8881854 100644
--- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js
+++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x326f=['info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x12da9e,_0x3a8477){var _0x5328e9=function(_0x849b32){while(--_0x849b32){_0x12da9e['push'](_0x12da9e['shift']());}};_0x5328e9(++_0x3a8477);}(_0x326f,0xd1));var _0xf326=function(_0x5e8073,_0xacaf91){_0x5e8073=_0x5e8073-0x0;var _0x40b1c5=_0x326f[_0x5e8073];return _0x40b1c5;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf326('0x1'));var rs=require(_0xf326('0x2'));var fs=require('fs');var Redis=require(_0xf326('0x3'));var db=require(_0xf326('0x4'))['db'];var utils=require(_0xf326('0x5'));var logger=require(_0xf326('0x6'))(_0xf326('0x7'));var config=require(_0xf326('0x8'));var jayson=require(_0xf326('0x9'));var client=jayson[_0xf326('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3c254d,_0x3851eb,_0x165f95){return new BPromise(function(_0x1e7b8a,_0x515bfa){return client['request'](_0x3c254d,_0x165f95)['then'](function(_0x3bacf2){logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));logger[_0xf326('0xe')]('SalesforceConfiguration,\x20%s,\x20%s,\x20%s',_0x3851eb,_0xf326('0xd'),JSON['stringify'](_0x3bacf2));if(_0x3bacf2[_0xf326('0xf')]){if(_0x3bacf2['error'][_0xf326('0x10')]===0x1f4){logger['error'](_0xf326('0xc'),_0x3851eb,_0x3bacf2[_0xf326('0xf')]['message']);return _0x515bfa(_0x3bacf2[_0xf326('0xf')][_0xf326('0x11')]);}logger[_0xf326('0xf')](_0xf326('0xc'),_0x3851eb,_0x3bacf2['error'][_0xf326('0x11')]);return _0x1e7b8a(_0x3bacf2['error']['message']);}else{logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));_0x1e7b8a(_0x3bacf2[_0xf326('0x12')][_0xf326('0x11')]);}})[_0xf326('0x13')](function(_0x34128e){logger[_0xf326('0xf')]('SalesforceConfiguration,\x20%s,\x20%s',_0x3851eb,_0x34128e);_0x515bfa(_0x34128e);});});}
\ No newline at end of file
+var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x45f1aa,_0x70defe){var _0x163ca8=function(_0x3d95e4){while(--_0x3d95e4){_0x45f1aa['push'](_0x45f1aa['shift']());}};_0x163ca8(++_0x70defe);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0xc4aa[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('SalesforceConfiguration,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});}
\ No newline at end of file
diff --git a/server/api/intSalesforceField/index.js b/server/api/intSalesforceField/index.js
index 6c0349f..99bfe4b 100644
--- a/server/api/intSalesforceField/index.js
+++ b/server/api/intSalesforceField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x967d=['express','Router','../../config/environment','./intSalesforceField.controller','get','index','/:id','isAuthenticated','show','post','create','update','destroy','exports','multer','util'];(function(_0x1f157e,_0x12d85c){var _0xda2c17=function(_0x24780d){while(--_0x24780d){_0x1f157e['push'](_0x1f157e['shift']());}};_0xda2c17(++_0x12d85c);}(_0x967d,0x11e));var _0xd967=function(_0x3b6fd3,_0x19f1eb){_0x3b6fd3=_0x3b6fd3-0x0;var _0x5eb9ae=_0x967d[_0x3b6fd3];return _0x5eb9ae;};'use strict';var multer=require(_0xd967('0x0'));var util=require(_0xd967('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xd967('0x2'));var router=express[_0xd967('0x3')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xd967('0x4'));var controller=require(_0xd967('0x5'));router[_0xd967('0x6')]('/',auth['isAuthenticated'](),controller[_0xd967('0x7')]);router[_0xd967('0x6')](_0xd967('0x8'),auth[_0xd967('0x9')](),controller[_0xd967('0xa')]);router[_0xd967('0xb')]('/',auth[_0xd967('0x9')](),controller[_0xd967('0xc')]);router['put'](_0xd967('0x8'),auth[_0xd967('0x9')](),controller[_0xd967('0xd')]);router['delete'](_0xd967('0x8'),auth['isAuthenticated'](),controller[_0xd967('0xe')]);module[_0xd967('0xf')]=router;
\ No newline at end of file
+var _0x15db=['destroy','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./intSalesforceField.controller','isAuthenticated','index','/:id','show','post','create','put','update','delete'];(function(_0xc8a598,_0x8ffd7c){var _0x2a6225=function(_0x5f2d46){while(--_0x5f2d46){_0xc8a598['push'](_0xc8a598['shift']());}};_0x2a6225(++_0x8ffd7c);}(_0x15db,0x111));var _0xb15d=function(_0x473203,_0x1ea637){_0x473203=_0x473203-0x0;var _0x45c971=_0x15db[_0x473203];return _0x45c971;};'use strict';var multer=require('multer');var util=require(_0xb15d('0x0'));var path=require('path');var timeout=require(_0xb15d('0x1'));var express=require(_0xb15d('0x2'));var router=express['Router']();var auth=require(_0xb15d('0x3'));var interaction=require(_0xb15d('0x4'));var config=require('../../config/environment');var controller=require(_0xb15d('0x5'));router['get']('/',auth[_0xb15d('0x6')](),controller[_0xb15d('0x7')]);router['get'](_0xb15d('0x8'),auth[_0xb15d('0x6')](),controller[_0xb15d('0x9')]);router[_0xb15d('0xa')]('/',auth[_0xb15d('0x6')](),controller[_0xb15d('0xb')]);router[_0xb15d('0xc')](_0xb15d('0x8'),auth[_0xb15d('0x6')](),controller[_0xb15d('0xd')]);router[_0xb15d('0xe')]('/:id',auth[_0xb15d('0x6')](),controller[_0xb15d('0xf')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.attributes.js b/server/api/intSalesforceField/intSalesforceField.attributes.js
index 0083f18..0680170 100644
--- a/server/api/intSalesforceField/intSalesforceField.attributes.js
+++ b/server/api/intSalesforceField/intSalesforceField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x109c=['exports','ENUM','string','variable','customVariable','STRING','sequelize'];(function(_0x493b70,_0x168e73){var _0x4c2355=function(_0x1e0247){while(--_0x1e0247){_0x493b70['push'](_0x493b70['shift']());}};_0x4c2355(++_0x168e73);}(_0x109c,0x1e9));var _0xc109=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x109c[_0x3ab51d];return _0x29a04e;};'use strict';var Sequelize=require(_0xc109('0x0'));module[_0xc109('0x1')]={'type':{'type':Sequelize[_0xc109('0x2')](_0xc109('0x3'),_0xc109('0x4'),_0xc109('0x5'),'keyValue'),'defaultValue':_0xc109('0x3')},'content':{'type':Sequelize[_0xc109('0x6')]},'key':{'type':Sequelize[_0xc109('0x6')]},'keyType':{'type':Sequelize[_0xc109('0x2')]('string',_0xc109('0x4'),_0xc109('0x5'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0xc109('0x6')]},'variableName':{'type':Sequelize[_0xc109('0x6')]}};
\ No newline at end of file
+var _0x2cfa=['STRING','sequelize','exports','string','ENUM','customVariable'];(function(_0x3ea124,_0x10d3c4){var _0x369320=function(_0x50eda9){while(--_0x50eda9){_0x3ea124['push'](_0x3ea124['shift']());}};_0x369320(++_0x10d3c4);}(_0x2cfa,0x67));var _0xa2cf=function(_0x55291a,_0x814018){_0x55291a=_0x55291a-0x0;var _0x3c870c=_0x2cfa[_0x55291a];return _0x3c870c;};'use strict';var Sequelize=require(_0xa2cf('0x0'));module[_0xa2cf('0x1')]={'type':{'type':Sequelize['ENUM'](_0xa2cf('0x2'),'variable','customVariable','keyValue'),'defaultValue':_0xa2cf('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xa2cf('0x3')](_0xa2cf('0x2'),'variable',_0xa2cf('0x4'))},'keyContent':{'type':Sequelize[_0xa2cf('0x5')]},'idField':{'type':Sequelize[_0xa2cf('0x5')]},'variableName':{'type':Sequelize[_0xa2cf('0x5')]}};
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.controller.js b/server/api/intSalesforceField/intSalesforceField.controller.js
index 8972949..d65ecf8 100644
--- a/server/api/intSalesforceField/intSalesforceField.controller.js
+++ b/server/api/intSalesforceField/intSalesforceField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6ca1=['then','destroy','error','stack','name','send','index','SalesforceField','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','map','key','VIRTUAL','field','merge','options','where','includeAll','findAll','rows','catch','show','params','include','find','create','body','update','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','set','apply','reject','save'];(function(_0x538959,_0x1c24e0){var _0x23ccec=function(_0xdc1667){while(--_0xdc1667){_0x538959['push'](_0x538959['shift']());}};_0x23ccec(++_0x1c24e0);}(_0x6ca1,0x108));var _0x16ca=function(_0x3cd746,_0x3a38f4){_0x3cd746=_0x3cd746-0x0;var _0x5d586d=_0x6ca1[_0x3cd746];return _0x5d586d;};'use strict';var pdf=require(_0x16ca('0x0'));var emlformat=require(_0x16ca('0x1'));var rimraf=require(_0x16ca('0x2'));var zipdir=require(_0x16ca('0x3'));var jsonpatch=require(_0x16ca('0x4'));var rp=require(_0x16ca('0x5'));var moment=require(_0x16ca('0x6'));var BPromise=require(_0x16ca('0x7'));var Mustache=require(_0x16ca('0x8'));var util=require(_0x16ca('0x9'));var path=require(_0x16ca('0xa'));var sox=require(_0x16ca('0xb'));var csv=require(_0x16ca('0xc'));var ejs=require(_0x16ca('0xd'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x16ca('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x16ca('0xf'));var toCsv=require(_0x16ca('0xc'));var querystring=require(_0x16ca('0x10'));var Papa=require(_0x16ca('0x11'));var Redis=require(_0x16ca('0x12'));var authService=require(_0x16ca('0x13'));var qs=require(_0x16ca('0x14'));var hardwareService=require(_0x16ca('0x15'));var logger=require(_0x16ca('0x16'))(_0x16ca('0x17'));var utils=require(_0x16ca('0x18'));var config=require(_0x16ca('0x19'));var db=require(_0x16ca('0x1a'))['db'];function respondWithStatusCode(_0x4b5787,_0x485933){_0x485933=_0x485933||0xcc;return function(_0x3ec003){if(_0x3ec003){return _0x4b5787[_0x16ca('0x1b')](_0x485933);}return _0x4b5787[_0x16ca('0x1c')](_0x485933)[_0x16ca('0x1d')]();};}function respondWithResult(_0x4a1052,_0x30799f){_0x30799f=_0x30799f||0xc8;return function(_0x3f6c4f){if(_0x3f6c4f){return _0x4a1052[_0x16ca('0x1c')](_0x30799f)['json'](_0x3f6c4f);}};}function respondWithFilteredResult(_0x5da517,_0x1b4bc8){return function(_0x2ee28d){if(_0x2ee28d){var _0x4c7c9b=_0x2ee28d['count'],_0x45ede2=_0x1b4bc8[_0x16ca('0x1e')],_0x45069a=_0x1b4bc8[_0x16ca('0x1e')]+_0x1b4bc8[_0x16ca('0x1f')],_0x3a1fcd;if(_0x45069a>=_0x4c7c9b){_0x45069a=_0x4c7c9b;_0x3a1fcd=0xc8;}else{_0x3a1fcd=0xce;}_0x5da517[_0x16ca('0x1c')](_0x3a1fcd);return _0x5da517[_0x16ca('0x20')]('Content-Range',_0x45ede2+'-'+_0x45069a+'/'+_0x4c7c9b)['json'](_0x2ee28d);}return null;};}function patchUpdates(_0x2b72be){return function(_0x4e3d5c){try{jsonpatch[_0x16ca('0x21')](_0x4e3d5c,_0x2b72be,!![]);}catch(_0x15c506){return BPromise[_0x16ca('0x22')](_0x15c506);}return _0x4e3d5c[_0x16ca('0x23')]();};}function saveUpdates(_0x3b977f,_0x4e14f7){return function(_0x468e76){if(_0x468e76){return _0x468e76['update'](_0x3b977f)[_0x16ca('0x24')](function(_0x102424){return _0x102424;});}return null;};}function removeEntity(_0x5b9e0e,_0x3ea999){return function(_0x587a94){if(_0x587a94){return _0x587a94[_0x16ca('0x25')]()[_0x16ca('0x24')](function(){_0x5b9e0e['status'](0xcc)[_0x16ca('0x1d')]();});}};}function handleEntityNotFound(_0x4e43ab,_0x4b4e02){return function(_0x4c2e8e){if(!_0x4c2e8e){_0x4e43ab['sendStatus'](0x194);}return _0x4c2e8e;};}function handleError(_0x1e1ea3,_0x18507d){_0x18507d=_0x18507d||0x1f4;return function(_0x706175){logger[_0x16ca('0x26')](_0x706175[_0x16ca('0x27')]);if(_0x706175[_0x16ca('0x28')]){delete _0x706175[_0x16ca('0x28')];}_0x1e1ea3[_0x16ca('0x1c')](_0x18507d)[_0x16ca('0x29')](_0x706175);};}exports[_0x16ca('0x2a')]=function(_0x297019,_0x202a0b){var _0x4a889e={},_0x5bafc1={},_0x292f4b={'count':0x0,'rows':[]};var _0x449c8a=db[_0x16ca('0x2b')]['rawAttributes'];_0x5bafc1[_0x16ca('0x2c')]=_[_0x16ca('0x2d')](_0x449c8a);_0x5bafc1[_0x16ca('0x2e')]=_[_0x16ca('0x2d')](_0x297019['query']);_0x5bafc1[_0x16ca('0x2f')]=_['intersection'](_0x5bafc1[_0x16ca('0x2c')],_0x5bafc1['query']);_0x4a889e['attributes']=_[_0x16ca('0x30')](_0x5bafc1[_0x16ca('0x2c')],qs[_0x16ca('0x31')](_0x297019[_0x16ca('0x2e')][_0x16ca('0x31')]));_0x4a889e[_0x16ca('0x32')]=_0x4a889e[_0x16ca('0x32')][_0x16ca('0x33')]?_0x4a889e['attributes']:_0x5bafc1[_0x16ca('0x2c')];if(!_0x297019[_0x16ca('0x2e')][_0x16ca('0x34')](_0x16ca('0x35'))){_0x4a889e[_0x16ca('0x1f')]=qs[_0x16ca('0x1f')](_0x297019[_0x16ca('0x2e')][_0x16ca('0x1f')]);_0x4a889e[_0x16ca('0x1e')]=qs[_0x16ca('0x1e')](_0x297019['query'][_0x16ca('0x1e')]);}_0x4a889e['order']=qs[_0x16ca('0x36')](_0x297019[_0x16ca('0x2e')]['sort']);_0x4a889e['where']=qs[_0x16ca('0x2f')](_[_0x16ca('0x37')](_0x297019['query'],_0x5bafc1[_0x16ca('0x2f')]));if(_0x297019[_0x16ca('0x2e')][_0x16ca('0x38')]){_0x4a889e['where']=_['merge'](_0x4a889e['where'],{'$or':_[_0x16ca('0x39')](_0x449c8a,function(_0x3f4cd2){if(_0x3f4cd2['type'][_0x16ca('0x3a')]!==_0x16ca('0x3b')){var _0x3c544f={};_0x3c544f[_0x3f4cd2[_0x16ca('0x3c')]]={'$like':'%'+_0x297019[_0x16ca('0x2e')][_0x16ca('0x38')]+'%'};return _0x3c544f;}})});}_0x4a889e=_[_0x16ca('0x3d')]({},_0x4a889e,_0x297019[_0x16ca('0x3e')]);var _0x262280={'where':_0x4a889e[_0x16ca('0x3f')]};return db[_0x16ca('0x2b')]['count'](_0x262280)['then'](function(_0x10b99a){_0x292f4b['count']=_0x10b99a;if(_0x297019[_0x16ca('0x2e')][_0x16ca('0x40')]){_0x4a889e['include']=[{'all':!![]}];}return db[_0x16ca('0x2b')][_0x16ca('0x41')](_0x4a889e);})['then'](function(_0x4ed855){_0x292f4b[_0x16ca('0x42')]=_0x4ed855;return _0x292f4b;})[_0x16ca('0x24')](respondWithFilteredResult(_0x202a0b,_0x4a889e))[_0x16ca('0x43')](handleError(_0x202a0b,null));};exports[_0x16ca('0x44')]=function(_0x145d77,_0x17878a){var _0x353a08={'raw':!![],'where':{'id':_0x145d77[_0x16ca('0x45')]['id']}},_0x47faeb={};_0x47faeb['model']=_[_0x16ca('0x2d')](db['SalesforceField']['rawAttributes']);_0x47faeb[_0x16ca('0x2e')]=_['keys'](_0x145d77[_0x16ca('0x2e')]);_0x47faeb[_0x16ca('0x2f')]=_[_0x16ca('0x30')](_0x47faeb[_0x16ca('0x2c')],_0x47faeb['query']);_0x353a08[_0x16ca('0x32')]=_[_0x16ca('0x30')](_0x47faeb[_0x16ca('0x2c')],qs['fields'](_0x145d77['query'][_0x16ca('0x31')]));_0x353a08[_0x16ca('0x32')]=_0x353a08[_0x16ca('0x32')]['length']?_0x353a08[_0x16ca('0x32')]:_0x47faeb['model'];if(_0x145d77['query']['includeAll']){_0x353a08[_0x16ca('0x46')]=[{'all':!![]}];}_0x353a08=_[_0x16ca('0x3d')]({},_0x353a08,_0x145d77[_0x16ca('0x3e')]);return db[_0x16ca('0x2b')][_0x16ca('0x47')](_0x353a08)['then'](handleEntityNotFound(_0x17878a,null))[_0x16ca('0x24')](respondWithResult(_0x17878a,null))[_0x16ca('0x43')](handleError(_0x17878a,null));};exports[_0x16ca('0x48')]=function(_0x1d52b3,_0x39979d){return db['SalesforceField'][_0x16ca('0x48')](_0x1d52b3[_0x16ca('0x49')],{})[_0x16ca('0x24')](respondWithResult(_0x39979d,0xc9))[_0x16ca('0x43')](handleError(_0x39979d,null));};exports[_0x16ca('0x4a')]=function(_0x43fad5,_0x52e652){if(_0x43fad5[_0x16ca('0x49')]['id']){delete _0x43fad5['body']['id'];}return db[_0x16ca('0x2b')][_0x16ca('0x47')]({'where':{'id':_0x43fad5['params']['id']}})[_0x16ca('0x24')](handleEntityNotFound(_0x52e652,null))[_0x16ca('0x24')](saveUpdates(_0x43fad5['body'],null))[_0x16ca('0x24')](respondWithResult(_0x52e652,null))[_0x16ca('0x43')](handleError(_0x52e652,null));};exports[_0x16ca('0x25')]=function(_0xa1b649,_0x472386){return db['SalesforceField'][_0x16ca('0x47')]({'where':{'id':_0xa1b649[_0x16ca('0x45')]['id']}})['then'](handleEntityNotFound(_0x472386,null))[_0x16ca('0x24')](removeEntity(_0x472386,null))['catch'](handleError(_0x472386,null));};
\ No newline at end of file
+var _0x4a5b=['limit','order','sort','where','filter','merge','map','type','key','VIRTUAL','field','include','findAll','rows','catch','show','length','includeAll','find','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','end','status','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','index','SalesforceField','rawAttributes','keys','query','filters','attributes','intersection','model','fields','hasOwnProperty'];(function(_0x416cdc,_0x213b87){var _0x1931ce=function(_0x1dc762){while(--_0x1dc762){_0x416cdc['push'](_0x416cdc['shift']());}};_0x1931ce(++_0x213b87);}(_0x4a5b,0xe8));var _0xb4a5=function(_0x3f2f77,_0x379635){_0x3f2f77=_0x3f2f77-0x0;var _0x8db194=_0x4a5b[_0x3f2f77];return _0x8db194;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xb4a5('0x0'));var rimraf=require(_0xb4a5('0x1'));var zipdir=require(_0xb4a5('0x2'));var jsonpatch=require(_0xb4a5('0x3'));var rp=require('request-promise');var moment=require(_0xb4a5('0x4'));var BPromise=require(_0xb4a5('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xb4a5('0x6'));var sox=require(_0xb4a5('0x7'));var csv=require(_0xb4a5('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xb4a5('0x9'));var squel=require(_0xb4a5('0xa'));var crypto=require('crypto');var jsforce=require(_0xb4a5('0xb'));var deskjs=require(_0xb4a5('0xc'));var toCsv=require(_0xb4a5('0x8'));var querystring=require(_0xb4a5('0xd'));var Papa=require('papaparse');var Redis=require(_0xb4a5('0xe'));var authService=require(_0xb4a5('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xb4a5('0x10'));var logger=require(_0xb4a5('0x11'))(_0xb4a5('0x12'));var utils=require(_0xb4a5('0x13'));var config=require(_0xb4a5('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x44bc73,_0x1ba826){_0x1ba826=_0x1ba826||0xcc;return function(_0x562a0a){if(_0x562a0a){return _0x44bc73[_0xb4a5('0x15')](_0x1ba826);}return _0x44bc73['status'](_0x1ba826)[_0xb4a5('0x16')]();};}function respondWithResult(_0x2bca95,_0xa9d026){_0xa9d026=_0xa9d026||0xc8;return function(_0x311187){if(_0x311187){return _0x2bca95[_0xb4a5('0x17')](_0xa9d026)[_0xb4a5('0x18')](_0x311187);}};}function respondWithFilteredResult(_0x33c12a,_0x3a1732){return function(_0x5172e3){if(_0x5172e3){var _0x4463d=_0x5172e3[_0xb4a5('0x19')],_0x249002=_0x3a1732[_0xb4a5('0x1a')],_0x32b9ed=_0x3a1732[_0xb4a5('0x1a')]+_0x3a1732['limit'],_0x364852;if(_0x32b9ed>=_0x4463d){_0x32b9ed=_0x4463d;_0x364852=0xc8;}else{_0x364852=0xce;}_0x33c12a[_0xb4a5('0x17')](_0x364852);return _0x33c12a[_0xb4a5('0x1b')](_0xb4a5('0x1c'),_0x249002+'-'+_0x32b9ed+'/'+_0x4463d)['json'](_0x5172e3);}return null;};}function patchUpdates(_0x4f8ad0){return function(_0x18871b){try{jsonpatch[_0xb4a5('0x1d')](_0x18871b,_0x4f8ad0,!![]);}catch(_0x580e01){return BPromise[_0xb4a5('0x1e')](_0x580e01);}return _0x18871b[_0xb4a5('0x1f')]();};}function saveUpdates(_0x404781,_0x48a964){return function(_0x137487){if(_0x137487){return _0x137487[_0xb4a5('0x20')](_0x404781)[_0xb4a5('0x21')](function(_0x23405f){return _0x23405f;});}return null;};}function removeEntity(_0x4c21bd,_0xf87631){return function(_0x501e8c){if(_0x501e8c){return _0x501e8c[_0xb4a5('0x22')]()['then'](function(){_0x4c21bd[_0xb4a5('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4c68f2,_0x4a9e56){return function(_0x5d231f){if(!_0x5d231f){_0x4c68f2[_0xb4a5('0x15')](0x194);}return _0x5d231f;};}function handleError(_0x31d647,_0x318f6a){_0x318f6a=_0x318f6a||0x1f4;return function(_0x36906d){logger['error'](_0x36906d[_0xb4a5('0x23')]);if(_0x36906d[_0xb4a5('0x24')]){delete _0x36906d[_0xb4a5('0x24')];}_0x31d647['status'](_0x318f6a)['send'](_0x36906d);};}exports[_0xb4a5('0x25')]=function(_0x5ca9dd,_0x54a62e){var _0x25878e={},_0x3c5cc1={},_0x36fca1={'count':0x0,'rows':[]};var _0x2d0e6d=db[_0xb4a5('0x26')][_0xb4a5('0x27')];_0x3c5cc1['model']=_[_0xb4a5('0x28')](_0x2d0e6d);_0x3c5cc1[_0xb4a5('0x29')]=_['keys'](_0x5ca9dd[_0xb4a5('0x29')]);_0x3c5cc1[_0xb4a5('0x2a')]=_['intersection'](_0x3c5cc1['model'],_0x3c5cc1[_0xb4a5('0x29')]);_0x25878e[_0xb4a5('0x2b')]=_[_0xb4a5('0x2c')](_0x3c5cc1[_0xb4a5('0x2d')],qs[_0xb4a5('0x2e')](_0x5ca9dd['query'][_0xb4a5('0x2e')]));_0x25878e[_0xb4a5('0x2b')]=_0x25878e[_0xb4a5('0x2b')]['length']?_0x25878e[_0xb4a5('0x2b')]:_0x3c5cc1[_0xb4a5('0x2d')];if(!_0x5ca9dd[_0xb4a5('0x29')][_0xb4a5('0x2f')]('nolimit')){_0x25878e[_0xb4a5('0x30')]=qs[_0xb4a5('0x30')](_0x5ca9dd[_0xb4a5('0x29')][_0xb4a5('0x30')]);_0x25878e[_0xb4a5('0x1a')]=qs['offset'](_0x5ca9dd[_0xb4a5('0x29')][_0xb4a5('0x1a')]);}_0x25878e[_0xb4a5('0x31')]=qs[_0xb4a5('0x32')](_0x5ca9dd[_0xb4a5('0x29')][_0xb4a5('0x32')]);_0x25878e[_0xb4a5('0x33')]=qs[_0xb4a5('0x2a')](_['pick'](_0x5ca9dd[_0xb4a5('0x29')],_0x3c5cc1[_0xb4a5('0x2a')]));if(_0x5ca9dd[_0xb4a5('0x29')][_0xb4a5('0x34')]){_0x25878e[_0xb4a5('0x33')]=_[_0xb4a5('0x35')](_0x25878e[_0xb4a5('0x33')],{'$or':_[_0xb4a5('0x36')](_0x2d0e6d,function(_0x7d8ec9){if(_0x7d8ec9[_0xb4a5('0x37')][_0xb4a5('0x38')]!==_0xb4a5('0x39')){var _0x1b0f8c={};_0x1b0f8c[_0x7d8ec9[_0xb4a5('0x3a')]]={'$like':'%'+_0x5ca9dd[_0xb4a5('0x29')][_0xb4a5('0x34')]+'%'};return _0x1b0f8c;}})});}_0x25878e=_[_0xb4a5('0x35')]({},_0x25878e,_0x5ca9dd['options']);var _0x3c0c46={'where':_0x25878e[_0xb4a5('0x33')]};return db[_0xb4a5('0x26')][_0xb4a5('0x19')](_0x3c0c46)['then'](function(_0x5d4d6a){_0x36fca1['count']=_0x5d4d6a;if(_0x5ca9dd[_0xb4a5('0x29')]['includeAll']){_0x25878e[_0xb4a5('0x3b')]=[{'all':!![]}];}return db[_0xb4a5('0x26')][_0xb4a5('0x3c')](_0x25878e);})[_0xb4a5('0x21')](function(_0x1a9c4f){_0x36fca1[_0xb4a5('0x3d')]=_0x1a9c4f;return _0x36fca1;})[_0xb4a5('0x21')](respondWithFilteredResult(_0x54a62e,_0x25878e))[_0xb4a5('0x3e')](handleError(_0x54a62e,null));};exports[_0xb4a5('0x3f')]=function(_0x160d77,_0x436054){var _0x14dbc9={'raw':!![],'where':{'id':_0x160d77['params']['id']}},_0x59d296={};_0x59d296['model']=_[_0xb4a5('0x28')](db['SalesforceField'][_0xb4a5('0x27')]);_0x59d296[_0xb4a5('0x29')]=_[_0xb4a5('0x28')](_0x160d77[_0xb4a5('0x29')]);_0x59d296[_0xb4a5('0x2a')]=_[_0xb4a5('0x2c')](_0x59d296[_0xb4a5('0x2d')],_0x59d296[_0xb4a5('0x29')]);_0x14dbc9[_0xb4a5('0x2b')]=_[_0xb4a5('0x2c')](_0x59d296[_0xb4a5('0x2d')],qs[_0xb4a5('0x2e')](_0x160d77['query'][_0xb4a5('0x2e')]));_0x14dbc9[_0xb4a5('0x2b')]=_0x14dbc9[_0xb4a5('0x2b')][_0xb4a5('0x40')]?_0x14dbc9['attributes']:_0x59d296[_0xb4a5('0x2d')];if(_0x160d77[_0xb4a5('0x29')][_0xb4a5('0x41')]){_0x14dbc9['include']=[{'all':!![]}];}_0x14dbc9=_[_0xb4a5('0x35')]({},_0x14dbc9,_0x160d77['options']);return db['SalesforceField'][_0xb4a5('0x42')](_0x14dbc9)[_0xb4a5('0x21')](handleEntityNotFound(_0x436054,null))[_0xb4a5('0x21')](respondWithResult(_0x436054,null))['catch'](handleError(_0x436054,null));};exports[_0xb4a5('0x43')]=function(_0x16f431,_0x1a8b4c){return db[_0xb4a5('0x26')][_0xb4a5('0x43')](_0x16f431[_0xb4a5('0x44')],{})[_0xb4a5('0x21')](respondWithResult(_0x1a8b4c,0xc9))[_0xb4a5('0x3e')](handleError(_0x1a8b4c,null));};exports[_0xb4a5('0x20')]=function(_0x3938ac,_0x27a3a7){if(_0x3938ac[_0xb4a5('0x44')]['id']){delete _0x3938ac['body']['id'];}return db[_0xb4a5('0x26')][_0xb4a5('0x42')]({'where':{'id':_0x3938ac[_0xb4a5('0x45')]['id']}})[_0xb4a5('0x21')](handleEntityNotFound(_0x27a3a7,null))[_0xb4a5('0x21')](saveUpdates(_0x3938ac['body'],null))[_0xb4a5('0x21')](respondWithResult(_0x27a3a7,null))[_0xb4a5('0x3e')](handleError(_0x27a3a7,null));};exports['destroy']=function(_0x440837,_0xe2331e){return db[_0xb4a5('0x26')][_0xb4a5('0x42')]({'where':{'id':_0x440837[_0xb4a5('0x45')]['id']}})[_0xb4a5('0x21')](handleEntityNotFound(_0xe2331e,null))[_0xb4a5('0x21')](removeEntity(_0xe2331e,null))[_0xb4a5('0x3e')](handleError(_0xe2331e,null));};
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.model.js b/server/api/intSalesforceField/intSalesforceField.model.js
index f5173e1..284e189 100644
--- a/server/api/intSalesforceField/intSalesforceField.model.js
+++ b/server/api/intSalesforceField/intSalesforceField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa5f4=['moment','bluebird','request-promise','rimraf','../../config/environment','./intSalesforceField.attributes','exports','define','SalesforceField','int_salesforce_fields','idField','FieldId','lodash','util'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0xa5f4,0x6e));var _0x4a5f=function(_0x2c1534,_0x358b8f){_0x2c1534=_0x2c1534-0x0;var _0x5137fd=_0xa5f4[_0x2c1534];return _0x5137fd;};'use strict';var _=require(_0x4a5f('0x0'));var util=require(_0x4a5f('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x4a5f('0x2'));var BPromise=require(_0x4a5f('0x3'));var rp=require(_0x4a5f('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4a5f('0x5'));var config=require(_0x4a5f('0x6'));var attributes=require(_0x4a5f('0x7'));module[_0x4a5f('0x8')]=function(_0x46a9e5,_0x49d271){return _0x46a9e5[_0x4a5f('0x9')](_0x4a5f('0xa'),attributes,{'tableName':_0x4a5f('0xb'),'paranoid':![],'indexes':[{'name':'salesforce_unique_index','fields':[_0x4a5f('0xc'),_0x4a5f('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa883=['api','moment','bluebird','request-promise','path','rimraf','./intSalesforceField.attributes','define','int_salesforce_fields','salesforce_unique_index','FieldId','lodash','util','../../config/logger'];(function(_0x501f83,_0x266ef4){var _0x5ba1d3=function(_0x131da6){while(--_0x131da6){_0x501f83['push'](_0x501f83['shift']());}};_0x5ba1d3(++_0x266ef4);}(_0xa883,0xa5));var _0x3a88=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa883[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3a88('0x0'));var util=require(_0x3a88('0x1'));var logger=require(_0x3a88('0x2'))(_0x3a88('0x3'));var moment=require(_0x3a88('0x4'));var BPromise=require(_0x3a88('0x5'));var rp=require(_0x3a88('0x6'));var fs=require('fs');var path=require(_0x3a88('0x7'));var rimraf=require(_0x3a88('0x8'));var config=require('../../config/environment');var attributes=require(_0x3a88('0x9'));module['exports']=function(_0x1067af,_0x1072a3){return _0x1067af[_0x3a88('0xa')]('SalesforceField',attributes,{'tableName':_0x3a88('0xb'),'paranoid':![],'indexes':[{'name':_0x3a88('0xc'),'fields':['idField',_0x3a88('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.rpc.js b/server/api/intSalesforceField/intSalesforceField.rpc.js
index d90ae6c..a2bb8ed 100644
--- a/server/api/intSalesforceField/intSalesforceField.rpc.js
+++ b/server/api/intSalesforceField/intSalesforceField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x928c=['../../config/utils','../../config/environment','jayson/promise','client','request','then','info','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','lodash','util','bluebird','randomstring'];(function(_0x42a2e6,_0x383ecd){var _0x3a52b8=function(_0x209043){while(--_0x209043){_0x42a2e6['push'](_0x42a2e6['shift']());}};_0x3a52b8(++_0x383ecd);}(_0x928c,0x164));var _0xc928=function(_0x18031d,_0x5287a4){_0x18031d=_0x18031d-0x0;var _0x18fb5a=_0x928c[_0x18031d];return _0x18fb5a;};'use strict';var _=require(_0xc928('0x0'));var util=require(_0xc928('0x1'));var moment=require('moment');var BPromise=require(_0xc928('0x2'));var rs=require(_0xc928('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xc928('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xc928('0x5'));var jayson=require(_0xc928('0x6'));var client=jayson[_0xc928('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1c6275,_0xe18c43,_0x52890f){return new BPromise(function(_0x5be136,_0x3bf758){return client[_0xc928('0x8')](_0x1c6275,_0x52890f)[_0xc928('0x9')](function(_0x228918){logger[_0xc928('0xa')](_0xc928('0xb'),_0xe18c43,_0xc928('0xc'));logger[_0xc928('0xd')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0xe18c43,_0xc928('0xc'),JSON['stringify'](_0x228918));if(_0x228918[_0xc928('0xe')]){if(_0x228918['error'][_0xc928('0xf')]===0x1f4){logger[_0xc928('0xe')](_0xc928('0xb'),_0xe18c43,_0x228918[_0xc928('0xe')]['message']);return _0x3bf758(_0x228918[_0xc928('0xe')][_0xc928('0x10')]);}logger[_0xc928('0xe')](_0xc928('0xb'),_0xe18c43,_0x228918[_0xc928('0xe')][_0xc928('0x10')]);return _0x5be136(_0x228918[_0xc928('0xe')][_0xc928('0x10')]);}else{logger[_0xc928('0xa')](_0xc928('0xb'),_0xe18c43,_0xc928('0xc'));_0x5be136(_0x228918['result'][_0xc928('0x10')]);}})[_0xc928('0x11')](function(_0x3a38b9){logger[_0xc928('0xe')](_0xc928('0xb'),_0xe18c43,_0x3a38b9);_0x3bf758(_0x3a38b9);});});}
\ No newline at end of file
+var _0xbb7d=['info','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x200ff2,_0x80b365){var _0x404f48=function(_0x4a9aa6){while(--_0x4a9aa6){_0x200ff2['push'](_0x200ff2['shift']());}};_0x404f48(++_0x80b365);}(_0xbb7d,0x106));var _0xdbb7=function(_0x130f88,_0x3a2db7){_0x130f88=_0x130f88-0x0;var _0x3cd815=_0xbb7d[_0x130f88];return _0x3cd815;};'use strict';var _=require(_0xdbb7('0x0'));var util=require('util');var moment=require(_0xdbb7('0x1'));var BPromise=require(_0xdbb7('0x2'));var rs=require(_0xdbb7('0x3'));var fs=require('fs');var Redis=require(_0xdbb7('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xdbb7('0x5'));var config=require(_0xdbb7('0x6'));var jayson=require(_0xdbb7('0x7'));var client=jayson[_0xdbb7('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x9086f7,_0x4e333f,_0x212227){return new BPromise(function(_0x125b44,_0x1755d6){return client[_0xdbb7('0x9')](_0x9086f7,_0x212227)[_0xdbb7('0xa')](function(_0x5997c6){logger[_0xdbb7('0xb')](_0xdbb7('0xc'),_0x4e333f,_0xdbb7('0xd'));logger[_0xdbb7('0xe')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0x4e333f,_0xdbb7('0xd'),JSON[_0xdbb7('0xf')](_0x5997c6));if(_0x5997c6[_0xdbb7('0x10')]){if(_0x5997c6['error'][_0xdbb7('0x11')]===0x1f4){logger['error'](_0xdbb7('0xc'),_0x4e333f,_0x5997c6['error'][_0xdbb7('0x12')]);return _0x1755d6(_0x5997c6[_0xdbb7('0x10')][_0xdbb7('0x12')]);}logger['error'](_0xdbb7('0xc'),_0x4e333f,_0x5997c6[_0xdbb7('0x10')][_0xdbb7('0x12')]);return _0x125b44(_0x5997c6[_0xdbb7('0x10')][_0xdbb7('0x12')]);}else{logger[_0xdbb7('0xb')]('SalesforceField,\x20%s,\x20%s',_0x4e333f,_0xdbb7('0xd'));_0x125b44(_0x5997c6[_0xdbb7('0x13')][_0xdbb7('0x12')]);}})[_0xdbb7('0x14')](function(_0x56805c){logger['error'](_0xdbb7('0xc'),_0x4e333f,_0x56805c);_0x1755d6(_0x56805c);});});}
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/index.js b/server/api/intServicenowAccount/index.js
index 414af1d..4a7b28d 100644
--- a/server/api/intServicenowAccount/index.js
+++ b/server/api/intServicenowAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e5d=['../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','getConfigurations','/:id/fields','create','post','/:id/configurations','addConfiguration','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x360d7f,_0x4ee632){var _0x31d115=function(_0x4590ea){while(--_0x4590ea){_0x360d7f['push'](_0x360d7f['shift']());}};_0x31d115(++_0x4ee632);}(_0x9e5d,0x126));var _0xd9e5=function(_0x100682,_0x11afec){_0x100682=_0x100682-0x0;var _0xcb6e87=_0x9e5d[_0x100682];return _0xcb6e87;};'use strict';var multer=require(_0xd9e5('0x0'));var util=require('util');var path=require(_0xd9e5('0x1'));var timeout=require(_0xd9e5('0x2'));var express=require(_0xd9e5('0x3'));var router=express[_0xd9e5('0x4')]();var auth=require(_0xd9e5('0x5'));var interaction=require(_0xd9e5('0x6'));var config=require(_0xd9e5('0x7'));var controller=require('./intServicenowAccount.controller');router[_0xd9e5('0x8')]('/',auth[_0xd9e5('0x9')](),controller['index']);router[_0xd9e5('0x8')](_0xd9e5('0xa'),auth[_0xd9e5('0x9')](),controller['show']);router['get']('/:id/configurations',auth[_0xd9e5('0x9')](),controller[_0xd9e5('0xb')]);router[_0xd9e5('0x8')](_0xd9e5('0xc'),auth['isAuthenticated'](),controller['getFields']);router['post']('/',auth[_0xd9e5('0x9')](),controller[_0xd9e5('0xd')]);router[_0xd9e5('0xe')](_0xd9e5('0xf'),auth[_0xd9e5('0x9')](),controller[_0xd9e5('0x10')]);router['put'](_0xd9e5('0xa'),auth['isAuthenticated'](),controller['update']);router[_0xd9e5('0x11')](_0xd9e5('0xa'),auth[_0xd9e5('0x9')](),controller[_0xd9e5('0x12')]);module[_0xd9e5('0x13')]=router;
\ No newline at end of file
+var _0xb6d7=['get','isAuthenticated','index','/:id','/:id/configurations','/:id/fields','getFields','create','post','addConfiguration','put','delete','destroy','multer','path','express','Router','../../components/auth/service','../../config/environment'];(function(_0x4b54fb,_0x2150e4){var _0x375eb4=function(_0x461679){while(--_0x461679){_0x4b54fb['push'](_0x4b54fb['shift']());}};_0x375eb4(++_0x2150e4);}(_0xb6d7,0x176));var _0x7b6d=function(_0x294827,_0x1d97fe){_0x294827=_0x294827-0x0;var _0x1f9671=_0xb6d7[_0x294827];return _0x1f9671;};'use strict';var multer=require(_0x7b6d('0x0'));var util=require('util');var path=require(_0x7b6d('0x1'));var timeout=require('connect-timeout');var express=require(_0x7b6d('0x2'));var router=express[_0x7b6d('0x3')]();var auth=require(_0x7b6d('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x7b6d('0x5'));var controller=require('./intServicenowAccount.controller');router[_0x7b6d('0x6')]('/',auth[_0x7b6d('0x7')](),controller[_0x7b6d('0x8')]);router[_0x7b6d('0x6')](_0x7b6d('0x9'),auth[_0x7b6d('0x7')](),controller['show']);router['get'](_0x7b6d('0xa'),auth[_0x7b6d('0x7')](),controller['getConfigurations']);router[_0x7b6d('0x6')](_0x7b6d('0xb'),auth[_0x7b6d('0x7')](),controller[_0x7b6d('0xc')]);router['post']('/',auth[_0x7b6d('0x7')](),controller[_0x7b6d('0xd')]);router[_0x7b6d('0xe')](_0x7b6d('0xa'),auth['isAuthenticated'](),controller[_0x7b6d('0xf')]);router[_0x7b6d('0x10')]('/:id',auth[_0x7b6d('0x7')](),controller['update']);router[_0x7b6d('0x11')](_0x7b6d('0x9'),auth[_0x7b6d('0x7')](),controller[_0x7b6d('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.attributes.js b/server/api/intServicenowAccount/intServicenowAccount.attributes.js
index 47bdabd..c893ace 100644
--- a/server/api/intServicenowAccount/intServicenowAccount.attributes.js
+++ b/server/api/intServicenowAccount/intServicenowAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb58b=['STRING','username','exports'];(function(_0x155935,_0x46f524){var _0x44c310=function(_0xeb5701){while(--_0xeb5701){_0x155935['push'](_0x155935['shift']());}};_0x44c310(++_0x46f524);}(_0xb58b,0x1f1));var _0xbb58=function(_0x15a0fd,_0x16d0ce){_0x15a0fd=_0x15a0fd-0x0;var _0x2da2cc=_0xb58b[_0x15a0fd];return _0x2da2cc;};'use strict';var Sequelize=require('sequelize');module[_0xbb58('0x0')]={'name':{'type':Sequelize[_0xbb58('0x1')]},'description':{'type':Sequelize[_0xbb58('0x1')]},'username':{'type':Sequelize['STRING'],'unique':_0xbb58('0x2')},'password':{'type':Sequelize[_0xbb58('0x1')]},'email':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xbb58('0x1')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0xbb58('0x1')]}};
\ No newline at end of file
+var _0x4483=['exports','STRING','username','sequelize'];(function(_0x2b82d5,_0x386039){var _0x3b4225=function(_0x31356d){while(--_0x31356d){_0x2b82d5['push'](_0x2b82d5['shift']());}};_0x3b4225(++_0x386039);}(_0x4483,0x1a3));var _0x3448=function(_0x41a98c,_0x497640){_0x41a98c=_0x41a98c-0x0;var _0x5dfc8e=_0x4483[_0x41a98c];return _0x5dfc8e;};'use strict';var Sequelize=require(_0x3448('0x0'));module[_0x3448('0x1')]={'name':{'type':Sequelize[_0x3448('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x3448('0x2')],'unique':_0x3448('0x3')},'password':{'type':Sequelize[_0x3448('0x2')]},'email':{'type':Sequelize[_0x3448('0x2')]},'remoteUri':{'type':Sequelize[_0x3448('0x2')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0x3448('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.controller.js b/server/api/intServicenowAccount/intServicenowAccount.controller.js
index f217e12..84f6907 100644
--- a/server/api/intServicenowAccount/intServicenowAccount.controller.js
+++ b/server/api/intServicenowAccount/intServicenowAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e1f=['reopen_count','sys_tags','escalation','upon_approval','correlation_id','category','username','email','remoteUri','serverUrl','slice','substring','format','%s/api/now/table/','password','GET','incident?sysparm_display_value=all','log','incident\x20table\x20objects','assign','includes','forEach','internalType','push','all','TCL:\x20_object','remove','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','label','concat','ServiceNow\x20error:\x20','statusCode','boolean','True','true','False','false','sys_choice?sysparm_query=name=incident^element=','inactive','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','json','count','offset','limit','Content-Range','apply','reject','update','then','destroy','end','sendStatus','stack','name','send','index','ServicenowAccount','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','nolimit','sort','where','filter','merge','map','type','key','field','options','include','findAll','show','params','includeAll','find','create','body','findOne','order','pick','getConfigurations','hasOwnProperty','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ServicenowConfiguration','ServicenowField','made_sla','knowledge','subcategory','close_code','notify','incident_state','severity','parent','caused_by','watch_list','upon_reject','sys_updated_on','approval_history','number','resolved_by','sys_updated_by','user_input','sys_created_on','sys_domain','calendar_stc','closed_at','delivery_plan','impact','active','priority','sys_domain_path','rfc','time_worked','business_duration','group_list','work_end','resolved_at','approval_set','work_notes','short_description','correlation_display','delivery_task','work_start','additional_assignee_list','description','calendar_duration','sys_class_name','close_notes','closed_by','parent_incident','sys_id','contact_type','urgency','company','assigned_to','sla_due','approval','comments_and_work_notes','sys_mod_count'];(function(_0x2584bc,_0x35d9f5){var _0x405f2c=function(_0x4a1d1e){while(--_0x4a1d1e){_0x2584bc['push'](_0x2584bc['shift']());}};_0x405f2c(++_0x35d9f5);}(_0x3e1f,0xe5));var _0xf3e1=function(_0x114bdf,_0x119ada){_0x114bdf=_0x114bdf-0x0;var _0x5658f6=_0x3e1f[_0x114bdf];return _0x5658f6;};'use strict';var pdf=require(_0xf3e1('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xf3e1('0x1'));var zipdir=require(_0xf3e1('0x2'));var jsonpatch=require(_0xf3e1('0x3'));var rp=require(_0xf3e1('0x4'));var moment=require(_0xf3e1('0x5'));var BPromise=require(_0xf3e1('0x6'));var Mustache=require(_0xf3e1('0x7'));var util=require('util');var path=require('path');var sox=require(_0xf3e1('0x8'));var csv=require(_0xf3e1('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xf3e1('0xa'));var crypto=require(_0xf3e1('0xb'));var jsforce=require(_0xf3e1('0xc'));var deskjs=require(_0xf3e1('0xd'));var toCsv=require('to-csv');var querystring=require(_0xf3e1('0xe'));var Papa=require(_0xf3e1('0xf'));var Redis=require(_0xf3e1('0x10'));var authService=require(_0xf3e1('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xf3e1('0x12'));var logger=require('../../config/logger')(_0xf3e1('0x13'));var utils=require(_0xf3e1('0x14'));var config=require('../../config/environment');var db=require(_0xf3e1('0x15'))['db'];var integrations=require(_0xf3e1('0x16'));var jayson=require(_0xf3e1('0x17'));var client=jayson[_0xf3e1('0x18')][_0xf3e1('0x19')]({'port':0x232a});function checkPasswordPattern(_0xee3d9e,_0x123a4b,_0x412aa9){if(_0x412aa9){var _0x12d006=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x12d006[_0xf3e1('0x1a')](_0x123a4b)){return _0xee3d9e;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0xee3d9e;}}function respondWithRpcPromise(_0x33b181,_0x248d98,_0x413e30,_0x17dea2){return new BPromise(function(_0x26f1ff,_0x568448){var _0x4d727d=_0x17dea2||client;return _0x4d727d['request'](_0x33b181,_0x413e30)['then'](function(_0x35f1db){logger[_0xf3e1('0x1b')](_0xf3e1('0x1c'),_0x248d98,_0xf3e1('0x1d'));logger[_0xf3e1('0x1e')](_0xf3e1('0x1f'),_0x248d98,'request\x20sent',JSON[_0xf3e1('0x20')](_0x35f1db));if(_0x35f1db[_0xf3e1('0x21')]){if(_0x35f1db[_0xf3e1('0x21')][_0xf3e1('0x22')]===0x1f4){logger[_0xf3e1('0x21')]('ServicenowAccount,\x20%s,\x20%s',_0x248d98,_0x35f1db[_0xf3e1('0x21')][_0xf3e1('0x23')]);return _0x568448(_0x35f1db[_0xf3e1('0x21')]['message']);}logger['error'](_0xf3e1('0x1c'),_0x248d98,_0x35f1db[_0xf3e1('0x21')][_0xf3e1('0x23')]);return _0x26f1ff(_0x35f1db['error'][_0xf3e1('0x23')]);}else{logger[_0xf3e1('0x1b')](_0xf3e1('0x1c'),_0x248d98,_0xf3e1('0x1d'));_0x26f1ff(_0x35f1db[_0xf3e1('0x24')]['message']);}})[_0xf3e1('0x25')](function(_0x568a82){logger['error'](_0xf3e1('0x1c'),_0x248d98,_0x568a82);_0x568448(_0x568a82);});});}function respondWithStatusCode(_0x5ebce5,_0x45844a){_0x45844a=_0x45844a||0xcc;return function(_0x479caa){if(_0x479caa){return _0x5ebce5['sendStatus'](_0x45844a);}return _0x5ebce5['status'](_0x45844a)['end']();};}function respondWithResult(_0x3c6a98,_0x4e6089){_0x4e6089=_0x4e6089||0xc8;return function(_0x18a52a){if(_0x18a52a){return _0x3c6a98[_0xf3e1('0x26')](_0x4e6089)[_0xf3e1('0x27')](_0x18a52a);}};}function respondWithFilteredResult(_0x416856,_0x476630){return function(_0x501d82){if(_0x501d82){var _0x43683c=_0x501d82[_0xf3e1('0x28')],_0x112751=_0x476630[_0xf3e1('0x29')],_0x5e0b17=_0x476630[_0xf3e1('0x29')]+_0x476630[_0xf3e1('0x2a')],_0x4c01aa;if(_0x5e0b17>=_0x43683c){_0x5e0b17=_0x43683c;_0x4c01aa=0xc8;}else{_0x4c01aa=0xce;}_0x416856[_0xf3e1('0x26')](_0x4c01aa);return _0x416856['set'](_0xf3e1('0x2b'),_0x112751+'-'+_0x5e0b17+'/'+_0x43683c)['json'](_0x501d82);}return null;};}function patchUpdates(_0x562149){return function(_0x125510){try{jsonpatch[_0xf3e1('0x2c')](_0x125510,_0x562149,!![]);}catch(_0x252711){return BPromise[_0xf3e1('0x2d')](_0x252711);}return _0x125510['save']();};}function saveUpdates(_0x248c49,_0x9c431b){return function(_0x35412b){if(_0x35412b){return _0x35412b[_0xf3e1('0x2e')](_0x248c49)[_0xf3e1('0x2f')](function(_0x2ff679){return _0x2ff679;});}return null;};}function removeEntity(_0x1b9684,_0x2e5256){return function(_0x254c4c){if(_0x254c4c){return _0x254c4c[_0xf3e1('0x30')]()[_0xf3e1('0x2f')](function(){_0x1b9684[_0xf3e1('0x26')](0xcc)[_0xf3e1('0x31')]();});}};}function handleEntityNotFound(_0x54d811,_0x85ba38){return function(_0x413037){if(!_0x413037){_0x54d811[_0xf3e1('0x32')](0x194);}return _0x413037;};}function handleError(_0xd5faf5,_0x402ab5){_0x402ab5=_0x402ab5||0x1f4;return function(_0x2ab177){logger[_0xf3e1('0x21')](_0x2ab177[_0xf3e1('0x33')]);if(_0x2ab177[_0xf3e1('0x34')]){delete _0x2ab177[_0xf3e1('0x34')];}_0xd5faf5['status'](_0x402ab5)[_0xf3e1('0x35')](_0x2ab177);};}exports[_0xf3e1('0x36')]=function(_0x89d766,_0x8392ce){var _0x3d50bf={},_0x3afd6e={},_0x3086dc={'count':0x0,'rows':[]};var _0x480761=db[_0xf3e1('0x37')][_0xf3e1('0x38')];_0x3afd6e[_0xf3e1('0x39')]=_['keys'](_0x480761);_0x3afd6e['query']=_[_0xf3e1('0x3a')](_0x89d766[_0xf3e1('0x3b')]);_0x3afd6e[_0xf3e1('0x3c')]=_[_0xf3e1('0x3d')](_0x3afd6e[_0xf3e1('0x39')],_0x3afd6e[_0xf3e1('0x3b')]);_0x3d50bf[_0xf3e1('0x3e')]=_[_0xf3e1('0x3d')](_0x3afd6e['model'],qs[_0xf3e1('0x3f')](_0x89d766['query'][_0xf3e1('0x3f')]));_0x3d50bf[_0xf3e1('0x3e')]=_0x3d50bf[_0xf3e1('0x3e')][_0xf3e1('0x40')]?_0x3d50bf[_0xf3e1('0x3e')]:_0x3afd6e['model'];if(!_0x89d766[_0xf3e1('0x3b')]['hasOwnProperty'](_0xf3e1('0x41'))){_0x3d50bf['limit']=qs[_0xf3e1('0x2a')](_0x89d766[_0xf3e1('0x3b')]['limit']);_0x3d50bf[_0xf3e1('0x29')]=qs['offset'](_0x89d766[_0xf3e1('0x3b')][_0xf3e1('0x29')]);}_0x3d50bf['order']=qs[_0xf3e1('0x42')](_0x89d766['query'][_0xf3e1('0x42')]);_0x3d50bf[_0xf3e1('0x43')]=qs[_0xf3e1('0x3c')](_['pick'](_0x89d766['query'],_0x3afd6e[_0xf3e1('0x3c')]));if(_0x89d766[_0xf3e1('0x3b')][_0xf3e1('0x44')]){_0x3d50bf[_0xf3e1('0x43')]=_[_0xf3e1('0x45')](_0x3d50bf['where'],{'$or':_[_0xf3e1('0x46')](_0x480761,function(_0x307091){if(_0x307091[_0xf3e1('0x47')][_0xf3e1('0x48')]!=='VIRTUAL'){var _0x47a56b={};_0x47a56b[_0x307091[_0xf3e1('0x49')]]={'$like':'%'+_0x89d766[_0xf3e1('0x3b')][_0xf3e1('0x44')]+'%'};return _0x47a56b;}})});}_0x3d50bf=_[_0xf3e1('0x45')]({},_0x3d50bf,_0x89d766[_0xf3e1('0x4a')]);var _0x3b4329={'where':_0x3d50bf[_0xf3e1('0x43')]};return db[_0xf3e1('0x37')][_0xf3e1('0x28')](_0x3b4329)[_0xf3e1('0x2f')](function(_0x3f5c8e){_0x3086dc[_0xf3e1('0x28')]=_0x3f5c8e;if(_0x89d766[_0xf3e1('0x3b')]['includeAll']){_0x3d50bf[_0xf3e1('0x4b')]=[{'all':!![]}];}return db[_0xf3e1('0x37')][_0xf3e1('0x4c')](_0x3d50bf);})[_0xf3e1('0x2f')](function(_0x42a0d3){_0x3086dc['rows']=_0x42a0d3;return _0x3086dc;})[_0xf3e1('0x2f')](respondWithFilteredResult(_0x8392ce,_0x3d50bf))[_0xf3e1('0x25')](handleError(_0x8392ce,null));};exports[_0xf3e1('0x4d')]=function(_0x5f0884,_0x2a0c40){var _0x30fffc={'raw':![],'where':{'id':_0x5f0884[_0xf3e1('0x4e')]['id']}},_0x20ef66={};_0x20ef66[_0xf3e1('0x39')]=_['keys'](db[_0xf3e1('0x37')][_0xf3e1('0x38')]);_0x20ef66[_0xf3e1('0x3b')]=_['keys'](_0x5f0884[_0xf3e1('0x3b')]);_0x20ef66[_0xf3e1('0x3c')]=_[_0xf3e1('0x3d')](_0x20ef66[_0xf3e1('0x39')],_0x20ef66[_0xf3e1('0x3b')]);_0x30fffc[_0xf3e1('0x3e')]=_['intersection'](_0x20ef66[_0xf3e1('0x39')],qs['fields'](_0x5f0884['query'][_0xf3e1('0x3f')]));_0x30fffc['attributes']=_0x30fffc[_0xf3e1('0x3e')][_0xf3e1('0x40')]?_0x30fffc[_0xf3e1('0x3e')]:_0x20ef66[_0xf3e1('0x39')];if(_0x5f0884['query'][_0xf3e1('0x4f')]){_0x30fffc[_0xf3e1('0x4b')]=[{'all':!![]}];}_0x30fffc=_[_0xf3e1('0x45')]({},_0x30fffc,_0x5f0884[_0xf3e1('0x4a')]);return db[_0xf3e1('0x37')][_0xf3e1('0x50')](_0x30fffc)['then'](handleEntityNotFound(_0x2a0c40,null))[_0xf3e1('0x2f')](respondWithResult(_0x2a0c40,null))[_0xf3e1('0x25')](handleError(_0x2a0c40,null));};exports['create']=function(_0x35c734,_0x16e64c){return db[_0xf3e1('0x37')][_0xf3e1('0x51')](_0x35c734[_0xf3e1('0x52')],{})[_0xf3e1('0x2f')](respondWithResult(_0x16e64c,0xc9))['catch'](handleError(_0x16e64c,null));};exports[_0xf3e1('0x2e')]=function(_0x10c885,_0x40b720){if(_0x10c885[_0xf3e1('0x52')]['id']){delete _0x10c885[_0xf3e1('0x52')]['id'];}return db[_0xf3e1('0x37')][_0xf3e1('0x50')]({'where':{'id':_0x10c885[_0xf3e1('0x4e')]['id']}})[_0xf3e1('0x2f')](handleEntityNotFound(_0x40b720,null))[_0xf3e1('0x2f')](saveUpdates(_0x10c885[_0xf3e1('0x52')],null))[_0xf3e1('0x2f')](respondWithResult(_0x40b720,null))[_0xf3e1('0x25')](handleError(_0x40b720,null));};exports['destroy']=function(_0x252a99,_0x17854f){return db[_0xf3e1('0x37')][_0xf3e1('0x50')]({'where':{'id':_0x252a99['params']['id']}})['then'](handleEntityNotFound(_0x17854f,null))[_0xf3e1('0x2f')](removeEntity(_0x17854f,null))[_0xf3e1('0x25')](handleError(_0x17854f,null));};exports['getConfigurations']=function(_0x539df5,_0x369a25,_0xa5ea1c){var _0xf02ee0={};var _0x39495c={};var _0x18dbd2;var _0x337182;return db[_0xf3e1('0x37')][_0xf3e1('0x53')]({'where':{'id':_0x539df5[_0xf3e1('0x4e')]['id']}})[_0xf3e1('0x2f')](handleEntityNotFound(_0x369a25,null))[_0xf3e1('0x2f')](function(_0x3e7b25){if(_0x3e7b25){_0x18dbd2=_0x3e7b25;_0x39495c[_0xf3e1('0x39')]=_[_0xf3e1('0x3a')](db['ServicenowConfiguration']['rawAttributes']);_0x39495c[_0xf3e1('0x3b')]=_[_0xf3e1('0x3a')](_0x539df5['query']);_0x39495c[_0xf3e1('0x3c')]=_[_0xf3e1('0x3d')](_0x39495c[_0xf3e1('0x39')],_0x39495c[_0xf3e1('0x3b')]);_0xf02ee0[_0xf3e1('0x3e')]=_[_0xf3e1('0x3d')](_0x39495c[_0xf3e1('0x39')],qs[_0xf3e1('0x3f')](_0x539df5[_0xf3e1('0x3b')][_0xf3e1('0x3f')]));_0xf02ee0[_0xf3e1('0x3e')]=_0xf02ee0[_0xf3e1('0x3e')][_0xf3e1('0x40')]?_0xf02ee0[_0xf3e1('0x3e')]:_0x39495c[_0xf3e1('0x39')];_0xf02ee0[_0xf3e1('0x54')]=qs[_0xf3e1('0x42')](_0x539df5[_0xf3e1('0x3b')][_0xf3e1('0x42')]);_0xf02ee0[_0xf3e1('0x43')]=qs[_0xf3e1('0x3c')](_[_0xf3e1('0x55')](_0x539df5[_0xf3e1('0x3b')],_0x39495c[_0xf3e1('0x3c')]));if(_0x539df5[_0xf3e1('0x3b')][_0xf3e1('0x44')]){_0xf02ee0[_0xf3e1('0x43')]=_[_0xf3e1('0x45')](_0xf02ee0[_0xf3e1('0x43')],{'$or':_[_0xf3e1('0x46')](_0xf02ee0[_0xf3e1('0x3e')],function(_0x4eeaf6){var _0x2da3e0={};_0x2da3e0[_0x4eeaf6]={'$like':'%'+_0x539df5['query']['filter']+'%'};return _0x2da3e0;})});}_0xf02ee0=_[_0xf3e1('0x45')]({},_0xf02ee0,_0x539df5[_0xf3e1('0x4a')]);return _0x18dbd2[_0xf3e1('0x56')](_0xf02ee0);}})[_0xf3e1('0x2f')](function(_0x22564b){if(_0x22564b){_0x337182=_0x22564b[_0xf3e1('0x40')];if(!_0x539df5['query'][_0xf3e1('0x57')]('nolimit')){_0xf02ee0[_0xf3e1('0x2a')]=qs['limit'](_0x539df5[_0xf3e1('0x3b')][_0xf3e1('0x2a')]);_0xf02ee0[_0xf3e1('0x29')]=qs[_0xf3e1('0x29')](_0x539df5[_0xf3e1('0x3b')][_0xf3e1('0x29')]);}return _0x18dbd2[_0xf3e1('0x56')](_0xf02ee0);}})['then'](function(_0x5858cf){if(_0x5858cf){return _0x5858cf?{'count':_0x337182,'rows':_0x5858cf}:null;}})[_0xf3e1('0x2f')](respondWithResult(_0x369a25,null))['catch'](handleError(_0x369a25,null));};exports[_0xf3e1('0x58')]=function(_0x17c71b,_0x3919d7,_0x29b0de){if(_0x17c71b[_0xf3e1('0x52')]['id']){delete _0x17c71b[_0xf3e1('0x52')]['id'];}return db[_0xf3e1('0x37')]['findOne']({'where':{'id':_0x17c71b[_0xf3e1('0x4e')]['id']}})[_0xf3e1('0x2f')](handleEntityNotFound(_0x3919d7,null))[_0xf3e1('0x2f')](function(_0x21324a){if(_0x21324a){_0x17c71b[_0xf3e1('0x52')][_0xf3e1('0x59')]=_0x21324a['id'];_0x17c71b[_0xf3e1('0x52')][_0xf3e1('0x5a')]=integrations[_0xf3e1('0x5b')](_0x17c71b[_0xf3e1('0x52')][_0xf3e1('0x5c')],_0x17c71b[_0xf3e1('0x52')][_0xf3e1('0x47')]);_0x17c71b[_0xf3e1('0x52')][_0xf3e1('0x5d')]=integrations[_0xf3e1('0x5e')](_0x17c71b['body'][_0xf3e1('0x5c')],_0x17c71b[_0xf3e1('0x52')][_0xf3e1('0x47')]);return db[_0xf3e1('0x5f')]['create'](_0x17c71b[_0xf3e1('0x52')],{'include':[{'model':db[_0xf3e1('0x60')],'as':_0xf3e1('0x5a')},{'model':db['ServicenowField'],'as':_0xf3e1('0x5d')}]});}return null;})['then'](respondWithResult(_0x3919d7,null))[_0xf3e1('0x25')](handleError(_0x3919d7,null));};exports['getFields']=function(_0x1b27de,_0x4d19e0,_0x546be0){var _0x2e4cb8=[_0xf3e1('0x61'),'hold_reason',_0xf3e1('0x62'),_0xf3e1('0x63'),_0xf3e1('0x64'),_0xf3e1('0x65'),_0xf3e1('0x66'),_0xf3e1('0x67'),'category'];var _0xe615e3=[_0xf3e1('0x68'),'made_sla',_0xf3e1('0x69'),_0xf3e1('0x6a'),_0xf3e1('0x6b'),_0xf3e1('0x6c'),'child_incidents','hold_reason',_0xf3e1('0x6d'),_0xf3e1('0x6e'),_0xf3e1('0x6f'),_0xf3e1('0x70'),'opened_by',_0xf3e1('0x71'),_0xf3e1('0x72'),_0xf3e1('0x73'),'state','sys_created_by','knowledge',_0xf3e1('0x54'),_0xf3e1('0x74'),_0xf3e1('0x75'),'cmdb_ci',_0xf3e1('0x76'),_0xf3e1('0x77'),_0xf3e1('0x78'),'work_notes_list','business_service',_0xf3e1('0x79'),_0xf3e1('0x7a'),_0xf3e1('0x7b'),_0xf3e1('0x7c'),'expected_start','opened_at',_0xf3e1('0x7d'),_0xf3e1('0x7e'),_0xf3e1('0x7f'),'reopened_time',_0xf3e1('0x80'),'caller_id',_0xf3e1('0x81'),_0xf3e1('0x63'),_0xf3e1('0x82'),_0xf3e1('0x83'),_0xf3e1('0x64'),_0xf3e1('0x84'),_0xf3e1('0x85'),_0xf3e1('0x86'),'assignment_group','business_stc',_0xf3e1('0x87'),_0xf3e1('0x88'),_0xf3e1('0x89'),'notify',_0xf3e1('0x8a'),_0xf3e1('0x8b'),_0xf3e1('0x8c'),'follow_up',_0xf3e1('0x8d'),_0xf3e1('0x8e'),_0xf3e1('0x8f'),'reopened_by',_0xf3e1('0x66'),_0xf3e1('0x90'),'problem_id',_0xf3e1('0x91'),'reassignment_count','activity_due',_0xf3e1('0x92'),_0xf3e1('0x67'),'comments',_0xf3e1('0x93'),_0xf3e1('0x94'),_0xf3e1('0x95'),'due_date',_0xf3e1('0x96'),_0xf3e1('0x97'),_0xf3e1('0x98'),_0xf3e1('0x99'),_0xf3e1('0x9a'),_0xf3e1('0x9b'),'location',_0xf3e1('0x9c')];var _0x7f52af='';var _0x24ea7d='';var _0x27440b=[];var _0x413bf5='';var _0x9982ca='';var _0x6371e0=[];var _0x145805='';var _0x2e55f8='';var _0x6dd8a={};var _0x2d28f8='';return db[_0xf3e1('0x37')]['findOne']({'where':{'id':_0x1b27de[_0xf3e1('0x4e')]['id']},'attributes':['id',_0xf3e1('0x9d'),'password',_0xf3e1('0x9e'),_0xf3e1('0x9f'),_0xf3e1('0xa0')]})[_0xf3e1('0x2f')](handleEntityNotFound(_0x4d19e0,null))[_0xf3e1('0x2f')](function(_0x245dd0){if(_0x245dd0){_0x2d28f8=_0x245dd0[_0xf3e1('0x9f')];var _0x44c9fc=_0x2d28f8[_0xf3e1('0xa1')](-0x1);if(_0x44c9fc==='/'){_0x2d28f8=_0x2d28f8[_0xf3e1('0xa2')](0x0,_0x2d28f8['lastIndexOf'](_0x44c9fc));}_0x2e55f8=util[_0xf3e1('0xa3')]('%s/api/now/doc/table/schema/',_0x2d28f8);_0x145805=util[_0xf3e1('0xa3')](_0xf3e1('0xa4'),_0x2d28f8);_0x6dd8a={'user':_0x245dd0['username'],'pass':_0x245dd0[_0xf3e1('0xa5')]};var _0x53fe85={'method':_0xf3e1('0xa6'),'uri':_0x2e55f8+_0xf3e1('0xa7'),'auth':_0x6dd8a,'json':!![]};return rp(_0x53fe85);}})[_0xf3e1('0x2f')](function(_0x2e0d4c){if(_0x2e0d4c[_0xf3e1('0x24')][_0xf3e1('0x40')]>0x0){_0x7f52af=_0x2e0d4c[_0xf3e1('0x24')];}console[_0xf3e1('0xa8')](_0xf3e1('0xa9'),_0x7f52af);_0x6371e0=[];_0x24ea7d=Object[_0xf3e1('0xaa')]([],_0x7f52af);_['remove'](_0x24ea7d,function(_0x33621e){return!_0x2e4cb8[_0xf3e1('0xab')](_0x33621e[_0xf3e1('0x34')]);});_0x24ea7d[_0xf3e1('0xac')](function(_0x40516c){var _0x203647=createFieldObject(_0x145805,_0x6dd8a,_0x40516c[_0xf3e1('0xad')],_0x40516c[_0xf3e1('0x34')],_0x40516c['label'],![]);_0x6371e0[_0xf3e1('0xae')](_0x203647);});return Promise[_0xf3e1('0xaf')](_0x6371e0);})[_0xf3e1('0x2f')](function(_0x4600b4){_0x27440b=_0x4600b4;_0x413bf5=Object[_0xf3e1('0xaa')]([],_0x7f52af);console[_0xf3e1('0xa8')](_0xf3e1('0xb0'),_0x7f52af);_[_0xf3e1('0xb1')](_0x413bf5,function(_0x541778){return _0xe615e3[_0xf3e1('0xab')](_0x541778[_0xf3e1('0x34')]);});console['log'](_0xf3e1('0xb2'),_0x413bf5);_0x6371e0=[];_0x413bf5[_0xf3e1('0xac')](function(_0x26dc07){var _0x565008=createFieldObject(_0x145805,_0x6dd8a,_0x26dc07[_0xf3e1('0xad')],_0x26dc07['name'],_0x26dc07[_0xf3e1('0xb3')],!![]);_0x6371e0[_0xf3e1('0xae')](_0x565008);});return Promise[_0xf3e1('0xaf')](_0x6371e0);})[_0xf3e1('0x2f')](function(_0x28db47){_0x9982ca=_0x28db47;var _0x43ce06=_0x27440b[_0xf3e1('0xb4')](_0x9982ca);return{'count':_0x43ce06[_0xf3e1('0x40')],'rows':_0x43ce06};})['then'](respondWithResult(_0x4d19e0,null))[_0xf3e1('0x25')](function(_0x48a8f9){console[_0xf3e1('0xa8')](_0xf3e1('0xb5')+_0x48a8f9);var _0x523af5=_0x1b27de['query'][_0xf3e1('0x1a')]?0x1f4:_0x48a8f9['statusCode']||0x1f4;logger[_0xf3e1('0x21')](_0x48a8f9[_0xf3e1('0x33')]);delete _0x48a8f9['name'];if(_0x523af5===0x191){_0x523af5=0x190;}_0x4d19e0[_0xf3e1('0x26')](_0x523af5)[_0xf3e1('0x35')](_0x1b27de[_0xf3e1('0x3b')][_0xf3e1('0x1a')]?{'message':'Wrong\x20credentials','statusCode':_0x48a8f9[_0xf3e1('0xb6')]}:_0x48a8f9);});};function createFieldObject(_0x66cc20,_0x13f735,_0x5989fa,_0x41dc57,_0x71f02f,_0x201d89){return new Promise(function(_0x1e86a6,_0x5001fe){var _0x2ff571={'id':_0x41dc57,'name':_0x71f02f,'custom':_0x201d89};if(_0x5989fa===_0xf3e1('0xb7')){_0x2ff571[_0xf3e1('0x4a')]=[{'name':_0xf3e1('0xb8'),'value':_0xf3e1('0xb9')},{'name':_0xf3e1('0xba'),'value':_0xf3e1('0xbb')}];_0x1e86a6(_0x2ff571);}else{var _0x3beffd={'method':_0xf3e1('0xa6'),'uri':_0x66cc20+_0xf3e1('0xbc')+_0x41dc57,'auth':_0x13f735,'json':!![]};return rp(_0x3beffd)[_0xf3e1('0x2f')](function(_0x24ca3c){var _0x2ad38a=[];if(_0x24ca3c[_0xf3e1('0x24')][_0xf3e1('0x40')]>0x0){_0x24ca3c['result'][_0xf3e1('0xac')](function(_0x23c435){if(_0x23c435[_0xf3e1('0xbd')]===_0xf3e1('0xbb')){var _0x4ffda9={'name':_0x23c435['label'],'value':_0x23c435['value']};_0x2ad38a[_0xf3e1('0xae')](_0x4ffda9);}});}_0x2ff571['options']=_0x2ad38a;if(_0x2ff571[_0xf3e1('0x4a')][_0xf3e1('0x40')]>0x0){_0x1e86a6(_0x2ff571);}else{if(_0x201d89==![]){_0x1e86a6();}else{_0x1e86a6(_0x2ff571);}}});}});}
\ No newline at end of file
+var _0x12c8=['upon_approval','correlation_id','email','serverUrl','remoteUri','slice','substring','format','password','log','forEach','internalType','label','push','all','assign','TCL:\x20_object','remove','includes','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','concat','ServiceNow\x20error:\x20','statusCode','Wrong\x20credentials','boolean','True','False','false','sys_choice?sysparm_query=name=incident^element=','inactive','value','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','request\x20sent','debug','stringify','error','code','ServicenowAccount,\x20%s,\x20%s','message','result','sendStatus','end','json','count','offset','set','Content-Range','apply','reject','update','destroy','status','stack','name','send','index','ServicenowAccount','query','keys','filters','intersection','model','attributes','fields','length','nolimit','limit','order','where','pick','filter','merge','map','type','key','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','getConfigurations','findOne','ServicenowConfiguration','sort','hasOwnProperty','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ServicenowField','getFields','made_sla','knowledge','subcategory','close_code','incident_state','severity','category','parent','caused_by','upon_reject','sys_updated_on','hold_reason','approval_history','number','resolved_by','opened_by','sys_created_on','state','sys_created_by','closed_at','delivery_plan','active','work_notes_list','business_service','priority','sys_domain_path','rfc','time_worked','expected_start','opened_at','business_duration','work_end','resolved_at','approval_set','work_notes','correlation_display','delivery_task','business_stc','additional_assignee_list','description','calendar_duration','notify','sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','problem_id','company','activity_due','assigned_to','comments','sla_due','comments_and_work_notes','due_date','sys_mod_count','reopen_count','sys_tags','escalation'];(function(_0x5c6299,_0x11bd28){var _0x23b564=function(_0x329ed6){while(--_0x329ed6){_0x5c6299['push'](_0x5c6299['shift']());}};_0x23b564(++_0x11bd28);}(_0x12c8,0x1a1));var _0x812c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x12c8[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0x812c('0x0'));var emlformat=require(_0x812c('0x1'));var rimraf=require(_0x812c('0x2'));var zipdir=require(_0x812c('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x812c('0x4'));var moment=require(_0x812c('0x5'));var BPromise=require(_0x812c('0x6'));var Mustache=require(_0x812c('0x7'));var util=require(_0x812c('0x8'));var path=require(_0x812c('0x9'));var sox=require(_0x812c('0xa'));var csv=require(_0x812c('0xb'));var ejs=require(_0x812c('0xc'));var fs=require('fs');var _=require(_0x812c('0xd'));var squel=require(_0x812c('0xe'));var crypto=require(_0x812c('0xf'));var jsforce=require(_0x812c('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x812c('0xb'));var querystring=require(_0x812c('0x11'));var Papa=require(_0x812c('0x12'));var Redis=require(_0x812c('0x13'));var authService=require(_0x812c('0x14'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x812c('0x15'));var logger=require(_0x812c('0x16'))('api');var utils=require(_0x812c('0x17'));var config=require('../../config/environment');var db=require(_0x812c('0x18'))['db'];var integrations=require(_0x812c('0x19'));var jayson=require(_0x812c('0x1a'));var client=jayson['client'][_0x812c('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x3b1cac,_0x25ad2d,_0x208a31){if(_0x208a31){var _0x52ff4c=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x52ff4c[_0x812c('0x1c')](_0x25ad2d)){return _0x3b1cac;}else{throw new Error(_0x812c('0x1d'));}}else{return _0x3b1cac;}}function respondWithRpcPromise(_0x5045ea,_0x17f42f,_0x50b8d1,_0x29c6a2){return new BPromise(function(_0x17607c,_0x51df43){var _0x16d9c0=_0x29c6a2||client;return _0x16d9c0['request'](_0x5045ea,_0x50b8d1)[_0x812c('0x1e')](function(_0x5e3b56){logger[_0x812c('0x1f')]('ServicenowAccount,\x20%s,\x20%s',_0x17f42f,_0x812c('0x20'));logger[_0x812c('0x21')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x17f42f,_0x812c('0x20'),JSON[_0x812c('0x22')](_0x5e3b56));if(_0x5e3b56['error']){if(_0x5e3b56[_0x812c('0x23')][_0x812c('0x24')]===0x1f4){logger['error'](_0x812c('0x25'),_0x17f42f,_0x5e3b56[_0x812c('0x23')][_0x812c('0x26')]);return _0x51df43(_0x5e3b56[_0x812c('0x23')][_0x812c('0x26')]);}logger['error']('ServicenowAccount,\x20%s,\x20%s',_0x17f42f,_0x5e3b56['error'][_0x812c('0x26')]);return _0x17607c(_0x5e3b56[_0x812c('0x23')]['message']);}else{logger[_0x812c('0x1f')](_0x812c('0x25'),_0x17f42f,_0x812c('0x20'));_0x17607c(_0x5e3b56[_0x812c('0x27')]['message']);}})['catch'](function(_0x23984f){logger[_0x812c('0x23')](_0x812c('0x25'),_0x17f42f,_0x23984f);_0x51df43(_0x23984f);});});}function respondWithStatusCode(_0x3bfb55,_0x522f92){_0x522f92=_0x522f92||0xcc;return function(_0xe50453){if(_0xe50453){return _0x3bfb55[_0x812c('0x28')](_0x522f92);}return _0x3bfb55['status'](_0x522f92)[_0x812c('0x29')]();};}function respondWithResult(_0x1a97a2,_0x5411fd){_0x5411fd=_0x5411fd||0xc8;return function(_0x216d11){if(_0x216d11){return _0x1a97a2['status'](_0x5411fd)[_0x812c('0x2a')](_0x216d11);}};}function respondWithFilteredResult(_0xddb353,_0x43c733){return function(_0x2017b7){if(_0x2017b7){var _0x1db9c2=_0x2017b7[_0x812c('0x2b')],_0x2ee74d=_0x43c733['offset'],_0x2f39dc=_0x43c733[_0x812c('0x2c')]+_0x43c733['limit'],_0x38cc76;if(_0x2f39dc>=_0x1db9c2){_0x2f39dc=_0x1db9c2;_0x38cc76=0xc8;}else{_0x38cc76=0xce;}_0xddb353['status'](_0x38cc76);return _0xddb353[_0x812c('0x2d')](_0x812c('0x2e'),_0x2ee74d+'-'+_0x2f39dc+'/'+_0x1db9c2)[_0x812c('0x2a')](_0x2017b7);}return null;};}function patchUpdates(_0xaec3d8){return function(_0x22601b){try{jsonpatch[_0x812c('0x2f')](_0x22601b,_0xaec3d8,!![]);}catch(_0x19d445){return BPromise[_0x812c('0x30')](_0x19d445);}return _0x22601b['save']();};}function saveUpdates(_0x21d4c5,_0x502e50){return function(_0x26c852){if(_0x26c852){return _0x26c852[_0x812c('0x31')](_0x21d4c5)['then'](function(_0x86ef84){return _0x86ef84;});}return null;};}function removeEntity(_0x237ae4,_0x42fa9e){return function(_0x23041e){if(_0x23041e){return _0x23041e[_0x812c('0x32')]()[_0x812c('0x1e')](function(){_0x237ae4[_0x812c('0x33')](0xcc)[_0x812c('0x29')]();});}};}function handleEntityNotFound(_0x23e0ef,_0x5b18e0){return function(_0x1373c8){if(!_0x1373c8){_0x23e0ef[_0x812c('0x28')](0x194);}return _0x1373c8;};}function handleError(_0x5751be,_0x5950ed){_0x5950ed=_0x5950ed||0x1f4;return function(_0x55ab06){logger['error'](_0x55ab06[_0x812c('0x34')]);if(_0x55ab06[_0x812c('0x35')]){delete _0x55ab06[_0x812c('0x35')];}_0x5751be[_0x812c('0x33')](_0x5950ed)[_0x812c('0x36')](_0x55ab06);};}exports[_0x812c('0x37')]=function(_0x3f2fbb,_0x5c9c7c){var _0xe01080={},_0x44bb8f={},_0x5af443={'count':0x0,'rows':[]};var _0x269736=db[_0x812c('0x38')]['rawAttributes'];_0x44bb8f['model']=_['keys'](_0x269736);_0x44bb8f[_0x812c('0x39')]=_[_0x812c('0x3a')](_0x3f2fbb[_0x812c('0x39')]);_0x44bb8f[_0x812c('0x3b')]=_[_0x812c('0x3c')](_0x44bb8f[_0x812c('0x3d')],_0x44bb8f[_0x812c('0x39')]);_0xe01080[_0x812c('0x3e')]=_['intersection'](_0x44bb8f[_0x812c('0x3d')],qs[_0x812c('0x3f')](_0x3f2fbb[_0x812c('0x39')][_0x812c('0x3f')]));_0xe01080['attributes']=_0xe01080['attributes'][_0x812c('0x40')]?_0xe01080[_0x812c('0x3e')]:_0x44bb8f['model'];if(!_0x3f2fbb[_0x812c('0x39')]['hasOwnProperty'](_0x812c('0x41'))){_0xe01080[_0x812c('0x42')]=qs[_0x812c('0x42')](_0x3f2fbb[_0x812c('0x39')][_0x812c('0x42')]);_0xe01080[_0x812c('0x2c')]=qs['offset'](_0x3f2fbb[_0x812c('0x39')][_0x812c('0x2c')]);}_0xe01080[_0x812c('0x43')]=qs['sort'](_0x3f2fbb[_0x812c('0x39')]['sort']);_0xe01080[_0x812c('0x44')]=qs['filters'](_[_0x812c('0x45')](_0x3f2fbb[_0x812c('0x39')],_0x44bb8f[_0x812c('0x3b')]));if(_0x3f2fbb[_0x812c('0x39')][_0x812c('0x46')]){_0xe01080[_0x812c('0x44')]=_[_0x812c('0x47')](_0xe01080['where'],{'$or':_[_0x812c('0x48')](_0x269736,function(_0x5802d0){if(_0x5802d0[_0x812c('0x49')][_0x812c('0x4a')]!==_0x812c('0x4b')){var _0x31b29b={};_0x31b29b[_0x5802d0['field']]={'$like':'%'+_0x3f2fbb[_0x812c('0x39')][_0x812c('0x46')]+'%'};return _0x31b29b;}})});}_0xe01080=_[_0x812c('0x47')]({},_0xe01080,_0x3f2fbb['options']);var _0x98b792={'where':_0xe01080[_0x812c('0x44')]};return db[_0x812c('0x38')][_0x812c('0x2b')](_0x98b792)[_0x812c('0x1e')](function(_0x183e3a){_0x5af443[_0x812c('0x2b')]=_0x183e3a;if(_0x3f2fbb['query'][_0x812c('0x4c')]){_0xe01080[_0x812c('0x4d')]=[{'all':!![]}];}return db['ServicenowAccount'][_0x812c('0x4e')](_0xe01080);})[_0x812c('0x1e')](function(_0x2c5dbf){_0x5af443[_0x812c('0x4f')]=_0x2c5dbf;return _0x5af443;})[_0x812c('0x1e')](respondWithFilteredResult(_0x5c9c7c,_0xe01080))[_0x812c('0x50')](handleError(_0x5c9c7c,null));};exports[_0x812c('0x51')]=function(_0x376fa5,_0x15d89f){var _0x9ff093={'raw':![],'where':{'id':_0x376fa5[_0x812c('0x52')]['id']}},_0x3e96ff={};_0x3e96ff['model']=_['keys'](db[_0x812c('0x38')][_0x812c('0x53')]);_0x3e96ff[_0x812c('0x39')]=_[_0x812c('0x3a')](_0x376fa5[_0x812c('0x39')]);_0x3e96ff[_0x812c('0x3b')]=_[_0x812c('0x3c')](_0x3e96ff['model'],_0x3e96ff['query']);_0x9ff093[_0x812c('0x3e')]=_['intersection'](_0x3e96ff[_0x812c('0x3d')],qs[_0x812c('0x3f')](_0x376fa5[_0x812c('0x39')][_0x812c('0x3f')]));_0x9ff093['attributes']=_0x9ff093[_0x812c('0x3e')][_0x812c('0x40')]?_0x9ff093['attributes']:_0x3e96ff[_0x812c('0x3d')];if(_0x376fa5['query'][_0x812c('0x4c')]){_0x9ff093['include']=[{'all':!![]}];}_0x9ff093=_[_0x812c('0x47')]({},_0x9ff093,_0x376fa5[_0x812c('0x54')]);return db[_0x812c('0x38')][_0x812c('0x55')](_0x9ff093)[_0x812c('0x1e')](handleEntityNotFound(_0x15d89f,null))[_0x812c('0x1e')](respondWithResult(_0x15d89f,null))[_0x812c('0x50')](handleError(_0x15d89f,null));};exports[_0x812c('0x56')]=function(_0x24c44e,_0x3505f2){return db[_0x812c('0x38')][_0x812c('0x56')](_0x24c44e[_0x812c('0x57')],{})['then'](respondWithResult(_0x3505f2,0xc9))[_0x812c('0x50')](handleError(_0x3505f2,null));};exports[_0x812c('0x31')]=function(_0x300c09,_0x50b911){if(_0x300c09[_0x812c('0x57')]['id']){delete _0x300c09['body']['id'];}return db['ServicenowAccount'][_0x812c('0x55')]({'where':{'id':_0x300c09[_0x812c('0x52')]['id']}})['then'](handleEntityNotFound(_0x50b911,null))[_0x812c('0x1e')](saveUpdates(_0x300c09[_0x812c('0x57')],null))[_0x812c('0x1e')](respondWithResult(_0x50b911,null))[_0x812c('0x50')](handleError(_0x50b911,null));};exports['destroy']=function(_0x150727,_0x4af103){return db[_0x812c('0x38')][_0x812c('0x55')]({'where':{'id':_0x150727[_0x812c('0x52')]['id']}})[_0x812c('0x1e')](handleEntityNotFound(_0x4af103,null))[_0x812c('0x1e')](removeEntity(_0x4af103,null))['catch'](handleError(_0x4af103,null));};exports[_0x812c('0x58')]=function(_0x5b4d3f,_0x2094e2,_0x564139){var _0x22b5fa={};var _0x4f7278={};var _0x2aea2c;var _0xba3534;return db[_0x812c('0x38')][_0x812c('0x59')]({'where':{'id':_0x5b4d3f['params']['id']}})['then'](handleEntityNotFound(_0x2094e2,null))['then'](function(_0x77f9eb){if(_0x77f9eb){_0x2aea2c=_0x77f9eb;_0x4f7278[_0x812c('0x3d')]=_[_0x812c('0x3a')](db[_0x812c('0x5a')][_0x812c('0x53')]);_0x4f7278[_0x812c('0x39')]=_['keys'](_0x5b4d3f[_0x812c('0x39')]);_0x4f7278[_0x812c('0x3b')]=_['intersection'](_0x4f7278[_0x812c('0x3d')],_0x4f7278[_0x812c('0x39')]);_0x22b5fa[_0x812c('0x3e')]=_['intersection'](_0x4f7278[_0x812c('0x3d')],qs['fields'](_0x5b4d3f[_0x812c('0x39')]['fields']));_0x22b5fa[_0x812c('0x3e')]=_0x22b5fa['attributes'][_0x812c('0x40')]?_0x22b5fa[_0x812c('0x3e')]:_0x4f7278['model'];_0x22b5fa['order']=qs[_0x812c('0x5b')](_0x5b4d3f[_0x812c('0x39')][_0x812c('0x5b')]);_0x22b5fa['where']=qs[_0x812c('0x3b')](_['pick'](_0x5b4d3f[_0x812c('0x39')],_0x4f7278['filters']));if(_0x5b4d3f[_0x812c('0x39')][_0x812c('0x46')]){_0x22b5fa[_0x812c('0x44')]=_[_0x812c('0x47')](_0x22b5fa[_0x812c('0x44')],{'$or':_[_0x812c('0x48')](_0x22b5fa[_0x812c('0x3e')],function(_0x210901){var _0x1c81c0={};_0x1c81c0[_0x210901]={'$like':'%'+_0x5b4d3f[_0x812c('0x39')][_0x812c('0x46')]+'%'};return _0x1c81c0;})});}_0x22b5fa=_[_0x812c('0x47')]({},_0x22b5fa,_0x5b4d3f[_0x812c('0x54')]);return _0x2aea2c[_0x812c('0x58')](_0x22b5fa);}})[_0x812c('0x1e')](function(_0x562370){if(_0x562370){_0xba3534=_0x562370[_0x812c('0x40')];if(!_0x5b4d3f[_0x812c('0x39')][_0x812c('0x5c')]('nolimit')){_0x22b5fa[_0x812c('0x42')]=qs[_0x812c('0x42')](_0x5b4d3f[_0x812c('0x39')][_0x812c('0x42')]);_0x22b5fa[_0x812c('0x2c')]=qs[_0x812c('0x2c')](_0x5b4d3f[_0x812c('0x39')][_0x812c('0x2c')]);}return _0x2aea2c[_0x812c('0x58')](_0x22b5fa);}})['then'](function(_0x1bd5c9){if(_0x1bd5c9){return _0x1bd5c9?{'count':_0xba3534,'rows':_0x1bd5c9}:null;}})[_0x812c('0x1e')](respondWithResult(_0x2094e2,null))[_0x812c('0x50')](handleError(_0x2094e2,null));};exports[_0x812c('0x5d')]=function(_0xec40eb,_0x355f4b,_0x1c0c46){if(_0xec40eb['body']['id']){delete _0xec40eb[_0x812c('0x57')]['id'];}return db[_0x812c('0x38')]['findOne']({'where':{'id':_0xec40eb['params']['id']}})[_0x812c('0x1e')](handleEntityNotFound(_0x355f4b,null))['then'](function(_0xddb93a){if(_0xddb93a){_0xec40eb[_0x812c('0x57')][_0x812c('0x5e')]=_0xddb93a['id'];_0xec40eb[_0x812c('0x57')][_0x812c('0x5f')]=integrations[_0x812c('0x60')](_0xec40eb['body'][_0x812c('0x61')],_0xec40eb['body'][_0x812c('0x49')]);_0xec40eb[_0x812c('0x57')][_0x812c('0x62')]=integrations[_0x812c('0x63')](_0xec40eb[_0x812c('0x57')][_0x812c('0x61')],_0xec40eb['body'][_0x812c('0x49')]);return db[_0x812c('0x5a')]['create'](_0xec40eb['body'],{'include':[{'model':db[_0x812c('0x64')],'as':_0x812c('0x5f')},{'model':db[_0x812c('0x64')],'as':_0x812c('0x62')}]});}return null;})[_0x812c('0x1e')](respondWithResult(_0x355f4b,null))['catch'](handleError(_0x355f4b,null));};exports[_0x812c('0x65')]=function(_0xed5296,_0x48a911,_0x5e8c94){var _0x2c7fcf=[_0x812c('0x66'),'hold_reason',_0x812c('0x67'),_0x812c('0x68'),_0x812c('0x69'),'notify',_0x812c('0x6a'),_0x812c('0x6b'),_0x812c('0x6c')];var _0x19c07b=[_0x812c('0x6d'),_0x812c('0x66'),_0x812c('0x6e'),'watch_list',_0x812c('0x6f'),_0x812c('0x70'),'child_incidents',_0x812c('0x71'),_0x812c('0x72'),_0x812c('0x73'),_0x812c('0x74'),'sys_updated_by',_0x812c('0x75'),'user_input',_0x812c('0x76'),'sys_domain',_0x812c('0x77'),_0x812c('0x78'),'knowledge',_0x812c('0x43'),'calendar_stc',_0x812c('0x79'),'cmdb_ci',_0x812c('0x7a'),'impact',_0x812c('0x7b'),_0x812c('0x7c'),_0x812c('0x7d'),_0x812c('0x7e'),_0x812c('0x7f'),_0x812c('0x80'),_0x812c('0x81'),_0x812c('0x82'),_0x812c('0x83'),_0x812c('0x84'),'group_list',_0x812c('0x85'),'reopened_time',_0x812c('0x86'),'caller_id',_0x812c('0x87'),_0x812c('0x68'),_0x812c('0x88'),'short_description',_0x812c('0x69'),_0x812c('0x89'),_0x812c('0x8a'),'work_start','assignment_group',_0x812c('0x8b'),_0x812c('0x8c'),_0x812c('0x8d'),_0x812c('0x8e'),_0x812c('0x8f'),_0x812c('0x90'),_0x812c('0x91'),_0x812c('0x92'),_0x812c('0x93'),_0x812c('0x94'),_0x812c('0x95'),'contact_type','reopened_by',_0x812c('0x6a'),'urgency',_0x812c('0x96'),_0x812c('0x97'),'reassignment_count',_0x812c('0x98'),_0x812c('0x99'),'severity',_0x812c('0x9a'),_0x812c('0x9b'),'approval',_0x812c('0x9c'),_0x812c('0x9d'),_0x812c('0x9e'),_0x812c('0x9f'),_0x812c('0xa0'),_0x812c('0xa1'),_0x812c('0xa2'),_0x812c('0xa3'),'location',_0x812c('0x6c')];var _0x5d33a6='';var _0x2d26bd='';var _0x5d2dda=[];var _0x363685='';var _0x17a027='';var _0x76894c=[];var _0x1ed05a='';var _0x4709a8='';var _0x1e6979={};var _0x4b48f4='';return db[_0x812c('0x38')]['findOne']({'where':{'id':_0xed5296[_0x812c('0x52')]['id']},'attributes':['id','username','password',_0x812c('0xa4'),'remoteUri',_0x812c('0xa5')]})[_0x812c('0x1e')](handleEntityNotFound(_0x48a911,null))['then'](function(_0x1f821d){if(_0x1f821d){_0x4b48f4=_0x1f821d[_0x812c('0xa6')];var _0xc13890=_0x4b48f4[_0x812c('0xa7')](-0x1);if(_0xc13890==='/'){_0x4b48f4=_0x4b48f4[_0x812c('0xa8')](0x0,_0x4b48f4['lastIndexOf'](_0xc13890));}_0x4709a8=util[_0x812c('0xa9')]('%s/api/now/doc/table/schema/',_0x4b48f4);_0x1ed05a=util[_0x812c('0xa9')]('%s/api/now/table/',_0x4b48f4);_0x1e6979={'user':_0x1f821d['username'],'pass':_0x1f821d[_0x812c('0xaa')]};var _0x123206={'method':'GET','uri':_0x4709a8+'incident?sysparm_display_value=all','auth':_0x1e6979,'json':!![]};return rp(_0x123206);}})[_0x812c('0x1e')](function(_0xe1d9ff){if(_0xe1d9ff[_0x812c('0x27')][_0x812c('0x40')]>0x0){_0x5d33a6=_0xe1d9ff[_0x812c('0x27')];}console[_0x812c('0xab')]('incident\x20table\x20objects',_0x5d33a6);_0x76894c=[];_0x2d26bd=Object['assign']([],_0x5d33a6);_['remove'](_0x2d26bd,function(_0x1c400b){return!_0x2c7fcf['includes'](_0x1c400b[_0x812c('0x35')]);});_0x2d26bd[_0x812c('0xac')](function(_0x2751f5){var _0x359c4a=createFieldObject(_0x1ed05a,_0x1e6979,_0x2751f5[_0x812c('0xad')],_0x2751f5[_0x812c('0x35')],_0x2751f5[_0x812c('0xae')],![]);_0x76894c[_0x812c('0xaf')](_0x359c4a);});return Promise[_0x812c('0xb0')](_0x76894c);})[_0x812c('0x1e')](function(_0x347b1e){_0x5d2dda=_0x347b1e;_0x363685=Object[_0x812c('0xb1')]([],_0x5d33a6);console['log'](_0x812c('0xb2'),_0x5d33a6);_[_0x812c('0xb3')](_0x363685,function(_0x2ad07a){return _0x19c07b[_0x812c('0xb4')](_0x2ad07a[_0x812c('0x35')]);});console[_0x812c('0xab')](_0x812c('0xb5'),_0x363685);_0x76894c=[];_0x363685[_0x812c('0xac')](function(_0x2e06d0){var _0x34876f=createFieldObject(_0x1ed05a,_0x1e6979,_0x2e06d0[_0x812c('0xad')],_0x2e06d0[_0x812c('0x35')],_0x2e06d0[_0x812c('0xae')],!![]);_0x76894c[_0x812c('0xaf')](_0x34876f);});return Promise['all'](_0x76894c);})[_0x812c('0x1e')](function(_0x50615f){_0x17a027=_0x50615f;var _0x1e4ab1=_0x5d2dda[_0x812c('0xb6')](_0x17a027);return{'count':_0x1e4ab1['length'],'rows':_0x1e4ab1};})[_0x812c('0x1e')](respondWithResult(_0x48a911,null))[_0x812c('0x50')](function(_0x5353d8){console['log'](_0x812c('0xb7')+_0x5353d8);var _0x73e69a=_0xed5296['query'][_0x812c('0x1c')]?0x1f4:_0x5353d8[_0x812c('0xb8')]||0x1f4;logger['error'](_0x5353d8[_0x812c('0x34')]);delete _0x5353d8[_0x812c('0x35')];if(_0x73e69a===0x191){_0x73e69a=0x190;}_0x48a911[_0x812c('0x33')](_0x73e69a)[_0x812c('0x36')](_0xed5296[_0x812c('0x39')][_0x812c('0x1c')]?{'message':_0x812c('0xb9'),'statusCode':_0x5353d8[_0x812c('0xb8')]}:_0x5353d8);});};function createFieldObject(_0x2d8d6d,_0xd8c36e,_0x45554c,_0x351717,_0x4b175e,_0x1d8459){return new Promise(function(_0x1a07f6,_0x796566){var _0x40de87={'id':_0x351717,'name':_0x4b175e,'custom':_0x1d8459};if(_0x45554c===_0x812c('0xba')){_0x40de87[_0x812c('0x54')]=[{'name':_0x812c('0xbb'),'value':'true'},{'name':_0x812c('0xbc'),'value':_0x812c('0xbd')}];_0x1a07f6(_0x40de87);}else{var _0xc33c6c={'method':'GET','uri':_0x2d8d6d+_0x812c('0xbe')+_0x351717,'auth':_0xd8c36e,'json':!![]};return rp(_0xc33c6c)[_0x812c('0x1e')](function(_0x295726){var _0x20cf96=[];if(_0x295726[_0x812c('0x27')][_0x812c('0x40')]>0x0){_0x295726[_0x812c('0x27')][_0x812c('0xac')](function(_0x2955a8){if(_0x2955a8[_0x812c('0xbf')]==='false'){var _0x431e2d={'name':_0x2955a8[_0x812c('0xae')],'value':_0x2955a8[_0x812c('0xc0')]};_0x20cf96[_0x812c('0xaf')](_0x431e2d);}});}_0x40de87[_0x812c('0x54')]=_0x20cf96;if(_0x40de87[_0x812c('0x54')][_0x812c('0x40')]>0x0){_0x1a07f6(_0x40de87);}else{if(_0x1d8459==![]){_0x1a07f6();}else{_0x1a07f6(_0x40de87);}}});}});}
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.model.js b/server/api/intServicenowAccount/intServicenowAccount.model.js
index 6743e75..a79d248 100644
--- a/server/api/intServicenowAccount/intServicenowAccount.model.js
+++ b/server/api/intServicenowAccount/intServicenowAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x814b=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./intServicenowAccount.attributes','../../components/integrations/configuration','exports','define','int_servicenow_accounts','lodash','util'];(function(_0x297b2b,_0x11eb85){var _0x14754b=function(_0x377d2f){while(--_0x377d2f){_0x297b2b['push'](_0x297b2b['shift']());}};_0x14754b(++_0x11eb85);}(_0x814b,0x1a2));var _0xb814=function(_0x5d7227,_0x12aebe){_0x5d7227=_0x5d7227-0x0;var _0x15ac55=_0x814b[_0x5d7227];return _0x15ac55;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var logger=require(_0xb814('0x2'))(_0xb814('0x3'));var moment=require(_0xb814('0x4'));var BPromise=require(_0xb814('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb814('0x6'));var rimraf=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var attributes=require(_0xb814('0x9'));var integrations=require(_0xb814('0xa'));module[_0xb814('0xb')]=function(_0x53e507,_0x3b0829){return _0x53e507[_0xb814('0xc')]('ServicenowAccount',attributes,{'tableName':_0xb814('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x814b=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./intServicenowAccount.attributes','../../components/integrations/configuration','exports','define','int_servicenow_accounts','lodash','util'];(function(_0xfa487c,_0x2a255a){var _0x5b4b7c=function(_0x5cbfa4){while(--_0x5cbfa4){_0xfa487c['push'](_0xfa487c['shift']());}};_0x5b4b7c(++_0x2a255a);}(_0x814b,0x1a2));var _0xb814=function(_0x48df04,_0x1522b1){_0x48df04=_0x48df04-0x0;var _0x4de5fa=_0x814b[_0x48df04];return _0x4de5fa;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var logger=require(_0xb814('0x2'))(_0xb814('0x3'));var moment=require(_0xb814('0x4'));var BPromise=require(_0xb814('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb814('0x6'));var rimraf=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var attributes=require(_0xb814('0x9'));var integrations=require(_0xb814('0xa'));module[_0xb814('0xb')]=function(_0x53e507,_0x3b0829){return _0x53e507[_0xb814('0xc')]('ServicenowAccount',attributes,{'tableName':_0xb814('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.rpc.js b/server/api/intServicenowAccount/intServicenowAccount.rpc.js
index a3f611d..a5519df 100644
--- a/server/api/intServicenowAccount/intServicenowAccount.rpc.js
+++ b/server/api/intServicenowAccount/intServicenowAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2d84=['../../config/environment','http','request','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','ServicenowAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','ServicenowAccount','findAll','raw','where','options','attributes','map','include','model','GetServicenowAccount','debug','stringify','ShowServicenowAccount','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x16ea87,_0x378d8b){var _0x6e7b1c=function(_0x26306e){while(--_0x26306e){_0x16ea87['push'](_0x16ea87['shift']());}};_0x6e7b1c(++_0x378d8b);}(_0x2d84,0x1a7));var _0x42d8=function(_0x3e6e28,_0x41e200){_0x3e6e28=_0x3e6e28-0x0;var _0x1e4f7d=_0x2d84[_0x3e6e28];return _0x1e4f7d;};'use strict';var _=require(_0x42d8('0x0'));var util=require(_0x42d8('0x1'));var moment=require('moment');var BPromise=require(_0x42d8('0x2'));var rs=require(_0x42d8('0x3'));var fs=require('fs');var Redis=require(_0x42d8('0x4'));var db=require(_0x42d8('0x5'))['db'];var utils=require(_0x42d8('0x6'));var logger=require(_0x42d8('0x7'))(_0x42d8('0x8'));var config=require(_0x42d8('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x42d8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3ab22f,_0x4eff71,_0x658563){return new BPromise(function(_0x28c8ac,_0x1bf0c9){return client[_0x42d8('0xb')](_0x3ab22f,_0x658563)[_0x42d8('0xc')](function(_0xbf15b0){logger[_0x42d8('0xd')](_0x42d8('0xe'),_0x4eff71,_0x42d8('0xf'));logger['debug'](_0x42d8('0x10'),_0x4eff71,'request\x20sent',JSON['stringify'](_0xbf15b0));if(_0xbf15b0[_0x42d8('0x11')]){if(_0xbf15b0[_0x42d8('0x11')][_0x42d8('0x12')]===0x1f4){logger[_0x42d8('0x11')](_0x42d8('0xe'),_0x4eff71,_0xbf15b0[_0x42d8('0x11')][_0x42d8('0x13')]);return _0x1bf0c9(_0xbf15b0[_0x42d8('0x11')][_0x42d8('0x13')]);}logger[_0x42d8('0x11')](_0x42d8('0xe'),_0x4eff71,_0xbf15b0[_0x42d8('0x11')][_0x42d8('0x13')]);return _0x28c8ac(_0xbf15b0[_0x42d8('0x11')]['message']);}else{logger[_0x42d8('0xd')]('ServicenowAccount,\x20%s,\x20%s',_0x4eff71,_0x42d8('0xf'));_0x28c8ac(_0xbf15b0[_0x42d8('0x14')][_0x42d8('0x13')]);}})[_0x42d8('0x15')](function(_0x4337e8){logger[_0x42d8('0x11')]('ServicenowAccount,\x20%s,\x20%s',_0x4eff71,_0x4337e8);_0x1bf0c9(_0x4337e8);});});}exports['GetServicenowAccount']=function(_0x1567a3){var _0x661eb7=this;return new Promise(function(_0x5a0919,_0x2860fa){return db[_0x42d8('0x16')][_0x42d8('0x17')]({'raw':_0x1567a3['options']?_0x1567a3['options'][_0x42d8('0x18')]===undefined?!![]:![]:!![],'where':_0x1567a3['options']?_0x1567a3['options'][_0x42d8('0x19')]||null:null,'attributes':_0x1567a3[_0x42d8('0x1a')]?_0x1567a3[_0x42d8('0x1a')][_0x42d8('0x1b')]||null:null,'limit':_0x1567a3[_0x42d8('0x1a')]?_0x1567a3[_0x42d8('0x1a')]['limit']||null:null,'include':_0x1567a3['options']?_0x1567a3['options']['include']?_[_0x42d8('0x1c')](_0x1567a3[_0x42d8('0x1a')][_0x42d8('0x1d')],function(_0x5da086){return{'model':db[_0x5da086['model']],'as':_0x5da086['as'],'attributes':_0x5da086['attributes'],'include':_0x5da086[_0x42d8('0x1d')]?_[_0x42d8('0x1c')](_0x5da086[_0x42d8('0x1d')],function(_0x7ca20){return{'model':db[_0x7ca20[_0x42d8('0x1e')]],'as':_0x7ca20['as'],'attributes':_0x7ca20[_0x42d8('0x1b')],'include':_0x7ca20[_0x42d8('0x1d')]?_[_0x42d8('0x1c')](_0x7ca20[_0x42d8('0x1d')],function(_0x103ddf){return{'model':db[_0x103ddf['model']],'as':_0x103ddf['as'],'attributes':_0x103ddf[_0x42d8('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x42d8('0xc')](function(_0x3ed20d){logger[_0x42d8('0xd')](_0x42d8('0x1f'),_0x1567a3);logger[_0x42d8('0x20')](_0x42d8('0x1f'),_0x1567a3,JSON[_0x42d8('0x21')](_0x3ed20d));_0x5a0919(_0x3ed20d);})['catch'](function(_0x4b1142){logger[_0x42d8('0x11')](_0x42d8('0x1f'),_0x4b1142[_0x42d8('0x13')],_0x1567a3);_0x2860fa(_0x661eb7[_0x42d8('0x11')](0x1f4,_0x4b1142[_0x42d8('0x13')]));});});};exports[_0x42d8('0x22')]=function(_0x346bb2){var _0x140c35=this;return new Promise(function(_0x343200,_0x5eb4b4){return db[_0x42d8('0x16')][_0x42d8('0x23')]({'raw':_0x346bb2[_0x42d8('0x1a')]?_0x346bb2['options']['raw']===undefined?!![]:![]:!![],'where':_0x346bb2[_0x42d8('0x1a')]?_0x346bb2[_0x42d8('0x1a')]['where']||null:null,'attributes':_0x346bb2[_0x42d8('0x1a')]?_0x346bb2[_0x42d8('0x1a')][_0x42d8('0x1b')]||null:null,'include':_0x346bb2[_0x42d8('0x1a')]?_0x346bb2[_0x42d8('0x1a')][_0x42d8('0x1d')]?_[_0x42d8('0x1c')](_0x346bb2[_0x42d8('0x1a')]['include'],function(_0x8d2fde){return{'model':db[_0x8d2fde['model']],'as':_0x8d2fde['as'],'attributes':_0x8d2fde[_0x42d8('0x1b')],'include':_0x8d2fde[_0x42d8('0x1d')]?_[_0x42d8('0x1c')](_0x8d2fde['include'],function(_0x369c91){return{'model':db[_0x369c91[_0x42d8('0x1e')]],'as':_0x369c91['as'],'attributes':_0x369c91[_0x42d8('0x1b')],'include':_0x369c91[_0x42d8('0x1d')]?_[_0x42d8('0x1c')](_0x369c91[_0x42d8('0x1d')],function(_0x406639){return{'model':db[_0x406639[_0x42d8('0x1e')]],'as':_0x406639['as'],'attributes':_0x406639[_0x42d8('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x42d8('0xc')](function(_0x9a080d){logger[_0x42d8('0xd')](_0x42d8('0x22'),_0x346bb2);logger[_0x42d8('0x20')](_0x42d8('0x22'),_0x346bb2,JSON[_0x42d8('0x21')](_0x9a080d));_0x343200(_0x9a080d);})[_0x42d8('0x15')](function(_0x5d8902){logger[_0x42d8('0x11')](_0x42d8('0x22'),_0x5d8902[_0x42d8('0x13')],_0x346bb2);_0x5eb4b4(_0x140c35[_0x42d8('0x11')](0x1f4,_0x5d8902[_0x42d8('0x13')]));});});};
\ No newline at end of file
+var _0xc3e3=['result','GetServicenowAccount','ServicenowAccount','options','raw','where','attributes','limit','include','model','map','stringify','ShowServicenowAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','http','request','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x4cbe6a,_0x593aae){var _0x5273fa=function(_0x2332c3){while(--_0x2332c3){_0x4cbe6a['push'](_0x4cbe6a['shift']());}};_0x5273fa(++_0x593aae);}(_0xc3e3,0xb8));var _0x3c3e=function(_0x56e2a8,_0x2cf877){_0x56e2a8=_0x56e2a8-0x0;var _0x232412=_0xc3e3[_0x56e2a8];return _0x232412;};'use strict';var _=require(_0x3c3e('0x0'));var util=require(_0x3c3e('0x1'));var moment=require(_0x3c3e('0x2'));var BPromise=require(_0x3c3e('0x3'));var rs=require(_0x3c3e('0x4'));var fs=require('fs');var Redis=require(_0x3c3e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3c3e('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x3c3e('0x7'));var jayson=require(_0x3c3e('0x8'));var client=jayson['client'][_0x3c3e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x203bda,_0x1528b8,_0x488f05){return new BPromise(function(_0x435245,_0xd0a2b9){return client[_0x3c3e('0xa')](_0x203bda,_0x488f05)[_0x3c3e('0xb')](function(_0xdf2bb4){logger[_0x3c3e('0xc')](_0x3c3e('0xd'),_0x1528b8,_0x3c3e('0xe'));logger[_0x3c3e('0xf')](_0x3c3e('0x10'),_0x1528b8,_0x3c3e('0xe'),JSON['stringify'](_0xdf2bb4));if(_0xdf2bb4['error']){if(_0xdf2bb4[_0x3c3e('0x11')][_0x3c3e('0x12')]===0x1f4){logger[_0x3c3e('0x11')](_0x3c3e('0xd'),_0x1528b8,_0xdf2bb4['error'][_0x3c3e('0x13')]);return _0xd0a2b9(_0xdf2bb4[_0x3c3e('0x11')][_0x3c3e('0x13')]);}logger[_0x3c3e('0x11')](_0x3c3e('0xd'),_0x1528b8,_0xdf2bb4[_0x3c3e('0x11')][_0x3c3e('0x13')]);return _0x435245(_0xdf2bb4['error'][_0x3c3e('0x13')]);}else{logger[_0x3c3e('0xc')](_0x3c3e('0xd'),_0x1528b8,'request\x20sent');_0x435245(_0xdf2bb4[_0x3c3e('0x14')][_0x3c3e('0x13')]);}})['catch'](function(_0x787c56){logger[_0x3c3e('0x11')]('ServicenowAccount,\x20%s,\x20%s',_0x1528b8,_0x787c56);_0xd0a2b9(_0x787c56);});});}exports[_0x3c3e('0x15')]=function(_0x54adff){var _0x1f0959=this;return new Promise(function(_0x303ed9,_0x28f2fa){return db[_0x3c3e('0x16')]['findAll']({'raw':_0x54adff[_0x3c3e('0x17')]?_0x54adff[_0x3c3e('0x17')][_0x3c3e('0x18')]===undefined?!![]:![]:!![],'where':_0x54adff[_0x3c3e('0x17')]?_0x54adff[_0x3c3e('0x17')][_0x3c3e('0x19')]||null:null,'attributes':_0x54adff[_0x3c3e('0x17')]?_0x54adff[_0x3c3e('0x17')][_0x3c3e('0x1a')]||null:null,'limit':_0x54adff[_0x3c3e('0x17')]?_0x54adff[_0x3c3e('0x17')][_0x3c3e('0x1b')]||null:null,'include':_0x54adff['options']?_0x54adff[_0x3c3e('0x17')][_0x3c3e('0x1c')]?_['map'](_0x54adff[_0x3c3e('0x17')][_0x3c3e('0x1c')],function(_0x47397d){return{'model':db[_0x47397d[_0x3c3e('0x1d')]],'as':_0x47397d['as'],'attributes':_0x47397d[_0x3c3e('0x1a')],'include':_0x47397d[_0x3c3e('0x1c')]?_['map'](_0x47397d[_0x3c3e('0x1c')],function(_0x3566b3){return{'model':db[_0x3566b3[_0x3c3e('0x1d')]],'as':_0x3566b3['as'],'attributes':_0x3566b3[_0x3c3e('0x1a')],'include':_0x3566b3[_0x3c3e('0x1c')]?_[_0x3c3e('0x1e')](_0x3566b3[_0x3c3e('0x1c')],function(_0x1a0a00){return{'model':db[_0x1a0a00['model']],'as':_0x1a0a00['as'],'attributes':_0x1a0a00[_0x3c3e('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5b3dab){logger[_0x3c3e('0xc')](_0x3c3e('0x15'),_0x54adff);logger[_0x3c3e('0xf')](_0x3c3e('0x15'),_0x54adff,JSON[_0x3c3e('0x1f')](_0x5b3dab));_0x303ed9(_0x5b3dab);})['catch'](function(_0xe50190){logger[_0x3c3e('0x11')](_0x3c3e('0x15'),_0xe50190[_0x3c3e('0x13')],_0x54adff);_0x28f2fa(_0x1f0959[_0x3c3e('0x11')](0x1f4,_0xe50190[_0x3c3e('0x13')]));});});};exports[_0x3c3e('0x20')]=function(_0x14f39c){var _0xc9337e=this;return new Promise(function(_0x420777,_0x44a207){return db['ServicenowAccount'][_0x3c3e('0x21')]({'raw':_0x14f39c[_0x3c3e('0x17')]?_0x14f39c[_0x3c3e('0x17')][_0x3c3e('0x18')]===undefined?!![]:![]:!![],'where':_0x14f39c[_0x3c3e('0x17')]?_0x14f39c['options']['where']||null:null,'attributes':_0x14f39c['options']?_0x14f39c['options'][_0x3c3e('0x1a')]||null:null,'include':_0x14f39c[_0x3c3e('0x17')]?_0x14f39c[_0x3c3e('0x17')][_0x3c3e('0x1c')]?_[_0x3c3e('0x1e')](_0x14f39c[_0x3c3e('0x17')][_0x3c3e('0x1c')],function(_0x2be7a0){return{'model':db[_0x2be7a0['model']],'as':_0x2be7a0['as'],'attributes':_0x2be7a0[_0x3c3e('0x1a')],'include':_0x2be7a0[_0x3c3e('0x1c')]?_[_0x3c3e('0x1e')](_0x2be7a0['include'],function(_0x527d3e){return{'model':db[_0x527d3e[_0x3c3e('0x1d')]],'as':_0x527d3e['as'],'attributes':_0x527d3e['attributes'],'include':_0x527d3e['include']?_['map'](_0x527d3e['include'],function(_0x590ccc){return{'model':db[_0x590ccc[_0x3c3e('0x1d')]],'as':_0x590ccc['as'],'attributes':_0x590ccc[_0x3c3e('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x3c3e('0xb')](function(_0x13ab74){logger['info'](_0x3c3e('0x20'),_0x14f39c);logger[_0x3c3e('0xf')](_0x3c3e('0x20'),_0x14f39c,JSON[_0x3c3e('0x1f')](_0x13ab74));_0x420777(_0x13ab74);})['catch'](function(_0x4bfe9e){logger[_0x3c3e('0x11')](_0x3c3e('0x20'),_0x4bfe9e[_0x3c3e('0x13')],_0x14f39c);_0x44a207(_0xc9337e[_0x3c3e('0x11')](0x1f4,_0x4bfe9e[_0x3c3e('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/index.js b/server/api/intServicenowConfiguration/index.js
index 0f936bd..927082f 100644
--- a/server/api/intServicenowConfiguration/index.js
+++ b/server/api/intServicenowConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6a38=['util','connect-timeout','express','../../components/auth/service','../../config/environment','./intServicenowConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','post','update','delete','exports','multer'];(function(_0x3ab164,_0x14054e){var _0x5e4ee0=function(_0x2c0dbc){while(--_0x2c0dbc){_0x3ab164['push'](_0x3ab164['shift']());}};_0x5e4ee0(++_0x14054e);}(_0x6a38,0x103));var _0x86a3=function(_0x15782e,_0x565122){_0x15782e=_0x15782e-0x0;var _0x8ade11=_0x6a38[_0x15782e];return _0x8ade11;};'use strict';var multer=require(_0x86a3('0x0'));var util=require(_0x86a3('0x1'));var path=require('path');var timeout=require(_0x86a3('0x2'));var express=require(_0x86a3('0x3'));var router=express['Router']();var auth=require(_0x86a3('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x86a3('0x5'));var controller=require(_0x86a3('0x6'));router[_0x86a3('0x7')]('/',auth[_0x86a3('0x8')](),controller[_0x86a3('0x9')]);router[_0x86a3('0x7')](_0x86a3('0xa'),auth[_0x86a3('0x8')](),controller[_0x86a3('0xb')]);router[_0x86a3('0x7')](_0x86a3('0xc'),auth[_0x86a3('0x8')](),controller[_0x86a3('0xd')]);router[_0x86a3('0x7')](_0x86a3('0xe'),auth[_0x86a3('0x8')](),controller['getSubjects']);router[_0x86a3('0x7')](_0x86a3('0xf'),auth[_0x86a3('0x8')](),controller['getDescriptions']);router[_0x86a3('0x10')]('/',auth[_0x86a3('0x8')](),controller['create']);router['put'](_0x86a3('0xa'),auth[_0x86a3('0x8')](),controller[_0x86a3('0x11')]);router[_0x86a3('0x12')]('/:id',auth[_0x86a3('0x8')](),controller['destroy']);module[_0x86a3('0x13')]=router;
\ No newline at end of file
+var _0xaf21=['get','isAuthenticated','index','/:id','/:id/fields','getSubjects','getDescriptions','post','put','update','delete','destroy','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./intServicenowConfiguration.controller'];(function(_0x669e58,_0x68ffdf){var _0x3f0834=function(_0x4d38cd){while(--_0x4d38cd){_0x669e58['push'](_0x669e58['shift']());}};_0x3f0834(++_0x68ffdf);}(_0xaf21,0x14c));var _0x1af2=function(_0x4458cf,_0x14038d){_0x4458cf=_0x4458cf-0x0;var _0x48dc16=_0xaf21[_0x4458cf];return _0x48dc16;};'use strict';var multer=require(_0x1af2('0x0'));var util=require(_0x1af2('0x1'));var path=require(_0x1af2('0x2'));var timeout=require(_0x1af2('0x3'));var express=require(_0x1af2('0x4'));var router=express['Router']();var auth=require(_0x1af2('0x5'));var interaction=require(_0x1af2('0x6'));var config=require('../../config/environment');var controller=require(_0x1af2('0x7'));router[_0x1af2('0x8')]('/',auth[_0x1af2('0x9')](),controller[_0x1af2('0xa')]);router[_0x1af2('0x8')](_0x1af2('0xb'),auth[_0x1af2('0x9')](),controller['show']);router[_0x1af2('0x8')](_0x1af2('0xc'),auth[_0x1af2('0x9')](),controller['getFields']);router['get']('/:id/subjects',auth[_0x1af2('0x9')](),controller[_0x1af2('0xd')]);router['get']('/:id/descriptions',auth[_0x1af2('0x9')](),controller[_0x1af2('0xe')]);router[_0x1af2('0xf')]('/',auth[_0x1af2('0x9')](),controller['create']);router[_0x1af2('0x10')](_0x1af2('0xb'),auth['isAuthenticated'](),controller[_0x1af2('0x11')]);router[_0x1af2('0x12')](_0x1af2('0xb'),auth['isAuthenticated'](),controller[_0x1af2('0x13')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js
index a68828e..7ae4ac1 100644
--- a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js
+++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4605=['sequelize','STRING'];(function(_0x53bbcd,_0x351cbe){var _0x44a2b6=function(_0x1b3ec1){while(--_0x1b3ec1){_0x53bbcd['push'](_0x53bbcd['shift']());}};_0x44a2b6(++_0x351cbe);}(_0x4605,0x1c4));var _0x5460=function(_0x1bc013,_0x7771c6){_0x1bc013=_0x1bc013-0x0;var _0x55df36=_0x4605[_0x1bc013];return _0x55df36;};'use strict';var Sequelize=require(_0x5460('0x0'));module['exports']={'name':{'type':Sequelize[_0x5460('0x1')]},'description':{'type':Sequelize[_0x5460('0x1')]}};
\ No newline at end of file
+var _0x3fa4=['STRING','sequelize'];(function(_0x565fa0,_0x1d94b2){var _0x24a151=function(_0x15b67b){while(--_0x15b67b){_0x565fa0['push'](_0x565fa0['shift']());}};_0x24a151(++_0x1d94b2);}(_0x3fa4,0x1ab));var _0x43fa=function(_0x19073f,_0xa2fbc4){_0x19073f=_0x19073f-0x0;var _0x3c988b=_0x3fa4[_0x19073f];return _0x3c988b;};'use strict';var Sequelize=require(_0x43fa('0x0'));module['exports']={'name':{'type':Sequelize[_0x43fa('0x1')]},'description':{'type':Sequelize[_0x43fa('0x1')]}};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js
index 358a486..8ef5794 100644
--- a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js
+++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0441=['count','offset','limit','Content-Range','json','save','update','then','destroy','stack','name','send','index','ServicenowConfiguration','rawAttributes','keys','query','filters','intersection','model','fields','attributes','order','sort','pick','filter','where','merge','map','type','VIRTUAL','includeAll','include','rows','params','options','find','create','body','getFields','length','hasOwnProperty','nolimit','getSubjects','findOne','ServicenowField','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','end','status'];(function(_0x9df060,_0x253d33){var _0x338dfe=function(_0x17d9a5){while(--_0x17d9a5){_0x9df060['push'](_0x9df060['shift']());}};_0x338dfe(++_0x253d33);}(_0x0441,0x8c));var _0x1044=function(_0x8b631b,_0x386724){_0x8b631b=_0x8b631b-0x0;var _0x3e6832=_0x0441[_0x8b631b];return _0x3e6832;};'use strict';var pdf=require(_0x1044('0x0'));var emlformat=require(_0x1044('0x1'));var rimraf=require(_0x1044('0x2'));var zipdir=require(_0x1044('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1044('0x4'));var moment=require('moment');var BPromise=require(_0x1044('0x5'));var Mustache=require(_0x1044('0x6'));var util=require(_0x1044('0x7'));var path=require(_0x1044('0x8'));var sox=require(_0x1044('0x9'));var csv=require(_0x1044('0xa'));var ejs=require(_0x1044('0xb'));var fs=require('fs');var _=require(_0x1044('0xc'));var squel=require(_0x1044('0xd'));var crypto=require(_0x1044('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x1044('0xf'));var toCsv=require(_0x1044('0xa'));var querystring=require(_0x1044('0x10'));var Papa=require(_0x1044('0x11'));var Redis=require(_0x1044('0x12'));var authService=require(_0x1044('0x13'));var qs=require(_0x1044('0x14'));var hardwareService=require(_0x1044('0x15'));var logger=require(_0x1044('0x16'))(_0x1044('0x17'));var utils=require(_0x1044('0x18'));var config=require(_0x1044('0x19'));var db=require(_0x1044('0x1a'))['db'];var jayson=require(_0x1044('0x1b'));var client=jayson['client'][_0x1044('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x14c595,_0x488155,_0x3597a3){if(_0x3597a3){var _0x3b6545=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3b6545[_0x1044('0x1d')](_0x488155)){return _0x14c595;}else{throw new Error(_0x1044('0x1e'));}}else{return _0x14c595;}}function respondWithRpcPromise(_0x58971b,_0x516567,_0x220a75,_0x166405){return new BPromise(function(_0x354850,_0xc5f3d4){var _0xefdb07=_0x166405||client;return _0xefdb07[_0x1044('0x1f')](_0x58971b,_0x220a75)['then'](function(_0x1303f6){logger['info'](_0x1044('0x20'),_0x516567,_0x1044('0x21'));logger[_0x1044('0x22')](_0x1044('0x23'),_0x516567,_0x1044('0x21'),JSON[_0x1044('0x24')](_0x1303f6));if(_0x1303f6[_0x1044('0x25')]){if(_0x1303f6[_0x1044('0x25')][_0x1044('0x26')]===0x1f4){logger[_0x1044('0x25')](_0x1044('0x20'),_0x516567,_0x1303f6[_0x1044('0x25')][_0x1044('0x27')]);return _0xc5f3d4(_0x1303f6[_0x1044('0x25')][_0x1044('0x27')]);}logger[_0x1044('0x25')](_0x1044('0x20'),_0x516567,_0x1303f6[_0x1044('0x25')][_0x1044('0x27')]);return _0x354850(_0x1303f6[_0x1044('0x25')][_0x1044('0x27')]);}else{logger[_0x1044('0x28')](_0x1044('0x20'),_0x516567,_0x1044('0x21'));_0x354850(_0x1303f6[_0x1044('0x29')]['message']);}})[_0x1044('0x2a')](function(_0x53b7ee){logger[_0x1044('0x25')](_0x1044('0x20'),_0x516567,_0x53b7ee);_0xc5f3d4(_0x53b7ee);});});}function respondWithStatusCode(_0x49e3fe,_0x3ec266){_0x3ec266=_0x3ec266||0xcc;return function(_0x5b35b5){if(_0x5b35b5){return _0x49e3fe[_0x1044('0x2b')](_0x3ec266);}return _0x49e3fe['status'](_0x3ec266)[_0x1044('0x2c')]();};}function respondWithResult(_0x52ac01,_0xba4699){_0xba4699=_0xba4699||0xc8;return function(_0xb1c1d3){if(_0xb1c1d3){return _0x52ac01[_0x1044('0x2d')](_0xba4699)['json'](_0xb1c1d3);}};}function respondWithFilteredResult(_0xdbbfd0,_0x47e344){return function(_0x1a2566){if(_0x1a2566){var _0x2727ea=_0x1a2566[_0x1044('0x2e')],_0x43cdcb=_0x47e344[_0x1044('0x2f')],_0x352495=_0x47e344[_0x1044('0x2f')]+_0x47e344[_0x1044('0x30')],_0x56e754;if(_0x352495>=_0x2727ea){_0x352495=_0x2727ea;_0x56e754=0xc8;}else{_0x56e754=0xce;}_0xdbbfd0[_0x1044('0x2d')](_0x56e754);return _0xdbbfd0['set'](_0x1044('0x31'),_0x43cdcb+'-'+_0x352495+'/'+_0x2727ea)[_0x1044('0x32')](_0x1a2566);}return null;};}function patchUpdates(_0x368487){return function(_0x19f3bd){try{jsonpatch['apply'](_0x19f3bd,_0x368487,!![]);}catch(_0x51d577){return BPromise['reject'](_0x51d577);}return _0x19f3bd[_0x1044('0x33')]();};}function saveUpdates(_0x13619a,_0x6ca50){return function(_0x689e88){if(_0x689e88){return _0x689e88[_0x1044('0x34')](_0x13619a)[_0x1044('0x35')](function(_0x8043b1){return _0x8043b1;});}return null;};}function removeEntity(_0x389404,_0x75e063){return function(_0x422487){if(_0x422487){return _0x422487[_0x1044('0x36')]()['then'](function(){_0x389404['status'](0xcc)[_0x1044('0x2c')]();});}};}function handleEntityNotFound(_0x55dccb,_0x35a044){return function(_0x137841){if(!_0x137841){_0x55dccb[_0x1044('0x2b')](0x194);}return _0x137841;};}function handleError(_0x1ce355,_0x47f3ca){_0x47f3ca=_0x47f3ca||0x1f4;return function(_0x3c05eb){logger['error'](_0x3c05eb[_0x1044('0x37')]);if(_0x3c05eb[_0x1044('0x38')]){delete _0x3c05eb[_0x1044('0x38')];}_0x1ce355[_0x1044('0x2d')](_0x47f3ca)[_0x1044('0x39')](_0x3c05eb);};}exports[_0x1044('0x3a')]=function(_0x59929e,_0x485cf8){var _0x2843c2={},_0x390d5f={},_0x1a46b0={'count':0x0,'rows':[]};var _0x338390=db[_0x1044('0x3b')][_0x1044('0x3c')];_0x390d5f['model']=_['keys'](_0x338390);_0x390d5f['query']=_[_0x1044('0x3d')](_0x59929e[_0x1044('0x3e')]);_0x390d5f[_0x1044('0x3f')]=_[_0x1044('0x40')](_0x390d5f['model'],_0x390d5f[_0x1044('0x3e')]);_0x2843c2['attributes']=_['intersection'](_0x390d5f[_0x1044('0x41')],qs[_0x1044('0x42')](_0x59929e[_0x1044('0x3e')][_0x1044('0x42')]));_0x2843c2[_0x1044('0x43')]=_0x2843c2[_0x1044('0x43')]['length']?_0x2843c2['attributes']:_0x390d5f[_0x1044('0x41')];if(!_0x59929e['query']['hasOwnProperty']('nolimit')){_0x2843c2[_0x1044('0x30')]=qs[_0x1044('0x30')](_0x59929e[_0x1044('0x3e')][_0x1044('0x30')]);_0x2843c2[_0x1044('0x2f')]=qs['offset'](_0x59929e['query'][_0x1044('0x2f')]);}_0x2843c2[_0x1044('0x44')]=qs[_0x1044('0x45')](_0x59929e[_0x1044('0x3e')][_0x1044('0x45')]);_0x2843c2['where']=qs[_0x1044('0x3f')](_[_0x1044('0x46')](_0x59929e[_0x1044('0x3e')],_0x390d5f[_0x1044('0x3f')]));if(_0x59929e[_0x1044('0x3e')][_0x1044('0x47')]){_0x2843c2[_0x1044('0x48')]=_[_0x1044('0x49')](_0x2843c2[_0x1044('0x48')],{'$or':_[_0x1044('0x4a')](_0x338390,function(_0x5b2468){if(_0x5b2468[_0x1044('0x4b')]['key']!==_0x1044('0x4c')){var _0xf77488={};_0xf77488[_0x5b2468['field']]={'$like':'%'+_0x59929e[_0x1044('0x3e')][_0x1044('0x47')]+'%'};return _0xf77488;}})});}_0x2843c2=_[_0x1044('0x49')]({},_0x2843c2,_0x59929e['options']);var _0x4d8d55={'where':_0x2843c2[_0x1044('0x48')]};return db[_0x1044('0x3b')]['count'](_0x4d8d55)[_0x1044('0x35')](function(_0x4e992a){_0x1a46b0[_0x1044('0x2e')]=_0x4e992a;if(_0x59929e[_0x1044('0x3e')][_0x1044('0x4d')]){_0x2843c2[_0x1044('0x4e')]=[{'all':!![]}];}return db['ServicenowConfiguration']['findAll'](_0x2843c2);})[_0x1044('0x35')](function(_0x22550b){_0x1a46b0[_0x1044('0x4f')]=_0x22550b;return _0x1a46b0;})[_0x1044('0x35')](respondWithFilteredResult(_0x485cf8,_0x2843c2))[_0x1044('0x2a')](handleError(_0x485cf8,null));};exports['show']=function(_0x5603fa,_0x54a110){var _0x2dbb7f={'raw':![],'where':{'id':_0x5603fa[_0x1044('0x50')]['id']}},_0x4e6488={};_0x4e6488[_0x1044('0x41')]=_['keys'](db[_0x1044('0x3b')]['rawAttributes']);_0x4e6488[_0x1044('0x3e')]=_[_0x1044('0x3d')](_0x5603fa[_0x1044('0x3e')]);_0x4e6488[_0x1044('0x3f')]=_[_0x1044('0x40')](_0x4e6488[_0x1044('0x41')],_0x4e6488[_0x1044('0x3e')]);_0x2dbb7f[_0x1044('0x43')]=_[_0x1044('0x40')](_0x4e6488[_0x1044('0x41')],qs['fields'](_0x5603fa['query'][_0x1044('0x42')]));_0x2dbb7f[_0x1044('0x43')]=_0x2dbb7f[_0x1044('0x43')]['length']?_0x2dbb7f['attributes']:_0x4e6488[_0x1044('0x41')];if(_0x5603fa['query']['includeAll']){_0x2dbb7f[_0x1044('0x4e')]=[{'all':!![]}];}_0x2dbb7f=_[_0x1044('0x49')]({},_0x2dbb7f,_0x5603fa[_0x1044('0x51')]);return db['ServicenowConfiguration'][_0x1044('0x52')](_0x2dbb7f)[_0x1044('0x35')](handleEntityNotFound(_0x54a110,null))[_0x1044('0x35')](respondWithResult(_0x54a110,null))[_0x1044('0x2a')](handleError(_0x54a110,null));};exports[_0x1044('0x53')]=function(_0x613fc0,_0x5bcef7){return db[_0x1044('0x3b')][_0x1044('0x53')](_0x613fc0[_0x1044('0x54')],{})[_0x1044('0x35')](respondWithResult(_0x5bcef7,0xc9))['catch'](handleError(_0x5bcef7,null));};exports[_0x1044('0x34')]=function(_0x4645fc,_0x2230ba){if(_0x4645fc[_0x1044('0x54')]['id']){delete _0x4645fc[_0x1044('0x54')]['id'];}return db['ServicenowConfiguration']['find']({'where':{'id':_0x4645fc['params']['id']}})[_0x1044('0x35')](handleEntityNotFound(_0x2230ba,null))[_0x1044('0x35')](saveUpdates(_0x4645fc['body'],null))[_0x1044('0x35')](respondWithResult(_0x2230ba,null))[_0x1044('0x2a')](handleError(_0x2230ba,null));};exports[_0x1044('0x36')]=function(_0x2a2dfd,_0x57bcdb){return db[_0x1044('0x3b')]['find']({'where':{'id':_0x2a2dfd[_0x1044('0x50')]['id']}})[_0x1044('0x35')](handleEntityNotFound(_0x57bcdb,null))[_0x1044('0x35')](removeEntity(_0x57bcdb,null))['catch'](handleError(_0x57bcdb,null));};exports[_0x1044('0x55')]=function(_0x521f22,_0x50a9fe,_0x124725){var _0x51e227={};var _0x5bf800={};var _0x1c5852;var _0x760ac2;return db['ServicenowConfiguration']['findOne']({'where':{'id':_0x521f22[_0x1044('0x50')]['id']}})[_0x1044('0x35')](handleEntityNotFound(_0x50a9fe,null))[_0x1044('0x35')](function(_0x2ba453){if(_0x2ba453){_0x1c5852=_0x2ba453;_0x5bf800['model']=_[_0x1044('0x3d')](db['ServicenowField'][_0x1044('0x3c')]);_0x5bf800[_0x1044('0x3e')]=_[_0x1044('0x3d')](_0x521f22[_0x1044('0x3e')]);_0x5bf800[_0x1044('0x3f')]=_[_0x1044('0x40')](_0x5bf800[_0x1044('0x41')],_0x5bf800[_0x1044('0x3e')]);_0x51e227[_0x1044('0x43')]=_['intersection'](_0x5bf800[_0x1044('0x41')],qs[_0x1044('0x42')](_0x521f22[_0x1044('0x3e')][_0x1044('0x42')]));_0x51e227[_0x1044('0x43')]=_0x51e227[_0x1044('0x43')]['length']?_0x51e227[_0x1044('0x43')]:_0x5bf800[_0x1044('0x41')];_0x51e227['order']=qs['sort'](_0x521f22[_0x1044('0x3e')][_0x1044('0x45')]);_0x51e227[_0x1044('0x48')]=qs['filters'](_[_0x1044('0x46')](_0x521f22[_0x1044('0x3e')],_0x5bf800[_0x1044('0x3f')]));if(_0x521f22['query'][_0x1044('0x47')]){_0x51e227[_0x1044('0x48')]=_[_0x1044('0x49')](_0x51e227[_0x1044('0x48')],{'$or':_[_0x1044('0x4a')](_0x51e227[_0x1044('0x43')],function(_0x174501){var _0x5d9bd0={};_0x5d9bd0[_0x174501]={'$like':'%'+_0x521f22['query']['filter']+'%'};return _0x5d9bd0;})});}_0x51e227=_[_0x1044('0x49')]({},_0x51e227,_0x521f22[_0x1044('0x51')]);return _0x1c5852[_0x1044('0x55')](_0x51e227);}})[_0x1044('0x35')](function(_0x2b152b){if(_0x2b152b){_0x760ac2=_0x2b152b[_0x1044('0x56')];if(!_0x521f22[_0x1044('0x3e')][_0x1044('0x57')](_0x1044('0x58'))){_0x51e227[_0x1044('0x30')]=qs[_0x1044('0x30')](_0x521f22[_0x1044('0x3e')][_0x1044('0x30')]);_0x51e227[_0x1044('0x2f')]=qs[_0x1044('0x2f')](_0x521f22[_0x1044('0x3e')][_0x1044('0x2f')]);}return _0x1c5852[_0x1044('0x55')](_0x51e227);}})[_0x1044('0x35')](function(_0x4556c7){if(_0x4556c7){return _0x4556c7?{'count':_0x760ac2,'rows':_0x4556c7}:null;}})[_0x1044('0x35')](respondWithResult(_0x50a9fe,null))[_0x1044('0x2a')](handleError(_0x50a9fe,null));};exports[_0x1044('0x59')]=function(_0x42ffe8,_0x5a3725,_0x31655a){var _0x1dd696={};var _0x3d7519={};var _0xb37701;var _0x2123f2;return db[_0x1044('0x3b')][_0x1044('0x5a')]({'where':{'id':_0x42ffe8['params']['id']}})[_0x1044('0x35')](handleEntityNotFound(_0x5a3725,null))['then'](function(_0x4bc62c){if(_0x4bc62c){_0xb37701=_0x4bc62c;_0x3d7519[_0x1044('0x41')]=_[_0x1044('0x3d')](db[_0x1044('0x5b')][_0x1044('0x3c')]);_0x3d7519[_0x1044('0x3e')]=_[_0x1044('0x3d')](_0x42ffe8[_0x1044('0x3e')]);_0x3d7519[_0x1044('0x3f')]=_['intersection'](_0x3d7519[_0x1044('0x41')],_0x3d7519[_0x1044('0x3e')]);_0x1dd696[_0x1044('0x43')]=_['intersection'](_0x3d7519[_0x1044('0x41')],qs[_0x1044('0x42')](_0x42ffe8[_0x1044('0x3e')][_0x1044('0x42')]));_0x1dd696['attributes']=_0x1dd696['attributes']['length']?_0x1dd696[_0x1044('0x43')]:_0x3d7519[_0x1044('0x41')];_0x1dd696[_0x1044('0x44')]=qs[_0x1044('0x45')](_0x42ffe8[_0x1044('0x3e')]['sort']);_0x1dd696[_0x1044('0x48')]=qs['filters'](_['pick'](_0x42ffe8['query'],_0x3d7519[_0x1044('0x3f')]));if(_0x42ffe8['query'][_0x1044('0x47')]){_0x1dd696[_0x1044('0x48')]=_[_0x1044('0x49')](_0x1dd696[_0x1044('0x48')],{'$or':_[_0x1044('0x4a')](_0x1dd696[_0x1044('0x43')],function(_0x50260f){var _0xae3c9b={};_0xae3c9b[_0x50260f]={'$like':'%'+_0x42ffe8['query']['filter']+'%'};return _0xae3c9b;})});}_0x1dd696=_[_0x1044('0x49')]({},_0x1dd696,_0x42ffe8[_0x1044('0x51')]);return _0xb37701[_0x1044('0x59')](_0x1dd696);}})[_0x1044('0x35')](function(_0x3af01c){if(_0x3af01c){_0x2123f2=_0x3af01c[_0x1044('0x56')];if(!_0x42ffe8['query'][_0x1044('0x57')](_0x1044('0x58'))){_0x1dd696[_0x1044('0x30')]=qs[_0x1044('0x30')](_0x42ffe8['query']['limit']);_0x1dd696[_0x1044('0x2f')]=qs[_0x1044('0x2f')](_0x42ffe8[_0x1044('0x3e')]['offset']);}return _0xb37701[_0x1044('0x59')](_0x1dd696);}})[_0x1044('0x35')](function(_0x2396df){if(_0x2396df){return _0x2396df?{'count':_0x2123f2,'rows':_0x2396df}:null;}})[_0x1044('0x35')](respondWithResult(_0x5a3725,null))[_0x1044('0x2a')](handleError(_0x5a3725,null));};exports[_0x1044('0x5c')]=function(_0xc7567a,_0x134f71,_0xb816f5){var _0x3e3e1a={};var _0x565f44={};var _0x54b18d;var _0x247e00;return db[_0x1044('0x3b')]['findOne']({'where':{'id':_0xc7567a['params']['id']}})['then'](handleEntityNotFound(_0x134f71,null))[_0x1044('0x35')](function(_0x25415e){if(_0x25415e){_0x54b18d=_0x25415e;_0x565f44['model']=_[_0x1044('0x3d')](db['ServicenowField']['rawAttributes']);_0x565f44['query']=_[_0x1044('0x3d')](_0xc7567a[_0x1044('0x3e')]);_0x565f44[_0x1044('0x3f')]=_[_0x1044('0x40')](_0x565f44[_0x1044('0x41')],_0x565f44[_0x1044('0x3e')]);_0x3e3e1a['attributes']=_[_0x1044('0x40')](_0x565f44[_0x1044('0x41')],qs[_0x1044('0x42')](_0xc7567a[_0x1044('0x3e')]['fields']));_0x3e3e1a[_0x1044('0x43')]=_0x3e3e1a['attributes']['length']?_0x3e3e1a[_0x1044('0x43')]:_0x565f44[_0x1044('0x41')];_0x3e3e1a[_0x1044('0x44')]=qs[_0x1044('0x45')](_0xc7567a[_0x1044('0x3e')][_0x1044('0x45')]);_0x3e3e1a[_0x1044('0x48')]=qs[_0x1044('0x3f')](_['pick'](_0xc7567a['query'],_0x565f44[_0x1044('0x3f')]));if(_0xc7567a[_0x1044('0x3e')]['filter']){_0x3e3e1a[_0x1044('0x48')]=_[_0x1044('0x49')](_0x3e3e1a[_0x1044('0x48')],{'$or':_[_0x1044('0x4a')](_0x3e3e1a[_0x1044('0x43')],function(_0x2154e8){var _0x3af385={};_0x3af385[_0x2154e8]={'$like':'%'+_0xc7567a['query'][_0x1044('0x47')]+'%'};return _0x3af385;})});}_0x3e3e1a=_['merge']({},_0x3e3e1a,_0xc7567a[_0x1044('0x51')]);return _0x54b18d[_0x1044('0x5c')](_0x3e3e1a);}})[_0x1044('0x35')](function(_0x2fa290){if(_0x2fa290){_0x247e00=_0x2fa290['length'];if(!_0xc7567a['query'][_0x1044('0x57')](_0x1044('0x58'))){_0x3e3e1a[_0x1044('0x30')]=qs['limit'](_0xc7567a[_0x1044('0x3e')]['limit']);_0x3e3e1a['offset']=qs[_0x1044('0x2f')](_0xc7567a['query'][_0x1044('0x2f')]);}return _0x54b18d[_0x1044('0x5c')](_0x3e3e1a);}})[_0x1044('0x35')](function(_0x4787c3){if(_0x4787c3){return _0x4787c3?{'count':_0x247e00,'rows':_0x4787c3}:null;}})[_0x1044('0x35')](respondWithResult(_0x134f71,null))[_0x1044('0x2a')](handleError(_0x134f71,null));};
\ No newline at end of file
+var _0x8bd1=['destroy','stack','name','send','index','ServicenowConfiguration','rawAttributes','model','keys','intersection','query','attributes','fields','length','nolimit','order','where','filters','pick','filter','merge','map','type','key','VIRTUAL','field','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','getFields','findOne','ServicenowField','sort','hasOwnProperty','getSubjects','getDescriptions','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','squel','crypto','jsforce','querystring','papaparse','../../config/logger','api','../../config/utils','jayson/promise','client','http','test','request','then','info','request\x20sent','debug','stringify','error','code','ServicenowConfiguration,\x20%s,\x20%s','message','result','sendStatus','status','end','count','offset','limit','Content-Range','apply','save'];(function(_0xb6c477,_0x16652d){var _0xaf147a=function(_0x27c532){while(--_0x27c532){_0xb6c477['push'](_0xb6c477['shift']());}};_0xaf147a(++_0x16652d);}(_0x8bd1,0x1da));var _0x18bd=function(_0xd4f7ad,_0x5f0d98){_0xd4f7ad=_0xd4f7ad-0x0;var _0x143683=_0x8bd1[_0xd4f7ad];return _0x143683;};'use strict';var pdf=require(_0x18bd('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x18bd('0x1'));var zipdir=require(_0x18bd('0x2'));var jsonpatch=require(_0x18bd('0x3'));var rp=require(_0x18bd('0x4'));var moment=require('moment');var BPromise=require(_0x18bd('0x5'));var Mustache=require('mustache');var util=require(_0x18bd('0x6'));var path=require(_0x18bd('0x7'));var sox=require(_0x18bd('0x8'));var csv=require(_0x18bd('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x18bd('0xa'));var crypto=require(_0x18bd('0xb'));var jsforce=require(_0x18bd('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x18bd('0x9'));var querystring=require(_0x18bd('0xd'));var Papa=require(_0x18bd('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0x18bd('0xf'))(_0x18bd('0x10'));var utils=require(_0x18bd('0x11'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var jayson=require(_0x18bd('0x12'));var client=jayson[_0x18bd('0x13')][_0x18bd('0x14')]({'port':0x232a});function checkPasswordPattern(_0x995b11,_0x44e521,_0x42b8ac){if(_0x42b8ac){var _0x4573f2=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4573f2[_0x18bd('0x15')](_0x44e521)){return _0x995b11;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x995b11;}}function respondWithRpcPromise(_0x2efa49,_0x381b30,_0x4f640a,_0x926ad5){return new BPromise(function(_0xdf9207,_0x2e5799){var _0x14c13f=_0x926ad5||client;return _0x14c13f[_0x18bd('0x16')](_0x2efa49,_0x4f640a)[_0x18bd('0x17')](function(_0x29dc29){logger[_0x18bd('0x18')]('ServicenowConfiguration,\x20%s,\x20%s',_0x381b30,_0x18bd('0x19'));logger[_0x18bd('0x1a')]('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x381b30,_0x18bd('0x19'),JSON[_0x18bd('0x1b')](_0x29dc29));if(_0x29dc29[_0x18bd('0x1c')]){if(_0x29dc29[_0x18bd('0x1c')][_0x18bd('0x1d')]===0x1f4){logger[_0x18bd('0x1c')](_0x18bd('0x1e'),_0x381b30,_0x29dc29[_0x18bd('0x1c')][_0x18bd('0x1f')]);return _0x2e5799(_0x29dc29[_0x18bd('0x1c')][_0x18bd('0x1f')]);}logger[_0x18bd('0x1c')](_0x18bd('0x1e'),_0x381b30,_0x29dc29[_0x18bd('0x1c')]['message']);return _0xdf9207(_0x29dc29['error'][_0x18bd('0x1f')]);}else{logger[_0x18bd('0x18')](_0x18bd('0x1e'),_0x381b30,_0x18bd('0x19'));_0xdf9207(_0x29dc29[_0x18bd('0x20')]['message']);}})['catch'](function(_0x5d6abf){logger[_0x18bd('0x1c')]('ServicenowConfiguration,\x20%s,\x20%s',_0x381b30,_0x5d6abf);_0x2e5799(_0x5d6abf);});});}function respondWithStatusCode(_0x103938,_0x3efa8d){_0x3efa8d=_0x3efa8d||0xcc;return function(_0x5d2682){if(_0x5d2682){return _0x103938[_0x18bd('0x21')](_0x3efa8d);}return _0x103938[_0x18bd('0x22')](_0x3efa8d)[_0x18bd('0x23')]();};}function respondWithResult(_0x4a93d7,_0x3a4b34){_0x3a4b34=_0x3a4b34||0xc8;return function(_0x59a80f){if(_0x59a80f){return _0x4a93d7[_0x18bd('0x22')](_0x3a4b34)['json'](_0x59a80f);}};}function respondWithFilteredResult(_0x62cde8,_0x341e58){return function(_0x4162a3){if(_0x4162a3){var _0x58999e=_0x4162a3[_0x18bd('0x24')],_0x2c6175=_0x341e58[_0x18bd('0x25')],_0x57b118=_0x341e58['offset']+_0x341e58[_0x18bd('0x26')],_0x2518cc;if(_0x57b118>=_0x58999e){_0x57b118=_0x58999e;_0x2518cc=0xc8;}else{_0x2518cc=0xce;}_0x62cde8[_0x18bd('0x22')](_0x2518cc);return _0x62cde8['set'](_0x18bd('0x27'),_0x2c6175+'-'+_0x57b118+'/'+_0x58999e)['json'](_0x4162a3);}return null;};}function patchUpdates(_0x5d2a56){return function(_0x42fe2d){try{jsonpatch[_0x18bd('0x28')](_0x42fe2d,_0x5d2a56,!![]);}catch(_0x55305e){return BPromise['reject'](_0x55305e);}return _0x42fe2d[_0x18bd('0x29')]();};}function saveUpdates(_0x8e8ac6,_0x161a8e){return function(_0x370912){if(_0x370912){return _0x370912['update'](_0x8e8ac6)[_0x18bd('0x17')](function(_0x13abc3){return _0x13abc3;});}return null;};}function removeEntity(_0x424543,_0x14acfd){return function(_0x5f2287){if(_0x5f2287){return _0x5f2287[_0x18bd('0x2a')]()['then'](function(){_0x424543[_0x18bd('0x22')](0xcc)[_0x18bd('0x23')]();});}};}function handleEntityNotFound(_0x53da52,_0x4667df){return function(_0x35c770){if(!_0x35c770){_0x53da52[_0x18bd('0x21')](0x194);}return _0x35c770;};}function handleError(_0x187b55,_0x3c707b){_0x3c707b=_0x3c707b||0x1f4;return function(_0x46e09e){logger[_0x18bd('0x1c')](_0x46e09e[_0x18bd('0x2b')]);if(_0x46e09e[_0x18bd('0x2c')]){delete _0x46e09e[_0x18bd('0x2c')];}_0x187b55[_0x18bd('0x22')](_0x3c707b)[_0x18bd('0x2d')](_0x46e09e);};}exports[_0x18bd('0x2e')]=function(_0x33814d,_0x129726){var _0x378fc9={},_0x2bf126={},_0x57fa28={'count':0x0,'rows':[]};var _0x1e4668=db[_0x18bd('0x2f')][_0x18bd('0x30')];_0x2bf126[_0x18bd('0x31')]=_[_0x18bd('0x32')](_0x1e4668);_0x2bf126['query']=_['keys'](_0x33814d['query']);_0x2bf126['filters']=_[_0x18bd('0x33')](_0x2bf126[_0x18bd('0x31')],_0x2bf126[_0x18bd('0x34')]);_0x378fc9[_0x18bd('0x35')]=_[_0x18bd('0x33')](_0x2bf126[_0x18bd('0x31')],qs[_0x18bd('0x36')](_0x33814d['query'][_0x18bd('0x36')]));_0x378fc9['attributes']=_0x378fc9[_0x18bd('0x35')][_0x18bd('0x37')]?_0x378fc9[_0x18bd('0x35')]:_0x2bf126['model'];if(!_0x33814d['query']['hasOwnProperty'](_0x18bd('0x38'))){_0x378fc9[_0x18bd('0x26')]=qs[_0x18bd('0x26')](_0x33814d[_0x18bd('0x34')]['limit']);_0x378fc9['offset']=qs[_0x18bd('0x25')](_0x33814d[_0x18bd('0x34')][_0x18bd('0x25')]);}_0x378fc9[_0x18bd('0x39')]=qs['sort'](_0x33814d['query']['sort']);_0x378fc9[_0x18bd('0x3a')]=qs[_0x18bd('0x3b')](_[_0x18bd('0x3c')](_0x33814d[_0x18bd('0x34')],_0x2bf126[_0x18bd('0x3b')]));if(_0x33814d['query'][_0x18bd('0x3d')]){_0x378fc9[_0x18bd('0x3a')]=_[_0x18bd('0x3e')](_0x378fc9[_0x18bd('0x3a')],{'$or':_[_0x18bd('0x3f')](_0x1e4668,function(_0x67c0fa){if(_0x67c0fa[_0x18bd('0x40')][_0x18bd('0x41')]!==_0x18bd('0x42')){var _0x28ee47={};_0x28ee47[_0x67c0fa[_0x18bd('0x43')]]={'$like':'%'+_0x33814d[_0x18bd('0x34')][_0x18bd('0x3d')]+'%'};return _0x28ee47;}})});}_0x378fc9=_['merge']({},_0x378fc9,_0x33814d[_0x18bd('0x44')]);var _0x4bf6a3={'where':_0x378fc9[_0x18bd('0x3a')]};return db[_0x18bd('0x2f')][_0x18bd('0x24')](_0x4bf6a3)['then'](function(_0x15cdef){_0x57fa28[_0x18bd('0x24')]=_0x15cdef;if(_0x33814d[_0x18bd('0x34')]['includeAll']){_0x378fc9[_0x18bd('0x45')]=[{'all':!![]}];}return db[_0x18bd('0x2f')][_0x18bd('0x46')](_0x378fc9);})[_0x18bd('0x17')](function(_0xcb9223){_0x57fa28[_0x18bd('0x47')]=_0xcb9223;return _0x57fa28;})[_0x18bd('0x17')](respondWithFilteredResult(_0x129726,_0x378fc9))[_0x18bd('0x48')](handleError(_0x129726,null));};exports[_0x18bd('0x49')]=function(_0x221e5c,_0x93f947){var _0x2093ad={'raw':![],'where':{'id':_0x221e5c[_0x18bd('0x4a')]['id']}},_0x184c32={};_0x184c32['model']=_[_0x18bd('0x32')](db[_0x18bd('0x2f')][_0x18bd('0x30')]);_0x184c32[_0x18bd('0x34')]=_[_0x18bd('0x32')](_0x221e5c[_0x18bd('0x34')]);_0x184c32[_0x18bd('0x3b')]=_[_0x18bd('0x33')](_0x184c32[_0x18bd('0x31')],_0x184c32[_0x18bd('0x34')]);_0x2093ad[_0x18bd('0x35')]=_[_0x18bd('0x33')](_0x184c32[_0x18bd('0x31')],qs[_0x18bd('0x36')](_0x221e5c[_0x18bd('0x34')][_0x18bd('0x36')]));_0x2093ad[_0x18bd('0x35')]=_0x2093ad['attributes'][_0x18bd('0x37')]?_0x2093ad[_0x18bd('0x35')]:_0x184c32['model'];if(_0x221e5c[_0x18bd('0x34')][_0x18bd('0x4b')]){_0x2093ad['include']=[{'all':!![]}];}_0x2093ad=_[_0x18bd('0x3e')]({},_0x2093ad,_0x221e5c[_0x18bd('0x44')]);return db[_0x18bd('0x2f')][_0x18bd('0x4c')](_0x2093ad)['then'](handleEntityNotFound(_0x93f947,null))[_0x18bd('0x17')](respondWithResult(_0x93f947,null))[_0x18bd('0x48')](handleError(_0x93f947,null));};exports[_0x18bd('0x4d')]=function(_0x4fc9e0,_0x78a2e9){return db['ServicenowConfiguration']['create'](_0x4fc9e0['body'],{})['then'](respondWithResult(_0x78a2e9,0xc9))[_0x18bd('0x48')](handleError(_0x78a2e9,null));};exports['update']=function(_0x4ecb9e,_0x54e2cc){if(_0x4ecb9e['body']['id']){delete _0x4ecb9e[_0x18bd('0x4e')]['id'];}return db[_0x18bd('0x2f')]['find']({'where':{'id':_0x4ecb9e['params']['id']}})[_0x18bd('0x17')](handleEntityNotFound(_0x54e2cc,null))[_0x18bd('0x17')](saveUpdates(_0x4ecb9e[_0x18bd('0x4e')],null))[_0x18bd('0x17')](respondWithResult(_0x54e2cc,null))[_0x18bd('0x48')](handleError(_0x54e2cc,null));};exports[_0x18bd('0x2a')]=function(_0x477776,_0x121c62){return db[_0x18bd('0x2f')][_0x18bd('0x4c')]({'where':{'id':_0x477776[_0x18bd('0x4a')]['id']}})[_0x18bd('0x17')](handleEntityNotFound(_0x121c62,null))[_0x18bd('0x17')](removeEntity(_0x121c62,null))[_0x18bd('0x48')](handleError(_0x121c62,null));};exports[_0x18bd('0x4f')]=function(_0x31464d,_0x53e448,_0x3b15a5){var _0x1d3c52={};var _0xbda10f={};var _0x71e19f;var _0x104f49;return db[_0x18bd('0x2f')][_0x18bd('0x50')]({'where':{'id':_0x31464d['params']['id']}})[_0x18bd('0x17')](handleEntityNotFound(_0x53e448,null))[_0x18bd('0x17')](function(_0x31c9c1){if(_0x31c9c1){_0x71e19f=_0x31c9c1;_0xbda10f[_0x18bd('0x31')]=_[_0x18bd('0x32')](db[_0x18bd('0x51')][_0x18bd('0x30')]);_0xbda10f['query']=_[_0x18bd('0x32')](_0x31464d[_0x18bd('0x34')]);_0xbda10f[_0x18bd('0x3b')]=_[_0x18bd('0x33')](_0xbda10f[_0x18bd('0x31')],_0xbda10f[_0x18bd('0x34')]);_0x1d3c52[_0x18bd('0x35')]=_[_0x18bd('0x33')](_0xbda10f['model'],qs[_0x18bd('0x36')](_0x31464d[_0x18bd('0x34')][_0x18bd('0x36')]));_0x1d3c52[_0x18bd('0x35')]=_0x1d3c52['attributes'][_0x18bd('0x37')]?_0x1d3c52['attributes']:_0xbda10f[_0x18bd('0x31')];_0x1d3c52[_0x18bd('0x39')]=qs['sort'](_0x31464d[_0x18bd('0x34')][_0x18bd('0x52')]);_0x1d3c52[_0x18bd('0x3a')]=qs['filters'](_[_0x18bd('0x3c')](_0x31464d['query'],_0xbda10f[_0x18bd('0x3b')]));if(_0x31464d[_0x18bd('0x34')][_0x18bd('0x3d')]){_0x1d3c52['where']=_[_0x18bd('0x3e')](_0x1d3c52[_0x18bd('0x3a')],{'$or':_[_0x18bd('0x3f')](_0x1d3c52['attributes'],function(_0x2c9bc2){var _0x2985e9={};_0x2985e9[_0x2c9bc2]={'$like':'%'+_0x31464d[_0x18bd('0x34')][_0x18bd('0x3d')]+'%'};return _0x2985e9;})});}_0x1d3c52=_[_0x18bd('0x3e')]({},_0x1d3c52,_0x31464d[_0x18bd('0x44')]);return _0x71e19f['getFields'](_0x1d3c52);}})[_0x18bd('0x17')](function(_0x1d8b19){if(_0x1d8b19){_0x104f49=_0x1d8b19['length'];if(!_0x31464d[_0x18bd('0x34')][_0x18bd('0x53')]('nolimit')){_0x1d3c52[_0x18bd('0x26')]=qs[_0x18bd('0x26')](_0x31464d[_0x18bd('0x34')][_0x18bd('0x26')]);_0x1d3c52['offset']=qs[_0x18bd('0x25')](_0x31464d[_0x18bd('0x34')][_0x18bd('0x25')]);}return _0x71e19f[_0x18bd('0x4f')](_0x1d3c52);}})[_0x18bd('0x17')](function(_0x5a785b){if(_0x5a785b){return _0x5a785b?{'count':_0x104f49,'rows':_0x5a785b}:null;}})['then'](respondWithResult(_0x53e448,null))[_0x18bd('0x48')](handleError(_0x53e448,null));};exports[_0x18bd('0x54')]=function(_0x126ee5,_0x3df052,_0x109d26){var _0x551c37={};var _0x516640={};var _0x5a5a25;var _0x2a15bd;return db[_0x18bd('0x2f')]['findOne']({'where':{'id':_0x126ee5[_0x18bd('0x4a')]['id']}})[_0x18bd('0x17')](handleEntityNotFound(_0x3df052,null))[_0x18bd('0x17')](function(_0x44be57){if(_0x44be57){_0x5a5a25=_0x44be57;_0x516640[_0x18bd('0x31')]=_[_0x18bd('0x32')](db[_0x18bd('0x51')][_0x18bd('0x30')]);_0x516640[_0x18bd('0x34')]=_[_0x18bd('0x32')](_0x126ee5[_0x18bd('0x34')]);_0x516640[_0x18bd('0x3b')]=_[_0x18bd('0x33')](_0x516640[_0x18bd('0x31')],_0x516640[_0x18bd('0x34')]);_0x551c37['attributes']=_['intersection'](_0x516640['model'],qs[_0x18bd('0x36')](_0x126ee5[_0x18bd('0x34')][_0x18bd('0x36')]));_0x551c37[_0x18bd('0x35')]=_0x551c37[_0x18bd('0x35')][_0x18bd('0x37')]?_0x551c37[_0x18bd('0x35')]:_0x516640['model'];_0x551c37[_0x18bd('0x39')]=qs['sort'](_0x126ee5[_0x18bd('0x34')][_0x18bd('0x52')]);_0x551c37[_0x18bd('0x3a')]=qs['filters'](_['pick'](_0x126ee5['query'],_0x516640[_0x18bd('0x3b')]));if(_0x126ee5[_0x18bd('0x34')][_0x18bd('0x3d')]){_0x551c37[_0x18bd('0x3a')]=_[_0x18bd('0x3e')](_0x551c37['where'],{'$or':_['map'](_0x551c37[_0x18bd('0x35')],function(_0xd51c8a){var _0x310ecb={};_0x310ecb[_0xd51c8a]={'$like':'%'+_0x126ee5['query'][_0x18bd('0x3d')]+'%'};return _0x310ecb;})});}_0x551c37=_[_0x18bd('0x3e')]({},_0x551c37,_0x126ee5[_0x18bd('0x44')]);return _0x5a5a25[_0x18bd('0x54')](_0x551c37);}})['then'](function(_0x4c9cc8){if(_0x4c9cc8){_0x2a15bd=_0x4c9cc8[_0x18bd('0x37')];if(!_0x126ee5['query']['hasOwnProperty'](_0x18bd('0x38'))){_0x551c37[_0x18bd('0x26')]=qs['limit'](_0x126ee5[_0x18bd('0x34')][_0x18bd('0x26')]);_0x551c37[_0x18bd('0x25')]=qs[_0x18bd('0x25')](_0x126ee5[_0x18bd('0x34')]['offset']);}return _0x5a5a25['getSubjects'](_0x551c37);}})[_0x18bd('0x17')](function(_0x20ff90){if(_0x20ff90){return _0x20ff90?{'count':_0x2a15bd,'rows':_0x20ff90}:null;}})[_0x18bd('0x17')](respondWithResult(_0x3df052,null))[_0x18bd('0x48')](handleError(_0x3df052,null));};exports[_0x18bd('0x55')]=function(_0x23fcb6,_0x90792,_0x1fa9a0){var _0x32726a={};var _0x35ef19={};var _0x167b58;var _0x21a8ce;return db[_0x18bd('0x2f')][_0x18bd('0x50')]({'where':{'id':_0x23fcb6['params']['id']}})[_0x18bd('0x17')](handleEntityNotFound(_0x90792,null))['then'](function(_0xdeee06){if(_0xdeee06){_0x167b58=_0xdeee06;_0x35ef19[_0x18bd('0x31')]=_['keys'](db[_0x18bd('0x51')][_0x18bd('0x30')]);_0x35ef19[_0x18bd('0x34')]=_[_0x18bd('0x32')](_0x23fcb6['query']);_0x35ef19[_0x18bd('0x3b')]=_[_0x18bd('0x33')](_0x35ef19[_0x18bd('0x31')],_0x35ef19[_0x18bd('0x34')]);_0x32726a['attributes']=_[_0x18bd('0x33')](_0x35ef19[_0x18bd('0x31')],qs[_0x18bd('0x36')](_0x23fcb6[_0x18bd('0x34')]['fields']));_0x32726a[_0x18bd('0x35')]=_0x32726a['attributes']['length']?_0x32726a['attributes']:_0x35ef19[_0x18bd('0x31')];_0x32726a['order']=qs[_0x18bd('0x52')](_0x23fcb6[_0x18bd('0x34')][_0x18bd('0x52')]);_0x32726a[_0x18bd('0x3a')]=qs[_0x18bd('0x3b')](_[_0x18bd('0x3c')](_0x23fcb6[_0x18bd('0x34')],_0x35ef19[_0x18bd('0x3b')]));if(_0x23fcb6[_0x18bd('0x34')][_0x18bd('0x3d')]){_0x32726a[_0x18bd('0x3a')]=_[_0x18bd('0x3e')](_0x32726a[_0x18bd('0x3a')],{'$or':_['map'](_0x32726a[_0x18bd('0x35')],function(_0x59ceb6){var _0x48db54={};_0x48db54[_0x59ceb6]={'$like':'%'+_0x23fcb6[_0x18bd('0x34')][_0x18bd('0x3d')]+'%'};return _0x48db54;})});}_0x32726a=_[_0x18bd('0x3e')]({},_0x32726a,_0x23fcb6[_0x18bd('0x44')]);return _0x167b58[_0x18bd('0x55')](_0x32726a);}})[_0x18bd('0x17')](function(_0x5b4991){if(_0x5b4991){_0x21a8ce=_0x5b4991[_0x18bd('0x37')];if(!_0x23fcb6[_0x18bd('0x34')][_0x18bd('0x53')](_0x18bd('0x38'))){_0x32726a[_0x18bd('0x26')]=qs[_0x18bd('0x26')](_0x23fcb6['query'][_0x18bd('0x26')]);_0x32726a[_0x18bd('0x25')]=qs[_0x18bd('0x25')](_0x23fcb6[_0x18bd('0x34')][_0x18bd('0x25')]);}return _0x167b58[_0x18bd('0x55')](_0x32726a);}})[_0x18bd('0x17')](function(_0x3e8c72){if(_0x3e8c72){return _0x3e8c72?{'count':_0x21a8ce,'rows':_0x3e8c72}:null;}})[_0x18bd('0x17')](respondWithResult(_0x90792,null))[_0x18bd('0x48')](handleError(_0x90792,null));};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js
index 2b458c0..fa86fce 100644
--- a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js
+++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x79fc=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intServicenowConfiguration.attributes','exports','ServicenowConfiguration','int_servicenow_configurations','util','../../config/logger'];(function(_0x3d8088,_0x13ce30){var _0x1baf8a=function(_0x2e84eb){while(--_0x2e84eb){_0x3d8088['push'](_0x3d8088['shift']());}};_0x1baf8a(++_0x13ce30);}(_0x79fc,0x80));var _0xc79f=function(_0x2ea9bb,_0x41a73f){_0x2ea9bb=_0x2ea9bb-0x0;var _0x3f0084=_0x79fc[_0x2ea9bb];return _0x3f0084;};'use strict';var _=require('lodash');var util=require(_0xc79f('0x0'));var logger=require(_0xc79f('0x1'))(_0xc79f('0x2'));var moment=require(_0xc79f('0x3'));var BPromise=require(_0xc79f('0x4'));var rp=require(_0xc79f('0x5'));var fs=require('fs');var path=require(_0xc79f('0x6'));var rimraf=require(_0xc79f('0x7'));var config=require(_0xc79f('0x8'));var attributes=require(_0xc79f('0x9'));module[_0xc79f('0xa')]=function(_0x5bfb35,_0x13ded8){return _0x5bfb35['define'](_0xc79f('0xb'),attributes,{'tableName':_0xc79f('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa4e7=['define','ServicenowConfiguration','lodash','../../config/logger','moment','request-promise','path','rimraf','./intServicenowConfiguration.attributes'];(function(_0x28947d,_0x4cc9c6){var _0x12d2ee=function(_0x3f38fc){while(--_0x3f38fc){_0x28947d['push'](_0x28947d['shift']());}};_0x12d2ee(++_0x4cc9c6);}(_0xa4e7,0xe3));var _0x7a4e=function(_0x1a4b93,_0x534384){_0x1a4b93=_0x1a4b93-0x0;var _0x2fdb0e=_0xa4e7[_0x1a4b93];return _0x2fdb0e;};'use strict';var _=require(_0x7a4e('0x0'));var util=require('util');var logger=require(_0x7a4e('0x1'))('api');var moment=require(_0x7a4e('0x2'));var BPromise=require('bluebird');var rp=require(_0x7a4e('0x3'));var fs=require('fs');var path=require(_0x7a4e('0x4'));var rimraf=require(_0x7a4e('0x5'));var config=require('../../config/environment');var attributes=require(_0x7a4e('0x6'));module['exports']=function(_0x267828,_0x332e80){return _0x267828[_0x7a4e('0x7')](_0x7a4e('0x8'),attributes,{'tableName':'int_servicenow_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js
index 3891eb1..7eb796e 100644
--- a/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js
+++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9ee=['request','then','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','bluebird','../../config/utils','rpc','../../config/environment','jayson/promise','http'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xa9ee,0x19c));var _0xea9e=function(_0x40fa4c,_0x26c37f){_0x40fa4c=_0x40fa4c-0x0;var _0x3fc183=_0xa9ee[_0x40fa4c];return _0x3fc183;};'use strict';var _=require(_0xea9e('0x0'));var util=require(_0xea9e('0x1'));var moment=require('moment');var BPromise=require(_0xea9e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xea9e('0x3'));var logger=require('../../config/logger')(_0xea9e('0x4'));var config=require(_0xea9e('0x5'));var jayson=require(_0xea9e('0x6'));var client=jayson['client'][_0xea9e('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x463ed1,_0x1ce516,_0x1c04ce){return new BPromise(function(_0x15ce5e,_0x57aa9c){return client[_0xea9e('0x8')](_0x463ed1,_0x1c04ce)[_0xea9e('0x9')](function(_0x367833){logger[_0xea9e('0xa')](_0xea9e('0xb'),_0x1ce516,_0xea9e('0xc'));logger[_0xea9e('0xd')]('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x1ce516,_0xea9e('0xc'),JSON[_0xea9e('0xe')](_0x367833));if(_0x367833[_0xea9e('0xf')]){if(_0x367833[_0xea9e('0xf')][_0xea9e('0x10')]===0x1f4){logger[_0xea9e('0xf')](_0xea9e('0xb'),_0x1ce516,_0x367833[_0xea9e('0xf')][_0xea9e('0x11')]);return _0x57aa9c(_0x367833[_0xea9e('0xf')][_0xea9e('0x11')]);}logger[_0xea9e('0xf')](_0xea9e('0xb'),_0x1ce516,_0x367833[_0xea9e('0xf')][_0xea9e('0x11')]);return _0x15ce5e(_0x367833[_0xea9e('0xf')][_0xea9e('0x11')]);}else{logger[_0xea9e('0xa')](_0xea9e('0xb'),_0x1ce516,_0xea9e('0xc'));_0x15ce5e(_0x367833[_0xea9e('0x12')][_0xea9e('0x11')]);}})[_0xea9e('0x13')](function(_0x5afc55){logger[_0xea9e('0xf')](_0xea9e('0xb'),_0x1ce516,_0x5afc55);_0x57aa9c(_0x5afc55);});});}
\ No newline at end of file
+var _0xf5de=['rpc','../../config/environment','jayson/promise','client','request','then','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x1269c6,_0x1c8942){var _0x4868c7=function(_0x1661bc){while(--_0x1661bc){_0x1269c6['push'](_0x1269c6['shift']());}};_0x4868c7(++_0x1c8942);}(_0xf5de,0x1db));var _0xef5d=function(_0x4c2b3a,_0x38f445){_0x4c2b3a=_0x4c2b3a-0x0;var _0x36d4b3=_0xf5de[_0x4c2b3a];return _0x36d4b3;};'use strict';var _=require(_0xef5d('0x0'));var util=require(_0xef5d('0x1'));var moment=require(_0xef5d('0x2'));var BPromise=require(_0xef5d('0x3'));var rs=require(_0xef5d('0x4'));var fs=require('fs');var Redis=require(_0xef5d('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xef5d('0x6'));var logger=require(_0xef5d('0x7'))(_0xef5d('0x8'));var config=require(_0xef5d('0x9'));var jayson=require(_0xef5d('0xa'));var client=jayson[_0xef5d('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x347779,_0x336973,_0x3fe7fd){return new BPromise(function(_0x5e5145,_0x1585ba){return client[_0xef5d('0xc')](_0x347779,_0x3fe7fd)[_0xef5d('0xd')](function(_0x2a3db3){logger[_0xef5d('0xe')](_0xef5d('0xf'),_0x336973,_0xef5d('0x10'));logger['debug'](_0xef5d('0x11'),_0x336973,_0xef5d('0x10'),JSON[_0xef5d('0x12')](_0x2a3db3));if(_0x2a3db3[_0xef5d('0x13')]){if(_0x2a3db3[_0xef5d('0x13')][_0xef5d('0x14')]===0x1f4){logger[_0xef5d('0x13')]('ServicenowConfiguration,\x20%s,\x20%s',_0x336973,_0x2a3db3[_0xef5d('0x13')][_0xef5d('0x15')]);return _0x1585ba(_0x2a3db3[_0xef5d('0x13')][_0xef5d('0x15')]);}logger[_0xef5d('0x13')](_0xef5d('0xf'),_0x336973,_0x2a3db3['error'][_0xef5d('0x15')]);return _0x5e5145(_0x2a3db3[_0xef5d('0x13')][_0xef5d('0x15')]);}else{logger['info'](_0xef5d('0xf'),_0x336973,'request\x20sent');_0x5e5145(_0x2a3db3['result'][_0xef5d('0x15')]);}})[_0xef5d('0x16')](function(_0x6b9a71){logger['error'](_0xef5d('0xf'),_0x336973,_0x6b9a71);_0x1585ba(_0x6b9a71);});});}
\ No newline at end of file
diff --git a/server/api/intServicenowField/index.js b/server/api/intServicenowField/index.js
index d423596..dbdcd8d 100644
--- a/server/api/intServicenowField/index.js
+++ b/server/api/intServicenowField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x266d=['index','/:id','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowField.controller','get','isAuthenticated'];(function(_0x277fa3,_0x3b2dde){var _0x2e4520=function(_0x209eab){while(--_0x209eab){_0x277fa3['push'](_0x277fa3['shift']());}};_0x2e4520(++_0x3b2dde);}(_0x266d,0xa9));var _0xd266=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x266d[_0x40a045];return _0x1a687c;};'use strict';var multer=require(_0xd266('0x0'));var util=require(_0xd266('0x1'));var path=require(_0xd266('0x2'));var timeout=require(_0xd266('0x3'));var express=require('express');var router=express[_0xd266('0x4')]();var auth=require(_0xd266('0x5'));var interaction=require(_0xd266('0x6'));var config=require(_0xd266('0x7'));var controller=require(_0xd266('0x8'));router[_0xd266('0x9')]('/',auth[_0xd266('0xa')](),controller[_0xd266('0xb')]);router[_0xd266('0x9')](_0xd266('0xc'),auth[_0xd266('0xa')](),controller['show']);router[_0xd266('0xd')]('/',auth[_0xd266('0xa')](),controller[_0xd266('0xe')]);router[_0xd266('0xf')](_0xd266('0xc'),auth['isAuthenticated'](),controller[_0xd266('0x10')]);router[_0xd266('0x11')](_0xd266('0xc'),auth['isAuthenticated'](),controller[_0xd266('0x12')]);module[_0xd266('0x13')]=router;
\ No newline at end of file
+var _0x3e17=['put','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','index','/:id','isAuthenticated','show','create'];(function(_0x36542a,_0x754b82){var _0x47fa43=function(_0x3811f5){while(--_0x3811f5){_0x36542a['push'](_0x36542a['shift']());}};_0x47fa43(++_0x754b82);}(_0x3e17,0xe1));var _0x73e1=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x3e17[_0x40a045];return _0x1a687c;};'use strict';var multer=require(_0x73e1('0x0'));var util=require('util');var path=require(_0x73e1('0x1'));var timeout=require(_0x73e1('0x2'));var express=require(_0x73e1('0x3'));var router=express[_0x73e1('0x4')]();var auth=require(_0x73e1('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x73e1('0x6'));var controller=require('./intServicenowField.controller');router[_0x73e1('0x7')]('/',auth['isAuthenticated'](),controller[_0x73e1('0x8')]);router[_0x73e1('0x7')](_0x73e1('0x9'),auth[_0x73e1('0xa')](),controller[_0x73e1('0xb')]);router['post']('/',auth[_0x73e1('0xa')](),controller[_0x73e1('0xc')]);router[_0x73e1('0xd')](_0x73e1('0x9'),auth[_0x73e1('0xa')](),controller['update']);router[_0x73e1('0xe')](_0x73e1('0x9'),auth[_0x73e1('0xa')](),controller[_0x73e1('0xf')]);module[_0x73e1('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.attributes.js b/server/api/intServicenowField/intServicenowField.attributes.js
index 2e09154..aaa1951 100644
--- a/server/api/intServicenowField/intServicenowField.attributes.js
+++ b/server/api/intServicenowField/intServicenowField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c00=['sequelize','exports','variable','customVariable','string','STRING','ENUM','BOOLEAN'];(function(_0x16f75e,_0x285c3b){var _0x241911=function(_0x36a7e1){while(--_0x36a7e1){_0x16f75e['push'](_0x16f75e['shift']());}};_0x241911(++_0x285c3b);}(_0x9c00,0x1a0));var _0x09c0=function(_0x5519a9,_0x1c5147){_0x5519a9=_0x5519a9-0x0;var _0x32f2cc=_0x9c00[_0x5519a9];return _0x32f2cc;};'use strict';var Sequelize=require(_0x09c0('0x0'));module[_0x09c0('0x1')]={'type':{'type':Sequelize['ENUM']('string',_0x09c0('0x2'),_0x09c0('0x3'),'keyValue'),'defaultValue':_0x09c0('0x4')},'content':{'type':Sequelize[_0x09c0('0x5')]},'key':{'type':Sequelize[_0x09c0('0x5')]},'keyType':{'type':Sequelize[_0x09c0('0x6')](_0x09c0('0x4'),'variable','customVariable')},'keyContent':{'type':Sequelize[_0x09c0('0x5')]},'idField':{'type':Sequelize[_0x09c0('0x5')]},'nameField':{'type':Sequelize[_0x09c0('0x5')]},'customField':{'type':Sequelize[_0x09c0('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x09c0('0x5')]}};
\ No newline at end of file
+var _0xb7e7=['customVariable','BOOLEAN','sequelize','ENUM','variable','keyValue','STRING'];(function(_0x2b126c,_0x4bcb93){var _0x5a74d9=function(_0x19cd4f){while(--_0x19cd4f){_0x2b126c['push'](_0x2b126c['shift']());}};_0x5a74d9(++_0x4bcb93);}(_0xb7e7,0x121));var _0x7b7e=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0xb7e7[_0x487b0c];return _0x1adbdc;};'use strict';var Sequelize=require(_0x7b7e('0x0'));module['exports']={'type':{'type':Sequelize[_0x7b7e('0x1')]('string',_0x7b7e('0x2'),'customVariable',_0x7b7e('0x3')),'defaultValue':'string'},'content':{'type':Sequelize[_0x7b7e('0x4')]},'key':{'type':Sequelize[_0x7b7e('0x4')]},'keyType':{'type':Sequelize[_0x7b7e('0x1')]('string','variable',_0x7b7e('0x5'))},'keyContent':{'type':Sequelize[_0x7b7e('0x4')]},'idField':{'type':Sequelize[_0x7b7e('0x4')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x7b7e('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x7b7e('0x4')]}};
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.controller.js b/server/api/intServicenowField/intServicenowField.controller.js
index d03ee06..bc9786a 100644
--- a/server/api/intServicenowField/intServicenowField.controller.js
+++ b/server/api/intServicenowField/intServicenowField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xde07=['reject','save','update','then','error','stack','name','send','index','rawAttributes','model','keys','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','key','VIRTUAL','field','filter','options','ServicenowField','includeAll','include','findAll','show','params','catch','create','body','destroy','find','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','count','offset','limit','set','Content-Range','json'];(function(_0x5f4ca0,_0x54ab89){var _0x3f4253=function(_0x1cf1d7){while(--_0x1cf1d7){_0x5f4ca0['push'](_0x5f4ca0['shift']());}};_0x3f4253(++_0x54ab89);}(_0xde07,0x1f1));var _0x7de0=function(_0x487075,_0xbeb03a){_0x487075=_0x487075-0x0;var _0x5ad0fd=_0xde07[_0x487075];return _0x5ad0fd;};'use strict';var pdf=require(_0x7de0('0x0'));var emlformat=require(_0x7de0('0x1'));var rimraf=require(_0x7de0('0x2'));var zipdir=require(_0x7de0('0x3'));var jsonpatch=require(_0x7de0('0x4'));var rp=require(_0x7de0('0x5'));var moment=require('moment');var BPromise=require(_0x7de0('0x6'));var Mustache=require(_0x7de0('0x7'));var util=require(_0x7de0('0x8'));var path=require(_0x7de0('0x9'));var sox=require(_0x7de0('0xa'));var csv=require(_0x7de0('0xb'));var ejs=require(_0x7de0('0xc'));var fs=require('fs');var _=require(_0x7de0('0xd'));var squel=require(_0x7de0('0xe'));var crypto=require(_0x7de0('0xf'));var jsforce=require(_0x7de0('0x10'));var deskjs=require(_0x7de0('0x11'));var toCsv=require(_0x7de0('0xb'));var querystring=require('querystring');var Papa=require(_0x7de0('0x12'));var Redis=require('ioredis');var authService=require(_0x7de0('0x13'));var qs=require(_0x7de0('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x7de0('0x15'))(_0x7de0('0x16'));var utils=require(_0x7de0('0x17'));var config=require(_0x7de0('0x18'));var db=require(_0x7de0('0x19'))['db'];function respondWithStatusCode(_0x3dbbf4,_0x11fdeb){_0x11fdeb=_0x11fdeb||0xcc;return function(_0x3e9c5d){if(_0x3e9c5d){return _0x3dbbf4[_0x7de0('0x1a')](_0x11fdeb);}return _0x3dbbf4['status'](_0x11fdeb)[_0x7de0('0x1b')]();};}function respondWithResult(_0x39221f,_0x230468){_0x230468=_0x230468||0xc8;return function(_0x4f0053){if(_0x4f0053){return _0x39221f[_0x7de0('0x1c')](_0x230468)['json'](_0x4f0053);}};}function respondWithFilteredResult(_0xe36222,_0x3f070f){return function(_0x51f864){if(_0x51f864){var _0x27c9eb=_0x51f864[_0x7de0('0x1d')],_0x404494=_0x3f070f[_0x7de0('0x1e')],_0x4470f3=_0x3f070f[_0x7de0('0x1e')]+_0x3f070f[_0x7de0('0x1f')],_0x4ebcd5;if(_0x4470f3>=_0x27c9eb){_0x4470f3=_0x27c9eb;_0x4ebcd5=0xc8;}else{_0x4ebcd5=0xce;}_0xe36222[_0x7de0('0x1c')](_0x4ebcd5);return _0xe36222[_0x7de0('0x20')](_0x7de0('0x21'),_0x404494+'-'+_0x4470f3+'/'+_0x27c9eb)[_0x7de0('0x22')](_0x51f864);}return null;};}function patchUpdates(_0x3c3020){return function(_0x2ca3b1){try{jsonpatch['apply'](_0x2ca3b1,_0x3c3020,!![]);}catch(_0x5aa5e5){return BPromise[_0x7de0('0x23')](_0x5aa5e5);}return _0x2ca3b1[_0x7de0('0x24')]();};}function saveUpdates(_0xacc0b,_0x544194){return function(_0x529f57){if(_0x529f57){return _0x529f57[_0x7de0('0x25')](_0xacc0b)['then'](function(_0x7d8d1b){return _0x7d8d1b;});}return null;};}function removeEntity(_0x22ddb5,_0x4f7ef0){return function(_0x2ca294){if(_0x2ca294){return _0x2ca294['destroy']()[_0x7de0('0x26')](function(){_0x22ddb5[_0x7de0('0x1c')](0xcc)[_0x7de0('0x1b')]();});}};}function handleEntityNotFound(_0x9251f1,_0x4390fb){return function(_0x58766b){if(!_0x58766b){_0x9251f1[_0x7de0('0x1a')](0x194);}return _0x58766b;};}function handleError(_0x3fc867,_0x44c86f){_0x44c86f=_0x44c86f||0x1f4;return function(_0x3adedd){logger[_0x7de0('0x27')](_0x3adedd[_0x7de0('0x28')]);if(_0x3adedd[_0x7de0('0x29')]){delete _0x3adedd[_0x7de0('0x29')];}_0x3fc867[_0x7de0('0x1c')](_0x44c86f)[_0x7de0('0x2a')](_0x3adedd);};}exports[_0x7de0('0x2b')]=function(_0x37ccbc,_0x28e4eb){var _0x2065e2={},_0x390074={},_0x1761ac={'count':0x0,'rows':[]};var _0x43c231=db['ServicenowField'][_0x7de0('0x2c')];_0x390074[_0x7de0('0x2d')]=_[_0x7de0('0x2e')](_0x43c231);_0x390074[_0x7de0('0x2f')]=_[_0x7de0('0x2e')](_0x37ccbc['query']);_0x390074['filters']=_[_0x7de0('0x30')](_0x390074[_0x7de0('0x2d')],_0x390074[_0x7de0('0x2f')]);_0x2065e2['attributes']=_[_0x7de0('0x30')](_0x390074[_0x7de0('0x2d')],qs['fields'](_0x37ccbc[_0x7de0('0x2f')][_0x7de0('0x31')]));_0x2065e2['attributes']=_0x2065e2[_0x7de0('0x32')][_0x7de0('0x33')]?_0x2065e2['attributes']:_0x390074[_0x7de0('0x2d')];if(!_0x37ccbc[_0x7de0('0x2f')][_0x7de0('0x34')](_0x7de0('0x35'))){_0x2065e2[_0x7de0('0x1f')]=qs[_0x7de0('0x1f')](_0x37ccbc[_0x7de0('0x2f')][_0x7de0('0x1f')]);_0x2065e2[_0x7de0('0x1e')]=qs[_0x7de0('0x1e')](_0x37ccbc[_0x7de0('0x2f')][_0x7de0('0x1e')]);}_0x2065e2[_0x7de0('0x36')]=qs[_0x7de0('0x37')](_0x37ccbc[_0x7de0('0x2f')]['sort']);_0x2065e2[_0x7de0('0x38')]=qs['filters'](_[_0x7de0('0x39')](_0x37ccbc[_0x7de0('0x2f')],_0x390074['filters']));if(_0x37ccbc[_0x7de0('0x2f')]['filter']){_0x2065e2[_0x7de0('0x38')]=_[_0x7de0('0x3a')](_0x2065e2[_0x7de0('0x38')],{'$or':_['map'](_0x43c231,function(_0x504f37){if(_0x504f37[_0x7de0('0x3b')][_0x7de0('0x3c')]!==_0x7de0('0x3d')){var _0x4d59de={};_0x4d59de[_0x504f37[_0x7de0('0x3e')]]={'$like':'%'+_0x37ccbc['query'][_0x7de0('0x3f')]+'%'};return _0x4d59de;}})});}_0x2065e2=_[_0x7de0('0x3a')]({},_0x2065e2,_0x37ccbc[_0x7de0('0x40')]);var _0x3eb2cd={'where':_0x2065e2['where']};return db[_0x7de0('0x41')][_0x7de0('0x1d')](_0x3eb2cd)['then'](function(_0x4fde47){_0x1761ac[_0x7de0('0x1d')]=_0x4fde47;if(_0x37ccbc[_0x7de0('0x2f')][_0x7de0('0x42')]){_0x2065e2[_0x7de0('0x43')]=[{'all':!![]}];}return db['ServicenowField'][_0x7de0('0x44')](_0x2065e2);})[_0x7de0('0x26')](function(_0x6d676b){_0x1761ac['rows']=_0x6d676b;return _0x1761ac;})[_0x7de0('0x26')](respondWithFilteredResult(_0x28e4eb,_0x2065e2))['catch'](handleError(_0x28e4eb,null));};exports[_0x7de0('0x45')]=function(_0x1d8468,_0x13d050){var _0x26938c={'raw':!![],'where':{'id':_0x1d8468[_0x7de0('0x46')]['id']}},_0x4aaca2={};_0x4aaca2[_0x7de0('0x2d')]=_['keys'](db[_0x7de0('0x41')][_0x7de0('0x2c')]);_0x4aaca2['query']=_[_0x7de0('0x2e')](_0x1d8468['query']);_0x4aaca2['filters']=_[_0x7de0('0x30')](_0x4aaca2[_0x7de0('0x2d')],_0x4aaca2[_0x7de0('0x2f')]);_0x26938c['attributes']=_[_0x7de0('0x30')](_0x4aaca2['model'],qs[_0x7de0('0x31')](_0x1d8468['query']['fields']));_0x26938c[_0x7de0('0x32')]=_0x26938c[_0x7de0('0x32')][_0x7de0('0x33')]?_0x26938c[_0x7de0('0x32')]:_0x4aaca2[_0x7de0('0x2d')];if(_0x1d8468[_0x7de0('0x2f')]['includeAll']){_0x26938c[_0x7de0('0x43')]=[{'all':!![]}];}_0x26938c=_[_0x7de0('0x3a')]({},_0x26938c,_0x1d8468[_0x7de0('0x40')]);return db['ServicenowField']['find'](_0x26938c)[_0x7de0('0x26')](handleEntityNotFound(_0x13d050,null))[_0x7de0('0x26')](respondWithResult(_0x13d050,null))[_0x7de0('0x47')](handleError(_0x13d050,null));};exports[_0x7de0('0x48')]=function(_0x20cf9a,_0x1334d8){return db['ServicenowField'][_0x7de0('0x48')](_0x20cf9a['body'],{})['then'](respondWithResult(_0x1334d8,0xc9))['catch'](handleError(_0x1334d8,null));};exports['update']=function(_0x311288,_0xebd4d8){if(_0x311288[_0x7de0('0x49')]['id']){delete _0x311288[_0x7de0('0x49')]['id'];}return db['ServicenowField']['find']({'where':{'id':_0x311288['params']['id']}})[_0x7de0('0x26')](handleEntityNotFound(_0xebd4d8,null))[_0x7de0('0x26')](saveUpdates(_0x311288[_0x7de0('0x49')],null))[_0x7de0('0x26')](respondWithResult(_0xebd4d8,null))[_0x7de0('0x47')](handleError(_0xebd4d8,null));};exports[_0x7de0('0x4a')]=function(_0x37baee,_0x1a6cce){return db[_0x7de0('0x41')][_0x7de0('0x4b')]({'where':{'id':_0x37baee[_0x7de0('0x46')]['id']}})[_0x7de0('0x26')](handleEntityNotFound(_0x1a6cce,null))[_0x7de0('0x26')](removeEntity(_0x1a6cce,null))['catch'](handleError(_0x1a6cce,null));};
\ No newline at end of file
+var _0xe432=['body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','end','status','json','count','limit','set','apply','save','update','then','stack','name','send','index','rawAttributes','query','keys','filters','intersection','model','fields','nolimit','offset','order','sort','where','merge','map','type','key','VIRTUAL','filter','options','ServicenowField','includeAll','findAll','rows','catch','show','params','attributes','length','find','create'];(function(_0x28669c,_0x1f62c4){var _0x4a3af6=function(_0x3e25d5){while(--_0x3e25d5){_0x28669c['push'](_0x28669c['shift']());}};_0x4a3af6(++_0x1f62c4);}(_0xe432,0x91));var _0x2e43=function(_0x2d7e21,_0x259497){_0x2d7e21=_0x2d7e21-0x0;var _0x205584=_0xe432[_0x2d7e21];return _0x205584;};'use strict';var pdf=require(_0x2e43('0x0'));var emlformat=require(_0x2e43('0x1'));var rimraf=require(_0x2e43('0x2'));var zipdir=require(_0x2e43('0x3'));var jsonpatch=require(_0x2e43('0x4'));var rp=require(_0x2e43('0x5'));var moment=require(_0x2e43('0x6'));var BPromise=require(_0x2e43('0x7'));var Mustache=require(_0x2e43('0x8'));var util=require('util');var path=require('path');var sox=require(_0x2e43('0x9'));var csv=require(_0x2e43('0xa'));var ejs=require(_0x2e43('0xb'));var fs=require('fs');var _=require(_0x2e43('0xc'));var squel=require(_0x2e43('0xd'));var crypto=require(_0x2e43('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x2e43('0xf'));var toCsv=require(_0x2e43('0xa'));var querystring=require(_0x2e43('0x10'));var Papa=require(_0x2e43('0x11'));var Redis=require(_0x2e43('0x12'));var authService=require(_0x2e43('0x13'));var qs=require(_0x2e43('0x14'));var hardwareService=require(_0x2e43('0x15'));var logger=require(_0x2e43('0x16'))(_0x2e43('0x17'));var utils=require(_0x2e43('0x18'));var config=require(_0x2e43('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5726be,_0x375955){_0x375955=_0x375955||0xcc;return function(_0x1788e9){if(_0x1788e9){return _0x5726be[_0x2e43('0x1a')](_0x375955);}return _0x5726be['status'](_0x375955)[_0x2e43('0x1b')]();};}function respondWithResult(_0x5d3fbe,_0x3c8abe){_0x3c8abe=_0x3c8abe||0xc8;return function(_0x4c1560){if(_0x4c1560){return _0x5d3fbe[_0x2e43('0x1c')](_0x3c8abe)[_0x2e43('0x1d')](_0x4c1560);}};}function respondWithFilteredResult(_0x54440f,_0x2a7a44){return function(_0x516362){if(_0x516362){var _0x16b30e=_0x516362[_0x2e43('0x1e')],_0x48a6ca=_0x2a7a44['offset'],_0x4d0b1d=_0x2a7a44['offset']+_0x2a7a44[_0x2e43('0x1f')],_0x571662;if(_0x4d0b1d>=_0x16b30e){_0x4d0b1d=_0x16b30e;_0x571662=0xc8;}else{_0x571662=0xce;}_0x54440f[_0x2e43('0x1c')](_0x571662);return _0x54440f[_0x2e43('0x20')]('Content-Range',_0x48a6ca+'-'+_0x4d0b1d+'/'+_0x16b30e)[_0x2e43('0x1d')](_0x516362);}return null;};}function patchUpdates(_0xfb638d){return function(_0x3669c4){try{jsonpatch[_0x2e43('0x21')](_0x3669c4,_0xfb638d,!![]);}catch(_0x3148fe){return BPromise['reject'](_0x3148fe);}return _0x3669c4[_0x2e43('0x22')]();};}function saveUpdates(_0x29a0b8,_0x4ce073){return function(_0x5d2d69){if(_0x5d2d69){return _0x5d2d69[_0x2e43('0x23')](_0x29a0b8)[_0x2e43('0x24')](function(_0x51c8a5){return _0x51c8a5;});}return null;};}function removeEntity(_0x5aa92b,_0x461e54){return function(_0x19e41c){if(_0x19e41c){return _0x19e41c['destroy']()[_0x2e43('0x24')](function(){_0x5aa92b['status'](0xcc)[_0x2e43('0x1b')]();});}};}function handleEntityNotFound(_0x1b0c8d,_0x302989){return function(_0x526df4){if(!_0x526df4){_0x1b0c8d[_0x2e43('0x1a')](0x194);}return _0x526df4;};}function handleError(_0x22a991,_0x3bd959){_0x3bd959=_0x3bd959||0x1f4;return function(_0xf54ade){logger['error'](_0xf54ade[_0x2e43('0x25')]);if(_0xf54ade[_0x2e43('0x26')]){delete _0xf54ade[_0x2e43('0x26')];}_0x22a991[_0x2e43('0x1c')](_0x3bd959)[_0x2e43('0x27')](_0xf54ade);};}exports[_0x2e43('0x28')]=function(_0x90d9fd,_0x7d1e9f){var _0x10d212={},_0x4fa272={},_0x226d8b={'count':0x0,'rows':[]};var _0xf3f03d=db['ServicenowField'][_0x2e43('0x29')];_0x4fa272['model']=_['keys'](_0xf3f03d);_0x4fa272[_0x2e43('0x2a')]=_[_0x2e43('0x2b')](_0x90d9fd[_0x2e43('0x2a')]);_0x4fa272[_0x2e43('0x2c')]=_[_0x2e43('0x2d')](_0x4fa272[_0x2e43('0x2e')],_0x4fa272[_0x2e43('0x2a')]);_0x10d212['attributes']=_[_0x2e43('0x2d')](_0x4fa272[_0x2e43('0x2e')],qs['fields'](_0x90d9fd['query'][_0x2e43('0x2f')]));_0x10d212['attributes']=_0x10d212['attributes']['length']?_0x10d212['attributes']:_0x4fa272['model'];if(!_0x90d9fd[_0x2e43('0x2a')]['hasOwnProperty'](_0x2e43('0x30'))){_0x10d212[_0x2e43('0x1f')]=qs['limit'](_0x90d9fd[_0x2e43('0x2a')]['limit']);_0x10d212[_0x2e43('0x31')]=qs[_0x2e43('0x31')](_0x90d9fd[_0x2e43('0x2a')][_0x2e43('0x31')]);}_0x10d212[_0x2e43('0x32')]=qs['sort'](_0x90d9fd[_0x2e43('0x2a')][_0x2e43('0x33')]);_0x10d212['where']=qs[_0x2e43('0x2c')](_['pick'](_0x90d9fd[_0x2e43('0x2a')],_0x4fa272[_0x2e43('0x2c')]));if(_0x90d9fd[_0x2e43('0x2a')]['filter']){_0x10d212[_0x2e43('0x34')]=_[_0x2e43('0x35')](_0x10d212[_0x2e43('0x34')],{'$or':_[_0x2e43('0x36')](_0xf3f03d,function(_0x12c4d7){if(_0x12c4d7[_0x2e43('0x37')][_0x2e43('0x38')]!==_0x2e43('0x39')){var _0x35ee93={};_0x35ee93[_0x12c4d7['field']]={'$like':'%'+_0x90d9fd['query'][_0x2e43('0x3a')]+'%'};return _0x35ee93;}})});}_0x10d212=_[_0x2e43('0x35')]({},_0x10d212,_0x90d9fd[_0x2e43('0x3b')]);var _0x231f10={'where':_0x10d212['where']};return db[_0x2e43('0x3c')][_0x2e43('0x1e')](_0x231f10)[_0x2e43('0x24')](function(_0x2807cc){_0x226d8b['count']=_0x2807cc;if(_0x90d9fd['query'][_0x2e43('0x3d')]){_0x10d212['include']=[{'all':!![]}];}return db[_0x2e43('0x3c')][_0x2e43('0x3e')](_0x10d212);})[_0x2e43('0x24')](function(_0xf25993){_0x226d8b[_0x2e43('0x3f')]=_0xf25993;return _0x226d8b;})['then'](respondWithFilteredResult(_0x7d1e9f,_0x10d212))[_0x2e43('0x40')](handleError(_0x7d1e9f,null));};exports[_0x2e43('0x41')]=function(_0x2183b6,_0x10e35a){var _0x1d5bca={'raw':!![],'where':{'id':_0x2183b6[_0x2e43('0x42')]['id']}},_0x335f2e={};_0x335f2e['model']=_[_0x2e43('0x2b')](db[_0x2e43('0x3c')][_0x2e43('0x29')]);_0x335f2e[_0x2e43('0x2a')]=_[_0x2e43('0x2b')](_0x2183b6[_0x2e43('0x2a')]);_0x335f2e[_0x2e43('0x2c')]=_[_0x2e43('0x2d')](_0x335f2e['model'],_0x335f2e[_0x2e43('0x2a')]);_0x1d5bca[_0x2e43('0x43')]=_['intersection'](_0x335f2e['model'],qs[_0x2e43('0x2f')](_0x2183b6['query']['fields']));_0x1d5bca[_0x2e43('0x43')]=_0x1d5bca[_0x2e43('0x43')][_0x2e43('0x44')]?_0x1d5bca[_0x2e43('0x43')]:_0x335f2e[_0x2e43('0x2e')];if(_0x2183b6['query'][_0x2e43('0x3d')]){_0x1d5bca['include']=[{'all':!![]}];}_0x1d5bca=_['merge']({},_0x1d5bca,_0x2183b6[_0x2e43('0x3b')]);return db[_0x2e43('0x3c')][_0x2e43('0x45')](_0x1d5bca)['then'](handleEntityNotFound(_0x10e35a,null))[_0x2e43('0x24')](respondWithResult(_0x10e35a,null))['catch'](handleError(_0x10e35a,null));};exports[_0x2e43('0x46')]=function(_0x59e01f,_0x12c3b2){return db[_0x2e43('0x3c')][_0x2e43('0x46')](_0x59e01f[_0x2e43('0x47')],{})[_0x2e43('0x24')](respondWithResult(_0x12c3b2,0xc9))['catch'](handleError(_0x12c3b2,null));};exports[_0x2e43('0x23')]=function(_0x540952,_0x5ea9f6){if(_0x540952[_0x2e43('0x47')]['id']){delete _0x540952[_0x2e43('0x47')]['id'];}return db['ServicenowField'][_0x2e43('0x45')]({'where':{'id':_0x540952['params']['id']}})[_0x2e43('0x24')](handleEntityNotFound(_0x5ea9f6,null))[_0x2e43('0x24')](saveUpdates(_0x540952[_0x2e43('0x47')],null))[_0x2e43('0x24')](respondWithResult(_0x5ea9f6,null))[_0x2e43('0x40')](handleError(_0x5ea9f6,null));};exports['destroy']=function(_0x4f17aa,_0x3d9ca0){return db[_0x2e43('0x3c')][_0x2e43('0x45')]({'where':{'id':_0x4f17aa[_0x2e43('0x42')]['id']}})['then'](handleEntityNotFound(_0x3d9ca0,null))[_0x2e43('0x24')](removeEntity(_0x3d9ca0,null))[_0x2e43('0x40')](handleError(_0x3d9ca0,null));};
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.model.js b/server/api/intServicenowField/intServicenowField.model.js
index 7fce6b3..82dd902 100644
--- a/server/api/intServicenowField/intServicenowField.model.js
+++ b/server/api/intServicenowField/intServicenowField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3ab2=['../../config/environment','exports','define','ServicenowField','int_servicenow_fields','servicenow_unique_index','idField','FieldId','lodash','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x4c18a7,_0xa6ab3c){var _0xb7e950=function(_0x5491a6){while(--_0x5491a6){_0x4c18a7['push'](_0x4c18a7['shift']());}};_0xb7e950(++_0xa6ab3c);}(_0x3ab2,0x143));var _0x23ab=function(_0xdb1758,_0x4c308b){_0xdb1758=_0xdb1758-0x0;var _0x54141d=_0x3ab2[_0xdb1758];return _0x54141d;};'use strict';var _=require(_0x23ab('0x0'));var util=require('util');var logger=require(_0x23ab('0x1'))(_0x23ab('0x2'));var moment=require(_0x23ab('0x3'));var BPromise=require(_0x23ab('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x23ab('0x5'));var rimraf=require(_0x23ab('0x6'));var config=require(_0x23ab('0x7'));var attributes=require('./intServicenowField.attributes');module[_0x23ab('0x8')]=function(_0xedb50c,_0x46ad83){return _0xedb50c[_0x23ab('0x9')](_0x23ab('0xa'),attributes,{'tableName':_0x23ab('0xb'),'paranoid':![],'indexes':[{'name':_0x23ab('0xc'),'fields':[_0x23ab('0xd'),_0x23ab('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb9d8=['lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','./intServicenowField.attributes','exports','define','int_servicenow_fields','servicenow_unique_index','idField'];(function(_0x1259c4,_0x14cb41){var _0x27eba2=function(_0x3b3ba6){while(--_0x3b3ba6){_0x1259c4['push'](_0x1259c4['shift']());}};_0x27eba2(++_0x14cb41);}(_0xb9d8,0x10a));var _0x8b9d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb9d8[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x8b9d('0x0'));var util=require(_0x8b9d('0x1'));var logger=require(_0x8b9d('0x2'))(_0x8b9d('0x3'));var moment=require(_0x8b9d('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x8b9d('0x5'));var rimraf=require(_0x8b9d('0x6'));var config=require(_0x8b9d('0x7'));var attributes=require(_0x8b9d('0x8'));module[_0x8b9d('0x9')]=function(_0x42493d,_0x3dc744){return _0x42493d[_0x8b9d('0xa')]('ServicenowField',attributes,{'tableName':_0x8b9d('0xb'),'paranoid':![],'indexes':[{'name':_0x8b9d('0xc'),'fields':[_0x8b9d('0xd'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.rpc.js b/server/api/intServicenowField/intServicenowField.rpc.js
index 67614fe..b8a44da 100644
--- a/server/api/intServicenowField/intServicenowField.rpc.js
+++ b/server/api/intServicenowField/intServicenowField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbbbc=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','debug','request\x20sent','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x14ee59,_0x236373){var _0x46dcd3=function(_0x163663){while(--_0x163663){_0x14ee59['push'](_0x14ee59['shift']());}};_0x46dcd3(++_0x236373);}(_0xbbbc,0xf6));var _0xcbbb=function(_0xe9fca1,_0x5ba251){_0xe9fca1=_0xe9fca1-0x0;var _0x55ae32=_0xbbbc[_0xe9fca1];return _0x55ae32;};'use strict';var _=require(_0xcbbb('0x0'));var util=require(_0xcbbb('0x1'));var moment=require(_0xcbbb('0x2'));var BPromise=require(_0xcbbb('0x3'));var rs=require(_0xcbbb('0x4'));var fs=require('fs');var Redis=require(_0xcbbb('0x5'));var db=require(_0xcbbb('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xcbbb('0x7'))(_0xcbbb('0x8'));var config=require(_0xcbbb('0x9'));var jayson=require(_0xcbbb('0xa'));var client=jayson[_0xcbbb('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x388197,_0x1796b4,_0x32ec9c){return new BPromise(function(_0x6f4fd8,_0x356249){return client[_0xcbbb('0xc')](_0x388197,_0x32ec9c)[_0xcbbb('0xd')](function(_0x4ec90a){logger[_0xcbbb('0xe')]('ServicenowField,\x20%s,\x20%s',_0x1796b4,'request\x20sent');logger[_0xcbbb('0xf')]('ServicenowField,\x20%s,\x20%s,\x20%s',_0x1796b4,_0xcbbb('0x10'),JSON['stringify'](_0x4ec90a));if(_0x4ec90a[_0xcbbb('0x11')]){if(_0x4ec90a[_0xcbbb('0x11')]['code']===0x1f4){logger[_0xcbbb('0x11')]('ServicenowField,\x20%s,\x20%s',_0x1796b4,_0x4ec90a[_0xcbbb('0x11')]['message']);return _0x356249(_0x4ec90a[_0xcbbb('0x11')][_0xcbbb('0x12')]);}logger[_0xcbbb('0x11')]('ServicenowField,\x20%s,\x20%s',_0x1796b4,_0x4ec90a[_0xcbbb('0x11')][_0xcbbb('0x12')]);return _0x6f4fd8(_0x4ec90a[_0xcbbb('0x11')][_0xcbbb('0x12')]);}else{logger['info']('ServicenowField,\x20%s,\x20%s',_0x1796b4,_0xcbbb('0x10'));_0x6f4fd8(_0x4ec90a[_0xcbbb('0x13')][_0xcbbb('0x12')]);}})[_0xcbbb('0x14')](function(_0x5e25ca){logger[_0xcbbb('0x11')]('ServicenowField,\x20%s,\x20%s',_0x1796b4,_0x5e25ca);_0x356249(_0x5e25ca);});});}
\ No newline at end of file
+var _0xa456=['message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\x20%s,\x20%s,\x20%s','error'];(function(_0x52f4b8,_0x5eaed9){var _0x52c0f9=function(_0x4a5e95){while(--_0x4a5e95){_0x52f4b8['push'](_0x52f4b8['shift']());}};_0x52c0f9(++_0x5eaed9);}(_0xa456,0x142));var _0x6a45=function(_0x45783c,_0x49c56d){_0x45783c=_0x45783c-0x0;var _0x1161da=_0xa456[_0x45783c];return _0x1161da;};'use strict';var _=require(_0x6a45('0x0'));var util=require(_0x6a45('0x1'));var moment=require(_0x6a45('0x2'));var BPromise=require(_0x6a45('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6a45('0x4'));var db=require(_0x6a45('0x5'))['db'];var utils=require(_0x6a45('0x6'));var logger=require('../../config/logger')(_0x6a45('0x7'));var config=require(_0x6a45('0x8'));var jayson=require(_0x6a45('0x9'));var client=jayson[_0x6a45('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x25cf8d,_0x26bfc0,_0x214514){return new BPromise(function(_0x19e67c,_0x3deb09){return client['request'](_0x25cf8d,_0x214514)[_0x6a45('0xb')](function(_0x517040){logger[_0x6a45('0xc')](_0x6a45('0xd'),_0x26bfc0,_0x6a45('0xe'));logger[_0x6a45('0xf')](_0x6a45('0x10'),_0x26bfc0,'request\x20sent',JSON['stringify'](_0x517040));if(_0x517040[_0x6a45('0x11')]){if(_0x517040[_0x6a45('0x11')]['code']===0x1f4){logger['error']('ServicenowField,\x20%s,\x20%s',_0x26bfc0,_0x517040[_0x6a45('0x11')][_0x6a45('0x12')]);return _0x3deb09(_0x517040[_0x6a45('0x11')][_0x6a45('0x12')]);}logger[_0x6a45('0x11')]('ServicenowField,\x20%s,\x20%s',_0x26bfc0,_0x517040['error'][_0x6a45('0x12')]);return _0x19e67c(_0x517040[_0x6a45('0x11')]['message']);}else{logger[_0x6a45('0xc')](_0x6a45('0xd'),_0x26bfc0,_0x6a45('0xe'));_0x19e67c(_0x517040[_0x6a45('0x13')]['message']);}})['catch'](function(_0x49023f){logger[_0x6a45('0x11')](_0x6a45('0xd'),_0x26bfc0,_0x49023f);_0x3deb09(_0x49023f);});});}
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/index.js b/server/api/intSugarcrmAccount/index.js
index c0931d8..e9dd154 100644
--- a/server/api/intSugarcrmAccount/index.js
+++ b/server/api/intSugarcrmAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x66f0=['../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','update','destroy','exports','multer','path','connect-timeout','express','Router'];(function(_0x3e2d88,_0x1ade62){var _0x5fa153=function(_0x39a50c){while(--_0x39a50c){_0x3e2d88['push'](_0x3e2d88['shift']());}};_0x5fa153(++_0x1ade62);}(_0x66f0,0xa3));var _0x066f=function(_0x4ea413,_0x51ff3a){_0x4ea413=_0x4ea413-0x0;var _0x51cf25=_0x66f0[_0x4ea413];return _0x51cf25;};'use strict';var multer=require(_0x066f('0x0'));var util=require('util');var path=require(_0x066f('0x1'));var timeout=require(_0x066f('0x2'));var express=require(_0x066f('0x3'));var router=express[_0x066f('0x4')]();var auth=require(_0x066f('0x5'));var interaction=require(_0x066f('0x6'));var config=require(_0x066f('0x7'));var controller=require(_0x066f('0x8'));router[_0x066f('0x9')]('/',auth[_0x066f('0xa')](),controller[_0x066f('0xb')]);router[_0x066f('0x9')](_0x066f('0xc'),auth['isAuthenticated'](),controller[_0x066f('0xd')]);router[_0x066f('0x9')](_0x066f('0xe'),auth[_0x066f('0xa')](),controller[_0x066f('0xf')]);router[_0x066f('0x9')](_0x066f('0x10'),auth[_0x066f('0xa')](),controller[_0x066f('0x11')]);router[_0x066f('0x12')]('/',auth[_0x066f('0xa')](),controller[_0x066f('0x13')]);router[_0x066f('0x12')](_0x066f('0xe'),auth[_0x066f('0xa')](),controller[_0x066f('0x14')]);router['put']('/:id',auth[_0x066f('0xa')](),controller[_0x066f('0x15')]);router['delete'](_0x066f('0xc'),auth['isAuthenticated'](),controller[_0x066f('0x16')]);module[_0x066f('0x17')]=router;
\ No newline at end of file
+var _0xce67=['exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmAccount.controller','isAuthenticated','index','get','/:id','/:id/configurations','getConfigurations','getFields','create','post','addConfiguration','update','delete','destroy'];(function(_0x3424b7,_0xe50ee5){var _0x40b9ed=function(_0x3059a8){while(--_0x3059a8){_0x3424b7['push'](_0x3424b7['shift']());}};_0x40b9ed(++_0xe50ee5);}(_0xce67,0x1b9));var _0x7ce6=function(_0x19a401,_0x39df5e){_0x19a401=_0x19a401-0x0;var _0x2666b1=_0xce67[_0x19a401];return _0x2666b1;};'use strict';var multer=require(_0x7ce6('0x0'));var util=require(_0x7ce6('0x1'));var path=require(_0x7ce6('0x2'));var timeout=require('connect-timeout');var express=require(_0x7ce6('0x3'));var router=express['Router']();var auth=require(_0x7ce6('0x4'));var interaction=require(_0x7ce6('0x5'));var config=require(_0x7ce6('0x6'));var controller=require(_0x7ce6('0x7'));router['get']('/',auth[_0x7ce6('0x8')](),controller[_0x7ce6('0x9')]);router[_0x7ce6('0xa')](_0x7ce6('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x7ce6('0xa')](_0x7ce6('0xc'),auth[_0x7ce6('0x8')](),controller[_0x7ce6('0xd')]);router[_0x7ce6('0xa')]('/:id/fields',auth['isAuthenticated'](),controller[_0x7ce6('0xe')]);router['post']('/',auth[_0x7ce6('0x8')](),controller[_0x7ce6('0xf')]);router[_0x7ce6('0x10')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x7ce6('0x11')]);router['put'](_0x7ce6('0xb'),auth[_0x7ce6('0x8')](),controller[_0x7ce6('0x12')]);router[_0x7ce6('0x13')]('/:id',auth[_0x7ce6('0x8')](),controller[_0x7ce6('0x14')]);module[_0x7ce6('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js
index c725a20..77c374d 100644
--- a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js
+++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb93b=['remoteUri','exports','STRING','username'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xb93b,0x1ad));var _0xbb93=function(_0x588bf2,_0xe6fb8){_0x588bf2=_0x588bf2-0x0;var _0x571db3=_0xb93b[_0x588bf2];return _0x571db3;};'use strict';var Sequelize=require('sequelize');module[_0xbb93('0x0')]={'name':{'type':Sequelize[_0xbb93('0x1')]},'description':{'type':Sequelize[_0xbb93('0x1')]},'username':{'type':Sequelize[_0xbb93('0x1')],'unique':_0xbb93('0x2')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xbb93('0x1')],'unique':_0xbb93('0x3')},'serverUrl':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x0cd8=['remoteUri','sequelize','STRING','username'];(function(_0x171449,_0x3330b4){var _0x2fd9c0=function(_0x3b1272){while(--_0x3b1272){_0x171449['push'](_0x171449['shift']());}};_0x2fd9c0(++_0x3330b4);}(_0x0cd8,0x95));var _0x80cd=function(_0x1b230b,_0x398ef2){_0x1b230b=_0x1b230b-0x0;var _0x14cada=_0x0cd8[_0x1b230b];return _0x14cada;};'use strict';var Sequelize=require(_0x80cd('0x0'));module['exports']={'name':{'type':Sequelize[_0x80cd('0x1')]},'description':{'type':Sequelize[_0x80cd('0x1')]},'username':{'type':Sequelize[_0x80cd('0x1')],'unique':_0x80cd('0x2')},'password':{'type':Sequelize[_0x80cd('0x1')]},'remoteUri':{'type':Sequelize[_0x80cd('0x1')],'unique':_0x80cd('0x3')},'serverUrl':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js
index edb1e6e..35df779 100644
--- a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js
+++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3d98=['eml-format','fast-json-patch','request-promise','bluebird','util','path','sox','ejs','lodash','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','error','SugarcrmAccount,\x20%s,\x20%s','message','catch','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','name','index','SugarcrmAccount','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','sort','pick','where','merge','map','type','key','VIRTUAL','field','filter','options','includeAll','include','findAll','rows','show','model','rawAttributes','find','create','update','body','destroy','getConfigurations','findOne','SugarcrmConfiguration','order','addConfiguration','params','Subjects','getSubjects','channel','Descriptions','getDescriptions','SugarcrmField','getFields','assigned_user_id','description','date_start','duration_minutes','parent_id','parent_type','parent_name','remoteUri','slice','substring','lastIndexOf','format','/service/v4_1/rest.php','JSON','password','PLAIN','Password\x20Expired','%s%s','get_module_fields','Calls','values','remove','endsWith','value','getFields,\x20%s,\x20%s,\x20%s','stringify','send','Wrong\x20credentials','statusCode','html-pdf'];(function(_0x236b1a,_0x9facf2){var _0x5ac9b9=function(_0x1f1dfd){while(--_0x1f1dfd){_0x236b1a['push'](_0x236b1a['shift']());}};_0x5ac9b9(++_0x9facf2);}(_0x3d98,0x77));var _0x83d9=function(_0x4516a7,_0x435556){_0x4516a7=_0x4516a7-0x0;var _0xd07574=_0x3d98[_0x4516a7];return _0xd07574;};'use strict';var pdf=require(_0x83d9('0x0'));var emlformat=require(_0x83d9('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x83d9('0x2'));var rp=require(_0x83d9('0x3'));var moment=require('moment');var BPromise=require(_0x83d9('0x4'));var Mustache=require('mustache');var util=require(_0x83d9('0x5'));var path=require(_0x83d9('0x6'));var sox=require(_0x83d9('0x7'));var csv=require('to-csv');var ejs=require(_0x83d9('0x8'));var fs=require('fs');var _=require(_0x83d9('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x83d9('0xa'));var deskjs=require(_0x83d9('0xb'));var toCsv=require(_0x83d9('0xc'));var querystring=require(_0x83d9('0xd'));var Papa=require(_0x83d9('0xe'));var Redis=require('ioredis');var authService=require(_0x83d9('0xf'));var qs=require(_0x83d9('0x10'));var hardwareService=require(_0x83d9('0x11'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0x83d9('0x12'));var client=jayson[_0x83d9('0x13')]['http']({'port':0x232a});function checkPasswordPattern(_0x4b0420,_0x5868ff,_0x524ecf){if(_0x524ecf){var _0xc97e05=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0xc97e05[_0x83d9('0x14')](_0x5868ff)){return _0x4b0420;}else{throw new Error(_0x83d9('0x15'));}}else{return _0x4b0420;}}function respondWithRpcPromise(_0xbf0499,_0x14abfc,_0x516591,_0x401e74){return new BPromise(function(_0x2a5642,_0x4622db){var _0x2bffad=_0x401e74||client;return _0x2bffad[_0x83d9('0x16')](_0xbf0499,_0x516591)[_0x83d9('0x17')](function(_0x40ce9d){logger[_0x83d9('0x18')]('SugarcrmAccount,\x20%s,\x20%s',_0x14abfc,_0x83d9('0x19'));logger[_0x83d9('0x1a')](_0x83d9('0x1b'),_0x14abfc,_0x83d9('0x19'),JSON['stringify'](_0x40ce9d));if(_0x40ce9d[_0x83d9('0x1c')]){if(_0x40ce9d[_0x83d9('0x1c')]['code']===0x1f4){logger[_0x83d9('0x1c')](_0x83d9('0x1d'),_0x14abfc,_0x40ce9d['error'][_0x83d9('0x1e')]);return _0x4622db(_0x40ce9d[_0x83d9('0x1c')][_0x83d9('0x1e')]);}logger[_0x83d9('0x1c')](_0x83d9('0x1d'),_0x14abfc,_0x40ce9d[_0x83d9('0x1c')][_0x83d9('0x1e')]);return _0x2a5642(_0x40ce9d[_0x83d9('0x1c')][_0x83d9('0x1e')]);}else{logger['info'](_0x83d9('0x1d'),_0x14abfc,_0x83d9('0x19'));_0x2a5642(_0x40ce9d['result'][_0x83d9('0x1e')]);}})[_0x83d9('0x1f')](function(_0x13f5f3){logger['error'](_0x83d9('0x1d'),_0x14abfc,_0x13f5f3);_0x4622db(_0x13f5f3);});});}function respondWithStatusCode(_0x5a08ec,_0x53ebd6){_0x53ebd6=_0x53ebd6||0xcc;return function(_0x3f3238){if(_0x3f3238){return _0x5a08ec[_0x83d9('0x20')](_0x53ebd6);}return _0x5a08ec[_0x83d9('0x21')](_0x53ebd6)[_0x83d9('0x22')]();};}function respondWithResult(_0x584f0a,_0x100445){_0x100445=_0x100445||0xc8;return function(_0x2e3382){if(_0x2e3382){return _0x584f0a[_0x83d9('0x21')](_0x100445)[_0x83d9('0x23')](_0x2e3382);}};}function respondWithFilteredResult(_0xb05226,_0xc680fc){return function(_0x191cc8){if(_0x191cc8){var _0x41fd39=_0x191cc8[_0x83d9('0x24')],_0x33a6f0=_0xc680fc['offset'],_0x25e150=_0xc680fc[_0x83d9('0x25')]+_0xc680fc['limit'],_0x4da352;if(_0x25e150>=_0x41fd39){_0x25e150=_0x41fd39;_0x4da352=0xc8;}else{_0x4da352=0xce;}_0xb05226[_0x83d9('0x21')](_0x4da352);return _0xb05226['set'](_0x83d9('0x26'),_0x33a6f0+'-'+_0x25e150+'/'+_0x41fd39)[_0x83d9('0x23')](_0x191cc8);}return null;};}function patchUpdates(_0xc10294){return function(_0xbd3c0f){try{jsonpatch[_0x83d9('0x27')](_0xbd3c0f,_0xc10294,!![]);}catch(_0xbb5790){return BPromise[_0x83d9('0x28')](_0xbb5790);}return _0xbd3c0f[_0x83d9('0x29')]();};}function saveUpdates(_0x32dd5c,_0x47d8fb){return function(_0x3dfe00){if(_0x3dfe00){return _0x3dfe00['update'](_0x32dd5c)[_0x83d9('0x17')](function(_0x377cde){return _0x377cde;});}return null;};}function removeEntity(_0x3b475d,_0x567c0b){return function(_0x36f916){if(_0x36f916){return _0x36f916['destroy']()[_0x83d9('0x17')](function(){_0x3b475d[_0x83d9('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3513f0,_0x4ec22f){return function(_0x34de41){if(!_0x34de41){_0x3513f0[_0x83d9('0x20')](0x194);}return _0x34de41;};}function handleError(_0x2e4f92,_0x450d94){_0x450d94=_0x450d94||0x1f4;return function(_0x3fc0d5){logger[_0x83d9('0x1c')](_0x3fc0d5['stack']);if(_0x3fc0d5[_0x83d9('0x2a')]){delete _0x3fc0d5[_0x83d9('0x2a')];}_0x2e4f92[_0x83d9('0x21')](_0x450d94)['send'](_0x3fc0d5);};}exports[_0x83d9('0x2b')]=function(_0x27129f,_0x51e2de){var _0x2f3470={},_0x273630={},_0x1b96fe={'count':0x0,'rows':[]};var _0x2bfd36=db[_0x83d9('0x2c')]['rawAttributes'];_0x273630['model']=_[_0x83d9('0x2d')](_0x2bfd36);_0x273630[_0x83d9('0x2e')]=_['keys'](_0x27129f[_0x83d9('0x2e')]);_0x273630[_0x83d9('0x2f')]=_['intersection'](_0x273630['model'],_0x273630['query']);_0x2f3470[_0x83d9('0x30')]=_[_0x83d9('0x31')](_0x273630['model'],qs[_0x83d9('0x32')](_0x27129f[_0x83d9('0x2e')][_0x83d9('0x32')]));_0x2f3470[_0x83d9('0x30')]=_0x2f3470[_0x83d9('0x30')][_0x83d9('0x33')]?_0x2f3470[_0x83d9('0x30')]:_0x273630['model'];if(!_0x27129f[_0x83d9('0x2e')][_0x83d9('0x34')](_0x83d9('0x35'))){_0x2f3470[_0x83d9('0x36')]=qs[_0x83d9('0x36')](_0x27129f['query'][_0x83d9('0x36')]);_0x2f3470['offset']=qs['offset'](_0x27129f[_0x83d9('0x2e')][_0x83d9('0x25')]);}_0x2f3470['order']=qs[_0x83d9('0x37')](_0x27129f[_0x83d9('0x2e')]['sort']);_0x2f3470['where']=qs[_0x83d9('0x2f')](_[_0x83d9('0x38')](_0x27129f[_0x83d9('0x2e')],_0x273630['filters']));if(_0x27129f[_0x83d9('0x2e')]['filter']){_0x2f3470[_0x83d9('0x39')]=_[_0x83d9('0x3a')](_0x2f3470['where'],{'$or':_[_0x83d9('0x3b')](_0x2bfd36,function(_0x1b714f){if(_0x1b714f[_0x83d9('0x3c')][_0x83d9('0x3d')]!==_0x83d9('0x3e')){var _0x567ebd={};_0x567ebd[_0x1b714f[_0x83d9('0x3f')]]={'$like':'%'+_0x27129f['query'][_0x83d9('0x40')]+'%'};return _0x567ebd;}})});}_0x2f3470=_[_0x83d9('0x3a')]({},_0x2f3470,_0x27129f[_0x83d9('0x41')]);var _0x32d494={'where':_0x2f3470['where']};return db[_0x83d9('0x2c')][_0x83d9('0x24')](_0x32d494)[_0x83d9('0x17')](function(_0x23a9c5){_0x1b96fe[_0x83d9('0x24')]=_0x23a9c5;if(_0x27129f['query'][_0x83d9('0x42')]){_0x2f3470[_0x83d9('0x43')]=[{'all':!![]}];}return db['SugarcrmAccount'][_0x83d9('0x44')](_0x2f3470);})[_0x83d9('0x17')](function(_0x45245f){_0x1b96fe[_0x83d9('0x45')]=_0x45245f;return _0x1b96fe;})['then'](respondWithFilteredResult(_0x51e2de,_0x2f3470))[_0x83d9('0x1f')](handleError(_0x51e2de,null));};exports[_0x83d9('0x46')]=function(_0x2fd19d,_0x334b67){var _0x22f0f0={'raw':![],'where':{'id':_0x2fd19d['params']['id']}},_0x7011af={};_0x7011af[_0x83d9('0x47')]=_[_0x83d9('0x2d')](db[_0x83d9('0x2c')][_0x83d9('0x48')]);_0x7011af[_0x83d9('0x2e')]=_[_0x83d9('0x2d')](_0x2fd19d[_0x83d9('0x2e')]);_0x7011af[_0x83d9('0x2f')]=_[_0x83d9('0x31')](_0x7011af['model'],_0x7011af[_0x83d9('0x2e')]);_0x22f0f0[_0x83d9('0x30')]=_[_0x83d9('0x31')](_0x7011af['model'],qs['fields'](_0x2fd19d[_0x83d9('0x2e')]['fields']));_0x22f0f0[_0x83d9('0x30')]=_0x22f0f0[_0x83d9('0x30')][_0x83d9('0x33')]?_0x22f0f0[_0x83d9('0x30')]:_0x7011af[_0x83d9('0x47')];if(_0x2fd19d[_0x83d9('0x2e')][_0x83d9('0x42')]){_0x22f0f0[_0x83d9('0x43')]=[{'all':!![]}];}_0x22f0f0=_[_0x83d9('0x3a')]({},_0x22f0f0,_0x2fd19d[_0x83d9('0x41')]);return db[_0x83d9('0x2c')][_0x83d9('0x49')](_0x22f0f0)[_0x83d9('0x17')](handleEntityNotFound(_0x334b67,null))[_0x83d9('0x17')](respondWithResult(_0x334b67,null))[_0x83d9('0x1f')](handleError(_0x334b67,null));};exports[_0x83d9('0x4a')]=function(_0x127df2,_0x3f28ed){return db[_0x83d9('0x2c')][_0x83d9('0x4a')](_0x127df2['body'],{})[_0x83d9('0x17')](respondWithResult(_0x3f28ed,0xc9))[_0x83d9('0x1f')](handleError(_0x3f28ed,null));};exports[_0x83d9('0x4b')]=function(_0x10b4c8,_0x135f0b){if(_0x10b4c8[_0x83d9('0x4c')]['id']){delete _0x10b4c8[_0x83d9('0x4c')]['id'];}return db[_0x83d9('0x2c')][_0x83d9('0x49')]({'where':{'id':_0x10b4c8['params']['id']}})['then'](handleEntityNotFound(_0x135f0b,null))['then'](saveUpdates(_0x10b4c8[_0x83d9('0x4c')],null))[_0x83d9('0x17')](respondWithResult(_0x135f0b,null))[_0x83d9('0x1f')](handleError(_0x135f0b,null));};exports[_0x83d9('0x4d')]=function(_0x274ff8,_0x35bd98){return db[_0x83d9('0x2c')]['find']({'where':{'id':_0x274ff8['params']['id']}})['then'](handleEntityNotFound(_0x35bd98,null))[_0x83d9('0x17')](removeEntity(_0x35bd98,null))[_0x83d9('0x1f')](handleError(_0x35bd98,null));};exports[_0x83d9('0x4e')]=function(_0x105317,_0x11c5f4,_0x1e5e59){var _0x163222={};var _0x8ec5f7={};var _0x5d84cf;var _0x38b689;return db['SugarcrmAccount'][_0x83d9('0x4f')]({'where':{'id':_0x105317['params']['id']}})['then'](handleEntityNotFound(_0x11c5f4,null))[_0x83d9('0x17')](function(_0x4a831b){if(_0x4a831b){_0x5d84cf=_0x4a831b;_0x8ec5f7[_0x83d9('0x47')]=_[_0x83d9('0x2d')](db[_0x83d9('0x50')]['rawAttributes']);_0x8ec5f7['query']=_['keys'](_0x105317[_0x83d9('0x2e')]);_0x8ec5f7[_0x83d9('0x2f')]=_[_0x83d9('0x31')](_0x8ec5f7[_0x83d9('0x47')],_0x8ec5f7[_0x83d9('0x2e')]);_0x163222['attributes']=_['intersection'](_0x8ec5f7[_0x83d9('0x47')],qs[_0x83d9('0x32')](_0x105317[_0x83d9('0x2e')][_0x83d9('0x32')]));_0x163222['attributes']=_0x163222[_0x83d9('0x30')]['length']?_0x163222[_0x83d9('0x30')]:_0x8ec5f7[_0x83d9('0x47')];_0x163222[_0x83d9('0x51')]=qs[_0x83d9('0x37')](_0x105317['query'][_0x83d9('0x37')]);_0x163222['where']=qs['filters'](_['pick'](_0x105317[_0x83d9('0x2e')],_0x8ec5f7['filters']));if(_0x105317[_0x83d9('0x2e')][_0x83d9('0x40')]){_0x163222[_0x83d9('0x39')]=_[_0x83d9('0x3a')](_0x163222[_0x83d9('0x39')],{'$or':_['map'](_0x163222['attributes'],function(_0x516dc1){var _0x168881={};_0x168881[_0x516dc1]={'$like':'%'+_0x105317[_0x83d9('0x2e')]['filter']+'%'};return _0x168881;})});}_0x163222=_[_0x83d9('0x3a')]({},_0x163222,_0x105317[_0x83d9('0x41')]);return _0x5d84cf[_0x83d9('0x4e')](_0x163222);}})[_0x83d9('0x17')](function(_0x1ed3d5){if(_0x1ed3d5){_0x38b689=_0x1ed3d5[_0x83d9('0x33')];if(!_0x105317[_0x83d9('0x2e')][_0x83d9('0x34')]('nolimit')){_0x163222[_0x83d9('0x36')]=qs[_0x83d9('0x36')](_0x105317[_0x83d9('0x2e')][_0x83d9('0x36')]);_0x163222['offset']=qs['offset'](_0x105317['query']['offset']);}return _0x5d84cf[_0x83d9('0x4e')](_0x163222);}})[_0x83d9('0x17')](function(_0x1aa7cc){if(_0x1aa7cc){return _0x1aa7cc?{'count':_0x38b689,'rows':_0x1aa7cc}:null;}})[_0x83d9('0x17')](respondWithResult(_0x11c5f4,null))[_0x83d9('0x1f')](handleError(_0x11c5f4,null));};exports[_0x83d9('0x52')]=function(_0x3a96fa,_0x4e6014,_0x49cffb){if(_0x3a96fa[_0x83d9('0x4c')]['id']){delete _0x3a96fa[_0x83d9('0x4c')]['id'];}return db['SugarcrmAccount']['findOne']({'where':{'id':_0x3a96fa[_0x83d9('0x53')]['id']}})['then'](handleEntityNotFound(_0x4e6014,null))[_0x83d9('0x17')](function(_0x38ef3d){if(_0x38ef3d){_0x3a96fa[_0x83d9('0x4c')]['AccountId']=_0x38ef3d['id'];_0x3a96fa[_0x83d9('0x4c')][_0x83d9('0x54')]=integrations[_0x83d9('0x55')](_0x3a96fa[_0x83d9('0x4c')][_0x83d9('0x56')],_0x3a96fa[_0x83d9('0x4c')][_0x83d9('0x3c')]);_0x3a96fa[_0x83d9('0x4c')][_0x83d9('0x57')]=integrations[_0x83d9('0x58')](_0x3a96fa[_0x83d9('0x4c')][_0x83d9('0x56')],_0x3a96fa['body']['type']);return db['SugarcrmConfiguration']['create'](_0x3a96fa['body'],{'include':[{'model':db[_0x83d9('0x59')],'as':_0x83d9('0x54')},{'model':db[_0x83d9('0x59')],'as':_0x83d9('0x57')}]});}return null;})[_0x83d9('0x17')](respondWithResult(_0x4e6014,null))[_0x83d9('0x1f')](handleError(_0x4e6014,null));};exports[_0x83d9('0x5a')]=function(_0xa2d383,_0x2e486f,_0x476d5d){var _0x41f783='';var _0x5f19d7=['id',_0x83d9('0x2a'),_0x83d9('0x5b'),'created_by',_0x83d9('0x5c'),_0x83d9('0x5d'),'duration_hours',_0x83d9('0x5e'),_0x83d9('0x5f'),_0x83d9('0x60'),_0x83d9('0x61'),'direction'];return db['SugarcrmAccount']['findOne']({'where':{'id':_0xa2d383[_0x83d9('0x53')]['id']},'attributes':['id','username','password',_0x83d9('0x62')]})['then'](handleEntityNotFound(_0x2e486f,null))[_0x83d9('0x17')](function(_0x36f453){if(_0x36f453){_0x41f783=_0x36f453[_0x83d9('0x62')];var _0x1d2539=_0x41f783[_0x83d9('0x63')](-0x1);if(_0x1d2539==='/'){_0x41f783=_0x41f783[_0x83d9('0x64')](0x0,_0x41f783[_0x83d9('0x65')](_0x1d2539));}return rp({'method':'POST','uri':util[_0x83d9('0x66')]('%s%s',_0x41f783,_0x83d9('0x67')),'json':!![],'form':{'method':'login','input_type':'JSON','response_type':_0x83d9('0x68'),'rest_data':JSON['stringify']({'user_auth':{'user_name':_0x36f453['username'],'password':_0x36f453[_0x83d9('0x69')],'encryption':_0x83d9('0x6a')},'application':'xCALLY\x20Motion\x20Integration'})}});}})[_0x83d9('0x17')](function(_0x1d355c){if(_0x1d355c&&_0x1d355c[_0x83d9('0x2a')]!=='Invalid\x20Login'&&_0x1d355c[_0x83d9('0x2a')]!==_0x83d9('0x6b')){return rp({'method':'POST','uri':util[_0x83d9('0x66')](_0x83d9('0x6c'),_0x41f783,_0x83d9('0x67')),'json':!![],'form':{'method':_0x83d9('0x6d'),'input_type':'JSON','response_type':_0x83d9('0x68'),'rest_data':JSON['stringify']({'session':_0x1d355c['id'],'module_name':_0x83d9('0x6e')})}})['then'](function(_0x3fd523){if(_0x3fd523){var _0x3c1107=_[_0x83d9('0x6f')](_0x3fd523['module_fields']);_[_0x83d9('0x70')](_0x3c1107,function(_0x1c8095){return _0x5f19d7['includes'](_0x1c8095[_0x83d9('0x2a')]);});return{'count':_0x3c1107[_0x83d9('0x33')],'rows':_['map'](_0x3c1107,function(_0x3de7d8){return{'id':_0x3de7d8[_0x83d9('0x2a')],'name':_0x3de7d8['label'],'custom':_[_0x83d9('0x71')](_0x3de7d8['name'],'_c')?!![]:![],'options':_0x3de7d8[_0x83d9('0x41')]?_[_0x83d9('0x3b')](_[_0x83d9('0x6f')](_0x3de7d8['options']),function(_0x11164c){return{'name':_0x11164c[_0x83d9('0x72')],'value':_0x11164c[_0x83d9('0x2a')]};}):[]};})};}})[_0x83d9('0x17')](respondWithResult(_0x2e486f,null))['catch'](function(_0x4b9d5a){var _0x48bf1f=_0xa2d383[_0x83d9('0x2e')][_0x83d9('0x14')]?0x1f4:_0x4b9d5a['statusCode']||0x1f4;logger['error'](_0x83d9('0x73'),_0x83d9('0x5a'),_0x48bf1f,JSON[_0x83d9('0x74')](_0x4b9d5a));delete _0x4b9d5a[_0x83d9('0x2a')];if(_0x48bf1f===0x191){_0x48bf1f=0x190;}_0x2e486f[_0x83d9('0x21')](_0x48bf1f)[_0x83d9('0x75')](_0xa2d383[_0x83d9('0x2e')]['test']?{'message':_0x83d9('0x76'),'statusCode':_0x4b9d5a[_0x83d9('0x77')]}:_0x4b9d5a);});}else{var _0x23a26f=0x1f4;_0x2e486f[_0x83d9('0x21')](_0x23a26f)[_0x83d9('0x75')]({'message':'Wrong\x20credentials','statusCode':0x190});}});};
\ No newline at end of file
+var _0xaa3e=['parent_name','direction','username','password','remoteUri','slice','substring','lastIndexOf','POST','format','/service/v4_1/rest.php','login','JSON','%s%s','get_module_fields','Calls','module_fields','remove','includes','label','endsWith','values','value','statusCode','Wrong\x20credentials','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../mysqldb','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','sendStatus','end','status','json','count','offset','limit','Content-Range','reject','save','update','destroy','send','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','map','type','key','VIRTUAL','field','filter','options','SugarcrmAccount','includeAll','include','findAll','rows','params','rawAttributes','find','create','body','getConfigurations','findOne','Subjects','getSubjects','Descriptions','getDescriptions','channel','SugarcrmConfiguration','getFields','name','assigned_user_id','description','date_start','duration_hours','duration_minutes','parent_type'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xaa3e,0x193));var _0xeaa3=function(_0x249e96,_0x3ea39d){_0x249e96=_0x249e96-0x0;var _0x17444c=_0xaa3e[_0x249e96];return _0x17444c;};'use strict';var pdf=require(_0xeaa3('0x0'));var emlformat=require(_0xeaa3('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xeaa3('0x2'));var jsonpatch=require(_0xeaa3('0x3'));var rp=require(_0xeaa3('0x4'));var moment=require('moment');var BPromise=require(_0xeaa3('0x5'));var Mustache=require(_0xeaa3('0x6'));var util=require(_0xeaa3('0x7'));var path=require(_0xeaa3('0x8'));var sox=require(_0xeaa3('0x9'));var csv=require('to-csv');var ejs=require(_0xeaa3('0xa'));var fs=require('fs');var _=require(_0xeaa3('0xb'));var squel=require(_0xeaa3('0xc'));var crypto=require(_0xeaa3('0xd'));var jsforce=require(_0xeaa3('0xe'));var deskjs=require(_0xeaa3('0xf'));var toCsv=require(_0xeaa3('0x10'));var querystring=require(_0xeaa3('0x11'));var Papa=require(_0xeaa3('0x12'));var Redis=require(_0xeaa3('0x13'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0xeaa3('0x14'));var logger=require(_0xeaa3('0x15'))(_0xeaa3('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xeaa3('0x17'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xeaa3('0x18'));var client=jayson[_0xeaa3('0x19')][_0xeaa3('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x335d5b,_0x1bd166,_0xc399fe){if(_0xc399fe){var _0x5d6eaf=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5d6eaf[_0xeaa3('0x1b')](_0x1bd166)){return _0x335d5b;}else{throw new Error(_0xeaa3('0x1c'));}}else{return _0x335d5b;}}function respondWithRpcPromise(_0x2f008c,_0x4fc4cf,_0x4d9cdd,_0x392973){return new BPromise(function(_0x1b2475,_0x2ccee8){var _0x111696=_0x392973||client;return _0x111696[_0xeaa3('0x1d')](_0x2f008c,_0x4d9cdd)[_0xeaa3('0x1e')](function(_0x2c6ca7){logger['info'](_0xeaa3('0x1f'),_0x4fc4cf,_0xeaa3('0x20'));logger['debug']('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0x4fc4cf,_0xeaa3('0x20'),JSON[_0xeaa3('0x21')](_0x2c6ca7));if(_0x2c6ca7[_0xeaa3('0x22')]){if(_0x2c6ca7['error'][_0xeaa3('0x23')]===0x1f4){logger[_0xeaa3('0x22')](_0xeaa3('0x1f'),_0x4fc4cf,_0x2c6ca7['error'][_0xeaa3('0x24')]);return _0x2ccee8(_0x2c6ca7[_0xeaa3('0x22')]['message']);}logger['error'](_0xeaa3('0x1f'),_0x4fc4cf,_0x2c6ca7['error'][_0xeaa3('0x24')]);return _0x1b2475(_0x2c6ca7[_0xeaa3('0x22')][_0xeaa3('0x24')]);}else{logger[_0xeaa3('0x25')]('SugarcrmAccount,\x20%s,\x20%s',_0x4fc4cf,_0xeaa3('0x20'));_0x1b2475(_0x2c6ca7[_0xeaa3('0x26')]['message']);}})[_0xeaa3('0x27')](function(_0xed06be){logger[_0xeaa3('0x22')](_0xeaa3('0x1f'),_0x4fc4cf,_0xed06be);_0x2ccee8(_0xed06be);});});}function respondWithStatusCode(_0x56d24a,_0x1924ec){_0x1924ec=_0x1924ec||0xcc;return function(_0x10319d){if(_0x10319d){return _0x56d24a[_0xeaa3('0x28')](_0x1924ec);}return _0x56d24a['status'](_0x1924ec)[_0xeaa3('0x29')]();};}function respondWithResult(_0xb83083,_0x455730){_0x455730=_0x455730||0xc8;return function(_0x164901){if(_0x164901){return _0xb83083[_0xeaa3('0x2a')](_0x455730)[_0xeaa3('0x2b')](_0x164901);}};}function respondWithFilteredResult(_0x352fa4,_0x349f1e){return function(_0x324f7b){if(_0x324f7b){var _0x4baaba=_0x324f7b[_0xeaa3('0x2c')],_0x110a94=_0x349f1e[_0xeaa3('0x2d')],_0x5eec29=_0x349f1e[_0xeaa3('0x2d')]+_0x349f1e[_0xeaa3('0x2e')],_0x749561;if(_0x5eec29>=_0x4baaba){_0x5eec29=_0x4baaba;_0x749561=0xc8;}else{_0x749561=0xce;}_0x352fa4[_0xeaa3('0x2a')](_0x749561);return _0x352fa4['set'](_0xeaa3('0x2f'),_0x110a94+'-'+_0x5eec29+'/'+_0x4baaba)[_0xeaa3('0x2b')](_0x324f7b);}return null;};}function patchUpdates(_0x5cbbd9){return function(_0x496d67){try{jsonpatch['apply'](_0x496d67,_0x5cbbd9,!![]);}catch(_0x298089){return BPromise[_0xeaa3('0x30')](_0x298089);}return _0x496d67[_0xeaa3('0x31')]();};}function saveUpdates(_0x559759,_0x57449b){return function(_0x3e10dc){if(_0x3e10dc){return _0x3e10dc[_0xeaa3('0x32')](_0x559759)[_0xeaa3('0x1e')](function(_0xd216a9){return _0xd216a9;});}return null;};}function removeEntity(_0x2bff7d,_0x2db7da){return function(_0x22ec04){if(_0x22ec04){return _0x22ec04[_0xeaa3('0x33')]()[_0xeaa3('0x1e')](function(){_0x2bff7d[_0xeaa3('0x2a')](0xcc)[_0xeaa3('0x29')]();});}};}function handleEntityNotFound(_0x570e15,_0x413de2){return function(_0x4be7c2){if(!_0x4be7c2){_0x570e15[_0xeaa3('0x28')](0x194);}return _0x4be7c2;};}function handleError(_0x12c6aa,_0x12ec2a){_0x12ec2a=_0x12ec2a||0x1f4;return function(_0x55f4ef){logger[_0xeaa3('0x22')](_0x55f4ef['stack']);if(_0x55f4ef['name']){delete _0x55f4ef['name'];}_0x12c6aa[_0xeaa3('0x2a')](_0x12ec2a)[_0xeaa3('0x34')](_0x55f4ef);};}exports['index']=function(_0xbd35da,_0x5a9bfc){var _0x4492cb={},_0x495f64={},_0x531648={'count':0x0,'rows':[]};var _0x42ad79=db['SugarcrmAccount']['rawAttributes'];_0x495f64[_0xeaa3('0x35')]=_['keys'](_0x42ad79);_0x495f64['query']=_[_0xeaa3('0x36')](_0xbd35da[_0xeaa3('0x37')]);_0x495f64[_0xeaa3('0x38')]=_[_0xeaa3('0x39')](_0x495f64['model'],_0x495f64[_0xeaa3('0x37')]);_0x4492cb[_0xeaa3('0x3a')]=_[_0xeaa3('0x39')](_0x495f64[_0xeaa3('0x35')],qs[_0xeaa3('0x3b')](_0xbd35da[_0xeaa3('0x37')][_0xeaa3('0x3b')]));_0x4492cb['attributes']=_0x4492cb[_0xeaa3('0x3a')][_0xeaa3('0x3c')]?_0x4492cb[_0xeaa3('0x3a')]:_0x495f64[_0xeaa3('0x35')];if(!_0xbd35da[_0xeaa3('0x37')][_0xeaa3('0x3d')](_0xeaa3('0x3e'))){_0x4492cb[_0xeaa3('0x2e')]=qs['limit'](_0xbd35da[_0xeaa3('0x37')]['limit']);_0x4492cb[_0xeaa3('0x2d')]=qs['offset'](_0xbd35da[_0xeaa3('0x37')]['offset']);}_0x4492cb[_0xeaa3('0x3f')]=qs['sort'](_0xbd35da[_0xeaa3('0x37')][_0xeaa3('0x40')]);_0x4492cb[_0xeaa3('0x41')]=qs[_0xeaa3('0x38')](_[_0xeaa3('0x42')](_0xbd35da[_0xeaa3('0x37')],_0x495f64['filters']));if(_0xbd35da[_0xeaa3('0x37')]['filter']){_0x4492cb[_0xeaa3('0x41')]=_[_0xeaa3('0x43')](_0x4492cb['where'],{'$or':_[_0xeaa3('0x44')](_0x42ad79,function(_0x443b1b){if(_0x443b1b[_0xeaa3('0x45')][_0xeaa3('0x46')]!==_0xeaa3('0x47')){var _0x4fa266={};_0x4fa266[_0x443b1b[_0xeaa3('0x48')]]={'$like':'%'+_0xbd35da[_0xeaa3('0x37')][_0xeaa3('0x49')]+'%'};return _0x4fa266;}})});}_0x4492cb=_['merge']({},_0x4492cb,_0xbd35da[_0xeaa3('0x4a')]);var _0x149bc0={'where':_0x4492cb['where']};return db[_0xeaa3('0x4b')]['count'](_0x149bc0)[_0xeaa3('0x1e')](function(_0x254a01){_0x531648['count']=_0x254a01;if(_0xbd35da[_0xeaa3('0x37')][_0xeaa3('0x4c')]){_0x4492cb[_0xeaa3('0x4d')]=[{'all':!![]}];}return db['SugarcrmAccount'][_0xeaa3('0x4e')](_0x4492cb);})[_0xeaa3('0x1e')](function(_0x1bbd02){_0x531648[_0xeaa3('0x4f')]=_0x1bbd02;return _0x531648;})['then'](respondWithFilteredResult(_0x5a9bfc,_0x4492cb))[_0xeaa3('0x27')](handleError(_0x5a9bfc,null));};exports['show']=function(_0x36a8bb,_0x2e8970){var _0x5ae902={'raw':![],'where':{'id':_0x36a8bb[_0xeaa3('0x50')]['id']}},_0x2d0664={};_0x2d0664[_0xeaa3('0x35')]=_['keys'](db[_0xeaa3('0x4b')][_0xeaa3('0x51')]);_0x2d0664[_0xeaa3('0x37')]=_[_0xeaa3('0x36')](_0x36a8bb['query']);_0x2d0664[_0xeaa3('0x38')]=_[_0xeaa3('0x39')](_0x2d0664[_0xeaa3('0x35')],_0x2d0664[_0xeaa3('0x37')]);_0x5ae902['attributes']=_[_0xeaa3('0x39')](_0x2d0664[_0xeaa3('0x35')],qs[_0xeaa3('0x3b')](_0x36a8bb[_0xeaa3('0x37')][_0xeaa3('0x3b')]));_0x5ae902[_0xeaa3('0x3a')]=_0x5ae902[_0xeaa3('0x3a')][_0xeaa3('0x3c')]?_0x5ae902[_0xeaa3('0x3a')]:_0x2d0664['model'];if(_0x36a8bb['query'][_0xeaa3('0x4c')]){_0x5ae902[_0xeaa3('0x4d')]=[{'all':!![]}];}_0x5ae902=_[_0xeaa3('0x43')]({},_0x5ae902,_0x36a8bb[_0xeaa3('0x4a')]);return db[_0xeaa3('0x4b')][_0xeaa3('0x52')](_0x5ae902)[_0xeaa3('0x1e')](handleEntityNotFound(_0x2e8970,null))[_0xeaa3('0x1e')](respondWithResult(_0x2e8970,null))[_0xeaa3('0x27')](handleError(_0x2e8970,null));};exports[_0xeaa3('0x53')]=function(_0x158278,_0x4074a4){return db[_0xeaa3('0x4b')][_0xeaa3('0x53')](_0x158278[_0xeaa3('0x54')],{})[_0xeaa3('0x1e')](respondWithResult(_0x4074a4,0xc9))[_0xeaa3('0x27')](handleError(_0x4074a4,null));};exports[_0xeaa3('0x32')]=function(_0x3a4c78,_0xbd10d8){if(_0x3a4c78[_0xeaa3('0x54')]['id']){delete _0x3a4c78[_0xeaa3('0x54')]['id'];}return db[_0xeaa3('0x4b')][_0xeaa3('0x52')]({'where':{'id':_0x3a4c78[_0xeaa3('0x50')]['id']}})[_0xeaa3('0x1e')](handleEntityNotFound(_0xbd10d8,null))['then'](saveUpdates(_0x3a4c78['body'],null))[_0xeaa3('0x1e')](respondWithResult(_0xbd10d8,null))[_0xeaa3('0x27')](handleError(_0xbd10d8,null));};exports[_0xeaa3('0x33')]=function(_0x1f08b3,_0x33792d){return db['SugarcrmAccount'][_0xeaa3('0x52')]({'where':{'id':_0x1f08b3['params']['id']}})['then'](handleEntityNotFound(_0x33792d,null))[_0xeaa3('0x1e')](removeEntity(_0x33792d,null))[_0xeaa3('0x27')](handleError(_0x33792d,null));};exports[_0xeaa3('0x55')]=function(_0x39bb8f,_0x2eecb9,_0x358641){var _0x4936ff={};var _0x53a862={};var _0x373ec3;var _0x4dd855;return db[_0xeaa3('0x4b')][_0xeaa3('0x56')]({'where':{'id':_0x39bb8f[_0xeaa3('0x50')]['id']}})[_0xeaa3('0x1e')](handleEntityNotFound(_0x2eecb9,null))[_0xeaa3('0x1e')](function(_0x3e5dae){if(_0x3e5dae){_0x373ec3=_0x3e5dae;_0x53a862[_0xeaa3('0x35')]=_['keys'](db['SugarcrmConfiguration']['rawAttributes']);_0x53a862[_0xeaa3('0x37')]=_[_0xeaa3('0x36')](_0x39bb8f[_0xeaa3('0x37')]);_0x53a862[_0xeaa3('0x38')]=_['intersection'](_0x53a862[_0xeaa3('0x35')],_0x53a862[_0xeaa3('0x37')]);_0x4936ff[_0xeaa3('0x3a')]=_[_0xeaa3('0x39')](_0x53a862[_0xeaa3('0x35')],qs['fields'](_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x3b')]));_0x4936ff[_0xeaa3('0x3a')]=_0x4936ff[_0xeaa3('0x3a')][_0xeaa3('0x3c')]?_0x4936ff[_0xeaa3('0x3a')]:_0x53a862[_0xeaa3('0x35')];_0x4936ff[_0xeaa3('0x3f')]=qs[_0xeaa3('0x40')](_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x40')]);_0x4936ff[_0xeaa3('0x41')]=qs[_0xeaa3('0x38')](_[_0xeaa3('0x42')](_0x39bb8f[_0xeaa3('0x37')],_0x53a862['filters']));if(_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x49')]){_0x4936ff[_0xeaa3('0x41')]=_[_0xeaa3('0x43')](_0x4936ff[_0xeaa3('0x41')],{'$or':_['map'](_0x4936ff[_0xeaa3('0x3a')],function(_0x238aa4){var _0x58c083={};_0x58c083[_0x238aa4]={'$like':'%'+_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x49')]+'%'};return _0x58c083;})});}_0x4936ff=_['merge']({},_0x4936ff,_0x39bb8f[_0xeaa3('0x4a')]);return _0x373ec3[_0xeaa3('0x55')](_0x4936ff);}})['then'](function(_0x406ca4){if(_0x406ca4){_0x4dd855=_0x406ca4[_0xeaa3('0x3c')];if(!_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x3d')]('nolimit')){_0x4936ff[_0xeaa3('0x2e')]=qs[_0xeaa3('0x2e')](_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x2e')]);_0x4936ff[_0xeaa3('0x2d')]=qs[_0xeaa3('0x2d')](_0x39bb8f[_0xeaa3('0x37')][_0xeaa3('0x2d')]);}return _0x373ec3[_0xeaa3('0x55')](_0x4936ff);}})[_0xeaa3('0x1e')](function(_0x1ab1d9){if(_0x1ab1d9){return _0x1ab1d9?{'count':_0x4dd855,'rows':_0x1ab1d9}:null;}})[_0xeaa3('0x1e')](respondWithResult(_0x2eecb9,null))[_0xeaa3('0x27')](handleError(_0x2eecb9,null));};exports['addConfiguration']=function(_0x1129ad,_0x3996ad,_0x4c1a1c){if(_0x1129ad[_0xeaa3('0x54')]['id']){delete _0x1129ad[_0xeaa3('0x54')]['id'];}return db[_0xeaa3('0x4b')][_0xeaa3('0x56')]({'where':{'id':_0x1129ad['params']['id']}})['then'](handleEntityNotFound(_0x3996ad,null))[_0xeaa3('0x1e')](function(_0x1874ca){if(_0x1874ca){_0x1129ad['body']['AccountId']=_0x1874ca['id'];_0x1129ad[_0xeaa3('0x54')][_0xeaa3('0x57')]=integrations[_0xeaa3('0x58')](_0x1129ad['body']['channel'],_0x1129ad[_0xeaa3('0x54')]['type']);_0x1129ad[_0xeaa3('0x54')][_0xeaa3('0x59')]=integrations[_0xeaa3('0x5a')](_0x1129ad[_0xeaa3('0x54')][_0xeaa3('0x5b')],_0x1129ad[_0xeaa3('0x54')][_0xeaa3('0x45')]);return db[_0xeaa3('0x5c')]['create'](_0x1129ad[_0xeaa3('0x54')],{'include':[{'model':db['SugarcrmField'],'as':_0xeaa3('0x57')},{'model':db['SugarcrmField'],'as':_0xeaa3('0x59')}]});}return null;})[_0xeaa3('0x1e')](respondWithResult(_0x3996ad,null))[_0xeaa3('0x27')](handleError(_0x3996ad,null));};exports[_0xeaa3('0x5d')]=function(_0x58f8f1,_0x63835,_0x59e566){var _0x520047='';var _0x243c4c=['id',_0xeaa3('0x5e'),_0xeaa3('0x5f'),'created_by',_0xeaa3('0x60'),_0xeaa3('0x61'),_0xeaa3('0x62'),_0xeaa3('0x63'),'parent_id',_0xeaa3('0x64'),_0xeaa3('0x65'),_0xeaa3('0x66')];return db[_0xeaa3('0x4b')]['findOne']({'where':{'id':_0x58f8f1[_0xeaa3('0x50')]['id']},'attributes':['id',_0xeaa3('0x67'),_0xeaa3('0x68'),_0xeaa3('0x69')]})[_0xeaa3('0x1e')](handleEntityNotFound(_0x63835,null))[_0xeaa3('0x1e')](function(_0x3c0857){if(_0x3c0857){_0x520047=_0x3c0857[_0xeaa3('0x69')];var _0x196067=_0x520047[_0xeaa3('0x6a')](-0x1);if(_0x196067==='/'){_0x520047=_0x520047[_0xeaa3('0x6b')](0x0,_0x520047[_0xeaa3('0x6c')](_0x196067));}return rp({'method':_0xeaa3('0x6d'),'uri':util[_0xeaa3('0x6e')]('%s%s',_0x520047,_0xeaa3('0x6f')),'json':!![],'form':{'method':_0xeaa3('0x70'),'input_type':_0xeaa3('0x71'),'response_type':'JSON','rest_data':JSON[_0xeaa3('0x21')]({'user_auth':{'user_name':_0x3c0857['username'],'password':_0x3c0857[_0xeaa3('0x68')],'encryption':'PLAIN'},'application':'xCALLY\x20Motion\x20Integration'})}});}})['then'](function(_0x93fba7){if(_0x93fba7&&_0x93fba7['name']!=='Invalid\x20Login'&&_0x93fba7[_0xeaa3('0x5e')]!=='Password\x20Expired'){return rp({'method':_0xeaa3('0x6d'),'uri':util[_0xeaa3('0x6e')](_0xeaa3('0x72'),_0x520047,'/service/v4_1/rest.php'),'json':!![],'form':{'method':_0xeaa3('0x73'),'input_type':_0xeaa3('0x71'),'response_type':_0xeaa3('0x71'),'rest_data':JSON['stringify']({'session':_0x93fba7['id'],'module_name':_0xeaa3('0x74')})}})[_0xeaa3('0x1e')](function(_0x3f58cf){if(_0x3f58cf){var _0x5a43e6=_['values'](_0x3f58cf[_0xeaa3('0x75')]);_[_0xeaa3('0x76')](_0x5a43e6,function(_0xdeb8fa){return _0x243c4c[_0xeaa3('0x77')](_0xdeb8fa[_0xeaa3('0x5e')]);});return{'count':_0x5a43e6[_0xeaa3('0x3c')],'rows':_['map'](_0x5a43e6,function(_0x358c39){return{'id':_0x358c39['name'],'name':_0x358c39[_0xeaa3('0x78')],'custom':_[_0xeaa3('0x79')](_0x358c39[_0xeaa3('0x5e')],'_c')?!![]:![],'options':_0x358c39[_0xeaa3('0x4a')]?_['map'](_[_0xeaa3('0x7a')](_0x358c39['options']),function(_0x2d5d3d){return{'name':_0x2d5d3d[_0xeaa3('0x7b')],'value':_0x2d5d3d[_0xeaa3('0x5e')]};}):[]};})};}})[_0xeaa3('0x1e')](respondWithResult(_0x63835,null))[_0xeaa3('0x27')](function(_0x27e519){var _0x41e88a=_0x58f8f1[_0xeaa3('0x37')][_0xeaa3('0x1b')]?0x1f4:_0x27e519[_0xeaa3('0x7c')]||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s',_0xeaa3('0x5d'),_0x41e88a,JSON[_0xeaa3('0x21')](_0x27e519));delete _0x27e519['name'];if(_0x41e88a===0x191){_0x41e88a=0x190;}_0x63835[_0xeaa3('0x2a')](_0x41e88a)[_0xeaa3('0x34')](_0x58f8f1['query'][_0xeaa3('0x1b')]?{'message':_0xeaa3('0x7d'),'statusCode':_0x27e519[_0xeaa3('0x7c')]}:_0x27e519);});}else{var _0x3af2e3=0x1f4;_0x63835[_0xeaa3('0x2a')](_0x3af2e3)[_0xeaa3('0x34')]({'message':_0xeaa3('0x7d'),'statusCode':0x190});}});};
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js
index 4a96052..36a2613 100644
--- a/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js
+++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3aac=['moment','bluebird','path','rimraf','./intSugarcrmAccount.attributes','../../components/integrations/configuration','define','SugarcrmAccount','int_sugarcrm_accounts','lodash','util','api'];(function(_0x4d7779,_0x4c2c68){var _0x2a4930=function(_0x5e2596){while(--_0x5e2596){_0x4d7779['push'](_0x4d7779['shift']());}};_0x2a4930(++_0x4c2c68);}(_0x3aac,0x129));var _0xc3aa=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3aac[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xc3aa('0x0'));var util=require(_0xc3aa('0x1'));var logger=require('../../config/logger')(_0xc3aa('0x2'));var moment=require(_0xc3aa('0x3'));var BPromise=require(_0xc3aa('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc3aa('0x5'));var rimraf=require(_0xc3aa('0x6'));var config=require('../../config/environment');var attributes=require(_0xc3aa('0x7'));var integrations=require(_0xc3aa('0x8'));module['exports']=function(_0x30281e,_0x29db86){return _0x30281e[_0xc3aa('0x9')](_0xc3aa('0xa'),attributes,{'tableName':_0xc3aa('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4cec=['rimraf','../../config/environment','./intSugarcrmAccount.attributes','../../components/integrations/configuration','exports','lodash','../../config/logger','api','bluebird','request-promise','path'];(function(_0x493f57,_0x302c27){var _0x1a54b2=function(_0x43c9e2){while(--_0x43c9e2){_0x493f57['push'](_0x493f57['shift']());}};_0x1a54b2(++_0x302c27);}(_0x4cec,0x7e));var _0xc4ce=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x4cec[_0x40a045];return _0x1a687c;};'use strict';var _=require(_0xc4ce('0x0'));var util=require('util');var logger=require(_0xc4ce('0x1'))(_0xc4ce('0x2'));var moment=require('moment');var BPromise=require(_0xc4ce('0x3'));var rp=require(_0xc4ce('0x4'));var fs=require('fs');var path=require(_0xc4ce('0x5'));var rimraf=require(_0xc4ce('0x6'));var config=require(_0xc4ce('0x7'));var attributes=require(_0xc4ce('0x8'));var integrations=require(_0xc4ce('0x9'));module[_0xc4ce('0xa')]=function(_0x5bbe86,_0x5e49ba){return _0x5bbe86['define']('SugarcrmAccount',attributes,{'tableName':'int_sugarcrm_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js
index b04d6c4..80d1a81 100644
--- a/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js
+++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x144e=['bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','error','code','SugarcrmAccount,\x20%s,\x20%s','message','info','result','catch','GetSugarcrmAccount','SugarcrmAccount','findAll','options','raw','attributes','limit','include','map','model','stringify','ShowSugarcrmAccount','find','where','lodash','moment'];(function(_0x20ab85,_0x5b2983){var _0x2183bd=function(_0x374d3f){while(--_0x374d3f){_0x20ab85['push'](_0x20ab85['shift']());}};_0x2183bd(++_0x5b2983);}(_0x144e,0x1c5));var _0xe144=function(_0x1fd2e3,_0x344142){_0x1fd2e3=_0x1fd2e3-0x0;var _0x248cc4=_0x144e[_0x1fd2e3];return _0x248cc4;};'use strict';var _=require(_0xe144('0x0'));var util=require('util');var moment=require(_0xe144('0x1'));var BPromise=require(_0xe144('0x2'));var rs=require(_0xe144('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe144('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xe144('0x5'))(_0xe144('0x6'));var config=require(_0xe144('0x7'));var jayson=require(_0xe144('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2022f9,_0x356339,_0x1e2c9b){return new BPromise(function(_0x5f30fd,_0x2659c2){return client[_0xe144('0x9')](_0x2022f9,_0x1e2c9b)[_0xe144('0xa')](function(_0x555adb){logger['info']('SugarcrmAccount,\x20%s,\x20%s',_0x356339,_0xe144('0xb'));logger[_0xe144('0xc')](_0xe144('0xd'),_0x356339,'request\x20sent',JSON['stringify'](_0x555adb));if(_0x555adb[_0xe144('0xe')]){if(_0x555adb['error'][_0xe144('0xf')]===0x1f4){logger[_0xe144('0xe')](_0xe144('0x10'),_0x356339,_0x555adb['error'][_0xe144('0x11')]);return _0x2659c2(_0x555adb[_0xe144('0xe')][_0xe144('0x11')]);}logger[_0xe144('0xe')](_0xe144('0x10'),_0x356339,_0x555adb['error']['message']);return _0x5f30fd(_0x555adb[_0xe144('0xe')]['message']);}else{logger[_0xe144('0x12')]('SugarcrmAccount,\x20%s,\x20%s',_0x356339,_0xe144('0xb'));_0x5f30fd(_0x555adb[_0xe144('0x13')][_0xe144('0x11')]);}})[_0xe144('0x14')](function(_0x27aae6){logger[_0xe144('0xe')](_0xe144('0x10'),_0x356339,_0x27aae6);_0x2659c2(_0x27aae6);});});}exports[_0xe144('0x15')]=function(_0x2f812a){var _0x41f420=this;return new Promise(function(_0x57e744,_0xefedec){return db[_0xe144('0x16')][_0xe144('0x17')]({'raw':_0x2f812a[_0xe144('0x18')]?_0x2f812a[_0xe144('0x18')][_0xe144('0x19')]===undefined?!![]:![]:!![],'where':_0x2f812a['options']?_0x2f812a[_0xe144('0x18')]['where']||null:null,'attributes':_0x2f812a['options']?_0x2f812a[_0xe144('0x18')][_0xe144('0x1a')]||null:null,'limit':_0x2f812a[_0xe144('0x18')]?_0x2f812a[_0xe144('0x18')][_0xe144('0x1b')]||null:null,'include':_0x2f812a['options']?_0x2f812a[_0xe144('0x18')][_0xe144('0x1c')]?_[_0xe144('0x1d')](_0x2f812a[_0xe144('0x18')][_0xe144('0x1c')],function(_0x223a09){return{'model':db[_0x223a09[_0xe144('0x1e')]],'as':_0x223a09['as'],'attributes':_0x223a09['attributes'],'include':_0x223a09[_0xe144('0x1c')]?_[_0xe144('0x1d')](_0x223a09[_0xe144('0x1c')],function(_0x13c78c){return{'model':db[_0x13c78c[_0xe144('0x1e')]],'as':_0x13c78c['as'],'attributes':_0x13c78c[_0xe144('0x1a')],'include':_0x13c78c['include']?_['map'](_0x13c78c[_0xe144('0x1c')],function(_0x35a8b0){return{'model':db[_0x35a8b0[_0xe144('0x1e')]],'as':_0x35a8b0['as'],'attributes':_0x35a8b0[_0xe144('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xe144('0xa')](function(_0x3da500){logger['info']('GetSugarcrmAccount',_0x2f812a);logger['debug'](_0xe144('0x15'),_0x2f812a,JSON[_0xe144('0x1f')](_0x3da500));_0x57e744(_0x3da500);})[_0xe144('0x14')](function(_0x161deb){logger['error'](_0xe144('0x15'),_0x161deb['message'],_0x2f812a);_0xefedec(_0x41f420[_0xe144('0xe')](0x1f4,_0x161deb[_0xe144('0x11')]));});});};exports[_0xe144('0x20')]=function(_0x365b86){var _0x3a61a6=this;return new Promise(function(_0x7633c4,_0x150e60){return db['SugarcrmAccount'][_0xe144('0x21')]({'raw':_0x365b86[_0xe144('0x18')]?_0x365b86['options'][_0xe144('0x19')]===undefined?!![]:![]:!![],'where':_0x365b86[_0xe144('0x18')]?_0x365b86['options'][_0xe144('0x22')]||null:null,'attributes':_0x365b86[_0xe144('0x18')]?_0x365b86[_0xe144('0x18')]['attributes']||null:null,'include':_0x365b86['options']?_0x365b86[_0xe144('0x18')][_0xe144('0x1c')]?_[_0xe144('0x1d')](_0x365b86['options'][_0xe144('0x1c')],function(_0x249eb0){return{'model':db[_0x249eb0['model']],'as':_0x249eb0['as'],'attributes':_0x249eb0['attributes'],'include':_0x249eb0['include']?_[_0xe144('0x1d')](_0x249eb0[_0xe144('0x1c')],function(_0x2762cd){return{'model':db[_0x2762cd['model']],'as':_0x2762cd['as'],'attributes':_0x2762cd[_0xe144('0x1a')],'include':_0x2762cd[_0xe144('0x1c')]?_[_0xe144('0x1d')](_0x2762cd[_0xe144('0x1c')],function(_0x30d61b){return{'model':db[_0x30d61b[_0xe144('0x1e')]],'as':_0x30d61b['as'],'attributes':_0x30d61b[_0xe144('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xe144('0xa')](function(_0x45dbfe){logger[_0xe144('0x12')](_0xe144('0x20'),_0x365b86);logger[_0xe144('0xc')]('ShowSugarcrmAccount',_0x365b86,JSON[_0xe144('0x1f')](_0x45dbfe));_0x7633c4(_0x45dbfe);})['catch'](function(_0x459a16){logger['error'](_0xe144('0x20'),_0x459a16[_0xe144('0x11')],_0x365b86);_0x150e60(_0x3a61a6[_0xe144('0xe')](0x1f4,_0x459a16[_0xe144('0x11')]));});});};
\ No newline at end of file
+var _0x5fbd=['include','map','model','then','catch','ShowSugarcrmAccount','SugarcrmAccount','find','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','GetSugarcrmAccount','findAll','options','raw','attributes','limit'];(function(_0x56acd3,_0x52fcc5){var _0x920a32=function(_0x16dc60){while(--_0x16dc60){_0x56acd3['push'](_0x56acd3['shift']());}};_0x920a32(++_0x52fcc5);}(_0x5fbd,0x90));var _0xd5fb=function(_0x2fc530,_0x512acc){_0x2fc530=_0x2fc530-0x0;var _0x5f326f=_0x5fbd[_0x2fc530];return _0x5f326f;};'use strict';var _=require(_0xd5fb('0x0'));var util=require(_0xd5fb('0x1'));var moment=require(_0xd5fb('0x2'));var BPromise=require(_0xd5fb('0x3'));var rs=require(_0xd5fb('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd5fb('0x5'))['db'];var utils=require(_0xd5fb('0x6'));var logger=require(_0xd5fb('0x7'))('rpc');var config=require(_0xd5fb('0x8'));var jayson=require(_0xd5fb('0x9'));var client=jayson[_0xd5fb('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x122ea0,_0x3d8e7d,_0x552ac9){return new BPromise(function(_0xd94cb8,_0x127bf9){return client['request'](_0x122ea0,_0x552ac9)['then'](function(_0x134ace){logger[_0xd5fb('0xb')](_0xd5fb('0xc'),_0x3d8e7d,_0xd5fb('0xd'));logger[_0xd5fb('0xe')](_0xd5fb('0xf'),_0x3d8e7d,'request\x20sent',JSON[_0xd5fb('0x10')](_0x134ace));if(_0x134ace[_0xd5fb('0x11')]){if(_0x134ace[_0xd5fb('0x11')]['code']===0x1f4){logger['error'](_0xd5fb('0xc'),_0x3d8e7d,_0x134ace[_0xd5fb('0x11')]['message']);return _0x127bf9(_0x134ace[_0xd5fb('0x11')][_0xd5fb('0x12')]);}logger['error']('SugarcrmAccount,\x20%s,\x20%s',_0x3d8e7d,_0x134ace[_0xd5fb('0x11')]['message']);return _0xd94cb8(_0x134ace['error'][_0xd5fb('0x12')]);}else{logger[_0xd5fb('0xb')](_0xd5fb('0xc'),_0x3d8e7d,_0xd5fb('0xd'));_0xd94cb8(_0x134ace[_0xd5fb('0x13')]['message']);}})['catch'](function(_0x128d93){logger[_0xd5fb('0x11')]('SugarcrmAccount,\x20%s,\x20%s',_0x3d8e7d,_0x128d93);_0x127bf9(_0x128d93);});});}exports[_0xd5fb('0x14')]=function(_0xce610){var _0x183f44=this;return new Promise(function(_0x190f3d,_0x23222c){return db['SugarcrmAccount'][_0xd5fb('0x15')]({'raw':_0xce610[_0xd5fb('0x16')]?_0xce610['options'][_0xd5fb('0x17')]===undefined?!![]:![]:!![],'where':_0xce610[_0xd5fb('0x16')]?_0xce610[_0xd5fb('0x16')]['where']||null:null,'attributes':_0xce610['options']?_0xce610[_0xd5fb('0x16')][_0xd5fb('0x18')]||null:null,'limit':_0xce610[_0xd5fb('0x16')]?_0xce610[_0xd5fb('0x16')][_0xd5fb('0x19')]||null:null,'include':_0xce610[_0xd5fb('0x16')]?_0xce610['options'][_0xd5fb('0x1a')]?_['map'](_0xce610[_0xd5fb('0x16')][_0xd5fb('0x1a')],function(_0x5e017c){return{'model':db[_0x5e017c['model']],'as':_0x5e017c['as'],'attributes':_0x5e017c[_0xd5fb('0x18')],'include':_0x5e017c[_0xd5fb('0x1a')]?_[_0xd5fb('0x1b')](_0x5e017c[_0xd5fb('0x1a')],function(_0x5de0c6){return{'model':db[_0x5de0c6[_0xd5fb('0x1c')]],'as':_0x5de0c6['as'],'attributes':_0x5de0c6[_0xd5fb('0x18')],'include':_0x5de0c6[_0xd5fb('0x1a')]?_[_0xd5fb('0x1b')](_0x5de0c6[_0xd5fb('0x1a')],function(_0x2d8a83){return{'model':db[_0x2d8a83['model']],'as':_0x2d8a83['as'],'attributes':_0x2d8a83[_0xd5fb('0x18')]};}):[]};}):[]};}):[]:[]})[_0xd5fb('0x1d')](function(_0x2150b8){logger[_0xd5fb('0xb')](_0xd5fb('0x14'),_0xce610);logger[_0xd5fb('0xe')](_0xd5fb('0x14'),_0xce610,JSON[_0xd5fb('0x10')](_0x2150b8));_0x190f3d(_0x2150b8);})[_0xd5fb('0x1e')](function(_0x2b5eec){logger['error'](_0xd5fb('0x14'),_0x2b5eec['message'],_0xce610);_0x23222c(_0x183f44[_0xd5fb('0x11')](0x1f4,_0x2b5eec[_0xd5fb('0x12')]));});});};exports[_0xd5fb('0x1f')]=function(_0x26e4a5){var _0x7bb86d=this;return new Promise(function(_0x238011,_0x563557){return db[_0xd5fb('0x20')][_0xd5fb('0x21')]({'raw':_0x26e4a5[_0xd5fb('0x16')]?_0x26e4a5['options'][_0xd5fb('0x17')]===undefined?!![]:![]:!![],'where':_0x26e4a5[_0xd5fb('0x16')]?_0x26e4a5[_0xd5fb('0x16')]['where']||null:null,'attributes':_0x26e4a5[_0xd5fb('0x16')]?_0x26e4a5['options'][_0xd5fb('0x18')]||null:null,'include':_0x26e4a5[_0xd5fb('0x16')]?_0x26e4a5[_0xd5fb('0x16')]['include']?_[_0xd5fb('0x1b')](_0x26e4a5[_0xd5fb('0x16')][_0xd5fb('0x1a')],function(_0x30fe9e){return{'model':db[_0x30fe9e[_0xd5fb('0x1c')]],'as':_0x30fe9e['as'],'attributes':_0x30fe9e[_0xd5fb('0x18')],'include':_0x30fe9e['include']?_[_0xd5fb('0x1b')](_0x30fe9e['include'],function(_0x4f51b7){return{'model':db[_0x4f51b7['model']],'as':_0x4f51b7['as'],'attributes':_0x4f51b7['attributes'],'include':_0x4f51b7[_0xd5fb('0x1a')]?_[_0xd5fb('0x1b')](_0x4f51b7[_0xd5fb('0x1a')],function(_0x387a50){return{'model':db[_0x387a50[_0xd5fb('0x1c')]],'as':_0x387a50['as'],'attributes':_0x387a50[_0xd5fb('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x45eac6){logger['info'](_0xd5fb('0x1f'),_0x26e4a5);logger[_0xd5fb('0xe')]('ShowSugarcrmAccount',_0x26e4a5,JSON[_0xd5fb('0x10')](_0x45eac6));_0x238011(_0x45eac6);})[_0xd5fb('0x1e')](function(_0x4526ab){logger[_0xd5fb('0x11')]('ShowSugarcrmAccount',_0x4526ab[_0xd5fb('0x12')],_0x26e4a5);_0x563557(_0x7bb86d[_0xd5fb('0x11')](0x1f4,_0x4526ab['message']));});});};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/index.js b/server/api/intSugarcrmConfiguration/index.js
index 3e3ef17..b3e5e2f 100644
--- a/server/api/intSugarcrmConfiguration/index.js
+++ b/server/api/intSugarcrmConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x807b=['Router','../../components/interaction/service','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getDescriptions','post','put','update','destroy','multer','util','path','connect-timeout'];(function(_0x29f4d3,_0x247476){var _0x30d56e=function(_0x465d6d){while(--_0x465d6d){_0x29f4d3['push'](_0x29f4d3['shift']());}};_0x30d56e(++_0x247476);}(_0x807b,0x13f));var _0xb807=function(_0x1c2fff,_0x8798c3){_0x1c2fff=_0x1c2fff-0x0;var _0x314ba1=_0x807b[_0x1c2fff];return _0x314ba1;};'use strict';var multer=require(_0xb807('0x0'));var util=require(_0xb807('0x1'));var path=require(_0xb807('0x2'));var timeout=require(_0xb807('0x3'));var express=require('express');var router=express[_0xb807('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xb807('0x5'));var config=require('../../config/environment');var controller=require('./intSugarcrmConfiguration.controller');router[_0xb807('0x6')]('/',auth[_0xb807('0x7')](),controller[_0xb807('0x8')]);router[_0xb807('0x6')](_0xb807('0x9'),auth['isAuthenticated'](),controller[_0xb807('0xa')]);router[_0xb807('0x6')](_0xb807('0xb'),auth['isAuthenticated'](),controller[_0xb807('0xc')]);router[_0xb807('0x6')](_0xb807('0xd'),auth[_0xb807('0x7')](),controller['getSubjects']);router['get']('/:id/descriptions',auth[_0xb807('0x7')](),controller[_0xb807('0xe')]);router[_0xb807('0xf')]('/',auth[_0xb807('0x7')](),controller['create']);router[_0xb807('0x10')](_0xb807('0x9'),auth[_0xb807('0x7')](),controller[_0xb807('0x11')]);router['delete'](_0xb807('0x9'),auth[_0xb807('0x7')](),controller[_0xb807('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x8c1a=['isAuthenticated','show','/:id/fields','/:id/subjects','/:id/descriptions','getDescriptions','post','create','update','delete','exports','multer','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','index'];(function(_0x25028f,_0x22fe0f){var _0x544baf=function(_0x16adc0){while(--_0x16adc0){_0x25028f['push'](_0x25028f['shift']());}};_0x544baf(++_0x22fe0f);}(_0x8c1a,0x1ad));var _0xa8c1=function(_0x4b2251,_0x393f10){_0x4b2251=_0x4b2251-0x0;var _0x5d22fb=_0x8c1a[_0x4b2251];return _0x5d22fb;};'use strict';var multer=require(_0xa8c1('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xa8c1('0x1'));var express=require(_0xa8c1('0x2'));var router=express[_0xa8c1('0x3')]();var auth=require(_0xa8c1('0x4'));var interaction=require(_0xa8c1('0x5'));var config=require('../../config/environment');var controller=require('./intSugarcrmConfiguration.controller');router[_0xa8c1('0x6')]('/',auth['isAuthenticated'](),controller[_0xa8c1('0x7')]);router[_0xa8c1('0x6')]('/:id',auth[_0xa8c1('0x8')](),controller[_0xa8c1('0x9')]);router[_0xa8c1('0x6')](_0xa8c1('0xa'),auth['isAuthenticated'](),controller['getFields']);router[_0xa8c1('0x6')](_0xa8c1('0xb'),auth[_0xa8c1('0x8')](),controller['getSubjects']);router['get'](_0xa8c1('0xc'),auth[_0xa8c1('0x8')](),controller[_0xa8c1('0xd')]);router[_0xa8c1('0xe')]('/',auth[_0xa8c1('0x8')](),controller[_0xa8c1('0xf')]);router['put']('/:id',auth[_0xa8c1('0x8')](),controller[_0xa8c1('0x10')]);router[_0xa8c1('0x11')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xa8c1('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js
index 2393a94..8c6abea 100644
--- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js
+++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe507=['STRING','sequelize'];(function(_0x10244a,_0x3e96f4){var _0x4daacd=function(_0x3ef358){while(--_0x3ef358){_0x10244a['push'](_0x10244a['shift']());}};_0x4daacd(++_0x3e96f4);}(_0xe507,0x13d));var _0x7e50=function(_0x4ddc7e,_0xcb9b8){_0x4ddc7e=_0x4ddc7e-0x0;var _0xfbf0ec=_0xe507[_0x4ddc7e];return _0xfbf0ec;};'use strict';var Sequelize=require(_0x7e50('0x0'));module['exports']={'name':{'type':Sequelize[_0x7e50('0x1')]},'description':{'type':Sequelize[_0x7e50('0x1')]}};
\ No newline at end of file
+var _0x6ecb=['STRING'];(function(_0x7f287d,_0xe3b36e){var _0x21514f=function(_0x2e392e){while(--_0x2e392e){_0x7f287d['push'](_0x7f287d['shift']());}};_0x21514f(++_0xe3b36e);}(_0x6ecb,0x1b7));var _0xb6ec=function(_0x5a461b,_0x104cf5){_0x5a461b=_0x5a461b-0x0;var _0x5232f8=_0x6ecb[_0x5a461b];return _0x5232f8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xb6ec('0x0')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js
index 559e79f..4729d52 100644
--- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js
+++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x20d1=['lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','name','send','index','SugarcrmConfiguration','rawAttributes','keys','query','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','map','type','VIRTUAL','field','options','includeAll','findAll','rows','show','include','create','body','find','params','getFields','SugarcrmField','findOne','getSubjects','getDescriptions','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','sox','to-csv','ejs'];(function(_0x376dd3,_0x1fe643){var _0x2b8011=function(_0x5d4b9c){while(--_0x5d4b9c){_0x376dd3['push'](_0x376dd3['shift']());}};_0x2b8011(++_0x1fe643);}(_0x20d1,0x107));var _0x120d=function(_0x1a15cd,_0x1b95c6){_0x1a15cd=_0x1a15cd-0x0;var _0x33f1eb=_0x20d1[_0x1a15cd];return _0x33f1eb;};'use strict';var pdf=require(_0x120d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x120d('0x1'));var zipdir=require(_0x120d('0x2'));var jsonpatch=require(_0x120d('0x3'));var rp=require(_0x120d('0x4'));var moment=require(_0x120d('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x120d('0x6'));var util=require('util');var path=require('path');var sox=require(_0x120d('0x7'));var csv=require(_0x120d('0x8'));var ejs=require(_0x120d('0x9'));var fs=require('fs');var _=require(_0x120d('0xa'));var squel=require(_0x120d('0xb'));var crypto=require(_0x120d('0xc'));var jsforce=require(_0x120d('0xd'));var deskjs=require(_0x120d('0xe'));var toCsv=require(_0x120d('0x8'));var querystring=require(_0x120d('0xf'));var Papa=require('papaparse');var Redis=require(_0x120d('0x10'));var authService=require(_0x120d('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x120d('0x12'));var logger=require('../../config/logger')(_0x120d('0x13'));var utils=require(_0x120d('0x14'));var config=require(_0x120d('0x15'));var db=require(_0x120d('0x16'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x120d('0x17')]['http']({'port':0x232a});function checkPasswordPattern(_0x5a1f40,_0x2dc0f0,_0x50a1ad){if(_0x50a1ad){var _0x45fe76=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x45fe76[_0x120d('0x18')](_0x2dc0f0)){return _0x5a1f40;}else{throw new Error(_0x120d('0x19'));}}else{return _0x5a1f40;}}function respondWithRpcPromise(_0x5a9f21,_0x366948,_0x4088dd,_0x4b2fc5){return new BPromise(function(_0x19e99d,_0x7688d3){var _0x6895a7=_0x4b2fc5||client;return _0x6895a7[_0x120d('0x1a')](_0x5a9f21,_0x4088dd)[_0x120d('0x1b')](function(_0xea0581){logger['info'](_0x120d('0x1c'),_0x366948,_0x120d('0x1d'));logger[_0x120d('0x1e')]('SugarcrmConfiguration,\x20%s,\x20%s,\x20%s',_0x366948,_0x120d('0x1d'),JSON[_0x120d('0x1f')](_0xea0581));if(_0xea0581[_0x120d('0x20')]){if(_0xea0581[_0x120d('0x20')]['code']===0x1f4){logger[_0x120d('0x20')](_0x120d('0x1c'),_0x366948,_0xea0581[_0x120d('0x20')][_0x120d('0x21')]);return _0x7688d3(_0xea0581[_0x120d('0x20')][_0x120d('0x21')]);}logger['error'](_0x120d('0x1c'),_0x366948,_0xea0581[_0x120d('0x20')][_0x120d('0x21')]);return _0x19e99d(_0xea0581[_0x120d('0x20')][_0x120d('0x21')]);}else{logger[_0x120d('0x22')](_0x120d('0x1c'),_0x366948,_0x120d('0x1d'));_0x19e99d(_0xea0581[_0x120d('0x23')][_0x120d('0x21')]);}})[_0x120d('0x24')](function(_0xc912d0){logger[_0x120d('0x20')](_0x120d('0x1c'),_0x366948,_0xc912d0);_0x7688d3(_0xc912d0);});});}function respondWithStatusCode(_0x667a60,_0x1d7a1f){_0x1d7a1f=_0x1d7a1f||0xcc;return function(_0x28ece0){if(_0x28ece0){return _0x667a60[_0x120d('0x25')](_0x1d7a1f);}return _0x667a60[_0x120d('0x26')](_0x1d7a1f)[_0x120d('0x27')]();};}function respondWithResult(_0x1b8e00,_0x218943){_0x218943=_0x218943||0xc8;return function(_0x5bfe6d){if(_0x5bfe6d){return _0x1b8e00[_0x120d('0x26')](_0x218943)[_0x120d('0x28')](_0x5bfe6d);}};}function respondWithFilteredResult(_0x2da8d7,_0x5862a8){return function(_0x2295df){if(_0x2295df){var _0x38e6e0=_0x2295df[_0x120d('0x29')],_0xbc0043=_0x5862a8[_0x120d('0x2a')],_0x3dcf94=_0x5862a8['offset']+_0x5862a8[_0x120d('0x2b')],_0x57f651;if(_0x3dcf94>=_0x38e6e0){_0x3dcf94=_0x38e6e0;_0x57f651=0xc8;}else{_0x57f651=0xce;}_0x2da8d7[_0x120d('0x26')](_0x57f651);return _0x2da8d7[_0x120d('0x2c')](_0x120d('0x2d'),_0xbc0043+'-'+_0x3dcf94+'/'+_0x38e6e0)['json'](_0x2295df);}return null;};}function patchUpdates(_0x47bf43){return function(_0x2b6e22){try{jsonpatch[_0x120d('0x2e')](_0x2b6e22,_0x47bf43,!![]);}catch(_0xd87ef5){return BPromise[_0x120d('0x2f')](_0xd87ef5);}return _0x2b6e22[_0x120d('0x30')]();};}function saveUpdates(_0x9a57f3,_0x4b6ff5){return function(_0x5b3d71){if(_0x5b3d71){return _0x5b3d71[_0x120d('0x31')](_0x9a57f3)[_0x120d('0x1b')](function(_0x15932e){return _0x15932e;});}return null;};}function removeEntity(_0x377386,_0x41aae5){return function(_0x544244){if(_0x544244){return _0x544244[_0x120d('0x32')]()[_0x120d('0x1b')](function(){_0x377386[_0x120d('0x26')](0xcc)[_0x120d('0x27')]();});}};}function handleEntityNotFound(_0x4c580c,_0xd4624b){return function(_0x30bac9){if(!_0x30bac9){_0x4c580c[_0x120d('0x25')](0x194);}return _0x30bac9;};}function handleError(_0x54a155,_0x127867){_0x127867=_0x127867||0x1f4;return function(_0x264b8c){logger[_0x120d('0x20')](_0x264b8c['stack']);if(_0x264b8c[_0x120d('0x33')]){delete _0x264b8c['name'];}_0x54a155[_0x120d('0x26')](_0x127867)[_0x120d('0x34')](_0x264b8c);};}exports[_0x120d('0x35')]=function(_0x26df92,_0x42c5b1){var _0x5f2ba4={},_0x5b6bff={},_0x38f629={'count':0x0,'rows':[]};var _0x4005a3=db[_0x120d('0x36')][_0x120d('0x37')];_0x5b6bff['model']=_[_0x120d('0x38')](_0x4005a3);_0x5b6bff[_0x120d('0x39')]=_[_0x120d('0x38')](_0x26df92[_0x120d('0x39')]);_0x5b6bff['filters']=_['intersection'](_0x5b6bff[_0x120d('0x3a')],_0x5b6bff[_0x120d('0x39')]);_0x5f2ba4[_0x120d('0x3b')]=_[_0x120d('0x3c')](_0x5b6bff[_0x120d('0x3a')],qs['fields'](_0x26df92[_0x120d('0x39')][_0x120d('0x3d')]));_0x5f2ba4[_0x120d('0x3b')]=_0x5f2ba4[_0x120d('0x3b')][_0x120d('0x3e')]?_0x5f2ba4[_0x120d('0x3b')]:_0x5b6bff[_0x120d('0x3a')];if(!_0x26df92[_0x120d('0x39')][_0x120d('0x3f')](_0x120d('0x40'))){_0x5f2ba4['limit']=qs[_0x120d('0x2b')](_0x26df92[_0x120d('0x39')]['limit']);_0x5f2ba4[_0x120d('0x2a')]=qs[_0x120d('0x2a')](_0x26df92[_0x120d('0x39')][_0x120d('0x2a')]);}_0x5f2ba4[_0x120d('0x41')]=qs['sort'](_0x26df92[_0x120d('0x39')][_0x120d('0x42')]);_0x5f2ba4[_0x120d('0x43')]=qs[_0x120d('0x44')](_[_0x120d('0x45')](_0x26df92['query'],_0x5b6bff[_0x120d('0x44')]));if(_0x26df92[_0x120d('0x39')][_0x120d('0x46')]){_0x5f2ba4[_0x120d('0x43')]=_[_0x120d('0x47')](_0x5f2ba4[_0x120d('0x43')],{'$or':_[_0x120d('0x48')](_0x4005a3,function(_0x466914){if(_0x466914[_0x120d('0x49')]['key']!==_0x120d('0x4a')){var _0xce7f9e={};_0xce7f9e[_0x466914[_0x120d('0x4b')]]={'$like':'%'+_0x26df92[_0x120d('0x39')][_0x120d('0x46')]+'%'};return _0xce7f9e;}})});}_0x5f2ba4=_[_0x120d('0x47')]({},_0x5f2ba4,_0x26df92[_0x120d('0x4c')]);var _0x35da12={'where':_0x5f2ba4['where']};return db[_0x120d('0x36')]['count'](_0x35da12)[_0x120d('0x1b')](function(_0x1ff527){_0x38f629[_0x120d('0x29')]=_0x1ff527;if(_0x26df92[_0x120d('0x39')][_0x120d('0x4d')]){_0x5f2ba4['include']=[{'all':!![]}];}return db[_0x120d('0x36')][_0x120d('0x4e')](_0x5f2ba4);})['then'](function(_0x18f4cd){_0x38f629[_0x120d('0x4f')]=_0x18f4cd;return _0x38f629;})[_0x120d('0x1b')](respondWithFilteredResult(_0x42c5b1,_0x5f2ba4))[_0x120d('0x24')](handleError(_0x42c5b1,null));};exports[_0x120d('0x50')]=function(_0x24c92d,_0x2ebfc1){var _0x1f0e7f={'raw':![],'where':{'id':_0x24c92d['params']['id']}},_0x27c39b={};_0x27c39b[_0x120d('0x3a')]=_['keys'](db['SugarcrmConfiguration'][_0x120d('0x37')]);_0x27c39b[_0x120d('0x39')]=_['keys'](_0x24c92d[_0x120d('0x39')]);_0x27c39b[_0x120d('0x44')]=_[_0x120d('0x3c')](_0x27c39b[_0x120d('0x3a')],_0x27c39b[_0x120d('0x39')]);_0x1f0e7f[_0x120d('0x3b')]=_['intersection'](_0x27c39b[_0x120d('0x3a')],qs[_0x120d('0x3d')](_0x24c92d[_0x120d('0x39')][_0x120d('0x3d')]));_0x1f0e7f[_0x120d('0x3b')]=_0x1f0e7f[_0x120d('0x3b')][_0x120d('0x3e')]?_0x1f0e7f[_0x120d('0x3b')]:_0x27c39b[_0x120d('0x3a')];if(_0x24c92d['query']['includeAll']){_0x1f0e7f[_0x120d('0x51')]=[{'all':!![]}];}_0x1f0e7f=_[_0x120d('0x47')]({},_0x1f0e7f,_0x24c92d[_0x120d('0x4c')]);return db[_0x120d('0x36')]['find'](_0x1f0e7f)[_0x120d('0x1b')](handleEntityNotFound(_0x2ebfc1,null))['then'](respondWithResult(_0x2ebfc1,null))['catch'](handleError(_0x2ebfc1,null));};exports[_0x120d('0x52')]=function(_0xa3e29a,_0x5ba5cf){return db[_0x120d('0x36')][_0x120d('0x52')](_0xa3e29a['body'],{})['then'](respondWithResult(_0x5ba5cf,0xc9))['catch'](handleError(_0x5ba5cf,null));};exports[_0x120d('0x31')]=function(_0x21e845,_0x46d70a){if(_0x21e845[_0x120d('0x53')]['id']){delete _0x21e845[_0x120d('0x53')]['id'];}return db[_0x120d('0x36')][_0x120d('0x54')]({'where':{'id':_0x21e845[_0x120d('0x55')]['id']}})[_0x120d('0x1b')](handleEntityNotFound(_0x46d70a,null))[_0x120d('0x1b')](saveUpdates(_0x21e845['body'],null))['then'](respondWithResult(_0x46d70a,null))['catch'](handleError(_0x46d70a,null));};exports['destroy']=function(_0x2a0928,_0x2b712a){return db[_0x120d('0x36')][_0x120d('0x54')]({'where':{'id':_0x2a0928[_0x120d('0x55')]['id']}})[_0x120d('0x1b')](handleEntityNotFound(_0x2b712a,null))[_0x120d('0x1b')](removeEntity(_0x2b712a,null))[_0x120d('0x24')](handleError(_0x2b712a,null));};exports[_0x120d('0x56')]=function(_0x5bf852,_0x10a99e,_0x2577a6){var _0x233c03={};var _0x2d998e={};var _0xd4e8b1;var _0x1b9411;return db[_0x120d('0x36')]['findOne']({'where':{'id':_0x5bf852['params']['id']}})[_0x120d('0x1b')](handleEntityNotFound(_0x10a99e,null))[_0x120d('0x1b')](function(_0x493141){if(_0x493141){_0xd4e8b1=_0x493141;_0x2d998e[_0x120d('0x3a')]=_['keys'](db[_0x120d('0x57')]['rawAttributes']);_0x2d998e[_0x120d('0x39')]=_[_0x120d('0x38')](_0x5bf852[_0x120d('0x39')]);_0x2d998e['filters']=_[_0x120d('0x3c')](_0x2d998e[_0x120d('0x3a')],_0x2d998e['query']);_0x233c03[_0x120d('0x3b')]=_[_0x120d('0x3c')](_0x2d998e[_0x120d('0x3a')],qs[_0x120d('0x3d')](_0x5bf852[_0x120d('0x39')][_0x120d('0x3d')]));_0x233c03[_0x120d('0x3b')]=_0x233c03[_0x120d('0x3b')][_0x120d('0x3e')]?_0x233c03[_0x120d('0x3b')]:_0x2d998e[_0x120d('0x3a')];_0x233c03[_0x120d('0x41')]=qs[_0x120d('0x42')](_0x5bf852[_0x120d('0x39')][_0x120d('0x42')]);_0x233c03[_0x120d('0x43')]=qs[_0x120d('0x44')](_[_0x120d('0x45')](_0x5bf852['query'],_0x2d998e['filters']));if(_0x5bf852[_0x120d('0x39')][_0x120d('0x46')]){_0x233c03[_0x120d('0x43')]=_['merge'](_0x233c03[_0x120d('0x43')],{'$or':_[_0x120d('0x48')](_0x233c03[_0x120d('0x3b')],function(_0x55185b){var _0x20ee06={};_0x20ee06[_0x55185b]={'$like':'%'+_0x5bf852[_0x120d('0x39')]['filter']+'%'};return _0x20ee06;})});}_0x233c03=_[_0x120d('0x47')]({},_0x233c03,_0x5bf852[_0x120d('0x4c')]);return _0xd4e8b1['getFields'](_0x233c03);}})[_0x120d('0x1b')](function(_0x4e37f7){if(_0x4e37f7){_0x1b9411=_0x4e37f7[_0x120d('0x3e')];if(!_0x5bf852['query']['hasOwnProperty'](_0x120d('0x40'))){_0x233c03['limit']=qs[_0x120d('0x2b')](_0x5bf852['query'][_0x120d('0x2b')]);_0x233c03[_0x120d('0x2a')]=qs['offset'](_0x5bf852[_0x120d('0x39')][_0x120d('0x2a')]);}return _0xd4e8b1[_0x120d('0x56')](_0x233c03);}})['then'](function(_0x54f424){if(_0x54f424){return _0x54f424?{'count':_0x1b9411,'rows':_0x54f424}:null;}})[_0x120d('0x1b')](respondWithResult(_0x10a99e,null))[_0x120d('0x24')](handleError(_0x10a99e,null));};exports['getSubjects']=function(_0x179c99,_0x1ecb35,_0x3f8b10){var _0x1030eb={};var _0x243299={};var _0xbdb3b1;var _0x420d40;return db['SugarcrmConfiguration'][_0x120d('0x58')]({'where':{'id':_0x179c99[_0x120d('0x55')]['id']}})[_0x120d('0x1b')](handleEntityNotFound(_0x1ecb35,null))[_0x120d('0x1b')](function(_0x4b5cf6){if(_0x4b5cf6){_0xbdb3b1=_0x4b5cf6;_0x243299[_0x120d('0x3a')]=_[_0x120d('0x38')](db[_0x120d('0x57')]['rawAttributes']);_0x243299[_0x120d('0x39')]=_['keys'](_0x179c99['query']);_0x243299['filters']=_[_0x120d('0x3c')](_0x243299[_0x120d('0x3a')],_0x243299[_0x120d('0x39')]);_0x1030eb[_0x120d('0x3b')]=_[_0x120d('0x3c')](_0x243299['model'],qs['fields'](_0x179c99['query']['fields']));_0x1030eb[_0x120d('0x3b')]=_0x1030eb[_0x120d('0x3b')][_0x120d('0x3e')]?_0x1030eb[_0x120d('0x3b')]:_0x243299[_0x120d('0x3a')];_0x1030eb[_0x120d('0x41')]=qs[_0x120d('0x42')](_0x179c99['query'][_0x120d('0x42')]);_0x1030eb[_0x120d('0x43')]=qs[_0x120d('0x44')](_[_0x120d('0x45')](_0x179c99[_0x120d('0x39')],_0x243299[_0x120d('0x44')]));if(_0x179c99['query'][_0x120d('0x46')]){_0x1030eb[_0x120d('0x43')]=_[_0x120d('0x47')](_0x1030eb[_0x120d('0x43')],{'$or':_[_0x120d('0x48')](_0x1030eb[_0x120d('0x3b')],function(_0x4db72d){var _0x1085f3={};_0x1085f3[_0x4db72d]={'$like':'%'+_0x179c99['query'][_0x120d('0x46')]+'%'};return _0x1085f3;})});}_0x1030eb=_['merge']({},_0x1030eb,_0x179c99[_0x120d('0x4c')]);return _0xbdb3b1[_0x120d('0x59')](_0x1030eb);}})['then'](function(_0x116996){if(_0x116996){_0x420d40=_0x116996[_0x120d('0x3e')];if(!_0x179c99[_0x120d('0x39')][_0x120d('0x3f')](_0x120d('0x40'))){_0x1030eb[_0x120d('0x2b')]=qs[_0x120d('0x2b')](_0x179c99[_0x120d('0x39')][_0x120d('0x2b')]);_0x1030eb[_0x120d('0x2a')]=qs['offset'](_0x179c99[_0x120d('0x39')][_0x120d('0x2a')]);}return _0xbdb3b1[_0x120d('0x59')](_0x1030eb);}})[_0x120d('0x1b')](function(_0x5cfb80){if(_0x5cfb80){return _0x5cfb80?{'count':_0x420d40,'rows':_0x5cfb80}:null;}})[_0x120d('0x1b')](respondWithResult(_0x1ecb35,null))[_0x120d('0x24')](handleError(_0x1ecb35,null));};exports[_0x120d('0x5a')]=function(_0x3f9437,_0x238017,_0x10a6ca){var _0x224f39={};var _0x59332b={};var _0x1aedc1;var _0x499ff8;return db[_0x120d('0x36')]['findOne']({'where':{'id':_0x3f9437['params']['id']}})[_0x120d('0x1b')](handleEntityNotFound(_0x238017,null))[_0x120d('0x1b')](function(_0x26a9b2){if(_0x26a9b2){_0x1aedc1=_0x26a9b2;_0x59332b[_0x120d('0x3a')]=_[_0x120d('0x38')](db['SugarcrmField'][_0x120d('0x37')]);_0x59332b['query']=_[_0x120d('0x38')](_0x3f9437[_0x120d('0x39')]);_0x59332b[_0x120d('0x44')]=_['intersection'](_0x59332b[_0x120d('0x3a')],_0x59332b['query']);_0x224f39[_0x120d('0x3b')]=_['intersection'](_0x59332b[_0x120d('0x3a')],qs['fields'](_0x3f9437['query'][_0x120d('0x3d')]));_0x224f39[_0x120d('0x3b')]=_0x224f39['attributes']['length']?_0x224f39[_0x120d('0x3b')]:_0x59332b['model'];_0x224f39[_0x120d('0x41')]=qs[_0x120d('0x42')](_0x3f9437['query']['sort']);_0x224f39[_0x120d('0x43')]=qs['filters'](_[_0x120d('0x45')](_0x3f9437[_0x120d('0x39')],_0x59332b[_0x120d('0x44')]));if(_0x3f9437[_0x120d('0x39')][_0x120d('0x46')]){_0x224f39[_0x120d('0x43')]=_[_0x120d('0x47')](_0x224f39['where'],{'$or':_[_0x120d('0x48')](_0x224f39['attributes'],function(_0x4e5121){var _0x38254c={};_0x38254c[_0x4e5121]={'$like':'%'+_0x3f9437[_0x120d('0x39')][_0x120d('0x46')]+'%'};return _0x38254c;})});}_0x224f39=_[_0x120d('0x47')]({},_0x224f39,_0x3f9437[_0x120d('0x4c')]);return _0x1aedc1[_0x120d('0x5a')](_0x224f39);}})[_0x120d('0x1b')](function(_0x3c7a71){if(_0x3c7a71){_0x499ff8=_0x3c7a71[_0x120d('0x3e')];if(!_0x3f9437[_0x120d('0x39')][_0x120d('0x3f')]('nolimit')){_0x224f39[_0x120d('0x2b')]=qs[_0x120d('0x2b')](_0x3f9437[_0x120d('0x39')][_0x120d('0x2b')]);_0x224f39[_0x120d('0x2a')]=qs[_0x120d('0x2a')](_0x3f9437['query'][_0x120d('0x2a')]);}return _0x1aedc1[_0x120d('0x5a')](_0x224f39);}})[_0x120d('0x1b')](function(_0x24b467){if(_0x24b467){return _0x24b467?{'count':_0x499ff8,'rows':_0x24b467}:null;}})['then'](respondWithResult(_0x238017,null))[_0x120d('0x24')](handleError(_0x238017,null));};
\ No newline at end of file
+var _0xbc22=['limit','Content-Range','apply','reject','update','destroy','end','stack','name','send','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','map','type','key','VIRTUAL','field','options','SugarcrmConfiguration','includeAll','include','findAll','rows','show','params','rawAttributes','find','create','body','catch','SugarcrmField','getFields','getSubjects','pick','getDescriptions','html-pdf','eml-format','fast-json-patch','moment','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','sendStatus','status','json','count','offset'];(function(_0x575456,_0x33de80){var _0x225096=function(_0x140ed9){while(--_0x140ed9){_0x575456['push'](_0x575456['shift']());}};_0x225096(++_0x33de80);}(_0xbc22,0xe2));var _0x2bc2=function(_0x5f25b3,_0x35481a){_0x5f25b3=_0x5f25b3-0x0;var _0x4ab9bf=_0xbc22[_0x5f25b3];return _0x4ab9bf;};'use strict';var pdf=require(_0x2bc2('0x0'));var emlformat=require(_0x2bc2('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x2bc2('0x2'));var rp=require('request-promise');var moment=require(_0x2bc2('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x2bc2('0x4'));var path=require(_0x2bc2('0x5'));var sox=require(_0x2bc2('0x6'));var csv=require(_0x2bc2('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x2bc2('0x8'));var squel=require(_0x2bc2('0x9'));var crypto=require(_0x2bc2('0xa'));var jsforce=require(_0x2bc2('0xb'));var deskjs=require(_0x2bc2('0xc'));var toCsv=require(_0x2bc2('0x7'));var querystring=require('querystring');var Papa=require(_0x2bc2('0xd'));var Redis=require(_0x2bc2('0xe'));var authService=require(_0x2bc2('0xf'));var qs=require(_0x2bc2('0x10'));var hardwareService=require(_0x2bc2('0x11'));var logger=require('../../config/logger')(_0x2bc2('0x12'));var utils=require(_0x2bc2('0x13'));var config=require(_0x2bc2('0x14'));var db=require('../../mysqldb')['db'];var jayson=require(_0x2bc2('0x15'));var client=jayson[_0x2bc2('0x16')]['http']({'port':0x232a});function checkPasswordPattern(_0x183c3d,_0x435c20,_0x4a65d0){if(_0x4a65d0){var _0x3bca13=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3bca13[_0x2bc2('0x17')](_0x435c20)){return _0x183c3d;}else{throw new Error(_0x2bc2('0x18'));}}else{return _0x183c3d;}}function respondWithRpcPromise(_0x210398,_0x38328c,_0x2646e3,_0x5bbefc){return new BPromise(function(_0x2a0bc6,_0x3d3419){var _0x5b4132=_0x5bbefc||client;return _0x5b4132['request'](_0x210398,_0x2646e3)[_0x2bc2('0x19')](function(_0x1674b7){logger['info'](_0x2bc2('0x1a'),_0x38328c,_0x2bc2('0x1b'));logger[_0x2bc2('0x1c')](_0x2bc2('0x1d'),_0x38328c,_0x2bc2('0x1b'),JSON[_0x2bc2('0x1e')](_0x1674b7));if(_0x1674b7['error']){if(_0x1674b7[_0x2bc2('0x1f')][_0x2bc2('0x20')]===0x1f4){logger[_0x2bc2('0x1f')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x38328c,_0x1674b7['error'][_0x2bc2('0x21')]);return _0x3d3419(_0x1674b7[_0x2bc2('0x1f')]['message']);}logger['error']('SugarcrmConfiguration,\x20%s,\x20%s',_0x38328c,_0x1674b7[_0x2bc2('0x1f')][_0x2bc2('0x21')]);return _0x2a0bc6(_0x1674b7['error'][_0x2bc2('0x21')]);}else{logger[_0x2bc2('0x22')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x38328c,_0x2bc2('0x1b'));_0x2a0bc6(_0x1674b7[_0x2bc2('0x23')][_0x2bc2('0x21')]);}})['catch'](function(_0x2cd447){logger[_0x2bc2('0x1f')](_0x2bc2('0x1a'),_0x38328c,_0x2cd447);_0x3d3419(_0x2cd447);});});}function respondWithStatusCode(_0x1031c1,_0x3c9ccd){_0x3c9ccd=_0x3c9ccd||0xcc;return function(_0x1ddc50){if(_0x1ddc50){return _0x1031c1[_0x2bc2('0x24')](_0x3c9ccd);}return _0x1031c1[_0x2bc2('0x25')](_0x3c9ccd)['end']();};}function respondWithResult(_0x42a385,_0x50786c){_0x50786c=_0x50786c||0xc8;return function(_0xce707f){if(_0xce707f){return _0x42a385[_0x2bc2('0x25')](_0x50786c)[_0x2bc2('0x26')](_0xce707f);}};}function respondWithFilteredResult(_0x38aa73,_0x278286){return function(_0x5b7904){if(_0x5b7904){var _0x38f0b7=_0x5b7904[_0x2bc2('0x27')],_0x5d4587=_0x278286[_0x2bc2('0x28')],_0x155883=_0x278286[_0x2bc2('0x28')]+_0x278286[_0x2bc2('0x29')],_0x3fb531;if(_0x155883>=_0x38f0b7){_0x155883=_0x38f0b7;_0x3fb531=0xc8;}else{_0x3fb531=0xce;}_0x38aa73['status'](_0x3fb531);return _0x38aa73['set'](_0x2bc2('0x2a'),_0x5d4587+'-'+_0x155883+'/'+_0x38f0b7)[_0x2bc2('0x26')](_0x5b7904);}return null;};}function patchUpdates(_0xb0ef75){return function(_0xd3be34){try{jsonpatch[_0x2bc2('0x2b')](_0xd3be34,_0xb0ef75,!![]);}catch(_0x49c524){return BPromise[_0x2bc2('0x2c')](_0x49c524);}return _0xd3be34['save']();};}function saveUpdates(_0x2821a0,_0x3fa39a){return function(_0x144946){if(_0x144946){return _0x144946[_0x2bc2('0x2d')](_0x2821a0)['then'](function(_0x583acd){return _0x583acd;});}return null;};}function removeEntity(_0x1f48ad,_0x3f388a){return function(_0x3561f6){if(_0x3561f6){return _0x3561f6[_0x2bc2('0x2e')]()[_0x2bc2('0x19')](function(){_0x1f48ad[_0x2bc2('0x25')](0xcc)[_0x2bc2('0x2f')]();});}};}function handleEntityNotFound(_0x33b606,_0x5c0ed9){return function(_0x5eba62){if(!_0x5eba62){_0x33b606[_0x2bc2('0x24')](0x194);}return _0x5eba62;};}function handleError(_0x47efff,_0x59f2f9){_0x59f2f9=_0x59f2f9||0x1f4;return function(_0x196c60){logger[_0x2bc2('0x1f')](_0x196c60[_0x2bc2('0x30')]);if(_0x196c60[_0x2bc2('0x31')]){delete _0x196c60[_0x2bc2('0x31')];}_0x47efff[_0x2bc2('0x25')](_0x59f2f9)[_0x2bc2('0x32')](_0x196c60);};}exports['index']=function(_0x2edd20,_0x58e8b9){var _0x54d368={},_0x402b86={},_0x4e09a6={'count':0x0,'rows':[]};var _0x39116f=db['SugarcrmConfiguration']['rawAttributes'];_0x402b86[_0x2bc2('0x33')]=_[_0x2bc2('0x34')](_0x39116f);_0x402b86[_0x2bc2('0x35')]=_['keys'](_0x2edd20[_0x2bc2('0x35')]);_0x402b86[_0x2bc2('0x36')]=_[_0x2bc2('0x37')](_0x402b86[_0x2bc2('0x33')],_0x402b86[_0x2bc2('0x35')]);_0x54d368[_0x2bc2('0x38')]=_[_0x2bc2('0x37')](_0x402b86[_0x2bc2('0x33')],qs[_0x2bc2('0x39')](_0x2edd20[_0x2bc2('0x35')][_0x2bc2('0x39')]));_0x54d368[_0x2bc2('0x38')]=_0x54d368[_0x2bc2('0x38')][_0x2bc2('0x3a')]?_0x54d368[_0x2bc2('0x38')]:_0x402b86[_0x2bc2('0x33')];if(!_0x2edd20['query'][_0x2bc2('0x3b')](_0x2bc2('0x3c'))){_0x54d368[_0x2bc2('0x29')]=qs['limit'](_0x2edd20['query'][_0x2bc2('0x29')]);_0x54d368[_0x2bc2('0x28')]=qs[_0x2bc2('0x28')](_0x2edd20[_0x2bc2('0x35')][_0x2bc2('0x28')]);}_0x54d368[_0x2bc2('0x3d')]=qs[_0x2bc2('0x3e')](_0x2edd20[_0x2bc2('0x35')][_0x2bc2('0x3e')]);_0x54d368[_0x2bc2('0x3f')]=qs[_0x2bc2('0x36')](_['pick'](_0x2edd20[_0x2bc2('0x35')],_0x402b86['filters']));if(_0x2edd20[_0x2bc2('0x35')][_0x2bc2('0x40')]){_0x54d368[_0x2bc2('0x3f')]=_[_0x2bc2('0x41')](_0x54d368[_0x2bc2('0x3f')],{'$or':_[_0x2bc2('0x42')](_0x39116f,function(_0x3b8e77){if(_0x3b8e77[_0x2bc2('0x43')][_0x2bc2('0x44')]!==_0x2bc2('0x45')){var _0x2689cf={};_0x2689cf[_0x3b8e77[_0x2bc2('0x46')]]={'$like':'%'+_0x2edd20[_0x2bc2('0x35')][_0x2bc2('0x40')]+'%'};return _0x2689cf;}})});}_0x54d368=_[_0x2bc2('0x41')]({},_0x54d368,_0x2edd20[_0x2bc2('0x47')]);var _0x2fbdef={'where':_0x54d368[_0x2bc2('0x3f')]};return db[_0x2bc2('0x48')]['count'](_0x2fbdef)[_0x2bc2('0x19')](function(_0x487f4c){_0x4e09a6['count']=_0x487f4c;if(_0x2edd20[_0x2bc2('0x35')][_0x2bc2('0x49')]){_0x54d368[_0x2bc2('0x4a')]=[{'all':!![]}];}return db['SugarcrmConfiguration'][_0x2bc2('0x4b')](_0x54d368);})[_0x2bc2('0x19')](function(_0x483694){_0x4e09a6[_0x2bc2('0x4c')]=_0x483694;return _0x4e09a6;})[_0x2bc2('0x19')](respondWithFilteredResult(_0x58e8b9,_0x54d368))['catch'](handleError(_0x58e8b9,null));};exports[_0x2bc2('0x4d')]=function(_0x102874,_0x288ba2){var _0x2c3256={'raw':![],'where':{'id':_0x102874[_0x2bc2('0x4e')]['id']}},_0x43450f={};_0x43450f[_0x2bc2('0x33')]=_[_0x2bc2('0x34')](db['SugarcrmConfiguration'][_0x2bc2('0x4f')]);_0x43450f['query']=_[_0x2bc2('0x34')](_0x102874[_0x2bc2('0x35')]);_0x43450f[_0x2bc2('0x36')]=_[_0x2bc2('0x37')](_0x43450f[_0x2bc2('0x33')],_0x43450f[_0x2bc2('0x35')]);_0x2c3256[_0x2bc2('0x38')]=_['intersection'](_0x43450f[_0x2bc2('0x33')],qs[_0x2bc2('0x39')](_0x102874[_0x2bc2('0x35')][_0x2bc2('0x39')]));_0x2c3256[_0x2bc2('0x38')]=_0x2c3256[_0x2bc2('0x38')]['length']?_0x2c3256[_0x2bc2('0x38')]:_0x43450f['model'];if(_0x102874['query']['includeAll']){_0x2c3256[_0x2bc2('0x4a')]=[{'all':!![]}];}_0x2c3256=_[_0x2bc2('0x41')]({},_0x2c3256,_0x102874['options']);return db[_0x2bc2('0x48')][_0x2bc2('0x50')](_0x2c3256)['then'](handleEntityNotFound(_0x288ba2,null))['then'](respondWithResult(_0x288ba2,null))['catch'](handleError(_0x288ba2,null));};exports[_0x2bc2('0x51')]=function(_0x2cffba,_0xa57142){return db[_0x2bc2('0x48')][_0x2bc2('0x51')](_0x2cffba[_0x2bc2('0x52')],{})[_0x2bc2('0x19')](respondWithResult(_0xa57142,0xc9))[_0x2bc2('0x53')](handleError(_0xa57142,null));};exports[_0x2bc2('0x2d')]=function(_0x5bd6b,_0x120676){if(_0x5bd6b[_0x2bc2('0x52')]['id']){delete _0x5bd6b[_0x2bc2('0x52')]['id'];}return db[_0x2bc2('0x48')][_0x2bc2('0x50')]({'where':{'id':_0x5bd6b['params']['id']}})['then'](handleEntityNotFound(_0x120676,null))[_0x2bc2('0x19')](saveUpdates(_0x5bd6b['body'],null))[_0x2bc2('0x19')](respondWithResult(_0x120676,null))[_0x2bc2('0x53')](handleError(_0x120676,null));};exports['destroy']=function(_0x388589,_0x47202e){return db['SugarcrmConfiguration'][_0x2bc2('0x50')]({'where':{'id':_0x388589['params']['id']}})[_0x2bc2('0x19')](handleEntityNotFound(_0x47202e,null))[_0x2bc2('0x19')](removeEntity(_0x47202e,null))[_0x2bc2('0x53')](handleError(_0x47202e,null));};exports['getFields']=function(_0x3b8cf0,_0x23883b,_0x1c0365){var _0x24b178={};var _0x4dca72={};var _0xc41ecc;var _0x4fa2bb;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x3b8cf0['params']['id']}})[_0x2bc2('0x19')](handleEntityNotFound(_0x23883b,null))[_0x2bc2('0x19')](function(_0x5d7bf7){if(_0x5d7bf7){_0xc41ecc=_0x5d7bf7;_0x4dca72[_0x2bc2('0x33')]=_[_0x2bc2('0x34')](db[_0x2bc2('0x54')][_0x2bc2('0x4f')]);_0x4dca72[_0x2bc2('0x35')]=_[_0x2bc2('0x34')](_0x3b8cf0['query']);_0x4dca72[_0x2bc2('0x36')]=_[_0x2bc2('0x37')](_0x4dca72[_0x2bc2('0x33')],_0x4dca72[_0x2bc2('0x35')]);_0x24b178[_0x2bc2('0x38')]=_[_0x2bc2('0x37')](_0x4dca72['model'],qs['fields'](_0x3b8cf0[_0x2bc2('0x35')][_0x2bc2('0x39')]));_0x24b178[_0x2bc2('0x38')]=_0x24b178[_0x2bc2('0x38')][_0x2bc2('0x3a')]?_0x24b178['attributes']:_0x4dca72[_0x2bc2('0x33')];_0x24b178['order']=qs[_0x2bc2('0x3e')](_0x3b8cf0[_0x2bc2('0x35')][_0x2bc2('0x3e')]);_0x24b178['where']=qs[_0x2bc2('0x36')](_['pick'](_0x3b8cf0['query'],_0x4dca72[_0x2bc2('0x36')]));if(_0x3b8cf0['query'][_0x2bc2('0x40')]){_0x24b178[_0x2bc2('0x3f')]=_['merge'](_0x24b178[_0x2bc2('0x3f')],{'$or':_[_0x2bc2('0x42')](_0x24b178[_0x2bc2('0x38')],function(_0x9296d9){var _0x196b50={};_0x196b50[_0x9296d9]={'$like':'%'+_0x3b8cf0[_0x2bc2('0x35')][_0x2bc2('0x40')]+'%'};return _0x196b50;})});}_0x24b178=_[_0x2bc2('0x41')]({},_0x24b178,_0x3b8cf0[_0x2bc2('0x47')]);return _0xc41ecc[_0x2bc2('0x55')](_0x24b178);}})[_0x2bc2('0x19')](function(_0x5e0fdf){if(_0x5e0fdf){_0x4fa2bb=_0x5e0fdf[_0x2bc2('0x3a')];if(!_0x3b8cf0[_0x2bc2('0x35')]['hasOwnProperty']('nolimit')){_0x24b178[_0x2bc2('0x29')]=qs[_0x2bc2('0x29')](_0x3b8cf0[_0x2bc2('0x35')]['limit']);_0x24b178['offset']=qs['offset'](_0x3b8cf0[_0x2bc2('0x35')]['offset']);}return _0xc41ecc[_0x2bc2('0x55')](_0x24b178);}})['then'](function(_0x2e0bcd){if(_0x2e0bcd){return _0x2e0bcd?{'count':_0x4fa2bb,'rows':_0x2e0bcd}:null;}})['then'](respondWithResult(_0x23883b,null))[_0x2bc2('0x53')](handleError(_0x23883b,null));};exports[_0x2bc2('0x56')]=function(_0x182bb5,_0x27e524,_0x4eda54){var _0x3ad997={};var _0xf78258={};var _0xcb881e;var _0x301cc0;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x182bb5[_0x2bc2('0x4e')]['id']}})[_0x2bc2('0x19')](handleEntityNotFound(_0x27e524,null))[_0x2bc2('0x19')](function(_0x196106){if(_0x196106){_0xcb881e=_0x196106;_0xf78258[_0x2bc2('0x33')]=_['keys'](db[_0x2bc2('0x54')][_0x2bc2('0x4f')]);_0xf78258['query']=_[_0x2bc2('0x34')](_0x182bb5['query']);_0xf78258['filters']=_[_0x2bc2('0x37')](_0xf78258['model'],_0xf78258[_0x2bc2('0x35')]);_0x3ad997[_0x2bc2('0x38')]=_[_0x2bc2('0x37')](_0xf78258['model'],qs[_0x2bc2('0x39')](_0x182bb5[_0x2bc2('0x35')][_0x2bc2('0x39')]));_0x3ad997['attributes']=_0x3ad997[_0x2bc2('0x38')][_0x2bc2('0x3a')]?_0x3ad997[_0x2bc2('0x38')]:_0xf78258['model'];_0x3ad997[_0x2bc2('0x3d')]=qs['sort'](_0x182bb5['query']['sort']);_0x3ad997[_0x2bc2('0x3f')]=qs[_0x2bc2('0x36')](_[_0x2bc2('0x57')](_0x182bb5[_0x2bc2('0x35')],_0xf78258[_0x2bc2('0x36')]));if(_0x182bb5[_0x2bc2('0x35')][_0x2bc2('0x40')]){_0x3ad997[_0x2bc2('0x3f')]=_[_0x2bc2('0x41')](_0x3ad997[_0x2bc2('0x3f')],{'$or':_[_0x2bc2('0x42')](_0x3ad997[_0x2bc2('0x38')],function(_0x5aa692){var _0x10b94f={};_0x10b94f[_0x5aa692]={'$like':'%'+_0x182bb5[_0x2bc2('0x35')][_0x2bc2('0x40')]+'%'};return _0x10b94f;})});}_0x3ad997=_['merge']({},_0x3ad997,_0x182bb5[_0x2bc2('0x47')]);return _0xcb881e[_0x2bc2('0x56')](_0x3ad997);}})[_0x2bc2('0x19')](function(_0x3abc34){if(_0x3abc34){_0x301cc0=_0x3abc34[_0x2bc2('0x3a')];if(!_0x182bb5['query'][_0x2bc2('0x3b')](_0x2bc2('0x3c'))){_0x3ad997[_0x2bc2('0x29')]=qs[_0x2bc2('0x29')](_0x182bb5['query'][_0x2bc2('0x29')]);_0x3ad997['offset']=qs[_0x2bc2('0x28')](_0x182bb5[_0x2bc2('0x35')][_0x2bc2('0x28')]);}return _0xcb881e[_0x2bc2('0x56')](_0x3ad997);}})['then'](function(_0x16f3e4){if(_0x16f3e4){return _0x16f3e4?{'count':_0x301cc0,'rows':_0x16f3e4}:null;}})[_0x2bc2('0x19')](respondWithResult(_0x27e524,null))[_0x2bc2('0x53')](handleError(_0x27e524,null));};exports['getDescriptions']=function(_0x3b7a8a,_0x4ec094,_0x27061e){var _0x523685={};var _0x4bb0b7={};var _0x1207e3;var _0x1cb32d;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x3b7a8a[_0x2bc2('0x4e')]['id']}})[_0x2bc2('0x19')](handleEntityNotFound(_0x4ec094,null))[_0x2bc2('0x19')](function(_0x576320){if(_0x576320){_0x1207e3=_0x576320;_0x4bb0b7[_0x2bc2('0x33')]=_[_0x2bc2('0x34')](db['SugarcrmField']['rawAttributes']);_0x4bb0b7[_0x2bc2('0x35')]=_[_0x2bc2('0x34')](_0x3b7a8a[_0x2bc2('0x35')]);_0x4bb0b7['filters']=_[_0x2bc2('0x37')](_0x4bb0b7[_0x2bc2('0x33')],_0x4bb0b7[_0x2bc2('0x35')]);_0x523685[_0x2bc2('0x38')]=_[_0x2bc2('0x37')](_0x4bb0b7['model'],qs['fields'](_0x3b7a8a['query'][_0x2bc2('0x39')]));_0x523685[_0x2bc2('0x38')]=_0x523685['attributes']['length']?_0x523685['attributes']:_0x4bb0b7[_0x2bc2('0x33')];_0x523685[_0x2bc2('0x3d')]=qs[_0x2bc2('0x3e')](_0x3b7a8a[_0x2bc2('0x35')][_0x2bc2('0x3e')]);_0x523685[_0x2bc2('0x3f')]=qs['filters'](_['pick'](_0x3b7a8a[_0x2bc2('0x35')],_0x4bb0b7[_0x2bc2('0x36')]));if(_0x3b7a8a[_0x2bc2('0x35')][_0x2bc2('0x40')]){_0x523685['where']=_[_0x2bc2('0x41')](_0x523685['where'],{'$or':_[_0x2bc2('0x42')](_0x523685[_0x2bc2('0x38')],function(_0x482e6d){var _0x2a39d0={};_0x2a39d0[_0x482e6d]={'$like':'%'+_0x3b7a8a[_0x2bc2('0x35')]['filter']+'%'};return _0x2a39d0;})});}_0x523685=_['merge']({},_0x523685,_0x3b7a8a[_0x2bc2('0x47')]);return _0x1207e3[_0x2bc2('0x58')](_0x523685);}})[_0x2bc2('0x19')](function(_0x1b16e6){if(_0x1b16e6){_0x1cb32d=_0x1b16e6[_0x2bc2('0x3a')];if(!_0x3b7a8a['query'][_0x2bc2('0x3b')]('nolimit')){_0x523685[_0x2bc2('0x29')]=qs['limit'](_0x3b7a8a[_0x2bc2('0x35')][_0x2bc2('0x29')]);_0x523685[_0x2bc2('0x28')]=qs[_0x2bc2('0x28')](_0x3b7a8a[_0x2bc2('0x35')][_0x2bc2('0x28')]);}return _0x1207e3[_0x2bc2('0x58')](_0x523685);}})[_0x2bc2('0x19')](function(_0x17e06c){if(_0x17e06c){return _0x17e06c?{'count':_0x1cb32d,'rows':_0x17e06c}:null;}})[_0x2bc2('0x19')](respondWithResult(_0x4ec094,null))[_0x2bc2('0x53')](handleError(_0x4ec094,null));};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js
index f782407..fce7759 100644
--- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js
+++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x20f0=['request-promise','path','rimraf','./intSugarcrmConfiguration.attributes','exports','define','SugarcrmConfiguration','int_sugarcrm_configurations','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x15dac9,_0x3f9493){var _0x122b1b=function(_0x5cf148){while(--_0x5cf148){_0x15dac9['push'](_0x15dac9['shift']());}};_0x122b1b(++_0x3f9493);}(_0x20f0,0x166));var _0x020f=function(_0x8b8564,_0x162976){_0x8b8564=_0x8b8564-0x0;var _0x360c61=_0x20f0[_0x8b8564];return _0x360c61;};'use strict';var _=require(_0x020f('0x0'));var util=require(_0x020f('0x1'));var logger=require(_0x020f('0x2'))(_0x020f('0x3'));var moment=require(_0x020f('0x4'));var BPromise=require(_0x020f('0x5'));var rp=require(_0x020f('0x6'));var fs=require('fs');var path=require(_0x020f('0x7'));var rimraf=require(_0x020f('0x8'));var config=require('../../config/environment');var attributes=require(_0x020f('0x9'));module[_0x020f('0xa')]=function(_0x3673e0,_0x2a8951){return _0x3673e0[_0x020f('0xb')](_0x020f('0xc'),attributes,{'tableName':_0x020f('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8be3=['../../config/environment','./intSugarcrmConfiguration.attributes','define','lodash','util','../../config/logger','moment','request-promise','path','rimraf'];(function(_0x4017b0,_0x4347db){var _0x5ed4f7=function(_0x706c26){while(--_0x706c26){_0x4017b0['push'](_0x4017b0['shift']());}};_0x5ed4f7(++_0x4347db);}(_0x8be3,0xc1));var _0x38be=function(_0x4e8909,_0x955af0){_0x4e8909=_0x4e8909-0x0;var _0x2e72b0=_0x8be3[_0x4e8909];return _0x2e72b0;};'use strict';var _=require(_0x38be('0x0'));var util=require(_0x38be('0x1'));var logger=require(_0x38be('0x2'))('api');var moment=require(_0x38be('0x3'));var BPromise=require('bluebird');var rp=require(_0x38be('0x4'));var fs=require('fs');var path=require(_0x38be('0x5'));var rimraf=require(_0x38be('0x6'));var config=require(_0x38be('0x7'));var attributes=require(_0x38be('0x8'));module['exports']=function(_0x212d78,_0xe16319){return _0x212d78[_0x38be('0x9')]('SugarcrmConfiguration',attributes,{'tableName':'int_sugarcrm_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js
index 30c61d0..2b0f03c 100644
--- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js
+++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa7b5=['info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then'];(function(_0xe6e723,_0x5af822){var _0x1585b3=function(_0xef3b6d){while(--_0xef3b6d){_0xe6e723['push'](_0xe6e723['shift']());}};_0x1585b3(++_0x5af822);}(_0xa7b5,0x73));var _0x5a7b=function(_0x3eba96,_0x173521){_0x3eba96=_0x3eba96-0x0;var _0x247875=_0xa7b5[_0x3eba96];return _0x247875;};'use strict';var _=require(_0x5a7b('0x0'));var util=require(_0x5a7b('0x1'));var moment=require('moment');var BPromise=require(_0x5a7b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5a7b('0x3'))['db'];var utils=require(_0x5a7b('0x4'));var logger=require(_0x5a7b('0x5'))(_0x5a7b('0x6'));var config=require(_0x5a7b('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x5a7b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1bca67,_0x21eca8,_0x53f4b4){return new BPromise(function(_0x4df873,_0x374c5f){return client[_0x5a7b('0x9')](_0x1bca67,_0x53f4b4)[_0x5a7b('0xa')](function(_0x4ae4b7){logger[_0x5a7b('0xb')](_0x5a7b('0xc'),_0x21eca8,_0x5a7b('0xd'));logger[_0x5a7b('0xe')](_0x5a7b('0xf'),_0x21eca8,_0x5a7b('0xd'),JSON[_0x5a7b('0x10')](_0x4ae4b7));if(_0x4ae4b7[_0x5a7b('0x11')]){if(_0x4ae4b7[_0x5a7b('0x11')][_0x5a7b('0x12')]===0x1f4){logger[_0x5a7b('0x11')](_0x5a7b('0xc'),_0x21eca8,_0x4ae4b7['error'][_0x5a7b('0x13')]);return _0x374c5f(_0x4ae4b7['error'][_0x5a7b('0x13')]);}logger['error'](_0x5a7b('0xc'),_0x21eca8,_0x4ae4b7['error']['message']);return _0x4df873(_0x4ae4b7['error'][_0x5a7b('0x13')]);}else{logger[_0x5a7b('0xb')](_0x5a7b('0xc'),_0x21eca8,'request\x20sent');_0x4df873(_0x4ae4b7['result'][_0x5a7b('0x13')]);}})[_0x5a7b('0x14')](function(_0x566833){logger['error'](_0x5a7b('0xc'),_0x21eca8,_0x566833);_0x374c5f(_0x566833);});});}
\ No newline at end of file
+var _0x8d61=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment'];(function(_0x1db251,_0xf0443d){var _0x56685a=function(_0x6ec6b7){while(--_0x6ec6b7){_0x1db251['push'](_0x1db251['shift']());}};_0x56685a(++_0xf0443d);}(_0x8d61,0x67));var _0x18d6=function(_0x30182f,_0x30ce41){_0x30182f=_0x30182f-0x0;var _0x5207db=_0x8d61[_0x30182f];return _0x5207db;};'use strict';var _=require('lodash');var util=require(_0x18d6('0x0'));var moment=require(_0x18d6('0x1'));var BPromise=require(_0x18d6('0x2'));var rs=require(_0x18d6('0x3'));var fs=require('fs');var Redis=require(_0x18d6('0x4'));var db=require(_0x18d6('0x5'))['db'];var utils=require(_0x18d6('0x6'));var logger=require(_0x18d6('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x18d6('0x8')][_0x18d6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x254163,_0x77da4e,_0x519079){return new BPromise(function(_0xe6f86e,_0x239d5d){return client['request'](_0x254163,_0x519079)[_0x18d6('0xa')](function(_0x5ba6b7){logger[_0x18d6('0xb')](_0x18d6('0xc'),_0x77da4e,_0x18d6('0xd'));logger[_0x18d6('0xe')](_0x18d6('0xf'),_0x77da4e,'request\x20sent',JSON['stringify'](_0x5ba6b7));if(_0x5ba6b7[_0x18d6('0x10')]){if(_0x5ba6b7[_0x18d6('0x10')][_0x18d6('0x11')]===0x1f4){logger[_0x18d6('0x10')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x77da4e,_0x5ba6b7[_0x18d6('0x10')][_0x18d6('0x12')]);return _0x239d5d(_0x5ba6b7['error'][_0x18d6('0x12')]);}logger[_0x18d6('0x10')](_0x18d6('0xc'),_0x77da4e,_0x5ba6b7[_0x18d6('0x10')][_0x18d6('0x12')]);return _0xe6f86e(_0x5ba6b7[_0x18d6('0x10')][_0x18d6('0x12')]);}else{logger['info']('SugarcrmConfiguration,\x20%s,\x20%s',_0x77da4e,'request\x20sent');_0xe6f86e(_0x5ba6b7[_0x18d6('0x13')]['message']);}})[_0x18d6('0x14')](function(_0x1a8680){logger[_0x18d6('0x10')](_0x18d6('0xc'),_0x77da4e,_0x1a8680);_0x239d5d(_0x1a8680);});});}
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/index.js b/server/api/intSugarcrmField/index.js
index e0d23b5..ab75e33 100644
--- a/server/api/intSugarcrmField/index.js
+++ b/server/api/intSugarcrmField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2fb9=['destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','get','isAuthenticated','index','/:id','show','post','create','put','update'];(function(_0x2c5c7c,_0x559587){var _0x5d77af=function(_0x4144c3){while(--_0x4144c3){_0x2c5c7c['push'](_0x2c5c7c['shift']());}};_0x5d77af(++_0x559587);}(_0x2fb9,0x11a));var _0x92fb=function(_0x21b1a6,_0x3ee916){_0x21b1a6=_0x21b1a6-0x0;var _0x2cfd7a=_0x2fb9[_0x21b1a6];return _0x2cfd7a;};'use strict';var multer=require('multer');var util=require(_0x92fb('0x0'));var path=require(_0x92fb('0x1'));var timeout=require(_0x92fb('0x2'));var express=require(_0x92fb('0x3'));var router=express[_0x92fb('0x4')]();var auth=require(_0x92fb('0x5'));var interaction=require(_0x92fb('0x6'));var config=require(_0x92fb('0x7'));var controller=require(_0x92fb('0x8'));router[_0x92fb('0x9')]('/',auth[_0x92fb('0xa')](),controller[_0x92fb('0xb')]);router[_0x92fb('0x9')](_0x92fb('0xc'),auth[_0x92fb('0xa')](),controller[_0x92fb('0xd')]);router[_0x92fb('0xe')]('/',auth[_0x92fb('0xa')](),controller[_0x92fb('0xf')]);router[_0x92fb('0x10')](_0x92fb('0xc'),auth[_0x92fb('0xa')](),controller[_0x92fb('0x11')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x92fb('0x12')]);module[_0x92fb('0x13')]=router;
\ No newline at end of file
+var _0x47a6=['update','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','post','create','put'];(function(_0x30f395,_0x3629b5){var _0x2ea0ee=function(_0x35a9af){while(--_0x35a9af){_0x30f395['push'](_0x30f395['shift']());}};_0x2ea0ee(++_0x3629b5);}(_0x47a6,0xd2));var _0x647a=function(_0x463927,_0x4b9ffa){_0x463927=_0x463927-0x0;var _0x1453f5=_0x47a6[_0x463927];return _0x1453f5;};'use strict';var multer=require('multer');var util=require(_0x647a('0x0'));var path=require('path');var timeout=require(_0x647a('0x1'));var express=require(_0x647a('0x2'));var router=express[_0x647a('0x3')]();var auth=require(_0x647a('0x4'));var interaction=require(_0x647a('0x5'));var config=require(_0x647a('0x6'));var controller=require('./intSugarcrmField.controller');router[_0x647a('0x7')]('/',auth[_0x647a('0x8')](),controller[_0x647a('0x9')]);router[_0x647a('0x7')](_0x647a('0xa'),auth[_0x647a('0x8')](),controller['show']);router[_0x647a('0xb')]('/',auth['isAuthenticated'](),controller[_0x647a('0xc')]);router[_0x647a('0xd')](_0x647a('0xa'),auth[_0x647a('0x8')](),controller[_0x647a('0xe')]);router['delete']('/:id',auth[_0x647a('0x8')](),controller['destroy']);module[_0x647a('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.attributes.js b/server/api/intSugarcrmField/intSugarcrmField.attributes.js
index f83bd1a..98bebf5 100644
--- a/server/api/intSugarcrmField/intSugarcrmField.attributes.js
+++ b/server/api/intSugarcrmField/intSugarcrmField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe706=['BOOLEAN','sequelize','exports','ENUM','variable','customVariable','keyValue','string','STRING'];(function(_0x3a8b2d,_0x4ea870){var _0x54f1be=function(_0x295c2c){while(--_0x295c2c){_0x3a8b2d['push'](_0x3a8b2d['shift']());}};_0x54f1be(++_0x4ea870);}(_0xe706,0xa3));var _0x6e70=function(_0x5b54fd,_0x1a8bf1){_0x5b54fd=_0x5b54fd-0x0;var _0x4b14e4=_0xe706[_0x5b54fd];return _0x4b14e4;};'use strict';var Sequelize=require(_0x6e70('0x0'));module[_0x6e70('0x1')]={'type':{'type':Sequelize[_0x6e70('0x2')]('string',_0x6e70('0x3'),_0x6e70('0x4'),_0x6e70('0x5')),'defaultValue':_0x6e70('0x6')},'content':{'type':Sequelize[_0x6e70('0x7')]},'key':{'type':Sequelize[_0x6e70('0x7')]},'keyType':{'type':Sequelize[_0x6e70('0x2')](_0x6e70('0x6'),_0x6e70('0x3'),_0x6e70('0x4'))},'keyContent':{'type':Sequelize[_0x6e70('0x7')]},'idField':{'type':Sequelize[_0x6e70('0x7')]},'nameField':{'type':Sequelize[_0x6e70('0x7')]},'customField':{'type':Sequelize[_0x6e70('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x6e70('0x7')]}};
\ No newline at end of file
+var _0x91a7=['STRING','exports','ENUM','string','customVariable'];(function(_0xf219f7,_0x27140d){var _0x563bf2=function(_0x1949d1){while(--_0x1949d1){_0xf219f7['push'](_0xf219f7['shift']());}};_0x563bf2(++_0x27140d);}(_0x91a7,0xe7));var _0x791a=function(_0x48c94b,_0x1b2f3b){_0x48c94b=_0x48c94b-0x0;var _0xecba1e=_0x91a7[_0x48c94b];return _0xecba1e;};'use strict';var Sequelize=require('sequelize');module[_0x791a('0x0')]={'type':{'type':Sequelize[_0x791a('0x1')](_0x791a('0x2'),'variable',_0x791a('0x3'),'keyValue'),'defaultValue':_0x791a('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x791a('0x1')](_0x791a('0x2'),'variable',_0x791a('0x3'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x791a('0x4')]},'nameField':{'type':Sequelize[_0x791a('0x4')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x791a('0x4')]}};
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.controller.js b/server/api/intSugarcrmField/intSugarcrmField.controller.js
index 8a5a76f..89a35d3 100644
--- a/server/api/intSugarcrmField/intSugarcrmField.controller.js
+++ b/server/api/intSugarcrmField/intSugarcrmField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2858=['map','type','key','VIRTUAL','filter','options','includeAll','include','catch','show','params','length','find','create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','end','status','count','offset','limit','Content-Range','json','apply','reject','save','update','then','destroy','sendStatus','stack','name','send','index','SugarcrmField','rawAttributes','model','keys','query','filters','intersection','attributes','fields','nolimit','sort','where','pick','merge'];(function(_0x28ee23,_0x3709ab){var _0x48347e=function(_0x46ba3a){while(--_0x46ba3a){_0x28ee23['push'](_0x28ee23['shift']());}};_0x48347e(++_0x3709ab);}(_0x2858,0x17c));var _0x8285=function(_0x3cd774,_0x1c01b1){_0x3cd774=_0x3cd774-0x0;var _0x1f4922=_0x2858[_0x3cd774];return _0x1f4922;};'use strict';var pdf=require(_0x8285('0x0'));var emlformat=require(_0x8285('0x1'));var rimraf=require(_0x8285('0x2'));var zipdir=require(_0x8285('0x3'));var jsonpatch=require(_0x8285('0x4'));var rp=require('request-promise');var moment=require(_0x8285('0x5'));var BPromise=require(_0x8285('0x6'));var Mustache=require(_0x8285('0x7'));var util=require(_0x8285('0x8'));var path=require('path');var sox=require(_0x8285('0x9'));var csv=require(_0x8285('0xa'));var ejs=require(_0x8285('0xb'));var fs=require('fs');var _=require(_0x8285('0xc'));var squel=require(_0x8285('0xd'));var crypto=require(_0x8285('0xe'));var jsforce=require(_0x8285('0xf'));var deskjs=require(_0x8285('0x10'));var toCsv=require('to-csv');var querystring=require(_0x8285('0x11'));var Papa=require(_0x8285('0x12'));var Redis=require(_0x8285('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x8285('0x14'));var hardwareService=require(_0x8285('0x15'));var logger=require(_0x8285('0x16'))(_0x8285('0x17'));var utils=require('../../config/utils');var config=require(_0x8285('0x18'));var db=require(_0x8285('0x19'))['db'];function respondWithStatusCode(_0x3024d7,_0x5aa5c4){_0x5aa5c4=_0x5aa5c4||0xcc;return function(_0x560879){if(_0x560879){return _0x3024d7['sendStatus'](_0x5aa5c4);}return _0x3024d7['status'](_0x5aa5c4)[_0x8285('0x1a')]();};}function respondWithResult(_0x25a3ed,_0xa9349b){_0xa9349b=_0xa9349b||0xc8;return function(_0xc9d37b){if(_0xc9d37b){return _0x25a3ed[_0x8285('0x1b')](_0xa9349b)['json'](_0xc9d37b);}};}function respondWithFilteredResult(_0x2566a5,_0x2dbc19){return function(_0x982376){if(_0x982376){var _0x3ff29a=_0x982376[_0x8285('0x1c')],_0x12061c=_0x2dbc19['offset'],_0x551d26=_0x2dbc19[_0x8285('0x1d')]+_0x2dbc19[_0x8285('0x1e')],_0x1b64ae;if(_0x551d26>=_0x3ff29a){_0x551d26=_0x3ff29a;_0x1b64ae=0xc8;}else{_0x1b64ae=0xce;}_0x2566a5['status'](_0x1b64ae);return _0x2566a5['set'](_0x8285('0x1f'),_0x12061c+'-'+_0x551d26+'/'+_0x3ff29a)[_0x8285('0x20')](_0x982376);}return null;};}function patchUpdates(_0x4b5d7d){return function(_0x2c6d9d){try{jsonpatch[_0x8285('0x21')](_0x2c6d9d,_0x4b5d7d,!![]);}catch(_0x3dcff4){return BPromise[_0x8285('0x22')](_0x3dcff4);}return _0x2c6d9d[_0x8285('0x23')]();};}function saveUpdates(_0x5d50e5,_0x667aed){return function(_0x5bec7d){if(_0x5bec7d){return _0x5bec7d[_0x8285('0x24')](_0x5d50e5)[_0x8285('0x25')](function(_0x5d38c1){return _0x5d38c1;});}return null;};}function removeEntity(_0xb0622e,_0x936d6){return function(_0x11a647){if(_0x11a647){return _0x11a647[_0x8285('0x26')]()['then'](function(){_0xb0622e[_0x8285('0x1b')](0xcc)[_0x8285('0x1a')]();});}};}function handleEntityNotFound(_0x49617f,_0x591044){return function(_0x5dd3e3){if(!_0x5dd3e3){_0x49617f[_0x8285('0x27')](0x194);}return _0x5dd3e3;};}function handleError(_0x449674,_0x5581a7){_0x5581a7=_0x5581a7||0x1f4;return function(_0xff3d68){logger['error'](_0xff3d68[_0x8285('0x28')]);if(_0xff3d68[_0x8285('0x29')]){delete _0xff3d68[_0x8285('0x29')];}_0x449674['status'](_0x5581a7)[_0x8285('0x2a')](_0xff3d68);};}exports[_0x8285('0x2b')]=function(_0x353e58,_0x5e5e8e){var _0x360eab={},_0x10c06e={},_0x126901={'count':0x0,'rows':[]};var _0xc797fc=db[_0x8285('0x2c')][_0x8285('0x2d')];_0x10c06e[_0x8285('0x2e')]=_[_0x8285('0x2f')](_0xc797fc);_0x10c06e[_0x8285('0x30')]=_[_0x8285('0x2f')](_0x353e58[_0x8285('0x30')]);_0x10c06e[_0x8285('0x31')]=_[_0x8285('0x32')](_0x10c06e['model'],_0x10c06e['query']);_0x360eab[_0x8285('0x33')]=_['intersection'](_0x10c06e['model'],qs[_0x8285('0x34')](_0x353e58['query'][_0x8285('0x34')]));_0x360eab[_0x8285('0x33')]=_0x360eab[_0x8285('0x33')]['length']?_0x360eab[_0x8285('0x33')]:_0x10c06e[_0x8285('0x2e')];if(!_0x353e58['query']['hasOwnProperty'](_0x8285('0x35'))){_0x360eab['limit']=qs[_0x8285('0x1e')](_0x353e58[_0x8285('0x30')]['limit']);_0x360eab['offset']=qs[_0x8285('0x1d')](_0x353e58[_0x8285('0x30')][_0x8285('0x1d')]);}_0x360eab['order']=qs[_0x8285('0x36')](_0x353e58['query'][_0x8285('0x36')]);_0x360eab[_0x8285('0x37')]=qs['filters'](_[_0x8285('0x38')](_0x353e58[_0x8285('0x30')],_0x10c06e['filters']));if(_0x353e58[_0x8285('0x30')]['filter']){_0x360eab[_0x8285('0x37')]=_[_0x8285('0x39')](_0x360eab[_0x8285('0x37')],{'$or':_[_0x8285('0x3a')](_0xc797fc,function(_0x37a087){if(_0x37a087[_0x8285('0x3b')][_0x8285('0x3c')]!==_0x8285('0x3d')){var _0x324d7c={};_0x324d7c[_0x37a087['field']]={'$like':'%'+_0x353e58[_0x8285('0x30')][_0x8285('0x3e')]+'%'};return _0x324d7c;}})});}_0x360eab=_[_0x8285('0x39')]({},_0x360eab,_0x353e58[_0x8285('0x3f')]);var _0x3caf09={'where':_0x360eab[_0x8285('0x37')]};return db['SugarcrmField']['count'](_0x3caf09)[_0x8285('0x25')](function(_0x59c88a){_0x126901['count']=_0x59c88a;if(_0x353e58['query'][_0x8285('0x40')]){_0x360eab[_0x8285('0x41')]=[{'all':!![]}];}return db[_0x8285('0x2c')]['findAll'](_0x360eab);})['then'](function(_0xafc49b){_0x126901['rows']=_0xafc49b;return _0x126901;})[_0x8285('0x25')](respondWithFilteredResult(_0x5e5e8e,_0x360eab))[_0x8285('0x42')](handleError(_0x5e5e8e,null));};exports[_0x8285('0x43')]=function(_0x1f8f81,_0x21e603){var _0xeac76b={'raw':!![],'where':{'id':_0x1f8f81[_0x8285('0x44')]['id']}},_0x4771c2={};_0x4771c2['model']=_[_0x8285('0x2f')](db[_0x8285('0x2c')]['rawAttributes']);_0x4771c2[_0x8285('0x30')]=_['keys'](_0x1f8f81[_0x8285('0x30')]);_0x4771c2[_0x8285('0x31')]=_[_0x8285('0x32')](_0x4771c2['model'],_0x4771c2[_0x8285('0x30')]);_0xeac76b[_0x8285('0x33')]=_[_0x8285('0x32')](_0x4771c2[_0x8285('0x2e')],qs['fields'](_0x1f8f81[_0x8285('0x30')][_0x8285('0x34')]));_0xeac76b[_0x8285('0x33')]=_0xeac76b['attributes'][_0x8285('0x45')]?_0xeac76b['attributes']:_0x4771c2[_0x8285('0x2e')];if(_0x1f8f81[_0x8285('0x30')][_0x8285('0x40')]){_0xeac76b['include']=[{'all':!![]}];}_0xeac76b=_[_0x8285('0x39')]({},_0xeac76b,_0x1f8f81[_0x8285('0x3f')]);return db[_0x8285('0x2c')][_0x8285('0x46')](_0xeac76b)['then'](handleEntityNotFound(_0x21e603,null))[_0x8285('0x25')](respondWithResult(_0x21e603,null))[_0x8285('0x42')](handleError(_0x21e603,null));};exports[_0x8285('0x47')]=function(_0x16d105,_0x1c86db){return db[_0x8285('0x2c')][_0x8285('0x47')](_0x16d105['body'],{})[_0x8285('0x25')](respondWithResult(_0x1c86db,0xc9))[_0x8285('0x42')](handleError(_0x1c86db,null));};exports['update']=function(_0x1f72fc,_0x5307f5){if(_0x1f72fc['body']['id']){delete _0x1f72fc[_0x8285('0x48')]['id'];}return db[_0x8285('0x2c')]['find']({'where':{'id':_0x1f72fc['params']['id']}})[_0x8285('0x25')](handleEntityNotFound(_0x5307f5,null))[_0x8285('0x25')](saveUpdates(_0x1f72fc['body'],null))[_0x8285('0x25')](respondWithResult(_0x5307f5,null))['catch'](handleError(_0x5307f5,null));};exports[_0x8285('0x26')]=function(_0x854d53,_0x489b14){return db[_0x8285('0x2c')][_0x8285('0x46')]({'where':{'id':_0x854d53[_0x8285('0x44')]['id']}})['then'](handleEntityNotFound(_0x489b14,null))['then'](removeEntity(_0x489b14,null))[_0x8285('0x42')](handleError(_0x489b14,null));};
\ No newline at end of file
+var _0x8bd4=['lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','count','offset','Content-Range','reject','save','update','then','destroy','end','error','name','send','index','SugarcrmField','rawAttributes','keys','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','filters','filter','map','key','VIRTUAL','field','merge','include','catch','show','params','includeAll','options','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs'];(function(_0x166dee,_0x21f362){var _0x45c622=function(_0x3daaeb){while(--_0x3daaeb){_0x166dee['push'](_0x166dee['shift']());}};_0x45c622(++_0x21f362);}(_0x8bd4,0x115));var _0x48bd=function(_0x280c49,_0x22188e){_0x280c49=_0x280c49-0x0;var _0x2a2f2a=_0x8bd4[_0x280c49];return _0x2a2f2a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x48bd('0x0'));var rimraf=require(_0x48bd('0x1'));var zipdir=require(_0x48bd('0x2'));var jsonpatch=require(_0x48bd('0x3'));var rp=require(_0x48bd('0x4'));var moment=require(_0x48bd('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x48bd('0x6'));var util=require('util');var path=require(_0x48bd('0x7'));var sox=require(_0x48bd('0x8'));var csv=require(_0x48bd('0x9'));var ejs=require(_0x48bd('0xa'));var fs=require('fs');var _=require(_0x48bd('0xb'));var squel=require(_0x48bd('0xc'));var crypto=require(_0x48bd('0xd'));var jsforce=require(_0x48bd('0xe'));var deskjs=require(_0x48bd('0xf'));var toCsv=require(_0x48bd('0x9'));var querystring=require(_0x48bd('0x10'));var Papa=require(_0x48bd('0x11'));var Redis=require(_0x48bd('0x12'));var authService=require(_0x48bd('0x13'));var qs=require(_0x48bd('0x14'));var hardwareService=require(_0x48bd('0x15'));var logger=require(_0x48bd('0x16'))(_0x48bd('0x17'));var utils=require(_0x48bd('0x18'));var config=require(_0x48bd('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1548b4,_0x6f3017){_0x6f3017=_0x6f3017||0xcc;return function(_0x108f0d){if(_0x108f0d){return _0x1548b4[_0x48bd('0x1a')](_0x6f3017);}return _0x1548b4[_0x48bd('0x1b')](_0x6f3017)['end']();};}function respondWithResult(_0x548b65,_0x3ffbe2){_0x3ffbe2=_0x3ffbe2||0xc8;return function(_0x3b5d9d){if(_0x3b5d9d){return _0x548b65['status'](_0x3ffbe2)['json'](_0x3b5d9d);}};}function respondWithFilteredResult(_0x28b9a6,_0x1a2c59){return function(_0x58989c){if(_0x58989c){var _0x899470=_0x58989c[_0x48bd('0x1c')],_0x2d47c9=_0x1a2c59[_0x48bd('0x1d')],_0x1d0331=_0x1a2c59[_0x48bd('0x1d')]+_0x1a2c59['limit'],_0x43c62b;if(_0x1d0331>=_0x899470){_0x1d0331=_0x899470;_0x43c62b=0xc8;}else{_0x43c62b=0xce;}_0x28b9a6[_0x48bd('0x1b')](_0x43c62b);return _0x28b9a6['set'](_0x48bd('0x1e'),_0x2d47c9+'-'+_0x1d0331+'/'+_0x899470)['json'](_0x58989c);}return null;};}function patchUpdates(_0x31a477){return function(_0x4b6e61){try{jsonpatch['apply'](_0x4b6e61,_0x31a477,!![]);}catch(_0x5eacbf){return BPromise[_0x48bd('0x1f')](_0x5eacbf);}return _0x4b6e61[_0x48bd('0x20')]();};}function saveUpdates(_0x2855f1,_0x52f1f9){return function(_0x3f684e){if(_0x3f684e){return _0x3f684e[_0x48bd('0x21')](_0x2855f1)[_0x48bd('0x22')](function(_0x27e976){return _0x27e976;});}return null;};}function removeEntity(_0x40428e,_0x445e4c){return function(_0x2f2c5c){if(_0x2f2c5c){return _0x2f2c5c[_0x48bd('0x23')]()[_0x48bd('0x22')](function(){_0x40428e[_0x48bd('0x1b')](0xcc)[_0x48bd('0x24')]();});}};}function handleEntityNotFound(_0x48aaca,_0x3cbded){return function(_0x36fd62){if(!_0x36fd62){_0x48aaca[_0x48bd('0x1a')](0x194);}return _0x36fd62;};}function handleError(_0x3cda66,_0x24b145){_0x24b145=_0x24b145||0x1f4;return function(_0xfd7099){logger[_0x48bd('0x25')](_0xfd7099['stack']);if(_0xfd7099['name']){delete _0xfd7099[_0x48bd('0x26')];}_0x3cda66['status'](_0x24b145)[_0x48bd('0x27')](_0xfd7099);};}exports[_0x48bd('0x28')]=function(_0x254005,_0x14531f){var _0x3898b6={},_0x48cdd1={},_0xda1887={'count':0x0,'rows':[]};var _0x26aae8=db[_0x48bd('0x29')][_0x48bd('0x2a')];_0x48cdd1['model']=_[_0x48bd('0x2b')](_0x26aae8);_0x48cdd1[_0x48bd('0x2c')]=_[_0x48bd('0x2b')](_0x254005[_0x48bd('0x2c')]);_0x48cdd1['filters']=_[_0x48bd('0x2d')](_0x48cdd1[_0x48bd('0x2e')],_0x48cdd1['query']);_0x3898b6[_0x48bd('0x2f')]=_[_0x48bd('0x2d')](_0x48cdd1['model'],qs[_0x48bd('0x30')](_0x254005[_0x48bd('0x2c')][_0x48bd('0x30')]));_0x3898b6[_0x48bd('0x2f')]=_0x3898b6['attributes'][_0x48bd('0x31')]?_0x3898b6[_0x48bd('0x2f')]:_0x48cdd1['model'];if(!_0x254005[_0x48bd('0x2c')][_0x48bd('0x32')](_0x48bd('0x33'))){_0x3898b6[_0x48bd('0x34')]=qs[_0x48bd('0x34')](_0x254005[_0x48bd('0x2c')][_0x48bd('0x34')]);_0x3898b6['offset']=qs[_0x48bd('0x1d')](_0x254005[_0x48bd('0x2c')][_0x48bd('0x1d')]);}_0x3898b6[_0x48bd('0x35')]=qs[_0x48bd('0x36')](_0x254005[_0x48bd('0x2c')][_0x48bd('0x36')]);_0x3898b6[_0x48bd('0x37')]=qs[_0x48bd('0x38')](_['pick'](_0x254005[_0x48bd('0x2c')],_0x48cdd1[_0x48bd('0x38')]));if(_0x254005[_0x48bd('0x2c')][_0x48bd('0x39')]){_0x3898b6[_0x48bd('0x37')]=_['merge'](_0x3898b6['where'],{'$or':_[_0x48bd('0x3a')](_0x26aae8,function(_0x1bdc8b){if(_0x1bdc8b['type'][_0x48bd('0x3b')]!==_0x48bd('0x3c')){var _0x6c8fae={};_0x6c8fae[_0x1bdc8b[_0x48bd('0x3d')]]={'$like':'%'+_0x254005[_0x48bd('0x2c')][_0x48bd('0x39')]+'%'};return _0x6c8fae;}})});}_0x3898b6=_[_0x48bd('0x3e')]({},_0x3898b6,_0x254005['options']);var _0x18d725={'where':_0x3898b6[_0x48bd('0x37')]};return db[_0x48bd('0x29')][_0x48bd('0x1c')](_0x18d725)[_0x48bd('0x22')](function(_0x5cf1e7){_0xda1887['count']=_0x5cf1e7;if(_0x254005[_0x48bd('0x2c')]['includeAll']){_0x3898b6[_0x48bd('0x3f')]=[{'all':!![]}];}return db['SugarcrmField']['findAll'](_0x3898b6);})[_0x48bd('0x22')](function(_0xa26821){_0xda1887['rows']=_0xa26821;return _0xda1887;})[_0x48bd('0x22')](respondWithFilteredResult(_0x14531f,_0x3898b6))[_0x48bd('0x40')](handleError(_0x14531f,null));};exports[_0x48bd('0x41')]=function(_0x9fae80,_0x323de6){var _0x5c465f={'raw':!![],'where':{'id':_0x9fae80[_0x48bd('0x42')]['id']}},_0x36dad9={};_0x36dad9[_0x48bd('0x2e')]=_['keys'](db[_0x48bd('0x29')][_0x48bd('0x2a')]);_0x36dad9['query']=_[_0x48bd('0x2b')](_0x9fae80['query']);_0x36dad9[_0x48bd('0x38')]=_[_0x48bd('0x2d')](_0x36dad9[_0x48bd('0x2e')],_0x36dad9[_0x48bd('0x2c')]);_0x5c465f['attributes']=_[_0x48bd('0x2d')](_0x36dad9[_0x48bd('0x2e')],qs['fields'](_0x9fae80[_0x48bd('0x2c')][_0x48bd('0x30')]));_0x5c465f[_0x48bd('0x2f')]=_0x5c465f[_0x48bd('0x2f')][_0x48bd('0x31')]?_0x5c465f[_0x48bd('0x2f')]:_0x36dad9[_0x48bd('0x2e')];if(_0x9fae80[_0x48bd('0x2c')][_0x48bd('0x43')]){_0x5c465f[_0x48bd('0x3f')]=[{'all':!![]}];}_0x5c465f=_[_0x48bd('0x3e')]({},_0x5c465f,_0x9fae80[_0x48bd('0x44')]);return db[_0x48bd('0x29')][_0x48bd('0x45')](_0x5c465f)[_0x48bd('0x22')](handleEntityNotFound(_0x323de6,null))[_0x48bd('0x22')](respondWithResult(_0x323de6,null))[_0x48bd('0x40')](handleError(_0x323de6,null));};exports[_0x48bd('0x46')]=function(_0x467a7c,_0x353948){return db[_0x48bd('0x29')]['create'](_0x467a7c[_0x48bd('0x47')],{})[_0x48bd('0x22')](respondWithResult(_0x353948,0xc9))[_0x48bd('0x40')](handleError(_0x353948,null));};exports[_0x48bd('0x21')]=function(_0x481b8f,_0x8f27cf){if(_0x481b8f[_0x48bd('0x47')]['id']){delete _0x481b8f[_0x48bd('0x47')]['id'];}return db[_0x48bd('0x29')][_0x48bd('0x45')]({'where':{'id':_0x481b8f['params']['id']}})[_0x48bd('0x22')](handleEntityNotFound(_0x8f27cf,null))[_0x48bd('0x22')](saveUpdates(_0x481b8f['body'],null))['then'](respondWithResult(_0x8f27cf,null))['catch'](handleError(_0x8f27cf,null));};exports['destroy']=function(_0xf3878d,_0x12e07a){return db['SugarcrmField']['find']({'where':{'id':_0xf3878d['params']['id']}})[_0x48bd('0x22')](handleEntityNotFound(_0x12e07a,null))[_0x48bd('0x22')](removeEntity(_0x12e07a,null))[_0x48bd('0x40')](handleError(_0x12e07a,null));};
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.model.js b/server/api/intSugarcrmField/intSugarcrmField.model.js
index 43a1378..af58f57 100644
--- a/server/api/intSugarcrmField/intSugarcrmField.model.js
+++ b/server/api/intSugarcrmField/intSugarcrmField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc833=['../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','SugarcrmField','int_sugarcrm_fields','idField','FieldId','lodash','util'];(function(_0x234b6c,_0x42fb18){var _0xe164db=function(_0x4a13ea){while(--_0x4a13ea){_0x234b6c['push'](_0x234b6c['shift']());}};_0xe164db(++_0x42fb18);}(_0xc833,0xb2));var _0x3c83=function(_0x4c700e,_0x346813){_0x4c700e=_0x4c700e-0x0;var _0x4e53a4=_0xc833[_0x4c700e];return _0x4e53a4;};'use strict';var _=require(_0x3c83('0x0'));var util=require(_0x3c83('0x1'));var logger=require(_0x3c83('0x2'))(_0x3c83('0x3'));var moment=require('moment');var BPromise=require(_0x3c83('0x4'));var rp=require(_0x3c83('0x5'));var fs=require('fs');var path=require(_0x3c83('0x6'));var rimraf=require(_0x3c83('0x7'));var config=require(_0x3c83('0x8'));var attributes=require('./intSugarcrmField.attributes');module[_0x3c83('0x9')]=function(_0x32452f,_0x3a7326){return _0x32452f[_0x3c83('0xa')](_0x3c83('0xb'),attributes,{'tableName':_0x3c83('0xc'),'paranoid':![],'indexes':[{'name':'sugarcrm_unique_index','fields':[_0x3c83('0xd'),_0x3c83('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x680a=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intSugarcrmField.attributes','exports','define','SugarcrmField','int_sugarcrm_fields','idField','FieldId','lodash'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x680a,0x175));var _0xa680=function(_0x3c58ff,_0x1a44e3){_0x3c58ff=_0x3c58ff-0x0;var _0x384be8=_0x680a[_0x3c58ff];return _0x384be8;};'use strict';var _=require(_0xa680('0x0'));var util=require(_0xa680('0x1'));var logger=require(_0xa680('0x2'))(_0xa680('0x3'));var moment=require(_0xa680('0x4'));var BPromise=require(_0xa680('0x5'));var rp=require(_0xa680('0x6'));var fs=require('fs');var path=require(_0xa680('0x7'));var rimraf=require(_0xa680('0x8'));var config=require(_0xa680('0x9'));var attributes=require(_0xa680('0xa'));module[_0xa680('0xb')]=function(_0x2c0a5e,_0x4d5844){return _0x2c0a5e[_0xa680('0xc')](_0xa680('0xd'),attributes,{'tableName':_0xa680('0xe'),'paranoid':![],'indexes':[{'name':'sugarcrm_unique_index','fields':[_0xa680('0xf'),_0xa680('0x10')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.rpc.js b/server/api/intSugarcrmField/intSugarcrmField.rpc.js
index 3a08727..869d2b9 100644
--- a/server/api/intSugarcrmField/intSugarcrmField.rpc.js
+++ b/server/api/intSugarcrmField/intSugarcrmField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1931=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','randomstring'];(function(_0x363f19,_0x38fb04){var _0x16aa68=function(_0x2d8483){while(--_0x2d8483){_0x363f19['push'](_0x363f19['shift']());}};_0x16aa68(++_0x38fb04);}(_0x1931,0x127));var _0x1193=function(_0x411b71,_0x5dc5e9){_0x411b71=_0x411b71-0x0;var _0x1e0b65=_0x1931[_0x411b71];return _0x1e0b65;};'use strict';var _=require(_0x1193('0x0'));var util=require(_0x1193('0x1'));var moment=require(_0x1193('0x2'));var BPromise=require('bluebird');var rs=require(_0x1193('0x3'));var fs=require('fs');var Redis=require(_0x1193('0x4'));var db=require(_0x1193('0x5'))['db'];var utils=require(_0x1193('0x6'));var logger=require(_0x1193('0x7'))(_0x1193('0x8'));var config=require(_0x1193('0x9'));var jayson=require(_0x1193('0xa'));var client=jayson[_0x1193('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0xe9c11d,_0x24a7d6,_0x42a2c8){return new BPromise(function(_0x48974e,_0x58588a){return client['request'](_0xe9c11d,_0x42a2c8)[_0x1193('0xc')](function(_0x2be59c){logger[_0x1193('0xd')](_0x1193('0xe'),_0x24a7d6,_0x1193('0xf'));logger[_0x1193('0x10')](_0x1193('0x11'),_0x24a7d6,_0x1193('0xf'),JSON[_0x1193('0x12')](_0x2be59c));if(_0x2be59c['error']){if(_0x2be59c[_0x1193('0x13')][_0x1193('0x14')]===0x1f4){logger[_0x1193('0x13')](_0x1193('0xe'),_0x24a7d6,_0x2be59c[_0x1193('0x13')][_0x1193('0x15')]);return _0x58588a(_0x2be59c[_0x1193('0x13')][_0x1193('0x15')]);}logger[_0x1193('0x13')]('SugarcrmField,\x20%s,\x20%s',_0x24a7d6,_0x2be59c[_0x1193('0x13')][_0x1193('0x15')]);return _0x48974e(_0x2be59c['error'][_0x1193('0x15')]);}else{logger[_0x1193('0xd')](_0x1193('0xe'),_0x24a7d6,_0x1193('0xf'));_0x48974e(_0x2be59c['result']['message']);}})[_0x1193('0x16')](function(_0x307217){logger[_0x1193('0x13')](_0x1193('0xe'),_0x24a7d6,_0x307217);_0x58588a(_0x307217);});});}
\ No newline at end of file
+var _0x6b7f=['../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','info','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','SugarcrmField,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x553e1e,_0x5bedef){var _0x3bb17b=function(_0x53ad59){while(--_0x53ad59){_0x553e1e['push'](_0x553e1e['shift']());}};_0x3bb17b(++_0x5bedef);}(_0x6b7f,0x17a));var _0xf6b7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6b7f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xf6b7('0x0'));var util=require(_0xf6b7('0x1'));var moment=require(_0xf6b7('0x2'));var BPromise=require(_0xf6b7('0x3'));var rs=require(_0xf6b7('0x4'));var fs=require('fs');var Redis=require(_0xf6b7('0x5'));var db=require(_0xf6b7('0x6'))['db'];var utils=require(_0xf6b7('0x7'));var logger=require('../../config/logger')(_0xf6b7('0x8'));var config=require(_0xf6b7('0x9'));var jayson=require(_0xf6b7('0xa'));var client=jayson['client'][_0xf6b7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3d97a2,_0x383847,_0x471b76){return new BPromise(function(_0xbf67dd,_0x3ac152){return client[_0xf6b7('0xc')](_0x3d97a2,_0x471b76)['then'](function(_0x14e146){logger[_0xf6b7('0xd')]('SugarcrmField,\x20%s,\x20%s',_0x383847,_0xf6b7('0xe'));logger[_0xf6b7('0xf')](_0xf6b7('0x10'),_0x383847,_0xf6b7('0xe'),JSON[_0xf6b7('0x11')](_0x14e146));if(_0x14e146[_0xf6b7('0x12')]){if(_0x14e146[_0xf6b7('0x12')][_0xf6b7('0x13')]===0x1f4){logger[_0xf6b7('0x12')]('SugarcrmField,\x20%s,\x20%s',_0x383847,_0x14e146['error'][_0xf6b7('0x14')]);return _0x3ac152(_0x14e146['error']['message']);}logger[_0xf6b7('0x12')](_0xf6b7('0x15'),_0x383847,_0x14e146[_0xf6b7('0x12')][_0xf6b7('0x14')]);return _0xbf67dd(_0x14e146[_0xf6b7('0x12')][_0xf6b7('0x14')]);}else{logger[_0xf6b7('0xd')]('SugarcrmField,\x20%s,\x20%s',_0x383847,'request\x20sent');_0xbf67dd(_0x14e146[_0xf6b7('0x16')][_0xf6b7('0x14')]);}})[_0xf6b7('0x17')](function(_0x2b91b6){logger[_0xf6b7('0x12')](_0xf6b7('0x15'),_0x383847,_0x2b91b6);_0x3ac152(_0x2b91b6);});});}
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/index.js b/server/api/intVtigerAccount/index.js
index 31b02f2..0591d1f 100644
--- a/server/api/intVtigerAccount/index.js
+++ b/server/api/intVtigerAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaae2=['delete','destroy','exports','util','path','express','../../components/auth/service','../../components/interaction/service','get','/:id','isAuthenticated','/:id/configurations','getConfigurations','/:id/fields','getFields','post','put','update'];(function(_0x3a1cca,_0xf9cf7e){var _0x53b71c=function(_0x56c49f){while(--_0x56c49f){_0x3a1cca['push'](_0x3a1cca['shift']());}};_0x53b71c(++_0xf9cf7e);}(_0xaae2,0x159));var _0x2aae=function(_0x1dff5f,_0x28f1b1){_0x1dff5f=_0x1dff5f-0x0;var _0x428ad8=_0xaae2[_0x1dff5f];return _0x428ad8;};'use strict';var multer=require('multer');var util=require(_0x2aae('0x0'));var path=require(_0x2aae('0x1'));var timeout=require('connect-timeout');var express=require(_0x2aae('0x2'));var router=express['Router']();var auth=require(_0x2aae('0x3'));var interaction=require(_0x2aae('0x4'));var config=require('../../config/environment');var controller=require('./intVtigerAccount.controller');router[_0x2aae('0x5')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x2aae('0x6'),auth[_0x2aae('0x7')](),controller['show']);router[_0x2aae('0x5')](_0x2aae('0x8'),auth[_0x2aae('0x7')](),controller[_0x2aae('0x9')]);router['get'](_0x2aae('0xa'),auth[_0x2aae('0x7')](),controller[_0x2aae('0xb')]);router[_0x2aae('0xc')]('/',auth[_0x2aae('0x7')](),controller['create']);router[_0x2aae('0xc')](_0x2aae('0x8'),auth['isAuthenticated'](),controller['addConfiguration']);router[_0x2aae('0xd')](_0x2aae('0x6'),auth[_0x2aae('0x7')](),controller[_0x2aae('0xe')]);router[_0x2aae('0xf')](_0x2aae('0x6'),auth[_0x2aae('0x7')](),controller[_0x2aae('0x10')]);module[_0x2aae('0x11')]=router;
\ No newline at end of file
+var _0x1ea5=['/:id','exports','path','connect-timeout','express','./intVtigerAccount.controller','get','isAuthenticated','index','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','update'];(function(_0x240362,_0x156794){var _0x26de18=function(_0x4a4431){while(--_0x4a4431){_0x240362['push'](_0x240362['shift']());}};_0x26de18(++_0x156794);}(_0x1ea5,0x178));var _0x51ea=function(_0x1e9e56,_0x34a74a){_0x1e9e56=_0x1e9e56-0x0;var _0x5d5e2e=_0x1ea5[_0x1e9e56];return _0x5d5e2e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x51ea('0x0'));var timeout=require(_0x51ea('0x1'));var express=require(_0x51ea('0x2'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x51ea('0x3'));router[_0x51ea('0x4')]('/',auth[_0x51ea('0x5')](),controller[_0x51ea('0x6')]);router[_0x51ea('0x4')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x51ea('0x4')](_0x51ea('0x7'),auth['isAuthenticated'](),controller[_0x51ea('0x8')]);router['get'](_0x51ea('0x9'),auth[_0x51ea('0x5')](),controller[_0x51ea('0xa')]);router[_0x51ea('0xb')]('/',auth['isAuthenticated'](),controller[_0x51ea('0xc')]);router[_0x51ea('0xb')](_0x51ea('0x7'),auth['isAuthenticated'](),controller[_0x51ea('0xd')]);router['put']('/:id',auth[_0x51ea('0x5')](),controller[_0x51ea('0xe')]);router['delete'](_0x51ea('0xf'),auth[_0x51ea('0x5')](),controller['destroy']);module[_0x51ea('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.attributes.js b/server/api/intVtigerAccount/intVtigerAccount.attributes.js
index 4fac5f5..6efdfea 100644
--- a/server/api/intVtigerAccount/intVtigerAccount.attributes.js
+++ b/server/api/intVtigerAccount/intVtigerAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfd53=['STRING','HelpDesk','exports'];(function(_0x56482c,_0x16118d){var _0x5aae7a=function(_0x52512f){while(--_0x52512f){_0x56482c['push'](_0x56482c['shift']());}};_0x5aae7a(++_0x16118d);}(_0xfd53,0x1eb));var _0x3fd5=function(_0x1cb18a,_0x33167a){_0x1cb18a=_0x1cb18a-0x0;var _0x22442e=_0xfd53[_0x1cb18a];return _0x22442e;};'use strict';var Sequelize=require('sequelize');module[_0x3fd5('0x0')]={'name':{'type':Sequelize[_0x3fd5('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x3fd5('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0x3fd5('0x1')],'allowNull':![],'defaultValue':_0x3fd5('0x2')},'remoteUri':{'type':Sequelize[_0x3fd5('0x1')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x3fd5('0x1')]},'accessKey':{'type':Sequelize[_0x3fd5('0x1')],'allowNull':![]}};
\ No newline at end of file
+var _0x0a78=['exports','STRING','HelpDesk','sequelize'];(function(_0x2ffeb0,_0x3c2282){var _0x5709ed=function(_0x12bb05){while(--_0x12bb05){_0x2ffeb0['push'](_0x2ffeb0['shift']());}};_0x5709ed(++_0x3c2282);}(_0x0a78,0x6b));var _0x80a7=function(_0x38d3f4,_0x4abb9c){_0x38d3f4=_0x38d3f4-0x0;var _0x24b4ba=_0x0a78[_0x38d3f4];return _0x24b4ba;};'use strict';var Sequelize=require(_0x80a7('0x0'));module[_0x80a7('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x80a7('0x2')],'allowNull':![]},'moduleName':{'type':Sequelize[_0x80a7('0x2')],'allowNull':![],'defaultValue':_0x80a7('0x3')},'remoteUri':{'type':Sequelize[_0x80a7('0x2')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x80a7('0x2')]},'accessKey':{'type':Sequelize[_0x80a7('0x2')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.controller.js b/server/api/intVtigerAccount/intVtigerAccount.controller.js
index a5916fb..f9978c7 100644
--- a/server/api/intVtigerAccount/intVtigerAccount.controller.js
+++ b/server/api/intVtigerAccount/intVtigerAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfed3=['keys','filters','intersection','query','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','map','type','key','field','merge','options','VtigerAccount','includeAll','include','findAll','rows','show','params','catch','create','body','find','destroy','getConfigurations','findOne','VtigerConfiguration','pick','addConfiguration','Subjects','channel','Descriptions','getDescriptions','md5','getFields','username','description','moduleName','remoteUri','accessKey','lastIndexOf','format','%s/webservice.php','GET','getchallenge','POST','login','token','success','describe','sessionName','autogenerated','owner','remove','includes','editable','false','startsWith','cf_','picklist','picklistValues','value','log','vTiger\x20error:\x20','statusCode','send','Wrong\x20credentials','html-pdf','eml-format','rimraf','moment','bluebird','util','path','sox','to-csv','squel','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','request','info','request\x20sent','debug','stringify','error','code','VtigerAccount,\x20%s,\x20%s','message','result','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','sendStatus','stack','name','index','rawAttributes'];(function(_0x248017,_0x34148f){var _0x257f09=function(_0xb810cc){while(--_0xb810cc){_0x248017['push'](_0x248017['shift']());}};_0x257f09(++_0x34148f);}(_0xfed3,0xc8));var _0x3fed=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0xfed3[_0x19950b];return _0x3c6b41;};'use strict';var pdf=require(_0x3fed('0x0'));var emlformat=require(_0x3fed('0x1'));var rimraf=require(_0x3fed('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3fed('0x3'));var BPromise=require(_0x3fed('0x4'));var Mustache=require('mustache');var util=require(_0x3fed('0x5'));var path=require(_0x3fed('0x6'));var sox=require(_0x3fed('0x7'));var csv=require(_0x3fed('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x3fed('0x9'));var crypto=require('crypto');var jsforce=require(_0x3fed('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x3fed('0x8'));var querystring=require(_0x3fed('0xb'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x3fed('0xc'));var qs=require(_0x3fed('0xd'));var hardwareService=require(_0x3fed('0xe'));var logger=require('../../config/logger')(_0x3fed('0xf'));var utils=require('../../config/utils');var config=require(_0x3fed('0x10'));var db=require(_0x3fed('0x11'))['db'];var integrations=require(_0x3fed('0x12'));var jayson=require(_0x3fed('0x13'));var client=jayson[_0x3fed('0x14')][_0x3fed('0x15')]({'port':0x232a});function checkPasswordPattern(_0x42aa43,_0x1383ed,_0x4de542){if(_0x4de542){var _0x2028a3=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2028a3[_0x3fed('0x16')](_0x1383ed)){return _0x42aa43;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x42aa43;}}function respondWithRpcPromise(_0xf89070,_0x50628a,_0xaaa293,_0x5c510a){return new BPromise(function(_0x8c9ef0,_0x1dd2fb){var _0x37b003=_0x5c510a||client;return _0x37b003[_0x3fed('0x17')](_0xf89070,_0xaaa293)['then'](function(_0x1d5b63){logger[_0x3fed('0x18')]('VtigerAccount,\x20%s,\x20%s',_0x50628a,_0x3fed('0x19'));logger[_0x3fed('0x1a')]('VtigerAccount,\x20%s,\x20%s,\x20%s',_0x50628a,_0x3fed('0x19'),JSON[_0x3fed('0x1b')](_0x1d5b63));if(_0x1d5b63[_0x3fed('0x1c')]){if(_0x1d5b63[_0x3fed('0x1c')][_0x3fed('0x1d')]===0x1f4){logger[_0x3fed('0x1c')](_0x3fed('0x1e'),_0x50628a,_0x1d5b63[_0x3fed('0x1c')][_0x3fed('0x1f')]);return _0x1dd2fb(_0x1d5b63[_0x3fed('0x1c')][_0x3fed('0x1f')]);}logger[_0x3fed('0x1c')](_0x3fed('0x1e'),_0x50628a,_0x1d5b63['error']['message']);return _0x8c9ef0(_0x1d5b63[_0x3fed('0x1c')][_0x3fed('0x1f')]);}else{logger[_0x3fed('0x18')](_0x3fed('0x1e'),_0x50628a,_0x3fed('0x19'));_0x8c9ef0(_0x1d5b63[_0x3fed('0x20')]['message']);}})['catch'](function(_0x4b2ca1){logger[_0x3fed('0x1c')]('VtigerAccount,\x20%s,\x20%s',_0x50628a,_0x4b2ca1);_0x1dd2fb(_0x4b2ca1);});});}function respondWithStatusCode(_0x538185,_0x1b8bf9){_0x1b8bf9=_0x1b8bf9||0xcc;return function(_0x2ab4c2){if(_0x2ab4c2){return _0x538185['sendStatus'](_0x1b8bf9);}return _0x538185[_0x3fed('0x21')](_0x1b8bf9)[_0x3fed('0x22')]();};}function respondWithResult(_0x220caf,_0x442cce){_0x442cce=_0x442cce||0xc8;return function(_0x21b750){if(_0x21b750){return _0x220caf[_0x3fed('0x21')](_0x442cce)[_0x3fed('0x23')](_0x21b750);}};}function respondWithFilteredResult(_0x409be1,_0x47ce12){return function(_0xbea0f3){if(_0xbea0f3){var _0x1ca939=_0xbea0f3[_0x3fed('0x24')],_0x17c93e=_0x47ce12[_0x3fed('0x25')],_0x59bd5c=_0x47ce12[_0x3fed('0x25')]+_0x47ce12[_0x3fed('0x26')],_0x5d4612;if(_0x59bd5c>=_0x1ca939){_0x59bd5c=_0x1ca939;_0x5d4612=0xc8;}else{_0x5d4612=0xce;}_0x409be1[_0x3fed('0x21')](_0x5d4612);return _0x409be1[_0x3fed('0x27')](_0x3fed('0x28'),_0x17c93e+'-'+_0x59bd5c+'/'+_0x1ca939)[_0x3fed('0x23')](_0xbea0f3);}return null;};}function patchUpdates(_0x52f241){return function(_0x1bacab){try{jsonpatch['apply'](_0x1bacab,_0x52f241,!![]);}catch(_0x4f3ba5){return BPromise[_0x3fed('0x29')](_0x4f3ba5);}return _0x1bacab[_0x3fed('0x2a')]();};}function saveUpdates(_0x75092e,_0x14927b){return function(_0x3146f8){if(_0x3146f8){return _0x3146f8[_0x3fed('0x2b')](_0x75092e)['then'](function(_0x68a550){return _0x68a550;});}return null;};}function removeEntity(_0x2bb17e,_0x46d5a0){return function(_0x4a2bef){if(_0x4a2bef){return _0x4a2bef['destroy']()[_0x3fed('0x2c')](function(){_0x2bb17e[_0x3fed('0x21')](0xcc)[_0x3fed('0x22')]();});}};}function handleEntityNotFound(_0xd8129d,_0x5ae1af){return function(_0x14fc80){if(!_0x14fc80){_0xd8129d[_0x3fed('0x2d')](0x194);}return _0x14fc80;};}function handleError(_0x1e22d5,_0x34d41f){_0x34d41f=_0x34d41f||0x1f4;return function(_0x5022d9){logger[_0x3fed('0x1c')](_0x5022d9[_0x3fed('0x2e')]);if(_0x5022d9[_0x3fed('0x2f')]){delete _0x5022d9['name'];}_0x1e22d5[_0x3fed('0x21')](_0x34d41f)['send'](_0x5022d9);};}exports[_0x3fed('0x30')]=function(_0x49f695,_0x12d1af){var _0x136fb6={},_0x21a6d8={},_0x4b623d={'count':0x0,'rows':[]};var _0x5754ca=db['VtigerAccount'][_0x3fed('0x31')];_0x21a6d8['model']=_[_0x3fed('0x32')](_0x5754ca);_0x21a6d8['query']=_[_0x3fed('0x32')](_0x49f695['query']);_0x21a6d8[_0x3fed('0x33')]=_[_0x3fed('0x34')](_0x21a6d8['model'],_0x21a6d8[_0x3fed('0x35')]);_0x136fb6[_0x3fed('0x36')]=_[_0x3fed('0x34')](_0x21a6d8[_0x3fed('0x37')],qs['fields'](_0x49f695[_0x3fed('0x35')][_0x3fed('0x38')]));_0x136fb6['attributes']=_0x136fb6[_0x3fed('0x36')][_0x3fed('0x39')]?_0x136fb6[_0x3fed('0x36')]:_0x21a6d8[_0x3fed('0x37')];if(!_0x49f695[_0x3fed('0x35')][_0x3fed('0x3a')](_0x3fed('0x3b'))){_0x136fb6[_0x3fed('0x26')]=qs[_0x3fed('0x26')](_0x49f695['query']['limit']);_0x136fb6[_0x3fed('0x25')]=qs[_0x3fed('0x25')](_0x49f695['query']['offset']);}_0x136fb6[_0x3fed('0x3c')]=qs[_0x3fed('0x3d')](_0x49f695[_0x3fed('0x35')][_0x3fed('0x3d')]);_0x136fb6[_0x3fed('0x3e')]=qs[_0x3fed('0x33')](_['pick'](_0x49f695[_0x3fed('0x35')],_0x21a6d8['filters']));if(_0x49f695['query'][_0x3fed('0x3f')]){_0x136fb6['where']=_['merge'](_0x136fb6[_0x3fed('0x3e')],{'$or':_[_0x3fed('0x40')](_0x5754ca,function(_0x19ee10){if(_0x19ee10[_0x3fed('0x41')][_0x3fed('0x42')]!=='VIRTUAL'){var _0x4aeba1={};_0x4aeba1[_0x19ee10[_0x3fed('0x43')]]={'$like':'%'+_0x49f695[_0x3fed('0x35')][_0x3fed('0x3f')]+'%'};return _0x4aeba1;}})});}_0x136fb6=_[_0x3fed('0x44')]({},_0x136fb6,_0x49f695[_0x3fed('0x45')]);var _0x1f851e={'where':_0x136fb6[_0x3fed('0x3e')]};return db[_0x3fed('0x46')][_0x3fed('0x24')](_0x1f851e)[_0x3fed('0x2c')](function(_0x4c4419){_0x4b623d[_0x3fed('0x24')]=_0x4c4419;if(_0x49f695[_0x3fed('0x35')][_0x3fed('0x47')]){_0x136fb6[_0x3fed('0x48')]=[{'all':!![]}];}return db['VtigerAccount'][_0x3fed('0x49')](_0x136fb6);})[_0x3fed('0x2c')](function(_0x3bcf4f){_0x4b623d[_0x3fed('0x4a')]=_0x3bcf4f;return _0x4b623d;})[_0x3fed('0x2c')](respondWithFilteredResult(_0x12d1af,_0x136fb6))['catch'](handleError(_0x12d1af,null));};exports[_0x3fed('0x4b')]=function(_0x3a44c9,_0x116553){var _0x3aa3cc={'raw':![],'where':{'id':_0x3a44c9[_0x3fed('0x4c')]['id']}},_0x155f25={};_0x155f25[_0x3fed('0x37')]=_[_0x3fed('0x32')](db[_0x3fed('0x46')]['rawAttributes']);_0x155f25['query']=_[_0x3fed('0x32')](_0x3a44c9[_0x3fed('0x35')]);_0x155f25[_0x3fed('0x33')]=_[_0x3fed('0x34')](_0x155f25[_0x3fed('0x37')],_0x155f25['query']);_0x3aa3cc[_0x3fed('0x36')]=_[_0x3fed('0x34')](_0x155f25[_0x3fed('0x37')],qs[_0x3fed('0x38')](_0x3a44c9[_0x3fed('0x35')]['fields']));_0x3aa3cc['attributes']=_0x3aa3cc[_0x3fed('0x36')][_0x3fed('0x39')]?_0x3aa3cc[_0x3fed('0x36')]:_0x155f25[_0x3fed('0x37')];if(_0x3a44c9[_0x3fed('0x35')][_0x3fed('0x47')]){_0x3aa3cc[_0x3fed('0x48')]=[{'all':!![]}];}_0x3aa3cc=_[_0x3fed('0x44')]({},_0x3aa3cc,_0x3a44c9[_0x3fed('0x45')]);return db['VtigerAccount']['find'](_0x3aa3cc)[_0x3fed('0x2c')](handleEntityNotFound(_0x116553,null))[_0x3fed('0x2c')](respondWithResult(_0x116553,null))[_0x3fed('0x4d')](handleError(_0x116553,null));};exports[_0x3fed('0x4e')]=function(_0x929611,_0x3ccd04){return db[_0x3fed('0x46')][_0x3fed('0x4e')](_0x929611['body'],{})[_0x3fed('0x2c')](respondWithResult(_0x3ccd04,0xc9))[_0x3fed('0x4d')](handleError(_0x3ccd04,null));};exports[_0x3fed('0x2b')]=function(_0x2fa4fd,_0x8e6b77){if(_0x2fa4fd[_0x3fed('0x4f')]['id']){delete _0x2fa4fd[_0x3fed('0x4f')]['id'];}return db[_0x3fed('0x46')][_0x3fed('0x50')]({'where':{'id':_0x2fa4fd[_0x3fed('0x4c')]['id']}})[_0x3fed('0x2c')](handleEntityNotFound(_0x8e6b77,null))[_0x3fed('0x2c')](saveUpdates(_0x2fa4fd[_0x3fed('0x4f')],null))['then'](respondWithResult(_0x8e6b77,null))['catch'](handleError(_0x8e6b77,null));};exports[_0x3fed('0x51')]=function(_0x1c554d,_0x4dff05){return db[_0x3fed('0x46')][_0x3fed('0x50')]({'where':{'id':_0x1c554d[_0x3fed('0x4c')]['id']}})[_0x3fed('0x2c')](handleEntityNotFound(_0x4dff05,null))[_0x3fed('0x2c')](removeEntity(_0x4dff05,null))[_0x3fed('0x4d')](handleError(_0x4dff05,null));};exports[_0x3fed('0x52')]=function(_0x450eeb,_0x5b6de6,_0x4e658d){var _0x47f732={};var _0x535e85={};var _0x4f8c14;var _0x31bfa1;return db[_0x3fed('0x46')][_0x3fed('0x53')]({'where':{'id':_0x450eeb[_0x3fed('0x4c')]['id']}})['then'](handleEntityNotFound(_0x5b6de6,null))[_0x3fed('0x2c')](function(_0x522834){if(_0x522834){_0x4f8c14=_0x522834;_0x535e85[_0x3fed('0x37')]=_[_0x3fed('0x32')](db[_0x3fed('0x54')][_0x3fed('0x31')]);_0x535e85[_0x3fed('0x35')]=_[_0x3fed('0x32')](_0x450eeb[_0x3fed('0x35')]);_0x535e85[_0x3fed('0x33')]=_[_0x3fed('0x34')](_0x535e85[_0x3fed('0x37')],_0x535e85[_0x3fed('0x35')]);_0x47f732[_0x3fed('0x36')]=_[_0x3fed('0x34')](_0x535e85['model'],qs[_0x3fed('0x38')](_0x450eeb[_0x3fed('0x35')]['fields']));_0x47f732[_0x3fed('0x36')]=_0x47f732[_0x3fed('0x36')][_0x3fed('0x39')]?_0x47f732[_0x3fed('0x36')]:_0x535e85[_0x3fed('0x37')];_0x47f732[_0x3fed('0x3c')]=qs[_0x3fed('0x3d')](_0x450eeb[_0x3fed('0x35')][_0x3fed('0x3d')]);_0x47f732[_0x3fed('0x3e')]=qs[_0x3fed('0x33')](_[_0x3fed('0x55')](_0x450eeb[_0x3fed('0x35')],_0x535e85[_0x3fed('0x33')]));if(_0x450eeb[_0x3fed('0x35')][_0x3fed('0x3f')]){_0x47f732[_0x3fed('0x3e')]=_[_0x3fed('0x44')](_0x47f732['where'],{'$or':_[_0x3fed('0x40')](_0x47f732[_0x3fed('0x36')],function(_0x483347){var _0x4f5484={};_0x4f5484[_0x483347]={'$like':'%'+_0x450eeb[_0x3fed('0x35')][_0x3fed('0x3f')]+'%'};return _0x4f5484;})});}_0x47f732=_[_0x3fed('0x44')]({},_0x47f732,_0x450eeb[_0x3fed('0x45')]);return _0x4f8c14[_0x3fed('0x52')](_0x47f732);}})[_0x3fed('0x2c')](function(_0x5cb5f4){if(_0x5cb5f4){_0x31bfa1=_0x5cb5f4[_0x3fed('0x39')];if(!_0x450eeb[_0x3fed('0x35')]['hasOwnProperty'](_0x3fed('0x3b'))){_0x47f732[_0x3fed('0x26')]=qs[_0x3fed('0x26')](_0x450eeb[_0x3fed('0x35')][_0x3fed('0x26')]);_0x47f732[_0x3fed('0x25')]=qs[_0x3fed('0x25')](_0x450eeb[_0x3fed('0x35')]['offset']);}return _0x4f8c14[_0x3fed('0x52')](_0x47f732);}})[_0x3fed('0x2c')](function(_0x7275cc){if(_0x7275cc){return _0x7275cc?{'count':_0x31bfa1,'rows':_0x7275cc}:null;}})[_0x3fed('0x2c')](respondWithResult(_0x5b6de6,null))[_0x3fed('0x4d')](handleError(_0x5b6de6,null));};exports[_0x3fed('0x56')]=function(_0xca6139,_0x4b3d65,_0x361834){if(_0xca6139[_0x3fed('0x4f')]['id']){delete _0xca6139[_0x3fed('0x4f')]['id'];}return db[_0x3fed('0x46')]['findOne']({'where':{'id':_0xca6139[_0x3fed('0x4c')]['id']}})[_0x3fed('0x2c')](handleEntityNotFound(_0x4b3d65,null))['then'](function(_0x272e98){if(_0x272e98){_0xca6139[_0x3fed('0x4f')]['AccountId']=_0x272e98['id'];_0xca6139[_0x3fed('0x4f')][_0x3fed('0x57')]=integrations['getSubjects'](_0xca6139[_0x3fed('0x4f')][_0x3fed('0x58')],_0xca6139[_0x3fed('0x4f')]['type']);_0xca6139[_0x3fed('0x4f')][_0x3fed('0x59')]=integrations[_0x3fed('0x5a')](_0xca6139[_0x3fed('0x4f')][_0x3fed('0x58')],_0xca6139[_0x3fed('0x4f')][_0x3fed('0x41')]);return db[_0x3fed('0x54')][_0x3fed('0x4e')](_0xca6139[_0x3fed('0x4f')],{'include':[{'model':db['VtigerField'],'as':_0x3fed('0x57')},{'model':db['VtigerField'],'as':_0x3fed('0x59')}]});}return null;})[_0x3fed('0x2c')](respondWithResult(_0x4b3d65,null))['catch'](handleError(_0x4b3d65,null));};var md5=require(_0x3fed('0x5b'));exports[_0x3fed('0x5c')]=function(_0x2532a3,_0x58b90e,_0x33049d){var _0x266ca0=null;var _0x42af51=null;var _0x51682c=null;var _0x14161c=null;var _0x392375='';return db[_0x3fed('0x46')]['findOne']({'where':{'id':_0x2532a3[_0x3fed('0x4c')]['id']},'attributes':['id',_0x3fed('0x2f'),_0x3fed('0x5d'),_0x3fed('0x5e'),_0x3fed('0x5f'),_0x3fed('0x60'),'serverUrl',_0x3fed('0x61')]})[_0x3fed('0x2c')](handleEntityNotFound(_0x58b90e,null))[_0x3fed('0x2c')](function(_0x15a2b4){if(_0x15a2b4){_0x266ca0=_0x15a2b4[_0x3fed('0x5d')];_0x42af51=_0x15a2b4[_0x3fed('0x61')];_0x51682c=_0x15a2b4['moduleName'];_0x392375=_0x15a2b4[_0x3fed('0x60')];var _0x39de16=_0x392375['slice'](-0x1);if(_0x39de16==='/'){_0x392375=_0x392375['substring'](0x0,_0x392375[_0x3fed('0x62')](_0x39de16));}_0x14161c=util[_0x3fed('0x63')](_0x3fed('0x64'),_0x392375);var _0x25e5ce={'method':_0x3fed('0x65'),'uri':_0x14161c,'qs':{'operation':_0x3fed('0x66'),'username':_0x15a2b4[_0x3fed('0x5d')]},'json':!![]};return rp(_0x25e5ce);}})[_0x3fed('0x2c')](function(_0x1aec93){if(_0x1aec93['success']){var _0x18259e={'method':_0x3fed('0x67'),'uri':_0x14161c,'form':{'operation':_0x3fed('0x68'),'username':_0x266ca0,'accessKey':md5(_0x1aec93[_0x3fed('0x20')][_0x3fed('0x69')]+_0x42af51)},'json':!![]};return rp(_0x18259e);}})[_0x3fed('0x2c')](function(_0x160a21){if(_0x160a21[_0x3fed('0x6a')]){var _0x5788aa={'method':_0x3fed('0x65'),'uri':_0x14161c,'qs':{'operation':_0x3fed('0x6b'),'username':_0x266ca0,'sessionName':_0x160a21[_0x3fed('0x20')][_0x3fed('0x6c')],'elementType':_0x51682c},'json':!![]};return rp(_0x5788aa);}})[_0x3fed('0x2c')](function(_0x27db66){if(_0x27db66[_0x3fed('0x6a')]){var _0x5e1761=[_0x3fed('0x6d'),'reference',_0x3fed('0x6e')];_[_0x3fed('0x6f')](_0x27db66['result'][_0x3fed('0x38')],function(_0x298891){return _0x5e1761[_0x3fed('0x70')](_0x298891[_0x3fed('0x41')][_0x3fed('0x2f')]);});_[_0x3fed('0x6f')](_0x27db66['result'][_0x3fed('0x38')],function(_0x19b680){return _0x19b680[_0x3fed('0x71')]===_0x3fed('0x72');});return{'count':_0x27db66[_0x3fed('0x20')][_0x3fed('0x38')]['length'],'rows':_[_0x3fed('0x40')](_0x27db66[_0x3fed('0x20')][_0x3fed('0x38')],function(_0x5bc52b){return{'id':_0x5bc52b[_0x3fed('0x2f')],'name':_0x5bc52b['label'],'custom':_[_0x3fed('0x73')](_0x5bc52b[_0x3fed('0x2f')],_0x3fed('0x74'))?!![]:![],'options':_0x5bc52b['type'][_0x3fed('0x2f')]===_0x3fed('0x75')&&_0x5bc52b[_0x3fed('0x41')][_0x3fed('0x76')][_0x3fed('0x39')]>0x0?_[_0x3fed('0x40')](_0x5bc52b[_0x3fed('0x41')]['picklistValues'],function(_0x29472a){return{'name':_0x29472a['label'],'value':_0x29472a[_0x3fed('0x77')]};}):[]};})};}})[_0x3fed('0x2c')](respondWithResult(_0x58b90e,null))['catch'](function(_0x1ceaf8){console[_0x3fed('0x78')](_0x3fed('0x79')+_0x1ceaf8);var _0x1d796f=_0x2532a3[_0x3fed('0x35')][_0x3fed('0x16')]?0x1f4:_0x1ceaf8[_0x3fed('0x7a')]||0x1f4;logger[_0x3fed('0x1c')]('getFields,\x20%s,\x20%s,\x20%s',_0x3fed('0x5c'),_0x1d796f,JSON[_0x3fed('0x1b')](_0x1ceaf8));delete _0x1ceaf8[_0x3fed('0x2f')];if(_0x1d796f===0x191){_0x1d796f=0x190;}_0x58b90e[_0x3fed('0x21')](_0x1d796f)[_0x3fed('0x7b')](_0x2532a3[_0x3fed('0x35')]['test']?{'message':_0x3fed('0x7c'),'statusCode':_0x1ceaf8['statusCode']}:_0x1ceaf8);});};
\ No newline at end of file
+var _0xcf64=['channel','getDescriptions','VtigerField','Subjects','Descriptions','getFields','name','username','description','moduleName','remoteUri','accessKey','slice','substring','lastIndexOf','format','GET','success','POST','login','token','describe','sessionName','autogenerated','remove','includes','editable','false','label','cf_','picklist','log','statusCode','getFields,\x20%s,\x20%s,\x20%s','send','Wrong\x20credentials','html-pdf','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','VtigerAccount,\x20%s,\x20%s','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','catch','status','end','json','offset','limit','set','Content-Range','reject','save','update','destroy','sendStatus','stack','index','VtigerAccount','rawAttributes','keys','query','filters','intersection','model','attributes','fields','length','order','sort','merge','where','map','type','key','include','rows','show','params','includeAll','options','find','create','body','getConfigurations','findOne','VtigerConfiguration','pick','filter','addConfiguration','AccountId'];(function(_0x1fdb40,_0x51351c){var _0x281f93=function(_0x35eebe){while(--_0x35eebe){_0x1fdb40['push'](_0x1fdb40['shift']());}};_0x281f93(++_0x51351c);}(_0xcf64,0x19b));var _0x4cf6=function(_0x2bfe42,_0x278d3a){_0x2bfe42=_0x2bfe42-0x0;var _0x1c3bdb=_0xcf64[_0x2bfe42];return _0x1c3bdb;};'use strict';var pdf=require(_0x4cf6('0x0'));var emlformat=require(_0x4cf6('0x1'));var rimraf=require(_0x4cf6('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4cf6('0x3'));var rp=require('request-promise');var moment=require(_0x4cf6('0x4'));var BPromise=require(_0x4cf6('0x5'));var Mustache=require(_0x4cf6('0x6'));var util=require(_0x4cf6('0x7'));var path=require(_0x4cf6('0x8'));var sox=require(_0x4cf6('0x9'));var csv=require(_0x4cf6('0xa'));var ejs=require(_0x4cf6('0xb'));var fs=require('fs');var _=require(_0x4cf6('0xc'));var squel=require('squel');var crypto=require(_0x4cf6('0xd'));var jsforce=require(_0x4cf6('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x4cf6('0xa'));var querystring=require('querystring');var Papa=require(_0x4cf6('0xf'));var Redis=require(_0x4cf6('0x10'));var authService=require(_0x4cf6('0x11'));var qs=require(_0x4cf6('0x12'));var hardwareService=require(_0x4cf6('0x13'));var logger=require(_0x4cf6('0x14'))(_0x4cf6('0x15'));var utils=require('../../config/utils');var config=require(_0x4cf6('0x16'));var db=require(_0x4cf6('0x17'))['db'];var integrations=require(_0x4cf6('0x18'));var jayson=require(_0x4cf6('0x19'));var client=jayson[_0x4cf6('0x1a')][_0x4cf6('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x3ddf0c,_0x5b1950,_0x59cc55){if(_0x59cc55){var _0x479f5a=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x479f5a[_0x4cf6('0x1c')](_0x5b1950)){return _0x3ddf0c;}else{throw new Error(_0x4cf6('0x1d'));}}else{return _0x3ddf0c;}}function respondWithRpcPromise(_0x5f0dd8,_0x29ce1f,_0x38da78,_0x49af04){return new BPromise(function(_0x5b4e4d,_0x2424c1){var _0x2e73ab=_0x49af04||client;return _0x2e73ab['request'](_0x5f0dd8,_0x38da78)[_0x4cf6('0x1e')](function(_0x4bd9e7){logger['info'](_0x4cf6('0x1f'),_0x29ce1f,'request\x20sent');logger[_0x4cf6('0x20')](_0x4cf6('0x21'),_0x29ce1f,'request\x20sent',JSON[_0x4cf6('0x22')](_0x4bd9e7));if(_0x4bd9e7[_0x4cf6('0x23')]){if(_0x4bd9e7[_0x4cf6('0x23')][_0x4cf6('0x24')]===0x1f4){logger[_0x4cf6('0x23')]('VtigerAccount,\x20%s,\x20%s',_0x29ce1f,_0x4bd9e7[_0x4cf6('0x23')][_0x4cf6('0x25')]);return _0x2424c1(_0x4bd9e7['error'][_0x4cf6('0x25')]);}logger[_0x4cf6('0x23')]('VtigerAccount,\x20%s,\x20%s',_0x29ce1f,_0x4bd9e7[_0x4cf6('0x23')]['message']);return _0x5b4e4d(_0x4bd9e7['error']['message']);}else{logger[_0x4cf6('0x26')]('VtigerAccount,\x20%s,\x20%s',_0x29ce1f,_0x4cf6('0x27'));_0x5b4e4d(_0x4bd9e7[_0x4cf6('0x28')][_0x4cf6('0x25')]);}})[_0x4cf6('0x29')](function(_0x527b3e){logger[_0x4cf6('0x23')](_0x4cf6('0x1f'),_0x29ce1f,_0x527b3e);_0x2424c1(_0x527b3e);});});}function respondWithStatusCode(_0x2ab087,_0x24ccf6){_0x24ccf6=_0x24ccf6||0xcc;return function(_0x15870f){if(_0x15870f){return _0x2ab087['sendStatus'](_0x24ccf6);}return _0x2ab087[_0x4cf6('0x2a')](_0x24ccf6)[_0x4cf6('0x2b')]();};}function respondWithResult(_0x53985f,_0x425943){_0x425943=_0x425943||0xc8;return function(_0x15c584){if(_0x15c584){return _0x53985f[_0x4cf6('0x2a')](_0x425943)[_0x4cf6('0x2c')](_0x15c584);}};}function respondWithFilteredResult(_0x25d576,_0x23f850){return function(_0x5a3bec){if(_0x5a3bec){var _0x1b4d6c=_0x5a3bec['count'],_0x58e46c=_0x23f850[_0x4cf6('0x2d')],_0x591e35=_0x23f850[_0x4cf6('0x2d')]+_0x23f850[_0x4cf6('0x2e')],_0x283f4a;if(_0x591e35>=_0x1b4d6c){_0x591e35=_0x1b4d6c;_0x283f4a=0xc8;}else{_0x283f4a=0xce;}_0x25d576[_0x4cf6('0x2a')](_0x283f4a);return _0x25d576[_0x4cf6('0x2f')](_0x4cf6('0x30'),_0x58e46c+'-'+_0x591e35+'/'+_0x1b4d6c)[_0x4cf6('0x2c')](_0x5a3bec);}return null;};}function patchUpdates(_0xcfa16b){return function(_0x3fabf7){try{jsonpatch['apply'](_0x3fabf7,_0xcfa16b,!![]);}catch(_0x20b45f){return BPromise[_0x4cf6('0x31')](_0x20b45f);}return _0x3fabf7[_0x4cf6('0x32')]();};}function saveUpdates(_0x4dbd44,_0x1dbffe){return function(_0x20951f){if(_0x20951f){return _0x20951f[_0x4cf6('0x33')](_0x4dbd44)[_0x4cf6('0x1e')](function(_0x2b5417){return _0x2b5417;});}return null;};}function removeEntity(_0x1e1462,_0x1ba417){return function(_0x5c93ea){if(_0x5c93ea){return _0x5c93ea[_0x4cf6('0x34')]()[_0x4cf6('0x1e')](function(){_0x1e1462[_0x4cf6('0x2a')](0xcc)[_0x4cf6('0x2b')]();});}};}function handleEntityNotFound(_0x2d78d1,_0x1b45c5){return function(_0xb9e6ce){if(!_0xb9e6ce){_0x2d78d1[_0x4cf6('0x35')](0x194);}return _0xb9e6ce;};}function handleError(_0x16e1bb,_0x57af02){_0x57af02=_0x57af02||0x1f4;return function(_0x5d3b62){logger['error'](_0x5d3b62[_0x4cf6('0x36')]);if(_0x5d3b62['name']){delete _0x5d3b62['name'];}_0x16e1bb[_0x4cf6('0x2a')](_0x57af02)['send'](_0x5d3b62);};}exports[_0x4cf6('0x37')]=function(_0x17aab5,_0x54aeb0){var _0x2cc310={},_0x17a760={},_0x45a0cf={'count':0x0,'rows':[]};var _0x271ea3=db[_0x4cf6('0x38')][_0x4cf6('0x39')];_0x17a760['model']=_['keys'](_0x271ea3);_0x17a760['query']=_[_0x4cf6('0x3a')](_0x17aab5[_0x4cf6('0x3b')]);_0x17a760[_0x4cf6('0x3c')]=_[_0x4cf6('0x3d')](_0x17a760[_0x4cf6('0x3e')],_0x17a760['query']);_0x2cc310[_0x4cf6('0x3f')]=_[_0x4cf6('0x3d')](_0x17a760[_0x4cf6('0x3e')],qs[_0x4cf6('0x40')](_0x17aab5['query'][_0x4cf6('0x40')]));_0x2cc310[_0x4cf6('0x3f')]=_0x2cc310['attributes'][_0x4cf6('0x41')]?_0x2cc310[_0x4cf6('0x3f')]:_0x17a760[_0x4cf6('0x3e')];if(!_0x17aab5['query']['hasOwnProperty']('nolimit')){_0x2cc310[_0x4cf6('0x2e')]=qs[_0x4cf6('0x2e')](_0x17aab5[_0x4cf6('0x3b')][_0x4cf6('0x2e')]);_0x2cc310['offset']=qs[_0x4cf6('0x2d')](_0x17aab5[_0x4cf6('0x3b')][_0x4cf6('0x2d')]);}_0x2cc310[_0x4cf6('0x42')]=qs[_0x4cf6('0x43')](_0x17aab5[_0x4cf6('0x3b')][_0x4cf6('0x43')]);_0x2cc310['where']=qs[_0x4cf6('0x3c')](_['pick'](_0x17aab5['query'],_0x17a760[_0x4cf6('0x3c')]));if(_0x17aab5['query']['filter']){_0x2cc310['where']=_[_0x4cf6('0x44')](_0x2cc310[_0x4cf6('0x45')],{'$or':_[_0x4cf6('0x46')](_0x271ea3,function(_0x2bd64f){if(_0x2bd64f[_0x4cf6('0x47')][_0x4cf6('0x48')]!=='VIRTUAL'){var _0x159409={};_0x159409[_0x2bd64f['field']]={'$like':'%'+_0x17aab5[_0x4cf6('0x3b')]['filter']+'%'};return _0x159409;}})});}_0x2cc310=_[_0x4cf6('0x44')]({},_0x2cc310,_0x17aab5['options']);var _0x450e6d={'where':_0x2cc310[_0x4cf6('0x45')]};return db[_0x4cf6('0x38')]['count'](_0x450e6d)[_0x4cf6('0x1e')](function(_0xed6e5d){_0x45a0cf['count']=_0xed6e5d;if(_0x17aab5[_0x4cf6('0x3b')]['includeAll']){_0x2cc310[_0x4cf6('0x49')]=[{'all':!![]}];}return db['VtigerAccount']['findAll'](_0x2cc310);})['then'](function(_0x511a23){_0x45a0cf[_0x4cf6('0x4a')]=_0x511a23;return _0x45a0cf;})[_0x4cf6('0x1e')](respondWithFilteredResult(_0x54aeb0,_0x2cc310))[_0x4cf6('0x29')](handleError(_0x54aeb0,null));};exports[_0x4cf6('0x4b')]=function(_0x5bac8f,_0x250486){var _0x84822f={'raw':![],'where':{'id':_0x5bac8f[_0x4cf6('0x4c')]['id']}},_0x564435={};_0x564435[_0x4cf6('0x3e')]=_[_0x4cf6('0x3a')](db['VtigerAccount']['rawAttributes']);_0x564435[_0x4cf6('0x3b')]=_['keys'](_0x5bac8f['query']);_0x564435[_0x4cf6('0x3c')]=_['intersection'](_0x564435[_0x4cf6('0x3e')],_0x564435['query']);_0x84822f[_0x4cf6('0x3f')]=_[_0x4cf6('0x3d')](_0x564435['model'],qs[_0x4cf6('0x40')](_0x5bac8f[_0x4cf6('0x3b')][_0x4cf6('0x40')]));_0x84822f[_0x4cf6('0x3f')]=_0x84822f[_0x4cf6('0x3f')]['length']?_0x84822f[_0x4cf6('0x3f')]:_0x564435[_0x4cf6('0x3e')];if(_0x5bac8f[_0x4cf6('0x3b')][_0x4cf6('0x4d')]){_0x84822f['include']=[{'all':!![]}];}_0x84822f=_[_0x4cf6('0x44')]({},_0x84822f,_0x5bac8f[_0x4cf6('0x4e')]);return db[_0x4cf6('0x38')][_0x4cf6('0x4f')](_0x84822f)[_0x4cf6('0x1e')](handleEntityNotFound(_0x250486,null))[_0x4cf6('0x1e')](respondWithResult(_0x250486,null))['catch'](handleError(_0x250486,null));};exports[_0x4cf6('0x50')]=function(_0x341a35,_0x6792ff){return db[_0x4cf6('0x38')]['create'](_0x341a35[_0x4cf6('0x51')],{})[_0x4cf6('0x1e')](respondWithResult(_0x6792ff,0xc9))['catch'](handleError(_0x6792ff,null));};exports['update']=function(_0x2fa352,_0x4996b0){if(_0x2fa352[_0x4cf6('0x51')]['id']){delete _0x2fa352[_0x4cf6('0x51')]['id'];}return db[_0x4cf6('0x38')][_0x4cf6('0x4f')]({'where':{'id':_0x2fa352[_0x4cf6('0x4c')]['id']}})[_0x4cf6('0x1e')](handleEntityNotFound(_0x4996b0,null))[_0x4cf6('0x1e')](saveUpdates(_0x2fa352[_0x4cf6('0x51')],null))[_0x4cf6('0x1e')](respondWithResult(_0x4996b0,null))[_0x4cf6('0x29')](handleError(_0x4996b0,null));};exports[_0x4cf6('0x34')]=function(_0x12ab29,_0xad650a){return db[_0x4cf6('0x38')]['find']({'where':{'id':_0x12ab29[_0x4cf6('0x4c')]['id']}})[_0x4cf6('0x1e')](handleEntityNotFound(_0xad650a,null))[_0x4cf6('0x1e')](removeEntity(_0xad650a,null))[_0x4cf6('0x29')](handleError(_0xad650a,null));};exports[_0x4cf6('0x52')]=function(_0x476b64,_0x429e2c,_0x1a37c0){var _0x5a3862={};var _0x58a5df={};var _0xbd3ee9;var _0x2faca7;return db['VtigerAccount'][_0x4cf6('0x53')]({'where':{'id':_0x476b64[_0x4cf6('0x4c')]['id']}})[_0x4cf6('0x1e')](handleEntityNotFound(_0x429e2c,null))[_0x4cf6('0x1e')](function(_0x909646){if(_0x909646){_0xbd3ee9=_0x909646;_0x58a5df[_0x4cf6('0x3e')]=_[_0x4cf6('0x3a')](db[_0x4cf6('0x54')][_0x4cf6('0x39')]);_0x58a5df['query']=_[_0x4cf6('0x3a')](_0x476b64[_0x4cf6('0x3b')]);_0x58a5df[_0x4cf6('0x3c')]=_[_0x4cf6('0x3d')](_0x58a5df[_0x4cf6('0x3e')],_0x58a5df['query']);_0x5a3862[_0x4cf6('0x3f')]=_[_0x4cf6('0x3d')](_0x58a5df[_0x4cf6('0x3e')],qs[_0x4cf6('0x40')](_0x476b64['query'][_0x4cf6('0x40')]));_0x5a3862[_0x4cf6('0x3f')]=_0x5a3862[_0x4cf6('0x3f')]['length']?_0x5a3862[_0x4cf6('0x3f')]:_0x58a5df['model'];_0x5a3862[_0x4cf6('0x42')]=qs['sort'](_0x476b64['query']['sort']);_0x5a3862['where']=qs[_0x4cf6('0x3c')](_[_0x4cf6('0x55')](_0x476b64[_0x4cf6('0x3b')],_0x58a5df['filters']));if(_0x476b64['query'][_0x4cf6('0x56')]){_0x5a3862[_0x4cf6('0x45')]=_['merge'](_0x5a3862[_0x4cf6('0x45')],{'$or':_[_0x4cf6('0x46')](_0x5a3862[_0x4cf6('0x3f')],function(_0x2153d1){var _0x34b62b={};_0x34b62b[_0x2153d1]={'$like':'%'+_0x476b64[_0x4cf6('0x3b')][_0x4cf6('0x56')]+'%'};return _0x34b62b;})});}_0x5a3862=_[_0x4cf6('0x44')]({},_0x5a3862,_0x476b64[_0x4cf6('0x4e')]);return _0xbd3ee9[_0x4cf6('0x52')](_0x5a3862);}})[_0x4cf6('0x1e')](function(_0x439338){if(_0x439338){_0x2faca7=_0x439338[_0x4cf6('0x41')];if(!_0x476b64[_0x4cf6('0x3b')]['hasOwnProperty']('nolimit')){_0x5a3862[_0x4cf6('0x2e')]=qs[_0x4cf6('0x2e')](_0x476b64[_0x4cf6('0x3b')][_0x4cf6('0x2e')]);_0x5a3862[_0x4cf6('0x2d')]=qs[_0x4cf6('0x2d')](_0x476b64[_0x4cf6('0x3b')][_0x4cf6('0x2d')]);}return _0xbd3ee9[_0x4cf6('0x52')](_0x5a3862);}})['then'](function(_0x9aa7bd){if(_0x9aa7bd){return _0x9aa7bd?{'count':_0x2faca7,'rows':_0x9aa7bd}:null;}})['then'](respondWithResult(_0x429e2c,null))[_0x4cf6('0x29')](handleError(_0x429e2c,null));};exports[_0x4cf6('0x57')]=function(_0xc8998e,_0x2d3e88,_0x7a7c8d){if(_0xc8998e[_0x4cf6('0x51')]['id']){delete _0xc8998e[_0x4cf6('0x51')]['id'];}return db[_0x4cf6('0x38')][_0x4cf6('0x53')]({'where':{'id':_0xc8998e[_0x4cf6('0x4c')]['id']}})[_0x4cf6('0x1e')](handleEntityNotFound(_0x2d3e88,null))[_0x4cf6('0x1e')](function(_0xcda986){if(_0xcda986){_0xc8998e[_0x4cf6('0x51')][_0x4cf6('0x58')]=_0xcda986['id'];_0xc8998e[_0x4cf6('0x51')]['Subjects']=integrations['getSubjects'](_0xc8998e['body'][_0x4cf6('0x59')],_0xc8998e[_0x4cf6('0x51')][_0x4cf6('0x47')]);_0xc8998e[_0x4cf6('0x51')]['Descriptions']=integrations[_0x4cf6('0x5a')](_0xc8998e[_0x4cf6('0x51')][_0x4cf6('0x59')],_0xc8998e[_0x4cf6('0x51')][_0x4cf6('0x47')]);return db['VtigerConfiguration'][_0x4cf6('0x50')](_0xc8998e['body'],{'include':[{'model':db[_0x4cf6('0x5b')],'as':_0x4cf6('0x5c')},{'model':db[_0x4cf6('0x5b')],'as':_0x4cf6('0x5d')}]});}return null;})[_0x4cf6('0x1e')](respondWithResult(_0x2d3e88,null))[_0x4cf6('0x29')](handleError(_0x2d3e88,null));};var md5=require('md5');exports[_0x4cf6('0x5e')]=function(_0x490d27,_0x12543c,_0x2e241f){var _0x1a5297=null;var _0x41b540=null;var _0x1514ce=null;var _0x247d2f=null;var _0x15d435='';return db[_0x4cf6('0x38')]['findOne']({'where':{'id':_0x490d27[_0x4cf6('0x4c')]['id']},'attributes':['id',_0x4cf6('0x5f'),_0x4cf6('0x60'),_0x4cf6('0x61'),_0x4cf6('0x62'),_0x4cf6('0x63'),'serverUrl',_0x4cf6('0x64')]})[_0x4cf6('0x1e')](handleEntityNotFound(_0x12543c,null))[_0x4cf6('0x1e')](function(_0x16ef7d){if(_0x16ef7d){_0x1a5297=_0x16ef7d[_0x4cf6('0x60')];_0x41b540=_0x16ef7d[_0x4cf6('0x64')];_0x1514ce=_0x16ef7d['moduleName'];_0x15d435=_0x16ef7d[_0x4cf6('0x63')];var _0x1378c9=_0x15d435[_0x4cf6('0x65')](-0x1);if(_0x1378c9==='/'){_0x15d435=_0x15d435[_0x4cf6('0x66')](0x0,_0x15d435[_0x4cf6('0x67')](_0x1378c9));}_0x247d2f=util[_0x4cf6('0x68')]('%s/webservice.php',_0x15d435);var _0x19608f={'method':_0x4cf6('0x69'),'uri':_0x247d2f,'qs':{'operation':'getchallenge','username':_0x16ef7d[_0x4cf6('0x60')]},'json':!![]};return rp(_0x19608f);}})['then'](function(_0xc813c3){if(_0xc813c3[_0x4cf6('0x6a')]){var _0x469237={'method':_0x4cf6('0x6b'),'uri':_0x247d2f,'form':{'operation':_0x4cf6('0x6c'),'username':_0x1a5297,'accessKey':md5(_0xc813c3[_0x4cf6('0x28')][_0x4cf6('0x6d')]+_0x41b540)},'json':!![]};return rp(_0x469237);}})[_0x4cf6('0x1e')](function(_0x48de5c){if(_0x48de5c['success']){var _0x2f6bfc={'method':_0x4cf6('0x69'),'uri':_0x247d2f,'qs':{'operation':_0x4cf6('0x6e'),'username':_0x1a5297,'sessionName':_0x48de5c[_0x4cf6('0x28')][_0x4cf6('0x6f')],'elementType':_0x1514ce},'json':!![]};return rp(_0x2f6bfc);}})[_0x4cf6('0x1e')](function(_0x42957d){if(_0x42957d['success']){var _0x1e9e01=[_0x4cf6('0x70'),'reference','owner'];_[_0x4cf6('0x71')](_0x42957d[_0x4cf6('0x28')][_0x4cf6('0x40')],function(_0x4e7164){return _0x1e9e01[_0x4cf6('0x72')](_0x4e7164[_0x4cf6('0x47')][_0x4cf6('0x5f')]);});_[_0x4cf6('0x71')](_0x42957d[_0x4cf6('0x28')]['fields'],function(_0x4aa725){return _0x4aa725[_0x4cf6('0x73')]===_0x4cf6('0x74');});return{'count':_0x42957d[_0x4cf6('0x28')][_0x4cf6('0x40')]['length'],'rows':_[_0x4cf6('0x46')](_0x42957d['result'][_0x4cf6('0x40')],function(_0x1740ef){return{'id':_0x1740ef['name'],'name':_0x1740ef[_0x4cf6('0x75')],'custom':_['startsWith'](_0x1740ef['name'],_0x4cf6('0x76'))?!![]:![],'options':_0x1740ef['type'][_0x4cf6('0x5f')]===_0x4cf6('0x77')&&_0x1740ef[_0x4cf6('0x47')]['picklistValues'][_0x4cf6('0x41')]>0x0?_[_0x4cf6('0x46')](_0x1740ef[_0x4cf6('0x47')]['picklistValues'],function(_0x5a8180){return{'name':_0x5a8180[_0x4cf6('0x75')],'value':_0x5a8180['value']};}):[]};})};}})[_0x4cf6('0x1e')](respondWithResult(_0x12543c,null))[_0x4cf6('0x29')](function(_0x235287){console[_0x4cf6('0x78')]('vTiger\x20error:\x20'+_0x235287);var _0x3e30ef=_0x490d27[_0x4cf6('0x3b')]['test']?0x1f4:_0x235287[_0x4cf6('0x79')]||0x1f4;logger['error'](_0x4cf6('0x7a'),_0x4cf6('0x5e'),_0x3e30ef,JSON[_0x4cf6('0x22')](_0x235287));delete _0x235287['name'];if(_0x3e30ef===0x191){_0x3e30ef=0x190;}_0x12543c[_0x4cf6('0x2a')](_0x3e30ef)[_0x4cf6('0x7b')](_0x490d27['query']['test']?{'message':_0x4cf6('0x7c'),'statusCode':_0x235287['statusCode']}:_0x235287);});};
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.model.js b/server/api/intVtigerAccount/intVtigerAccount.model.js
index 879d467..a2ac669 100644
--- a/server/api/intVtigerAccount/intVtigerAccount.model.js
+++ b/server/api/intVtigerAccount/intVtigerAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1b64=['int_vtiger_accounts','lodash','util','api','path','rimraf','../../config/environment','./intVtigerAccount.attributes','exports'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x1b64,0x76));var _0x41b6=function(_0x20da5d,_0x46f84b){_0x20da5d=_0x20da5d-0x0;var _0x2968f2=_0x1b64[_0x20da5d];return _0x2968f2;};'use strict';var _=require(_0x41b6('0x0'));var util=require(_0x41b6('0x1'));var logger=require('../../config/logger')(_0x41b6('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x41b6('0x3'));var rimraf=require(_0x41b6('0x4'));var config=require(_0x41b6('0x5'));var attributes=require(_0x41b6('0x6'));var integrations=require('../../components/integrations/configuration');module[_0x41b6('0x7')]=function(_0x2d8af3,_0x5775c8){return _0x2d8af3['define']('VtigerAccount',attributes,{'tableName':_0x41b6('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x16a2=['define','int_vtiger_accounts','lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','./intVtigerAccount.attributes'];(function(_0x7a112,_0x2eb4a0){var _0x136dc5=function(_0x437650){while(--_0x437650){_0x7a112['push'](_0x7a112['shift']());}};_0x136dc5(++_0x2eb4a0);}(_0x16a2,0x1d0));var _0x216a=function(_0x5817e6,_0x44a2d0){_0x5817e6=_0x5817e6-0x0;var _0x51916a=_0x16a2[_0x5817e6];return _0x51916a;};'use strict';var _=require(_0x216a('0x0'));var util=require(_0x216a('0x1'));var logger=require(_0x216a('0x2'))(_0x216a('0x3'));var moment=require(_0x216a('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x216a('0x5'));var rimraf=require(_0x216a('0x6'));var config=require(_0x216a('0x7'));var attributes=require(_0x216a('0x8'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x4456ad,_0x6dbac7){return _0x4456ad[_0x216a('0x9')]('VtigerAccount',attributes,{'tableName':_0x216a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.rpc.js b/server/api/intVtigerAccount/intVtigerAccount.rpc.js
index 8c0a4ad..d1a30c3 100644
--- a/server/api/intVtigerAccount/intVtigerAccount.rpc.js
+++ b/server/api/intVtigerAccount/intVtigerAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xab59=['code','VtigerAccount,\x20%s,\x20%s','message','request\x20sent','result','catch','findAll','options','raw','attributes','limit','map','include','model','GetVtigerAccount','ShowVtigerAccount','find','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','request','then','info','debug','stringify','error'];(function(_0x363212,_0x439b03){var _0x3f81b7=function(_0x42ad74){while(--_0x42ad74){_0x363212['push'](_0x363212['shift']());}};_0x3f81b7(++_0x439b03);}(_0xab59,0x166));var _0x9ab5=function(_0x4f027d,_0x3f9587){_0x4f027d=_0x4f027d-0x0;var _0xc46890=_0xab59[_0x4f027d];return _0xc46890;};'use strict';var _=require('lodash');var util=require(_0x9ab5('0x0'));var moment=require(_0x9ab5('0x1'));var BPromise=require(_0x9ab5('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9ab5('0x3'));var db=require(_0x9ab5('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x9ab5('0x5'))(_0x9ab5('0x6'));var config=require('../../config/environment');var jayson=require(_0x9ab5('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3752e2,_0x2bb72a,_0x388df2){return new BPromise(function(_0x2c5d69,_0x139fdf){return client[_0x9ab5('0x8')](_0x3752e2,_0x388df2)[_0x9ab5('0x9')](function(_0x34c39e){logger[_0x9ab5('0xa')]('VtigerAccount,\x20%s,\x20%s',_0x2bb72a,'request\x20sent');logger[_0x9ab5('0xb')]('VtigerAccount,\x20%s,\x20%s,\x20%s',_0x2bb72a,'request\x20sent',JSON[_0x9ab5('0xc')](_0x34c39e));if(_0x34c39e[_0x9ab5('0xd')]){if(_0x34c39e[_0x9ab5('0xd')][_0x9ab5('0xe')]===0x1f4){logger[_0x9ab5('0xd')](_0x9ab5('0xf'),_0x2bb72a,_0x34c39e[_0x9ab5('0xd')]['message']);return _0x139fdf(_0x34c39e[_0x9ab5('0xd')]['message']);}logger[_0x9ab5('0xd')](_0x9ab5('0xf'),_0x2bb72a,_0x34c39e['error'][_0x9ab5('0x10')]);return _0x2c5d69(_0x34c39e[_0x9ab5('0xd')][_0x9ab5('0x10')]);}else{logger['info'](_0x9ab5('0xf'),_0x2bb72a,_0x9ab5('0x11'));_0x2c5d69(_0x34c39e[_0x9ab5('0x12')][_0x9ab5('0x10')]);}})[_0x9ab5('0x13')](function(_0x1faf93){logger[_0x9ab5('0xd')](_0x9ab5('0xf'),_0x2bb72a,_0x1faf93);_0x139fdf(_0x1faf93);});});}exports['GetVtigerAccount']=function(_0x152979){var _0x216701=this;return new Promise(function(_0x5e5c99,_0x4b99b8){return db['VtigerAccount'][_0x9ab5('0x14')]({'raw':_0x152979[_0x9ab5('0x15')]?_0x152979[_0x9ab5('0x15')][_0x9ab5('0x16')]===undefined?!![]:![]:!![],'where':_0x152979[_0x9ab5('0x15')]?_0x152979[_0x9ab5('0x15')]['where']||null:null,'attributes':_0x152979[_0x9ab5('0x15')]?_0x152979['options'][_0x9ab5('0x17')]||null:null,'limit':_0x152979[_0x9ab5('0x15')]?_0x152979['options'][_0x9ab5('0x18')]||null:null,'include':_0x152979[_0x9ab5('0x15')]?_0x152979[_0x9ab5('0x15')]['include']?_[_0x9ab5('0x19')](_0x152979['options'][_0x9ab5('0x1a')],function(_0x4c7b91){return{'model':db[_0x4c7b91[_0x9ab5('0x1b')]],'as':_0x4c7b91['as'],'attributes':_0x4c7b91['attributes'],'include':_0x4c7b91[_0x9ab5('0x1a')]?_[_0x9ab5('0x19')](_0x4c7b91[_0x9ab5('0x1a')],function(_0x32691a){return{'model':db[_0x32691a[_0x9ab5('0x1b')]],'as':_0x32691a['as'],'attributes':_0x32691a[_0x9ab5('0x17')],'include':_0x32691a[_0x9ab5('0x1a')]?_[_0x9ab5('0x19')](_0x32691a[_0x9ab5('0x1a')],function(_0x4a6e9f){return{'model':db[_0x4a6e9f[_0x9ab5('0x1b')]],'as':_0x4a6e9f['as'],'attributes':_0x4a6e9f[_0x9ab5('0x17')]};}):[]};}):[]};}):[]:[]})[_0x9ab5('0x9')](function(_0x5621a3){logger[_0x9ab5('0xa')]('GetVtigerAccount',_0x152979);logger[_0x9ab5('0xb')](_0x9ab5('0x1c'),_0x152979,JSON[_0x9ab5('0xc')](_0x5621a3));_0x5e5c99(_0x5621a3);})[_0x9ab5('0x13')](function(_0x4958f2){logger[_0x9ab5('0xd')](_0x9ab5('0x1c'),_0x4958f2[_0x9ab5('0x10')],_0x152979);_0x4b99b8(_0x216701[_0x9ab5('0xd')](0x1f4,_0x4958f2[_0x9ab5('0x10')]));});});};exports[_0x9ab5('0x1d')]=function(_0x48720a){var _0x15ddad=this;return new Promise(function(_0x11ecd9,_0x3f963a){return db['VtigerAccount'][_0x9ab5('0x1e')]({'raw':_0x48720a['options']?_0x48720a[_0x9ab5('0x15')][_0x9ab5('0x16')]===undefined?!![]:![]:!![],'where':_0x48720a['options']?_0x48720a['options']['where']||null:null,'attributes':_0x48720a[_0x9ab5('0x15')]?_0x48720a[_0x9ab5('0x15')][_0x9ab5('0x17')]||null:null,'include':_0x48720a[_0x9ab5('0x15')]?_0x48720a[_0x9ab5('0x15')]['include']?_[_0x9ab5('0x19')](_0x48720a[_0x9ab5('0x15')]['include'],function(_0x573892){return{'model':db[_0x573892[_0x9ab5('0x1b')]],'as':_0x573892['as'],'attributes':_0x573892['attributes'],'include':_0x573892['include']?_[_0x9ab5('0x19')](_0x573892[_0x9ab5('0x1a')],function(_0x3cd50f){return{'model':db[_0x3cd50f[_0x9ab5('0x1b')]],'as':_0x3cd50f['as'],'attributes':_0x3cd50f[_0x9ab5('0x17')],'include':_0x3cd50f[_0x9ab5('0x1a')]?_[_0x9ab5('0x19')](_0x3cd50f[_0x9ab5('0x1a')],function(_0x4e6024){return{'model':db[_0x4e6024[_0x9ab5('0x1b')]],'as':_0x4e6024['as'],'attributes':_0x4e6024[_0x9ab5('0x17')]};}):[]};}):[]};}):[]:[]})[_0x9ab5('0x9')](function(_0x3d63e9){logger[_0x9ab5('0xa')]('ShowVtigerAccount',_0x48720a);logger['debug'](_0x9ab5('0x1d'),_0x48720a,JSON[_0x9ab5('0xc')](_0x3d63e9));_0x11ecd9(_0x3d63e9);})[_0x9ab5('0x13')](function(_0x252a86){logger[_0x9ab5('0xd')](_0x9ab5('0x1d'),_0x252a86['message'],_0x48720a);_0x3f963a(_0x15ddad[_0x9ab5('0xd')](0x1f4,_0x252a86[_0x9ab5('0x10')]));});});};
\ No newline at end of file
+var _0xfe6d=['lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','GetVtigerAccount','VtigerAccount','findAll','options','raw','limit','include','map','model','attributes','catch','ShowVtigerAccount','where'];(function(_0x1a173b,_0x5c9d8b){var _0x52270d=function(_0x4fdb50){while(--_0x4fdb50){_0x1a173b['push'](_0x1a173b['shift']());}};_0x52270d(++_0x5c9d8b);}(_0xfe6d,0xaf));var _0xdfe6=function(_0x1e8c4e,_0x4b6ba5){_0x1e8c4e=_0x1e8c4e-0x0;var _0x19088a=_0xfe6d[_0x1e8c4e];return _0x19088a;};'use strict';var _=require(_0xdfe6('0x0'));var util=require(_0xdfe6('0x1'));var moment=require('moment');var BPromise=require(_0xdfe6('0x2'));var rs=require(_0xdfe6('0x3'));var fs=require('fs');var Redis=require(_0xdfe6('0x4'));var db=require(_0xdfe6('0x5'))['db'];var utils=require(_0xdfe6('0x6'));var logger=require(_0xdfe6('0x7'))(_0xdfe6('0x8'));var config=require(_0xdfe6('0x9'));var jayson=require(_0xdfe6('0xa'));var client=jayson[_0xdfe6('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1fa70b,_0x4f5b73,_0x170673){return new BPromise(function(_0x2fb8f3,_0xd0dd38){return client[_0xdfe6('0xc')](_0x1fa70b,_0x170673)[_0xdfe6('0xd')](function(_0xabd304){logger[_0xdfe6('0xe')](_0xdfe6('0xf'),_0x4f5b73,_0xdfe6('0x10'));logger[_0xdfe6('0x11')]('VtigerAccount,\x20%s,\x20%s,\x20%s',_0x4f5b73,_0xdfe6('0x10'),JSON[_0xdfe6('0x12')](_0xabd304));if(_0xabd304[_0xdfe6('0x13')]){if(_0xabd304[_0xdfe6('0x13')][_0xdfe6('0x14')]===0x1f4){logger['error'](_0xdfe6('0xf'),_0x4f5b73,_0xabd304[_0xdfe6('0x13')][_0xdfe6('0x15')]);return _0xd0dd38(_0xabd304[_0xdfe6('0x13')][_0xdfe6('0x15')]);}logger[_0xdfe6('0x13')](_0xdfe6('0xf'),_0x4f5b73,_0xabd304[_0xdfe6('0x13')][_0xdfe6('0x15')]);return _0x2fb8f3(_0xabd304['error'][_0xdfe6('0x15')]);}else{logger[_0xdfe6('0xe')](_0xdfe6('0xf'),_0x4f5b73,_0xdfe6('0x10'));_0x2fb8f3(_0xabd304['result'][_0xdfe6('0x15')]);}})['catch'](function(_0x2c0f11){logger['error'](_0xdfe6('0xf'),_0x4f5b73,_0x2c0f11);_0xd0dd38(_0x2c0f11);});});}exports[_0xdfe6('0x16')]=function(_0x3ea6a6){var _0xa81437=this;return new Promise(function(_0x3804c6,_0x2a86ae){return db[_0xdfe6('0x17')][_0xdfe6('0x18')]({'raw':_0x3ea6a6[_0xdfe6('0x19')]?_0x3ea6a6[_0xdfe6('0x19')][_0xdfe6('0x1a')]===undefined?!![]:![]:!![],'where':_0x3ea6a6[_0xdfe6('0x19')]?_0x3ea6a6[_0xdfe6('0x19')]['where']||null:null,'attributes':_0x3ea6a6[_0xdfe6('0x19')]?_0x3ea6a6['options']['attributes']||null:null,'limit':_0x3ea6a6[_0xdfe6('0x19')]?_0x3ea6a6[_0xdfe6('0x19')][_0xdfe6('0x1b')]||null:null,'include':_0x3ea6a6[_0xdfe6('0x19')]?_0x3ea6a6['options'][_0xdfe6('0x1c')]?_[_0xdfe6('0x1d')](_0x3ea6a6['options'][_0xdfe6('0x1c')],function(_0x10cd05){return{'model':db[_0x10cd05[_0xdfe6('0x1e')]],'as':_0x10cd05['as'],'attributes':_0x10cd05['attributes'],'include':_0x10cd05['include']?_[_0xdfe6('0x1d')](_0x10cd05['include'],function(_0x46d86c){return{'model':db[_0x46d86c['model']],'as':_0x46d86c['as'],'attributes':_0x46d86c[_0xdfe6('0x1f')],'include':_0x46d86c[_0xdfe6('0x1c')]?_[_0xdfe6('0x1d')](_0x46d86c['include'],function(_0x1d4ae5){return{'model':db[_0x1d4ae5[_0xdfe6('0x1e')]],'as':_0x1d4ae5['as'],'attributes':_0x1d4ae5['attributes']};}):[]};}):[]};}):[]:[]})[_0xdfe6('0xd')](function(_0x29559a){logger['info'](_0xdfe6('0x16'),_0x3ea6a6);logger[_0xdfe6('0x11')](_0xdfe6('0x16'),_0x3ea6a6,JSON[_0xdfe6('0x12')](_0x29559a));_0x3804c6(_0x29559a);})[_0xdfe6('0x20')](function(_0x633b5f){logger['error'](_0xdfe6('0x16'),_0x633b5f[_0xdfe6('0x15')],_0x3ea6a6);_0x2a86ae(_0xa81437[_0xdfe6('0x13')](0x1f4,_0x633b5f[_0xdfe6('0x15')]));});});};exports[_0xdfe6('0x21')]=function(_0x2b4776){var _0x5b7e18=this;return new Promise(function(_0x2f3b34,_0x528e85){return db['VtigerAccount']['find']({'raw':_0x2b4776[_0xdfe6('0x19')]?_0x2b4776[_0xdfe6('0x19')][_0xdfe6('0x1a')]===undefined?!![]:![]:!![],'where':_0x2b4776[_0xdfe6('0x19')]?_0x2b4776[_0xdfe6('0x19')][_0xdfe6('0x22')]||null:null,'attributes':_0x2b4776['options']?_0x2b4776[_0xdfe6('0x19')]['attributes']||null:null,'include':_0x2b4776[_0xdfe6('0x19')]?_0x2b4776[_0xdfe6('0x19')][_0xdfe6('0x1c')]?_['map'](_0x2b4776[_0xdfe6('0x19')][_0xdfe6('0x1c')],function(_0x45e78a){return{'model':db[_0x45e78a[_0xdfe6('0x1e')]],'as':_0x45e78a['as'],'attributes':_0x45e78a['attributes'],'include':_0x45e78a[_0xdfe6('0x1c')]?_[_0xdfe6('0x1d')](_0x45e78a[_0xdfe6('0x1c')],function(_0x2f5e6a){return{'model':db[_0x2f5e6a['model']],'as':_0x2f5e6a['as'],'attributes':_0x2f5e6a[_0xdfe6('0x1f')],'include':_0x2f5e6a[_0xdfe6('0x1c')]?_[_0xdfe6('0x1d')](_0x2f5e6a[_0xdfe6('0x1c')],function(_0x5ed225){return{'model':db[_0x5ed225[_0xdfe6('0x1e')]],'as':_0x5ed225['as'],'attributes':_0x5ed225['attributes']};}):[]};}):[]};}):[]:[]})[_0xdfe6('0xd')](function(_0x2f82fe){logger[_0xdfe6('0xe')](_0xdfe6('0x21'),_0x2b4776);logger[_0xdfe6('0x11')](_0xdfe6('0x21'),_0x2b4776,JSON[_0xdfe6('0x12')](_0x2f82fe));_0x2f3b34(_0x2f82fe);})['catch'](function(_0x401707){logger[_0xdfe6('0x13')](_0xdfe6('0x21'),_0x401707['message'],_0x2b4776);_0x528e85(_0x5b7e18['error'](0x1f4,_0x401707[_0xdfe6('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/index.js b/server/api/intVtigerConfiguration/index.js
index e409775..02ac2bd 100644
--- a/server/api/intVtigerConfiguration/index.js
+++ b/server/api/intVtigerConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x757a=['exports','util','path','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','get','isAuthenticated','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions'];(function(_0x4ed7,_0x14f3ba){var _0x584b32=function(_0x3203f4){while(--_0x3203f4){_0x4ed7['push'](_0x4ed7['shift']());}};_0x584b32(++_0x14f3ba);}(_0x757a,0xde));var _0xa757=function(_0x49b707,_0x422b80){_0x49b707=_0x49b707-0x0;var _0x16d7f4=_0x757a[_0x49b707];return _0x16d7f4;};'use strict';var multer=require('multer');var util=require(_0xa757('0x0'));var path=require(_0xa757('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0xa757('0x2'));var interaction=require(_0xa757('0x3'));var config=require(_0xa757('0x4'));var controller=require(_0xa757('0x5'));router[_0xa757('0x6')]('/',auth[_0xa757('0x7')](),controller['index']);router[_0xa757('0x6')](_0xa757('0x8'),auth['isAuthenticated'](),controller[_0xa757('0x9')]);router[_0xa757('0x6')](_0xa757('0xa'),auth[_0xa757('0x7')](),controller[_0xa757('0xb')]);router['get'](_0xa757('0xc'),auth[_0xa757('0x7')](),controller[_0xa757('0xd')]);router[_0xa757('0x6')](_0xa757('0xe'),auth[_0xa757('0x7')](),controller[_0xa757('0xf')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router['put']('/:id',auth[_0xa757('0x7')](),controller['update']);router['delete'](_0xa757('0x8'),auth['isAuthenticated'](),controller['destroy']);module[_0xa757('0x10')]=router;
\ No newline at end of file
+var _0xe706=['update','delete','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','create','put'];(function(_0x3de01a,_0xcc1fd4){var _0x43f31e=function(_0xf8e692){while(--_0xf8e692){_0x3de01a['push'](_0x3de01a['shift']());}};_0x43f31e(++_0xcc1fd4);}(_0xe706,0xa3));var _0x6e70=function(_0xafcda6,_0x2817b9){_0xafcda6=_0xafcda6-0x0;var _0x2f00c5=_0xe706[_0xafcda6];return _0x2f00c5;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var auth=require(_0x6e70('0x5'));var interaction=require(_0x6e70('0x6'));var config=require(_0x6e70('0x7'));var controller=require(_0x6e70('0x8'));router[_0x6e70('0x9')]('/',auth[_0x6e70('0xa')](),controller[_0x6e70('0xb')]);router[_0x6e70('0x9')](_0x6e70('0xc'),auth[_0x6e70('0xa')](),controller[_0x6e70('0xd')]);router[_0x6e70('0x9')](_0x6e70('0xe'),auth[_0x6e70('0xa')](),controller[_0x6e70('0xf')]);router[_0x6e70('0x9')](_0x6e70('0x10'),auth[_0x6e70('0xa')](),controller[_0x6e70('0x11')]);router[_0x6e70('0x9')](_0x6e70('0x12'),auth[_0x6e70('0xa')](),controller['getDescriptions']);router['post']('/',auth[_0x6e70('0xa')](),controller[_0x6e70('0x13')]);router[_0x6e70('0x14')](_0x6e70('0xc'),auth[_0x6e70('0xa')](),controller[_0x6e70('0x15')]);router[_0x6e70('0x16')](_0x6e70('0xc'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js
index 7099647..baff8a3 100644
--- a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js
+++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0af7=['sequelize','exports','STRING'];(function(_0x376726,_0x455725){var _0x5c0021=function(_0xd9ed66){while(--_0xd9ed66){_0x376726['push'](_0x376726['shift']());}};_0x5c0021(++_0x455725);}(_0x0af7,0xf3));var _0x70af=function(_0x39577f,_0xdee635){_0x39577f=_0x39577f-0x0;var _0x40f18d=_0x0af7[_0x39577f];return _0x40f18d;};'use strict';var Sequelize=require(_0x70af('0x0'));module[_0x70af('0x1')]={'name':{'type':Sequelize[_0x70af('0x2')]},'description':{'type':Sequelize[_0x70af('0x2')]}};
\ No newline at end of file
+var _0x9917=['STRING','sequelize','exports'];(function(_0x285f24,_0x196d6b){var _0x430d15=function(_0x5ea2cc){while(--_0x5ea2cc){_0x285f24['push'](_0x285f24['shift']());}};_0x430d15(++_0x196d6b);}(_0x9917,0x175));var _0x7991=function(_0x54f2a2,_0x592ad5){_0x54f2a2=_0x54f2a2-0x0;var _0x312d73=_0x9917[_0x54f2a2];return _0x312d73;};'use strict';var Sequelize=require(_0x7991('0x0'));module[_0x7991('0x1')]={'name':{'type':Sequelize[_0x7991('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js
index 8658ae7..7c930f1 100644
--- a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js
+++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x511f=['fields','length','hasOwnProperty','nolimit','order','sort','where','key','VIRTUAL','field','filter','merge','options','VtigerConfiguration','findAll','rows','show','params','includeAll','include','find','create','body','destroy','getFields','VtigerField','pick','getSubjects','map','getDescriptions','findOne','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/utils','../../mysqldb','jayson/promise','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','VtigerConfiguration,\x20%s,\x20%s','VtigerConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','status','end','json','count','offset','limit','Content-Range','apply','reject','save','stack','name','rawAttributes','model','keys','query','filters','intersection','attributes'];(function(_0x4776ba,_0x250658){var _0x354c17=function(_0x42b420){while(--_0x42b420){_0x4776ba['push'](_0x4776ba['shift']());}};_0x354c17(++_0x250658);}(_0x511f,0xd3));var _0xf511=function(_0x2679b8,_0x32a49f){_0x2679b8=_0x2679b8-0x0;var _0x510599=_0x511f[_0x2679b8];return _0x510599;};'use strict';var pdf=require(_0xf511('0x0'));var emlformat=require(_0xf511('0x1'));var rimraf=require(_0xf511('0x2'));var zipdir=require(_0xf511('0x3'));var jsonpatch=require(_0xf511('0x4'));var rp=require(_0xf511('0x5'));var moment=require(_0xf511('0x6'));var BPromise=require(_0xf511('0x7'));var Mustache=require('mustache');var util=require(_0xf511('0x8'));var path=require(_0xf511('0x9'));var sox=require(_0xf511('0xa'));var csv=require(_0xf511('0xb'));var ejs=require(_0xf511('0xc'));var fs=require('fs');var _=require(_0xf511('0xd'));var squel=require(_0xf511('0xe'));var crypto=require(_0xf511('0xf'));var jsforce=require(_0xf511('0x10'));var deskjs=require(_0xf511('0x11'));var toCsv=require(_0xf511('0xb'));var querystring=require('querystring');var Papa=require(_0xf511('0x12'));var Redis=require(_0xf511('0x13'));var authService=require(_0xf511('0x14'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xf511('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0xf511('0x16'));var config=require('../../config/environment');var db=require(_0xf511('0x17'))['db'];var jayson=require(_0xf511('0x18'));var client=jayson['client'][_0xf511('0x19')]({'port':0x232a});function checkPasswordPattern(_0x1aa43f,_0x478bb6,_0x3d36b3){if(_0x3d36b3){var _0x13752b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x13752b[_0xf511('0x1a')](_0x478bb6)){return _0x1aa43f;}else{throw new Error(_0xf511('0x1b'));}}else{return _0x1aa43f;}}function respondWithRpcPromise(_0x34ab8a,_0xff6f73,_0x1bbc5e,_0x59280e){return new BPromise(function(_0x2f8368,_0x26f0e9){var _0xa6a6e3=_0x59280e||client;return _0xa6a6e3[_0xf511('0x1c')](_0x34ab8a,_0x1bbc5e)[_0xf511('0x1d')](function(_0x29e4b0){logger[_0xf511('0x1e')](_0xf511('0x1f'),_0xff6f73,'request\x20sent');logger['debug'](_0xf511('0x20'),_0xff6f73,_0xf511('0x21'),JSON[_0xf511('0x22')](_0x29e4b0));if(_0x29e4b0[_0xf511('0x23')]){if(_0x29e4b0[_0xf511('0x23')][_0xf511('0x24')]===0x1f4){logger[_0xf511('0x23')]('VtigerConfiguration,\x20%s,\x20%s',_0xff6f73,_0x29e4b0[_0xf511('0x23')][_0xf511('0x25')]);return _0x26f0e9(_0x29e4b0[_0xf511('0x23')][_0xf511('0x25')]);}logger[_0xf511('0x23')]('VtigerConfiguration,\x20%s,\x20%s',_0xff6f73,_0x29e4b0[_0xf511('0x23')][_0xf511('0x25')]);return _0x2f8368(_0x29e4b0[_0xf511('0x23')][_0xf511('0x25')]);}else{logger[_0xf511('0x1e')](_0xf511('0x1f'),_0xff6f73,_0xf511('0x21'));_0x2f8368(_0x29e4b0[_0xf511('0x26')][_0xf511('0x25')]);}})[_0xf511('0x27')](function(_0x12f66c){logger[_0xf511('0x23')](_0xf511('0x1f'),_0xff6f73,_0x12f66c);_0x26f0e9(_0x12f66c);});});}function respondWithStatusCode(_0x53dcef,_0x54db56){_0x54db56=_0x54db56||0xcc;return function(_0x5b84b6){if(_0x5b84b6){return _0x53dcef['sendStatus'](_0x54db56);}return _0x53dcef[_0xf511('0x28')](_0x54db56)[_0xf511('0x29')]();};}function respondWithResult(_0x521789,_0x49f9e7){_0x49f9e7=_0x49f9e7||0xc8;return function(_0x20ec94){if(_0x20ec94){return _0x521789['status'](_0x49f9e7)[_0xf511('0x2a')](_0x20ec94);}};}function respondWithFilteredResult(_0x3f87db,_0x372ec0){return function(_0x3fa9ab){if(_0x3fa9ab){var _0xae3a93=_0x3fa9ab[_0xf511('0x2b')],_0x4a2840=_0x372ec0[_0xf511('0x2c')],_0x105936=_0x372ec0['offset']+_0x372ec0[_0xf511('0x2d')],_0x351d58;if(_0x105936>=_0xae3a93){_0x105936=_0xae3a93;_0x351d58=0xc8;}else{_0x351d58=0xce;}_0x3f87db['status'](_0x351d58);return _0x3f87db['set'](_0xf511('0x2e'),_0x4a2840+'-'+_0x105936+'/'+_0xae3a93)[_0xf511('0x2a')](_0x3fa9ab);}return null;};}function patchUpdates(_0x1732ff){return function(_0xffe623){try{jsonpatch[_0xf511('0x2f')](_0xffe623,_0x1732ff,!![]);}catch(_0xeac602){return BPromise[_0xf511('0x30')](_0xeac602);}return _0xffe623[_0xf511('0x31')]();};}function saveUpdates(_0x1abef3,_0x3b403d){return function(_0x9b0a41){if(_0x9b0a41){return _0x9b0a41['update'](_0x1abef3)[_0xf511('0x1d')](function(_0x52c70d){return _0x52c70d;});}return null;};}function removeEntity(_0x17e0ad,_0x1814be){return function(_0x4f36cb){if(_0x4f36cb){return _0x4f36cb['destroy']()['then'](function(){_0x17e0ad['status'](0xcc)[_0xf511('0x29')]();});}};}function handleEntityNotFound(_0x1f4d2a,_0xb100a1){return function(_0x3e5c70){if(!_0x3e5c70){_0x1f4d2a['sendStatus'](0x194);}return _0x3e5c70;};}function handleError(_0x435564,_0x4532f4){_0x4532f4=_0x4532f4||0x1f4;return function(_0x37a759){logger[_0xf511('0x23')](_0x37a759[_0xf511('0x32')]);if(_0x37a759[_0xf511('0x33')]){delete _0x37a759[_0xf511('0x33')];}_0x435564['status'](_0x4532f4)['send'](_0x37a759);};}exports['index']=function(_0x2d8bd4,_0x456796){var _0x92bc2={},_0x38b46c={},_0x3d9b86={'count':0x0,'rows':[]};var _0x21d2e7=db['VtigerConfiguration'][_0xf511('0x34')];_0x38b46c[_0xf511('0x35')]=_[_0xf511('0x36')](_0x21d2e7);_0x38b46c[_0xf511('0x37')]=_['keys'](_0x2d8bd4[_0xf511('0x37')]);_0x38b46c[_0xf511('0x38')]=_[_0xf511('0x39')](_0x38b46c[_0xf511('0x35')],_0x38b46c[_0xf511('0x37')]);_0x92bc2[_0xf511('0x3a')]=_[_0xf511('0x39')](_0x38b46c[_0xf511('0x35')],qs['fields'](_0x2d8bd4[_0xf511('0x37')][_0xf511('0x3b')]));_0x92bc2[_0xf511('0x3a')]=_0x92bc2[_0xf511('0x3a')][_0xf511('0x3c')]?_0x92bc2[_0xf511('0x3a')]:_0x38b46c['model'];if(!_0x2d8bd4[_0xf511('0x37')][_0xf511('0x3d')](_0xf511('0x3e'))){_0x92bc2[_0xf511('0x2d')]=qs[_0xf511('0x2d')](_0x2d8bd4[_0xf511('0x37')][_0xf511('0x2d')]);_0x92bc2[_0xf511('0x2c')]=qs[_0xf511('0x2c')](_0x2d8bd4[_0xf511('0x37')][_0xf511('0x2c')]);}_0x92bc2[_0xf511('0x3f')]=qs[_0xf511('0x40')](_0x2d8bd4['query']['sort']);_0x92bc2[_0xf511('0x41')]=qs[_0xf511('0x38')](_['pick'](_0x2d8bd4[_0xf511('0x37')],_0x38b46c[_0xf511('0x38')]));if(_0x2d8bd4['query']['filter']){_0x92bc2[_0xf511('0x41')]=_['merge'](_0x92bc2[_0xf511('0x41')],{'$or':_['map'](_0x21d2e7,function(_0x305a1a){if(_0x305a1a['type'][_0xf511('0x42')]!==_0xf511('0x43')){var _0x32ab6f={};_0x32ab6f[_0x305a1a[_0xf511('0x44')]]={'$like':'%'+_0x2d8bd4[_0xf511('0x37')][_0xf511('0x45')]+'%'};return _0x32ab6f;}})});}_0x92bc2=_[_0xf511('0x46')]({},_0x92bc2,_0x2d8bd4[_0xf511('0x47')]);var _0x1ebd84={'where':_0x92bc2['where']};return db[_0xf511('0x48')]['count'](_0x1ebd84)[_0xf511('0x1d')](function(_0x4b57e8){_0x3d9b86[_0xf511('0x2b')]=_0x4b57e8;if(_0x2d8bd4['query']['includeAll']){_0x92bc2['include']=[{'all':!![]}];}return db[_0xf511('0x48')][_0xf511('0x49')](_0x92bc2);})[_0xf511('0x1d')](function(_0x4d0148){_0x3d9b86[_0xf511('0x4a')]=_0x4d0148;return _0x3d9b86;})[_0xf511('0x1d')](respondWithFilteredResult(_0x456796,_0x92bc2))[_0xf511('0x27')](handleError(_0x456796,null));};exports[_0xf511('0x4b')]=function(_0x2c30d9,_0x1cb985){var _0x587fcc={'raw':![],'where':{'id':_0x2c30d9[_0xf511('0x4c')]['id']}},_0x229d2f={};_0x229d2f[_0xf511('0x35')]=_['keys'](db['VtigerConfiguration'][_0xf511('0x34')]);_0x229d2f[_0xf511('0x37')]=_[_0xf511('0x36')](_0x2c30d9[_0xf511('0x37')]);_0x229d2f[_0xf511('0x38')]=_['intersection'](_0x229d2f[_0xf511('0x35')],_0x229d2f['query']);_0x587fcc[_0xf511('0x3a')]=_[_0xf511('0x39')](_0x229d2f[_0xf511('0x35')],qs[_0xf511('0x3b')](_0x2c30d9[_0xf511('0x37')][_0xf511('0x3b')]));_0x587fcc['attributes']=_0x587fcc['attributes'][_0xf511('0x3c')]?_0x587fcc[_0xf511('0x3a')]:_0x229d2f[_0xf511('0x35')];if(_0x2c30d9['query'][_0xf511('0x4d')]){_0x587fcc[_0xf511('0x4e')]=[{'all':!![]}];}_0x587fcc=_[_0xf511('0x46')]({},_0x587fcc,_0x2c30d9[_0xf511('0x47')]);return db[_0xf511('0x48')][_0xf511('0x4f')](_0x587fcc)[_0xf511('0x1d')](handleEntityNotFound(_0x1cb985,null))[_0xf511('0x1d')](respondWithResult(_0x1cb985,null))['catch'](handleError(_0x1cb985,null));};exports[_0xf511('0x50')]=function(_0x3cfdd8,_0x2f2df0){return db[_0xf511('0x48')][_0xf511('0x50')](_0x3cfdd8['body'],{})[_0xf511('0x1d')](respondWithResult(_0x2f2df0,0xc9))[_0xf511('0x27')](handleError(_0x2f2df0,null));};exports['update']=function(_0x445a8b,_0x36cf78){if(_0x445a8b[_0xf511('0x51')]['id']){delete _0x445a8b[_0xf511('0x51')]['id'];}return db[_0xf511('0x48')][_0xf511('0x4f')]({'where':{'id':_0x445a8b[_0xf511('0x4c')]['id']}})[_0xf511('0x1d')](handleEntityNotFound(_0x36cf78,null))[_0xf511('0x1d')](saveUpdates(_0x445a8b[_0xf511('0x51')],null))[_0xf511('0x1d')](respondWithResult(_0x36cf78,null))['catch'](handleError(_0x36cf78,null));};exports[_0xf511('0x52')]=function(_0x38a616,_0x5391f8){return db[_0xf511('0x48')][_0xf511('0x4f')]({'where':{'id':_0x38a616[_0xf511('0x4c')]['id']}})[_0xf511('0x1d')](handleEntityNotFound(_0x5391f8,null))[_0xf511('0x1d')](removeEntity(_0x5391f8,null))[_0xf511('0x27')](handleError(_0x5391f8,null));};exports[_0xf511('0x53')]=function(_0x28b61a,_0x26e175,_0x1d3a0a){var _0x3b5016={};var _0x2f14be={};var _0x1466ae;var _0x3a95ec;return db[_0xf511('0x48')]['findOne']({'where':{'id':_0x28b61a[_0xf511('0x4c')]['id']}})[_0xf511('0x1d')](handleEntityNotFound(_0x26e175,null))[_0xf511('0x1d')](function(_0x9a79a2){if(_0x9a79a2){_0x1466ae=_0x9a79a2;_0x2f14be[_0xf511('0x35')]=_['keys'](db[_0xf511('0x54')][_0xf511('0x34')]);_0x2f14be[_0xf511('0x37')]=_[_0xf511('0x36')](_0x28b61a[_0xf511('0x37')]);_0x2f14be['filters']=_[_0xf511('0x39')](_0x2f14be['model'],_0x2f14be[_0xf511('0x37')]);_0x3b5016['attributes']=_['intersection'](_0x2f14be['model'],qs['fields'](_0x28b61a[_0xf511('0x37')][_0xf511('0x3b')]));_0x3b5016['attributes']=_0x3b5016[_0xf511('0x3a')][_0xf511('0x3c')]?_0x3b5016[_0xf511('0x3a')]:_0x2f14be[_0xf511('0x35')];_0x3b5016[_0xf511('0x3f')]=qs[_0xf511('0x40')](_0x28b61a[_0xf511('0x37')][_0xf511('0x40')]);_0x3b5016[_0xf511('0x41')]=qs[_0xf511('0x38')](_[_0xf511('0x55')](_0x28b61a[_0xf511('0x37')],_0x2f14be[_0xf511('0x38')]));if(_0x28b61a[_0xf511('0x37')]['filter']){_0x3b5016[_0xf511('0x41')]=_[_0xf511('0x46')](_0x3b5016[_0xf511('0x41')],{'$or':_['map'](_0x3b5016[_0xf511('0x3a')],function(_0x294a3a){var _0x4f84f4={};_0x4f84f4[_0x294a3a]={'$like':'%'+_0x28b61a[_0xf511('0x37')][_0xf511('0x45')]+'%'};return _0x4f84f4;})});}_0x3b5016=_[_0xf511('0x46')]({},_0x3b5016,_0x28b61a[_0xf511('0x47')]);return _0x1466ae[_0xf511('0x53')](_0x3b5016);}})[_0xf511('0x1d')](function(_0x48d0dd){if(_0x48d0dd){_0x3a95ec=_0x48d0dd[_0xf511('0x3c')];if(!_0x28b61a[_0xf511('0x37')][_0xf511('0x3d')](_0xf511('0x3e'))){_0x3b5016[_0xf511('0x2d')]=qs[_0xf511('0x2d')](_0x28b61a[_0xf511('0x37')][_0xf511('0x2d')]);_0x3b5016[_0xf511('0x2c')]=qs[_0xf511('0x2c')](_0x28b61a['query'][_0xf511('0x2c')]);}return _0x1466ae[_0xf511('0x53')](_0x3b5016);}})[_0xf511('0x1d')](function(_0x522d44){if(_0x522d44){return _0x522d44?{'count':_0x3a95ec,'rows':_0x522d44}:null;}})[_0xf511('0x1d')](respondWithResult(_0x26e175,null))[_0xf511('0x27')](handleError(_0x26e175,null));};exports[_0xf511('0x56')]=function(_0x52fd22,_0x557e7d,_0x2c40f9){var _0x476238={};var _0x245f62={};var _0x4f8766;var _0x21bbdc;return db['VtigerConfiguration']['findOne']({'where':{'id':_0x52fd22[_0xf511('0x4c')]['id']}})[_0xf511('0x1d')](handleEntityNotFound(_0x557e7d,null))['then'](function(_0x37f36d){if(_0x37f36d){_0x4f8766=_0x37f36d;_0x245f62['model']=_['keys'](db[_0xf511('0x54')][_0xf511('0x34')]);_0x245f62[_0xf511('0x37')]=_[_0xf511('0x36')](_0x52fd22[_0xf511('0x37')]);_0x245f62[_0xf511('0x38')]=_[_0xf511('0x39')](_0x245f62['model'],_0x245f62[_0xf511('0x37')]);_0x476238['attributes']=_[_0xf511('0x39')](_0x245f62[_0xf511('0x35')],qs[_0xf511('0x3b')](_0x52fd22[_0xf511('0x37')][_0xf511('0x3b')]));_0x476238[_0xf511('0x3a')]=_0x476238[_0xf511('0x3a')]['length']?_0x476238['attributes']:_0x245f62[_0xf511('0x35')];_0x476238[_0xf511('0x3f')]=qs[_0xf511('0x40')](_0x52fd22['query']['sort']);_0x476238[_0xf511('0x41')]=qs[_0xf511('0x38')](_[_0xf511('0x55')](_0x52fd22['query'],_0x245f62['filters']));if(_0x52fd22[_0xf511('0x37')][_0xf511('0x45')]){_0x476238[_0xf511('0x41')]=_[_0xf511('0x46')](_0x476238['where'],{'$or':_[_0xf511('0x57')](_0x476238[_0xf511('0x3a')],function(_0x25e693){var _0x5bfebb={};_0x5bfebb[_0x25e693]={'$like':'%'+_0x52fd22['query'][_0xf511('0x45')]+'%'};return _0x5bfebb;})});}_0x476238=_[_0xf511('0x46')]({},_0x476238,_0x52fd22[_0xf511('0x47')]);return _0x4f8766['getSubjects'](_0x476238);}})[_0xf511('0x1d')](function(_0x1447bd){if(_0x1447bd){_0x21bbdc=_0x1447bd[_0xf511('0x3c')];if(!_0x52fd22[_0xf511('0x37')][_0xf511('0x3d')](_0xf511('0x3e'))){_0x476238[_0xf511('0x2d')]=qs[_0xf511('0x2d')](_0x52fd22['query'][_0xf511('0x2d')]);_0x476238['offset']=qs[_0xf511('0x2c')](_0x52fd22[_0xf511('0x37')][_0xf511('0x2c')]);}return _0x4f8766['getSubjects'](_0x476238);}})[_0xf511('0x1d')](function(_0x1ceadb){if(_0x1ceadb){return _0x1ceadb?{'count':_0x21bbdc,'rows':_0x1ceadb}:null;}})['then'](respondWithResult(_0x557e7d,null))[_0xf511('0x27')](handleError(_0x557e7d,null));};exports[_0xf511('0x58')]=function(_0x3525cf,_0x49f859,_0x2d9389){var _0x47c845={};var _0x269562={};var _0x161488;var _0x87aa95;return db[_0xf511('0x48')][_0xf511('0x59')]({'where':{'id':_0x3525cf[_0xf511('0x4c')]['id']}})[_0xf511('0x1d')](handleEntityNotFound(_0x49f859,null))[_0xf511('0x1d')](function(_0x4f4c4e){if(_0x4f4c4e){_0x161488=_0x4f4c4e;_0x269562['model']=_['keys'](db['VtigerField'][_0xf511('0x34')]);_0x269562[_0xf511('0x37')]=_[_0xf511('0x36')](_0x3525cf[_0xf511('0x37')]);_0x269562['filters']=_[_0xf511('0x39')](_0x269562['model'],_0x269562[_0xf511('0x37')]);_0x47c845[_0xf511('0x3a')]=_[_0xf511('0x39')](_0x269562['model'],qs['fields'](_0x3525cf[_0xf511('0x37')][_0xf511('0x3b')]));_0x47c845['attributes']=_0x47c845[_0xf511('0x3a')][_0xf511('0x3c')]?_0x47c845['attributes']:_0x269562[_0xf511('0x35')];_0x47c845[_0xf511('0x3f')]=qs[_0xf511('0x40')](_0x3525cf[_0xf511('0x37')][_0xf511('0x40')]);_0x47c845[_0xf511('0x41')]=qs['filters'](_[_0xf511('0x55')](_0x3525cf[_0xf511('0x37')],_0x269562[_0xf511('0x38')]));if(_0x3525cf[_0xf511('0x37')][_0xf511('0x45')]){_0x47c845[_0xf511('0x41')]=_[_0xf511('0x46')](_0x47c845['where'],{'$or':_[_0xf511('0x57')](_0x47c845[_0xf511('0x3a')],function(_0x35b1c7){var _0x76b0bb={};_0x76b0bb[_0x35b1c7]={'$like':'%'+_0x3525cf[_0xf511('0x37')][_0xf511('0x45')]+'%'};return _0x76b0bb;})});}_0x47c845=_['merge']({},_0x47c845,_0x3525cf['options']);return _0x161488['getDescriptions'](_0x47c845);}})[_0xf511('0x1d')](function(_0x16e01c){if(_0x16e01c){_0x87aa95=_0x16e01c[_0xf511('0x3c')];if(!_0x3525cf['query'][_0xf511('0x3d')]('nolimit')){_0x47c845[_0xf511('0x2d')]=qs[_0xf511('0x2d')](_0x3525cf[_0xf511('0x37')][_0xf511('0x2d')]);_0x47c845['offset']=qs[_0xf511('0x2c')](_0x3525cf[_0xf511('0x37')]['offset']);}return _0x161488['getDescriptions'](_0x47c845);}})[_0xf511('0x1d')](function(_0x5d6d38){if(_0x5d6d38){return _0x5d6d38?{'count':_0x87aa95,'rows':_0x5d6d38}:null;}})[_0xf511('0x1d')](respondWithResult(_0x49f859,null))['catch'](handleError(_0x49f859,null));};
\ No newline at end of file
+var _0x17e7=['field','options','includeAll','show','params','keys','include','find','create','body','getFields','findOne','VtigerField','map','pick','getSubjects','hasOwnProperty','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','jayson/promise','client','http','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','catch','sendStatus','status','end','json','count','offset','set','apply','reject','save','update','then','destroy','stack','name','send','index','VtigerConfiguration','rawAttributes','model','query','filters','intersection','fields','attributes','length','nolimit','limit','order','sort','where','filter','merge','type'];(function(_0x329a33,_0x585897){var _0x2bef80=function(_0x213b94){while(--_0x213b94){_0x329a33['push'](_0x329a33['shift']());}};_0x2bef80(++_0x585897);}(_0x17e7,0xc2));var _0x717e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0x17e7[_0x110c3d];return _0x226d67;};'use strict';var pdf=require(_0x717e('0x0'));var emlformat=require(_0x717e('0x1'));var rimraf=require(_0x717e('0x2'));var zipdir=require(_0x717e('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x717e('0x4'));var moment=require(_0x717e('0x5'));var BPromise=require(_0x717e('0x6'));var Mustache=require('mustache');var util=require(_0x717e('0x7'));var path=require(_0x717e('0x8'));var sox=require(_0x717e('0x9'));var csv=require(_0x717e('0xa'));var ejs=require(_0x717e('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x717e('0xc'));var jsforce=require(_0x717e('0xd'));var deskjs=require(_0x717e('0xe'));var toCsv=require(_0x717e('0xa'));var querystring=require('querystring');var Papa=require(_0x717e('0xf'));var Redis=require(_0x717e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x717e('0x11'));var hardwareService=require(_0x717e('0x12'));var logger=require(_0x717e('0x13'))(_0x717e('0x14'));var utils=require(_0x717e('0x15'));var config=require(_0x717e('0x16'));var db=require('../../mysqldb')['db'];var jayson=require(_0x717e('0x17'));var client=jayson[_0x717e('0x18')][_0x717e('0x19')]({'port':0x232a});function checkPasswordPattern(_0x385ff0,_0x511604,_0x1fe1c8){if(_0x1fe1c8){var _0x1d12c8=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1d12c8['test'](_0x511604)){return _0x385ff0;}else{throw new Error(_0x717e('0x1a'));}}else{return _0x385ff0;}}function respondWithRpcPromise(_0x11e034,_0x1aa8ba,_0x19f047,_0x6ffa2a){return new BPromise(function(_0x5e8453,_0x33e284){var _0x284a5d=_0x6ffa2a||client;return _0x284a5d['request'](_0x11e034,_0x19f047)['then'](function(_0x55d9f4){logger[_0x717e('0x1b')](_0x717e('0x1c'),_0x1aa8ba,_0x717e('0x1d'));logger['debug']('VtigerConfiguration,\x20%s,\x20%s,\x20%s',_0x1aa8ba,'request\x20sent',JSON[_0x717e('0x1e')](_0x55d9f4));if(_0x55d9f4['error']){if(_0x55d9f4['error'][_0x717e('0x1f')]===0x1f4){logger[_0x717e('0x20')](_0x717e('0x1c'),_0x1aa8ba,_0x55d9f4[_0x717e('0x20')][_0x717e('0x21')]);return _0x33e284(_0x55d9f4[_0x717e('0x20')][_0x717e('0x21')]);}logger[_0x717e('0x20')]('VtigerConfiguration,\x20%s,\x20%s',_0x1aa8ba,_0x55d9f4[_0x717e('0x20')][_0x717e('0x21')]);return _0x5e8453(_0x55d9f4[_0x717e('0x20')][_0x717e('0x21')]);}else{logger[_0x717e('0x1b')](_0x717e('0x1c'),_0x1aa8ba,_0x717e('0x1d'));_0x5e8453(_0x55d9f4[_0x717e('0x22')]['message']);}})[_0x717e('0x23')](function(_0x536ab8){logger[_0x717e('0x20')](_0x717e('0x1c'),_0x1aa8ba,_0x536ab8);_0x33e284(_0x536ab8);});});}function respondWithStatusCode(_0x4d3438,_0x30276c){_0x30276c=_0x30276c||0xcc;return function(_0xaf214d){if(_0xaf214d){return _0x4d3438[_0x717e('0x24')](_0x30276c);}return _0x4d3438[_0x717e('0x25')](_0x30276c)[_0x717e('0x26')]();};}function respondWithResult(_0x5567cb,_0x134763){_0x134763=_0x134763||0xc8;return function(_0x148a08){if(_0x148a08){return _0x5567cb[_0x717e('0x25')](_0x134763)[_0x717e('0x27')](_0x148a08);}};}function respondWithFilteredResult(_0x2558cb,_0x4515dd){return function(_0x395e06){if(_0x395e06){var _0x432965=_0x395e06[_0x717e('0x28')],_0x24c8c5=_0x4515dd[_0x717e('0x29')],_0x4faeb8=_0x4515dd['offset']+_0x4515dd['limit'],_0x4e3375;if(_0x4faeb8>=_0x432965){_0x4faeb8=_0x432965;_0x4e3375=0xc8;}else{_0x4e3375=0xce;}_0x2558cb['status'](_0x4e3375);return _0x2558cb[_0x717e('0x2a')]('Content-Range',_0x24c8c5+'-'+_0x4faeb8+'/'+_0x432965)[_0x717e('0x27')](_0x395e06);}return null;};}function patchUpdates(_0x29ab5b){return function(_0x5e167f){try{jsonpatch[_0x717e('0x2b')](_0x5e167f,_0x29ab5b,!![]);}catch(_0x779b1f){return BPromise[_0x717e('0x2c')](_0x779b1f);}return _0x5e167f[_0x717e('0x2d')]();};}function saveUpdates(_0x2ef1f8,_0xc38102){return function(_0x5961ff){if(_0x5961ff){return _0x5961ff[_0x717e('0x2e')](_0x2ef1f8)[_0x717e('0x2f')](function(_0x5f5f93){return _0x5f5f93;});}return null;};}function removeEntity(_0x1e7d35,_0x5a9549){return function(_0x57c3ad){if(_0x57c3ad){return _0x57c3ad[_0x717e('0x30')]()['then'](function(){_0x1e7d35['status'](0xcc)[_0x717e('0x26')]();});}};}function handleEntityNotFound(_0xd009a5,_0x4c3a2d){return function(_0x71e84c){if(!_0x71e84c){_0xd009a5[_0x717e('0x24')](0x194);}return _0x71e84c;};}function handleError(_0x361444,_0x99d584){_0x99d584=_0x99d584||0x1f4;return function(_0x1e357d){logger[_0x717e('0x20')](_0x1e357d[_0x717e('0x31')]);if(_0x1e357d['name']){delete _0x1e357d[_0x717e('0x32')];}_0x361444[_0x717e('0x25')](_0x99d584)[_0x717e('0x33')](_0x1e357d);};}exports[_0x717e('0x34')]=function(_0x110857,_0x35d009){var _0x424c6b={},_0x578171={},_0x50f02d={'count':0x0,'rows':[]};var _0xab83d3=db[_0x717e('0x35')][_0x717e('0x36')];_0x578171[_0x717e('0x37')]=_['keys'](_0xab83d3);_0x578171[_0x717e('0x38')]=_['keys'](_0x110857[_0x717e('0x38')]);_0x578171[_0x717e('0x39')]=_[_0x717e('0x3a')](_0x578171['model'],_0x578171['query']);_0x424c6b['attributes']=_[_0x717e('0x3a')](_0x578171['model'],qs[_0x717e('0x3b')](_0x110857[_0x717e('0x38')][_0x717e('0x3b')]));_0x424c6b[_0x717e('0x3c')]=_0x424c6b[_0x717e('0x3c')][_0x717e('0x3d')]?_0x424c6b[_0x717e('0x3c')]:_0x578171[_0x717e('0x37')];if(!_0x110857[_0x717e('0x38')]['hasOwnProperty'](_0x717e('0x3e'))){_0x424c6b[_0x717e('0x3f')]=qs['limit'](_0x110857['query']['limit']);_0x424c6b[_0x717e('0x29')]=qs[_0x717e('0x29')](_0x110857[_0x717e('0x38')]['offset']);}_0x424c6b[_0x717e('0x40')]=qs['sort'](_0x110857[_0x717e('0x38')][_0x717e('0x41')]);_0x424c6b[_0x717e('0x42')]=qs[_0x717e('0x39')](_['pick'](_0x110857[_0x717e('0x38')],_0x578171[_0x717e('0x39')]));if(_0x110857['query'][_0x717e('0x43')]){_0x424c6b[_0x717e('0x42')]=_[_0x717e('0x44')](_0x424c6b[_0x717e('0x42')],{'$or':_['map'](_0xab83d3,function(_0x4b9445){if(_0x4b9445[_0x717e('0x45')]['key']!=='VIRTUAL'){var _0x431abd={};_0x431abd[_0x4b9445[_0x717e('0x46')]]={'$like':'%'+_0x110857[_0x717e('0x38')][_0x717e('0x43')]+'%'};return _0x431abd;}})});}_0x424c6b=_[_0x717e('0x44')]({},_0x424c6b,_0x110857[_0x717e('0x47')]);var _0x538f55={'where':_0x424c6b['where']};return db[_0x717e('0x35')][_0x717e('0x28')](_0x538f55)['then'](function(_0x3f4a61){_0x50f02d['count']=_0x3f4a61;if(_0x110857[_0x717e('0x38')][_0x717e('0x48')]){_0x424c6b['include']=[{'all':!![]}];}return db[_0x717e('0x35')]['findAll'](_0x424c6b);})[_0x717e('0x2f')](function(_0x4971ca){_0x50f02d['rows']=_0x4971ca;return _0x50f02d;})[_0x717e('0x2f')](respondWithFilteredResult(_0x35d009,_0x424c6b))[_0x717e('0x23')](handleError(_0x35d009,null));};exports[_0x717e('0x49')]=function(_0x42e698,_0x519226){var _0x4f93b={'raw':![],'where':{'id':_0x42e698[_0x717e('0x4a')]['id']}},_0x5d6d3b={};_0x5d6d3b['model']=_['keys'](db[_0x717e('0x35')][_0x717e('0x36')]);_0x5d6d3b[_0x717e('0x38')]=_[_0x717e('0x4b')](_0x42e698[_0x717e('0x38')]);_0x5d6d3b['filters']=_[_0x717e('0x3a')](_0x5d6d3b[_0x717e('0x37')],_0x5d6d3b[_0x717e('0x38')]);_0x4f93b[_0x717e('0x3c')]=_[_0x717e('0x3a')](_0x5d6d3b[_0x717e('0x37')],qs[_0x717e('0x3b')](_0x42e698[_0x717e('0x38')][_0x717e('0x3b')]));_0x4f93b[_0x717e('0x3c')]=_0x4f93b['attributes'][_0x717e('0x3d')]?_0x4f93b[_0x717e('0x3c')]:_0x5d6d3b['model'];if(_0x42e698[_0x717e('0x38')][_0x717e('0x48')]){_0x4f93b[_0x717e('0x4c')]=[{'all':!![]}];}_0x4f93b=_[_0x717e('0x44')]({},_0x4f93b,_0x42e698['options']);return db[_0x717e('0x35')][_0x717e('0x4d')](_0x4f93b)[_0x717e('0x2f')](handleEntityNotFound(_0x519226,null))[_0x717e('0x2f')](respondWithResult(_0x519226,null))['catch'](handleError(_0x519226,null));};exports[_0x717e('0x4e')]=function(_0x3070a1,_0x433504){return db[_0x717e('0x35')]['create'](_0x3070a1[_0x717e('0x4f')],{})[_0x717e('0x2f')](respondWithResult(_0x433504,0xc9))[_0x717e('0x23')](handleError(_0x433504,null));};exports[_0x717e('0x2e')]=function(_0x4f15e5,_0x39d26b){if(_0x4f15e5[_0x717e('0x4f')]['id']){delete _0x4f15e5[_0x717e('0x4f')]['id'];}return db[_0x717e('0x35')]['find']({'where':{'id':_0x4f15e5[_0x717e('0x4a')]['id']}})[_0x717e('0x2f')](handleEntityNotFound(_0x39d26b,null))[_0x717e('0x2f')](saveUpdates(_0x4f15e5[_0x717e('0x4f')],null))[_0x717e('0x2f')](respondWithResult(_0x39d26b,null))[_0x717e('0x23')](handleError(_0x39d26b,null));};exports[_0x717e('0x30')]=function(_0x801dec,_0x1987a4){return db['VtigerConfiguration']['find']({'where':{'id':_0x801dec[_0x717e('0x4a')]['id']}})[_0x717e('0x2f')](handleEntityNotFound(_0x1987a4,null))['then'](removeEntity(_0x1987a4,null))[_0x717e('0x23')](handleError(_0x1987a4,null));};exports[_0x717e('0x50')]=function(_0x17964b,_0x3e1281,_0x370544){var _0x10de76={};var _0xf9f2e8={};var _0x57137d;var _0x37d4d1;return db[_0x717e('0x35')][_0x717e('0x51')]({'where':{'id':_0x17964b[_0x717e('0x4a')]['id']}})[_0x717e('0x2f')](handleEntityNotFound(_0x3e1281,null))[_0x717e('0x2f')](function(_0x1469f2){if(_0x1469f2){_0x57137d=_0x1469f2;_0xf9f2e8['model']=_[_0x717e('0x4b')](db[_0x717e('0x52')][_0x717e('0x36')]);_0xf9f2e8[_0x717e('0x38')]=_['keys'](_0x17964b[_0x717e('0x38')]);_0xf9f2e8[_0x717e('0x39')]=_[_0x717e('0x3a')](_0xf9f2e8[_0x717e('0x37')],_0xf9f2e8[_0x717e('0x38')]);_0x10de76[_0x717e('0x3c')]=_[_0x717e('0x3a')](_0xf9f2e8['model'],qs[_0x717e('0x3b')](_0x17964b['query'][_0x717e('0x3b')]));_0x10de76[_0x717e('0x3c')]=_0x10de76[_0x717e('0x3c')][_0x717e('0x3d')]?_0x10de76['attributes']:_0xf9f2e8[_0x717e('0x37')];_0x10de76['order']=qs[_0x717e('0x41')](_0x17964b[_0x717e('0x38')][_0x717e('0x41')]);_0x10de76['where']=qs[_0x717e('0x39')](_['pick'](_0x17964b[_0x717e('0x38')],_0xf9f2e8[_0x717e('0x39')]));if(_0x17964b[_0x717e('0x38')][_0x717e('0x43')]){_0x10de76[_0x717e('0x42')]=_[_0x717e('0x44')](_0x10de76[_0x717e('0x42')],{'$or':_[_0x717e('0x53')](_0x10de76[_0x717e('0x3c')],function(_0x206c3f){var _0x1425fc={};_0x1425fc[_0x206c3f]={'$like':'%'+_0x17964b[_0x717e('0x38')]['filter']+'%'};return _0x1425fc;})});}_0x10de76=_[_0x717e('0x44')]({},_0x10de76,_0x17964b[_0x717e('0x47')]);return _0x57137d[_0x717e('0x50')](_0x10de76);}})[_0x717e('0x2f')](function(_0x265db8){if(_0x265db8){_0x37d4d1=_0x265db8[_0x717e('0x3d')];if(!_0x17964b[_0x717e('0x38')]['hasOwnProperty'](_0x717e('0x3e'))){_0x10de76[_0x717e('0x3f')]=qs[_0x717e('0x3f')](_0x17964b[_0x717e('0x38')][_0x717e('0x3f')]);_0x10de76[_0x717e('0x29')]=qs['offset'](_0x17964b[_0x717e('0x38')]['offset']);}return _0x57137d[_0x717e('0x50')](_0x10de76);}})['then'](function(_0x581331){if(_0x581331){return _0x581331?{'count':_0x37d4d1,'rows':_0x581331}:null;}})[_0x717e('0x2f')](respondWithResult(_0x3e1281,null))['catch'](handleError(_0x3e1281,null));};exports['getSubjects']=function(_0x3b9e7e,_0x21db82,_0x7bfdb6){var _0x1a7fb5={};var _0x5c0f24={};var _0x611479;var _0x57400b;return db[_0x717e('0x35')][_0x717e('0x51')]({'where':{'id':_0x3b9e7e[_0x717e('0x4a')]['id']}})[_0x717e('0x2f')](handleEntityNotFound(_0x21db82,null))['then'](function(_0x1a3465){if(_0x1a3465){_0x611479=_0x1a3465;_0x5c0f24[_0x717e('0x37')]=_[_0x717e('0x4b')](db[_0x717e('0x52')][_0x717e('0x36')]);_0x5c0f24[_0x717e('0x38')]=_[_0x717e('0x4b')](_0x3b9e7e[_0x717e('0x38')]);_0x5c0f24['filters']=_[_0x717e('0x3a')](_0x5c0f24[_0x717e('0x37')],_0x5c0f24[_0x717e('0x38')]);_0x1a7fb5['attributes']=_[_0x717e('0x3a')](_0x5c0f24[_0x717e('0x37')],qs['fields'](_0x3b9e7e[_0x717e('0x38')][_0x717e('0x3b')]));_0x1a7fb5[_0x717e('0x3c')]=_0x1a7fb5[_0x717e('0x3c')]['length']?_0x1a7fb5[_0x717e('0x3c')]:_0x5c0f24[_0x717e('0x37')];_0x1a7fb5[_0x717e('0x40')]=qs['sort'](_0x3b9e7e[_0x717e('0x38')][_0x717e('0x41')]);_0x1a7fb5['where']=qs[_0x717e('0x39')](_[_0x717e('0x54')](_0x3b9e7e[_0x717e('0x38')],_0x5c0f24[_0x717e('0x39')]));if(_0x3b9e7e[_0x717e('0x38')][_0x717e('0x43')]){_0x1a7fb5[_0x717e('0x42')]=_[_0x717e('0x44')](_0x1a7fb5[_0x717e('0x42')],{'$or':_[_0x717e('0x53')](_0x1a7fb5[_0x717e('0x3c')],function(_0x72e8a7){var _0x39c222={};_0x39c222[_0x72e8a7]={'$like':'%'+_0x3b9e7e[_0x717e('0x38')][_0x717e('0x43')]+'%'};return _0x39c222;})});}_0x1a7fb5=_[_0x717e('0x44')]({},_0x1a7fb5,_0x3b9e7e['options']);return _0x611479[_0x717e('0x55')](_0x1a7fb5);}})['then'](function(_0x21f7b6){if(_0x21f7b6){_0x57400b=_0x21f7b6[_0x717e('0x3d')];if(!_0x3b9e7e[_0x717e('0x38')][_0x717e('0x56')](_0x717e('0x3e'))){_0x1a7fb5[_0x717e('0x3f')]=qs[_0x717e('0x3f')](_0x3b9e7e[_0x717e('0x38')][_0x717e('0x3f')]);_0x1a7fb5[_0x717e('0x29')]=qs[_0x717e('0x29')](_0x3b9e7e[_0x717e('0x38')]['offset']);}return _0x611479[_0x717e('0x55')](_0x1a7fb5);}})[_0x717e('0x2f')](function(_0x93b0d2){if(_0x93b0d2){return _0x93b0d2?{'count':_0x57400b,'rows':_0x93b0d2}:null;}})[_0x717e('0x2f')](respondWithResult(_0x21db82,null))['catch'](handleError(_0x21db82,null));};exports[_0x717e('0x57')]=function(_0x362144,_0x1b15da,_0x33db26){var _0x76e5cf={};var _0x2b105a={};var _0x5ef835;var _0x47d46b;return db[_0x717e('0x35')][_0x717e('0x51')]({'where':{'id':_0x362144['params']['id']}})[_0x717e('0x2f')](handleEntityNotFound(_0x1b15da,null))[_0x717e('0x2f')](function(_0x30d6ac){if(_0x30d6ac){_0x5ef835=_0x30d6ac;_0x2b105a[_0x717e('0x37')]=_['keys'](db[_0x717e('0x52')][_0x717e('0x36')]);_0x2b105a[_0x717e('0x38')]=_[_0x717e('0x4b')](_0x362144[_0x717e('0x38')]);_0x2b105a['filters']=_[_0x717e('0x3a')](_0x2b105a[_0x717e('0x37')],_0x2b105a[_0x717e('0x38')]);_0x76e5cf[_0x717e('0x3c')]=_[_0x717e('0x3a')](_0x2b105a['model'],qs['fields'](_0x362144[_0x717e('0x38')][_0x717e('0x3b')]));_0x76e5cf['attributes']=_0x76e5cf[_0x717e('0x3c')][_0x717e('0x3d')]?_0x76e5cf[_0x717e('0x3c')]:_0x2b105a[_0x717e('0x37')];_0x76e5cf['order']=qs[_0x717e('0x41')](_0x362144[_0x717e('0x38')]['sort']);_0x76e5cf[_0x717e('0x42')]=qs[_0x717e('0x39')](_[_0x717e('0x54')](_0x362144['query'],_0x2b105a['filters']));if(_0x362144[_0x717e('0x38')][_0x717e('0x43')]){_0x76e5cf[_0x717e('0x42')]=_[_0x717e('0x44')](_0x76e5cf[_0x717e('0x42')],{'$or':_[_0x717e('0x53')](_0x76e5cf['attributes'],function(_0x15afed){var _0x5a5a6f={};_0x5a5a6f[_0x15afed]={'$like':'%'+_0x362144['query']['filter']+'%'};return _0x5a5a6f;})});}_0x76e5cf=_[_0x717e('0x44')]({},_0x76e5cf,_0x362144[_0x717e('0x47')]);return _0x5ef835[_0x717e('0x57')](_0x76e5cf);}})['then'](function(_0x13cf7d){if(_0x13cf7d){_0x47d46b=_0x13cf7d['length'];if(!_0x362144['query'][_0x717e('0x56')]('nolimit')){_0x76e5cf[_0x717e('0x3f')]=qs['limit'](_0x362144[_0x717e('0x38')][_0x717e('0x3f')]);_0x76e5cf[_0x717e('0x29')]=qs['offset'](_0x362144['query'][_0x717e('0x29')]);}return _0x5ef835[_0x717e('0x57')](_0x76e5cf);}})[_0x717e('0x2f')](function(_0x8284d6){if(_0x8284d6){return _0x8284d6?{'count':_0x47d46b,'rows':_0x8284d6}:null;}})[_0x717e('0x2f')](respondWithResult(_0x1b15da,null))[_0x717e('0x23')](handleError(_0x1b15da,null));};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js
index 0a2332e..652b6e6 100644
--- a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js
+++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['../../config/environment','./intVtigerConfiguration.attributes','exports','define','VtigerConfiguration','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x5db7b8,_0x2a3767){var _0x22aabc=function(_0x44c0ec){while(--_0x44c0ec){_0x5db7b8['push'](_0x5db7b8['shift']());}};_0x22aabc(++_0x2a3767);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0xa9e0[_0x5783f4];return _0x28e380;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'int_vtiger_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa9e0=['../../config/environment','./intVtigerConfiguration.attributes','exports','define','VtigerConfiguration','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x1533d2,_0x486026){var _0x541f4a=function(_0x1dd0d5){while(--_0x1dd0d5){_0x1533d2['push'](_0x1533d2['shift']());}};_0x541f4a(++_0x486026);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xa9e0[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'int_vtiger_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js
index 9d6391c..201fec4 100644
--- a/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js
+++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcfb5=['then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request'];(function(_0x36067f,_0xba548e){var _0x44f0b3=function(_0x1954af){while(--_0x1954af){_0x36067f['push'](_0x36067f['shift']());}};_0x44f0b3(++_0xba548e);}(_0xcfb5,0x1a7));var _0x5cfb=function(_0x240167,_0x345cf4){_0x240167=_0x240167-0x0;var _0x2e9126=_0xcfb5[_0x240167];return _0x2e9126;};'use strict';var _=require(_0x5cfb('0x0'));var util=require(_0x5cfb('0x1'));var moment=require(_0x5cfb('0x2'));var BPromise=require(_0x5cfb('0x3'));var rs=require(_0x5cfb('0x4'));var fs=require('fs');var Redis=require(_0x5cfb('0x5'));var db=require(_0x5cfb('0x6'))['db'];var utils=require(_0x5cfb('0x7'));var logger=require(_0x5cfb('0x8'))(_0x5cfb('0x9'));var config=require(_0x5cfb('0xa'));var jayson=require(_0x5cfb('0xb'));var client=jayson['client'][_0x5cfb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x23ef8e,_0x57ff77,_0x5bc332){return new BPromise(function(_0x5e7267,_0x14ea17){return client[_0x5cfb('0xd')](_0x23ef8e,_0x5bc332)[_0x5cfb('0xe')](function(_0xa2e45b){logger[_0x5cfb('0xf')](_0x5cfb('0x10'),_0x57ff77,_0x5cfb('0x11'));logger['debug']('VtigerConfiguration,\x20%s,\x20%s,\x20%s',_0x57ff77,'request\x20sent',JSON[_0x5cfb('0x12')](_0xa2e45b));if(_0xa2e45b['error']){if(_0xa2e45b['error'][_0x5cfb('0x13')]===0x1f4){logger['error'](_0x5cfb('0x10'),_0x57ff77,_0xa2e45b[_0x5cfb('0x14')][_0x5cfb('0x15')]);return _0x14ea17(_0xa2e45b[_0x5cfb('0x14')]['message']);}logger['error']('VtigerConfiguration,\x20%s,\x20%s',_0x57ff77,_0xa2e45b[_0x5cfb('0x14')]['message']);return _0x5e7267(_0xa2e45b['error'][_0x5cfb('0x15')]);}else{logger[_0x5cfb('0xf')](_0x5cfb('0x10'),_0x57ff77,_0x5cfb('0x11'));_0x5e7267(_0xa2e45b['result'][_0x5cfb('0x15')]);}})[_0x5cfb('0x16')](function(_0x4691b0){logger[_0x5cfb('0x14')](_0x5cfb('0x10'),_0x57ff77,_0x4691b0);_0x14ea17(_0x4691b0);});});}
\ No newline at end of file
+var _0x55af=['client','http','request','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','VtigerConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','lodash','moment','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0x55af,0x90));var _0xf55a=function(_0x168f7d,_0x3d60f5){_0x168f7d=_0x168f7d-0x0;var _0x50051a=_0x55af[_0x168f7d];return _0x50051a;};'use strict';var _=require(_0xf55a('0x0'));var util=require('util');var moment=require(_0xf55a('0x1'));var BPromise=require(_0xf55a('0x2'));var rs=require(_0xf55a('0x3'));var fs=require('fs');var Redis=require(_0xf55a('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf55a('0x5'))('rpc');var config=require(_0xf55a('0x6'));var jayson=require(_0xf55a('0x7'));var client=jayson[_0xf55a('0x8')][_0xf55a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1ba954,_0x149e7d,_0x56b975){return new BPromise(function(_0x12dfbc,_0x4c2f95){return client[_0xf55a('0xa')](_0x1ba954,_0x56b975)['then'](function(_0x429c05){logger[_0xf55a('0xb')](_0xf55a('0xc'),_0x149e7d,_0xf55a('0xd'));logger['debug'](_0xf55a('0xe'),_0x149e7d,_0xf55a('0xd'),JSON['stringify'](_0x429c05));if(_0x429c05[_0xf55a('0xf')]){if(_0x429c05[_0xf55a('0xf')][_0xf55a('0x10')]===0x1f4){logger[_0xf55a('0xf')](_0xf55a('0xc'),_0x149e7d,_0x429c05[_0xf55a('0xf')][_0xf55a('0x11')]);return _0x4c2f95(_0x429c05['error'][_0xf55a('0x11')]);}logger[_0xf55a('0xf')](_0xf55a('0xc'),_0x149e7d,_0x429c05[_0xf55a('0xf')][_0xf55a('0x11')]);return _0x12dfbc(_0x429c05[_0xf55a('0xf')][_0xf55a('0x11')]);}else{logger['info'](_0xf55a('0xc'),_0x149e7d,_0xf55a('0xd'));_0x12dfbc(_0x429c05[_0xf55a('0x12')][_0xf55a('0x11')]);}})['catch'](function(_0xcc0952){logger[_0xf55a('0xf')](_0xf55a('0xc'),_0x149e7d,_0xcc0952);_0x4c2f95(_0xcc0952);});});}
\ No newline at end of file
diff --git a/server/api/intVtigerField/index.js b/server/api/intVtigerField/index.js
index e525110..1c99b82 100644
--- a/server/api/intVtigerField/index.js
+++ b/server/api/intVtigerField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5aca=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerField.controller','get','isAuthenticated','index','/:id','post','create','put','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0xfdb502,_0x6c2440){var _0x53f749=function(_0x170974){while(--_0x170974){_0xfdb502['push'](_0xfdb502['shift']());}};_0x53f749(++_0x6c2440);}(_0x5aca,0x1d7));var _0xa5ac=function(_0x45690f,_0x3068fa){_0x45690f=_0x45690f-0x0;var _0x4dba98=_0x5aca[_0x45690f];return _0x4dba98;};'use strict';var multer=require(_0xa5ac('0x0'));var util=require(_0xa5ac('0x1'));var path=require(_0xa5ac('0x2'));var timeout=require(_0xa5ac('0x3'));var express=require('express');var router=express[_0xa5ac('0x4')]();var auth=require(_0xa5ac('0x5'));var interaction=require(_0xa5ac('0x6'));var config=require(_0xa5ac('0x7'));var controller=require(_0xa5ac('0x8'));router[_0xa5ac('0x9')]('/',auth[_0xa5ac('0xa')](),controller[_0xa5ac('0xb')]);router[_0xa5ac('0x9')](_0xa5ac('0xc'),auth[_0xa5ac('0xa')](),controller['show']);router[_0xa5ac('0xd')]('/',auth[_0xa5ac('0xa')](),controller[_0xa5ac('0xe')]);router[_0xa5ac('0xf')](_0xa5ac('0xc'),auth['isAuthenticated'](),controller['update']);router[_0xa5ac('0x10')](_0xa5ac('0xc'),auth['isAuthenticated'](),controller[_0xa5ac('0x11')]);module[_0xa5ac('0x12')]=router;
\ No newline at end of file
+var _0xdf20=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','show','put','isAuthenticated','delete','destroy','exports','path','connect-timeout'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xdf20,0x1de));var _0x0df2=function(_0x2784a4,_0x339f82){_0x2784a4=_0x2784a4-0x0;var _0x41f380=_0xdf20[_0x2784a4];return _0x41f380;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x0df2('0x0'));var timeout=require(_0x0df2('0x1'));var express=require(_0x0df2('0x2'));var router=express[_0x0df2('0x3')]();var auth=require(_0x0df2('0x4'));var interaction=require(_0x0df2('0x5'));var config=require(_0x0df2('0x6'));var controller=require('./intVtigerField.controller');router[_0x0df2('0x7')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x0df2('0x8'),auth['isAuthenticated'](),controller[_0x0df2('0x9')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x0df2('0xa')](_0x0df2('0x8'),auth[_0x0df2('0xb')](),controller['update']);router[_0x0df2('0xc')](_0x0df2('0x8'),auth[_0x0df2('0xb')](),controller[_0x0df2('0xd')]);module[_0x0df2('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.attributes.js b/server/api/intVtigerField/intVtigerField.attributes.js
index aaa82db..e0fe21b 100644
--- a/server/api/intVtigerField/intVtigerField.attributes.js
+++ b/server/api/intVtigerField/intVtigerField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa571=['exports','ENUM','string','customVariable','keyValue','STRING','variable','sequelize'];(function(_0x55d44c,_0x326e69){var _0x359dec=function(_0x3c94ec){while(--_0x3c94ec){_0x55d44c['push'](_0x55d44c['shift']());}};_0x359dec(++_0x326e69);}(_0xa571,0x107));var _0x1a57=function(_0x1c6519,_0x4f6384){_0x1c6519=_0x1c6519-0x0;var _0x4b1860=_0xa571[_0x1c6519];return _0x4b1860;};'use strict';var Sequelize=require(_0x1a57('0x0'));module[_0x1a57('0x1')]={'type':{'type':Sequelize[_0x1a57('0x2')](_0x1a57('0x3'),'variable',_0x1a57('0x4'),_0x1a57('0x5')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x1a57('0x6')]},'keyType':{'type':Sequelize['ENUM'](_0x1a57('0x3'),_0x1a57('0x7'),_0x1a57('0x4'))},'keyContent':{'type':Sequelize[_0x1a57('0x6')]},'idField':{'type':Sequelize[_0x1a57('0x6')]},'nameField':{'type':Sequelize[_0x1a57('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x1a57('0x6')]}};
\ No newline at end of file
+var _0x9bde=['BOOLEAN','exports','string','customVariable','keyValue','STRING','ENUM'];(function(_0x158da6,_0x3cb06d){var _0x429c30=function(_0x2d5895){while(--_0x2d5895){_0x158da6['push'](_0x158da6['shift']());}};_0x429c30(++_0x3cb06d);}(_0x9bde,0xe1));var _0xe9bd=function(_0x5aeaef,_0x52d8e1){_0x5aeaef=_0x5aeaef-0x0;var _0x4f22f6=_0x9bde[_0x5aeaef];return _0x4f22f6;};'use strict';var Sequelize=require('sequelize');module[_0xe9bd('0x0')]={'type':{'type':Sequelize['ENUM'](_0xe9bd('0x1'),'variable',_0xe9bd('0x2'),_0xe9bd('0x3')),'defaultValue':_0xe9bd('0x1')},'content':{'type':Sequelize[_0xe9bd('0x4')]},'key':{'type':Sequelize[_0xe9bd('0x4')]},'keyType':{'type':Sequelize[_0xe9bd('0x5')](_0xe9bd('0x1'),'variable',_0xe9bd('0x2'))},'keyContent':{'type':Sequelize[_0xe9bd('0x4')]},'idField':{'type':Sequelize[_0xe9bd('0x4')]},'nameField':{'type':Sequelize[_0xe9bd('0x4')]},'customField':{'type':Sequelize[_0xe9bd('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xe9bd('0x4')]}};
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.controller.js b/server/api/intVtigerField/intVtigerField.controller.js
index e43fb9d..6df191d 100644
--- a/server/api/intVtigerField/intVtigerField.controller.js
+++ b/server/api/intVtigerField/intVtigerField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x84a0=['fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','map','type','key','VIRTUAL','field','filter','options','VtigerField','includeAll','include','findAll','rows','show','params','find','create','body','catch','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','util','path','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','model','keys','query','filters','intersection','attributes'];(function(_0x7e746a,_0x437d95){var _0x2860b9=function(_0x10ad97){while(--_0x10ad97){_0x7e746a['push'](_0x7e746a['shift']());}};_0x2860b9(++_0x437d95);}(_0x84a0,0x66));var _0x084a=function(_0x1e9282,_0x496819){_0x1e9282=_0x1e9282-0x0;var _0x30ce4c=_0x84a0[_0x1e9282];return _0x30ce4c;};'use strict';var pdf=require(_0x084a('0x0'));var emlformat=require(_0x084a('0x1'));var rimraf=require(_0x084a('0x2'));var zipdir=require(_0x084a('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x084a('0x4'));var moment=require(_0x084a('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x084a('0x6'));var path=require(_0x084a('0x7'));var sox=require('sox');var csv=require(_0x084a('0x8'));var ejs=require(_0x084a('0x9'));var fs=require('fs');var _=require(_0x084a('0xa'));var squel=require(_0x084a('0xb'));var crypto=require(_0x084a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x084a('0xd'));var toCsv=require(_0x084a('0x8'));var querystring=require(_0x084a('0xe'));var Papa=require(_0x084a('0xf'));var Redis=require(_0x084a('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x084a('0x11'));var logger=require(_0x084a('0x12'))(_0x084a('0x13'));var utils=require(_0x084a('0x14'));var config=require(_0x084a('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4ef41f,_0xc451b1){_0xc451b1=_0xc451b1||0xcc;return function(_0x3ca72f){if(_0x3ca72f){return _0x4ef41f[_0x084a('0x16')](_0xc451b1);}return _0x4ef41f[_0x084a('0x17')](_0xc451b1)[_0x084a('0x18')]();};}function respondWithResult(_0x414b05,_0x3ff351){_0x3ff351=_0x3ff351||0xc8;return function(_0x3a76d1){if(_0x3a76d1){return _0x414b05['status'](_0x3ff351)[_0x084a('0x19')](_0x3a76d1);}};}function respondWithFilteredResult(_0x4b9cc5,_0x225de0){return function(_0x3ccaca){if(_0x3ccaca){var _0x366624=_0x3ccaca[_0x084a('0x1a')],_0x2d35b8=_0x225de0['offset'],_0xd20527=_0x225de0[_0x084a('0x1b')]+_0x225de0[_0x084a('0x1c')],_0x4cbd16;if(_0xd20527>=_0x366624){_0xd20527=_0x366624;_0x4cbd16=0xc8;}else{_0x4cbd16=0xce;}_0x4b9cc5['status'](_0x4cbd16);return _0x4b9cc5[_0x084a('0x1d')](_0x084a('0x1e'),_0x2d35b8+'-'+_0xd20527+'/'+_0x366624)[_0x084a('0x19')](_0x3ccaca);}return null;};}function patchUpdates(_0x14bb19){return function(_0x33d3a6){try{jsonpatch[_0x084a('0x1f')](_0x33d3a6,_0x14bb19,!![]);}catch(_0x447a19){return BPromise[_0x084a('0x20')](_0x447a19);}return _0x33d3a6[_0x084a('0x21')]();};}function saveUpdates(_0xcb5356,_0x3c7fd6){return function(_0x279e25){if(_0x279e25){return _0x279e25[_0x084a('0x22')](_0xcb5356)[_0x084a('0x23')](function(_0xf0dd98){return _0xf0dd98;});}return null;};}function removeEntity(_0x506f71,_0x343c5c){return function(_0x1ad257){if(_0x1ad257){return _0x1ad257[_0x084a('0x24')]()[_0x084a('0x23')](function(){_0x506f71[_0x084a('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x755c24,_0x288e9e){return function(_0x6346a5){if(!_0x6346a5){_0x755c24[_0x084a('0x16')](0x194);}return _0x6346a5;};}function handleError(_0x18b43d,_0x3cdc1e){_0x3cdc1e=_0x3cdc1e||0x1f4;return function(_0x5be167){logger[_0x084a('0x25')](_0x5be167[_0x084a('0x26')]);if(_0x5be167[_0x084a('0x27')]){delete _0x5be167['name'];}_0x18b43d[_0x084a('0x17')](_0x3cdc1e)[_0x084a('0x28')](_0x5be167);};}exports[_0x084a('0x29')]=function(_0x4c5658,_0x5596ac){var _0x4874fe={},_0x52227a={},_0x33b88f={'count':0x0,'rows':[]};var _0x5c5efb=db['VtigerField']['rawAttributes'];_0x52227a[_0x084a('0x2a')]=_[_0x084a('0x2b')](_0x5c5efb);_0x52227a[_0x084a('0x2c')]=_[_0x084a('0x2b')](_0x4c5658[_0x084a('0x2c')]);_0x52227a[_0x084a('0x2d')]=_[_0x084a('0x2e')](_0x52227a[_0x084a('0x2a')],_0x52227a['query']);_0x4874fe[_0x084a('0x2f')]=_[_0x084a('0x2e')](_0x52227a['model'],qs[_0x084a('0x30')](_0x4c5658[_0x084a('0x2c')][_0x084a('0x30')]));_0x4874fe[_0x084a('0x2f')]=_0x4874fe[_0x084a('0x2f')][_0x084a('0x31')]?_0x4874fe[_0x084a('0x2f')]:_0x52227a[_0x084a('0x2a')];if(!_0x4c5658[_0x084a('0x2c')][_0x084a('0x32')](_0x084a('0x33'))){_0x4874fe[_0x084a('0x1c')]=qs[_0x084a('0x1c')](_0x4c5658['query']['limit']);_0x4874fe[_0x084a('0x1b')]=qs[_0x084a('0x1b')](_0x4c5658[_0x084a('0x2c')][_0x084a('0x1b')]);}_0x4874fe[_0x084a('0x34')]=qs['sort'](_0x4c5658[_0x084a('0x2c')][_0x084a('0x35')]);_0x4874fe[_0x084a('0x36')]=qs['filters'](_[_0x084a('0x37')](_0x4c5658[_0x084a('0x2c')],_0x52227a[_0x084a('0x2d')]));if(_0x4c5658['query']['filter']){_0x4874fe['where']=_[_0x084a('0x38')](_0x4874fe[_0x084a('0x36')],{'$or':_[_0x084a('0x39')](_0x5c5efb,function(_0x4e594f){if(_0x4e594f[_0x084a('0x3a')][_0x084a('0x3b')]!==_0x084a('0x3c')){var _0x28b199={};_0x28b199[_0x4e594f[_0x084a('0x3d')]]={'$like':'%'+_0x4c5658[_0x084a('0x2c')][_0x084a('0x3e')]+'%'};return _0x28b199;}})});}_0x4874fe=_[_0x084a('0x38')]({},_0x4874fe,_0x4c5658[_0x084a('0x3f')]);var _0x44490d={'where':_0x4874fe[_0x084a('0x36')]};return db[_0x084a('0x40')][_0x084a('0x1a')](_0x44490d)[_0x084a('0x23')](function(_0x10983f){_0x33b88f['count']=_0x10983f;if(_0x4c5658[_0x084a('0x2c')][_0x084a('0x41')]){_0x4874fe[_0x084a('0x42')]=[{'all':!![]}];}return db[_0x084a('0x40')][_0x084a('0x43')](_0x4874fe);})[_0x084a('0x23')](function(_0xa7b652){_0x33b88f[_0x084a('0x44')]=_0xa7b652;return _0x33b88f;})[_0x084a('0x23')](respondWithFilteredResult(_0x5596ac,_0x4874fe))['catch'](handleError(_0x5596ac,null));};exports[_0x084a('0x45')]=function(_0x3d1aa5,_0x25a081){var _0x432eb7={'raw':!![],'where':{'id':_0x3d1aa5[_0x084a('0x46')]['id']}},_0x256008={};_0x256008['model']=_[_0x084a('0x2b')](db[_0x084a('0x40')]['rawAttributes']);_0x256008[_0x084a('0x2c')]=_[_0x084a('0x2b')](_0x3d1aa5[_0x084a('0x2c')]);_0x256008['filters']=_[_0x084a('0x2e')](_0x256008[_0x084a('0x2a')],_0x256008['query']);_0x432eb7[_0x084a('0x2f')]=_[_0x084a('0x2e')](_0x256008['model'],qs['fields'](_0x3d1aa5[_0x084a('0x2c')][_0x084a('0x30')]));_0x432eb7[_0x084a('0x2f')]=_0x432eb7[_0x084a('0x2f')][_0x084a('0x31')]?_0x432eb7[_0x084a('0x2f')]:_0x256008[_0x084a('0x2a')];if(_0x3d1aa5[_0x084a('0x2c')][_0x084a('0x41')]){_0x432eb7[_0x084a('0x42')]=[{'all':!![]}];}_0x432eb7=_[_0x084a('0x38')]({},_0x432eb7,_0x3d1aa5['options']);return db['VtigerField'][_0x084a('0x47')](_0x432eb7)[_0x084a('0x23')](handleEntityNotFound(_0x25a081,null))[_0x084a('0x23')](respondWithResult(_0x25a081,null))['catch'](handleError(_0x25a081,null));};exports[_0x084a('0x48')]=function(_0x1598c4,_0x3092ea){return db[_0x084a('0x40')][_0x084a('0x48')](_0x1598c4['body'],{})[_0x084a('0x23')](respondWithResult(_0x3092ea,0xc9))['catch'](handleError(_0x3092ea,null));};exports[_0x084a('0x22')]=function(_0x4f98c6,_0x1ffd20){if(_0x4f98c6['body']['id']){delete _0x4f98c6['body']['id'];}return db[_0x084a('0x40')][_0x084a('0x47')]({'where':{'id':_0x4f98c6['params']['id']}})[_0x084a('0x23')](handleEntityNotFound(_0x1ffd20,null))[_0x084a('0x23')](saveUpdates(_0x4f98c6[_0x084a('0x49')],null))[_0x084a('0x23')](respondWithResult(_0x1ffd20,null))['catch'](handleError(_0x1ffd20,null));};exports[_0x084a('0x24')]=function(_0x865368,_0x31677b){return db[_0x084a('0x40')]['find']({'where':{'id':_0x865368[_0x084a('0x46')]['id']}})[_0x084a('0x23')](handleEntityNotFound(_0x31677b,null))[_0x084a('0x23')](removeEntity(_0x31677b,null))[_0x084a('0x4a')](handleError(_0x31677b,null));};
\ No newline at end of file
+var _0xdb94=['nolimit','offset','order','sort','pick','filter','where','merge','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','ejs','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','end','status','json','count','limit','set','Content-Range','apply','save','update','then','destroy','sendStatus','error','stack','name','send','index','VtigerField','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length'];(function(_0x48d824,_0x1bd0ee){var _0x513b57=function(_0x5261c8){while(--_0x5261c8){_0x48d824['push'](_0x48d824['shift']());}};_0x513b57(++_0x1bd0ee);}(_0xdb94,0xab));var _0x4db9=function(_0x4bb83f,_0xb45ade){_0x4bb83f=_0x4bb83f-0x0;var _0x1787c4=_0xdb94[_0x4bb83f];return _0x1787c4;};'use strict';var pdf=require(_0x4db9('0x0'));var emlformat=require(_0x4db9('0x1'));var rimraf=require(_0x4db9('0x2'));var zipdir=require(_0x4db9('0x3'));var jsonpatch=require(_0x4db9('0x4'));var rp=require('request-promise');var moment=require(_0x4db9('0x5'));var BPromise=require(_0x4db9('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x4db9('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4db9('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x4db9('0x9'));var crypto=require('crypto');var jsforce=require(_0x4db9('0xa'));var deskjs=require(_0x4db9('0xb'));var toCsv=require(_0x4db9('0xc'));var querystring=require(_0x4db9('0xd'));var Papa=require(_0x4db9('0xe'));var Redis=require(_0x4db9('0xf'));var authService=require(_0x4db9('0x10'));var qs=require(_0x4db9('0x11'));var hardwareService=require(_0x4db9('0x12'));var logger=require(_0x4db9('0x13'))(_0x4db9('0x14'));var utils=require('../../config/utils');var config=require(_0x4db9('0x15'));var db=require(_0x4db9('0x16'))['db'];function respondWithStatusCode(_0x58a64b,_0x496645){_0x496645=_0x496645||0xcc;return function(_0x31222b){if(_0x31222b){return _0x58a64b['sendStatus'](_0x496645);}return _0x58a64b['status'](_0x496645)[_0x4db9('0x17')]();};}function respondWithResult(_0x3ff3d3,_0x569873){_0x569873=_0x569873||0xc8;return function(_0xd37d63){if(_0xd37d63){return _0x3ff3d3[_0x4db9('0x18')](_0x569873)[_0x4db9('0x19')](_0xd37d63);}};}function respondWithFilteredResult(_0x22667c,_0x51d024){return function(_0x5e04ab){if(_0x5e04ab){var _0x102274=_0x5e04ab[_0x4db9('0x1a')],_0x34de1a=_0x51d024['offset'],_0x4a037f=_0x51d024['offset']+_0x51d024[_0x4db9('0x1b')],_0xadc104;if(_0x4a037f>=_0x102274){_0x4a037f=_0x102274;_0xadc104=0xc8;}else{_0xadc104=0xce;}_0x22667c[_0x4db9('0x18')](_0xadc104);return _0x22667c[_0x4db9('0x1c')](_0x4db9('0x1d'),_0x34de1a+'-'+_0x4a037f+'/'+_0x102274)[_0x4db9('0x19')](_0x5e04ab);}return null;};}function patchUpdates(_0x55494a){return function(_0x3b1f87){try{jsonpatch[_0x4db9('0x1e')](_0x3b1f87,_0x55494a,!![]);}catch(_0x11012e){return BPromise['reject'](_0x11012e);}return _0x3b1f87[_0x4db9('0x1f')]();};}function saveUpdates(_0x36b5a3,_0x1fd635){return function(_0x4c92e8){if(_0x4c92e8){return _0x4c92e8[_0x4db9('0x20')](_0x36b5a3)[_0x4db9('0x21')](function(_0x4553c2){return _0x4553c2;});}return null;};}function removeEntity(_0x46fc3d,_0xf4f3fe){return function(_0x159d9b){if(_0x159d9b){return _0x159d9b[_0x4db9('0x22')]()['then'](function(){_0x46fc3d[_0x4db9('0x18')](0xcc)[_0x4db9('0x17')]();});}};}function handleEntityNotFound(_0xcde40c,_0x319475){return function(_0x4aaa84){if(!_0x4aaa84){_0xcde40c[_0x4db9('0x23')](0x194);}return _0x4aaa84;};}function handleError(_0xdac966,_0x5cbd3f){_0x5cbd3f=_0x5cbd3f||0x1f4;return function(_0x2e97ab){logger[_0x4db9('0x24')](_0x2e97ab[_0x4db9('0x25')]);if(_0x2e97ab['name']){delete _0x2e97ab[_0x4db9('0x26')];}_0xdac966[_0x4db9('0x18')](_0x5cbd3f)[_0x4db9('0x27')](_0x2e97ab);};}exports[_0x4db9('0x28')]=function(_0x3f9f7e,_0x385e22){var _0x385400={},_0x2a56b8={},_0x3d0f12={'count':0x0,'rows':[]};var _0x400ee5=db[_0x4db9('0x29')][_0x4db9('0x2a')];_0x2a56b8[_0x4db9('0x2b')]=_[_0x4db9('0x2c')](_0x400ee5);_0x2a56b8['query']=_['keys'](_0x3f9f7e[_0x4db9('0x2d')]);_0x2a56b8[_0x4db9('0x2e')]=_[_0x4db9('0x2f')](_0x2a56b8[_0x4db9('0x2b')],_0x2a56b8[_0x4db9('0x2d')]);_0x385400[_0x4db9('0x30')]=_['intersection'](_0x2a56b8[_0x4db9('0x2b')],qs['fields'](_0x3f9f7e[_0x4db9('0x2d')][_0x4db9('0x31')]));_0x385400[_0x4db9('0x30')]=_0x385400[_0x4db9('0x30')][_0x4db9('0x32')]?_0x385400['attributes']:_0x2a56b8['model'];if(!_0x3f9f7e[_0x4db9('0x2d')]['hasOwnProperty'](_0x4db9('0x33'))){_0x385400[_0x4db9('0x1b')]=qs['limit'](_0x3f9f7e[_0x4db9('0x2d')][_0x4db9('0x1b')]);_0x385400[_0x4db9('0x34')]=qs['offset'](_0x3f9f7e[_0x4db9('0x2d')]['offset']);}_0x385400[_0x4db9('0x35')]=qs[_0x4db9('0x36')](_0x3f9f7e[_0x4db9('0x2d')]['sort']);_0x385400['where']=qs[_0x4db9('0x2e')](_[_0x4db9('0x37')](_0x3f9f7e[_0x4db9('0x2d')],_0x2a56b8[_0x4db9('0x2e')]));if(_0x3f9f7e[_0x4db9('0x2d')][_0x4db9('0x38')]){_0x385400[_0x4db9('0x39')]=_[_0x4db9('0x3a')](_0x385400[_0x4db9('0x39')],{'$or':_['map'](_0x400ee5,function(_0x17b506){if(_0x17b506[_0x4db9('0x3b')][_0x4db9('0x3c')]!==_0x4db9('0x3d')){var _0x490f73={};_0x490f73[_0x17b506[_0x4db9('0x3e')]]={'$like':'%'+_0x3f9f7e[_0x4db9('0x2d')][_0x4db9('0x38')]+'%'};return _0x490f73;}})});}_0x385400=_['merge']({},_0x385400,_0x3f9f7e[_0x4db9('0x3f')]);var _0xaf5f09={'where':_0x385400[_0x4db9('0x39')]};return db[_0x4db9('0x29')]['count'](_0xaf5f09)['then'](function(_0x41da52){_0x3d0f12[_0x4db9('0x1a')]=_0x41da52;if(_0x3f9f7e[_0x4db9('0x2d')][_0x4db9('0x40')]){_0x385400[_0x4db9('0x41')]=[{'all':!![]}];}return db['VtigerField'][_0x4db9('0x42')](_0x385400);})[_0x4db9('0x21')](function(_0x23affc){_0x3d0f12[_0x4db9('0x43')]=_0x23affc;return _0x3d0f12;})[_0x4db9('0x21')](respondWithFilteredResult(_0x385e22,_0x385400))['catch'](handleError(_0x385e22,null));};exports[_0x4db9('0x44')]=function(_0x324765,_0x38a727){var _0x5aeb37={'raw':!![],'where':{'id':_0x324765[_0x4db9('0x45')]['id']}},_0x37358f={};_0x37358f[_0x4db9('0x2b')]=_[_0x4db9('0x2c')](db[_0x4db9('0x29')][_0x4db9('0x2a')]);_0x37358f[_0x4db9('0x2d')]=_[_0x4db9('0x2c')](_0x324765[_0x4db9('0x2d')]);_0x37358f[_0x4db9('0x2e')]=_['intersection'](_0x37358f['model'],_0x37358f['query']);_0x5aeb37[_0x4db9('0x30')]=_[_0x4db9('0x2f')](_0x37358f['model'],qs[_0x4db9('0x31')](_0x324765[_0x4db9('0x2d')]['fields']));_0x5aeb37['attributes']=_0x5aeb37[_0x4db9('0x30')]['length']?_0x5aeb37[_0x4db9('0x30')]:_0x37358f[_0x4db9('0x2b')];if(_0x324765['query'][_0x4db9('0x40')]){_0x5aeb37[_0x4db9('0x41')]=[{'all':!![]}];}_0x5aeb37=_['merge']({},_0x5aeb37,_0x324765[_0x4db9('0x3f')]);return db[_0x4db9('0x29')][_0x4db9('0x46')](_0x5aeb37)['then'](handleEntityNotFound(_0x38a727,null))['then'](respondWithResult(_0x38a727,null))[_0x4db9('0x47')](handleError(_0x38a727,null));};exports[_0x4db9('0x48')]=function(_0x719001,_0x41d0dd){return db[_0x4db9('0x29')][_0x4db9('0x48')](_0x719001[_0x4db9('0x49')],{})[_0x4db9('0x21')](respondWithResult(_0x41d0dd,0xc9))[_0x4db9('0x47')](handleError(_0x41d0dd,null));};exports[_0x4db9('0x20')]=function(_0x1159b3,_0x9fec71){if(_0x1159b3[_0x4db9('0x49')]['id']){delete _0x1159b3['body']['id'];}return db[_0x4db9('0x29')][_0x4db9('0x46')]({'where':{'id':_0x1159b3[_0x4db9('0x45')]['id']}})[_0x4db9('0x21')](handleEntityNotFound(_0x9fec71,null))[_0x4db9('0x21')](saveUpdates(_0x1159b3[_0x4db9('0x49')],null))[_0x4db9('0x21')](respondWithResult(_0x9fec71,null))[_0x4db9('0x47')](handleError(_0x9fec71,null));};exports[_0x4db9('0x22')]=function(_0x2d6094,_0x10dccb){return db['VtigerField']['find']({'where':{'id':_0x2d6094[_0x4db9('0x45')]['id']}})[_0x4db9('0x21')](handleEntityNotFound(_0x10dccb,null))[_0x4db9('0x21')](removeEntity(_0x10dccb,null))[_0x4db9('0x47')](handleError(_0x10dccb,null));};
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.model.js b/server/api/intVtigerField/intVtigerField.model.js
index 38e36d8..58a5117 100644
--- a/server/api/intVtigerField/intVtigerField.model.js
+++ b/server/api/intVtigerField/intVtigerField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf392=['define','VtigerField','int_vtiger_fields','vtiger_unique_index','FieldId','util','../../config/logger','api','request-promise','rimraf','../../config/environment','./intVtigerField.attributes','exports'];(function(_0x4343c4,_0x25d5d8){var _0x51f023=function(_0x384b52){while(--_0x384b52){_0x4343c4['push'](_0x4343c4['shift']());}};_0x51f023(++_0x25d5d8);}(_0xf392,0x1f3));var _0x2f39=function(_0x2b20c9,_0x53e546){_0x2b20c9=_0x2b20c9-0x0;var _0x4502c4=_0xf392[_0x2b20c9];return _0x4502c4;};'use strict';var _=require('lodash');var util=require(_0x2f39('0x0'));var logger=require(_0x2f39('0x1'))(_0x2f39('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2f39('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2f39('0x4'));var config=require(_0x2f39('0x5'));var attributes=require(_0x2f39('0x6'));module[_0x2f39('0x7')]=function(_0x357420,_0x40e2d8){return _0x357420[_0x2f39('0x8')](_0x2f39('0x9'),attributes,{'tableName':_0x2f39('0xa'),'paranoid':![],'indexes':[{'name':_0x2f39('0xb'),'fields':['idField',_0x2f39('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6584=['lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','vtiger_unique_index','idField','FieldId'];(function(_0x586382,_0x37adee){var _0x1532f9=function(_0x3b8c4a){while(--_0x3b8c4a){_0x586382['push'](_0x586382['shift']());}};_0x1532f9(++_0x37adee);}(_0x6584,0x9c));var _0x4658=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0x6584[_0x8de54f];return _0x14cba4;};'use strict';var _=require(_0x4658('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x4658('0x1'));var moment=require(_0x4658('0x2'));var BPromise=require(_0x4658('0x3'));var rp=require(_0x4658('0x4'));var fs=require('fs');var path=require(_0x4658('0x5'));var rimraf=require(_0x4658('0x6'));var config=require(_0x4658('0x7'));var attributes=require('./intVtigerField.attributes');module[_0x4658('0x8')]=function(_0xb46ffa,_0x434c68){return _0xb46ffa[_0x4658('0x9')]('VtigerField',attributes,{'tableName':'int_vtiger_fields','paranoid':![],'indexes':[{'name':_0x4658('0xa'),'fields':[_0x4658('0xb'),_0x4658('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.rpc.js b/server/api/intVtigerField/intVtigerField.rpc.js
index 87de088..cb4bd75 100644
--- a/server/api/intVtigerField/intVtigerField.rpc.js
+++ b/server/api/intVtigerField/intVtigerField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4331=['util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','VtigerField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','lodash'];(function(_0x2b8342,_0x1e1ccd){var _0x1d4400=function(_0x22e122){while(--_0x22e122){_0x2b8342['push'](_0x2b8342['shift']());}};_0x1d4400(++_0x1e1ccd);}(_0x4331,0xa7));var _0x1433=function(_0x36e10e,_0x19eb1c){_0x36e10e=_0x36e10e-0x0;var _0xc08087=_0x4331[_0x36e10e];return _0xc08087;};'use strict';var _=require(_0x1433('0x0'));var util=require(_0x1433('0x1'));var moment=require('moment');var BPromise=require(_0x1433('0x2'));var rs=require(_0x1433('0x3'));var fs=require('fs');var Redis=require(_0x1433('0x4'));var db=require(_0x1433('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1433('0x6'))(_0x1433('0x7'));var config=require(_0x1433('0x8'));var jayson=require(_0x1433('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5adcb0,_0x274015,_0x45dd62){return new BPromise(function(_0x11d40c,_0x18e664){return client[_0x1433('0xa')](_0x5adcb0,_0x45dd62)[_0x1433('0xb')](function(_0xc6f99d){logger[_0x1433('0xc')](_0x1433('0xd'),_0x274015,_0x1433('0xe'));logger[_0x1433('0xf')]('VtigerField,\x20%s,\x20%s,\x20%s',_0x274015,_0x1433('0xe'),JSON[_0x1433('0x10')](_0xc6f99d));if(_0xc6f99d[_0x1433('0x11')]){if(_0xc6f99d[_0x1433('0x11')][_0x1433('0x12')]===0x1f4){logger[_0x1433('0x11')]('VtigerField,\x20%s,\x20%s',_0x274015,_0xc6f99d[_0x1433('0x11')][_0x1433('0x13')]);return _0x18e664(_0xc6f99d[_0x1433('0x11')][_0x1433('0x13')]);}logger[_0x1433('0x11')](_0x1433('0xd'),_0x274015,_0xc6f99d[_0x1433('0x11')][_0x1433('0x13')]);return _0x11d40c(_0xc6f99d['error']['message']);}else{logger[_0x1433('0xc')](_0x1433('0xd'),_0x274015,_0x1433('0xe'));_0x11d40c(_0xc6f99d['result'][_0x1433('0x13')]);}})[_0x1433('0x14')](function(_0x19fd95){logger[_0x1433('0x11')]('VtigerField,\x20%s,\x20%s',_0x274015,_0x19fd95);_0x18e664(_0x19fd95);});});}
\ No newline at end of file
+var _0x7d4f=['error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','info','VtigerField,\x20%s,\x20%s','VtigerField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x4463f9,_0x5f183f){var _0x45037c=function(_0x53defd){while(--_0x53defd){_0x4463f9['push'](_0x4463f9['shift']());}};_0x45037c(++_0x5f183f);}(_0x7d4f,0xbd));var _0xf7d4=function(_0x41393a,_0xb93e63){_0x41393a=_0x41393a-0x0;var _0x9d51cd=_0x7d4f[_0x41393a];return _0x9d51cd;};'use strict';var _=require(_0xf7d4('0x0'));var util=require(_0xf7d4('0x1'));var moment=require(_0xf7d4('0x2'));var BPromise=require(_0xf7d4('0x3'));var rs=require(_0xf7d4('0x4'));var fs=require('fs');var Redis=require(_0xf7d4('0x5'));var db=require(_0xf7d4('0x6'))['db'];var utils=require(_0xf7d4('0x7'));var logger=require(_0xf7d4('0x8'))(_0xf7d4('0x9'));var config=require(_0xf7d4('0xa'));var jayson=require(_0xf7d4('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3ae717,_0x485de8,_0x213488){return new BPromise(function(_0x355bed,_0x5cf8d6){return client[_0xf7d4('0xc')](_0x3ae717,_0x213488)['then'](function(_0x15bd31){logger[_0xf7d4('0xd')](_0xf7d4('0xe'),_0x485de8,'request\x20sent');logger['debug'](_0xf7d4('0xf'),_0x485de8,_0xf7d4('0x10'),JSON[_0xf7d4('0x11')](_0x15bd31));if(_0x15bd31[_0xf7d4('0x12')]){if(_0x15bd31['error'][_0xf7d4('0x13')]===0x1f4){logger['error'](_0xf7d4('0xe'),_0x485de8,_0x15bd31[_0xf7d4('0x12')][_0xf7d4('0x14')]);return _0x5cf8d6(_0x15bd31[_0xf7d4('0x12')][_0xf7d4('0x14')]);}logger['error']('VtigerField,\x20%s,\x20%s',_0x485de8,_0x15bd31[_0xf7d4('0x12')][_0xf7d4('0x14')]);return _0x355bed(_0x15bd31['error'][_0xf7d4('0x14')]);}else{logger[_0xf7d4('0xd')]('VtigerField,\x20%s,\x20%s',_0x485de8,_0xf7d4('0x10'));_0x355bed(_0x15bd31[_0xf7d4('0x15')][_0xf7d4('0x14')]);}})[_0xf7d4('0x16')](function(_0x303552){logger[_0xf7d4('0x12')](_0xf7d4('0xe'),_0x485de8,_0x303552);_0x5cf8d6(_0x303552);});});}
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/index.js b/server/api/intZendeskAccount/index.js
index 2707108..7914d3e 100644
--- a/server/api/intZendeskAccount/index.js
+++ b/server/api/intZendeskAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x59cc=['connect-timeout','express','Router','../../components/interaction/service','../../config/environment','isAuthenticated','index','/:id','show','get','/:id/configurations','getConfigurations','/:id/fields','getFields','create','post','update','delete','exports'];(function(_0x261bc8,_0x4c8bb6){var _0x7b160b=function(_0x21053d){while(--_0x21053d){_0x261bc8['push'](_0x261bc8['shift']());}};_0x7b160b(++_0x4c8bb6);}(_0x59cc,0x98));var _0xc59c=function(_0x276a99,_0x28a89e){_0x276a99=_0x276a99-0x0;var _0x11edbf=_0x59cc[_0x276a99];return _0x11edbf;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xc59c('0x0'));var express=require(_0xc59c('0x1'));var router=express[_0xc59c('0x2')]();var auth=require('../../components/auth/service');var interaction=require(_0xc59c('0x3'));var config=require(_0xc59c('0x4'));var controller=require('./intZendeskAccount.controller');router['get']('/',auth[_0xc59c('0x5')](),controller[_0xc59c('0x6')]);router['get'](_0xc59c('0x7'),auth[_0xc59c('0x5')](),controller[_0xc59c('0x8')]);router[_0xc59c('0x9')](_0xc59c('0xa'),auth['isAuthenticated'](),controller[_0xc59c('0xb')]);router['get'](_0xc59c('0xc'),auth[_0xc59c('0x5')](),controller[_0xc59c('0xd')]);router['post']('/',auth[_0xc59c('0x5')](),controller[_0xc59c('0xe')]);router[_0xc59c('0xf')](_0xc59c('0xa'),auth[_0xc59c('0x5')](),controller['addConfiguration']);router['put'](_0xc59c('0x7'),auth[_0xc59c('0x5')](),controller[_0xc59c('0x10')]);router[_0xc59c('0x11')](_0xc59c('0x7'),auth[_0xc59c('0x5')](),controller['destroy']);module[_0xc59c('0x12')]=router;
\ No newline at end of file
+var _0x9be2=['isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','create','addConfiguration','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./intZendeskAccount.controller','get'];(function(_0x14715e,_0x4f7c0a){var _0x32f5a2=function(_0x2a9604){while(--_0x2a9604){_0x14715e['push'](_0x14715e['shift']());}};_0x32f5a2(++_0x4f7c0a);}(_0x9be2,0x6e));var _0x29be=function(_0x1446b3,_0xe070dc){_0x1446b3=_0x1446b3-0x0;var _0x23a30f=_0x9be2[_0x1446b3];return _0x23a30f;};'use strict';var multer=require(_0x29be('0x0'));var util=require(_0x29be('0x1'));var path=require(_0x29be('0x2'));var timeout=require(_0x29be('0x3'));var express=require(_0x29be('0x4'));var router=express[_0x29be('0x5')]();var auth=require(_0x29be('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x29be('0x7'));var controller=require(_0x29be('0x8'));router[_0x29be('0x9')]('/',auth[_0x29be('0xa')](),controller[_0x29be('0xb')]);router[_0x29be('0x9')](_0x29be('0xc'),auth[_0x29be('0xa')](),controller[_0x29be('0xd')]);router[_0x29be('0x9')](_0x29be('0xe'),auth[_0x29be('0xa')](),controller[_0x29be('0xf')]);router[_0x29be('0x9')](_0x29be('0x10'),auth[_0x29be('0xa')](),controller[_0x29be('0x11')]);router['post']('/',auth[_0x29be('0xa')](),controller[_0x29be('0x12')]);router['post'](_0x29be('0xe'),auth['isAuthenticated'](),controller[_0x29be('0x13')]);router[_0x29be('0x14')](_0x29be('0xc'),auth[_0x29be('0xa')](),controller[_0x29be('0x15')]);router[_0x29be('0x16')]('/:id',auth[_0x29be('0xa')](),controller[_0x29be('0x17')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.attributes.js b/server/api/intZendeskAccount/intZendeskAccount.attributes.js
index e6de462..1afa0d4 100644
--- a/server/api/intZendeskAccount/intZendeskAccount.attributes.js
+++ b/server/api/intZendeskAccount/intZendeskAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe47c=['STRING','username','remoteUri','ENUM','token','integrationTab','newTab','sequelize','exports'];(function(_0x3d42d8,_0x4cffaa){var _0x27fc41=function(_0x3a363b){while(--_0x3a363b){_0x3d42d8['push'](_0x3d42d8['shift']());}};_0x27fc41(++_0x4cffaa);}(_0xe47c,0x97));var _0xce47=function(_0x1e6d70,_0x335ee5){_0x1e6d70=_0x1e6d70-0x0;var _0x532f0f=_0xe47c[_0x1e6d70];return _0x532f0f;};'use strict';var Sequelize=require(_0xce47('0x0'));module[_0xce47('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xce47('0x2')],'unique':_0xce47('0x3')},'password':{'type':Sequelize[_0xce47('0x2')]},'token':{'type':Sequelize[_0xce47('0x2')]},'remoteUri':{'type':Sequelize[_0xce47('0x2')],'unique':_0xce47('0x4')},'authType':{'type':Sequelize[_0xce47('0x5')]('password',_0xce47('0x6')),'defaultValue':'password'},'serverUrl':{'type':Sequelize[_0xce47('0x2')]},'type':{'type':Sequelize[_0xce47('0x5')](_0xce47('0x7'),_0xce47('0x8')),'defaultValue':_0xce47('0x7')}};
\ No newline at end of file
+var _0x5943=['sequelize','exports','STRING','ENUM','password','token','integrationTab','newTab'];(function(_0x1acfad,_0x319877){var _0x2ca7d6=function(_0x66759a){while(--_0x66759a){_0x1acfad['push'](_0x1acfad['shift']());}};_0x2ca7d6(++_0x319877);}(_0x5943,0x168));var _0x3594=function(_0x1d30f9,_0x5b5cad){_0x1d30f9=_0x1d30f9-0x0;var _0x3e57e3=_0x5943[_0x1d30f9];return _0x3e57e3;};'use strict';var Sequelize=require(_0x3594('0x0'));module[_0x3594('0x1')]={'name':{'type':Sequelize[_0x3594('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x3594('0x2')],'unique':'username'},'password':{'type':Sequelize[_0x3594('0x2')]},'token':{'type':Sequelize[_0x3594('0x2')]},'remoteUri':{'type':Sequelize[_0x3594('0x2')],'unique':'remoteUri'},'authType':{'type':Sequelize[_0x3594('0x3')](_0x3594('0x4'),_0x3594('0x5')),'defaultValue':_0x3594('0x4')},'serverUrl':{'type':Sequelize[_0x3594('0x2')]},'type':{'type':Sequelize[_0x3594('0x3')](_0x3594('0x6'),_0x3594('0x7')),'defaultValue':_0x3594('0x6')}};
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.controller.js b/server/api/intZendeskAccount/intZendeskAccount.controller.js
index 3286313..a0ba6d7 100644
--- a/server/api/intZendeskAccount/intZendeskAccount.controller.js
+++ b/server/api/intZendeskAccount/intZendeskAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2a4f=['merge','find','create','body','getConfigurations','findOne','ZendeskConfiguration','length','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZendeskField','getFields','username','password','authType','remoteUri','slice','lastIndexOf','GET','format','%s/%s','ticket_fields','headers','Basic\x20%s','%s:%s','toString','base64','token','%s/token:%s','Sequelize','ValidationError','subject','description','assignee','remove','includes','position','title','statusCode','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','count','limit','set','apply','reject','save','update','destroy','sendStatus','stack','name','send','index','ZendeskAccount','rawAttributes','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','offset','order','sort','pick','where','map','type','key','VIRTUAL','field','filter','options','includeAll','include','findAll','rows','show','params','keys'];(function(_0x3a1497,_0xb5cc78){var _0x4a365e=function(_0x22e491){while(--_0x22e491){_0x3a1497['push'](_0x3a1497['shift']());}};_0x4a365e(++_0xb5cc78);}(_0x2a4f,0x1ac));var _0xf2a4=function(_0x5ca44a,_0x4865c9){_0x5ca44a=_0x5ca44a-0x0;var _0x9372b9=_0x2a4f[_0x5ca44a];return _0x9372b9;};'use strict';var pdf=require(_0xf2a4('0x0'));var emlformat=require(_0xf2a4('0x1'));var rimraf=require(_0xf2a4('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf2a4('0x3'));var rp=require(_0xf2a4('0x4'));var moment=require('moment');var BPromise=require(_0xf2a4('0x5'));var Mustache=require(_0xf2a4('0x6'));var util=require('util');var path=require(_0xf2a4('0x7'));var sox=require('sox');var csv=require(_0xf2a4('0x8'));var ejs=require(_0xf2a4('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xf2a4('0xa'));var crypto=require(_0xf2a4('0xb'));var jsforce=require(_0xf2a4('0xc'));var deskjs=require(_0xf2a4('0xd'));var toCsv=require(_0xf2a4('0x8'));var querystring=require(_0xf2a4('0xe'));var Papa=require(_0xf2a4('0xf'));var Redis=require(_0xf2a4('0x10'));var authService=require(_0xf2a4('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xf2a4('0x12'))(_0xf2a4('0x13'));var utils=require(_0xf2a4('0x14'));var config=require(_0xf2a4('0x15'));var db=require(_0xf2a4('0x16'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xf2a4('0x17'));var client=jayson[_0xf2a4('0x18')]['http']({'port':0x232a});function checkPasswordPattern(_0x37b2ed,_0x5df5c6,_0x187383){if(_0x187383){var _0x1f79c9=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1f79c9[_0xf2a4('0x19')](_0x5df5c6)){return _0x37b2ed;}else{throw new Error(_0xf2a4('0x1a'));}}else{return _0x37b2ed;}}function respondWithRpcPromise(_0x214cf4,_0x3326f3,_0x241d0d,_0x9df709){return new BPromise(function(_0xa4c065,_0x220b4a){var _0x260d28=_0x9df709||client;return _0x260d28[_0xf2a4('0x1b')](_0x214cf4,_0x241d0d)[_0xf2a4('0x1c')](function(_0x332914){logger[_0xf2a4('0x1d')](_0xf2a4('0x1e'),_0x3326f3,_0xf2a4('0x1f'));logger['debug'](_0xf2a4('0x20'),_0x3326f3,_0xf2a4('0x1f'),JSON[_0xf2a4('0x21')](_0x332914));if(_0x332914['error']){if(_0x332914[_0xf2a4('0x22')][_0xf2a4('0x23')]===0x1f4){logger[_0xf2a4('0x22')](_0xf2a4('0x1e'),_0x3326f3,_0x332914[_0xf2a4('0x22')][_0xf2a4('0x24')]);return _0x220b4a(_0x332914[_0xf2a4('0x22')][_0xf2a4('0x24')]);}logger[_0xf2a4('0x22')](_0xf2a4('0x1e'),_0x3326f3,_0x332914['error']['message']);return _0xa4c065(_0x332914[_0xf2a4('0x22')]['message']);}else{logger[_0xf2a4('0x1d')](_0xf2a4('0x1e'),_0x3326f3,_0xf2a4('0x1f'));_0xa4c065(_0x332914[_0xf2a4('0x25')]['message']);}})[_0xf2a4('0x26')](function(_0x16997c){logger[_0xf2a4('0x22')]('ZendeskAccount,\x20%s,\x20%s',_0x3326f3,_0x16997c);_0x220b4a(_0x16997c);});});}function respondWithStatusCode(_0xd87e5f,_0x29e2c6){_0x29e2c6=_0x29e2c6||0xcc;return function(_0x17131b){if(_0x17131b){return _0xd87e5f['sendStatus'](_0x29e2c6);}return _0xd87e5f[_0xf2a4('0x27')](_0x29e2c6)[_0xf2a4('0x28')]();};}function respondWithResult(_0x2fd45d,_0x19a69e){_0x19a69e=_0x19a69e||0xc8;return function(_0x5bd96d){if(_0x5bd96d){return _0x2fd45d[_0xf2a4('0x27')](_0x19a69e)[_0xf2a4('0x29')](_0x5bd96d);}};}function respondWithFilteredResult(_0xade465,_0x40b0f8){return function(_0x58f618){if(_0x58f618){var _0x4fe5bf=_0x58f618[_0xf2a4('0x2a')],_0x4c1f00=_0x40b0f8['offset'],_0x22a887=_0x40b0f8['offset']+_0x40b0f8[_0xf2a4('0x2b')],_0x32c282;if(_0x22a887>=_0x4fe5bf){_0x22a887=_0x4fe5bf;_0x32c282=0xc8;}else{_0x32c282=0xce;}_0xade465[_0xf2a4('0x27')](_0x32c282);return _0xade465[_0xf2a4('0x2c')]('Content-Range',_0x4c1f00+'-'+_0x22a887+'/'+_0x4fe5bf)[_0xf2a4('0x29')](_0x58f618);}return null;};}function patchUpdates(_0x41cd2d){return function(_0x1f392e){try{jsonpatch[_0xf2a4('0x2d')](_0x1f392e,_0x41cd2d,!![]);}catch(_0x9eebdd){return BPromise[_0xf2a4('0x2e')](_0x9eebdd);}return _0x1f392e[_0xf2a4('0x2f')]();};}function saveUpdates(_0x414252,_0x38af8e){return function(_0x290a14){if(_0x290a14){return _0x290a14[_0xf2a4('0x30')](_0x414252)[_0xf2a4('0x1c')](function(_0x4dfac2){return _0x4dfac2;});}return null;};}function removeEntity(_0x39ef06,_0x115cfe){return function(_0x4f2d18){if(_0x4f2d18){return _0x4f2d18[_0xf2a4('0x31')]()[_0xf2a4('0x1c')](function(){_0x39ef06[_0xf2a4('0x27')](0xcc)[_0xf2a4('0x28')]();});}};}function handleEntityNotFound(_0x5ce3b5,_0x493502){return function(_0x53e69f){if(!_0x53e69f){_0x5ce3b5[_0xf2a4('0x32')](0x194);}return _0x53e69f;};}function handleError(_0x3d8a00,_0x5334fc){_0x5334fc=_0x5334fc||0x1f4;return function(_0x1b52f8){logger[_0xf2a4('0x22')](_0x1b52f8[_0xf2a4('0x33')]);if(_0x1b52f8['name']){delete _0x1b52f8[_0xf2a4('0x34')];}_0x3d8a00[_0xf2a4('0x27')](_0x5334fc)[_0xf2a4('0x35')](_0x1b52f8);};}exports[_0xf2a4('0x36')]=function(_0x452f09,_0xff678){var _0x624397={},_0x10eae9={},_0x5a2ff1={'count':0x0,'rows':[]};var _0x1ad65a=db[_0xf2a4('0x37')][_0xf2a4('0x38')];_0x10eae9[_0xf2a4('0x39')]=_['keys'](_0x1ad65a);_0x10eae9[_0xf2a4('0x3a')]=_['keys'](_0x452f09[_0xf2a4('0x3a')]);_0x10eae9[_0xf2a4('0x3b')]=_[_0xf2a4('0x3c')](_0x10eae9['model'],_0x10eae9[_0xf2a4('0x3a')]);_0x624397['attributes']=_[_0xf2a4('0x3c')](_0x10eae9[_0xf2a4('0x39')],qs[_0xf2a4('0x3d')](_0x452f09[_0xf2a4('0x3a')][_0xf2a4('0x3d')]));_0x624397['attributes']=_0x624397['attributes']['length']?_0x624397[_0xf2a4('0x3e')]:_0x10eae9[_0xf2a4('0x39')];if(!_0x452f09[_0xf2a4('0x3a')][_0xf2a4('0x3f')](_0xf2a4('0x40'))){_0x624397[_0xf2a4('0x2b')]=qs['limit'](_0x452f09[_0xf2a4('0x3a')][_0xf2a4('0x2b')]);_0x624397['offset']=qs[_0xf2a4('0x41')](_0x452f09[_0xf2a4('0x3a')]['offset']);}_0x624397[_0xf2a4('0x42')]=qs[_0xf2a4('0x43')](_0x452f09[_0xf2a4('0x3a')]['sort']);_0x624397['where']=qs['filters'](_[_0xf2a4('0x44')](_0x452f09['query'],_0x10eae9['filters']));if(_0x452f09[_0xf2a4('0x3a')]['filter']){_0x624397[_0xf2a4('0x45')]=_['merge'](_0x624397[_0xf2a4('0x45')],{'$or':_[_0xf2a4('0x46')](_0x1ad65a,function(_0x104f1c){if(_0x104f1c[_0xf2a4('0x47')][_0xf2a4('0x48')]!==_0xf2a4('0x49')){var _0x508ecc={};_0x508ecc[_0x104f1c[_0xf2a4('0x4a')]]={'$like':'%'+_0x452f09[_0xf2a4('0x3a')][_0xf2a4('0x4b')]+'%'};return _0x508ecc;}})});}_0x624397=_['merge']({},_0x624397,_0x452f09[_0xf2a4('0x4c')]);var _0x3e043d={'where':_0x624397[_0xf2a4('0x45')]};return db[_0xf2a4('0x37')][_0xf2a4('0x2a')](_0x3e043d)[_0xf2a4('0x1c')](function(_0x3566c0){_0x5a2ff1['count']=_0x3566c0;if(_0x452f09['query'][_0xf2a4('0x4d')]){_0x624397[_0xf2a4('0x4e')]=[{'all':!![]}];}return db[_0xf2a4('0x37')][_0xf2a4('0x4f')](_0x624397);})[_0xf2a4('0x1c')](function(_0x15e14d){_0x5a2ff1[_0xf2a4('0x50')]=_0x15e14d;return _0x5a2ff1;})['then'](respondWithFilteredResult(_0xff678,_0x624397))['catch'](handleError(_0xff678,null));};exports[_0xf2a4('0x51')]=function(_0x578262,_0xd9d9df){var _0x829bb8={'raw':![],'where':{'id':_0x578262[_0xf2a4('0x52')]['id']}},_0x1219b3={};_0x1219b3['model']=_[_0xf2a4('0x53')](db[_0xf2a4('0x37')]['rawAttributes']);_0x1219b3[_0xf2a4('0x3a')]=_[_0xf2a4('0x53')](_0x578262[_0xf2a4('0x3a')]);_0x1219b3[_0xf2a4('0x3b')]=_[_0xf2a4('0x3c')](_0x1219b3[_0xf2a4('0x39')],_0x1219b3[_0xf2a4('0x3a')]);_0x829bb8[_0xf2a4('0x3e')]=_[_0xf2a4('0x3c')](_0x1219b3['model'],qs[_0xf2a4('0x3d')](_0x578262['query'][_0xf2a4('0x3d')]));_0x829bb8[_0xf2a4('0x3e')]=_0x829bb8['attributes']['length']?_0x829bb8['attributes']:_0x1219b3[_0xf2a4('0x39')];if(_0x578262[_0xf2a4('0x3a')][_0xf2a4('0x4d')]){_0x829bb8[_0xf2a4('0x4e')]=[{'all':!![]}];}_0x829bb8=_[_0xf2a4('0x54')]({},_0x829bb8,_0x578262[_0xf2a4('0x4c')]);return db[_0xf2a4('0x37')][_0xf2a4('0x55')](_0x829bb8)[_0xf2a4('0x1c')](handleEntityNotFound(_0xd9d9df,null))[_0xf2a4('0x1c')](respondWithResult(_0xd9d9df,null))[_0xf2a4('0x26')](handleError(_0xd9d9df,null));};exports[_0xf2a4('0x56')]=function(_0x58a65e,_0x2bda10){return db[_0xf2a4('0x37')][_0xf2a4('0x56')](_0x58a65e[_0xf2a4('0x57')],{})[_0xf2a4('0x1c')](respondWithResult(_0x2bda10,0xc9))[_0xf2a4('0x26')](handleError(_0x2bda10,null));};exports[_0xf2a4('0x30')]=function(_0x79343e,_0x31955c){if(_0x79343e[_0xf2a4('0x57')]['id']){delete _0x79343e['body']['id'];}return db['ZendeskAccount']['find']({'where':{'id':_0x79343e['params']['id']}})[_0xf2a4('0x1c')](handleEntityNotFound(_0x31955c,null))[_0xf2a4('0x1c')](saveUpdates(_0x79343e[_0xf2a4('0x57')],null))[_0xf2a4('0x1c')](respondWithResult(_0x31955c,null))[_0xf2a4('0x26')](handleError(_0x31955c,null));};exports['destroy']=function(_0x41d6b2,_0x1a7a57){return db[_0xf2a4('0x37')]['find']({'where':{'id':_0x41d6b2[_0xf2a4('0x52')]['id']}})['then'](handleEntityNotFound(_0x1a7a57,null))[_0xf2a4('0x1c')](removeEntity(_0x1a7a57,null))[_0xf2a4('0x26')](handleError(_0x1a7a57,null));};exports[_0xf2a4('0x58')]=function(_0x4bc2d6,_0x54154d,_0x2d06ea){var _0x117902={};var _0x37946c={};var _0x3b6ea0;var _0x1ac68d;return db[_0xf2a4('0x37')][_0xf2a4('0x59')]({'where':{'id':_0x4bc2d6[_0xf2a4('0x52')]['id']}})[_0xf2a4('0x1c')](handleEntityNotFound(_0x54154d,null))[_0xf2a4('0x1c')](function(_0x27e9f5){if(_0x27e9f5){_0x3b6ea0=_0x27e9f5;_0x37946c[_0xf2a4('0x39')]=_[_0xf2a4('0x53')](db[_0xf2a4('0x5a')][_0xf2a4('0x38')]);_0x37946c['query']=_['keys'](_0x4bc2d6[_0xf2a4('0x3a')]);_0x37946c[_0xf2a4('0x3b')]=_[_0xf2a4('0x3c')](_0x37946c[_0xf2a4('0x39')],_0x37946c[_0xf2a4('0x3a')]);_0x117902[_0xf2a4('0x3e')]=_[_0xf2a4('0x3c')](_0x37946c['model'],qs[_0xf2a4('0x3d')](_0x4bc2d6[_0xf2a4('0x3a')][_0xf2a4('0x3d')]));_0x117902[_0xf2a4('0x3e')]=_0x117902['attributes']['length']?_0x117902[_0xf2a4('0x3e')]:_0x37946c['model'];_0x117902['order']=qs[_0xf2a4('0x43')](_0x4bc2d6['query'][_0xf2a4('0x43')]);_0x117902[_0xf2a4('0x45')]=qs[_0xf2a4('0x3b')](_['pick'](_0x4bc2d6[_0xf2a4('0x3a')],_0x37946c[_0xf2a4('0x3b')]));if(_0x4bc2d6[_0xf2a4('0x3a')][_0xf2a4('0x4b')]){_0x117902['where']=_[_0xf2a4('0x54')](_0x117902['where'],{'$or':_['map'](_0x117902[_0xf2a4('0x3e')],function(_0x31026a){var _0x4621ee={};_0x4621ee[_0x31026a]={'$like':'%'+_0x4bc2d6[_0xf2a4('0x3a')][_0xf2a4('0x4b')]+'%'};return _0x4621ee;})});}_0x117902=_[_0xf2a4('0x54')]({},_0x117902,_0x4bc2d6[_0xf2a4('0x4c')]);return _0x3b6ea0['getConfigurations'](_0x117902);}})[_0xf2a4('0x1c')](function(_0x112dce){if(_0x112dce){_0x1ac68d=_0x112dce[_0xf2a4('0x5b')];if(!_0x4bc2d6[_0xf2a4('0x3a')][_0xf2a4('0x3f')](_0xf2a4('0x40'))){_0x117902['limit']=qs[_0xf2a4('0x2b')](_0x4bc2d6[_0xf2a4('0x3a')][_0xf2a4('0x2b')]);_0x117902[_0xf2a4('0x41')]=qs[_0xf2a4('0x41')](_0x4bc2d6[_0xf2a4('0x3a')][_0xf2a4('0x41')]);}return _0x3b6ea0[_0xf2a4('0x58')](_0x117902);}})[_0xf2a4('0x1c')](function(_0x24a42c){if(_0x24a42c){return _0x24a42c?{'count':_0x1ac68d,'rows':_0x24a42c}:null;}})['then'](respondWithResult(_0x54154d,null))[_0xf2a4('0x26')](handleError(_0x54154d,null));};exports[_0xf2a4('0x5c')]=function(_0x4d3b68,_0x46dd0d,_0xac9aae){if(_0x4d3b68[_0xf2a4('0x57')]['id']){delete _0x4d3b68[_0xf2a4('0x57')]['id'];}return db[_0xf2a4('0x37')][_0xf2a4('0x59')]({'where':{'id':_0x4d3b68[_0xf2a4('0x52')]['id']}})[_0xf2a4('0x1c')](handleEntityNotFound(_0x46dd0d,null))[_0xf2a4('0x1c')](function(_0x40117e){if(_0x40117e){_0x4d3b68[_0xf2a4('0x57')][_0xf2a4('0x5d')]=_0x40117e['id'];_0x4d3b68['body'][_0xf2a4('0x5e')]=integrations[_0xf2a4('0x5f')](_0x4d3b68[_0xf2a4('0x57')][_0xf2a4('0x60')],_0x4d3b68[_0xf2a4('0x57')]['type']);_0x4d3b68[_0xf2a4('0x57')][_0xf2a4('0x61')]=integrations[_0xf2a4('0x62')](_0x4d3b68[_0xf2a4('0x57')]['channel'],_0x4d3b68[_0xf2a4('0x57')][_0xf2a4('0x47')]);return db[_0xf2a4('0x5a')][_0xf2a4('0x56')](_0x4d3b68[_0xf2a4('0x57')],{'include':[{'model':db[_0xf2a4('0x63')],'as':_0xf2a4('0x5e')},{'model':db[_0xf2a4('0x63')],'as':'Descriptions'}]});}return null;})[_0xf2a4('0x1c')](respondWithResult(_0x46dd0d,null))['catch'](handleError(_0x46dd0d,null));};exports[_0xf2a4('0x64')]=function(_0x43f97f,_0x27bd57,_0x570032){var _0x2d19ad='';return db[_0xf2a4('0x37')][_0xf2a4('0x59')]({'where':{'id':_0x43f97f[_0xf2a4('0x52')]['id']},'attributes':['id',_0xf2a4('0x65'),_0xf2a4('0x66'),'token',_0xf2a4('0x67'),_0xf2a4('0x68')]})[_0xf2a4('0x1c')](handleEntityNotFound(_0x27bd57,null))['then'](function(_0x2bd9b4){if(_0x2bd9b4){_0x2d19ad=_0x2bd9b4[_0xf2a4('0x68')];var _0xd90229=_0x2d19ad[_0xf2a4('0x69')](-0x1);if(_0xd90229==='/'){_0x2d19ad=_0x2d19ad['substring'](0x0,_0x2d19ad[_0xf2a4('0x6a')](_0xd90229));}var _0x3ead86={'method':_0xf2a4('0x6b'),'uri':util[_0xf2a4('0x6c')](_0xf2a4('0x6d'),_0x2d19ad,_0xf2a4('0x6e')),'json':!![]};switch(_0x2bd9b4['authType']){case _0xf2a4('0x66'):_0x3ead86[_0xf2a4('0x6f')]={'Authorization':util[_0xf2a4('0x6c')](_0xf2a4('0x70'),new Buffer(util[_0xf2a4('0x6c')](_0xf2a4('0x71'),_0x2bd9b4[_0xf2a4('0x65')],_0x2bd9b4[_0xf2a4('0x66')]))[_0xf2a4('0x72')](_0xf2a4('0x73')))};break;case _0xf2a4('0x74'):_0x3ead86[_0xf2a4('0x6f')]={'Authorization':util[_0xf2a4('0x6c')]('Basic\x20%s',new Buffer(util[_0xf2a4('0x6c')](_0xf2a4('0x75'),_0x2bd9b4[_0xf2a4('0x65')],_0x2bd9b4[_0xf2a4('0x74')]))[_0xf2a4('0x72')](_0xf2a4('0x73')))};break;default:throw new db[(_0xf2a4('0x76'))][(_0xf2a4('0x77'))]('Unknown\x20authentication\x20type');}return rp(_0x3ead86);}})[_0xf2a4('0x1c')](function(_0x11d472){if(_0x11d472){var _0x4fffe8=[_0xf2a4('0x78'),_0xf2a4('0x79'),'group',_0xf2a4('0x7a')];_[_0xf2a4('0x7b')](_0x11d472['ticket_fields'],function(_0xaf3571){return _0x4fffe8[_0xf2a4('0x7c')](_0xaf3571[_0xf2a4('0x47')]);});return{'count':_0x11d472[_0xf2a4('0x6e')]['length'],'rows':_[_0xf2a4('0x46')](_0x11d472['ticket_fields'],function(_0x14bfe0){return{'id':_0x14bfe0['id'],'name':_0x14bfe0[_0xf2a4('0x7d')]>0x7?_0x14bfe0[_0xf2a4('0x7e')]:_0x14bfe0[_0xf2a4('0x47')],'custom':_0x14bfe0['position']>0x7?!![]:![],'options':_0x14bfe0['system_field_options']?_0x14bfe0['system_field_options']:_0x14bfe0['custom_field_options']?_0x14bfe0['custom_field_options']:[]};})};}})[_0xf2a4('0x1c')](respondWithResult(_0x27bd57,null))[_0xf2a4('0x26')](function(_0x20fd72){var _0x214abc=_0x43f97f[_0xf2a4('0x3a')]['test']?0x1f4:_0x20fd72['statusCode']||0x1f4;logger[_0xf2a4('0x22')]('getFields,\x20%s,\x20%s,\x20%s',_0xf2a4('0x64'),_0x214abc,JSON[_0xf2a4('0x21')](_0x20fd72));delete _0x20fd72[_0xf2a4('0x34')];if(_0x214abc===0x191){_0x214abc=0x190;}_0x27bd57[_0xf2a4('0x27')](_0x214abc)[_0xf2a4('0x35')](_0x43f97f[_0xf2a4('0x3a')][_0xf2a4('0x19')]?{'message':'Wrong\x20credentials','statusCode':_0x20fd72[_0xf2a4('0x7f')]}:_0x20fd72);});};
\ No newline at end of file
+var _0x16dc=['getConfigurations','hasOwnProperty','nolimit','findOne','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','type','ZendeskConfiguration','ZendeskField','getFields','username','slice','substring','lastIndexOf','GET','format','%s/%s','authType','password','headers','Basic\x20%s','%s:%s','toString','base64','token','%s/token:%s','Sequelize','Unknown\x20authentication\x20type','description','remove','ticket_fields','includes','position','custom_field_options','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','html-pdf','rimraf','zip-dir','request-promise','moment','util','to-csv','lodash','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','sendStatus','status','end','count','offset','limit','Content-Range','apply','update','stack','name','send','index','ZendeskAccount','rawAttributes','query','keys','intersection','model','attributes','fields','length','order','sort','pick','filters','filter','where','merge','key','field','options','includeAll','include','findAll','rows','show','params','create','body','find','destroy','map'];(function(_0x4544d3,_0x149a72){var _0x36aeca=function(_0x2b3fc8){while(--_0x2b3fc8){_0x4544d3['push'](_0x4544d3['shift']());}};_0x36aeca(++_0x149a72);}(_0x16dc,0xa1));var _0xc16d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x16dc[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xc16d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xc16d('0x1'));var zipdir=require(_0xc16d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc16d('0x3'));var moment=require(_0xc16d('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xc16d('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0xc16d('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xc16d('0x7'));var squel=require('squel');var crypto=require(_0xc16d('0x8'));var jsforce=require(_0xc16d('0x9'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xc16d('0xa'));var Papa=require('papaparse');var Redis=require(_0xc16d('0xb'));var authService=require(_0xc16d('0xc'));var qs=require(_0xc16d('0xd'));var hardwareService=require(_0xc16d('0xe'));var logger=require(_0xc16d('0xf'))(_0xc16d('0x10'));var utils=require(_0xc16d('0x11'));var config=require('../../config/environment');var db=require(_0xc16d('0x12'))['db'];var integrations=require(_0xc16d('0x13'));var jayson=require(_0xc16d('0x14'));var client=jayson[_0xc16d('0x15')]['http']({'port':0x232a});function checkPasswordPattern(_0x4fddee,_0x4e64b2,_0x449e62){if(_0x449e62){var _0x29731d=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x29731d[_0xc16d('0x16')](_0x4e64b2)){return _0x4fddee;}else{throw new Error(_0xc16d('0x17'));}}else{return _0x4fddee;}}function respondWithRpcPromise(_0x58f47f,_0xe97811,_0x7ab7ca,_0x4e1ea7){return new BPromise(function(_0x1f7410,_0x33ce65){var _0x1833c0=_0x4e1ea7||client;return _0x1833c0[_0xc16d('0x18')](_0x58f47f,_0x7ab7ca)[_0xc16d('0x19')](function(_0x20dfc2){logger[_0xc16d('0x1a')](_0xc16d('0x1b'),_0xe97811,_0xc16d('0x1c'));logger[_0xc16d('0x1d')]('ZendeskAccount,\x20%s,\x20%s,\x20%s',_0xe97811,'request\x20sent',JSON[_0xc16d('0x1e')](_0x20dfc2));if(_0x20dfc2[_0xc16d('0x1f')]){if(_0x20dfc2[_0xc16d('0x1f')][_0xc16d('0x20')]===0x1f4){logger[_0xc16d('0x1f')](_0xc16d('0x1b'),_0xe97811,_0x20dfc2['error'][_0xc16d('0x21')]);return _0x33ce65(_0x20dfc2[_0xc16d('0x1f')][_0xc16d('0x21')]);}logger[_0xc16d('0x1f')](_0xc16d('0x1b'),_0xe97811,_0x20dfc2[_0xc16d('0x1f')][_0xc16d('0x21')]);return _0x1f7410(_0x20dfc2['error']['message']);}else{logger[_0xc16d('0x1a')](_0xc16d('0x1b'),_0xe97811,_0xc16d('0x1c'));_0x1f7410(_0x20dfc2[_0xc16d('0x22')][_0xc16d('0x21')]);}})[_0xc16d('0x23')](function(_0x3de04d){logger[_0xc16d('0x1f')](_0xc16d('0x1b'),_0xe97811,_0x3de04d);_0x33ce65(_0x3de04d);});});}function respondWithStatusCode(_0x245d08,_0x185eef){_0x185eef=_0x185eef||0xcc;return function(_0x5c2024){if(_0x5c2024){return _0x245d08[_0xc16d('0x24')](_0x185eef);}return _0x245d08[_0xc16d('0x25')](_0x185eef)[_0xc16d('0x26')]();};}function respondWithResult(_0x1ca810,_0xe30d38){_0xe30d38=_0xe30d38||0xc8;return function(_0x5950e2){if(_0x5950e2){return _0x1ca810[_0xc16d('0x25')](_0xe30d38)['json'](_0x5950e2);}};}function respondWithFilteredResult(_0x53f7a1,_0x2e75ad){return function(_0x561a3a){if(_0x561a3a){var _0x161d16=_0x561a3a[_0xc16d('0x27')],_0x52d495=_0x2e75ad[_0xc16d('0x28')],_0x946cf0=_0x2e75ad[_0xc16d('0x28')]+_0x2e75ad[_0xc16d('0x29')],_0x443adc;if(_0x946cf0>=_0x161d16){_0x946cf0=_0x161d16;_0x443adc=0xc8;}else{_0x443adc=0xce;}_0x53f7a1[_0xc16d('0x25')](_0x443adc);return _0x53f7a1['set'](_0xc16d('0x2a'),_0x52d495+'-'+_0x946cf0+'/'+_0x161d16)['json'](_0x561a3a);}return null;};}function patchUpdates(_0x3f3935){return function(_0x48dc0b){try{jsonpatch[_0xc16d('0x2b')](_0x48dc0b,_0x3f3935,!![]);}catch(_0x454464){return BPromise['reject'](_0x454464);}return _0x48dc0b['save']();};}function saveUpdates(_0x2ecd6d,_0x1e0bd3){return function(_0x9f4ba1){if(_0x9f4ba1){return _0x9f4ba1[_0xc16d('0x2c')](_0x2ecd6d)[_0xc16d('0x19')](function(_0x266ae7){return _0x266ae7;});}return null;};}function removeEntity(_0x31d778,_0x22bf73){return function(_0x5bd813){if(_0x5bd813){return _0x5bd813['destroy']()[_0xc16d('0x19')](function(){_0x31d778[_0xc16d('0x25')](0xcc)[_0xc16d('0x26')]();});}};}function handleEntityNotFound(_0x56d928,_0x39f2c6){return function(_0x4b58bc){if(!_0x4b58bc){_0x56d928[_0xc16d('0x24')](0x194);}return _0x4b58bc;};}function handleError(_0x321e00,_0x595680){_0x595680=_0x595680||0x1f4;return function(_0x32778b){logger[_0xc16d('0x1f')](_0x32778b[_0xc16d('0x2d')]);if(_0x32778b['name']){delete _0x32778b[_0xc16d('0x2e')];}_0x321e00[_0xc16d('0x25')](_0x595680)[_0xc16d('0x2f')](_0x32778b);};}exports[_0xc16d('0x30')]=function(_0x454297,_0x13aad9){var _0x211bc3={},_0x524a58={},_0x9dbc5={'count':0x0,'rows':[]};var _0xb76db1=db[_0xc16d('0x31')][_0xc16d('0x32')];_0x524a58['model']=_['keys'](_0xb76db1);_0x524a58[_0xc16d('0x33')]=_[_0xc16d('0x34')](_0x454297[_0xc16d('0x33')]);_0x524a58['filters']=_[_0xc16d('0x35')](_0x524a58[_0xc16d('0x36')],_0x524a58[_0xc16d('0x33')]);_0x211bc3[_0xc16d('0x37')]=_[_0xc16d('0x35')](_0x524a58[_0xc16d('0x36')],qs[_0xc16d('0x38')](_0x454297[_0xc16d('0x33')][_0xc16d('0x38')]));_0x211bc3[_0xc16d('0x37')]=_0x211bc3['attributes'][_0xc16d('0x39')]?_0x211bc3[_0xc16d('0x37')]:_0x524a58[_0xc16d('0x36')];if(!_0x454297[_0xc16d('0x33')]['hasOwnProperty']('nolimit')){_0x211bc3[_0xc16d('0x29')]=qs[_0xc16d('0x29')](_0x454297[_0xc16d('0x33')][_0xc16d('0x29')]);_0x211bc3['offset']=qs['offset'](_0x454297[_0xc16d('0x33')][_0xc16d('0x28')]);}_0x211bc3[_0xc16d('0x3a')]=qs[_0xc16d('0x3b')](_0x454297[_0xc16d('0x33')]['sort']);_0x211bc3['where']=qs['filters'](_[_0xc16d('0x3c')](_0x454297[_0xc16d('0x33')],_0x524a58[_0xc16d('0x3d')]));if(_0x454297[_0xc16d('0x33')][_0xc16d('0x3e')]){_0x211bc3[_0xc16d('0x3f')]=_[_0xc16d('0x40')](_0x211bc3[_0xc16d('0x3f')],{'$or':_['map'](_0xb76db1,function(_0x37cc67){if(_0x37cc67['type'][_0xc16d('0x41')]!=='VIRTUAL'){var _0x357c7c={};_0x357c7c[_0x37cc67[_0xc16d('0x42')]]={'$like':'%'+_0x454297['query'][_0xc16d('0x3e')]+'%'};return _0x357c7c;}})});}_0x211bc3=_[_0xc16d('0x40')]({},_0x211bc3,_0x454297[_0xc16d('0x43')]);var _0x3184ae={'where':_0x211bc3['where']};return db[_0xc16d('0x31')][_0xc16d('0x27')](_0x3184ae)['then'](function(_0x3b0489){_0x9dbc5['count']=_0x3b0489;if(_0x454297[_0xc16d('0x33')][_0xc16d('0x44')]){_0x211bc3[_0xc16d('0x45')]=[{'all':!![]}];}return db[_0xc16d('0x31')][_0xc16d('0x46')](_0x211bc3);})['then'](function(_0x59906d){_0x9dbc5[_0xc16d('0x47')]=_0x59906d;return _0x9dbc5;})['then'](respondWithFilteredResult(_0x13aad9,_0x211bc3))[_0xc16d('0x23')](handleError(_0x13aad9,null));};exports[_0xc16d('0x48')]=function(_0x21273a,_0x306657){var _0x5d1dc0={'raw':![],'where':{'id':_0x21273a[_0xc16d('0x49')]['id']}},_0x18d809={};_0x18d809[_0xc16d('0x36')]=_[_0xc16d('0x34')](db[_0xc16d('0x31')][_0xc16d('0x32')]);_0x18d809['query']=_[_0xc16d('0x34')](_0x21273a[_0xc16d('0x33')]);_0x18d809[_0xc16d('0x3d')]=_['intersection'](_0x18d809['model'],_0x18d809['query']);_0x5d1dc0[_0xc16d('0x37')]=_[_0xc16d('0x35')](_0x18d809[_0xc16d('0x36')],qs[_0xc16d('0x38')](_0x21273a[_0xc16d('0x33')][_0xc16d('0x38')]));_0x5d1dc0[_0xc16d('0x37')]=_0x5d1dc0[_0xc16d('0x37')]['length']?_0x5d1dc0[_0xc16d('0x37')]:_0x18d809[_0xc16d('0x36')];if(_0x21273a[_0xc16d('0x33')][_0xc16d('0x44')]){_0x5d1dc0[_0xc16d('0x45')]=[{'all':!![]}];}_0x5d1dc0=_[_0xc16d('0x40')]({},_0x5d1dc0,_0x21273a[_0xc16d('0x43')]);return db['ZendeskAccount']['find'](_0x5d1dc0)[_0xc16d('0x19')](handleEntityNotFound(_0x306657,null))[_0xc16d('0x19')](respondWithResult(_0x306657,null))[_0xc16d('0x23')](handleError(_0x306657,null));};exports['create']=function(_0x370c03,_0x39dfeb){return db[_0xc16d('0x31')][_0xc16d('0x4a')](_0x370c03[_0xc16d('0x4b')],{})[_0xc16d('0x19')](respondWithResult(_0x39dfeb,0xc9))[_0xc16d('0x23')](handleError(_0x39dfeb,null));};exports[_0xc16d('0x2c')]=function(_0x4d0881,_0x249348){if(_0x4d0881['body']['id']){delete _0x4d0881[_0xc16d('0x4b')]['id'];}return db[_0xc16d('0x31')][_0xc16d('0x4c')]({'where':{'id':_0x4d0881[_0xc16d('0x49')]['id']}})[_0xc16d('0x19')](handleEntityNotFound(_0x249348,null))['then'](saveUpdates(_0x4d0881[_0xc16d('0x4b')],null))[_0xc16d('0x19')](respondWithResult(_0x249348,null))['catch'](handleError(_0x249348,null));};exports[_0xc16d('0x4d')]=function(_0x3f36cc,_0x4562a9){return db['ZendeskAccount'][_0xc16d('0x4c')]({'where':{'id':_0x3f36cc[_0xc16d('0x49')]['id']}})[_0xc16d('0x19')](handleEntityNotFound(_0x4562a9,null))[_0xc16d('0x19')](removeEntity(_0x4562a9,null))[_0xc16d('0x23')](handleError(_0x4562a9,null));};exports['getConfigurations']=function(_0x2c730d,_0x1cf7c4,_0x2bf7d5){var _0x18f9b2={};var _0x527e06={};var _0x1167ec;var _0x254eab;return db[_0xc16d('0x31')]['findOne']({'where':{'id':_0x2c730d[_0xc16d('0x49')]['id']}})['then'](handleEntityNotFound(_0x1cf7c4,null))[_0xc16d('0x19')](function(_0x229236){if(_0x229236){_0x1167ec=_0x229236;_0x527e06[_0xc16d('0x36')]=_[_0xc16d('0x34')](db['ZendeskConfiguration'][_0xc16d('0x32')]);_0x527e06['query']=_[_0xc16d('0x34')](_0x2c730d[_0xc16d('0x33')]);_0x527e06[_0xc16d('0x3d')]=_[_0xc16d('0x35')](_0x527e06[_0xc16d('0x36')],_0x527e06['query']);_0x18f9b2[_0xc16d('0x37')]=_[_0xc16d('0x35')](_0x527e06['model'],qs['fields'](_0x2c730d['query']['fields']));_0x18f9b2[_0xc16d('0x37')]=_0x18f9b2[_0xc16d('0x37')][_0xc16d('0x39')]?_0x18f9b2[_0xc16d('0x37')]:_0x527e06[_0xc16d('0x36')];_0x18f9b2[_0xc16d('0x3a')]=qs['sort'](_0x2c730d[_0xc16d('0x33')]['sort']);_0x18f9b2['where']=qs[_0xc16d('0x3d')](_[_0xc16d('0x3c')](_0x2c730d[_0xc16d('0x33')],_0x527e06[_0xc16d('0x3d')]));if(_0x2c730d[_0xc16d('0x33')][_0xc16d('0x3e')]){_0x18f9b2[_0xc16d('0x3f')]=_[_0xc16d('0x40')](_0x18f9b2['where'],{'$or':_[_0xc16d('0x4e')](_0x18f9b2['attributes'],function(_0x5512c4){var _0x299be4={};_0x299be4[_0x5512c4]={'$like':'%'+_0x2c730d['query']['filter']+'%'};return _0x299be4;})});}_0x18f9b2=_['merge']({},_0x18f9b2,_0x2c730d['options']);return _0x1167ec[_0xc16d('0x4f')](_0x18f9b2);}})[_0xc16d('0x19')](function(_0x265a30){if(_0x265a30){_0x254eab=_0x265a30['length'];if(!_0x2c730d[_0xc16d('0x33')][_0xc16d('0x50')](_0xc16d('0x51'))){_0x18f9b2[_0xc16d('0x29')]=qs[_0xc16d('0x29')](_0x2c730d['query']['limit']);_0x18f9b2[_0xc16d('0x28')]=qs['offset'](_0x2c730d[_0xc16d('0x33')][_0xc16d('0x28')]);}return _0x1167ec[_0xc16d('0x4f')](_0x18f9b2);}})[_0xc16d('0x19')](function(_0x143900){if(_0x143900){return _0x143900?{'count':_0x254eab,'rows':_0x143900}:null;}})[_0xc16d('0x19')](respondWithResult(_0x1cf7c4,null))[_0xc16d('0x23')](handleError(_0x1cf7c4,null));};exports['addConfiguration']=function(_0xe3fb1e,_0x434103,_0x4f842d){if(_0xe3fb1e[_0xc16d('0x4b')]['id']){delete _0xe3fb1e['body']['id'];}return db['ZendeskAccount'][_0xc16d('0x52')]({'where':{'id':_0xe3fb1e[_0xc16d('0x49')]['id']}})[_0xc16d('0x19')](handleEntityNotFound(_0x434103,null))[_0xc16d('0x19')](function(_0x4fd50c){if(_0x4fd50c){_0xe3fb1e[_0xc16d('0x4b')][_0xc16d('0x53')]=_0x4fd50c['id'];_0xe3fb1e['body'][_0xc16d('0x54')]=integrations[_0xc16d('0x55')](_0xe3fb1e['body']['channel'],_0xe3fb1e[_0xc16d('0x4b')]['type']);_0xe3fb1e[_0xc16d('0x4b')][_0xc16d('0x56')]=integrations[_0xc16d('0x57')](_0xe3fb1e[_0xc16d('0x4b')][_0xc16d('0x58')],_0xe3fb1e[_0xc16d('0x4b')][_0xc16d('0x59')]);return db[_0xc16d('0x5a')][_0xc16d('0x4a')](_0xe3fb1e[_0xc16d('0x4b')],{'include':[{'model':db[_0xc16d('0x5b')],'as':'Subjects'},{'model':db[_0xc16d('0x5b')],'as':_0xc16d('0x56')}]});}return null;})[_0xc16d('0x19')](respondWithResult(_0x434103,null))['catch'](handleError(_0x434103,null));};exports[_0xc16d('0x5c')]=function(_0x274b65,_0x1ced07,_0x3cb4c2){var _0x44efed='';return db[_0xc16d('0x31')][_0xc16d('0x52')]({'where':{'id':_0x274b65[_0xc16d('0x49')]['id']},'attributes':['id',_0xc16d('0x5d'),'password','token','authType','remoteUri']})[_0xc16d('0x19')](handleEntityNotFound(_0x1ced07,null))[_0xc16d('0x19')](function(_0x210c2a){if(_0x210c2a){_0x44efed=_0x210c2a['remoteUri'];var _0x300500=_0x44efed[_0xc16d('0x5e')](-0x1);if(_0x300500==='/'){_0x44efed=_0x44efed[_0xc16d('0x5f')](0x0,_0x44efed[_0xc16d('0x60')](_0x300500));}var _0x33d4c2={'method':_0xc16d('0x61'),'uri':util[_0xc16d('0x62')](_0xc16d('0x63'),_0x44efed,'ticket_fields'),'json':!![]};switch(_0x210c2a[_0xc16d('0x64')]){case _0xc16d('0x65'):_0x33d4c2[_0xc16d('0x66')]={'Authorization':util['format'](_0xc16d('0x67'),new Buffer(util[_0xc16d('0x62')](_0xc16d('0x68'),_0x210c2a[_0xc16d('0x5d')],_0x210c2a['password']))[_0xc16d('0x69')](_0xc16d('0x6a')))};break;case _0xc16d('0x6b'):_0x33d4c2[_0xc16d('0x66')]={'Authorization':util[_0xc16d('0x62')]('Basic\x20%s',new Buffer(util[_0xc16d('0x62')](_0xc16d('0x6c'),_0x210c2a['username'],_0x210c2a[_0xc16d('0x6b')]))[_0xc16d('0x69')](_0xc16d('0x6a')))};break;default:throw new db[(_0xc16d('0x6d'))]['ValidationError'](_0xc16d('0x6e'));}return rp(_0x33d4c2);}})[_0xc16d('0x19')](function(_0x57ff2d){if(_0x57ff2d){var _0x408ba9=['subject',_0xc16d('0x6f'),'group','assignee'];_[_0xc16d('0x70')](_0x57ff2d[_0xc16d('0x71')],function(_0x2f01a4){return _0x408ba9[_0xc16d('0x72')](_0x2f01a4[_0xc16d('0x59')]);});return{'count':_0x57ff2d[_0xc16d('0x71')][_0xc16d('0x39')],'rows':_[_0xc16d('0x4e')](_0x57ff2d[_0xc16d('0x71')],function(_0x3de64b){return{'id':_0x3de64b['id'],'name':_0x3de64b['position']>0x7?_0x3de64b['title']:_0x3de64b[_0xc16d('0x59')],'custom':_0x3de64b[_0xc16d('0x73')]>0x7?!![]:![],'options':_0x3de64b['system_field_options']?_0x3de64b['system_field_options']:_0x3de64b[_0xc16d('0x74')]?_0x3de64b[_0xc16d('0x74')]:[]};})};}})['then'](respondWithResult(_0x1ced07,null))['catch'](function(_0x172f89){var _0x1aba99=_0x274b65[_0xc16d('0x33')]['test']?0x1f4:_0x172f89[_0xc16d('0x75')]||0x1f4;logger['error'](_0xc16d('0x76'),_0xc16d('0x5c'),_0x1aba99,JSON[_0xc16d('0x1e')](_0x172f89));delete _0x172f89[_0xc16d('0x2e')];if(_0x1aba99===0x191){_0x1aba99=0x190;}_0x1ced07[_0xc16d('0x25')](_0x1aba99)[_0xc16d('0x2f')](_0x274b65[_0xc16d('0x33')][_0xc16d('0x16')]?{'message':_0xc16d('0x77'),'statusCode':_0x172f89[_0xc16d('0x75')]}:_0x172f89);});};
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.model.js b/server/api/intZendeskAccount/intZendeskAccount.model.js
index dd18ba8..e70616e 100644
--- a/server/api/intZendeskAccount/intZendeskAccount.model.js
+++ b/server/api/intZendeskAccount/intZendeskAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x287e=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./intZendeskAccount.attributes','../../components/integrations/configuration','lodash'];(function(_0x1fce4e,_0xad3074){var _0x10d843=function(_0x33ce3b){while(--_0x33ce3b){_0x1fce4e['push'](_0x1fce4e['shift']());}};_0x10d843(++_0xad3074);}(_0x287e,0x1e3));var _0xe287=function(_0x3763b8,_0x427d8b){_0x3763b8=_0x3763b8-0x0;var _0x27e6a5=_0x287e[_0x3763b8];return _0x27e6a5;};'use strict';var _=require(_0xe287('0x0'));var util=require(_0xe287('0x1'));var logger=require(_0xe287('0x2'))(_0xe287('0x3'));var moment=require(_0xe287('0x4'));var BPromise=require(_0xe287('0x5'));var rp=require(_0xe287('0x6'));var fs=require('fs');var path=require(_0xe287('0x7'));var rimraf=require(_0xe287('0x8'));var config=require('../../config/environment');var attributes=require(_0xe287('0x9'));var integrations=require(_0xe287('0xa'));module['exports']=function(_0x4b3807,_0x38bd18){return _0x4b3807['define']('ZendeskAccount',attributes,{'tableName':'int_zendesk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcf30=['bluebird','request-promise','./intZendeskAccount.attributes','define','ZendeskAccount','int_zendesk_accounts','lodash','util','../../config/logger','api'];(function(_0x2a6d49,_0x2726ea){var _0x37bd9a=function(_0x46fec2){while(--_0x46fec2){_0x2a6d49['push'](_0x2a6d49['shift']());}};_0x37bd9a(++_0x2726ea);}(_0xcf30,0x128));var _0x0cf3=function(_0xf9de0f,_0x27390f){_0xf9de0f=_0xf9de0f-0x0;var _0x2fd7ea=_0xcf30[_0xf9de0f];return _0x2fd7ea;};'use strict';var _=require(_0x0cf3('0x0'));var util=require(_0x0cf3('0x1'));var logger=require(_0x0cf3('0x2'))(_0x0cf3('0x3'));var moment=require('moment');var BPromise=require(_0x0cf3('0x4'));var rp=require(_0x0cf3('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x0cf3('0x6'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x57016d,_0x126c36){return _0x57016d[_0x0cf3('0x7')](_0x0cf3('0x8'),attributes,{'tableName':_0x0cf3('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.rpc.js b/server/api/intZendeskAccount/intZendeskAccount.rpc.js
index 9c6d72c..4595ff1 100644
--- a/server/api/intZendeskAccount/intZendeskAccount.rpc.js
+++ b/server/api/intZendeskAccount/intZendeskAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9fd4=['model','ShowZendeskAccount','find','where','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetZendeskAccount','ZendeskAccount','options','limit','include','attributes','map'];(function(_0x171c80,_0x1dbf36){var _0x2a4385=function(_0x5a34a6){while(--_0x5a34a6){_0x171c80['push'](_0x171c80['shift']());}};_0x2a4385(++_0x1dbf36);}(_0x9fd4,0x16c));var _0x49fd=function(_0x39ff5c,_0x3de001){_0x39ff5c=_0x39ff5c-0x0;var _0x1eba54=_0x9fd4[_0x39ff5c];return _0x1eba54;};'use strict';var _=require(_0x49fd('0x0'));var util=require(_0x49fd('0x1'));var moment=require(_0x49fd('0x2'));var BPromise=require(_0x49fd('0x3'));var rs=require(_0x49fd('0x4'));var fs=require('fs');var Redis=require(_0x49fd('0x5'));var db=require(_0x49fd('0x6'))['db'];var utils=require(_0x49fd('0x7'));var logger=require(_0x49fd('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x49fd('0x9'));var client=jayson[_0x49fd('0xa')][_0x49fd('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x9353cd,_0x48b999,_0x14bb94){return new BPromise(function(_0x461ac1,_0x36f605){return client[_0x49fd('0xc')](_0x9353cd,_0x14bb94)[_0x49fd('0xd')](function(_0x4a1c47){logger[_0x49fd('0xe')](_0x49fd('0xf'),_0x48b999,_0x49fd('0x10'));logger[_0x49fd('0x11')](_0x49fd('0x12'),_0x48b999,_0x49fd('0x10'),JSON[_0x49fd('0x13')](_0x4a1c47));if(_0x4a1c47['error']){if(_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x15')]===0x1f4){logger[_0x49fd('0x14')](_0x49fd('0xf'),_0x48b999,_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);return _0x36f605(_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);}logger[_0x49fd('0x14')](_0x49fd('0xf'),_0x48b999,_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);return _0x461ac1(_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);}else{logger[_0x49fd('0xe')](_0x49fd('0xf'),_0x48b999,_0x49fd('0x10'));_0x461ac1(_0x4a1c47[_0x49fd('0x17')][_0x49fd('0x16')]);}})[_0x49fd('0x18')](function(_0x14c34f){logger[_0x49fd('0x14')](_0x49fd('0xf'),_0x48b999,_0x14c34f);_0x36f605(_0x14c34f);});});}exports[_0x49fd('0x19')]=function(_0xb55d24){var _0x5d568d=this;return new Promise(function(_0x598793,_0x2dc611){return db[_0x49fd('0x1a')]['findAll']({'raw':_0xb55d24['options']?_0xb55d24[_0x49fd('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0xb55d24[_0x49fd('0x1b')]?_0xb55d24[_0x49fd('0x1b')]['where']||null:null,'attributes':_0xb55d24[_0x49fd('0x1b')]?_0xb55d24[_0x49fd('0x1b')]['attributes']||null:null,'limit':_0xb55d24[_0x49fd('0x1b')]?_0xb55d24[_0x49fd('0x1b')][_0x49fd('0x1c')]||null:null,'include':_0xb55d24[_0x49fd('0x1b')]?_0xb55d24[_0x49fd('0x1b')][_0x49fd('0x1d')]?_['map'](_0xb55d24[_0x49fd('0x1b')][_0x49fd('0x1d')],function(_0x8f202b){return{'model':db[_0x8f202b['model']],'as':_0x8f202b['as'],'attributes':_0x8f202b[_0x49fd('0x1e')],'include':_0x8f202b[_0x49fd('0x1d')]?_[_0x49fd('0x1f')](_0x8f202b['include'],function(_0x597161){return{'model':db[_0x597161['model']],'as':_0x597161['as'],'attributes':_0x597161[_0x49fd('0x1e')],'include':_0x597161[_0x49fd('0x1d')]?_[_0x49fd('0x1f')](_0x597161[_0x49fd('0x1d')],function(_0x9587b9){return{'model':db[_0x9587b9[_0x49fd('0x20')]],'as':_0x9587b9['as'],'attributes':_0x9587b9[_0x49fd('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x49fd('0xd')](function(_0x54c8bb){logger[_0x49fd('0xe')]('GetZendeskAccount',_0xb55d24);logger[_0x49fd('0x11')](_0x49fd('0x19'),_0xb55d24,JSON['stringify'](_0x54c8bb));_0x598793(_0x54c8bb);})[_0x49fd('0x18')](function(_0x2c8568){logger[_0x49fd('0x14')](_0x49fd('0x19'),_0x2c8568[_0x49fd('0x16')],_0xb55d24);_0x2dc611(_0x5d568d[_0x49fd('0x14')](0x1f4,_0x2c8568[_0x49fd('0x16')]));});});};exports[_0x49fd('0x21')]=function(_0x4ae11b){var _0x42181b=this;return new Promise(function(_0x4869fc,_0x1952d0){return db['ZendeskAccount'][_0x49fd('0x22')]({'raw':_0x4ae11b[_0x49fd('0x1b')]?_0x4ae11b[_0x49fd('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x4ae11b['options']?_0x4ae11b['options'][_0x49fd('0x23')]||null:null,'attributes':_0x4ae11b[_0x49fd('0x1b')]?_0x4ae11b['options'][_0x49fd('0x1e')]||null:null,'include':_0x4ae11b['options']?_0x4ae11b['options'][_0x49fd('0x1d')]?_[_0x49fd('0x1f')](_0x4ae11b[_0x49fd('0x1b')][_0x49fd('0x1d')],function(_0x29fb50){return{'model':db[_0x29fb50['model']],'as':_0x29fb50['as'],'attributes':_0x29fb50['attributes'],'include':_0x29fb50[_0x49fd('0x1d')]?_[_0x49fd('0x1f')](_0x29fb50[_0x49fd('0x1d')],function(_0x28f88f){return{'model':db[_0x28f88f['model']],'as':_0x28f88f['as'],'attributes':_0x28f88f[_0x49fd('0x1e')],'include':_0x28f88f[_0x49fd('0x1d')]?_[_0x49fd('0x1f')](_0x28f88f[_0x49fd('0x1d')],function(_0x4363b5){return{'model':db[_0x4363b5[_0x49fd('0x20')]],'as':_0x4363b5['as'],'attributes':_0x4363b5[_0x49fd('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x49fd('0xd')](function(_0x98571b){logger[_0x49fd('0xe')](_0x49fd('0x21'),_0x4ae11b);logger['debug'](_0x49fd('0x21'),_0x4ae11b,JSON[_0x49fd('0x13')](_0x98571b));_0x4869fc(_0x98571b);})[_0x49fd('0x18')](function(_0xfea54d){logger[_0x49fd('0x14')](_0x49fd('0x21'),_0xfea54d[_0x49fd('0x16')],_0x4ae11b);_0x1952d0(_0x42181b[_0x49fd('0x14')](0x1f4,_0xfea54d[_0x49fd('0x16')]));});});};
\ No newline at end of file
+var _0x8107=['include','model','attributes','then','stringify','find','ShowZendeskAccount','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','debug','request\x20sent','error','code','ZendeskAccount,\x20%s,\x20%s','message','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','map'];(function(_0xda21ef,_0x139818){var _0x4f76d8=function(_0xea5558){while(--_0xea5558){_0xda21ef['push'](_0xda21ef['shift']());}};_0x4f76d8(++_0x139818);}(_0x8107,0x1f1));var _0x7810=function(_0x3e25ba,_0x4d5399){_0x3e25ba=_0x3e25ba-0x0;var _0x393fb8=_0x8107[_0x3e25ba];return _0x393fb8;};'use strict';var _=require('lodash');var util=require(_0x7810('0x0'));var moment=require('moment');var BPromise=require(_0x7810('0x1'));var rs=require(_0x7810('0x2'));var fs=require('fs');var Redis=require(_0x7810('0x3'));var db=require(_0x7810('0x4'))['db'];var utils=require(_0x7810('0x5'));var logger=require(_0x7810('0x6'))(_0x7810('0x7'));var config=require(_0x7810('0x8'));var jayson=require(_0x7810('0x9'));var client=jayson[_0x7810('0xa')][_0x7810('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x31b59a,_0x50a024,_0x260f04){return new BPromise(function(_0x19cb23,_0x1579da){return client[_0x7810('0xc')](_0x31b59a,_0x260f04)['then'](function(_0x32d2f1){logger[_0x7810('0xd')]('ZendeskAccount,\x20%s,\x20%s',_0x50a024,'request\x20sent');logger[_0x7810('0xe')]('ZendeskAccount,\x20%s,\x20%s,\x20%s',_0x50a024,_0x7810('0xf'),JSON['stringify'](_0x32d2f1));if(_0x32d2f1[_0x7810('0x10')]){if(_0x32d2f1[_0x7810('0x10')][_0x7810('0x11')]===0x1f4){logger[_0x7810('0x10')](_0x7810('0x12'),_0x50a024,_0x32d2f1[_0x7810('0x10')]['message']);return _0x1579da(_0x32d2f1[_0x7810('0x10')][_0x7810('0x13')]);}logger['error'](_0x7810('0x12'),_0x50a024,_0x32d2f1['error']['message']);return _0x19cb23(_0x32d2f1['error']['message']);}else{logger[_0x7810('0xd')](_0x7810('0x12'),_0x50a024,'request\x20sent');_0x19cb23(_0x32d2f1['result'][_0x7810('0x13')]);}})[_0x7810('0x14')](function(_0x3bd208){logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x50a024,_0x3bd208);_0x1579da(_0x3bd208);});});}exports[_0x7810('0x15')]=function(_0x3dbd45){var _0x11edb7=this;return new Promise(function(_0x4ae4fe,_0x5b408c){return db[_0x7810('0x16')][_0x7810('0x17')]({'raw':_0x3dbd45[_0x7810('0x18')]?_0x3dbd45[_0x7810('0x18')][_0x7810('0x19')]===undefined?!![]:![]:!![],'where':_0x3dbd45[_0x7810('0x18')]?_0x3dbd45[_0x7810('0x18')][_0x7810('0x1a')]||null:null,'attributes':_0x3dbd45[_0x7810('0x18')]?_0x3dbd45[_0x7810('0x18')]['attributes']||null:null,'limit':_0x3dbd45[_0x7810('0x18')]?_0x3dbd45[_0x7810('0x18')]['limit']||null:null,'include':_0x3dbd45[_0x7810('0x18')]?_0x3dbd45['options']['include']?_[_0x7810('0x1b')](_0x3dbd45[_0x7810('0x18')][_0x7810('0x1c')],function(_0x703a53){return{'model':db[_0x703a53[_0x7810('0x1d')]],'as':_0x703a53['as'],'attributes':_0x703a53[_0x7810('0x1e')],'include':_0x703a53['include']?_[_0x7810('0x1b')](_0x703a53[_0x7810('0x1c')],function(_0x569adf){return{'model':db[_0x569adf[_0x7810('0x1d')]],'as':_0x569adf['as'],'attributes':_0x569adf[_0x7810('0x1e')],'include':_0x569adf[_0x7810('0x1c')]?_[_0x7810('0x1b')](_0x569adf[_0x7810('0x1c')],function(_0x19e6c9){return{'model':db[_0x19e6c9[_0x7810('0x1d')]],'as':_0x19e6c9['as'],'attributes':_0x19e6c9[_0x7810('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x7810('0x1f')](function(_0x20a84e){logger[_0x7810('0xd')](_0x7810('0x15'),_0x3dbd45);logger['debug'](_0x7810('0x15'),_0x3dbd45,JSON[_0x7810('0x20')](_0x20a84e));_0x4ae4fe(_0x20a84e);})[_0x7810('0x14')](function(_0x12ed9c){logger['error'](_0x7810('0x15'),_0x12ed9c[_0x7810('0x13')],_0x3dbd45);_0x5b408c(_0x11edb7[_0x7810('0x10')](0x1f4,_0x12ed9c[_0x7810('0x13')]));});});};exports['ShowZendeskAccount']=function(_0x223fa5){var _0x43646d=this;return new Promise(function(_0x39d101,_0x2188ac){return db[_0x7810('0x16')][_0x7810('0x21')]({'raw':_0x223fa5[_0x7810('0x18')]?_0x223fa5['options']['raw']===undefined?!![]:![]:!![],'where':_0x223fa5['options']?_0x223fa5[_0x7810('0x18')][_0x7810('0x1a')]||null:null,'attributes':_0x223fa5[_0x7810('0x18')]?_0x223fa5[_0x7810('0x18')]['attributes']||null:null,'include':_0x223fa5[_0x7810('0x18')]?_0x223fa5[_0x7810('0x18')][_0x7810('0x1c')]?_['map'](_0x223fa5['options'][_0x7810('0x1c')],function(_0x6a5215){return{'model':db[_0x6a5215[_0x7810('0x1d')]],'as':_0x6a5215['as'],'attributes':_0x6a5215[_0x7810('0x1e')],'include':_0x6a5215['include']?_[_0x7810('0x1b')](_0x6a5215[_0x7810('0x1c')],function(_0x6ee749){return{'model':db[_0x6ee749[_0x7810('0x1d')]],'as':_0x6ee749['as'],'attributes':_0x6ee749['attributes'],'include':_0x6ee749[_0x7810('0x1c')]?_[_0x7810('0x1b')](_0x6ee749[_0x7810('0x1c')],function(_0x40c250){return{'model':db[_0x40c250['model']],'as':_0x40c250['as'],'attributes':_0x40c250[_0x7810('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x7810('0x1f')](function(_0x260297){logger[_0x7810('0xd')]('ShowZendeskAccount',_0x223fa5);logger[_0x7810('0xe')](_0x7810('0x22'),_0x223fa5,JSON[_0x7810('0x20')](_0x260297));_0x39d101(_0x260297);})[_0x7810('0x14')](function(_0x172006){logger['error'](_0x7810('0x22'),_0x172006[_0x7810('0x13')],_0x223fa5);_0x2188ac(_0x43646d[_0x7810('0x10')](0x1f4,_0x172006['message']));});});};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/index.js b/server/api/intZendeskConfiguration/index.js
index c6823a7..a5c6e70 100644
--- a/server/api/intZendeskConfiguration/index.js
+++ b/server/api/intZendeskConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc78b=['exports','multer','util','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','./intZendeskConfiguration.controller','index','get','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','getSubjects','getDescriptions','getTags','create','post','/:id/tags','setTags','update'];(function(_0x5a905e,_0x31aa4a){var _0x4124d6=function(_0x37c28a){while(--_0x37c28a){_0x5a905e['push'](_0x5a905e['shift']());}};_0x4124d6(++_0x31aa4a);}(_0xc78b,0x191));var _0xbc78=function(_0x2eee27,_0x5b70d8){_0x2eee27=_0x2eee27-0x0;var _0x503181=_0xc78b[_0x2eee27];return _0x503181;};'use strict';var multer=require(_0xbc78('0x0'));var util=require(_0xbc78('0x1'));var path=require(_0xbc78('0x2'));var timeout=require(_0xbc78('0x3'));var express=require('express');var router=express[_0xbc78('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xbc78('0x5'));var config=require(_0xbc78('0x6'));var controller=require(_0xbc78('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xbc78('0x8')]);router[_0xbc78('0x9')](_0xbc78('0xa'),auth[_0xbc78('0xb')](),controller[_0xbc78('0xc')]);router['get'](_0xbc78('0xd'),auth[_0xbc78('0xb')](),controller[_0xbc78('0xe')]);router['get'](_0xbc78('0xf'),auth['isAuthenticated'](),controller[_0xbc78('0x10')]);router[_0xbc78('0x9')]('/:id/descriptions',auth[_0xbc78('0xb')](),controller[_0xbc78('0x11')]);router[_0xbc78('0x9')]('/:id/tags',auth[_0xbc78('0xb')](),controller[_0xbc78('0x12')]);router['post']('/',auth[_0xbc78('0xb')](),controller[_0xbc78('0x13')]);router[_0xbc78('0x14')](_0xbc78('0x15'),auth[_0xbc78('0xb')](),controller[_0xbc78('0x16')]);router['put']('/:id',auth[_0xbc78('0xb')](),controller[_0xbc78('0x17')]);router['delete'](_0xbc78('0xa'),auth[_0xbc78('0xb')](),controller['destroy']);module[_0xbc78('0x18')]=router;
\ No newline at end of file
+var _0x5d23=['setTags','put','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./intZendeskConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','/:id/tags','getTags','post','create'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x5d23,0x1a5));var _0x35d2=function(_0x3cf972,_0x5e5254){_0x3cf972=_0x3cf972-0x0;var _0x2eaef6=_0x5d23[_0x3cf972];return _0x2eaef6;};'use strict';var multer=require(_0x35d2('0x0'));var util=require('util');var path=require(_0x35d2('0x1'));var timeout=require(_0x35d2('0x2'));var express=require(_0x35d2('0x3'));var router=express[_0x35d2('0x4')]();var auth=require(_0x35d2('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x35d2('0x6'));var controller=require(_0x35d2('0x7'));router[_0x35d2('0x8')]('/',auth[_0x35d2('0x9')](),controller[_0x35d2('0xa')]);router[_0x35d2('0x8')](_0x35d2('0xb'),auth[_0x35d2('0x9')](),controller[_0x35d2('0xc')]);router[_0x35d2('0x8')]('/:id/fields',auth[_0x35d2('0x9')](),controller[_0x35d2('0xd')]);router[_0x35d2('0x8')](_0x35d2('0xe'),auth[_0x35d2('0x9')](),controller[_0x35d2('0xf')]);router[_0x35d2('0x8')](_0x35d2('0x10'),auth[_0x35d2('0x9')](),controller['getDescriptions']);router[_0x35d2('0x8')](_0x35d2('0x11'),auth[_0x35d2('0x9')](),controller[_0x35d2('0x12')]);router[_0x35d2('0x13')]('/',auth[_0x35d2('0x9')](),controller[_0x35d2('0x14')]);router[_0x35d2('0x13')](_0x35d2('0x11'),auth[_0x35d2('0x9')](),controller[_0x35d2('0x15')]);router[_0x35d2('0x16')](_0x35d2('0xb'),auth['isAuthenticated'](),controller[_0x35d2('0x17')]);router[_0x35d2('0x18')]('/:id',auth[_0x35d2('0x9')](),controller['destroy']);module[_0x35d2('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js
index 3943963..5430526 100644
--- a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js
+++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x236d=['sequelize','exports','STRING'];(function(_0x29d2e1,_0x465471){var _0x5ebc7f=function(_0x943579){while(--_0x943579){_0x29d2e1['push'](_0x29d2e1['shift']());}};_0x5ebc7f(++_0x465471);}(_0x236d,0xa5));var _0xd236=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x236d[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0xd236('0x0'));module[_0xd236('0x1')]={'name':{'type':Sequelize[_0xd236('0x2')]},'description':{'type':Sequelize[_0xd236('0x2')]}};
\ No newline at end of file
+var _0xaafc=['exports','STRING','sequelize'];(function(_0x2218cb,_0x9a5b5c){var _0x2220e4=function(_0x3617cd){while(--_0x3617cd){_0x2218cb['push'](_0x2218cb['shift']());}};_0x2220e4(++_0x9a5b5c);}(_0xaafc,0x1b2));var _0xcaaf=function(_0x598195,_0x348501){_0x598195=_0x598195-0x0;var _0x1f0b46=_0xaafc[_0x598195];return _0x1f0b46;};'use strict';var Sequelize=require(_0xcaaf('0x0'));module[_0xcaaf('0x1')]={'name':{'type':Sequelize[_0xcaaf('0x2')]},'description':{'type':Sequelize[_0xcaaf('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js
index 4ec6bad..0d1614e 100644
--- a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js
+++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0135=['../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','json','offset','set','Content-Range','reject','save','destroy','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','type','key','field','ZendeskConfiguration','includeAll','include','findAll','rows','length','find','create','update','body','params','getFields','findOne','ZendeskField','options','getSubjects','getDescriptions','getTags','Tag','setTags','ids','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','path','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x0135,0xaa));var _0x5013=function(_0x2cdefa,_0x29d0f9){_0x2cdefa=_0x2cdefa-0x0;var _0x572e14=_0x0135[_0x2cdefa];return _0x572e14;};'use strict';var pdf=require(_0x5013('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x5013('0x1'));var zipdir=require(_0x5013('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5013('0x3'));var moment=require(_0x5013('0x4'));var BPromise=require(_0x5013('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x5013('0x6'));var sox=require('sox');var csv=require(_0x5013('0x7'));var ejs=require(_0x5013('0x8'));var fs=require('fs');var _=require(_0x5013('0x9'));var squel=require(_0x5013('0xa'));var crypto=require(_0x5013('0xb'));var jsforce=require(_0x5013('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5013('0xd'));var Papa=require('papaparse');var Redis=require(_0x5013('0xe'));var authService=require(_0x5013('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x5013('0x10'));var logger=require('../../config/logger')(_0x5013('0x11'));var utils=require(_0x5013('0x12'));var config=require(_0x5013('0x13'));var db=require(_0x5013('0x14'))['db'];var jayson=require(_0x5013('0x15'));var client=jayson[_0x5013('0x16')][_0x5013('0x17')]({'port':0x232a});function checkPasswordPattern(_0x227051,_0x280143,_0x350df3){if(_0x350df3){var _0x4111a1=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4111a1[_0x5013('0x18')](_0x280143)){return _0x227051;}else{throw new Error(_0x5013('0x19'));}}else{return _0x227051;}}function respondWithRpcPromise(_0x49eae4,_0x4b9871,_0x423037,_0x268d16){return new BPromise(function(_0x2fec6c,_0x5539db){var _0x42c9d0=_0x268d16||client;return _0x42c9d0[_0x5013('0x1a')](_0x49eae4,_0x423037)[_0x5013('0x1b')](function(_0x3f7760){logger[_0x5013('0x1c')](_0x5013('0x1d'),_0x4b9871,_0x5013('0x1e'));logger[_0x5013('0x1f')](_0x5013('0x20'),_0x4b9871,'request\x20sent',JSON[_0x5013('0x21')](_0x3f7760));if(_0x3f7760[_0x5013('0x22')]){if(_0x3f7760[_0x5013('0x22')]['code']===0x1f4){logger[_0x5013('0x22')](_0x5013('0x1d'),_0x4b9871,_0x3f7760[_0x5013('0x22')][_0x5013('0x23')]);return _0x5539db(_0x3f7760[_0x5013('0x22')][_0x5013('0x23')]);}logger[_0x5013('0x22')](_0x5013('0x1d'),_0x4b9871,_0x3f7760[_0x5013('0x22')]['message']);return _0x2fec6c(_0x3f7760[_0x5013('0x22')][_0x5013('0x23')]);}else{logger[_0x5013('0x1c')](_0x5013('0x1d'),_0x4b9871,_0x5013('0x1e'));_0x2fec6c(_0x3f7760[_0x5013('0x24')]['message']);}})[_0x5013('0x25')](function(_0x19dce9){logger[_0x5013('0x22')](_0x5013('0x1d'),_0x4b9871,_0x19dce9);_0x5539db(_0x19dce9);});});}function respondWithStatusCode(_0x17d76d,_0x7883b0){_0x7883b0=_0x7883b0||0xcc;return function(_0xd46bd2){if(_0xd46bd2){return _0x17d76d[_0x5013('0x26')](_0x7883b0);}return _0x17d76d[_0x5013('0x27')](_0x7883b0)['end']();};}function respondWithResult(_0x5915ae,_0x31306b){_0x31306b=_0x31306b||0xc8;return function(_0x4dddb8){if(_0x4dddb8){return _0x5915ae[_0x5013('0x27')](_0x31306b)[_0x5013('0x28')](_0x4dddb8);}};}function respondWithFilteredResult(_0x42bb1f,_0x302eac){return function(_0x4175ed){if(_0x4175ed){var _0x3479fa=_0x4175ed['count'],_0x489361=_0x302eac['offset'],_0x452912=_0x302eac[_0x5013('0x29')]+_0x302eac['limit'],_0x3b86f0;if(_0x452912>=_0x3479fa){_0x452912=_0x3479fa;_0x3b86f0=0xc8;}else{_0x3b86f0=0xce;}_0x42bb1f[_0x5013('0x27')](_0x3b86f0);return _0x42bb1f[_0x5013('0x2a')](_0x5013('0x2b'),_0x489361+'-'+_0x452912+'/'+_0x3479fa)[_0x5013('0x28')](_0x4175ed);}return null;};}function patchUpdates(_0x342e43){return function(_0x472173){try{jsonpatch['apply'](_0x472173,_0x342e43,!![]);}catch(_0x379860){return BPromise[_0x5013('0x2c')](_0x379860);}return _0x472173[_0x5013('0x2d')]();};}function saveUpdates(_0x188fe7,_0x1b7587){return function(_0x157d70){if(_0x157d70){return _0x157d70['update'](_0x188fe7)[_0x5013('0x1b')](function(_0x4ca67e){return _0x4ca67e;});}return null;};}function removeEntity(_0x51eb13,_0x58d0b7){return function(_0x3af36f){if(_0x3af36f){return _0x3af36f[_0x5013('0x2e')]()['then'](function(){_0x51eb13['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1c0db5,_0x7a3a55){return function(_0x2e16d4){if(!_0x2e16d4){_0x1c0db5[_0x5013('0x26')](0x194);}return _0x2e16d4;};}function handleError(_0x1c5cc5,_0x412496){_0x412496=_0x412496||0x1f4;return function(_0x26cb4f){logger[_0x5013('0x22')](_0x26cb4f[_0x5013('0x2f')]);if(_0x26cb4f[_0x5013('0x30')]){delete _0x26cb4f['name'];}_0x1c5cc5[_0x5013('0x27')](_0x412496)[_0x5013('0x31')](_0x26cb4f);};}exports[_0x5013('0x32')]=function(_0x589b40,_0x39222a){var _0x15af84={},_0x38aefb={},_0x6f12fa={'count':0x0,'rows':[]};var _0xb42b0a=db['ZendeskConfiguration'][_0x5013('0x33')];_0x38aefb[_0x5013('0x34')]=_[_0x5013('0x35')](_0xb42b0a);_0x38aefb['query']=_[_0x5013('0x35')](_0x589b40[_0x5013('0x36')]);_0x38aefb[_0x5013('0x37')]=_[_0x5013('0x38')](_0x38aefb[_0x5013('0x34')],_0x38aefb['query']);_0x15af84[_0x5013('0x39')]=_[_0x5013('0x38')](_0x38aefb[_0x5013('0x34')],qs[_0x5013('0x3a')](_0x589b40[_0x5013('0x36')][_0x5013('0x3a')]));_0x15af84[_0x5013('0x39')]=_0x15af84[_0x5013('0x39')]['length']?_0x15af84['attributes']:_0x38aefb[_0x5013('0x34')];if(!_0x589b40['query'][_0x5013('0x3b')](_0x5013('0x3c'))){_0x15af84[_0x5013('0x3d')]=qs['limit'](_0x589b40[_0x5013('0x36')]['limit']);_0x15af84[_0x5013('0x29')]=qs[_0x5013('0x29')](_0x589b40['query'][_0x5013('0x29')]);}_0x15af84[_0x5013('0x3e')]=qs[_0x5013('0x3f')](_0x589b40[_0x5013('0x36')][_0x5013('0x3f')]);_0x15af84[_0x5013('0x40')]=qs['filters'](_[_0x5013('0x41')](_0x589b40[_0x5013('0x36')],_0x38aefb[_0x5013('0x37')]));if(_0x589b40[_0x5013('0x36')][_0x5013('0x42')]){_0x15af84[_0x5013('0x40')]=_[_0x5013('0x43')](_0x15af84[_0x5013('0x40')],{'$or':_[_0x5013('0x44')](_0xb42b0a,function(_0x22f8b6){if(_0x22f8b6[_0x5013('0x45')][_0x5013('0x46')]!=='VIRTUAL'){var _0x3d7866={};_0x3d7866[_0x22f8b6[_0x5013('0x47')]]={'$like':'%'+_0x589b40[_0x5013('0x36')][_0x5013('0x42')]+'%'};return _0x3d7866;}})});}_0x15af84=_['merge']({},_0x15af84,_0x589b40['options']);var _0x1115cf={'where':_0x15af84[_0x5013('0x40')]};return db[_0x5013('0x48')]['count'](_0x1115cf)[_0x5013('0x1b')](function(_0x293587){_0x6f12fa['count']=_0x293587;if(_0x589b40[_0x5013('0x36')][_0x5013('0x49')]){_0x15af84[_0x5013('0x4a')]=[{'all':!![]}];}return db[_0x5013('0x48')][_0x5013('0x4b')](_0x15af84);})[_0x5013('0x1b')](function(_0x2cf325){_0x6f12fa[_0x5013('0x4c')]=_0x2cf325;return _0x6f12fa;})[_0x5013('0x1b')](respondWithFilteredResult(_0x39222a,_0x15af84))[_0x5013('0x25')](handleError(_0x39222a,null));};exports['show']=function(_0x3686b5,_0x24ba75){var _0x3385c3={'raw':![],'where':{'id':_0x3686b5['params']['id']}},_0x50ff75={};_0x50ff75[_0x5013('0x34')]=_[_0x5013('0x35')](db[_0x5013('0x48')]['rawAttributes']);_0x50ff75[_0x5013('0x36')]=_[_0x5013('0x35')](_0x3686b5['query']);_0x50ff75['filters']=_['intersection'](_0x50ff75[_0x5013('0x34')],_0x50ff75[_0x5013('0x36')]);_0x3385c3[_0x5013('0x39')]=_[_0x5013('0x38')](_0x50ff75['model'],qs[_0x5013('0x3a')](_0x3686b5['query'][_0x5013('0x3a')]));_0x3385c3[_0x5013('0x39')]=_0x3385c3['attributes'][_0x5013('0x4d')]?_0x3385c3[_0x5013('0x39')]:_0x50ff75[_0x5013('0x34')];if(_0x3686b5[_0x5013('0x36')][_0x5013('0x49')]){_0x3385c3[_0x5013('0x4a')]=[{'all':!![]}];}_0x3385c3=_['merge']({},_0x3385c3,_0x3686b5['options']);return db['ZendeskConfiguration'][_0x5013('0x4e')](_0x3385c3)[_0x5013('0x1b')](handleEntityNotFound(_0x24ba75,null))[_0x5013('0x1b')](respondWithResult(_0x24ba75,null))[_0x5013('0x25')](handleError(_0x24ba75,null));};exports[_0x5013('0x4f')]=function(_0x361119,_0x2d790b){return db[_0x5013('0x48')][_0x5013('0x4f')](_0x361119['body'],{})[_0x5013('0x1b')](respondWithResult(_0x2d790b,0xc9))[_0x5013('0x25')](handleError(_0x2d790b,null));};exports[_0x5013('0x50')]=function(_0x217783,_0x19a8a3){if(_0x217783[_0x5013('0x51')]['id']){delete _0x217783[_0x5013('0x51')]['id'];}return db['ZendeskConfiguration'][_0x5013('0x4e')]({'where':{'id':_0x217783[_0x5013('0x52')]['id']}})[_0x5013('0x1b')](handleEntityNotFound(_0x19a8a3,null))[_0x5013('0x1b')](saveUpdates(_0x217783[_0x5013('0x51')],null))[_0x5013('0x1b')](respondWithResult(_0x19a8a3,null))[_0x5013('0x25')](handleError(_0x19a8a3,null));};exports[_0x5013('0x2e')]=function(_0xaacd96,_0x50c3f9){return db[_0x5013('0x48')][_0x5013('0x4e')]({'where':{'id':_0xaacd96[_0x5013('0x52')]['id']}})[_0x5013('0x1b')](handleEntityNotFound(_0x50c3f9,null))[_0x5013('0x1b')](removeEntity(_0x50c3f9,null))[_0x5013('0x25')](handleError(_0x50c3f9,null));};exports[_0x5013('0x53')]=function(_0x14b105,_0x4bc8d1,_0x99afee){var _0x131e2d={};var _0x40acfa={};var _0x2d58c8;var _0xef204;return db[_0x5013('0x48')][_0x5013('0x54')]({'where':{'id':_0x14b105[_0x5013('0x52')]['id']}})[_0x5013('0x1b')](handleEntityNotFound(_0x4bc8d1,null))['then'](function(_0x23be28){if(_0x23be28){_0x2d58c8=_0x23be28;_0x40acfa[_0x5013('0x34')]=_[_0x5013('0x35')](db[_0x5013('0x55')]['rawAttributes']);_0x40acfa[_0x5013('0x36')]=_[_0x5013('0x35')](_0x14b105[_0x5013('0x36')]);_0x40acfa[_0x5013('0x37')]=_[_0x5013('0x38')](_0x40acfa[_0x5013('0x34')],_0x40acfa[_0x5013('0x36')]);_0x131e2d[_0x5013('0x39')]=_[_0x5013('0x38')](_0x40acfa[_0x5013('0x34')],qs[_0x5013('0x3a')](_0x14b105[_0x5013('0x36')][_0x5013('0x3a')]));_0x131e2d[_0x5013('0x39')]=_0x131e2d[_0x5013('0x39')]['length']?_0x131e2d[_0x5013('0x39')]:_0x40acfa[_0x5013('0x34')];_0x131e2d[_0x5013('0x3e')]=qs[_0x5013('0x3f')](_0x14b105[_0x5013('0x36')][_0x5013('0x3f')]);_0x131e2d[_0x5013('0x40')]=qs[_0x5013('0x37')](_[_0x5013('0x41')](_0x14b105['query'],_0x40acfa[_0x5013('0x37')]));if(_0x14b105[_0x5013('0x36')][_0x5013('0x42')]){_0x131e2d[_0x5013('0x40')]=_['merge'](_0x131e2d[_0x5013('0x40')],{'$or':_[_0x5013('0x44')](_0x131e2d[_0x5013('0x39')],function(_0x1da56a){var _0x40d693={};_0x40d693[_0x1da56a]={'$like':'%'+_0x14b105['query']['filter']+'%'};return _0x40d693;})});}_0x131e2d=_['merge']({},_0x131e2d,_0x14b105[_0x5013('0x56')]);return _0x2d58c8[_0x5013('0x53')](_0x131e2d);}})[_0x5013('0x1b')](function(_0x423297){if(_0x423297){_0xef204=_0x423297[_0x5013('0x4d')];if(!_0x14b105[_0x5013('0x36')]['hasOwnProperty']('nolimit')){_0x131e2d[_0x5013('0x3d')]=qs[_0x5013('0x3d')](_0x14b105[_0x5013('0x36')][_0x5013('0x3d')]);_0x131e2d[_0x5013('0x29')]=qs[_0x5013('0x29')](_0x14b105[_0x5013('0x36')][_0x5013('0x29')]);}return _0x2d58c8[_0x5013('0x53')](_0x131e2d);}})[_0x5013('0x1b')](function(_0x15a143){if(_0x15a143){return _0x15a143?{'count':_0xef204,'rows':_0x15a143}:null;}})[_0x5013('0x1b')](respondWithResult(_0x4bc8d1,null))['catch'](handleError(_0x4bc8d1,null));};exports[_0x5013('0x57')]=function(_0x1acc4d,_0x5b5ee8,_0x45db07){var _0x2362ab={};var _0xb71dc6={};var _0x563dc7;var _0x53ab02;return db[_0x5013('0x48')][_0x5013('0x54')]({'where':{'id':_0x1acc4d[_0x5013('0x52')]['id']}})['then'](handleEntityNotFound(_0x5b5ee8,null))['then'](function(_0x49bdc1){if(_0x49bdc1){_0x563dc7=_0x49bdc1;_0xb71dc6[_0x5013('0x34')]=_[_0x5013('0x35')](db[_0x5013('0x55')][_0x5013('0x33')]);_0xb71dc6[_0x5013('0x36')]=_[_0x5013('0x35')](_0x1acc4d['query']);_0xb71dc6[_0x5013('0x37')]=_[_0x5013('0x38')](_0xb71dc6[_0x5013('0x34')],_0xb71dc6['query']);_0x2362ab[_0x5013('0x39')]=_['intersection'](_0xb71dc6['model'],qs[_0x5013('0x3a')](_0x1acc4d['query'][_0x5013('0x3a')]));_0x2362ab[_0x5013('0x39')]=_0x2362ab[_0x5013('0x39')][_0x5013('0x4d')]?_0x2362ab[_0x5013('0x39')]:_0xb71dc6[_0x5013('0x34')];_0x2362ab[_0x5013('0x3e')]=qs[_0x5013('0x3f')](_0x1acc4d[_0x5013('0x36')]['sort']);_0x2362ab['where']=qs[_0x5013('0x37')](_['pick'](_0x1acc4d[_0x5013('0x36')],_0xb71dc6[_0x5013('0x37')]));if(_0x1acc4d[_0x5013('0x36')][_0x5013('0x42')]){_0x2362ab[_0x5013('0x40')]=_['merge'](_0x2362ab[_0x5013('0x40')],{'$or':_[_0x5013('0x44')](_0x2362ab[_0x5013('0x39')],function(_0x285b72){var _0x3cde16={};_0x3cde16[_0x285b72]={'$like':'%'+_0x1acc4d[_0x5013('0x36')][_0x5013('0x42')]+'%'};return _0x3cde16;})});}_0x2362ab=_[_0x5013('0x43')]({},_0x2362ab,_0x1acc4d[_0x5013('0x56')]);return _0x563dc7[_0x5013('0x57')](_0x2362ab);}})[_0x5013('0x1b')](function(_0x3e3829){if(_0x3e3829){_0x53ab02=_0x3e3829['length'];if(!_0x1acc4d[_0x5013('0x36')][_0x5013('0x3b')](_0x5013('0x3c'))){_0x2362ab[_0x5013('0x3d')]=qs[_0x5013('0x3d')](_0x1acc4d[_0x5013('0x36')][_0x5013('0x3d')]);_0x2362ab[_0x5013('0x29')]=qs[_0x5013('0x29')](_0x1acc4d[_0x5013('0x36')][_0x5013('0x29')]);}return _0x563dc7['getSubjects'](_0x2362ab);}})[_0x5013('0x1b')](function(_0x2a635e){if(_0x2a635e){return _0x2a635e?{'count':_0x53ab02,'rows':_0x2a635e}:null;}})[_0x5013('0x1b')](respondWithResult(_0x5b5ee8,null))[_0x5013('0x25')](handleError(_0x5b5ee8,null));};exports['getDescriptions']=function(_0x27e89f,_0x20abab,_0x4782de){var _0x16a1e7={};var _0xa60a0e={};var _0x10f9fe;var _0x35f1e3;return db['ZendeskConfiguration'][_0x5013('0x54')]({'where':{'id':_0x27e89f['params']['id']}})[_0x5013('0x1b')](handleEntityNotFound(_0x20abab,null))[_0x5013('0x1b')](function(_0x657f3d){if(_0x657f3d){_0x10f9fe=_0x657f3d;_0xa60a0e[_0x5013('0x34')]=_[_0x5013('0x35')](db[_0x5013('0x55')]['rawAttributes']);_0xa60a0e[_0x5013('0x36')]=_[_0x5013('0x35')](_0x27e89f[_0x5013('0x36')]);_0xa60a0e[_0x5013('0x37')]=_['intersection'](_0xa60a0e['model'],_0xa60a0e[_0x5013('0x36')]);_0x16a1e7['attributes']=_[_0x5013('0x38')](_0xa60a0e['model'],qs['fields'](_0x27e89f[_0x5013('0x36')][_0x5013('0x3a')]));_0x16a1e7[_0x5013('0x39')]=_0x16a1e7['attributes'][_0x5013('0x4d')]?_0x16a1e7[_0x5013('0x39')]:_0xa60a0e[_0x5013('0x34')];_0x16a1e7['order']=qs[_0x5013('0x3f')](_0x27e89f[_0x5013('0x36')][_0x5013('0x3f')]);_0x16a1e7['where']=qs[_0x5013('0x37')](_[_0x5013('0x41')](_0x27e89f[_0x5013('0x36')],_0xa60a0e[_0x5013('0x37')]));if(_0x27e89f[_0x5013('0x36')][_0x5013('0x42')]){_0x16a1e7[_0x5013('0x40')]=_['merge'](_0x16a1e7['where'],{'$or':_['map'](_0x16a1e7[_0x5013('0x39')],function(_0x6af8c8){var _0x56667e={};_0x56667e[_0x6af8c8]={'$like':'%'+_0x27e89f[_0x5013('0x36')]['filter']+'%'};return _0x56667e;})});}_0x16a1e7=_[_0x5013('0x43')]({},_0x16a1e7,_0x27e89f[_0x5013('0x56')]);return _0x10f9fe['getDescriptions'](_0x16a1e7);}})['then'](function(_0x1b734b){if(_0x1b734b){_0x35f1e3=_0x1b734b[_0x5013('0x4d')];if(!_0x27e89f['query'][_0x5013('0x3b')](_0x5013('0x3c'))){_0x16a1e7['limit']=qs[_0x5013('0x3d')](_0x27e89f[_0x5013('0x36')]['limit']);_0x16a1e7['offset']=qs['offset'](_0x27e89f[_0x5013('0x36')][_0x5013('0x29')]);}return _0x10f9fe[_0x5013('0x58')](_0x16a1e7);}})[_0x5013('0x1b')](function(_0x5c3aff){if(_0x5c3aff){return _0x5c3aff?{'count':_0x35f1e3,'rows':_0x5c3aff}:null;}})[_0x5013('0x1b')](respondWithResult(_0x20abab,null))[_0x5013('0x25')](handleError(_0x20abab,null));};exports[_0x5013('0x59')]=function(_0x2f5cfd,_0x2c8695,_0x29f3b2){var _0xf3aa1c={};var _0x5c2dd0={};var _0x5ca725;var _0x36501a;return db[_0x5013('0x48')][_0x5013('0x54')]({'where':{'id':_0x2f5cfd['params']['id']}})[_0x5013('0x1b')](handleEntityNotFound(_0x2c8695,null))[_0x5013('0x1b')](function(_0x16b35f){if(_0x16b35f){_0x5ca725=_0x16b35f;_0x5c2dd0[_0x5013('0x34')]=_[_0x5013('0x35')](db[_0x5013('0x5a')][_0x5013('0x33')]);_0x5c2dd0['query']=_['keys'](_0x2f5cfd[_0x5013('0x36')]);_0x5c2dd0[_0x5013('0x37')]=_[_0x5013('0x38')](_0x5c2dd0[_0x5013('0x34')],_0x5c2dd0[_0x5013('0x36')]);_0xf3aa1c[_0x5013('0x39')]=_[_0x5013('0x38')](_0x5c2dd0[_0x5013('0x34')],qs['fields'](_0x2f5cfd[_0x5013('0x36')][_0x5013('0x3a')]));_0xf3aa1c[_0x5013('0x39')]=_0xf3aa1c[_0x5013('0x39')][_0x5013('0x4d')]?_0xf3aa1c[_0x5013('0x39')]:_0x5c2dd0[_0x5013('0x34')];_0xf3aa1c['order']=qs['sort'](_0x2f5cfd[_0x5013('0x36')][_0x5013('0x3f')]);_0xf3aa1c[_0x5013('0x40')]=qs[_0x5013('0x37')](_['pick'](_0x2f5cfd['query'],_0x5c2dd0['filters']));if(_0x2f5cfd[_0x5013('0x36')][_0x5013('0x42')]){_0xf3aa1c[_0x5013('0x40')]=_['merge'](_0xf3aa1c[_0x5013('0x40')],{'$or':_[_0x5013('0x44')](_0xf3aa1c['attributes'],function(_0x14d709){var _0x42ab64={};_0x42ab64[_0x14d709]={'$like':'%'+_0x2f5cfd['query'][_0x5013('0x42')]+'%'};return _0x42ab64;})});}_0xf3aa1c=_[_0x5013('0x43')]({},_0xf3aa1c,_0x2f5cfd[_0x5013('0x56')]);return _0x5ca725[_0x5013('0x59')](_0xf3aa1c);}})[_0x5013('0x1b')](function(_0x3a21d2){if(_0x3a21d2){_0x36501a=_0x3a21d2[_0x5013('0x4d')];if(!_0x2f5cfd['query'][_0x5013('0x3b')]('nolimit')){_0xf3aa1c['limit']=qs[_0x5013('0x3d')](_0x2f5cfd['query'][_0x5013('0x3d')]);_0xf3aa1c[_0x5013('0x29')]=qs[_0x5013('0x29')](_0x2f5cfd[_0x5013('0x36')][_0x5013('0x29')]);}return _0x5ca725[_0x5013('0x59')](_0xf3aa1c);}})['then'](function(_0x3f2988){if(_0x3f2988){return _0x3f2988?{'count':_0x36501a,'rows':_0x3f2988}:null;}})[_0x5013('0x1b')](respondWithResult(_0x2c8695,null))['catch'](handleError(_0x2c8695,null));};exports[_0x5013('0x5b')]=function(_0x4ed84d,_0xaa1009,_0x314565){if(_0x4ed84d[_0x5013('0x51')]['id']){delete _0x4ed84d['body']['id'];}return db[_0x5013('0x48')][_0x5013('0x54')]({'where':{'id':_0x4ed84d[_0x5013('0x52')]['id']}})['then'](handleEntityNotFound(_0xaa1009,null))['then'](function(_0x248b32){if(_0x248b32){return _0x248b32[_0x5013('0x5b')](_0x4ed84d[_0x5013('0x51')][_0x5013('0x5c')]||[]);}return null;})[_0x5013('0x1b')](respondWithResult(_0xaa1009,null))['catch'](handleError(_0xaa1009,null));};
\ No newline at end of file
+var _0xe57d=['reject','save','update','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','key','VIRTUAL','ZendeskConfiguration','includeAll','include','findAll','show','params','options','create','body','find','getFields','findOne','ZendeskField','map','getSubjects','getDescriptions','getTags','setTags','ids','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/environment','../../mysqldb','jayson/promise','http','test','request','then','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','sendStatus','status','count','offset','limit','set','Content-Range','json','apply'];(function(_0x10c403,_0x4f3eb0){var _0xe1a9ba=function(_0x1ca061){while(--_0x1ca061){_0x10c403['push'](_0x10c403['shift']());}};_0xe1a9ba(++_0x4f3eb0);}(_0xe57d,0xe2));var _0xde57=function(_0x179a0c,_0x2ca073){_0x179a0c=_0x179a0c-0x0;var _0x1c8b9a=_0xe57d[_0x179a0c];return _0x1c8b9a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xde57('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xde57('0x1'));var jsonpatch=require(_0xde57('0x2'));var rp=require(_0xde57('0x3'));var moment=require(_0xde57('0x4'));var BPromise=require(_0xde57('0x5'));var Mustache=require('mustache');var util=require(_0xde57('0x6'));var path=require(_0xde57('0x7'));var sox=require(_0xde57('0x8'));var csv=require(_0xde57('0x9'));var ejs=require(_0xde57('0xa'));var fs=require('fs');var _=require(_0xde57('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xde57('0xc'));var toCsv=require(_0xde57('0x9'));var querystring=require(_0xde57('0xd'));var Papa=require(_0xde57('0xe'));var Redis=require(_0xde57('0xf'));var authService=require(_0xde57('0x10'));var qs=require(_0xde57('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xde57('0x12'));var utils=require('../../config/utils');var config=require(_0xde57('0x13'));var db=require(_0xde57('0x14'))['db'];var jayson=require(_0xde57('0x15'));var client=jayson['client'][_0xde57('0x16')]({'port':0x232a});function checkPasswordPattern(_0x2fc7ed,_0x24fdc6,_0x53f50f){if(_0x53f50f){var _0x2d4538=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2d4538[_0xde57('0x17')](_0x24fdc6)){return _0x2fc7ed;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x2fc7ed;}}function respondWithRpcPromise(_0xdd2b19,_0x5b1caf,_0x22cba5,_0x2fef17){return new BPromise(function(_0x34e8fa,_0x7d9f3){var _0x487c9f=_0x2fef17||client;return _0x487c9f[_0xde57('0x18')](_0xdd2b19,_0x22cba5)[_0xde57('0x19')](function(_0x4183f0){logger['info'](_0xde57('0x1a'),_0x5b1caf,_0xde57('0x1b'));logger['debug'](_0xde57('0x1c'),_0x5b1caf,'request\x20sent',JSON[_0xde57('0x1d')](_0x4183f0));if(_0x4183f0[_0xde57('0x1e')]){if(_0x4183f0['error']['code']===0x1f4){logger[_0xde57('0x1e')](_0xde57('0x1a'),_0x5b1caf,_0x4183f0[_0xde57('0x1e')][_0xde57('0x1f')]);return _0x7d9f3(_0x4183f0[_0xde57('0x1e')][_0xde57('0x1f')]);}logger[_0xde57('0x1e')]('ZendeskConfiguration,\x20%s,\x20%s',_0x5b1caf,_0x4183f0[_0xde57('0x1e')]['message']);return _0x34e8fa(_0x4183f0[_0xde57('0x1e')][_0xde57('0x1f')]);}else{logger[_0xde57('0x20')](_0xde57('0x1a'),_0x5b1caf,'request\x20sent');_0x34e8fa(_0x4183f0[_0xde57('0x21')][_0xde57('0x1f')]);}})[_0xde57('0x22')](function(_0x4fecd3){logger['error'](_0xde57('0x1a'),_0x5b1caf,_0x4fecd3);_0x7d9f3(_0x4fecd3);});});}function respondWithStatusCode(_0x56bea4,_0x31549b){_0x31549b=_0x31549b||0xcc;return function(_0x1c39be){if(_0x1c39be){return _0x56bea4[_0xde57('0x23')](_0x31549b);}return _0x56bea4['status'](_0x31549b)['end']();};}function respondWithResult(_0x128fd2,_0x5eac12){_0x5eac12=_0x5eac12||0xc8;return function(_0x52db84){if(_0x52db84){return _0x128fd2[_0xde57('0x24')](_0x5eac12)['json'](_0x52db84);}};}function respondWithFilteredResult(_0x16aa52,_0x527a89){return function(_0x474cdf){if(_0x474cdf){var _0x5b9d39=_0x474cdf[_0xde57('0x25')],_0x1371aa=_0x527a89[_0xde57('0x26')],_0x472bba=_0x527a89[_0xde57('0x26')]+_0x527a89[_0xde57('0x27')],_0x42b501;if(_0x472bba>=_0x5b9d39){_0x472bba=_0x5b9d39;_0x42b501=0xc8;}else{_0x42b501=0xce;}_0x16aa52[_0xde57('0x24')](_0x42b501);return _0x16aa52[_0xde57('0x28')](_0xde57('0x29'),_0x1371aa+'-'+_0x472bba+'/'+_0x5b9d39)[_0xde57('0x2a')](_0x474cdf);}return null;};}function patchUpdates(_0x2d4732){return function(_0x21cf91){try{jsonpatch[_0xde57('0x2b')](_0x21cf91,_0x2d4732,!![]);}catch(_0x55fd95){return BPromise[_0xde57('0x2c')](_0x55fd95);}return _0x21cf91[_0xde57('0x2d')]();};}function saveUpdates(_0x44a7fe,_0x1d154a){return function(_0x42e20a){if(_0x42e20a){return _0x42e20a[_0xde57('0x2e')](_0x44a7fe)[_0xde57('0x19')](function(_0x23e33a){return _0x23e33a;});}return null;};}function removeEntity(_0x568b27,_0x23e68a){return function(_0x54b947){if(_0x54b947){return _0x54b947['destroy']()['then'](function(){_0x568b27['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x50130d,_0x1a0fee){return function(_0x31f6c3){if(!_0x31f6c3){_0x50130d[_0xde57('0x23')](0x194);}return _0x31f6c3;};}function handleError(_0x31d243,_0x458931){_0x458931=_0x458931||0x1f4;return function(_0x313daa){logger[_0xde57('0x1e')](_0x313daa[_0xde57('0x2f')]);if(_0x313daa[_0xde57('0x30')]){delete _0x313daa['name'];}_0x31d243[_0xde57('0x24')](_0x458931)[_0xde57('0x31')](_0x313daa);};}exports[_0xde57('0x32')]=function(_0x5495a3,_0x459ea5){var _0x3e27df={},_0x4137eb={},_0x157b30={'count':0x0,'rows':[]};var _0x360a26=db['ZendeskConfiguration'][_0xde57('0x33')];_0x4137eb[_0xde57('0x34')]=_[_0xde57('0x35')](_0x360a26);_0x4137eb[_0xde57('0x36')]=_[_0xde57('0x35')](_0x5495a3[_0xde57('0x36')]);_0x4137eb[_0xde57('0x37')]=_[_0xde57('0x38')](_0x4137eb[_0xde57('0x34')],_0x4137eb[_0xde57('0x36')]);_0x3e27df['attributes']=_[_0xde57('0x38')](_0x4137eb['model'],qs[_0xde57('0x39')](_0x5495a3[_0xde57('0x36')][_0xde57('0x39')]));_0x3e27df[_0xde57('0x3a')]=_0x3e27df[_0xde57('0x3a')][_0xde57('0x3b')]?_0x3e27df[_0xde57('0x3a')]:_0x4137eb[_0xde57('0x34')];if(!_0x5495a3[_0xde57('0x36')][_0xde57('0x3c')](_0xde57('0x3d'))){_0x3e27df[_0xde57('0x27')]=qs['limit'](_0x5495a3[_0xde57('0x36')]['limit']);_0x3e27df[_0xde57('0x26')]=qs[_0xde57('0x26')](_0x5495a3[_0xde57('0x36')]['offset']);}_0x3e27df[_0xde57('0x3e')]=qs[_0xde57('0x3f')](_0x5495a3['query'][_0xde57('0x3f')]);_0x3e27df[_0xde57('0x40')]=qs[_0xde57('0x37')](_[_0xde57('0x41')](_0x5495a3[_0xde57('0x36')],_0x4137eb['filters']));if(_0x5495a3[_0xde57('0x36')][_0xde57('0x42')]){_0x3e27df['where']=_[_0xde57('0x43')](_0x3e27df[_0xde57('0x40')],{'$or':_['map'](_0x360a26,function(_0x3ab44a){if(_0x3ab44a[_0xde57('0x44')][_0xde57('0x45')]!==_0xde57('0x46')){var _0x327daf={};_0x327daf[_0x3ab44a['field']]={'$like':'%'+_0x5495a3['query'][_0xde57('0x42')]+'%'};return _0x327daf;}})});}_0x3e27df=_[_0xde57('0x43')]({},_0x3e27df,_0x5495a3['options']);var _0x4ba893={'where':_0x3e27df['where']};return db[_0xde57('0x47')]['count'](_0x4ba893)[_0xde57('0x19')](function(_0x12451c){_0x157b30[_0xde57('0x25')]=_0x12451c;if(_0x5495a3[_0xde57('0x36')][_0xde57('0x48')]){_0x3e27df[_0xde57('0x49')]=[{'all':!![]}];}return db[_0xde57('0x47')][_0xde57('0x4a')](_0x3e27df);})[_0xde57('0x19')](function(_0x158069){_0x157b30['rows']=_0x158069;return _0x157b30;})[_0xde57('0x19')](respondWithFilteredResult(_0x459ea5,_0x3e27df))[_0xde57('0x22')](handleError(_0x459ea5,null));};exports[_0xde57('0x4b')]=function(_0x2a7b0b,_0x5f38f3){var _0xd3cafb={'raw':![],'where':{'id':_0x2a7b0b[_0xde57('0x4c')]['id']}},_0x3f11ca={};_0x3f11ca[_0xde57('0x34')]=_[_0xde57('0x35')](db[_0xde57('0x47')][_0xde57('0x33')]);_0x3f11ca[_0xde57('0x36')]=_[_0xde57('0x35')](_0x2a7b0b[_0xde57('0x36')]);_0x3f11ca[_0xde57('0x37')]=_['intersection'](_0x3f11ca['model'],_0x3f11ca[_0xde57('0x36')]);_0xd3cafb[_0xde57('0x3a')]=_[_0xde57('0x38')](_0x3f11ca[_0xde57('0x34')],qs['fields'](_0x2a7b0b[_0xde57('0x36')][_0xde57('0x39')]));_0xd3cafb[_0xde57('0x3a')]=_0xd3cafb['attributes']['length']?_0xd3cafb[_0xde57('0x3a')]:_0x3f11ca['model'];if(_0x2a7b0b[_0xde57('0x36')][_0xde57('0x48')]){_0xd3cafb[_0xde57('0x49')]=[{'all':!![]}];}_0xd3cafb=_[_0xde57('0x43')]({},_0xd3cafb,_0x2a7b0b[_0xde57('0x4d')]);return db[_0xde57('0x47')]['find'](_0xd3cafb)[_0xde57('0x19')](handleEntityNotFound(_0x5f38f3,null))[_0xde57('0x19')](respondWithResult(_0x5f38f3,null))[_0xde57('0x22')](handleError(_0x5f38f3,null));};exports[_0xde57('0x4e')]=function(_0x192785,_0x3d2a76){return db[_0xde57('0x47')][_0xde57('0x4e')](_0x192785[_0xde57('0x4f')],{})[_0xde57('0x19')](respondWithResult(_0x3d2a76,0xc9))[_0xde57('0x22')](handleError(_0x3d2a76,null));};exports[_0xde57('0x2e')]=function(_0x30cdd7,_0x2df0f8){if(_0x30cdd7[_0xde57('0x4f')]['id']){delete _0x30cdd7[_0xde57('0x4f')]['id'];}return db[_0xde57('0x47')][_0xde57('0x50')]({'where':{'id':_0x30cdd7[_0xde57('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2df0f8,null))['then'](saveUpdates(_0x30cdd7[_0xde57('0x4f')],null))[_0xde57('0x19')](respondWithResult(_0x2df0f8,null))[_0xde57('0x22')](handleError(_0x2df0f8,null));};exports['destroy']=function(_0xb48ca6,_0x2fefe8){return db['ZendeskConfiguration']['find']({'where':{'id':_0xb48ca6[_0xde57('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2fefe8,null))[_0xde57('0x19')](removeEntity(_0x2fefe8,null))['catch'](handleError(_0x2fefe8,null));};exports[_0xde57('0x51')]=function(_0x337c0f,_0x51f29a,_0x9b91d4){var _0x43b1d7={};var _0x54edd3={};var _0x51b2b1;var _0x3bb848;return db[_0xde57('0x47')][_0xde57('0x52')]({'where':{'id':_0x337c0f[_0xde57('0x4c')]['id']}})[_0xde57('0x19')](handleEntityNotFound(_0x51f29a,null))[_0xde57('0x19')](function(_0x54cf86){if(_0x54cf86){_0x51b2b1=_0x54cf86;_0x54edd3[_0xde57('0x34')]=_['keys'](db[_0xde57('0x53')]['rawAttributes']);_0x54edd3[_0xde57('0x36')]=_[_0xde57('0x35')](_0x337c0f[_0xde57('0x36')]);_0x54edd3[_0xde57('0x37')]=_[_0xde57('0x38')](_0x54edd3[_0xde57('0x34')],_0x54edd3[_0xde57('0x36')]);_0x43b1d7['attributes']=_['intersection'](_0x54edd3['model'],qs[_0xde57('0x39')](_0x337c0f[_0xde57('0x36')][_0xde57('0x39')]));_0x43b1d7[_0xde57('0x3a')]=_0x43b1d7['attributes'][_0xde57('0x3b')]?_0x43b1d7[_0xde57('0x3a')]:_0x54edd3[_0xde57('0x34')];_0x43b1d7[_0xde57('0x3e')]=qs[_0xde57('0x3f')](_0x337c0f['query'][_0xde57('0x3f')]);_0x43b1d7[_0xde57('0x40')]=qs[_0xde57('0x37')](_['pick'](_0x337c0f['query'],_0x54edd3['filters']));if(_0x337c0f[_0xde57('0x36')][_0xde57('0x42')]){_0x43b1d7['where']=_[_0xde57('0x43')](_0x43b1d7[_0xde57('0x40')],{'$or':_[_0xde57('0x54')](_0x43b1d7[_0xde57('0x3a')],function(_0x16f323){var _0x230e7b={};_0x230e7b[_0x16f323]={'$like':'%'+_0x337c0f['query'][_0xde57('0x42')]+'%'};return _0x230e7b;})});}_0x43b1d7=_[_0xde57('0x43')]({},_0x43b1d7,_0x337c0f[_0xde57('0x4d')]);return _0x51b2b1[_0xde57('0x51')](_0x43b1d7);}})['then'](function(_0x27a755){if(_0x27a755){_0x3bb848=_0x27a755[_0xde57('0x3b')];if(!_0x337c0f[_0xde57('0x36')]['hasOwnProperty'](_0xde57('0x3d'))){_0x43b1d7[_0xde57('0x27')]=qs[_0xde57('0x27')](_0x337c0f['query']['limit']);_0x43b1d7['offset']=qs[_0xde57('0x26')](_0x337c0f['query']['offset']);}return _0x51b2b1[_0xde57('0x51')](_0x43b1d7);}})[_0xde57('0x19')](function(_0x29c364){if(_0x29c364){return _0x29c364?{'count':_0x3bb848,'rows':_0x29c364}:null;}})[_0xde57('0x19')](respondWithResult(_0x51f29a,null))[_0xde57('0x22')](handleError(_0x51f29a,null));};exports[_0xde57('0x55')]=function(_0x4f2720,_0x44c094,_0x3e51aa){var _0x5450a0={};var _0x3c6ad4={};var _0x19c4b8;var _0x557c1c;return db['ZendeskConfiguration']['findOne']({'where':{'id':_0x4f2720[_0xde57('0x4c')]['id']}})[_0xde57('0x19')](handleEntityNotFound(_0x44c094,null))['then'](function(_0x60390a){if(_0x60390a){_0x19c4b8=_0x60390a;_0x3c6ad4[_0xde57('0x34')]=_[_0xde57('0x35')](db[_0xde57('0x53')][_0xde57('0x33')]);_0x3c6ad4[_0xde57('0x36')]=_[_0xde57('0x35')](_0x4f2720[_0xde57('0x36')]);_0x3c6ad4[_0xde57('0x37')]=_['intersection'](_0x3c6ad4[_0xde57('0x34')],_0x3c6ad4[_0xde57('0x36')]);_0x5450a0['attributes']=_['intersection'](_0x3c6ad4['model'],qs[_0xde57('0x39')](_0x4f2720[_0xde57('0x36')][_0xde57('0x39')]));_0x5450a0[_0xde57('0x3a')]=_0x5450a0[_0xde57('0x3a')][_0xde57('0x3b')]?_0x5450a0[_0xde57('0x3a')]:_0x3c6ad4[_0xde57('0x34')];_0x5450a0[_0xde57('0x3e')]=qs['sort'](_0x4f2720[_0xde57('0x36')][_0xde57('0x3f')]);_0x5450a0[_0xde57('0x40')]=qs[_0xde57('0x37')](_[_0xde57('0x41')](_0x4f2720[_0xde57('0x36')],_0x3c6ad4[_0xde57('0x37')]));if(_0x4f2720[_0xde57('0x36')][_0xde57('0x42')]){_0x5450a0[_0xde57('0x40')]=_['merge'](_0x5450a0[_0xde57('0x40')],{'$or':_[_0xde57('0x54')](_0x5450a0[_0xde57('0x3a')],function(_0x2c691c){var _0x22eed2={};_0x22eed2[_0x2c691c]={'$like':'%'+_0x4f2720[_0xde57('0x36')][_0xde57('0x42')]+'%'};return _0x22eed2;})});}_0x5450a0=_[_0xde57('0x43')]({},_0x5450a0,_0x4f2720['options']);return _0x19c4b8[_0xde57('0x55')](_0x5450a0);}})[_0xde57('0x19')](function(_0x31f628){if(_0x31f628){_0x557c1c=_0x31f628[_0xde57('0x3b')];if(!_0x4f2720[_0xde57('0x36')][_0xde57('0x3c')](_0xde57('0x3d'))){_0x5450a0[_0xde57('0x27')]=qs[_0xde57('0x27')](_0x4f2720[_0xde57('0x36')][_0xde57('0x27')]);_0x5450a0[_0xde57('0x26')]=qs[_0xde57('0x26')](_0x4f2720['query'][_0xde57('0x26')]);}return _0x19c4b8['getSubjects'](_0x5450a0);}})[_0xde57('0x19')](function(_0x359f8f){if(_0x359f8f){return _0x359f8f?{'count':_0x557c1c,'rows':_0x359f8f}:null;}})[_0xde57('0x19')](respondWithResult(_0x44c094,null))[_0xde57('0x22')](handleError(_0x44c094,null));};exports['getDescriptions']=function(_0x30f1ef,_0x2a2ac2,_0x22d92){var _0x514bcf={};var _0x19b0fa={};var _0x243762;var _0x5c5b88;return db[_0xde57('0x47')]['findOne']({'where':{'id':_0x30f1ef[_0xde57('0x4c')]['id']}})[_0xde57('0x19')](handleEntityNotFound(_0x2a2ac2,null))[_0xde57('0x19')](function(_0x5aa142){if(_0x5aa142){_0x243762=_0x5aa142;_0x19b0fa[_0xde57('0x34')]=_[_0xde57('0x35')](db[_0xde57('0x53')][_0xde57('0x33')]);_0x19b0fa[_0xde57('0x36')]=_['keys'](_0x30f1ef[_0xde57('0x36')]);_0x19b0fa['filters']=_['intersection'](_0x19b0fa[_0xde57('0x34')],_0x19b0fa[_0xde57('0x36')]);_0x514bcf[_0xde57('0x3a')]=_[_0xde57('0x38')](_0x19b0fa['model'],qs[_0xde57('0x39')](_0x30f1ef[_0xde57('0x36')][_0xde57('0x39')]));_0x514bcf['attributes']=_0x514bcf[_0xde57('0x3a')][_0xde57('0x3b')]?_0x514bcf[_0xde57('0x3a')]:_0x19b0fa[_0xde57('0x34')];_0x514bcf[_0xde57('0x3e')]=qs[_0xde57('0x3f')](_0x30f1ef[_0xde57('0x36')][_0xde57('0x3f')]);_0x514bcf['where']=qs[_0xde57('0x37')](_[_0xde57('0x41')](_0x30f1ef[_0xde57('0x36')],_0x19b0fa[_0xde57('0x37')]));if(_0x30f1ef[_0xde57('0x36')]['filter']){_0x514bcf[_0xde57('0x40')]=_[_0xde57('0x43')](_0x514bcf[_0xde57('0x40')],{'$or':_['map'](_0x514bcf[_0xde57('0x3a')],function(_0xb695f1){var _0x479110={};_0x479110[_0xb695f1]={'$like':'%'+_0x30f1ef[_0xde57('0x36')][_0xde57('0x42')]+'%'};return _0x479110;})});}_0x514bcf=_[_0xde57('0x43')]({},_0x514bcf,_0x30f1ef['options']);return _0x243762[_0xde57('0x56')](_0x514bcf);}})[_0xde57('0x19')](function(_0x319651){if(_0x319651){_0x5c5b88=_0x319651[_0xde57('0x3b')];if(!_0x30f1ef['query'][_0xde57('0x3c')](_0xde57('0x3d'))){_0x514bcf[_0xde57('0x27')]=qs[_0xde57('0x27')](_0x30f1ef['query']['limit']);_0x514bcf[_0xde57('0x26')]=qs[_0xde57('0x26')](_0x30f1ef[_0xde57('0x36')][_0xde57('0x26')]);}return _0x243762['getDescriptions'](_0x514bcf);}})[_0xde57('0x19')](function(_0x59b56b){if(_0x59b56b){return _0x59b56b?{'count':_0x5c5b88,'rows':_0x59b56b}:null;}})['then'](respondWithResult(_0x2a2ac2,null))[_0xde57('0x22')](handleError(_0x2a2ac2,null));};exports[_0xde57('0x57')]=function(_0x38d727,_0x5e53d4,_0x5c05d6){var _0x119a6e={};var _0x45b06b={};var _0x160b59;var _0xfcdb75;return db[_0xde57('0x47')][_0xde57('0x52')]({'where':{'id':_0x38d727['params']['id']}})[_0xde57('0x19')](handleEntityNotFound(_0x5e53d4,null))[_0xde57('0x19')](function(_0x35e33a){if(_0x35e33a){_0x160b59=_0x35e33a;_0x45b06b[_0xde57('0x34')]=_[_0xde57('0x35')](db['Tag'][_0xde57('0x33')]);_0x45b06b['query']=_[_0xde57('0x35')](_0x38d727[_0xde57('0x36')]);_0x45b06b[_0xde57('0x37')]=_[_0xde57('0x38')](_0x45b06b[_0xde57('0x34')],_0x45b06b[_0xde57('0x36')]);_0x119a6e[_0xde57('0x3a')]=_[_0xde57('0x38')](_0x45b06b['model'],qs[_0xde57('0x39')](_0x38d727[_0xde57('0x36')][_0xde57('0x39')]));_0x119a6e[_0xde57('0x3a')]=_0x119a6e['attributes']['length']?_0x119a6e[_0xde57('0x3a')]:_0x45b06b['model'];_0x119a6e[_0xde57('0x3e')]=qs[_0xde57('0x3f')](_0x38d727[_0xde57('0x36')][_0xde57('0x3f')]);_0x119a6e[_0xde57('0x40')]=qs[_0xde57('0x37')](_['pick'](_0x38d727[_0xde57('0x36')],_0x45b06b[_0xde57('0x37')]));if(_0x38d727['query'][_0xde57('0x42')]){_0x119a6e['where']=_[_0xde57('0x43')](_0x119a6e[_0xde57('0x40')],{'$or':_['map'](_0x119a6e[_0xde57('0x3a')],function(_0x40273e){var _0x34b5ec={};_0x34b5ec[_0x40273e]={'$like':'%'+_0x38d727[_0xde57('0x36')]['filter']+'%'};return _0x34b5ec;})});}_0x119a6e=_['merge']({},_0x119a6e,_0x38d727[_0xde57('0x4d')]);return _0x160b59[_0xde57('0x57')](_0x119a6e);}})[_0xde57('0x19')](function(_0x7cd7c1){if(_0x7cd7c1){_0xfcdb75=_0x7cd7c1['length'];if(!_0x38d727['query']['hasOwnProperty'](_0xde57('0x3d'))){_0x119a6e[_0xde57('0x27')]=qs[_0xde57('0x27')](_0x38d727[_0xde57('0x36')][_0xde57('0x27')]);_0x119a6e['offset']=qs[_0xde57('0x26')](_0x38d727[_0xde57('0x36')][_0xde57('0x26')]);}return _0x160b59[_0xde57('0x57')](_0x119a6e);}})['then'](function(_0x197770){if(_0x197770){return _0x197770?{'count':_0xfcdb75,'rows':_0x197770}:null;}})['then'](respondWithResult(_0x5e53d4,null))[_0xde57('0x22')](handleError(_0x5e53d4,null));};exports[_0xde57('0x58')]=function(_0x127b2c,_0x5d9a21,_0x1e7e38){if(_0x127b2c[_0xde57('0x4f')]['id']){delete _0x127b2c['body']['id'];}return db['ZendeskConfiguration']['findOne']({'where':{'id':_0x127b2c['params']['id']}})[_0xde57('0x19')](handleEntityNotFound(_0x5d9a21,null))[_0xde57('0x19')](function(_0x5f12b3){if(_0x5f12b3){return _0x5f12b3['setTags'](_0x127b2c[_0xde57('0x4f')][_0xde57('0x59')]||[]);}return null;})[_0xde57('0x19')](respondWithResult(_0x5d9a21,null))[_0xde57('0x22')](handleError(_0x5d9a21,null));};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js
index 176b9fc..9d63d37 100644
--- a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js
+++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9f6=['api','moment','request-promise','rimraf','../../config/environment','./intZendeskConfiguration.attributes','exports','define','ZendeskConfiguration','int_zendesk_configurations','lodash','../../config/logger'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xa9f6,0x14e));var _0x6a9f=function(_0x30eeb1,_0xd8ca7b){_0x30eeb1=_0x30eeb1-0x0;var _0xdf2822=_0xa9f6[_0x30eeb1];return _0xdf2822;};'use strict';var _=require(_0x6a9f('0x0'));var util=require('util');var logger=require(_0x6a9f('0x1'))(_0x6a9f('0x2'));var moment=require(_0x6a9f('0x3'));var BPromise=require('bluebird');var rp=require(_0x6a9f('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6a9f('0x5'));var config=require(_0x6a9f('0x6'));var attributes=require(_0x6a9f('0x7'));module[_0x6a9f('0x8')]=function(_0x592751,_0x26a6ab){return _0x592751[_0x6a9f('0x9')](_0x6a9f('0xa'),attributes,{'tableName':_0x6a9f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x36e1=['request-promise','rimraf','exports','define','ZendeskConfiguration','int_zendesk_configurations','lodash','util','../../config/logger','moment','bluebird'];(function(_0x262417,_0x9b9f85){var _0x4404f7=function(_0x13354f){while(--_0x13354f){_0x262417['push'](_0x262417['shift']());}};_0x4404f7(++_0x9b9f85);}(_0x36e1,0xe2));var _0x136e=function(_0x26bf51,_0x5e261a){_0x26bf51=_0x26bf51-0x0;var _0x503415=_0x36e1[_0x26bf51];return _0x503415;};'use strict';var _=require(_0x136e('0x0'));var util=require(_0x136e('0x1'));var logger=require(_0x136e('0x2'))('api');var moment=require(_0x136e('0x3'));var BPromise=require(_0x136e('0x4'));var rp=require(_0x136e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x136e('0x6'));var config=require('../../config/environment');var attributes=require('./intZendeskConfiguration.attributes');module[_0x136e('0x7')]=function(_0x5dbcde,_0x647696){return _0x5dbcde[_0x136e('0x8')](_0x136e('0x9'),attributes,{'tableName':_0x136e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js
index 2f0ac80..a768b4d 100644
--- a/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js
+++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8796=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x8796,0x18d));var _0x6879=function(_0x486529,_0x3daaa7){_0x486529=_0x486529-0x0;var _0x45be00=_0x8796[_0x486529];return _0x45be00;};'use strict';var _=require(_0x6879('0x0'));var util=require(_0x6879('0x1'));var moment=require(_0x6879('0x2'));var BPromise=require(_0x6879('0x3'));var rs=require(_0x6879('0x4'));var fs=require('fs');var Redis=require(_0x6879('0x5'));var db=require(_0x6879('0x6'))['db'];var utils=require(_0x6879('0x7'));var logger=require(_0x6879('0x8'))('rpc');var config=require(_0x6879('0x9'));var jayson=require(_0x6879('0xa'));var client=jayson['client'][_0x6879('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5aa2a5,_0x2c01de,_0x290f8d){return new BPromise(function(_0x27900c,_0x49a278){return client[_0x6879('0xc')](_0x5aa2a5,_0x290f8d)[_0x6879('0xd')](function(_0x22387e){logger[_0x6879('0xe')](_0x6879('0xf'),_0x2c01de,_0x6879('0x10'));logger[_0x6879('0x11')](_0x6879('0x12'),_0x2c01de,_0x6879('0x10'),JSON[_0x6879('0x13')](_0x22387e));if(_0x22387e[_0x6879('0x14')]){if(_0x22387e[_0x6879('0x14')][_0x6879('0x15')]===0x1f4){logger[_0x6879('0x14')](_0x6879('0xf'),_0x2c01de,_0x22387e[_0x6879('0x14')][_0x6879('0x16')]);return _0x49a278(_0x22387e['error'][_0x6879('0x16')]);}logger[_0x6879('0x14')](_0x6879('0xf'),_0x2c01de,_0x22387e[_0x6879('0x14')]['message']);return _0x27900c(_0x22387e[_0x6879('0x14')]['message']);}else{logger[_0x6879('0xe')](_0x6879('0xf'),_0x2c01de,_0x6879('0x10'));_0x27900c(_0x22387e[_0x6879('0x17')][_0x6879('0x16')]);}})[_0x6879('0x18')](function(_0x374b74){logger[_0x6879('0x14')](_0x6879('0xf'),_0x2c01de,_0x374b74);_0x49a278(_0x374b74);});});}
\ No newline at end of file
+var _0x0846=['rpc','../../config/environment','jayson/promise','client','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','message','result','catch','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x514952,_0x1b0a73){var _0x1596c5=function(_0x241411){while(--_0x241411){_0x514952['push'](_0x514952['shift']());}};_0x1596c5(++_0x1b0a73);}(_0x0846,0x18a));var _0x6084=function(_0x49f27c,_0x23bc8f){_0x49f27c=_0x49f27c-0x0;var _0x22b4c7=_0x0846[_0x49f27c];return _0x22b4c7;};'use strict';var _=require('lodash');var util=require(_0x6084('0x0'));var moment=require(_0x6084('0x1'));var BPromise=require(_0x6084('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6084('0x3'));var db=require(_0x6084('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x6084('0x5'));var config=require(_0x6084('0x6'));var jayson=require(_0x6084('0x7'));var client=jayson[_0x6084('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x31ad61,_0x3288f9,_0x426571){return new BPromise(function(_0x512127,_0x53441d){return client['request'](_0x31ad61,_0x426571)[_0x6084('0x9')](function(_0x57ccbe){logger[_0x6084('0xa')](_0x6084('0xb'),_0x3288f9,_0x6084('0xc'));logger[_0x6084('0xd')](_0x6084('0xe'),_0x3288f9,_0x6084('0xc'),JSON['stringify'](_0x57ccbe));if(_0x57ccbe[_0x6084('0xf')]){if(_0x57ccbe[_0x6084('0xf')]['code']===0x1f4){logger[_0x6084('0xf')]('ZendeskConfiguration,\x20%s,\x20%s',_0x3288f9,_0x57ccbe['error'][_0x6084('0x10')]);return _0x53441d(_0x57ccbe['error'][_0x6084('0x10')]);}logger[_0x6084('0xf')]('ZendeskConfiguration,\x20%s,\x20%s',_0x3288f9,_0x57ccbe[_0x6084('0xf')][_0x6084('0x10')]);return _0x512127(_0x57ccbe[_0x6084('0xf')][_0x6084('0x10')]);}else{logger[_0x6084('0xa')](_0x6084('0xb'),_0x3288f9,'request\x20sent');_0x512127(_0x57ccbe[_0x6084('0x11')]['message']);}})[_0x6084('0x12')](function(_0x2c5a39){logger[_0x6084('0xf')](_0x6084('0xb'),_0x3288f9,_0x2c5a39);_0x53441d(_0x2c5a39);});});}
\ No newline at end of file
diff --git a/server/api/intZendeskField/index.js b/server/api/intZendeskField/index.js
index 1448857..7168f35 100644
--- a/server/api/intZendeskField/index.js
+++ b/server/api/intZendeskField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['/:id','update','delete','multer','util','path','Router','../../components/interaction/service','../../config/environment','./intZendeskField.controller','get','isAuthenticated'];(function(_0x259087,_0x4bbcb7){var _0x5bab1f=function(_0x45c623){while(--_0x45c623){_0x259087['push'](_0x259087['shift']());}};_0x5bab1f(++_0x4bbcb7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0xa9e0[_0x297fd3];return _0x2af381;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x0a9e('0x4'));var config=require(_0x0a9e('0x5'));var controller=require(_0x0a9e('0x6'));router[_0x0a9e('0x7')]('/',auth[_0x0a9e('0x8')](),controller['index']);router[_0x0a9e('0x7')](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller['show']);router['post']('/',auth[_0x0a9e('0x8')](),controller['create']);router['put'](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xa')]);router[_0x0a9e('0xb')](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x9957=['../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','post','put','update','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service'];(function(_0x1cc89b,_0x1bf377){var _0xdf0ba0=function(_0x5909aa){while(--_0x5909aa){_0x1cc89b['push'](_0x1cc89b['shift']());}};_0xdf0ba0(++_0x1bf377);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var auth=require(_0x7995('0x5'));var interaction=require(_0x7995('0x6'));var config=require(_0x7995('0x7'));var controller=require('./intZendeskField.controller');router[_0x7995('0x8')]('/',auth[_0x7995('0x9')](),controller[_0x7995('0xa')]);router[_0x7995('0x8')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller['show']);router[_0x7995('0xc')]('/',auth[_0x7995('0x9')](),controller['create']);router[_0x7995('0xd')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller[_0x7995('0xe')]);router[_0x7995('0xf')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller['destroy']);module[_0x7995('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.attributes.js b/server/api/intZendeskField/intZendeskField.attributes.js
index 9d048e9..c359a5c 100644
--- a/server/api/intZendeskField/intZendeskField.attributes.js
+++ b/server/api/intZendeskField/intZendeskField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaa88=['exports','ENUM','string','customVariable','keyValue','STRING','BOOLEAN','sequelize'];(function(_0x2f2a05,_0x1ca69f){var _0x8e785d=function(_0x2cf94f){while(--_0x2cf94f){_0x2f2a05['push'](_0x2f2a05['shift']());}};_0x8e785d(++_0x1ca69f);}(_0xaa88,0x137));var _0x8aa8=function(_0x1e48d3,_0x5d8c43){_0x1e48d3=_0x1e48d3-0x0;var _0x2852b1=_0xaa88[_0x1e48d3];return _0x2852b1;};'use strict';var Sequelize=require(_0x8aa8('0x0'));module[_0x8aa8('0x1')]={'type':{'type':Sequelize[_0x8aa8('0x2')](_0x8aa8('0x3'),'variable',_0x8aa8('0x4'),_0x8aa8('0x5')),'defaultValue':_0x8aa8('0x3')},'content':{'type':Sequelize[_0x8aa8('0x6')]},'key':{'type':Sequelize[_0x8aa8('0x6')]},'keyType':{'type':Sequelize[_0x8aa8('0x2')]('string','variable',_0x8aa8('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x8aa8('0x6')]},'nameField':{'type':Sequelize[_0x8aa8('0x6')]},'customField':{'type':Sequelize[_0x8aa8('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8aa8('0x6')]}};
\ No newline at end of file
+var _0x0713=['BOOLEAN','ENUM','string','variable','customVariable','keyValue','STRING'];(function(_0x3b5049,_0x495a94){var _0x12454e=function(_0x3988d3){while(--_0x3988d3){_0x3b5049['push'](_0x3b5049['shift']());}};_0x12454e(++_0x495a94);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize[_0x3071('0x0')](_0x3071('0x1'),_0x3071('0x2'),_0x3071('0x3'),_0x3071('0x4')),'defaultValue':'string'},'content':{'type':Sequelize[_0x3071('0x5')]},'key':{'type':Sequelize[_0x3071('0x5')]},'keyType':{'type':Sequelize[_0x3071('0x0')](_0x3071('0x1'),_0x3071('0x2'),_0x3071('0x3'))},'keyContent':{'type':Sequelize[_0x3071('0x5')]},'idField':{'type':Sequelize[_0x3071('0x5')]},'nameField':{'type':Sequelize[_0x3071('0x5')]},'customField':{'type':Sequelize[_0x3071('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x3071('0x5')]}};
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.controller.js b/server/api/intZendeskField/intZendeskField.controller.js
index 662fd57..137b45a 100644
--- a/server/api/intZendeskField/intZendeskField.controller.js
+++ b/server/api/intZendeskField/intZendeskField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdcd5=['util','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','end','json','count','offset','limit','set','reject','save','update','destroy','then','stack','name','send','ZendeskField','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','includeAll','include','findAll','show','params','length','find','catch','create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache'];(function(_0x36985c,_0xf9c92b){var _0x1de936=function(_0xe0d1b0){while(--_0xe0d1b0){_0x36985c['push'](_0x36985c['shift']());}};_0x1de936(++_0xf9c92b);}(_0xdcd5,0x110));var _0x5dcd=function(_0x919445,_0x5467dc){_0x919445=_0x919445-0x0;var _0x511b3e=_0xdcd5[_0x919445];return _0x511b3e;};'use strict';var pdf=require(_0x5dcd('0x0'));var emlformat=require(_0x5dcd('0x1'));var rimraf=require(_0x5dcd('0x2'));var zipdir=require(_0x5dcd('0x3'));var jsonpatch=require(_0x5dcd('0x4'));var rp=require(_0x5dcd('0x5'));var moment=require(_0x5dcd('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x5dcd('0x7'));var util=require(_0x5dcd('0x8'));var path=require(_0x5dcd('0x9'));var sox=require(_0x5dcd('0xa'));var csv=require(_0x5dcd('0xb'));var ejs=require(_0x5dcd('0xc'));var fs=require('fs');var _=require(_0x5dcd('0xd'));var squel=require(_0x5dcd('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5dcd('0xf'));var toCsv=require(_0x5dcd('0xb'));var querystring=require(_0x5dcd('0x10'));var Papa=require('papaparse');var Redis=require(_0x5dcd('0x11'));var authService=require(_0x5dcd('0x12'));var qs=require(_0x5dcd('0x13'));var hardwareService=require(_0x5dcd('0x14'));var logger=require(_0x5dcd('0x15'))(_0x5dcd('0x16'));var utils=require(_0x5dcd('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x6de207,_0xd59d12){_0xd59d12=_0xd59d12||0xcc;return function(_0x4e213f){if(_0x4e213f){return _0x6de207[_0x5dcd('0x18')](_0xd59d12);}return _0x6de207[_0x5dcd('0x19')](_0xd59d12)[_0x5dcd('0x1a')]();};}function respondWithResult(_0x64e241,_0x1698a3){_0x1698a3=_0x1698a3||0xc8;return function(_0x2ff0cb){if(_0x2ff0cb){return _0x64e241[_0x5dcd('0x19')](_0x1698a3)[_0x5dcd('0x1b')](_0x2ff0cb);}};}function respondWithFilteredResult(_0x5cc0d7,_0x9ebce6){return function(_0x2b61bf){if(_0x2b61bf){var _0x538be9=_0x2b61bf[_0x5dcd('0x1c')],_0x43b71f=_0x9ebce6[_0x5dcd('0x1d')],_0x537aed=_0x9ebce6['offset']+_0x9ebce6[_0x5dcd('0x1e')],_0x3a9ab9;if(_0x537aed>=_0x538be9){_0x537aed=_0x538be9;_0x3a9ab9=0xc8;}else{_0x3a9ab9=0xce;}_0x5cc0d7[_0x5dcd('0x19')](_0x3a9ab9);return _0x5cc0d7[_0x5dcd('0x1f')]('Content-Range',_0x43b71f+'-'+_0x537aed+'/'+_0x538be9)[_0x5dcd('0x1b')](_0x2b61bf);}return null;};}function patchUpdates(_0x186e84){return function(_0x564b){try{jsonpatch['apply'](_0x564b,_0x186e84,!![]);}catch(_0x1e423c){return BPromise[_0x5dcd('0x20')](_0x1e423c);}return _0x564b[_0x5dcd('0x21')]();};}function saveUpdates(_0x3c5045,_0x597b14){return function(_0x11d296){if(_0x11d296){return _0x11d296[_0x5dcd('0x22')](_0x3c5045)['then'](function(_0x557e94){return _0x557e94;});}return null;};}function removeEntity(_0x8c8090,_0x380954){return function(_0x23a21d){if(_0x23a21d){return _0x23a21d[_0x5dcd('0x23')]()[_0x5dcd('0x24')](function(){_0x8c8090[_0x5dcd('0x19')](0xcc)[_0x5dcd('0x1a')]();});}};}function handleEntityNotFound(_0x46102a,_0x40e847){return function(_0x270390){if(!_0x270390){_0x46102a['sendStatus'](0x194);}return _0x270390;};}function handleError(_0x750c06,_0x3c7054){_0x3c7054=_0x3c7054||0x1f4;return function(_0x17107e){logger['error'](_0x17107e[_0x5dcd('0x25')]);if(_0x17107e[_0x5dcd('0x26')]){delete _0x17107e[_0x5dcd('0x26')];}_0x750c06[_0x5dcd('0x19')](_0x3c7054)[_0x5dcd('0x27')](_0x17107e);};}exports['index']=function(_0xf30ac6,_0x17d9ec){var _0x1f7536={},_0x147edf={},_0x379f3c={'count':0x0,'rows':[]};var _0x5df986=db[_0x5dcd('0x28')][_0x5dcd('0x29')];_0x147edf[_0x5dcd('0x2a')]=_[_0x5dcd('0x2b')](_0x5df986);_0x147edf[_0x5dcd('0x2c')]=_[_0x5dcd('0x2b')](_0xf30ac6[_0x5dcd('0x2c')]);_0x147edf[_0x5dcd('0x2d')]=_[_0x5dcd('0x2e')](_0x147edf[_0x5dcd('0x2a')],_0x147edf['query']);_0x1f7536[_0x5dcd('0x2f')]=_['intersection'](_0x147edf['model'],qs[_0x5dcd('0x30')](_0xf30ac6[_0x5dcd('0x2c')]['fields']));_0x1f7536[_0x5dcd('0x2f')]=_0x1f7536[_0x5dcd('0x2f')]['length']?_0x1f7536[_0x5dcd('0x2f')]:_0x147edf[_0x5dcd('0x2a')];if(!_0xf30ac6[_0x5dcd('0x2c')][_0x5dcd('0x31')]('nolimit')){_0x1f7536['limit']=qs[_0x5dcd('0x1e')](_0xf30ac6[_0x5dcd('0x2c')]['limit']);_0x1f7536['offset']=qs[_0x5dcd('0x1d')](_0xf30ac6['query'][_0x5dcd('0x1d')]);}_0x1f7536['order']=qs['sort'](_0xf30ac6[_0x5dcd('0x2c')][_0x5dcd('0x32')]);_0x1f7536[_0x5dcd('0x33')]=qs[_0x5dcd('0x2d')](_[_0x5dcd('0x34')](_0xf30ac6[_0x5dcd('0x2c')],_0x147edf[_0x5dcd('0x2d')]));if(_0xf30ac6[_0x5dcd('0x2c')][_0x5dcd('0x35')]){_0x1f7536[_0x5dcd('0x33')]=_[_0x5dcd('0x36')](_0x1f7536[_0x5dcd('0x33')],{'$or':_[_0x5dcd('0x37')](_0x5df986,function(_0x2d11fb){if(_0x2d11fb[_0x5dcd('0x38')][_0x5dcd('0x39')]!==_0x5dcd('0x3a')){var _0xcf5b2b={};_0xcf5b2b[_0x2d11fb[_0x5dcd('0x3b')]]={'$like':'%'+_0xf30ac6['query'][_0x5dcd('0x35')]+'%'};return _0xcf5b2b;}})});}_0x1f7536=_[_0x5dcd('0x36')]({},_0x1f7536,_0xf30ac6['options']);var _0x99d57f={'where':_0x1f7536[_0x5dcd('0x33')]};return db[_0x5dcd('0x28')][_0x5dcd('0x1c')](_0x99d57f)[_0x5dcd('0x24')](function(_0x220bc3){_0x379f3c[_0x5dcd('0x1c')]=_0x220bc3;if(_0xf30ac6['query'][_0x5dcd('0x3c')]){_0x1f7536[_0x5dcd('0x3d')]=[{'all':!![]}];}return db[_0x5dcd('0x28')][_0x5dcd('0x3e')](_0x1f7536);})[_0x5dcd('0x24')](function(_0xc745a3){_0x379f3c['rows']=_0xc745a3;return _0x379f3c;})['then'](respondWithFilteredResult(_0x17d9ec,_0x1f7536))['catch'](handleError(_0x17d9ec,null));};exports[_0x5dcd('0x3f')]=function(_0x4888ae,_0x4b1c1d){var _0x5b3de0={'raw':!![],'where':{'id':_0x4888ae[_0x5dcd('0x40')]['id']}},_0x591265={};_0x591265[_0x5dcd('0x2a')]=_[_0x5dcd('0x2b')](db['ZendeskField'][_0x5dcd('0x29')]);_0x591265[_0x5dcd('0x2c')]=_[_0x5dcd('0x2b')](_0x4888ae[_0x5dcd('0x2c')]);_0x591265[_0x5dcd('0x2d')]=_[_0x5dcd('0x2e')](_0x591265[_0x5dcd('0x2a')],_0x591265[_0x5dcd('0x2c')]);_0x5b3de0[_0x5dcd('0x2f')]=_[_0x5dcd('0x2e')](_0x591265[_0x5dcd('0x2a')],qs[_0x5dcd('0x30')](_0x4888ae[_0x5dcd('0x2c')][_0x5dcd('0x30')]));_0x5b3de0['attributes']=_0x5b3de0['attributes'][_0x5dcd('0x41')]?_0x5b3de0[_0x5dcd('0x2f')]:_0x591265[_0x5dcd('0x2a')];if(_0x4888ae[_0x5dcd('0x2c')][_0x5dcd('0x3c')]){_0x5b3de0[_0x5dcd('0x3d')]=[{'all':!![]}];}_0x5b3de0=_[_0x5dcd('0x36')]({},_0x5b3de0,_0x4888ae['options']);return db[_0x5dcd('0x28')][_0x5dcd('0x42')](_0x5b3de0)[_0x5dcd('0x24')](handleEntityNotFound(_0x4b1c1d,null))[_0x5dcd('0x24')](respondWithResult(_0x4b1c1d,null))[_0x5dcd('0x43')](handleError(_0x4b1c1d,null));};exports[_0x5dcd('0x44')]=function(_0x19c795,_0xef280b){return db[_0x5dcd('0x28')][_0x5dcd('0x44')](_0x19c795[_0x5dcd('0x45')],{})[_0x5dcd('0x24')](respondWithResult(_0xef280b,0xc9))[_0x5dcd('0x43')](handleError(_0xef280b,null));};exports[_0x5dcd('0x22')]=function(_0x56de07,_0x345ac6){if(_0x56de07[_0x5dcd('0x45')]['id']){delete _0x56de07['body']['id'];}return db[_0x5dcd('0x28')][_0x5dcd('0x42')]({'where':{'id':_0x56de07['params']['id']}})['then'](handleEntityNotFound(_0x345ac6,null))[_0x5dcd('0x24')](saveUpdates(_0x56de07[_0x5dcd('0x45')],null))[_0x5dcd('0x24')](respondWithResult(_0x345ac6,null))[_0x5dcd('0x43')](handleError(_0x345ac6,null));};exports[_0x5dcd('0x23')]=function(_0x6105d3,_0x24caac){return db['ZendeskField'][_0x5dcd('0x42')]({'where':{'id':_0x6105d3[_0x5dcd('0x40')]['id']}})[_0x5dcd('0x24')](handleEntityNotFound(_0x24caac,null))[_0x5dcd('0x24')](removeEntity(_0x24caac,null))[_0x5dcd('0x43')](handleError(_0x24caac,null));};
\ No newline at end of file
+var _0xe1bd=['intersection','find','create','body','params','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../mysqldb','sendStatus','end','status','count','offset','limit','save','update','then','destroy','error','stack','name','send','index','ZendeskField','rawAttributes','model','keys','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick','filter','merge','map','key','VIRTUAL','options','includeAll','include','findAll','catch','show'];(function(_0x3b0731,_0xcf9925){var _0x4204d7=function(_0x635ac5){while(--_0x635ac5){_0x3b0731['push'](_0x3b0731['shift']());}};_0x4204d7(++_0xcf9925);}(_0xe1bd,0x1a3));var _0xde1b=function(_0x3deaaf,_0x4ae37f){_0x3deaaf=_0x3deaaf-0x0;var _0x3a7e56=_0xe1bd[_0x3deaaf];return _0x3a7e56;};'use strict';var pdf=require(_0xde1b('0x0'));var emlformat=require(_0xde1b('0x1'));var rimraf=require(_0xde1b('0x2'));var zipdir=require(_0xde1b('0x3'));var jsonpatch=require(_0xde1b('0x4'));var rp=require(_0xde1b('0x5'));var moment=require(_0xde1b('0x6'));var BPromise=require(_0xde1b('0x7'));var Mustache=require(_0xde1b('0x8'));var util=require(_0xde1b('0x9'));var path=require('path');var sox=require(_0xde1b('0xa'));var csv=require(_0xde1b('0xb'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xde1b('0xc'));var squel=require(_0xde1b('0xd'));var crypto=require(_0xde1b('0xe'));var jsforce=require(_0xde1b('0xf'));var deskjs=require(_0xde1b('0x10'));var toCsv=require(_0xde1b('0xb'));var querystring=require(_0xde1b('0x11'));var Papa=require('papaparse');var Redis=require(_0xde1b('0x12'));var authService=require(_0xde1b('0x13'));var qs=require(_0xde1b('0x14'));var hardwareService=require(_0xde1b('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0xde1b('0x16'));var config=require('../../config/environment');var db=require(_0xde1b('0x17'))['db'];function respondWithStatusCode(_0x40736d,_0x4bd041){_0x4bd041=_0x4bd041||0xcc;return function(_0xfec5d6){if(_0xfec5d6){return _0x40736d[_0xde1b('0x18')](_0x4bd041);}return _0x40736d['status'](_0x4bd041)[_0xde1b('0x19')]();};}function respondWithResult(_0x7f212e,_0x420884){_0x420884=_0x420884||0xc8;return function(_0x35ee00){if(_0x35ee00){return _0x7f212e[_0xde1b('0x1a')](_0x420884)['json'](_0x35ee00);}};}function respondWithFilteredResult(_0x946630,_0x3a86cf){return function(_0x59e81a){if(_0x59e81a){var _0x1ee14e=_0x59e81a[_0xde1b('0x1b')],_0x379740=_0x3a86cf[_0xde1b('0x1c')],_0x12e8c0=_0x3a86cf[_0xde1b('0x1c')]+_0x3a86cf[_0xde1b('0x1d')],_0x4c522b;if(_0x12e8c0>=_0x1ee14e){_0x12e8c0=_0x1ee14e;_0x4c522b=0xc8;}else{_0x4c522b=0xce;}_0x946630[_0xde1b('0x1a')](_0x4c522b);return _0x946630['set']('Content-Range',_0x379740+'-'+_0x12e8c0+'/'+_0x1ee14e)['json'](_0x59e81a);}return null;};}function patchUpdates(_0x1b3787){return function(_0x64d454){try{jsonpatch['apply'](_0x64d454,_0x1b3787,!![]);}catch(_0x42cc27){return BPromise['reject'](_0x42cc27);}return _0x64d454[_0xde1b('0x1e')]();};}function saveUpdates(_0x355c88,_0xf23a0e){return function(_0x56a024){if(_0x56a024){return _0x56a024[_0xde1b('0x1f')](_0x355c88)[_0xde1b('0x20')](function(_0x54781b){return _0x54781b;});}return null;};}function removeEntity(_0x11ede8,_0x40f00d){return function(_0xeb5a77){if(_0xeb5a77){return _0xeb5a77[_0xde1b('0x21')]()[_0xde1b('0x20')](function(){_0x11ede8['status'](0xcc)[_0xde1b('0x19')]();});}};}function handleEntityNotFound(_0x1207aa,_0x284780){return function(_0x8681dd){if(!_0x8681dd){_0x1207aa['sendStatus'](0x194);}return _0x8681dd;};}function handleError(_0x277a59,_0x50d68f){_0x50d68f=_0x50d68f||0x1f4;return function(_0x3d5e32){logger[_0xde1b('0x22')](_0x3d5e32[_0xde1b('0x23')]);if(_0x3d5e32[_0xde1b('0x24')]){delete _0x3d5e32['name'];}_0x277a59[_0xde1b('0x1a')](_0x50d68f)[_0xde1b('0x25')](_0x3d5e32);};}exports[_0xde1b('0x26')]=function(_0x4d0873,_0x229aa0){var _0x420500={},_0x5e99e1={},_0x5591e8={'count':0x0,'rows':[]};var _0x4586d6=db[_0xde1b('0x27')][_0xde1b('0x28')];_0x5e99e1[_0xde1b('0x29')]=_[_0xde1b('0x2a')](_0x4586d6);_0x5e99e1[_0xde1b('0x2b')]=_[_0xde1b('0x2a')](_0x4d0873['query']);_0x5e99e1[_0xde1b('0x2c')]=_['intersection'](_0x5e99e1[_0xde1b('0x29')],_0x5e99e1[_0xde1b('0x2b')]);_0x420500[_0xde1b('0x2d')]=_['intersection'](_0x5e99e1['model'],qs[_0xde1b('0x2e')](_0x4d0873[_0xde1b('0x2b')][_0xde1b('0x2e')]));_0x420500['attributes']=_0x420500[_0xde1b('0x2d')][_0xde1b('0x2f')]?_0x420500[_0xde1b('0x2d')]:_0x5e99e1[_0xde1b('0x29')];if(!_0x4d0873['query'][_0xde1b('0x30')](_0xde1b('0x31'))){_0x420500[_0xde1b('0x1d')]=qs[_0xde1b('0x1d')](_0x4d0873['query'][_0xde1b('0x1d')]);_0x420500[_0xde1b('0x1c')]=qs[_0xde1b('0x1c')](_0x4d0873[_0xde1b('0x2b')][_0xde1b('0x1c')]);}_0x420500[_0xde1b('0x32')]=qs['sort'](_0x4d0873[_0xde1b('0x2b')]['sort']);_0x420500[_0xde1b('0x33')]=qs[_0xde1b('0x2c')](_[_0xde1b('0x34')](_0x4d0873[_0xde1b('0x2b')],_0x5e99e1['filters']));if(_0x4d0873[_0xde1b('0x2b')][_0xde1b('0x35')]){_0x420500['where']=_[_0xde1b('0x36')](_0x420500[_0xde1b('0x33')],{'$or':_[_0xde1b('0x37')](_0x4586d6,function(_0x274f16){if(_0x274f16['type'][_0xde1b('0x38')]!==_0xde1b('0x39')){var _0x5eb9f6={};_0x5eb9f6[_0x274f16['field']]={'$like':'%'+_0x4d0873[_0xde1b('0x2b')][_0xde1b('0x35')]+'%'};return _0x5eb9f6;}})});}_0x420500=_[_0xde1b('0x36')]({},_0x420500,_0x4d0873[_0xde1b('0x3a')]);var _0x3f05df={'where':_0x420500[_0xde1b('0x33')]};return db[_0xde1b('0x27')][_0xde1b('0x1b')](_0x3f05df)['then'](function(_0x29efa0){_0x5591e8[_0xde1b('0x1b')]=_0x29efa0;if(_0x4d0873[_0xde1b('0x2b')][_0xde1b('0x3b')]){_0x420500[_0xde1b('0x3c')]=[{'all':!![]}];}return db[_0xde1b('0x27')][_0xde1b('0x3d')](_0x420500);})[_0xde1b('0x20')](function(_0x143cc1){_0x5591e8['rows']=_0x143cc1;return _0x5591e8;})[_0xde1b('0x20')](respondWithFilteredResult(_0x229aa0,_0x420500))[_0xde1b('0x3e')](handleError(_0x229aa0,null));};exports[_0xde1b('0x3f')]=function(_0x4bb478,_0x3b1dad){var _0x5cdc8b={'raw':!![],'where':{'id':_0x4bb478['params']['id']}},_0x28d0e9={};_0x28d0e9[_0xde1b('0x29')]=_[_0xde1b('0x2a')](db[_0xde1b('0x27')][_0xde1b('0x28')]);_0x28d0e9[_0xde1b('0x2b')]=_['keys'](_0x4bb478[_0xde1b('0x2b')]);_0x28d0e9['filters']=_['intersection'](_0x28d0e9[_0xde1b('0x29')],_0x28d0e9[_0xde1b('0x2b')]);_0x5cdc8b[_0xde1b('0x2d')]=_[_0xde1b('0x40')](_0x28d0e9['model'],qs[_0xde1b('0x2e')](_0x4bb478[_0xde1b('0x2b')][_0xde1b('0x2e')]));_0x5cdc8b[_0xde1b('0x2d')]=_0x5cdc8b['attributes']['length']?_0x5cdc8b[_0xde1b('0x2d')]:_0x28d0e9[_0xde1b('0x29')];if(_0x4bb478[_0xde1b('0x2b')][_0xde1b('0x3b')]){_0x5cdc8b[_0xde1b('0x3c')]=[{'all':!![]}];}_0x5cdc8b=_[_0xde1b('0x36')]({},_0x5cdc8b,_0x4bb478['options']);return db[_0xde1b('0x27')][_0xde1b('0x41')](_0x5cdc8b)[_0xde1b('0x20')](handleEntityNotFound(_0x3b1dad,null))[_0xde1b('0x20')](respondWithResult(_0x3b1dad,null))[_0xde1b('0x3e')](handleError(_0x3b1dad,null));};exports[_0xde1b('0x42')]=function(_0x553e7e,_0xeff23e){return db[_0xde1b('0x27')]['create'](_0x553e7e[_0xde1b('0x43')],{})[_0xde1b('0x20')](respondWithResult(_0xeff23e,0xc9))[_0xde1b('0x3e')](handleError(_0xeff23e,null));};exports[_0xde1b('0x1f')]=function(_0x3e8b04,_0x541831){if(_0x3e8b04['body']['id']){delete _0x3e8b04[_0xde1b('0x43')]['id'];}return db[_0xde1b('0x27')][_0xde1b('0x41')]({'where':{'id':_0x3e8b04['params']['id']}})[_0xde1b('0x20')](handleEntityNotFound(_0x541831,null))['then'](saveUpdates(_0x3e8b04['body'],null))[_0xde1b('0x20')](respondWithResult(_0x541831,null))[_0xde1b('0x3e')](handleError(_0x541831,null));};exports['destroy']=function(_0x23673c,_0x2811b7){return db[_0xde1b('0x27')][_0xde1b('0x41')]({'where':{'id':_0x23673c[_0xde1b('0x44')]['id']}})[_0xde1b('0x20')](handleEntityNotFound(_0x2811b7,null))[_0xde1b('0x20')](removeEntity(_0x2811b7,null))[_0xde1b('0x3e')](handleError(_0x2811b7,null));};
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.model.js b/server/api/intZendeskField/intZendeskField.model.js
index c06d41d..c1c4f80 100644
--- a/server/api/intZendeskField/intZendeskField.model.js
+++ b/server/api/intZendeskField/intZendeskField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x68f9=['../../config/environment','./intZendeskField.attributes','exports','ZendeskField','zendesk_unique_index','idField','FieldId','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x512300,_0x12b11c){var _0x368fe0=function(_0x417b21){while(--_0x417b21){_0x512300['push'](_0x512300['shift']());}};_0x368fe0(++_0x12b11c);}(_0x68f9,0xca));var _0x968f=function(_0x1c7d5d,_0x54210e){_0x1c7d5d=_0x1c7d5d-0x0;var _0x36c564=_0x68f9[_0x1c7d5d];return _0x36c564;};'use strict';var _=require(_0x968f('0x0'));var util=require(_0x968f('0x1'));var logger=require(_0x968f('0x2'))(_0x968f('0x3'));var moment=require(_0x968f('0x4'));var BPromise=require(_0x968f('0x5'));var rp=require(_0x968f('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x968f('0x7'));var config=require(_0x968f('0x8'));var attributes=require(_0x968f('0x9'));module[_0x968f('0xa')]=function(_0x3b7509,_0x493f8){return _0x3b7509['define'](_0x968f('0xb'),attributes,{'tableName':'int_zendesk_fields','paranoid':![],'indexes':[{'name':_0x968f('0xc'),'fields':[_0x968f('0xd'),_0x968f('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x74ce=['path','../../config/environment','./intZendeskField.attributes','exports','define','int_zendesk_fields','lodash','util','../../config/logger','moment','request-promise'];(function(_0x50b293,_0x2186e3){var _0x36c290=function(_0x334280){while(--_0x334280){_0x50b293['push'](_0x50b293['shift']());}};_0x36c290(++_0x2186e3);}(_0x74ce,0x1c9));var _0xe74c=function(_0x50d0f7,_0x33225c){_0x50d0f7=_0x50d0f7-0x0;var _0x3a99ce=_0x74ce[_0x50d0f7];return _0x3a99ce;};'use strict';var _=require(_0xe74c('0x0'));var util=require(_0xe74c('0x1'));var logger=require(_0xe74c('0x2'))('api');var moment=require(_0xe74c('0x3'));var BPromise=require('bluebird');var rp=require(_0xe74c('0x4'));var fs=require('fs');var path=require(_0xe74c('0x5'));var rimraf=require('rimraf');var config=require(_0xe74c('0x6'));var attributes=require(_0xe74c('0x7'));module[_0xe74c('0x8')]=function(_0x4c1457,_0x295ad8){return _0x4c1457[_0xe74c('0x9')]('ZendeskField',attributes,{'tableName':_0xe74c('0xa'),'paranoid':![],'indexes':[{'name':'zendesk_unique_index','fields':['idField','FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.rpc.js b/server/api/intZendeskField/intZendeskField.rpc.js
index fd363e9..30a4bea 100644
--- a/server/api/intZendeskField/intZendeskField.rpc.js
+++ b/server/api/intZendeskField/intZendeskField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x39cb=['code','ZendeskField,\x20%s,\x20%s','message','result','catch','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','ZendeskField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x2afbb0,_0x44f16d){var _0x411ff2=function(_0x5edd7e){while(--_0x5edd7e){_0x2afbb0['push'](_0x2afbb0['shift']());}};_0x411ff2(++_0x44f16d);}(_0x39cb,0x1bd));var _0xb39c=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x39cb[_0x2641f9];return _0x585741;};'use strict';var _=require('lodash');var util=require(_0xb39c('0x0'));var moment=require(_0xb39c('0x1'));var BPromise=require('bluebird');var rs=require(_0xb39c('0x2'));var fs=require('fs');var Redis=require(_0xb39c('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xb39c('0x4'));var logger=require(_0xb39c('0x5'))(_0xb39c('0x6'));var config=require(_0xb39c('0x7'));var jayson=require(_0xb39c('0x8'));var client=jayson['client'][_0xb39c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2fc868,_0x40112f,_0x3f2fbe){return new BPromise(function(_0x47d6d7,_0x5ae14a){return client[_0xb39c('0xa')](_0x2fc868,_0x3f2fbe)[_0xb39c('0xb')](function(_0x3ffb94){logger[_0xb39c('0xc')]('ZendeskField,\x20%s,\x20%s',_0x40112f,'request\x20sent');logger['debug'](_0xb39c('0xd'),_0x40112f,_0xb39c('0xe'),JSON[_0xb39c('0xf')](_0x3ffb94));if(_0x3ffb94[_0xb39c('0x10')]){if(_0x3ffb94[_0xb39c('0x10')][_0xb39c('0x11')]===0x1f4){logger[_0xb39c('0x10')](_0xb39c('0x12'),_0x40112f,_0x3ffb94['error'][_0xb39c('0x13')]);return _0x5ae14a(_0x3ffb94[_0xb39c('0x10')][_0xb39c('0x13')]);}logger['error'](_0xb39c('0x12'),_0x40112f,_0x3ffb94[_0xb39c('0x10')][_0xb39c('0x13')]);return _0x47d6d7(_0x3ffb94[_0xb39c('0x10')][_0xb39c('0x13')]);}else{logger[_0xb39c('0xc')](_0xb39c('0x12'),_0x40112f,'request\x20sent');_0x47d6d7(_0x3ffb94[_0xb39c('0x14')][_0xb39c('0x13')]);}})[_0xb39c('0x15')](function(_0x1c2c5f){logger[_0xb39c('0x10')](_0xb39c('0x12'),_0x40112f,_0x1c2c5f);_0x5ae14a(_0x1c2c5f);});});}
\ No newline at end of file
+var _0x4f7b=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent','ZendeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird'];(function(_0x3d8c48,_0x37cc95){var _0x3b2eeb=function(_0x5b6b97){while(--_0x5b6b97){_0x3d8c48['push'](_0x3d8c48['shift']());}};_0x3b2eeb(++_0x37cc95);}(_0x4f7b,0x13e));var _0xb4f7=function(_0x1efd91,_0x5cd573){_0x1efd91=_0x1efd91-0x0;var _0xca5243=_0x4f7b[_0x1efd91];return _0xca5243;};'use strict';var _=require(_0xb4f7('0x0'));var util=require(_0xb4f7('0x1'));var moment=require(_0xb4f7('0x2'));var BPromise=require(_0xb4f7('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb4f7('0x4'));var db=require(_0xb4f7('0x5'))['db'];var utils=require(_0xb4f7('0x6'));var logger=require(_0xb4f7('0x7'))(_0xb4f7('0x8'));var config=require(_0xb4f7('0x9'));var jayson=require(_0xb4f7('0xa'));var client=jayson[_0xb4f7('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x27872e,_0x5e7b94,_0x179391){return new BPromise(function(_0xf56d08,_0x2849ed){return client['request'](_0x27872e,_0x179391)[_0xb4f7('0xc')](function(_0x5af41f){logger[_0xb4f7('0xd')](_0xb4f7('0xe'),_0x5e7b94,_0xb4f7('0xf'));logger['debug'](_0xb4f7('0x10'),_0x5e7b94,_0xb4f7('0xf'),JSON[_0xb4f7('0x11')](_0x5af41f));if(_0x5af41f[_0xb4f7('0x12')]){if(_0x5af41f[_0xb4f7('0x12')][_0xb4f7('0x13')]===0x1f4){logger[_0xb4f7('0x12')](_0xb4f7('0xe'),_0x5e7b94,_0x5af41f['error'][_0xb4f7('0x14')]);return _0x2849ed(_0x5af41f[_0xb4f7('0x12')][_0xb4f7('0x14')]);}logger[_0xb4f7('0x12')](_0xb4f7('0xe'),_0x5e7b94,_0x5af41f[_0xb4f7('0x12')]['message']);return _0xf56d08(_0x5af41f[_0xb4f7('0x12')]['message']);}else{logger[_0xb4f7('0xd')](_0xb4f7('0xe'),_0x5e7b94,_0xb4f7('0xf'));_0xf56d08(_0x5af41f[_0xb4f7('0x15')][_0xb4f7('0x14')]);}})[_0xb4f7('0x16')](function(_0xbc599a){logger[_0xb4f7('0x12')](_0xb4f7('0xe'),_0x5e7b94,_0xbc599a);_0x2849ed(_0xbc599a);});});}
\ No newline at end of file
diff --git a/server/api/intZohoAccount/index.js b/server/api/intZohoAccount/index.js
index 1aa73f5..a7e4989 100644
--- a/server/api/intZohoAccount/index.js
+++ b/server/api/intZohoAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4fc2=['getFields','post','create','addConfiguration','put','update','delete','/:id','destroy','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./intZohoAccount.controller','get','index','isAuthenticated','show','/:id/configurations','getConfigurations','/:id/fields'];(function(_0x13c6a9,_0x3375b0){var _0x270bc8=function(_0x41d4f4){while(--_0x41d4f4){_0x13c6a9['push'](_0x13c6a9['shift']());}};_0x270bc8(++_0x3375b0);}(_0x4fc2,0x111));var _0x24fc=function(_0x2b0f23,_0x152963){_0x2b0f23=_0x2b0f23-0x0;var _0x4e6ecb=_0x4fc2[_0x2b0f23];return _0x4e6ecb;};'use strict';var multer=require(_0x24fc('0x0'));var util=require(_0x24fc('0x1'));var path=require(_0x24fc('0x2'));var timeout=require(_0x24fc('0x3'));var express=require('express');var router=express[_0x24fc('0x4')]();var auth=require(_0x24fc('0x5'));var interaction=require(_0x24fc('0x6'));var config=require('../../config/environment');var controller=require(_0x24fc('0x7'));router[_0x24fc('0x8')]('/',auth['isAuthenticated'](),controller[_0x24fc('0x9')]);router[_0x24fc('0x8')]('/:id',auth[_0x24fc('0xa')](),controller[_0x24fc('0xb')]);router[_0x24fc('0x8')](_0x24fc('0xc'),auth[_0x24fc('0xa')](),controller[_0x24fc('0xd')]);router['get'](_0x24fc('0xe'),auth[_0x24fc('0xa')](),controller[_0x24fc('0xf')]);router[_0x24fc('0x10')]('/',auth[_0x24fc('0xa')](),controller[_0x24fc('0x11')]);router[_0x24fc('0x10')](_0x24fc('0xc'),auth['isAuthenticated'](),controller[_0x24fc('0x12')]);router[_0x24fc('0x13')]('/:id',auth[_0x24fc('0xa')](),controller[_0x24fc('0x14')]);router[_0x24fc('0x15')](_0x24fc('0x16'),auth[_0x24fc('0xa')](),controller[_0x24fc('0x17')]);module['exports']=router;
\ No newline at end of file
+var _0xbaf0=['index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','update','delete','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./intZohoAccount.controller','get','isAuthenticated'];(function(_0x4cbb8e,_0x1047c8){var _0x17846f=function(_0x29e1e0){while(--_0x29e1e0){_0x4cbb8e['push'](_0x4cbb8e['shift']());}};_0x17846f(++_0x1047c8);}(_0xbaf0,0x12a));var _0x0baf=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xbaf0[_0x14add3];return _0x4a174f;};'use strict';var multer=require('multer');var util=require(_0x0baf('0x0'));var path=require(_0x0baf('0x1'));var timeout=require(_0x0baf('0x2'));var express=require(_0x0baf('0x3'));var router=express[_0x0baf('0x4')]();var auth=require(_0x0baf('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x0baf('0x6'));var controller=require(_0x0baf('0x7'));router[_0x0baf('0x8')]('/',auth[_0x0baf('0x9')](),controller[_0x0baf('0xa')]);router[_0x0baf('0x8')](_0x0baf('0xb'),auth[_0x0baf('0x9')](),controller[_0x0baf('0xc')]);router['get'](_0x0baf('0xd'),auth['isAuthenticated'](),controller[_0x0baf('0xe')]);router[_0x0baf('0x8')](_0x0baf('0xf'),auth[_0x0baf('0x9')](),controller[_0x0baf('0x10')]);router[_0x0baf('0x11')]('/',auth[_0x0baf('0x9')](),controller[_0x0baf('0x12')]);router[_0x0baf('0x11')](_0x0baf('0xd'),auth[_0x0baf('0x9')](),controller['addConfiguration']);router['put'](_0x0baf('0xb'),auth[_0x0baf('0x9')](),controller[_0x0baf('0x13')]);router[_0x0baf('0x14')]('/:id',auth[_0x0baf('0x9')](),controller['destroy']);module[_0x0baf('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.attributes.js b/server/api/intZohoAccount/intZohoAccount.attributes.js
index 668f694..5d27c5b 100644
--- a/server/api/intZohoAccount/intZohoAccount.attributes.js
+++ b/server/api/intZohoAccount/intZohoAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0a1a=['STRING','sequelize','exports'];(function(_0x30f07a,_0x98341){var _0xb38461=function(_0x7b287a){while(--_0x7b287a){_0x30f07a['push'](_0x30f07a['shift']());}};_0xb38461(++_0x98341);}(_0x0a1a,0x178));var _0xa0a1=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0a1a[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0xa0a1('0x0'));module[_0xa0a1('0x1')]={'name':{'type':Sequelize[_0xa0a1('0x2')]},'description':{'type':Sequelize[_0xa0a1('0x2')]},'authToken':{'type':Sequelize[_0xa0a1('0x2')]},'host':{'type':Sequelize[_0xa0a1('0x2')]},'serverUrl':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb074=['sequelize','STRING'];(function(_0x43b9da,_0x539c50){var _0x30bef7=function(_0x324db1){while(--_0x324db1){_0x43b9da['push'](_0x43b9da['shift']());}};_0x30bef7(++_0x539c50);}(_0xb074,0x11a));var _0x4b07=function(_0x164039,_0x517559){_0x164039=_0x164039-0x0;var _0x3c6466=_0xb074[_0x164039];return _0x3c6466;};'use strict';var Sequelize=require(_0x4b07('0x0'));module['exports']={'name':{'type':Sequelize[_0x4b07('0x1')]},'description':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize[_0x4b07('0x1')]},'host':{'type':Sequelize[_0x4b07('0x1')]},'serverUrl':{'type':Sequelize[_0x4b07('0x1')]}};
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.controller.js b/server/api/intZohoAccount/intZohoAccount.controller.js
index 0bfcd87..2898bee 100644
--- a/server/api/intZohoAccount/intZohoAccount.controller.js
+++ b/server/api/intZohoAccount/intZohoAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4319=['type','Descriptions','getDescriptions','ZohoField','getFields','host','authToken','substring','lastIndexOf','GET','format','https://crm.%s/crm/private/json/Calls/getFields','crmapi','response','Calls','section','Call\x20Purpose','push','Pick\x20List','val','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','lodash','squel','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','end','stack','name','send','index','ZohoAccount','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','where','pick','filter','merge','map','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','params','find','create','body','getConfigurations','findOne','ZohoConfiguration','order','sort','addConfiguration','AccountId','getSubjects','channel'];(function(_0x1a7202,_0x2c4555){var _0x45fc3e=function(_0x152e19){while(--_0x152e19){_0x1a7202['push'](_0x1a7202['shift']());}};_0x45fc3e(++_0x2c4555);}(_0x4319,0x16c));var _0x9431=function(_0x46c1d5,_0x5ca335){_0x46c1d5=_0x46c1d5-0x0;var _0x40fe7b=_0x4319[_0x46c1d5];return _0x40fe7b;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x9431('0x0'));var rp=require(_0x9431('0x1'));var moment=require(_0x9431('0x2'));var BPromise=require(_0x9431('0x3'));var Mustache=require('mustache');var util=require(_0x9431('0x4'));var path=require(_0x9431('0x5'));var sox=require(_0x9431('0x6'));var csv=require('to-csv');var ejs=require(_0x9431('0x7'));var fs=require('fs');var _=require(_0x9431('0x8'));var squel=require(_0x9431('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x9431('0xa'));var querystring=require(_0x9431('0xb'));var Papa=require(_0x9431('0xc'));var Redis=require(_0x9431('0xd'));var authService=require(_0x9431('0xe'));var qs=require(_0x9431('0xf'));var hardwareService=require(_0x9431('0x10'));var logger=require('../../config/logger')(_0x9431('0x11'));var utils=require(_0x9431('0x12'));var config=require(_0x9431('0x13'));var db=require(_0x9431('0x14'))['db'];var integrations=require(_0x9431('0x15'));var jayson=require('jayson/promise');var client=jayson[_0x9431('0x16')]['http']({'port':0x232a});function checkPasswordPattern(_0x55cde8,_0x3d4140,_0x1fdd3a){if(_0x1fdd3a){var _0x1f511e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1f511e[_0x9431('0x17')](_0x3d4140)){return _0x55cde8;}else{throw new Error(_0x9431('0x18'));}}else{return _0x55cde8;}}function respondWithRpcPromise(_0x7cc2ee,_0x408869,_0x1477b5,_0x4a3609){return new BPromise(function(_0x5db77e,_0x456685){var _0x5e58cc=_0x4a3609||client;return _0x5e58cc[_0x9431('0x19')](_0x7cc2ee,_0x1477b5)['then'](function(_0xe2beca){logger[_0x9431('0x1a')](_0x9431('0x1b'),_0x408869,_0x9431('0x1c'));logger[_0x9431('0x1d')](_0x9431('0x1e'),_0x408869,_0x9431('0x1c'),JSON['stringify'](_0xe2beca));if(_0xe2beca[_0x9431('0x1f')]){if(_0xe2beca[_0x9431('0x1f')][_0x9431('0x20')]===0x1f4){logger[_0x9431('0x1f')]('ZohoAccount,\x20%s,\x20%s',_0x408869,_0xe2beca[_0x9431('0x1f')][_0x9431('0x21')]);return _0x456685(_0xe2beca['error'][_0x9431('0x21')]);}logger['error'](_0x9431('0x1b'),_0x408869,_0xe2beca[_0x9431('0x1f')][_0x9431('0x21')]);return _0x5db77e(_0xe2beca[_0x9431('0x1f')][_0x9431('0x21')]);}else{logger[_0x9431('0x1a')](_0x9431('0x1b'),_0x408869,_0x9431('0x1c'));_0x5db77e(_0xe2beca[_0x9431('0x22')][_0x9431('0x21')]);}})[_0x9431('0x23')](function(_0x38ddfd){logger[_0x9431('0x1f')](_0x9431('0x1b'),_0x408869,_0x38ddfd);_0x456685(_0x38ddfd);});});}function respondWithStatusCode(_0x4b2b5e,_0x2d5ddc){_0x2d5ddc=_0x2d5ddc||0xcc;return function(_0x801dc6){if(_0x801dc6){return _0x4b2b5e['sendStatus'](_0x2d5ddc);}return _0x4b2b5e[_0x9431('0x24')](_0x2d5ddc)['end']();};}function respondWithResult(_0x781531,_0x4b9776){_0x4b9776=_0x4b9776||0xc8;return function(_0x13c731){if(_0x13c731){return _0x781531['status'](_0x4b9776)[_0x9431('0x25')](_0x13c731);}};}function respondWithFilteredResult(_0x44d666,_0x47b743){return function(_0x496420){if(_0x496420){var _0x31c640=_0x496420[_0x9431('0x26')],_0x318a18=_0x47b743[_0x9431('0x27')],_0x52c390=_0x47b743[_0x9431('0x27')]+_0x47b743[_0x9431('0x28')],_0x200680;if(_0x52c390>=_0x31c640){_0x52c390=_0x31c640;_0x200680=0xc8;}else{_0x200680=0xce;}_0x44d666['status'](_0x200680);return _0x44d666[_0x9431('0x29')](_0x9431('0x2a'),_0x318a18+'-'+_0x52c390+'/'+_0x31c640)['json'](_0x496420);}return null;};}function patchUpdates(_0x35c0b9){return function(_0x41fea3){try{jsonpatch[_0x9431('0x2b')](_0x41fea3,_0x35c0b9,!![]);}catch(_0x3cc02c){return BPromise['reject'](_0x3cc02c);}return _0x41fea3[_0x9431('0x2c')]();};}function saveUpdates(_0x4e0e8e,_0x1c1d86){return function(_0x3c5109){if(_0x3c5109){return _0x3c5109[_0x9431('0x2d')](_0x4e0e8e)[_0x9431('0x2e')](function(_0x4bda26){return _0x4bda26;});}return null;};}function removeEntity(_0x2e5408,_0x59f1b2){return function(_0x497a4e){if(_0x497a4e){return _0x497a4e[_0x9431('0x2f')]()[_0x9431('0x2e')](function(){_0x2e5408[_0x9431('0x24')](0xcc)[_0x9431('0x30')]();});}};}function handleEntityNotFound(_0x6639d5,_0x2bb09f){return function(_0x3b79d9){if(!_0x3b79d9){_0x6639d5['sendStatus'](0x194);}return _0x3b79d9;};}function handleError(_0x5df10f,_0x12c071){_0x12c071=_0x12c071||0x1f4;return function(_0x591e19){logger[_0x9431('0x1f')](_0x591e19[_0x9431('0x31')]);if(_0x591e19[_0x9431('0x32')]){delete _0x591e19[_0x9431('0x32')];}_0x5df10f[_0x9431('0x24')](_0x12c071)[_0x9431('0x33')](_0x591e19);};}exports[_0x9431('0x34')]=function(_0x202036,_0xe7401f){var _0x4b1da0={},_0x76e94d={},_0x1b676a={'count':0x0,'rows':[]};var _0x5962d5=db[_0x9431('0x35')][_0x9431('0x36')];_0x76e94d[_0x9431('0x37')]=_[_0x9431('0x38')](_0x5962d5);_0x76e94d[_0x9431('0x39')]=_[_0x9431('0x38')](_0x202036[_0x9431('0x39')]);_0x76e94d[_0x9431('0x3a')]=_[_0x9431('0x3b')](_0x76e94d[_0x9431('0x37')],_0x76e94d['query']);_0x4b1da0[_0x9431('0x3c')]=_[_0x9431('0x3b')](_0x76e94d[_0x9431('0x37')],qs[_0x9431('0x3d')](_0x202036[_0x9431('0x39')]['fields']));_0x4b1da0[_0x9431('0x3c')]=_0x4b1da0[_0x9431('0x3c')][_0x9431('0x3e')]?_0x4b1da0['attributes']:_0x76e94d['model'];if(!_0x202036[_0x9431('0x39')][_0x9431('0x3f')](_0x9431('0x40'))){_0x4b1da0['limit']=qs[_0x9431('0x28')](_0x202036[_0x9431('0x39')][_0x9431('0x28')]);_0x4b1da0['offset']=qs[_0x9431('0x27')](_0x202036['query'][_0x9431('0x27')]);}_0x4b1da0['order']=qs['sort'](_0x202036['query']['sort']);_0x4b1da0[_0x9431('0x41')]=qs[_0x9431('0x3a')](_[_0x9431('0x42')](_0x202036[_0x9431('0x39')],_0x76e94d[_0x9431('0x3a')]));if(_0x202036[_0x9431('0x39')][_0x9431('0x43')]){_0x4b1da0[_0x9431('0x41')]=_[_0x9431('0x44')](_0x4b1da0[_0x9431('0x41')],{'$or':_[_0x9431('0x45')](_0x5962d5,function(_0x578ec5){if(_0x578ec5['type'][_0x9431('0x46')]!==_0x9431('0x47')){var _0xf7cded={};_0xf7cded[_0x578ec5[_0x9431('0x48')]]={'$like':'%'+_0x202036['query'][_0x9431('0x43')]+'%'};return _0xf7cded;}})});}_0x4b1da0=_[_0x9431('0x44')]({},_0x4b1da0,_0x202036[_0x9431('0x49')]);var _0x1670f7={'where':_0x4b1da0[_0x9431('0x41')]};return db['ZohoAccount'][_0x9431('0x26')](_0x1670f7)[_0x9431('0x2e')](function(_0x41c964){_0x1b676a[_0x9431('0x26')]=_0x41c964;if(_0x202036[_0x9431('0x39')][_0x9431('0x4a')]){_0x4b1da0[_0x9431('0x4b')]=[{'all':!![]}];}return db[_0x9431('0x35')][_0x9431('0x4c')](_0x4b1da0);})[_0x9431('0x2e')](function(_0x4f6f1d){_0x1b676a[_0x9431('0x4d')]=_0x4f6f1d;return _0x1b676a;})[_0x9431('0x2e')](respondWithFilteredResult(_0xe7401f,_0x4b1da0))[_0x9431('0x23')](handleError(_0xe7401f,null));};exports[_0x9431('0x4e')]=function(_0x252602,_0x4d2d14){var _0x2c5e88={'raw':![],'where':{'id':_0x252602[_0x9431('0x4f')]['id']}},_0x4751cb={};_0x4751cb[_0x9431('0x37')]=_[_0x9431('0x38')](db['ZohoAccount']['rawAttributes']);_0x4751cb[_0x9431('0x39')]=_[_0x9431('0x38')](_0x252602['query']);_0x4751cb['filters']=_[_0x9431('0x3b')](_0x4751cb[_0x9431('0x37')],_0x4751cb[_0x9431('0x39')]);_0x2c5e88['attributes']=_[_0x9431('0x3b')](_0x4751cb[_0x9431('0x37')],qs['fields'](_0x252602[_0x9431('0x39')][_0x9431('0x3d')]));_0x2c5e88[_0x9431('0x3c')]=_0x2c5e88[_0x9431('0x3c')][_0x9431('0x3e')]?_0x2c5e88[_0x9431('0x3c')]:_0x4751cb[_0x9431('0x37')];if(_0x252602[_0x9431('0x39')]['includeAll']){_0x2c5e88['include']=[{'all':!![]}];}_0x2c5e88=_[_0x9431('0x44')]({},_0x2c5e88,_0x252602['options']);return db[_0x9431('0x35')][_0x9431('0x50')](_0x2c5e88)[_0x9431('0x2e')](handleEntityNotFound(_0x4d2d14,null))[_0x9431('0x2e')](respondWithResult(_0x4d2d14,null))['catch'](handleError(_0x4d2d14,null));};exports[_0x9431('0x51')]=function(_0x5d54ae,_0x4b8e3d){return db[_0x9431('0x35')][_0x9431('0x51')](_0x5d54ae[_0x9431('0x52')],{})[_0x9431('0x2e')](respondWithResult(_0x4b8e3d,0xc9))['catch'](handleError(_0x4b8e3d,null));};exports[_0x9431('0x2d')]=function(_0x2cd789,_0x221b8b){if(_0x2cd789[_0x9431('0x52')]['id']){delete _0x2cd789[_0x9431('0x52')]['id'];}return db[_0x9431('0x35')][_0x9431('0x50')]({'where':{'id':_0x2cd789[_0x9431('0x4f')]['id']}})[_0x9431('0x2e')](handleEntityNotFound(_0x221b8b,null))[_0x9431('0x2e')](saveUpdates(_0x2cd789['body'],null))[_0x9431('0x2e')](respondWithResult(_0x221b8b,null))[_0x9431('0x23')](handleError(_0x221b8b,null));};exports[_0x9431('0x2f')]=function(_0x57bafb,_0x42bdc4){return db[_0x9431('0x35')][_0x9431('0x50')]({'where':{'id':_0x57bafb[_0x9431('0x4f')]['id']}})['then'](handleEntityNotFound(_0x42bdc4,null))[_0x9431('0x2e')](removeEntity(_0x42bdc4,null))[_0x9431('0x23')](handleError(_0x42bdc4,null));};exports[_0x9431('0x53')]=function(_0x38770e,_0x7fd0ff,_0x16344e){var _0x4f80b9={};var _0x11bde1={};var _0x264749;var _0x44eb6;return db['ZohoAccount'][_0x9431('0x54')]({'where':{'id':_0x38770e[_0x9431('0x4f')]['id']}})[_0x9431('0x2e')](handleEntityNotFound(_0x7fd0ff,null))[_0x9431('0x2e')](function(_0x4d88dc){if(_0x4d88dc){_0x264749=_0x4d88dc;_0x11bde1['model']=_[_0x9431('0x38')](db[_0x9431('0x55')][_0x9431('0x36')]);_0x11bde1[_0x9431('0x39')]=_[_0x9431('0x38')](_0x38770e[_0x9431('0x39')]);_0x11bde1['filters']=_[_0x9431('0x3b')](_0x11bde1['model'],_0x11bde1[_0x9431('0x39')]);_0x4f80b9[_0x9431('0x3c')]=_[_0x9431('0x3b')](_0x11bde1[_0x9431('0x37')],qs[_0x9431('0x3d')](_0x38770e[_0x9431('0x39')][_0x9431('0x3d')]));_0x4f80b9['attributes']=_0x4f80b9[_0x9431('0x3c')][_0x9431('0x3e')]?_0x4f80b9[_0x9431('0x3c')]:_0x11bde1[_0x9431('0x37')];_0x4f80b9[_0x9431('0x56')]=qs[_0x9431('0x57')](_0x38770e[_0x9431('0x39')][_0x9431('0x57')]);_0x4f80b9[_0x9431('0x41')]=qs['filters'](_['pick'](_0x38770e[_0x9431('0x39')],_0x11bde1['filters']));if(_0x38770e[_0x9431('0x39')][_0x9431('0x43')]){_0x4f80b9['where']=_[_0x9431('0x44')](_0x4f80b9[_0x9431('0x41')],{'$or':_['map'](_0x4f80b9[_0x9431('0x3c')],function(_0x1db26d){var _0x506254={};_0x506254[_0x1db26d]={'$like':'%'+_0x38770e[_0x9431('0x39')][_0x9431('0x43')]+'%'};return _0x506254;})});}_0x4f80b9=_[_0x9431('0x44')]({},_0x4f80b9,_0x38770e[_0x9431('0x49')]);return _0x264749[_0x9431('0x53')](_0x4f80b9);}})[_0x9431('0x2e')](function(_0x25a018){if(_0x25a018){_0x44eb6=_0x25a018[_0x9431('0x3e')];if(!_0x38770e[_0x9431('0x39')][_0x9431('0x3f')](_0x9431('0x40'))){_0x4f80b9[_0x9431('0x28')]=qs[_0x9431('0x28')](_0x38770e[_0x9431('0x39')]['limit']);_0x4f80b9[_0x9431('0x27')]=qs[_0x9431('0x27')](_0x38770e[_0x9431('0x39')][_0x9431('0x27')]);}return _0x264749[_0x9431('0x53')](_0x4f80b9);}})[_0x9431('0x2e')](function(_0x1f2842){if(_0x1f2842){return _0x1f2842?{'count':_0x44eb6,'rows':_0x1f2842}:null;}})[_0x9431('0x2e')](respondWithResult(_0x7fd0ff,null))[_0x9431('0x23')](handleError(_0x7fd0ff,null));};exports[_0x9431('0x58')]=function(_0x54902f,_0x530b13,_0x5e741b){if(_0x54902f['body']['id']){delete _0x54902f[_0x9431('0x52')]['id'];}return db['ZohoAccount']['findOne']({'where':{'id':_0x54902f[_0x9431('0x4f')]['id']}})[_0x9431('0x2e')](handleEntityNotFound(_0x530b13,null))[_0x9431('0x2e')](function(_0x129541){if(_0x129541){_0x54902f[_0x9431('0x52')][_0x9431('0x59')]=_0x129541['id'];_0x54902f[_0x9431('0x52')]['Subjects']=integrations[_0x9431('0x5a')](_0x54902f[_0x9431('0x52')][_0x9431('0x5b')],_0x54902f[_0x9431('0x52')][_0x9431('0x5c')]);_0x54902f['body'][_0x9431('0x5d')]=integrations[_0x9431('0x5e')](_0x54902f['body'][_0x9431('0x5b')],_0x54902f['body']['type']);return db[_0x9431('0x55')]['create'](_0x54902f[_0x9431('0x52')],{'include':[{'model':db[_0x9431('0x5f')],'as':'Subjects'},{'model':db[_0x9431('0x5f')],'as':_0x9431('0x5d')}]});}return null;})[_0x9431('0x2e')](respondWithResult(_0x530b13,null))[_0x9431('0x23')](handleError(_0x530b13,null));};exports[_0x9431('0x60')]=function(_0x245f31,_0x4e53f3,_0xc08883){var _0x1cc14d='';return db[_0x9431('0x35')][_0x9431('0x54')]({'where':{'id':_0x245f31['params']['id']},'attributes':['id',_0x9431('0x61'),_0x9431('0x62')]})['then'](handleEntityNotFound(_0x4e53f3,null))[_0x9431('0x2e')](function(_0x36c156){if(_0x36c156){_0x1cc14d=_0x36c156['host'];var _0x1d21ef=_0x1cc14d['slice'](-0x1);if(_0x1d21ef==='/'){_0x1cc14d=_0x1cc14d[_0x9431('0x63')](0x0,_0x1cc14d[_0x9431('0x64')](_0x1d21ef));}return rp({'method':_0x9431('0x65'),'uri':util[_0x9431('0x66')](_0x9431('0x67'),_0x1cc14d),'qs':{'authtoken':_0x36c156['authToken'],'scope':_0x9431('0x68')},'json':!![]});}})[_0x9431('0x2e')](function(_0x10feff){if(_0x10feff){if(_0x10feff['response']&&_0x10feff[_0x9431('0x69')][_0x9431('0x1f')]){throw new Error(_0x10feff[_0x9431('0x69')][_0x9431('0x1f')][_0x9431('0x21')]);}var _0x3fa083=[];if(_0x10feff['Calls']&&_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]){if(_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]['FL']){var _0x142b72=[_0x9431('0x6c')];for(var _0x158994=0x0,_0x520f7f=_0x10feff['Calls'][_0x9431('0x6b')]['FL'][_0x9431('0x3e')];_0x158994<_0x520f7f;_0x158994++){if(_['includes'](_0x142b72,_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]['FL'][_0x158994]['dv'])){_0x3fa083[_0x9431('0x6d')]({'id':_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]['FL'][_0x158994]['dv'],'name':_0x10feff[_0x9431('0x6a')]['section']['FL'][_0x158994]['label'],'custom':_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]['FL'][_0x158994]['customfield']==='true'?!![]:![],'options':_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]['FL'][_0x158994][_0x9431('0x5c')]===_0x9431('0x6e')&&_0x10feff[_0x9431('0x6a')]['section']['FL'][_0x158994]['val']?_[_0x9431('0x45')](_0x10feff[_0x9431('0x6a')][_0x9431('0x6b')]['FL'][_0x158994][_0x9431('0x6f')],function(_0x5113e){return{'name':_0x5113e,'value':_0x5113e};}):[]});}}}}return{'count':_0x3fa083['length'],'rows':_0x3fa083};}})['then'](respondWithResult(_0x4e53f3,null))['catch'](function(_0xc81de4){var _0x5b5d85=_0x245f31['query'][_0x9431('0x17')]?0x1f4:_0xc81de4['statusCode']||0x1f4;logger['error'](_0x9431('0x70'),'getFields',_0x5b5d85,JSON['stringify'](_0xc81de4));delete _0xc81de4['name'];if(_0x5b5d85===0x191){_0x5b5d85=0x190;}_0x4e53f3[_0x9431('0x24')](_0x5b5d85)[_0x9431('0x33')](_0x245f31[_0x9431('0x39')][_0x9431('0x17')]?{'message':_0x9431('0x71'),'statusCode':_0xc81de4['statusCode']}:_0xc81de4);});};
\ No newline at end of file
+var _0x72d7=['findOne','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZohoConfiguration','getFields','authToken','host','slice','substring','lastIndexOf','https://crm.%s/crm/private/json/Calls/getFields','crmapi','response','Calls','section','Call\x20Purpose','includes','push','customfield','true','val','test','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','statusCode','html-pdf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','squel','crypto','jsforce','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','../../components/integrations/configuration','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','status','json','offset','limit','set','Content-Range','apply','reject','save','update','then','end','sendStatus','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','map','type','key','field','ZohoAccount','count','includeAll','findAll','show','fields','options','find','create','body','params','getConfigurations'];(function(_0x421f8b,_0xe4499e){var _0x46dafe=function(_0x4b4d71){while(--_0x4b4d71){_0x421f8b['push'](_0x421f8b['shift']());}};_0x46dafe(++_0xe4499e);}(_0x72d7,0x8e));var _0x772d=function(_0x49ca18,_0x5e6d05){_0x49ca18=_0x49ca18-0x0;var _0x145d54=_0x72d7[_0x49ca18];return _0x145d54;};'use strict';var pdf=require(_0x772d('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x772d('0x1'));var jsonpatch=require(_0x772d('0x2'));var rp=require(_0x772d('0x3'));var moment=require(_0x772d('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x772d('0x5'));var util=require(_0x772d('0x6'));var path=require(_0x772d('0x7'));var sox=require(_0x772d('0x8'));var csv=require(_0x772d('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x772d('0xa'));var crypto=require(_0x772d('0xb'));var jsforce=require(_0x772d('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x772d('0x9'));var querystring=require('querystring');var Papa=require(_0x772d('0xd'));var Redis=require(_0x772d('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x772d('0xf'));var hardwareService=require(_0x772d('0x10'));var logger=require(_0x772d('0x11'))(_0x772d('0x12'));var utils=require('../../config/utils');var config=require(_0x772d('0x13'));var db=require(_0x772d('0x14'))['db'];var integrations=require(_0x772d('0x15'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0xdd67fc,_0x47cec3,_0x3864ec){if(_0x3864ec){var _0x273833=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x273833['test'](_0x47cec3)){return _0xdd67fc;}else{throw new Error(_0x772d('0x16'));}}else{return _0xdd67fc;}}function respondWithRpcPromise(_0x43ba46,_0x259774,_0x2c7122,_0x338e2b){return new BPromise(function(_0x2d16d4,_0x10f651){var _0x5608ee=_0x338e2b||client;return _0x5608ee[_0x772d('0x17')](_0x43ba46,_0x2c7122)['then'](function(_0x4f3f6b){logger[_0x772d('0x18')](_0x772d('0x19'),_0x259774,_0x772d('0x1a'));logger[_0x772d('0x1b')](_0x772d('0x1c'),_0x259774,_0x772d('0x1a'),JSON[_0x772d('0x1d')](_0x4f3f6b));if(_0x4f3f6b[_0x772d('0x1e')]){if(_0x4f3f6b[_0x772d('0x1e')][_0x772d('0x1f')]===0x1f4){logger[_0x772d('0x1e')]('ZohoAccount,\x20%s,\x20%s',_0x259774,_0x4f3f6b['error']['message']);return _0x10f651(_0x4f3f6b[_0x772d('0x1e')][_0x772d('0x20')]);}logger[_0x772d('0x1e')](_0x772d('0x19'),_0x259774,_0x4f3f6b[_0x772d('0x1e')]['message']);return _0x2d16d4(_0x4f3f6b[_0x772d('0x1e')][_0x772d('0x20')]);}else{logger[_0x772d('0x18')]('ZohoAccount,\x20%s,\x20%s',_0x259774,_0x772d('0x1a'));_0x2d16d4(_0x4f3f6b['result'][_0x772d('0x20')]);}})[_0x772d('0x21')](function(_0x4bac6d){logger[_0x772d('0x1e')](_0x772d('0x19'),_0x259774,_0x4bac6d);_0x10f651(_0x4bac6d);});});}function respondWithStatusCode(_0x1c8f0a,_0x60e3df){_0x60e3df=_0x60e3df||0xcc;return function(_0x522a0f){if(_0x522a0f){return _0x1c8f0a['sendStatus'](_0x60e3df);}return _0x1c8f0a['status'](_0x60e3df)['end']();};}function respondWithResult(_0x159766,_0x228c46){_0x228c46=_0x228c46||0xc8;return function(_0x4882ad){if(_0x4882ad){return _0x159766[_0x772d('0x22')](_0x228c46)[_0x772d('0x23')](_0x4882ad);}};}function respondWithFilteredResult(_0x5f189a,_0x5bedfa){return function(_0x25c2fd){if(_0x25c2fd){var _0x6a4cc7=_0x25c2fd['count'],_0xe601ec=_0x5bedfa['offset'],_0x332030=_0x5bedfa[_0x772d('0x24')]+_0x5bedfa[_0x772d('0x25')],_0x4964be;if(_0x332030>=_0x6a4cc7){_0x332030=_0x6a4cc7;_0x4964be=0xc8;}else{_0x4964be=0xce;}_0x5f189a[_0x772d('0x22')](_0x4964be);return _0x5f189a[_0x772d('0x26')](_0x772d('0x27'),_0xe601ec+'-'+_0x332030+'/'+_0x6a4cc7)[_0x772d('0x23')](_0x25c2fd);}return null;};}function patchUpdates(_0x6a00c){return function(_0x533dd1){try{jsonpatch[_0x772d('0x28')](_0x533dd1,_0x6a00c,!![]);}catch(_0x225faa){return BPromise[_0x772d('0x29')](_0x225faa);}return _0x533dd1[_0x772d('0x2a')]();};}function saveUpdates(_0x170215,_0x44bbf8){return function(_0x410733){if(_0x410733){return _0x410733[_0x772d('0x2b')](_0x170215)[_0x772d('0x2c')](function(_0x352783){return _0x352783;});}return null;};}function removeEntity(_0x2339bf,_0x29d9ae){return function(_0x267abd){if(_0x267abd){return _0x267abd['destroy']()[_0x772d('0x2c')](function(){_0x2339bf[_0x772d('0x22')](0xcc)[_0x772d('0x2d')]();});}};}function handleEntityNotFound(_0x1a14b1,_0x1478ae){return function(_0x252338){if(!_0x252338){_0x1a14b1[_0x772d('0x2e')](0x194);}return _0x252338;};}function handleError(_0x339f80,_0x365c16){_0x365c16=_0x365c16||0x1f4;return function(_0x1a2bc3){logger[_0x772d('0x1e')](_0x1a2bc3[_0x772d('0x2f')]);if(_0x1a2bc3[_0x772d('0x30')]){delete _0x1a2bc3[_0x772d('0x30')];}_0x339f80[_0x772d('0x22')](_0x365c16)[_0x772d('0x31')](_0x1a2bc3);};}exports[_0x772d('0x32')]=function(_0x33c47b,_0x75f76f){var _0x49e6e1={},_0x58b3e1={},_0x45af6d={'count':0x0,'rows':[]};var _0x340917=db['ZohoAccount'][_0x772d('0x33')];_0x58b3e1[_0x772d('0x34')]=_[_0x772d('0x35')](_0x340917);_0x58b3e1[_0x772d('0x36')]=_[_0x772d('0x35')](_0x33c47b['query']);_0x58b3e1[_0x772d('0x37')]=_[_0x772d('0x38')](_0x58b3e1[_0x772d('0x34')],_0x58b3e1[_0x772d('0x36')]);_0x49e6e1['attributes']=_['intersection'](_0x58b3e1[_0x772d('0x34')],qs['fields'](_0x33c47b[_0x772d('0x36')]['fields']));_0x49e6e1[_0x772d('0x39')]=_0x49e6e1[_0x772d('0x39')][_0x772d('0x3a')]?_0x49e6e1[_0x772d('0x39')]:_0x58b3e1[_0x772d('0x34')];if(!_0x33c47b[_0x772d('0x36')][_0x772d('0x3b')](_0x772d('0x3c'))){_0x49e6e1[_0x772d('0x25')]=qs[_0x772d('0x25')](_0x33c47b[_0x772d('0x36')][_0x772d('0x25')]);_0x49e6e1[_0x772d('0x24')]=qs[_0x772d('0x24')](_0x33c47b['query'][_0x772d('0x24')]);}_0x49e6e1[_0x772d('0x3d')]=qs['sort'](_0x33c47b[_0x772d('0x36')][_0x772d('0x3e')]);_0x49e6e1[_0x772d('0x3f')]=qs['filters'](_['pick'](_0x33c47b[_0x772d('0x36')],_0x58b3e1[_0x772d('0x37')]));if(_0x33c47b[_0x772d('0x36')][_0x772d('0x40')]){_0x49e6e1['where']=_[_0x772d('0x41')](_0x49e6e1[_0x772d('0x3f')],{'$or':_[_0x772d('0x42')](_0x340917,function(_0xba2ac5){if(_0xba2ac5[_0x772d('0x43')][_0x772d('0x44')]!=='VIRTUAL'){var _0x2fc77b={};_0x2fc77b[_0xba2ac5[_0x772d('0x45')]]={'$like':'%'+_0x33c47b[_0x772d('0x36')][_0x772d('0x40')]+'%'};return _0x2fc77b;}})});}_0x49e6e1=_[_0x772d('0x41')]({},_0x49e6e1,_0x33c47b['options']);var _0x52c9bd={'where':_0x49e6e1[_0x772d('0x3f')]};return db[_0x772d('0x46')][_0x772d('0x47')](_0x52c9bd)[_0x772d('0x2c')](function(_0x504d70){_0x45af6d['count']=_0x504d70;if(_0x33c47b['query'][_0x772d('0x48')]){_0x49e6e1['include']=[{'all':!![]}];}return db[_0x772d('0x46')][_0x772d('0x49')](_0x49e6e1);})[_0x772d('0x2c')](function(_0x334afa){_0x45af6d['rows']=_0x334afa;return _0x45af6d;})['then'](respondWithFilteredResult(_0x75f76f,_0x49e6e1))[_0x772d('0x21')](handleError(_0x75f76f,null));};exports[_0x772d('0x4a')]=function(_0x263b43,_0x508ac9){var _0xc0940e={'raw':![],'where':{'id':_0x263b43['params']['id']}},_0x13bd3f={};_0x13bd3f[_0x772d('0x34')]=_[_0x772d('0x35')](db[_0x772d('0x46')][_0x772d('0x33')]);_0x13bd3f[_0x772d('0x36')]=_[_0x772d('0x35')](_0x263b43['query']);_0x13bd3f[_0x772d('0x37')]=_['intersection'](_0x13bd3f[_0x772d('0x34')],_0x13bd3f[_0x772d('0x36')]);_0xc0940e['attributes']=_[_0x772d('0x38')](_0x13bd3f[_0x772d('0x34')],qs[_0x772d('0x4b')](_0x263b43[_0x772d('0x36')][_0x772d('0x4b')]));_0xc0940e[_0x772d('0x39')]=_0xc0940e[_0x772d('0x39')][_0x772d('0x3a')]?_0xc0940e['attributes']:_0x13bd3f[_0x772d('0x34')];if(_0x263b43[_0x772d('0x36')][_0x772d('0x48')]){_0xc0940e['include']=[{'all':!![]}];}_0xc0940e=_[_0x772d('0x41')]({},_0xc0940e,_0x263b43[_0x772d('0x4c')]);return db[_0x772d('0x46')][_0x772d('0x4d')](_0xc0940e)[_0x772d('0x2c')](handleEntityNotFound(_0x508ac9,null))['then'](respondWithResult(_0x508ac9,null))[_0x772d('0x21')](handleError(_0x508ac9,null));};exports[_0x772d('0x4e')]=function(_0x40eae4,_0x1348a8){return db[_0x772d('0x46')][_0x772d('0x4e')](_0x40eae4[_0x772d('0x4f')],{})['then'](respondWithResult(_0x1348a8,0xc9))[_0x772d('0x21')](handleError(_0x1348a8,null));};exports['update']=function(_0x269eeb,_0xe68153){if(_0x269eeb[_0x772d('0x4f')]['id']){delete _0x269eeb[_0x772d('0x4f')]['id'];}return db[_0x772d('0x46')][_0x772d('0x4d')]({'where':{'id':_0x269eeb[_0x772d('0x50')]['id']}})[_0x772d('0x2c')](handleEntityNotFound(_0xe68153,null))[_0x772d('0x2c')](saveUpdates(_0x269eeb[_0x772d('0x4f')],null))[_0x772d('0x2c')](respondWithResult(_0xe68153,null))[_0x772d('0x21')](handleError(_0xe68153,null));};exports['destroy']=function(_0x5b93d3,_0x5c4321){return db[_0x772d('0x46')][_0x772d('0x4d')]({'where':{'id':_0x5b93d3[_0x772d('0x50')]['id']}})[_0x772d('0x2c')](handleEntityNotFound(_0x5c4321,null))[_0x772d('0x2c')](removeEntity(_0x5c4321,null))[_0x772d('0x21')](handleError(_0x5c4321,null));};exports[_0x772d('0x51')]=function(_0x49b3eb,_0x313206,_0x25093a){var _0x58e03c={};var _0x3c3570={};var _0x510b50;var _0x3533ac;return db['ZohoAccount'][_0x772d('0x52')]({'where':{'id':_0x49b3eb[_0x772d('0x50')]['id']}})[_0x772d('0x2c')](handleEntityNotFound(_0x313206,null))[_0x772d('0x2c')](function(_0x1f4fcc){if(_0x1f4fcc){_0x510b50=_0x1f4fcc;_0x3c3570['model']=_['keys'](db['ZohoConfiguration']['rawAttributes']);_0x3c3570[_0x772d('0x36')]=_[_0x772d('0x35')](_0x49b3eb[_0x772d('0x36')]);_0x3c3570[_0x772d('0x37')]=_[_0x772d('0x38')](_0x3c3570['model'],_0x3c3570[_0x772d('0x36')]);_0x58e03c['attributes']=_['intersection'](_0x3c3570[_0x772d('0x34')],qs['fields'](_0x49b3eb[_0x772d('0x36')]['fields']));_0x58e03c[_0x772d('0x39')]=_0x58e03c[_0x772d('0x39')][_0x772d('0x3a')]?_0x58e03c[_0x772d('0x39')]:_0x3c3570[_0x772d('0x34')];_0x58e03c[_0x772d('0x3d')]=qs['sort'](_0x49b3eb['query'][_0x772d('0x3e')]);_0x58e03c[_0x772d('0x3f')]=qs[_0x772d('0x37')](_['pick'](_0x49b3eb['query'],_0x3c3570['filters']));if(_0x49b3eb[_0x772d('0x36')][_0x772d('0x40')]){_0x58e03c[_0x772d('0x3f')]=_[_0x772d('0x41')](_0x58e03c[_0x772d('0x3f')],{'$or':_[_0x772d('0x42')](_0x58e03c[_0x772d('0x39')],function(_0x3d409d){var _0x167124={};_0x167124[_0x3d409d]={'$like':'%'+_0x49b3eb['query'][_0x772d('0x40')]+'%'};return _0x167124;})});}_0x58e03c=_[_0x772d('0x41')]({},_0x58e03c,_0x49b3eb[_0x772d('0x4c')]);return _0x510b50[_0x772d('0x51')](_0x58e03c);}})[_0x772d('0x2c')](function(_0x21977f){if(_0x21977f){_0x3533ac=_0x21977f[_0x772d('0x3a')];if(!_0x49b3eb['query']['hasOwnProperty']('nolimit')){_0x58e03c[_0x772d('0x25')]=qs[_0x772d('0x25')](_0x49b3eb[_0x772d('0x36')][_0x772d('0x25')]);_0x58e03c[_0x772d('0x24')]=qs[_0x772d('0x24')](_0x49b3eb[_0x772d('0x36')][_0x772d('0x24')]);}return _0x510b50[_0x772d('0x51')](_0x58e03c);}})[_0x772d('0x2c')](function(_0x2090d7){if(_0x2090d7){return _0x2090d7?{'count':_0x3533ac,'rows':_0x2090d7}:null;}})[_0x772d('0x2c')](respondWithResult(_0x313206,null))[_0x772d('0x21')](handleError(_0x313206,null));};exports[_0x772d('0x53')]=function(_0x3ea673,_0x3f6305,_0x236fbe){if(_0x3ea673[_0x772d('0x4f')]['id']){delete _0x3ea673[_0x772d('0x4f')]['id'];}return db[_0x772d('0x46')][_0x772d('0x52')]({'where':{'id':_0x3ea673[_0x772d('0x50')]['id']}})[_0x772d('0x2c')](handleEntityNotFound(_0x3f6305,null))[_0x772d('0x2c')](function(_0x16d095){if(_0x16d095){_0x3ea673[_0x772d('0x4f')][_0x772d('0x54')]=_0x16d095['id'];_0x3ea673[_0x772d('0x4f')][_0x772d('0x55')]=integrations[_0x772d('0x56')](_0x3ea673['body'][_0x772d('0x57')],_0x3ea673[_0x772d('0x4f')][_0x772d('0x43')]);_0x3ea673[_0x772d('0x4f')][_0x772d('0x58')]=integrations[_0x772d('0x59')](_0x3ea673['body']['channel'],_0x3ea673['body'][_0x772d('0x43')]);return db[_0x772d('0x5a')][_0x772d('0x4e')](_0x3ea673[_0x772d('0x4f')],{'include':[{'model':db['ZohoField'],'as':_0x772d('0x55')},{'model':db['ZohoField'],'as':'Descriptions'}]});}return null;})[_0x772d('0x2c')](respondWithResult(_0x3f6305,null))['catch'](handleError(_0x3f6305,null));};exports[_0x772d('0x5b')]=function(_0x563c46,_0x32cdea,_0x1d173b){var _0x23344b='';return db['ZohoAccount'][_0x772d('0x52')]({'where':{'id':_0x563c46['params']['id']},'attributes':['id','host',_0x772d('0x5c')]})[_0x772d('0x2c')](handleEntityNotFound(_0x32cdea,null))['then'](function(_0x28fa96){if(_0x28fa96){_0x23344b=_0x28fa96[_0x772d('0x5d')];var _0x5d7843=_0x23344b[_0x772d('0x5e')](-0x1);if(_0x5d7843==='/'){_0x23344b=_0x23344b[_0x772d('0x5f')](0x0,_0x23344b[_0x772d('0x60')](_0x5d7843));}return rp({'method':'GET','uri':util['format'](_0x772d('0x61'),_0x23344b),'qs':{'authtoken':_0x28fa96[_0x772d('0x5c')],'scope':_0x772d('0x62')},'json':!![]});}})[_0x772d('0x2c')](function(_0x985e5e){if(_0x985e5e){if(_0x985e5e[_0x772d('0x63')]&&_0x985e5e[_0x772d('0x63')][_0x772d('0x1e')]){throw new Error(_0x985e5e['response'][_0x772d('0x1e')][_0x772d('0x20')]);}var _0xe34b8a=[];if(_0x985e5e[_0x772d('0x64')]&&_0x985e5e[_0x772d('0x64')][_0x772d('0x65')]){if(_0x985e5e[_0x772d('0x64')]['section']['FL']){var _0x4ddc2b=[_0x772d('0x66')];for(var _0x580a7d=0x0,_0x5a8faf=_0x985e5e['Calls'][_0x772d('0x65')]['FL'][_0x772d('0x3a')];_0x580a7d<_0x5a8faf;_0x580a7d++){if(_[_0x772d('0x67')](_0x4ddc2b,_0x985e5e[_0x772d('0x64')][_0x772d('0x65')]['FL'][_0x580a7d]['dv'])){_0xe34b8a[_0x772d('0x68')]({'id':_0x985e5e[_0x772d('0x64')]['section']['FL'][_0x580a7d]['dv'],'name':_0x985e5e['Calls'][_0x772d('0x65')]['FL'][_0x580a7d]['label'],'custom':_0x985e5e[_0x772d('0x64')][_0x772d('0x65')]['FL'][_0x580a7d][_0x772d('0x69')]===_0x772d('0x6a')?!![]:![],'options':_0x985e5e['Calls'][_0x772d('0x65')]['FL'][_0x580a7d][_0x772d('0x43')]==='Pick\x20List'&&_0x985e5e[_0x772d('0x64')]['section']['FL'][_0x580a7d][_0x772d('0x6b')]?_['map'](_0x985e5e[_0x772d('0x64')][_0x772d('0x65')]['FL'][_0x580a7d][_0x772d('0x6b')],function(_0x1b471f){return{'name':_0x1b471f,'value':_0x1b471f};}):[]});}}}}return{'count':_0xe34b8a[_0x772d('0x3a')],'rows':_0xe34b8a};}})['then'](respondWithResult(_0x32cdea,null))[_0x772d('0x21')](function(_0x2aa64f){var _0x846053=_0x563c46[_0x772d('0x36')][_0x772d('0x6c')]?0x1f4:_0x2aa64f['statusCode']||0x1f4;logger[_0x772d('0x1e')](_0x772d('0x6d'),_0x772d('0x5b'),_0x846053,JSON[_0x772d('0x1d')](_0x2aa64f));delete _0x2aa64f['name'];if(_0x846053===0x191){_0x846053=0x190;}_0x32cdea[_0x772d('0x22')](_0x846053)[_0x772d('0x31')](_0x563c46[_0x772d('0x36')][_0x772d('0x6c')]?{'message':_0x772d('0x6e'),'statusCode':_0x2aa64f[_0x772d('0x6f')]}:_0x2aa64f);});};
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.model.js b/server/api/intZohoAccount/intZohoAccount.model.js
index 570f866..ae52274 100644
--- a/server/api/intZohoAccount/intZohoAccount.model.js
+++ b/server/api/intZohoAccount/intZohoAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8e49=['../../components/integrations/configuration','exports','ZohoAccount','int_zoho_accounts','lodash','../../config/logger','api','path','rimraf','../../config/environment'];(function(_0x15e0f2,_0x6cedd7){var _0x4fe6a8=function(_0x3b20ee){while(--_0x3b20ee){_0x15e0f2['push'](_0x15e0f2['shift']());}};_0x4fe6a8(++_0x6cedd7);}(_0x8e49,0xf4));var _0x98e4=function(_0x311e77,_0x49a459){_0x311e77=_0x311e77-0x0;var _0x559c54=_0x8e49[_0x311e77];return _0x559c54;};'use strict';var _=require(_0x98e4('0x0'));var util=require('util');var logger=require(_0x98e4('0x1'))(_0x98e4('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x98e4('0x3'));var rimraf=require(_0x98e4('0x4'));var config=require(_0x98e4('0x5'));var attributes=require('./intZohoAccount.attributes');var integrations=require(_0x98e4('0x6'));module[_0x98e4('0x7')]=function(_0x40cc54,_0x1da04d){return _0x40cc54['define'](_0x98e4('0x8'),attributes,{'tableName':_0x98e4('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x953d=['bluebird','request-promise','path','rimraf','../../config/environment','./intZohoAccount.attributes','exports','util','../../config/logger','api'];(function(_0x1a0393,_0x54cf76){var _0x3a2619=function(_0x4d18e7){while(--_0x4d18e7){_0x1a0393['push'](_0x1a0393['shift']());}};_0x3a2619(++_0x54cf76);}(_0x953d,0x93));var _0xd953=function(_0x455c0f,_0x2f211f){_0x455c0f=_0x455c0f-0x0;var _0x1b906d=_0x953d[_0x455c0f];return _0x1b906d;};'use strict';var _=require('lodash');var util=require(_0xd953('0x0'));var logger=require(_0xd953('0x1'))(_0xd953('0x2'));var moment=require('moment');var BPromise=require(_0xd953('0x3'));var rp=require(_0xd953('0x4'));var fs=require('fs');var path=require(_0xd953('0x5'));var rimraf=require(_0xd953('0x6'));var config=require(_0xd953('0x7'));var attributes=require(_0xd953('0x8'));var integrations=require('../../components/integrations/configuration');module[_0xd953('0x9')]=function(_0x4d4247,_0x640615){return _0x4d4247['define']('ZohoAccount',attributes,{'tableName':'int_zoho_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.rpc.js b/server/api/intZohoAccount/intZohoAccount.rpc.js
index ef5ade8..a6d0298 100644
--- a/server/api/intZohoAccount/intZohoAccount.rpc.js
+++ b/server/api/intZohoAccount/intZohoAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf5bf=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','http','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ZohoAccount','findAll','options','raw','attributes','limit','map','include','model','GetZohoAccount','find','ShowZohoAccount','lodash','util'];(function(_0x503ffd,_0x8ecde){var _0x160437=function(_0x2d45dd){while(--_0x2d45dd){_0x503ffd['push'](_0x503ffd['shift']());}};_0x160437(++_0x8ecde);}(_0xf5bf,0x15c));var _0xff5b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf5bf[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xff5b('0x0'));var util=require(_0xff5b('0x1'));var moment=require(_0xff5b('0x2'));var BPromise=require(_0xff5b('0x3'));var rs=require(_0xff5b('0x4'));var fs=require('fs');var Redis=require(_0xff5b('0x5'));var db=require(_0xff5b('0x6'))['db'];var utils=require(_0xff5b('0x7'));var logger=require('../../config/logger')(_0xff5b('0x8'));var config=require(_0xff5b('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xff5b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x57d9da,_0x3ff032,_0x5124b0){return new BPromise(function(_0x52185f,_0x21c7ec){return client['request'](_0x57d9da,_0x5124b0)[_0xff5b('0xb')](function(_0x67bd18){logger[_0xff5b('0xc')](_0xff5b('0xd'),_0x3ff032,_0xff5b('0xe'));logger[_0xff5b('0xf')](_0xff5b('0x10'),_0x3ff032,'request\x20sent',JSON[_0xff5b('0x11')](_0x67bd18));if(_0x67bd18[_0xff5b('0x12')]){if(_0x67bd18[_0xff5b('0x12')][_0xff5b('0x13')]===0x1f4){logger[_0xff5b('0x12')](_0xff5b('0xd'),_0x3ff032,_0x67bd18[_0xff5b('0x12')][_0xff5b('0x14')]);return _0x21c7ec(_0x67bd18['error'][_0xff5b('0x14')]);}logger[_0xff5b('0x12')](_0xff5b('0xd'),_0x3ff032,_0x67bd18[_0xff5b('0x12')]['message']);return _0x52185f(_0x67bd18['error'][_0xff5b('0x14')]);}else{logger['info']('ZohoAccount,\x20%s,\x20%s',_0x3ff032,_0xff5b('0xe'));_0x52185f(_0x67bd18[_0xff5b('0x15')][_0xff5b('0x14')]);}})[_0xff5b('0x16')](function(_0x557050){logger[_0xff5b('0x12')](_0xff5b('0xd'),_0x3ff032,_0x557050);_0x21c7ec(_0x557050);});});}exports['GetZohoAccount']=function(_0x5af73a){var _0x3af709=this;return new Promise(function(_0x3de7cf,_0x249af5){return db[_0xff5b('0x17')][_0xff5b('0x18')]({'raw':_0x5af73a[_0xff5b('0x19')]?_0x5af73a[_0xff5b('0x19')][_0xff5b('0x1a')]===undefined?!![]:![]:!![],'where':_0x5af73a[_0xff5b('0x19')]?_0x5af73a[_0xff5b('0x19')]['where']||null:null,'attributes':_0x5af73a[_0xff5b('0x19')]?_0x5af73a[_0xff5b('0x19')][_0xff5b('0x1b')]||null:null,'limit':_0x5af73a['options']?_0x5af73a[_0xff5b('0x19')][_0xff5b('0x1c')]||null:null,'include':_0x5af73a[_0xff5b('0x19')]?_0x5af73a[_0xff5b('0x19')]['include']?_[_0xff5b('0x1d')](_0x5af73a[_0xff5b('0x19')][_0xff5b('0x1e')],function(_0x475f5f){return{'model':db[_0x475f5f[_0xff5b('0x1f')]],'as':_0x475f5f['as'],'attributes':_0x475f5f[_0xff5b('0x1b')],'include':_0x475f5f[_0xff5b('0x1e')]?_[_0xff5b('0x1d')](_0x475f5f['include'],function(_0xc4913d){return{'model':db[_0xc4913d[_0xff5b('0x1f')]],'as':_0xc4913d['as'],'attributes':_0xc4913d['attributes'],'include':_0xc4913d[_0xff5b('0x1e')]?_[_0xff5b('0x1d')](_0xc4913d[_0xff5b('0x1e')],function(_0x291e0c){return{'model':db[_0x291e0c[_0xff5b('0x1f')]],'as':_0x291e0c['as'],'attributes':_0x291e0c['attributes']};}):[]};}):[]};}):[]:[]})[_0xff5b('0xb')](function(_0x1dfa3c){logger[_0xff5b('0xc')](_0xff5b('0x20'),_0x5af73a);logger[_0xff5b('0xf')](_0xff5b('0x20'),_0x5af73a,JSON[_0xff5b('0x11')](_0x1dfa3c));_0x3de7cf(_0x1dfa3c);})[_0xff5b('0x16')](function(_0x2469c8){logger[_0xff5b('0x12')]('GetZohoAccount',_0x2469c8['message'],_0x5af73a);_0x249af5(_0x3af709['error'](0x1f4,_0x2469c8[_0xff5b('0x14')]));});});};exports['ShowZohoAccount']=function(_0x417d2a){var _0x5bc691=this;return new Promise(function(_0x2f394c,_0x202174){return db[_0xff5b('0x17')][_0xff5b('0x21')]({'raw':_0x417d2a[_0xff5b('0x19')]?_0x417d2a[_0xff5b('0x19')][_0xff5b('0x1a')]===undefined?!![]:![]:!![],'where':_0x417d2a[_0xff5b('0x19')]?_0x417d2a[_0xff5b('0x19')]['where']||null:null,'attributes':_0x417d2a[_0xff5b('0x19')]?_0x417d2a[_0xff5b('0x19')]['attributes']||null:null,'include':_0x417d2a['options']?_0x417d2a[_0xff5b('0x19')]['include']?_[_0xff5b('0x1d')](_0x417d2a[_0xff5b('0x19')]['include'],function(_0x531c4d){return{'model':db[_0x531c4d[_0xff5b('0x1f')]],'as':_0x531c4d['as'],'attributes':_0x531c4d[_0xff5b('0x1b')],'include':_0x531c4d[_0xff5b('0x1e')]?_[_0xff5b('0x1d')](_0x531c4d[_0xff5b('0x1e')],function(_0x2c4a84){return{'model':db[_0x2c4a84['model']],'as':_0x2c4a84['as'],'attributes':_0x2c4a84[_0xff5b('0x1b')],'include':_0x2c4a84[_0xff5b('0x1e')]?_[_0xff5b('0x1d')](_0x2c4a84['include'],function(_0x45a5b2){return{'model':db[_0x45a5b2['model']],'as':_0x45a5b2['as'],'attributes':_0x45a5b2[_0xff5b('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xff5b('0xb')](function(_0x2c8dbb){logger['info'](_0xff5b('0x22'),_0x417d2a);logger[_0xff5b('0xf')]('ShowZohoAccount',_0x417d2a,JSON[_0xff5b('0x11')](_0x2c8dbb));_0x2f394c(_0x2c8dbb);})[_0xff5b('0x16')](function(_0x5bb60d){logger[_0xff5b('0x12')]('ShowZohoAccount',_0x5bb60d[_0xff5b('0x14')],_0x417d2a);_0x202174(_0x5bc691[_0xff5b('0x12')](0x1f4,_0x5bb60d['message']));});});};
\ No newline at end of file
+var _0x1a21=['../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','stringify','error','code','message','ZohoAccount,\x20%s,\x20%s','result','catch','GetZohoAccount','ZohoAccount','options','raw','where','attributes','limit','include','model','map','ShowZohoAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2cf88d,_0x40c7a){var _0x12294c=function(_0x5b6351){while(--_0x5b6351){_0x2cf88d['push'](_0x2cf88d['shift']());}};_0x12294c(++_0x40c7a);}(_0x1a21,0x1d9));var _0x11a2=function(_0x4e4519,_0x392ae){_0x4e4519=_0x4e4519-0x0;var _0x340044=_0x1a21[_0x4e4519];return _0x340044;};'use strict';var _=require(_0x11a2('0x0'));var util=require(_0x11a2('0x1'));var moment=require(_0x11a2('0x2'));var BPromise=require(_0x11a2('0x3'));var rs=require(_0x11a2('0x4'));var fs=require('fs');var Redis=require(_0x11a2('0x5'));var db=require(_0x11a2('0x6'))['db'];var utils=require(_0x11a2('0x7'));var logger=require(_0x11a2('0x8'))(_0x11a2('0x9'));var config=require(_0x11a2('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x11a2('0xb')][_0x11a2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x238950,_0x3b724f,_0x227e9b){return new BPromise(function(_0x42438b,_0x4f5406){return client[_0x11a2('0xd')](_0x238950,_0x227e9b)[_0x11a2('0xe')](function(_0x290125){logger[_0x11a2('0xf')]('ZohoAccount,\x20%s,\x20%s',_0x3b724f,_0x11a2('0x10'));logger[_0x11a2('0x11')]('ZohoAccount,\x20%s,\x20%s,\x20%s',_0x3b724f,'request\x20sent',JSON[_0x11a2('0x12')](_0x290125));if(_0x290125['error']){if(_0x290125[_0x11a2('0x13')][_0x11a2('0x14')]===0x1f4){logger[_0x11a2('0x13')]('ZohoAccount,\x20%s,\x20%s',_0x3b724f,_0x290125[_0x11a2('0x13')][_0x11a2('0x15')]);return _0x4f5406(_0x290125[_0x11a2('0x13')]['message']);}logger['error'](_0x11a2('0x16'),_0x3b724f,_0x290125[_0x11a2('0x13')]['message']);return _0x42438b(_0x290125[_0x11a2('0x13')][_0x11a2('0x15')]);}else{logger[_0x11a2('0xf')](_0x11a2('0x16'),_0x3b724f,_0x11a2('0x10'));_0x42438b(_0x290125[_0x11a2('0x17')][_0x11a2('0x15')]);}})[_0x11a2('0x18')](function(_0x4768f8){logger[_0x11a2('0x13')](_0x11a2('0x16'),_0x3b724f,_0x4768f8);_0x4f5406(_0x4768f8);});});}exports[_0x11a2('0x19')]=function(_0x2c1745){var _0x4d5823=this;return new Promise(function(_0x2764b9,_0x3135c2){return db[_0x11a2('0x1a')]['findAll']({'raw':_0x2c1745[_0x11a2('0x1b')]?_0x2c1745[_0x11a2('0x1b')][_0x11a2('0x1c')]===undefined?!![]:![]:!![],'where':_0x2c1745[_0x11a2('0x1b')]?_0x2c1745[_0x11a2('0x1b')][_0x11a2('0x1d')]||null:null,'attributes':_0x2c1745[_0x11a2('0x1b')]?_0x2c1745[_0x11a2('0x1b')][_0x11a2('0x1e')]||null:null,'limit':_0x2c1745[_0x11a2('0x1b')]?_0x2c1745[_0x11a2('0x1b')][_0x11a2('0x1f')]||null:null,'include':_0x2c1745[_0x11a2('0x1b')]?_0x2c1745['options'][_0x11a2('0x20')]?_['map'](_0x2c1745['options'][_0x11a2('0x20')],function(_0x509b4b){return{'model':db[_0x509b4b[_0x11a2('0x21')]],'as':_0x509b4b['as'],'attributes':_0x509b4b[_0x11a2('0x1e')],'include':_0x509b4b['include']?_[_0x11a2('0x22')](_0x509b4b[_0x11a2('0x20')],function(_0xe913b5){return{'model':db[_0xe913b5[_0x11a2('0x21')]],'as':_0xe913b5['as'],'attributes':_0xe913b5[_0x11a2('0x1e')],'include':_0xe913b5['include']?_[_0x11a2('0x22')](_0xe913b5[_0x11a2('0x20')],function(_0x2b10b2){return{'model':db[_0x2b10b2[_0x11a2('0x21')]],'as':_0x2b10b2['as'],'attributes':_0x2b10b2[_0x11a2('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x36c2ad){logger[_0x11a2('0xf')](_0x11a2('0x19'),_0x2c1745);logger[_0x11a2('0x11')]('GetZohoAccount',_0x2c1745,JSON[_0x11a2('0x12')](_0x36c2ad));_0x2764b9(_0x36c2ad);})['catch'](function(_0x596237){logger['error'](_0x11a2('0x19'),_0x596237['message'],_0x2c1745);_0x3135c2(_0x4d5823[_0x11a2('0x13')](0x1f4,_0x596237[_0x11a2('0x15')]));});});};exports[_0x11a2('0x23')]=function(_0x24ac23){var _0x41a277=this;return new Promise(function(_0x2ae261,_0xc06b35){return db['ZohoAccount'][_0x11a2('0x24')]({'raw':_0x24ac23['options']?_0x24ac23[_0x11a2('0x1b')][_0x11a2('0x1c')]===undefined?!![]:![]:!![],'where':_0x24ac23[_0x11a2('0x1b')]?_0x24ac23[_0x11a2('0x1b')][_0x11a2('0x1d')]||null:null,'attributes':_0x24ac23[_0x11a2('0x1b')]?_0x24ac23[_0x11a2('0x1b')][_0x11a2('0x1e')]||null:null,'include':_0x24ac23[_0x11a2('0x1b')]?_0x24ac23['options'][_0x11a2('0x20')]?_[_0x11a2('0x22')](_0x24ac23[_0x11a2('0x1b')][_0x11a2('0x20')],function(_0x39ab92){return{'model':db[_0x39ab92[_0x11a2('0x21')]],'as':_0x39ab92['as'],'attributes':_0x39ab92[_0x11a2('0x1e')],'include':_0x39ab92[_0x11a2('0x20')]?_[_0x11a2('0x22')](_0x39ab92[_0x11a2('0x20')],function(_0x168094){return{'model':db[_0x168094[_0x11a2('0x21')]],'as':_0x168094['as'],'attributes':_0x168094[_0x11a2('0x1e')],'include':_0x168094[_0x11a2('0x20')]?_[_0x11a2('0x22')](_0x168094['include'],function(_0x31c2aa){return{'model':db[_0x31c2aa[_0x11a2('0x21')]],'as':_0x31c2aa['as'],'attributes':_0x31c2aa[_0x11a2('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x11a2('0xe')](function(_0x5a19e7){logger[_0x11a2('0xf')]('ShowZohoAccount',_0x24ac23);logger['debug']('ShowZohoAccount',_0x24ac23,JSON[_0x11a2('0x12')](_0x5a19e7));_0x2ae261(_0x5a19e7);})[_0x11a2('0x18')](function(_0x4e9787){logger['error'](_0x11a2('0x23'),_0x4e9787[_0x11a2('0x15')],_0x24ac23);_0xc06b35(_0x41a277[_0x11a2('0x13')](0x1f4,_0x4e9787[_0x11a2('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/index.js b/server/api/intZohoConfiguration/index.js
index c817338..dcc4813 100644
--- a/server/api/intZohoConfiguration/index.js
+++ b/server/api/intZohoConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9489=['../../config/environment','isAuthenticated','index','get','/:id','show','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x1bb96b,_0x6597b4){var _0x5eeb16=function(_0x325502){while(--_0x325502){_0x1bb96b['push'](_0x1bb96b['shift']());}};_0x5eeb16(++_0x6597b4);}(_0x9489,0xb2));var _0x9948=function(_0xae3c7e,_0x31c933){_0xae3c7e=_0xae3c7e-0x0;var _0x3bcd47=_0x9489[_0xae3c7e];return _0x3bcd47;};'use strict';var multer=require(_0x9948('0x0'));var util=require(_0x9948('0x1'));var path=require(_0x9948('0x2'));var timeout=require(_0x9948('0x3'));var express=require(_0x9948('0x4'));var router=express[_0x9948('0x5')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x9948('0x6'));var controller=require('./intZohoConfiguration.controller');router['get']('/',auth[_0x9948('0x7')](),controller[_0x9948('0x8')]);router[_0x9948('0x9')](_0x9948('0xa'),auth[_0x9948('0x7')](),controller[_0x9948('0xb')]);router[_0x9948('0x9')](_0x9948('0xc'),auth[_0x9948('0x7')](),controller['getFields']);router[_0x9948('0x9')](_0x9948('0xd'),auth[_0x9948('0x7')](),controller[_0x9948('0xe')]);router[_0x9948('0x9')](_0x9948('0xf'),auth[_0x9948('0x7')](),controller[_0x9948('0x10')]);router[_0x9948('0x11')]('/',auth[_0x9948('0x7')](),controller[_0x9948('0x12')]);router[_0x9948('0x13')]('/:id',auth[_0x9948('0x7')](),controller[_0x9948('0x14')]);router['delete'](_0x9948('0xa'),auth['isAuthenticated'](),controller[_0x9948('0x15')]);module[_0x9948('0x16')]=router;
\ No newline at end of file
+var _0xffcc=['destroy','exports','util','connect-timeout','express','../../config/environment','get','index','/:id','isAuthenticated','/:id/fields','getSubjects','create','put','update','delete'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0xffcc,0x112));var _0xcffc=function(_0x475919,_0x3e7d38){_0x475919=_0x475919-0x0;var _0x2605b4=_0xffcc[_0x475919];return _0x2605b4;};'use strict';var multer=require('multer');var util=require(_0xcffc('0x0'));var path=require('path');var timeout=require(_0xcffc('0x1'));var express=require(_0xcffc('0x2'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xcffc('0x3'));var controller=require('./intZohoConfiguration.controller');router[_0xcffc('0x4')]('/',auth['isAuthenticated'](),controller[_0xcffc('0x5')]);router[_0xcffc('0x4')](_0xcffc('0x6'),auth[_0xcffc('0x7')](),controller['show']);router[_0xcffc('0x4')](_0xcffc('0x8'),auth[_0xcffc('0x7')](),controller['getFields']);router[_0xcffc('0x4')]('/:id/subjects',auth[_0xcffc('0x7')](),controller[_0xcffc('0x9')]);router[_0xcffc('0x4')]('/:id/descriptions',auth[_0xcffc('0x7')](),controller['getDescriptions']);router['post']('/',auth[_0xcffc('0x7')](),controller[_0xcffc('0xa')]);router[_0xcffc('0xb')](_0xcffc('0x6'),auth[_0xcffc('0x7')](),controller[_0xcffc('0xc')]);router[_0xcffc('0xd')](_0xcffc('0x6'),auth['isAuthenticated'](),controller[_0xcffc('0xe')]);module[_0xcffc('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js
index e915f89..79f4644 100644
--- a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js
+++ b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0a6a=['STRING','sequelize'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x0a6a,0xff));var _0xa0a6=function(_0x5c78d9,_0x2736c7){_0x5c78d9=_0x5c78d9-0x0;var _0x69ae1f=_0x0a6a[_0x5c78d9];return _0x69ae1f;};'use strict';var Sequelize=require(_0xa0a6('0x0'));module['exports']={'name':{'type':Sequelize[_0xa0a6('0x1')]},'description':{'type':Sequelize[_0xa0a6('0x1')]}};
\ No newline at end of file
+var _0xb6e6=['sequelize','STRING'];(function(_0x4a68f9,_0x4fae3a){var _0x47e21e=function(_0x3b9c24){while(--_0x3b9c24){_0x4a68f9['push'](_0x4a68f9['shift']());}};_0x47e21e(++_0x4fae3a);}(_0xb6e6,0xa0));var _0x6b6e=function(_0x231a81,_0x4e8c91){_0x231a81=_0x231a81-0x0;var _0x9b0b10=_0xb6e6[_0x231a81];return _0x9b0b10;};'use strict';var Sequelize=require(_0x6b6e('0x0'));module['exports']={'name':{'type':Sequelize[_0x6b6e('0x1')]},'description':{'type':Sequelize[_0x6b6e('0x1')]}};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js
index 73ccc13..327a700 100644
--- a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js
+++ b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdc06=['status','end','json','offset','limit','set','apply','reject','save','update','destroy','then','stack','name','send','index','ZohoConfiguration','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','merge','key','field','filter','options','count','includeAll','include','findAll','rows','show','params','rawAttributes','find','create','body','findOne','ZohoField','order','pick','map','getSubjects','getDescriptions','html-pdf','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','jayson/promise','http','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','ZohoConfiguration,\x20%s,\x20%s','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xdc06,0xe4));var _0x6dc0=function(_0x5896e0,_0x28bd1f){_0x5896e0=_0x5896e0-0x0;var _0x449087=_0xdc06[_0x5896e0];return _0x449087;};'use strict';var pdf=require(_0x6dc0('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x6dc0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6dc0('0x2'));var rp=require(_0x6dc0('0x3'));var moment=require('moment');var BPromise=require(_0x6dc0('0x4'));var Mustache=require(_0x6dc0('0x5'));var util=require('util');var path=require(_0x6dc0('0x6'));var sox=require(_0x6dc0('0x7'));var csv=require(_0x6dc0('0x8'));var ejs=require(_0x6dc0('0x9'));var fs=require('fs');var _=require(_0x6dc0('0xa'));var squel=require(_0x6dc0('0xb'));var crypto=require(_0x6dc0('0xc'));var jsforce=require(_0x6dc0('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x6dc0('0xe'));var authService=require(_0x6dc0('0xf'));var qs=require(_0x6dc0('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6dc0('0x11'))('api');var utils=require('../../config/utils');var config=require(_0x6dc0('0x12'));var db=require(_0x6dc0('0x13'))['db'];var jayson=require(_0x6dc0('0x14'));var client=jayson['client'][_0x6dc0('0x15')]({'port':0x232a});function checkPasswordPattern(_0x59e7e8,_0x4a43f9,_0x2092c5){if(_0x2092c5){var _0x337c46=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x337c46['test'](_0x4a43f9)){return _0x59e7e8;}else{throw new Error(_0x6dc0('0x16'));}}else{return _0x59e7e8;}}function respondWithRpcPromise(_0x115232,_0x1978dc,_0xd70ebe,_0xd4e78e){return new BPromise(function(_0x1dfe84,_0x4534ef){var _0x3e1947=_0xd4e78e||client;return _0x3e1947[_0x6dc0('0x17')](_0x115232,_0xd70ebe)['then'](function(_0x3b46eb){logger[_0x6dc0('0x18')](_0x6dc0('0x19'),_0x1978dc,'request\x20sent');logger[_0x6dc0('0x1a')](_0x6dc0('0x1b'),_0x1978dc,_0x6dc0('0x1c'),JSON[_0x6dc0('0x1d')](_0x3b46eb));if(_0x3b46eb[_0x6dc0('0x1e')]){if(_0x3b46eb[_0x6dc0('0x1e')][_0x6dc0('0x1f')]===0x1f4){logger[_0x6dc0('0x1e')]('ZohoConfiguration,\x20%s,\x20%s',_0x1978dc,_0x3b46eb[_0x6dc0('0x1e')][_0x6dc0('0x20')]);return _0x4534ef(_0x3b46eb['error'][_0x6dc0('0x20')]);}logger[_0x6dc0('0x1e')]('ZohoConfiguration,\x20%s,\x20%s',_0x1978dc,_0x3b46eb['error'][_0x6dc0('0x20')]);return _0x1dfe84(_0x3b46eb[_0x6dc0('0x1e')][_0x6dc0('0x20')]);}else{logger[_0x6dc0('0x18')](_0x6dc0('0x19'),_0x1978dc,_0x6dc0('0x1c'));_0x1dfe84(_0x3b46eb[_0x6dc0('0x21')]['message']);}})[_0x6dc0('0x22')](function(_0x3db07d){logger[_0x6dc0('0x1e')](_0x6dc0('0x19'),_0x1978dc,_0x3db07d);_0x4534ef(_0x3db07d);});});}function respondWithStatusCode(_0x8f2851,_0x38ec7d){_0x38ec7d=_0x38ec7d||0xcc;return function(_0x3ad761){if(_0x3ad761){return _0x8f2851[_0x6dc0('0x23')](_0x38ec7d);}return _0x8f2851[_0x6dc0('0x24')](_0x38ec7d)[_0x6dc0('0x25')]();};}function respondWithResult(_0x40b928,_0x2121f1){_0x2121f1=_0x2121f1||0xc8;return function(_0x984632){if(_0x984632){return _0x40b928[_0x6dc0('0x24')](_0x2121f1)[_0x6dc0('0x26')](_0x984632);}};}function respondWithFilteredResult(_0x24afc2,_0x47f074){return function(_0x51cbdc){if(_0x51cbdc){var _0x43f4b6=_0x51cbdc['count'],_0x6f49fe=_0x47f074[_0x6dc0('0x27')],_0x54db33=_0x47f074['offset']+_0x47f074[_0x6dc0('0x28')],_0x5cfd97;if(_0x54db33>=_0x43f4b6){_0x54db33=_0x43f4b6;_0x5cfd97=0xc8;}else{_0x5cfd97=0xce;}_0x24afc2[_0x6dc0('0x24')](_0x5cfd97);return _0x24afc2[_0x6dc0('0x29')]('Content-Range',_0x6f49fe+'-'+_0x54db33+'/'+_0x43f4b6)[_0x6dc0('0x26')](_0x51cbdc);}return null;};}function patchUpdates(_0x2d097a){return function(_0x4e0c60){try{jsonpatch[_0x6dc0('0x2a')](_0x4e0c60,_0x2d097a,!![]);}catch(_0x33ae53){return BPromise[_0x6dc0('0x2b')](_0x33ae53);}return _0x4e0c60[_0x6dc0('0x2c')]();};}function saveUpdates(_0x4e94a5,_0x4116fc){return function(_0x586b60){if(_0x586b60){return _0x586b60[_0x6dc0('0x2d')](_0x4e94a5)['then'](function(_0x27369d){return _0x27369d;});}return null;};}function removeEntity(_0x496b1e,_0x41f7ae){return function(_0xd7ca7b){if(_0xd7ca7b){return _0xd7ca7b[_0x6dc0('0x2e')]()[_0x6dc0('0x2f')](function(){_0x496b1e[_0x6dc0('0x24')](0xcc)[_0x6dc0('0x25')]();});}};}function handleEntityNotFound(_0x5d4380,_0x5b44a6){return function(_0x47496d){if(!_0x47496d){_0x5d4380[_0x6dc0('0x23')](0x194);}return _0x47496d;};}function handleError(_0x2bf644,_0x5470ee){_0x5470ee=_0x5470ee||0x1f4;return function(_0x11c93e){logger['error'](_0x11c93e[_0x6dc0('0x30')]);if(_0x11c93e[_0x6dc0('0x31')]){delete _0x11c93e['name'];}_0x2bf644[_0x6dc0('0x24')](_0x5470ee)[_0x6dc0('0x32')](_0x11c93e);};}exports[_0x6dc0('0x33')]=function(_0x3bd7c4,_0x5d7cda){var _0x9a0306={},_0x443543={},_0xd9a970={'count':0x0,'rows':[]};var _0x291a01=db[_0x6dc0('0x34')]['rawAttributes'];_0x443543[_0x6dc0('0x35')]=_[_0x6dc0('0x36')](_0x291a01);_0x443543[_0x6dc0('0x37')]=_['keys'](_0x3bd7c4['query']);_0x443543[_0x6dc0('0x38')]=_['intersection'](_0x443543[_0x6dc0('0x35')],_0x443543['query']);_0x9a0306['attributes']=_[_0x6dc0('0x39')](_0x443543[_0x6dc0('0x35')],qs[_0x6dc0('0x3a')](_0x3bd7c4[_0x6dc0('0x37')]['fields']));_0x9a0306[_0x6dc0('0x3b')]=_0x9a0306[_0x6dc0('0x3b')][_0x6dc0('0x3c')]?_0x9a0306[_0x6dc0('0x3b')]:_0x443543['model'];if(!_0x3bd7c4[_0x6dc0('0x37')][_0x6dc0('0x3d')](_0x6dc0('0x3e'))){_0x9a0306[_0x6dc0('0x28')]=qs['limit'](_0x3bd7c4[_0x6dc0('0x37')][_0x6dc0('0x28')]);_0x9a0306[_0x6dc0('0x27')]=qs[_0x6dc0('0x27')](_0x3bd7c4[_0x6dc0('0x37')][_0x6dc0('0x27')]);}_0x9a0306['order']=qs[_0x6dc0('0x3f')](_0x3bd7c4[_0x6dc0('0x37')][_0x6dc0('0x3f')]);_0x9a0306[_0x6dc0('0x40')]=qs[_0x6dc0('0x38')](_['pick'](_0x3bd7c4[_0x6dc0('0x37')],_0x443543[_0x6dc0('0x38')]));if(_0x3bd7c4[_0x6dc0('0x37')]['filter']){_0x9a0306[_0x6dc0('0x40')]=_[_0x6dc0('0x41')](_0x9a0306['where'],{'$or':_['map'](_0x291a01,function(_0x5a593b){if(_0x5a593b['type'][_0x6dc0('0x42')]!=='VIRTUAL'){var _0x9a7bbf={};_0x9a7bbf[_0x5a593b[_0x6dc0('0x43')]]={'$like':'%'+_0x3bd7c4['query'][_0x6dc0('0x44')]+'%'};return _0x9a7bbf;}})});}_0x9a0306=_['merge']({},_0x9a0306,_0x3bd7c4[_0x6dc0('0x45')]);var _0x4d08f5={'where':_0x9a0306[_0x6dc0('0x40')]};return db[_0x6dc0('0x34')][_0x6dc0('0x46')](_0x4d08f5)[_0x6dc0('0x2f')](function(_0x2ade2e){_0xd9a970[_0x6dc0('0x46')]=_0x2ade2e;if(_0x3bd7c4[_0x6dc0('0x37')][_0x6dc0('0x47')]){_0x9a0306[_0x6dc0('0x48')]=[{'all':!![]}];}return db['ZohoConfiguration'][_0x6dc0('0x49')](_0x9a0306);})[_0x6dc0('0x2f')](function(_0x264a5e){_0xd9a970[_0x6dc0('0x4a')]=_0x264a5e;return _0xd9a970;})[_0x6dc0('0x2f')](respondWithFilteredResult(_0x5d7cda,_0x9a0306))['catch'](handleError(_0x5d7cda,null));};exports[_0x6dc0('0x4b')]=function(_0x431594,_0xaa3eee){var _0x59242c={'raw':![],'where':{'id':_0x431594[_0x6dc0('0x4c')]['id']}},_0x1a3634={};_0x1a3634[_0x6dc0('0x35')]=_[_0x6dc0('0x36')](db['ZohoConfiguration'][_0x6dc0('0x4d')]);_0x1a3634[_0x6dc0('0x37')]=_['keys'](_0x431594['query']);_0x1a3634['filters']=_[_0x6dc0('0x39')](_0x1a3634[_0x6dc0('0x35')],_0x1a3634[_0x6dc0('0x37')]);_0x59242c[_0x6dc0('0x3b')]=_['intersection'](_0x1a3634[_0x6dc0('0x35')],qs[_0x6dc0('0x3a')](_0x431594['query'][_0x6dc0('0x3a')]));_0x59242c[_0x6dc0('0x3b')]=_0x59242c[_0x6dc0('0x3b')][_0x6dc0('0x3c')]?_0x59242c['attributes']:_0x1a3634[_0x6dc0('0x35')];if(_0x431594[_0x6dc0('0x37')][_0x6dc0('0x47')]){_0x59242c[_0x6dc0('0x48')]=[{'all':!![]}];}_0x59242c=_[_0x6dc0('0x41')]({},_0x59242c,_0x431594[_0x6dc0('0x45')]);return db[_0x6dc0('0x34')][_0x6dc0('0x4e')](_0x59242c)[_0x6dc0('0x2f')](handleEntityNotFound(_0xaa3eee,null))['then'](respondWithResult(_0xaa3eee,null))[_0x6dc0('0x22')](handleError(_0xaa3eee,null));};exports[_0x6dc0('0x4f')]=function(_0x3b36ed,_0x411c23){return db[_0x6dc0('0x34')]['create'](_0x3b36ed['body'],{})[_0x6dc0('0x2f')](respondWithResult(_0x411c23,0xc9))[_0x6dc0('0x22')](handleError(_0x411c23,null));};exports['update']=function(_0x27e9c4,_0x1db5b8){if(_0x27e9c4[_0x6dc0('0x50')]['id']){delete _0x27e9c4[_0x6dc0('0x50')]['id'];}return db[_0x6dc0('0x34')][_0x6dc0('0x4e')]({'where':{'id':_0x27e9c4['params']['id']}})['then'](handleEntityNotFound(_0x1db5b8,null))[_0x6dc0('0x2f')](saveUpdates(_0x27e9c4[_0x6dc0('0x50')],null))[_0x6dc0('0x2f')](respondWithResult(_0x1db5b8,null))['catch'](handleError(_0x1db5b8,null));};exports['destroy']=function(_0x593560,_0x4459ce){return db[_0x6dc0('0x34')][_0x6dc0('0x4e')]({'where':{'id':_0x593560[_0x6dc0('0x4c')]['id']}})[_0x6dc0('0x2f')](handleEntityNotFound(_0x4459ce,null))[_0x6dc0('0x2f')](removeEntity(_0x4459ce,null))['catch'](handleError(_0x4459ce,null));};exports['getFields']=function(_0x1beb84,_0x2f5db5,_0x23f2e8){var _0x3d0bb7={};var _0x5e6c6c={};var _0x4fa7d2;var _0x4b908c;return db['ZohoConfiguration'][_0x6dc0('0x51')]({'where':{'id':_0x1beb84[_0x6dc0('0x4c')]['id']}})[_0x6dc0('0x2f')](handleEntityNotFound(_0x2f5db5,null))[_0x6dc0('0x2f')](function(_0x32fa5d){if(_0x32fa5d){_0x4fa7d2=_0x32fa5d;_0x5e6c6c[_0x6dc0('0x35')]=_[_0x6dc0('0x36')](db[_0x6dc0('0x52')][_0x6dc0('0x4d')]);_0x5e6c6c[_0x6dc0('0x37')]=_['keys'](_0x1beb84['query']);_0x5e6c6c['filters']=_[_0x6dc0('0x39')](_0x5e6c6c[_0x6dc0('0x35')],_0x5e6c6c[_0x6dc0('0x37')]);_0x3d0bb7['attributes']=_['intersection'](_0x5e6c6c[_0x6dc0('0x35')],qs[_0x6dc0('0x3a')](_0x1beb84[_0x6dc0('0x37')][_0x6dc0('0x3a')]));_0x3d0bb7[_0x6dc0('0x3b')]=_0x3d0bb7[_0x6dc0('0x3b')]['length']?_0x3d0bb7[_0x6dc0('0x3b')]:_0x5e6c6c[_0x6dc0('0x35')];_0x3d0bb7[_0x6dc0('0x53')]=qs[_0x6dc0('0x3f')](_0x1beb84[_0x6dc0('0x37')][_0x6dc0('0x3f')]);_0x3d0bb7[_0x6dc0('0x40')]=qs['filters'](_[_0x6dc0('0x54')](_0x1beb84[_0x6dc0('0x37')],_0x5e6c6c[_0x6dc0('0x38')]));if(_0x1beb84['query']['filter']){_0x3d0bb7[_0x6dc0('0x40')]=_[_0x6dc0('0x41')](_0x3d0bb7[_0x6dc0('0x40')],{'$or':_[_0x6dc0('0x55')](_0x3d0bb7[_0x6dc0('0x3b')],function(_0x42c0a3){var _0x258c56={};_0x258c56[_0x42c0a3]={'$like':'%'+_0x1beb84['query'][_0x6dc0('0x44')]+'%'};return _0x258c56;})});}_0x3d0bb7=_[_0x6dc0('0x41')]({},_0x3d0bb7,_0x1beb84[_0x6dc0('0x45')]);return _0x4fa7d2['getFields'](_0x3d0bb7);}})[_0x6dc0('0x2f')](function(_0x50522c){if(_0x50522c){_0x4b908c=_0x50522c['length'];if(!_0x1beb84['query']['hasOwnProperty'](_0x6dc0('0x3e'))){_0x3d0bb7['limit']=qs[_0x6dc0('0x28')](_0x1beb84[_0x6dc0('0x37')][_0x6dc0('0x28')]);_0x3d0bb7['offset']=qs['offset'](_0x1beb84[_0x6dc0('0x37')]['offset']);}return _0x4fa7d2['getFields'](_0x3d0bb7);}})[_0x6dc0('0x2f')](function(_0x366c9f){if(_0x366c9f){return _0x366c9f?{'count':_0x4b908c,'rows':_0x366c9f}:null;}})[_0x6dc0('0x2f')](respondWithResult(_0x2f5db5,null))[_0x6dc0('0x22')](handleError(_0x2f5db5,null));};exports[_0x6dc0('0x56')]=function(_0x14067f,_0x5d8816,_0x331e78){var _0x5838df={};var _0x4b2b55={};var _0x5eaba9;var _0x23c8bf;return db[_0x6dc0('0x34')][_0x6dc0('0x51')]({'where':{'id':_0x14067f[_0x6dc0('0x4c')]['id']}})[_0x6dc0('0x2f')](handleEntityNotFound(_0x5d8816,null))['then'](function(_0x412de2){if(_0x412de2){_0x5eaba9=_0x412de2;_0x4b2b55[_0x6dc0('0x35')]=_[_0x6dc0('0x36')](db[_0x6dc0('0x52')][_0x6dc0('0x4d')]);_0x4b2b55['query']=_[_0x6dc0('0x36')](_0x14067f[_0x6dc0('0x37')]);_0x4b2b55[_0x6dc0('0x38')]=_['intersection'](_0x4b2b55[_0x6dc0('0x35')],_0x4b2b55[_0x6dc0('0x37')]);_0x5838df[_0x6dc0('0x3b')]=_[_0x6dc0('0x39')](_0x4b2b55[_0x6dc0('0x35')],qs['fields'](_0x14067f[_0x6dc0('0x37')][_0x6dc0('0x3a')]));_0x5838df[_0x6dc0('0x3b')]=_0x5838df[_0x6dc0('0x3b')]['length']?_0x5838df[_0x6dc0('0x3b')]:_0x4b2b55['model'];_0x5838df[_0x6dc0('0x53')]=qs['sort'](_0x14067f[_0x6dc0('0x37')][_0x6dc0('0x3f')]);_0x5838df[_0x6dc0('0x40')]=qs['filters'](_[_0x6dc0('0x54')](_0x14067f['query'],_0x4b2b55[_0x6dc0('0x38')]));if(_0x14067f['query'][_0x6dc0('0x44')]){_0x5838df[_0x6dc0('0x40')]=_[_0x6dc0('0x41')](_0x5838df[_0x6dc0('0x40')],{'$or':_[_0x6dc0('0x55')](_0x5838df['attributes'],function(_0x5e7aac){var _0x4ec74f={};_0x4ec74f[_0x5e7aac]={'$like':'%'+_0x14067f['query'][_0x6dc0('0x44')]+'%'};return _0x4ec74f;})});}_0x5838df=_[_0x6dc0('0x41')]({},_0x5838df,_0x14067f[_0x6dc0('0x45')]);return _0x5eaba9[_0x6dc0('0x56')](_0x5838df);}})[_0x6dc0('0x2f')](function(_0x156eff){if(_0x156eff){_0x23c8bf=_0x156eff[_0x6dc0('0x3c')];if(!_0x14067f[_0x6dc0('0x37')]['hasOwnProperty'](_0x6dc0('0x3e'))){_0x5838df[_0x6dc0('0x28')]=qs[_0x6dc0('0x28')](_0x14067f[_0x6dc0('0x37')][_0x6dc0('0x28')]);_0x5838df[_0x6dc0('0x27')]=qs['offset'](_0x14067f[_0x6dc0('0x37')][_0x6dc0('0x27')]);}return _0x5eaba9[_0x6dc0('0x56')](_0x5838df);}})[_0x6dc0('0x2f')](function(_0x586917){if(_0x586917){return _0x586917?{'count':_0x23c8bf,'rows':_0x586917}:null;}})[_0x6dc0('0x2f')](respondWithResult(_0x5d8816,null))[_0x6dc0('0x22')](handleError(_0x5d8816,null));};exports['getDescriptions']=function(_0x3c0786,_0x20b0b8,_0x435713){var _0x510e0a={};var _0x5e4d29={};var _0x5aefd5;var _0x24f391;return db[_0x6dc0('0x34')][_0x6dc0('0x51')]({'where':{'id':_0x3c0786[_0x6dc0('0x4c')]['id']}})[_0x6dc0('0x2f')](handleEntityNotFound(_0x20b0b8,null))[_0x6dc0('0x2f')](function(_0x44a07d){if(_0x44a07d){_0x5aefd5=_0x44a07d;_0x5e4d29[_0x6dc0('0x35')]=_[_0x6dc0('0x36')](db['ZohoField'][_0x6dc0('0x4d')]);_0x5e4d29[_0x6dc0('0x37')]=_[_0x6dc0('0x36')](_0x3c0786[_0x6dc0('0x37')]);_0x5e4d29[_0x6dc0('0x38')]=_[_0x6dc0('0x39')](_0x5e4d29['model'],_0x5e4d29['query']);_0x510e0a[_0x6dc0('0x3b')]=_[_0x6dc0('0x39')](_0x5e4d29[_0x6dc0('0x35')],qs[_0x6dc0('0x3a')](_0x3c0786[_0x6dc0('0x37')][_0x6dc0('0x3a')]));_0x510e0a[_0x6dc0('0x3b')]=_0x510e0a[_0x6dc0('0x3b')][_0x6dc0('0x3c')]?_0x510e0a['attributes']:_0x5e4d29[_0x6dc0('0x35')];_0x510e0a[_0x6dc0('0x53')]=qs[_0x6dc0('0x3f')](_0x3c0786['query'][_0x6dc0('0x3f')]);_0x510e0a[_0x6dc0('0x40')]=qs[_0x6dc0('0x38')](_[_0x6dc0('0x54')](_0x3c0786[_0x6dc0('0x37')],_0x5e4d29[_0x6dc0('0x38')]));if(_0x3c0786[_0x6dc0('0x37')][_0x6dc0('0x44')]){_0x510e0a['where']=_[_0x6dc0('0x41')](_0x510e0a[_0x6dc0('0x40')],{'$or':_[_0x6dc0('0x55')](_0x510e0a[_0x6dc0('0x3b')],function(_0x2687cf){var _0x27cd83={};_0x27cd83[_0x2687cf]={'$like':'%'+_0x3c0786[_0x6dc0('0x37')][_0x6dc0('0x44')]+'%'};return _0x27cd83;})});}_0x510e0a=_['merge']({},_0x510e0a,_0x3c0786[_0x6dc0('0x45')]);return _0x5aefd5[_0x6dc0('0x57')](_0x510e0a);}})['then'](function(_0x1bf2c3){if(_0x1bf2c3){_0x24f391=_0x1bf2c3[_0x6dc0('0x3c')];if(!_0x3c0786[_0x6dc0('0x37')][_0x6dc0('0x3d')](_0x6dc0('0x3e'))){_0x510e0a[_0x6dc0('0x28')]=qs[_0x6dc0('0x28')](_0x3c0786[_0x6dc0('0x37')]['limit']);_0x510e0a[_0x6dc0('0x27')]=qs[_0x6dc0('0x27')](_0x3c0786['query']['offset']);}return _0x5aefd5['getDescriptions'](_0x510e0a);}})[_0x6dc0('0x2f')](function(_0x3024fc){if(_0x3024fc){return _0x3024fc?{'count':_0x24f391,'rows':_0x3024fc}:null;}})[_0x6dc0('0x2f')](respondWithResult(_0x20b0b8,null))[_0x6dc0('0x22')](handleError(_0x20b0b8,null));};
\ No newline at end of file
+var _0x2b10=['save','update','destroy','stack','name','send','index','ZohoConfiguration','rawAttributes','model','keys','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','field','options','includeAll','include','findAll','rows','show','intersection','find','create','body','params','getFields','findOne','ZohoField','getSubjects','getDescriptions','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','ZohoConfiguration,\x20%s,\x20%s','error','message','result','catch','status','end','count','offset','limit','set','json','apply','reject'];(function(_0x59867f,_0x2f4f24){var _0x24f802=function(_0x2c3c10){while(--_0x2c3c10){_0x59867f['push'](_0x59867f['shift']());}};_0x24f802(++_0x2f4f24);}(_0x2b10,0x1f3));var _0x02b1=function(_0x581095,_0x72b988){_0x581095=_0x581095-0x0;var _0x972289=_0x2b10[_0x581095];return _0x972289;};'use strict';var pdf=require(_0x02b1('0x0'));var emlformat=require(_0x02b1('0x1'));var rimraf=require(_0x02b1('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x02b1('0x3'));var rp=require(_0x02b1('0x4'));var moment=require(_0x02b1('0x5'));var BPromise=require(_0x02b1('0x6'));var Mustache=require(_0x02b1('0x7'));var util=require(_0x02b1('0x8'));var path=require(_0x02b1('0x9'));var sox=require(_0x02b1('0xa'));var csv=require(_0x02b1('0xb'));var ejs=require(_0x02b1('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0x02b1('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x02b1('0xb'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x02b1('0xe'));var authService=require(_0x02b1('0xf'));var qs=require(_0x02b1('0x10'));var hardwareService=require(_0x02b1('0x11'));var logger=require('../../config/logger')('api');var utils=require(_0x02b1('0x12'));var config=require(_0x02b1('0x13'));var db=require(_0x02b1('0x14'))['db'];var jayson=require(_0x02b1('0x15'));var client=jayson['client'][_0x02b1('0x16')]({'port':0x232a});function checkPasswordPattern(_0x137209,_0x1f8a78,_0x438b7f){if(_0x438b7f){var _0x47fc2c=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x47fc2c[_0x02b1('0x17')](_0x1f8a78)){return _0x137209;}else{throw new Error(_0x02b1('0x18'));}}else{return _0x137209;}}function respondWithRpcPromise(_0x39d8b2,_0x34ca2e,_0x386c57,_0x533ad0){return new BPromise(function(_0x4cabf0,_0x4984a9){var _0x35a846=_0x533ad0||client;return _0x35a846[_0x02b1('0x19')](_0x39d8b2,_0x386c57)[_0x02b1('0x1a')](function(_0x1eed4f){logger[_0x02b1('0x1b')]('ZohoConfiguration,\x20%s,\x20%s',_0x34ca2e,_0x02b1('0x1c'));logger[_0x02b1('0x1d')](_0x02b1('0x1e'),_0x34ca2e,_0x02b1('0x1c'),JSON[_0x02b1('0x1f')](_0x1eed4f));if(_0x1eed4f['error']){if(_0x1eed4f['error'][_0x02b1('0x20')]===0x1f4){logger['error'](_0x02b1('0x21'),_0x34ca2e,_0x1eed4f[_0x02b1('0x22')]['message']);return _0x4984a9(_0x1eed4f[_0x02b1('0x22')][_0x02b1('0x23')]);}logger[_0x02b1('0x22')](_0x02b1('0x21'),_0x34ca2e,_0x1eed4f[_0x02b1('0x22')]['message']);return _0x4cabf0(_0x1eed4f[_0x02b1('0x22')][_0x02b1('0x23')]);}else{logger[_0x02b1('0x1b')]('ZohoConfiguration,\x20%s,\x20%s',_0x34ca2e,'request\x20sent');_0x4cabf0(_0x1eed4f[_0x02b1('0x24')]['message']);}})[_0x02b1('0x25')](function(_0xb1e27e){logger[_0x02b1('0x22')](_0x02b1('0x21'),_0x34ca2e,_0xb1e27e);_0x4984a9(_0xb1e27e);});});}function respondWithStatusCode(_0x23e538,_0x104702){_0x104702=_0x104702||0xcc;return function(_0x49007a){if(_0x49007a){return _0x23e538['sendStatus'](_0x104702);}return _0x23e538[_0x02b1('0x26')](_0x104702)[_0x02b1('0x27')]();};}function respondWithResult(_0xf34404,_0x10ba3){_0x10ba3=_0x10ba3||0xc8;return function(_0x2067f0){if(_0x2067f0){return _0xf34404[_0x02b1('0x26')](_0x10ba3)['json'](_0x2067f0);}};}function respondWithFilteredResult(_0x4753c8,_0x4f546b){return function(_0x2ed23b){if(_0x2ed23b){var _0x5c3268=_0x2ed23b[_0x02b1('0x28')],_0xea863=_0x4f546b[_0x02b1('0x29')],_0x3fc31a=_0x4f546b[_0x02b1('0x29')]+_0x4f546b[_0x02b1('0x2a')],_0x1f09c7;if(_0x3fc31a>=_0x5c3268){_0x3fc31a=_0x5c3268;_0x1f09c7=0xc8;}else{_0x1f09c7=0xce;}_0x4753c8[_0x02b1('0x26')](_0x1f09c7);return _0x4753c8[_0x02b1('0x2b')]('Content-Range',_0xea863+'-'+_0x3fc31a+'/'+_0x5c3268)[_0x02b1('0x2c')](_0x2ed23b);}return null;};}function patchUpdates(_0x252fa6){return function(_0x4a2595){try{jsonpatch[_0x02b1('0x2d')](_0x4a2595,_0x252fa6,!![]);}catch(_0x238c9b){return BPromise[_0x02b1('0x2e')](_0x238c9b);}return _0x4a2595[_0x02b1('0x2f')]();};}function saveUpdates(_0x446eb5,_0x4ddd12){return function(_0x4d6f97){if(_0x4d6f97){return _0x4d6f97[_0x02b1('0x30')](_0x446eb5)[_0x02b1('0x1a')](function(_0x24dc14){return _0x24dc14;});}return null;};}function removeEntity(_0x3b52a4,_0x1e0ccb){return function(_0x283ca8){if(_0x283ca8){return _0x283ca8[_0x02b1('0x31')]()[_0x02b1('0x1a')](function(){_0x3b52a4[_0x02b1('0x26')](0xcc)[_0x02b1('0x27')]();});}};}function handleEntityNotFound(_0x1c0970,_0x4895f3){return function(_0x2fc8bf){if(!_0x2fc8bf){_0x1c0970['sendStatus'](0x194);}return _0x2fc8bf;};}function handleError(_0x279141,_0x1726f2){_0x1726f2=_0x1726f2||0x1f4;return function(_0x3b1d4a){logger[_0x02b1('0x22')](_0x3b1d4a[_0x02b1('0x32')]);if(_0x3b1d4a[_0x02b1('0x33')]){delete _0x3b1d4a[_0x02b1('0x33')];}_0x279141[_0x02b1('0x26')](_0x1726f2)[_0x02b1('0x34')](_0x3b1d4a);};}exports[_0x02b1('0x35')]=function(_0xde3339,_0x5a0a38){var _0x5c7509={},_0x25899a={},_0x102794={'count':0x0,'rows':[]};var _0x40fce6=db[_0x02b1('0x36')][_0x02b1('0x37')];_0x25899a[_0x02b1('0x38')]=_[_0x02b1('0x39')](_0x40fce6);_0x25899a[_0x02b1('0x3a')]=_[_0x02b1('0x39')](_0xde3339[_0x02b1('0x3a')]);_0x25899a[_0x02b1('0x3b')]=_['intersection'](_0x25899a[_0x02b1('0x38')],_0x25899a[_0x02b1('0x3a')]);_0x5c7509[_0x02b1('0x3c')]=_['intersection'](_0x25899a['model'],qs[_0x02b1('0x3d')](_0xde3339[_0x02b1('0x3a')]['fields']));_0x5c7509[_0x02b1('0x3c')]=_0x5c7509[_0x02b1('0x3c')][_0x02b1('0x3e')]?_0x5c7509['attributes']:_0x25899a[_0x02b1('0x38')];if(!_0xde3339[_0x02b1('0x3a')][_0x02b1('0x3f')](_0x02b1('0x40'))){_0x5c7509[_0x02b1('0x2a')]=qs['limit'](_0xde3339['query']['limit']);_0x5c7509['offset']=qs['offset'](_0xde3339[_0x02b1('0x3a')][_0x02b1('0x29')]);}_0x5c7509[_0x02b1('0x41')]=qs[_0x02b1('0x42')](_0xde3339['query'][_0x02b1('0x42')]);_0x5c7509[_0x02b1('0x43')]=qs[_0x02b1('0x3b')](_[_0x02b1('0x44')](_0xde3339[_0x02b1('0x3a')],_0x25899a[_0x02b1('0x3b')]));if(_0xde3339[_0x02b1('0x3a')][_0x02b1('0x45')]){_0x5c7509['where']=_[_0x02b1('0x46')](_0x5c7509['where'],{'$or':_[_0x02b1('0x47')](_0x40fce6,function(_0x5242d8){if(_0x5242d8[_0x02b1('0x48')][_0x02b1('0x49')]!=='VIRTUAL'){var _0x547f8c={};_0x547f8c[_0x5242d8[_0x02b1('0x4a')]]={'$like':'%'+_0xde3339[_0x02b1('0x3a')][_0x02b1('0x45')]+'%'};return _0x547f8c;}})});}_0x5c7509=_[_0x02b1('0x46')]({},_0x5c7509,_0xde3339[_0x02b1('0x4b')]);var _0x68f4eb={'where':_0x5c7509[_0x02b1('0x43')]};return db[_0x02b1('0x36')][_0x02b1('0x28')](_0x68f4eb)[_0x02b1('0x1a')](function(_0x5720b2){_0x102794[_0x02b1('0x28')]=_0x5720b2;if(_0xde3339['query'][_0x02b1('0x4c')]){_0x5c7509[_0x02b1('0x4d')]=[{'all':!![]}];}return db[_0x02b1('0x36')][_0x02b1('0x4e')](_0x5c7509);})[_0x02b1('0x1a')](function(_0x4cf34f){_0x102794[_0x02b1('0x4f')]=_0x4cf34f;return _0x102794;})[_0x02b1('0x1a')](respondWithFilteredResult(_0x5a0a38,_0x5c7509))[_0x02b1('0x25')](handleError(_0x5a0a38,null));};exports[_0x02b1('0x50')]=function(_0x3e221d,_0xd938a4){var _0x62514a={'raw':![],'where':{'id':_0x3e221d['params']['id']}},_0x86bbc7={};_0x86bbc7[_0x02b1('0x38')]=_[_0x02b1('0x39')](db[_0x02b1('0x36')][_0x02b1('0x37')]);_0x86bbc7[_0x02b1('0x3a')]=_['keys'](_0x3e221d[_0x02b1('0x3a')]);_0x86bbc7['filters']=_[_0x02b1('0x51')](_0x86bbc7[_0x02b1('0x38')],_0x86bbc7[_0x02b1('0x3a')]);_0x62514a[_0x02b1('0x3c')]=_[_0x02b1('0x51')](_0x86bbc7[_0x02b1('0x38')],qs['fields'](_0x3e221d[_0x02b1('0x3a')][_0x02b1('0x3d')]));_0x62514a[_0x02b1('0x3c')]=_0x62514a[_0x02b1('0x3c')][_0x02b1('0x3e')]?_0x62514a[_0x02b1('0x3c')]:_0x86bbc7[_0x02b1('0x38')];if(_0x3e221d[_0x02b1('0x3a')]['includeAll']){_0x62514a[_0x02b1('0x4d')]=[{'all':!![]}];}_0x62514a=_['merge']({},_0x62514a,_0x3e221d['options']);return db[_0x02b1('0x36')][_0x02b1('0x52')](_0x62514a)[_0x02b1('0x1a')](handleEntityNotFound(_0xd938a4,null))[_0x02b1('0x1a')](respondWithResult(_0xd938a4,null))[_0x02b1('0x25')](handleError(_0xd938a4,null));};exports[_0x02b1('0x53')]=function(_0x43f1bc,_0xe42497){return db[_0x02b1('0x36')][_0x02b1('0x53')](_0x43f1bc['body'],{})['then'](respondWithResult(_0xe42497,0xc9))[_0x02b1('0x25')](handleError(_0xe42497,null));};exports[_0x02b1('0x30')]=function(_0x15c356,_0x205e40){if(_0x15c356[_0x02b1('0x54')]['id']){delete _0x15c356[_0x02b1('0x54')]['id'];}return db[_0x02b1('0x36')][_0x02b1('0x52')]({'where':{'id':_0x15c356['params']['id']}})[_0x02b1('0x1a')](handleEntityNotFound(_0x205e40,null))['then'](saveUpdates(_0x15c356['body'],null))['then'](respondWithResult(_0x205e40,null))[_0x02b1('0x25')](handleError(_0x205e40,null));};exports[_0x02b1('0x31')]=function(_0x5006a1,_0x45313a){return db[_0x02b1('0x36')][_0x02b1('0x52')]({'where':{'id':_0x5006a1[_0x02b1('0x55')]['id']}})[_0x02b1('0x1a')](handleEntityNotFound(_0x45313a,null))['then'](removeEntity(_0x45313a,null))[_0x02b1('0x25')](handleError(_0x45313a,null));};exports[_0x02b1('0x56')]=function(_0x57b5c9,_0x3fb76a,_0x3a3b19){var _0x5cde33={};var _0x299aaa={};var _0xd9b22;var _0x8d9184;return db['ZohoConfiguration'][_0x02b1('0x57')]({'where':{'id':_0x57b5c9['params']['id']}})['then'](handleEntityNotFound(_0x3fb76a,null))[_0x02b1('0x1a')](function(_0x2ad9b3){if(_0x2ad9b3){_0xd9b22=_0x2ad9b3;_0x299aaa[_0x02b1('0x38')]=_[_0x02b1('0x39')](db[_0x02b1('0x58')]['rawAttributes']);_0x299aaa[_0x02b1('0x3a')]=_[_0x02b1('0x39')](_0x57b5c9[_0x02b1('0x3a')]);_0x299aaa[_0x02b1('0x3b')]=_['intersection'](_0x299aaa[_0x02b1('0x38')],_0x299aaa[_0x02b1('0x3a')]);_0x5cde33[_0x02b1('0x3c')]=_['intersection'](_0x299aaa[_0x02b1('0x38')],qs[_0x02b1('0x3d')](_0x57b5c9[_0x02b1('0x3a')][_0x02b1('0x3d')]));_0x5cde33[_0x02b1('0x3c')]=_0x5cde33[_0x02b1('0x3c')][_0x02b1('0x3e')]?_0x5cde33['attributes']:_0x299aaa[_0x02b1('0x38')];_0x5cde33[_0x02b1('0x41')]=qs[_0x02b1('0x42')](_0x57b5c9[_0x02b1('0x3a')][_0x02b1('0x42')]);_0x5cde33[_0x02b1('0x43')]=qs[_0x02b1('0x3b')](_[_0x02b1('0x44')](_0x57b5c9[_0x02b1('0x3a')],_0x299aaa['filters']));if(_0x57b5c9['query']['filter']){_0x5cde33[_0x02b1('0x43')]=_[_0x02b1('0x46')](_0x5cde33[_0x02b1('0x43')],{'$or':_[_0x02b1('0x47')](_0x5cde33[_0x02b1('0x3c')],function(_0x54bb63){var _0x45da05={};_0x45da05[_0x54bb63]={'$like':'%'+_0x57b5c9['query'][_0x02b1('0x45')]+'%'};return _0x45da05;})});}_0x5cde33=_[_0x02b1('0x46')]({},_0x5cde33,_0x57b5c9[_0x02b1('0x4b')]);return _0xd9b22[_0x02b1('0x56')](_0x5cde33);}})[_0x02b1('0x1a')](function(_0x1efd62){if(_0x1efd62){_0x8d9184=_0x1efd62[_0x02b1('0x3e')];if(!_0x57b5c9['query'][_0x02b1('0x3f')]('nolimit')){_0x5cde33[_0x02b1('0x2a')]=qs[_0x02b1('0x2a')](_0x57b5c9[_0x02b1('0x3a')][_0x02b1('0x2a')]);_0x5cde33['offset']=qs[_0x02b1('0x29')](_0x57b5c9[_0x02b1('0x3a')][_0x02b1('0x29')]);}return _0xd9b22[_0x02b1('0x56')](_0x5cde33);}})['then'](function(_0xb7eacf){if(_0xb7eacf){return _0xb7eacf?{'count':_0x8d9184,'rows':_0xb7eacf}:null;}})[_0x02b1('0x1a')](respondWithResult(_0x3fb76a,null))['catch'](handleError(_0x3fb76a,null));};exports[_0x02b1('0x59')]=function(_0x2af30d,_0x54c0d6,_0x1b4eb9){var _0x58235d={};var _0xaac56f={};var _0x1fe08e;var _0xc81e04;return db[_0x02b1('0x36')][_0x02b1('0x57')]({'where':{'id':_0x2af30d[_0x02b1('0x55')]['id']}})['then'](handleEntityNotFound(_0x54c0d6,null))[_0x02b1('0x1a')](function(_0x1d05d0){if(_0x1d05d0){_0x1fe08e=_0x1d05d0;_0xaac56f[_0x02b1('0x38')]=_[_0x02b1('0x39')](db['ZohoField'][_0x02b1('0x37')]);_0xaac56f[_0x02b1('0x3a')]=_[_0x02b1('0x39')](_0x2af30d['query']);_0xaac56f[_0x02b1('0x3b')]=_[_0x02b1('0x51')](_0xaac56f[_0x02b1('0x38')],_0xaac56f[_0x02b1('0x3a')]);_0x58235d[_0x02b1('0x3c')]=_[_0x02b1('0x51')](_0xaac56f['model'],qs[_0x02b1('0x3d')](_0x2af30d[_0x02b1('0x3a')][_0x02b1('0x3d')]));_0x58235d['attributes']=_0x58235d[_0x02b1('0x3c')]['length']?_0x58235d[_0x02b1('0x3c')]:_0xaac56f[_0x02b1('0x38')];_0x58235d[_0x02b1('0x41')]=qs[_0x02b1('0x42')](_0x2af30d[_0x02b1('0x3a')][_0x02b1('0x42')]);_0x58235d[_0x02b1('0x43')]=qs[_0x02b1('0x3b')](_[_0x02b1('0x44')](_0x2af30d[_0x02b1('0x3a')],_0xaac56f[_0x02b1('0x3b')]));if(_0x2af30d[_0x02b1('0x3a')][_0x02b1('0x45')]){_0x58235d[_0x02b1('0x43')]=_[_0x02b1('0x46')](_0x58235d[_0x02b1('0x43')],{'$or':_[_0x02b1('0x47')](_0x58235d['attributes'],function(_0x325209){var _0x17390a={};_0x17390a[_0x325209]={'$like':'%'+_0x2af30d[_0x02b1('0x3a')][_0x02b1('0x45')]+'%'};return _0x17390a;})});}_0x58235d=_[_0x02b1('0x46')]({},_0x58235d,_0x2af30d[_0x02b1('0x4b')]);return _0x1fe08e[_0x02b1('0x59')](_0x58235d);}})[_0x02b1('0x1a')](function(_0x5d01c0){if(_0x5d01c0){_0xc81e04=_0x5d01c0[_0x02b1('0x3e')];if(!_0x2af30d[_0x02b1('0x3a')][_0x02b1('0x3f')](_0x02b1('0x40'))){_0x58235d[_0x02b1('0x2a')]=qs[_0x02b1('0x2a')](_0x2af30d[_0x02b1('0x3a')]['limit']);_0x58235d[_0x02b1('0x29')]=qs['offset'](_0x2af30d[_0x02b1('0x3a')][_0x02b1('0x29')]);}return _0x1fe08e[_0x02b1('0x59')](_0x58235d);}})[_0x02b1('0x1a')](function(_0x30f032){if(_0x30f032){return _0x30f032?{'count':_0xc81e04,'rows':_0x30f032}:null;}})['then'](respondWithResult(_0x54c0d6,null))['catch'](handleError(_0x54c0d6,null));};exports[_0x02b1('0x5a')]=function(_0x4bfdfc,_0x5ecabb,_0x120260){var _0x2d4a25={};var _0x42991a={};var _0x2d4f5e;var _0x90856b;return db[_0x02b1('0x36')][_0x02b1('0x57')]({'where':{'id':_0x4bfdfc[_0x02b1('0x55')]['id']}})['then'](handleEntityNotFound(_0x5ecabb,null))[_0x02b1('0x1a')](function(_0xe0e272){if(_0xe0e272){_0x2d4f5e=_0xe0e272;_0x42991a[_0x02b1('0x38')]=_['keys'](db[_0x02b1('0x58')][_0x02b1('0x37')]);_0x42991a[_0x02b1('0x3a')]=_['keys'](_0x4bfdfc['query']);_0x42991a['filters']=_[_0x02b1('0x51')](_0x42991a['model'],_0x42991a[_0x02b1('0x3a')]);_0x2d4a25['attributes']=_[_0x02b1('0x51')](_0x42991a[_0x02b1('0x38')],qs[_0x02b1('0x3d')](_0x4bfdfc['query']['fields']));_0x2d4a25[_0x02b1('0x3c')]=_0x2d4a25['attributes']['length']?_0x2d4a25[_0x02b1('0x3c')]:_0x42991a['model'];_0x2d4a25[_0x02b1('0x41')]=qs[_0x02b1('0x42')](_0x4bfdfc[_0x02b1('0x3a')][_0x02b1('0x42')]);_0x2d4a25[_0x02b1('0x43')]=qs[_0x02b1('0x3b')](_[_0x02b1('0x44')](_0x4bfdfc[_0x02b1('0x3a')],_0x42991a['filters']));if(_0x4bfdfc[_0x02b1('0x3a')][_0x02b1('0x45')]){_0x2d4a25[_0x02b1('0x43')]=_[_0x02b1('0x46')](_0x2d4a25['where'],{'$or':_['map'](_0x2d4a25[_0x02b1('0x3c')],function(_0x4dfe78){var _0x5bb130={};_0x5bb130[_0x4dfe78]={'$like':'%'+_0x4bfdfc[_0x02b1('0x3a')][_0x02b1('0x45')]+'%'};return _0x5bb130;})});}_0x2d4a25=_[_0x02b1('0x46')]({},_0x2d4a25,_0x4bfdfc[_0x02b1('0x4b')]);return _0x2d4f5e['getDescriptions'](_0x2d4a25);}})[_0x02b1('0x1a')](function(_0x3657f2){if(_0x3657f2){_0x90856b=_0x3657f2[_0x02b1('0x3e')];if(!_0x4bfdfc[_0x02b1('0x3a')]['hasOwnProperty'](_0x02b1('0x40'))){_0x2d4a25[_0x02b1('0x2a')]=qs['limit'](_0x4bfdfc[_0x02b1('0x3a')][_0x02b1('0x2a')]);_0x2d4a25[_0x02b1('0x29')]=qs['offset'](_0x4bfdfc['query']['offset']);}return _0x2d4f5e[_0x02b1('0x5a')](_0x2d4a25);}})['then'](function(_0x2d096a){if(_0x2d096a){return _0x2d096a?{'count':_0x90856b,'rows':_0x2d096a}:null;}})[_0x02b1('0x1a')](respondWithResult(_0x5ecabb,null))['catch'](handleError(_0x5ecabb,null));};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.model.js b/server/api/intZohoConfiguration/intZohoConfiguration.model.js
index 454c8e7..c7fbcbe 100644
--- a/server/api/intZohoConfiguration/intZohoConfiguration.model.js
+++ b/server/api/intZohoConfiguration/intZohoConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1bc6=['request-promise','rimraf','../../config/environment','./intZohoConfiguration.attributes','exports','define','ZohoConfiguration','int_zoho_configurations','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x3714aa,_0x943f24){var _0x56304c=function(_0x474fca){while(--_0x474fca){_0x3714aa['push'](_0x3714aa['shift']());}};_0x56304c(++_0x943f24);}(_0x1bc6,0x94));var _0x61bc=function(_0x3b3d9e,_0x3498e3){_0x3b3d9e=_0x3b3d9e-0x0;var _0x30894e=_0x1bc6[_0x3b3d9e];return _0x30894e;};'use strict';var _=require(_0x61bc('0x0'));var util=require(_0x61bc('0x1'));var logger=require(_0x61bc('0x2'))(_0x61bc('0x3'));var moment=require(_0x61bc('0x4'));var BPromise=require(_0x61bc('0x5'));var rp=require(_0x61bc('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x61bc('0x7'));var config=require(_0x61bc('0x8'));var attributes=require(_0x61bc('0x9'));module[_0x61bc('0xa')]=function(_0x362ebb,_0x1af9bc){return _0x362ebb[_0x61bc('0xb')](_0x61bc('0xc'),attributes,{'tableName':_0x61bc('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1339=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','ZohoConfiguration','int_zoho_configurations','../../config/logger','api'];(function(_0x1e291a,_0x13a9da){var _0x448d8a=function(_0x329ac6){while(--_0x329ac6){_0x1e291a['push'](_0x1e291a['shift']());}};_0x448d8a(++_0x13a9da);}(_0x1339,0x1ed));var _0x9133=function(_0x528656,_0x581f3b){_0x528656=_0x528656-0x0;var _0x4abcc1=_0x1339[_0x528656];return _0x4abcc1;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9133('0x0'))(_0x9133('0x1'));var moment=require(_0x9133('0x2'));var BPromise=require(_0x9133('0x3'));var rp=require(_0x9133('0x4'));var fs=require('fs');var path=require(_0x9133('0x5'));var rimraf=require(_0x9133('0x6'));var config=require(_0x9133('0x7'));var attributes=require('./intZohoConfiguration.attributes');module[_0x9133('0x8')]=function(_0x855473,_0x379915){return _0x855473['define'](_0x9133('0x9'),attributes,{'tableName':_0x9133('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js b/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js
index 10d6545..cccb9ca 100644
--- a/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js
+++ b/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xda5f=['catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ZohoConfiguration,\x20%s,\x20%s','ZohoConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result'];(function(_0x26b4ef,_0x4f3155){var _0x3e5222=function(_0x54486c){while(--_0x54486c){_0x26b4ef['push'](_0x26b4ef['shift']());}};_0x3e5222(++_0x4f3155);}(_0xda5f,0xa9));var _0xfda5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xda5f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xfda5('0x0'));var util=require(_0xfda5('0x1'));var moment=require('moment');var BPromise=require(_0xfda5('0x2'));var rs=require(_0xfda5('0x3'));var fs=require('fs');var Redis=require(_0xfda5('0x4'));var db=require(_0xfda5('0x5'))['db'];var utils=require(_0xfda5('0x6'));var logger=require(_0xfda5('0x7'))(_0xfda5('0x8'));var config=require(_0xfda5('0x9'));var jayson=require(_0xfda5('0xa'));var client=jayson[_0xfda5('0xb')][_0xfda5('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x43645e,_0x5ccb1a,_0x412586){return new BPromise(function(_0x3ed2d6,_0x2d3cef){return client[_0xfda5('0xd')](_0x43645e,_0x412586)[_0xfda5('0xe')](function(_0x2e1ec6){logger[_0xfda5('0xf')](_0xfda5('0x10'),_0x5ccb1a,'request\x20sent');logger['debug'](_0xfda5('0x11'),_0x5ccb1a,_0xfda5('0x12'),JSON['stringify'](_0x2e1ec6));if(_0x2e1ec6[_0xfda5('0x13')]){if(_0x2e1ec6['error'][_0xfda5('0x14')]===0x1f4){logger[_0xfda5('0x13')](_0xfda5('0x10'),_0x5ccb1a,_0x2e1ec6['error'][_0xfda5('0x15')]);return _0x2d3cef(_0x2e1ec6['error'][_0xfda5('0x15')]);}logger[_0xfda5('0x13')]('ZohoConfiguration,\x20%s,\x20%s',_0x5ccb1a,_0x2e1ec6[_0xfda5('0x13')][_0xfda5('0x15')]);return _0x3ed2d6(_0x2e1ec6['error'][_0xfda5('0x15')]);}else{logger[_0xfda5('0xf')]('ZohoConfiguration,\x20%s,\x20%s',_0x5ccb1a,_0xfda5('0x12'));_0x3ed2d6(_0x2e1ec6[_0xfda5('0x16')][_0xfda5('0x15')]);}})[_0xfda5('0x17')](function(_0x486186){logger[_0xfda5('0x13')]('ZohoConfiguration,\x20%s,\x20%s',_0x5ccb1a,_0x486186);_0x2d3cef(_0x486186);});});}
\ No newline at end of file
+var _0xdb15=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ZohoConfiguration,\x20%s,\x20%s','info','result','lodash','util','bluebird','ioredis'];(function(_0x58516c,_0x4272c0){var _0x39263b=function(_0x18a9b8){while(--_0x18a9b8){_0x58516c['push'](_0x58516c['shift']());}};_0x39263b(++_0x4272c0);}(_0xdb15,0x1b4));var _0x5db1=function(_0x418e63,_0x40d04f){_0x418e63=_0x418e63-0x0;var _0x4cded6=_0xdb15[_0x418e63];return _0x4cded6;};'use strict';var _=require(_0x5db1('0x0'));var util=require(_0x5db1('0x1'));var moment=require('moment');var BPromise=require(_0x5db1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5db1('0x3'));var db=require(_0x5db1('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x5db1('0x5'))(_0x5db1('0x6'));var config=require(_0x5db1('0x7'));var jayson=require(_0x5db1('0x8'));var client=jayson[_0x5db1('0x9')][_0x5db1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x28e033,_0x1e3320,_0x51c453){return new BPromise(function(_0x2cf239,_0x244295){return client['request'](_0x28e033,_0x51c453)[_0x5db1('0xb')](function(_0x2f3356){logger['info']('ZohoConfiguration,\x20%s,\x20%s',_0x1e3320,_0x5db1('0xc'));logger[_0x5db1('0xd')](_0x5db1('0xe'),_0x1e3320,_0x5db1('0xc'),JSON[_0x5db1('0xf')](_0x2f3356));if(_0x2f3356['error']){if(_0x2f3356[_0x5db1('0x10')][_0x5db1('0x11')]===0x1f4){logger[_0x5db1('0x10')]('ZohoConfiguration,\x20%s,\x20%s',_0x1e3320,_0x2f3356[_0x5db1('0x10')][_0x5db1('0x12')]);return _0x244295(_0x2f3356[_0x5db1('0x10')][_0x5db1('0x12')]);}logger['error'](_0x5db1('0x13'),_0x1e3320,_0x2f3356[_0x5db1('0x10')]['message']);return _0x2cf239(_0x2f3356['error'][_0x5db1('0x12')]);}else{logger[_0x5db1('0x14')](_0x5db1('0x13'),_0x1e3320,_0x5db1('0xc'));_0x2cf239(_0x2f3356[_0x5db1('0x15')][_0x5db1('0x12')]);}})['catch'](function(_0x2e3d29){logger['error'](_0x5db1('0x13'),_0x1e3320,_0x2e3d29);_0x244295(_0x2e3d29);});});}
\ No newline at end of file
diff --git a/server/api/intZohoField/index.js b/server/api/intZohoField/index.js
index 5c99af8..e690bb4 100644
--- a/server/api/intZohoField/index.js
+++ b/server/api/intZohoField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x57d7=['express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','show','post','create','put','/:id','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x57d7,0xf3));var _0x757d=function(_0x235482,_0x14b833){_0x235482=_0x235482-0x0;var _0x5f5bea=_0x57d7[_0x235482];return _0x5f5bea;};'use strict';var multer=require(_0x757d('0x0'));var util=require(_0x757d('0x1'));var path=require(_0x757d('0x2'));var timeout=require(_0x757d('0x3'));var express=require(_0x757d('0x4'));var router=express[_0x757d('0x5')]();var auth=require(_0x757d('0x6'));var interaction=require(_0x757d('0x7'));var config=require('../../config/environment');var controller=require('./intZohoField.controller');router[_0x757d('0x8')]('/',auth[_0x757d('0x9')](),controller[_0x757d('0xa')]);router[_0x757d('0x8')]('/:id',auth[_0x757d('0x9')](),controller[_0x757d('0xb')]);router[_0x757d('0xc')]('/',auth['isAuthenticated'](),controller[_0x757d('0xd')]);router[_0x757d('0xe')](_0x757d('0xf'),auth[_0x757d('0x9')](),controller['update']);router[_0x757d('0x10')](_0x757d('0xf'),auth[_0x757d('0x9')](),controller[_0x757d('0x11')]);module[_0x757d('0x12')]=router;
\ No newline at end of file
+var _0x02f3=['index','get','/:id','show','post','create','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','./intZohoField.controller','isAuthenticated'];(function(_0x4c4d81,_0x1bef2d){var _0xcd11a5=function(_0x185f46){while(--_0x185f46){_0x4c4d81['push'](_0x4c4d81['shift']());}};_0xcd11a5(++_0x1bef2d);}(_0x02f3,0x13a));var _0x302f=function(_0x1d47bf,_0x4472e1){_0x1d47bf=_0x1d47bf-0x0;var _0x5e150a=_0x02f3[_0x1d47bf];return _0x5e150a;};'use strict';var multer=require(_0x302f('0x0'));var util=require(_0x302f('0x1'));var path=require(_0x302f('0x2'));var timeout=require(_0x302f('0x3'));var express=require(_0x302f('0x4'));var router=express[_0x302f('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x302f('0x6'));var config=require('../../config/environment');var controller=require(_0x302f('0x7'));router['get']('/',auth[_0x302f('0x8')](),controller[_0x302f('0x9')]);router[_0x302f('0xa')](_0x302f('0xb'),auth['isAuthenticated'](),controller[_0x302f('0xc')]);router[_0x302f('0xd')]('/',auth[_0x302f('0x8')](),controller[_0x302f('0xe')]);router[_0x302f('0xf')](_0x302f('0xb'),auth[_0x302f('0x8')](),controller[_0x302f('0x10')]);router[_0x302f('0x11')]('/:id',auth[_0x302f('0x8')](),controller['destroy']);module[_0x302f('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.attributes.js b/server/api/intZohoField/intZohoField.attributes.js
index b830e14..6a9c633 100644
--- a/server/api/intZohoField/intZohoField.attributes.js
+++ b/server/api/intZohoField/intZohoField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['keyValue','string','STRING','variable','BOOLEAN','sequelize','exports','customVariable'];(function(_0x3eb4d7,_0xdf07ed){var _0x2513f6=function(_0x580f0f){while(--_0x580f0f){_0x3eb4d7['push'](_0x3eb4d7['shift']());}};_0x2513f6(++_0xdf07ed);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'type':{'type':Sequelize['ENUM']('string','variable',_0x0d8b('0x2'),_0x0d8b('0x3')),'defaultValue':_0x0d8b('0x4')},'content':{'type':Sequelize[_0x0d8b('0x5')]},'key':{'type':Sequelize[_0x0d8b('0x5')]},'keyType':{'type':Sequelize['ENUM']('string',_0x0d8b('0x6'),_0x0d8b('0x2'))},'keyContent':{'type':Sequelize[_0x0d8b('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x0d8b('0x5')]},'customField':{'type':Sequelize[_0x0d8b('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x13f6=['variable','customVariable','keyValue','STRING','ENUM','sequelize','exports'];(function(_0x2308d5,_0x41f651){var _0x284f6d=function(_0x5685fd){while(--_0x5685fd){_0x2308d5['push'](_0x2308d5['shift']());}};_0x284f6d(++_0x41f651);}(_0x13f6,0x124));var _0x613f=function(_0x308ca1,_0xf8eb57){_0x308ca1=_0x308ca1-0x0;var _0x1c589e=_0x13f6[_0x308ca1];return _0x1c589e;};'use strict';var Sequelize=require(_0x613f('0x0'));module[_0x613f('0x1')]={'type':{'type':Sequelize['ENUM']('string',_0x613f('0x2'),_0x613f('0x3'),_0x613f('0x4')),'defaultValue':'string'},'content':{'type':Sequelize[_0x613f('0x5')]},'key':{'type':Sequelize[_0x613f('0x5')]},'keyType':{'type':Sequelize[_0x613f('0x6')]('string',_0x613f('0x2'),_0x613f('0x3'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x613f('0x5')]}};
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.controller.js b/server/api/intZohoField/intZohoField.controller.js
index c605199..0bfe461 100644
--- a/server/api/intZohoField/intZohoField.controller.js
+++ b/server/api/intZohoField/intZohoField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaa88=['VIRTUAL','field','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','destroy','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','end','status','count','offset','set','apply','reject','save','update','then','error','name','send','index','ZohoField','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','merge','where','map','key'];(function(_0x3ecf65,_0x3bac13){var _0x1907df=function(_0x247dd9){while(--_0x247dd9){_0x3ecf65['push'](_0x3ecf65['shift']());}};_0x1907df(++_0x3bac13);}(_0xaa88,0x137));var _0x8aa8=function(_0x1a87b3,_0x45ba68){_0x1a87b3=_0x1a87b3-0x0;var _0x37e84d=_0xaa88[_0x1a87b3];return _0x37e84d;};'use strict';var pdf=require(_0x8aa8('0x0'));var emlformat=require(_0x8aa8('0x1'));var rimraf=require(_0x8aa8('0x2'));var zipdir=require(_0x8aa8('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8aa8('0x4'));var moment=require(_0x8aa8('0x5'));var BPromise=require(_0x8aa8('0x6'));var Mustache=require(_0x8aa8('0x7'));var util=require(_0x8aa8('0x8'));var path=require(_0x8aa8('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8aa8('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x8aa8('0xb'));var crypto=require(_0x8aa8('0xc'));var jsforce=require(_0x8aa8('0xd'));var deskjs=require(_0x8aa8('0xe'));var toCsv=require('to-csv');var querystring=require(_0x8aa8('0xf'));var Papa=require(_0x8aa8('0x10'));var Redis=require(_0x8aa8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x8aa8('0x12'));var hardwareService=require(_0x8aa8('0x13'));var logger=require(_0x8aa8('0x14'))(_0x8aa8('0x15'));var utils=require('../../config/utils');var config=require(_0x8aa8('0x16'));var db=require(_0x8aa8('0x17'))['db'];function respondWithStatusCode(_0x50787d,_0x370b25){_0x370b25=_0x370b25||0xcc;return function(_0xa691d6){if(_0xa691d6){return _0x50787d[_0x8aa8('0x18')](_0x370b25);}return _0x50787d['status'](_0x370b25)[_0x8aa8('0x19')]();};}function respondWithResult(_0x179e33,_0x2fa66f){_0x2fa66f=_0x2fa66f||0xc8;return function(_0x4b686e){if(_0x4b686e){return _0x179e33[_0x8aa8('0x1a')](_0x2fa66f)['json'](_0x4b686e);}};}function respondWithFilteredResult(_0x4f3a2e,_0x433e95){return function(_0x200662){if(_0x200662){var _0xae81a0=_0x200662[_0x8aa8('0x1b')],_0xa6c2af=_0x433e95[_0x8aa8('0x1c')],_0x42a6a4=_0x433e95[_0x8aa8('0x1c')]+_0x433e95['limit'],_0x3778f4;if(_0x42a6a4>=_0xae81a0){_0x42a6a4=_0xae81a0;_0x3778f4=0xc8;}else{_0x3778f4=0xce;}_0x4f3a2e['status'](_0x3778f4);return _0x4f3a2e[_0x8aa8('0x1d')]('Content-Range',_0xa6c2af+'-'+_0x42a6a4+'/'+_0xae81a0)['json'](_0x200662);}return null;};}function patchUpdates(_0xab7af5){return function(_0x5ac0d9){try{jsonpatch[_0x8aa8('0x1e')](_0x5ac0d9,_0xab7af5,!![]);}catch(_0x41092b){return BPromise[_0x8aa8('0x1f')](_0x41092b);}return _0x5ac0d9[_0x8aa8('0x20')]();};}function saveUpdates(_0x502547,_0xcc2c19){return function(_0x36c445){if(_0x36c445){return _0x36c445[_0x8aa8('0x21')](_0x502547)[_0x8aa8('0x22')](function(_0x4c754e){return _0x4c754e;});}return null;};}function removeEntity(_0x34f1b7,_0x5d9b62){return function(_0x26cf63){if(_0x26cf63){return _0x26cf63['destroy']()[_0x8aa8('0x22')](function(){_0x34f1b7['status'](0xcc)[_0x8aa8('0x19')]();});}};}function handleEntityNotFound(_0x557e4e,_0x65945b){return function(_0x40adb5){if(!_0x40adb5){_0x557e4e[_0x8aa8('0x18')](0x194);}return _0x40adb5;};}function handleError(_0x5e5d91,_0x24f428){_0x24f428=_0x24f428||0x1f4;return function(_0xe978ab){logger[_0x8aa8('0x23')](_0xe978ab['stack']);if(_0xe978ab['name']){delete _0xe978ab[_0x8aa8('0x24')];}_0x5e5d91[_0x8aa8('0x1a')](_0x24f428)[_0x8aa8('0x25')](_0xe978ab);};}exports[_0x8aa8('0x26')]=function(_0x24143e,_0x4a8212){var _0x2bc34a={},_0x49d561={},_0x2a0ff2={'count':0x0,'rows':[]};var _0xe7768=db[_0x8aa8('0x27')]['rawAttributes'];_0x49d561['model']=_[_0x8aa8('0x28')](_0xe7768);_0x49d561['query']=_[_0x8aa8('0x28')](_0x24143e[_0x8aa8('0x29')]);_0x49d561[_0x8aa8('0x2a')]=_[_0x8aa8('0x2b')](_0x49d561[_0x8aa8('0x2c')],_0x49d561['query']);_0x2bc34a[_0x8aa8('0x2d')]=_[_0x8aa8('0x2b')](_0x49d561['model'],qs[_0x8aa8('0x2e')](_0x24143e[_0x8aa8('0x29')][_0x8aa8('0x2e')]));_0x2bc34a['attributes']=_0x2bc34a[_0x8aa8('0x2d')][_0x8aa8('0x2f')]?_0x2bc34a[_0x8aa8('0x2d')]:_0x49d561[_0x8aa8('0x2c')];if(!_0x24143e[_0x8aa8('0x29')][_0x8aa8('0x30')](_0x8aa8('0x31'))){_0x2bc34a[_0x8aa8('0x32')]=qs[_0x8aa8('0x32')](_0x24143e[_0x8aa8('0x29')][_0x8aa8('0x32')]);_0x2bc34a['offset']=qs['offset'](_0x24143e[_0x8aa8('0x29')][_0x8aa8('0x1c')]);}_0x2bc34a[_0x8aa8('0x33')]=qs[_0x8aa8('0x34')](_0x24143e[_0x8aa8('0x29')][_0x8aa8('0x34')]);_0x2bc34a['where']=qs['filters'](_[_0x8aa8('0x35')](_0x24143e['query'],_0x49d561[_0x8aa8('0x2a')]));if(_0x24143e[_0x8aa8('0x29')][_0x8aa8('0x36')]){_0x2bc34a['where']=_[_0x8aa8('0x37')](_0x2bc34a[_0x8aa8('0x38')],{'$or':_[_0x8aa8('0x39')](_0xe7768,function(_0x5c28fa){if(_0x5c28fa['type'][_0x8aa8('0x3a')]!==_0x8aa8('0x3b')){var _0x52f87d={};_0x52f87d[_0x5c28fa[_0x8aa8('0x3c')]]={'$like':'%'+_0x24143e[_0x8aa8('0x29')]['filter']+'%'};return _0x52f87d;}})});}_0x2bc34a=_[_0x8aa8('0x37')]({},_0x2bc34a,_0x24143e['options']);var _0x530a66={'where':_0x2bc34a[_0x8aa8('0x38')]};return db['ZohoField'][_0x8aa8('0x1b')](_0x530a66)[_0x8aa8('0x22')](function(_0x926ff2){_0x2a0ff2[_0x8aa8('0x1b')]=_0x926ff2;if(_0x24143e['query'][_0x8aa8('0x3d')]){_0x2bc34a[_0x8aa8('0x3e')]=[{'all':!![]}];}return db['ZohoField'][_0x8aa8('0x3f')](_0x2bc34a);})[_0x8aa8('0x22')](function(_0x5ea57a){_0x2a0ff2[_0x8aa8('0x40')]=_0x5ea57a;return _0x2a0ff2;})[_0x8aa8('0x22')](respondWithFilteredResult(_0x4a8212,_0x2bc34a))[_0x8aa8('0x41')](handleError(_0x4a8212,null));};exports[_0x8aa8('0x42')]=function(_0x189d53,_0xea42cb){var _0x46711b={'raw':!![],'where':{'id':_0x189d53[_0x8aa8('0x43')]['id']}},_0x3fb265={};_0x3fb265[_0x8aa8('0x2c')]=_[_0x8aa8('0x28')](db[_0x8aa8('0x27')][_0x8aa8('0x44')]);_0x3fb265[_0x8aa8('0x29')]=_[_0x8aa8('0x28')](_0x189d53[_0x8aa8('0x29')]);_0x3fb265['filters']=_[_0x8aa8('0x2b')](_0x3fb265['model'],_0x3fb265['query']);_0x46711b['attributes']=_[_0x8aa8('0x2b')](_0x3fb265['model'],qs['fields'](_0x189d53[_0x8aa8('0x29')]['fields']));_0x46711b[_0x8aa8('0x2d')]=_0x46711b['attributes']['length']?_0x46711b[_0x8aa8('0x2d')]:_0x3fb265[_0x8aa8('0x2c')];if(_0x189d53[_0x8aa8('0x29')][_0x8aa8('0x3d')]){_0x46711b[_0x8aa8('0x3e')]=[{'all':!![]}];}_0x46711b=_[_0x8aa8('0x37')]({},_0x46711b,_0x189d53[_0x8aa8('0x45')]);return db['ZohoField'][_0x8aa8('0x46')](_0x46711b)['then'](handleEntityNotFound(_0xea42cb,null))[_0x8aa8('0x22')](respondWithResult(_0xea42cb,null))[_0x8aa8('0x41')](handleError(_0xea42cb,null));};exports[_0x8aa8('0x47')]=function(_0x2bc6d3,_0x2a0a14){return db[_0x8aa8('0x27')]['create'](_0x2bc6d3['body'],{})[_0x8aa8('0x22')](respondWithResult(_0x2a0a14,0xc9))[_0x8aa8('0x41')](handleError(_0x2a0a14,null));};exports['update']=function(_0x35eeea,_0x25906d){if(_0x35eeea[_0x8aa8('0x48')]['id']){delete _0x35eeea['body']['id'];}return db['ZohoField']['find']({'where':{'id':_0x35eeea['params']['id']}})[_0x8aa8('0x22')](handleEntityNotFound(_0x25906d,null))[_0x8aa8('0x22')](saveUpdates(_0x35eeea['body'],null))[_0x8aa8('0x22')](respondWithResult(_0x25906d,null))[_0x8aa8('0x41')](handleError(_0x25906d,null));};exports[_0x8aa8('0x49')]=function(_0x1aa1b6,_0x20384a){return db[_0x8aa8('0x27')]['find']({'where':{'id':_0x1aa1b6['params']['id']}})[_0x8aa8('0x22')](handleEntityNotFound(_0x20384a,null))['then'](removeEntity(_0x20384a,null))[_0x8aa8('0x41')](handleError(_0x20384a,null));};
\ No newline at end of file
+var _0xac4a=['end','status','json','count','offset','Content-Range','apply','reject','save','then','destroy','stack','index','ZohoField','rawAttributes','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','findAll','rows','catch','params','length','find','create','body','update','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','to-csv','lodash','crypto','jsforce','querystring','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0xac4a,0x13f));var _0xaac4=function(_0x9b3a50,_0x1f0e22){_0x9b3a50=_0x9b3a50-0x0;var _0x4c1f44=_0xac4a[_0x9b3a50];return _0x4c1f44;};'use strict';var pdf=require(_0xaac4('0x0'));var emlformat=require(_0xaac4('0x1'));var rimraf=require(_0xaac4('0x2'));var zipdir=require(_0xaac4('0x3'));var jsonpatch=require(_0xaac4('0x4'));var rp=require(_0xaac4('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xaac4('0x6'));var util=require(_0xaac4('0x7'));var path=require(_0xaac4('0x8'));var sox=require('sox');var csv=require(_0xaac4('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xaac4('0xa'));var squel=require('squel');var crypto=require(_0xaac4('0xb'));var jsforce=require(_0xaac4('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xaac4('0xd'));var Papa=require('papaparse');var Redis=require(_0xaac4('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0xaac4('0xf'));var logger=require(_0xaac4('0x10'))(_0xaac4('0x11'));var utils=require(_0xaac4('0x12'));var config=require(_0xaac4('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x508e14,_0x2348c2){_0x2348c2=_0x2348c2||0xcc;return function(_0x2e2d02){if(_0x2e2d02){return _0x508e14[_0xaac4('0x14')](_0x2348c2);}return _0x508e14['status'](_0x2348c2)[_0xaac4('0x15')]();};}function respondWithResult(_0x45c129,_0x5bcacd){_0x5bcacd=_0x5bcacd||0xc8;return function(_0xf06b1d){if(_0xf06b1d){return _0x45c129[_0xaac4('0x16')](_0x5bcacd)[_0xaac4('0x17')](_0xf06b1d);}};}function respondWithFilteredResult(_0x150fdd,_0x187624){return function(_0x2fbeb7){if(_0x2fbeb7){var _0x31b7e5=_0x2fbeb7[_0xaac4('0x18')],_0x1df9ae=_0x187624[_0xaac4('0x19')],_0x233278=_0x187624[_0xaac4('0x19')]+_0x187624['limit'],_0xb8466e;if(_0x233278>=_0x31b7e5){_0x233278=_0x31b7e5;_0xb8466e=0xc8;}else{_0xb8466e=0xce;}_0x150fdd[_0xaac4('0x16')](_0xb8466e);return _0x150fdd['set'](_0xaac4('0x1a'),_0x1df9ae+'-'+_0x233278+'/'+_0x31b7e5)['json'](_0x2fbeb7);}return null;};}function patchUpdates(_0x3ce35a){return function(_0x27fe7b){try{jsonpatch[_0xaac4('0x1b')](_0x27fe7b,_0x3ce35a,!![]);}catch(_0x271bcb){return BPromise[_0xaac4('0x1c')](_0x271bcb);}return _0x27fe7b[_0xaac4('0x1d')]();};}function saveUpdates(_0x44f0e8,_0x25b946){return function(_0x4166ee){if(_0x4166ee){return _0x4166ee['update'](_0x44f0e8)[_0xaac4('0x1e')](function(_0x4e1e89){return _0x4e1e89;});}return null;};}function removeEntity(_0x3303f1,_0x2013b7){return function(_0x43625c){if(_0x43625c){return _0x43625c[_0xaac4('0x1f')]()[_0xaac4('0x1e')](function(){_0x3303f1[_0xaac4('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x43ccdc,_0x27a84d){return function(_0x174860){if(!_0x174860){_0x43ccdc[_0xaac4('0x14')](0x194);}return _0x174860;};}function handleError(_0x3dd059,_0x2dcc59){_0x2dcc59=_0x2dcc59||0x1f4;return function(_0xb2577b){logger['error'](_0xb2577b[_0xaac4('0x20')]);if(_0xb2577b['name']){delete _0xb2577b['name'];}_0x3dd059['status'](_0x2dcc59)['send'](_0xb2577b);};}exports[_0xaac4('0x21')]=function(_0x17d25f,_0x22cda2){var _0xe93120={},_0x3c1445={},_0x249a5d={'count':0x0,'rows':[]};var _0x43b122=db[_0xaac4('0x22')][_0xaac4('0x23')];_0x3c1445[_0xaac4('0x24')]=_['keys'](_0x43b122);_0x3c1445[_0xaac4('0x25')]=_[_0xaac4('0x26')](_0x17d25f[_0xaac4('0x25')]);_0x3c1445[_0xaac4('0x27')]=_[_0xaac4('0x28')](_0x3c1445[_0xaac4('0x24')],_0x3c1445['query']);_0xe93120[_0xaac4('0x29')]=_['intersection'](_0x3c1445[_0xaac4('0x24')],qs[_0xaac4('0x2a')](_0x17d25f[_0xaac4('0x25')][_0xaac4('0x2a')]));_0xe93120['attributes']=_0xe93120['attributes']['length']?_0xe93120[_0xaac4('0x29')]:_0x3c1445[_0xaac4('0x24')];if(!_0x17d25f[_0xaac4('0x25')][_0xaac4('0x2b')](_0xaac4('0x2c'))){_0xe93120[_0xaac4('0x2d')]=qs[_0xaac4('0x2d')](_0x17d25f[_0xaac4('0x25')][_0xaac4('0x2d')]);_0xe93120[_0xaac4('0x19')]=qs[_0xaac4('0x19')](_0x17d25f[_0xaac4('0x25')][_0xaac4('0x19')]);}_0xe93120[_0xaac4('0x2e')]=qs[_0xaac4('0x2f')](_0x17d25f['query']['sort']);_0xe93120[_0xaac4('0x30')]=qs[_0xaac4('0x27')](_[_0xaac4('0x31')](_0x17d25f['query'],_0x3c1445[_0xaac4('0x27')]));if(_0x17d25f[_0xaac4('0x25')][_0xaac4('0x32')]){_0xe93120[_0xaac4('0x30')]=_[_0xaac4('0x33')](_0xe93120[_0xaac4('0x30')],{'$or':_[_0xaac4('0x34')](_0x43b122,function(_0x53b7cb){if(_0x53b7cb[_0xaac4('0x35')][_0xaac4('0x36')]!==_0xaac4('0x37')){var _0x5d64a2={};_0x5d64a2[_0x53b7cb[_0xaac4('0x38')]]={'$like':'%'+_0x17d25f['query']['filter']+'%'};return _0x5d64a2;}})});}_0xe93120=_[_0xaac4('0x33')]({},_0xe93120,_0x17d25f[_0xaac4('0x39')]);var _0x2da28a={'where':_0xe93120['where']};return db['ZohoField'][_0xaac4('0x18')](_0x2da28a)[_0xaac4('0x1e')](function(_0x2f7300){_0x249a5d[_0xaac4('0x18')]=_0x2f7300;if(_0x17d25f[_0xaac4('0x25')][_0xaac4('0x3a')]){_0xe93120['include']=[{'all':!![]}];}return db['ZohoField'][_0xaac4('0x3b')](_0xe93120);})[_0xaac4('0x1e')](function(_0x5371b4){_0x249a5d[_0xaac4('0x3c')]=_0x5371b4;return _0x249a5d;})[_0xaac4('0x1e')](respondWithFilteredResult(_0x22cda2,_0xe93120))[_0xaac4('0x3d')](handleError(_0x22cda2,null));};exports['show']=function(_0x74a1c,_0x4a4773){var _0x2259fc={'raw':!![],'where':{'id':_0x74a1c[_0xaac4('0x3e')]['id']}},_0x5bc387={};_0x5bc387[_0xaac4('0x24')]=_[_0xaac4('0x26')](db[_0xaac4('0x22')]['rawAttributes']);_0x5bc387[_0xaac4('0x25')]=_['keys'](_0x74a1c['query']);_0x5bc387[_0xaac4('0x27')]=_[_0xaac4('0x28')](_0x5bc387[_0xaac4('0x24')],_0x5bc387[_0xaac4('0x25')]);_0x2259fc[_0xaac4('0x29')]=_[_0xaac4('0x28')](_0x5bc387[_0xaac4('0x24')],qs[_0xaac4('0x2a')](_0x74a1c['query'][_0xaac4('0x2a')]));_0x2259fc[_0xaac4('0x29')]=_0x2259fc[_0xaac4('0x29')][_0xaac4('0x3f')]?_0x2259fc['attributes']:_0x5bc387[_0xaac4('0x24')];if(_0x74a1c[_0xaac4('0x25')][_0xaac4('0x3a')]){_0x2259fc['include']=[{'all':!![]}];}_0x2259fc=_[_0xaac4('0x33')]({},_0x2259fc,_0x74a1c[_0xaac4('0x39')]);return db[_0xaac4('0x22')][_0xaac4('0x40')](_0x2259fc)['then'](handleEntityNotFound(_0x4a4773,null))[_0xaac4('0x1e')](respondWithResult(_0x4a4773,null))[_0xaac4('0x3d')](handleError(_0x4a4773,null));};exports[_0xaac4('0x41')]=function(_0x57a7ab,_0xf404b9){return db[_0xaac4('0x22')][_0xaac4('0x41')](_0x57a7ab[_0xaac4('0x42')],{})[_0xaac4('0x1e')](respondWithResult(_0xf404b9,0xc9))[_0xaac4('0x3d')](handleError(_0xf404b9,null));};exports[_0xaac4('0x43')]=function(_0xa8d1c9,_0x6c713){if(_0xa8d1c9['body']['id']){delete _0xa8d1c9[_0xaac4('0x42')]['id'];}return db[_0xaac4('0x22')][_0xaac4('0x40')]({'where':{'id':_0xa8d1c9[_0xaac4('0x3e')]['id']}})[_0xaac4('0x1e')](handleEntityNotFound(_0x6c713,null))['then'](saveUpdates(_0xa8d1c9['body'],null))[_0xaac4('0x1e')](respondWithResult(_0x6c713,null))[_0xaac4('0x3d')](handleError(_0x6c713,null));};exports[_0xaac4('0x1f')]=function(_0x16c7f4,_0x5f33ea){return db[_0xaac4('0x22')]['find']({'where':{'id':_0x16c7f4[_0xaac4('0x3e')]['id']}})[_0xaac4('0x1e')](handleEntityNotFound(_0x5f33ea,null))['then'](removeEntity(_0x5f33ea,null))[_0xaac4('0x3d')](handleError(_0x5f33ea,null));};
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.model.js b/server/api/intZohoField/intZohoField.model.js
index 95d5ed5..535154e 100644
--- a/server/api/intZohoField/intZohoField.model.js
+++ b/server/api/intZohoField/intZohoField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa2b2=['rimraf','../../config/environment','./intZohoField.attributes','define','ZohoField','int_zoho_fields','zoho_unique_index','idField','FieldId','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x54381d,_0x247b2c){var _0x5308a7=function(_0x3ef056){while(--_0x3ef056){_0x54381d['push'](_0x54381d['shift']());}};_0x5308a7(++_0x247b2c);}(_0xa2b2,0x109));var _0x2a2b=function(_0x2ad740,_0x1a78be){_0x2ad740=_0x2ad740-0x0;var _0xb6082f=_0xa2b2[_0x2ad740];return _0xb6082f;};'use strict';var _=require(_0x2a2b('0x0'));var util=require(_0x2a2b('0x1'));var logger=require(_0x2a2b('0x2'))(_0x2a2b('0x3'));var moment=require(_0x2a2b('0x4'));var BPromise=require(_0x2a2b('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2a2b('0x6'));var rimraf=require(_0x2a2b('0x7'));var config=require(_0x2a2b('0x8'));var attributes=require(_0x2a2b('0x9'));module['exports']=function(_0x5d1826,_0x5c80a5){return _0x5d1826[_0x2a2b('0xa')](_0x2a2b('0xb'),attributes,{'tableName':_0x2a2b('0xc'),'paranoid':![],'indexes':[{'name':_0x2a2b('0xd'),'fields':[_0x2a2b('0xe'),_0x2a2b('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x1998=['exports','define','ZohoField','int_zoho_fields','FieldId','lodash','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./intZohoField.attributes'];(function(_0x214266,_0x1f6f52){var _0x568f75=function(_0x541904){while(--_0x541904){_0x214266['push'](_0x214266['shift']());}};_0x568f75(++_0x1f6f52);}(_0x1998,0x163));var _0x8199=function(_0x5c01de,_0x3c672b){_0x5c01de=_0x5c01de-0x0;var _0x74c071=_0x1998[_0x5c01de];return _0x74c071;};'use strict';var _=require(_0x8199('0x0'));var util=require(_0x8199('0x1'));var logger=require(_0x8199('0x2'))(_0x8199('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x8199('0x4'));var fs=require('fs');var path=require(_0x8199('0x5'));var rimraf=require(_0x8199('0x6'));var config=require(_0x8199('0x7'));var attributes=require(_0x8199('0x8'));module[_0x8199('0x9')]=function(_0x429fed,_0x18d01a){return _0x429fed[_0x8199('0xa')](_0x8199('0xb'),attributes,{'tableName':_0x8199('0xc'),'paranoid':![],'indexes':[{'name':'zoho_unique_index','fields':['idField',_0x8199('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.rpc.js b/server/api/intZohoField/intZohoField.rpc.js
index df4d0eb..5de1e02 100644
--- a/server/api/intZohoField/intZohoField.rpc.js
+++ b/server/api/intZohoField/intZohoField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0d0d=['error','code','message','catch','util','randomstring','../../mysqldb','../../config/environment','jayson/promise','client','http','request','ZohoField,\x20%s,\x20%s','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5ee21d,_0x452e5e){var _0x15e7a2=function(_0x24c648){while(--_0x24c648){_0x5ee21d['push'](_0x5ee21d['shift']());}};_0x15e7a2(++_0x452e5e);}(_0x0d0d,0x169));var _0xd0d0=function(_0x2937a9,_0x545c6d){_0x2937a9=_0x2937a9-0x0;var _0x428b3f=_0x0d0d[_0x2937a9];return _0x428b3f;};'use strict';var _=require('lodash');var util=require(_0xd0d0('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd0d0('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd0d0('0x2'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xd0d0('0x3'));var jayson=require(_0xd0d0('0x4'));var client=jayson[_0xd0d0('0x5')][_0xd0d0('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x10d443,_0x30d7c5,_0x1722cf){return new BPromise(function(_0x4dcbdb,_0x383398){return client[_0xd0d0('0x7')](_0x10d443,_0x1722cf)['then'](function(_0x316ed9){logger['info'](_0xd0d0('0x8'),_0x30d7c5,_0xd0d0('0x9'));logger[_0xd0d0('0xa')](_0xd0d0('0xb'),_0x30d7c5,_0xd0d0('0x9'),JSON[_0xd0d0('0xc')](_0x316ed9));if(_0x316ed9[_0xd0d0('0xd')]){if(_0x316ed9['error'][_0xd0d0('0xe')]===0x1f4){logger[_0xd0d0('0xd')](_0xd0d0('0x8'),_0x30d7c5,_0x316ed9[_0xd0d0('0xd')][_0xd0d0('0xf')]);return _0x383398(_0x316ed9[_0xd0d0('0xd')][_0xd0d0('0xf')]);}logger[_0xd0d0('0xd')](_0xd0d0('0x8'),_0x30d7c5,_0x316ed9[_0xd0d0('0xd')][_0xd0d0('0xf')]);return _0x4dcbdb(_0x316ed9[_0xd0d0('0xd')]['message']);}else{logger['info'](_0xd0d0('0x8'),_0x30d7c5,_0xd0d0('0x9'));_0x4dcbdb(_0x316ed9['result']['message']);}})[_0xd0d0('0x10')](function(_0x58db94){logger[_0xd0d0('0xd')](_0xd0d0('0x8'),_0x30d7c5,_0x58db94);_0x383398(_0x58db94);});});}
\ No newline at end of file
+var _0x8a77=['randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','ZohoField,\x20%s,\x20%s','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','bluebird'];(function(_0x533a17,_0x345bf7){var _0x22071c=function(_0xba9459){while(--_0xba9459){_0x533a17['push'](_0x533a17['shift']());}};_0x22071c(++_0x345bf7);}(_0x8a77,0xfa));var _0x78a7=function(_0x24b303,_0x4e32fe){_0x24b303=_0x24b303-0x0;var _0xd37597=_0x8a77[_0x24b303];return _0xd37597;};'use strict';var _=require(_0x78a7('0x0'));var util=require(_0x78a7('0x1'));var moment=require('moment');var BPromise=require(_0x78a7('0x2'));var rs=require(_0x78a7('0x3'));var fs=require('fs');var Redis=require(_0x78a7('0x4'));var db=require(_0x78a7('0x5'))['db'];var utils=require(_0x78a7('0x6'));var logger=require('../../config/logger')(_0x78a7('0x7'));var config=require('../../config/environment');var jayson=require(_0x78a7('0x8'));var client=jayson[_0x78a7('0x9')][_0x78a7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4909d1,_0x5f531d,_0x561fa5){return new BPromise(function(_0x1ea98b,_0x2f919e){return client[_0x78a7('0xb')](_0x4909d1,_0x561fa5)['then'](function(_0x542836){logger['info'](_0x78a7('0xc'),_0x5f531d,_0x78a7('0xd'));logger[_0x78a7('0xe')](_0x78a7('0xf'),_0x5f531d,_0x78a7('0xd'),JSON[_0x78a7('0x10')](_0x542836));if(_0x542836[_0x78a7('0x11')]){if(_0x542836[_0x78a7('0x11')][_0x78a7('0x12')]===0x1f4){logger['error']('ZohoField,\x20%s,\x20%s',_0x5f531d,_0x542836[_0x78a7('0x11')][_0x78a7('0x13')]);return _0x2f919e(_0x542836[_0x78a7('0x11')][_0x78a7('0x13')]);}logger[_0x78a7('0x11')](_0x78a7('0xc'),_0x5f531d,_0x542836[_0x78a7('0x11')][_0x78a7('0x13')]);return _0x1ea98b(_0x542836[_0x78a7('0x11')][_0x78a7('0x13')]);}else{logger[_0x78a7('0x14')](_0x78a7('0xc'),_0x5f531d,_0x78a7('0xd'));_0x1ea98b(_0x542836[_0x78a7('0x15')]['message']);}})[_0x78a7('0x16')](function(_0x5d4f5f){logger['error'](_0x78a7('0xc'),_0x5f531d,_0x5d4f5f);_0x2f919e(_0x5d4f5f);});});}
\ No newline at end of file
diff --git a/server/api/integration/index.js b/server/api/integration/index.js
index 7a9678d..2a2147b 100644
--- a/server/api/integration/index.js
+++ b/server/api/integration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0ef4=['../../config/environment','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service'];(function(_0x372e3b,_0x2171c0){var _0x1687a6=function(_0x43cae8){while(--_0x43cae8){_0x372e3b['push'](_0x372e3b['shift']());}};_0x1687a6(++_0x2171c0);}(_0x0ef4,0xc7));var _0x40ef=function(_0x255d5b,_0x4f6f35){_0x255d5b=_0x255d5b-0x0;var _0x3e141a=_0x0ef4[_0x255d5b];return _0x3e141a;};'use strict';var multer=require('multer');var util=require(_0x40ef('0x0'));var path=require(_0x40ef('0x1'));var timeout=require(_0x40ef('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x40ef('0x3'));var interaction=require(_0x40ef('0x4'));var config=require(_0x40ef('0x5'));module['exports']=router;
\ No newline at end of file
+var _0x5d58=['../../components/auth/service','../../config/environment','exports','Router'];(function(_0x2060e9,_0x5e22f8){var _0x3a5584=function(_0x7e9a24){while(--_0x7e9a24){_0x2060e9['push'](_0x2060e9['shift']());}};_0x3a5584(++_0x5e22f8);}(_0x5d58,0x187));var _0x85d5=function(_0x408545,_0x203ccd){_0x408545=_0x408545-0x0;var _0x5bdac0=_0x5d58[_0x408545];return _0x5bdac0;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x85d5('0x0')]();var auth=require(_0x85d5('0x1'));var interaction=require('../../components/interaction/service');var config=require(_0x85d5('0x2'));module[_0x85d5('0x3')]=router;
\ No newline at end of file
diff --git a/server/api/integration/integration.attributes.js b/server/api/integration/integration.attributes.js
index a654a70..21a9ff3 100644
--- a/server/api/integration/integration.attributes.js
+++ b/server/api/integration/integration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x75ca=['exports','STRING','unique_name_and_version','app.js','BOOLEAN','state','sequelize'];(function(_0x2cd399,_0x5280b5){var _0x591a7b=function(_0x2e64fe){while(--_0x2e64fe){_0x2cd399['push'](_0x2cd399['shift']());}};_0x591a7b(++_0x5280b5);}(_0x75ca,0x117));var _0xa75c=function(_0x2f6233,_0x90172){_0x2f6233=_0x2f6233-0x0;var _0x1c9c36=_0x75ca[_0x2f6233];return _0x1c9c36;};'use strict';var Sequelize=require(_0xa75c('0x0'));module[_0xa75c('0x1')]={'name':{'type':Sequelize[_0xa75c('0x2')],'allowNull':![],'unique':_0xa75c('0x3')},'version':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xa75c('0x3')},'main':{'type':Sequelize[_0xa75c('0x2')],'defaultValue':_0xa75c('0x4')},'filename':{'type':Sequelize[_0xa75c('0x2')]},'path':{'type':Sequelize[_0xa75c('0x2')]},'type':{'type':Sequelize[_0xa75c('0x2')]},'size':{'type':Sequelize['INTEGER']},'active':{'type':Sequelize[_0xa75c('0x5')],'defaultValue':![]},'author':{'type':Sequelize['STRING']},'logo':{'type':Sequelize[_0xa75c('0x2')]},'state':{'type':Sequelize['STRING'],'unique':_0xa75c('0x6')},'description':{'type':Sequelize['STRING']},'title':{'type':Sequelize[_0xa75c('0x2')]},'remoteUri':{'type':Sequelize[_0xa75c('0x2')]},'link':{'type':Sequelize[_0xa75c('0x2')],'defaultValue':'#'}};
\ No newline at end of file
+var _0x979d=['exports','unique_name_and_version','STRING','app.js','INTEGER','BOOLEAN','state','sequelize'];(function(_0x27eb97,_0x186266){var _0x3c44ac=function(_0xc842fa){while(--_0xc842fa){_0x27eb97['push'](_0x27eb97['shift']());}};_0x3c44ac(++_0x186266);}(_0x979d,0x1df));var _0xd979=function(_0x22b24a,_0x44d1fa){_0x22b24a=_0x22b24a-0x0;var _0x200c2b=_0x979d[_0x22b24a];return _0x200c2b;};'use strict';var Sequelize=require(_0xd979('0x0'));module[_0xd979('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xd979('0x2')},'version':{'type':Sequelize[_0xd979('0x3')],'allowNull':![],'unique':'unique_name_and_version'},'main':{'type':Sequelize[_0xd979('0x3')],'defaultValue':_0xd979('0x4')},'filename':{'type':Sequelize[_0xd979('0x3')]},'path':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xd979('0x3')]},'size':{'type':Sequelize[_0xd979('0x5')]},'active':{'type':Sequelize[_0xd979('0x6')],'defaultValue':![]},'author':{'type':Sequelize[_0xd979('0x3')]},'logo':{'type':Sequelize[_0xd979('0x3')]},'state':{'type':Sequelize[_0xd979('0x3')],'unique':_0xd979('0x7')},'description':{'type':Sequelize[_0xd979('0x3')]},'title':{'type':Sequelize[_0xd979('0x3')]},'remoteUri':{'type':Sequelize[_0xd979('0x3')]},'link':{'type':Sequelize['STRING'],'defaultValue':'#'}};
\ No newline at end of file
diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js
index e359843..19a1587 100644
--- a/server/api/integration/integration.controller.js
+++ b/server/api/integration/integration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0df2=['Content-Range','reject','save','destroy','then','error','stack','name','index','Integration','rawAttributes','model','keys','query','attributes','intersection','fields','nolimit','limit','sort','pick','filters','filter','where','map','type','key','VIRTUAL','options','includeAll','include','findAll','show','params','length','merge','find','catch','body','update','html-pdf','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','count','offset','set'];(function(_0x24de26,_0xbe070){var _0x6413e6=function(_0x3bb7bf){while(--_0x3bb7bf){_0x24de26['push'](_0x24de26['shift']());}};_0x6413e6(++_0xbe070);}(_0x0df2,0xf7));var _0x20df=function(_0x2f0175,_0x250c03){_0x2f0175=_0x2f0175-0x0;var _0x1d9e63=_0x0df2[_0x2f0175];return _0x1d9e63;};'use strict';var pdf=require(_0x20df('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x20df('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x20df('0x2'));var rp=require('request-promise');var moment=require(_0x20df('0x3'));var BPromise=require(_0x20df('0x4'));var Mustache=require(_0x20df('0x5'));var util=require(_0x20df('0x6'));var path=require(_0x20df('0x7'));var sox=require(_0x20df('0x8'));var csv=require('to-csv');var ejs=require(_0x20df('0x9'));var fs=require('fs');var _=require(_0x20df('0xa'));var squel=require(_0x20df('0xb'));var crypto=require(_0x20df('0xc'));var jsforce=require(_0x20df('0xd'));var deskjs=require(_0x20df('0xe'));var toCsv=require(_0x20df('0xf'));var querystring=require(_0x20df('0x10'));var Papa=require(_0x20df('0x11'));var Redis=require(_0x20df('0x12'));var authService=require(_0x20df('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x20df('0x14'));var logger=require('../../config/logger')(_0x20df('0x15'));var utils=require(_0x20df('0x16'));var config=require('../../config/environment');var db=require(_0x20df('0x17'))['db'];function respondWithStatusCode(_0x428535,_0x4054ad){_0x4054ad=_0x4054ad||0xcc;return function(_0xde828d){if(_0xde828d){return _0x428535[_0x20df('0x18')](_0x4054ad);}return _0x428535[_0x20df('0x19')](_0x4054ad)['end']();};}function respondWithResult(_0x2dfc0a,_0x4b8422){_0x4b8422=_0x4b8422||0xc8;return function(_0x263679){if(_0x263679){return _0x2dfc0a[_0x20df('0x19')](_0x4b8422)['json'](_0x263679);}};}function respondWithFilteredResult(_0x53220b,_0x55697d){return function(_0x5d0b4e){if(_0x5d0b4e){var _0xa5269f=_0x5d0b4e[_0x20df('0x1a')],_0x2fc3c4=_0x55697d[_0x20df('0x1b')],_0x26ff9b=_0x55697d[_0x20df('0x1b')]+_0x55697d['limit'],_0x58b540;if(_0x26ff9b>=_0xa5269f){_0x26ff9b=_0xa5269f;_0x58b540=0xc8;}else{_0x58b540=0xce;}_0x53220b['status'](_0x58b540);return _0x53220b[_0x20df('0x1c')](_0x20df('0x1d'),_0x2fc3c4+'-'+_0x26ff9b+'/'+_0xa5269f)['json'](_0x5d0b4e);}return null;};}function patchUpdates(_0x2d2a15){return function(_0x4f3095){try{jsonpatch['apply'](_0x4f3095,_0x2d2a15,!![]);}catch(_0x4eeafa){return BPromise[_0x20df('0x1e')](_0x4eeafa);}return _0x4f3095[_0x20df('0x1f')]();};}function saveUpdates(_0x40e784,_0x2f4388){return function(_0x3cd027){if(_0x3cd027){return _0x3cd027['update'](_0x40e784)['then'](function(_0x556abe){return _0x556abe;});}return null;};}function removeEntity(_0x2960c5,_0x267ac7){return function(_0x308b82){if(_0x308b82){return _0x308b82[_0x20df('0x20')]()[_0x20df('0x21')](function(){_0x2960c5[_0x20df('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x46c298,_0xf800be){return function(_0x40cda5){if(!_0x40cda5){_0x46c298[_0x20df('0x18')](0x194);}return _0x40cda5;};}function handleError(_0xf611d6,_0x7b76b2){_0x7b76b2=_0x7b76b2||0x1f4;return function(_0x379594){logger[_0x20df('0x22')](_0x379594[_0x20df('0x23')]);if(_0x379594[_0x20df('0x24')]){delete _0x379594[_0x20df('0x24')];}_0xf611d6[_0x20df('0x19')](_0x7b76b2)['send'](_0x379594);};}exports[_0x20df('0x25')]=function(_0x13816b,_0x4d1a6f){var _0x1063d8={},_0x5d7c5c={},_0x3e2f9d={'count':0x0,'rows':[]};var _0x352c0b=db[_0x20df('0x26')][_0x20df('0x27')];_0x5d7c5c[_0x20df('0x28')]=_[_0x20df('0x29')](_0x352c0b);_0x5d7c5c[_0x20df('0x2a')]=_[_0x20df('0x29')](_0x13816b['query']);_0x5d7c5c['filters']=_['intersection'](_0x5d7c5c[_0x20df('0x28')],_0x5d7c5c[_0x20df('0x2a')]);_0x1063d8[_0x20df('0x2b')]=_[_0x20df('0x2c')](_0x5d7c5c[_0x20df('0x28')],qs[_0x20df('0x2d')](_0x13816b[_0x20df('0x2a')][_0x20df('0x2d')]));_0x1063d8[_0x20df('0x2b')]=_0x1063d8[_0x20df('0x2b')]['length']?_0x1063d8[_0x20df('0x2b')]:_0x5d7c5c[_0x20df('0x28')];if(!_0x13816b[_0x20df('0x2a')]['hasOwnProperty'](_0x20df('0x2e'))){_0x1063d8['limit']=qs[_0x20df('0x2f')](_0x13816b['query'][_0x20df('0x2f')]);_0x1063d8[_0x20df('0x1b')]=qs[_0x20df('0x1b')](_0x13816b[_0x20df('0x2a')][_0x20df('0x1b')]);}_0x1063d8['order']=qs[_0x20df('0x30')](_0x13816b[_0x20df('0x2a')]['sort']);_0x1063d8['where']=qs['filters'](_[_0x20df('0x31')](_0x13816b[_0x20df('0x2a')],_0x5d7c5c[_0x20df('0x32')]));if(_0x13816b[_0x20df('0x2a')][_0x20df('0x33')]){_0x1063d8['where']=_['merge'](_0x1063d8[_0x20df('0x34')],{'$or':_[_0x20df('0x35')](_0x352c0b,function(_0x1b389e){if(_0x1b389e[_0x20df('0x36')][_0x20df('0x37')]!==_0x20df('0x38')){var _0x1802d8={};_0x1802d8[_0x1b389e['field']]={'$like':'%'+_0x13816b[_0x20df('0x2a')][_0x20df('0x33')]+'%'};return _0x1802d8;}})});}_0x1063d8=_['merge']({},_0x1063d8,_0x13816b[_0x20df('0x39')]);var _0x460aea={'where':_0x1063d8[_0x20df('0x34')]};return db[_0x20df('0x26')][_0x20df('0x1a')](_0x460aea)[_0x20df('0x21')](function(_0x4ac766){_0x3e2f9d[_0x20df('0x1a')]=_0x4ac766;if(_0x13816b['query'][_0x20df('0x3a')]){_0x1063d8[_0x20df('0x3b')]=[{'all':!![]}];}return db[_0x20df('0x26')][_0x20df('0x3c')](_0x1063d8);})[_0x20df('0x21')](function(_0x243117){_0x3e2f9d['rows']=_0x243117;return _0x3e2f9d;})[_0x20df('0x21')](respondWithFilteredResult(_0x4d1a6f,_0x1063d8))['catch'](handleError(_0x4d1a6f,null));};exports[_0x20df('0x3d')]=function(_0x33f2e7,_0x3958b8){var _0x50a055={'raw':![],'where':{'id':_0x33f2e7[_0x20df('0x3e')]['id']}},_0x310e82={};_0x310e82['model']=_[_0x20df('0x29')](db[_0x20df('0x26')][_0x20df('0x27')]);_0x310e82[_0x20df('0x2a')]=_[_0x20df('0x29')](_0x33f2e7[_0x20df('0x2a')]);_0x310e82[_0x20df('0x32')]=_[_0x20df('0x2c')](_0x310e82[_0x20df('0x28')],_0x310e82[_0x20df('0x2a')]);_0x50a055[_0x20df('0x2b')]=_[_0x20df('0x2c')](_0x310e82[_0x20df('0x28')],qs[_0x20df('0x2d')](_0x33f2e7[_0x20df('0x2a')][_0x20df('0x2d')]));_0x50a055[_0x20df('0x2b')]=_0x50a055['attributes'][_0x20df('0x3f')]?_0x50a055['attributes']:_0x310e82[_0x20df('0x28')];if(_0x33f2e7['query'][_0x20df('0x3a')]){_0x50a055[_0x20df('0x3b')]=[{'all':!![]}];}_0x50a055=_[_0x20df('0x40')]({},_0x50a055,_0x33f2e7[_0x20df('0x39')]);return db[_0x20df('0x26')][_0x20df('0x41')](_0x50a055)[_0x20df('0x21')](handleEntityNotFound(_0x3958b8,null))[_0x20df('0x21')](respondWithResult(_0x3958b8,null))[_0x20df('0x42')](handleError(_0x3958b8,null));};exports['create']=function(_0x502a19,_0x322406){return db[_0x20df('0x26')]['create'](_0x502a19[_0x20df('0x43')],{})[_0x20df('0x21')](respondWithResult(_0x322406,0xc9))[_0x20df('0x42')](handleError(_0x322406,null));};exports[_0x20df('0x44')]=function(_0x4d5a3f,_0x4af5ae){if(_0x4d5a3f['body']['id']){delete _0x4d5a3f['body']['id'];}return db['Integration'][_0x20df('0x41')]({'where':{'id':_0x4d5a3f[_0x20df('0x3e')]['id']}})[_0x20df('0x21')](handleEntityNotFound(_0x4af5ae,null))[_0x20df('0x21')](saveUpdates(_0x4d5a3f[_0x20df('0x43')],null))[_0x20df('0x21')](respondWithResult(_0x4af5ae,null))[_0x20df('0x42')](handleError(_0x4af5ae,null));};exports[_0x20df('0x20')]=function(_0x54c352,_0x5c1e0c){return db[_0x20df('0x26')][_0x20df('0x41')]({'where':{'id':_0x54c352[_0x20df('0x3e')]['id']}})[_0x20df('0x21')](handleEntityNotFound(_0x5c1e0c,null))[_0x20df('0x21')](removeEntity(_0x5c1e0c,null))[_0x20df('0x42')](handleError(_0x5c1e0c,null));};
\ No newline at end of file
+var _0x2a07=['papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','offset','limit','set','reject','update','then','destroy','end','error','stack','name','send','index','rawAttributes','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','map','type','key','VIRTUAL','field','options','count','includeAll','Integration','findAll','rows','catch','params','include','find','create','body','html-pdf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','lodash','squel','crypto','jsforce','desk.js'];(function(_0x2a707f,_0x21fa97){var _0x36c86c=function(_0xecca28){while(--_0xecca28){_0x2a707f['push'](_0x2a707f['shift']());}};_0x36c86c(++_0x21fa97);}(_0x2a07,0x109));var _0x72a0=function(_0x3c538b,_0x14cb10){_0x3c538b=_0x3c538b-0x0;var _0x4b8542=_0x2a07[_0x3c538b];return _0x4b8542;};'use strict';var pdf=require(_0x72a0('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x72a0('0x1'));var jsonpatch=require(_0x72a0('0x2'));var rp=require(_0x72a0('0x3'));var moment=require(_0x72a0('0x4'));var BPromise=require(_0x72a0('0x5'));var Mustache=require(_0x72a0('0x6'));var util=require(_0x72a0('0x7'));var path=require(_0x72a0('0x8'));var sox=require('sox');var csv=require(_0x72a0('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x72a0('0xa'));var squel=require(_0x72a0('0xb'));var crypto=require(_0x72a0('0xc'));var jsforce=require(_0x72a0('0xd'));var deskjs=require(_0x72a0('0xe'));var toCsv=require(_0x72a0('0x9'));var querystring=require('querystring');var Papa=require(_0x72a0('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x72a0('0x10'));var hardwareService=require(_0x72a0('0x11'));var logger=require(_0x72a0('0x12'))(_0x72a0('0x13'));var utils=require('../../config/utils');var config=require(_0x72a0('0x14'));var db=require(_0x72a0('0x15'))['db'];function respondWithStatusCode(_0x1d6b46,_0x2bb600){_0x2bb600=_0x2bb600||0xcc;return function(_0x30653){if(_0x30653){return _0x1d6b46[_0x72a0('0x16')](_0x2bb600);}return _0x1d6b46[_0x72a0('0x17')](_0x2bb600)['end']();};}function respondWithResult(_0x4b255a,_0x4d207f){_0x4d207f=_0x4d207f||0xc8;return function(_0x49ad31){if(_0x49ad31){return _0x4b255a[_0x72a0('0x17')](_0x4d207f)['json'](_0x49ad31);}};}function respondWithFilteredResult(_0xf2a914,_0x137d21){return function(_0x46a614){if(_0x46a614){var _0x53f20b=_0x46a614['count'],_0x5e5a35=_0x137d21[_0x72a0('0x18')],_0x4c7f33=_0x137d21['offset']+_0x137d21[_0x72a0('0x19')],_0xee5c0a;if(_0x4c7f33>=_0x53f20b){_0x4c7f33=_0x53f20b;_0xee5c0a=0xc8;}else{_0xee5c0a=0xce;}_0xf2a914['status'](_0xee5c0a);return _0xf2a914[_0x72a0('0x1a')]('Content-Range',_0x5e5a35+'-'+_0x4c7f33+'/'+_0x53f20b)['json'](_0x46a614);}return null;};}function patchUpdates(_0x1c1645){return function(_0x446358){try{jsonpatch['apply'](_0x446358,_0x1c1645,!![]);}catch(_0x1c8da6){return BPromise[_0x72a0('0x1b')](_0x1c8da6);}return _0x446358['save']();};}function saveUpdates(_0x861a5e,_0x149a3e){return function(_0x47bfc3){if(_0x47bfc3){return _0x47bfc3[_0x72a0('0x1c')](_0x861a5e)[_0x72a0('0x1d')](function(_0x3ca397){return _0x3ca397;});}return null;};}function removeEntity(_0x469305,_0x57d6e8){return function(_0x21da10){if(_0x21da10){return _0x21da10[_0x72a0('0x1e')]()[_0x72a0('0x1d')](function(){_0x469305[_0x72a0('0x17')](0xcc)[_0x72a0('0x1f')]();});}};}function handleEntityNotFound(_0x56ebcd,_0x3826b1){return function(_0x1ac3d9){if(!_0x1ac3d9){_0x56ebcd[_0x72a0('0x16')](0x194);}return _0x1ac3d9;};}function handleError(_0x4624e1,_0x3a2ade){_0x3a2ade=_0x3a2ade||0x1f4;return function(_0x49efa7){logger[_0x72a0('0x20')](_0x49efa7[_0x72a0('0x21')]);if(_0x49efa7['name']){delete _0x49efa7[_0x72a0('0x22')];}_0x4624e1[_0x72a0('0x17')](_0x3a2ade)[_0x72a0('0x23')](_0x49efa7);};}exports[_0x72a0('0x24')]=function(_0x2cbd38,_0x33de59){var _0x1aa003={},_0x10991b={},_0xe10cd6={'count':0x0,'rows':[]};var _0x1f1d87=db['Integration'][_0x72a0('0x25')];_0x10991b[_0x72a0('0x26')]=_['keys'](_0x1f1d87);_0x10991b[_0x72a0('0x27')]=_[_0x72a0('0x28')](_0x2cbd38['query']);_0x10991b[_0x72a0('0x29')]=_['intersection'](_0x10991b[_0x72a0('0x26')],_0x10991b['query']);_0x1aa003['attributes']=_[_0x72a0('0x2a')](_0x10991b['model'],qs[_0x72a0('0x2b')](_0x2cbd38[_0x72a0('0x27')][_0x72a0('0x2b')]));_0x1aa003[_0x72a0('0x2c')]=_0x1aa003[_0x72a0('0x2c')][_0x72a0('0x2d')]?_0x1aa003[_0x72a0('0x2c')]:_0x10991b[_0x72a0('0x26')];if(!_0x2cbd38[_0x72a0('0x27')][_0x72a0('0x2e')](_0x72a0('0x2f'))){_0x1aa003['limit']=qs['limit'](_0x2cbd38[_0x72a0('0x27')][_0x72a0('0x19')]);_0x1aa003[_0x72a0('0x18')]=qs[_0x72a0('0x18')](_0x2cbd38['query'][_0x72a0('0x18')]);}_0x1aa003['order']=qs[_0x72a0('0x30')](_0x2cbd38[_0x72a0('0x27')][_0x72a0('0x30')]);_0x1aa003['where']=qs['filters'](_[_0x72a0('0x31')](_0x2cbd38[_0x72a0('0x27')],_0x10991b['filters']));if(_0x2cbd38[_0x72a0('0x27')][_0x72a0('0x32')]){_0x1aa003[_0x72a0('0x33')]=_[_0x72a0('0x34')](_0x1aa003['where'],{'$or':_[_0x72a0('0x35')](_0x1f1d87,function(_0x23f051){if(_0x23f051[_0x72a0('0x36')][_0x72a0('0x37')]!==_0x72a0('0x38')){var _0x3d53a6={};_0x3d53a6[_0x23f051[_0x72a0('0x39')]]={'$like':'%'+_0x2cbd38[_0x72a0('0x27')]['filter']+'%'};return _0x3d53a6;}})});}_0x1aa003=_[_0x72a0('0x34')]({},_0x1aa003,_0x2cbd38[_0x72a0('0x3a')]);var _0x5d3c98={'where':_0x1aa003[_0x72a0('0x33')]};return db['Integration'][_0x72a0('0x3b')](_0x5d3c98)[_0x72a0('0x1d')](function(_0x115605){_0xe10cd6[_0x72a0('0x3b')]=_0x115605;if(_0x2cbd38[_0x72a0('0x27')][_0x72a0('0x3c')]){_0x1aa003['include']=[{'all':!![]}];}return db[_0x72a0('0x3d')][_0x72a0('0x3e')](_0x1aa003);})[_0x72a0('0x1d')](function(_0x42300a){_0xe10cd6[_0x72a0('0x3f')]=_0x42300a;return _0xe10cd6;})['then'](respondWithFilteredResult(_0x33de59,_0x1aa003))[_0x72a0('0x40')](handleError(_0x33de59,null));};exports['show']=function(_0x20b122,_0x23d5e1){var _0x397248={'raw':![],'where':{'id':_0x20b122[_0x72a0('0x41')]['id']}},_0x305d7f={};_0x305d7f['model']=_['keys'](db[_0x72a0('0x3d')][_0x72a0('0x25')]);_0x305d7f['query']=_['keys'](_0x20b122[_0x72a0('0x27')]);_0x305d7f[_0x72a0('0x29')]=_['intersection'](_0x305d7f[_0x72a0('0x26')],_0x305d7f['query']);_0x397248[_0x72a0('0x2c')]=_[_0x72a0('0x2a')](_0x305d7f['model'],qs[_0x72a0('0x2b')](_0x20b122[_0x72a0('0x27')][_0x72a0('0x2b')]));_0x397248[_0x72a0('0x2c')]=_0x397248[_0x72a0('0x2c')][_0x72a0('0x2d')]?_0x397248[_0x72a0('0x2c')]:_0x305d7f[_0x72a0('0x26')];if(_0x20b122[_0x72a0('0x27')][_0x72a0('0x3c')]){_0x397248[_0x72a0('0x42')]=[{'all':!![]}];}_0x397248=_[_0x72a0('0x34')]({},_0x397248,_0x20b122[_0x72a0('0x3a')]);return db[_0x72a0('0x3d')][_0x72a0('0x43')](_0x397248)[_0x72a0('0x1d')](handleEntityNotFound(_0x23d5e1,null))['then'](respondWithResult(_0x23d5e1,null))[_0x72a0('0x40')](handleError(_0x23d5e1,null));};exports[_0x72a0('0x44')]=function(_0x54b42d,_0xdf4283){return db[_0x72a0('0x3d')]['create'](_0x54b42d[_0x72a0('0x45')],{})[_0x72a0('0x1d')](respondWithResult(_0xdf4283,0xc9))[_0x72a0('0x40')](handleError(_0xdf4283,null));};exports[_0x72a0('0x1c')]=function(_0x4275f4,_0x3f0366){if(_0x4275f4[_0x72a0('0x45')]['id']){delete _0x4275f4[_0x72a0('0x45')]['id'];}return db[_0x72a0('0x3d')][_0x72a0('0x43')]({'where':{'id':_0x4275f4[_0x72a0('0x41')]['id']}})[_0x72a0('0x1d')](handleEntityNotFound(_0x3f0366,null))[_0x72a0('0x1d')](saveUpdates(_0x4275f4[_0x72a0('0x45')],null))[_0x72a0('0x1d')](respondWithResult(_0x3f0366,null))[_0x72a0('0x40')](handleError(_0x3f0366,null));};exports[_0x72a0('0x1e')]=function(_0x7f57a6,_0x350f3d){return db[_0x72a0('0x3d')][_0x72a0('0x43')]({'where':{'id':_0x7f57a6['params']['id']}})[_0x72a0('0x1d')](handleEntityNotFound(_0x350f3d,null))[_0x72a0('0x1d')](removeEntity(_0x350f3d,null))[_0x72a0('0x40')](handleError(_0x350f3d,null));};
\ No newline at end of file
diff --git a/server/api/integration/integration.model.js b/server/api/integration/integration.model.js
index af5b7b6..003fde4 100644
--- a/server/api/integration/integration.model.js
+++ b/server/api/integration/integration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x63e3=['../../config/logger','api','bluebird','request-promise','path','rimraf','./integration.attributes','exports','define','integrations'];(function(_0x39ad4c,_0x2fa27e){var _0xf3314d=function(_0x4de109){while(--_0x4de109){_0x39ad4c['push'](_0x39ad4c['shift']());}};_0xf3314d(++_0x2fa27e);}(_0x63e3,0x1a4));var _0x363e=function(_0x484e36,_0x4482d8){_0x484e36=_0x484e36-0x0;var _0xafc85d=_0x63e3[_0x484e36];return _0xafc85d;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x363e('0x0'))(_0x363e('0x1'));var moment=require('moment');var BPromise=require(_0x363e('0x2'));var rp=require(_0x363e('0x3'));var fs=require('fs');var path=require(_0x363e('0x4'));var rimraf=require(_0x363e('0x5'));var config=require('../../config/environment');var attributes=require(_0x363e('0x6'));module[_0x363e('0x7')]=function(_0x138be1,_0x127895){return _0x138be1[_0x363e('0x8')]('Integration',attributes,{'tableName':_0x363e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9f79=['Integration','integrations','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','define'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x9f79,0xff));var _0x99f7=function(_0x180190,_0x525fa9){_0x180190=_0x180190-0x0;var _0xeab8db=_0x9f79[_0x180190];return _0xeab8db;};'use strict';var _=require(_0x99f7('0x0'));var util=require(_0x99f7('0x1'));var logger=require(_0x99f7('0x2'))('api');var moment=require('moment');var BPromise=require(_0x99f7('0x3'));var rp=require(_0x99f7('0x4'));var fs=require('fs');var path=require(_0x99f7('0x5'));var rimraf=require(_0x99f7('0x6'));var config=require(_0x99f7('0x7'));var attributes=require('./integration.attributes');module['exports']=function(_0x4c9bbe,_0x2478bf){return _0x4c9bbe[_0x99f7('0x8')](_0x99f7('0x9'),attributes,{'tableName':_0x99f7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/integration/integration.rpc.js b/server/api/integration/integration.rpc.js
index de84cf1..d717621 100644
--- a/server/api/integration/integration.rpc.js
+++ b/server/api/integration/integration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3cd3=['../../config/utils','../../config/logger','rpc','../../config/environment','http','request','Integration,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','catch','lodash','moment','randomstring','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3cd3,0xec));var _0x33cd=function(_0x28207e,_0x1f1d92){_0x28207e=_0x28207e-0x0;var _0x59b7b7=_0x3cd3[_0x28207e];return _0x59b7b7;};'use strict';var _=require(_0x33cd('0x0'));var util=require('util');var moment=require(_0x33cd('0x1'));var BPromise=require('bluebird');var rs=require(_0x33cd('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x33cd('0x3'))['db'];var utils=require(_0x33cd('0x4'));var logger=require(_0x33cd('0x5'))(_0x33cd('0x6'));var config=require(_0x33cd('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x33cd('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1b95bf,_0x5b316a,_0x409074){return new BPromise(function(_0x4cc1e5,_0x10f1ce){return client[_0x33cd('0x9')](_0x1b95bf,_0x409074)['then'](function(_0x3cb434){logger['info'](_0x33cd('0xa'),_0x5b316a,'request\x20sent');logger[_0x33cd('0xb')]('Integration,\x20%s,\x20%s,\x20%s',_0x5b316a,_0x33cd('0xc'),JSON[_0x33cd('0xd')](_0x3cb434));if(_0x3cb434[_0x33cd('0xe')]){if(_0x3cb434['error'][_0x33cd('0xf')]===0x1f4){logger[_0x33cd('0xe')]('Integration,\x20%s,\x20%s',_0x5b316a,_0x3cb434[_0x33cd('0xe')][_0x33cd('0x10')]);return _0x10f1ce(_0x3cb434[_0x33cd('0xe')]['message']);}logger[_0x33cd('0xe')](_0x33cd('0xa'),_0x5b316a,_0x3cb434[_0x33cd('0xe')][_0x33cd('0x10')]);return _0x4cc1e5(_0x3cb434[_0x33cd('0xe')][_0x33cd('0x10')]);}else{logger[_0x33cd('0x11')]('Integration,\x20%s,\x20%s',_0x5b316a,'request\x20sent');_0x4cc1e5(_0x3cb434[_0x33cd('0x12')][_0x33cd('0x10')]);}})[_0x33cd('0x13')](function(_0x4b56d6){logger['error']('Integration,\x20%s,\x20%s',_0x5b316a,_0x4b56d6);_0x10f1ce(_0x4b56d6);});});}
\ No newline at end of file
+var _0x8215=['../../mysqldb','../../config/utils','../../config/logger','client','request','info','request\x20sent','debug','Integration,\x20%s,\x20%s,\x20%s','error','code','message','Integration,\x20%s,\x20%s','result','util','moment','bluebird','randomstring','ioredis'];(function(_0x42fc9e,_0x1d6985){var _0xa923cc=function(_0x4fd274){while(--_0x4fd274){_0x42fc9e['push'](_0x42fc9e['shift']());}};_0xa923cc(++_0x1d6985);}(_0x8215,0x1c3));var _0x5821=function(_0x57ed05,_0x4e28b7){_0x57ed05=_0x57ed05-0x0;var _0x5c08eb=_0x8215[_0x57ed05];return _0x5c08eb;};'use strict';var _=require('lodash');var util=require(_0x5821('0x0'));var moment=require(_0x5821('0x1'));var BPromise=require(_0x5821('0x2'));var rs=require(_0x5821('0x3'));var fs=require('fs');var Redis=require(_0x5821('0x4'));var db=require(_0x5821('0x5'))['db'];var utils=require(_0x5821('0x6'));var logger=require(_0x5821('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x5821('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x852772,_0x491869,_0x51936f){return new BPromise(function(_0x1120e3,_0x3093b6){return client[_0x5821('0x9')](_0x852772,_0x51936f)['then'](function(_0x713f02){logger[_0x5821('0xa')]('Integration,\x20%s,\x20%s',_0x491869,_0x5821('0xb'));logger[_0x5821('0xc')](_0x5821('0xd'),_0x491869,_0x5821('0xb'),JSON['stringify'](_0x713f02));if(_0x713f02[_0x5821('0xe')]){if(_0x713f02[_0x5821('0xe')][_0x5821('0xf')]===0x1f4){logger[_0x5821('0xe')]('Integration,\x20%s,\x20%s',_0x491869,_0x713f02[_0x5821('0xe')][_0x5821('0x10')]);return _0x3093b6(_0x713f02[_0x5821('0xe')][_0x5821('0x10')]);}logger[_0x5821('0xe')](_0x5821('0x11'),_0x491869,_0x713f02[_0x5821('0xe')][_0x5821('0x10')]);return _0x1120e3(_0x713f02[_0x5821('0xe')]['message']);}else{logger['info'](_0x5821('0x11'),_0x491869,_0x5821('0xb'));_0x1120e3(_0x713f02[_0x5821('0x12')][_0x5821('0x10')]);}})['catch'](function(_0xe9dd94){logger[_0x5821('0xe')](_0x5821('0x11'),_0x491869,_0xe9dd94);_0x3093b6(_0xe9dd94);});});}
\ No newline at end of file
diff --git a/server/api/integrationReport/index.js b/server/api/integrationReport/index.js
index 4a4295c..d92e296 100644
--- a/server/api/integrationReport/index.js
+++ b/server/api/integrationReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xffd6=['./integrationReport.controller','isAuthenticated','get','/describe','describe','/:id','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment'];(function(_0x2207bb,_0x4fae88){var _0x43e32f=function(_0x5ba7cc){while(--_0x5ba7cc){_0x2207bb['push'](_0x2207bb['shift']());}};_0x43e32f(++_0x4fae88);}(_0xffd6,0x1d4));var _0x6ffd=function(_0x4664db,_0x1de672){_0x4664db=_0x4664db-0x0;var _0x5615b4=_0xffd6[_0x4664db];return _0x5615b4;};'use strict';var multer=require(_0x6ffd('0x0'));var util=require(_0x6ffd('0x1'));var path=require(_0x6ffd('0x2'));var timeout=require(_0x6ffd('0x3'));var express=require(_0x6ffd('0x4'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x6ffd('0x5'));var config=require(_0x6ffd('0x6'));var controller=require(_0x6ffd('0x7'));router['get']('/',auth[_0x6ffd('0x8')](),controller['index']);router[_0x6ffd('0x9')](_0x6ffd('0xa'),auth[_0x6ffd('0x8')](),controller[_0x6ffd('0xb')]);router[_0x6ffd('0x9')](_0x6ffd('0xc'),auth[_0x6ffd('0x8')](),controller['show']);router[_0x6ffd('0xd')]('/',auth['isAuthenticated'](),controller[_0x6ffd('0xe')]);router['put'](_0x6ffd('0xc'),auth[_0x6ffd('0x8')](),controller[_0x6ffd('0xf')]);router[_0x6ffd('0x10')](_0x6ffd('0xc'),auth['isAuthenticated'](),controller[_0x6ffd('0x11')]);module[_0x6ffd('0x12')]=router;
\ No newline at end of file
+var _0x24ab=['isAuthenticated','index','/describe','describe','/:id','show','post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./integrationReport.controller','get'];(function(_0x1c4223,_0x4f3ee7){var _0x12b2e8=function(_0x85f242){while(--_0x85f242){_0x1c4223['push'](_0x1c4223['shift']());}};_0x12b2e8(++_0x4f3ee7);}(_0x24ab,0x1c4));var _0xb24a=function(_0x47c195,_0x6304ba){_0x47c195=_0x47c195-0x0;var _0x3f6afb=_0x24ab[_0x47c195];return _0x3f6afb;};'use strict';var multer=require(_0xb24a('0x0'));var util=require(_0xb24a('0x1'));var path=require(_0xb24a('0x2'));var timeout=require(_0xb24a('0x3'));var express=require(_0xb24a('0x4'));var router=express[_0xb24a('0x5')]();var auth=require(_0xb24a('0x6'));var interaction=require(_0xb24a('0x7'));var config=require('../../config/environment');var controller=require(_0xb24a('0x8'));router[_0xb24a('0x9')]('/',auth[_0xb24a('0xa')](),controller[_0xb24a('0xb')]);router[_0xb24a('0x9')](_0xb24a('0xc'),auth[_0xb24a('0xa')](),controller[_0xb24a('0xd')]);router['get'](_0xb24a('0xe'),auth[_0xb24a('0xa')](),controller[_0xb24a('0xf')]);router[_0xb24a('0x10')]('/',auth['isAuthenticated'](),controller[_0xb24a('0x11')]);router[_0xb24a('0x12')]('/:id',auth[_0xb24a('0xa')](),controller['update']);router[_0xb24a('0x13')](_0xb24a('0xe'),auth[_0xb24a('0xa')](),controller[_0xb24a('0x14')]);module[_0xb24a('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.attributes.js b/server/api/integrationReport/integrationReport.attributes.js
index bb2b9cf..b0ebe03 100644
--- a/server/api/integrationReport/integrationReport.attributes.js
+++ b/server/api/integrationReport/integrationReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8197=['BOOLEAN','TEXT','SENT','sequelize','exports','STRING','INTEGER','DATE'];(function(_0x39096d,_0x51f8a0){var _0x13da4f=function(_0x11e6b2){while(--_0x11e6b2){_0x39096d['push'](_0x39096d['shift']());}};_0x13da4f(++_0x51f8a0);}(_0x8197,0x15b));var _0x7819=function(_0x41276b,_0xd000fe){_0x41276b=_0x41276b-0x0;var _0x115a2d=_0x8197[_0x41276b];return _0x115a2d;};'use strict';var Sequelize=require(_0x7819('0x0'));module[_0x7819('0x1')]={'integration':{'type':Sequelize[_0x7819('0x2')]},'eventChannel':{'type':Sequelize[_0x7819('0x2')]},'exitStatus':{'type':Sequelize[_0x7819('0x2')]},'ticketId':{'type':Sequelize['STRING']},'integrationId':{'type':Sequelize[_0x7819('0x3')]},'contacts':{'type':Sequelize[_0x7819('0x2')]},'uniqueid':{'type':Sequelize[_0x7819('0x2')]},'calleridnum':{'type':Sequelize[_0x7819('0x2')]},'calleridname':{'type':Sequelize[_0x7819('0x2')]},'queue':{'type':Sequelize[_0x7819('0x2')]},'interface':{'type':Sequelize[_0x7819('0x2')]},'membername':{'type':Sequelize['STRING']},'agentcalledAt':{'type':Sequelize[_0x7819('0x4')]},'agentconnectAt':{'type':Sequelize[_0x7819('0x4')]},'holdtime':{'type':Sequelize[_0x7819('0x3')]},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0x7819('0x4')]},'talktime':{'type':Sequelize[_0x7819('0x3')]},'agentacw':{'type':Sequelize[_0x7819('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x7819('0x3')]},'reason':{'type':Sequelize[_0x7819('0x2')]},'agentringnoanswer':{'type':Sequelize[_0x7819('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0x7819('0x4')]},'agentdump':{'type':Sequelize[_0x7819('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0x7819('0x4')]},'lastevent':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x7819('0x2')]},'channelstate':{'type':Sequelize[_0x7819('0x3')]},'channelstatedesc':{'type':Sequelize[_0x7819('0x2')]},'connectedlinenum':{'type':Sequelize[_0x7819('0x2')]},'connectedlinename':{'type':Sequelize[_0x7819('0x2')]},'language':{'type':Sequelize[_0x7819('0x2')]},'accountcode':{'type':Sequelize[_0x7819('0x2')]},'context':{'type':Sequelize[_0x7819('0x2')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x7819('0x2')]},'destchannel':{'type':Sequelize[_0x7819('0x2')]},'destchannelstate':{'type':Sequelize[_0x7819('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0x7819('0x2')]},'destcalleridnum':{'type':Sequelize[_0x7819('0x2')]},'destcalleridname':{'type':Sequelize[_0x7819('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0x7819('0x2')]},'destconnectedlinename':{'type':Sequelize[_0x7819('0x2')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0x7819('0x2')]},'destcontext':{'type':Sequelize[_0x7819('0x2')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0x7819('0x2')]},'destuniqueid':{'type':Sequelize[_0x7819('0x2')]},'messageId':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0x7819('0x2')]},'subject':{'type':Sequelize['STRING']},'from':{'type':Sequelize[_0x7819('0x2')]},'to':{'type':Sequelize[_0x7819('0x2')]},'cc':{'type':Sequelize[_0x7819('0x2')]},'attachment':{'type':Sequelize['TEXT']},'html':{'type':Sequelize[_0x7819('0x6')]},'text':{'type':Sequelize['TEXT']},'status':{'type':Sequelize['ENUM'](_0x7819('0x7'),'SENDING','RECEIVED','FAILED')},'url':{'type':Sequelize[_0x7819('0x2')]},'app':{'type':Sequelize[_0x7819('0x2')]},'appdata':{'type':Sequelize[_0x7819('0x2')]},'projectId':{'type':Sequelize[_0x7819('0x3')]}};
\ No newline at end of file
+var _0x5bfd=['ENUM','SENT','RECEIVED','sequelize','exports','STRING','INTEGER','DATE','BOOLEAN','TEXT'];(function(_0x3a9d77,_0xdc466){var _0x130f80=function(_0x740c4a){while(--_0x740c4a){_0x3a9d77['push'](_0x3a9d77['shift']());}};_0x130f80(++_0xdc466);}(_0x5bfd,0xcb));var _0xd5bf=function(_0x4f6b25,_0x1c8224){_0x4f6b25=_0x4f6b25-0x0;var _0x23c392=_0x5bfd[_0x4f6b25];return _0x23c392;};'use strict';var Sequelize=require(_0xd5bf('0x0'));module[_0xd5bf('0x1')]={'integration':{'type':Sequelize[_0xd5bf('0x2')]},'eventChannel':{'type':Sequelize[_0xd5bf('0x2')]},'exitStatus':{'type':Sequelize[_0xd5bf('0x2')]},'ticketId':{'type':Sequelize[_0xd5bf('0x2')]},'integrationId':{'type':Sequelize[_0xd5bf('0x3')]},'contacts':{'type':Sequelize[_0xd5bf('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xd5bf('0x2')]},'calleridname':{'type':Sequelize[_0xd5bf('0x2')]},'queue':{'type':Sequelize[_0xd5bf('0x2')]},'interface':{'type':Sequelize[_0xd5bf('0x2')]},'membername':{'type':Sequelize[_0xd5bf('0x2')]},'agentcalledAt':{'type':Sequelize[_0xd5bf('0x4')]},'agentconnectAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize['INTEGER']},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0xd5bf('0x4')]},'talktime':{'type':Sequelize[_0xd5bf('0x3')]},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xd5bf('0x3')]},'reason':{'type':Sequelize[_0xd5bf('0x2')]},'agentringnoanswer':{'type':Sequelize[_0xd5bf('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize['DATE']},'agentdump':{'type':Sequelize[_0xd5bf('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0xd5bf('0x4')]},'lastevent':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xd5bf('0x2')]},'channelstate':{'type':Sequelize[_0xd5bf('0x3')]},'channelstatedesc':{'type':Sequelize[_0xd5bf('0x2')]},'connectedlinenum':{'type':Sequelize[_0xd5bf('0x2')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xd5bf('0x2')]},'context':{'type':Sequelize[_0xd5bf('0x2')]},'exten':{'type':Sequelize[_0xd5bf('0x2')]},'priority':{'type':Sequelize[_0xd5bf('0x2')]},'destchannel':{'type':Sequelize['STRING']},'destchannelstate':{'type':Sequelize[_0xd5bf('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0xd5bf('0x2')]},'destcalleridnum':{'type':Sequelize[_0xd5bf('0x2')]},'destcalleridname':{'type':Sequelize[_0xd5bf('0x2')]},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize[_0xd5bf('0x2')]},'destlanguage':{'type':Sequelize[_0xd5bf('0x2')]},'destaccountcode':{'type':Sequelize[_0xd5bf('0x2')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0xd5bf('0x2')]},'destuniqueid':{'type':Sequelize[_0xd5bf('0x2')]},'messageId':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0xd5bf('0x2')]},'subject':{'type':Sequelize[_0xd5bf('0x2')]},'from':{'type':Sequelize[_0xd5bf('0x2')]},'to':{'type':Sequelize[_0xd5bf('0x2')]},'cc':{'type':Sequelize['STRING']},'attachment':{'type':Sequelize[_0xd5bf('0x6')]},'html':{'type':Sequelize[_0xd5bf('0x6')]},'text':{'type':Sequelize['TEXT']},'status':{'type':Sequelize[_0xd5bf('0x7')](_0xd5bf('0x8'),'SENDING',_0xd5bf('0x9'),'FAILED')},'url':{'type':Sequelize['STRING']},'app':{'type':Sequelize[_0xd5bf('0x2')]},'appdata':{'type':Sequelize['STRING']},'projectId':{'type':Sequelize[_0xd5bf('0x3')]}};
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.controller.js b/server/api/integrationReport/integrationReport.controller.js
index 8a46b8f..de59669 100644
--- a/server/api/integrationReport/integrationReport.controller.js
+++ b/server/api/integrationReport/integrationReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0c2b=['hasOwnProperty','nolimit','limit','order','sort','where','map','type','key','VIRTUAL','filter','merge','includeAll','include','rows','catch','show','params','options','create','body','update','find','describe','html-pdf','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','then','destroy','error','stack','name','index','IntegrationReport','rawAttributes','keys','query','filters','intersection','model','fields','attributes','length'];(function(_0x2b537b,_0x29b341){var _0x1c1482=function(_0x346b5d){while(--_0x346b5d){_0x2b537b['push'](_0x2b537b['shift']());}};_0x1c1482(++_0x29b341);}(_0x0c2b,0x134));var _0xb0c2=function(_0x46aa36,_0x2d93fb){_0x46aa36=_0x46aa36-0x0;var _0x1f654e=_0x0c2b[_0x46aa36];return _0x1f654e;};'use strict';var pdf=require(_0xb0c2('0x0'));var emlformat=require(_0xb0c2('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xb0c2('0x2'));var rp=require('request-promise');var moment=require(_0xb0c2('0x3'));var BPromise=require(_0xb0c2('0x4'));var Mustache=require(_0xb0c2('0x5'));var util=require(_0xb0c2('0x6'));var path=require(_0xb0c2('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xb0c2('0x8'));var fs=require('fs');var _=require(_0xb0c2('0x9'));var squel=require(_0xb0c2('0xa'));var crypto=require(_0xb0c2('0xb'));var jsforce=require(_0xb0c2('0xc'));var deskjs=require(_0xb0c2('0xd'));var toCsv=require(_0xb0c2('0xe'));var querystring=require(_0xb0c2('0xf'));var Papa=require('papaparse');var Redis=require(_0xb0c2('0x10'));var authService=require(_0xb0c2('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xb0c2('0x12'));var utils=require('../../config/utils');var config=require(_0xb0c2('0x13'));var db=require(_0xb0c2('0x14'))['db'];function respondWithStatusCode(_0x52fe1b,_0xec8e2c){_0xec8e2c=_0xec8e2c||0xcc;return function(_0x299e44){if(_0x299e44){return _0x52fe1b[_0xb0c2('0x15')](_0xec8e2c);}return _0x52fe1b[_0xb0c2('0x16')](_0xec8e2c)[_0xb0c2('0x17')]();};}function respondWithResult(_0x29b560,_0x31ecd8){_0x31ecd8=_0x31ecd8||0xc8;return function(_0x1bd95a){if(_0x1bd95a){return _0x29b560[_0xb0c2('0x16')](_0x31ecd8)[_0xb0c2('0x18')](_0x1bd95a);}};}function respondWithFilteredResult(_0x382d9c,_0x4edb23){return function(_0x465efc){if(_0x465efc){var _0x15214f=_0x465efc[_0xb0c2('0x19')],_0x354e7b=_0x4edb23[_0xb0c2('0x1a')],_0x5ccb2a=_0x4edb23['offset']+_0x4edb23['limit'],_0x572b19;if(_0x5ccb2a>=_0x15214f){_0x5ccb2a=_0x15214f;_0x572b19=0xc8;}else{_0x572b19=0xce;}_0x382d9c[_0xb0c2('0x16')](_0x572b19);return _0x382d9c[_0xb0c2('0x1b')](_0xb0c2('0x1c'),_0x354e7b+'-'+_0x5ccb2a+'/'+_0x15214f)[_0xb0c2('0x18')](_0x465efc);}return null;};}function patchUpdates(_0x485954){return function(_0x3f1076){try{jsonpatch[_0xb0c2('0x1d')](_0x3f1076,_0x485954,!![]);}catch(_0x2c177b){return BPromise[_0xb0c2('0x1e')](_0x2c177b);}return _0x3f1076['save']();};}function saveUpdates(_0x6177eb,_0x45fd70){return function(_0x8e6b3a){if(_0x8e6b3a){return _0x8e6b3a['update'](_0x6177eb)[_0xb0c2('0x1f')](function(_0x49cc6a){return _0x49cc6a;});}return null;};}function removeEntity(_0x944005,_0x53d879){return function(_0x1e8810){if(_0x1e8810){return _0x1e8810[_0xb0c2('0x20')]()[_0xb0c2('0x1f')](function(){_0x944005['status'](0xcc)[_0xb0c2('0x17')]();});}};}function handleEntityNotFound(_0x13176f,_0x11ec98){return function(_0x1a5ca6){if(!_0x1a5ca6){_0x13176f[_0xb0c2('0x15')](0x194);}return _0x1a5ca6;};}function handleError(_0x1c3a94,_0x56332d){_0x56332d=_0x56332d||0x1f4;return function(_0x4b28f){logger[_0xb0c2('0x21')](_0x4b28f[_0xb0c2('0x22')]);if(_0x4b28f[_0xb0c2('0x23')]){delete _0x4b28f[_0xb0c2('0x23')];}_0x1c3a94[_0xb0c2('0x16')](_0x56332d)['send'](_0x4b28f);};}exports[_0xb0c2('0x24')]=function(_0x232fca,_0x4f754c){var _0x1b92c7={},_0x2d7c32={},_0x46a09d={'count':0x0,'rows':[]};var _0x1766f7=db[_0xb0c2('0x25')][_0xb0c2('0x26')];_0x2d7c32['model']=_[_0xb0c2('0x27')](_0x1766f7);_0x2d7c32[_0xb0c2('0x28')]=_['keys'](_0x232fca[_0xb0c2('0x28')]);_0x2d7c32[_0xb0c2('0x29')]=_[_0xb0c2('0x2a')](_0x2d7c32[_0xb0c2('0x2b')],_0x2d7c32[_0xb0c2('0x28')]);_0x1b92c7['attributes']=_[_0xb0c2('0x2a')](_0x2d7c32[_0xb0c2('0x2b')],qs['fields'](_0x232fca[_0xb0c2('0x28')][_0xb0c2('0x2c')]));_0x1b92c7[_0xb0c2('0x2d')]=_0x1b92c7[_0xb0c2('0x2d')][_0xb0c2('0x2e')]?_0x1b92c7[_0xb0c2('0x2d')]:_0x2d7c32['model'];if(!_0x232fca[_0xb0c2('0x28')][_0xb0c2('0x2f')](_0xb0c2('0x30'))){_0x1b92c7[_0xb0c2('0x31')]=qs[_0xb0c2('0x31')](_0x232fca[_0xb0c2('0x28')][_0xb0c2('0x31')]);_0x1b92c7[_0xb0c2('0x1a')]=qs[_0xb0c2('0x1a')](_0x232fca[_0xb0c2('0x28')]['offset']);}_0x1b92c7[_0xb0c2('0x32')]=qs[_0xb0c2('0x33')](_0x232fca[_0xb0c2('0x28')][_0xb0c2('0x33')]);_0x1b92c7['where']=qs[_0xb0c2('0x29')](_['pick'](_0x232fca[_0xb0c2('0x28')],_0x2d7c32[_0xb0c2('0x29')]));if(_0x232fca[_0xb0c2('0x28')]['filter']){_0x1b92c7['where']=_['merge'](_0x1b92c7[_0xb0c2('0x34')],{'$or':_[_0xb0c2('0x35')](_0x1766f7,function(_0x2b0f94){if(_0x2b0f94[_0xb0c2('0x36')][_0xb0c2('0x37')]!==_0xb0c2('0x38')){var _0x23df59={};_0x23df59[_0x2b0f94['field']]={'$like':'%'+_0x232fca[_0xb0c2('0x28')][_0xb0c2('0x39')]+'%'};return _0x23df59;}})});}_0x1b92c7=_[_0xb0c2('0x3a')]({},_0x1b92c7,_0x232fca['options']);var _0xe28144={'where':_0x1b92c7[_0xb0c2('0x34')]};return db['IntegrationReport'][_0xb0c2('0x19')](_0xe28144)[_0xb0c2('0x1f')](function(_0xc1c890){_0x46a09d[_0xb0c2('0x19')]=_0xc1c890;if(_0x232fca['query'][_0xb0c2('0x3b')]){_0x1b92c7[_0xb0c2('0x3c')]=[{'all':!![]}];}return db[_0xb0c2('0x25')]['findAll'](_0x1b92c7);})[_0xb0c2('0x1f')](function(_0x397033){_0x46a09d[_0xb0c2('0x3d')]=_0x397033;return _0x46a09d;})[_0xb0c2('0x1f')](respondWithFilteredResult(_0x4f754c,_0x1b92c7))[_0xb0c2('0x3e')](handleError(_0x4f754c,null));};exports[_0xb0c2('0x3f')]=function(_0x3d2e92,_0x196dfe){var _0xc43af6={'raw':![],'where':{'id':_0x3d2e92[_0xb0c2('0x40')]['id']}},_0x378c46={};_0x378c46['model']=_[_0xb0c2('0x27')](db[_0xb0c2('0x25')][_0xb0c2('0x26')]);_0x378c46[_0xb0c2('0x28')]=_[_0xb0c2('0x27')](_0x3d2e92[_0xb0c2('0x28')]);_0x378c46['filters']=_['intersection'](_0x378c46[_0xb0c2('0x2b')],_0x378c46[_0xb0c2('0x28')]);_0xc43af6['attributes']=_[_0xb0c2('0x2a')](_0x378c46[_0xb0c2('0x2b')],qs[_0xb0c2('0x2c')](_0x3d2e92[_0xb0c2('0x28')][_0xb0c2('0x2c')]));_0xc43af6[_0xb0c2('0x2d')]=_0xc43af6[_0xb0c2('0x2d')]['length']?_0xc43af6[_0xb0c2('0x2d')]:_0x378c46['model'];if(_0x3d2e92[_0xb0c2('0x28')][_0xb0c2('0x3b')]){_0xc43af6[_0xb0c2('0x3c')]=[{'all':!![]}];}_0xc43af6=_[_0xb0c2('0x3a')]({},_0xc43af6,_0x3d2e92[_0xb0c2('0x41')]);return db['IntegrationReport']['find'](_0xc43af6)[_0xb0c2('0x1f')](handleEntityNotFound(_0x196dfe,null))[_0xb0c2('0x1f')](respondWithResult(_0x196dfe,null))[_0xb0c2('0x3e')](handleError(_0x196dfe,null));};exports['create']=function(_0x3e1453,_0x1b0fa3){return db['IntegrationReport'][_0xb0c2('0x42')](_0x3e1453[_0xb0c2('0x43')],{})[_0xb0c2('0x1f')](respondWithResult(_0x1b0fa3,0xc9))[_0xb0c2('0x3e')](handleError(_0x1b0fa3,null));};exports[_0xb0c2('0x44')]=function(_0x17a403,_0x31d36e){if(_0x17a403[_0xb0c2('0x43')]['id']){delete _0x17a403[_0xb0c2('0x43')]['id'];}return db[_0xb0c2('0x25')]['find']({'where':{'id':_0x17a403[_0xb0c2('0x40')]['id']}})[_0xb0c2('0x1f')](handleEntityNotFound(_0x31d36e,null))[_0xb0c2('0x1f')](saveUpdates(_0x17a403[_0xb0c2('0x43')],null))['then'](respondWithResult(_0x31d36e,null))[_0xb0c2('0x3e')](handleError(_0x31d36e,null));};exports[_0xb0c2('0x20')]=function(_0x21ff17,_0x538f1c){return db[_0xb0c2('0x25')][_0xb0c2('0x45')]({'where':{'id':_0x21ff17[_0xb0c2('0x40')]['id']}})['then'](handleEntityNotFound(_0x538f1c,null))[_0xb0c2('0x1f')](removeEntity(_0x538f1c,null))[_0xb0c2('0x3e')](handleError(_0x538f1c,null));};exports[_0xb0c2('0x46')]=function(_0x18d743,_0x5edd66){return db[_0xb0c2('0x25')][_0xb0c2('0x46')]()['then'](respondWithResult(_0x5edd66,null))[_0xb0c2('0x3e')](handleError(_0x5edd66,null));};
\ No newline at end of file
+var _0xa1db=['order','sort','pick','filter','where','type','key','VIRTUAL','field','merge','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','index','IntegrationReport','rawAttributes','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty'];(function(_0x2eac4f,_0x5173f9){var _0x58f73b=function(_0x529f28){while(--_0x529f28){_0x2eac4f['push'](_0x2eac4f['shift']());}};_0x58f73b(++_0x5173f9);}(_0xa1db,0xb0));var _0xba1d=function(_0x5207a2,_0x316913){_0x5207a2=_0x5207a2-0x0;var _0x314716=_0xa1db[_0x5207a2];return _0x314716;};'use strict';var pdf=require(_0xba1d('0x0'));var emlformat=require(_0xba1d('0x1'));var rimraf=require(_0xba1d('0x2'));var zipdir=require(_0xba1d('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xba1d('0x4'));var BPromise=require(_0xba1d('0x5'));var Mustache=require('mustache');var util=require(_0xba1d('0x6'));var path=require(_0xba1d('0x7'));var sox=require(_0xba1d('0x8'));var csv=require(_0xba1d('0x9'));var ejs=require(_0xba1d('0xa'));var fs=require('fs');var _=require(_0xba1d('0xb'));var squel=require(_0xba1d('0xc'));var crypto=require(_0xba1d('0xd'));var jsforce=require(_0xba1d('0xe'));var deskjs=require(_0xba1d('0xf'));var toCsv=require(_0xba1d('0x9'));var querystring=require(_0xba1d('0x10'));var Papa=require(_0xba1d('0x11'));var Redis=require('ioredis');var authService=require(_0xba1d('0x12'));var qs=require(_0xba1d('0x13'));var hardwareService=require(_0xba1d('0x14'));var logger=require(_0xba1d('0x15'))(_0xba1d('0x16'));var utils=require(_0xba1d('0x17'));var config=require(_0xba1d('0x18'));var db=require(_0xba1d('0x19'))['db'];function respondWithStatusCode(_0x5b56c9,_0x19b479){_0x19b479=_0x19b479||0xcc;return function(_0x8ea64){if(_0x8ea64){return _0x5b56c9[_0xba1d('0x1a')](_0x19b479);}return _0x5b56c9[_0xba1d('0x1b')](_0x19b479)[_0xba1d('0x1c')]();};}function respondWithResult(_0x539c61,_0x5780cf){_0x5780cf=_0x5780cf||0xc8;return function(_0x2db5ae){if(_0x2db5ae){return _0x539c61[_0xba1d('0x1b')](_0x5780cf)[_0xba1d('0x1d')](_0x2db5ae);}};}function respondWithFilteredResult(_0xfce76d,_0x6cb53f){return function(_0x126602){if(_0x126602){var _0x5da25d=_0x126602[_0xba1d('0x1e')],_0x47f4d7=_0x6cb53f['offset'],_0x2c1dcc=_0x6cb53f[_0xba1d('0x1f')]+_0x6cb53f[_0xba1d('0x20')],_0x24dfc5;if(_0x2c1dcc>=_0x5da25d){_0x2c1dcc=_0x5da25d;_0x24dfc5=0xc8;}else{_0x24dfc5=0xce;}_0xfce76d[_0xba1d('0x1b')](_0x24dfc5);return _0xfce76d[_0xba1d('0x21')](_0xba1d('0x22'),_0x47f4d7+'-'+_0x2c1dcc+'/'+_0x5da25d)[_0xba1d('0x1d')](_0x126602);}return null;};}function patchUpdates(_0x575093){return function(_0x3110c2){try{jsonpatch[_0xba1d('0x23')](_0x3110c2,_0x575093,!![]);}catch(_0x34149b){return BPromise[_0xba1d('0x24')](_0x34149b);}return _0x3110c2[_0xba1d('0x25')]();};}function saveUpdates(_0xb35743,_0x5cac0c){return function(_0xf438ab){if(_0xf438ab){return _0xf438ab[_0xba1d('0x26')](_0xb35743)[_0xba1d('0x27')](function(_0x39b8de){return _0x39b8de;});}return null;};}function removeEntity(_0x107a85,_0x3225ee){return function(_0x1b02d6){if(_0x1b02d6){return _0x1b02d6[_0xba1d('0x28')]()[_0xba1d('0x27')](function(){_0x107a85['status'](0xcc)[_0xba1d('0x1c')]();});}};}function handleEntityNotFound(_0x9b939b,_0x44eb3a){return function(_0x588839){if(!_0x588839){_0x9b939b[_0xba1d('0x1a')](0x194);}return _0x588839;};}function handleError(_0x31511b,_0x19c062){_0x19c062=_0x19c062||0x1f4;return function(_0x3fc11d){logger[_0xba1d('0x29')](_0x3fc11d[_0xba1d('0x2a')]);if(_0x3fc11d[_0xba1d('0x2b')]){delete _0x3fc11d[_0xba1d('0x2b')];}_0x31511b['status'](_0x19c062)['send'](_0x3fc11d);};}exports[_0xba1d('0x2c')]=function(_0x5c0e7b,_0x1bfd2d){var _0x479593={},_0x507949={},_0x51750a={'count':0x0,'rows':[]};var _0x351373=db[_0xba1d('0x2d')][_0xba1d('0x2e')];_0x507949[_0xba1d('0x2f')]=_[_0xba1d('0x30')](_0x351373);_0x507949[_0xba1d('0x31')]=_[_0xba1d('0x30')](_0x5c0e7b[_0xba1d('0x31')]);_0x507949[_0xba1d('0x32')]=_[_0xba1d('0x33')](_0x507949[_0xba1d('0x2f')],_0x507949[_0xba1d('0x31')]);_0x479593['attributes']=_[_0xba1d('0x33')](_0x507949[_0xba1d('0x2f')],qs[_0xba1d('0x34')](_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x34')]));_0x479593[_0xba1d('0x35')]=_0x479593[_0xba1d('0x35')]['length']?_0x479593[_0xba1d('0x35')]:_0x507949['model'];if(!_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x36')]('nolimit')){_0x479593['limit']=qs['limit'](_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x20')]);_0x479593[_0xba1d('0x1f')]=qs[_0xba1d('0x1f')](_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x1f')]);}_0x479593[_0xba1d('0x37')]=qs['sort'](_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x38')]);_0x479593['where']=qs[_0xba1d('0x32')](_[_0xba1d('0x39')](_0x5c0e7b[_0xba1d('0x31')],_0x507949[_0xba1d('0x32')]));if(_0x5c0e7b['query'][_0xba1d('0x3a')]){_0x479593[_0xba1d('0x3b')]=_['merge'](_0x479593[_0xba1d('0x3b')],{'$or':_['map'](_0x351373,function(_0x445417){if(_0x445417[_0xba1d('0x3c')][_0xba1d('0x3d')]!==_0xba1d('0x3e')){var _0x552e4f={};_0x552e4f[_0x445417[_0xba1d('0x3f')]]={'$like':'%'+_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x3a')]+'%'};return _0x552e4f;}})});}_0x479593=_[_0xba1d('0x40')]({},_0x479593,_0x5c0e7b[_0xba1d('0x41')]);var _0x1fe793={'where':_0x479593['where']};return db[_0xba1d('0x2d')]['count'](_0x1fe793)[_0xba1d('0x27')](function(_0x3e09a1){_0x51750a['count']=_0x3e09a1;if(_0x5c0e7b[_0xba1d('0x31')][_0xba1d('0x42')]){_0x479593[_0xba1d('0x43')]=[{'all':!![]}];}return db['IntegrationReport'][_0xba1d('0x44')](_0x479593);})[_0xba1d('0x27')](function(_0x62dc90){_0x51750a[_0xba1d('0x45')]=_0x62dc90;return _0x51750a;})['then'](respondWithFilteredResult(_0x1bfd2d,_0x479593))['catch'](handleError(_0x1bfd2d,null));};exports[_0xba1d('0x46')]=function(_0x50041e,_0x1aef5d){var _0x57b305={'raw':![],'where':{'id':_0x50041e[_0xba1d('0x47')]['id']}},_0x18cc0b={};_0x18cc0b[_0xba1d('0x2f')]=_['keys'](db['IntegrationReport'][_0xba1d('0x2e')]);_0x18cc0b[_0xba1d('0x31')]=_[_0xba1d('0x30')](_0x50041e[_0xba1d('0x31')]);_0x18cc0b['filters']=_[_0xba1d('0x33')](_0x18cc0b[_0xba1d('0x2f')],_0x18cc0b[_0xba1d('0x31')]);_0x57b305[_0xba1d('0x35')]=_['intersection'](_0x18cc0b[_0xba1d('0x2f')],qs[_0xba1d('0x34')](_0x50041e[_0xba1d('0x31')][_0xba1d('0x34')]));_0x57b305[_0xba1d('0x35')]=_0x57b305['attributes']['length']?_0x57b305[_0xba1d('0x35')]:_0x18cc0b[_0xba1d('0x2f')];if(_0x50041e[_0xba1d('0x31')][_0xba1d('0x42')]){_0x57b305[_0xba1d('0x43')]=[{'all':!![]}];}_0x57b305=_[_0xba1d('0x40')]({},_0x57b305,_0x50041e[_0xba1d('0x41')]);return db['IntegrationReport'][_0xba1d('0x48')](_0x57b305)[_0xba1d('0x27')](handleEntityNotFound(_0x1aef5d,null))['then'](respondWithResult(_0x1aef5d,null))[_0xba1d('0x49')](handleError(_0x1aef5d,null));};exports[_0xba1d('0x4a')]=function(_0xdb8d06,_0x23e2de){return db[_0xba1d('0x2d')]['create'](_0xdb8d06['body'],{})[_0xba1d('0x27')](respondWithResult(_0x23e2de,0xc9))[_0xba1d('0x49')](handleError(_0x23e2de,null));};exports['update']=function(_0x575ab1,_0x48171e){if(_0x575ab1[_0xba1d('0x4b')]['id']){delete _0x575ab1[_0xba1d('0x4b')]['id'];}return db['IntegrationReport']['find']({'where':{'id':_0x575ab1['params']['id']}})[_0xba1d('0x27')](handleEntityNotFound(_0x48171e,null))[_0xba1d('0x27')](saveUpdates(_0x575ab1[_0xba1d('0x4b')],null))[_0xba1d('0x27')](respondWithResult(_0x48171e,null))[_0xba1d('0x49')](handleError(_0x48171e,null));};exports[_0xba1d('0x28')]=function(_0x3e824a,_0x4b2cef){return db[_0xba1d('0x2d')][_0xba1d('0x48')]({'where':{'id':_0x3e824a[_0xba1d('0x47')]['id']}})[_0xba1d('0x27')](handleEntityNotFound(_0x4b2cef,null))[_0xba1d('0x27')](removeEntity(_0x4b2cef,null))[_0xba1d('0x49')](handleError(_0x4b2cef,null));};exports[_0xba1d('0x4c')]=function(_0x4073ef,_0x580688){return db[_0xba1d('0x2d')][_0xba1d('0x4c')]()[_0xba1d('0x27')](respondWithResult(_0x580688,null))['catch'](handleError(_0x580688,null));};
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.model.js b/server/api/integrationReport/integrationReport.model.js
index b229fe1..8592132 100644
--- a/server/api/integrationReport/integrationReport.model.js
+++ b/server/api/integrationReport/integrationReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x885a=['util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./integrationReport.attributes','exports','define','IntegrationReport'];(function(_0x1beef3,_0x57c4b8){var _0x5af964=function(_0x36f463){while(--_0x36f463){_0x1beef3['push'](_0x1beef3['shift']());}};_0x5af964(++_0x57c4b8);}(_0x885a,0x180));var _0xa885=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x885a[_0x17d9e3];return _0x14192d;};'use strict';var _=require('lodash');var util=require(_0xa885('0x0'));var logger=require(_0xa885('0x1'))(_0xa885('0x2'));var moment=require(_0xa885('0x3'));var BPromise=require('bluebird');var rp=require(_0xa885('0x4'));var fs=require('fs');var path=require(_0xa885('0x5'));var rimraf=require(_0xa885('0x6'));var config=require(_0xa885('0x7'));var attributes=require(_0xa885('0x8'));module[_0xa885('0x9')]=function(_0x5dfd7e,_0x7ac6bd){return _0x5dfd7e[_0xa885('0xa')](_0xa885('0xb'),attributes,{'tableName':'report_integration','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x56e7=['define','IntegrationReport','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./integrationReport.attributes'];(function(_0x153b93,_0x111ba3){var _0x11d8b2=function(_0x1e3e33){while(--_0x1e3e33){_0x153b93['push'](_0x153b93['shift']());}};_0x11d8b2(++_0x111ba3);}(_0x56e7,0x7b));var _0x756e=function(_0x55c28c,_0x446d6c){_0x55c28c=_0x55c28c-0x0;var _0x2ca90a=_0x56e7[_0x55c28c];return _0x2ca90a;};'use strict';var _=require('lodash');var util=require(_0x756e('0x0'));var logger=require(_0x756e('0x1'))('api');var moment=require(_0x756e('0x2'));var BPromise=require(_0x756e('0x3'));var rp=require(_0x756e('0x4'));var fs=require('fs');var path=require(_0x756e('0x5'));var rimraf=require(_0x756e('0x6'));var config=require(_0x756e('0x7'));var attributes=require(_0x756e('0x8'));module['exports']=function(_0x3b3b8f,_0x404189){return _0x3b3b8f[_0x756e('0x9')](_0x756e('0xa'),attributes,{'tableName':'report_integration','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.rpc.js b/server/api/integrationReport/integrationReport.rpc.js
index b3f6fa3..b4d825a 100644
--- a/server/api/integrationReport/integrationReport.rpc.js
+++ b/server/api/integrationReport/integrationReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x946a=['../../config/logger','rpc','../../config/environment','http','info','IntegrationReport,\x20%s,\x20%s','request\x20sent','debug','error','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3393de,_0x166f6f){var _0x499c46=function(_0x5828b6){while(--_0x5828b6){_0x3393de['push'](_0x3393de['shift']());}};_0x499c46(++_0x166f6f);}(_0x946a,0x12b));var _0xa946=function(_0x5ce1b8,_0x27ee33){_0x5ce1b8=_0x5ce1b8-0x0;var _0xe2c97d=_0x946a[_0x5ce1b8];return _0xe2c97d;};'use strict';var _=require('lodash');var util=require(_0xa946('0x0'));var moment=require(_0xa946('0x1'));var BPromise=require(_0xa946('0x2'));var rs=require(_0xa946('0x3'));var fs=require('fs');var Redis=require(_0xa946('0x4'));var db=require(_0xa946('0x5'))['db'];var utils=require(_0xa946('0x6'));var logger=require(_0xa946('0x7'))(_0xa946('0x8'));var config=require(_0xa946('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa946('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x7a5a05,_0x378702,_0x51fd80){return new BPromise(function(_0x481230,_0x15b946){return client['request'](_0x7a5a05,_0x51fd80)['then'](function(_0x241429){logger[_0xa946('0xb')](_0xa946('0xc'),_0x378702,_0xa946('0xd'));logger[_0xa946('0xe')]('IntegrationReport,\x20%s,\x20%s,\x20%s',_0x378702,_0xa946('0xd'),JSON['stringify'](_0x241429));if(_0x241429[_0xa946('0xf')]){if(_0x241429['error']['code']===0x1f4){logger[_0xa946('0xf')](_0xa946('0xc'),_0x378702,_0x241429[_0xa946('0xf')]['message']);return _0x15b946(_0x241429[_0xa946('0xf')][_0xa946('0x10')]);}logger[_0xa946('0xf')]('IntegrationReport,\x20%s,\x20%s',_0x378702,_0x241429[_0xa946('0xf')][_0xa946('0x10')]);return _0x481230(_0x241429[_0xa946('0xf')][_0xa946('0x10')]);}else{logger[_0xa946('0xb')]('IntegrationReport,\x20%s,\x20%s',_0x378702,'request\x20sent');_0x481230(_0x241429['result']['message']);}})[_0xa946('0x11')](function(_0x355fc6){logger[_0xa946('0xf')](_0xa946('0xc'),_0x378702,_0x355fc6);_0x15b946(_0x355fc6);});});}
\ No newline at end of file
+var _0x916c=['../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','IntegrationReport,\x20%s,\x20%s','request\x20sent','IntegrationReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x5cb5fc,_0x6cdda3){var _0x4b6fab=function(_0x353db1){while(--_0x353db1){_0x5cb5fc['push'](_0x5cb5fc['shift']());}};_0x4b6fab(++_0x6cdda3);}(_0x916c,0x19c));var _0xc916=function(_0x58175c,_0x2d9373){_0x58175c=_0x58175c-0x0;var _0x55b88f=_0x916c[_0x58175c];return _0x55b88f;};'use strict';var _=require(_0xc916('0x0'));var util=require(_0xc916('0x1'));var moment=require(_0xc916('0x2'));var BPromise=require(_0xc916('0x3'));var rs=require(_0xc916('0x4'));var fs=require('fs');var Redis=require(_0xc916('0x5'));var db=require(_0xc916('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xc916('0x7'))(_0xc916('0x8'));var config=require('../../config/environment');var jayson=require(_0xc916('0x9'));var client=jayson[_0xc916('0xa')][_0xc916('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x914336,_0x3a6390,_0x13215f){return new BPromise(function(_0x56acc1,_0x317962){return client[_0xc916('0xc')](_0x914336,_0x13215f)['then'](function(_0x47d759){logger['info'](_0xc916('0xd'),_0x3a6390,_0xc916('0xe'));logger['debug'](_0xc916('0xf'),_0x3a6390,_0xc916('0xe'),JSON[_0xc916('0x10')](_0x47d759));if(_0x47d759[_0xc916('0x11')]){if(_0x47d759[_0xc916('0x11')]['code']===0x1f4){logger[_0xc916('0x11')]('IntegrationReport,\x20%s,\x20%s',_0x3a6390,_0x47d759[_0xc916('0x11')][_0xc916('0x12')]);return _0x317962(_0x47d759[_0xc916('0x11')]['message']);}logger[_0xc916('0x11')](_0xc916('0xd'),_0x3a6390,_0x47d759[_0xc916('0x11')]['message']);return _0x56acc1(_0x47d759[_0xc916('0x11')][_0xc916('0x12')]);}else{logger[_0xc916('0x13')](_0xc916('0xd'),_0x3a6390,'request\x20sent');_0x56acc1(_0x47d759[_0xc916('0x14')][_0xc916('0x12')]);}})[_0xc916('0x15')](function(_0x2bdac3){logger[_0xc916('0x11')](_0xc916('0xd'),_0x3a6390,_0x2bdac3);_0x317962(_0x2bdac3);});});}
\ No newline at end of file
diff --git a/server/api/interval/index.js b/server/api/interval/index.js
index b0c0916..1fe991b 100644
--- a/server/api/interval/index.js
+++ b/server/api/interval/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3b57=['/:id/sub_intervals','addInterval','addIntervals','/:id','update','destroy','exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./interval.controller','isAuthenticated','index','show','get','getIntervals','post','create'];(function(_0x1aaaad,_0xb8b95){var _0x2a2a7e=function(_0x1f5e69){while(--_0x1f5e69){_0x1aaaad['push'](_0x1aaaad['shift']());}};_0x2a2a7e(++_0xb8b95);}(_0x3b57,0x103));var _0x73b5=function(_0x1fa48e,_0x9d8448){_0x1fa48e=_0x1fa48e-0x0;var _0x5cc93f=_0x3b57[_0x1fa48e];return _0x5cc93f;};'use strict';var multer=require(_0x73b5('0x0'));var util=require('util');var path=require(_0x73b5('0x1'));var timeout=require(_0x73b5('0x2'));var express=require('express');var router=express[_0x73b5('0x3')]();var auth=require(_0x73b5('0x4'));var interaction=require(_0x73b5('0x5'));var config=require('../../config/environment');var controller=require(_0x73b5('0x6'));router['get']('/',auth[_0x73b5('0x7')](),controller[_0x73b5('0x8')]);router['get']('/:id',auth[_0x73b5('0x7')](),controller[_0x73b5('0x9')]);router[_0x73b5('0xa')]('/:id/sub_intervals',auth[_0x73b5('0x7')](),controller[_0x73b5('0xb')]);router[_0x73b5('0xc')]('/',auth[_0x73b5('0x7')](),controller[_0x73b5('0xd')]);router['post'](_0x73b5('0xe'),auth['isAuthenticated'](),controller[_0x73b5('0xf')]);router[_0x73b5('0xc')]('/:id/sub_intervals/create_many',auth['isAuthenticated'](),controller[_0x73b5('0x10')]);router['put'](_0x73b5('0x11'),auth[_0x73b5('0x7')](),controller[_0x73b5('0x12')]);router['delete'](_0x73b5('0x11'),auth[_0x73b5('0x7')](),controller[_0x73b5('0x13')]);module[_0x73b5('0x14')]=router;
\ No newline at end of file
+var _0xfcdd=['path','connect-timeout','express','../../config/environment','./interval.controller','get','index','/:id','isAuthenticated','show','/:id/sub_intervals','post','create','addInterval','/:id/sub_intervals/create_many','addIntervals','update','delete','destroy','exports','multer','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfcdd,0x18a));var _0xdfcd=function(_0x3df937,_0x185001){_0x3df937=_0x3df937-0x0;var _0x4aa01d=_0xfcdd[_0x3df937];return _0x4aa01d;};'use strict';var multer=require(_0xdfcd('0x0'));var util=require(_0xdfcd('0x1'));var path=require(_0xdfcd('0x2'));var timeout=require(_0xdfcd('0x3'));var express=require(_0xdfcd('0x4'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xdfcd('0x5'));var controller=require(_0xdfcd('0x6'));router[_0xdfcd('0x7')]('/',auth['isAuthenticated'](),controller[_0xdfcd('0x8')]);router[_0xdfcd('0x7')](_0xdfcd('0x9'),auth[_0xdfcd('0xa')](),controller[_0xdfcd('0xb')]);router[_0xdfcd('0x7')](_0xdfcd('0xc'),auth[_0xdfcd('0xa')](),controller['getIntervals']);router[_0xdfcd('0xd')]('/',auth[_0xdfcd('0xa')](),controller[_0xdfcd('0xe')]);router['post'](_0xdfcd('0xc'),auth[_0xdfcd('0xa')](),controller[_0xdfcd('0xf')]);router[_0xdfcd('0xd')](_0xdfcd('0x10'),auth[_0xdfcd('0xa')](),controller[_0xdfcd('0x11')]);router['put']('/:id',auth[_0xdfcd('0xa')](),controller[_0xdfcd('0x12')]);router[_0xdfcd('0x13')](_0xdfcd('0x9'),auth[_0xdfcd('0xa')](),controller[_0xdfcd('0x14')]);module[_0xdfcd('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/interval/interval.attributes.js b/server/api/interval/interval.attributes.js
index 1a26621..b3cfe1b 100644
--- a/server/api/interval/interval.attributes.js
+++ b/server/api/interval/interval.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa23e=['sequelize','exports','STRING'];(function(_0x20c6cb,_0x4581e9){var _0x2a239f=function(_0x777e1){while(--_0x777e1){_0x20c6cb['push'](_0x20c6cb['shift']());}};_0x2a239f(++_0x4581e9);}(_0xa23e,0x69));var _0xea23=function(_0x3566d6,_0x3f303f){_0x3566d6=_0x3566d6-0x0;var _0x181365=_0xa23e[_0x3566d6];return _0x181365;};'use strict';var Sequelize=require(_0xea23('0x0'));module[_0xea23('0x1')]={'name':{'type':Sequelize[_0xea23('0x2')]},'description':{'type':Sequelize[_0xea23('0x2')]},'interval':{'type':Sequelize[_0xea23('0x2')],'allowNull':!![]}};
\ No newline at end of file
+var _0x1488=['sequelize','STRING'];(function(_0xb0f7c3,_0x4eae95){var _0x28ea68=function(_0x4395a7){while(--_0x4395a7){_0xb0f7c3['push'](_0xb0f7c3['shift']());}};_0x28ea68(++_0x4eae95);}(_0x1488,0x88));var _0x8148=function(_0xd13a88,_0x3c5269){_0xd13a88=_0xd13a88-0x0;var _0x1c993c=_0x1488[_0xd13a88];return _0x1c993c;};'use strict';var Sequelize=require(_0x8148('0x0'));module['exports']={'name':{'type':Sequelize[_0x8148('0x1')]},'description':{'type':Sequelize[_0x8148('0x1')]},'interval':{'type':Sequelize[_0x8148('0x1')],'allowNull':!![]}};
\ No newline at end of file
diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js
index 963869f..16aab17 100644
--- a/server/api/interval/interval.controller.js
+++ b/server/api/interval/interval.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeea9=['IntervalId','findAll','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../config/license/hardware','api','../../config/environment','../../mysqldb','../../components/extensions/rewrite','sendStatus','status','end','json','count','offset','limit','set','apply','reject','save','then','destroy','get','Intervals','UserProfileResource','error','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','sort','where','map','key','VIRTUAL','field','merge','Interval','includeAll','include','rows','catch','length','options','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','find','params','body','addInterval','getIntervals','findOne','order','pick','nolimit','addIntervals','sequelize','transaction'];(function(_0x18515d,_0x5c442b){var _0x175db2=function(_0x1abf22){while(--_0x1abf22){_0x18515d['push'](_0x18515d['shift']());}};_0x175db2(++_0x5c442b);}(_0xeea9,0x162));var _0x9eea=function(_0x3eaafa,_0x1a41b7){_0x3eaafa=_0x3eaafa-0x0;var _0x16e821=_0xeea9[_0x3eaafa];return _0x16e821;};'use strict';var pdf=require(_0x9eea('0x0'));var emlformat=require(_0x9eea('0x1'));var rimraf=require(_0x9eea('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9eea('0x3'));var rp=require(_0x9eea('0x4'));var moment=require('moment');var BPromise=require(_0x9eea('0x5'));var Mustache=require(_0x9eea('0x6'));var util=require(_0x9eea('0x7'));var path=require(_0x9eea('0x8'));var sox=require(_0x9eea('0x9'));var csv=require(_0x9eea('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x9eea('0xb'));var squel=require('squel');var crypto=require(_0x9eea('0xc'));var jsforce=require(_0x9eea('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x9eea('0xa'));var querystring=require(_0x9eea('0xe'));var Papa=require(_0x9eea('0xf'));var Redis=require('ioredis');var authService=require(_0x9eea('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x9eea('0x11'));var logger=require('../../config/logger')(_0x9eea('0x12'));var utils=require('../../config/utils');var config=require(_0x9eea('0x13'));var db=require(_0x9eea('0x14'))['db'];var extensions=require(_0x9eea('0x15'));function respondWithStatusCode(_0x4d367c,_0x41672a){_0x41672a=_0x41672a||0xcc;return function(_0x29b07e){if(_0x29b07e){return _0x4d367c[_0x9eea('0x16')](_0x41672a);}return _0x4d367c[_0x9eea('0x17')](_0x41672a)[_0x9eea('0x18')]();};}function respondWithResult(_0x12b3c1,_0x175ee6){_0x175ee6=_0x175ee6||0xc8;return function(_0x44c97a){if(_0x44c97a){return _0x12b3c1[_0x9eea('0x17')](_0x175ee6)[_0x9eea('0x19')](_0x44c97a);}};}function respondWithFilteredResult(_0x120895,_0x1b8f73){return function(_0xce0f3f){if(_0xce0f3f){var _0xfad9d4=_0xce0f3f[_0x9eea('0x1a')],_0xb90229=_0x1b8f73[_0x9eea('0x1b')],_0x81798f=_0x1b8f73[_0x9eea('0x1b')]+_0x1b8f73[_0x9eea('0x1c')],_0x5b8bbc;if(_0x81798f>=_0xfad9d4){_0x81798f=_0xfad9d4;_0x5b8bbc=0xc8;}else{_0x5b8bbc=0xce;}_0x120895[_0x9eea('0x17')](_0x5b8bbc);return _0x120895[_0x9eea('0x1d')]('Content-Range',_0xb90229+'-'+_0x81798f+'/'+_0xfad9d4)['json'](_0xce0f3f);}return null;};}function patchUpdates(_0x44883d){return function(_0x5b346f){try{jsonpatch[_0x9eea('0x1e')](_0x5b346f,_0x44883d,!![]);}catch(_0x4cb71f){return BPromise[_0x9eea('0x1f')](_0x4cb71f);}return _0x5b346f[_0x9eea('0x20')]();};}function saveUpdates(_0xb4197b,_0x3fa177){return function(_0xabfffb){if(_0xabfffb){return _0xabfffb['update'](_0xb4197b)[_0x9eea('0x21')](function(_0x22c300){return _0x22c300;});}return null;};}function removeEntity(_0x5e010f,_0x3e51b8){return function(_0x13b09b){if(_0x13b09b){return _0x13b09b[_0x9eea('0x22')]()['then'](function(){var _0x3b2e7e=_0x13b09b[_0x9eea('0x23')]({'plain':!![]});var _0x312852=_0x9eea('0x24');return db[_0x9eea('0x25')]['destroy']({'where':{'type':_0x312852,'resourceId':_0x3b2e7e['id']}})[_0x9eea('0x21')](function(){return _0x13b09b;});})['then'](function(){_0x5e010f[_0x9eea('0x17')](0xcc)[_0x9eea('0x18')]();});}};}function handleEntityNotFound(_0x5642e9,_0x44d43b){return function(_0x529905){if(!_0x529905){_0x5642e9[_0x9eea('0x16')](0x194);}return _0x529905;};}function handleError(_0x2189bc,_0x9fecad){_0x9fecad=_0x9fecad||0x1f4;return function(_0x31de6d){logger[_0x9eea('0x26')](_0x31de6d[_0x9eea('0x27')]);if(_0x31de6d[_0x9eea('0x28')]){delete _0x31de6d[_0x9eea('0x28')];}_0x2189bc[_0x9eea('0x17')](_0x9fecad)[_0x9eea('0x29')](_0x31de6d);};}exports[_0x9eea('0x2a')]=function(_0x5cddf9,_0x4014e7){var _0x22bc5e={},_0x41d533={},_0x3dfe7a={'count':0x0,'rows':[]};var _0x1e8652=db['Interval'][_0x9eea('0x2b')];_0x41d533[_0x9eea('0x2c')]=_[_0x9eea('0x2d')](_0x1e8652);_0x41d533[_0x9eea('0x2e')]=_[_0x9eea('0x2d')](_0x5cddf9['query']);_0x41d533[_0x9eea('0x2f')]=_['intersection'](_0x41d533['model'],_0x41d533[_0x9eea('0x2e')]);_0x22bc5e['attributes']=_[_0x9eea('0x30')](_0x41d533['model'],qs[_0x9eea('0x31')](_0x5cddf9[_0x9eea('0x2e')][_0x9eea('0x31')]));_0x22bc5e[_0x9eea('0x32')]=_0x22bc5e[_0x9eea('0x32')]['length']?_0x22bc5e[_0x9eea('0x32')]:_0x41d533[_0x9eea('0x2c')];if(!_0x5cddf9[_0x9eea('0x2e')][_0x9eea('0x33')]('nolimit')){_0x22bc5e['limit']=qs[_0x9eea('0x1c')](_0x5cddf9[_0x9eea('0x2e')][_0x9eea('0x1c')]);_0x22bc5e[_0x9eea('0x1b')]=qs[_0x9eea('0x1b')](_0x5cddf9['query'][_0x9eea('0x1b')]);}_0x22bc5e['order']=qs[_0x9eea('0x34')](_0x5cddf9['query'][_0x9eea('0x34')]);_0x22bc5e[_0x9eea('0x35')]=qs[_0x9eea('0x2f')](_['pick'](_0x5cddf9[_0x9eea('0x2e')],_0x41d533[_0x9eea('0x2f')]));if(_0x5cddf9[_0x9eea('0x2e')]['filter']){_0x22bc5e['where']=_['merge'](_0x22bc5e[_0x9eea('0x35')],{'$or':_[_0x9eea('0x36')](_0x1e8652,function(_0x3698d6){if(_0x3698d6['type'][_0x9eea('0x37')]!==_0x9eea('0x38')){var _0x10b74a={};_0x10b74a[_0x3698d6[_0x9eea('0x39')]]={'$like':'%'+_0x5cddf9['query']['filter']+'%'};return _0x10b74a;}})});}_0x22bc5e=_[_0x9eea('0x3a')]({},_0x22bc5e,_0x5cddf9['options']);var _0x2a0a8d={'where':_0x22bc5e['where']};return db[_0x9eea('0x3b')][_0x9eea('0x1a')](_0x2a0a8d)[_0x9eea('0x21')](function(_0x5dfbee){_0x3dfe7a[_0x9eea('0x1a')]=_0x5dfbee;if(_0x5cddf9[_0x9eea('0x2e')][_0x9eea('0x3c')]){_0x22bc5e[_0x9eea('0x3d')]=[{'all':!![]}];}return db[_0x9eea('0x3b')]['findAll'](_0x22bc5e);})[_0x9eea('0x21')](function(_0x218042){_0x3dfe7a[_0x9eea('0x3e')]=_0x218042;return _0x3dfe7a;})[_0x9eea('0x21')](respondWithFilteredResult(_0x4014e7,_0x22bc5e))[_0x9eea('0x3f')](handleError(_0x4014e7,null));};exports['show']=function(_0x34c1c3,_0x1d7690){var _0x5f20a1={'raw':!![],'where':{'id':_0x34c1c3['params']['id']}},_0x5995fc={};_0x5995fc[_0x9eea('0x2c')]=_[_0x9eea('0x2d')](db[_0x9eea('0x3b')][_0x9eea('0x2b')]);_0x5995fc['query']=_[_0x9eea('0x2d')](_0x34c1c3[_0x9eea('0x2e')]);_0x5995fc[_0x9eea('0x2f')]=_[_0x9eea('0x30')](_0x5995fc[_0x9eea('0x2c')],_0x5995fc[_0x9eea('0x2e')]);_0x5f20a1[_0x9eea('0x32')]=_[_0x9eea('0x30')](_0x5995fc[_0x9eea('0x2c')],qs[_0x9eea('0x31')](_0x34c1c3[_0x9eea('0x2e')][_0x9eea('0x31')]));_0x5f20a1['attributes']=_0x5f20a1['attributes'][_0x9eea('0x40')]?_0x5f20a1[_0x9eea('0x32')]:_0x5995fc[_0x9eea('0x2c')];if(_0x34c1c3[_0x9eea('0x2e')][_0x9eea('0x3c')]){_0x5f20a1[_0x9eea('0x3d')]=[{'all':!![]}];}_0x5f20a1=_['merge']({},_0x5f20a1,_0x34c1c3[_0x9eea('0x41')]);return db[_0x9eea('0x3b')]['find'](_0x5f20a1)[_0x9eea('0x21')](handleEntityNotFound(_0x1d7690,null))[_0x9eea('0x21')](respondWithResult(_0x1d7690,null))[_0x9eea('0x3f')](handleError(_0x1d7690,null));};exports[_0x9eea('0x42')]=function(_0x1e6736,_0x26509a){return db[_0x9eea('0x3b')][_0x9eea('0x42')](_0x1e6736['body'],{})['then'](function(_0x455f93){var _0x43d623=_0x1e6736['user'][_0x9eea('0x23')]({'plain':!![]});if(!_0x43d623)throw new Error(_0x9eea('0x43'));if(_0x43d623[_0x9eea('0x44')]===_0x9eea('0x45')){var _0xb90a53=_0x455f93[_0x9eea('0x23')]({'plain':!![]});var _0x17087c=_0x9eea('0x24');return db[_0x9eea('0x46')]['find']({'where':{'name':_0x17087c,'userProfileId':_0x43d623['userProfileId']},'raw':!![]})[_0x9eea('0x21')](function(_0x1c027a){if(_0x1c027a&&_0x1c027a[_0x9eea('0x47')]===0x0){return db[_0x9eea('0x25')][_0x9eea('0x42')]({'name':_0xb90a53[_0x9eea('0x28')],'resourceId':_0xb90a53['id'],'type':_0x1c027a[_0x9eea('0x28')],'sectionId':_0x1c027a['id']},{})[_0x9eea('0x21')](function(){return _0x455f93;});}else{return _0x455f93;}})[_0x9eea('0x3f')](function(_0x3aa8a7){logger['error'](_0x9eea('0x48'),_0x3aa8a7);throw _0x3aa8a7;});}return _0x455f93;})['then'](respondWithResult(_0x26509a,0xc9))[_0x9eea('0x3f')](handleError(_0x26509a,null));};exports[_0x9eea('0x49')]=function(_0x40a851,_0x18a544){if(_0x40a851['body']['id']){delete _0x40a851['body']['id'];}return db[_0x9eea('0x3b')][_0x9eea('0x4a')]({'where':{'id':_0x40a851[_0x9eea('0x4b')]['id']}})['then'](handleEntityNotFound(_0x18a544,null))[_0x9eea('0x21')](saveUpdates(_0x40a851[_0x9eea('0x4c')],null))[_0x9eea('0x21')](respondWithResult(_0x18a544,null))['catch'](handleError(_0x18a544,null));};exports[_0x9eea('0x22')]=function(_0x426160,_0x4c164f){return db[_0x9eea('0x3b')][_0x9eea('0x4a')]({'where':{'id':_0x426160[_0x9eea('0x4b')]['id']}})[_0x9eea('0x21')](handleEntityNotFound(_0x4c164f,null))[_0x9eea('0x21')](removeEntity(_0x4c164f,null))[_0x9eea('0x3f')](handleError(_0x4c164f,null));};exports[_0x9eea('0x4d')]=function(_0x46d59e,_0x4ee682,_0x278a04){if(_0x46d59e[_0x9eea('0x4c')]['id']){delete _0x46d59e['body']['id'];}return db[_0x9eea('0x3b')][_0x9eea('0x4a')]({'where':{'id':_0x46d59e['params']['id']}})[_0x9eea('0x21')](handleEntityNotFound(_0x4ee682,null))[_0x9eea('0x21')](function(_0x50b104){if(_0x50b104){_0x46d59e[_0x9eea('0x4c')]['IntervalId']=_0x50b104['id'];return db['Interval'][_0x9eea('0x42')](_0x46d59e[_0x9eea('0x4c')]);}})['then'](respondWithResult(_0x4ee682,null))[_0x9eea('0x3f')](handleError(_0x4ee682,null));};exports[_0x9eea('0x4e')]=function(_0x97b1a1,_0xdbe2df,_0x4f5587){var _0x5b5bde={};var _0x59092c={};var _0xd3a918;var _0x23748f;return db[_0x9eea('0x3b')][_0x9eea('0x4f')]({'where':{'id':_0x97b1a1[_0x9eea('0x4b')]['id']}})[_0x9eea('0x21')](handleEntityNotFound(_0xdbe2df,null))[_0x9eea('0x21')](function(_0x1cdfe4){if(_0x1cdfe4){_0xd3a918=_0x1cdfe4;_0x59092c[_0x9eea('0x2c')]=_['keys'](db[_0x9eea('0x3b')]['rawAttributes']);_0x59092c[_0x9eea('0x2e')]=_[_0x9eea('0x2d')](_0x97b1a1[_0x9eea('0x2e')]);_0x59092c[_0x9eea('0x2f')]=_[_0x9eea('0x30')](_0x59092c[_0x9eea('0x2c')],_0x59092c['query']);_0x5b5bde[_0x9eea('0x32')]=_['intersection'](_0x59092c[_0x9eea('0x2c')],qs[_0x9eea('0x31')](_0x97b1a1[_0x9eea('0x2e')][_0x9eea('0x31')]));_0x5b5bde[_0x9eea('0x32')]=_0x5b5bde['attributes']['length']?_0x5b5bde[_0x9eea('0x32')]:_0x59092c[_0x9eea('0x2c')];_0x5b5bde[_0x9eea('0x50')]=qs[_0x9eea('0x34')](_0x97b1a1[_0x9eea('0x2e')]['sort']);_0x5b5bde[_0x9eea('0x35')]=qs[_0x9eea('0x2f')](_[_0x9eea('0x51')](_0x97b1a1[_0x9eea('0x2e')],_0x59092c[_0x9eea('0x2f')]));if(_0x97b1a1['query']['filter']){_0x5b5bde[_0x9eea('0x35')]=_['merge'](_0x5b5bde[_0x9eea('0x35')],{'$or':_[_0x9eea('0x36')](_0x5b5bde['attributes'],function(_0x5ee67b){var _0x40f1ab={};_0x40f1ab[_0x5ee67b]={'$like':'%'+_0x97b1a1[_0x9eea('0x2e')]['filter']+'%'};return _0x40f1ab;})});}_0x5b5bde=_['merge']({},_0x5b5bde,_0x97b1a1[_0x9eea('0x41')]);return _0xd3a918['getIntervals'](_0x5b5bde);}})['then'](function(_0x38073a){if(_0x38073a){_0x23748f=_0x38073a[_0x9eea('0x40')];if(!_0x97b1a1[_0x9eea('0x2e')][_0x9eea('0x33')](_0x9eea('0x52'))){_0x5b5bde[_0x9eea('0x1c')]=qs['limit'](_0x97b1a1[_0x9eea('0x2e')][_0x9eea('0x1c')]);_0x5b5bde[_0x9eea('0x1b')]=qs['offset'](_0x97b1a1['query'][_0x9eea('0x1b')]);}return _0xd3a918[_0x9eea('0x4e')](_0x5b5bde);}})[_0x9eea('0x21')](function(_0x54b40e){if(_0x54b40e){return _0x54b40e?{'count':_0x23748f,'rows':_0x54b40e}:null;}})[_0x9eea('0x21')](respondWithResult(_0xdbe2df,null))[_0x9eea('0x3f')](handleError(_0xdbe2df,null));};exports[_0x9eea('0x53')]=function(_0x34f29f,_0x26d569,_0x2772cb){return db[_0x9eea('0x3b')][_0x9eea('0x4f')]({'where':{'id':_0x34f29f[_0x9eea('0x4b')]['id']}})['then'](handleEntityNotFound(_0x26d569,null))['then'](function(_0x8ab13c){if(_0x8ab13c){return db[_0x9eea('0x54')][_0x9eea('0x55')](function(_0x286369){return db[_0x9eea('0x3b')][_0x9eea('0x22')]({'where':{'IntervalId':_0x34f29f['params']['id']},'transaction':_0x286369})[_0x9eea('0x21')](function(_0xb38501){var _0x1be95d=_[_0x9eea('0x36')](_0x34f29f[_0x9eea('0x4c')],function(_0x39b85c){delete _0x39b85c['id'];_0x39b85c[_0x9eea('0x56')]=_0x34f29f[_0x9eea('0x4b')]['id'];return _0x39b85c;});return db[_0x9eea('0x3b')]['bulkCreate'](_0x1be95d,{'transaction':_0x286369});});})[_0x9eea('0x21')](function(){return db['Interval'][_0x9eea('0x57')]({'where':{'IntervalId':_0x34f29f[_0x9eea('0x4b')]['id']}});});}})[_0x9eea('0x21')](respondWithResult(_0x26d569,null))[_0x9eea('0x3f')](handleError(_0x26d569,null));};
\ No newline at end of file
+var _0xe638=['length','hasOwnProperty','nolimit','limit','order','sort','where','filter','merge','type','key','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','include','find','create','body','user','get','role','Intervals','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addInterval','getIntervals','findOne','pick','map','addIntervals','sequelize','IntervalId','bulkCreate','html-pdf','eml-format','zip-dir','request-promise','mustache','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../mysqldb','../../components/extensions/rewrite','sendStatus','status','end','json','count','offset','set','Content-Range','apply','then','destroy','error','stack','name','send','index','Interval','rawAttributes','model','keys','query','filters','intersection','attributes','fields'];(function(_0x395778,_0xd23dd7){var _0x5787ad=function(_0x48648a){while(--_0x48648a){_0x395778['push'](_0x395778['shift']());}};_0x5787ad(++_0xd23dd7);}(_0xe638,0xd9));var _0x8e63=function(_0x3cdfd2,_0x42c73a){_0x3cdfd2=_0x3cdfd2-0x0;var _0x5cba81=_0xe638[_0x3cdfd2];return _0x5cba81;};'use strict';var pdf=require(_0x8e63('0x0'));var emlformat=require(_0x8e63('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x8e63('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8e63('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x8e63('0x4'));var util=require('util');var path=require(_0x8e63('0x5'));var sox=require(_0x8e63('0x6'));var csv=require(_0x8e63('0x7'));var ejs=require(_0x8e63('0x8'));var fs=require('fs');var _=require(_0x8e63('0x9'));var squel=require('squel');var crypto=require(_0x8e63('0xa'));var jsforce=require(_0x8e63('0xb'));var deskjs=require(_0x8e63('0xc'));var toCsv=require(_0x8e63('0x7'));var querystring=require('querystring');var Papa=require(_0x8e63('0xd'));var Redis=require(_0x8e63('0xe'));var authService=require(_0x8e63('0xf'));var qs=require(_0x8e63('0x10'));var hardwareService=require(_0x8e63('0x11'));var logger=require('../../config/logger')(_0x8e63('0x12'));var utils=require(_0x8e63('0x13'));var config=require('../../config/environment');var db=require(_0x8e63('0x14'))['db'];var extensions=require(_0x8e63('0x15'));function respondWithStatusCode(_0x1d1274,_0x3a0172){_0x3a0172=_0x3a0172||0xcc;return function(_0x145551){if(_0x145551){return _0x1d1274[_0x8e63('0x16')](_0x3a0172);}return _0x1d1274[_0x8e63('0x17')](_0x3a0172)[_0x8e63('0x18')]();};}function respondWithResult(_0x2e7c92,_0x3aded6){_0x3aded6=_0x3aded6||0xc8;return function(_0x4be9d4){if(_0x4be9d4){return _0x2e7c92['status'](_0x3aded6)[_0x8e63('0x19')](_0x4be9d4);}};}function respondWithFilteredResult(_0x97b584,_0x2fbde3){return function(_0x2d9c0a){if(_0x2d9c0a){var _0x24df1f=_0x2d9c0a[_0x8e63('0x1a')],_0xf46f37=_0x2fbde3[_0x8e63('0x1b')],_0x21b0e3=_0x2fbde3[_0x8e63('0x1b')]+_0x2fbde3['limit'],_0x4935dc;if(_0x21b0e3>=_0x24df1f){_0x21b0e3=_0x24df1f;_0x4935dc=0xc8;}else{_0x4935dc=0xce;}_0x97b584[_0x8e63('0x17')](_0x4935dc);return _0x97b584[_0x8e63('0x1c')](_0x8e63('0x1d'),_0xf46f37+'-'+_0x21b0e3+'/'+_0x24df1f)['json'](_0x2d9c0a);}return null;};}function patchUpdates(_0x4f5441){return function(_0x2c819c){try{jsonpatch[_0x8e63('0x1e')](_0x2c819c,_0x4f5441,!![]);}catch(_0x5147f2){return BPromise['reject'](_0x5147f2);}return _0x2c819c['save']();};}function saveUpdates(_0x278093,_0x52510f){return function(_0x3b4072){if(_0x3b4072){return _0x3b4072['update'](_0x278093)[_0x8e63('0x1f')](function(_0x4387a6){return _0x4387a6;});}return null;};}function removeEntity(_0x47e8eb,_0x501a9a){return function(_0x37db75){if(_0x37db75){return _0x37db75['destroy']()[_0x8e63('0x1f')](function(){var _0x5ae357=_0x37db75['get']({'plain':!![]});var _0x3c27c0='Intervals';return db['UserProfileResource'][_0x8e63('0x20')]({'where':{'type':_0x3c27c0,'resourceId':_0x5ae357['id']}})['then'](function(){return _0x37db75;});})['then'](function(){_0x47e8eb[_0x8e63('0x17')](0xcc)[_0x8e63('0x18')]();});}};}function handleEntityNotFound(_0x55cc09,_0x1a46e1){return function(_0x2d9672){if(!_0x2d9672){_0x55cc09[_0x8e63('0x16')](0x194);}return _0x2d9672;};}function handleError(_0x4907d2,_0x27ca43){_0x27ca43=_0x27ca43||0x1f4;return function(_0x3dd38f){logger[_0x8e63('0x21')](_0x3dd38f[_0x8e63('0x22')]);if(_0x3dd38f[_0x8e63('0x23')]){delete _0x3dd38f[_0x8e63('0x23')];}_0x4907d2[_0x8e63('0x17')](_0x27ca43)[_0x8e63('0x24')](_0x3dd38f);};}exports[_0x8e63('0x25')]=function(_0x1b7375,_0x51ef6d){var _0x548e65={},_0x97025a={},_0x3fff3d={'count':0x0,'rows':[]};var _0x25bd70=db[_0x8e63('0x26')][_0x8e63('0x27')];_0x97025a[_0x8e63('0x28')]=_[_0x8e63('0x29')](_0x25bd70);_0x97025a['query']=_[_0x8e63('0x29')](_0x1b7375[_0x8e63('0x2a')]);_0x97025a[_0x8e63('0x2b')]=_[_0x8e63('0x2c')](_0x97025a[_0x8e63('0x28')],_0x97025a[_0x8e63('0x2a')]);_0x548e65[_0x8e63('0x2d')]=_[_0x8e63('0x2c')](_0x97025a[_0x8e63('0x28')],qs[_0x8e63('0x2e')](_0x1b7375['query'][_0x8e63('0x2e')]));_0x548e65['attributes']=_0x548e65[_0x8e63('0x2d')][_0x8e63('0x2f')]?_0x548e65['attributes']:_0x97025a[_0x8e63('0x28')];if(!_0x1b7375[_0x8e63('0x2a')][_0x8e63('0x30')](_0x8e63('0x31'))){_0x548e65[_0x8e63('0x32')]=qs[_0x8e63('0x32')](_0x1b7375[_0x8e63('0x2a')][_0x8e63('0x32')]);_0x548e65[_0x8e63('0x1b')]=qs['offset'](_0x1b7375[_0x8e63('0x2a')][_0x8e63('0x1b')]);}_0x548e65[_0x8e63('0x33')]=qs[_0x8e63('0x34')](_0x1b7375[_0x8e63('0x2a')]['sort']);_0x548e65[_0x8e63('0x35')]=qs[_0x8e63('0x2b')](_['pick'](_0x1b7375['query'],_0x97025a[_0x8e63('0x2b')]));if(_0x1b7375[_0x8e63('0x2a')][_0x8e63('0x36')]){_0x548e65['where']=_[_0x8e63('0x37')](_0x548e65[_0x8e63('0x35')],{'$or':_['map'](_0x25bd70,function(_0x33425f){if(_0x33425f[_0x8e63('0x38')][_0x8e63('0x39')]!==_0x8e63('0x3a')){var _0xa65886={};_0xa65886[_0x33425f['field']]={'$like':'%'+_0x1b7375['query'][_0x8e63('0x36')]+'%'};return _0xa65886;}})});}_0x548e65=_[_0x8e63('0x37')]({},_0x548e65,_0x1b7375[_0x8e63('0x3b')]);var _0x5433e2={'where':_0x548e65[_0x8e63('0x35')]};return db[_0x8e63('0x26')][_0x8e63('0x1a')](_0x5433e2)[_0x8e63('0x1f')](function(_0xf10090){_0x3fff3d['count']=_0xf10090;if(_0x1b7375['query'][_0x8e63('0x3c')]){_0x548e65['include']=[{'all':!![]}];}return db[_0x8e63('0x26')][_0x8e63('0x3d')](_0x548e65);})[_0x8e63('0x1f')](function(_0x313912){_0x3fff3d[_0x8e63('0x3e')]=_0x313912;return _0x3fff3d;})[_0x8e63('0x1f')](respondWithFilteredResult(_0x51ef6d,_0x548e65))[_0x8e63('0x3f')](handleError(_0x51ef6d,null));};exports[_0x8e63('0x40')]=function(_0x3b97de,_0x1cf2ad){var _0x3c09fc={'raw':!![],'where':{'id':_0x3b97de[_0x8e63('0x41')]['id']}},_0x53bc7c={};_0x53bc7c[_0x8e63('0x28')]=_[_0x8e63('0x29')](db[_0x8e63('0x26')][_0x8e63('0x27')]);_0x53bc7c[_0x8e63('0x2a')]=_[_0x8e63('0x29')](_0x3b97de[_0x8e63('0x2a')]);_0x53bc7c['filters']=_[_0x8e63('0x2c')](_0x53bc7c[_0x8e63('0x28')],_0x53bc7c[_0x8e63('0x2a')]);_0x3c09fc[_0x8e63('0x2d')]=_['intersection'](_0x53bc7c[_0x8e63('0x28')],qs[_0x8e63('0x2e')](_0x3b97de['query']['fields']));_0x3c09fc[_0x8e63('0x2d')]=_0x3c09fc[_0x8e63('0x2d')][_0x8e63('0x2f')]?_0x3c09fc[_0x8e63('0x2d')]:_0x53bc7c[_0x8e63('0x28')];if(_0x3b97de[_0x8e63('0x2a')]['includeAll']){_0x3c09fc[_0x8e63('0x42')]=[{'all':!![]}];}_0x3c09fc=_[_0x8e63('0x37')]({},_0x3c09fc,_0x3b97de[_0x8e63('0x3b')]);return db[_0x8e63('0x26')][_0x8e63('0x43')](_0x3c09fc)[_0x8e63('0x1f')](handleEntityNotFound(_0x1cf2ad,null))[_0x8e63('0x1f')](respondWithResult(_0x1cf2ad,null))[_0x8e63('0x3f')](handleError(_0x1cf2ad,null));};exports[_0x8e63('0x44')]=function(_0xca53cb,_0x3013c5){return db[_0x8e63('0x26')][_0x8e63('0x44')](_0xca53cb[_0x8e63('0x45')],{})[_0x8e63('0x1f')](function(_0x33ae28){var _0x562393=_0xca53cb[_0x8e63('0x46')][_0x8e63('0x47')]({'plain':!![]});if(!_0x562393)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x562393[_0x8e63('0x48')]===_0x8e63('0x46')){var _0x84c938=_0x33ae28[_0x8e63('0x47')]({'plain':!![]});var _0x40b95f=_0x8e63('0x49');return db[_0x8e63('0x4a')][_0x8e63('0x43')]({'where':{'name':_0x40b95f,'userProfileId':_0x562393[_0x8e63('0x4b')]},'raw':!![]})[_0x8e63('0x1f')](function(_0x5138e3){if(_0x5138e3&&_0x5138e3[_0x8e63('0x4c')]===0x0){return db[_0x8e63('0x4d')]['create']({'name':_0x84c938[_0x8e63('0x23')],'resourceId':_0x84c938['id'],'type':_0x5138e3['name'],'sectionId':_0x5138e3['id']},{})[_0x8e63('0x1f')](function(){return _0x33ae28;});}else{return _0x33ae28;}})[_0x8e63('0x3f')](function(_0x21836a){logger['error'](_0x8e63('0x4e'),_0x21836a);throw _0x21836a;});}return _0x33ae28;})[_0x8e63('0x1f')](respondWithResult(_0x3013c5,0xc9))['catch'](handleError(_0x3013c5,null));};exports['update']=function(_0x2f6080,_0xf7ea12){if(_0x2f6080[_0x8e63('0x45')]['id']){delete _0x2f6080['body']['id'];}return db['Interval'][_0x8e63('0x43')]({'where':{'id':_0x2f6080[_0x8e63('0x41')]['id']}})[_0x8e63('0x1f')](handleEntityNotFound(_0xf7ea12,null))['then'](saveUpdates(_0x2f6080[_0x8e63('0x45')],null))[_0x8e63('0x1f')](respondWithResult(_0xf7ea12,null))[_0x8e63('0x3f')](handleError(_0xf7ea12,null));};exports[_0x8e63('0x20')]=function(_0x5bcede,_0x468ecf){return db['Interval'][_0x8e63('0x43')]({'where':{'id':_0x5bcede[_0x8e63('0x41')]['id']}})[_0x8e63('0x1f')](handleEntityNotFound(_0x468ecf,null))[_0x8e63('0x1f')](removeEntity(_0x468ecf,null))[_0x8e63('0x3f')](handleError(_0x468ecf,null));};exports[_0x8e63('0x4f')]=function(_0x412aab,_0x2dd557,_0x41f10c){if(_0x412aab[_0x8e63('0x45')]['id']){delete _0x412aab[_0x8e63('0x45')]['id'];}return db[_0x8e63('0x26')]['find']({'where':{'id':_0x412aab[_0x8e63('0x41')]['id']}})[_0x8e63('0x1f')](handleEntityNotFound(_0x2dd557,null))['then'](function(_0x5dcf7a){if(_0x5dcf7a){_0x412aab['body']['IntervalId']=_0x5dcf7a['id'];return db['Interval'][_0x8e63('0x44')](_0x412aab[_0x8e63('0x45')]);}})[_0x8e63('0x1f')](respondWithResult(_0x2dd557,null))[_0x8e63('0x3f')](handleError(_0x2dd557,null));};exports[_0x8e63('0x50')]=function(_0x261d13,_0x3467f7,_0x309f78){var _0x1e1295={};var _0x41b51e={};var _0x4947ff;var _0x45f5fa;return db[_0x8e63('0x26')][_0x8e63('0x51')]({'where':{'id':_0x261d13[_0x8e63('0x41')]['id']}})[_0x8e63('0x1f')](handleEntityNotFound(_0x3467f7,null))[_0x8e63('0x1f')](function(_0x2655fe){if(_0x2655fe){_0x4947ff=_0x2655fe;_0x41b51e[_0x8e63('0x28')]=_[_0x8e63('0x29')](db[_0x8e63('0x26')][_0x8e63('0x27')]);_0x41b51e['query']=_[_0x8e63('0x29')](_0x261d13[_0x8e63('0x2a')]);_0x41b51e[_0x8e63('0x2b')]=_['intersection'](_0x41b51e[_0x8e63('0x28')],_0x41b51e[_0x8e63('0x2a')]);_0x1e1295[_0x8e63('0x2d')]=_[_0x8e63('0x2c')](_0x41b51e[_0x8e63('0x28')],qs[_0x8e63('0x2e')](_0x261d13[_0x8e63('0x2a')][_0x8e63('0x2e')]));_0x1e1295[_0x8e63('0x2d')]=_0x1e1295[_0x8e63('0x2d')]['length']?_0x1e1295[_0x8e63('0x2d')]:_0x41b51e[_0x8e63('0x28')];_0x1e1295[_0x8e63('0x33')]=qs[_0x8e63('0x34')](_0x261d13[_0x8e63('0x2a')][_0x8e63('0x34')]);_0x1e1295[_0x8e63('0x35')]=qs[_0x8e63('0x2b')](_[_0x8e63('0x52')](_0x261d13[_0x8e63('0x2a')],_0x41b51e[_0x8e63('0x2b')]));if(_0x261d13[_0x8e63('0x2a')][_0x8e63('0x36')]){_0x1e1295[_0x8e63('0x35')]=_[_0x8e63('0x37')](_0x1e1295[_0x8e63('0x35')],{'$or':_[_0x8e63('0x53')](_0x1e1295['attributes'],function(_0x594407){var _0x72ae26={};_0x72ae26[_0x594407]={'$like':'%'+_0x261d13['query'][_0x8e63('0x36')]+'%'};return _0x72ae26;})});}_0x1e1295=_['merge']({},_0x1e1295,_0x261d13[_0x8e63('0x3b')]);return _0x4947ff[_0x8e63('0x50')](_0x1e1295);}})[_0x8e63('0x1f')](function(_0x538784){if(_0x538784){_0x45f5fa=_0x538784[_0x8e63('0x2f')];if(!_0x261d13[_0x8e63('0x2a')]['hasOwnProperty']('nolimit')){_0x1e1295[_0x8e63('0x32')]=qs['limit'](_0x261d13[_0x8e63('0x2a')]['limit']);_0x1e1295[_0x8e63('0x1b')]=qs[_0x8e63('0x1b')](_0x261d13[_0x8e63('0x2a')]['offset']);}return _0x4947ff['getIntervals'](_0x1e1295);}})[_0x8e63('0x1f')](function(_0x21a7d2){if(_0x21a7d2){return _0x21a7d2?{'count':_0x45f5fa,'rows':_0x21a7d2}:null;}})[_0x8e63('0x1f')](respondWithResult(_0x3467f7,null))[_0x8e63('0x3f')](handleError(_0x3467f7,null));};exports[_0x8e63('0x54')]=function(_0x5bdee0,_0x348170,_0x452f2a){return db['Interval'][_0x8e63('0x51')]({'where':{'id':_0x5bdee0['params']['id']}})[_0x8e63('0x1f')](handleEntityNotFound(_0x348170,null))[_0x8e63('0x1f')](function(_0x43dbed){if(_0x43dbed){return db[_0x8e63('0x55')]['transaction'](function(_0x575e7c){return db['Interval']['destroy']({'where':{'IntervalId':_0x5bdee0[_0x8e63('0x41')]['id']},'transaction':_0x575e7c})[_0x8e63('0x1f')](function(_0x4614b7){var _0xb00ef4=_['map'](_0x5bdee0['body'],function(_0x377a4a){delete _0x377a4a['id'];_0x377a4a[_0x8e63('0x56')]=_0x5bdee0[_0x8e63('0x41')]['id'];return _0x377a4a;});return db['Interval'][_0x8e63('0x57')](_0xb00ef4,{'transaction':_0x575e7c});});})['then'](function(){return db[_0x8e63('0x26')][_0x8e63('0x3d')]({'where':{'IntervalId':_0x5bdee0[_0x8e63('0x41')]['id']}});});}})['then'](respondWithResult(_0x348170,null))[_0x8e63('0x3f')](handleError(_0x348170,null));};
\ No newline at end of file
diff --git a/server/api/interval/interval.model.js b/server/api/interval/interval.model.js
index c02f250..395beb9 100644
--- a/server/api/interval/interval.model.js
+++ b/server/api/interval/interval.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc611=['rimraf','../../config/environment','./interval.attributes','exports','Interval','tools_intervals','rewrite','lodash','util','api','bluebird','path'];(function(_0x5d8441,_0x43ca8a){var _0x50c275=function(_0x51de70){while(--_0x51de70){_0x5d8441['push'](_0x5d8441['shift']());}};_0x50c275(++_0x43ca8a);}(_0xc611,0x8b));var _0x1c61=function(_0x33891d,_0x370bfd){_0x33891d=_0x33891d-0x0;var _0x3639b4=_0xc611[_0x33891d];return _0x3639b4;};'use strict';var _=require(_0x1c61('0x0'));var util=require(_0x1c61('0x1'));var logger=require('../../config/logger')(_0x1c61('0x2'));var moment=require('moment');var BPromise=require(_0x1c61('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1c61('0x4'));var rimraf=require(_0x1c61('0x5'));var config=require(_0x1c61('0x6'));var attributes=require(_0x1c61('0x7'));var extensions=require('../../components/extensions/rewrite');module[_0x1c61('0x8')]=function(_0xf4ae04,_0x254bc5){return _0xf4ae04['define'](_0x1c61('0x9'),attributes,{'tableName':_0x1c61('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x4e1540,_0x2177d3){extensions[_0x1c61('0xb')](_0xf4ae04,_0x4e1540);},'afterBulkCreate':function(_0x33d1d8,_0x25c81a,_0x5a79da){_0x5a79da();extensions[_0x1c61('0xb')](_0xf4ae04,_0x33d1d8[0x0]);},'afterUpdate':function(_0x5051ab,_0x54f93d){extensions['rewrite'](_0xf4ae04,_0x5051ab);},'afterDestroy':function(_0x2d4028,_0x4883e7){extensions[_0x1c61('0xb')](_0xf4ae04,_0x2d4028);}}});};
\ No newline at end of file
+var _0x053b=['path','rimraf','./interval.attributes','exports','define','Interval','tools_intervals','rewrite','util','../../config/logger','api','moment','bluebird'];(function(_0x2f9d3e,_0x29345f){var _0x32d8e6=function(_0x9f63fc){while(--_0x9f63fc){_0x2f9d3e['push'](_0x2f9d3e['shift']());}};_0x32d8e6(++_0x29345f);}(_0x053b,0x119));var _0xb053=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x053b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xb053('0x0'));var logger=require(_0xb053('0x1'))(_0xb053('0x2'));var moment=require(_0xb053('0x3'));var BPromise=require(_0xb053('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb053('0x5'));var rimraf=require(_0xb053('0x6'));var config=require('../../config/environment');var attributes=require(_0xb053('0x7'));var extensions=require('../../components/extensions/rewrite');module[_0xb053('0x8')]=function(_0x374da4,_0x1c397a){return _0x374da4[_0xb053('0x9')](_0xb053('0xa'),attributes,{'tableName':_0xb053('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5a7764,_0x4d8b1d){extensions['rewrite'](_0x374da4,_0x5a7764);},'afterBulkCreate':function(_0x9fc04e,_0x1f77b2,_0x47b6cb){_0x47b6cb();extensions['rewrite'](_0x374da4,_0x9fc04e[0x0]);},'afterUpdate':function(_0x2ce5f3,_0x1fc3c8){extensions[_0xb053('0xc')](_0x374da4,_0x2ce5f3);},'afterDestroy':function(_0x144bd9,_0x1faa58){extensions[_0xb053('0xc')](_0x374da4,_0x144bd9);}}});};
\ No newline at end of file
diff --git a/server/api/interval/interval.rpc.js b/server/api/interval/interval.rpc.js
index 5b95d0f..23db585 100644
--- a/server/api/interval/interval.rpc.js
+++ b/server/api/interval/interval.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0faf=['raw','where','attributes','limit','include','map','model','ShowInterval','Interval','find','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetInterval','findAll','options'];(function(_0x44d9a1,_0x1116c1){var _0x5ec0ac=function(_0x509355){while(--_0x509355){_0x44d9a1['push'](_0x44d9a1['shift']());}};_0x5ec0ac(++_0x1116c1);}(_0x0faf,0x132));var _0xf0fa=function(_0x47888a,_0x7d2f3a){_0x47888a=_0x47888a-0x0;var _0x2b15a4=_0x0faf[_0x47888a];return _0x2b15a4;};'use strict';var _=require(_0xf0fa('0x0'));var util=require('util');var moment=require(_0xf0fa('0x1'));var BPromise=require(_0xf0fa('0x2'));var rs=require(_0xf0fa('0x3'));var fs=require('fs');var Redis=require(_0xf0fa('0x4'));var db=require(_0xf0fa('0x5'))['db'];var utils=require(_0xf0fa('0x6'));var logger=require(_0xf0fa('0x7'))(_0xf0fa('0x8'));var config=require(_0xf0fa('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf0fa('0xa')][_0xf0fa('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x25b5c4,_0x3a703b,_0x2db1d9){return new BPromise(function(_0x587865,_0x42f7fd){return client[_0xf0fa('0xc')](_0x25b5c4,_0x2db1d9)['then'](function(_0x4df4d1){logger[_0xf0fa('0xd')](_0xf0fa('0xe'),_0x3a703b,_0xf0fa('0xf'));logger[_0xf0fa('0x10')](_0xf0fa('0x11'),_0x3a703b,_0xf0fa('0xf'),JSON[_0xf0fa('0x12')](_0x4df4d1));if(_0x4df4d1[_0xf0fa('0x13')]){if(_0x4df4d1['error'][_0xf0fa('0x14')]===0x1f4){logger['error'](_0xf0fa('0xe'),_0x3a703b,_0x4df4d1['error'][_0xf0fa('0x15')]);return _0x42f7fd(_0x4df4d1[_0xf0fa('0x13')][_0xf0fa('0x15')]);}logger['error']('Interval,\x20%s,\x20%s',_0x3a703b,_0x4df4d1[_0xf0fa('0x13')]['message']);return _0x587865(_0x4df4d1[_0xf0fa('0x13')][_0xf0fa('0x15')]);}else{logger[_0xf0fa('0xd')](_0xf0fa('0xe'),_0x3a703b,_0xf0fa('0xf'));_0x587865(_0x4df4d1[_0xf0fa('0x16')][_0xf0fa('0x15')]);}})[_0xf0fa('0x17')](function(_0x497542){logger[_0xf0fa('0x13')](_0xf0fa('0xe'),_0x3a703b,_0x497542);_0x42f7fd(_0x497542);});});}exports[_0xf0fa('0x18')]=function(_0x1d3c22){var _0x2bdf82=this;return new Promise(function(_0x386e5f,_0x5ba2eb){return db['Interval'][_0xf0fa('0x19')]({'raw':_0x1d3c22[_0xf0fa('0x1a')]?_0x1d3c22[_0xf0fa('0x1a')][_0xf0fa('0x1b')]===undefined?!![]:![]:!![],'where':_0x1d3c22[_0xf0fa('0x1a')]?_0x1d3c22[_0xf0fa('0x1a')][_0xf0fa('0x1c')]||null:null,'attributes':_0x1d3c22[_0xf0fa('0x1a')]?_0x1d3c22[_0xf0fa('0x1a')][_0xf0fa('0x1d')]||null:null,'limit':_0x1d3c22[_0xf0fa('0x1a')]?_0x1d3c22['options'][_0xf0fa('0x1e')]||null:null,'include':_0x1d3c22[_0xf0fa('0x1a')]?_0x1d3c22[_0xf0fa('0x1a')][_0xf0fa('0x1f')]?_[_0xf0fa('0x20')](_0x1d3c22[_0xf0fa('0x1a')][_0xf0fa('0x1f')],function(_0x1f0eaf){return{'model':db[_0x1f0eaf[_0xf0fa('0x21')]],'as':_0x1f0eaf['as'],'attributes':_0x1f0eaf['attributes'],'include':_0x1f0eaf[_0xf0fa('0x1f')]?_[_0xf0fa('0x20')](_0x1f0eaf['include'],function(_0x3b5d7d){return{'model':db[_0x3b5d7d[_0xf0fa('0x21')]],'as':_0x3b5d7d['as'],'attributes':_0x3b5d7d[_0xf0fa('0x1d')],'include':_0x3b5d7d['include']?_[_0xf0fa('0x20')](_0x3b5d7d[_0xf0fa('0x1f')],function(_0x3d10fb){return{'model':db[_0x3d10fb[_0xf0fa('0x21')]],'as':_0x3d10fb['as'],'attributes':_0x3d10fb['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x287810){logger[_0xf0fa('0xd')](_0xf0fa('0x18'),_0x1d3c22);logger[_0xf0fa('0x10')]('GetInterval',_0x1d3c22,JSON[_0xf0fa('0x12')](_0x287810));_0x386e5f(_0x287810);})[_0xf0fa('0x17')](function(_0x1279cf){logger['error'](_0xf0fa('0x18'),_0x1279cf['message'],_0x1d3c22);_0x5ba2eb(_0x2bdf82[_0xf0fa('0x13')](0x1f4,_0x1279cf[_0xf0fa('0x15')]));});});};exports[_0xf0fa('0x22')]=function(_0x519661){var _0x35d202=this;return new Promise(function(_0x33cc64,_0x574ba7){return db[_0xf0fa('0x23')][_0xf0fa('0x24')]({'raw':_0x519661[_0xf0fa('0x1a')]?_0x519661['options']['raw']===undefined?!![]:![]:!![],'where':_0x519661[_0xf0fa('0x1a')]?_0x519661[_0xf0fa('0x1a')]['where']||null:null,'attributes':_0x519661[_0xf0fa('0x1a')]?_0x519661['options']['attributes']||null:null,'include':_0x519661['options']?_0x519661[_0xf0fa('0x1a')]['include']?_[_0xf0fa('0x20')](_0x519661[_0xf0fa('0x1a')][_0xf0fa('0x1f')],function(_0x3993ce){return{'model':db[_0x3993ce[_0xf0fa('0x21')]],'as':_0x3993ce['as'],'attributes':_0x3993ce[_0xf0fa('0x1d')],'include':_0x3993ce[_0xf0fa('0x1f')]?_[_0xf0fa('0x20')](_0x3993ce['include'],function(_0x3abd96){return{'model':db[_0x3abd96[_0xf0fa('0x21')]],'as':_0x3abd96['as'],'attributes':_0x3abd96[_0xf0fa('0x1d')],'include':_0x3abd96['include']?_[_0xf0fa('0x20')](_0x3abd96[_0xf0fa('0x1f')],function(_0x19b137){return{'model':db[_0x19b137[_0xf0fa('0x21')]],'as':_0x19b137['as'],'attributes':_0x19b137['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2a9f4b){logger[_0xf0fa('0xd')](_0xf0fa('0x22'),_0x519661);logger[_0xf0fa('0x10')](_0xf0fa('0x22'),_0x519661,JSON['stringify'](_0x2a9f4b));_0x33cc64(_0x2a9f4b);})['catch'](function(_0x5a2be0){logger['error'](_0xf0fa('0x22'),_0x5a2be0[_0xf0fa('0x15')],_0x519661);_0x574ba7(_0x35d202['error'](0x1f4,_0x5a2be0['message']));});});};
\ No newline at end of file
+var _0x1b20=['rpc','../../config/environment','jayson/promise','client','http','then','info','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s','error','code','message','result','GetInterval','Interval','findAll','options','where','attributes','limit','include','map','model','catch','ShowInterval','find','raw','stringify','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x2c713d,_0x1ef2e8){var _0x18f5da=function(_0x501fe4){while(--_0x501fe4){_0x2c713d['push'](_0x2c713d['shift']());}};_0x18f5da(++_0x1ef2e8);}(_0x1b20,0x66));var _0x01b2=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x1b20[_0x502c7d];return _0x30b7ed;};'use strict';var _=require('lodash');var util=require(_0x01b2('0x0'));var moment=require(_0x01b2('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x01b2('0x2'));var db=require(_0x01b2('0x3'))['db'];var utils=require(_0x01b2('0x4'));var logger=require(_0x01b2('0x5'))(_0x01b2('0x6'));var config=require(_0x01b2('0x7'));var jayson=require(_0x01b2('0x8'));var client=jayson[_0x01b2('0x9')][_0x01b2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa64ad1,_0x43d561,_0x323470){return new BPromise(function(_0x508add,_0x132a08){return client['request'](_0xa64ad1,_0x323470)[_0x01b2('0xb')](function(_0x157fb6){logger[_0x01b2('0xc')](_0x01b2('0xd'),_0x43d561,_0x01b2('0xe'));logger[_0x01b2('0xf')](_0x01b2('0x10'),_0x43d561,_0x01b2('0xe'),JSON['stringify'](_0x157fb6));if(_0x157fb6[_0x01b2('0x11')]){if(_0x157fb6['error'][_0x01b2('0x12')]===0x1f4){logger['error'](_0x01b2('0xd'),_0x43d561,_0x157fb6[_0x01b2('0x11')][_0x01b2('0x13')]);return _0x132a08(_0x157fb6[_0x01b2('0x11')]['message']);}logger[_0x01b2('0x11')](_0x01b2('0xd'),_0x43d561,_0x157fb6[_0x01b2('0x11')][_0x01b2('0x13')]);return _0x508add(_0x157fb6[_0x01b2('0x11')]['message']);}else{logger[_0x01b2('0xc')](_0x01b2('0xd'),_0x43d561,_0x01b2('0xe'));_0x508add(_0x157fb6[_0x01b2('0x14')]['message']);}})['catch'](function(_0x2a8458){logger[_0x01b2('0x11')]('Interval,\x20%s,\x20%s',_0x43d561,_0x2a8458);_0x132a08(_0x2a8458);});});}exports[_0x01b2('0x15')]=function(_0x444236){var _0x27a0bc=this;return new Promise(function(_0x5986f5,_0x25c55f){return db[_0x01b2('0x16')][_0x01b2('0x17')]({'raw':_0x444236[_0x01b2('0x18')]?_0x444236[_0x01b2('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x444236[_0x01b2('0x18')]?_0x444236['options'][_0x01b2('0x19')]||null:null,'attributes':_0x444236['options']?_0x444236[_0x01b2('0x18')][_0x01b2('0x1a')]||null:null,'limit':_0x444236[_0x01b2('0x18')]?_0x444236['options'][_0x01b2('0x1b')]||null:null,'include':_0x444236[_0x01b2('0x18')]?_0x444236[_0x01b2('0x18')][_0x01b2('0x1c')]?_[_0x01b2('0x1d')](_0x444236['options'][_0x01b2('0x1c')],function(_0x539db1){return{'model':db[_0x539db1['model']],'as':_0x539db1['as'],'attributes':_0x539db1[_0x01b2('0x1a')],'include':_0x539db1[_0x01b2('0x1c')]?_[_0x01b2('0x1d')](_0x539db1[_0x01b2('0x1c')],function(_0x2e32c1){return{'model':db[_0x2e32c1[_0x01b2('0x1e')]],'as':_0x2e32c1['as'],'attributes':_0x2e32c1['attributes'],'include':_0x2e32c1[_0x01b2('0x1c')]?_[_0x01b2('0x1d')](_0x2e32c1[_0x01b2('0x1c')],function(_0x17274f){return{'model':db[_0x17274f['model']],'as':_0x17274f['as'],'attributes':_0x17274f[_0x01b2('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x122925){logger[_0x01b2('0xc')]('GetInterval',_0x444236);logger[_0x01b2('0xf')]('GetInterval',_0x444236,JSON['stringify'](_0x122925));_0x5986f5(_0x122925);})[_0x01b2('0x1f')](function(_0x4363ec){logger['error'](_0x01b2('0x15'),_0x4363ec[_0x01b2('0x13')],_0x444236);_0x25c55f(_0x27a0bc[_0x01b2('0x11')](0x1f4,_0x4363ec[_0x01b2('0x13')]));});});};exports[_0x01b2('0x20')]=function(_0xd7ad6b){var _0xd60b46=this;return new Promise(function(_0x3169f5,_0x27eeb3){return db[_0x01b2('0x16')][_0x01b2('0x21')]({'raw':_0xd7ad6b['options']?_0xd7ad6b[_0x01b2('0x18')][_0x01b2('0x22')]===undefined?!![]:![]:!![],'where':_0xd7ad6b[_0x01b2('0x18')]?_0xd7ad6b[_0x01b2('0x18')][_0x01b2('0x19')]||null:null,'attributes':_0xd7ad6b[_0x01b2('0x18')]?_0xd7ad6b['options']['attributes']||null:null,'include':_0xd7ad6b[_0x01b2('0x18')]?_0xd7ad6b['options']['include']?_[_0x01b2('0x1d')](_0xd7ad6b[_0x01b2('0x18')][_0x01b2('0x1c')],function(_0x3b1307){return{'model':db[_0x3b1307['model']],'as':_0x3b1307['as'],'attributes':_0x3b1307[_0x01b2('0x1a')],'include':_0x3b1307['include']?_[_0x01b2('0x1d')](_0x3b1307['include'],function(_0x5af6ff){return{'model':db[_0x5af6ff['model']],'as':_0x5af6ff['as'],'attributes':_0x5af6ff[_0x01b2('0x1a')],'include':_0x5af6ff[_0x01b2('0x1c')]?_[_0x01b2('0x1d')](_0x5af6ff[_0x01b2('0x1c')],function(_0x4d80d0){return{'model':db[_0x4d80d0[_0x01b2('0x1e')]],'as':_0x4d80d0['as'],'attributes':_0x4d80d0[_0x01b2('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xecbce4){logger[_0x01b2('0xc')](_0x01b2('0x20'),_0xd7ad6b);logger[_0x01b2('0xf')](_0x01b2('0x20'),_0xd7ad6b,JSON[_0x01b2('0x23')](_0xecbce4));_0x3169f5(_0xecbce4);})['catch'](function(_0x2fb530){logger[_0x01b2('0x11')]('ShowInterval',_0x2fb530['message'],_0xd7ad6b);_0x27eeb3(_0xd60b46[_0x01b2('0x11')](0x1f4,_0x2fb530[_0x01b2('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/jira/index.js b/server/api/jira/index.js
index 95fe679..88a991e 100644
--- a/server/api/jira/index.js
+++ b/server/api/jira/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f2f=['isAuthenticated','send','exports','express','Router','../../components/auth/service','./jira.controller','post'];(function(_0x14f8ef,_0x1b1107){var _0x3b97f6=function(_0xebf2c2){while(--_0xebf2c2){_0x14f8ef['push'](_0x14f8ef['shift']());}};_0x3b97f6(++_0x1b1107);}(_0x5f2f,0x73));var _0xf5f2=function(_0x1169e6,_0x32722f){_0x1169e6=_0x1169e6-0x0;var _0x534261=_0x5f2f[_0x1169e6];return _0x534261;};'use strict';var express=require(_0xf5f2('0x0'));var router=express[_0xf5f2('0x1')]();var auth=require(_0xf5f2('0x2'));var controller=require(_0xf5f2('0x3'));router[_0xf5f2('0x4')]('/',auth[_0xf5f2('0x5')](),controller[_0xf5f2('0x6')]);module[_0xf5f2('0x7')]=router;
\ No newline at end of file
+var _0x5f2f=['isAuthenticated','send','exports','express','Router','../../components/auth/service','./jira.controller','post'];(function(_0xf6aed6,_0x48a505){var _0x4834b7=function(_0xefaed7){while(--_0xefaed7){_0xf6aed6['push'](_0xf6aed6['shift']());}};_0x4834b7(++_0x48a505);}(_0x5f2f,0x73));var _0xf5f2=function(_0x5a5e94,_0x3bd9f3){_0x5a5e94=_0x5a5e94-0x0;var _0x98c0d=_0x5f2f[_0x5a5e94];return _0x98c0d;};'use strict';var express=require(_0xf5f2('0x0'));var router=express[_0xf5f2('0x1')]();var auth=require(_0xf5f2('0x2'));var controller=require(_0xf5f2('0x3'));router[_0xf5f2('0x4')]('/',auth[_0xf5f2('0x5')](),controller[_0xf5f2('0x6')]);module[_0xf5f2('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/jira/jira.controller.js b/server/api/jira/jira.controller.js
index 974f972..670e218 100644
--- a/server/api/jira/jira.controller.js
+++ b/server/api/jira/jira.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e0=['error','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','openIssue','send','body','x-forwarded-for','connection','remoteAddress','socket','bluebird','https','../../config/logger','3eAmWpBVP0','MOTGUI','Report','issuetype','Bug','fields','customfield_11500','email','customfield_11501','customfield_11502','newToken','customfield_11503','name','customfield_11504','reason','customfield_10102','POST','base64','request','setEncoding','utf8','end','status','statusCode','json'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x70e0,0x17b));var _0x070e=function(_0x1437c6,_0x78f031){_0x1437c6=_0x1437c6-0x0;var _0x3d0662=_0x70e0[_0x1437c6];return _0x3d0662;};'use strict';var BPromise=require(_0x070e('0x0'));var https=require(_0x070e('0x1'));var logger=require(_0x070e('0x2'))('api');var USERNAME='support';var PASSWORD=_0x070e('0x3');function openIssue(_0xee173,_0x277d32){var _0x2593e5={'fields':{'project':{'key':_0xee173['key']||_0x070e('0x4')},'summary':(_0xee173['summary']||_0x070e('0x5'))+'\x20from\x20'+_0xee173['ip'],'description':_0xee173['description']||JSON['stringify'](_0xee173),'issuetype':{'name':_0xee173[_0x070e('0x6')]||_0x070e('0x7')}}};_0x2593e5[_0x070e('0x8')][_0x070e('0x9')]=_0xee173[_0x070e('0xa')];_0x2593e5[_0x070e('0x8')][_0x070e('0xb')]=_0xee173['oldToken'];_0x2593e5['fields'][_0x070e('0xc')]=_0xee173[_0x070e('0xd')];_0x2593e5[_0x070e('0x8')][_0x070e('0xe')]=_0xee173[_0x070e('0xf')];_0x2593e5[_0x070e('0x8')][_0x070e('0x10')]=_0xee173[_0x070e('0x11')];_0x2593e5[_0x070e('0x8')][_0x070e('0x12')]=_0xee173['ip'];var _0x2930b8={'host':'track.xcallymotion.com','port':0x1bb,'path':'/rest/api/2/issue','method':_0x070e('0x13'),'timeout':0x4e20,'headers':{'Content-Type':'application/json','Authorization':'Basic\x20'+new Buffer(USERNAME+':'+PASSWORD)['toString'](_0x070e('0x14'))}};var _0x14c3fd=JSON['stringify'](_0x2593e5);var _0x5d3a38=https[_0x070e('0x15')](_0x2930b8,function(_0xeae1a5){_0xeae1a5[_0x070e('0x16')](_0x070e('0x17'));var _0x5bc71e='';_0xeae1a5['on']('data',function(_0x17e2e4){_0x5bc71e+=_0x17e2e4;});_0xeae1a5['on'](_0x070e('0x18'),function(){if(_0x277d32){return _0x277d32[_0x070e('0x19')](_0xeae1a5[_0x070e('0x1a')])[_0x070e('0x1b')](JSON['parse'](_0x5bc71e));}});});_0x5d3a38['on'](_0x070e('0x1c'),function(_0x168dc6){if(_0x277d32){return _0x277d32[_0x070e('0x19')](0x1f4)[_0x070e('0x1b')]({'errors':[{'message':_0x070e('0x1d'),'type':'api.jira'}]});}});_0x5d3a38['write'](_0x14c3fd);_0x5d3a38['end']();}exports[_0x070e('0x1e')]=openIssue;exports[_0x070e('0x1f')]=function(_0x20dc60,_0x4be0d7){_0x20dc60[_0x070e('0x20')]['ip']=_0x20dc60['headers'][_0x070e('0x21')]||_0x20dc60[_0x070e('0x22')][_0x070e('0x23')]||_0x20dc60[_0x070e('0x24')][_0x070e('0x23')]||_0x20dc60[_0x070e('0x22')][_0x070e('0x24')][_0x070e('0x23')];return openIssue(_0x20dc60['body'],_0x4be0d7);};
\ No newline at end of file
+var _0xcb91=['summary','\x20from\x20','description','issuetype','Bug','customfield_11500','customfield_11501','oldToken','fields','customfield_11502','newToken','customfield_11503','name','customfield_11504','reason','track.xcallymotion.com','/rest/api/2/issue','POST','application/json','toString','base64','stringify','setEncoding','utf8','data','end','status','parse','error','json','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','openIssue','x-forwarded-for','connection','remoteAddress','socket','body','../../config/logger','api','support','3eAmWpBVP0','MOTGUI'];(function(_0x28d391,_0x1357b3){var _0x3c8bf0=function(_0x55bac9){while(--_0x55bac9){_0x28d391['push'](_0x28d391['shift']());}};_0x3c8bf0(++_0x1357b3);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x245afe,_0x319cde){_0x245afe=_0x245afe-0x0;var _0x4eefde=_0xcb91[_0x245afe];return _0x4eefde;};'use strict';var BPromise=require('bluebird');var https=require('https');var logger=require(_0x1cb9('0x0'))(_0x1cb9('0x1'));var USERNAME=_0x1cb9('0x2');var PASSWORD=_0x1cb9('0x3');function openIssue(_0x4c37e8,_0x8c392f){var _0x2c17b8={'fields':{'project':{'key':_0x4c37e8['key']||_0x1cb9('0x4')},'summary':(_0x4c37e8[_0x1cb9('0x5')]||'Report')+_0x1cb9('0x6')+_0x4c37e8['ip'],'description':_0x4c37e8[_0x1cb9('0x7')]||JSON['stringify'](_0x4c37e8),'issuetype':{'name':_0x4c37e8[_0x1cb9('0x8')]||_0x1cb9('0x9')}}};_0x2c17b8['fields'][_0x1cb9('0xa')]=_0x4c37e8['email'];_0x2c17b8['fields'][_0x1cb9('0xb')]=_0x4c37e8[_0x1cb9('0xc')];_0x2c17b8[_0x1cb9('0xd')][_0x1cb9('0xe')]=_0x4c37e8[_0x1cb9('0xf')];_0x2c17b8['fields'][_0x1cb9('0x10')]=_0x4c37e8[_0x1cb9('0x11')];_0x2c17b8[_0x1cb9('0xd')][_0x1cb9('0x12')]=_0x4c37e8[_0x1cb9('0x13')];_0x2c17b8['fields']['customfield_10102']=_0x4c37e8['ip'];var _0x59dec3={'host':_0x1cb9('0x14'),'port':0x1bb,'path':_0x1cb9('0x15'),'method':_0x1cb9('0x16'),'timeout':0x4e20,'headers':{'Content-Type':_0x1cb9('0x17'),'Authorization':'Basic\x20'+new Buffer(USERNAME+':'+PASSWORD)[_0x1cb9('0x18')](_0x1cb9('0x19'))}};var _0x1b3cd7=JSON[_0x1cb9('0x1a')](_0x2c17b8);var _0x3e2d11=https['request'](_0x59dec3,function(_0x5572cb){_0x5572cb[_0x1cb9('0x1b')](_0x1cb9('0x1c'));var _0x3904b7='';_0x5572cb['on'](_0x1cb9('0x1d'),function(_0x3e21e0){_0x3904b7+=_0x3e21e0;});_0x5572cb['on'](_0x1cb9('0x1e'),function(){if(_0x8c392f){return _0x8c392f[_0x1cb9('0x1f')](_0x5572cb['statusCode'])['json'](JSON[_0x1cb9('0x20')](_0x3904b7));}});});_0x3e2d11['on'](_0x1cb9('0x21'),function(_0x2b2669){if(_0x8c392f){return _0x8c392f[_0x1cb9('0x1f')](0x1f4)[_0x1cb9('0x22')]({'errors':[{'message':_0x1cb9('0x23'),'type':_0x1cb9('0x24')}]});}});_0x3e2d11['write'](_0x1b3cd7);_0x3e2d11['end']();}exports[_0x1cb9('0x25')]=openIssue;exports['send']=function(_0x4750b1,_0x2265ea){_0x4750b1['body']['ip']=_0x4750b1['headers'][_0x1cb9('0x26')]||_0x4750b1[_0x1cb9('0x27')][_0x1cb9('0x28')]||_0x4750b1[_0x1cb9('0x29')][_0x1cb9('0x28')]||_0x4750b1[_0x1cb9('0x27')]['socket']['remoteAddress'];return openIssue(_0x4750b1[_0x1cb9('0x2a')],_0x2265ea);};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/index.js b/server/api/jscriptyAnswerReport/index.js
index 61d53e4..79fbbdd 100644
--- a/server/api/jscriptyAnswerReport/index.js
+++ b/server/api/jscriptyAnswerReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3066=['describe','/:id','show','post','create','put','update','exports','multer','util','path','express','Router','../../components/auth/service','../../config/environment','./jscriptyAnswerReport.controller','get','isAuthenticated','index'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x3066,0x112));var _0x6306=function(_0x41b9f2,_0x5543f8){_0x41b9f2=_0x41b9f2-0x0;var _0x3cd7cd=_0x3066[_0x41b9f2];return _0x3cd7cd;};'use strict';var multer=require(_0x6306('0x0'));var util=require(_0x6306('0x1'));var path=require(_0x6306('0x2'));var timeout=require('connect-timeout');var express=require(_0x6306('0x3'));var router=express[_0x6306('0x4')]();var auth=require(_0x6306('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x6306('0x6'));var controller=require(_0x6306('0x7'));router[_0x6306('0x8')]('/',auth[_0x6306('0x9')](),controller[_0x6306('0xa')]);router[_0x6306('0x8')]('/describe',auth[_0x6306('0x9')](),controller[_0x6306('0xb')]);router[_0x6306('0x8')](_0x6306('0xc'),auth['isAuthenticated'](),controller[_0x6306('0xd')]);router[_0x6306('0xe')]('/',auth[_0x6306('0x9')](),controller[_0x6306('0xf')]);router[_0x6306('0x10')](_0x6306('0xc'),auth[_0x6306('0x9')](),controller[_0x6306('0x11')]);router['delete'](_0x6306('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0x6306('0x12')]=router;
\ No newline at end of file
+var _0xe67a=['../../config/environment','./jscriptyAnswerReport.controller','get','index','/describe','isAuthenticated','describe','show','post','create','/:id','update','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service'];(function(_0x1f29e8,_0x320b53){var _0x5b4338=function(_0x42b362){while(--_0x42b362){_0x1f29e8['push'](_0x1f29e8['shift']());}};_0x5b4338(++_0x320b53);}(_0xe67a,0x18a));var _0xae67=function(_0x2c106b,_0x54574e){_0x2c106b=_0x2c106b-0x0;var _0x332262=_0xe67a[_0x2c106b];return _0x332262;};'use strict';var multer=require(_0xae67('0x0'));var util=require(_0xae67('0x1'));var path=require(_0xae67('0x2'));var timeout=require(_0xae67('0x3'));var express=require('express');var router=express[_0xae67('0x4')]();var auth=require(_0xae67('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xae67('0x6'));var controller=require(_0xae67('0x7'));router[_0xae67('0x8')]('/',auth['isAuthenticated'](),controller[_0xae67('0x9')]);router[_0xae67('0x8')](_0xae67('0xa'),auth[_0xae67('0xb')](),controller[_0xae67('0xc')]);router['get']('/:id',auth[_0xae67('0xb')](),controller[_0xae67('0xd')]);router[_0xae67('0xe')]('/',auth['isAuthenticated'](),controller[_0xae67('0xf')]);router['put'](_0xae67('0x10'),auth[_0xae67('0xb')](),controller[_0xae67('0x11')]);router['delete'](_0xae67('0x10'),auth[_0xae67('0xb')](),controller[_0xae67('0x12')]);module[_0xae67('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js
index 78870ee..5c60149 100644
--- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js
+++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb75c=['STRING','long','sequelize','exports'];(function(_0x323fff,_0x38f93e){var _0x326de5=function(_0x5520f9){while(--_0x5520f9){_0x323fff['push'](_0x323fff['shift']());}};_0x326de5(++_0x38f93e);}(_0xb75c,0x1ce));var _0xcb75=function(_0x22d5a5,_0x531b02){_0x22d5a5=_0x22d5a5-0x0;var _0x2ae605=_0xb75c[_0x22d5a5];return _0x2ae605;};'use strict';var Sequelize=require(_0xcb75('0x0'));module[_0xcb75('0x1')]={'question':{'type':Sequelize[_0xcb75('0x2')]},'answer':{'type':Sequelize['TEXT'](_0xcb75('0x3'))},'membername':{'type':Sequelize['STRING']},'projectname':{'type':Sequelize[_0xcb75('0x2')]},'queue':{'type':Sequelize[_0xcb75('0x2')]},'uniqueid':{'type':Sequelize[_0xcb75('0x2')]},'calleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xcb75('0x2')]},'questionId':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x342e=['sequelize','exports','STRING'];(function(_0x2880d8,_0x284ded){var _0x51f5a9=function(_0xafd747){while(--_0xafd747){_0x2880d8['push'](_0x2880d8['shift']());}};_0x51f5a9(++_0x284ded);}(_0x342e,0xde));var _0xe342=function(_0x33c603,_0x6d0ce4){_0x33c603=_0x33c603-0x0;var _0xae96f4=_0x342e[_0x33c603];return _0xae96f4;};'use strict';var Sequelize=require(_0xe342('0x0'));module[_0xe342('0x1')]={'question':{'type':Sequelize[_0xe342('0x2')]},'answer':{'type':Sequelize['TEXT']('long')},'membername':{'type':Sequelize[_0xe342('0x2')]},'projectname':{'type':Sequelize[_0xe342('0x2')]},'queue':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xe342('0x2')]},'calleridnum':{'type':Sequelize[_0xe342('0x2')]},'questionId':{'type':Sequelize[_0xe342('0x2')]}};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js
index 850261f..721b182 100644
--- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js
+++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd935=['ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','set','save','update','then','destroy','error','stack','name','send','JscriptyAnswerReport','rawAttributes','model','keys','query','filters','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','key','field','includeAll','include','rows','intersection','options','find','catch','create','body','params','describe','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','path','sox','to-csv'];(function(_0x2c042c,_0x2a6137){var _0x4af600=function(_0x1f6938){while(--_0x1f6938){_0x2c042c['push'](_0x2c042c['shift']());}};_0x4af600(++_0x2a6137);}(_0xd935,0x1da));var _0x5d93=function(_0x1de967,_0x2a8253){_0x1de967=_0x1de967-0x0;var _0x4fed54=_0xd935[_0x1de967];return _0x4fed54;};'use strict';var pdf=require(_0x5d93('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x5d93('0x1'));var zipdir=require(_0x5d93('0x2'));var jsonpatch=require(_0x5d93('0x3'));var rp=require(_0x5d93('0x4'));var moment=require('moment');var BPromise=require(_0x5d93('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x5d93('0x6'));var sox=require(_0x5d93('0x7'));var csv=require(_0x5d93('0x8'));var ejs=require(_0x5d93('0x9'));var fs=require('fs');var _=require(_0x5d93('0xa'));var squel=require(_0x5d93('0xb'));var crypto=require(_0x5d93('0xc'));var jsforce=require(_0x5d93('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5d93('0xe'));var Papa=require(_0x5d93('0xf'));var Redis=require(_0x5d93('0x10'));var authService=require(_0x5d93('0x11'));var qs=require(_0x5d93('0x12'));var hardwareService=require(_0x5d93('0x13'));var logger=require(_0x5d93('0x14'))(_0x5d93('0x15'));var utils=require(_0x5d93('0x16'));var config=require(_0x5d93('0x17'));var db=require(_0x5d93('0x18'))['db'];function respondWithStatusCode(_0x213f21,_0x801948){_0x801948=_0x801948||0xcc;return function(_0x4af846){if(_0x4af846){return _0x213f21[_0x5d93('0x19')](_0x801948);}return _0x213f21[_0x5d93('0x1a')](_0x801948)[_0x5d93('0x1b')]();};}function respondWithResult(_0x5e7e61,_0x33dd6f){_0x33dd6f=_0x33dd6f||0xc8;return function(_0x552b16){if(_0x552b16){return _0x5e7e61[_0x5d93('0x1a')](_0x33dd6f)[_0x5d93('0x1c')](_0x552b16);}};}function respondWithFilteredResult(_0x5c0888,_0x5594bf){return function(_0x13118b){if(_0x13118b){var _0x730597=_0x13118b['count'],_0xc31f32=_0x5594bf[_0x5d93('0x1d')],_0x56e87e=_0x5594bf['offset']+_0x5594bf[_0x5d93('0x1e')],_0x5e7255;if(_0x56e87e>=_0x730597){_0x56e87e=_0x730597;_0x5e7255=0xc8;}else{_0x5e7255=0xce;}_0x5c0888[_0x5d93('0x1a')](_0x5e7255);return _0x5c0888[_0x5d93('0x1f')]('Content-Range',_0xc31f32+'-'+_0x56e87e+'/'+_0x730597)[_0x5d93('0x1c')](_0x13118b);}return null;};}function patchUpdates(_0x197f0e){return function(_0x3d837f){try{jsonpatch['apply'](_0x3d837f,_0x197f0e,!![]);}catch(_0x103d10){return BPromise['reject'](_0x103d10);}return _0x3d837f[_0x5d93('0x20')]();};}function saveUpdates(_0x4e1499,_0xcdc0a4){return function(_0x287acd){if(_0x287acd){return _0x287acd[_0x5d93('0x21')](_0x4e1499)[_0x5d93('0x22')](function(_0x61ff4e){return _0x61ff4e;});}return null;};}function removeEntity(_0x29d7ed,_0x43f623){return function(_0x22def0){if(_0x22def0){return _0x22def0[_0x5d93('0x23')]()[_0x5d93('0x22')](function(){_0x29d7ed[_0x5d93('0x1a')](0xcc)[_0x5d93('0x1b')]();});}};}function handleEntityNotFound(_0x2505a9,_0x153264){return function(_0x1b8487){if(!_0x1b8487){_0x2505a9[_0x5d93('0x19')](0x194);}return _0x1b8487;};}function handleError(_0x30f43d,_0x557b1e){_0x557b1e=_0x557b1e||0x1f4;return function(_0x54e1c2){logger[_0x5d93('0x24')](_0x54e1c2[_0x5d93('0x25')]);if(_0x54e1c2['name']){delete _0x54e1c2[_0x5d93('0x26')];}_0x30f43d['status'](_0x557b1e)[_0x5d93('0x27')](_0x54e1c2);};}exports['index']=function(_0x271520,_0x41afeb){var _0x542666={},_0x5479c2={},_0x3c5c58={'count':0x0,'rows':[]};var _0x31ebc9=db[_0x5d93('0x28')][_0x5d93('0x29')];_0x5479c2[_0x5d93('0x2a')]=_[_0x5d93('0x2b')](_0x31ebc9);_0x5479c2[_0x5d93('0x2c')]=_[_0x5d93('0x2b')](_0x271520[_0x5d93('0x2c')]);_0x5479c2[_0x5d93('0x2d')]=_['intersection'](_0x5479c2[_0x5d93('0x2a')],_0x5479c2[_0x5d93('0x2c')]);_0x542666[_0x5d93('0x2e')]=_['intersection'](_0x5479c2[_0x5d93('0x2a')],qs[_0x5d93('0x2f')](_0x271520[_0x5d93('0x2c')][_0x5d93('0x2f')]));_0x542666[_0x5d93('0x2e')]=_0x542666['attributes'][_0x5d93('0x30')]?_0x542666['attributes']:_0x5479c2['model'];if(!_0x271520[_0x5d93('0x2c')]['hasOwnProperty'](_0x5d93('0x31'))){_0x542666[_0x5d93('0x1e')]=qs[_0x5d93('0x1e')](_0x271520[_0x5d93('0x2c')][_0x5d93('0x1e')]);_0x542666[_0x5d93('0x1d')]=qs['offset'](_0x271520[_0x5d93('0x2c')][_0x5d93('0x1d')]);}_0x542666[_0x5d93('0x32')]=qs[_0x5d93('0x33')](_0x271520[_0x5d93('0x2c')]['sort']);_0x542666[_0x5d93('0x34')]=qs[_0x5d93('0x2d')](_[_0x5d93('0x35')](_0x271520[_0x5d93('0x2c')],_0x5479c2[_0x5d93('0x2d')]));if(_0x271520[_0x5d93('0x2c')][_0x5d93('0x36')]){_0x542666[_0x5d93('0x34')]=_[_0x5d93('0x37')](_0x542666[_0x5d93('0x34')],{'$or':_['map'](_0x31ebc9,function(_0x49cfb4){if(_0x49cfb4['type'][_0x5d93('0x38')]!=='VIRTUAL'){var _0x3dc500={};_0x3dc500[_0x49cfb4[_0x5d93('0x39')]]={'$like':'%'+_0x271520[_0x5d93('0x2c')]['filter']+'%'};return _0x3dc500;}})});}_0x542666=_[_0x5d93('0x37')]({},_0x542666,_0x271520['options']);var _0x45a4ae={'where':_0x542666[_0x5d93('0x34')]};return db[_0x5d93('0x28')]['count'](_0x45a4ae)[_0x5d93('0x22')](function(_0xc1711a){_0x3c5c58['count']=_0xc1711a;if(_0x271520[_0x5d93('0x2c')][_0x5d93('0x3a')]){_0x542666[_0x5d93('0x3b')]=[{'all':!![]}];}return db[_0x5d93('0x28')]['findAll'](_0x542666);})['then'](function(_0x4fe0c0){_0x3c5c58[_0x5d93('0x3c')]=_0x4fe0c0;return _0x3c5c58;})[_0x5d93('0x22')](respondWithFilteredResult(_0x41afeb,_0x542666))['catch'](handleError(_0x41afeb,null));};exports['show']=function(_0x471e2f,_0x4f8397){var _0x20cafb={'raw':!![],'where':{'id':_0x471e2f['params']['id']}},_0x4f6727={};_0x4f6727[_0x5d93('0x2a')]=_[_0x5d93('0x2b')](db[_0x5d93('0x28')]['rawAttributes']);_0x4f6727['query']=_[_0x5d93('0x2b')](_0x471e2f[_0x5d93('0x2c')]);_0x4f6727[_0x5d93('0x2d')]=_[_0x5d93('0x3d')](_0x4f6727[_0x5d93('0x2a')],_0x4f6727['query']);_0x20cafb['attributes']=_[_0x5d93('0x3d')](_0x4f6727[_0x5d93('0x2a')],qs[_0x5d93('0x2f')](_0x471e2f[_0x5d93('0x2c')][_0x5d93('0x2f')]));_0x20cafb['attributes']=_0x20cafb[_0x5d93('0x2e')]['length']?_0x20cafb[_0x5d93('0x2e')]:_0x4f6727[_0x5d93('0x2a')];if(_0x471e2f[_0x5d93('0x2c')][_0x5d93('0x3a')]){_0x20cafb['include']=[{'all':!![]}];}_0x20cafb=_['merge']({},_0x20cafb,_0x471e2f[_0x5d93('0x3e')]);return db['JscriptyAnswerReport'][_0x5d93('0x3f')](_0x20cafb)[_0x5d93('0x22')](handleEntityNotFound(_0x4f8397,null))['then'](respondWithResult(_0x4f8397,null))[_0x5d93('0x40')](handleError(_0x4f8397,null));};exports['create']=function(_0x72d5b7,_0x2cd559){return db[_0x5d93('0x28')][_0x5d93('0x41')](_0x72d5b7[_0x5d93('0x42')],{})['then'](respondWithResult(_0x2cd559,0xc9))['catch'](handleError(_0x2cd559,null));};exports[_0x5d93('0x21')]=function(_0x1ec844,_0x5bb4fb){if(_0x1ec844[_0x5d93('0x42')]['id']){delete _0x1ec844[_0x5d93('0x42')]['id'];}return db['JscriptyAnswerReport'][_0x5d93('0x3f')]({'where':{'id':_0x1ec844[_0x5d93('0x43')]['id']}})[_0x5d93('0x22')](handleEntityNotFound(_0x5bb4fb,null))['then'](saveUpdates(_0x1ec844[_0x5d93('0x42')],null))[_0x5d93('0x22')](respondWithResult(_0x5bb4fb,null))[_0x5d93('0x40')](handleError(_0x5bb4fb,null));};exports[_0x5d93('0x23')]=function(_0x291733,_0x5ddc31){return db[_0x5d93('0x28')][_0x5d93('0x3f')]({'where':{'id':_0x291733[_0x5d93('0x43')]['id']}})[_0x5d93('0x22')](handleEntityNotFound(_0x5ddc31,null))[_0x5d93('0x22')](removeEntity(_0x5ddc31,null))[_0x5d93('0x40')](handleError(_0x5ddc31,null));};exports[_0x5d93('0x44')]=function(_0x87e7e6,_0x15b4da){return db['JscriptyAnswerReport'][_0x5d93('0x44')]()['then'](respondWithResult(_0x15b4da,null))[_0x5d93('0x40')](handleError(_0x15b4da,null));};
\ No newline at end of file
+var _0x946f=['papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','offset','set','Content-Range','apply','save','update','destroy','then','end','sendStatus','error','stack','name','index','JscriptyAnswerReport','rawAttributes','model','query','keys','filters','intersection','attributes','fields','limit','order','sort','where','pick','filter','merge','map','type','VIRTUAL','field','count','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','lodash','squel','jsforce','querystring'];(function(_0x56916d,_0x37b935){var _0x2b7f1f=function(_0x206eb1){while(--_0x206eb1){_0x56916d['push'](_0x56916d['shift']());}};_0x2b7f1f(++_0x37b935);}(_0x946f,0x111));var _0xf946=function(_0x209156,_0x54ca14){_0x209156=_0x209156-0x0;var _0x2fddc6=_0x946f[_0x209156];return _0x2fddc6;};'use strict';var pdf=require(_0xf946('0x0'));var emlformat=require(_0xf946('0x1'));var rimraf=require(_0xf946('0x2'));var zipdir=require(_0xf946('0x3'));var jsonpatch=require(_0xf946('0x4'));var rp=require(_0xf946('0x5'));var moment=require(_0xf946('0x6'));var BPromise=require(_0xf946('0x7'));var Mustache=require(_0xf946('0x8'));var util=require(_0xf946('0x9'));var path=require('path');var sox=require(_0xf946('0xa'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xf946('0xb'));var squel=require(_0xf946('0xc'));var crypto=require('crypto');var jsforce=require(_0xf946('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xf946('0xe'));var Papa=require(_0xf946('0xf'));var Redis=require(_0xf946('0x10'));var authService=require(_0xf946('0x11'));var qs=require(_0xf946('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf946('0x13'))(_0xf946('0x14'));var utils=require(_0xf946('0x15'));var config=require(_0xf946('0x16'));var db=require(_0xf946('0x17'))['db'];function respondWithStatusCode(_0x304cb5,_0x23d242){_0x23d242=_0x23d242||0xcc;return function(_0x3169e8){if(_0x3169e8){return _0x304cb5['sendStatus'](_0x23d242);}return _0x304cb5[_0xf946('0x18')](_0x23d242)['end']();};}function respondWithResult(_0x51ff4a,_0x29aebb){_0x29aebb=_0x29aebb||0xc8;return function(_0x116636){if(_0x116636){return _0x51ff4a['status'](_0x29aebb)[_0xf946('0x19')](_0x116636);}};}function respondWithFilteredResult(_0x23153c,_0x1df830){return function(_0x55e622){if(_0x55e622){var _0x4ef7bd=_0x55e622['count'],_0x2e3d06=_0x1df830[_0xf946('0x1a')],_0x3ad666=_0x1df830[_0xf946('0x1a')]+_0x1df830['limit'],_0x2f2668;if(_0x3ad666>=_0x4ef7bd){_0x3ad666=_0x4ef7bd;_0x2f2668=0xc8;}else{_0x2f2668=0xce;}_0x23153c[_0xf946('0x18')](_0x2f2668);return _0x23153c[_0xf946('0x1b')](_0xf946('0x1c'),_0x2e3d06+'-'+_0x3ad666+'/'+_0x4ef7bd)['json'](_0x55e622);}return null;};}function patchUpdates(_0x29e74e){return function(_0x4cdfeb){try{jsonpatch[_0xf946('0x1d')](_0x4cdfeb,_0x29e74e,!![]);}catch(_0x58703c){return BPromise['reject'](_0x58703c);}return _0x4cdfeb[_0xf946('0x1e')]();};}function saveUpdates(_0x1763d4,_0x453146){return function(_0x47e271){if(_0x47e271){return _0x47e271[_0xf946('0x1f')](_0x1763d4)['then'](function(_0x2b0bab){return _0x2b0bab;});}return null;};}function removeEntity(_0x46ebc6,_0x4dd2e0){return function(_0x5baa0a){if(_0x5baa0a){return _0x5baa0a[_0xf946('0x20')]()[_0xf946('0x21')](function(){_0x46ebc6['status'](0xcc)[_0xf946('0x22')]();});}};}function handleEntityNotFound(_0x4ee552,_0x180693){return function(_0x3ce3dc){if(!_0x3ce3dc){_0x4ee552[_0xf946('0x23')](0x194);}return _0x3ce3dc;};}function handleError(_0xa1269d,_0x87f3c){_0x87f3c=_0x87f3c||0x1f4;return function(_0xe9f76d){logger[_0xf946('0x24')](_0xe9f76d[_0xf946('0x25')]);if(_0xe9f76d[_0xf946('0x26')]){delete _0xe9f76d[_0xf946('0x26')];}_0xa1269d[_0xf946('0x18')](_0x87f3c)['send'](_0xe9f76d);};}exports[_0xf946('0x27')]=function(_0x16e9ba,_0x19b9c4){var _0x5b4325={},_0x14f107={},_0x26810b={'count':0x0,'rows':[]};var _0x468593=db[_0xf946('0x28')][_0xf946('0x29')];_0x14f107[_0xf946('0x2a')]=_['keys'](_0x468593);_0x14f107[_0xf946('0x2b')]=_[_0xf946('0x2c')](_0x16e9ba[_0xf946('0x2b')]);_0x14f107[_0xf946('0x2d')]=_[_0xf946('0x2e')](_0x14f107['model'],_0x14f107['query']);_0x5b4325[_0xf946('0x2f')]=_[_0xf946('0x2e')](_0x14f107[_0xf946('0x2a')],qs['fields'](_0x16e9ba[_0xf946('0x2b')][_0xf946('0x30')]));_0x5b4325[_0xf946('0x2f')]=_0x5b4325[_0xf946('0x2f')]['length']?_0x5b4325[_0xf946('0x2f')]:_0x14f107[_0xf946('0x2a')];if(!_0x16e9ba['query']['hasOwnProperty']('nolimit')){_0x5b4325[_0xf946('0x31')]=qs[_0xf946('0x31')](_0x16e9ba['query'][_0xf946('0x31')]);_0x5b4325[_0xf946('0x1a')]=qs['offset'](_0x16e9ba[_0xf946('0x2b')][_0xf946('0x1a')]);}_0x5b4325[_0xf946('0x32')]=qs[_0xf946('0x33')](_0x16e9ba[_0xf946('0x2b')]['sort']);_0x5b4325[_0xf946('0x34')]=qs[_0xf946('0x2d')](_[_0xf946('0x35')](_0x16e9ba[_0xf946('0x2b')],_0x14f107[_0xf946('0x2d')]));if(_0x16e9ba[_0xf946('0x2b')][_0xf946('0x36')]){_0x5b4325[_0xf946('0x34')]=_[_0xf946('0x37')](_0x5b4325[_0xf946('0x34')],{'$or':_[_0xf946('0x38')](_0x468593,function(_0x4b734b){if(_0x4b734b[_0xf946('0x39')]['key']!==_0xf946('0x3a')){var _0x246bfd={};_0x246bfd[_0x4b734b[_0xf946('0x3b')]]={'$like':'%'+_0x16e9ba['query'][_0xf946('0x36')]+'%'};return _0x246bfd;}})});}_0x5b4325=_[_0xf946('0x37')]({},_0x5b4325,_0x16e9ba['options']);var _0xa09e89={'where':_0x5b4325[_0xf946('0x34')]};return db[_0xf946('0x28')][_0xf946('0x3c')](_0xa09e89)[_0xf946('0x21')](function(_0x3e8d42){_0x26810b['count']=_0x3e8d42;if(_0x16e9ba['query'][_0xf946('0x3d')]){_0x5b4325[_0xf946('0x3e')]=[{'all':!![]}];}return db[_0xf946('0x28')][_0xf946('0x3f')](_0x5b4325);})['then'](function(_0x318266){_0x26810b[_0xf946('0x40')]=_0x318266;return _0x26810b;})[_0xf946('0x21')](respondWithFilteredResult(_0x19b9c4,_0x5b4325))[_0xf946('0x41')](handleError(_0x19b9c4,null));};exports[_0xf946('0x42')]=function(_0x1bf8db,_0xe4cd26){var _0x5e3672={'raw':!![],'where':{'id':_0x1bf8db[_0xf946('0x43')]['id']}},_0x239f64={};_0x239f64[_0xf946('0x2a')]=_[_0xf946('0x2c')](db[_0xf946('0x28')][_0xf946('0x29')]);_0x239f64[_0xf946('0x2b')]=_[_0xf946('0x2c')](_0x1bf8db[_0xf946('0x2b')]);_0x239f64[_0xf946('0x2d')]=_[_0xf946('0x2e')](_0x239f64[_0xf946('0x2a')],_0x239f64['query']);_0x5e3672[_0xf946('0x2f')]=_[_0xf946('0x2e')](_0x239f64['model'],qs[_0xf946('0x30')](_0x1bf8db[_0xf946('0x2b')][_0xf946('0x30')]));_0x5e3672[_0xf946('0x2f')]=_0x5e3672[_0xf946('0x2f')]['length']?_0x5e3672['attributes']:_0x239f64[_0xf946('0x2a')];if(_0x1bf8db[_0xf946('0x2b')][_0xf946('0x3d')]){_0x5e3672[_0xf946('0x3e')]=[{'all':!![]}];}_0x5e3672=_[_0xf946('0x37')]({},_0x5e3672,_0x1bf8db['options']);return db[_0xf946('0x28')][_0xf946('0x44')](_0x5e3672)[_0xf946('0x21')](handleEntityNotFound(_0xe4cd26,null))['then'](respondWithResult(_0xe4cd26,null))[_0xf946('0x41')](handleError(_0xe4cd26,null));};exports['create']=function(_0x419663,_0x5dfafe){return db[_0xf946('0x28')][_0xf946('0x45')](_0x419663['body'],{})[_0xf946('0x21')](respondWithResult(_0x5dfafe,0xc9))[_0xf946('0x41')](handleError(_0x5dfafe,null));};exports[_0xf946('0x1f')]=function(_0x564771,_0x27bb86){if(_0x564771['body']['id']){delete _0x564771[_0xf946('0x46')]['id'];}return db[_0xf946('0x28')][_0xf946('0x44')]({'where':{'id':_0x564771['params']['id']}})[_0xf946('0x21')](handleEntityNotFound(_0x27bb86,null))['then'](saveUpdates(_0x564771[_0xf946('0x46')],null))[_0xf946('0x21')](respondWithResult(_0x27bb86,null))['catch'](handleError(_0x27bb86,null));};exports[_0xf946('0x20')]=function(_0x531d5b,_0x525807){return db[_0xf946('0x28')][_0xf946('0x44')]({'where':{'id':_0x531d5b[_0xf946('0x43')]['id']}})[_0xf946('0x21')](handleEntityNotFound(_0x525807,null))[_0xf946('0x21')](removeEntity(_0x525807,null))[_0xf946('0x41')](handleError(_0x525807,null));};exports[_0xf946('0x47')]=function(_0x81ec04,_0x56cdfd){return db[_0xf946('0x28')][_0xf946('0x47')]()[_0xf946('0x21')](respondWithResult(_0x56cdfd,null))['catch'](handleError(_0x56cdfd,null));};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js
index 74247a7..409a6b3 100644
--- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js
+++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbd59=['define','JscriptyAnswerReport','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyAnswerReport.attributes','exports'];(function(_0x1392c4,_0x5a51c6){var _0x179f77=function(_0x14ecba){while(--_0x14ecba){_0x1392c4['push'](_0x1392c4['shift']());}};_0x179f77(++_0x5a51c6);}(_0xbd59,0x13a));var _0x9bd5=function(_0x4d5e45,_0xe6b062){_0x4d5e45=_0x4d5e45-0x0;var _0x26d7f5=_0xbd59[_0x4d5e45];return _0x26d7f5;};'use strict';var _=require(_0x9bd5('0x0'));var util=require(_0x9bd5('0x1'));var logger=require(_0x9bd5('0x2'))(_0x9bd5('0x3'));var moment=require('moment');var BPromise=require(_0x9bd5('0x4'));var rp=require(_0x9bd5('0x5'));var fs=require('fs');var path=require(_0x9bd5('0x6'));var rimraf=require(_0x9bd5('0x7'));var config=require(_0x9bd5('0x8'));var attributes=require(_0x9bd5('0x9'));module[_0x9bd5('0xa')]=function(_0x340fbd,_0xce8a38){return _0x340fbd[_0x9bd5('0xb')](_0x9bd5('0xc'),attributes,{'tableName':'report_jscripty_answers','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6356=['moment','rimraf','../../config/environment','./jscriptyAnswerReport.attributes','exports','define','JscriptyAnswerReport','report_jscripty_answers','../../config/logger','api'];(function(_0x552804,_0x3c3d1e){var _0x32be66=function(_0x14c213){while(--_0x14c213){_0x552804['push'](_0x552804['shift']());}};_0x32be66(++_0x3c3d1e);}(_0x6356,0x1ac));var _0x6635=function(_0x1830a9,_0x1583bd){_0x1830a9=_0x1830a9-0x0;var _0x2b6166=_0x6356[_0x1830a9];return _0x2b6166;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x6635('0x0'))(_0x6635('0x1'));var moment=require(_0x6635('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x6635('0x3'));var config=require(_0x6635('0x4'));var attributes=require(_0x6635('0x5'));module[_0x6635('0x6')]=function(_0x1d0cb3,_0x301d38){return _0x1d0cb3[_0x6635('0x7')](_0x6635('0x8'),attributes,{'tableName':_0x6635('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js
index 9aa8c0a..6902717 100644
--- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js
+++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0f89=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash'];(function(_0x25d67d,_0x37e92f){var _0x4f5fd6=function(_0x157820){while(--_0x157820){_0x25d67d['push'](_0x25d67d['shift']());}};_0x4f5fd6(++_0x37e92f);}(_0x0f89,0x95));var _0x90f8=function(_0x4945de,_0x3e26d9){_0x4945de=_0x4945de-0x0;var _0x3eee61=_0x0f89[_0x4945de];return _0x3eee61;};'use strict';var _=require(_0x90f8('0x0'));var util=require(_0x90f8('0x1'));var moment=require(_0x90f8('0x2'));var BPromise=require(_0x90f8('0x3'));var rs=require(_0x90f8('0x4'));var fs=require('fs');var Redis=require(_0x90f8('0x5'));var db=require(_0x90f8('0x6'))['db'];var utils=require(_0x90f8('0x7'));var logger=require(_0x90f8('0x8'))(_0x90f8('0x9'));var config=require(_0x90f8('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x90f8('0xb')][_0x90f8('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x23868b,_0x421c08,_0x24c717){return new BPromise(function(_0x113d44,_0x1447d5){return client[_0x90f8('0xd')](_0x23868b,_0x24c717)[_0x90f8('0xe')](function(_0x2cfe7b){logger[_0x90f8('0xf')](_0x90f8('0x10'),_0x421c08,_0x90f8('0x11'));logger[_0x90f8('0x12')](_0x90f8('0x13'),_0x421c08,_0x90f8('0x11'),JSON[_0x90f8('0x14')](_0x2cfe7b));if(_0x2cfe7b[_0x90f8('0x15')]){if(_0x2cfe7b[_0x90f8('0x15')]['code']===0x1f4){logger[_0x90f8('0x15')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x421c08,_0x2cfe7b['error']['message']);return _0x1447d5(_0x2cfe7b[_0x90f8('0x15')]['message']);}logger[_0x90f8('0x15')](_0x90f8('0x10'),_0x421c08,_0x2cfe7b[_0x90f8('0x15')][_0x90f8('0x16')]);return _0x113d44(_0x2cfe7b[_0x90f8('0x15')][_0x90f8('0x16')]);}else{logger[_0x90f8('0xf')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x421c08,'request\x20sent');_0x113d44(_0x2cfe7b[_0x90f8('0x17')][_0x90f8('0x16')]);}})[_0x90f8('0x18')](function(_0xed26b4){logger[_0x90f8('0x15')](_0x90f8('0x10'),_0x421c08,_0xed26b4);_0x1447d5(_0xed26b4);});});}
\ No newline at end of file
+var _0xf98d=['JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','then','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xf98d,0xc4));var _0xdf98=function(_0x35cf24,_0x3b299d){_0x35cf24=_0x35cf24-0x0;var _0x266a9a=_0xf98d[_0x35cf24];return _0x266a9a;};'use strict';var _=require('lodash');var util=require(_0xdf98('0x0'));var moment=require(_0xdf98('0x1'));var BPromise=require(_0xdf98('0x2'));var rs=require(_0xdf98('0x3'));var fs=require('fs');var Redis=require(_0xdf98('0x4'));var db=require(_0xdf98('0x5'))['db'];var utils=require(_0xdf98('0x6'));var logger=require(_0xdf98('0x7'))('rpc');var config=require(_0xdf98('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xdf98('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x16cd1f,_0x245dfe,_0x3a87de){return new BPromise(function(_0x1d3785,_0x4e3873){return client[_0xdf98('0xa')](_0x16cd1f,_0x3a87de)[_0xdf98('0xb')](function(_0x4be84c){logger['info'](_0xdf98('0xc'),_0x245dfe,_0xdf98('0xd'));logger['debug'](_0xdf98('0xe'),_0x245dfe,_0xdf98('0xd'),JSON[_0xdf98('0xf')](_0x4be84c));if(_0x4be84c['error']){if(_0x4be84c['error'][_0xdf98('0x10')]===0x1f4){logger[_0xdf98('0x11')](_0xdf98('0xc'),_0x245dfe,_0x4be84c[_0xdf98('0x11')][_0xdf98('0x12')]);return _0x4e3873(_0x4be84c[_0xdf98('0x11')][_0xdf98('0x12')]);}logger[_0xdf98('0x11')](_0xdf98('0xc'),_0x245dfe,_0x4be84c['error'][_0xdf98('0x12')]);return _0x1d3785(_0x4be84c[_0xdf98('0x11')][_0xdf98('0x12')]);}else{logger['info'](_0xdf98('0xc'),_0x245dfe,_0xdf98('0xd'));_0x1d3785(_0x4be84c[_0xdf98('0x13')]['message']);}})[_0xdf98('0x14')](function(_0x506265){logger[_0xdf98('0x11')](_0xdf98('0xc'),_0x245dfe,_0x506265);_0x4e3873(_0x506265);});});}
\ No newline at end of file
diff --git a/server/api/jscriptyProject/index.js b/server/api/jscriptyProject/index.js
index d4eda83..c571a0a 100644
--- a/server/api/jscriptyProject/index.js
+++ b/server/api/jscriptyProject/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2431=['clone','put','update','delete','destroy','exports','multer','express','Router','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','get','isAuthenticated','index','/:id','show','getSessions','/:id/answers','/:id/summary','30s','post','/:id/clone'];(function(_0x41cbba,_0x144068){var _0x11fdf3=function(_0x3fb578){while(--_0x3fb578){_0x41cbba['push'](_0x41cbba['shift']());}};_0x11fdf3(++_0x144068);}(_0x2431,0xbe));var _0x1243=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x2431[_0x59ee6f];return _0x4c0979;};'use strict';var multer=require(_0x1243('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x1243('0x1'));var router=express[_0x1243('0x2')]();var auth=require('../../components/auth/service');var interaction=require(_0x1243('0x3'));var config=require(_0x1243('0x4'));var controller=require(_0x1243('0x5'));router[_0x1243('0x6')]('/',auth[_0x1243('0x7')](),controller[_0x1243('0x8')]);router['get'](_0x1243('0x9'),auth[_0x1243('0x7')](),controller[_0x1243('0xa')]);router[_0x1243('0x6')]('/:id/sessions',auth['isAuthenticated'](),controller[_0x1243('0xb')]);router['get'](_0x1243('0xc'),auth[_0x1243('0x7')](),controller['getAnswers']);router[_0x1243('0x6')](_0x1243('0xd'),auth[_0x1243('0x7')](),timeout(_0x1243('0xe')),controller['getSummary']);router[_0x1243('0xf')]('/',auth[_0x1243('0x7')](),controller['create']);router['post'](_0x1243('0x10'),auth[_0x1243('0x7')](),controller[_0x1243('0x11')]);router[_0x1243('0x12')](_0x1243('0x9'),auth[_0x1243('0x7')](),controller[_0x1243('0x13')]);router[_0x1243('0x14')](_0x1243('0x9'),auth[_0x1243('0x7')](),controller[_0x1243('0x15')]);module[_0x1243('0x16')]=router;
\ No newline at end of file
+var _0x934b=['update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','get','isAuthenticated','index','/:id','show','/:id/sessions','getSessions','/:id/answers','getAnswers','30s','getSummary','post','create','/:id/clone','put'];(function(_0x1ef71d,_0x146c30){var _0x24f61a=function(_0x3bea9f){while(--_0x3bea9f){_0x1ef71d['push'](_0x1ef71d['shift']());}};_0x24f61a(++_0x146c30);}(_0x934b,0xe4));var _0xb934=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0x934b[_0x1a36a5];return _0x746243;};'use strict';var multer=require(_0xb934('0x0'));var util=require(_0xb934('0x1'));var path=require(_0xb934('0x2'));var timeout=require(_0xb934('0x3'));var express=require('express');var router=express[_0xb934('0x4')]();var auth=require(_0xb934('0x5'));var interaction=require(_0xb934('0x6'));var config=require(_0xb934('0x7'));var controller=require(_0xb934('0x8'));router[_0xb934('0x9')]('/',auth[_0xb934('0xa')](),controller[_0xb934('0xb')]);router['get'](_0xb934('0xc'),auth['isAuthenticated'](),controller[_0xb934('0xd')]);router['get'](_0xb934('0xe'),auth[_0xb934('0xa')](),controller[_0xb934('0xf')]);router[_0xb934('0x9')](_0xb934('0x10'),auth[_0xb934('0xa')](),controller[_0xb934('0x11')]);router[_0xb934('0x9')]('/:id/summary',auth[_0xb934('0xa')](),timeout(_0xb934('0x12')),controller[_0xb934('0x13')]);router[_0xb934('0x14')]('/',auth['isAuthenticated'](),controller[_0xb934('0x15')]);router[_0xb934('0x14')](_0xb934('0x16'),auth[_0xb934('0xa')](),controller['clone']);router[_0xb934('0x17')](_0xb934('0xc'),auth[_0xb934('0xa')](),controller[_0xb934('0x18')]);router[_0xb934('0x19')](_0xb934('0xc'),auth['isAuthenticated'](),controller[_0xb934('0x1a')]);module[_0xb934('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.attributes.js b/server/api/jscriptyProject/jscriptyProject.attributes.js
index 524e32e..adeb787 100644
--- a/server/api/jscriptyProject/jscriptyProject.attributes.js
+++ b/server/api/jscriptyProject/jscriptyProject.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe164=['{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','description','util','exports','STRING','name','long','isObjectLike','setDataValue','formData','stringify','isString','format'];(function(_0x56e0e8,_0x16ef91){var _0x2dab50=function(_0x4fe720){while(--_0x4fe720){_0x56e0e8['push'](_0x56e0e8['shift']());}};_0x2dab50(++_0x16ef91);}(_0xe164,0x1a2));var _0x4e16=function(_0x278e3c,_0x1c9cfd){_0x278e3c=_0x278e3c-0x0;var _0x3e2d9b=_0xe164[_0x278e3c];return _0x3e2d9b;};'use strict';var Sequelize=require('sequelize');var _=require('lodash');var util=require(_0x4e16('0x0'));module[_0x4e16('0x1')]={'name':{'type':Sequelize[_0x4e16('0x2')],'unique':_0x4e16('0x3')},'description':{'type':Sequelize[_0x4e16('0x2')]},'formData':{'type':Sequelize['TEXT'](_0x4e16('0x4')),'set':function(_0x317c2b){if(_[_0x4e16('0x5')](_0x317c2b)){this[_0x4e16('0x6')](_0x4e16('0x7'),JSON[_0x4e16('0x8')](_0x317c2b));}else if(_[_0x4e16('0x9')](_0x317c2b)){this[_0x4e16('0x6')]('formData',_0x317c2b);}else{this[_0x4e16('0x6')](_0x4e16('0x7'),util[_0x4e16('0xa')](_0x4e16('0xb'),this['getDataValue'](_0x4e16('0x3'))||'',this['getDataValue'](_0x4e16('0xc'))||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
+var _0x657d=['format','getDataValue','name','description','sequelize','lodash','STRING','TEXT','long','setDataValue','formData','stringify','isString'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x657d,0xc7));var _0xd657=function(_0x3de7e0,_0x28cbff){_0x3de7e0=_0x3de7e0-0x0;var _0x11d0b3=_0x657d[_0x3de7e0];return _0x11d0b3;};'use strict';var Sequelize=require(_0xd657('0x0'));var _=require(_0xd657('0x1'));var util=require('util');module['exports']={'name':{'type':Sequelize[_0xd657('0x2')],'unique':'name'},'description':{'type':Sequelize[_0xd657('0x2')]},'formData':{'type':Sequelize[_0xd657('0x3')](_0xd657('0x4')),'set':function(_0x14c254){if(_['isObjectLike'](_0x14c254)){this[_0xd657('0x5')](_0xd657('0x6'),JSON[_0xd657('0x7')](_0x14c254));}else if(_[_0xd657('0x8')](_0x14c254)){this['setDataValue'](_0xd657('0x6'),_0x14c254);}else{this[_0xd657('0x5')](_0xd657('0x6'),util[_0xd657('0x9')]('{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}',this[_0xd657('0xa')](_0xd657('0xb'))||'',this[_0xd657('0xa')](_0xd657('0xc'))||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.controller.js b/server/api/jscriptyProject/jscriptyProject.controller.js
index 3617887..0975d74 100644
--- a/server/api/jscriptyProject/jscriptyProject.controller.js
+++ b/server/api/jscriptyProject/jscriptyProject.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4a83=['send','index','JscriptyProject','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','sort','merge','where','map','type','VIRTUAL','field','options','includeAll','findAll','catch','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','clone','params','length','createdAt','updatedAt','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getSessions','findOne','JscriptySessionReport','order','ProjectId','rows','getAnswers','JscriptyAnswerReport','pick','filter','number','fromCharCode','toString','indexOf','replace','getSummary','starttime','parse','JscriptyQuestionReport','-createdAt','questionId','question','SessionId','answer','push','isEmpty','writeFileSync','format','setHeader','Content-disposition','attachment;\x20filename=','Jscripty_Project_%d_Summary_%s.csv','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','Content-Range','apply','reject','save','update','then','destroy','get','Projects','UserProfileResource','stack','name'];(function(_0x5ad0d7,_0x2645f8){var _0xd83bd=function(_0x33d3bd){while(--_0x33d3bd){_0x5ad0d7['push'](_0x5ad0d7['shift']());}};_0xd83bd(++_0x2645f8);}(_0x4a83,0xb9));var _0x34a8=function(_0x29a64c,_0x1f78e9){_0x29a64c=_0x29a64c-0x0;var _0x385a8c=_0x4a83[_0x29a64c];return _0x385a8c;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x34a8('0x0'));var zipdir=require(_0x34a8('0x1'));var jsonpatch=require(_0x34a8('0x2'));var rp=require(_0x34a8('0x3'));var moment=require(_0x34a8('0x4'));var BPromise=require(_0x34a8('0x5'));var Mustache=require(_0x34a8('0x6'));var util=require(_0x34a8('0x7'));var path=require(_0x34a8('0x8'));var sox=require(_0x34a8('0x9'));var csv=require(_0x34a8('0xa'));var ejs=require(_0x34a8('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x34a8('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x34a8('0xa'));var querystring=require(_0x34a8('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x34a8('0xe'));var qs=require(_0x34a8('0xf'));var hardwareService=require(_0x34a8('0x10'));var logger=require(_0x34a8('0x11'))(_0x34a8('0x12'));var utils=require(_0x34a8('0x13'));var config=require(_0x34a8('0x14'));var db=require(_0x34a8('0x15'))['db'];function respondWithStatusCode(_0x4f1712,_0x250091){_0x250091=_0x250091||0xcc;return function(_0x487869){if(_0x487869){return _0x4f1712[_0x34a8('0x16')](_0x250091);}return _0x4f1712[_0x34a8('0x17')](_0x250091)[_0x34a8('0x18')]();};}function respondWithResult(_0x2ff9cf,_0x1c51f1){_0x1c51f1=_0x1c51f1||0xc8;return function(_0x2464fb){if(_0x2464fb){return _0x2ff9cf['status'](_0x1c51f1)['json'](_0x2464fb);}};}function respondWithFilteredResult(_0x5e902c,_0x115e77){return function(_0x2ce110){if(_0x2ce110){var _0x310328=_0x2ce110[_0x34a8('0x19')],_0x14cf93=_0x115e77[_0x34a8('0x1a')],_0x1ac625=_0x115e77[_0x34a8('0x1a')]+_0x115e77['limit'],_0x30ef61;if(_0x1ac625>=_0x310328){_0x1ac625=_0x310328;_0x30ef61=0xc8;}else{_0x30ef61=0xce;}_0x5e902c[_0x34a8('0x17')](_0x30ef61);return _0x5e902c['set'](_0x34a8('0x1b'),_0x14cf93+'-'+_0x1ac625+'/'+_0x310328)['json'](_0x2ce110);}return null;};}function patchUpdates(_0x384e36){return function(_0xd01bff){try{jsonpatch[_0x34a8('0x1c')](_0xd01bff,_0x384e36,!![]);}catch(_0x1bddda){return BPromise[_0x34a8('0x1d')](_0x1bddda);}return _0xd01bff[_0x34a8('0x1e')]();};}function saveUpdates(_0x268b2c,_0x541a0c){return function(_0x440308){if(_0x440308){return _0x440308[_0x34a8('0x1f')](_0x268b2c)[_0x34a8('0x20')](function(_0x2a726a){return _0x2a726a;});}return null;};}function removeEntity(_0x37f1fd,_0x471ae5){return function(_0x1584e0){if(_0x1584e0){return _0x1584e0[_0x34a8('0x21')]()[_0x34a8('0x20')](function(){var _0x5972bd=_0x1584e0[_0x34a8('0x22')]({'plain':!![]});var _0x12f0df=_0x34a8('0x23');return db[_0x34a8('0x24')]['destroy']({'where':{'type':_0x12f0df,'resourceId':_0x5972bd['id']}})[_0x34a8('0x20')](function(){return _0x1584e0;});})[_0x34a8('0x20')](function(){_0x37f1fd[_0x34a8('0x17')](0xcc)[_0x34a8('0x18')]();});}};}function handleEntityNotFound(_0x563c7e,_0x3b89c4){return function(_0x12ae69){if(!_0x12ae69){_0x563c7e[_0x34a8('0x16')](0x194);}return _0x12ae69;};}function handleError(_0x34927d,_0x286435){_0x286435=_0x286435||0x1f4;return function(_0x2764e3){logger['error'](_0x2764e3[_0x34a8('0x25')]);if(_0x2764e3[_0x34a8('0x26')]){delete _0x2764e3[_0x34a8('0x26')];}_0x34927d[_0x34a8('0x17')](_0x286435)[_0x34a8('0x27')](_0x2764e3);};}exports[_0x34a8('0x28')]=function(_0x500d70,_0x154cea){var _0x1001a1={},_0x11e043={},_0x5afefd={'count':0x0,'rows':[]};var _0x716498=db[_0x34a8('0x29')][_0x34a8('0x2a')];_0x11e043[_0x34a8('0x2b')]=_[_0x34a8('0x2c')](_0x716498);_0x11e043[_0x34a8('0x2d')]=_[_0x34a8('0x2c')](_0x500d70['query']);_0x11e043[_0x34a8('0x2e')]=_[_0x34a8('0x2f')](_0x11e043[_0x34a8('0x2b')],_0x11e043[_0x34a8('0x2d')]);_0x1001a1[_0x34a8('0x30')]=_[_0x34a8('0x2f')](_0x11e043[_0x34a8('0x2b')],qs[_0x34a8('0x31')](_0x500d70[_0x34a8('0x2d')][_0x34a8('0x31')]));_0x1001a1[_0x34a8('0x30')]=_0x1001a1[_0x34a8('0x30')]['length']?_0x1001a1[_0x34a8('0x30')]:_0x11e043['model'];if(!_0x500d70['query'][_0x34a8('0x32')](_0x34a8('0x33'))){_0x1001a1['limit']=qs[_0x34a8('0x34')](_0x500d70[_0x34a8('0x2d')]['limit']);_0x1001a1[_0x34a8('0x1a')]=qs[_0x34a8('0x1a')](_0x500d70[_0x34a8('0x2d')][_0x34a8('0x1a')]);}_0x1001a1['order']=qs[_0x34a8('0x35')](_0x500d70['query']['sort']);_0x1001a1['where']=qs[_0x34a8('0x2e')](_['pick'](_0x500d70[_0x34a8('0x2d')],_0x11e043[_0x34a8('0x2e')]));if(_0x500d70[_0x34a8('0x2d')]['filter']){_0x1001a1['where']=_[_0x34a8('0x36')](_0x1001a1[_0x34a8('0x37')],{'$or':_[_0x34a8('0x38')](_0x716498,function(_0x1572ba){if(_0x1572ba[_0x34a8('0x39')]['key']!==_0x34a8('0x3a')){var _0x26a050={};_0x26a050[_0x1572ba[_0x34a8('0x3b')]]={'$like':'%'+_0x500d70[_0x34a8('0x2d')]['filter']+'%'};return _0x26a050;}})});}_0x1001a1=_[_0x34a8('0x36')]({},_0x1001a1,_0x500d70[_0x34a8('0x3c')]);var _0x1f47b1={'where':_0x1001a1['where']};return db['JscriptyProject'][_0x34a8('0x19')](_0x1f47b1)[_0x34a8('0x20')](function(_0xba5d5e){_0x5afefd[_0x34a8('0x19')]=_0xba5d5e;if(_0x500d70[_0x34a8('0x2d')][_0x34a8('0x3d')]){_0x1001a1['include']=[{'all':!![]}];}return db['JscriptyProject'][_0x34a8('0x3e')](_0x1001a1);})['then'](function(_0x523de2){_0x5afefd['rows']=_0x523de2;return _0x5afefd;})[_0x34a8('0x20')](respondWithFilteredResult(_0x154cea,_0x1001a1))[_0x34a8('0x3f')](handleError(_0x154cea,null));};exports['show']=function(_0x54d71e,_0x121ea2){var _0x367e99={'raw':![],'where':{'id':_0x54d71e['params']['id']}},_0x40ad99={};_0x40ad99['model']=_['keys'](db[_0x34a8('0x29')][_0x34a8('0x2a')]);_0x40ad99[_0x34a8('0x2d')]=_['keys'](_0x54d71e['query']);_0x40ad99[_0x34a8('0x2e')]=_[_0x34a8('0x2f')](_0x40ad99['model'],_0x40ad99[_0x34a8('0x2d')]);_0x367e99['attributes']=_['intersection'](_0x40ad99[_0x34a8('0x2b')],qs[_0x34a8('0x31')](_0x54d71e[_0x34a8('0x2d')][_0x34a8('0x31')]));_0x367e99[_0x34a8('0x30')]=_0x367e99['attributes']['length']?_0x367e99[_0x34a8('0x30')]:_0x40ad99[_0x34a8('0x2b')];if(_0x54d71e['query'][_0x34a8('0x3d')]){_0x367e99[_0x34a8('0x40')]=[{'all':!![]}];}_0x367e99=_['merge']({},_0x367e99,_0x54d71e[_0x34a8('0x3c')]);return db[_0x34a8('0x29')][_0x34a8('0x41')](_0x367e99)[_0x34a8('0x20')](handleEntityNotFound(_0x121ea2,null))[_0x34a8('0x20')](respondWithResult(_0x121ea2,null))[_0x34a8('0x3f')](handleError(_0x121ea2,null));};exports[_0x34a8('0x42')]=function(_0x1ee543,_0x1eb47f){return db[_0x34a8('0x29')]['create'](_0x1ee543[_0x34a8('0x43')],{})[_0x34a8('0x20')](function(_0x42064e){var _0x414314=_0x1ee543[_0x34a8('0x44')][_0x34a8('0x22')]({'plain':!![]});if(!_0x414314)throw new Error(_0x34a8('0x45'));if(_0x414314['role']===_0x34a8('0x44')){var _0x24aba5=_0x42064e[_0x34a8('0x22')]({'plain':!![]});var _0x4eeb8b=_0x34a8('0x23');return db[_0x34a8('0x46')][_0x34a8('0x41')]({'where':{'name':_0x4eeb8b,'userProfileId':_0x414314['userProfileId']},'raw':!![]})[_0x34a8('0x20')](function(_0x3a7b46){if(_0x3a7b46&&_0x3a7b46['autoAssociation']===0x0){return db[_0x34a8('0x24')][_0x34a8('0x42')]({'name':_0x24aba5[_0x34a8('0x26')],'resourceId':_0x24aba5['id'],'type':_0x3a7b46[_0x34a8('0x26')],'sectionId':_0x3a7b46['id']},{})[_0x34a8('0x20')](function(){return _0x42064e;});}else{return _0x42064e;}})[_0x34a8('0x3f')](function(_0x1d20f9){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1d20f9);throw _0x1d20f9;});}return _0x42064e;})[_0x34a8('0x20')](respondWithResult(_0x1eb47f,0xc9))['catch'](handleError(_0x1eb47f,null));};exports[_0x34a8('0x47')]=function(_0x256064,_0x171355){var _0x433d7={'raw':![],'where':{'id':_0x256064[_0x34a8('0x48')]['id']}},_0x3ee4e9={};_0x3ee4e9[_0x34a8('0x2b')]=_[_0x34a8('0x2c')](db[_0x34a8('0x29')]['rawAttributes']);_0x433d7[_0x34a8('0x30')]=_[_0x34a8('0x2f')](_0x3ee4e9[_0x34a8('0x2b')],qs[_0x34a8('0x31')](_0x256064[_0x34a8('0x2d')]['fields']));_0x433d7[_0x34a8('0x30')]=_0x433d7[_0x34a8('0x30')][_0x34a8('0x49')]?_0x433d7[_0x34a8('0x30')]:_0x3ee4e9['model'];if(_0x256064[_0x34a8('0x2d')][_0x34a8('0x3d')]){_0x433d7[_0x34a8('0x40')]=[{'all':!![]}];}_0x433d7=_['merge']({},_0x433d7,_0x256064[_0x34a8('0x3c')]);return db[_0x34a8('0x29')][_0x34a8('0x41')](_0x433d7)[_0x34a8('0x20')](handleEntityNotFound(_0x171355,null))['then'](function(_0x5d8370){if(_0x5d8370){var _0x43bbf=_0x5d8370[_0x34a8('0x22')]({'plain':!![]});_0x43bbf=qs['omit'](_0x43bbf,['id',_0x34a8('0x4a'),_0x34a8('0x4b')]);_0x256064[_0x34a8('0x43')]=_['omit'](_0x256064[_0x34a8('0x43')],['id',_0x34a8('0x4a'),_0x34a8('0x4b')]);return db[_0x34a8('0x29')][_0x34a8('0x42')](_[_0x34a8('0x36')](_0x43bbf,_0x256064[_0x34a8('0x43')]),{'include':_0x256064['query'][_0x34a8('0x3d')]?[{'all':!![]}]:undefined})[_0x34a8('0x20')](function(_0x18df75){var _0x53f5e1=_0x256064['user'][_0x34a8('0x22')]({'plain':!![]});if(!_0x53f5e1)throw new Error(_0x34a8('0x45'));if(_0x53f5e1[_0x34a8('0x4c')]===_0x34a8('0x44')){var _0x24f519=_0x18df75[_0x34a8('0x22')]({'plain':!![]});var _0x254a55='Projects';return db[_0x34a8('0x46')]['find']({'where':{'name':_0x254a55,'userProfileId':_0x53f5e1[_0x34a8('0x4d')]},'raw':!![]})[_0x34a8('0x20')](function(_0x2dab29){if(_0x2dab29&&_0x2dab29[_0x34a8('0x4e')]===0x0){return db[_0x34a8('0x24')][_0x34a8('0x42')]({'name':_0x24f519[_0x34a8('0x26')],'resourceId':_0x24f519['id'],'type':_0x2dab29[_0x34a8('0x26')],'sectionId':_0x2dab29['id']},{})['then'](function(){return _0x18df75;});}else{return _0x18df75;}})['catch'](function(_0x18e3bb){logger['error'](_0x34a8('0x4f'),_0x18e3bb);throw _0x18e3bb;});}return _0x18df75;});}})['then'](respondWithResult(_0x171355,0xc9))['catch'](handleError(_0x171355,null));};exports['update']=function(_0x5dba7a,_0x50dd6a){if(_0x5dba7a['body']['id']){delete _0x5dba7a[_0x34a8('0x43')]['id'];}return db[_0x34a8('0x29')]['find']({'where':{'id':_0x5dba7a['params']['id']}})[_0x34a8('0x20')](handleEntityNotFound(_0x50dd6a,null))['then'](saveUpdates(_0x5dba7a['body'],null))['then'](respondWithResult(_0x50dd6a,null))[_0x34a8('0x3f')](handleError(_0x50dd6a,null));};exports['destroy']=function(_0x19ef61,_0x4368ca){return db['JscriptyProject']['find']({'where':{'id':_0x19ef61['params']['id']}})[_0x34a8('0x20')](handleEntityNotFound(_0x4368ca,null))[_0x34a8('0x20')](removeEntity(_0x4368ca,null))[_0x34a8('0x3f')](handleError(_0x4368ca,null));};exports[_0x34a8('0x50')]=function(_0x194d5a,_0x43fc39,_0xc00f87){var _0x42dbfa={'raw':!![],'where':{}};var _0x17b3c0={};var _0x12f85f={'count':0x0,'rows':[]};return db[_0x34a8('0x29')][_0x34a8('0x51')]({'where':{'id':_0x194d5a[_0x34a8('0x48')]['id']}})[_0x34a8('0x20')](handleEntityNotFound(_0x43fc39,null))[_0x34a8('0x20')](function(_0x57c1e3){if(_0x57c1e3){_0x17b3c0[_0x34a8('0x2b')]=_['keys'](db[_0x34a8('0x52')]['rawAttributes']);_0x17b3c0[_0x34a8('0x2d')]=_['keys'](_0x194d5a['query']);_0x17b3c0[_0x34a8('0x2e')]=_['intersection'](_0x17b3c0[_0x34a8('0x2b')],_0x17b3c0[_0x34a8('0x2d')]);_0x42dbfa[_0x34a8('0x30')]=_['intersection'](_0x17b3c0['model'],qs[_0x34a8('0x31')](_0x194d5a[_0x34a8('0x2d')]['fields']));_0x42dbfa[_0x34a8('0x30')]=_0x42dbfa[_0x34a8('0x30')][_0x34a8('0x49')]?_0x42dbfa[_0x34a8('0x30')]:_0x17b3c0[_0x34a8('0x2b')];if(!_0x194d5a[_0x34a8('0x2d')][_0x34a8('0x32')]('nolimit')){_0x42dbfa['limit']=qs[_0x34a8('0x34')](_0x194d5a[_0x34a8('0x2d')][_0x34a8('0x34')]);_0x42dbfa[_0x34a8('0x1a')]=qs[_0x34a8('0x1a')](_0x194d5a['query'][_0x34a8('0x1a')]);}_0x42dbfa[_0x34a8('0x53')]=qs[_0x34a8('0x35')](_0x194d5a[_0x34a8('0x2d')][_0x34a8('0x35')]);_0x42dbfa[_0x34a8('0x37')]=qs[_0x34a8('0x2e')](_['pick'](_0x194d5a[_0x34a8('0x2d')],_0x17b3c0['filters']));_0x42dbfa[_0x34a8('0x37')][_0x34a8('0x54')]=_0x57c1e3['id'];if(_0x194d5a[_0x34a8('0x2d')]['filter']){_0x42dbfa[_0x34a8('0x37')]=_[_0x34a8('0x36')](_0x42dbfa[_0x34a8('0x37')],{'$or':_[_0x34a8('0x38')](_0x42dbfa[_0x34a8('0x30')],function(_0x1566ad){var _0x12eb6d={};_0x12eb6d[_0x1566ad]={'$like':'%'+_0x194d5a[_0x34a8('0x2d')]['filter']+'%'};return _0x12eb6d;})});}_0x42dbfa=_[_0x34a8('0x36')]({},_0x42dbfa,_0x194d5a[_0x34a8('0x3c')]);return db[_0x34a8('0x52')][_0x34a8('0x19')]({'where':_0x42dbfa[_0x34a8('0x37')]})[_0x34a8('0x20')](function(_0x2c1973){_0x12f85f[_0x34a8('0x19')]=_0x2c1973;if(_0x194d5a['query'][_0x34a8('0x3d')]){_0x42dbfa[_0x34a8('0x40')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0x34a8('0x3e')](_0x42dbfa);})['then'](function(_0x37fa24){_0x12f85f[_0x34a8('0x55')]=_0x37fa24;return _0x12f85f;});}})['then'](respondWithFilteredResult(_0x43fc39,_0x42dbfa))[_0x34a8('0x3f')](handleError(_0x43fc39,null));};exports[_0x34a8('0x56')]=function(_0x299c5e,_0x387190,_0x31f50d){var _0x6d9eba={'raw':!![],'where':{}};var _0xf4e6c3={};var _0x3c93b6={'count':0x0,'rows':[]};return db[_0x34a8('0x29')][_0x34a8('0x51')]({'where':{'id':_0x299c5e['params']['id']}})[_0x34a8('0x20')](handleEntityNotFound(_0x387190,null))[_0x34a8('0x20')](function(_0x4980ca){if(_0x4980ca){_0xf4e6c3[_0x34a8('0x2b')]=_['keys'](db[_0x34a8('0x57')][_0x34a8('0x2a')]);_0xf4e6c3['query']=_[_0x34a8('0x2c')](_0x299c5e[_0x34a8('0x2d')]);_0xf4e6c3['filters']=_[_0x34a8('0x2f')](_0xf4e6c3[_0x34a8('0x2b')],_0xf4e6c3[_0x34a8('0x2d')]);_0x6d9eba['attributes']=_[_0x34a8('0x2f')](_0xf4e6c3[_0x34a8('0x2b')],qs[_0x34a8('0x31')](_0x299c5e['query'][_0x34a8('0x31')]));_0x6d9eba['attributes']=_0x6d9eba[_0x34a8('0x30')][_0x34a8('0x49')]?_0x6d9eba[_0x34a8('0x30')]:_0xf4e6c3['model'];if(!_0x299c5e['query'][_0x34a8('0x32')](_0x34a8('0x33'))){_0x6d9eba[_0x34a8('0x34')]=qs[_0x34a8('0x34')](_0x299c5e[_0x34a8('0x2d')]['limit']);_0x6d9eba[_0x34a8('0x1a')]=qs[_0x34a8('0x1a')](_0x299c5e[_0x34a8('0x2d')]['offset']);}_0x6d9eba['order']=qs[_0x34a8('0x35')](_0x299c5e[_0x34a8('0x2d')][_0x34a8('0x35')]);_0x6d9eba[_0x34a8('0x37')]=qs[_0x34a8('0x2e')](_[_0x34a8('0x58')](_0x299c5e['query'],_0xf4e6c3['filters']));_0x6d9eba[_0x34a8('0x37')][_0x34a8('0x54')]=_0x4980ca['id'];if(_0x299c5e['query'][_0x34a8('0x59')]){_0x6d9eba[_0x34a8('0x37')]=_[_0x34a8('0x36')](_0x6d9eba['where'],{'$or':_[_0x34a8('0x38')](_0x6d9eba[_0x34a8('0x30')],function(_0x2f5b09){var _0x2f4c37={};_0x2f4c37[_0x2f5b09]={'$like':'%'+_0x299c5e[_0x34a8('0x2d')][_0x34a8('0x59')]+'%'};return _0x2f4c37;})});}_0x6d9eba=_['merge']({},_0x6d9eba,_0x299c5e[_0x34a8('0x3c')]);return db[_0x34a8('0x57')][_0x34a8('0x19')]({'where':_0x6d9eba[_0x34a8('0x37')]})[_0x34a8('0x20')](function(_0x4ea56a){_0x3c93b6[_0x34a8('0x19')]=_0x4ea56a;if(_0x299c5e[_0x34a8('0x2d')]['includeAll']){_0x6d9eba[_0x34a8('0x40')]=[{'all':!![]}];}return db[_0x34a8('0x57')][_0x34a8('0x3e')](_0x6d9eba);})[_0x34a8('0x20')](function(_0x30ce88){_0x3c93b6['rows']=_0x30ce88;return _0x3c93b6;});}})['then'](respondWithFilteredResult(_0x387190,_0x6d9eba))[_0x34a8('0x3f')](handleError(_0x387190,null));};function char(_0x5e4227){return _0x34a8('0x5a')===typeof _0x5e4227?String[_0x34a8('0x5b')]['apply'](null,arguments):_0x5e4227;}function needsEncapsulation(_0x267a6d){return!!_0x267a6d&&(_0x267a6d[_0x34a8('0x5c')]()[_0x34a8('0x5d')](char(0xd))>=0x0||_0x267a6d[_0x34a8('0x5c')]()['indexOf'](char(0xa))>=0x0||_0x267a6d['toString']()[_0x34a8('0x5d')](char(0x2c))>=0x0||_0x267a6d[_0x34a8('0x5c')]()[_0x34a8('0x5d')](char(0x22))>=0x0);}function encapsulate(_0x2b24eb){var _0x538c34=char(0x22),_0x27bbce='\x5c'+char(0x22),_0xac8da2=_0x2b24eb[_0x34a8('0x5c')]()[_0x34a8('0x5e')](new RegExp(_0x538c34,'g'),_0x27bbce);return _0x538c34+_0xac8da2+_0x538c34;}exports[_0x34a8('0x5f')]=function(_0x589bfa,_0x337752,_0x4e3162){var _0xcd0b15,_0x24a1e0;var _0x18edb1={'where':{'ProjectId':_0x589bfa[_0x34a8('0x48')]['id']}};if(_0x589bfa[_0x34a8('0x2d')]['startTime']){_0x18edb1[_0x34a8('0x37')][_0x34a8('0x60')]=JSON[_0x34a8('0x61')](_0x589bfa[_0x34a8('0x2d')]['startTime']);}return db[_0x34a8('0x52')][_0x34a8('0x3e')](_0x18edb1)[_0x34a8('0x20')](handleEntityNotFound(_0x337752,null))[_0x34a8('0x20')](function(_0x2dbce2){if(_0x2dbce2){_0xcd0b15=_0x2dbce2;return db[_0x34a8('0x62')][_0x34a8('0x3e')]({'where':{'SessionId':{'$in':_[_0x34a8('0x38')](_0xcd0b15,'id')},'ProjectId':_0x589bfa[_0x34a8('0x48')]['id']},'order':_0x34a8('0x63')});}})[_0x34a8('0x20')](handleEntityNotFound(_0x337752,null))[_0x34a8('0x20')](function(_0x4edd2d){if(_0x4edd2d){_0x24a1e0=_0x4edd2d;var _0x508bcb={};for(var _0x4a793f=0x0,_0x3ac9cb=_0x24a1e0['length'];_0x4a793f<_0x3ac9cb;_0x4a793f++){if(!_0x508bcb[_0x34a8('0x32')](_0x24a1e0[_0x4a793f][_0x34a8('0x64')])){_0x508bcb[_0x24a1e0[_0x4a793f][_0x34a8('0x64')]]=needsEncapsulation(_0x24a1e0[_0x4a793f][_0x34a8('0x65')])?encapsulate(_0x24a1e0[_0x4a793f][_0x34a8('0x65')]):_0x24a1e0[_0x4a793f][_0x34a8('0x65')];}}var _0x3f86e1=[],_0x2b14c9={};for(var _0x2f9792=0x0,_0x505c59=_0xcd0b15[_0x34a8('0x49')];_0x2f9792<_0x505c59;_0x2f9792++){_0x2b14c9={'ProjectId':_0x589bfa['params']['id'],'SessionId':_0xcd0b15[_0x2f9792]['id'],'StartTime':moment(_0xcd0b15[_0x2f9792][_0x34a8('0x60')])['format']('YYYY-MM-DD\x20HH:mm:ss')};for(var _0x1338c4=0x0,_0xc42d0d=_0x24a1e0['length'];_0x1338c4<_0xc42d0d;_0x1338c4++){if(_0x24a1e0[_0x1338c4][_0x34a8('0x66')]==_0xcd0b15[_0x2f9792]['id']&&_0x508bcb['hasOwnProperty'](_0x24a1e0[_0x1338c4][_0x34a8('0x64')])){_0x2b14c9[_0x508bcb[_0x24a1e0[_0x1338c4][_0x34a8('0x64')]]]=_0x24a1e0[_0x1338c4][_0x34a8('0x67')];}}for(var _0x144855 in _0x508bcb){if(!_0x2b14c9[_0x34a8('0x32')](_0x508bcb[_0x144855])){_0x2b14c9[_0x508bcb[_0x144855]]=null;}}_0x3f86e1[_0x34a8('0x68')](_0x2b14c9);}return _0x3f86e1;}})[_0x34a8('0x20')](function(_0x7ea3c9){if(!_[_0x34a8('0x69')](_0x7ea3c9)){var _0x418c2c=toCsv(_0x7ea3c9);var _0x317596=Date['now']();fs[_0x34a8('0x6a')](util[_0x34a8('0x6b')]('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x589bfa[_0x34a8('0x48')]['id'],_0x317596),_0x418c2c);_0x337752[_0x34a8('0x6c')](_0x34a8('0x6d'),_0x34a8('0x6e')+util[_0x34a8('0x6b')](_0x34a8('0x6f'),_0x589bfa[_0x34a8('0x48')]['id'],_0x317596));_0x337752[_0x34a8('0x6c')]('Content-type','text/csv');return _0x337752['download'](util[_0x34a8('0x6b')]('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x589bfa['params']['id'],_0x317596));}else{return _0x337752['sendStatus'](0xcc);}})['catch'](handleError(_0x337752,null));};
\ No newline at end of file
+var _0xeabc=['html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','set','apply','reject','save','update','destroy','then','Projects','UserProfileResource','error','stack','index','JscriptyProject','model','keys','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','fields','find','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','create','name','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','createdAt','updatedAt','getSessions','JscriptySessionReport','getAnswers','findOne','JscriptyAnswerReport','ProjectId','number','toString','indexOf','getSummary','startTime','starttime','parse','JscriptyQuestionReport','-createdAt','questionId','question','format','YYYY-MM-DD\x20HH:mm:ss','SessionId','answer','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv','setHeader','Content-disposition','Jscripty_Project_%d_Summary_%s.csv','Content-type','text/csv','download'];(function(_0x41d432,_0x20e878){var _0x1650f9=function(_0x27f177){while(--_0x27f177){_0x41d432['push'](_0x41d432['shift']());}};_0x1650f9(++_0x20e878);}(_0xeabc,0x1c4));var _0xceab=function(_0x538978,_0xb6c4f){_0x538978=_0x538978-0x0;var _0x510395=_0xeabc[_0x538978];return _0x510395;};'use strict';var pdf=require(_0xceab('0x0'));var emlformat=require(_0xceab('0x1'));var rimraf=require(_0xceab('0x2'));var zipdir=require(_0xceab('0x3'));var jsonpatch=require(_0xceab('0x4'));var rp=require(_0xceab('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xceab('0x6'));var sox=require(_0xceab('0x7'));var csv=require(_0xceab('0x8'));var ejs=require(_0xceab('0x9'));var fs=require('fs');var _=require(_0xceab('0xa'));var squel=require('squel');var crypto=require(_0xceab('0xb'));var jsforce=require(_0xceab('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xceab('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xceab('0xe'));var qs=require(_0xceab('0xf'));var hardwareService=require(_0xceab('0x10'));var logger=require(_0xceab('0x11'))(_0xceab('0x12'));var utils=require(_0xceab('0x13'));var config=require(_0xceab('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x42ede9,_0x3e411c){_0x3e411c=_0x3e411c||0xcc;return function(_0x5c4801){if(_0x5c4801){return _0x42ede9[_0xceab('0x15')](_0x3e411c);}return _0x42ede9[_0xceab('0x16')](_0x3e411c)[_0xceab('0x17')]();};}function respondWithResult(_0x8580d3,_0x35a34f){_0x35a34f=_0x35a34f||0xc8;return function(_0x180b7d){if(_0x180b7d){return _0x8580d3[_0xceab('0x16')](_0x35a34f)[_0xceab('0x18')](_0x180b7d);}};}function respondWithFilteredResult(_0x315534,_0x201bfb){return function(_0x147843){if(_0x147843){var _0x351589=_0x147843[_0xceab('0x19')],_0x2c7410=_0x201bfb[_0xceab('0x1a')],_0x182e22=_0x201bfb[_0xceab('0x1a')]+_0x201bfb['limit'],_0x3ea442;if(_0x182e22>=_0x351589){_0x182e22=_0x351589;_0x3ea442=0xc8;}else{_0x3ea442=0xce;}_0x315534[_0xceab('0x16')](_0x3ea442);return _0x315534[_0xceab('0x1b')]('Content-Range',_0x2c7410+'-'+_0x182e22+'/'+_0x351589)['json'](_0x147843);}return null;};}function patchUpdates(_0x1cb8d3){return function(_0x21cc6b){try{jsonpatch[_0xceab('0x1c')](_0x21cc6b,_0x1cb8d3,!![]);}catch(_0x1e38b9){return BPromise[_0xceab('0x1d')](_0x1e38b9);}return _0x21cc6b[_0xceab('0x1e')]();};}function saveUpdates(_0x341f65,_0x66b9cd){return function(_0x545ca1){if(_0x545ca1){return _0x545ca1[_0xceab('0x1f')](_0x341f65)['then'](function(_0x270e57){return _0x270e57;});}return null;};}function removeEntity(_0x5b19b5,_0x21fff1){return function(_0x23effc){if(_0x23effc){return _0x23effc[_0xceab('0x20')]()[_0xceab('0x21')](function(){var _0x42215d=_0x23effc['get']({'plain':!![]});var _0x14ff6c=_0xceab('0x22');return db[_0xceab('0x23')][_0xceab('0x20')]({'where':{'type':_0x14ff6c,'resourceId':_0x42215d['id']}})[_0xceab('0x21')](function(){return _0x23effc;});})['then'](function(){_0x5b19b5[_0xceab('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3f2c44,_0x41b8de){return function(_0x4b288c){if(!_0x4b288c){_0x3f2c44['sendStatus'](0x194);}return _0x4b288c;};}function handleError(_0x24df9c,_0x220081){_0x220081=_0x220081||0x1f4;return function(_0x3d121b){logger[_0xceab('0x24')](_0x3d121b[_0xceab('0x25')]);if(_0x3d121b['name']){delete _0x3d121b['name'];}_0x24df9c[_0xceab('0x16')](_0x220081)['send'](_0x3d121b);};}exports[_0xceab('0x26')]=function(_0x23e066,_0x58fd49){var _0x4a3778={},_0x4c5470={},_0x3e2188={'count':0x0,'rows':[]};var _0x22c086=db[_0xceab('0x27')]['rawAttributes'];_0x4c5470[_0xceab('0x28')]=_[_0xceab('0x29')](_0x22c086);_0x4c5470['query']=_[_0xceab('0x29')](_0x23e066[_0xceab('0x2a')]);_0x4c5470[_0xceab('0x2b')]=_[_0xceab('0x2c')](_0x4c5470[_0xceab('0x28')],_0x4c5470['query']);_0x4a3778[_0xceab('0x2d')]=_[_0xceab('0x2c')](_0x4c5470[_0xceab('0x28')],qs['fields'](_0x23e066[_0xceab('0x2a')]['fields']));_0x4a3778['attributes']=_0x4a3778[_0xceab('0x2d')][_0xceab('0x2e')]?_0x4a3778['attributes']:_0x4c5470['model'];if(!_0x23e066[_0xceab('0x2a')][_0xceab('0x2f')](_0xceab('0x30'))){_0x4a3778[_0xceab('0x31')]=qs[_0xceab('0x31')](_0x23e066['query'][_0xceab('0x31')]);_0x4a3778[_0xceab('0x1a')]=qs[_0xceab('0x1a')](_0x23e066['query'][_0xceab('0x1a')]);}_0x4a3778[_0xceab('0x32')]=qs[_0xceab('0x33')](_0x23e066[_0xceab('0x2a')][_0xceab('0x33')]);_0x4a3778[_0xceab('0x34')]=qs['filters'](_[_0xceab('0x35')](_0x23e066[_0xceab('0x2a')],_0x4c5470[_0xceab('0x2b')]));if(_0x23e066[_0xceab('0x2a')][_0xceab('0x36')]){_0x4a3778[_0xceab('0x34')]=_[_0xceab('0x37')](_0x4a3778['where'],{'$or':_[_0xceab('0x38')](_0x22c086,function(_0x3882a9){if(_0x3882a9['type'][_0xceab('0x39')]!==_0xceab('0x3a')){var _0x571785={};_0x571785[_0x3882a9[_0xceab('0x3b')]]={'$like':'%'+_0x23e066[_0xceab('0x2a')][_0xceab('0x36')]+'%'};return _0x571785;}})});}_0x4a3778=_[_0xceab('0x37')]({},_0x4a3778,_0x23e066[_0xceab('0x3c')]);var _0x92a74b={'where':_0x4a3778['where']};return db[_0xceab('0x27')]['count'](_0x92a74b)['then'](function(_0x350668){_0x3e2188[_0xceab('0x19')]=_0x350668;if(_0x23e066[_0xceab('0x2a')][_0xceab('0x3d')]){_0x4a3778[_0xceab('0x3e')]=[{'all':!![]}];}return db['JscriptyProject'][_0xceab('0x3f')](_0x4a3778);})['then'](function(_0x2c2c2c){_0x3e2188[_0xceab('0x40')]=_0x2c2c2c;return _0x3e2188;})['then'](respondWithFilteredResult(_0x58fd49,_0x4a3778))[_0xceab('0x41')](handleError(_0x58fd49,null));};exports[_0xceab('0x42')]=function(_0x5ac319,_0x2130c5){var _0x439c85={'raw':![],'where':{'id':_0x5ac319[_0xceab('0x43')]['id']}},_0xab174a={};_0xab174a[_0xceab('0x28')]=_[_0xceab('0x29')](db[_0xceab('0x27')][_0xceab('0x44')]);_0xab174a[_0xceab('0x2a')]=_[_0xceab('0x29')](_0x5ac319['query']);_0xab174a[_0xceab('0x2b')]=_['intersection'](_0xab174a[_0xceab('0x28')],_0xab174a[_0xceab('0x2a')]);_0x439c85[_0xceab('0x2d')]=_[_0xceab('0x2c')](_0xab174a[_0xceab('0x28')],qs['fields'](_0x5ac319['query'][_0xceab('0x45')]));_0x439c85[_0xceab('0x2d')]=_0x439c85[_0xceab('0x2d')][_0xceab('0x2e')]?_0x439c85[_0xceab('0x2d')]:_0xab174a[_0xceab('0x28')];if(_0x5ac319[_0xceab('0x2a')][_0xceab('0x3d')]){_0x439c85[_0xceab('0x3e')]=[{'all':!![]}];}_0x439c85=_[_0xceab('0x37')]({},_0x439c85,_0x5ac319['options']);return db[_0xceab('0x27')][_0xceab('0x46')](_0x439c85)[_0xceab('0x21')](handleEntityNotFound(_0x2130c5,null))[_0xceab('0x21')](respondWithResult(_0x2130c5,null))['catch'](handleError(_0x2130c5,null));};exports['create']=function(_0x4013f7,_0x471122){return db[_0xceab('0x27')]['create'](_0x4013f7[_0xceab('0x47')],{})[_0xceab('0x21')](function(_0x468c78){var _0x15d6e6=_0x4013f7[_0xceab('0x48')][_0xceab('0x49')]({'plain':!![]});if(!_0x15d6e6)throw new Error(_0xceab('0x4a'));if(_0x15d6e6['role']===_0xceab('0x48')){var _0x3d3470=_0x468c78[_0xceab('0x49')]({'plain':!![]});var _0x1e707f='Projects';return db['UserProfileSection']['find']({'where':{'name':_0x1e707f,'userProfileId':_0x15d6e6[_0xceab('0x4b')]},'raw':!![]})[_0xceab('0x21')](function(_0x3e4ac8){if(_0x3e4ac8&&_0x3e4ac8[_0xceab('0x4c')]===0x0){return db[_0xceab('0x23')][_0xceab('0x4d')]({'name':_0x3d3470[_0xceab('0x4e')],'resourceId':_0x3d3470['id'],'type':_0x3e4ac8['name'],'sectionId':_0x3e4ac8['id']},{})[_0xceab('0x21')](function(){return _0x468c78;});}else{return _0x468c78;}})[_0xceab('0x41')](function(_0x397406){logger[_0xceab('0x24')](_0xceab('0x4f'),_0x397406);throw _0x397406;});}return _0x468c78;})['then'](respondWithResult(_0x471122,0xc9))['catch'](handleError(_0x471122,null));};exports[_0xceab('0x50')]=function(_0x137c82,_0x470043){var _0x368522={'raw':![],'where':{'id':_0x137c82[_0xceab('0x43')]['id']}},_0x7371a4={};_0x7371a4[_0xceab('0x28')]=_[_0xceab('0x29')](db[_0xceab('0x27')]['rawAttributes']);_0x368522[_0xceab('0x2d')]=_[_0xceab('0x2c')](_0x7371a4[_0xceab('0x28')],qs['fields'](_0x137c82[_0xceab('0x2a')][_0xceab('0x45')]));_0x368522['attributes']=_0x368522[_0xceab('0x2d')][_0xceab('0x2e')]?_0x368522[_0xceab('0x2d')]:_0x7371a4[_0xceab('0x28')];if(_0x137c82[_0xceab('0x2a')][_0xceab('0x3d')]){_0x368522[_0xceab('0x3e')]=[{'all':!![]}];}_0x368522=_[_0xceab('0x37')]({},_0x368522,_0x137c82[_0xceab('0x3c')]);return db['JscriptyProject'][_0xceab('0x46')](_0x368522)['then'](handleEntityNotFound(_0x470043,null))[_0xceab('0x21')](function(_0x585297){if(_0x585297){var _0x441c63=_0x585297[_0xceab('0x49')]({'plain':!![]});_0x441c63=qs[_0xceab('0x51')](_0x441c63,['id',_0xceab('0x52'),_0xceab('0x53')]);_0x137c82['body']=_[_0xceab('0x51')](_0x137c82[_0xceab('0x47')],['id',_0xceab('0x52'),_0xceab('0x53')]);return db[_0xceab('0x27')]['create'](_['merge'](_0x441c63,_0x137c82[_0xceab('0x47')]),{'include':_0x137c82[_0xceab('0x2a')][_0xceab('0x3d')]?[{'all':!![]}]:undefined})[_0xceab('0x21')](function(_0x46817f){var _0x345e50=_0x137c82[_0xceab('0x48')]['get']({'plain':!![]});if(!_0x345e50)throw new Error(_0xceab('0x4a'));if(_0x345e50['role']==='user'){var _0x37e297=_0x46817f[_0xceab('0x49')]({'plain':!![]});var _0x5ec0b5='Projects';return db['UserProfileSection'][_0xceab('0x46')]({'where':{'name':_0x5ec0b5,'userProfileId':_0x345e50['userProfileId']},'raw':!![]})[_0xceab('0x21')](function(_0x14e405){if(_0x14e405&&_0x14e405[_0xceab('0x4c')]===0x0){return db[_0xceab('0x23')][_0xceab('0x4d')]({'name':_0x37e297[_0xceab('0x4e')],'resourceId':_0x37e297['id'],'type':_0x14e405[_0xceab('0x4e')],'sectionId':_0x14e405['id']},{})[_0xceab('0x21')](function(){return _0x46817f;});}else{return _0x46817f;}})[_0xceab('0x41')](function(_0x39e78a){logger[_0xceab('0x24')](_0xceab('0x4f'),_0x39e78a);throw _0x39e78a;});}return _0x46817f;});}})[_0xceab('0x21')](respondWithResult(_0x470043,0xc9))[_0xceab('0x41')](handleError(_0x470043,null));};exports['update']=function(_0x52f32f,_0x32cc66){if(_0x52f32f['body']['id']){delete _0x52f32f['body']['id'];}return db[_0xceab('0x27')][_0xceab('0x46')]({'where':{'id':_0x52f32f[_0xceab('0x43')]['id']}})[_0xceab('0x21')](handleEntityNotFound(_0x32cc66,null))[_0xceab('0x21')](saveUpdates(_0x52f32f[_0xceab('0x47')],null))['then'](respondWithResult(_0x32cc66,null))[_0xceab('0x41')](handleError(_0x32cc66,null));};exports[_0xceab('0x20')]=function(_0x568432,_0x25f6a2){return db[_0xceab('0x27')][_0xceab('0x46')]({'where':{'id':_0x568432[_0xceab('0x43')]['id']}})[_0xceab('0x21')](handleEntityNotFound(_0x25f6a2,null))['then'](removeEntity(_0x25f6a2,null))['catch'](handleError(_0x25f6a2,null));};exports[_0xceab('0x54')]=function(_0x5aabca,_0xa92186,_0x281f58){var _0x50431d={'raw':!![],'where':{}};var _0x2d55f9={};var _0x4c8daa={'count':0x0,'rows':[]};return db[_0xceab('0x27')]['findOne']({'where':{'id':_0x5aabca['params']['id']}})[_0xceab('0x21')](handleEntityNotFound(_0xa92186,null))[_0xceab('0x21')](function(_0x1cc8f2){if(_0x1cc8f2){_0x2d55f9[_0xceab('0x28')]=_['keys'](db[_0xceab('0x55')][_0xceab('0x44')]);_0x2d55f9[_0xceab('0x2a')]=_[_0xceab('0x29')](_0x5aabca['query']);_0x2d55f9[_0xceab('0x2b')]=_['intersection'](_0x2d55f9[_0xceab('0x28')],_0x2d55f9[_0xceab('0x2a')]);_0x50431d['attributes']=_['intersection'](_0x2d55f9[_0xceab('0x28')],qs[_0xceab('0x45')](_0x5aabca[_0xceab('0x2a')][_0xceab('0x45')]));_0x50431d['attributes']=_0x50431d[_0xceab('0x2d')][_0xceab('0x2e')]?_0x50431d['attributes']:_0x2d55f9[_0xceab('0x28')];if(!_0x5aabca['query'][_0xceab('0x2f')](_0xceab('0x30'))){_0x50431d[_0xceab('0x31')]=qs['limit'](_0x5aabca[_0xceab('0x2a')][_0xceab('0x31')]);_0x50431d['offset']=qs[_0xceab('0x1a')](_0x5aabca[_0xceab('0x2a')][_0xceab('0x1a')]);}_0x50431d['order']=qs['sort'](_0x5aabca[_0xceab('0x2a')]['sort']);_0x50431d[_0xceab('0x34')]=qs['filters'](_['pick'](_0x5aabca[_0xceab('0x2a')],_0x2d55f9['filters']));_0x50431d[_0xceab('0x34')]['ProjectId']=_0x1cc8f2['id'];if(_0x5aabca[_0xceab('0x2a')][_0xceab('0x36')]){_0x50431d[_0xceab('0x34')]=_['merge'](_0x50431d[_0xceab('0x34')],{'$or':_[_0xceab('0x38')](_0x50431d[_0xceab('0x2d')],function(_0x277ab2){var _0x826858={};_0x826858[_0x277ab2]={'$like':'%'+_0x5aabca[_0xceab('0x2a')][_0xceab('0x36')]+'%'};return _0x826858;})});}_0x50431d=_[_0xceab('0x37')]({},_0x50431d,_0x5aabca[_0xceab('0x3c')]);return db[_0xceab('0x55')][_0xceab('0x19')]({'where':_0x50431d[_0xceab('0x34')]})[_0xceab('0x21')](function(_0x4ac55a){_0x4c8daa[_0xceab('0x19')]=_0x4ac55a;if(_0x5aabca['query'][_0xceab('0x3d')]){_0x50431d[_0xceab('0x3e')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0xceab('0x3f')](_0x50431d);})[_0xceab('0x21')](function(_0x471d71){_0x4c8daa[_0xceab('0x40')]=_0x471d71;return _0x4c8daa;});}})[_0xceab('0x21')](respondWithFilteredResult(_0xa92186,_0x50431d))[_0xceab('0x41')](handleError(_0xa92186,null));};exports[_0xceab('0x56')]=function(_0x246412,_0x4337fd,_0x5bf78c){var _0x2dab68={'raw':!![],'where':{}};var _0x4e03a5={};var _0x113b31={'count':0x0,'rows':[]};return db[_0xceab('0x27')][_0xceab('0x57')]({'where':{'id':_0x246412[_0xceab('0x43')]['id']}})[_0xceab('0x21')](handleEntityNotFound(_0x4337fd,null))[_0xceab('0x21')](function(_0x9c29b1){if(_0x9c29b1){_0x4e03a5[_0xceab('0x28')]=_[_0xceab('0x29')](db[_0xceab('0x58')]['rawAttributes']);_0x4e03a5[_0xceab('0x2a')]=_[_0xceab('0x29')](_0x246412[_0xceab('0x2a')]);_0x4e03a5[_0xceab('0x2b')]=_[_0xceab('0x2c')](_0x4e03a5['model'],_0x4e03a5['query']);_0x2dab68[_0xceab('0x2d')]=_['intersection'](_0x4e03a5[_0xceab('0x28')],qs[_0xceab('0x45')](_0x246412['query'][_0xceab('0x45')]));_0x2dab68[_0xceab('0x2d')]=_0x2dab68[_0xceab('0x2d')]['length']?_0x2dab68[_0xceab('0x2d')]:_0x4e03a5[_0xceab('0x28')];if(!_0x246412[_0xceab('0x2a')][_0xceab('0x2f')](_0xceab('0x30'))){_0x2dab68[_0xceab('0x31')]=qs['limit'](_0x246412[_0xceab('0x2a')]['limit']);_0x2dab68[_0xceab('0x1a')]=qs[_0xceab('0x1a')](_0x246412[_0xceab('0x2a')][_0xceab('0x1a')]);}_0x2dab68[_0xceab('0x32')]=qs['sort'](_0x246412['query'][_0xceab('0x33')]);_0x2dab68[_0xceab('0x34')]=qs['filters'](_[_0xceab('0x35')](_0x246412[_0xceab('0x2a')],_0x4e03a5[_0xceab('0x2b')]));_0x2dab68['where'][_0xceab('0x59')]=_0x9c29b1['id'];if(_0x246412[_0xceab('0x2a')][_0xceab('0x36')]){_0x2dab68[_0xceab('0x34')]=_[_0xceab('0x37')](_0x2dab68[_0xceab('0x34')],{'$or':_['map'](_0x2dab68['attributes'],function(_0x453a24){var _0x353f50={};_0x353f50[_0x453a24]={'$like':'%'+_0x246412[_0xceab('0x2a')]['filter']+'%'};return _0x353f50;})});}_0x2dab68=_[_0xceab('0x37')]({},_0x2dab68,_0x246412[_0xceab('0x3c')]);return db[_0xceab('0x58')][_0xceab('0x19')]({'where':_0x2dab68[_0xceab('0x34')]})[_0xceab('0x21')](function(_0x407e05){_0x113b31[_0xceab('0x19')]=_0x407e05;if(_0x246412['query'][_0xceab('0x3d')]){_0x2dab68[_0xceab('0x3e')]=[{'all':!![]}];}return db[_0xceab('0x58')][_0xceab('0x3f')](_0x2dab68);})[_0xceab('0x21')](function(_0x41ab11){_0x113b31[_0xceab('0x40')]=_0x41ab11;return _0x113b31;});}})[_0xceab('0x21')](respondWithFilteredResult(_0x4337fd,_0x2dab68))[_0xceab('0x41')](handleError(_0x4337fd,null));};function char(_0x1bdf74){return _0xceab('0x5a')===typeof _0x1bdf74?String['fromCharCode'][_0xceab('0x1c')](null,arguments):_0x1bdf74;}function needsEncapsulation(_0x513dcc){return!!_0x513dcc&&(_0x513dcc[_0xceab('0x5b')]()[_0xceab('0x5c')](char(0xd))>=0x0||_0x513dcc[_0xceab('0x5b')]()[_0xceab('0x5c')](char(0xa))>=0x0||_0x513dcc[_0xceab('0x5b')]()['indexOf'](char(0x2c))>=0x0||_0x513dcc['toString']()['indexOf'](char(0x22))>=0x0);}function encapsulate(_0x2b1d7a){var _0x4e212f=char(0x22),_0x1cc67a='\x5c'+char(0x22),_0x280086=_0x2b1d7a['toString']()['replace'](new RegExp(_0x4e212f,'g'),_0x1cc67a);return _0x4e212f+_0x280086+_0x4e212f;}exports[_0xceab('0x5d')]=function(_0xa73ba2,_0x283aea,_0x4d089c){var _0x51fad2,_0x4cce38;var _0x599632={'where':{'ProjectId':_0xa73ba2[_0xceab('0x43')]['id']}};if(_0xa73ba2['query'][_0xceab('0x5e')]){_0x599632[_0xceab('0x34')][_0xceab('0x5f')]=JSON[_0xceab('0x60')](_0xa73ba2[_0xceab('0x2a')]['startTime']);}return db[_0xceab('0x55')][_0xceab('0x3f')](_0x599632)[_0xceab('0x21')](handleEntityNotFound(_0x283aea,null))[_0xceab('0x21')](function(_0x9ef9e){if(_0x9ef9e){_0x51fad2=_0x9ef9e;return db[_0xceab('0x61')]['findAll']({'where':{'SessionId':{'$in':_[_0xceab('0x38')](_0x51fad2,'id')},'ProjectId':_0xa73ba2['params']['id']},'order':_0xceab('0x62')});}})['then'](handleEntityNotFound(_0x283aea,null))[_0xceab('0x21')](function(_0x429379){if(_0x429379){_0x4cce38=_0x429379;var _0x5d7b29={};for(var _0x443cd0=0x0,_0x26e2cb=_0x4cce38[_0xceab('0x2e')];_0x443cd0<_0x26e2cb;_0x443cd0++){if(!_0x5d7b29['hasOwnProperty'](_0x4cce38[_0x443cd0][_0xceab('0x63')])){_0x5d7b29[_0x4cce38[_0x443cd0][_0xceab('0x63')]]=needsEncapsulation(_0x4cce38[_0x443cd0][_0xceab('0x64')])?encapsulate(_0x4cce38[_0x443cd0][_0xceab('0x64')]):_0x4cce38[_0x443cd0][_0xceab('0x64')];}}var _0x590062=[],_0x3d98c5={};for(var _0xeebfda=0x0,_0x2de779=_0x51fad2[_0xceab('0x2e')];_0xeebfda<_0x2de779;_0xeebfda++){_0x3d98c5={'ProjectId':_0xa73ba2[_0xceab('0x43')]['id'],'SessionId':_0x51fad2[_0xeebfda]['id'],'StartTime':moment(_0x51fad2[_0xeebfda][_0xceab('0x5f')])[_0xceab('0x65')](_0xceab('0x66'))};for(var _0x3bc644=0x0,_0x105428=_0x4cce38[_0xceab('0x2e')];_0x3bc644<_0x105428;_0x3bc644++){if(_0x4cce38[_0x3bc644][_0xceab('0x67')]==_0x51fad2[_0xeebfda]['id']&&_0x5d7b29[_0xceab('0x2f')](_0x4cce38[_0x3bc644][_0xceab('0x63')])){_0x3d98c5[_0x5d7b29[_0x4cce38[_0x3bc644]['questionId']]]=_0x4cce38[_0x3bc644][_0xceab('0x68')];}}for(var _0x4186a4 in _0x5d7b29){if(!_0x3d98c5[_0xceab('0x2f')](_0x5d7b29[_0x4186a4])){_0x3d98c5[_0x5d7b29[_0x4186a4]]=null;}}_0x590062['push'](_0x3d98c5);}return _0x590062;}})[_0xceab('0x21')](function(_0x320c8f){if(!_['isEmpty'](_0x320c8f)){var _0x2918e3=toCsv(_0x320c8f);var _0x5e5d4a=Date['now']();fs[_0xceab('0x69')](util[_0xceab('0x65')](_0xceab('0x6a'),_0xa73ba2[_0xceab('0x43')]['id'],_0x5e5d4a),_0x2918e3);_0x283aea[_0xceab('0x6b')](_0xceab('0x6c'),'attachment;\x20filename='+util[_0xceab('0x65')](_0xceab('0x6d'),_0xa73ba2[_0xceab('0x43')]['id'],_0x5e5d4a));_0x283aea[_0xceab('0x6b')](_0xceab('0x6e'),_0xceab('0x6f'));return _0x283aea[_0xceab('0x70')](util[_0xceab('0x65')]('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0xa73ba2[_0xceab('0x43')]['id'],_0x5e5d4a));}else{return _0x283aea['sendStatus'](0xcc);}})[_0xceab('0x41')](handleError(_0x283aea,null));};
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.model.js b/server/api/jscriptyProject/jscriptyProject.model.js
index 3bc8503..550e4c4 100644
--- a/server/api/jscriptyProject/jscriptyProject.model.js
+++ b/server/api/jscriptyProject/jscriptyProject.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9b8e=['exports','define','JscriptyProject','jscripty_projects','lodash','../../config/logger','api','request-promise','rimraf','../../config/environment'];(function(_0x46973e,_0x5042b0){var _0xa9e2cd=function(_0x446c4b){while(--_0x446c4b){_0x46973e['push'](_0x46973e['shift']());}};_0xa9e2cd(++_0x5042b0);}(_0x9b8e,0x158));var _0xe9b8=function(_0x1f45af,_0x11ae99){_0x1f45af=_0x1f45af-0x0;var _0x17833d=_0x9b8e[_0x1f45af];return _0x17833d;};'use strict';var _=require(_0xe9b8('0x0'));var util=require('util');var logger=require(_0xe9b8('0x1'))(_0xe9b8('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xe9b8('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe9b8('0x4'));var config=require(_0xe9b8('0x5'));var attributes=require('./jscriptyProject.attributes');module[_0xe9b8('0x6')]=function(_0x3d24e3,_0x3f6b50){return _0x3d24e3[_0xe9b8('0x7')](_0xe9b8('0x8'),attributes,{'tableName':_0xe9b8('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7163=['lodash','api','moment','bluebird','path','rimraf','../../config/environment','./jscriptyProject.attributes','define','JscriptyProject','jscripty_projects'];(function(_0x3ab928,_0x2b990b){var _0xf47692=function(_0x311b8e){while(--_0x311b8e){_0x3ab928['push'](_0x3ab928['shift']());}};_0xf47692(++_0x2b990b);}(_0x7163,0x1ef));var _0x3716=function(_0x32f7d7,_0x54231b){_0x32f7d7=_0x32f7d7-0x0;var _0x133d09=_0x7163[_0x32f7d7];return _0x133d09;};'use strict';var _=require(_0x3716('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x3716('0x1'));var moment=require(_0x3716('0x2'));var BPromise=require(_0x3716('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3716('0x4'));var rimraf=require(_0x3716('0x5'));var config=require(_0x3716('0x6'));var attributes=require(_0x3716('0x7'));module['exports']=function(_0x5c81bb,_0x3112a7){return _0x5c81bb[_0x3716('0x8')](_0x3716('0x9'),attributes,{'tableName':_0x3716('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.rpc.js b/server/api/jscriptyProject/jscriptyProject.rpc.js
index 911d0f0..c5dbfac 100644
--- a/server/api/jscriptyProject/jscriptyProject.rpc.js
+++ b/server/api/jscriptyProject/jscriptyProject.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa042=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','error','code','message','lodash','util','moment','randomstring'];(function(_0x22ec59,_0x479d5e){var _0x5bb6fb=function(_0x242ac8){while(--_0x242ac8){_0x22ec59['push'](_0x22ec59['shift']());}};_0x5bb6fb(++_0x479d5e);}(_0xa042,0xee));var _0x2a04=function(_0x4fda7,_0x8a0ea2){_0x4fda7=_0x4fda7-0x0;var _0xe1dab6=_0xa042[_0x4fda7];return _0xe1dab6;};'use strict';var _=require(_0x2a04('0x0'));var util=require(_0x2a04('0x1'));var moment=require(_0x2a04('0x2'));var BPromise=require('bluebird');var rs=require(_0x2a04('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2a04('0x4'))['db'];var utils=require(_0x2a04('0x5'));var logger=require(_0x2a04('0x6'))(_0x2a04('0x7'));var config=require(_0x2a04('0x8'));var jayson=require(_0x2a04('0x9'));var client=jayson[_0x2a04('0xa')][_0x2a04('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x19c37e,_0x29da24,_0x2e54e6){return new BPromise(function(_0xd93ecf,_0xf5ab5c){return client[_0x2a04('0xc')](_0x19c37e,_0x2e54e6)[_0x2a04('0xd')](function(_0x21bf37){logger[_0x2a04('0xe')](_0x2a04('0xf'),_0x29da24,_0x2a04('0x10'));logger[_0x2a04('0x11')](_0x2a04('0x12'),_0x29da24,_0x2a04('0x10'),JSON['stringify'](_0x21bf37));if(_0x21bf37[_0x2a04('0x13')]){if(_0x21bf37['error'][_0x2a04('0x14')]===0x1f4){logger['error'](_0x2a04('0xf'),_0x29da24,_0x21bf37[_0x2a04('0x13')]['message']);return _0xf5ab5c(_0x21bf37[_0x2a04('0x13')][_0x2a04('0x15')]);}logger[_0x2a04('0x13')](_0x2a04('0xf'),_0x29da24,_0x21bf37[_0x2a04('0x13')][_0x2a04('0x15')]);return _0xd93ecf(_0x21bf37[_0x2a04('0x13')]['message']);}else{logger[_0x2a04('0xe')](_0x2a04('0xf'),_0x29da24,_0x2a04('0x10'));_0xd93ecf(_0x21bf37['result'][_0x2a04('0x15')]);}})['catch'](function(_0xbdf801){logger[_0x2a04('0x13')](_0x2a04('0xf'),_0x29da24,_0xbdf801);_0xf5ab5c(_0xbdf801);});});}
\ No newline at end of file
+var _0x905c=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb'];(function(_0x469ac7,_0x38e416){var _0x22f3b0=function(_0x1a1447){while(--_0x1a1447){_0x469ac7['push'](_0x469ac7['shift']());}};_0x22f3b0(++_0x38e416);}(_0x905c,0xf7));var _0xc905=function(_0x58f06e,_0x43472b){_0x58f06e=_0x58f06e-0x0;var _0x564a9a=_0x905c[_0x58f06e];return _0x564a9a;};'use strict';var _=require(_0xc905('0x0'));var util=require(_0xc905('0x1'));var moment=require(_0xc905('0x2'));var BPromise=require(_0xc905('0x3'));var rs=require(_0xc905('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc905('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xc905('0x6'))(_0xc905('0x7'));var config=require(_0xc905('0x8'));var jayson=require(_0xc905('0x9'));var client=jayson[_0xc905('0xa')][_0xc905('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1ad650,_0x57c792,_0x3fc687){return new BPromise(function(_0x15c2c1,_0x8c47f){return client[_0xc905('0xc')](_0x1ad650,_0x3fc687)[_0xc905('0xd')](function(_0x2722b8){logger['info'](_0xc905('0xe'),_0x57c792,_0xc905('0xf'));logger[_0xc905('0x10')]('JscriptyProject,\x20%s,\x20%s,\x20%s',_0x57c792,_0xc905('0xf'),JSON[_0xc905('0x11')](_0x2722b8));if(_0x2722b8[_0xc905('0x12')]){if(_0x2722b8[_0xc905('0x12')]['code']===0x1f4){logger[_0xc905('0x12')](_0xc905('0xe'),_0x57c792,_0x2722b8[_0xc905('0x12')][_0xc905('0x13')]);return _0x8c47f(_0x2722b8[_0xc905('0x12')][_0xc905('0x13')]);}logger['error'](_0xc905('0xe'),_0x57c792,_0x2722b8['error']['message']);return _0x15c2c1(_0x2722b8[_0xc905('0x12')][_0xc905('0x13')]);}else{logger[_0xc905('0x14')](_0xc905('0xe'),_0x57c792,_0xc905('0xf'));_0x15c2c1(_0x2722b8[_0xc905('0x15')][_0xc905('0x13')]);}})[_0xc905('0x16')](function(_0x5aec79){logger[_0xc905('0x12')](_0xc905('0xe'),_0x57c792,_0x5aec79);_0x8c47f(_0x5aec79);});});}
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/index.js b/server/api/jscriptyQuestionReport/index.js
index 451661e..16ce1d2 100644
--- a/server/api/jscriptyQuestionReport/index.js
+++ b/server/api/jscriptyQuestionReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9892=['/:id','show','post','put','update','destroy','exports','multer','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe'];(function(_0x5abf53,_0x2adc7a){var _0x228287=function(_0x51ecc4){while(--_0x51ecc4){_0x5abf53['push'](_0x5abf53['shift']());}};_0x228287(++_0x2adc7a);}(_0x9892,0xa9));var _0x2989=function(_0x4f2f0d,_0x2416b9){_0x4f2f0d=_0x4f2f0d-0x0;var _0x39b727=_0x9892[_0x4f2f0d];return _0x39b727;};'use strict';var multer=require(_0x2989('0x0'));var util=require('util');var path=require(_0x2989('0x1'));var timeout=require('connect-timeout');var express=require(_0x2989('0x2'));var router=express['Router']();var auth=require(_0x2989('0x3'));var interaction=require(_0x2989('0x4'));var config=require(_0x2989('0x5'));var controller=require('./jscriptyQuestionReport.controller');router[_0x2989('0x6')]('/',auth[_0x2989('0x7')](),controller[_0x2989('0x8')]);router[_0x2989('0x6')](_0x2989('0x9'),auth[_0x2989('0x7')](),controller[_0x2989('0xa')]);router[_0x2989('0x6')](_0x2989('0xb'),auth[_0x2989('0x7')](),controller[_0x2989('0xc')]);router[_0x2989('0xd')]('/',auth[_0x2989('0x7')](),controller['create']);router[_0x2989('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x2989('0xf')]);router['delete'](_0x2989('0xb'),auth[_0x2989('0x7')](),controller[_0x2989('0x10')]);module[_0x2989('0x11')]=router;
\ No newline at end of file
+var _0xdb37=['get','isAuthenticated','index','/describe','describe','/:id','show','post','create','put','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyQuestionReport.controller'];(function(_0x1f69d3,_0x4d1d40){var _0x491b42=function(_0x45d377){while(--_0x45d377){_0x1f69d3['push'](_0x1f69d3['shift']());}};_0x491b42(++_0x4d1d40);}(_0xdb37,0x1d3));var _0x7db3=function(_0x56a4f7,_0x56fe21){_0x56a4f7=_0x56a4f7-0x0;var _0x372152=_0xdb37[_0x56a4f7];return _0x372152;};'use strict';var multer=require(_0x7db3('0x0'));var util=require(_0x7db3('0x1'));var path=require(_0x7db3('0x2'));var timeout=require('connect-timeout');var express=require(_0x7db3('0x3'));var router=express['Router']();var auth=require(_0x7db3('0x4'));var interaction=require(_0x7db3('0x5'));var config=require(_0x7db3('0x6'));var controller=require(_0x7db3('0x7'));router[_0x7db3('0x8')]('/',auth[_0x7db3('0x9')](),controller[_0x7db3('0xa')]);router[_0x7db3('0x8')](_0x7db3('0xb'),auth[_0x7db3('0x9')](),controller[_0x7db3('0xc')]);router[_0x7db3('0x8')](_0x7db3('0xd'),auth[_0x7db3('0x9')](),controller[_0x7db3('0xe')]);router[_0x7db3('0xf')]('/',auth[_0x7db3('0x9')](),controller[_0x7db3('0x10')]);router[_0x7db3('0x11')](_0x7db3('0xd'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x7db3('0xd'),auth[_0x7db3('0x9')](),controller['destroy']);module[_0x7db3('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js
index d3f075d..2735b77 100644
--- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js
+++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x87f8=['long','STRING','TEXT'];(function(_0x4094b1,_0x32598c){var _0x5d0cd2=function(_0x2e669f){while(--_0x2e669f){_0x4094b1['push'](_0x4094b1['shift']());}};_0x5d0cd2(++_0x32598c);}(_0x87f8,0x152));var _0x887f=function(_0x561fa0,_0xc24abc){_0x561fa0=_0x561fa0-0x0;var _0x388a9c=_0x87f8[_0x561fa0];return _0x388a9c;};'use strict';var Sequelize=require('sequelize');module['exports']={'question':{'type':Sequelize['STRING']},'answer':{'type':Sequelize[_0x887f('0x0')](_0x887f('0x1'))},'membername':{'type':Sequelize['STRING']},'projectname':{'type':Sequelize[_0x887f('0x2')]},'queue':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x887f('0x2')]},'calleridname':{'type':Sequelize[_0x887f('0x2')]},'calleridnum':{'type':Sequelize[_0x887f('0x2')]},'questionId':{'type':Sequelize[_0x887f('0x2')]}};
\ No newline at end of file
+var _0x9780=['STRING','TEXT','long'];(function(_0x2a56d9,_0x29f568){var _0x241f80=function(_0x12f3c8){while(--_0x12f3c8){_0x2a56d9['push'](_0x2a56d9['shift']());}};_0x241f80(++_0x29f568);}(_0x9780,0x1d4));var _0x0978=function(_0x59f0dc,_0x1e2497){_0x59f0dc=_0x59f0dc-0x0;var _0x5b5445=_0x9780[_0x59f0dc];return _0x5b5445;};'use strict';var Sequelize=require('sequelize');module['exports']={'question':{'type':Sequelize[_0x0978('0x0')]},'answer':{'type':Sequelize[_0x0978('0x1')](_0x0978('0x2'))},'membername':{'type':Sequelize[_0x0978('0x0')]},'projectname':{'type':Sequelize[_0x0978('0x0')]},'queue':{'type':Sequelize[_0x0978('0x0')]},'uniqueid':{'type':Sequelize[_0x0978('0x0')]},'calleridname':{'type':Sequelize[_0x0978('0x0')]},'calleridnum':{'type':Sequelize[_0x0978('0x0')]},'questionId':{'type':Sequelize[_0x0978('0x0')]}};
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js
index 4178beb..fafab24 100644
--- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js
+++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd101=['save','update','then','destroy','sendStatus','error','stack','name','send','index','JscriptyQuestionReport','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','type','key','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','params','rawAttributes','find','catch','create','body','describe','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','status','end','count','offset','limit','Content-Range','json','apply'];(function(_0x16fbe7,_0x17e4b9){var _0x4f2ece=function(_0x5f2f8b){while(--_0x5f2f8b){_0x16fbe7['push'](_0x16fbe7['shift']());}};_0x4f2ece(++_0x17e4b9);}(_0xd101,0xc1));var _0x1d10=function(_0x1034b8,_0x758180){_0x1034b8=_0x1034b8-0x0;var _0x1aa9c0=_0xd101[_0x1034b8];return _0x1aa9c0;};'use strict';var pdf=require(_0x1d10('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x1d10('0x1'));var zipdir=require(_0x1d10('0x2'));var jsonpatch=require(_0x1d10('0x3'));var rp=require(_0x1d10('0x4'));var moment=require(_0x1d10('0x5'));var BPromise=require(_0x1d10('0x6'));var Mustache=require(_0x1d10('0x7'));var util=require(_0x1d10('0x8'));var path=require('path');var sox=require(_0x1d10('0x9'));var csv=require(_0x1d10('0xa'));var ejs=require(_0x1d10('0xb'));var fs=require('fs');var _=require(_0x1d10('0xc'));var squel=require(_0x1d10('0xd'));var crypto=require(_0x1d10('0xe'));var jsforce=require(_0x1d10('0xf'));var deskjs=require(_0x1d10('0x10'));var toCsv=require(_0x1d10('0xa'));var querystring=require(_0x1d10('0x11'));var Papa=require(_0x1d10('0x12'));var Redis=require(_0x1d10('0x13'));var authService=require(_0x1d10('0x14'));var qs=require(_0x1d10('0x15'));var hardwareService=require(_0x1d10('0x16'));var logger=require(_0x1d10('0x17'))(_0x1d10('0x18'));var utils=require('../../config/utils');var config=require(_0x1d10('0x19'));var db=require(_0x1d10('0x1a'))['db'];function respondWithStatusCode(_0x322bf4,_0x190d4c){_0x190d4c=_0x190d4c||0xcc;return function(_0x268506){if(_0x268506){return _0x322bf4['sendStatus'](_0x190d4c);}return _0x322bf4[_0x1d10('0x1b')](_0x190d4c)[_0x1d10('0x1c')]();};}function respondWithResult(_0x1a6586,_0x2b7c35){_0x2b7c35=_0x2b7c35||0xc8;return function(_0x2224ff){if(_0x2224ff){return _0x1a6586[_0x1d10('0x1b')](_0x2b7c35)['json'](_0x2224ff);}};}function respondWithFilteredResult(_0x905f66,_0x556f27){return function(_0x306953){if(_0x306953){var _0x2ad3c0=_0x306953[_0x1d10('0x1d')],_0x4f014a=_0x556f27[_0x1d10('0x1e')],_0x3aedf7=_0x556f27[_0x1d10('0x1e')]+_0x556f27[_0x1d10('0x1f')],_0x3fe555;if(_0x3aedf7>=_0x2ad3c0){_0x3aedf7=_0x2ad3c0;_0x3fe555=0xc8;}else{_0x3fe555=0xce;}_0x905f66[_0x1d10('0x1b')](_0x3fe555);return _0x905f66['set'](_0x1d10('0x20'),_0x4f014a+'-'+_0x3aedf7+'/'+_0x2ad3c0)[_0x1d10('0x21')](_0x306953);}return null;};}function patchUpdates(_0x4ca1e8){return function(_0xd4a7ca){try{jsonpatch[_0x1d10('0x22')](_0xd4a7ca,_0x4ca1e8,!![]);}catch(_0x5e61f8){return BPromise['reject'](_0x5e61f8);}return _0xd4a7ca[_0x1d10('0x23')]();};}function saveUpdates(_0x57ec1c,_0x4b94db){return function(_0x5774f9){if(_0x5774f9){return _0x5774f9[_0x1d10('0x24')](_0x57ec1c)[_0x1d10('0x25')](function(_0x24717c){return _0x24717c;});}return null;};}function removeEntity(_0x250395,_0x4ce84a){return function(_0x5e5315){if(_0x5e5315){return _0x5e5315[_0x1d10('0x26')]()['then'](function(){_0x250395[_0x1d10('0x1b')](0xcc)[_0x1d10('0x1c')]();});}};}function handleEntityNotFound(_0x160802,_0x37f22d){return function(_0x127b37){if(!_0x127b37){_0x160802[_0x1d10('0x27')](0x194);}return _0x127b37;};}function handleError(_0x2305c8,_0x3af06d){_0x3af06d=_0x3af06d||0x1f4;return function(_0x4168e){logger[_0x1d10('0x28')](_0x4168e[_0x1d10('0x29')]);if(_0x4168e['name']){delete _0x4168e[_0x1d10('0x2a')];}_0x2305c8[_0x1d10('0x1b')](_0x3af06d)[_0x1d10('0x2b')](_0x4168e);};}exports[_0x1d10('0x2c')]=function(_0x18e7d9,_0x3bffbe){var _0x38f583={},_0xaa8ab6={},_0x4f7837={'count':0x0,'rows':[]};var _0x355e10=db[_0x1d10('0x2d')]['rawAttributes'];_0xaa8ab6[_0x1d10('0x2e')]=_['keys'](_0x355e10);_0xaa8ab6['query']=_[_0x1d10('0x2f')](_0x18e7d9['query']);_0xaa8ab6[_0x1d10('0x30')]=_[_0x1d10('0x31')](_0xaa8ab6[_0x1d10('0x2e')],_0xaa8ab6[_0x1d10('0x32')]);_0x38f583[_0x1d10('0x33')]=_[_0x1d10('0x31')](_0xaa8ab6['model'],qs['fields'](_0x18e7d9[_0x1d10('0x32')][_0x1d10('0x34')]));_0x38f583[_0x1d10('0x33')]=_0x38f583[_0x1d10('0x33')][_0x1d10('0x35')]?_0x38f583[_0x1d10('0x33')]:_0xaa8ab6[_0x1d10('0x2e')];if(!_0x18e7d9[_0x1d10('0x32')][_0x1d10('0x36')](_0x1d10('0x37'))){_0x38f583['limit']=qs[_0x1d10('0x1f')](_0x18e7d9['query'][_0x1d10('0x1f')]);_0x38f583[_0x1d10('0x1e')]=qs['offset'](_0x18e7d9[_0x1d10('0x32')]['offset']);}_0x38f583[_0x1d10('0x38')]=qs[_0x1d10('0x39')](_0x18e7d9[_0x1d10('0x32')][_0x1d10('0x39')]);_0x38f583[_0x1d10('0x3a')]=qs['filters'](_['pick'](_0x18e7d9[_0x1d10('0x32')],_0xaa8ab6[_0x1d10('0x30')]));if(_0x18e7d9[_0x1d10('0x32')]['filter']){_0x38f583['where']=_['merge'](_0x38f583[_0x1d10('0x3a')],{'$or':_['map'](_0x355e10,function(_0x30f58c){if(_0x30f58c[_0x1d10('0x3b')][_0x1d10('0x3c')]!==_0x1d10('0x3d')){var _0x5e9f5d={};_0x5e9f5d[_0x30f58c['field']]={'$like':'%'+_0x18e7d9[_0x1d10('0x32')][_0x1d10('0x3e')]+'%'};return _0x5e9f5d;}})});}_0x38f583=_[_0x1d10('0x3f')]({},_0x38f583,_0x18e7d9[_0x1d10('0x40')]);var _0x549e83={'where':_0x38f583[_0x1d10('0x3a')]};return db['JscriptyQuestionReport'][_0x1d10('0x1d')](_0x549e83)[_0x1d10('0x25')](function(_0x41a694){_0x4f7837[_0x1d10('0x1d')]=_0x41a694;if(_0x18e7d9[_0x1d10('0x32')][_0x1d10('0x41')]){_0x38f583[_0x1d10('0x42')]=[{'all':!![]}];}return db[_0x1d10('0x2d')][_0x1d10('0x43')](_0x38f583);})[_0x1d10('0x25')](function(_0x1cae38){_0x4f7837[_0x1d10('0x44')]=_0x1cae38;return _0x4f7837;})[_0x1d10('0x25')](respondWithFilteredResult(_0x3bffbe,_0x38f583))['catch'](handleError(_0x3bffbe,null));};exports['show']=function(_0x35b2e3,_0x3267c5){var _0x3be3b0={'raw':!![],'where':{'id':_0x35b2e3[_0x1d10('0x45')]['id']}},_0xb15892={};_0xb15892[_0x1d10('0x2e')]=_[_0x1d10('0x2f')](db['JscriptyQuestionReport'][_0x1d10('0x46')]);_0xb15892[_0x1d10('0x32')]=_[_0x1d10('0x2f')](_0x35b2e3['query']);_0xb15892[_0x1d10('0x30')]=_[_0x1d10('0x31')](_0xb15892[_0x1d10('0x2e')],_0xb15892['query']);_0x3be3b0['attributes']=_[_0x1d10('0x31')](_0xb15892[_0x1d10('0x2e')],qs[_0x1d10('0x34')](_0x35b2e3[_0x1d10('0x32')][_0x1d10('0x34')]));_0x3be3b0[_0x1d10('0x33')]=_0x3be3b0[_0x1d10('0x33')]['length']?_0x3be3b0[_0x1d10('0x33')]:_0xb15892[_0x1d10('0x2e')];if(_0x35b2e3['query'][_0x1d10('0x41')]){_0x3be3b0['include']=[{'all':!![]}];}_0x3be3b0=_[_0x1d10('0x3f')]({},_0x3be3b0,_0x35b2e3['options']);return db['JscriptyQuestionReport'][_0x1d10('0x47')](_0x3be3b0)[_0x1d10('0x25')](handleEntityNotFound(_0x3267c5,null))[_0x1d10('0x25')](respondWithResult(_0x3267c5,null))[_0x1d10('0x48')](handleError(_0x3267c5,null));};exports[_0x1d10('0x49')]=function(_0x39d445,_0x4490a5){return db[_0x1d10('0x2d')][_0x1d10('0x49')](_0x39d445['body'],{})['then'](respondWithResult(_0x4490a5,0xc9))[_0x1d10('0x48')](handleError(_0x4490a5,null));};exports[_0x1d10('0x24')]=function(_0x121792,_0x9495bb){if(_0x121792[_0x1d10('0x4a')]['id']){delete _0x121792[_0x1d10('0x4a')]['id'];}return db['JscriptyQuestionReport'][_0x1d10('0x47')]({'where':{'id':_0x121792[_0x1d10('0x45')]['id']}})[_0x1d10('0x25')](handleEntityNotFound(_0x9495bb,null))[_0x1d10('0x25')](saveUpdates(_0x121792[_0x1d10('0x4a')],null))[_0x1d10('0x25')](respondWithResult(_0x9495bb,null))[_0x1d10('0x48')](handleError(_0x9495bb,null));};exports[_0x1d10('0x26')]=function(_0x39bf64,_0x32a9a9){return db[_0x1d10('0x2d')][_0x1d10('0x47')]({'where':{'id':_0x39bf64[_0x1d10('0x45')]['id']}})[_0x1d10('0x25')](handleEntityNotFound(_0x32a9a9,null))['then'](removeEntity(_0x32a9a9,null))['catch'](handleError(_0x32a9a9,null));};exports[_0x1d10('0x4b')]=function(_0x54bc35,_0x5b0883){return db[_0x1d10('0x2d')][_0x1d10('0x4b')]()[_0x1d10('0x25')](respondWithResult(_0x5b0883,null))[_0x1d10('0x48')](handleError(_0x5b0883,null));};
\ No newline at end of file
+var _0xf61e=['order','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','show','params','catch','create','body','find','destroy','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','stack','name','send','index','JscriptyQuestionReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','nolimit'];(function(_0xf9af5b,_0x36998d){var _0x208d50=function(_0x2c53f9){while(--_0x2c53f9){_0xf9af5b['push'](_0xf9af5b['shift']());}};_0x208d50(++_0x36998d);}(_0xf61e,0x191));var _0xef61=function(_0x51abcd,_0x501790){_0x51abcd=_0x51abcd-0x0;var _0x30eded=_0xf61e[_0x51abcd];return _0x30eded;};'use strict';var pdf=require(_0xef61('0x0'));var emlformat=require(_0xef61('0x1'));var rimraf=require(_0xef61('0x2'));var zipdir=require(_0xef61('0x3'));var jsonpatch=require(_0xef61('0x4'));var rp=require(_0xef61('0x5'));var moment=require(_0xef61('0x6'));var BPromise=require(_0xef61('0x7'));var Mustache=require(_0xef61('0x8'));var util=require(_0xef61('0x9'));var path=require(_0xef61('0xa'));var sox=require(_0xef61('0xb'));var csv=require('to-csv');var ejs=require(_0xef61('0xc'));var fs=require('fs');var _=require(_0xef61('0xd'));var squel=require('squel');var crypto=require(_0xef61('0xe'));var jsforce=require(_0xef61('0xf'));var deskjs=require(_0xef61('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xef61('0x11'));var Redis=require(_0xef61('0x12'));var authService=require(_0xef61('0x13'));var qs=require(_0xef61('0x14'));var hardwareService=require(_0xef61('0x15'));var logger=require(_0xef61('0x16'))(_0xef61('0x17'));var utils=require(_0xef61('0x18'));var config=require(_0xef61('0x19'));var db=require(_0xef61('0x1a'))['db'];function respondWithStatusCode(_0x28d4f7,_0x2f203c){_0x2f203c=_0x2f203c||0xcc;return function(_0x114e1f){if(_0x114e1f){return _0x28d4f7[_0xef61('0x1b')](_0x2f203c);}return _0x28d4f7['status'](_0x2f203c)[_0xef61('0x1c')]();};}function respondWithResult(_0x58d9a0,_0x106472){_0x106472=_0x106472||0xc8;return function(_0x1db2a9){if(_0x1db2a9){return _0x58d9a0[_0xef61('0x1d')](_0x106472)[_0xef61('0x1e')](_0x1db2a9);}};}function respondWithFilteredResult(_0x4c64b5,_0x2ac1b2){return function(_0x435beb){if(_0x435beb){var _0x1224c2=_0x435beb[_0xef61('0x1f')],_0x78ff22=_0x2ac1b2['offset'],_0x588a61=_0x2ac1b2[_0xef61('0x20')]+_0x2ac1b2[_0xef61('0x21')],_0x66fa62;if(_0x588a61>=_0x1224c2){_0x588a61=_0x1224c2;_0x66fa62=0xc8;}else{_0x66fa62=0xce;}_0x4c64b5[_0xef61('0x1d')](_0x66fa62);return _0x4c64b5[_0xef61('0x22')](_0xef61('0x23'),_0x78ff22+'-'+_0x588a61+'/'+_0x1224c2)[_0xef61('0x1e')](_0x435beb);}return null;};}function patchUpdates(_0xdd5e38){return function(_0x55f887){try{jsonpatch[_0xef61('0x24')](_0x55f887,_0xdd5e38,!![]);}catch(_0x2c8dad){return BPromise['reject'](_0x2c8dad);}return _0x55f887[_0xef61('0x25')]();};}function saveUpdates(_0x36966a,_0x29c13c){return function(_0x26cf42){if(_0x26cf42){return _0x26cf42[_0xef61('0x26')](_0x36966a)[_0xef61('0x27')](function(_0x92ea33){return _0x92ea33;});}return null;};}function removeEntity(_0x51f9ca,_0x536e9e){return function(_0x3d31c1){if(_0x3d31c1){return _0x3d31c1['destroy']()[_0xef61('0x27')](function(){_0x51f9ca['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2f0569,_0x5ce99d){return function(_0x53181b){if(!_0x53181b){_0x2f0569[_0xef61('0x1b')](0x194);}return _0x53181b;};}function handleError(_0x3782c6,_0x3ceb14){_0x3ceb14=_0x3ceb14||0x1f4;return function(_0x111bac){logger['error'](_0x111bac[_0xef61('0x28')]);if(_0x111bac['name']){delete _0x111bac[_0xef61('0x29')];}_0x3782c6[_0xef61('0x1d')](_0x3ceb14)[_0xef61('0x2a')](_0x111bac);};}exports[_0xef61('0x2b')]=function(_0x2155f1,_0x45ece2){var _0x258b5a={},_0x23837f={},_0x297df7={'count':0x0,'rows':[]};var _0x1ee27b=db[_0xef61('0x2c')][_0xef61('0x2d')];_0x23837f[_0xef61('0x2e')]=_[_0xef61('0x2f')](_0x1ee27b);_0x23837f[_0xef61('0x30')]=_[_0xef61('0x2f')](_0x2155f1[_0xef61('0x30')]);_0x23837f[_0xef61('0x31')]=_[_0xef61('0x32')](_0x23837f[_0xef61('0x2e')],_0x23837f[_0xef61('0x30')]);_0x258b5a[_0xef61('0x33')]=_['intersection'](_0x23837f['model'],qs[_0xef61('0x34')](_0x2155f1[_0xef61('0x30')][_0xef61('0x34')]));_0x258b5a['attributes']=_0x258b5a[_0xef61('0x33')][_0xef61('0x35')]?_0x258b5a['attributes']:_0x23837f[_0xef61('0x2e')];if(!_0x2155f1['query']['hasOwnProperty'](_0xef61('0x36'))){_0x258b5a['limit']=qs[_0xef61('0x21')](_0x2155f1['query'][_0xef61('0x21')]);_0x258b5a[_0xef61('0x20')]=qs[_0xef61('0x20')](_0x2155f1[_0xef61('0x30')][_0xef61('0x20')]);}_0x258b5a[_0xef61('0x37')]=qs[_0xef61('0x38')](_0x2155f1[_0xef61('0x30')][_0xef61('0x38')]);_0x258b5a[_0xef61('0x39')]=qs['filters'](_[_0xef61('0x3a')](_0x2155f1[_0xef61('0x30')],_0x23837f[_0xef61('0x31')]));if(_0x2155f1[_0xef61('0x30')][_0xef61('0x3b')]){_0x258b5a['where']=_[_0xef61('0x3c')](_0x258b5a[_0xef61('0x39')],{'$or':_[_0xef61('0x3d')](_0x1ee27b,function(_0x53bdb9){if(_0x53bdb9['type']['key']!==_0xef61('0x3e')){var _0x595a5a={};_0x595a5a[_0x53bdb9['field']]={'$like':'%'+_0x2155f1['query'][_0xef61('0x3b')]+'%'};return _0x595a5a;}})});}_0x258b5a=_[_0xef61('0x3c')]({},_0x258b5a,_0x2155f1[_0xef61('0x3f')]);var _0x508dc7={'where':_0x258b5a['where']};return db['JscriptyQuestionReport'][_0xef61('0x1f')](_0x508dc7)[_0xef61('0x27')](function(_0x5e1128){_0x297df7[_0xef61('0x1f')]=_0x5e1128;if(_0x2155f1[_0xef61('0x30')][_0xef61('0x40')]){_0x258b5a[_0xef61('0x41')]=[{'all':!![]}];}return db['JscriptyQuestionReport'][_0xef61('0x42')](_0x258b5a);})[_0xef61('0x27')](function(_0x3103d4){_0x297df7[_0xef61('0x43')]=_0x3103d4;return _0x297df7;})['then'](respondWithFilteredResult(_0x45ece2,_0x258b5a))['catch'](handleError(_0x45ece2,null));};exports[_0xef61('0x44')]=function(_0x462972,_0xd4f102){var _0x53abdb={'raw':!![],'where':{'id':_0x462972[_0xef61('0x45')]['id']}},_0x3eee46={};_0x3eee46[_0xef61('0x2e')]=_[_0xef61('0x2f')](db['JscriptyQuestionReport']['rawAttributes']);_0x3eee46['query']=_[_0xef61('0x2f')](_0x462972[_0xef61('0x30')]);_0x3eee46[_0xef61('0x31')]=_[_0xef61('0x32')](_0x3eee46[_0xef61('0x2e')],_0x3eee46[_0xef61('0x30')]);_0x53abdb[_0xef61('0x33')]=_['intersection'](_0x3eee46[_0xef61('0x2e')],qs[_0xef61('0x34')](_0x462972[_0xef61('0x30')][_0xef61('0x34')]));_0x53abdb['attributes']=_0x53abdb[_0xef61('0x33')][_0xef61('0x35')]?_0x53abdb[_0xef61('0x33')]:_0x3eee46[_0xef61('0x2e')];if(_0x462972[_0xef61('0x30')][_0xef61('0x40')]){_0x53abdb['include']=[{'all':!![]}];}_0x53abdb=_[_0xef61('0x3c')]({},_0x53abdb,_0x462972[_0xef61('0x3f')]);return db[_0xef61('0x2c')]['find'](_0x53abdb)[_0xef61('0x27')](handleEntityNotFound(_0xd4f102,null))[_0xef61('0x27')](respondWithResult(_0xd4f102,null))[_0xef61('0x46')](handleError(_0xd4f102,null));};exports[_0xef61('0x47')]=function(_0x216916,_0x354ab1){return db['JscriptyQuestionReport'][_0xef61('0x47')](_0x216916[_0xef61('0x48')],{})['then'](respondWithResult(_0x354ab1,0xc9))[_0xef61('0x46')](handleError(_0x354ab1,null));};exports[_0xef61('0x26')]=function(_0x183ddd,_0x3dbd56){if(_0x183ddd['body']['id']){delete _0x183ddd[_0xef61('0x48')]['id'];}return db[_0xef61('0x2c')][_0xef61('0x49')]({'where':{'id':_0x183ddd['params']['id']}})[_0xef61('0x27')](handleEntityNotFound(_0x3dbd56,null))[_0xef61('0x27')](saveUpdates(_0x183ddd['body'],null))[_0xef61('0x27')](respondWithResult(_0x3dbd56,null))[_0xef61('0x46')](handleError(_0x3dbd56,null));};exports[_0xef61('0x4a')]=function(_0x2904e0,_0x13bb20){return db[_0xef61('0x2c')][_0xef61('0x49')]({'where':{'id':_0x2904e0['params']['id']}})[_0xef61('0x27')](handleEntityNotFound(_0x13bb20,null))['then'](removeEntity(_0x13bb20,null))[_0xef61('0x46')](handleError(_0x13bb20,null));};exports[_0xef61('0x4b')]=function(_0x3b7004,_0x193f46){return db[_0xef61('0x2c')][_0xef61('0x4b')]()[_0xef61('0x27')](respondWithResult(_0x193f46,null))[_0xef61('0x46')](handleError(_0x193f46,null));};
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js
index bde5549..5942f90 100644
--- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js
+++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x25e5=['./jscriptyQuestionReport.attributes','define','JscriptyQuestionReport','report_jscripty_questions','lodash','util','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x3c7e73,_0xbb5ab8){var _0x5c807e=function(_0x49dd0d){while(--_0x49dd0d){_0x3c7e73['push'](_0x3c7e73['shift']());}};_0x5c807e(++_0xbb5ab8);}(_0x25e5,0x100));var _0x525e=function(_0x544099,_0x372b30){_0x544099=_0x544099-0x0;var _0x20ab09=_0x25e5[_0x544099];return _0x20ab09;};'use strict';var _=require(_0x525e('0x0'));var util=require(_0x525e('0x1'));var logger=require('../../config/logger')(_0x525e('0x2'));var moment=require(_0x525e('0x3'));var BPromise=require(_0x525e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x525e('0x5'));var rimraf=require(_0x525e('0x6'));var config=require(_0x525e('0x7'));var attributes=require(_0x525e('0x8'));module['exports']=function(_0x5ea044,_0x4a5263){return _0x5ea044[_0x525e('0x9')](_0x525e('0xa'),attributes,{'tableName':_0x525e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x25bb=['./jscriptyQuestionReport.attributes','exports','define','JscriptyQuestionReport','report_jscripty_questions','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x247378,_0x34e125){var _0x420dd6=function(_0x23e21c){while(--_0x23e21c){_0x247378['push'](_0x247378['shift']());}};_0x420dd6(++_0x34e125);}(_0x25bb,0x139));var _0xb25b=function(_0x30e34,_0x3d04c9){_0x30e34=_0x30e34-0x0;var _0x2061ff=_0x25bb[_0x30e34];return _0x2061ff;};'use strict';var _=require(_0xb25b('0x0'));var util=require(_0xb25b('0x1'));var logger=require(_0xb25b('0x2'))(_0xb25b('0x3'));var moment=require(_0xb25b('0x4'));var BPromise=require(_0xb25b('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb25b('0x6'));var rimraf=require(_0xb25b('0x7'));var config=require(_0xb25b('0x8'));var attributes=require(_0xb25b('0x9'));module[_0xb25b('0xa')]=function(_0x1989ad,_0x333740){return _0x1989ad[_0xb25b('0xb')](_0xb25b('0xc'),attributes,{'tableName':_0xb25b('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js
index a42a0d8..0667102 100644
--- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js
+++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x13ff=['error','code','JscriptyQuestionReport,\x20%s,\x20%s','message','catch','util','moment','bluebird','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','request','info','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x2416cb,_0x43f23e){var _0x30c53c=function(_0xed06bc){while(--_0xed06bc){_0x2416cb['push'](_0x2416cb['shift']());}};_0x30c53c(++_0x43f23e);}(_0x13ff,0x104));var _0xf13f=function(_0x4bb66f,_0x3cd682){_0x4bb66f=_0x4bb66f-0x0;var _0xf2772f=_0x13ff[_0x4bb66f];return _0xf2772f;};'use strict';var _=require('lodash');var util=require(_0xf13f('0x0'));var moment=require(_0xf13f('0x1'));var BPromise=require(_0xf13f('0x2'));var rs=require(_0xf13f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf13f('0x4'));var logger=require('../../config/logger')(_0xf13f('0x5'));var config=require(_0xf13f('0x6'));var jayson=require(_0xf13f('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3d65a3,_0x28acee,_0x23a708){return new BPromise(function(_0x44e71e,_0xe452a1){return client[_0xf13f('0x8')](_0x3d65a3,_0x23a708)['then'](function(_0x395f8d){logger[_0xf13f('0x9')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x28acee,'request\x20sent');logger['debug'](_0xf13f('0xa'),_0x28acee,'request\x20sent',JSON[_0xf13f('0xb')](_0x395f8d));if(_0x395f8d[_0xf13f('0xc')]){if(_0x395f8d[_0xf13f('0xc')][_0xf13f('0xd')]===0x1f4){logger['error'](_0xf13f('0xe'),_0x28acee,_0x395f8d['error'][_0xf13f('0xf')]);return _0xe452a1(_0x395f8d[_0xf13f('0xc')]['message']);}logger[_0xf13f('0xc')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x28acee,_0x395f8d[_0xf13f('0xc')][_0xf13f('0xf')]);return _0x44e71e(_0x395f8d[_0xf13f('0xc')][_0xf13f('0xf')]);}else{logger[_0xf13f('0x9')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x28acee,'request\x20sent');_0x44e71e(_0x395f8d['result'][_0xf13f('0xf')]);}})[_0xf13f('0x10')](function(_0x4cd429){logger[_0xf13f('0xc')](_0xf13f('0xe'),_0x28acee,_0x4cd429);_0xe452a1(_0x4cd429);});});}
\ No newline at end of file
+var _0x83b3=['../../config/utils','rpc','../../config/environment','jayson/promise','http','request','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','lodash','util','moment','bluebird','../../mysqldb'];(function(_0x221322,_0x3b59b1){var _0x32bdbb=function(_0x118067){while(--_0x118067){_0x221322['push'](_0x221322['shift']());}};_0x32bdbb(++_0x3b59b1);}(_0x83b3,0x67));var _0x383b=function(_0x3b751b,_0x344f44){_0x3b751b=_0x3b751b-0x0;var _0x3864e0=_0x83b3[_0x3b751b];return _0x3864e0;};'use strict';var _=require(_0x383b('0x0'));var util=require(_0x383b('0x1'));var moment=require(_0x383b('0x2'));var BPromise=require(_0x383b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x383b('0x4'))['db'];var utils=require(_0x383b('0x5'));var logger=require('../../config/logger')(_0x383b('0x6'));var config=require(_0x383b('0x7'));var jayson=require(_0x383b('0x8'));var client=jayson['client'][_0x383b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2a53e6,_0x256812,_0x538948){return new BPromise(function(_0x4bc428,_0x437850){return client[_0x383b('0xa')](_0x2a53e6,_0x538948)['then'](function(_0x1d88e4){logger['info'](_0x383b('0xb'),_0x256812,_0x383b('0xc'));logger['debug']('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x256812,_0x383b('0xc'),JSON[_0x383b('0xd')](_0x1d88e4));if(_0x1d88e4[_0x383b('0xe')]){if(_0x1d88e4[_0x383b('0xe')][_0x383b('0xf')]===0x1f4){logger['error'](_0x383b('0xb'),_0x256812,_0x1d88e4[_0x383b('0xe')][_0x383b('0x10')]);return _0x437850(_0x1d88e4[_0x383b('0xe')]['message']);}logger[_0x383b('0xe')](_0x383b('0xb'),_0x256812,_0x1d88e4['error'][_0x383b('0x10')]);return _0x4bc428(_0x1d88e4['error'][_0x383b('0x10')]);}else{logger['info'](_0x383b('0xb'),_0x256812,_0x383b('0xc'));_0x4bc428(_0x1d88e4[_0x383b('0x11')][_0x383b('0x10')]);}})['catch'](function(_0x5dd191){logger[_0x383b('0xe')](_0x383b('0xb'),_0x256812,_0x5dd191);_0x437850(_0x5dd191);});});}
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/index.js b/server/api/jscriptySessionReport/index.js
index e1aa46e..fe4ce9a 100644
--- a/server/api/jscriptySessionReport/index.js
+++ b/server/api/jscriptySessionReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3413=['connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptySessionReport.controller','get','isAuthenticated','/describe','describe','show','/:id/questions','getQuestions','post','create','/:id','update','delete','destroy','exports','multer','util','path'];(function(_0x2aea9e,_0x1f587f){var _0x430b92=function(_0x416c37){while(--_0x416c37){_0x2aea9e['push'](_0x2aea9e['shift']());}};_0x430b92(++_0x1f587f);}(_0x3413,0x87));var _0x3341=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3413[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x3341('0x0'));var util=require(_0x3341('0x1'));var path=require(_0x3341('0x2'));var timeout=require(_0x3341('0x3'));var express=require('express');var router=express[_0x3341('0x4')]();var auth=require(_0x3341('0x5'));var interaction=require(_0x3341('0x6'));var config=require(_0x3341('0x7'));var controller=require(_0x3341('0x8'));router[_0x3341('0x9')]('/',auth[_0x3341('0xa')](),controller['index']);router[_0x3341('0x9')](_0x3341('0xb'),auth[_0x3341('0xa')](),controller[_0x3341('0xc')]);router[_0x3341('0x9')]('/:id',auth[_0x3341('0xa')](),controller[_0x3341('0xd')]);router[_0x3341('0x9')](_0x3341('0xe'),auth[_0x3341('0xa')](),controller[_0x3341('0xf')]);router[_0x3341('0x10')]('/',auth[_0x3341('0xa')](),controller[_0x3341('0x11')]);router['put'](_0x3341('0x12'),auth[_0x3341('0xa')](),controller[_0x3341('0x13')]);router[_0x3341('0x14')](_0x3341('0x12'),auth[_0x3341('0xa')](),controller[_0x3341('0x15')]);module[_0x3341('0x16')]=router;
\ No newline at end of file
+var _0x53ad=['util','path','connect-timeout','../../components/auth/service','./jscriptySessionReport.controller','get','/describe','describe','/:id','isAuthenticated','show','/:id/questions','getQuestions','post','create','put','update','exports'];(function(_0x3ceb73,_0x4829e5){var _0xf8ff4f=function(_0x1c6659){while(--_0x1c6659){_0x3ceb73['push'](_0x3ceb73['shift']());}};_0xf8ff4f(++_0x4829e5);}(_0x53ad,0x19e));var _0xd53a=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x53ad[_0x6c993a];return _0x27f547;};'use strict';var multer=require('multer');var util=require(_0xd53a('0x0'));var path=require(_0xd53a('0x1'));var timeout=require(_0xd53a('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xd53a('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xd53a('0x4'));router[_0xd53a('0x5')]('/',auth['isAuthenticated'](),controller['index']);router[_0xd53a('0x5')](_0xd53a('0x6'),auth['isAuthenticated'](),controller[_0xd53a('0x7')]);router[_0xd53a('0x5')](_0xd53a('0x8'),auth[_0xd53a('0x9')](),controller[_0xd53a('0xa')]);router[_0xd53a('0x5')](_0xd53a('0xb'),auth[_0xd53a('0x9')](),controller[_0xd53a('0xc')]);router[_0xd53a('0xd')]('/',auth[_0xd53a('0x9')](),controller[_0xd53a('0xe')]);router[_0xd53a('0xf')](_0xd53a('0x8'),auth[_0xd53a('0x9')](),controller[_0xd53a('0x10')]);router['delete']('/:id',auth[_0xd53a('0x9')](),controller['destroy']);module[_0xd53a('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js
index 2c7f38f..02fabc0 100644
--- a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js
+++ b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x503b=['sequelize','exports','DATE','setDataValue','starttime','endtime','YYYY-MM-DD\x20HH:mm:ss','STRING','BOOLEAN','moment'];(function(_0x1f7097,_0xfcd44a){var _0x1502aa=function(_0x1fe7d5){while(--_0x1fe7d5){_0x1f7097['push'](_0x1f7097['shift']());}};_0x1502aa(++_0xfcd44a);}(_0x503b,0xe5));var _0xb503=function(_0x3d9181,_0x2ef3da){_0x3d9181=_0x3d9181-0x0;var _0x3e702b=_0x503b[_0x3d9181];return _0x3e702b;};'use strict';var moment=require(_0xb503('0x0'));var Sequelize=require(_0xb503('0x1'));module[_0xb503('0x2')]={'starttime':{'type':Sequelize[_0xb503('0x3')],'set':function(_0x4a18c9){this[_0xb503('0x4')](_0xb503('0x5'),_0x4a18c9);this['setDataValue'](_0xb503('0x6'),moment()['format'](_0xb503('0x7')));}},'endtime':{'type':Sequelize[_0xb503('0x3')]},'membername':{'type':Sequelize['STRING']},'projectname':{'type':Sequelize[_0xb503('0x8')]},'queue':{'type':Sequelize[_0xb503('0x8')]},'uniqueid':{'type':Sequelize[_0xb503('0x8')]},'calleridname':{'type':Sequelize[_0xb503('0x8')]},'calleridnum':{'type':Sequelize[_0xb503('0x8')]},'completed':{'type':Sequelize[_0xb503('0x9')],'defaultValue':![]}};
\ No newline at end of file
+var _0xca07=['BOOLEAN','sequelize','DATE','setDataValue','starttime','format','YYYY-MM-DD\x20HH:mm:ss','STRING'];(function(_0x51b169,_0x5efbc2){var _0x12605a=function(_0x570f5e){while(--_0x570f5e){_0x51b169['push'](_0x51b169['shift']());}};_0x12605a(++_0x5efbc2);}(_0xca07,0xb1));var _0x7ca0=function(_0x10499e,_0x56fd86){_0x10499e=_0x10499e-0x0;var _0x3fef98=_0xca07[_0x10499e];return _0x3fef98;};'use strict';var moment=require('moment');var Sequelize=require(_0x7ca0('0x0'));module['exports']={'starttime':{'type':Sequelize[_0x7ca0('0x1')],'set':function(_0x4c2cc4){this[_0x7ca0('0x2')](_0x7ca0('0x3'),_0x4c2cc4);this[_0x7ca0('0x2')]('endtime',moment()[_0x7ca0('0x4')](_0x7ca0('0x5')));}},'endtime':{'type':Sequelize[_0x7ca0('0x1')]},'membername':{'type':Sequelize['STRING']},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x7ca0('0x6')]},'calleridname':{'type':Sequelize[_0x7ca0('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'completed':{'type':Sequelize[_0x7ca0('0x7')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js
index b2c3098..e35a18f 100644
--- a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js
+++ b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x09b7=['util','path','sox','squel','crypto','jsforce','desk.js','to-csv','querystring','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','name','send','index','rawAttributes','keys','query','intersection','model','fields','attributes','order','sort','where','filters','filter','merge','map','key','VIRTUAL','field','options','includeAll','include','JscriptySessionReport','catch','show','params','length','find','create','body','describe','getQuestions','findOne','hasOwnProperty','pick','SessionId','JscriptyQuestionReport','findAll','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache'];(function(_0x4c8b8a,_0x4c3535){var _0x174131=function(_0x3f5b3b){while(--_0x3f5b3b){_0x4c8b8a['push'](_0x4c8b8a['shift']());}};_0x174131(++_0x4c3535);}(_0x09b7,0x121));var _0x709b=function(_0x43b609,_0xcf0924){_0x43b609=_0x43b609-0x0;var _0x5d4cef=_0x09b7[_0x43b609];return _0x5d4cef;};'use strict';var pdf=require(_0x709b('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x709b('0x1'));var zipdir=require(_0x709b('0x2'));var jsonpatch=require(_0x709b('0x3'));var rp=require(_0x709b('0x4'));var moment=require(_0x709b('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x709b('0x6'));var util=require(_0x709b('0x7'));var path=require(_0x709b('0x8'));var sox=require(_0x709b('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x709b('0xa'));var crypto=require(_0x709b('0xb'));var jsforce=require(_0x709b('0xc'));var deskjs=require(_0x709b('0xd'));var toCsv=require(_0x709b('0xe'));var querystring=require(_0x709b('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x709b('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x709b('0x11'));var logger=require(_0x709b('0x12'))(_0x709b('0x13'));var utils=require(_0x709b('0x14'));var config=require('../../config/environment');var db=require(_0x709b('0x15'))['db'];function respondWithStatusCode(_0x4729af,_0x5a29c9){_0x5a29c9=_0x5a29c9||0xcc;return function(_0x1dbf71){if(_0x1dbf71){return _0x4729af[_0x709b('0x16')](_0x5a29c9);}return _0x4729af[_0x709b('0x17')](_0x5a29c9)[_0x709b('0x18')]();};}function respondWithResult(_0x5dc6aa,_0xc622c6){_0xc622c6=_0xc622c6||0xc8;return function(_0x3983fa){if(_0x3983fa){return _0x5dc6aa['status'](_0xc622c6)['json'](_0x3983fa);}};}function respondWithFilteredResult(_0xf2a665,_0x351c76){return function(_0x58870c){if(_0x58870c){var _0x1582bb=_0x58870c[_0x709b('0x19')],_0x368f0b=_0x351c76[_0x709b('0x1a')],_0x4b5150=_0x351c76[_0x709b('0x1a')]+_0x351c76[_0x709b('0x1b')],_0x3b6da6;if(_0x4b5150>=_0x1582bb){_0x4b5150=_0x1582bb;_0x3b6da6=0xc8;}else{_0x3b6da6=0xce;}_0xf2a665[_0x709b('0x17')](_0x3b6da6);return _0xf2a665[_0x709b('0x1c')](_0x709b('0x1d'),_0x368f0b+'-'+_0x4b5150+'/'+_0x1582bb)['json'](_0x58870c);}return null;};}function patchUpdates(_0x1d9b91){return function(_0x254f7e){try{jsonpatch[_0x709b('0x1e')](_0x254f7e,_0x1d9b91,!![]);}catch(_0x2b524b){return BPromise[_0x709b('0x1f')](_0x2b524b);}return _0x254f7e['save']();};}function saveUpdates(_0x29df1b,_0x445c36){return function(_0x424158){if(_0x424158){return _0x424158[_0x709b('0x20')](_0x29df1b)[_0x709b('0x21')](function(_0x2a6cb1){return _0x2a6cb1;});}return null;};}function removeEntity(_0x4800af,_0x301951){return function(_0x2a4269){if(_0x2a4269){return _0x2a4269[_0x709b('0x22')]()['then'](function(){_0x4800af[_0x709b('0x17')](0xcc)[_0x709b('0x18')]();});}};}function handleEntityNotFound(_0xbbdf1,_0x4983ef){return function(_0x53b13f){if(!_0x53b13f){_0xbbdf1['sendStatus'](0x194);}return _0x53b13f;};}function handleError(_0x3a514a,_0x3c5ea0){_0x3c5ea0=_0x3c5ea0||0x1f4;return function(_0x163eb1){logger['error'](_0x163eb1['stack']);if(_0x163eb1['name']){delete _0x163eb1[_0x709b('0x23')];}_0x3a514a[_0x709b('0x17')](_0x3c5ea0)[_0x709b('0x24')](_0x163eb1);};}exports[_0x709b('0x25')]=function(_0x392519,_0x482cea){var _0x126880={},_0x3966e4={},_0x211a4b={'count':0x0,'rows':[]};var _0x3e242a=db['JscriptySessionReport'][_0x709b('0x26')];_0x3966e4['model']=_[_0x709b('0x27')](_0x3e242a);_0x3966e4[_0x709b('0x28')]=_[_0x709b('0x27')](_0x392519[_0x709b('0x28')]);_0x3966e4['filters']=_[_0x709b('0x29')](_0x3966e4['model'],_0x3966e4[_0x709b('0x28')]);_0x126880['attributes']=_[_0x709b('0x29')](_0x3966e4[_0x709b('0x2a')],qs[_0x709b('0x2b')](_0x392519[_0x709b('0x28')][_0x709b('0x2b')]));_0x126880['attributes']=_0x126880[_0x709b('0x2c')]['length']?_0x126880['attributes']:_0x3966e4['model'];if(!_0x392519[_0x709b('0x28')]['hasOwnProperty']('nolimit')){_0x126880[_0x709b('0x1b')]=qs[_0x709b('0x1b')](_0x392519[_0x709b('0x28')]['limit']);_0x126880[_0x709b('0x1a')]=qs[_0x709b('0x1a')](_0x392519[_0x709b('0x28')][_0x709b('0x1a')]);}_0x126880[_0x709b('0x2d')]=qs['sort'](_0x392519[_0x709b('0x28')][_0x709b('0x2e')]);_0x126880[_0x709b('0x2f')]=qs[_0x709b('0x30')](_['pick'](_0x392519[_0x709b('0x28')],_0x3966e4['filters']));if(_0x392519[_0x709b('0x28')][_0x709b('0x31')]){_0x126880['where']=_[_0x709b('0x32')](_0x126880[_0x709b('0x2f')],{'$or':_[_0x709b('0x33')](_0x3e242a,function(_0x48f600){if(_0x48f600['type'][_0x709b('0x34')]!==_0x709b('0x35')){var _0xcba904={};_0xcba904[_0x48f600[_0x709b('0x36')]]={'$like':'%'+_0x392519[_0x709b('0x28')][_0x709b('0x31')]+'%'};return _0xcba904;}})});}_0x126880=_[_0x709b('0x32')]({},_0x126880,_0x392519[_0x709b('0x37')]);var _0x515afa={'where':_0x126880[_0x709b('0x2f')]};return db['JscriptySessionReport'][_0x709b('0x19')](_0x515afa)[_0x709b('0x21')](function(_0x30f6ab){_0x211a4b[_0x709b('0x19')]=_0x30f6ab;if(_0x392519['query'][_0x709b('0x38')]){_0x126880[_0x709b('0x39')]=[{'all':!![]}];}return db[_0x709b('0x3a')]['findAll'](_0x126880);})[_0x709b('0x21')](function(_0x3726e1){_0x211a4b['rows']=_0x3726e1;return _0x211a4b;})[_0x709b('0x21')](respondWithFilteredResult(_0x482cea,_0x126880))[_0x709b('0x3b')](handleError(_0x482cea,null));};exports[_0x709b('0x3c')]=function(_0x3e4b5d,_0x114658){var _0x120a8d={'raw':!![],'where':{'id':_0x3e4b5d[_0x709b('0x3d')]['id']}},_0x4b0300={};_0x4b0300[_0x709b('0x2a')]=_['keys'](db[_0x709b('0x3a')][_0x709b('0x26')]);_0x4b0300[_0x709b('0x28')]=_[_0x709b('0x27')](_0x3e4b5d[_0x709b('0x28')]);_0x4b0300[_0x709b('0x30')]=_['intersection'](_0x4b0300[_0x709b('0x2a')],_0x4b0300[_0x709b('0x28')]);_0x120a8d[_0x709b('0x2c')]=_[_0x709b('0x29')](_0x4b0300[_0x709b('0x2a')],qs[_0x709b('0x2b')](_0x3e4b5d[_0x709b('0x28')][_0x709b('0x2b')]));_0x120a8d[_0x709b('0x2c')]=_0x120a8d['attributes'][_0x709b('0x3e')]?_0x120a8d[_0x709b('0x2c')]:_0x4b0300[_0x709b('0x2a')];if(_0x3e4b5d['query'][_0x709b('0x38')]){_0x120a8d[_0x709b('0x39')]=[{'all':!![]}];}_0x120a8d=_[_0x709b('0x32')]({},_0x120a8d,_0x3e4b5d[_0x709b('0x37')]);return db[_0x709b('0x3a')][_0x709b('0x3f')](_0x120a8d)['then'](handleEntityNotFound(_0x114658,null))[_0x709b('0x21')](respondWithResult(_0x114658,null))[_0x709b('0x3b')](handleError(_0x114658,null));};exports[_0x709b('0x40')]=function(_0x3e1f81,_0x1a1fa1){return db[_0x709b('0x3a')][_0x709b('0x40')](_0x3e1f81[_0x709b('0x41')],{})['then'](respondWithResult(_0x1a1fa1,0xc9))[_0x709b('0x3b')](handleError(_0x1a1fa1,null));};exports[_0x709b('0x20')]=function(_0x5970ae,_0x4b2224){if(_0x5970ae[_0x709b('0x41')]['id']){delete _0x5970ae[_0x709b('0x41')]['id'];}return db[_0x709b('0x3a')]['find']({'where':{'id':_0x5970ae[_0x709b('0x3d')]['id']}})['then'](handleEntityNotFound(_0x4b2224,null))[_0x709b('0x21')](saveUpdates(_0x5970ae[_0x709b('0x41')],null))[_0x709b('0x21')](respondWithResult(_0x4b2224,null))[_0x709b('0x3b')](handleError(_0x4b2224,null));};exports[_0x709b('0x22')]=function(_0x100da9,_0x3cba13){return db['JscriptySessionReport'][_0x709b('0x3f')]({'where':{'id':_0x100da9[_0x709b('0x3d')]['id']}})[_0x709b('0x21')](handleEntityNotFound(_0x3cba13,null))[_0x709b('0x21')](removeEntity(_0x3cba13,null))['catch'](handleError(_0x3cba13,null));};exports[_0x709b('0x42')]=function(_0x57af3e,_0x46312f){return db[_0x709b('0x3a')]['describe']()[_0x709b('0x21')](respondWithResult(_0x46312f,null))[_0x709b('0x3b')](handleError(_0x46312f,null));};exports[_0x709b('0x43')]=function(_0x544856,_0x19b17c,_0x236fd1){var _0x5635b1={'raw':!![],'where':{}};var _0x1678d7={};var _0x554c67={'count':0x0,'rows':[]};return db[_0x709b('0x3a')][_0x709b('0x44')]({'where':{'id':_0x544856[_0x709b('0x3d')]['id']}})[_0x709b('0x21')](handleEntityNotFound(_0x19b17c,null))[_0x709b('0x21')](function(_0x5b5b63){if(_0x5b5b63){_0x1678d7['model']=_[_0x709b('0x27')](db['JscriptyQuestionReport']['rawAttributes']);_0x1678d7[_0x709b('0x28')]=_['keys'](_0x544856[_0x709b('0x28')]);_0x1678d7[_0x709b('0x30')]=_[_0x709b('0x29')](_0x1678d7['model'],_0x1678d7['query']);_0x5635b1[_0x709b('0x2c')]=_[_0x709b('0x29')](_0x1678d7[_0x709b('0x2a')],qs[_0x709b('0x2b')](_0x544856[_0x709b('0x28')][_0x709b('0x2b')]));_0x5635b1[_0x709b('0x2c')]=_0x5635b1[_0x709b('0x2c')][_0x709b('0x3e')]?_0x5635b1[_0x709b('0x2c')]:_0x1678d7[_0x709b('0x2a')];if(!_0x544856['query'][_0x709b('0x45')]('nolimit')){_0x5635b1['limit']=qs[_0x709b('0x1b')](_0x544856[_0x709b('0x28')][_0x709b('0x1b')]);_0x5635b1[_0x709b('0x1a')]=qs['offset'](_0x544856[_0x709b('0x28')][_0x709b('0x1a')]);}_0x5635b1[_0x709b('0x2d')]=qs['sort'](_0x544856[_0x709b('0x28')][_0x709b('0x2e')]);_0x5635b1[_0x709b('0x2f')]=qs['filters'](_[_0x709b('0x46')](_0x544856[_0x709b('0x28')],_0x1678d7['filters']));_0x5635b1['where'][_0x709b('0x47')]=_0x5b5b63['id'];if(_0x544856[_0x709b('0x28')][_0x709b('0x31')]){_0x5635b1[_0x709b('0x2f')]=_[_0x709b('0x32')](_0x5635b1[_0x709b('0x2f')],{'$or':_[_0x709b('0x33')](_0x5635b1[_0x709b('0x2c')],function(_0x18295a){var _0x59ee9c={};_0x59ee9c[_0x18295a]={'$like':'%'+_0x544856[_0x709b('0x28')]['filter']+'%'};return _0x59ee9c;})});}_0x5635b1=_[_0x709b('0x32')]({},_0x5635b1,_0x544856['options']);return db[_0x709b('0x48')]['count']({'where':_0x5635b1[_0x709b('0x2f')]})['then'](function(_0x5bedbb){_0x554c67[_0x709b('0x19')]=_0x5bedbb;if(_0x544856['query'][_0x709b('0x38')]){_0x5635b1['include']=[{'all':!![]}];}return db[_0x709b('0x48')][_0x709b('0x49')](_0x5635b1);})['then'](function(_0x4642fd){_0x554c67['rows']=_0x4642fd;return _0x554c67;});}})[_0x709b('0x21')](respondWithFilteredResult(_0x19b17c,_0x5635b1))[_0x709b('0x3b')](handleError(_0x19b17c,null));};
\ No newline at end of file
+var _0xf27d=['send','index','JscriptySessionReport','rawAttributes','keys','query','filters','model','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','update','destroy','describe','getQuestions','findOne','JscriptyQuestionReport','SessionId','html-pdf','rimraf','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','apply','reject','save','then','error','stack','name'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xf27d,0xc3));var _0xdf27=function(_0x33240f,_0x520f5d){_0x33240f=_0x33240f-0x0;var _0xe5d11e=_0xf27d[_0x33240f];return _0xe5d11e;};'use strict';var pdf=require(_0xdf27('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xdf27('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xdf27('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xdf27('0x3'));var Mustache=require(_0xdf27('0x4'));var util=require(_0xdf27('0x5'));var path=require(_0xdf27('0x6'));var sox=require(_0xdf27('0x7'));var csv=require(_0xdf27('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xdf27('0x9'));var squel=require(_0xdf27('0xa'));var crypto=require(_0xdf27('0xb'));var jsforce=require(_0xdf27('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xdf27('0xd'));var Papa=require(_0xdf27('0xe'));var Redis=require('ioredis');var authService=require(_0xdf27('0xf'));var qs=require(_0xdf27('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xdf27('0x11'))(_0xdf27('0x12'));var utils=require(_0xdf27('0x13'));var config=require(_0xdf27('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1187c1,_0x2ff06e){_0x2ff06e=_0x2ff06e||0xcc;return function(_0x3f4454){if(_0x3f4454){return _0x1187c1[_0xdf27('0x15')](_0x2ff06e);}return _0x1187c1[_0xdf27('0x16')](_0x2ff06e)[_0xdf27('0x17')]();};}function respondWithResult(_0x5253ac,_0x2d664e){_0x2d664e=_0x2d664e||0xc8;return function(_0x16df03){if(_0x16df03){return _0x5253ac[_0xdf27('0x16')](_0x2d664e)[_0xdf27('0x18')](_0x16df03);}};}function respondWithFilteredResult(_0x84cfeb,_0x3aa0e4){return function(_0x214cb0){if(_0x214cb0){var _0x599b6e=_0x214cb0[_0xdf27('0x19')],_0x209acf=_0x3aa0e4[_0xdf27('0x1a')],_0x44691f=_0x3aa0e4[_0xdf27('0x1a')]+_0x3aa0e4[_0xdf27('0x1b')],_0x53326c;if(_0x44691f>=_0x599b6e){_0x44691f=_0x599b6e;_0x53326c=0xc8;}else{_0x53326c=0xce;}_0x84cfeb[_0xdf27('0x16')](_0x53326c);return _0x84cfeb[_0xdf27('0x1c')]('Content-Range',_0x209acf+'-'+_0x44691f+'/'+_0x599b6e)[_0xdf27('0x18')](_0x214cb0);}return null;};}function patchUpdates(_0x2ce00a){return function(_0x473abe){try{jsonpatch[_0xdf27('0x1d')](_0x473abe,_0x2ce00a,!![]);}catch(_0x151935){return BPromise[_0xdf27('0x1e')](_0x151935);}return _0x473abe[_0xdf27('0x1f')]();};}function saveUpdates(_0x2a98ab,_0x3a9c7b){return function(_0x24a751){if(_0x24a751){return _0x24a751['update'](_0x2a98ab)['then'](function(_0x509f6f){return _0x509f6f;});}return null;};}function removeEntity(_0x5b5208,_0x3b0440){return function(_0x3e7719){if(_0x3e7719){return _0x3e7719['destroy']()[_0xdf27('0x20')](function(){_0x5b5208[_0xdf27('0x16')](0xcc)[_0xdf27('0x17')]();});}};}function handleEntityNotFound(_0x32df4d,_0x5be31b){return function(_0x2afb6e){if(!_0x2afb6e){_0x32df4d[_0xdf27('0x15')](0x194);}return _0x2afb6e;};}function handleError(_0x56fb51,_0x5ae76c){_0x5ae76c=_0x5ae76c||0x1f4;return function(_0x29c6cb){logger[_0xdf27('0x21')](_0x29c6cb[_0xdf27('0x22')]);if(_0x29c6cb['name']){delete _0x29c6cb[_0xdf27('0x23')];}_0x56fb51['status'](_0x5ae76c)[_0xdf27('0x24')](_0x29c6cb);};}exports[_0xdf27('0x25')]=function(_0x3e8dd2,_0x30af5e){var _0x1ccedb={},_0x294d00={},_0x3ab6f4={'count':0x0,'rows':[]};var _0x449c84=db[_0xdf27('0x26')][_0xdf27('0x27')];_0x294d00['model']=_[_0xdf27('0x28')](_0x449c84);_0x294d00[_0xdf27('0x29')]=_[_0xdf27('0x28')](_0x3e8dd2[_0xdf27('0x29')]);_0x294d00[_0xdf27('0x2a')]=_['intersection'](_0x294d00[_0xdf27('0x2b')],_0x294d00[_0xdf27('0x29')]);_0x1ccedb['attributes']=_[_0xdf27('0x2c')](_0x294d00[_0xdf27('0x2b')],qs[_0xdf27('0x2d')](_0x3e8dd2['query'][_0xdf27('0x2d')]));_0x1ccedb[_0xdf27('0x2e')]=_0x1ccedb[_0xdf27('0x2e')][_0xdf27('0x2f')]?_0x1ccedb[_0xdf27('0x2e')]:_0x294d00['model'];if(!_0x3e8dd2['query'][_0xdf27('0x30')]('nolimit')){_0x1ccedb[_0xdf27('0x1b')]=qs[_0xdf27('0x1b')](_0x3e8dd2[_0xdf27('0x29')][_0xdf27('0x1b')]);_0x1ccedb[_0xdf27('0x1a')]=qs[_0xdf27('0x1a')](_0x3e8dd2[_0xdf27('0x29')]['offset']);}_0x1ccedb[_0xdf27('0x31')]=qs[_0xdf27('0x32')](_0x3e8dd2[_0xdf27('0x29')][_0xdf27('0x32')]);_0x1ccedb[_0xdf27('0x33')]=qs[_0xdf27('0x2a')](_[_0xdf27('0x34')](_0x3e8dd2[_0xdf27('0x29')],_0x294d00[_0xdf27('0x2a')]));if(_0x3e8dd2[_0xdf27('0x29')][_0xdf27('0x35')]){_0x1ccedb[_0xdf27('0x33')]=_[_0xdf27('0x36')](_0x1ccedb['where'],{'$or':_['map'](_0x449c84,function(_0x5890ef){if(_0x5890ef[_0xdf27('0x37')][_0xdf27('0x38')]!==_0xdf27('0x39')){var _0x3a341c={};_0x3a341c[_0x5890ef[_0xdf27('0x3a')]]={'$like':'%'+_0x3e8dd2[_0xdf27('0x29')][_0xdf27('0x35')]+'%'};return _0x3a341c;}})});}_0x1ccedb=_[_0xdf27('0x36')]({},_0x1ccedb,_0x3e8dd2[_0xdf27('0x3b')]);var _0x3a55c0={'where':_0x1ccedb[_0xdf27('0x33')]};return db[_0xdf27('0x26')][_0xdf27('0x19')](_0x3a55c0)[_0xdf27('0x20')](function(_0x4fdaed){_0x3ab6f4[_0xdf27('0x19')]=_0x4fdaed;if(_0x3e8dd2[_0xdf27('0x29')][_0xdf27('0x3c')]){_0x1ccedb[_0xdf27('0x3d')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0xdf27('0x3e')](_0x1ccedb);})[_0xdf27('0x20')](function(_0x481c42){_0x3ab6f4[_0xdf27('0x3f')]=_0x481c42;return _0x3ab6f4;})[_0xdf27('0x20')](respondWithFilteredResult(_0x30af5e,_0x1ccedb))[_0xdf27('0x40')](handleError(_0x30af5e,null));};exports[_0xdf27('0x41')]=function(_0x5d50d2,_0x393e46){var _0x4fa140={'raw':!![],'where':{'id':_0x5d50d2[_0xdf27('0x42')]['id']}},_0x18c847={};_0x18c847['model']=_['keys'](db[_0xdf27('0x26')][_0xdf27('0x27')]);_0x18c847[_0xdf27('0x29')]=_['keys'](_0x5d50d2['query']);_0x18c847[_0xdf27('0x2a')]=_[_0xdf27('0x2c')](_0x18c847[_0xdf27('0x2b')],_0x18c847[_0xdf27('0x29')]);_0x4fa140[_0xdf27('0x2e')]=_[_0xdf27('0x2c')](_0x18c847[_0xdf27('0x2b')],qs[_0xdf27('0x2d')](_0x5d50d2[_0xdf27('0x29')][_0xdf27('0x2d')]));_0x4fa140['attributes']=_0x4fa140[_0xdf27('0x2e')][_0xdf27('0x2f')]?_0x4fa140['attributes']:_0x18c847['model'];if(_0x5d50d2[_0xdf27('0x29')][_0xdf27('0x3c')]){_0x4fa140[_0xdf27('0x3d')]=[{'all':!![]}];}_0x4fa140=_[_0xdf27('0x36')]({},_0x4fa140,_0x5d50d2['options']);return db['JscriptySessionReport'][_0xdf27('0x43')](_0x4fa140)[_0xdf27('0x20')](handleEntityNotFound(_0x393e46,null))[_0xdf27('0x20')](respondWithResult(_0x393e46,null))[_0xdf27('0x40')](handleError(_0x393e46,null));};exports[_0xdf27('0x44')]=function(_0x404d9b,_0x24b7f0){return db[_0xdf27('0x26')][_0xdf27('0x44')](_0x404d9b[_0xdf27('0x45')],{})[_0xdf27('0x20')](respondWithResult(_0x24b7f0,0xc9))[_0xdf27('0x40')](handleError(_0x24b7f0,null));};exports[_0xdf27('0x46')]=function(_0x2cb2f3,_0x4e6624){if(_0x2cb2f3[_0xdf27('0x45')]['id']){delete _0x2cb2f3[_0xdf27('0x45')]['id'];}return db[_0xdf27('0x26')][_0xdf27('0x43')]({'where':{'id':_0x2cb2f3[_0xdf27('0x42')]['id']}})[_0xdf27('0x20')](handleEntityNotFound(_0x4e6624,null))['then'](saveUpdates(_0x2cb2f3[_0xdf27('0x45')],null))['then'](respondWithResult(_0x4e6624,null))[_0xdf27('0x40')](handleError(_0x4e6624,null));};exports[_0xdf27('0x47')]=function(_0x4d9cd9,_0x34d137){return db['JscriptySessionReport'][_0xdf27('0x43')]({'where':{'id':_0x4d9cd9['params']['id']}})[_0xdf27('0x20')](handleEntityNotFound(_0x34d137,null))[_0xdf27('0x20')](removeEntity(_0x34d137,null))[_0xdf27('0x40')](handleError(_0x34d137,null));};exports['describe']=function(_0x472643,_0x3db365){return db[_0xdf27('0x26')][_0xdf27('0x48')]()[_0xdf27('0x20')](respondWithResult(_0x3db365,null))[_0xdf27('0x40')](handleError(_0x3db365,null));};exports[_0xdf27('0x49')]=function(_0x54bdd4,_0x6d2a3f,_0x4d7822){var _0x557e68={'raw':!![],'where':{}};var _0x4dc68d={};var _0x24808a={'count':0x0,'rows':[]};return db[_0xdf27('0x26')][_0xdf27('0x4a')]({'where':{'id':_0x54bdd4[_0xdf27('0x42')]['id']}})['then'](handleEntityNotFound(_0x6d2a3f,null))[_0xdf27('0x20')](function(_0x52a8e9){if(_0x52a8e9){_0x4dc68d[_0xdf27('0x2b')]=_['keys'](db[_0xdf27('0x4b')][_0xdf27('0x27')]);_0x4dc68d[_0xdf27('0x29')]=_['keys'](_0x54bdd4[_0xdf27('0x29')]);_0x4dc68d[_0xdf27('0x2a')]=_[_0xdf27('0x2c')](_0x4dc68d[_0xdf27('0x2b')],_0x4dc68d['query']);_0x557e68[_0xdf27('0x2e')]=_[_0xdf27('0x2c')](_0x4dc68d[_0xdf27('0x2b')],qs[_0xdf27('0x2d')](_0x54bdd4[_0xdf27('0x29')][_0xdf27('0x2d')]));_0x557e68[_0xdf27('0x2e')]=_0x557e68[_0xdf27('0x2e')][_0xdf27('0x2f')]?_0x557e68[_0xdf27('0x2e')]:_0x4dc68d[_0xdf27('0x2b')];if(!_0x54bdd4[_0xdf27('0x29')][_0xdf27('0x30')]('nolimit')){_0x557e68[_0xdf27('0x1b')]=qs['limit'](_0x54bdd4['query'][_0xdf27('0x1b')]);_0x557e68['offset']=qs[_0xdf27('0x1a')](_0x54bdd4[_0xdf27('0x29')][_0xdf27('0x1a')]);}_0x557e68[_0xdf27('0x31')]=qs[_0xdf27('0x32')](_0x54bdd4['query'][_0xdf27('0x32')]);_0x557e68[_0xdf27('0x33')]=qs[_0xdf27('0x2a')](_[_0xdf27('0x34')](_0x54bdd4[_0xdf27('0x29')],_0x4dc68d[_0xdf27('0x2a')]));_0x557e68[_0xdf27('0x33')][_0xdf27('0x4c')]=_0x52a8e9['id'];if(_0x54bdd4[_0xdf27('0x29')][_0xdf27('0x35')]){_0x557e68[_0xdf27('0x33')]=_['merge'](_0x557e68[_0xdf27('0x33')],{'$or':_['map'](_0x557e68[_0xdf27('0x2e')],function(_0x384af3){var _0x2bcd92={};_0x2bcd92[_0x384af3]={'$like':'%'+_0x54bdd4[_0xdf27('0x29')][_0xdf27('0x35')]+'%'};return _0x2bcd92;})});}_0x557e68=_[_0xdf27('0x36')]({},_0x557e68,_0x54bdd4[_0xdf27('0x3b')]);return db['JscriptyQuestionReport']['count']({'where':_0x557e68[_0xdf27('0x33')]})['then'](function(_0x4019c9){_0x24808a[_0xdf27('0x19')]=_0x4019c9;if(_0x54bdd4[_0xdf27('0x29')]['includeAll']){_0x557e68[_0xdf27('0x3d')]=[{'all':!![]}];}return db[_0xdf27('0x4b')][_0xdf27('0x3e')](_0x557e68);})[_0xdf27('0x20')](function(_0x7b0ba0){_0x24808a[_0xdf27('0x3f')]=_0x7b0ba0;return _0x24808a;});}})['then'](respondWithFilteredResult(_0x6d2a3f,_0x557e68))[_0xdf27('0x40')](handleError(_0x6d2a3f,null));};
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.model.js b/server/api/jscriptySessionReport/jscriptySessionReport.model.js
index 440f245..04c9811 100644
--- a/server/api/jscriptySessionReport/jscriptySessionReport.model.js
+++ b/server/api/jscriptySessionReport/jscriptySessionReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3463=['bluebird','request-promise','path','./jscriptySessionReport.attributes','exports','define','report_jscripty_sessions','lodash','util','../../config/logger','api','moment'];(function(_0x344e95,_0x55b113){var _0x2761b4=function(_0x1b0f49){while(--_0x1b0f49){_0x344e95['push'](_0x344e95['shift']());}};_0x2761b4(++_0x55b113);}(_0x3463,0x193));var _0x3346=function(_0x3e7804,_0x121853){_0x3e7804=_0x3e7804-0x0;var _0x56efda=_0x3463[_0x3e7804];return _0x56efda;};'use strict';var _=require(_0x3346('0x0'));var util=require(_0x3346('0x1'));var logger=require(_0x3346('0x2'))(_0x3346('0x3'));var moment=require(_0x3346('0x4'));var BPromise=require(_0x3346('0x5'));var rp=require(_0x3346('0x6'));var fs=require('fs');var path=require(_0x3346('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x3346('0x8'));module[_0x3346('0x9')]=function(_0x27f267,_0x2a2d22){return _0x27f267[_0x3346('0xa')]('JscriptySessionReport',attributes,{'tableName':_0x3346('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8a85=['exports','JscriptySessionReport','report_jscripty_sessions','lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0x5a8f5e,_0xff92bb){var _0x40602f=function(_0x183b6f){while(--_0x183b6f){_0x5a8f5e['push'](_0x5a8f5e['shift']());}};_0x40602f(++_0xff92bb);}(_0x8a85,0xdf));var _0x58a8=function(_0x334894,_0x43f2de){_0x334894=_0x334894-0x0;var _0x373298=_0x8a85[_0x334894];return _0x373298;};'use strict';var _=require(_0x58a8('0x0'));var util=require('util');var logger=require(_0x58a8('0x1'))(_0x58a8('0x2'));var moment=require(_0x58a8('0x3'));var BPromise=require(_0x58a8('0x4'));var rp=require(_0x58a8('0x5'));var fs=require('fs');var path=require(_0x58a8('0x6'));var rimraf=require('rimraf');var config=require(_0x58a8('0x7'));var attributes=require('./jscriptySessionReport.attributes');module[_0x58a8('0x8')]=function(_0xd2ec58,_0x12b997){return _0xd2ec58['define'](_0x58a8('0x9'),attributes,{'tableName':_0x58a8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js b/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js
index d88af97..3f11243 100644
--- a/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js
+++ b/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b47=['result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','JscriptySessionReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x5170c5,_0x15d6af){var _0x3b11e7=function(_0x19debe){while(--_0x19debe){_0x5170c5['push'](_0x5170c5['shift']());}};_0x3b11e7(++_0x15d6af);}(_0x2b47,0x177));var _0x72b4=function(_0x132762,_0x129036){_0x132762=_0x132762-0x0;var _0x408b4a=_0x2b47[_0x132762];return _0x408b4a;};'use strict';var _=require(_0x72b4('0x0'));var util=require('util');var moment=require(_0x72b4('0x1'));var BPromise=require(_0x72b4('0x2'));var rs=require(_0x72b4('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x72b4('0x4'))['db'];var utils=require(_0x72b4('0x5'));var logger=require(_0x72b4('0x6'))(_0x72b4('0x7'));var config=require(_0x72b4('0x8'));var jayson=require(_0x72b4('0x9'));var client=jayson['client'][_0x72b4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x480984,_0x104f08,_0x1c90aa){return new BPromise(function(_0xb1e42f,_0x1bdf7f){return client[_0x72b4('0xb')](_0x480984,_0x1c90aa)[_0x72b4('0xc')](function(_0x114a98){logger[_0x72b4('0xd')](_0x72b4('0xe'),_0x104f08,_0x72b4('0xf'));logger[_0x72b4('0x10')]('JscriptySessionReport,\x20%s,\x20%s,\x20%s',_0x104f08,_0x72b4('0xf'),JSON[_0x72b4('0x11')](_0x114a98));if(_0x114a98[_0x72b4('0x12')]){if(_0x114a98[_0x72b4('0x12')][_0x72b4('0x13')]===0x1f4){logger[_0x72b4('0x12')](_0x72b4('0xe'),_0x104f08,_0x114a98[_0x72b4('0x12')][_0x72b4('0x14')]);return _0x1bdf7f(_0x114a98[_0x72b4('0x12')][_0x72b4('0x14')]);}logger['error'](_0x72b4('0xe'),_0x104f08,_0x114a98[_0x72b4('0x12')][_0x72b4('0x14')]);return _0xb1e42f(_0x114a98[_0x72b4('0x12')]['message']);}else{logger['info'](_0x72b4('0xe'),_0x104f08,'request\x20sent');_0xb1e42f(_0x114a98[_0x72b4('0x15')][_0x72b4('0x14')]);}})['catch'](function(_0x2a9c37){logger[_0x72b4('0x12')](_0x72b4('0xe'),_0x104f08,_0x2a9c37);_0x1bdf7f(_0x2a9c37);});});}
\ No newline at end of file
+var _0xfb0b=['../../config/environment','jayson/promise','client','http','request','then','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','JscriptySessionReport,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','randomstring','ioredis','../../config/logger'];(function(_0x3478a0,_0x2744cf){var _0x5eb76e=function(_0x43e236){while(--_0x43e236){_0x3478a0['push'](_0x3478a0['shift']());}};_0x5eb76e(++_0x2744cf);}(_0xfb0b,0x94));var _0xbfb0=function(_0x456840,_0x3baddb){_0x456840=_0x456840-0x0;var _0x3afd45=_0xfb0b[_0x456840];return _0x3afd45;};'use strict';var _=require(_0xbfb0('0x0'));var util=require(_0xbfb0('0x1'));var moment=require(_0xbfb0('0x2'));var BPromise=require('bluebird');var rs=require(_0xbfb0('0x3'));var fs=require('fs');var Redis=require(_0xbfb0('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xbfb0('0x5'))('rpc');var config=require(_0xbfb0('0x6'));var jayson=require(_0xbfb0('0x7'));var client=jayson[_0xbfb0('0x8')][_0xbfb0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2b3840,_0x46166a,_0x52eba3){return new BPromise(function(_0x3491c7,_0x1afe32){return client[_0xbfb0('0xa')](_0x2b3840,_0x52eba3)[_0xbfb0('0xb')](function(_0x4c2cee){logger['info']('JscriptySessionReport,\x20%s,\x20%s',_0x46166a,'request\x20sent');logger[_0xbfb0('0xc')](_0xbfb0('0xd'),_0x46166a,_0xbfb0('0xe'),JSON['stringify'](_0x4c2cee));if(_0x4c2cee[_0xbfb0('0xf')]){if(_0x4c2cee['error'][_0xbfb0('0x10')]===0x1f4){logger[_0xbfb0('0xf')](_0xbfb0('0x11'),_0x46166a,_0x4c2cee[_0xbfb0('0xf')][_0xbfb0('0x12')]);return _0x1afe32(_0x4c2cee[_0xbfb0('0xf')]['message']);}logger[_0xbfb0('0xf')]('JscriptySessionReport,\x20%s,\x20%s',_0x46166a,_0x4c2cee['error']['message']);return _0x3491c7(_0x4c2cee[_0xbfb0('0xf')][_0xbfb0('0x12')]);}else{logger[_0xbfb0('0x13')](_0xbfb0('0x11'),_0x46166a,_0xbfb0('0xe'));_0x3491c7(_0x4c2cee[_0xbfb0('0x14')][_0xbfb0('0x12')]);}})[_0xbfb0('0x15')](function(_0x315b80){logger[_0xbfb0('0xf')](_0xbfb0('0x11'),_0x46166a,_0x315b80);_0x1afe32(_0x315b80);});});}
\ No newline at end of file
diff --git a/server/api/license/index.js b/server/api/license/index.js
index ca5e693..d87082d 100644
--- a/server/api/license/index.js
+++ b/server/api/license/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x44bc=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','index','put','/:id','update','exports','util'];(function(_0x13cab0,_0x14d825){var _0x38804f=function(_0x1bffaf){while(--_0x1bffaf){_0x13cab0['push'](_0x13cab0['shift']());}};_0x38804f(++_0x14d825);}(_0x44bc,0xdc));var _0xc44b=function(_0x505fad,_0x4fa6b6){_0x505fad=_0x505fad-0x0;var _0x74b075=_0x44bc[_0x505fad];return _0x74b075;};'use strict';var multer=require('multer');var util=require(_0xc44b('0x0'));var path=require(_0xc44b('0x1'));var timeout=require(_0xc44b('0x2'));var express=require(_0xc44b('0x3'));var router=express[_0xc44b('0x4')]();var auth=require(_0xc44b('0x5'));var interaction=require(_0xc44b('0x6'));var config=require('../../config/environment');var controller=require('./license.controller');router[_0xc44b('0x7')]('/',controller[_0xc44b('0x8')]);router[_0xc44b('0x9')](_0xc44b('0xa'),auth['isAuthenticated'](),controller[_0xc44b('0xb')]);module[_0xc44b('0xc')]=router;
\ No newline at end of file
+var _0xde93=['Router','../../components/auth/service','../../config/environment','get','put','/:id','multer','util','path','connect-timeout','express'];(function(_0x3f0bbb,_0x404eb2){var _0x5d1eaa=function(_0x5024ee){while(--_0x5024ee){_0x3f0bbb['push'](_0x3f0bbb['shift']());}};_0x5d1eaa(++_0x404eb2);}(_0xde93,0x187));var _0x3de9=function(_0x175f44,_0x350863){_0x175f44=_0x175f44-0x0;var _0x5779c8=_0xde93[_0x175f44];return _0x5779c8;};'use strict';var multer=require(_0x3de9('0x0'));var util=require(_0x3de9('0x1'));var path=require(_0x3de9('0x2'));var timeout=require(_0x3de9('0x3'));var express=require(_0x3de9('0x4'));var router=express[_0x3de9('0x5')]();var auth=require(_0x3de9('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x3de9('0x7'));var controller=require('./license.controller');router[_0x3de9('0x8')]('/',controller['index']);router[_0x3de9('0x9')](_0x3de9('0xa'),auth['isAuthenticated'](),controller['update']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/license/license.attributes.js b/server/api/license/license.attributes.js
index 8c879d9..c2df7bd 100644
--- a/server/api/license/license.attributes.js
+++ b/server/api/license/license.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x173e=['INTEGER','sequelize','exports','STRING'];(function(_0x3b90d4,_0x490e2d){var _0x187bda=function(_0x17ba56){while(--_0x17ba56){_0x3b90d4['push'](_0x3b90d4['shift']());}};_0x187bda(++_0x490e2d);}(_0x173e,0xe5));var _0xe173=function(_0x28be22,_0x214584){_0x28be22=_0x28be22-0x0;var _0x3b7da2=_0x173e[_0x28be22];return _0x3b7da2;};'use strict';var Sequelize=require(_0xe173('0x0'));module[_0xe173('0x1')]={'license':{'type':Sequelize['TEXT']},'data1':{'type':Sequelize['STRING']},'data2':{'type':Sequelize[_0xe173('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0xe173('0x3')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x2b01=['INTEGER','exports','TEXT','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2b01,0x18d));var _0x12b0=function(_0x152ccd,_0x508adb){_0x152ccd=_0x152ccd-0x0;var _0x4532a8=_0x2b01[_0x152ccd];return _0x4532a8;};'use strict';var Sequelize=require('sequelize');module[_0x12b0('0x0')]={'license':{'type':Sequelize[_0x12b0('0x1')]},'data1':{'type':Sequelize[_0x12b0('0x2')]},'data2':{'type':Sequelize[_0x12b0('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0x12b0('0x3')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js
index 4fddbe8..12c4ef7 100644
--- a/server/api/license/license.controller.js
+++ b/server/api/license/license.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7163=['destroy','error','stack','name','send','../../config/license/util','index','model','License','rawAttributes','query','keys','intersection','attributes','fields','length','getLicense','catch','update','body','find','params','demo','html-pdf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','set','Content-Range','apply','reject','save','then'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x7163,0x1ef));var _0x3716=function(_0x5b5cde,_0x1f7c5f){_0x5b5cde=_0x5b5cde-0x0;var _0x364ad2=_0x7163[_0x5b5cde];return _0x364ad2;};'use strict';var pdf=require(_0x3716('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x3716('0x1'));var jsonpatch=require(_0x3716('0x2'));var rp=require(_0x3716('0x3'));var moment=require('moment');var BPromise=require(_0x3716('0x4'));var Mustache=require(_0x3716('0x5'));var util=require(_0x3716('0x6'));var path=require(_0x3716('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x3716('0x8'));var fs=require('fs');var _=require(_0x3716('0x9'));var squel=require(_0x3716('0xa'));var crypto=require(_0x3716('0xb'));var jsforce=require(_0x3716('0xc'));var deskjs=require(_0x3716('0xd'));var toCsv=require(_0x3716('0xe'));var querystring=require(_0x3716('0xf'));var Papa=require(_0x3716('0x10'));var Redis=require(_0x3716('0x11'));var authService=require(_0x3716('0x12'));var qs=require(_0x3716('0x13'));var hardwareService=require(_0x3716('0x14'));var logger=require(_0x3716('0x15'))(_0x3716('0x16'));var utils=require(_0x3716('0x17'));var config=require(_0x3716('0x18'));var db=require(_0x3716('0x19'))['db'];function respondWithStatusCode(_0x6a5a28,_0x150e9a){_0x150e9a=_0x150e9a||0xcc;return function(_0x2c32cf){if(_0x2c32cf){return _0x6a5a28[_0x3716('0x1a')](_0x150e9a);}return _0x6a5a28[_0x3716('0x1b')](_0x150e9a)[_0x3716('0x1c')]();};}function respondWithResult(_0x77e90d,_0x2794bf){_0x2794bf=_0x2794bf||0xc8;return function(_0xc095c4){if(_0xc095c4){return _0x77e90d[_0x3716('0x1b')](_0x2794bf)['json'](_0xc095c4);}};}function respondWithFilteredResult(_0x48d627,_0x51feb6){return function(_0x493b7d){if(_0x493b7d){var _0x372785=_0x493b7d[_0x3716('0x1d')],_0x5bbc0a=_0x51feb6['offset'],_0x166835=_0x51feb6['offset']+_0x51feb6['limit'],_0x3608b6;if(_0x166835>=_0x372785){_0x166835=_0x372785;_0x3608b6=0xc8;}else{_0x3608b6=0xce;}_0x48d627['status'](_0x3608b6);return _0x48d627[_0x3716('0x1e')](_0x3716('0x1f'),_0x5bbc0a+'-'+_0x166835+'/'+_0x372785)['json'](_0x493b7d);}return null;};}function patchUpdates(_0x248464){return function(_0x331b57){try{jsonpatch[_0x3716('0x20')](_0x331b57,_0x248464,!![]);}catch(_0xf6c764){return BPromise[_0x3716('0x21')](_0xf6c764);}return _0x331b57[_0x3716('0x22')]();};}function saveUpdates(_0x950473,_0x564d5c){return function(_0x4cd0a6){if(_0x4cd0a6){return _0x4cd0a6['update'](_0x950473)[_0x3716('0x23')](function(_0x49a885){return _0x49a885;});}return null;};}function removeEntity(_0x2bb00b,_0xb01da6){return function(_0x2cccca){if(_0x2cccca){return _0x2cccca[_0x3716('0x24')]()[_0x3716('0x23')](function(){_0x2bb00b[_0x3716('0x1b')](0xcc)[_0x3716('0x1c')]();});}};}function handleEntityNotFound(_0x12bc19,_0x1f18b2){return function(_0x483bdd){if(!_0x483bdd){_0x12bc19[_0x3716('0x1a')](0x194);}return _0x483bdd;};}function handleError(_0x4aef3c,_0x1a1cb5){_0x1a1cb5=_0x1a1cb5||0x1f4;return function(_0x4a073e){logger[_0x3716('0x25')](_0x4a073e[_0x3716('0x26')]);if(_0x4a073e['name']){delete _0x4a073e[_0x3716('0x27')];}_0x4aef3c['status'](_0x1a1cb5)[_0x3716('0x28')](_0x4a073e);};}var utilLicense=require(_0x3716('0x29'));exports[_0x3716('0x2a')]=function(_0x4c65ac,_0x150324){var _0x5a4476={'raw':!![],'where':{'id':0x1}},_0x430ed4={};_0x430ed4[_0x3716('0x2b')]=_['keys'](db[_0x3716('0x2c')][_0x3716('0x2d')]);_0x430ed4[_0x3716('0x2e')]=_[_0x3716('0x2f')](_0x4c65ac[_0x3716('0x2e')]);_0x430ed4['filters']=_[_0x3716('0x30')](_0x430ed4[_0x3716('0x2b')],_0x430ed4[_0x3716('0x2e')]);_0x5a4476[_0x3716('0x31')]=_['intersection'](_0x430ed4[_0x3716('0x2b')],qs[_0x3716('0x32')](_0x4c65ac[_0x3716('0x2e')][_0x3716('0x32')]));_0x5a4476[_0x3716('0x31')]=_0x5a4476['attributes'][_0x3716('0x33')]?_0x5a4476[_0x3716('0x31')]:_0x430ed4[_0x3716('0x2b')];_0x5a4476=_['merge']({},_0x5a4476,_0x4c65ac['options']);return utilLicense[_0x3716('0x34')](_0x5a4476)[_0x3716('0x23')](respondWithResult(_0x150324,null))[_0x3716('0x35')](handleError(_0x150324,null));};exports[_0x3716('0x36')]=function(_0x5835d4,_0x4453c8){if(_0x5835d4[_0x3716('0x37')]['id']){delete _0x5835d4[_0x3716('0x37')]['id'];}return db[_0x3716('0x2c')][_0x3716('0x38')]({'where':{'id':_0x5835d4[_0x3716('0x39')]['id']}})['then'](handleEntityNotFound(_0x4453c8,null))[_0x3716('0x23')](function(_0x1c1ded){var _0x2faba3=_0x1c1ded['get']({'plain':!![]});return utilLicense['checkLicense'](_0x2faba3,_0x5835d4[_0x3716('0x37')]['key']);})[_0x3716('0x23')](function(_0x13d4be){if(!_0x13d4be[_0x3716('0x3a')]){return saveUpdates(_0x5835d4[_0x3716('0x37')],null);}return _0x13d4be;})[_0x3716('0x23')](respondWithResult(_0x4453c8,null))[_0x3716('0x35')](handleError(_0x4453c8,null));};
\ No newline at end of file
+var _0x8375=['checkLicense','key','body','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','json','count','offset','limit','apply','reject','save','destroy','then','stack','name','../../config/license/util','index','model','keys','rawAttributes','query','filters','intersection','fields','attributes','length','catch','update','License','find','get'];(function(_0x28e6cf,_0x1b9fe0){var _0x5874ea=function(_0x245013){while(--_0x245013){_0x28e6cf['push'](_0x28e6cf['shift']());}};_0x5874ea(++_0x1b9fe0);}(_0x8375,0xa8));var _0x5837=function(_0x2c8d9a,_0x38dc7d){_0x2c8d9a=_0x2c8d9a-0x0;var _0x6689d9=_0x8375[_0x2c8d9a];return _0x6689d9;};'use strict';var pdf=require(_0x5837('0x0'));var emlformat=require(_0x5837('0x1'));var rimraf=require(_0x5837('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5837('0x3'));var rp=require(_0x5837('0x4'));var moment=require(_0x5837('0x5'));var BPromise=require(_0x5837('0x6'));var Mustache=require(_0x5837('0x7'));var util=require(_0x5837('0x8'));var path=require('path');var sox=require(_0x5837('0x9'));var csv=require(_0x5837('0xa'));var ejs=require(_0x5837('0xb'));var fs=require('fs');var _=require(_0x5837('0xc'));var squel=require(_0x5837('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5837('0xe'));var toCsv=require(_0x5837('0xa'));var querystring=require('querystring');var Papa=require(_0x5837('0xf'));var Redis=require('ioredis');var authService=require(_0x5837('0x10'));var qs=require(_0x5837('0x11'));var hardwareService=require(_0x5837('0x12'));var logger=require(_0x5837('0x13'))(_0x5837('0x14'));var utils=require(_0x5837('0x15'));var config=require('../../config/environment');var db=require(_0x5837('0x16'))['db'];function respondWithStatusCode(_0x312533,_0x1b0a4d){_0x1b0a4d=_0x1b0a4d||0xcc;return function(_0x10c1a1){if(_0x10c1a1){return _0x312533[_0x5837('0x17')](_0x1b0a4d);}return _0x312533['status'](_0x1b0a4d)['end']();};}function respondWithResult(_0x5a23d2,_0x1fb327){_0x1fb327=_0x1fb327||0xc8;return function(_0x111dbf){if(_0x111dbf){return _0x5a23d2[_0x5837('0x18')](_0x1fb327)[_0x5837('0x19')](_0x111dbf);}};}function respondWithFilteredResult(_0x17601e,_0x2a7d71){return function(_0x206f02){if(_0x206f02){var _0x754f39=_0x206f02[_0x5837('0x1a')],_0x10d882=_0x2a7d71['offset'],_0x59a378=_0x2a7d71[_0x5837('0x1b')]+_0x2a7d71[_0x5837('0x1c')],_0x189967;if(_0x59a378>=_0x754f39){_0x59a378=_0x754f39;_0x189967=0xc8;}else{_0x189967=0xce;}_0x17601e[_0x5837('0x18')](_0x189967);return _0x17601e['set']('Content-Range',_0x10d882+'-'+_0x59a378+'/'+_0x754f39)['json'](_0x206f02);}return null;};}function patchUpdates(_0x38d0c9){return function(_0x3a5386){try{jsonpatch[_0x5837('0x1d')](_0x3a5386,_0x38d0c9,!![]);}catch(_0x58e7f7){return BPromise[_0x5837('0x1e')](_0x58e7f7);}return _0x3a5386[_0x5837('0x1f')]();};}function saveUpdates(_0x316d43,_0x139111){return function(_0x5881ff){if(_0x5881ff){return _0x5881ff['update'](_0x316d43)['then'](function(_0x3d352f){return _0x3d352f;});}return null;};}function removeEntity(_0x5475c3,_0x275cb6){return function(_0x2bd103){if(_0x2bd103){return _0x2bd103[_0x5837('0x20')]()[_0x5837('0x21')](function(){_0x5475c3['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1b80db,_0x2262b9){return function(_0x406506){if(!_0x406506){_0x1b80db['sendStatus'](0x194);}return _0x406506;};}function handleError(_0x7a6232,_0x46296c){_0x46296c=_0x46296c||0x1f4;return function(_0x231b17){logger['error'](_0x231b17[_0x5837('0x22')]);if(_0x231b17[_0x5837('0x23')]){delete _0x231b17[_0x5837('0x23')];}_0x7a6232['status'](_0x46296c)['send'](_0x231b17);};}var utilLicense=require(_0x5837('0x24'));exports[_0x5837('0x25')]=function(_0x23a4e3,_0x2ae6a0){var _0x2d5c00={'raw':!![],'where':{'id':0x1}},_0x3adb74={};_0x3adb74[_0x5837('0x26')]=_[_0x5837('0x27')](db['License'][_0x5837('0x28')]);_0x3adb74[_0x5837('0x29')]=_[_0x5837('0x27')](_0x23a4e3[_0x5837('0x29')]);_0x3adb74[_0x5837('0x2a')]=_[_0x5837('0x2b')](_0x3adb74[_0x5837('0x26')],_0x3adb74[_0x5837('0x29')]);_0x2d5c00['attributes']=_['intersection'](_0x3adb74[_0x5837('0x26')],qs[_0x5837('0x2c')](_0x23a4e3['query'][_0x5837('0x2c')]));_0x2d5c00[_0x5837('0x2d')]=_0x2d5c00['attributes'][_0x5837('0x2e')]?_0x2d5c00[_0x5837('0x2d')]:_0x3adb74[_0x5837('0x26')];_0x2d5c00=_['merge']({},_0x2d5c00,_0x23a4e3['options']);return utilLicense['getLicense'](_0x2d5c00)[_0x5837('0x21')](respondWithResult(_0x2ae6a0,null))[_0x5837('0x2f')](handleError(_0x2ae6a0,null));};exports[_0x5837('0x30')]=function(_0x1902a4,_0x1c0eca){if(_0x1902a4['body']['id']){delete _0x1902a4['body']['id'];}return db[_0x5837('0x31')][_0x5837('0x32')]({'where':{'id':_0x1902a4['params']['id']}})['then'](handleEntityNotFound(_0x1c0eca,null))[_0x5837('0x21')](function(_0x5d282e){var _0x5dcd99=_0x5d282e[_0x5837('0x33')]({'plain':!![]});return utilLicense[_0x5837('0x34')](_0x5dcd99,_0x1902a4['body'][_0x5837('0x35')]);})[_0x5837('0x21')](function(_0x2c8321){if(!_0x2c8321['demo']){return saveUpdates(_0x1902a4[_0x5837('0x36')],null);}return _0x2c8321;})[_0x5837('0x21')](respondWithResult(_0x1c0eca,null))[_0x5837('0x2f')](handleError(_0x1c0eca,null));};
\ No newline at end of file
diff --git a/server/api/license/license.model.js b/server/api/license/license.model.js
index 51ac03f..6ccd348 100644
--- a/server/api/license/license.model.js
+++ b/server/api/license/license.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3c81=['moment','../../config/environment','./license.attributes','exports','define','License','lodash','util','api'];(function(_0x52d3a5,_0x33a144){var _0x2a5631=function(_0x11c218){while(--_0x11c218){_0x52d3a5['push'](_0x52d3a5['shift']());}};_0x2a5631(++_0x33a144);}(_0x3c81,0x102));var _0x13c8=function(_0x417635,_0x572cec){_0x417635=_0x417635-0x0;var _0x38f939=_0x3c81[_0x417635];return _0x38f939;};'use strict';var _=require(_0x13c8('0x0'));var util=require(_0x13c8('0x1'));var logger=require('../../config/logger')(_0x13c8('0x2'));var moment=require(_0x13c8('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x13c8('0x4'));var attributes=require(_0x13c8('0x5'));module[_0x13c8('0x6')]=function(_0x1c16f1,_0x2a4d66){return _0x1c16f1[_0x13c8('0x7')](_0x13c8('0x8'),attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x39c4=['License','license','util','moment','bluebird','rimraf','../../config/environment','./license.attributes','exports','define'];(function(_0x44fdb5,_0x4ed1e7){var _0x266256=function(_0xc88b6f){while(--_0xc88b6f){_0x44fdb5['push'](_0x44fdb5['shift']());}};_0x266256(++_0x4ed1e7);}(_0x39c4,0x174));var _0x439c=function(_0x2185d4,_0x2c0433){_0x2185d4=_0x2185d4-0x0;var _0x450ba1=_0x39c4[_0x2185d4];return _0x450ba1;};'use strict';var _=require('lodash');var util=require(_0x439c('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x439c('0x1'));var BPromise=require(_0x439c('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x439c('0x3'));var config=require(_0x439c('0x4'));var attributes=require(_0x439c('0x5'));module[_0x439c('0x6')]=function(_0x105a46,_0x387467){return _0x105a46[_0x439c('0x7')](_0x439c('0x8'),attributes,{'tableName':_0x439c('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/license/license.rpc.js b/server/api/license/license.rpc.js
index 476ea7c..2278e06 100644
--- a/server/api/license/license.rpc.js
+++ b/server/api/license/license.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe726=['then','info','License,\x20%s,\x20%s','request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x346829,_0x1cca1c){var _0x478aaa=function(_0x5bd95f){while(--_0x5bd95f){_0x346829['push'](_0x346829['shift']());}};_0x478aaa(++_0x1cca1c);}(_0xe726,0x1d2));var _0x6e72=function(_0x2a4da8,_0x50b037){_0x2a4da8=_0x2a4da8-0x0;var _0x322d04=_0xe726[_0x2a4da8];return _0x322d04;};'use strict';var _=require(_0x6e72('0x0'));var util=require(_0x6e72('0x1'));var moment=require(_0x6e72('0x2'));var BPromise=require(_0x6e72('0x3'));var rs=require(_0x6e72('0x4'));var fs=require('fs');var Redis=require(_0x6e72('0x5'));var db=require(_0x6e72('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x6e72('0x7'))(_0x6e72('0x8'));var config=require(_0x6e72('0x9'));var jayson=require(_0x6e72('0xa'));var client=jayson[_0x6e72('0xb')][_0x6e72('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x305be2,_0x407263,_0x3a7cd0){return new BPromise(function(_0x1bb179,_0x3d2e16){return client[_0x6e72('0xd')](_0x305be2,_0x3a7cd0)[_0x6e72('0xe')](function(_0x5dd43d){logger[_0x6e72('0xf')](_0x6e72('0x10'),_0x407263,_0x6e72('0x11'));logger[_0x6e72('0x12')](_0x6e72('0x13'),_0x407263,_0x6e72('0x11'),JSON[_0x6e72('0x14')](_0x5dd43d));if(_0x5dd43d[_0x6e72('0x15')]){if(_0x5dd43d['error']['code']===0x1f4){logger[_0x6e72('0x15')](_0x6e72('0x10'),_0x407263,_0x5dd43d[_0x6e72('0x15')][_0x6e72('0x16')]);return _0x3d2e16(_0x5dd43d[_0x6e72('0x15')][_0x6e72('0x16')]);}logger[_0x6e72('0x15')](_0x6e72('0x10'),_0x407263,_0x5dd43d[_0x6e72('0x15')][_0x6e72('0x16')]);return _0x1bb179(_0x5dd43d[_0x6e72('0x15')][_0x6e72('0x16')]);}else{logger[_0x6e72('0xf')]('License,\x20%s,\x20%s',_0x407263,_0x6e72('0x11'));_0x1bb179(_0x5dd43d[_0x6e72('0x17')][_0x6e72('0x16')]);}})['catch'](function(_0x407cde){logger[_0x6e72('0x15')](_0x6e72('0x10'),_0x407263,_0x407cde);_0x3d2e16(_0x407cde);});});}
\ No newline at end of file
+var _0x4c0b=['request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','License,\x20%s,\x20%s'];(function(_0x30d3a9,_0x519e68){var _0x32580e=function(_0x91267){while(--_0x91267){_0x30d3a9['push'](_0x30d3a9['shift']());}};_0x32580e(++_0x519e68);}(_0x4c0b,0x1e4));var _0xb4c0=function(_0x429095,_0x5d9760){_0x429095=_0x429095-0x0;var _0x2dd7e2=_0x4c0b[_0x429095];return _0x2dd7e2;};'use strict';var _=require(_0xb4c0('0x0'));var util=require(_0xb4c0('0x1'));var moment=require(_0xb4c0('0x2'));var BPromise=require(_0xb4c0('0x3'));var rs=require(_0xb4c0('0x4'));var fs=require('fs');var Redis=require(_0xb4c0('0x5'));var db=require(_0xb4c0('0x6'))['db'];var utils=require(_0xb4c0('0x7'));var logger=require(_0xb4c0('0x8'))('rpc');var config=require(_0xb4c0('0x9'));var jayson=require(_0xb4c0('0xa'));var client=jayson[_0xb4c0('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x13b316,_0x5c34a3,_0x3aee22){return new BPromise(function(_0x4d2f01,_0x5ed826){return client[_0xb4c0('0xc')](_0x13b316,_0x3aee22)[_0xb4c0('0xd')](function(_0x32cffe){logger[_0xb4c0('0xe')](_0xb4c0('0xf'),_0x5c34a3,_0xb4c0('0x10'));logger[_0xb4c0('0x11')](_0xb4c0('0x12'),_0x5c34a3,_0xb4c0('0x10'),JSON[_0xb4c0('0x13')](_0x32cffe));if(_0x32cffe['error']){if(_0x32cffe[_0xb4c0('0x14')][_0xb4c0('0x15')]===0x1f4){logger[_0xb4c0('0x14')](_0xb4c0('0xf'),_0x5c34a3,_0x32cffe[_0xb4c0('0x14')][_0xb4c0('0x16')]);return _0x5ed826(_0x32cffe[_0xb4c0('0x14')][_0xb4c0('0x16')]);}logger['error'](_0xb4c0('0xf'),_0x5c34a3,_0x32cffe['error'][_0xb4c0('0x16')]);return _0x4d2f01(_0x32cffe[_0xb4c0('0x14')][_0xb4c0('0x16')]);}else{logger['info'](_0xb4c0('0xf'),_0x5c34a3,'request\x20sent');_0x4d2f01(_0x32cffe[_0xb4c0('0x17')]['message']);}})[_0xb4c0('0x18')](function(_0x48b53e){logger['error'](_0xb4c0('0xf'),_0x5c34a3,_0x48b53e);_0x5ed826(_0x48b53e);});});}
\ No newline at end of file
diff --git a/server/api/mailAccount/index.js b/server/api/mailAccount/index.js
index 3166e28..2a70d88 100644
--- a/server/api/mailAccount/index.js
+++ b/server/api/mailAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7eec=['getApplications','/:id/messages','getMessages','/:id/verify','verifySmtp','getAgents','addDisposition','post','/:id/canned_answers','addAnswer','addInteraction','addApplications','/:id/send','send','/:id/users','put','/:id','update','delete','removeDispositions','removeAnswers','removeImap','removeSmtp','removeAgents','exports','multer','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','getDispositions','/:id/in_servers','getImap','/:id/out_servers','getSmtp','/:id/interactions','getInteractions','/:id/applications'];(function(_0x3d9f2a,_0x2dfd99){var _0x3f87be=function(_0xfdf909){while(--_0xfdf909){_0x3d9f2a['push'](_0x3d9f2a['shift']());}};_0x3f87be(++_0x2dfd99);}(_0x7eec,0xa9));var _0xc7ee=function(_0x51be1b,_0xa93c91){_0x51be1b=_0x51be1b-0x0;var _0x575bac=_0x7eec[_0x51be1b];return _0x575bac;};'use strict';var multer=require(_0xc7ee('0x0'));var util=require(_0xc7ee('0x1'));var path=require('path');var timeout=require(_0xc7ee('0x2'));var express=require('express');var router=express[_0xc7ee('0x3')]();var auth=require(_0xc7ee('0x4'));var interaction=require(_0xc7ee('0x5'));var config=require(_0xc7ee('0x6'));var controller=require(_0xc7ee('0x7'));router[_0xc7ee('0x8')]('/',auth[_0xc7ee('0x9')](),controller[_0xc7ee('0xa')]);router[_0xc7ee('0x8')](_0xc7ee('0xb'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0xc')]);router['get']('/:id',auth[_0xc7ee('0x9')](),controller[_0xc7ee('0xd')]);router['get'](_0xc7ee('0xe'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0xf')]);router[_0xc7ee('0x8')]('/:id/canned_answers',auth[_0xc7ee('0x9')](),controller['getAnswers']);router[_0xc7ee('0x8')](_0xc7ee('0x10'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x11')]);router[_0xc7ee('0x8')](_0xc7ee('0x12'),auth['isAuthenticated'](),controller[_0xc7ee('0x13')]);router['get'](_0xc7ee('0x14'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x15')]);router[_0xc7ee('0x8')](_0xc7ee('0x16'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x17')]);router[_0xc7ee('0x8')](_0xc7ee('0x18'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x19')]);router[_0xc7ee('0x8')](_0xc7ee('0x1a'),auth['isAuthenticated'](),controller[_0xc7ee('0x1b')]);router[_0xc7ee('0x8')]('/:id/users',auth['isAuthenticated'](),controller[_0xc7ee('0x1c')]);router['post'](_0xc7ee('0xe'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x1d')]);router[_0xc7ee('0x1e')](_0xc7ee('0x1f'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x20')]);router[_0xc7ee('0x1e')]('/',auth['isAuthenticated'](),controller['create']);router[_0xc7ee('0x1e')]('/:id/in_servers',auth[_0xc7ee('0x9')](),controller['addImap']);router[_0xc7ee('0x1e')]('/:id/out_servers',auth['isAuthenticated'](),controller['addSmtp']);router[_0xc7ee('0x1e')](_0xc7ee('0x14'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x21')]);router[_0xc7ee('0x1e')](_0xc7ee('0x16'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x22')]);router[_0xc7ee('0x1e')](_0xc7ee('0x23'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x24')]);router[_0xc7ee('0x1e')](_0xc7ee('0x25'),auth[_0xc7ee('0x9')](),controller['addAgents']);router[_0xc7ee('0x26')](_0xc7ee('0x27'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x28')]);router[_0xc7ee('0x29')](_0xc7ee('0xe'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x2a')]);router[_0xc7ee('0x29')](_0xc7ee('0x1f'),auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x2b')]);router[_0xc7ee('0x29')](_0xc7ee('0x10'),auth['isAuthenticated'](),controller[_0xc7ee('0x2c')]);router['delete']('/:id/out_servers',auth['isAuthenticated'](),controller[_0xc7ee('0x2d')]);router[_0xc7ee('0x29')](_0xc7ee('0x27'),auth[_0xc7ee('0x9')](),controller['destroy']);router['delete']('/:id/users',auth[_0xc7ee('0x9')](),controller[_0xc7ee('0x2e')]);module[_0xc7ee('0x2f')]=router;
\ No newline at end of file
+var _0xbd8b=['/:id/applications','/:id/messages','getMessages','verifySmtp','/:id/users','getAgents','post','addDisposition','addAnswer','create','addImap','/:id/out_servers','addSmtp','addInteraction','addApplications','/:id/send','addAgents','put','update','removeDispositions','delete','removeAnswers','removeImap','removeSmtp','removeAgents','exports','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/dispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getSmtp','/:id/interactions','getInteractions'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xbd8b,0x12e));var _0xbbd8=function(_0x4fa8a9,_0x88baa2){_0x4fa8a9=_0x4fa8a9-0x0;var _0x44384c=_0xbd8b[_0x4fa8a9];return _0x44384c;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xbbd8('0x0'));var timeout=require(_0xbbd8('0x1'));var express=require(_0xbbd8('0x2'));var router=express['Router']();var auth=require(_0xbbd8('0x3'));var interaction=require(_0xbbd8('0x4'));var config=require(_0xbbd8('0x5'));var controller=require(_0xbbd8('0x6'));router[_0xbbd8('0x7')]('/',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x9')]);router['get'](_0xbbd8('0xa'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0xb')]);router[_0xbbd8('0x7')](_0xbbd8('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0xbbd8('0xd'),auth['isAuthenticated'](),controller['getDispositions']);router[_0xbbd8('0x7')](_0xbbd8('0xe'),auth['isAuthenticated'](),controller[_0xbbd8('0xf')]);router[_0xbbd8('0x7')](_0xbbd8('0x10'),auth['isAuthenticated'](),controller['getImap']);router[_0xbbd8('0x7')]('/:id/out_servers',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x11')]);router[_0xbbd8('0x7')](_0xbbd8('0x12'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x13')]);router['get'](_0xbbd8('0x14'),auth['isAuthenticated'](),controller['getApplications']);router[_0xbbd8('0x7')](_0xbbd8('0x15'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x16')]);router[_0xbbd8('0x7')]('/:id/verify',auth['isAuthenticated'](),controller[_0xbbd8('0x17')]);router[_0xbbd8('0x7')](_0xbbd8('0x18'),auth['isAuthenticated'](),controller[_0xbbd8('0x19')]);router[_0xbbd8('0x1a')](_0xbbd8('0xd'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x1b')]);router[_0xbbd8('0x1a')]('/:id/canned_answers',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x1c')]);router['post']('/',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x1d')]);router[_0xbbd8('0x1a')]('/:id/in_servers',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x1e')]);router['post'](_0xbbd8('0x1f'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x20')]);router[_0xbbd8('0x1a')]('/:id/interactions',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x21')]);router['post']('/:id/applications',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x22')]);router[_0xbbd8('0x1a')](_0xbbd8('0x23'),auth['isAuthenticated'](),controller['send']);router[_0xbbd8('0x1a')]('/:id/users',auth['isAuthenticated'](),controller[_0xbbd8('0x24')]);router[_0xbbd8('0x25')](_0xbbd8('0xc'),auth['isAuthenticated'](),controller[_0xbbd8('0x26')]);router['delete']('/:id/dispositions',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x27')]);router[_0xbbd8('0x28')](_0xbbd8('0xe'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x29')]);router[_0xbbd8('0x28')](_0xbbd8('0x10'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x2a')]);router['delete']('/:id/out_servers',auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x2b')]);router['delete'](_0xbbd8('0xc'),auth[_0xbbd8('0x8')](),controller['destroy']);router[_0xbbd8('0x28')](_0xbbd8('0x18'),auth[_0xbbd8('0x8')](),controller[_0xbbd8('0x2c')]);module[_0xbbd8('0x2d')]=router;
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.attributes.js b/server/api/mailAccount/mailAccount.attributes.js
index d8a9a92..40c45d7 100644
--- a/server/api/mailAccount/mailAccount.attributes.js
+++ b/server/api/mailAccount/mailAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe3dd=['UNSIGNED','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}} Subject\x20:\x20{{message.subject}}','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','setDataValue','mandatoryDispositionPauseId','exports','STRING','BOOLEAN'];(function(_0x117473,_0x485375){var _0x38711a=function(_0x33e119){while(--_0x33e119){_0x117473['push'](_0x117473['shift']());}};_0x38711a(++_0x485375);}(_0xe3dd,0x1c9));var _0xde3d=function(_0x5ab6b9,_0x1af9da){_0x5ab6b9=_0x5ab6b9-0x0;var _0x336e04=_0xe3dd[_0x5ab6b9];return _0x336e04;};'use strict';var Sequelize=require('sequelize');module[_0xde3d('0x0')]={'description':{'type':Sequelize[_0xde3d('0x1')]},'name':{'type':Sequelize[_0xde3d('0x1')],'allowNull':![]},'service':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':![]},'email':{'type':Sequelize[_0xde3d('0x1')],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':!![]},'key':{'type':Sequelize[_0xde3d('0x1')],'allowNull':![]},'template':{'type':Sequelize['TEXT']},'markAsUnread':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0xde3d('0x1')],'allowNull':![],'defaultValue':'Arial,Helvetica,sans-serif'},'fontSize':{'type':Sequelize['INTEGER'](0x2)[_0xde3d('0x3')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0xde3d('0x4')],'defaultValue':function(){return _0xde3d('0x5');}},'notificationSound':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xde3d('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xde3d('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0xde3d('0x6')],'allowNull':!![],'defaultValue':null,'comment':_0xde3d('0x7')},'mandatoryDisposition':{'type':Sequelize[_0xde3d('0x2')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x1b8821){if(!_0x1b8821)this[_0xde3d('0x8')](_0xde3d('0x9'),null);this[_0xde3d('0x8')]('mandatoryDisposition',_0x1b8821);}}};
\ No newline at end of file
+var _0xe360=['BOOLEAN','TEXT','STRING','Arial,Helvetica,sans-serif','INTEGER','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}} Subject\x20:\x20{{message.subject}}','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize'];(function(_0x10b6e2,_0x122fba){var _0x3e67d1=function(_0x48c03d){while(--_0x48c03d){_0x10b6e2['push'](_0x10b6e2['shift']());}};_0x3e67d1(++_0x122fba);}(_0xe360,0x1b7));var _0x0e36=function(_0x4d8ed9,_0x2ae284){_0x4d8ed9=_0x4d8ed9-0x0;var _0x1e2140=_0xe360[_0x4d8ed9];return _0x1e2140;};'use strict';var Sequelize=require(_0x0e36('0x0'));module['exports']={'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize['STRING'],'allowNull':![]},'service':{'type':Sequelize[_0x0e36('0x1')],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'template':{'type':Sequelize[_0x0e36('0x2')]},'markAsUnread':{'type':Sequelize[_0x0e36('0x1')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x0e36('0x3')],'allowNull':![],'defaultValue':_0x0e36('0x4')},'fontSize':{'type':Sequelize[_0x0e36('0x5')](0x2)['UNSIGNED'],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x0e36('0x6');}},'notificationSound':{'type':Sequelize[_0x0e36('0x1')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x0e36('0x1')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x0e36('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x0e36('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0e36('0x5')],'allowNull':!![],'defaultValue':null,'comment':_0x0e36('0x7')},'mandatoryDisposition':{'type':Sequelize[_0x0e36('0x1')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x345427){if(!_0x345427)this[_0x0e36('0x8')](_0x0e36('0x9'),null);this['setDataValue'](_0x0e36('0xa'),_0x345427);}}};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.controller.js b/server/api/mailAccount/mailAccount.controller.js
index 44791ad..f698bec 100644
--- a/server/api/mailAccount/mailAccount.controller.js
+++ b/server/api/mailAccount/mailAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4e65=['ListId','out','messageId','Interaction','Messages','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','userMailAccount:save','removeAgents','emit','userMailAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','defaults','redis','socket.io-emitter','./mailAccount.socket','register','jayson/promise','client','http','test','request','then','request\x20sent','debug','error','code','message','MailAccount,\x20%s,\x20%s','info','result','sendStatus','end','status','json','count','offset','set','Content-Range','apply','reject','save','update','destroy','MailAccounts','UserProfileResource','stack','name','send','index','MailServerIn','Imap','MailServerOut','Smtp','Pause','MailAccount','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','filter','merge','map','type','key','includeAll','include','findAll','rows','show','params','options','find','catch','body','mandatoryDispositionPause','describe','addDisposition','MailAccountId','Disposition','create','getDispositions','findOne','order','pick','removeDispositions','ids','addAnswer','getAnswers','CannedAnswer','removeAnswers','email','description','isNil','cauthentication','user','cuser','password','pass','cpassword','authentication','host','port','service','cservice','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','autoAssociation','getImap','removeImap','setImap','getSmtp','addSmtp','setSmtp','addInteraction','omit','getInteractions','MailInteraction','CmContact','Contact','User','Owner','fullname','internal','Tags','tag','transaction','MailApplication','bulkCreate','priority','getApplications','getMessages','MailMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','List','Contacts','updatedAt','DESC','from','attachments','join','root','basename','auth','secure'];(function(_0x376b45,_0x5964fb){var _0x2341b3=function(_0x5a7f01){while(--_0x5a7f01){_0x376b45['push'](_0x376b45['shift']());}};_0x2341b3(++_0x5964fb);}(_0x4e65,0xc4));var _0x54e6=function(_0x2df148,_0x2c1b1a){_0x2df148=_0x2df148-0x0;var _0xbff0f2=_0x4e65[_0x2df148];return _0xbff0f2;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x54e6('0x0'));var rimraf=require(_0x54e6('0x1'));var zipdir=require(_0x54e6('0x2'));var jsonpatch=require(_0x54e6('0x3'));var rp=require(_0x54e6('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x54e6('0x5'));var util=require(_0x54e6('0x6'));var path=require(_0x54e6('0x7'));var sox=require(_0x54e6('0x8'));var csv=require(_0x54e6('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x54e6('0xa'));var squel=require('squel');var crypto=require(_0x54e6('0xb'));var jsforce=require(_0x54e6('0xc'));var deskjs=require(_0x54e6('0xd'));var toCsv=require(_0x54e6('0x9'));var querystring=require('querystring');var Papa=require(_0x54e6('0xe'));var Redis=require(_0x54e6('0xf'));var authService=require(_0x54e6('0x10'));var qs=require(_0x54e6('0x11'));var hardwareService=require(_0x54e6('0x12'));var logger=require(_0x54e6('0x13'))('api');var utils=require(_0x54e6('0x14'));var config=require('../../config/environment');var db=require(_0x54e6('0x15'))['db'];config['redis']=_[_0x54e6('0x16')](config[_0x54e6('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0x54e6('0x18'))(new Redis(config['redis']));require(_0x54e6('0x19'))[_0x54e6('0x1a')](socket);var jayson=require(_0x54e6('0x1b'));var client=jayson[_0x54e6('0x1c')][_0x54e6('0x1d')]({'port':0x232b});function checkPasswordPattern(_0x2f91cd,_0x4b7b57,_0x35fa82){if(_0x35fa82){var _0x4248ad=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4248ad[_0x54e6('0x1e')](_0x4b7b57)){return _0x2f91cd;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x2f91cd;}}function respondWithRpcPromise(_0x581404,_0x5f25a0,_0x43e643,_0x41018a){return new BPromise(function(_0x4bd74d,_0x2d3e9c){var _0x499caa=_0x41018a||client;return _0x499caa[_0x54e6('0x1f')](_0x581404,_0x43e643)[_0x54e6('0x20')](function(_0x174e8c){logger['info']('MailAccount,\x20%s,\x20%s',_0x5f25a0,_0x54e6('0x21'));logger[_0x54e6('0x22')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x5f25a0,'request\x20sent',JSON['stringify'](_0x174e8c));if(_0x174e8c[_0x54e6('0x23')]){if(_0x174e8c[_0x54e6('0x23')][_0x54e6('0x24')]===0x1f4){logger['error']('MailAccount,\x20%s,\x20%s',_0x5f25a0,_0x174e8c['error'][_0x54e6('0x25')]);return _0x2d3e9c(_0x174e8c[_0x54e6('0x23')][_0x54e6('0x25')]);}logger[_0x54e6('0x23')](_0x54e6('0x26'),_0x5f25a0,_0x174e8c[_0x54e6('0x23')][_0x54e6('0x25')]);return _0x4bd74d(_0x174e8c[_0x54e6('0x23')]['message']);}else{logger[_0x54e6('0x27')](_0x54e6('0x26'),_0x5f25a0,_0x54e6('0x21'));_0x4bd74d(_0x174e8c[_0x54e6('0x28')][_0x54e6('0x25')]);}})['catch'](function(_0x50f88b){logger[_0x54e6('0x23')](_0x54e6('0x26'),_0x5f25a0,_0x50f88b);_0x2d3e9c(_0x50f88b);});});}function respondWithStatusCode(_0x323e32,_0x26faba){_0x26faba=_0x26faba||0xcc;return function(_0x4e3c5b){if(_0x4e3c5b){return _0x323e32[_0x54e6('0x29')](_0x26faba);}return _0x323e32['status'](_0x26faba)[_0x54e6('0x2a')]();};}function respondWithResult(_0x4e9169,_0x59682d){_0x59682d=_0x59682d||0xc8;return function(_0x5aafcc){if(_0x5aafcc){return _0x4e9169[_0x54e6('0x2b')](_0x59682d)[_0x54e6('0x2c')](_0x5aafcc);}};}function respondWithFilteredResult(_0x9e059b,_0x248cf5){return function(_0xccb541){if(_0xccb541){var _0x4b19a1=_0xccb541[_0x54e6('0x2d')],_0x257989=_0x248cf5[_0x54e6('0x2e')],_0x271d8c=_0x248cf5[_0x54e6('0x2e')]+_0x248cf5['limit'],_0x201f74;if(_0x271d8c>=_0x4b19a1){_0x271d8c=_0x4b19a1;_0x201f74=0xc8;}else{_0x201f74=0xce;}_0x9e059b['status'](_0x201f74);return _0x9e059b[_0x54e6('0x2f')](_0x54e6('0x30'),_0x257989+'-'+_0x271d8c+'/'+_0x4b19a1)['json'](_0xccb541);}return null;};}function patchUpdates(_0x381216){return function(_0x45ac28){try{jsonpatch[_0x54e6('0x31')](_0x45ac28,_0x381216,!![]);}catch(_0xcc8b79){return BPromise[_0x54e6('0x32')](_0xcc8b79);}return _0x45ac28[_0x54e6('0x33')]();};}function saveUpdates(_0x596ed7,_0xb00f3f){return function(_0x84fdd1){if(_0x84fdd1){return _0x84fdd1[_0x54e6('0x34')](_0x596ed7)[_0x54e6('0x20')](function(_0x5359f9){return _0x5359f9;});}return null;};}function removeEntity(_0x71dc36,_0x34fef3){return function(_0x3463e4){if(_0x3463e4){return _0x3463e4[_0x54e6('0x35')]()[_0x54e6('0x20')](function(){var _0x1fba19=_0x3463e4['get']({'plain':!![]});var _0x1f8640=_0x54e6('0x36');return db[_0x54e6('0x37')][_0x54e6('0x35')]({'where':{'type':_0x1f8640,'resourceId':_0x1fba19['id']}})['then'](function(){return _0x3463e4;});})[_0x54e6('0x20')](function(){_0x71dc36[_0x54e6('0x2b')](0xcc)[_0x54e6('0x2a')]();});}};}function handleEntityNotFound(_0x173f92,_0xfb26cf){return function(_0x533500){if(!_0x533500){_0x173f92[_0x54e6('0x29')](0x194);}return _0x533500;};}function handleError(_0xc96928,_0x247bba){_0x247bba=_0x247bba||0x1f4;return function(_0x1e5758){logger[_0x54e6('0x23')](_0x1e5758[_0x54e6('0x38')]);if(_0x1e5758[_0x54e6('0x39')]){delete _0x1e5758[_0x54e6('0x39')];}_0xc96928[_0x54e6('0x2b')](_0x247bba)[_0x54e6('0x3a')](_0x1e5758);};}exports[_0x54e6('0x3b')]=function(_0x2a2c93,_0x188873){var _0x473c56={'include':[{'model':db[_0x54e6('0x3c')],'as':_0x54e6('0x3d')},{'model':db[_0x54e6('0x3e')],'as':_0x54e6('0x3f')},{'model':db[_0x54e6('0x40')],'as':'mandatoryDispositionPause'}]},_0x1b0114={},_0x2312ca={'count':0x0,'rows':[]};var _0x53ae27=db[_0x54e6('0x41')][_0x54e6('0x42')];_0x1b0114[_0x54e6('0x43')]=_['keys'](_0x53ae27);_0x1b0114[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x2a2c93['query']);_0x1b0114[_0x54e6('0x46')]=_[_0x54e6('0x47')](_0x1b0114[_0x54e6('0x43')],_0x1b0114[_0x54e6('0x44')]);_0x473c56[_0x54e6('0x48')]=_['intersection'](_0x1b0114[_0x54e6('0x43')],qs[_0x54e6('0x49')](_0x2a2c93[_0x54e6('0x44')][_0x54e6('0x49')]));_0x473c56[_0x54e6('0x48')]=_0x473c56[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x473c56[_0x54e6('0x48')]:_0x1b0114['model'];if(!_0x2a2c93['query'][_0x54e6('0x4b')](_0x54e6('0x4c'))){_0x473c56[_0x54e6('0x4d')]=qs[_0x54e6('0x4d')](_0x2a2c93[_0x54e6('0x44')][_0x54e6('0x4d')]);_0x473c56['offset']=qs[_0x54e6('0x2e')](_0x2a2c93[_0x54e6('0x44')][_0x54e6('0x2e')]);}_0x473c56['order']=qs[_0x54e6('0x4e')](_0x2a2c93[_0x54e6('0x44')]['sort']);_0x473c56[_0x54e6('0x4f')]=qs['filters'](_['pick'](_0x2a2c93[_0x54e6('0x44')],_0x1b0114['filters']));if(_0x2a2c93['query'][_0x54e6('0x50')]){_0x473c56['where']=_[_0x54e6('0x51')](_0x473c56[_0x54e6('0x4f')],{'$or':_[_0x54e6('0x52')](_0x53ae27,function(_0x34b5fa){if(_0x34b5fa[_0x54e6('0x53')][_0x54e6('0x54')]!=='VIRTUAL'){var _0x11e6fb={};_0x11e6fb[_0x34b5fa['field']]={'$like':'%'+_0x2a2c93[_0x54e6('0x44')][_0x54e6('0x50')]+'%'};return _0x11e6fb;}})});}_0x473c56=_[_0x54e6('0x51')]({},_0x473c56,_0x2a2c93['options']);var _0x5d86ec={'where':_0x473c56[_0x54e6('0x4f')]};return db['MailAccount'][_0x54e6('0x2d')](_0x5d86ec)[_0x54e6('0x20')](function(_0x2bb8ef){_0x2312ca['count']=_0x2bb8ef;if(_0x2a2c93[_0x54e6('0x44')][_0x54e6('0x55')]){_0x473c56[_0x54e6('0x56')]=[{'all':!![]}];}return db[_0x54e6('0x41')][_0x54e6('0x57')](_0x473c56);})[_0x54e6('0x20')](function(_0x5d3246){_0x2312ca[_0x54e6('0x58')]=_0x5d3246;return _0x2312ca;})[_0x54e6('0x20')](respondWithFilteredResult(_0x188873,_0x473c56))['catch'](handleError(_0x188873,null));};exports[_0x54e6('0x59')]=function(_0x5387c2,_0x4716b3){var _0x996626={'raw':![],'where':{'id':_0x5387c2[_0x54e6('0x5a')]['id']},'include':[{'model':db[_0x54e6('0x3c')],'as':_0x54e6('0x3d')},{'model':db[_0x54e6('0x3e')],'as':_0x54e6('0x3f')},{'model':db[_0x54e6('0x40')],'as':'mandatoryDispositionPause'}]},_0x5d39eb={};_0x5d39eb['model']=_[_0x54e6('0x45')](db[_0x54e6('0x41')][_0x54e6('0x42')]);_0x5d39eb[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x5387c2[_0x54e6('0x44')]);_0x5d39eb[_0x54e6('0x46')]=_['intersection'](_0x5d39eb['model'],_0x5d39eb[_0x54e6('0x44')]);_0x996626[_0x54e6('0x48')]=_[_0x54e6('0x47')](_0x5d39eb[_0x54e6('0x43')],qs[_0x54e6('0x49')](_0x5387c2[_0x54e6('0x44')][_0x54e6('0x49')]));_0x996626['attributes']=_0x996626[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x996626['attributes']:_0x5d39eb[_0x54e6('0x43')];if(_0x5387c2['query'][_0x54e6('0x55')]){_0x996626[_0x54e6('0x56')]=[{'all':!![]}];}_0x996626=_['merge']({},_0x996626,_0x5387c2[_0x54e6('0x5b')]);return db[_0x54e6('0x41')][_0x54e6('0x5c')](_0x996626)[_0x54e6('0x20')](handleEntityNotFound(_0x4716b3,null))[_0x54e6('0x20')](respondWithResult(_0x4716b3,null))[_0x54e6('0x5d')](handleError(_0x4716b3,null));};exports[_0x54e6('0x34')]=function(_0x4dc511,_0x30fc45){if(_0x4dc511[_0x54e6('0x5e')]['id']){delete _0x4dc511[_0x54e6('0x5e')]['id'];}return db[_0x54e6('0x41')]['find']({'where':{'id':_0x4dc511[_0x54e6('0x5a')]['id']},'include':[{'model':db[_0x54e6('0x3c')],'as':_0x54e6('0x3d')},{'model':db['MailServerOut'],'as':_0x54e6('0x3f')},{'model':db[_0x54e6('0x40')],'as':_0x54e6('0x5f')}]})[_0x54e6('0x20')](handleEntityNotFound(_0x30fc45,null))[_0x54e6('0x20')](saveUpdates(_0x4dc511[_0x54e6('0x5e')],null))[_0x54e6('0x20')](function(_0xd42487){if(_0xd42487&&_0x4dc511[_0x54e6('0x5e')]['Imap']){return db[_0x54e6('0x3c')][_0x54e6('0x34')](_0x4dc511[_0x54e6('0x5e')]['Imap'],{'where':{'MailAccountId':_0xd42487['id']}})[_0x54e6('0x20')](function(){return _0xd42487;});}return _0xd42487;})['then'](function(_0x397673){if(_0x397673&&_0x4dc511['body'][_0x54e6('0x3f')]){return db[_0x54e6('0x3e')]['update'](_0x4dc511[_0x54e6('0x5e')]['Smtp'],{'where':{'MailAccountId':_0x397673['id']}})[_0x54e6('0x20')](function(){return _0x397673;});}return _0x397673;})['then'](respondWithResult(_0x30fc45,null))[_0x54e6('0x5d')](handleError(_0x30fc45,null));};exports['describe']=function(_0x9ef770,_0x35b299){return db['MailAccount'][_0x54e6('0x60')]()[_0x54e6('0x20')](respondWithResult(_0x35b299,null))[_0x54e6('0x5d')](handleError(_0x35b299,null));};exports[_0x54e6('0x61')]=function(_0x51e487,_0x20220,_0x129bdd){if(_0x51e487[_0x54e6('0x5e')]['id']){delete _0x51e487[_0x54e6('0x5e')]['id'];}return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x51e487[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x20220,null))[_0x54e6('0x20')](function(_0x39cb29){if(_0x39cb29){_0x51e487[_0x54e6('0x5e')][_0x54e6('0x62')]=_0x39cb29['id'];return db[_0x54e6('0x63')][_0x54e6('0x64')](_0x51e487[_0x54e6('0x5e')]);}})[_0x54e6('0x20')](respondWithResult(_0x20220,null))['catch'](handleError(_0x20220,null));};exports[_0x54e6('0x65')]=function(_0x5a36fa,_0x1863bf,_0x13ab2f){var _0x451526={'raw':![],'where':{}};var _0x2a1371={};var _0x2fa2d1={'count':0x0,'rows':[]};return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x5a36fa[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x1863bf,null))[_0x54e6('0x20')](function(_0x48734b){if(_0x48734b){_0x2a1371[_0x54e6('0x43')]=_['keys'](db[_0x54e6('0x63')][_0x54e6('0x42')]);_0x2a1371[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x5a36fa[_0x54e6('0x44')]);_0x2a1371[_0x54e6('0x46')]=_[_0x54e6('0x47')](_0x2a1371['model'],_0x2a1371['query']);_0x451526[_0x54e6('0x48')]=_[_0x54e6('0x47')](_0x2a1371['model'],qs['fields'](_0x5a36fa[_0x54e6('0x44')][_0x54e6('0x49')]));_0x451526[_0x54e6('0x48')]=_0x451526[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x451526['attributes']:_0x2a1371[_0x54e6('0x43')];if(!_0x5a36fa['query']['hasOwnProperty'](_0x54e6('0x4c'))){_0x451526['limit']=qs[_0x54e6('0x4d')](_0x5a36fa[_0x54e6('0x44')][_0x54e6('0x4d')]);_0x451526['offset']=qs[_0x54e6('0x2e')](_0x5a36fa[_0x54e6('0x44')][_0x54e6('0x2e')]);}_0x451526[_0x54e6('0x67')]=qs['sort'](_0x5a36fa[_0x54e6('0x44')][_0x54e6('0x4e')]);_0x451526['where']=qs['filters'](_[_0x54e6('0x68')](_0x5a36fa[_0x54e6('0x44')],_0x2a1371[_0x54e6('0x46')]));_0x451526[_0x54e6('0x4f')][_0x54e6('0x62')]=_0x48734b['id'];if(_0x5a36fa['query']['filter']){_0x451526[_0x54e6('0x4f')]=_[_0x54e6('0x51')](_0x451526[_0x54e6('0x4f')],{'$or':_[_0x54e6('0x52')](_0x451526[_0x54e6('0x48')],function(_0x2d7129){var _0x5e8322={};_0x5e8322[_0x2d7129]={'$like':'%'+_0x5a36fa[_0x54e6('0x44')]['filter']+'%'};return _0x5e8322;})});}_0x451526=_['merge']({},_0x451526,_0x5a36fa[_0x54e6('0x5b')]);return db['Disposition'][_0x54e6('0x2d')]({'where':_0x451526['where']})['then'](function(_0x2d80eb){_0x2fa2d1[_0x54e6('0x2d')]=_0x2d80eb;if(_0x5a36fa['query'][_0x54e6('0x55')]){_0x451526[_0x54e6('0x56')]=[{'all':!![]}];}return db[_0x54e6('0x63')]['findAll'](_0x451526);})[_0x54e6('0x20')](function(_0x26fbbf){_0x2fa2d1[_0x54e6('0x58')]=_0x26fbbf;return _0x2fa2d1;});}})[_0x54e6('0x20')](respondWithFilteredResult(_0x1863bf,_0x451526))[_0x54e6('0x5d')](handleError(_0x1863bf,null));};exports[_0x54e6('0x69')]=function(_0x250b37,_0x1c174e,_0x21565b){return db['MailAccount'][_0x54e6('0x5c')]({'where':{'id':_0x250b37[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1c174e,null))['then'](function(_0x5f0728){if(_0x5f0728){return _0x5f0728['removeDispositions'](_0x250b37['query'][_0x54e6('0x6a')]);}})[_0x54e6('0x20')](respondWithStatusCode(_0x1c174e,null))[_0x54e6('0x5d')](handleError(_0x1c174e,null));};exports[_0x54e6('0x6b')]=function(_0x478afc,_0x4bac86,_0x5610d3){if(_0x478afc[_0x54e6('0x5e')]['id']){delete _0x478afc['body']['id'];}return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x478afc[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x4bac86,null))[_0x54e6('0x20')](function(_0x370c20){if(_0x370c20){_0x478afc['body']['MailAccountId']=_0x370c20['id'];return db['CannedAnswer'][_0x54e6('0x64')](_0x478afc[_0x54e6('0x5e')]);}})['then'](respondWithResult(_0x4bac86,null))[_0x54e6('0x5d')](handleError(_0x4bac86,null));};exports[_0x54e6('0x6c')]=function(_0x40b655,_0x6b09f2,_0x3d1745){var _0x2dd2a1={'raw':![],'where':{}};var _0x318375={};var _0x228783={'count':0x0,'rows':[]};return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x40b655[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x6b09f2,null))[_0x54e6('0x20')](function(_0xe4e15f){if(_0xe4e15f){_0x318375['model']=_[_0x54e6('0x45')](db[_0x54e6('0x6d')][_0x54e6('0x42')]);_0x318375[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x40b655['query']);_0x318375[_0x54e6('0x46')]=_['intersection'](_0x318375[_0x54e6('0x43')],_0x318375[_0x54e6('0x44')]);_0x2dd2a1[_0x54e6('0x48')]=_[_0x54e6('0x47')](_0x318375[_0x54e6('0x43')],qs['fields'](_0x40b655[_0x54e6('0x44')][_0x54e6('0x49')]));_0x2dd2a1[_0x54e6('0x48')]=_0x2dd2a1[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x2dd2a1[_0x54e6('0x48')]:_0x318375[_0x54e6('0x43')];if(!_0x40b655[_0x54e6('0x44')][_0x54e6('0x4b')](_0x54e6('0x4c'))){_0x2dd2a1[_0x54e6('0x4d')]=qs[_0x54e6('0x4d')](_0x40b655[_0x54e6('0x44')]['limit']);_0x2dd2a1[_0x54e6('0x2e')]=qs[_0x54e6('0x2e')](_0x40b655[_0x54e6('0x44')][_0x54e6('0x2e')]);}_0x2dd2a1[_0x54e6('0x67')]=qs[_0x54e6('0x4e')](_0x40b655[_0x54e6('0x44')][_0x54e6('0x4e')]);_0x2dd2a1[_0x54e6('0x4f')]=qs[_0x54e6('0x46')](_['pick'](_0x40b655['query'],_0x318375[_0x54e6('0x46')]));_0x2dd2a1['where']['MailAccountId']=_0xe4e15f['id'];if(_0x40b655[_0x54e6('0x44')][_0x54e6('0x50')]){_0x2dd2a1['where']=_[_0x54e6('0x51')](_0x2dd2a1[_0x54e6('0x4f')],{'$or':_[_0x54e6('0x52')](_0x2dd2a1['attributes'],function(_0x1dc50a){var _0x56a992={};_0x56a992[_0x1dc50a]={'$like':'%'+_0x40b655['query'][_0x54e6('0x50')]+'%'};return _0x56a992;})});}_0x2dd2a1=_['merge']({},_0x2dd2a1,_0x40b655['options']);return db[_0x54e6('0x6d')][_0x54e6('0x2d')]({'where':_0x2dd2a1[_0x54e6('0x4f')]})[_0x54e6('0x20')](function(_0x313acf){_0x228783['count']=_0x313acf;if(_0x40b655[_0x54e6('0x44')]['includeAll']){_0x2dd2a1[_0x54e6('0x56')]=[{'all':!![]}];}return db[_0x54e6('0x6d')]['findAll'](_0x2dd2a1);})['then'](function(_0x2e8230){_0x228783[_0x54e6('0x58')]=_0x2e8230;return _0x228783;});}})[_0x54e6('0x20')](respondWithFilteredResult(_0x6b09f2,_0x2dd2a1))[_0x54e6('0x5d')](handleError(_0x6b09f2,null));};exports['removeAnswers']=function(_0x27bf8e,_0x27511b,_0x1a1be5){return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x27bf8e['params']['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x27511b,null))[_0x54e6('0x20')](function(_0x5d6347){if(_0x5d6347){return _0x5d6347[_0x54e6('0x6e')](_0x27bf8e[_0x54e6('0x44')][_0x54e6('0x6a')]);}})['then'](respondWithStatusCode(_0x27511b,null))['catch'](handleError(_0x27511b,null));};exports[_0x54e6('0x64')]=function(_0x1c3ccc,_0xeb2d38){var _0x238542={'name':_0x1c3ccc['body'][_0x54e6('0x39')],'key':_0x1c3ccc['body']['key'],'email':_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x6f')],'ListId':_0x1c3ccc['body']['ListId'],'active':!_['isNil'](_0x1c3ccc[_0x54e6('0x5e')]['active'])?_0x1c3ccc[_0x54e6('0x5e')]['active']:!![],'description':_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x70')]||null,'Imap':{},'Smtp':{}};if(_[_0x54e6('0x71')](_0x1c3ccc[_0x54e6('0x5e')]['cservice'])){if(_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x72')]){_0x238542[_0x54e6('0x3d')][_0x54e6('0x73')]=_0x238542[_0x54e6('0x3f')][_0x54e6('0x73')]=_0x1c3ccc['body'][_0x54e6('0x74')];_0x238542[_0x54e6('0x3d')][_0x54e6('0x75')]=_0x238542[_0x54e6('0x3f')][_0x54e6('0x76')]=_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x77')];}else{_0x238542['Imap'][_0x54e6('0x78')]=_0x238542[_0x54e6('0x3f')][_0x54e6('0x78')]=![];}_0x238542[_0x54e6('0x3d')][_0x54e6('0x79')]=_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x3d')][_0x54e6('0x79')];_0x238542[_0x54e6('0x3d')]['port']=_0x1c3ccc['body']['Imap'][_0x54e6('0x7a')];_0x238542[_0x54e6('0x3f')][_0x54e6('0x79')]=_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x3f')]['host'];_0x238542[_0x54e6('0x3f')]['port']=_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x3f')][_0x54e6('0x7a')];}else{_0x238542['Imap'][_0x54e6('0x7b')]=_0x238542[_0x54e6('0x3f')]['service']=_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x7c')];_0x238542['Imap'][_0x54e6('0x73')]=_0x238542['Smtp'][_0x54e6('0x73')]=_0x1c3ccc['body'][_0x54e6('0x74')];_0x238542[_0x54e6('0x3d')][_0x54e6('0x75')]=_0x238542[_0x54e6('0x3f')][_0x54e6('0x76')]=_0x1c3ccc[_0x54e6('0x5e')][_0x54e6('0x77')];}return db[_0x54e6('0x41')][_0x54e6('0x64')](_0x238542,{'include':[{'model':db['MailServerOut'],'as':_0x54e6('0x3f')},{'model':db[_0x54e6('0x3c')],'as':'Imap'}]})[_0x54e6('0x20')](function(_0x35426b){var _0x3627d3=_0x1c3ccc[_0x54e6('0x73')][_0x54e6('0x7d')]({'plain':!![]});if(!_0x3627d3)throw new Error(_0x54e6('0x7e'));if(_0x3627d3['role']===_0x54e6('0x73')){var _0x1551bf=_0x35426b[_0x54e6('0x7d')]({'plain':!![]});return db['UserProfileSection'][_0x54e6('0x5c')]({'where':{'name':_0x54e6('0x36'),'userProfileId':_0x3627d3['userProfileId']},'raw':!![]})['then'](function(_0x18d137){if(_0x18d137&&_0x18d137[_0x54e6('0x7f')]===0x0){return db[_0x54e6('0x37')][_0x54e6('0x64')]({'name':_0x1551bf[_0x54e6('0x39')],'resourceId':_0x1551bf['id'],'type':_0x18d137[_0x54e6('0x39')],'sectionId':_0x18d137['id']},{})[_0x54e6('0x20')](function(){return _0x35426b;});}else{return _0x35426b;}})['catch'](function(_0x1bbd5f){logger[_0x54e6('0x23')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1bbd5f);throw _0x1bbd5f;});}return _0x35426b;})[_0x54e6('0x20')](respondWithResult(_0xeb2d38,0xc9))[_0x54e6('0x5d')](handleError(_0xeb2d38,null));};exports[_0x54e6('0x80')]=function(_0x31a45f,_0x49e734,_0x108674){return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x31a45f[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x49e734,null))[_0x54e6('0x20')](function(_0x54dfe2){if(_0x54dfe2){return _0x54dfe2[_0x54e6('0x80')]();}return null;})['then'](respondWithResult(_0x49e734,null))['catch'](handleError(_0x49e734,null));};exports['addImap']=function(_0x1ea463,_0x5a5147,_0x480f84){if(_0x1ea463[_0x54e6('0x5e')]['id']){delete _0x1ea463[_0x54e6('0x5e')]['id'];}return db[_0x54e6('0x41')]['find']({'where':{'id':_0x1ea463[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5a5147,null))[_0x54e6('0x20')](function(_0x55d4c5){if(_0x55d4c5){_0x1ea463[_0x54e6('0x5e')][_0x54e6('0x62')]=_0x55d4c5['id'];return db[_0x54e6('0x3c')][_0x54e6('0x64')](_0x1ea463['body']);}})[_0x54e6('0x20')](respondWithResult(_0x5a5147,null))[_0x54e6('0x5d')](handleError(_0x5a5147,null));};exports[_0x54e6('0x81')]=function(_0x107919,_0x1a80fd,_0x2d68a9){return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x107919['params']['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x1a80fd,null))[_0x54e6('0x20')](function(_0x2acb33){if(_0x2acb33){return _0x2acb33[_0x54e6('0x82')](null);}return null;})['then'](respondWithStatusCode(_0x1a80fd,null))[_0x54e6('0x5d')](handleError(_0x1a80fd,null));};exports[_0x54e6('0x83')]=function(_0x5ef31c,_0x49bcde,_0x54be75){return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x5ef31c[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x49bcde,null))[_0x54e6('0x20')](function(_0x2de2a4){if(_0x2de2a4){return _0x2de2a4[_0x54e6('0x83')]();}return null;})[_0x54e6('0x20')](respondWithResult(_0x49bcde,null))[_0x54e6('0x5d')](handleError(_0x49bcde,null));};exports[_0x54e6('0x84')]=function(_0x278757,_0xed4c1a,_0x15b5e3){if(_0x278757[_0x54e6('0x5e')]['id']){delete _0x278757[_0x54e6('0x5e')]['id'];}return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x278757[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0xed4c1a,null))['then'](function(_0x3becc5){if(_0x3becc5){_0x278757[_0x54e6('0x5e')]['MailAccountId']=_0x3becc5['id'];return db[_0x54e6('0x3e')][_0x54e6('0x64')](_0x278757[_0x54e6('0x5e')]);}})[_0x54e6('0x20')](respondWithResult(_0xed4c1a,null))['catch'](handleError(_0xed4c1a,null));};exports['removeSmtp']=function(_0x644aa5,_0x1d7915,_0x4d8ab0){return db[_0x54e6('0x41')]['findOne']({'where':{'id':_0x644aa5[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1d7915,null))[_0x54e6('0x20')](function(_0x125536){if(_0x125536){return _0x125536[_0x54e6('0x85')](null);}return null;})[_0x54e6('0x20')](respondWithStatusCode(_0x1d7915,null))['catch'](handleError(_0x1d7915,null));};exports[_0x54e6('0x86')]=function(_0x3e2aa2,_0x43c46f,_0x39c022){return db['MailInteraction'][_0x54e6('0x5c')]({'where':{'id':_0x3e2aa2['params']['id']}})['then'](handleEntityNotFound(_0x43c46f,null))['then'](function(_0x21dfe2){if(_0x21dfe2){return _0x21dfe2[_0x54e6('0x86')](_0x3e2aa2[_0x54e6('0x5e')][_0x54e6('0x6a')],_[_0x54e6('0x87')](_0x3e2aa2[_0x54e6('0x5e')],[_0x54e6('0x6a'),'id'])||{});}})[_0x54e6('0x20')](respondWithResult(_0x43c46f,null))[_0x54e6('0x5d')](handleError(_0x43c46f,null));};exports[_0x54e6('0x88')]=function(_0x2b59ec,_0x99928c,_0x2ac445){var _0x107ec6={'raw':![],'where':{}};var _0x5d6abd={};var _0x2df4d6={'count':0x0,'rows':[]};return db['MailAccount'][_0x54e6('0x66')]({'where':{'id':_0x2b59ec['params']['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x99928c,null))[_0x54e6('0x20')](function(_0x2c3390){if(_0x2c3390){_0x5d6abd['model']=_[_0x54e6('0x45')](db[_0x54e6('0x89')][_0x54e6('0x42')]);_0x5d6abd[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x2b59ec[_0x54e6('0x44')]);_0x5d6abd[_0x54e6('0x46')]=_['intersection'](_0x5d6abd[_0x54e6('0x43')],_0x5d6abd[_0x54e6('0x44')]);_0x107ec6['attributes']=_[_0x54e6('0x47')](_0x5d6abd['model'],qs[_0x54e6('0x49')](_0x2b59ec[_0x54e6('0x44')][_0x54e6('0x49')]));_0x107ec6[_0x54e6('0x48')]=_0x107ec6[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x107ec6[_0x54e6('0x48')]:_0x5d6abd[_0x54e6('0x43')];if(!_0x2b59ec[_0x54e6('0x44')]['hasOwnProperty'](_0x54e6('0x4c'))){_0x107ec6[_0x54e6('0x4d')]=qs[_0x54e6('0x4d')](_0x2b59ec['query'][_0x54e6('0x4d')]);_0x107ec6[_0x54e6('0x2e')]=qs['offset'](_0x2b59ec[_0x54e6('0x44')][_0x54e6('0x2e')]);}_0x107ec6[_0x54e6('0x67')]=qs[_0x54e6('0x4e')](_0x2b59ec['query'][_0x54e6('0x4e')]);_0x107ec6['where']=qs['filters'](_['pick'](_0x2b59ec[_0x54e6('0x44')],_0x5d6abd['filters']));_0x107ec6[_0x54e6('0x4f')][_0x54e6('0x62')]=_0x2c3390['id'];if(_0x2b59ec[_0x54e6('0x44')]['filter']){_0x107ec6['where']=_[_0x54e6('0x51')](_0x107ec6[_0x54e6('0x4f')],{'$or':_['map'](_0x107ec6['attributes'],function(_0x6ed56f){var _0x3c053d={};_0x3c053d[_0x6ed56f]={'$like':'%'+_0x2b59ec[_0x54e6('0x44')][_0x54e6('0x50')]+'%'};return _0x3c053d;})});}_0x107ec6=_['merge']({},_0x107ec6,_0x2b59ec[_0x54e6('0x5b')]);return db[_0x54e6('0x89')][_0x54e6('0x2d')]({'where':_0x107ec6[_0x54e6('0x4f')]})[_0x54e6('0x20')](function(_0x52e139){_0x2df4d6[_0x54e6('0x2d')]=_0x52e139;if(_0x2b59ec[_0x54e6('0x44')][_0x54e6('0x55')]){_0x107ec6['include']=[{'model':db[_0x54e6('0x8a')],'as':_0x54e6('0x8b'),'required':![]},{'model':db[_0x54e6('0x8c')],'as':_0x54e6('0x8d'),'attributes':[_0x54e6('0x39'),_0x54e6('0x8e'),_0x54e6('0x8f')],'required':![]},{'model':db['Tag'],'as':_0x54e6('0x90'),'attributes':['id',_0x54e6('0x39'),'color'],'where':_0x2b59ec[_0x54e6('0x44')]['tag']?{'id':_0x2b59ec[_0x54e6('0x44')][_0x54e6('0x91')]}:undefined,'required':_0x2b59ec[_0x54e6('0x44')][_0x54e6('0x91')]?!![]:![]}];}return db[_0x54e6('0x89')][_0x54e6('0x57')](_0x107ec6);})['then'](function(_0x5d4354){_0x2df4d6[_0x54e6('0x58')]=_0x5d4354;return _0x2df4d6;});}})[_0x54e6('0x20')](respondWithFilteredResult(_0x99928c,_0x107ec6))['catch'](handleError(_0x99928c,null));};exports['addApplications']=function(_0x4af04f,_0x503491,_0x2f2486){return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x4af04f[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x503491,null))[_0x54e6('0x20')](function(_0x2a1b32){if(_0x2a1b32){return db['sequelize'][_0x54e6('0x92')](function(_0x394df8){return db[_0x54e6('0x93')][_0x54e6('0x35')]({'where':{'MailAccountId':_0x4af04f['params']['id']},'transaction':_0x394df8})[_0x54e6('0x20')](function(_0x2115ce){var _0x1789e3=_[_0x54e6('0x52')](_0x4af04f[_0x54e6('0x5e')],function(_0x1b665d){_0x1b665d[_0x54e6('0x62')]=_0x4af04f['params']['id'];return _0x1b665d;});return db[_0x54e6('0x93')][_0x54e6('0x94')](_0x1789e3,{'transaction':_0x394df8});});})[_0x54e6('0x20')](function(){return db[_0x54e6('0x93')]['findAndCountAll']({'where':{'MailAccountId':_0x4af04f[_0x54e6('0x5a')]['id']},'order':_0x54e6('0x95')});});}})[_0x54e6('0x20')](respondWithResult(_0x503491,null))['catch'](handleError(_0x503491,null));};exports[_0x54e6('0x96')]=function(_0x5c8734,_0x4bf789,_0x3cb6de){var _0x51ba20={};var _0x196039={};var _0x59b8fa;var _0x51f866;return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x5c8734[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x4bf789,null))['then'](function(_0x4c02af){if(_0x4c02af){_0x59b8fa=_0x4c02af;_0x196039[_0x54e6('0x43')]=_[_0x54e6('0x45')](db[_0x54e6('0x93')][_0x54e6('0x42')]);_0x196039[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x5c8734[_0x54e6('0x44')]);_0x196039[_0x54e6('0x46')]=_[_0x54e6('0x47')](_0x196039[_0x54e6('0x43')],_0x196039[_0x54e6('0x44')]);_0x51ba20[_0x54e6('0x48')]=_[_0x54e6('0x47')](_0x196039[_0x54e6('0x43')],qs[_0x54e6('0x49')](_0x5c8734[_0x54e6('0x44')][_0x54e6('0x49')]));_0x51ba20['attributes']=_0x51ba20['attributes'][_0x54e6('0x4a')]?_0x51ba20[_0x54e6('0x48')]:_0x196039[_0x54e6('0x43')];_0x51ba20['order']=qs[_0x54e6('0x4e')](_0x5c8734['query'][_0x54e6('0x4e')]);_0x51ba20[_0x54e6('0x4f')]=qs[_0x54e6('0x46')](_['pick'](_0x5c8734[_0x54e6('0x44')],_0x196039[_0x54e6('0x46')]));if(_0x5c8734[_0x54e6('0x44')][_0x54e6('0x50')]){_0x51ba20[_0x54e6('0x4f')]=_['merge'](_0x51ba20[_0x54e6('0x4f')],{'$or':_['map'](_0x51ba20[_0x54e6('0x48')],function(_0x5eb3b0){var _0x297b8a={};_0x297b8a[_0x5eb3b0]={'$like':'%'+_0x5c8734[_0x54e6('0x44')][_0x54e6('0x50')]+'%'};return _0x297b8a;})});}_0x51ba20=_[_0x54e6('0x51')]({},_0x51ba20,_0x5c8734[_0x54e6('0x5b')]);return _0x59b8fa[_0x54e6('0x96')](_0x51ba20);}})[_0x54e6('0x20')](function(_0x25d770){if(_0x25d770){_0x51f866=_0x25d770[_0x54e6('0x4a')];if(!_0x5c8734['query'][_0x54e6('0x4b')]('nolimit')){_0x51ba20['limit']=qs[_0x54e6('0x4d')](_0x5c8734[_0x54e6('0x44')][_0x54e6('0x4d')]);_0x51ba20[_0x54e6('0x2e')]=qs[_0x54e6('0x2e')](_0x5c8734['query']['offset']);}return _0x59b8fa[_0x54e6('0x96')](_0x51ba20);}})[_0x54e6('0x20')](function(_0x26ed32){if(_0x26ed32){return _0x26ed32?{'count':_0x51f866,'rows':_0x26ed32}:null;}})[_0x54e6('0x20')](respondWithResult(_0x4bf789,null))['catch'](handleError(_0x4bf789,null));};exports[_0x54e6('0x97')]=function(_0x119af1,_0x476e46,_0x40ed1e){var _0x7140e4={'raw':!![],'where':{}};var _0x12e632={};var _0x509c8c={'count':0x0,'rows':[]};return db['MailAccount'][_0x54e6('0x66')]({'where':{'id':_0x119af1[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x476e46,null))[_0x54e6('0x20')](function(_0x24ca18){if(_0x24ca18){_0x12e632['model']=_[_0x54e6('0x45')](db[_0x54e6('0x98')]['rawAttributes']);_0x12e632[_0x54e6('0x44')]=_[_0x54e6('0x45')](_0x119af1[_0x54e6('0x44')]);_0x12e632['filters']=_[_0x54e6('0x47')](_0x12e632[_0x54e6('0x43')],_0x12e632[_0x54e6('0x44')]);_0x7140e4[_0x54e6('0x48')]=_[_0x54e6('0x47')](_0x12e632[_0x54e6('0x43')],qs[_0x54e6('0x49')](_0x119af1['query'][_0x54e6('0x49')]));_0x7140e4[_0x54e6('0x48')]=_0x7140e4[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x7140e4[_0x54e6('0x48')]:_0x12e632['model'];if(!_0x119af1[_0x54e6('0x44')][_0x54e6('0x4b')](_0x54e6('0x4c'))){_0x7140e4[_0x54e6('0x4d')]=qs[_0x54e6('0x4d')](_0x119af1['query'][_0x54e6('0x4d')]);_0x7140e4[_0x54e6('0x2e')]=qs[_0x54e6('0x2e')](_0x119af1[_0x54e6('0x44')][_0x54e6('0x2e')]);}_0x7140e4['order']=qs[_0x54e6('0x4e')](_0x119af1[_0x54e6('0x44')][_0x54e6('0x4e')]);_0x7140e4[_0x54e6('0x4f')]=qs['filters'](_['pick'](_0x119af1[_0x54e6('0x44')],_0x12e632[_0x54e6('0x46')]));_0x7140e4[_0x54e6('0x4f')][_0x54e6('0x62')]=_0x24ca18['id'];if(_0x119af1[_0x54e6('0x44')][_0x54e6('0x50')]){_0x7140e4[_0x54e6('0x4f')]=_['merge'](_0x7140e4[_0x54e6('0x4f')],{'$or':_[_0x54e6('0x52')](_0x7140e4[_0x54e6('0x48')],function(_0x2298da){var _0x3a5980={};_0x3a5980[_0x2298da]={'$like':'%'+_0x119af1[_0x54e6('0x44')][_0x54e6('0x50')]+'%'};return _0x3a5980;})});}if(_0x119af1[_0x54e6('0x44')][_0x54e6('0x99')]){var _0x16b092=_0x119af1['query'][_0x54e6('0x99')][_0x54e6('0x9a')](',');var _0x388e29={};_0x388e29[_0x16b092[0x0]]={'$gte':moment(_0x16b092[0x1])[_0x54e6('0x9b')](_0x54e6('0x9c'))};_0x7140e4['where']=_[_0x54e6('0x51')](_0x7140e4[_0x54e6('0x4f')],_0x388e29);}_0x7140e4=_['merge']({},_0x7140e4,_0x119af1['options']);return db['MailMessage']['count']({'where':_0x7140e4[_0x54e6('0x4f')]})[_0x54e6('0x20')](function(_0x19d472){_0x509c8c['count']=_0x19d472;if(_0x119af1[_0x54e6('0x44')][_0x54e6('0x55')]){_0x7140e4['include']=[{'all':!![]}];}return db[_0x54e6('0x98')][_0x54e6('0x57')](_0x7140e4);})[_0x54e6('0x20')](function(_0x2e8471){_0x509c8c['rows']=_0x2e8471;return _0x509c8c;});}})[_0x54e6('0x20')](respondWithFilteredResult(_0x476e46,_0x7140e4))[_0x54e6('0x5d')](handleError(_0x476e46,null));};exports[_0x54e6('0x3a')]=function(_0x33cf3b,_0x427f37,_0x4a4e96){var _0xbeedc8,_0x37326e={},_0x1fd69;if(_0x33cf3b[_0x54e6('0x5e')]['to']){_0x1fd69=_0x33cf3b[_0x54e6('0x5e')]['to']['split'](',')[0x0];}return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x33cf3b[_0x54e6('0x5a')]['id']},'include':[{'model':db['CmList'],'as':_0x54e6('0x9d'),'include':[{'model':db[_0x54e6('0x8a')],'as':_0x54e6('0x9e'),'where':{'email':_0x1fd69},'limit':0x1,'order':[[_0x54e6('0x9f'),_0x54e6('0xa0')]]}]},{'model':db[_0x54e6('0x3e')],'as':_0x54e6('0x3f'),'raw':!![]}]})[_0x54e6('0x20')](handleEntityNotFound(_0x427f37,null))[_0x54e6('0x20')](function(_0x3f11e5){if(_0x3f11e5){_0xbeedc8=_0x3f11e5;if(_0x3f11e5[_0x54e6('0x3f')]){if(_[_0x54e6('0x71')](_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0xa1')])){_0x33cf3b[_0x54e6('0x5e')]['from']=util[_0x54e6('0x9b')]('%s\x20<%s>',_0x3f11e5[_0x54e6('0x39')],_0x3f11e5[_0x54e6('0x6f')]||_0x3f11e5[_0x54e6('0x3f')][_0x54e6('0x73')]);}if(_0x33cf3b['body'][_0x54e6('0xa2')]&&_0x33cf3b['body'][_0x54e6('0xa2')]['length']){for(var _0x2e29c0=0x0;_0x2e29c0<_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0xa2')][_0x54e6('0x4a')];_0x2e29c0+=0x1){_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0xa2')][_0x2e29c0]={'filename':_0x33cf3b['body'][_0x54e6('0xa2')][_0x2e29c0][_0x54e6('0x39')],'path':path[_0x54e6('0xa3')](config[_0x54e6('0xa4')],'server/files/attachments',_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0xa2')][_0x2e29c0][_0x54e6('0xa5')])};}}var _0x5b9d49={'tls':{'rejectUnauthorized':![]}};if(_['isNil'](_0x3f11e5[_0x54e6('0x3f')][_0x54e6('0x7b')])){if(_0x3f11e5['Smtp'][_0x54e6('0x78')]){_0x5b9d49[_0x54e6('0xa6')]={'user':_0x3f11e5[_0x54e6('0x3f')]['user'],'pass':_0x3f11e5[_0x54e6('0x3f')][_0x54e6('0x76')]};}_0x5b9d49[_0x54e6('0x79')]=_0x3f11e5['Smtp'][_0x54e6('0x79')];_0x5b9d49[_0x54e6('0x7a')]=_0x3f11e5[_0x54e6('0x3f')][_0x54e6('0x7a')];_0x5b9d49[_0x54e6('0xa7')]=_0x3f11e5[_0x54e6('0x3f')][_0x54e6('0xa7')];}else{_0x5b9d49[_0x54e6('0x7b')]=_0x3f11e5[_0x54e6('0x3f')]['service'];_0x5b9d49[_0x54e6('0xa6')]={'user':_0x3f11e5['Smtp']['user'],'pass':_0x3f11e5[_0x54e6('0x3f')][_0x54e6('0x76')]};}return respondWithRpcPromise('SendMail','sendMail',{'account':_0x5b9d49,'message':_0x33cf3b[_0x54e6('0x5e')]});}else{throw new Error('List\x20not\x20found');}}})['then'](function(_0x183ade){if(_0x183ade){_0x37326e=_0x183ade;if(_0xbeedc8[_0x54e6('0x9d')]){if(_0xbeedc8[_0x54e6('0x9d')][_0x54e6('0x9e')]['length']){return _0xbeedc8[_0x54e6('0x9d')][_0x54e6('0x9e')][0x0];}else{return db[_0x54e6('0x8a')][_0x54e6('0x64')](_['defaults'](_0x33cf3b[_0x54e6('0x5e')],{'firstName':_0x33cf3b[_0x54e6('0x5e')]['to'],'email':_0x33cf3b['body']['to'],'phone':_0x33cf3b[_0x54e6('0x5e')]['to'],'ListId':_0xbeedc8[_0x54e6('0xa8')]}));}}else{throw new Error('List\x20not\x20found');}}})[_0x54e6('0x20')](function(_0x23810f){if(_0x23810f){var _0x6474bf={'UserId':_0x33cf3b[_0x54e6('0x73')]['id'],'ContactId':_0x23810f['id'],'MailAccountId':_0xbeedc8['id'],'inReplyTo':_0x37326e['messageId'],'to':_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0xa1')],'cc':_0x33cf3b[_0x54e6('0x5e')]['cc'],'subject':_0x33cf3b[_0x54e6('0x5e')]['subject'],'attach':_0x33cf3b['body']['attach'],'firstMsgDirection':_0x54e6('0xa9'),'lastMsgAt':moment()[_0x54e6('0x9b')](_0x54e6('0x9c')),'lastMsgDirection':_0x54e6('0xa9'),'lastMsgBody':_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0x5e')],'Messages':[_[_0x54e6('0x51')](_0x33cf3b[_0x54e6('0x5e')],{'messageId':_0x37326e[_0x54e6('0xaa')],'sentAt':moment()[_0x54e6('0x9b')](_0x54e6('0x9c')),'read':!![],'MailAccountId':_0xbeedc8['id'],'UserId':_0x33cf3b[_0x54e6('0x73')]['id'],'ContactId':_0x23810f['id']})]};if(_0x33cf3b['body']['Interaction']){_0x6474bf=_[_0x54e6('0x51')](_0x6474bf,_0x33cf3b[_0x54e6('0x5e')][_0x54e6('0xab')]);}return db[_0x54e6('0x89')][_0x54e6('0x64')](_0x6474bf,{'include':[{'model':db[_0x54e6('0x98')],'as':_0x54e6('0xac')}]});}})['then'](respondWithResult(_0x427f37,null))['catch'](handleError(_0x427f37,null));};exports['verifySmtp']=function(_0x8faf0f,_0x5375a8,_0x2878b5){return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x8faf0f[_0x54e6('0x5a')]['id']},'include':[{'model':db['MailServerOut'],'as':_0x54e6('0x3f'),'raw':!![]}]})[_0x54e6('0x20')](handleEntityNotFound(_0x5375a8,null))[_0x54e6('0x20')](function(_0x5ea506){if(_0x5ea506&&_0x5ea506[_0x54e6('0x3f')]){var _0x330552={'id':_0x5ea506['id'],'tls':{'rejectUnauthorized':![]}};if(_0x5ea506[_0x54e6('0x3f')][_0x54e6('0x7b')]){_0x330552[_0x54e6('0x7b')]=_0x5ea506[_0x54e6('0x3f')][_0x54e6('0x7b')];}else{_0x330552[_0x54e6('0x79')]=_0x5ea506[_0x54e6('0x3f')][_0x54e6('0x79')];_0x330552[_0x54e6('0x7a')]=_0x5ea506['Smtp']['port'];_0x330552[_0x54e6('0xa7')]=_0x5ea506[_0x54e6('0x3f')][_0x54e6('0xa7')];}if(_0x5ea506['Smtp'][_0x54e6('0x78')]){_0x330552['auth']={'user':_0x5ea506[_0x54e6('0x3f')][_0x54e6('0x73')],'pass':_0x5ea506['Smtp']['pass']};}return respondWithRpcPromise('VerifySmtp','verifySmtp',{'account':_0x330552});}})['then'](respondWithResult(_0x5375a8,null))['catch'](handleError(_0x5375a8,null));};exports['destroy']=function(_0x5631bf,_0x4be9d0){return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x5631bf['params']['id']}})['then'](handleEntityNotFound(_0x4be9d0,null))[_0x54e6('0x20')](function(_0x357e69){if(_0x357e69&&_0x357e69[_0x54e6('0x7b')]){throw new db['Sequelize'][(_0x54e6('0xad'))](_0x54e6('0xae'));}return _0x357e69;})[_0x54e6('0x20')](removeEntity(_0x4be9d0,null))['catch'](handleError(_0x4be9d0,null));};exports[_0x54e6('0xaf')]=function(_0x47248c,_0x5d99c2,_0x3f5650){return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x47248c[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x5d99c2,null))[_0x54e6('0x20')](function(_0x5291a4){if(_0x5291a4){return _0x5291a4['addAgents'](_0x47248c[_0x54e6('0x5e')][_0x54e6('0x6a')],_[_0x54e6('0x87')](_0x47248c[_0x54e6('0x5e')],['ids','id'])||{})[_0x54e6('0xb0')](function(_0x87ad08){for(var _0x569b36=0x0;_0x569b36<_0x47248c['body'][_0x54e6('0x6a')][_0x54e6('0x4a')];_0x569b36+=0x1){socket['emit'](_0x54e6('0xb1'),{'UserId':_0x47248c[_0x54e6('0x5e')][_0x54e6('0x6a')][_0x569b36],'MailAccountId':_0x47248c[_0x54e6('0x5a')]['id']});}return _0x87ad08;});}})['then'](respondWithResult(_0x5d99c2,null))[_0x54e6('0x5d')](handleError(_0x5d99c2,null));};exports[_0x54e6('0xb2')]=function(_0x53f66f,_0x1ee932,_0x1b2bdf){return db[_0x54e6('0x41')][_0x54e6('0x5c')]({'where':{'id':_0x53f66f[_0x54e6('0x5a')]['id']}})[_0x54e6('0x20')](handleEntityNotFound(_0x1ee932,null))[_0x54e6('0x20')](function(_0x946a03){if(_0x946a03){return _0x946a03[_0x54e6('0xb2')](_0x53f66f['query']['ids'])[_0x54e6('0x20')](function(){if(_['isArray'](_0x53f66f[_0x54e6('0x44')]['ids'])){for(var _0xa2fbbd=0x0;_0xa2fbbd<_0x53f66f[_0x54e6('0x44')][_0x54e6('0x6a')]['length'];_0xa2fbbd+=0x1){socket[_0x54e6('0xb3')]('userMailAccount:remove',{'UserId':Number(_0x53f66f['query'][_0x54e6('0x6a')][_0xa2fbbd]),'MailAccountId':Number(_0x53f66f[_0x54e6('0x5a')]['id'])});}}else{socket[_0x54e6('0xb3')](_0x54e6('0xb4'),{'UserId':Number(_0x53f66f[_0x54e6('0x44')]['ids']),'MailAccountId':Number(_0x53f66f[_0x54e6('0x5a')]['id'])});}});}})[_0x54e6('0x20')](respondWithStatusCode(_0x1ee932,null))[_0x54e6('0x5d')](handleError(_0x1ee932,null));};exports[_0x54e6('0xb5')]=function(_0x41d161,_0x14a55f,_0x49b7a1){var _0x5b566c={};var _0x18864a={};var _0x546e3f;var _0x151ac3;return db[_0x54e6('0x41')][_0x54e6('0x66')]({'where':{'id':_0x41d161[_0x54e6('0x5a')]['id']}})['then'](handleEntityNotFound(_0x14a55f,null))[_0x54e6('0x20')](function(_0x1a65d7){if(_0x1a65d7){_0x546e3f=_0x1a65d7;_0x18864a[_0x54e6('0x43')]=_[_0x54e6('0x45')](db['User']['rawAttributes']);_0x18864a[_0x54e6('0x44')]=_['keys'](_0x41d161[_0x54e6('0x44')]);_0x18864a[_0x54e6('0x46')]=_['intersection'](_0x18864a[_0x54e6('0x43')],_0x18864a[_0x54e6('0x44')]);_0x5b566c[_0x54e6('0x48')]=_[_0x54e6('0x47')](_0x18864a[_0x54e6('0x43')],qs[_0x54e6('0x49')](_0x41d161[_0x54e6('0x44')]['fields']));_0x5b566c[_0x54e6('0x48')]=_0x5b566c[_0x54e6('0x48')][_0x54e6('0x4a')]?_0x5b566c[_0x54e6('0x48')]:_0x18864a[_0x54e6('0x43')];_0x5b566c[_0x54e6('0x67')]=qs[_0x54e6('0x4e')](_0x41d161[_0x54e6('0x44')][_0x54e6('0x4e')]);_0x5b566c[_0x54e6('0x4f')]=qs['filters'](_[_0x54e6('0x68')](_0x41d161[_0x54e6('0x44')],_0x18864a['filters']));if(_0x41d161[_0x54e6('0x44')][_0x54e6('0x50')]){_0x5b566c[_0x54e6('0x4f')]=_[_0x54e6('0x51')](_0x5b566c['where'],{'$or':_[_0x54e6('0x52')](_0x5b566c[_0x54e6('0x48')],function(_0x290025){var _0x185e4a={};_0x185e4a[_0x290025]={'$like':'%'+_0x41d161[_0x54e6('0x44')][_0x54e6('0x50')]+'%'};return _0x185e4a;})});}_0x5b566c=_[_0x54e6('0x51')]({},_0x5b566c,_0x41d161[_0x54e6('0x5b')]);return _0x546e3f['getAgents'](_0x5b566c);}})[_0x54e6('0x20')](function(_0x532b14){if(_0x532b14){_0x151ac3=_0x532b14[_0x54e6('0x4a')];if(!_0x41d161[_0x54e6('0x44')]['hasOwnProperty']('nolimit')){_0x5b566c['limit']=qs[_0x54e6('0x4d')](_0x41d161[_0x54e6('0x44')][_0x54e6('0x4d')]);_0x5b566c[_0x54e6('0x2e')]=qs[_0x54e6('0x2e')](_0x41d161['query'][_0x54e6('0x2e')]);}return _0x546e3f[_0x54e6('0xb5')](_0x5b566c);}})[_0x54e6('0x20')](function(_0x1de349){if(_0x1de349){return _0x1de349?{'count':_0x151ac3,'rows':_0x1de349}:null;}})[_0x54e6('0x20')](respondWithResult(_0x14a55f,null))[_0x54e6('0x5d')](handleError(_0x14a55f,null));};
\ No newline at end of file
+var _0xdbfc=['addAnswer','getAnswers','CannedAnswer','rows','removeAnswers','ids','ListId','active','description','isNil','cservice','cauthentication','user','cuser','pass','authentication','host','port','service','password','cpassword','role','UserProfileSection','MailAccounts','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','setImap','getSmtp','addSmtp','removeSmtp','setSmtp','addInteraction','omit','getInteractions','MailInteraction','nolimit','CmContact','Contact','User','Owner','internal','color','tag','addApplications','sequelize','transaction','MailApplication','bulkCreate','findAndCountAll','priority','getApplications','getMessages','MailMessage','$gte','split','CmList','List','Contacts','updatedAt','DESC','from','format','attachments','root','server/files/attachments','basename','auth','secure','sendMail','List\x20not\x20found','subject','attach','out','messageId','YYYY-MM-DD\x20HH:mm:ss','Interaction','verifySmtp','VerifySmtp','Sequelize','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','emit','userMailAccount:save','removeAgents','isArray','userMailAccount:remove','getAgents','html-pdf','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../mysqldb','defaults','redis','localhost','register','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','status','end','json','count','offset','limit','set','apply','save','update','get','UserProfileResource','destroy','sendStatus','stack','name','send','index','MailServerIn','Imap','MailServerOut','Pause','mandatoryDispositionPause','MailAccount','rawAttributes','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','pick','where','map','key','field','filter','merge','options','includeAll','include','findAll','show','params','Smtp','find','body','describe','addDisposition','MailAccountId','create','getDispositions','findOne','Disposition','removeDispositions'];(function(_0x175947,_0x106269){var _0x162070=function(_0x25bc01){while(--_0x25bc01){_0x175947['push'](_0x175947['shift']());}};_0x162070(++_0x106269);}(_0xdbfc,0x11d));var _0xcdbf=function(_0x58178f,_0x3ff393){_0x58178f=_0x58178f-0x0;var _0x2e8a31=_0xdbfc[_0x58178f];return _0x2e8a31;};'use strict';var pdf=require(_0xcdbf('0x0'));var emlformat=require(_0xcdbf('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xcdbf('0x2'));var rp=require(_0xcdbf('0x3'));var moment=require(_0xcdbf('0x4'));var BPromise=require(_0xcdbf('0x5'));var Mustache=require(_0xcdbf('0x6'));var util=require(_0xcdbf('0x7'));var path=require(_0xcdbf('0x8'));var sox=require('sox');var csv=require(_0xcdbf('0x9'));var ejs=require(_0xcdbf('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xcdbf('0xb'));var crypto=require(_0xcdbf('0xc'));var jsforce=require(_0xcdbf('0xd'));var deskjs=require(_0xcdbf('0xe'));var toCsv=require('to-csv');var querystring=require(_0xcdbf('0xf'));var Papa=require(_0xcdbf('0x10'));var Redis=require(_0xcdbf('0x11'));var authService=require(_0xcdbf('0x12'));var qs=require(_0xcdbf('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xcdbf('0x14'))('api');var utils=require(_0xcdbf('0x15'));var config=require('../../config/environment');var db=require(_0xcdbf('0x16'))['db'];config['redis']=_[_0xcdbf('0x17')](config[_0xcdbf('0x18')],{'host':_0xcdbf('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xcdbf('0x18')]));require('./mailAccount.socket')[_0xcdbf('0x1a')](socket);var jayson=require(_0xcdbf('0x1b'));var client=jayson[_0xcdbf('0x1c')][_0xcdbf('0x1d')]({'port':0x232b});function checkPasswordPattern(_0x3e3881,_0x5ec307,_0x3eba78){if(_0x3eba78){var _0x403795=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x403795[_0xcdbf('0x1e')](_0x5ec307)){return _0x3e3881;}else{throw new Error(_0xcdbf('0x1f'));}}else{return _0x3e3881;}}function respondWithRpcPromise(_0x17334c,_0x2d78bc,_0x19b5bd,_0x263f54){return new BPromise(function(_0x2fd95b,_0x3b3630){var _0x133959=_0x263f54||client;return _0x133959['request'](_0x17334c,_0x19b5bd)[_0xcdbf('0x20')](function(_0x402166){logger[_0xcdbf('0x21')](_0xcdbf('0x22'),_0x2d78bc,_0xcdbf('0x23'));logger[_0xcdbf('0x24')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x2d78bc,_0xcdbf('0x23'),JSON[_0xcdbf('0x25')](_0x402166));if(_0x402166[_0xcdbf('0x26')]){if(_0x402166[_0xcdbf('0x26')][_0xcdbf('0x27')]===0x1f4){logger['error'](_0xcdbf('0x22'),_0x2d78bc,_0x402166[_0xcdbf('0x26')][_0xcdbf('0x28')]);return _0x3b3630(_0x402166[_0xcdbf('0x26')]['message']);}logger[_0xcdbf('0x26')]('MailAccount,\x20%s,\x20%s',_0x2d78bc,_0x402166['error'][_0xcdbf('0x28')]);return _0x2fd95b(_0x402166['error'][_0xcdbf('0x28')]);}else{logger[_0xcdbf('0x21')](_0xcdbf('0x22'),_0x2d78bc,_0xcdbf('0x23'));_0x2fd95b(_0x402166[_0xcdbf('0x29')]['message']);}})[_0xcdbf('0x2a')](function(_0x102f5c){logger[_0xcdbf('0x26')](_0xcdbf('0x22'),_0x2d78bc,_0x102f5c);_0x3b3630(_0x102f5c);});});}function respondWithStatusCode(_0x3b6da3,_0x3ef24b){_0x3ef24b=_0x3ef24b||0xcc;return function(_0x2e95bf){if(_0x2e95bf){return _0x3b6da3['sendStatus'](_0x3ef24b);}return _0x3b6da3[_0xcdbf('0x2b')](_0x3ef24b)[_0xcdbf('0x2c')]();};}function respondWithResult(_0xc9f8e5,_0x474af8){_0x474af8=_0x474af8||0xc8;return function(_0x15c884){if(_0x15c884){return _0xc9f8e5[_0xcdbf('0x2b')](_0x474af8)[_0xcdbf('0x2d')](_0x15c884);}};}function respondWithFilteredResult(_0x55088d,_0x30b753){return function(_0x2fa55a){if(_0x2fa55a){var _0x475118=_0x2fa55a[_0xcdbf('0x2e')],_0x3e1228=_0x30b753[_0xcdbf('0x2f')],_0x1f653d=_0x30b753[_0xcdbf('0x2f')]+_0x30b753[_0xcdbf('0x30')],_0x575be6;if(_0x1f653d>=_0x475118){_0x1f653d=_0x475118;_0x575be6=0xc8;}else{_0x575be6=0xce;}_0x55088d[_0xcdbf('0x2b')](_0x575be6);return _0x55088d[_0xcdbf('0x31')]('Content-Range',_0x3e1228+'-'+_0x1f653d+'/'+_0x475118)[_0xcdbf('0x2d')](_0x2fa55a);}return null;};}function patchUpdates(_0x1d02da){return function(_0x39e439){try{jsonpatch[_0xcdbf('0x32')](_0x39e439,_0x1d02da,!![]);}catch(_0x2e7ad5){return BPromise['reject'](_0x2e7ad5);}return _0x39e439[_0xcdbf('0x33')]();};}function saveUpdates(_0x272e27,_0xbfe717){return function(_0x3cb09f){if(_0x3cb09f){return _0x3cb09f[_0xcdbf('0x34')](_0x272e27)[_0xcdbf('0x20')](function(_0x2a37e2){return _0x2a37e2;});}return null;};}function removeEntity(_0x8fea82,_0x4a2ec){return function(_0x40bac1){if(_0x40bac1){return _0x40bac1['destroy']()['then'](function(){var _0x19babb=_0x40bac1[_0xcdbf('0x35')]({'plain':!![]});var _0xc6695='MailAccounts';return db[_0xcdbf('0x36')][_0xcdbf('0x37')]({'where':{'type':_0xc6695,'resourceId':_0x19babb['id']}})[_0xcdbf('0x20')](function(){return _0x40bac1;});})[_0xcdbf('0x20')](function(){_0x8fea82[_0xcdbf('0x2b')](0xcc)[_0xcdbf('0x2c')]();});}};}function handleEntityNotFound(_0x40cffe,_0x3650ac){return function(_0x5a0569){if(!_0x5a0569){_0x40cffe[_0xcdbf('0x38')](0x194);}return _0x5a0569;};}function handleError(_0x5987ed,_0x4122ea){_0x4122ea=_0x4122ea||0x1f4;return function(_0x4b7ed6){logger[_0xcdbf('0x26')](_0x4b7ed6[_0xcdbf('0x39')]);if(_0x4b7ed6[_0xcdbf('0x3a')]){delete _0x4b7ed6[_0xcdbf('0x3a')];}_0x5987ed[_0xcdbf('0x2b')](_0x4122ea)[_0xcdbf('0x3b')](_0x4b7ed6);};}exports[_0xcdbf('0x3c')]=function(_0x4378b7,_0x116453){var _0x115dd2={'include':[{'model':db[_0xcdbf('0x3d')],'as':_0xcdbf('0x3e')},{'model':db[_0xcdbf('0x3f')],'as':'Smtp'},{'model':db[_0xcdbf('0x40')],'as':_0xcdbf('0x41')}]},_0x5d56b1={},_0x907f4d={'count':0x0,'rows':[]};var _0x20583c=db[_0xcdbf('0x42')][_0xcdbf('0x43')];_0x5d56b1[_0xcdbf('0x44')]=_[_0xcdbf('0x45')](_0x20583c);_0x5d56b1[_0xcdbf('0x46')]=_['keys'](_0x4378b7[_0xcdbf('0x46')]);_0x5d56b1[_0xcdbf('0x47')]=_['intersection'](_0x5d56b1[_0xcdbf('0x44')],_0x5d56b1[_0xcdbf('0x46')]);_0x115dd2[_0xcdbf('0x48')]=_[_0xcdbf('0x49')](_0x5d56b1[_0xcdbf('0x44')],qs[_0xcdbf('0x4a')](_0x4378b7[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0x115dd2[_0xcdbf('0x48')]=_0x115dd2[_0xcdbf('0x48')][_0xcdbf('0x4b')]?_0x115dd2['attributes']:_0x5d56b1[_0xcdbf('0x44')];if(!_0x4378b7[_0xcdbf('0x46')][_0xcdbf('0x4c')]('nolimit')){_0x115dd2[_0xcdbf('0x30')]=qs[_0xcdbf('0x30')](_0x4378b7[_0xcdbf('0x46')][_0xcdbf('0x30')]);_0x115dd2[_0xcdbf('0x2f')]=qs[_0xcdbf('0x2f')](_0x4378b7['query'][_0xcdbf('0x2f')]);}_0x115dd2[_0xcdbf('0x4d')]=qs[_0xcdbf('0x4e')](_0x4378b7[_0xcdbf('0x46')]['sort']);_0x115dd2['where']=qs[_0xcdbf('0x47')](_[_0xcdbf('0x4f')](_0x4378b7[_0xcdbf('0x46')],_0x5d56b1[_0xcdbf('0x47')]));if(_0x4378b7[_0xcdbf('0x46')]['filter']){_0x115dd2[_0xcdbf('0x50')]=_['merge'](_0x115dd2[_0xcdbf('0x50')],{'$or':_[_0xcdbf('0x51')](_0x20583c,function(_0x1583d3){if(_0x1583d3['type'][_0xcdbf('0x52')]!=='VIRTUAL'){var _0x166ae6={};_0x166ae6[_0x1583d3[_0xcdbf('0x53')]]={'$like':'%'+_0x4378b7[_0xcdbf('0x46')][_0xcdbf('0x54')]+'%'};return _0x166ae6;}})});}_0x115dd2=_[_0xcdbf('0x55')]({},_0x115dd2,_0x4378b7[_0xcdbf('0x56')]);var _0x2d732e={'where':_0x115dd2[_0xcdbf('0x50')]};return db['MailAccount'][_0xcdbf('0x2e')](_0x2d732e)[_0xcdbf('0x20')](function(_0xe3583a){_0x907f4d[_0xcdbf('0x2e')]=_0xe3583a;if(_0x4378b7['query'][_0xcdbf('0x57')]){_0x115dd2[_0xcdbf('0x58')]=[{'all':!![]}];}return db[_0xcdbf('0x42')][_0xcdbf('0x59')](_0x115dd2);})[_0xcdbf('0x20')](function(_0x32be86){_0x907f4d['rows']=_0x32be86;return _0x907f4d;})['then'](respondWithFilteredResult(_0x116453,_0x115dd2))[_0xcdbf('0x2a')](handleError(_0x116453,null));};exports[_0xcdbf('0x5a')]=function(_0x3d6fff,_0x582efb){var _0x43fba8={'raw':![],'where':{'id':_0x3d6fff[_0xcdbf('0x5b')]['id']},'include':[{'model':db[_0xcdbf('0x3d')],'as':_0xcdbf('0x3e')},{'model':db['MailServerOut'],'as':_0xcdbf('0x5c')},{'model':db[_0xcdbf('0x40')],'as':'mandatoryDispositionPause'}]},_0x18328b={};_0x18328b[_0xcdbf('0x44')]=_[_0xcdbf('0x45')](db[_0xcdbf('0x42')][_0xcdbf('0x43')]);_0x18328b[_0xcdbf('0x46')]=_[_0xcdbf('0x45')](_0x3d6fff[_0xcdbf('0x46')]);_0x18328b[_0xcdbf('0x47')]=_[_0xcdbf('0x49')](_0x18328b['model'],_0x18328b['query']);_0x43fba8['attributes']=_[_0xcdbf('0x49')](_0x18328b['model'],qs[_0xcdbf('0x4a')](_0x3d6fff['query'][_0xcdbf('0x4a')]));_0x43fba8['attributes']=_0x43fba8['attributes'][_0xcdbf('0x4b')]?_0x43fba8['attributes']:_0x18328b[_0xcdbf('0x44')];if(_0x3d6fff[_0xcdbf('0x46')][_0xcdbf('0x57')]){_0x43fba8['include']=[{'all':!![]}];}_0x43fba8=_['merge']({},_0x43fba8,_0x3d6fff[_0xcdbf('0x56')]);return db[_0xcdbf('0x42')][_0xcdbf('0x5d')](_0x43fba8)[_0xcdbf('0x20')](handleEntityNotFound(_0x582efb,null))[_0xcdbf('0x20')](respondWithResult(_0x582efb,null))['catch'](handleError(_0x582efb,null));};exports[_0xcdbf('0x34')]=function(_0x7d3ec9,_0x287a1b){if(_0x7d3ec9[_0xcdbf('0x5e')]['id']){delete _0x7d3ec9[_0xcdbf('0x5e')]['id'];}return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x7d3ec9[_0xcdbf('0x5b')]['id']},'include':[{'model':db[_0xcdbf('0x3d')],'as':_0xcdbf('0x3e')},{'model':db[_0xcdbf('0x3f')],'as':'Smtp'},{'model':db[_0xcdbf('0x40')],'as':_0xcdbf('0x41')}]})[_0xcdbf('0x20')](handleEntityNotFound(_0x287a1b,null))['then'](saveUpdates(_0x7d3ec9[_0xcdbf('0x5e')],null))[_0xcdbf('0x20')](function(_0x486a39){if(_0x486a39&&_0x7d3ec9[_0xcdbf('0x5e')][_0xcdbf('0x3e')]){return db[_0xcdbf('0x3d')][_0xcdbf('0x34')](_0x7d3ec9[_0xcdbf('0x5e')][_0xcdbf('0x3e')],{'where':{'MailAccountId':_0x486a39['id']}})[_0xcdbf('0x20')](function(){return _0x486a39;});}return _0x486a39;})[_0xcdbf('0x20')](function(_0x422476){if(_0x422476&&_0x7d3ec9[_0xcdbf('0x5e')][_0xcdbf('0x5c')]){return db[_0xcdbf('0x3f')][_0xcdbf('0x34')](_0x7d3ec9[_0xcdbf('0x5e')][_0xcdbf('0x5c')],{'where':{'MailAccountId':_0x422476['id']}})[_0xcdbf('0x20')](function(){return _0x422476;});}return _0x422476;})[_0xcdbf('0x20')](respondWithResult(_0x287a1b,null))[_0xcdbf('0x2a')](handleError(_0x287a1b,null));};exports[_0xcdbf('0x5f')]=function(_0x53cc42,_0x105093){return db[_0xcdbf('0x42')][_0xcdbf('0x5f')]()[_0xcdbf('0x20')](respondWithResult(_0x105093,null))[_0xcdbf('0x2a')](handleError(_0x105093,null));};exports[_0xcdbf('0x60')]=function(_0x552f6e,_0x24a779,_0x106f4a){if(_0x552f6e[_0xcdbf('0x5e')]['id']){delete _0x552f6e[_0xcdbf('0x5e')]['id'];}return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x552f6e[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x24a779,null))['then'](function(_0x4d3e3c){if(_0x4d3e3c){_0x552f6e[_0xcdbf('0x5e')][_0xcdbf('0x61')]=_0x4d3e3c['id'];return db['Disposition'][_0xcdbf('0x62')](_0x552f6e[_0xcdbf('0x5e')]);}})[_0xcdbf('0x20')](respondWithResult(_0x24a779,null))['catch'](handleError(_0x24a779,null));};exports[_0xcdbf('0x63')]=function(_0xb56fd4,_0x1fa963,_0x6c9b10){var _0x5d925d={'raw':![],'where':{}};var _0xb7b58b={};var _0x1b6857={'count':0x0,'rows':[]};return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0xb56fd4[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x1fa963,null))[_0xcdbf('0x20')](function(_0x3c87dc){if(_0x3c87dc){_0xb7b58b['model']=_[_0xcdbf('0x45')](db[_0xcdbf('0x65')][_0xcdbf('0x43')]);_0xb7b58b['query']=_[_0xcdbf('0x45')](_0xb56fd4[_0xcdbf('0x46')]);_0xb7b58b[_0xcdbf('0x47')]=_[_0xcdbf('0x49')](_0xb7b58b[_0xcdbf('0x44')],_0xb7b58b[_0xcdbf('0x46')]);_0x5d925d[_0xcdbf('0x48')]=_[_0xcdbf('0x49')](_0xb7b58b[_0xcdbf('0x44')],qs[_0xcdbf('0x4a')](_0xb56fd4[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0x5d925d[_0xcdbf('0x48')]=_0x5d925d[_0xcdbf('0x48')][_0xcdbf('0x4b')]?_0x5d925d[_0xcdbf('0x48')]:_0xb7b58b[_0xcdbf('0x44')];if(!_0xb56fd4[_0xcdbf('0x46')]['hasOwnProperty']('nolimit')){_0x5d925d[_0xcdbf('0x30')]=qs['limit'](_0xb56fd4['query']['limit']);_0x5d925d[_0xcdbf('0x2f')]=qs['offset'](_0xb56fd4['query'][_0xcdbf('0x2f')]);}_0x5d925d[_0xcdbf('0x4d')]=qs['sort'](_0xb56fd4[_0xcdbf('0x46')][_0xcdbf('0x4e')]);_0x5d925d[_0xcdbf('0x50')]=qs[_0xcdbf('0x47')](_[_0xcdbf('0x4f')](_0xb56fd4[_0xcdbf('0x46')],_0xb7b58b['filters']));_0x5d925d[_0xcdbf('0x50')][_0xcdbf('0x61')]=_0x3c87dc['id'];if(_0xb56fd4[_0xcdbf('0x46')][_0xcdbf('0x54')]){_0x5d925d[_0xcdbf('0x50')]=_['merge'](_0x5d925d[_0xcdbf('0x50')],{'$or':_[_0xcdbf('0x51')](_0x5d925d['attributes'],function(_0x41225f){var _0x25ca39={};_0x25ca39[_0x41225f]={'$like':'%'+_0xb56fd4['query'][_0xcdbf('0x54')]+'%'};return _0x25ca39;})});}_0x5d925d=_[_0xcdbf('0x55')]({},_0x5d925d,_0xb56fd4[_0xcdbf('0x56')]);return db[_0xcdbf('0x65')][_0xcdbf('0x2e')]({'where':_0x5d925d[_0xcdbf('0x50')]})[_0xcdbf('0x20')](function(_0x473200){_0x1b6857[_0xcdbf('0x2e')]=_0x473200;if(_0xb56fd4['query']['includeAll']){_0x5d925d['include']=[{'all':!![]}];}return db[_0xcdbf('0x65')][_0xcdbf('0x59')](_0x5d925d);})[_0xcdbf('0x20')](function(_0x4a6740){_0x1b6857['rows']=_0x4a6740;return _0x1b6857;});}})[_0xcdbf('0x20')](respondWithFilteredResult(_0x1fa963,_0x5d925d))[_0xcdbf('0x2a')](handleError(_0x1fa963,null));};exports['removeDispositions']=function(_0x23078a,_0x4f5eef,_0x1b88b4){return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x23078a['params']['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x4f5eef,null))[_0xcdbf('0x20')](function(_0x5a5e37){if(_0x5a5e37){return _0x5a5e37[_0xcdbf('0x66')](_0x23078a[_0xcdbf('0x46')]['ids']);}})[_0xcdbf('0x20')](respondWithStatusCode(_0x4f5eef,null))[_0xcdbf('0x2a')](handleError(_0x4f5eef,null));};exports[_0xcdbf('0x67')]=function(_0x5aa2a3,_0x268503,_0x4cee3c){if(_0x5aa2a3['body']['id']){delete _0x5aa2a3[_0xcdbf('0x5e')]['id'];}return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x5aa2a3[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x268503,null))[_0xcdbf('0x20')](function(_0x507f88){if(_0x507f88){_0x5aa2a3['body']['MailAccountId']=_0x507f88['id'];return db['CannedAnswer'][_0xcdbf('0x62')](_0x5aa2a3['body']);}})[_0xcdbf('0x20')](respondWithResult(_0x268503,null))[_0xcdbf('0x2a')](handleError(_0x268503,null));};exports[_0xcdbf('0x68')]=function(_0x314ec1,_0x291c29,_0x3893e2){var _0x281ee6={'raw':![],'where':{}};var _0x5f115b={};var _0x5340a5={'count':0x0,'rows':[]};return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0x314ec1[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x291c29,null))['then'](function(_0x386add){if(_0x386add){_0x5f115b[_0xcdbf('0x44')]=_[_0xcdbf('0x45')](db[_0xcdbf('0x69')][_0xcdbf('0x43')]);_0x5f115b[_0xcdbf('0x46')]=_[_0xcdbf('0x45')](_0x314ec1[_0xcdbf('0x46')]);_0x5f115b[_0xcdbf('0x47')]=_[_0xcdbf('0x49')](_0x5f115b[_0xcdbf('0x44')],_0x5f115b[_0xcdbf('0x46')]);_0x281ee6['attributes']=_[_0xcdbf('0x49')](_0x5f115b[_0xcdbf('0x44')],qs[_0xcdbf('0x4a')](_0x314ec1[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0x281ee6[_0xcdbf('0x48')]=_0x281ee6[_0xcdbf('0x48')][_0xcdbf('0x4b')]?_0x281ee6[_0xcdbf('0x48')]:_0x5f115b[_0xcdbf('0x44')];if(!_0x314ec1['query'][_0xcdbf('0x4c')]('nolimit')){_0x281ee6[_0xcdbf('0x30')]=qs[_0xcdbf('0x30')](_0x314ec1[_0xcdbf('0x46')][_0xcdbf('0x30')]);_0x281ee6[_0xcdbf('0x2f')]=qs[_0xcdbf('0x2f')](_0x314ec1[_0xcdbf('0x46')][_0xcdbf('0x2f')]);}_0x281ee6[_0xcdbf('0x4d')]=qs[_0xcdbf('0x4e')](_0x314ec1['query'][_0xcdbf('0x4e')]);_0x281ee6[_0xcdbf('0x50')]=qs[_0xcdbf('0x47')](_[_0xcdbf('0x4f')](_0x314ec1[_0xcdbf('0x46')],_0x5f115b[_0xcdbf('0x47')]));_0x281ee6[_0xcdbf('0x50')][_0xcdbf('0x61')]=_0x386add['id'];if(_0x314ec1['query'][_0xcdbf('0x54')]){_0x281ee6[_0xcdbf('0x50')]=_[_0xcdbf('0x55')](_0x281ee6['where'],{'$or':_[_0xcdbf('0x51')](_0x281ee6[_0xcdbf('0x48')],function(_0x319715){var _0x216733={};_0x216733[_0x319715]={'$like':'%'+_0x314ec1[_0xcdbf('0x46')][_0xcdbf('0x54')]+'%'};return _0x216733;})});}_0x281ee6=_[_0xcdbf('0x55')]({},_0x281ee6,_0x314ec1[_0xcdbf('0x56')]);return db[_0xcdbf('0x69')][_0xcdbf('0x2e')]({'where':_0x281ee6[_0xcdbf('0x50')]})[_0xcdbf('0x20')](function(_0x4fe766){_0x5340a5[_0xcdbf('0x2e')]=_0x4fe766;if(_0x314ec1[_0xcdbf('0x46')]['includeAll']){_0x281ee6[_0xcdbf('0x58')]=[{'all':!![]}];}return db['CannedAnswer'][_0xcdbf('0x59')](_0x281ee6);})[_0xcdbf('0x20')](function(_0x394469){_0x5340a5[_0xcdbf('0x6a')]=_0x394469;return _0x5340a5;});}})[_0xcdbf('0x20')](respondWithFilteredResult(_0x291c29,_0x281ee6))[_0xcdbf('0x2a')](handleError(_0x291c29,null));};exports[_0xcdbf('0x6b')]=function(_0x408caa,_0x252592,_0x3fa137){return db['MailAccount'][_0xcdbf('0x5d')]({'where':{'id':_0x408caa[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x252592,null))[_0xcdbf('0x20')](function(_0x20e17c){if(_0x20e17c){return _0x20e17c[_0xcdbf('0x6b')](_0x408caa[_0xcdbf('0x46')][_0xcdbf('0x6c')]);}})[_0xcdbf('0x20')](respondWithStatusCode(_0x252592,null))[_0xcdbf('0x2a')](handleError(_0x252592,null));};exports[_0xcdbf('0x62')]=function(_0x17e143,_0x31176e){var _0x1c3d92={'name':_0x17e143['body']['name'],'key':_0x17e143[_0xcdbf('0x5e')]['key'],'email':_0x17e143[_0xcdbf('0x5e')]['email'],'ListId':_0x17e143['body'][_0xcdbf('0x6d')],'active':!_['isNil'](_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x6e')])?_0x17e143[_0xcdbf('0x5e')]['active']:!![],'description':_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x6f')]||null,'Imap':{},'Smtp':{}};if(_[_0xcdbf('0x70')](_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x71')])){if(_0x17e143['body'][_0xcdbf('0x72')]){_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x73')]=_0x1c3d92[_0xcdbf('0x5c')][_0xcdbf('0x73')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x74')];_0x1c3d92[_0xcdbf('0x3e')]['password']=_0x1c3d92[_0xcdbf('0x5c')][_0xcdbf('0x75')]=_0x17e143[_0xcdbf('0x5e')]['cpassword'];}else{_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x76')]=_0x1c3d92['Smtp'][_0xcdbf('0x76')]=![];}_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x77')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x3e')][_0xcdbf('0x77')];_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x78')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x3e')][_0xcdbf('0x78')];_0x1c3d92['Smtp'][_0xcdbf('0x77')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x5c')][_0xcdbf('0x77')];_0x1c3d92[_0xcdbf('0x5c')][_0xcdbf('0x78')]=_0x17e143[_0xcdbf('0x5e')]['Smtp'][_0xcdbf('0x78')];}else{_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x79')]=_0x1c3d92['Smtp'][_0xcdbf('0x79')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x71')];_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x73')]=_0x1c3d92[_0xcdbf('0x5c')][_0xcdbf('0x73')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x74')];_0x1c3d92[_0xcdbf('0x3e')][_0xcdbf('0x7a')]=_0x1c3d92[_0xcdbf('0x5c')][_0xcdbf('0x75')]=_0x17e143[_0xcdbf('0x5e')][_0xcdbf('0x7b')];}return db['MailAccount'][_0xcdbf('0x62')](_0x1c3d92,{'include':[{'model':db['MailServerOut'],'as':_0xcdbf('0x5c')},{'model':db[_0xcdbf('0x3d')],'as':_0xcdbf('0x3e')}]})[_0xcdbf('0x20')](function(_0x248541){var _0x5c783f=_0x17e143['user'][_0xcdbf('0x35')]({'plain':!![]});if(!_0x5c783f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5c783f[_0xcdbf('0x7c')]===_0xcdbf('0x73')){var _0x2dcf96=_0x248541[_0xcdbf('0x35')]({'plain':!![]});return db[_0xcdbf('0x7d')]['find']({'where':{'name':_0xcdbf('0x7e'),'userProfileId':_0x5c783f[_0xcdbf('0x7f')]},'raw':!![]})[_0xcdbf('0x20')](function(_0x4fddf0){if(_0x4fddf0&&_0x4fddf0[_0xcdbf('0x80')]===0x0){return db['UserProfileResource'][_0xcdbf('0x62')]({'name':_0x2dcf96[_0xcdbf('0x3a')],'resourceId':_0x2dcf96['id'],'type':_0x4fddf0[_0xcdbf('0x3a')],'sectionId':_0x4fddf0['id']},{})[_0xcdbf('0x20')](function(){return _0x248541;});}else{return _0x248541;}})[_0xcdbf('0x2a')](function(_0x495f15){logger[_0xcdbf('0x26')](_0xcdbf('0x81'),_0x495f15);throw _0x495f15;});}return _0x248541;})[_0xcdbf('0x20')](respondWithResult(_0x31176e,0xc9))[_0xcdbf('0x2a')](handleError(_0x31176e,null));};exports['getImap']=function(_0x48562c,_0x50baae,_0x377f05){return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0x48562c[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x50baae,null))[_0xcdbf('0x20')](function(_0x28c773){if(_0x28c773){return _0x28c773[_0xcdbf('0x82')]();}return null;})[_0xcdbf('0x20')](respondWithResult(_0x50baae,null))['catch'](handleError(_0x50baae,null));};exports['addImap']=function(_0x636ea0,_0x1da9a0,_0x81b949){if(_0x636ea0[_0xcdbf('0x5e')]['id']){delete _0x636ea0[_0xcdbf('0x5e')]['id'];}return db['MailAccount'][_0xcdbf('0x5d')]({'where':{'id':_0x636ea0[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x1da9a0,null))['then'](function(_0x55fffa){if(_0x55fffa){_0x636ea0[_0xcdbf('0x5e')][_0xcdbf('0x61')]=_0x55fffa['id'];return db[_0xcdbf('0x3d')]['create'](_0x636ea0['body']);}})[_0xcdbf('0x20')](respondWithResult(_0x1da9a0,null))[_0xcdbf('0x2a')](handleError(_0x1da9a0,null));};exports['removeImap']=function(_0xa13047,_0x20bdd5,_0x458c9c){return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0xa13047['params']['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x20bdd5,null))[_0xcdbf('0x20')](function(_0x3b9bf5){if(_0x3b9bf5){return _0x3b9bf5[_0xcdbf('0x83')](null);}return null;})[_0xcdbf('0x20')](respondWithStatusCode(_0x20bdd5,null))[_0xcdbf('0x2a')](handleError(_0x20bdd5,null));};exports[_0xcdbf('0x84')]=function(_0x421bca,_0x575ace,_0xfd291d){return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0x421bca[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x575ace,null))[_0xcdbf('0x20')](function(_0x423b9c){if(_0x423b9c){return _0x423b9c[_0xcdbf('0x84')]();}return null;})['then'](respondWithResult(_0x575ace,null))[_0xcdbf('0x2a')](handleError(_0x575ace,null));};exports[_0xcdbf('0x85')]=function(_0x10ce38,_0x3649ad,_0x53c907){if(_0x10ce38['body']['id']){delete _0x10ce38[_0xcdbf('0x5e')]['id'];}return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x10ce38[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x3649ad,null))['then'](function(_0x539bee){if(_0x539bee){_0x10ce38[_0xcdbf('0x5e')][_0xcdbf('0x61')]=_0x539bee['id'];return db[_0xcdbf('0x3f')][_0xcdbf('0x62')](_0x10ce38[_0xcdbf('0x5e')]);}})[_0xcdbf('0x20')](respondWithResult(_0x3649ad,null))[_0xcdbf('0x2a')](handleError(_0x3649ad,null));};exports[_0xcdbf('0x86')]=function(_0x1fab0d,_0x3dd5b9,_0x48dd90){return db['MailAccount'][_0xcdbf('0x64')]({'where':{'id':_0x1fab0d[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x3dd5b9,null))[_0xcdbf('0x20')](function(_0x584cd4){if(_0x584cd4){return _0x584cd4[_0xcdbf('0x87')](null);}return null;})[_0xcdbf('0x20')](respondWithStatusCode(_0x3dd5b9,null))['catch'](handleError(_0x3dd5b9,null));};exports[_0xcdbf('0x88')]=function(_0x4d65f9,_0x2ed791,_0x2e8b15){return db['MailInteraction'][_0xcdbf('0x5d')]({'where':{'id':_0x4d65f9['params']['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x2ed791,null))[_0xcdbf('0x20')](function(_0x14c506){if(_0x14c506){return _0x14c506['addInteraction'](_0x4d65f9[_0xcdbf('0x5e')][_0xcdbf('0x6c')],_[_0xcdbf('0x89')](_0x4d65f9['body'],[_0xcdbf('0x6c'),'id'])||{});}})[_0xcdbf('0x20')](respondWithResult(_0x2ed791,null))[_0xcdbf('0x2a')](handleError(_0x2ed791,null));};exports[_0xcdbf('0x8a')]=function(_0x4e1cd0,_0x28d1cc,_0x59ceac){var _0x28cbad={'raw':![],'where':{}};var _0x3e3743={};var _0x2c8ac9={'count':0x0,'rows':[]};return db['MailAccount'][_0xcdbf('0x64')]({'where':{'id':_0x4e1cd0['params']['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x28d1cc,null))[_0xcdbf('0x20')](function(_0x8bf4f9){if(_0x8bf4f9){_0x3e3743[_0xcdbf('0x44')]=_[_0xcdbf('0x45')](db[_0xcdbf('0x8b')]['rawAttributes']);_0x3e3743[_0xcdbf('0x46')]=_[_0xcdbf('0x45')](_0x4e1cd0[_0xcdbf('0x46')]);_0x3e3743[_0xcdbf('0x47')]=_['intersection'](_0x3e3743[_0xcdbf('0x44')],_0x3e3743[_0xcdbf('0x46')]);_0x28cbad[_0xcdbf('0x48')]=_[_0xcdbf('0x49')](_0x3e3743[_0xcdbf('0x44')],qs[_0xcdbf('0x4a')](_0x4e1cd0[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0x28cbad[_0xcdbf('0x48')]=_0x28cbad[_0xcdbf('0x48')]['length']?_0x28cbad[_0xcdbf('0x48')]:_0x3e3743['model'];if(!_0x4e1cd0[_0xcdbf('0x46')][_0xcdbf('0x4c')](_0xcdbf('0x8c'))){_0x28cbad[_0xcdbf('0x30')]=qs[_0xcdbf('0x30')](_0x4e1cd0['query'][_0xcdbf('0x30')]);_0x28cbad[_0xcdbf('0x2f')]=qs['offset'](_0x4e1cd0['query'][_0xcdbf('0x2f')]);}_0x28cbad[_0xcdbf('0x4d')]=qs[_0xcdbf('0x4e')](_0x4e1cd0['query'][_0xcdbf('0x4e')]);_0x28cbad[_0xcdbf('0x50')]=qs[_0xcdbf('0x47')](_['pick'](_0x4e1cd0[_0xcdbf('0x46')],_0x3e3743[_0xcdbf('0x47')]));_0x28cbad['where'][_0xcdbf('0x61')]=_0x8bf4f9['id'];if(_0x4e1cd0['query'][_0xcdbf('0x54')]){_0x28cbad['where']=_[_0xcdbf('0x55')](_0x28cbad[_0xcdbf('0x50')],{'$or':_['map'](_0x28cbad[_0xcdbf('0x48')],function(_0x5cf117){var _0x1b3523={};_0x1b3523[_0x5cf117]={'$like':'%'+_0x4e1cd0[_0xcdbf('0x46')][_0xcdbf('0x54')]+'%'};return _0x1b3523;})});}_0x28cbad=_[_0xcdbf('0x55')]({},_0x28cbad,_0x4e1cd0['options']);return db['MailInteraction']['count']({'where':_0x28cbad[_0xcdbf('0x50')]})[_0xcdbf('0x20')](function(_0x35b688){_0x2c8ac9[_0xcdbf('0x2e')]=_0x35b688;if(_0x4e1cd0[_0xcdbf('0x46')][_0xcdbf('0x57')]){_0x28cbad['include']=[{'model':db[_0xcdbf('0x8d')],'as':_0xcdbf('0x8e'),'required':![]},{'model':db[_0xcdbf('0x8f')],'as':_0xcdbf('0x90'),'attributes':['name','fullname',_0xcdbf('0x91')],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id','name',_0xcdbf('0x92')],'where':_0x4e1cd0[_0xcdbf('0x46')][_0xcdbf('0x93')]?{'id':_0x4e1cd0[_0xcdbf('0x46')][_0xcdbf('0x93')]}:undefined,'required':_0x4e1cd0[_0xcdbf('0x46')]['tag']?!![]:![]}];}return db[_0xcdbf('0x8b')][_0xcdbf('0x59')](_0x28cbad);})[_0xcdbf('0x20')](function(_0x39fcab){_0x2c8ac9['rows']=_0x39fcab;return _0x2c8ac9;});}})['then'](respondWithFilteredResult(_0x28d1cc,_0x28cbad))['catch'](handleError(_0x28d1cc,null));};exports[_0xcdbf('0x94')]=function(_0x491816,_0x47d40c,_0x172cbe){return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0x491816[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x47d40c,null))[_0xcdbf('0x20')](function(_0x17cf79){if(_0x17cf79){return db[_0xcdbf('0x95')][_0xcdbf('0x96')](function(_0x2c3493){return db[_0xcdbf('0x97')][_0xcdbf('0x37')]({'where':{'MailAccountId':_0x491816['params']['id']},'transaction':_0x2c3493})[_0xcdbf('0x20')](function(_0x52cbd7){var _0x2cbf3d=_['map'](_0x491816[_0xcdbf('0x5e')],function(_0x3220e4){_0x3220e4[_0xcdbf('0x61')]=_0x491816[_0xcdbf('0x5b')]['id'];return _0x3220e4;});return db[_0xcdbf('0x97')][_0xcdbf('0x98')](_0x2cbf3d,{'transaction':_0x2c3493});});})[_0xcdbf('0x20')](function(){return db[_0xcdbf('0x97')][_0xcdbf('0x99')]({'where':{'MailAccountId':_0x491816[_0xcdbf('0x5b')]['id']},'order':_0xcdbf('0x9a')});});}})[_0xcdbf('0x20')](respondWithResult(_0x47d40c,null))[_0xcdbf('0x2a')](handleError(_0x47d40c,null));};exports[_0xcdbf('0x9b')]=function(_0x122781,_0x1571c5,_0x49de44){var _0xf1341e={};var _0x7513d6={};var _0x5cbb10;var _0x276ba7;return db[_0xcdbf('0x42')]['findOne']({'where':{'id':_0x122781[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x1571c5,null))[_0xcdbf('0x20')](function(_0x205a18){if(_0x205a18){_0x5cbb10=_0x205a18;_0x7513d6[_0xcdbf('0x44')]=_[_0xcdbf('0x45')](db['MailApplication']['rawAttributes']);_0x7513d6['query']=_['keys'](_0x122781[_0xcdbf('0x46')]);_0x7513d6['filters']=_[_0xcdbf('0x49')](_0x7513d6[_0xcdbf('0x44')],_0x7513d6['query']);_0xf1341e[_0xcdbf('0x48')]=_['intersection'](_0x7513d6[_0xcdbf('0x44')],qs['fields'](_0x122781[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0xf1341e['attributes']=_0xf1341e[_0xcdbf('0x48')][_0xcdbf('0x4b')]?_0xf1341e[_0xcdbf('0x48')]:_0x7513d6['model'];_0xf1341e['order']=qs['sort'](_0x122781[_0xcdbf('0x46')][_0xcdbf('0x4e')]);_0xf1341e['where']=qs[_0xcdbf('0x47')](_[_0xcdbf('0x4f')](_0x122781[_0xcdbf('0x46')],_0x7513d6[_0xcdbf('0x47')]));if(_0x122781['query']['filter']){_0xf1341e[_0xcdbf('0x50')]=_[_0xcdbf('0x55')](_0xf1341e[_0xcdbf('0x50')],{'$or':_[_0xcdbf('0x51')](_0xf1341e['attributes'],function(_0xfd2f87){var _0x4c2601={};_0x4c2601[_0xfd2f87]={'$like':'%'+_0x122781['query'][_0xcdbf('0x54')]+'%'};return _0x4c2601;})});}_0xf1341e=_['merge']({},_0xf1341e,_0x122781['options']);return _0x5cbb10['getApplications'](_0xf1341e);}})[_0xcdbf('0x20')](function(_0x27c4b8){if(_0x27c4b8){_0x276ba7=_0x27c4b8['length'];if(!_0x122781['query'][_0xcdbf('0x4c')](_0xcdbf('0x8c'))){_0xf1341e[_0xcdbf('0x30')]=qs[_0xcdbf('0x30')](_0x122781[_0xcdbf('0x46')][_0xcdbf('0x30')]);_0xf1341e[_0xcdbf('0x2f')]=qs[_0xcdbf('0x2f')](_0x122781[_0xcdbf('0x46')][_0xcdbf('0x2f')]);}return _0x5cbb10[_0xcdbf('0x9b')](_0xf1341e);}})[_0xcdbf('0x20')](function(_0x100324){if(_0x100324){return _0x100324?{'count':_0x276ba7,'rows':_0x100324}:null;}})[_0xcdbf('0x20')](respondWithResult(_0x1571c5,null))[_0xcdbf('0x2a')](handleError(_0x1571c5,null));};exports[_0xcdbf('0x9c')]=function(_0x5c5c91,_0x3b2043,_0x5af9f3){var _0x2f75b2={'raw':!![],'where':{}};var _0xb8f274={};var _0x2f03bb={'count':0x0,'rows':[]};return db['MailAccount'][_0xcdbf('0x64')]({'where':{'id':_0x5c5c91[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x3b2043,null))['then'](function(_0xfef452){if(_0xfef452){_0xb8f274[_0xcdbf('0x44')]=_['keys'](db[_0xcdbf('0x9d')][_0xcdbf('0x43')]);_0xb8f274[_0xcdbf('0x46')]=_['keys'](_0x5c5c91['query']);_0xb8f274['filters']=_[_0xcdbf('0x49')](_0xb8f274[_0xcdbf('0x44')],_0xb8f274[_0xcdbf('0x46')]);_0x2f75b2[_0xcdbf('0x48')]=_[_0xcdbf('0x49')](_0xb8f274[_0xcdbf('0x44')],qs[_0xcdbf('0x4a')](_0x5c5c91[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0x2f75b2[_0xcdbf('0x48')]=_0x2f75b2['attributes'][_0xcdbf('0x4b')]?_0x2f75b2[_0xcdbf('0x48')]:_0xb8f274[_0xcdbf('0x44')];if(!_0x5c5c91['query'][_0xcdbf('0x4c')](_0xcdbf('0x8c'))){_0x2f75b2[_0xcdbf('0x30')]=qs['limit'](_0x5c5c91[_0xcdbf('0x46')][_0xcdbf('0x30')]);_0x2f75b2[_0xcdbf('0x2f')]=qs[_0xcdbf('0x2f')](_0x5c5c91[_0xcdbf('0x46')][_0xcdbf('0x2f')]);}_0x2f75b2[_0xcdbf('0x4d')]=qs[_0xcdbf('0x4e')](_0x5c5c91[_0xcdbf('0x46')]['sort']);_0x2f75b2[_0xcdbf('0x50')]=qs[_0xcdbf('0x47')](_[_0xcdbf('0x4f')](_0x5c5c91['query'],_0xb8f274[_0xcdbf('0x47')]));_0x2f75b2[_0xcdbf('0x50')]['MailAccountId']=_0xfef452['id'];if(_0x5c5c91[_0xcdbf('0x46')]['filter']){_0x2f75b2[_0xcdbf('0x50')]=_[_0xcdbf('0x55')](_0x2f75b2[_0xcdbf('0x50')],{'$or':_[_0xcdbf('0x51')](_0x2f75b2[_0xcdbf('0x48')],function(_0x2a9ab5){var _0x32d1d0={};_0x32d1d0[_0x2a9ab5]={'$like':'%'+_0x5c5c91[_0xcdbf('0x46')][_0xcdbf('0x54')]+'%'};return _0x32d1d0;})});}if(_0x5c5c91['query'][_0xcdbf('0x9e')]){var _0x30dd34=_0x5c5c91[_0xcdbf('0x46')][_0xcdbf('0x9e')][_0xcdbf('0x9f')](',');var _0x5e5761={};_0x5e5761[_0x30dd34[0x0]]={'$gte':moment(_0x30dd34[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x2f75b2[_0xcdbf('0x50')]=_['merge'](_0x2f75b2[_0xcdbf('0x50')],_0x5e5761);}_0x2f75b2=_['merge']({},_0x2f75b2,_0x5c5c91['options']);return db['MailMessage']['count']({'where':_0x2f75b2[_0xcdbf('0x50')]})[_0xcdbf('0x20')](function(_0x15d268){_0x2f03bb[_0xcdbf('0x2e')]=_0x15d268;if(_0x5c5c91[_0xcdbf('0x46')][_0xcdbf('0x57')]){_0x2f75b2['include']=[{'all':!![]}];}return db[_0xcdbf('0x9d')][_0xcdbf('0x59')](_0x2f75b2);})[_0xcdbf('0x20')](function(_0x136767){_0x2f03bb[_0xcdbf('0x6a')]=_0x136767;return _0x2f03bb;});}})[_0xcdbf('0x20')](respondWithFilteredResult(_0x3b2043,_0x2f75b2))['catch'](handleError(_0x3b2043,null));};exports['send']=function(_0x1de03f,_0x57a30d,_0x15faa8){var _0x5276b1,_0x3ac339={},_0x4fc0bd;if(_0x1de03f['body']['to']){_0x4fc0bd=_0x1de03f[_0xcdbf('0x5e')]['to'][_0xcdbf('0x9f')](',')[0x0];}return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x1de03f[_0xcdbf('0x5b')]['id']},'include':[{'model':db[_0xcdbf('0xa0')],'as':_0xcdbf('0xa1'),'include':[{'model':db['CmContact'],'as':_0xcdbf('0xa2'),'where':{'email':_0x4fc0bd},'limit':0x1,'order':[[_0xcdbf('0xa3'),_0xcdbf('0xa4')]]}]},{'model':db[_0xcdbf('0x3f')],'as':'Smtp','raw':!![]}]})['then'](handleEntityNotFound(_0x57a30d,null))[_0xcdbf('0x20')](function(_0xc65110){if(_0xc65110){_0x5276b1=_0xc65110;if(_0xc65110[_0xcdbf('0x5c')]){if(_[_0xcdbf('0x70')](_0x1de03f['body'][_0xcdbf('0xa5')])){_0x1de03f[_0xcdbf('0x5e')]['from']=util[_0xcdbf('0xa6')]('%s\x20<%s>',_0xc65110['name'],_0xc65110['email']||_0xc65110['Smtp']['user']);}if(_0x1de03f['body'][_0xcdbf('0xa7')]&&_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xa7')]['length']){for(var _0xf04361=0x0;_0xf04361<_0x1de03f[_0xcdbf('0x5e')]['attachments'][_0xcdbf('0x4b')];_0xf04361+=0x1){_0x1de03f[_0xcdbf('0x5e')]['attachments'][_0xf04361]={'filename':_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xa7')][_0xf04361][_0xcdbf('0x3a')],'path':path['join'](config[_0xcdbf('0xa8')],_0xcdbf('0xa9'),_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xa7')][_0xf04361][_0xcdbf('0xaa')])};}}var _0xcb9ac7={'tls':{'rejectUnauthorized':![]}};if(_[_0xcdbf('0x70')](_0xc65110[_0xcdbf('0x5c')][_0xcdbf('0x79')])){if(_0xc65110[_0xcdbf('0x5c')][_0xcdbf('0x76')]){_0xcb9ac7[_0xcdbf('0xab')]={'user':_0xc65110[_0xcdbf('0x5c')][_0xcdbf('0x73')],'pass':_0xc65110[_0xcdbf('0x5c')]['pass']};}_0xcb9ac7['host']=_0xc65110[_0xcdbf('0x5c')][_0xcdbf('0x77')];_0xcb9ac7[_0xcdbf('0x78')]=_0xc65110[_0xcdbf('0x5c')][_0xcdbf('0x78')];_0xcb9ac7[_0xcdbf('0xac')]=_0xc65110['Smtp'][_0xcdbf('0xac')];}else{_0xcb9ac7[_0xcdbf('0x79')]=_0xc65110[_0xcdbf('0x5c')]['service'];_0xcb9ac7['auth']={'user':_0xc65110['Smtp'][_0xcdbf('0x73')],'pass':_0xc65110[_0xcdbf('0x5c')][_0xcdbf('0x75')]};}return respondWithRpcPromise('SendMail',_0xcdbf('0xad'),{'account':_0xcb9ac7,'message':_0x1de03f[_0xcdbf('0x5e')]});}else{throw new Error('List\x20not\x20found');}}})[_0xcdbf('0x20')](function(_0x27d703){if(_0x27d703){_0x3ac339=_0x27d703;if(_0x5276b1[_0xcdbf('0xa1')]){if(_0x5276b1[_0xcdbf('0xa1')][_0xcdbf('0xa2')][_0xcdbf('0x4b')]){return _0x5276b1[_0xcdbf('0xa1')][_0xcdbf('0xa2')][0x0];}else{return db[_0xcdbf('0x8d')][_0xcdbf('0x62')](_[_0xcdbf('0x17')](_0x1de03f[_0xcdbf('0x5e')],{'firstName':_0x1de03f[_0xcdbf('0x5e')]['to'],'email':_0x1de03f[_0xcdbf('0x5e')]['to'],'phone':_0x1de03f[_0xcdbf('0x5e')]['to'],'ListId':_0x5276b1[_0xcdbf('0x6d')]}));}}else{throw new Error(_0xcdbf('0xae'));}}})[_0xcdbf('0x20')](function(_0x29d0cc){if(_0x29d0cc){var _0x30054e={'UserId':_0x1de03f['user']['id'],'ContactId':_0x29d0cc['id'],'MailAccountId':_0x5276b1['id'],'inReplyTo':_0x3ac339['messageId'],'to':_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xa5')],'cc':_0x1de03f[_0xcdbf('0x5e')]['cc'],'subject':_0x1de03f['body'][_0xcdbf('0xaf')],'attach':_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xb0')],'firstMsgDirection':_0xcdbf('0xb1'),'lastMsgAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':_0xcdbf('0xb1'),'lastMsgBody':_0x1de03f[_0xcdbf('0x5e')]['body'],'Messages':[_[_0xcdbf('0x55')](_0x1de03f[_0xcdbf('0x5e')],{'messageId':_0x3ac339[_0xcdbf('0xb2')],'sentAt':moment()[_0xcdbf('0xa6')](_0xcdbf('0xb3')),'read':!![],'MailAccountId':_0x5276b1['id'],'UserId':_0x1de03f[_0xcdbf('0x73')]['id'],'ContactId':_0x29d0cc['id']})]};if(_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xb4')]){_0x30054e=_[_0xcdbf('0x55')](_0x30054e,_0x1de03f[_0xcdbf('0x5e')][_0xcdbf('0xb4')]);}return db[_0xcdbf('0x8b')][_0xcdbf('0x62')](_0x30054e,{'include':[{'model':db['MailMessage'],'as':'Messages'}]});}})['then'](respondWithResult(_0x57a30d,null))[_0xcdbf('0x2a')](handleError(_0x57a30d,null));};exports[_0xcdbf('0xb5')]=function(_0x52c5af,_0xa247f8,_0x4f18c5){return db[_0xcdbf('0x42')][_0xcdbf('0x5d')]({'where':{'id':_0x52c5af[_0xcdbf('0x5b')]['id']},'include':[{'model':db['MailServerOut'],'as':'Smtp','raw':!![]}]})[_0xcdbf('0x20')](handleEntityNotFound(_0xa247f8,null))[_0xcdbf('0x20')](function(_0x300b42){if(_0x300b42&&_0x300b42['Smtp']){var _0x1296aa={'id':_0x300b42['id'],'tls':{'rejectUnauthorized':![]}};if(_0x300b42[_0xcdbf('0x5c')]['service']){_0x1296aa[_0xcdbf('0x79')]=_0x300b42[_0xcdbf('0x5c')][_0xcdbf('0x79')];}else{_0x1296aa[_0xcdbf('0x77')]=_0x300b42[_0xcdbf('0x5c')][_0xcdbf('0x77')];_0x1296aa[_0xcdbf('0x78')]=_0x300b42[_0xcdbf('0x5c')][_0xcdbf('0x78')];_0x1296aa[_0xcdbf('0xac')]=_0x300b42[_0xcdbf('0x5c')][_0xcdbf('0xac')];}if(_0x300b42[_0xcdbf('0x5c')][_0xcdbf('0x76')]){_0x1296aa[_0xcdbf('0xab')]={'user':_0x300b42[_0xcdbf('0x5c')][_0xcdbf('0x73')],'pass':_0x300b42['Smtp']['pass']};}return respondWithRpcPromise(_0xcdbf('0xb6'),'verifySmtp',{'account':_0x1296aa});}})['then'](respondWithResult(_0xa247f8,null))['catch'](handleError(_0xa247f8,null));};exports[_0xcdbf('0x37')]=function(_0x4fb107,_0xc04cee){return db[_0xcdbf('0x42')]['find']({'where':{'id':_0x4fb107[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0xc04cee,null))['then'](function(_0x384b02){if(_0x384b02&&_0x384b02[_0xcdbf('0x79')]){throw new db[(_0xcdbf('0xb7'))][(_0xcdbf('0xb8'))](_0xcdbf('0xb9'));}return _0x384b02;})[_0xcdbf('0x20')](removeEntity(_0xc04cee,null))[_0xcdbf('0x2a')](handleError(_0xc04cee,null));};exports[_0xcdbf('0xba')]=function(_0xff429d,_0x15ac86,_0x4dc611){return db[_0xcdbf('0x42')]['find']({'where':{'id':_0xff429d['params']['id']}})['then'](handleEntityNotFound(_0x15ac86,null))[_0xcdbf('0x20')](function(_0x1a9323){if(_0x1a9323){return _0x1a9323[_0xcdbf('0xba')](_0xff429d[_0xcdbf('0x5e')]['ids'],_[_0xcdbf('0x89')](_0xff429d[_0xcdbf('0x5e')],[_0xcdbf('0x6c'),'id'])||{})[_0xcdbf('0xbb')](function(_0x32529e){for(var _0x5438eb=0x0;_0x5438eb<_0xff429d['body']['ids'][_0xcdbf('0x4b')];_0x5438eb+=0x1){socket[_0xcdbf('0xbc')](_0xcdbf('0xbd'),{'UserId':_0xff429d[_0xcdbf('0x5e')][_0xcdbf('0x6c')][_0x5438eb],'MailAccountId':_0xff429d[_0xcdbf('0x5b')]['id']});}return _0x32529e;});}})[_0xcdbf('0x20')](respondWithResult(_0x15ac86,null))[_0xcdbf('0x2a')](handleError(_0x15ac86,null));};exports[_0xcdbf('0xbe')]=function(_0x2ae030,_0x907ad7,_0x1c47f7){return db[_0xcdbf('0x42')]['find']({'where':{'id':_0x2ae030[_0xcdbf('0x5b')]['id']}})[_0xcdbf('0x20')](handleEntityNotFound(_0x907ad7,null))[_0xcdbf('0x20')](function(_0x524d7b){if(_0x524d7b){return _0x524d7b['removeAgents'](_0x2ae030['query'][_0xcdbf('0x6c')])[_0xcdbf('0x20')](function(){if(_[_0xcdbf('0xbf')](_0x2ae030[_0xcdbf('0x46')][_0xcdbf('0x6c')])){for(var _0x3da226=0x0;_0x3da226<_0x2ae030[_0xcdbf('0x46')]['ids'][_0xcdbf('0x4b')];_0x3da226+=0x1){socket[_0xcdbf('0xbc')](_0xcdbf('0xc0'),{'UserId':Number(_0x2ae030['query']['ids'][_0x3da226]),'MailAccountId':Number(_0x2ae030[_0xcdbf('0x5b')]['id'])});}}else{socket['emit']('userMailAccount:remove',{'UserId':Number(_0x2ae030[_0xcdbf('0x46')]['ids']),'MailAccountId':Number(_0x2ae030['params']['id'])});}});}})[_0xcdbf('0x20')](respondWithStatusCode(_0x907ad7,null))[_0xcdbf('0x2a')](handleError(_0x907ad7,null));};exports[_0xcdbf('0xc1')]=function(_0x5a6849,_0x298a57,_0x527622){var _0x476859={};var _0x2ed4ca={};var _0x2ddb5a;var _0x44334e;return db[_0xcdbf('0x42')][_0xcdbf('0x64')]({'where':{'id':_0x5a6849[_0xcdbf('0x5b')]['id']}})['then'](handleEntityNotFound(_0x298a57,null))[_0xcdbf('0x20')](function(_0x5f0ea9){if(_0x5f0ea9){_0x2ddb5a=_0x5f0ea9;_0x2ed4ca['model']=_['keys'](db[_0xcdbf('0x8f')]['rawAttributes']);_0x2ed4ca[_0xcdbf('0x46')]=_[_0xcdbf('0x45')](_0x5a6849[_0xcdbf('0x46')]);_0x2ed4ca['filters']=_[_0xcdbf('0x49')](_0x2ed4ca[_0xcdbf('0x44')],_0x2ed4ca['query']);_0x476859[_0xcdbf('0x48')]=_[_0xcdbf('0x49')](_0x2ed4ca[_0xcdbf('0x44')],qs[_0xcdbf('0x4a')](_0x5a6849[_0xcdbf('0x46')][_0xcdbf('0x4a')]));_0x476859[_0xcdbf('0x48')]=_0x476859[_0xcdbf('0x48')][_0xcdbf('0x4b')]?_0x476859[_0xcdbf('0x48')]:_0x2ed4ca[_0xcdbf('0x44')];_0x476859[_0xcdbf('0x4d')]=qs[_0xcdbf('0x4e')](_0x5a6849['query'][_0xcdbf('0x4e')]);_0x476859[_0xcdbf('0x50')]=qs['filters'](_['pick'](_0x5a6849[_0xcdbf('0x46')],_0x2ed4ca[_0xcdbf('0x47')]));if(_0x5a6849['query'][_0xcdbf('0x54')]){_0x476859[_0xcdbf('0x50')]=_[_0xcdbf('0x55')](_0x476859[_0xcdbf('0x50')],{'$or':_[_0xcdbf('0x51')](_0x476859[_0xcdbf('0x48')],function(_0x4bd6de){var _0x56800d={};_0x56800d[_0x4bd6de]={'$like':'%'+_0x5a6849[_0xcdbf('0x46')][_0xcdbf('0x54')]+'%'};return _0x56800d;})});}_0x476859=_[_0xcdbf('0x55')]({},_0x476859,_0x5a6849[_0xcdbf('0x56')]);return _0x2ddb5a[_0xcdbf('0xc1')](_0x476859);}})[_0xcdbf('0x20')](function(_0x12dc9d){if(_0x12dc9d){_0x44334e=_0x12dc9d[_0xcdbf('0x4b')];if(!_0x5a6849[_0xcdbf('0x46')][_0xcdbf('0x4c')](_0xcdbf('0x8c'))){_0x476859[_0xcdbf('0x30')]=qs[_0xcdbf('0x30')](_0x5a6849['query'][_0xcdbf('0x30')]);_0x476859['offset']=qs[_0xcdbf('0x2f')](_0x5a6849[_0xcdbf('0x46')][_0xcdbf('0x2f')]);}return _0x2ddb5a[_0xcdbf('0xc1')](_0x476859);}})[_0xcdbf('0x20')](function(_0x40c988){if(_0x40c988){return _0x40c988?{'count':_0x44334e,'rows':_0x40c988}:null;}})['then'](respondWithResult(_0x298a57,null))[_0xcdbf('0x2a')](handleError(_0x298a57,null));};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.events.js b/server/api/mailAccount/mailAccount.events.js
index 10da30f..e9f7c2c 100644
--- a/server/api/mailAccount/mailAccount.events.js
+++ b/server/api/mailAccount/mailAccount.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['hasOwnProperty','hook','exports','events','../../mysqldb','MailAccount','update','emit'];(function(_0x48b5e0,_0xb3826){var _0x4287ea=function(_0x14519e){while(--_0x14519e){_0x48b5e0['push'](_0x48b5e0['shift']());}};_0x4287ea(++_0xb3826);}(_0xa9e0,0x123));var _0x0a9e=function(_0x521929,_0x479be5){_0x521929=_0x521929-0x0;var _0x632436=_0xa9e0[_0x521929];return _0x632436;};'use strict';var EventEmitter=require(_0x0a9e('0x0'));var MailAccount=require(_0x0a9e('0x1'))['db'][_0x0a9e('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x0a9e('0x3'),'afterDestroy':'remove'};function emitEvent(_0x333808){return function(_0x432180,_0x2ab90b,_0x991246){MailAccountEvents[_0x0a9e('0x4')](_0x333808+':'+_0x432180['id'],_0x432180);MailAccountEvents['emit'](_0x333808,_0x432180);_0x991246(null);};}for(var e in events){if(events[_0x0a9e('0x5')](e)){var event=events[e];MailAccount[_0x0a9e('0x6')](e,emitEvent(event));}}module[_0x0a9e('0x7')]=MailAccountEvents;
\ No newline at end of file
+var _0xa9e0=['hasOwnProperty','hook','exports','events','../../mysqldb','MailAccount','update','emit'];(function(_0x49c68e,_0x1c1673){var _0x33032b=function(_0x42ac31){while(--_0x42ac31){_0x49c68e['push'](_0x49c68e['shift']());}};_0x33032b(++_0x1c1673);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3c4737,_0x2329ec){_0x3c4737=_0x3c4737-0x0;var _0x2bb926=_0xa9e0[_0x3c4737];return _0x2bb926;};'use strict';var EventEmitter=require(_0x0a9e('0x0'));var MailAccount=require(_0x0a9e('0x1'))['db'][_0x0a9e('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x0a9e('0x3'),'afterDestroy':'remove'};function emitEvent(_0x333808){return function(_0x432180,_0x2ab90b,_0x991246){MailAccountEvents[_0x0a9e('0x4')](_0x333808+':'+_0x432180['id'],_0x432180);MailAccountEvents['emit'](_0x333808,_0x432180);_0x991246(null);};}for(var e in events){if(events[_0x0a9e('0x5')](e)){var event=events[e];MailAccount[_0x0a9e('0x6')](e,emitEvent(event));}}module[_0x0a9e('0x7')]=MailAccountEvents;
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.model.js b/server/api/mailAccount/mailAccount.model.js
index 065e828..ba30b52 100644
--- a/server/api/mailAccount/mailAccount.model.js
+++ b/server/api/mailAccount/mailAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbdc2=['../../config/logger','api','request-promise','path','../../config/environment','./mailAccount.attributes','define','MailAccount','mail_accounts','lodash','util'];(function(_0x34fae1,_0x4e9bbc){var _0x36c0a2=function(_0x14ebce){while(--_0x14ebce){_0x34fae1['push'](_0x34fae1['shift']());}};_0x36c0a2(++_0x4e9bbc);}(_0xbdc2,0x148));var _0x2bdc=function(_0x51da74,_0xed04){_0x51da74=_0x51da74-0x0;var _0x58cbd7=_0xbdc2[_0x51da74];return _0x58cbd7;};'use strict';var _=require(_0x2bdc('0x0'));var util=require(_0x2bdc('0x1'));var logger=require(_0x2bdc('0x2'))(_0x2bdc('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2bdc('0x4'));var fs=require('fs');var path=require(_0x2bdc('0x5'));var rimraf=require('rimraf');var config=require(_0x2bdc('0x6'));var attributes=require(_0x2bdc('0x7'));module['exports']=function(_0x1a4381,_0x4bf5cd){return _0x1a4381[_0x2bdc('0x8')](_0x2bdc('0x9'),attributes,{'tableName':_0x2bdc('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5458=['../../config/environment','exports','define','mail_accounts','lodash','util','../../config/logger','moment','bluebird','path','rimraf'];(function(_0x9388b3,_0x3767b5){var _0x281bce=function(_0x5d7f28){while(--_0x5d7f28){_0x9388b3['push'](_0x9388b3['shift']());}};_0x281bce(++_0x3767b5);}(_0x5458,0x1c7));var _0x8545=function(_0x2927f6,_0x53bdb3){_0x2927f6=_0x2927f6-0x0;var _0x57bd36=_0x5458[_0x2927f6];return _0x57bd36;};'use strict';var _=require(_0x8545('0x0'));var util=require(_0x8545('0x1'));var logger=require(_0x8545('0x2'))('api');var moment=require(_0x8545('0x3'));var BPromise=require(_0x8545('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8545('0x5'));var rimraf=require(_0x8545('0x6'));var config=require(_0x8545('0x7'));var attributes=require('./mailAccount.attributes');module[_0x8545('0x8')]=function(_0x2bd13a,_0x10792f){return _0x2bd13a[_0x8545('0x9')]('MailAccount',attributes,{'tableName':_0x8545('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.rpc.js b/server/api/mailAccount/mailAccount.rpc.js
index 5e51d5f..6c10599 100644
--- a/server/api/mailAccount/mailAccount.rpc.js
+++ b/server/api/mailAccount/mailAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc7f1=['MailApplication','MailServerOut','Smtp','get','Applications','orderBy','priority','asc','autoclose','applications','push','length','close','*,*,*,*','create','messageId','generate','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','Messages','Contact\x20not\x20found','spread','subject','interaction','contact','attachments','originTo','originCc','bcc','Attachment','Attachments','User','name','UserId','unshift','agent','Start','startRouting','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','./mailAccount.socket','register','request','then','info','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','stringify','code','MailAccount,\x20%s,\x20%s','message','error','catch','GetMailAccount','MailAccount','findAll','options','where','limit','include','map','model','attributes','ShowMailAccount','NotifyMailAccount','body','mail','difference','keys','CmContact','rawAttributes','CompanyId','ListId','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey','find','account','CmList','List','Contacts','DESC'];(function(_0x508311,_0x3003a2){var _0x439e0b=function(_0x171a3d){while(--_0x171a3d){_0x508311['push'](_0x508311['shift']());}};_0x439e0b(++_0x3003a2);}(_0xc7f1,0xf5));var _0x1c7f=function(_0x215fe2,_0x41db1b){_0x215fe2=_0x215fe2-0x0;var _0x35a616=_0xc7f1[_0x215fe2];return _0x35a616;};'use strict';var _=require(_0x1c7f('0x0'));var util=require(_0x1c7f('0x1'));var moment=require(_0x1c7f('0x2'));var BPromise=require('bluebird');var rs=require(_0x1c7f('0x3'));var fs=require('fs');var Redis=require(_0x1c7f('0x4'));var db=require(_0x1c7f('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1c7f('0x6'))(_0x1c7f('0x7'));var config=require('../../config/environment');var jayson=require(_0x1c7f('0x8'));var client=jayson[_0x1c7f('0x9')][_0x1c7f('0xa')]({'port':0x232c});config[_0x1c7f('0xb')]=_[_0x1c7f('0xc')](config[_0x1c7f('0xb')],{'host':_0x1c7f('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x1c7f('0xe'))[_0x1c7f('0xf')](socket);function respondWithRpcPromise(_0x35af4e,_0xd4530f,_0x4378a7){return new BPromise(function(_0x1eccab,_0x140f43){return client[_0x1c7f('0x10')](_0x35af4e,_0x4378a7)[_0x1c7f('0x11')](function(_0x65ca6b){logger[_0x1c7f('0x12')]('MailAccount,\x20%s,\x20%s',_0xd4530f,_0x1c7f('0x13'));logger[_0x1c7f('0x14')](_0x1c7f('0x15'),_0xd4530f,'request\x20sent',JSON[_0x1c7f('0x16')](_0x65ca6b));if(_0x65ca6b['error']){if(_0x65ca6b['error'][_0x1c7f('0x17')]===0x1f4){logger['error'](_0x1c7f('0x18'),_0xd4530f,_0x65ca6b['error'][_0x1c7f('0x19')]);return _0x140f43(_0x65ca6b[_0x1c7f('0x1a')]['message']);}logger[_0x1c7f('0x1a')](_0x1c7f('0x18'),_0xd4530f,_0x65ca6b[_0x1c7f('0x1a')][_0x1c7f('0x19')]);return _0x1eccab(_0x65ca6b[_0x1c7f('0x1a')][_0x1c7f('0x19')]);}else{logger[_0x1c7f('0x12')]('MailAccount,\x20%s,\x20%s',_0xd4530f,_0x1c7f('0x13'));_0x1eccab(_0x65ca6b['result']['message']);}})[_0x1c7f('0x1b')](function(_0x368882){logger[_0x1c7f('0x1a')](_0x1c7f('0x18'),_0xd4530f,_0x368882);_0x140f43(_0x368882);});});}exports[_0x1c7f('0x1c')]=function(_0x7d0ac1){var _0x67de2e=this;return new Promise(function(_0x569505,_0x53bbda){return db[_0x1c7f('0x1d')][_0x1c7f('0x1e')]({'raw':_0x7d0ac1['options']?_0x7d0ac1['options']['raw']===undefined?!![]:![]:!![],'where':_0x7d0ac1['options']?_0x7d0ac1[_0x1c7f('0x1f')][_0x1c7f('0x20')]||null:null,'attributes':_0x7d0ac1['options']?_0x7d0ac1[_0x1c7f('0x1f')]['attributes']||null:null,'limit':_0x7d0ac1[_0x1c7f('0x1f')]?_0x7d0ac1[_0x1c7f('0x1f')][_0x1c7f('0x21')]||null:null,'include':_0x7d0ac1[_0x1c7f('0x1f')]?_0x7d0ac1[_0x1c7f('0x1f')][_0x1c7f('0x22')]?_[_0x1c7f('0x23')](_0x7d0ac1['options'][_0x1c7f('0x22')],function(_0x2156f4){return{'model':db[_0x2156f4[_0x1c7f('0x24')]],'as':_0x2156f4['as'],'attributes':_0x2156f4[_0x1c7f('0x25')],'include':_0x2156f4[_0x1c7f('0x22')]?_[_0x1c7f('0x23')](_0x2156f4['include'],function(_0x337b62){return{'model':db[_0x337b62[_0x1c7f('0x24')]],'as':_0x337b62['as'],'attributes':_0x337b62['attributes'],'include':_0x337b62['include']?_['map'](_0x337b62[_0x1c7f('0x22')],function(_0x43d932){return{'model':db[_0x43d932[_0x1c7f('0x24')]],'as':_0x43d932['as'],'attributes':_0x43d932[_0x1c7f('0x25')]};}):[]};}):[]};}):[]:[]})[_0x1c7f('0x11')](function(_0x21a8f2){logger[_0x1c7f('0x12')](_0x1c7f('0x1c'),_0x7d0ac1);logger[_0x1c7f('0x14')]('GetMailAccount',_0x7d0ac1,JSON['stringify'](_0x21a8f2));_0x569505(_0x21a8f2);})['catch'](function(_0x1892b7){logger[_0x1c7f('0x1a')](_0x1c7f('0x1c'),_0x1892b7[_0x1c7f('0x19')],_0x7d0ac1);_0x53bbda(_0x67de2e[_0x1c7f('0x1a')](0x1f4,_0x1892b7[_0x1c7f('0x19')]));});});};exports[_0x1c7f('0x26')]=function(_0x35c760){var _0x52df65=this;return new Promise(function(_0x2388e7,_0x32e6ff){return db['MailAccount']['find']({'raw':_0x35c760[_0x1c7f('0x1f')]?_0x35c760[_0x1c7f('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0x35c760[_0x1c7f('0x1f')]?_0x35c760[_0x1c7f('0x1f')][_0x1c7f('0x20')]||null:null,'attributes':_0x35c760[_0x1c7f('0x1f')]?_0x35c760[_0x1c7f('0x1f')][_0x1c7f('0x25')]||null:null,'include':_0x35c760[_0x1c7f('0x1f')]?_0x35c760[_0x1c7f('0x1f')][_0x1c7f('0x22')]?_['map'](_0x35c760[_0x1c7f('0x1f')][_0x1c7f('0x22')],function(_0x490153){return{'model':db[_0x490153['model']],'as':_0x490153['as'],'attributes':_0x490153['attributes'],'include':_0x490153['include']?_[_0x1c7f('0x23')](_0x490153[_0x1c7f('0x22')],function(_0x28a3ba){return{'model':db[_0x28a3ba[_0x1c7f('0x24')]],'as':_0x28a3ba['as'],'attributes':_0x28a3ba[_0x1c7f('0x25')],'include':_0x28a3ba[_0x1c7f('0x22')]?_[_0x1c7f('0x23')](_0x28a3ba[_0x1c7f('0x22')],function(_0x57779c){return{'model':db[_0x57779c['model']],'as':_0x57779c['as'],'attributes':_0x57779c[_0x1c7f('0x25')]};}):[]};}):[]};}):[]:[]})[_0x1c7f('0x11')](function(_0x9e023b){logger[_0x1c7f('0x12')](_0x1c7f('0x26'),_0x35c760);logger[_0x1c7f('0x14')](_0x1c7f('0x26'),_0x35c760,JSON[_0x1c7f('0x16')](_0x9e023b));_0x2388e7(_0x9e023b);})[_0x1c7f('0x1b')](function(_0xce577f){logger['error'](_0x1c7f('0x26'),_0xce577f[_0x1c7f('0x19')],_0x35c760);_0x32e6ff(_0x52df65['error'](0x1f4,_0xce577f[_0x1c7f('0x19')]));});});};exports[_0x1c7f('0x27')]=function(_0x5e8014){var _0xea4600=this;return new Promise(function(_0x1060b6,_0x58a711){var _0x156068={'body':_0x5e8014[_0x1c7f('0x28')],'channel':_0x1c7f('0x29')};var _0x15875d=_[_0x1c7f('0x2a')](_[_0x1c7f('0x2b')](db[_0x1c7f('0x2c')][_0x1c7f('0x2d')]),['createdAt','updatedAt',_0x1c7f('0x2e'),_0x1c7f('0x2f')]);var _0x1dd9c2=![];if(_0x5e8014[_0x1c7f('0x28')]['id']){delete _0x5e8014[_0x1c7f('0x28')]['id'];}if(_[_0x1c7f('0x30')](_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x31')])){return _0x58a711(_0xea4600[_0x1c7f('0x1a')](0x1f4,_0x1c7f('0x32')));}if(_[_0x1c7f('0x30')](_0x5e8014[_0x1c7f('0x28')]['body'])||_0x5e8014['body'][_0x1c7f('0x28')]===''){return _0x58a711(_0xea4600[_0x1c7f('0x1a')](0x1f4,_0x1c7f('0x33')));}if(_[_0x1c7f('0x30')](_0x5e8014['body']['mapKey'])){return _0x58a711(_0xea4600[_0x1c7f('0x1a')](0x1f4,_0x1c7f('0x34')+_0x15875d));}if(!_[_0x1c7f('0x35')](_0x15875d,_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x36')])){return _0x58a711(_0xea4600[_0x1c7f('0x1a')](0x1f4,'mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x15875d));}var _0x19b487={};_0x19b487[_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x36')]]=_0x5e8014[_0x1c7f('0x28')]['from'];return db[_0x1c7f('0x1d')][_0x1c7f('0x37')]({'where':{'id':_0x5e8014[_0x1c7f('0x38')]['id']},'include':[{'model':db[_0x1c7f('0x39')],'as':_0x1c7f('0x3a'),'include':[{'model':db[_0x1c7f('0x2c')],'as':_0x1c7f('0x3b'),'where':_0x19b487,'limit':0x1,'order':[['updatedAt',_0x1c7f('0x3c')]]}]},{'model':db[_0x1c7f('0x3d')],'as':'Applications'},{'model':db[_0x1c7f('0x3e')],'as':_0x1c7f('0x3f')}]})['then'](function(_0x436021){if(_0x436021&&_0x436021[_0x1c7f('0x3a')]){var _0x4bb5f1=_0x436021[_0x1c7f('0x40')]({'plain':!![]});_0x156068[_0x1c7f('0x38')]=_['omit'](_0x4bb5f1,[_0x1c7f('0x41'),_0x1c7f('0x3a')]);_0x156068['applications']=_0x4bb5f1['Applications'];_0x156068['list']=_0x4bb5f1[_0x1c7f('0x3a')];_0x156068['applications']=_[_0x1c7f('0x42')](_0x156068['applications'],[_0x1c7f('0x43')],[_0x1c7f('0x44')]);if(_0x156068[_0x1c7f('0x38')]&&_0x156068[_0x1c7f('0x38')][_0x1c7f('0x45')]){_0x156068[_0x1c7f('0x46')][_0x1c7f('0x47')]({'id':0x0,'priority':_0x156068[_0x1c7f('0x46')][_0x1c7f('0x48')]+0x1,'app':_0x1c7f('0x49'),'appdata':_0x1c7f('0x45'),'interval':_0x1c7f('0x4a')});}if(_0x156068[_0x1c7f('0x38')][_0x1c7f('0x41')]){delete _0x156068['account'][_0x1c7f('0x41')];}if(_0x156068[_0x1c7f('0x38')]['List']){delete _0x156068[_0x1c7f('0x38')][_0x1c7f('0x3a')];}if(_0x4bb5f1[_0x1c7f('0x3a')]['Contacts'][_0x1c7f('0x48')]){return _0x4bb5f1[_0x1c7f('0x3a')][_0x1c7f('0x3b')][0x0];}var _0x18c42f=_[_0x1c7f('0xc')](_0x5e8014[_0x1c7f('0x28')],{'firstName':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x31')],'ListId':_0x4bb5f1[_0x1c7f('0x2f')]});_0x18c42f[_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x36')]]=_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x31')];return db[_0x1c7f('0x2c')][_0x1c7f('0x4b')](_0x18c42f);}else{throw new Error('List\x20not\x20found');}})[_0x1c7f('0x11')](function(_0x2bb553){_0x156068['contact']=_0x2bb553;if(_0x2bb553){if(!_0x5e8014['body'][_0x1c7f('0x19')]['messageId']){_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x4c')]=rs[_0x1c7f('0x4d')]()+'\x20'+_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x31')];}var _0xc91a6e={'ContactId':_0x2bb553['id'],'MailAccountId':_0x5e8014[_0x1c7f('0x38')]['id'],'inReplyTo':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x4c')],'to':_0x5e8014[_0x1c7f('0x28')]['message'][_0x1c7f('0x31')],'cc':_0x5e8014['body'][_0x1c7f('0x19')]['cc'],'subject':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')]['subject'],'attach':_0x5e8014[_0x1c7f('0x28')]['message'][_0x1c7f('0x4e')],'lastMsgAt':moment()[_0x1c7f('0x4f')](_0x1c7f('0x50')),'lastMsgDirection':'in','lastMsgBody':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x28')]};return db[_0x1c7f('0x51')][_0x1c7f('0x37')]({'where':{'closed':![],'MailAccountId':_0x5e8014[_0x1c7f('0x38')]['id']},'include':[{'model':db[_0x1c7f('0x52')],'as':_0x1c7f('0x53'),'attributes':['messageId'],'where':{'messageId':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')]['inReplyTo']}}]})[_0x1c7f('0x11')](function(_0x47217c){if(_0x47217c){return[_0x47217c,![]];}return db[_0x1c7f('0x51')][_0x1c7f('0x4b')](_0xc91a6e)[_0x1c7f('0x11')](function(_0x3974cd){return[_0x3974cd,!![]];});});}else{throw new Error(_0x1c7f('0x54'));}})[_0x1c7f('0x55')](function(_0x3d80c2,_0x4fd809){if(_0x3d80c2){_0x1dd9c2=_0x4fd809;if(!_0x4fd809){return _0x3d80c2['update']({'inReplyTo':_0x5e8014['body'][_0x1c7f('0x19')]['messageId'],'to':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x31')],'cc':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')]['cc'],'subject':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x56')],'attach':_0x3d80c2[_0x1c7f('0x4e')]?_0x3d80c2['attach']:_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x4e')],'substatus':null,'substatusAt':moment()[_0x1c7f('0x4f')](_0x1c7f('0x50')),'lastMsgAt':moment()[_0x1c7f('0x4f')](_0x1c7f('0x50')),'lastMsgDirection':'in','lastMsgBody':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x28')]});}else{return _0x3d80c2;}}})['then'](function(_0x39e5a1){_0x156068[_0x1c7f('0x57')]=_0x39e5a1[_0x1c7f('0x40')]({'plain':!![]});_0x156068[_0x1c7f('0x57')]['created']=_0x1dd9c2;return db[_0x1c7f('0x52')]['create']({'body':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x28')],'MailAccountId':_0x5e8014[_0x1c7f('0x38')]['id'],'MailInteractionId':_0x39e5a1['id'],'direction':'in','ContactId':_0x156068[_0x1c7f('0x58')]['id'],'messageId':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x4c')],'from':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x31')],'to':_0x5e8014['body'][_0x1c7f('0x19')]['to'],'cc':_0x5e8014[_0x1c7f('0x28')]['message']['cc'],'subject':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x56')],'attach':_0x5e8014['body'][_0x1c7f('0x19')][_0x1c7f('0x4e')],'Attachments':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x59')],'originTo':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x5a')],'originCc':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x5b')],'bcc':_0x5e8014[_0x1c7f('0x28')][_0x1c7f('0x19')][_0x1c7f('0x5c')]},{'include':[{'model':db[_0x1c7f('0x5d')],'as':_0x1c7f('0x5e')}]});})[_0x1c7f('0x11')](function(_0x2238d1){_0x156068[_0x1c7f('0x19')]=_0x2238d1;if(_0x156068['interaction']['UserId']){return db[_0x1c7f('0x5f')][_0x1c7f('0x37')]({'attributes':['id',_0x1c7f('0x60')],'where':{'id':_0x156068[_0x1c7f('0x57')][_0x1c7f('0x61')]}})['then'](function(_0x38d934){if(_0x38d934){_0x156068[_0x1c7f('0x46')][_0x1c7f('0x62')]({'id':0x0,'priority':0x0,'app':_0x1c7f('0x63'),'appdata':_0x38d934[_0x1c7f('0x60')]+','+(_0x156068[_0x1c7f('0x38')]['waitForTheAssignedAgent']||0xa),'interval':_0x1c7f('0x4a')});}return respondWithRpcPromise(_0x1c7f('0x64'),'startRouting',_0x156068);});}return respondWithRpcPromise(_0x1c7f('0x64'),_0x1c7f('0x65'),_0x156068);})[_0x1c7f('0x11')](function(_0x45ebdc){_0x1060b6(_0x45ebdc);})[_0x1c7f('0x1b')](function(_0x51d741){_0x58a711(_0xea4600[_0x1c7f('0x1a')](0x1f4,_0x51d741['message']));});});};
\ No newline at end of file
+var _0xd98d=['interaction','create','attachments','originTo','originCc','UserId','User','name','Start','startRouting','util','moment','bluebird','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','http','redis','socket.io-emitter','./mailAccount.socket','register','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','GetMailAccount','MailAccount','findAll','options','where','attributes','limit','include','map','model','ShowMailAccount','find','raw','NotifyMailAccount','body','mail','difference','keys','CmContact','rawAttributes','createdAt','CompanyId','ListId','isNil','from','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','MailServerOut','Smtp','account','Applications','List','applications','priority','asc','push','length','*,*,*,*','Contacts','defaults','List\x20not\x20found','contact','messageId','generate','subject','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','Messages','inReplyTo','Contact\x20not\x20found','update'];(function(_0x222563,_0x587767){var _0x25e55e=function(_0x2ec55c){while(--_0x2ec55c){_0x222563['push'](_0x222563['shift']());}};_0x25e55e(++_0x587767);}(_0xd98d,0x65));var _0xdd98=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd98d[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xdd98('0x0'));var moment=require(_0xdd98('0x1'));var BPromise=require(_0xdd98('0x2'));var rs=require(_0xdd98('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xdd98('0x4'));var logger=require('../../config/logger')(_0xdd98('0x5'));var config=require(_0xdd98('0x6'));var jayson=require(_0xdd98('0x7'));var client=jayson['client'][_0xdd98('0x8')]({'port':0x232c});config[_0xdd98('0x9')]=_['defaults'](config[_0xdd98('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xdd98('0xa'))(new Redis(config[_0xdd98('0x9')]));require(_0xdd98('0xb'))[_0xdd98('0xc')](socket);function respondWithRpcPromise(_0x654f13,_0x518214,_0x3a12fd){return new BPromise(function(_0x14362c,_0x1d95a5){return client['request'](_0x654f13,_0x3a12fd)[_0xdd98('0xd')](function(_0x59535c){logger[_0xdd98('0xe')](_0xdd98('0xf'),_0x518214,_0xdd98('0x10'));logger[_0xdd98('0x11')](_0xdd98('0x12'),_0x518214,'request\x20sent',JSON[_0xdd98('0x13')](_0x59535c));if(_0x59535c['error']){if(_0x59535c['error'][_0xdd98('0x14')]===0x1f4){logger[_0xdd98('0x15')](_0xdd98('0xf'),_0x518214,_0x59535c[_0xdd98('0x15')][_0xdd98('0x16')]);return _0x1d95a5(_0x59535c['error'][_0xdd98('0x16')]);}logger[_0xdd98('0x15')]('MailAccount,\x20%s,\x20%s',_0x518214,_0x59535c[_0xdd98('0x15')][_0xdd98('0x16')]);return _0x14362c(_0x59535c[_0xdd98('0x15')]['message']);}else{logger[_0xdd98('0xe')](_0xdd98('0xf'),_0x518214,'request\x20sent');_0x14362c(_0x59535c[_0xdd98('0x17')][_0xdd98('0x16')]);}})[_0xdd98('0x18')](function(_0x2bc524){logger['error']('MailAccount,\x20%s,\x20%s',_0x518214,_0x2bc524);_0x1d95a5(_0x2bc524);});});}exports[_0xdd98('0x19')]=function(_0xc74d5f){var _0x510b8a=this;return new Promise(function(_0x1adcb1,_0x481307){return db[_0xdd98('0x1a')][_0xdd98('0x1b')]({'raw':_0xc74d5f[_0xdd98('0x1c')]?_0xc74d5f[_0xdd98('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0xc74d5f[_0xdd98('0x1c')]?_0xc74d5f[_0xdd98('0x1c')][_0xdd98('0x1d')]||null:null,'attributes':_0xc74d5f['options']?_0xc74d5f[_0xdd98('0x1c')][_0xdd98('0x1e')]||null:null,'limit':_0xc74d5f['options']?_0xc74d5f[_0xdd98('0x1c')][_0xdd98('0x1f')]||null:null,'include':_0xc74d5f[_0xdd98('0x1c')]?_0xc74d5f[_0xdd98('0x1c')][_0xdd98('0x20')]?_[_0xdd98('0x21')](_0xc74d5f[_0xdd98('0x1c')][_0xdd98('0x20')],function(_0x278b49){return{'model':db[_0x278b49['model']],'as':_0x278b49['as'],'attributes':_0x278b49['attributes'],'include':_0x278b49[_0xdd98('0x20')]?_[_0xdd98('0x21')](_0x278b49[_0xdd98('0x20')],function(_0xc25338){return{'model':db[_0xc25338[_0xdd98('0x22')]],'as':_0xc25338['as'],'attributes':_0xc25338[_0xdd98('0x1e')],'include':_0xc25338[_0xdd98('0x20')]?_[_0xdd98('0x21')](_0xc25338['include'],function(_0xd6c20e){return{'model':db[_0xd6c20e[_0xdd98('0x22')]],'as':_0xd6c20e['as'],'attributes':_0xd6c20e[_0xdd98('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xdd98('0xd')](function(_0x5ac3e9){logger['info'](_0xdd98('0x19'),_0xc74d5f);logger[_0xdd98('0x11')](_0xdd98('0x19'),_0xc74d5f,JSON[_0xdd98('0x13')](_0x5ac3e9));_0x1adcb1(_0x5ac3e9);})[_0xdd98('0x18')](function(_0xf66bdd){logger[_0xdd98('0x15')]('GetMailAccount',_0xf66bdd[_0xdd98('0x16')],_0xc74d5f);_0x481307(_0x510b8a['error'](0x1f4,_0xf66bdd[_0xdd98('0x16')]));});});};exports[_0xdd98('0x23')]=function(_0x31c5cd){var _0x6167c5=this;return new Promise(function(_0x5f56c8,_0x342ced){return db[_0xdd98('0x1a')][_0xdd98('0x24')]({'raw':_0x31c5cd['options']?_0x31c5cd['options'][_0xdd98('0x25')]===undefined?!![]:![]:!![],'where':_0x31c5cd['options']?_0x31c5cd[_0xdd98('0x1c')]['where']||null:null,'attributes':_0x31c5cd[_0xdd98('0x1c')]?_0x31c5cd[_0xdd98('0x1c')][_0xdd98('0x1e')]||null:null,'include':_0x31c5cd[_0xdd98('0x1c')]?_0x31c5cd['options'][_0xdd98('0x20')]?_[_0xdd98('0x21')](_0x31c5cd[_0xdd98('0x1c')][_0xdd98('0x20')],function(_0x1fb347){return{'model':db[_0x1fb347[_0xdd98('0x22')]],'as':_0x1fb347['as'],'attributes':_0x1fb347[_0xdd98('0x1e')],'include':_0x1fb347[_0xdd98('0x20')]?_['map'](_0x1fb347[_0xdd98('0x20')],function(_0x393266){return{'model':db[_0x393266[_0xdd98('0x22')]],'as':_0x393266['as'],'attributes':_0x393266[_0xdd98('0x1e')],'include':_0x393266['include']?_[_0xdd98('0x21')](_0x393266[_0xdd98('0x20')],function(_0x391c8b){return{'model':db[_0x391c8b['model']],'as':_0x391c8b['as'],'attributes':_0x391c8b['attributes']};}):[]};}):[]};}):[]:[]})[_0xdd98('0xd')](function(_0x4a78e0){logger[_0xdd98('0xe')]('ShowMailAccount',_0x31c5cd);logger[_0xdd98('0x11')](_0xdd98('0x23'),_0x31c5cd,JSON[_0xdd98('0x13')](_0x4a78e0));_0x5f56c8(_0x4a78e0);})[_0xdd98('0x18')](function(_0x27b84c){logger[_0xdd98('0x15')](_0xdd98('0x23'),_0x27b84c[_0xdd98('0x16')],_0x31c5cd);_0x342ced(_0x6167c5[_0xdd98('0x15')](0x1f4,_0x27b84c[_0xdd98('0x16')]));});});};exports[_0xdd98('0x26')]=function(_0x23cda3){var _0x48ee7e=this;return new Promise(function(_0x1878c0,_0x8c7764){var _0x1495f4={'body':_0x23cda3[_0xdd98('0x27')],'channel':_0xdd98('0x28')};var _0x272a5a=_[_0xdd98('0x29')](_[_0xdd98('0x2a')](db[_0xdd98('0x2b')][_0xdd98('0x2c')]),[_0xdd98('0x2d'),'updatedAt',_0xdd98('0x2e'),_0xdd98('0x2f')]);var _0x33d5e3=![];if(_0x23cda3['body']['id']){delete _0x23cda3['body']['id'];}if(_[_0xdd98('0x30')](_0x23cda3[_0xdd98('0x27')][_0xdd98('0x31')])){return _0x8c7764(_0x48ee7e[_0xdd98('0x15')](0x1f4,'from\x20is\x20mandatory'));}if(_['isNil'](_0x23cda3['body'][_0xdd98('0x27')])||_0x23cda3[_0xdd98('0x27')][_0xdd98('0x27')]===''){return _0x8c7764(_0x48ee7e[_0xdd98('0x15')](0x1f4,_0xdd98('0x32')));}if(_[_0xdd98('0x30')](_0x23cda3['body'][_0xdd98('0x33')])){return _0x8c7764(_0x48ee7e[_0xdd98('0x15')](0x1f4,'mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x272a5a));}if(!_['includes'](_0x272a5a,_0x23cda3['body'][_0xdd98('0x33')])){return _0x8c7764(_0x48ee7e['error'](0x1f4,_0xdd98('0x34')+_0x272a5a));}var _0x1910a5={};_0x1910a5[_0x23cda3[_0xdd98('0x27')]['mapKey']]=_0x23cda3[_0xdd98('0x27')][_0xdd98('0x31')];return db[_0xdd98('0x1a')]['find']({'where':{'id':_0x23cda3['account']['id']},'include':[{'model':db[_0xdd98('0x35')],'as':'List','include':[{'model':db[_0xdd98('0x2b')],'as':'Contacts','where':_0x1910a5,'limit':0x1,'order':[['updatedAt','DESC']]}]},{'model':db['MailApplication'],'as':'Applications'},{'model':db[_0xdd98('0x36')],'as':_0xdd98('0x37')}]})[_0xdd98('0xd')](function(_0x1a2098){if(_0x1a2098&&_0x1a2098['List']){var _0x28394b=_0x1a2098['get']({'plain':!![]});_0x1495f4[_0xdd98('0x38')]=_['omit'](_0x28394b,[_0xdd98('0x39'),_0xdd98('0x3a')]);_0x1495f4[_0xdd98('0x3b')]=_0x28394b[_0xdd98('0x39')];_0x1495f4['list']=_0x28394b[_0xdd98('0x3a')];_0x1495f4[_0xdd98('0x3b')]=_['orderBy'](_0x1495f4[_0xdd98('0x3b')],[_0xdd98('0x3c')],[_0xdd98('0x3d')]);if(_0x1495f4[_0xdd98('0x38')]&&_0x1495f4[_0xdd98('0x38')]['autoclose']){_0x1495f4[_0xdd98('0x3b')][_0xdd98('0x3e')]({'id':0x0,'priority':_0x1495f4[_0xdd98('0x3b')][_0xdd98('0x3f')]+0x1,'app':'close','appdata':'autoclose','interval':_0xdd98('0x40')});}if(_0x1495f4[_0xdd98('0x38')]['Applications']){delete _0x1495f4['account'][_0xdd98('0x39')];}if(_0x1495f4[_0xdd98('0x38')][_0xdd98('0x3a')]){delete _0x1495f4[_0xdd98('0x38')][_0xdd98('0x3a')];}if(_0x28394b['List'][_0xdd98('0x41')][_0xdd98('0x3f')]){return _0x28394b[_0xdd98('0x3a')][_0xdd98('0x41')][0x0];}var _0x5d5010=_[_0xdd98('0x42')](_0x23cda3['body'],{'firstName':_0x23cda3['body'][_0xdd98('0x31')],'ListId':_0x28394b['ListId']});_0x5d5010[_0x23cda3[_0xdd98('0x27')][_0xdd98('0x33')]]=_0x23cda3[_0xdd98('0x27')]['from'];return db[_0xdd98('0x2b')]['create'](_0x5d5010);}else{throw new Error(_0xdd98('0x43'));}})[_0xdd98('0xd')](function(_0x48449f){_0x1495f4[_0xdd98('0x44')]=_0x48449f;if(_0x48449f){if(!_0x23cda3['body'][_0xdd98('0x16')]['messageId']){_0x23cda3['body']['message'][_0xdd98('0x45')]=rs[_0xdd98('0x46')]()+'\x20'+_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x31')];}var _0x414c26={'ContactId':_0x48449f['id'],'MailAccountId':_0x23cda3[_0xdd98('0x38')]['id'],'inReplyTo':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['messageId'],'to':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x31')],'cc':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['cc'],'subject':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x47')],'attach':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x48')],'lastMsgAt':moment()[_0xdd98('0x49')](_0xdd98('0x4a')),'lastMsgDirection':'in','lastMsgBody':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x27')]};return db[_0xdd98('0x4b')][_0xdd98('0x24')]({'where':{'closed':![],'MailAccountId':_0x23cda3['account']['id']},'include':[{'model':db[_0xdd98('0x4c')],'as':_0xdd98('0x4d'),'attributes':[_0xdd98('0x45')],'where':{'messageId':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x4e')]}}]})[_0xdd98('0xd')](function(_0x5c3fad){if(_0x5c3fad){return[_0x5c3fad,![]];}return db[_0xdd98('0x4b')]['create'](_0x414c26)[_0xdd98('0xd')](function(_0x4078d8){return[_0x4078d8,!![]];});});}else{throw new Error(_0xdd98('0x4f'));}})['spread'](function(_0x182842,_0x26055f){if(_0x182842){_0x33d5e3=_0x26055f;if(!_0x26055f){return _0x182842[_0xdd98('0x50')]({'inReplyTo':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['messageId'],'to':_0x23cda3[_0xdd98('0x27')]['message'][_0xdd98('0x31')],'cc':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['cc'],'subject':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x47')],'attach':_0x182842[_0xdd98('0x48')]?_0x182842[_0xdd98('0x48')]:_0x23cda3[_0xdd98('0x27')]['message'][_0xdd98('0x48')],'substatus':null,'substatusAt':moment()[_0xdd98('0x49')](_0xdd98('0x4a')),'lastMsgAt':moment()[_0xdd98('0x49')](_0xdd98('0x4a')),'lastMsgDirection':'in','lastMsgBody':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x27')]});}else{return _0x182842;}}})[_0xdd98('0xd')](function(_0x153ca5){_0x1495f4[_0xdd98('0x51')]=_0x153ca5['get']({'plain':!![]});_0x1495f4[_0xdd98('0x51')]['created']=_0x33d5e3;return db[_0xdd98('0x4c')][_0xdd98('0x52')]({'body':_0x23cda3['body'][_0xdd98('0x27')],'MailAccountId':_0x23cda3[_0xdd98('0x38')]['id'],'MailInteractionId':_0x153ca5['id'],'direction':'in','ContactId':_0x1495f4[_0xdd98('0x44')]['id'],'messageId':_0x23cda3[_0xdd98('0x27')]['message'][_0xdd98('0x45')],'from':_0x23cda3[_0xdd98('0x27')]['message'][_0xdd98('0x31')],'to':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['to'],'cc':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['cc'],'subject':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['subject'],'attach':_0x23cda3[_0xdd98('0x27')]['message'][_0xdd98('0x48')],'Attachments':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x53')],'originTo':_0x23cda3[_0xdd98('0x27')]['message'][_0xdd98('0x54')],'originCc':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')][_0xdd98('0x55')],'bcc':_0x23cda3[_0xdd98('0x27')][_0xdd98('0x16')]['bcc']},{'include':[{'model':db['Attachment'],'as':'Attachments'}]});})['then'](function(_0x3b0054){_0x1495f4[_0xdd98('0x16')]=_0x3b0054;if(_0x1495f4['interaction'][_0xdd98('0x56')]){return db[_0xdd98('0x57')][_0xdd98('0x24')]({'attributes':['id',_0xdd98('0x58')],'where':{'id':_0x1495f4[_0xdd98('0x51')][_0xdd98('0x56')]}})[_0xdd98('0xd')](function(_0x17598d){if(_0x17598d){_0x1495f4['applications']['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x17598d[_0xdd98('0x58')]+','+(_0x1495f4[_0xdd98('0x38')]['waitForTheAssignedAgent']||0xa),'interval':_0xdd98('0x40')});}return respondWithRpcPromise(_0xdd98('0x59'),'startRouting',_0x1495f4);});}return respondWithRpcPromise(_0xdd98('0x59'),_0xdd98('0x5a'),_0x1495f4);})[_0xdd98('0xd')](function(_0x3bfa81){_0x1878c0(_0x3bfa81);})['catch'](function(_0x3e680c){_0x8c7764(_0x48ee7e[_0xdd98('0x15')](0x1f4,_0x3e680c[_0xdd98('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.socket.js b/server/api/mailAccount/mailAccount.socket.js
index 2bcdf32..d93c9b3 100644
--- a/server/api/mailAccount/mailAccount.socket.js
+++ b/server/api/mailAccount/mailAccount.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdfb3=['remove','emit','removeListener','register','length','save'];(function(_0x938f4,_0xd7996c){var _0x40ba8d=function(_0x3af094){while(--_0x3af094){_0x938f4['push'](_0x938f4['shift']());}};_0x40ba8d(++_0xd7996c);}(_0xdfb3,0x167));var _0x3dfb=function(_0x3ce8c9,_0x2ccfaa){_0x3ce8c9=_0x3ce8c9-0x0;var _0x184215=_0xdfb3[_0x3ce8c9];return _0x184215;};'use strict';var MailAccountEvents=require('./mailAccount.events');var events=[_0x3dfb('0x0'),_0x3dfb('0x1'),'update'];function createListener(_0x2522d7,_0x15ee77){return function(_0x5ba6f7){_0x15ee77[_0x3dfb('0x2')](_0x2522d7,_0x5ba6f7);};}function removeListener(_0x40342e,_0x36550f){return function(){MailAccountEvents[_0x3dfb('0x3')](_0x40342e,_0x36550f);};}exports[_0x3dfb('0x4')]=function(_0x324687){for(var _0x52b14f=0x0,_0x96c09b=events[_0x3dfb('0x5')];_0x52b14f<_0x96c09b;_0x52b14f++){var _0x4bbfd8=events[_0x52b14f];var _0x3c1be6=createListener('mailAccount:'+_0x4bbfd8,_0x324687);MailAccountEvents['on'](_0x4bbfd8,_0x3c1be6);}};
\ No newline at end of file
+var _0x1626=['register','length','mailAccount:','./mailAccount.events','remove','update','emit','removeListener'];(function(_0x4b4517,_0x5dbf6a){var _0x48278b=function(_0x4592ea){while(--_0x4592ea){_0x4b4517['push'](_0x4b4517['shift']());}};_0x48278b(++_0x5dbf6a);}(_0x1626,0xc3));var _0x6162=function(_0x146484,_0x27a7f0){_0x146484=_0x146484-0x0;var _0x4c7aa3=_0x1626[_0x146484];return _0x4c7aa3;};'use strict';var MailAccountEvents=require(_0x6162('0x0'));var events=['save',_0x6162('0x1'),_0x6162('0x2')];function createListener(_0x7209,_0x27fa52){return function(_0x235949){_0x27fa52[_0x6162('0x3')](_0x7209,_0x235949);};}function removeListener(_0xcc5e78,_0x5236c2){return function(){MailAccountEvents[_0x6162('0x4')](_0xcc5e78,_0x5236c2);};}exports[_0x6162('0x5')]=function(_0x52ef71){for(var _0x4a9497=0x0,_0x271e7e=events[_0x6162('0x6')];_0x4a9497<_0x271e7e;_0x4a9497++){var _0x28d3e4=events[_0x4a9497];var _0x46cd86=createListener(_0x6162('0x7')+_0x28d3e4,_0x52ef71);MailAccountEvents['on'](_0x28d3e4,_0x46cd86);}};
\ No newline at end of file
diff --git a/server/api/mailApplication/index.js b/server/api/mailApplication/index.js
index 9b58aa5..6152c5c 100644
--- a/server/api/mailApplication/index.js
+++ b/server/api/mailApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x008c=['exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailApplication.controller','get','/:id','isAuthenticated','show','put','delete','destroy'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x008c,0x188));var _0xc008=function(_0x41bd0d,_0x283017){_0x41bd0d=_0x41bd0d-0x0;var _0x5a4f5d=_0x008c[_0x41bd0d];return _0x5a4f5d;};'use strict';var multer=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var path=require(_0xc008('0x2'));var timeout=require(_0xc008('0x3'));var express=require(_0xc008('0x4'));var router=express['Router']();var auth=require(_0xc008('0x5'));var interaction=require(_0xc008('0x6'));var config=require(_0xc008('0x7'));var controller=require(_0xc008('0x8'));router[_0xc008('0x9')](_0xc008('0xa'),auth[_0xc008('0xb')](),controller[_0xc008('0xc')]);router[_0xc008('0xd')]('/:id',auth[_0xc008('0xb')](),controller['update']);router[_0xc008('0xe')]('/:id',auth['isAuthenticated'](),controller[_0xc008('0xf')]);module[_0xc008('0x10')]=router;
\ No newline at end of file
+var _0x6a24=['util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./mailApplication.controller','get','isAuthenticated','show','update','/:id','destroy','multer'];(function(_0x20c304,_0x2fd01c){var _0x700473=function(_0x1e145e){while(--_0x1e145e){_0x20c304['push'](_0x20c304['shift']());}};_0x700473(++_0x2fd01c);}(_0x6a24,0xd1));var _0x46a2=function(_0x47b4dc,_0x4e9ad4){_0x47b4dc=_0x47b4dc-0x0;var _0x1dff60=_0x6a24[_0x47b4dc];return _0x1dff60;};'use strict';var multer=require(_0x46a2('0x0'));var util=require(_0x46a2('0x1'));var path=require('path');var timeout=require(_0x46a2('0x2'));var express=require(_0x46a2('0x3'));var router=express[_0x46a2('0x4')]();var auth=require(_0x46a2('0x5'));var interaction=require(_0x46a2('0x6'));var config=require('../../config/environment');var controller=require(_0x46a2('0x7'));router[_0x46a2('0x8')]('/:id',auth[_0x46a2('0x9')](),controller[_0x46a2('0xa')]);router['put']('/:id',auth[_0x46a2('0x9')](),controller[_0x46a2('0xb')]);router['delete'](_0x46a2('0xc'),auth['isAuthenticated'](),controller[_0x46a2('0xd')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.attributes.js b/server/api/mailApplication/mailApplication.attributes.js
index 4d42647..62daf18 100644
--- a/server/api/mailApplication/mailApplication.attributes.js
+++ b/server/api/mailApplication/mailApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeec6=['noop','TEXT','*,*,*,*','sequelize','STRING'];(function(_0x38add1,_0x44b935){var _0x234c6f=function(_0x150c98){while(--_0x150c98){_0x38add1['push'](_0x38add1['shift']());}};_0x234c6f(++_0x44b935);}(_0xeec6,0x125));var _0x6eec=function(_0x287528,_0x2fbba7){_0x287528=_0x287528-0x0;var _0xc05e28=_0xeec6[_0x287528];return _0xc05e28;};'use strict';var Sequelize=require(_0x6eec('0x0'));module['exports']={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x6eec('0x1')],'allowNull':![],'defaultValue':_0x6eec('0x2')},'appdata':{'type':Sequelize[_0x6eec('0x3')]()},'description':{'type':Sequelize[_0x6eec('0x1')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x6eec('0x4')}};
\ No newline at end of file
+var _0x7aa0=['*,*,*,*','sequelize','exports','INTEGER','STRING'];(function(_0x164eca,_0x555e28){var _0x2ce562=function(_0x148ca6){while(--_0x148ca6){_0x164eca['push'](_0x164eca['shift']());}};_0x2ce562(++_0x555e28);}(_0x7aa0,0xa1));var _0x07aa=function(_0x218426,_0x95fcc7){_0x218426=_0x218426-0x0;var _0x25f311=_0x7aa0[_0x218426];return _0x25f311;};'use strict';var Sequelize=require(_0x07aa('0x0'));module[_0x07aa('0x1')]={'priority':{'type':Sequelize[_0x07aa('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x07aa('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x07aa('0x3')]},'interval':{'type':Sequelize[_0x07aa('0x3')],'defaultValue':_0x07aa('0x4')}};
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.controller.js b/server/api/mailApplication/mailApplication.controller.js
index 329899e..ebfdcf1 100644
--- a/server/api/mailApplication/mailApplication.controller.js
+++ b/server/api/mailApplication/mailApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7601=['lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','limit','Content-Range','reject','update','destroy','then','sendStatus','stack','send','params','model','keys','MailApplication','rawAttributes','query','filters','intersection','attributes','fields','length','include','merge','body','find','catch','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox'];(function(_0x239d6d,_0x3548d7){var _0x42890a=function(_0x4e2605){while(--_0x4e2605){_0x239d6d['push'](_0x239d6d['shift']());}};_0x42890a(++_0x3548d7);}(_0x7601,0x1d3));var _0x1760=function(_0x5e3c4c,_0x570558){_0x5e3c4c=_0x5e3c4c-0x0;var _0x33064e=_0x7601[_0x5e3c4c];return _0x33064e;};'use strict';var pdf=require(_0x1760('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x1760('0x1'));var zipdir=require(_0x1760('0x2'));var jsonpatch=require(_0x1760('0x3'));var rp=require(_0x1760('0x4'));var moment=require(_0x1760('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x1760('0x6'));var util=require(_0x1760('0x7'));var path=require(_0x1760('0x8'));var sox=require(_0x1760('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x1760('0xa'));var squel=require(_0x1760('0xb'));var crypto=require('crypto');var jsforce=require(_0x1760('0xc'));var deskjs=require(_0x1760('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x1760('0xe'));var Redis=require(_0x1760('0xf'));var authService=require(_0x1760('0x10'));var qs=require(_0x1760('0x11'));var hardwareService=require(_0x1760('0x12'));var logger=require(_0x1760('0x13'))(_0x1760('0x14'));var utils=require(_0x1760('0x15'));var config=require(_0x1760('0x16'));var db=require(_0x1760('0x17'))['db'];function respondWithStatusCode(_0x2db94c,_0x49787){_0x49787=_0x49787||0xcc;return function(_0x4e7eb1){if(_0x4e7eb1){return _0x2db94c['sendStatus'](_0x49787);}return _0x2db94c[_0x1760('0x18')](_0x49787)[_0x1760('0x19')]();};}function respondWithResult(_0x1c7022,_0xf568b5){_0xf568b5=_0xf568b5||0xc8;return function(_0xad9651){if(_0xad9651){return _0x1c7022[_0x1760('0x18')](_0xf568b5)[_0x1760('0x1a')](_0xad9651);}};}function respondWithFilteredResult(_0x358af6,_0x48a23b){return function(_0x2443bf){if(_0x2443bf){var _0x2f07c5=_0x2443bf['count'],_0x5d0ea9=_0x48a23b[_0x1760('0x1b')],_0x536931=_0x48a23b['offset']+_0x48a23b[_0x1760('0x1c')],_0x47e771;if(_0x536931>=_0x2f07c5){_0x536931=_0x2f07c5;_0x47e771=0xc8;}else{_0x47e771=0xce;}_0x358af6['status'](_0x47e771);return _0x358af6['set'](_0x1760('0x1d'),_0x5d0ea9+'-'+_0x536931+'/'+_0x2f07c5)[_0x1760('0x1a')](_0x2443bf);}return null;};}function patchUpdates(_0x477ec2){return function(_0x4d5641){try{jsonpatch['apply'](_0x4d5641,_0x477ec2,!![]);}catch(_0x44d540){return BPromise[_0x1760('0x1e')](_0x44d540);}return _0x4d5641['save']();};}function saveUpdates(_0x50516e,_0x149d63){return function(_0xe939fc){if(_0xe939fc){return _0xe939fc[_0x1760('0x1f')](_0x50516e)['then'](function(_0x38e44d){return _0x38e44d;});}return null;};}function removeEntity(_0x10ea7f,_0xff25fb){return function(_0x216000){if(_0x216000){return _0x216000[_0x1760('0x20')]()[_0x1760('0x21')](function(){_0x10ea7f['status'](0xcc)[_0x1760('0x19')]();});}};}function handleEntityNotFound(_0x54debf,_0x39a918){return function(_0x489086){if(!_0x489086){_0x54debf[_0x1760('0x22')](0x194);}return _0x489086;};}function handleError(_0x32eb19,_0x437d2e){_0x437d2e=_0x437d2e||0x1f4;return function(_0xa4c368){logger['error'](_0xa4c368[_0x1760('0x23')]);if(_0xa4c368['name']){delete _0xa4c368['name'];}_0x32eb19[_0x1760('0x18')](_0x437d2e)[_0x1760('0x24')](_0xa4c368);};}exports['show']=function(_0x23380c,_0x292a19){var _0x4bc0a1={'raw':!![],'where':{'id':_0x23380c[_0x1760('0x25')]['id']}},_0x5dc013={};_0x5dc013[_0x1760('0x26')]=_[_0x1760('0x27')](db[_0x1760('0x28')][_0x1760('0x29')]);_0x5dc013[_0x1760('0x2a')]=_[_0x1760('0x27')](_0x23380c[_0x1760('0x2a')]);_0x5dc013[_0x1760('0x2b')]=_[_0x1760('0x2c')](_0x5dc013[_0x1760('0x26')],_0x5dc013[_0x1760('0x2a')]);_0x4bc0a1[_0x1760('0x2d')]=_['intersection'](_0x5dc013[_0x1760('0x26')],qs[_0x1760('0x2e')](_0x23380c[_0x1760('0x2a')][_0x1760('0x2e')]));_0x4bc0a1[_0x1760('0x2d')]=_0x4bc0a1[_0x1760('0x2d')][_0x1760('0x2f')]?_0x4bc0a1['attributes']:_0x5dc013[_0x1760('0x26')];if(_0x23380c[_0x1760('0x2a')]['includeAll']){_0x4bc0a1[_0x1760('0x30')]=[{'all':!![]}];}_0x4bc0a1=_[_0x1760('0x31')]({},_0x4bc0a1,_0x23380c['options']);return db[_0x1760('0x28')]['find'](_0x4bc0a1)[_0x1760('0x21')](handleEntityNotFound(_0x292a19,null))['then'](respondWithResult(_0x292a19,null))['catch'](handleError(_0x292a19,null));};exports[_0x1760('0x1f')]=function(_0x185ce8,_0x3f1b55){if(_0x185ce8[_0x1760('0x32')]['id']){delete _0x185ce8[_0x1760('0x32')]['id'];}return db[_0x1760('0x28')][_0x1760('0x33')]({'where':{'id':_0x185ce8['params']['id']}})[_0x1760('0x21')](handleEntityNotFound(_0x3f1b55,null))[_0x1760('0x21')](saveUpdates(_0x185ce8[_0x1760('0x32')],null))['then'](respondWithResult(_0x3f1b55,null))['catch'](handleError(_0x3f1b55,null));};exports['destroy']=function(_0x19efe8,_0x3335f4){return db['MailApplication'][_0x1760('0x33')]({'where':{'id':_0x19efe8[_0x1760('0x25')]['id']}})['then'](handleEntityNotFound(_0x3335f4,null))[_0x1760('0x21')](removeEntity(_0x3335f4,null))[_0x1760('0x34')](handleError(_0x3335f4,null));};
\ No newline at end of file
+var _0x87e5=['end','error','name','send','params','model','MailApplication','rawAttributes','query','keys','filters','intersection','attributes','fields','length','includeAll','include','merge','find','catch','update','body','html-pdf','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','limit','set','Content-Range','apply','reject','save','then','destroy'];(function(_0x41447d,_0x4d7555){var _0x4ae3f1=function(_0x1c8170){while(--_0x1c8170){_0x41447d['push'](_0x41447d['shift']());}};_0x4ae3f1(++_0x4d7555);}(_0x87e5,0xc1));var _0x587e=function(_0x1d3046,_0x8b14e1){_0x1d3046=_0x1d3046-0x0;var _0x3b9b62=_0x87e5[_0x1d3046];return _0x3b9b62;};'use strict';var pdf=require(_0x587e('0x0'));var emlformat=require(_0x587e('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x587e('0x2'));var jsonpatch=require(_0x587e('0x3'));var rp=require('request-promise');var moment=require(_0x587e('0x4'));var BPromise=require(_0x587e('0x5'));var Mustache=require(_0x587e('0x6'));var util=require(_0x587e('0x7'));var path=require(_0x587e('0x8'));var sox=require(_0x587e('0x9'));var csv=require('to-csv');var ejs=require(_0x587e('0xa'));var fs=require('fs');var _=require(_0x587e('0xb'));var squel=require(_0x587e('0xc'));var crypto=require(_0x587e('0xd'));var jsforce=require(_0x587e('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x587e('0xf'));var qs=require(_0x587e('0x10'));var hardwareService=require(_0x587e('0x11'));var logger=require(_0x587e('0x12'))(_0x587e('0x13'));var utils=require(_0x587e('0x14'));var config=require(_0x587e('0x15'));var db=require(_0x587e('0x16'))['db'];function respondWithStatusCode(_0x5b6e2a,_0xa47857){_0xa47857=_0xa47857||0xcc;return function(_0x5d16b8){if(_0x5d16b8){return _0x5b6e2a[_0x587e('0x17')](_0xa47857);}return _0x5b6e2a[_0x587e('0x18')](_0xa47857)['end']();};}function respondWithResult(_0x5cb127,_0x193cb8){_0x193cb8=_0x193cb8||0xc8;return function(_0x590f4e){if(_0x590f4e){return _0x5cb127[_0x587e('0x18')](_0x193cb8)[_0x587e('0x19')](_0x590f4e);}};}function respondWithFilteredResult(_0x2c6eeb,_0x27bb2e){return function(_0x52e934){if(_0x52e934){var _0x492df3=_0x52e934['count'],_0x168dfa=_0x27bb2e[_0x587e('0x1a')],_0x4898ee=_0x27bb2e[_0x587e('0x1a')]+_0x27bb2e[_0x587e('0x1b')],_0x24d442;if(_0x4898ee>=_0x492df3){_0x4898ee=_0x492df3;_0x24d442=0xc8;}else{_0x24d442=0xce;}_0x2c6eeb[_0x587e('0x18')](_0x24d442);return _0x2c6eeb[_0x587e('0x1c')](_0x587e('0x1d'),_0x168dfa+'-'+_0x4898ee+'/'+_0x492df3)[_0x587e('0x19')](_0x52e934);}return null;};}function patchUpdates(_0x55db37){return function(_0x451c4f){try{jsonpatch[_0x587e('0x1e')](_0x451c4f,_0x55db37,!![]);}catch(_0xd8d49c){return BPromise[_0x587e('0x1f')](_0xd8d49c);}return _0x451c4f[_0x587e('0x20')]();};}function saveUpdates(_0x4bc007,_0x1b5c49){return function(_0x49648e){if(_0x49648e){return _0x49648e['update'](_0x4bc007)[_0x587e('0x21')](function(_0x38627b){return _0x38627b;});}return null;};}function removeEntity(_0x17276b,_0x5f56d8){return function(_0x14baa0){if(_0x14baa0){return _0x14baa0[_0x587e('0x22')]()[_0x587e('0x21')](function(){_0x17276b[_0x587e('0x18')](0xcc)[_0x587e('0x23')]();});}};}function handleEntityNotFound(_0x39a945,_0x3e1e78){return function(_0x5efc68){if(!_0x5efc68){_0x39a945['sendStatus'](0x194);}return _0x5efc68;};}function handleError(_0x4e5a1c,_0x54834c){_0x54834c=_0x54834c||0x1f4;return function(_0x2f5547){logger[_0x587e('0x24')](_0x2f5547['stack']);if(_0x2f5547['name']){delete _0x2f5547[_0x587e('0x25')];}_0x4e5a1c['status'](_0x54834c)[_0x587e('0x26')](_0x2f5547);};}exports['show']=function(_0x26fb05,_0x545fa5){var _0x190398={'raw':!![],'where':{'id':_0x26fb05[_0x587e('0x27')]['id']}},_0x263f5d={};_0x263f5d[_0x587e('0x28')]=_['keys'](db[_0x587e('0x29')][_0x587e('0x2a')]);_0x263f5d[_0x587e('0x2b')]=_[_0x587e('0x2c')](_0x26fb05[_0x587e('0x2b')]);_0x263f5d[_0x587e('0x2d')]=_[_0x587e('0x2e')](_0x263f5d['model'],_0x263f5d[_0x587e('0x2b')]);_0x190398[_0x587e('0x2f')]=_[_0x587e('0x2e')](_0x263f5d[_0x587e('0x28')],qs['fields'](_0x26fb05[_0x587e('0x2b')][_0x587e('0x30')]));_0x190398[_0x587e('0x2f')]=_0x190398[_0x587e('0x2f')][_0x587e('0x31')]?_0x190398[_0x587e('0x2f')]:_0x263f5d[_0x587e('0x28')];if(_0x26fb05[_0x587e('0x2b')][_0x587e('0x32')]){_0x190398[_0x587e('0x33')]=[{'all':!![]}];}_0x190398=_[_0x587e('0x34')]({},_0x190398,_0x26fb05['options']);return db[_0x587e('0x29')][_0x587e('0x35')](_0x190398)['then'](handleEntityNotFound(_0x545fa5,null))[_0x587e('0x21')](respondWithResult(_0x545fa5,null))[_0x587e('0x36')](handleError(_0x545fa5,null));};exports[_0x587e('0x37')]=function(_0xa4d188,_0x2e50b3){if(_0xa4d188['body']['id']){delete _0xa4d188[_0x587e('0x38')]['id'];}return db[_0x587e('0x29')]['find']({'where':{'id':_0xa4d188[_0x587e('0x27')]['id']}})[_0x587e('0x21')](handleEntityNotFound(_0x2e50b3,null))[_0x587e('0x21')](saveUpdates(_0xa4d188[_0x587e('0x38')],null))[_0x587e('0x21')](respondWithResult(_0x2e50b3,null))[_0x587e('0x36')](handleError(_0x2e50b3,null));};exports[_0x587e('0x22')]=function(_0x40537d,_0x5405da){return db[_0x587e('0x29')][_0x587e('0x35')]({'where':{'id':_0x40537d[_0x587e('0x27')]['id']}})[_0x587e('0x21')](handleEntityNotFound(_0x5405da,null))[_0x587e('0x21')](removeEntity(_0x5405da,null))[_0x587e('0x36')](handleError(_0x5405da,null));};
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.model.js b/server/api/mailApplication/mailApplication.model.js
index 6aad3e0..2459832 100644
--- a/server/api/mailApplication/mailApplication.model.js
+++ b/server/api/mailApplication/mailApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7633=['moment','request-promise','path','../../config/environment','./mailApplication.attributes','define','MailApplication','mail_applications','lodash','util','../../config/logger','api'];(function(_0x28e72f,_0x28c377){var _0x2ded9f=function(_0x46d25c){while(--_0x46d25c){_0x28e72f['push'](_0x28e72f['shift']());}};_0x2ded9f(++_0x28c377);}(_0x7633,0x1c4));var _0x3763=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x7633[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x3763('0x0'));var util=require(_0x3763('0x1'));var logger=require(_0x3763('0x2'))(_0x3763('0x3'));var moment=require(_0x3763('0x4'));var BPromise=require('bluebird');var rp=require(_0x3763('0x5'));var fs=require('fs');var path=require(_0x3763('0x6'));var rimraf=require('rimraf');var config=require(_0x3763('0x7'));var attributes=require(_0x3763('0x8'));module['exports']=function(_0x50585d,_0x396634){return _0x50585d[_0x3763('0x9')](_0x3763('0xa'),attributes,{'tableName':_0x3763('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xa2a1=['exports','define','MailApplication','mail_applications','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./mailApplication.attributes'];(function(_0x58d6cd,_0x1fa623){var _0x4098cb=function(_0xfd3e9f){while(--_0xfd3e9f){_0x58d6cd['push'](_0x58d6cd['shift']());}};_0x4098cb(++_0x1fa623);}(_0xa2a1,0xf6));var _0x1a2a=function(_0x45d7dc,_0x14c1bc){_0x45d7dc=_0x45d7dc-0x0;var _0x3aa914=_0xa2a1[_0x45d7dc];return _0x3aa914;};'use strict';var _=require(_0x1a2a('0x0'));var util=require('util');var logger=require(_0x1a2a('0x1'))(_0x1a2a('0x2'));var moment=require('moment');var BPromise=require(_0x1a2a('0x3'));var rp=require(_0x1a2a('0x4'));var fs=require('fs');var path=require(_0x1a2a('0x5'));var rimraf=require(_0x1a2a('0x6'));var config=require(_0x1a2a('0x7'));var attributes=require(_0x1a2a('0x8'));module[_0x1a2a('0x9')]=function(_0x75cfdb,_0xd7b1af){return _0x75cfdb[_0x1a2a('0xa')](_0x1a2a('0xb'),attributes,{'tableName':_0x1a2a('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x1a2a('0xd'),'collate':_0x1a2a('0xe')});};
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.rpc.js b/server/api/mailApplication/mailApplication.rpc.js
index b4d56d8..bfdb0f3 100644
--- a/server/api/mailApplication/mailApplication.rpc.js
+++ b/server/api/mailApplication/mailApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['message','request\x20sent','result','catch','MailApplication','update','body','options','raw','where','attributes','limit','then','UpdateMailApplication','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','MailApplication,\x20%s,\x20%s','debug','stringify','error','code'];(function(_0x6d39c,_0x41a885){var _0x5b41b8=function(_0x33d1ab){while(--_0x33d1ab){_0x6d39c['push'](_0x6d39c['shift']());}};_0x5b41b8(++_0x41a885);}(_0x7a54,0x106));var _0x47a5=function(_0xc8d9ba,_0x455b09){_0xc8d9ba=_0xc8d9ba-0x0;var _0xc6b25=_0x7a54[_0xc8d9ba];return _0xc6b25;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['UpdateMailApplication']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5247fd['options']?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x1a')]||null:null,'attributes':_0x5247fd['options']?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x1b')]||null:null,'limit':_0x5247fd[_0x47a5('0x18')]?_0x5247fd['options'][_0x47a5('0x1c')]||null:null})[_0x47a5('0x1d')](function(_0x23db32){logger[_0x47a5('0xb')]('UpdateMailApplication',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1e'),_0x5247fd,JSON['stringify'](_0x23db32));_0xaf70a6(_0x23db32);})[_0x47a5('0x14')](function(_0xc4cd63){logger[_0x47a5('0xf')](_0x47a5('0x1e'),_0xc4cd63[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xc4cd63['message']));});});};
\ No newline at end of file
+var _0x7a54=['message','request\x20sent','result','catch','MailApplication','update','body','options','raw','where','attributes','limit','then','UpdateMailApplication','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','MailApplication,\x20%s,\x20%s','debug','stringify','error','code'];(function(_0x243f89,_0x4b5a79){var _0x4f7d65=function(_0x148f0c){while(--_0x148f0c){_0x243f89['push'](_0x243f89['shift']());}};_0x4f7d65(++_0x4b5a79);}(_0x7a54,0x106));var _0x47a5=function(_0x411ff0,_0x119f3a){_0x411ff0=_0x411ff0-0x0;var _0x3eb042=_0x7a54[_0x411ff0];return _0x3eb042;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['UpdateMailApplication']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5247fd['options']?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x1a')]||null:null,'attributes':_0x5247fd['options']?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x1b')]||null:null,'limit':_0x5247fd[_0x47a5('0x18')]?_0x5247fd['options'][_0x47a5('0x1c')]||null:null})[_0x47a5('0x1d')](function(_0x23db32){logger[_0x47a5('0xb')]('UpdateMailApplication',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1e'),_0x5247fd,JSON['stringify'](_0x23db32));_0xaf70a6(_0x23db32);})[_0x47a5('0x14')](function(_0xc4cd63){logger[_0x47a5('0xf')](_0x47a5('0x1e'),_0xc4cd63[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xc4cd63['message']));});});};
\ No newline at end of file
diff --git a/server/api/mailInteraction/index.js b/server/api/mailInteraction/index.js
index d12c909..fb53615 100644
--- a/server/api/mailInteraction/index.js
+++ b/server/api/mailInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6aa7=['mailinteraction:destroy','destroy','removeTags','exports','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./mailInteraction.controller','index','/describe','isAuthenticated','describe','/:id','show','/:id/messages','getMessages','get','/:id/download','download','post','create','addMessage','/:id/tags','tracked','addTags','mail','update'];(function(_0x100e36,_0x4da225){var _0x1df0c9=function(_0xe4b84f){while(--_0xe4b84f){_0x100e36['push'](_0x100e36['shift']());}};_0x1df0c9(++_0x4da225);}(_0x6aa7,0x178));var _0x76aa=function(_0x45911a,_0x10f08a){_0x45911a=_0x45911a-0x0;var _0x23b7d7=_0x6aa7[_0x45911a];return _0x23b7d7;};'use strict';var multer=require(_0x76aa('0x0'));var util=require('util');var path=require(_0x76aa('0x1'));var timeout=require(_0x76aa('0x2'));var express=require(_0x76aa('0x3'));var router=express[_0x76aa('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x76aa('0x5'));var config=require(_0x76aa('0x6'));var controller=require(_0x76aa('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x76aa('0x8')]);router['get'](_0x76aa('0x9'),auth[_0x76aa('0xa')](),controller[_0x76aa('0xb')]);router['get'](_0x76aa('0xc'),auth[_0x76aa('0xa')](),controller[_0x76aa('0xd')]);router['get'](_0x76aa('0xe'),auth[_0x76aa('0xa')](),controller[_0x76aa('0xf')]);router[_0x76aa('0x10')](_0x76aa('0x11'),auth[_0x76aa('0xa')](),controller[_0x76aa('0x12')]);router[_0x76aa('0x13')]('/',auth[_0x76aa('0xa')](),controller[_0x76aa('0x14')]);router['post'](_0x76aa('0xe'),auth['isAuthenticated'](),controller[_0x76aa('0x15')]);router[_0x76aa('0x13')](_0x76aa('0x16'),auth[_0x76aa('0xa')](),interaction[_0x76aa('0x17')]('mail','mailinteraction:addtags'),controller[_0x76aa('0x18')]);router['put'](_0x76aa('0xc'),auth[_0x76aa('0xa')](),interaction['tracked'](_0x76aa('0x19'),'mailinteraction:update'),controller[_0x76aa('0x1a')]);router['delete'](_0x76aa('0xc'),auth[_0x76aa('0xa')](),interaction[_0x76aa('0x17')](_0x76aa('0x19'),_0x76aa('0x1b')),controller[_0x76aa('0x1c')]);router['delete']('/:id/tags',auth[_0x76aa('0xa')](),controller[_0x76aa('0x1d')]);module[_0x76aa('0x1e')]=router;
\ No newline at end of file
+var _0x34e8=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailInteraction.controller','get','isAuthenticated','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','/:id/tags','tracked','mailinteraction:addtags','addTags','mail','update','delete','mailinteraction:destroy','destroy','exports'];(function(_0x293da6,_0x14daef){var _0x3ef71d=function(_0x4313e0){while(--_0x4313e0){_0x293da6['push'](_0x293da6['shift']());}};_0x3ef71d(++_0x14daef);}(_0x34e8,0x12c));var _0x834e=function(_0x266410,_0x3baa9c){_0x266410=_0x266410-0x0;var _0x55cc9c=_0x34e8[_0x266410];return _0x55cc9c;};'use strict';var multer=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var path=require(_0x834e('0x2'));var timeout=require(_0x834e('0x3'));var express=require('express');var router=express[_0x834e('0x4')]();var auth=require(_0x834e('0x5'));var interaction=require(_0x834e('0x6'));var config=require(_0x834e('0x7'));var controller=require(_0x834e('0x8'));router[_0x834e('0x9')]('/',auth[_0x834e('0xa')](),controller['index']);router[_0x834e('0x9')]('/describe',auth[_0x834e('0xa')](),controller[_0x834e('0xb')]);router[_0x834e('0x9')](_0x834e('0xc'),auth[_0x834e('0xa')](),controller[_0x834e('0xd')]);router[_0x834e('0x9')](_0x834e('0xe'),auth[_0x834e('0xa')](),controller[_0x834e('0xf')]);router[_0x834e('0x9')](_0x834e('0x10'),auth[_0x834e('0xa')](),controller[_0x834e('0x11')]);router[_0x834e('0x12')]('/',auth[_0x834e('0xa')](),controller[_0x834e('0x13')]);router['post'](_0x834e('0xe'),auth[_0x834e('0xa')](),controller['addMessage']);router[_0x834e('0x12')](_0x834e('0x14'),auth[_0x834e('0xa')](),interaction[_0x834e('0x15')]('mail',_0x834e('0x16')),controller[_0x834e('0x17')]);router['put'](_0x834e('0xc'),auth['isAuthenticated'](),interaction[_0x834e('0x15')](_0x834e('0x18'),'mailinteraction:update'),controller[_0x834e('0x19')]);router[_0x834e('0x1a')](_0x834e('0xc'),auth['isAuthenticated'](),interaction[_0x834e('0x15')](_0x834e('0x18'),_0x834e('0x1b')),controller[_0x834e('0x1c')]);router[_0x834e('0x1a')](_0x834e('0x14'),auth[_0x834e('0xa')](),controller['removeTags']);module[_0x834e('0x1d')]=router;
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.attributes.js b/server/api/mailInteraction/mailInteraction.attributes.js
index d92ec66..431169d 100644
--- a/server/api/mailInteraction/mailInteraction.attributes.js
+++ b/server/api/mailInteraction/mailInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4282=['DATE','ENUM','out','sequelize','iconv','exports','BOOLEAN','STRING','TEXT','long'];(function(_0x14ddff,_0x515a39){var _0x5d5534=function(_0x1aa9bb){while(--_0x1aa9bb){_0x14ddff['push'](_0x14ddff['shift']());}};_0x5d5534(++_0x515a39);}(_0x4282,0xfd));var _0x2428=function(_0x106ee2,_0x30284a){_0x106ee2=_0x106ee2-0x0;var _0xfd26da=_0x4282[_0x106ee2];return _0xfd26da;};'use strict';var Sequelize=require(_0x2428('0x0'));var iconv=require(_0x2428('0x1'));module[_0x2428('0x2')]={'closed':{'type':Sequelize[_0x2428('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x2428('0x4')]},'note':{'type':Sequelize[_0x2428('0x4')]},'inReplyTo':{'type':Sequelize[_0x2428('0x4')](0x1fe)},'to':{'type':Sequelize[_0x2428('0x4')]},'cc':{'type':Sequelize[_0x2428('0x5')](_0x2428('0x6'))},'subject':{'type':Sequelize[_0x2428('0x5')]()},'attach':{'type':Sequelize[_0x2428('0x3')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x2428('0x7')]},'substatus':{'type':Sequelize[_0x2428('0x4')](0x3c)},'substatusAt':{'type':Sequelize[_0x2428('0x7')]},'firstMsgDirection':{'type':Sequelize[_0x2428('0x8')]('in',_0x2428('0x9')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x2428('0x7')]},'lastMsgDirection':{'type':Sequelize[_0x2428('0x8')]('in',_0x2428('0x9')),'defaultValue':'in','allowNull':![]},'lastMsgBody':{'type':Sequelize[_0x2428('0x5')](_0x2428('0x6'))},'lastMsgText':{'type':Sequelize[_0x2428('0x5')]('long')}};
\ No newline at end of file
+var _0x8f6b=['sequelize','iconv','exports','BOOLEAN','DATE','STRING','TEXT','long','ENUM'];(function(_0x47a349,_0x4699d9){var _0x18ab75=function(_0x210796){while(--_0x210796){_0x47a349['push'](_0x47a349['shift']());}};_0x18ab75(++_0x4699d9);}(_0x8f6b,0xcf));var _0xb8f6=function(_0x5e3b04,_0xbb6795){_0x5e3b04=_0x5e3b04-0x0;var _0x1fc44d=_0x8f6b[_0x5e3b04];return _0x1fc44d;};'use strict';var Sequelize=require(_0xb8f6('0x0'));var iconv=require(_0xb8f6('0x1'));module[_0xb8f6('0x2')]={'closed':{'type':Sequelize[_0xb8f6('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xb8f6('0x4')]},'disposition':{'type':Sequelize[_0xb8f6('0x5')]},'note':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0xb8f6('0x5')](0x1fe)},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0xb8f6('0x6')](_0xb8f6('0x7'))},'subject':{'type':Sequelize[_0xb8f6('0x6')]()},'attach':{'type':Sequelize[_0xb8f6('0x3')],'defaultValue':![]},'read1stAt':{'type':Sequelize['DATE']},'substatus':{'type':Sequelize['STRING'](0x3c)},'substatusAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0xb8f6('0x8')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xb8f6('0x4')]},'lastMsgDirection':{'type':Sequelize[_0xb8f6('0x8')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgBody':{'type':Sequelize['TEXT'](_0xb8f6('0x7'))},'lastMsgText':{'type':Sequelize[_0xb8f6('0x6')](_0xb8f6('0x7'))}};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.controller.js b/server/api/mailInteraction/mailInteraction.controller.js
index b67bda3..a6fac4e 100644
--- a/server/api/mailInteraction/mailInteraction.controller.js
+++ b/server/api/mailInteraction/mailInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbeb4=['me.direction\x20=\x20\x27in\x27','me.read\x20=\x20false','u.id','ui.MailInteractionId','user_has_mail_interactions','users','u.id\x20=\x20ui.UserId','mail_interactions','left_join','cm_contacts','o.id\x20=\x20i.UserId','mail_accounts','a.id\x20=\x20i.MailAccountId','advancedFilter','parse','createdAt','value','dateStart','startOf','day','utc','format','endOf','and','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','isArray','condition','TagId','Messages.count','tableAlias','\x20IN\x20?','\x20=\x20?','LIKE','ContactId','c.firstName','\x20LIKE\x20?','c.lastName','c.email','\x20>\x20?','\x20<\x20?','filter','isNil','isEmpty','i.MailAccountId\x20IN\x20?','concat','$lte','null','\x20IS\x20NULL','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','c.email\x20LIKE\x20?','toString','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','DESC','group','Sequelize','QueryTypes','read','having','`Messages.count`\x20>\x200','tag','expr','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','mail_interaction_has_tags','it.MailInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','`Messages.count`\x20=\x200','%s\x20>\x200','sequelize','keyBy','merge','Account.key','i.id','i.createdAt','i.updatedAt','i.closed','i.closedAt','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.substatus','i.to','i.ContactId','i.MailAccountId','i.UserId','Contact.firstName','Contact.lastName','Contact.email','c.mobile','Contact.mobile','c.fax','GROUP_CONCAT(DISTINCT\x20t.id)','ui.MailInteractionId\x20IN\x20?','MailInteractionId','Setting','all','rows','show','includeAll','include','find','create','body','params','describe','addMessage','ids','omit','pick','$gte','YYYY-MM-DD\x20HH:mm:ss','options','findAll','addTags','spread','Tag','emit','mailInteractionTags:save','removeTags','unix','join','root','server','files','attachments','tmp','interaction-%s.zip','getMessages','bcc','Attachment','Attachments','mkdirSync','subject','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','existsSync','type','readFileSync','build','writeFileSync','message%d.eml','download','log','err','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','to-csv','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','count','offset','limit','Content-Range','apply','reject','save','update','then','destroy','end','error','name','send','closed','unreadMessages','MailMessage','Users','map','TagIds','Tags','split','forEach','push','MailInteraction','findOne','lastMsgBody','trimStart','fromString','lastMsgText','catch','index','rawAttributes','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','select','field','color','from','tools_tags','COUNT(*)','mail_messages','where','me.MailInteractionId\x20=\x20i.id'];(function(_0xe5b349,_0x5f06e4){var _0x26b0ad=function(_0x1a97f1){while(--_0x1a97f1){_0xe5b349['push'](_0xe5b349['shift']());}};_0x26b0ad(++_0x5f06e4);}(_0xbeb4,0x96));var _0x4beb=function(_0x240082,_0x5807e5){_0x240082=_0x240082-0x0;var _0x2bfd01=_0xbeb4[_0x240082];return _0x2bfd01;};'use strict';var pdf=require(_0x4beb('0x0'));var emlformat=require(_0x4beb('0x1'));var rimraf=require(_0x4beb('0x2'));var zipdir=require(_0x4beb('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4beb('0x4'));var moment=require(_0x4beb('0x5'));var BPromise=require(_0x4beb('0x6'));var Mustache=require('mustache');var util=require(_0x4beb('0x7'));var path=require(_0x4beb('0x8'));var sox=require('sox');var csv=require(_0x4beb('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4beb('0xa'));var squel=require(_0x4beb('0xb'));var crypto=require('crypto');var jsforce=require(_0x4beb('0xc'));var deskjs=require(_0x4beb('0xd'));var toCsv=require(_0x4beb('0x9'));var querystring=require(_0x4beb('0xe'));var Papa=require('papaparse');var htmlToText=require('html-to-text');var Redis=require(_0x4beb('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x4beb('0x10'));var hardwareService=require(_0x4beb('0x11'));var logger=require(_0x4beb('0x12'))('api');var utils=require(_0x4beb('0x13'));var config=require(_0x4beb('0x14'));var db=require('../../mysqldb')['db'];config[_0x4beb('0x15')]=_[_0x4beb('0x16')](config[_0x4beb('0x15')],{'host':_0x4beb('0x17'),'port':0x18eb});var socket=require(_0x4beb('0x18'))(new Redis(config[_0x4beb('0x15')]));require('./mailInteraction.socket')[_0x4beb('0x19')](socket);function respondWithStatusCode(_0x463811,_0x1c47b1){_0x1c47b1=_0x1c47b1||0xcc;return function(_0x3891c3){if(_0x3891c3){return _0x463811[_0x4beb('0x1a')](_0x1c47b1);}return _0x463811[_0x4beb('0x1b')](_0x1c47b1)['end']();};}function respondWithResult(_0x74752,_0x3be089){_0x3be089=_0x3be089||0xc8;return function(_0x270561){if(_0x270561){return _0x74752[_0x4beb('0x1b')](_0x3be089)[_0x4beb('0x1c')](_0x270561);}};}function respondWithFilteredResult(_0x486843,_0x64f873){return function(_0x8b1165){if(_0x8b1165){var _0x3ad43d=_0x8b1165[_0x4beb('0x1d')],_0x110e9f=_0x64f873[_0x4beb('0x1e')],_0x399f7c=_0x64f873[_0x4beb('0x1e')]+_0x64f873[_0x4beb('0x1f')],_0x18f22b;if(_0x399f7c>=_0x3ad43d){_0x399f7c=_0x3ad43d;_0x18f22b=0xc8;}else{_0x18f22b=0xce;}_0x486843[_0x4beb('0x1b')](_0x18f22b);return _0x486843['set'](_0x4beb('0x20'),_0x110e9f+'-'+_0x399f7c+'/'+_0x3ad43d)[_0x4beb('0x1c')](_0x8b1165);}return null;};}function patchUpdates(_0x4f6699){return function(_0x53d863){try{jsonpatch[_0x4beb('0x21')](_0x53d863,_0x4f6699,!![]);}catch(_0x4a7362){return BPromise[_0x4beb('0x22')](_0x4a7362);}return _0x53d863[_0x4beb('0x23')]();};}function saveUpdates(_0x29d47e,_0x32da4a){return function(_0x3d122a){if(_0x3d122a){return _0x3d122a[_0x4beb('0x24')](_0x29d47e)[_0x4beb('0x25')](function(_0x5e30d5){return _0x5e30d5;});}return null;};}function removeEntity(_0x41593d,_0x57f87f){return function(_0x463960){if(_0x463960){return _0x463960[_0x4beb('0x26')]()[_0x4beb('0x25')](function(){_0x41593d[_0x4beb('0x1b')](0xcc)[_0x4beb('0x27')]();});}};}function handleEntityNotFound(_0x5d6437,_0x5ab30b){return function(_0x2d9d95){if(!_0x2d9d95){_0x5d6437[_0x4beb('0x1a')](0x194);}return _0x2d9d95;};}function handleError(_0x2f91c8,_0x5e2079){_0x5e2079=_0x5e2079||0x1f4;return function(_0x101e61){logger[_0x4beb('0x28')](_0x101e61['stack']);if(_0x101e61[_0x4beb('0x29')]){delete _0x101e61['name'];}_0x2f91c8[_0x4beb('0x1b')](_0x5e2079)[_0x4beb('0x2a')](_0x101e61);};}function getInteractionUnreadMessages(_0x452b97){return new BPromise(function(_0x5a8599,_0x37d550){try{if(_0x452b97[_0x4beb('0x2b')]){_0x452b97[_0x4beb('0x2c')]=0x0;_0x5a8599(_0x452b97);}else{return db[_0x4beb('0x2d')][_0x4beb('0x1d')]({'where':{'MailInteractionId':_0x452b97['id'],'direction':'in','read':![]}})[_0x4beb('0x25')](function(_0x3cfa8b){_0x452b97[_0x4beb('0x2c')]=_0x3cfa8b;_0x5a8599(_0x452b97);});}}catch(_0xd85c41){_0x37d550(_0xd85c41);}});}function getInteractionUsers(_0x18ceee,_0x41cd42){return new BPromise(function(_0x10192f,_0x2fa8da){try{if(_0x41cd42[_0x18ceee['id']]){_0x18ceee[_0x4beb('0x2e')]=_[_0x4beb('0x2f')](_0x41cd42[_0x18ceee['id']],function(_0x34242b){return{'id':_0x34242b['id']};});}}catch(_0x9fc0cc){_0x2fa8da(_0x9fc0cc);}_0x10192f(_0x18ceee);});}function getInteractionTags(_0x394b12,_0x5be26){return new BPromise(function(_0x482d3c,_0x3b9429){try{if(_0x394b12[_0x4beb('0x30')]){_0x394b12[_0x4beb('0x31')]=[];_0x394b12[_0x4beb('0x30')][_0x4beb('0x32')](',')[_0x4beb('0x33')](function(_0x11f6a6){_0x394b12[_0x4beb('0x31')][_0x4beb('0x34')](_0x5be26[_0x11f6a6]);});}delete _0x394b12[_0x4beb('0x30')];}catch(_0x4a7007){_0x3b9429(_0x4a7007);}_0x482d3c(_0x394b12);});}function getLastMessageText(_0x4f19ce){return new BPromise(function(_0x323afe,_0x3b0d50){return db[_0x4beb('0x35')][_0x4beb('0x36')]({'where':{'id':_0x4f19ce['id']},'attributes':[_0x4beb('0x37'),'lastMsgText'],'raw':!![]})[_0x4beb('0x25')](function(_0x3c2eae){if(!_0x3c2eae['lastMsgText']){_0x4f19ce['lastMsgText']=_[_0x4beb('0x38')](htmlToText[_0x4beb('0x39')](_0x3c2eae[_0x4beb('0x37')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]}));}else{_0x4f19ce['lastMsgText']=_0x3c2eae[_0x4beb('0x3a')];}_0x323afe(_0x4f19ce);})[_0x4beb('0x3b')](function(_0x1a3846){_0x3b0d50(_0x1a3846);});});}function updateMailInteraction(_0x11b48c,_0x3c7d9f,_0x1d4352,_0x572dca){return new BPromise(function(_0x1c0f11,_0x4abbf0){return getInteractionUnreadMessages(_0x11b48c)['then'](function(_0x1db5b4){return getInteractionUsers(_0x1db5b4,_0x1d4352);})[_0x4beb('0x25')](function(_0x3e6d2a){return getInteractionTags(_0x3e6d2a,_0x3c7d9f);})[_0x4beb('0x25')](function(_0x4d7a31){if(_0x572dca){_0x1c0f11(getLastMessageText(_0x4d7a31));}else{_0x1c0f11(_0x4d7a31);}})['catch'](function(_0x1af737){_0x4abbf0(_0x1af737);});});}exports[_0x4beb('0x3c')]=function(_0x4734a0,_0x4b0fcb){var _0x36c592={},_0x11780d={},_0x24e73d={'count':0x0,'rows':[]};var _0x4a366f=db[_0x4beb('0x35')][_0x4beb('0x3d')];_0x11780d[_0x4beb('0x3e')]=_['keys'](_0x4a366f);_0x11780d[_0x4beb('0x3f')]=_[_0x4beb('0x40')](_0x4734a0[_0x4beb('0x3f')]);_0x11780d[_0x4beb('0x41')]=_['intersection'](_0x11780d[_0x4beb('0x3e')],_0x11780d[_0x4beb('0x3f')]);_0x36c592[_0x4beb('0x42')]=_[_0x4beb('0x43')](_0x11780d[_0x4beb('0x3e')],qs['fields'](_0x4734a0['query'][_0x4beb('0x44')]));_0x36c592['attributes']=_0x36c592[_0x4beb('0x42')][_0x4beb('0x45')]?_0x36c592[_0x4beb('0x42')]:_0x11780d['model'];if(!_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x46')](_0x4beb('0x47'))){_0x36c592['limit']=qs['limit'](_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x1f')]);_0x36c592[_0x4beb('0x1e')]=qs['offset'](_0x4734a0['query'][_0x4beb('0x1e')]);}_0x36c592[_0x4beb('0x48')]=qs[_0x4beb('0x49')](_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x49')]);_0x36c592['where']=qs[_0x4beb('0x41')](_['pick'](_0x4734a0[_0x4beb('0x3f')],_0x11780d[_0x4beb('0x41')]));var _0xa7a732=[];var _0x33bd9e=squel[_0x4beb('0x4a')]()['field']('id')[_0x4beb('0x4b')]('name')[_0x4beb('0x4b')](_0x4beb('0x4c'))[_0x4beb('0x4d')](_0x4beb('0x4e'));var _0x1e05ba=squel[_0x4beb('0x4a')]()[_0x4beb('0x4b')](_0x4beb('0x4f'))[_0x4beb('0x4d')](_0x4beb('0x50'),'me')[_0x4beb('0x51')](_0x4beb('0x52'))[_0x4beb('0x51')](_0x4beb('0x53'))[_0x4beb('0x51')](_0x4beb('0x54'));var _0x2e9b7a=squel[_0x4beb('0x4a')]()[_0x4beb('0x4b')](_0x4beb('0x55'))[_0x4beb('0x4b')](_0x4beb('0x56'))[_0x4beb('0x4d')](_0x4beb('0x57'),'ui')['left_join'](_0x4beb('0x58'),'u',_0x4beb('0x59'));var _0x324f3f=squel[_0x4beb('0x4a')]()[_0x4beb('0x4d')](_0x4beb('0x5a'),'i')[_0x4beb('0x5b')](_0x4beb('0x5c'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x4beb('0x5b')](_0x4beb('0x58'),'o',_0x4beb('0x5d'))[_0x4beb('0x5b')](_0x4beb('0x5e'),'a',_0x4beb('0x5f'))[_0x4beb('0x5b')]('mail_messages','me',_0x4beb('0x52'));var _0x5d7b52=squel['expr']();if(_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x60')]){var _0x31d0e3=JSON[_0x4beb('0x61')](_0x4734a0[_0x4beb('0x3f')]['advancedFilter']);_[_0x4beb('0x40')](_0x31d0e3)['forEach'](function(_0x47b35a){var _0x23e171=_0x31d0e3[_0x47b35a];if(_0x47b35a===_0x4beb('0x62')){var _0x1f4eba=moment(_0x23e171[_0x4beb('0x63')][_0x4beb('0x64')])[_0x4beb('0x65')](_0x4beb('0x66'))[_0x4beb('0x67')]()[_0x4beb('0x68')]();var _0x195917=moment(_0x195917)['utc']()[_0x4beb('0x69')](_0x4beb('0x66'))[_0x4beb('0x68')]();_0x5d7b52[_0x4beb('0x6a')](_0x4beb('0x6b'),_0x1f4eba,_0x195917);}else{if(_[_0x4beb('0x6c')](_0x23e171[_0x4beb('0x6d')])){_0x23e171[_0x4beb('0x6d')][_0x4beb('0x33')](function(_0x27e468){switch(_0x23e171[_0x4beb('0x6d')]['value']){case'IS':if(_0x47b35a!==_0x4beb('0x6e')&&_0x47b35a!==_0x4beb('0x6f')){if(_['isArray'](_0x23e171[_0x4beb('0x63')])&&_0x23e171[_0x4beb('0x63')][_0x4beb('0x45')]>0x1){_0x5d7b52['and'](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+_0x4beb('0x71'),_0x23e171[_0x4beb('0x63')]);}else{_0x5d7b52[_0x4beb('0x6a')](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+_0x4beb('0x72'),_0x23e171['value'][0x0]);}}break;case'=':_0x5d7b52['and'](_0x23e171['tableAlias']+'.'+_0x47b35a+_0x4beb('0x72'),_0x23e171[_0x4beb('0x63')]);break;case _0x4beb('0x73'):if(_0x47b35a===_0x4beb('0x74')){_0x5d7b52[_0x4beb('0x6a')](_0x4beb('0x75')+_0x4beb('0x76'),'%'+_0x23e171[_0x4beb('0x63')]+'%');_0x5d7b52['or'](_0x4beb('0x77')+_0x4beb('0x76'),'%'+_0x23e171['value']+'%');_0x5d7b52['or'](_0x4beb('0x78')+_0x4beb('0x76'),'%'+_0x23e171[_0x4beb('0x63')]+'%');}else{_0x5d7b52[_0x4beb('0x6a')](_0x23e171['tableAlias']+'.'+_0x47b35a+_0x4beb('0x76'),'%'+_0x23e171[_0x4beb('0x63')]+'%');}break;case'>':_0x5d7b52['and'](_0x23e171['tableAlias']+'.'+_0x47b35a+_0x4beb('0x79'),_0x23e171[_0x4beb('0x63')]);break;case'<':_0x5d7b52['and'](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+_0x4beb('0x7a'),_0x23e171[_0x4beb('0x63')]);break;}});}else{switch(_0x23e171[_0x4beb('0x6d')][_0x4beb('0x63')]){case'IS':if(_0x47b35a!==_0x4beb('0x6e')&&_0x47b35a!==_0x4beb('0x6f')){if(_[_0x4beb('0x6c')](_0x23e171[_0x4beb('0x63')])&&_0x23e171['value'][_0x4beb('0x45')]>0x1){_0x5d7b52['and'](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+_0x4beb('0x71'),_0x23e171['value']);}else{_0x5d7b52['and'](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+_0x4beb('0x72'),_0x23e171[_0x4beb('0x63')][0x0]);}}break;case'=':_0x5d7b52[_0x4beb('0x6a')](_0x23e171['tableAlias']+'.'+_0x47b35a+_0x4beb('0x72'),_0x23e171[_0x4beb('0x63')]);break;case _0x4beb('0x73'):if(_0x47b35a===_0x4beb('0x74')){_0x5d7b52[_0x4beb('0x6a')](_0x4beb('0x75')+_0x4beb('0x76'),'%'+_0x23e171[_0x4beb('0x63')]+'%');_0x5d7b52['or'](_0x4beb('0x77')+_0x4beb('0x76'),'%'+_0x23e171[_0x4beb('0x63')]+'%');_0x5d7b52['or'](_0x4beb('0x78')+'\x20LIKE\x20?','%'+_0x23e171[_0x4beb('0x63')]+'%');}else{_0x5d7b52[_0x4beb('0x6a')](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+_0x4beb('0x76'),'%'+_0x23e171['value']+'%');}break;case'>':_0x5d7b52[_0x4beb('0x6a')](_0x23e171[_0x4beb('0x70')]+'.'+_0x47b35a+'\x20>\x20?',_0x23e171[_0x4beb('0x63')]);break;case'<':_0x5d7b52[_0x4beb('0x6a')](_0x23e171['tableAlias']+'.'+_0x47b35a+_0x4beb('0x7a'),_0x23e171[_0x4beb('0x63')]);break;}}}});}else{var _0x472e0b=_(Object[_0x4beb('0x40')](_0x4734a0[_0x4beb('0x3f')]))[_0x4beb('0x2f')](function(_0x3bb7c2){return _0x4a366f[_0x4beb('0x46')](_0x3bb7c2)?_0x3bb7c2:undefined;})[_0x4beb('0x7b')](function(_0x5f9a30){return!_[_0x4beb('0x7c')](_0x5f9a30);})['value']();if(!_[_0x4beb('0x7d')](_0x472e0b)){_0x472e0b['forEach'](function(_0x5385d5){if(_0x5385d5==='MailAccountId'){_0x324f3f[_0x4beb('0x51')](_0x4beb('0x7e'),[][_0x4beb('0x7f')](_0x4734a0[_0x4beb('0x3f')][_0x5385d5]));}else if(_0x5385d5===_0x4beb('0x62')){var _0x8e95e9=JSON[_0x4beb('0x61')](_0x4734a0['query'][_0x5385d5])['$gte'];var _0x1dd32c=JSON[_0x4beb('0x61')](_0x4734a0[_0x4beb('0x3f')][_0x5385d5])[_0x4beb('0x80')];_0x324f3f[_0x4beb('0x51')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x8e95e9,_0x1dd32c);}else{if(_0x4734a0[_0x4beb('0x3f')][_0x5385d5]===_0x4beb('0x81')){_0x324f3f[_0x4beb('0x51')]('i.'+_0x5385d5+_0x4beb('0x82'));}else{_0x324f3f[_0x4beb('0x51')]('i.'+_0x5385d5+'\x20=\x20?',_0x4734a0[_0x4beb('0x3f')][_0x5385d5]);}}});}if(_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x7b')]){var _0x29b77d=_0x4734a0['query'][_0x4beb('0x7b')]['replace']('\x5c','\x5c\x5c')[_0x4beb('0x83')]('\x27\x27',_0x4beb('0x84'));if(qs[_0x4beb('0x85')](_0x29b77d)){_0x5d7b52['or'](_0x4beb('0x86'),_0x29b77d+'%');}else if(qs['isEmail'](_0x29b77d)){_0x5d7b52['or'](_0x4beb('0x87'),_0x29b77d+'%');}else{var _0x4c1ac8=[];_0x29b77d['split']('\x20')['forEach'](function(_0xe48dc8){_0x4c1ac8[_0x4beb('0x34')]('+'+_0xe48dc8[_0x4beb('0x88')]());});var _0x458d7a=_0x4c1ac8['join']('\x20');_0x5d7b52['or'](_0x4beb('0x89'),_0x458d7a)['or']('MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',_0x458d7a);}}}_0x324f3f[_0x4beb('0x51')](_0x5d7b52);if(_0x36c592[_0x4beb('0x48')]){_0x36c592[_0x4beb('0x48')][_0x4beb('0x33')](function(_0x212e15){_0x324f3f[_0x4beb('0x48')]('i.'+_0x212e15[0x0],_0x212e15[0x1]===_0x4beb('0x8a')?![]:!![]);});}_0x324f3f[_0x4beb('0x8b')]('i.id');var _0x8897ea={'type':db[_0x4beb('0x8c')][_0x4beb('0x8d')]['SELECT'],'raw':!![]};var _0x2525da=_0x324f3f['clone']()[_0x4beb('0x4b')](_0x4beb('0x4f'));if(!_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x60')]){if(_0x4734a0['query'][_0x4beb('0x8e')]){if(_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x8e')]==0x1){_0x2525da[_0x4beb('0x51')](util[_0x4beb('0x68')]('%s\x20=\x200',_0x1e05ba[_0x4beb('0x88')]()));_0x324f3f[_0x4beb('0x8f')]('`Messages.count`\x20=\x200');}else{_0x2525da[_0x4beb('0x51')](util[_0x4beb('0x68')]('%s\x20>\x200',_0x1e05ba[_0x4beb('0x88')]()));_0x324f3f[_0x4beb('0x8f')](_0x4beb('0x90'));}}if(_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x91')]){var _0x418b7e=_['isArray'](_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x91')])?_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x91')]:new Array(_0x4734a0[_0x4beb('0x3f')][_0x4beb('0x91')]);var _0x56d7c1=squel[_0x4beb('0x92')]();_0x418b7e[_0x4beb('0x33')](function(_0x132156){_0x56d7c1['or'](_0x4beb('0x93'),'%,'+_0x132156+',%');});_0x324f3f[_0x4beb('0x8f')](_0x56d7c1);_0x2525da[_0x4beb('0x5b')](_0x4beb('0x94'),'it',_0x4beb('0x95'));_0x2525da[_0x4beb('0x5b')](_0x4beb('0x4e'),'t',_0x4beb('0x96'));_0x2525da['where'](_0x4beb('0x97'),_0x418b7e);}}else{var _0x31d0e3=JSON['parse'](_0x4734a0['query'][_0x4beb('0x60')]);_['keys'](_0x31d0e3)[_0x4beb('0x33')](function(_0x12a458){var _0x23af4f=_0x31d0e3[_0x12a458];if(_0x12a458==='TagId'){var _0x2e61a9=_0x23af4f[_0x4beb('0x63')];var _0x19f4ab=squel[_0x4beb('0x92')]();_0x2e61a9['forEach'](function(_0x471880){_0x19f4ab['or'](_0x4beb('0x93'),'%,'+_0x471880+',%');});_0x324f3f[_0x4beb('0x8f')](_0x19f4ab);_0x2525da[_0x4beb('0x5b')](_0x4beb('0x94'),'it',_0x4beb('0x95'));_0x2525da[_0x4beb('0x5b')]('tools_tags','t',_0x4beb('0x96'));_0x2525da[_0x4beb('0x51')](_0x4beb('0x97'),_0x2e61a9);}else if(_0x12a458===_0x4beb('0x6f')){if(_0x23af4f[_0x4beb('0x63')][_0x4beb('0x45')]===0x1){if(_0x23af4f[_0x4beb('0x63')][0x0]===0x1){_0x2525da[_0x4beb('0x51')](util[_0x4beb('0x68')]('%s\x20=\x200',_0x1e05ba[_0x4beb('0x88')]()));_0x324f3f[_0x4beb('0x8f')](_0x4beb('0x98'));}else{_0x2525da[_0x4beb('0x51')](util[_0x4beb('0x68')](_0x4beb('0x99'),_0x1e05ba[_0x4beb('0x88')]()));_0x324f3f['having'](_0x4beb('0x90'));}}}});}db[_0x4beb('0x9a')]['query'](_0x2525da['toString'](),_0x8897ea)[_0x4beb('0x25')](function(_0x336d7d){_0x24e73d[_0x4beb('0x1d')]=_0x336d7d[_0x4beb('0x45')];if(_0x24e73d[_0x4beb('0x1d')]===0x0)return[];return db['sequelize']['query'](_0x33bd9e[_0x4beb('0x88')](),_0x8897ea)[_0x4beb('0x25')](function(_0x210558){_0xa7a732=_[_0x4beb('0x9b')](_0x210558,'id');_0x8897ea=_[_0x4beb('0x9c')](_0x8897ea,{'model':db[_0x4beb('0x35')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x324f3f[_0x4beb('0x4b')]('a.key',_0x4beb('0x9d'));_0x324f3f['field'](_0x4beb('0x9e'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0x9f'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa0'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa1'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa2'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa3'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa4'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa5'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa6'));_0x324f3f['field']('i.disposition');_0x324f3f['field'](_0x4beb('0xa7'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa8'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xa9'));_0x324f3f['field'](_0x4beb('0xaa'));_0x324f3f['field'](_0x4beb('0xab'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0x75'),_0x4beb('0xac'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0x77'),_0x4beb('0xad'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0x78'),_0x4beb('0xae'));_0x324f3f[_0x4beb('0x4b')]('c.phone','Contact.phone');_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xaf'),_0x4beb('0xb0'));_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xb1'),'Contact.fax');_0x324f3f[_0x4beb('0x4b')](_0x4beb('0xb2'),'TagIds');_0x324f3f['left_join']('mail_interaction_has_tags','it','it.MailInteractionId\x20=\x20i.id');_0x324f3f[_0x4beb('0x5b')](_0x4beb('0x4e'),'t',_0x4beb('0x96'));_0x324f3f[_0x4beb('0x1f')](_0x36c592[_0x4beb('0x1f')]);_0x324f3f[_0x4beb('0x1e')](_0x36c592[_0x4beb('0x1e')]);return db[_0x4beb('0x9a')][_0x4beb('0x3f')](_0x324f3f[_0x4beb('0x88')](),_0x8897ea);})[_0x4beb('0x25')](function(_0x46c48e){_0x2e9b7a[_0x4beb('0x51')](_0x4beb('0xb3'),_[_0x4beb('0x2f')](_0x46c48e,'id'));return db[_0x4beb('0x9a')][_0x4beb('0x3f')](_0x2e9b7a['toString'](),_0x8897ea)[_0x4beb('0x25')](function(_0x150ad9){var _0x198988=_['groupBy'](_0x150ad9,_0x4beb('0xb4'));var _0x50bb14=[];return db[_0x4beb('0xb5')][_0x4beb('0x36')]({'attributes':['enableEmailPreview'],'raw':!![]})[_0x4beb('0x25')](function(_0x3247ae){var _0x434a4a=_0x3247ae['enableEmailPreview'];_0x46c48e[_0x4beb('0x33')](function(_0x12a632){_0x50bb14[_0x4beb('0x34')](updateMailInteraction(_0x12a632,_0xa7a732,_0x198988,_0x434a4a));});return BPromise[_0x4beb('0xb6')](_0x50bb14);});});});})['then'](function(_0xdfe371){_0x24e73d[_0x4beb('0xb7')]=_0xdfe371;return _0x24e73d;})['then'](respondWithFilteredResult(_0x4b0fcb,_0x36c592))['catch'](handleError(_0x4b0fcb,null));};exports[_0x4beb('0xb8')]=function(_0x5b6b17,_0x35baba){var _0xcdf3f6={'raw':![],'where':{'id':_0x5b6b17['params']['id']}},_0x11644a={};_0x11644a[_0x4beb('0x3e')]=_[_0x4beb('0x40')](db[_0x4beb('0x35')][_0x4beb('0x3d')]);_0x11644a[_0x4beb('0x3f')]=_[_0x4beb('0x40')](_0x5b6b17['query']);_0x11644a[_0x4beb('0x41')]=_[_0x4beb('0x43')](_0x11644a[_0x4beb('0x3e')],_0x11644a[_0x4beb('0x3f')]);_0xcdf3f6['attributes']=_[_0x4beb('0x43')](_0x11644a[_0x4beb('0x3e')],qs[_0x4beb('0x44')](_0x5b6b17[_0x4beb('0x3f')][_0x4beb('0x44')]));_0xcdf3f6['attributes']=_0xcdf3f6[_0x4beb('0x42')][_0x4beb('0x45')]?_0xcdf3f6[_0x4beb('0x42')]:_0x11644a[_0x4beb('0x3e')];if(_0x5b6b17[_0x4beb('0x3f')][_0x4beb('0xb9')]){_0xcdf3f6[_0x4beb('0xba')]=[{'all':!![]}];}_0xcdf3f6=_['merge']({},_0xcdf3f6,_0x5b6b17['options']);return db[_0x4beb('0x35')][_0x4beb('0xbb')](_0xcdf3f6)['then'](handleEntityNotFound(_0x35baba,null))['then'](respondWithResult(_0x35baba,null))[_0x4beb('0x3b')](handleError(_0x35baba,null));};exports[_0x4beb('0xbc')]=function(_0x355331,_0xb9c108){return db[_0x4beb('0x35')][_0x4beb('0xbc')](_0x355331[_0x4beb('0xbd')],{})[_0x4beb('0x25')](respondWithResult(_0xb9c108,0xc9))[_0x4beb('0x3b')](handleError(_0xb9c108,null));};exports[_0x4beb('0x24')]=function(_0x1af8b1,_0x3a5cc9){if(_0x1af8b1[_0x4beb('0xbd')]['id']){delete _0x1af8b1[_0x4beb('0xbd')]['id'];}return db[_0x4beb('0x35')][_0x4beb('0xbb')]({'where':{'id':_0x1af8b1[_0x4beb('0xbe')]['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x3a5cc9,null))['then'](saveUpdates(_0x1af8b1[_0x4beb('0xbd')],null))[_0x4beb('0x25')](respondWithResult(_0x3a5cc9,null))[_0x4beb('0x3b')](handleError(_0x3a5cc9,null));};exports[_0x4beb('0x26')]=function(_0xb882c9,_0x4b0ef9){return db[_0x4beb('0x35')][_0x4beb('0xbb')]({'where':{'id':_0xb882c9[_0x4beb('0xbe')]['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x4b0ef9,null))[_0x4beb('0x25')](removeEntity(_0x4b0ef9,null))['catch'](handleError(_0x4b0ef9,null));};exports[_0x4beb('0xbf')]=function(_0x36c532,_0x35ff46){return db[_0x4beb('0x35')][_0x4beb('0xbf')]()[_0x4beb('0x25')](respondWithResult(_0x35ff46,null))[_0x4beb('0x3b')](handleError(_0x35ff46,null));};exports[_0x4beb('0xc0')]=function(_0x567ddf,_0x18cc99,_0x41877b){return db['MailMessage'][_0x4beb('0xbb')]({'where':{'id':_0x567ddf[_0x4beb('0xbe')]['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x18cc99,null))[_0x4beb('0x25')](function(_0x215452){if(_0x215452){return _0x215452['addMessage'](_0x567ddf[_0x4beb('0xbd')][_0x4beb('0xc1')],_[_0x4beb('0xc2')](_0x567ddf['body'],['ids','id'])||{});}})[_0x4beb('0x25')](respondWithResult(_0x18cc99,null))[_0x4beb('0x3b')](handleError(_0x18cc99,null));};exports['getMessages']=function(_0x2a43db,_0x8d30cc,_0x109b0a){var _0x5d71f9={'raw':![],'where':{}};var _0x40d0d5={};var _0x44366a={'count':0x0,'rows':[]};return db[_0x4beb('0x35')][_0x4beb('0x36')]({'where':{'id':_0x2a43db['params']['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x8d30cc,null))[_0x4beb('0x25')](function(_0x3a00b6){if(_0x3a00b6){_0x40d0d5[_0x4beb('0x3e')]=_[_0x4beb('0x40')](db[_0x4beb('0x2d')][_0x4beb('0x3d')]);_0x40d0d5[_0x4beb('0x3f')]=_[_0x4beb('0x40')](_0x2a43db[_0x4beb('0x3f')]);_0x40d0d5[_0x4beb('0x41')]=_['intersection'](_0x40d0d5[_0x4beb('0x3e')],_0x40d0d5['query']);_0x5d71f9[_0x4beb('0x42')]=_[_0x4beb('0x43')](_0x40d0d5[_0x4beb('0x3e')],qs['fields'](_0x2a43db[_0x4beb('0x3f')][_0x4beb('0x44')]));_0x5d71f9[_0x4beb('0x42')]=_0x5d71f9[_0x4beb('0x42')][_0x4beb('0x45')]?_0x5d71f9[_0x4beb('0x42')]:_0x40d0d5[_0x4beb('0x3e')];if(!_0x2a43db[_0x4beb('0x3f')][_0x4beb('0x46')]('nolimit')){_0x5d71f9[_0x4beb('0x1f')]=qs[_0x4beb('0x1f')](_0x2a43db[_0x4beb('0x3f')][_0x4beb('0x1f')]);_0x5d71f9['offset']=qs['offset'](_0x2a43db[_0x4beb('0x3f')][_0x4beb('0x1e')]);}_0x5d71f9[_0x4beb('0x48')]=qs[_0x4beb('0x49')](_0x2a43db['query'][_0x4beb('0x49')]);_0x5d71f9[_0x4beb('0x51')]=qs[_0x4beb('0x41')](_[_0x4beb('0xc3')](_0x2a43db['query'],_0x40d0d5[_0x4beb('0x41')]));_0x5d71f9[_0x4beb('0x51')][_0x4beb('0xb4')]=_0x3a00b6['id'];if(_0x2a43db[_0x4beb('0x3f')][_0x4beb('0x7b')]){_0x5d71f9[_0x4beb('0x51')]=_['merge'](_0x5d71f9[_0x4beb('0x51')],{'$or':_[_0x4beb('0x2f')](_0x5d71f9[_0x4beb('0x42')],function(_0x25bfe){var _0x1b8b1d={};_0x1b8b1d[_0x25bfe]={'$like':'%'+_0x2a43db['query']['filter']+'%'};return _0x1b8b1d;})});}if(_0x2a43db[_0x4beb('0x3f')][_0x4beb('0xc4')]){var _0x5bed76=_0x2a43db[_0x4beb('0x3f')]['$gte'][_0x4beb('0x32')](',');var _0x1b9f56={};_0x1b9f56[_0x5bed76[0x0]]={'$gte':moment(_0x5bed76[0x1])[_0x4beb('0x68')](_0x4beb('0xc5'))};_0x5d71f9[_0x4beb('0x51')]=_['merge'](_0x5d71f9[_0x4beb('0x51')],_0x1b9f56);}_0x5d71f9=_['merge']({},_0x5d71f9,_0x2a43db[_0x4beb('0xc6')]);return db['MailMessage'][_0x4beb('0x1d')]({'where':_0x5d71f9[_0x4beb('0x51')]})[_0x4beb('0x25')](function(_0x5556a7){_0x44366a['count']=_0x5556a7;if(_0x2a43db[_0x4beb('0x3f')][_0x4beb('0xb9')]){_0x5d71f9[_0x4beb('0xba')]=[{'all':!![]}];}return db[_0x4beb('0x2d')][_0x4beb('0xc7')](_0x5d71f9);})['then'](function(_0x507102){_0x44366a[_0x4beb('0xb7')]=_0x507102;return _0x44366a;});}})[_0x4beb('0x25')](respondWithFilteredResult(_0x8d30cc,_0x5d71f9))[_0x4beb('0x3b')](handleError(_0x8d30cc,null));};exports[_0x4beb('0xc8')]=function(_0x1d3098,_0x2583c5,_0x2a6702){return db[_0x4beb('0x35')][_0x4beb('0xbb')]({'where':{'id':_0x1d3098[_0x4beb('0xbe')]['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x2583c5,null))[_0x4beb('0x25')](function(_0x336065){if(_0x336065){return _0x336065['setTags'](_0x1d3098[_0x4beb('0xbd')][_0x4beb('0xc1')],_[_0x4beb('0xc2')](_0x1d3098['body'],[_0x4beb('0xc1'),'id'])||{})[_0x4beb('0xc9')](function(){return db[_0x4beb('0xca')][_0x4beb('0xc7')]({'attributes':['id',_0x4beb('0x29'),_0x4beb('0x4c')],'where':{'id':_0x1d3098[_0x4beb('0xbd')][_0x4beb('0xc1')]}});})['then'](function(_0x2c1cd1){socket[_0x4beb('0xcb')](_0x4beb('0xcc'),{'id':Number(_0x1d3098['params']['id']),'tags':_0x2c1cd1||[]});return{'id':Number(_0x1d3098[_0x4beb('0xbe')]['id']),'tags':_0x2c1cd1||[]};});}})[_0x4beb('0x25')](respondWithResult(_0x2583c5,null))['catch'](handleError(_0x2583c5,null));};exports[_0x4beb('0xcd')]=function(_0x5598cc,_0x1cfdac,_0x4b66f4){return db[_0x4beb('0x35')][_0x4beb('0xbb')]({'where':{'id':_0x5598cc[_0x4beb('0xbe')]['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x1cfdac,null))[_0x4beb('0x25')](function(_0x11564b){if(_0x11564b){return _0x11564b[_0x4beb('0xcd')](_0x5598cc['query'][_0x4beb('0xc1')]);}})['then'](respondWithStatusCode(_0x1cfdac,null))[_0x4beb('0x3b')](handleError(_0x1cfdac,null));};exports['download']=function(_0xb376e6,_0x226e08){var _0x1df131=moment()[_0x4beb('0xce')]()['toString']();var _0x3b2896=path[_0x4beb('0xcf')](config[_0x4beb('0xd0')],_0x4beb('0xd1'),_0x4beb('0xd2'),_0x4beb('0xd3'));var _0x53ce8c=path[_0x4beb('0xcf')](config[_0x4beb('0xd0')],_0x4beb('0xd1'),_0x4beb('0xd2'),_0x4beb('0xd4'));var _0x1b04d9=path[_0x4beb('0xcf')](_0x53ce8c,_0x1df131);var _0x20f9ca=util[_0x4beb('0x68')](_0x4beb('0xd5'),_0x1df131);var _0x1811b0=path[_0x4beb('0xcf')](_0x53ce8c,_0x20f9ca);var _0x33b6c9=![];return db[_0x4beb('0x35')]['find']({'where':{'id':_0xb376e6[_0x4beb('0xbe')]['id']}})[_0x4beb('0x25')](handleEntityNotFound(_0x226e08,null))[_0x4beb('0x25')](function(_0x9e960){if(_0x9e960){return _0x9e960[_0x4beb('0xd6')]({'attributes':['id',_0x4beb('0xbd'),_0x4beb('0x4d'),'to','cc',_0x4beb('0xd7'),'subject','createdAt'],'where':{'secret':![]},'include':_0xb376e6[_0x4beb('0x3f')][_0x4beb('0xd3')]?[{'model':db[_0x4beb('0xd8')],'as':_0x4beb('0xd9')}]:undefined,'order':qs[_0x4beb('0x49')]('id')});}return[];})[_0x4beb('0x25')](function(_0x3cfc82){_0x33b6c9=_0x3cfc82['length'];if(_0x3cfc82['length']){fs[_0x4beb('0xda')](_0x1b04d9);return BPromise['each'](_0x3cfc82,function(_0x29d15b,_0x421820){var _0x55ff68=_0x29d15b;var _0x20744d={'from':_0x55ff68[_0x4beb('0x4d')],'to':_0x55ff68['to'],'subject':_0x55ff68[_0x4beb('0xdb')],'html':_0x55ff68[_0x4beb('0xbd')],'headers':{'Date':moment(_0x55ff68['createdAt'])[_0x4beb('0x68')](_0x4beb('0xdc'))},'attachments':[]};if(_0x29d15b['cc']){_0x20744d[_0x4beb('0xdd')]['Cc']=_0x29d15b['cc'];}if(_0x29d15b[_0x4beb('0xd7')]){_0x20744d[_0x4beb('0xdd')][_0x4beb('0xde')]=_0x29d15b['bcc'];}return new BPromise(function(_0x161b99,_0x2bf3f8){if(_0x29d15b['Attachments']){for(var _0xb2170c=0x0;_0xb2170c<_0x29d15b['Attachments'][_0x4beb('0x45')];_0xb2170c++){var _0x28661c=_0x29d15b[_0x4beb('0xd9')][_0xb2170c];var _0x4b2224=path[_0x4beb('0xcf')](_0x3b2896,_0x28661c['basename']);if(fs[_0x4beb('0xdf')](_0x4b2224)){_0x20744d[_0x4beb('0xd3')][_0x4beb('0x34')]({'name':_0x28661c[_0x4beb('0x29')],'contentType':_0x28661c[_0x4beb('0xe0')],'data':fs[_0x4beb('0xe1')](_0x4b2224)});}}}emlformat[_0x4beb('0xe2')](_0x20744d,function(_0x3b403e,_0x54d1cb){if(_0x3b403e)return _0x2bf3f8(_0x3b403e);fs[_0x4beb('0xe3')](path[_0x4beb('0xcf')](_0x1b04d9,util[_0x4beb('0x68')](_0x4beb('0xe4'),_0x421820)),_0x54d1cb);return _0x161b99(_0x54d1cb);});});});}})[_0x4beb('0x25')](function(){if(_0x33b6c9){return new BPromise(function(_0x1c7ffd,_0x31ef29){zipdir(_0x1b04d9,{'saveTo':_0x1811b0},function(_0x20e463,_0x4d2ee1){if(_0x20e463)return _0x31ef29(_0x20e463);return _0x1c7ffd(_0x4d2ee1);});});}})[_0x4beb('0x25')](function(){if(_0x33b6c9){return new BPromise(function(_0x558cf8,_0x541213){rimraf(_0x1b04d9,function(_0x2d8313){if(_0x2d8313)_0x541213(_0x2d8313);return _0x558cf8();});});}})[_0x4beb('0x25')](function(){if(_0x33b6c9){return _0x226e08[_0x4beb('0xe5')](_0x1811b0,_0x20f9ca,function(_0x4d5f4d){if(_0x4d5f4d){console[_0x4beb('0xe6')](_0x4beb('0xe7'),_0x4d5f4d);}else{fs[_0x4beb('0xe8')](_0x1811b0);}});}else{return _0x226e08['sendStatus'](0xc8);}})[_0x4beb('0x3b')](handleError(_0x226e08,null));};
\ No newline at end of file
+var _0x7ef2=['hasOwnProperty','nolimit','order','sort','where','pick','select','field','color','from','tools_tags','COUNT(*)','mail_messages','me.MailInteractionId\x20=\x20i.id','me.read\x20=\x20false','u.id','ui.MailInteractionId','users','u.id\x20=\x20ui.UserId','left_join','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','expr','advancedFilter','parse','createdAt','value','startOf','utc','format','endOf','and','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','isArray','condition','Messages.count','\x20IN\x20?','tableAlias','\x20=\x20?','LIKE','ContactId','c.firstName','c.lastName','\x20LIKE\x20?','c.email','\x20>\x20?','\x20<\x20?','TagId','map','filter','isNil','isEmpty','MailAccountId','concat','$lte','null','replace','\x27\x27\x27\x27','c.email\x20LIKE\x20?','toString','join','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','DESC','group','read','%s\x20=\x200','`Messages.count`\x20=\x200','having','`Messages.count`\x20>\x200','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','mail_interaction_has_tags','it.MailInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','sequelize','keyBy','merge','a.key','Account.key','i.id','i.createdAt','i.updatedAt','i.closed','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.disposition','i.substatus','i.ContactId','i.UserId','Contact.firstName','Contact.lastName','Contact.email','c.mobile','Contact.mobile','c.fax','Contact.fax','ui.MailInteractionId\x20IN\x20?','groupBy','MailInteractionId','enableEmailPreview','all','rows','show','params','includeAll','include','find','body','describe','addMessage','ids','omit','getMessages','$gte','YYYY-MM-DD\x20HH:mm:ss','findAll','addTags','spread','removeTags','download','root','attachments','server','files','interaction-%s.zip','bcc','subject','Attachment','Attachments','mkdirSync','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','basename','existsSync','build','message%d.eml','html-pdf','rimraf','zip-dir','request-promise','moment','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','html-to-text','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./mailInteraction.socket','sendStatus','status','json','count','offset','limit','Content-Range','apply','reject','update','then','destroy','end','error','stack','name','send','MailMessage','unreadMessages','Users','Tags','TagIds','split','forEach','push','MailInteraction','findOne','lastMsgBody','lastMsgText','trimStart','fromString','catch','index','rawAttributes','model','keys','query','filters','attributes','intersection','fields','length'];(function(_0x2f0fb3,_0x462de7){var _0xa16be4=function(_0x17f055){while(--_0x17f055){_0x2f0fb3['push'](_0x2f0fb3['shift']());}};_0xa16be4(++_0x462de7);}(_0x7ef2,0x15d));var _0x27ef=function(_0x3fa6b9,_0x3be0e7){_0x3fa6b9=_0x3fa6b9-0x0;var _0x583d33=_0x7ef2[_0x3fa6b9];return _0x583d33;};'use strict';var pdf=require(_0x27ef('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x27ef('0x1'));var zipdir=require(_0x27ef('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x27ef('0x3'));var moment=require(_0x27ef('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x27ef('0x5'));var path=require(_0x27ef('0x6'));var sox=require('sox');var csv=require(_0x27ef('0x7'));var ejs=require(_0x27ef('0x8'));var fs=require('fs');var _=require(_0x27ef('0x9'));var squel=require('squel');var crypto=require(_0x27ef('0xa'));var jsforce=require(_0x27ef('0xb'));var deskjs=require(_0x27ef('0xc'));var toCsv=require(_0x27ef('0x7'));var querystring=require(_0x27ef('0xd'));var Papa=require('papaparse');var htmlToText=require(_0x27ef('0xe'));var Redis=require('ioredis');var authService=require(_0x27ef('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x27ef('0x10'));var logger=require('../../config/logger')(_0x27ef('0x11'));var utils=require(_0x27ef('0x12'));var config=require(_0x27ef('0x13'));var db=require(_0x27ef('0x14'))['db'];config[_0x27ef('0x15')]=_[_0x27ef('0x16')](config[_0x27ef('0x15')],{'host':'localhost','port':0x18eb});var socket=require(_0x27ef('0x17'))(new Redis(config[_0x27ef('0x15')]));require(_0x27ef('0x18'))['register'](socket);function respondWithStatusCode(_0x4784d1,_0x4cd12a){_0x4cd12a=_0x4cd12a||0xcc;return function(_0x14702f){if(_0x14702f){return _0x4784d1[_0x27ef('0x19')](_0x4cd12a);}return _0x4784d1[_0x27ef('0x1a')](_0x4cd12a)['end']();};}function respondWithResult(_0x448240,_0x645644){_0x645644=_0x645644||0xc8;return function(_0x21bfb9){if(_0x21bfb9){return _0x448240[_0x27ef('0x1a')](_0x645644)[_0x27ef('0x1b')](_0x21bfb9);}};}function respondWithFilteredResult(_0x3b4303,_0x40f28d){return function(_0x285ff5){if(_0x285ff5){var _0x555b34=_0x285ff5[_0x27ef('0x1c')],_0x218945=_0x40f28d[_0x27ef('0x1d')],_0x2bfa38=_0x40f28d['offset']+_0x40f28d[_0x27ef('0x1e')],_0x2903b8;if(_0x2bfa38>=_0x555b34){_0x2bfa38=_0x555b34;_0x2903b8=0xc8;}else{_0x2903b8=0xce;}_0x3b4303[_0x27ef('0x1a')](_0x2903b8);return _0x3b4303['set'](_0x27ef('0x1f'),_0x218945+'-'+_0x2bfa38+'/'+_0x555b34)[_0x27ef('0x1b')](_0x285ff5);}return null;};}function patchUpdates(_0x550f24){return function(_0x13a3fd){try{jsonpatch[_0x27ef('0x20')](_0x13a3fd,_0x550f24,!![]);}catch(_0x3c41ef){return BPromise[_0x27ef('0x21')](_0x3c41ef);}return _0x13a3fd['save']();};}function saveUpdates(_0x4db4e6,_0x39e3d5){return function(_0xc6b41d){if(_0xc6b41d){return _0xc6b41d[_0x27ef('0x22')](_0x4db4e6)[_0x27ef('0x23')](function(_0x4e9cc7){return _0x4e9cc7;});}return null;};}function removeEntity(_0x8f7736,_0xb292b7){return function(_0x3d5d5b){if(_0x3d5d5b){return _0x3d5d5b[_0x27ef('0x24')]()[_0x27ef('0x23')](function(){_0x8f7736[_0x27ef('0x1a')](0xcc)[_0x27ef('0x25')]();});}};}function handleEntityNotFound(_0x37ee55,_0x242e29){return function(_0x97210d){if(!_0x97210d){_0x37ee55[_0x27ef('0x19')](0x194);}return _0x97210d;};}function handleError(_0x34a878,_0x12c999){_0x12c999=_0x12c999||0x1f4;return function(_0x2652e9){logger[_0x27ef('0x26')](_0x2652e9[_0x27ef('0x27')]);if(_0x2652e9[_0x27ef('0x28')]){delete _0x2652e9['name'];}_0x34a878[_0x27ef('0x1a')](_0x12c999)[_0x27ef('0x29')](_0x2652e9);};}function getInteractionUnreadMessages(_0x77e7d5){return new BPromise(function(_0x1748b1,_0x776c3a){try{if(_0x77e7d5['closed']){_0x77e7d5['unreadMessages']=0x0;_0x1748b1(_0x77e7d5);}else{return db[_0x27ef('0x2a')][_0x27ef('0x1c')]({'where':{'MailInteractionId':_0x77e7d5['id'],'direction':'in','read':![]}})['then'](function(_0x19753e){_0x77e7d5[_0x27ef('0x2b')]=_0x19753e;_0x1748b1(_0x77e7d5);});}}catch(_0x5aa3df){_0x776c3a(_0x5aa3df);}});}function getInteractionUsers(_0x232042,_0x11f21a){return new BPromise(function(_0x4b7f1a,_0x2f83b8){try{if(_0x11f21a[_0x232042['id']]){_0x232042[_0x27ef('0x2c')]=_['map'](_0x11f21a[_0x232042['id']],function(_0x242a96){return{'id':_0x242a96['id']};});}}catch(_0x43ceab){_0x2f83b8(_0x43ceab);}_0x4b7f1a(_0x232042);});}function getInteractionTags(_0x3ef13b,_0x9f1e16){return new BPromise(function(_0x2b91fa,_0x425ae4){try{if(_0x3ef13b['TagIds']){_0x3ef13b[_0x27ef('0x2d')]=[];_0x3ef13b[_0x27ef('0x2e')][_0x27ef('0x2f')](',')[_0x27ef('0x30')](function(_0x546cef){_0x3ef13b[_0x27ef('0x2d')][_0x27ef('0x31')](_0x9f1e16[_0x546cef]);});}delete _0x3ef13b[_0x27ef('0x2e')];}catch(_0x58f318){_0x425ae4(_0x58f318);}_0x2b91fa(_0x3ef13b);});}function getLastMessageText(_0x31be70){return new BPromise(function(_0x424bf2,_0x3d42fe){return db[_0x27ef('0x32')][_0x27ef('0x33')]({'where':{'id':_0x31be70['id']},'attributes':[_0x27ef('0x34'),'lastMsgText'],'raw':!![]})[_0x27ef('0x23')](function(_0x2ecfef){if(!_0x2ecfef[_0x27ef('0x35')]){_0x31be70[_0x27ef('0x35')]=_[_0x27ef('0x36')](htmlToText[_0x27ef('0x37')](_0x2ecfef['lastMsgBody'],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]}));}else{_0x31be70['lastMsgText']=_0x2ecfef[_0x27ef('0x35')];}_0x424bf2(_0x31be70);})[_0x27ef('0x38')](function(_0x43a368){_0x3d42fe(_0x43a368);});});}function updateMailInteraction(_0x141f99,_0x578837,_0x480d59,_0x45c730){return new BPromise(function(_0x43f0f8,_0x6dbe5f){return getInteractionUnreadMessages(_0x141f99)[_0x27ef('0x23')](function(_0x4c3e33){return getInteractionUsers(_0x4c3e33,_0x480d59);})[_0x27ef('0x23')](function(_0x491041){return getInteractionTags(_0x491041,_0x578837);})[_0x27ef('0x23')](function(_0x486073){if(_0x45c730){_0x43f0f8(getLastMessageText(_0x486073));}else{_0x43f0f8(_0x486073);}})[_0x27ef('0x38')](function(_0x4f6431){_0x6dbe5f(_0x4f6431);});});}exports[_0x27ef('0x39')]=function(_0x3e3482,_0x50263b){var _0xae1e86={},_0xe265cc={},_0xbabef6={'count':0x0,'rows':[]};var _0x124239=db[_0x27ef('0x32')][_0x27ef('0x3a')];_0xe265cc[_0x27ef('0x3b')]=_[_0x27ef('0x3c')](_0x124239);_0xe265cc[_0x27ef('0x3d')]=_['keys'](_0x3e3482[_0x27ef('0x3d')]);_0xe265cc[_0x27ef('0x3e')]=_['intersection'](_0xe265cc[_0x27ef('0x3b')],_0xe265cc['query']);_0xae1e86[_0x27ef('0x3f')]=_[_0x27ef('0x40')](_0xe265cc['model'],qs[_0x27ef('0x41')](_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x41')]));_0xae1e86['attributes']=_0xae1e86['attributes'][_0x27ef('0x42')]?_0xae1e86[_0x27ef('0x3f')]:_0xe265cc[_0x27ef('0x3b')];if(!_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x43')](_0x27ef('0x44'))){_0xae1e86[_0x27ef('0x1e')]=qs['limit'](_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x1e')]);_0xae1e86[_0x27ef('0x1d')]=qs[_0x27ef('0x1d')](_0x3e3482['query'][_0x27ef('0x1d')]);}_0xae1e86[_0x27ef('0x45')]=qs[_0x27ef('0x46')](_0x3e3482['query']['sort']);_0xae1e86[_0x27ef('0x47')]=qs['filters'](_[_0x27ef('0x48')](_0x3e3482[_0x27ef('0x3d')],_0xe265cc['filters']));var _0x18c886=[];var _0xc4f502=squel[_0x27ef('0x49')]()[_0x27ef('0x4a')]('id')[_0x27ef('0x4a')]('name')[_0x27ef('0x4a')](_0x27ef('0x4b'))[_0x27ef('0x4c')](_0x27ef('0x4d'));var _0x5e8e19=squel[_0x27ef('0x49')]()[_0x27ef('0x4a')](_0x27ef('0x4e'))['from'](_0x27ef('0x4f'),'me')[_0x27ef('0x47')](_0x27ef('0x50'))[_0x27ef('0x47')]('me.direction\x20=\x20\x27in\x27')[_0x27ef('0x47')](_0x27ef('0x51'));var _0x312c01=squel[_0x27ef('0x49')]()[_0x27ef('0x4a')](_0x27ef('0x52'))[_0x27ef('0x4a')](_0x27ef('0x53'))[_0x27ef('0x4c')]('user_has_mail_interactions','ui')['left_join'](_0x27ef('0x54'),'u',_0x27ef('0x55'));var _0x12c869=squel[_0x27ef('0x49')]()[_0x27ef('0x4c')]('mail_interactions','i')[_0x27ef('0x56')]('cm_contacts','c',_0x27ef('0x57'))[_0x27ef('0x56')](_0x27ef('0x54'),'o',_0x27ef('0x58'))['left_join']('mail_accounts','a','a.id\x20=\x20i.MailAccountId')[_0x27ef('0x56')]('mail_messages','me',_0x27ef('0x50'));var _0x349138=squel[_0x27ef('0x59')]();if(_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x5a')]){var _0x55f713=JSON[_0x27ef('0x5b')](_0x3e3482['query'][_0x27ef('0x5a')]);_[_0x27ef('0x3c')](_0x55f713)[_0x27ef('0x30')](function(_0x45e4f3){var _0x48b36d=_0x55f713[_0x45e4f3];if(_0x45e4f3===_0x27ef('0x5c')){var _0x16f53d=moment(_0x48b36d[_0x27ef('0x5d')]['dateStart'])[_0x27ef('0x5e')]('day')[_0x27ef('0x5f')]()[_0x27ef('0x60')]();var _0x1ec7ff=moment(_0x1ec7ff)[_0x27ef('0x5f')]()[_0x27ef('0x61')]('day')[_0x27ef('0x60')]();_0x349138[_0x27ef('0x62')](_0x27ef('0x63'),_0x16f53d,_0x1ec7ff);}else{if(_[_0x27ef('0x64')](_0x48b36d[_0x27ef('0x65')])){_0x48b36d['condition'][_0x27ef('0x30')](function(_0x235c3e){switch(_0x48b36d[_0x27ef('0x65')][_0x27ef('0x5d')]){case'IS':if(_0x45e4f3!=='TagId'&&_0x45e4f3!==_0x27ef('0x66')){if(_[_0x27ef('0x64')](_0x48b36d[_0x27ef('0x5d')])&&_0x48b36d[_0x27ef('0x5d')]['length']>0x1){_0x349138[_0x27ef('0x62')](_0x48b36d['tableAlias']+'.'+_0x45e4f3+_0x27ef('0x67'),_0x48b36d[_0x27ef('0x5d')]);}else{_0x349138['and'](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+_0x27ef('0x69'),_0x48b36d[_0x27ef('0x5d')][0x0]);}}break;case'=':_0x349138['and'](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+_0x27ef('0x69'),_0x48b36d[_0x27ef('0x5d')]);break;case _0x27ef('0x6a'):if(_0x45e4f3===_0x27ef('0x6b')){_0x349138['and'](_0x27ef('0x6c')+'\x20LIKE\x20?','%'+_0x48b36d['value']+'%');_0x349138['or'](_0x27ef('0x6d')+_0x27ef('0x6e'),'%'+_0x48b36d['value']+'%');_0x349138['or'](_0x27ef('0x6f')+_0x27ef('0x6e'),'%'+_0x48b36d[_0x27ef('0x5d')]+'%');}else{_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+_0x27ef('0x6e'),'%'+_0x48b36d['value']+'%');}break;case'>':_0x349138[_0x27ef('0x62')](_0x48b36d['tableAlias']+'.'+_0x45e4f3+_0x27ef('0x70'),_0x48b36d[_0x27ef('0x5d')]);break;case'<':_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+_0x27ef('0x71'),_0x48b36d[_0x27ef('0x5d')]);break;}});}else{switch(_0x48b36d['condition'][_0x27ef('0x5d')]){case'IS':if(_0x45e4f3!==_0x27ef('0x72')&&_0x45e4f3!==_0x27ef('0x66')){if(_[_0x27ef('0x64')](_0x48b36d['value'])&&_0x48b36d[_0x27ef('0x5d')][_0x27ef('0x42')]>0x1){_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+'\x20IN\x20?',_0x48b36d[_0x27ef('0x5d')]);}else{_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+_0x27ef('0x69'),_0x48b36d[_0x27ef('0x5d')][0x0]);}}break;case'=':_0x349138[_0x27ef('0x62')](_0x48b36d['tableAlias']+'.'+_0x45e4f3+_0x27ef('0x69'),_0x48b36d[_0x27ef('0x5d')]);break;case _0x27ef('0x6a'):if(_0x45e4f3===_0x27ef('0x6b')){_0x349138[_0x27ef('0x62')](_0x27ef('0x6c')+_0x27ef('0x6e'),'%'+_0x48b36d[_0x27ef('0x5d')]+'%');_0x349138['or'](_0x27ef('0x6d')+_0x27ef('0x6e'),'%'+_0x48b36d[_0x27ef('0x5d')]+'%');_0x349138['or'](_0x27ef('0x6f')+'\x20LIKE\x20?','%'+_0x48b36d[_0x27ef('0x5d')]+'%');}else{_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+'\x20LIKE\x20?','%'+_0x48b36d[_0x27ef('0x5d')]+'%');}break;case'>':_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+'\x20>\x20?',_0x48b36d[_0x27ef('0x5d')]);break;case'<':_0x349138[_0x27ef('0x62')](_0x48b36d[_0x27ef('0x68')]+'.'+_0x45e4f3+_0x27ef('0x71'),_0x48b36d['value']);break;}}}});}else{var _0x56ad18=_(Object[_0x27ef('0x3c')](_0x3e3482[_0x27ef('0x3d')]))[_0x27ef('0x73')](function(_0x1506cb){return _0x124239[_0x27ef('0x43')](_0x1506cb)?_0x1506cb:undefined;})[_0x27ef('0x74')](function(_0x3f1a46){return!_[_0x27ef('0x75')](_0x3f1a46);})[_0x27ef('0x5d')]();if(!_[_0x27ef('0x76')](_0x56ad18)){_0x56ad18[_0x27ef('0x30')](function(_0x41a339){if(_0x41a339===_0x27ef('0x77')){_0x12c869[_0x27ef('0x47')]('i.MailAccountId\x20IN\x20?',[][_0x27ef('0x78')](_0x3e3482[_0x27ef('0x3d')][_0x41a339]));}else if(_0x41a339===_0x27ef('0x5c')){var _0x478115=JSON['parse'](_0x3e3482[_0x27ef('0x3d')][_0x41a339])['$gte'];var _0x35411d=JSON[_0x27ef('0x5b')](_0x3e3482[_0x27ef('0x3d')][_0x41a339])[_0x27ef('0x79')];_0x12c869['where'](_0x27ef('0x63'),_0x478115,_0x35411d);}else{if(_0x3e3482['query'][_0x41a339]===_0x27ef('0x7a')){_0x12c869[_0x27ef('0x47')]('i.'+_0x41a339+'\x20IS\x20NULL');}else{_0x12c869['where']('i.'+_0x41a339+'\x20=\x20?',_0x3e3482[_0x27ef('0x3d')][_0x41a339]);}}});}if(_0x3e3482[_0x27ef('0x3d')]['filter']){var _0x254d40=_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x74')]['replace']('\x5c','\x5c\x5c')[_0x27ef('0x7b')]('\x27\x27',_0x27ef('0x7c'));if(qs['isNumeric'](_0x254d40)){_0x349138['or']('i.id\x20LIKE\x20?',_0x254d40+'%');}else if(qs['isEmail'](_0x254d40)){_0x349138['or'](_0x27ef('0x7d'),_0x254d40+'%');}else{var _0x2ac5ef=[];_0x254d40[_0x27ef('0x2f')]('\x20')[_0x27ef('0x30')](function(_0x260384){_0x2ac5ef[_0x27ef('0x31')]('+'+_0x260384[_0x27ef('0x7e')]());});var _0x155180=_0x2ac5ef[_0x27ef('0x7f')]('\x20');_0x349138['or'](_0x27ef('0x80'),_0x155180)['or'](_0x27ef('0x81'),_0x155180);}}}_0x12c869[_0x27ef('0x47')](_0x349138);if(_0xae1e86[_0x27ef('0x45')]){_0xae1e86[_0x27ef('0x45')][_0x27ef('0x30')](function(_0x276889){_0x12c869[_0x27ef('0x45')]('i.'+_0x276889[0x0],_0x276889[0x1]===_0x27ef('0x82')?![]:!![]);});}_0x12c869[_0x27ef('0x83')]('i.id');var _0x532ec4={'type':db['Sequelize']['QueryTypes']['SELECT'],'raw':!![]};var _0x71cb6d=_0x12c869['clone']()['field'](_0x27ef('0x4e'));if(!_0x3e3482[_0x27ef('0x3d')]['advancedFilter']){if(_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x84')]){if(_0x3e3482['query'][_0x27ef('0x84')]==0x1){_0x71cb6d[_0x27ef('0x47')](util[_0x27ef('0x60')](_0x27ef('0x85'),_0x5e8e19['toString']()));_0x12c869['having'](_0x27ef('0x86'));}else{_0x71cb6d[_0x27ef('0x47')](util[_0x27ef('0x60')]('%s\x20>\x200',_0x5e8e19[_0x27ef('0x7e')]()));_0x12c869[_0x27ef('0x87')](_0x27ef('0x88'));}}if(_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x89')]){var _0x454cab=_[_0x27ef('0x64')](_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x89')])?_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x89')]:new Array(_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x89')]);var _0x4ffd6f=squel[_0x27ef('0x59')]();_0x454cab['forEach'](function(_0x1e2022){_0x4ffd6f['or'](_0x27ef('0x8a'),'%,'+_0x1e2022+',%');});_0x12c869[_0x27ef('0x87')](_0x4ffd6f);_0x71cb6d[_0x27ef('0x56')](_0x27ef('0x8b'),'it',_0x27ef('0x8c'));_0x71cb6d[_0x27ef('0x56')](_0x27ef('0x4d'),'t',_0x27ef('0x8d'));_0x71cb6d[_0x27ef('0x47')](_0x27ef('0x8e'),_0x454cab);}}else{var _0x55f713=JSON[_0x27ef('0x5b')](_0x3e3482[_0x27ef('0x3d')][_0x27ef('0x5a')]);_[_0x27ef('0x3c')](_0x55f713)[_0x27ef('0x30')](function(_0x220b72){var _0x2a3e1d=_0x55f713[_0x220b72];if(_0x220b72===_0x27ef('0x72')){var _0x4cbd2f=_0x2a3e1d['value'];var _0x595102=squel['expr']();_0x4cbd2f[_0x27ef('0x30')](function(_0x24c6b5){_0x595102['or'](_0x27ef('0x8a'),'%,'+_0x24c6b5+',%');});_0x12c869[_0x27ef('0x87')](_0x595102);_0x71cb6d[_0x27ef('0x56')](_0x27ef('0x8b'),'it',_0x27ef('0x8c'));_0x71cb6d[_0x27ef('0x56')](_0x27ef('0x4d'),'t',_0x27ef('0x8d'));_0x71cb6d['where'](_0x27ef('0x8e'),_0x4cbd2f);}else if(_0x220b72===_0x27ef('0x66')){if(_0x2a3e1d[_0x27ef('0x5d')][_0x27ef('0x42')]===0x1){if(_0x2a3e1d[_0x27ef('0x5d')][0x0]===0x1){_0x71cb6d['where'](util['format'](_0x27ef('0x85'),_0x5e8e19[_0x27ef('0x7e')]()));_0x12c869['having']('`Messages.count`\x20=\x200');}else{_0x71cb6d['where'](util[_0x27ef('0x60')]('%s\x20>\x200',_0x5e8e19[_0x27ef('0x7e')]()));_0x12c869['having'](_0x27ef('0x88'));}}}});}db[_0x27ef('0x8f')]['query'](_0x71cb6d[_0x27ef('0x7e')](),_0x532ec4)['then'](function(_0x2422c8){_0xbabef6[_0x27ef('0x1c')]=_0x2422c8['length'];if(_0xbabef6[_0x27ef('0x1c')]===0x0)return[];return db['sequelize'][_0x27ef('0x3d')](_0xc4f502['toString'](),_0x532ec4)[_0x27ef('0x23')](function(_0x29a51a){_0x18c886=_[_0x27ef('0x90')](_0x29a51a,'id');_0x532ec4=_[_0x27ef('0x91')](_0x532ec4,{'model':db[_0x27ef('0x32')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x12c869[_0x27ef('0x4a')](_0x27ef('0x92'),_0x27ef('0x93'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x94'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x95'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x96'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x97'));_0x12c869[_0x27ef('0x4a')]('i.closedAt');_0x12c869[_0x27ef('0x4a')](_0x27ef('0x98'));_0x12c869['field'](_0x27ef('0x99'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x9a'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x9b'));_0x12c869['field'](_0x27ef('0x9c'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x9d'));_0x12c869[_0x27ef('0x4a')]('i.to');_0x12c869[_0x27ef('0x4a')](_0x27ef('0x9e'));_0x12c869[_0x27ef('0x4a')]('i.MailAccountId');_0x12c869[_0x27ef('0x4a')](_0x27ef('0x9f'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0x6c'),_0x27ef('0xa0'));_0x12c869['field'](_0x27ef('0x6d'),_0x27ef('0xa1'));_0x12c869['field'](_0x27ef('0x6f'),_0x27ef('0xa2'));_0x12c869[_0x27ef('0x4a')]('c.phone','Contact.phone');_0x12c869[_0x27ef('0x4a')](_0x27ef('0xa3'),_0x27ef('0xa4'));_0x12c869[_0x27ef('0x4a')](_0x27ef('0xa5'),_0x27ef('0xa6'));_0x12c869[_0x27ef('0x4a')]('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds');_0x12c869[_0x27ef('0x56')]('mail_interaction_has_tags','it',_0x27ef('0x8c'));_0x12c869[_0x27ef('0x56')](_0x27ef('0x4d'),'t',_0x27ef('0x8d'));_0x12c869['limit'](_0xae1e86[_0x27ef('0x1e')]);_0x12c869[_0x27ef('0x1d')](_0xae1e86['offset']);return db[_0x27ef('0x8f')][_0x27ef('0x3d')](_0x12c869[_0x27ef('0x7e')](),_0x532ec4);})[_0x27ef('0x23')](function(_0xbab129){_0x312c01[_0x27ef('0x47')](_0x27ef('0xa7'),_['map'](_0xbab129,'id'));return db[_0x27ef('0x8f')][_0x27ef('0x3d')](_0x312c01[_0x27ef('0x7e')](),_0x532ec4)['then'](function(_0x24dafc){var _0x4f84b9=_[_0x27ef('0xa8')](_0x24dafc,_0x27ef('0xa9'));var _0x5e72ab=[];return db['Setting']['findOne']({'attributes':[_0x27ef('0xaa')],'raw':!![]})['then'](function(_0x2de334){var _0x5297b2=_0x2de334['enableEmailPreview'];_0xbab129[_0x27ef('0x30')](function(_0x39f05e){_0x5e72ab[_0x27ef('0x31')](updateMailInteraction(_0x39f05e,_0x18c886,_0x4f84b9,_0x5297b2));});return BPromise[_0x27ef('0xab')](_0x5e72ab);});});});})[_0x27ef('0x23')](function(_0x387241){_0xbabef6[_0x27ef('0xac')]=_0x387241;return _0xbabef6;})[_0x27ef('0x23')](respondWithFilteredResult(_0x50263b,_0xae1e86))['catch'](handleError(_0x50263b,null));};exports[_0x27ef('0xad')]=function(_0xcb57d2,_0x1f578b){var _0x16ee1a={'raw':![],'where':{'id':_0xcb57d2[_0x27ef('0xae')]['id']}},_0x13074f={};_0x13074f['model']=_[_0x27ef('0x3c')](db[_0x27ef('0x32')][_0x27ef('0x3a')]);_0x13074f['query']=_['keys'](_0xcb57d2[_0x27ef('0x3d')]);_0x13074f[_0x27ef('0x3e')]=_[_0x27ef('0x40')](_0x13074f[_0x27ef('0x3b')],_0x13074f[_0x27ef('0x3d')]);_0x16ee1a['attributes']=_[_0x27ef('0x40')](_0x13074f['model'],qs[_0x27ef('0x41')](_0xcb57d2[_0x27ef('0x3d')]['fields']));_0x16ee1a['attributes']=_0x16ee1a[_0x27ef('0x3f')]['length']?_0x16ee1a[_0x27ef('0x3f')]:_0x13074f[_0x27ef('0x3b')];if(_0xcb57d2[_0x27ef('0x3d')][_0x27ef('0xaf')]){_0x16ee1a[_0x27ef('0xb0')]=[{'all':!![]}];}_0x16ee1a=_[_0x27ef('0x91')]({},_0x16ee1a,_0xcb57d2['options']);return db['MailInteraction'][_0x27ef('0xb1')](_0x16ee1a)[_0x27ef('0x23')](handleEntityNotFound(_0x1f578b,null))[_0x27ef('0x23')](respondWithResult(_0x1f578b,null))[_0x27ef('0x38')](handleError(_0x1f578b,null));};exports['create']=function(_0x1ad44b,_0x1fdb72){return db[_0x27ef('0x32')]['create'](_0x1ad44b[_0x27ef('0xb2')],{})[_0x27ef('0x23')](respondWithResult(_0x1fdb72,0xc9))[_0x27ef('0x38')](handleError(_0x1fdb72,null));};exports[_0x27ef('0x22')]=function(_0x26d2b6,_0x368d67){if(_0x26d2b6[_0x27ef('0xb2')]['id']){delete _0x26d2b6[_0x27ef('0xb2')]['id'];}return db[_0x27ef('0x32')][_0x27ef('0xb1')]({'where':{'id':_0x26d2b6[_0x27ef('0xae')]['id']}})[_0x27ef('0x23')](handleEntityNotFound(_0x368d67,null))[_0x27ef('0x23')](saveUpdates(_0x26d2b6[_0x27ef('0xb2')],null))[_0x27ef('0x23')](respondWithResult(_0x368d67,null))[_0x27ef('0x38')](handleError(_0x368d67,null));};exports[_0x27ef('0x24')]=function(_0xd9f031,_0x271ea8){return db[_0x27ef('0x32')][_0x27ef('0xb1')]({'where':{'id':_0xd9f031[_0x27ef('0xae')]['id']}})[_0x27ef('0x23')](handleEntityNotFound(_0x271ea8,null))[_0x27ef('0x23')](removeEntity(_0x271ea8,null))[_0x27ef('0x38')](handleError(_0x271ea8,null));};exports[_0x27ef('0xb3')]=function(_0x50f684,_0x490e11){return db[_0x27ef('0x32')][_0x27ef('0xb3')]()['then'](respondWithResult(_0x490e11,null))[_0x27ef('0x38')](handleError(_0x490e11,null));};exports[_0x27ef('0xb4')]=function(_0x2a91f8,_0x255108,_0xd3a46f){return db[_0x27ef('0x2a')][_0x27ef('0xb1')]({'where':{'id':_0x2a91f8[_0x27ef('0xae')]['id']}})[_0x27ef('0x23')](handleEntityNotFound(_0x255108,null))[_0x27ef('0x23')](function(_0x1ee804){if(_0x1ee804){return _0x1ee804['addMessage'](_0x2a91f8[_0x27ef('0xb2')][_0x27ef('0xb5')],_[_0x27ef('0xb6')](_0x2a91f8[_0x27ef('0xb2')],['ids','id'])||{});}})['then'](respondWithResult(_0x255108,null))[_0x27ef('0x38')](handleError(_0x255108,null));};exports[_0x27ef('0xb7')]=function(_0x1cd030,_0x8317a3,_0x4bc813){var _0x1b6443={'raw':![],'where':{}};var _0xe41984={};var _0x535484={'count':0x0,'rows':[]};return db['MailInteraction'][_0x27ef('0x33')]({'where':{'id':_0x1cd030[_0x27ef('0xae')]['id']}})['then'](handleEntityNotFound(_0x8317a3,null))[_0x27ef('0x23')](function(_0x4fc353){if(_0x4fc353){_0xe41984['model']=_[_0x27ef('0x3c')](db['MailMessage'][_0x27ef('0x3a')]);_0xe41984[_0x27ef('0x3d')]=_[_0x27ef('0x3c')](_0x1cd030[_0x27ef('0x3d')]);_0xe41984[_0x27ef('0x3e')]=_[_0x27ef('0x40')](_0xe41984['model'],_0xe41984[_0x27ef('0x3d')]);_0x1b6443[_0x27ef('0x3f')]=_['intersection'](_0xe41984[_0x27ef('0x3b')],qs[_0x27ef('0x41')](_0x1cd030[_0x27ef('0x3d')][_0x27ef('0x41')]));_0x1b6443['attributes']=_0x1b6443[_0x27ef('0x3f')]['length']?_0x1b6443['attributes']:_0xe41984[_0x27ef('0x3b')];if(!_0x1cd030[_0x27ef('0x3d')][_0x27ef('0x43')](_0x27ef('0x44'))){_0x1b6443[_0x27ef('0x1e')]=qs[_0x27ef('0x1e')](_0x1cd030[_0x27ef('0x3d')]['limit']);_0x1b6443[_0x27ef('0x1d')]=qs[_0x27ef('0x1d')](_0x1cd030[_0x27ef('0x3d')][_0x27ef('0x1d')]);}_0x1b6443[_0x27ef('0x45')]=qs[_0x27ef('0x46')](_0x1cd030[_0x27ef('0x3d')][_0x27ef('0x46')]);_0x1b6443['where']=qs[_0x27ef('0x3e')](_[_0x27ef('0x48')](_0x1cd030[_0x27ef('0x3d')],_0xe41984[_0x27ef('0x3e')]));_0x1b6443['where'][_0x27ef('0xa9')]=_0x4fc353['id'];if(_0x1cd030[_0x27ef('0x3d')][_0x27ef('0x74')]){_0x1b6443[_0x27ef('0x47')]=_[_0x27ef('0x91')](_0x1b6443[_0x27ef('0x47')],{'$or':_['map'](_0x1b6443[_0x27ef('0x3f')],function(_0x4a84c0){var _0x1a4852={};_0x1a4852[_0x4a84c0]={'$like':'%'+_0x1cd030[_0x27ef('0x3d')][_0x27ef('0x74')]+'%'};return _0x1a4852;})});}if(_0x1cd030['query'][_0x27ef('0xb8')]){var _0x3b19e8=_0x1cd030[_0x27ef('0x3d')]['$gte'][_0x27ef('0x2f')](',');var _0x5c7354={};_0x5c7354[_0x3b19e8[0x0]]={'$gte':moment(_0x3b19e8[0x1])[_0x27ef('0x60')](_0x27ef('0xb9'))};_0x1b6443[_0x27ef('0x47')]=_[_0x27ef('0x91')](_0x1b6443[_0x27ef('0x47')],_0x5c7354);}_0x1b6443=_['merge']({},_0x1b6443,_0x1cd030['options']);return db[_0x27ef('0x2a')]['count']({'where':_0x1b6443[_0x27ef('0x47')]})[_0x27ef('0x23')](function(_0x5e2a8a){_0x535484[_0x27ef('0x1c')]=_0x5e2a8a;if(_0x1cd030[_0x27ef('0x3d')][_0x27ef('0xaf')]){_0x1b6443[_0x27ef('0xb0')]=[{'all':!![]}];}return db['MailMessage'][_0x27ef('0xba')](_0x1b6443);})[_0x27ef('0x23')](function(_0xa0081c){_0x535484['rows']=_0xa0081c;return _0x535484;});}})[_0x27ef('0x23')](respondWithFilteredResult(_0x8317a3,_0x1b6443))['catch'](handleError(_0x8317a3,null));};exports[_0x27ef('0xbb')]=function(_0x6d1b03,_0x142d28,_0x1f029d){return db['MailInteraction']['find']({'where':{'id':_0x6d1b03['params']['id']}})[_0x27ef('0x23')](handleEntityNotFound(_0x142d28,null))[_0x27ef('0x23')](function(_0xddf09c){if(_0xddf09c){return _0xddf09c['setTags'](_0x6d1b03[_0x27ef('0xb2')][_0x27ef('0xb5')],_['omit'](_0x6d1b03['body'],[_0x27ef('0xb5'),'id'])||{})[_0x27ef('0xbc')](function(){return db['Tag'][_0x27ef('0xba')]({'attributes':['id',_0x27ef('0x28'),_0x27ef('0x4b')],'where':{'id':_0x6d1b03['body'][_0x27ef('0xb5')]}});})['then'](function(_0xceafab){socket['emit']('mailInteractionTags:save',{'id':Number(_0x6d1b03['params']['id']),'tags':_0xceafab||[]});return{'id':Number(_0x6d1b03[_0x27ef('0xae')]['id']),'tags':_0xceafab||[]};});}})[_0x27ef('0x23')](respondWithResult(_0x142d28,null))[_0x27ef('0x38')](handleError(_0x142d28,null));};exports[_0x27ef('0xbd')]=function(_0xb995fc,_0x3171b2,_0x4d4f6b){return db[_0x27ef('0x32')][_0x27ef('0xb1')]({'where':{'id':_0xb995fc[_0x27ef('0xae')]['id']}})[_0x27ef('0x23')](handleEntityNotFound(_0x3171b2,null))[_0x27ef('0x23')](function(_0x8990f9){if(_0x8990f9){return _0x8990f9[_0x27ef('0xbd')](_0xb995fc['query'][_0x27ef('0xb5')]);}})[_0x27ef('0x23')](respondWithStatusCode(_0x3171b2,null))['catch'](handleError(_0x3171b2,null));};exports[_0x27ef('0xbe')]=function(_0x53ca61,_0x52eb48){var _0x3b7de0=moment()['unix']()[_0x27ef('0x7e')]();var _0x5a289a=path['join'](config[_0x27ef('0xbf')],'server','files',_0x27ef('0xc0'));var _0xec2fee=path[_0x27ef('0x7f')](config[_0x27ef('0xbf')],_0x27ef('0xc1'),_0x27ef('0xc2'),'tmp');var _0x2e1231=path['join'](_0xec2fee,_0x3b7de0);var _0x3fbee2=util[_0x27ef('0x60')](_0x27ef('0xc3'),_0x3b7de0);var _0x7e2b57=path[_0x27ef('0x7f')](_0xec2fee,_0x3fbee2);var _0x4d5cb3=![];return db[_0x27ef('0x32')][_0x27ef('0xb1')]({'where':{'id':_0x53ca61[_0x27ef('0xae')]['id']}})[_0x27ef('0x23')](handleEntityNotFound(_0x52eb48,null))['then'](function(_0x2ce11f){if(_0x2ce11f){return _0x2ce11f['getMessages']({'attributes':['id',_0x27ef('0xb2'),'from','to','cc',_0x27ef('0xc4'),_0x27ef('0xc5'),_0x27ef('0x5c')],'where':{'secret':![]},'include':_0x53ca61[_0x27ef('0x3d')][_0x27ef('0xc0')]?[{'model':db[_0x27ef('0xc6')],'as':_0x27ef('0xc7')}]:undefined,'order':qs[_0x27ef('0x46')]('id')});}return[];})[_0x27ef('0x23')](function(_0x7850a2){_0x4d5cb3=_0x7850a2[_0x27ef('0x42')];if(_0x7850a2[_0x27ef('0x42')]){fs[_0x27ef('0xc8')](_0x2e1231);return BPromise['each'](_0x7850a2,function(_0x56b738,_0x48559a){var _0x2d7bc1=_0x56b738;var _0x32f2ea={'from':_0x2d7bc1['from'],'to':_0x2d7bc1['to'],'subject':_0x2d7bc1['subject'],'html':_0x2d7bc1[_0x27ef('0xb2')],'headers':{'Date':moment(_0x2d7bc1[_0x27ef('0x5c')])[_0x27ef('0x60')](_0x27ef('0xc9'))},'attachments':[]};if(_0x56b738['cc']){_0x32f2ea[_0x27ef('0xca')]['Cc']=_0x56b738['cc'];}if(_0x56b738[_0x27ef('0xc4')]){_0x32f2ea[_0x27ef('0xca')][_0x27ef('0xcb')]=_0x56b738[_0x27ef('0xc4')];}return new BPromise(function(_0xe36c75,_0x207ccf){if(_0x56b738[_0x27ef('0xc7')]){for(var _0x8465c=0x0;_0x8465c<_0x56b738[_0x27ef('0xc7')][_0x27ef('0x42')];_0x8465c++){var _0x3c905c=_0x56b738[_0x27ef('0xc7')][_0x8465c];var _0x5a881b=path['join'](_0x5a289a,_0x3c905c[_0x27ef('0xcc')]);if(fs[_0x27ef('0xcd')](_0x5a881b)){_0x32f2ea[_0x27ef('0xc0')][_0x27ef('0x31')]({'name':_0x3c905c['name'],'contentType':_0x3c905c['type'],'data':fs['readFileSync'](_0x5a881b)});}}}emlformat[_0x27ef('0xce')](_0x32f2ea,function(_0x5f1ea0,_0x34f40d){if(_0x5f1ea0)return _0x207ccf(_0x5f1ea0);fs['writeFileSync'](path[_0x27ef('0x7f')](_0x2e1231,util['format'](_0x27ef('0xcf'),_0x48559a)),_0x34f40d);return _0xe36c75(_0x34f40d);});});});}})['then'](function(){if(_0x4d5cb3){return new BPromise(function(_0x1b68df,_0x38940d){zipdir(_0x2e1231,{'saveTo':_0x7e2b57},function(_0x5b8c51,_0x1a6dc6){if(_0x5b8c51)return _0x38940d(_0x5b8c51);return _0x1b68df(_0x1a6dc6);});});}})[_0x27ef('0x23')](function(){if(_0x4d5cb3){return new BPromise(function(_0x19e5b8,_0x594982){rimraf(_0x2e1231,function(_0x2981fd){if(_0x2981fd)_0x594982(_0x2981fd);return _0x19e5b8();});});}})['then'](function(){if(_0x4d5cb3){return _0x52eb48[_0x27ef('0xbe')](_0x7e2b57,_0x3fbee2,function(_0x18aba1){if(_0x18aba1){console['log']('err',_0x18aba1);}else{fs['unlinkSync'](_0x7e2b57);}});}else{return _0x52eb48[_0x27ef('0x19')](0xc8);}})['catch'](handleError(_0x52eb48,null));};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.events.js b/server/api/mailInteraction/mailInteraction.events.js
index b0ac212..2ecbfd8 100644
--- a/server/api/mailInteraction/mailInteraction.events.js
+++ b/server/api/mailInteraction/mailInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe084=['getUsers','then','setDataValue','Users','unreadMessages','emit','catch','hasOwnProperty','hook','exports','../../mysqldb','MailInteraction','setMaxListeners','save','update','remove'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe084,0x11a));var _0x4e08=function(_0x269147,_0x2f5f3b){_0x269147=_0x269147-0x0;var _0x4527b1=_0xe084[_0x269147];return _0x4527b1;};'use strict';var EventEmitter=require('events');var MailInteraction=require(_0x4e08('0x0'))['db'][_0x4e08('0x1')];var MailMessage=require(_0x4e08('0x0'))['db']['MailMessage'];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x4e08('0x2')](0x0);var events={'afterCreate':_0x4e08('0x3'),'afterUpdate':_0x4e08('0x4'),'afterDestroy':_0x4e08('0x5')};function emitEvent(_0x5359c2){return function(_0x33b4b6,_0x29a1bd,_0x17dbbe){_0x33b4b6[_0x4e08('0x6')]({'attributes':['id'],'raw':!![]})[_0x4e08('0x7')](function(_0x157b3e){_0x33b4b6[_0x4e08('0x8')](_0x4e08('0x9'),_0x157b3e['map'](function(_0x63bc1f){return{'id':_0x63bc1f['id']};}));return MailMessage['findAll']({'where':{'MailInteractionId':_0x33b4b6['id'],'direction':'in','read':![]},'raw':!![]});})[_0x4e08('0x7')](function(_0x2266a5){_0x33b4b6[_0x4e08('0x8')](_0x4e08('0xa'),_0x2266a5['length']);MailInteractionEvents[_0x4e08('0xb')](_0x5359c2+':'+_0x33b4b6['id'],_0x33b4b6);MailInteractionEvents[_0x4e08('0xb')](_0x5359c2,_0x33b4b6);_0x17dbbe(null);})[_0x4e08('0xc')](_0x17dbbe(null));};}for(var e in events){if(events[_0x4e08('0xd')](e)){var event=events[e];MailInteraction[_0x4e08('0xe')](e,emitEvent(event));}}module[_0x4e08('0xf')]=MailInteractionEvents;
\ No newline at end of file
+var _0xe9b0=['Users','map','findAll','unreadMessages','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailInteraction','MailMessage','setMaxListeners','save','remove','getUsers','then'];(function(_0x97df78,_0x36cfa3){var _0x4b627e=function(_0x15524a){while(--_0x15524a){_0x97df78['push'](_0x97df78['shift']());}};_0x4b627e(++_0x36cfa3);}(_0xe9b0,0x1e4));var _0x0e9b=function(_0x26c10f,_0x5411be){_0x26c10f=_0x26c10f-0x0;var _0x17e0b8=_0xe9b0[_0x26c10f];return _0x17e0b8;};'use strict';var EventEmitter=require(_0x0e9b('0x0'));var MailInteraction=require(_0x0e9b('0x1'))['db'][_0x0e9b('0x2')];var MailMessage=require(_0x0e9b('0x1'))['db'][_0x0e9b('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x0e9b('0x4')](0x0);var events={'afterCreate':_0x0e9b('0x5'),'afterUpdate':'update','afterDestroy':_0x0e9b('0x6')};function emitEvent(_0x81b969){return function(_0x339d6d,_0x32e2f2,_0xf2bc5){_0x339d6d[_0x0e9b('0x7')]({'attributes':['id'],'raw':!![]})[_0x0e9b('0x8')](function(_0xd354d){_0x339d6d['setDataValue'](_0x0e9b('0x9'),_0xd354d[_0x0e9b('0xa')](function(_0x4a0b79){return{'id':_0x4a0b79['id']};}));return MailMessage[_0x0e9b('0xb')]({'where':{'MailInteractionId':_0x339d6d['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x2dcea4){_0x339d6d['setDataValue'](_0x0e9b('0xc'),_0x2dcea4['length']);MailInteractionEvents[_0x0e9b('0xd')](_0x81b969+':'+_0x339d6d['id'],_0x339d6d);MailInteractionEvents[_0x0e9b('0xd')](_0x81b969,_0x339d6d);_0xf2bc5(null);})['catch'](_0xf2bc5(null));};}for(var e in events){if(events[_0x0e9b('0xe')](e)){var event=events[e];MailInteraction[_0x0e9b('0xf')](e,emitEvent(event));}}module[_0x0e9b('0x10')]=MailInteractionEvents;
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.model.js b/server/api/mailInteraction/mailInteraction.model.js
index bc9fd7f..1a2e288 100644
--- a/server/api/mailInteraction/mailInteraction.model.js
+++ b/server/api/mailInteraction/mailInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfce6=['MailInteraction','mail_interactions','subject','substatus','format','closed','closedAt','substatusAt','YYYY-MM-DD\x20HH:mm:ss','get','update','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','define'];(function(_0x18f0bd,_0x2675c3){var _0x314678=function(_0x558bff){while(--_0x558bff){_0x18f0bd['push'](_0x18f0bd['shift']());}};_0x314678(++_0x2675c3);}(_0xfce6,0x1d9));var _0x6fce=function(_0x5da337,_0x3a55fb){_0x5da337=_0x5da337-0x0;var _0x3dd702=_0xfce6[_0x5da337];return _0x3dd702;};'use strict';var _=require(_0x6fce('0x0'));var util=require(_0x6fce('0x1'));var logger=require(_0x6fce('0x2'))(_0x6fce('0x3'));var moment=require(_0x6fce('0x4'));var BPromise=require(_0x6fce('0x5'));var rp=require(_0x6fce('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6fce('0x7'));var config=require(_0x6fce('0x8'));var attributes=require('./mailInteraction.attributes');module['exports']=function(_0x250bbc,_0x11d9ca){return _0x250bbc[_0x6fce('0x9')](_0x6fce('0xa'),attributes,{'tableName':_0x6fce('0xb'),'paranoid':![],'indexes':[{'name':'fti_mail_interactions','fields':[_0x6fce('0xc'),'to'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x5a6ff5,_0x3dc202,_0x237b99){if(_0x5a6ff5[_0x6fce('0xd')]){_0x5a6ff5['substatusAt']=moment()[_0x6fce('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x5a6ff5[_0x6fce('0xf')]){_0x5a6ff5[_0x6fce('0x10')]=moment()[_0x6fce('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x237b99(null,_0x3dc202);},'beforeUpdate':function(_0x2abdce,_0x17747a,_0x3e06b3){if(_0x2abdce['changed'](_0x6fce('0xd'))){_0x2abdce[_0x6fce('0x11')]=moment()[_0x6fce('0xe')](_0x6fce('0x12'));}if(_0x2abdce['changed'](_0x6fce('0xf'))){_0x2abdce[_0x6fce('0x10')]=moment()[_0x6fce('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x3e06b3(null,_0x2abdce);},'afterUpdate':function(_0xd66918,_0x12906b,_0x39b311){var _0x30e94e=_0x250bbc['models'];var _0x35d068=_0xd66918[_0x6fce('0x13')]({'plain':!![]});if(_0x35d068['closed']){return _0x30e94e['MailMessage'][_0x6fce('0x14')]({'read':!![]},{'where':{'MailInteractionId':_0x35d068['id']}})['then'](function(){_0x39b311();})['catch'](function(_0x1d5bac){_0x39b311(_0x1d5bac);});}else{_0x39b311();}}},'charset':_0x6fce('0x15'),'collate':_0x6fce('0x16')});};
\ No newline at end of file
+var _0x4403=['FULLTEXT','substatus','substatusAt','format','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','changed','models','get','MailMessage','catch','utf8mb4','lodash','../../config/logger','moment','bluebird','path','../../config/environment','./mailInteraction.attributes','define','MailInteraction','mail_interactions','fti_mail_interactions','subject'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x4403,0x1b6));var _0x3440=function(_0x13ced7,_0xce4fb5){_0x13ced7=_0x13ced7-0x0;var _0x91009=_0x4403[_0x13ced7];return _0x91009;};'use strict';var _=require(_0x3440('0x0'));var util=require('util');var logger=require(_0x3440('0x1'))('api');var moment=require(_0x3440('0x2'));var BPromise=require(_0x3440('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3440('0x4'));var rimraf=require('rimraf');var config=require(_0x3440('0x5'));var attributes=require(_0x3440('0x6'));module['exports']=function(_0x466fe2,_0x4dbe7d){return _0x466fe2[_0x3440('0x7')](_0x3440('0x8'),attributes,{'tableName':_0x3440('0x9'),'paranoid':![],'indexes':[{'name':_0x3440('0xa'),'fields':[_0x3440('0xb'),'to'],'type':_0x3440('0xc')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0xb4ca43,_0x5daa4d,_0x4ef213){if(_0xb4ca43[_0x3440('0xd')]){_0xb4ca43[_0x3440('0xe')]=moment()[_0x3440('0xf')](_0x3440('0x10'));}if(_0xb4ca43[_0x3440('0x11')]){_0xb4ca43[_0x3440('0x12')]=moment()[_0x3440('0xf')](_0x3440('0x10'));}_0x4ef213(null,_0x5daa4d);},'beforeUpdate':function(_0x522129,_0x363160,_0x27e34c){if(_0x522129[_0x3440('0x13')](_0x3440('0xd'))){_0x522129[_0x3440('0xe')]=moment()['format'](_0x3440('0x10'));}if(_0x522129[_0x3440('0x13')](_0x3440('0x11'))){_0x522129[_0x3440('0x12')]=moment()[_0x3440('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x27e34c(null,_0x522129);},'afterUpdate':function(_0x1ff2a3,_0x27c56f,_0x5f5230){var _0x126896=_0x466fe2[_0x3440('0x14')];var _0x7b6a93=_0x1ff2a3[_0x3440('0x15')]({'plain':!![]});if(_0x7b6a93[_0x3440('0x11')]){return _0x126896[_0x3440('0x16')]['update']({'read':!![]},{'where':{'MailInteractionId':_0x7b6a93['id']}})['then'](function(){_0x5f5230();})[_0x3440('0x17')](function(_0x192a19){_0x5f5230(_0x192a19);});}else{_0x5f5230();}}},'charset':_0x3440('0x18'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.rpc.js b/server/api/mailInteraction/mailInteraction.rpc.js
index 08b1c47..989ce38 100644
--- a/server/api/mailInteraction/mailInteraction.rpc.js
+++ b/server/api/mailInteraction/mailInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6b1b=['limit','AddTagsToMailInteraction','addTags','body','omit','ids','AddTags','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./mailInteraction.socket','request','then','info','debug','MailInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','MailInteraction,\x20%s,\x20%s','message','catch','UpdateMailInteraction','MailInteraction','options','where','attributes'];(function(_0x49f349,_0x2423d2){var _0x545313=function(_0x3ad72f){while(--_0x3ad72f){_0x49f349['push'](_0x49f349['shift']());}};_0x545313(++_0x2423d2);}(_0x6b1b,0x1e7));var _0xb6b1=function(_0x2a6809,_0x44edde){_0x2a6809=_0x2a6809-0x0;var _0x11c371=_0x6b1b[_0x2a6809];return _0x11c371;};'use strict';var _=require('lodash');var util=require(_0xb6b1('0x0'));var moment=require(_0xb6b1('0x1'));var BPromise=require(_0xb6b1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb6b1('0x3'));var db=require(_0xb6b1('0x4'))['db'];var utils=require(_0xb6b1('0x5'));var logger=require(_0xb6b1('0x6'))(_0xb6b1('0x7'));var config=require(_0xb6b1('0x8'));var jayson=require(_0xb6b1('0x9'));var client=jayson[_0xb6b1('0xa')][_0xb6b1('0xb')]({'port':0x232a});config[_0xb6b1('0xc')]=_[_0xb6b1('0xd')](config['redis'],{'host':_0xb6b1('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xb6b1('0xf'))['register'](socket);function respondWithRpcPromise(_0xcb40e1,_0x540238,_0x4aa838){return new BPromise(function(_0x49e83a,_0x593218){return client[_0xb6b1('0x10')](_0xcb40e1,_0x4aa838)[_0xb6b1('0x11')](function(_0x5d806b){logger[_0xb6b1('0x12')]('MailInteraction,\x20%s,\x20%s',_0x540238,'request\x20sent');logger[_0xb6b1('0x13')](_0xb6b1('0x14'),_0x540238,_0xb6b1('0x15'),JSON[_0xb6b1('0x16')](_0x5d806b));if(_0x5d806b[_0xb6b1('0x17')]){if(_0x5d806b[_0xb6b1('0x17')][_0xb6b1('0x18')]===0x1f4){logger[_0xb6b1('0x17')](_0xb6b1('0x19'),_0x540238,_0x5d806b[_0xb6b1('0x17')][_0xb6b1('0x1a')]);return _0x593218(_0x5d806b[_0xb6b1('0x17')]['message']);}logger['error']('MailInteraction,\x20%s,\x20%s',_0x540238,_0x5d806b['error'][_0xb6b1('0x1a')]);return _0x49e83a(_0x5d806b[_0xb6b1('0x17')][_0xb6b1('0x1a')]);}else{logger[_0xb6b1('0x12')](_0xb6b1('0x19'),_0x540238,_0xb6b1('0x15'));_0x49e83a(_0x5d806b['result']['message']);}})[_0xb6b1('0x1b')](function(_0x15456d){logger[_0xb6b1('0x17')](_0xb6b1('0x19'),_0x540238,_0x15456d);_0x593218(_0x15456d);});});}exports[_0xb6b1('0x1c')]=function(_0x3fc9b1){var _0x5ba14d=this;return new Promise(function(_0x4e132a,_0x43312e){return db[_0xb6b1('0x1d')]['update'](_0x3fc9b1['body'],{'raw':_0x3fc9b1[_0xb6b1('0x1e')]?_0x3fc9b1['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3fc9b1[_0xb6b1('0x1e')]?_0x3fc9b1[_0xb6b1('0x1e')][_0xb6b1('0x1f')]||null:null,'attributes':_0x3fc9b1[_0xb6b1('0x1e')]?_0x3fc9b1[_0xb6b1('0x1e')][_0xb6b1('0x20')]||null:null,'limit':_0x3fc9b1[_0xb6b1('0x1e')]?_0x3fc9b1[_0xb6b1('0x1e')][_0xb6b1('0x21')]||null:null})[_0xb6b1('0x11')](function(_0x5069cd){logger[_0xb6b1('0x12')]('UpdateMailInteraction',_0x3fc9b1);logger[_0xb6b1('0x13')]('UpdateMailInteraction',_0x3fc9b1,JSON[_0xb6b1('0x16')](_0x5069cd));_0x4e132a(_0x5069cd);})['catch'](function(_0x35a567){logger[_0xb6b1('0x17')](_0xb6b1('0x1c'),_0x35a567[_0xb6b1('0x1a')],_0x3fc9b1);_0x43312e(_0x5ba14d[_0xb6b1('0x17')](0x1f4,_0x35a567[_0xb6b1('0x1a')]));});});};exports[_0xb6b1('0x22')]=function(_0xd3c6da){return new Promise(function(_0x1a16ad,_0x5a523c){return db[_0xb6b1('0x1d')]['find']({'where':_0xd3c6da[_0xb6b1('0x1e')]?_0xd3c6da[_0xb6b1('0x1e')][_0xb6b1('0x1f')]||null:null})[_0xb6b1('0x11')](function(_0x136fe5){if(_0x136fe5){return _0x136fe5[_0xb6b1('0x23')](_0xd3c6da[_0xb6b1('0x24')]['ids'],_[_0xb6b1('0x25')](_0xd3c6da[_0xb6b1('0x24')],[_0xb6b1('0x26'),'id'])||{});}})['spread'](function(_0x22beb9){logger[_0xb6b1('0x12')]('AddTags',_0xd3c6da);logger[_0xb6b1('0x13')](_0xb6b1('0x27'),_0xd3c6da,JSON[_0xb6b1('0x16')](_0x22beb9));_0x1a16ad(_0x22beb9);})[_0xb6b1('0x1b')](function(_0x3ead6b){logger[_0xb6b1('0x17')]('AddTags',_0x3ead6b[_0xb6b1('0x1a')],_0xd3c6da);_0x5a523c(_this[_0xb6b1('0x17')](0x1f4,_0x3ead6b['message']));});});};
\ No newline at end of file
+var _0x0cfe=['jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./mailInteraction.socket','register','request','then','info','MailInteraction,\x20%s,\x20%s','request\x20sent','debug','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','result','MailInteraction','body','options','raw','where','limit','UpdateMailInteraction','catch','AddTagsToMailInteraction','find','addTags','ids','omit','AddTags','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment'];(function(_0x1b5aea,_0x3f04b7){var _0x15cfc6=function(_0x204e92){while(--_0x204e92){_0x1b5aea['push'](_0x1b5aea['shift']());}};_0x15cfc6(++_0x3f04b7);}(_0x0cfe,0x9c));var _0xe0cf=function(_0x5ad807,_0x1623be){_0x5ad807=_0x5ad807-0x0;var _0x142bbb=_0x0cfe[_0x5ad807];return _0x142bbb;};'use strict';var _=require(_0xe0cf('0x0'));var util=require('util');var moment=require(_0xe0cf('0x1'));var BPromise=require(_0xe0cf('0x2'));var rs=require(_0xe0cf('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe0cf('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xe0cf('0x5'))(_0xe0cf('0x6'));var config=require(_0xe0cf('0x7'));var jayson=require(_0xe0cf('0x8'));var client=jayson['client'][_0xe0cf('0x9')]({'port':0x232a});config[_0xe0cf('0xa')]=_[_0xe0cf('0xb')](config['redis'],{'host':_0xe0cf('0xc'),'port':0x18eb});var socket=require(_0xe0cf('0xd'))(new Redis(config['redis']));require(_0xe0cf('0xe'))[_0xe0cf('0xf')](socket);function respondWithRpcPromise(_0x1d304a,_0x2aaa10,_0x2e689c){return new BPromise(function(_0x10752a,_0x531fde){return client[_0xe0cf('0x10')](_0x1d304a,_0x2e689c)[_0xe0cf('0x11')](function(_0x264b18){logger[_0xe0cf('0x12')](_0xe0cf('0x13'),_0x2aaa10,_0xe0cf('0x14'));logger[_0xe0cf('0x15')](_0xe0cf('0x16'),_0x2aaa10,_0xe0cf('0x14'),JSON[_0xe0cf('0x17')](_0x264b18));if(_0x264b18[_0xe0cf('0x18')]){if(_0x264b18[_0xe0cf('0x18')]['code']===0x1f4){logger[_0xe0cf('0x18')](_0xe0cf('0x13'),_0x2aaa10,_0x264b18[_0xe0cf('0x18')][_0xe0cf('0x19')]);return _0x531fde(_0x264b18[_0xe0cf('0x18')]['message']);}logger['error'](_0xe0cf('0x13'),_0x2aaa10,_0x264b18['error']['message']);return _0x10752a(_0x264b18[_0xe0cf('0x18')][_0xe0cf('0x19')]);}else{logger[_0xe0cf('0x12')](_0xe0cf('0x13'),_0x2aaa10,_0xe0cf('0x14'));_0x10752a(_0x264b18[_0xe0cf('0x1a')][_0xe0cf('0x19')]);}})['catch'](function(_0x5c2bcc){logger[_0xe0cf('0x18')](_0xe0cf('0x13'),_0x2aaa10,_0x5c2bcc);_0x531fde(_0x5c2bcc);});});}exports['UpdateMailInteraction']=function(_0x112ea6){var _0x3dba33=this;return new Promise(function(_0x2c44e6,_0x2b4a16){return db[_0xe0cf('0x1b')]['update'](_0x112ea6[_0xe0cf('0x1c')],{'raw':_0x112ea6['options']?_0x112ea6[_0xe0cf('0x1d')][_0xe0cf('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x112ea6['options']?_0x112ea6[_0xe0cf('0x1d')][_0xe0cf('0x1f')]||null:null,'attributes':_0x112ea6[_0xe0cf('0x1d')]?_0x112ea6[_0xe0cf('0x1d')]['attributes']||null:null,'limit':_0x112ea6[_0xe0cf('0x1d')]?_0x112ea6[_0xe0cf('0x1d')][_0xe0cf('0x20')]||null:null})[_0xe0cf('0x11')](function(_0x4b74bf){logger[_0xe0cf('0x12')]('UpdateMailInteraction',_0x112ea6);logger[_0xe0cf('0x15')](_0xe0cf('0x21'),_0x112ea6,JSON[_0xe0cf('0x17')](_0x4b74bf));_0x2c44e6(_0x4b74bf);})[_0xe0cf('0x22')](function(_0x94276f){logger[_0xe0cf('0x18')]('UpdateMailInteraction',_0x94276f[_0xe0cf('0x19')],_0x112ea6);_0x2b4a16(_0x3dba33[_0xe0cf('0x18')](0x1f4,_0x94276f[_0xe0cf('0x19')]));});});};exports[_0xe0cf('0x23')]=function(_0x35e46d){return new Promise(function(_0x5e878c,_0x5845b7){return db['MailInteraction'][_0xe0cf('0x24')]({'where':_0x35e46d[_0xe0cf('0x1d')]?_0x35e46d['options']['where']||null:null})[_0xe0cf('0x11')](function(_0x447207){if(_0x447207){return _0x447207[_0xe0cf('0x25')](_0x35e46d[_0xe0cf('0x1c')][_0xe0cf('0x26')],_[_0xe0cf('0x27')](_0x35e46d[_0xe0cf('0x1c')],[_0xe0cf('0x26'),'id'])||{});}})['spread'](function(_0x5ac33b){logger[_0xe0cf('0x12')](_0xe0cf('0x28'),_0x35e46d);logger[_0xe0cf('0x15')](_0xe0cf('0x28'),_0x35e46d,JSON[_0xe0cf('0x17')](_0x5ac33b));_0x5e878c(_0x5ac33b);})[_0xe0cf('0x22')](function(_0x189f18){logger['error'](_0xe0cf('0x28'),_0x189f18[_0xe0cf('0x19')],_0x35e46d);_0x5845b7(_this[_0xe0cf('0x18')](0x1f4,_0x189f18[_0xe0cf('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.socket.js b/server/api/mailInteraction/mailInteraction.socket.js
index 88b6137..85dbc1f 100644
--- a/server/api/mailInteraction/mailInteraction.socket.js
+++ b/server/api/mailInteraction/mailInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa375=['./mailInteraction.events','save','remove','update','emit','removeListener','register','length'];(function(_0x327624,_0x4ea34d){var _0x554d77=function(_0x35b44a){while(--_0x35b44a){_0x327624['push'](_0x327624['shift']());}};_0x554d77(++_0x4ea34d);}(_0xa375,0x178));var _0x5a37=function(_0x1dcf37,_0x150062){_0x1dcf37=_0x1dcf37-0x0;var _0x4323ea=_0xa375[_0x1dcf37];return _0x4323ea;};'use strict';var MailInteractionEvents=require(_0x5a37('0x0'));var events=[_0x5a37('0x1'),_0x5a37('0x2'),_0x5a37('0x3')];function createListener(_0x2e223a,_0x301d2a){return function(_0xdd18d3){_0x301d2a[_0x5a37('0x4')](_0x2e223a,_0xdd18d3);};}function removeListener(_0x1c0d52,_0x3bc0ac){return function(){MailInteractionEvents[_0x5a37('0x5')](_0x1c0d52,_0x3bc0ac);};}exports[_0x5a37('0x6')]=function(_0x1dbbe3){for(var _0x2be442=0x0,_0x1d075f=events[_0x5a37('0x7')];_0x2be442<_0x1d075f;_0x2be442++){var _0x136a7a=events[_0x2be442];var _0x15ad0b=createListener('mailInteraction:'+_0x136a7a,_0x1dbbe3);MailInteractionEvents['on'](_0x136a7a,_0x15ad0b);}};
\ No newline at end of file
+var _0x5e8e=['update','emit','removeListener','mailInteraction:','./mailInteraction.events','remove'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x5e8e,0x1ae));var _0xe5e8=function(_0x32da04,_0x255b7b){_0x32da04=_0x32da04-0x0;var _0x468bac=_0x5e8e[_0x32da04];return _0x468bac;};'use strict';var MailInteractionEvents=require(_0xe5e8('0x0'));var events=['save',_0xe5e8('0x1'),_0xe5e8('0x2')];function createListener(_0x22ed3d,_0xc7a0d2){return function(_0x25c393){_0xc7a0d2[_0xe5e8('0x3')](_0x22ed3d,_0x25c393);};}function removeListener(_0x5d9157,_0x6164cb){return function(){MailInteractionEvents[_0xe5e8('0x4')](_0x5d9157,_0x6164cb);};}exports['register']=function(_0x4e5ebd){for(var _0x1e6ac4=0x0,_0x4d3ea2=events['length'];_0x1e6ac4<_0x4d3ea2;_0x1e6ac4++){var _0x1e6fac=events[_0x1e6ac4];var _0x31307a=createListener(_0xe5e8('0x5')+_0x1e6fac,_0x4e5ebd);MailInteractionEvents['on'](_0x1e6fac,_0x31307a);}};
\ No newline at end of file
diff --git a/server/api/mailMessage/index.js b/server/api/mailMessage/index.js
index e04a7ba..67c050f 100644
--- a/server/api/mailMessage/index.js
+++ b/server/api/mailMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa630=['describe','/:id','/:id/download','download','post','tracked','mail','mailmessage:create','create','update','put','/:id/reject','reject','delete','destroy','multer','util','express','../../components/auth/service','../../config/environment','./mailMessage.controller','get','isAuthenticated','index','/describe'];(function(_0x1da125,_0x49e325){var _0x510a34=function(_0x29be19){while(--_0x29be19){_0x1da125['push'](_0x1da125['shift']());}};_0x510a34(++_0x49e325);}(_0xa630,0xbe));var _0x0a63=function(_0x3b9736,_0x26b918){_0x3b9736=_0x3b9736-0x0;var _0x51db5a=_0xa630[_0x3b9736];return _0x51db5a;};'use strict';var multer=require(_0x0a63('0x0'));var util=require(_0x0a63('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x0a63('0x2'));var router=express['Router']();var auth=require(_0x0a63('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x0a63('0x4'));var controller=require(_0x0a63('0x5'));router[_0x0a63('0x6')]('/',auth[_0x0a63('0x7')](),controller[_0x0a63('0x8')]);router['get'](_0x0a63('0x9'),auth[_0x0a63('0x7')](),controller[_0x0a63('0xa')]);router[_0x0a63('0x6')](_0x0a63('0xb'),auth[_0x0a63('0x7')](),controller['show']);router[_0x0a63('0x6')](_0x0a63('0xc'),auth[_0x0a63('0x7')](),controller[_0x0a63('0xd')]);router[_0x0a63('0xe')]('/',auth[_0x0a63('0x7')](),interaction[_0x0a63('0xf')](_0x0a63('0x10'),_0x0a63('0x11')),controller[_0x0a63('0x12')]);router['put'](_0x0a63('0xb'),auth[_0x0a63('0x7')](),controller[_0x0a63('0x13')]);router[_0x0a63('0x14')]('/:id/accept',auth[_0x0a63('0x7')](),controller['accept']);router[_0x0a63('0x14')](_0x0a63('0x15'),auth[_0x0a63('0x7')](),controller[_0x0a63('0x16')]);router[_0x0a63('0x17')](_0x0a63('0xb'),auth[_0x0a63('0x7')](),controller[_0x0a63('0x18')]);module['exports']=router;
\ No newline at end of file
+var _0x3eea=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailMessage.controller','get','isAuthenticated','index','download','post','tracked','mail','put','/:id','update','/:id/accept','accept','/:id/reject','delete','multer','path'];(function(_0x18482e,_0x563445){var _0x367fb7=function(_0x229262){while(--_0x229262){_0x18482e['push'](_0x18482e['shift']());}};_0x367fb7(++_0x563445);}(_0x3eea,0x1ca));var _0xa3ee=function(_0x479d22,_0x2a544f){_0x479d22=_0x479d22-0x0;var _0x143101=_0x3eea[_0x479d22];return _0x143101;};'use strict';var multer=require(_0xa3ee('0x0'));var util=require('util');var path=require(_0xa3ee('0x1'));var timeout=require(_0xa3ee('0x2'));var express=require(_0xa3ee('0x3'));var router=express[_0xa3ee('0x4')]();var auth=require(_0xa3ee('0x5'));var interaction=require(_0xa3ee('0x6'));var config=require(_0xa3ee('0x7'));var controller=require(_0xa3ee('0x8'));router[_0xa3ee('0x9')]('/',auth[_0xa3ee('0xa')](),controller[_0xa3ee('0xb')]);router['get']('/describe',auth[_0xa3ee('0xa')](),controller['describe']);router[_0xa3ee('0x9')]('/:id',auth[_0xa3ee('0xa')](),controller['show']);router[_0xa3ee('0x9')]('/:id/download',auth[_0xa3ee('0xa')](),controller[_0xa3ee('0xc')]);router[_0xa3ee('0xd')]('/',auth['isAuthenticated'](),interaction[_0xa3ee('0xe')](_0xa3ee('0xf'),'mailmessage:create'),controller['create']);router[_0xa3ee('0x10')](_0xa3ee('0x11'),auth[_0xa3ee('0xa')](),controller[_0xa3ee('0x12')]);router['put'](_0xa3ee('0x13'),auth['isAuthenticated'](),controller[_0xa3ee('0x14')]);router[_0xa3ee('0x10')](_0xa3ee('0x15'),auth[_0xa3ee('0xa')](),controller['reject']);router[_0xa3ee('0x16')](_0xa3ee('0x11'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.attributes.js b/server/api/mailMessage/mailMessage.attributes.js
index 5be07fc..69f7124 100644
--- a/server/api/mailMessage/mailMessage.attributes.js
+++ b/server/api/mailMessage/mailMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4b5f=['DATE','sequelize','lodash','exports','TEXT','medium','BOOLEAN','ENUM','out','STRING','long'];(function(_0x3d5389,_0x18e2a1){var _0xdc76c2=function(_0x57c26b){while(--_0x57c26b){_0x3d5389['push'](_0x3d5389['shift']());}};_0xdc76c2(++_0x18e2a1);}(_0x4b5f,0x198));var _0xf4b5=function(_0x572ee8,_0x24ea07){_0x572ee8=_0x572ee8-0x0;var _0xb87b08=_0x4b5f[_0x572ee8];return _0xb87b08;};'use strict';var Sequelize=require(_0xf4b5('0x0'));var _=require(_0xf4b5('0x1'));module[_0xf4b5('0x2')]={'body':{'type':Sequelize[_0xf4b5('0x3')]('long'),'allowNull':![]},'plainBody':{'type':Sequelize[_0xf4b5('0x3')](_0xf4b5('0x4'))},'read':{'type':Sequelize[_0xf4b5('0x5')],'defaultValue':![]},'direction':{'type':Sequelize[_0xf4b5('0x6')]('in',_0xf4b5('0x7')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize[_0xf4b5('0x8')](0x1fe)},'from':{'type':Sequelize[_0xf4b5('0x8')]},'to':{'type':Sequelize['TEXT'](_0xf4b5('0x9'))},'cc':{'type':Sequelize[_0xf4b5('0x3')](_0xf4b5('0x9'))},'bcc':{'type':Sequelize[_0xf4b5('0x3')]('long')},'subject':{'type':Sequelize[_0xf4b5('0x3')]},'sentAt':{'type':Sequelize[_0xf4b5('0xa')]},'attach':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'readAt':{'type':Sequelize[_0xf4b5('0xa')]},'originTo':{'type':Sequelize[_0xf4b5('0x3')]('long')},'originCc':{'type':Sequelize[_0xf4b5('0x3')](_0xf4b5('0x9'))}};
\ No newline at end of file
+var _0x68b0=['TEXT','long','medium','BOOLEAN','ENUM','out','STRING','DATE','INTEGER','sequelize','lodash','exports'];(function(_0x55b49e,_0x299902){var _0x1dbb7a=function(_0x475c00){while(--_0x475c00){_0x55b49e['push'](_0x55b49e['shift']());}};_0x1dbb7a(++_0x299902);}(_0x68b0,0x11d));var _0x068b=function(_0x48d1fc,_0x2a465d){_0x48d1fc=_0x48d1fc-0x0;var _0x2bdfb8=_0x68b0[_0x48d1fc];return _0x2bdfb8;};'use strict';var Sequelize=require(_0x068b('0x0'));var _=require(_0x068b('0x1'));module[_0x068b('0x2')]={'body':{'type':Sequelize[_0x068b('0x3')](_0x068b('0x4')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x068b('0x3')](_0x068b('0x5'))},'read':{'type':Sequelize[_0x068b('0x6')],'defaultValue':![]},'direction':{'type':Sequelize[_0x068b('0x7')]('in',_0x068b('0x8')),'defaultValue':_0x068b('0x8'),'allowNull':![]},'messageId':{'type':Sequelize[_0x068b('0x9')](0x1fe)},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize[_0x068b('0x3')]('long')},'cc':{'type':Sequelize[_0x068b('0x3')](_0x068b('0x4'))},'bcc':{'type':Sequelize[_0x068b('0x3')](_0x068b('0x4'))},'subject':{'type':Sequelize[_0x068b('0x3')]},'sentAt':{'type':Sequelize[_0x068b('0xa')]},'attach':{'type':Sequelize[_0x068b('0xb')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x068b('0x6')],'defaultValue':![]},'readAt':{'type':Sequelize[_0x068b('0xa')]},'originTo':{'type':Sequelize['TEXT'](_0x068b('0x4'))},'originCc':{'type':Sequelize[_0x068b('0x3')]('long')}};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.controller.js b/server/api/mailMessage/mailMessage.controller.js
index 35ee4f5..e98bcb2 100644
--- a/server/api/mailMessage/mailMessage.controller.js
+++ b/server/api/mailMessage/mailMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0e83=['readAt','UserId','CmContact','Contact','get','MailInteraction','MailInteractionId','read1stAt','role','interaction','null','AcceptMessage','manual','interface','SIP/%s','channel','EventManager','acceptmessage','mail-interactions','agent','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','download','unix','toString','server','files','join','from','bcc','subject','createdAt','Attachments','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','push','type','readFileSync','build','log','err','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','count','offset','limit','Content-Range','json','reject','save','stack','name','send','index','MailMessage','keys','query','intersection','model','attributes','fields','hasOwnProperty','order','sort','pick','filters','where','map','key','VIRTUAL','field','merge','options','include','findAll','rows','show','params','length','includeAll','update','body','find','destroy','describe','create','direction','out','secret','MailAccount','MailAccountId','MailServerOut','Smtp','isNil','service','host','port','secure','authentication','user','pass','auth','attachments','root','server/files/attachments','basename','SendMail','sendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','accept','mail','read'];(function(_0x3dd9a3,_0x18aa7d){var _0x3c7029=function(_0x4ad3a1){while(--_0x4ad3a1){_0x3dd9a3['push'](_0x3dd9a3['shift']());}};_0x3c7029(++_0x18aa7d);}(_0x0e83,0xd0));var _0x30e8=function(_0x11005e,_0x20c3d2){_0x11005e=_0x11005e-0x0;var _0x29338f=_0x0e83[_0x11005e];return _0x29338f;};'use strict';var pdf=require(_0x30e8('0x0'));var emlformat=require(_0x30e8('0x1'));var rimraf=require(_0x30e8('0x2'));var zipdir=require(_0x30e8('0x3'));var jsonpatch=require(_0x30e8('0x4'));var rp=require(_0x30e8('0x5'));var moment=require(_0x30e8('0x6'));var BPromise=require(_0x30e8('0x7'));var Mustache=require(_0x30e8('0x8'));var util=require('util');var path=require('path');var sox=require(_0x30e8('0x9'));var csv=require(_0x30e8('0xa'));var ejs=require(_0x30e8('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x30e8('0xc'));var crypto=require('crypto');var jsforce=require(_0x30e8('0xd'));var deskjs=require(_0x30e8('0xe'));var toCsv=require('to-csv');var querystring=require(_0x30e8('0xf'));var Papa=require(_0x30e8('0x10'));var Redis=require(_0x30e8('0x11'));var authService=require(_0x30e8('0x12'));var qs=require(_0x30e8('0x13'));var hardwareService=require(_0x30e8('0x14'));var logger=require(_0x30e8('0x15'))(_0x30e8('0x16'));var utils=require(_0x30e8('0x17'));var config=require(_0x30e8('0x18'));var db=require(_0x30e8('0x19'))['db'];config[_0x30e8('0x1a')]=_[_0x30e8('0x1b')](config[_0x30e8('0x1a')],{'host':_0x30e8('0x1c'),'port':0x18eb});var socket=require(_0x30e8('0x1d'))(new Redis(config[_0x30e8('0x1a')]));require(_0x30e8('0x1e'))['register'](socket);var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232c});var client9003=jayson[_0x30e8('0x1f')]['http']({'port':0x232b});var client9002=jayson[_0x30e8('0x1f')][_0x30e8('0x20')]({'port':0x232a});function checkPasswordPattern(_0x74b48,_0xfd205e,_0x2753cd){if(_0x2753cd){var _0x4438db=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4438db[_0x30e8('0x21')](_0xfd205e)){return _0x74b48;}else{throw new Error(_0x30e8('0x22'));}}else{return _0x74b48;}}function respondWithRpcPromise(_0x498208,_0xdeeb27,_0x222086,_0x32ffdd){return new BPromise(function(_0xcc98e2,_0x5cc901){var _0x67fe07=_0x32ffdd||client;return _0x67fe07[_0x30e8('0x23')](_0x498208,_0x222086)[_0x30e8('0x24')](function(_0x304b05){logger[_0x30e8('0x25')](_0x30e8('0x26'),_0xdeeb27,_0x30e8('0x27'));logger[_0x30e8('0x28')](_0x30e8('0x29'),_0xdeeb27,_0x30e8('0x27'),JSON[_0x30e8('0x2a')](_0x304b05));if(_0x304b05[_0x30e8('0x2b')]){if(_0x304b05[_0x30e8('0x2b')][_0x30e8('0x2c')]===0x1f4){logger[_0x30e8('0x2b')](_0x30e8('0x26'),_0xdeeb27,_0x304b05[_0x30e8('0x2b')][_0x30e8('0x2d')]);return _0x5cc901(_0x304b05[_0x30e8('0x2b')][_0x30e8('0x2d')]);}logger[_0x30e8('0x2b')](_0x30e8('0x26'),_0xdeeb27,_0x304b05[_0x30e8('0x2b')][_0x30e8('0x2d')]);return _0xcc98e2(_0x304b05[_0x30e8('0x2b')]['message']);}else{logger[_0x30e8('0x25')](_0x30e8('0x26'),_0xdeeb27,_0x30e8('0x27'));_0xcc98e2(_0x304b05[_0x30e8('0x2e')][_0x30e8('0x2d')]);}})[_0x30e8('0x2f')](function(_0x24097a){logger['error'](_0x30e8('0x26'),_0xdeeb27,_0x24097a);_0x5cc901(_0x24097a);});});}function respondWithStatusCode(_0x4b69cb,_0x560c5e){_0x560c5e=_0x560c5e||0xcc;return function(_0x476526){if(_0x476526){return _0x4b69cb[_0x30e8('0x30')](_0x560c5e);}return _0x4b69cb[_0x30e8('0x31')](_0x560c5e)[_0x30e8('0x32')]();};}function respondWithResult(_0x3d8565,_0x54c569){_0x54c569=_0x54c569||0xc8;return function(_0x182193){if(_0x182193){return _0x3d8565[_0x30e8('0x31')](_0x54c569)['json'](_0x182193);}};}function respondWithFilteredResult(_0x15ddf3,_0xafbf89){return function(_0x4388f7){if(_0x4388f7){var _0x2c09be=_0x4388f7[_0x30e8('0x33')],_0x558f76=_0xafbf89[_0x30e8('0x34')],_0x13a4e9=_0xafbf89[_0x30e8('0x34')]+_0xafbf89[_0x30e8('0x35')],_0x4208a3;if(_0x13a4e9>=_0x2c09be){_0x13a4e9=_0x2c09be;_0x4208a3=0xc8;}else{_0x4208a3=0xce;}_0x15ddf3[_0x30e8('0x31')](_0x4208a3);return _0x15ddf3['set'](_0x30e8('0x36'),_0x558f76+'-'+_0x13a4e9+'/'+_0x2c09be)[_0x30e8('0x37')](_0x4388f7);}return null;};}function patchUpdates(_0x2da4da){return function(_0x572221){try{jsonpatch['apply'](_0x572221,_0x2da4da,!![]);}catch(_0x53c2e3){return BPromise[_0x30e8('0x38')](_0x53c2e3);}return _0x572221[_0x30e8('0x39')]();};}function saveUpdates(_0x2bf99d,_0x22bb7d){return function(_0x5b9153){if(_0x5b9153){return _0x5b9153['update'](_0x2bf99d)[_0x30e8('0x24')](function(_0x3131b6){return _0x3131b6;});}return null;};}function removeEntity(_0x5c736a,_0xb2499e){return function(_0x123fcc){if(_0x123fcc){return _0x123fcc['destroy']()[_0x30e8('0x24')](function(){_0x5c736a['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1543a1,_0x48f836){return function(_0x3d185f){if(!_0x3d185f){_0x1543a1[_0x30e8('0x30')](0x194);}return _0x3d185f;};}function handleError(_0x246362,_0x4aabcc){_0x4aabcc=_0x4aabcc||0x1f4;return function(_0x5027d9){logger[_0x30e8('0x2b')](_0x5027d9[_0x30e8('0x3a')]);if(_0x5027d9[_0x30e8('0x3b')]){delete _0x5027d9[_0x30e8('0x3b')];}_0x246362[_0x30e8('0x31')](_0x4aabcc)[_0x30e8('0x3c')](_0x5027d9);};}exports[_0x30e8('0x3d')]=function(_0x460cf0,_0x9866cd){var _0x221a5c={},_0x153493={},_0x3980f0={'count':0x0,'rows':[]};var _0x4bcc22=db[_0x30e8('0x3e')]['rawAttributes'];_0x153493['model']=_[_0x30e8('0x3f')](_0x4bcc22);_0x153493[_0x30e8('0x40')]=_[_0x30e8('0x3f')](_0x460cf0['query']);_0x153493['filters']=_[_0x30e8('0x41')](_0x153493[_0x30e8('0x42')],_0x153493[_0x30e8('0x40')]);_0x221a5c[_0x30e8('0x43')]=_[_0x30e8('0x41')](_0x153493[_0x30e8('0x42')],qs[_0x30e8('0x44')](_0x460cf0[_0x30e8('0x40')][_0x30e8('0x44')]));_0x221a5c['attributes']=_0x221a5c['attributes']['length']?_0x221a5c['attributes']:_0x153493[_0x30e8('0x42')];if(!_0x460cf0[_0x30e8('0x40')][_0x30e8('0x45')]('nolimit')){_0x221a5c[_0x30e8('0x35')]=qs['limit'](_0x460cf0[_0x30e8('0x40')][_0x30e8('0x35')]);_0x221a5c[_0x30e8('0x34')]=qs[_0x30e8('0x34')](_0x460cf0[_0x30e8('0x40')][_0x30e8('0x34')]);}_0x221a5c[_0x30e8('0x46')]=qs[_0x30e8('0x47')](_0x460cf0['query']['sort']);_0x221a5c['where']=qs['filters'](_[_0x30e8('0x48')](_0x460cf0[_0x30e8('0x40')],_0x153493[_0x30e8('0x49')]));if(_0x460cf0[_0x30e8('0x40')]['filter']){_0x221a5c[_0x30e8('0x4a')]=_['merge'](_0x221a5c[_0x30e8('0x4a')],{'$or':_[_0x30e8('0x4b')](_0x4bcc22,function(_0x35105c){if(_0x35105c['type'][_0x30e8('0x4c')]!==_0x30e8('0x4d')){var _0x168bd4={};_0x168bd4[_0x35105c[_0x30e8('0x4e')]]={'$like':'%'+_0x460cf0[_0x30e8('0x40')]['filter']+'%'};return _0x168bd4;}})});}_0x221a5c=_[_0x30e8('0x4f')]({},_0x221a5c,_0x460cf0[_0x30e8('0x50')]);var _0x251d90={'where':_0x221a5c[_0x30e8('0x4a')]};return db[_0x30e8('0x3e')][_0x30e8('0x33')](_0x251d90)['then'](function(_0x57b565){_0x3980f0[_0x30e8('0x33')]=_0x57b565;if(_0x460cf0[_0x30e8('0x40')]['includeAll']){_0x221a5c[_0x30e8('0x51')]=[{'all':!![]}];}return db[_0x30e8('0x3e')][_0x30e8('0x52')](_0x221a5c);})['then'](function(_0x29f707){_0x3980f0[_0x30e8('0x53')]=_0x29f707;return _0x3980f0;})[_0x30e8('0x24')](respondWithFilteredResult(_0x9866cd,_0x221a5c))['catch'](handleError(_0x9866cd,null));};exports[_0x30e8('0x54')]=function(_0x4c5203,_0x341f1b){var _0x7875bc={'raw':!![],'where':{'id':_0x4c5203[_0x30e8('0x55')]['id']}},_0x10e6a7={};_0x10e6a7[_0x30e8('0x42')]=_['keys'](db[_0x30e8('0x3e')]['rawAttributes']);_0x10e6a7[_0x30e8('0x40')]=_[_0x30e8('0x3f')](_0x4c5203['query']);_0x10e6a7[_0x30e8('0x49')]=_[_0x30e8('0x41')](_0x10e6a7[_0x30e8('0x42')],_0x10e6a7[_0x30e8('0x40')]);_0x7875bc['attributes']=_[_0x30e8('0x41')](_0x10e6a7[_0x30e8('0x42')],qs['fields'](_0x4c5203[_0x30e8('0x40')][_0x30e8('0x44')]));_0x7875bc[_0x30e8('0x43')]=_0x7875bc['attributes'][_0x30e8('0x56')]?_0x7875bc[_0x30e8('0x43')]:_0x10e6a7[_0x30e8('0x42')];if(_0x4c5203[_0x30e8('0x40')][_0x30e8('0x57')]){_0x7875bc[_0x30e8('0x51')]=[{'all':!![]}];}_0x7875bc=_[_0x30e8('0x4f')]({},_0x7875bc,_0x4c5203['options']);return db[_0x30e8('0x3e')]['find'](_0x7875bc)[_0x30e8('0x24')](handleEntityNotFound(_0x341f1b,null))[_0x30e8('0x24')](respondWithResult(_0x341f1b,null))['catch'](handleError(_0x341f1b,null));};exports[_0x30e8('0x58')]=function(_0x15a014,_0x4f309c){if(_0x15a014[_0x30e8('0x59')]['id']){delete _0x15a014[_0x30e8('0x59')]['id'];}return db['MailMessage'][_0x30e8('0x5a')]({'where':{'id':_0x15a014[_0x30e8('0x55')]['id']}})[_0x30e8('0x24')](handleEntityNotFound(_0x4f309c,null))[_0x30e8('0x24')](saveUpdates(_0x15a014['body'],null))[_0x30e8('0x24')](respondWithResult(_0x4f309c,null))[_0x30e8('0x2f')](handleError(_0x4f309c,null));};exports[_0x30e8('0x5b')]=function(_0x279b5f,_0x295cf6){return db['MailMessage'][_0x30e8('0x5a')]({'where':{'id':_0x279b5f[_0x30e8('0x55')]['id']}})['then'](handleEntityNotFound(_0x295cf6,null))[_0x30e8('0x24')](removeEntity(_0x295cf6,null))[_0x30e8('0x2f')](handleError(_0x295cf6,null));};exports['describe']=function(_0x3a5f41,_0x2f9d15){return db[_0x30e8('0x3e')][_0x30e8('0x5c')]()[_0x30e8('0x24')](respondWithResult(_0x2f9d15,null))['catch'](handleError(_0x2f9d15,null));};exports[_0x30e8('0x5d')]=function(_0x36e076,_0x287884){return db[_0x30e8('0x3e')]['create'](_0x36e076['body'])[_0x30e8('0x24')](function(_0x144adb){if(_0x144adb){if(_0x144adb[_0x30e8('0x5e')]===_0x30e8('0x5f')&&!_0x144adb[_0x30e8('0x60')]){return db[_0x30e8('0x61')]['findOne']({'where':{'id':_0x144adb[_0x30e8('0x62')]},'include':[{'model':db[_0x30e8('0x63')],'as':_0x30e8('0x64'),'raw':!![]}]})[_0x30e8('0x24')](function(_0x50d9d4){if(_0x50d9d4&&_0x50d9d4[_0x30e8('0x64')]){var _0x2c35bb={'tls':{'rejectUnauthorized':![]}};if(_[_0x30e8('0x65')](_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x66')])){_0x2c35bb[_0x30e8('0x67')]=_0x50d9d4['Smtp'][_0x30e8('0x67')];_0x2c35bb[_0x30e8('0x68')]=_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x68')];_0x2c35bb[_0x30e8('0x69')]=_0x50d9d4[_0x30e8('0x64')]['secure'];if(_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x6a')]){_0x2c35bb['auth']={'user':_0x50d9d4['Smtp'][_0x30e8('0x6b')],'pass':_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x6c')]};}}else{_0x2c35bb['service']=_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x66')];_0x2c35bb[_0x30e8('0x6d')]={'user':_0x50d9d4['Smtp'][_0x30e8('0x6b')],'pass':_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x6c')]};_0x2c35bb[_0x30e8('0x69')]=_0x50d9d4[_0x30e8('0x64')][_0x30e8('0x69')];}if(_0x36e076[_0x30e8('0x59')]['attachments']&&_0x36e076[_0x30e8('0x59')][_0x30e8('0x6e')][_0x30e8('0x56')]){for(var _0x7a7ee0=0x0;_0x7a7ee0<_0x36e076[_0x30e8('0x59')][_0x30e8('0x6e')][_0x30e8('0x56')];_0x7a7ee0+=0x1){_0x36e076[_0x30e8('0x59')][_0x30e8('0x6e')][_0x7a7ee0]={'filename':_0x36e076[_0x30e8('0x59')][_0x30e8('0x6e')][_0x7a7ee0]['name'],'path':path['join'](config[_0x30e8('0x6f')],_0x30e8('0x70'),_0x36e076[_0x30e8('0x59')][_0x30e8('0x6e')][_0x7a7ee0][_0x30e8('0x71')])};}}return{'account':_0x2c35bb,'message':_0x36e076[_0x30e8('0x59')]};}})[_0x30e8('0x24')](function(_0x2e6039){if(_0x2e6039){return respondWithRpcPromise(_0x30e8('0x72'),_0x30e8('0x73'),_0x2e6039,client9003)[_0x30e8('0x24')](function(_0x4445a8){return _0x144adb['update']({'read':!![],'messageId':_0x4445a8[_0x30e8('0x74')],'sentAt':moment()[_0x30e8('0x75')](_0x30e8('0x76'))});})[_0x30e8('0x2f')](function(_0x4d2507){logger[_0x30e8('0x2b')]('%s',JSON['stringify'](_0x4d2507));return _0x144adb;});}return _0x144adb;});}return _0x144adb;}})[_0x30e8('0x24')](respondWithResult(_0x287884,0xc9))[_0x30e8('0x2f')](handleError(_0x287884,null));};var interaction_log=require(_0x30e8('0x15'))('mail-interactions');exports[_0x30e8('0x77')]=function(_0x1da3b3,_0x4bc882,_0x397a00){var _0x2dd36a={'channel':_0x30e8('0x78')};if(_0x1da3b3[_0x30e8('0x59')]['id']){delete _0x1da3b3['body']['id'];}_0x1da3b3['body'][_0x30e8('0x79')]=!![];_0x1da3b3[_0x30e8('0x59')][_0x30e8('0x7a')]=moment()[_0x30e8('0x75')](_0x30e8('0x76'));_0x1da3b3[_0x30e8('0x59')][_0x30e8('0x7b')]=_0x1da3b3['body'][_0x30e8('0x7b')]||_0x1da3b3[_0x30e8('0x6b')]['id'];return db[_0x30e8('0x3e')][_0x30e8('0x5a')]({'where':{'id':_0x1da3b3[_0x30e8('0x55')]['id'],'UserId':null},'include':[{'model':db[_0x30e8('0x7c')],'as':_0x30e8('0x7d')}]})[_0x30e8('0x24')](handleEntityNotFound(_0x4bc882,null))[_0x30e8('0x24')](saveUpdates(_0x1da3b3[_0x30e8('0x59')],null))[_0x30e8('0x24')](function(_0xc27810){if(_0xc27810){_0x2dd36a['message']=_0xc27810[_0x30e8('0x7e')]({'plain':!![]});return db[_0x30e8('0x7f')][_0x30e8('0x5a')]({'where':{'id':_0xc27810[_0x30e8('0x80')]}});}return null;})[_0x30e8('0x24')](handleEntityNotFound(_0x4bc882,null))['then'](function(_0x1c45ee){if(_0x1c45ee){return _0x1c45ee['update']({'UserId':_0x1da3b3[_0x30e8('0x59')]['UserId'],'read1stAt':_[_0x30e8('0x65')](_0x1c45ee[_0x30e8('0x81')])?moment()['format'](_0x30e8('0x76')):undefined});}return null;})['then'](function(_0x353541){if(_0x353541){_0x2dd36a['interaction']=_0x353541[_0x30e8('0x7e')]({'plain':!![]});interaction_log[_0x30e8('0x25')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x1da3b3[_0x30e8('0x6b')]['id'],_0x1da3b3['user']['name'],_0x1da3b3[_0x30e8('0x6b')][_0x30e8('0x82')],_0x2dd36a[_0x30e8('0x83')]['id'],_0x1da3b3[_0x30e8('0x59')]?JSON[_0x30e8('0x2a')](_0x1da3b3[_0x30e8('0x59')]):_0x30e8('0x84'));return respondWithRpcPromise(_0x30e8('0x85'),'acceptMessage',_0x2dd36a);}return null;})[_0x30e8('0x24')](function(_0x4ab3a4){if(_0x4ab3a4){if(_0x1da3b3[_0x30e8('0x59')][_0x30e8('0x86')]){_0x2dd36a['message'][_0x30e8('0x87')]=util[_0x30e8('0x75')](_0x30e8('0x88'),_0x1da3b3[_0x30e8('0x6b')][_0x30e8('0x3b')]);_0x2dd36a['message'][_0x30e8('0x89')]=_0x2dd36a[_0x30e8('0x89')];_0x2dd36a['message']['event']=_0x30e8('0x77');return respondWithRpcPromise(_0x30e8('0x8a'),'EventManager',{'event':_0x30e8('0x8b'),'message':_0x2dd36a[_0x30e8('0x2d')]},client9002)[_0x30e8('0x24')](function(){return _0x2dd36a;});}return _0x2dd36a;}return null;})['then'](respondWithResult(_0x4bc882,null))[_0x30e8('0x2f')](handleError(_0x4bc882,null));};var interaction_log=require(_0x30e8('0x15'))(_0x30e8('0x8c'));exports[_0x30e8('0x38')]=function(_0x120acd,_0x5e134c,_0x1a3862){var _0x4733f4={'agent':{},'channel':'mail'};if(_0x120acd[_0x30e8('0x59')]['id']){delete _0x120acd[_0x30e8('0x59')]['id'];}_0x120acd[_0x30e8('0x59')][_0x30e8('0x7b')]=_0x120acd['body'][_0x30e8('0x7b')]||_0x120acd[_0x30e8('0x6b')]['id'];_0x4733f4[_0x30e8('0x8d')]['id']=_0x120acd[_0x30e8('0x59')]['UserId'];return db['MailMessage']['find']({'where':{'id':_0x120acd[_0x30e8('0x55')]['id'],'UserId':null}})[_0x30e8('0x24')](handleEntityNotFound(_0x5e134c,null))[_0x30e8('0x24')](function(_0xa9098a){if(_0xa9098a){_0x4733f4[_0x30e8('0x2d')]=_0xa9098a[_0x30e8('0x7e')]({'plain':!![]});return db[_0x30e8('0x7f')][_0x30e8('0x5a')]({'where':{'id':_0xa9098a[_0x30e8('0x80')]}});}return null;})['then'](handleEntityNotFound(_0x5e134c,null))[_0x30e8('0x24')](function(_0x406692){if(_0x406692){_0x4733f4['interaction']=_0x406692[_0x30e8('0x7e')]({'plain':!![]});interaction_log['info'](_0x30e8('0x8e'),_0x120acd['user']['id'],_0x120acd[_0x30e8('0x6b')]['name'],_0x120acd['user']['role'],_0x4733f4['interaction']['id'],_0x120acd['body']?JSON[_0x30e8('0x2a')](_0x120acd[_0x30e8('0x59')]):_0x30e8('0x84'));return respondWithRpcPromise('RejectMessage',_0x30e8('0x8f'),_0x4733f4);}return null;})['then'](function(_0x387021){if(_0x387021){_0x387021['message'][_0x30e8('0x87')]=util[_0x30e8('0x75')]('SIP/%s',_0x120acd['user']['name']);_0x387021['message'][_0x30e8('0x89')]=_0x4733f4[_0x30e8('0x89')];_0x387021[_0x30e8('0x2d')]['event']=_0x30e8('0x38');respondWithRpcPromise(_0x30e8('0x8a'),_0x30e8('0x8a'),{'event':'rejectmessage','message':_0x387021['message']},client9002);return _0x4733f4;}return null;})[_0x30e8('0x24')](respondWithResult(_0x5e134c,null))[_0x30e8('0x2f')](handleError(_0x5e134c,null));};exports[_0x30e8('0x90')]=function(_0x39183d,_0x242771){var _0x49dd4d=moment()[_0x30e8('0x91')]()[_0x30e8('0x92')]();var _0x530deb=path['join'](config[_0x30e8('0x6f')],_0x30e8('0x93'),_0x30e8('0x94'),'tmp');var _0x2c3ff5=path[_0x30e8('0x95')](config[_0x30e8('0x6f')],_0x30e8('0x93'),_0x30e8('0x94'),_0x30e8('0x6e'));var _0x234d96=util[_0x30e8('0x75')]('message-%s.eml',_0x49dd4d);return db[_0x30e8('0x3e')][_0x30e8('0x5a')]({'where':{'id':_0x39183d[_0x30e8('0x55')]['id']},'attributes':['id',_0x30e8('0x59'),_0x30e8('0x96'),'to','cc',_0x30e8('0x97'),_0x30e8('0x98'),_0x30e8('0x99')],'include':_0x39183d[_0x30e8('0x40')][_0x30e8('0x6e')]?[{'model':db['Attachment'],'as':_0x30e8('0x9a')}]:undefined})[_0x30e8('0x24')](handleEntityNotFound(_0x242771,null))[_0x30e8('0x24')](function(_0x2177da){if(_0x2177da){var _0x4ce0fd=_0x2177da;var _0x5db18f={'from':_0x4ce0fd[_0x30e8('0x96')],'to':_0x4ce0fd['to'],'subject':_0x4ce0fd[_0x30e8('0x98')],'html':_0x4ce0fd[_0x30e8('0x59')],'headers':{'Date':moment(_0x4ce0fd[_0x30e8('0x99')])[_0x30e8('0x75')](_0x30e8('0x9b'))},'attachments':[]};if(_0x2177da['cc']){_0x5db18f[_0x30e8('0x9c')]['Cc']=_0x2177da['cc'];}if(_0x2177da[_0x30e8('0x97')]){_0x5db18f['headers'][_0x30e8('0x9d')]=_0x2177da['bcc'];}return new BPromise(function(_0xeb121d,_0x4d8bed){if(_0x2177da[_0x30e8('0x9a')]){for(var _0x106a0f=0x0;_0x106a0f<_0x2177da['Attachments'][_0x30e8('0x56')];_0x106a0f++){var _0x2cb9c9=_0x2177da[_0x30e8('0x9a')][_0x106a0f];var _0x52a674=path[_0x30e8('0x95')](_0x2c3ff5,_0x2cb9c9[_0x30e8('0x71')]);if(fs['existsSync'](_0x52a674)){_0x5db18f[_0x30e8('0x6e')][_0x30e8('0x9e')]({'name':_0x2cb9c9['name'],'contentType':_0x2cb9c9[_0x30e8('0x9f')],'data':fs[_0x30e8('0xa0')](_0x52a674)});}}}emlformat[_0x30e8('0xa1')](_0x5db18f,function(_0x101f7a,_0x23b141){if(_0x101f7a)return _0x4d8bed(_0x101f7a);fs['writeFileSync'](path[_0x30e8('0x95')](_0x530deb,_0x234d96),_0x23b141);return _0xeb121d(_0x23b141);});});}})[_0x30e8('0x24')](function(_0x1d0d4d){if(_0x1d0d4d){return _0x242771[_0x30e8('0x90')](path['join'](_0x530deb,_0x234d96),_0x234d96,function(_0x14ba92){if(_0x14ba92){console[_0x30e8('0xa2')](_0x30e8('0xa3'),_0x14ba92);}else{fs[_0x30e8('0xa4')](path[_0x30e8('0x95')](_0x530deb,_0x234d96));}});}})['catch'](handleError(_0x242771,null));};
\ No newline at end of file
+var _0x577e=['rawAttributes','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','map','type','key','VIRTUAL','field','options','MailMessage','includeAll','findAll','show','params','keys','merge','find','body','describe','create','out','secret','MailAccount','findOne','MailAccountId','MailServerOut','Smtp','service','port','secure','auth','user','pass','attachments','name','root','server/files/attachments','basename','SendMail','sendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','stringify','mail-interactions','accept','mail','read','readAt','UserId','CmContact','MailInteraction','isNil','read1stAt','interaction','get','[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','AcceptMessage','manual','interface','SIP/%s','channel','EventManager','acceptmessage','agent','MailInteractionId','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','event','rejectmessage','download','unix','toString','join','server','tmp','files','message-%s.eml','from','bcc','subject','createdAt','Attachment','Attachments','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','readFileSync','build','writeFileSync','log','err','unlinkSync','eml-format','rimraf','zip-dir','request-promise','bluebird','path','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','register','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','end','stack','send'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x577e,0x10e));var _0xe577=function(_0x4382bc,_0x231a2d){_0x4382bc=_0x4382bc-0x0;var _0x13c82a=_0x577e[_0x4382bc];return _0x13c82a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xe577('0x0'));var rimraf=require(_0xe577('0x1'));var zipdir=require(_0xe577('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe577('0x3'));var moment=require('moment');var BPromise=require(_0xe577('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0xe577('0x5'));var sox=require('sox');var csv=require(_0xe577('0x6'));var ejs=require(_0xe577('0x7'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xe577('0x8'));var jsforce=require(_0xe577('0x9'));var deskjs=require(_0xe577('0xa'));var toCsv=require(_0xe577('0x6'));var querystring=require(_0xe577('0xb'));var Papa=require(_0xe577('0xc'));var Redis=require(_0xe577('0xd'));var authService=require(_0xe577('0xe'));var qs=require(_0xe577('0xf'));var hardwareService=require(_0xe577('0x10'));var logger=require(_0xe577('0x11'))(_0xe577('0x12'));var utils=require(_0xe577('0x13'));var config=require(_0xe577('0x14'));var db=require(_0xe577('0x15'))['db'];config[_0xe577('0x16')]=_['defaults'](config['redis'],{'host':_0xe577('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe577('0x16')]));require('./mailMessage.socket')[_0xe577('0x18')](socket);var jayson=require(_0xe577('0x19'));var client=jayson[_0xe577('0x1a')]['http']({'port':0x232c});var client9003=jayson[_0xe577('0x1a')]['http']({'port':0x232b});var client9002=jayson['client'][_0xe577('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x2b1e6b,_0x25aa56,_0x13613c){if(_0x13613c){var _0x36e5da=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x36e5da[_0xe577('0x1c')](_0x25aa56)){return _0x2b1e6b;}else{throw new Error(_0xe577('0x1d'));}}else{return _0x2b1e6b;}}function respondWithRpcPromise(_0x4867bf,_0x512d15,_0x2397fe,_0x1e08b9){return new BPromise(function(_0x3a2be9,_0x3fddb0){var _0x349d47=_0x1e08b9||client;return _0x349d47[_0xe577('0x1e')](_0x4867bf,_0x2397fe)[_0xe577('0x1f')](function(_0x348be2){logger[_0xe577('0x20')](_0xe577('0x21'),_0x512d15,_0xe577('0x22'));logger[_0xe577('0x23')](_0xe577('0x24'),_0x512d15,_0xe577('0x22'),JSON['stringify'](_0x348be2));if(_0x348be2[_0xe577('0x25')]){if(_0x348be2[_0xe577('0x25')][_0xe577('0x26')]===0x1f4){logger[_0xe577('0x25')]('MailMessage,\x20%s,\x20%s',_0x512d15,_0x348be2[_0xe577('0x25')][_0xe577('0x27')]);return _0x3fddb0(_0x348be2['error'][_0xe577('0x27')]);}logger[_0xe577('0x25')](_0xe577('0x21'),_0x512d15,_0x348be2[_0xe577('0x25')][_0xe577('0x27')]);return _0x3a2be9(_0x348be2[_0xe577('0x25')]['message']);}else{logger[_0xe577('0x20')](_0xe577('0x21'),_0x512d15,_0xe577('0x22'));_0x3a2be9(_0x348be2[_0xe577('0x28')][_0xe577('0x27')]);}})[_0xe577('0x29')](function(_0x5aa343){logger[_0xe577('0x25')](_0xe577('0x21'),_0x512d15,_0x5aa343);_0x3fddb0(_0x5aa343);});});}function respondWithStatusCode(_0xd1724e,_0x3030d4){_0x3030d4=_0x3030d4||0xcc;return function(_0x1ff557){if(_0x1ff557){return _0xd1724e[_0xe577('0x2a')](_0x3030d4);}return _0xd1724e[_0xe577('0x2b')](_0x3030d4)['end']();};}function respondWithResult(_0x3091fb,_0x52b099){_0x52b099=_0x52b099||0xc8;return function(_0xde8d85){if(_0xde8d85){return _0x3091fb[_0xe577('0x2b')](_0x52b099)[_0xe577('0x2c')](_0xde8d85);}};}function respondWithFilteredResult(_0x16719f,_0x136f09){return function(_0x5c992d){if(_0x5c992d){var _0x273b59=_0x5c992d[_0xe577('0x2d')],_0x4ea5dc=_0x136f09[_0xe577('0x2e')],_0x3281e6=_0x136f09[_0xe577('0x2e')]+_0x136f09[_0xe577('0x2f')],_0x21a3fb;if(_0x3281e6>=_0x273b59){_0x3281e6=_0x273b59;_0x21a3fb=0xc8;}else{_0x21a3fb=0xce;}_0x16719f[_0xe577('0x2b')](_0x21a3fb);return _0x16719f[_0xe577('0x30')](_0xe577('0x31'),_0x4ea5dc+'-'+_0x3281e6+'/'+_0x273b59)['json'](_0x5c992d);}return null;};}function patchUpdates(_0x47b066){return function(_0x59587f){try{jsonpatch[_0xe577('0x32')](_0x59587f,_0x47b066,!![]);}catch(_0x25bc77){return BPromise[_0xe577('0x33')](_0x25bc77);}return _0x59587f[_0xe577('0x34')]();};}function saveUpdates(_0x3649e8,_0x4d9010){return function(_0xba7459){if(_0xba7459){return _0xba7459[_0xe577('0x35')](_0x3649e8)[_0xe577('0x1f')](function(_0x3301a2){return _0x3301a2;});}return null;};}function removeEntity(_0x59bda6,_0x1f8f2f){return function(_0x299b97){if(_0x299b97){return _0x299b97[_0xe577('0x36')]()[_0xe577('0x1f')](function(){_0x59bda6[_0xe577('0x2b')](0xcc)[_0xe577('0x37')]();});}};}function handleEntityNotFound(_0x51f02d,_0x3c3482){return function(_0x41f6f0){if(!_0x41f6f0){_0x51f02d[_0xe577('0x2a')](0x194);}return _0x41f6f0;};}function handleError(_0x38cf20,_0x5b14cd){_0x5b14cd=_0x5b14cd||0x1f4;return function(_0x2dc0b9){logger[_0xe577('0x25')](_0x2dc0b9[_0xe577('0x38')]);if(_0x2dc0b9['name']){delete _0x2dc0b9['name'];}_0x38cf20[_0xe577('0x2b')](_0x5b14cd)[_0xe577('0x39')](_0x2dc0b9);};}exports['index']=function(_0x280ab8,_0x479a62){var _0x293eaf={},_0x3c58f8={},_0x817486={'count':0x0,'rows':[]};var _0x5c4d3e=db['MailMessage'][_0xe577('0x3a')];_0x3c58f8[_0xe577('0x3b')]=_['keys'](_0x5c4d3e);_0x3c58f8[_0xe577('0x3c')]=_['keys'](_0x280ab8[_0xe577('0x3c')]);_0x3c58f8[_0xe577('0x3d')]=_[_0xe577('0x3e')](_0x3c58f8['model'],_0x3c58f8[_0xe577('0x3c')]);_0x293eaf[_0xe577('0x3f')]=_[_0xe577('0x3e')](_0x3c58f8[_0xe577('0x3b')],qs[_0xe577('0x40')](_0x280ab8[_0xe577('0x3c')][_0xe577('0x40')]));_0x293eaf[_0xe577('0x3f')]=_0x293eaf['attributes'][_0xe577('0x41')]?_0x293eaf[_0xe577('0x3f')]:_0x3c58f8[_0xe577('0x3b')];if(!_0x280ab8[_0xe577('0x3c')][_0xe577('0x42')](_0xe577('0x43'))){_0x293eaf['limit']=qs[_0xe577('0x2f')](_0x280ab8[_0xe577('0x3c')][_0xe577('0x2f')]);_0x293eaf[_0xe577('0x2e')]=qs['offset'](_0x280ab8['query'][_0xe577('0x2e')]);}_0x293eaf[_0xe577('0x44')]=qs['sort'](_0x280ab8[_0xe577('0x3c')][_0xe577('0x45')]);_0x293eaf[_0xe577('0x46')]=qs['filters'](_[_0xe577('0x47')](_0x280ab8[_0xe577('0x3c')],_0x3c58f8[_0xe577('0x3d')]));if(_0x280ab8[_0xe577('0x3c')][_0xe577('0x48')]){_0x293eaf['where']=_['merge'](_0x293eaf[_0xe577('0x46')],{'$or':_[_0xe577('0x49')](_0x5c4d3e,function(_0x15a811){if(_0x15a811[_0xe577('0x4a')][_0xe577('0x4b')]!==_0xe577('0x4c')){var _0x32ffa0={};_0x32ffa0[_0x15a811[_0xe577('0x4d')]]={'$like':'%'+_0x280ab8[_0xe577('0x3c')][_0xe577('0x48')]+'%'};return _0x32ffa0;}})});}_0x293eaf=_['merge']({},_0x293eaf,_0x280ab8[_0xe577('0x4e')]);var _0x49584e={'where':_0x293eaf[_0xe577('0x46')]};return db[_0xe577('0x4f')][_0xe577('0x2d')](_0x49584e)[_0xe577('0x1f')](function(_0x10ea91){_0x817486['count']=_0x10ea91;if(_0x280ab8[_0xe577('0x3c')][_0xe577('0x50')]){_0x293eaf['include']=[{'all':!![]}];}return db[_0xe577('0x4f')][_0xe577('0x51')](_0x293eaf);})[_0xe577('0x1f')](function(_0x3a55e5){_0x817486['rows']=_0x3a55e5;return _0x817486;})['then'](respondWithFilteredResult(_0x479a62,_0x293eaf))[_0xe577('0x29')](handleError(_0x479a62,null));};exports[_0xe577('0x52')]=function(_0x4de2ef,_0x1f2970){var _0x41a285={'raw':!![],'where':{'id':_0x4de2ef[_0xe577('0x53')]['id']}},_0x1d0e99={};_0x1d0e99[_0xe577('0x3b')]=_[_0xe577('0x54')](db['MailMessage'][_0xe577('0x3a')]);_0x1d0e99['query']=_['keys'](_0x4de2ef[_0xe577('0x3c')]);_0x1d0e99['filters']=_['intersection'](_0x1d0e99[_0xe577('0x3b')],_0x1d0e99[_0xe577('0x3c')]);_0x41a285[_0xe577('0x3f')]=_[_0xe577('0x3e')](_0x1d0e99[_0xe577('0x3b')],qs[_0xe577('0x40')](_0x4de2ef[_0xe577('0x3c')][_0xe577('0x40')]));_0x41a285[_0xe577('0x3f')]=_0x41a285[_0xe577('0x3f')]['length']?_0x41a285[_0xe577('0x3f')]:_0x1d0e99[_0xe577('0x3b')];if(_0x4de2ef[_0xe577('0x3c')]['includeAll']){_0x41a285['include']=[{'all':!![]}];}_0x41a285=_[_0xe577('0x55')]({},_0x41a285,_0x4de2ef[_0xe577('0x4e')]);return db[_0xe577('0x4f')][_0xe577('0x56')](_0x41a285)[_0xe577('0x1f')](handleEntityNotFound(_0x1f2970,null))[_0xe577('0x1f')](respondWithResult(_0x1f2970,null))[_0xe577('0x29')](handleError(_0x1f2970,null));};exports['update']=function(_0x276e2a,_0x3cd150){if(_0x276e2a[_0xe577('0x57')]['id']){delete _0x276e2a[_0xe577('0x57')]['id'];}return db[_0xe577('0x4f')][_0xe577('0x56')]({'where':{'id':_0x276e2a[_0xe577('0x53')]['id']}})[_0xe577('0x1f')](handleEntityNotFound(_0x3cd150,null))[_0xe577('0x1f')](saveUpdates(_0x276e2a[_0xe577('0x57')],null))[_0xe577('0x1f')](respondWithResult(_0x3cd150,null))[_0xe577('0x29')](handleError(_0x3cd150,null));};exports['destroy']=function(_0x3f630b,_0x553ef9){return db[_0xe577('0x4f')][_0xe577('0x56')]({'where':{'id':_0x3f630b[_0xe577('0x53')]['id']}})['then'](handleEntityNotFound(_0x553ef9,null))[_0xe577('0x1f')](removeEntity(_0x553ef9,null))['catch'](handleError(_0x553ef9,null));};exports[_0xe577('0x58')]=function(_0x6f068e,_0x5540c0){return db[_0xe577('0x4f')][_0xe577('0x58')]()[_0xe577('0x1f')](respondWithResult(_0x5540c0,null))['catch'](handleError(_0x5540c0,null));};exports[_0xe577('0x59')]=function(_0x115d4b,_0x23f95c){return db[_0xe577('0x4f')]['create'](_0x115d4b[_0xe577('0x57')])[_0xe577('0x1f')](function(_0x492ccb){if(_0x492ccb){if(_0x492ccb['direction']===_0xe577('0x5a')&&!_0x492ccb[_0xe577('0x5b')]){return db[_0xe577('0x5c')][_0xe577('0x5d')]({'where':{'id':_0x492ccb[_0xe577('0x5e')]},'include':[{'model':db[_0xe577('0x5f')],'as':_0xe577('0x60'),'raw':!![]}]})[_0xe577('0x1f')](function(_0x575f40){if(_0x575f40&&_0x575f40[_0xe577('0x60')]){var _0x1db4c={'tls':{'rejectUnauthorized':![]}};if(_['isNil'](_0x575f40[_0xe577('0x60')][_0xe577('0x61')])){_0x1db4c['host']=_0x575f40[_0xe577('0x60')]['host'];_0x1db4c[_0xe577('0x62')]=_0x575f40[_0xe577('0x60')][_0xe577('0x62')];_0x1db4c['secure']=_0x575f40[_0xe577('0x60')][_0xe577('0x63')];if(_0x575f40['Smtp']['authentication']){_0x1db4c[_0xe577('0x64')]={'user':_0x575f40[_0xe577('0x60')][_0xe577('0x65')],'pass':_0x575f40[_0xe577('0x60')]['pass']};}}else{_0x1db4c[_0xe577('0x61')]=_0x575f40[_0xe577('0x60')][_0xe577('0x61')];_0x1db4c[_0xe577('0x64')]={'user':_0x575f40[_0xe577('0x60')]['user'],'pass':_0x575f40[_0xe577('0x60')][_0xe577('0x66')]};_0x1db4c[_0xe577('0x63')]=_0x575f40[_0xe577('0x60')][_0xe577('0x63')];}if(_0x115d4b['body']['attachments']&&_0x115d4b[_0xe577('0x57')][_0xe577('0x67')][_0xe577('0x41')]){for(var _0xf9a3ee=0x0;_0xf9a3ee<_0x115d4b[_0xe577('0x57')][_0xe577('0x67')]['length'];_0xf9a3ee+=0x1){_0x115d4b['body'][_0xe577('0x67')][_0xf9a3ee]={'filename':_0x115d4b[_0xe577('0x57')][_0xe577('0x67')][_0xf9a3ee][_0xe577('0x68')],'path':path['join'](config[_0xe577('0x69')],_0xe577('0x6a'),_0x115d4b[_0xe577('0x57')][_0xe577('0x67')][_0xf9a3ee][_0xe577('0x6b')])};}}return{'account':_0x1db4c,'message':_0x115d4b[_0xe577('0x57')]};}})[_0xe577('0x1f')](function(_0x3d4c70){if(_0x3d4c70){return respondWithRpcPromise(_0xe577('0x6c'),_0xe577('0x6d'),_0x3d4c70,client9003)[_0xe577('0x1f')](function(_0x34fd30){return _0x492ccb['update']({'read':!![],'messageId':_0x34fd30[_0xe577('0x6e')],'sentAt':moment()[_0xe577('0x6f')](_0xe577('0x70'))});})[_0xe577('0x29')](function(_0x468c61){logger['error']('%s',JSON[_0xe577('0x71')](_0x468c61));return _0x492ccb;});}return _0x492ccb;});}return _0x492ccb;}})[_0xe577('0x1f')](respondWithResult(_0x23f95c,0xc9))[_0xe577('0x29')](handleError(_0x23f95c,null));};var interaction_log=require(_0xe577('0x11'))(_0xe577('0x72'));exports[_0xe577('0x73')]=function(_0x2f97e7,_0x45e5df,_0xeaf590){var _0x5d77da={'channel':_0xe577('0x74')};if(_0x2f97e7[_0xe577('0x57')]['id']){delete _0x2f97e7[_0xe577('0x57')]['id'];}_0x2f97e7[_0xe577('0x57')][_0xe577('0x75')]=!![];_0x2f97e7[_0xe577('0x57')][_0xe577('0x76')]=moment()[_0xe577('0x6f')]('YYYY-MM-DD\x20HH:mm:ss');_0x2f97e7[_0xe577('0x57')][_0xe577('0x77')]=_0x2f97e7[_0xe577('0x57')][_0xe577('0x77')]||_0x2f97e7[_0xe577('0x65')]['id'];return db['MailMessage']['find']({'where':{'id':_0x2f97e7[_0xe577('0x53')]['id'],'UserId':null},'include':[{'model':db[_0xe577('0x78')],'as':'Contact'}]})[_0xe577('0x1f')](handleEntityNotFound(_0x45e5df,null))[_0xe577('0x1f')](saveUpdates(_0x2f97e7[_0xe577('0x57')],null))[_0xe577('0x1f')](function(_0x36fdcf){if(_0x36fdcf){_0x5d77da['message']=_0x36fdcf['get']({'plain':!![]});return db[_0xe577('0x79')]['find']({'where':{'id':_0x36fdcf['MailInteractionId']}});}return null;})[_0xe577('0x1f')](handleEntityNotFound(_0x45e5df,null))[_0xe577('0x1f')](function(_0x6b35c7){if(_0x6b35c7){return _0x6b35c7[_0xe577('0x35')]({'UserId':_0x2f97e7['body'][_0xe577('0x77')],'read1stAt':_[_0xe577('0x7a')](_0x6b35c7[_0xe577('0x7b')])?moment()[_0xe577('0x6f')](_0xe577('0x70')):undefined});}return null;})['then'](function(_0x74e557){if(_0x74e557){_0x5d77da[_0xe577('0x7c')]=_0x74e557[_0xe577('0x7d')]({'plain':!![]});interaction_log[_0xe577('0x20')](_0xe577('0x7e'),_0x2f97e7[_0xe577('0x65')]['id'],_0x2f97e7['user']['name'],_0x2f97e7['user'][_0xe577('0x7f')],_0x5d77da[_0xe577('0x7c')]['id'],_0x2f97e7['body']?JSON[_0xe577('0x71')](_0x2f97e7[_0xe577('0x57')]):'null');return respondWithRpcPromise(_0xe577('0x80'),'acceptMessage',_0x5d77da);}return null;})[_0xe577('0x1f')](function(_0x344582){if(_0x344582){if(_0x2f97e7[_0xe577('0x57')][_0xe577('0x81')]){_0x5d77da[_0xe577('0x27')][_0xe577('0x82')]=util[_0xe577('0x6f')](_0xe577('0x83'),_0x2f97e7[_0xe577('0x65')][_0xe577('0x68')]);_0x5d77da[_0xe577('0x27')]['channel']=_0x5d77da[_0xe577('0x84')];_0x5d77da[_0xe577('0x27')]['event']='accept';return respondWithRpcPromise(_0xe577('0x85'),_0xe577('0x85'),{'event':_0xe577('0x86'),'message':_0x5d77da[_0xe577('0x27')]},client9002)['then'](function(){return _0x5d77da;});}return _0x5d77da;}return null;})[_0xe577('0x1f')](respondWithResult(_0x45e5df,null))[_0xe577('0x29')](handleError(_0x45e5df,null));};var interaction_log=require('../../config/logger')(_0xe577('0x72'));exports[_0xe577('0x33')]=function(_0x5574ec,_0x1488d1,_0x6b0407){var _0x1421e1={'agent':{},'channel':'mail'};if(_0x5574ec['body']['id']){delete _0x5574ec[_0xe577('0x57')]['id'];}_0x5574ec[_0xe577('0x57')][_0xe577('0x77')]=_0x5574ec[_0xe577('0x57')][_0xe577('0x77')]||_0x5574ec[_0xe577('0x65')]['id'];_0x1421e1[_0xe577('0x87')]['id']=_0x5574ec[_0xe577('0x57')][_0xe577('0x77')];return db[_0xe577('0x4f')][_0xe577('0x56')]({'where':{'id':_0x5574ec[_0xe577('0x53')]['id'],'UserId':null}})[_0xe577('0x1f')](handleEntityNotFound(_0x1488d1,null))[_0xe577('0x1f')](function(_0x185e0f){if(_0x185e0f){_0x1421e1[_0xe577('0x27')]=_0x185e0f[_0xe577('0x7d')]({'plain':!![]});return db[_0xe577('0x79')][_0xe577('0x56')]({'where':{'id':_0x185e0f[_0xe577('0x88')]}});}return null;})['then'](handleEntityNotFound(_0x1488d1,null))[_0xe577('0x1f')](function(_0xd83f10){if(_0xd83f10){_0x1421e1[_0xe577('0x7c')]=_0xd83f10['get']({'plain':!![]});interaction_log[_0xe577('0x20')](_0xe577('0x89'),_0x5574ec[_0xe577('0x65')]['id'],_0x5574ec[_0xe577('0x65')][_0xe577('0x68')],_0x5574ec['user'][_0xe577('0x7f')],_0x1421e1[_0xe577('0x7c')]['id'],_0x5574ec[_0xe577('0x57')]?JSON['stringify'](_0x5574ec['body']):'null');return respondWithRpcPromise(_0xe577('0x8a'),_0xe577('0x8b'),_0x1421e1);}return null;})['then'](function(_0xc95929){if(_0xc95929){_0xc95929[_0xe577('0x27')][_0xe577('0x82')]=util[_0xe577('0x6f')](_0xe577('0x83'),_0x5574ec['user'][_0xe577('0x68')]);_0xc95929[_0xe577('0x27')][_0xe577('0x84')]=_0x1421e1[_0xe577('0x84')];_0xc95929[_0xe577('0x27')][_0xe577('0x8c')]='reject';respondWithRpcPromise(_0xe577('0x85'),_0xe577('0x85'),{'event':_0xe577('0x8d'),'message':_0xc95929[_0xe577('0x27')]},client9002);return _0x1421e1;}return null;})['then'](respondWithResult(_0x1488d1,null))['catch'](handleError(_0x1488d1,null));};exports[_0xe577('0x8e')]=function(_0x59c445,_0x272014){var _0xd75848=moment()[_0xe577('0x8f')]()[_0xe577('0x90')]();var _0x459a16=path[_0xe577('0x91')](config[_0xe577('0x69')],_0xe577('0x92'),'files',_0xe577('0x93'));var _0x570f23=path['join'](config[_0xe577('0x69')],_0xe577('0x92'),_0xe577('0x94'),'attachments');var _0x95008a=util[_0xe577('0x6f')](_0xe577('0x95'),_0xd75848);return db[_0xe577('0x4f')][_0xe577('0x56')]({'where':{'id':_0x59c445[_0xe577('0x53')]['id']},'attributes':['id',_0xe577('0x57'),_0xe577('0x96'),'to','cc',_0xe577('0x97'),_0xe577('0x98'),_0xe577('0x99')],'include':_0x59c445[_0xe577('0x3c')][_0xe577('0x67')]?[{'model':db[_0xe577('0x9a')],'as':_0xe577('0x9b')}]:undefined})[_0xe577('0x1f')](handleEntityNotFound(_0x272014,null))[_0xe577('0x1f')](function(_0x27c68e){if(_0x27c68e){var _0x291e3f=_0x27c68e;var _0x19a485={'from':_0x291e3f[_0xe577('0x96')],'to':_0x291e3f['to'],'subject':_0x291e3f[_0xe577('0x98')],'html':_0x291e3f[_0xe577('0x57')],'headers':{'Date':moment(_0x291e3f['createdAt'])['format'](_0xe577('0x9c'))},'attachments':[]};if(_0x27c68e['cc']){_0x19a485[_0xe577('0x9d')]['Cc']=_0x27c68e['cc'];}if(_0x27c68e['bcc']){_0x19a485[_0xe577('0x9d')]['Bcc']=_0x27c68e['bcc'];}return new BPromise(function(_0x34b816,_0x43fdf3){if(_0x27c68e[_0xe577('0x9b')]){for(var _0xf04d31=0x0;_0xf04d31<_0x27c68e[_0xe577('0x9b')][_0xe577('0x41')];_0xf04d31++){var _0x5b3a49=_0x27c68e[_0xe577('0x9b')][_0xf04d31];var _0x7efc98=path[_0xe577('0x91')](_0x570f23,_0x5b3a49[_0xe577('0x6b')]);if(fs['existsSync'](_0x7efc98)){_0x19a485[_0xe577('0x67')]['push']({'name':_0x5b3a49['name'],'contentType':_0x5b3a49[_0xe577('0x4a')],'data':fs[_0xe577('0x9e')](_0x7efc98)});}}}emlformat[_0xe577('0x9f')](_0x19a485,function(_0x1b580,_0x109e5d){if(_0x1b580)return _0x43fdf3(_0x1b580);fs[_0xe577('0xa0')](path[_0xe577('0x91')](_0x459a16,_0x95008a),_0x109e5d);return _0x34b816(_0x109e5d);});});}})['then'](function(_0x221b2f){if(_0x221b2f){return _0x272014[_0xe577('0x8e')](path[_0xe577('0x91')](_0x459a16,_0x95008a),_0x95008a,function(_0x71f758){if(_0x71f758){console[_0xe577('0xa1')](_0xe577('0xa2'),_0x71f758);}else{fs[_0xe577('0xa3')](path[_0xe577('0x91')](_0x459a16,_0x95008a));}});}})[_0xe577('0x29')](handleError(_0x272014,null));};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.events.js b/server/api/mailMessage/mailMessage.events.js
index 06f90e2..edf953a 100644
--- a/server/api/mailMessage/mailMessage.events.js
+++ b/server/api/mailMessage/mailMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3f15=['hook','MailMessage','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x3f15,0x199));var _0x53f1=function(_0x263413,_0x556de2){_0x263413=_0x263413-0x0;var _0x3c00d9=_0x3f15[_0x263413];return _0x3c00d9;};'use strict';var EventEmitter=require('events');var MailMessage=require('../../mysqldb')['db'][_0x53f1('0x0')];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0x53f1('0x1')](0x0);var events={'afterCreate':_0x53f1('0x2'),'afterUpdate':_0x53f1('0x3'),'afterDestroy':_0x53f1('0x4')};function emitEvent(_0x2b1317){return function(_0x1d12af,_0x8086c6,_0x236c26){MailMessageEvents[_0x53f1('0x5')](_0x2b1317+':'+_0x1d12af['id'],_0x1d12af);MailMessageEvents[_0x53f1('0x5')](_0x2b1317,_0x1d12af);_0x236c26(null);};}for(var e in events){if(events[_0x53f1('0x6')](e)){var event=events[e];MailMessage[_0x53f1('0x7')](e,emitEvent(event));}}module['exports']=MailMessageEvents;
\ No newline at end of file
+var _0xaf09=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailMessage','setMaxListeners','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xaf09,0xa6));var _0x9af0=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0xaf09[_0x24237f];return _0x48298e;};'use strict';var EventEmitter=require(_0x9af0('0x0'));var MailMessage=require(_0x9af0('0x1'))['db'][_0x9af0('0x2')];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0x9af0('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9af0('0x4'),'afterDestroy':'remove'};function emitEvent(_0x16f8a4){return function(_0x171afe,_0x5340b3,_0x407010){MailMessageEvents[_0x9af0('0x5')](_0x16f8a4+':'+_0x171afe['id'],_0x171afe);MailMessageEvents[_0x9af0('0x5')](_0x16f8a4,_0x171afe);_0x407010(null);};}for(var e in events){if(events[_0x9af0('0x6')](e)){var event=events[e];MailMessage[_0x9af0('0x7')](e,emitEvent(event));}}module[_0x9af0('0x8')]=MailMessageEvents;
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.model.js b/server/api/mailMessage/mailMessage.model.js
index 387c310..e845994 100644
--- a/server/api/mailMessage/mailMessage.model.js
+++ b/server/api/mailMessage/mailMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x62ab=['FULLTEXT','body','fromString','models','get','toLowerCase','secret','isNil','UserId','MailInteraction','findOne','MailInteractionId','then','update','createdAt','direction','catch','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','html-to-text','./mailMessage.attributes','exports','define','MailMessage','messageId','fti_mail_messages','plainBody'];(function(_0x4851a9,_0x4eb8f7){var _0x827323=function(_0x49acd3){while(--_0x49acd3){_0x4851a9['push'](_0x4851a9['shift']());}};_0x827323(++_0x4eb8f7);}(_0x62ab,0xfa));var _0xb62a=function(_0x39459f,_0x4b682e){_0x39459f=_0x39459f-0x0;var _0x8a495b=_0x62ab[_0x39459f];return _0x8a495b;};'use strict';var _=require('lodash');var util=require(_0xb62a('0x0'));var logger=require(_0xb62a('0x1'))(_0xb62a('0x2'));var moment=require(_0xb62a('0x3'));var BPromise=require(_0xb62a('0x4'));var rp=require(_0xb62a('0x5'));var htmlToText=require(_0xb62a('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xb62a('0x7'));module[_0xb62a('0x8')]=function(_0x47b7cc,_0x56c4a5){return _0x47b7cc[_0xb62a('0x9')](_0xb62a('0xa'),attributes,{'tableName':'mail_messages','paranoid':![],'indexes':[{'name':_0xb62a('0xb'),'fields':[_0xb62a('0xb')]},{'name':_0xb62a('0xc'),'fields':[_0xb62a('0xd'),'subject'],'type':_0xb62a('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x2edd07,_0x1e2177,_0x5ba88b){if(_0x2edd07[_0xb62a('0xf')]){_0x2edd07[_0xb62a('0xd')]=htmlToText[_0xb62a('0x10')](_0x2edd07[_0xb62a('0xf')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x5ba88b(null,_0x1e2177);},'afterCreate':function(_0x2adfb7,_0x1e09f6,_0xa0646b){var _0x313753=_0x47b7cc[_0xb62a('0x11')];var _0x8b8535=_0x2adfb7[_0xb62a('0x12')]({'plain':!![]});if(_0x8b8535['direction'][_0xb62a('0x13')]()==='in'||_0x8b8535['direction'][_0xb62a('0x13')]()==='out'&&!_0x8b8535[_0xb62a('0x14')]&&!_[_0xb62a('0x15')](_0x8b8535[_0xb62a('0x16')])){_0x313753[_0xb62a('0x17')][_0xb62a('0x18')]({'where':{'id':_0x8b8535[_0xb62a('0x19')]}})[_0xb62a('0x1a')](function(_0x5347d1){if(_0x5347d1){_0x5347d1[_0xb62a('0x1b')]({'lastMsgAt':_0x8b8535[_0xb62a('0x1c')],'lastMsgDirection':_0x8b8535[_0xb62a('0x1d')][_0xb62a('0x13')](),'lastMsgBody':_0x8b8535[_0xb62a('0xf')]});}})[_0xb62a('0x1e')](function(_0x434367){console['error'](_0x434367);});}_0xa0646b();}},'charset':_0xb62a('0x1f'),'collate':_0xb62a('0x20')});};
\ No newline at end of file
+var _0xd980=['createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','moment','bluebird','request-promise','html-to-text','path','rimraf','../../config/environment','./mailMessage.attributes','define','MailMessage','messageId','plainBody','subject','body','fromString','models','get','direction','toLowerCase','MailInteraction','findOne','MailInteractionId','then'];(function(_0x3044e3,_0x255336){var _0x389181=function(_0x4aac71){while(--_0x4aac71){_0x3044e3['push'](_0x3044e3['shift']());}};_0x389181(++_0x255336);}(_0xd980,0xb9));var _0x0d98=function(_0x24945a,_0x2f4a55){_0x24945a=_0x24945a-0x0;var _0x32de20=_0xd980[_0x24945a];return _0x32de20;};'use strict';var _=require(_0x0d98('0x0'));var util=require(_0x0d98('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x0d98('0x2'));var BPromise=require(_0x0d98('0x3'));var rp=require(_0x0d98('0x4'));var htmlToText=require(_0x0d98('0x5'));var fs=require('fs');var path=require(_0x0d98('0x6'));var rimraf=require(_0x0d98('0x7'));var config=require(_0x0d98('0x8'));var attributes=require(_0x0d98('0x9'));module['exports']=function(_0x38b98b,_0x57d691){return _0x38b98b[_0x0d98('0xa')](_0x0d98('0xb'),attributes,{'tableName':'mail_messages','paranoid':![],'indexes':[{'name':_0x0d98('0xc'),'fields':[_0x0d98('0xc')]},{'name':'fti_mail_messages','fields':[_0x0d98('0xd'),_0x0d98('0xe')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0xb321cf,_0x37fb6a,_0x294fdf){if(_0xb321cf[_0x0d98('0xf')]){_0xb321cf[_0x0d98('0xd')]=htmlToText[_0x0d98('0x10')](_0xb321cf[_0x0d98('0xf')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x294fdf(null,_0x37fb6a);},'afterCreate':function(_0x4c52f7,_0x1d3886,_0x430da6){var _0x2c6936=_0x38b98b[_0x0d98('0x11')];var _0x2f32d4=_0x4c52f7[_0x0d98('0x12')]({'plain':!![]});if(_0x2f32d4[_0x0d98('0x13')][_0x0d98('0x14')]()==='in'||_0x2f32d4[_0x0d98('0x13')][_0x0d98('0x14')]()==='out'&&!_0x2f32d4['secret']&&!_['isNil'](_0x2f32d4['UserId'])){_0x2c6936[_0x0d98('0x15')][_0x0d98('0x16')]({'where':{'id':_0x2f32d4[_0x0d98('0x17')]}})[_0x0d98('0x18')](function(_0x4788df){if(_0x4788df){_0x4788df['update']({'lastMsgAt':_0x2f32d4[_0x0d98('0x19')],'lastMsgDirection':_0x2f32d4[_0x0d98('0x13')]['toLowerCase'](),'lastMsgBody':_0x2f32d4[_0x0d98('0xf')]});}})[_0x0d98('0x1a')](function(_0x19bda8){console[_0x0d98('0x1b')](_0x19bda8);});}_0x430da6();}},'charset':_0x0d98('0x1c'),'collate':_0x0d98('0x1d')});};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.rpc.js b/server/api/mailMessage/mailMessage.rpc.js
index c946db3..c6b3b6d 100644
--- a/server/api/mailMessage/mailMessage.rpc.js
+++ b/server/api/mailMessage/mailMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x98a8=['MailMessage,\x20%s,\x20%s,\x20%s','error','code','MailMessage,\x20%s,\x20%s','message','result','catch','CreateMailMessage','MailMessage','create','body','options','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','socket.io-emitter','./mailMessage.socket','register','then','info','request\x20sent','debug'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x98a8,0x12c));var _0x898a=function(_0x43dba5,_0x75bc24){_0x43dba5=_0x43dba5-0x0;var _0x51bfbe=_0x98a8[_0x43dba5];return _0x51bfbe;};'use strict';var _=require(_0x898a('0x0'));var util=require(_0x898a('0x1'));var moment=require(_0x898a('0x2'));var BPromise=require(_0x898a('0x3'));var rs=require(_0x898a('0x4'));var fs=require('fs');var Redis=require(_0x898a('0x5'));var db=require(_0x898a('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x898a('0x7'))(_0x898a('0x8'));var config=require(_0x898a('0x9'));var jayson=require(_0x898a('0xa'));var client=jayson[_0x898a('0xb')]['http']({'port':0x232a});config[_0x898a('0xc')]=_['defaults'](config[_0x898a('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x898a('0xd'))(new Redis(config[_0x898a('0xc')]));require(_0x898a('0xe'))[_0x898a('0xf')](socket);function respondWithRpcPromise(_0x3150df,_0x388a47,_0x42faa4){return new BPromise(function(_0x1a92de,_0x3806cb){return client['request'](_0x3150df,_0x42faa4)[_0x898a('0x10')](function(_0x502e95){logger[_0x898a('0x11')]('MailMessage,\x20%s,\x20%s',_0x388a47,_0x898a('0x12'));logger[_0x898a('0x13')](_0x898a('0x14'),_0x388a47,'request\x20sent',JSON['stringify'](_0x502e95));if(_0x502e95['error']){if(_0x502e95[_0x898a('0x15')][_0x898a('0x16')]===0x1f4){logger[_0x898a('0x15')](_0x898a('0x17'),_0x388a47,_0x502e95[_0x898a('0x15')][_0x898a('0x18')]);return _0x3806cb(_0x502e95['error'][_0x898a('0x18')]);}logger['error'](_0x898a('0x17'),_0x388a47,_0x502e95['error'][_0x898a('0x18')]);return _0x1a92de(_0x502e95['error'][_0x898a('0x18')]);}else{logger['info'](_0x898a('0x17'),_0x388a47,_0x898a('0x12'));_0x1a92de(_0x502e95[_0x898a('0x19')]['message']);}})[_0x898a('0x1a')](function(_0x5960e0){logger['error'](_0x898a('0x17'),_0x388a47,_0x5960e0);_0x3806cb(_0x5960e0);});});}exports[_0x898a('0x1b')]=function(_0x58c3ab){var _0x4d374b=this;return new Promise(function(_0x12bc0f,_0x26449a){return db[_0x898a('0x1c')][_0x898a('0x1d')](_0x58c3ab[_0x898a('0x1e')],{'raw':_0x58c3ab[_0x898a('0x1f')]?_0x58c3ab[_0x898a('0x1f')]['raw']===undefined?!![]:![]:!![]})[_0x898a('0x10')](function(_0x50718e){logger[_0x898a('0x11')](_0x898a('0x1b'),_0x58c3ab);logger[_0x898a('0x13')](_0x898a('0x1b'),_0x58c3ab,JSON['stringify'](_0x50718e));_0x12bc0f(_0x50718e);})[_0x898a('0x1a')](function(_0x16c318){logger[_0x898a('0x15')](_0x898a('0x1b'),_0x16c318[_0x898a('0x18')],_0x58c3ab);_0x26449a(_0x4d374b[_0x898a('0x15')](0x1f4,_0x16c318['message']));});});};
\ No newline at end of file
+var _0x723e=['MailMessage,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','MailMessage','body','options','raw','then','CreateMailMessage','stringify','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','info'];(function(_0x18187c,_0x85ae7){var _0x44f458=function(_0x3daf28){while(--_0x3daf28){_0x18187c['push'](_0x18187c['shift']());}};_0x44f458(++_0x85ae7);}(_0x723e,0x179));var _0xe723=function(_0x220d63,_0x2ac173){_0x220d63=_0x220d63-0x0;var _0xffccaa=_0x723e[_0x220d63];return _0xffccaa;};'use strict';var _=require('lodash');var util=require(_0xe723('0x0'));var moment=require(_0xe723('0x1'));var BPromise=require(_0xe723('0x2'));var rs=require(_0xe723('0x3'));var fs=require('fs');var Redis=require(_0xe723('0x4'));var db=require(_0xe723('0x5'))['db'];var utils=require(_0xe723('0x6'));var logger=require(_0xe723('0x7'))(_0xe723('0x8'));var config=require(_0xe723('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe723('0xa')][_0xe723('0xb')]({'port':0x232a});config[_0xe723('0xc')]=_[_0xe723('0xd')](config[_0xe723('0xc')],{'host':_0xe723('0xe'),'port':0x18eb});var socket=require(_0xe723('0xf'))(new Redis(config[_0xe723('0xc')]));require('./mailMessage.socket')[_0xe723('0x10')](socket);function respondWithRpcPromise(_0x270346,_0x34831f,_0x5a43fb){return new BPromise(function(_0x24eef1,_0x3809af){return client[_0xe723('0x11')](_0x270346,_0x5a43fb)['then'](function(_0x146098){logger[_0xe723('0x12')](_0xe723('0x13'),_0x34831f,_0xe723('0x14'));logger[_0xe723('0x15')]('MailMessage,\x20%s,\x20%s,\x20%s',_0x34831f,_0xe723('0x14'),JSON['stringify'](_0x146098));if(_0x146098['error']){if(_0x146098['error']['code']===0x1f4){logger[_0xe723('0x16')](_0xe723('0x13'),_0x34831f,_0x146098[_0xe723('0x16')][_0xe723('0x17')]);return _0x3809af(_0x146098[_0xe723('0x16')]['message']);}logger[_0xe723('0x16')](_0xe723('0x13'),_0x34831f,_0x146098[_0xe723('0x16')][_0xe723('0x17')]);return _0x24eef1(_0x146098[_0xe723('0x16')][_0xe723('0x17')]);}else{logger[_0xe723('0x12')](_0xe723('0x13'),_0x34831f,_0xe723('0x14'));_0x24eef1(_0x146098[_0xe723('0x18')][_0xe723('0x17')]);}})[_0xe723('0x19')](function(_0x262a8d){logger[_0xe723('0x16')]('MailMessage,\x20%s,\x20%s',_0x34831f,_0x262a8d);_0x3809af(_0x262a8d);});});}exports['CreateMailMessage']=function(_0x31c839){var _0x1ed6fb=this;return new Promise(function(_0x487058,_0x28caca){return db[_0xe723('0x1a')]['create'](_0x31c839[_0xe723('0x1b')],{'raw':_0x31c839['options']?_0x31c839[_0xe723('0x1c')][_0xe723('0x1d')]===undefined?!![]:![]:!![]})[_0xe723('0x1e')](function(_0x1fe43d){logger[_0xe723('0x12')](_0xe723('0x1f'),_0x31c839);logger[_0xe723('0x15')](_0xe723('0x1f'),_0x31c839,JSON[_0xe723('0x20')](_0x1fe43d));_0x487058(_0x1fe43d);})[_0xe723('0x19')](function(_0x4a0899){logger[_0xe723('0x16')]('CreateMailMessage',_0x4a0899[_0xe723('0x17')],_0x31c839);_0x28caca(_0x1ed6fb['error'](0x1f4,_0x4a0899[_0xe723('0x17')]));});});};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.socket.js b/server/api/mailMessage/mailMessage.socket.js
index b535c8a..75b65d1 100644
--- a/server/api/mailMessage/mailMessage.socket.js
+++ b/server/api/mailMessage/mailMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0e5c=['save','update','removeListener','register','length','mailMessage:'];(function(_0x1d0f9f,_0x5ae4b1){var _0x472d34=function(_0x412d62){while(--_0x412d62){_0x1d0f9f['push'](_0x1d0f9f['shift']());}};_0x472d34(++_0x5ae4b1);}(_0x0e5c,0x1ec));var _0xc0e5=function(_0xf1af27,_0x598bb1){_0xf1af27=_0xf1af27-0x0;var _0x46b274=_0x0e5c[_0xf1af27];return _0x46b274;};'use strict';var MailMessageEvents=require('./mailMessage.events');var events=[_0xc0e5('0x0'),'remove',_0xc0e5('0x1')];function createListener(_0x3e6f70,_0x3c9709){return function(_0x2043d2){_0x3c9709['emit'](_0x3e6f70,_0x2043d2);};}function removeListener(_0x3995a9,_0x555d93){return function(){MailMessageEvents[_0xc0e5('0x2')](_0x3995a9,_0x555d93);};}exports[_0xc0e5('0x3')]=function(_0x1bdb6d){for(var _0x52d09a=0x0,_0x5547cb=events[_0xc0e5('0x4')];_0x52d09a<_0x5547cb;_0x52d09a++){var _0x5bc875=events[_0x52d09a];var _0x3cee39=createListener(_0xc0e5('0x5')+_0x5bc875,_0x1bdb6d);MailMessageEvents['on'](_0x5bc875,_0x3cee39);}};
\ No newline at end of file
+var _0x030a=['update','emit','removeListener','register','length','./mailMessage.events','save'];(function(_0x48bcae,_0x27f7d2){var _0x4998b4=function(_0x47072e){while(--_0x47072e){_0x48bcae['push'](_0x48bcae['shift']());}};_0x4998b4(++_0x27f7d2);}(_0x030a,0xc2));var _0xa030=function(_0x2acec2,_0x12ebf1){_0x2acec2=_0x2acec2-0x0;var _0x19aa0d=_0x030a[_0x2acec2];return _0x19aa0d;};'use strict';var MailMessageEvents=require(_0xa030('0x0'));var events=[_0xa030('0x1'),'remove',_0xa030('0x2')];function createListener(_0x5a0350,_0x1e9f21){return function(_0x10079a){_0x1e9f21[_0xa030('0x3')](_0x5a0350,_0x10079a);};}function removeListener(_0x86d003,_0x1f9971){return function(){MailMessageEvents[_0xa030('0x4')](_0x86d003,_0x1f9971);};}exports[_0xa030('0x5')]=function(_0x5b7fdf){for(var _0x46406a=0x0,_0x52b10f=events[_0xa030('0x6')];_0x46406a<_0x52b10f;_0x46406a++){var _0x391672=events[_0x46406a];var _0x20ed6b=createListener('mailMessage:'+_0x391672,_0x5b7fdf);MailMessageEvents['on'](_0x391672,_0x20ed6b);}};
\ No newline at end of file
diff --git a/server/api/mailQueue/index.js b/server/api/mailQueue/index.js
index 989602c..b29d341 100644
--- a/server/api/mailQueue/index.js
+++ b/server/api/mailQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x243f=['/:id/users','post','create','update','/:id','destroy','delete','removeTeams','removeAgents','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./mailQueue.controller','get','index','/describe','describe','isAuthenticated','/:id/members','/:id/teams','getTeams'];(function(_0x545e86,_0x46a2ed){var _0xa98055=function(_0x41aa23){while(--_0x41aa23){_0x545e86['push'](_0x545e86['shift']());}};_0xa98055(++_0x46a2ed);}(_0x243f,0x72));var _0xf243=function(_0x188945,_0x2aafa5){_0x188945=_0x188945-0x0;var _0x4959c2=_0x243f[_0x188945];return _0x4959c2;};'use strict';var multer=require(_0xf243('0x0'));var util=require(_0xf243('0x1'));var path=require(_0xf243('0x2'));var timeout=require(_0xf243('0x3'));var express=require('express');var router=express[_0xf243('0x4')]();var auth=require(_0xf243('0x5'));var interaction=require(_0xf243('0x6'));var config=require('../../config/environment');var controller=require(_0xf243('0x7'));router[_0xf243('0x8')]('/',auth['isAuthenticated'](),controller[_0xf243('0x9')]);router[_0xf243('0x8')](_0xf243('0xa'),auth['isAuthenticated'](),controller[_0xf243('0xb')]);router['get']('/:id',auth[_0xf243('0xc')](),controller['show']);router[_0xf243('0x8')](_0xf243('0xd'),auth[_0xf243('0xc')](),controller['getMembers']);router[_0xf243('0x8')](_0xf243('0xe'),auth[_0xf243('0xc')](),controller[_0xf243('0xf')]);router[_0xf243('0x8')](_0xf243('0x10'),auth[_0xf243('0xc')](),controller['getAgents']);router[_0xf243('0x11')]('/',auth[_0xf243('0xc')](),controller[_0xf243('0x12')]);router[_0xf243('0x11')](_0xf243('0xe'),auth[_0xf243('0xc')](),controller['addTeams']);router[_0xf243('0x11')](_0xf243('0x10'),auth[_0xf243('0xc')](),controller['addAgents']);router['put']('/:id',auth[_0xf243('0xc')](),controller[_0xf243('0x13')]);router['delete'](_0xf243('0x14'),auth[_0xf243('0xc')](),controller[_0xf243('0x15')]);router[_0xf243('0x16')]('/:id/teams',auth[_0xf243('0xc')](),controller[_0xf243('0x17')]);router['delete'](_0xf243('0x10'),auth['isAuthenticated'](),controller[_0xf243('0x18')]);module[_0xf243('0x19')]=router;
\ No newline at end of file
+var _0x4e19=['update','delete','destroy','removeAgents','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./mailQueue.controller','isAuthenticated','get','/describe','/:id','show','/:id/members','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams'];(function(_0x23351c,_0x33173a){var _0x4126fd=function(_0x2852cb){while(--_0x2852cb){_0x23351c['push'](_0x23351c['shift']());}};_0x4126fd(++_0x33173a);}(_0x4e19,0x1c7));var _0x94e1=function(_0x286c4a,_0x3d559d){_0x286c4a=_0x286c4a-0x0;var _0x476a25=_0x4e19[_0x286c4a];return _0x476a25;};'use strict';var multer=require(_0x94e1('0x0'));var util=require(_0x94e1('0x1'));var path=require(_0x94e1('0x2'));var timeout=require(_0x94e1('0x3'));var express=require('express');var router=express[_0x94e1('0x4')]();var auth=require(_0x94e1('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x94e1('0x6'));var controller=require(_0x94e1('0x7'));router['get']('/',auth[_0x94e1('0x8')](),controller['index']);router[_0x94e1('0x9')](_0x94e1('0xa'),auth[_0x94e1('0x8')](),controller['describe']);router[_0x94e1('0x9')](_0x94e1('0xb'),auth[_0x94e1('0x8')](),controller[_0x94e1('0xc')]);router[_0x94e1('0x9')](_0x94e1('0xd'),auth[_0x94e1('0x8')](),controller['getMembers']);router[_0x94e1('0x9')](_0x94e1('0xe'),auth['isAuthenticated'](),controller[_0x94e1('0xf')]);router['get'](_0x94e1('0x10'),auth[_0x94e1('0x8')](),controller[_0x94e1('0x11')]);router[_0x94e1('0x12')]('/',auth[_0x94e1('0x8')](),controller['create']);router[_0x94e1('0x12')](_0x94e1('0xe'),auth[_0x94e1('0x8')](),controller[_0x94e1('0x13')]);router[_0x94e1('0x12')](_0x94e1('0x10'),auth[_0x94e1('0x8')](),controller['addAgents']);router['put'](_0x94e1('0xb'),auth[_0x94e1('0x8')](),controller[_0x94e1('0x14')]);router[_0x94e1('0x15')](_0x94e1('0xb'),auth[_0x94e1('0x8')](),controller[_0x94e1('0x16')]);router[_0x94e1('0x15')](_0x94e1('0xe'),auth[_0x94e1('0x8')](),controller['removeTeams']);router['delete'](_0x94e1('0x10'),auth[_0x94e1('0x8')](),controller[_0x94e1('0x17')]);module[_0x94e1('0x18')]=router;
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.attributes.js b/server/api/mailQueue/mailQueue.attributes.js
index 550bb4c..8d86eef 100644
--- a/server/api/mailQueue/mailQueue.attributes.js
+++ b/server/api/mailQueue/mailQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x087a=['INTEGER','ENUM','rrmemory','roundrobin','exports','name','STRING'];(function(_0x545e86,_0x46a2ed){var _0xa98055=function(_0x41aa23){while(--_0x41aa23){_0x545e86['push'](_0x545e86['shift']());}};_0xa98055(++_0x46a2ed);}(_0x087a,0x14d));var _0xa087=function(_0x50f953,_0x5145aa){_0x50f953=_0x50f953-0x0;var _0x16d88b=_0x087a[_0x50f953];return _0x16d88b;};'use strict';var Sequelize=require('sequelize');module[_0xa087('0x0')]={'name':{'type':Sequelize['STRING'],'unique':_0xa087('0x1'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xa087('0x2')]},'timeout':{'type':Sequelize[_0xa087('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xa087('0x4')](_0xa087('0x5'),'beepall',_0xa087('0x6'))}};
\ No newline at end of file
+var _0x8d91=['beepall','sequelize','STRING','name','INTEGER','ENUM','rrmemory'];(function(_0x189418,_0x4ee706){var _0x343b35=function(_0x1547e5){while(--_0x1547e5){_0x189418['push'](_0x189418['shift']());}};_0x343b35(++_0x4ee706);}(_0x8d91,0x1e4));var _0x18d9=function(_0xf261b7,_0x35ef78){_0xf261b7=_0xf261b7-0x0;var _0x1360d4=_0x8d91[_0xf261b7];return _0x1360d4;};'use strict';var Sequelize=require(_0x18d9('0x0'));module['exports']={'name':{'type':Sequelize[_0x18d9('0x1')],'unique':_0x18d9('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x18d9('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x18d9('0x4')](_0x18d9('0x5'),_0x18d9('0x6'),'roundrobin')}};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.controller.js b/server/api/mailQueue/mailQueue.controller.js
index 1735cf3..96b8294 100644
--- a/server/api/mailQueue/mailQueue.controller.js
+++ b/server/api/mailQueue/mailQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7efd=['Team','nolimit','addTeams','teams','Agents','online','flatMap','sequelize','UserMailQueue','findOrCreate','forEach','emit','userMailQueue:save','removeTeams','ids','select','tq.TeamId','team_has_mail_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','SELECT','every','includes','compact','value','transaction','isEmpty','removeAgents','userMailQueue:remove','addAgents','omit','spread','getAgents','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','register','sendStatus','end','status','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','MailQueues','UserProfileResource','error','stack','name','send','index','MailQueue','rawAttributes','model','keys','query','filters','intersection','attributes','fields','limit','order','sort','where','pick','filter','merge','map','key','VIRTUAL','field','options','include','findAll','rows','show','params','length','find','create','body','user','get','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','catch','describe','getMembers','findOne','hasOwnProperty','User','findAndCountAll','UserId','agent','mailPause','createdAt','format','%s/%s','SIP','updatedAt','getTeams'];(function(_0xb544e6,_0x59b091){var _0x5de2ed=function(_0x6f61bb){while(--_0x6f61bb){_0xb544e6['push'](_0xb544e6['shift']());}};_0x5de2ed(++_0x59b091);}(_0x7efd,0xb4));var _0xd7ef=function(_0x17b0d4,_0x377add){_0x17b0d4=_0x17b0d4-0x0;var _0x2d02c7=_0x7efd[_0x17b0d4];return _0x2d02c7;};'use strict';var pdf=require(_0xd7ef('0x0'));var emlformat=require(_0xd7ef('0x1'));var rimraf=require(_0xd7ef('0x2'));var zipdir=require(_0xd7ef('0x3'));var jsonpatch=require(_0xd7ef('0x4'));var rp=require(_0xd7ef('0x5'));var moment=require('moment');var BPromise=require(_0xd7ef('0x6'));var Mustache=require(_0xd7ef('0x7'));var util=require(_0xd7ef('0x8'));var path=require(_0xd7ef('0x9'));var sox=require(_0xd7ef('0xa'));var csv=require('to-csv');var ejs=require(_0xd7ef('0xb'));var fs=require('fs');var _=require(_0xd7ef('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xd7ef('0xd'));var deskjs=require(_0xd7ef('0xe'));var toCsv=require(_0xd7ef('0xf'));var querystring=require(_0xd7ef('0x10'));var Papa=require(_0xd7ef('0x11'));var Redis=require('ioredis');var authService=require(_0xd7ef('0x12'));var qs=require(_0xd7ef('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd7ef('0x14'))(_0xd7ef('0x15'));var utils=require(_0xd7ef('0x16'));var config=require(_0xd7ef('0x17'));var db=require('../../mysqldb')['db'];config[_0xd7ef('0x18')]=_[_0xd7ef('0x19')](config['redis'],{'host':_0xd7ef('0x1a'),'port':0x18eb});var socket=require(_0xd7ef('0x1b'))(new Redis(config['redis']));require('./mailQueue.socket')[_0xd7ef('0x1c')](socket);function respondWithStatusCode(_0x587cfb,_0x2e5d50){_0x2e5d50=_0x2e5d50||0xcc;return function(_0x16c609){if(_0x16c609){return _0x587cfb[_0xd7ef('0x1d')](_0x2e5d50);}return _0x587cfb['status'](_0x2e5d50)[_0xd7ef('0x1e')]();};}function respondWithResult(_0x55f340,_0x42e682){_0x42e682=_0x42e682||0xc8;return function(_0x11e9a3){if(_0x11e9a3){return _0x55f340[_0xd7ef('0x1f')](_0x42e682)[_0xd7ef('0x20')](_0x11e9a3);}};}function respondWithFilteredResult(_0x4215e6,_0x18d616){return function(_0x50b590){if(_0x50b590){var _0x1ce454=_0x50b590[_0xd7ef('0x21')],_0xd41cab=_0x18d616['offset'],_0x41a77d=_0x18d616[_0xd7ef('0x22')]+_0x18d616['limit'],_0x501309;if(_0x41a77d>=_0x1ce454){_0x41a77d=_0x1ce454;_0x501309=0xc8;}else{_0x501309=0xce;}_0x4215e6[_0xd7ef('0x1f')](_0x501309);return _0x4215e6[_0xd7ef('0x23')](_0xd7ef('0x24'),_0xd41cab+'-'+_0x41a77d+'/'+_0x1ce454)[_0xd7ef('0x20')](_0x50b590);}return null;};}function patchUpdates(_0x79cdf9){return function(_0x4dceac){try{jsonpatch[_0xd7ef('0x25')](_0x4dceac,_0x79cdf9,!![]);}catch(_0x5947be){return BPromise[_0xd7ef('0x26')](_0x5947be);}return _0x4dceac[_0xd7ef('0x27')]();};}function saveUpdates(_0x5b4ab8,_0x1b35ad){return function(_0x5d8ac9){if(_0x5d8ac9){return _0x5d8ac9[_0xd7ef('0x28')](_0x5b4ab8)[_0xd7ef('0x29')](function(_0x20a688){return _0x20a688;});}return null;};}function removeEntity(_0x11c304,_0x366c8d){return function(_0x167523){if(_0x167523){return _0x167523[_0xd7ef('0x2a')]()['then'](function(){var _0x133700=_0x167523['get']({'plain':!![]});var _0x5ef08b=_0xd7ef('0x2b');return db[_0xd7ef('0x2c')][_0xd7ef('0x2a')]({'where':{'type':_0x5ef08b,'resourceId':_0x133700['id']}})['then'](function(){return _0x167523;});})['then'](function(){_0x11c304['status'](0xcc)[_0xd7ef('0x1e')]();});}};}function handleEntityNotFound(_0x85006,_0x19c44d){return function(_0x298040){if(!_0x298040){_0x85006['sendStatus'](0x194);}return _0x298040;};}function handleError(_0x1a0e33,_0x105d05){_0x105d05=_0x105d05||0x1f4;return function(_0x1be7e8){logger[_0xd7ef('0x2d')](_0x1be7e8[_0xd7ef('0x2e')]);if(_0x1be7e8['name']){delete _0x1be7e8[_0xd7ef('0x2f')];}_0x1a0e33[_0xd7ef('0x1f')](_0x105d05)[_0xd7ef('0x30')](_0x1be7e8);};}exports[_0xd7ef('0x31')]=function(_0x19f684,_0x31651b){var _0x54da9e={},_0x5982b1={},_0x432466={'count':0x0,'rows':[]};var _0x3eac0f=db[_0xd7ef('0x32')][_0xd7ef('0x33')];_0x5982b1[_0xd7ef('0x34')]=_[_0xd7ef('0x35')](_0x3eac0f);_0x5982b1[_0xd7ef('0x36')]=_[_0xd7ef('0x35')](_0x19f684[_0xd7ef('0x36')]);_0x5982b1[_0xd7ef('0x37')]=_[_0xd7ef('0x38')](_0x5982b1['model'],_0x5982b1[_0xd7ef('0x36')]);_0x54da9e[_0xd7ef('0x39')]=_[_0xd7ef('0x38')](_0x5982b1[_0xd7ef('0x34')],qs['fields'](_0x19f684['query'][_0xd7ef('0x3a')]));_0x54da9e[_0xd7ef('0x39')]=_0x54da9e[_0xd7ef('0x39')]['length']?_0x54da9e[_0xd7ef('0x39')]:_0x5982b1[_0xd7ef('0x34')];if(!_0x19f684[_0xd7ef('0x36')]['hasOwnProperty']('nolimit')){_0x54da9e['limit']=qs['limit'](_0x19f684[_0xd7ef('0x36')][_0xd7ef('0x3b')]);_0x54da9e['offset']=qs['offset'](_0x19f684[_0xd7ef('0x36')][_0xd7ef('0x22')]);}_0x54da9e[_0xd7ef('0x3c')]=qs[_0xd7ef('0x3d')](_0x19f684[_0xd7ef('0x36')]['sort']);_0x54da9e[_0xd7ef('0x3e')]=qs[_0xd7ef('0x37')](_[_0xd7ef('0x3f')](_0x19f684[_0xd7ef('0x36')],_0x5982b1[_0xd7ef('0x37')]));if(_0x19f684[_0xd7ef('0x36')][_0xd7ef('0x40')]){_0x54da9e[_0xd7ef('0x3e')]=_[_0xd7ef('0x41')](_0x54da9e[_0xd7ef('0x3e')],{'$or':_[_0xd7ef('0x42')](_0x3eac0f,function(_0x393ba0){if(_0x393ba0['type'][_0xd7ef('0x43')]!==_0xd7ef('0x44')){var _0x235fbf={};_0x235fbf[_0x393ba0[_0xd7ef('0x45')]]={'$like':'%'+_0x19f684[_0xd7ef('0x36')][_0xd7ef('0x40')]+'%'};return _0x235fbf;}})});}_0x54da9e=_[_0xd7ef('0x41')]({},_0x54da9e,_0x19f684[_0xd7ef('0x46')]);var _0x3fecf6={'where':_0x54da9e[_0xd7ef('0x3e')]};return db['MailQueue']['count'](_0x3fecf6)[_0xd7ef('0x29')](function(_0x256b02){_0x432466[_0xd7ef('0x21')]=_0x256b02;if(_0x19f684['query']['includeAll']){_0x54da9e[_0xd7ef('0x47')]=[{'all':!![]}];}return db[_0xd7ef('0x32')][_0xd7ef('0x48')](_0x54da9e);})['then'](function(_0x35fe56){_0x432466[_0xd7ef('0x49')]=_0x35fe56;return _0x432466;})['then'](respondWithFilteredResult(_0x31651b,_0x54da9e))['catch'](handleError(_0x31651b,null));};exports[_0xd7ef('0x4a')]=function(_0x264016,_0x72186e){var _0x3fd6b3={'raw':!![],'where':{'id':_0x264016[_0xd7ef('0x4b')]['id']}},_0x4a0eca={};_0x4a0eca['model']=_[_0xd7ef('0x35')](db[_0xd7ef('0x32')][_0xd7ef('0x33')]);_0x4a0eca[_0xd7ef('0x36')]=_[_0xd7ef('0x35')](_0x264016['query']);_0x4a0eca[_0xd7ef('0x37')]=_['intersection'](_0x4a0eca[_0xd7ef('0x34')],_0x4a0eca[_0xd7ef('0x36')]);_0x3fd6b3['attributes']=_[_0xd7ef('0x38')](_0x4a0eca[_0xd7ef('0x34')],qs['fields'](_0x264016[_0xd7ef('0x36')]['fields']));_0x3fd6b3[_0xd7ef('0x39')]=_0x3fd6b3['attributes'][_0xd7ef('0x4c')]?_0x3fd6b3[_0xd7ef('0x39')]:_0x4a0eca['model'];if(_0x264016[_0xd7ef('0x36')]['includeAll']){_0x3fd6b3[_0xd7ef('0x47')]=[{'all':!![]}];}_0x3fd6b3=_[_0xd7ef('0x41')]({},_0x3fd6b3,_0x264016[_0xd7ef('0x46')]);return db['MailQueue'][_0xd7ef('0x4d')](_0x3fd6b3)[_0xd7ef('0x29')](handleEntityNotFound(_0x72186e,null))['then'](respondWithResult(_0x72186e,null))['catch'](handleError(_0x72186e,null));};exports[_0xd7ef('0x4e')]=function(_0x506553,_0x2d1ceb){return db[_0xd7ef('0x32')][_0xd7ef('0x4e')](_0x506553[_0xd7ef('0x4f')],{})['then'](function(_0x31ad48){var _0x5ba09f=_0x506553[_0xd7ef('0x50')][_0xd7ef('0x51')]({'plain':!![]});if(!_0x5ba09f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5ba09f[_0xd7ef('0x52')]===_0xd7ef('0x50')){var _0x51fc9a=_0x31ad48['get']({'plain':!![]});var _0x6451a5=_0xd7ef('0x2b');return db[_0xd7ef('0x53')][_0xd7ef('0x4d')]({'where':{'name':_0x6451a5,'userProfileId':_0x5ba09f['userProfileId']},'raw':!![]})[_0xd7ef('0x29')](function(_0x1aba27){if(_0x1aba27&&_0x1aba27[_0xd7ef('0x54')]===0x0){return db[_0xd7ef('0x2c')][_0xd7ef('0x4e')]({'name':_0x51fc9a[_0xd7ef('0x2f')],'resourceId':_0x51fc9a['id'],'type':_0x1aba27[_0xd7ef('0x2f')],'sectionId':_0x1aba27['id']},{})[_0xd7ef('0x29')](function(){return _0x31ad48;});}else{return _0x31ad48;}})['catch'](function(_0x439de5){logger[_0xd7ef('0x2d')](_0xd7ef('0x55'),_0x439de5);throw _0x439de5;});}return _0x31ad48;})[_0xd7ef('0x29')](respondWithResult(_0x2d1ceb,0xc9))['catch'](handleError(_0x2d1ceb,null));};exports[_0xd7ef('0x28')]=function(_0x318d70,_0x126d4a){if(_0x318d70[_0xd7ef('0x4f')]['id']){delete _0x318d70['body']['id'];}return db[_0xd7ef('0x32')][_0xd7ef('0x4d')]({'where':{'id':_0x318d70[_0xd7ef('0x4b')]['id']}})[_0xd7ef('0x29')](handleEntityNotFound(_0x126d4a,null))[_0xd7ef('0x29')](saveUpdates(_0x318d70[_0xd7ef('0x4f')],null))['then'](respondWithResult(_0x126d4a,null))[_0xd7ef('0x56')](handleError(_0x126d4a,null));};exports[_0xd7ef('0x2a')]=function(_0x16a5ed,_0x22a5c5){return db[_0xd7ef('0x32')][_0xd7ef('0x4d')]({'where':{'id':_0x16a5ed[_0xd7ef('0x4b')]['id']}})['then'](handleEntityNotFound(_0x22a5c5,null))[_0xd7ef('0x29')](removeEntity(_0x22a5c5,null))[_0xd7ef('0x56')](handleError(_0x22a5c5,null));};exports['describe']=function(_0x23d1cf,_0xe62e34){return db[_0xd7ef('0x32')][_0xd7ef('0x57')]()[_0xd7ef('0x29')](respondWithResult(_0xe62e34,null))['catch'](handleError(_0xe62e34,null));};exports[_0xd7ef('0x58')]=function(_0x511c62,_0xd21c1a,_0x52d40f){var _0x234ade={'raw':!![],'where':{}},_0x40ed8a={},_0x3fe83f;return db['MailQueue'][_0xd7ef('0x59')]({'where':{'id':_0x511c62[_0xd7ef('0x4b')]['id']}})['then'](handleEntityNotFound(_0xd21c1a,null))[_0xd7ef('0x29')](function(_0x58e27d){if(_0x58e27d){_0x3fe83f=_0x58e27d[_0xd7ef('0x51')]({'plain':!![]});_0x40ed8a[_0xd7ef('0x34')]=_['keys'](db['UserMailQueue'][_0xd7ef('0x33')]);_0x40ed8a['query']=_[_0xd7ef('0x35')](_0x511c62[_0xd7ef('0x36')]);_0x40ed8a['filters']=_[_0xd7ef('0x38')](_0x40ed8a[_0xd7ef('0x34')],_0x40ed8a[_0xd7ef('0x36')]);_0x234ade[_0xd7ef('0x39')]=_[_0xd7ef('0x38')](_0x40ed8a[_0xd7ef('0x34')],qs[_0xd7ef('0x3a')](_0x511c62[_0xd7ef('0x36')][_0xd7ef('0x3a')]));_0x234ade['attributes']=_0x234ade[_0xd7ef('0x39')]['length']?_0x234ade['attributes']:_0x40ed8a['model'];if(!_0x511c62[_0xd7ef('0x36')][_0xd7ef('0x5a')]('nolimit')){_0x234ade['limit']=qs[_0xd7ef('0x3b')](_0x511c62['query'][_0xd7ef('0x3b')]);_0x234ade['offset']=qs[_0xd7ef('0x22')](_0x511c62[_0xd7ef('0x36')][_0xd7ef('0x22')]);}_0x234ade[_0xd7ef('0x3c')]=qs[_0xd7ef('0x3d')](_0x511c62[_0xd7ef('0x36')]['sort']);_0x234ade[_0xd7ef('0x3e')]=qs[_0xd7ef('0x37')](_[_0xd7ef('0x3f')](_0x511c62[_0xd7ef('0x36')],_0x40ed8a[_0xd7ef('0x37')]));_0x234ade['where']['MailQueueId']=_0x58e27d['id'];if(_0x511c62[_0xd7ef('0x36')][_0xd7ef('0x40')]){_0x234ade[_0xd7ef('0x3e')]=_['merge'](_0x234ade[_0xd7ef('0x3e')],{'$or':_['map'](_0x234ade[_0xd7ef('0x39')],function(_0x56df91){var _0x3ee59c={};_0x3ee59c[_0x56df91]={'$like':'%'+_0x511c62[_0xd7ef('0x36')][_0xd7ef('0x40')]+'%'};return _0x3ee59c;})});}_0x234ade=_[_0xd7ef('0x41')]({},_0x234ade,_0x511c62[_0xd7ef('0x46')]);return db['UserMailQueue'][_0xd7ef('0x48')](_0x234ade);}})[_0xd7ef('0x29')](function(_0x2f6a23){if(_0x2f6a23){return db[_0xd7ef('0x5b')][_0xd7ef('0x5c')]({'where':{'id':_[_0xd7ef('0x42')](_0x2f6a23,_0xd7ef('0x5d')),'role':_0xd7ef('0x5e')},'attributes':['id',_0xd7ef('0x2f'),_0xd7ef('0x5f'),'updatedAt',_0xd7ef('0x60')]});}})[_0xd7ef('0x29')](function(_0x5dfa75){if(_0x5dfa75){return{'count':_0x5dfa75['count'],'rows':_[_0xd7ef('0x42')](_0x5dfa75[_0xd7ef('0x49')],function(_0x193cf5){return{'membername':_0x193cf5[_0xd7ef('0x2f')],'UserId':_0x193cf5['id'],'queue_name':_0x3fe83f['name'],'MailQueueId':_0x3fe83f['id'],'interface':util[_0xd7ef('0x61')](_0xd7ef('0x62'),_0xd7ef('0x63'),_0x193cf5[_0xd7ef('0x2f')]),'penalty':0x0,'paused':_0x193cf5['mailPause'],'createdAt':_0x193cf5[_0xd7ef('0x60')],'updatedAt':_0x193cf5[_0xd7ef('0x64')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xd7ef('0x29')](respondWithFilteredResult(_0xd21c1a,_0x234ade))[_0xd7ef('0x56')](handleError(_0xd21c1a,null));};exports[_0xd7ef('0x65')]=function(_0x1bb4bc,_0x108f80,_0x2427b0){var _0x3965d5={};var _0x4a4f3a={};var _0x5bbdd9;var _0x28928b;return db[_0xd7ef('0x32')]['findOne']({'where':{'id':_0x1bb4bc[_0xd7ef('0x4b')]['id']}})[_0xd7ef('0x29')](handleEntityNotFound(_0x108f80,null))[_0xd7ef('0x29')](function(_0x502b4b){if(_0x502b4b){_0x5bbdd9=_0x502b4b;_0x4a4f3a['model']=_[_0xd7ef('0x35')](db[_0xd7ef('0x66')][_0xd7ef('0x33')]);_0x4a4f3a[_0xd7ef('0x36')]=_[_0xd7ef('0x35')](_0x1bb4bc[_0xd7ef('0x36')]);_0x4a4f3a[_0xd7ef('0x37')]=_[_0xd7ef('0x38')](_0x4a4f3a[_0xd7ef('0x34')],_0x4a4f3a[_0xd7ef('0x36')]);_0x3965d5[_0xd7ef('0x39')]=_[_0xd7ef('0x38')](_0x4a4f3a['model'],qs[_0xd7ef('0x3a')](_0x1bb4bc[_0xd7ef('0x36')][_0xd7ef('0x3a')]));_0x3965d5[_0xd7ef('0x39')]=_0x3965d5[_0xd7ef('0x39')]['length']?_0x3965d5[_0xd7ef('0x39')]:_0x4a4f3a[_0xd7ef('0x34')];_0x3965d5[_0xd7ef('0x3c')]=qs[_0xd7ef('0x3d')](_0x1bb4bc['query'][_0xd7ef('0x3d')]);_0x3965d5['where']=qs[_0xd7ef('0x37')](_['pick'](_0x1bb4bc[_0xd7ef('0x36')],_0x4a4f3a[_0xd7ef('0x37')]));if(_0x1bb4bc[_0xd7ef('0x36')]['filter']){_0x3965d5[_0xd7ef('0x3e')]=_[_0xd7ef('0x41')](_0x3965d5[_0xd7ef('0x3e')],{'$or':_['map'](_0x3965d5['attributes'],function(_0xd228a0){var _0x1f22ad={};_0x1f22ad[_0xd228a0]={'$like':'%'+_0x1bb4bc[_0xd7ef('0x36')][_0xd7ef('0x40')]+'%'};return _0x1f22ad;})});}_0x3965d5=_[_0xd7ef('0x41')]({},_0x3965d5,_0x1bb4bc['options']);return _0x5bbdd9[_0xd7ef('0x65')](_0x3965d5);}})['then'](function(_0x2235d7){if(_0x2235d7){_0x28928b=_0x2235d7[_0xd7ef('0x4c')];if(!_0x1bb4bc[_0xd7ef('0x36')][_0xd7ef('0x5a')](_0xd7ef('0x67'))){_0x3965d5[_0xd7ef('0x3b')]=qs['limit'](_0x1bb4bc['query'][_0xd7ef('0x3b')]);_0x3965d5[_0xd7ef('0x22')]=qs['offset'](_0x1bb4bc[_0xd7ef('0x36')][_0xd7ef('0x22')]);}return _0x5bbdd9[_0xd7ef('0x65')](_0x3965d5);}})[_0xd7ef('0x29')](function(_0x1e681f){if(_0x1e681f){return _0x1e681f?{'count':_0x28928b,'rows':_0x1e681f}:null;}})[_0xd7ef('0x29')](respondWithResult(_0x108f80,null))[_0xd7ef('0x56')](handleError(_0x108f80,null));};exports[_0xd7ef('0x68')]=function(_0x1094d1,_0x353f69,_0x58e9cd){var _0x4b041a=_0x1094d1[_0xd7ef('0x4f')][_0xd7ef('0x69')];return db[_0xd7ef('0x66')][_0xd7ef('0x48')]({'where':{'id':_[_0xd7ef('0x42')](_0x4b041a,'id')},'attributes':['id'],'include':[{'model':db[_0xd7ef('0x5b')],'as':_0xd7ef('0x6a'),'attributes':['id','name',_0xd7ef('0x6b'),'voicePause','interface'],'raw':!![]}]})[_0xd7ef('0x29')](function(_0x1ce67b){if(_0x1ce67b){var _0x449220=_[_0xd7ef('0x6c')](_0x1ce67b,function(_0x5a09d2){var _0x15e6aa=_0x5a09d2[_0xd7ef('0x51')]({'plain':!![]});return _0x15e6aa['Agents'];});return db[_0xd7ef('0x32')][_0xd7ef('0x4d')]({'where':{'id':_0x1094d1[_0xd7ef('0x4b')]['id']}})[_0xd7ef('0x29')](function(_0x1b5f60){return db[_0xd7ef('0x6d')]['transaction'](function(_0x2f034d){return _0x1b5f60[_0xd7ef('0x68')](_[_0xd7ef('0x42')](_0x4b041a,'id'),{'transaction':_0x2f034d})[_0xd7ef('0x29')](function(){return BPromise['each'](_0x449220,function(_0x1f2bbc){return db[_0xd7ef('0x6e')][_0xd7ef('0x6f')]({'where':{'UserId':_0x1f2bbc['id'],'MailQueueId':_0x1094d1[_0xd7ef('0x4b')]['id']},'transaction':_0x2f034d});});})['then'](function(){_0x449220[_0xd7ef('0x70')](function(_0x4a8001){socket[_0xd7ef('0x71')](_0xd7ef('0x72'),{'UserId':_0x4a8001['id'],'MailQueueId':_0x1b5f60['id']});});});});});}})['then'](respondWithStatusCode(_0x353f69,null))[_0xd7ef('0x56')](handleError(_0x353f69,null));};exports[_0xd7ef('0x73')]=function(_0x744bc3,_0x34db08,_0x3561cf){return db[_0xd7ef('0x66')]['findAll']({'where':{'id':_0x744bc3[_0xd7ef('0x36')][_0xd7ef('0x74')]},'attributes':['id'],'include':[{'model':db[_0xd7ef('0x5b')],'as':_0xd7ef('0x6a'),'attributes':['id'],'raw':!![]}]})[_0xd7ef('0x29')](handleEntityNotFound(_0x34db08,null))['then'](function(_0x416239){var _0x49ddca=_[_0xd7ef('0x42')](_0x416239,'id');var _0x111db6=[];var _0x42f243=[];var _0x2ea61e=squel[_0xd7ef('0x75')]();_0x2ea61e['field'](_0xd7ef('0x76'))['from'](_0xd7ef('0x77'),'tq')[_0xd7ef('0x78')](_0xd7ef('0x79'),'ut',_0xd7ef('0x7a'))[_0xd7ef('0x3e')](_0xd7ef('0x7b'),_0x744bc3[_0xd7ef('0x4b')]['id']);for(var _0x229f58=0x0;_0x229f58<_0x416239[_0xd7ef('0x4c')];_0x229f58+=0x1){let _0x214f6c=_0x416239[_0x229f58];for(var _0x337548=0x0;_0x337548<_0x214f6c[_0xd7ef('0x6a')]['length'];_0x337548+=0x1){let _0xc8ace2=_0x214f6c[_0xd7ef('0x6a')][_0x337548];var _0x4d0aa0=_0x2ea61e[_0xd7ef('0x7c')]();_0x4d0aa0[_0xd7ef('0x3e')](_0xd7ef('0x7d'),_0xc8ace2['id']);_0x42f243[_0xd7ef('0x7e')](db[_0xd7ef('0x6d')][_0xd7ef('0x36')](_0x4d0aa0[_0xd7ef('0x7f')](),{'type':db[_0xd7ef('0x6d')]['QueryTypes'][_0xd7ef('0x80')]})[_0xd7ef('0x29')](function(_0x3cb276){if(_0x3cb276[_0xd7ef('0x4c')]===0x1){return _0xc8ace2['id'];}else{var _0x2228af=_[_0xd7ef('0x81')](_[_0xd7ef('0x42')](_0x3cb276,'TeamId'),function(_0x1b6122){return _[_0xd7ef('0x82')](_0x49ddca,_0x1b6122);});if(_0x2228af){return _0xc8ace2['id'];}}}));}}return BPromise['all'](_0x42f243)['then'](function(_0xa0d0b){_0x111db6=_(_0x111db6)['union'](_0xa0d0b)[_0xd7ef('0x83')]()[_0xd7ef('0x84')]();return db[_0xd7ef('0x32')][_0xd7ef('0x4d')]({'where':{'id':_0x744bc3['params']['id']}})['then'](function(_0x5726e7){return db[_0xd7ef('0x6d')][_0xd7ef('0x85')](function(_0x26e328){return _0x5726e7[_0xd7ef('0x73')](_0x744bc3[_0xd7ef('0x36')][_0xd7ef('0x74')],{'transaction':_0x26e328})['then'](function(){if(!_[_0xd7ef('0x86')](_0x111db6)){return _0x5726e7[_0xd7ef('0x87')](_0x111db6,{'transaction':_0x26e328});}})[_0xd7ef('0x29')](function(){_0x111db6[_0xd7ef('0x70')](function(_0x58f2ae){socket[_0xd7ef('0x71')](_0xd7ef('0x88'),{'UserId':_0x58f2ae,'MailQueueId':_0x5726e7['id']});});});});});});})[_0xd7ef('0x29')](respondWithStatusCode(_0x34db08,null))[_0xd7ef('0x56')](handleError(_0x34db08,null));};exports[_0xd7ef('0x89')]=function(_0x360b31,_0x4c65a9,_0x151af0){return db[_0xd7ef('0x32')]['find']({'where':{'id':_0x360b31[_0xd7ef('0x4b')]['id']}})[_0xd7ef('0x29')](handleEntityNotFound(_0x4c65a9,null))[_0xd7ef('0x29')](function(_0x42c46d){if(_0x42c46d){return _0x42c46d[_0xd7ef('0x89')](_0x360b31[_0xd7ef('0x4f')][_0xd7ef('0x74')],_[_0xd7ef('0x8a')](_0x360b31[_0xd7ef('0x4f')],[_0xd7ef('0x74'),'id'])||{})[_0xd7ef('0x8b')](function(_0x4c594a){for(var _0x4a6a48=0x0;_0x4a6a48<_0x360b31['body'][_0xd7ef('0x74')][_0xd7ef('0x4c')];_0x4a6a48+=0x1){socket[_0xd7ef('0x71')]('userMailQueue:save',{'UserId':_0x360b31['body'][_0xd7ef('0x74')][_0x4a6a48],'MailQueueId':_0x360b31[_0xd7ef('0x4b')]['id']});}return _0x4c594a;});}})[_0xd7ef('0x29')](respondWithResult(_0x4c65a9,null))['catch'](handleError(_0x4c65a9,null));};exports[_0xd7ef('0x87')]=function(_0x17025c,_0x28c5ae,_0x40aebf){return db[_0xd7ef('0x32')][_0xd7ef('0x4d')]({'where':{'id':_0x17025c['params']['id']}})[_0xd7ef('0x29')](handleEntityNotFound(_0x28c5ae,null))[_0xd7ef('0x29')](function(_0x46f8b3){if(_0x46f8b3){return _0x46f8b3['removeAgents'](_0x17025c[_0xd7ef('0x36')][_0xd7ef('0x74')])[_0xd7ef('0x29')](function(){if(_['isArray'](_0x17025c['query'][_0xd7ef('0x74')])){for(var _0x51c535=0x0;_0x51c535<_0x17025c['query'][_0xd7ef('0x74')][_0xd7ef('0x4c')];_0x51c535+=0x1){socket[_0xd7ef('0x71')](_0xd7ef('0x88'),{'UserId':Number(_0x17025c[_0xd7ef('0x36')][_0xd7ef('0x74')][_0x51c535]),'MailQueueId':Number(_0x17025c[_0xd7ef('0x4b')]['id'])});}}else{socket[_0xd7ef('0x71')]('userMailQueue:remove',{'UserId':Number(_0x17025c[_0xd7ef('0x36')]['ids']),'MailQueueId':Number(_0x17025c[_0xd7ef('0x4b')]['id'])});}});}})[_0xd7ef('0x29')](respondWithStatusCode(_0x28c5ae,null))[_0xd7ef('0x56')](handleError(_0x28c5ae,null));};exports[_0xd7ef('0x8c')]=function(_0x58e178,_0x2019f1,_0x195731){var _0x4a5ac8={};var _0x5e2bb6={};var _0x59e775;var _0x454031;return db[_0xd7ef('0x32')]['findOne']({'where':{'id':_0x58e178[_0xd7ef('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2019f1,null))[_0xd7ef('0x29')](function(_0x446a63){if(_0x446a63){_0x59e775=_0x446a63;_0x5e2bb6['model']=_[_0xd7ef('0x35')](db[_0xd7ef('0x5b')][_0xd7ef('0x33')]);_0x5e2bb6[_0xd7ef('0x36')]=_[_0xd7ef('0x35')](_0x58e178[_0xd7ef('0x36')]);_0x5e2bb6['filters']=_[_0xd7ef('0x38')](_0x5e2bb6[_0xd7ef('0x34')],_0x5e2bb6['query']);_0x4a5ac8[_0xd7ef('0x39')]=_[_0xd7ef('0x38')](_0x5e2bb6['model'],qs[_0xd7ef('0x3a')](_0x58e178[_0xd7ef('0x36')][_0xd7ef('0x3a')]));_0x4a5ac8['attributes']=_0x4a5ac8[_0xd7ef('0x39')][_0xd7ef('0x4c')]?_0x4a5ac8[_0xd7ef('0x39')]:_0x5e2bb6[_0xd7ef('0x34')];_0x4a5ac8[_0xd7ef('0x3c')]=qs['sort'](_0x58e178[_0xd7ef('0x36')]['sort']);_0x4a5ac8['where']=qs[_0xd7ef('0x37')](_[_0xd7ef('0x3f')](_0x58e178['query'],_0x5e2bb6['filters']));if(_0x58e178[_0xd7ef('0x36')]['filter']){_0x4a5ac8[_0xd7ef('0x3e')]=_[_0xd7ef('0x41')](_0x4a5ac8[_0xd7ef('0x3e')],{'$or':_[_0xd7ef('0x42')](_0x4a5ac8[_0xd7ef('0x39')],function(_0x1d9226){var _0x5d3b31={};_0x5d3b31[_0x1d9226]={'$like':'%'+_0x58e178[_0xd7ef('0x36')][_0xd7ef('0x40')]+'%'};return _0x5d3b31;})});}_0x4a5ac8=_[_0xd7ef('0x41')]({},_0x4a5ac8,_0x58e178['options']);return _0x59e775[_0xd7ef('0x8c')](_0x4a5ac8);}})['then'](function(_0x31913d){if(_0x31913d){_0x454031=_0x31913d[_0xd7ef('0x4c')];if(!_0x58e178[_0xd7ef('0x36')]['hasOwnProperty']('nolimit')){_0x4a5ac8['limit']=qs[_0xd7ef('0x3b')](_0x58e178[_0xd7ef('0x36')][_0xd7ef('0x3b')]);_0x4a5ac8['offset']=qs[_0xd7ef('0x22')](_0x58e178[_0xd7ef('0x36')]['offset']);}return _0x59e775[_0xd7ef('0x8c')](_0x4a5ac8);}})[_0xd7ef('0x29')](function(_0x55c3c7){if(_0x55c3c7){return _0x55c3c7?{'count':_0x454031,'rows':_0x55c3c7}:null;}})[_0xd7ef('0x29')](respondWithResult(_0x2019f1,null))[_0xd7ef('0x56')](handleError(_0x2019f1,null));};
\ No newline at end of file
+var _0x68a2=['getAgents','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailQueue.socket','sendStatus','end','count','offset','limit','status','set','json','apply','reject','save','destroy','then','get','MailQueues','UserProfileResource','error','stack','name','send','keys','query','intersection','attributes','model','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','map','type','key','VIRTUAL','field','filter','includeAll','include','findAll','rows','catch','show','MailQueue','length','merge','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','describe','getMembers','findOne','UserMailQueue','rawAttributes','MailQueueId','options','findAndCountAll','UserId','agent','mailPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','addTeams','teams','User','Agents','online','voicePause','interface','flatMap','sequelize','transaction','findOrCreate','forEach','emit','userMailQueue:save','removeTeams','ids','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','QueryTypes','SELECT','every','TeamId','compact','value','isEmpty','removeAgents','userMailQueue:remove','addAgents','omit','isArray'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x68a2,0x1a8));var _0x268a=function(_0x5ec056,_0x2455c7){_0x5ec056=_0x5ec056-0x0;var _0x440c92=_0x68a2[_0x5ec056];return _0x440c92;};'use strict';var pdf=require(_0x268a('0x0'));var emlformat=require(_0x268a('0x1'));var rimraf=require(_0x268a('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x268a('0x3'));var rp=require(_0x268a('0x4'));var moment=require(_0x268a('0x5'));var BPromise=require(_0x268a('0x6'));var Mustache=require('mustache');var util=require(_0x268a('0x7'));var path=require(_0x268a('0x8'));var sox=require(_0x268a('0x9'));var csv=require(_0x268a('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x268a('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x268a('0xc'));var deskjs=require(_0x268a('0xd'));var toCsv=require(_0x268a('0xa'));var querystring=require(_0x268a('0xe'));var Papa=require(_0x268a('0xf'));var Redis=require(_0x268a('0x10'));var authService=require(_0x268a('0x11'));var qs=require(_0x268a('0x12'));var hardwareService=require(_0x268a('0x13'));var logger=require(_0x268a('0x14'))(_0x268a('0x15'));var utils=require(_0x268a('0x16'));var config=require(_0x268a('0x17'));var db=require(_0x268a('0x18'))['db'];config[_0x268a('0x19')]=_[_0x268a('0x1a')](config[_0x268a('0x19')],{'host':_0x268a('0x1b'),'port':0x18eb});var socket=require(_0x268a('0x1c'))(new Redis(config[_0x268a('0x19')]));require(_0x268a('0x1d'))['register'](socket);function respondWithStatusCode(_0x1269dd,_0x3d5534){_0x3d5534=_0x3d5534||0xcc;return function(_0x40741a){if(_0x40741a){return _0x1269dd[_0x268a('0x1e')](_0x3d5534);}return _0x1269dd['status'](_0x3d5534)[_0x268a('0x1f')]();};}function respondWithResult(_0x473af3,_0x279a06){_0x279a06=_0x279a06||0xc8;return function(_0x4efd09){if(_0x4efd09){return _0x473af3['status'](_0x279a06)['json'](_0x4efd09);}};}function respondWithFilteredResult(_0x2c306c,_0x1e8877){return function(_0x2a1df3){if(_0x2a1df3){var _0x47eca8=_0x2a1df3[_0x268a('0x20')],_0x4bb7e5=_0x1e8877[_0x268a('0x21')],_0x5e0e49=_0x1e8877[_0x268a('0x21')]+_0x1e8877[_0x268a('0x22')],_0x3c2833;if(_0x5e0e49>=_0x47eca8){_0x5e0e49=_0x47eca8;_0x3c2833=0xc8;}else{_0x3c2833=0xce;}_0x2c306c[_0x268a('0x23')](_0x3c2833);return _0x2c306c[_0x268a('0x24')]('Content-Range',_0x4bb7e5+'-'+_0x5e0e49+'/'+_0x47eca8)[_0x268a('0x25')](_0x2a1df3);}return null;};}function patchUpdates(_0x25d325){return function(_0x4eec30){try{jsonpatch[_0x268a('0x26')](_0x4eec30,_0x25d325,!![]);}catch(_0x1aaa45){return BPromise[_0x268a('0x27')](_0x1aaa45);}return _0x4eec30[_0x268a('0x28')]();};}function saveUpdates(_0x28c536,_0x4c5407){return function(_0x50275){if(_0x50275){return _0x50275['update'](_0x28c536)['then'](function(_0x3c67df){return _0x3c67df;});}return null;};}function removeEntity(_0x51b487,_0x3c408c){return function(_0x4a7ba5){if(_0x4a7ba5){return _0x4a7ba5[_0x268a('0x29')]()[_0x268a('0x2a')](function(){var _0x5c03bc=_0x4a7ba5[_0x268a('0x2b')]({'plain':!![]});var _0x2559e3=_0x268a('0x2c');return db[_0x268a('0x2d')][_0x268a('0x29')]({'where':{'type':_0x2559e3,'resourceId':_0x5c03bc['id']}})[_0x268a('0x2a')](function(){return _0x4a7ba5;});})[_0x268a('0x2a')](function(){_0x51b487['status'](0xcc)[_0x268a('0x1f')]();});}};}function handleEntityNotFound(_0x3de1e4,_0xfbc347){return function(_0x341d4a){if(!_0x341d4a){_0x3de1e4[_0x268a('0x1e')](0x194);}return _0x341d4a;};}function handleError(_0x4ef456,_0x209c48){_0x209c48=_0x209c48||0x1f4;return function(_0x3d7cbc){logger[_0x268a('0x2e')](_0x3d7cbc[_0x268a('0x2f')]);if(_0x3d7cbc[_0x268a('0x30')]){delete _0x3d7cbc['name'];}_0x4ef456[_0x268a('0x23')](_0x209c48)[_0x268a('0x31')](_0x3d7cbc);};}exports['index']=function(_0x14f6c4,_0x281c71){var _0x1fb29d={},_0x2034be={},_0x2f700c={'count':0x0,'rows':[]};var _0x2f5107=db['MailQueue']['rawAttributes'];_0x2034be['model']=_[_0x268a('0x32')](_0x2f5107);_0x2034be[_0x268a('0x33')]=_['keys'](_0x14f6c4['query']);_0x2034be['filters']=_[_0x268a('0x34')](_0x2034be['model'],_0x2034be[_0x268a('0x33')]);_0x1fb29d[_0x268a('0x35')]=_['intersection'](_0x2034be[_0x268a('0x36')],qs[_0x268a('0x37')](_0x14f6c4['query'][_0x268a('0x37')]));_0x1fb29d[_0x268a('0x35')]=_0x1fb29d[_0x268a('0x35')]['length']?_0x1fb29d[_0x268a('0x35')]:_0x2034be[_0x268a('0x36')];if(!_0x14f6c4['query'][_0x268a('0x38')](_0x268a('0x39'))){_0x1fb29d[_0x268a('0x22')]=qs[_0x268a('0x22')](_0x14f6c4[_0x268a('0x33')][_0x268a('0x22')]);_0x1fb29d[_0x268a('0x21')]=qs[_0x268a('0x21')](_0x14f6c4['query'][_0x268a('0x21')]);}_0x1fb29d[_0x268a('0x3a')]=qs[_0x268a('0x3b')](_0x14f6c4['query'][_0x268a('0x3b')]);_0x1fb29d[_0x268a('0x3c')]=qs[_0x268a('0x3d')](_[_0x268a('0x3e')](_0x14f6c4['query'],_0x2034be[_0x268a('0x3d')]));if(_0x14f6c4[_0x268a('0x33')]['filter']){_0x1fb29d[_0x268a('0x3c')]=_['merge'](_0x1fb29d['where'],{'$or':_[_0x268a('0x3f')](_0x2f5107,function(_0x2f2619){if(_0x2f2619[_0x268a('0x40')][_0x268a('0x41')]!==_0x268a('0x42')){var _0x442ae7={};_0x442ae7[_0x2f2619[_0x268a('0x43')]]={'$like':'%'+_0x14f6c4['query'][_0x268a('0x44')]+'%'};return _0x442ae7;}})});}_0x1fb29d=_['merge']({},_0x1fb29d,_0x14f6c4['options']);var _0x42c491={'where':_0x1fb29d[_0x268a('0x3c')]};return db['MailQueue'][_0x268a('0x20')](_0x42c491)[_0x268a('0x2a')](function(_0x2a0ac3){_0x2f700c[_0x268a('0x20')]=_0x2a0ac3;if(_0x14f6c4[_0x268a('0x33')][_0x268a('0x45')]){_0x1fb29d[_0x268a('0x46')]=[{'all':!![]}];}return db['MailQueue'][_0x268a('0x47')](_0x1fb29d);})[_0x268a('0x2a')](function(_0x172072){_0x2f700c[_0x268a('0x48')]=_0x172072;return _0x2f700c;})[_0x268a('0x2a')](respondWithFilteredResult(_0x281c71,_0x1fb29d))[_0x268a('0x49')](handleError(_0x281c71,null));};exports[_0x268a('0x4a')]=function(_0x8dc46a,_0x2213fe){var _0x15e054={'raw':!![],'where':{'id':_0x8dc46a['params']['id']}},_0x5cfed1={};_0x5cfed1[_0x268a('0x36')]=_[_0x268a('0x32')](db[_0x268a('0x4b')]['rawAttributes']);_0x5cfed1['query']=_[_0x268a('0x32')](_0x8dc46a[_0x268a('0x33')]);_0x5cfed1[_0x268a('0x3d')]=_[_0x268a('0x34')](_0x5cfed1[_0x268a('0x36')],_0x5cfed1[_0x268a('0x33')]);_0x15e054[_0x268a('0x35')]=_['intersection'](_0x5cfed1['model'],qs[_0x268a('0x37')](_0x8dc46a[_0x268a('0x33')]['fields']));_0x15e054[_0x268a('0x35')]=_0x15e054[_0x268a('0x35')][_0x268a('0x4c')]?_0x15e054['attributes']:_0x5cfed1[_0x268a('0x36')];if(_0x8dc46a[_0x268a('0x33')][_0x268a('0x45')]){_0x15e054['include']=[{'all':!![]}];}_0x15e054=_[_0x268a('0x4d')]({},_0x15e054,_0x8dc46a['options']);return db[_0x268a('0x4b')][_0x268a('0x4e')](_0x15e054)[_0x268a('0x2a')](handleEntityNotFound(_0x2213fe,null))[_0x268a('0x2a')](respondWithResult(_0x2213fe,null))[_0x268a('0x49')](handleError(_0x2213fe,null));};exports['create']=function(_0x394e95,_0x367aab){return db['MailQueue'][_0x268a('0x4f')](_0x394e95[_0x268a('0x50')],{})['then'](function(_0x5d9374){var _0x46a725=_0x394e95[_0x268a('0x51')][_0x268a('0x2b')]({'plain':!![]});if(!_0x46a725)throw new Error(_0x268a('0x52'));if(_0x46a725['role']===_0x268a('0x51')){var _0x11a9bb=_0x5d9374[_0x268a('0x2b')]({'plain':!![]});var _0x17e380='MailQueues';return db[_0x268a('0x53')]['find']({'where':{'name':_0x17e380,'userProfileId':_0x46a725['userProfileId']},'raw':!![]})[_0x268a('0x2a')](function(_0x3654aa){if(_0x3654aa&&_0x3654aa['autoAssociation']===0x0){return db[_0x268a('0x2d')]['create']({'name':_0x11a9bb[_0x268a('0x30')],'resourceId':_0x11a9bb['id'],'type':_0x3654aa[_0x268a('0x30')],'sectionId':_0x3654aa['id']},{})[_0x268a('0x2a')](function(){return _0x5d9374;});}else{return _0x5d9374;}})['catch'](function(_0x3f8f3e){logger[_0x268a('0x2e')](_0x268a('0x54'),_0x3f8f3e);throw _0x3f8f3e;});}return _0x5d9374;})['then'](respondWithResult(_0x367aab,0xc9))[_0x268a('0x49')](handleError(_0x367aab,null));};exports[_0x268a('0x55')]=function(_0x3ba7e7,_0x32edb1){if(_0x3ba7e7[_0x268a('0x50')]['id']){delete _0x3ba7e7['body']['id'];}return db[_0x268a('0x4b')][_0x268a('0x4e')]({'where':{'id':_0x3ba7e7[_0x268a('0x56')]['id']}})[_0x268a('0x2a')](handleEntityNotFound(_0x32edb1,null))['then'](saveUpdates(_0x3ba7e7[_0x268a('0x50')],null))[_0x268a('0x2a')](respondWithResult(_0x32edb1,null))[_0x268a('0x49')](handleError(_0x32edb1,null));};exports[_0x268a('0x29')]=function(_0x5613df,_0xfcf6f6){return db[_0x268a('0x4b')][_0x268a('0x4e')]({'where':{'id':_0x5613df[_0x268a('0x56')]['id']}})['then'](handleEntityNotFound(_0xfcf6f6,null))[_0x268a('0x2a')](removeEntity(_0xfcf6f6,null))[_0x268a('0x49')](handleError(_0xfcf6f6,null));};exports[_0x268a('0x57')]=function(_0x59a20c,_0x3965ac){return db[_0x268a('0x4b')][_0x268a('0x57')]()['then'](respondWithResult(_0x3965ac,null))[_0x268a('0x49')](handleError(_0x3965ac,null));};exports[_0x268a('0x58')]=function(_0x6b59ba,_0x14ae6c,_0x4e5d71){var _0x4fcce9={'raw':!![],'where':{}},_0x3df35c={},_0x384cc4;return db['MailQueue'][_0x268a('0x59')]({'where':{'id':_0x6b59ba['params']['id']}})[_0x268a('0x2a')](handleEntityNotFound(_0x14ae6c,null))[_0x268a('0x2a')](function(_0x29c972){if(_0x29c972){_0x384cc4=_0x29c972['get']({'plain':!![]});_0x3df35c[_0x268a('0x36')]=_[_0x268a('0x32')](db[_0x268a('0x5a')][_0x268a('0x5b')]);_0x3df35c[_0x268a('0x33')]=_[_0x268a('0x32')](_0x6b59ba[_0x268a('0x33')]);_0x3df35c[_0x268a('0x3d')]=_[_0x268a('0x34')](_0x3df35c[_0x268a('0x36')],_0x3df35c[_0x268a('0x33')]);_0x4fcce9[_0x268a('0x35')]=_[_0x268a('0x34')](_0x3df35c[_0x268a('0x36')],qs[_0x268a('0x37')](_0x6b59ba[_0x268a('0x33')][_0x268a('0x37')]));_0x4fcce9[_0x268a('0x35')]=_0x4fcce9['attributes'][_0x268a('0x4c')]?_0x4fcce9[_0x268a('0x35')]:_0x3df35c[_0x268a('0x36')];if(!_0x6b59ba['query'][_0x268a('0x38')]('nolimit')){_0x4fcce9[_0x268a('0x22')]=qs[_0x268a('0x22')](_0x6b59ba[_0x268a('0x33')][_0x268a('0x22')]);_0x4fcce9['offset']=qs[_0x268a('0x21')](_0x6b59ba[_0x268a('0x33')][_0x268a('0x21')]);}_0x4fcce9[_0x268a('0x3a')]=qs[_0x268a('0x3b')](_0x6b59ba['query'][_0x268a('0x3b')]);_0x4fcce9[_0x268a('0x3c')]=qs[_0x268a('0x3d')](_[_0x268a('0x3e')](_0x6b59ba[_0x268a('0x33')],_0x3df35c[_0x268a('0x3d')]));_0x4fcce9[_0x268a('0x3c')][_0x268a('0x5c')]=_0x29c972['id'];if(_0x6b59ba[_0x268a('0x33')][_0x268a('0x44')]){_0x4fcce9[_0x268a('0x3c')]=_[_0x268a('0x4d')](_0x4fcce9[_0x268a('0x3c')],{'$or':_[_0x268a('0x3f')](_0x4fcce9['attributes'],function(_0x3b003a){var _0x35d0d={};_0x35d0d[_0x3b003a]={'$like':'%'+_0x6b59ba[_0x268a('0x33')][_0x268a('0x44')]+'%'};return _0x35d0d;})});}_0x4fcce9=_[_0x268a('0x4d')]({},_0x4fcce9,_0x6b59ba[_0x268a('0x5d')]);return db[_0x268a('0x5a')][_0x268a('0x47')](_0x4fcce9);}})[_0x268a('0x2a')](function(_0x1c6154){if(_0x1c6154){return db['User'][_0x268a('0x5e')]({'where':{'id':_[_0x268a('0x3f')](_0x1c6154,_0x268a('0x5f')),'role':_0x268a('0x60')},'attributes':['id',_0x268a('0x30'),_0x268a('0x61'),_0x268a('0x62'),_0x268a('0x63')]});}})['then'](function(_0x57e2b2){if(_0x57e2b2){return{'count':_0x57e2b2['count'],'rows':_['map'](_0x57e2b2[_0x268a('0x48')],function(_0x5eb202){return{'membername':_0x5eb202[_0x268a('0x30')],'UserId':_0x5eb202['id'],'queue_name':_0x384cc4['name'],'MailQueueId':_0x384cc4['id'],'interface':util[_0x268a('0x64')](_0x268a('0x65'),_0x268a('0x66'),_0x5eb202[_0x268a('0x30')]),'penalty':0x0,'paused':_0x5eb202[_0x268a('0x61')],'createdAt':_0x5eb202[_0x268a('0x63')],'updatedAt':_0x5eb202['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x268a('0x2a')](respondWithFilteredResult(_0x14ae6c,_0x4fcce9))[_0x268a('0x49')](handleError(_0x14ae6c,null));};exports['getTeams']=function(_0x1c5a6c,_0x42443d,_0xf97ca1){var _0x27fc1d={};var _0x190a44={};var _0x48c9cb;var _0x55893a;return db[_0x268a('0x4b')]['findOne']({'where':{'id':_0x1c5a6c[_0x268a('0x56')]['id']}})['then'](handleEntityNotFound(_0x42443d,null))['then'](function(_0x5388ec){if(_0x5388ec){_0x48c9cb=_0x5388ec;_0x190a44[_0x268a('0x36')]=_['keys'](db[_0x268a('0x67')]['rawAttributes']);_0x190a44[_0x268a('0x33')]=_[_0x268a('0x32')](_0x1c5a6c[_0x268a('0x33')]);_0x190a44[_0x268a('0x3d')]=_[_0x268a('0x34')](_0x190a44[_0x268a('0x36')],_0x190a44[_0x268a('0x33')]);_0x27fc1d[_0x268a('0x35')]=_[_0x268a('0x34')](_0x190a44[_0x268a('0x36')],qs[_0x268a('0x37')](_0x1c5a6c[_0x268a('0x33')][_0x268a('0x37')]));_0x27fc1d[_0x268a('0x35')]=_0x27fc1d[_0x268a('0x35')][_0x268a('0x4c')]?_0x27fc1d[_0x268a('0x35')]:_0x190a44[_0x268a('0x36')];_0x27fc1d[_0x268a('0x3a')]=qs[_0x268a('0x3b')](_0x1c5a6c[_0x268a('0x33')][_0x268a('0x3b')]);_0x27fc1d[_0x268a('0x3c')]=qs[_0x268a('0x3d')](_['pick'](_0x1c5a6c[_0x268a('0x33')],_0x190a44[_0x268a('0x3d')]));if(_0x1c5a6c[_0x268a('0x33')]['filter']){_0x27fc1d[_0x268a('0x3c')]=_[_0x268a('0x4d')](_0x27fc1d[_0x268a('0x3c')],{'$or':_['map'](_0x27fc1d[_0x268a('0x35')],function(_0x5d7528){var _0x1d3219={};_0x1d3219[_0x5d7528]={'$like':'%'+_0x1c5a6c[_0x268a('0x33')]['filter']+'%'};return _0x1d3219;})});}_0x27fc1d=_['merge']({},_0x27fc1d,_0x1c5a6c['options']);return _0x48c9cb[_0x268a('0x68')](_0x27fc1d);}})['then'](function(_0x3d66b1){if(_0x3d66b1){_0x55893a=_0x3d66b1['length'];if(!_0x1c5a6c[_0x268a('0x33')]['hasOwnProperty'](_0x268a('0x39'))){_0x27fc1d[_0x268a('0x22')]=qs['limit'](_0x1c5a6c[_0x268a('0x33')][_0x268a('0x22')]);_0x27fc1d[_0x268a('0x21')]=qs[_0x268a('0x21')](_0x1c5a6c[_0x268a('0x33')]['offset']);}return _0x48c9cb['getTeams'](_0x27fc1d);}})[_0x268a('0x2a')](function(_0x13d26e){if(_0x13d26e){return _0x13d26e?{'count':_0x55893a,'rows':_0x13d26e}:null;}})[_0x268a('0x2a')](respondWithResult(_0x42443d,null))[_0x268a('0x49')](handleError(_0x42443d,null));};exports[_0x268a('0x69')]=function(_0x5f10c7,_0xd1243b,_0x431e51){var _0x308e10=_0x5f10c7[_0x268a('0x50')][_0x268a('0x6a')];return db[_0x268a('0x67')]['findAll']({'where':{'id':_[_0x268a('0x3f')](_0x308e10,'id')},'attributes':['id'],'include':[{'model':db[_0x268a('0x6b')],'as':_0x268a('0x6c'),'attributes':['id',_0x268a('0x30'),_0x268a('0x6d'),_0x268a('0x6e'),_0x268a('0x6f')],'raw':!![]}]})[_0x268a('0x2a')](function(_0x58b20f){if(_0x58b20f){var _0xc82a07=_[_0x268a('0x70')](_0x58b20f,function(_0x47cb93){var _0x102017=_0x47cb93[_0x268a('0x2b')]({'plain':!![]});return _0x102017['Agents'];});return db[_0x268a('0x4b')][_0x268a('0x4e')]({'where':{'id':_0x5f10c7[_0x268a('0x56')]['id']}})[_0x268a('0x2a')](function(_0x12bed7){return db[_0x268a('0x71')][_0x268a('0x72')](function(_0x54adc3){return _0x12bed7['addTeams'](_[_0x268a('0x3f')](_0x308e10,'id'),{'transaction':_0x54adc3})[_0x268a('0x2a')](function(){return BPromise['each'](_0xc82a07,function(_0x46dd10){return db[_0x268a('0x5a')][_0x268a('0x73')]({'where':{'UserId':_0x46dd10['id'],'MailQueueId':_0x5f10c7[_0x268a('0x56')]['id']},'transaction':_0x54adc3});});})[_0x268a('0x2a')](function(){_0xc82a07[_0x268a('0x74')](function(_0x1f462c){socket[_0x268a('0x75')](_0x268a('0x76'),{'UserId':_0x1f462c['id'],'MailQueueId':_0x12bed7['id']});});});});});}})[_0x268a('0x2a')](respondWithStatusCode(_0xd1243b,null))[_0x268a('0x49')](handleError(_0xd1243b,null));};exports[_0x268a('0x77')]=function(_0x51ff0d,_0x220885,_0x563217){return db['Team']['findAll']({'where':{'id':_0x51ff0d[_0x268a('0x33')][_0x268a('0x78')]},'attributes':['id'],'include':[{'model':db[_0x268a('0x6b')],'as':_0x268a('0x6c'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x220885,null))[_0x268a('0x2a')](function(_0x503330){var _0x52d584=_[_0x268a('0x3f')](_0x503330,'id');var _0x8fd24b=[];var _0x34a03c=[];var _0x3a130e=squel['select']();_0x3a130e['field']('tq.TeamId')['from']('team_has_mail_queues','tq')[_0x268a('0x79')](_0x268a('0x7a'),'ut',_0x268a('0x7b'))[_0x268a('0x3c')](_0x268a('0x7c'),_0x51ff0d['params']['id']);for(var _0x1922b6=0x0;_0x1922b6<_0x503330[_0x268a('0x4c')];_0x1922b6+=0x1){let _0x5e233d=_0x503330[_0x1922b6];for(var _0x4997e3=0x0;_0x4997e3<_0x5e233d['Agents']['length'];_0x4997e3+=0x1){let _0x41524a=_0x5e233d['Agents'][_0x4997e3];var _0x4bbe4f=_0x3a130e[_0x268a('0x7d')]();_0x4bbe4f[_0x268a('0x3c')](_0x268a('0x7e'),_0x41524a['id']);_0x34a03c[_0x268a('0x7f')](db[_0x268a('0x71')]['query'](_0x4bbe4f['toString'](),{'type':db[_0x268a('0x71')][_0x268a('0x80')][_0x268a('0x81')]})['then'](function(_0x522f34){if(_0x522f34[_0x268a('0x4c')]===0x1){return _0x41524a['id'];}else{var _0x41e203=_[_0x268a('0x82')](_[_0x268a('0x3f')](_0x522f34,_0x268a('0x83')),function(_0x54c255){return _['includes'](_0x52d584,_0x54c255);});if(_0x41e203){return _0x41524a['id'];}}}));}}return BPromise['all'](_0x34a03c)[_0x268a('0x2a')](function(_0x7e5f0b){_0x8fd24b=_(_0x8fd24b)['union'](_0x7e5f0b)[_0x268a('0x84')]()[_0x268a('0x85')]();return db[_0x268a('0x4b')][_0x268a('0x4e')]({'where':{'id':_0x51ff0d[_0x268a('0x56')]['id']}})['then'](function(_0x204d25){return db[_0x268a('0x71')]['transaction'](function(_0x1d9a3d){return _0x204d25['removeTeams'](_0x51ff0d[_0x268a('0x33')][_0x268a('0x78')],{'transaction':_0x1d9a3d})['then'](function(){if(!_[_0x268a('0x86')](_0x8fd24b)){return _0x204d25[_0x268a('0x87')](_0x8fd24b,{'transaction':_0x1d9a3d});}})[_0x268a('0x2a')](function(){_0x8fd24b['forEach'](function(_0x1ca4a7){socket[_0x268a('0x75')](_0x268a('0x88'),{'UserId':_0x1ca4a7,'MailQueueId':_0x204d25['id']});});});});});});})[_0x268a('0x2a')](respondWithStatusCode(_0x220885,null))[_0x268a('0x49')](handleError(_0x220885,null));};exports[_0x268a('0x89')]=function(_0x15d175,_0x44288c,_0x54e060){return db[_0x268a('0x4b')][_0x268a('0x4e')]({'where':{'id':_0x15d175[_0x268a('0x56')]['id']}})[_0x268a('0x2a')](handleEntityNotFound(_0x44288c,null))[_0x268a('0x2a')](function(_0x1c0c5c){if(_0x1c0c5c){return _0x1c0c5c[_0x268a('0x89')](_0x15d175[_0x268a('0x50')]['ids'],_[_0x268a('0x8a')](_0x15d175[_0x268a('0x50')],[_0x268a('0x78'),'id'])||{})['spread'](function(_0x37ed40){for(var _0x57cbc7=0x0;_0x57cbc7<_0x15d175[_0x268a('0x50')][_0x268a('0x78')]['length'];_0x57cbc7+=0x1){socket['emit'](_0x268a('0x76'),{'UserId':_0x15d175[_0x268a('0x50')][_0x268a('0x78')][_0x57cbc7],'MailQueueId':_0x15d175[_0x268a('0x56')]['id']});}return _0x37ed40;});}})[_0x268a('0x2a')](respondWithResult(_0x44288c,null))['catch'](handleError(_0x44288c,null));};exports[_0x268a('0x87')]=function(_0x565016,_0x42cd50,_0x5eb58a){return db[_0x268a('0x4b')]['find']({'where':{'id':_0x565016['params']['id']}})[_0x268a('0x2a')](handleEntityNotFound(_0x42cd50,null))['then'](function(_0x1cca26){if(_0x1cca26){return _0x1cca26[_0x268a('0x87')](_0x565016['query'][_0x268a('0x78')])['then'](function(){if(_[_0x268a('0x8b')](_0x565016['query'][_0x268a('0x78')])){for(var _0x4bfb32=0x0;_0x4bfb32<_0x565016[_0x268a('0x33')]['ids']['length'];_0x4bfb32+=0x1){socket[_0x268a('0x75')](_0x268a('0x88'),{'UserId':Number(_0x565016[_0x268a('0x33')][_0x268a('0x78')][_0x4bfb32]),'MailQueueId':Number(_0x565016[_0x268a('0x56')]['id'])});}}else{socket[_0x268a('0x75')](_0x268a('0x88'),{'UserId':Number(_0x565016[_0x268a('0x33')][_0x268a('0x78')]),'MailQueueId':Number(_0x565016[_0x268a('0x56')]['id'])});}});}})[_0x268a('0x2a')](respondWithStatusCode(_0x42cd50,null))['catch'](handleError(_0x42cd50,null));};exports['getAgents']=function(_0x548de5,_0x19e068,_0x2cbfeb){var _0x23cfe8={};var _0x34cd1e={};var _0x547aa6;var _0x4bda9d;return db['MailQueue'][_0x268a('0x59')]({'where':{'id':_0x548de5[_0x268a('0x56')]['id']}})[_0x268a('0x2a')](handleEntityNotFound(_0x19e068,null))[_0x268a('0x2a')](function(_0x2ab4ee){if(_0x2ab4ee){_0x547aa6=_0x2ab4ee;_0x34cd1e[_0x268a('0x36')]=_[_0x268a('0x32')](db[_0x268a('0x6b')]['rawAttributes']);_0x34cd1e[_0x268a('0x33')]=_['keys'](_0x548de5[_0x268a('0x33')]);_0x34cd1e['filters']=_[_0x268a('0x34')](_0x34cd1e[_0x268a('0x36')],_0x34cd1e[_0x268a('0x33')]);_0x23cfe8[_0x268a('0x35')]=_[_0x268a('0x34')](_0x34cd1e[_0x268a('0x36')],qs[_0x268a('0x37')](_0x548de5[_0x268a('0x33')][_0x268a('0x37')]));_0x23cfe8[_0x268a('0x35')]=_0x23cfe8[_0x268a('0x35')][_0x268a('0x4c')]?_0x23cfe8[_0x268a('0x35')]:_0x34cd1e[_0x268a('0x36')];_0x23cfe8[_0x268a('0x3a')]=qs[_0x268a('0x3b')](_0x548de5[_0x268a('0x33')][_0x268a('0x3b')]);_0x23cfe8[_0x268a('0x3c')]=qs[_0x268a('0x3d')](_[_0x268a('0x3e')](_0x548de5[_0x268a('0x33')],_0x34cd1e[_0x268a('0x3d')]));if(_0x548de5[_0x268a('0x33')][_0x268a('0x44')]){_0x23cfe8[_0x268a('0x3c')]=_['merge'](_0x23cfe8['where'],{'$or':_['map'](_0x23cfe8[_0x268a('0x35')],function(_0x127e71){var _0x20eaae={};_0x20eaae[_0x127e71]={'$like':'%'+_0x548de5[_0x268a('0x33')][_0x268a('0x44')]+'%'};return _0x20eaae;})});}_0x23cfe8=_[_0x268a('0x4d')]({},_0x23cfe8,_0x548de5[_0x268a('0x5d')]);return _0x547aa6[_0x268a('0x8c')](_0x23cfe8);}})[_0x268a('0x2a')](function(_0x4be30c){if(_0x4be30c){_0x4bda9d=_0x4be30c[_0x268a('0x4c')];if(!_0x548de5['query'][_0x268a('0x38')](_0x268a('0x39'))){_0x23cfe8[_0x268a('0x22')]=qs[_0x268a('0x22')](_0x548de5[_0x268a('0x33')]['limit']);_0x23cfe8['offset']=qs[_0x268a('0x21')](_0x548de5['query']['offset']);}return _0x547aa6[_0x268a('0x8c')](_0x23cfe8);}})[_0x268a('0x2a')](function(_0x4e048b){if(_0x4e048b){return _0x4e048b?{'count':_0x4bda9d,'rows':_0x4e048b}:null;}})['then'](respondWithResult(_0x19e068,null))[_0x268a('0x49')](handleError(_0x19e068,null));};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.events.js b/server/api/mailQueue/mailQueue.events.js
index 4f9684c..a6cec59 100644
--- a/server/api/mailQueue/mailQueue.events.js
+++ b/server/api/mailQueue/mailQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4df7=['update','remove','hook','exports','../../mysqldb','MailQueue','setMaxListeners'];(function(_0x5a0736,_0x55c01e){var _0x388e2d=function(_0x3c6695){while(--_0x3c6695){_0x5a0736['push'](_0x5a0736['shift']());}};_0x388e2d(++_0x55c01e);}(_0x4df7,0x90));var _0x74df=function(_0x3f7598,_0x212e37){_0x3f7598=_0x3f7598-0x0;var _0x51fb16=_0x4df7[_0x3f7598];return _0x51fb16;};'use strict';var EventEmitter=require('events');var MailQueue=require(_0x74df('0x0'))['db'][_0x74df('0x1')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0x74df('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x74df('0x3'),'afterDestroy':_0x74df('0x4')};function emitEvent(_0x39b033){return function(_0x53fe65,_0x3e551c,_0x104e24){MailQueueEvents['emit'](_0x39b033+':'+_0x53fe65['id'],_0x53fe65);MailQueueEvents['emit'](_0x39b033,_0x53fe65);_0x104e24(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailQueue[_0x74df('0x5')](e,emitEvent(event));}}module[_0x74df('0x6')]=MailQueueEvents;
\ No newline at end of file
+var _0x170e=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailQueue','setMaxListeners'];(function(_0x165e33,_0x1af7a2){var _0x327d16=function(_0x4dd8f0){while(--_0x4dd8f0){_0x165e33['push'](_0x165e33['shift']());}};_0x327d16(++_0x1af7a2);}(_0x170e,0xac));var _0xe170=function(_0x177cc9,_0x3f6fdd){_0x177cc9=_0x177cc9-0x0;var _0x2fe577=_0x170e[_0x177cc9];return _0x2fe577;};'use strict';var EventEmitter=require(_0xe170('0x0'));var MailQueue=require(_0xe170('0x1'))['db'][_0xe170('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xe170('0x3')](0x0);var events={'afterCreate':_0xe170('0x4'),'afterUpdate':_0xe170('0x5'),'afterDestroy':_0xe170('0x6')};function emitEvent(_0x4241dd){return function(_0x1ad4be,_0x1653d9,_0x152964){MailQueueEvents[_0xe170('0x7')](_0x4241dd+':'+_0x1ad4be['id'],_0x1ad4be);MailQueueEvents[_0xe170('0x7')](_0x4241dd,_0x1ad4be);_0x152964(null);};}for(var e in events){if(events[_0xe170('0x8')](e)){var event=events[e];MailQueue[_0xe170('0x9')](e,emitEvent(event));}}module[_0xe170('0xa')]=MailQueueEvents;
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.model.js b/server/api/mailQueue/mailQueue.model.js
index 3830d6f..343efb5 100644
--- a/server/api/mailQueue/mailQueue.model.js
+++ b/server/api/mailQueue/mailQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xda3f=['../../config/environment','exports','MailQueue','mail_queues','util','../../config/logger','request-promise','rimraf'];(function(_0x110387,_0x5db257){var _0x35093a=function(_0x1aed04){while(--_0x1aed04){_0x110387['push'](_0x110387['shift']());}};_0x35093a(++_0x5db257);}(_0xda3f,0xec));var _0xfda3=function(_0x2dc710,_0x2c9f98){_0x2dc710=_0x2dc710-0x0;var _0x14fb14=_0xda3f[_0x2dc710];return _0x14fb14;};'use strict';var _=require('lodash');var util=require(_0xfda3('0x0'));var logger=require(_0xfda3('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xfda3('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfda3('0x3'));var config=require(_0xfda3('0x4'));var attributes=require('./mailQueue.attributes');module[_0xfda3('0x5')]=function(_0x43a010,_0x47e7e2){return _0x43a010['define'](_0xfda3('0x6'),attributes,{'tableName':_0xfda3('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcb91=['rimraf','./mailQueue.attributes','exports','define','mail_queues','../../config/logger','api','moment','bluebird','path'];(function(_0x2f4b69,_0x396424){var _0x80900a=function(_0x3e615c){while(--_0x3e615c){_0x2f4b69['push'](_0x2f4b69['shift']());}};_0x80900a(++_0x396424);}(_0xcb91,0x1a9));var _0x1cb9=function(_0xc77819,_0x139fdc){_0xc77819=_0xc77819-0x0;var _0x1c9434=_0xcb91[_0xc77819];return _0x1c9434;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x1cb9('0x0'))(_0x1cb9('0x1'));var moment=require(_0x1cb9('0x2'));var BPromise=require(_0x1cb9('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1cb9('0x4'));var rimraf=require(_0x1cb9('0x5'));var config=require('../../config/environment');var attributes=require(_0x1cb9('0x6'));module[_0x1cb9('0x7')]=function(_0x53ffbd,_0x226b69){return _0x53ffbd[_0x1cb9('0x8')]('MailQueue',attributes,{'tableName':_0x1cb9('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.rpc.js b/server/api/mailQueue/mailQueue.rpc.js
index 813da9e..412dbd8 100644
--- a/server/api/mailQueue/mailQueue.rpc.js
+++ b/server/api/mailQueue/mailQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc0ae=['model','then','find','ShowMailQueue','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','localhost','socket.io-emitter','./mailQueue.socket','register','request','info','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','MailQueue,\x20%s,\x20%s','message','result','catch','GetMailQueue','MailQueue','options','raw','where','attributes','limit','include','map'];(function(_0x2b35ab,_0x11086f){var _0x2e0c7e=function(_0x4c0e7b){while(--_0x4c0e7b){_0x2b35ab['push'](_0x2b35ab['shift']());}};_0x2e0c7e(++_0x11086f);}(_0xc0ae,0x13c));var _0xec0a=function(_0x1cb25d,_0x5e66ab){_0x1cb25d=_0x1cb25d-0x0;var _0x15b177=_0xc0ae[_0x1cb25d];return _0x15b177;};'use strict';var _=require('lodash');var util=require(_0xec0a('0x0'));var moment=require(_0xec0a('0x1'));var BPromise=require(_0xec0a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xec0a('0x3'))['db'];var utils=require(_0xec0a('0x4'));var logger=require(_0xec0a('0x5'))(_0xec0a('0x6'));var config=require(_0xec0a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xec0a('0x8')]['http']({'port':0x232a});config[_0xec0a('0x9')]=_['defaults'](config['redis'],{'host':_0xec0a('0xa'),'port':0x18eb});var socket=require(_0xec0a('0xb'))(new Redis(config[_0xec0a('0x9')]));require(_0xec0a('0xc'))[_0xec0a('0xd')](socket);function respondWithRpcPromise(_0x2d2dee,_0x27cd6c,_0x166205){return new BPromise(function(_0x5bda03,_0x185895){return client[_0xec0a('0xe')](_0x2d2dee,_0x166205)['then'](function(_0x378471){logger[_0xec0a('0xf')]('MailQueue,\x20%s,\x20%s',_0x27cd6c,_0xec0a('0x10'));logger[_0xec0a('0x11')](_0xec0a('0x12'),_0x27cd6c,_0xec0a('0x10'),JSON[_0xec0a('0x13')](_0x378471));if(_0x378471['error']){if(_0x378471[_0xec0a('0x14')][_0xec0a('0x15')]===0x1f4){logger[_0xec0a('0x14')](_0xec0a('0x16'),_0x27cd6c,_0x378471[_0xec0a('0x14')][_0xec0a('0x17')]);return _0x185895(_0x378471[_0xec0a('0x14')][_0xec0a('0x17')]);}logger[_0xec0a('0x14')]('MailQueue,\x20%s,\x20%s',_0x27cd6c,_0x378471[_0xec0a('0x14')][_0xec0a('0x17')]);return _0x5bda03(_0x378471[_0xec0a('0x14')][_0xec0a('0x17')]);}else{logger['info'](_0xec0a('0x16'),_0x27cd6c,_0xec0a('0x10'));_0x5bda03(_0x378471[_0xec0a('0x18')][_0xec0a('0x17')]);}})[_0xec0a('0x19')](function(_0x5cd88b){logger[_0xec0a('0x14')]('MailQueue,\x20%s,\x20%s',_0x27cd6c,_0x5cd88b);_0x185895(_0x5cd88b);});});}exports[_0xec0a('0x1a')]=function(_0x116d80){var _0x473061=this;return new Promise(function(_0x445b17,_0x3306c0){return db[_0xec0a('0x1b')]['findAll']({'raw':_0x116d80[_0xec0a('0x1c')]?_0x116d80[_0xec0a('0x1c')][_0xec0a('0x1d')]===undefined?!![]:![]:!![],'where':_0x116d80['options']?_0x116d80[_0xec0a('0x1c')][_0xec0a('0x1e')]||null:null,'attributes':_0x116d80[_0xec0a('0x1c')]?_0x116d80[_0xec0a('0x1c')][_0xec0a('0x1f')]||null:null,'limit':_0x116d80['options']?_0x116d80[_0xec0a('0x1c')][_0xec0a('0x20')]||null:null,'include':_0x116d80[_0xec0a('0x1c')]?_0x116d80['options'][_0xec0a('0x21')]?_[_0xec0a('0x22')](_0x116d80['options'][_0xec0a('0x21')],function(_0x21e530){return{'model':db[_0x21e530[_0xec0a('0x23')]],'as':_0x21e530['as'],'attributes':_0x21e530['attributes'],'include':_0x21e530[_0xec0a('0x21')]?_[_0xec0a('0x22')](_0x21e530[_0xec0a('0x21')],function(_0x465656){return{'model':db[_0x465656[_0xec0a('0x23')]],'as':_0x465656['as'],'attributes':_0x465656[_0xec0a('0x1f')],'include':_0x465656[_0xec0a('0x21')]?_['map'](_0x465656[_0xec0a('0x21')],function(_0xd0a017){return{'model':db[_0xd0a017[_0xec0a('0x23')]],'as':_0xd0a017['as'],'attributes':_0xd0a017[_0xec0a('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xec0a('0x24')](function(_0x3dc82b){logger[_0xec0a('0xf')](_0xec0a('0x1a'),_0x116d80);logger['debug'](_0xec0a('0x1a'),_0x116d80,JSON['stringify'](_0x3dc82b));_0x445b17(_0x3dc82b);})[_0xec0a('0x19')](function(_0x4a4066){logger['error'](_0xec0a('0x1a'),_0x4a4066[_0xec0a('0x17')],_0x116d80);_0x3306c0(_0x473061[_0xec0a('0x14')](0x1f4,_0x4a4066[_0xec0a('0x17')]));});});};exports['ShowMailQueue']=function(_0x442de6){var _0x2288c1=this;return new Promise(function(_0x4e5b9f,_0x3523a9){return db[_0xec0a('0x1b')][_0xec0a('0x25')]({'raw':_0x442de6['options']?_0x442de6[_0xec0a('0x1c')][_0xec0a('0x1d')]===undefined?!![]:![]:!![],'where':_0x442de6[_0xec0a('0x1c')]?_0x442de6['options'][_0xec0a('0x1e')]||null:null,'attributes':_0x442de6[_0xec0a('0x1c')]?_0x442de6[_0xec0a('0x1c')][_0xec0a('0x1f')]||null:null,'include':_0x442de6[_0xec0a('0x1c')]?_0x442de6[_0xec0a('0x1c')]['include']?_['map'](_0x442de6[_0xec0a('0x1c')][_0xec0a('0x21')],function(_0x5e5fa5){return{'model':db[_0x5e5fa5[_0xec0a('0x23')]],'as':_0x5e5fa5['as'],'attributes':_0x5e5fa5[_0xec0a('0x1f')],'include':_0x5e5fa5['include']?_[_0xec0a('0x22')](_0x5e5fa5[_0xec0a('0x21')],function(_0x2caf44){return{'model':db[_0x2caf44[_0xec0a('0x23')]],'as':_0x2caf44['as'],'attributes':_0x2caf44[_0xec0a('0x1f')],'include':_0x2caf44['include']?_['map'](_0x2caf44[_0xec0a('0x21')],function(_0x189c1c){return{'model':db[_0x189c1c['model']],'as':_0x189c1c['as'],'attributes':_0x189c1c[_0xec0a('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xec0a('0x24')](function(_0x2a8253){logger[_0xec0a('0xf')](_0xec0a('0x26'),_0x442de6);logger[_0xec0a('0x11')]('ShowMailQueue',_0x442de6,JSON[_0xec0a('0x13')](_0x2a8253));_0x4e5b9f(_0x2a8253);})[_0xec0a('0x19')](function(_0x3963a4){logger['error']('ShowMailQueue',_0x3963a4['message'],_0x442de6);_0x3523a9(_0x2288c1['error'](0x1f4,_0x3963a4['message']));});});};
\ No newline at end of file
+var _0x4b9b=['client','http','redis','defaults','socket.io-emitter','./mailQueue.socket','request','then','info','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','error','code','MailQueue,\x20%s,\x20%s','message','result','GetMailQueue','options','where','attributes','limit','include','map','model','catch','ShowMailQueue','MailQueue','find','raw','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0x4b9b,0xeb));var _0xb4b9=function(_0x4063a4,_0x19d730){_0x4063a4=_0x4063a4-0x0;var _0x17908d=_0x4b9b[_0x4063a4];return _0x17908d;};'use strict';var _=require(_0xb4b9('0x0'));var util=require(_0xb4b9('0x1'));var moment=require(_0xb4b9('0x2'));var BPromise=require(_0xb4b9('0x3'));var rs=require(_0xb4b9('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb4b9('0x5'))['db'];var utils=require(_0xb4b9('0x6'));var logger=require(_0xb4b9('0x7'))(_0xb4b9('0x8'));var config=require(_0xb4b9('0x9'));var jayson=require(_0xb4b9('0xa'));var client=jayson[_0xb4b9('0xb')][_0xb4b9('0xc')]({'port':0x232a});config[_0xb4b9('0xd')]=_[_0xb4b9('0xe')](config[_0xb4b9('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0xb4b9('0xf'))(new Redis(config['redis']));require(_0xb4b9('0x10'))['register'](socket);function respondWithRpcPromise(_0x33e8c2,_0x20ad1f,_0x3a88ce){return new BPromise(function(_0x490245,_0x3a0899){return client[_0xb4b9('0x11')](_0x33e8c2,_0x3a88ce)[_0xb4b9('0x12')](function(_0x1b19c3){logger[_0xb4b9('0x13')]('MailQueue,\x20%s,\x20%s',_0x20ad1f,_0xb4b9('0x14'));logger[_0xb4b9('0x15')](_0xb4b9('0x16'),_0x20ad1f,_0xb4b9('0x14'),JSON['stringify'](_0x1b19c3));if(_0x1b19c3[_0xb4b9('0x17')]){if(_0x1b19c3[_0xb4b9('0x17')][_0xb4b9('0x18')]===0x1f4){logger['error'](_0xb4b9('0x19'),_0x20ad1f,_0x1b19c3[_0xb4b9('0x17')][_0xb4b9('0x1a')]);return _0x3a0899(_0x1b19c3['error'][_0xb4b9('0x1a')]);}logger['error']('MailQueue,\x20%s,\x20%s',_0x20ad1f,_0x1b19c3[_0xb4b9('0x17')][_0xb4b9('0x1a')]);return _0x490245(_0x1b19c3[_0xb4b9('0x17')][_0xb4b9('0x1a')]);}else{logger['info'](_0xb4b9('0x19'),_0x20ad1f,_0xb4b9('0x14'));_0x490245(_0x1b19c3[_0xb4b9('0x1b')][_0xb4b9('0x1a')]);}})['catch'](function(_0x460df6){logger[_0xb4b9('0x17')](_0xb4b9('0x19'),_0x20ad1f,_0x460df6);_0x3a0899(_0x460df6);});});}exports[_0xb4b9('0x1c')]=function(_0x4f3451){var _0x17b4f6=this;return new Promise(function(_0x3df12d,_0xf7440e){return db['MailQueue']['findAll']({'raw':_0x4f3451[_0xb4b9('0x1d')]?_0x4f3451[_0xb4b9('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x4f3451[_0xb4b9('0x1d')]?_0x4f3451['options'][_0xb4b9('0x1e')]||null:null,'attributes':_0x4f3451[_0xb4b9('0x1d')]?_0x4f3451[_0xb4b9('0x1d')][_0xb4b9('0x1f')]||null:null,'limit':_0x4f3451['options']?_0x4f3451[_0xb4b9('0x1d')][_0xb4b9('0x20')]||null:null,'include':_0x4f3451[_0xb4b9('0x1d')]?_0x4f3451[_0xb4b9('0x1d')][_0xb4b9('0x21')]?_[_0xb4b9('0x22')](_0x4f3451[_0xb4b9('0x1d')]['include'],function(_0x3567d1){return{'model':db[_0x3567d1[_0xb4b9('0x23')]],'as':_0x3567d1['as'],'attributes':_0x3567d1['attributes'],'include':_0x3567d1[_0xb4b9('0x21')]?_['map'](_0x3567d1['include'],function(_0x3a64b7){return{'model':db[_0x3a64b7[_0xb4b9('0x23')]],'as':_0x3a64b7['as'],'attributes':_0x3a64b7['attributes'],'include':_0x3a64b7['include']?_[_0xb4b9('0x22')](_0x3a64b7[_0xb4b9('0x21')],function(_0x235dea){return{'model':db[_0x235dea[_0xb4b9('0x23')]],'as':_0x235dea['as'],'attributes':_0x235dea[_0xb4b9('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xb4b9('0x12')](function(_0x188b2c){logger[_0xb4b9('0x13')]('GetMailQueue',_0x4f3451);logger[_0xb4b9('0x15')](_0xb4b9('0x1c'),_0x4f3451,JSON['stringify'](_0x188b2c));_0x3df12d(_0x188b2c);})[_0xb4b9('0x24')](function(_0x3c59c0){logger[_0xb4b9('0x17')](_0xb4b9('0x1c'),_0x3c59c0[_0xb4b9('0x1a')],_0x4f3451);_0xf7440e(_0x17b4f6['error'](0x1f4,_0x3c59c0[_0xb4b9('0x1a')]));});});};exports[_0xb4b9('0x25')]=function(_0x11a7d3){var _0x1f063c=this;return new Promise(function(_0x42b416,_0x4fae76){return db[_0xb4b9('0x26')][_0xb4b9('0x27')]({'raw':_0x11a7d3[_0xb4b9('0x1d')]?_0x11a7d3['options'][_0xb4b9('0x28')]===undefined?!![]:![]:!![],'where':_0x11a7d3[_0xb4b9('0x1d')]?_0x11a7d3[_0xb4b9('0x1d')][_0xb4b9('0x1e')]||null:null,'attributes':_0x11a7d3['options']?_0x11a7d3[_0xb4b9('0x1d')]['attributes']||null:null,'include':_0x11a7d3['options']?_0x11a7d3[_0xb4b9('0x1d')][_0xb4b9('0x21')]?_[_0xb4b9('0x22')](_0x11a7d3[_0xb4b9('0x1d')][_0xb4b9('0x21')],function(_0x3ddf66){return{'model':db[_0x3ddf66['model']],'as':_0x3ddf66['as'],'attributes':_0x3ddf66[_0xb4b9('0x1f')],'include':_0x3ddf66[_0xb4b9('0x21')]?_[_0xb4b9('0x22')](_0x3ddf66[_0xb4b9('0x21')],function(_0x5798c1){return{'model':db[_0x5798c1[_0xb4b9('0x23')]],'as':_0x5798c1['as'],'attributes':_0x5798c1[_0xb4b9('0x1f')],'include':_0x5798c1['include']?_['map'](_0x5798c1[_0xb4b9('0x21')],function(_0x55f280){return{'model':db[_0x55f280[_0xb4b9('0x23')]],'as':_0x55f280['as'],'attributes':_0x55f280[_0xb4b9('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x110161){logger[_0xb4b9('0x13')](_0xb4b9('0x25'),_0x11a7d3);logger[_0xb4b9('0x15')](_0xb4b9('0x25'),_0x11a7d3,JSON['stringify'](_0x110161));_0x42b416(_0x110161);})[_0xb4b9('0x24')](function(_0x2c8864){logger[_0xb4b9('0x17')](_0xb4b9('0x25'),_0x2c8864[_0xb4b9('0x1a')],_0x11a7d3);_0x4fae76(_0x1f063c['error'](0x1f4,_0x2c8864[_0xb4b9('0x1a')]));});});};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.socket.js b/server/api/mailQueue/mailQueue.socket.js
index 2813de8..04ea01d 100644
--- a/server/api/mailQueue/mailQueue.socket.js
+++ b/server/api/mailQueue/mailQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x062c=['emit','mailQueue:','save'];(function(_0x5b55e8,_0x3f74a1){var _0x2498a3=function(_0x585c8f){while(--_0x585c8f){_0x5b55e8['push'](_0x5b55e8['shift']());}};_0x2498a3(++_0x3f74a1);}(_0x062c,0x1f4));var _0xc062=function(_0x545697,_0x4833eb){_0x545697=_0x545697-0x0;var _0x4ca672=_0x062c[_0x545697];return _0x4ca672;};'use strict';var MailQueueEvents=require('./mailQueue.events');var events=[_0xc062('0x0'),'remove','update'];function createListener(_0x431869,_0xd9737a){return function(_0x4e17ba){_0xd9737a[_0xc062('0x1')](_0x431869,_0x4e17ba);};}function removeListener(_0x214649,_0x30e749){return function(){MailQueueEvents['removeListener'](_0x214649,_0x30e749);};}exports['register']=function(_0x103cb8){for(var _0xd79b5f=0x0,_0x37759e=events['length'];_0xd79b5f<_0x37759e;_0xd79b5f++){var _0x2fc4cd=events[_0xd79b5f];var _0x77009c=createListener(_0xc062('0x2')+_0x2fc4cd,_0x103cb8);MailQueueEvents['on'](_0x2fc4cd,_0x77009c);}};
\ No newline at end of file
+var _0xa3c4=['length','mailQueue:','./mailQueue.events','update','emit','register'];(function(_0x2e2c9c,_0x3a2e71){var _0x195b88=function(_0x455ec7){while(--_0x455ec7){_0x2e2c9c['push'](_0x2e2c9c['shift']());}};_0x195b88(++_0x3a2e71);}(_0xa3c4,0x188));var _0x4a3c=function(_0x4ea474,_0x3759ad){_0x4ea474=_0x4ea474-0x0;var _0x4190ef=_0xa3c4[_0x4ea474];return _0x4190ef;};'use strict';var MailQueueEvents=require(_0x4a3c('0x0'));var events=['save','remove',_0x4a3c('0x1')];function createListener(_0x1850ab,_0x47e63b){return function(_0x478e7e){_0x47e63b[_0x4a3c('0x2')](_0x1850ab,_0x478e7e);};}function removeListener(_0x12b5b8,_0x5114c4){return function(){MailQueueEvents['removeListener'](_0x12b5b8,_0x5114c4);};}exports[_0x4a3c('0x3')]=function(_0x31daa4){for(var _0x3a3cb9=0x0,_0x38dba6=events[_0x4a3c('0x4')];_0x3a3cb9<_0x38dba6;_0x3a3cb9++){var _0x53334b=events[_0x3a3cb9];var _0xef12e5=createListener(_0x4a3c('0x5')+_0x53334b,_0x31daa4);MailQueueEvents['on'](_0x53334b,_0xef12e5);}};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/index.js b/server/api/mailQueueReport/index.js
index 3dbf1b9..eb1ed00 100644
--- a/server/api/mailQueueReport/index.js
+++ b/server/api/mailQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9648=['put','update','/:id','destroy','exports','multer','util','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailQueueReport.controller','index','get','/describe','isAuthenticated','show','create'];(function(_0x2a44c9,_0x58f1ef){var _0x54e61c=function(_0x953729){while(--_0x953729){_0x2a44c9['push'](_0x2a44c9['shift']());}};_0x54e61c(++_0x58f1ef);}(_0x9648,0x191));var _0x8964=function(_0xc67271,_0x13f90a){_0xc67271=_0xc67271-0x0;var _0x48f489=_0x9648[_0xc67271];return _0x48f489;};'use strict';var multer=require(_0x8964('0x0'));var util=require(_0x8964('0x1'));var path=require('path');var timeout=require(_0x8964('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x8964('0x3'));var interaction=require(_0x8964('0x4'));var config=require(_0x8964('0x5'));var controller=require(_0x8964('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x8964('0x7')]);router[_0x8964('0x8')](_0x8964('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0x8964('0x8')]('/:id',auth[_0x8964('0xa')](),controller[_0x8964('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0x8964('0xc')]);router[_0x8964('0xd')]('/:id',auth[_0x8964('0xa')](),controller[_0x8964('0xe')]);router['delete'](_0x8964('0xf'),auth[_0x8964('0xa')](),controller[_0x8964('0x10')]);module[_0x8964('0x11')]=router;
\ No newline at end of file
+var _0x06b4=['get','index','/describe','isAuthenticated','describe','/:id','show','post','create','put','delete','destroy','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x3712a5,_0x2d6406){var _0x312fb2=function(_0x906e7f){while(--_0x906e7f){_0x3712a5['push'](_0x3712a5['shift']());}};_0x312fb2(++_0x2d6406);}(_0x06b4,0xd4));var _0x406b=function(_0x5ba0f3,_0x1807b1){_0x5ba0f3=_0x5ba0f3-0x0;var _0x17d0be=_0x06b4[_0x5ba0f3];return _0x17d0be;};'use strict';var multer=require('multer');var util=require(_0x406b('0x0'));var path=require(_0x406b('0x1'));var timeout=require(_0x406b('0x2'));var express=require(_0x406b('0x3'));var router=express[_0x406b('0x4')]();var auth=require(_0x406b('0x5'));var interaction=require(_0x406b('0x6'));var config=require(_0x406b('0x7'));var controller=require('./mailQueueReport.controller');router[_0x406b('0x8')]('/',auth['isAuthenticated'](),controller[_0x406b('0x9')]);router[_0x406b('0x8')](_0x406b('0xa'),auth[_0x406b('0xb')](),controller[_0x406b('0xc')]);router[_0x406b('0x8')](_0x406b('0xd'),auth['isAuthenticated'](),controller[_0x406b('0xe')]);router[_0x406b('0xf')]('/',auth[_0x406b('0xb')](),controller[_0x406b('0x10')]);router[_0x406b('0x11')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x406b('0x12')](_0x406b('0xd'),auth[_0x406b('0xb')](),controller[_0x406b('0x13')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.attributes.js b/server/api/mailQueueReport/mailQueueReport.attributes.js
index 8e530f7..b450027 100644
--- a/server/api/mailQueueReport/mailQueueReport.attributes.js
+++ b/server/api/mailQueueReport/mailQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x90f5=['sequelize','exports','STRING','DATE','moment'];(function(_0x5db211,_0x577aa5){var _0x3cbbcf=function(_0x450876){while(--_0x450876){_0x5db211['push'](_0x5db211['shift']());}};_0x3cbbcf(++_0x577aa5);}(_0x90f5,0x130));var _0x590f=function(_0x1027d3,_0x475257){_0x1027d3=_0x1027d3-0x0;var _0x40cdd9=_0x90f5[_0x1027d3];return _0x40cdd9;};'use strict';var moment=require(_0x590f('0x0'));var Sequelize=require(_0x590f('0x1'));module[_0x590f('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0x590f('0x3')]},'joinAt':{'type':Sequelize[_0x590f('0x4')]},'leaveAt':{'type':Sequelize[_0x590f('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x590f('0x4')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x550f=['DATE','sequelize','exports','STRING'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x550f,0xad));var _0xf550=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x550f[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require('moment');var Sequelize=require(_0xf550('0x0'));module[_0xf550('0x1')]={'uniqueid':{'type':Sequelize[_0xf550('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0xf550('0x2')]},'joinAt':{'type':Sequelize[_0xf550('0x3')]},'leaveAt':{'type':Sequelize[_0xf550('0x3')]},'acceptAt':{'type':Sequelize[_0xf550('0x3')]},'exitAt':{'type':Sequelize[_0xf550('0x3')]},'reason':{'type':Sequelize[_0xf550('0x2')]}};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.controller.js b/server/api/mailQueueReport/mailQueueReport.controller.js
index d075cc7..6786d48 100644
--- a/server/api/mailQueueReport/mailQueueReport.controller.js
+++ b/server/api/mailQueueReport/mailQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x03db=['filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','query','order','sort','where','filter','merge','map','type','key','field','options','include','findAll','rows','show','params','includeAll','find','catch','create','body','update','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../mysqldb','status','end','count','offset','set','apply','reject','save','then','destroy','stack','name','send','index','MailQueueReport','rawAttributes','model','keys'];(function(_0x10509d,_0xfbdfe0){var _0x486be6=function(_0x55a702){while(--_0x55a702){_0x10509d['push'](_0x10509d['shift']());}};_0x486be6(++_0xfbdfe0);}(_0x03db,0xab));var _0xb03d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x03db[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xb03d('0x0'));var zipdir=require(_0xb03d('0x1'));var jsonpatch=require(_0xb03d('0x2'));var rp=require(_0xb03d('0x3'));var moment=require('moment');var BPromise=require(_0xb03d('0x4'));var Mustache=require(_0xb03d('0x5'));var util=require(_0xb03d('0x6'));var path=require(_0xb03d('0x7'));var sox=require(_0xb03d('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xb03d('0x9'));var squel=require(_0xb03d('0xa'));var crypto=require('crypto');var jsforce=require(_0xb03d('0xb'));var deskjs=require(_0xb03d('0xc'));var toCsv=require('to-csv');var querystring=require(_0xb03d('0xd'));var Papa=require(_0xb03d('0xe'));var Redis=require(_0xb03d('0xf'));var authService=require(_0xb03d('0x10'));var qs=require(_0xb03d('0x11'));var hardwareService=require(_0xb03d('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0xb03d('0x13'));var config=require('../../config/environment');var db=require(_0xb03d('0x14'))['db'];function respondWithStatusCode(_0xad3710,_0x1725b0){_0x1725b0=_0x1725b0||0xcc;return function(_0x8bec11){if(_0x8bec11){return _0xad3710['sendStatus'](_0x1725b0);}return _0xad3710[_0xb03d('0x15')](_0x1725b0)[_0xb03d('0x16')]();};}function respondWithResult(_0x57cac6,_0x350ad6){_0x350ad6=_0x350ad6||0xc8;return function(_0x4743c5){if(_0x4743c5){return _0x57cac6[_0xb03d('0x15')](_0x350ad6)['json'](_0x4743c5);}};}function respondWithFilteredResult(_0x1860f3,_0x2f5a1f){return function(_0x36ec6f){if(_0x36ec6f){var _0x3e2844=_0x36ec6f[_0xb03d('0x17')],_0x430d60=_0x2f5a1f['offset'],_0x392fb8=_0x2f5a1f[_0xb03d('0x18')]+_0x2f5a1f['limit'],_0x4def2c;if(_0x392fb8>=_0x3e2844){_0x392fb8=_0x3e2844;_0x4def2c=0xc8;}else{_0x4def2c=0xce;}_0x1860f3['status'](_0x4def2c);return _0x1860f3[_0xb03d('0x19')]('Content-Range',_0x430d60+'-'+_0x392fb8+'/'+_0x3e2844)['json'](_0x36ec6f);}return null;};}function patchUpdates(_0x1968d1){return function(_0x693ffe){try{jsonpatch[_0xb03d('0x1a')](_0x693ffe,_0x1968d1,!![]);}catch(_0x8b6f2c){return BPromise[_0xb03d('0x1b')](_0x8b6f2c);}return _0x693ffe[_0xb03d('0x1c')]();};}function saveUpdates(_0x373ad2,_0x8dfcd3){return function(_0x54d6d7){if(_0x54d6d7){return _0x54d6d7['update'](_0x373ad2)[_0xb03d('0x1d')](function(_0x196571){return _0x196571;});}return null;};}function removeEntity(_0x44224f,_0x2691bf){return function(_0x272aa6){if(_0x272aa6){return _0x272aa6[_0xb03d('0x1e')]()['then'](function(){_0x44224f[_0xb03d('0x15')](0xcc)[_0xb03d('0x16')]();});}};}function handleEntityNotFound(_0x42bff8,_0x93120){return function(_0xb5a831){if(!_0xb5a831){_0x42bff8['sendStatus'](0x194);}return _0xb5a831;};}function handleError(_0x2c4c1b,_0x5e8914){_0x5e8914=_0x5e8914||0x1f4;return function(_0x501123){logger['error'](_0x501123[_0xb03d('0x1f')]);if(_0x501123[_0xb03d('0x20')]){delete _0x501123['name'];}_0x2c4c1b['status'](_0x5e8914)[_0xb03d('0x21')](_0x501123);};}exports[_0xb03d('0x22')]=function(_0x5a093d,_0x53d2d0){var _0x3d3059={},_0x179816={},_0x32e72e={'count':0x0,'rows':[]};var _0x82eec5=db[_0xb03d('0x23')][_0xb03d('0x24')];_0x179816[_0xb03d('0x25')]=_['keys'](_0x82eec5);_0x179816['query']=_[_0xb03d('0x26')](_0x5a093d['query']);_0x179816[_0xb03d('0x27')]=_[_0xb03d('0x28')](_0x179816['model'],_0x179816['query']);_0x3d3059[_0xb03d('0x29')]=_[_0xb03d('0x28')](_0x179816[_0xb03d('0x25')],qs['fields'](_0x5a093d['query'][_0xb03d('0x2a')]));_0x3d3059['attributes']=_0x3d3059[_0xb03d('0x29')][_0xb03d('0x2b')]?_0x3d3059['attributes']:_0x179816[_0xb03d('0x25')];if(!_0x5a093d['query'][_0xb03d('0x2c')](_0xb03d('0x2d'))){_0x3d3059[_0xb03d('0x2e')]=qs[_0xb03d('0x2e')](_0x5a093d[_0xb03d('0x2f')][_0xb03d('0x2e')]);_0x3d3059[_0xb03d('0x18')]=qs[_0xb03d('0x18')](_0x5a093d[_0xb03d('0x2f')][_0xb03d('0x18')]);}_0x3d3059[_0xb03d('0x30')]=qs[_0xb03d('0x31')](_0x5a093d['query'][_0xb03d('0x31')]);_0x3d3059[_0xb03d('0x32')]=qs[_0xb03d('0x27')](_['pick'](_0x5a093d['query'],_0x179816[_0xb03d('0x27')]));if(_0x5a093d[_0xb03d('0x2f')][_0xb03d('0x33')]){_0x3d3059[_0xb03d('0x32')]=_[_0xb03d('0x34')](_0x3d3059['where'],{'$or':_[_0xb03d('0x35')](_0x82eec5,function(_0xe916c5){if(_0xe916c5[_0xb03d('0x36')][_0xb03d('0x37')]!=='VIRTUAL'){var _0x3b8603={};_0x3b8603[_0xe916c5[_0xb03d('0x38')]]={'$like':'%'+_0x5a093d[_0xb03d('0x2f')]['filter']+'%'};return _0x3b8603;}})});}_0x3d3059=_[_0xb03d('0x34')]({},_0x3d3059,_0x5a093d[_0xb03d('0x39')]);var _0x5c5471={'where':_0x3d3059[_0xb03d('0x32')]};return db[_0xb03d('0x23')][_0xb03d('0x17')](_0x5c5471)[_0xb03d('0x1d')](function(_0x1e83d5){_0x32e72e[_0xb03d('0x17')]=_0x1e83d5;if(_0x5a093d[_0xb03d('0x2f')]['includeAll']){_0x3d3059[_0xb03d('0x3a')]=[{'all':!![]}];}return db['MailQueueReport'][_0xb03d('0x3b')](_0x3d3059);})[_0xb03d('0x1d')](function(_0x2ee0cc){_0x32e72e[_0xb03d('0x3c')]=_0x2ee0cc;return _0x32e72e;})[_0xb03d('0x1d')](respondWithFilteredResult(_0x53d2d0,_0x3d3059))['catch'](handleError(_0x53d2d0,null));};exports[_0xb03d('0x3d')]=function(_0x243af4,_0x452c6b){var _0x382962={'raw':!![],'where':{'id':_0x243af4[_0xb03d('0x3e')]['id']}},_0x41fb35={};_0x41fb35['model']=_[_0xb03d('0x26')](db['MailQueueReport'][_0xb03d('0x24')]);_0x41fb35[_0xb03d('0x2f')]=_[_0xb03d('0x26')](_0x243af4[_0xb03d('0x2f')]);_0x41fb35[_0xb03d('0x27')]=_[_0xb03d('0x28')](_0x41fb35[_0xb03d('0x25')],_0x41fb35[_0xb03d('0x2f')]);_0x382962[_0xb03d('0x29')]=_[_0xb03d('0x28')](_0x41fb35[_0xb03d('0x25')],qs[_0xb03d('0x2a')](_0x243af4['query'][_0xb03d('0x2a')]));_0x382962['attributes']=_0x382962[_0xb03d('0x29')][_0xb03d('0x2b')]?_0x382962['attributes']:_0x41fb35[_0xb03d('0x25')];if(_0x243af4[_0xb03d('0x2f')][_0xb03d('0x3f')]){_0x382962[_0xb03d('0x3a')]=[{'all':!![]}];}_0x382962=_[_0xb03d('0x34')]({},_0x382962,_0x243af4[_0xb03d('0x39')]);return db[_0xb03d('0x23')][_0xb03d('0x40')](_0x382962)[_0xb03d('0x1d')](handleEntityNotFound(_0x452c6b,null))[_0xb03d('0x1d')](respondWithResult(_0x452c6b,null))[_0xb03d('0x41')](handleError(_0x452c6b,null));};exports[_0xb03d('0x42')]=function(_0x113560,_0x23f4f4){return db[_0xb03d('0x23')]['create'](_0x113560[_0xb03d('0x43')],{})[_0xb03d('0x1d')](respondWithResult(_0x23f4f4,0xc9))[_0xb03d('0x41')](handleError(_0x23f4f4,null));};exports[_0xb03d('0x44')]=function(_0xd26fd1,_0x35a2b4){if(_0xd26fd1['body']['id']){delete _0xd26fd1[_0xb03d('0x43')]['id'];}return db[_0xb03d('0x23')][_0xb03d('0x40')]({'where':{'id':_0xd26fd1[_0xb03d('0x3e')]['id']}})[_0xb03d('0x1d')](handleEntityNotFound(_0x35a2b4,null))['then'](saveUpdates(_0xd26fd1[_0xb03d('0x43')],null))[_0xb03d('0x1d')](respondWithResult(_0x35a2b4,null))['catch'](handleError(_0x35a2b4,null));};exports['destroy']=function(_0x34b2e7,_0x40cc06){return db[_0xb03d('0x23')]['find']({'where':{'id':_0x34b2e7['params']['id']}})['then'](handleEntityNotFound(_0x40cc06,null))['then'](removeEntity(_0x40cc06,null))[_0xb03d('0x41')](handleError(_0x40cc06,null));};exports[_0xb03d('0x45')]=function(_0x2f62dd,_0x197686){return db[_0xb03d('0x23')]['describe']()[_0xb03d('0x1d')](respondWithResult(_0x197686,null))['catch'](handleError(_0x197686,null));};
\ No newline at end of file
+var _0x8078=['offset','reject','save','update','then','destroy','error','name','index','MailQueueReport','rawAttributes','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','filters','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','findAll','rows','params','include','find','catch','create','body','describe','html-pdf','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','end','status','json','count'];(function(_0x249f9a,_0x4fb6c8){var _0xd63e3=function(_0x1cb09e){while(--_0x1cb09e){_0x249f9a['push'](_0x249f9a['shift']());}};_0xd63e3(++_0x4fb6c8);}(_0x8078,0x147));var _0x8807=function(_0x24c1bc,_0x2d35c4){_0x24c1bc=_0x24c1bc-0x0;var _0x18499f=_0x8078[_0x24c1bc];return _0x18499f;};'use strict';var pdf=require(_0x8807('0x0'));var emlformat=require(_0x8807('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x8807('0x2'));var rp=require(_0x8807('0x3'));var moment=require(_0x8807('0x4'));var BPromise=require(_0x8807('0x5'));var Mustache=require(_0x8807('0x6'));var util=require(_0x8807('0x7'));var path=require(_0x8807('0x8'));var sox=require(_0x8807('0x9'));var csv=require(_0x8807('0xa'));var ejs=require(_0x8807('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x8807('0xc'));var jsforce=require(_0x8807('0xd'));var deskjs=require(_0x8807('0xe'));var toCsv=require(_0x8807('0xa'));var querystring=require(_0x8807('0xf'));var Papa=require(_0x8807('0x10'));var Redis=require('ioredis');var authService=require(_0x8807('0x11'));var qs=require(_0x8807('0x12'));var hardwareService=require(_0x8807('0x13'));var logger=require(_0x8807('0x14'))('api');var utils=require(_0x8807('0x15'));var config=require(_0x8807('0x16'));var db=require(_0x8807('0x17'))['db'];function respondWithStatusCode(_0x2d0e4e,_0x4ee347){_0x4ee347=_0x4ee347||0xcc;return function(_0x2c1f27){if(_0x2c1f27){return _0x2d0e4e['sendStatus'](_0x4ee347);}return _0x2d0e4e['status'](_0x4ee347)[_0x8807('0x18')]();};}function respondWithResult(_0x167657,_0x222838){_0x222838=_0x222838||0xc8;return function(_0x51fdc1){if(_0x51fdc1){return _0x167657[_0x8807('0x19')](_0x222838)[_0x8807('0x1a')](_0x51fdc1);}};}function respondWithFilteredResult(_0xdbeb2e,_0x470278){return function(_0x9f36e1){if(_0x9f36e1){var _0x193cc1=_0x9f36e1[_0x8807('0x1b')],_0x16ea9d=_0x470278[_0x8807('0x1c')],_0x1b713e=_0x470278['offset']+_0x470278['limit'],_0x1ef666;if(_0x1b713e>=_0x193cc1){_0x1b713e=_0x193cc1;_0x1ef666=0xc8;}else{_0x1ef666=0xce;}_0xdbeb2e['status'](_0x1ef666);return _0xdbeb2e['set']('Content-Range',_0x16ea9d+'-'+_0x1b713e+'/'+_0x193cc1)['json'](_0x9f36e1);}return null;};}function patchUpdates(_0x50854b){return function(_0x3c18fd){try{jsonpatch['apply'](_0x3c18fd,_0x50854b,!![]);}catch(_0x1bb7ac){return BPromise[_0x8807('0x1d')](_0x1bb7ac);}return _0x3c18fd[_0x8807('0x1e')]();};}function saveUpdates(_0xd0da46,_0x52fc97){return function(_0x3a3ffb){if(_0x3a3ffb){return _0x3a3ffb[_0x8807('0x1f')](_0xd0da46)[_0x8807('0x20')](function(_0x45b17e){return _0x45b17e;});}return null;};}function removeEntity(_0x50dcf7,_0x12e969){return function(_0x29b102){if(_0x29b102){return _0x29b102[_0x8807('0x21')]()['then'](function(){_0x50dcf7[_0x8807('0x19')](0xcc)[_0x8807('0x18')]();});}};}function handleEntityNotFound(_0x1dd570,_0x1891a0){return function(_0x57974c){if(!_0x57974c){_0x1dd570['sendStatus'](0x194);}return _0x57974c;};}function handleError(_0x1de6f4,_0x42e4fb){_0x42e4fb=_0x42e4fb||0x1f4;return function(_0x40ee65){logger[_0x8807('0x22')](_0x40ee65['stack']);if(_0x40ee65[_0x8807('0x23')]){delete _0x40ee65[_0x8807('0x23')];}_0x1de6f4[_0x8807('0x19')](_0x42e4fb)['send'](_0x40ee65);};}exports[_0x8807('0x24')]=function(_0x536406,_0x405619){var _0x599c60={},_0x3c3e85={},_0x1ba170={'count':0x0,'rows':[]};var _0x59b9b2=db[_0x8807('0x25')][_0x8807('0x26')];_0x3c3e85[_0x8807('0x27')]=_['keys'](_0x59b9b2);_0x3c3e85[_0x8807('0x28')]=_[_0x8807('0x29')](_0x536406['query']);_0x3c3e85['filters']=_['intersection'](_0x3c3e85[_0x8807('0x27')],_0x3c3e85[_0x8807('0x28')]);_0x599c60[_0x8807('0x2a')]=_[_0x8807('0x2b')](_0x3c3e85[_0x8807('0x27')],qs[_0x8807('0x2c')](_0x536406['query'][_0x8807('0x2c')]));_0x599c60[_0x8807('0x2a')]=_0x599c60[_0x8807('0x2a')][_0x8807('0x2d')]?_0x599c60[_0x8807('0x2a')]:_0x3c3e85['model'];if(!_0x536406['query'][_0x8807('0x2e')](_0x8807('0x2f'))){_0x599c60[_0x8807('0x30')]=qs['limit'](_0x536406[_0x8807('0x28')]['limit']);_0x599c60[_0x8807('0x1c')]=qs[_0x8807('0x1c')](_0x536406[_0x8807('0x28')][_0x8807('0x1c')]);}_0x599c60[_0x8807('0x31')]=qs['sort'](_0x536406[_0x8807('0x28')][_0x8807('0x32')]);_0x599c60[_0x8807('0x33')]=qs[_0x8807('0x34')](_['pick'](_0x536406[_0x8807('0x28')],_0x3c3e85[_0x8807('0x34')]));if(_0x536406[_0x8807('0x28')][_0x8807('0x35')]){_0x599c60[_0x8807('0x33')]=_[_0x8807('0x36')](_0x599c60[_0x8807('0x33')],{'$or':_[_0x8807('0x37')](_0x59b9b2,function(_0xd0ca7a){if(_0xd0ca7a[_0x8807('0x38')][_0x8807('0x39')]!==_0x8807('0x3a')){var _0x31be7d={};_0x31be7d[_0xd0ca7a[_0x8807('0x3b')]]={'$like':'%'+_0x536406[_0x8807('0x28')][_0x8807('0x35')]+'%'};return _0x31be7d;}})});}_0x599c60=_[_0x8807('0x36')]({},_0x599c60,_0x536406[_0x8807('0x3c')]);var _0x1b5e84={'where':_0x599c60[_0x8807('0x33')]};return db[_0x8807('0x25')]['count'](_0x1b5e84)['then'](function(_0x18019b){_0x1ba170[_0x8807('0x1b')]=_0x18019b;if(_0x536406['query'][_0x8807('0x3d')]){_0x599c60['include']=[{'all':!![]}];}return db['MailQueueReport'][_0x8807('0x3e')](_0x599c60);})[_0x8807('0x20')](function(_0x14bdc7){_0x1ba170[_0x8807('0x3f')]=_0x14bdc7;return _0x1ba170;})[_0x8807('0x20')](respondWithFilteredResult(_0x405619,_0x599c60))['catch'](handleError(_0x405619,null));};exports['show']=function(_0x5e107e,_0x5b3e8d){var _0x16b85b={'raw':!![],'where':{'id':_0x5e107e[_0x8807('0x40')]['id']}},_0x18e0ec={};_0x18e0ec[_0x8807('0x27')]=_['keys'](db[_0x8807('0x25')][_0x8807('0x26')]);_0x18e0ec['query']=_[_0x8807('0x29')](_0x5e107e[_0x8807('0x28')]);_0x18e0ec['filters']=_[_0x8807('0x2b')](_0x18e0ec['model'],_0x18e0ec[_0x8807('0x28')]);_0x16b85b[_0x8807('0x2a')]=_[_0x8807('0x2b')](_0x18e0ec[_0x8807('0x27')],qs['fields'](_0x5e107e['query'][_0x8807('0x2c')]));_0x16b85b[_0x8807('0x2a')]=_0x16b85b[_0x8807('0x2a')][_0x8807('0x2d')]?_0x16b85b[_0x8807('0x2a')]:_0x18e0ec['model'];if(_0x5e107e[_0x8807('0x28')][_0x8807('0x3d')]){_0x16b85b[_0x8807('0x41')]=[{'all':!![]}];}_0x16b85b=_[_0x8807('0x36')]({},_0x16b85b,_0x5e107e[_0x8807('0x3c')]);return db[_0x8807('0x25')][_0x8807('0x42')](_0x16b85b)[_0x8807('0x20')](handleEntityNotFound(_0x5b3e8d,null))[_0x8807('0x20')](respondWithResult(_0x5b3e8d,null))[_0x8807('0x43')](handleError(_0x5b3e8d,null));};exports[_0x8807('0x44')]=function(_0x4042d3,_0x4027ad){return db[_0x8807('0x25')]['create'](_0x4042d3['body'],{})[_0x8807('0x20')](respondWithResult(_0x4027ad,0xc9))[_0x8807('0x43')](handleError(_0x4027ad,null));};exports['update']=function(_0x370afa,_0x49052f){if(_0x370afa['body']['id']){delete _0x370afa[_0x8807('0x45')]['id'];}return db[_0x8807('0x25')][_0x8807('0x42')]({'where':{'id':_0x370afa[_0x8807('0x40')]['id']}})[_0x8807('0x20')](handleEntityNotFound(_0x49052f,null))['then'](saveUpdates(_0x370afa['body'],null))[_0x8807('0x20')](respondWithResult(_0x49052f,null))['catch'](handleError(_0x49052f,null));};exports[_0x8807('0x21')]=function(_0x1350ec,_0x5bf10b){return db[_0x8807('0x25')]['find']({'where':{'id':_0x1350ec[_0x8807('0x40')]['id']}})[_0x8807('0x20')](handleEntityNotFound(_0x5bf10b,null))['then'](removeEntity(_0x5bf10b,null))[_0x8807('0x43')](handleError(_0x5bf10b,null));};exports[_0x8807('0x46')]=function(_0x386723,_0x504730){return db['MailQueueReport']['describe']()[_0x8807('0x20')](respondWithResult(_0x504730,null))[_0x8807('0x43')](handleError(_0x504730,null));};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.model.js b/server/api/mailQueueReport/mailQueueReport.model.js
index 8e282b2..f7bf90a 100644
--- a/server/api/mailQueueReport/mailQueueReport.model.js
+++ b/server/api/mailQueueReport/mailQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4a1d=['rimraf','../../config/environment','./mailQueueReport.attributes','exports','MailQueueReport','report_mail_queue','uniqueid','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0xe9ed00,_0x53acfb){var _0x4be0c1=function(_0x30fce4){while(--_0x30fce4){_0xe9ed00['push'](_0xe9ed00['shift']());}};_0x4be0c1(++_0x53acfb);}(_0x4a1d,0x77));var _0xd4a1=function(_0x2763f2,_0x416af8){_0x2763f2=_0x2763f2-0x0;var _0x3ef471=_0x4a1d[_0x2763f2];return _0x3ef471;};'use strict';var _=require(_0xd4a1('0x0'));var util=require(_0xd4a1('0x1'));var logger=require(_0xd4a1('0x2'))(_0xd4a1('0x3'));var moment=require(_0xd4a1('0x4'));var BPromise=require('bluebird');var rp=require(_0xd4a1('0x5'));var fs=require('fs');var path=require(_0xd4a1('0x6'));var rimraf=require(_0xd4a1('0x7'));var config=require(_0xd4a1('0x8'));var attributes=require(_0xd4a1('0x9'));module[_0xd4a1('0xa')]=function(_0x11fa5c,_0x1855b7){return _0x11fa5c['define'](_0xd4a1('0xb'),attributes,{'tableName':_0xd4a1('0xc'),'paranoid':![],'indexes':[{'name':_0xd4a1('0xd'),'fields':[_0xd4a1('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8769=['report_mail_queue','uniqueid','lodash','util','api','bluebird','request-promise','../../config/environment','./mailQueueReport.attributes','MailQueueReport'];(function(_0x1a0597,_0x99244d){var _0x500976=function(_0x3779b9){while(--_0x3779b9){_0x1a0597['push'](_0x1a0597['shift']());}};_0x500976(++_0x99244d);}(_0x8769,0x110));var _0x9876=function(_0x51020b,_0x38c2c7){_0x51020b=_0x51020b-0x0;var _0x371e47=_0x8769[_0x51020b];return _0x371e47;};'use strict';var _=require(_0x9876('0x0'));var util=require(_0x9876('0x1'));var logger=require('../../config/logger')(_0x9876('0x2'));var moment=require('moment');var BPromise=require(_0x9876('0x3'));var rp=require(_0x9876('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9876('0x5'));var attributes=require(_0x9876('0x6'));module['exports']=function(_0x179357,_0x5a4149){return _0x179357['define'](_0x9876('0x7'),attributes,{'tableName':_0x9876('0x8'),'paranoid':![],'indexes':[{'name':_0x9876('0x9'),'fields':[_0x9876('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.rpc.js b/server/api/mailQueueReport/mailQueueReport.rpc.js
index 2cb226b..e52c5b5 100644
--- a/server/api/mailQueueReport/mailQueueReport.rpc.js
+++ b/server/api/mailQueueReport/mailQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc16d=['catch','CreateMailQueueReport','MailQueueReport','create','body','options','raw','UpdateMailQueueReport','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result'];(function(_0x419b40,_0x1395e8){var _0x3a4da1=function(_0x4850e5){while(--_0x4850e5){_0x419b40['push'](_0x419b40['shift']());}};_0x3a4da1(++_0x1395e8);}(_0xc16d,0x1ea));var _0xdc16=function(_0x4e26b8,_0x1a3c12){_0x4e26b8=_0x4e26b8-0x0;var _0x10a6f0=_0xc16d[_0x4e26b8];return _0x10a6f0;};'use strict';var _=require(_0xdc16('0x0'));var util=require(_0xdc16('0x1'));var moment=require(_0xdc16('0x2'));var BPromise=require(_0xdc16('0x3'));var rs=require(_0xdc16('0x4'));var fs=require('fs');var Redis=require(_0xdc16('0x5'));var db=require(_0xdc16('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xdc16('0x7'))(_0xdc16('0x8'));var config=require(_0xdc16('0x9'));var jayson=require(_0xdc16('0xa'));var client=jayson['client'][_0xdc16('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x422430,_0x3ed051,_0x494ce9){return new BPromise(function(_0x25d3de,_0xdb6c65){return client['request'](_0x422430,_0x494ce9)[_0xdc16('0xc')](function(_0x32e448){logger[_0xdc16('0xd')](_0xdc16('0xe'),_0x3ed051,_0xdc16('0xf'));logger[_0xdc16('0x10')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x3ed051,'request\x20sent',JSON[_0xdc16('0x11')](_0x32e448));if(_0x32e448[_0xdc16('0x12')]){if(_0x32e448['error'][_0xdc16('0x13')]===0x1f4){logger[_0xdc16('0x12')]('MailQueueReport,\x20%s,\x20%s',_0x3ed051,_0x32e448[_0xdc16('0x12')]['message']);return _0xdb6c65(_0x32e448[_0xdc16('0x12')][_0xdc16('0x14')]);}logger[_0xdc16('0x12')]('MailQueueReport,\x20%s,\x20%s',_0x3ed051,_0x32e448[_0xdc16('0x12')]['message']);return _0x25d3de(_0x32e448[_0xdc16('0x12')]['message']);}else{logger[_0xdc16('0xd')]('MailQueueReport,\x20%s,\x20%s',_0x3ed051,_0xdc16('0xf'));_0x25d3de(_0x32e448[_0xdc16('0x15')][_0xdc16('0x14')]);}})[_0xdc16('0x16')](function(_0x5052df){logger['error'](_0xdc16('0xe'),_0x3ed051,_0x5052df);_0xdb6c65(_0x5052df);});});}exports[_0xdc16('0x17')]=function(_0x1535d7){var _0x4bddcf=this;return new Promise(function(_0x7efbcc,_0x29b025){return db[_0xdc16('0x18')][_0xdc16('0x19')](_0x1535d7[_0xdc16('0x1a')],{'raw':_0x1535d7[_0xdc16('0x1b')]?_0x1535d7[_0xdc16('0x1b')][_0xdc16('0x1c')]===undefined?!![]:![]:!![]})[_0xdc16('0xc')](function(_0x1324dd){logger[_0xdc16('0xd')](_0xdc16('0x17'),_0x1535d7);logger[_0xdc16('0x10')](_0xdc16('0x17'),_0x1535d7,JSON['stringify'](_0x1324dd));_0x7efbcc(_0x1324dd);})['catch'](function(_0x2e0dc8){logger[_0xdc16('0x12')](_0xdc16('0x17'),_0x2e0dc8[_0xdc16('0x14')],_0x1535d7);_0x29b025(_0x4bddcf[_0xdc16('0x12')](0x1f4,_0x2e0dc8[_0xdc16('0x14')]));});});};exports[_0xdc16('0x1d')]=function(_0x4a9152){var _0x3cb7af=this;return new Promise(function(_0x35b25b,_0x28c7ae){return db[_0xdc16('0x18')]['update'](_0x4a9152[_0xdc16('0x1a')],{'raw':_0x4a9152[_0xdc16('0x1b')]?_0x4a9152['options'][_0xdc16('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4a9152[_0xdc16('0x1b')]?_0x4a9152[_0xdc16('0x1b')][_0xdc16('0x1e')]||null:null,'attributes':_0x4a9152[_0xdc16('0x1b')]?_0x4a9152[_0xdc16('0x1b')]['attributes']||null:null,'limit':_0x4a9152['options']?_0x4a9152['options'][_0xdc16('0x1f')]||null:null})[_0xdc16('0xc')](function(_0x510711){logger[_0xdc16('0xd')](_0xdc16('0x1d'),_0x4a9152);logger['debug'](_0xdc16('0x1d'),_0x4a9152,JSON[_0xdc16('0x11')](_0x510711));_0x35b25b(_0x510711);})[_0xdc16('0x16')](function(_0x391a8a){logger[_0xdc16('0x12')]('UpdateMailQueueReport',_0x391a8a['message'],_0x4a9152);_0x28c7ae(_0x3cb7af[_0xdc16('0x12')](0x1f4,_0x391a8a[_0xdc16('0x14')]));});});};
\ No newline at end of file
+var _0x49be=['request','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','MailQueueReport,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','CreateMailQueueReport','MailQueueReport','create','options','raw','stringify','update','body','where','attributes','limit','then','UpdateMailQueueReport','lodash','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http'];(function(_0x54d4a8,_0x585a59){var _0x3b321b=function(_0x245c6a){while(--_0x245c6a){_0x54d4a8['push'](_0x54d4a8['shift']());}};_0x3b321b(++_0x585a59);}(_0x49be,0x10f));var _0xe49b=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x49be[_0x2641f9];return _0x585741;};'use strict';var _=require(_0xe49b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe49b('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe49b('0x2'))['db'];var utils=require(_0xe49b('0x3'));var logger=require(_0xe49b('0x4'))(_0xe49b('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xe49b('0x6')][_0xe49b('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x527a6b,_0x562cdc,_0x277c5c){return new BPromise(function(_0x552a30,_0x24affe){return client[_0xe49b('0x8')](_0x527a6b,_0x277c5c)['then'](function(_0x56c5f2){logger['info'](_0xe49b('0x9'),_0x562cdc,_0xe49b('0xa'));logger[_0xe49b('0xb')](_0xe49b('0xc'),_0x562cdc,'request\x20sent',JSON['stringify'](_0x56c5f2));if(_0x56c5f2[_0xe49b('0xd')]){if(_0x56c5f2[_0xe49b('0xd')]['code']===0x1f4){logger['error'](_0xe49b('0x9'),_0x562cdc,_0x56c5f2['error'][_0xe49b('0xe')]);return _0x24affe(_0x56c5f2[_0xe49b('0xd')]['message']);}logger[_0xe49b('0xd')](_0xe49b('0x9'),_0x562cdc,_0x56c5f2[_0xe49b('0xd')]['message']);return _0x552a30(_0x56c5f2[_0xe49b('0xd')][_0xe49b('0xe')]);}else{logger[_0xe49b('0xf')](_0xe49b('0x9'),_0x562cdc,_0xe49b('0xa'));_0x552a30(_0x56c5f2[_0xe49b('0x10')][_0xe49b('0xe')]);}})[_0xe49b('0x11')](function(_0xbba9){logger[_0xe49b('0xd')]('MailQueueReport,\x20%s,\x20%s',_0x562cdc,_0xbba9);_0x24affe(_0xbba9);});});}exports[_0xe49b('0x12')]=function(_0x1fdee8){var _0x143cdd=this;return new Promise(function(_0x53d9c2,_0x43e1ab){return db[_0xe49b('0x13')][_0xe49b('0x14')](_0x1fdee8['body'],{'raw':_0x1fdee8[_0xe49b('0x15')]?_0x1fdee8[_0xe49b('0x15')][_0xe49b('0x16')]===undefined?!![]:![]:!![]})['then'](function(_0x4f82e6){logger[_0xe49b('0xf')](_0xe49b('0x12'),_0x1fdee8);logger[_0xe49b('0xb')](_0xe49b('0x12'),_0x1fdee8,JSON[_0xe49b('0x17')](_0x4f82e6));_0x53d9c2(_0x4f82e6);})['catch'](function(_0x3b5db3){logger[_0xe49b('0xd')](_0xe49b('0x12'),_0x3b5db3[_0xe49b('0xe')],_0x1fdee8);_0x43e1ab(_0x143cdd[_0xe49b('0xd')](0x1f4,_0x3b5db3[_0xe49b('0xe')]));});});};exports['UpdateMailQueueReport']=function(_0x458708){var _0x20b3de=this;return new Promise(function(_0xab1ccd,_0x23f707){return db[_0xe49b('0x13')][_0xe49b('0x18')](_0x458708[_0xe49b('0x19')],{'raw':_0x458708['options']?_0x458708[_0xe49b('0x15')][_0xe49b('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x458708[_0xe49b('0x15')]?_0x458708[_0xe49b('0x15')][_0xe49b('0x1a')]||null:null,'attributes':_0x458708[_0xe49b('0x15')]?_0x458708[_0xe49b('0x15')][_0xe49b('0x1b')]||null:null,'limit':_0x458708[_0xe49b('0x15')]?_0x458708['options'][_0xe49b('0x1c')]||null:null})[_0xe49b('0x1d')](function(_0x2979dd){logger[_0xe49b('0xf')](_0xe49b('0x1e'),_0x458708);logger[_0xe49b('0xb')](_0xe49b('0x1e'),_0x458708,JSON[_0xe49b('0x17')](_0x2979dd));_0xab1ccd(_0x2979dd);})['catch'](function(_0x222dc7){logger[_0xe49b('0xd')](_0xe49b('0x1e'),_0x222dc7[_0xe49b('0xe')],_0x458708);_0x23f707(_0x20b3de['error'](0x1f4,_0x222dc7[_0xe49b('0xe')]));});});};
\ No newline at end of file
diff --git a/server/api/mailServerIn/index.js b/server/api/mailServerIn/index.js
index a0abea5..f9f05e4 100644
--- a/server/api/mailServerIn/index.js
+++ b/server/api/mailServerIn/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfb67=['express','Router','../../components/auth/service','../../config/environment','exports','multer','util','path','connect-timeout'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xfb67,0xdd));var _0x7fb6=function(_0x53730b,_0x369dc7){_0x53730b=_0x53730b-0x0;var _0x27e199=_0xfb67[_0x53730b];return _0x27e199;};'use strict';var multer=require(_0x7fb6('0x0'));var util=require(_0x7fb6('0x1'));var path=require(_0x7fb6('0x2'));var timeout=require(_0x7fb6('0x3'));var express=require(_0x7fb6('0x4'));var router=express[_0x7fb6('0x5')]();var auth=require(_0x7fb6('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x7fb6('0x7'));module[_0x7fb6('0x8')]=router;
\ No newline at end of file
+var _0xa6bb=['path','connect-timeout','express','Router','../../config/environment','exports','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa6bb,0x12c));var _0xba6b=function(_0x9a92c7,_0x53bb13){_0x9a92c7=_0x9a92c7-0x0;var _0x593fdc=_0xa6bb[_0x9a92c7];return _0x593fdc;};'use strict';var multer=require('multer');var util=require(_0xba6b('0x0'));var path=require(_0xba6b('0x1'));var timeout=require(_0xba6b('0x2'));var express=require(_0xba6b('0x3'));var router=express[_0xba6b('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xba6b('0x5'));module[_0xba6b('0x6')]=router;
\ No newline at end of file
diff --git a/server/api/mailServerIn/mailServerIn.attributes.js b/server/api/mailServerIn/mailServerIn.attributes.js
index d6e1d98..96ce8df 100644
--- a/server/api/mailServerIn/mailServerIn.attributes.js
+++ b/server/api/mailServerIn/mailServerIn.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x373d=['BOOLEAN','INTEGER','sequelize','STRING'];(function(_0x83b8a5,_0x2decf3){var _0x15f0bb=function(_0x5a32c2){while(--_0x5a32c2){_0x83b8a5['push'](_0x83b8a5['shift']());}};_0x15f0bb(++_0x2decf3);}(_0x373d,0x1e2));var _0xd373=function(_0x14286a,_0x54bf72){_0x14286a=_0x14286a-0x0;var _0x26d207=_0x373d[_0x14286a];return _0x26d207;};'use strict';var Sequelize=require(_0xd373('0x0'));module['exports']={'description':{'type':Sequelize[_0xd373('0x1')]},'host':{'type':Sequelize[_0xd373('0x1')]},'authentication':{'type':Sequelize[_0xd373('0x2')],'defaultValue':!![]},'user':{'type':Sequelize[_0xd373('0x1')],'unique':'username'},'password':{'type':Sequelize[_0xd373('0x1')]},'port':{'type':Sequelize[_0xd373('0x3')]},'tls':{'type':Sequelize[_0xd373('0x2')],'defaultValue':!![]},'mailbox':{'type':Sequelize['STRING'],'defaultValue':'INBOX'},'connTimeout':{'type':Sequelize[_0xd373('0x3')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0xd373('0x3')],'defaultValue':0x5},'service':{'type':Sequelize[_0xd373('0x1')]}};
\ No newline at end of file
+var _0xda3f=['BOOLEAN','INBOX','exports','STRING','username','INTEGER'];(function(_0x29b2d0,_0x73bf4b){var _0x4af937=function(_0x1b19c9){while(--_0x1b19c9){_0x29b2d0['push'](_0x29b2d0['shift']());}};_0x4af937(++_0x73bf4b);}(_0xda3f,0xec));var _0xfda3=function(_0xb6daf8,_0xa31562){_0xb6daf8=_0xb6daf8-0x0;var _0x11fff9=_0xda3f[_0xb6daf8];return _0x11fff9;};'use strict';var Sequelize=require('sequelize');module[_0xfda3('0x0')]={'description':{'type':Sequelize[_0xfda3('0x1')]},'host':{'type':Sequelize['STRING']},'authentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'user':{'type':Sequelize['STRING'],'unique':_0xfda3('0x2')},'password':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0xfda3('0x3')]},'tls':{'type':Sequelize[_0xfda3('0x4')],'defaultValue':!![]},'mailbox':{'type':Sequelize['STRING'],'defaultValue':_0xfda3('0x5')},'connTimeout':{'type':Sequelize[_0xfda3('0x3')],'defaultValue':0xa},'authTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'service':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/mailServerIn/mailServerIn.model.js b/server/api/mailServerIn/mailServerIn.model.js
index b13d5e6..ac9699f 100644
--- a/server/api/mailServerIn/mailServerIn.model.js
+++ b/server/api/mailServerIn/mailServerIn.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe353=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailServerIn.attributes','exports','define','MailServerIn','util'];(function(_0x295471,_0x242eed){var _0x47b7e4=function(_0x3e515e){while(--_0x3e515e){_0x295471['push'](_0x295471['shift']());}};_0x47b7e4(++_0x242eed);}(_0xe353,0xdc));var _0x3e35=function(_0x525c7b,_0x488fcc){_0x525c7b=_0x525c7b-0x0;var _0x27b33e=_0xe353[_0x525c7b];return _0x27b33e;};'use strict';var _=require('lodash');var util=require(_0x3e35('0x0'));var logger=require(_0x3e35('0x1'))(_0x3e35('0x2'));var moment=require(_0x3e35('0x3'));var BPromise=require(_0x3e35('0x4'));var rp=require(_0x3e35('0x5'));var fs=require('fs');var path=require(_0x3e35('0x6'));var rimraf=require(_0x3e35('0x7'));var config=require(_0x3e35('0x8'));var attributes=require(_0x3e35('0x9'));module[_0x3e35('0xa')]=function(_0x487d81,_0x18851f){return _0x487d81[_0x3e35('0xb')](_0x3e35('0xc'),attributes,{'tableName':'mail_servers_in','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe295=['../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','exports','define','MailServerIn','mail_servers_in','util'];(function(_0x1d87e9,_0x4f240d){var _0x13037b=function(_0x31319e){while(--_0x31319e){_0x1d87e9['push'](_0x1d87e9['shift']());}};_0x13037b(++_0x4f240d);}(_0xe295,0x143));var _0x5e29=function(_0x3b29d5,_0x12faa2){_0x3b29d5=_0x3b29d5-0x0;var _0x20b96d=_0xe295[_0x3b29d5];return _0x20b96d;};'use strict';var _=require('lodash');var util=require(_0x5e29('0x0'));var logger=require(_0x5e29('0x1'))(_0x5e29('0x2'));var moment=require(_0x5e29('0x3'));var BPromise=require(_0x5e29('0x4'));var rp=require(_0x5e29('0x5'));var fs=require('fs');var path=require(_0x5e29('0x6'));var rimraf=require('rimraf');var config=require(_0x5e29('0x7'));var attributes=require('./mailServerIn.attributes');module[_0x5e29('0x8')]=function(_0x5751a0,_0x3567ca){return _0x5751a0[_0x5e29('0x9')](_0x5e29('0xa'),attributes,{'tableName':_0x5e29('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailServerIn/mailServerIn.rpc.js b/server/api/mailServerIn/mailServerIn.rpc.js
index d47c603..4b62558 100644
--- a/server/api/mailServerIn/mailServerIn.rpc.js
+++ b/server/api/mailServerIn/mailServerIn.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe725=['../../config/logger','../../config/environment','jayson/promise','client','request','then','MailServerIn,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','GetMailServerIn','MailServerIn','findAll','options','where','attributes','limit','include','map','model','lodash','util','randomstring','ioredis'];(function(_0x1f62c3,_0x1ff95b){var _0x385c1c=function(_0x1db580){while(--_0x1db580){_0x1f62c3['push'](_0x1f62c3['shift']());}};_0x385c1c(++_0x1ff95b);}(_0xe725,0x13b));var _0x5e72=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xe725[_0xfae23b];return _0x200640;};'use strict';var _=require(_0x5e72('0x0'));var util=require(_0x5e72('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x5e72('0x2'));var fs=require('fs');var Redis=require(_0x5e72('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x5e72('0x4'))('rpc');var config=require(_0x5e72('0x5'));var jayson=require(_0x5e72('0x6'));var client=jayson[_0x5e72('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0xf5800d,_0x459b68,_0x171020){return new BPromise(function(_0x2b4764,_0xe16fd9){return client[_0x5e72('0x8')](_0xf5800d,_0x171020)[_0x5e72('0x9')](function(_0x994b96){logger['info'](_0x5e72('0xa'),_0x459b68,_0x5e72('0xb'));logger[_0x5e72('0xc')]('MailServerIn,\x20%s,\x20%s,\x20%s',_0x459b68,_0x5e72('0xb'),JSON[_0x5e72('0xd')](_0x994b96));if(_0x994b96[_0x5e72('0xe')]){if(_0x994b96['error']['code']===0x1f4){logger[_0x5e72('0xe')](_0x5e72('0xa'),_0x459b68,_0x994b96[_0x5e72('0xe')][_0x5e72('0xf')]);return _0xe16fd9(_0x994b96['error'][_0x5e72('0xf')]);}logger[_0x5e72('0xe')]('MailServerIn,\x20%s,\x20%s',_0x459b68,_0x994b96['error'][_0x5e72('0xf')]);return _0x2b4764(_0x994b96[_0x5e72('0xe')][_0x5e72('0xf')]);}else{logger[_0x5e72('0x10')](_0x5e72('0xa'),_0x459b68,_0x5e72('0xb'));_0x2b4764(_0x994b96[_0x5e72('0x11')][_0x5e72('0xf')]);}})[_0x5e72('0x12')](function(_0x173f4a){logger[_0x5e72('0xe')]('MailServerIn,\x20%s,\x20%s',_0x459b68,_0x173f4a);_0xe16fd9(_0x173f4a);});});}exports[_0x5e72('0x13')]=function(_0x319edf){var _0x23a0ae=this;return new Promise(function(_0x163dcb,_0x157d02){return db[_0x5e72('0x14')][_0x5e72('0x15')]({'raw':_0x319edf[_0x5e72('0x16')]?_0x319edf[_0x5e72('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x319edf[_0x5e72('0x16')]?_0x319edf[_0x5e72('0x16')][_0x5e72('0x17')]||null:null,'attributes':_0x319edf['options']?_0x319edf[_0x5e72('0x16')][_0x5e72('0x18')]||null:null,'limit':_0x319edf['options']?_0x319edf['options'][_0x5e72('0x19')]||null:null,'include':_0x319edf['options']?_0x319edf[_0x5e72('0x16')][_0x5e72('0x1a')]?_[_0x5e72('0x1b')](_0x319edf[_0x5e72('0x16')][_0x5e72('0x1a')],function(_0x3cc9f2){return{'model':db[_0x3cc9f2[_0x5e72('0x1c')]],'as':_0x3cc9f2['as'],'attributes':_0x3cc9f2[_0x5e72('0x18')],'include':_0x3cc9f2[_0x5e72('0x1a')]?_['map'](_0x3cc9f2['include'],function(_0x6b7d63){return{'model':db[_0x6b7d63[_0x5e72('0x1c')]],'as':_0x6b7d63['as'],'attributes':_0x6b7d63[_0x5e72('0x18')],'include':_0x6b7d63[_0x5e72('0x1a')]?_[_0x5e72('0x1b')](_0x6b7d63[_0x5e72('0x1a')],function(_0x2cdc73){return{'model':db[_0x2cdc73[_0x5e72('0x1c')]],'as':_0x2cdc73['as'],'attributes':_0x2cdc73[_0x5e72('0x18')]};}):[]};}):[]};}):[]:[]})[_0x5e72('0x9')](function(_0x486b86){logger['info'](_0x5e72('0x13'),_0x319edf);logger[_0x5e72('0xc')](_0x5e72('0x13'),_0x319edf,JSON[_0x5e72('0xd')](_0x486b86));_0x163dcb(_0x486b86);})[_0x5e72('0x12')](function(_0x58c190){logger[_0x5e72('0xe')](_0x5e72('0x13'),_0x58c190['message'],_0x319edf);_0x157d02(_0x23a0ae['error'](0x1f4,_0x58c190[_0x5e72('0xf')]));});});};
\ No newline at end of file
+var _0x6028=['GetMailServerIn','findAll','options','raw','where','map','include','model','attributes','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','then','request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','MailServerIn,\x20%s,\x20%s','message','info','result','catch'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x6028,0x101));var _0x8602=function(_0x36daac,_0x4243a1){_0x36daac=_0x36daac-0x0;var _0xdbe83a=_0x6028[_0x36daac];return _0xdbe83a;};'use strict';var _=require(_0x8602('0x0'));var util=require(_0x8602('0x1'));var moment=require(_0x8602('0x2'));var BPromise=require('bluebird');var rs=require(_0x8602('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8602('0x4'))['db'];var utils=require(_0x8602('0x5'));var logger=require('../../config/logger')(_0x8602('0x6'));var config=require('../../config/environment');var jayson=require(_0x8602('0x7'));var client=jayson[_0x8602('0x8')][_0x8602('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x383b64,_0x4457d0,_0x1c50c5){return new BPromise(function(_0x13575f,_0x5781c9){return client[_0x8602('0xa')](_0x383b64,_0x1c50c5)[_0x8602('0xb')](function(_0x2a37a6){logger['info']('MailServerIn,\x20%s,\x20%s',_0x4457d0,_0x8602('0xc'));logger[_0x8602('0xd')](_0x8602('0xe'),_0x4457d0,_0x8602('0xc'),JSON[_0x8602('0xf')](_0x2a37a6));if(_0x2a37a6[_0x8602('0x10')]){if(_0x2a37a6[_0x8602('0x10')]['code']===0x1f4){logger[_0x8602('0x10')](_0x8602('0x11'),_0x4457d0,_0x2a37a6[_0x8602('0x10')]['message']);return _0x5781c9(_0x2a37a6['error'][_0x8602('0x12')]);}logger[_0x8602('0x10')](_0x8602('0x11'),_0x4457d0,_0x2a37a6[_0x8602('0x10')][_0x8602('0x12')]);return _0x13575f(_0x2a37a6[_0x8602('0x10')][_0x8602('0x12')]);}else{logger[_0x8602('0x13')](_0x8602('0x11'),_0x4457d0,_0x8602('0xc'));_0x13575f(_0x2a37a6[_0x8602('0x14')][_0x8602('0x12')]);}})[_0x8602('0x15')](function(_0x532294){logger[_0x8602('0x10')](_0x8602('0x11'),_0x4457d0,_0x532294);_0x5781c9(_0x532294);});});}exports[_0x8602('0x16')]=function(_0x37b7d0){var _0x59c783=this;return new Promise(function(_0x2d0fa7,_0x1bf856){return db['MailServerIn'][_0x8602('0x17')]({'raw':_0x37b7d0[_0x8602('0x18')]?_0x37b7d0[_0x8602('0x18')][_0x8602('0x19')]===undefined?!![]:![]:!![],'where':_0x37b7d0[_0x8602('0x18')]?_0x37b7d0[_0x8602('0x18')][_0x8602('0x1a')]||null:null,'attributes':_0x37b7d0[_0x8602('0x18')]?_0x37b7d0[_0x8602('0x18')]['attributes']||null:null,'limit':_0x37b7d0[_0x8602('0x18')]?_0x37b7d0[_0x8602('0x18')]['limit']||null:null,'include':_0x37b7d0['options']?_0x37b7d0[_0x8602('0x18')]['include']?_[_0x8602('0x1b')](_0x37b7d0[_0x8602('0x18')][_0x8602('0x1c')],function(_0x41874d){return{'model':db[_0x41874d[_0x8602('0x1d')]],'as':_0x41874d['as'],'attributes':_0x41874d['attributes'],'include':_0x41874d['include']?_['map'](_0x41874d['include'],function(_0x869074){return{'model':db[_0x869074['model']],'as':_0x869074['as'],'attributes':_0x869074[_0x8602('0x1e')],'include':_0x869074[_0x8602('0x1c')]?_['map'](_0x869074['include'],function(_0x4cf8f7){return{'model':db[_0x4cf8f7['model']],'as':_0x4cf8f7['as'],'attributes':_0x4cf8f7[_0x8602('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x8602('0xb')](function(_0x2a9777){logger[_0x8602('0x13')]('GetMailServerIn',_0x37b7d0);logger[_0x8602('0xd')](_0x8602('0x16'),_0x37b7d0,JSON[_0x8602('0xf')](_0x2a9777));_0x2d0fa7(_0x2a9777);})['catch'](function(_0x341f80){logger[_0x8602('0x10')](_0x8602('0x16'),_0x341f80['message'],_0x37b7d0);_0x1bf856(_0x59c783['error'](0x1f4,_0x341f80['message']));});});};
\ No newline at end of file
diff --git a/server/api/mailServerOut/index.js b/server/api/mailServerOut/index.js
index 459c99e..704674e 100644
--- a/server/api/mailServerOut/index.js
+++ b/server/api/mailServerOut/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcce5=['index','/:id','show','create','put','delete','destroy','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0xf5cdcd,_0x28f4c5){var _0x2a03f1=function(_0x56ba3a){while(--_0x56ba3a){_0xf5cdcd['push'](_0xf5cdcd['shift']());}};_0x2a03f1(++_0x28f4c5);}(_0xcce5,0x160));var _0x5cce=function(_0x10ca0b,_0x45c3ae){_0x10ca0b=_0x10ca0b-0x0;var _0x2a7cae=_0xcce5[_0x10ca0b];return _0x2a7cae;};'use strict';var multer=require('multer');var util=require(_0x5cce('0x0'));var path=require(_0x5cce('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x5cce('0x2')]();var auth=require(_0x5cce('0x3'));var interaction=require(_0x5cce('0x4'));var config=require(_0x5cce('0x5'));var controller=require('./mailServerOut.controller');router[_0x5cce('0x6')]('/',auth[_0x5cce('0x7')](),controller[_0x5cce('0x8')]);router[_0x5cce('0x6')](_0x5cce('0x9'),auth[_0x5cce('0x7')](),controller[_0x5cce('0xa')]);router['post']('/',auth[_0x5cce('0x7')](),controller[_0x5cce('0xb')]);router[_0x5cce('0xc')](_0x5cce('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x5cce('0xd')](_0x5cce('0x9'),auth[_0x5cce('0x7')](),controller[_0x5cce('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0xa286=['./mailServerOut.controller','isAuthenticated','get','/:id','show','post','put','update','delete','destroy','exports','Router','../../components/auth/service','../../config/environment'];(function(_0xd1dd07,_0x569cd5){var _0x534b73=function(_0x34945a){while(--_0x34945a){_0xd1dd07['push'](_0xd1dd07['shift']());}};_0x534b73(++_0x569cd5);}(_0xa286,0x1a1));var _0x6a28=function(_0x57add2,_0x4f2b7d){_0x57add2=_0x57add2-0x0;var _0x4e3670=_0xa286[_0x57add2];return _0x4e3670;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x6a28('0x0')]();var auth=require(_0x6a28('0x1'));var interaction=require('../../components/interaction/service');var config=require(_0x6a28('0x2'));var controller=require(_0x6a28('0x3'));router['get']('/',auth[_0x6a28('0x4')](),controller['index']);router[_0x6a28('0x5')](_0x6a28('0x6'),auth[_0x6a28('0x4')](),controller[_0x6a28('0x7')]);router[_0x6a28('0x8')]('/',auth[_0x6a28('0x4')](),controller['create']);router[_0x6a28('0x9')](_0x6a28('0x6'),auth[_0x6a28('0x4')](),controller[_0x6a28('0xa')]);router[_0x6a28('0xb')](_0x6a28('0x6'),auth[_0x6a28('0x4')](),controller[_0x6a28('0xc')]);module[_0x6a28('0xd')]=router;
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.attributes.js b/server/api/mailServerOut/mailServerOut.attributes.js
index bdfdd09..39fd51a 100644
--- a/server/api/mailServerOut/mailServerOut.attributes.js
+++ b/server/api/mailServerOut/mailServerOut.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0130=['exports','STRING','INTEGER','BOOLEAN','sequelize'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x0130,0x1bc));var _0x0013=function(_0x3b9d5f,_0x2e9039){_0x3b9d5f=_0x3b9d5f-0x0;var _0x39924e=_0x0130[_0x3b9d5f];return _0x39924e;};'use strict';var Sequelize=require(_0x0013('0x0'));module[_0x0013('0x1')]={'description':{'type':Sequelize[_0x0013('0x2')]},'host':{'type':Sequelize[_0x0013('0x2')]},'user':{'type':Sequelize[_0x0013('0x2')]},'pass':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0x0013('0x3')]},'secure':{'type':Sequelize[_0x0013('0x4')],'defaultValue':![]},'service':{'type':Sequelize[_0x0013('0x2')]},'authentication':{'type':Sequelize[_0x0013('0x4')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x7314=['BOOLEAN','sequelize','exports','STRING','INTEGER'];(function(_0x11a422,_0x5907a5){var _0x547177=function(_0x55ec90){while(--_0x55ec90){_0x11a422['push'](_0x11a422['shift']());}};_0x547177(++_0x5907a5);}(_0x7314,0x1d7));var _0x4731=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7314[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x4731('0x0'));module[_0x4731('0x1')]={'description':{'type':Sequelize[_0x4731('0x2')]},'host':{'type':Sequelize['STRING']},'user':{'type':Sequelize[_0x4731('0x2')]},'pass':{'type':Sequelize[_0x4731('0x2')]},'port':{'type':Sequelize[_0x4731('0x3')]},'secure':{'type':Sequelize[_0x4731('0x4')],'defaultValue':![]},'service':{'type':Sequelize['STRING']},'authentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.controller.js b/server/api/mailServerOut/mailServerOut.controller.js
index dbdd27e..a345604 100644
--- a/server/api/mailServerOut/mailServerOut.controller.js
+++ b/server/api/mailServerOut/mailServerOut.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9ec=['filters','intersection','attributes','fields','length','nolimit','sort','where','pick','merge','map','type','key','VIRTUAL','filter','options','count','includeAll','include','findAll','show','params','find','catch','create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','sendStatus','status','end','json','offset','limit','set','apply','reject','save','update','then','destroy','stack','name','MailServerOut','model','keys','query'];(function(_0x307086,_0x3bfe4e){var _0x699043=function(_0x1a7677){while(--_0x1a7677){_0x307086['push'](_0x307086['shift']());}};_0x699043(++_0x3bfe4e);}(_0xa9ec,0x116));var _0xca9e=function(_0x56e027,_0x496a98){_0x56e027=_0x56e027-0x0;var _0x33ffc4=_0xa9ec[_0x56e027];return _0x33ffc4;};'use strict';var pdf=require(_0xca9e('0x0'));var emlformat=require(_0xca9e('0x1'));var rimraf=require(_0xca9e('0x2'));var zipdir=require(_0xca9e('0x3'));var jsonpatch=require(_0xca9e('0x4'));var rp=require('request-promise');var moment=require(_0xca9e('0x5'));var BPromise=require(_0xca9e('0x6'));var Mustache=require(_0xca9e('0x7'));var util=require(_0xca9e('0x8'));var path=require(_0xca9e('0x9'));var sox=require(_0xca9e('0xa'));var csv=require('to-csv');var ejs=require(_0xca9e('0xb'));var fs=require('fs');var _=require(_0xca9e('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xca9e('0xd'));var Redis=require(_0xca9e('0xe'));var authService=require(_0xca9e('0xf'));var qs=require(_0xca9e('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xca9e('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1b4f3d,_0x170627){_0x170627=_0x170627||0xcc;return function(_0x2d3fd1){if(_0x2d3fd1){return _0x1b4f3d[_0xca9e('0x12')](_0x170627);}return _0x1b4f3d[_0xca9e('0x13')](_0x170627)[_0xca9e('0x14')]();};}function respondWithResult(_0x5f4ee0,_0x199e6a){_0x199e6a=_0x199e6a||0xc8;return function(_0x5e48e3){if(_0x5e48e3){return _0x5f4ee0[_0xca9e('0x13')](_0x199e6a)[_0xca9e('0x15')](_0x5e48e3);}};}function respondWithFilteredResult(_0x261215,_0x5631b9){return function(_0x2a18bc){if(_0x2a18bc){var _0x16034c=_0x2a18bc['count'],_0x35f2ce=_0x5631b9[_0xca9e('0x16')],_0x3c9ec3=_0x5631b9['offset']+_0x5631b9[_0xca9e('0x17')],_0xc43813;if(_0x3c9ec3>=_0x16034c){_0x3c9ec3=_0x16034c;_0xc43813=0xc8;}else{_0xc43813=0xce;}_0x261215[_0xca9e('0x13')](_0xc43813);return _0x261215[_0xca9e('0x18')]('Content-Range',_0x35f2ce+'-'+_0x3c9ec3+'/'+_0x16034c)[_0xca9e('0x15')](_0x2a18bc);}return null;};}function patchUpdates(_0x4cfa75){return function(_0x22b842){try{jsonpatch[_0xca9e('0x19')](_0x22b842,_0x4cfa75,!![]);}catch(_0x32ce24){return BPromise[_0xca9e('0x1a')](_0x32ce24);}return _0x22b842[_0xca9e('0x1b')]();};}function saveUpdates(_0x4740ac,_0x36d066){return function(_0x312d12){if(_0x312d12){return _0x312d12[_0xca9e('0x1c')](_0x4740ac)[_0xca9e('0x1d')](function(_0x20c003){return _0x20c003;});}return null;};}function removeEntity(_0xad25f2,_0x39dd31){return function(_0xb72193){if(_0xb72193){return _0xb72193[_0xca9e('0x1e')]()[_0xca9e('0x1d')](function(){_0xad25f2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xe4f7e,_0x198916){return function(_0x769529){if(!_0x769529){_0xe4f7e[_0xca9e('0x12')](0x194);}return _0x769529;};}function handleError(_0x5a299b,_0x3d7fca){_0x3d7fca=_0x3d7fca||0x1f4;return function(_0x6139ab){logger['error'](_0x6139ab[_0xca9e('0x1f')]);if(_0x6139ab[_0xca9e('0x20')]){delete _0x6139ab[_0xca9e('0x20')];}_0x5a299b['status'](_0x3d7fca)['send'](_0x6139ab);};}exports['index']=function(_0x316416,_0x5e0cdc){var _0x53fe01={},_0x4ca442={},_0x13492e={'count':0x0,'rows':[]};var _0x3a9f45=db[_0xca9e('0x21')]['rawAttributes'];_0x4ca442[_0xca9e('0x22')]=_[_0xca9e('0x23')](_0x3a9f45);_0x4ca442[_0xca9e('0x24')]=_[_0xca9e('0x23')](_0x316416[_0xca9e('0x24')]);_0x4ca442[_0xca9e('0x25')]=_[_0xca9e('0x26')](_0x4ca442['model'],_0x4ca442[_0xca9e('0x24')]);_0x53fe01[_0xca9e('0x27')]=_[_0xca9e('0x26')](_0x4ca442[_0xca9e('0x22')],qs[_0xca9e('0x28')](_0x316416[_0xca9e('0x24')][_0xca9e('0x28')]));_0x53fe01[_0xca9e('0x27')]=_0x53fe01['attributes'][_0xca9e('0x29')]?_0x53fe01['attributes']:_0x4ca442[_0xca9e('0x22')];if(!_0x316416[_0xca9e('0x24')]['hasOwnProperty'](_0xca9e('0x2a'))){_0x53fe01[_0xca9e('0x17')]=qs['limit'](_0x316416['query'][_0xca9e('0x17')]);_0x53fe01['offset']=qs[_0xca9e('0x16')](_0x316416[_0xca9e('0x24')]['offset']);}_0x53fe01['order']=qs[_0xca9e('0x2b')](_0x316416['query']['sort']);_0x53fe01[_0xca9e('0x2c')]=qs['filters'](_[_0xca9e('0x2d')](_0x316416[_0xca9e('0x24')],_0x4ca442[_0xca9e('0x25')]));if(_0x316416[_0xca9e('0x24')]['filter']){_0x53fe01[_0xca9e('0x2c')]=_[_0xca9e('0x2e')](_0x53fe01['where'],{'$or':_[_0xca9e('0x2f')](_0x3a9f45,function(_0x3b1df5){if(_0x3b1df5[_0xca9e('0x30')][_0xca9e('0x31')]!==_0xca9e('0x32')){var _0xb576e={};_0xb576e[_0x3b1df5['field']]={'$like':'%'+_0x316416['query'][_0xca9e('0x33')]+'%'};return _0xb576e;}})});}_0x53fe01=_[_0xca9e('0x2e')]({},_0x53fe01,_0x316416[_0xca9e('0x34')]);var _0x25ba58={'where':_0x53fe01[_0xca9e('0x2c')]};return db[_0xca9e('0x21')][_0xca9e('0x35')](_0x25ba58)[_0xca9e('0x1d')](function(_0x29d7ef){_0x13492e[_0xca9e('0x35')]=_0x29d7ef;if(_0x316416[_0xca9e('0x24')][_0xca9e('0x36')]){_0x53fe01[_0xca9e('0x37')]=[{'all':!![]}];}return db[_0xca9e('0x21')][_0xca9e('0x38')](_0x53fe01);})[_0xca9e('0x1d')](function(_0x25e32c){_0x13492e['rows']=_0x25e32c;return _0x13492e;})[_0xca9e('0x1d')](respondWithFilteredResult(_0x5e0cdc,_0x53fe01))['catch'](handleError(_0x5e0cdc,null));};exports[_0xca9e('0x39')]=function(_0x511049,_0x16240f){var _0x22dbac={'raw':!![],'where':{'id':_0x511049[_0xca9e('0x3a')]['id']}},_0x7e6bd1={};_0x7e6bd1['model']=_[_0xca9e('0x23')](db['MailServerOut']['rawAttributes']);_0x7e6bd1[_0xca9e('0x24')]=_['keys'](_0x511049[_0xca9e('0x24')]);_0x7e6bd1['filters']=_[_0xca9e('0x26')](_0x7e6bd1[_0xca9e('0x22')],_0x7e6bd1[_0xca9e('0x24')]);_0x22dbac[_0xca9e('0x27')]=_[_0xca9e('0x26')](_0x7e6bd1[_0xca9e('0x22')],qs['fields'](_0x511049[_0xca9e('0x24')][_0xca9e('0x28')]));_0x22dbac[_0xca9e('0x27')]=_0x22dbac[_0xca9e('0x27')][_0xca9e('0x29')]?_0x22dbac[_0xca9e('0x27')]:_0x7e6bd1[_0xca9e('0x22')];if(_0x511049[_0xca9e('0x24')][_0xca9e('0x36')]){_0x22dbac['include']=[{'all':!![]}];}_0x22dbac=_['merge']({},_0x22dbac,_0x511049[_0xca9e('0x34')]);return db[_0xca9e('0x21')][_0xca9e('0x3b')](_0x22dbac)['then'](handleEntityNotFound(_0x16240f,null))[_0xca9e('0x1d')](respondWithResult(_0x16240f,null))[_0xca9e('0x3c')](handleError(_0x16240f,null));};exports[_0xca9e('0x3d')]=function(_0x1efab3,_0x5e0281){return db[_0xca9e('0x21')]['create'](_0x1efab3[_0xca9e('0x3e')],{})[_0xca9e('0x1d')](respondWithResult(_0x5e0281,0xc9))[_0xca9e('0x3c')](handleError(_0x5e0281,null));};exports[_0xca9e('0x1c')]=function(_0xd7db15,_0x55be9d){if(_0xd7db15[_0xca9e('0x3e')]['id']){delete _0xd7db15['body']['id'];}return db[_0xca9e('0x21')][_0xca9e('0x3b')]({'where':{'id':_0xd7db15[_0xca9e('0x3a')]['id']}})['then'](handleEntityNotFound(_0x55be9d,null))['then'](saveUpdates(_0xd7db15[_0xca9e('0x3e')],null))[_0xca9e('0x1d')](respondWithResult(_0x55be9d,null))[_0xca9e('0x3c')](handleError(_0x55be9d,null));};exports[_0xca9e('0x1e')]=function(_0x3d1d5d,_0x2766f2){return db['MailServerOut']['find']({'where':{'id':_0x3d1d5d[_0xca9e('0x3a')]['id']}})[_0xca9e('0x1d')](handleEntityNotFound(_0x2766f2,null))['then'](removeEntity(_0x2766f2,null))[_0xca9e('0x3c')](handleError(_0x2766f2,null));};
\ No newline at end of file
+var _0x885d=['destroy','error','stack','name','send','index','MailServerOut','rawAttributes','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','map','type','key','field','filter','merge','include','findAll','catch','show','includeAll','options','find','create','body','params','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','apply','update','then'];(function(_0x35e90c,_0x584afe){var _0x407eb2=function(_0xcc0e3b){while(--_0xcc0e3b){_0x35e90c['push'](_0x35e90c['shift']());}};_0x407eb2(++_0x584afe);}(_0x885d,0xad));var _0xd885=function(_0x1bb6aa,_0x40fe82){_0x1bb6aa=_0x1bb6aa-0x0;var _0x2ef28e=_0x885d[_0x1bb6aa];return _0x2ef28e;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xd885('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd885('0x1'));var jsonpatch=require(_0xd885('0x2'));var rp=require('request-promise');var moment=require(_0xd885('0x3'));var BPromise=require(_0xd885('0x4'));var Mustache=require(_0xd885('0x5'));var util=require(_0xd885('0x6'));var path=require(_0xd885('0x7'));var sox=require('sox');var csv=require(_0xd885('0x8'));var ejs=require(_0xd885('0x9'));var fs=require('fs');var _=require(_0xd885('0xa'));var squel=require(_0xd885('0xb'));var crypto=require(_0xd885('0xc'));var jsforce=require(_0xd885('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xd885('0x8'));var querystring=require(_0xd885('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xd885('0xf'));var qs=require(_0xd885('0x10'));var hardwareService=require(_0xd885('0x11'));var logger=require('../../config/logger')(_0xd885('0x12'));var utils=require('../../config/utils');var config=require(_0xd885('0x13'));var db=require(_0xd885('0x14'))['db'];function respondWithStatusCode(_0x127791,_0x357389){_0x357389=_0x357389||0xcc;return function(_0x4c7616){if(_0x4c7616){return _0x127791[_0xd885('0x15')](_0x357389);}return _0x127791[_0xd885('0x16')](_0x357389)[_0xd885('0x17')]();};}function respondWithResult(_0x3caed7,_0x9739ee){_0x9739ee=_0x9739ee||0xc8;return function(_0x1619ac){if(_0x1619ac){return _0x3caed7[_0xd885('0x16')](_0x9739ee)[_0xd885('0x18')](_0x1619ac);}};}function respondWithFilteredResult(_0x4a71c9,_0x59679a){return function(_0x1d6021){if(_0x1d6021){var _0x54d6da=_0x1d6021[_0xd885('0x19')],_0x1ffa23=_0x59679a[_0xd885('0x1a')],_0x29fc1f=_0x59679a[_0xd885('0x1a')]+_0x59679a[_0xd885('0x1b')],_0x27da6;if(_0x29fc1f>=_0x54d6da){_0x29fc1f=_0x54d6da;_0x27da6=0xc8;}else{_0x27da6=0xce;}_0x4a71c9[_0xd885('0x16')](_0x27da6);return _0x4a71c9['set']('Content-Range',_0x1ffa23+'-'+_0x29fc1f+'/'+_0x54d6da)[_0xd885('0x18')](_0x1d6021);}return null;};}function patchUpdates(_0xdd719e){return function(_0x3571f8){try{jsonpatch[_0xd885('0x1c')](_0x3571f8,_0xdd719e,!![]);}catch(_0x53e76d){return BPromise['reject'](_0x53e76d);}return _0x3571f8['save']();};}function saveUpdates(_0x817bb3,_0x50fbb6){return function(_0x1d9bd7){if(_0x1d9bd7){return _0x1d9bd7[_0xd885('0x1d')](_0x817bb3)[_0xd885('0x1e')](function(_0x293713){return _0x293713;});}return null;};}function removeEntity(_0x159f5a,_0x34f7de){return function(_0xe1e31a){if(_0xe1e31a){return _0xe1e31a[_0xd885('0x1f')]()['then'](function(){_0x159f5a['status'](0xcc)[_0xd885('0x17')]();});}};}function handleEntityNotFound(_0x425d8a,_0x356f30){return function(_0x411da4){if(!_0x411da4){_0x425d8a[_0xd885('0x15')](0x194);}return _0x411da4;};}function handleError(_0x5794e5,_0x4de470){_0x4de470=_0x4de470||0x1f4;return function(_0x5d198d){logger[_0xd885('0x20')](_0x5d198d[_0xd885('0x21')]);if(_0x5d198d[_0xd885('0x22')]){delete _0x5d198d['name'];}_0x5794e5['status'](_0x4de470)[_0xd885('0x23')](_0x5d198d);};}exports[_0xd885('0x24')]=function(_0x3589ad,_0x22754e){var _0x103170={},_0x3e0dcb={},_0x44c45b={'count':0x0,'rows':[]};var _0x2134da=db[_0xd885('0x25')][_0xd885('0x26')];_0x3e0dcb[_0xd885('0x27')]=_[_0xd885('0x28')](_0x2134da);_0x3e0dcb[_0xd885('0x29')]=_[_0xd885('0x28')](_0x3589ad[_0xd885('0x29')]);_0x3e0dcb['filters']=_['intersection'](_0x3e0dcb['model'],_0x3e0dcb[_0xd885('0x29')]);_0x103170[_0xd885('0x2a')]=_[_0xd885('0x2b')](_0x3e0dcb[_0xd885('0x27')],qs[_0xd885('0x2c')](_0x3589ad[_0xd885('0x29')][_0xd885('0x2c')]));_0x103170[_0xd885('0x2a')]=_0x103170['attributes'][_0xd885('0x2d')]?_0x103170[_0xd885('0x2a')]:_0x3e0dcb[_0xd885('0x27')];if(!_0x3589ad['query'][_0xd885('0x2e')](_0xd885('0x2f'))){_0x103170[_0xd885('0x1b')]=qs[_0xd885('0x1b')](_0x3589ad['query'][_0xd885('0x1b')]);_0x103170[_0xd885('0x1a')]=qs[_0xd885('0x1a')](_0x3589ad[_0xd885('0x29')][_0xd885('0x1a')]);}_0x103170['order']=qs[_0xd885('0x30')](_0x3589ad['query'][_0xd885('0x30')]);_0x103170[_0xd885('0x31')]=qs[_0xd885('0x32')](_[_0xd885('0x33')](_0x3589ad[_0xd885('0x29')],_0x3e0dcb[_0xd885('0x32')]));if(_0x3589ad['query']['filter']){_0x103170['where']=_['merge'](_0x103170[_0xd885('0x31')],{'$or':_[_0xd885('0x34')](_0x2134da,function(_0x1f503f){if(_0x1f503f[_0xd885('0x35')][_0xd885('0x36')]!=='VIRTUAL'){var _0x380e82={};_0x380e82[_0x1f503f[_0xd885('0x37')]]={'$like':'%'+_0x3589ad['query'][_0xd885('0x38')]+'%'};return _0x380e82;}})});}_0x103170=_[_0xd885('0x39')]({},_0x103170,_0x3589ad['options']);var _0x50cf84={'where':_0x103170[_0xd885('0x31')]};return db['MailServerOut'][_0xd885('0x19')](_0x50cf84)[_0xd885('0x1e')](function(_0x335e3a){_0x44c45b[_0xd885('0x19')]=_0x335e3a;if(_0x3589ad[_0xd885('0x29')]['includeAll']){_0x103170[_0xd885('0x3a')]=[{'all':!![]}];}return db[_0xd885('0x25')][_0xd885('0x3b')](_0x103170);})[_0xd885('0x1e')](function(_0x145b96){_0x44c45b['rows']=_0x145b96;return _0x44c45b;})['then'](respondWithFilteredResult(_0x22754e,_0x103170))[_0xd885('0x3c')](handleError(_0x22754e,null));};exports[_0xd885('0x3d')]=function(_0x44a4d6,_0x9a4c5a){var _0x5edde1={'raw':!![],'where':{'id':_0x44a4d6['params']['id']}},_0x6be5fe={};_0x6be5fe['model']=_[_0xd885('0x28')](db[_0xd885('0x25')][_0xd885('0x26')]);_0x6be5fe[_0xd885('0x29')]=_[_0xd885('0x28')](_0x44a4d6['query']);_0x6be5fe[_0xd885('0x32')]=_[_0xd885('0x2b')](_0x6be5fe[_0xd885('0x27')],_0x6be5fe[_0xd885('0x29')]);_0x5edde1[_0xd885('0x2a')]=_[_0xd885('0x2b')](_0x6be5fe[_0xd885('0x27')],qs[_0xd885('0x2c')](_0x44a4d6['query'][_0xd885('0x2c')]));_0x5edde1[_0xd885('0x2a')]=_0x5edde1[_0xd885('0x2a')][_0xd885('0x2d')]?_0x5edde1[_0xd885('0x2a')]:_0x6be5fe[_0xd885('0x27')];if(_0x44a4d6[_0xd885('0x29')][_0xd885('0x3e')]){_0x5edde1[_0xd885('0x3a')]=[{'all':!![]}];}_0x5edde1=_[_0xd885('0x39')]({},_0x5edde1,_0x44a4d6[_0xd885('0x3f')]);return db[_0xd885('0x25')][_0xd885('0x40')](_0x5edde1)['then'](handleEntityNotFound(_0x9a4c5a,null))[_0xd885('0x1e')](respondWithResult(_0x9a4c5a,null))[_0xd885('0x3c')](handleError(_0x9a4c5a,null));};exports['create']=function(_0x283119,_0x344299){return db['MailServerOut'][_0xd885('0x41')](_0x283119[_0xd885('0x42')],{})[_0xd885('0x1e')](respondWithResult(_0x344299,0xc9))['catch'](handleError(_0x344299,null));};exports[_0xd885('0x1d')]=function(_0x1b6cd4,_0x1cd716){if(_0x1b6cd4['body']['id']){delete _0x1b6cd4[_0xd885('0x42')]['id'];}return db[_0xd885('0x25')][_0xd885('0x40')]({'where':{'id':_0x1b6cd4[_0xd885('0x43')]['id']}})[_0xd885('0x1e')](handleEntityNotFound(_0x1cd716,null))[_0xd885('0x1e')](saveUpdates(_0x1b6cd4[_0xd885('0x42')],null))[_0xd885('0x1e')](respondWithResult(_0x1cd716,null))[_0xd885('0x3c')](handleError(_0x1cd716,null));};exports[_0xd885('0x1f')]=function(_0x5acfa6,_0x3a3943){return db[_0xd885('0x25')]['find']({'where':{'id':_0x5acfa6[_0xd885('0x43')]['id']}})[_0xd885('0x1e')](handleEntityNotFound(_0x3a3943,null))['then'](removeEntity(_0x3a3943,null))[_0xd885('0x3c')](handleError(_0x3a3943,null));};
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.model.js b/server/api/mailServerOut/mailServerOut.model.js
index 394e7c2..7e2053d 100644
--- a/server/api/mailServerOut/mailServerOut.model.js
+++ b/server/api/mailServerOut/mailServerOut.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1339=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','MailServerOut','mail_servers_out','../../config/logger','api'];(function(_0x11b2da,_0x4ea9aa){var _0x14676f=function(_0x5946b6){while(--_0x5946b6){_0x11b2da['push'](_0x11b2da['shift']());}};_0x14676f(++_0x4ea9aa);}(_0x1339,0x1ed));var _0x9133=function(_0x126751,_0x5d18e0){_0x126751=_0x126751-0x0;var _0x63e78b=_0x1339[_0x126751];return _0x63e78b;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9133('0x0'))(_0x9133('0x1'));var moment=require(_0x9133('0x2'));var BPromise=require(_0x9133('0x3'));var rp=require(_0x9133('0x4'));var fs=require('fs');var path=require(_0x9133('0x5'));var rimraf=require(_0x9133('0x6'));var config=require(_0x9133('0x7'));var attributes=require('./mailServerOut.attributes');module[_0x9133('0x8')]=function(_0x855473,_0x379915){return _0x855473['define'](_0x9133('0x9'),attributes,{'tableName':_0x9133('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4cf8=['../../config/environment','./mailServerOut.attributes','exports','define','mail_servers_out','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x53c766,_0x182c04){var _0x34f741=function(_0xd0e50c){while(--_0xd0e50c){_0x53c766['push'](_0x53c766['shift']());}};_0x34f741(++_0x182c04);}(_0x4cf8,0x1e1));var _0x84cf=function(_0x4c9915,_0x406b1a){_0x4c9915=_0x4c9915-0x0;var _0x473218=_0x4cf8[_0x4c9915];return _0x473218;};'use strict';var _=require(_0x84cf('0x0'));var util=require(_0x84cf('0x1'));var logger=require(_0x84cf('0x2'))(_0x84cf('0x3'));var moment=require(_0x84cf('0x4'));var BPromise=require(_0x84cf('0x5'));var rp=require(_0x84cf('0x6'));var fs=require('fs');var path=require(_0x84cf('0x7'));var rimraf=require(_0x84cf('0x8'));var config=require(_0x84cf('0x9'));var attributes=require(_0x84cf('0xa'));module[_0x84cf('0xb')]=function(_0x50ade2,_0x4af3f1){return _0x50ade2[_0x84cf('0xc')]('MailServerOut',attributes,{'tableName':_0x84cf('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.rpc.js b/server/api/mailServerOut/mailServerOut.rpc.js
index 1d13f74..38f2ffd 100644
--- a/server/api/mailServerOut/mailServerOut.rpc.js
+++ b/server/api/mailServerOut/mailServerOut.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x58e2=['ioredis','../../config/utils','../../config/environment','jayson/promise','then','info','MailServerOut,\x20%s,\x20%s','request\x20sent','MailServerOut,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring'];(function(_0x3bf1fd,_0x29a3b6){var _0x1bdb6e=function(_0x4143db){while(--_0x4143db){_0x3bf1fd['push'](_0x3bf1fd['shift']());}};_0x1bdb6e(++_0x29a3b6);}(_0x58e2,0x1d7));var _0x258e=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0x58e2[_0x413feb];return _0x40ee88;};'use strict';var _=require('lodash');var util=require(_0x258e('0x0'));var moment=require(_0x258e('0x1'));var BPromise=require(_0x258e('0x2'));var rs=require(_0x258e('0x3'));var fs=require('fs');var Redis=require(_0x258e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x258e('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x258e('0x6'));var jayson=require(_0x258e('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3c58ef,_0x224d17,_0x26cd55){return new BPromise(function(_0x3c1fb2,_0xce279e){return client['request'](_0x3c58ef,_0x26cd55)[_0x258e('0x8')](function(_0x12941c){logger[_0x258e('0x9')](_0x258e('0xa'),_0x224d17,_0x258e('0xb'));logger['debug'](_0x258e('0xc'),_0x224d17,_0x258e('0xb'),JSON[_0x258e('0xd')](_0x12941c));if(_0x12941c[_0x258e('0xe')]){if(_0x12941c['error'][_0x258e('0xf')]===0x1f4){logger[_0x258e('0xe')](_0x258e('0xa'),_0x224d17,_0x12941c[_0x258e('0xe')][_0x258e('0x10')]);return _0xce279e(_0x12941c['error'][_0x258e('0x10')]);}logger[_0x258e('0xe')](_0x258e('0xa'),_0x224d17,_0x12941c['error'][_0x258e('0x10')]);return _0x3c1fb2(_0x12941c[_0x258e('0xe')][_0x258e('0x10')]);}else{logger[_0x258e('0x9')](_0x258e('0xa'),_0x224d17,_0x258e('0xb'));_0x3c1fb2(_0x12941c[_0x258e('0x11')][_0x258e('0x10')]);}})[_0x258e('0x12')](function(_0x28d915){logger['error'](_0x258e('0xa'),_0x224d17,_0x28d915);_0xce279e(_0x28d915);});});}
\ No newline at end of file
+var _0x5e25=['request\x20sent','debug','MailServerOut,\x20%s,\x20%s,\x20%s','stringify','error','MailServerOut,\x20%s,\x20%s','message','result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','info'];(function(_0x42facb,_0xcd5494){var _0x9ea814=function(_0x1e8427){while(--_0x1e8427){_0x42facb['push'](_0x42facb['shift']());}};_0x9ea814(++_0xcd5494);}(_0x5e25,0x152));var _0x55e2=function(_0x377bff,_0x18405e){_0x377bff=_0x377bff-0x0;var _0x18576e=_0x5e25[_0x377bff];return _0x18576e;};'use strict';var _=require(_0x55e2('0x0'));var util=require('util');var moment=require(_0x55e2('0x1'));var BPromise=require(_0x55e2('0x2'));var rs=require(_0x55e2('0x3'));var fs=require('fs');var Redis=require(_0x55e2('0x4'));var db=require(_0x55e2('0x5'))['db'];var utils=require(_0x55e2('0x6'));var logger=require('../../config/logger')(_0x55e2('0x7'));var config=require(_0x55e2('0x8'));var jayson=require(_0x55e2('0x9'));var client=jayson[_0x55e2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4f31fa,_0xd34c10,_0x35a8be){return new BPromise(function(_0x26af4a,_0x586d75){return client[_0x55e2('0xb')](_0x4f31fa,_0x35a8be)[_0x55e2('0xc')](function(_0x5dd12e){logger[_0x55e2('0xd')]('MailServerOut,\x20%s,\x20%s',_0xd34c10,_0x55e2('0xe'));logger[_0x55e2('0xf')](_0x55e2('0x10'),_0xd34c10,'request\x20sent',JSON[_0x55e2('0x11')](_0x5dd12e));if(_0x5dd12e[_0x55e2('0x12')]){if(_0x5dd12e['error']['code']===0x1f4){logger[_0x55e2('0x12')](_0x55e2('0x13'),_0xd34c10,_0x5dd12e[_0x55e2('0x12')][_0x55e2('0x14')]);return _0x586d75(_0x5dd12e[_0x55e2('0x12')][_0x55e2('0x14')]);}logger[_0x55e2('0x12')](_0x55e2('0x13'),_0xd34c10,_0x5dd12e[_0x55e2('0x12')][_0x55e2('0x14')]);return _0x26af4a(_0x5dd12e[_0x55e2('0x12')][_0x55e2('0x14')]);}else{logger[_0x55e2('0xd')](_0x55e2('0x13'),_0xd34c10,'request\x20sent');_0x26af4a(_0x5dd12e[_0x55e2('0x15')][_0x55e2('0x14')]);}})['catch'](function(_0x59b33f){logger['error']('MailServerOut,\x20%s,\x20%s',_0xd34c10,_0x59b33f);_0x586d75(_0x59b33f);});});}
\ No newline at end of file
diff --git a/server/api/mailSubstatus/index.js b/server/api/mailSubstatus/index.js
index 05fc102..78ec0eb 100644
--- a/server/api/mailSubstatus/index.js
+++ b/server/api/mailSubstatus/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0344=['show','post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','../../components/interaction/service','get','isAuthenticated','index','describe','/:id'];(function(_0x382602,_0x5e9d2d){var _0x14dda6=function(_0xf65c39){while(--_0xf65c39){_0x382602['push'](_0x382602['shift']());}};_0x14dda6(++_0x5e9d2d);}(_0x0344,0xc2));var _0x4034=function(_0x139335,_0x4ac389){_0x139335=_0x139335-0x0;var _0x361ea2=_0x0344[_0x139335];return _0x361ea2;};'use strict';var multer=require(_0x4034('0x0'));var util=require(_0x4034('0x1'));var path=require(_0x4034('0x2'));var timeout=require(_0x4034('0x3'));var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x4034('0x4'));var config=require('../../config/environment');var controller=require('./mailSubstatus.controller');router[_0x4034('0x5')]('/',auth[_0x4034('0x6')](),controller[_0x4034('0x7')]);router[_0x4034('0x5')]('/describe',auth[_0x4034('0x6')](),controller[_0x4034('0x8')]);router[_0x4034('0x5')](_0x4034('0x9'),auth[_0x4034('0x6')](),controller[_0x4034('0xa')]);router[_0x4034('0xb')]('/',auth[_0x4034('0x6')](),controller[_0x4034('0xc')]);router[_0x4034('0xd')](_0x4034('0x9'),auth[_0x4034('0x6')](),controller['update']);router[_0x4034('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x4034('0xf')]);module[_0x4034('0x10')]=router;
\ No newline at end of file
+var _0x2ebf=['post','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','get','index','/describe','isAuthenticated','describe','show'];(function(_0x40124e,_0x47920b){var _0x2e8dc2=function(_0x3a6674){while(--_0x3a6674){_0x40124e['push'](_0x40124e['shift']());}};_0x2e8dc2(++_0x47920b);}(_0x2ebf,0x1ac));var _0xf2eb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2ebf[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xf2eb('0x0'));var util=require(_0xf2eb('0x1'));var path=require(_0xf2eb('0x2'));var timeout=require(_0xf2eb('0x3'));var express=require(_0xf2eb('0x4'));var router=express['Router']();var auth=require(_0xf2eb('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xf2eb('0x6'));var controller=require('./mailSubstatus.controller');router[_0xf2eb('0x7')]('/',auth['isAuthenticated'](),controller[_0xf2eb('0x8')]);router[_0xf2eb('0x7')](_0xf2eb('0x9'),auth[_0xf2eb('0xa')](),controller[_0xf2eb('0xb')]);router[_0xf2eb('0x7')]('/:id',auth[_0xf2eb('0xa')](),controller[_0xf2eb('0xc')]);router[_0xf2eb('0xd')]('/',auth[_0xf2eb('0xa')](),controller[_0xf2eb('0xe')]);router[_0xf2eb('0xf')](_0xf2eb('0x10'),auth[_0xf2eb('0xa')](),controller[_0xf2eb('0x11')]);router[_0xf2eb('0x12')](_0xf2eb('0x10'),auth[_0xf2eb('0xa')](),controller[_0xf2eb('0x13')]);module[_0xf2eb('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.attributes.js b/server/api/mailSubstatus/mailSubstatus.attributes.js
index 7c16851..719dff3 100644
--- a/server/api/mailSubstatus/mailSubstatus.attributes.js
+++ b/server/api/mailSubstatus/mailSubstatus.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8a5c=['STRING','name','sequelize','exports'];(function(_0x52ca0d,_0x22b13a){var _0x5be86f=function(_0x60e1b6){while(--_0x60e1b6){_0x52ca0d['push'](_0x52ca0d['shift']());}};_0x5be86f(++_0x22b13a);}(_0x8a5c,0x136));var _0xc8a5=function(_0x26ae28,_0x5b9ff9){_0x26ae28=_0x26ae28-0x0;var _0x28f9d3=_0x8a5c[_0x26ae28];return _0x28f9d3;};'use strict';var Sequelize=require(_0xc8a5('0x0'));module[_0xc8a5('0x1')]={'name':{'type':Sequelize[_0xc8a5('0x2')],'unique':_0xc8a5('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xc8a5('0x2')]}};
\ No newline at end of file
+var _0xb62e=['STRING','name','sequelize','exports'];(function(_0x25e5c9,_0x5c814c){var _0x2ab475=function(_0xea35b9){while(--_0xea35b9){_0x25e5c9['push'](_0x25e5c9['shift']());}};_0x2ab475(++_0x5c814c);}(_0xb62e,0x1de));var _0xeb62=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xb62e[_0x3bf83f];return _0x22c4a9;};'use strict';var Sequelize=require(_0xeb62('0x0'));module[_0xeb62('0x1')]={'name':{'type':Sequelize[_0xeb62('0x2')],'unique':_0xeb62('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.controller.js b/server/api/mailSubstatus/mailSubstatus.controller.js
index 988a8b3..eac31ab 100644
--- a/server/api/mailSubstatus/mailSubstatus.controller.js
+++ b/server/api/mailSubstatus/mailSubstatus.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e8a=['zip-dir','fast-json-patch','bluebird','util','path','sox','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','json','offset','set','Content-Range','save','update','then','destroy','end','error','stack','name','index','MailSubstatus','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','filter','map','key','field','merge','count','includeAll','include','findAll','rows','show','options','find','catch','create','body','params','describe','html-pdf','eml-format','rimraf'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9e8a,0x1ad));var _0xa9e8=function(_0x79d1f1,_0x3ced1b){_0x79d1f1=_0x79d1f1-0x0;var _0x4549e9=_0x9e8a[_0x79d1f1];return _0x4549e9;};'use strict';var pdf=require(_0xa9e8('0x0'));var emlformat=require(_0xa9e8('0x1'));var rimraf=require(_0xa9e8('0x2'));var zipdir=require(_0xa9e8('0x3'));var jsonpatch=require(_0xa9e8('0x4'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xa9e8('0x5'));var Mustache=require('mustache');var util=require(_0xa9e8('0x6'));var path=require(_0xa9e8('0x7'));var sox=require(_0xa9e8('0x8'));var csv=require('to-csv');var ejs=require(_0xa9e8('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa9e8('0xa'));var crypto=require(_0xa9e8('0xb'));var jsforce=require(_0xa9e8('0xc'));var deskjs=require(_0xa9e8('0xd'));var toCsv=require('to-csv');var querystring=require(_0xa9e8('0xe'));var Papa=require(_0xa9e8('0xf'));var Redis=require('ioredis');var authService=require(_0xa9e8('0x10'));var qs=require(_0xa9e8('0x11'));var hardwareService=require(_0xa9e8('0x12'));var logger=require(_0xa9e8('0x13'))(_0xa9e8('0x14'));var utils=require(_0xa9e8('0x15'));var config=require('../../config/environment');var db=require(_0xa9e8('0x16'))['db'];function respondWithStatusCode(_0x5a9710,_0x55c3c2){_0x55c3c2=_0x55c3c2||0xcc;return function(_0x2c78b4){if(_0x2c78b4){return _0x5a9710[_0xa9e8('0x17')](_0x55c3c2);}return _0x5a9710[_0xa9e8('0x18')](_0x55c3c2)['end']();};}function respondWithResult(_0x6d3b74,_0x143dea){_0x143dea=_0x143dea||0xc8;return function(_0x26527b){if(_0x26527b){return _0x6d3b74['status'](_0x143dea)[_0xa9e8('0x19')](_0x26527b);}};}function respondWithFilteredResult(_0x538e30,_0x3a4f34){return function(_0x4b1894){if(_0x4b1894){var _0x39ca77=_0x4b1894['count'],_0x3197f9=_0x3a4f34[_0xa9e8('0x1a')],_0x2066cb=_0x3a4f34[_0xa9e8('0x1a')]+_0x3a4f34['limit'],_0x5a8b7d;if(_0x2066cb>=_0x39ca77){_0x2066cb=_0x39ca77;_0x5a8b7d=0xc8;}else{_0x5a8b7d=0xce;}_0x538e30[_0xa9e8('0x18')](_0x5a8b7d);return _0x538e30[_0xa9e8('0x1b')](_0xa9e8('0x1c'),_0x3197f9+'-'+_0x2066cb+'/'+_0x39ca77)[_0xa9e8('0x19')](_0x4b1894);}return null;};}function patchUpdates(_0xd1ec7e){return function(_0x24570d){try{jsonpatch['apply'](_0x24570d,_0xd1ec7e,!![]);}catch(_0x3d0f12){return BPromise['reject'](_0x3d0f12);}return _0x24570d[_0xa9e8('0x1d')]();};}function saveUpdates(_0x58a007,_0xe7ceae){return function(_0x553d83){if(_0x553d83){return _0x553d83[_0xa9e8('0x1e')](_0x58a007)[_0xa9e8('0x1f')](function(_0x4f390c){return _0x4f390c;});}return null;};}function removeEntity(_0xd55427,_0xa08ba4){return function(_0x4e6d65){if(_0x4e6d65){return _0x4e6d65[_0xa9e8('0x20')]()[_0xa9e8('0x1f')](function(){_0xd55427[_0xa9e8('0x18')](0xcc)[_0xa9e8('0x21')]();});}};}function handleEntityNotFound(_0x5463a2,_0x214a00){return function(_0xd91004){if(!_0xd91004){_0x5463a2[_0xa9e8('0x17')](0x194);}return _0xd91004;};}function handleError(_0x184ded,_0x53705b){_0x53705b=_0x53705b||0x1f4;return function(_0x4c0ce0){logger[_0xa9e8('0x22')](_0x4c0ce0[_0xa9e8('0x23')]);if(_0x4c0ce0[_0xa9e8('0x24')]){delete _0x4c0ce0['name'];}_0x184ded['status'](_0x53705b)['send'](_0x4c0ce0);};}exports[_0xa9e8('0x25')]=function(_0x314feb,_0x461297){var _0x5cebfb={},_0x4d4e8f={},_0x16d718={'count':0x0,'rows':[]};var _0x50f07c=db[_0xa9e8('0x26')][_0xa9e8('0x27')];_0x4d4e8f[_0xa9e8('0x28')]=_[_0xa9e8('0x29')](_0x50f07c);_0x4d4e8f[_0xa9e8('0x2a')]=_['keys'](_0x314feb[_0xa9e8('0x2a')]);_0x4d4e8f[_0xa9e8('0x2b')]=_[_0xa9e8('0x2c')](_0x4d4e8f[_0xa9e8('0x28')],_0x4d4e8f[_0xa9e8('0x2a')]);_0x5cebfb[_0xa9e8('0x2d')]=_['intersection'](_0x4d4e8f['model'],qs[_0xa9e8('0x2e')](_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x2e')]));_0x5cebfb[_0xa9e8('0x2d')]=_0x5cebfb[_0xa9e8('0x2d')][_0xa9e8('0x2f')]?_0x5cebfb[_0xa9e8('0x2d')]:_0x4d4e8f[_0xa9e8('0x28')];if(!_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x30')](_0xa9e8('0x31'))){_0x5cebfb[_0xa9e8('0x32')]=qs[_0xa9e8('0x32')](_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x32')]);_0x5cebfb['offset']=qs[_0xa9e8('0x1a')](_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x1a')]);}_0x5cebfb[_0xa9e8('0x33')]=qs[_0xa9e8('0x34')](_0x314feb['query'][_0xa9e8('0x34')]);_0x5cebfb[_0xa9e8('0x35')]=qs[_0xa9e8('0x2b')](_['pick'](_0x314feb[_0xa9e8('0x2a')],_0x4d4e8f[_0xa9e8('0x2b')]));if(_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x36')]){_0x5cebfb['where']=_['merge'](_0x5cebfb[_0xa9e8('0x35')],{'$or':_[_0xa9e8('0x37')](_0x50f07c,function(_0x2f4fb0){if(_0x2f4fb0['type'][_0xa9e8('0x38')]!=='VIRTUAL'){var _0x5080d8={};_0x5080d8[_0x2f4fb0[_0xa9e8('0x39')]]={'$like':'%'+_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x36')]+'%'};return _0x5080d8;}})});}_0x5cebfb=_[_0xa9e8('0x3a')]({},_0x5cebfb,_0x314feb['options']);var _0xf891aa={'where':_0x5cebfb['where']};return db[_0xa9e8('0x26')][_0xa9e8('0x3b')](_0xf891aa)['then'](function(_0x410d1d){_0x16d718[_0xa9e8('0x3b')]=_0x410d1d;if(_0x314feb[_0xa9e8('0x2a')][_0xa9e8('0x3c')]){_0x5cebfb[_0xa9e8('0x3d')]=[{'all':!![]}];}return db[_0xa9e8('0x26')][_0xa9e8('0x3e')](_0x5cebfb);})[_0xa9e8('0x1f')](function(_0x46c793){_0x16d718[_0xa9e8('0x3f')]=_0x46c793;return _0x16d718;})[_0xa9e8('0x1f')](respondWithFilteredResult(_0x461297,_0x5cebfb))['catch'](handleError(_0x461297,null));};exports[_0xa9e8('0x40')]=function(_0x30763e,_0x3e26b0){var _0x21738b={'raw':!![],'where':{'id':_0x30763e['params']['id']}},_0x3b31d1={};_0x3b31d1[_0xa9e8('0x28')]=_['keys'](db['MailSubstatus'][_0xa9e8('0x27')]);_0x3b31d1['query']=_[_0xa9e8('0x29')](_0x30763e['query']);_0x3b31d1[_0xa9e8('0x2b')]=_[_0xa9e8('0x2c')](_0x3b31d1[_0xa9e8('0x28')],_0x3b31d1['query']);_0x21738b['attributes']=_['intersection'](_0x3b31d1[_0xa9e8('0x28')],qs[_0xa9e8('0x2e')](_0x30763e['query'][_0xa9e8('0x2e')]));_0x21738b[_0xa9e8('0x2d')]=_0x21738b[_0xa9e8('0x2d')][_0xa9e8('0x2f')]?_0x21738b[_0xa9e8('0x2d')]:_0x3b31d1[_0xa9e8('0x28')];if(_0x30763e[_0xa9e8('0x2a')][_0xa9e8('0x3c')]){_0x21738b['include']=[{'all':!![]}];}_0x21738b=_[_0xa9e8('0x3a')]({},_0x21738b,_0x30763e[_0xa9e8('0x41')]);return db[_0xa9e8('0x26')][_0xa9e8('0x42')](_0x21738b)['then'](handleEntityNotFound(_0x3e26b0,null))[_0xa9e8('0x1f')](respondWithResult(_0x3e26b0,null))[_0xa9e8('0x43')](handleError(_0x3e26b0,null));};exports[_0xa9e8('0x44')]=function(_0x9c7030,_0x2fec15){return db[_0xa9e8('0x26')][_0xa9e8('0x44')](_0x9c7030[_0xa9e8('0x45')],{})[_0xa9e8('0x1f')](respondWithResult(_0x2fec15,0xc9))[_0xa9e8('0x43')](handleError(_0x2fec15,null));};exports[_0xa9e8('0x1e')]=function(_0x33880e,_0x395138){if(_0x33880e[_0xa9e8('0x45')]['id']){delete _0x33880e[_0xa9e8('0x45')]['id'];}return db[_0xa9e8('0x26')]['find']({'where':{'id':_0x33880e['params']['id']}})[_0xa9e8('0x1f')](handleEntityNotFound(_0x395138,null))[_0xa9e8('0x1f')](saveUpdates(_0x33880e[_0xa9e8('0x45')],null))[_0xa9e8('0x1f')](respondWithResult(_0x395138,null))[_0xa9e8('0x43')](handleError(_0x395138,null));};exports[_0xa9e8('0x20')]=function(_0x2fe2e2,_0x37e407){return db[_0xa9e8('0x26')][_0xa9e8('0x42')]({'where':{'id':_0x2fe2e2[_0xa9e8('0x46')]['id']}})[_0xa9e8('0x1f')](handleEntityNotFound(_0x37e407,null))[_0xa9e8('0x1f')](removeEntity(_0x37e407,null))[_0xa9e8('0x43')](handleError(_0x37e407,null));};exports[_0xa9e8('0x47')]=function(_0x3f3632,_0x197ffd){return db[_0xa9e8('0x26')][_0xa9e8('0x47')]()['then'](respondWithResult(_0x197ffd,null))['catch'](handleError(_0x197ffd,null));};
\ No newline at end of file
+var _0x643b=['destroy','then','error','stack','name','send','index','rawAttributes','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','type','VIRTUAL','MailSubstatus','include','findAll','rows','catch','show','params','includeAll','options','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x643b,0xbd));var _0xb643=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x643b[_0x4b369d];return _0x571a98;};'use strict';var pdf=require(_0xb643('0x0'));var emlformat=require(_0xb643('0x1'));var rimraf=require(_0xb643('0x2'));var zipdir=require(_0xb643('0x3'));var jsonpatch=require(_0xb643('0x4'));var rp=require(_0xb643('0x5'));var moment=require(_0xb643('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xb643('0x7'));var util=require(_0xb643('0x8'));var path=require('path');var sox=require(_0xb643('0x9'));var csv=require(_0xb643('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xb643('0xb'));var squel=require(_0xb643('0xc'));var crypto=require(_0xb643('0xd'));var jsforce=require(_0xb643('0xe'));var deskjs=require(_0xb643('0xf'));var toCsv=require(_0xb643('0xa'));var querystring=require(_0xb643('0x10'));var Papa=require(_0xb643('0x11'));var Redis=require(_0xb643('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xb643('0x13'));var hardwareService=require(_0xb643('0x14'));var logger=require(_0xb643('0x15'))(_0xb643('0x16'));var utils=require(_0xb643('0x17'));var config=require(_0xb643('0x18'));var db=require(_0xb643('0x19'))['db'];function respondWithStatusCode(_0x413e68,_0x5e6935){_0x5e6935=_0x5e6935||0xcc;return function(_0x3c4128){if(_0x3c4128){return _0x413e68[_0xb643('0x1a')](_0x5e6935);}return _0x413e68[_0xb643('0x1b')](_0x5e6935)[_0xb643('0x1c')]();};}function respondWithResult(_0x1da95a,_0x2d72d0){_0x2d72d0=_0x2d72d0||0xc8;return function(_0x5bed20){if(_0x5bed20){return _0x1da95a[_0xb643('0x1b')](_0x2d72d0)[_0xb643('0x1d')](_0x5bed20);}};}function respondWithFilteredResult(_0x315551,_0x47dbd1){return function(_0x543245){if(_0x543245){var _0x5c260b=_0x543245[_0xb643('0x1e')],_0x11b4be=_0x47dbd1[_0xb643('0x1f')],_0x16462a=_0x47dbd1['offset']+_0x47dbd1[_0xb643('0x20')],_0x579937;if(_0x16462a>=_0x5c260b){_0x16462a=_0x5c260b;_0x579937=0xc8;}else{_0x579937=0xce;}_0x315551[_0xb643('0x1b')](_0x579937);return _0x315551[_0xb643('0x21')](_0xb643('0x22'),_0x11b4be+'-'+_0x16462a+'/'+_0x5c260b)[_0xb643('0x1d')](_0x543245);}return null;};}function patchUpdates(_0x311495){return function(_0x2511a5){try{jsonpatch[_0xb643('0x23')](_0x2511a5,_0x311495,!![]);}catch(_0x23dd16){return BPromise[_0xb643('0x24')](_0x23dd16);}return _0x2511a5[_0xb643('0x25')]();};}function saveUpdates(_0x1812e0,_0x1e46c0){return function(_0x204aaa){if(_0x204aaa){return _0x204aaa[_0xb643('0x26')](_0x1812e0)['then'](function(_0x40bced){return _0x40bced;});}return null;};}function removeEntity(_0x412b43,_0x5d83f7){return function(_0x55b7df){if(_0x55b7df){return _0x55b7df[_0xb643('0x27')]()[_0xb643('0x28')](function(){_0x412b43[_0xb643('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d6ba3,_0x4137e4){return function(_0x461ca5){if(!_0x461ca5){_0x3d6ba3[_0xb643('0x1a')](0x194);}return _0x461ca5;};}function handleError(_0x2c3ddc,_0x16ac29){_0x16ac29=_0x16ac29||0x1f4;return function(_0x48c821){logger[_0xb643('0x29')](_0x48c821[_0xb643('0x2a')]);if(_0x48c821[_0xb643('0x2b')]){delete _0x48c821['name'];}_0x2c3ddc[_0xb643('0x1b')](_0x16ac29)[_0xb643('0x2c')](_0x48c821);};}exports[_0xb643('0x2d')]=function(_0x634bc2,_0x4f3f40){var _0x3cad17={},_0x18b5b1={},_0x34a301={'count':0x0,'rows':[]};var _0x227709=db['MailSubstatus'][_0xb643('0x2e')];_0x18b5b1[_0xb643('0x2f')]=_['keys'](_0x227709);_0x18b5b1[_0xb643('0x30')]=_[_0xb643('0x31')](_0x634bc2['query']);_0x18b5b1[_0xb643('0x32')]=_[_0xb643('0x33')](_0x18b5b1[_0xb643('0x2f')],_0x18b5b1[_0xb643('0x30')]);_0x3cad17['attributes']=_[_0xb643('0x33')](_0x18b5b1[_0xb643('0x2f')],qs[_0xb643('0x34')](_0x634bc2['query']['fields']));_0x3cad17[_0xb643('0x35')]=_0x3cad17[_0xb643('0x35')][_0xb643('0x36')]?_0x3cad17[_0xb643('0x35')]:_0x18b5b1[_0xb643('0x2f')];if(!_0x634bc2[_0xb643('0x30')][_0xb643('0x37')](_0xb643('0x38'))){_0x3cad17['limit']=qs[_0xb643('0x20')](_0x634bc2[_0xb643('0x30')]['limit']);_0x3cad17[_0xb643('0x1f')]=qs[_0xb643('0x1f')](_0x634bc2[_0xb643('0x30')]['offset']);}_0x3cad17['order']=qs[_0xb643('0x39')](_0x634bc2['query']['sort']);_0x3cad17['where']=qs[_0xb643('0x32')](_[_0xb643('0x3a')](_0x634bc2['query'],_0x18b5b1[_0xb643('0x32')]));if(_0x634bc2[_0xb643('0x30')][_0xb643('0x3b')]){_0x3cad17[_0xb643('0x3c')]=_[_0xb643('0x3d')](_0x3cad17[_0xb643('0x3c')],{'$or':_['map'](_0x227709,function(_0x256711){if(_0x256711[_0xb643('0x3e')]['key']!==_0xb643('0x3f')){var _0x3c50fa={};_0x3c50fa[_0x256711['field']]={'$like':'%'+_0x634bc2[_0xb643('0x30')][_0xb643('0x3b')]+'%'};return _0x3c50fa;}})});}_0x3cad17=_[_0xb643('0x3d')]({},_0x3cad17,_0x634bc2['options']);var _0x4385e9={'where':_0x3cad17[_0xb643('0x3c')]};return db[_0xb643('0x40')][_0xb643('0x1e')](_0x4385e9)[_0xb643('0x28')](function(_0x2ff98f){_0x34a301[_0xb643('0x1e')]=_0x2ff98f;if(_0x634bc2[_0xb643('0x30')]['includeAll']){_0x3cad17[_0xb643('0x41')]=[{'all':!![]}];}return db[_0xb643('0x40')][_0xb643('0x42')](_0x3cad17);})[_0xb643('0x28')](function(_0x1c5424){_0x34a301[_0xb643('0x43')]=_0x1c5424;return _0x34a301;})['then'](respondWithFilteredResult(_0x4f3f40,_0x3cad17))[_0xb643('0x44')](handleError(_0x4f3f40,null));};exports[_0xb643('0x45')]=function(_0x50ccf5,_0x323a1a){var _0x4a9e53={'raw':!![],'where':{'id':_0x50ccf5[_0xb643('0x46')]['id']}},_0x50e3bd={};_0x50e3bd[_0xb643('0x2f')]=_[_0xb643('0x31')](db[_0xb643('0x40')][_0xb643('0x2e')]);_0x50e3bd['query']=_[_0xb643('0x31')](_0x50ccf5[_0xb643('0x30')]);_0x50e3bd[_0xb643('0x32')]=_[_0xb643('0x33')](_0x50e3bd[_0xb643('0x2f')],_0x50e3bd[_0xb643('0x30')]);_0x4a9e53[_0xb643('0x35')]=_['intersection'](_0x50e3bd[_0xb643('0x2f')],qs[_0xb643('0x34')](_0x50ccf5[_0xb643('0x30')][_0xb643('0x34')]));_0x4a9e53[_0xb643('0x35')]=_0x4a9e53['attributes'][_0xb643('0x36')]?_0x4a9e53[_0xb643('0x35')]:_0x50e3bd['model'];if(_0x50ccf5['query'][_0xb643('0x47')]){_0x4a9e53[_0xb643('0x41')]=[{'all':!![]}];}_0x4a9e53=_['merge']({},_0x4a9e53,_0x50ccf5[_0xb643('0x48')]);return db['MailSubstatus']['find'](_0x4a9e53)['then'](handleEntityNotFound(_0x323a1a,null))[_0xb643('0x28')](respondWithResult(_0x323a1a,null))[_0xb643('0x44')](handleError(_0x323a1a,null));};exports[_0xb643('0x49')]=function(_0x48d48c,_0x2c193b){return db[_0xb643('0x40')][_0xb643('0x49')](_0x48d48c['body'],{})[_0xb643('0x28')](respondWithResult(_0x2c193b,0xc9))[_0xb643('0x44')](handleError(_0x2c193b,null));};exports[_0xb643('0x26')]=function(_0x26b777,_0x484148){if(_0x26b777[_0xb643('0x4a')]['id']){delete _0x26b777[_0xb643('0x4a')]['id'];}return db[_0xb643('0x40')]['find']({'where':{'id':_0x26b777[_0xb643('0x46')]['id']}})[_0xb643('0x28')](handleEntityNotFound(_0x484148,null))[_0xb643('0x28')](saveUpdates(_0x26b777[_0xb643('0x4a')],null))[_0xb643('0x28')](respondWithResult(_0x484148,null))[_0xb643('0x44')](handleError(_0x484148,null));};exports[_0xb643('0x27')]=function(_0x582452,_0x226c93){return db[_0xb643('0x40')]['find']({'where':{'id':_0x582452[_0xb643('0x46')]['id']}})[_0xb643('0x28')](handleEntityNotFound(_0x226c93,null))['then'](removeEntity(_0x226c93,null))[_0xb643('0x44')](handleError(_0x226c93,null));};exports[_0xb643('0x4b')]=function(_0x56e5ff,_0x3c2009){return db[_0xb643('0x40')]['describe']()[_0xb643('0x28')](respondWithResult(_0x3c2009,null))[_0xb643('0x44')](handleError(_0x3c2009,null));};
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.model.js b/server/api/mailSubstatus/mailSubstatus.model.js
index 3db799d..4a4cc13 100644
--- a/server/api/mailSubstatus/mailSubstatus.model.js
+++ b/server/api/mailSubstatus/mailSubstatus.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8cec=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailSubstatus.attributes','exports','MailSubstatus','mail_substatuses','lodash'];(function(_0x1bdcc6,_0x357cc0){var _0x4abcd9=function(_0x307102){while(--_0x307102){_0x1bdcc6['push'](_0x1bdcc6['shift']());}};_0x4abcd9(++_0x357cc0);}(_0x8cec,0x14f));var _0xc8ce=function(_0xa05ac6,_0x4c0b52){_0xa05ac6=_0xa05ac6-0x0;var _0x56b76e=_0x8cec[_0xa05ac6];return _0x56b76e;};'use strict';var _=require(_0xc8ce('0x0'));var util=require(_0xc8ce('0x1'));var logger=require(_0xc8ce('0x2'))(_0xc8ce('0x3'));var moment=require(_0xc8ce('0x4'));var BPromise=require(_0xc8ce('0x5'));var rp=require(_0xc8ce('0x6'));var fs=require('fs');var path=require(_0xc8ce('0x7'));var rimraf=require(_0xc8ce('0x8'));var config=require(_0xc8ce('0x9'));var attributes=require(_0xc8ce('0xa'));module[_0xc8ce('0xb')]=function(_0x2658b8,_0x4a42fe){return _0x2658b8['define'](_0xc8ce('0xc'),attributes,{'tableName':_0xc8ce('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7e3a=['mail_substatuses','moment','path','rimraf','../../config/environment','exports','define','MailSubstatus'];(function(_0x5dea5e,_0x47689c){var _0xbc20a2=function(_0x22ab16){while(--_0x22ab16){_0x5dea5e['push'](_0x5dea5e['shift']());}};_0xbc20a2(++_0x47689c);}(_0x7e3a,0xc9));var _0xa7e3=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x7e3a[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xa7e3('0x0'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xa7e3('0x1'));var rimraf=require(_0xa7e3('0x2'));var config=require(_0xa7e3('0x3'));var attributes=require('./mailSubstatus.attributes');module[_0xa7e3('0x4')]=function(_0x3fdd48,_0x539744){return _0x3fdd48[_0xa7e3('0x5')](_0xa7e3('0x6'),attributes,{'tableName':_0xa7e3('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.rpc.js b/server/api/mailSubstatus/mailSubstatus.rpc.js
index 2e938a3..cde59cb 100644
--- a/server/api/mailSubstatus/mailSubstatus.rpc.js
+++ b/server/api/mailSubstatus/mailSubstatus.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc8b8=['stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','rpc','../../config/environment','jayson/promise','client','http','then','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x13b592,_0x2cb7a3){var _0x1afcaa=function(_0x2a829c){while(--_0x2a829c){_0x13b592['push'](_0x13b592['shift']());}};_0x1afcaa(++_0x2cb7a3);}(_0xc8b8,0xae));var _0x8c8b=function(_0x4429e0,_0xee6f1f){_0x4429e0=_0x4429e0-0x0;var _0x51a5b3=_0xc8b8[_0x4429e0];return _0x51a5b3;};'use strict';var _=require(_0x8c8b('0x0'));var util=require(_0x8c8b('0x1'));var moment=require(_0x8c8b('0x2'));var BPromise=require(_0x8c8b('0x3'));var rs=require(_0x8c8b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8c8b('0x5'));var config=require(_0x8c8b('0x6'));var jayson=require(_0x8c8b('0x7'));var client=jayson[_0x8c8b('0x8')][_0x8c8b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x432258,_0x51ad1d,_0x5ce23f){return new BPromise(function(_0x4d7b2a,_0x44d5d8){return client['request'](_0x432258,_0x5ce23f)[_0x8c8b('0xa')](function(_0x5b5388){logger[_0x8c8b('0xb')](_0x8c8b('0xc'),_0x51ad1d,_0x8c8b('0xd'));logger[_0x8c8b('0xe')]('MailSubstatus,\x20%s,\x20%s,\x20%s',_0x51ad1d,_0x8c8b('0xd'),JSON[_0x8c8b('0xf')](_0x5b5388));if(_0x5b5388[_0x8c8b('0x10')]){if(_0x5b5388['error'][_0x8c8b('0x11')]===0x1f4){logger[_0x8c8b('0x10')](_0x8c8b('0xc'),_0x51ad1d,_0x5b5388['error'][_0x8c8b('0x12')]);return _0x44d5d8(_0x5b5388[_0x8c8b('0x10')]['message']);}logger[_0x8c8b('0x10')](_0x8c8b('0xc'),_0x51ad1d,_0x5b5388[_0x8c8b('0x10')][_0x8c8b('0x12')]);return _0x4d7b2a(_0x5b5388[_0x8c8b('0x10')][_0x8c8b('0x12')]);}else{logger[_0x8c8b('0xb')](_0x8c8b('0xc'),_0x51ad1d,_0x8c8b('0xd'));_0x4d7b2a(_0x5b5388[_0x8c8b('0x13')][_0x8c8b('0x12')]);}})[_0x8c8b('0x14')](function(_0x29df54){logger[_0x8c8b('0x10')](_0x8c8b('0xc'),_0x51ad1d,_0x29df54);_0x44d5d8(_0x29df54);});});}
\ No newline at end of file
+var _0x4c37=['debug','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','info','MailSubstatus,\x20%s,\x20%s','request\x20sent'];(function(_0x3ea998,_0x29ea59){var _0x2b7559=function(_0x117ca2){while(--_0x117ca2){_0x3ea998['push'](_0x3ea998['shift']());}};_0x2b7559(++_0x29ea59);}(_0x4c37,0x1bd));var _0x74c3=function(_0x226ec4,_0xb0d69d){_0x226ec4=_0x226ec4-0x0;var _0x484e1c=_0x4c37[_0x226ec4];return _0x484e1c;};'use strict';var _=require('lodash');var util=require(_0x74c3('0x0'));var moment=require(_0x74c3('0x1'));var BPromise=require(_0x74c3('0x2'));var rs=require(_0x74c3('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x74c3('0x4'))['db'];var utils=require(_0x74c3('0x5'));var logger=require('../../config/logger')(_0x74c3('0x6'));var config=require(_0x74c3('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x74c3('0x8')][_0x74c3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1eb1cd,_0x359025,_0x2d481e){return new BPromise(function(_0x3baf9c,_0x2fe248){return client[_0x74c3('0xa')](_0x1eb1cd,_0x2d481e)[_0x74c3('0xb')](function(_0x55b4fc){logger[_0x74c3('0xc')](_0x74c3('0xd'),_0x359025,_0x74c3('0xe'));logger[_0x74c3('0xf')](_0x74c3('0x10'),_0x359025,_0x74c3('0xe'),JSON[_0x74c3('0x11')](_0x55b4fc));if(_0x55b4fc[_0x74c3('0x12')]){if(_0x55b4fc['error'][_0x74c3('0x13')]===0x1f4){logger[_0x74c3('0x12')](_0x74c3('0xd'),_0x359025,_0x55b4fc[_0x74c3('0x12')][_0x74c3('0x14')]);return _0x2fe248(_0x55b4fc['error'][_0x74c3('0x14')]);}logger[_0x74c3('0x12')](_0x74c3('0xd'),_0x359025,_0x55b4fc[_0x74c3('0x12')][_0x74c3('0x14')]);return _0x3baf9c(_0x55b4fc[_0x74c3('0x12')][_0x74c3('0x14')]);}else{logger[_0x74c3('0xc')](_0x74c3('0xd'),_0x359025,'request\x20sent');_0x3baf9c(_0x55b4fc[_0x74c3('0x15')][_0x74c3('0x14')]);}})[_0x74c3('0x16')](function(_0xa93572){logger[_0x74c3('0x12')](_0x74c3('0xd'),_0x359025,_0xa93572);_0x2fe248(_0xa93572);});});}
\ No newline at end of file
diff --git a/server/api/mailTransferReport/index.js b/server/api/mailTransferReport/index.js
index 6a015fd..3c2e3c7 100644
--- a/server/api/mailTransferReport/index.js
+++ b/server/api/mailTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6f47=['/:id','show','post','put','delete','destroy','exports','util','path','express','../../components/auth/service','../../config/environment','./mailTransferReport.controller','get','isAuthenticated','/describe'];(function(_0x540575,_0x36eed8){var _0x50049b=function(_0x50d2ac){while(--_0x50d2ac){_0x540575['push'](_0x540575['shift']());}};_0x50049b(++_0x36eed8);}(_0x6f47,0xc7));var _0x76f4=function(_0xa6cc5c,_0x239c99){_0xa6cc5c=_0xa6cc5c-0x0;var _0x44803d=_0x6f47[_0xa6cc5c];return _0x44803d;};'use strict';var multer=require('multer');var util=require(_0x76f4('0x0'));var path=require(_0x76f4('0x1'));var timeout=require('connect-timeout');var express=require(_0x76f4('0x2'));var router=express['Router']();var auth=require(_0x76f4('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x76f4('0x4'));var controller=require(_0x76f4('0x5'));router[_0x76f4('0x6')]('/',auth[_0x76f4('0x7')](),controller['index']);router[_0x76f4('0x6')](_0x76f4('0x8'),auth[_0x76f4('0x7')](),controller['describe']);router[_0x76f4('0x6')](_0x76f4('0x9'),auth[_0x76f4('0x7')](),controller[_0x76f4('0xa')]);router[_0x76f4('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x76f4('0xc')](_0x76f4('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x76f4('0xd')](_0x76f4('0x9'),auth[_0x76f4('0x7')](),controller[_0x76f4('0xe')]);module[_0x76f4('0xf')]=router;
\ No newline at end of file
+var _0x4351=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailTransferReport.controller','get','isAuthenticated','index','/describe','describe','show','post','create','/:id','destroy','multer','util','path'];(function(_0x486f4a,_0x478dc7){var _0x135d99=function(_0x434008){while(--_0x434008){_0x486f4a['push'](_0x486f4a['shift']());}};_0x135d99(++_0x478dc7);}(_0x4351,0x1b5));var _0x1435=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x4351[_0x1ac595];return _0x455fff;};'use strict';var multer=require(_0x1435('0x0'));var util=require(_0x1435('0x1'));var path=require(_0x1435('0x2'));var timeout=require(_0x1435('0x3'));var express=require(_0x1435('0x4'));var router=express[_0x1435('0x5')]();var auth=require(_0x1435('0x6'));var interaction=require(_0x1435('0x7'));var config=require(_0x1435('0x8'));var controller=require(_0x1435('0x9'));router[_0x1435('0xa')]('/',auth[_0x1435('0xb')](),controller[_0x1435('0xc')]);router[_0x1435('0xa')](_0x1435('0xd'),auth['isAuthenticated'](),controller[_0x1435('0xe')]);router['get']('/:id',auth[_0x1435('0xb')](),controller[_0x1435('0xf')]);router[_0x1435('0x10')]('/',auth[_0x1435('0xb')](),controller[_0x1435('0x11')]);router['put'](_0x1435('0x12'),auth[_0x1435('0xb')](),controller['update']);router['delete'](_0x1435('0x12'),auth['isAuthenticated'](),controller[_0x1435('0x13')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.attributes.js b/server/api/mailTransferReport/mailTransferReport.attributes.js
index 0f30a0e..d7d4aa3 100644
--- a/server/api/mailTransferReport/mailTransferReport.attributes.js
+++ b/server/api/mailTransferReport/mailTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac15=['STRING','ENUM','agent','queue','DATE','moment','sequelize'];(function(_0x5b6a58,_0x5a1c4b){var _0xbf39b6=function(_0x168fa9){while(--_0x168fa9){_0x5b6a58['push'](_0x5b6a58['shift']());}};_0xbf39b6(++_0x5a1c4b);}(_0xac15,0x140));var _0x5ac1=function(_0x26356a,_0x2d54ed){_0x26356a=_0x26356a-0x0;var _0x45e9e9=_0xac15[_0x26356a];return _0x45e9e9;};'use strict';var moment=require(_0x5ac1('0x0'));var Sequelize=require(_0x5ac1('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x5ac1('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x5ac1('0x3')]('account',_0x5ac1('0x4'),_0x5ac1('0x5')),'allowNull':![],'defaultValue':_0x5ac1('0x5')},'transferredAt':{'type':Sequelize[_0x5ac1('0x6')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
+var _0xaef3=['moment','STRING','ENUM','account','agent','queue','DATE'];(function(_0xbe200f,_0x4b50eb){var _0x192597=function(_0x106cfd){while(--_0x106cfd){_0xbe200f['push'](_0xbe200f['shift']());}};_0x192597(++_0x4b50eb);}(_0xaef3,0x77));var _0x3aef=function(_0x305486,_0x24acd4){_0x305486=_0x305486-0x0;var _0xa04940=_0xaef3[_0x305486];return _0xa04940;};'use strict';var moment=require(_0x3aef('0x0'));var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize[_0x3aef('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x3aef('0x2')](_0x3aef('0x3'),_0x3aef('0x4'),_0x3aef('0x5')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0x3aef('0x6')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.controller.js b/server/api/mailTransferReport/mailTransferReport.controller.js
index 3d1c29b..1328770 100644
--- a/server/api/mailTransferReport/mailTransferReport.controller.js
+++ b/server/api/mailTransferReport/mailTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6c76=['attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','includeAll','include','rows','catch','show','params','options','find','create','body','describe','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','mustache','util','sox','to-csv','lodash','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','MailTransferReport','rawAttributes','model','keys','query','filters','intersection'];(function(_0x415011,_0x31abf7){var _0x191527=function(_0x5b9ac3){while(--_0x5b9ac3){_0x415011['push'](_0x415011['shift']());}};_0x191527(++_0x31abf7);}(_0x6c76,0x184));var _0x66c7=function(_0x34be03,_0xbf1819){_0x34be03=_0x34be03-0x0;var _0xdea938=_0x6c76[_0x34be03];return _0xdea938;};'use strict';var pdf=require(_0x66c7('0x0'));var emlformat=require(_0x66c7('0x1'));var rimraf=require(_0x66c7('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x66c7('0x3'));var rp=require(_0x66c7('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x66c7('0x5'));var util=require(_0x66c7('0x6'));var path=require('path');var sox=require(_0x66c7('0x7'));var csv=require(_0x66c7('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x66c7('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x66c7('0xa'));var deskjs=require(_0x66c7('0xb'));var toCsv=require(_0x66c7('0x8'));var querystring=require('querystring');var Papa=require(_0x66c7('0xc'));var Redis=require(_0x66c7('0xd'));var authService=require(_0x66c7('0xe'));var qs=require(_0x66c7('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x66c7('0x10'))(_0x66c7('0x11'));var utils=require(_0x66c7('0x12'));var config=require(_0x66c7('0x13'));var db=require(_0x66c7('0x14'))['db'];function respondWithStatusCode(_0x406e41,_0x174717){_0x174717=_0x174717||0xcc;return function(_0x5176a3){if(_0x5176a3){return _0x406e41[_0x66c7('0x15')](_0x174717);}return _0x406e41[_0x66c7('0x16')](_0x174717)[_0x66c7('0x17')]();};}function respondWithResult(_0xea3f56,_0x4f6c91){_0x4f6c91=_0x4f6c91||0xc8;return function(_0x1e91d1){if(_0x1e91d1){return _0xea3f56[_0x66c7('0x16')](_0x4f6c91)[_0x66c7('0x18')](_0x1e91d1);}};}function respondWithFilteredResult(_0x6400fe,_0x5d44e1){return function(_0x110f6d){if(_0x110f6d){var _0x4dd902=_0x110f6d[_0x66c7('0x19')],_0x208010=_0x5d44e1[_0x66c7('0x1a')],_0x39f951=_0x5d44e1['offset']+_0x5d44e1['limit'],_0x3c81c0;if(_0x39f951>=_0x4dd902){_0x39f951=_0x4dd902;_0x3c81c0=0xc8;}else{_0x3c81c0=0xce;}_0x6400fe['status'](_0x3c81c0);return _0x6400fe['set'](_0x66c7('0x1b'),_0x208010+'-'+_0x39f951+'/'+_0x4dd902)[_0x66c7('0x18')](_0x110f6d);}return null;};}function patchUpdates(_0x47a299){return function(_0x524e87){try{jsonpatch[_0x66c7('0x1c')](_0x524e87,_0x47a299,!![]);}catch(_0x9b65cf){return BPromise[_0x66c7('0x1d')](_0x9b65cf);}return _0x524e87[_0x66c7('0x1e')]();};}function saveUpdates(_0x52437d,_0x49a3c7){return function(_0x1853b2){if(_0x1853b2){return _0x1853b2[_0x66c7('0x1f')](_0x52437d)[_0x66c7('0x20')](function(_0x1c43c4){return _0x1c43c4;});}return null;};}function removeEntity(_0x465457,_0x75f118){return function(_0x4804cf){if(_0x4804cf){return _0x4804cf[_0x66c7('0x21')]()[_0x66c7('0x20')](function(){_0x465457['status'](0xcc)[_0x66c7('0x17')]();});}};}function handleEntityNotFound(_0x8b96b1,_0x44bdef){return function(_0x1fc9d3){if(!_0x1fc9d3){_0x8b96b1['sendStatus'](0x194);}return _0x1fc9d3;};}function handleError(_0x2736df,_0x42ca37){_0x42ca37=_0x42ca37||0x1f4;return function(_0x5b28e6){logger[_0x66c7('0x22')](_0x5b28e6[_0x66c7('0x23')]);if(_0x5b28e6[_0x66c7('0x24')]){delete _0x5b28e6[_0x66c7('0x24')];}_0x2736df[_0x66c7('0x16')](_0x42ca37)['send'](_0x5b28e6);};}exports['index']=function(_0x4e514a,_0x2dd131){var _0x542ff1={},_0x5c5e42={},_0x9afd50={'count':0x0,'rows':[]};var _0x3e979d=db[_0x66c7('0x25')][_0x66c7('0x26')];_0x5c5e42[_0x66c7('0x27')]=_[_0x66c7('0x28')](_0x3e979d);_0x5c5e42['query']=_[_0x66c7('0x28')](_0x4e514a[_0x66c7('0x29')]);_0x5c5e42[_0x66c7('0x2a')]=_[_0x66c7('0x2b')](_0x5c5e42[_0x66c7('0x27')],_0x5c5e42['query']);_0x542ff1[_0x66c7('0x2c')]=_['intersection'](_0x5c5e42[_0x66c7('0x27')],qs['fields'](_0x4e514a[_0x66c7('0x29')][_0x66c7('0x2d')]));_0x542ff1[_0x66c7('0x2c')]=_0x542ff1[_0x66c7('0x2c')][_0x66c7('0x2e')]?_0x542ff1[_0x66c7('0x2c')]:_0x5c5e42['model'];if(!_0x4e514a['query'][_0x66c7('0x2f')](_0x66c7('0x30'))){_0x542ff1[_0x66c7('0x31')]=qs[_0x66c7('0x31')](_0x4e514a[_0x66c7('0x29')][_0x66c7('0x31')]);_0x542ff1[_0x66c7('0x1a')]=qs[_0x66c7('0x1a')](_0x4e514a[_0x66c7('0x29')][_0x66c7('0x1a')]);}_0x542ff1[_0x66c7('0x32')]=qs[_0x66c7('0x33')](_0x4e514a['query']['sort']);_0x542ff1[_0x66c7('0x34')]=qs[_0x66c7('0x2a')](_[_0x66c7('0x35')](_0x4e514a[_0x66c7('0x29')],_0x5c5e42[_0x66c7('0x2a')]));if(_0x4e514a[_0x66c7('0x29')][_0x66c7('0x36')]){_0x542ff1['where']=_[_0x66c7('0x37')](_0x542ff1[_0x66c7('0x34')],{'$or':_[_0x66c7('0x38')](_0x3e979d,function(_0xd9e0f5){if(_0xd9e0f5[_0x66c7('0x39')][_0x66c7('0x3a')]!==_0x66c7('0x3b')){var _0x2b3ac1={};_0x2b3ac1[_0xd9e0f5[_0x66c7('0x3c')]]={'$like':'%'+_0x4e514a[_0x66c7('0x29')][_0x66c7('0x36')]+'%'};return _0x2b3ac1;}})});}_0x542ff1=_['merge']({},_0x542ff1,_0x4e514a['options']);var _0x2c422f={'where':_0x542ff1[_0x66c7('0x34')]};return db[_0x66c7('0x25')]['count'](_0x2c422f)['then'](function(_0x2e31b8){_0x9afd50[_0x66c7('0x19')]=_0x2e31b8;if(_0x4e514a['query'][_0x66c7('0x3d')]){_0x542ff1[_0x66c7('0x3e')]=[{'all':!![]}];}return db[_0x66c7('0x25')]['findAll'](_0x542ff1);})[_0x66c7('0x20')](function(_0x16b754){_0x9afd50[_0x66c7('0x3f')]=_0x16b754;return _0x9afd50;})[_0x66c7('0x20')](respondWithFilteredResult(_0x2dd131,_0x542ff1))[_0x66c7('0x40')](handleError(_0x2dd131,null));};exports[_0x66c7('0x41')]=function(_0x21deb3,_0x279d27){var _0x28ffe9={'raw':!![],'where':{'id':_0x21deb3[_0x66c7('0x42')]['id']}},_0x5f34ed={};_0x5f34ed[_0x66c7('0x27')]=_[_0x66c7('0x28')](db[_0x66c7('0x25')][_0x66c7('0x26')]);_0x5f34ed[_0x66c7('0x29')]=_[_0x66c7('0x28')](_0x21deb3[_0x66c7('0x29')]);_0x5f34ed[_0x66c7('0x2a')]=_[_0x66c7('0x2b')](_0x5f34ed['model'],_0x5f34ed['query']);_0x28ffe9['attributes']=_[_0x66c7('0x2b')](_0x5f34ed[_0x66c7('0x27')],qs['fields'](_0x21deb3['query'][_0x66c7('0x2d')]));_0x28ffe9[_0x66c7('0x2c')]=_0x28ffe9[_0x66c7('0x2c')][_0x66c7('0x2e')]?_0x28ffe9[_0x66c7('0x2c')]:_0x5f34ed['model'];if(_0x21deb3[_0x66c7('0x29')]['includeAll']){_0x28ffe9['include']=[{'all':!![]}];}_0x28ffe9=_[_0x66c7('0x37')]({},_0x28ffe9,_0x21deb3[_0x66c7('0x43')]);return db[_0x66c7('0x25')][_0x66c7('0x44')](_0x28ffe9)['then'](handleEntityNotFound(_0x279d27,null))['then'](respondWithResult(_0x279d27,null))[_0x66c7('0x40')](handleError(_0x279d27,null));};exports['create']=function(_0x4e0c89,_0x1ec272){return db[_0x66c7('0x25')][_0x66c7('0x45')](_0x4e0c89[_0x66c7('0x46')],{})['then'](respondWithResult(_0x1ec272,0xc9))[_0x66c7('0x40')](handleError(_0x1ec272,null));};exports[_0x66c7('0x1f')]=function(_0x2c8ffe,_0x4f4590){if(_0x2c8ffe[_0x66c7('0x46')]['id']){delete _0x2c8ffe[_0x66c7('0x46')]['id'];}return db[_0x66c7('0x25')][_0x66c7('0x44')]({'where':{'id':_0x2c8ffe[_0x66c7('0x42')]['id']}})[_0x66c7('0x20')](handleEntityNotFound(_0x4f4590,null))[_0x66c7('0x20')](saveUpdates(_0x2c8ffe[_0x66c7('0x46')],null))['then'](respondWithResult(_0x4f4590,null))[_0x66c7('0x40')](handleError(_0x4f4590,null));};exports[_0x66c7('0x21')]=function(_0x23d0eb,_0x1386a2){return db[_0x66c7('0x25')][_0x66c7('0x44')]({'where':{'id':_0x23d0eb[_0x66c7('0x42')]['id']}})[_0x66c7('0x20')](handleEntityNotFound(_0x1386a2,null))[_0x66c7('0x20')](removeEntity(_0x1386a2,null))[_0x66c7('0x40')](handleError(_0x1386a2,null));};exports[_0x66c7('0x47')]=function(_0x1096e3,_0x5b343a){return db[_0x66c7('0x25')]['describe']()[_0x66c7('0x20')](respondWithResult(_0x5b343a,null))[_0x66c7('0x40')](handleError(_0x5b343a,null));};
\ No newline at end of file
+var _0xda55=['update','destroy','then','error','stack','send','rawAttributes','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','sort','where','pick','filter','merge','map','key','field','options','includeAll','include','MailTransferReport','findAll','rows','catch','show','params','length','find','create','body','describe','html-pdf','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save'];(function(_0x2668c6,_0x4ec566){var _0x34e23f=function(_0x2077e8){while(--_0x2077e8){_0x2668c6['push'](_0x2668c6['shift']());}};_0x34e23f(++_0x4ec566);}(_0xda55,0x6d));var _0x5da5=function(_0x9641f8,_0x5c2372){_0x9641f8=_0x9641f8-0x0;var _0x3881b4=_0xda55[_0x9641f8];return _0x3881b4;};'use strict';var pdf=require(_0x5da5('0x0'));var emlformat=require(_0x5da5('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x5da5('0x2'));var rp=require(_0x5da5('0x3'));var moment=require(_0x5da5('0x4'));var BPromise=require(_0x5da5('0x5'));var Mustache=require(_0x5da5('0x6'));var util=require('util');var path=require(_0x5da5('0x7'));var sox=require('sox');var csv=require(_0x5da5('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x5da5('0x9'));var squel=require(_0x5da5('0xa'));var crypto=require(_0x5da5('0xb'));var jsforce=require(_0x5da5('0xc'));var deskjs=require(_0x5da5('0xd'));var toCsv=require(_0x5da5('0x8'));var querystring=require(_0x5da5('0xe'));var Papa=require(_0x5da5('0xf'));var Redis=require('ioredis');var authService=require(_0x5da5('0x10'));var qs=require(_0x5da5('0x11'));var hardwareService=require(_0x5da5('0x12'));var logger=require(_0x5da5('0x13'))(_0x5da5('0x14'));var utils=require(_0x5da5('0x15'));var config=require(_0x5da5('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2f4e4b,_0x3b5ff9){_0x3b5ff9=_0x3b5ff9||0xcc;return function(_0x4f813b){if(_0x4f813b){return _0x2f4e4b[_0x5da5('0x17')](_0x3b5ff9);}return _0x2f4e4b[_0x5da5('0x18')](_0x3b5ff9)[_0x5da5('0x19')]();};}function respondWithResult(_0x43d526,_0x1877d4){_0x1877d4=_0x1877d4||0xc8;return function(_0x440b8f){if(_0x440b8f){return _0x43d526['status'](_0x1877d4)['json'](_0x440b8f);}};}function respondWithFilteredResult(_0x4fa4b5,_0x4267cd){return function(_0x126fc8){if(_0x126fc8){var _0x13c701=_0x126fc8[_0x5da5('0x1a')],_0x665ce8=_0x4267cd['offset'],_0x11bd3=_0x4267cd[_0x5da5('0x1b')]+_0x4267cd[_0x5da5('0x1c')],_0x134afa;if(_0x11bd3>=_0x13c701){_0x11bd3=_0x13c701;_0x134afa=0xc8;}else{_0x134afa=0xce;}_0x4fa4b5[_0x5da5('0x18')](_0x134afa);return _0x4fa4b5[_0x5da5('0x1d')](_0x5da5('0x1e'),_0x665ce8+'-'+_0x11bd3+'/'+_0x13c701)[_0x5da5('0x1f')](_0x126fc8);}return null;};}function patchUpdates(_0x547c58){return function(_0x1920e2){try{jsonpatch[_0x5da5('0x20')](_0x1920e2,_0x547c58,!![]);}catch(_0x3d3d26){return BPromise[_0x5da5('0x21')](_0x3d3d26);}return _0x1920e2[_0x5da5('0x22')]();};}function saveUpdates(_0x513a34,_0x4393d7){return function(_0x3372fc){if(_0x3372fc){return _0x3372fc[_0x5da5('0x23')](_0x513a34)['then'](function(_0x3e0b28){return _0x3e0b28;});}return null;};}function removeEntity(_0x15aa62,_0x20c8a6){return function(_0x2e68d5){if(_0x2e68d5){return _0x2e68d5[_0x5da5('0x24')]()[_0x5da5('0x25')](function(){_0x15aa62['status'](0xcc)[_0x5da5('0x19')]();});}};}function handleEntityNotFound(_0x568ddf,_0x1b67c4){return function(_0x716ab7){if(!_0x716ab7){_0x568ddf[_0x5da5('0x17')](0x194);}return _0x716ab7;};}function handleError(_0x5d983c,_0x31c6ed){_0x31c6ed=_0x31c6ed||0x1f4;return function(_0x236bf3){logger[_0x5da5('0x26')](_0x236bf3[_0x5da5('0x27')]);if(_0x236bf3['name']){delete _0x236bf3['name'];}_0x5d983c['status'](_0x31c6ed)[_0x5da5('0x28')](_0x236bf3);};}exports['index']=function(_0x4e8890,_0x1f75f3){var _0x3974d8={},_0x5740a7={},_0x1798ae={'count':0x0,'rows':[]};var _0x1ab83e=db['MailTransferReport'][_0x5da5('0x29')];_0x5740a7[_0x5da5('0x2a')]=_[_0x5da5('0x2b')](_0x1ab83e);_0x5740a7[_0x5da5('0x2c')]=_[_0x5da5('0x2b')](_0x4e8890['query']);_0x5740a7[_0x5da5('0x2d')]=_[_0x5da5('0x2e')](_0x5740a7[_0x5da5('0x2a')],_0x5740a7[_0x5da5('0x2c')]);_0x3974d8['attributes']=_['intersection'](_0x5740a7['model'],qs[_0x5da5('0x2f')](_0x4e8890[_0x5da5('0x2c')][_0x5da5('0x2f')]));_0x3974d8[_0x5da5('0x30')]=_0x3974d8['attributes']['length']?_0x3974d8[_0x5da5('0x30')]:_0x5740a7['model'];if(!_0x4e8890['query'][_0x5da5('0x31')]('nolimit')){_0x3974d8[_0x5da5('0x1c')]=qs[_0x5da5('0x1c')](_0x4e8890[_0x5da5('0x2c')][_0x5da5('0x1c')]);_0x3974d8[_0x5da5('0x1b')]=qs[_0x5da5('0x1b')](_0x4e8890[_0x5da5('0x2c')][_0x5da5('0x1b')]);}_0x3974d8['order']=qs[_0x5da5('0x32')](_0x4e8890['query'][_0x5da5('0x32')]);_0x3974d8[_0x5da5('0x33')]=qs[_0x5da5('0x2d')](_[_0x5da5('0x34')](_0x4e8890[_0x5da5('0x2c')],_0x5740a7[_0x5da5('0x2d')]));if(_0x4e8890[_0x5da5('0x2c')][_0x5da5('0x35')]){_0x3974d8[_0x5da5('0x33')]=_[_0x5da5('0x36')](_0x3974d8[_0x5da5('0x33')],{'$or':_[_0x5da5('0x37')](_0x1ab83e,function(_0x3ba804){if(_0x3ba804['type'][_0x5da5('0x38')]!=='VIRTUAL'){var _0x2d6280={};_0x2d6280[_0x3ba804[_0x5da5('0x39')]]={'$like':'%'+_0x4e8890[_0x5da5('0x2c')][_0x5da5('0x35')]+'%'};return _0x2d6280;}})});}_0x3974d8=_['merge']({},_0x3974d8,_0x4e8890[_0x5da5('0x3a')]);var _0x2f2596={'where':_0x3974d8[_0x5da5('0x33')]};return db['MailTransferReport'][_0x5da5('0x1a')](_0x2f2596)[_0x5da5('0x25')](function(_0x4b8464){_0x1798ae[_0x5da5('0x1a')]=_0x4b8464;if(_0x4e8890[_0x5da5('0x2c')][_0x5da5('0x3b')]){_0x3974d8[_0x5da5('0x3c')]=[{'all':!![]}];}return db[_0x5da5('0x3d')][_0x5da5('0x3e')](_0x3974d8);})['then'](function(_0x1ab02){_0x1798ae[_0x5da5('0x3f')]=_0x1ab02;return _0x1798ae;})[_0x5da5('0x25')](respondWithFilteredResult(_0x1f75f3,_0x3974d8))[_0x5da5('0x40')](handleError(_0x1f75f3,null));};exports[_0x5da5('0x41')]=function(_0x53e540,_0x472e9f){var _0x21ffa1={'raw':!![],'where':{'id':_0x53e540[_0x5da5('0x42')]['id']}},_0x5a189e={};_0x5a189e['model']=_['keys'](db[_0x5da5('0x3d')][_0x5da5('0x29')]);_0x5a189e[_0x5da5('0x2c')]=_[_0x5da5('0x2b')](_0x53e540[_0x5da5('0x2c')]);_0x5a189e[_0x5da5('0x2d')]=_[_0x5da5('0x2e')](_0x5a189e[_0x5da5('0x2a')],_0x5a189e[_0x5da5('0x2c')]);_0x21ffa1[_0x5da5('0x30')]=_[_0x5da5('0x2e')](_0x5a189e[_0x5da5('0x2a')],qs[_0x5da5('0x2f')](_0x53e540[_0x5da5('0x2c')][_0x5da5('0x2f')]));_0x21ffa1[_0x5da5('0x30')]=_0x21ffa1[_0x5da5('0x30')][_0x5da5('0x43')]?_0x21ffa1[_0x5da5('0x30')]:_0x5a189e[_0x5da5('0x2a')];if(_0x53e540['query']['includeAll']){_0x21ffa1[_0x5da5('0x3c')]=[{'all':!![]}];}_0x21ffa1=_[_0x5da5('0x36')]({},_0x21ffa1,_0x53e540['options']);return db[_0x5da5('0x3d')][_0x5da5('0x44')](_0x21ffa1)[_0x5da5('0x25')](handleEntityNotFound(_0x472e9f,null))[_0x5da5('0x25')](respondWithResult(_0x472e9f,null))[_0x5da5('0x40')](handleError(_0x472e9f,null));};exports[_0x5da5('0x45')]=function(_0x2775da,_0x362028){return db[_0x5da5('0x3d')][_0x5da5('0x45')](_0x2775da['body'],{})[_0x5da5('0x25')](respondWithResult(_0x362028,0xc9))['catch'](handleError(_0x362028,null));};exports['update']=function(_0x2a0fb6,_0x167bde){if(_0x2a0fb6[_0x5da5('0x46')]['id']){delete _0x2a0fb6[_0x5da5('0x46')]['id'];}return db[_0x5da5('0x3d')][_0x5da5('0x44')]({'where':{'id':_0x2a0fb6['params']['id']}})[_0x5da5('0x25')](handleEntityNotFound(_0x167bde,null))['then'](saveUpdates(_0x2a0fb6['body'],null))[_0x5da5('0x25')](respondWithResult(_0x167bde,null))[_0x5da5('0x40')](handleError(_0x167bde,null));};exports['destroy']=function(_0x419d74,_0x322b08){return db[_0x5da5('0x3d')][_0x5da5('0x44')]({'where':{'id':_0x419d74[_0x5da5('0x42')]['id']}})['then'](handleEntityNotFound(_0x322b08,null))[_0x5da5('0x25')](removeEntity(_0x322b08,null))['catch'](handleError(_0x322b08,null));};exports['describe']=function(_0x361f5f,_0x57eca7){return db[_0x5da5('0x3d')][_0x5da5('0x47')]()[_0x5da5('0x25')](respondWithResult(_0x57eca7,null))[_0x5da5('0x40')](handleError(_0x57eca7,null));};
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.model.js b/server/api/mailTransferReport/mailTransferReport.model.js
index b1107cc..f273054 100644
--- a/server/api/mailTransferReport/mailTransferReport.model.js
+++ b/server/api/mailTransferReport/mailTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfdbd=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./mailTransferReport.attributes','uniqueid','lodash','util'];(function(_0xc8fa2d,_0x2b81b8){var _0x1da1b0=function(_0x519fad){while(--_0x519fad){_0xc8fa2d['push'](_0xc8fa2d['shift']());}};_0x1da1b0(++_0x2b81b8);}(_0xfdbd,0xf0));var _0xdfdb=function(_0x594670,_0x4b9fdd){_0x594670=_0x594670-0x0;var _0x36a5b7=_0xfdbd[_0x594670];return _0x36a5b7;};'use strict';var _=require(_0xdfdb('0x0'));var util=require(_0xdfdb('0x1'));var logger=require(_0xdfdb('0x2'))(_0xdfdb('0x3'));var moment=require(_0xdfdb('0x4'));var BPromise=require(_0xdfdb('0x5'));var rp=require(_0xdfdb('0x6'));var fs=require('fs');var path=require(_0xdfdb('0x7'));var rimraf=require(_0xdfdb('0x8'));var config=require('../../config/environment');var attributes=require(_0xdfdb('0x9'));module['exports']=function(_0x453ef6,_0x41bd5e){return _0x453ef6['define']('MailTransferReport',attributes,{'tableName':'report_mail_transfer','paranoid':![],'indexes':[{'name':_0xdfdb('0xa'),'fields':[_0xdfdb('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x53ec=['path','../../config/environment','./mailTransferReport.attributes','define','MailTransferReport','uniqueid','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x2f7cb2,_0x359014){var _0x3aba69=function(_0x17b85e){while(--_0x17b85e){_0x2f7cb2['push'](_0x2f7cb2['shift']());}};_0x3aba69(++_0x359014);}(_0x53ec,0x192));var _0xc53e=function(_0x2a40b3,_0xe1c253){_0x2a40b3=_0x2a40b3-0x0;var _0x4ac6cb=_0x53ec[_0x2a40b3];return _0x4ac6cb;};'use strict';var _=require(_0xc53e('0x0'));var util=require(_0xc53e('0x1'));var logger=require(_0xc53e('0x2'))(_0xc53e('0x3'));var moment=require(_0xc53e('0x4'));var BPromise=require(_0xc53e('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc53e('0x6'));var rimraf=require('rimraf');var config=require(_0xc53e('0x7'));var attributes=require(_0xc53e('0x8'));module['exports']=function(_0x2f1414,_0x4f989b){return _0x2f1414[_0xc53e('0x9')](_0xc53e('0xa'),attributes,{'tableName':'report_mail_transfer','paranoid':![],'indexes':[{'name':_0xc53e('0xb'),'fields':[_0xc53e('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.rpc.js b/server/api/mailTransferReport/mailTransferReport.rpc.js
index c0f7f66..0120597 100644
--- a/server/api/mailTransferReport/mailTransferReport.rpc.js
+++ b/server/api/mailTransferReport/mailTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb901=['client','http','request','then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x4aad01,_0x47660a){var _0x6923b=function(_0x407469){while(--_0x407469){_0x4aad01['push'](_0x4aad01['shift']());}};_0x6923b(++_0x47660a);}(_0xb901,0x12d));var _0x1b90=function(_0x20e9f6,_0x289e34){_0x20e9f6=_0x20e9f6-0x0;var _0x436892=_0xb901[_0x20e9f6];return _0x436892;};'use strict';var _=require(_0x1b90('0x0'));var util=require(_0x1b90('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x1b90('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1b90('0x3'))['db'];var utils=require(_0x1b90('0x4'));var logger=require(_0x1b90('0x5'))(_0x1b90('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x1b90('0x7')][_0x1b90('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x28713f,_0x249c47,_0x307350){return new BPromise(function(_0x4abab3,_0x5865c1){return client[_0x1b90('0x9')](_0x28713f,_0x307350)[_0x1b90('0xa')](function(_0x131b99){logger[_0x1b90('0xb')](_0x1b90('0xc'),_0x249c47,_0x1b90('0xd'));logger[_0x1b90('0xe')](_0x1b90('0xf'),_0x249c47,'request\x20sent',JSON[_0x1b90('0x10')](_0x131b99));if(_0x131b99[_0x1b90('0x11')]){if(_0x131b99['error'][_0x1b90('0x12')]===0x1f4){logger[_0x1b90('0x11')](_0x1b90('0xc'),_0x249c47,_0x131b99[_0x1b90('0x11')][_0x1b90('0x13')]);return _0x5865c1(_0x131b99[_0x1b90('0x11')][_0x1b90('0x13')]);}logger[_0x1b90('0x11')](_0x1b90('0xc'),_0x249c47,_0x131b99[_0x1b90('0x11')][_0x1b90('0x13')]);return _0x4abab3(_0x131b99[_0x1b90('0x11')][_0x1b90('0x13')]);}else{logger[_0x1b90('0xb')]('MailTransferReport,\x20%s,\x20%s',_0x249c47,_0x1b90('0xd'));_0x4abab3(_0x131b99[_0x1b90('0x14')]['message']);}})[_0x1b90('0x15')](function(_0x26e985){logger[_0x1b90('0x11')]('MailTransferReport,\x20%s,\x20%s',_0x249c47,_0x26e985);_0x5865c1(_0x26e985);});});}
\ No newline at end of file
+var _0x81df=['../../config/logger','../../config/environment','jayson/promise','http','request','then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils'];(function(_0x3c007e,_0x2e6adc){var _0x851f31=function(_0x12bf84){while(--_0x12bf84){_0x3c007e['push'](_0x3c007e['shift']());}};_0x851f31(++_0x2e6adc);}(_0x81df,0x174));var _0xf81d=function(_0x1b6178,_0x292eca){_0x1b6178=_0x1b6178-0x0;var _0x36c5f0=_0x81df[_0x1b6178];return _0x36c5f0;};'use strict';var _=require(_0xf81d('0x0'));var util=require(_0xf81d('0x1'));var moment=require(_0xf81d('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf81d('0x3'));var db=require(_0xf81d('0x4'))['db'];var utils=require(_0xf81d('0x5'));var logger=require(_0xf81d('0x6'))('rpc');var config=require(_0xf81d('0x7'));var jayson=require(_0xf81d('0x8'));var client=jayson['client'][_0xf81d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x314b33,_0x202dfd,_0x851145){return new BPromise(function(_0x17234e,_0x218a44){return client[_0xf81d('0xa')](_0x314b33,_0x851145)[_0xf81d('0xb')](function(_0x239f73){logger[_0xf81d('0xc')](_0xf81d('0xd'),_0x202dfd,_0xf81d('0xe'));logger[_0xf81d('0xf')]('MailTransferReport,\x20%s,\x20%s,\x20%s',_0x202dfd,_0xf81d('0xe'),JSON[_0xf81d('0x10')](_0x239f73));if(_0x239f73['error']){if(_0x239f73['error'][_0xf81d('0x11')]===0x1f4){logger[_0xf81d('0x12')](_0xf81d('0xd'),_0x202dfd,_0x239f73[_0xf81d('0x12')]['message']);return _0x218a44(_0x239f73['error'][_0xf81d('0x13')]);}logger[_0xf81d('0x12')](_0xf81d('0xd'),_0x202dfd,_0x239f73['error']['message']);return _0x17234e(_0x239f73['error'][_0xf81d('0x13')]);}else{logger[_0xf81d('0xc')]('MailTransferReport,\x20%s,\x20%s',_0x202dfd,_0xf81d('0xe'));_0x17234e(_0x239f73['result'][_0xf81d('0x13')]);}})[_0xf81d('0x14')](function(_0xd732cc){logger['error'](_0xf81d('0xd'),_0x202dfd,_0xd732cc);_0x218a44(_0xd732cc);});});}
\ No newline at end of file
diff --git a/server/api/memberReport/index.js b/server/api/memberReport/index.js
index c3def15..dbdb986 100644
--- a/server/api/memberReport/index.js
+++ b/server/api/memberReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6410=['../../config/environment','./memberReport.controller','get','index','/describe','isAuthenticated','describe','show','post','create','put','/:id','update','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x449e4b,_0x12a003){var _0x3723b0=function(_0x2f6978){while(--_0x2f6978){_0x449e4b['push'](_0x449e4b['shift']());}};_0x3723b0(++_0x12a003);}(_0x6410,0x19d));var _0x0641=function(_0x4f41f7,_0x542702){_0x4f41f7=_0x4f41f7-0x0;var _0x4f2535=_0x6410[_0x4f41f7];return _0x4f2535;};'use strict';var multer=require(_0x0641('0x0'));var util=require(_0x0641('0x1'));var path=require(_0x0641('0x2'));var timeout=require(_0x0641('0x3'));var express=require(_0x0641('0x4'));var router=express[_0x0641('0x5')]();var auth=require(_0x0641('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x0641('0x7'));var controller=require(_0x0641('0x8'));router[_0x0641('0x9')]('/',auth['isAuthenticated'](),controller[_0x0641('0xa')]);router['get'](_0x0641('0xb'),auth[_0x0641('0xc')](),controller[_0x0641('0xd')]);router['get']('/:id',auth[_0x0641('0xc')](),controller[_0x0641('0xe')]);router[_0x0641('0xf')]('/',auth[_0x0641('0xc')](),controller[_0x0641('0x10')]);router[_0x0641('0x11')](_0x0641('0x12'),auth[_0x0641('0xc')](),controller[_0x0641('0x13')]);router['delete'](_0x0641('0x12'),auth[_0x0641('0xc')](),controller['destroy']);module[_0x0641('0x14')]=router;
\ No newline at end of file
+var _0x3206=['show','post','create','put','update','delete','destroy','exports','multer','express','Router','../../components/auth/service','../../components/interaction/service','./memberReport.controller','get','index','/describe','isAuthenticated','describe','/:id'];(function(_0x49404d,_0x20bd51){var _0x5a93f0=function(_0xd5d3fc){while(--_0xd5d3fc){_0x49404d['push'](_0x49404d['shift']());}};_0x5a93f0(++_0x20bd51);}(_0x3206,0xa8));var _0x6320=function(_0x58ca7d,_0x27f5ea){_0x58ca7d=_0x58ca7d-0x0;var _0x152c4c=_0x3206[_0x58ca7d];return _0x152c4c;};'use strict';var multer=require(_0x6320('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x6320('0x1'));var router=express[_0x6320('0x2')]();var auth=require(_0x6320('0x3'));var interaction=require(_0x6320('0x4'));var config=require('../../config/environment');var controller=require(_0x6320('0x5'));router[_0x6320('0x6')]('/',auth['isAuthenticated'](),controller[_0x6320('0x7')]);router[_0x6320('0x6')](_0x6320('0x8'),auth[_0x6320('0x9')](),controller[_0x6320('0xa')]);router[_0x6320('0x6')](_0x6320('0xb'),auth['isAuthenticated'](),controller[_0x6320('0xc')]);router[_0x6320('0xd')]('/',auth[_0x6320('0x9')](),controller[_0x6320('0xe')]);router[_0x6320('0xf')]('/:id',auth[_0x6320('0x9')](),controller[_0x6320('0x10')]);router[_0x6320('0x11')](_0x6320('0xb'),auth['isAuthenticated'](),controller[_0x6320('0x12')]);module[_0x6320('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.attributes.js b/server/api/memberReport/memberReport.attributes.js
index 055b963..5ef9e30 100644
--- a/server/api/memberReport/memberReport.attributes.js
+++ b/server/api/memberReport/memberReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x17a0=['talk:[start]','talk:[destination]','talk:[dial\x20string]','talk:[queue]','INTEGER','exports','STRING','DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING','DATE','enterAt','setDataValue','exitAt','duration','talk:[inbound,\x20outbound],\x20pause:[reason]'];(function(_0x1beef3,_0x57c4b8){var _0x5af964=function(_0x36f463){while(--_0x36f463){_0x1beef3['push'](_0x1beef3['shift']());}};_0x5af964(++_0x57c4b8);}(_0x17a0,0x18b));var _0x017a=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x17a0[_0x2dafbe];return _0x58a45a;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module[_0x017a('0x0')]={'channel':{'type':Sequelize[_0x017a('0x1')]},'membername':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0x017a('0x1')]},'type':{'type':Sequelize[_0x017a('0x1')],'defaultValue':_0x017a('0x2'),'comment':_0x017a('0x3')},'duration':{'type':Sequelize['INTEGER']},'enterAt':{'type':Sequelize[_0x017a('0x4')]},'exitAt':{'type':Sequelize[_0x017a('0x4')],'set':function(_0x125a11){var _0x44bed5=moment(_0x125a11);var _0x4626c6=moment(this['getDataValue'](_0x017a('0x5')));var _0x33167d=_0x44bed5['diff'](_0x4626c6,'seconds');this[_0x017a('0x6')](_0x017a('0x7'),_0x125a11);this[_0x017a('0x6')](_0x017a('0x8'),_0x33167d||null);}},'data1':{'type':Sequelize[_0x017a('0x1')],'comment':_0x017a('0x9')},'data2':{'type':Sequelize['STRING'],'comment':_0x017a('0xa')},'data3':{'type':Sequelize[_0x017a('0x1')],'comment':_0x017a('0xb')},'data4':{'type':Sequelize[_0x017a('0x1')],'comment':_0x017a('0xc')},'data5':{'type':Sequelize[_0x017a('0x1')],'comment':_0x017a('0xd')},'role':{'type':Sequelize[_0x017a('0x1')]},'internal':{'type':Sequelize[_0x017a('0xe')]},'uniqueid':{'type':Sequelize[_0x017a('0x1')]}};
\ No newline at end of file
+var _0xdbf4=['STRING','LOGIN,\x20PAUSE,\x20TALKING','DATE','getDataValue','enterAt','setDataValue','exitAt','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[destination]','talk:[dial\x20string]','talk:[queue]','INTEGER','sequelize','moment'];(function(_0x184632,_0x392ed8){var _0x296457=function(_0x53cfff){while(--_0x53cfff){_0x184632['push'](_0x184632['shift']());}};_0x296457(++_0x392ed8);}(_0xdbf4,0x1be));var _0x4dbf=function(_0x557b48,_0x338f2e){_0x557b48=_0x557b48-0x0;var _0x51aad5=_0xdbf4[_0x557b48];return _0x51aad5;};'use strict';var Sequelize=require(_0x4dbf('0x0'));var moment=require(_0x4dbf('0x1'));module['exports']={'channel':{'type':Sequelize[_0x4dbf('0x2')]},'membername':{'type':Sequelize[_0x4dbf('0x2')]},'interface':{'type':Sequelize['STRING']},'type':{'type':Sequelize['STRING'],'defaultValue':'DEFAULT\x20PAUSE','comment':_0x4dbf('0x3')},'duration':{'type':Sequelize['INTEGER']},'enterAt':{'type':Sequelize[_0x4dbf('0x4')]},'exitAt':{'type':Sequelize[_0x4dbf('0x4')],'set':function(_0x1c29cc){var _0x43972b=moment(_0x1c29cc);var _0x13316f=moment(this[_0x4dbf('0x5')](_0x4dbf('0x6')));var _0x4752e5=_0x43972b['diff'](_0x13316f,'seconds');this[_0x4dbf('0x7')](_0x4dbf('0x8'),_0x1c29cc);this[_0x4dbf('0x7')]('duration',_0x4752e5||null);}},'data1':{'type':Sequelize[_0x4dbf('0x2')],'comment':_0x4dbf('0x9')},'data2':{'type':Sequelize[_0x4dbf('0x2')],'comment':'talk:[start]'},'data3':{'type':Sequelize[_0x4dbf('0x2')],'comment':_0x4dbf('0xa')},'data4':{'type':Sequelize[_0x4dbf('0x2')],'comment':_0x4dbf('0xb')},'data5':{'type':Sequelize[_0x4dbf('0x2')],'comment':_0x4dbf('0xc')},'role':{'type':Sequelize[_0x4dbf('0x2')]},'internal':{'type':Sequelize[_0x4dbf('0xd')]},'uniqueid':{'type':Sequelize[_0x4dbf('0x2')]}};
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.controller.js b/server/api/memberReport/memberReport.controller.js
index 50cb9e6..4d8d8c1 100644
--- a/server/api/memberReport/memberReport.controller.js
+++ b/server/api/memberReport/memberReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0a11=['../../mysqldb','status','end','json','offset','set','Content-Range','reject','destroy','sendStatus','stack','name','send','MemberReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','where','filter','merge','map','type','VIRTUAL','field','count','includeAll','include','findAll','then','rows','catch','show','params','options','create','body','update','find','describe','html-pdf','eml-format','rimraf','fast-json-patch','bluebird','mustache','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment'];(function(_0xab2ac1,_0x46df6b){var _0x1ddceb=function(_0x2ce779){while(--_0x2ce779){_0xab2ac1['push'](_0xab2ac1['shift']());}};_0x1ddceb(++_0x46df6b);}(_0x0a11,0x189));var _0x10a1=function(_0x1911ed,_0x4e8c73){_0x1911ed=_0x1911ed-0x0;var _0x11edaa=_0x0a11[_0x1911ed];return _0x11edaa;};'use strict';var pdf=require(_0x10a1('0x0'));var emlformat=require(_0x10a1('0x1'));var rimraf=require(_0x10a1('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x10a1('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x10a1('0x4'));var Mustache=require(_0x10a1('0x5'));var util=require('util');var path=require('path');var sox=require(_0x10a1('0x6'));var csv=require(_0x10a1('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x10a1('0x8'));var squel=require(_0x10a1('0x9'));var crypto=require(_0x10a1('0xa'));var jsforce=require(_0x10a1('0xb'));var deskjs=require(_0x10a1('0xc'));var toCsv=require(_0x10a1('0x7'));var querystring=require(_0x10a1('0xd'));var Papa=require('papaparse');var Redis=require(_0x10a1('0xe'));var authService=require(_0x10a1('0xf'));var qs=require(_0x10a1('0x10'));var hardwareService=require(_0x10a1('0x11'));var logger=require(_0x10a1('0x12'))(_0x10a1('0x13'));var utils=require('../../config/utils');var config=require(_0x10a1('0x14'));var db=require(_0x10a1('0x15'))['db'];function respondWithStatusCode(_0x5a0245,_0x4d6e35){_0x4d6e35=_0x4d6e35||0xcc;return function(_0x2eef6b){if(_0x2eef6b){return _0x5a0245['sendStatus'](_0x4d6e35);}return _0x5a0245[_0x10a1('0x16')](_0x4d6e35)[_0x10a1('0x17')]();};}function respondWithResult(_0x44cd0b,_0x4dcdf9){_0x4dcdf9=_0x4dcdf9||0xc8;return function(_0x509c35){if(_0x509c35){return _0x44cd0b[_0x10a1('0x16')](_0x4dcdf9)[_0x10a1('0x18')](_0x509c35);}};}function respondWithFilteredResult(_0xc5f5fe,_0x1db006){return function(_0x4ff773){if(_0x4ff773){var _0x4e7109=_0x4ff773['count'],_0x4f017f=_0x1db006[_0x10a1('0x19')],_0x33212c=_0x1db006[_0x10a1('0x19')]+_0x1db006['limit'],_0x5452c4;if(_0x33212c>=_0x4e7109){_0x33212c=_0x4e7109;_0x5452c4=0xc8;}else{_0x5452c4=0xce;}_0xc5f5fe['status'](_0x5452c4);return _0xc5f5fe[_0x10a1('0x1a')](_0x10a1('0x1b'),_0x4f017f+'-'+_0x33212c+'/'+_0x4e7109)[_0x10a1('0x18')](_0x4ff773);}return null;};}function patchUpdates(_0x32d59d){return function(_0x12f0cd){try{jsonpatch['apply'](_0x12f0cd,_0x32d59d,!![]);}catch(_0xa821d){return BPromise[_0x10a1('0x1c')](_0xa821d);}return _0x12f0cd['save']();};}function saveUpdates(_0x1e5b31,_0x23db5a){return function(_0x1dfd2e){if(_0x1dfd2e){return _0x1dfd2e['update'](_0x1e5b31)['then'](function(_0xb617a6){return _0xb617a6;});}return null;};}function removeEntity(_0x51e50f,_0x3349ae){return function(_0xc33112){if(_0xc33112){return _0xc33112[_0x10a1('0x1d')]()['then'](function(){_0x51e50f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2d4f1b,_0x343f14){return function(_0x2b2bd9){if(!_0x2b2bd9){_0x2d4f1b[_0x10a1('0x1e')](0x194);}return _0x2b2bd9;};}function handleError(_0x4740bb,_0x58f290){_0x58f290=_0x58f290||0x1f4;return function(_0x3fb75d){logger['error'](_0x3fb75d[_0x10a1('0x1f')]);if(_0x3fb75d[_0x10a1('0x20')]){delete _0x3fb75d[_0x10a1('0x20')];}_0x4740bb[_0x10a1('0x16')](_0x58f290)[_0x10a1('0x21')](_0x3fb75d);};}exports['index']=function(_0x1cf779,_0x58247b){var _0x2fe026={},_0x1e6628={},_0x46ca8f={'count':0x0,'rows':[]};var _0x30d7de=db[_0x10a1('0x22')][_0x10a1('0x23')];_0x1e6628[_0x10a1('0x24')]=_[_0x10a1('0x25')](_0x30d7de);_0x1e6628[_0x10a1('0x26')]=_[_0x10a1('0x25')](_0x1cf779[_0x10a1('0x26')]);_0x1e6628[_0x10a1('0x27')]=_[_0x10a1('0x28')](_0x1e6628[_0x10a1('0x24')],_0x1e6628[_0x10a1('0x26')]);_0x2fe026[_0x10a1('0x29')]=_[_0x10a1('0x28')](_0x1e6628[_0x10a1('0x24')],qs[_0x10a1('0x2a')](_0x1cf779['query'][_0x10a1('0x2a')]));_0x2fe026[_0x10a1('0x29')]=_0x2fe026[_0x10a1('0x29')]['length']?_0x2fe026['attributes']:_0x1e6628['model'];if(!_0x1cf779['query'][_0x10a1('0x2b')](_0x10a1('0x2c'))){_0x2fe026['limit']=qs[_0x10a1('0x2d')](_0x1cf779[_0x10a1('0x26')]['limit']);_0x2fe026[_0x10a1('0x19')]=qs['offset'](_0x1cf779[_0x10a1('0x26')]['offset']);}_0x2fe026[_0x10a1('0x2e')]=qs['sort'](_0x1cf779[_0x10a1('0x26')]['sort']);_0x2fe026[_0x10a1('0x2f')]=qs[_0x10a1('0x27')](_['pick'](_0x1cf779[_0x10a1('0x26')],_0x1e6628['filters']));if(_0x1cf779[_0x10a1('0x26')][_0x10a1('0x30')]){_0x2fe026[_0x10a1('0x2f')]=_[_0x10a1('0x31')](_0x2fe026[_0x10a1('0x2f')],{'$or':_[_0x10a1('0x32')](_0x30d7de,function(_0x43689d){if(_0x43689d[_0x10a1('0x33')]['key']!==_0x10a1('0x34')){var _0x2d702c={};_0x2d702c[_0x43689d[_0x10a1('0x35')]]={'$like':'%'+_0x1cf779[_0x10a1('0x26')][_0x10a1('0x30')]+'%'};return _0x2d702c;}})});}_0x2fe026=_[_0x10a1('0x31')]({},_0x2fe026,_0x1cf779['options']);var _0x2a8118={'where':_0x2fe026[_0x10a1('0x2f')]};return db[_0x10a1('0x22')]['count'](_0x2a8118)['then'](function(_0x3f113a){_0x46ca8f[_0x10a1('0x36')]=_0x3f113a;if(_0x1cf779[_0x10a1('0x26')][_0x10a1('0x37')]){_0x2fe026[_0x10a1('0x38')]=[{'all':!![]}];}return db['MemberReport'][_0x10a1('0x39')](_0x2fe026);})[_0x10a1('0x3a')](function(_0x38aca1){_0x46ca8f[_0x10a1('0x3b')]=_0x38aca1;return _0x46ca8f;})[_0x10a1('0x3a')](respondWithFilteredResult(_0x58247b,_0x2fe026))[_0x10a1('0x3c')](handleError(_0x58247b,null));};exports[_0x10a1('0x3d')]=function(_0x350c4d,_0x4cd6f2){var _0x3ef66c={'raw':!![],'where':{'id':_0x350c4d[_0x10a1('0x3e')]['id']}},_0x2e0bb5={};_0x2e0bb5[_0x10a1('0x24')]=_[_0x10a1('0x25')](db[_0x10a1('0x22')][_0x10a1('0x23')]);_0x2e0bb5[_0x10a1('0x26')]=_['keys'](_0x350c4d[_0x10a1('0x26')]);_0x2e0bb5[_0x10a1('0x27')]=_[_0x10a1('0x28')](_0x2e0bb5['model'],_0x2e0bb5['query']);_0x3ef66c[_0x10a1('0x29')]=_[_0x10a1('0x28')](_0x2e0bb5['model'],qs['fields'](_0x350c4d['query'][_0x10a1('0x2a')]));_0x3ef66c[_0x10a1('0x29')]=_0x3ef66c[_0x10a1('0x29')]['length']?_0x3ef66c[_0x10a1('0x29')]:_0x2e0bb5['model'];if(_0x350c4d[_0x10a1('0x26')][_0x10a1('0x37')]){_0x3ef66c[_0x10a1('0x38')]=[{'all':!![]}];}_0x3ef66c=_[_0x10a1('0x31')]({},_0x3ef66c,_0x350c4d[_0x10a1('0x3f')]);return db[_0x10a1('0x22')]['find'](_0x3ef66c)['then'](handleEntityNotFound(_0x4cd6f2,null))[_0x10a1('0x3a')](respondWithResult(_0x4cd6f2,null))[_0x10a1('0x3c')](handleError(_0x4cd6f2,null));};exports[_0x10a1('0x40')]=function(_0x4476df,_0x85e2c0){return db[_0x10a1('0x22')][_0x10a1('0x40')](_0x4476df[_0x10a1('0x41')],{})[_0x10a1('0x3a')](respondWithResult(_0x85e2c0,0xc9))[_0x10a1('0x3c')](handleError(_0x85e2c0,null));};exports[_0x10a1('0x42')]=function(_0x527bb8,_0x4e14f7){if(_0x527bb8['body']['id']){delete _0x527bb8[_0x10a1('0x41')]['id'];}return db[_0x10a1('0x22')][_0x10a1('0x43')]({'where':{'id':_0x527bb8[_0x10a1('0x3e')]['id']}})['then'](handleEntityNotFound(_0x4e14f7,null))[_0x10a1('0x3a')](saveUpdates(_0x527bb8[_0x10a1('0x41')],null))[_0x10a1('0x3a')](respondWithResult(_0x4e14f7,null))[_0x10a1('0x3c')](handleError(_0x4e14f7,null));};exports[_0x10a1('0x1d')]=function(_0x17d276,_0x54279b){return db[_0x10a1('0x22')][_0x10a1('0x43')]({'where':{'id':_0x17d276['params']['id']}})['then'](handleEntityNotFound(_0x54279b,null))[_0x10a1('0x3a')](removeEntity(_0x54279b,null))[_0x10a1('0x3c')](handleError(_0x54279b,null));};exports[_0x10a1('0x44')]=function(_0x1081a0,_0x4d1075){return db[_0x10a1('0x22')][_0x10a1('0x44')]()[_0x10a1('0x3a')](respondWithResult(_0x4d1075,null))[_0x10a1('0x3c')](handleError(_0x4d1075,null));};
\ No newline at end of file
+var _0x7238=['bluebird','util','path','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','count','offset','limit','set','Content-Range','json','apply','reject','update','then','end','error','name','send','index','query','keys','filters','intersection','attributes','fields','length','model','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','key','VIRTUAL','options','MemberReport','includeAll','include','rows','catch','show','params','rawAttributes','find','create','body','destroy','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment'];(function(_0x119cd8,_0x556b73){var _0x7072a3=function(_0x5908d1){while(--_0x5908d1){_0x119cd8['push'](_0x119cd8['shift']());}};_0x7072a3(++_0x556b73);}(_0x7238,0x8b));var _0x8723=function(_0x41d184,_0x328e05){_0x41d184=_0x41d184-0x0;var _0x4a16df=_0x7238[_0x41d184];return _0x4a16df;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x8723('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8723('0x1'));var jsonpatch=require(_0x8723('0x2'));var rp=require(_0x8723('0x3'));var moment=require(_0x8723('0x4'));var BPromise=require(_0x8723('0x5'));var Mustache=require('mustache');var util=require(_0x8723('0x6'));var path=require(_0x8723('0x7'));var sox=require('sox');var csv=require(_0x8723('0x8'));var ejs=require(_0x8723('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x8723('0xa'));var crypto=require('crypto');var jsforce=require(_0x8723('0xb'));var deskjs=require(_0x8723('0xc'));var toCsv=require(_0x8723('0x8'));var querystring=require(_0x8723('0xd'));var Papa=require(_0x8723('0xe'));var Redis=require(_0x8723('0xf'));var authService=require(_0x8723('0x10'));var qs=require(_0x8723('0x11'));var hardwareService=require(_0x8723('0x12'));var logger=require(_0x8723('0x13'))(_0x8723('0x14'));var utils=require(_0x8723('0x15'));var config=require(_0x8723('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x241f89,_0x4ed485){_0x4ed485=_0x4ed485||0xcc;return function(_0x2941ed){if(_0x2941ed){return _0x241f89[_0x8723('0x17')](_0x4ed485);}return _0x241f89[_0x8723('0x18')](_0x4ed485)['end']();};}function respondWithResult(_0xf32692,_0x3bae3b){_0x3bae3b=_0x3bae3b||0xc8;return function(_0x1d1a07){if(_0x1d1a07){return _0xf32692['status'](_0x3bae3b)['json'](_0x1d1a07);}};}function respondWithFilteredResult(_0xbc4903,_0x32225a){return function(_0x4c9fdb){if(_0x4c9fdb){var _0x48ae11=_0x4c9fdb[_0x8723('0x19')],_0x527260=_0x32225a[_0x8723('0x1a')],_0x441f08=_0x32225a[_0x8723('0x1a')]+_0x32225a[_0x8723('0x1b')],_0x858ef9;if(_0x441f08>=_0x48ae11){_0x441f08=_0x48ae11;_0x858ef9=0xc8;}else{_0x858ef9=0xce;}_0xbc4903[_0x8723('0x18')](_0x858ef9);return _0xbc4903[_0x8723('0x1c')](_0x8723('0x1d'),_0x527260+'-'+_0x441f08+'/'+_0x48ae11)[_0x8723('0x1e')](_0x4c9fdb);}return null;};}function patchUpdates(_0xb99874){return function(_0x24bbac){try{jsonpatch[_0x8723('0x1f')](_0x24bbac,_0xb99874,!![]);}catch(_0x2a9368){return BPromise[_0x8723('0x20')](_0x2a9368);}return _0x24bbac['save']();};}function saveUpdates(_0x2c8294,_0x3700d5){return function(_0x396c93){if(_0x396c93){return _0x396c93[_0x8723('0x21')](_0x2c8294)[_0x8723('0x22')](function(_0x1129e9){return _0x1129e9;});}return null;};}function removeEntity(_0x3b9047,_0x12aa17){return function(_0x58321b){if(_0x58321b){return _0x58321b['destroy']()[_0x8723('0x22')](function(){_0x3b9047[_0x8723('0x18')](0xcc)[_0x8723('0x23')]();});}};}function handleEntityNotFound(_0x4b6622,_0x168635){return function(_0x559690){if(!_0x559690){_0x4b6622[_0x8723('0x17')](0x194);}return _0x559690;};}function handleError(_0x464ead,_0x1be8e4){_0x1be8e4=_0x1be8e4||0x1f4;return function(_0x56f48){logger[_0x8723('0x24')](_0x56f48['stack']);if(_0x56f48[_0x8723('0x25')]){delete _0x56f48['name'];}_0x464ead['status'](_0x1be8e4)[_0x8723('0x26')](_0x56f48);};}exports[_0x8723('0x27')]=function(_0x4ee01c,_0x19023d){var _0x315c59={},_0x3d5041={},_0x4d160b={'count':0x0,'rows':[]};var _0xf81d49=db['MemberReport']['rawAttributes'];_0x3d5041['model']=_['keys'](_0xf81d49);_0x3d5041[_0x8723('0x28')]=_[_0x8723('0x29')](_0x4ee01c[_0x8723('0x28')]);_0x3d5041[_0x8723('0x2a')]=_[_0x8723('0x2b')](_0x3d5041['model'],_0x3d5041['query']);_0x315c59[_0x8723('0x2c')]=_[_0x8723('0x2b')](_0x3d5041['model'],qs['fields'](_0x4ee01c[_0x8723('0x28')][_0x8723('0x2d')]));_0x315c59['attributes']=_0x315c59[_0x8723('0x2c')][_0x8723('0x2e')]?_0x315c59[_0x8723('0x2c')]:_0x3d5041[_0x8723('0x2f')];if(!_0x4ee01c['query'][_0x8723('0x30')](_0x8723('0x31'))){_0x315c59[_0x8723('0x1b')]=qs[_0x8723('0x1b')](_0x4ee01c[_0x8723('0x28')][_0x8723('0x1b')]);_0x315c59[_0x8723('0x1a')]=qs[_0x8723('0x1a')](_0x4ee01c[_0x8723('0x28')]['offset']);}_0x315c59['order']=qs[_0x8723('0x32')](_0x4ee01c[_0x8723('0x28')][_0x8723('0x32')]);_0x315c59[_0x8723('0x33')]=qs[_0x8723('0x2a')](_[_0x8723('0x34')](_0x4ee01c[_0x8723('0x28')],_0x3d5041[_0x8723('0x2a')]));if(_0x4ee01c[_0x8723('0x28')][_0x8723('0x35')]){_0x315c59['where']=_[_0x8723('0x36')](_0x315c59[_0x8723('0x33')],{'$or':_[_0x8723('0x37')](_0xf81d49,function(_0x1e91a6){if(_0x1e91a6['type'][_0x8723('0x38')]!==_0x8723('0x39')){var _0x43dd9e={};_0x43dd9e[_0x1e91a6['field']]={'$like':'%'+_0x4ee01c['query'][_0x8723('0x35')]+'%'};return _0x43dd9e;}})});}_0x315c59=_['merge']({},_0x315c59,_0x4ee01c[_0x8723('0x3a')]);var _0x424aa3={'where':_0x315c59[_0x8723('0x33')]};return db[_0x8723('0x3b')][_0x8723('0x19')](_0x424aa3)[_0x8723('0x22')](function(_0x42af01){_0x4d160b[_0x8723('0x19')]=_0x42af01;if(_0x4ee01c['query'][_0x8723('0x3c')]){_0x315c59[_0x8723('0x3d')]=[{'all':!![]}];}return db['MemberReport']['findAll'](_0x315c59);})['then'](function(_0x501fe7){_0x4d160b[_0x8723('0x3e')]=_0x501fe7;return _0x4d160b;})[_0x8723('0x22')](respondWithFilteredResult(_0x19023d,_0x315c59))[_0x8723('0x3f')](handleError(_0x19023d,null));};exports[_0x8723('0x40')]=function(_0x329778,_0x13c105){var _0x5f3eac={'raw':!![],'where':{'id':_0x329778[_0x8723('0x41')]['id']}},_0x2a5d63={};_0x2a5d63['model']=_[_0x8723('0x29')](db[_0x8723('0x3b')][_0x8723('0x42')]);_0x2a5d63[_0x8723('0x28')]=_[_0x8723('0x29')](_0x329778['query']);_0x2a5d63[_0x8723('0x2a')]=_['intersection'](_0x2a5d63['model'],_0x2a5d63[_0x8723('0x28')]);_0x5f3eac[_0x8723('0x2c')]=_[_0x8723('0x2b')](_0x2a5d63[_0x8723('0x2f')],qs['fields'](_0x329778[_0x8723('0x28')]['fields']));_0x5f3eac[_0x8723('0x2c')]=_0x5f3eac['attributes'][_0x8723('0x2e')]?_0x5f3eac[_0x8723('0x2c')]:_0x2a5d63['model'];if(_0x329778[_0x8723('0x28')]['includeAll']){_0x5f3eac['include']=[{'all':!![]}];}_0x5f3eac=_[_0x8723('0x36')]({},_0x5f3eac,_0x329778['options']);return db['MemberReport'][_0x8723('0x43')](_0x5f3eac)['then'](handleEntityNotFound(_0x13c105,null))[_0x8723('0x22')](respondWithResult(_0x13c105,null))[_0x8723('0x3f')](handleError(_0x13c105,null));};exports[_0x8723('0x44')]=function(_0x568be6,_0x24656f){return db['MemberReport'][_0x8723('0x44')](_0x568be6[_0x8723('0x45')],{})[_0x8723('0x22')](respondWithResult(_0x24656f,0xc9))[_0x8723('0x3f')](handleError(_0x24656f,null));};exports[_0x8723('0x21')]=function(_0x5f179b,_0x397c6b){if(_0x5f179b[_0x8723('0x45')]['id']){delete _0x5f179b['body']['id'];}return db[_0x8723('0x3b')][_0x8723('0x43')]({'where':{'id':_0x5f179b[_0x8723('0x41')]['id']}})['then'](handleEntityNotFound(_0x397c6b,null))[_0x8723('0x22')](saveUpdates(_0x5f179b[_0x8723('0x45')],null))[_0x8723('0x22')](respondWithResult(_0x397c6b,null))[_0x8723('0x3f')](handleError(_0x397c6b,null));};exports[_0x8723('0x46')]=function(_0x434a16,_0x15c3d7){return db['MemberReport'][_0x8723('0x43')]({'where':{'id':_0x434a16[_0x8723('0x41')]['id']}})[_0x8723('0x22')](handleEntityNotFound(_0x15c3d7,null))[_0x8723('0x22')](removeEntity(_0x15c3d7,null))[_0x8723('0x3f')](handleError(_0x15c3d7,null));};exports[_0x8723('0x47')]=function(_0x5580ee,_0x59017a){return db[_0x8723('0x3b')][_0x8723('0x47')]()[_0x8723('0x22')](respondWithResult(_0x59017a,null))[_0x8723('0x3f')](handleError(_0x59017a,null));};
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.model.js b/server/api/memberReport/memberReport.model.js
index 91f2d14..b5abd33 100644
--- a/server/api/memberReport/memberReport.model.js
+++ b/server/api/memberReport/memberReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0ce6=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./memberReport.attributes','exports','MemberReport','membername_interface','membername','interface','lodash','util'];(function(_0x5416b1,_0x139dce){var _0xe8691d=function(_0x5dad7a){while(--_0x5dad7a){_0x5416b1['push'](_0x5416b1['shift']());}};_0xe8691d(++_0x139dce);}(_0x0ce6,0xa3));var _0x60ce=function(_0x3b1bee,_0x246e8f){_0x3b1bee=_0x3b1bee-0x0;var _0x2d7f86=_0x0ce6[_0x3b1bee];return _0x2d7f86;};'use strict';var _=require(_0x60ce('0x0'));var util=require(_0x60ce('0x1'));var logger=require(_0x60ce('0x2'))(_0x60ce('0x3'));var moment=require(_0x60ce('0x4'));var BPromise=require(_0x60ce('0x5'));var rp=require(_0x60ce('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x60ce('0x7'));var config=require(_0x60ce('0x8'));var attributes=require(_0x60ce('0x9'));module[_0x60ce('0xa')]=function(_0x3bbd99,_0x5e566f){return _0x3bbd99['define'](_0x60ce('0xb'),attributes,{'tableName':'report_member','paranoid':![],'indexes':[{'name':_0x60ce('0xc'),'fields':[_0x60ce('0xd'),_0x60ce('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x98e9=['request-promise','path','rimraf','../../config/environment','exports','report_member','membername_interface','lodash','util','api','bluebird'];(function(_0x1170a1,_0x389d8e){var _0x111343=function(_0x25339c){while(--_0x25339c){_0x1170a1['push'](_0x1170a1['shift']());}};_0x111343(++_0x389d8e);}(_0x98e9,0xcd));var _0x998e=function(_0x248f55,_0x98f01d){_0x248f55=_0x248f55-0x0;var _0x18ad43=_0x98e9[_0x248f55];return _0x18ad43;};'use strict';var _=require(_0x998e('0x0'));var util=require(_0x998e('0x1'));var logger=require('../../config/logger')(_0x998e('0x2'));var moment=require('moment');var BPromise=require(_0x998e('0x3'));var rp=require(_0x998e('0x4'));var fs=require('fs');var path=require(_0x998e('0x5'));var rimraf=require(_0x998e('0x6'));var config=require(_0x998e('0x7'));var attributes=require('./memberReport.attributes');module[_0x998e('0x8')]=function(_0x1b684f,_0x1d879f){return _0x1b684f['define']('MemberReport',attributes,{'tableName':_0x998e('0x9'),'paranoid':![],'indexes':[{'name':_0x998e('0xa'),'fields':['membername','interface']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.rpc.js b/server/api/memberReport/memberReport.rpc.js
index a807696..072fdde 100644
--- a/server/api/memberReport/memberReport.rpc.js
+++ b/server/api/memberReport/memberReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x131c=['model','map','include','CreateMemberReport','create','UpdateMemberReport','update','body','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','result','catch','GetMemberReport','MemberReport','findAll','options','raw','where','attributes','limit'];(function(_0x1f09f9,_0x45f83f){var _0x56cc97=function(_0x49fe93){while(--_0x49fe93){_0x1f09f9['push'](_0x1f09f9['shift']());}};_0x56cc97(++_0x45f83f);}(_0x131c,0x170));var _0xc131=function(_0x5d3a60,_0x43279e){_0x5d3a60=_0x5d3a60-0x0;var _0x476919=_0x131c[_0x5d3a60];return _0x476919;};'use strict';var _=require('lodash');var util=require(_0xc131('0x0'));var moment=require(_0xc131('0x1'));var BPromise=require(_0xc131('0x2'));var rs=require(_0xc131('0x3'));var fs=require('fs');var Redis=require(_0xc131('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xc131('0x5'));var logger=require('../../config/logger')(_0xc131('0x6'));var config=require(_0xc131('0x7'));var jayson=require(_0xc131('0x8'));var client=jayson[_0xc131('0x9')][_0xc131('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x29a820,_0x5c29f3,_0xd7ec50){return new BPromise(function(_0x115434,_0x565397){return client[_0xc131('0xb')](_0x29a820,_0xd7ec50)[_0xc131('0xc')](function(_0x3a6c73){logger['info'](_0xc131('0xd'),_0x5c29f3,_0xc131('0xe'));logger[_0xc131('0xf')](_0xc131('0x10'),_0x5c29f3,_0xc131('0xe'),JSON[_0xc131('0x11')](_0x3a6c73));if(_0x3a6c73['error']){if(_0x3a6c73['error'][_0xc131('0x12')]===0x1f4){logger[_0xc131('0x13')](_0xc131('0xd'),_0x5c29f3,_0x3a6c73[_0xc131('0x13')]['message']);return _0x565397(_0x3a6c73[_0xc131('0x13')][_0xc131('0x14')]);}logger[_0xc131('0x13')](_0xc131('0xd'),_0x5c29f3,_0x3a6c73[_0xc131('0x13')][_0xc131('0x14')]);return _0x115434(_0x3a6c73['error'][_0xc131('0x14')]);}else{logger[_0xc131('0x15')]('MemberReport,\x20%s,\x20%s',_0x5c29f3,'request\x20sent');_0x115434(_0x3a6c73[_0xc131('0x16')]['message']);}})[_0xc131('0x17')](function(_0x44f8f3){logger[_0xc131('0x13')]('MemberReport,\x20%s,\x20%s',_0x5c29f3,_0x44f8f3);_0x565397(_0x44f8f3);});});}exports[_0xc131('0x18')]=function(_0x20ffe0){var _0x2b81a0=this;return new Promise(function(_0x2a1b80,_0x3fb7a8){return db[_0xc131('0x19')][_0xc131('0x1a')]({'raw':_0x20ffe0[_0xc131('0x1b')]?_0x20ffe0[_0xc131('0x1b')][_0xc131('0x1c')]===undefined?!![]:![]:!![],'where':_0x20ffe0[_0xc131('0x1b')]?_0x20ffe0['options'][_0xc131('0x1d')]||null:null,'attributes':_0x20ffe0[_0xc131('0x1b')]?_0x20ffe0['options'][_0xc131('0x1e')]||null:null,'limit':_0x20ffe0[_0xc131('0x1b')]?_0x20ffe0[_0xc131('0x1b')][_0xc131('0x1f')]||null:null,'include':_0x20ffe0[_0xc131('0x1b')]?_0x20ffe0[_0xc131('0x1b')]['include']?_['map'](_0x20ffe0[_0xc131('0x1b')]['include'],function(_0xb6035d){return{'model':db[_0xb6035d[_0xc131('0x20')]],'as':_0xb6035d['as'],'attributes':_0xb6035d[_0xc131('0x1e')],'include':_0xb6035d['include']?_[_0xc131('0x21')](_0xb6035d['include'],function(_0x475333){return{'model':db[_0x475333[_0xc131('0x20')]],'as':_0x475333['as'],'attributes':_0x475333[_0xc131('0x1e')],'include':_0x475333['include']?_['map'](_0x475333[_0xc131('0x22')],function(_0x53fc51){return{'model':db[_0x53fc51[_0xc131('0x20')]],'as':_0x53fc51['as'],'attributes':_0x53fc51[_0xc131('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xc131('0xc')](function(_0x31f31e){logger['info'](_0xc131('0x18'),_0x20ffe0);logger[_0xc131('0xf')](_0xc131('0x18'),_0x20ffe0,JSON[_0xc131('0x11')](_0x31f31e));_0x2a1b80(_0x31f31e);})[_0xc131('0x17')](function(_0x2589f6){logger[_0xc131('0x13')](_0xc131('0x18'),_0x2589f6[_0xc131('0x14')],_0x20ffe0);_0x3fb7a8(_0x2b81a0['error'](0x1f4,_0x2589f6['message']));});});};exports[_0xc131('0x23')]=function(_0xbd8cc0){var _0x38689b=this;return new Promise(function(_0x32a999,_0x146fe1){return db[_0xc131('0x19')][_0xc131('0x24')](_0xbd8cc0['body'],{'raw':_0xbd8cc0['options']?_0xbd8cc0['options'][_0xc131('0x1c')]===undefined?!![]:![]:!![]})[_0xc131('0xc')](function(_0x3b067a){logger['info'](_0xc131('0x23'),_0xbd8cc0);logger['debug'](_0xc131('0x23'),_0xbd8cc0,JSON[_0xc131('0x11')](_0x3b067a));_0x32a999(_0x3b067a);})['catch'](function(_0x192b00){logger[_0xc131('0x13')]('CreateMemberReport',_0x192b00[_0xc131('0x14')],_0xbd8cc0);_0x146fe1(_0x38689b[_0xc131('0x13')](0x1f4,_0x192b00[_0xc131('0x14')]));});});};exports[_0xc131('0x25')]=function(_0xef85ff){var _0x10927f=this;return new Promise(function(_0xc4c470,_0x55fde1){return db[_0xc131('0x19')][_0xc131('0x26')](_0xef85ff[_0xc131('0x27')],{'raw':_0xef85ff[_0xc131('0x1b')]?_0xef85ff['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xef85ff[_0xc131('0x1b')]?_0xef85ff['options'][_0xc131('0x1d')]||null:null,'attributes':_0xef85ff[_0xc131('0x1b')]?_0xef85ff[_0xc131('0x1b')][_0xc131('0x1e')]||null:null,'limit':_0xef85ff[_0xc131('0x1b')]?_0xef85ff[_0xc131('0x1b')][_0xc131('0x1f')]||null:null})[_0xc131('0xc')](function(_0x1a853f){logger[_0xc131('0x15')](_0xc131('0x25'),_0xef85ff);logger[_0xc131('0xf')](_0xc131('0x25'),_0xef85ff,JSON[_0xc131('0x11')](_0x1a853f));_0xc4c470(_0x1a853f);})[_0xc131('0x17')](function(_0x24eabc){logger[_0xc131('0x13')](_0xc131('0x25'),_0x24eabc['message'],_0xef85ff);_0x55fde1(_0x10927f['error'](0x1f4,_0x24eabc[_0xc131('0x14')]));});});};
\ No newline at end of file
+var _0xcff7=['options','raw','where','attributes','limit','include','map','model','then','catch','create','body','CreateMemberReport','UpdateMemberReport','update','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','GetMemberReport','MemberReport'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xcff7,0x1a6));var _0x7cff=function(_0x539c6f,_0x3e658e){_0x539c6f=_0x539c6f-0x0;var _0x4fc09d=_0xcff7[_0x539c6f];return _0x4fc09d;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7cff('0x0'));var BPromise=require('bluebird');var rs=require(_0x7cff('0x1'));var fs=require('fs');var Redis=require(_0x7cff('0x2'));var db=require(_0x7cff('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x7cff('0x4'))(_0x7cff('0x5'));var config=require(_0x7cff('0x6'));var jayson=require(_0x7cff('0x7'));var client=jayson[_0x7cff('0x8')][_0x7cff('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x427acc,_0x54758a,_0xc14cf1){return new BPromise(function(_0x4f5bf1,_0x31a3c0){return client[_0x7cff('0xa')](_0x427acc,_0xc14cf1)['then'](function(_0x8d96e2){logger[_0x7cff('0xb')](_0x7cff('0xc'),_0x54758a,_0x7cff('0xd'));logger[_0x7cff('0xe')]('MemberReport,\x20%s,\x20%s,\x20%s',_0x54758a,'request\x20sent',JSON[_0x7cff('0xf')](_0x8d96e2));if(_0x8d96e2['error']){if(_0x8d96e2[_0x7cff('0x10')][_0x7cff('0x11')]===0x1f4){logger[_0x7cff('0x10')]('MemberReport,\x20%s,\x20%s',_0x54758a,_0x8d96e2[_0x7cff('0x10')][_0x7cff('0x12')]);return _0x31a3c0(_0x8d96e2[_0x7cff('0x10')]['message']);}logger[_0x7cff('0x10')](_0x7cff('0xc'),_0x54758a,_0x8d96e2[_0x7cff('0x10')][_0x7cff('0x12')]);return _0x4f5bf1(_0x8d96e2['error'][_0x7cff('0x12')]);}else{logger[_0x7cff('0xb')]('MemberReport,\x20%s,\x20%s',_0x54758a,_0x7cff('0xd'));_0x4f5bf1(_0x8d96e2[_0x7cff('0x13')]['message']);}})['catch'](function(_0x8adaaf){logger[_0x7cff('0x10')](_0x7cff('0xc'),_0x54758a,_0x8adaaf);_0x31a3c0(_0x8adaaf);});});}exports[_0x7cff('0x14')]=function(_0x21eede){var _0x41cc12=this;return new Promise(function(_0xda3e47,_0x56e92d){return db[_0x7cff('0x15')]['findAll']({'raw':_0x21eede[_0x7cff('0x16')]?_0x21eede[_0x7cff('0x16')][_0x7cff('0x17')]===undefined?!![]:![]:!![],'where':_0x21eede[_0x7cff('0x16')]?_0x21eede[_0x7cff('0x16')][_0x7cff('0x18')]||null:null,'attributes':_0x21eede[_0x7cff('0x16')]?_0x21eede[_0x7cff('0x16')][_0x7cff('0x19')]||null:null,'limit':_0x21eede[_0x7cff('0x16')]?_0x21eede[_0x7cff('0x16')][_0x7cff('0x1a')]||null:null,'include':_0x21eede[_0x7cff('0x16')]?_0x21eede[_0x7cff('0x16')][_0x7cff('0x1b')]?_[_0x7cff('0x1c')](_0x21eede[_0x7cff('0x16')]['include'],function(_0x1213a9){return{'model':db[_0x1213a9['model']],'as':_0x1213a9['as'],'attributes':_0x1213a9[_0x7cff('0x19')],'include':_0x1213a9['include']?_[_0x7cff('0x1c')](_0x1213a9[_0x7cff('0x1b')],function(_0x38a8c){return{'model':db[_0x38a8c[_0x7cff('0x1d')]],'as':_0x38a8c['as'],'attributes':_0x38a8c[_0x7cff('0x19')],'include':_0x38a8c[_0x7cff('0x1b')]?_[_0x7cff('0x1c')](_0x38a8c[_0x7cff('0x1b')],function(_0x2a8242){return{'model':db[_0x2a8242[_0x7cff('0x1d')]],'as':_0x2a8242['as'],'attributes':_0x2a8242[_0x7cff('0x19')]};}):[]};}):[]};}):[]:[]})[_0x7cff('0x1e')](function(_0x26a78e){logger[_0x7cff('0xb')](_0x7cff('0x14'),_0x21eede);logger[_0x7cff('0xe')](_0x7cff('0x14'),_0x21eede,JSON[_0x7cff('0xf')](_0x26a78e));_0xda3e47(_0x26a78e);})[_0x7cff('0x1f')](function(_0x4bd728){logger[_0x7cff('0x10')](_0x7cff('0x14'),_0x4bd728[_0x7cff('0x12')],_0x21eede);_0x56e92d(_0x41cc12[_0x7cff('0x10')](0x1f4,_0x4bd728['message']));});});};exports['CreateMemberReport']=function(_0xd983e1){var _0x4138d8=this;return new Promise(function(_0x2bcd80,_0x28ab7d){return db['MemberReport'][_0x7cff('0x20')](_0xd983e1[_0x7cff('0x21')],{'raw':_0xd983e1[_0x7cff('0x16')]?_0xd983e1[_0x7cff('0x16')][_0x7cff('0x17')]===undefined?!![]:![]:!![]})[_0x7cff('0x1e')](function(_0x3e1ab9){logger['info']('CreateMemberReport',_0xd983e1);logger['debug'](_0x7cff('0x22'),_0xd983e1,JSON[_0x7cff('0xf')](_0x3e1ab9));_0x2bcd80(_0x3e1ab9);})[_0x7cff('0x1f')](function(_0xa4dd87){logger['error']('CreateMemberReport',_0xa4dd87[_0x7cff('0x12')],_0xd983e1);_0x28ab7d(_0x4138d8[_0x7cff('0x10')](0x1f4,_0xa4dd87[_0x7cff('0x12')]));});});};exports[_0x7cff('0x23')]=function(_0xf63f20){var _0x2a8718=this;return new Promise(function(_0x2be2f8,_0x2f0fc6){return db[_0x7cff('0x15')][_0x7cff('0x24')](_0xf63f20[_0x7cff('0x21')],{'raw':_0xf63f20[_0x7cff('0x16')]?_0xf63f20['options'][_0x7cff('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf63f20[_0x7cff('0x16')]?_0xf63f20[_0x7cff('0x16')][_0x7cff('0x18')]||null:null,'attributes':_0xf63f20[_0x7cff('0x16')]?_0xf63f20['options'][_0x7cff('0x19')]||null:null,'limit':_0xf63f20['options']?_0xf63f20['options'][_0x7cff('0x1a')]||null:null})[_0x7cff('0x1e')](function(_0x153eb3){logger['info'](_0x7cff('0x23'),_0xf63f20);logger['debug'](_0x7cff('0x23'),_0xf63f20,JSON[_0x7cff('0xf')](_0x153eb3));_0x2be2f8(_0x153eb3);})['catch'](function(_0x34fd36){logger['error'](_0x7cff('0x23'),_0x34fd36['message'],_0xf63f20);_0x2f0fc6(_0x2a8718['error'](0x1f4,_0x34fd36[_0x7cff('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/migration/index.js b/server/api/migration/index.js
index df9f412..91763e1 100644
--- a/server/api/migration/index.js
+++ b/server/api/migration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe423=['./migration.controller','index','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0xf34895,_0x21fb70){var _0x143f44=function(_0x2e7730){while(--_0x2e7730){_0xf34895['push'](_0xf34895['shift']());}};_0x143f44(++_0x21fb70);}(_0xe423,0x7b));var _0x3e42=function(_0x4a33b2,_0x248e01){_0x4a33b2=_0x4a33b2-0x0;var _0x470946=_0xe423[_0x4a33b2];return _0x470946;};'use strict';var multer=require(_0x3e42('0x0'));var util=require(_0x3e42('0x1'));var path=require(_0x3e42('0x2'));var timeout=require('connect-timeout');var express=require(_0x3e42('0x3'));var router=express['Router']();var auth=require(_0x3e42('0x4'));var interaction=require(_0x3e42('0x5'));var config=require(_0x3e42('0x6'));var controller=require(_0x3e42('0x7'));router['get']('/',controller[_0x3e42('0x8')]);module[_0x3e42('0x9')]=router;
\ No newline at end of file
+var _0x3fcc=['util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./migration.controller','get','index','exports','multer'];(function(_0x281d80,_0xa7bec2){var _0x35c8eb=function(_0x1195c7){while(--_0x1195c7){_0x281d80['push'](_0x281d80['shift']());}};_0x35c8eb(++_0xa7bec2);}(_0x3fcc,0x83));var _0xc3fc=function(_0x2f18cb,_0x4e14ed){_0x2f18cb=_0x2f18cb-0x0;var _0x1408a3=_0x3fcc[_0x2f18cb];return _0x1408a3;};'use strict';var multer=require(_0xc3fc('0x0'));var util=require(_0xc3fc('0x1'));var path=require('path');var timeout=require(_0xc3fc('0x2'));var express=require(_0xc3fc('0x3'));var router=express['Router']();var auth=require(_0xc3fc('0x4'));var interaction=require(_0xc3fc('0x5'));var config=require(_0xc3fc('0x6'));var controller=require(_0xc3fc('0x7'));router[_0xc3fc('0x8')]('/',controller[_0xc3fc('0x9')]);module[_0xc3fc('0xa')]=router;
\ No newline at end of file
diff --git a/server/api/migration/migration.attributes.js b/server/api/migration/migration.attributes.js
index 447dedc..c548906 100644
--- a/server/api/migration/migration.attributes.js
+++ b/server/api/migration/migration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b6b=['version','sequelize','exports'];(function(_0x1d426f,_0x37e919){var _0x17f71a=function(_0x3bf60c){while(--_0x3bf60c){_0x1d426f['push'](_0x1d426f['shift']());}};_0x17f71a(++_0x37e919);}(_0x2b6b,0x1c6));var _0xb2b6=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x2b6b[_0x5b644e];return _0x49c6bf;};'use strict';var Sequelize=require(_0xb2b6('0x0'));module[_0xb2b6('0x1')]={'version':{'type':Sequelize['STRING'],'unique':_0xb2b6('0x2')}};
\ No newline at end of file
+var _0xbf27=['version'];(function(_0x62c958,_0x2bfdbc){var _0x57ec61=function(_0x5c0094){while(--_0x5c0094){_0x62c958['push'](_0x62c958['shift']());}};_0x57ec61(++_0x2bfdbc);}(_0xbf27,0xe4));var _0x7bf2=function(_0x5bb1c1,_0x3add78){_0x5bb1c1=_0x5bb1c1-0x0;var _0x5dbcf7=_0xbf27[_0x5bb1c1];return _0x5dbcf7;};'use strict';var Sequelize=require('sequelize');module['exports']={'version':{'type':Sequelize['STRING'],'unique':_0x7bf2('0x0')}};
\ No newline at end of file
diff --git a/server/api/migration/migration.controller.js b/server/api/migration/migration.controller.js
index 6b6ea41..7197850 100644
--- a/server/api/migration/migration.controller.js
+++ b/server/api/migration/migration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1f73=['filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','map','type','key','VIRTUAL','field','merge','options','Migration','count','includeAll','include','findAll','rows','catch','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','lodash','squel','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','apply','reject','save','update','then','destroy','error','stack','send','rawAttributes','model','keys','query'];(function(_0x2ba52e,_0xb094a4){var _0x32df40=function(_0x405eaa){while(--_0x405eaa){_0x2ba52e['push'](_0x2ba52e['shift']());}};_0x32df40(++_0xb094a4);}(_0x1f73,0x127));var _0x31f7=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x1f73[_0x321bb2];return _0x9c12ed;};'use strict';var pdf=require(_0x31f7('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x31f7('0x1'));var zipdir=require(_0x31f7('0x2'));var jsonpatch=require(_0x31f7('0x3'));var rp=require(_0x31f7('0x4'));var moment=require(_0x31f7('0x5'));var BPromise=require(_0x31f7('0x6'));var Mustache=require(_0x31f7('0x7'));var util=require(_0x31f7('0x8'));var path=require(_0x31f7('0x9'));var sox=require(_0x31f7('0xa'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x31f7('0xb'));var squel=require(_0x31f7('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x31f7('0xd'));var toCsv=require(_0x31f7('0xe'));var querystring=require(_0x31f7('0xf'));var Papa=require(_0x31f7('0x10'));var Redis=require('ioredis');var authService=require(_0x31f7('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0x31f7('0x12'))('api');var utils=require(_0x31f7('0x13'));var config=require(_0x31f7('0x14'));var db=require(_0x31f7('0x15'))['db'];function respondWithStatusCode(_0x1357e8,_0x51b44a){_0x51b44a=_0x51b44a||0xcc;return function(_0x5a58eb){if(_0x5a58eb){return _0x1357e8[_0x31f7('0x16')](_0x51b44a);}return _0x1357e8['status'](_0x51b44a)[_0x31f7('0x17')]();};}function respondWithResult(_0x494e56,_0x1bd088){_0x1bd088=_0x1bd088||0xc8;return function(_0x38b5aa){if(_0x38b5aa){return _0x494e56[_0x31f7('0x18')](_0x1bd088)[_0x31f7('0x19')](_0x38b5aa);}};}function respondWithFilteredResult(_0x28adbf,_0x43981d){return function(_0x5258a7){if(_0x5258a7){var _0x32c7fb=_0x5258a7['count'],_0x278060=_0x43981d[_0x31f7('0x1a')],_0x1be7d3=_0x43981d[_0x31f7('0x1a')]+_0x43981d['limit'],_0x8fcd33;if(_0x1be7d3>=_0x32c7fb){_0x1be7d3=_0x32c7fb;_0x8fcd33=0xc8;}else{_0x8fcd33=0xce;}_0x28adbf[_0x31f7('0x18')](_0x8fcd33);return _0x28adbf['set']('Content-Range',_0x278060+'-'+_0x1be7d3+'/'+_0x32c7fb)[_0x31f7('0x19')](_0x5258a7);}return null;};}function patchUpdates(_0x197277){return function(_0xe33033){try{jsonpatch[_0x31f7('0x1b')](_0xe33033,_0x197277,!![]);}catch(_0x428439){return BPromise[_0x31f7('0x1c')](_0x428439);}return _0xe33033[_0x31f7('0x1d')]();};}function saveUpdates(_0x1a97f7,_0x387597){return function(_0x2e06ac){if(_0x2e06ac){return _0x2e06ac[_0x31f7('0x1e')](_0x1a97f7)[_0x31f7('0x1f')](function(_0x3c82b5){return _0x3c82b5;});}return null;};}function removeEntity(_0x223579,_0x3f7744){return function(_0x3eaf00){if(_0x3eaf00){return _0x3eaf00[_0x31f7('0x20')]()[_0x31f7('0x1f')](function(){_0x223579[_0x31f7('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2fc1bf,_0xbaf6df){return function(_0x2b5d0a){if(!_0x2b5d0a){_0x2fc1bf[_0x31f7('0x16')](0x194);}return _0x2b5d0a;};}function handleError(_0x3f8423,_0x27329d){_0x27329d=_0x27329d||0x1f4;return function(_0x5281b9){logger[_0x31f7('0x21')](_0x5281b9[_0x31f7('0x22')]);if(_0x5281b9['name']){delete _0x5281b9['name'];}_0x3f8423[_0x31f7('0x18')](_0x27329d)[_0x31f7('0x23')](_0x5281b9);};}exports['index']=function(_0xba8e8d,_0x203c81){var _0xf02c1d={},_0x59c963={},_0x51aa26={'count':0x0,'rows':[]};var _0x37f36c=db['Migration'][_0x31f7('0x24')];_0x59c963[_0x31f7('0x25')]=_[_0x31f7('0x26')](_0x37f36c);_0x59c963[_0x31f7('0x27')]=_['keys'](_0xba8e8d[_0x31f7('0x27')]);_0x59c963[_0x31f7('0x28')]=_[_0x31f7('0x29')](_0x59c963[_0x31f7('0x25')],_0x59c963[_0x31f7('0x27')]);_0xf02c1d[_0x31f7('0x2a')]=_[_0x31f7('0x29')](_0x59c963[_0x31f7('0x25')],qs['fields'](_0xba8e8d[_0x31f7('0x27')][_0x31f7('0x2b')]));_0xf02c1d[_0x31f7('0x2a')]=_0xf02c1d['attributes'][_0x31f7('0x2c')]?_0xf02c1d[_0x31f7('0x2a')]:_0x59c963[_0x31f7('0x25')];if(!_0xba8e8d['query'][_0x31f7('0x2d')](_0x31f7('0x2e'))){_0xf02c1d[_0x31f7('0x2f')]=qs[_0x31f7('0x2f')](_0xba8e8d[_0x31f7('0x27')][_0x31f7('0x2f')]);_0xf02c1d[_0x31f7('0x1a')]=qs[_0x31f7('0x1a')](_0xba8e8d['query'][_0x31f7('0x1a')]);}_0xf02c1d[_0x31f7('0x30')]=qs[_0x31f7('0x31')](_0xba8e8d[_0x31f7('0x27')]['sort']);_0xf02c1d[_0x31f7('0x32')]=qs[_0x31f7('0x28')](_[_0x31f7('0x33')](_0xba8e8d[_0x31f7('0x27')],_0x59c963[_0x31f7('0x28')]));if(_0xba8e8d['query'][_0x31f7('0x34')]){_0xf02c1d[_0x31f7('0x32')]=_['merge'](_0xf02c1d[_0x31f7('0x32')],{'$or':_[_0x31f7('0x35')](_0x37f36c,function(_0x3b2787){if(_0x3b2787[_0x31f7('0x36')][_0x31f7('0x37')]!==_0x31f7('0x38')){var _0x3b81b9={};_0x3b81b9[_0x3b2787[_0x31f7('0x39')]]={'$like':'%'+_0xba8e8d['query'][_0x31f7('0x34')]+'%'};return _0x3b81b9;}})});}_0xf02c1d=_[_0x31f7('0x3a')]({},_0xf02c1d,_0xba8e8d[_0x31f7('0x3b')]);var _0x574c13={'where':_0xf02c1d[_0x31f7('0x32')]};return db[_0x31f7('0x3c')][_0x31f7('0x3d')](_0x574c13)[_0x31f7('0x1f')](function(_0x43c384){_0x51aa26[_0x31f7('0x3d')]=_0x43c384;if(_0xba8e8d[_0x31f7('0x27')][_0x31f7('0x3e')]){_0xf02c1d[_0x31f7('0x3f')]=[{'all':!![]}];}return db['Migration'][_0x31f7('0x40')](_0xf02c1d);})[_0x31f7('0x1f')](function(_0x48f606){_0x51aa26[_0x31f7('0x41')]=_0x48f606;return _0x51aa26;})[_0x31f7('0x1f')](respondWithFilteredResult(_0x203c81,_0xf02c1d))[_0x31f7('0x42')](handleError(_0x203c81,null));};
\ No newline at end of file
+var _0x5c67=['VIRTUAL','field','filter','includeAll','include','findAll','rows','catch','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','Migration','rawAttributes','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','map','type','key'];(function(_0x1dc29a,_0x1b2913){var _0x2bb784=function(_0x42334f){while(--_0x42334f){_0x1dc29a['push'](_0x1dc29a['shift']());}};_0x2bb784(++_0x1b2913);}(_0x5c67,0x1a6));var _0x75c6=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x5c67[_0x5b644e];return _0x49c6bf;};'use strict';var pdf=require(_0x75c6('0x0'));var emlformat=require(_0x75c6('0x1'));var rimraf=require(_0x75c6('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x75c6('0x3'));var rp=require(_0x75c6('0x4'));var moment=require(_0x75c6('0x5'));var BPromise=require(_0x75c6('0x6'));var Mustache=require(_0x75c6('0x7'));var util=require(_0x75c6('0x8'));var path=require(_0x75c6('0x9'));var sox=require('sox');var csv=require(_0x75c6('0xa'));var ejs=require(_0x75c6('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x75c6('0xc'));var crypto=require(_0x75c6('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x75c6('0xe'));var toCsv=require(_0x75c6('0xa'));var querystring=require(_0x75c6('0xf'));var Papa=require(_0x75c6('0x10'));var Redis=require('ioredis');var authService=require(_0x75c6('0x11'));var qs=require(_0x75c6('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x75c6('0x13'))('api');var utils=require(_0x75c6('0x14'));var config=require(_0x75c6('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x19f55f,_0x504ea5){_0x504ea5=_0x504ea5||0xcc;return function(_0x245f0c){if(_0x245f0c){return _0x19f55f[_0x75c6('0x16')](_0x504ea5);}return _0x19f55f[_0x75c6('0x17')](_0x504ea5)[_0x75c6('0x18')]();};}function respondWithResult(_0x46447d,_0x29dc5a){_0x29dc5a=_0x29dc5a||0xc8;return function(_0x358ed5){if(_0x358ed5){return _0x46447d[_0x75c6('0x17')](_0x29dc5a)['json'](_0x358ed5);}};}function respondWithFilteredResult(_0x289bf8,_0x92a28f){return function(_0x2de31b){if(_0x2de31b){var _0x1c0a85=_0x2de31b[_0x75c6('0x19')],_0x2fd923=_0x92a28f[_0x75c6('0x1a')],_0x2ee2bc=_0x92a28f[_0x75c6('0x1a')]+_0x92a28f[_0x75c6('0x1b')],_0x5ded8d;if(_0x2ee2bc>=_0x1c0a85){_0x2ee2bc=_0x1c0a85;_0x5ded8d=0xc8;}else{_0x5ded8d=0xce;}_0x289bf8[_0x75c6('0x17')](_0x5ded8d);return _0x289bf8[_0x75c6('0x1c')](_0x75c6('0x1d'),_0x2fd923+'-'+_0x2ee2bc+'/'+_0x1c0a85)[_0x75c6('0x1e')](_0x2de31b);}return null;};}function patchUpdates(_0x1dbf4f){return function(_0x1ebf01){try{jsonpatch[_0x75c6('0x1f')](_0x1ebf01,_0x1dbf4f,!![]);}catch(_0x3024cb){return BPromise[_0x75c6('0x20')](_0x3024cb);}return _0x1ebf01[_0x75c6('0x21')]();};}function saveUpdates(_0x189a46,_0x4eef01){return function(_0x389c7b){if(_0x389c7b){return _0x389c7b[_0x75c6('0x22')](_0x189a46)[_0x75c6('0x23')](function(_0x3aad28){return _0x3aad28;});}return null;};}function removeEntity(_0x27f2cb,_0xeb6a24){return function(_0x1c83d3){if(_0x1c83d3){return _0x1c83d3[_0x75c6('0x24')]()['then'](function(){_0x27f2cb[_0x75c6('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0xb236ed,_0x5ae3fe){return function(_0x172d75){if(!_0x172d75){_0xb236ed[_0x75c6('0x16')](0x194);}return _0x172d75;};}function handleError(_0x40dd2f,_0x26416c){_0x26416c=_0x26416c||0x1f4;return function(_0x4e07d2){logger[_0x75c6('0x25')](_0x4e07d2[_0x75c6('0x26')]);if(_0x4e07d2[_0x75c6('0x27')]){delete _0x4e07d2[_0x75c6('0x27')];}_0x40dd2f[_0x75c6('0x17')](_0x26416c)[_0x75c6('0x28')](_0x4e07d2);};}exports[_0x75c6('0x29')]=function(_0x3bbffa,_0x351f8f){var _0x21be4f={},_0x5cadb6={},_0x24fd6e={'count':0x0,'rows':[]};var _0x3134be=db[_0x75c6('0x2a')][_0x75c6('0x2b')];_0x5cadb6[_0x75c6('0x2c')]=_[_0x75c6('0x2d')](_0x3134be);_0x5cadb6[_0x75c6('0x2e')]=_[_0x75c6('0x2d')](_0x3bbffa[_0x75c6('0x2e')]);_0x5cadb6[_0x75c6('0x2f')]=_['intersection'](_0x5cadb6[_0x75c6('0x2c')],_0x5cadb6[_0x75c6('0x2e')]);_0x21be4f[_0x75c6('0x30')]=_[_0x75c6('0x31')](_0x5cadb6[_0x75c6('0x2c')],qs[_0x75c6('0x32')](_0x3bbffa[_0x75c6('0x2e')][_0x75c6('0x32')]));_0x21be4f[_0x75c6('0x30')]=_0x21be4f[_0x75c6('0x30')][_0x75c6('0x33')]?_0x21be4f[_0x75c6('0x30')]:_0x5cadb6['model'];if(!_0x3bbffa['query'][_0x75c6('0x34')](_0x75c6('0x35'))){_0x21be4f[_0x75c6('0x1b')]=qs[_0x75c6('0x1b')](_0x3bbffa[_0x75c6('0x2e')][_0x75c6('0x1b')]);_0x21be4f[_0x75c6('0x1a')]=qs[_0x75c6('0x1a')](_0x3bbffa[_0x75c6('0x2e')]['offset']);}_0x21be4f[_0x75c6('0x36')]=qs['sort'](_0x3bbffa[_0x75c6('0x2e')][_0x75c6('0x37')]);_0x21be4f['where']=qs[_0x75c6('0x2f')](_['pick'](_0x3bbffa[_0x75c6('0x2e')],_0x5cadb6[_0x75c6('0x2f')]));if(_0x3bbffa[_0x75c6('0x2e')]['filter']){_0x21be4f[_0x75c6('0x38')]=_[_0x75c6('0x39')](_0x21be4f[_0x75c6('0x38')],{'$or':_[_0x75c6('0x3a')](_0x3134be,function(_0x62745c){if(_0x62745c[_0x75c6('0x3b')][_0x75c6('0x3c')]!==_0x75c6('0x3d')){var _0xc8179d={};_0xc8179d[_0x62745c[_0x75c6('0x3e')]]={'$like':'%'+_0x3bbffa[_0x75c6('0x2e')][_0x75c6('0x3f')]+'%'};return _0xc8179d;}})});}_0x21be4f=_[_0x75c6('0x39')]({},_0x21be4f,_0x3bbffa['options']);var _0x31052b={'where':_0x21be4f[_0x75c6('0x38')]};return db[_0x75c6('0x2a')][_0x75c6('0x19')](_0x31052b)[_0x75c6('0x23')](function(_0x57e5a1){_0x24fd6e[_0x75c6('0x19')]=_0x57e5a1;if(_0x3bbffa['query'][_0x75c6('0x40')]){_0x21be4f[_0x75c6('0x41')]=[{'all':!![]}];}return db[_0x75c6('0x2a')][_0x75c6('0x42')](_0x21be4f);})[_0x75c6('0x23')](function(_0x366d66){_0x24fd6e[_0x75c6('0x43')]=_0x366d66;return _0x24fd6e;})[_0x75c6('0x23')](respondWithFilteredResult(_0x351f8f,_0x21be4f))[_0x75c6('0x44')](handleError(_0x351f8f,null));};
\ No newline at end of file
diff --git a/server/api/migration/migration.model.js b/server/api/migration/migration.model.js
index 1c7a0d8..d5fe83e 100644
--- a/server/api/migration/migration.model.js
+++ b/server/api/migration/migration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb072=['define','Migration','migrations','lodash','util','api','moment','bluebird','rimraf','../../config/environment','./migration.attributes','exports'];(function(_0x3d379d,_0x53653e){var _0x4aed22=function(_0x47e6de){while(--_0x47e6de){_0x3d379d['push'](_0x3d379d['shift']());}};_0x4aed22(++_0x53653e);}(_0xb072,0x18f));var _0x2b07=function(_0xfca4d3,_0x55adf9){_0xfca4d3=_0xfca4d3-0x0;var _0x209a4c=_0xb072[_0xfca4d3];return _0x209a4c;};'use strict';var _=require(_0x2b07('0x0'));var util=require(_0x2b07('0x1'));var logger=require('../../config/logger')(_0x2b07('0x2'));var moment=require(_0x2b07('0x3'));var BPromise=require(_0x2b07('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x2b07('0x5'));var config=require(_0x2b07('0x6'));var attributes=require(_0x2b07('0x7'));module[_0x2b07('0x8')]=function(_0x25cc07,_0x496a9e){return _0x25cc07[_0x2b07('0x9')](_0x2b07('0xa'),attributes,{'tableName':_0x2b07('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6277=['rimraf','../../config/environment','./migration.attributes','define','Migration','migrations','lodash','util','../../config/logger','api','moment','path'];(function(_0x1fc4b3,_0xdf5436){var _0x28271b=function(_0x48644b){while(--_0x48644b){_0x1fc4b3['push'](_0x1fc4b3['shift']());}};_0x28271b(++_0xdf5436);}(_0x6277,0x10e));var _0x7627=function(_0x4aea3a,_0x3839f9){_0x4aea3a=_0x4aea3a-0x0;var _0x5a349e=_0x6277[_0x4aea3a];return _0x5a349e;};'use strict';var _=require(_0x7627('0x0'));var util=require(_0x7627('0x1'));var logger=require(_0x7627('0x2'))(_0x7627('0x3'));var moment=require(_0x7627('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x7627('0x5'));var rimraf=require(_0x7627('0x6'));var config=require(_0x7627('0x7'));var attributes=require(_0x7627('0x8'));module['exports']=function(_0x4967dc,_0x36cfc2){return _0x4967dc[_0x7627('0x9')](_0x7627('0xa'),attributes,{'tableName':_0x7627('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/migration/migration.rpc.js b/server/api/migration/migration.rpc.js
index 0ec6e9b..01a608a 100644
--- a/server/api/migration/migration.rpc.js
+++ b/server/api/migration/migration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0b78=['request\x20sent','Migration,\x20%s,\x20%s,\x20%s','stringify','error','code','Migration,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','http','then','info'];(function(_0x11d88b,_0x19b211){var _0x4012c5=function(_0x54fe0c){while(--_0x54fe0c){_0x11d88b['push'](_0x11d88b['shift']());}};_0x4012c5(++_0x19b211);}(_0x0b78,0x1ad));var _0x80b7=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0b78[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x80b7('0x0'));var util=require(_0x80b7('0x1'));var moment=require('moment');var BPromise=require(_0x80b7('0x2'));var rs=require(_0x80b7('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x80b7('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x80b7('0x5'))(_0x80b7('0x6'));var config=require(_0x80b7('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x80b7('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x584401,_0x5e19ef,_0x122ebe){return new BPromise(function(_0x3c248d,_0x445c23){return client['request'](_0x584401,_0x122ebe)[_0x80b7('0x9')](function(_0x25a015){logger[_0x80b7('0xa')]('Migration,\x20%s,\x20%s',_0x5e19ef,_0x80b7('0xb'));logger['debug'](_0x80b7('0xc'),_0x5e19ef,_0x80b7('0xb'),JSON[_0x80b7('0xd')](_0x25a015));if(_0x25a015[_0x80b7('0xe')]){if(_0x25a015[_0x80b7('0xe')][_0x80b7('0xf')]===0x1f4){logger[_0x80b7('0xe')](_0x80b7('0x10'),_0x5e19ef,_0x25a015[_0x80b7('0xe')][_0x80b7('0x11')]);return _0x445c23(_0x25a015[_0x80b7('0xe')]['message']);}logger[_0x80b7('0xe')](_0x80b7('0x10'),_0x5e19ef,_0x25a015['error'][_0x80b7('0x11')]);return _0x3c248d(_0x25a015[_0x80b7('0xe')]['message']);}else{logger[_0x80b7('0xa')](_0x80b7('0x10'),_0x5e19ef,_0x80b7('0xb'));_0x3c248d(_0x25a015[_0x80b7('0x12')][_0x80b7('0x11')]);}})[_0x80b7('0x13')](function(_0x1e3d1c){logger[_0x80b7('0xe')](_0x80b7('0x10'),_0x5e19ef,_0x1e3d1c);_0x445c23(_0x1e3d1c);});});}
\ No newline at end of file
+var _0x0e85=['bluebird','randomstring','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','Migration,\x20%s,\x20%s','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util'];(function(_0x515fd2,_0x266467){var _0x3f03d2=function(_0x5f402a){while(--_0x5f402a){_0x515fd2['push'](_0x515fd2['shift']());}};_0x3f03d2(++_0x266467);}(_0x0e85,0x7c));var _0x50e8=function(_0x3740fe,_0x6c543c){_0x3740fe=_0x3740fe-0x0;var _0x55492b=_0x0e85[_0x3740fe];return _0x55492b;};'use strict';var _=require(_0x50e8('0x0'));var util=require(_0x50e8('0x1'));var moment=require('moment');var BPromise=require(_0x50e8('0x2'));var rs=require(_0x50e8('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x50e8('0x4'))('rpc');var config=require(_0x50e8('0x5'));var jayson=require(_0x50e8('0x6'));var client=jayson[_0x50e8('0x7')][_0x50e8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5e8b01,_0x3ce904,_0x108edc){return new BPromise(function(_0x42665e,_0x988da0){return client[_0x50e8('0x9')](_0x5e8b01,_0x108edc)[_0x50e8('0xa')](function(_0x5825f5){logger[_0x50e8('0xb')](_0x50e8('0xc'),_0x3ce904,_0x50e8('0xd'));logger[_0x50e8('0xe')](_0x50e8('0xf'),_0x3ce904,_0x50e8('0xd'),JSON[_0x50e8('0x10')](_0x5825f5));if(_0x5825f5[_0x50e8('0x11')]){if(_0x5825f5['error']['code']===0x1f4){logger[_0x50e8('0x11')](_0x50e8('0xc'),_0x3ce904,_0x5825f5['error']['message']);return _0x988da0(_0x5825f5[_0x50e8('0x11')][_0x50e8('0x12')]);}logger[_0x50e8('0x11')](_0x50e8('0xc'),_0x3ce904,_0x5825f5['error'][_0x50e8('0x12')]);return _0x42665e(_0x5825f5[_0x50e8('0x11')][_0x50e8('0x12')]);}else{logger['info']('Migration,\x20%s,\x20%s',_0x3ce904,_0x50e8('0xd'));_0x42665e(_0x5825f5[_0x50e8('0x13')][_0x50e8('0x12')]);}})[_0x50e8('0x14')](function(_0x211731){logger[_0x50e8('0x11')]('Migration,\x20%s,\x20%s',_0x3ce904,_0x211731);_0x988da0(_0x211731);});});}
\ No newline at end of file
diff --git a/server/api/network/index.js b/server/api/network/index.js
index 07ef6e4..daae51b 100644
--- a/server/api/network/index.js
+++ b/server/api/network/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4351=['post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./network.controller','isAuthenticated','get','/:id','show'];(function(_0x14f009,_0x4d3a3c){var _0x3c9312=function(_0x46d7d7){while(--_0x46d7d7){_0x14f009['push'](_0x14f009['shift']());}};_0x3c9312(++_0x4d3a3c);}(_0x4351,0xb2));var _0x1435=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0x4351[_0x1caf6a];return _0x1bf493;};'use strict';var multer=require(_0x1435('0x0'));var util=require('util');var path=require(_0x1435('0x1'));var timeout=require(_0x1435('0x2'));var express=require(_0x1435('0x3'));var router=express[_0x1435('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x1435('0x5'));var config=require(_0x1435('0x6'));var controller=require(_0x1435('0x7'));router['get']('/',auth[_0x1435('0x8')](),controller['index']);router[_0x1435('0x9')](_0x1435('0xa'),auth[_0x1435('0x8')](),controller[_0x1435('0xb')]);router[_0x1435('0xc')]('/',auth[_0x1435('0x8')](),controller[_0x1435('0xd')]);router[_0x1435('0xe')](_0x1435('0xa'),auth[_0x1435('0x8')](),controller[_0x1435('0xf')]);router[_0x1435('0x10')](_0x1435('0xa'),auth[_0x1435('0x8')](),controller[_0x1435('0x11')]);module[_0x1435('0x12')]=router;
\ No newline at end of file
+var _0x5bd3=['Router','../../components/auth/service','../../components/interaction/service','./network.controller','get','/:id','isAuthenticated','post','create','put','update','delete','destroy','exports','connect-timeout'];(function(_0x1a9204,_0x1c9e00){var _0x17ca68=function(_0x1f4399){while(--_0x1f4399){_0x1a9204['push'](_0x1a9204['shift']());}};_0x17ca68(++_0x1c9e00);}(_0x5bd3,0x1a3));var _0x35bd=function(_0x88cd7b,_0x4c884c){_0x88cd7b=_0x88cd7b-0x0;var _0x56fcc8=_0x5bd3[_0x88cd7b];return _0x56fcc8;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x35bd('0x0'));var express=require('express');var router=express[_0x35bd('0x1')]();var auth=require(_0x35bd('0x2'));var interaction=require(_0x35bd('0x3'));var config=require('../../config/environment');var controller=require(_0x35bd('0x4'));router[_0x35bd('0x5')]('/',auth['isAuthenticated'](),controller['index']);router[_0x35bd('0x5')](_0x35bd('0x6'),auth[_0x35bd('0x7')](),controller['show']);router[_0x35bd('0x8')]('/',auth[_0x35bd('0x7')](),controller[_0x35bd('0x9')]);router[_0x35bd('0xa')](_0x35bd('0x6'),auth['isAuthenticated'](),controller[_0x35bd('0xb')]);router[_0x35bd('0xc')]('/:id',auth[_0x35bd('0x7')](),controller[_0x35bd('0xd')]);module[_0x35bd('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/network/network.attributes.js b/server/api/network/network.attributes.js
index ab872a1..ca7946e 100644
--- a/server/api/network/network.attributes.js
+++ b/server/api/network/network.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xca38=['sequelize','ENUM','localnet'];(function(_0x319e2e,_0x2f727f){var _0x302524=function(_0x5cad9d){while(--_0x5cad9d){_0x319e2e['push'](_0x319e2e['shift']());}};_0x302524(++_0x2f727f);}(_0xca38,0x1da));var _0x8ca3=function(_0x2f56ff,_0x2515cf){_0x2f56ff=_0x2f56ff-0x0;var _0x269e80=_0xca38[_0x2f56ff];return _0x269e80;};'use strict';var Sequelize=require(_0x8ca3('0x0'));module['exports']={'type':{'type':Sequelize[_0x8ca3('0x1')](_0x8ca3('0x2'),'externip')},'value':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xf100=['STRING','sequelize','exports','ENUM'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf100,0x7d));var _0x0f10=function(_0x371605,_0x1d4a35){_0x371605=_0x371605-0x0;var _0x493097=_0xf100[_0x371605];return _0x493097;};'use strict';var Sequelize=require(_0x0f10('0x0'));module[_0x0f10('0x1')]={'type':{'type':Sequelize[_0x0f10('0x2')]('localnet','externip')},'value':{'type':Sequelize[_0x0f10('0x3')]}};
\ No newline at end of file
diff --git a/server/api/network/network.controller.js b/server/api/network/network.controller.js
index c18a9d8..fd9f963 100644
--- a/server/api/network/network.controller.js
+++ b/server/api/network/network.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','request\x20sent','stringify','error','code','Network,\x20%s,\x20%s','message','info','result','catch','sendStatus','json','count','offset','limit','status','Content-Range','apply','reject','save','destroy','stack','name','index','Network','rawAttributes','model','keys','query','filters','intersection','attributes','fields','nolimit','order','sort','pick','filter','key','VIRTUAL','includeAll','include','findAll','rows','show','length','merge','options','create','sequelize','transaction','body','type','readFileSync','join','server/files/templates/network.ejs','utf8','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','Reload','update','find','params','render','root','writeFileSync','chan_sip.so','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','squel','crypto','desk.js','ioredis','../../components/auth/service','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb'];(function(_0x44216d,_0x4938a7){var _0xeca523=function(_0x11faf1){while(--_0x11faf1){_0x44216d['push'](_0x44216d['shift']());}};_0xeca523(++_0x4938a7);}(_0x7a54,0x106));var _0x47a5=function(_0xf04272,_0x1d5ad9){_0xf04272=_0xf04272-0x0;var _0x5d9f1e=_0x7a54[_0xf04272];return _0x5d9f1e;};'use strict';var pdf=require(_0x47a5('0x0'));var emlformat=require(_0x47a5('0x1'));var rimraf=require(_0x47a5('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x47a5('0x3'));var rp=require(_0x47a5('0x4'));var moment=require('moment');var BPromise=require(_0x47a5('0x5'));var Mustache=require(_0x47a5('0x6'));var util=require(_0x47a5('0x7'));var path=require(_0x47a5('0x8'));var sox=require(_0x47a5('0x9'));var csv=require('to-csv');var ejs=require(_0x47a5('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x47a5('0x10'));var logger=require('../../config/logger')('api');var utils=require(_0x47a5('0x11'));var config=require(_0x47a5('0x12'));var db=require(_0x47a5('0x13'))['db'];var jayson=require(_0x47a5('0x14'));var client=jayson[_0x47a5('0x15')][_0x47a5('0x16')]({'port':0x232a});function checkPasswordPattern(_0x1eae59,_0x5beb89,_0x44bd3e){if(_0x44bd3e){var _0x221b54=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x221b54[_0x47a5('0x17')](_0x5beb89)){return _0x1eae59;}else{throw new Error(_0x47a5('0x18'));}}else{return _0x1eae59;}}function respondWithRpcPromise(_0x139f25,_0x620ee9,_0x3c6c46,_0x190faa){return new BPromise(function(_0x4e99a8,_0x362359){var _0x11faf5=_0x190faa||client;return _0x11faf5[_0x47a5('0x19')](_0x139f25,_0x3c6c46)[_0x47a5('0x1a')](function(_0x1ef44c){logger['info']('Network,\x20%s,\x20%s',_0x620ee9,_0x47a5('0x1b'));logger['debug']('Network,\x20%s,\x20%s,\x20%s',_0x620ee9,_0x47a5('0x1b'),JSON[_0x47a5('0x1c')](_0x1ef44c));if(_0x1ef44c[_0x47a5('0x1d')]){if(_0x1ef44c[_0x47a5('0x1d')][_0x47a5('0x1e')]===0x1f4){logger[_0x47a5('0x1d')](_0x47a5('0x1f'),_0x620ee9,_0x1ef44c[_0x47a5('0x1d')][_0x47a5('0x20')]);return _0x362359(_0x1ef44c['error'][_0x47a5('0x20')]);}logger[_0x47a5('0x1d')]('Network,\x20%s,\x20%s',_0x620ee9,_0x1ef44c[_0x47a5('0x1d')][_0x47a5('0x20')]);return _0x4e99a8(_0x1ef44c[_0x47a5('0x1d')]['message']);}else{logger[_0x47a5('0x21')](_0x47a5('0x1f'),_0x620ee9,_0x47a5('0x1b'));_0x4e99a8(_0x1ef44c[_0x47a5('0x22')]['message']);}})[_0x47a5('0x23')](function(_0x385687){logger['error'](_0x47a5('0x1f'),_0x620ee9,_0x385687);_0x362359(_0x385687);});});}function respondWithStatusCode(_0xc4cd63,_0x4437f1){_0x4437f1=_0x4437f1||0xcc;return function(_0x129ce5){if(_0x129ce5){return _0xc4cd63[_0x47a5('0x24')](_0x4437f1);}return _0xc4cd63['status'](_0x4437f1)['end']();};}function respondWithResult(_0x136745,_0x5686db){_0x5686db=_0x5686db||0xc8;return function(_0x1ea9c8){if(_0x1ea9c8){return _0x136745['status'](_0x5686db)[_0x47a5('0x25')](_0x1ea9c8);}};}function respondWithFilteredResult(_0x378208,_0x36ad34){return function(_0x1dac65){if(_0x1dac65){var _0x21f296=_0x1dac65[_0x47a5('0x26')],_0x3ba0b7=_0x36ad34[_0x47a5('0x27')],_0x24b162=_0x36ad34[_0x47a5('0x27')]+_0x36ad34[_0x47a5('0x28')],_0x136b14;if(_0x24b162>=_0x21f296){_0x24b162=_0x21f296;_0x136b14=0xc8;}else{_0x136b14=0xce;}_0x378208[_0x47a5('0x29')](_0x136b14);return _0x378208['set'](_0x47a5('0x2a'),_0x3ba0b7+'-'+_0x24b162+'/'+_0x21f296)['json'](_0x1dac65);}return null;};}function patchUpdates(_0x2ef875){return function(_0x9ac908){try{jsonpatch[_0x47a5('0x2b')](_0x9ac908,_0x2ef875,!![]);}catch(_0x4d6b57){return BPromise[_0x47a5('0x2c')](_0x4d6b57);}return _0x9ac908[_0x47a5('0x2d')]();};}function saveUpdates(_0x39b50b,_0x1f1c68){return function(_0x51cc81){if(_0x51cc81){return _0x51cc81['update'](_0x39b50b)[_0x47a5('0x1a')](function(_0xfb5ddb){return _0xfb5ddb;});}return null;};}function removeEntity(_0x5bd7eb,_0x4e1006){return function(_0x836303){if(_0x836303){return _0x836303[_0x47a5('0x2e')]()['then'](function(){_0x5bd7eb[_0x47a5('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x122ed6,_0xd972c){return function(_0x5c5162){if(!_0x5c5162){_0x122ed6['sendStatus'](0x194);}return _0x5c5162;};}function handleError(_0x274e34,_0x5910bb){_0x5910bb=_0x5910bb||0x1f4;return function(_0x403028){logger[_0x47a5('0x1d')](_0x403028[_0x47a5('0x2f')]);if(_0x403028['name']){delete _0x403028[_0x47a5('0x30')];}_0x274e34['status'](_0x5910bb)['send'](_0x403028);};}exports[_0x47a5('0x31')]=function(_0x5a8a7c,_0x25cce0){var _0x5ef577={},_0x21ad34={},_0x3534cb={'count':0x0,'rows':[]};var _0x38c8d4=db[_0x47a5('0x32')][_0x47a5('0x33')];_0x21ad34[_0x47a5('0x34')]=_[_0x47a5('0x35')](_0x38c8d4);_0x21ad34[_0x47a5('0x36')]=_[_0x47a5('0x35')](_0x5a8a7c['query']);_0x21ad34[_0x47a5('0x37')]=_[_0x47a5('0x38')](_0x21ad34['model'],_0x21ad34[_0x47a5('0x36')]);_0x5ef577[_0x47a5('0x39')]=_[_0x47a5('0x38')](_0x21ad34['model'],qs[_0x47a5('0x3a')](_0x5a8a7c[_0x47a5('0x36')]['fields']));_0x5ef577[_0x47a5('0x39')]=_0x5ef577[_0x47a5('0x39')]['length']?_0x5ef577['attributes']:_0x21ad34['model'];if(!_0x5a8a7c[_0x47a5('0x36')]['hasOwnProperty'](_0x47a5('0x3b'))){_0x5ef577[_0x47a5('0x28')]=qs[_0x47a5('0x28')](_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x28')]);_0x5ef577[_0x47a5('0x27')]=qs[_0x47a5('0x27')](_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x27')]);}_0x5ef577[_0x47a5('0x3c')]=qs[_0x47a5('0x3d')](_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x3d')]);_0x5ef577['where']=qs[_0x47a5('0x37')](_[_0x47a5('0x3e')](_0x5a8a7c[_0x47a5('0x36')],_0x21ad34[_0x47a5('0x37')]));if(_0x5a8a7c['query'][_0x47a5('0x3f')]){_0x5ef577['where']=_['merge'](_0x5ef577['where'],{'$or':_['map'](_0x38c8d4,function(_0x27dd5d){if(_0x27dd5d['type'][_0x47a5('0x40')]!==_0x47a5('0x41')){var _0x448610={};_0x448610[_0x27dd5d['field']]={'$like':'%'+_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x3f')]+'%'};return _0x448610;}})});}_0x5ef577=_['merge']({},_0x5ef577,_0x5a8a7c['options']);var _0xbe21d9={'where':_0x5ef577['where']};return db[_0x47a5('0x32')][_0x47a5('0x26')](_0xbe21d9)[_0x47a5('0x1a')](function(_0xd75ca3){_0x3534cb[_0x47a5('0x26')]=_0xd75ca3;if(_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x42')]){_0x5ef577[_0x47a5('0x43')]=[{'all':!![]}];}return db[_0x47a5('0x32')][_0x47a5('0x44')](_0x5ef577);})[_0x47a5('0x1a')](function(_0x3c3ebf){_0x3534cb[_0x47a5('0x45')]=_0x3c3ebf;return _0x3534cb;})[_0x47a5('0x1a')](respondWithFilteredResult(_0x25cce0,_0x5ef577))[_0x47a5('0x23')](handleError(_0x25cce0,null));};exports[_0x47a5('0x46')]=function(_0x512e65,_0x2d38de){var _0x23bb04={'raw':!![],'where':{'id':_0x512e65['params']['id']}},_0x49eab1={};_0x49eab1[_0x47a5('0x34')]=_['keys'](db[_0x47a5('0x32')][_0x47a5('0x33')]);_0x49eab1['query']=_['keys'](_0x512e65[_0x47a5('0x36')]);_0x49eab1['filters']=_[_0x47a5('0x38')](_0x49eab1[_0x47a5('0x34')],_0x49eab1[_0x47a5('0x36')]);_0x23bb04[_0x47a5('0x39')]=_[_0x47a5('0x38')](_0x49eab1[_0x47a5('0x34')],qs[_0x47a5('0x3a')](_0x512e65['query']['fields']));_0x23bb04[_0x47a5('0x39')]=_0x23bb04[_0x47a5('0x39')][_0x47a5('0x47')]?_0x23bb04[_0x47a5('0x39')]:_0x49eab1[_0x47a5('0x34')];if(_0x512e65[_0x47a5('0x36')][_0x47a5('0x42')]){_0x23bb04['include']=[{'all':!![]}];}_0x23bb04=_[_0x47a5('0x48')]({},_0x23bb04,_0x512e65[_0x47a5('0x49')]);return db[_0x47a5('0x32')]['find'](_0x23bb04)[_0x47a5('0x1a')](handleEntityNotFound(_0x2d38de,null))['then'](respondWithResult(_0x2d38de,null))[_0x47a5('0x23')](handleError(_0x2d38de,null));};exports[_0x47a5('0x4a')]=function(_0x46e90b,_0xf03bd5,_0x588551){var _0x3adf14;return db[_0x47a5('0x4b')][_0x47a5('0x4c')](function(_0x3a2de4){return db[_0x47a5('0x32')][_0x47a5('0x4a')](_0x46e90b[_0x47a5('0x4d')],{'raw':!![]})['then'](function(_0x2a0aa2){_0x3adf14=_0x2a0aa2;return db[_0x47a5('0x32')][_0x47a5('0x44')]({'where':{'type':_0x46e90b[_0x47a5('0x4d')][_0x47a5('0x4e')]},'raw':!![]});})[_0x47a5('0x1a')](function(_0x572233){var _0x1ad6a9=fs[_0x47a5('0x4f')](path[_0x47a5('0x50')](config['root'],_0x47a5('0x51')),_0x47a5('0x52'));var _0x183b3c=ejs['render'](_0x1ad6a9,{'networks':_0x572233||[]});fs['writeFileSync'](util[_0x47a5('0x53')](_0x47a5('0x54'),_0x46e90b['body']['type'][_0x47a5('0x55')]()),_0x183b3c);})['then'](function(){return respondWithRpcPromise(_0x47a5('0x56'),'create',{'module':'chan_sip.so'});})[_0x47a5('0x1a')](function(){return _0x3adf14;});})[_0x47a5('0x1a')](respondWithResult(_0xf03bd5,0xc9))['catch'](handleError(_0xf03bd5,null));};exports[_0x47a5('0x57')]=function(_0x72fe,_0x4b706a,_0x5b6127){var _0x16b4fd;return db[_0x47a5('0x4b')][_0x47a5('0x4c')](function(_0x2931e4){return db['Network'][_0x47a5('0x58')]({'where':{'id':_0x72fe[_0x47a5('0x59')]['id']}})[_0x47a5('0x1a')](handleEntityNotFound(_0x4b706a,null))['then'](saveUpdates(_0x72fe[_0x47a5('0x4d')],null))['then'](function(_0x485e3c){if(_0x485e3c){_0x16b4fd=_0x485e3c;return db[_0x47a5('0x32')][_0x47a5('0x44')]({'where':{'type':_0x16b4fd[_0x47a5('0x4e')]},'raw':!![]});}return null;})[_0x47a5('0x1a')](function(_0x4966af){if(_0x4966af){var _0x144af9=fs['readFileSync'](path['join'](config['root'],'server/files/templates/network.ejs'),_0x47a5('0x52'));var _0x6cd4ea=ejs[_0x47a5('0x5a')](_0x144af9,{'networks':_0x4966af||[]});fs['writeFileSync'](util['format'](_0x47a5('0x54'),_0x16b4fd[_0x47a5('0x4e')][_0x47a5('0x55')]()),_0x6cd4ea);return respondWithRpcPromise(_0x47a5('0x56'),_0x47a5('0x57'),{'module':'chan_sip.so'});}return null;})[_0x47a5('0x1a')](function(_0x519e9e){if(_0x519e9e){return _0x16b4fd;}return null;});})[_0x47a5('0x1a')](respondWithResult(_0x4b706a,null))[_0x47a5('0x23')](handleError(_0x4b706a,null));};exports['destroy']=function(_0x32b4de,_0x345104,_0x132854){var _0x3e8274;return db[_0x47a5('0x32')][_0x47a5('0x58')]({'where':{'id':_0x32b4de[_0x47a5('0x59')]['id']}})[_0x47a5('0x1a')](function(_0x57ed0a){_0x3e8274=_0x57ed0a;return _0x57ed0a;})[_0x47a5('0x1a')](handleEntityNotFound(_0x345104,null))[_0x47a5('0x1a')](removeEntity(_0x345104,null))[_0x47a5('0x1a')](function(){if(_0x3e8274){return db[_0x47a5('0x32')][_0x47a5('0x44')]({'where':{'type':_0x3e8274['type']},'raw':!![]});}})[_0x47a5('0x1a')](function(_0xdfcecc){if(_0xdfcecc){var _0x1224bc=fs[_0x47a5('0x4f')](path[_0x47a5('0x50')](config[_0x47a5('0x5b')],_0x47a5('0x51')),_0x47a5('0x52'));var _0x350af8=ejs[_0x47a5('0x5a')](_0x1224bc,{'networks':_0xdfcecc||[]});fs[_0x47a5('0x5c')](util[_0x47a5('0x53')](_0x47a5('0x54'),_0x3e8274[_0x47a5('0x4e')][_0x47a5('0x55')]()),_0x350af8);return respondWithRpcPromise('Reload',_0x47a5('0x2e'),{'module':_0x47a5('0x5d')});}})[_0x47a5('0x23')](handleError(_0x345104,null));};
\ No newline at end of file
+var _0x7a54=['jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','request\x20sent','stringify','error','code','Network,\x20%s,\x20%s','message','info','result','catch','sendStatus','json','count','offset','limit','status','Content-Range','apply','reject','save','destroy','stack','name','index','Network','rawAttributes','model','keys','query','filters','intersection','attributes','fields','nolimit','order','sort','pick','filter','key','VIRTUAL','includeAll','include','findAll','rows','show','length','merge','options','create','sequelize','transaction','body','type','readFileSync','join','server/files/templates/network.ejs','utf8','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','Reload','update','find','params','render','root','writeFileSync','chan_sip.so','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','squel','crypto','desk.js','ioredis','../../components/auth/service','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb'];(function(_0xcd07c,_0x8f566c){var _0xb99e27=function(_0x2d19d2){while(--_0x2d19d2){_0xcd07c['push'](_0xcd07c['shift']());}};_0xb99e27(++_0x8f566c);}(_0x7a54,0x106));var _0x47a5=function(_0xbc5a4f,_0x58211e){_0xbc5a4f=_0xbc5a4f-0x0;var _0x3dc318=_0x7a54[_0xbc5a4f];return _0x3dc318;};'use strict';var pdf=require(_0x47a5('0x0'));var emlformat=require(_0x47a5('0x1'));var rimraf=require(_0x47a5('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x47a5('0x3'));var rp=require(_0x47a5('0x4'));var moment=require('moment');var BPromise=require(_0x47a5('0x5'));var Mustache=require(_0x47a5('0x6'));var util=require(_0x47a5('0x7'));var path=require(_0x47a5('0x8'));var sox=require(_0x47a5('0x9'));var csv=require('to-csv');var ejs=require(_0x47a5('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x47a5('0x10'));var logger=require('../../config/logger')('api');var utils=require(_0x47a5('0x11'));var config=require(_0x47a5('0x12'));var db=require(_0x47a5('0x13'))['db'];var jayson=require(_0x47a5('0x14'));var client=jayson[_0x47a5('0x15')][_0x47a5('0x16')]({'port':0x232a});function checkPasswordPattern(_0x1eae59,_0x5beb89,_0x44bd3e){if(_0x44bd3e){var _0x221b54=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x221b54[_0x47a5('0x17')](_0x5beb89)){return _0x1eae59;}else{throw new Error(_0x47a5('0x18'));}}else{return _0x1eae59;}}function respondWithRpcPromise(_0x139f25,_0x620ee9,_0x3c6c46,_0x190faa){return new BPromise(function(_0x4e99a8,_0x362359){var _0x11faf5=_0x190faa||client;return _0x11faf5[_0x47a5('0x19')](_0x139f25,_0x3c6c46)[_0x47a5('0x1a')](function(_0x1ef44c){logger['info']('Network,\x20%s,\x20%s',_0x620ee9,_0x47a5('0x1b'));logger['debug']('Network,\x20%s,\x20%s,\x20%s',_0x620ee9,_0x47a5('0x1b'),JSON[_0x47a5('0x1c')](_0x1ef44c));if(_0x1ef44c[_0x47a5('0x1d')]){if(_0x1ef44c[_0x47a5('0x1d')][_0x47a5('0x1e')]===0x1f4){logger[_0x47a5('0x1d')](_0x47a5('0x1f'),_0x620ee9,_0x1ef44c[_0x47a5('0x1d')][_0x47a5('0x20')]);return _0x362359(_0x1ef44c['error'][_0x47a5('0x20')]);}logger[_0x47a5('0x1d')]('Network,\x20%s,\x20%s',_0x620ee9,_0x1ef44c[_0x47a5('0x1d')][_0x47a5('0x20')]);return _0x4e99a8(_0x1ef44c[_0x47a5('0x1d')]['message']);}else{logger[_0x47a5('0x21')](_0x47a5('0x1f'),_0x620ee9,_0x47a5('0x1b'));_0x4e99a8(_0x1ef44c[_0x47a5('0x22')]['message']);}})[_0x47a5('0x23')](function(_0x385687){logger['error'](_0x47a5('0x1f'),_0x620ee9,_0x385687);_0x362359(_0x385687);});});}function respondWithStatusCode(_0xc4cd63,_0x4437f1){_0x4437f1=_0x4437f1||0xcc;return function(_0x129ce5){if(_0x129ce5){return _0xc4cd63[_0x47a5('0x24')](_0x4437f1);}return _0xc4cd63['status'](_0x4437f1)['end']();};}function respondWithResult(_0x136745,_0x5686db){_0x5686db=_0x5686db||0xc8;return function(_0x1ea9c8){if(_0x1ea9c8){return _0x136745['status'](_0x5686db)[_0x47a5('0x25')](_0x1ea9c8);}};}function respondWithFilteredResult(_0x378208,_0x36ad34){return function(_0x1dac65){if(_0x1dac65){var _0x21f296=_0x1dac65[_0x47a5('0x26')],_0x3ba0b7=_0x36ad34[_0x47a5('0x27')],_0x24b162=_0x36ad34[_0x47a5('0x27')]+_0x36ad34[_0x47a5('0x28')],_0x136b14;if(_0x24b162>=_0x21f296){_0x24b162=_0x21f296;_0x136b14=0xc8;}else{_0x136b14=0xce;}_0x378208[_0x47a5('0x29')](_0x136b14);return _0x378208['set'](_0x47a5('0x2a'),_0x3ba0b7+'-'+_0x24b162+'/'+_0x21f296)['json'](_0x1dac65);}return null;};}function patchUpdates(_0x2ef875){return function(_0x9ac908){try{jsonpatch[_0x47a5('0x2b')](_0x9ac908,_0x2ef875,!![]);}catch(_0x4d6b57){return BPromise[_0x47a5('0x2c')](_0x4d6b57);}return _0x9ac908[_0x47a5('0x2d')]();};}function saveUpdates(_0x39b50b,_0x1f1c68){return function(_0x51cc81){if(_0x51cc81){return _0x51cc81['update'](_0x39b50b)[_0x47a5('0x1a')](function(_0xfb5ddb){return _0xfb5ddb;});}return null;};}function removeEntity(_0x5bd7eb,_0x4e1006){return function(_0x836303){if(_0x836303){return _0x836303[_0x47a5('0x2e')]()['then'](function(){_0x5bd7eb[_0x47a5('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x122ed6,_0xd972c){return function(_0x5c5162){if(!_0x5c5162){_0x122ed6['sendStatus'](0x194);}return _0x5c5162;};}function handleError(_0x274e34,_0x5910bb){_0x5910bb=_0x5910bb||0x1f4;return function(_0x403028){logger[_0x47a5('0x1d')](_0x403028[_0x47a5('0x2f')]);if(_0x403028['name']){delete _0x403028[_0x47a5('0x30')];}_0x274e34['status'](_0x5910bb)['send'](_0x403028);};}exports[_0x47a5('0x31')]=function(_0x5a8a7c,_0x25cce0){var _0x5ef577={},_0x21ad34={},_0x3534cb={'count':0x0,'rows':[]};var _0x38c8d4=db[_0x47a5('0x32')][_0x47a5('0x33')];_0x21ad34[_0x47a5('0x34')]=_[_0x47a5('0x35')](_0x38c8d4);_0x21ad34[_0x47a5('0x36')]=_[_0x47a5('0x35')](_0x5a8a7c['query']);_0x21ad34[_0x47a5('0x37')]=_[_0x47a5('0x38')](_0x21ad34['model'],_0x21ad34[_0x47a5('0x36')]);_0x5ef577[_0x47a5('0x39')]=_[_0x47a5('0x38')](_0x21ad34['model'],qs[_0x47a5('0x3a')](_0x5a8a7c[_0x47a5('0x36')]['fields']));_0x5ef577[_0x47a5('0x39')]=_0x5ef577[_0x47a5('0x39')]['length']?_0x5ef577['attributes']:_0x21ad34['model'];if(!_0x5a8a7c[_0x47a5('0x36')]['hasOwnProperty'](_0x47a5('0x3b'))){_0x5ef577[_0x47a5('0x28')]=qs[_0x47a5('0x28')](_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x28')]);_0x5ef577[_0x47a5('0x27')]=qs[_0x47a5('0x27')](_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x27')]);}_0x5ef577[_0x47a5('0x3c')]=qs[_0x47a5('0x3d')](_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x3d')]);_0x5ef577['where']=qs[_0x47a5('0x37')](_[_0x47a5('0x3e')](_0x5a8a7c[_0x47a5('0x36')],_0x21ad34[_0x47a5('0x37')]));if(_0x5a8a7c['query'][_0x47a5('0x3f')]){_0x5ef577['where']=_['merge'](_0x5ef577['where'],{'$or':_['map'](_0x38c8d4,function(_0x27dd5d){if(_0x27dd5d['type'][_0x47a5('0x40')]!==_0x47a5('0x41')){var _0x448610={};_0x448610[_0x27dd5d['field']]={'$like':'%'+_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x3f')]+'%'};return _0x448610;}})});}_0x5ef577=_['merge']({},_0x5ef577,_0x5a8a7c['options']);var _0xbe21d9={'where':_0x5ef577['where']};return db[_0x47a5('0x32')][_0x47a5('0x26')](_0xbe21d9)[_0x47a5('0x1a')](function(_0xd75ca3){_0x3534cb[_0x47a5('0x26')]=_0xd75ca3;if(_0x5a8a7c[_0x47a5('0x36')][_0x47a5('0x42')]){_0x5ef577[_0x47a5('0x43')]=[{'all':!![]}];}return db[_0x47a5('0x32')][_0x47a5('0x44')](_0x5ef577);})[_0x47a5('0x1a')](function(_0x3c3ebf){_0x3534cb[_0x47a5('0x45')]=_0x3c3ebf;return _0x3534cb;})[_0x47a5('0x1a')](respondWithFilteredResult(_0x25cce0,_0x5ef577))[_0x47a5('0x23')](handleError(_0x25cce0,null));};exports[_0x47a5('0x46')]=function(_0x512e65,_0x2d38de){var _0x23bb04={'raw':!![],'where':{'id':_0x512e65['params']['id']}},_0x49eab1={};_0x49eab1[_0x47a5('0x34')]=_['keys'](db[_0x47a5('0x32')][_0x47a5('0x33')]);_0x49eab1['query']=_['keys'](_0x512e65[_0x47a5('0x36')]);_0x49eab1['filters']=_[_0x47a5('0x38')](_0x49eab1[_0x47a5('0x34')],_0x49eab1[_0x47a5('0x36')]);_0x23bb04[_0x47a5('0x39')]=_[_0x47a5('0x38')](_0x49eab1[_0x47a5('0x34')],qs[_0x47a5('0x3a')](_0x512e65['query']['fields']));_0x23bb04[_0x47a5('0x39')]=_0x23bb04[_0x47a5('0x39')][_0x47a5('0x47')]?_0x23bb04[_0x47a5('0x39')]:_0x49eab1[_0x47a5('0x34')];if(_0x512e65[_0x47a5('0x36')][_0x47a5('0x42')]){_0x23bb04['include']=[{'all':!![]}];}_0x23bb04=_[_0x47a5('0x48')]({},_0x23bb04,_0x512e65[_0x47a5('0x49')]);return db[_0x47a5('0x32')]['find'](_0x23bb04)[_0x47a5('0x1a')](handleEntityNotFound(_0x2d38de,null))['then'](respondWithResult(_0x2d38de,null))[_0x47a5('0x23')](handleError(_0x2d38de,null));};exports[_0x47a5('0x4a')]=function(_0x46e90b,_0xf03bd5,_0x588551){var _0x3adf14;return db[_0x47a5('0x4b')][_0x47a5('0x4c')](function(_0x3a2de4){return db[_0x47a5('0x32')][_0x47a5('0x4a')](_0x46e90b[_0x47a5('0x4d')],{'raw':!![]})['then'](function(_0x2a0aa2){_0x3adf14=_0x2a0aa2;return db[_0x47a5('0x32')][_0x47a5('0x44')]({'where':{'type':_0x46e90b[_0x47a5('0x4d')][_0x47a5('0x4e')]},'raw':!![]});})[_0x47a5('0x1a')](function(_0x572233){var _0x1ad6a9=fs[_0x47a5('0x4f')](path[_0x47a5('0x50')](config['root'],_0x47a5('0x51')),_0x47a5('0x52'));var _0x183b3c=ejs['render'](_0x1ad6a9,{'networks':_0x572233||[]});fs['writeFileSync'](util[_0x47a5('0x53')](_0x47a5('0x54'),_0x46e90b['body']['type'][_0x47a5('0x55')]()),_0x183b3c);})['then'](function(){return respondWithRpcPromise(_0x47a5('0x56'),'create',{'module':'chan_sip.so'});})[_0x47a5('0x1a')](function(){return _0x3adf14;});})[_0x47a5('0x1a')](respondWithResult(_0xf03bd5,0xc9))['catch'](handleError(_0xf03bd5,null));};exports[_0x47a5('0x57')]=function(_0x72fe,_0x4b706a,_0x5b6127){var _0x16b4fd;return db[_0x47a5('0x4b')][_0x47a5('0x4c')](function(_0x2931e4){return db['Network'][_0x47a5('0x58')]({'where':{'id':_0x72fe[_0x47a5('0x59')]['id']}})[_0x47a5('0x1a')](handleEntityNotFound(_0x4b706a,null))['then'](saveUpdates(_0x72fe[_0x47a5('0x4d')],null))['then'](function(_0x485e3c){if(_0x485e3c){_0x16b4fd=_0x485e3c;return db[_0x47a5('0x32')][_0x47a5('0x44')]({'where':{'type':_0x16b4fd[_0x47a5('0x4e')]},'raw':!![]});}return null;})[_0x47a5('0x1a')](function(_0x4966af){if(_0x4966af){var _0x144af9=fs['readFileSync'](path['join'](config['root'],'server/files/templates/network.ejs'),_0x47a5('0x52'));var _0x6cd4ea=ejs[_0x47a5('0x5a')](_0x144af9,{'networks':_0x4966af||[]});fs['writeFileSync'](util['format'](_0x47a5('0x54'),_0x16b4fd[_0x47a5('0x4e')][_0x47a5('0x55')]()),_0x6cd4ea);return respondWithRpcPromise(_0x47a5('0x56'),_0x47a5('0x57'),{'module':'chan_sip.so'});}return null;})[_0x47a5('0x1a')](function(_0x519e9e){if(_0x519e9e){return _0x16b4fd;}return null;});})[_0x47a5('0x1a')](respondWithResult(_0x4b706a,null))[_0x47a5('0x23')](handleError(_0x4b706a,null));};exports['destroy']=function(_0x32b4de,_0x345104,_0x132854){var _0x3e8274;return db[_0x47a5('0x32')][_0x47a5('0x58')]({'where':{'id':_0x32b4de[_0x47a5('0x59')]['id']}})[_0x47a5('0x1a')](function(_0x57ed0a){_0x3e8274=_0x57ed0a;return _0x57ed0a;})[_0x47a5('0x1a')](handleEntityNotFound(_0x345104,null))[_0x47a5('0x1a')](removeEntity(_0x345104,null))[_0x47a5('0x1a')](function(){if(_0x3e8274){return db[_0x47a5('0x32')][_0x47a5('0x44')]({'where':{'type':_0x3e8274['type']},'raw':!![]});}})[_0x47a5('0x1a')](function(_0xdfcecc){if(_0xdfcecc){var _0x1224bc=fs[_0x47a5('0x4f')](path[_0x47a5('0x50')](config[_0x47a5('0x5b')],_0x47a5('0x51')),_0x47a5('0x52'));var _0x350af8=ejs[_0x47a5('0x5a')](_0x1224bc,{'networks':_0xdfcecc||[]});fs[_0x47a5('0x5c')](util[_0x47a5('0x53')](_0x47a5('0x54'),_0x3e8274[_0x47a5('0x4e')][_0x47a5('0x55')]()),_0x350af8);return respondWithRpcPromise('Reload',_0x47a5('0x2e'),{'module':_0x47a5('0x5d')});}})[_0x47a5('0x23')](handleError(_0x345104,null));};
\ No newline at end of file
diff --git a/server/api/network/network.model.js b/server/api/network/network.model.js
index bc8fe2e..3c8611c 100644
--- a/server/api/network/network.model.js
+++ b/server/api/network/network.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x80fd=['path','rimraf','../../config/environment','exports','define','Network','../../config/logger','api','request-promise'];(function(_0x393309,_0x2ff607){var _0x2453be=function(_0x56b207){while(--_0x56b207){_0x393309['push'](_0x393309['shift']());}};_0x2453be(++_0x2ff607);}(_0x80fd,0xf0));var _0xd80f=function(_0x546ea8,_0x35e0ef){_0x546ea8=_0x546ea8-0x0;var _0x3e0074=_0x80fd[_0x546ea8];return _0x3e0074;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xd80f('0x0'))(_0xd80f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xd80f('0x2'));var fs=require('fs');var path=require(_0xd80f('0x3'));var rimraf=require(_0xd80f('0x4'));var config=require(_0xd80f('0x5'));var attributes=require('./network.attributes');module[_0xd80f('0x6')]=function(_0x7179e9,_0x2c8e53){return _0x7179e9[_0xd80f('0x7')](_0xd80f('0x8'),attributes,{'tableName':'network','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0318=['lodash','moment','bluebird','request-promise','path','rimraf','./network.attributes','exports','define','Network','network'];(function(_0x74e915,_0x5afa18){var _0x48bb75=function(_0x231f06){while(--_0x231f06){_0x74e915['push'](_0x74e915['shift']());}};_0x48bb75(++_0x5afa18);}(_0x0318,0xb0));var _0x8031=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x0318[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x8031('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x8031('0x1'));var BPromise=require(_0x8031('0x2'));var rp=require(_0x8031('0x3'));var fs=require('fs');var path=require(_0x8031('0x4'));var rimraf=require(_0x8031('0x5'));var config=require('../../config/environment');var attributes=require(_0x8031('0x6'));module[_0x8031('0x7')]=function(_0x138174,_0x3d44a7){return _0x138174[_0x8031('0x8')](_0x8031('0x9'),attributes,{'tableName':_0x8031('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/network/network.rpc.js b/server/api/network/network.rpc.js
index 560bac5..784514d 100644
--- a/server/api/network/network.rpc.js
+++ b/server/api/network/network.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8fb=['info','Network,\x20%s,\x20%s','debug','Network,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','catch','lodash','util','moment','bluebird','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http'];(function(_0x2cc842,_0xd6800d){var _0x24adab=function(_0x41ab67){while(--_0x41ab67){_0x2cc842['push'](_0x2cc842['shift']());}};_0x24adab(++_0xd6800d);}(_0xd8fb,0x99));var _0xbd8f=function(_0x33b47e,_0xde8874){_0x33b47e=_0x33b47e-0x0;var _0x4eee96=_0xd8fb[_0x33b47e];return _0x4eee96;};'use strict';var _=require(_0xbd8f('0x0'));var util=require(_0xbd8f('0x1'));var moment=require(_0xbd8f('0x2'));var BPromise=require(_0xbd8f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xbd8f('0x4'));var logger=require(_0xbd8f('0x5'))('rpc');var config=require(_0xbd8f('0x6'));var jayson=require(_0xbd8f('0x7'));var client=jayson['client'][_0xbd8f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4e97cf,_0xf503c4,_0x578499){return new BPromise(function(_0x197827,_0x403edc){return client['request'](_0x4e97cf,_0x578499)['then'](function(_0x3caa93){logger[_0xbd8f('0x9')](_0xbd8f('0xa'),_0xf503c4,'request\x20sent');logger[_0xbd8f('0xb')](_0xbd8f('0xc'),_0xf503c4,'request\x20sent',JSON['stringify'](_0x3caa93));if(_0x3caa93[_0xbd8f('0xd')]){if(_0x3caa93[_0xbd8f('0xd')][_0xbd8f('0xe')]===0x1f4){logger['error'](_0xbd8f('0xa'),_0xf503c4,_0x3caa93[_0xbd8f('0xd')][_0xbd8f('0xf')]);return _0x403edc(_0x3caa93[_0xbd8f('0xd')][_0xbd8f('0xf')]);}logger[_0xbd8f('0xd')](_0xbd8f('0xa'),_0xf503c4,_0x3caa93[_0xbd8f('0xd')][_0xbd8f('0xf')]);return _0x197827(_0x3caa93['error'][_0xbd8f('0xf')]);}else{logger[_0xbd8f('0x9')](_0xbd8f('0xa'),_0xf503c4,_0xbd8f('0x10'));_0x197827(_0x3caa93['result'][_0xbd8f('0xf')]);}})[_0xbd8f('0x11')](function(_0x5ebf8b){logger[_0xbd8f('0xd')](_0xbd8f('0xa'),_0xf503c4,_0x5ebf8b);_0x403edc(_0x5ebf8b);});});}
\ No newline at end of file
+var _0xca9e=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Network,\x20%s,\x20%s','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','util'];(function(_0x4882dc,_0x1a6680){var _0x45257f=function(_0x4f1768){while(--_0x4f1768){_0x4882dc['push'](_0x4882dc['shift']());}};_0x45257f(++_0x1a6680);}(_0xca9e,0x136));var _0xeca9=function(_0x3d5291,_0x4eb75b){_0x3d5291=_0x3d5291-0x0;var _0x2719b3=_0xca9e[_0x3d5291];return _0x2719b3;};'use strict';var _=require(_0xeca9('0x0'));var util=require(_0xeca9('0x1'));var moment=require(_0xeca9('0x2'));var BPromise=require(_0xeca9('0x3'));var rs=require(_0xeca9('0x4'));var fs=require('fs');var Redis=require(_0xeca9('0x5'));var db=require(_0xeca9('0x6'))['db'];var utils=require(_0xeca9('0x7'));var logger=require(_0xeca9('0x8'))(_0xeca9('0x9'));var config=require(_0xeca9('0xa'));var jayson=require(_0xeca9('0xb'));var client=jayson[_0xeca9('0xc')][_0xeca9('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x483e41,_0x369f5e,_0x1774f3){return new BPromise(function(_0x4d57ee,_0x4eaf49){return client[_0xeca9('0xe')](_0x483e41,_0x1774f3)[_0xeca9('0xf')](function(_0x1673b6){logger['info'](_0xeca9('0x10'),_0x369f5e,_0xeca9('0x11'));logger[_0xeca9('0x12')](_0xeca9('0x13'),_0x369f5e,_0xeca9('0x11'),JSON[_0xeca9('0x14')](_0x1673b6));if(_0x1673b6['error']){if(_0x1673b6[_0xeca9('0x15')][_0xeca9('0x16')]===0x1f4){logger['error'](_0xeca9('0x10'),_0x369f5e,_0x1673b6['error'][_0xeca9('0x17')]);return _0x4eaf49(_0x1673b6[_0xeca9('0x15')]['message']);}logger[_0xeca9('0x15')](_0xeca9('0x10'),_0x369f5e,_0x1673b6[_0xeca9('0x15')]['message']);return _0x4d57ee(_0x1673b6[_0xeca9('0x15')][_0xeca9('0x17')]);}else{logger[_0xeca9('0x18')](_0xeca9('0x10'),_0x369f5e,'request\x20sent');_0x4d57ee(_0x1673b6['result'][_0xeca9('0x17')]);}})[_0xeca9('0x19')](function(_0x553965){logger[_0xeca9('0x15')](_0xeca9('0x10'),_0x369f5e,_0x553965);_0x4eaf49(_0x553965);});});}
\ No newline at end of file
diff --git a/server/api/openchannelAccount/index.js b/server/api/openchannelAccount/index.js
index 9461255..7c3a8d5 100644
--- a/server/api/openchannelAccount/index.js
+++ b/server/api/openchannelAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5aba=['getDispositions','/:id/canned_answers','getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/users','post','create','addDisposition','/:id/notify','notify','addApplications','addAgents','/:id/send','send','put','delete','destroy','removeAnswers','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./openchannelAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/dispositions'];(function(_0x2dfd68,_0x2fa790){var _0x4a2a63=function(_0xd74a90){while(--_0xd74a90){_0x2dfd68['push'](_0x2dfd68['shift']());}};_0x4a2a63(++_0x2fa790);}(_0x5aba,0x16c));var _0xa5ab=function(_0x40a825,_0x3bac79){_0x40a825=_0x40a825-0x0;var _0x273a54=_0x5aba[_0x40a825];return _0x273a54;};'use strict';var multer=require(_0xa5ab('0x0'));var util=require(_0xa5ab('0x1'));var path=require(_0xa5ab('0x2'));var timeout=require(_0xa5ab('0x3'));var express=require(_0xa5ab('0x4'));var router=express[_0xa5ab('0x5')]();var auth=require(_0xa5ab('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xa5ab('0x7'));var controller=require(_0xa5ab('0x8'));router[_0xa5ab('0x9')]('/',auth[_0xa5ab('0xa')](),controller[_0xa5ab('0xb')]);router[_0xa5ab('0x9')](_0xa5ab('0xc'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0xd')]);router[_0xa5ab('0x9')](_0xa5ab('0xe'),auth[_0xa5ab('0xa')](),controller['show']);router[_0xa5ab('0x9')](_0xa5ab('0xf'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x10')]);router[_0xa5ab('0x9')](_0xa5ab('0x11'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x12')]);router[_0xa5ab('0x9')](_0xa5ab('0x13'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x14')]);router[_0xa5ab('0x9')](_0xa5ab('0x15'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x16')]);router[_0xa5ab('0x9')](_0xa5ab('0x17'),auth[_0xa5ab('0xa')](),controller['getAgents']);router[_0xa5ab('0x18')]('/',auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x19')]);router[_0xa5ab('0x18')](_0xa5ab('0xf'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x1a')]);router[_0xa5ab('0x18')](_0xa5ab('0x11'),auth[_0xa5ab('0xa')](),controller['addAnswer']);router[_0xa5ab('0x18')](_0xa5ab('0x1b'),controller[_0xa5ab('0x1c')]);router['post']('/:id/applications',auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x1d')]);router[_0xa5ab('0x18')](_0xa5ab('0x17'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x1e')]);router['post'](_0xa5ab('0x1f'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x20')]);router[_0xa5ab('0x21')](_0xa5ab('0xe'),auth[_0xa5ab('0xa')](),controller['update']);router[_0xa5ab('0x22')](_0xa5ab('0xe'),auth[_0xa5ab('0xa')](),controller[_0xa5ab('0x23')]);router[_0xa5ab('0x22')]('/:id/dispositions',auth['isAuthenticated'](),controller['removeDispositions']);router[_0xa5ab('0x22')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xa5ab('0x24')]);router[_0xa5ab('0x22')](_0xa5ab('0x17'),auth[_0xa5ab('0xa')](),controller['removeAgents']);module[_0xa5ab('0x25')]=router;
\ No newline at end of file
+var _0x63c9=['/describe','isAuthenticated','describe','/:id','show','/:id/canned_answers','/:id/applications','getApplications','getInteractions','/:id/users','getAgents','post','create','/:id/dispositions','addDisposition','addAnswer','/:id/notify','notify','addApplications','addAgents','/:id/send','send','update','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','connect-timeout','express','./openchannelAccount.controller','index','get'];(function(_0x3e2fcf,_0x579110){var _0x497db7=function(_0x2f713d){while(--_0x2f713d){_0x3e2fcf['push'](_0x3e2fcf['shift']());}};_0x497db7(++_0x579110);}(_0x63c9,0x111));var _0x963c=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0x63c9[_0x36ed48];return _0x51c63a;};'use strict';var multer=require(_0x963c('0x0'));var util=require(_0x963c('0x1'));var path=require('path');var timeout=require(_0x963c('0x2'));var express=require(_0x963c('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x963c('0x4'));router['get']('/',auth['isAuthenticated'](),controller[_0x963c('0x5')]);router[_0x963c('0x6')](_0x963c('0x7'),auth[_0x963c('0x8')](),controller[_0x963c('0x9')]);router[_0x963c('0x6')](_0x963c('0xa'),auth[_0x963c('0x8')](),controller[_0x963c('0xb')]);router[_0x963c('0x6')]('/:id/dispositions',auth[_0x963c('0x8')](),controller['getDispositions']);router[_0x963c('0x6')](_0x963c('0xc'),auth[_0x963c('0x8')](),controller['getAnswers']);router['get'](_0x963c('0xd'),auth[_0x963c('0x8')](),controller[_0x963c('0xe')]);router[_0x963c('0x6')]('/:id/interactions',auth[_0x963c('0x8')](),controller[_0x963c('0xf')]);router[_0x963c('0x6')](_0x963c('0x10'),auth[_0x963c('0x8')](),controller[_0x963c('0x11')]);router[_0x963c('0x12')]('/',auth['isAuthenticated'](),controller[_0x963c('0x13')]);router[_0x963c('0x12')](_0x963c('0x14'),auth[_0x963c('0x8')](),controller[_0x963c('0x15')]);router[_0x963c('0x12')](_0x963c('0xc'),auth['isAuthenticated'](),controller[_0x963c('0x16')]);router[_0x963c('0x12')](_0x963c('0x17'),controller[_0x963c('0x18')]);router[_0x963c('0x12')](_0x963c('0xd'),auth[_0x963c('0x8')](),controller[_0x963c('0x19')]);router[_0x963c('0x12')](_0x963c('0x10'),auth[_0x963c('0x8')](),controller[_0x963c('0x1a')]);router[_0x963c('0x12')](_0x963c('0x1b'),auth[_0x963c('0x8')](),controller[_0x963c('0x1c')]);router['put']('/:id',auth[_0x963c('0x8')](),controller[_0x963c('0x1d')]);router[_0x963c('0x1e')](_0x963c('0xa'),auth['isAuthenticated'](),controller['destroy']);router[_0x963c('0x1e')]('/:id/dispositions',auth[_0x963c('0x8')](),controller[_0x963c('0x1f')]);router[_0x963c('0x1e')](_0x963c('0xc'),auth[_0x963c('0x8')](),controller[_0x963c('0x20')]);router[_0x963c('0x1e')](_0x963c('0x10'),auth[_0x963c('0x8')](),controller[_0x963c('0x21')]);module[_0x963c('0x22')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.attributes.js b/server/api/openchannelAccount/openchannelAccount.attributes.js
index a84fed4..5382c36 100644
--- a/server/api/openchannelAccount/openchannelAccount.attributes.js
+++ b/server/api/openchannelAccount/openchannelAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc7c4=['Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','setDataValue','sequelize','randomstring','STRING','name','generate','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER'];(function(_0x4a7e98,_0x250137){var _0x27d10d=function(_0x378768){while(--_0x378768){_0x4a7e98['push'](_0x4a7e98['shift']());}};_0x27d10d(++_0x250137);}(_0xc7c4,0xa0));var _0x4c7c=function(_0x517ca9,_0x5d382d){_0x517ca9=_0x517ca9-0x0;var _0x1774d0=_0xc7c4[_0x517ca9];return _0x1774d0;};'use strict';var Sequelize=require(_0x4c7c('0x0'));var rs=require(_0x4c7c('0x1'));module['exports']={'name':{'type':Sequelize[_0x4c7c('0x2')],'unique':_0x4c7c('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x4c7c('0x2')]},'token':{'type':Sequelize[_0x4c7c('0x2')],'defaultValue':function(){return rs[_0x4c7c('0x4')]();}},'replyUri':{'type':Sequelize['STRING'],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x4c7c('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x4c7c('0x5')],'defaultValue':function(){return _0x4c7c('0x6');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x4c7c('0x7')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x4c7c('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x4c7c('0x2')]},'queueTransfer':{'type':Sequelize[_0x4c7c('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x4c7c('0x7')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x4c7c('0x8')],'allowNull':!![],'defaultValue':null,'comment':_0x4c7c('0x9')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x4c7c('0xa'),'set':function(_0x407038){if(!_0x407038)this['setDataValue'](_0x4c7c('0xb'),null);this[_0x4c7c('0xc')]('mandatoryDisposition',_0x407038);}}};
\ No newline at end of file
+var _0x6806=['setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','randomstring','exports','STRING','name','TEXT','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue'];(function(_0x263a74,_0xc31414){var _0x2aa86c=function(_0x382896){while(--_0x382896){_0x263a74['push'](_0x263a74['shift']());}};_0x2aa86c(++_0xc31414);}(_0x6806,0xff));var _0x6680=function(_0x2da1d1,_0x2f44eb){_0x2da1d1=_0x2da1d1-0x0;var _0x3d534e=_0x6806[_0x2da1d1];return _0x3d534e;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x6680('0x0'));module[_0x6680('0x1')]={'name':{'type':Sequelize[_0x6680('0x2')],'unique':_0x6680('0x3'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0x6680('0x2')],'defaultValue':function(){return rs['generate']();}},'replyUri':{'type':Sequelize[_0x6680('0x2')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x6680('0x4')],'defaultValue':function(){return'Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x6680('0x5')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x6680('0x5')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x6680('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x6680('0x2')]},'queueTransfer':{'type':Sequelize[_0x6680('0x5')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x6680('0x5')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x6680('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6680('0x6')],'allowNull':!![],'defaultValue':null,'comment':_0x6680('0x7')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x6680('0x8'),'set':function(_0x9fe1a0){if(!_0x9fe1a0)this[_0x6680('0x9')](_0x6680('0xa'),null);this[_0x6680('0x9')](_0x6680('0xb'),_0x9fe1a0);}}};
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.controller.js b/server/api/openchannelAccount/openchannelAccount.controller.js
index 0df3a98..246d5a8 100644
--- a/server/api/openchannelAccount/openchannelAccount.controller.js
+++ b/server/api/openchannelAccount/openchannelAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x25e6=['../../mysqldb','redis','localhost','socket.io-emitter','./openchannelAccount.socket','register','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','OpenchannelAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','save','destroy','get','UserProfileResource','stack','name','send','index','OpenchannelAccount','rawAttributes','model','query','keys','filters','intersection','fields','attributes','nolimit','sort','filter','where','merge','type','key','VIRTUAL','field','include','findAll','show','params','Pause','length','includeAll','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','OpenchannelAccounts','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','mandatoryDispositionPause','describe','addDisposition','OpnechannelAccountId','Disposition','getDispositions','findOne','hasOwnProperty','order','pick','OpenchannelAccountId','map','rows','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','notify','openchannel','Sequelize','ValidationError','createdAt','updatedAt','difference','ListId','isNil','from','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmContact','DESC','OpenchannelApplication','List','account','applications','Applications','list','priority','asc','Contacts','defaults','contact','firstName','lastName','threadId','OpenchannelInteraction','externalUrl','ContactId','spread','messageId','interaction','created','close','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','User','unshift','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','addApplications','transaction','bulkCreate','getApplications','getInteractions','Contact','fullname','color','tag','addAgents','omit','emit','userOpenchannelAccount:save','removeAgents','isArray','userOpenchannelAccount:remove','getAgents','out','Messages','dataValues','push','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment'];(function(_0x4da7e4,_0x23f4b1){var _0x3d78c9=function(_0x2c3015){while(--_0x2c3015){_0x4da7e4['push'](_0x4da7e4['shift']());}};_0x3d78c9(++_0x23f4b1);}(_0x25e6,0x162));var _0x625e=function(_0xea65fc,_0x5c7fe9){_0xea65fc=_0xea65fc-0x0;var _0x2a5655=_0x25e6[_0xea65fc];return _0x2a5655;};'use strict';var pdf=require(_0x625e('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x625e('0x1'));var zipdir=require(_0x625e('0x2'));var jsonpatch=require(_0x625e('0x3'));var rp=require(_0x625e('0x4'));var moment=require(_0x625e('0x5'));var BPromise=require(_0x625e('0x6'));var Mustache=require(_0x625e('0x7'));var util=require('util');var path=require(_0x625e('0x8'));var sox=require(_0x625e('0x9'));var csv=require(_0x625e('0xa'));var ejs=require(_0x625e('0xb'));var fs=require('fs');var _=require(_0x625e('0xc'));var squel=require(_0x625e('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x625e('0xe'));var toCsv=require('to-csv');var querystring=require(_0x625e('0xf'));var Papa=require('papaparse');var Redis=require(_0x625e('0x10'));var authService=require(_0x625e('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x625e('0x12'));var logger=require(_0x625e('0x13'))(_0x625e('0x14'));var utils=require('../../config/utils');var config=require(_0x625e('0x15'));var db=require(_0x625e('0x16'))['db'];config[_0x625e('0x17')]=_['defaults'](config[_0x625e('0x17')],{'host':_0x625e('0x18'),'port':0x18eb});var socket=require(_0x625e('0x19'))(new Redis(config[_0x625e('0x17')]));require(_0x625e('0x1a'))[_0x625e('0x1b')](socket);var jayson=require('jayson/promise');var client=jayson[_0x625e('0x1c')]['http']({'port':0x232c});var client9002=jayson[_0x625e('0x1c')][_0x625e('0x1d')]({'port':0x232a});function checkPasswordPattern(_0x52fd93,_0x4b911a,_0x11293c){if(_0x11293c){var _0x4455c5=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4455c5[_0x625e('0x1e')](_0x4b911a)){return _0x52fd93;}else{throw new Error(_0x625e('0x1f'));}}else{return _0x52fd93;}}function respondWithRpcPromise(_0x338659,_0x244d85,_0x1e710b,_0x144931){return new BPromise(function(_0x3c0785,_0x3cead9){var _0x22c6f5=_0x144931||client;return _0x22c6f5[_0x625e('0x20')](_0x338659,_0x1e710b)[_0x625e('0x21')](function(_0x2f27f3){logger[_0x625e('0x22')](_0x625e('0x23'),_0x244d85,'request\x20sent');logger[_0x625e('0x24')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x244d85,_0x625e('0x25'),JSON[_0x625e('0x26')](_0x2f27f3));if(_0x2f27f3[_0x625e('0x27')]){if(_0x2f27f3[_0x625e('0x27')][_0x625e('0x28')]===0x1f4){logger['error'](_0x625e('0x23'),_0x244d85,_0x2f27f3[_0x625e('0x27')]['message']);return _0x3cead9(_0x2f27f3[_0x625e('0x27')][_0x625e('0x29')]);}logger[_0x625e('0x27')](_0x625e('0x23'),_0x244d85,_0x2f27f3[_0x625e('0x27')][_0x625e('0x29')]);return _0x3c0785(_0x2f27f3[_0x625e('0x27')][_0x625e('0x29')]);}else{logger[_0x625e('0x22')]('OpenchannelAccount,\x20%s,\x20%s',_0x244d85,'request\x20sent');_0x3c0785(_0x2f27f3[_0x625e('0x2a')][_0x625e('0x29')]);}})[_0x625e('0x2b')](function(_0x487a17){logger[_0x625e('0x27')](_0x625e('0x23'),_0x244d85,_0x487a17);_0x3cead9(_0x487a17);});});}function respondWithStatusCode(_0x2b7411,_0x3b2a23){_0x3b2a23=_0x3b2a23||0xcc;return function(_0x1f688c){if(_0x1f688c){return _0x2b7411[_0x625e('0x2c')](_0x3b2a23);}return _0x2b7411[_0x625e('0x2d')](_0x3b2a23)[_0x625e('0x2e')]();};}function respondWithResult(_0x57ecd9,_0x234cca){_0x234cca=_0x234cca||0xc8;return function(_0x3d37bf){if(_0x3d37bf){return _0x57ecd9[_0x625e('0x2d')](_0x234cca)[_0x625e('0x2f')](_0x3d37bf);}};}function respondWithFilteredResult(_0x52f8fa,_0x2dcf65){return function(_0x5c8acf){if(_0x5c8acf){var _0x1f8dde=_0x5c8acf[_0x625e('0x30')],_0x185451=_0x2dcf65[_0x625e('0x31')],_0x90787c=_0x2dcf65[_0x625e('0x31')]+_0x2dcf65[_0x625e('0x32')],_0x307441;if(_0x90787c>=_0x1f8dde){_0x90787c=_0x1f8dde;_0x307441=0xc8;}else{_0x307441=0xce;}_0x52f8fa[_0x625e('0x2d')](_0x307441);return _0x52f8fa[_0x625e('0x33')](_0x625e('0x34'),_0x185451+'-'+_0x90787c+'/'+_0x1f8dde)['json'](_0x5c8acf);}return null;};}function patchUpdates(_0x7aaf42){return function(_0x11932e){try{jsonpatch['apply'](_0x11932e,_0x7aaf42,!![]);}catch(_0x1c6c2e){return BPromise['reject'](_0x1c6c2e);}return _0x11932e[_0x625e('0x35')]();};}function saveUpdates(_0x347a03,_0xefd21){return function(_0xc2f043){if(_0xc2f043){return _0xc2f043['update'](_0x347a03)[_0x625e('0x21')](function(_0xd26954){return _0xd26954;});}return null;};}function removeEntity(_0x2cdaf8,_0x17e7df){return function(_0x2887ee){if(_0x2887ee){return _0x2887ee[_0x625e('0x36')]()[_0x625e('0x21')](function(){var _0x58b41c=_0x2887ee[_0x625e('0x37')]({'plain':!![]});var _0x173359='OpenchannelAccounts';return db[_0x625e('0x38')][_0x625e('0x36')]({'where':{'type':_0x173359,'resourceId':_0x58b41c['id']}})[_0x625e('0x21')](function(){return _0x2887ee;});})[_0x625e('0x21')](function(){_0x2cdaf8['status'](0xcc)[_0x625e('0x2e')]();});}};}function handleEntityNotFound(_0x4dc0e0,_0x59f374){return function(_0xdcc8ce){if(!_0xdcc8ce){_0x4dc0e0[_0x625e('0x2c')](0x194);}return _0xdcc8ce;};}function handleError(_0x2ce38e,_0x494530){_0x494530=_0x494530||0x1f4;return function(_0x8febf7){logger[_0x625e('0x27')](_0x8febf7[_0x625e('0x39')]);if(_0x8febf7[_0x625e('0x3a')]){delete _0x8febf7[_0x625e('0x3a')];}_0x2ce38e[_0x625e('0x2d')](_0x494530)[_0x625e('0x3b')](_0x8febf7);};}exports[_0x625e('0x3c')]=function(_0x48ef4a,_0x29cf7f){var _0x41c677={'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x2edfad={},_0x35e5c4={'count':0x0,'rows':[]};var _0x33146=db[_0x625e('0x3d')][_0x625e('0x3e')];_0x2edfad[_0x625e('0x3f')]=_['keys'](_0x33146);_0x2edfad[_0x625e('0x40')]=_[_0x625e('0x41')](_0x48ef4a[_0x625e('0x40')]);_0x2edfad[_0x625e('0x42')]=_[_0x625e('0x43')](_0x2edfad['model'],_0x2edfad['query']);_0x41c677['attributes']=_[_0x625e('0x43')](_0x2edfad['model'],qs[_0x625e('0x44')](_0x48ef4a[_0x625e('0x40')]['fields']));_0x41c677[_0x625e('0x45')]=_0x41c677[_0x625e('0x45')]['length']?_0x41c677[_0x625e('0x45')]:_0x2edfad[_0x625e('0x3f')];if(!_0x48ef4a[_0x625e('0x40')]['hasOwnProperty'](_0x625e('0x46'))){_0x41c677[_0x625e('0x32')]=qs[_0x625e('0x32')](_0x48ef4a[_0x625e('0x40')]['limit']);_0x41c677['offset']=qs[_0x625e('0x31')](_0x48ef4a[_0x625e('0x40')][_0x625e('0x31')]);}_0x41c677['order']=qs[_0x625e('0x47')](_0x48ef4a[_0x625e('0x40')]['sort']);_0x41c677['where']=qs[_0x625e('0x42')](_['pick'](_0x48ef4a[_0x625e('0x40')],_0x2edfad[_0x625e('0x42')]));if(_0x48ef4a[_0x625e('0x40')][_0x625e('0x48')]){_0x41c677[_0x625e('0x49')]=_[_0x625e('0x4a')](_0x41c677[_0x625e('0x49')],{'$or':_['map'](_0x33146,function(_0x38198f){if(_0x38198f[_0x625e('0x4b')][_0x625e('0x4c')]!==_0x625e('0x4d')){var _0x5cc863={};_0x5cc863[_0x38198f[_0x625e('0x4e')]]={'$like':'%'+_0x48ef4a['query'][_0x625e('0x48')]+'%'};return _0x5cc863;}})});}_0x41c677=_['merge']({},_0x41c677,_0x48ef4a['options']);var _0x1cadc6={'where':_0x41c677[_0x625e('0x49')]};return db[_0x625e('0x3d')]['count'](_0x1cadc6)['then'](function(_0x452de3){_0x35e5c4[_0x625e('0x30')]=_0x452de3;if(_0x48ef4a[_0x625e('0x40')]['includeAll']){_0x41c677[_0x625e('0x4f')]=[{'all':!![]}];}return db[_0x625e('0x3d')][_0x625e('0x50')](_0x41c677);})[_0x625e('0x21')](function(_0x56b0bd){_0x35e5c4['rows']=_0x56b0bd;return _0x35e5c4;})['then'](respondWithFilteredResult(_0x29cf7f,_0x41c677))[_0x625e('0x2b')](handleError(_0x29cf7f,null));};exports[_0x625e('0x51')]=function(_0x184388,_0x5b1fa1){var _0x245ccd={'raw':![],'where':{'id':_0x184388[_0x625e('0x52')]['id']},'include':[{'model':db[_0x625e('0x53')],'as':'mandatoryDispositionPause'}]},_0x309cc8={};_0x309cc8[_0x625e('0x3f')]=_['keys'](db[_0x625e('0x3d')][_0x625e('0x3e')]);_0x309cc8[_0x625e('0x40')]=_[_0x625e('0x41')](_0x184388[_0x625e('0x40')]);_0x309cc8['filters']=_[_0x625e('0x43')](_0x309cc8[_0x625e('0x3f')],_0x309cc8['query']);_0x245ccd['attributes']=_['intersection'](_0x309cc8[_0x625e('0x3f')],qs[_0x625e('0x44')](_0x184388['query'][_0x625e('0x44')]));_0x245ccd[_0x625e('0x45')]=_0x245ccd[_0x625e('0x45')][_0x625e('0x54')]?_0x245ccd[_0x625e('0x45')]:_0x309cc8[_0x625e('0x3f')];if(_0x184388[_0x625e('0x40')][_0x625e('0x55')]){_0x245ccd['include']=[{'all':!![]}];}_0x245ccd=_[_0x625e('0x4a')]({},_0x245ccd,_0x184388[_0x625e('0x56')]);return db[_0x625e('0x3d')]['find'](_0x245ccd)[_0x625e('0x21')](handleEntityNotFound(_0x5b1fa1,null))[_0x625e('0x21')](respondWithResult(_0x5b1fa1,null))['catch'](handleError(_0x5b1fa1,null));};exports[_0x625e('0x57')]=function(_0x2b3ed0,_0x31354f){return db[_0x625e('0x3d')]['create'](_0x2b3ed0[_0x625e('0x58')],{})['then'](function(_0x571b98){var _0x2854e3=_0x2b3ed0[_0x625e('0x59')]['get']({'plain':!![]});if(!_0x2854e3)throw new Error(_0x625e('0x5a'));if(_0x2854e3[_0x625e('0x5b')]==='user'){var _0x244720=_0x571b98[_0x625e('0x37')]({'plain':!![]});var _0x341f09=_0x625e('0x5c');return db[_0x625e('0x5d')][_0x625e('0x5e')]({'where':{'name':_0x341f09,'userProfileId':_0x2854e3['userProfileId']},'raw':!![]})[_0x625e('0x21')](function(_0x3279a6){if(_0x3279a6&&_0x3279a6[_0x625e('0x5f')]===0x0){return db[_0x625e('0x38')]['create']({'name':_0x244720[_0x625e('0x3a')],'resourceId':_0x244720['id'],'type':_0x3279a6[_0x625e('0x3a')],'sectionId':_0x3279a6['id']},{})[_0x625e('0x21')](function(){return _0x571b98;});}else{return _0x571b98;}})[_0x625e('0x2b')](function(_0x1ab3aa){logger[_0x625e('0x27')](_0x625e('0x60'),_0x1ab3aa);throw _0x1ab3aa;});}return _0x571b98;})[_0x625e('0x21')](respondWithResult(_0x31354f,0xc9))['catch'](handleError(_0x31354f,null));};exports[_0x625e('0x61')]=function(_0x1653fd,_0x1fbdfc){if(_0x1653fd[_0x625e('0x58')]['id']){delete _0x1653fd[_0x625e('0x58')]['id'];}return db['OpenchannelAccount'][_0x625e('0x5e')]({'where':{'id':_0x1653fd[_0x625e('0x52')]['id']},'include':[{'model':db['Pause'],'as':_0x625e('0x62')}]})[_0x625e('0x21')](handleEntityNotFound(_0x1fbdfc,null))[_0x625e('0x21')](saveUpdates(_0x1653fd['body'],null))['then'](respondWithResult(_0x1fbdfc,null))[_0x625e('0x2b')](handleError(_0x1fbdfc,null));};exports[_0x625e('0x36')]=function(_0x2a205f,_0x1cfa54){return db[_0x625e('0x3d')][_0x625e('0x5e')]({'where':{'id':_0x2a205f[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x1cfa54,null))['then'](removeEntity(_0x1cfa54,null))[_0x625e('0x2b')](handleError(_0x1cfa54,null));};exports[_0x625e('0x63')]=function(_0x2713e9,_0x1bae74){return db[_0x625e('0x3d')]['describe']()['then'](respondWithResult(_0x1bae74,null))[_0x625e('0x2b')](handleError(_0x1bae74,null));};exports[_0x625e('0x64')]=function(_0x1a24e4,_0x25115c,_0x46c8cb){if(_0x1a24e4[_0x625e('0x58')]['id']){delete _0x1a24e4['body']['id'];}return db['OpenchannelAccount']['find']({'where':{'id':_0x1a24e4[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x25115c,null))[_0x625e('0x21')](function(_0x3e6a6f){if(_0x3e6a6f){_0x1a24e4['body'][_0x625e('0x65')]=_0x3e6a6f['id'];return db[_0x625e('0x66')][_0x625e('0x57')](_0x1a24e4['body']);}})[_0x625e('0x21')](respondWithResult(_0x25115c,null))[_0x625e('0x2b')](handleError(_0x25115c,null));};exports[_0x625e('0x67')]=function(_0x14367d,_0xeac878,_0x26cd2d){var _0x6411a8={'raw':![],'where':{}};var _0x31e87a={};var _0x25cf1f={'count':0x0,'rows':[]};return db[_0x625e('0x3d')][_0x625e('0x68')]({'where':{'id':_0x14367d['params']['id']}})[_0x625e('0x21')](handleEntityNotFound(_0xeac878,null))[_0x625e('0x21')](function(_0x37f5f6){if(_0x37f5f6){_0x31e87a[_0x625e('0x3f')]=_['keys'](db[_0x625e('0x66')]['rawAttributes']);_0x31e87a[_0x625e('0x40')]=_[_0x625e('0x41')](_0x14367d[_0x625e('0x40')]);_0x31e87a[_0x625e('0x42')]=_[_0x625e('0x43')](_0x31e87a['model'],_0x31e87a['query']);_0x6411a8[_0x625e('0x45')]=_['intersection'](_0x31e87a['model'],qs[_0x625e('0x44')](_0x14367d['query']['fields']));_0x6411a8[_0x625e('0x45')]=_0x6411a8[_0x625e('0x45')][_0x625e('0x54')]?_0x6411a8[_0x625e('0x45')]:_0x31e87a['model'];if(!_0x14367d[_0x625e('0x40')][_0x625e('0x69')](_0x625e('0x46'))){_0x6411a8[_0x625e('0x32')]=qs[_0x625e('0x32')](_0x14367d[_0x625e('0x40')][_0x625e('0x32')]);_0x6411a8['offset']=qs[_0x625e('0x31')](_0x14367d[_0x625e('0x40')][_0x625e('0x31')]);}_0x6411a8[_0x625e('0x6a')]=qs[_0x625e('0x47')](_0x14367d['query'][_0x625e('0x47')]);_0x6411a8[_0x625e('0x49')]=qs[_0x625e('0x42')](_[_0x625e('0x6b')](_0x14367d['query'],_0x31e87a[_0x625e('0x42')]));_0x6411a8[_0x625e('0x49')][_0x625e('0x6c')]=_0x37f5f6['id'];if(_0x14367d[_0x625e('0x40')][_0x625e('0x48')]){_0x6411a8['where']=_['merge'](_0x6411a8[_0x625e('0x49')],{'$or':_[_0x625e('0x6d')](_0x6411a8['attributes'],function(_0x54e7f7){var _0x496e92={};_0x496e92[_0x54e7f7]={'$like':'%'+_0x14367d[_0x625e('0x40')][_0x625e('0x48')]+'%'};return _0x496e92;})});}_0x6411a8=_[_0x625e('0x4a')]({},_0x6411a8,_0x14367d[_0x625e('0x56')]);return db['Disposition'][_0x625e('0x30')]({'where':_0x6411a8[_0x625e('0x49')]})['then'](function(_0x59a58c){_0x25cf1f[_0x625e('0x30')]=_0x59a58c;if(_0x14367d[_0x625e('0x40')][_0x625e('0x55')]){_0x6411a8[_0x625e('0x4f')]=[{'all':!![]}];}return db[_0x625e('0x66')][_0x625e('0x50')](_0x6411a8);})[_0x625e('0x21')](function(_0x3c3060){_0x25cf1f[_0x625e('0x6e')]=_0x3c3060;return _0x25cf1f;});}})[_0x625e('0x21')](respondWithFilteredResult(_0xeac878,_0x6411a8))[_0x625e('0x2b')](handleError(_0xeac878,null));};exports[_0x625e('0x6f')]=function(_0xc0b109,_0x3094c2,_0x34594a){return db['OpenchannelAccount'][_0x625e('0x5e')]({'where':{'id':_0xc0b109[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x3094c2,null))[_0x625e('0x21')](function(_0x516223){if(_0x516223){return _0x516223[_0x625e('0x6f')](_0xc0b109[_0x625e('0x40')][_0x625e('0x70')]);}})[_0x625e('0x21')](respondWithStatusCode(_0x3094c2,null))[_0x625e('0x2b')](handleError(_0x3094c2,null));};exports[_0x625e('0x71')]=function(_0x4f1578,_0x195b9a,_0x411ebd){if(_0x4f1578[_0x625e('0x58')]['id']){delete _0x4f1578[_0x625e('0x58')]['id'];}return db['OpenchannelAccount'][_0x625e('0x5e')]({'where':{'id':_0x4f1578[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x195b9a,null))['then'](function(_0x5c5976){if(_0x5c5976){_0x4f1578[_0x625e('0x58')][_0x625e('0x6c')]=_0x5c5976['id'];return db[_0x625e('0x72')][_0x625e('0x57')](_0x4f1578['body']);}})[_0x625e('0x21')](respondWithResult(_0x195b9a,null))[_0x625e('0x2b')](handleError(_0x195b9a,null));};exports[_0x625e('0x73')]=function(_0x10c67d,_0x167d24,_0x1f081b){var _0x1537c9={'raw':![],'where':{}};var _0x4ab354={};var _0x2f0b95={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0x625e('0x68')]({'where':{'id':_0x10c67d[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x167d24,null))[_0x625e('0x21')](function(_0x3e7767){if(_0x3e7767){_0x4ab354[_0x625e('0x3f')]=_['keys'](db[_0x625e('0x72')][_0x625e('0x3e')]);_0x4ab354[_0x625e('0x40')]=_[_0x625e('0x41')](_0x10c67d[_0x625e('0x40')]);_0x4ab354[_0x625e('0x42')]=_[_0x625e('0x43')](_0x4ab354[_0x625e('0x3f')],_0x4ab354[_0x625e('0x40')]);_0x1537c9[_0x625e('0x45')]=_[_0x625e('0x43')](_0x4ab354[_0x625e('0x3f')],qs[_0x625e('0x44')](_0x10c67d[_0x625e('0x40')]['fields']));_0x1537c9[_0x625e('0x45')]=_0x1537c9[_0x625e('0x45')][_0x625e('0x54')]?_0x1537c9[_0x625e('0x45')]:_0x4ab354[_0x625e('0x3f')];if(!_0x10c67d[_0x625e('0x40')]['hasOwnProperty'](_0x625e('0x46'))){_0x1537c9[_0x625e('0x32')]=qs[_0x625e('0x32')](_0x10c67d[_0x625e('0x40')][_0x625e('0x32')]);_0x1537c9[_0x625e('0x31')]=qs[_0x625e('0x31')](_0x10c67d['query'][_0x625e('0x31')]);}_0x1537c9[_0x625e('0x6a')]=qs[_0x625e('0x47')](_0x10c67d[_0x625e('0x40')][_0x625e('0x47')]);_0x1537c9[_0x625e('0x49')]=qs[_0x625e('0x42')](_[_0x625e('0x6b')](_0x10c67d['query'],_0x4ab354[_0x625e('0x42')]));_0x1537c9[_0x625e('0x49')][_0x625e('0x6c')]=_0x3e7767['id'];if(_0x10c67d[_0x625e('0x40')]['filter']){_0x1537c9[_0x625e('0x49')]=_[_0x625e('0x4a')](_0x1537c9['where'],{'$or':_['map'](_0x1537c9[_0x625e('0x45')],function(_0x510909){var _0x34e5b1={};_0x34e5b1[_0x510909]={'$like':'%'+_0x10c67d[_0x625e('0x40')][_0x625e('0x48')]+'%'};return _0x34e5b1;})});}_0x1537c9=_[_0x625e('0x4a')]({},_0x1537c9,_0x10c67d[_0x625e('0x56')]);return db['CannedAnswer'][_0x625e('0x30')]({'where':_0x1537c9['where']})[_0x625e('0x21')](function(_0x3e90bd){_0x2f0b95[_0x625e('0x30')]=_0x3e90bd;if(_0x10c67d['query'][_0x625e('0x55')]){_0x1537c9['include']=[{'all':!![]}];}return db[_0x625e('0x72')][_0x625e('0x50')](_0x1537c9);})[_0x625e('0x21')](function(_0xcdf9d7){_0x2f0b95[_0x625e('0x6e')]=_0xcdf9d7;return _0x2f0b95;});}})[_0x625e('0x21')](respondWithFilteredResult(_0x167d24,_0x1537c9))['catch'](handleError(_0x167d24,null));};exports[_0x625e('0x74')]=function(_0x2dd84b,_0x352884,_0xd2f81){return db[_0x625e('0x3d')][_0x625e('0x5e')]({'where':{'id':_0x2dd84b[_0x625e('0x52')]['id']}})['then'](handleEntityNotFound(_0x352884,null))[_0x625e('0x21')](function(_0x518b01){if(_0x518b01){return _0x518b01[_0x625e('0x74')](_0x2dd84b[_0x625e('0x40')]['ids']);}})['then'](respondWithStatusCode(_0x352884,null))[_0x625e('0x2b')](handleError(_0x352884,null));};exports[_0x625e('0x75')]=function(_0x1f7012,_0x58dd44,_0x68b29c){var _0x1dafcf={'body':_0x1f7012[_0x625e('0x58')],'channel':_0x625e('0x76')};var _0x4b8ba7=[];var _0xd3559a=[];var _0x5e1d19={};var _0x5248dd=![];return db['CmContact'][_0x625e('0x63')]()[_0x625e('0x21')](function(_0x4b323c){if(!_0x4b323c){throw new db[(_0x625e('0x77'))][(_0x625e('0x78'))]('no\x20available\x20attributes');}_0x4b8ba7=_['difference'](_['keys'](_0x4b323c),[_0x625e('0x79'),_0x625e('0x7a')]);_0xd3559a=_[_0x625e('0x7b')](_[_0x625e('0x41')](_0x4b323c),[_0x625e('0x79'),_0x625e('0x7a'),'CompanyId',_0x625e('0x7c')]);if(_0x1f7012[_0x625e('0x58')]['id']){delete _0x1f7012['body']['id'];}if(_[_0x625e('0x7d')](_0x1f7012['body'][_0x625e('0x7e')])){throw new db[(_0x625e('0x77'))][(_0x625e('0x78'))]('from\x20is\x20mandatory');}if(_[_0x625e('0x7d')](_0x1f7012['body']['body'])||_0x1f7012['body']['body']===''){throw new db[(_0x625e('0x77'))][(_0x625e('0x78'))](_0x625e('0x7f'));}if(_[_0x625e('0x7d')](_0x1f7012[_0x625e('0x58')][_0x625e('0x80')])){throw new db[(_0x625e('0x77'))][(_0x625e('0x78'))](_0x625e('0x81')+_0xd3559a);}if(!_[_0x625e('0x82')](_0xd3559a,_0x1f7012[_0x625e('0x58')][_0x625e('0x80')])){throw new db['Sequelize']['ValidationError'](_0x625e('0x83')+_0xd3559a);}_0x5e1d19[_0x1f7012[_0x625e('0x58')]['mapKey']]=_0x1f7012[_0x625e('0x58')][_0x625e('0x7e')];})[_0x625e('0x21')](function(){return db[_0x625e('0x3d')][_0x625e('0x5e')]({'where':{'id':_0x1f7012[_0x625e('0x52')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x625e('0x84')],'as':'Contacts','where':_0x5e1d19,'limit':0x1,'order':[['updatedAt',_0x625e('0x85')]]}]},{'model':db[_0x625e('0x86')],'as':'Applications'}]});})['then'](handleEntityNotFound(_0x58dd44,null))['then'](function(_0x180f3b){if(_0x180f3b&&_0x180f3b[_0x625e('0x87')]){_0x1dafcf[_0x625e('0x88')]=_0x180f3b;_0x1dafcf[_0x625e('0x89')]=_0x180f3b[_0x625e('0x8a')];_0x1dafcf[_0x625e('0x8b')]=_0x180f3b['List'];_0x1dafcf['applications']=_['orderBy'](_0x1dafcf[_0x625e('0x89')],[_0x625e('0x8c')],[_0x625e('0x8d')]);if(_0x1dafcf[_0x625e('0x88')][_0x625e('0x8a')]){delete _0x1dafcf[_0x625e('0x88')][_0x625e('0x8a')];}if(_0x1dafcf[_0x625e('0x88')]['List']&&_0x1dafcf[_0x625e('0x88')][_0x625e('0x87')][_0x625e('0x8e')][_0x625e('0x54')]){return _0x1dafcf['account'][_0x625e('0x87')][_0x625e('0x8e')][0x0];}var _0xd4a50=_[_0x625e('0x8f')](_0x1f7012[_0x625e('0x58')],{'firstName':_0x1f7012[_0x625e('0x58')][_0x625e('0x7e')],'ListId':_0x180f3b[_0x625e('0x7c')]});_0xd4a50[_0x1f7012[_0x625e('0x58')]['mapKey']]=_0x1f7012[_0x625e('0x58')][_0x625e('0x7e')];return db[_0x625e('0x84')][_0x625e('0x57')](_0xd4a50,{'fields':_0x4b8ba7,'raw':!![]});}})['then'](handleEntityNotFound(_0x58dd44,null))['then'](function(_0x3625a2){_0x1dafcf[_0x625e('0x90')]=_0x3625a2;if(_0x3625a2){var _0x581670={'ContactId':_0x3625a2['id'],'OpenchannelAccountId':_0x1f7012[_0x625e('0x52')]['id'],'from':(_0x3625a2[_0x625e('0x91')]||'')+'\x20'+(_0x3625a2[_0x625e('0x92')]||'')};var _0x4950fe={'OpenchannelAccountId':_0x1f7012[_0x625e('0x52')]['id'],'closed':![]};if(_0x1f7012[_0x625e('0x58')][_0x625e('0x93')]){_0x4950fe[_0x625e('0x93')]=_0x1f7012[_0x625e('0x58')][_0x625e('0x93')];return db[_0x625e('0x94')]['find']({'where':_0x4950fe})[_0x625e('0x21')](function(_0x1f52e9){if(_0x1f52e9){return[_0x1f52e9,![]];}_0x581670[_0x625e('0x93')]=_0x1f7012[_0x625e('0x58')]['threadId'];_0x581670[_0x625e('0x95')]=_0x1f7012[_0x625e('0x58')]['externalUrl'];return db[_0x625e('0x94')]['create'](_0x581670)[_0x625e('0x21')](function(_0x38ddc6){return[_0x38ddc6,!![]];});});}else{_0x4950fe[_0x625e('0x93')]=null;}_0x4950fe[_0x625e('0x96')]=_0x3625a2['id'];return db[_0x625e('0x94')]['find']({'where':_0x4950fe})['then'](function(_0x2a1fda){if(_0x2a1fda){return[_0x2a1fda,![]];}return db[_0x625e('0x94')]['create'](_0x581670)[_0x625e('0x21')](function(_0xfbe7fe){return[_0xfbe7fe,!![]];});});}})[_0x625e('0x97')](function(_0x223ef9,_0x450274){if(_0x223ef9){_0x5248dd=_0x450274;if(!_0x450274){var _0x31fd94={'from':(_0x1dafcf[_0x625e('0x90')]['firstName']||'')+'\x20'+(_0x1dafcf[_0x625e('0x90')][_0x625e('0x92')]||'')};if(_0x1f7012[_0x625e('0x58')][_0x625e('0x93')]&&_0x1f7012[_0x625e('0x58')]['messageId']&&_0x1f7012[_0x625e('0x58')][_0x625e('0x93')]!=_0x1f7012['body'][_0x625e('0x98')]){_0x31fd94[_0x625e('0x93')]=_0x1f7012[_0x625e('0x58')]['messageId'];}return _0x223ef9['update'](_0x31fd94);}else{return _0x223ef9;}}})[_0x625e('0x21')](function(_0x264920){_0x1dafcf['interaction']=_0x264920[_0x625e('0x37')]({'plain':!![]});_0x1dafcf[_0x625e('0x99')]['created']=_0x5248dd;if(_0x1dafcf['interaction'][_0x625e('0x9a')]){if(_0x1dafcf[_0x625e('0x88')]['autoclose']){_0x1dafcf[_0x625e('0x89')]['push']({'id':0x0,'priority':_0x1dafcf[_0x625e('0x89')]['length']+0x1,'app':_0x625e('0x9b'),'appdata':_0x625e('0x9c'),'interval':_0x625e('0x9d')});}}return db[_0x625e('0x9e')][_0x625e('0x57')]({'body':_0x1f7012[_0x625e('0x58')]['body'],'OpenchannelAccountId':_0x1f7012['params']['id'],'OpenchannelInteractionId':_0x264920['id'],'direction':'in','ContactId':_0x1dafcf[_0x625e('0x90')]['id'],'AttachmentId':_0x1f7012[_0x625e('0x58')][_0x625e('0x9f')]});})[_0x625e('0x21')](function(_0x589aa0){_0x1dafcf['message']=_0x589aa0;if(_0x1dafcf['interaction']['UserId']){return db[_0x625e('0xa0')][_0x625e('0x5e')]({'attributes':['id',_0x625e('0x3a')],'where':{'id':_0x1dafcf[_0x625e('0x99')]['UserId']}})[_0x625e('0x21')](function(_0x2ddf96){if(_0x2ddf96){_0x1dafcf['applications'][_0x625e('0xa1')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x2ddf96[_0x625e('0x3a')]+','+(_0x1dafcf[_0x625e('0x88')][_0x625e('0xa2')]||0xa),'interval':_0x625e('0x9d')});_0x1dafcf[_0x625e('0xa3')]=![];}return respondWithRpcPromise(_0x625e('0xa4'),_0x625e('0xa5'),_0x1dafcf);});}return respondWithRpcPromise('Start','startRouting',_0x1dafcf);})[_0x625e('0x21')](function(_0x2f7e78){respondWithRpcPromise(_0x625e('0xa6'),_0x625e('0xa6'),{'event':_0x625e('0x75'),'message':_0x2f7e78},client9002);return _0x2f7e78;})[_0x625e('0x21')](respondWithResult(_0x58dd44,null))[_0x625e('0x2b')](handleError(_0x58dd44,null));};exports[_0x625e('0xa7')]=function(_0x41fd1a,_0x1d65d2,_0x3ee5e8){return db[_0x625e('0x3d')]['findOne']({'where':{'id':_0x41fd1a[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x1d65d2,null))[_0x625e('0x21')](function(_0x938a0e){if(_0x938a0e){return db['sequelize'][_0x625e('0xa8')](function(_0x1a8fe5){return db['OpenchannelApplication'][_0x625e('0x36')]({'where':{'OpenchannelAccountId':_0x41fd1a[_0x625e('0x52')]['id']},'transaction':_0x1a8fe5})[_0x625e('0x21')](function(_0x19746f){var _0x5c71da=_[_0x625e('0x6d')](_0x41fd1a[_0x625e('0x58')],function(_0x18c1b4){_0x18c1b4[_0x625e('0x6c')]=_0x41fd1a['params']['id'];return _0x18c1b4;});return db['OpenchannelApplication'][_0x625e('0xa9')](_0x5c71da,{'transaction':_0x1a8fe5});});})[_0x625e('0x21')](function(){return db[_0x625e('0x86')]['findAndCountAll']({'where':{'OpenchannelAccountId':_0x41fd1a[_0x625e('0x52')]['id']},'order':_0x625e('0x8c')});});}})[_0x625e('0x21')](respondWithResult(_0x1d65d2,null))['catch'](handleError(_0x1d65d2,null));};exports[_0x625e('0xaa')]=function(_0xc07dff,_0x32e808,_0x5a6892){var _0x3ff428={};var _0x282f86={};var _0x396175;var _0x4a99a8;return db[_0x625e('0x3d')][_0x625e('0x68')]({'where':{'id':_0xc07dff['params']['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x32e808,null))[_0x625e('0x21')](function(_0x2cd5f6){if(_0x2cd5f6){_0x396175=_0x2cd5f6;_0x282f86[_0x625e('0x3f')]=_[_0x625e('0x41')](db[_0x625e('0x86')][_0x625e('0x3e')]);_0x282f86[_0x625e('0x40')]=_[_0x625e('0x41')](_0xc07dff['query']);_0x282f86[_0x625e('0x42')]=_['intersection'](_0x282f86['model'],_0x282f86[_0x625e('0x40')]);_0x3ff428[_0x625e('0x45')]=_['intersection'](_0x282f86['model'],qs['fields'](_0xc07dff[_0x625e('0x40')]['fields']));_0x3ff428[_0x625e('0x45')]=_0x3ff428[_0x625e('0x45')]['length']?_0x3ff428[_0x625e('0x45')]:_0x282f86[_0x625e('0x3f')];_0x3ff428['order']=qs[_0x625e('0x47')](_0xc07dff[_0x625e('0x40')][_0x625e('0x47')]);_0x3ff428[_0x625e('0x49')]=qs[_0x625e('0x42')](_[_0x625e('0x6b')](_0xc07dff[_0x625e('0x40')],_0x282f86[_0x625e('0x42')]));if(_0xc07dff[_0x625e('0x40')][_0x625e('0x48')]){_0x3ff428[_0x625e('0x49')]=_[_0x625e('0x4a')](_0x3ff428[_0x625e('0x49')],{'$or':_[_0x625e('0x6d')](_0x3ff428['attributes'],function(_0x17b211){var _0x3932b7={};_0x3932b7[_0x17b211]={'$like':'%'+_0xc07dff[_0x625e('0x40')][_0x625e('0x48')]+'%'};return _0x3932b7;})});}_0x3ff428=_[_0x625e('0x4a')]({},_0x3ff428,_0xc07dff[_0x625e('0x56')]);return _0x396175['getApplications'](_0x3ff428);}})['then'](function(_0x187a83){if(_0x187a83){_0x4a99a8=_0x187a83[_0x625e('0x54')];if(!_0xc07dff[_0x625e('0x40')][_0x625e('0x69')](_0x625e('0x46'))){_0x3ff428[_0x625e('0x32')]=qs['limit'](_0xc07dff[_0x625e('0x40')][_0x625e('0x32')]);_0x3ff428[_0x625e('0x31')]=qs[_0x625e('0x31')](_0xc07dff[_0x625e('0x40')][_0x625e('0x31')]);}return _0x396175['getApplications'](_0x3ff428);}})[_0x625e('0x21')](function(_0x1373ed){if(_0x1373ed){return _0x1373ed?{'count':_0x4a99a8,'rows':_0x1373ed}:null;}})[_0x625e('0x21')](respondWithResult(_0x32e808,null))[_0x625e('0x2b')](handleError(_0x32e808,null));};exports[_0x625e('0xab')]=function(_0x3ed85b,_0x3254c2,_0x325a95){var _0x2a3b53={'raw':![],'where':{}};var _0x4566cc={};var _0x11fb72={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0x625e('0x68')]({'where':{'id':_0x3ed85b[_0x625e('0x52')]['id']}})['then'](handleEntityNotFound(_0x3254c2,null))['then'](function(_0x49314b){if(_0x49314b){_0x4566cc[_0x625e('0x3f')]=_[_0x625e('0x41')](db[_0x625e('0x94')][_0x625e('0x3e')]);_0x4566cc[_0x625e('0x40')]=_['keys'](_0x3ed85b[_0x625e('0x40')]);_0x4566cc['filters']=_[_0x625e('0x43')](_0x4566cc['model'],_0x4566cc['query']);_0x2a3b53[_0x625e('0x45')]=_[_0x625e('0x43')](_0x4566cc[_0x625e('0x3f')],qs[_0x625e('0x44')](_0x3ed85b[_0x625e('0x40')][_0x625e('0x44')]));_0x2a3b53['attributes']=_0x2a3b53[_0x625e('0x45')]['length']?_0x2a3b53['attributes']:_0x4566cc[_0x625e('0x3f')];if(!_0x3ed85b[_0x625e('0x40')][_0x625e('0x69')](_0x625e('0x46'))){_0x2a3b53[_0x625e('0x32')]=qs[_0x625e('0x32')](_0x3ed85b[_0x625e('0x40')][_0x625e('0x32')]);_0x2a3b53[_0x625e('0x31')]=qs['offset'](_0x3ed85b[_0x625e('0x40')][_0x625e('0x31')]);}_0x2a3b53[_0x625e('0x6a')]=qs[_0x625e('0x47')](_0x3ed85b[_0x625e('0x40')][_0x625e('0x47')]);_0x2a3b53[_0x625e('0x49')]=qs[_0x625e('0x42')](_[_0x625e('0x6b')](_0x3ed85b['query'],_0x4566cc[_0x625e('0x42')]));_0x2a3b53[_0x625e('0x49')][_0x625e('0x6c')]=_0x49314b['id'];if(_0x3ed85b[_0x625e('0x40')][_0x625e('0x48')]){_0x2a3b53['where']=_[_0x625e('0x4a')](_0x2a3b53[_0x625e('0x49')],{'$or':_['map'](_0x2a3b53[_0x625e('0x45')],function(_0x2d3c8e){var _0xadc553={};_0xadc553[_0x2d3c8e]={'$like':'%'+_0x3ed85b[_0x625e('0x40')]['filter']+'%'};return _0xadc553;})});}_0x2a3b53=_['merge']({},_0x2a3b53,_0x3ed85b[_0x625e('0x56')]);return db['OpenchannelInteraction']['count']({'where':_0x2a3b53[_0x625e('0x49')]})[_0x625e('0x21')](function(_0x64943e){_0x11fb72[_0x625e('0x30')]=_0x64943e;if(_0x3ed85b[_0x625e('0x40')]['includeAll']){_0x2a3b53[_0x625e('0x4f')]=[{'model':db[_0x625e('0x84')],'as':_0x625e('0xac'),'required':![]},{'model':db[_0x625e('0xa0')],'as':'Owner','attributes':[_0x625e('0x3a'),_0x625e('0xad'),'internal'],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0x625e('0x3a'),_0x625e('0xae')],'where':_0x3ed85b[_0x625e('0x40')][_0x625e('0xaf')]?{'id':_0x3ed85b[_0x625e('0x40')][_0x625e('0xaf')]}:undefined,'required':_0x3ed85b[_0x625e('0x40')][_0x625e('0xaf')]?!![]:![]}];}return db[_0x625e('0x94')][_0x625e('0x50')](_0x2a3b53);})[_0x625e('0x21')](function(_0x53cd69){_0x11fb72[_0x625e('0x6e')]=_0x53cd69;return _0x11fb72;});}})[_0x625e('0x21')](respondWithFilteredResult(_0x3254c2,_0x2a3b53))[_0x625e('0x2b')](handleError(_0x3254c2,null));};exports[_0x625e('0xb0')]=function(_0x5b4f5a,_0x1e45ee,_0x42025d){return db[_0x625e('0x3d')][_0x625e('0x5e')]({'where':{'id':_0x5b4f5a['params']['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x1e45ee,null))['then'](function(_0x3839e9){if(_0x3839e9){return _0x3839e9['addAgents'](_0x5b4f5a[_0x625e('0x58')][_0x625e('0x70')],_[_0x625e('0xb1')](_0x5b4f5a['body'],[_0x625e('0x70'),'id'])||{})[_0x625e('0x97')](function(_0x18ca52){for(var _0x5bf420=0x0;_0x5bf420<_0x5b4f5a[_0x625e('0x58')][_0x625e('0x70')]['length'];_0x5bf420+=0x1){socket[_0x625e('0xb2')](_0x625e('0xb3'),{'UserId':_0x5b4f5a[_0x625e('0x58')][_0x625e('0x70')][_0x5bf420],'OpenchannelAccountId':_0x5b4f5a[_0x625e('0x52')]['id']});}return _0x18ca52;});}})['then'](respondWithResult(_0x1e45ee,null))[_0x625e('0x2b')](handleError(_0x1e45ee,null));};exports[_0x625e('0xb4')]=function(_0x1cbeef,_0x29e996,_0x578e7b){return db[_0x625e('0x3d')][_0x625e('0x5e')]({'where':{'id':_0x1cbeef['params']['id']}})['then'](handleEntityNotFound(_0x29e996,null))[_0x625e('0x21')](function(_0x33fb29){if(_0x33fb29){return _0x33fb29[_0x625e('0xb4')](_0x1cbeef['query'][_0x625e('0x70')])[_0x625e('0x21')](function(){if(_[_0x625e('0xb5')](_0x1cbeef['query'][_0x625e('0x70')])){for(var _0x58a5b0=0x0;_0x58a5b0<_0x1cbeef[_0x625e('0x40')][_0x625e('0x70')][_0x625e('0x54')];_0x58a5b0+=0x1){socket[_0x625e('0xb2')](_0x625e('0xb6'),{'UserId':Number(_0x1cbeef[_0x625e('0x40')]['ids'][_0x58a5b0]),'OpenchannelAccountId':Number(_0x1cbeef[_0x625e('0x52')]['id'])});}}else{socket['emit'](_0x625e('0xb6'),{'UserId':Number(_0x1cbeef[_0x625e('0x40')]['ids']),'OpenchannelAccountId':Number(_0x1cbeef[_0x625e('0x52')]['id'])});}});}})['then'](respondWithStatusCode(_0x29e996,null))[_0x625e('0x2b')](handleError(_0x29e996,null));};exports[_0x625e('0xb7')]=function(_0x491a81,_0x29234a,_0x2c35e9){var _0xe98ea1={};var _0x53d6b9={};var _0x5ec108;var _0x4e0646;return db[_0x625e('0x3d')][_0x625e('0x68')]({'where':{'id':_0x491a81[_0x625e('0x52')]['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x29234a,null))['then'](function(_0x324836){if(_0x324836){_0x5ec108=_0x324836;_0x53d6b9[_0x625e('0x3f')]=_[_0x625e('0x41')](db['User'][_0x625e('0x3e')]);_0x53d6b9[_0x625e('0x40')]=_[_0x625e('0x41')](_0x491a81[_0x625e('0x40')]);_0x53d6b9[_0x625e('0x42')]=_[_0x625e('0x43')](_0x53d6b9[_0x625e('0x3f')],_0x53d6b9[_0x625e('0x40')]);_0xe98ea1[_0x625e('0x45')]=_[_0x625e('0x43')](_0x53d6b9[_0x625e('0x3f')],qs['fields'](_0x491a81[_0x625e('0x40')][_0x625e('0x44')]));_0xe98ea1[_0x625e('0x45')]=_0xe98ea1[_0x625e('0x45')][_0x625e('0x54')]?_0xe98ea1['attributes']:_0x53d6b9[_0x625e('0x3f')];_0xe98ea1[_0x625e('0x6a')]=qs[_0x625e('0x47')](_0x491a81[_0x625e('0x40')][_0x625e('0x47')]);_0xe98ea1[_0x625e('0x49')]=qs[_0x625e('0x42')](_['pick'](_0x491a81[_0x625e('0x40')],_0x53d6b9[_0x625e('0x42')]));if(_0x491a81[_0x625e('0x40')][_0x625e('0x48')]){_0xe98ea1[_0x625e('0x49')]=_[_0x625e('0x4a')](_0xe98ea1[_0x625e('0x49')],{'$or':_[_0x625e('0x6d')](_0xe98ea1['attributes'],function(_0x188590){var _0x31637b={};_0x31637b[_0x188590]={'$like':'%'+_0x491a81[_0x625e('0x40')]['filter']+'%'};return _0x31637b;})});}_0xe98ea1=_[_0x625e('0x4a')]({},_0xe98ea1,_0x491a81[_0x625e('0x56')]);return _0x5ec108[_0x625e('0xb7')](_0xe98ea1);}})[_0x625e('0x21')](function(_0x54aee8){if(_0x54aee8){_0x4e0646=_0x54aee8[_0x625e('0x54')];if(!_0x491a81[_0x625e('0x40')][_0x625e('0x69')](_0x625e('0x46'))){_0xe98ea1[_0x625e('0x32')]=qs[_0x625e('0x32')](_0x491a81['query'][_0x625e('0x32')]);_0xe98ea1['offset']=qs[_0x625e('0x31')](_0x491a81[_0x625e('0x40')][_0x625e('0x31')]);}return _0x5ec108[_0x625e('0xb7')](_0xe98ea1);}})['then'](function(_0x3501eb){if(_0x3501eb){return _0x3501eb?{'count':_0x4e0646,'rows':_0x3501eb}:null;}})['then'](respondWithResult(_0x29234a,null))[_0x625e('0x2b')](handleError(_0x29234a,null));};exports[_0x625e('0x3b')]=function(_0x27d5aa,_0x336fea,_0x535472){var _0x3861b9,_0x3b56a1,_0x476938;if(_['isNil'](_0x27d5aa['body']['body'])||_0x27d5aa[_0x625e('0x58')][_0x625e('0x58')]===''){throw new db['Sequelize'][(_0x625e('0x78'))](_0x625e('0x7f'));}if(_[_0x625e('0x7d')](_0x27d5aa[_0x625e('0x58')]['to'])){}_0x3861b9=_0x27d5aa[_0x625e('0x58')]['to'];return db[_0x625e('0x3d')]['findOne']({'where':{'id':_0x27d5aa['params']['id']}})[_0x625e('0x21')](handleEntityNotFound(_0x336fea,null))[_0x625e('0x21')](function(_0xba33e3){if(_0xba33e3){return db[_0x625e('0x3d')][_0x625e('0x5e')]({'where':{'id':_0xba33e3['id']},'include':[{'model':db['CmList'],'as':_0x625e('0x87'),'include':[{'model':db[_0x625e('0x84')],'as':_0x625e('0x8e'),'where':{[_0xba33e3[_0x625e('0x80')]]:_0x3861b9},'limit':0x1,'order':[[_0x625e('0x7a'),_0x625e('0x85')]]}]}]})[_0x625e('0x21')](handleEntityNotFound(_0x336fea,null))[_0x625e('0x21')](function(_0x3d3d1a){if(_0x3d3d1a&&_0x3d3d1a['List']){_0x3b56a1=_0x3d3d1a['get']({'plain':!![]});if(_0x3b56a1[_0x625e('0x87')]&&_0x3b56a1[_0x625e('0x87')][_0x625e('0x8e')][_0x625e('0x54')]){return _0x3b56a1[_0x625e('0x87')][_0x625e('0x8e')][0x0];}return db[_0x625e('0x84')]['create'](_[_0x625e('0x8f')](_0x27d5aa[_0x625e('0x58')],{'firstName':_0x3861b9,[_0x3d3d1a['mapKey']]:_0x3861b9,'phone':_0x3861b9,'ListId':_0x3b56a1[_0x625e('0x7c')]}));}})[_0x625e('0x21')](handleEntityNotFound(_0x336fea,null))[_0x625e('0x21')](function(_0x27755b){if(_0x27755b){_0x476938=_0x27755b;return db[_0x625e('0x94')]['find']({'where':{'ContactId':_0x476938['id'],'closed':![],'OpenchannelAccountId':_0x3b56a1['id']}})[_0x625e('0x21')](function(_0x355136){if(_0x355136){return[_0x355136,![]];}return db[_0x625e('0x94')][_0x625e('0x57')]({'UserId':_0x27d5aa[_0x625e('0x59')]['id'],'ContactId':_0x476938['id'],'OpenchannelAccountId':_0x3b56a1['id'],'lastMsgDirection':_0x625e('0xb8'),'Messages':[_['merge'](_0x27d5aa[_0x625e('0x58')],{'read':![],'body':_0x27d5aa['body'][_0x625e('0x58')],'OpenchannelAccountId':_0x3b56a1['id'],'UserId':_0x27d5aa[_0x625e('0x59')]['id'],'ContactId':_0x476938['id']})]},{'include':[{'model':db[_0x625e('0x9e')],'as':_0x625e('0xb9')}]})['then'](function(_0x1d98a3){return[_0x1d98a3,!![]];});});}})[_0x625e('0x97')](function(_0x798914,_0x52006d){if(_0x52006d){return _0x798914;}return db['OpenchannelMessage'][_0x625e('0x57')](_['merge'](_0x27d5aa[_0x625e('0x58')],{'read':![],'body':_0x27d5aa[_0x625e('0x58')][_0x625e('0x58')],'OpenchannelAccountId':_0x3b56a1['id'],'OpenchannelInteractionId':_0x798914['id'],'UserId':_0x27d5aa[_0x625e('0x59')]['id'],'ContactId':_0x476938['id']}))['then'](function(_0x1bba19){_0x798914[_0x625e('0xba')][_0x625e('0xb9')]=[];_0x798914[_0x625e('0xba')][_0x625e('0xb9')][_0x625e('0xbb')](_0x1bba19[_0x625e('0xba')]);return _0x798914;});});}})[_0x625e('0x21')](respondWithResult(_0x336fea,null))[_0x625e('0x2b')](handleError(_0x336fea,null));};
\ No newline at end of file
+var _0x6c0a=['filters','pick','merge','map','type','key','VIRTUAL','field','options','includeAll','include','findAll','catch','show','params','intersection','create','body','user','role','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','mandatoryDispositionPause','describe','addDisposition','OpnechannelAccountId','Disposition','getDispositions','findOne','OpenchannelAccountId','filter','rows','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','openchannel','CmContact','ValidationError','no\x20available\x20attributes','updatedAt','difference','CompanyId','isNil','from','from\x20is\x20mandatory','Sequelize','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','DESC','OpenchannelApplication','Applications','account','list','applications','orderBy','priority','asc','Contacts','contact','firstName','lastName','threadId','externalUrl','OpenchannelInteraction','spread','messageId','interaction','created','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','notify','addApplications','sequelize','bulkCreate','findAndCountAll','getApplications','getInteractions','Contact','Owner','fullname','internal','Tags','color','tag','addAgents','omit','emit','userOpenchannelAccount:remove','getAgents','ListId','out','Messages','dataValues','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','socket.io-emitter','./openchannelAccount.socket','jayson/promise','client','http','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','OpenchannelAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','sendStatus','status','json','count','offset','Content-Range','apply','update','destroy','get','OpenchannelAccounts','UserProfileResource','then','end','stack','name','send','Pause','OpenchannelAccount','rawAttributes','model','query','keys','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where'];(function(_0x5e1c85,_0x500a3a){var _0x38e78c=function(_0x1bd3b9){while(--_0x1bd3b9){_0x5e1c85['push'](_0x5e1c85['shift']());}};_0x38e78c(++_0x500a3a);}(_0x6c0a,0x1df));var _0xa6c0=function(_0x27bf1b,_0x1e398b){_0x27bf1b=_0x27bf1b-0x0;var _0x5f2dd9=_0x6c0a[_0x27bf1b];return _0x5f2dd9;};'use strict';var pdf=require(_0xa6c0('0x0'));var emlformat=require(_0xa6c0('0x1'));var rimraf=require(_0xa6c0('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa6c0('0x3'));var rp=require(_0xa6c0('0x4'));var moment=require('moment');var BPromise=require(_0xa6c0('0x5'));var Mustache=require(_0xa6c0('0x6'));var util=require(_0xa6c0('0x7'));var path=require(_0xa6c0('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xa6c0('0x9'));var fs=require('fs');var _=require(_0xa6c0('0xa'));var squel=require('squel');var crypto=require(_0xa6c0('0xb'));var jsforce=require(_0xa6c0('0xc'));var deskjs=require(_0xa6c0('0xd'));var toCsv=require(_0xa6c0('0xe'));var querystring=require('querystring');var Papa=require(_0xa6c0('0xf'));var Redis=require(_0xa6c0('0x10'));var authService=require(_0xa6c0('0x11'));var qs=require(_0xa6c0('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa6c0('0x13'))(_0xa6c0('0x14'));var utils=require(_0xa6c0('0x15'));var config=require(_0xa6c0('0x16'));var db=require('../../mysqldb')['db'];config[_0xa6c0('0x17')]=_[_0xa6c0('0x18')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xa6c0('0x19'))(new Redis(config[_0xa6c0('0x17')]));require(_0xa6c0('0x1a'))['register'](socket);var jayson=require(_0xa6c0('0x1b'));var client=jayson[_0xa6c0('0x1c')][_0xa6c0('0x1d')]({'port':0x232c});var client9002=jayson[_0xa6c0('0x1c')]['http']({'port':0x232a});function checkPasswordPattern(_0x5ca173,_0x275f51,_0x3c8dec){if(_0x3c8dec){var _0x5749bc=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5749bc['test'](_0x275f51)){return _0x5ca173;}else{throw new Error(_0xa6c0('0x1e'));}}else{return _0x5ca173;}}function respondWithRpcPromise(_0x6bddaa,_0x676bd2,_0x58ee23,_0x48fd91){return new BPromise(function(_0x10de13,_0x1bcb0c){var _0x170818=_0x48fd91||client;return _0x170818[_0xa6c0('0x1f')](_0x6bddaa,_0x58ee23)['then'](function(_0xd62e95){logger['info'](_0xa6c0('0x20'),_0x676bd2,'request\x20sent');logger[_0xa6c0('0x21')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x676bd2,_0xa6c0('0x22'),JSON[_0xa6c0('0x23')](_0xd62e95));if(_0xd62e95['error']){if(_0xd62e95[_0xa6c0('0x24')][_0xa6c0('0x25')]===0x1f4){logger['error'](_0xa6c0('0x20'),_0x676bd2,_0xd62e95[_0xa6c0('0x24')][_0xa6c0('0x26')]);return _0x1bcb0c(_0xd62e95[_0xa6c0('0x24')][_0xa6c0('0x26')]);}logger[_0xa6c0('0x24')](_0xa6c0('0x20'),_0x676bd2,_0xd62e95[_0xa6c0('0x24')][_0xa6c0('0x26')]);return _0x10de13(_0xd62e95['error'][_0xa6c0('0x26')]);}else{logger[_0xa6c0('0x27')](_0xa6c0('0x20'),_0x676bd2,'request\x20sent');_0x10de13(_0xd62e95[_0xa6c0('0x28')][_0xa6c0('0x26')]);}})['catch'](function(_0x2b4d42){logger[_0xa6c0('0x24')]('OpenchannelAccount,\x20%s,\x20%s',_0x676bd2,_0x2b4d42);_0x1bcb0c(_0x2b4d42);});});}function respondWithStatusCode(_0x58ed59,_0x2cccf7){_0x2cccf7=_0x2cccf7||0xcc;return function(_0x23ca5d){if(_0x23ca5d){return _0x58ed59[_0xa6c0('0x29')](_0x2cccf7);}return _0x58ed59['status'](_0x2cccf7)['end']();};}function respondWithResult(_0xb71a09,_0x5ef56d){_0x5ef56d=_0x5ef56d||0xc8;return function(_0x95b666){if(_0x95b666){return _0xb71a09[_0xa6c0('0x2a')](_0x5ef56d)[_0xa6c0('0x2b')](_0x95b666);}};}function respondWithFilteredResult(_0x4c0462,_0x245472){return function(_0x4c3402){if(_0x4c3402){var _0xe01626=_0x4c3402[_0xa6c0('0x2c')],_0x1bf64b=_0x245472[_0xa6c0('0x2d')],_0x4a81a3=_0x245472[_0xa6c0('0x2d')]+_0x245472['limit'],_0x47c82d;if(_0x4a81a3>=_0xe01626){_0x4a81a3=_0xe01626;_0x47c82d=0xc8;}else{_0x47c82d=0xce;}_0x4c0462['status'](_0x47c82d);return _0x4c0462['set'](_0xa6c0('0x2e'),_0x1bf64b+'-'+_0x4a81a3+'/'+_0xe01626)[_0xa6c0('0x2b')](_0x4c3402);}return null;};}function patchUpdates(_0x1fb2dc){return function(_0x293a12){try{jsonpatch[_0xa6c0('0x2f')](_0x293a12,_0x1fb2dc,!![]);}catch(_0x55cbd3){return BPromise['reject'](_0x55cbd3);}return _0x293a12['save']();};}function saveUpdates(_0x17cf00,_0x2dcd11){return function(_0x255371){if(_0x255371){return _0x255371[_0xa6c0('0x30')](_0x17cf00)['then'](function(_0x2a1a99){return _0x2a1a99;});}return null;};}function removeEntity(_0x477012,_0x141f39){return function(_0x74dcc6){if(_0x74dcc6){return _0x74dcc6[_0xa6c0('0x31')]()['then'](function(){var _0xd40163=_0x74dcc6[_0xa6c0('0x32')]({'plain':!![]});var _0x271957=_0xa6c0('0x33');return db[_0xa6c0('0x34')][_0xa6c0('0x31')]({'where':{'type':_0x271957,'resourceId':_0xd40163['id']}})[_0xa6c0('0x35')](function(){return _0x74dcc6;});})['then'](function(){_0x477012[_0xa6c0('0x2a')](0xcc)[_0xa6c0('0x36')]();});}};}function handleEntityNotFound(_0x371db4,_0xd61752){return function(_0x4a25b3){if(!_0x4a25b3){_0x371db4[_0xa6c0('0x29')](0x194);}return _0x4a25b3;};}function handleError(_0x2a460c,_0x205b3f){_0x205b3f=_0x205b3f||0x1f4;return function(_0x5bf4a1){logger[_0xa6c0('0x24')](_0x5bf4a1[_0xa6c0('0x37')]);if(_0x5bf4a1[_0xa6c0('0x38')]){delete _0x5bf4a1[_0xa6c0('0x38')];}_0x2a460c[_0xa6c0('0x2a')](_0x205b3f)[_0xa6c0('0x39')](_0x5bf4a1);};}exports['index']=function(_0x4e14a7,_0x3dd2a9){var _0x1e447c={'include':[{'model':db[_0xa6c0('0x3a')],'as':'mandatoryDispositionPause'}]},_0x1b0b41={},_0x46c456={'count':0x0,'rows':[]};var _0x38cbcd=db[_0xa6c0('0x3b')][_0xa6c0('0x3c')];_0x1b0b41[_0xa6c0('0x3d')]=_['keys'](_0x38cbcd);_0x1b0b41[_0xa6c0('0x3e')]=_[_0xa6c0('0x3f')](_0x4e14a7['query']);_0x1b0b41['filters']=_['intersection'](_0x1b0b41[_0xa6c0('0x3d')],_0x1b0b41[_0xa6c0('0x3e')]);_0x1e447c[_0xa6c0('0x40')]=_['intersection'](_0x1b0b41[_0xa6c0('0x3d')],qs['fields'](_0x4e14a7[_0xa6c0('0x3e')][_0xa6c0('0x41')]));_0x1e447c[_0xa6c0('0x40')]=_0x1e447c['attributes'][_0xa6c0('0x42')]?_0x1e447c['attributes']:_0x1b0b41[_0xa6c0('0x3d')];if(!_0x4e14a7[_0xa6c0('0x3e')][_0xa6c0('0x43')](_0xa6c0('0x44'))){_0x1e447c[_0xa6c0('0x45')]=qs[_0xa6c0('0x45')](_0x4e14a7[_0xa6c0('0x3e')]['limit']);_0x1e447c['offset']=qs[_0xa6c0('0x2d')](_0x4e14a7[_0xa6c0('0x3e')][_0xa6c0('0x2d')]);}_0x1e447c[_0xa6c0('0x46')]=qs[_0xa6c0('0x47')](_0x4e14a7[_0xa6c0('0x3e')][_0xa6c0('0x47')]);_0x1e447c[_0xa6c0('0x48')]=qs[_0xa6c0('0x49')](_[_0xa6c0('0x4a')](_0x4e14a7[_0xa6c0('0x3e')],_0x1b0b41['filters']));if(_0x4e14a7[_0xa6c0('0x3e')]['filter']){_0x1e447c[_0xa6c0('0x48')]=_[_0xa6c0('0x4b')](_0x1e447c[_0xa6c0('0x48')],{'$or':_[_0xa6c0('0x4c')](_0x38cbcd,function(_0x18ae08){if(_0x18ae08[_0xa6c0('0x4d')][_0xa6c0('0x4e')]!==_0xa6c0('0x4f')){var _0x5ebb72={};_0x5ebb72[_0x18ae08[_0xa6c0('0x50')]]={'$like':'%'+_0x4e14a7[_0xa6c0('0x3e')]['filter']+'%'};return _0x5ebb72;}})});}_0x1e447c=_['merge']({},_0x1e447c,_0x4e14a7[_0xa6c0('0x51')]);var _0x363857={'where':_0x1e447c[_0xa6c0('0x48')]};return db[_0xa6c0('0x3b')][_0xa6c0('0x2c')](_0x363857)['then'](function(_0x374b38){_0x46c456[_0xa6c0('0x2c')]=_0x374b38;if(_0x4e14a7[_0xa6c0('0x3e')][_0xa6c0('0x52')]){_0x1e447c[_0xa6c0('0x53')]=[{'all':!![]}];}return db[_0xa6c0('0x3b')][_0xa6c0('0x54')](_0x1e447c);})[_0xa6c0('0x35')](function(_0xd8bc3c){_0x46c456['rows']=_0xd8bc3c;return _0x46c456;})[_0xa6c0('0x35')](respondWithFilteredResult(_0x3dd2a9,_0x1e447c))[_0xa6c0('0x55')](handleError(_0x3dd2a9,null));};exports[_0xa6c0('0x56')]=function(_0x587163,_0x1d06b4){var _0x2c84ac={'raw':![],'where':{'id':_0x587163[_0xa6c0('0x57')]['id']},'include':[{'model':db[_0xa6c0('0x3a')],'as':'mandatoryDispositionPause'}]},_0xabef25={};_0xabef25[_0xa6c0('0x3d')]=_['keys'](db[_0xa6c0('0x3b')][_0xa6c0('0x3c')]);_0xabef25[_0xa6c0('0x3e')]=_[_0xa6c0('0x3f')](_0x587163[_0xa6c0('0x3e')]);_0xabef25[_0xa6c0('0x49')]=_['intersection'](_0xabef25['model'],_0xabef25['query']);_0x2c84ac['attributes']=_[_0xa6c0('0x58')](_0xabef25['model'],qs[_0xa6c0('0x41')](_0x587163['query'][_0xa6c0('0x41')]));_0x2c84ac[_0xa6c0('0x40')]=_0x2c84ac['attributes'][_0xa6c0('0x42')]?_0x2c84ac[_0xa6c0('0x40')]:_0xabef25[_0xa6c0('0x3d')];if(_0x587163[_0xa6c0('0x3e')][_0xa6c0('0x52')]){_0x2c84ac[_0xa6c0('0x53')]=[{'all':!![]}];}_0x2c84ac=_[_0xa6c0('0x4b')]({},_0x2c84ac,_0x587163['options']);return db[_0xa6c0('0x3b')]['find'](_0x2c84ac)[_0xa6c0('0x35')](handleEntityNotFound(_0x1d06b4,null))[_0xa6c0('0x35')](respondWithResult(_0x1d06b4,null))[_0xa6c0('0x55')](handleError(_0x1d06b4,null));};exports[_0xa6c0('0x59')]=function(_0x2f15d6,_0x29ea79){return db[_0xa6c0('0x3b')][_0xa6c0('0x59')](_0x2f15d6[_0xa6c0('0x5a')],{})[_0xa6c0('0x35')](function(_0x5f38a2){var _0x50c6cf=_0x2f15d6[_0xa6c0('0x5b')][_0xa6c0('0x32')]({'plain':!![]});if(!_0x50c6cf)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x50c6cf[_0xa6c0('0x5c')]===_0xa6c0('0x5b')){var _0xbb4b17=_0x5f38a2[_0xa6c0('0x32')]({'plain':!![]});var _0x1b6dd5='OpenchannelAccounts';return db['UserProfileSection'][_0xa6c0('0x5d')]({'where':{'name':_0x1b6dd5,'userProfileId':_0x50c6cf[_0xa6c0('0x5e')]},'raw':!![]})[_0xa6c0('0x35')](function(_0x5164df){if(_0x5164df&&_0x5164df[_0xa6c0('0x5f')]===0x0){return db['UserProfileResource'][_0xa6c0('0x59')]({'name':_0xbb4b17[_0xa6c0('0x38')],'resourceId':_0xbb4b17['id'],'type':_0x5164df['name'],'sectionId':_0x5164df['id']},{})[_0xa6c0('0x35')](function(){return _0x5f38a2;});}else{return _0x5f38a2;}})['catch'](function(_0x1922b5){logger[_0xa6c0('0x24')](_0xa6c0('0x60'),_0x1922b5);throw _0x1922b5;});}return _0x5f38a2;})[_0xa6c0('0x35')](respondWithResult(_0x29ea79,0xc9))[_0xa6c0('0x55')](handleError(_0x29ea79,null));};exports['update']=function(_0x147fce,_0x13db62){if(_0x147fce[_0xa6c0('0x5a')]['id']){delete _0x147fce['body']['id'];}return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x147fce['params']['id']},'include':[{'model':db[_0xa6c0('0x3a')],'as':_0xa6c0('0x61')}]})[_0xa6c0('0x35')](handleEntityNotFound(_0x13db62,null))[_0xa6c0('0x35')](saveUpdates(_0x147fce[_0xa6c0('0x5a')],null))[_0xa6c0('0x35')](respondWithResult(_0x13db62,null))[_0xa6c0('0x55')](handleError(_0x13db62,null));};exports[_0xa6c0('0x31')]=function(_0x30ff70,_0x1932db){return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x30ff70[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x1932db,null))[_0xa6c0('0x35')](removeEntity(_0x1932db,null))['catch'](handleError(_0x1932db,null));};exports['describe']=function(_0x1b5dec,_0x5245ca){return db[_0xa6c0('0x3b')][_0xa6c0('0x62')]()[_0xa6c0('0x35')](respondWithResult(_0x5245ca,null))[_0xa6c0('0x55')](handleError(_0x5245ca,null));};exports[_0xa6c0('0x63')]=function(_0x49a1da,_0x30f2b4,_0x58868e){if(_0x49a1da[_0xa6c0('0x5a')]['id']){delete _0x49a1da[_0xa6c0('0x5a')]['id'];}return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x49a1da[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x30f2b4,null))[_0xa6c0('0x35')](function(_0x3194a7){if(_0x3194a7){_0x49a1da[_0xa6c0('0x5a')][_0xa6c0('0x64')]=_0x3194a7['id'];return db[_0xa6c0('0x65')]['create'](_0x49a1da[_0xa6c0('0x5a')]);}})['then'](respondWithResult(_0x30f2b4,null))[_0xa6c0('0x55')](handleError(_0x30f2b4,null));};exports[_0xa6c0('0x66')]=function(_0x3b37f4,_0x47220c,_0x14a0fc){var _0x4990df={'raw':![],'where':{}};var _0x2ca153={};var _0x35e094={'count':0x0,'rows':[]};return db[_0xa6c0('0x3b')][_0xa6c0('0x67')]({'where':{'id':_0x3b37f4[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x47220c,null))[_0xa6c0('0x35')](function(_0x262910){if(_0x262910){_0x2ca153[_0xa6c0('0x3d')]=_['keys'](db[_0xa6c0('0x65')][_0xa6c0('0x3c')]);_0x2ca153['query']=_[_0xa6c0('0x3f')](_0x3b37f4['query']);_0x2ca153[_0xa6c0('0x49')]=_[_0xa6c0('0x58')](_0x2ca153['model'],_0x2ca153[_0xa6c0('0x3e')]);_0x4990df[_0xa6c0('0x40')]=_[_0xa6c0('0x58')](_0x2ca153['model'],qs[_0xa6c0('0x41')](_0x3b37f4[_0xa6c0('0x3e')][_0xa6c0('0x41')]));_0x4990df[_0xa6c0('0x40')]=_0x4990df[_0xa6c0('0x40')][_0xa6c0('0x42')]?_0x4990df[_0xa6c0('0x40')]:_0x2ca153[_0xa6c0('0x3d')];if(!_0x3b37f4['query']['hasOwnProperty'](_0xa6c0('0x44'))){_0x4990df[_0xa6c0('0x45')]=qs[_0xa6c0('0x45')](_0x3b37f4[_0xa6c0('0x3e')]['limit']);_0x4990df[_0xa6c0('0x2d')]=qs['offset'](_0x3b37f4[_0xa6c0('0x3e')]['offset']);}_0x4990df[_0xa6c0('0x46')]=qs[_0xa6c0('0x47')](_0x3b37f4[_0xa6c0('0x3e')][_0xa6c0('0x47')]);_0x4990df[_0xa6c0('0x48')]=qs[_0xa6c0('0x49')](_[_0xa6c0('0x4a')](_0x3b37f4[_0xa6c0('0x3e')],_0x2ca153[_0xa6c0('0x49')]));_0x4990df[_0xa6c0('0x48')][_0xa6c0('0x68')]=_0x262910['id'];if(_0x3b37f4[_0xa6c0('0x3e')][_0xa6c0('0x69')]){_0x4990df[_0xa6c0('0x48')]=_[_0xa6c0('0x4b')](_0x4990df['where'],{'$or':_[_0xa6c0('0x4c')](_0x4990df['attributes'],function(_0x496b6f){var _0x442140={};_0x442140[_0x496b6f]={'$like':'%'+_0x3b37f4['query'][_0xa6c0('0x69')]+'%'};return _0x442140;})});}_0x4990df=_[_0xa6c0('0x4b')]({},_0x4990df,_0x3b37f4[_0xa6c0('0x51')]);return db[_0xa6c0('0x65')]['count']({'where':_0x4990df['where']})[_0xa6c0('0x35')](function(_0x2f1309){_0x35e094[_0xa6c0('0x2c')]=_0x2f1309;if(_0x3b37f4['query'][_0xa6c0('0x52')]){_0x4990df[_0xa6c0('0x53')]=[{'all':!![]}];}return db[_0xa6c0('0x65')]['findAll'](_0x4990df);})['then'](function(_0x488b2b){_0x35e094[_0xa6c0('0x6a')]=_0x488b2b;return _0x35e094;});}})['then'](respondWithFilteredResult(_0x47220c,_0x4990df))['catch'](handleError(_0x47220c,null));};exports[_0xa6c0('0x6b')]=function(_0xa2359b,_0x553e9c,_0x4ea18d){return db['OpenchannelAccount']['find']({'where':{'id':_0xa2359b['params']['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x553e9c,null))['then'](function(_0x222fdb){if(_0x222fdb){return _0x222fdb[_0xa6c0('0x6b')](_0xa2359b['query'][_0xa6c0('0x6c')]);}})[_0xa6c0('0x35')](respondWithStatusCode(_0x553e9c,null))['catch'](handleError(_0x553e9c,null));};exports[_0xa6c0('0x6d')]=function(_0x3ff835,_0x2d9233,_0x5ad8d2){if(_0x3ff835['body']['id']){delete _0x3ff835[_0xa6c0('0x5a')]['id'];}return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x3ff835[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x2d9233,null))[_0xa6c0('0x35')](function(_0x36e4b0){if(_0x36e4b0){_0x3ff835['body'][_0xa6c0('0x68')]=_0x36e4b0['id'];return db[_0xa6c0('0x6e')][_0xa6c0('0x59')](_0x3ff835[_0xa6c0('0x5a')]);}})['then'](respondWithResult(_0x2d9233,null))[_0xa6c0('0x55')](handleError(_0x2d9233,null));};exports[_0xa6c0('0x6f')]=function(_0x1dbb7e,_0x443ea9,_0x268e53){var _0x8175ca={'raw':![],'where':{}};var _0x1e650a={};var _0xfc9cf1={'count':0x0,'rows':[]};return db[_0xa6c0('0x3b')][_0xa6c0('0x67')]({'where':{'id':_0x1dbb7e[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x443ea9,null))[_0xa6c0('0x35')](function(_0x47c91c){if(_0x47c91c){_0x1e650a[_0xa6c0('0x3d')]=_[_0xa6c0('0x3f')](db[_0xa6c0('0x6e')][_0xa6c0('0x3c')]);_0x1e650a[_0xa6c0('0x3e')]=_[_0xa6c0('0x3f')](_0x1dbb7e[_0xa6c0('0x3e')]);_0x1e650a[_0xa6c0('0x49')]=_[_0xa6c0('0x58')](_0x1e650a[_0xa6c0('0x3d')],_0x1e650a[_0xa6c0('0x3e')]);_0x8175ca[_0xa6c0('0x40')]=_['intersection'](_0x1e650a[_0xa6c0('0x3d')],qs[_0xa6c0('0x41')](_0x1dbb7e[_0xa6c0('0x3e')][_0xa6c0('0x41')]));_0x8175ca['attributes']=_0x8175ca[_0xa6c0('0x40')][_0xa6c0('0x42')]?_0x8175ca['attributes']:_0x1e650a[_0xa6c0('0x3d')];if(!_0x1dbb7e[_0xa6c0('0x3e')][_0xa6c0('0x43')](_0xa6c0('0x44'))){_0x8175ca[_0xa6c0('0x45')]=qs[_0xa6c0('0x45')](_0x1dbb7e[_0xa6c0('0x3e')]['limit']);_0x8175ca[_0xa6c0('0x2d')]=qs[_0xa6c0('0x2d')](_0x1dbb7e[_0xa6c0('0x3e')]['offset']);}_0x8175ca['order']=qs[_0xa6c0('0x47')](_0x1dbb7e[_0xa6c0('0x3e')]['sort']);_0x8175ca['where']=qs['filters'](_[_0xa6c0('0x4a')](_0x1dbb7e[_0xa6c0('0x3e')],_0x1e650a['filters']));_0x8175ca[_0xa6c0('0x48')][_0xa6c0('0x68')]=_0x47c91c['id'];if(_0x1dbb7e[_0xa6c0('0x3e')][_0xa6c0('0x69')]){_0x8175ca[_0xa6c0('0x48')]=_[_0xa6c0('0x4b')](_0x8175ca[_0xa6c0('0x48')],{'$or':_[_0xa6c0('0x4c')](_0x8175ca[_0xa6c0('0x40')],function(_0x208fac){var _0xef0c10={};_0xef0c10[_0x208fac]={'$like':'%'+_0x1dbb7e[_0xa6c0('0x3e')][_0xa6c0('0x69')]+'%'};return _0xef0c10;})});}_0x8175ca=_[_0xa6c0('0x4b')]({},_0x8175ca,_0x1dbb7e[_0xa6c0('0x51')]);return db[_0xa6c0('0x6e')]['count']({'where':_0x8175ca[_0xa6c0('0x48')]})['then'](function(_0x47bc85){_0xfc9cf1[_0xa6c0('0x2c')]=_0x47bc85;if(_0x1dbb7e[_0xa6c0('0x3e')]['includeAll']){_0x8175ca['include']=[{'all':!![]}];}return db['CannedAnswer'][_0xa6c0('0x54')](_0x8175ca);})[_0xa6c0('0x35')](function(_0x487cbd){_0xfc9cf1[_0xa6c0('0x6a')]=_0x487cbd;return _0xfc9cf1;});}})['then'](respondWithFilteredResult(_0x443ea9,_0x8175ca))[_0xa6c0('0x55')](handleError(_0x443ea9,null));};exports[_0xa6c0('0x70')]=function(_0x593c06,_0x58b563,_0x4af3d2){return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x593c06[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x58b563,null))['then'](function(_0x3a4021){if(_0x3a4021){return _0x3a4021[_0xa6c0('0x70')](_0x593c06[_0xa6c0('0x3e')]['ids']);}})[_0xa6c0('0x35')](respondWithStatusCode(_0x58b563,null))['catch'](handleError(_0x58b563,null));};exports['notify']=function(_0x2cb380,_0x1096f6,_0x452ea8){var _0x439347={'body':_0x2cb380[_0xa6c0('0x5a')],'channel':_0xa6c0('0x71')};var _0x12066a=[];var _0x552330=[];var _0x3addd9={};var _0x2be10e=![];return db[_0xa6c0('0x72')][_0xa6c0('0x62')]()[_0xa6c0('0x35')](function(_0x4d5bd6){if(!_0x4d5bd6){throw new db['Sequelize'][(_0xa6c0('0x73'))](_0xa6c0('0x74'));}_0x12066a=_['difference'](_[_0xa6c0('0x3f')](_0x4d5bd6),['createdAt',_0xa6c0('0x75')]);_0x552330=_[_0xa6c0('0x76')](_[_0xa6c0('0x3f')](_0x4d5bd6),['createdAt','updatedAt',_0xa6c0('0x77'),'ListId']);if(_0x2cb380[_0xa6c0('0x5a')]['id']){delete _0x2cb380[_0xa6c0('0x5a')]['id'];}if(_[_0xa6c0('0x78')](_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x79')])){throw new db['Sequelize'][(_0xa6c0('0x73'))](_0xa6c0('0x7a'));}if(_[_0xa6c0('0x78')](_0x2cb380['body'][_0xa6c0('0x5a')])||_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x5a')]===''){throw new db[(_0xa6c0('0x7b'))]['ValidationError'](_0xa6c0('0x7c'));}if(_[_0xa6c0('0x78')](_0x2cb380['body']['mapKey'])){throw new db[(_0xa6c0('0x7b'))][(_0xa6c0('0x73'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x552330);}if(!_['includes'](_0x552330,_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x7d')])){throw new db['Sequelize']['ValidationError'](_0xa6c0('0x7e')+_0x552330);}_0x3addd9[_0x2cb380['body'][_0xa6c0('0x7d')]]=_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x79')];})['then'](function(){return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x2cb380['params']['id']},'include':[{'model':db[_0xa6c0('0x7f')],'as':_0xa6c0('0x80'),'include':[{'model':db[_0xa6c0('0x72')],'as':'Contacts','where':_0x3addd9,'limit':0x1,'order':[[_0xa6c0('0x75'),_0xa6c0('0x81')]]}]},{'model':db[_0xa6c0('0x82')],'as':_0xa6c0('0x83')}]});})[_0xa6c0('0x35')](handleEntityNotFound(_0x1096f6,null))[_0xa6c0('0x35')](function(_0x59a38d){if(_0x59a38d&&_0x59a38d['List']){_0x439347[_0xa6c0('0x84')]=_0x59a38d;_0x439347['applications']=_0x59a38d['Applications'];_0x439347[_0xa6c0('0x85')]=_0x59a38d['List'];_0x439347[_0xa6c0('0x86')]=_[_0xa6c0('0x87')](_0x439347[_0xa6c0('0x86')],[_0xa6c0('0x88')],[_0xa6c0('0x89')]);if(_0x439347[_0xa6c0('0x84')][_0xa6c0('0x83')]){delete _0x439347[_0xa6c0('0x84')][_0xa6c0('0x83')];}if(_0x439347[_0xa6c0('0x84')]['List']&&_0x439347['account']['List']['Contacts']['length']){return _0x439347[_0xa6c0('0x84')][_0xa6c0('0x80')][_0xa6c0('0x8a')][0x0];}var _0x269f8f=_[_0xa6c0('0x18')](_0x2cb380[_0xa6c0('0x5a')],{'firstName':_0x2cb380['body']['from'],'ListId':_0x59a38d['ListId']});_0x269f8f[_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x7d')]]=_0x2cb380['body'][_0xa6c0('0x79')];return db[_0xa6c0('0x72')][_0xa6c0('0x59')](_0x269f8f,{'fields':_0x12066a,'raw':!![]});}})[_0xa6c0('0x35')](handleEntityNotFound(_0x1096f6,null))[_0xa6c0('0x35')](function(_0x5ad4a1){_0x439347[_0xa6c0('0x8b')]=_0x5ad4a1;if(_0x5ad4a1){var _0x19f201={'ContactId':_0x5ad4a1['id'],'OpenchannelAccountId':_0x2cb380[_0xa6c0('0x57')]['id'],'from':(_0x5ad4a1[_0xa6c0('0x8c')]||'')+'\x20'+(_0x5ad4a1[_0xa6c0('0x8d')]||'')};var _0x258533={'OpenchannelAccountId':_0x2cb380[_0xa6c0('0x57')]['id'],'closed':![]};if(_0x2cb380[_0xa6c0('0x5a')]['threadId']){_0x258533[_0xa6c0('0x8e')]=_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x8e')];return db['OpenchannelInteraction'][_0xa6c0('0x5d')]({'where':_0x258533})[_0xa6c0('0x35')](function(_0x1eea17){if(_0x1eea17){return[_0x1eea17,![]];}_0x19f201[_0xa6c0('0x8e')]=_0x2cb380[_0xa6c0('0x5a')]['threadId'];_0x19f201[_0xa6c0('0x8f')]=_0x2cb380['body'][_0xa6c0('0x8f')];return db[_0xa6c0('0x90')][_0xa6c0('0x59')](_0x19f201)['then'](function(_0x1e6b91){return[_0x1e6b91,!![]];});});}else{_0x258533[_0xa6c0('0x8e')]=null;}_0x258533['ContactId']=_0x5ad4a1['id'];return db['OpenchannelInteraction'][_0xa6c0('0x5d')]({'where':_0x258533})[_0xa6c0('0x35')](function(_0x519852){if(_0x519852){return[_0x519852,![]];}return db[_0xa6c0('0x90')][_0xa6c0('0x59')](_0x19f201)[_0xa6c0('0x35')](function(_0x562526){return[_0x562526,!![]];});});}})[_0xa6c0('0x91')](function(_0x5a3239,_0x3ec83c){if(_0x5a3239){_0x2be10e=_0x3ec83c;if(!_0x3ec83c){var _0x377e1c={'from':(_0x439347['contact'][_0xa6c0('0x8c')]||'')+'\x20'+(_0x439347['contact'][_0xa6c0('0x8d')]||'')};if(_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x8e')]&&_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x92')]&&_0x2cb380[_0xa6c0('0x5a')]['threadId']!=_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x92')]){_0x377e1c[_0xa6c0('0x8e')]=_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x92')];}return _0x5a3239[_0xa6c0('0x30')](_0x377e1c);}else{return _0x5a3239;}}})[_0xa6c0('0x35')](function(_0x12186f){_0x439347[_0xa6c0('0x93')]=_0x12186f[_0xa6c0('0x32')]({'plain':!![]});_0x439347[_0xa6c0('0x93')][_0xa6c0('0x94')]=_0x2be10e;if(_0x439347[_0xa6c0('0x93')][_0xa6c0('0x94')]){if(_0x439347[_0xa6c0('0x84')]['autoclose']){_0x439347[_0xa6c0('0x86')]['push']({'id':0x0,'priority':_0x439347[_0xa6c0('0x86')][_0xa6c0('0x42')]+0x1,'app':'close','appdata':_0xa6c0('0x95'),'interval':_0xa6c0('0x96')});}}return db[_0xa6c0('0x97')][_0xa6c0('0x59')]({'body':_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x5a')],'OpenchannelAccountId':_0x2cb380['params']['id'],'OpenchannelInteractionId':_0x12186f['id'],'direction':'in','ContactId':_0x439347['contact']['id'],'AttachmentId':_0x2cb380[_0xa6c0('0x5a')][_0xa6c0('0x98')]});})[_0xa6c0('0x35')](function(_0x8e3d61){_0x439347['message']=_0x8e3d61;if(_0x439347[_0xa6c0('0x93')][_0xa6c0('0x99')]){return db[_0xa6c0('0x9a')][_0xa6c0('0x5d')]({'attributes':['id',_0xa6c0('0x38')],'where':{'id':_0x439347[_0xa6c0('0x93')]['UserId']}})[_0xa6c0('0x35')](function(_0x46848b){if(_0x46848b){_0x439347['applications'][_0xa6c0('0x9b')]({'id':0x0,'priority':0x0,'app':_0xa6c0('0x9c'),'appdata':_0x46848b[_0xa6c0('0x38')]+','+(_0x439347[_0xa6c0('0x84')][_0xa6c0('0x9d')]||0xa),'interval':'*,*,*,*'});_0x439347[_0xa6c0('0x9e')]=![];}return respondWithRpcPromise(_0xa6c0('0x9f'),_0xa6c0('0xa0'),_0x439347);});}return respondWithRpcPromise(_0xa6c0('0x9f'),_0xa6c0('0xa0'),_0x439347);})['then'](function(_0x5ef85f){respondWithRpcPromise('EventManager','EventManager',{'event':_0xa6c0('0xa1'),'message':_0x5ef85f},client9002);return _0x5ef85f;})['then'](respondWithResult(_0x1096f6,null))[_0xa6c0('0x55')](handleError(_0x1096f6,null));};exports[_0xa6c0('0xa2')]=function(_0x3d8803,_0x5468be,_0x28e5d6){return db[_0xa6c0('0x3b')]['findOne']({'where':{'id':_0x3d8803[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x5468be,null))['then'](function(_0x2ea5ac){if(_0x2ea5ac){return db[_0xa6c0('0xa3')]['transaction'](function(_0x41a7fe){return db[_0xa6c0('0x82')][_0xa6c0('0x31')]({'where':{'OpenchannelAccountId':_0x3d8803[_0xa6c0('0x57')]['id']},'transaction':_0x41a7fe})[_0xa6c0('0x35')](function(_0x3b4ae1){var _0x4f64f7=_[_0xa6c0('0x4c')](_0x3d8803[_0xa6c0('0x5a')],function(_0x49a42d){_0x49a42d[_0xa6c0('0x68')]=_0x3d8803[_0xa6c0('0x57')]['id'];return _0x49a42d;});return db[_0xa6c0('0x82')][_0xa6c0('0xa4')](_0x4f64f7,{'transaction':_0x41a7fe});});})[_0xa6c0('0x35')](function(){return db[_0xa6c0('0x82')][_0xa6c0('0xa5')]({'where':{'OpenchannelAccountId':_0x3d8803[_0xa6c0('0x57')]['id']},'order':_0xa6c0('0x88')});});}})['then'](respondWithResult(_0x5468be,null))['catch'](handleError(_0x5468be,null));};exports[_0xa6c0('0xa6')]=function(_0x302767,_0x7443f9,_0x1925ca){var _0x4bba3f={};var _0x32b7b6={};var _0x14aa19;var _0x1f717d;return db[_0xa6c0('0x3b')][_0xa6c0('0x67')]({'where':{'id':_0x302767[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x7443f9,null))[_0xa6c0('0x35')](function(_0x453f06){if(_0x453f06){_0x14aa19=_0x453f06;_0x32b7b6[_0xa6c0('0x3d')]=_[_0xa6c0('0x3f')](db[_0xa6c0('0x82')][_0xa6c0('0x3c')]);_0x32b7b6['query']=_[_0xa6c0('0x3f')](_0x302767[_0xa6c0('0x3e')]);_0x32b7b6[_0xa6c0('0x49')]=_[_0xa6c0('0x58')](_0x32b7b6['model'],_0x32b7b6[_0xa6c0('0x3e')]);_0x4bba3f[_0xa6c0('0x40')]=_[_0xa6c0('0x58')](_0x32b7b6['model'],qs[_0xa6c0('0x41')](_0x302767[_0xa6c0('0x3e')][_0xa6c0('0x41')]));_0x4bba3f[_0xa6c0('0x40')]=_0x4bba3f[_0xa6c0('0x40')][_0xa6c0('0x42')]?_0x4bba3f['attributes']:_0x32b7b6[_0xa6c0('0x3d')];_0x4bba3f[_0xa6c0('0x46')]=qs['sort'](_0x302767[_0xa6c0('0x3e')][_0xa6c0('0x47')]);_0x4bba3f[_0xa6c0('0x48')]=qs[_0xa6c0('0x49')](_[_0xa6c0('0x4a')](_0x302767[_0xa6c0('0x3e')],_0x32b7b6['filters']));if(_0x302767[_0xa6c0('0x3e')][_0xa6c0('0x69')]){_0x4bba3f[_0xa6c0('0x48')]=_['merge'](_0x4bba3f[_0xa6c0('0x48')],{'$or':_[_0xa6c0('0x4c')](_0x4bba3f[_0xa6c0('0x40')],function(_0x4c2eb4){var _0x4bca1e={};_0x4bca1e[_0x4c2eb4]={'$like':'%'+_0x302767[_0xa6c0('0x3e')][_0xa6c0('0x69')]+'%'};return _0x4bca1e;})});}_0x4bba3f=_['merge']({},_0x4bba3f,_0x302767['options']);return _0x14aa19['getApplications'](_0x4bba3f);}})['then'](function(_0x50a9cb){if(_0x50a9cb){_0x1f717d=_0x50a9cb[_0xa6c0('0x42')];if(!_0x302767['query'][_0xa6c0('0x43')]('nolimit')){_0x4bba3f['limit']=qs[_0xa6c0('0x45')](_0x302767[_0xa6c0('0x3e')][_0xa6c0('0x45')]);_0x4bba3f[_0xa6c0('0x2d')]=qs[_0xa6c0('0x2d')](_0x302767[_0xa6c0('0x3e')]['offset']);}return _0x14aa19[_0xa6c0('0xa6')](_0x4bba3f);}})[_0xa6c0('0x35')](function(_0x34f44d){if(_0x34f44d){return _0x34f44d?{'count':_0x1f717d,'rows':_0x34f44d}:null;}})['then'](respondWithResult(_0x7443f9,null))[_0xa6c0('0x55')](handleError(_0x7443f9,null));};exports[_0xa6c0('0xa7')]=function(_0xf81622,_0xd0ce5d,_0xc8407f){var _0x487120={'raw':![],'where':{}};var _0x18b61b={};var _0x5a993e={'count':0x0,'rows':[]};return db[_0xa6c0('0x3b')][_0xa6c0('0x67')]({'where':{'id':_0xf81622[_0xa6c0('0x57')]['id']}})['then'](handleEntityNotFound(_0xd0ce5d,null))[_0xa6c0('0x35')](function(_0x433dd5){if(_0x433dd5){_0x18b61b[_0xa6c0('0x3d')]=_[_0xa6c0('0x3f')](db[_0xa6c0('0x90')][_0xa6c0('0x3c')]);_0x18b61b['query']=_[_0xa6c0('0x3f')](_0xf81622[_0xa6c0('0x3e')]);_0x18b61b['filters']=_[_0xa6c0('0x58')](_0x18b61b['model'],_0x18b61b[_0xa6c0('0x3e')]);_0x487120[_0xa6c0('0x40')]=_['intersection'](_0x18b61b['model'],qs[_0xa6c0('0x41')](_0xf81622['query']['fields']));_0x487120[_0xa6c0('0x40')]=_0x487120[_0xa6c0('0x40')]['length']?_0x487120[_0xa6c0('0x40')]:_0x18b61b[_0xa6c0('0x3d')];if(!_0xf81622[_0xa6c0('0x3e')]['hasOwnProperty'](_0xa6c0('0x44'))){_0x487120[_0xa6c0('0x45')]=qs[_0xa6c0('0x45')](_0xf81622[_0xa6c0('0x3e')]['limit']);_0x487120[_0xa6c0('0x2d')]=qs[_0xa6c0('0x2d')](_0xf81622[_0xa6c0('0x3e')][_0xa6c0('0x2d')]);}_0x487120[_0xa6c0('0x46')]=qs[_0xa6c0('0x47')](_0xf81622[_0xa6c0('0x3e')]['sort']);_0x487120[_0xa6c0('0x48')]=qs[_0xa6c0('0x49')](_[_0xa6c0('0x4a')](_0xf81622[_0xa6c0('0x3e')],_0x18b61b[_0xa6c0('0x49')]));_0x487120[_0xa6c0('0x48')][_0xa6c0('0x68')]=_0x433dd5['id'];if(_0xf81622['query'][_0xa6c0('0x69')]){_0x487120['where']=_[_0xa6c0('0x4b')](_0x487120[_0xa6c0('0x48')],{'$or':_[_0xa6c0('0x4c')](_0x487120[_0xa6c0('0x40')],function(_0x28abd2){var _0x6badca={};_0x6badca[_0x28abd2]={'$like':'%'+_0xf81622[_0xa6c0('0x3e')]['filter']+'%'};return _0x6badca;})});}_0x487120=_[_0xa6c0('0x4b')]({},_0x487120,_0xf81622[_0xa6c0('0x51')]);return db[_0xa6c0('0x90')][_0xa6c0('0x2c')]({'where':_0x487120[_0xa6c0('0x48')]})[_0xa6c0('0x35')](function(_0x15f40){_0x5a993e[_0xa6c0('0x2c')]=_0x15f40;if(_0xf81622[_0xa6c0('0x3e')][_0xa6c0('0x52')]){_0x487120[_0xa6c0('0x53')]=[{'model':db[_0xa6c0('0x72')],'as':_0xa6c0('0xa8'),'required':![]},{'model':db[_0xa6c0('0x9a')],'as':_0xa6c0('0xa9'),'attributes':[_0xa6c0('0x38'),_0xa6c0('0xaa'),_0xa6c0('0xab')],'required':![]},{'model':db['Tag'],'as':_0xa6c0('0xac'),'attributes':['id','name',_0xa6c0('0xad')],'where':_0xf81622[_0xa6c0('0x3e')][_0xa6c0('0xae')]?{'id':_0xf81622[_0xa6c0('0x3e')][_0xa6c0('0xae')]}:undefined,'required':_0xf81622[_0xa6c0('0x3e')][_0xa6c0('0xae')]?!![]:![]}];}return db['OpenchannelInteraction']['findAll'](_0x487120);})['then'](function(_0x346d6a){_0x5a993e[_0xa6c0('0x6a')]=_0x346d6a;return _0x5a993e;});}})[_0xa6c0('0x35')](respondWithFilteredResult(_0xd0ce5d,_0x487120))[_0xa6c0('0x55')](handleError(_0xd0ce5d,null));};exports[_0xa6c0('0xaf')]=function(_0xc4c2ff,_0x634295,_0x4931c7){return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0xc4c2ff[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x634295,null))[_0xa6c0('0x35')](function(_0x53f086){if(_0x53f086){return _0x53f086[_0xa6c0('0xaf')](_0xc4c2ff[_0xa6c0('0x5a')][_0xa6c0('0x6c')],_[_0xa6c0('0xb0')](_0xc4c2ff[_0xa6c0('0x5a')],[_0xa6c0('0x6c'),'id'])||{})[_0xa6c0('0x91')](function(_0x4f2db3){for(var _0x3372e6=0x0;_0x3372e6<_0xc4c2ff[_0xa6c0('0x5a')][_0xa6c0('0x6c')][_0xa6c0('0x42')];_0x3372e6+=0x1){socket[_0xa6c0('0xb1')]('userOpenchannelAccount:save',{'UserId':_0xc4c2ff[_0xa6c0('0x5a')][_0xa6c0('0x6c')][_0x3372e6],'OpenchannelAccountId':_0xc4c2ff[_0xa6c0('0x57')]['id']});}return _0x4f2db3;});}})[_0xa6c0('0x35')](respondWithResult(_0x634295,null))['catch'](handleError(_0x634295,null));};exports['removeAgents']=function(_0x54acd6,_0x282a9e,_0xfa48fc){return db[_0xa6c0('0x3b')][_0xa6c0('0x5d')]({'where':{'id':_0x54acd6[_0xa6c0('0x57')]['id']}})['then'](handleEntityNotFound(_0x282a9e,null))['then'](function(_0x1ea7a0){if(_0x1ea7a0){return _0x1ea7a0['removeAgents'](_0x54acd6['query']['ids'])[_0xa6c0('0x35')](function(){if(_['isArray'](_0x54acd6[_0xa6c0('0x3e')][_0xa6c0('0x6c')])){for(var _0x395d02=0x0;_0x395d02<_0x54acd6[_0xa6c0('0x3e')]['ids']['length'];_0x395d02+=0x1){socket['emit'](_0xa6c0('0xb2'),{'UserId':Number(_0x54acd6['query'][_0xa6c0('0x6c')][_0x395d02]),'OpenchannelAccountId':Number(_0x54acd6[_0xa6c0('0x57')]['id'])});}}else{socket[_0xa6c0('0xb1')](_0xa6c0('0xb2'),{'UserId':Number(_0x54acd6[_0xa6c0('0x3e')][_0xa6c0('0x6c')]),'OpenchannelAccountId':Number(_0x54acd6[_0xa6c0('0x57')]['id'])});}});}})[_0xa6c0('0x35')](respondWithStatusCode(_0x282a9e,null))[_0xa6c0('0x55')](handleError(_0x282a9e,null));};exports['getAgents']=function(_0x1d1f75,_0x32c2ae,_0xcbdd32){var _0x4d11eb={};var _0x5d73cb={};var _0x214350;var _0x3db6bf;return db['OpenchannelAccount']['findOne']({'where':{'id':_0x1d1f75[_0xa6c0('0x57')]['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0x32c2ae,null))['then'](function(_0x22077f){if(_0x22077f){_0x214350=_0x22077f;_0x5d73cb['model']=_[_0xa6c0('0x3f')](db[_0xa6c0('0x9a')]['rawAttributes']);_0x5d73cb[_0xa6c0('0x3e')]=_[_0xa6c0('0x3f')](_0x1d1f75[_0xa6c0('0x3e')]);_0x5d73cb[_0xa6c0('0x49')]=_[_0xa6c0('0x58')](_0x5d73cb[_0xa6c0('0x3d')],_0x5d73cb[_0xa6c0('0x3e')]);_0x4d11eb[_0xa6c0('0x40')]=_[_0xa6c0('0x58')](_0x5d73cb[_0xa6c0('0x3d')],qs[_0xa6c0('0x41')](_0x1d1f75[_0xa6c0('0x3e')]['fields']));_0x4d11eb[_0xa6c0('0x40')]=_0x4d11eb['attributes']['length']?_0x4d11eb[_0xa6c0('0x40')]:_0x5d73cb['model'];_0x4d11eb[_0xa6c0('0x46')]=qs[_0xa6c0('0x47')](_0x1d1f75['query'][_0xa6c0('0x47')]);_0x4d11eb[_0xa6c0('0x48')]=qs[_0xa6c0('0x49')](_[_0xa6c0('0x4a')](_0x1d1f75[_0xa6c0('0x3e')],_0x5d73cb['filters']));if(_0x1d1f75[_0xa6c0('0x3e')][_0xa6c0('0x69')]){_0x4d11eb['where']=_[_0xa6c0('0x4b')](_0x4d11eb[_0xa6c0('0x48')],{'$or':_[_0xa6c0('0x4c')](_0x4d11eb['attributes'],function(_0x4d1614){var _0x365068={};_0x365068[_0x4d1614]={'$like':'%'+_0x1d1f75[_0xa6c0('0x3e')]['filter']+'%'};return _0x365068;})});}_0x4d11eb=_['merge']({},_0x4d11eb,_0x1d1f75[_0xa6c0('0x51')]);return _0x214350['getAgents'](_0x4d11eb);}})[_0xa6c0('0x35')](function(_0x44e88e){if(_0x44e88e){_0x3db6bf=_0x44e88e['length'];if(!_0x1d1f75['query'][_0xa6c0('0x43')](_0xa6c0('0x44'))){_0x4d11eb['limit']=qs['limit'](_0x1d1f75['query'][_0xa6c0('0x45')]);_0x4d11eb[_0xa6c0('0x2d')]=qs[_0xa6c0('0x2d')](_0x1d1f75[_0xa6c0('0x3e')][_0xa6c0('0x2d')]);}return _0x214350[_0xa6c0('0xb3')](_0x4d11eb);}})['then'](function(_0x5608a2){if(_0x5608a2){return _0x5608a2?{'count':_0x3db6bf,'rows':_0x5608a2}:null;}})[_0xa6c0('0x35')](respondWithResult(_0x32c2ae,null))['catch'](handleError(_0x32c2ae,null));};exports[_0xa6c0('0x39')]=function(_0xfa997b,_0xb22a09,_0x2aa683){var _0x4ce640,_0x22789b,_0x4e39c0;if(_[_0xa6c0('0x78')](_0xfa997b[_0xa6c0('0x5a')]['body'])||_0xfa997b['body']['body']===''){throw new db[(_0xa6c0('0x7b'))]['ValidationError']('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xa6c0('0x78')](_0xfa997b[_0xa6c0('0x5a')]['to'])){}_0x4ce640=_0xfa997b[_0xa6c0('0x5a')]['to'];return db[_0xa6c0('0x3b')]['findOne']({'where':{'id':_0xfa997b['params']['id']}})[_0xa6c0('0x35')](handleEntityNotFound(_0xb22a09,null))['then'](function(_0x19bffc){if(_0x19bffc){return db['OpenchannelAccount'][_0xa6c0('0x5d')]({'where':{'id':_0x19bffc['id']},'include':[{'model':db[_0xa6c0('0x7f')],'as':_0xa6c0('0x80'),'include':[{'model':db[_0xa6c0('0x72')],'as':_0xa6c0('0x8a'),'where':{[_0x19bffc[_0xa6c0('0x7d')]]:_0x4ce640},'limit':0x1,'order':[[_0xa6c0('0x75'),'DESC']]}]}]})[_0xa6c0('0x35')](handleEntityNotFound(_0xb22a09,null))[_0xa6c0('0x35')](function(_0x352620){if(_0x352620&&_0x352620[_0xa6c0('0x80')]){_0x22789b=_0x352620[_0xa6c0('0x32')]({'plain':!![]});if(_0x22789b[_0xa6c0('0x80')]&&_0x22789b['List'][_0xa6c0('0x8a')][_0xa6c0('0x42')]){return _0x22789b[_0xa6c0('0x80')]['Contacts'][0x0];}return db['CmContact'][_0xa6c0('0x59')](_[_0xa6c0('0x18')](_0xfa997b[_0xa6c0('0x5a')],{'firstName':_0x4ce640,[_0x352620[_0xa6c0('0x7d')]]:_0x4ce640,'phone':_0x4ce640,'ListId':_0x22789b[_0xa6c0('0xb4')]}));}})[_0xa6c0('0x35')](handleEntityNotFound(_0xb22a09,null))['then'](function(_0x5db7fa){if(_0x5db7fa){_0x4e39c0=_0x5db7fa;return db[_0xa6c0('0x90')][_0xa6c0('0x5d')]({'where':{'ContactId':_0x4e39c0['id'],'closed':![],'OpenchannelAccountId':_0x22789b['id']}})[_0xa6c0('0x35')](function(_0x339307){if(_0x339307){return[_0x339307,![]];}return db[_0xa6c0('0x90')]['create']({'UserId':_0xfa997b[_0xa6c0('0x5b')]['id'],'ContactId':_0x4e39c0['id'],'OpenchannelAccountId':_0x22789b['id'],'lastMsgDirection':_0xa6c0('0xb5'),'Messages':[_[_0xa6c0('0x4b')](_0xfa997b[_0xa6c0('0x5a')],{'read':![],'body':_0xfa997b[_0xa6c0('0x5a')]['body'],'OpenchannelAccountId':_0x22789b['id'],'UserId':_0xfa997b[_0xa6c0('0x5b')]['id'],'ContactId':_0x4e39c0['id']})]},{'include':[{'model':db[_0xa6c0('0x97')],'as':_0xa6c0('0xb6')}]})[_0xa6c0('0x35')](function(_0x2d6c16){return[_0x2d6c16,!![]];});});}})[_0xa6c0('0x91')](function(_0x4bab71,_0x2a348e){if(_0x2a348e){return _0x4bab71;}return db[_0xa6c0('0x97')][_0xa6c0('0x59')](_[_0xa6c0('0x4b')](_0xfa997b[_0xa6c0('0x5a')],{'read':![],'body':_0xfa997b[_0xa6c0('0x5a')][_0xa6c0('0x5a')],'OpenchannelAccountId':_0x22789b['id'],'OpenchannelInteractionId':_0x4bab71['id'],'UserId':_0xfa997b[_0xa6c0('0x5b')]['id'],'ContactId':_0x4e39c0['id']}))[_0xa6c0('0x35')](function(_0x27a273){_0x4bab71[_0xa6c0('0xb7')]['Messages']=[];_0x4bab71['dataValues']['Messages']['push'](_0x27a273['dataValues']);return _0x4bab71;});});}})[_0xa6c0('0x35')](respondWithResult(_0xb22a09,null))['catch'](handleError(_0xb22a09,null));};
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.events.js b/server/api/openchannelAccount/openchannelAccount.events.js
index 7d55239..2f9c2e6 100644
--- a/server/api/openchannelAccount/openchannelAccount.events.js
+++ b/server/api/openchannelAccount/openchannelAccount.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e38=['exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','save','update','remove','emit','hook'];(function(_0x1e1af1,_0x4978eb){var _0x218f8c=function(_0x19707e){while(--_0x19707e){_0x1e1af1['push'](_0x1e1af1['shift']());}};_0x218f8c(++_0x4978eb);}(_0x9e38,0x155));var _0x89e3=function(_0x1551af,_0x5223c3){_0x1551af=_0x1551af-0x0;var _0xd8eb82=_0x9e38[_0x1551af];return _0xd8eb82;};'use strict';var EventEmitter=require(_0x89e3('0x0'));var OpenchannelAccount=require(_0x89e3('0x1'))['db'][_0x89e3('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x89e3('0x3')](0x0);var events={'afterCreate':_0x89e3('0x4'),'afterUpdate':_0x89e3('0x5'),'afterDestroy':_0x89e3('0x6')};function emitEvent(_0x3bba4f){return function(_0x27d472,_0x18b12e,_0x298e6f){OpenchannelAccountEvents[_0x89e3('0x7')](_0x3bba4f+':'+_0x27d472['id'],_0x27d472);OpenchannelAccountEvents[_0x89e3('0x7')](_0x3bba4f,_0x27d472);_0x298e6f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount[_0x89e3('0x8')](e,emitEvent(event));}}module[_0x89e3('0x9')]=OpenchannelAccountEvents;
\ No newline at end of file
+var _0x4fdd=['OpenchannelAccount','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x563abb,_0x45249a){var _0x27a9db=function(_0x4cad81){while(--_0x4cad81){_0x563abb['push'](_0x563abb['shift']());}};_0x27a9db(++_0x45249a);}(_0x4fdd,0x17f));var _0xd4fd=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x4fdd[_0x4565bf];return _0x5610ba;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0xd4fd('0x0'))['db'][_0xd4fd('0x1')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xd4fd('0x2'),'afterDestroy':_0xd4fd('0x3')};function emitEvent(_0x10769b){return function(_0x1fc11c,_0x2f254d,_0x2f2caf){OpenchannelAccountEvents[_0xd4fd('0x4')](_0x10769b+':'+_0x1fc11c['id'],_0x1fc11c);OpenchannelAccountEvents[_0xd4fd('0x4')](_0x10769b,_0x1fc11c);_0x2f2caf(null);};}for(var e in events){if(events[_0xd4fd('0x5')](e)){var event=events[e];OpenchannelAccount[_0xd4fd('0x6')](e,emitEvent(event));}}module[_0xd4fd('0x7')]=OpenchannelAccountEvents;
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.model.js b/server/api/openchannelAccount/openchannelAccount.model.js
index ba9d9fb..19c9781 100644
--- a/server/api/openchannelAccount/openchannelAccount.model.js
+++ b/server/api/openchannelAccount/openchannelAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcf71=['exports','define','OpenchannelAccount','openchannel_accounts','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelAccount.attributes'];(function(_0x37fae9,_0x588a5f){var _0x2093af=function(_0x4ea97d){while(--_0x4ea97d){_0x37fae9['push'](_0x37fae9['shift']());}};_0x2093af(++_0x588a5f);}(_0xcf71,0xba));var _0x1cf7=function(_0x595324,_0x5c25fc){_0x595324=_0x595324-0x0;var _0x506510=_0xcf71[_0x595324];return _0x506510;};'use strict';var _=require(_0x1cf7('0x0'));var util=require(_0x1cf7('0x1'));var logger=require(_0x1cf7('0x2'))(_0x1cf7('0x3'));var moment=require('moment');var BPromise=require(_0x1cf7('0x4'));var rp=require(_0x1cf7('0x5'));var fs=require('fs');var path=require(_0x1cf7('0x6'));var rimraf=require(_0x1cf7('0x7'));var config=require(_0x1cf7('0x8'));var attributes=require(_0x1cf7('0x9'));module[_0x1cf7('0xa')]=function(_0x20e097,_0x314796){return _0x20e097[_0x1cf7('0xb')](_0x1cf7('0xc'),attributes,{'tableName':_0x1cf7('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3ab0=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','OpenchannelAccount','openchannel_accounts'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0x3ab0,0xb6));var _0x03ab=function(_0x292e1e,_0x56466f){_0x292e1e=_0x292e1e-0x0;var _0x56f51b=_0x3ab0[_0x292e1e];return _0x56f51b;};'use strict';var _=require(_0x03ab('0x0'));var util=require(_0x03ab('0x1'));var logger=require(_0x03ab('0x2'))(_0x03ab('0x3'));var moment=require(_0x03ab('0x4'));var BPromise=require(_0x03ab('0x5'));var rp=require(_0x03ab('0x6'));var fs=require('fs');var path=require(_0x03ab('0x7'));var rimraf=require(_0x03ab('0x8'));var config=require(_0x03ab('0x9'));var attributes=require('./openchannelAccount.attributes');module[_0x03ab('0xa')]=function(_0x24e6fb,_0x367129){return _0x24e6fb[_0x03ab('0xb')](_0x03ab('0xc'),attributes,{'tableName':_0x03ab('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.rpc.js b/server/api/openchannelAccount/openchannelAccount.rpc.js
index c218092..c0d4add 100644
--- a/server/api/openchannelAccount/openchannelAccount.rpc.js
+++ b/server/api/openchannelAccount/openchannelAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc4aa=['redis','defaults','./openchannelAccount.socket','register','request','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x1c27b3,_0x5ee6a9){var _0x2b1ce2=function(_0x3f18ee){while(--_0x3f18ee){_0x1c27b3['push'](_0x1c27b3['shift']());}};_0x2b1ce2(++_0x5ee6a9);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x4f9b18,_0x2cb5ca){_0x4f9b18=_0x4f9b18-0x0;var _0x29f20c=_0xc4aa[_0x4f9b18];return _0x29f20c;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});config[_0xac4a('0xb')]=_[_0xac4a('0xc')](config[_0xac4a('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xac4a('0xb')]));require(_0xac4a('0xd'))[_0xac4a('0xe')](socket);function respondWithRpcPromise(_0x4f4146,_0x1d182e,_0x3a82de){return new BPromise(function(_0x3e64f5,_0x4d4acc){return client[_0xac4a('0xf')](_0x4f4146,_0x3a82de)['then'](function(_0x2f062c){logger['info'](_0xac4a('0x10'),_0x1d182e,_0xac4a('0x11'));logger[_0xac4a('0x12')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x1d182e,_0xac4a('0x11'),JSON[_0xac4a('0x13')](_0x2f062c));if(_0x2f062c[_0xac4a('0x14')]){if(_0x2f062c[_0xac4a('0x14')][_0xac4a('0x15')]===0x1f4){logger[_0xac4a('0x14')](_0xac4a('0x10'),_0x1d182e,_0x2f062c[_0xac4a('0x14')][_0xac4a('0x16')]);return _0x4d4acc(_0x2f062c[_0xac4a('0x14')][_0xac4a('0x16')]);}logger[_0xac4a('0x14')]('OpenchannelAccount,\x20%s,\x20%s',_0x1d182e,_0x2f062c[_0xac4a('0x14')][_0xac4a('0x16')]);return _0x3e64f5(_0x2f062c[_0xac4a('0x14')][_0xac4a('0x16')]);}else{logger[_0xac4a('0x17')](_0xac4a('0x10'),_0x1d182e,_0xac4a('0x11'));_0x3e64f5(_0x2f062c[_0xac4a('0x18')]['message']);}})['catch'](function(_0x21a729){logger[_0xac4a('0x14')](_0xac4a('0x10'),_0x1d182e,_0x21a729);_0x4d4acc(_0x21a729);});});}
\ No newline at end of file
+var _0xe14b=['ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','redis','defaults','./openchannelAccount.socket','register','request','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring'];(function(_0x1d79a1,_0x1c4bac){var _0x5e5ed1=function(_0xd39dd8){while(--_0xd39dd8){_0x1d79a1['push'](_0x1d79a1['shift']());}};_0x5e5ed1(++_0x1c4bac);}(_0xe14b,0x93));var _0xbe14=function(_0x2d74e4,_0x4543c4){_0x2d74e4=_0x2d74e4-0x0;var _0x4868cb=_0xe14b[_0x2d74e4];return _0x4868cb;};'use strict';var _=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbe14('0x2'));var fs=require('fs');var Redis=require(_0xbe14('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xbe14('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xbe14('0x5'));var jayson=require(_0xbe14('0x6'));var client=jayson[_0xbe14('0x7')][_0xbe14('0x8')]({'port':0x232a});config[_0xbe14('0x9')]=_[_0xbe14('0xa')](config[_0xbe14('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xbe14('0xb'))[_0xbe14('0xc')](socket);function respondWithRpcPromise(_0xd68cd7,_0x90b4f,_0x53c7ea){return new BPromise(function(_0x5b9fc6,_0x113243){return client[_0xbe14('0xd')](_0xd68cd7,_0x53c7ea)['then'](function(_0x254c3b){logger[_0xbe14('0xe')](_0xbe14('0xf'),_0x90b4f,_0xbe14('0x10'));logger[_0xbe14('0x11')](_0xbe14('0x12'),_0x90b4f,_0xbe14('0x10'),JSON[_0xbe14('0x13')](_0x254c3b));if(_0x254c3b[_0xbe14('0x14')]){if(_0x254c3b[_0xbe14('0x14')][_0xbe14('0x15')]===0x1f4){logger[_0xbe14('0x14')](_0xbe14('0xf'),_0x90b4f,_0x254c3b['error']['message']);return _0x113243(_0x254c3b[_0xbe14('0x14')][_0xbe14('0x16')]);}logger[_0xbe14('0x14')](_0xbe14('0xf'),_0x90b4f,_0x254c3b['error'][_0xbe14('0x16')]);return _0x5b9fc6(_0x254c3b[_0xbe14('0x14')][_0xbe14('0x16')]);}else{logger[_0xbe14('0xe')](_0xbe14('0xf'),_0x90b4f,_0xbe14('0x10'));_0x5b9fc6(_0x254c3b[_0xbe14('0x17')]['message']);}})[_0xbe14('0x18')](function(_0x456ca8){logger[_0xbe14('0x14')](_0xbe14('0xf'),_0x90b4f,_0x456ca8);_0x113243(_0x456ca8);});});}
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.socket.js b/server/api/openchannelAccount/openchannelAccount.socket.js
index a64b3e4..c63364d 100644
--- a/server/api/openchannelAccount/openchannelAccount.socket.js
+++ b/server/api/openchannelAccount/openchannelAccount.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5a75=['removeListener','length','openchannelAccount:','./openchannelAccount.events','save','update','emit'];(function(_0x3b5e02,_0x535469){var _0x59464c=function(_0x2d11cb){while(--_0x2d11cb){_0x3b5e02['push'](_0x3b5e02['shift']());}};_0x59464c(++_0x535469);}(_0x5a75,0x7a));var _0x55a7=function(_0x3dd8dd,_0x369f8e){_0x3dd8dd=_0x3dd8dd-0x0;var _0x33e300=_0x5a75[_0x3dd8dd];return _0x33e300;};'use strict';var OpenchannelAccountEvents=require(_0x55a7('0x0'));var events=[_0x55a7('0x1'),'remove',_0x55a7('0x2')];function createListener(_0x3bba50,_0x1576d6){return function(_0x23cdb7){_0x1576d6[_0x55a7('0x3')](_0x3bba50,_0x23cdb7);};}function removeListener(_0xcf05cc,_0x517c2a){return function(){OpenchannelAccountEvents[_0x55a7('0x4')](_0xcf05cc,_0x517c2a);};}exports['register']=function(_0x1265f4){for(var _0x1da2e5=0x0,_0x18fba2=events[_0x55a7('0x5')];_0x1da2e5<_0x18fba2;_0x1da2e5++){var _0x1d6022=events[_0x1da2e5];var _0x2d0897=createListener(_0x55a7('0x6')+_0x1d6022,_0x1265f4);OpenchannelAccountEvents['on'](_0x1d6022,_0x2d0897);}};
\ No newline at end of file
+var _0x5e62=['register','length','openchannelAccount:','./openchannelAccount.events','save','remove','update','emit','removeListener'];(function(_0x144311,_0x144892){var _0x17f0be=function(_0x256dc7){while(--_0x256dc7){_0x144311['push'](_0x144311['shift']());}};_0x17f0be(++_0x144892);}(_0x5e62,0xc0));var _0x25e6=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0x5e62[_0x1d1779];return _0x2377e9;};'use strict';var OpenchannelAccountEvents=require(_0x25e6('0x0'));var events=[_0x25e6('0x1'),_0x25e6('0x2'),_0x25e6('0x3')];function createListener(_0x48f673,_0x4fba20){return function(_0x54e0a2){_0x4fba20[_0x25e6('0x4')](_0x48f673,_0x54e0a2);};}function removeListener(_0x5d3c00,_0x30a80f){return function(){OpenchannelAccountEvents[_0x25e6('0x5')](_0x5d3c00,_0x30a80f);};}exports[_0x25e6('0x6')]=function(_0x100f90){for(var _0x5cce7a=0x0,_0x4bcf48=events[_0x25e6('0x7')];_0x5cce7a<_0x4bcf48;_0x5cce7a++){var _0x54a19e=events[_0x5cce7a];var _0x586b62=createListener(_0x25e6('0x8')+_0x54a19e,_0x100f90);OpenchannelAccountEvents['on'](_0x54a19e,_0x586b62);}};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/index.js b/server/api/openchannelApplication/index.js
index 2bfed54..b359860 100644
--- a/server/api/openchannelApplication/index.js
+++ b/server/api/openchannelApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8e6f=['create','put','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelApplication.controller','get','isAuthenticated','index','/:id','show'];(function(_0x5c4f6b,_0x2cdfce){var _0x104c4e=function(_0x31171b){while(--_0x31171b){_0x5c4f6b['push'](_0x5c4f6b['shift']());}};_0x104c4e(++_0x2cdfce);}(_0x8e6f,0x1f3));var _0xf8e6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8e6f[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xf8e6('0x0'));var util=require('util');var path=require(_0xf8e6('0x1'));var timeout=require(_0xf8e6('0x2'));var express=require(_0xf8e6('0x3'));var router=express[_0xf8e6('0x4')]();var auth=require(_0xf8e6('0x5'));var interaction=require(_0xf8e6('0x6'));var config=require(_0xf8e6('0x7'));var controller=require(_0xf8e6('0x8'));router[_0xf8e6('0x9')]('/',auth[_0xf8e6('0xa')](),controller[_0xf8e6('0xb')]);router[_0xf8e6('0x9')](_0xf8e6('0xc'),auth[_0xf8e6('0xa')](),controller[_0xf8e6('0xd')]);router['post']('/',auth[_0xf8e6('0xa')](),controller[_0xf8e6('0xe')]);router[_0xf8e6('0xf')](_0xf8e6('0xc'),auth[_0xf8e6('0xa')](),controller[_0xf8e6('0x10')]);router[_0xf8e6('0x11')](_0xf8e6('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0xf8e6('0x12')]=router;
\ No newline at end of file
+var _0xba01=['util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./openchannelApplication.controller','get','index','/:id','isAuthenticated','show','create','update','delete','destroy','exports','multer'];(function(_0x127f9e,_0x4512f6){var _0x1131db=function(_0x38ac11){while(--_0x38ac11){_0x127f9e['push'](_0x127f9e['shift']());}};_0x1131db(++_0x4512f6);}(_0xba01,0x109));var _0x1ba0=function(_0x7618c3,_0x3330d8){_0x7618c3=_0x7618c3-0x0;var _0x10d8dd=_0xba01[_0x7618c3];return _0x10d8dd;};'use strict';var multer=require(_0x1ba0('0x0'));var util=require(_0x1ba0('0x1'));var path=require(_0x1ba0('0x2'));var timeout=require(_0x1ba0('0x3'));var express=require(_0x1ba0('0x4'));var router=express[_0x1ba0('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x1ba0('0x6'));var config=require(_0x1ba0('0x7'));var controller=require(_0x1ba0('0x8'));router[_0x1ba0('0x9')]('/',auth['isAuthenticated'](),controller[_0x1ba0('0xa')]);router[_0x1ba0('0x9')](_0x1ba0('0xb'),auth[_0x1ba0('0xc')](),controller[_0x1ba0('0xd')]);router['post']('/',auth[_0x1ba0('0xc')](),controller[_0x1ba0('0xe')]);router['put'](_0x1ba0('0xb'),auth[_0x1ba0('0xc')](),controller[_0x1ba0('0xf')]);router[_0x1ba0('0x10')]('/:id',auth[_0x1ba0('0xc')](),controller[_0x1ba0('0x11')]);module[_0x1ba0('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.attributes.js b/server/api/openchannelApplication/openchannelApplication.attributes.js
index 23601f9..dbfae8e 100644
--- a/server/api/openchannelApplication/openchannelApplication.attributes.js
+++ b/server/api/openchannelApplication/openchannelApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcc97=['STRING','noop','TEXT','*,*,*,*','sequelize','exports'];(function(_0x31de3e,_0x2bba6c){var _0xc55be=function(_0x580f8b){while(--_0x580f8b){_0x31de3e['push'](_0x31de3e['shift']());}};_0xc55be(++_0x2bba6c);}(_0xcc97,0x1a8));var _0x7cc9=function(_0xb6db1f,_0x207e63){_0xb6db1f=_0xb6db1f-0x0;var _0x54d82f=_0xcc97[_0xb6db1f];return _0x54d82f;};'use strict';var Sequelize=require(_0x7cc9('0x0'));module[_0x7cc9('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x7cc9('0x2')],'allowNull':![],'defaultValue':_0x7cc9('0x3')},'appdata':{'type':Sequelize[_0x7cc9('0x4')]()},'description':{'type':Sequelize[_0x7cc9('0x2')]},'interval':{'type':Sequelize[_0x7cc9('0x2')],'defaultValue':_0x7cc9('0x5')}};
\ No newline at end of file
+var _0x199c=['noop','TEXT','STRING','sequelize','exports','INTEGER'];(function(_0x374d39,_0x4328c4){var _0x50c9ad=function(_0x3f3b19){while(--_0x3f3b19){_0x374d39['push'](_0x374d39['shift']());}};_0x50c9ad(++_0x4328c4);}(_0x199c,0x7b));var _0xc199=function(_0x205476,_0xa57f7c){_0x205476=_0x205476-0x0;var _0x1237da=_0x199c[_0x205476];return _0x1237da;};'use strict';var Sequelize=require(_0xc199('0x0'));module[_0xc199('0x1')]={'priority':{'type':Sequelize[_0xc199('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xc199('0x3')},'appdata':{'type':Sequelize[_0xc199('0x4')]()},'description':{'type':Sequelize[_0xc199('0x5')]},'interval':{'type':Sequelize['STRING'],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.controller.js b/server/api/openchannelApplication/openchannelApplication.controller.js
index b88947a..8280135 100644
--- a/server/api/openchannelApplication/openchannelApplication.controller.js
+++ b/server/api/openchannelApplication/openchannelApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x92ba=['hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','show','params','intersection','find','create','update','body','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','then','error','stack','name','send','index','OpenchannelApplication','rawAttributes','keys','query','model','attributes','fields','length'];(function(_0x32e61d,_0x5733b7){var _0x4db536=function(_0x23cdfb){while(--_0x23cdfb){_0x32e61d['push'](_0x32e61d['shift']());}};_0x4db536(++_0x5733b7);}(_0x92ba,0x17c));var _0xa92b=function(_0x485fd3,_0xc9b3b9){_0x485fd3=_0x485fd3-0x0;var _0x13f6c8=_0x92ba[_0x485fd3];return _0x13f6c8;};'use strict';var pdf=require(_0xa92b('0x0'));var emlformat=require(_0xa92b('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa92b('0x2'));var jsonpatch=require(_0xa92b('0x3'));var rp=require(_0xa92b('0x4'));var moment=require(_0xa92b('0x5'));var BPromise=require(_0xa92b('0x6'));var Mustache=require('mustache');var util=require(_0xa92b('0x7'));var path=require(_0xa92b('0x8'));var sox=require(_0xa92b('0x9'));var csv=require(_0xa92b('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xa92b('0xb'));var squel=require(_0xa92b('0xc'));var crypto=require('crypto');var jsforce=require(_0xa92b('0xd'));var deskjs=require(_0xa92b('0xe'));var toCsv=require(_0xa92b('0xa'));var querystring=require(_0xa92b('0xf'));var Papa=require(_0xa92b('0x10'));var Redis=require(_0xa92b('0x11'));var authService=require(_0xa92b('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xa92b('0x13'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xa92b('0x14'))['db'];function respondWithStatusCode(_0x1e3955,_0x118c37){_0x118c37=_0x118c37||0xcc;return function(_0x370c0e){if(_0x370c0e){return _0x1e3955[_0xa92b('0x15')](_0x118c37);}return _0x1e3955[_0xa92b('0x16')](_0x118c37)[_0xa92b('0x17')]();};}function respondWithResult(_0x450038,_0x3aeda8){_0x3aeda8=_0x3aeda8||0xc8;return function(_0x51c833){if(_0x51c833){return _0x450038[_0xa92b('0x16')](_0x3aeda8)[_0xa92b('0x18')](_0x51c833);}};}function respondWithFilteredResult(_0x4745f3,_0x6d715d){return function(_0x1b297d){if(_0x1b297d){var _0x192b70=_0x1b297d[_0xa92b('0x19')],_0x354088=_0x6d715d['offset'],_0x408ed2=_0x6d715d[_0xa92b('0x1a')]+_0x6d715d[_0xa92b('0x1b')],_0x1d90d2;if(_0x408ed2>=_0x192b70){_0x408ed2=_0x192b70;_0x1d90d2=0xc8;}else{_0x1d90d2=0xce;}_0x4745f3[_0xa92b('0x16')](_0x1d90d2);return _0x4745f3[_0xa92b('0x1c')](_0xa92b('0x1d'),_0x354088+'-'+_0x408ed2+'/'+_0x192b70)[_0xa92b('0x18')](_0x1b297d);}return null;};}function patchUpdates(_0x5905e4){return function(_0xa2edd1){try{jsonpatch['apply'](_0xa2edd1,_0x5905e4,!![]);}catch(_0x44df31){return BPromise[_0xa92b('0x1e')](_0x44df31);}return _0xa2edd1[_0xa92b('0x1f')]();};}function saveUpdates(_0x3e1234,_0x212e93){return function(_0x2e2e71){if(_0x2e2e71){return _0x2e2e71['update'](_0x3e1234)[_0xa92b('0x20')](function(_0x42eb92){return _0x42eb92;});}return null;};}function removeEntity(_0x725cb8,_0x50a894){return function(_0x31cb2){if(_0x31cb2){return _0x31cb2['destroy']()[_0xa92b('0x20')](function(){_0x725cb8[_0xa92b('0x16')](0xcc)[_0xa92b('0x17')]();});}};}function handleEntityNotFound(_0x5517c4,_0x75fb18){return function(_0x4c22bc){if(!_0x4c22bc){_0x5517c4['sendStatus'](0x194);}return _0x4c22bc;};}function handleError(_0x48ed66,_0x4db41e){_0x4db41e=_0x4db41e||0x1f4;return function(_0x2b9a9f){logger[_0xa92b('0x21')](_0x2b9a9f[_0xa92b('0x22')]);if(_0x2b9a9f[_0xa92b('0x23')]){delete _0x2b9a9f['name'];}_0x48ed66['status'](_0x4db41e)[_0xa92b('0x24')](_0x2b9a9f);};}exports[_0xa92b('0x25')]=function(_0x12d631,_0x532cbb){var _0x4e5e69={},_0x300de3={},_0x563527={'count':0x0,'rows':[]};var _0x35fc73=db[_0xa92b('0x26')][_0xa92b('0x27')];_0x300de3['model']=_[_0xa92b('0x28')](_0x35fc73);_0x300de3[_0xa92b('0x29')]=_[_0xa92b('0x28')](_0x12d631['query']);_0x300de3['filters']=_['intersection'](_0x300de3[_0xa92b('0x2a')],_0x300de3['query']);_0x4e5e69[_0xa92b('0x2b')]=_['intersection'](_0x300de3['model'],qs[_0xa92b('0x2c')](_0x12d631[_0xa92b('0x29')][_0xa92b('0x2c')]));_0x4e5e69[_0xa92b('0x2b')]=_0x4e5e69[_0xa92b('0x2b')][_0xa92b('0x2d')]?_0x4e5e69[_0xa92b('0x2b')]:_0x300de3[_0xa92b('0x2a')];if(!_0x12d631[_0xa92b('0x29')][_0xa92b('0x2e')](_0xa92b('0x2f'))){_0x4e5e69[_0xa92b('0x1b')]=qs[_0xa92b('0x1b')](_0x12d631['query'][_0xa92b('0x1b')]);_0x4e5e69['offset']=qs[_0xa92b('0x1a')](_0x12d631[_0xa92b('0x29')][_0xa92b('0x1a')]);}_0x4e5e69[_0xa92b('0x30')]=qs[_0xa92b('0x31')](_0x12d631[_0xa92b('0x29')]['sort']);_0x4e5e69[_0xa92b('0x32')]=qs[_0xa92b('0x33')](_[_0xa92b('0x34')](_0x12d631['query'],_0x300de3[_0xa92b('0x33')]));if(_0x12d631['query'][_0xa92b('0x35')]){_0x4e5e69[_0xa92b('0x32')]=_[_0xa92b('0x36')](_0x4e5e69[_0xa92b('0x32')],{'$or':_['map'](_0x35fc73,function(_0x2a1be2){if(_0x2a1be2['type'][_0xa92b('0x37')]!==_0xa92b('0x38')){var _0x19abcb={};_0x19abcb[_0x2a1be2[_0xa92b('0x39')]]={'$like':'%'+_0x12d631[_0xa92b('0x29')][_0xa92b('0x35')]+'%'};return _0x19abcb;}})});}_0x4e5e69=_[_0xa92b('0x36')]({},_0x4e5e69,_0x12d631[_0xa92b('0x3a')]);var _0x4af404={'where':_0x4e5e69[_0xa92b('0x32')]};return db['OpenchannelApplication'][_0xa92b('0x19')](_0x4af404)[_0xa92b('0x20')](function(_0x144bec){_0x563527[_0xa92b('0x19')]=_0x144bec;if(_0x12d631[_0xa92b('0x29')][_0xa92b('0x3b')]){_0x4e5e69[_0xa92b('0x3c')]=[{'all':!![]}];}return db['OpenchannelApplication'][_0xa92b('0x3d')](_0x4e5e69);})[_0xa92b('0x20')](function(_0x54d31a){_0x563527[_0xa92b('0x3e')]=_0x54d31a;return _0x563527;})[_0xa92b('0x20')](respondWithFilteredResult(_0x532cbb,_0x4e5e69))[_0xa92b('0x3f')](handleError(_0x532cbb,null));};exports[_0xa92b('0x40')]=function(_0x145036,_0x3904a1){var _0x364d67={'raw':!![],'where':{'id':_0x145036[_0xa92b('0x41')]['id']}},_0x4390a4={};_0x4390a4[_0xa92b('0x2a')]=_[_0xa92b('0x28')](db[_0xa92b('0x26')][_0xa92b('0x27')]);_0x4390a4[_0xa92b('0x29')]=_[_0xa92b('0x28')](_0x145036[_0xa92b('0x29')]);_0x4390a4[_0xa92b('0x33')]=_['intersection'](_0x4390a4['model'],_0x4390a4[_0xa92b('0x29')]);_0x364d67[_0xa92b('0x2b')]=_[_0xa92b('0x42')](_0x4390a4[_0xa92b('0x2a')],qs['fields'](_0x145036['query'][_0xa92b('0x2c')]));_0x364d67[_0xa92b('0x2b')]=_0x364d67['attributes'][_0xa92b('0x2d')]?_0x364d67['attributes']:_0x4390a4[_0xa92b('0x2a')];if(_0x145036[_0xa92b('0x29')]['includeAll']){_0x364d67['include']=[{'all':!![]}];}_0x364d67=_['merge']({},_0x364d67,_0x145036[_0xa92b('0x3a')]);return db[_0xa92b('0x26')][_0xa92b('0x43')](_0x364d67)[_0xa92b('0x20')](handleEntityNotFound(_0x3904a1,null))[_0xa92b('0x20')](respondWithResult(_0x3904a1,null))[_0xa92b('0x3f')](handleError(_0x3904a1,null));};exports[_0xa92b('0x44')]=function(_0x26acd0,_0x3b9e30){return db[_0xa92b('0x26')][_0xa92b('0x44')](_0x26acd0['body'],{})[_0xa92b('0x20')](respondWithResult(_0x3b9e30,0xc9))[_0xa92b('0x3f')](handleError(_0x3b9e30,null));};exports[_0xa92b('0x45')]=function(_0x289234,_0x14e91e){if(_0x289234[_0xa92b('0x46')]['id']){delete _0x289234[_0xa92b('0x46')]['id'];}return db[_0xa92b('0x26')]['find']({'where':{'id':_0x289234[_0xa92b('0x41')]['id']}})['then'](handleEntityNotFound(_0x14e91e,null))[_0xa92b('0x20')](saveUpdates(_0x289234[_0xa92b('0x46')],null))[_0xa92b('0x20')](respondWithResult(_0x14e91e,null))[_0xa92b('0x3f')](handleError(_0x14e91e,null));};exports['destroy']=function(_0x2ff38b,_0x99513a){return db[_0xa92b('0x26')][_0xa92b('0x43')]({'where':{'id':_0x2ff38b['params']['id']}})[_0xa92b('0x20')](handleEntityNotFound(_0x99513a,null))['then'](removeEntity(_0x99513a,null))[_0xa92b('0x3f')](handleError(_0x99513a,null));};
\ No newline at end of file
+var _0x5694=['stack','name','send','OpenchannelApplication','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','filter','merge','type','key','field','options','where','findAll','catch','show','params','rawAttributes','length','includeAll','include','find','create','body','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error'];(function(_0x452f32,_0x4523a6){var _0xe6ceab=function(_0xb28b90){while(--_0xb28b90){_0x452f32['push'](_0x452f32['shift']());}};_0xe6ceab(++_0x4523a6);}(_0x5694,0x1ca));var _0x4569=function(_0x27da19,_0x13e778){_0x27da19=_0x27da19-0x0;var _0x1be481=_0x5694[_0x27da19];return _0x1be481;};'use strict';var pdf=require(_0x4569('0x0'));var emlformat=require(_0x4569('0x1'));var rimraf=require(_0x4569('0x2'));var zipdir=require(_0x4569('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4569('0x4'));var moment=require(_0x4569('0x5'));var BPromise=require(_0x4569('0x6'));var Mustache=require('mustache');var util=require(_0x4569('0x7'));var path=require('path');var sox=require(_0x4569('0x8'));var csv=require(_0x4569('0x9'));var ejs=require(_0x4569('0xa'));var fs=require('fs');var _=require(_0x4569('0xb'));var squel=require(_0x4569('0xc'));var crypto=require(_0x4569('0xd'));var jsforce=require(_0x4569('0xe'));var deskjs=require(_0x4569('0xf'));var toCsv=require(_0x4569('0x9'));var querystring=require(_0x4569('0x10'));var Papa=require('papaparse');var Redis=require(_0x4569('0x11'));var authService=require(_0x4569('0x12'));var qs=require(_0x4569('0x13'));var hardwareService=require(_0x4569('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x4569('0x15'));var config=require(_0x4569('0x16'));var db=require(_0x4569('0x17'))['db'];function respondWithStatusCode(_0x47c5a6,_0x39ada9){_0x39ada9=_0x39ada9||0xcc;return function(_0xa19a12){if(_0xa19a12){return _0x47c5a6['sendStatus'](_0x39ada9);}return _0x47c5a6[_0x4569('0x18')](_0x39ada9)[_0x4569('0x19')]();};}function respondWithResult(_0x33793e,_0x1f54e7){_0x1f54e7=_0x1f54e7||0xc8;return function(_0x502168){if(_0x502168){return _0x33793e[_0x4569('0x18')](_0x1f54e7)[_0x4569('0x1a')](_0x502168);}};}function respondWithFilteredResult(_0x12750a,_0xaf7037){return function(_0x510d57){if(_0x510d57){var _0x2c6011=_0x510d57[_0x4569('0x1b')],_0x53cfeb=_0xaf7037['offset'],_0xc94f95=_0xaf7037[_0x4569('0x1c')]+_0xaf7037[_0x4569('0x1d')],_0x1c4766;if(_0xc94f95>=_0x2c6011){_0xc94f95=_0x2c6011;_0x1c4766=0xc8;}else{_0x1c4766=0xce;}_0x12750a[_0x4569('0x18')](_0x1c4766);return _0x12750a['set'](_0x4569('0x1e'),_0x53cfeb+'-'+_0xc94f95+'/'+_0x2c6011)[_0x4569('0x1a')](_0x510d57);}return null;};}function patchUpdates(_0x366f1c){return function(_0x5db7ba){try{jsonpatch[_0x4569('0x1f')](_0x5db7ba,_0x366f1c,!![]);}catch(_0x1e31a2){return BPromise[_0x4569('0x20')](_0x1e31a2);}return _0x5db7ba[_0x4569('0x21')]();};}function saveUpdates(_0xe541e6,_0x5e649f){return function(_0x1b8a00){if(_0x1b8a00){return _0x1b8a00[_0x4569('0x22')](_0xe541e6)[_0x4569('0x23')](function(_0x2df1f1){return _0x2df1f1;});}return null;};}function removeEntity(_0x58b7b6,_0x376c8f){return function(_0x5618f0){if(_0x5618f0){return _0x5618f0[_0x4569('0x24')]()[_0x4569('0x23')](function(){_0x58b7b6[_0x4569('0x18')](0xcc)[_0x4569('0x19')]();});}};}function handleEntityNotFound(_0x3100fd,_0x3a9166){return function(_0x12eab4){if(!_0x12eab4){_0x3100fd[_0x4569('0x25')](0x194);}return _0x12eab4;};}function handleError(_0x409e3e,_0x6a139f){_0x6a139f=_0x6a139f||0x1f4;return function(_0x282c12){logger[_0x4569('0x26')](_0x282c12[_0x4569('0x27')]);if(_0x282c12['name']){delete _0x282c12[_0x4569('0x28')];}_0x409e3e[_0x4569('0x18')](_0x6a139f)[_0x4569('0x29')](_0x282c12);};}exports['index']=function(_0x510df6,_0x85c8d3){var _0x3b3af9={},_0x55821b={},_0x37a210={'count':0x0,'rows':[]};var _0x50200b=db[_0x4569('0x2a')]['rawAttributes'];_0x55821b[_0x4569('0x2b')]=_[_0x4569('0x2c')](_0x50200b);_0x55821b[_0x4569('0x2d')]=_[_0x4569('0x2c')](_0x510df6[_0x4569('0x2d')]);_0x55821b[_0x4569('0x2e')]=_[_0x4569('0x2f')](_0x55821b['model'],_0x55821b[_0x4569('0x2d')]);_0x3b3af9[_0x4569('0x30')]=_[_0x4569('0x2f')](_0x55821b[_0x4569('0x2b')],qs[_0x4569('0x31')](_0x510df6[_0x4569('0x2d')]['fields']));_0x3b3af9[_0x4569('0x30')]=_0x3b3af9['attributes']['length']?_0x3b3af9[_0x4569('0x30')]:_0x55821b['model'];if(!_0x510df6[_0x4569('0x2d')][_0x4569('0x32')]('nolimit')){_0x3b3af9[_0x4569('0x1d')]=qs[_0x4569('0x1d')](_0x510df6[_0x4569('0x2d')][_0x4569('0x1d')]);_0x3b3af9['offset']=qs[_0x4569('0x1c')](_0x510df6['query'][_0x4569('0x1c')]);}_0x3b3af9[_0x4569('0x33')]=qs[_0x4569('0x34')](_0x510df6[_0x4569('0x2d')][_0x4569('0x34')]);_0x3b3af9['where']=qs[_0x4569('0x2e')](_['pick'](_0x510df6['query'],_0x55821b['filters']));if(_0x510df6[_0x4569('0x2d')][_0x4569('0x35')]){_0x3b3af9['where']=_[_0x4569('0x36')](_0x3b3af9['where'],{'$or':_['map'](_0x50200b,function(_0x256eb7){if(_0x256eb7[_0x4569('0x37')][_0x4569('0x38')]!=='VIRTUAL'){var _0x2535d4={};_0x2535d4[_0x256eb7[_0x4569('0x39')]]={'$like':'%'+_0x510df6[_0x4569('0x2d')][_0x4569('0x35')]+'%'};return _0x2535d4;}})});}_0x3b3af9=_[_0x4569('0x36')]({},_0x3b3af9,_0x510df6[_0x4569('0x3a')]);var _0x4a54f0={'where':_0x3b3af9[_0x4569('0x3b')]};return db[_0x4569('0x2a')][_0x4569('0x1b')](_0x4a54f0)[_0x4569('0x23')](function(_0x5c7fd5){_0x37a210[_0x4569('0x1b')]=_0x5c7fd5;if(_0x510df6['query']['includeAll']){_0x3b3af9['include']=[{'all':!![]}];}return db[_0x4569('0x2a')][_0x4569('0x3c')](_0x3b3af9);})[_0x4569('0x23')](function(_0x2a8f95){_0x37a210['rows']=_0x2a8f95;return _0x37a210;})[_0x4569('0x23')](respondWithFilteredResult(_0x85c8d3,_0x3b3af9))[_0x4569('0x3d')](handleError(_0x85c8d3,null));};exports[_0x4569('0x3e')]=function(_0x4b73b0,_0x5161e4){var _0x43e9de={'raw':!![],'where':{'id':_0x4b73b0[_0x4569('0x3f')]['id']}},_0x4ca5ae={};_0x4ca5ae[_0x4569('0x2b')]=_[_0x4569('0x2c')](db[_0x4569('0x2a')][_0x4569('0x40')]);_0x4ca5ae[_0x4569('0x2d')]=_[_0x4569('0x2c')](_0x4b73b0[_0x4569('0x2d')]);_0x4ca5ae[_0x4569('0x2e')]=_[_0x4569('0x2f')](_0x4ca5ae['model'],_0x4ca5ae[_0x4569('0x2d')]);_0x43e9de[_0x4569('0x30')]=_[_0x4569('0x2f')](_0x4ca5ae[_0x4569('0x2b')],qs['fields'](_0x4b73b0[_0x4569('0x2d')][_0x4569('0x31')]));_0x43e9de[_0x4569('0x30')]=_0x43e9de['attributes'][_0x4569('0x41')]?_0x43e9de[_0x4569('0x30')]:_0x4ca5ae[_0x4569('0x2b')];if(_0x4b73b0[_0x4569('0x2d')][_0x4569('0x42')]){_0x43e9de[_0x4569('0x43')]=[{'all':!![]}];}_0x43e9de=_[_0x4569('0x36')]({},_0x43e9de,_0x4b73b0[_0x4569('0x3a')]);return db[_0x4569('0x2a')][_0x4569('0x44')](_0x43e9de)[_0x4569('0x23')](handleEntityNotFound(_0x5161e4,null))['then'](respondWithResult(_0x5161e4,null))[_0x4569('0x3d')](handleError(_0x5161e4,null));};exports[_0x4569('0x45')]=function(_0xb21a51,_0x19a645){return db[_0x4569('0x2a')][_0x4569('0x45')](_0xb21a51[_0x4569('0x46')],{})[_0x4569('0x23')](respondWithResult(_0x19a645,0xc9))['catch'](handleError(_0x19a645,null));};exports[_0x4569('0x22')]=function(_0x2f469f,_0x2cc031){if(_0x2f469f[_0x4569('0x46')]['id']){delete _0x2f469f[_0x4569('0x46')]['id'];}return db[_0x4569('0x2a')]['find']({'where':{'id':_0x2f469f[_0x4569('0x3f')]['id']}})[_0x4569('0x23')](handleEntityNotFound(_0x2cc031,null))[_0x4569('0x23')](saveUpdates(_0x2f469f[_0x4569('0x46')],null))['then'](respondWithResult(_0x2cc031,null))['catch'](handleError(_0x2cc031,null));};exports[_0x4569('0x24')]=function(_0x1ef032,_0x4639cd){return db[_0x4569('0x2a')]['find']({'where':{'id':_0x1ef032[_0x4569('0x3f')]['id']}})[_0x4569('0x23')](handleEntityNotFound(_0x4639cd,null))[_0x4569('0x23')](removeEntity(_0x4639cd,null))['catch'](handleError(_0x4639cd,null));};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.model.js b/server/api/openchannelApplication/openchannelApplication.model.js
index 4499701..a636f68 100644
--- a/server/api/openchannelApplication/openchannelApplication.model.js
+++ b/server/api/openchannelApplication/openchannelApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6075=['utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','path','./openchannelApplication.attributes','define','openchannel_applications'];(function(_0x18cd5b,_0x10240b){var _0x5eaa52=function(_0x2bccad){while(--_0x2bccad){_0x18cd5b['push'](_0x18cd5b['shift']());}};_0x5eaa52(++_0x10240b);}(_0x6075,0x142));var _0x5607=function(_0x3b2c2e,_0x6cbdad){_0x3b2c2e=_0x3b2c2e-0x0;var _0x16af9b=_0x6075[_0x3b2c2e];return _0x16af9b;};'use strict';var _=require(_0x5607('0x0'));var util=require(_0x5607('0x1'));var logger=require('../../config/logger')(_0x5607('0x2'));var moment=require(_0x5607('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x5607('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x5607('0x5'));module['exports']=function(_0x2d42d4,_0x4bb34a){return _0x2d42d4[_0x5607('0x6')]('OpenchannelApplication',attributes,{'tableName':_0x5607('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5607('0x8'),'collate':_0x5607('0x9')});};
\ No newline at end of file
+var _0xd19f=['rimraf','../../config/environment','./openchannelApplication.attributes','exports','define','OpenchannelApplication','openchannel_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x38cf5b,_0x798a80){var _0x22f4b0=function(_0x1597c3){while(--_0x1597c3){_0x38cf5b['push'](_0x38cf5b['shift']());}};_0x22f4b0(++_0x798a80);}(_0xd19f,0x16e));var _0xfd19=function(_0x1c7889,_0x24cd26){_0x1c7889=_0x1c7889-0x0;var _0x2f14e5=_0xd19f[_0x1c7889];return _0x2f14e5;};'use strict';var _=require(_0xfd19('0x0'));var util=require(_0xfd19('0x1'));var logger=require(_0xfd19('0x2'))(_0xfd19('0x3'));var moment=require(_0xfd19('0x4'));var BPromise=require(_0xfd19('0x5'));var rp=require(_0xfd19('0x6'));var fs=require('fs');var path=require(_0xfd19('0x7'));var rimraf=require(_0xfd19('0x8'));var config=require(_0xfd19('0x9'));var attributes=require(_0xfd19('0xa'));module[_0xfd19('0xb')]=function(_0x521c1d,_0x6652e2){return _0x521c1d[_0xfd19('0xc')](_0xfd19('0xd'),attributes,{'tableName':_0xfd19('0xe'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xfd19('0xf'),'collate':_0xfd19('0x10')});};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.rpc.js b/server/api/openchannelApplication/openchannelApplication.rpc.js
index 14aa456..f872746 100644
--- a/server/api/openchannelApplication/openchannelApplication.rpc.js
+++ b/server/api/openchannelApplication/openchannelApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaa26=['error','code','message','UpdateOpenchannelApplication','OpenchannelApplication','update','options','raw','where','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','request','then','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','debug','OpenchannelApplication,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x528042,_0x4716aa){var _0x30bc8c=function(_0x33588a){while(--_0x33588a){_0x528042['push'](_0x528042['shift']());}};_0x30bc8c(++_0x4716aa);}(_0xaa26,0xfb));var _0x6aa2=function(_0x59de5a,_0x1c31ab){_0x59de5a=_0x59de5a-0x0;var _0x1e86eb=_0xaa26[_0x59de5a];return _0x1e86eb;};'use strict';var _=require(_0x6aa2('0x0'));var util=require(_0x6aa2('0x1'));var moment=require(_0x6aa2('0x2'));var BPromise=require(_0x6aa2('0x3'));var rs=require(_0x6aa2('0x4'));var fs=require('fs');var Redis=require(_0x6aa2('0x5'));var db=require(_0x6aa2('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x6aa2('0x7'))(_0x6aa2('0x8'));var config=require('../../config/environment');var jayson=require(_0x6aa2('0x9'));var client=jayson['client'][_0x6aa2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x29f3b8,_0x31a5ed,_0x535cb0){return new BPromise(function(_0x3b24d0,_0x3e9133){return client[_0x6aa2('0xb')](_0x29f3b8,_0x535cb0)[_0x6aa2('0xc')](function(_0xec85b7){logger[_0x6aa2('0xd')](_0x6aa2('0xe'),_0x31a5ed,_0x6aa2('0xf'));logger[_0x6aa2('0x10')](_0x6aa2('0x11'),_0x31a5ed,_0x6aa2('0xf'),JSON[_0x6aa2('0x12')](_0xec85b7));if(_0xec85b7[_0x6aa2('0x13')]){if(_0xec85b7['error'][_0x6aa2('0x14')]===0x1f4){logger['error'](_0x6aa2('0xe'),_0x31a5ed,_0xec85b7['error'][_0x6aa2('0x15')]);return _0x3e9133(_0xec85b7['error'][_0x6aa2('0x15')]);}logger['error']('OpenchannelApplication,\x20%s,\x20%s',_0x31a5ed,_0xec85b7[_0x6aa2('0x13')][_0x6aa2('0x15')]);return _0x3b24d0(_0xec85b7[_0x6aa2('0x13')][_0x6aa2('0x15')]);}else{logger[_0x6aa2('0xd')](_0x6aa2('0xe'),_0x31a5ed,'request\x20sent');_0x3b24d0(_0xec85b7['result'][_0x6aa2('0x15')]);}})['catch'](function(_0x2379e9){logger[_0x6aa2('0x13')](_0x6aa2('0xe'),_0x31a5ed,_0x2379e9);_0x3e9133(_0x2379e9);});});}exports[_0x6aa2('0x16')]=function(_0x5c447e){var _0x9f4d27=this;return new Promise(function(_0x44a5fd,_0x1c06f3){return db[_0x6aa2('0x17')][_0x6aa2('0x18')](_0x5c447e['body'],{'raw':_0x5c447e[_0x6aa2('0x19')]?_0x5c447e[_0x6aa2('0x19')][_0x6aa2('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5c447e[_0x6aa2('0x19')]?_0x5c447e[_0x6aa2('0x19')][_0x6aa2('0x1b')]||null:null,'attributes':_0x5c447e[_0x6aa2('0x19')]?_0x5c447e['options'][_0x6aa2('0x1c')]||null:null,'limit':_0x5c447e['options']?_0x5c447e[_0x6aa2('0x19')][_0x6aa2('0x1d')]||null:null})[_0x6aa2('0xc')](function(_0x237345){logger[_0x6aa2('0xd')](_0x6aa2('0x16'),_0x5c447e);logger[_0x6aa2('0x10')]('UpdateOpenchannelApplication',_0x5c447e,JSON['stringify'](_0x237345));_0x44a5fd(_0x237345);})['catch'](function(_0x351e5a){logger[_0x6aa2('0x13')]('UpdateOpenchannelApplication',_0x351e5a[_0x6aa2('0x15')],_0x5c447e);_0x1c06f3(_0x9f4d27['error'](0x1f4,_0x351e5a[_0x6aa2('0x15')]));});});};
\ No newline at end of file
+var _0x089d=['debug','stringify','error','message','catch','UpdateOpenchannelApplication','OpenchannelApplication','update','body','options','raw','attributes','util','bluebird','randomstring','../../config/logger','../../config/environment','jayson/promise','http','then','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent'];(function(_0x31bbcd,_0x482f75){var _0x512490=function(_0x39126a){while(--_0x39126a){_0x31bbcd['push'](_0x31bbcd['shift']());}};_0x512490(++_0x482f75);}(_0x089d,0x137));var _0xd089=function(_0x6cf19c,_0x2f3f02){_0x6cf19c=_0x6cf19c-0x0;var _0xce14f3=_0x089d[_0x6cf19c];return _0xce14f3;};'use strict';var _=require('lodash');var util=require(_0xd089('0x0'));var moment=require('moment');var BPromise=require(_0xd089('0x1'));var rs=require(_0xd089('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xd089('0x3'))('rpc');var config=require(_0xd089('0x4'));var jayson=require(_0xd089('0x5'));var client=jayson['client'][_0xd089('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x400583,_0x16128e,_0x17bc1d){return new BPromise(function(_0x2c8f4e,_0x3bf227){return client['request'](_0x400583,_0x17bc1d)[_0xd089('0x7')](function(_0x5e4fb7){logger[_0xd089('0x8')](_0xd089('0x9'),_0x16128e,_0xd089('0xa'));logger[_0xd089('0xb')]('OpenchannelApplication,\x20%s,\x20%s,\x20%s',_0x16128e,_0xd089('0xa'),JSON[_0xd089('0xc')](_0x5e4fb7));if(_0x5e4fb7[_0xd089('0xd')]){if(_0x5e4fb7[_0xd089('0xd')]['code']===0x1f4){logger[_0xd089('0xd')](_0xd089('0x9'),_0x16128e,_0x5e4fb7[_0xd089('0xd')][_0xd089('0xe')]);return _0x3bf227(_0x5e4fb7[_0xd089('0xd')][_0xd089('0xe')]);}logger[_0xd089('0xd')](_0xd089('0x9'),_0x16128e,_0x5e4fb7[_0xd089('0xd')][_0xd089('0xe')]);return _0x2c8f4e(_0x5e4fb7[_0xd089('0xd')][_0xd089('0xe')]);}else{logger[_0xd089('0x8')](_0xd089('0x9'),_0x16128e,'request\x20sent');_0x2c8f4e(_0x5e4fb7['result'][_0xd089('0xe')]);}})[_0xd089('0xf')](function(_0x110575){logger['error'](_0xd089('0x9'),_0x16128e,_0x110575);_0x3bf227(_0x110575);});});}exports[_0xd089('0x10')]=function(_0xa6b43b){var _0x32dd48=this;return new Promise(function(_0x2394f7,_0x530c41){return db[_0xd089('0x11')][_0xd089('0x12')](_0xa6b43b[_0xd089('0x13')],{'raw':_0xa6b43b[_0xd089('0x14')]?_0xa6b43b[_0xd089('0x14')][_0xd089('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xa6b43b[_0xd089('0x14')]?_0xa6b43b[_0xd089('0x14')]['where']||null:null,'attributes':_0xa6b43b[_0xd089('0x14')]?_0xa6b43b[_0xd089('0x14')][_0xd089('0x16')]||null:null,'limit':_0xa6b43b[_0xd089('0x14')]?_0xa6b43b[_0xd089('0x14')]['limit']||null:null})[_0xd089('0x7')](function(_0x4ff49a){logger[_0xd089('0x8')]('UpdateOpenchannelApplication',_0xa6b43b);logger['debug'](_0xd089('0x10'),_0xa6b43b,JSON[_0xd089('0xc')](_0x4ff49a));_0x2394f7(_0x4ff49a);})[_0xd089('0xf')](function(_0x1ede2f){logger[_0xd089('0xd')]('UpdateOpenchannelApplication',_0x1ede2f['message'],_0xa6b43b);_0x530c41(_0x32dd48['error'](0x1f4,_0x1ede2f[_0xd089('0xe')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/index.js b/server/api/openchannelInteraction/index.js
index 04c6ecd..599dbb2 100644
--- a/server/api/openchannelInteraction/index.js
+++ b/server/api/openchannelInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x787b=['util','connect-timeout','Router','../../config/environment','./openchannelInteraction.controller','get','index','/describe','isAuthenticated','describe','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','openchannelinteraction:addtags','addTags','put','/:id','openchannel','openchannelinteraction:update','update','destroy','removeTags','exports','multer'];(function(_0x3457b4,_0x4cd8f9){var _0xaa8fa9=function(_0x51897a){while(--_0x51897a){_0x3457b4['push'](_0x3457b4['shift']());}};_0xaa8fa9(++_0x4cd8f9);}(_0x787b,0x173));var _0xb787=function(_0x5d07ff,_0x1f976f){_0x5d07ff=_0x5d07ff-0x0;var _0x5226ad=_0x787b[_0x5d07ff];return _0x5226ad;};'use strict';var multer=require(_0xb787('0x0'));var util=require(_0xb787('0x1'));var path=require('path');var timeout=require(_0xb787('0x2'));var express=require('express');var router=express[_0xb787('0x3')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xb787('0x4'));var controller=require(_0xb787('0x5'));router[_0xb787('0x6')]('/',auth['isAuthenticated'](),controller[_0xb787('0x7')]);router[_0xb787('0x6')](_0xb787('0x8'),auth[_0xb787('0x9')](),controller[_0xb787('0xa')]);router[_0xb787('0x6')]('/:id',auth[_0xb787('0x9')](),controller[_0xb787('0xb')]);router[_0xb787('0x6')](_0xb787('0xc'),auth[_0xb787('0x9')](),controller[_0xb787('0xd')]);router[_0xb787('0x6')](_0xb787('0xe'),auth['isAuthenticated'](),controller[_0xb787('0xf')]);router[_0xb787('0x10')]('/',auth[_0xb787('0x9')](),controller[_0xb787('0x11')]);router[_0xb787('0x10')](_0xb787('0xc'),auth[_0xb787('0x9')](),controller[_0xb787('0x12')]);router[_0xb787('0x10')](_0xb787('0x13'),auth['isAuthenticated'](),interaction[_0xb787('0x14')]('openchannel',_0xb787('0x15')),controller[_0xb787('0x16')]);router[_0xb787('0x17')](_0xb787('0x18'),auth[_0xb787('0x9')](),interaction['tracked'](_0xb787('0x19'),_0xb787('0x1a')),controller[_0xb787('0x1b')]);router['delete'](_0xb787('0x18'),auth['isAuthenticated'](),interaction[_0xb787('0x14')](_0xb787('0x19'),'openchannelinteraction:destroy'),controller[_0xb787('0x1c')]);router['delete'](_0xb787('0x13'),auth[_0xb787('0x9')](),controller[_0xb787('0x1d')]);module[_0xb787('0x1e')]=router;
\ No newline at end of file
+var _0xf064=['index','/describe','/:id','show','/:id/messages','download','post','/:id/tags','tracked','openchannel','openchannelinteraction:destroy','destroy','delete','removeTags','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./openchannelInteraction.controller','get','isAuthenticated'];(function(_0x6a4fe7,_0x40a337){var _0x5e467d=function(_0x24eb0b){while(--_0x24eb0b){_0x6a4fe7['push'](_0x6a4fe7['shift']());}};_0x5e467d(++_0x40a337);}(_0xf064,0x17b));var _0x4f06=function(_0x3d9176,_0x399d6f){_0x3d9176=_0x3d9176-0x0;var _0x12adc5=_0xf064[_0x3d9176];return _0x12adc5;};'use strict';var multer=require(_0x4f06('0x0'));var util=require(_0x4f06('0x1'));var path=require(_0x4f06('0x2'));var timeout=require(_0x4f06('0x3'));var express=require(_0x4f06('0x4'));var router=express[_0x4f06('0x5')]();var auth=require(_0x4f06('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x4f06('0x7'));var controller=require(_0x4f06('0x8'));router[_0x4f06('0x9')]('/',auth[_0x4f06('0xa')](),controller[_0x4f06('0xb')]);router[_0x4f06('0x9')](_0x4f06('0xc'),auth[_0x4f06('0xa')](),controller['describe']);router[_0x4f06('0x9')](_0x4f06('0xd'),auth['isAuthenticated'](),controller[_0x4f06('0xe')]);router[_0x4f06('0x9')](_0x4f06('0xf'),auth[_0x4f06('0xa')](),controller['getMessages']);router['get']('/:id/download',auth[_0x4f06('0xa')](),controller[_0x4f06('0x10')]);router[_0x4f06('0x11')]('/',auth[_0x4f06('0xa')](),controller['create']);router[_0x4f06('0x11')](_0x4f06('0xf'),auth['isAuthenticated'](),controller['addMessage']);router[_0x4f06('0x11')](_0x4f06('0x12'),auth[_0x4f06('0xa')](),interaction[_0x4f06('0x13')](_0x4f06('0x14'),'openchannelinteraction:addtags'),controller['addTags']);router['put'](_0x4f06('0xd'),auth['isAuthenticated'](),interaction['tracked']('openchannel','openchannelinteraction:update'),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),interaction[_0x4f06('0x13')]('openchannel',_0x4f06('0x15')),controller[_0x4f06('0x16')]);router[_0x4f06('0x17')](_0x4f06('0x12'),auth[_0x4f06('0xa')](),controller[_0x4f06('0x18')]);module[_0x4f06('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.attributes.js b/server/api/openchannelInteraction/openchannelInteraction.attributes.js
index a6d5eb3..e09832f 100644
--- a/server/api/openchannelInteraction/openchannelInteraction.attributes.js
+++ b/server/api/openchannelInteraction/openchannelInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2e3b=['STRING','ENUM','out','exports','BOOLEAN','DATE'];(function(_0x4466fb,_0x45e890){var _0x13a21e=function(_0x5789c6){while(--_0x5789c6){_0x4466fb['push'](_0x4466fb['shift']());}};_0x13a21e(++_0x45e890);}(_0x2e3b,0x81));var _0xb2e3=function(_0x5971cf,_0x31caa2){_0x5971cf=_0x5971cf-0x0;var _0x4d74d1=_0x2e3b[_0x5971cf];return _0x4d74d1;};'use strict';var Sequelize=require('sequelize');module[_0xb2e3('0x0')]={'closed':{'type':Sequelize[_0xb2e3('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xb2e3('0x2')]},'disposition':{'type':Sequelize[_0xb2e3('0x3')]},'note':{'type':Sequelize[_0xb2e3('0x3')]},'read1stAt':{'type':Sequelize[_0xb2e3('0x2')]},'threadId':{'type':Sequelize[_0xb2e3('0x3')]},'externalUrl':{'type':Sequelize[_0xb2e3('0x3')]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xb2e3('0x4')]('in',_0xb2e3('0x5')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xff96=['exports','BOOLEAN','DATE','STRING','ENUM','out','sequelize'];(function(_0x2c69a1,_0x201903){var _0x24bb91=function(_0x3131ac){while(--_0x3131ac){_0x2c69a1['push'](_0x2c69a1['shift']());}};_0x24bb91(++_0x201903);}(_0xff96,0x179));var _0x6ff9=function(_0x334651,_0x6e99f6){_0x334651=_0x334651-0x0;var _0x29657c=_0xff96[_0x334651];return _0x29657c;};'use strict';var Sequelize=require(_0x6ff9('0x0'));module[_0x6ff9('0x1')]={'closed':{'type':Sequelize[_0x6ff9('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x6ff9('0x3')]},'disposition':{'type':Sequelize[_0x6ff9('0x4')]},'note':{'type':Sequelize[_0x6ff9('0x4')]},'read1stAt':{'type':Sequelize[_0x6ff9('0x3')]},'threadId':{'type':Sequelize[_0x6ff9('0x4')]},'externalUrl':{'type':Sequelize[_0x6ff9('0x4')]},'lastMsgAt':{'type':Sequelize[_0x6ff9('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x6ff9('0x5')]('in',_0x6ff9('0x6')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.controller.js b/server/api/openchannelInteraction/openchannelInteraction.controller.js
index 9f27993..93263aa 100644
--- a/server/api/openchannelInteraction/openchannelInteraction.controller.js
+++ b/server/api/openchannelInteraction/openchannelInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x16e6=['10px','40px','30px',' \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{page}}/{{pages}} \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','%s\x20#%d','Openchannel','mkdirSync','N.A.','closedAt','disposition','threadId','Public','Private','Messages','basename','existsSync','createReadStream','createWriteStream','out','lastName','renderFile','views','downloadInteraction.html','transcript-','.pdf','err','unlinkSync','html-pdf','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','sox','to-csv','ejs','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelInteraction.socket','register','sendStatus','end','json','count','offset','limit','status','set','apply','reject','save','then','name','send','closed','unreadMessages','map','Tags','forEach','TagIds','catch','index','OpenchannelInteraction','rawAttributes','query','model','attributes','fields','length','nolimit','order','sort','where','filters','select','field','color','from','tools_tags','COUNT(*)','me.OpenchannelInteractionId\x20=\x20i.id','me.direction\x20=\x20\x27in\x27','me.read\x20=\x20false','u.id','ui.OpenchannelInteractionId','user_has_openchannel_interactions','left_join','users','u.id\x20=\x20ui.UserId','openchannel_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','openchannel_accounts','a.id\x20=\x20i.OpenchannelAccountId','openchannel_messages','expr','advancedFilter','keys','createdAt','value','dateStart','day','format','utc','endOf','and','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','condition','TagId','Messages.count','isArray','tableAlias','\x20IN\x20?','\x20=\x20?','LIKE','ContactId','\x20LIKE\x20?','c.email','\x20>\x20?','c.firstName','c.lastName','\x20<\x20?','hasOwnProperty','filter','isNil','isEmpty','i.OpenchannelAccountId\x20IN\x20?','$gte','parse','$lte','\x20IS\x20NULL','replace','\x27\x27\x27\x27','isNumeric','split','push','toString','join','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','DESC','group','i.id','Sequelize','SELECT','read','%s\x20=\x200','having','`Messages.count`\x20=\x200','tag','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','mail_interaction_has_tags','it.MailInteractionId\x20=\x20i.id','%s\x20>\x200','`Messages.count`\x20>\x200','sequelize','keyBy','merge','Account.key','i.*','Contact.firstName','Contact.email','c.phone','c.mobile','Contact.mobile','c.fax','GROUP_CONCAT(DISTINCT\x20t.id)','it.OpenchannelInteractionId\x20=\x20i.id','ui.OpenchannelInteractionId\x20IN\x20?','groupBy','OpenchannelInteractionId','all','rows','show','params','intersection','includeAll','include','options','find','create','body','update','destroy','describe','addMessage','OpenchannelMessage','ids','omit','getMessages','pick','YYYY-MM-DD\x20HH:mm:ss','addTags','setTags','Tag','findAll','emit','openchannelInteractionTags:save','download','unix','root','server','tmp','files','attachments','direction','secret','User','CmContact','Contact','firstName','Attachment','OpenchannelAccount','Account','Owner','fullname','get'];(function(_0x189d3c,_0x5efebf){var _0x485959=function(_0x1161da){while(--_0x1161da){_0x189d3c['push'](_0x189d3c['shift']());}};_0x485959(++_0x5efebf);}(_0x16e6,0x1eb));var _0x616e=function(_0xb1cf84,_0x813740){_0xb1cf84=_0xb1cf84-0x0;var _0x4bad2e=_0x16e6[_0xb1cf84];return _0x4bad2e;};'use strict';var pdf=require(_0x616e('0x0'));var emlformat=require(_0x616e('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x616e('0x2'));var jsonpatch=require(_0x616e('0x3'));var rp=require('request-promise');var moment=require(_0x616e('0x4'));var BPromise=require(_0x616e('0x5'));var Mustache=require(_0x616e('0x6'));var util=require('util');var path=require('path');var sox=require(_0x616e('0x7'));var csv=require(_0x616e('0x8'));var ejs=require(_0x616e('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x616e('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x616e('0xb'));var toCsv=require(_0x616e('0x8'));var querystring=require('querystring');var Papa=require(_0x616e('0xc'));var Redis=require(_0x616e('0xd'));var authService=require(_0x616e('0xe'));var qs=require(_0x616e('0xf'));var hardwareService=require(_0x616e('0x10'));var logger=require(_0x616e('0x11'))(_0x616e('0x12'));var utils=require('../../config/utils');var config=require(_0x616e('0x13'));var db=require(_0x616e('0x14'))['db'];config[_0x616e('0x15')]=_[_0x616e('0x16')](config['redis'],{'host':_0x616e('0x17'),'port':0x18eb});var socket=require(_0x616e('0x18'))(new Redis(config[_0x616e('0x15')]));require(_0x616e('0x19'))[_0x616e('0x1a')](socket);function respondWithStatusCode(_0x2bd9b1,_0x54bd7f){_0x54bd7f=_0x54bd7f||0xcc;return function(_0x32fb2d){if(_0x32fb2d){return _0x2bd9b1[_0x616e('0x1b')](_0x54bd7f);}return _0x2bd9b1['status'](_0x54bd7f)[_0x616e('0x1c')]();};}function respondWithResult(_0x480421,_0x3f5778){_0x3f5778=_0x3f5778||0xc8;return function(_0x5d95e5){if(_0x5d95e5){return _0x480421['status'](_0x3f5778)[_0x616e('0x1d')](_0x5d95e5);}};}function respondWithFilteredResult(_0xbda40b,_0x112944){return function(_0x211ac8){if(_0x211ac8){var _0x38598c=_0x211ac8[_0x616e('0x1e')],_0x36900a=_0x112944[_0x616e('0x1f')],_0x3fbb88=_0x112944[_0x616e('0x1f')]+_0x112944[_0x616e('0x20')],_0x38f5cf;if(_0x3fbb88>=_0x38598c){_0x3fbb88=_0x38598c;_0x38f5cf=0xc8;}else{_0x38f5cf=0xce;}_0xbda40b[_0x616e('0x21')](_0x38f5cf);return _0xbda40b[_0x616e('0x22')]('Content-Range',_0x36900a+'-'+_0x3fbb88+'/'+_0x38598c)[_0x616e('0x1d')](_0x211ac8);}return null;};}function patchUpdates(_0x10959b){return function(_0x52c6a7){try{jsonpatch[_0x616e('0x23')](_0x52c6a7,_0x10959b,!![]);}catch(_0x3ee0b5){return BPromise[_0x616e('0x24')](_0x3ee0b5);}return _0x52c6a7[_0x616e('0x25')]();};}function saveUpdates(_0x14f5f0,_0x45447b){return function(_0xe1001d){if(_0xe1001d){return _0xe1001d['update'](_0x14f5f0)[_0x616e('0x26')](function(_0x4b0943){return _0x4b0943;});}return null;};}function removeEntity(_0x1b6a79,_0x1fcb93){return function(_0x441247){if(_0x441247){return _0x441247['destroy']()[_0x616e('0x26')](function(){_0x1b6a79['status'](0xcc)[_0x616e('0x1c')]();});}};}function handleEntityNotFound(_0x53e24b,_0x5f4b2f){return function(_0x1d8650){if(!_0x1d8650){_0x53e24b[_0x616e('0x1b')](0x194);}return _0x1d8650;};}function handleError(_0x3c1505,_0x19cefc){_0x19cefc=_0x19cefc||0x1f4;return function(_0x517f47){logger['error'](_0x517f47['stack']);if(_0x517f47[_0x616e('0x27')]){delete _0x517f47['name'];}_0x3c1505[_0x616e('0x21')](_0x19cefc)[_0x616e('0x28')](_0x517f47);};}function getInteractionUnreadMessages(_0x3d9787){return new BPromise(function(_0x38d5ca,_0x52ab75){try{if(_0x3d9787[_0x616e('0x29')]){_0x3d9787[_0x616e('0x2a')]=0x0;_0x38d5ca(_0x3d9787);}else{return db['OpenchannelMessage']['count']({'where':{'OpenchannelInteractionId':_0x3d9787['id'],'direction':'in','read':![]}})[_0x616e('0x26')](function(_0x271b75){_0x3d9787[_0x616e('0x2a')]=_0x271b75;_0x38d5ca(_0x3d9787);});}}catch(_0xb1a116){_0x52ab75(_0xb1a116);}});}function getInteractionUsers(_0x5013d0,_0x3a9bed){return new BPromise(function(_0x3fcb29,_0x4fa802){try{if(_0x3a9bed[_0x5013d0['id']]){_0x5013d0['Users']=_[_0x616e('0x2b')](_0x3a9bed[_0x5013d0['id']],function(_0xfa5684){return{'id':_0xfa5684['id']};});}}catch(_0x1f9526){_0x4fa802(_0x1f9526);}_0x3fcb29(_0x5013d0);});}function getInteractionTags(_0x84ea0d,_0x203f0e){return new BPromise(function(_0xf9f819,_0x35bacc){try{if(_0x84ea0d['TagIds']){_0x84ea0d[_0x616e('0x2c')]=[];_0x84ea0d['TagIds']['split'](',')[_0x616e('0x2d')](function(_0x5c972b){_0x84ea0d[_0x616e('0x2c')]['push'](_0x203f0e[_0x5c972b]);});}delete _0x84ea0d[_0x616e('0x2e')];}catch(_0x5cfe2d){_0x35bacc(_0x5cfe2d);}_0xf9f819(_0x84ea0d);});}function updateOpenchannelInteraction(_0x26e5f2,_0x4cd667,_0x9e1d67){return new BPromise(function(_0x2812b1,_0x550509){return getInteractionUnreadMessages(_0x26e5f2)[_0x616e('0x26')](function(_0x4c724e){return getInteractionUsers(_0x4c724e,_0x9e1d67);})[_0x616e('0x26')](function(_0x273c21){return getInteractionTags(_0x273c21,_0x4cd667);})[_0x616e('0x26')](function(_0x4cb303){_0x2812b1(_0x4cb303);})[_0x616e('0x2f')](function(_0xc72392){_0x550509(_0xc72392);});});}exports[_0x616e('0x30')]=function(_0x342b1a,_0x36562d){var _0x21449f={},_0xcf4555={},_0x3a5c95={'count':0x0,'rows':[]};var _0x484008=db[_0x616e('0x31')][_0x616e('0x32')];_0xcf4555['model']=_['keys'](_0x484008);_0xcf4555[_0x616e('0x33')]=_['keys'](_0x342b1a['query']);_0xcf4555['filters']=_['intersection'](_0xcf4555[_0x616e('0x34')],_0xcf4555[_0x616e('0x33')]);_0x21449f[_0x616e('0x35')]=_['intersection'](_0xcf4555[_0x616e('0x34')],qs[_0x616e('0x36')](_0x342b1a[_0x616e('0x33')][_0x616e('0x36')]));_0x21449f['attributes']=_0x21449f['attributes'][_0x616e('0x37')]?_0x21449f[_0x616e('0x35')]:_0xcf4555['model'];if(!_0x342b1a[_0x616e('0x33')]['hasOwnProperty'](_0x616e('0x38'))){_0x21449f[_0x616e('0x20')]=qs[_0x616e('0x20')](_0x342b1a[_0x616e('0x33')]['limit']);_0x21449f['offset']=qs[_0x616e('0x1f')](_0x342b1a[_0x616e('0x33')]['offset']);}_0x21449f[_0x616e('0x39')]=qs['sort'](_0x342b1a[_0x616e('0x33')][_0x616e('0x3a')]);_0x21449f[_0x616e('0x3b')]=qs[_0x616e('0x3c')](_['pick'](_0x342b1a['query'],_0xcf4555[_0x616e('0x3c')]));var _0x2d97e8=[];var _0x4e48a6=squel[_0x616e('0x3d')]()[_0x616e('0x3e')]('id')['field'](_0x616e('0x27'))[_0x616e('0x3e')](_0x616e('0x3f'))[_0x616e('0x40')](_0x616e('0x41'));var _0x2aac9a=squel['select']()['field'](_0x616e('0x42'))['from']('openchannel_messages','me')[_0x616e('0x3b')](_0x616e('0x43'))[_0x616e('0x3b')](_0x616e('0x44'))['where'](_0x616e('0x45'));var _0x1c85ab=squel[_0x616e('0x3d')]()['field'](_0x616e('0x46'))['field'](_0x616e('0x47'))[_0x616e('0x40')](_0x616e('0x48'),'ui')[_0x616e('0x49')](_0x616e('0x4a'),'u',_0x616e('0x4b'));var _0x31ad83=squel[_0x616e('0x3d')]()['from'](_0x616e('0x4c'),'i')[_0x616e('0x49')](_0x616e('0x4d'),'c',_0x616e('0x4e'))[_0x616e('0x49')](_0x616e('0x4a'),'o',_0x616e('0x4f'))[_0x616e('0x49')](_0x616e('0x50'),'a',_0x616e('0x51'))['left_join'](_0x616e('0x52'),'me',_0x616e('0x43'));var _0x29728d=squel[_0x616e('0x53')]();if(_0x342b1a[_0x616e('0x33')]['advancedFilter']){var _0xf7c01b=JSON['parse'](_0x342b1a[_0x616e('0x33')][_0x616e('0x54')]);_[_0x616e('0x55')](_0xf7c01b)['forEach'](function(_0x18db60){var _0x24ee81=_0xf7c01b[_0x18db60];if(_0x18db60===_0x616e('0x56')){var _0x4a3bde=moment(_0x24ee81[_0x616e('0x57')][_0x616e('0x58')])['startOf'](_0x616e('0x59'))['utc']()[_0x616e('0x5a')]();var _0x421bcd=moment(_0x421bcd)[_0x616e('0x5b')]()[_0x616e('0x5c')](_0x616e('0x59'))['format']();_0x29728d[_0x616e('0x5d')](_0x616e('0x5e'),_0x4a3bde,_0x421bcd);}else{if(_['isArray'](_0x24ee81[_0x616e('0x5f')])){_0x24ee81['condition'][_0x616e('0x2d')](function(_0x28e9e2){switch(_0x24ee81[_0x616e('0x5f')][_0x616e('0x57')]){case'IS':if(_0x18db60!==_0x616e('0x60')&&_0x18db60!==_0x616e('0x61')){if(_[_0x616e('0x62')](_0x24ee81['value'])&&_0x24ee81[_0x616e('0x57')][_0x616e('0x37')]>0x1){_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x64'),_0x24ee81['value']);}else{_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x65'),_0x24ee81['value'][0x0]);}}break;case'=':_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x65'),_0x24ee81[_0x616e('0x57')]);break;case _0x616e('0x66'):if(_0x18db60===_0x616e('0x67')){_0x29728d[_0x616e('0x5d')]('c.firstName'+_0x616e('0x68'),'%'+_0x24ee81[_0x616e('0x57')]+'%');_0x29728d['or']('c.lastName'+_0x616e('0x68'),'%'+_0x24ee81[_0x616e('0x57')]+'%');_0x29728d['or'](_0x616e('0x69')+'\x20LIKE\x20?','%'+_0x24ee81[_0x616e('0x57')]+'%');}else{_0x29728d['and'](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+'\x20LIKE\x20?','%'+_0x24ee81['value']+'%');}break;case'>':_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x6a'),_0x24ee81[_0x616e('0x57')]);break;case'<':_0x29728d[_0x616e('0x5d')](_0x24ee81['tableAlias']+'.'+_0x18db60+'\x20<\x20?',_0x24ee81[_0x616e('0x57')]);break;}});}else{switch(_0x24ee81['condition'][_0x616e('0x57')]){case'IS':if(_0x18db60!=='TagId'&&_0x18db60!=='Messages.count'){if(_[_0x616e('0x62')](_0x24ee81['value'])&&_0x24ee81[_0x616e('0x57')][_0x616e('0x37')]>0x1){_0x29728d[_0x616e('0x5d')](_0x24ee81['tableAlias']+'.'+_0x18db60+_0x616e('0x64'),_0x24ee81['value']);}else{_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x65'),_0x24ee81['value'][0x0]);}}break;case'=':_0x29728d['and'](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+'\x20=\x20?',_0x24ee81[_0x616e('0x57')]);break;case _0x616e('0x66'):if(_0x18db60===_0x616e('0x67')){_0x29728d[_0x616e('0x5d')](_0x616e('0x6b')+'\x20LIKE\x20?','%'+_0x24ee81[_0x616e('0x57')]+'%');_0x29728d['or'](_0x616e('0x6c')+'\x20LIKE\x20?','%'+_0x24ee81[_0x616e('0x57')]+'%');_0x29728d['or'](_0x616e('0x69')+_0x616e('0x68'),'%'+_0x24ee81[_0x616e('0x57')]+'%');}else{_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x68'),'%'+_0x24ee81['value']+'%');}break;case'>':_0x29728d[_0x616e('0x5d')](_0x24ee81[_0x616e('0x63')]+'.'+_0x18db60+_0x616e('0x6a'),_0x24ee81[_0x616e('0x57')]);break;case'<':_0x29728d[_0x616e('0x5d')](_0x24ee81['tableAlias']+'.'+_0x18db60+_0x616e('0x6d'),_0x24ee81[_0x616e('0x57')]);break;}}}});}else{var _0x839e27=_(Object[_0x616e('0x55')](_0x342b1a[_0x616e('0x33')]))[_0x616e('0x2b')](function(_0x2b68ff){return _0x484008[_0x616e('0x6e')](_0x2b68ff)?_0x2b68ff:undefined;})[_0x616e('0x6f')](function(_0x595d89){return!_[_0x616e('0x70')](_0x595d89);})['value']();if(!_[_0x616e('0x71')](_0x839e27)){_0x839e27[_0x616e('0x2d')](function(_0x1c56fb){if(_0x1c56fb==='OpenchannelAccountId'){_0x31ad83[_0x616e('0x3b')](_0x616e('0x72'),[]['concat'](_0x342b1a[_0x616e('0x33')][_0x1c56fb]));}else if(_0x1c56fb===_0x616e('0x56')){var _0x184412=JSON['parse'](_0x342b1a['query'][_0x1c56fb])[_0x616e('0x73')];var _0x604c44=JSON[_0x616e('0x74')](_0x342b1a[_0x616e('0x33')][_0x1c56fb])[_0x616e('0x75')];_0x31ad83['where'](_0x616e('0x5e'),_0x184412,_0x604c44);}else{if(_0x342b1a['query'][_0x1c56fb]==='null'){_0x31ad83[_0x616e('0x3b')]('i.'+_0x1c56fb+_0x616e('0x76'));}else{_0x31ad83['where']('i.'+_0x1c56fb+_0x616e('0x65'),_0x342b1a['query'][_0x1c56fb]);}}});}if(_0x342b1a[_0x616e('0x33')][_0x616e('0x6f')]){var _0x579d43=_0x342b1a['query'][_0x616e('0x6f')][_0x616e('0x77')]('\x5c','\x5c\x5c')[_0x616e('0x77')]('\x27\x27',_0x616e('0x78'));if(qs[_0x616e('0x79')](_0x579d43)){_0x29728d['or']('i.id\x20LIKE\x20?',_0x579d43+'%');}else{var _0x182cb7=[];_0x579d43[_0x616e('0x7a')]('\x20')[_0x616e('0x2d')](function(_0x40ace4){_0x182cb7[_0x616e('0x7b')]('+'+_0x40ace4[_0x616e('0x7c')]());});var _0x5251a5=_0x182cb7[_0x616e('0x7d')]('\x20');_0x29728d['or'](_0x616e('0x7e'),_0x5251a5)['or']('i.from\x20LIKE\x20?',_0x579d43+'%')['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x579d43+'%');}}}_0x31ad83[_0x616e('0x3b')](_0x29728d);if(_0x21449f[_0x616e('0x39')]){_0x21449f[_0x616e('0x39')][_0x616e('0x2d')](function(_0x265976){_0x31ad83[_0x616e('0x39')]('i.'+_0x265976[0x0],_0x265976[0x1]===_0x616e('0x7f')?![]:!![]);});}_0x31ad83[_0x616e('0x80')](_0x616e('0x81'));var _0x5ebbb3={'type':db[_0x616e('0x82')]['QueryTypes'][_0x616e('0x83')],'raw':!![]};var _0xe5e9c4=_0x31ad83['clone']()['field'](_0x616e('0x42'));if(!_0x342b1a[_0x616e('0x33')][_0x616e('0x54')]){if(_0x342b1a[_0x616e('0x33')][_0x616e('0x84')]){if(_0x342b1a['query']['read']==0x1){_0xe5e9c4[_0x616e('0x3b')](util[_0x616e('0x5a')](_0x616e('0x85'),_0x2aac9a[_0x616e('0x7c')]()));_0x31ad83[_0x616e('0x86')](_0x616e('0x87'));}else{_0xe5e9c4[_0x616e('0x3b')](util['format']('%s\x20>\x200',_0x2aac9a[_0x616e('0x7c')]()));_0x31ad83[_0x616e('0x86')]('`Messages.count`\x20>\x200');}}if(_0x342b1a[_0x616e('0x33')][_0x616e('0x88')]){var _0x24af6d=_[_0x616e('0x62')](_0x342b1a[_0x616e('0x33')]['tag'])?_0x342b1a[_0x616e('0x33')][_0x616e('0x88')]:new Array(_0x342b1a['query'][_0x616e('0x88')]);var _0xcd892e=squel[_0x616e('0x53')]();_0x24af6d['forEach'](function(_0xb6bf99){_0xcd892e['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0xb6bf99+',%');});_0x31ad83[_0x616e('0x86')](_0xcd892e);_0xe5e9c4['left_join']('openchannel_interaction_has_tags','it','it.OpenchannelInteractionId\x20=\x20i.id');_0xe5e9c4['left_join'](_0x616e('0x41'),'t',_0x616e('0x89'));_0xe5e9c4[_0x616e('0x3b')](_0x616e('0x8a'),_0x24af6d);}}else{var _0xf7c01b=JSON['parse'](_0x342b1a[_0x616e('0x33')][_0x616e('0x54')]);_[_0x616e('0x55')](_0xf7c01b)[_0x616e('0x2d')](function(_0x156fda){var _0x261aad=_0xf7c01b[_0x156fda];if(_0x156fda===_0x616e('0x60')){var _0x2cada9=_0x261aad[_0x616e('0x57')];var _0x2cb956=squel[_0x616e('0x53')]();_0x2cada9[_0x616e('0x2d')](function(_0x27700a){_0x2cb956['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x27700a+',%');});_0x31ad83[_0x616e('0x86')](_0x2cb956);_0xe5e9c4[_0x616e('0x49')](_0x616e('0x8b'),'it',_0x616e('0x8c'));_0xe5e9c4[_0x616e('0x49')]('tools_tags','t','t.id\x20=\x20it.TagId');_0xe5e9c4[_0x616e('0x3b')](_0x616e('0x8a'),_0x2cada9);}else if(_0x156fda===_0x616e('0x61')){if(_0x261aad[_0x616e('0x57')][_0x616e('0x37')]===0x1){if(_0x261aad[_0x616e('0x57')][0x0]===0x1){_0xe5e9c4[_0x616e('0x3b')](util['format'](_0x616e('0x85'),_0x2aac9a[_0x616e('0x7c')]()));_0x31ad83['having']('`Messages.count`\x20=\x200');}else{_0xe5e9c4[_0x616e('0x3b')](util['format'](_0x616e('0x8d'),_0x2aac9a[_0x616e('0x7c')]()));_0x31ad83[_0x616e('0x86')](_0x616e('0x8e'));}}}});}db[_0x616e('0x8f')][_0x616e('0x33')](_0xe5e9c4[_0x616e('0x7c')](),_0x5ebbb3)[_0x616e('0x26')](function(_0x14e949){_0x3a5c95[_0x616e('0x1e')]=_0x14e949[_0x616e('0x37')];if(_0x3a5c95[_0x616e('0x1e')]===0x0)return[];return db[_0x616e('0x8f')]['query'](_0x4e48a6[_0x616e('0x7c')](),_0x5ebbb3)[_0x616e('0x26')](function(_0x304436){_0x2d97e8=_[_0x616e('0x90')](_0x304436,'id');_0x5ebbb3=_[_0x616e('0x91')](_0x5ebbb3,{'model':db[_0x616e('0x31')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x31ad83[_0x616e('0x3e')]('a.key',_0x616e('0x92'));_0x31ad83[_0x616e('0x3e')](_0x616e('0x93'));_0x31ad83[_0x616e('0x3e')](_0x616e('0x6b'),_0x616e('0x94'));_0x31ad83[_0x616e('0x3e')](_0x616e('0x6c'),'Contact.lastName');_0x31ad83['field'](_0x616e('0x69'),_0x616e('0x95'));_0x31ad83[_0x616e('0x3e')](_0x616e('0x96'),'Contact.phone');_0x31ad83[_0x616e('0x3e')](_0x616e('0x97'),_0x616e('0x98'));_0x31ad83[_0x616e('0x3e')](_0x616e('0x99'),'Contact.fax');_0x31ad83[_0x616e('0x3e')](_0x616e('0x9a'),_0x616e('0x2e'));_0x31ad83[_0x616e('0x49')]('openchannel_interaction_has_tags','it',_0x616e('0x9b'));_0x31ad83['left_join'](_0x616e('0x41'),'t',_0x616e('0x89'));_0x31ad83['limit'](_0x21449f[_0x616e('0x20')]);_0x31ad83[_0x616e('0x1f')](_0x21449f[_0x616e('0x1f')]);return db[_0x616e('0x8f')]['query'](_0x31ad83['toString'](),_0x5ebbb3);})[_0x616e('0x26')](function(_0x45701f){_0x1c85ab[_0x616e('0x3b')](_0x616e('0x9c'),_['map'](_0x45701f,'id'));return db[_0x616e('0x8f')][_0x616e('0x33')](_0x1c85ab[_0x616e('0x7c')](),_0x5ebbb3)['then'](function(_0x532942){var _0x395511=_[_0x616e('0x9d')](_0x532942,_0x616e('0x9e'));var _0xd80c89=[];_0x45701f[_0x616e('0x2d')](function(_0x34e61a){_0xd80c89['push'](updateOpenchannelInteraction(_0x34e61a,_0x2d97e8,_0x395511));});return BPromise[_0x616e('0x9f')](_0xd80c89);});});})[_0x616e('0x26')](function(_0xe8f637){_0x3a5c95[_0x616e('0xa0')]=_0xe8f637;return _0x3a5c95;})[_0x616e('0x26')](respondWithFilteredResult(_0x36562d,_0x21449f))[_0x616e('0x2f')](handleError(_0x36562d,null));};exports[_0x616e('0xa1')]=function(_0x4b3f2a,_0x3fbbf1){var _0x5056d6={'raw':![],'where':{'id':_0x4b3f2a[_0x616e('0xa2')]['id']}},_0xcc4f2c={};_0xcc4f2c[_0x616e('0x34')]=_[_0x616e('0x55')](db[_0x616e('0x31')][_0x616e('0x32')]);_0xcc4f2c[_0x616e('0x33')]=_[_0x616e('0x55')](_0x4b3f2a[_0x616e('0x33')]);_0xcc4f2c[_0x616e('0x3c')]=_[_0x616e('0xa3')](_0xcc4f2c[_0x616e('0x34')],_0xcc4f2c[_0x616e('0x33')]);_0x5056d6[_0x616e('0x35')]=_[_0x616e('0xa3')](_0xcc4f2c['model'],qs[_0x616e('0x36')](_0x4b3f2a[_0x616e('0x33')][_0x616e('0x36')]));_0x5056d6[_0x616e('0x35')]=_0x5056d6[_0x616e('0x35')][_0x616e('0x37')]?_0x5056d6[_0x616e('0x35')]:_0xcc4f2c[_0x616e('0x34')];if(_0x4b3f2a[_0x616e('0x33')][_0x616e('0xa4')]){_0x5056d6[_0x616e('0xa5')]=[{'all':!![]}];}_0x5056d6=_[_0x616e('0x91')]({},_0x5056d6,_0x4b3f2a[_0x616e('0xa6')]);return db[_0x616e('0x31')][_0x616e('0xa7')](_0x5056d6)[_0x616e('0x26')](handleEntityNotFound(_0x3fbbf1,null))[_0x616e('0x26')](respondWithResult(_0x3fbbf1,null))[_0x616e('0x2f')](handleError(_0x3fbbf1,null));};exports[_0x616e('0xa8')]=function(_0x32bf6e,_0x319e4b){return db[_0x616e('0x31')][_0x616e('0xa8')](_0x32bf6e[_0x616e('0xa9')],{})[_0x616e('0x26')](respondWithResult(_0x319e4b,0xc9))[_0x616e('0x2f')](handleError(_0x319e4b,null));};exports[_0x616e('0xaa')]=function(_0x8b935d,_0x3a2025){if(_0x8b935d[_0x616e('0xa9')]['id']){delete _0x8b935d['body']['id'];}return db[_0x616e('0x31')][_0x616e('0xa7')]({'where':{'id':_0x8b935d[_0x616e('0xa2')]['id']}})[_0x616e('0x26')](handleEntityNotFound(_0x3a2025,null))[_0x616e('0x26')](saveUpdates(_0x8b935d[_0x616e('0xa9')],null))['then'](respondWithResult(_0x3a2025,null))['catch'](handleError(_0x3a2025,null));};exports[_0x616e('0xab')]=function(_0x289fd2,_0x57e44e){return db[_0x616e('0x31')][_0x616e('0xa7')]({'where':{'id':_0x289fd2[_0x616e('0xa2')]['id']}})[_0x616e('0x26')](handleEntityNotFound(_0x57e44e,null))[_0x616e('0x26')](removeEntity(_0x57e44e,null))['catch'](handleError(_0x57e44e,null));};exports['describe']=function(_0x28d650,_0x1e457b){return db[_0x616e('0x31')][_0x616e('0xac')]()[_0x616e('0x26')](respondWithResult(_0x1e457b,null))[_0x616e('0x2f')](handleError(_0x1e457b,null));};exports[_0x616e('0xad')]=function(_0x23e284,_0x1ed50f,_0x1ce293){return db[_0x616e('0xae')][_0x616e('0xa7')]({'where':{'id':_0x23e284[_0x616e('0xa2')]['id']}})[_0x616e('0x26')](handleEntityNotFound(_0x1ed50f,null))[_0x616e('0x26')](function(_0x1f84cc){if(_0x1f84cc){return _0x1f84cc[_0x616e('0xad')](_0x23e284[_0x616e('0xa9')][_0x616e('0xaf')],_[_0x616e('0xb0')](_0x23e284[_0x616e('0xa9')],[_0x616e('0xaf'),'id'])||{});}})[_0x616e('0x26')](respondWithResult(_0x1ed50f,null))['catch'](handleError(_0x1ed50f,null));};exports[_0x616e('0xb1')]=function(_0x4df6a8,_0x58a0cb,_0x25fa58){var _0x3c3ac4={'raw':![],'where':{}};var _0x14b653={};var _0x43fb4f={'count':0x0,'rows':[]};return db[_0x616e('0x31')]['findOne']({'where':{'id':_0x4df6a8[_0x616e('0xa2')]['id']}})[_0x616e('0x26')](handleEntityNotFound(_0x58a0cb,null))[_0x616e('0x26')](function(_0x24a408){if(_0x24a408){_0x14b653[_0x616e('0x34')]=_[_0x616e('0x55')](db[_0x616e('0xae')][_0x616e('0x32')]);_0x14b653[_0x616e('0x33')]=_['keys'](_0x4df6a8[_0x616e('0x33')]);_0x14b653[_0x616e('0x3c')]=_['intersection'](_0x14b653[_0x616e('0x34')],_0x14b653[_0x616e('0x33')]);_0x3c3ac4[_0x616e('0x35')]=_[_0x616e('0xa3')](_0x14b653[_0x616e('0x34')],qs[_0x616e('0x36')](_0x4df6a8[_0x616e('0x33')][_0x616e('0x36')]));_0x3c3ac4[_0x616e('0x35')]=_0x3c3ac4[_0x616e('0x35')][_0x616e('0x37')]?_0x3c3ac4[_0x616e('0x35')]:_0x14b653['model'];if(!_0x4df6a8[_0x616e('0x33')][_0x616e('0x6e')]('nolimit')){_0x3c3ac4[_0x616e('0x20')]=qs[_0x616e('0x20')](_0x4df6a8[_0x616e('0x33')][_0x616e('0x20')]);_0x3c3ac4[_0x616e('0x1f')]=qs['offset'](_0x4df6a8['query'][_0x616e('0x1f')]);}_0x3c3ac4[_0x616e('0x39')]=qs[_0x616e('0x3a')](_0x4df6a8[_0x616e('0x33')]['sort']);_0x3c3ac4[_0x616e('0x3b')]=qs[_0x616e('0x3c')](_[_0x616e('0xb2')](_0x4df6a8['query'],_0x14b653[_0x616e('0x3c')]));_0x3c3ac4[_0x616e('0x3b')][_0x616e('0x9e')]=_0x24a408['id'];if(_0x4df6a8[_0x616e('0x33')][_0x616e('0x6f')]){_0x3c3ac4[_0x616e('0x3b')]=_['merge'](_0x3c3ac4[_0x616e('0x3b')],{'$or':_[_0x616e('0x2b')](_0x3c3ac4['attributes'],function(_0x10edac){var _0x314f53={};_0x314f53[_0x10edac]={'$like':'%'+_0x4df6a8[_0x616e('0x33')][_0x616e('0x6f')]+'%'};return _0x314f53;})});}if(_0x4df6a8[_0x616e('0x33')][_0x616e('0x73')]){var _0x2d04d8=_0x4df6a8[_0x616e('0x33')][_0x616e('0x73')][_0x616e('0x7a')](',');var _0x631919={};_0x631919[_0x2d04d8[0x0]]={'$gte':moment(_0x2d04d8[0x1])['format'](_0x616e('0xb3'))};_0x3c3ac4[_0x616e('0x3b')]=_[_0x616e('0x91')](_0x3c3ac4['where'],_0x631919);}_0x3c3ac4=_[_0x616e('0x91')]({},_0x3c3ac4,_0x4df6a8[_0x616e('0xa6')]);return db[_0x616e('0xae')]['count']({'where':_0x3c3ac4['where']})[_0x616e('0x26')](function(_0x5152ee){_0x43fb4f[_0x616e('0x1e')]=_0x5152ee;if(_0x4df6a8[_0x616e('0x33')]['includeAll']){_0x3c3ac4[_0x616e('0xa5')]=[{'all':!![]}];}return db['OpenchannelMessage']['findAll'](_0x3c3ac4);})[_0x616e('0x26')](function(_0x1f0a29){_0x43fb4f[_0x616e('0xa0')]=_0x1f0a29;return _0x43fb4f;});}})[_0x616e('0x26')](respondWithFilteredResult(_0x58a0cb,_0x3c3ac4))[_0x616e('0x2f')](handleError(_0x58a0cb,null));};exports[_0x616e('0xb4')]=function(_0x56ccaf,_0x5a8190,_0x428b1d){return db[_0x616e('0x31')][_0x616e('0xa7')]({'where':{'id':_0x56ccaf['params']['id']}})[_0x616e('0x26')](handleEntityNotFound(_0x5a8190,null))[_0x616e('0x26')](function(_0x5c794f){if(_0x5c794f){return _0x5c794f[_0x616e('0xb5')](_0x56ccaf[_0x616e('0xa9')]['ids'],_[_0x616e('0xb0')](_0x56ccaf[_0x616e('0xa9')],[_0x616e('0xaf'),'id'])||{})['spread'](function(){return db[_0x616e('0xb6')][_0x616e('0xb7')]({'attributes':['id',_0x616e('0x27'),_0x616e('0x3f')],'where':{'id':_0x56ccaf[_0x616e('0xa9')][_0x616e('0xaf')]}});})['then'](function(_0x43b2b5){socket[_0x616e('0xb8')](_0x616e('0xb9'),{'id':Number(_0x56ccaf[_0x616e('0xa2')]['id']),'tags':_0x43b2b5||[]});return{'id':Number(_0x56ccaf['params']['id']),'tags':_0x43b2b5||[]};});}})['then'](respondWithResult(_0x5a8190,null))[_0x616e('0x2f')](handleError(_0x5a8190,null));};exports['removeTags']=function(_0x407b2c,_0x35c4cc,_0x26978c){return db[_0x616e('0x31')]['find']({'where':{'id':_0x407b2c['params']['id']}})[_0x616e('0x26')](handleEntityNotFound(_0x35c4cc,null))[_0x616e('0x26')](function(_0x3ce802){if(_0x3ce802){return _0x3ce802['removeTags'](_0x407b2c[_0x616e('0x33')]['ids']);}})[_0x616e('0x26')](respondWithStatusCode(_0x35c4cc,null))['catch'](handleError(_0x35c4cc,null));};exports[_0x616e('0xba')]=function(_0x5e48cc,_0x8b707a){var _0x4df25d=moment()[_0x616e('0xbb')]()[_0x616e('0x7c')]();var _0x426c2e=path[_0x616e('0x7d')](config[_0x616e('0xbc')],_0x616e('0xbd'),'files',_0x616e('0xbe'));var _0x11938c=path[_0x616e('0x7d')](config[_0x616e('0xbc')],_0x616e('0xbd'),_0x616e('0xbf'),_0x616e('0xc0'));var _0x1d7a64=path[_0x616e('0x7d')](_0x426c2e,_0x4df25d);var _0x25c968=util[_0x616e('0x5a')]('transcript-%d-%s.zip',_0x5e48cc[_0x616e('0xa2')]['id'],_0x4df25d);var _0x5e10dd=path[_0x616e('0x7d')](_0x426c2e,_0x25c968);var _0x2455a8=![];return db['OpenchannelInteraction'][_0x616e('0xa7')]({'where':{'id':_0x5e48cc[_0x616e('0xa2')]['id']},'include':[{'model':db[_0x616e('0xae')],'as':'Messages','attributes':['id',_0x616e('0xa9'),_0x616e('0x56'),_0x616e('0xc1'),_0x616e('0xc2')],'include':[{'model':db[_0x616e('0xc3')],'as':_0x616e('0xc3'),'attributes':['id','fullname'],'raw':!![]},{'model':db[_0x616e('0xc4')],'as':_0x616e('0xc5'),'attributes':['id',_0x616e('0xc6'),'lastName'],'raw':!![]},{'model':db[_0x616e('0xc7')],'as':_0x616e('0xc7'),'raw':!![]}]},{'model':db[_0x616e('0xc8')],'as':_0x616e('0xc9'),'attributes':['id',_0x616e('0x27')]},{'model':db[_0x616e('0xc3')],'as':_0x616e('0xca'),'attributes':['id',_0x616e('0xcb')]}]})[_0x616e('0x26')](handleEntityNotFound(_0x8b707a,null))[_0x616e('0x26')](function(_0x2aeb4e){if(_0x2aeb4e){var _0x25d2f6=_0x2aeb4e[_0x616e('0xcc')]({'plain':!![]});_0x2455a8=!![];var _0x55a684={'format':'A4','border':_0x616e('0xcd'),'header':{'height':_0x616e('0xce'),'contents':{'first':'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Interaction\x20Transcript \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'}},'footer':{'height':_0x616e('0xcf'),'contents':{'default':util['format'](_0x616e('0xd0'),util[_0x616e('0x5a')](_0x616e('0xd1'),_0x616e('0xd2'),_0x25d2f6['id']),moment()[_0x616e('0x5a')]('YYYY-MM-DD')[_0x616e('0x7c')]())}}};fs[_0x616e('0xd3')](_0x1d7a64);var _0x5486b7={'channel':_0x616e('0xd2'),'account':_0x25d2f6[_0x616e('0xc9')][_0x616e('0x27')],'agent':_0x25d2f6[_0x616e('0xca')]?_0x25d2f6[_0x616e('0xca')][_0x616e('0xcb')]:_0x616e('0xd4'),'createdAt':moment(_0x25d2f6['createdAt'])['format'](_0x616e('0xb3'))[_0x616e('0x7c')](),'closedAt':_0x25d2f6[_0x616e('0x29')]?moment(_0x25d2f6[_0x616e('0xd5')])[_0x616e('0x5a')](_0x616e('0xb3'))[_0x616e('0x7c')]():'','disposition':_0x25d2f6[_0x616e('0xd6')],'visibility':_0x25d2f6[_0x616e('0xd7')]?_0x616e('0xd8'):_0x616e('0xd9'),'messages':_(_0x25d2f6[_0x616e('0xda')])[_0x616e('0x6f')]({'secret':![]})[_0x616e('0x2b')](function(_0x153284){if(_0x153284['Attachment']){var _0x1f5107=path['join'](_0x11938c,_0x153284[_0x616e('0xc7')][_0x616e('0xdb')]);if(fs[_0x616e('0xdc')](_0x1f5107)){fs[_0x616e('0xdd')](_0x1f5107)['pipe'](fs[_0x616e('0xde')](path[_0x616e('0x7d')](_0x1d7a64,_0x153284[_0x616e('0xc7')][_0x616e('0xdb')])));}}return{'date':moment(_0x153284[_0x616e('0x56')])[_0x616e('0x5a')]('YYYY-MM-DD\x20HH:mm:ss')[_0x616e('0x7c')](),'sender':_0x153284[_0x616e('0xc1')]===_0x616e('0xdf')?_0x153284[_0x616e('0xc3')]?_0x153284['User'][_0x616e('0xcb')]:'System':_0x153284[_0x616e('0xc5')][_0x616e('0xc6')]+(_0x153284[_0x616e('0xc5')][_0x616e('0xe0')]?'\x20'+_0x153284['Contact'][_0x616e('0xe0')]:''),'body':_0x153284[_0x616e('0xc7')]?_0x153284['Attachment'][_0x616e('0xdb')]:_0x153284[_0x616e('0xa9')],'direction':_0x153284[_0x616e('0xc1')]==='out'?'A':'C','secret':_0x153284[_0x616e('0xc2')],'attachment':_0x153284['Attachment']};})['value']()};return ejs[_0x616e('0xe1')](path[_0x616e('0x7d')](config[_0x616e('0xbc')],_0x616e('0xbd'),_0x616e('0xe2'),_0x616e('0xe3')),{'interaction':_0x5486b7})[_0x616e('0x26')](function(_0x2a9ead){return new BPromise(function(_0x510fb9,_0x2cef55){pdf[_0x616e('0xa8')](_0x2a9ead,_0x55a684)['toFile'](path[_0x616e('0x7d')](_0x1d7a64,_0x616e('0xe4')+_0x25d2f6['id']+'-'+_0x4df25d+_0x616e('0xe5')),function(_0x4984cd,_0x4ffdcd){if(_0x4984cd)return _0x2cef55(_0x4984cd);_0x510fb9(_0x4ffdcd);});});});}})[_0x616e('0x26')](function(){if(_0x2455a8){return new BPromise(function(_0x95b413,_0x1a806c){zipdir(_0x1d7a64,{'saveTo':_0x5e10dd},function(_0x32bc53,_0x597fbc){if(_0x32bc53)return _0x1a806c(_0x32bc53);return _0x95b413(_0x597fbc);});})[_0x616e('0x26')](function(){return new BPromise(function(_0x2cec8e,_0x20579d){rimraf(_0x1d7a64,function(_0x42c9f6){if(_0x42c9f6)_0x20579d(_0x42c9f6);return _0x2cec8e();});});})[_0x616e('0x26')](function(){return _0x8b707a[_0x616e('0xba')](_0x5e10dd,_0x25c968,function(_0x222d8d){if(_0x222d8d){console['log'](_0x616e('0xe6'),_0x222d8d);}else{fs[_0x616e('0xe7')](_0x5e10dd);}});});}else{return _0x8b707a[_0x616e('0x1b')](0xc8);}})[_0x616e('0x2f')](handleError(_0x8b707a,null));};
\ No newline at end of file
+var _0x5d60=['isEmpty','OpenchannelAccountId','i.OpenchannelAccountId\x20IN\x20?','concat','createdAt','$gte','$lte','null','\x20IS\x20NULL','filter','replace','i.id\x20LIKE\x20?','split','join','i.from\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','DESC','group','i.id','Sequelize','QueryTypes','SELECT','clone','read','%s\x20=\x200','toString','having','`Messages.count`\x20=\x200','%s\x20>\x200','`Messages.count`\x20>\x200','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','openchannel_interaction_has_tags','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','TagId','mail_interaction_has_tags','sequelize','merge','Account.key','i.*','Contact.firstName','Contact.lastName','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','GROUP_CONCAT(DISTINCT\x20t.id)','ui.OpenchannelInteractionId\x20IN\x20?','groupBy','OpenchannelInteractionId','all','rows','catch','show','params','includeAll','include','options','create','body','find','describe','addMessage','ids','omit','findOne','YYYY-MM-DD\x20HH:mm:ss','findAll','addTags','spread','Tag','openchannelInteractionTags:save','removeTags','download','unix','root','server','files','attachments','transcript-%d-%s.zip','Messages','direction','secret','fullname','CmContact','Contact','lastName','Attachment','OpenchannelAccount','Account','User','Owner','10px','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Interaction\x20Transcript \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',' \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{page}}/{{pages}} \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','Openchannel','YYYY-MM-DD','mkdirSync','closedAt','threadId','basename','existsSync','createReadStream','pipe','createWriteStream','out','System','firstName','renderFile','views','toFile','transcript-','.pdf','log','err','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','localhost','socket.io-emitter','redis','./openchannelInteraction.socket','sendStatus','end','json','offset','limit','status','set','Content-Range','apply','save','update','destroy','then','error','stack','name','send','closed','unreadMessages','OpenchannelMessage','count','Tags','TagIds','forEach','push','index','OpenchannelInteraction','rawAttributes','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','select','field','color','from','tools_tags','COUNT(*)','openchannel_messages','me.direction\x20=\x20\x27in\x27','me.read\x20=\x20false','u.id','user_has_openchannel_interactions','left_join','users','openchannel_interactions','cm_contacts','openchannel_accounts','a.id\x20=\x20i.OpenchannelAccountId','me.OpenchannelInteractionId\x20=\x20i.id','expr','parse','advancedFilter','keys','value','dateStart','startOf','day','format','utc','endOf','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','isArray','condition','Messages.count','and','tableAlias','\x20IN\x20?','\x20=\x20?','c.firstName','\x20LIKE\x20?','c.email','\x20>\x20?','\x20<\x20?','LIKE','ContactId','c.lastName','map','isNil'];(function(_0x4c5227,_0x5da181){var _0x3f03fa=function(_0x55e910){while(--_0x55e910){_0x4c5227['push'](_0x4c5227['shift']());}};_0x3f03fa(++_0x5da181);}(_0x5d60,0x165));var _0x05d6=function(_0x3ef314,_0x511c51){_0x3ef314=_0x3ef314-0x0;var _0x39fafe=_0x5d60[_0x3ef314];return _0x39fafe;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x05d6('0x0'));var rimraf=require(_0x05d6('0x1'));var zipdir=require(_0x05d6('0x2'));var jsonpatch=require(_0x05d6('0x3'));var rp=require(_0x05d6('0x4'));var moment=require(_0x05d6('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x05d6('0x6'));var util=require(_0x05d6('0x7'));var path=require(_0x05d6('0x8'));var sox=require(_0x05d6('0x9'));var csv=require(_0x05d6('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x05d6('0xb'));var crypto=require(_0x05d6('0xc'));var jsforce=require(_0x05d6('0xd'));var deskjs=require(_0x05d6('0xe'));var toCsv=require(_0x05d6('0xa'));var querystring=require(_0x05d6('0xf'));var Papa=require(_0x05d6('0x10'));var Redis=require('ioredis');var authService=require(_0x05d6('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x05d6('0x12'));var logger=require(_0x05d6('0x13'))(_0x05d6('0x14'));var utils=require(_0x05d6('0x15'));var config=require(_0x05d6('0x16'));var db=require(_0x05d6('0x17'))['db'];config['redis']=_[_0x05d6('0x18')](config['redis'],{'host':_0x05d6('0x19'),'port':0x18eb});var socket=require(_0x05d6('0x1a'))(new Redis(config[_0x05d6('0x1b')]));require(_0x05d6('0x1c'))['register'](socket);function respondWithStatusCode(_0x3815f7,_0x4db694){_0x4db694=_0x4db694||0xcc;return function(_0x22a180){if(_0x22a180){return _0x3815f7[_0x05d6('0x1d')](_0x4db694);}return _0x3815f7['status'](_0x4db694)[_0x05d6('0x1e')]();};}function respondWithResult(_0x590ee0,_0x25734e){_0x25734e=_0x25734e||0xc8;return function(_0x3d8606){if(_0x3d8606){return _0x590ee0['status'](_0x25734e)[_0x05d6('0x1f')](_0x3d8606);}};}function respondWithFilteredResult(_0x47d955,_0x4870e1){return function(_0x40f027){if(_0x40f027){var _0x94ec1c=_0x40f027['count'],_0xc7ffd0=_0x4870e1[_0x05d6('0x20')],_0x530f60=_0x4870e1[_0x05d6('0x20')]+_0x4870e1[_0x05d6('0x21')],_0x25e5b7;if(_0x530f60>=_0x94ec1c){_0x530f60=_0x94ec1c;_0x25e5b7=0xc8;}else{_0x25e5b7=0xce;}_0x47d955[_0x05d6('0x22')](_0x25e5b7);return _0x47d955[_0x05d6('0x23')](_0x05d6('0x24'),_0xc7ffd0+'-'+_0x530f60+'/'+_0x94ec1c)['json'](_0x40f027);}return null;};}function patchUpdates(_0x59f0c9){return function(_0x3c46bd){try{jsonpatch[_0x05d6('0x25')](_0x3c46bd,_0x59f0c9,!![]);}catch(_0x24fb3f){return BPromise['reject'](_0x24fb3f);}return _0x3c46bd[_0x05d6('0x26')]();};}function saveUpdates(_0x537323,_0x5d0f4a){return function(_0x11bb78){if(_0x11bb78){return _0x11bb78[_0x05d6('0x27')](_0x537323)['then'](function(_0x1c973b){return _0x1c973b;});}return null;};}function removeEntity(_0x2d092a,_0x4119c2){return function(_0x1726e2){if(_0x1726e2){return _0x1726e2[_0x05d6('0x28')]()[_0x05d6('0x29')](function(){_0x2d092a[_0x05d6('0x22')](0xcc)[_0x05d6('0x1e')]();});}};}function handleEntityNotFound(_0x656d39,_0x155aa4){return function(_0x52b8fb){if(!_0x52b8fb){_0x656d39[_0x05d6('0x1d')](0x194);}return _0x52b8fb;};}function handleError(_0x32f8ad,_0xe0600c){_0xe0600c=_0xe0600c||0x1f4;return function(_0x143193){logger[_0x05d6('0x2a')](_0x143193[_0x05d6('0x2b')]);if(_0x143193[_0x05d6('0x2c')]){delete _0x143193['name'];}_0x32f8ad[_0x05d6('0x22')](_0xe0600c)[_0x05d6('0x2d')](_0x143193);};}function getInteractionUnreadMessages(_0x16b9c4){return new BPromise(function(_0x459f47,_0x3681a4){try{if(_0x16b9c4[_0x05d6('0x2e')]){_0x16b9c4[_0x05d6('0x2f')]=0x0;_0x459f47(_0x16b9c4);}else{return db[_0x05d6('0x30')][_0x05d6('0x31')]({'where':{'OpenchannelInteractionId':_0x16b9c4['id'],'direction':'in','read':![]}})[_0x05d6('0x29')](function(_0x39ba68){_0x16b9c4['unreadMessages']=_0x39ba68;_0x459f47(_0x16b9c4);});}}catch(_0x2ce170){_0x3681a4(_0x2ce170);}});}function getInteractionUsers(_0x4966fd,_0x25c9d4){return new BPromise(function(_0x356f89,_0x24f7df){try{if(_0x25c9d4[_0x4966fd['id']]){_0x4966fd['Users']=_['map'](_0x25c9d4[_0x4966fd['id']],function(_0x51b913){return{'id':_0x51b913['id']};});}}catch(_0x33c3b7){_0x24f7df(_0x33c3b7);}_0x356f89(_0x4966fd);});}function getInteractionTags(_0xa232e1,_0x47a55a){return new BPromise(function(_0x2cad37,_0x10bb83){try{if(_0xa232e1['TagIds']){_0xa232e1[_0x05d6('0x32')]=[];_0xa232e1[_0x05d6('0x33')]['split'](',')[_0x05d6('0x34')](function(_0x14c48c){_0xa232e1[_0x05d6('0x32')][_0x05d6('0x35')](_0x47a55a[_0x14c48c]);});}delete _0xa232e1[_0x05d6('0x33')];}catch(_0x44f964){_0x10bb83(_0x44f964);}_0x2cad37(_0xa232e1);});}function updateOpenchannelInteraction(_0x3fff29,_0x20c73e,_0x29434c){return new BPromise(function(_0x50bdfc,_0x1b62a1){return getInteractionUnreadMessages(_0x3fff29)[_0x05d6('0x29')](function(_0x26cc72){return getInteractionUsers(_0x26cc72,_0x29434c);})[_0x05d6('0x29')](function(_0x1f4bae){return getInteractionTags(_0x1f4bae,_0x20c73e);})['then'](function(_0x39751d){_0x50bdfc(_0x39751d);})['catch'](function(_0x13fc08){_0x1b62a1(_0x13fc08);});});}exports[_0x05d6('0x36')]=function(_0x5a2f78,_0x52a16d){var _0x285c1c={},_0x4dfd65={},_0x518991={'count':0x0,'rows':[]};var _0x158ba2=db[_0x05d6('0x37')][_0x05d6('0x38')];_0x4dfd65[_0x05d6('0x39')]=_['keys'](_0x158ba2);_0x4dfd65[_0x05d6('0x3a')]=_['keys'](_0x5a2f78[_0x05d6('0x3a')]);_0x4dfd65[_0x05d6('0x3b')]=_[_0x05d6('0x3c')](_0x4dfd65[_0x05d6('0x39')],_0x4dfd65[_0x05d6('0x3a')]);_0x285c1c[_0x05d6('0x3d')]=_[_0x05d6('0x3c')](_0x4dfd65[_0x05d6('0x39')],qs[_0x05d6('0x3e')](_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x3e')]));_0x285c1c['attributes']=_0x285c1c[_0x05d6('0x3d')][_0x05d6('0x3f')]?_0x285c1c['attributes']:_0x4dfd65[_0x05d6('0x39')];if(!_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x40')](_0x05d6('0x41'))){_0x285c1c[_0x05d6('0x21')]=qs[_0x05d6('0x21')](_0x5a2f78['query'][_0x05d6('0x21')]);_0x285c1c[_0x05d6('0x20')]=qs[_0x05d6('0x20')](_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x20')]);}_0x285c1c[_0x05d6('0x42')]=qs['sort'](_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x43')]);_0x285c1c[_0x05d6('0x44')]=qs[_0x05d6('0x3b')](_[_0x05d6('0x45')](_0x5a2f78[_0x05d6('0x3a')],_0x4dfd65['filters']));var _0x4ff840=[];var _0x22a1bd=squel[_0x05d6('0x46')]()[_0x05d6('0x47')]('id')['field'](_0x05d6('0x2c'))[_0x05d6('0x47')](_0x05d6('0x48'))[_0x05d6('0x49')](_0x05d6('0x4a'));var _0x39dbac=squel['select']()[_0x05d6('0x47')](_0x05d6('0x4b'))[_0x05d6('0x49')](_0x05d6('0x4c'),'me')['where']('me.OpenchannelInteractionId\x20=\x20i.id')[_0x05d6('0x44')](_0x05d6('0x4d'))[_0x05d6('0x44')](_0x05d6('0x4e'));var _0x33fcbd=squel[_0x05d6('0x46')]()[_0x05d6('0x47')](_0x05d6('0x4f'))[_0x05d6('0x47')]('ui.OpenchannelInteractionId')[_0x05d6('0x49')](_0x05d6('0x50'),'ui')[_0x05d6('0x51')](_0x05d6('0x52'),'u','u.id\x20=\x20ui.UserId');var _0x1106aa=squel[_0x05d6('0x46')]()['from'](_0x05d6('0x53'),'i')[_0x05d6('0x51')](_0x05d6('0x54'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x05d6('0x51')](_0x05d6('0x52'),'o','o.id\x20=\x20i.UserId')['left_join'](_0x05d6('0x55'),'a',_0x05d6('0x56'))[_0x05d6('0x51')](_0x05d6('0x4c'),'me',_0x05d6('0x57'));var _0xe59344=squel[_0x05d6('0x58')]();if(_0x5a2f78[_0x05d6('0x3a')]['advancedFilter']){var _0x262771=JSON[_0x05d6('0x59')](_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x5a')]);_[_0x05d6('0x5b')](_0x262771)['forEach'](function(_0x4ef238){var _0x3d477b=_0x262771[_0x4ef238];if(_0x4ef238==='createdAt'){var _0x26c02e=moment(_0x3d477b[_0x05d6('0x5c')][_0x05d6('0x5d')])[_0x05d6('0x5e')](_0x05d6('0x5f'))['utc']()[_0x05d6('0x60')]();var _0x2e4bc7=moment(_0x2e4bc7)[_0x05d6('0x61')]()[_0x05d6('0x62')]('day')[_0x05d6('0x60')]();_0xe59344['and'](_0x05d6('0x63'),_0x26c02e,_0x2e4bc7);}else{if(_[_0x05d6('0x64')](_0x3d477b[_0x05d6('0x65')])){_0x3d477b[_0x05d6('0x65')]['forEach'](function(_0x452e90){switch(_0x3d477b['condition'][_0x05d6('0x5c')]){case'IS':if(_0x4ef238!=='TagId'&&_0x4ef238!==_0x05d6('0x66')){if(_[_0x05d6('0x64')](_0x3d477b['value'])&&_0x3d477b['value'][_0x05d6('0x3f')]>0x1){_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x69'),_0x3d477b['value']);}else{_0xe59344['and'](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x6a'),_0x3d477b[_0x05d6('0x5c')][0x0]);}}break;case'=':_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+'\x20=\x20?',_0x3d477b[_0x05d6('0x5c')]);break;case'LIKE':if(_0x4ef238==='ContactId'){_0xe59344[_0x05d6('0x67')](_0x05d6('0x6b')+'\x20LIKE\x20?','%'+_0x3d477b[_0x05d6('0x5c')]+'%');_0xe59344['or']('c.lastName'+_0x05d6('0x6c'),'%'+_0x3d477b[_0x05d6('0x5c')]+'%');_0xe59344['or'](_0x05d6('0x6d')+_0x05d6('0x6c'),'%'+_0x3d477b['value']+'%');}else{_0xe59344[_0x05d6('0x67')](_0x3d477b['tableAlias']+'.'+_0x4ef238+_0x05d6('0x6c'),'%'+_0x3d477b[_0x05d6('0x5c')]+'%');}break;case'>':_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x6e'),_0x3d477b[_0x05d6('0x5c')]);break;case'<':_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x6f'),_0x3d477b['value']);break;}});}else{switch(_0x3d477b[_0x05d6('0x65')][_0x05d6('0x5c')]){case'IS':if(_0x4ef238!=='TagId'&&_0x4ef238!==_0x05d6('0x66')){if(_['isArray'](_0x3d477b[_0x05d6('0x5c')])&&_0x3d477b['value'][_0x05d6('0x3f')]>0x1){_0xe59344['and'](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x69'),_0x3d477b[_0x05d6('0x5c')]);}else{_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+'\x20=\x20?',_0x3d477b[_0x05d6('0x5c')][0x0]);}}break;case'=':_0xe59344['and'](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x6a'),_0x3d477b[_0x05d6('0x5c')]);break;case _0x05d6('0x70'):if(_0x4ef238===_0x05d6('0x71')){_0xe59344['and'](_0x05d6('0x6b')+'\x20LIKE\x20?','%'+_0x3d477b[_0x05d6('0x5c')]+'%');_0xe59344['or'](_0x05d6('0x72')+_0x05d6('0x6c'),'%'+_0x3d477b[_0x05d6('0x5c')]+'%');_0xe59344['or']('c.email'+_0x05d6('0x6c'),'%'+_0x3d477b[_0x05d6('0x5c')]+'%');}else{_0xe59344['and'](_0x3d477b['tableAlias']+'.'+_0x4ef238+_0x05d6('0x6c'),'%'+_0x3d477b[_0x05d6('0x5c')]+'%');}break;case'>':_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x6e'),_0x3d477b[_0x05d6('0x5c')]);break;case'<':_0xe59344[_0x05d6('0x67')](_0x3d477b[_0x05d6('0x68')]+'.'+_0x4ef238+_0x05d6('0x6f'),_0x3d477b[_0x05d6('0x5c')]);break;}}}});}else{var _0xc4d5bd=_(Object['keys'](_0x5a2f78[_0x05d6('0x3a')]))[_0x05d6('0x73')](function(_0x4dc571){return _0x158ba2[_0x05d6('0x40')](_0x4dc571)?_0x4dc571:undefined;})['filter'](function(_0xf6efe9){return!_[_0x05d6('0x74')](_0xf6efe9);})[_0x05d6('0x5c')]();if(!_[_0x05d6('0x75')](_0xc4d5bd)){_0xc4d5bd[_0x05d6('0x34')](function(_0x5b0c15){if(_0x5b0c15===_0x05d6('0x76')){_0x1106aa['where'](_0x05d6('0x77'),[][_0x05d6('0x78')](_0x5a2f78[_0x05d6('0x3a')][_0x5b0c15]));}else if(_0x5b0c15===_0x05d6('0x79')){var _0x5c5583=JSON[_0x05d6('0x59')](_0x5a2f78[_0x05d6('0x3a')][_0x5b0c15])[_0x05d6('0x7a')];var _0x3370b8=JSON[_0x05d6('0x59')](_0x5a2f78[_0x05d6('0x3a')][_0x5b0c15])[_0x05d6('0x7b')];_0x1106aa[_0x05d6('0x44')](_0x05d6('0x63'),_0x5c5583,_0x3370b8);}else{if(_0x5a2f78['query'][_0x5b0c15]===_0x05d6('0x7c')){_0x1106aa[_0x05d6('0x44')]('i.'+_0x5b0c15+_0x05d6('0x7d'));}else{_0x1106aa['where']('i.'+_0x5b0c15+'\x20=\x20?',_0x5a2f78['query'][_0x5b0c15]);}}});}if(_0x5a2f78['query'][_0x05d6('0x7e')]){var _0x2a130c=_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x7e')][_0x05d6('0x7f')]('\x5c','\x5c\x5c')[_0x05d6('0x7f')]('\x27\x27','\x27\x27\x27\x27');if(qs['isNumeric'](_0x2a130c)){_0xe59344['or'](_0x05d6('0x80'),_0x2a130c+'%');}else{var _0x4671f6=[];_0x2a130c[_0x05d6('0x81')]('\x20')['forEach'](function(_0x558046){_0x4671f6[_0x05d6('0x35')]('+'+_0x558046['toString']());});var _0x40867d=_0x4671f6[_0x05d6('0x82')]('\x20');_0xe59344['or']('MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',_0x40867d)['or'](_0x05d6('0x83'),_0x2a130c+'%')['or'](_0x05d6('0x84'),_0x2a130c+'%');}}}_0x1106aa[_0x05d6('0x44')](_0xe59344);if(_0x285c1c[_0x05d6('0x42')]){_0x285c1c[_0x05d6('0x42')]['forEach'](function(_0x269cf0){_0x1106aa[_0x05d6('0x42')]('i.'+_0x269cf0[0x0],_0x269cf0[0x1]===_0x05d6('0x85')?![]:!![]);});}_0x1106aa[_0x05d6('0x86')](_0x05d6('0x87'));var _0x1abf83={'type':db[_0x05d6('0x88')][_0x05d6('0x89')][_0x05d6('0x8a')],'raw':!![]};var _0x1d1989=_0x1106aa[_0x05d6('0x8b')]()[_0x05d6('0x47')](_0x05d6('0x4b'));if(!_0x5a2f78['query'][_0x05d6('0x5a')]){if(_0x5a2f78['query']['read']){if(_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x8c')]==0x1){_0x1d1989[_0x05d6('0x44')](util[_0x05d6('0x60')](_0x05d6('0x8d'),_0x39dbac[_0x05d6('0x8e')]()));_0x1106aa[_0x05d6('0x8f')](_0x05d6('0x90'));}else{_0x1d1989[_0x05d6('0x44')](util[_0x05d6('0x60')](_0x05d6('0x91'),_0x39dbac[_0x05d6('0x8e')]()));_0x1106aa['having'](_0x05d6('0x92'));}}if(_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x93')]){var _0x59c80e=_['isArray'](_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x93')])?_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x93')]:new Array(_0x5a2f78[_0x05d6('0x3a')]['tag']);var _0x42a584=squel[_0x05d6('0x58')]();_0x59c80e['forEach'](function(_0x19920e){_0x42a584['or'](_0x05d6('0x94'),'%,'+_0x19920e+',%');});_0x1106aa[_0x05d6('0x8f')](_0x42a584);_0x1d1989[_0x05d6('0x51')](_0x05d6('0x95'),'it','it.OpenchannelInteractionId\x20=\x20i.id');_0x1d1989[_0x05d6('0x51')](_0x05d6('0x4a'),'t',_0x05d6('0x96'));_0x1d1989[_0x05d6('0x44')](_0x05d6('0x97'),_0x59c80e);}}else{var _0x262771=JSON[_0x05d6('0x59')](_0x5a2f78[_0x05d6('0x3a')][_0x05d6('0x5a')]);_[_0x05d6('0x5b')](_0x262771)['forEach'](function(_0xe8393e){var _0x3be8a9=_0x262771[_0xe8393e];if(_0xe8393e===_0x05d6('0x98')){var _0x3c3ed8=_0x3be8a9[_0x05d6('0x5c')];var _0x269ed2=squel[_0x05d6('0x58')]();_0x3c3ed8[_0x05d6('0x34')](function(_0x13c23e){_0x269ed2['or'](_0x05d6('0x94'),'%,'+_0x13c23e+',%');});_0x1106aa[_0x05d6('0x8f')](_0x269ed2);_0x1d1989[_0x05d6('0x51')](_0x05d6('0x99'),'it','it.MailInteractionId\x20=\x20i.id');_0x1d1989[_0x05d6('0x51')](_0x05d6('0x4a'),'t',_0x05d6('0x96'));_0x1d1989[_0x05d6('0x44')]('t.id\x20IN\x20?',_0x3c3ed8);}else if(_0xe8393e===_0x05d6('0x66')){if(_0x3be8a9[_0x05d6('0x5c')][_0x05d6('0x3f')]===0x1){if(_0x3be8a9[_0x05d6('0x5c')][0x0]===0x1){_0x1d1989[_0x05d6('0x44')](util[_0x05d6('0x60')](_0x05d6('0x8d'),_0x39dbac[_0x05d6('0x8e')]()));_0x1106aa[_0x05d6('0x8f')](_0x05d6('0x90'));}else{_0x1d1989['where'](util[_0x05d6('0x60')](_0x05d6('0x91'),_0x39dbac['toString']()));_0x1106aa[_0x05d6('0x8f')](_0x05d6('0x92'));}}}});}db[_0x05d6('0x9a')][_0x05d6('0x3a')](_0x1d1989[_0x05d6('0x8e')](),_0x1abf83)[_0x05d6('0x29')](function(_0x322197){_0x518991['count']=_0x322197[_0x05d6('0x3f')];if(_0x518991[_0x05d6('0x31')]===0x0)return[];return db['sequelize']['query'](_0x22a1bd[_0x05d6('0x8e')](),_0x1abf83)[_0x05d6('0x29')](function(_0x29932e){_0x4ff840=_['keyBy'](_0x29932e,'id');_0x1abf83=_[_0x05d6('0x9b')](_0x1abf83,{'model':db['OpenchannelInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});_0x1106aa[_0x05d6('0x47')]('a.key',_0x05d6('0x9c'));_0x1106aa['field'](_0x05d6('0x9d'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0x6b'),_0x05d6('0x9e'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0x72'),_0x05d6('0x9f'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0x6d'),_0x05d6('0xa0'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0xa1'),_0x05d6('0xa2'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0xa3'),_0x05d6('0xa4'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0xa5'),_0x05d6('0xa6'));_0x1106aa[_0x05d6('0x47')](_0x05d6('0xa7'),_0x05d6('0x33'));_0x1106aa['left_join']('openchannel_interaction_has_tags','it','it.OpenchannelInteractionId\x20=\x20i.id');_0x1106aa['left_join'](_0x05d6('0x4a'),'t',_0x05d6('0x96'));_0x1106aa[_0x05d6('0x21')](_0x285c1c[_0x05d6('0x21')]);_0x1106aa[_0x05d6('0x20')](_0x285c1c[_0x05d6('0x20')]);return db['sequelize'][_0x05d6('0x3a')](_0x1106aa[_0x05d6('0x8e')](),_0x1abf83);})[_0x05d6('0x29')](function(_0x54d3fc){_0x33fcbd['where'](_0x05d6('0xa8'),_['map'](_0x54d3fc,'id'));return db[_0x05d6('0x9a')][_0x05d6('0x3a')](_0x33fcbd[_0x05d6('0x8e')](),_0x1abf83)[_0x05d6('0x29')](function(_0x420bfa){var _0x16c07b=_[_0x05d6('0xa9')](_0x420bfa,_0x05d6('0xaa'));var _0x13eb49=[];_0x54d3fc[_0x05d6('0x34')](function(_0x28c874){_0x13eb49[_0x05d6('0x35')](updateOpenchannelInteraction(_0x28c874,_0x4ff840,_0x16c07b));});return BPromise[_0x05d6('0xab')](_0x13eb49);});});})[_0x05d6('0x29')](function(_0x153717){_0x518991[_0x05d6('0xac')]=_0x153717;return _0x518991;})[_0x05d6('0x29')](respondWithFilteredResult(_0x52a16d,_0x285c1c))[_0x05d6('0xad')](handleError(_0x52a16d,null));};exports[_0x05d6('0xae')]=function(_0x2c4ad2,_0x2b7521){var _0x3547c5={'raw':![],'where':{'id':_0x2c4ad2[_0x05d6('0xaf')]['id']}},_0x5412e5={};_0x5412e5[_0x05d6('0x39')]=_[_0x05d6('0x5b')](db[_0x05d6('0x37')][_0x05d6('0x38')]);_0x5412e5[_0x05d6('0x3a')]=_[_0x05d6('0x5b')](_0x2c4ad2[_0x05d6('0x3a')]);_0x5412e5[_0x05d6('0x3b')]=_[_0x05d6('0x3c')](_0x5412e5[_0x05d6('0x39')],_0x5412e5['query']);_0x3547c5[_0x05d6('0x3d')]=_[_0x05d6('0x3c')](_0x5412e5[_0x05d6('0x39')],qs[_0x05d6('0x3e')](_0x2c4ad2['query'][_0x05d6('0x3e')]));_0x3547c5[_0x05d6('0x3d')]=_0x3547c5[_0x05d6('0x3d')][_0x05d6('0x3f')]?_0x3547c5[_0x05d6('0x3d')]:_0x5412e5[_0x05d6('0x39')];if(_0x2c4ad2[_0x05d6('0x3a')][_0x05d6('0xb0')]){_0x3547c5[_0x05d6('0xb1')]=[{'all':!![]}];}_0x3547c5=_[_0x05d6('0x9b')]({},_0x3547c5,_0x2c4ad2[_0x05d6('0xb2')]);return db[_0x05d6('0x37')]['find'](_0x3547c5)['then'](handleEntityNotFound(_0x2b7521,null))['then'](respondWithResult(_0x2b7521,null))[_0x05d6('0xad')](handleError(_0x2b7521,null));};exports[_0x05d6('0xb3')]=function(_0x3caa3a,_0x25afae){return db[_0x05d6('0x37')][_0x05d6('0xb3')](_0x3caa3a['body'],{})[_0x05d6('0x29')](respondWithResult(_0x25afae,0xc9))['catch'](handleError(_0x25afae,null));};exports['update']=function(_0x158d59,_0x5a82ab){if(_0x158d59[_0x05d6('0xb4')]['id']){delete _0x158d59[_0x05d6('0xb4')]['id'];}return db[_0x05d6('0x37')][_0x05d6('0xb5')]({'where':{'id':_0x158d59[_0x05d6('0xaf')]['id']}})[_0x05d6('0x29')](handleEntityNotFound(_0x5a82ab,null))[_0x05d6('0x29')](saveUpdates(_0x158d59[_0x05d6('0xb4')],null))['then'](respondWithResult(_0x5a82ab,null))[_0x05d6('0xad')](handleError(_0x5a82ab,null));};exports[_0x05d6('0x28')]=function(_0x1e5b68,_0x25c09f){return db[_0x05d6('0x37')][_0x05d6('0xb5')]({'where':{'id':_0x1e5b68[_0x05d6('0xaf')]['id']}})['then'](handleEntityNotFound(_0x25c09f,null))[_0x05d6('0x29')](removeEntity(_0x25c09f,null))[_0x05d6('0xad')](handleError(_0x25c09f,null));};exports[_0x05d6('0xb6')]=function(_0x1fb108,_0x9e5a52){return db[_0x05d6('0x37')][_0x05d6('0xb6')]()[_0x05d6('0x29')](respondWithResult(_0x9e5a52,null))['catch'](handleError(_0x9e5a52,null));};exports['addMessage']=function(_0x1a5379,_0x324889,_0x25b672){return db['OpenchannelMessage']['find']({'where':{'id':_0x1a5379[_0x05d6('0xaf')]['id']}})[_0x05d6('0x29')](handleEntityNotFound(_0x324889,null))[_0x05d6('0x29')](function(_0x34a902){if(_0x34a902){return _0x34a902[_0x05d6('0xb7')](_0x1a5379[_0x05d6('0xb4')][_0x05d6('0xb8')],_[_0x05d6('0xb9')](_0x1a5379['body'],['ids','id'])||{});}})[_0x05d6('0x29')](respondWithResult(_0x324889,null))[_0x05d6('0xad')](handleError(_0x324889,null));};exports['getMessages']=function(_0x385644,_0x5e8443,_0x418dc4){var _0x3dc858={'raw':![],'where':{}};var _0x1798f9={};var _0x3082d3={'count':0x0,'rows':[]};return db[_0x05d6('0x37')][_0x05d6('0xba')]({'where':{'id':_0x385644['params']['id']}})[_0x05d6('0x29')](handleEntityNotFound(_0x5e8443,null))[_0x05d6('0x29')](function(_0x2ef51f){if(_0x2ef51f){_0x1798f9['model']=_[_0x05d6('0x5b')](db[_0x05d6('0x30')]['rawAttributes']);_0x1798f9[_0x05d6('0x3a')]=_[_0x05d6('0x5b')](_0x385644[_0x05d6('0x3a')]);_0x1798f9[_0x05d6('0x3b')]=_['intersection'](_0x1798f9['model'],_0x1798f9[_0x05d6('0x3a')]);_0x3dc858[_0x05d6('0x3d')]=_[_0x05d6('0x3c')](_0x1798f9[_0x05d6('0x39')],qs[_0x05d6('0x3e')](_0x385644[_0x05d6('0x3a')][_0x05d6('0x3e')]));_0x3dc858['attributes']=_0x3dc858[_0x05d6('0x3d')][_0x05d6('0x3f')]?_0x3dc858[_0x05d6('0x3d')]:_0x1798f9[_0x05d6('0x39')];if(!_0x385644[_0x05d6('0x3a')][_0x05d6('0x40')](_0x05d6('0x41'))){_0x3dc858[_0x05d6('0x21')]=qs[_0x05d6('0x21')](_0x385644['query'][_0x05d6('0x21')]);_0x3dc858[_0x05d6('0x20')]=qs[_0x05d6('0x20')](_0x385644['query'][_0x05d6('0x20')]);}_0x3dc858[_0x05d6('0x42')]=qs[_0x05d6('0x43')](_0x385644[_0x05d6('0x3a')][_0x05d6('0x43')]);_0x3dc858[_0x05d6('0x44')]=qs[_0x05d6('0x3b')](_['pick'](_0x385644[_0x05d6('0x3a')],_0x1798f9[_0x05d6('0x3b')]));_0x3dc858['where'][_0x05d6('0xaa')]=_0x2ef51f['id'];if(_0x385644[_0x05d6('0x3a')]['filter']){_0x3dc858[_0x05d6('0x44')]=_[_0x05d6('0x9b')](_0x3dc858[_0x05d6('0x44')],{'$or':_[_0x05d6('0x73')](_0x3dc858[_0x05d6('0x3d')],function(_0xae39a6){var _0x36d777={};_0x36d777[_0xae39a6]={'$like':'%'+_0x385644[_0x05d6('0x3a')][_0x05d6('0x7e')]+'%'};return _0x36d777;})});}if(_0x385644[_0x05d6('0x3a')][_0x05d6('0x7a')]){var _0x194ef5=_0x385644[_0x05d6('0x3a')][_0x05d6('0x7a')][_0x05d6('0x81')](',');var _0x268dcf={};_0x268dcf[_0x194ef5[0x0]]={'$gte':moment(_0x194ef5[0x1])[_0x05d6('0x60')](_0x05d6('0xbb'))};_0x3dc858[_0x05d6('0x44')]=_[_0x05d6('0x9b')](_0x3dc858[_0x05d6('0x44')],_0x268dcf);}_0x3dc858=_['merge']({},_0x3dc858,_0x385644[_0x05d6('0xb2')]);return db[_0x05d6('0x30')][_0x05d6('0x31')]({'where':_0x3dc858[_0x05d6('0x44')]})['then'](function(_0x1629dd){_0x3082d3['count']=_0x1629dd;if(_0x385644[_0x05d6('0x3a')][_0x05d6('0xb0')]){_0x3dc858[_0x05d6('0xb1')]=[{'all':!![]}];}return db[_0x05d6('0x30')][_0x05d6('0xbc')](_0x3dc858);})[_0x05d6('0x29')](function(_0x1536e0){_0x3082d3[_0x05d6('0xac')]=_0x1536e0;return _0x3082d3;});}})[_0x05d6('0x29')](respondWithFilteredResult(_0x5e8443,_0x3dc858))[_0x05d6('0xad')](handleError(_0x5e8443,null));};exports[_0x05d6('0xbd')]=function(_0x14efec,_0x4fa3e2,_0x446e76){return db['OpenchannelInteraction'][_0x05d6('0xb5')]({'where':{'id':_0x14efec[_0x05d6('0xaf')]['id']}})['then'](handleEntityNotFound(_0x4fa3e2,null))[_0x05d6('0x29')](function(_0x68d96d){if(_0x68d96d){return _0x68d96d['setTags'](_0x14efec[_0x05d6('0xb4')][_0x05d6('0xb8')],_[_0x05d6('0xb9')](_0x14efec[_0x05d6('0xb4')],['ids','id'])||{})[_0x05d6('0xbe')](function(){return db[_0x05d6('0xbf')][_0x05d6('0xbc')]({'attributes':['id',_0x05d6('0x2c'),_0x05d6('0x48')],'where':{'id':_0x14efec[_0x05d6('0xb4')][_0x05d6('0xb8')]}});})[_0x05d6('0x29')](function(_0x27c828){socket['emit'](_0x05d6('0xc0'),{'id':Number(_0x14efec[_0x05d6('0xaf')]['id']),'tags':_0x27c828||[]});return{'id':Number(_0x14efec['params']['id']),'tags':_0x27c828||[]};});}})[_0x05d6('0x29')](respondWithResult(_0x4fa3e2,null))[_0x05d6('0xad')](handleError(_0x4fa3e2,null));};exports[_0x05d6('0xc1')]=function(_0x3bc285,_0x3c2f35,_0x2e53bf){return db[_0x05d6('0x37')][_0x05d6('0xb5')]({'where':{'id':_0x3bc285[_0x05d6('0xaf')]['id']}})[_0x05d6('0x29')](handleEntityNotFound(_0x3c2f35,null))[_0x05d6('0x29')](function(_0x5d30f9){if(_0x5d30f9){return _0x5d30f9[_0x05d6('0xc1')](_0x3bc285[_0x05d6('0x3a')][_0x05d6('0xb8')]);}})[_0x05d6('0x29')](respondWithStatusCode(_0x3c2f35,null))[_0x05d6('0xad')](handleError(_0x3c2f35,null));};exports[_0x05d6('0xc2')]=function(_0x45554d,_0x12d335){var _0x25a3ac=moment()[_0x05d6('0xc3')]()[_0x05d6('0x8e')]();var _0x21ff6b=path[_0x05d6('0x82')](config[_0x05d6('0xc4')],_0x05d6('0xc5'),_0x05d6('0xc6'),'tmp');var _0xb52c88=path['join'](config[_0x05d6('0xc4')],_0x05d6('0xc5'),_0x05d6('0xc6'),_0x05d6('0xc7'));var _0x55c813=path[_0x05d6('0x82')](_0x21ff6b,_0x25a3ac);var _0x1ba9aa=util[_0x05d6('0x60')](_0x05d6('0xc8'),_0x45554d[_0x05d6('0xaf')]['id'],_0x25a3ac);var _0x544155=path['join'](_0x21ff6b,_0x1ba9aa);var _0x345753=![];return db[_0x05d6('0x37')][_0x05d6('0xb5')]({'where':{'id':_0x45554d[_0x05d6('0xaf')]['id']},'include':[{'model':db['OpenchannelMessage'],'as':_0x05d6('0xc9'),'attributes':['id',_0x05d6('0xb4'),_0x05d6('0x79'),_0x05d6('0xca'),_0x05d6('0xcb')],'include':[{'model':db['User'],'as':'User','attributes':['id',_0x05d6('0xcc')],'raw':!![]},{'model':db[_0x05d6('0xcd')],'as':_0x05d6('0xce'),'attributes':['id','firstName',_0x05d6('0xcf')],'raw':!![]},{'model':db[_0x05d6('0xd0')],'as':_0x05d6('0xd0'),'raw':!![]}]},{'model':db[_0x05d6('0xd1')],'as':_0x05d6('0xd2'),'attributes':['id',_0x05d6('0x2c')]},{'model':db[_0x05d6('0xd3')],'as':_0x05d6('0xd4'),'attributes':['id','fullname']}]})['then'](handleEntityNotFound(_0x12d335,null))[_0x05d6('0x29')](function(_0x46dd7d){if(_0x46dd7d){var _0x1dc946=_0x46dd7d['get']({'plain':!![]});_0x345753=!![];var _0x4442d6={'format':'A4','border':_0x05d6('0xd5'),'header':{'height':'40px','contents':{'first':_0x05d6('0xd6')}},'footer':{'height':'30px','contents':{'default':util['format'](_0x05d6('0xd7'),util['format']('%s\x20#%d',_0x05d6('0xd8'),_0x1dc946['id']),moment()[_0x05d6('0x60')](_0x05d6('0xd9'))['toString']())}}};fs[_0x05d6('0xda')](_0x55c813);var _0x29e7fc={'channel':'Openchannel','account':_0x1dc946['Account'][_0x05d6('0x2c')],'agent':_0x1dc946[_0x05d6('0xd4')]?_0x1dc946[_0x05d6('0xd4')][_0x05d6('0xcc')]:'N.A.','createdAt':moment(_0x1dc946[_0x05d6('0x79')])[_0x05d6('0x60')](_0x05d6('0xbb'))['toString'](),'closedAt':_0x1dc946[_0x05d6('0x2e')]?moment(_0x1dc946[_0x05d6('0xdb')])[_0x05d6('0x60')](_0x05d6('0xbb'))[_0x05d6('0x8e')]():'','disposition':_0x1dc946['disposition'],'visibility':_0x1dc946[_0x05d6('0xdc')]?'Public':'Private','messages':_(_0x1dc946[_0x05d6('0xc9')])['filter']({'secret':![]})['map'](function(_0x1c5dcc){if(_0x1c5dcc[_0x05d6('0xd0')]){var _0x2d17c7=path[_0x05d6('0x82')](_0xb52c88,_0x1c5dcc['Attachment'][_0x05d6('0xdd')]);if(fs[_0x05d6('0xde')](_0x2d17c7)){fs[_0x05d6('0xdf')](_0x2d17c7)[_0x05d6('0xe0')](fs[_0x05d6('0xe1')](path[_0x05d6('0x82')](_0x55c813,_0x1c5dcc[_0x05d6('0xd0')][_0x05d6('0xdd')])));}}return{'date':moment(_0x1c5dcc[_0x05d6('0x79')])[_0x05d6('0x60')]('YYYY-MM-DD\x20HH:mm:ss')[_0x05d6('0x8e')](),'sender':_0x1c5dcc[_0x05d6('0xca')]===_0x05d6('0xe2')?_0x1c5dcc['User']?_0x1c5dcc[_0x05d6('0xd3')][_0x05d6('0xcc')]:_0x05d6('0xe3'):_0x1c5dcc[_0x05d6('0xce')][_0x05d6('0xe4')]+(_0x1c5dcc[_0x05d6('0xce')][_0x05d6('0xcf')]?'\x20'+_0x1c5dcc[_0x05d6('0xce')][_0x05d6('0xcf')]:''),'body':_0x1c5dcc[_0x05d6('0xd0')]?_0x1c5dcc[_0x05d6('0xd0')][_0x05d6('0xdd')]:_0x1c5dcc[_0x05d6('0xb4')],'direction':_0x1c5dcc[_0x05d6('0xca')]===_0x05d6('0xe2')?'A':'C','secret':_0x1c5dcc[_0x05d6('0xcb')],'attachment':_0x1c5dcc[_0x05d6('0xd0')]};})[_0x05d6('0x5c')]()};return ejs[_0x05d6('0xe5')](path['join'](config[_0x05d6('0xc4')],_0x05d6('0xc5'),_0x05d6('0xe6'),'downloadInteraction.html'),{'interaction':_0x29e7fc})[_0x05d6('0x29')](function(_0x52bdc6){return new BPromise(function(_0x3a55b8,_0x500827){pdf[_0x05d6('0xb3')](_0x52bdc6,_0x4442d6)[_0x05d6('0xe7')](path['join'](_0x55c813,_0x05d6('0xe8')+_0x1dc946['id']+'-'+_0x25a3ac+_0x05d6('0xe9')),function(_0x48e153,_0x352195){if(_0x48e153)return _0x500827(_0x48e153);_0x3a55b8(_0x352195);});});});}})['then'](function(){if(_0x345753){return new BPromise(function(_0x531364,_0x190441){zipdir(_0x55c813,{'saveTo':_0x544155},function(_0x53ab6f,_0x220ea4){if(_0x53ab6f)return _0x190441(_0x53ab6f);return _0x531364(_0x220ea4);});})[_0x05d6('0x29')](function(){return new BPromise(function(_0x4feb91,_0x4b9dd2){rimraf(_0x55c813,function(_0x2c0278){if(_0x2c0278)_0x4b9dd2(_0x2c0278);return _0x4feb91();});});})[_0x05d6('0x29')](function(){return _0x12d335[_0x05d6('0xc2')](_0x544155,_0x1ba9aa,function(_0x497e27){if(_0x497e27){console[_0x05d6('0xea')](_0x05d6('0xeb'),_0x497e27);}else{fs[_0x05d6('0xec')](_0x544155);}});});}else{return _0x12d335[_0x05d6('0x1d')](0xc8);}})['catch'](handleError(_0x12d335,null));};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.events.js b/server/api/openchannelInteraction/openchannelInteraction.events.js
index 6e0ffb9..7804bf3 100644
--- a/server/api/openchannelInteraction/openchannelInteraction.events.js
+++ b/server/api/openchannelInteraction/openchannelInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8a62=['hasOwnProperty','hook','events','../../mysqldb','OpenchannelMessage','setMaxListeners','save','remove','then','map','findAll','setDataValue','unreadMessages','length','emit','catch'];(function(_0x2c7e85,_0x182164){var _0x2d591f=function(_0x5e361){while(--_0x5e361){_0x2c7e85['push'](_0x2c7e85['shift']());}};_0x2d591f(++_0x182164);}(_0x8a62,0x102));var _0x28a6=function(_0x5ee116,_0x2a7b2b){_0x5ee116=_0x5ee116-0x0;var _0x114891=_0x8a62[_0x5ee116];return _0x114891;};'use strict';var EventEmitter=require(_0x28a6('0x0'));var OpenchannelInteraction=require(_0x28a6('0x1'))['db']['OpenchannelInteraction'];var OpenchannelMessage=require(_0x28a6('0x1'))['db'][_0x28a6('0x2')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x28a6('0x3')](0x0);var events={'afterCreate':_0x28a6('0x4'),'afterUpdate':'update','afterDestroy':_0x28a6('0x5')};function emitEvent(_0x145169){return function(_0x2f0ef8,_0x809b1b,_0x24c3c5){_0x2f0ef8['getUsers']({'attributes':['id'],'raw':!![]})[_0x28a6('0x6')](function(_0x482037){_0x2f0ef8['setDataValue']('Users',_0x482037[_0x28a6('0x7')](function(_0x392df7){return{'id':_0x392df7['id']};}));return OpenchannelMessage[_0x28a6('0x8')]({'where':{'OpenchannelInteractionId':_0x2f0ef8['id'],'direction':'in','read':![]},'raw':!![]});})[_0x28a6('0x6')](function(_0x33d5fa){_0x2f0ef8[_0x28a6('0x9')](_0x28a6('0xa'),_0x33d5fa[_0x28a6('0xb')]);OpenchannelInteractionEvents[_0x28a6('0xc')](_0x145169+':'+_0x2f0ef8['id'],_0x2f0ef8);OpenchannelInteractionEvents[_0x28a6('0xc')](_0x145169,_0x2f0ef8);_0x24c3c5(null);})[_0x28a6('0xd')](_0x24c3c5(null));};}for(var e in events){if(events[_0x28a6('0xe')](e)){var event=events[e];OpenchannelInteraction[_0x28a6('0xf')](e,emitEvent(event));}}module['exports']=OpenchannelInteractionEvents;
\ No newline at end of file
+var _0x6a67=['../../mysqldb','OpenchannelMessage','setMaxListeners','save','update','remove','getUsers','setDataValue','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','OpenchannelInteraction'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0x6a67,0x1d9));var _0x76a6=function(_0x514835,_0x95fcdf){_0x514835=_0x514835-0x0;var _0x44c151=_0x6a67[_0x514835];return _0x44c151;};'use strict';var EventEmitter=require(_0x76a6('0x0'));var OpenchannelInteraction=require('../../mysqldb')['db'][_0x76a6('0x1')];var OpenchannelMessage=require(_0x76a6('0x2'))['db'][_0x76a6('0x3')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x76a6('0x4')](0x0);var events={'afterCreate':_0x76a6('0x5'),'afterUpdate':_0x76a6('0x6'),'afterDestroy':_0x76a6('0x7')};function emitEvent(_0x2e7530){return function(_0x53e223,_0x5ae0c0,_0x1267ab){_0x53e223[_0x76a6('0x8')]({'attributes':['id'],'raw':!![]})['then'](function(_0x5307a5){_0x53e223[_0x76a6('0x9')]('Users',_0x5307a5[_0x76a6('0xa')](function(_0xe3237c){return{'id':_0xe3237c['id']};}));return OpenchannelMessage[_0x76a6('0xb')]({'where':{'OpenchannelInteractionId':_0x53e223['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x5e64b1){_0x53e223[_0x76a6('0x9')](_0x76a6('0xc'),_0x5e64b1[_0x76a6('0xd')]);OpenchannelInteractionEvents['emit'](_0x2e7530+':'+_0x53e223['id'],_0x53e223);OpenchannelInteractionEvents[_0x76a6('0xe')](_0x2e7530,_0x53e223);_0x1267ab(null);})[_0x76a6('0xf')](_0x1267ab(null));};}for(var e in events){if(events[_0x76a6('0x10')](e)){var event=events[e];OpenchannelInteraction[_0x76a6('0x11')](e,emitEvent(event));}}module[_0x76a6('0x12')]=OpenchannelInteractionEvents;
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.model.js b/server/api/openchannelInteraction/openchannelInteraction.model.js
index 1564091..f309f65 100644
--- a/server/api/openchannelInteraction/openchannelInteraction.model.js
+++ b/server/api/openchannelInteraction/openchannelInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x28e3=['exports','openchannel_interactions','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes'];(function(_0x4ccd63,_0x16efa0){var _0x19e206=function(_0x30f418){while(--_0x30f418){_0x4ccd63['push'](_0x4ccd63['shift']());}};_0x19e206(++_0x16efa0);}(_0x28e3,0x106));var _0x328e=function(_0x4bfac3,_0x58324d){_0x4bfac3=_0x4bfac3-0x0;var _0x15f0f2=_0x28e3[_0x4bfac3];return _0x15f0f2;};'use strict';var _=require(_0x328e('0x0'));var util=require(_0x328e('0x1'));var logger=require(_0x328e('0x2'))(_0x328e('0x3'));var moment=require('moment');var BPromise=require(_0x328e('0x4'));var rp=require(_0x328e('0x5'));var fs=require('fs');var path=require(_0x328e('0x6'));var rimraf=require(_0x328e('0x7'));var config=require(_0x328e('0x8'));var attributes=require(_0x328e('0x9'));module[_0x328e('0xa')]=function(_0x439182,_0x5e5bcf){return _0x439182['define']('OpenchannelInteraction',attributes,{'tableName':_0x328e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3696b6,_0x3467ee,_0x6a5414){if(_0x3696b6[_0x328e('0xc')]('closed')){_0x3696b6[_0x328e('0xd')]=moment()[_0x328e('0xe')](_0x328e('0xf'));}_0x6a5414(null,_0x3696b6);}}});};
\ No newline at end of file
+var _0xd67b=['api','moment','bluebird','path','../../config/environment','exports','define','OpenchannelInteraction','openchannel_interactions','changed','closed','closedAt','format','util'];(function(_0x523adf,_0x3e1620){var _0x283870=function(_0xa0e816){while(--_0xa0e816){_0x523adf['push'](_0x523adf['shift']());}};_0x283870(++_0x3e1620);}(_0xd67b,0x133));var _0xbd67=function(_0x4a9e35,_0x4ca9a2){_0x4a9e35=_0x4a9e35-0x0;var _0x2c7bae=_0xd67b[_0x4a9e35];return _0x2c7bae;};'use strict';var _=require('lodash');var util=require(_0xbd67('0x0'));var logger=require('../../config/logger')(_0xbd67('0x1'));var moment=require(_0xbd67('0x2'));var BPromise=require(_0xbd67('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbd67('0x4'));var rimraf=require('rimraf');var config=require(_0xbd67('0x5'));var attributes=require('./openchannelInteraction.attributes');module[_0xbd67('0x6')]=function(_0xa5c384,_0x2ad142){return _0xa5c384[_0xbd67('0x7')](_0xbd67('0x8'),attributes,{'tableName':_0xbd67('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2d4af6,_0xfad775,_0x1da7f1){if(_0x2d4af6[_0xbd67('0xa')](_0xbd67('0xb'))){_0x2d4af6[_0xbd67('0xc')]=moment()[_0xbd67('0xd')]('YYYY-MM-DD\x20HH:mm:ss');}_0x1da7f1(null,_0x2d4af6);}}});};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.rpc.js b/server/api/openchannelInteraction/openchannelInteraction.rpc.js
index 5de0f88..a7b9a2f 100644
--- a/server/api/openchannelInteraction/openchannelInteraction.rpc.js
+++ b/server/api/openchannelInteraction/openchannelInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1883=['http','redis','defaults','socket.io-emitter','register','then','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','OpenchannelInteraction,\x20%s,\x20%s','info','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','raw','options','where','attributes','limit','AddTagsToOpenchannelInteraction','find','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x5519a9,_0x1c5147){var _0x32f2cc=function(_0x52ed58){while(--_0x52ed58){_0x5519a9['push'](_0x5519a9['shift']());}};_0x32f2cc(++_0x1c5147);}(_0x1883,0xab));var _0x3188=function(_0xa8ad09,_0x1fc501){_0xa8ad09=_0xa8ad09-0x0;var _0x4cc7d8=_0x1883[_0xa8ad09];return _0x4cc7d8;};'use strict';var _=require(_0x3188('0x0'));var util=require(_0x3188('0x1'));var moment=require(_0x3188('0x2'));var BPromise=require(_0x3188('0x3'));var rs=require(_0x3188('0x4'));var fs=require('fs');var Redis=require(_0x3188('0x5'));var db=require(_0x3188('0x6'))['db'];var utils=require(_0x3188('0x7'));var logger=require(_0x3188('0x8'))(_0x3188('0x9'));var config=require(_0x3188('0xa'));var jayson=require(_0x3188('0xb'));var client=jayson[_0x3188('0xc')][_0x3188('0xd')]({'port':0x232a});config[_0x3188('0xe')]=_[_0x3188('0xf')](config[_0x3188('0xe')],{'host':'localhost','port':0x18eb});var socket=require(_0x3188('0x10'))(new Redis(config[_0x3188('0xe')]));require('./openchannelInteraction.socket')[_0x3188('0x11')](socket);function respondWithRpcPromise(_0x5b7f47,_0xc6040,_0x34fc82){return new BPromise(function(_0x209e31,_0x43b69){return client['request'](_0x5b7f47,_0x34fc82)[_0x3188('0x12')](function(_0x2cdcb2){logger['info']('OpenchannelInteraction,\x20%s,\x20%s',_0xc6040,_0x3188('0x13'));logger[_0x3188('0x14')](_0x3188('0x15'),_0xc6040,_0x3188('0x13'),JSON[_0x3188('0x16')](_0x2cdcb2));if(_0x2cdcb2[_0x3188('0x17')]){if(_0x2cdcb2['error'][_0x3188('0x18')]===0x1f4){logger['error']('OpenchannelInteraction,\x20%s,\x20%s',_0xc6040,_0x2cdcb2[_0x3188('0x17')]['message']);return _0x43b69(_0x2cdcb2['error'][_0x3188('0x19')]);}logger[_0x3188('0x17')](_0x3188('0x1a'),_0xc6040,_0x2cdcb2[_0x3188('0x17')][_0x3188('0x19')]);return _0x209e31(_0x2cdcb2[_0x3188('0x17')]['message']);}else{logger[_0x3188('0x1b')](_0x3188('0x1a'),_0xc6040,_0x3188('0x13'));_0x209e31(_0x2cdcb2[_0x3188('0x1c')][_0x3188('0x19')]);}})[_0x3188('0x1d')](function(_0xac7f48){logger[_0x3188('0x17')]('OpenchannelInteraction,\x20%s,\x20%s',_0xc6040,_0xac7f48);_0x43b69(_0xac7f48);});});}exports[_0x3188('0x1e')]=function(_0x36050a){var _0x5512f4=this;return new Promise(function(_0x518b2f,_0x5d8d62){return db[_0x3188('0x1f')][_0x3188('0x20')](_0x36050a[_0x3188('0x21')],{'raw':_0x36050a['options']?_0x36050a['options'][_0x3188('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x36050a[_0x3188('0x23')]?_0x36050a[_0x3188('0x23')][_0x3188('0x24')]||null:null,'attributes':_0x36050a[_0x3188('0x23')]?_0x36050a['options'][_0x3188('0x25')]||null:null,'limit':_0x36050a[_0x3188('0x23')]?_0x36050a['options'][_0x3188('0x26')]||null:null})['then'](function(_0x5c69be){logger[_0x3188('0x1b')](_0x3188('0x1e'),_0x36050a);logger[_0x3188('0x14')](_0x3188('0x1e'),_0x36050a,JSON[_0x3188('0x16')](_0x5c69be));_0x518b2f(_0x5c69be);})[_0x3188('0x1d')](function(_0xe57f73){logger[_0x3188('0x17')]('UpdateOpenchannelInteraction',_0xe57f73[_0x3188('0x19')],_0x36050a);_0x5d8d62(_0x5512f4[_0x3188('0x17')](0x1f4,_0xe57f73['message']));});});};exports[_0x3188('0x27')]=function(_0x14299b){return new Promise(function(_0x43399d,_0x44db9a){return db[_0x3188('0x1f')][_0x3188('0x28')]({'where':_0x14299b[_0x3188('0x23')]?_0x14299b[_0x3188('0x23')]['where']||null:null})[_0x3188('0x12')](function(_0x5d97d0){if(_0x5d97d0){return _0x5d97d0[_0x3188('0x29')](_0x14299b['body'][_0x3188('0x2a')],_[_0x3188('0x2b')](_0x14299b[_0x3188('0x21')],[_0x3188('0x2a'),'id'])||{});}})[_0x3188('0x2c')](function(_0x263892){logger[_0x3188('0x1b')](_0x3188('0x2d'),_0x14299b);logger[_0x3188('0x14')](_0x3188('0x2d'),_0x14299b,JSON[_0x3188('0x16')](_0x263892));_0x43399d(_0x263892);})[_0x3188('0x1d')](function(_0x2c1d68){logger[_0x3188('0x17')](_0x3188('0x2d'),_0x2c1d68[_0x3188('0x19')],_0x14299b);_0x44db9a(_this[_0x3188('0x17')](0x1f4,_0x2c1d68[_0x3188('0x19')]));});});};
\ No newline at end of file
+var _0x9c5a=['OpenchannelInteraction','update','options','raw','where','AddTagsToOpenchannelInteraction','find','addTags','body','ids','AddTags','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateOpenchannelInteraction'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x9c5a,0x1c3));var _0xa9c5=function(_0x160ccb,_0x1da4cb){_0x160ccb=_0x160ccb-0x0;var _0x1f3d2a=_0x9c5a[_0x160ccb];return _0x1f3d2a;};'use strict';var _=require(_0xa9c5('0x0'));var util=require(_0xa9c5('0x1'));var moment=require('moment');var BPromise=require(_0xa9c5('0x2'));var rs=require(_0xa9c5('0x3'));var fs=require('fs');var Redis=require(_0xa9c5('0x4'));var db=require(_0xa9c5('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa9c5('0x6'))(_0xa9c5('0x7'));var config=require('../../config/environment');var jayson=require(_0xa9c5('0x8'));var client=jayson['client'][_0xa9c5('0x9')]({'port':0x232a});config[_0xa9c5('0xa')]=_['defaults'](config['redis'],{'host':_0xa9c5('0xb'),'port':0x18eb});var socket=require(_0xa9c5('0xc'))(new Redis(config['redis']));require(_0xa9c5('0xd'))[_0xa9c5('0xe')](socket);function respondWithRpcPromise(_0x51c14c,_0x2e4f45,_0x40a79d){return new BPromise(function(_0x4a19c0,_0x4c55e9){return client[_0xa9c5('0xf')](_0x51c14c,_0x40a79d)[_0xa9c5('0x10')](function(_0x45f8d8){logger[_0xa9c5('0x11')](_0xa9c5('0x12'),_0x2e4f45,_0xa9c5('0x13'));logger[_0xa9c5('0x14')](_0xa9c5('0x15'),_0x2e4f45,_0xa9c5('0x13'),JSON[_0xa9c5('0x16')](_0x45f8d8));if(_0x45f8d8['error']){if(_0x45f8d8[_0xa9c5('0x17')][_0xa9c5('0x18')]===0x1f4){logger[_0xa9c5('0x17')](_0xa9c5('0x12'),_0x2e4f45,_0x45f8d8[_0xa9c5('0x17')][_0xa9c5('0x19')]);return _0x4c55e9(_0x45f8d8[_0xa9c5('0x17')][_0xa9c5('0x19')]);}logger[_0xa9c5('0x17')](_0xa9c5('0x12'),_0x2e4f45,_0x45f8d8['error'][_0xa9c5('0x19')]);return _0x4a19c0(_0x45f8d8[_0xa9c5('0x17')][_0xa9c5('0x19')]);}else{logger['info'](_0xa9c5('0x12'),_0x2e4f45,_0xa9c5('0x13'));_0x4a19c0(_0x45f8d8[_0xa9c5('0x1a')][_0xa9c5('0x19')]);}})[_0xa9c5('0x1b')](function(_0x349f27){logger[_0xa9c5('0x17')](_0xa9c5('0x12'),_0x2e4f45,_0x349f27);_0x4c55e9(_0x349f27);});});}exports[_0xa9c5('0x1c')]=function(_0x36c486){var _0x113c8f=this;return new Promise(function(_0x2d95f8,_0x54f8b9){return db[_0xa9c5('0x1d')][_0xa9c5('0x1e')](_0x36c486['body'],{'raw':_0x36c486['options']?_0x36c486[_0xa9c5('0x1f')][_0xa9c5('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x36c486[_0xa9c5('0x1f')]?_0x36c486[_0xa9c5('0x1f')][_0xa9c5('0x21')]||null:null,'attributes':_0x36c486[_0xa9c5('0x1f')]?_0x36c486['options']['attributes']||null:null,'limit':_0x36c486[_0xa9c5('0x1f')]?_0x36c486[_0xa9c5('0x1f')]['limit']||null:null})[_0xa9c5('0x10')](function(_0x424b4c){logger[_0xa9c5('0x11')](_0xa9c5('0x1c'),_0x36c486);logger[_0xa9c5('0x14')](_0xa9c5('0x1c'),_0x36c486,JSON[_0xa9c5('0x16')](_0x424b4c));_0x2d95f8(_0x424b4c);})['catch'](function(_0x4e8a7f){logger[_0xa9c5('0x17')]('UpdateOpenchannelInteraction',_0x4e8a7f[_0xa9c5('0x19')],_0x36c486);_0x54f8b9(_0x113c8f[_0xa9c5('0x17')](0x1f4,_0x4e8a7f['message']));});});};exports[_0xa9c5('0x22')]=function(_0x320dc0){return new Promise(function(_0x5f468b,_0x413edf){return db[_0xa9c5('0x1d')][_0xa9c5('0x23')]({'where':_0x320dc0[_0xa9c5('0x1f')]?_0x320dc0[_0xa9c5('0x1f')]['where']||null:null})[_0xa9c5('0x10')](function(_0x4cee90){if(_0x4cee90){return _0x4cee90[_0xa9c5('0x24')](_0x320dc0[_0xa9c5('0x25')][_0xa9c5('0x26')],_['omit'](_0x320dc0[_0xa9c5('0x25')],[_0xa9c5('0x26'),'id'])||{});}})['spread'](function(_0x3f11a9){logger[_0xa9c5('0x11')](_0xa9c5('0x27'),_0x320dc0);logger[_0xa9c5('0x14')](_0xa9c5('0x27'),_0x320dc0,JSON[_0xa9c5('0x16')](_0x3f11a9));_0x5f468b(_0x3f11a9);})[_0xa9c5('0x1b')](function(_0x4b9104){logger[_0xa9c5('0x17')](_0xa9c5('0x27'),_0x4b9104[_0xa9c5('0x19')],_0x320dc0);_0x413edf(_this[_0xa9c5('0x17')](0x1f4,_0x4b9104[_0xa9c5('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.socket.js b/server/api/openchannelInteraction/openchannelInteraction.socket.js
index 8ed9351..a2e4e19 100644
--- a/server/api/openchannelInteraction/openchannelInteraction.socket.js
+++ b/server/api/openchannelInteraction/openchannelInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8fff=['save','remove','emit','removeListener','register','openchannelInteraction:','./openchannelInteraction.events'];(function(_0x17f5ea,_0x16262e){var _0x38cb30=function(_0x4dff19){while(--_0x4dff19){_0x17f5ea['push'](_0x17f5ea['shift']());}};_0x38cb30(++_0x16262e);}(_0x8fff,0xae));var _0xf8ff=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8fff[_0x3dd15e];return _0x231fd0;};'use strict';var OpenchannelInteractionEvents=require(_0xf8ff('0x0'));var events=[_0xf8ff('0x1'),_0xf8ff('0x2'),'update'];function createListener(_0x53ad4b,_0x21c856){return function(_0x46bef5){_0x21c856[_0xf8ff('0x3')](_0x53ad4b,_0x46bef5);};}function removeListener(_0x956a0f,_0x11f5df){return function(){OpenchannelInteractionEvents[_0xf8ff('0x4')](_0x956a0f,_0x11f5df);};}exports[_0xf8ff('0x5')]=function(_0x39151f){for(var _0x2ccf6f=0x0,_0x346bb5=events['length'];_0x2ccf6f<_0x346bb5;_0x2ccf6f++){var _0x30993f=events[_0x2ccf6f];var _0x322291=createListener(_0xf8ff('0x6')+_0x30993f,_0x39151f);OpenchannelInteractionEvents['on'](_0x30993f,_0x322291);}};
\ No newline at end of file
+var _0xc589=['remove','emit','removeListener','register','length','save'];(function(_0x118733,_0x2bd820){var _0x4777af=function(_0x52886a){while(--_0x52886a){_0x118733['push'](_0x118733['shift']());}};_0x4777af(++_0x2bd820);}(_0xc589,0x83));var _0x9c58=function(_0x169abe,_0x52e6e9){_0x169abe=_0x169abe-0x0;var _0x4506c3=_0xc589[_0x169abe];return _0x4506c3;};'use strict';var OpenchannelInteractionEvents=require('./openchannelInteraction.events');var events=[_0x9c58('0x0'),_0x9c58('0x1'),'update'];function createListener(_0x2af677,_0x1f3edc){return function(_0x1b88e1){_0x1f3edc[_0x9c58('0x2')](_0x2af677,_0x1b88e1);};}function removeListener(_0x2fed35,_0x3186d9){return function(){OpenchannelInteractionEvents[_0x9c58('0x3')](_0x2fed35,_0x3186d9);};}exports[_0x9c58('0x4')]=function(_0x59d499){for(var _0x3b9350=0x0,_0x1daee8=events[_0x9c58('0x5')];_0x3b9350<_0x1daee8;_0x3b9350++){var _0x5f3316=events[_0x3b9350];var _0x6a3dbf=createListener('openchannelInteraction:'+_0x5f3316,_0x59d499);OpenchannelInteractionEvents['on'](_0x5f3316,_0x6a3dbf);}};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/index.js b/server/api/openchannelMessage/index.js
index 776e142..e34196c 100644
--- a/server/api/openchannelMessage/index.js
+++ b/server/api/openchannelMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc358=['../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelMessage.controller','get','isAuthenticated','index','/describe','describe','show','post','tracked','openchannelmessage:create','create','put','/:id','update','/:id/accept','accept','delete','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x1e2e47,_0x3ecf1e){var _0x209d53=function(_0xa2f13b){while(--_0xa2f13b){_0x1e2e47['push'](_0x1e2e47['shift']());}};_0x209d53(++_0x3ecf1e);}(_0xc358,0x108));var _0x8c35=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc358[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x8c35('0x0'));var util=require(_0x8c35('0x1'));var path=require(_0x8c35('0x2'));var timeout=require(_0x8c35('0x3'));var express=require(_0x8c35('0x4'));var router=express[_0x8c35('0x5')]();var auth=require(_0x8c35('0x6'));var interaction=require(_0x8c35('0x7'));var config=require(_0x8c35('0x8'));var controller=require(_0x8c35('0x9'));router[_0x8c35('0xa')]('/',auth[_0x8c35('0xb')](),controller[_0x8c35('0xc')]);router['get'](_0x8c35('0xd'),auth['isAuthenticated'](),controller[_0x8c35('0xe')]);router['get']('/:id',auth[_0x8c35('0xb')](),controller[_0x8c35('0xf')]);router[_0x8c35('0x10')]('/',auth[_0x8c35('0xb')](),interaction[_0x8c35('0x11')]('openchannel',_0x8c35('0x12')),controller[_0x8c35('0x13')]);router[_0x8c35('0x14')](_0x8c35('0x15'),auth[_0x8c35('0xb')](),controller[_0x8c35('0x16')]);router[_0x8c35('0x14')](_0x8c35('0x17'),auth[_0x8c35('0xb')](),controller[_0x8c35('0x18')]);router[_0x8c35('0x14')]('/:id/reject',auth['isAuthenticated'](),controller['reject']);router[_0x8c35('0x19')](_0x8c35('0x15'),auth[_0x8c35('0xb')](),controller['destroy']);module[_0x8c35('0x1a')]=router;
\ No newline at end of file
+var _0xd944=['destroy','util','path','express','Router','../../components/interaction/service','index','get','/describe','isAuthenticated','/:id','show','post','tracked','openchannel','create','put','delete'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd944,0x145));var _0x4d94=function(_0x170522,_0x273df0){_0x170522=_0x170522-0x0;var _0x2a0a7b=_0xd944[_0x170522];return _0x2a0a7b;};'use strict';var multer=require('multer');var util=require(_0x4d94('0x0'));var path=require(_0x4d94('0x1'));var timeout=require('connect-timeout');var express=require(_0x4d94('0x2'));var router=express[_0x4d94('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x4d94('0x4'));var config=require('../../config/environment');var controller=require('./openchannelMessage.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x4d94('0x5')]);router[_0x4d94('0x6')](_0x4d94('0x7'),auth[_0x4d94('0x8')](),controller['describe']);router['get'](_0x4d94('0x9'),auth[_0x4d94('0x8')](),controller[_0x4d94('0xa')]);router[_0x4d94('0xb')]('/',auth['isAuthenticated'](),interaction[_0x4d94('0xc')](_0x4d94('0xd'),'openchannelmessage:create'),controller[_0x4d94('0xe')]);router[_0x4d94('0xf')](_0x4d94('0x9'),auth['isAuthenticated'](),controller['update']);router['put']('/:id/accept',auth['isAuthenticated'](),controller['accept']);router[_0x4d94('0xf')]('/:id/reject',auth[_0x4d94('0x8')](),controller['reject']);router[_0x4d94('0x10')](_0x4d94('0x9'),auth['isAuthenticated'](),controller[_0x4d94('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.attributes.js b/server/api/openchannelMessage/openchannelMessage.attributes.js
index 66dbbfe..5043f92 100644
--- a/server/api/openchannelMessage/openchannelMessage.attributes.js
+++ b/server/api/openchannelMessage/openchannelMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfb32=['out','DATE','sequelize','exports','TEXT','BOOLEAN'];(function(_0x1aeb07,_0x5d66b4){var _0x432908=function(_0xa786cb){while(--_0xa786cb){_0x1aeb07['push'](_0x1aeb07['shift']());}};_0x432908(++_0x5d66b4);}(_0xfb32,0xfe));var _0x2fb3=function(_0x349148,_0x31eabb){_0x349148=_0x349148-0x0;var _0x2f2b0f=_0xfb32[_0x349148];return _0x2f2b0f;};'use strict';var Sequelize=require(_0x2fb3('0x0'));module[_0x2fb3('0x1')]={'body':{'type':Sequelize[_0x2fb3('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x2fb3('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0x2fb3('0x3')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x2fb3('0x4')),'defaultValue':_0x2fb3('0x4'),'allowNull':![]},'readAt':{'type':Sequelize[_0x2fb3('0x5')]}};
\ No newline at end of file
+var _0x2e86=['medium','BOOLEAN','ENUM','out','sequelize','exports'];(function(_0x1b5693,_0x2d04a7){var _0x3b629c=function(_0x45e651){while(--_0x45e651){_0x1b5693['push'](_0x1b5693['shift']());}};_0x3b629c(++_0x2d04a7);}(_0x2e86,0x1c0));var _0x62e8=function(_0x51ca86,_0x5d0ba1){_0x51ca86=_0x51ca86-0x0;var _0x2816aa=_0x2e86[_0x51ca86];return _0x2816aa;};'use strict';var Sequelize=require(_0x62e8('0x0'));module[_0x62e8('0x1')]={'body':{'type':Sequelize['TEXT'](_0x62e8('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x62e8('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0x62e8('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x62e8('0x4')]('in',_0x62e8('0x5')),'defaultValue':_0x62e8('0x5'),'allowNull':![]},'readAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.controller.js b/server/api/openchannelMessage/openchannelMessage.controller.js
index 5910dc9..cb8a4f0 100644
--- a/server/api/openchannelMessage/openchannelMessage.controller.js
+++ b/server/api/openchannelMessage/openchannelMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0c50=['read','readAt','format','UserId','user','CmContact','Contact','OpenchannelInteraction','isNil','read1stAt','interaction','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','manual','interface','SIP/%s','channel','event','EventManager','acceptmessage','get','RejectMessage','rejectMessage','rejectmessage','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','socket.io-emitter','./openchannelMessage.socket','register','http','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','count','offset','set','Content-Range','apply','reject','save','destroy','stack','name','send','index','OpenchannelMessage','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','limit','sort','where','filter','map','type','key','VIRTUAL','field','merge','include','findAll','params','includeAll','options','create','update','body','find','describe','openchannel-interactions','accept','openchannel'];(function(_0x33393e,_0x2b280a){var _0x30edeb=function(_0x388681){while(--_0x388681){_0x33393e['push'](_0x33393e['shift']());}};_0x30edeb(++_0x2b280a);}(_0x0c50,0x182));var _0x00c5=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x0c50[_0x297fd3];return _0x2af381;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x00c5('0x0'));var rimraf=require(_0x00c5('0x1'));var zipdir=require(_0x00c5('0x2'));var jsonpatch=require(_0x00c5('0x3'));var rp=require(_0x00c5('0x4'));var moment=require('moment');var BPromise=require(_0x00c5('0x5'));var Mustache=require('mustache');var util=require(_0x00c5('0x6'));var path=require(_0x00c5('0x7'));var sox=require(_0x00c5('0x8'));var csv=require('to-csv');var ejs=require(_0x00c5('0x9'));var fs=require('fs');var _=require(_0x00c5('0xa'));var squel=require(_0x00c5('0xb'));var crypto=require(_0x00c5('0xc'));var jsforce=require(_0x00c5('0xd'));var deskjs=require(_0x00c5('0xe'));var toCsv=require(_0x00c5('0xf'));var querystring=require(_0x00c5('0x10'));var Papa=require(_0x00c5('0x11'));var Redis=require('ioredis');var authService=require(_0x00c5('0x12'));var qs=require(_0x00c5('0x13'));var hardwareService=require(_0x00c5('0x14'));var logger=require(_0x00c5('0x15'))('api');var utils=require(_0x00c5('0x16'));var config=require(_0x00c5('0x17'));var db=require(_0x00c5('0x18'))['db'];config[_0x00c5('0x19')]=_['defaults'](config[_0x00c5('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0x00c5('0x1a'))(new Redis(config[_0x00c5('0x19')]));require(_0x00c5('0x1b'))[_0x00c5('0x1c')](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0x00c5('0x1d')]({'port':0x232c});var client9002=jayson[_0x00c5('0x1e')][_0x00c5('0x1d')]({'port':0x232a});function checkPasswordPattern(_0x4ca3ee,_0x4285d8,_0x18e399){if(_0x18e399){var _0x41d53b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x41d53b[_0x00c5('0x1f')](_0x4285d8)){return _0x4ca3ee;}else{throw new Error(_0x00c5('0x20'));}}else{return _0x4ca3ee;}}function respondWithRpcPromise(_0x205910,_0x1e33f7,_0x9f1763,_0x3836d4){return new BPromise(function(_0x4ed6ea,_0x3bd459){var _0x402b77=_0x3836d4||client;return _0x402b77[_0x00c5('0x21')](_0x205910,_0x9f1763)[_0x00c5('0x22')](function(_0x41f704){logger[_0x00c5('0x23')](_0x00c5('0x24'),_0x1e33f7,_0x00c5('0x25'));logger[_0x00c5('0x26')](_0x00c5('0x27'),_0x1e33f7,_0x00c5('0x25'),JSON[_0x00c5('0x28')](_0x41f704));if(_0x41f704[_0x00c5('0x29')]){if(_0x41f704['error'][_0x00c5('0x2a')]===0x1f4){logger[_0x00c5('0x29')]('OpenchannelMessage,\x20%s,\x20%s',_0x1e33f7,_0x41f704[_0x00c5('0x29')][_0x00c5('0x2b')]);return _0x3bd459(_0x41f704[_0x00c5('0x29')][_0x00c5('0x2b')]);}logger[_0x00c5('0x29')](_0x00c5('0x24'),_0x1e33f7,_0x41f704[_0x00c5('0x29')]['message']);return _0x4ed6ea(_0x41f704[_0x00c5('0x29')][_0x00c5('0x2b')]);}else{logger['info']('OpenchannelMessage,\x20%s,\x20%s',_0x1e33f7,_0x00c5('0x25'));_0x4ed6ea(_0x41f704[_0x00c5('0x2c')][_0x00c5('0x2b')]);}})[_0x00c5('0x2d')](function(_0x40015e){logger[_0x00c5('0x29')](_0x00c5('0x24'),_0x1e33f7,_0x40015e);_0x3bd459(_0x40015e);});});}function respondWithStatusCode(_0x12742e,_0xa47b70){_0xa47b70=_0xa47b70||0xcc;return function(_0x109aa0){if(_0x109aa0){return _0x12742e['sendStatus'](_0xa47b70);}return _0x12742e[_0x00c5('0x2e')](_0xa47b70)[_0x00c5('0x2f')]();};}function respondWithResult(_0x3c861d,_0x1c1e65){_0x1c1e65=_0x1c1e65||0xc8;return function(_0x394df3){if(_0x394df3){return _0x3c861d[_0x00c5('0x2e')](_0x1c1e65)[_0x00c5('0x30')](_0x394df3);}};}function respondWithFilteredResult(_0x5af7d7,_0x48d9e2){return function(_0x45b68f){if(_0x45b68f){var _0x5386b9=_0x45b68f[_0x00c5('0x31')],_0x19af47=_0x48d9e2[_0x00c5('0x32')],_0x24d69a=_0x48d9e2[_0x00c5('0x32')]+_0x48d9e2['limit'],_0x1489f3;if(_0x24d69a>=_0x5386b9){_0x24d69a=_0x5386b9;_0x1489f3=0xc8;}else{_0x1489f3=0xce;}_0x5af7d7[_0x00c5('0x2e')](_0x1489f3);return _0x5af7d7[_0x00c5('0x33')](_0x00c5('0x34'),_0x19af47+'-'+_0x24d69a+'/'+_0x5386b9)[_0x00c5('0x30')](_0x45b68f);}return null;};}function patchUpdates(_0x1a460a){return function(_0x845f02){try{jsonpatch[_0x00c5('0x35')](_0x845f02,_0x1a460a,!![]);}catch(_0x5cca06){return BPromise[_0x00c5('0x36')](_0x5cca06);}return _0x845f02[_0x00c5('0x37')]();};}function saveUpdates(_0x1f08c5,_0x515709){return function(_0x345204){if(_0x345204){return _0x345204['update'](_0x1f08c5)[_0x00c5('0x22')](function(_0xb1c8cf){return _0xb1c8cf;});}return null;};}function removeEntity(_0x16997d,_0x3a0a2e){return function(_0x35cd6b){if(_0x35cd6b){return _0x35cd6b[_0x00c5('0x38')]()[_0x00c5('0x22')](function(){_0x16997d[_0x00c5('0x2e')](0xcc)[_0x00c5('0x2f')]();});}};}function handleEntityNotFound(_0x2787b4,_0x1639fe){return function(_0x3da4c5){if(!_0x3da4c5){_0x2787b4['sendStatus'](0x194);}return _0x3da4c5;};}function handleError(_0x1b61ad,_0x5cf255){_0x5cf255=_0x5cf255||0x1f4;return function(_0x54a943){logger[_0x00c5('0x29')](_0x54a943[_0x00c5('0x39')]);if(_0x54a943[_0x00c5('0x3a')]){delete _0x54a943[_0x00c5('0x3a')];}_0x1b61ad[_0x00c5('0x2e')](_0x5cf255)[_0x00c5('0x3b')](_0x54a943);};}exports[_0x00c5('0x3c')]=function(_0x4b6c3d,_0x3e3594){var _0x572b78={},_0x2d67b3={},_0x573d49={'count':0x0,'rows':[]};var _0x2923b7=db[_0x00c5('0x3d')][_0x00c5('0x3e')];_0x2d67b3[_0x00c5('0x3f')]=_[_0x00c5('0x40')](_0x2923b7);_0x2d67b3[_0x00c5('0x41')]=_['keys'](_0x4b6c3d['query']);_0x2d67b3[_0x00c5('0x42')]=_[_0x00c5('0x43')](_0x2d67b3[_0x00c5('0x3f')],_0x2d67b3[_0x00c5('0x41')]);_0x572b78['attributes']=_[_0x00c5('0x43')](_0x2d67b3[_0x00c5('0x3f')],qs[_0x00c5('0x44')](_0x4b6c3d['query']['fields']));_0x572b78[_0x00c5('0x45')]=_0x572b78[_0x00c5('0x45')][_0x00c5('0x46')]?_0x572b78[_0x00c5('0x45')]:_0x2d67b3[_0x00c5('0x3f')];if(!_0x4b6c3d[_0x00c5('0x41')]['hasOwnProperty']('nolimit')){_0x572b78[_0x00c5('0x47')]=qs[_0x00c5('0x47')](_0x4b6c3d[_0x00c5('0x41')][_0x00c5('0x47')]);_0x572b78['offset']=qs['offset'](_0x4b6c3d[_0x00c5('0x41')][_0x00c5('0x32')]);}_0x572b78['order']=qs['sort'](_0x4b6c3d[_0x00c5('0x41')][_0x00c5('0x48')]);_0x572b78[_0x00c5('0x49')]=qs[_0x00c5('0x42')](_['pick'](_0x4b6c3d[_0x00c5('0x41')],_0x2d67b3[_0x00c5('0x42')]));if(_0x4b6c3d[_0x00c5('0x41')][_0x00c5('0x4a')]){_0x572b78['where']=_['merge'](_0x572b78[_0x00c5('0x49')],{'$or':_[_0x00c5('0x4b')](_0x2923b7,function(_0x410646){if(_0x410646[_0x00c5('0x4c')][_0x00c5('0x4d')]!==_0x00c5('0x4e')){var _0x3136a8={};_0x3136a8[_0x410646[_0x00c5('0x4f')]]={'$like':'%'+_0x4b6c3d['query'][_0x00c5('0x4a')]+'%'};return _0x3136a8;}})});}_0x572b78=_[_0x00c5('0x50')]({},_0x572b78,_0x4b6c3d['options']);var _0x58a101={'where':_0x572b78['where']};return db[_0x00c5('0x3d')][_0x00c5('0x31')](_0x58a101)[_0x00c5('0x22')](function(_0x4d66a2){_0x573d49[_0x00c5('0x31')]=_0x4d66a2;if(_0x4b6c3d[_0x00c5('0x41')]['includeAll']){_0x572b78[_0x00c5('0x51')]=[{'all':!![]}];}return db[_0x00c5('0x3d')][_0x00c5('0x52')](_0x572b78);})[_0x00c5('0x22')](function(_0xfb5bf0){_0x573d49['rows']=_0xfb5bf0;return _0x573d49;})[_0x00c5('0x22')](respondWithFilteredResult(_0x3e3594,_0x572b78))[_0x00c5('0x2d')](handleError(_0x3e3594,null));};exports['show']=function(_0xd4fe51,_0x2a798b){var _0x383612={'raw':!![],'where':{'id':_0xd4fe51[_0x00c5('0x53')]['id']}},_0x236427={};_0x236427[_0x00c5('0x3f')]=_[_0x00c5('0x40')](db[_0x00c5('0x3d')][_0x00c5('0x3e')]);_0x236427['query']=_['keys'](_0xd4fe51[_0x00c5('0x41')]);_0x236427[_0x00c5('0x42')]=_[_0x00c5('0x43')](_0x236427[_0x00c5('0x3f')],_0x236427[_0x00c5('0x41')]);_0x383612[_0x00c5('0x45')]=_['intersection'](_0x236427[_0x00c5('0x3f')],qs['fields'](_0xd4fe51[_0x00c5('0x41')]['fields']));_0x383612['attributes']=_0x383612[_0x00c5('0x45')]['length']?_0x383612['attributes']:_0x236427[_0x00c5('0x3f')];if(_0xd4fe51['query'][_0x00c5('0x54')]){_0x383612[_0x00c5('0x51')]=[{'all':!![]}];}_0x383612=_['merge']({},_0x383612,_0xd4fe51[_0x00c5('0x55')]);return db['OpenchannelMessage']['find'](_0x383612)['then'](handleEntityNotFound(_0x2a798b,null))[_0x00c5('0x22')](respondWithResult(_0x2a798b,null))['catch'](handleError(_0x2a798b,null));};exports[_0x00c5('0x56')]=function(_0x17bc21,_0x457c5a){return db['OpenchannelMessage'][_0x00c5('0x56')](_0x17bc21['body'],{})[_0x00c5('0x22')](respondWithResult(_0x457c5a,0xc9))[_0x00c5('0x2d')](handleError(_0x457c5a,null));};exports[_0x00c5('0x57')]=function(_0x1e0fae,_0x207057){if(_0x1e0fae[_0x00c5('0x58')]['id']){delete _0x1e0fae['body']['id'];}return db[_0x00c5('0x3d')][_0x00c5('0x59')]({'where':{'id':_0x1e0fae[_0x00c5('0x53')]['id']}})[_0x00c5('0x22')](handleEntityNotFound(_0x207057,null))[_0x00c5('0x22')](saveUpdates(_0x1e0fae[_0x00c5('0x58')],null))[_0x00c5('0x22')](respondWithResult(_0x207057,null))['catch'](handleError(_0x207057,null));};exports['destroy']=function(_0x11f893,_0x126c0c){return db[_0x00c5('0x3d')]['find']({'where':{'id':_0x11f893[_0x00c5('0x53')]['id']}})['then'](handleEntityNotFound(_0x126c0c,null))[_0x00c5('0x22')](removeEntity(_0x126c0c,null))['catch'](handleError(_0x126c0c,null));};exports[_0x00c5('0x5a')]=function(_0x11fcd3,_0x4dc091){return db['OpenchannelMessage'][_0x00c5('0x5a')]()['then'](respondWithResult(_0x4dc091,null))[_0x00c5('0x2d')](handleError(_0x4dc091,null));};var interaction_log=require(_0x00c5('0x15'))(_0x00c5('0x5b'));exports[_0x00c5('0x5c')]=function(_0x593944,_0x1d2efb,_0x2623fb){var _0x3b1a24={'channel':_0x00c5('0x5d')};if(_0x593944['body']['id']){delete _0x593944[_0x00c5('0x58')]['id'];}_0x593944[_0x00c5('0x58')][_0x00c5('0x5e')]=!![];_0x593944[_0x00c5('0x58')][_0x00c5('0x5f')]=moment()[_0x00c5('0x60')]('YYYY-MM-DD\x20HH:mm:ss');_0x593944[_0x00c5('0x58')][_0x00c5('0x61')]=_0x593944[_0x00c5('0x58')][_0x00c5('0x61')]||_0x593944[_0x00c5('0x62')]['id'];return db[_0x00c5('0x3d')][_0x00c5('0x59')]({'where':{'id':_0x593944[_0x00c5('0x53')]['id'],'UserId':null},'include':[{'model':db[_0x00c5('0x63')],'as':_0x00c5('0x64')}]})[_0x00c5('0x22')](handleEntityNotFound(_0x1d2efb,null))[_0x00c5('0x22')](saveUpdates(_0x593944[_0x00c5('0x58')],null))['then'](function(_0x3c8387){if(_0x3c8387){_0x3b1a24[_0x00c5('0x2b')]=_0x3c8387['get']({'plain':!![]});return db[_0x00c5('0x65')][_0x00c5('0x59')]({'where':{'id':_0x3c8387['OpenchannelInteractionId']}});}return null;})[_0x00c5('0x22')](handleEntityNotFound(_0x1d2efb,null))['then'](function(_0x19e9e4){if(_0x19e9e4){return _0x19e9e4[_0x00c5('0x57')]({'UserId':_0x593944[_0x00c5('0x58')][_0x00c5('0x61')],'read1stAt':_[_0x00c5('0x66')](_0x19e9e4[_0x00c5('0x67')])?moment()[_0x00c5('0x60')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})['then'](function(_0x148a28){if(_0x148a28){_0x3b1a24[_0x00c5('0x68')]=_0x148a28['get']({'plain':!![]});interaction_log[_0x00c5('0x23')](_0x00c5('0x69'),_0x593944[_0x00c5('0x62')]['id'],_0x593944[_0x00c5('0x62')][_0x00c5('0x3a')],_0x593944[_0x00c5('0x62')][_0x00c5('0x6a')],_0x3b1a24[_0x00c5('0x68')]['id'],_0x593944[_0x00c5('0x58')]?JSON[_0x00c5('0x28')](_0x593944[_0x00c5('0x58')]):_0x00c5('0x6b'));return respondWithRpcPromise(_0x00c5('0x6c'),'acceptMessage',_0x3b1a24);}return null;})[_0x00c5('0x22')](function(_0x306ef9){if(_0x306ef9){if(_0x593944['body'][_0x00c5('0x6d')]){_0x3b1a24[_0x00c5('0x2b')][_0x00c5('0x6e')]=util['format'](_0x00c5('0x6f'),_0x593944[_0x00c5('0x62')]['name']);_0x3b1a24[_0x00c5('0x2b')][_0x00c5('0x70')]=_0x3b1a24[_0x00c5('0x70')];_0x3b1a24[_0x00c5('0x2b')][_0x00c5('0x71')]=_0x00c5('0x5c');return respondWithRpcPromise(_0x00c5('0x72'),_0x00c5('0x72'),{'event':_0x00c5('0x73'),'message':_0x3b1a24[_0x00c5('0x2b')]},client9002)[_0x00c5('0x22')](function(){return _0x3b1a24;});}return _0x3b1a24;}return null;})[_0x00c5('0x22')](respondWithResult(_0x1d2efb,null))[_0x00c5('0x2d')](handleError(_0x1d2efb,null));};var interaction_log=require(_0x00c5('0x15'))(_0x00c5('0x5b'));exports[_0x00c5('0x36')]=function(_0x7ad22d,_0x432eb9,_0x3c353a){var _0x5f051e={'agent':{},'channel':'openchannel'};if(_0x7ad22d[_0x00c5('0x58')]['id']){delete _0x7ad22d[_0x00c5('0x58')]['id'];}_0x7ad22d['body'][_0x00c5('0x61')]=_0x7ad22d[_0x00c5('0x58')][_0x00c5('0x61')]||_0x7ad22d[_0x00c5('0x62')]['id'];_0x5f051e['agent']['id']=_0x7ad22d[_0x00c5('0x58')][_0x00c5('0x61')];return db[_0x00c5('0x3d')][_0x00c5('0x59')]({'where':{'id':_0x7ad22d[_0x00c5('0x53')]['id'],'UserId':null}})[_0x00c5('0x22')](handleEntityNotFound(_0x432eb9,null))[_0x00c5('0x22')](function(_0x4ca5ae){if(_0x4ca5ae){_0x5f051e[_0x00c5('0x2b')]=_0x4ca5ae[_0x00c5('0x74')]({'plain':!![]});return db[_0x00c5('0x65')][_0x00c5('0x59')]({'where':{'id':_0x4ca5ae['OpenchannelInteractionId']}});}return null;})[_0x00c5('0x22')](handleEntityNotFound(_0x432eb9,null))[_0x00c5('0x22')](function(_0x14355e){if(_0x14355e){_0x5f051e[_0x00c5('0x68')]=_0x14355e[_0x00c5('0x74')]({'plain':!![]});interaction_log[_0x00c5('0x23')]('[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x7ad22d[_0x00c5('0x62')]['id'],_0x7ad22d[_0x00c5('0x62')]['name'],_0x7ad22d[_0x00c5('0x62')][_0x00c5('0x6a')],_0x5f051e[_0x00c5('0x68')]['id'],_0x7ad22d[_0x00c5('0x58')]?JSON[_0x00c5('0x28')](_0x7ad22d[_0x00c5('0x58')]):_0x00c5('0x6b'));return respondWithRpcPromise(_0x00c5('0x75'),_0x00c5('0x76'),_0x5f051e);}return null;})[_0x00c5('0x22')](function(_0x491015){if(_0x491015){_0x491015[_0x00c5('0x2b')][_0x00c5('0x6e')]=util[_0x00c5('0x60')](_0x00c5('0x6f'),_0x7ad22d[_0x00c5('0x62')][_0x00c5('0x3a')]);_0x491015['message'][_0x00c5('0x70')]=_0x5f051e[_0x00c5('0x70')];_0x491015[_0x00c5('0x2b')][_0x00c5('0x71')]=_0x00c5('0x36');respondWithRpcPromise('EventManager',_0x00c5('0x72'),{'event':_0x00c5('0x77'),'message':_0x491015[_0x00c5('0x2b')]},client9002);return _0x5f051e;}return null;})[_0x00c5('0x22')](respondWithResult(_0x432eb9,null))[_0x00c5('0x2d')](handleError(_0x432eb9,null));};
\ No newline at end of file
+var _0xc852=['null','AcceptMessage','manual','event','EventManager','acceptmessage','reject','openchannel','interaction','RejectMessage','interface','SIP/%s','channel','rejectmessage','rimraf','fast-json-patch','request-promise','moment','mustache','path','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','OpenchannelMessage,\x20%s,\x20%s','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','catch','sendStatus','status','end','json','count','offset','set','Content-Range','save','update','destroy','stack','name','send','keys','query','filters','model','intersection','attributes','nolimit','limit','order','sort','where','pick','filter','merge','type','key','VIRTUAL','field','options','OpenchannelMessage','includeAll','include','findAll','rows','show','params','rawAttributes','fields','length','find','create','body','describe','openchannel-interactions','accept','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','get','OpenchannelInteraction','OpenchannelInteractionId','read1stAt','user','role','stringify'];(function(_0x1069d8,_0x7c831b){var _0x1f74a8=function(_0x3dfa3b){while(--_0x3dfa3b){_0x1069d8['push'](_0x1069d8['shift']());}};_0x1f74a8(++_0x7c831b);}(_0xc852,0x1da));var _0x2c85=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc852[_0x20a584];return _0x4b41a8;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x2c85('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2c85('0x1'));var rp=require(_0x2c85('0x2'));var moment=require(_0x2c85('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x2c85('0x4'));var util=require('util');var path=require(_0x2c85('0x5'));var sox=require('sox');var csv=require(_0x2c85('0x6'));var ejs=require(_0x2c85('0x7'));var fs=require('fs');var _=require('lodash');var squel=require(_0x2c85('0x8'));var crypto=require(_0x2c85('0x9'));var jsforce=require(_0x2c85('0xa'));var deskjs=require(_0x2c85('0xb'));var toCsv=require(_0x2c85('0x6'));var querystring=require('querystring');var Papa=require(_0x2c85('0xc'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x2c85('0xd'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2c85('0xe'))(_0x2c85('0xf'));var utils=require(_0x2c85('0x10'));var config=require('../../config/environment');var db=require(_0x2c85('0x11'))['db'];config['redis']=_[_0x2c85('0x12')](config[_0x2c85('0x13')],{'host':_0x2c85('0x14'),'port':0x18eb});var socket=require(_0x2c85('0x15'))(new Redis(config[_0x2c85('0x13')]));require(_0x2c85('0x16'))[_0x2c85('0x17')](socket);var jayson=require(_0x2c85('0x18'));var client=jayson[_0x2c85('0x19')]['http']({'port':0x232c});var client9002=jayson['client'][_0x2c85('0x1a')]({'port':0x232a});function checkPasswordPattern(_0xbe7492,_0x539119,_0x461bc4){if(_0x461bc4){var _0x4d9193=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4d9193[_0x2c85('0x1b')](_0x539119)){return _0xbe7492;}else{throw new Error(_0x2c85('0x1c'));}}else{return _0xbe7492;}}function respondWithRpcPromise(_0x293ecb,_0xd1ee9d,_0x190b4c,_0x5ef13c){return new BPromise(function(_0xa6cfd2,_0x38c572){var _0x14fcd9=_0x5ef13c||client;return _0x14fcd9['request'](_0x293ecb,_0x190b4c)[_0x2c85('0x1d')](function(_0x1f1d14){logger['info'](_0x2c85('0x1e'),_0xd1ee9d,'request\x20sent');logger[_0x2c85('0x1f')](_0x2c85('0x20'),_0xd1ee9d,_0x2c85('0x21'),JSON['stringify'](_0x1f1d14));if(_0x1f1d14[_0x2c85('0x22')]){if(_0x1f1d14['error'][_0x2c85('0x23')]===0x1f4){logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0xd1ee9d,_0x1f1d14[_0x2c85('0x22')][_0x2c85('0x24')]);return _0x38c572(_0x1f1d14[_0x2c85('0x22')][_0x2c85('0x24')]);}logger[_0x2c85('0x22')]('OpenchannelMessage,\x20%s,\x20%s',_0xd1ee9d,_0x1f1d14[_0x2c85('0x22')][_0x2c85('0x24')]);return _0xa6cfd2(_0x1f1d14[_0x2c85('0x22')]['message']);}else{logger[_0x2c85('0x25')](_0x2c85('0x1e'),_0xd1ee9d,_0x2c85('0x21'));_0xa6cfd2(_0x1f1d14[_0x2c85('0x26')][_0x2c85('0x24')]);}})[_0x2c85('0x27')](function(_0x359526){logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0xd1ee9d,_0x359526);_0x38c572(_0x359526);});});}function respondWithStatusCode(_0x470836,_0x4ab4bc){_0x4ab4bc=_0x4ab4bc||0xcc;return function(_0x4c6ee8){if(_0x4c6ee8){return _0x470836[_0x2c85('0x28')](_0x4ab4bc);}return _0x470836[_0x2c85('0x29')](_0x4ab4bc)[_0x2c85('0x2a')]();};}function respondWithResult(_0x53b72f,_0x38cbd4){_0x38cbd4=_0x38cbd4||0xc8;return function(_0xb0fbe4){if(_0xb0fbe4){return _0x53b72f[_0x2c85('0x29')](_0x38cbd4)[_0x2c85('0x2b')](_0xb0fbe4);}};}function respondWithFilteredResult(_0x350aa3,_0x15d8be){return function(_0xb21bde){if(_0xb21bde){var _0x38c655=_0xb21bde[_0x2c85('0x2c')],_0x2b0393=_0x15d8be[_0x2c85('0x2d')],_0x485eaa=_0x15d8be['offset']+_0x15d8be['limit'],_0x57cd51;if(_0x485eaa>=_0x38c655){_0x485eaa=_0x38c655;_0x57cd51=0xc8;}else{_0x57cd51=0xce;}_0x350aa3['status'](_0x57cd51);return _0x350aa3[_0x2c85('0x2e')](_0x2c85('0x2f'),_0x2b0393+'-'+_0x485eaa+'/'+_0x38c655)[_0x2c85('0x2b')](_0xb21bde);}return null;};}function patchUpdates(_0x1435f2){return function(_0x35b295){try{jsonpatch['apply'](_0x35b295,_0x1435f2,!![]);}catch(_0x33e008){return BPromise['reject'](_0x33e008);}return _0x35b295[_0x2c85('0x30')]();};}function saveUpdates(_0x2f93c4,_0x2f99e5){return function(_0x4836a4){if(_0x4836a4){return _0x4836a4[_0x2c85('0x31')](_0x2f93c4)[_0x2c85('0x1d')](function(_0x5bd70d){return _0x5bd70d;});}return null;};}function removeEntity(_0x1ced22,_0x1a6efb){return function(_0xd62038){if(_0xd62038){return _0xd62038[_0x2c85('0x32')]()[_0x2c85('0x1d')](function(){_0x1ced22['status'](0xcc)[_0x2c85('0x2a')]();});}};}function handleEntityNotFound(_0x2122f5,_0x26801a){return function(_0x375a09){if(!_0x375a09){_0x2122f5[_0x2c85('0x28')](0x194);}return _0x375a09;};}function handleError(_0x463635,_0x2f6740){_0x2f6740=_0x2f6740||0x1f4;return function(_0x5bbdbd){logger[_0x2c85('0x22')](_0x5bbdbd[_0x2c85('0x33')]);if(_0x5bbdbd['name']){delete _0x5bbdbd[_0x2c85('0x34')];}_0x463635['status'](_0x2f6740)[_0x2c85('0x35')](_0x5bbdbd);};}exports['index']=function(_0x370d04,_0x33dd00){var _0x44272c={},_0x255c91={},_0x2b0a4c={'count':0x0,'rows':[]};var _0x14561a=db['OpenchannelMessage']['rawAttributes'];_0x255c91['model']=_[_0x2c85('0x36')](_0x14561a);_0x255c91[_0x2c85('0x37')]=_['keys'](_0x370d04[_0x2c85('0x37')]);_0x255c91[_0x2c85('0x38')]=_['intersection'](_0x255c91[_0x2c85('0x39')],_0x255c91['query']);_0x44272c['attributes']=_[_0x2c85('0x3a')](_0x255c91[_0x2c85('0x39')],qs['fields'](_0x370d04[_0x2c85('0x37')]['fields']));_0x44272c[_0x2c85('0x3b')]=_0x44272c[_0x2c85('0x3b')]['length']?_0x44272c[_0x2c85('0x3b')]:_0x255c91[_0x2c85('0x39')];if(!_0x370d04[_0x2c85('0x37')]['hasOwnProperty'](_0x2c85('0x3c'))){_0x44272c[_0x2c85('0x3d')]=qs[_0x2c85('0x3d')](_0x370d04[_0x2c85('0x37')][_0x2c85('0x3d')]);_0x44272c[_0x2c85('0x2d')]=qs[_0x2c85('0x2d')](_0x370d04['query'][_0x2c85('0x2d')]);}_0x44272c[_0x2c85('0x3e')]=qs[_0x2c85('0x3f')](_0x370d04[_0x2c85('0x37')][_0x2c85('0x3f')]);_0x44272c[_0x2c85('0x40')]=qs[_0x2c85('0x38')](_[_0x2c85('0x41')](_0x370d04['query'],_0x255c91[_0x2c85('0x38')]));if(_0x370d04[_0x2c85('0x37')][_0x2c85('0x42')]){_0x44272c[_0x2c85('0x40')]=_[_0x2c85('0x43')](_0x44272c['where'],{'$or':_['map'](_0x14561a,function(_0x39ff6f){if(_0x39ff6f[_0x2c85('0x44')][_0x2c85('0x45')]!==_0x2c85('0x46')){var _0x4384d4={};_0x4384d4[_0x39ff6f[_0x2c85('0x47')]]={'$like':'%'+_0x370d04[_0x2c85('0x37')][_0x2c85('0x42')]+'%'};return _0x4384d4;}})});}_0x44272c=_[_0x2c85('0x43')]({},_0x44272c,_0x370d04[_0x2c85('0x48')]);var _0x5650a1={'where':_0x44272c[_0x2c85('0x40')]};return db[_0x2c85('0x49')][_0x2c85('0x2c')](_0x5650a1)[_0x2c85('0x1d')](function(_0xe4c6a4){_0x2b0a4c[_0x2c85('0x2c')]=_0xe4c6a4;if(_0x370d04[_0x2c85('0x37')][_0x2c85('0x4a')]){_0x44272c[_0x2c85('0x4b')]=[{'all':!![]}];}return db[_0x2c85('0x49')][_0x2c85('0x4c')](_0x44272c);})['then'](function(_0x1fcf1f){_0x2b0a4c[_0x2c85('0x4d')]=_0x1fcf1f;return _0x2b0a4c;})[_0x2c85('0x1d')](respondWithFilteredResult(_0x33dd00,_0x44272c))['catch'](handleError(_0x33dd00,null));};exports[_0x2c85('0x4e')]=function(_0x4fd7c1,_0x1e091f){var _0x2708a5={'raw':!![],'where':{'id':_0x4fd7c1[_0x2c85('0x4f')]['id']}},_0x1a8d25={};_0x1a8d25[_0x2c85('0x39')]=_[_0x2c85('0x36')](db['OpenchannelMessage'][_0x2c85('0x50')]);_0x1a8d25[_0x2c85('0x37')]=_[_0x2c85('0x36')](_0x4fd7c1['query']);_0x1a8d25[_0x2c85('0x38')]=_[_0x2c85('0x3a')](_0x1a8d25[_0x2c85('0x39')],_0x1a8d25[_0x2c85('0x37')]);_0x2708a5[_0x2c85('0x3b')]=_[_0x2c85('0x3a')](_0x1a8d25[_0x2c85('0x39')],qs[_0x2c85('0x51')](_0x4fd7c1[_0x2c85('0x37')][_0x2c85('0x51')]));_0x2708a5[_0x2c85('0x3b')]=_0x2708a5['attributes'][_0x2c85('0x52')]?_0x2708a5[_0x2c85('0x3b')]:_0x1a8d25[_0x2c85('0x39')];if(_0x4fd7c1[_0x2c85('0x37')][_0x2c85('0x4a')]){_0x2708a5[_0x2c85('0x4b')]=[{'all':!![]}];}_0x2708a5=_[_0x2c85('0x43')]({},_0x2708a5,_0x4fd7c1[_0x2c85('0x48')]);return db[_0x2c85('0x49')][_0x2c85('0x53')](_0x2708a5)[_0x2c85('0x1d')](handleEntityNotFound(_0x1e091f,null))[_0x2c85('0x1d')](respondWithResult(_0x1e091f,null))[_0x2c85('0x27')](handleError(_0x1e091f,null));};exports[_0x2c85('0x54')]=function(_0x4b676b,_0x29b20e){return db[_0x2c85('0x49')][_0x2c85('0x54')](_0x4b676b[_0x2c85('0x55')],{})['then'](respondWithResult(_0x29b20e,0xc9))['catch'](handleError(_0x29b20e,null));};exports[_0x2c85('0x31')]=function(_0x37a26e,_0x383b81){if(_0x37a26e['body']['id']){delete _0x37a26e[_0x2c85('0x55')]['id'];}return db['OpenchannelMessage']['find']({'where':{'id':_0x37a26e[_0x2c85('0x4f')]['id']}})['then'](handleEntityNotFound(_0x383b81,null))['then'](saveUpdates(_0x37a26e[_0x2c85('0x55')],null))['then'](respondWithResult(_0x383b81,null))[_0x2c85('0x27')](handleError(_0x383b81,null));};exports[_0x2c85('0x32')]=function(_0x26309d,_0x292e29){return db[_0x2c85('0x49')][_0x2c85('0x53')]({'where':{'id':_0x26309d[_0x2c85('0x4f')]['id']}})[_0x2c85('0x1d')](handleEntityNotFound(_0x292e29,null))[_0x2c85('0x1d')](removeEntity(_0x292e29,null))['catch'](handleError(_0x292e29,null));};exports[_0x2c85('0x56')]=function(_0xb419f6,_0xd010fd){return db[_0x2c85('0x49')][_0x2c85('0x56')]()[_0x2c85('0x1d')](respondWithResult(_0xd010fd,null))[_0x2c85('0x27')](handleError(_0xd010fd,null));};var interaction_log=require(_0x2c85('0xe'))(_0x2c85('0x57'));exports[_0x2c85('0x58')]=function(_0x2cc838,_0x5645c6,_0x5d2ff8){var _0x57af99={'channel':'openchannel'};if(_0x2cc838['body']['id']){delete _0x2cc838[_0x2c85('0x55')]['id'];}_0x2cc838['body'][_0x2c85('0x59')]=!![];_0x2cc838[_0x2c85('0x55')][_0x2c85('0x5a')]=moment()[_0x2c85('0x5b')](_0x2c85('0x5c'));_0x2cc838[_0x2c85('0x55')]['UserId']=_0x2cc838[_0x2c85('0x55')][_0x2c85('0x5d')]||_0x2cc838['user']['id'];return db[_0x2c85('0x49')][_0x2c85('0x53')]({'where':{'id':_0x2cc838[_0x2c85('0x4f')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':'Contact'}]})[_0x2c85('0x1d')](handleEntityNotFound(_0x5645c6,null))[_0x2c85('0x1d')](saveUpdates(_0x2cc838[_0x2c85('0x55')],null))[_0x2c85('0x1d')](function(_0xfdba47){if(_0xfdba47){_0x57af99[_0x2c85('0x24')]=_0xfdba47[_0x2c85('0x5e')]({'plain':!![]});return db[_0x2c85('0x5f')]['find']({'where':{'id':_0xfdba47[_0x2c85('0x60')]}});}return null;})[_0x2c85('0x1d')](handleEntityNotFound(_0x5645c6,null))[_0x2c85('0x1d')](function(_0x1ff03c){if(_0x1ff03c){return _0x1ff03c['update']({'UserId':_0x2cc838[_0x2c85('0x55')]['UserId'],'read1stAt':_['isNil'](_0x1ff03c[_0x2c85('0x61')])?moment()[_0x2c85('0x5b')](_0x2c85('0x5c')):undefined});}return null;})[_0x2c85('0x1d')](function(_0x2f3fae){if(_0x2f3fae){_0x57af99['interaction']=_0x2f3fae[_0x2c85('0x5e')]({'plain':!![]});interaction_log[_0x2c85('0x25')]('[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x2cc838[_0x2c85('0x62')]['id'],_0x2cc838[_0x2c85('0x62')][_0x2c85('0x34')],_0x2cc838[_0x2c85('0x62')][_0x2c85('0x63')],_0x57af99['interaction']['id'],_0x2cc838[_0x2c85('0x55')]?JSON[_0x2c85('0x64')](_0x2cc838[_0x2c85('0x55')]):_0x2c85('0x65'));return respondWithRpcPromise(_0x2c85('0x66'),'acceptMessage',_0x57af99);}return null;})[_0x2c85('0x1d')](function(_0x464dba){if(_0x464dba){if(_0x2cc838[_0x2c85('0x55')][_0x2c85('0x67')]){_0x57af99[_0x2c85('0x24')]['interface']=util[_0x2c85('0x5b')]('SIP/%s',_0x2cc838[_0x2c85('0x62')][_0x2c85('0x34')]);_0x57af99[_0x2c85('0x24')]['channel']=_0x57af99['channel'];_0x57af99[_0x2c85('0x24')][_0x2c85('0x68')]=_0x2c85('0x58');return respondWithRpcPromise(_0x2c85('0x69'),_0x2c85('0x69'),{'event':_0x2c85('0x6a'),'message':_0x57af99['message']},client9002)[_0x2c85('0x1d')](function(){return _0x57af99;});}return _0x57af99;}return null;})['then'](respondWithResult(_0x5645c6,null))[_0x2c85('0x27')](handleError(_0x5645c6,null));};var interaction_log=require(_0x2c85('0xe'))(_0x2c85('0x57'));exports[_0x2c85('0x6b')]=function(_0x2bd1e8,_0x422feb,_0x4910b3){var _0x24b693={'agent':{},'channel':_0x2c85('0x6c')};if(_0x2bd1e8[_0x2c85('0x55')]['id']){delete _0x2bd1e8[_0x2c85('0x55')]['id'];}_0x2bd1e8[_0x2c85('0x55')][_0x2c85('0x5d')]=_0x2bd1e8[_0x2c85('0x55')]['UserId']||_0x2bd1e8[_0x2c85('0x62')]['id'];_0x24b693['agent']['id']=_0x2bd1e8[_0x2c85('0x55')][_0x2c85('0x5d')];return db[_0x2c85('0x49')][_0x2c85('0x53')]({'where':{'id':_0x2bd1e8[_0x2c85('0x4f')]['id'],'UserId':null}})[_0x2c85('0x1d')](handleEntityNotFound(_0x422feb,null))[_0x2c85('0x1d')](function(_0x4464a3){if(_0x4464a3){_0x24b693[_0x2c85('0x24')]=_0x4464a3['get']({'plain':!![]});return db[_0x2c85('0x5f')][_0x2c85('0x53')]({'where':{'id':_0x4464a3[_0x2c85('0x60')]}});}return null;})[_0x2c85('0x1d')](handleEntityNotFound(_0x422feb,null))[_0x2c85('0x1d')](function(_0x1a0733){if(_0x1a0733){_0x24b693[_0x2c85('0x6d')]=_0x1a0733[_0x2c85('0x5e')]({'plain':!![]});interaction_log[_0x2c85('0x25')]('[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x2bd1e8['user']['id'],_0x2bd1e8['user'][_0x2c85('0x34')],_0x2bd1e8[_0x2c85('0x62')][_0x2c85('0x63')],_0x24b693['interaction']['id'],_0x2bd1e8[_0x2c85('0x55')]?JSON[_0x2c85('0x64')](_0x2bd1e8[_0x2c85('0x55')]):_0x2c85('0x65'));return respondWithRpcPromise(_0x2c85('0x6e'),'rejectMessage',_0x24b693);}return null;})[_0x2c85('0x1d')](function(_0x26dfca){if(_0x26dfca){_0x26dfca[_0x2c85('0x24')][_0x2c85('0x6f')]=util[_0x2c85('0x5b')](_0x2c85('0x70'),_0x2bd1e8['user']['name']);_0x26dfca[_0x2c85('0x24')]['channel']=_0x24b693[_0x2c85('0x71')];_0x26dfca[_0x2c85('0x24')]['event']=_0x2c85('0x6b');respondWithRpcPromise(_0x2c85('0x69'),'EventManager',{'event':_0x2c85('0x72'),'message':_0x26dfca['message']},client9002);return _0x24b693;}return null;})['then'](respondWithResult(_0x422feb,null))[_0x2c85('0x27')](handleError(_0x422feb,null));};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.events.js b/server/api/openchannelMessage/openchannelMessage.events.js
index 8599f1e..14d6a61 100644
--- a/server/api/openchannelMessage/openchannelMessage.events.js
+++ b/server/api/openchannelMessage/openchannelMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa52f=['OpenchannelMessage','setMaxListeners','save','update','remove','hasOwnProperty','exports','../../mysqldb'];(function(_0x331abf,_0x1bd210){var _0xd98ba3=function(_0x14d542){while(--_0x14d542){_0x331abf['push'](_0x331abf['shift']());}};_0xd98ba3(++_0x1bd210);}(_0xa52f,0xa7));var _0xfa52=function(_0x3b8832,_0x53f718){_0x3b8832=_0x3b8832-0x0;var _0x2b99f0=_0xa52f[_0x3b8832];return _0x2b99f0;};'use strict';var EventEmitter=require('events');var OpenchannelMessage=require(_0xfa52('0x0'))['db'][_0xfa52('0x1')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0xfa52('0x2')](0x0);var events={'afterCreate':_0xfa52('0x3'),'afterUpdate':_0xfa52('0x4'),'afterDestroy':_0xfa52('0x5')};function emitEvent(_0x71fb81){return function(_0x485a8d,_0x43fbc5,_0x132917){OpenchannelMessageEvents['emit'](_0x71fb81+':'+_0x485a8d['id'],_0x485a8d);OpenchannelMessageEvents['emit'](_0x71fb81,_0x485a8d);_0x132917(null);};}for(var e in events){if(events[_0xfa52('0x6')](e)){var event=events[e];OpenchannelMessage['hook'](e,emitEvent(event));}}module[_0xfa52('0x7')]=OpenchannelMessageEvents;
\ No newline at end of file
+var _0xeeb7=['save','remove','emit','hook','exports','events','OpenchannelMessage','setMaxListeners'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xeeb7,0x14d));var _0x7eeb=function(_0x590b61,_0x4c4335){_0x590b61=_0x590b61-0x0;var _0x1a14dc=_0xeeb7[_0x590b61];return _0x1a14dc;};'use strict';var EventEmitter=require(_0x7eeb('0x0'));var OpenchannelMessage=require('../../mysqldb')['db'][_0x7eeb('0x1')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0x7eeb('0x2')](0x0);var events={'afterCreate':_0x7eeb('0x3'),'afterUpdate':'update','afterDestroy':_0x7eeb('0x4')};function emitEvent(_0x5b6a68){return function(_0x376165,_0x383ff8,_0x951c4){OpenchannelMessageEvents[_0x7eeb('0x5')](_0x5b6a68+':'+_0x376165['id'],_0x376165);OpenchannelMessageEvents[_0x7eeb('0x5')](_0x5b6a68,_0x376165);_0x951c4(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelMessage[_0x7eeb('0x6')](e,emitEvent(event));}}module[_0x7eeb('0x7')]=OpenchannelMessageEvents;
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.model.js b/server/api/openchannelMessage/openchannelMessage.model.js
index 52c0ed8..ae1c14e 100644
--- a/server/api/openchannelMessage/openchannelMessage.model.js
+++ b/server/api/openchannelMessage/openchannelMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x530f=['POST','method','body','threadId','update','inspect','finally','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./openchannelMessage.attributes','exports','define','OpenchannelMessage','openchannel_messages','fti_openchannel_messages','FULLTEXT','models','get','direction','toLowerCase','isNil','UserId','OpenchannelInteraction','findOne','then','createdAt','catch','out','secret','OpenchannelAccount','find','OpenchannelAccountId','Interactions','CmContact','Contact','keys','replyUri','info','OpenchannelMessage,\x20%s,\x20%s','afterCreate','format','length','Interaction','omit'];(function(_0x487b0c,_0x14ff74){var _0x1adbdc=function(_0x2e7b9d){while(--_0x2e7b9d){_0x487b0c['push'](_0x487b0c['shift']());}};_0x1adbdc(++_0x14ff74);}(_0x530f,0x1a1));var _0xf530=function(_0x8fc9d1,_0x55be5e){_0x8fc9d1=_0x8fc9d1-0x0;var _0x445c72=_0x530f[_0x8fc9d1];return _0x445c72;};'use strict';var _=require('lodash');var util=require(_0xf530('0x0'));var logger=require(_0xf530('0x1'))(_0xf530('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xf530('0x3'));var fs=require('fs');var path=require(_0xf530('0x4'));var rimraf=require(_0xf530('0x5'));var config=require(_0xf530('0x6'));var attributes=require(_0xf530('0x7'));module[_0xf530('0x8')]=function(_0x4bbe3d,_0x1dd9e0){return _0x4bbe3d[_0xf530('0x9')](_0xf530('0xa'),attributes,{'tableName':_0xf530('0xb'),'paranoid':![],'indexes':[{'name':_0xf530('0xc'),'fields':['body'],'type':_0xf530('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x38a147,_0x5e5332,_0x2730af){var _0x2265ed=_0x4bbe3d[_0xf530('0xe')];var _0x115e52=_0x38a147[_0xf530('0xf')]({'plain':!![]});if(_0x115e52[_0xf530('0x10')]['toLowerCase']()==='in'||_0x115e52[_0xf530('0x10')][_0xf530('0x11')]()==='out'&&!_0x115e52['secret']&&!_[_0xf530('0x12')](_0x115e52[_0xf530('0x13')])){_0x2265ed[_0xf530('0x14')][_0xf530('0x15')]({'where':{'id':_0x115e52['OpenchannelInteractionId']}})[_0xf530('0x16')](function(_0x4bbe98){if(_0x4bbe98){_0x4bbe98['update']({'lastMsgAt':_0x115e52[_0xf530('0x17')],'lastMsgDirection':_0x115e52[_0xf530('0x10')][_0xf530('0x11')]()});}})[_0xf530('0x18')](function(_0x572c5e){console['error'](_0x572c5e);});}if(_0x115e52['direction']===_0xf530('0x19')&&!_0x115e52[_0xf530('0x1a')]){var _0x4c64f1;_0x2265ed['CmContact']['describe']()[_0xf530('0x16')](function(_0xc90710){return _0x2265ed[_0xf530('0x1b')][_0xf530('0x1c')]({'where':{'id':_0x115e52[_0xf530('0x1d')]},'include':[{'model':_0x2265ed[_0xf530('0x14')],'as':_0xf530('0x1e'),'where':{'id':_0x115e52['OpenchannelInteractionId']},'limit':0x1,'include':[{'model':_0x2265ed[_0xf530('0x1f')],'as':_0xf530('0x20'),'attributes':_[_0xf530('0x21')](_0xc90710)}]}]});})[_0xf530('0x16')](function(_0x63e23e){_0x4c64f1=_0x63e23e[_0xf530('0xf')]({'plain':!![]});if(_0x4c64f1&&_0x4c64f1[_0xf530('0x22')]){logger[_0xf530('0x23')](_0xf530('0x24'),_0xf530('0x25'),util[_0xf530('0x26')]('Forwarding\x20message\x20%d\x20to\x20%s',_0x115e52['id'],_0x4c64f1['replyUri']));if(_0x4c64f1[_0xf530('0x1e')]&&_0x4c64f1[_0xf530('0x1e')][_0xf530('0x27')]){_0x115e52[_0xf530('0x28')]=_[_0xf530('0x29')](_0x4c64f1[_0xf530('0x1e')][0x0],_0xf530('0x20'));_0x115e52[_0xf530('0x20')]=_0x4c64f1['Interactions'][0x0]['Contact'];}var _0x5e5332={'method':_0xf530('0x2a'),'uri':encodeURI(_0x4c64f1[_0xf530('0x22')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x5e5332[_0xf530('0x2b')]){case'GET':_0x5e5332['qs']=_0x115e52;break;case _0xf530('0x2a'):_0x5e5332[_0xf530('0x2c')]=_0x115e52;break;}return rp(_0x5e5332)['then'](function(_0x9dad44){logger[_0xf530('0x23')](_0xf530('0x24'),_0xf530('0x25'),util['format']('Message\x20%d\x20forwarded\x20to\x20%s',_0x115e52['id'],_0x4c64f1[_0xf530('0x22')]));if(_0x9dad44['body'][_0xf530('0x2d')]&&_0x9dad44[_0xf530('0x2c')][_0xf530('0x2d')]!=_0x115e52[_0xf530('0x28')]['threadId']){return _0x2265ed[_0xf530('0x14')]['update']({'threadId':_0x9dad44[_0xf530('0x2c')][_0xf530('0x2d')]},{'logging':!![],'where':{'id':_0x115e52[_0xf530('0x28')]['id']}});}else{return;}})[_0xf530('0x16')](function(){return _0x38a147[_0xf530('0x2e')]({'read':!![]});})[_0xf530('0x18')](function(_0x112278){logger['error'](_0xf530('0x24'),_0xf530('0x25'),util[_0xf530('0x2f')](_0x112278,{'showHidden':![],'depth':null}));_0x2730af();});}else{_0x2730af();}})[_0xf530('0x30')](function(){_0x2730af();});}else{_0x2730af();}}},'charset':_0xf530('0x31'),'collate':_0xf530('0x32')});};
\ No newline at end of file
+var _0xf0b3=['Interaction','error','inspect','finally','utf8mb4','lodash','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelMessage.attributes','exports','OpenchannelMessage','openchannel_messages','fti_openchannel_messages','body','get','direction','toLowerCase','out','secret','isNil','UserId','OpenchannelInteraction','findOne','OpenchannelInteractionId','update','createdAt','catch','CmContact','then','OpenchannelAccount','find','OpenchannelAccountId','Interactions','Contact','keys','replyUri','info','OpenchannelMessage,\x20%s,\x20%s','afterCreate','format','length','omit','POST','method','GET','Message\x20%d\x20forwarded\x20to\x20%s','threadId'];(function(_0x25248b,_0x3c8491){var _0x509939=function(_0x457a27){while(--_0x457a27){_0x25248b['push'](_0x25248b['shift']());}};_0x509939(++_0x3c8491);}(_0xf0b3,0x109));var _0x3f0b=function(_0x48a96f,_0x530059){_0x48a96f=_0x48a96f-0x0;var _0x3ff3ef=_0xf0b3[_0x48a96f];return _0x3ff3ef;};'use strict';var _=require(_0x3f0b('0x0'));var util=require('util');var logger=require(_0x3f0b('0x1'))(_0x3f0b('0x2'));var moment=require(_0x3f0b('0x3'));var BPromise=require(_0x3f0b('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3f0b('0x5'));var rimraf=require(_0x3f0b('0x6'));var config=require(_0x3f0b('0x7'));var attributes=require(_0x3f0b('0x8'));module[_0x3f0b('0x9')]=function(_0x147fd5,_0x2b7d5f){return _0x147fd5['define'](_0x3f0b('0xa'),attributes,{'tableName':_0x3f0b('0xb'),'paranoid':![],'indexes':[{'name':_0x3f0b('0xc'),'fields':[_0x3f0b('0xd')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x359c9e,_0x507f82,_0x422fd1){var _0x3629f5=_0x147fd5['models'];var _0x494a9d=_0x359c9e[_0x3f0b('0xe')]({'plain':!![]});if(_0x494a9d[_0x3f0b('0xf')][_0x3f0b('0x10')]()==='in'||_0x494a9d[_0x3f0b('0xf')][_0x3f0b('0x10')]()===_0x3f0b('0x11')&&!_0x494a9d[_0x3f0b('0x12')]&&!_[_0x3f0b('0x13')](_0x494a9d[_0x3f0b('0x14')])){_0x3629f5[_0x3f0b('0x15')][_0x3f0b('0x16')]({'where':{'id':_0x494a9d[_0x3f0b('0x17')]}})['then'](function(_0x35b5b6){if(_0x35b5b6){_0x35b5b6[_0x3f0b('0x18')]({'lastMsgAt':_0x494a9d[_0x3f0b('0x19')],'lastMsgDirection':_0x494a9d['direction'][_0x3f0b('0x10')]()});}})[_0x3f0b('0x1a')](function(_0x17e739){console['error'](_0x17e739);});}if(_0x494a9d['direction']===_0x3f0b('0x11')&&!_0x494a9d['secret']){var _0x2afe75;_0x3629f5[_0x3f0b('0x1b')]['describe']()[_0x3f0b('0x1c')](function(_0x178308){return _0x3629f5[_0x3f0b('0x1d')][_0x3f0b('0x1e')]({'where':{'id':_0x494a9d[_0x3f0b('0x1f')]},'include':[{'model':_0x3629f5['OpenchannelInteraction'],'as':_0x3f0b('0x20'),'where':{'id':_0x494a9d[_0x3f0b('0x17')]},'limit':0x1,'include':[{'model':_0x3629f5[_0x3f0b('0x1b')],'as':_0x3f0b('0x21'),'attributes':_[_0x3f0b('0x22')](_0x178308)}]}]});})[_0x3f0b('0x1c')](function(_0xf796b8){_0x2afe75=_0xf796b8[_0x3f0b('0xe')]({'plain':!![]});if(_0x2afe75&&_0x2afe75[_0x3f0b('0x23')]){logger[_0x3f0b('0x24')](_0x3f0b('0x25'),_0x3f0b('0x26'),util[_0x3f0b('0x27')]('Forwarding\x20message\x20%d\x20to\x20%s',_0x494a9d['id'],_0x2afe75[_0x3f0b('0x23')]));if(_0x2afe75[_0x3f0b('0x20')]&&_0x2afe75[_0x3f0b('0x20')][_0x3f0b('0x28')]){_0x494a9d['Interaction']=_[_0x3f0b('0x29')](_0x2afe75[_0x3f0b('0x20')][0x0],_0x3f0b('0x21'));_0x494a9d[_0x3f0b('0x21')]=_0x2afe75['Interactions'][0x0][_0x3f0b('0x21')];}var _0x507f82={'method':_0x3f0b('0x2a'),'uri':encodeURI(_0x2afe75['replyUri']),'json':!![],'resolveWithFullResponse':!![]};switch(_0x507f82[_0x3f0b('0x2b')]){case _0x3f0b('0x2c'):_0x507f82['qs']=_0x494a9d;break;case _0x3f0b('0x2a'):_0x507f82[_0x3f0b('0xd')]=_0x494a9d;break;}return rp(_0x507f82)['then'](function(_0x40a626){logger['info']('OpenchannelMessage,\x20%s,\x20%s',_0x3f0b('0x26'),util[_0x3f0b('0x27')](_0x3f0b('0x2d'),_0x494a9d['id'],_0x2afe75[_0x3f0b('0x23')]));if(_0x40a626[_0x3f0b('0xd')][_0x3f0b('0x2e')]&&_0x40a626['body'][_0x3f0b('0x2e')]!=_0x494a9d[_0x3f0b('0x2f')][_0x3f0b('0x2e')]){return _0x3629f5['OpenchannelInteraction'][_0x3f0b('0x18')]({'threadId':_0x40a626[_0x3f0b('0xd')][_0x3f0b('0x2e')]},{'logging':!![],'where':{'id':_0x494a9d[_0x3f0b('0x2f')]['id']}});}else{return;}})['then'](function(){return _0x359c9e[_0x3f0b('0x18')]({'read':!![]});})['catch'](function(_0x2412f7){logger[_0x3f0b('0x30')](_0x3f0b('0x25'),'afterCreate',util[_0x3f0b('0x31')](_0x2412f7,{'showHidden':![],'depth':null}));_0x422fd1();});}else{_0x422fd1();}})[_0x3f0b('0x32')](function(){_0x422fd1();});}else{_0x422fd1();}}},'charset':_0x3f0b('0x33'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.rpc.js b/server/api/openchannelMessage/openchannelMessage.rpc.js
index 273740e..fb57081 100644
--- a/server/api/openchannelMessage/openchannelMessage.rpc.js
+++ b/server/api/openchannelMessage/openchannelMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x37c7=['result','catch','create','options','raw','CreateOpenchannelMessage','lodash','util','moment','bluebird','randomstring','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','register','request','then','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message'];(function(_0xd13a88,_0x3c5269){var _0x1c993c=function(_0x245af5){while(--_0x245af5){_0xd13a88['push'](_0xd13a88['shift']());}};_0x1c993c(++_0x3c5269);}(_0x37c7,0x18e));var _0x737c=function(_0x1ed555,_0x163bb2){_0x1ed555=_0x1ed555-0x0;var _0x2ade3d=_0x37c7[_0x1ed555];return _0x2ade3d;};'use strict';var _=require(_0x737c('0x0'));var util=require(_0x737c('0x1'));var moment=require(_0x737c('0x2'));var BPromise=require(_0x737c('0x3'));var rs=require(_0x737c('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x737c('0x5'));var logger=require('../../config/logger')(_0x737c('0x6'));var config=require(_0x737c('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x737c('0x8')][_0x737c('0x9')]({'port':0x232a});config[_0x737c('0xa')]=_[_0x737c('0xb')](config[_0x737c('0xa')],{'host':_0x737c('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x737c('0xa')]));require('./openchannelMessage.socket')[_0x737c('0xd')](socket);function respondWithRpcPromise(_0x27e0f5,_0x34a0aa,_0x5a81fa){return new BPromise(function(_0x2e173c,_0xfe2de0){return client[_0x737c('0xe')](_0x27e0f5,_0x5a81fa)[_0x737c('0xf')](function(_0x4faa3a){logger['info'](_0x737c('0x10'),_0x34a0aa,_0x737c('0x11'));logger[_0x737c('0x12')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x34a0aa,'request\x20sent',JSON[_0x737c('0x13')](_0x4faa3a));if(_0x4faa3a[_0x737c('0x14')]){if(_0x4faa3a[_0x737c('0x14')]['code']===0x1f4){logger[_0x737c('0x14')]('OpenchannelMessage,\x20%s,\x20%s',_0x34a0aa,_0x4faa3a[_0x737c('0x14')][_0x737c('0x15')]);return _0xfe2de0(_0x4faa3a['error']['message']);}logger[_0x737c('0x14')](_0x737c('0x10'),_0x34a0aa,_0x4faa3a['error'][_0x737c('0x15')]);return _0x2e173c(_0x4faa3a['error'][_0x737c('0x15')]);}else{logger['info']('OpenchannelMessage,\x20%s,\x20%s',_0x34a0aa,'request\x20sent');_0x2e173c(_0x4faa3a[_0x737c('0x16')][_0x737c('0x15')]);}})[_0x737c('0x17')](function(_0x28d969){logger[_0x737c('0x14')](_0x737c('0x10'),_0x34a0aa,_0x28d969);_0xfe2de0(_0x28d969);});});}exports['CreateOpenchannelMessage']=function(_0x359c17){var _0x461039=this;return new Promise(function(_0x415930,_0xdd2c85){return db['OpenchannelMessage'][_0x737c('0x18')](_0x359c17['body'],{'raw':_0x359c17[_0x737c('0x19')]?_0x359c17[_0x737c('0x19')][_0x737c('0x1a')]===undefined?!![]:![]:!![]})[_0x737c('0xf')](function(_0x50e215){logger['info'](_0x737c('0x1b'),_0x359c17);logger[_0x737c('0x12')](_0x737c('0x1b'),_0x359c17,JSON[_0x737c('0x13')](_0x50e215));_0x415930(_0x50e215);})[_0x737c('0x17')](function(_0x24df15){logger[_0x737c('0x14')](_0x737c('0x1b'),_0x24df15[_0x737c('0x15')],_0x359c17);_0xdd2c85(_0x461039[_0x737c('0x14')](0x1f4,_0x24df15['message']));});});};
\ No newline at end of file
+var _0x75fc=['defaults','./openchannelMessage.socket','register','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','CreateOpenchannelMessage','create','body','options','raw','stringify','lodash','util','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','redis'];(function(_0x3cb663,_0x417bdc){var _0x2e0788=function(_0x5470fd){while(--_0x5470fd){_0x3cb663['push'](_0x3cb663['shift']());}};_0x2e0788(++_0x417bdc);}(_0x75fc,0x8a));var _0xc75f=function(_0x481a56,_0x56499b){_0x481a56=_0x481a56-0x0;var _0x52558a=_0x75fc[_0x481a56];return _0x52558a;};'use strict';var _=require(_0xc75f('0x0'));var util=require(_0xc75f('0x1'));var moment=require(_0xc75f('0x2'));var BPromise=require('bluebird');var rs=require(_0xc75f('0x3'));var fs=require('fs');var Redis=require(_0xc75f('0x4'));var db=require(_0xc75f('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xc75f('0x6'));var config=require(_0xc75f('0x7'));var jayson=require(_0xc75f('0x8'));var client=jayson[_0xc75f('0x9')][_0xc75f('0xa')]({'port':0x232a});config[_0xc75f('0xb')]=_[_0xc75f('0xc')](config[_0xc75f('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc75f('0xb')]));require(_0xc75f('0xd'))[_0xc75f('0xe')](socket);function respondWithRpcPromise(_0x4d6fd8,_0x409a5d,_0x5761f6){return new BPromise(function(_0x38630c,_0x3ecfba){return client['request'](_0x4d6fd8,_0x5761f6)[_0xc75f('0xf')](function(_0x5ca52c){logger[_0xc75f('0x10')](_0xc75f('0x11'),_0x409a5d,_0xc75f('0x12'));logger[_0xc75f('0x13')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x409a5d,_0xc75f('0x12'),JSON['stringify'](_0x5ca52c));if(_0x5ca52c[_0xc75f('0x14')]){if(_0x5ca52c['error'][_0xc75f('0x15')]===0x1f4){logger[_0xc75f('0x14')](_0xc75f('0x11'),_0x409a5d,_0x5ca52c['error'][_0xc75f('0x16')]);return _0x3ecfba(_0x5ca52c[_0xc75f('0x14')][_0xc75f('0x16')]);}logger[_0xc75f('0x14')](_0xc75f('0x11'),_0x409a5d,_0x5ca52c[_0xc75f('0x14')]['message']);return _0x38630c(_0x5ca52c[_0xc75f('0x14')][_0xc75f('0x16')]);}else{logger['info'](_0xc75f('0x11'),_0x409a5d,_0xc75f('0x12'));_0x38630c(_0x5ca52c['result'][_0xc75f('0x16')]);}})[_0xc75f('0x17')](function(_0x4d7059){logger[_0xc75f('0x14')](_0xc75f('0x11'),_0x409a5d,_0x4d7059);_0x3ecfba(_0x4d7059);});});}exports[_0xc75f('0x18')]=function(_0x1e846c){var _0x5c1d81=this;return new Promise(function(_0x5061ab,_0x50320f){return db['OpenchannelMessage'][_0xc75f('0x19')](_0x1e846c[_0xc75f('0x1a')],{'raw':_0x1e846c[_0xc75f('0x1b')]?_0x1e846c[_0xc75f('0x1b')][_0xc75f('0x1c')]===undefined?!![]:![]:!![]})[_0xc75f('0xf')](function(_0x4314ce){logger[_0xc75f('0x10')](_0xc75f('0x18'),_0x1e846c);logger[_0xc75f('0x13')]('CreateOpenchannelMessage',_0x1e846c,JSON[_0xc75f('0x1d')](_0x4314ce));_0x5061ab(_0x4314ce);})[_0xc75f('0x17')](function(_0x16da64){logger['error'](_0xc75f('0x18'),_0x16da64[_0xc75f('0x16')],_0x1e846c);_0x50320f(_0x5c1d81[_0xc75f('0x14')](0x1f4,_0x16da64[_0xc75f('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.socket.js b/server/api/openchannelMessage/openchannelMessage.socket.js
index 5377a2b..b04c154 100644
--- a/server/api/openchannelMessage/openchannelMessage.socket.js
+++ b/server/api/openchannelMessage/openchannelMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6c32=['remove','update','emit','removeListener','register','openchannelMessage:','./openchannelMessage.events','save'];(function(_0x1fd9e7,_0x24cdbe){var _0x1781f2=function(_0x2bd0a3){while(--_0x2bd0a3){_0x1fd9e7['push'](_0x1fd9e7['shift']());}};_0x1781f2(++_0x24cdbe);}(_0x6c32,0x6e));var _0x26c3=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x6c32[_0x20a584];return _0x4b41a8;};'use strict';var OpenchannelMessageEvents=require(_0x26c3('0x0'));var events=[_0x26c3('0x1'),_0x26c3('0x2'),_0x26c3('0x3')];function createListener(_0x2bbfc4,_0x44fc8c){return function(_0x40cb8e){_0x44fc8c[_0x26c3('0x4')](_0x2bbfc4,_0x40cb8e);};}function removeListener(_0x36528a,_0x49d4a1){return function(){OpenchannelMessageEvents[_0x26c3('0x5')](_0x36528a,_0x49d4a1);};}exports[_0x26c3('0x6')]=function(_0x15ac36){for(var _0x57d915=0x0,_0x187b81=events['length'];_0x57d915<_0x187b81;_0x57d915++){var _0x3dde22=events[_0x57d915];var _0x3ff8e7=createListener(_0x26c3('0x7')+_0x3dde22,_0x15ac36);OpenchannelMessageEvents['on'](_0x3dde22,_0x3ff8e7);}};
\ No newline at end of file
+var _0x98a8=['save','remove','update','removeListener','register','openchannelMessage:','./openchannelMessage.events'];(function(_0x306a95,_0x184bc1){var _0x3a6a2a=function(_0x11ce5b){while(--_0x11ce5b){_0x306a95['push'](_0x306a95['shift']());}};_0x3a6a2a(++_0x184bc1);}(_0x98a8,0x12c));var _0x898a=function(_0x37dd46,_0x2e10bf){_0x37dd46=_0x37dd46-0x0;var _0x170bcf=_0x98a8[_0x37dd46];return _0x170bcf;};'use strict';var OpenchannelMessageEvents=require(_0x898a('0x0'));var events=[_0x898a('0x1'),_0x898a('0x2'),_0x898a('0x3')];function createListener(_0x213c5d,_0x226db7){return function(_0x69c61f){_0x226db7['emit'](_0x213c5d,_0x69c61f);};}function removeListener(_0x2bb3e2,_0xf84a19){return function(){OpenchannelMessageEvents[_0x898a('0x4')](_0x2bb3e2,_0xf84a19);};}exports[_0x898a('0x5')]=function(_0x3e7ddd){for(var _0x5d7e59=0x0,_0x3aadc2=events['length'];_0x5d7e59<_0x3aadc2;_0x5d7e59++){var _0xfa8c50=events[_0x5d7e59];var _0x4fbce5=createListener(_0x898a('0x6')+_0xfa8c50,_0x3e7ddd);OpenchannelMessageEvents['on'](_0xfa8c50,_0x4fbce5);}};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/index.js b/server/api/openchannelQueue/index.js
index e98e0c3..5550165 100644
--- a/server/api/openchannelQueue/index.js
+++ b/server/api/openchannelQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd792=['addAgents','put','/:id','update','destroy','removeTeams','delete','removeAgents','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','index','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams'];(function(_0x4a8c77,_0x3277c5){var _0xd9ebe7=function(_0x4f570c){while(--_0x4f570c){_0x4a8c77['push'](_0x4a8c77['shift']());}};_0xd9ebe7(++_0x3277c5);}(_0xd792,0x13e));var _0x2d79=function(_0x316847,_0x580760){_0x316847=_0x316847-0x0;var _0x48dcca=_0xd792[_0x316847];return _0x48dcca;};'use strict';var multer=require(_0x2d79('0x0'));var util=require(_0x2d79('0x1'));var path=require(_0x2d79('0x2'));var timeout=require(_0x2d79('0x3'));var express=require(_0x2d79('0x4'));var router=express[_0x2d79('0x5')]();var auth=require(_0x2d79('0x6'));var interaction=require(_0x2d79('0x7'));var config=require(_0x2d79('0x8'));var controller=require(_0x2d79('0x9'));router[_0x2d79('0xa')]('/',auth[_0x2d79('0xb')](),controller[_0x2d79('0xc')]);router[_0x2d79('0xa')]('/describe',auth[_0x2d79('0xb')](),controller['describe']);router[_0x2d79('0xa')]('/:id',auth[_0x2d79('0xb')](),controller[_0x2d79('0xd')]);router[_0x2d79('0xa')](_0x2d79('0xe'),auth['isAuthenticated'](),controller[_0x2d79('0xf')]);router['get'](_0x2d79('0x10'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x11')]);router['get'](_0x2d79('0x12'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x13')]);router[_0x2d79('0x14')]('/',auth[_0x2d79('0xb')](),controller[_0x2d79('0x15')]);router[_0x2d79('0x14')](_0x2d79('0x10'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x16')]);router['post'](_0x2d79('0x12'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x17')]);router[_0x2d79('0x18')](_0x2d79('0x19'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x1a')]);router['delete'](_0x2d79('0x19'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x1b')]);router['delete'](_0x2d79('0x10'),auth[_0x2d79('0xb')](),controller[_0x2d79('0x1c')]);router[_0x2d79('0x1d')]('/:id/users',auth[_0x2d79('0xb')](),controller[_0x2d79('0x1e')]);module['exports']=router;
\ No newline at end of file
+var _0x56ff=['delete','destroy','removeTeams','removeAgents','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/members','getMembers','getTeams','getAgents','post','create','/:id/teams','addTeams','/:id/users','addAgents','update'];(function(_0xbc0e56,_0x237dfa){var _0x504608=function(_0x244f37){while(--_0x244f37){_0xbc0e56['push'](_0xbc0e56['shift']());}};_0x504608(++_0x237dfa);}(_0x56ff,0x81));var _0xf56f=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x56ff[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0xf56f('0x0'));var util=require(_0xf56f('0x1'));var path=require(_0xf56f('0x2'));var timeout=require('connect-timeout');var express=require(_0xf56f('0x3'));var router=express[_0xf56f('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xf56f('0x5'));var config=require(_0xf56f('0x6'));var controller=require(_0xf56f('0x7'));router['get']('/',auth[_0xf56f('0x8')](),controller[_0xf56f('0x9')]);router[_0xf56f('0xa')](_0xf56f('0xb'),auth['isAuthenticated'](),controller[_0xf56f('0xc')]);router[_0xf56f('0xa')](_0xf56f('0xd'),auth[_0xf56f('0x8')](),controller[_0xf56f('0xe')]);router[_0xf56f('0xa')](_0xf56f('0xf'),auth['isAuthenticated'](),controller[_0xf56f('0x10')]);router[_0xf56f('0xa')]('/:id/teams',auth[_0xf56f('0x8')](),controller[_0xf56f('0x11')]);router['get']('/:id/users',auth[_0xf56f('0x8')](),controller[_0xf56f('0x12')]);router[_0xf56f('0x13')]('/',auth[_0xf56f('0x8')](),controller[_0xf56f('0x14')]);router['post'](_0xf56f('0x15'),auth[_0xf56f('0x8')](),controller[_0xf56f('0x16')]);router[_0xf56f('0x13')](_0xf56f('0x17'),auth[_0xf56f('0x8')](),controller[_0xf56f('0x18')]);router['put'](_0xf56f('0xd'),auth[_0xf56f('0x8')](),controller[_0xf56f('0x19')]);router[_0xf56f('0x1a')](_0xf56f('0xd'),auth[_0xf56f('0x8')](),controller[_0xf56f('0x1b')]);router[_0xf56f('0x1a')]('/:id/teams',auth[_0xf56f('0x8')](),controller[_0xf56f('0x1c')]);router['delete'](_0xf56f('0x17'),auth[_0xf56f('0x8')](),controller[_0xf56f('0x1d')]);module[_0xf56f('0x1e')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.attributes.js b/server/api/openchannelQueue/openchannelQueue.attributes.js
index 1bce434..b3ad9b7 100644
--- a/server/api/openchannelQueue/openchannelQueue.attributes.js
+++ b/server/api/openchannelQueue/openchannelQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbefc=['name','INTEGER','rrmemory','beepall','roundrobin','sequelize','exports','STRING'];(function(_0x30fa6a,_0x387a70){var _0x10c49b=function(_0x1e067a){while(--_0x1e067a){_0x30fa6a['push'](_0x30fa6a['shift']());}};_0x10c49b(++_0x387a70);}(_0xbefc,0x85));var _0xcbef=function(_0x3e2e69,_0x31a35a){_0x3e2e69=_0x3e2e69-0x0;var _0x1d233a=_0xbefc[_0x3e2e69];return _0x1d233a;};'use strict';var Sequelize=require(_0xcbef('0x0'));module[_0xcbef('0x1')]={'name':{'type':Sequelize[_0xcbef('0x2')],'unique':_0xcbef('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0xcbef('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0xcbef('0x5'),_0xcbef('0x6'),_0xcbef('0x7'))}};
\ No newline at end of file
+var _0x1f77=['roundrobin','sequelize','exports','STRING','name','INTEGER','ENUM','beepall'];(function(_0x35e917,_0xd429b4){var _0x500ce6=function(_0x27d4b3){while(--_0x27d4b3){_0x35e917['push'](_0x35e917['shift']());}};_0x500ce6(++_0xd429b4);}(_0x1f77,0x131));var _0x71f7=function(_0x30e742,_0x292c9d){_0x30e742=_0x30e742-0x0;var _0x34da02=_0x1f77[_0x30e742];return _0x34da02;};'use strict';var Sequelize=require(_0x71f7('0x0'));module[_0x71f7('0x1')]={'name':{'type':Sequelize[_0x71f7('0x2')],'unique':_0x71f7('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x71f7('0x2')]},'timeout':{'type':Sequelize[_0x71f7('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x71f7('0x5')]('rrmemory',_0x71f7('0x6'),_0x71f7('0x7'))}};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.controller.js b/server/api/openchannelQueue/openchannelQueue.controller.js
index db5bfab..16ee361 100644
--- a/server/api/openchannelQueue/openchannelQueue.controller.js
+++ b/server/api/openchannelQueue/openchannelQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x544f=['Unable\x20to\x20retrieve\x20the\x20current\x20user','role','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserOpenchannelQueue','hasOwnProperty','pick','map','User','findAndCountAll','UserId','agent','openchannelPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','Team','addTeams','teams','Agents','voicePause','interface','flatMap','sequelize','transaction','forEach','userOpenchannelQueue:save','removeTeams','ids','select','tq.TeamId','from','team_has_openchannel_queues','join','OpenchannelQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','QueryTypes','SELECT','every','TeamId','includes','all','value','isEmpty','removeAgents','emit','userOpenchannelQueue:remove','addAgents','getAgents','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','squel','crypto','desk.js','papaparse','ioredis','../../config/logger','api','../../config/utils','../../config/environment','defaults','localhost','redis','./openchannelQueue.socket','register','sendStatus','status','end','limit','Content-Range','json','reject','update','then','destroy','get','UserProfileResource','stack','name','send','index','rawAttributes','keys','query','filters','intersection','attributes','model','fields','length','nolimit','offset','order','sort','where','filter','merge','type','key','VIRTUAL','field','options','OpenchannelQueue','count','include','findAll','rows','catch','show','params','find','create','body','user'];(function(_0xbd08b4,_0x4790ed){var _0x314f1e=function(_0x161589){while(--_0x161589){_0xbd08b4['push'](_0xbd08b4['shift']());}};_0x314f1e(++_0x4790ed);}(_0x544f,0xbc));var _0xf544=function(_0x1e172a,_0x52102b){_0x1e172a=_0x1e172a-0x0;var _0x96338b=_0x544f[_0x1e172a];return _0x96338b;};'use strict';var pdf=require(_0xf544('0x0'));var emlformat=require(_0xf544('0x1'));var rimraf=require(_0xf544('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf544('0x3'));var rp=require(_0xf544('0x4'));var moment=require(_0xf544('0x5'));var BPromise=require(_0xf544('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf544('0x7'));var sox=require(_0xf544('0x8'));var csv=require(_0xf544('0x9'));var ejs=require(_0xf544('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xf544('0xb'));var crypto=require(_0xf544('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xf544('0xd'));var toCsv=require(_0xf544('0x9'));var querystring=require('querystring');var Papa=require(_0xf544('0xe'));var Redis=require(_0xf544('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xf544('0x10'))(_0xf544('0x11'));var utils=require(_0xf544('0x12'));var config=require(_0xf544('0x13'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xf544('0x14')](config['redis'],{'host':_0xf544('0x15'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf544('0x16')]));require(_0xf544('0x17'))[_0xf544('0x18')](socket);function respondWithStatusCode(_0xb4e95f,_0x13f2b7){_0x13f2b7=_0x13f2b7||0xcc;return function(_0x240f07){if(_0x240f07){return _0xb4e95f[_0xf544('0x19')](_0x13f2b7);}return _0xb4e95f[_0xf544('0x1a')](_0x13f2b7)[_0xf544('0x1b')]();};}function respondWithResult(_0x2b14e6,_0x4a4b7f){_0x4a4b7f=_0x4a4b7f||0xc8;return function(_0xcd9325){if(_0xcd9325){return _0x2b14e6[_0xf544('0x1a')](_0x4a4b7f)['json'](_0xcd9325);}};}function respondWithFilteredResult(_0x121275,_0x4070e2){return function(_0x442b9b){if(_0x442b9b){var _0x5a205f=_0x442b9b['count'],_0x5aee58=_0x4070e2['offset'],_0x2f1359=_0x4070e2['offset']+_0x4070e2[_0xf544('0x1c')],_0xdead4e;if(_0x2f1359>=_0x5a205f){_0x2f1359=_0x5a205f;_0xdead4e=0xc8;}else{_0xdead4e=0xce;}_0x121275[_0xf544('0x1a')](_0xdead4e);return _0x121275['set'](_0xf544('0x1d'),_0x5aee58+'-'+_0x2f1359+'/'+_0x5a205f)[_0xf544('0x1e')](_0x442b9b);}return null;};}function patchUpdates(_0xe7f123){return function(_0x385c9d){try{jsonpatch['apply'](_0x385c9d,_0xe7f123,!![]);}catch(_0xae3ca9){return BPromise[_0xf544('0x1f')](_0xae3ca9);}return _0x385c9d['save']();};}function saveUpdates(_0x40afa5,_0x389223){return function(_0x563856){if(_0x563856){return _0x563856[_0xf544('0x20')](_0x40afa5)[_0xf544('0x21')](function(_0x108b30){return _0x108b30;});}return null;};}function removeEntity(_0x39912b,_0x5d28c0){return function(_0x87affc){if(_0x87affc){return _0x87affc[_0xf544('0x22')]()[_0xf544('0x21')](function(){var _0x1b63b5=_0x87affc[_0xf544('0x23')]({'plain':!![]});var _0x1ddcf2='OpenchannelQueues';return db[_0xf544('0x24')][_0xf544('0x22')]({'where':{'type':_0x1ddcf2,'resourceId':_0x1b63b5['id']}})[_0xf544('0x21')](function(){return _0x87affc;});})['then'](function(){_0x39912b[_0xf544('0x1a')](0xcc)[_0xf544('0x1b')]();});}};}function handleEntityNotFound(_0x3f3a9e,_0x4bdd21){return function(_0x2b9759){if(!_0x2b9759){_0x3f3a9e['sendStatus'](0x194);}return _0x2b9759;};}function handleError(_0x25241b,_0x46e9d8){_0x46e9d8=_0x46e9d8||0x1f4;return function(_0x1a94d8){logger['error'](_0x1a94d8[_0xf544('0x25')]);if(_0x1a94d8['name']){delete _0x1a94d8[_0xf544('0x26')];}_0x25241b['status'](_0x46e9d8)[_0xf544('0x27')](_0x1a94d8);};}exports[_0xf544('0x28')]=function(_0x12210a,_0x2d4af4){var _0x56a7f2={},_0x1495aa={},_0x455b67={'count':0x0,'rows':[]};var _0x2c2313=db['OpenchannelQueue'][_0xf544('0x29')];_0x1495aa['model']=_[_0xf544('0x2a')](_0x2c2313);_0x1495aa[_0xf544('0x2b')]=_[_0xf544('0x2a')](_0x12210a[_0xf544('0x2b')]);_0x1495aa[_0xf544('0x2c')]=_[_0xf544('0x2d')](_0x1495aa['model'],_0x1495aa[_0xf544('0x2b')]);_0x56a7f2[_0xf544('0x2e')]=_[_0xf544('0x2d')](_0x1495aa[_0xf544('0x2f')],qs[_0xf544('0x30')](_0x12210a[_0xf544('0x2b')]['fields']));_0x56a7f2[_0xf544('0x2e')]=_0x56a7f2[_0xf544('0x2e')][_0xf544('0x31')]?_0x56a7f2[_0xf544('0x2e')]:_0x1495aa['model'];if(!_0x12210a[_0xf544('0x2b')]['hasOwnProperty'](_0xf544('0x32'))){_0x56a7f2['limit']=qs[_0xf544('0x1c')](_0x12210a['query'][_0xf544('0x1c')]);_0x56a7f2['offset']=qs[_0xf544('0x33')](_0x12210a[_0xf544('0x2b')]['offset']);}_0x56a7f2[_0xf544('0x34')]=qs[_0xf544('0x35')](_0x12210a[_0xf544('0x2b')]['sort']);_0x56a7f2[_0xf544('0x36')]=qs[_0xf544('0x2c')](_['pick'](_0x12210a[_0xf544('0x2b')],_0x1495aa[_0xf544('0x2c')]));if(_0x12210a[_0xf544('0x2b')][_0xf544('0x37')]){_0x56a7f2[_0xf544('0x36')]=_[_0xf544('0x38')](_0x56a7f2[_0xf544('0x36')],{'$or':_['map'](_0x2c2313,function(_0x310c58){if(_0x310c58[_0xf544('0x39')][_0xf544('0x3a')]!==_0xf544('0x3b')){var _0x4e2b41={};_0x4e2b41[_0x310c58[_0xf544('0x3c')]]={'$like':'%'+_0x12210a['query']['filter']+'%'};return _0x4e2b41;}})});}_0x56a7f2=_[_0xf544('0x38')]({},_0x56a7f2,_0x12210a[_0xf544('0x3d')]);var _0x55c1ad={'where':_0x56a7f2[_0xf544('0x36')]};return db[_0xf544('0x3e')]['count'](_0x55c1ad)[_0xf544('0x21')](function(_0x520ab4){_0x455b67[_0xf544('0x3f')]=_0x520ab4;if(_0x12210a['query']['includeAll']){_0x56a7f2[_0xf544('0x40')]=[{'all':!![]}];}return db['OpenchannelQueue'][_0xf544('0x41')](_0x56a7f2);})[_0xf544('0x21')](function(_0x5cc30e){_0x455b67[_0xf544('0x42')]=_0x5cc30e;return _0x455b67;})[_0xf544('0x21')](respondWithFilteredResult(_0x2d4af4,_0x56a7f2))[_0xf544('0x43')](handleError(_0x2d4af4,null));};exports[_0xf544('0x44')]=function(_0x422980,_0x4b3da0){var _0xedc3b2={'raw':!![],'where':{'id':_0x422980[_0xf544('0x45')]['id']}},_0x409340={};_0x409340[_0xf544('0x2f')]=_['keys'](db[_0xf544('0x3e')][_0xf544('0x29')]);_0x409340[_0xf544('0x2b')]=_[_0xf544('0x2a')](_0x422980[_0xf544('0x2b')]);_0x409340[_0xf544('0x2c')]=_[_0xf544('0x2d')](_0x409340['model'],_0x409340[_0xf544('0x2b')]);_0xedc3b2[_0xf544('0x2e')]=_[_0xf544('0x2d')](_0x409340[_0xf544('0x2f')],qs[_0xf544('0x30')](_0x422980[_0xf544('0x2b')]['fields']));_0xedc3b2['attributes']=_0xedc3b2[_0xf544('0x2e')]['length']?_0xedc3b2[_0xf544('0x2e')]:_0x409340['model'];if(_0x422980['query']['includeAll']){_0xedc3b2[_0xf544('0x40')]=[{'all':!![]}];}_0xedc3b2=_['merge']({},_0xedc3b2,_0x422980['options']);return db['OpenchannelQueue'][_0xf544('0x46')](_0xedc3b2)[_0xf544('0x21')](handleEntityNotFound(_0x4b3da0,null))[_0xf544('0x21')](respondWithResult(_0x4b3da0,null))[_0xf544('0x43')](handleError(_0x4b3da0,null));};exports[_0xf544('0x47')]=function(_0x224524,_0x89a080){return db['OpenchannelQueue'][_0xf544('0x47')](_0x224524[_0xf544('0x48')],{})[_0xf544('0x21')](function(_0x108b0f){var _0x1338a3=_0x224524[_0xf544('0x49')][_0xf544('0x23')]({'plain':!![]});if(!_0x1338a3)throw new Error(_0xf544('0x4a'));if(_0x1338a3[_0xf544('0x4b')]===_0xf544('0x49')){var _0x10e3b8=_0x108b0f['get']({'plain':!![]});var _0x1a5fc0='OpenchannelQueues';return db['UserProfileSection'][_0xf544('0x46')]({'where':{'name':_0x1a5fc0,'userProfileId':_0x1338a3['userProfileId']},'raw':!![]})[_0xf544('0x21')](function(_0x45e5b9){if(_0x45e5b9&&_0x45e5b9[_0xf544('0x4c')]===0x0){return db[_0xf544('0x24')][_0xf544('0x47')]({'name':_0x10e3b8[_0xf544('0x26')],'resourceId':_0x10e3b8['id'],'type':_0x45e5b9[_0xf544('0x26')],'sectionId':_0x45e5b9['id']},{})[_0xf544('0x21')](function(){return _0x108b0f;});}else{return _0x108b0f;}})[_0xf544('0x43')](function(_0x130bf1){logger[_0xf544('0x4d')](_0xf544('0x4e'),_0x130bf1);throw _0x130bf1;});}return _0x108b0f;})[_0xf544('0x21')](respondWithResult(_0x89a080,0xc9))['catch'](handleError(_0x89a080,null));};exports['update']=function(_0x41a48b,_0x2b94e7){if(_0x41a48b[_0xf544('0x48')]['id']){delete _0x41a48b[_0xf544('0x48')]['id'];}return db['OpenchannelQueue'][_0xf544('0x46')]({'where':{'id':_0x41a48b[_0xf544('0x45')]['id']}})[_0xf544('0x21')](handleEntityNotFound(_0x2b94e7,null))[_0xf544('0x21')](saveUpdates(_0x41a48b[_0xf544('0x48')],null))['then'](respondWithResult(_0x2b94e7,null))[_0xf544('0x43')](handleError(_0x2b94e7,null));};exports[_0xf544('0x22')]=function(_0x1cce2c,_0x4dac39){return db['OpenchannelQueue']['find']({'where':{'id':_0x1cce2c[_0xf544('0x45')]['id']}})[_0xf544('0x21')](handleEntityNotFound(_0x4dac39,null))[_0xf544('0x21')](removeEntity(_0x4dac39,null))[_0xf544('0x43')](handleError(_0x4dac39,null));};exports[_0xf544('0x4f')]=function(_0x8fa01b,_0x4c85b6){return db[_0xf544('0x3e')][_0xf544('0x4f')]()['then'](respondWithResult(_0x4c85b6,null))[_0xf544('0x43')](handleError(_0x4c85b6,null));};exports[_0xf544('0x50')]=function(_0x80ca49,_0x512108,_0x4227c4){var _0x15e0f4={'raw':!![],'where':{}},_0x10407a={},_0x1af5dc;return db[_0xf544('0x3e')][_0xf544('0x51')]({'where':{'id':_0x80ca49[_0xf544('0x45')]['id']}})[_0xf544('0x21')](handleEntityNotFound(_0x512108,null))[_0xf544('0x21')](function(_0x4f2116){if(_0x4f2116){_0x1af5dc=_0x4f2116['get']({'plain':!![]});_0x10407a[_0xf544('0x2f')]=_[_0xf544('0x2a')](db[_0xf544('0x52')]['rawAttributes']);_0x10407a[_0xf544('0x2b')]=_['keys'](_0x80ca49['query']);_0x10407a[_0xf544('0x2c')]=_[_0xf544('0x2d')](_0x10407a[_0xf544('0x2f')],_0x10407a['query']);_0x15e0f4[_0xf544('0x2e')]=_['intersection'](_0x10407a[_0xf544('0x2f')],qs[_0xf544('0x30')](_0x80ca49['query']['fields']));_0x15e0f4[_0xf544('0x2e')]=_0x15e0f4[_0xf544('0x2e')][_0xf544('0x31')]?_0x15e0f4[_0xf544('0x2e')]:_0x10407a[_0xf544('0x2f')];if(!_0x80ca49['query'][_0xf544('0x53')]('nolimit')){_0x15e0f4[_0xf544('0x1c')]=qs['limit'](_0x80ca49[_0xf544('0x2b')][_0xf544('0x1c')]);_0x15e0f4['offset']=qs['offset'](_0x80ca49[_0xf544('0x2b')][_0xf544('0x33')]);}_0x15e0f4['order']=qs[_0xf544('0x35')](_0x80ca49[_0xf544('0x2b')][_0xf544('0x35')]);_0x15e0f4[_0xf544('0x36')]=qs['filters'](_[_0xf544('0x54')](_0x80ca49[_0xf544('0x2b')],_0x10407a[_0xf544('0x2c')]));_0x15e0f4['where']['OpenchannelQueueId']=_0x4f2116['id'];if(_0x80ca49[_0xf544('0x2b')][_0xf544('0x37')]){_0x15e0f4[_0xf544('0x36')]=_[_0xf544('0x38')](_0x15e0f4[_0xf544('0x36')],{'$or':_[_0xf544('0x55')](_0x15e0f4['attributes'],function(_0x4c43a9){var _0x437e89={};_0x437e89[_0x4c43a9]={'$like':'%'+_0x80ca49[_0xf544('0x2b')]['filter']+'%'};return _0x437e89;})});}_0x15e0f4=_['merge']({},_0x15e0f4,_0x80ca49[_0xf544('0x3d')]);return db[_0xf544('0x52')]['findAll'](_0x15e0f4);}})['then'](function(_0x4a9c77){if(_0x4a9c77){return db[_0xf544('0x56')][_0xf544('0x57')]({'where':{'id':_['map'](_0x4a9c77,_0xf544('0x58')),'role':_0xf544('0x59')},'attributes':['id',_0xf544('0x26'),_0xf544('0x5a'),_0xf544('0x5b'),_0xf544('0x5c')]});}})[_0xf544('0x21')](function(_0x2e8371){if(_0x2e8371){return{'count':_0x2e8371[_0xf544('0x3f')],'rows':_[_0xf544('0x55')](_0x2e8371['rows'],function(_0x3878f2){return{'membername':_0x3878f2[_0xf544('0x26')],'UserId':_0x3878f2['id'],'queue_name':_0x1af5dc[_0xf544('0x26')],'OpenchannelQueueId':_0x1af5dc['id'],'interface':util[_0xf544('0x5d')](_0xf544('0x5e'),_0xf544('0x5f'),_0x3878f2[_0xf544('0x26')]),'penalty':0x0,'paused':_0x3878f2['openchannelPause'],'createdAt':_0x3878f2['createdAt'],'updatedAt':_0x3878f2['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0xf544('0x21')](respondWithFilteredResult(_0x512108,_0x15e0f4))[_0xf544('0x43')](handleError(_0x512108,null));};exports[_0xf544('0x60')]=function(_0x3ba4a2,_0x2ac4ea,_0x26605d){var _0x5160eb={};var _0x167e45={};var _0x29a48e;var _0x521d26;return db[_0xf544('0x3e')][_0xf544('0x51')]({'where':{'id':_0x3ba4a2['params']['id']}})[_0xf544('0x21')](handleEntityNotFound(_0x2ac4ea,null))[_0xf544('0x21')](function(_0x53f9d8){if(_0x53f9d8){_0x29a48e=_0x53f9d8;_0x167e45[_0xf544('0x2f')]=_[_0xf544('0x2a')](db[_0xf544('0x61')][_0xf544('0x29')]);_0x167e45['query']=_[_0xf544('0x2a')](_0x3ba4a2[_0xf544('0x2b')]);_0x167e45[_0xf544('0x2c')]=_[_0xf544('0x2d')](_0x167e45['model'],_0x167e45[_0xf544('0x2b')]);_0x5160eb[_0xf544('0x2e')]=_[_0xf544('0x2d')](_0x167e45['model'],qs[_0xf544('0x30')](_0x3ba4a2[_0xf544('0x2b')][_0xf544('0x30')]));_0x5160eb['attributes']=_0x5160eb[_0xf544('0x2e')]['length']?_0x5160eb[_0xf544('0x2e')]:_0x167e45['model'];_0x5160eb[_0xf544('0x34')]=qs[_0xf544('0x35')](_0x3ba4a2[_0xf544('0x2b')]['sort']);_0x5160eb[_0xf544('0x36')]=qs[_0xf544('0x2c')](_[_0xf544('0x54')](_0x3ba4a2[_0xf544('0x2b')],_0x167e45[_0xf544('0x2c')]));if(_0x3ba4a2[_0xf544('0x2b')][_0xf544('0x37')]){_0x5160eb['where']=_[_0xf544('0x38')](_0x5160eb[_0xf544('0x36')],{'$or':_[_0xf544('0x55')](_0x5160eb[_0xf544('0x2e')],function(_0x5d6d75){var _0x4ed20a={};_0x4ed20a[_0x5d6d75]={'$like':'%'+_0x3ba4a2[_0xf544('0x2b')][_0xf544('0x37')]+'%'};return _0x4ed20a;})});}_0x5160eb=_[_0xf544('0x38')]({},_0x5160eb,_0x3ba4a2[_0xf544('0x3d')]);return _0x29a48e[_0xf544('0x60')](_0x5160eb);}})['then'](function(_0x2ba278){if(_0x2ba278){_0x521d26=_0x2ba278[_0xf544('0x31')];if(!_0x3ba4a2[_0xf544('0x2b')][_0xf544('0x53')](_0xf544('0x32'))){_0x5160eb[_0xf544('0x1c')]=qs['limit'](_0x3ba4a2[_0xf544('0x2b')][_0xf544('0x1c')]);_0x5160eb[_0xf544('0x33')]=qs[_0xf544('0x33')](_0x3ba4a2[_0xf544('0x2b')]['offset']);}return _0x29a48e[_0xf544('0x60')](_0x5160eb);}})[_0xf544('0x21')](function(_0x258632){if(_0x258632){return _0x258632?{'count':_0x521d26,'rows':_0x258632}:null;}})[_0xf544('0x21')](respondWithResult(_0x2ac4ea,null))['catch'](handleError(_0x2ac4ea,null));};exports[_0xf544('0x62')]=function(_0x5a31ba,_0x5c7d4d,_0x341d7b){var _0x1f1d41=_0x5a31ba['body'][_0xf544('0x63')];return db[_0xf544('0x61')]['findAll']({'where':{'id':_[_0xf544('0x55')](_0x1f1d41,'id')},'attributes':['id'],'include':[{'model':db[_0xf544('0x56')],'as':_0xf544('0x64'),'attributes':['id',_0xf544('0x26'),'online',_0xf544('0x65'),_0xf544('0x66')],'raw':!![]}]})[_0xf544('0x21')](function(_0x4feca2){if(_0x4feca2){var _0x590f26=_[_0xf544('0x67')](_0x4feca2,function(_0x1b6904){var _0x1d5c97=_0x1b6904[_0xf544('0x23')]({'plain':!![]});return _0x1d5c97[_0xf544('0x64')];});return db[_0xf544('0x3e')][_0xf544('0x46')]({'where':{'id':_0x5a31ba[_0xf544('0x45')]['id']}})[_0xf544('0x21')](function(_0x3c7a08){return db[_0xf544('0x68')][_0xf544('0x69')](function(_0x23598b){return _0x3c7a08[_0xf544('0x62')](_[_0xf544('0x55')](_0x1f1d41,'id'),{'transaction':_0x23598b})['then'](function(){return BPromise['each'](_0x590f26,function(_0x378a6e){return db['UserOpenchannelQueue']['findOrCreate']({'where':{'UserId':_0x378a6e['id'],'OpenchannelQueueId':_0x5a31ba[_0xf544('0x45')]['id']},'transaction':_0x23598b});});})[_0xf544('0x21')](function(){_0x590f26[_0xf544('0x6a')](function(_0x5afd8a){socket['emit'](_0xf544('0x6b'),{'UserId':_0x5afd8a['id'],'OpenchannelQueueId':_0x3c7a08['id']});});});});});}})['then'](respondWithStatusCode(_0x5c7d4d,null))[_0xf544('0x43')](handleError(_0x5c7d4d,null));};exports[_0xf544('0x6c')]=function(_0x2f11ee,_0x130814,_0x1a30f8){return db[_0xf544('0x61')][_0xf544('0x41')]({'where':{'id':_0x2f11ee['query'][_0xf544('0x6d')]},'attributes':['id'],'include':[{'model':db[_0xf544('0x56')],'as':_0xf544('0x64'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x130814,null))[_0xf544('0x21')](function(_0x2b45bb){var _0x376e6d=_[_0xf544('0x55')](_0x2b45bb,'id');var _0x5889c7=[];var _0xb910e1=[];var _0x202bbc=squel[_0xf544('0x6e')]();_0x202bbc['field'](_0xf544('0x6f'))[_0xf544('0x70')](_0xf544('0x71'),'tq')[_0xf544('0x72')]('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0xf544('0x36')](_0xf544('0x73'),_0x2f11ee[_0xf544('0x45')]['id']);for(var _0x5d06f3=0x0;_0x5d06f3<_0x2b45bb[_0xf544('0x31')];_0x5d06f3+=0x1){let _0x4593ee=_0x2b45bb[_0x5d06f3];for(var _0x56c98a=0x0;_0x56c98a<_0x4593ee['Agents']['length'];_0x56c98a+=0x1){let _0x1c4d32=_0x4593ee[_0xf544('0x64')][_0x56c98a];var _0x43f219=_0x202bbc[_0xf544('0x74')]();_0x43f219[_0xf544('0x36')](_0xf544('0x75'),_0x1c4d32['id']);_0xb910e1['push'](db[_0xf544('0x68')]['query'](_0x43f219['toString'](),{'type':db[_0xf544('0x68')][_0xf544('0x76')][_0xf544('0x77')]})[_0xf544('0x21')](function(_0x548a4f){if(_0x548a4f[_0xf544('0x31')]===0x1){return _0x1c4d32['id'];}else{var _0x3f7a26=_[_0xf544('0x78')](_[_0xf544('0x55')](_0x548a4f,_0xf544('0x79')),function(_0x447c62){return _[_0xf544('0x7a')](_0x376e6d,_0x447c62);});if(_0x3f7a26){return _0x1c4d32['id'];}}}));}}return BPromise[_0xf544('0x7b')](_0xb910e1)[_0xf544('0x21')](function(_0x54a00b){_0x5889c7=_(_0x5889c7)['union'](_0x54a00b)['compact']()[_0xf544('0x7c')]();return db[_0xf544('0x3e')][_0xf544('0x46')]({'where':{'id':_0x2f11ee['params']['id']}})[_0xf544('0x21')](function(_0x3a5cc3){return db[_0xf544('0x68')][_0xf544('0x69')](function(_0x553c95){return _0x3a5cc3[_0xf544('0x6c')](_0x2f11ee[_0xf544('0x2b')][_0xf544('0x6d')],{'transaction':_0x553c95})[_0xf544('0x21')](function(){if(!_[_0xf544('0x7d')](_0x5889c7)){return _0x3a5cc3[_0xf544('0x7e')](_0x5889c7,{'transaction':_0x553c95});}})[_0xf544('0x21')](function(){_0x5889c7['forEach'](function(_0x3877ee){socket[_0xf544('0x7f')](_0xf544('0x80'),{'UserId':_0x3877ee,'OpenchannelQueueId':_0x3a5cc3['id']});});});});});});})[_0xf544('0x21')](respondWithStatusCode(_0x130814,null))[_0xf544('0x43')](handleError(_0x130814,null));};exports[_0xf544('0x81')]=function(_0x57c4a0,_0xa748c2,_0x5e611f){return db[_0xf544('0x3e')][_0xf544('0x46')]({'where':{'id':_0x57c4a0[_0xf544('0x45')]['id']}})[_0xf544('0x21')](handleEntityNotFound(_0xa748c2,null))[_0xf544('0x21')](function(_0x19e5f5){if(_0x19e5f5){return _0x19e5f5[_0xf544('0x81')](_0x57c4a0[_0xf544('0x48')]['ids'],_['omit'](_0x57c4a0[_0xf544('0x48')],[_0xf544('0x6d'),'id'])||{})['spread'](function(_0xc9b475){for(var _0x208822=0x0;_0x208822<_0x57c4a0[_0xf544('0x48')][_0xf544('0x6d')]['length'];_0x208822+=0x1){socket[_0xf544('0x7f')](_0xf544('0x6b'),{'UserId':_0x57c4a0[_0xf544('0x48')][_0xf544('0x6d')][_0x208822],'OpenchannelQueueId':_0x57c4a0[_0xf544('0x45')]['id']});}return _0xc9b475;});}})[_0xf544('0x21')](respondWithResult(_0xa748c2,null))[_0xf544('0x43')](handleError(_0xa748c2,null));};exports['removeAgents']=function(_0x5530f1,_0x14d497,_0x566582){return db[_0xf544('0x3e')]['find']({'where':{'id':_0x5530f1[_0xf544('0x45')]['id']}})[_0xf544('0x21')](handleEntityNotFound(_0x14d497,null))[_0xf544('0x21')](function(_0x1165f8){if(_0x1165f8){return _0x1165f8[_0xf544('0x7e')](_0x5530f1[_0xf544('0x2b')][_0xf544('0x6d')])[_0xf544('0x21')](function(){if(_['isArray'](_0x5530f1[_0xf544('0x2b')][_0xf544('0x6d')])){for(var _0x5a9044=0x0;_0x5a9044<_0x5530f1[_0xf544('0x2b')][_0xf544('0x6d')][_0xf544('0x31')];_0x5a9044+=0x1){socket[_0xf544('0x7f')](_0xf544('0x80'),{'UserId':Number(_0x5530f1[_0xf544('0x2b')][_0xf544('0x6d')][_0x5a9044]),'OpenchannelQueueId':Number(_0x5530f1[_0xf544('0x45')]['id'])});}}else{socket[_0xf544('0x7f')](_0xf544('0x80'),{'UserId':Number(_0x5530f1[_0xf544('0x2b')][_0xf544('0x6d')]),'OpenchannelQueueId':Number(_0x5530f1[_0xf544('0x45')]['id'])});}});}})[_0xf544('0x21')](respondWithStatusCode(_0x14d497,null))[_0xf544('0x43')](handleError(_0x14d497,null));};exports[_0xf544('0x82')]=function(_0x99342f,_0x5f26c3,_0x435480){var _0x31e974={};var _0x6ffd0c={};var _0x3972f4;var _0x5f1d37;return db['OpenchannelQueue'][_0xf544('0x51')]({'where':{'id':_0x99342f[_0xf544('0x45')]['id']}})[_0xf544('0x21')](handleEntityNotFound(_0x5f26c3,null))[_0xf544('0x21')](function(_0x2d6010){if(_0x2d6010){_0x3972f4=_0x2d6010;_0x6ffd0c[_0xf544('0x2f')]=_[_0xf544('0x2a')](db[_0xf544('0x56')][_0xf544('0x29')]);_0x6ffd0c['query']=_[_0xf544('0x2a')](_0x99342f[_0xf544('0x2b')]);_0x6ffd0c[_0xf544('0x2c')]=_[_0xf544('0x2d')](_0x6ffd0c['model'],_0x6ffd0c['query']);_0x31e974[_0xf544('0x2e')]=_[_0xf544('0x2d')](_0x6ffd0c[_0xf544('0x2f')],qs[_0xf544('0x30')](_0x99342f[_0xf544('0x2b')][_0xf544('0x30')]));_0x31e974[_0xf544('0x2e')]=_0x31e974['attributes'][_0xf544('0x31')]?_0x31e974[_0xf544('0x2e')]:_0x6ffd0c[_0xf544('0x2f')];_0x31e974[_0xf544('0x34')]=qs[_0xf544('0x35')](_0x99342f[_0xf544('0x2b')]['sort']);_0x31e974[_0xf544('0x36')]=qs['filters'](_[_0xf544('0x54')](_0x99342f['query'],_0x6ffd0c[_0xf544('0x2c')]));if(_0x99342f[_0xf544('0x2b')][_0xf544('0x37')]){_0x31e974['where']=_[_0xf544('0x38')](_0x31e974['where'],{'$or':_[_0xf544('0x55')](_0x31e974[_0xf544('0x2e')],function(_0x34b05e){var _0x582842={};_0x582842[_0x34b05e]={'$like':'%'+_0x99342f['query'][_0xf544('0x37')]+'%'};return _0x582842;})});}_0x31e974=_[_0xf544('0x38')]({},_0x31e974,_0x99342f[_0xf544('0x3d')]);return _0x3972f4[_0xf544('0x82')](_0x31e974);}})[_0xf544('0x21')](function(_0xf69067){if(_0xf69067){_0x5f1d37=_0xf69067[_0xf544('0x31')];if(!_0x99342f[_0xf544('0x2b')][_0xf544('0x53')](_0xf544('0x32'))){_0x31e974[_0xf544('0x1c')]=qs['limit'](_0x99342f[_0xf544('0x2b')]['limit']);_0x31e974[_0xf544('0x33')]=qs[_0xf544('0x33')](_0x99342f['query'][_0xf544('0x33')]);}return _0x3972f4[_0xf544('0x82')](_0x31e974);}})['then'](function(_0x259446){if(_0x259446){return _0x259446?{'count':_0x5f1d37,'rows':_0x259446}:null;}})[_0xf544('0x21')](respondWithResult(_0x5f26c3,null))[_0xf544('0x43')](handleError(_0x5f26c3,null));};
\ No newline at end of file
+var _0xc7c6=['describe','getMembers','findOne','UserOpenchannelQueue','OpenchannelQueueId','findAll','User','findAndCountAll','UserId','openchannelPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','addTeams','teams','Agents','online','voicePause','interface','sequelize','transaction','each','findOrCreate','forEach','emit','userOpenchannelQueue:save','removeTeams','ids','tq.TeamId','from','team_has_openchannel_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','OpenchannelQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','isEmpty','removeAgents','userOpenchannelQueue:remove','addAgents','spread','isArray','getAgents','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','to-csv','ejs','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','status','end','json','count','offset','set','apply','save','update','OpenchannelQueues','destroy','then','sendStatus','stack','name','send','index','OpenchannelQueue','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','map','type','key','VIRTUAL','field','options','include','rows','show','includeAll','merge','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params'];(function(_0xbe9d71,_0x187fc5){var _0x32614f=function(_0x119879){while(--_0x119879){_0xbe9d71['push'](_0xbe9d71['shift']());}};_0x32614f(++_0x187fc5);}(_0xc7c6,0xc9));var _0x6c7c=function(_0x5ef9ff,_0x44d7f3){_0x5ef9ff=_0x5ef9ff-0x0;var _0x6c88b8=_0xc7c6[_0x5ef9ff];return _0x6c88b8;};'use strict';var pdf=require(_0x6c7c('0x0'));var emlformat=require(_0x6c7c('0x1'));var rimraf=require(_0x6c7c('0x2'));var zipdir=require(_0x6c7c('0x3'));var jsonpatch=require(_0x6c7c('0x4'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x6c7c('0x5'));var Mustache=require(_0x6c7c('0x6'));var util=require(_0x6c7c('0x7'));var path=require('path');var sox=require(_0x6c7c('0x8'));var csv=require(_0x6c7c('0x9'));var ejs=require(_0x6c7c('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x6c7c('0xb'));var deskjs=require(_0x6c7c('0xc'));var toCsv=require(_0x6c7c('0x9'));var querystring=require('querystring');var Papa=require(_0x6c7c('0xd'));var Redis=require(_0x6c7c('0xe'));var authService=require(_0x6c7c('0xf'));var qs=require(_0x6c7c('0x10'));var hardwareService=require(_0x6c7c('0x11'));var logger=require(_0x6c7c('0x12'))(_0x6c7c('0x13'));var utils=require(_0x6c7c('0x14'));var config=require(_0x6c7c('0x15'));var db=require('../../mysqldb')['db'];config[_0x6c7c('0x16')]=_[_0x6c7c('0x17')](config['redis'],{'host':_0x6c7c('0x18'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x6c7c('0x16')]));require('./openchannelQueue.socket')['register'](socket);function respondWithStatusCode(_0x49f2dd,_0x4ff157){_0x4ff157=_0x4ff157||0xcc;return function(_0x5d36ef){if(_0x5d36ef){return _0x49f2dd['sendStatus'](_0x4ff157);}return _0x49f2dd[_0x6c7c('0x19')](_0x4ff157)[_0x6c7c('0x1a')]();};}function respondWithResult(_0x335564,_0x19b350){_0x19b350=_0x19b350||0xc8;return function(_0x23f911){if(_0x23f911){return _0x335564[_0x6c7c('0x19')](_0x19b350)[_0x6c7c('0x1b')](_0x23f911);}};}function respondWithFilteredResult(_0x5652f1,_0x287c46){return function(_0x2a33dd){if(_0x2a33dd){var _0x4e77f4=_0x2a33dd[_0x6c7c('0x1c')],_0x57d3a4=_0x287c46[_0x6c7c('0x1d')],_0x28e383=_0x287c46[_0x6c7c('0x1d')]+_0x287c46['limit'],_0xa162ab;if(_0x28e383>=_0x4e77f4){_0x28e383=_0x4e77f4;_0xa162ab=0xc8;}else{_0xa162ab=0xce;}_0x5652f1['status'](_0xa162ab);return _0x5652f1[_0x6c7c('0x1e')]('Content-Range',_0x57d3a4+'-'+_0x28e383+'/'+_0x4e77f4)['json'](_0x2a33dd);}return null;};}function patchUpdates(_0x2fd21e){return function(_0x825351){try{jsonpatch[_0x6c7c('0x1f')](_0x825351,_0x2fd21e,!![]);}catch(_0x4793b2){return BPromise['reject'](_0x4793b2);}return _0x825351[_0x6c7c('0x20')]();};}function saveUpdates(_0x1bfeef,_0x3df266){return function(_0x1d38e8){if(_0x1d38e8){return _0x1d38e8[_0x6c7c('0x21')](_0x1bfeef)['then'](function(_0x14a316){return _0x14a316;});}return null;};}function removeEntity(_0x19d768,_0x27f416){return function(_0x18ac94){if(_0x18ac94){return _0x18ac94['destroy']()['then'](function(){var _0x653edb=_0x18ac94['get']({'plain':!![]});var _0x4525e9=_0x6c7c('0x22');return db['UserProfileResource'][_0x6c7c('0x23')]({'where':{'type':_0x4525e9,'resourceId':_0x653edb['id']}})[_0x6c7c('0x24')](function(){return _0x18ac94;});})[_0x6c7c('0x24')](function(){_0x19d768[_0x6c7c('0x19')](0xcc)[_0x6c7c('0x1a')]();});}};}function handleEntityNotFound(_0x4c91aa,_0x4cb3d1){return function(_0x2e0dcb){if(!_0x2e0dcb){_0x4c91aa[_0x6c7c('0x25')](0x194);}return _0x2e0dcb;};}function handleError(_0x31918f,_0x853fa5){_0x853fa5=_0x853fa5||0x1f4;return function(_0x3591e8){logger['error'](_0x3591e8[_0x6c7c('0x26')]);if(_0x3591e8[_0x6c7c('0x27')]){delete _0x3591e8['name'];}_0x31918f[_0x6c7c('0x19')](_0x853fa5)[_0x6c7c('0x28')](_0x3591e8);};}exports[_0x6c7c('0x29')]=function(_0x3c09f4,_0x1409c1){var _0x426c5b={},_0x320bd7={},_0x32f0d9={'count':0x0,'rows':[]};var _0x3e810c=db[_0x6c7c('0x2a')][_0x6c7c('0x2b')];_0x320bd7[_0x6c7c('0x2c')]=_[_0x6c7c('0x2d')](_0x3e810c);_0x320bd7['query']=_[_0x6c7c('0x2d')](_0x3c09f4[_0x6c7c('0x2e')]);_0x320bd7[_0x6c7c('0x2f')]=_[_0x6c7c('0x30')](_0x320bd7[_0x6c7c('0x2c')],_0x320bd7[_0x6c7c('0x2e')]);_0x426c5b[_0x6c7c('0x31')]=_['intersection'](_0x320bd7['model'],qs[_0x6c7c('0x32')](_0x3c09f4['query'][_0x6c7c('0x32')]));_0x426c5b[_0x6c7c('0x31')]=_0x426c5b[_0x6c7c('0x31')][_0x6c7c('0x33')]?_0x426c5b[_0x6c7c('0x31')]:_0x320bd7[_0x6c7c('0x2c')];if(!_0x3c09f4[_0x6c7c('0x2e')][_0x6c7c('0x34')](_0x6c7c('0x35'))){_0x426c5b['limit']=qs[_0x6c7c('0x36')](_0x3c09f4[_0x6c7c('0x2e')][_0x6c7c('0x36')]);_0x426c5b[_0x6c7c('0x1d')]=qs[_0x6c7c('0x1d')](_0x3c09f4['query'][_0x6c7c('0x1d')]);}_0x426c5b[_0x6c7c('0x37')]=qs[_0x6c7c('0x38')](_0x3c09f4[_0x6c7c('0x2e')][_0x6c7c('0x38')]);_0x426c5b[_0x6c7c('0x39')]=qs[_0x6c7c('0x2f')](_[_0x6c7c('0x3a')](_0x3c09f4[_0x6c7c('0x2e')],_0x320bd7['filters']));if(_0x3c09f4['query'][_0x6c7c('0x3b')]){_0x426c5b[_0x6c7c('0x39')]=_['merge'](_0x426c5b[_0x6c7c('0x39')],{'$or':_[_0x6c7c('0x3c')](_0x3e810c,function(_0x6efdc6){if(_0x6efdc6[_0x6c7c('0x3d')][_0x6c7c('0x3e')]!==_0x6c7c('0x3f')){var _0x13ceba={};_0x13ceba[_0x6efdc6[_0x6c7c('0x40')]]={'$like':'%'+_0x3c09f4[_0x6c7c('0x2e')][_0x6c7c('0x3b')]+'%'};return _0x13ceba;}})});}_0x426c5b=_['merge']({},_0x426c5b,_0x3c09f4[_0x6c7c('0x41')]);var _0x90e240={'where':_0x426c5b[_0x6c7c('0x39')]};return db[_0x6c7c('0x2a')]['count'](_0x90e240)['then'](function(_0x44350d){_0x32f0d9[_0x6c7c('0x1c')]=_0x44350d;if(_0x3c09f4[_0x6c7c('0x2e')]['includeAll']){_0x426c5b[_0x6c7c('0x42')]=[{'all':!![]}];}return db[_0x6c7c('0x2a')]['findAll'](_0x426c5b);})[_0x6c7c('0x24')](function(_0x262897){_0x32f0d9[_0x6c7c('0x43')]=_0x262897;return _0x32f0d9;})['then'](respondWithFilteredResult(_0x1409c1,_0x426c5b))['catch'](handleError(_0x1409c1,null));};exports[_0x6c7c('0x44')]=function(_0x1f08a8,_0x19a6a3){var _0x1848f9={'raw':!![],'where':{'id':_0x1f08a8['params']['id']}},_0x440dae={};_0x440dae[_0x6c7c('0x2c')]=_[_0x6c7c('0x2d')](db[_0x6c7c('0x2a')][_0x6c7c('0x2b')]);_0x440dae[_0x6c7c('0x2e')]=_[_0x6c7c('0x2d')](_0x1f08a8[_0x6c7c('0x2e')]);_0x440dae[_0x6c7c('0x2f')]=_[_0x6c7c('0x30')](_0x440dae[_0x6c7c('0x2c')],_0x440dae[_0x6c7c('0x2e')]);_0x1848f9[_0x6c7c('0x31')]=_[_0x6c7c('0x30')](_0x440dae[_0x6c7c('0x2c')],qs['fields'](_0x1f08a8[_0x6c7c('0x2e')][_0x6c7c('0x32')]));_0x1848f9[_0x6c7c('0x31')]=_0x1848f9['attributes'][_0x6c7c('0x33')]?_0x1848f9['attributes']:_0x440dae[_0x6c7c('0x2c')];if(_0x1f08a8[_0x6c7c('0x2e')][_0x6c7c('0x45')]){_0x1848f9[_0x6c7c('0x42')]=[{'all':!![]}];}_0x1848f9=_[_0x6c7c('0x46')]({},_0x1848f9,_0x1f08a8[_0x6c7c('0x41')]);return db['OpenchannelQueue'][_0x6c7c('0x47')](_0x1848f9)[_0x6c7c('0x24')](handleEntityNotFound(_0x19a6a3,null))['then'](respondWithResult(_0x19a6a3,null))[_0x6c7c('0x48')](handleError(_0x19a6a3,null));};exports[_0x6c7c('0x49')]=function(_0x2c2a8e,_0x10ae74){return db[_0x6c7c('0x2a')][_0x6c7c('0x49')](_0x2c2a8e[_0x6c7c('0x4a')],{})['then'](function(_0x9b97a4){var _0x33463c=_0x2c2a8e[_0x6c7c('0x4b')]['get']({'plain':!![]});if(!_0x33463c)throw new Error(_0x6c7c('0x4c'));if(_0x33463c[_0x6c7c('0x4d')]===_0x6c7c('0x4b')){var _0x14a7f0=_0x9b97a4[_0x6c7c('0x4e')]({'plain':!![]});var _0x4210aa=_0x6c7c('0x22');return db['UserProfileSection'][_0x6c7c('0x47')]({'where':{'name':_0x4210aa,'userProfileId':_0x33463c[_0x6c7c('0x4f')]},'raw':!![]})[_0x6c7c('0x24')](function(_0x370745){if(_0x370745&&_0x370745[_0x6c7c('0x50')]===0x0){return db[_0x6c7c('0x51')][_0x6c7c('0x49')]({'name':_0x14a7f0[_0x6c7c('0x27')],'resourceId':_0x14a7f0['id'],'type':_0x370745[_0x6c7c('0x27')],'sectionId':_0x370745['id']},{})[_0x6c7c('0x24')](function(){return _0x9b97a4;});}else{return _0x9b97a4;}})[_0x6c7c('0x48')](function(_0x536e20){logger[_0x6c7c('0x52')](_0x6c7c('0x53'),_0x536e20);throw _0x536e20;});}return _0x9b97a4;})[_0x6c7c('0x24')](respondWithResult(_0x10ae74,0xc9))[_0x6c7c('0x48')](handleError(_0x10ae74,null));};exports[_0x6c7c('0x21')]=function(_0x184fa9,_0x3c85d2){if(_0x184fa9[_0x6c7c('0x4a')]['id']){delete _0x184fa9[_0x6c7c('0x4a')]['id'];}return db[_0x6c7c('0x2a')]['find']({'where':{'id':_0x184fa9['params']['id']}})[_0x6c7c('0x24')](handleEntityNotFound(_0x3c85d2,null))[_0x6c7c('0x24')](saveUpdates(_0x184fa9['body'],null))[_0x6c7c('0x24')](respondWithResult(_0x3c85d2,null))['catch'](handleError(_0x3c85d2,null));};exports[_0x6c7c('0x23')]=function(_0x39dcbc,_0x56e526){return db[_0x6c7c('0x2a')]['find']({'where':{'id':_0x39dcbc[_0x6c7c('0x54')]['id']}})['then'](handleEntityNotFound(_0x56e526,null))[_0x6c7c('0x24')](removeEntity(_0x56e526,null))['catch'](handleError(_0x56e526,null));};exports[_0x6c7c('0x55')]=function(_0x107eb2,_0x28e2fc){return db[_0x6c7c('0x2a')][_0x6c7c('0x55')]()[_0x6c7c('0x24')](respondWithResult(_0x28e2fc,null))[_0x6c7c('0x48')](handleError(_0x28e2fc,null));};exports[_0x6c7c('0x56')]=function(_0x20e848,_0x319e61,_0x431c4b){var _0xd35a99={'raw':!![],'where':{}},_0x36eead={},_0x527e1b;return db[_0x6c7c('0x2a')][_0x6c7c('0x57')]({'where':{'id':_0x20e848['params']['id']}})[_0x6c7c('0x24')](handleEntityNotFound(_0x319e61,null))[_0x6c7c('0x24')](function(_0x42a077){if(_0x42a077){_0x527e1b=_0x42a077[_0x6c7c('0x4e')]({'plain':!![]});_0x36eead[_0x6c7c('0x2c')]=_[_0x6c7c('0x2d')](db[_0x6c7c('0x58')][_0x6c7c('0x2b')]);_0x36eead[_0x6c7c('0x2e')]=_[_0x6c7c('0x2d')](_0x20e848['query']);_0x36eead[_0x6c7c('0x2f')]=_[_0x6c7c('0x30')](_0x36eead[_0x6c7c('0x2c')],_0x36eead[_0x6c7c('0x2e')]);_0xd35a99[_0x6c7c('0x31')]=_['intersection'](_0x36eead[_0x6c7c('0x2c')],qs['fields'](_0x20e848[_0x6c7c('0x2e')][_0x6c7c('0x32')]));_0xd35a99[_0x6c7c('0x31')]=_0xd35a99[_0x6c7c('0x31')][_0x6c7c('0x33')]?_0xd35a99['attributes']:_0x36eead[_0x6c7c('0x2c')];if(!_0x20e848['query'][_0x6c7c('0x34')](_0x6c7c('0x35'))){_0xd35a99[_0x6c7c('0x36')]=qs[_0x6c7c('0x36')](_0x20e848[_0x6c7c('0x2e')][_0x6c7c('0x36')]);_0xd35a99['offset']=qs['offset'](_0x20e848[_0x6c7c('0x2e')][_0x6c7c('0x1d')]);}_0xd35a99['order']=qs[_0x6c7c('0x38')](_0x20e848['query']['sort']);_0xd35a99[_0x6c7c('0x39')]=qs[_0x6c7c('0x2f')](_[_0x6c7c('0x3a')](_0x20e848[_0x6c7c('0x2e')],_0x36eead[_0x6c7c('0x2f')]));_0xd35a99[_0x6c7c('0x39')][_0x6c7c('0x59')]=_0x42a077['id'];if(_0x20e848[_0x6c7c('0x2e')][_0x6c7c('0x3b')]){_0xd35a99[_0x6c7c('0x39')]=_[_0x6c7c('0x46')](_0xd35a99[_0x6c7c('0x39')],{'$or':_[_0x6c7c('0x3c')](_0xd35a99[_0x6c7c('0x31')],function(_0x157e79){var _0x3ca00c={};_0x3ca00c[_0x157e79]={'$like':'%'+_0x20e848[_0x6c7c('0x2e')][_0x6c7c('0x3b')]+'%'};return _0x3ca00c;})});}_0xd35a99=_[_0x6c7c('0x46')]({},_0xd35a99,_0x20e848['options']);return db[_0x6c7c('0x58')][_0x6c7c('0x5a')](_0xd35a99);}})[_0x6c7c('0x24')](function(_0xf9d64b){if(_0xf9d64b){return db[_0x6c7c('0x5b')][_0x6c7c('0x5c')]({'where':{'id':_[_0x6c7c('0x3c')](_0xf9d64b,_0x6c7c('0x5d')),'role':'agent'},'attributes':['id',_0x6c7c('0x27'),_0x6c7c('0x5e'),_0x6c7c('0x5f'),_0x6c7c('0x60')]});}})[_0x6c7c('0x24')](function(_0x5969f6){if(_0x5969f6){return{'count':_0x5969f6[_0x6c7c('0x1c')],'rows':_[_0x6c7c('0x3c')](_0x5969f6['rows'],function(_0x11e3e6){return{'membername':_0x11e3e6['name'],'UserId':_0x11e3e6['id'],'queue_name':_0x527e1b[_0x6c7c('0x27')],'OpenchannelQueueId':_0x527e1b['id'],'interface':util[_0x6c7c('0x61')](_0x6c7c('0x62'),_0x6c7c('0x63'),_0x11e3e6['name']),'penalty':0x0,'paused':_0x11e3e6[_0x6c7c('0x5e')],'createdAt':_0x11e3e6[_0x6c7c('0x60')],'updatedAt':_0x11e3e6['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x319e61,_0xd35a99))[_0x6c7c('0x48')](handleError(_0x319e61,null));};exports['getTeams']=function(_0x5ca4b8,_0x54aaf1,_0x423461){var _0x3e0086={};var _0x5c1a6d={};var _0x44602c;var _0x2a5226;return db[_0x6c7c('0x2a')][_0x6c7c('0x57')]({'where':{'id':_0x5ca4b8[_0x6c7c('0x54')]['id']}})['then'](handleEntityNotFound(_0x54aaf1,null))[_0x6c7c('0x24')](function(_0x4bf18d){if(_0x4bf18d){_0x44602c=_0x4bf18d;_0x5c1a6d[_0x6c7c('0x2c')]=_[_0x6c7c('0x2d')](db[_0x6c7c('0x64')]['rawAttributes']);_0x5c1a6d[_0x6c7c('0x2e')]=_[_0x6c7c('0x2d')](_0x5ca4b8[_0x6c7c('0x2e')]);_0x5c1a6d[_0x6c7c('0x2f')]=_[_0x6c7c('0x30')](_0x5c1a6d[_0x6c7c('0x2c')],_0x5c1a6d['query']);_0x3e0086[_0x6c7c('0x31')]=_[_0x6c7c('0x30')](_0x5c1a6d['model'],qs[_0x6c7c('0x32')](_0x5ca4b8['query'][_0x6c7c('0x32')]));_0x3e0086[_0x6c7c('0x31')]=_0x3e0086[_0x6c7c('0x31')]['length']?_0x3e0086[_0x6c7c('0x31')]:_0x5c1a6d[_0x6c7c('0x2c')];_0x3e0086['order']=qs[_0x6c7c('0x38')](_0x5ca4b8[_0x6c7c('0x2e')]['sort']);_0x3e0086[_0x6c7c('0x39')]=qs['filters'](_[_0x6c7c('0x3a')](_0x5ca4b8[_0x6c7c('0x2e')],_0x5c1a6d['filters']));if(_0x5ca4b8[_0x6c7c('0x2e')][_0x6c7c('0x3b')]){_0x3e0086[_0x6c7c('0x39')]=_['merge'](_0x3e0086[_0x6c7c('0x39')],{'$or':_['map'](_0x3e0086[_0x6c7c('0x31')],function(_0x8c3aa2){var _0x2248ea={};_0x2248ea[_0x8c3aa2]={'$like':'%'+_0x5ca4b8[_0x6c7c('0x2e')][_0x6c7c('0x3b')]+'%'};return _0x2248ea;})});}_0x3e0086=_[_0x6c7c('0x46')]({},_0x3e0086,_0x5ca4b8[_0x6c7c('0x41')]);return _0x44602c[_0x6c7c('0x65')](_0x3e0086);}})[_0x6c7c('0x24')](function(_0x2ad932){if(_0x2ad932){_0x2a5226=_0x2ad932[_0x6c7c('0x33')];if(!_0x5ca4b8[_0x6c7c('0x2e')][_0x6c7c('0x34')](_0x6c7c('0x35'))){_0x3e0086[_0x6c7c('0x36')]=qs[_0x6c7c('0x36')](_0x5ca4b8[_0x6c7c('0x2e')][_0x6c7c('0x36')]);_0x3e0086[_0x6c7c('0x1d')]=qs[_0x6c7c('0x1d')](_0x5ca4b8['query'][_0x6c7c('0x1d')]);}return _0x44602c[_0x6c7c('0x65')](_0x3e0086);}})[_0x6c7c('0x24')](function(_0xe61f9d){if(_0xe61f9d){return _0xe61f9d?{'count':_0x2a5226,'rows':_0xe61f9d}:null;}})['then'](respondWithResult(_0x54aaf1,null))[_0x6c7c('0x48')](handleError(_0x54aaf1,null));};exports[_0x6c7c('0x66')]=function(_0x368acc,_0x45ad1c,_0x5aa0d0){var _0x57558c=_0x368acc[_0x6c7c('0x4a')][_0x6c7c('0x67')];return db['Team']['findAll']({'where':{'id':_['map'](_0x57558c,'id')},'attributes':['id'],'include':[{'model':db[_0x6c7c('0x5b')],'as':_0x6c7c('0x68'),'attributes':['id',_0x6c7c('0x27'),_0x6c7c('0x69'),_0x6c7c('0x6a'),_0x6c7c('0x6b')],'raw':!![]}]})[_0x6c7c('0x24')](function(_0x55a687){if(_0x55a687){var _0xca8ff4=_['flatMap'](_0x55a687,function(_0x295f43){var _0x271fd0=_0x295f43[_0x6c7c('0x4e')]({'plain':!![]});return _0x271fd0[_0x6c7c('0x68')];});return db[_0x6c7c('0x2a')][_0x6c7c('0x47')]({'where':{'id':_0x368acc[_0x6c7c('0x54')]['id']}})[_0x6c7c('0x24')](function(_0x374e3d){return db[_0x6c7c('0x6c')][_0x6c7c('0x6d')](function(_0x3856ff){return _0x374e3d[_0x6c7c('0x66')](_[_0x6c7c('0x3c')](_0x57558c,'id'),{'transaction':_0x3856ff})[_0x6c7c('0x24')](function(){return BPromise[_0x6c7c('0x6e')](_0xca8ff4,function(_0x10c42a){return db['UserOpenchannelQueue'][_0x6c7c('0x6f')]({'where':{'UserId':_0x10c42a['id'],'OpenchannelQueueId':_0x368acc['params']['id']},'transaction':_0x3856ff});});})['then'](function(){_0xca8ff4[_0x6c7c('0x70')](function(_0x3d2f87){socket[_0x6c7c('0x71')](_0x6c7c('0x72'),{'UserId':_0x3d2f87['id'],'OpenchannelQueueId':_0x374e3d['id']});});});});});}})['then'](respondWithStatusCode(_0x45ad1c,null))[_0x6c7c('0x48')](handleError(_0x45ad1c,null));};exports[_0x6c7c('0x73')]=function(_0x3d184c,_0x3d12d9,_0x236aa5){return db[_0x6c7c('0x64')]['findAll']({'where':{'id':_0x3d184c[_0x6c7c('0x2e')][_0x6c7c('0x74')]},'attributes':['id'],'include':[{'model':db[_0x6c7c('0x5b')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x3d12d9,null))[_0x6c7c('0x24')](function(_0x1862e9){var _0x534caa=_[_0x6c7c('0x3c')](_0x1862e9,'id');var _0xf205ff=[];var _0x29bf25=[];var _0x177b86=squel['select']();_0x177b86[_0x6c7c('0x40')](_0x6c7c('0x75'))[_0x6c7c('0x76')](_0x6c7c('0x77'),'tq')[_0x6c7c('0x78')](_0x6c7c('0x79'),'ut',_0x6c7c('0x7a'))[_0x6c7c('0x39')](_0x6c7c('0x7b'),_0x3d184c[_0x6c7c('0x54')]['id']);for(var _0x3abd1b=0x0;_0x3abd1b<_0x1862e9[_0x6c7c('0x33')];_0x3abd1b+=0x1){let _0xc030b9=_0x1862e9[_0x3abd1b];for(var _0x4be91c=0x0;_0x4be91c<_0xc030b9[_0x6c7c('0x68')][_0x6c7c('0x33')];_0x4be91c+=0x1){let _0x3608cb=_0xc030b9[_0x6c7c('0x68')][_0x4be91c];var _0x538253=_0x177b86[_0x6c7c('0x7c')]();_0x538253['where'](_0x6c7c('0x7d'),_0x3608cb['id']);_0x29bf25[_0x6c7c('0x7e')](db[_0x6c7c('0x6c')][_0x6c7c('0x2e')](_0x538253[_0x6c7c('0x7f')](),{'type':db[_0x6c7c('0x6c')][_0x6c7c('0x80')][_0x6c7c('0x81')]})[_0x6c7c('0x24')](function(_0x186973){if(_0x186973[_0x6c7c('0x33')]===0x1){return _0x3608cb['id'];}else{var _0x2d5c55=_[_0x6c7c('0x82')](_[_0x6c7c('0x3c')](_0x186973,_0x6c7c('0x83')),function(_0x21134e){return _['includes'](_0x534caa,_0x21134e);});if(_0x2d5c55){return _0x3608cb['id'];}}}));}}return BPromise[_0x6c7c('0x84')](_0x29bf25)[_0x6c7c('0x24')](function(_0x42c0b1){_0xf205ff=_(_0xf205ff)[_0x6c7c('0x85')](_0x42c0b1)[_0x6c7c('0x86')]()[_0x6c7c('0x87')]();return db[_0x6c7c('0x2a')]['find']({'where':{'id':_0x3d184c[_0x6c7c('0x54')]['id']}})[_0x6c7c('0x24')](function(_0x163300){return db['sequelize'][_0x6c7c('0x6d')](function(_0x49feff){return _0x163300['removeTeams'](_0x3d184c[_0x6c7c('0x2e')][_0x6c7c('0x74')],{'transaction':_0x49feff})[_0x6c7c('0x24')](function(){if(!_[_0x6c7c('0x88')](_0xf205ff)){return _0x163300[_0x6c7c('0x89')](_0xf205ff,{'transaction':_0x49feff});}})['then'](function(){_0xf205ff['forEach'](function(_0xa4bf2a){socket[_0x6c7c('0x71')](_0x6c7c('0x8a'),{'UserId':_0xa4bf2a,'OpenchannelQueueId':_0x163300['id']});});});});});});})[_0x6c7c('0x24')](respondWithStatusCode(_0x3d12d9,null))['catch'](handleError(_0x3d12d9,null));};exports['addAgents']=function(_0x1ad1c3,_0x59196d,_0x219e70){return db[_0x6c7c('0x2a')]['find']({'where':{'id':_0x1ad1c3[_0x6c7c('0x54')]['id']}})[_0x6c7c('0x24')](handleEntityNotFound(_0x59196d,null))[_0x6c7c('0x24')](function(_0x3b9b9e){if(_0x3b9b9e){return _0x3b9b9e[_0x6c7c('0x8b')](_0x1ad1c3['body'][_0x6c7c('0x74')],_['omit'](_0x1ad1c3[_0x6c7c('0x4a')],['ids','id'])||{})[_0x6c7c('0x8c')](function(_0x44d3bc){for(var _0xaed193=0x0;_0xaed193<_0x1ad1c3[_0x6c7c('0x4a')][_0x6c7c('0x74')][_0x6c7c('0x33')];_0xaed193+=0x1){socket[_0x6c7c('0x71')](_0x6c7c('0x72'),{'UserId':_0x1ad1c3[_0x6c7c('0x4a')][_0x6c7c('0x74')][_0xaed193],'OpenchannelQueueId':_0x1ad1c3[_0x6c7c('0x54')]['id']});}return _0x44d3bc;});}})[_0x6c7c('0x24')](respondWithResult(_0x59196d,null))[_0x6c7c('0x48')](handleError(_0x59196d,null));};exports[_0x6c7c('0x89')]=function(_0x5b5445,_0x4f2643,_0x52a9ff){return db[_0x6c7c('0x2a')][_0x6c7c('0x47')]({'where':{'id':_0x5b5445['params']['id']}})[_0x6c7c('0x24')](handleEntityNotFound(_0x4f2643,null))[_0x6c7c('0x24')](function(_0xdb01cd){if(_0xdb01cd){return _0xdb01cd[_0x6c7c('0x89')](_0x5b5445[_0x6c7c('0x2e')][_0x6c7c('0x74')])[_0x6c7c('0x24')](function(){if(_[_0x6c7c('0x8d')](_0x5b5445[_0x6c7c('0x2e')][_0x6c7c('0x74')])){for(var _0x492738=0x0;_0x492738<_0x5b5445[_0x6c7c('0x2e')][_0x6c7c('0x74')]['length'];_0x492738+=0x1){socket['emit']('userOpenchannelQueue:remove',{'UserId':Number(_0x5b5445[_0x6c7c('0x2e')]['ids'][_0x492738]),'OpenchannelQueueId':Number(_0x5b5445[_0x6c7c('0x54')]['id'])});}}else{socket[_0x6c7c('0x71')](_0x6c7c('0x8a'),{'UserId':Number(_0x5b5445[_0x6c7c('0x2e')][_0x6c7c('0x74')]),'OpenchannelQueueId':Number(_0x5b5445['params']['id'])});}});}})[_0x6c7c('0x24')](respondWithStatusCode(_0x4f2643,null))[_0x6c7c('0x48')](handleError(_0x4f2643,null));};exports[_0x6c7c('0x8e')]=function(_0x4bc65d,_0x16c25b,_0x22a5cf){var _0x3d0a11={};var _0x1da29d={};var _0x320a62;var _0xc9c7c9;return db[_0x6c7c('0x2a')][_0x6c7c('0x57')]({'where':{'id':_0x4bc65d['params']['id']}})[_0x6c7c('0x24')](handleEntityNotFound(_0x16c25b,null))[_0x6c7c('0x24')](function(_0x3bb72d){if(_0x3bb72d){_0x320a62=_0x3bb72d;_0x1da29d['model']=_[_0x6c7c('0x2d')](db[_0x6c7c('0x5b')][_0x6c7c('0x2b')]);_0x1da29d[_0x6c7c('0x2e')]=_[_0x6c7c('0x2d')](_0x4bc65d['query']);_0x1da29d[_0x6c7c('0x2f')]=_[_0x6c7c('0x30')](_0x1da29d['model'],_0x1da29d[_0x6c7c('0x2e')]);_0x3d0a11[_0x6c7c('0x31')]=_['intersection'](_0x1da29d[_0x6c7c('0x2c')],qs['fields'](_0x4bc65d['query'][_0x6c7c('0x32')]));_0x3d0a11[_0x6c7c('0x31')]=_0x3d0a11[_0x6c7c('0x31')][_0x6c7c('0x33')]?_0x3d0a11[_0x6c7c('0x31')]:_0x1da29d[_0x6c7c('0x2c')];_0x3d0a11[_0x6c7c('0x37')]=qs['sort'](_0x4bc65d['query']['sort']);_0x3d0a11[_0x6c7c('0x39')]=qs[_0x6c7c('0x2f')](_[_0x6c7c('0x3a')](_0x4bc65d[_0x6c7c('0x2e')],_0x1da29d[_0x6c7c('0x2f')]));if(_0x4bc65d[_0x6c7c('0x2e')]['filter']){_0x3d0a11[_0x6c7c('0x39')]=_[_0x6c7c('0x46')](_0x3d0a11[_0x6c7c('0x39')],{'$or':_[_0x6c7c('0x3c')](_0x3d0a11[_0x6c7c('0x31')],function(_0x23b4e0){var _0x3e5a75={};_0x3e5a75[_0x23b4e0]={'$like':'%'+_0x4bc65d[_0x6c7c('0x2e')][_0x6c7c('0x3b')]+'%'};return _0x3e5a75;})});}_0x3d0a11=_[_0x6c7c('0x46')]({},_0x3d0a11,_0x4bc65d['options']);return _0x320a62[_0x6c7c('0x8e')](_0x3d0a11);}})[_0x6c7c('0x24')](function(_0x121851){if(_0x121851){_0xc9c7c9=_0x121851[_0x6c7c('0x33')];if(!_0x4bc65d['query'][_0x6c7c('0x34')]('nolimit')){_0x3d0a11[_0x6c7c('0x36')]=qs[_0x6c7c('0x36')](_0x4bc65d[_0x6c7c('0x2e')][_0x6c7c('0x36')]);_0x3d0a11[_0x6c7c('0x1d')]=qs['offset'](_0x4bc65d[_0x6c7c('0x2e')][_0x6c7c('0x1d')]);}return _0x320a62['getAgents'](_0x3d0a11);}})[_0x6c7c('0x24')](function(_0x4d44bc){if(_0x4d44bc){return _0x4d44bc?{'count':_0xc9c7c9,'rows':_0x4d44bc}:null;}})[_0x6c7c('0x24')](respondWithResult(_0x16c25b,null))[_0x6c7c('0x48')](handleError(_0x16c25b,null));};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.events.js b/server/api/openchannelQueue/openchannelQueue.events.js
index 7cace1e..9050a77 100644
--- a/server/api/openchannelQueue/openchannelQueue.events.js
+++ b/server/api/openchannelQueue/openchannelQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8679=['save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8679,0x1ee));var _0x9867=function(_0x445d8c,_0x59e4a4){_0x445d8c=_0x445d8c-0x0;var _0x58c722=_0x8679[_0x445d8c];return _0x58c722;};'use strict';var EventEmitter=require(_0x9867('0x0'));var OpenchannelQueue=require(_0x9867('0x1'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9867('0x2'),'afterUpdate':_0x9867('0x3'),'afterDestroy':_0x9867('0x4')};function emitEvent(_0x5d49dd){return function(_0x31cd80,_0x2c22ce,_0x19ab74){OpenchannelQueueEvents['emit'](_0x5d49dd+':'+_0x31cd80['id'],_0x31cd80);OpenchannelQueueEvents[_0x9867('0x5')](_0x5d49dd,_0x31cd80);_0x19ab74(null);};}for(var e in events){if(events[_0x9867('0x6')](e)){var event=events[e];OpenchannelQueue[_0x9867('0x7')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;
\ No newline at end of file
+var _0x48f0=['hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelQueue','save','emit'];(function(_0x1694f5,_0x49b7c3){var _0x5b4321=function(_0x58c183){while(--_0x58c183){_0x1694f5['push'](_0x1694f5['shift']());}};_0x5b4321(++_0x49b7c3);}(_0x48f0,0x1ab));var _0x048f=function(_0x2143dc,_0x2bad8c){_0x2143dc=_0x2143dc-0x0;var _0xaa7197=_0x48f0[_0x2143dc];return _0xaa7197;};'use strict';var EventEmitter=require(_0x048f('0x0'));var OpenchannelQueue=require(_0x048f('0x1'))['db'][_0x048f('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x048f('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x13000f){return function(_0x33c097,_0x2525c3,_0x1ab647){OpenchannelQueueEvents[_0x048f('0x4')](_0x13000f+':'+_0x33c097['id'],_0x33c097);OpenchannelQueueEvents[_0x048f('0x4')](_0x13000f,_0x33c097);_0x1ab647(null);};}for(var e in events){if(events[_0x048f('0x5')](e)){var event=events[e];OpenchannelQueue[_0x048f('0x6')](e,emitEvent(event));}}module[_0x048f('0x7')]=OpenchannelQueueEvents;
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.model.js b/server/api/openchannelQueue/openchannelQueue.model.js
index 8e2af98..2526249 100644
--- a/server/api/openchannelQueue/openchannelQueue.model.js
+++ b/server/api/openchannelQueue/openchannelQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcdf2=['define','openchannel_queues','lodash','util','../../config/logger','moment','request-promise','rimraf','../../config/environment','exports'];(function(_0x5cb1af,_0x4bdc8c){var _0x8d7940=function(_0x3db70a){while(--_0x3db70a){_0x5cb1af['push'](_0x5cb1af['shift']());}};_0x8d7940(++_0x4bdc8c);}(_0xcdf2,0x192));var _0x2cdf=function(_0x334d1e,_0x28a488){_0x334d1e=_0x334d1e-0x0;var _0x3b33ba=_0xcdf2[_0x334d1e];return _0x3b33ba;};'use strict';var _=require(_0x2cdf('0x0'));var util=require(_0x2cdf('0x1'));var logger=require(_0x2cdf('0x2'))('api');var moment=require(_0x2cdf('0x3'));var BPromise=require('bluebird');var rp=require(_0x2cdf('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2cdf('0x5'));var config=require(_0x2cdf('0x6'));var attributes=require('./openchannelQueue.attributes');module[_0x2cdf('0x7')]=function(_0x3d4320,_0x1ac3a7){return _0x3d4320[_0x2cdf('0x8')]('OpenchannelQueue',attributes,{'tableName':_0x2cdf('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xffe3=['define','lodash','util','../../config/logger','request-promise','path','../../config/environment','./openchannelQueue.attributes','exports'];(function(_0x533e08,_0x1749ec){var _0x3901c3=function(_0x5e96e0){while(--_0x5e96e0){_0x533e08['push'](_0x533e08['shift']());}};_0x3901c3(++_0x1749ec);}(_0xffe3,0x18d));var _0x3ffe=function(_0x57e48d,_0x159839){_0x57e48d=_0x57e48d-0x0;var _0x2ef7d2=_0xffe3[_0x57e48d];return _0x2ef7d2;};'use strict';var _=require(_0x3ffe('0x0'));var util=require(_0x3ffe('0x1'));var logger=require(_0x3ffe('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x3ffe('0x3'));var fs=require('fs');var path=require(_0x3ffe('0x4'));var rimraf=require('rimraf');var config=require(_0x3ffe('0x5'));var attributes=require(_0x3ffe('0x6'));module[_0x3ffe('0x7')]=function(_0x21ed27,_0x191b31){return _0x21ed27[_0x3ffe('0x8')]('OpenchannelQueue',attributes,{'tableName':'openchannel_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.rpc.js b/server/api/openchannelQueue/openchannelQueue.rpc.js
index 82c6ae9..370394f 100644
--- a/server/api/openchannelQueue/openchannelQueue.rpc.js
+++ b/server/api/openchannelQueue/openchannelQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x097c=['rpc','jayson/promise','client','http','redis','./openchannelQueue.socket','register','request','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelQueue,\x20%s,\x20%s','message','catch','GetOpenchannelQueue','options','raw','where','attributes','include','map','model','then','ShowOpenchannelQueue','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x211516,_0x393007){var _0x43bc40=function(_0x12d8ca){while(--_0x12d8ca){_0x211516['push'](_0x211516['shift']());}};_0x43bc40(++_0x393007);}(_0x097c,0x1d5));var _0xc097=function(_0x47b897,_0x19d95a){_0x47b897=_0x47b897-0x0;var _0x2f7e37=_0x097c[_0x47b897];return _0x2f7e37;};'use strict';var _=require(_0xc097('0x0'));var util=require(_0xc097('0x1'));var moment=require(_0xc097('0x2'));var BPromise=require('bluebird');var rs=require(_0xc097('0x3'));var fs=require('fs');var Redis=require(_0xc097('0x4'));var db=require(_0xc097('0x5'))['db'];var utils=require(_0xc097('0x6'));var logger=require('../../config/logger')(_0xc097('0x7'));var config=require('../../config/environment');var jayson=require(_0xc097('0x8'));var client=jayson[_0xc097('0x9')][_0xc097('0xa')]({'port':0x232a});config[_0xc097('0xb')]=_['defaults'](config[_0xc097('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc097('0xb')]));require(_0xc097('0xc'))[_0xc097('0xd')](socket);function respondWithRpcPromise(_0x1c5f2d,_0x2b8742,_0x4667e1){return new BPromise(function(_0xf0523c,_0x2296e9){return client[_0xc097('0xe')](_0x1c5f2d,_0x4667e1)['then'](function(_0xd3f5cc){logger[_0xc097('0xf')]('OpenchannelQueue,\x20%s,\x20%s',_0x2b8742,_0xc097('0x10'));logger[_0xc097('0x11')](_0xc097('0x12'),_0x2b8742,_0xc097('0x10'),JSON[_0xc097('0x13')](_0xd3f5cc));if(_0xd3f5cc[_0xc097('0x14')]){if(_0xd3f5cc['error']['code']===0x1f4){logger[_0xc097('0x14')](_0xc097('0x15'),_0x2b8742,_0xd3f5cc[_0xc097('0x14')][_0xc097('0x16')]);return _0x2296e9(_0xd3f5cc[_0xc097('0x14')]['message']);}logger[_0xc097('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x2b8742,_0xd3f5cc[_0xc097('0x14')]['message']);return _0xf0523c(_0xd3f5cc[_0xc097('0x14')][_0xc097('0x16')]);}else{logger[_0xc097('0xf')](_0xc097('0x15'),_0x2b8742,_0xc097('0x10'));_0xf0523c(_0xd3f5cc['result'][_0xc097('0x16')]);}})[_0xc097('0x17')](function(_0x3e68a7){logger[_0xc097('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x2b8742,_0x3e68a7);_0x2296e9(_0x3e68a7);});});}exports[_0xc097('0x18')]=function(_0x595d04){var _0x5abf81=this;return new Promise(function(_0x48d229,_0x1d137e){return db['OpenchannelQueue']['findAll']({'raw':_0x595d04[_0xc097('0x19')]?_0x595d04[_0xc097('0x19')][_0xc097('0x1a')]===undefined?!![]:![]:!![],'where':_0x595d04[_0xc097('0x19')]?_0x595d04[_0xc097('0x19')][_0xc097('0x1b')]||null:null,'attributes':_0x595d04[_0xc097('0x19')]?_0x595d04[_0xc097('0x19')][_0xc097('0x1c')]||null:null,'limit':_0x595d04['options']?_0x595d04['options']['limit']||null:null,'include':_0x595d04['options']?_0x595d04[_0xc097('0x19')][_0xc097('0x1d')]?_[_0xc097('0x1e')](_0x595d04[_0xc097('0x19')][_0xc097('0x1d')],function(_0xaf8497){return{'model':db[_0xaf8497[_0xc097('0x1f')]],'as':_0xaf8497['as'],'attributes':_0xaf8497[_0xc097('0x1c')],'include':_0xaf8497[_0xc097('0x1d')]?_[_0xc097('0x1e')](_0xaf8497[_0xc097('0x1d')],function(_0x8985bc){return{'model':db[_0x8985bc[_0xc097('0x1f')]],'as':_0x8985bc['as'],'attributes':_0x8985bc[_0xc097('0x1c')],'include':_0x8985bc['include']?_[_0xc097('0x1e')](_0x8985bc[_0xc097('0x1d')],function(_0x497618){return{'model':db[_0x497618['model']],'as':_0x497618['as'],'attributes':_0x497618[_0xc097('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xc097('0x20')](function(_0x455cff){logger['info'](_0xc097('0x18'),_0x595d04);logger[_0xc097('0x11')](_0xc097('0x18'),_0x595d04,JSON['stringify'](_0x455cff));_0x48d229(_0x455cff);})['catch'](function(_0xb587d8){logger['error'](_0xc097('0x18'),_0xb587d8['message'],_0x595d04);_0x1d137e(_0x5abf81['error'](0x1f4,_0xb587d8[_0xc097('0x16')]));});});};exports['ShowOpenchannelQueue']=function(_0x110e6e){var _0x462485=this;return new Promise(function(_0x1fef2e,_0xfd423a){return db['OpenchannelQueue']['find']({'raw':_0x110e6e[_0xc097('0x19')]?_0x110e6e[_0xc097('0x19')][_0xc097('0x1a')]===undefined?!![]:![]:!![],'where':_0x110e6e[_0xc097('0x19')]?_0x110e6e[_0xc097('0x19')][_0xc097('0x1b')]||null:null,'attributes':_0x110e6e['options']?_0x110e6e[_0xc097('0x19')][_0xc097('0x1c')]||null:null,'include':_0x110e6e[_0xc097('0x19')]?_0x110e6e[_0xc097('0x19')][_0xc097('0x1d')]?_[_0xc097('0x1e')](_0x110e6e[_0xc097('0x19')][_0xc097('0x1d')],function(_0xd4fcd0){return{'model':db[_0xd4fcd0['model']],'as':_0xd4fcd0['as'],'attributes':_0xd4fcd0['attributes'],'include':_0xd4fcd0[_0xc097('0x1d')]?_[_0xc097('0x1e')](_0xd4fcd0[_0xc097('0x1d')],function(_0x1f2fa0){return{'model':db[_0x1f2fa0[_0xc097('0x1f')]],'as':_0x1f2fa0['as'],'attributes':_0x1f2fa0['attributes'],'include':_0x1f2fa0[_0xc097('0x1d')]?_[_0xc097('0x1e')](_0x1f2fa0[_0xc097('0x1d')],function(_0x882ead){return{'model':db[_0x882ead[_0xc097('0x1f')]],'as':_0x882ead['as'],'attributes':_0x882ead[_0xc097('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xc097('0x20')](function(_0x360222){logger[_0xc097('0xf')](_0xc097('0x21'),_0x110e6e);logger['debug']('ShowOpenchannelQueue',_0x110e6e,JSON[_0xc097('0x13')](_0x360222));_0x1fef2e(_0x360222);})[_0xc097('0x17')](function(_0x168dd3){logger[_0xc097('0x14')](_0xc097('0x21'),_0x168dd3[_0xc097('0x16')],_0x110e6e);_0xfd423a(_0x462485[_0xc097('0x14')](0x1f4,_0x168dd3[_0xc097('0x16')]));});});};
\ No newline at end of file
+var _0xa8eb=['ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','defaults','redis','./openchannelQueue.socket','register','request','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','attributes','limit','map','include','model','then','ShowOpenchannelQueue','find','where','lodash','moment','randomstring'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa8eb,0x179));var _0xba8e=function(_0x13c96f,_0x322e9d){_0x13c96f=_0x13c96f-0x0;var _0x4176c9=_0xa8eb[_0x13c96f];return _0x4176c9;};'use strict';var _=require(_0xba8e('0x0'));var util=require('util');var moment=require(_0xba8e('0x1'));var BPromise=require('bluebird');var rs=require(_0xba8e('0x2'));var fs=require('fs');var Redis=require(_0xba8e('0x3'));var db=require(_0xba8e('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xba8e('0x5'))(_0xba8e('0x6'));var config=require('../../config/environment');var jayson=require(_0xba8e('0x7'));var client=jayson['client'][_0xba8e('0x8')]({'port':0x232a});config['redis']=_[_0xba8e('0x9')](config[_0xba8e('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xba8e('0xa')]));require(_0xba8e('0xb'))[_0xba8e('0xc')](socket);function respondWithRpcPromise(_0x876db9,_0x441bc3,_0x4c93d9){return new BPromise(function(_0x374d03,_0x2fb45c){return client[_0xba8e('0xd')](_0x876db9,_0x4c93d9)['then'](function(_0x1ee232){logger[_0xba8e('0xe')](_0xba8e('0xf'),_0x441bc3,_0xba8e('0x10'));logger[_0xba8e('0x11')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x441bc3,'request\x20sent',JSON[_0xba8e('0x12')](_0x1ee232));if(_0x1ee232[_0xba8e('0x13')]){if(_0x1ee232[_0xba8e('0x13')][_0xba8e('0x14')]===0x1f4){logger[_0xba8e('0x13')](_0xba8e('0xf'),_0x441bc3,_0x1ee232[_0xba8e('0x13')][_0xba8e('0x15')]);return _0x2fb45c(_0x1ee232[_0xba8e('0x13')][_0xba8e('0x15')]);}logger[_0xba8e('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x441bc3,_0x1ee232[_0xba8e('0x13')]['message']);return _0x374d03(_0x1ee232[_0xba8e('0x13')][_0xba8e('0x15')]);}else{logger[_0xba8e('0xe')]('OpenchannelQueue,\x20%s,\x20%s',_0x441bc3,_0xba8e('0x10'));_0x374d03(_0x1ee232[_0xba8e('0x16')][_0xba8e('0x15')]);}})[_0xba8e('0x17')](function(_0x1d98c9){logger[_0xba8e('0x13')](_0xba8e('0xf'),_0x441bc3,_0x1d98c9);_0x2fb45c(_0x1d98c9);});});}exports[_0xba8e('0x18')]=function(_0x1e1822){var _0x30c403=this;return new Promise(function(_0x469f21,_0x9c93d3){return db[_0xba8e('0x19')][_0xba8e('0x1a')]({'raw':_0x1e1822[_0xba8e('0x1b')]?_0x1e1822[_0xba8e('0x1b')][_0xba8e('0x1c')]===undefined?!![]:![]:!![],'where':_0x1e1822[_0xba8e('0x1b')]?_0x1e1822[_0xba8e('0x1b')]['where']||null:null,'attributes':_0x1e1822['options']?_0x1e1822['options'][_0xba8e('0x1d')]||null:null,'limit':_0x1e1822[_0xba8e('0x1b')]?_0x1e1822['options'][_0xba8e('0x1e')]||null:null,'include':_0x1e1822[_0xba8e('0x1b')]?_0x1e1822[_0xba8e('0x1b')]['include']?_[_0xba8e('0x1f')](_0x1e1822[_0xba8e('0x1b')][_0xba8e('0x20')],function(_0x57f4a2){return{'model':db[_0x57f4a2[_0xba8e('0x21')]],'as':_0x57f4a2['as'],'attributes':_0x57f4a2[_0xba8e('0x1d')],'include':_0x57f4a2['include']?_[_0xba8e('0x1f')](_0x57f4a2[_0xba8e('0x20')],function(_0x330346){return{'model':db[_0x330346[_0xba8e('0x21')]],'as':_0x330346['as'],'attributes':_0x330346[_0xba8e('0x1d')],'include':_0x330346[_0xba8e('0x20')]?_[_0xba8e('0x1f')](_0x330346[_0xba8e('0x20')],function(_0x264520){return{'model':db[_0x264520[_0xba8e('0x21')]],'as':_0x264520['as'],'attributes':_0x264520[_0xba8e('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xba8e('0x22')](function(_0x1baffd){logger['info'](_0xba8e('0x18'),_0x1e1822);logger['debug']('GetOpenchannelQueue',_0x1e1822,JSON[_0xba8e('0x12')](_0x1baffd));_0x469f21(_0x1baffd);})[_0xba8e('0x17')](function(_0x112415){logger['error'](_0xba8e('0x18'),_0x112415[_0xba8e('0x15')],_0x1e1822);_0x9c93d3(_0x30c403[_0xba8e('0x13')](0x1f4,_0x112415[_0xba8e('0x15')]));});});};exports[_0xba8e('0x23')]=function(_0x1b6be5){var _0x44dfb5=this;return new Promise(function(_0x3504fd,_0x55ae4b){return db['OpenchannelQueue'][_0xba8e('0x24')]({'raw':_0x1b6be5[_0xba8e('0x1b')]?_0x1b6be5['options'][_0xba8e('0x1c')]===undefined?!![]:![]:!![],'where':_0x1b6be5['options']?_0x1b6be5[_0xba8e('0x1b')][_0xba8e('0x25')]||null:null,'attributes':_0x1b6be5['options']?_0x1b6be5[_0xba8e('0x1b')][_0xba8e('0x1d')]||null:null,'include':_0x1b6be5['options']?_0x1b6be5[_0xba8e('0x1b')][_0xba8e('0x20')]?_[_0xba8e('0x1f')](_0x1b6be5[_0xba8e('0x1b')][_0xba8e('0x20')],function(_0x249b8){return{'model':db[_0x249b8[_0xba8e('0x21')]],'as':_0x249b8['as'],'attributes':_0x249b8['attributes'],'include':_0x249b8[_0xba8e('0x20')]?_[_0xba8e('0x1f')](_0x249b8['include'],function(_0xe9a0cf){return{'model':db[_0xe9a0cf['model']],'as':_0xe9a0cf['as'],'attributes':_0xe9a0cf['attributes'],'include':_0xe9a0cf[_0xba8e('0x20')]?_[_0xba8e('0x1f')](_0xe9a0cf['include'],function(_0x415824){return{'model':db[_0x415824[_0xba8e('0x21')]],'as':_0x415824['as'],'attributes':_0x415824['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x36a6e3){logger['info'](_0xba8e('0x23'),_0x1b6be5);logger[_0xba8e('0x11')](_0xba8e('0x23'),_0x1b6be5,JSON[_0xba8e('0x12')](_0x36a6e3));_0x3504fd(_0x36a6e3);})[_0xba8e('0x17')](function(_0x145dfd){logger['error'](_0xba8e('0x23'),_0x145dfd[_0xba8e('0x15')],_0x1b6be5);_0x55ae4b(_0x44dfb5[_0xba8e('0x13')](0x1f4,_0x145dfd[_0xba8e('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.socket.js b/server/api/openchannelQueue/openchannelQueue.socket.js
index 5a83014..7f73e64 100644
--- a/server/api/openchannelQueue/openchannelQueue.socket.js
+++ b/server/api/openchannelQueue/openchannelQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['register','length','openchannelQueue:','./openchannelQueue.events','save','remove','emit','removeListener'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xa9e0,0x123));var _0x0a9e=function(_0x25bea7,_0x49ab45){_0x25bea7=_0x25bea7-0x0;var _0x175952=_0xa9e0[_0x25bea7];return _0x175952;};'use strict';var OpenchannelQueueEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){OpenchannelQueueEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);OpenchannelQueueEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
+var _0xa9e0=['register','length','openchannelQueue:','./openchannelQueue.events','save','remove','emit','removeListener'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'use strict';var OpenchannelQueueEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){OpenchannelQueueEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);OpenchannelQueueEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/index.js b/server/api/openchannelQueueReport/index.js
index f62d93a..38bf0e1 100644
--- a/server/api/openchannelQueueReport/index.js
+++ b/server/api/openchannelQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb10b=['../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post','create','update','delete','exports','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service'];(function(_0x53874d,_0x522af1){var _0x391c4e=function(_0x48ad91){while(--_0x48ad91){_0x53874d['push'](_0x53874d['shift']());}};_0x391c4e(++_0x522af1);}(_0xb10b,0x12a));var _0xbb10=function(_0x4e707e,_0x208eb5){_0x4e707e=_0x4e707e-0x0;var _0x3d346e=_0xb10b[_0x4e707e];return _0x3d346e;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var auth=require(_0xbb10('0x4'));var interaction=require(_0xbb10('0x5'));var config=require(_0xbb10('0x6'));var controller=require(_0xbb10('0x7'));router[_0xbb10('0x8')]('/',auth[_0xbb10('0x9')](),controller['index']);router[_0xbb10('0x8')](_0xbb10('0xa'),auth['isAuthenticated'](),controller[_0xbb10('0xb')]);router[_0xbb10('0x8')](_0xbb10('0xc'),auth[_0xbb10('0x9')](),controller[_0xbb10('0xd')]);router[_0xbb10('0xe')]('/',auth[_0xbb10('0x9')](),controller[_0xbb10('0xf')]);router['put']('/:id',auth[_0xbb10('0x9')](),controller[_0xbb10('0x10')]);router[_0xbb10('0x11')]('/:id',auth[_0xbb10('0x9')](),controller['destroy']);module[_0xbb10('0x12')]=router;
\ No newline at end of file
+var _0xb10b=['../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post','create','update','delete','exports','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service'];(function(_0x37d4dd,_0x297bca){var _0xf37b53=function(_0x10b99a){while(--_0x10b99a){_0x37d4dd['push'](_0x37d4dd['shift']());}};_0xf37b53(++_0x297bca);}(_0xb10b,0x12a));var _0xbb10=function(_0x51227e,_0x21f277){_0x51227e=_0x51227e-0x0;var _0x457194=_0xb10b[_0x51227e];return _0x457194;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var auth=require(_0xbb10('0x4'));var interaction=require(_0xbb10('0x5'));var config=require(_0xbb10('0x6'));var controller=require(_0xbb10('0x7'));router[_0xbb10('0x8')]('/',auth[_0xbb10('0x9')](),controller['index']);router[_0xbb10('0x8')](_0xbb10('0xa'),auth['isAuthenticated'](),controller[_0xbb10('0xb')]);router[_0xbb10('0x8')](_0xbb10('0xc'),auth[_0xbb10('0x9')](),controller[_0xbb10('0xd')]);router[_0xbb10('0xe')]('/',auth[_0xbb10('0x9')](),controller[_0xbb10('0xf')]);router['put']('/:id',auth[_0xbb10('0x9')](),controller[_0xbb10('0x10')]);router[_0xbb10('0x11')]('/:id',auth[_0xbb10('0x9')](),controller['destroy']);module[_0xbb10('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js
index ec680bf..fa8182e 100644
--- a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js
+++ b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9a53=['DATE','exports','STRING'];(function(_0x3d78ff,_0x61865d){var _0x107a47=function(_0x4887c2){while(--_0x4887c2){_0x3d78ff['push'](_0x3d78ff['shift']());}};_0x107a47(++_0x61865d);}(_0x9a53,0x100));var _0x39a5=function(_0x42fa49,_0x78bebb){_0x42fa49=_0x42fa49-0x0;var _0x8354bf=_0x9a53[_0x42fa49];return _0x8354bf;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x39a5('0x0')]={'uniqueid':{'type':Sequelize[_0x39a5('0x1')],'allowNull':![]},'from':{'type':Sequelize[_0x39a5('0x1')]},'joinAt':{'type':Sequelize[_0x39a5('0x2')]},'leaveAt':{'type':Sequelize[_0x39a5('0x2')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb8bf=['DATE','moment','sequelize','STRING'];(function(_0x5b9896,_0x43df63){var _0x56d91f=function(_0x51c1a9){while(--_0x51c1a9){_0x5b9896['push'](_0x5b9896['shift']());}};_0x56d91f(++_0x43df63);}(_0xb8bf,0x1a5));var _0xfb8b=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xb8bf[_0x502c7d];return _0x30b7ed;};'use strict';var moment=require(_0xfb8b('0x0'));var Sequelize=require(_0xfb8b('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xfb8b('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xfb8b('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0xfb8b('0x3')]},'reason':{'type':Sequelize[_0xfb8b('0x2')]}};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js
index 157cac0..32edee9 100644
--- a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js
+++ b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x76a1=['querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/utils','../../config/environment','end','status','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','OpenchannelQueueReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','map','type','key','field','merge','includeAll','include','findAll','rows','catch','show','options','find','create','body','params','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','crypto','jsforce','desk.js'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x76a1,0x83));var _0x176a=function(_0x32da1c,_0x434f41){_0x32da1c=_0x32da1c-0x0;var _0x1a5849=_0x76a1[_0x32da1c];return _0x1a5849;};'use strict';var pdf=require(_0x176a('0x0'));var emlformat=require(_0x176a('0x1'));var rimraf=require(_0x176a('0x2'));var zipdir=require(_0x176a('0x3'));var jsonpatch=require(_0x176a('0x4'));var rp=require('request-promise');var moment=require(_0x176a('0x5'));var BPromise=require(_0x176a('0x6'));var Mustache=require(_0x176a('0x7'));var util=require('util');var path=require(_0x176a('0x8'));var sox=require(_0x176a('0x9'));var csv=require(_0x176a('0xa'));var ejs=require(_0x176a('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x176a('0xc'));var jsforce=require(_0x176a('0xd'));var deskjs=require(_0x176a('0xe'));var toCsv=require(_0x176a('0xa'));var querystring=require(_0x176a('0xf'));var Papa=require(_0x176a('0x10'));var Redis=require(_0x176a('0x11'));var authService=require(_0x176a('0x12'));var qs=require(_0x176a('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x176a('0x14'));var config=require(_0x176a('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x50d8e5,_0x777c60){_0x777c60=_0x777c60||0xcc;return function(_0x5ab257){if(_0x5ab257){return _0x50d8e5['sendStatus'](_0x777c60);}return _0x50d8e5['status'](_0x777c60)[_0x176a('0x16')]();};}function respondWithResult(_0x10d4bc,_0x2d8b35){_0x2d8b35=_0x2d8b35||0xc8;return function(_0x2b5cb8){if(_0x2b5cb8){return _0x10d4bc[_0x176a('0x17')](_0x2d8b35)['json'](_0x2b5cb8);}};}function respondWithFilteredResult(_0xd2d7b5,_0x10364e){return function(_0x3ccf29){if(_0x3ccf29){var _0x669ec8=_0x3ccf29[_0x176a('0x18')],_0x4e9b58=_0x10364e[_0x176a('0x19')],_0x309d1e=_0x10364e[_0x176a('0x19')]+_0x10364e['limit'],_0x58a5cb;if(_0x309d1e>=_0x669ec8){_0x309d1e=_0x669ec8;_0x58a5cb=0xc8;}else{_0x58a5cb=0xce;}_0xd2d7b5['status'](_0x58a5cb);return _0xd2d7b5[_0x176a('0x1a')](_0x176a('0x1b'),_0x4e9b58+'-'+_0x309d1e+'/'+_0x669ec8)[_0x176a('0x1c')](_0x3ccf29);}return null;};}function patchUpdates(_0x20f002){return function(_0x4a1810){try{jsonpatch[_0x176a('0x1d')](_0x4a1810,_0x20f002,!![]);}catch(_0x3c991e){return BPromise[_0x176a('0x1e')](_0x3c991e);}return _0x4a1810[_0x176a('0x1f')]();};}function saveUpdates(_0x34723d,_0x491461){return function(_0x423cee){if(_0x423cee){return _0x423cee[_0x176a('0x20')](_0x34723d)[_0x176a('0x21')](function(_0x3146ab){return _0x3146ab;});}return null;};}function removeEntity(_0x8824ed,_0x835572){return function(_0x5aa047){if(_0x5aa047){return _0x5aa047[_0x176a('0x22')]()[_0x176a('0x21')](function(){_0x8824ed[_0x176a('0x17')](0xcc)[_0x176a('0x16')]();});}};}function handleEntityNotFound(_0x2f2a3f,_0x4a2ebb){return function(_0x4337f9){if(!_0x4337f9){_0x2f2a3f['sendStatus'](0x194);}return _0x4337f9;};}function handleError(_0x59b1d9,_0x154a12){_0x154a12=_0x154a12||0x1f4;return function(_0x48bee4){logger[_0x176a('0x23')](_0x48bee4[_0x176a('0x24')]);if(_0x48bee4[_0x176a('0x25')]){delete _0x48bee4[_0x176a('0x25')];}_0x59b1d9[_0x176a('0x17')](_0x154a12)[_0x176a('0x26')](_0x48bee4);};}exports[_0x176a('0x27')]=function(_0x4f8f50,_0x14520d){var _0x359d2c={},_0x41b14c={},_0x512100={'count':0x0,'rows':[]};var _0x552889=db[_0x176a('0x28')][_0x176a('0x29')];_0x41b14c[_0x176a('0x2a')]=_[_0x176a('0x2b')](_0x552889);_0x41b14c['query']=_[_0x176a('0x2b')](_0x4f8f50[_0x176a('0x2c')]);_0x41b14c[_0x176a('0x2d')]=_[_0x176a('0x2e')](_0x41b14c[_0x176a('0x2a')],_0x41b14c[_0x176a('0x2c')]);_0x359d2c[_0x176a('0x2f')]=_['intersection'](_0x41b14c[_0x176a('0x2a')],qs[_0x176a('0x30')](_0x4f8f50[_0x176a('0x2c')][_0x176a('0x30')]));_0x359d2c[_0x176a('0x2f')]=_0x359d2c[_0x176a('0x2f')][_0x176a('0x31')]?_0x359d2c[_0x176a('0x2f')]:_0x41b14c[_0x176a('0x2a')];if(!_0x4f8f50['query'][_0x176a('0x32')](_0x176a('0x33'))){_0x359d2c[_0x176a('0x34')]=qs['limit'](_0x4f8f50[_0x176a('0x2c')][_0x176a('0x34')]);_0x359d2c[_0x176a('0x19')]=qs[_0x176a('0x19')](_0x4f8f50[_0x176a('0x2c')]['offset']);}_0x359d2c['order']=qs['sort'](_0x4f8f50[_0x176a('0x2c')][_0x176a('0x35')]);_0x359d2c[_0x176a('0x36')]=qs[_0x176a('0x2d')](_[_0x176a('0x37')](_0x4f8f50[_0x176a('0x2c')],_0x41b14c['filters']));if(_0x4f8f50[_0x176a('0x2c')][_0x176a('0x38')]){_0x359d2c['where']=_['merge'](_0x359d2c[_0x176a('0x36')],{'$or':_[_0x176a('0x39')](_0x552889,function(_0xe939c0){if(_0xe939c0[_0x176a('0x3a')][_0x176a('0x3b')]!=='VIRTUAL'){var _0x499f69={};_0x499f69[_0xe939c0[_0x176a('0x3c')]]={'$like':'%'+_0x4f8f50['query'][_0x176a('0x38')]+'%'};return _0x499f69;}})});}_0x359d2c=_[_0x176a('0x3d')]({},_0x359d2c,_0x4f8f50['options']);var _0x3e45cc={'where':_0x359d2c[_0x176a('0x36')]};return db[_0x176a('0x28')]['count'](_0x3e45cc)[_0x176a('0x21')](function(_0x1d519f){_0x512100['count']=_0x1d519f;if(_0x4f8f50['query'][_0x176a('0x3e')]){_0x359d2c[_0x176a('0x3f')]=[{'all':!![]}];}return db['OpenchannelQueueReport'][_0x176a('0x40')](_0x359d2c);})[_0x176a('0x21')](function(_0x15d6d8){_0x512100[_0x176a('0x41')]=_0x15d6d8;return _0x512100;})[_0x176a('0x21')](respondWithFilteredResult(_0x14520d,_0x359d2c))[_0x176a('0x42')](handleError(_0x14520d,null));};exports[_0x176a('0x43')]=function(_0x750014,_0x5811dd){var _0x50d544={'raw':!![],'where':{'id':_0x750014['params']['id']}},_0x129e1b={};_0x129e1b[_0x176a('0x2a')]=_[_0x176a('0x2b')](db[_0x176a('0x28')]['rawAttributes']);_0x129e1b[_0x176a('0x2c')]=_[_0x176a('0x2b')](_0x750014[_0x176a('0x2c')]);_0x129e1b[_0x176a('0x2d')]=_[_0x176a('0x2e')](_0x129e1b[_0x176a('0x2a')],_0x129e1b[_0x176a('0x2c')]);_0x50d544[_0x176a('0x2f')]=_[_0x176a('0x2e')](_0x129e1b['model'],qs[_0x176a('0x30')](_0x750014['query'][_0x176a('0x30')]));_0x50d544[_0x176a('0x2f')]=_0x50d544[_0x176a('0x2f')][_0x176a('0x31')]?_0x50d544[_0x176a('0x2f')]:_0x129e1b['model'];if(_0x750014[_0x176a('0x2c')][_0x176a('0x3e')]){_0x50d544['include']=[{'all':!![]}];}_0x50d544=_['merge']({},_0x50d544,_0x750014[_0x176a('0x44')]);return db['OpenchannelQueueReport'][_0x176a('0x45')](_0x50d544)['then'](handleEntityNotFound(_0x5811dd,null))[_0x176a('0x21')](respondWithResult(_0x5811dd,null))[_0x176a('0x42')](handleError(_0x5811dd,null));};exports[_0x176a('0x46')]=function(_0x17d3bc,_0x128304){return db[_0x176a('0x28')][_0x176a('0x46')](_0x17d3bc[_0x176a('0x47')],{})['then'](respondWithResult(_0x128304,0xc9))[_0x176a('0x42')](handleError(_0x128304,null));};exports[_0x176a('0x20')]=function(_0x40c0b4,_0x3cfec8){if(_0x40c0b4[_0x176a('0x47')]['id']){delete _0x40c0b4[_0x176a('0x47')]['id'];}return db[_0x176a('0x28')][_0x176a('0x45')]({'where':{'id':_0x40c0b4[_0x176a('0x48')]['id']}})[_0x176a('0x21')](handleEntityNotFound(_0x3cfec8,null))[_0x176a('0x21')](saveUpdates(_0x40c0b4['body'],null))[_0x176a('0x21')](respondWithResult(_0x3cfec8,null))[_0x176a('0x42')](handleError(_0x3cfec8,null));};exports['destroy']=function(_0x39f086,_0x238f4a){return db[_0x176a('0x28')][_0x176a('0x45')]({'where':{'id':_0x39f086[_0x176a('0x48')]['id']}})[_0x176a('0x21')](handleEntityNotFound(_0x238f4a,null))[_0x176a('0x21')](removeEntity(_0x238f4a,null))[_0x176a('0x42')](handleError(_0x238f4a,null));};exports['describe']=function(_0x3f58c2,_0x27723d){return db[_0x176a('0x28')]['describe']()['then'](respondWithResult(_0x27723d,null))[_0x176a('0x42')](handleError(_0x27723d,null));};
\ No newline at end of file
+var _0x59bb=['params','describe','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','../../components/auth/service','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','then','end','sendStatus','error','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','map','type','key','field','options','include','findAll','rows','catch','show','OpenchannelQueueReport','merge','create','body','find'];(function(_0x36d4a7,_0x7ebba1){var _0x3396d6=function(_0x5338f4){while(--_0x5338f4){_0x36d4a7['push'](_0x36d4a7['shift']());}};_0x3396d6(++_0x7ebba1);}(_0x59bb,0x1a6));var _0xb59b=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x59bb[_0x13d07a];return _0x5ee0ee;};'use strict';var pdf=require(_0xb59b('0x0'));var emlformat=require(_0xb59b('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xb59b('0x2'));var jsonpatch=require(_0xb59b('0x3'));var rp=require(_0xb59b('0x4'));var moment=require(_0xb59b('0x5'));var BPromise=require(_0xb59b('0x6'));var Mustache=require('mustache');var util=require(_0xb59b('0x7'));var path=require(_0xb59b('0x8'));var sox=require(_0xb59b('0x9'));var csv=require(_0xb59b('0xa'));var ejs=require(_0xb59b('0xb'));var fs=require('fs');var _=require(_0xb59b('0xc'));var squel=require('squel');var crypto=require(_0xb59b('0xd'));var jsforce=require(_0xb59b('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xb59b('0xa'));var querystring=require(_0xb59b('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xb59b('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xb59b('0x11'))(_0xb59b('0x12'));var utils=require(_0xb59b('0x13'));var config=require(_0xb59b('0x14'));var db=require(_0xb59b('0x15'))['db'];function respondWithStatusCode(_0x5cd513,_0x2e5e6b){_0x2e5e6b=_0x2e5e6b||0xcc;return function(_0x2dd77f){if(_0x2dd77f){return _0x5cd513['sendStatus'](_0x2e5e6b);}return _0x5cd513[_0xb59b('0x16')](_0x2e5e6b)['end']();};}function respondWithResult(_0x3d1ac9,_0x515893){_0x515893=_0x515893||0xc8;return function(_0x426549){if(_0x426549){return _0x3d1ac9[_0xb59b('0x16')](_0x515893)[_0xb59b('0x17')](_0x426549);}};}function respondWithFilteredResult(_0x3dcc15,_0x35db68){return function(_0x3472ef){if(_0x3472ef){var _0x25f9ac=_0x3472ef[_0xb59b('0x18')],_0x5b9bd6=_0x35db68[_0xb59b('0x19')],_0x8a7a4d=_0x35db68[_0xb59b('0x19')]+_0x35db68[_0xb59b('0x1a')],_0x2d7880;if(_0x8a7a4d>=_0x25f9ac){_0x8a7a4d=_0x25f9ac;_0x2d7880=0xc8;}else{_0x2d7880=0xce;}_0x3dcc15['status'](_0x2d7880);return _0x3dcc15[_0xb59b('0x1b')](_0xb59b('0x1c'),_0x5b9bd6+'-'+_0x8a7a4d+'/'+_0x25f9ac)['json'](_0x3472ef);}return null;};}function patchUpdates(_0x3832cf){return function(_0xd87553){try{jsonpatch[_0xb59b('0x1d')](_0xd87553,_0x3832cf,!![]);}catch(_0x1b590f){return BPromise[_0xb59b('0x1e')](_0x1b590f);}return _0xd87553['save']();};}function saveUpdates(_0x31acda,_0x2a3eee){return function(_0x2c8c5d){if(_0x2c8c5d){return _0x2c8c5d[_0xb59b('0x1f')](_0x31acda)['then'](function(_0x106596){return _0x106596;});}return null;};}function removeEntity(_0x272f1c,_0x6c9b81){return function(_0x55307d){if(_0x55307d){return _0x55307d[_0xb59b('0x20')]()[_0xb59b('0x21')](function(){_0x272f1c[_0xb59b('0x16')](0xcc)[_0xb59b('0x22')]();});}};}function handleEntityNotFound(_0x5ef2bc,_0x8f20d9){return function(_0x404891){if(!_0x404891){_0x5ef2bc[_0xb59b('0x23')](0x194);}return _0x404891;};}function handleError(_0x5d1ba1,_0x2d3578){_0x2d3578=_0x2d3578||0x1f4;return function(_0x8de324){logger[_0xb59b('0x24')](_0x8de324[_0xb59b('0x25')]);if(_0x8de324[_0xb59b('0x26')]){delete _0x8de324[_0xb59b('0x26')];}_0x5d1ba1[_0xb59b('0x16')](_0x2d3578)[_0xb59b('0x27')](_0x8de324);};}exports[_0xb59b('0x28')]=function(_0x418e2a,_0x37fc8c){var _0x181a4a={},_0x39f9d3={},_0x436518={'count':0x0,'rows':[]};var _0x5d8b1b=db['OpenchannelQueueReport'][_0xb59b('0x29')];_0x39f9d3[_0xb59b('0x2a')]=_[_0xb59b('0x2b')](_0x5d8b1b);_0x39f9d3[_0xb59b('0x2c')]=_['keys'](_0x418e2a[_0xb59b('0x2c')]);_0x39f9d3[_0xb59b('0x2d')]=_[_0xb59b('0x2e')](_0x39f9d3[_0xb59b('0x2a')],_0x39f9d3[_0xb59b('0x2c')]);_0x181a4a[_0xb59b('0x2f')]=_[_0xb59b('0x2e')](_0x39f9d3['model'],qs[_0xb59b('0x30')](_0x418e2a[_0xb59b('0x2c')]['fields']));_0x181a4a[_0xb59b('0x2f')]=_0x181a4a[_0xb59b('0x2f')][_0xb59b('0x31')]?_0x181a4a[_0xb59b('0x2f')]:_0x39f9d3[_0xb59b('0x2a')];if(!_0x418e2a[_0xb59b('0x2c')][_0xb59b('0x32')]('nolimit')){_0x181a4a[_0xb59b('0x1a')]=qs['limit'](_0x418e2a[_0xb59b('0x2c')][_0xb59b('0x1a')]);_0x181a4a[_0xb59b('0x19')]=qs['offset'](_0x418e2a[_0xb59b('0x2c')]['offset']);}_0x181a4a['order']=qs[_0xb59b('0x33')](_0x418e2a[_0xb59b('0x2c')][_0xb59b('0x33')]);_0x181a4a['where']=qs[_0xb59b('0x2d')](_['pick'](_0x418e2a[_0xb59b('0x2c')],_0x39f9d3[_0xb59b('0x2d')]));if(_0x418e2a[_0xb59b('0x2c')]['filter']){_0x181a4a[_0xb59b('0x34')]=_['merge'](_0x181a4a[_0xb59b('0x34')],{'$or':_[_0xb59b('0x35')](_0x5d8b1b,function(_0x3905d2){if(_0x3905d2[_0xb59b('0x36')][_0xb59b('0x37')]!=='VIRTUAL'){var _0x3da5c6={};_0x3da5c6[_0x3905d2[_0xb59b('0x38')]]={'$like':'%'+_0x418e2a['query']['filter']+'%'};return _0x3da5c6;}})});}_0x181a4a=_['merge']({},_0x181a4a,_0x418e2a[_0xb59b('0x39')]);var _0x2ca422={'where':_0x181a4a[_0xb59b('0x34')]};return db['OpenchannelQueueReport'][_0xb59b('0x18')](_0x2ca422)[_0xb59b('0x21')](function(_0x35e481){_0x436518[_0xb59b('0x18')]=_0x35e481;if(_0x418e2a['query']['includeAll']){_0x181a4a[_0xb59b('0x3a')]=[{'all':!![]}];}return db['OpenchannelQueueReport'][_0xb59b('0x3b')](_0x181a4a);})[_0xb59b('0x21')](function(_0x38d9ab){_0x436518[_0xb59b('0x3c')]=_0x38d9ab;return _0x436518;})['then'](respondWithFilteredResult(_0x37fc8c,_0x181a4a))[_0xb59b('0x3d')](handleError(_0x37fc8c,null));};exports[_0xb59b('0x3e')]=function(_0x122060,_0x3ba075){var _0x2e5f50={'raw':!![],'where':{'id':_0x122060['params']['id']}},_0x1539fc={};_0x1539fc[_0xb59b('0x2a')]=_[_0xb59b('0x2b')](db[_0xb59b('0x3f')][_0xb59b('0x29')]);_0x1539fc[_0xb59b('0x2c')]=_[_0xb59b('0x2b')](_0x122060['query']);_0x1539fc[_0xb59b('0x2d')]=_[_0xb59b('0x2e')](_0x1539fc[_0xb59b('0x2a')],_0x1539fc[_0xb59b('0x2c')]);_0x2e5f50[_0xb59b('0x2f')]=_['intersection'](_0x1539fc['model'],qs[_0xb59b('0x30')](_0x122060[_0xb59b('0x2c')]['fields']));_0x2e5f50[_0xb59b('0x2f')]=_0x2e5f50[_0xb59b('0x2f')][_0xb59b('0x31')]?_0x2e5f50['attributes']:_0x1539fc[_0xb59b('0x2a')];if(_0x122060[_0xb59b('0x2c')]['includeAll']){_0x2e5f50['include']=[{'all':!![]}];}_0x2e5f50=_[_0xb59b('0x40')]({},_0x2e5f50,_0x122060[_0xb59b('0x39')]);return db[_0xb59b('0x3f')]['find'](_0x2e5f50)[_0xb59b('0x21')](handleEntityNotFound(_0x3ba075,null))[_0xb59b('0x21')](respondWithResult(_0x3ba075,null))['catch'](handleError(_0x3ba075,null));};exports['create']=function(_0x17e071,_0x4ed040){return db['OpenchannelQueueReport'][_0xb59b('0x41')](_0x17e071[_0xb59b('0x42')],{})['then'](respondWithResult(_0x4ed040,0xc9))[_0xb59b('0x3d')](handleError(_0x4ed040,null));};exports[_0xb59b('0x1f')]=function(_0x581738,_0x5eb66b){if(_0x581738[_0xb59b('0x42')]['id']){delete _0x581738[_0xb59b('0x42')]['id'];}return db[_0xb59b('0x3f')][_0xb59b('0x43')]({'where':{'id':_0x581738['params']['id']}})[_0xb59b('0x21')](handleEntityNotFound(_0x5eb66b,null))[_0xb59b('0x21')](saveUpdates(_0x581738[_0xb59b('0x42')],null))['then'](respondWithResult(_0x5eb66b,null))[_0xb59b('0x3d')](handleError(_0x5eb66b,null));};exports['destroy']=function(_0x2c3e7a,_0x102d43){return db[_0xb59b('0x3f')][_0xb59b('0x43')]({'where':{'id':_0x2c3e7a[_0xb59b('0x44')]['id']}})[_0xb59b('0x21')](handleEntityNotFound(_0x102d43,null))['then'](removeEntity(_0x102d43,null))[_0xb59b('0x3d')](handleError(_0x102d43,null));};exports[_0xb59b('0x45')]=function(_0x59bc55,_0x24fdec){return db[_0xb59b('0x3f')][_0xb59b('0x45')]()['then'](respondWithResult(_0x24fdec,null))['catch'](handleError(_0x24fdec,null));};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.model.js b/server/api/openchannelQueueReport/openchannelQueueReport.model.js
index d7994bd..014e0b2 100644
--- a/server/api/openchannelQueueReport/openchannelQueueReport.model.js
+++ b/server/api/openchannelQueueReport/openchannelQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2dae=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','report_openchannel_queue','uniqueid','lodash'];(function(_0x5be200,_0x38ff47){var _0x2c8653=function(_0x437e37){while(--_0x437e37){_0x5be200['push'](_0x5be200['shift']());}};_0x2c8653(++_0x38ff47);}(_0x2dae,0xc3));var _0xe2da=function(_0x1057a3,_0x28d9b7){_0x1057a3=_0x1057a3-0x0;var _0x131cdb=_0x2dae[_0x1057a3];return _0x131cdb;};'use strict';var _=require(_0xe2da('0x0'));var util=require('util');var logger=require(_0xe2da('0x1'))(_0xe2da('0x2'));var moment=require(_0xe2da('0x3'));var BPromise=require(_0xe2da('0x4'));var rp=require(_0xe2da('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe2da('0x6'));var config=require(_0xe2da('0x7'));var attributes=require(_0xe2da('0x8'));module[_0xe2da('0x9')]=function(_0x523c60,_0x3e3e25){return _0x523c60[_0xe2da('0xa')](_0xe2da('0xb'),attributes,{'tableName':_0xe2da('0xc'),'paranoid':![],'indexes':[{'name':_0xe2da('0xd'),'fields':[_0xe2da('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa3e6=['define','report_openchannel_queue','uniqueid','lodash','../../config/logger','moment','bluebird','request-promise','rimraf','./openchannelQueueReport.attributes','exports'];(function(_0x503ffd,_0x8ecde){var _0x160437=function(_0x2d45dd){while(--_0x2d45dd){_0x503ffd['push'](_0x503ffd['shift']());}};_0x160437(++_0x8ecde);}(_0xa3e6,0xbe));var _0x6a3e=function(_0x194c7a,_0x1aad76){_0x194c7a=_0x194c7a-0x0;var _0x311ba4=_0xa3e6[_0x194c7a];return _0x311ba4;};'use strict';var _=require(_0x6a3e('0x0'));var util=require('util');var logger=require(_0x6a3e('0x1'))('api');var moment=require(_0x6a3e('0x2'));var BPromise=require(_0x6a3e('0x3'));var rp=require(_0x6a3e('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6a3e('0x5'));var config=require('../../config/environment');var attributes=require(_0x6a3e('0x6'));module[_0x6a3e('0x7')]=function(_0x1c7709,_0x315ed8){return _0x1c7709[_0x6a3e('0x8')]('OpenchannelQueueReport',attributes,{'tableName':_0x6a3e('0x9'),'paranoid':![],'indexes':[{'name':_0x6a3e('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js
index 73ebdf4..7ba80d6 100644
--- a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js
+++ b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x50c7=['randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','then','info','OpenchannelQueueReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateOpenchannelQueueReport','create','body','options','UpdateOpenchannelQueueReport','OpenchannelQueueReport','update','where','attributes','lodash','util','moment'];(function(_0x3a678a,_0x61219){var _0x3141a6=function(_0xe0aa21){while(--_0xe0aa21){_0x3a678a['push'](_0x3a678a['shift']());}};_0x3141a6(++_0x61219);}(_0x50c7,0x147));var _0x750c=function(_0x2135fc,_0x58eb56){_0x2135fc=_0x2135fc-0x0;var _0x326065=_0x50c7[_0x2135fc];return _0x326065;};'use strict';var _=require(_0x750c('0x0'));var util=require(_0x750c('0x1'));var moment=require(_0x750c('0x2'));var BPromise=require('bluebird');var rs=require(_0x750c('0x3'));var fs=require('fs');var Redis=require(_0x750c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x750c('0x5'));var logger=require(_0x750c('0x6'))('rpc');var config=require(_0x750c('0x7'));var jayson=require(_0x750c('0x8'));var client=jayson[_0x750c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3ff02b,_0x3cc234,_0x2dbf4c){return new BPromise(function(_0x49b33d,_0x4c0067){return client['request'](_0x3ff02b,_0x2dbf4c)[_0x750c('0xa')](function(_0x523995){logger[_0x750c('0xb')](_0x750c('0xc'),_0x3cc234,_0x750c('0xd'));logger[_0x750c('0xe')](_0x750c('0xf'),_0x3cc234,_0x750c('0xd'),JSON[_0x750c('0x10')](_0x523995));if(_0x523995[_0x750c('0x11')]){if(_0x523995[_0x750c('0x11')][_0x750c('0x12')]===0x1f4){logger[_0x750c('0x11')](_0x750c('0xc'),_0x3cc234,_0x523995[_0x750c('0x11')]['message']);return _0x4c0067(_0x523995['error']['message']);}logger['error']('OpenchannelQueueReport,\x20%s,\x20%s',_0x3cc234,_0x523995[_0x750c('0x11')][_0x750c('0x13')]);return _0x49b33d(_0x523995[_0x750c('0x11')][_0x750c('0x13')]);}else{logger[_0x750c('0xb')](_0x750c('0xc'),_0x3cc234,'request\x20sent');_0x49b33d(_0x523995[_0x750c('0x14')]['message']);}})['catch'](function(_0x30e3fc){logger[_0x750c('0x11')](_0x750c('0xc'),_0x3cc234,_0x30e3fc);_0x4c0067(_0x30e3fc);});});}exports[_0x750c('0x15')]=function(_0x37ebe){var _0x3c497e=this;return new Promise(function(_0x186f55,_0x4122bf){return db['OpenchannelQueueReport'][_0x750c('0x16')](_0x37ebe[_0x750c('0x17')],{'raw':_0x37ebe[_0x750c('0x18')]?_0x37ebe['options']['raw']===undefined?!![]:![]:!![]})[_0x750c('0xa')](function(_0x75ca06){logger['info']('CreateOpenchannelQueueReport',_0x37ebe);logger['debug'](_0x750c('0x15'),_0x37ebe,JSON[_0x750c('0x10')](_0x75ca06));_0x186f55(_0x75ca06);})['catch'](function(_0x42ef61){logger[_0x750c('0x11')](_0x750c('0x15'),_0x42ef61[_0x750c('0x13')],_0x37ebe);_0x4122bf(_0x3c497e[_0x750c('0x11')](0x1f4,_0x42ef61[_0x750c('0x13')]));});});};exports[_0x750c('0x19')]=function(_0x1b1ae0){var _0x196b43=this;return new Promise(function(_0x9a4f7a,_0x40bdf4){return db[_0x750c('0x1a')][_0x750c('0x1b')](_0x1b1ae0[_0x750c('0x17')],{'raw':_0x1b1ae0[_0x750c('0x18')]?_0x1b1ae0['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1b1ae0['options']?_0x1b1ae0[_0x750c('0x18')][_0x750c('0x1c')]||null:null,'attributes':_0x1b1ae0['options']?_0x1b1ae0[_0x750c('0x18')][_0x750c('0x1d')]||null:null,'limit':_0x1b1ae0[_0x750c('0x18')]?_0x1b1ae0['options']['limit']||null:null})['then'](function(_0x56e7db){logger['info']('UpdateOpenchannelQueueReport',_0x1b1ae0);logger[_0x750c('0xe')](_0x750c('0x19'),_0x1b1ae0,JSON[_0x750c('0x10')](_0x56e7db));_0x9a4f7a(_0x56e7db);})['catch'](function(_0x3bf128){logger[_0x750c('0x11')](_0x750c('0x19'),_0x3bf128['message'],_0x1b1ae0);_0x40bdf4(_0x196b43[_0x750c('0x11')](0x1f4,_0x3bf128[_0x750c('0x13')]));});});};
\ No newline at end of file
+var _0xc053=['debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','CreateOpenchannelQueueReport','create','body','options','stringify','catch','UpdateOpenchannelQueueReport','OpenchannelQueueReport','where','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','OpenchannelQueueReport,\x20%s,\x20%s','request\x20sent'];(function(_0x4623d8,_0x297475){var _0x46f3a1=function(_0x5d67c7){while(--_0x5d67c7){_0x4623d8['push'](_0x4623d8['shift']());}};_0x46f3a1(++_0x297475);}(_0xc053,0xbc));var _0x3c05=function(_0x1875af,_0x333049){_0x1875af=_0x1875af-0x0;var _0x1583af=_0xc053[_0x1875af];return _0x1583af;};'use strict';var _=require('lodash');var util=require(_0x3c05('0x0'));var moment=require('moment');var BPromise=require(_0x3c05('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3c05('0x2'));var db=require(_0x3c05('0x3'))['db'];var utils=require(_0x3c05('0x4'));var logger=require(_0x3c05('0x5'))(_0x3c05('0x6'));var config=require(_0x3c05('0x7'));var jayson=require(_0x3c05('0x8'));var client=jayson[_0x3c05('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2fcb31,_0x41479a,_0xa12ca){return new BPromise(function(_0x34c2f1,_0x15c505){return client[_0x3c05('0xa')](_0x2fcb31,_0xa12ca)[_0x3c05('0xb')](function(_0x35539e){logger[_0x3c05('0xc')](_0x3c05('0xd'),_0x41479a,_0x3c05('0xe'));logger[_0x3c05('0xf')](_0x3c05('0x10'),_0x41479a,'request\x20sent',JSON['stringify'](_0x35539e));if(_0x35539e[_0x3c05('0x11')]){if(_0x35539e[_0x3c05('0x11')][_0x3c05('0x12')]===0x1f4){logger[_0x3c05('0x11')](_0x3c05('0xd'),_0x41479a,_0x35539e['error'][_0x3c05('0x13')]);return _0x15c505(_0x35539e[_0x3c05('0x11')][_0x3c05('0x13')]);}logger[_0x3c05('0x11')](_0x3c05('0xd'),_0x41479a,_0x35539e[_0x3c05('0x11')][_0x3c05('0x13')]);return _0x34c2f1(_0x35539e['error']['message']);}else{logger[_0x3c05('0xc')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x41479a,_0x3c05('0xe'));_0x34c2f1(_0x35539e['result'][_0x3c05('0x13')]);}})['catch'](function(_0x4cb4af){logger[_0x3c05('0x11')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x41479a,_0x4cb4af);_0x15c505(_0x4cb4af);});});}exports[_0x3c05('0x14')]=function(_0x9a0d30){var _0x8f356e=this;return new Promise(function(_0x35ca02,_0x561697){return db['OpenchannelQueueReport'][_0x3c05('0x15')](_0x9a0d30[_0x3c05('0x16')],{'raw':_0x9a0d30[_0x3c05('0x17')]?_0x9a0d30[_0x3c05('0x17')]['raw']===undefined?!![]:![]:!![]})[_0x3c05('0xb')](function(_0x1f709c){logger['info']('CreateOpenchannelQueueReport',_0x9a0d30);logger['debug'](_0x3c05('0x14'),_0x9a0d30,JSON[_0x3c05('0x18')](_0x1f709c));_0x35ca02(_0x1f709c);})[_0x3c05('0x19')](function(_0x4e584c){logger[_0x3c05('0x11')](_0x3c05('0x14'),_0x4e584c[_0x3c05('0x13')],_0x9a0d30);_0x561697(_0x8f356e[_0x3c05('0x11')](0x1f4,_0x4e584c['message']));});});};exports[_0x3c05('0x1a')]=function(_0x594a67){var _0x31d909=this;return new Promise(function(_0x7fc7a9,_0x47d514){return db[_0x3c05('0x1b')]['update'](_0x594a67[_0x3c05('0x16')],{'raw':_0x594a67[_0x3c05('0x17')]?_0x594a67[_0x3c05('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x594a67[_0x3c05('0x17')]?_0x594a67[_0x3c05('0x17')][_0x3c05('0x1c')]||null:null,'attributes':_0x594a67[_0x3c05('0x17')]?_0x594a67[_0x3c05('0x17')]['attributes']||null:null,'limit':_0x594a67[_0x3c05('0x17')]?_0x594a67[_0x3c05('0x17')]['limit']||null:null})[_0x3c05('0xb')](function(_0x419fd2){logger[_0x3c05('0xc')](_0x3c05('0x1a'),_0x594a67);logger[_0x3c05('0xf')]('UpdateOpenchannelQueueReport',_0x594a67,JSON[_0x3c05('0x18')](_0x419fd2));_0x7fc7a9(_0x419fd2);})[_0x3c05('0x19')](function(_0x1919a){logger[_0x3c05('0x11')](_0x3c05('0x1a'),_0x1919a[_0x3c05('0x13')],_0x594a67);_0x47d514(_0x31d909[_0x3c05('0x11')](0x1f4,_0x1919a[_0x3c05('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/index.js b/server/api/openchannelTransferReport/index.js
index c979fd6..d830c1c 100644
--- a/server/api/openchannelTransferReport/index.js
+++ b/server/api/openchannelTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6a81=['get','isAuthenticated','/describe','describe','/:id','show','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelTransferReport.controller'];(function(_0x4bdf64,_0x3022b2){var _0x9a1a19=function(_0x4e551b){while(--_0x4e551b){_0x4bdf64['push'](_0x4bdf64['shift']());}};_0x9a1a19(++_0x3022b2);}(_0x6a81,0x1f0));var _0x16a8=function(_0x54d273,_0x535618){_0x54d273=_0x54d273-0x0;var _0x5108ad=_0x6a81[_0x54d273];return _0x5108ad;};'use strict';var multer=require(_0x16a8('0x0'));var util=require(_0x16a8('0x1'));var path=require(_0x16a8('0x2'));var timeout=require(_0x16a8('0x3'));var express=require(_0x16a8('0x4'));var router=express[_0x16a8('0x5')]();var auth=require(_0x16a8('0x6'));var interaction=require(_0x16a8('0x7'));var config=require(_0x16a8('0x8'));var controller=require(_0x16a8('0x9'));router[_0x16a8('0xa')]('/',auth[_0x16a8('0xb')](),controller['index']);router[_0x16a8('0xa')](_0x16a8('0xc'),auth['isAuthenticated'](),controller[_0x16a8('0xd')]);router[_0x16a8('0xa')](_0x16a8('0xe'),auth[_0x16a8('0xb')](),controller[_0x16a8('0xf')]);router['post']('/',auth['isAuthenticated'](),controller[_0x16a8('0x10')]);router[_0x16a8('0x11')](_0x16a8('0xe'),auth[_0x16a8('0xb')](),controller[_0x16a8('0x12')]);router[_0x16a8('0x13')](_0x16a8('0xe'),auth[_0x16a8('0xb')](),controller[_0x16a8('0x14')]);module[_0x16a8('0x15')]=router;
\ No newline at end of file
+var _0xadd5=['exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./openchannelTransferReport.controller','get','/describe','describe','/:id','isAuthenticated','show','post','put','update'];(function(_0x285f36,_0x231cd5){var _0x214328=function(_0x253d67){while(--_0x253d67){_0x285f36['push'](_0x285f36['shift']());}};_0x214328(++_0x231cd5);}(_0xadd5,0x19f));var _0x5add=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xadd5[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x5add('0x0'));var util=require(_0x5add('0x1'));var path=require('path');var timeout=require(_0x5add('0x2'));var express=require(_0x5add('0x3'));var router=express[_0x5add('0x4')]();var auth=require(_0x5add('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x5add('0x6'));var controller=require(_0x5add('0x7'));router[_0x5add('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x5add('0x8')](_0x5add('0x9'),auth['isAuthenticated'](),controller[_0x5add('0xa')]);router['get'](_0x5add('0xb'),auth[_0x5add('0xc')](),controller[_0x5add('0xd')]);router[_0x5add('0xe')]('/',auth[_0x5add('0xc')](),controller['create']);router[_0x5add('0xf')](_0x5add('0xb'),auth[_0x5add('0xc')](),controller[_0x5add('0x10')]);router['delete'](_0x5add('0xb'),auth[_0x5add('0xc')](),controller['destroy']);module[_0x5add('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js
index 72ea45b..56ebe0d 100644
--- a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js
+++ b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xecd6=['account','agent','queue','DATE','NOW','sequelize','exports'];(function(_0x3eb260,_0x5f0974){var _0x5bd6e5=function(_0x2184b6){while(--_0x2184b6){_0x3eb260['push'](_0x3eb260['shift']());}};_0x5bd6e5(++_0x5f0974);}(_0xecd6,0x155));var _0x6ecd=function(_0x2ef530,_0x534800){_0x2ef530=_0x2ef530-0x0;var _0x5579d0=_0xecd6[_0x2ef530];return _0x5579d0;};'use strict';var moment=require('moment');var Sequelize=require(_0x6ecd('0x0'));module[_0x6ecd('0x1')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x6ecd('0x2'),_0x6ecd('0x3'),_0x6ecd('0x4')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0x6ecd('0x5')],'allowNull':![],'defaultValue':Sequelize[_0x6ecd('0x6')]}};
\ No newline at end of file
+var _0x7358=['account','agent','queue','DATE','moment','sequelize','exports','STRING','ENUM'];(function(_0x3bbb9e,_0x3e8089){var _0x43fe65=function(_0x5f2f1d){while(--_0x5f2f1d){_0x3bbb9e['push'](_0x3bbb9e['shift']());}};_0x43fe65(++_0x3e8089);}(_0x7358,0x67));var _0x8735=function(_0x33d6c5,_0x3ea6b7){_0x33d6c5=_0x33d6c5-0x0;var _0x27c272=_0x7358[_0x33d6c5];return _0x27c272;};'use strict';var moment=require(_0x8735('0x0'));var Sequelize=require(_0x8735('0x1'));module[_0x8735('0x2')]={'uniqueid':{'type':Sequelize[_0x8735('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x8735('0x4')](_0x8735('0x5'),_0x8735('0x6'),_0x8735('0x7')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0x8735('0x8')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js
index 8b55175..6c82c41 100644
--- a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js
+++ b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x148a=['then','end','error','stack','name','send','index','OpenchannelTransferReport','rawAttributes','keys','query','filters','intersection','model','fields','attributes','order','sort','pick','merge','where','map','type','VIRTUAL','field','options','includeAll','include','rows','show','params','length','find','catch','body','describe','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy'];(function(_0x101378,_0x4ed054){var _0x338e41=function(_0x31eb4e){while(--_0x31eb4e){_0x101378['push'](_0x101378['shift']());}};_0x338e41(++_0x4ed054);}(_0x148a,0x182));var _0xa148=function(_0x48bbd8,_0x1514d8){_0x48bbd8=_0x48bbd8-0x0;var _0x372eae=_0x148a[_0x48bbd8];return _0x372eae;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xa148('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa148('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa148('0x2'));var moment=require(_0xa148('0x3'));var BPromise=require(_0xa148('0x4'));var Mustache=require(_0xa148('0x5'));var util=require(_0xa148('0x6'));var path=require(_0xa148('0x7'));var sox=require(_0xa148('0x8'));var csv=require(_0xa148('0x9'));var ejs=require(_0xa148('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa148('0xb'));var crypto=require(_0xa148('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xa148('0xd'));var toCsv=require(_0xa148('0x9'));var querystring=require('querystring');var Papa=require(_0xa148('0xe'));var Redis=require(_0xa148('0xf'));var authService=require(_0xa148('0x10'));var qs=require(_0xa148('0x11'));var hardwareService=require(_0xa148('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0xa148('0x13'));var config=require(_0xa148('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3b7298,_0x16911a){_0x16911a=_0x16911a||0xcc;return function(_0x5dce92){if(_0x5dce92){return _0x3b7298[_0xa148('0x15')](_0x16911a);}return _0x3b7298[_0xa148('0x16')](_0x16911a)['end']();};}function respondWithResult(_0x24968a,_0x40460c){_0x40460c=_0x40460c||0xc8;return function(_0x3090b6){if(_0x3090b6){return _0x24968a[_0xa148('0x16')](_0x40460c)[_0xa148('0x17')](_0x3090b6);}};}function respondWithFilteredResult(_0xbbfba4,_0x4cf840){return function(_0x23a336){if(_0x23a336){var _0x12aac6=_0x23a336[_0xa148('0x18')],_0x1d8235=_0x4cf840[_0xa148('0x19')],_0x5c6e69=_0x4cf840['offset']+_0x4cf840[_0xa148('0x1a')],_0x273e7d;if(_0x5c6e69>=_0x12aac6){_0x5c6e69=_0x12aac6;_0x273e7d=0xc8;}else{_0x273e7d=0xce;}_0xbbfba4[_0xa148('0x16')](_0x273e7d);return _0xbbfba4[_0xa148('0x1b')](_0xa148('0x1c'),_0x1d8235+'-'+_0x5c6e69+'/'+_0x12aac6)['json'](_0x23a336);}return null;};}function patchUpdates(_0x46d98f){return function(_0x48caa8){try{jsonpatch[_0xa148('0x1d')](_0x48caa8,_0x46d98f,!![]);}catch(_0x1f3f17){return BPromise[_0xa148('0x1e')](_0x1f3f17);}return _0x48caa8[_0xa148('0x1f')]();};}function saveUpdates(_0x133c18,_0x2ddc30){return function(_0x1c60ba){if(_0x1c60ba){return _0x1c60ba[_0xa148('0x20')](_0x133c18)['then'](function(_0xa6e389){return _0xa6e389;});}return null;};}function removeEntity(_0x4e7741,_0x181cd9){return function(_0x3efd73){if(_0x3efd73){return _0x3efd73[_0xa148('0x21')]()[_0xa148('0x22')](function(){_0x4e7741[_0xa148('0x16')](0xcc)[_0xa148('0x23')]();});}};}function handleEntityNotFound(_0xc6792d,_0x4b36e6){return function(_0x2fc827){if(!_0x2fc827){_0xc6792d['sendStatus'](0x194);}return _0x2fc827;};}function handleError(_0x1d73de,_0x108f9a){_0x108f9a=_0x108f9a||0x1f4;return function(_0x4ad046){logger[_0xa148('0x24')](_0x4ad046[_0xa148('0x25')]);if(_0x4ad046[_0xa148('0x26')]){delete _0x4ad046[_0xa148('0x26')];}_0x1d73de[_0xa148('0x16')](_0x108f9a)[_0xa148('0x27')](_0x4ad046);};}exports[_0xa148('0x28')]=function(_0x1178db,_0x5d42cd){var _0x67eaf={},_0x96a682={},_0x182d7e={'count':0x0,'rows':[]};var _0x9cf8b1=db[_0xa148('0x29')][_0xa148('0x2a')];_0x96a682['model']=_[_0xa148('0x2b')](_0x9cf8b1);_0x96a682[_0xa148('0x2c')]=_[_0xa148('0x2b')](_0x1178db['query']);_0x96a682[_0xa148('0x2d')]=_[_0xa148('0x2e')](_0x96a682['model'],_0x96a682[_0xa148('0x2c')]);_0x67eaf['attributes']=_[_0xa148('0x2e')](_0x96a682[_0xa148('0x2f')],qs[_0xa148('0x30')](_0x1178db['query'][_0xa148('0x30')]));_0x67eaf[_0xa148('0x31')]=_0x67eaf['attributes']['length']?_0x67eaf['attributes']:_0x96a682[_0xa148('0x2f')];if(!_0x1178db['query']['hasOwnProperty']('nolimit')){_0x67eaf[_0xa148('0x1a')]=qs[_0xa148('0x1a')](_0x1178db[_0xa148('0x2c')][_0xa148('0x1a')]);_0x67eaf['offset']=qs[_0xa148('0x19')](_0x1178db[_0xa148('0x2c')]['offset']);}_0x67eaf[_0xa148('0x32')]=qs[_0xa148('0x33')](_0x1178db['query'][_0xa148('0x33')]);_0x67eaf['where']=qs['filters'](_[_0xa148('0x34')](_0x1178db['query'],_0x96a682[_0xa148('0x2d')]));if(_0x1178db[_0xa148('0x2c')]['filter']){_0x67eaf['where']=_[_0xa148('0x35')](_0x67eaf[_0xa148('0x36')],{'$or':_[_0xa148('0x37')](_0x9cf8b1,function(_0x36eda8){if(_0x36eda8[_0xa148('0x38')]['key']!==_0xa148('0x39')){var _0x149cc9={};_0x149cc9[_0x36eda8[_0xa148('0x3a')]]={'$like':'%'+_0x1178db[_0xa148('0x2c')]['filter']+'%'};return _0x149cc9;}})});}_0x67eaf=_[_0xa148('0x35')]({},_0x67eaf,_0x1178db[_0xa148('0x3b')]);var _0x3f22={'where':_0x67eaf[_0xa148('0x36')]};return db['OpenchannelTransferReport'][_0xa148('0x18')](_0x3f22)[_0xa148('0x22')](function(_0x1a9d6d){_0x182d7e[_0xa148('0x18')]=_0x1a9d6d;if(_0x1178db[_0xa148('0x2c')][_0xa148('0x3c')]){_0x67eaf[_0xa148('0x3d')]=[{'all':!![]}];}return db[_0xa148('0x29')]['findAll'](_0x67eaf);})[_0xa148('0x22')](function(_0x176906){_0x182d7e[_0xa148('0x3e')]=_0x176906;return _0x182d7e;})[_0xa148('0x22')](respondWithFilteredResult(_0x5d42cd,_0x67eaf))['catch'](handleError(_0x5d42cd,null));};exports[_0xa148('0x3f')]=function(_0x2d718e,_0xebcbb1){var _0x3dc266={'raw':!![],'where':{'id':_0x2d718e[_0xa148('0x40')]['id']}},_0x40e4cc={};_0x40e4cc['model']=_['keys'](db[_0xa148('0x29')][_0xa148('0x2a')]);_0x40e4cc[_0xa148('0x2c')]=_[_0xa148('0x2b')](_0x2d718e[_0xa148('0x2c')]);_0x40e4cc[_0xa148('0x2d')]=_[_0xa148('0x2e')](_0x40e4cc[_0xa148('0x2f')],_0x40e4cc[_0xa148('0x2c')]);_0x3dc266[_0xa148('0x31')]=_[_0xa148('0x2e')](_0x40e4cc[_0xa148('0x2f')],qs[_0xa148('0x30')](_0x2d718e['query']['fields']));_0x3dc266['attributes']=_0x3dc266[_0xa148('0x31')][_0xa148('0x41')]?_0x3dc266['attributes']:_0x40e4cc[_0xa148('0x2f')];if(_0x2d718e['query'][_0xa148('0x3c')]){_0x3dc266['include']=[{'all':!![]}];}_0x3dc266=_['merge']({},_0x3dc266,_0x2d718e[_0xa148('0x3b')]);return db[_0xa148('0x29')][_0xa148('0x42')](_0x3dc266)['then'](handleEntityNotFound(_0xebcbb1,null))[_0xa148('0x22')](respondWithResult(_0xebcbb1,null))[_0xa148('0x43')](handleError(_0xebcbb1,null));};exports['create']=function(_0x1c18ff,_0x50fe99){return db[_0xa148('0x29')]['create'](_0x1c18ff[_0xa148('0x44')],{})[_0xa148('0x22')](respondWithResult(_0x50fe99,0xc9))[_0xa148('0x43')](handleError(_0x50fe99,null));};exports[_0xa148('0x20')]=function(_0x1988d7,_0x45f63e){if(_0x1988d7[_0xa148('0x44')]['id']){delete _0x1988d7[_0xa148('0x44')]['id'];}return db['OpenchannelTransferReport'][_0xa148('0x42')]({'where':{'id':_0x1988d7[_0xa148('0x40')]['id']}})[_0xa148('0x22')](handleEntityNotFound(_0x45f63e,null))['then'](saveUpdates(_0x1988d7[_0xa148('0x44')],null))[_0xa148('0x22')](respondWithResult(_0x45f63e,null))[_0xa148('0x43')](handleError(_0x45f63e,null));};exports['destroy']=function(_0x2dff77,_0x3645c4){return db[_0xa148('0x29')][_0xa148('0x42')]({'where':{'id':_0x2dff77[_0xa148('0x40')]['id']}})[_0xa148('0x22')](handleEntityNotFound(_0x3645c4,null))[_0xa148('0x22')](removeEntity(_0x3645c4,null))[_0xa148('0x43')](handleError(_0x3645c4,null));};exports[_0xa148('0x45')]=function(_0x2bf859,_0x4d7458){return db['OpenchannelTransferReport'][_0xa148('0x45')]()[_0xa148('0x22')](respondWithResult(_0x4d7458,null))[_0xa148('0x43')](handleError(_0x4d7458,null));};
\ No newline at end of file
+var _0x160d=['api','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','sendStatus','error','stack','name','send','index','model','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','key','VIRTUAL','field','OpenchannelTransferReport','includeAll','include','findAll','catch','params','filters','length','options','create','body','find','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','desk.js','ioredis','../../config/license/hardware','../../config/logger'];(function(_0x9501a,_0x15ae9b){var _0x9642fa=function(_0x5f14f1){while(--_0x5f14f1){_0x9501a['push'](_0x9501a['shift']());}};_0x9642fa(++_0x15ae9b);}(_0x160d,0x14f));var _0xd160=function(_0x4d063e,_0x38eb23){_0x4d063e=_0x4d063e-0x0;var _0x56de68=_0x160d[_0x4d063e];return _0x56de68;};'use strict';var pdf=require(_0xd160('0x0'));var emlformat=require(_0xd160('0x1'));var rimraf=require(_0xd160('0x2'));var zipdir=require(_0xd160('0x3'));var jsonpatch=require(_0xd160('0x4'));var rp=require(_0xd160('0x5'));var moment=require(_0xd160('0x6'));var BPromise=require(_0xd160('0x7'));var Mustache=require(_0xd160('0x8'));var util=require(_0xd160('0x9'));var path=require(_0xd160('0xa'));var sox=require(_0xd160('0xb'));var csv=require(_0xd160('0xc'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xd160('0xd'));var squel=require(_0xd160('0xe'));var crypto=require(_0xd160('0xf'));var jsforce=require('jsforce');var deskjs=require(_0xd160('0x10'));var toCsv=require(_0xd160('0xc'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xd160('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0xd160('0x12'));var logger=require(_0xd160('0x13'))(_0xd160('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xd160('0x15'))['db'];function respondWithStatusCode(_0x37fbeb,_0x580a40){_0x580a40=_0x580a40||0xcc;return function(_0x191afd){if(_0x191afd){return _0x37fbeb['sendStatus'](_0x580a40);}return _0x37fbeb[_0xd160('0x16')](_0x580a40)[_0xd160('0x17')]();};}function respondWithResult(_0x4548b7,_0x5f04b5){_0x5f04b5=_0x5f04b5||0xc8;return function(_0x462ed0){if(_0x462ed0){return _0x4548b7['status'](_0x5f04b5)[_0xd160('0x18')](_0x462ed0);}};}function respondWithFilteredResult(_0x13c5f4,_0x3ba818){return function(_0x5f4e98){if(_0x5f4e98){var _0x2e7757=_0x5f4e98[_0xd160('0x19')],_0x2c6bb1=_0x3ba818[_0xd160('0x1a')],_0x1c018c=_0x3ba818[_0xd160('0x1a')]+_0x3ba818[_0xd160('0x1b')],_0xd13898;if(_0x1c018c>=_0x2e7757){_0x1c018c=_0x2e7757;_0xd13898=0xc8;}else{_0xd13898=0xce;}_0x13c5f4[_0xd160('0x16')](_0xd13898);return _0x13c5f4[_0xd160('0x1c')](_0xd160('0x1d'),_0x2c6bb1+'-'+_0x1c018c+'/'+_0x2e7757)[_0xd160('0x18')](_0x5f4e98);}return null;};}function patchUpdates(_0x32ee83){return function(_0x22b596){try{jsonpatch[_0xd160('0x1e')](_0x22b596,_0x32ee83,!![]);}catch(_0x5edaaf){return BPromise[_0xd160('0x1f')](_0x5edaaf);}return _0x22b596['save']();};}function saveUpdates(_0x27b729,_0x4ea078){return function(_0x167c65){if(_0x167c65){return _0x167c65[_0xd160('0x20')](_0x27b729)[_0xd160('0x21')](function(_0x53f236){return _0x53f236;});}return null;};}function removeEntity(_0x59aab3,_0x5e2f70){return function(_0x4e25b3){if(_0x4e25b3){return _0x4e25b3[_0xd160('0x22')]()[_0xd160('0x21')](function(){_0x59aab3[_0xd160('0x16')](0xcc)[_0xd160('0x17')]();});}};}function handleEntityNotFound(_0x234ad7,_0x2a5fe8){return function(_0x284d95){if(!_0x284d95){_0x234ad7[_0xd160('0x23')](0x194);}return _0x284d95;};}function handleError(_0x113f17,_0x120ef5){_0x120ef5=_0x120ef5||0x1f4;return function(_0x5d82e5){logger[_0xd160('0x24')](_0x5d82e5[_0xd160('0x25')]);if(_0x5d82e5['name']){delete _0x5d82e5[_0xd160('0x26')];}_0x113f17['status'](_0x120ef5)[_0xd160('0x27')](_0x5d82e5);};}exports[_0xd160('0x28')]=function(_0x5f8e65,_0x4196cc){var _0x4da0e3={},_0x13c3f9={},_0x345486={'count':0x0,'rows':[]};var _0x3ebee1=db['OpenchannelTransferReport']['rawAttributes'];_0x13c3f9[_0xd160('0x29')]=_[_0xd160('0x2a')](_0x3ebee1);_0x13c3f9[_0xd160('0x2b')]=_['keys'](_0x5f8e65[_0xd160('0x2b')]);_0x13c3f9['filters']=_[_0xd160('0x2c')](_0x13c3f9[_0xd160('0x29')],_0x13c3f9[_0xd160('0x2b')]);_0x4da0e3[_0xd160('0x2d')]=_['intersection'](_0x13c3f9[_0xd160('0x29')],qs['fields'](_0x5f8e65[_0xd160('0x2b')][_0xd160('0x2e')]));_0x4da0e3[_0xd160('0x2d')]=_0x4da0e3[_0xd160('0x2d')]['length']?_0x4da0e3['attributes']:_0x13c3f9['model'];if(!_0x5f8e65[_0xd160('0x2b')][_0xd160('0x2f')](_0xd160('0x30'))){_0x4da0e3[_0xd160('0x1b')]=qs['limit'](_0x5f8e65['query']['limit']);_0x4da0e3[_0xd160('0x1a')]=qs['offset'](_0x5f8e65['query'][_0xd160('0x1a')]);}_0x4da0e3[_0xd160('0x31')]=qs['sort'](_0x5f8e65['query'][_0xd160('0x32')]);_0x4da0e3[_0xd160('0x33')]=qs['filters'](_['pick'](_0x5f8e65['query'],_0x13c3f9['filters']));if(_0x5f8e65[_0xd160('0x2b')][_0xd160('0x34')]){_0x4da0e3[_0xd160('0x33')]=_[_0xd160('0x35')](_0x4da0e3['where'],{'$or':_['map'](_0x3ebee1,function(_0x1e6bb2){if(_0x1e6bb2[_0xd160('0x36')][_0xd160('0x37')]!==_0xd160('0x38')){var _0x14353c={};_0x14353c[_0x1e6bb2[_0xd160('0x39')]]={'$like':'%'+_0x5f8e65[_0xd160('0x2b')][_0xd160('0x34')]+'%'};return _0x14353c;}})});}_0x4da0e3=_[_0xd160('0x35')]({},_0x4da0e3,_0x5f8e65['options']);var _0x2c0c94={'where':_0x4da0e3[_0xd160('0x33')]};return db[_0xd160('0x3a')][_0xd160('0x19')](_0x2c0c94)[_0xd160('0x21')](function(_0x14c62f){_0x345486[_0xd160('0x19')]=_0x14c62f;if(_0x5f8e65['query'][_0xd160('0x3b')]){_0x4da0e3[_0xd160('0x3c')]=[{'all':!![]}];}return db[_0xd160('0x3a')][_0xd160('0x3d')](_0x4da0e3);})[_0xd160('0x21')](function(_0x54a6b9){_0x345486['rows']=_0x54a6b9;return _0x345486;})['then'](respondWithFilteredResult(_0x4196cc,_0x4da0e3))[_0xd160('0x3e')](handleError(_0x4196cc,null));};exports['show']=function(_0x11adb4,_0x31aa7b){var _0x1b9c75={'raw':!![],'where':{'id':_0x11adb4[_0xd160('0x3f')]['id']}},_0x28a894={};_0x28a894[_0xd160('0x29')]=_[_0xd160('0x2a')](db['OpenchannelTransferReport']['rawAttributes']);_0x28a894[_0xd160('0x2b')]=_['keys'](_0x11adb4[_0xd160('0x2b')]);_0x28a894[_0xd160('0x40')]=_[_0xd160('0x2c')](_0x28a894[_0xd160('0x29')],_0x28a894[_0xd160('0x2b')]);_0x1b9c75[_0xd160('0x2d')]=_['intersection'](_0x28a894['model'],qs[_0xd160('0x2e')](_0x11adb4[_0xd160('0x2b')][_0xd160('0x2e')]));_0x1b9c75['attributes']=_0x1b9c75[_0xd160('0x2d')][_0xd160('0x41')]?_0x1b9c75[_0xd160('0x2d')]:_0x28a894['model'];if(_0x11adb4[_0xd160('0x2b')][_0xd160('0x3b')]){_0x1b9c75[_0xd160('0x3c')]=[{'all':!![]}];}_0x1b9c75=_[_0xd160('0x35')]({},_0x1b9c75,_0x11adb4[_0xd160('0x42')]);return db[_0xd160('0x3a')]['find'](_0x1b9c75)[_0xd160('0x21')](handleEntityNotFound(_0x31aa7b,null))[_0xd160('0x21')](respondWithResult(_0x31aa7b,null))[_0xd160('0x3e')](handleError(_0x31aa7b,null));};exports[_0xd160('0x43')]=function(_0x3677b4,_0x3b6774){return db[_0xd160('0x3a')]['create'](_0x3677b4[_0xd160('0x44')],{})[_0xd160('0x21')](respondWithResult(_0x3b6774,0xc9))['catch'](handleError(_0x3b6774,null));};exports[_0xd160('0x20')]=function(_0x17de85,_0x2569dc){if(_0x17de85[_0xd160('0x44')]['id']){delete _0x17de85[_0xd160('0x44')]['id'];}return db[_0xd160('0x3a')]['find']({'where':{'id':_0x17de85[_0xd160('0x3f')]['id']}})[_0xd160('0x21')](handleEntityNotFound(_0x2569dc,null))[_0xd160('0x21')](saveUpdates(_0x17de85[_0xd160('0x44')],null))[_0xd160('0x21')](respondWithResult(_0x2569dc,null))[_0xd160('0x3e')](handleError(_0x2569dc,null));};exports[_0xd160('0x22')]=function(_0x391f9b,_0x47fc6c){return db['OpenchannelTransferReport'][_0xd160('0x45')]({'where':{'id':_0x391f9b['params']['id']}})['then'](handleEntityNotFound(_0x47fc6c,null))['then'](removeEntity(_0x47fc6c,null))[_0xd160('0x3e')](handleError(_0x47fc6c,null));};exports[_0xd160('0x46')]=function(_0x136fb1,_0xea0339){return db['OpenchannelTransferReport'][_0xd160('0x46')]()[_0xd160('0x21')](respondWithResult(_0xea0339,null))['catch'](handleError(_0xea0339,null));};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.model.js b/server/api/openchannelTransferReport/openchannelTransferReport.model.js
index cd0989b..31183ee 100644
--- a/server/api/openchannelTransferReport/openchannelTransferReport.model.js
+++ b/server/api/openchannelTransferReport/openchannelTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xafdc=['rimraf','exports','define','OpenchannelTransferReport','uniqueid','lodash','util','api','moment','request-promise'];(function(_0x1a54b4,_0x52406d){var _0x562620=function(_0x58087c){while(--_0x58087c){_0x1a54b4['push'](_0x1a54b4['shift']());}};_0x562620(++_0x52406d);}(_0xafdc,0x163));var _0xcafd=function(_0x5c8579,_0xcba4a0){_0x5c8579=_0x5c8579-0x0;var _0x2a226e=_0xafdc[_0x5c8579];return _0x2a226e;};'use strict';var _=require(_0xcafd('0x0'));var util=require(_0xcafd('0x1'));var logger=require('../../config/logger')(_0xcafd('0x2'));var moment=require(_0xcafd('0x3'));var BPromise=require('bluebird');var rp=require(_0xcafd('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xcafd('0x5'));var config=require('../../config/environment');var attributes=require('./openchannelTransferReport.attributes');module[_0xcafd('0x6')]=function(_0x2db2aa,_0x48cd07){return _0x2db2aa[_0xcafd('0x7')](_0xcafd('0x8'),attributes,{'tableName':'report_openchannel_transfer','paranoid':![],'indexes':[{'name':_0xcafd('0x9'),'fields':[_0xcafd('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x02b2=['util','../../config/logger','request-promise','path','rimraf','../../config/environment','./openchannelTransferReport.attributes','exports','define','uniqueid','lodash'];(function(_0x32d01c,_0x26c32d){var _0x15f85d=function(_0x4da77b){while(--_0x4da77b){_0x32d01c['push'](_0x32d01c['shift']());}};_0x15f85d(++_0x26c32d);}(_0x02b2,0x13e));var _0x202b=function(_0x1af04a,_0x5aea9d){_0x1af04a=_0x1af04a-0x0;var _0x10b71d=_0x02b2[_0x1af04a];return _0x10b71d;};'use strict';var _=require(_0x202b('0x0'));var util=require(_0x202b('0x1'));var logger=require(_0x202b('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x202b('0x3'));var fs=require('fs');var path=require(_0x202b('0x4'));var rimraf=require(_0x202b('0x5'));var config=require(_0x202b('0x6'));var attributes=require(_0x202b('0x7'));module[_0x202b('0x8')]=function(_0x24706f,_0x46f7b4){return _0x24706f[_0x202b('0x9')]('OpenchannelTransferReport',attributes,{'tableName':'report_openchannel_transfer','paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x202b('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js
index c4f1854..4f1c896 100644
--- a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js
+++ b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x45ea=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','info','OpenchannelTransferReport,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird'];(function(_0x4a095e,_0x381cd5){var _0x10ef73=function(_0x1f6964){while(--_0x1f6964){_0x4a095e['push'](_0x4a095e['shift']());}};_0x10ef73(++_0x381cd5);}(_0x45ea,0x1f0));var _0xa45e=function(_0x1374de,_0x2ad059){_0x1374de=_0x1374de-0x0;var _0x2fc3d9=_0x45ea[_0x1374de];return _0x2fc3d9;};'use strict';var _=require(_0xa45e('0x0'));var util=require(_0xa45e('0x1'));var moment=require(_0xa45e('0x2'));var BPromise=require(_0xa45e('0x3'));var rs=require(_0xa45e('0x4'));var fs=require('fs');var Redis=require(_0xa45e('0x5'));var db=require(_0xa45e('0x6'))['db'];var utils=require(_0xa45e('0x7'));var logger=require(_0xa45e('0x8'))(_0xa45e('0x9'));var config=require(_0xa45e('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xa45e('0xb')][_0xa45e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x573ff8,_0x53dd85,_0x479cd8){return new BPromise(function(_0x40befe,_0x350f60){return client[_0xa45e('0xd')](_0x573ff8,_0x479cd8)[_0xa45e('0xe')](function(_0x2d73b0){logger['info']('OpenchannelTransferReport,\x20%s,\x20%s',_0x53dd85,_0xa45e('0xf'));logger[_0xa45e('0x10')](_0xa45e('0x11'),_0x53dd85,_0xa45e('0xf'),JSON['stringify'](_0x2d73b0));if(_0x2d73b0[_0xa45e('0x12')]){if(_0x2d73b0['error'][_0xa45e('0x13')]===0x1f4){logger[_0xa45e('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x53dd85,_0x2d73b0['error'][_0xa45e('0x14')]);return _0x350f60(_0x2d73b0['error'][_0xa45e('0x14')]);}logger['error']('OpenchannelTransferReport,\x20%s,\x20%s',_0x53dd85,_0x2d73b0['error'][_0xa45e('0x14')]);return _0x40befe(_0x2d73b0['error'][_0xa45e('0x14')]);}else{logger[_0xa45e('0x15')](_0xa45e('0x16'),_0x53dd85,_0xa45e('0xf'));_0x40befe(_0x2d73b0[_0xa45e('0x17')]['message']);}})[_0xa45e('0x18')](function(_0x1eeb1d){logger[_0xa45e('0x12')](_0xa45e('0x16'),_0x53dd85,_0x1eeb1d);_0x350f60(_0x1eeb1d);});});}
\ No newline at end of file
+var _0x0560=['jayson/promise','client','http','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','moment','bluebird','../../config/logger'];(function(_0x3e5d16,_0x5dfe46){var _0x651d93=function(_0x4f9e9f){while(--_0x4f9e9f){_0x3e5d16['push'](_0x3e5d16['shift']());}};_0x651d93(++_0x5dfe46);}(_0x0560,0x95));var _0x0056=function(_0x18fa05,_0x6c1259){_0x18fa05=_0x18fa05-0x0;var _0xbf04f3=_0x0560[_0x18fa05];return _0xbf04f3;};'use strict';var _=require(_0x0056('0x0'));var util=require('util');var moment=require(_0x0056('0x1'));var BPromise=require(_0x0056('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x0056('0x3'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0056('0x4'));var client=jayson[_0x0056('0x5')][_0x0056('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x59ae13,_0xfb0b6c,_0x28830c){return new BPromise(function(_0x98cce9,_0xd1dce){return client['request'](_0x59ae13,_0x28830c)[_0x0056('0x7')](function(_0x3196ce){logger[_0x0056('0x8')](_0x0056('0x9'),_0xfb0b6c,_0x0056('0xa'));logger[_0x0056('0xb')]('OpenchannelTransferReport,\x20%s,\x20%s,\x20%s',_0xfb0b6c,_0x0056('0xa'),JSON[_0x0056('0xc')](_0x3196ce));if(_0x3196ce[_0x0056('0xd')]){if(_0x3196ce[_0x0056('0xd')]['code']===0x1f4){logger[_0x0056('0xd')](_0x0056('0x9'),_0xfb0b6c,_0x3196ce[_0x0056('0xd')][_0x0056('0xe')]);return _0xd1dce(_0x3196ce[_0x0056('0xd')][_0x0056('0xe')]);}logger[_0x0056('0xd')](_0x0056('0x9'),_0xfb0b6c,_0x3196ce['error']['message']);return _0x98cce9(_0x3196ce['error'][_0x0056('0xe')]);}else{logger[_0x0056('0x8')](_0x0056('0x9'),_0xfb0b6c,_0x0056('0xa'));_0x98cce9(_0x3196ce[_0x0056('0xf')][_0x0056('0xe')]);}})[_0x0056('0x10')](function(_0x16176d){logger['error'](_0x0056('0x9'),_0xfb0b6c,_0x16176d);_0xd1dce(_0x16176d);});});}
\ No newline at end of file
diff --git a/server/api/pause/index.js b/server/api/pause/index.js
index 8d14d72..ebf7b73 100644
--- a/server/api/pause/index.js
+++ b/server/api/pause/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7d5a=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','./pause.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete'];(function(_0x4ca6a4,_0x5e9694){var _0x120555=function(_0x56888c){while(--_0x56888c){_0x4ca6a4['push'](_0x4ca6a4['shift']());}};_0x120555(++_0x5e9694);}(_0x7d5a,0x17b));var _0xa7d5=function(_0xcae16f,_0x10af35){_0xcae16f=_0xcae16f-0x0;var _0x3c73dc=_0x7d5a[_0xcae16f];return _0x3c73dc;};'use strict';var multer=require(_0xa7d5('0x0'));var util=require(_0xa7d5('0x1'));var path=require(_0xa7d5('0x2'));var timeout=require(_0xa7d5('0x3'));var express=require(_0xa7d5('0x4'));var router=express[_0xa7d5('0x5')]();var auth=require(_0xa7d5('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xa7d5('0x7'));router[_0xa7d5('0x8')]('/',auth[_0xa7d5('0x9')](),controller[_0xa7d5('0xa')]);router[_0xa7d5('0x8')](_0xa7d5('0xb'),auth['isAuthenticated'](),controller[_0xa7d5('0xc')]);router[_0xa7d5('0xd')]('/',auth[_0xa7d5('0x9')](),controller[_0xa7d5('0xe')]);router[_0xa7d5('0xf')](_0xa7d5('0xb'),auth[_0xa7d5('0x9')](),controller['update']);router[_0xa7d5('0x10')](_0xa7d5('0xb'),auth[_0xa7d5('0x9')](),controller['destroy']);module[_0xa7d5('0x11')]=router;
\ No newline at end of file
+var _0x876b=['isAuthenticated','/:id','show','post','create','update','delete','exports','path','connect-timeout','../../components/auth/service','../../components/interaction/service','./pause.controller','get'];(function(_0x21a469,_0x1335c0){var _0x2b173a=function(_0x1c1f65){while(--_0x1c1f65){_0x21a469['push'](_0x21a469['shift']());}};_0x2b173a(++_0x1335c0);}(_0x876b,0x1ba));var _0xb876=function(_0x2fa739,_0x5414de){_0x2fa739=_0x2fa739-0x0;var _0x3bd746=_0x876b[_0x2fa739];return _0x3bd746;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xb876('0x0'));var timeout=require(_0xb876('0x1'));var express=require('express');var router=express['Router']();var auth=require(_0xb876('0x2'));var interaction=require(_0xb876('0x3'));var config=require('../../config/environment');var controller=require(_0xb876('0x4'));router[_0xb876('0x5')]('/',auth[_0xb876('0x6')](),controller['index']);router[_0xb876('0x5')](_0xb876('0x7'),auth['isAuthenticated'](),controller[_0xb876('0x8')]);router[_0xb876('0x9')]('/',auth[_0xb876('0x6')](),controller[_0xb876('0xa')]);router['put'](_0xb876('0x7'),auth['isAuthenticated'](),controller[_0xb876('0xb')]);router[_0xb876('0xc')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xb876('0xd')]=router;
\ No newline at end of file
diff --git a/server/api/pause/pause.attributes.js b/server/api/pause/pause.attributes.js
index ed39176..210547f 100644
--- a/server/api/pause/pause.attributes.js
+++ b/server/api/pause/pause.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x883c=['name','STRING','exports'];(function(_0x364b32,_0x4dec35){var _0x3f3ea0=function(_0x1911a8){while(--_0x1911a8){_0x364b32['push'](_0x364b32['shift']());}};_0x3f3ea0(++_0x4dec35);}(_0x883c,0xdd));var _0xc883=function(_0x558980,_0x19bd71){_0x558980=_0x558980-0x0;var _0x3bbc70=_0x883c[_0x558980];return _0x3bbc70;};'use strict';var Sequelize=require('sequelize');module[_0xc883('0x0')]={'name':{'type':Sequelize['STRING'],'unique':_0xc883('0x1'),'allowNull':![]},'description':{'type':Sequelize[_0xc883('0x2')]}};
\ No newline at end of file
+var _0xb57c=['sequelize','exports','STRING','name'];(function(_0x56d146,_0x4ed855){var _0x931a6f=function(_0x4daad8){while(--_0x4daad8){_0x56d146['push'](_0x56d146['shift']());}};_0x931a6f(++_0x4ed855);}(_0xb57c,0x14c));var _0xcb57=function(_0x38e88d,_0x50f15f){_0x38e88d=_0x38e88d-0x0;var _0x373f38=_0xb57c[_0x38e88d];return _0x373f38;};'use strict';var Sequelize=require(_0xcb57('0x0'));module[_0xcb57('0x1')]={'name':{'type':Sequelize[_0xcb57('0x2')],'unique':_0xcb57('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0xcb57('0x2')]}};
\ No newline at end of file
diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js
index 4ce4439..df8b38e 100644
--- a/server/api/pause/pause.controller.js
+++ b/server/api/pause/pause.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','then','get','UserProfileResource','destroy','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','type','key','VIRTUAL','field','options','includeAll','include','Pause','rows','catch','show','params','merge','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','update','body','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js'];(function(_0x2fa057,_0x407d0d){var _0x1bb5d7=function(_0x27068f){while(--_0x27068f){_0x2fa057['push'](_0x2fa057['shift']());}};_0x1bb5d7(++_0x407d0d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x21aec3,_0x5c97e9){_0x21aec3=_0x21aec3-0x0;var _0x288bbc=_0xa9e0[_0x21aec3];return _0x288bbc;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x273d4d,_0x36471c){_0x36471c=_0x36471c||0xcc;return function(_0xd5b662){if(_0xd5b662){return _0x273d4d[_0x0a9e('0x13')](_0x36471c);}return _0x273d4d[_0x0a9e('0x14')](_0x36471c)[_0x0a9e('0x15')]();};}function respondWithResult(_0x5db4b0,_0x4283ce){_0x4283ce=_0x4283ce||0xc8;return function(_0x239b12){if(_0x239b12){return _0x5db4b0[_0x0a9e('0x14')](_0x4283ce)[_0x0a9e('0x16')](_0x239b12);}};}function respondWithFilteredResult(_0x44dcfd,_0x4d5611){return function(_0x52a03d){if(_0x52a03d){var _0x22dccb=_0x52a03d[_0x0a9e('0x17')],_0x5d0880=_0x4d5611[_0x0a9e('0x18')],_0x1985b6=_0x4d5611['offset']+_0x4d5611[_0x0a9e('0x19')],_0x519dfd;if(_0x1985b6>=_0x22dccb){_0x1985b6=_0x22dccb;_0x519dfd=0xc8;}else{_0x519dfd=0xce;}_0x44dcfd['status'](_0x519dfd);return _0x44dcfd[_0x0a9e('0x1a')](_0x0a9e('0x1b'),_0x5d0880+'-'+_0x1985b6+'/'+_0x22dccb)[_0x0a9e('0x16')](_0x52a03d);}return null;};}function patchUpdates(_0x205fd6){return function(_0x31b1ca){try{jsonpatch[_0x0a9e('0x1c')](_0x31b1ca,_0x205fd6,!![]);}catch(_0x530eb7){return BPromise[_0x0a9e('0x1d')](_0x530eb7);}return _0x31b1ca[_0x0a9e('0x1e')]();};}function saveUpdates(_0x112016,_0x1c696a){return function(_0x105080){if(_0x105080){return _0x105080['update'](_0x112016)[_0x0a9e('0x1f')](function(_0x155cce){return _0x155cce;});}return null;};}function removeEntity(_0x53682f,_0x20f109){return function(_0x5a09ef){if(_0x5a09ef){return _0x5a09ef['destroy']()[_0x0a9e('0x1f')](function(){var _0x432e56=_0x5a09ef[_0x0a9e('0x20')]({'plain':!![]});var _0x30bae6='Pauses';return db[_0x0a9e('0x21')][_0x0a9e('0x22')]({'where':{'type':_0x30bae6,'resourceId':_0x432e56['id']}})[_0x0a9e('0x1f')](function(){return _0x5a09ef;});})[_0x0a9e('0x1f')](function(){_0x53682f[_0x0a9e('0x14')](0xcc)[_0x0a9e('0x15')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x13')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x23')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x24')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x25')](_0x33161b);};}exports[_0x0a9e('0x26')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=db['Pause'][_0x0a9e('0x27')];_0x1538a4[_0x0a9e('0x28')]=_[_0x0a9e('0x29')](_0x14de77);_0x1538a4[_0x0a9e('0x2a')]=_['keys'](_0x25fba9[_0x0a9e('0x2a')]);_0x1538a4[_0x0a9e('0x2b')]=_[_0x0a9e('0x2c')](_0x1538a4[_0x0a9e('0x28')],_0x1538a4[_0x0a9e('0x2a')]);_0x140511[_0x0a9e('0x2d')]=_[_0x0a9e('0x2c')](_0x1538a4[_0x0a9e('0x28')],qs[_0x0a9e('0x2e')](_0x25fba9['query'][_0x0a9e('0x2e')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x2d')][_0x0a9e('0x2f')]?_0x140511[_0x0a9e('0x2d')]:_0x1538a4[_0x0a9e('0x28')];if(!_0x25fba9[_0x0a9e('0x2a')]['hasOwnProperty'](_0x0a9e('0x30'))){_0x140511[_0x0a9e('0x19')]=qs[_0x0a9e('0x19')](_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x19')]);_0x140511[_0x0a9e('0x18')]=qs[_0x0a9e('0x18')](_0x25fba9[_0x0a9e('0x2a')]['offset']);}_0x140511[_0x0a9e('0x31')]=qs['sort'](_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x32')]);_0x140511[_0x0a9e('0x33')]=qs[_0x0a9e('0x2b')](_['pick'](_0x25fba9[_0x0a9e('0x2a')],_0x1538a4[_0x0a9e('0x2b')]));if(_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x34')]){_0x140511['where']=_['merge'](_0x140511[_0x0a9e('0x33')],{'$or':_['map'](_0x14de77,function(_0x24936a){if(_0x24936a[_0x0a9e('0x35')][_0x0a9e('0x36')]!==_0x0a9e('0x37')){var _0x4f41ae={};_0x4f41ae[_0x24936a[_0x0a9e('0x38')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x34')]+'%'};return _0x4f41ae;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x39')]);var _0x1a180b={'where':_0x140511[_0x0a9e('0x33')]};return db['Pause']['count'](_0x1a180b)[_0x0a9e('0x1f')](function(_0x40d766){_0x11c3b6['count']=_0x40d766;if(_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x3a')]){_0x140511[_0x0a9e('0x3b')]=[{'all':!![]}];}return db[_0x0a9e('0x3c')]['findAll'](_0x140511);})['then'](function(_0x15e37d){_0x11c3b6[_0x0a9e('0x3d')]=_0x15e37d;return _0x11c3b6;})['then'](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x3e')](handleError(_0x14433c,null));};exports[_0x0a9e('0x3f')]=function(_0x1459bb,_0x5b4f5e){var _0x316c8f={'raw':!![],'where':{'id':_0x1459bb[_0x0a9e('0x40')]['id']}},_0x2cfea9={};_0x2cfea9[_0x0a9e('0x28')]=_[_0x0a9e('0x29')](db[_0x0a9e('0x3c')][_0x0a9e('0x27')]);_0x2cfea9[_0x0a9e('0x2a')]=_[_0x0a9e('0x29')](_0x1459bb[_0x0a9e('0x2a')]);_0x2cfea9[_0x0a9e('0x2b')]=_[_0x0a9e('0x2c')](_0x2cfea9[_0x0a9e('0x28')],_0x2cfea9[_0x0a9e('0x2a')]);_0x316c8f[_0x0a9e('0x2d')]=_['intersection'](_0x2cfea9['model'],qs[_0x0a9e('0x2e')](_0x1459bb[_0x0a9e('0x2a')][_0x0a9e('0x2e')]));_0x316c8f[_0x0a9e('0x2d')]=_0x316c8f[_0x0a9e('0x2d')][_0x0a9e('0x2f')]?_0x316c8f[_0x0a9e('0x2d')]:_0x2cfea9[_0x0a9e('0x28')];if(_0x1459bb[_0x0a9e('0x2a')][_0x0a9e('0x3a')]){_0x316c8f[_0x0a9e('0x3b')]=[{'all':!![]}];}_0x316c8f=_[_0x0a9e('0x41')]({},_0x316c8f,_0x1459bb['options']);return db[_0x0a9e('0x3c')][_0x0a9e('0x42')](_0x316c8f)[_0x0a9e('0x1f')](handleEntityNotFound(_0x5b4f5e,null))[_0x0a9e('0x1f')](respondWithResult(_0x5b4f5e,null))[_0x0a9e('0x3e')](handleError(_0x5b4f5e,null));};exports[_0x0a9e('0x43')]=function(_0x21eb86,_0x44dd99){return db['Pause'][_0x0a9e('0x43')](_0x21eb86['body'],{})[_0x0a9e('0x1f')](function(_0x476688){var _0x8d6dd1=_0x21eb86['user'][_0x0a9e('0x20')]({'plain':!![]});if(!_0x8d6dd1)throw new Error(_0x0a9e('0x44'));if(_0x8d6dd1[_0x0a9e('0x45')]===_0x0a9e('0x46')){var _0x45c845=_0x476688[_0x0a9e('0x20')]({'plain':!![]});var _0x45bf7f='Pauses';return db[_0x0a9e('0x47')][_0x0a9e('0x42')]({'where':{'name':_0x45bf7f,'userProfileId':_0x8d6dd1[_0x0a9e('0x48')]},'raw':!![]})[_0x0a9e('0x1f')](function(_0x409789){if(_0x409789&&_0x409789[_0x0a9e('0x49')]===0x0){return db[_0x0a9e('0x21')][_0x0a9e('0x43')]({'name':_0x45c845[_0x0a9e('0x24')],'resourceId':_0x45c845['id'],'type':_0x409789['name'],'sectionId':_0x409789['id']},{})[_0x0a9e('0x1f')](function(){return _0x476688;});}else{return _0x476688;}})[_0x0a9e('0x3e')](function(_0x4f7240){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4f7240);throw _0x4f7240;});}return _0x476688;})[_0x0a9e('0x1f')](respondWithResult(_0x44dd99,0xc9))[_0x0a9e('0x3e')](handleError(_0x44dd99,null));};exports[_0x0a9e('0x4a')]=function(_0x11545a,_0x61bb17){if(_0x11545a[_0x0a9e('0x4b')]['id']){delete _0x11545a[_0x0a9e('0x4b')]['id'];}return db[_0x0a9e('0x3c')]['find']({'where':{'id':_0x11545a['params']['id']}})['then'](handleEntityNotFound(_0x61bb17,null))[_0x0a9e('0x1f')](saveUpdates(_0x11545a[_0x0a9e('0x4b')],null))[_0x0a9e('0x1f')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));};exports[_0x0a9e('0x22')]=function(_0x161aa7,_0x53d113){return db['Pause'][_0x0a9e('0x42')]({'where':{'id':_0x161aa7['params']['id']}})[_0x0a9e('0x1f')](handleEntityNotFound(_0x53d113,null))['then'](removeEntity(_0x53d113,null))[_0x0a9e('0x3e')](handleError(_0x53d113,null));};
\ No newline at end of file
+var _0xa9e0=['papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','then','get','UserProfileResource','destroy','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','type','key','VIRTUAL','field','options','includeAll','include','Pause','rows','catch','show','params','merge','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','update','body','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js'];(function(_0x33f477,_0x52c51c){var _0x43e3ac=function(_0x3e0cb5){while(--_0x3e0cb5){_0x33f477['push'](_0x33f477['shift']());}};_0x43e3ac(++_0x52c51c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2d8fc2,_0x1c461d){_0x2d8fc2=_0x2d8fc2-0x0;var _0x3a9e53=_0xa9e0[_0x2d8fc2];return _0x3a9e53;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x273d4d,_0x36471c){_0x36471c=_0x36471c||0xcc;return function(_0xd5b662){if(_0xd5b662){return _0x273d4d[_0x0a9e('0x13')](_0x36471c);}return _0x273d4d[_0x0a9e('0x14')](_0x36471c)[_0x0a9e('0x15')]();};}function respondWithResult(_0x5db4b0,_0x4283ce){_0x4283ce=_0x4283ce||0xc8;return function(_0x239b12){if(_0x239b12){return _0x5db4b0[_0x0a9e('0x14')](_0x4283ce)[_0x0a9e('0x16')](_0x239b12);}};}function respondWithFilteredResult(_0x44dcfd,_0x4d5611){return function(_0x52a03d){if(_0x52a03d){var _0x22dccb=_0x52a03d[_0x0a9e('0x17')],_0x5d0880=_0x4d5611[_0x0a9e('0x18')],_0x1985b6=_0x4d5611['offset']+_0x4d5611[_0x0a9e('0x19')],_0x519dfd;if(_0x1985b6>=_0x22dccb){_0x1985b6=_0x22dccb;_0x519dfd=0xc8;}else{_0x519dfd=0xce;}_0x44dcfd['status'](_0x519dfd);return _0x44dcfd[_0x0a9e('0x1a')](_0x0a9e('0x1b'),_0x5d0880+'-'+_0x1985b6+'/'+_0x22dccb)[_0x0a9e('0x16')](_0x52a03d);}return null;};}function patchUpdates(_0x205fd6){return function(_0x31b1ca){try{jsonpatch[_0x0a9e('0x1c')](_0x31b1ca,_0x205fd6,!![]);}catch(_0x530eb7){return BPromise[_0x0a9e('0x1d')](_0x530eb7);}return _0x31b1ca[_0x0a9e('0x1e')]();};}function saveUpdates(_0x112016,_0x1c696a){return function(_0x105080){if(_0x105080){return _0x105080['update'](_0x112016)[_0x0a9e('0x1f')](function(_0x155cce){return _0x155cce;});}return null;};}function removeEntity(_0x53682f,_0x20f109){return function(_0x5a09ef){if(_0x5a09ef){return _0x5a09ef['destroy']()[_0x0a9e('0x1f')](function(){var _0x432e56=_0x5a09ef[_0x0a9e('0x20')]({'plain':!![]});var _0x30bae6='Pauses';return db[_0x0a9e('0x21')][_0x0a9e('0x22')]({'where':{'type':_0x30bae6,'resourceId':_0x432e56['id']}})[_0x0a9e('0x1f')](function(){return _0x5a09ef;});})[_0x0a9e('0x1f')](function(){_0x53682f[_0x0a9e('0x14')](0xcc)[_0x0a9e('0x15')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x13')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x23')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x24')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x25')](_0x33161b);};}exports[_0x0a9e('0x26')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=db['Pause'][_0x0a9e('0x27')];_0x1538a4[_0x0a9e('0x28')]=_[_0x0a9e('0x29')](_0x14de77);_0x1538a4[_0x0a9e('0x2a')]=_['keys'](_0x25fba9[_0x0a9e('0x2a')]);_0x1538a4[_0x0a9e('0x2b')]=_[_0x0a9e('0x2c')](_0x1538a4[_0x0a9e('0x28')],_0x1538a4[_0x0a9e('0x2a')]);_0x140511[_0x0a9e('0x2d')]=_[_0x0a9e('0x2c')](_0x1538a4[_0x0a9e('0x28')],qs[_0x0a9e('0x2e')](_0x25fba9['query'][_0x0a9e('0x2e')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x2d')][_0x0a9e('0x2f')]?_0x140511[_0x0a9e('0x2d')]:_0x1538a4[_0x0a9e('0x28')];if(!_0x25fba9[_0x0a9e('0x2a')]['hasOwnProperty'](_0x0a9e('0x30'))){_0x140511[_0x0a9e('0x19')]=qs[_0x0a9e('0x19')](_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x19')]);_0x140511[_0x0a9e('0x18')]=qs[_0x0a9e('0x18')](_0x25fba9[_0x0a9e('0x2a')]['offset']);}_0x140511[_0x0a9e('0x31')]=qs['sort'](_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x32')]);_0x140511[_0x0a9e('0x33')]=qs[_0x0a9e('0x2b')](_['pick'](_0x25fba9[_0x0a9e('0x2a')],_0x1538a4[_0x0a9e('0x2b')]));if(_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x34')]){_0x140511['where']=_['merge'](_0x140511[_0x0a9e('0x33')],{'$or':_['map'](_0x14de77,function(_0x24936a){if(_0x24936a[_0x0a9e('0x35')][_0x0a9e('0x36')]!==_0x0a9e('0x37')){var _0x4f41ae={};_0x4f41ae[_0x24936a[_0x0a9e('0x38')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x34')]+'%'};return _0x4f41ae;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x39')]);var _0x1a180b={'where':_0x140511[_0x0a9e('0x33')]};return db['Pause']['count'](_0x1a180b)[_0x0a9e('0x1f')](function(_0x40d766){_0x11c3b6['count']=_0x40d766;if(_0x25fba9[_0x0a9e('0x2a')][_0x0a9e('0x3a')]){_0x140511[_0x0a9e('0x3b')]=[{'all':!![]}];}return db[_0x0a9e('0x3c')]['findAll'](_0x140511);})['then'](function(_0x15e37d){_0x11c3b6[_0x0a9e('0x3d')]=_0x15e37d;return _0x11c3b6;})['then'](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x3e')](handleError(_0x14433c,null));};exports[_0x0a9e('0x3f')]=function(_0x1459bb,_0x5b4f5e){var _0x316c8f={'raw':!![],'where':{'id':_0x1459bb[_0x0a9e('0x40')]['id']}},_0x2cfea9={};_0x2cfea9[_0x0a9e('0x28')]=_[_0x0a9e('0x29')](db[_0x0a9e('0x3c')][_0x0a9e('0x27')]);_0x2cfea9[_0x0a9e('0x2a')]=_[_0x0a9e('0x29')](_0x1459bb[_0x0a9e('0x2a')]);_0x2cfea9[_0x0a9e('0x2b')]=_[_0x0a9e('0x2c')](_0x2cfea9[_0x0a9e('0x28')],_0x2cfea9[_0x0a9e('0x2a')]);_0x316c8f[_0x0a9e('0x2d')]=_['intersection'](_0x2cfea9['model'],qs[_0x0a9e('0x2e')](_0x1459bb[_0x0a9e('0x2a')][_0x0a9e('0x2e')]));_0x316c8f[_0x0a9e('0x2d')]=_0x316c8f[_0x0a9e('0x2d')][_0x0a9e('0x2f')]?_0x316c8f[_0x0a9e('0x2d')]:_0x2cfea9[_0x0a9e('0x28')];if(_0x1459bb[_0x0a9e('0x2a')][_0x0a9e('0x3a')]){_0x316c8f[_0x0a9e('0x3b')]=[{'all':!![]}];}_0x316c8f=_[_0x0a9e('0x41')]({},_0x316c8f,_0x1459bb['options']);return db[_0x0a9e('0x3c')][_0x0a9e('0x42')](_0x316c8f)[_0x0a9e('0x1f')](handleEntityNotFound(_0x5b4f5e,null))[_0x0a9e('0x1f')](respondWithResult(_0x5b4f5e,null))[_0x0a9e('0x3e')](handleError(_0x5b4f5e,null));};exports[_0x0a9e('0x43')]=function(_0x21eb86,_0x44dd99){return db['Pause'][_0x0a9e('0x43')](_0x21eb86['body'],{})[_0x0a9e('0x1f')](function(_0x476688){var _0x8d6dd1=_0x21eb86['user'][_0x0a9e('0x20')]({'plain':!![]});if(!_0x8d6dd1)throw new Error(_0x0a9e('0x44'));if(_0x8d6dd1[_0x0a9e('0x45')]===_0x0a9e('0x46')){var _0x45c845=_0x476688[_0x0a9e('0x20')]({'plain':!![]});var _0x45bf7f='Pauses';return db[_0x0a9e('0x47')][_0x0a9e('0x42')]({'where':{'name':_0x45bf7f,'userProfileId':_0x8d6dd1[_0x0a9e('0x48')]},'raw':!![]})[_0x0a9e('0x1f')](function(_0x409789){if(_0x409789&&_0x409789[_0x0a9e('0x49')]===0x0){return db[_0x0a9e('0x21')][_0x0a9e('0x43')]({'name':_0x45c845[_0x0a9e('0x24')],'resourceId':_0x45c845['id'],'type':_0x409789['name'],'sectionId':_0x409789['id']},{})[_0x0a9e('0x1f')](function(){return _0x476688;});}else{return _0x476688;}})[_0x0a9e('0x3e')](function(_0x4f7240){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4f7240);throw _0x4f7240;});}return _0x476688;})[_0x0a9e('0x1f')](respondWithResult(_0x44dd99,0xc9))[_0x0a9e('0x3e')](handleError(_0x44dd99,null));};exports[_0x0a9e('0x4a')]=function(_0x11545a,_0x61bb17){if(_0x11545a[_0x0a9e('0x4b')]['id']){delete _0x11545a[_0x0a9e('0x4b')]['id'];}return db[_0x0a9e('0x3c')]['find']({'where':{'id':_0x11545a['params']['id']}})['then'](handleEntityNotFound(_0x61bb17,null))[_0x0a9e('0x1f')](saveUpdates(_0x11545a[_0x0a9e('0x4b')],null))[_0x0a9e('0x1f')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));};exports[_0x0a9e('0x22')]=function(_0x161aa7,_0x53d113){return db['Pause'][_0x0a9e('0x42')]({'where':{'id':_0x161aa7['params']['id']}})[_0x0a9e('0x1f')](handleEntityNotFound(_0x53d113,null))['then'](removeEntity(_0x53d113,null))[_0x0a9e('0x3e')](handleError(_0x53d113,null));};
\ No newline at end of file
diff --git a/server/api/pause/pause.model.js b/server/api/pause/pause.model.js
index e968a3d..6b57d2e 100644
--- a/server/api/pause/pause.model.js
+++ b/server/api/pause/pause.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e5e=['moment','bluebird','path','rimraf','../../config/environment','./pause.attributes','exports','define','Pause','tools_pauses','../../config/logger'];(function(_0x2ba221,_0x5cd708){var _0x3f4595=function(_0x5ce259){while(--_0x5ce259){_0x2ba221['push'](_0x2ba221['shift']());}};_0x3f4595(++_0x5cd708);}(_0x3e5e,0x112));var _0xe3e5=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x3e5e[_0x122ef9];return _0x42fba0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xe3e5('0x0'))('api');var moment=require(_0xe3e5('0x1'));var BPromise=require(_0xe3e5('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe3e5('0x3'));var rimraf=require(_0xe3e5('0x4'));var config=require(_0xe3e5('0x5'));var attributes=require(_0xe3e5('0x6'));module[_0xe3e5('0x7')]=function(_0x23a082,_0x2fdba6){return _0x23a082[_0xe3e5('0x8')](_0xe3e5('0x9'),attributes,{'tableName':_0xe3e5('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb1c3=['./pause.attributes','exports','tools_pauses','lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb1c3,0x14d));var _0x3b1c=function(_0x2b48a0,_0x173153){_0x2b48a0=_0x2b48a0-0x0;var _0x5c1015=_0xb1c3[_0x2b48a0];return _0x5c1015;};'use strict';var _=require(_0x3b1c('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x3b1c('0x1'));var moment=require(_0x3b1c('0x2'));var BPromise=require(_0x3b1c('0x3'));var rp=require(_0x3b1c('0x4'));var fs=require('fs');var path=require(_0x3b1c('0x5'));var rimraf=require(_0x3b1c('0x6'));var config=require(_0x3b1c('0x7'));var attributes=require(_0x3b1c('0x8'));module[_0x3b1c('0x9')]=function(_0x246c66,_0xb43c8d){return _0x246c66['define']('Pause',attributes,{'tableName':_0x3b1c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/pause/pause.rpc.js b/server/api/pause/pause.rpc.js
index 02dc48c..231919a 100644
--- a/server/api/pause/pause.rpc.js
+++ b/server/api/pause/pause.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x82a2=['where','attributes','include','map','model','ShowPause','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','then','Pause,\x20%s,\x20%s','debug','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','catch','Pause','find','options','raw'];(function(_0x18b215,_0x3b9491){var _0x4c669d=function(_0x102b29){while(--_0x102b29){_0x18b215['push'](_0x18b215['shift']());}};_0x4c669d(++_0x3b9491);}(_0x82a2,0x17a));var _0x282a=function(_0x3f9b66,_0x403abb){_0x3f9b66=_0x3f9b66-0x0;var _0x33cb92=_0x82a2[_0x3f9b66];return _0x33cb92;};'use strict';var _=require(_0x282a('0x0'));var util=require('util');var moment=require(_0x282a('0x1'));var BPromise=require(_0x282a('0x2'));var rs=require(_0x282a('0x3'));var fs=require('fs');var Redis=require(_0x282a('0x4'));var db=require(_0x282a('0x5'))['db'];var utils=require(_0x282a('0x6'));var logger=require(_0x282a('0x7'))(_0x282a('0x8'));var config=require(_0x282a('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x282a('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x7bc1b5,_0x4ebdce,_0x48e7f4){return new BPromise(function(_0x161255,_0x369baa){return client['request'](_0x7bc1b5,_0x48e7f4)[_0x282a('0xb')](function(_0x303821){logger['info'](_0x282a('0xc'),_0x4ebdce,'request\x20sent');logger[_0x282a('0xd')](_0x282a('0xe'),_0x4ebdce,_0x282a('0xf'),JSON[_0x282a('0x10')](_0x303821));if(_0x303821[_0x282a('0x11')]){if(_0x303821[_0x282a('0x11')]['code']===0x1f4){logger[_0x282a('0x11')]('Pause,\x20%s,\x20%s',_0x4ebdce,_0x303821[_0x282a('0x11')][_0x282a('0x12')]);return _0x369baa(_0x303821[_0x282a('0x11')][_0x282a('0x12')]);}logger[_0x282a('0x11')](_0x282a('0xc'),_0x4ebdce,_0x303821[_0x282a('0x11')][_0x282a('0x12')]);return _0x161255(_0x303821[_0x282a('0x11')]['message']);}else{logger[_0x282a('0x13')]('Pause,\x20%s,\x20%s',_0x4ebdce,_0x282a('0xf'));_0x161255(_0x303821['result'][_0x282a('0x12')]);}})[_0x282a('0x14')](function(_0x242e64){logger[_0x282a('0x11')](_0x282a('0xc'),_0x4ebdce,_0x242e64);_0x369baa(_0x242e64);});});}exports['ShowPause']=function(_0xecb400){var _0x555eb6=this;return new Promise(function(_0x3b9375,_0xda8d92){return db[_0x282a('0x15')][_0x282a('0x16')]({'raw':_0xecb400[_0x282a('0x17')]?_0xecb400[_0x282a('0x17')][_0x282a('0x18')]===undefined?!![]:![]:!![],'where':_0xecb400[_0x282a('0x17')]?_0xecb400['options'][_0x282a('0x19')]||null:null,'attributes':_0xecb400[_0x282a('0x17')]?_0xecb400[_0x282a('0x17')][_0x282a('0x1a')]||null:null,'include':_0xecb400[_0x282a('0x17')]?_0xecb400[_0x282a('0x17')][_0x282a('0x1b')]?_[_0x282a('0x1c')](_0xecb400[_0x282a('0x17')][_0x282a('0x1b')],function(_0x367cbf){return{'model':db[_0x367cbf[_0x282a('0x1d')]],'as':_0x367cbf['as'],'attributes':_0x367cbf[_0x282a('0x1a')],'include':_0x367cbf['include']?_[_0x282a('0x1c')](_0x367cbf[_0x282a('0x1b')],function(_0x2fbef9){return{'model':db[_0x2fbef9[_0x282a('0x1d')]],'as':_0x2fbef9['as'],'attributes':_0x2fbef9[_0x282a('0x1a')],'include':_0x2fbef9['include']?_[_0x282a('0x1c')](_0x2fbef9[_0x282a('0x1b')],function(_0x264e3c){return{'model':db[_0x264e3c['model']],'as':_0x264e3c['as'],'attributes':_0x264e3c[_0x282a('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x282a('0xb')](function(_0x33e66e){logger['info'](_0x282a('0x1e'),_0xecb400);logger['debug'](_0x282a('0x1e'),_0xecb400,JSON[_0x282a('0x10')](_0x33e66e));_0x3b9375(_0x33e66e);})[_0x282a('0x14')](function(_0x27e51a){logger['error'](_0x282a('0x1e'),_0x27e51a[_0x282a('0x12')],_0xecb400);_0xda8d92(_0x555eb6[_0x282a('0x11')](0x1f4,_0x27e51a[_0x282a('0x12')]));});});};
\ No newline at end of file
+var _0xa1f1=['moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','Pause,\x20%s,\x20%s','request\x20sent','Pause,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowPause','options','raw','where','attributes','include','model','map','then','util'];(function(_0xc3d6c5,_0x7bd8b3){var _0x104925=function(_0x5f198e){while(--_0x5f198e){_0xc3d6c5['push'](_0xc3d6c5['shift']());}};_0x104925(++_0x7bd8b3);}(_0xa1f1,0x7b));var _0x1a1f=function(_0xe39824,_0xbdf61f){_0xe39824=_0xe39824-0x0;var _0x4bc31e=_0xa1f1[_0xe39824];return _0x4bc31e;};'use strict';var _=require('lodash');var util=require(_0x1a1f('0x0'));var moment=require(_0x1a1f('0x1'));var BPromise=require(_0x1a1f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1a1f('0x3'))['db'];var utils=require(_0x1a1f('0x4'));var logger=require(_0x1a1f('0x5'))(_0x1a1f('0x6'));var config=require(_0x1a1f('0x7'));var jayson=require(_0x1a1f('0x8'));var client=jayson[_0x1a1f('0x9')][_0x1a1f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x187398,_0x3ec84e,_0x536442){return new BPromise(function(_0x1e608b,_0x8ecdd3){return client[_0x1a1f('0xb')](_0x187398,_0x536442)['then'](function(_0x42c485){logger[_0x1a1f('0xc')](_0x1a1f('0xd'),_0x3ec84e,_0x1a1f('0xe'));logger['debug'](_0x1a1f('0xf'),_0x3ec84e,_0x1a1f('0xe'),JSON[_0x1a1f('0x10')](_0x42c485));if(_0x42c485[_0x1a1f('0x11')]){if(_0x42c485[_0x1a1f('0x11')][_0x1a1f('0x12')]===0x1f4){logger[_0x1a1f('0x11')]('Pause,\x20%s,\x20%s',_0x3ec84e,_0x42c485[_0x1a1f('0x11')][_0x1a1f('0x13')]);return _0x8ecdd3(_0x42c485[_0x1a1f('0x11')][_0x1a1f('0x13')]);}logger[_0x1a1f('0x11')](_0x1a1f('0xd'),_0x3ec84e,_0x42c485[_0x1a1f('0x11')][_0x1a1f('0x13')]);return _0x1e608b(_0x42c485[_0x1a1f('0x11')][_0x1a1f('0x13')]);}else{logger['info'](_0x1a1f('0xd'),_0x3ec84e,_0x1a1f('0xe'));_0x1e608b(_0x42c485[_0x1a1f('0x14')][_0x1a1f('0x13')]);}})[_0x1a1f('0x15')](function(_0x1f878d){logger['error']('Pause,\x20%s,\x20%s',_0x3ec84e,_0x1f878d);_0x8ecdd3(_0x1f878d);});});}exports[_0x1a1f('0x16')]=function(_0x44d4b8){var _0x593d42=this;return new Promise(function(_0x65398b,_0x1a0bb9){return db['Pause']['find']({'raw':_0x44d4b8[_0x1a1f('0x17')]?_0x44d4b8[_0x1a1f('0x17')][_0x1a1f('0x18')]===undefined?!![]:![]:!![],'where':_0x44d4b8[_0x1a1f('0x17')]?_0x44d4b8['options'][_0x1a1f('0x19')]||null:null,'attributes':_0x44d4b8[_0x1a1f('0x17')]?_0x44d4b8[_0x1a1f('0x17')][_0x1a1f('0x1a')]||null:null,'include':_0x44d4b8['options']?_0x44d4b8[_0x1a1f('0x17')][_0x1a1f('0x1b')]?_['map'](_0x44d4b8[_0x1a1f('0x17')][_0x1a1f('0x1b')],function(_0x469176){return{'model':db[_0x469176[_0x1a1f('0x1c')]],'as':_0x469176['as'],'attributes':_0x469176['attributes'],'include':_0x469176[_0x1a1f('0x1b')]?_['map'](_0x469176[_0x1a1f('0x1b')],function(_0x39c629){return{'model':db[_0x39c629[_0x1a1f('0x1c')]],'as':_0x39c629['as'],'attributes':_0x39c629[_0x1a1f('0x1a')],'include':_0x39c629[_0x1a1f('0x1b')]?_[_0x1a1f('0x1d')](_0x39c629['include'],function(_0x418e71){return{'model':db[_0x418e71[_0x1a1f('0x1c')]],'as':_0x418e71['as'],'attributes':_0x418e71[_0x1a1f('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x1a1f('0x1e')](function(_0x21f5ba){logger[_0x1a1f('0xc')]('ShowPause',_0x44d4b8);logger['debug'](_0x1a1f('0x16'),_0x44d4b8,JSON[_0x1a1f('0x10')](_0x21f5ba));_0x65398b(_0x21f5ba);})[_0x1a1f('0x15')](function(_0x4e1012){logger[_0x1a1f('0x11')](_0x1a1f('0x16'),_0x4e1012['message'],_0x44d4b8);_0x1a0bb9(_0x593d42['error'](0x1f4,_0x4e1012[_0x1a1f('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/plugin/index.js b/server/api/plugin/index.js
index e667489..c77e9aa 100644
--- a/server/api/plugin/index.js
+++ b/server/api/plugin/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6cd2=['util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','isAuthenticated','index','/webhook','webhookGet','/:id','download','diskStorage','root','server/files/plugins','originalname','replace','format','%s-%s%s','extname','now','single','upload','post','put','update','delete','exports','multer'];(function(_0x2f5270,_0x51ed0d){var _0x1af773=function(_0x5491e5){while(--_0x5491e5){_0x2f5270['push'](_0x2f5270['shift']());}};_0x1af773(++_0x51ed0d);}(_0x6cd2,0xdf));var _0x26cd=function(_0x179860,_0x16c510){_0x179860=_0x179860-0x0;var _0x3b9daa=_0x6cd2[_0x179860];return _0x3b9daa;};'use strict';var multer=require(_0x26cd('0x0'));var util=require(_0x26cd('0x1'));var path=require(_0x26cd('0x2'));var timeout=require(_0x26cd('0x3'));var express=require('express');var router=express[_0x26cd('0x4')]();var auth=require(_0x26cd('0x5'));var interaction=require(_0x26cd('0x6'));var config=require(_0x26cd('0x7'));var controller=require(_0x26cd('0x8'));router[_0x26cd('0x9')]('/',auth[_0x26cd('0xa')](),controller[_0x26cd('0xb')]);router['get'](_0x26cd('0xc'),controller[_0x26cd('0xd')]);router[_0x26cd('0x9')](_0x26cd('0xe'),auth[_0x26cd('0xa')](),controller['show']);router[_0x26cd('0x9')]('/:id/download',auth[_0x26cd('0xa')](),controller[_0x26cd('0xf')]);var upload=multer({'storage':multer[_0x26cd('0x10')]({'destination':function(_0x50c34e,_0x4e0961,_0x3e9196){_0x3e9196(null,path['join'](config[_0x26cd('0x11')],_0x26cd('0x12')));},'filename':function(_0x540d9e,_0x776789,_0x4edee8){_0x776789[_0x26cd('0x13')]=_0x776789[_0x26cd('0x13')][_0x26cd('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4edee8(null,util[_0x26cd('0x15')](_0x26cd('0x16'),path['basename'](_0x776789['originalname'],path[_0x26cd('0x17')](_0x776789['originalname'])),Date[_0x26cd('0x18')](),path[_0x26cd('0x17')](_0x776789[_0x26cd('0x13')])));}})});router['post']('/',upload[_0x26cd('0x19')]('file'),controller[_0x26cd('0x1a')]);router[_0x26cd('0x1b')](_0x26cd('0xc'),controller['webhookPost']);router[_0x26cd('0x1c')](_0x26cd('0xe'),auth[_0x26cd('0xa')](),controller[_0x26cd('0x1d')]);router['delete'](_0x26cd('0xe'),auth[_0x26cd('0xa')](),controller[_0x26cd('0x1e')]);module[_0x26cd('0x1f')]=router;
\ No newline at end of file
+var _0xe151=['webhookGet','isAuthenticated','download','diskStorage','root','server/files/plugins','replace','format','basename','originalname','extname','now','post','single','file','upload','/webhook','put','/:id','update','delete','multer','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./plugin.controller','get'];(function(_0x189d3c,_0x5efebf){var _0x485959=function(_0x1161da){while(--_0x1161da){_0x189d3c['push'](_0x189d3c['shift']());}};_0x485959(++_0x5efebf);}(_0xe151,0x154));var _0x1e15=function(_0x4df7be,_0x174cea){_0x4df7be=_0x4df7be-0x0;var _0x3c15a4=_0xe151[_0x4df7be];return _0x3c15a4;};'use strict';var multer=require(_0x1e15('0x0'));var util=require(_0x1e15('0x1'));var path=require('path');var timeout=require(_0x1e15('0x2'));var express=require(_0x1e15('0x3'));var router=express['Router']();var auth=require(_0x1e15('0x4'));var interaction=require(_0x1e15('0x5'));var config=require('../../config/environment');var controller=require(_0x1e15('0x6'));router[_0x1e15('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x1e15('0x7')]('/webhook',controller[_0x1e15('0x8')]);router[_0x1e15('0x7')]('/:id',auth[_0x1e15('0x9')](),controller['show']);router['get']('/:id/download',auth['isAuthenticated'](),controller[_0x1e15('0xa')]);var upload=multer({'storage':multer[_0x1e15('0xb')]({'destination':function(_0x35cd21,_0x36e83a,_0x4b8e0e){_0x4b8e0e(null,path['join'](config[_0x1e15('0xc')],_0x1e15('0xd')));},'filename':function(_0x1a06a3,_0x351f87,_0x5974e8){_0x351f87['originalname']=_0x351f87['originalname'][_0x1e15('0xe')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5974e8(null,util[_0x1e15('0xf')]('%s-%s%s',path[_0x1e15('0x10')](_0x351f87[_0x1e15('0x11')],path[_0x1e15('0x12')](_0x351f87[_0x1e15('0x11')])),Date[_0x1e15('0x13')](),path[_0x1e15('0x12')](_0x351f87[_0x1e15('0x11')])));}})});router[_0x1e15('0x14')]('/',upload[_0x1e15('0x15')](_0x1e15('0x16')),controller[_0x1e15('0x17')]);router[_0x1e15('0x14')](_0x1e15('0x18'),controller['webhookPost']);router[_0x1e15('0x19')](_0x1e15('0x1a'),auth['isAuthenticated'](),controller[_0x1e15('0x1b')]);router[_0x1e15('0x1c')](_0x1e15('0x1a'),auth[_0x1e15('0x9')](),controller[_0x1e15('0x1c')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/plugin/plugin.attributes.js b/server/api/plugin/plugin.attributes.js
index ae150e5..42efe4a 100644
--- a/server/api/plugin/plugin.attributes.js
+++ b/server/api/plugin/plugin.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x06c5=['script','TEXT','BOOLEAN','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','agentOnly','never','sequelize','exports','STRING','ENUM'];(function(_0xdbdad3,_0x1b6c75){var _0x369550=function(_0x5f18c7){while(--_0x5f18c7){_0xdbdad3['push'](_0xdbdad3['shift']());}};_0x369550(++_0x1b6c75);}(_0x06c5,0x88));var _0x506c=function(_0x2639f0,_0xd1bd53){_0x2639f0=_0x2639f0-0x0;var _0x3b92ff=_0x06c5[_0x2639f0];return _0x3b92ff;};'use strict';var Sequelize=require(_0x506c('0x0'));module[_0x506c('0x1')]={'name':{'type':Sequelize[_0x506c('0x2')]},'type':{'type':Sequelize[_0x506c('0x3')]('html',_0x506c('0x4'))},'description':{'type':Sequelize[_0x506c('0x5')]},'version':{'type':Sequelize[_0x506c('0x5')]},'path':{'type':Sequelize['STRING'],'comment':'The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.'},'active':{'type':Sequelize[_0x506c('0x6')],'defaultValue':0x0,'comment':_0x506c('0x7')},'sidebar':{'type':Sequelize['ENUM']('adminOnly',_0x506c('0x8'),'always',_0x506c('0x9')),'defaultValue':'always','comment':'Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.'},'icon':{'type':Sequelize[_0x506c('0x2')]},'adminUrl':{'type':Sequelize[_0x506c('0x2')]},'agentUrl':{'type':Sequelize[_0x506c('0x2')]},'scriptName':{'type':Sequelize['STRING']},'scriptPath':{'type':Sequelize[_0x506c('0x2')]}};
\ No newline at end of file
+var _0x23b4=['always','never','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','exports','STRING','script','TEXT','The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','BOOLEAN','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','adminOnly'];(function(_0x344f01,_0x2815ee){var _0x92719a=function(_0xf2560c){while(--_0xf2560c){_0x344f01['push'](_0x344f01['shift']());}};_0x92719a(++_0x2815ee);}(_0x23b4,0x16e));var _0x423b=function(_0x57b740,_0x3a8814){_0x57b740=_0x57b740-0x0;var _0x576e93=_0x23b4[_0x57b740];return _0x576e93;};'use strict';var Sequelize=require('sequelize');module[_0x423b('0x0')]={'name':{'type':Sequelize[_0x423b('0x1')]},'type':{'type':Sequelize['ENUM']('html',_0x423b('0x2'))},'description':{'type':Sequelize[_0x423b('0x3')]},'version':{'type':Sequelize[_0x423b('0x3')]},'path':{'type':Sequelize[_0x423b('0x1')],'comment':_0x423b('0x4')},'active':{'type':Sequelize[_0x423b('0x5')],'defaultValue':0x0,'comment':_0x423b('0x6')},'sidebar':{'type':Sequelize['ENUM'](_0x423b('0x7'),'agentOnly',_0x423b('0x8'),_0x423b('0x9')),'defaultValue':_0x423b('0x8'),'comment':_0x423b('0xa')},'icon':{'type':Sequelize['STRING']},'adminUrl':{'type':Sequelize[_0x423b('0x1')]},'agentUrl':{'type':Sequelize['STRING']},'scriptName':{'type':Sequelize[_0x423b('0x1')]},'scriptPath':{'type':Sequelize[_0x423b('0x1')]}};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.controller.js b/server/api/plugin/plugin.controller.js
index 6f17bd3..d5a9715 100644
--- a/server/api/plugin/plugin.controller.js
+++ b/server/api/plugin/plugin.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc5a8=['ejs','squel','querystring','papaparse','extract-zip','archiver','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','defaults','redis','localhost','./plugin.socket','register','status','end','json','offset','set','Content-Range','apply','reject','save','update','destroy','UserProfileResource','then','sendStatus','name','index','Plugin','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','map','type','key','field','options','count','includeAll','include','rows','show','params','find','download','path','join','server/files/plugins','format','%s.zip','basename','createWriteStream','zip','warning','error','Sequelize','Error\x20while\x20generating\x20the\x20zip\x20archive','Error','pipe','root','dirname','node_modules/**/*','attachments/**/*','finalize','close','existsSync','Plugin\x20not\x20found','Error\x20while\x20downloading\x20the\x20plugin','unlinkSync','info','Download\x20completed','Temporary\x20file\x20removed','file','filename','0777','readdirSync','lstatSync','Invalid\x20plugin\x20structure','isDirectory','readFileSync','manifest.json','parse','undefined','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','Invalid\x20manifest:\x20parameters\x20missing','html','parameters','Invalid\x20manifest:\x20views\x20missing','views','admin','agent','Invalid\x20manifest:\x20script\x20name\x20missing','Invalid\x20manifest:\x20script\x20path\x20missing','description','always','icon','icon-apps','test','plugins','Warning:\x20admin\x20view\x20not\x20specified','Warning:\x20agent\x20view\x20not\x20specified','script','scriptName','scriptPath','create','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','get','Plugins','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','catch','send','Extracted\x20folder\x20removed','delete','webhookGet','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','http://localhost:','encoding','method','%s%s','headers','content-length','content-type','endsWith','statusCode','webhookPost','port','eml-format','rimraf','request-promise','moment','bluebird','util','sox','to-csv'];(function(_0xb0957,_0x2c5863){var _0x38454c=function(_0x21789b){while(--_0x21789b){_0xb0957['push'](_0xb0957['shift']());}};_0x38454c(++_0x2c5863);}(_0xc5a8,0x1db));var _0x8c5a=function(_0x270e00,_0x47de93){_0x270e00=_0x270e00-0x0;var _0x914a73=_0xc5a8[_0x270e00];return _0x914a73;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x8c5a('0x0'));var rimraf=require(_0x8c5a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x8c5a('0x2'));var moment=require(_0x8c5a('0x3'));var BPromise=require(_0x8c5a('0x4'));var Mustache=require('mustache');var util=require(_0x8c5a('0x5'));var path=require('path');var sox=require(_0x8c5a('0x6'));var csv=require(_0x8c5a('0x7'));var ejs=require(_0x8c5a('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x8c5a('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x8c5a('0x7'));var querystring=require(_0x8c5a('0xa'));var Papa=require(_0x8c5a('0xb'));var extract=require(_0x8c5a('0xc'));var rimraf=require(_0x8c5a('0x1'));var archiver=require(_0x8c5a('0xd'));var Redis=require(_0x8c5a('0xe'));var authService=require(_0x8c5a('0xf'));var qs=require(_0x8c5a('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x8c5a('0x11'));var utils=require(_0x8c5a('0x12'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x8c5a('0x13')](config[_0x8c5a('0x14')],{'host':_0x8c5a('0x15'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8c5a('0x14')]));require(_0x8c5a('0x16'))[_0x8c5a('0x17')](socket);function respondWithStatusCode(_0x19157c,_0x5aaf93){_0x5aaf93=_0x5aaf93||0xcc;return function(_0x2145cf){if(_0x2145cf){return _0x19157c['sendStatus'](_0x5aaf93);}return _0x19157c[_0x8c5a('0x18')](_0x5aaf93)[_0x8c5a('0x19')]();};}function respondWithResult(_0x160cf3,_0x53eaba){_0x53eaba=_0x53eaba||0xc8;return function(_0x3ca6d6){if(_0x3ca6d6){return _0x160cf3['status'](_0x53eaba)[_0x8c5a('0x1a')](_0x3ca6d6);}};}function respondWithFilteredResult(_0x3b37dd,_0x5ebeff){return function(_0xf9f40d){if(_0xf9f40d){var _0x29cdfe=_0xf9f40d['count'],_0x23367d=_0x5ebeff[_0x8c5a('0x1b')],_0x120445=_0x5ebeff[_0x8c5a('0x1b')]+_0x5ebeff['limit'],_0x465c7c;if(_0x120445>=_0x29cdfe){_0x120445=_0x29cdfe;_0x465c7c=0xc8;}else{_0x465c7c=0xce;}_0x3b37dd[_0x8c5a('0x18')](_0x465c7c);return _0x3b37dd[_0x8c5a('0x1c')](_0x8c5a('0x1d'),_0x23367d+'-'+_0x120445+'/'+_0x29cdfe)['json'](_0xf9f40d);}return null;};}function patchUpdates(_0x9e5600){return function(_0x6019f0){try{jsonpatch[_0x8c5a('0x1e')](_0x6019f0,_0x9e5600,!![]);}catch(_0x56b70a){return BPromise[_0x8c5a('0x1f')](_0x56b70a);}return _0x6019f0[_0x8c5a('0x20')]();};}function saveUpdates(_0x317b5f,_0x38408a){return function(_0x28d159){if(_0x28d159){return _0x28d159[_0x8c5a('0x21')](_0x317b5f)['then'](function(_0x4fe626){return _0x4fe626;});}return null;};}function removeEntity(_0x25b954,_0x1015e5){return function(_0x1c2cad){if(_0x1c2cad){return _0x1c2cad[_0x8c5a('0x22')]()['then'](function(){var _0x37d011=_0x1c2cad['get']({'plain':!![]});var _0x465f74='Plugins';return db[_0x8c5a('0x23')][_0x8c5a('0x22')]({'where':{'type':_0x465f74,'resourceId':_0x37d011['id']}})[_0x8c5a('0x24')](function(){return _0x1c2cad;});})[_0x8c5a('0x24')](function(){_0x25b954[_0x8c5a('0x18')](0xcc)[_0x8c5a('0x19')]();});}};}function handleEntityNotFound(_0x16267d,_0x3a23ab){return function(_0x482133){if(!_0x482133){_0x16267d[_0x8c5a('0x25')](0x194);}return _0x482133;};}function handleError(_0x3cae58,_0x5c03b5){_0x5c03b5=_0x5c03b5||0x1f4;return function(_0x2004d0){logger['error'](_0x2004d0['stack']);if(_0x2004d0[_0x8c5a('0x26')]){delete _0x2004d0[_0x8c5a('0x26')];}_0x3cae58[_0x8c5a('0x18')](_0x5c03b5)['send'](_0x2004d0);};}exports[_0x8c5a('0x27')]=function(_0x1c2803,_0xfd5688){var _0x3471b1={},_0x4b67a9={},_0x3fd9ca={'count':0x0,'rows':[]};var _0x3dfb7f=db[_0x8c5a('0x28')][_0x8c5a('0x29')];_0x4b67a9[_0x8c5a('0x2a')]=_['keys'](_0x3dfb7f);_0x4b67a9[_0x8c5a('0x2b')]=_[_0x8c5a('0x2c')](_0x1c2803[_0x8c5a('0x2b')]);_0x4b67a9[_0x8c5a('0x2d')]=_[_0x8c5a('0x2e')](_0x4b67a9[_0x8c5a('0x2a')],_0x4b67a9['query']);_0x3471b1[_0x8c5a('0x2f')]=_['intersection'](_0x4b67a9['model'],qs[_0x8c5a('0x30')](_0x1c2803['query'][_0x8c5a('0x30')]));_0x3471b1[_0x8c5a('0x2f')]=_0x3471b1[_0x8c5a('0x2f')][_0x8c5a('0x31')]?_0x3471b1[_0x8c5a('0x2f')]:_0x4b67a9[_0x8c5a('0x2a')];if(!_0x1c2803['query'][_0x8c5a('0x32')](_0x8c5a('0x33'))){_0x3471b1[_0x8c5a('0x34')]=qs[_0x8c5a('0x34')](_0x1c2803[_0x8c5a('0x2b')]['limit']);_0x3471b1[_0x8c5a('0x1b')]=qs['offset'](_0x1c2803[_0x8c5a('0x2b')]['offset']);}_0x3471b1['order']=qs[_0x8c5a('0x35')](_0x1c2803[_0x8c5a('0x2b')]['sort']);_0x3471b1[_0x8c5a('0x36')]=qs['filters'](_[_0x8c5a('0x37')](_0x1c2803['query'],_0x4b67a9['filters']));if(_0x1c2803[_0x8c5a('0x2b')][_0x8c5a('0x38')]){_0x3471b1[_0x8c5a('0x36')]=_[_0x8c5a('0x39')](_0x3471b1['where'],{'$or':_[_0x8c5a('0x3a')](_0x3dfb7f,function(_0x1a7574){if(_0x1a7574[_0x8c5a('0x3b')][_0x8c5a('0x3c')]!=='VIRTUAL'){var _0x1baf82={};_0x1baf82[_0x1a7574[_0x8c5a('0x3d')]]={'$like':'%'+_0x1c2803[_0x8c5a('0x2b')][_0x8c5a('0x38')]+'%'};return _0x1baf82;}})});}_0x3471b1=_[_0x8c5a('0x39')]({},_0x3471b1,_0x1c2803[_0x8c5a('0x3e')]);var _0x5080d9={'where':_0x3471b1[_0x8c5a('0x36')]};return db[_0x8c5a('0x28')][_0x8c5a('0x3f')](_0x5080d9)[_0x8c5a('0x24')](function(_0x5b5a91){_0x3fd9ca[_0x8c5a('0x3f')]=_0x5b5a91;if(_0x1c2803['query'][_0x8c5a('0x40')]){_0x3471b1[_0x8c5a('0x41')]=[{'all':!![]}];}return db['Plugin']['findAll'](_0x3471b1);})['then'](function(_0x2e58da){_0x3fd9ca[_0x8c5a('0x42')]=_0x2e58da;return _0x3fd9ca;})[_0x8c5a('0x24')](respondWithFilteredResult(_0xfd5688,_0x3471b1))['catch'](handleError(_0xfd5688,null));};exports[_0x8c5a('0x43')]=function(_0x301a04,_0x25b100){var _0x334b66={'raw':!![],'where':{'id':_0x301a04[_0x8c5a('0x44')]['id']}},_0x505e53={};_0x505e53[_0x8c5a('0x2a')]=_[_0x8c5a('0x2c')](db['Plugin']['rawAttributes']);_0x505e53[_0x8c5a('0x2b')]=_[_0x8c5a('0x2c')](_0x301a04[_0x8c5a('0x2b')]);_0x505e53[_0x8c5a('0x2d')]=_[_0x8c5a('0x2e')](_0x505e53[_0x8c5a('0x2a')],_0x505e53[_0x8c5a('0x2b')]);_0x334b66[_0x8c5a('0x2f')]=_[_0x8c5a('0x2e')](_0x505e53[_0x8c5a('0x2a')],qs[_0x8c5a('0x30')](_0x301a04[_0x8c5a('0x2b')][_0x8c5a('0x30')]));_0x334b66[_0x8c5a('0x2f')]=_0x334b66['attributes']['length']?_0x334b66[_0x8c5a('0x2f')]:_0x505e53['model'];if(_0x301a04[_0x8c5a('0x2b')][_0x8c5a('0x40')]){_0x334b66[_0x8c5a('0x41')]=[{'all':!![]}];}_0x334b66=_[_0x8c5a('0x39')]({},_0x334b66,_0x301a04[_0x8c5a('0x3e')]);return db['Plugin'][_0x8c5a('0x45')](_0x334b66)['then'](handleEntityNotFound(_0x25b100,null))[_0x8c5a('0x24')](respondWithResult(_0x25b100,null))['catch'](handleError(_0x25b100,null));};exports[_0x8c5a('0x46')]=function(_0x49b9af,_0x1f6172,_0x11a0a3){return db[_0x8c5a('0x28')][_0x8c5a('0x45')]({'where':{'id':_0x49b9af['params']['id']},'attributes':[_0x8c5a('0x26'),_0x8c5a('0x47')],'raw':!![]})['then'](handleEntityNotFound(_0x1f6172,null))[_0x8c5a('0x24')](function(_0x1f5729){if(_0x1f5729){var _0x9dcdf4=path[_0x8c5a('0x48')](config['root'],_0x8c5a('0x49'),util[_0x8c5a('0x4a')](_0x8c5a('0x4b'),path[_0x8c5a('0x4c')](_0x1f5729[_0x8c5a('0x47')])));var _0x3e6069=fs[_0x8c5a('0x4d')](_0x9dcdf4);var _0x2bac4e=archiver(_0x8c5a('0x4e'),{'zlib':{'level':0x9}});_0x2bac4e['on'](_0x8c5a('0x4f'),function(_0x4366c6){if(_0x4366c6['code']==='ENOENT'){logger[_0x8c5a('0x50')](_0x4366c6);}else{throw new db[(_0x8c5a('0x51'))]['Error'](_0x8c5a('0x52'));}});_0x2bac4e['on'](_0x8c5a('0x50'),function(_0x9d5418){throw new db[(_0x8c5a('0x51'))][(_0x8c5a('0x53'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');});_0x2bac4e[_0x8c5a('0x54')](_0x3e6069);_0x2bac4e['glob']('**/*',{'cwd':path[_0x8c5a('0x48')](config[_0x8c5a('0x55')],_0x8c5a('0x49'),path[_0x8c5a('0x56')](_0x1f5729[_0x8c5a('0x47')])),'ignore':[path['join'](path[_0x8c5a('0x4c')](_0x1f5729['path']),_0x8c5a('0x57')),path['join'](path[_0x8c5a('0x4c')](_0x1f5729['path']),_0x8c5a('0x58'))],'nodir':!![]})[_0x8c5a('0x59')]();_0x3e6069['on'](_0x8c5a('0x5a'),function(){if(!fs[_0x8c5a('0x5b')](_0x9dcdf4)){throw new db[(_0x8c5a('0x51'))][(_0x8c5a('0x53'))](_0x8c5a('0x5c'));}return _0x1f6172[_0x8c5a('0x46')](_0x9dcdf4,util[_0x8c5a('0x4a')](_0x8c5a('0x4b'),path[_0x8c5a('0x4c')](_0x1f5729[_0x8c5a('0x47')])),function(_0x230faa){if(_0x230faa){throw new db[(_0x8c5a('0x51'))]['Error'](_0x8c5a('0x5d'));}fs[_0x8c5a('0x5e')](_0x9dcdf4);logger[_0x8c5a('0x5f')](_0x8c5a('0x60'));logger[_0x8c5a('0x5f')](_0x8c5a('0x61'));});});}return null;})['catch'](handleError(_0x1f6172,null));};exports['upload']=function(_0x560a52,_0x118f23,_0x23476d){var _0x2e0c5f=path['basename'](_0x560a52[_0x8c5a('0x62')][_0x8c5a('0x63')],path['extname'](_0x560a52['file']['filename']));var _0x40c1eb=path[_0x8c5a('0x48')](config[_0x8c5a('0x55')],'server/files/plugins',_0x560a52['file'][_0x8c5a('0x63')]);var _0x1b7ada=path[_0x8c5a('0x48')](config[_0x8c5a('0x55')],'server/files/plugins',_0x2e0c5f);logger[_0x8c5a('0x5f')]('Plugin\x20upload\x20filepath:\x20%s',_0x40c1eb);logger['info']('Plugin\x20upload\x20destination:\x20%s',_0x1b7ada);try{fs['chmodSync'](_0x40c1eb,parseInt(_0x8c5a('0x64'),0x8));extract(_0x40c1eb,{'dir':_0x1b7ada},function(_0x3431a7){if(_0x3431a7){logger['error'](_0x3431a7);handleError(_0x3431a7,!![]);};var _0x46a766=fs[_0x8c5a('0x65')](_0x1b7ada);if(_0x46a766[_0x8c5a('0x31')]>0x1){removeReferences(_0x40c1eb,_0x1b7ada);logger[_0x8c5a('0x50')]('Invalid\x20plugin\x20structure');return _0x23476d(new Error('Invalid\x20plugin\x20structure'));}var _0x27ce8f=fs[_0x8c5a('0x66')](path['join'](_0x1b7ada,_0x46a766[0x0]));if(_0x27ce8f['isFile']()){removeReferences(_0x40c1eb,_0x1b7ada);logger[_0x8c5a('0x50')](_0x8c5a('0x67'));return _0x23476d(new Error('Invalid\x20plugin\x20structure'));}if(_0x27ce8f[_0x8c5a('0x68')]()){var _0x564dd7=fs[_0x8c5a('0x65')](path[_0x8c5a('0x48')](_0x1b7ada,_0x46a766[0x0]));if(_0x564dd7[_0x8c5a('0x31')]===0x0){removeReferences(_0x40c1eb,_0x1b7ada);logger['error'](_0x8c5a('0x67'));return _0x23476d(new Error('Invalid\x20plugin\x20structure'));}var _0x190495=_0x564dd7['some'](function(_0x526684){return _0x526684==='manifest.json';});if(!_0x190495){return _0x23476d(new Error('Plugin\x20manifest\x20missing'));}var _0x46e0f2=fs[_0x8c5a('0x69')](path[_0x8c5a('0x48')](_0x1b7ada,_0x46a766[0x0],_0x8c5a('0x6a')));var _0x309060=JSON[_0x8c5a('0x6b')](_0x46e0f2);if(_0x8c5a('0x6c')==typeof _0x309060[_0x8c5a('0x26')]){return _0x23476d(new Error(_0x8c5a('0x6d')));}if('undefined'==typeof _0x309060[_0x8c5a('0x3b')]){return _0x23476d(new Error(_0x8c5a('0x6e')));}if('undefined'==typeof _0x309060[_0x8c5a('0x6f')]){return _0x23476d(new Error(_0x8c5a('0x70')));}if('undefined'==typeof _0x309060['parameters']){return _0x23476d(new Error(_0x8c5a('0x71')));}if(_0x309060[_0x8c5a('0x3b')]===_0x8c5a('0x72')){if(_0x8c5a('0x6c')==typeof _0x309060[_0x8c5a('0x73')]['views']){return _0x23476d(new Error(_0x8c5a('0x74')));}if(_0x8c5a('0x6c')==typeof _0x309060[_0x8c5a('0x73')][_0x8c5a('0x75')][_0x8c5a('0x76')]&&_0x8c5a('0x6c')==typeof _0x309060[_0x8c5a('0x73')][_0x8c5a('0x75')][_0x8c5a('0x77')]){return _0x23476d(new Error('Invalid\x20manifest:\x20no\x20view\x20specified'));}}else if(_0x309060[_0x8c5a('0x3b')]==='script'){if(_0x8c5a('0x6c')==typeof _0x309060['parameters']['scriptName']){return _0x23476d(new Error(_0x8c5a('0x78')));}if('undefined'==typeof _0x309060[_0x8c5a('0x73')]['scriptPath']){return _0x23476d(new Error(_0x8c5a('0x79')));}}else{return _0x23476d(new Error('Invalid\x20manifest:\x20invalid\x20type'));}var _0x4870cd=_0x309060['name'];var _0x919702=_0x309060[_0x8c5a('0x7a')];var _0x37bb36=_0x309060[_0x8c5a('0x3b')];var _0x35101a=_0x309060['sidebar']?_0x309060['sidebar']:_0x8c5a('0x7b');var _0x2f4580=_0x309060[_0x8c5a('0x7c')]?_0x309060[_0x8c5a('0x7c')]:_0x8c5a('0x7d');var _0x572cf3='';var _0x53c7d7='';var _0x5e57ca='';var _0x201669='';var _0x3b7c15=_0x309060['version'];if(_0x37bb36===_0x8c5a('0x72')){if(_0x8c5a('0x6c')!=typeof _0x309060[_0x8c5a('0x73')][_0x8c5a('0x75')][_0x8c5a('0x76')]){var _0x5ac169=_0x309060[_0x8c5a('0x73')]['views']['admin'];if(!/^(f|ht)tps?:\/\//i[_0x8c5a('0x7e')](_0x5ac169)){_0x572cf3=path['join'](_0x8c5a('0x7f'),_0x2e0c5f,_0x46a766[0x0],_0x5ac169);}else{_0x572cf3=_0x5ac169;}}else{logger[_0x8c5a('0x5f')](_0x8c5a('0x80'));}if(_0x8c5a('0x6c')!=typeof _0x309060['parameters'][_0x8c5a('0x75')][_0x8c5a('0x77')]){var _0x12e82f=_0x309060['parameters'][_0x8c5a('0x75')]['agent'];if(!/^(f|ht)tps?:\/\//i[_0x8c5a('0x7e')](_0x12e82f)){_0x53c7d7=path['join'](_0x8c5a('0x7f'),_0x2e0c5f,_0x46a766[0x0],_0x12e82f);}else{_0x53c7d7=_0x12e82f;}}else{logger[_0x8c5a('0x5f')](_0x8c5a('0x81'));}}else if(_0x37bb36===_0x8c5a('0x82')){_0x5e57ca=_0x309060[_0x8c5a('0x73')][_0x8c5a('0x83')];_0x201669=_0x309060[_0x8c5a('0x73')][_0x8c5a('0x84')];if(_0x8c5a('0x6c')!=typeof _0x309060[_0x8c5a('0x73')][_0x8c5a('0x75')]){if('undefined'!=typeof _0x309060[_0x8c5a('0x73')][_0x8c5a('0x75')]['admin']){var _0x5ac169=_0x309060['parameters'][_0x8c5a('0x75')]['admin'];if(!/^(f|ht)tps?:\/\//i[_0x8c5a('0x7e')](_0x5ac169)){_0x572cf3=path[_0x8c5a('0x48')]('plugins',_0x2e0c5f,_0x46a766[0x0],_0x5ac169);}else{_0x572cf3=_0x5ac169;}}if(_0x8c5a('0x6c')!=typeof _0x309060[_0x8c5a('0x73')][_0x8c5a('0x75')][_0x8c5a('0x77')]){var _0x12e82f=_0x309060['parameters'][_0x8c5a('0x75')][_0x8c5a('0x77')];if(!/^(f|ht)tps?:\/\//i[_0x8c5a('0x7e')](_0x12e82f)){_0x53c7d7=path[_0x8c5a('0x48')](_0x8c5a('0x7f'),_0x2e0c5f,_0x46a766[0x0],_0x12e82f);}else{_0x53c7d7=_0x12e82f;}}}}var _0x127b4a={'name':_0x4870cd,'description':_0x919702,'path':path[_0x8c5a('0x48')](_0x2e0c5f,_0x46a766[0x0]),'type':_0x37bb36,'sidebar':_0x35101a,'icon':_0x2f4580,'adminUrl':_0x572cf3,'agentUrl':_0x53c7d7,'scriptName':_0x5e57ca,'scriptPath':_0x201669,'version':_0x3b7c15};removeReferences(_0x40c1eb,null);return db[_0x8c5a('0x28')][_0x8c5a('0x85')](_0x127b4a)[_0x8c5a('0x24')](function(_0x492f08){var _0x13df4b={'role':_0x560a52[_0x8c5a('0x86')]['role'],'userProfileId':_0x560a52[_0x8c5a('0x86')][_0x8c5a('0x87')]};if(!_0x13df4b)throw new Error(_0x8c5a('0x88'));if(_0x13df4b['role']==='user'){var _0x231f9c=_0x492f08[_0x8c5a('0x89')]({'plain':!![]});return db['UserProfileSection'][_0x8c5a('0x45')]({'where':{'name':_0x8c5a('0x8a'),'userProfileId':_0x13df4b['userProfileId']},'raw':!![]})['then'](function(_0x23f945){if(_0x23f945&&_0x23f945[_0x8c5a('0x8b')]===0x0){return db[_0x8c5a('0x23')][_0x8c5a('0x85')]({'name':_0x231f9c[_0x8c5a('0x26')],'resourceId':_0x231f9c['id'],'type':_0x23f945[_0x8c5a('0x26')],'sectionId':_0x23f945['id']},{})[_0x8c5a('0x24')](function(){return _0x492f08;});}else{return _0x492f08;}})['catch'](function(_0x383337){logger[_0x8c5a('0x50')](_0x8c5a('0x8c'),_0x383337);throw _0x383337;});}return _0x492f08;})[_0x8c5a('0x24')](respondWithResult(_0x118f23,null))[_0x8c5a('0x8d')](handleError(_0x118f23,null));}});}catch(_0x3e0643){_0x118f23[_0x8c5a('0x18')](0x1f4)[_0x8c5a('0x8e')](_0x3e0643);}};function removeReferences(_0x410d89,_0x5a032f){try{if(_0x410d89){fs[_0x8c5a('0x5e')](_0x410d89);logger[_0x8c5a('0x5f')]('Zip\x20archive\x20removed');}if(_0x5a032f){rimraf(_0x5a032f,function(){});logger['info'](_0x8c5a('0x8f'));}}catch(_0x196e9c){logger[_0x8c5a('0x50')](_0x196e9c);}}exports[_0x8c5a('0x21')]=function(_0x120fe7,_0x592a2f,_0x560917){return db[_0x8c5a('0x28')]['find']({'where':{'id':_0x120fe7[_0x8c5a('0x44')]['id']}})[_0x8c5a('0x24')](handleEntityNotFound(_0x592a2f,null))['then'](saveUpdates(_0x120fe7[_0x8c5a('0x86')],null))[_0x8c5a('0x24')](respondWithResult(_0x592a2f,null))[_0x8c5a('0x8d')](handleError(_0x592a2f,null));};exports[_0x8c5a('0x90')]=function(_0x248bc8,_0xc09162,_0x99c2e2){return db[_0x8c5a('0x28')][_0x8c5a('0x45')]({'where':{'id':_0x248bc8[_0x8c5a('0x44')]['id']}})[_0x8c5a('0x24')](function(_0x3ddd80){if(_0x3ddd80){return _0x3ddd80[_0x8c5a('0x22')]();}})[_0x8c5a('0x24')](function(_0x2d5b2b){rimraf(path[_0x8c5a('0x48')](config[_0x8c5a('0x55')],'server/files/plugins',path[_0x8c5a('0x56')](_0x2d5b2b[_0x8c5a('0x47')])),function(){});return _0x2d5b2b;})[_0x8c5a('0x24')](handleEntityNotFound(_0xc09162,null))[_0x8c5a('0x24')](respondWithStatusCode(_0xc09162,null))[_0x8c5a('0x8d')](handleError(_0xc09162,null));};exports[_0x8c5a('0x91')]=function(_0x3565e2,_0x26dce9,_0xb6219){return BPromise[_0x8c5a('0x92')]()[_0x8c5a('0x24')](function(){if(!_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x47')]){throw new Error(_0x8c5a('0x93'));}if(!_0x3565e2[_0x8c5a('0x2b')]['port']){throw new Error(_0x8c5a('0x94'));}var _0x1bbbd1=_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x95')]?_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x95')]+':'+_0x3565e2['query']['port']:_0x8c5a('0x96')+_0x3565e2[_0x8c5a('0x2b')]['port'];var _0xb13f83=_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x1a')]?_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x1a')]:!![];var _0x29c77a=_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x97')]?_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x97')]:null;var _0x17f242={'method':_0x3565e2[_0x8c5a('0x98')],'uri':util['format'](_0x8c5a('0x99'),_0x1bbbd1,_0x3565e2[_0x8c5a('0x2b')][_0x8c5a('0x47')]),'json':_0xb13f83,'resolveWithFullResponse':!![],'encoding':_0x29c77a,'qs':_0x3565e2['query']};if(_0x3565e2['headers']){_0x17f242[_0x8c5a('0x9a')]=_0x3565e2[_0x8c5a('0x9a')];if(_0x17f242[_0x8c5a('0x9a')][_0x8c5a('0x9b')]){delete _0x17f242[_0x8c5a('0x9a')]['content-length'];}}if(_0x17f242[_0x8c5a('0x9a')][_0x8c5a('0x9c')]){delete _0x17f242[_0x8c5a('0x9a')][_0x8c5a('0x9c')];}return rp(_0x17f242);})[_0x8c5a('0x24')](function(_0x3bdfb2){if(_0x3bdfb2){_0x26dce9[_0x8c5a('0x1c')](_0x3bdfb2[_0x8c5a('0x9a')]);logger[_0x8c5a('0x5f')](_0x3bdfb2[_0x8c5a('0x86')]);if(_[_0x8c5a('0x9d')](_0x3565e2['query'][_0x8c5a('0x47')],_0x8c5a('0x46'))&&_0x3bdfb2[_0x8c5a('0x9e')]==0x1f4){return _0x26dce9[_0x8c5a('0x25')](_0x3bdfb2['statusCode']);}else{return _0x26dce9[_0x8c5a('0x18')](_0x3bdfb2['statusCode'])[_0x8c5a('0x8e')](_0x3bdfb2[_0x8c5a('0x86')]);}}else{return _0x26dce9[_0x8c5a('0x25')](0xc8);}})[_0x8c5a('0x8d')](handleError(_0x26dce9,null));};exports[_0x8c5a('0x9f')]=function(_0x3339da,_0x3125c2,_0x27bb81){return BPromise[_0x8c5a('0x92')]()[_0x8c5a('0x24')](function(){if(!_0x3339da[_0x8c5a('0x2b')][_0x8c5a('0x47')]){throw new Error('\x27PATH\x27\x20parameter\x20not\x20specified');}if(!_0x3339da[_0x8c5a('0x2b')]['port']){throw new Error(_0x8c5a('0x94'));}var _0x134b09=_0x3339da[_0x8c5a('0x2b')][_0x8c5a('0x95')]?_0x3339da[_0x8c5a('0x2b')]['hostname']+':'+_0x3339da[_0x8c5a('0x2b')]['port']:_0x8c5a('0x96')+_0x3339da['query'][_0x8c5a('0xa0')];var _0x5b09a9=_0x3339da[_0x8c5a('0x2b')][_0x8c5a('0x1a')]?_0x3339da[_0x8c5a('0x2b')]['json']:!![];var _0x58d1a7=_0x3339da[_0x8c5a('0x2b')][_0x8c5a('0x97')]?_0x3339da[_0x8c5a('0x2b')][_0x8c5a('0x97')]:null;var _0x2f4829={'method':_0x3339da[_0x8c5a('0x98')],'uri':util[_0x8c5a('0x4a')]('%s%s',_0x134b09,_0x3339da[_0x8c5a('0x2b')][_0x8c5a('0x47')]),'json':_0x5b09a9,'resolveWithFullResponse':!![],'encoding':_0x58d1a7,'body':_0x3339da[_0x8c5a('0x86')]};if(_0x3339da[_0x8c5a('0x9a')]){_0x2f4829[_0x8c5a('0x9a')]=_0x3339da['headers'];if(_0x2f4829[_0x8c5a('0x9a')][_0x8c5a('0x9b')]){delete _0x2f4829[_0x8c5a('0x9a')][_0x8c5a('0x9b')];}}if(_0x2f4829[_0x8c5a('0x9a')][_0x8c5a('0x9c')]){delete _0x2f4829[_0x8c5a('0x9a')]['content-type'];}return rp(_0x2f4829);})[_0x8c5a('0x24')](function(_0x451286){if(_0x451286){_0x3125c2[_0x8c5a('0x1c')](_0x451286[_0x8c5a('0x9a')]);logger[_0x8c5a('0x5f')](_0x451286[_0x8c5a('0x86')]);return _0x3125c2[_0x8c5a('0x18')](_0x451286[_0x8c5a('0x9e')])['send'](_0x451286[_0x8c5a('0x86')]);}else{return _0x3125c2[_0x8c5a('0x25')](0xc8);}})[_0x8c5a('0x8d')](handleError(_0x3125c2,null));};
\ No newline at end of file
+var _0x4ffe=['offset','set','Content-Range','reject','save','update','then','destroy','get','sendStatus','stack','name','send','Plugin','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','filter','merge','type','key','VIRTUAL','field','count','includeAll','include','findAll','rows','catch','show','params','options','find','root','server/files/plugins','format','basename','createWriteStream','zip','warning','code','ENOENT','Sequelize','Error\x20while\x20generating\x20the\x20zip\x20archive','error','pipe','glob','**/*','join','dirname','node_modules/**/*','attachments/**/*','close','existsSync','Error','Plugin\x20not\x20found','%s.zip','Error\x20while\x20downloading\x20the\x20plugin','info','Download\x20completed','Temporary\x20file\x20removed','upload','file','filename','chmodSync','0777','readdirSync','Invalid\x20plugin\x20structure','isFile','isDirectory','some','manifest.json','Plugin\x20manifest\x20missing','readFileSync','parse','undefined','Invalid\x20manifest:\x20name\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','parameters','Invalid\x20manifest:\x20parameters\x20missing','html','views','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','always','icon','icon-apps','test','plugins','Warning:\x20agent\x20view\x20not\x20specified','script','create','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','Plugins','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','unlinkSync','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','delete','webhookGet','port','hostname','encoding','method','%s%s','headers','content-length','content-type','endsWith','download','statusCode','webhookPost','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','\x27PORT\x27\x20parameter\x20not\x20specified','html-pdf','eml-format','rimraf','zip-dir','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','extract-zip','archiver','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./plugin.socket','register','status','end','json'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x4ffe,0x135));var _0xe4ff=function(_0x221ba2,_0x79208){_0x221ba2=_0x221ba2-0x0;var _0x47d08e=_0x4ffe[_0x221ba2];return _0x47d08e;};'use strict';var pdf=require(_0xe4ff('0x0'));var emlformat=require(_0xe4ff('0x1'));var rimraf=require(_0xe4ff('0x2'));var zipdir=require(_0xe4ff('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe4ff('0x4'));var Mustache=require('mustache');var util=require(_0xe4ff('0x5'));var path=require(_0xe4ff('0x6'));var sox=require(_0xe4ff('0x7'));var csv=require(_0xe4ff('0x8'));var ejs=require(_0xe4ff('0x9'));var fs=require('fs');var _=require(_0xe4ff('0xa'));var squel=require(_0xe4ff('0xb'));var crypto=require(_0xe4ff('0xc'));var jsforce=require(_0xe4ff('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xe4ff('0xe'));var extract=require(_0xe4ff('0xf'));var rimraf=require('rimraf');var archiver=require(_0xe4ff('0x10'));var Redis=require(_0xe4ff('0x11'));var authService=require(_0xe4ff('0x12'));var qs=require(_0xe4ff('0x13'));var hardwareService=require(_0xe4ff('0x14'));var logger=require(_0xe4ff('0x15'))(_0xe4ff('0x16'));var utils=require(_0xe4ff('0x17'));var config=require(_0xe4ff('0x18'));var db=require(_0xe4ff('0x19'))['db'];config[_0xe4ff('0x1a')]=_[_0xe4ff('0x1b')](config[_0xe4ff('0x1a')],{'host':_0xe4ff('0x1c'),'port':0x18eb});var socket=require(_0xe4ff('0x1d'))(new Redis(config[_0xe4ff('0x1a')]));require(_0xe4ff('0x1e'))[_0xe4ff('0x1f')](socket);function respondWithStatusCode(_0x5a288a,_0x5751c8){_0x5751c8=_0x5751c8||0xcc;return function(_0x36523f){if(_0x36523f){return _0x5a288a['sendStatus'](_0x5751c8);}return _0x5a288a[_0xe4ff('0x20')](_0x5751c8)[_0xe4ff('0x21')]();};}function respondWithResult(_0x4d1d88,_0x3d738d){_0x3d738d=_0x3d738d||0xc8;return function(_0x42a08c){if(_0x42a08c){return _0x4d1d88['status'](_0x3d738d)[_0xe4ff('0x22')](_0x42a08c);}};}function respondWithFilteredResult(_0x407351,_0x22c0c6){return function(_0x2b05dd){if(_0x2b05dd){var _0x537699=_0x2b05dd['count'],_0x53a1f5=_0x22c0c6[_0xe4ff('0x23')],_0x261928=_0x22c0c6['offset']+_0x22c0c6['limit'],_0x5a784f;if(_0x261928>=_0x537699){_0x261928=_0x537699;_0x5a784f=0xc8;}else{_0x5a784f=0xce;}_0x407351['status'](_0x5a784f);return _0x407351[_0xe4ff('0x24')](_0xe4ff('0x25'),_0x53a1f5+'-'+_0x261928+'/'+_0x537699)['json'](_0x2b05dd);}return null;};}function patchUpdates(_0x5ecfe8){return function(_0x36689c){try{jsonpatch['apply'](_0x36689c,_0x5ecfe8,!![]);}catch(_0x5d654e){return BPromise[_0xe4ff('0x26')](_0x5d654e);}return _0x36689c[_0xe4ff('0x27')]();};}function saveUpdates(_0x4cd45e,_0x2046fe){return function(_0x357d09){if(_0x357d09){return _0x357d09[_0xe4ff('0x28')](_0x4cd45e)[_0xe4ff('0x29')](function(_0x3d31d6){return _0x3d31d6;});}return null;};}function removeEntity(_0x23063f,_0x26e213){return function(_0x42f9c0){if(_0x42f9c0){return _0x42f9c0[_0xe4ff('0x2a')]()[_0xe4ff('0x29')](function(){var _0xa1f49b=_0x42f9c0[_0xe4ff('0x2b')]({'plain':!![]});var _0x154d66='Plugins';return db['UserProfileResource'][_0xe4ff('0x2a')]({'where':{'type':_0x154d66,'resourceId':_0xa1f49b['id']}})[_0xe4ff('0x29')](function(){return _0x42f9c0;});})[_0xe4ff('0x29')](function(){_0x23063f['status'](0xcc)[_0xe4ff('0x21')]();});}};}function handleEntityNotFound(_0x5d36d4,_0x3c37d7){return function(_0x38010a){if(!_0x38010a){_0x5d36d4[_0xe4ff('0x2c')](0x194);}return _0x38010a;};}function handleError(_0x100f89,_0x233bb8){_0x233bb8=_0x233bb8||0x1f4;return function(_0x1be9ad){logger['error'](_0x1be9ad[_0xe4ff('0x2d')]);if(_0x1be9ad[_0xe4ff('0x2e')]){delete _0x1be9ad[_0xe4ff('0x2e')];}_0x100f89[_0xe4ff('0x20')](_0x233bb8)[_0xe4ff('0x2f')](_0x1be9ad);};}exports['index']=function(_0x2e1623,_0x4543aa){var _0x39471b={},_0xa4d424={},_0x52510c={'count':0x0,'rows':[]};var _0x2cb386=db[_0xe4ff('0x30')][_0xe4ff('0x31')];_0xa4d424[_0xe4ff('0x32')]=_[_0xe4ff('0x33')](_0x2cb386);_0xa4d424[_0xe4ff('0x34')]=_[_0xe4ff('0x33')](_0x2e1623['query']);_0xa4d424[_0xe4ff('0x35')]=_[_0xe4ff('0x36')](_0xa4d424[_0xe4ff('0x32')],_0xa4d424[_0xe4ff('0x34')]);_0x39471b[_0xe4ff('0x37')]=_[_0xe4ff('0x36')](_0xa4d424[_0xe4ff('0x32')],qs[_0xe4ff('0x38')](_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x38')]));_0x39471b[_0xe4ff('0x37')]=_0x39471b['attributes'][_0xe4ff('0x39')]?_0x39471b[_0xe4ff('0x37')]:_0xa4d424[_0xe4ff('0x32')];if(!_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x3a')](_0xe4ff('0x3b'))){_0x39471b[_0xe4ff('0x3c')]=qs['limit'](_0x2e1623['query'][_0xe4ff('0x3c')]);_0x39471b[_0xe4ff('0x23')]=qs[_0xe4ff('0x23')](_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x23')]);}_0x39471b['order']=qs[_0xe4ff('0x3d')](_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x3d')]);_0x39471b[_0xe4ff('0x3e')]=qs[_0xe4ff('0x35')](_['pick'](_0x2e1623[_0xe4ff('0x34')],_0xa4d424['filters']));if(_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x3f')]){_0x39471b[_0xe4ff('0x3e')]=_[_0xe4ff('0x40')](_0x39471b[_0xe4ff('0x3e')],{'$or':_['map'](_0x2cb386,function(_0x43a65b){if(_0x43a65b[_0xe4ff('0x41')][_0xe4ff('0x42')]!==_0xe4ff('0x43')){var _0x542f4a={};_0x542f4a[_0x43a65b[_0xe4ff('0x44')]]={'$like':'%'+_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x3f')]+'%'};return _0x542f4a;}})});}_0x39471b=_[_0xe4ff('0x40')]({},_0x39471b,_0x2e1623['options']);var _0x95f1fc={'where':_0x39471b[_0xe4ff('0x3e')]};return db[_0xe4ff('0x30')][_0xe4ff('0x45')](_0x95f1fc)[_0xe4ff('0x29')](function(_0x5927f0){_0x52510c['count']=_0x5927f0;if(_0x2e1623[_0xe4ff('0x34')][_0xe4ff('0x46')]){_0x39471b[_0xe4ff('0x47')]=[{'all':!![]}];}return db['Plugin'][_0xe4ff('0x48')](_0x39471b);})[_0xe4ff('0x29')](function(_0x71f3da){_0x52510c[_0xe4ff('0x49')]=_0x71f3da;return _0x52510c;})[_0xe4ff('0x29')](respondWithFilteredResult(_0x4543aa,_0x39471b))[_0xe4ff('0x4a')](handleError(_0x4543aa,null));};exports[_0xe4ff('0x4b')]=function(_0x96b394,_0x4de2c1){var _0x172fe7={'raw':!![],'where':{'id':_0x96b394[_0xe4ff('0x4c')]['id']}},_0x4fafff={};_0x4fafff['model']=_[_0xe4ff('0x33')](db['Plugin'][_0xe4ff('0x31')]);_0x4fafff['query']=_[_0xe4ff('0x33')](_0x96b394[_0xe4ff('0x34')]);_0x4fafff[_0xe4ff('0x35')]=_['intersection'](_0x4fafff[_0xe4ff('0x32')],_0x4fafff['query']);_0x172fe7['attributes']=_['intersection'](_0x4fafff[_0xe4ff('0x32')],qs['fields'](_0x96b394[_0xe4ff('0x34')][_0xe4ff('0x38')]));_0x172fe7['attributes']=_0x172fe7[_0xe4ff('0x37')][_0xe4ff('0x39')]?_0x172fe7[_0xe4ff('0x37')]:_0x4fafff['model'];if(_0x96b394[_0xe4ff('0x34')]['includeAll']){_0x172fe7[_0xe4ff('0x47')]=[{'all':!![]}];}_0x172fe7=_['merge']({},_0x172fe7,_0x96b394[_0xe4ff('0x4d')]);return db[_0xe4ff('0x30')]['find'](_0x172fe7)['then'](handleEntityNotFound(_0x4de2c1,null))[_0xe4ff('0x29')](respondWithResult(_0x4de2c1,null))[_0xe4ff('0x4a')](handleError(_0x4de2c1,null));};exports['download']=function(_0x1cb03c,_0x335f0f,_0x10867f){return db[_0xe4ff('0x30')][_0xe4ff('0x4e')]({'where':{'id':_0x1cb03c[_0xe4ff('0x4c')]['id']},'attributes':[_0xe4ff('0x2e'),_0xe4ff('0x6')],'raw':!![]})['then'](handleEntityNotFound(_0x335f0f,null))[_0xe4ff('0x29')](function(_0x247ee5){if(_0x247ee5){var _0x117215=path['join'](config[_0xe4ff('0x4f')],_0xe4ff('0x50'),util[_0xe4ff('0x51')]('%s.zip',path[_0xe4ff('0x52')](_0x247ee5[_0xe4ff('0x6')])));var _0x90283c=fs[_0xe4ff('0x53')](_0x117215);var _0x41b9f2=archiver(_0xe4ff('0x54'),{'zlib':{'level':0x9}});_0x41b9f2['on'](_0xe4ff('0x55'),function(_0x2ce7e2){if(_0x2ce7e2[_0xe4ff('0x56')]===_0xe4ff('0x57')){logger['error'](_0x2ce7e2);}else{throw new db[(_0xe4ff('0x58'))]['Error'](_0xe4ff('0x59'));}});_0x41b9f2['on'](_0xe4ff('0x5a'),function(_0x20e8b1){throw new db[(_0xe4ff('0x58'))]['Error']('Error\x20while\x20generating\x20the\x20zip\x20archive');});_0x41b9f2[_0xe4ff('0x5b')](_0x90283c);_0x41b9f2[_0xe4ff('0x5c')](_0xe4ff('0x5d'),{'cwd':path[_0xe4ff('0x5e')](config[_0xe4ff('0x4f')],_0xe4ff('0x50'),path[_0xe4ff('0x5f')](_0x247ee5['path'])),'ignore':[path[_0xe4ff('0x5e')](path[_0xe4ff('0x52')](_0x247ee5[_0xe4ff('0x6')]),_0xe4ff('0x60')),path[_0xe4ff('0x5e')](path['basename'](_0x247ee5[_0xe4ff('0x6')]),_0xe4ff('0x61'))],'nodir':!![]})['finalize']();_0x90283c['on'](_0xe4ff('0x62'),function(){if(!fs[_0xe4ff('0x63')](_0x117215)){throw new db[(_0xe4ff('0x58'))][(_0xe4ff('0x64'))](_0xe4ff('0x65'));}return _0x335f0f['download'](_0x117215,util[_0xe4ff('0x51')](_0xe4ff('0x66'),path[_0xe4ff('0x52')](_0x247ee5['path'])),function(_0x4dc0d1){if(_0x4dc0d1){throw new db[(_0xe4ff('0x58'))][(_0xe4ff('0x64'))](_0xe4ff('0x67'));}fs['unlinkSync'](_0x117215);logger[_0xe4ff('0x68')](_0xe4ff('0x69'));logger[_0xe4ff('0x68')](_0xe4ff('0x6a'));});});}return null;})[_0xe4ff('0x4a')](handleError(_0x335f0f,null));};exports[_0xe4ff('0x6b')]=function(_0x20089b,_0x6e72d,_0x27b88b){var _0x2efd1c=path[_0xe4ff('0x52')](_0x20089b[_0xe4ff('0x6c')]['filename'],path['extname'](_0x20089b['file']['filename']));var _0x446bf4=path[_0xe4ff('0x5e')](config[_0xe4ff('0x4f')],_0xe4ff('0x50'),_0x20089b[_0xe4ff('0x6c')][_0xe4ff('0x6d')]);var _0x176aaa=path[_0xe4ff('0x5e')](config[_0xe4ff('0x4f')],_0xe4ff('0x50'),_0x2efd1c);logger[_0xe4ff('0x68')]('Plugin\x20upload\x20filepath:\x20%s',_0x446bf4);logger[_0xe4ff('0x68')]('Plugin\x20upload\x20destination:\x20%s',_0x176aaa);try{fs[_0xe4ff('0x6e')](_0x446bf4,parseInt(_0xe4ff('0x6f'),0x8));extract(_0x446bf4,{'dir':_0x176aaa},function(_0x357a6f){if(_0x357a6f){logger[_0xe4ff('0x5a')](_0x357a6f);handleError(_0x357a6f,!![]);};var _0x23b84f=fs[_0xe4ff('0x70')](_0x176aaa);if(_0x23b84f[_0xe4ff('0x39')]>0x1){removeReferences(_0x446bf4,_0x176aaa);logger[_0xe4ff('0x5a')](_0xe4ff('0x71'));return _0x27b88b(new Error(_0xe4ff('0x71')));}var _0x5169f0=fs['lstatSync'](path[_0xe4ff('0x5e')](_0x176aaa,_0x23b84f[0x0]));if(_0x5169f0[_0xe4ff('0x72')]()){removeReferences(_0x446bf4,_0x176aaa);logger[_0xe4ff('0x5a')]('Invalid\x20plugin\x20structure');return _0x27b88b(new Error(_0xe4ff('0x71')));}if(_0x5169f0[_0xe4ff('0x73')]()){var _0x5e5485=fs[_0xe4ff('0x70')](path[_0xe4ff('0x5e')](_0x176aaa,_0x23b84f[0x0]));if(_0x5e5485['length']===0x0){removeReferences(_0x446bf4,_0x176aaa);logger[_0xe4ff('0x5a')]('Invalid\x20plugin\x20structure');return _0x27b88b(new Error('Invalid\x20plugin\x20structure'));}var _0x430f37=_0x5e5485[_0xe4ff('0x74')](function(_0x1cd931){return _0x1cd931===_0xe4ff('0x75');});if(!_0x430f37){return _0x27b88b(new Error(_0xe4ff('0x76')));}var _0x3b71bd=fs[_0xe4ff('0x77')](path['join'](_0x176aaa,_0x23b84f[0x0],_0xe4ff('0x75')));var _0xcf0423=JSON[_0xe4ff('0x78')](_0x3b71bd);if(_0xe4ff('0x79')==typeof _0xcf0423[_0xe4ff('0x2e')]){return _0x27b88b(new Error(_0xe4ff('0x7a')));}if(_0xe4ff('0x79')==typeof _0xcf0423['type']){return _0x27b88b(new Error('Invalid\x20manifest:\x20type\x20missing'));}if('undefined'==typeof _0xcf0423[_0xe4ff('0x7b')]){return _0x27b88b(new Error(_0xe4ff('0x7c')));}if('undefined'==typeof _0xcf0423[_0xe4ff('0x7d')]){return _0x27b88b(new Error(_0xe4ff('0x7e')));}if(_0xcf0423[_0xe4ff('0x41')]===_0xe4ff('0x7f')){if(_0xe4ff('0x79')==typeof _0xcf0423['parameters'][_0xe4ff('0x80')]){return _0x27b88b(new Error('Invalid\x20manifest:\x20views\x20missing'));}if(_0xe4ff('0x79')==typeof _0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')][_0xe4ff('0x81')]&&'undefined'==typeof _0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')][_0xe4ff('0x82')]){return _0x27b88b(new Error(_0xe4ff('0x83')));}}else if(_0xcf0423[_0xe4ff('0x41')]==='script'){if('undefined'==typeof _0xcf0423['parameters']['scriptName']){return _0x27b88b(new Error('Invalid\x20manifest:\x20script\x20name\x20missing'));}if(_0xe4ff('0x79')==typeof _0xcf0423[_0xe4ff('0x7d')]['scriptPath']){return _0x27b88b(new Error('Invalid\x20manifest:\x20script\x20path\x20missing'));}}else{return _0x27b88b(new Error(_0xe4ff('0x84')));}var _0x58a67e=_0xcf0423[_0xe4ff('0x2e')];var _0x1406fc=_0xcf0423[_0xe4ff('0x85')];var _0x5112ba=_0xcf0423[_0xe4ff('0x41')];var _0xb82417=_0xcf0423[_0xe4ff('0x86')]?_0xcf0423[_0xe4ff('0x86')]:_0xe4ff('0x87');var _0x47bd30=_0xcf0423[_0xe4ff('0x88')]?_0xcf0423[_0xe4ff('0x88')]:_0xe4ff('0x89');var _0x231ebc='';var _0x166d6d='';var _0x5f4e62='';var _0x22b52a='';var _0x490bc3=_0xcf0423[_0xe4ff('0x7b')];if(_0x5112ba===_0xe4ff('0x7f')){if(_0xe4ff('0x79')!=typeof _0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')][_0xe4ff('0x81')]){var _0x377aca=_0xcf0423['parameters'][_0xe4ff('0x80')][_0xe4ff('0x81')];if(!/^(f|ht)tps?:\/\//i[_0xe4ff('0x8a')](_0x377aca)){_0x231ebc=path['join'](_0xe4ff('0x8b'),_0x2efd1c,_0x23b84f[0x0],_0x377aca);}else{_0x231ebc=_0x377aca;}}else{logger[_0xe4ff('0x68')]('Warning:\x20admin\x20view\x20not\x20specified');}if(_0xe4ff('0x79')!=typeof _0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')]['agent']){var _0x55c0d4=_0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')][_0xe4ff('0x82')];if(!/^(f|ht)tps?:\/\//i[_0xe4ff('0x8a')](_0x55c0d4)){_0x166d6d=path['join'](_0xe4ff('0x8b'),_0x2efd1c,_0x23b84f[0x0],_0x55c0d4);}else{_0x166d6d=_0x55c0d4;}}else{logger[_0xe4ff('0x68')](_0xe4ff('0x8c'));}}else if(_0x5112ba===_0xe4ff('0x8d')){_0x5f4e62=_0xcf0423['parameters']['scriptName'];_0x22b52a=_0xcf0423[_0xe4ff('0x7d')]['scriptPath'];if(_0xe4ff('0x79')!=typeof _0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')]){if(_0xe4ff('0x79')!=typeof _0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')][_0xe4ff('0x81')]){var _0x377aca=_0xcf0423['parameters']['views'][_0xe4ff('0x81')];if(!/^(f|ht)tps?:\/\//i[_0xe4ff('0x8a')](_0x377aca)){_0x231ebc=path['join']('plugins',_0x2efd1c,_0x23b84f[0x0],_0x377aca);}else{_0x231ebc=_0x377aca;}}if('undefined'!=typeof _0xcf0423['parameters'][_0xe4ff('0x80')]['agent']){var _0x55c0d4=_0xcf0423[_0xe4ff('0x7d')][_0xe4ff('0x80')][_0xe4ff('0x82')];if(!/^(f|ht)tps?:\/\//i['test'](_0x55c0d4)){_0x166d6d=path[_0xe4ff('0x5e')]('plugins',_0x2efd1c,_0x23b84f[0x0],_0x55c0d4);}else{_0x166d6d=_0x55c0d4;}}}}var _0xf54909={'name':_0x58a67e,'description':_0x1406fc,'path':path[_0xe4ff('0x5e')](_0x2efd1c,_0x23b84f[0x0]),'type':_0x5112ba,'sidebar':_0xb82417,'icon':_0x47bd30,'adminUrl':_0x231ebc,'agentUrl':_0x166d6d,'scriptName':_0x5f4e62,'scriptPath':_0x22b52a,'version':_0x490bc3};removeReferences(_0x446bf4,null);return db[_0xe4ff('0x30')][_0xe4ff('0x8e')](_0xf54909)['then'](function(_0x42348d){var _0x3fd832={'role':_0x20089b[_0xe4ff('0x8f')]['role'],'userProfileId':_0x20089b[_0xe4ff('0x8f')][_0xe4ff('0x90')]};if(!_0x3fd832)throw new Error(_0xe4ff('0x91'));if(_0x3fd832[_0xe4ff('0x92')]===_0xe4ff('0x93')){var _0x17d1e3=_0x42348d[_0xe4ff('0x2b')]({'plain':!![]});return db[_0xe4ff('0x94')][_0xe4ff('0x4e')]({'where':{'name':_0xe4ff('0x95'),'userProfileId':_0x3fd832[_0xe4ff('0x90')]},'raw':!![]})['then'](function(_0x57df1c){if(_0x57df1c&&_0x57df1c[_0xe4ff('0x96')]===0x0){return db['UserProfileResource'][_0xe4ff('0x8e')]({'name':_0x17d1e3[_0xe4ff('0x2e')],'resourceId':_0x17d1e3['id'],'type':_0x57df1c[_0xe4ff('0x2e')],'sectionId':_0x57df1c['id']},{})[_0xe4ff('0x29')](function(){return _0x42348d;});}else{return _0x42348d;}})[_0xe4ff('0x4a')](function(_0x43fc06){logger[_0xe4ff('0x5a')](_0xe4ff('0x97'),_0x43fc06);throw _0x43fc06;});}return _0x42348d;})[_0xe4ff('0x29')](respondWithResult(_0x6e72d,null))[_0xe4ff('0x4a')](handleError(_0x6e72d,null));}});}catch(_0x1a136d){_0x6e72d[_0xe4ff('0x20')](0x1f4)[_0xe4ff('0x2f')](_0x1a136d);}};function removeReferences(_0x3fb594,_0x2324eb){try{if(_0x3fb594){fs[_0xe4ff('0x98')](_0x3fb594);logger['info'](_0xe4ff('0x99'));}if(_0x2324eb){rimraf(_0x2324eb,function(){});logger[_0xe4ff('0x68')](_0xe4ff('0x9a'));}}catch(_0xa340e){logger['error'](_0xa340e);}}exports[_0xe4ff('0x28')]=function(_0x1e1a19,_0x28531a,_0xb6660a){return db[_0xe4ff('0x30')][_0xe4ff('0x4e')]({'where':{'id':_0x1e1a19[_0xe4ff('0x4c')]['id']}})[_0xe4ff('0x29')](handleEntityNotFound(_0x28531a,null))[_0xe4ff('0x29')](saveUpdates(_0x1e1a19[_0xe4ff('0x8f')],null))[_0xe4ff('0x29')](respondWithResult(_0x28531a,null))[_0xe4ff('0x4a')](handleError(_0x28531a,null));};exports[_0xe4ff('0x9b')]=function(_0xf3e76f,_0x600ce5,_0x15be11){return db[_0xe4ff('0x30')][_0xe4ff('0x4e')]({'where':{'id':_0xf3e76f['params']['id']}})[_0xe4ff('0x29')](function(_0x4a38e4){if(_0x4a38e4){return _0x4a38e4[_0xe4ff('0x2a')]();}})[_0xe4ff('0x29')](function(_0xd5fa8f){rimraf(path[_0xe4ff('0x5e')](config[_0xe4ff('0x4f')],_0xe4ff('0x50'),path['dirname'](_0xd5fa8f['path'])),function(){});return _0xd5fa8f;})[_0xe4ff('0x29')](handleEntityNotFound(_0x600ce5,null))[_0xe4ff('0x29')](respondWithStatusCode(_0x600ce5,null))[_0xe4ff('0x4a')](handleError(_0x600ce5,null));};exports[_0xe4ff('0x9c')]=function(_0x5562e6,_0x4136e5,_0x202f87){return BPromise['resolve']()[_0xe4ff('0x29')](function(){if(!_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x6')]){throw new Error('\x27PATH\x27\x20parameter\x20not\x20specified');}if(!_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x9d')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x22cb45=_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x9e')]?_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x9e')]+':'+_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x9d')]:'http://localhost:'+_0x5562e6['query'][_0xe4ff('0x9d')];var _0x576e02=_0x5562e6[_0xe4ff('0x34')]['json']?_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x22')]:!![];var _0x1fd5b5=_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x9f')]?_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x9f')]:null;var _0x31fc29={'method':_0x5562e6[_0xe4ff('0xa0')],'uri':util[_0xe4ff('0x51')](_0xe4ff('0xa1'),_0x22cb45,_0x5562e6[_0xe4ff('0x34')][_0xe4ff('0x6')]),'json':_0x576e02,'resolveWithFullResponse':!![],'encoding':_0x1fd5b5,'qs':_0x5562e6['query']};if(_0x5562e6[_0xe4ff('0xa2')]){_0x31fc29['headers']=_0x5562e6[_0xe4ff('0xa2')];if(_0x31fc29[_0xe4ff('0xa2')][_0xe4ff('0xa3')]){delete _0x31fc29[_0xe4ff('0xa2')][_0xe4ff('0xa3')];}}if(_0x31fc29['headers'][_0xe4ff('0xa4')]){delete _0x31fc29[_0xe4ff('0xa2')]['content-type'];}return rp(_0x31fc29);})[_0xe4ff('0x29')](function(_0x2127c3){if(_0x2127c3){_0x4136e5[_0xe4ff('0x24')](_0x2127c3[_0xe4ff('0xa2')]);logger[_0xe4ff('0x68')](_0x2127c3[_0xe4ff('0x8f')]);if(_[_0xe4ff('0xa5')](_0x5562e6['query']['path'],_0xe4ff('0xa6'))&&_0x2127c3[_0xe4ff('0xa7')]==0x1f4){return _0x4136e5[_0xe4ff('0x2c')](_0x2127c3[_0xe4ff('0xa7')]);}else{return _0x4136e5[_0xe4ff('0x20')](_0x2127c3[_0xe4ff('0xa7')])[_0xe4ff('0x2f')](_0x2127c3[_0xe4ff('0x8f')]);}}else{return _0x4136e5[_0xe4ff('0x2c')](0xc8);}})[_0xe4ff('0x4a')](handleError(_0x4136e5,null));};exports[_0xe4ff('0xa8')]=function(_0x4962cd,_0xd5244f,_0x270664){return BPromise[_0xe4ff('0xa9')]()[_0xe4ff('0x29')](function(){if(!_0x4962cd[_0xe4ff('0x34')]['path']){throw new Error(_0xe4ff('0xaa'));}if(!_0x4962cd['query'][_0xe4ff('0x9d')]){throw new Error(_0xe4ff('0xab'));}var _0x32f4cc=_0x4962cd[_0xe4ff('0x34')][_0xe4ff('0x9e')]?_0x4962cd['query'][_0xe4ff('0x9e')]+':'+_0x4962cd[_0xe4ff('0x34')][_0xe4ff('0x9d')]:'http://localhost:'+_0x4962cd[_0xe4ff('0x34')][_0xe4ff('0x9d')];var _0x535742=_0x4962cd[_0xe4ff('0x34')][_0xe4ff('0x22')]?_0x4962cd['query'][_0xe4ff('0x22')]:!![];var _0x29d98b=_0x4962cd[_0xe4ff('0x34')][_0xe4ff('0x9f')]?_0x4962cd[_0xe4ff('0x34')]['encoding']:null;var _0xd469a2={'method':_0x4962cd[_0xe4ff('0xa0')],'uri':util['format'](_0xe4ff('0xa1'),_0x32f4cc,_0x4962cd[_0xe4ff('0x34')]['path']),'json':_0x535742,'resolveWithFullResponse':!![],'encoding':_0x29d98b,'body':_0x4962cd[_0xe4ff('0x8f')]};if(_0x4962cd[_0xe4ff('0xa2')]){_0xd469a2['headers']=_0x4962cd[_0xe4ff('0xa2')];if(_0xd469a2[_0xe4ff('0xa2')][_0xe4ff('0xa3')]){delete _0xd469a2[_0xe4ff('0xa2')][_0xe4ff('0xa3')];}}if(_0xd469a2[_0xe4ff('0xa2')]['content-type']){delete _0xd469a2[_0xe4ff('0xa2')][_0xe4ff('0xa4')];}return rp(_0xd469a2);})['then'](function(_0x2f069e){if(_0x2f069e){_0xd5244f[_0xe4ff('0x24')](_0x2f069e['headers']);logger[_0xe4ff('0x68')](_0x2f069e[_0xe4ff('0x8f')]);return _0xd5244f[_0xe4ff('0x20')](_0x2f069e[_0xe4ff('0xa7')])[_0xe4ff('0x2f')](_0x2f069e['body']);}else{return _0xd5244f[_0xe4ff('0x2c')](0xc8);}})['catch'](handleError(_0xd5244f,null));};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js
index 6adf879..2008f07 100644
--- a/server/api/plugin/plugin.events.js
+++ b/server/api/plugin/plugin.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5776=['setMaxListeners','remove','emit','hasOwnProperty','hook','events'];(function(_0x1ca50b,_0x3b2763){var _0x29459f=function(_0x4d0747){while(--_0x4d0747){_0x1ca50b['push'](_0x1ca50b['shift']());}};_0x29459f(++_0x3b2763);}(_0x5776,0xfb));var _0x6577=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x5776[_0xfae23b];return _0x200640;};'use strict';var EventEmitter=require(_0x6577('0x0'));var Plugin=require('../../mysqldb')['db']['Plugin'];var PluginEvents=new EventEmitter();PluginEvents[_0x6577('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x6577('0x2')};function emitEvent(_0x3b1a43){return function(_0x5c9644,_0x285af0,_0x1431f5){PluginEvents[_0x6577('0x3')](_0x3b1a43+':'+_0x5c9644['id'],_0x5c9644);PluginEvents[_0x6577('0x3')](_0x3b1a43,_0x5c9644);_0x1431f5(null);};}for(var e in events){if(events[_0x6577('0x4')](e)){var event=events[e];Plugin[_0x6577('0x5')](e,emitEvent(event));}}module['exports']=PluginEvents;
\ No newline at end of file
+var _0x7355=['events','../../mysqldb','Plugin','save','update','remove','hasOwnProperty','hook','exports'];(function(_0x5cfc47,_0x87746b){var _0x3a5114=function(_0x2b4ff4){while(--_0x2b4ff4){_0x5cfc47['push'](_0x5cfc47['shift']());}};_0x3a5114(++_0x87746b);}(_0x7355,0x7e));var _0x5735=function(_0x37afaa,_0x5f1ec7){_0x37afaa=_0x37afaa-0x0;var _0x49c4c0=_0x7355[_0x37afaa];return _0x49c4c0;};'use strict';var EventEmitter=require(_0x5735('0x0'));var Plugin=require(_0x5735('0x1'))['db'][_0x5735('0x2')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5735('0x3'),'afterUpdate':_0x5735('0x4'),'afterDestroy':_0x5735('0x5')};function emitEvent(_0x550e0f){return function(_0x3e1028,_0x379b5,_0x18d8ed){PluginEvents['emit'](_0x550e0f+':'+_0x3e1028['id'],_0x3e1028);PluginEvents['emit'](_0x550e0f,_0x3e1028);_0x18d8ed(null);};}for(var e in events){if(events[_0x5735('0x6')](e)){var event=events[e];Plugin[_0x5735('0x7')](e,emitEvent(event));}}module[_0x5735('0x8')]=PluginEvents;
\ No newline at end of file
diff --git a/server/api/plugin/plugin.model.js b/server/api/plugin/plugin.model.js
index c2f1859..e3f7ce2 100644
--- a/server/api/plugin/plugin.model.js
+++ b/server/api/plugin/plugin.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd634=['exports','define','Plugin','plugins','util','../../config/logger','bluebird','request-promise','../../config/environment','./plugin.attributes'];(function(_0x5d2ae6,_0x2a7c33){var _0x354fd3=function(_0x2309c4){while(--_0x2309c4){_0x5d2ae6['push'](_0x5d2ae6['shift']());}};_0x354fd3(++_0x2a7c33);}(_0xd634,0xf4));var _0x4d63=function(_0x40911a,_0x55ec99){_0x40911a=_0x40911a-0x0;var _0x27e8e3=_0xd634[_0x40911a];return _0x27e8e3;};'use strict';var _=require('lodash');var util=require(_0x4d63('0x0'));var logger=require(_0x4d63('0x1'))('api');var moment=require('moment');var BPromise=require(_0x4d63('0x2'));var rp=require(_0x4d63('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x4d63('0x4'));var attributes=require(_0x4d63('0x5'));module[_0x4d63('0x6')]=function(_0x3b573c,_0x3f188d){return _0x3b573c[_0x4d63('0x7')](_0x4d63('0x8'),attributes,{'tableName':_0x4d63('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf194=['define','Plugin','plugins','util','../../config/logger','api','moment','bluebird','path','rimraf','./plugin.attributes','exports'];(function(_0x279522,_0x497270){var _0xc6071d=function(_0x505793){while(--_0x505793){_0x279522['push'](_0x279522['shift']());}};_0xc6071d(++_0x497270);}(_0xf194,0x19b));var _0x4f19=function(_0x411275,_0x16ec18){_0x411275=_0x411275-0x0;var _0x21286b=_0xf194[_0x411275];return _0x21286b;};'use strict';var _=require('lodash');var util=require(_0x4f19('0x0'));var logger=require(_0x4f19('0x1'))(_0x4f19('0x2'));var moment=require(_0x4f19('0x3'));var BPromise=require(_0x4f19('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4f19('0x5'));var rimraf=require(_0x4f19('0x6'));var config=require('../../config/environment');var attributes=require(_0x4f19('0x7'));module[_0x4f19('0x8')]=function(_0x109d9a,_0x21b9cb){return _0x109d9a[_0x4f19('0x9')](_0x4f19('0xa'),attributes,{'tableName':_0x4f19('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.rpc.js b/server/api/plugin/plugin.rpc.js
index fbdd344..c7762b2 100644
--- a/server/api/plugin/plugin.rpc.js
+++ b/server/api/plugin/plugin.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5c17=['message','Plugin,\x20%s,\x20%s','result','catch','CreatePlugin','Plugin','options','raw','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','register','request','then','info','debug','Plugin,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x488b51,_0x166ab7){var _0x1d7d01=function(_0x4988c4){while(--_0x4988c4){_0x488b51['push'](_0x488b51['shift']());}};_0x1d7d01(++_0x166ab7);}(_0x5c17,0x1ba));var _0x75c1=function(_0x2634a7,_0x118508){_0x2634a7=_0x2634a7-0x0;var _0xa52e2c=_0x5c17[_0x2634a7];return _0xa52e2c;};'use strict';var _=require(_0x75c1('0x0'));var util=require(_0x75c1('0x1'));var moment=require('moment');var BPromise=require(_0x75c1('0x2'));var rs=require(_0x75c1('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x75c1('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x75c1('0x5'))(_0x75c1('0x6'));var config=require(_0x75c1('0x7'));var jayson=require(_0x75c1('0x8'));var client=jayson[_0x75c1('0x9')][_0x75c1('0xa')]({'port':0x232a});config[_0x75c1('0xb')]=_[_0x75c1('0xc')](config[_0x75c1('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x75c1('0xd'))(new Redis(config['redis']));require('./plugin.socket')[_0x75c1('0xe')](socket);function respondWithRpcPromise(_0x4253e2,_0x3f267e,_0x566dab){return new BPromise(function(_0xfe3eb5,_0xca6207){return client[_0x75c1('0xf')](_0x4253e2,_0x566dab)[_0x75c1('0x10')](function(_0x4d30b1){logger[_0x75c1('0x11')]('Plugin,\x20%s,\x20%s',_0x3f267e,'request\x20sent');logger[_0x75c1('0x12')](_0x75c1('0x13'),_0x3f267e,_0x75c1('0x14'),JSON[_0x75c1('0x15')](_0x4d30b1));if(_0x4d30b1['error']){if(_0x4d30b1[_0x75c1('0x16')]['code']===0x1f4){logger[_0x75c1('0x16')]('Plugin,\x20%s,\x20%s',_0x3f267e,_0x4d30b1[_0x75c1('0x16')][_0x75c1('0x17')]);return _0xca6207(_0x4d30b1['error']['message']);}logger[_0x75c1('0x16')](_0x75c1('0x18'),_0x3f267e,_0x4d30b1['error'][_0x75c1('0x17')]);return _0xfe3eb5(_0x4d30b1[_0x75c1('0x16')][_0x75c1('0x17')]);}else{logger[_0x75c1('0x11')]('Plugin,\x20%s,\x20%s',_0x3f267e,_0x75c1('0x14'));_0xfe3eb5(_0x4d30b1[_0x75c1('0x19')][_0x75c1('0x17')]);}})[_0x75c1('0x1a')](function(_0x506765){logger[_0x75c1('0x16')](_0x75c1('0x18'),_0x3f267e,_0x506765);_0xca6207(_0x506765);});});}exports[_0x75c1('0x1b')]=function(_0x506a3a){var _0x341d61=this;return new Promise(function(_0x13e956,_0x156571){return db[_0x75c1('0x1c')]['create'](_0x506a3a['body'],{'raw':_0x506a3a[_0x75c1('0x1d')]?_0x506a3a['options'][_0x75c1('0x1e')]===undefined?!![]:![]:!![]})['then'](function(_0xe6c281){logger[_0x75c1('0x11')](_0x75c1('0x1b'),_0x506a3a);logger[_0x75c1('0x12')]('CreatePlugin',_0x506a3a,JSON[_0x75c1('0x15')](_0xe6c281));_0x13e956(_0xe6c281);})[_0x75c1('0x1a')](function(_0x32ebb0){logger[_0x75c1('0x16')](_0x75c1('0x1b'),_0x32ebb0[_0x75c1('0x17')],_0x506a3a);_0x156571(_0x341d61[_0x75c1('0x16')](0x1f4,_0x32ebb0[_0x75c1('0x17')]));});});};
\ No newline at end of file
+var _0x1be6=['info','Plugin,\x20%s,\x20%s','request\x20sent','debug','Plugin,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreatePlugin','create','body','options','stringify','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','client','http','defaults','localhost','socket.io-emitter','redis','./plugin.socket','register','request'];(function(_0x556c96,_0x3c6ec0){var _0x1e9f84=function(_0x2496f1){while(--_0x2496f1){_0x556c96['push'](_0x556c96['shift']());}};_0x1e9f84(++_0x3c6ec0);}(_0x1be6,0x8f));var _0x61be=function(_0x5135f9,_0x26dd96){_0x5135f9=_0x5135f9-0x0;var _0x41ac1c=_0x1be6[_0x5135f9];return _0x41ac1c;};'use strict';var _=require(_0x61be('0x0'));var util=require(_0x61be('0x1'));var moment=require(_0x61be('0x2'));var BPromise=require(_0x61be('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x61be('0x4'));var db=require(_0x61be('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x61be('0x6'));var config=require(_0x61be('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x61be('0x8')][_0x61be('0x9')]({'port':0x232a});config['redis']=_[_0x61be('0xa')](config['redis'],{'host':_0x61be('0xb'),'port':0x18eb});var socket=require(_0x61be('0xc'))(new Redis(config[_0x61be('0xd')]));require(_0x61be('0xe'))[_0x61be('0xf')](socket);function respondWithRpcPromise(_0x2fe6af,_0x219536,_0x4329cf){return new BPromise(function(_0x227bb3,_0x3d4430){return client[_0x61be('0x10')](_0x2fe6af,_0x4329cf)['then'](function(_0x53a52e){logger[_0x61be('0x11')](_0x61be('0x12'),_0x219536,_0x61be('0x13'));logger[_0x61be('0x14')](_0x61be('0x15'),_0x219536,_0x61be('0x13'),JSON['stringify'](_0x53a52e));if(_0x53a52e['error']){if(_0x53a52e[_0x61be('0x16')][_0x61be('0x17')]===0x1f4){logger[_0x61be('0x16')]('Plugin,\x20%s,\x20%s',_0x219536,_0x53a52e[_0x61be('0x16')][_0x61be('0x18')]);return _0x3d4430(_0x53a52e[_0x61be('0x16')][_0x61be('0x18')]);}logger[_0x61be('0x16')](_0x61be('0x12'),_0x219536,_0x53a52e[_0x61be('0x16')][_0x61be('0x18')]);return _0x227bb3(_0x53a52e['error'][_0x61be('0x18')]);}else{logger[_0x61be('0x11')]('Plugin,\x20%s,\x20%s',_0x219536,'request\x20sent');_0x227bb3(_0x53a52e[_0x61be('0x19')][_0x61be('0x18')]);}})[_0x61be('0x1a')](function(_0x129c88){logger['error'](_0x61be('0x12'),_0x219536,_0x129c88);_0x3d4430(_0x129c88);});});}exports[_0x61be('0x1b')]=function(_0x36a828){var _0x2b737d=this;return new Promise(function(_0x131563,_0x4f5c69){return db['Plugin'][_0x61be('0x1c')](_0x36a828[_0x61be('0x1d')],{'raw':_0x36a828[_0x61be('0x1e')]?_0x36a828[_0x61be('0x1e')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x35ba){logger['info'](_0x61be('0x1b'),_0x36a828);logger[_0x61be('0x14')]('CreatePlugin',_0x36a828,JSON[_0x61be('0x1f')](_0x35ba));_0x131563(_0x35ba);})[_0x61be('0x1a')](function(_0x4b7f56){logger[_0x61be('0x16')](_0x61be('0x1b'),_0x4b7f56['message'],_0x36a828);_0x4f5c69(_0x2b737d[_0x61be('0x16')](0x1f4,_0x4b7f56[_0x61be('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.socket.js b/server/api/plugin/plugin.socket.js
index 6e2847a..1713027 100644
--- a/server/api/plugin/plugin.socket.js
+++ b/server/api/plugin/plugin.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6ba2=['update','removeListener','register','length','plugin:','save'];(function(_0xaa8c2c,_0x36d94f){var _0x18f841=function(_0x332014){while(--_0x332014){_0xaa8c2c['push'](_0xaa8c2c['shift']());}};_0x18f841(++_0x36d94f);}(_0x6ba2,0x1df));var _0x26ba=function(_0x2755fb,_0x5970f1){_0x2755fb=_0x2755fb-0x0;var _0x293f12=_0x6ba2[_0x2755fb];return _0x293f12;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x26ba('0x0'),'remove',_0x26ba('0x1')];function createListener(_0x1ebc81,_0x3263ac){return function(_0x40d5ce){_0x3263ac['emit'](_0x1ebc81,_0x40d5ce);};}function removeListener(_0x197fe1,_0x1303a3){return function(){PluginEvents[_0x26ba('0x2')](_0x197fe1,_0x1303a3);};}exports[_0x26ba('0x3')]=function(_0x4e7032){for(var _0xb1bb54=0x0,_0x24dfa6=events[_0x26ba('0x4')];_0xb1bb54<_0x24dfa6;_0xb1bb54++){var _0x14d3bd=events[_0xb1bb54];var _0x3409d7=createListener(_0x26ba('0x5')+_0x14d3bd,_0x4e7032);PluginEvents['on'](_0x14d3bd,_0x3409d7);}};
\ No newline at end of file
+var _0x6091=['removeListener','register','length','plugin:','./plugin.events','save','remove','update','emit'];(function(_0x42b557,_0x4134c9){var _0x3f0440=function(_0x2a2b9f){while(--_0x2a2b9f){_0x42b557['push'](_0x42b557['shift']());}};_0x3f0440(++_0x4134c9);}(_0x6091,0x1ab));var _0x1609=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x6091[_0x4cf98e];return _0x1623ac;};'use strict';var PluginEvents=require(_0x1609('0x0'));var events=[_0x1609('0x1'),_0x1609('0x2'),_0x1609('0x3')];function createListener(_0x3a8a15,_0x2784f8){return function(_0x3e93e4){_0x2784f8[_0x1609('0x4')](_0x3a8a15,_0x3e93e4);};}function removeListener(_0xe478c7,_0x26b16b){return function(){PluginEvents[_0x1609('0x5')](_0xe478c7,_0x26b16b);};}exports[_0x1609('0x6')]=function(_0x439561){for(var _0x2bd14d=0x0,_0x2758cf=events[_0x1609('0x7')];_0x2bd14d<_0x2758cf;_0x2bd14d++){var _0x55b450=events[_0x2bd14d];var _0x33aebe=createListener(_0x1609('0x8')+_0x55b450,_0x439561);PluginEvents['on'](_0x55b450,_0x33aebe);}};
\ No newline at end of file
diff --git a/server/api/pm2/index.js b/server/api/pm2/index.js
index 8168b48..1014d3c 100644
--- a/server/api/pm2/index.js
+++ b/server/api/pm2/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x4858e7,_0x2c7557){var _0x57748c=function(_0x293a95){while(--_0x293a95){_0x4858e7['push'](_0x4858e7['shift']());}};_0x57748c(++_0x2c7557);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4b7b62,_0x4920a9){_0x4b7b62=_0x4b7b62-0x0;var _0x2280df=_0xa9e0[_0x4b7b62];return _0x2280df;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router;
\ No newline at end of file
+var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x5f7412,_0x51ce32){var _0x4674c1=function(_0x1e77a8){while(--_0x1e77a8){_0x5f7412['push'](_0x5f7412['shift']());}};_0x4674c1(++_0x51ce32);}(_0xa9e0,0x123));var _0x0a9e=function(_0x21aec3,_0x5c97e9){_0x21aec3=_0x21aec3-0x0;var _0x288bbc=_0xa9e0[_0x21aec3];return _0x288bbc;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/pm2/pm2.controller.js b/server/api/pm2/pm2.controller.js
index 52d219e..fbc5347 100644
--- a/server/api/pm2/pm2.controller.js
+++ b/server/api/pm2/pm2.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x14c2=['stop','Unknown\x20status','delete','Unknown\x20id','lodash','../../config/logger','path','child_process','exec','sendStatus','json','error','stack','name','status','send','npm\x20install','info','index','list','reject','express','motion2','length','catch','describe','params','then','create','body','script','join','cwd','chdir','dirname','dump','Missing\x20name\x20and/or\x20path','restart'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x14c2,0x180));var _0x214c=function(_0x1dc5cd,_0x23854b){_0x1dc5cd=_0x1dc5cd-0x0;var _0x1d0718=_0x14c2[_0x1dc5cd];return _0x1d0718;};'use strict';var _=require(_0x214c('0x0'));var pm2=require('../../config/pm2');var logger=require(_0x214c('0x1'))('api');var path=require(_0x214c('0x2'));var exec=require(_0x214c('0x3'))[_0x214c('0x4')];var BPromise=require('bluebird');function handleEntityNotFound(_0x21bdbd,_0x450a79){return function(_0x474300){if(!_0x474300){_0x21bdbd[_0x214c('0x5')](0x194);;}return _0x474300;};}function respondWithResult(_0x18f1e6,_0x1f264e){_0x1f264e=_0x1f264e||0xc8;return function(_0x3e3463){if(_0x3e3463){return _0x18f1e6['status'](_0x1f264e)[_0x214c('0x6')](_0x3e3463);}return null;};}function handleError(_0x11ad5e,_0x48115a){_0x48115a=_0x48115a||0x1f4;return function(_0x59e2b4){logger[_0x214c('0x7')](_0x59e2b4[_0x214c('0x8')]);if(_0x59e2b4['name']){delete _0x59e2b4[_0x214c('0x9')];}_0x11ad5e[_0x214c('0xa')](_0x48115a)[_0x214c('0xb')](_0x59e2b4);};}function execChildProcess(){return new BPromise(function(_0x508162,_0x1ac171){exec(_0x214c('0xc'),function(_0x14c6bf,_0x2da4eb,_0x5d0497){logger[_0x214c('0xd')](_0x2da4eb);logger[_0x214c('0xd')](_0x5d0497);if(_0x14c6bf){logger[_0x214c('0x7')](_0x14c6bf);return _0x1ac171(_0x14c6bf);}return _0x508162(_0x2da4eb);});});}exports[_0x214c('0xe')]=function(_0x306d32,_0x14f7d9){return pm2[_0x214c('0xf')]()['then'](function(_0x104aab){if(_0x104aab){var _0x1b067e=_[_0x214c('0x10')](_0x104aab,function(_0x290b77){return _0x290b77[_0x214c('0x9')]===_0x214c('0x11')||_0x290b77[_0x214c('0x9')]===_0x214c('0x12');});return{'rows':_0x1b067e,'count':_0x1b067e[_0x214c('0x13')]};}return null;})['then'](respondWithResult(_0x14f7d9,null))[_0x214c('0x14')](handleError(_0x14f7d9,null));};exports['show']=function(_0x319e88,_0x5b121d){return pm2[_0x214c('0x15')](_0x319e88[_0x214c('0x16')]['id'])[_0x214c('0x17')](respondWithResult(_0x5b121d,null))[_0x214c('0x17')](handleEntityNotFound(_0x5b121d,null))[_0x214c('0x14')](handleError(_0x5b121d,null));};exports[_0x214c('0x18')]=function(_0x3921aa,_0x43b386){if(_0x3921aa[_0x214c('0x19')][_0x214c('0x9')]&&_0x3921aa[_0x214c('0x19')][_0x214c('0x1a')]){var _0x30a79c=path[_0x214c('0x1b')](__dirname,'../../files/plugins',_0x3921aa[_0x214c('0x19')][_0x214c('0x1a')]);var _0x1d83ad=process[_0x214c('0x1c')]();process[_0x214c('0x1d')](path[_0x214c('0x1e')](_0x30a79c));return execChildProcess()['then'](function(_0x1e6ed7){process['chdir'](_0x1d83ad);return pm2['start']({'name':_0x3921aa['body']['name'],'script':_0x30a79c});})[_0x214c('0x17')](function(_0x26e95c){pm2[_0x214c('0x1f')]();return _0x26e95c[0x0];})['then'](respondWithResult(_0x43b386,0xc9))[_0x214c('0x14')](handleError(_0x43b386,null));}else{return _0x43b386['status'](0x1f4)[_0x214c('0xb')]({'message':_0x214c('0x20')});}};exports['update']=function(_0x44efa6,_0x3c19d9){if(_0x44efa6[_0x214c('0x19')]['id']){delete _0x44efa6['body']['id'];}var _0x204e00={'online':_0x214c('0x21'),'stopped':_0x214c('0x22')};if(_0x204e00['hasOwnProperty'](_0x44efa6[_0x214c('0x19')][_0x214c('0xa')])){return pm2[_0x204e00[_0x44efa6[_0x214c('0x19')]['status']]](_0x44efa6['params']['id'])['then'](respondWithResult(_0x3c19d9,0xc8))[_0x214c('0x14')](handleError(_0x3c19d9,null));}else{return _0x3c19d9['status'](0x1f4)[_0x214c('0xb')]({'message':_0x214c('0x23')});}};exports['destroy']=function(_0x5d3856,_0x31cb67){if(_0x5d3856['body']['id']){delete _0x5d3856[_0x214c('0x19')]['id'];}if(_0x5d3856[_0x214c('0x16')]['id']){return pm2[_0x214c('0x24')](_0x5d3856[_0x214c('0x16')]['id'])[_0x214c('0x17')](function(_0x1ef67c){pm2['dump']();return _0x1ef67c[0x0];})[_0x214c('0x17')](respondWithResult(_0x31cb67,null))[_0x214c('0x14')](handleError(_0x31cb67,null));}else{return _0x31cb67['status'](0x1f4)['send']({'message':_0x214c('0x25')});}};
\ No newline at end of file
+var _0x556c=['info','index','list','then','reject','express','length','catch','show','body','script','join','chdir','dirname','start','Missing\x20name\x20and/or\x20path','update','restart','hasOwnProperty','params','Unknown\x20status','dump','Unknown\x20id','../../config/pm2','../../config/logger','path','child_process','exec','sendStatus','status','json','error','stack','name','send','npm\x20install'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x556c,0xa7));var _0xc556=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x556c[_0x20a584];return _0x4b41a8;};'use strict';var _=require('lodash');var pm2=require(_0xc556('0x0'));var logger=require(_0xc556('0x1'))('api');var path=require(_0xc556('0x2'));var exec=require(_0xc556('0x3'))[_0xc556('0x4')];var BPromise=require('bluebird');function handleEntityNotFound(_0x5c702d,_0x113ce8){return function(_0x33a522){if(!_0x33a522){_0x5c702d[_0xc556('0x5')](0x194);;}return _0x33a522;};}function respondWithResult(_0x1dab9e,_0xff5fc){_0xff5fc=_0xff5fc||0xc8;return function(_0x478de2){if(_0x478de2){return _0x1dab9e[_0xc556('0x6')](_0xff5fc)[_0xc556('0x7')](_0x478de2);}return null;};}function handleError(_0x41c829,_0x4c68ee){_0x4c68ee=_0x4c68ee||0x1f4;return function(_0x56bdfc){logger[_0xc556('0x8')](_0x56bdfc[_0xc556('0x9')]);if(_0x56bdfc['name']){delete _0x56bdfc[_0xc556('0xa')];}_0x41c829[_0xc556('0x6')](_0x4c68ee)[_0xc556('0xb')](_0x56bdfc);};}function execChildProcess(){return new BPromise(function(_0x209b1b,_0x476f30){exec(_0xc556('0xc'),function(_0x3fc735,_0x5e4ad3,_0x2ce1e2){logger[_0xc556('0xd')](_0x5e4ad3);logger[_0xc556('0xd')](_0x2ce1e2);if(_0x3fc735){logger[_0xc556('0x8')](_0x3fc735);return _0x476f30(_0x3fc735);}return _0x209b1b(_0x5e4ad3);});});}exports[_0xc556('0xe')]=function(_0x2861ad,_0x1cd23c){return pm2[_0xc556('0xf')]()[_0xc556('0x10')](function(_0x5a4f58){if(_0x5a4f58){var _0x37268c=_[_0xc556('0x11')](_0x5a4f58,function(_0x1ba416){return _0x1ba416[_0xc556('0xa')]===_0xc556('0x12')||_0x1ba416[_0xc556('0xa')]==='motion2';});return{'rows':_0x37268c,'count':_0x37268c[_0xc556('0x13')]};}return null;})['then'](respondWithResult(_0x1cd23c,null))[_0xc556('0x14')](handleError(_0x1cd23c,null));};exports[_0xc556('0x15')]=function(_0x4d8d93,_0x376254){return pm2['describe'](_0x4d8d93['params']['id'])[_0xc556('0x10')](respondWithResult(_0x376254,null))[_0xc556('0x10')](handleEntityNotFound(_0x376254,null))['catch'](handleError(_0x376254,null));};exports['create']=function(_0x449905,_0x3a1134){if(_0x449905[_0xc556('0x16')][_0xc556('0xa')]&&_0x449905[_0xc556('0x16')][_0xc556('0x17')]){var _0x58f7d1=path[_0xc556('0x18')](__dirname,'../../files/plugins',_0x449905[_0xc556('0x16')][_0xc556('0x17')]);var _0xd24557=process['cwd']();process[_0xc556('0x19')](path[_0xc556('0x1a')](_0x58f7d1));return execChildProcess()['then'](function(_0x56ec1c){process[_0xc556('0x19')](_0xd24557);return pm2[_0xc556('0x1b')]({'name':_0x449905[_0xc556('0x16')]['name'],'script':_0x58f7d1});})[_0xc556('0x10')](function(_0x1a1541){pm2['dump']();return _0x1a1541[0x0];})[_0xc556('0x10')](respondWithResult(_0x3a1134,0xc9))[_0xc556('0x14')](handleError(_0x3a1134,null));}else{return _0x3a1134[_0xc556('0x6')](0x1f4)[_0xc556('0xb')]({'message':_0xc556('0x1c')});}};exports[_0xc556('0x1d')]=function(_0x1a6a4d,_0x42484d){if(_0x1a6a4d[_0xc556('0x16')]['id']){delete _0x1a6a4d['body']['id'];}var _0x2ed954={'online':_0xc556('0x1e'),'stopped':'stop'};if(_0x2ed954[_0xc556('0x1f')](_0x1a6a4d[_0xc556('0x16')][_0xc556('0x6')])){return pm2[_0x2ed954[_0x1a6a4d[_0xc556('0x16')][_0xc556('0x6')]]](_0x1a6a4d[_0xc556('0x20')]['id'])[_0xc556('0x10')](respondWithResult(_0x42484d,0xc8))[_0xc556('0x14')](handleError(_0x42484d,null));}else{return _0x42484d[_0xc556('0x6')](0x1f4)[_0xc556('0xb')]({'message':_0xc556('0x21')});}};exports['destroy']=function(_0x2f1044,_0x3d4d30){if(_0x2f1044[_0xc556('0x16')]['id']){delete _0x2f1044['body']['id'];}if(_0x2f1044[_0xc556('0x20')]['id']){return pm2['delete'](_0x2f1044[_0xc556('0x20')]['id'])['then'](function(_0x3e91d1){pm2[_0xc556('0x22')]();return _0x3e91d1[0x0];})[_0xc556('0x10')](respondWithResult(_0x3d4d30,null))[_0xc556('0x14')](handleError(_0x3d4d30,null));}else{return _0x3d4d30[_0xc556('0x6')](0x1f4)[_0xc556('0xb')]({'message':_0xc556('0x23')});}};
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/index.js b/server/api/reportAgentPreview/index.js
index 71c62c3..7a4e0b8 100644
--- a/server/api/reportAgentPreview/index.js
+++ b/server/api/reportAgentPreview/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb931=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','exports','path'];(function(_0x243fc0,_0x2fa712){var _0x15b98d=function(_0x20c11f){while(--_0x20c11f){_0x243fc0['push'](_0x243fc0['shift']());}};_0x15b98d(++_0x2fa712);}(_0xb931,0x155));var _0x1b93=function(_0x4564d3,_0x242d08){_0x4564d3=_0x4564d3-0x0;var _0x52b256=_0xb931[_0x4564d3];return _0x52b256;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1b93('0x0'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x1b93('0x1')]();var auth=require(_0x1b93('0x2'));var interaction=require(_0x1b93('0x3'));var config=require(_0x1b93('0x4'));module[_0x1b93('0x5')]=router;
\ No newline at end of file
+var _0x7eff=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','util','path','connect-timeout'];(function(_0x3ba924,_0x3b99f0){var _0x4cc1df=function(_0x15bf28){while(--_0x15bf28){_0x3ba924['push'](_0x3ba924['shift']());}};_0x4cc1df(++_0x3b99f0);}(_0x7eff,0x162));var _0xf7ef=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x7eff[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require('multer');var util=require(_0xf7ef('0x0'));var path=require(_0xf7ef('0x1'));var timeout=require(_0xf7ef('0x2'));var express=require('express');var router=express[_0xf7ef('0x3')]();var auth=require(_0xf7ef('0x4'));var interaction=require(_0xf7ef('0x5'));var config=require(_0xf7ef('0x6'));module['exports']=router;
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/reportAgentPreview.attributes.js b/server/api/reportAgentPreview/reportAgentPreview.attributes.js
index b4bcd2a..b8d043c 100644
--- a/server/api/reportAgentPreview/reportAgentPreview.attributes.js
+++ b/server/api/reportAgentPreview/reportAgentPreview.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0854=['DATE','sequelize','exports','INTEGER','STRING'];(function(_0x3ca794,_0x489e95){var _0x5c75d2=function(_0xfb5b79){while(--_0xfb5b79){_0x3ca794['push'](_0x3ca794['shift']());}};_0x5c75d2(++_0x489e95);}(_0x0854,0x13c));var _0x4085=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x0854[_0xa464c9];return _0x3d73c4;};'use strict';var Sequelize=require(_0x4085('0x0'));module[_0x4085('0x1')]={'state':{'type':Sequelize[_0x4085('0x2')](0x2)},'statedesc':{'type':Sequelize[_0x4085('0x3')]},'scheduledat':{'type':Sequelize[_0x4085('0x4')]},'uniqueid':{'type':Sequelize[_0x4085('0x3')]},'starttime':{'type':Sequelize[_0x4085('0x4')]},'responsetime':{'type':Sequelize[_0x4085('0x4')]},'ringtime':{'type':Sequelize[_0x4085('0x2')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0x4085('0x3')]},'campaigntype':{'type':Sequelize[_0x4085('0x3')]},'membername':{'type':Sequelize[_0x4085('0x3')]}};
\ No newline at end of file
+var _0x53dc=['INTEGER','STRING','DATE','sequelize','exports'];(function(_0x18894b,_0xb20093){var _0x4b3230=function(_0x434091){while(--_0x434091){_0x18894b['push'](_0x18894b['shift']());}};_0x4b3230(++_0xb20093);}(_0x53dc,0x12f));var _0xc53d=function(_0x3c074f,_0x3634ec){_0x3c074f=_0x3c074f-0x0;var _0x12e266=_0x53dc[_0x3c074f];return _0x12e266;};'use strict';var Sequelize=require(_0xc53d('0x0'));module[_0xc53d('0x1')]={'state':{'type':Sequelize[_0xc53d('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xc53d('0x3')]},'scheduledat':{'type':Sequelize[_0xc53d('0x4')]},'uniqueid':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0xc53d('0x4')]},'responsetime':{'type':Sequelize[_0xc53d('0x4')]},'ringtime':{'type':Sequelize[_0xc53d('0x2')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xc53d('0x3')]},'campaigntype':{'type':Sequelize[_0xc53d('0x3')]},'membername':{'type':Sequelize[_0xc53d('0x3')]}};
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/reportAgentPreview.model.js b/server/api/reportAgentPreview/reportAgentPreview.model.js
index 604c1e6..3f2519c 100644
--- a/server/api/reportAgentPreview/reportAgentPreview.model.js
+++ b/server/api/reportAgentPreview/reportAgentPreview.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x53cc=['api','moment','request-promise','path','rimraf','../../config/environment','./reportAgentPreview.attributes','define','ReportAgentPreview','report_agent_preview','lodash','util'];(function(_0x997df2,_0x1b4002){var _0xfeac75=function(_0xf53b8e){while(--_0xf53b8e){_0x997df2['push'](_0x997df2['shift']());}};_0xfeac75(++_0x1b4002);}(_0x53cc,0x1a2));var _0xc53c=function(_0x11cbb5,_0x390441){_0x11cbb5=_0x11cbb5-0x0;var _0x54b8d3=_0x53cc[_0x11cbb5];return _0x54b8d3;};'use strict';var _=require(_0xc53c('0x0'));var util=require(_0xc53c('0x1'));var logger=require('../../config/logger')(_0xc53c('0x2'));var moment=require(_0xc53c('0x3'));var BPromise=require('bluebird');var rp=require(_0xc53c('0x4'));var fs=require('fs');var path=require(_0xc53c('0x5'));var rimraf=require(_0xc53c('0x6'));var config=require(_0xc53c('0x7'));var attributes=require(_0xc53c('0x8'));module['exports']=function(_0x3ff2d4,_0x1b3ae2){return _0x3ff2d4[_0xc53c('0x9')](_0xc53c('0xa'),attributes,{'tableName':_0xc53c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x10db=['path','rimraf','../../config/environment','./reportAgentPreview.attributes','exports','define','ReportAgentPreview','report_agent_preview','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x470e67,_0x4a596d){var _0x28bbde=function(_0x1bbf56){while(--_0x1bbf56){_0x470e67['push'](_0x470e67['shift']());}};_0x28bbde(++_0x4a596d);}(_0x10db,0x104));var _0xb10d=function(_0x22fd9b,_0x462500){_0x22fd9b=_0x22fd9b-0x0;var _0x42f120=_0x10db[_0x22fd9b];return _0x42f120;};'use strict';var _=require(_0xb10d('0x0'));var util=require(_0xb10d('0x1'));var logger=require(_0xb10d('0x2'))('api');var moment=require(_0xb10d('0x3'));var BPromise=require(_0xb10d('0x4'));var rp=require(_0xb10d('0x5'));var fs=require('fs');var path=require(_0xb10d('0x6'));var rimraf=require(_0xb10d('0x7'));var config=require(_0xb10d('0x8'));var attributes=require(_0xb10d('0x9'));module[_0xb10d('0xa')]=function(_0x20304c,_0x5ef839){return _0x20304c[_0xb10d('0xb')](_0xb10d('0xc'),attributes,{'tableName':_0xb10d('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/reportAgentPreview.rpc.js b/server/api/reportAgentPreview/reportAgentPreview.rpc.js
index fb2c3fe..7482a9c 100644
--- a/server/api/reportAgentPreview/reportAgentPreview.rpc.js
+++ b/server/api/reportAgentPreview/reportAgentPreview.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2a68=['then','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','CreateReportAgentPreview','ReportAgentPreview','body','raw'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2a68,0x89));var _0x82a6=function(_0x9c1f4f,_0x114805){_0x9c1f4f=_0x9c1f4f-0x0;var _0x1edb71=_0x2a68[_0x9c1f4f];return _0x1edb71;};'use strict';var _=require(_0x82a6('0x0'));var util=require(_0x82a6('0x1'));var moment=require(_0x82a6('0x2'));var BPromise=require('bluebird');var rs=require(_0x82a6('0x3'));var fs=require('fs');var Redis=require(_0x82a6('0x4'));var db=require(_0x82a6('0x5'))['db'];var utils=require(_0x82a6('0x6'));var logger=require('../../config/logger')(_0x82a6('0x7'));var config=require('../../config/environment');var jayson=require(_0x82a6('0x8'));var client=jayson[_0x82a6('0x9')][_0x82a6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x14609d,_0x22afbc,_0x41878a){return new BPromise(function(_0x10fc56,_0x46fdad){return client[_0x82a6('0xb')](_0x14609d,_0x41878a)['then'](function(_0x5a4cf1){logger[_0x82a6('0xc')](_0x82a6('0xd'),_0x22afbc,_0x82a6('0xe'));logger[_0x82a6('0xf')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x22afbc,'request\x20sent',JSON[_0x82a6('0x10')](_0x5a4cf1));if(_0x5a4cf1[_0x82a6('0x11')]){if(_0x5a4cf1[_0x82a6('0x11')][_0x82a6('0x12')]===0x1f4){logger['error'](_0x82a6('0xd'),_0x22afbc,_0x5a4cf1[_0x82a6('0x11')][_0x82a6('0x13')]);return _0x46fdad(_0x5a4cf1['error'][_0x82a6('0x13')]);}logger[_0x82a6('0x11')](_0x82a6('0xd'),_0x22afbc,_0x5a4cf1['error'][_0x82a6('0x13')]);return _0x10fc56(_0x5a4cf1[_0x82a6('0x11')][_0x82a6('0x13')]);}else{logger[_0x82a6('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x22afbc,'request\x20sent');_0x10fc56(_0x5a4cf1[_0x82a6('0x14')][_0x82a6('0x13')]);}})['catch'](function(_0x19255e){logger[_0x82a6('0x11')]('ReportAgentPreview,\x20%s,\x20%s',_0x22afbc,_0x19255e);_0x46fdad(_0x19255e);});});}exports[_0x82a6('0x15')]=function(_0x4af211){var _0x12163e=this;return new Promise(function(_0x297d4e,_0x33c42b){return db[_0x82a6('0x16')]['create'](_0x4af211[_0x82a6('0x17')],{'raw':_0x4af211['options']?_0x4af211['options'][_0x82a6('0x18')]===undefined?!![]:![]:!![]})[_0x82a6('0x19')](function(_0x505285){logger[_0x82a6('0xc')](_0x82a6('0x15'),_0x4af211);logger[_0x82a6('0xf')](_0x82a6('0x15'),_0x4af211,JSON[_0x82a6('0x10')](_0x505285));_0x297d4e(_0x505285);})[_0x82a6('0x1a')](function(_0x27e55e){logger['error'](_0x82a6('0x15'),_0x27e55e[_0x82a6('0x13')],_0x4af211);_0x33c42b(_0x12163e[_0x82a6('0x11')](0x1f4,_0x27e55e[_0x82a6('0x13')]));});});};
\ No newline at end of file
+var _0x966b=['http','request','then','info','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','create','body','options','raw','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client'];(function(_0x3b5ad9,_0x223867){var _0x611ae9=function(_0x1c5e28){while(--_0x1c5e28){_0x3b5ad9['push'](_0x3b5ad9['shift']());}};_0x611ae9(++_0x223867);}(_0x966b,0x19b));var _0xb966=function(_0x3b0358,_0x33128f){_0x3b0358=_0x3b0358-0x0;var _0x4361fa=_0x966b[_0x3b0358];return _0x4361fa;};'use strict';var _=require(_0xb966('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb966('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb966('0x2'));var db=require(_0xb966('0x3'))['db'];var utils=require(_0xb966('0x4'));var logger=require(_0xb966('0x5'))(_0xb966('0x6'));var config=require(_0xb966('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xb966('0x8')][_0xb966('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1dc24c,_0x238d24,_0x994c02){return new BPromise(function(_0x29a2ea,_0x5ab7bf){return client[_0xb966('0xa')](_0x1dc24c,_0x994c02)[_0xb966('0xb')](function(_0x1da9e5){logger[_0xb966('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x238d24,_0xb966('0xd'));logger[_0xb966('0xe')](_0xb966('0xf'),_0x238d24,_0xb966('0xd'),JSON[_0xb966('0x10')](_0x1da9e5));if(_0x1da9e5[_0xb966('0x11')]){if(_0x1da9e5[_0xb966('0x11')]['code']===0x1f4){logger[_0xb966('0x11')](_0xb966('0x12'),_0x238d24,_0x1da9e5[_0xb966('0x11')][_0xb966('0x13')]);return _0x5ab7bf(_0x1da9e5[_0xb966('0x11')][_0xb966('0x13')]);}logger[_0xb966('0x11')]('ReportAgentPreview,\x20%s,\x20%s',_0x238d24,_0x1da9e5[_0xb966('0x11')][_0xb966('0x13')]);return _0x29a2ea(_0x1da9e5[_0xb966('0x11')][_0xb966('0x13')]);}else{logger[_0xb966('0xc')](_0xb966('0x12'),_0x238d24,_0xb966('0xd'));_0x29a2ea(_0x1da9e5[_0xb966('0x14')][_0xb966('0x13')]);}})[_0xb966('0x15')](function(_0x561058){logger['error'](_0xb966('0x12'),_0x238d24,_0x561058);_0x5ab7bf(_0x561058);});});}exports[_0xb966('0x16')]=function(_0x8ec5e5){var _0x140d76=this;return new Promise(function(_0x1d0fe1,_0x28ea60){return db[_0xb966('0x17')][_0xb966('0x18')](_0x8ec5e5[_0xb966('0x19')],{'raw':_0x8ec5e5['options']?_0x8ec5e5[_0xb966('0x1a')][_0xb966('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x1367ee){logger[_0xb966('0xc')](_0xb966('0x16'),_0x8ec5e5);logger[_0xb966('0xe')](_0xb966('0x16'),_0x8ec5e5,JSON[_0xb966('0x10')](_0x1367ee));_0x1d0fe1(_0x1367ee);})[_0xb966('0x15')](function(_0xc3cf3c){logger[_0xb966('0x11')](_0xb966('0x16'),_0xc3cf3c[_0xb966('0x13')],_0x8ec5e5);_0x28ea60(_0x140d76[_0xb966('0x11')](0x1f4,_0xc3cf3c[_0xb966('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/rpc/index.js b/server/api/rpc/index.js
index 281d10f..5af3a6d 100644
--- a/server/api/rpc/index.js
+++ b/server/api/rpc/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2d75=['/voice/queues/channels/:uniqueid/redirect/:exten','/voice/queues/:id','showVoiceQueues','outbound','/outbound/channels','/agents','put','/agents/:id/capacity','agentCapacity','telephones','/trunks','/campaigns','campaigns','/fax/accounts','faxAccounts','chatQueuesWaitingInteractions','/mail/queues/waitinginteractions','mailQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','smsQueuesWaitingInteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions','post','queueNotify','showMailQueues','chat','/chat/queues/:id','/fax/queues/:id/notify','fax','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/sms/queues/:id/notify','showSmsQueues','agentNotify','exports','util','path','express','../../components/auth/service','get','/voice/channels','isAuthenticated','voiceChannels','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','/voice/queues','/chat/queues','/mail/queues','mailQueues','/mail/accounts','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','smsQueues','/fax/queues','/voice/queues/preview/:id','voiceQueuesPreview','voiceQueuesChannels','/voice/queues/channels/:uniqueid','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup'];(function(_0x474b52,_0x2ffcf6){var _0x379844=function(_0xe6d817){while(--_0xe6d817){_0x474b52['push'](_0x474b52['shift']());}};_0x379844(++_0x2ffcf6);}(_0x2d75,0xa4));var _0x52d7=function(_0x2089b3,_0x31fbde){_0x2089b3=_0x2089b3-0x0;var _0x181087=_0x2d75[_0x2089b3];return _0x181087;};'use strict';var multer=require('multer');var util=require(_0x52d7('0x0'));var path=require(_0x52d7('0x1'));var express=require(_0x52d7('0x2'));var router=express['Router']();var auth=require(_0x52d7('0x3'));var controller=require('./rpc.controller');router[_0x52d7('0x4')](_0x52d7('0x5'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x7')]);router['get']('/voice/channels/:uniqueid/mixmonitor',auth['isAuthenticated'](),controller[_0x52d7('0x8')]);router[_0x52d7('0x4')](_0x52d7('0x9'),auth[_0x52d7('0x6')](),controller[_0x52d7('0xa')]);router[_0x52d7('0x4')](_0x52d7('0xb'),auth['isAuthenticated'](),controller['voiceQueues']);router['get'](_0x52d7('0xc'),auth[_0x52d7('0x6')](),controller['chatQueues']);router[_0x52d7('0x4')](_0x52d7('0xd'),auth[_0x52d7('0x6')](),controller[_0x52d7('0xe')]);router[_0x52d7('0x4')](_0x52d7('0xf'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x10')]);router[_0x52d7('0x4')](_0x52d7('0x11'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x12')]);router[_0x52d7('0x4')](_0x52d7('0x13'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x14')]);router['get'](_0x52d7('0x15'),auth[_0x52d7('0x6')](),controller['faxQueues']);router[_0x52d7('0x4')](_0x52d7('0x16'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x17')]);router[_0x52d7('0x4')]('/voice/queues/channels',auth[_0x52d7('0x6')](),controller[_0x52d7('0x18')]);router[_0x52d7('0x4')](_0x52d7('0x19'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x1a')]);router['get'](_0x52d7('0x1b'),auth[_0x52d7('0x6')](),controller['voiceQueuesChannelHangup']);router[_0x52d7('0x4')](_0x52d7('0x1c'),auth[_0x52d7('0x6')](),controller['voiceQueuesChannelRedirect']);router[_0x52d7('0x4')](_0x52d7('0x1d'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x1e')]);router[_0x52d7('0x4')]('/outbound',auth[_0x52d7('0x6')](),controller[_0x52d7('0x1f')]);router[_0x52d7('0x4')](_0x52d7('0x20'),auth[_0x52d7('0x6')](),controller['outboundChannels']);router['get'](_0x52d7('0x21'),auth[_0x52d7('0x6')](),controller['agents']);router[_0x52d7('0x22')](_0x52d7('0x23'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x24')]);router[_0x52d7('0x4')]('/telephones',auth['isAuthenticated'](),controller[_0x52d7('0x25')]);router['get'](_0x52d7('0x26'),auth['isAuthenticated'](),controller['trunks']);router[_0x52d7('0x4')](_0x52d7('0x27'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x28')]);router[_0x52d7('0x4')](_0x52d7('0x29'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x2a')]);router[_0x52d7('0x4')]('/chat/queues/waitinginteractions',auth[_0x52d7('0x6')](),controller[_0x52d7('0x2b')]);router['get'](_0x52d7('0x2c'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x2d')]);router[_0x52d7('0x4')](_0x52d7('0x2e'),auth[_0x52d7('0x6')](),controller['openchannelQueuesWaitingInteractions']);router[_0x52d7('0x4')]('/sms/queues/waitinginteractions',auth['isAuthenticated'](),controller[_0x52d7('0x2f')]);router[_0x52d7('0x4')](_0x52d7('0x30'),auth[_0x52d7('0x6')](),controller[_0x52d7('0x31')]);router[_0x52d7('0x32')]('/mail/queues/:id/notify',auth[_0x52d7('0x6')](),controller[_0x52d7('0x33')]('mail'));router[_0x52d7('0x4')]('/mail/queues/:id',auth['isAuthenticated'](),controller[_0x52d7('0x34')]);router[_0x52d7('0x32')]('/chat/queues/:id/notify',auth[_0x52d7('0x6')](),controller[_0x52d7('0x33')](_0x52d7('0x35')));router[_0x52d7('0x4')](_0x52d7('0x36'),auth['isAuthenticated'](),controller['showChatQueues']);router[_0x52d7('0x32')](_0x52d7('0x37'),auth['isAuthenticated'](),controller[_0x52d7('0x33')](_0x52d7('0x38')));router['get']('/fax/queues/:id',auth[_0x52d7('0x6')](),controller[_0x52d7('0x39')]);router[_0x52d7('0x32')](_0x52d7('0x3a'),auth['isAuthenticated'](),controller['queueNotify'](_0x52d7('0x3b')));router['get']('/openchannel/queues/:id',auth['isAuthenticated'](),controller['showOpenchannelQueues']);router['post'](_0x52d7('0x3c'),auth[_0x52d7('0x6')](),controller['queueNotify']('sms'));router[_0x52d7('0x4')]('/sms/queues/:id',auth[_0x52d7('0x6')](),controller[_0x52d7('0x3d')]);router[_0x52d7('0x32')]('/agents/:id/notify',auth[_0x52d7('0x6')](),controller[_0x52d7('0x3e')]);module[_0x52d7('0x3f')]=router;
\ No newline at end of file
+var _0xbfc6=['/outbound','agents','put','/agents/:id/capacity','telephones','/trunks','/campaigns','campaigns','faxAccounts','/chat/queues/waitinginteractions','mailQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','openchannelQueuesWaitingInteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions','post','mail','/mail/queues/:id','showMailQueues','/chat/queues/:id/notify','queueNotify','/chat/queues/:id','fax','/fax/queues/:id','showFaxQueues','openchannel','/openchannel/queues/:id','showOpenchannelQueues','/sms/queues/:id/notify','sms','showSmsQueues','/agents/:id/notify','exports','multer','util','path','express','Router','../../components/auth/service','./rpc.controller','isAuthenticated','voiceChannels','get','/voice/channels/:uniqueid/mixmonitor','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','voiceQueues','/chat/queues','chatQueues','mailQueues','/mail/accounts','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','smsQueues','/fax/queues','faxQueues','/voice/queues/preview/:id','voiceQueuesChannels','/voice/queues/channels/:uniqueid','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues'];(function(_0x6f6f18,_0x406aee){var _0x57c18c=function(_0x289369){while(--_0x289369){_0x6f6f18['push'](_0x6f6f18['shift']());}};_0x57c18c(++_0x406aee);}(_0xbfc6,0xea));var _0x6bfc=function(_0x1f01a4,_0x114239){_0x1f01a4=_0x1f01a4-0x0;var _0xd9dfac=_0xbfc6[_0x1f01a4];return _0xd9dfac;};'use strict';var multer=require(_0x6bfc('0x0'));var util=require(_0x6bfc('0x1'));var path=require(_0x6bfc('0x2'));var express=require(_0x6bfc('0x3'));var router=express[_0x6bfc('0x4')]();var auth=require(_0x6bfc('0x5'));var controller=require(_0x6bfc('0x6'));router['get']('/voice/channels',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x8')]);router[_0x6bfc('0x9')](_0x6bfc('0xa'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0xb')]);router[_0x6bfc('0x9')](_0x6bfc('0xc'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0xd')]);router[_0x6bfc('0x9')]('/voice/queues',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0xe')]);router['get'](_0x6bfc('0xf'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x10')]);router[_0x6bfc('0x9')]('/mail/queues',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x11')]);router[_0x6bfc('0x9')](_0x6bfc('0x12'),auth['isAuthenticated'](),controller[_0x6bfc('0x13')]);router[_0x6bfc('0x9')](_0x6bfc('0x14'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x15')]);router[_0x6bfc('0x9')](_0x6bfc('0x16'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x17')]);router[_0x6bfc('0x9')](_0x6bfc('0x18'),auth['isAuthenticated'](),controller[_0x6bfc('0x19')]);router[_0x6bfc('0x9')](_0x6bfc('0x1a'),auth[_0x6bfc('0x7')](),controller['voiceQueuesPreview']);router[_0x6bfc('0x9')]('/voice/queues/channels',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x1b')]);router['get'](_0x6bfc('0x1c'),auth['isAuthenticated'](),controller[_0x6bfc('0x1d')]);router[_0x6bfc('0x9')](_0x6bfc('0x1e'),auth[_0x6bfc('0x7')](),controller['voiceQueuesChannelHangup']);router[_0x6bfc('0x9')]('/voice/queues/channels/:uniqueid/redirect/:exten',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x1f')]);router['get'](_0x6bfc('0x20'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x21')]);router[_0x6bfc('0x9')](_0x6bfc('0x22'),auth[_0x6bfc('0x7')](),controller['outbound']);router['get']('/outbound/channels',auth[_0x6bfc('0x7')](),controller['outboundChannels']);router[_0x6bfc('0x9')]('/agents',auth['isAuthenticated'](),controller[_0x6bfc('0x23')]);router[_0x6bfc('0x24')](_0x6bfc('0x25'),auth[_0x6bfc('0x7')](),controller['agentCapacity']);router['get']('/telephones',auth['isAuthenticated'](),controller[_0x6bfc('0x26')]);router['get'](_0x6bfc('0x27'),auth[_0x6bfc('0x7')](),controller['trunks']);router[_0x6bfc('0x9')](_0x6bfc('0x28'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x29')]);router[_0x6bfc('0x9')]('/fax/accounts',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x2a')]);router[_0x6bfc('0x9')](_0x6bfc('0x2b'),auth['isAuthenticated'](),controller['chatQueuesWaitingInteractions']);router['get']('/mail/queues/waitinginteractions',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x2c')]);router[_0x6bfc('0x9')](_0x6bfc('0x2d'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x2e')]);router[_0x6bfc('0x9')]('/sms/queues/waitinginteractions',auth['isAuthenticated'](),controller['smsQueuesWaitingInteractions']);router[_0x6bfc('0x9')](_0x6bfc('0x2f'),auth['isAuthenticated'](),controller[_0x6bfc('0x30')]);router[_0x6bfc('0x31')]('/mail/queues/:id/notify',auth['isAuthenticated'](),controller['queueNotify'](_0x6bfc('0x32')));router['get'](_0x6bfc('0x33'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x34')]);router[_0x6bfc('0x31')](_0x6bfc('0x35'),auth['isAuthenticated'](),controller[_0x6bfc('0x36')]('chat'));router[_0x6bfc('0x9')](_0x6bfc('0x37'),auth['isAuthenticated'](),controller['showChatQueues']);router[_0x6bfc('0x31')]('/fax/queues/:id/notify',auth['isAuthenticated'](),controller['queueNotify'](_0x6bfc('0x38')));router[_0x6bfc('0x9')](_0x6bfc('0x39'),auth['isAuthenticated'](),controller[_0x6bfc('0x3a')]);router['post']('/openchannel/queues/:id/notify',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x36')](_0x6bfc('0x3b')));router[_0x6bfc('0x9')](_0x6bfc('0x3c'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x3d')]);router[_0x6bfc('0x31')](_0x6bfc('0x3e'),auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x36')](_0x6bfc('0x3f')));router[_0x6bfc('0x9')]('/sms/queues/:id',auth[_0x6bfc('0x7')](),controller[_0x6bfc('0x40')]);router[_0x6bfc('0x31')](_0x6bfc('0x41'),auth[_0x6bfc('0x7')](),controller['agentNotify']);module[_0x6bfc('0x42')]=router;
\ No newline at end of file
diff --git a/server/api/rpc/rpc.controller.js b/server/api/rpc/rpc.controller.js
index 5abe842..86b2a7c 100644
--- a/server/api/rpc/rpc.controller.js
+++ b/server/api/rpc/rpc.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xce1d=['VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelRedirect','outboundChannels','OutboundChannels','Agents','agentCapacity','body','interaction','user','MemberReport','INTERACTION','length','format','YYYY-MM-DD\x20HH:mm:ss','findOrCreate','interface','agent','internal','AgentCapacity','telephones','Telephones','trunks','Trunks','campaigns','Campaigns','showChatQueues','ChatQueues','MailQueues','mailAccounts','MailAccounts','openchannelQueues','OpenchannelQueues','showOpenchannelQueues','SmsQueues','faxQueues','FaxQueues','faxAccounts','FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','SmsQueuesWaitingInteractions','queueNotify','capitalize','chat','Website','Account','findOne','\x20Queue\x20not\x20found','messageId','Interaction','update','queue','MessageId','InteractionId','From','TransferReport','create','Start','*,*,*,*','agentNotify','channel','Channel\x20field\x20is\x20mandatory','User','\x20Message\x20not\x20found','agentTransferTimeout','bluebird','moment','../../mysqldb','../../config/logger','api','jayson/promise','client','http','error','message','result','catch','json','sendStatus','stack','name','status','isNil','rows','find','voiceChannels','VoiceChannels','query','then','voiceChannelMixMonitor','VoiceChannelMixMonitor','merge','params','VoiceChannelStopMixMonitor','voiceQueues','VoiceQueues','showVoiceQueues','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel'];(function(_0x465c3b,_0x384cf1){var _0x67f5d8=function(_0x4dbbaf){while(--_0x4dbbaf){_0x465c3b['push'](_0x465c3b['shift']());}};_0x67f5d8(++_0x384cf1);}(_0xce1d,0xb0));var _0xdce1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xce1d[_0x3dd15e];return _0x231fd0;};'use strict';var BPromise=require(_0xdce1('0x0'));var moment=require(_0xdce1('0x1'));var _=require('lodash');var util=require('util');var db=require(_0xdce1('0x2'))['db'];var logger=require(_0xdce1('0x3'))(_0xdce1('0x4'));var jayson=require(_0xdce1('0x5'));var amiClient=jayson[_0xdce1('0x6')][_0xdce1('0x7')]({'port':0x232a});var mailClient=jayson[_0xdce1('0x6')]['http']({'port':0x232b});var routingClient=jayson[_0xdce1('0x6')][_0xdce1('0x7')]({'port':0x232c});function respondWithRpcPromise(_0x133d8b,_0x1f1ab3,_0x589914){return new BPromise(function(_0x4b0b78,_0x285894){var _0x2fc15=_0x589914?_0x589914:amiClient;return _0x2fc15['request'](_0x133d8b,_0x1f1ab3)['then'](function(_0x3dd4ae){if(_0x3dd4ae[_0xdce1('0x8')]){if(_0x3dd4ae[_0xdce1('0x8')]['code']===0x1f4){return _0x285894(_0x3dd4ae[_0xdce1('0x8')][_0xdce1('0x9')]);}return _0x4b0b78(_0x3dd4ae['error']['message']);}else{_0x4b0b78(_0x3dd4ae[_0xdce1('0xa')]);}})[_0xdce1('0xb')](function(_0x386c8b){_0x285894(_0x386c8b);});});}function respondWithResult(_0x5490bb,_0x135bdd){_0x135bdd=_0x135bdd||0xc8;return function(_0x34a2e8){if(_0x34a2e8){return _0x5490bb['status'](_0x135bdd)[_0xdce1('0xc')](_0x34a2e8);}return _0x5490bb[_0xdce1('0xd')](0x194);};}function handleError(_0x25149e,_0x5c668d){_0x5c668d=_0x5c668d||0x1f4;return function(_0x38c81f){logger[_0xdce1('0x8')](_0x38c81f[_0xdce1('0xe')]);if(_0x38c81f[_0xdce1('0xf')]){delete _0x38c81f['name'];}_0x25149e[_0xdce1('0x10')](_0x5c668d)['send'](_0x38c81f);};}function findById(_0x531dae){return function(_0x219d42){if(!_['isNil'](_0x531dae)&&!_[_0xdce1('0x11')](_0x219d42)&&!_[_0xdce1('0x11')](_0x219d42[_0xdce1('0x12')])){return _[_0xdce1('0x13')](_0x219d42[_0xdce1('0x12')],function(_0x5341ca){return _0x5341ca['id']==_0x531dae;});}return null;};}exports[_0xdce1('0x14')]=function(_0x35940f,_0x487113){return respondWithRpcPromise(_0xdce1('0x15'),_0x35940f[_0xdce1('0x16')])[_0xdce1('0x17')](respondWithResult(_0x487113,null))['catch'](handleError(_0x487113,null));};exports[_0xdce1('0x18')]=function(_0x5e1d3f,_0x3f1dcf){return respondWithRpcPromise(_0xdce1('0x19'),_[_0xdce1('0x1a')](_0x5e1d3f[_0xdce1('0x16')],_0x5e1d3f[_0xdce1('0x1b')]))[_0xdce1('0x17')](respondWithResult(_0x3f1dcf,null))[_0xdce1('0xb')](handleError(_0x3f1dcf,null));};exports['voiceChannelStopMixMonitor']=function(_0x530f69,_0xde6cea){return respondWithRpcPromise(_0xdce1('0x1c'),_[_0xdce1('0x1a')](_0x530f69[_0xdce1('0x16')],_0x530f69[_0xdce1('0x1b')]))[_0xdce1('0x17')](respondWithResult(_0xde6cea,null))[_0xdce1('0xb')](handleError(_0xde6cea,null));};exports[_0xdce1('0x1d')]=function(_0x263d5a,_0x24e5e2){return respondWithRpcPromise(_0xdce1('0x1e'),_0x263d5a[_0xdce1('0x16')])[_0xdce1('0x17')](respondWithResult(_0x24e5e2,null))[_0xdce1('0xb')](handleError(_0x24e5e2,null));};exports[_0xdce1('0x1f')]=function(_0x4ca05f,_0x161c43){return respondWithRpcPromise(_0xdce1('0x1e'),_0x4ca05f[_0xdce1('0x16')])[_0xdce1('0x17')](findById(_0x4ca05f[_0xdce1('0x1b')]['id']))[_0xdce1('0x17')](respondWithResult(_0x161c43,null))['catch'](handleError(_0x161c43,null));};exports['voiceQueuesPreview']=function(_0x429c00,_0x4d19af){return respondWithRpcPromise(_0xdce1('0x20'),_[_0xdce1('0x1a')](_0x429c00[_0xdce1('0x16')],_0x429c00[_0xdce1('0x1b')]))[_0xdce1('0x17')](respondWithResult(_0x4d19af,null))['catch'](handleError(_0x4d19af,null));};exports[_0xdce1('0x21')]=function(_0x40eee3,_0xbe30f3){return respondWithRpcPromise(_0xdce1('0x22'),_0x40eee3[_0xdce1('0x16')])['then'](respondWithResult(_0xbe30f3,null))[_0xdce1('0xb')](handleError(_0xbe30f3,null));};exports[_0xdce1('0x23')]=function(_0x375f43,_0x657807){return respondWithRpcPromise(_0xdce1('0x24'),_[_0xdce1('0x1a')](_0x375f43[_0xdce1('0x16')],_0x375f43['params']))[_0xdce1('0x17')](respondWithResult(_0x657807,null))[_0xdce1('0xb')](handleError(_0x657807,null));};exports[_0xdce1('0x25')]=function(_0x1f7e27,_0x4e8962){return respondWithRpcPromise('VoiceQueuesChannelHangup',_['merge'](_0x1f7e27['query'],_0x1f7e27[_0xdce1('0x1b')]))[_0xdce1('0x17')](respondWithResult(_0x4e8962,null))['catch'](handleError(_0x4e8962,null));};exports['voiceQueuesChannelRedirect']=function(_0x5bf70a,_0x43eec1){return respondWithRpcPromise(_0xdce1('0x26'),_[_0xdce1('0x1a')](_0x5bf70a['query'],_0x5bf70a[_0xdce1('0x1b')]))[_0xdce1('0x17')](respondWithResult(_0x43eec1,null))[_0xdce1('0xb')](handleError(_0x43eec1,null));};exports['outbound']=function(_0x3d4f23,_0x8381d4){return respondWithRpcPromise('Outbound',_0x3d4f23['query'])[_0xdce1('0x17')](respondWithResult(_0x8381d4,null))['catch'](handleError(_0x8381d4,null));};exports[_0xdce1('0x27')]=function(_0x10e0bf,_0x263733){return respondWithRpcPromise(_0xdce1('0x28'),_0x10e0bf[_0xdce1('0x16')])['then'](respondWithResult(_0x263733,null))[_0xdce1('0xb')](handleError(_0x263733,null));};exports['agents']=function(_0x4b9acf,_0x5d5bad){var _0x5a0208;return respondWithRpcPromise(_0xdce1('0x29'),_0x4b9acf['query'])[_0xdce1('0x17')](function(_0x14692b){_0x5a0208=_0x14692b;return respondWithRpcPromise(_0xdce1('0x29'),_0x4b9acf['query'],routingClient);})[_0xdce1('0x17')](function(_0x4fc814){return _[_0xdce1('0x1a')]({},_0x4fc814,_0x5a0208);})['then'](respondWithResult(_0x5d5bad,null))[_0xdce1('0xb')](handleError(_0x5d5bad,null));};exports[_0xdce1('0x2a')]=function(_0xf63e33,_0x1cb861){if(_0xf63e33[_0xdce1('0x2b')]&&_0xf63e33[_0xdce1('0x2b')][_0xdce1('0x2c')]&&_0xf63e33[_0xdce1('0x2d')]&&_0xf63e33['user'][_0xdce1('0xf')]){for(var _0x2efb5f in _0xf63e33[_0xdce1('0x2b')][_0xdce1('0x2c')]){if(_0xf63e33['body'][_0xdce1('0x2c')]['hasOwnProperty'](_0x2efb5f)){db[_0xdce1('0x2e')]['findAll']({'where':{'channel':_0x2efb5f,'membername':_0xf63e33[_0xdce1('0x2d')][_0xdce1('0xf')],'type':_0xdce1('0x2f'),'exitAt':null,'uniqueid':_0xf63e33[_0xdce1('0x2b')][_0xdce1('0x2c')][_0x2efb5f]&&_0xf63e33[_0xdce1('0x2b')]['interaction'][_0x2efb5f][_0xdce1('0x30')]?{'$notIn':_0xf63e33[_0xdce1('0x2b')][_0xdce1('0x2c')][_0x2efb5f]}:{'$ne':null}}})[_0xdce1('0x17')](function(_0x7249e5){var _0x15e899=moment()[_0xdce1('0x31')](_0xdce1('0x32'));for(var _0x1362ad=0x0,_0x29b81e=_0x7249e5[_0xdce1('0x30')];_0x1362ad<_0x29b81e;_0x1362ad+=0x1){_0x7249e5[_0x1362ad]['updateAttributes']({'exitAt':_0x15e899});}});for(var _0x1d8094=0x0;_0x1d8094<_0xf63e33['body'][_0xdce1('0x2c')][_0x2efb5f][_0xdce1('0x30')];_0x1d8094+=0x1){db['MemberReport'][_0xdce1('0x33')]({'where':{'channel':_0x2efb5f,'membername':_0xf63e33[_0xdce1('0x2d')][_0xdce1('0xf')],'type':_0xdce1('0x2f'),'uniqueid':_0xf63e33['body'][_0xdce1('0x2c')][_0x2efb5f][_0x1d8094],'exitAt':null},'defaults':{'channel':_0x2efb5f,'membername':_0xf63e33['user'][_0xdce1('0xf')],'interface':_['isNil'](_0xf63e33[_0xdce1('0x2d')][_0xdce1('0x34')])?util[_0xdce1('0x31')]('SIP/%s',_0xf63e33[_0xdce1('0x2d')][_0xdce1('0xf')]):_0xf63e33['user'][_0xdce1('0x34')],'type':_0xdce1('0x2f'),'enterAt':moment()['format'](_0xdce1('0x32')),'role':_0xdce1('0x35'),'internal':_0xf63e33['user'][_0xdce1('0x36')],'uniqueid':_0xf63e33[_0xdce1('0x2b')][_0xdce1('0x2c')][_0x2efb5f][_0x1d8094]}});}}}}return respondWithRpcPromise(_0xdce1('0x37'),{'id':_0xf63e33[_0xdce1('0x1b')]['id'],'capacity':_0xf63e33[_0xdce1('0x2b')]['capacity']},routingClient)[_0xdce1('0x17')](respondWithResult(_0x1cb861,null))[_0xdce1('0xb')](handleError(_0x1cb861,null));};exports[_0xdce1('0x38')]=function(_0x1d43b8,_0x508d80){return respondWithRpcPromise(_0xdce1('0x39'),_0x1d43b8['query'])[_0xdce1('0x17')](respondWithResult(_0x508d80,null))[_0xdce1('0xb')](handleError(_0x508d80,null));};exports[_0xdce1('0x3a')]=function(_0x2c707e,_0x1233c7){return respondWithRpcPromise(_0xdce1('0x3b'),_0x2c707e['query'])[_0xdce1('0x17')](respondWithResult(_0x1233c7,null))['catch'](handleError(_0x1233c7,null));};exports[_0xdce1('0x3c')]=function(_0x3ac8ac,_0x599c97){return respondWithRpcPromise(_0xdce1('0x3d'),_0x3ac8ac[_0xdce1('0x16')])[_0xdce1('0x17')](respondWithResult(_0x599c97,null))[_0xdce1('0xb')](handleError(_0x599c97,null));};exports['chatQueues']=function(_0xc6d59e,_0x1cb393){return respondWithRpcPromise('ChatQueues',_0xc6d59e[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](respondWithResult(_0x1cb393,null))[_0xdce1('0xb')](handleError(_0x1cb393,null));};exports[_0xdce1('0x3e')]=function(_0x49a77d,_0x398c1b){return respondWithRpcPromise(_0xdce1('0x3f'),_0x49a77d[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](findById(_0x49a77d[_0xdce1('0x1b')]['id']))[_0xdce1('0x17')](respondWithResult(_0x398c1b,null))['catch'](handleError(_0x398c1b,null));};exports['mailQueues']=function(_0x2f60d7,_0x4f8c3b){return respondWithRpcPromise(_0xdce1('0x40'),_0x2f60d7['query'],routingClient)[_0xdce1('0x17')](respondWithResult(_0x4f8c3b,null))[_0xdce1('0xb')](handleError(_0x4f8c3b,null));};exports['showMailQueues']=function(_0x59c7db,_0x44a517){return respondWithRpcPromise(_0xdce1('0x40'),_0x59c7db[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](findById(_0x59c7db[_0xdce1('0x1b')]['id']))[_0xdce1('0x17')](respondWithResult(_0x44a517,null))[_0xdce1('0xb')](handleError(_0x44a517,null));};exports[_0xdce1('0x41')]=function(_0x5d51b9,_0x518449){return respondWithRpcPromise(_0xdce1('0x42'),_0x5d51b9[_0xdce1('0x16')],mailClient)[_0xdce1('0x17')](respondWithResult(_0x518449,null))[_0xdce1('0xb')](handleError(_0x518449,null));};exports[_0xdce1('0x43')]=function(_0xbe42d7,_0x3d5006){return respondWithRpcPromise(_0xdce1('0x44'),_0xbe42d7['query'],routingClient)['then'](respondWithResult(_0x3d5006,null))['catch'](handleError(_0x3d5006,null));};exports[_0xdce1('0x45')]=function(_0xc7fbe6,_0x105627){return respondWithRpcPromise(_0xdce1('0x44'),_0xc7fbe6['query'],routingClient)[_0xdce1('0x17')](findById(_0xc7fbe6[_0xdce1('0x1b')]['id']))[_0xdce1('0x17')](respondWithResult(_0x105627,null))['catch'](handleError(_0x105627,null));};exports['smsQueues']=function(_0x103547,_0x2adb35){return respondWithRpcPromise(_0xdce1('0x46'),_0x103547[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](respondWithResult(_0x2adb35,null))[_0xdce1('0xb')](handleError(_0x2adb35,null));};exports['showSmsQueues']=function(_0x4c1c85,_0x4c28d5){return respondWithRpcPromise(_0xdce1('0x46'),_0x4c1c85[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](findById(_0x4c1c85['params']['id']))[_0xdce1('0x17')](respondWithResult(_0x4c28d5,null))[_0xdce1('0xb')](handleError(_0x4c28d5,null));};exports[_0xdce1('0x47')]=function(_0x2d6832,_0x5ae875){return respondWithRpcPromise(_0xdce1('0x48'),_0x2d6832['query'],routingClient)[_0xdce1('0x17')](respondWithResult(_0x5ae875,null))[_0xdce1('0xb')](handleError(_0x5ae875,null));};exports['showFaxQueues']=function(_0x29656e,_0x220980){return respondWithRpcPromise(_0xdce1('0x48'),_0x29656e[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](findById(_0x29656e[_0xdce1('0x1b')]['id']))['then'](respondWithResult(_0x220980,null))[_0xdce1('0xb')](handleError(_0x220980,null));};exports[_0xdce1('0x49')]=function(_0x51b326,_0x52f034){return respondWithRpcPromise(_0xdce1('0x4a'),_0x51b326[_0xdce1('0x16')])[_0xdce1('0x17')](respondWithResult(_0x52f034,null))[_0xdce1('0xb')](handleError(_0x52f034,null));};exports[_0xdce1('0x4b')]=function(_0x2ed6ca,_0x54adda){return respondWithRpcPromise(_0xdce1('0x4c'),_0x2ed6ca[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](respondWithResult(_0x54adda,null))['catch'](handleError(_0x54adda,null));};exports[_0xdce1('0x4d')]=function(_0x253009,_0x223aee){return respondWithRpcPromise(_0xdce1('0x4e'),_0x253009[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](respondWithResult(_0x223aee,null))['catch'](handleError(_0x223aee,null));};exports[_0xdce1('0x4f')]=function(_0x1dc461,_0x2d1487){return respondWithRpcPromise(_0xdce1('0x50'),_0x1dc461['query'],routingClient)['then'](respondWithResult(_0x2d1487,null))[_0xdce1('0xb')](handleError(_0x2d1487,null));};exports['smsQueuesWaitingInteractions']=function(_0x200d90,_0x1b6164){return respondWithRpcPromise(_0xdce1('0x51'),_0x200d90[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](respondWithResult(_0x1b6164,null))[_0xdce1('0xb')](handleError(_0x1b6164,null));};exports['faxQueuesWaitingInteractions']=function(_0xefe140,_0x59eed3){return respondWithRpcPromise('FaxQueuesWaitingInteractions',_0xefe140[_0xdce1('0x16')],routingClient)[_0xdce1('0x17')](respondWithResult(_0x59eed3,null))[_0xdce1('0xb')](handleError(_0x59eed3,null));};exports[_0xdce1('0x52')]=function(_0x1fc8e2){return function(_0x5466a7,_0x4c9af9){var _0x54048c,_0x62169b;var _0x14b6f7=_[_0xdce1('0x53')](_0x1fc8e2);var _0x5f077b=_0x1fc8e2===_0xdce1('0x54')?_0xdce1('0x55'):_0xdce1('0x56');return db[_0x14b6f7+'Queue'][_0xdce1('0x57')]({'raw':!![],'where':{'id':_0x5466a7['params']['id']}})[_0xdce1('0x17')](function(_0x2ebbff){if(_['isNil'](_0x2ebbff)){throw new Error(_0x14b6f7+_0xdce1('0x58'));}_0x54048c=_0x2ebbff;return db[_0x14b6f7+'Message'][_0xdce1('0x57')]({'where':{'id':_0x5466a7['body'][_0xdce1('0x59')]},'include':[{'model':db[_0x14b6f7+'Interaction'],'as':_0xdce1('0x5a')},{'model':db[_0x14b6f7+_0x5f077b],'as':_0xdce1('0x56')}]});})[_0xdce1('0x17')](function(_0x4e92b2){if(_['isNil'](_0x4e92b2)){throw new Error(_0x14b6f7+'\x20Message\x20not\x20found');}_0x62169b=_0x4e92b2;return _0x4e92b2[_0xdce1('0x5b')]({'read':0x0,'readAt':null,'UserId':null});})[_0xdce1('0x17')](function(){var _0x57a8e3={'uniqueid':_0x1fc8e2+'.'+_0x62169b['id']+'.'+_0x62169b['Interaction']['id'],'FromUserId':_0x5466a7['user']['id'],'type':_0xdce1('0x5c')};_0x57a8e3[_0x14b6f7+_0xdce1('0x5d')]=_0x62169b['id'];_0x57a8e3[_0x14b6f7+_0xdce1('0x5e')]=_0x62169b[_0xdce1('0x5a')]['id'];_0x57a8e3[_0xdce1('0x5f')+_0x14b6f7+_0x5f077b+'Id']=_0x62169b['Account']['id'];_0x57a8e3['To'+_0x14b6f7+'QueueId']=_0x54048c['id'];return db[_0x14b6f7+_0xdce1('0x60')][_0xdce1('0x61')](_0x57a8e3);})[_0xdce1('0x17')](function(){return respondWithRpcPromise(_0xdce1('0x62'),{'channel':_0x1fc8e2,'interaction':_0x62169b[_0xdce1('0x5a')],'message':_0x62169b,'account':_0x62169b[_0xdce1('0x56')],'applications':[{'id':0x0,'priority':0x1,'app':_0xdce1('0x5c'),'appdata':_0x54048c[_0xdce1('0xf')]+','+(_0x62169b[_0xdce1('0x56')]['queueTransferTimeout']||0x12c),'interval':_0xdce1('0x63')}]},routingClient);})[_0xdce1('0x17')](respondWithResult(_0x4c9af9,null))[_0xdce1('0xb')](handleError(_0x4c9af9,null));};};exports[_0xdce1('0x64')]=function(_0x473c66,_0x4ee529){var _0x50837d,_0x47614d;if(_['isNil'](_0x473c66[_0xdce1('0x2b')][_0xdce1('0x65')])){throw new Error(_0xdce1('0x66'));}var _0xf5ae4d=_0x473c66[_0xdce1('0x2b')]['channel'];var _0x53dad4=_['capitalize'](_0xf5ae4d);var _0x240105=_0xf5ae4d===_0xdce1('0x54')?_0xdce1('0x55'):'Account';return db[_0xdce1('0x67')]['findOne']({'raw':!![],'where':{'id':_0x473c66[_0xdce1('0x1b')]['id'],'role':'agent'}})[_0xdce1('0x17')](function(_0x29917e){if(_['isNil'](_0x29917e)){throw new Error('Agent\x20not\x20found');}_0x50837d=_0x29917e;return db[_0x53dad4+'Message'][_0xdce1('0x57')]({'where':{'id':_0x473c66[_0xdce1('0x2b')][_0xdce1('0x59')]},'include':[{'model':db[_0x53dad4+_0xdce1('0x5a')],'as':_0xdce1('0x5a')},{'model':db[_0x53dad4+_0x240105],'as':_0xdce1('0x56')}]});})[_0xdce1('0x17')](function(_0x2f50e8){if(_[_0xdce1('0x11')](_0x2f50e8)){throw new Error(_0x53dad4+_0xdce1('0x68'));}_0x47614d=_0x2f50e8;return _0x2f50e8[_0xdce1('0x5b')]({'read':0x0,'readAt':null,'UserId':null});})[_0xdce1('0x17')](function(){var _0x1bfc24={'uniqueid':_0xf5ae4d+'.'+_0x47614d['id']+'.'+_0x47614d['Interaction']['id'],'FromUserId':_0x473c66[_0xdce1('0x2d')]['id'],'type':_0xdce1('0x5c'),'ToUserId':_0x50837d['id']};_0x1bfc24[_0x53dad4+_0xdce1('0x5d')]=_0x47614d['id'];_0x1bfc24[_0x53dad4+'InteractionId']=_0x47614d['Interaction']['id'];_0x1bfc24['From'+_0x53dad4+_0x240105+'Id']=_0x47614d[_0xdce1('0x56')]['id'];return db[_0x53dad4+_0xdce1('0x60')]['create'](_0x1bfc24);})[_0xdce1('0x17')](function(){return respondWithRpcPromise(_0xdce1('0x62'),{'channel':_0xf5ae4d,'interaction':_0x47614d[_0xdce1('0x5a')],'message':_0x47614d,'account':_0x47614d[_0xdce1('0x56')],'applications':[{'id':0x0,'priority':0x1,'app':'agent','appdata':_0x50837d['name']+','+(_0x47614d[_0xdce1('0x56')][_0xdce1('0x69')]||0x12c),'interval':_0xdce1('0x63')}]},routingClient);})[_0xdce1('0x17')](respondWithResult(_0x4ee529,null))[_0xdce1('0xb')](handleError(_0x4ee529,null));};
\ No newline at end of file
+var _0xce53=['\x20Message\x20not\x20found','update','Interaction','MessageId','InteractionId','TransferReport','create','Start','queue','agentNotify','isNil','channel','Channel\x20field\x20is\x20mandatory','Agent\x20not\x20found','From','agentTransferTimeout','*,*,*,*','lodash','util','../../mysqldb','api','jayson/promise','client','http','request','then','error','code','message','status','json','sendStatus','stack','name','rows','find','voiceChannels','query','VoiceChannelMixMonitor','merge','params','catch','VoiceChannelStopMixMonitor','voiceQueues','showVoiceQueues','VoiceQueues','voiceQueuesPreview','voiceQueuesChannels','voiceQueuesChannel','voiceQueuesChannelHangup','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','Outbound','OutboundChannels','Agents','agentCapacity','body','interaction','user','hasOwnProperty','MemberReport','findAll','INTERACTION','format','YYYY-MM-DD\x20HH:mm:ss','length','updateAttributes','findOrCreate','interface','SIP/%s','agent','internal','AgentCapacity','capacity','telephones','trunks','Trunks','Campaigns','chatQueues','showChatQueues','ChatQueues','mailQueues','MailQueues','showMailQueues','MailAccounts','openchannelQueues','showOpenchannelQueues','OpenchannelQueues','smsQueues','SmsQueues','faxQueues','FaxQueues','showFaxQueues','FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','faxQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','capitalize','chat','Website','\x20Queue\x20not\x20found','Message','findOne','messageId','Account'];(function(_0x4c4e59,_0x37c255){var _0x32aed1=function(_0x236969){while(--_0x236969){_0x4c4e59['push'](_0x4c4e59['shift']());}};_0x32aed1(++_0x37c255);}(_0xce53,0x81));var _0x3ce5=function(_0x50c36b,_0x210552){_0x50c36b=_0x50c36b-0x0;var _0x3c861c=_0xce53[_0x50c36b];return _0x3c861c;};'use strict';var BPromise=require('bluebird');var moment=require('moment');var _=require(_0x3ce5('0x0'));var util=require(_0x3ce5('0x1'));var db=require(_0x3ce5('0x2'))['db'];var logger=require('../../config/logger')(_0x3ce5('0x3'));var jayson=require(_0x3ce5('0x4'));var amiClient=jayson[_0x3ce5('0x5')][_0x3ce5('0x6')]({'port':0x232a});var mailClient=jayson[_0x3ce5('0x5')]['http']({'port':0x232b});var routingClient=jayson[_0x3ce5('0x5')][_0x3ce5('0x6')]({'port':0x232c});function respondWithRpcPromise(_0x7f66c1,_0x59559a,_0x3d05f8){return new BPromise(function(_0x142d82,_0x5af0d9){var _0x1f2b5f=_0x3d05f8?_0x3d05f8:amiClient;return _0x1f2b5f[_0x3ce5('0x7')](_0x7f66c1,_0x59559a)[_0x3ce5('0x8')](function(_0x37cc6a){if(_0x37cc6a[_0x3ce5('0x9')]){if(_0x37cc6a['error'][_0x3ce5('0xa')]===0x1f4){return _0x5af0d9(_0x37cc6a[_0x3ce5('0x9')][_0x3ce5('0xb')]);}return _0x142d82(_0x37cc6a[_0x3ce5('0x9')][_0x3ce5('0xb')]);}else{_0x142d82(_0x37cc6a['result']);}})['catch'](function(_0x2bf2df){_0x5af0d9(_0x2bf2df);});});}function respondWithResult(_0x54cf16,_0x367536){_0x367536=_0x367536||0xc8;return function(_0x375c2c){if(_0x375c2c){return _0x54cf16[_0x3ce5('0xc')](_0x367536)[_0x3ce5('0xd')](_0x375c2c);}return _0x54cf16[_0x3ce5('0xe')](0x194);};}function handleError(_0x3a8811,_0x501851){_0x501851=_0x501851||0x1f4;return function(_0x418ae6){logger[_0x3ce5('0x9')](_0x418ae6[_0x3ce5('0xf')]);if(_0x418ae6[_0x3ce5('0x10')]){delete _0x418ae6[_0x3ce5('0x10')];}_0x3a8811[_0x3ce5('0xc')](_0x501851)['send'](_0x418ae6);};}function findById(_0x84ca3e){return function(_0x4b5598){if(!_['isNil'](_0x84ca3e)&&!_['isNil'](_0x4b5598)&&!_['isNil'](_0x4b5598[_0x3ce5('0x11')])){return _[_0x3ce5('0x12')](_0x4b5598[_0x3ce5('0x11')],function(_0x1a3536){return _0x1a3536['id']==_0x84ca3e;});}return null;};}exports[_0x3ce5('0x13')]=function(_0x4d159c,_0x244f8e){return respondWithRpcPromise('VoiceChannels',_0x4d159c[_0x3ce5('0x14')])[_0x3ce5('0x8')](respondWithResult(_0x244f8e,null))['catch'](handleError(_0x244f8e,null));};exports['voiceChannelMixMonitor']=function(_0x5790e0,_0x384c34){return respondWithRpcPromise(_0x3ce5('0x15'),_[_0x3ce5('0x16')](_0x5790e0[_0x3ce5('0x14')],_0x5790e0[_0x3ce5('0x17')]))[_0x3ce5('0x8')](respondWithResult(_0x384c34,null))[_0x3ce5('0x18')](handleError(_0x384c34,null));};exports['voiceChannelStopMixMonitor']=function(_0x3d9b75,_0x1d5124){return respondWithRpcPromise(_0x3ce5('0x19'),_['merge'](_0x3d9b75[_0x3ce5('0x14')],_0x3d9b75['params']))['then'](respondWithResult(_0x1d5124,null))[_0x3ce5('0x18')](handleError(_0x1d5124,null));};exports[_0x3ce5('0x1a')]=function(_0x1db87a,_0xca66b5){return respondWithRpcPromise('VoiceQueues',_0x1db87a['query'])[_0x3ce5('0x8')](respondWithResult(_0xca66b5,null))[_0x3ce5('0x18')](handleError(_0xca66b5,null));};exports[_0x3ce5('0x1b')]=function(_0x56e871,_0x14421a){return respondWithRpcPromise(_0x3ce5('0x1c'),_0x56e871[_0x3ce5('0x14')])[_0x3ce5('0x8')](findById(_0x56e871[_0x3ce5('0x17')]['id']))[_0x3ce5('0x8')](respondWithResult(_0x14421a,null))[_0x3ce5('0x18')](handleError(_0x14421a,null));};exports[_0x3ce5('0x1d')]=function(_0x422f53,_0x168f69){return respondWithRpcPromise('VoiceQueuesPreview',_['merge'](_0x422f53['query'],_0x422f53[_0x3ce5('0x17')]))['then'](respondWithResult(_0x168f69,null))[_0x3ce5('0x18')](handleError(_0x168f69,null));};exports[_0x3ce5('0x1e')]=function(_0x2c6301,_0x14f596){return respondWithRpcPromise('VoiceQueuesChannels',_0x2c6301['query'])[_0x3ce5('0x8')](respondWithResult(_0x14f596,null))[_0x3ce5('0x18')](handleError(_0x14f596,null));};exports[_0x3ce5('0x1f')]=function(_0x348324,_0x523510){return respondWithRpcPromise('VoiceQueuesChannel',_[_0x3ce5('0x16')](_0x348324[_0x3ce5('0x14')],_0x348324[_0x3ce5('0x17')]))[_0x3ce5('0x8')](respondWithResult(_0x523510,null))[_0x3ce5('0x18')](handleError(_0x523510,null));};exports[_0x3ce5('0x20')]=function(_0x52487e,_0x219eb7){return respondWithRpcPromise('VoiceQueuesChannelHangup',_['merge'](_0x52487e[_0x3ce5('0x14')],_0x52487e[_0x3ce5('0x17')]))['then'](respondWithResult(_0x219eb7,null))[_0x3ce5('0x18')](handleError(_0x219eb7,null));};exports[_0x3ce5('0x21')]=function(_0x1b3b36,_0x1bc695){return respondWithRpcPromise(_0x3ce5('0x22'),_[_0x3ce5('0x16')](_0x1b3b36[_0x3ce5('0x14')],_0x1b3b36['params']))[_0x3ce5('0x8')](respondWithResult(_0x1bc695,null))['catch'](handleError(_0x1bc695,null));};exports['outbound']=function(_0x2846e9,_0x4ed3c3){return respondWithRpcPromise(_0x3ce5('0x23'),_0x2846e9[_0x3ce5('0x14')])[_0x3ce5('0x8')](respondWithResult(_0x4ed3c3,null))[_0x3ce5('0x18')](handleError(_0x4ed3c3,null));};exports['outboundChannels']=function(_0x41cf37,_0x5a7d01){return respondWithRpcPromise(_0x3ce5('0x24'),_0x41cf37[_0x3ce5('0x14')])[_0x3ce5('0x8')](respondWithResult(_0x5a7d01,null))[_0x3ce5('0x18')](handleError(_0x5a7d01,null));};exports['agents']=function(_0x48c88d,_0x1424b3){var _0x27faf1;return respondWithRpcPromise('Agents',_0x48c88d['query'])['then'](function(_0x251878){_0x27faf1=_0x251878;return respondWithRpcPromise(_0x3ce5('0x25'),_0x48c88d[_0x3ce5('0x14')],routingClient);})[_0x3ce5('0x8')](function(_0x1f00c0){return _[_0x3ce5('0x16')]({},_0x1f00c0,_0x27faf1);})['then'](respondWithResult(_0x1424b3,null))['catch'](handleError(_0x1424b3,null));};exports[_0x3ce5('0x26')]=function(_0x15462f,_0x1fcb9b){if(_0x15462f[_0x3ce5('0x27')]&&_0x15462f['body'][_0x3ce5('0x28')]&&_0x15462f[_0x3ce5('0x29')]&&_0x15462f['user'][_0x3ce5('0x10')]){for(var _0x2dd067 in _0x15462f['body'][_0x3ce5('0x28')]){if(_0x15462f[_0x3ce5('0x27')][_0x3ce5('0x28')][_0x3ce5('0x2a')](_0x2dd067)){db[_0x3ce5('0x2b')][_0x3ce5('0x2c')]({'where':{'channel':_0x2dd067,'membername':_0x15462f[_0x3ce5('0x29')][_0x3ce5('0x10')],'type':_0x3ce5('0x2d'),'exitAt':null,'uniqueid':_0x15462f['body'][_0x3ce5('0x28')][_0x2dd067]&&_0x15462f[_0x3ce5('0x27')][_0x3ce5('0x28')][_0x2dd067]['length']?{'$notIn':_0x15462f['body'][_0x3ce5('0x28')][_0x2dd067]}:{'$ne':null}}})[_0x3ce5('0x8')](function(_0x154cab){var _0x350c08=moment()[_0x3ce5('0x2e')](_0x3ce5('0x2f'));for(var _0x5f4190=0x0,_0x59fe87=_0x154cab[_0x3ce5('0x30')];_0x5f4190<_0x59fe87;_0x5f4190+=0x1){_0x154cab[_0x5f4190][_0x3ce5('0x31')]({'exitAt':_0x350c08});}});for(var _0x311aca=0x0;_0x311aca<_0x15462f['body']['interaction'][_0x2dd067][_0x3ce5('0x30')];_0x311aca+=0x1){db[_0x3ce5('0x2b')][_0x3ce5('0x32')]({'where':{'channel':_0x2dd067,'membername':_0x15462f[_0x3ce5('0x29')][_0x3ce5('0x10')],'type':_0x3ce5('0x2d'),'uniqueid':_0x15462f['body']['interaction'][_0x2dd067][_0x311aca],'exitAt':null},'defaults':{'channel':_0x2dd067,'membername':_0x15462f[_0x3ce5('0x29')][_0x3ce5('0x10')],'interface':_['isNil'](_0x15462f['user'][_0x3ce5('0x33')])?util[_0x3ce5('0x2e')](_0x3ce5('0x34'),_0x15462f['user'][_0x3ce5('0x10')]):_0x15462f[_0x3ce5('0x29')]['interface'],'type':_0x3ce5('0x2d'),'enterAt':moment()[_0x3ce5('0x2e')](_0x3ce5('0x2f')),'role':_0x3ce5('0x35'),'internal':_0x15462f[_0x3ce5('0x29')][_0x3ce5('0x36')],'uniqueid':_0x15462f['body'][_0x3ce5('0x28')][_0x2dd067][_0x311aca]}});}}}}return respondWithRpcPromise(_0x3ce5('0x37'),{'id':_0x15462f[_0x3ce5('0x17')]['id'],'capacity':_0x15462f[_0x3ce5('0x27')][_0x3ce5('0x38')]},routingClient)['then'](respondWithResult(_0x1fcb9b,null))[_0x3ce5('0x18')](handleError(_0x1fcb9b,null));};exports[_0x3ce5('0x39')]=function(_0x505144,_0x4c6815){return respondWithRpcPromise('Telephones',_0x505144['query'])['then'](respondWithResult(_0x4c6815,null))[_0x3ce5('0x18')](handleError(_0x4c6815,null));};exports[_0x3ce5('0x3a')]=function(_0x367df1,_0xaca20){return respondWithRpcPromise(_0x3ce5('0x3b'),_0x367df1['query'])[_0x3ce5('0x8')](respondWithResult(_0xaca20,null))['catch'](handleError(_0xaca20,null));};exports['campaigns']=function(_0x568f3d,_0x2e1a90){return respondWithRpcPromise(_0x3ce5('0x3c'),_0x568f3d[_0x3ce5('0x14')])[_0x3ce5('0x8')](respondWithResult(_0x2e1a90,null))[_0x3ce5('0x18')](handleError(_0x2e1a90,null));};exports[_0x3ce5('0x3d')]=function(_0x50a487,_0x3dbda5){return respondWithRpcPromise('ChatQueues',_0x50a487[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x3dbda5,null))[_0x3ce5('0x18')](handleError(_0x3dbda5,null));};exports[_0x3ce5('0x3e')]=function(_0x1bb721,_0x2daa55){return respondWithRpcPromise(_0x3ce5('0x3f'),_0x1bb721[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](findById(_0x1bb721['params']['id']))[_0x3ce5('0x8')](respondWithResult(_0x2daa55,null))[_0x3ce5('0x18')](handleError(_0x2daa55,null));};exports[_0x3ce5('0x40')]=function(_0x48f71a,_0x98ba2f){return respondWithRpcPromise(_0x3ce5('0x41'),_0x48f71a[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x98ba2f,null))[_0x3ce5('0x18')](handleError(_0x98ba2f,null));};exports[_0x3ce5('0x42')]=function(_0x43aec2,_0x3aebc5){return respondWithRpcPromise(_0x3ce5('0x41'),_0x43aec2[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](findById(_0x43aec2['params']['id']))['then'](respondWithResult(_0x3aebc5,null))['catch'](handleError(_0x3aebc5,null));};exports['mailAccounts']=function(_0x99d2e6,_0x157b5b){return respondWithRpcPromise(_0x3ce5('0x43'),_0x99d2e6[_0x3ce5('0x14')],mailClient)[_0x3ce5('0x8')](respondWithResult(_0x157b5b,null))[_0x3ce5('0x18')](handleError(_0x157b5b,null));};exports[_0x3ce5('0x44')]=function(_0x4bfc62,_0x344e49){return respondWithRpcPromise('OpenchannelQueues',_0x4bfc62[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x344e49,null))['catch'](handleError(_0x344e49,null));};exports[_0x3ce5('0x45')]=function(_0xd96ce3,_0x1f0709){return respondWithRpcPromise(_0x3ce5('0x46'),_0xd96ce3[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](findById(_0xd96ce3['params']['id']))[_0x3ce5('0x8')](respondWithResult(_0x1f0709,null))[_0x3ce5('0x18')](handleError(_0x1f0709,null));};exports[_0x3ce5('0x47')]=function(_0x18bdd2,_0x3f8ab6){return respondWithRpcPromise(_0x3ce5('0x48'),_0x18bdd2[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x3f8ab6,null))[_0x3ce5('0x18')](handleError(_0x3f8ab6,null));};exports['showSmsQueues']=function(_0x1801df,_0x37ca9f){return respondWithRpcPromise(_0x3ce5('0x48'),_0x1801df[_0x3ce5('0x14')],routingClient)['then'](findById(_0x1801df[_0x3ce5('0x17')]['id']))[_0x3ce5('0x8')](respondWithResult(_0x37ca9f,null))[_0x3ce5('0x18')](handleError(_0x37ca9f,null));};exports[_0x3ce5('0x49')]=function(_0x4d1984,_0x1f893a){return respondWithRpcPromise(_0x3ce5('0x4a'),_0x4d1984[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x1f893a,null))['catch'](handleError(_0x1f893a,null));};exports[_0x3ce5('0x4b')]=function(_0x269a81,_0x26ed2c){return respondWithRpcPromise(_0x3ce5('0x4a'),_0x269a81[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](findById(_0x269a81[_0x3ce5('0x17')]['id']))[_0x3ce5('0x8')](respondWithResult(_0x26ed2c,null))[_0x3ce5('0x18')](handleError(_0x26ed2c,null));};exports['faxAccounts']=function(_0x4f3c64,_0x16ee38){return respondWithRpcPromise(_0x3ce5('0x4c'),_0x4f3c64[_0x3ce5('0x14')])['then'](respondWithResult(_0x16ee38,null))[_0x3ce5('0x18')](handleError(_0x16ee38,null));};exports[_0x3ce5('0x4d')]=function(_0x3ec888,_0x352c5a){return respondWithRpcPromise(_0x3ce5('0x4e'),_0x3ec888[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x352c5a,null))[_0x3ce5('0x18')](handleError(_0x352c5a,null));};exports[_0x3ce5('0x4f')]=function(_0x25fcbb,_0x3208df){return respondWithRpcPromise(_0x3ce5('0x50'),_0x25fcbb[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x3208df,null))[_0x3ce5('0x18')](handleError(_0x3208df,null));};exports['openchannelQueuesWaitingInteractions']=function(_0x50ba34,_0x41f656){return respondWithRpcPromise(_0x3ce5('0x51'),_0x50ba34['query'],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x41f656,null))['catch'](handleError(_0x41f656,null));};exports[_0x3ce5('0x52')]=function(_0x45cbe4,_0x25e108){return respondWithRpcPromise(_0x3ce5('0x53'),_0x45cbe4[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x25e108,null))['catch'](handleError(_0x25e108,null));};exports[_0x3ce5('0x54')]=function(_0x4ea488,_0x2f50d3){return respondWithRpcPromise(_0x3ce5('0x55'),_0x4ea488[_0x3ce5('0x14')],routingClient)[_0x3ce5('0x8')](respondWithResult(_0x2f50d3,null))['catch'](handleError(_0x2f50d3,null));};exports[_0x3ce5('0x56')]=function(_0x51b99c){return function(_0x179e57,_0xc9b63c){var _0x3055e1,_0x5ac03a;var _0x2b8508=_[_0x3ce5('0x57')](_0x51b99c);var _0x4a0a7d=_0x51b99c===_0x3ce5('0x58')?_0x3ce5('0x59'):'Account';return db[_0x2b8508+'Queue']['findOne']({'raw':!![],'where':{'id':_0x179e57[_0x3ce5('0x17')]['id']}})[_0x3ce5('0x8')](function(_0x3c679b){if(_['isNil'](_0x3c679b)){throw new Error(_0x2b8508+_0x3ce5('0x5a'));}_0x3055e1=_0x3c679b;return db[_0x2b8508+_0x3ce5('0x5b')][_0x3ce5('0x5c')]({'where':{'id':_0x179e57[_0x3ce5('0x27')][_0x3ce5('0x5d')]},'include':[{'model':db[_0x2b8508+'Interaction'],'as':'Interaction'},{'model':db[_0x2b8508+_0x4a0a7d],'as':_0x3ce5('0x5e')}]});})[_0x3ce5('0x8')](function(_0x277fc6){if(_['isNil'](_0x277fc6)){throw new Error(_0x2b8508+_0x3ce5('0x5f'));}_0x5ac03a=_0x277fc6;return _0x277fc6[_0x3ce5('0x60')]({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x38199e={'uniqueid':_0x51b99c+'.'+_0x5ac03a['id']+'.'+_0x5ac03a[_0x3ce5('0x61')]['id'],'FromUserId':_0x179e57['user']['id'],'type':'queue'};_0x38199e[_0x2b8508+_0x3ce5('0x62')]=_0x5ac03a['id'];_0x38199e[_0x2b8508+_0x3ce5('0x63')]=_0x5ac03a[_0x3ce5('0x61')]['id'];_0x38199e['From'+_0x2b8508+_0x4a0a7d+'Id']=_0x5ac03a[_0x3ce5('0x5e')]['id'];_0x38199e['To'+_0x2b8508+'QueueId']=_0x3055e1['id'];return db[_0x2b8508+_0x3ce5('0x64')][_0x3ce5('0x65')](_0x38199e);})[_0x3ce5('0x8')](function(){return respondWithRpcPromise(_0x3ce5('0x66'),{'channel':_0x51b99c,'interaction':_0x5ac03a[_0x3ce5('0x61')],'message':_0x5ac03a,'account':_0x5ac03a['Account'],'applications':[{'id':0x0,'priority':0x1,'app':_0x3ce5('0x67'),'appdata':_0x3055e1[_0x3ce5('0x10')]+','+(_0x5ac03a[_0x3ce5('0x5e')]['queueTransferTimeout']||0x12c),'interval':'*,*,*,*'}]},routingClient);})[_0x3ce5('0x8')](respondWithResult(_0xc9b63c,null))[_0x3ce5('0x18')](handleError(_0xc9b63c,null));};};exports[_0x3ce5('0x68')]=function(_0xe66eea,_0x2fa6f0){var _0xa62bab,_0x41fcc4;if(_[_0x3ce5('0x69')](_0xe66eea[_0x3ce5('0x27')][_0x3ce5('0x6a')])){throw new Error(_0x3ce5('0x6b'));}var _0x39d1c1=_0xe66eea[_0x3ce5('0x27')][_0x3ce5('0x6a')];var _0x8cbb53=_[_0x3ce5('0x57')](_0x39d1c1);var _0x16b295=_0x39d1c1==='chat'?_0x3ce5('0x59'):_0x3ce5('0x5e');return db['User'][_0x3ce5('0x5c')]({'raw':!![],'where':{'id':_0xe66eea[_0x3ce5('0x17')]['id'],'role':'agent'}})[_0x3ce5('0x8')](function(_0x587df1){if(_[_0x3ce5('0x69')](_0x587df1)){throw new Error(_0x3ce5('0x6c'));}_0xa62bab=_0x587df1;return db[_0x8cbb53+'Message']['findOne']({'where':{'id':_0xe66eea[_0x3ce5('0x27')]['messageId']},'include':[{'model':db[_0x8cbb53+_0x3ce5('0x61')],'as':_0x3ce5('0x61')},{'model':db[_0x8cbb53+_0x16b295],'as':'Account'}]});})['then'](function(_0x5299fa){if(_['isNil'](_0x5299fa)){throw new Error(_0x8cbb53+_0x3ce5('0x5f'));}_0x41fcc4=_0x5299fa;return _0x5299fa[_0x3ce5('0x60')]({'read':0x0,'readAt':null,'UserId':null});})[_0x3ce5('0x8')](function(){var _0x270cd9={'uniqueid':_0x39d1c1+'.'+_0x41fcc4['id']+'.'+_0x41fcc4['Interaction']['id'],'FromUserId':_0xe66eea[_0x3ce5('0x29')]['id'],'type':_0x3ce5('0x67'),'ToUserId':_0xa62bab['id']};_0x270cd9[_0x8cbb53+_0x3ce5('0x62')]=_0x41fcc4['id'];_0x270cd9[_0x8cbb53+_0x3ce5('0x63')]=_0x41fcc4['Interaction']['id'];_0x270cd9[_0x3ce5('0x6d')+_0x8cbb53+_0x16b295+'Id']=_0x41fcc4[_0x3ce5('0x5e')]['id'];return db[_0x8cbb53+_0x3ce5('0x64')][_0x3ce5('0x65')](_0x270cd9);})[_0x3ce5('0x8')](function(){return respondWithRpcPromise(_0x3ce5('0x66'),{'channel':_0x39d1c1,'interaction':_0x41fcc4['Interaction'],'message':_0x41fcc4,'account':_0x41fcc4[_0x3ce5('0x5e')],'applications':[{'id':0x0,'priority':0x1,'app':'agent','appdata':_0xa62bab[_0x3ce5('0x10')]+','+(_0x41fcc4[_0x3ce5('0x5e')][_0x3ce5('0x6e')]||0x12c),'interval':_0x3ce5('0x6f')}]},routingClient);})['then'](respondWithResult(_0x2fa6f0,null))[_0x3ce5('0x18')](handleError(_0x2fa6f0,null));};
\ No newline at end of file
diff --git a/server/api/schedule/index.js b/server/api/schedule/index.js
index 84cab62..7dd3c32 100644
--- a/server/api/schedule/index.js
+++ b/server/api/schedule/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdf4d=['get','/:id','/:id/run','post','create','put','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./schedule.controller','isAuthenticated','index'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xdf4d,0x184));var _0xddf4=function(_0x381476,_0x1c520f){_0x381476=_0x381476-0x0;var _0x5b20fb=_0xdf4d[_0x381476];return _0x5b20fb;};'use strict';var multer=require(_0xddf4('0x0'));var util=require(_0xddf4('0x1'));var path=require(_0xddf4('0x2'));var timeout=require(_0xddf4('0x3'));var express=require(_0xddf4('0x4'));var router=express[_0xddf4('0x5')]();var auth=require(_0xddf4('0x6'));var interaction=require(_0xddf4('0x7'));var config=require(_0xddf4('0x8'));var controller=require(_0xddf4('0x9'));router['get']('/',auth[_0xddf4('0xa')](),controller[_0xddf4('0xb')]);router[_0xddf4('0xc')](_0xddf4('0xd'),auth['isAuthenticated'](),controller['show']);router['get'](_0xddf4('0xe'),auth[_0xddf4('0xa')](),controller['run']);router[_0xddf4('0xf')]('/',auth['isAuthenticated'](),controller[_0xddf4('0x10')]);router[_0xddf4('0x11')](_0xddf4('0xd'),auth[_0xddf4('0xa')](),controller['update']);router[_0xddf4('0x12')](_0xddf4('0xd'),auth[_0xddf4('0xa')](),controller[_0xddf4('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0x5b26=['put','/:id','update','delete','destroy','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./schedule.controller','isAuthenticated','index','get','show','/:id/run','run','post','create'];(function(_0x331037,_0x1909fc){var _0x149f39=function(_0x1f0575){while(--_0x1f0575){_0x331037['push'](_0x331037['shift']());}};_0x149f39(++_0x1909fc);}(_0x5b26,0x1ea));var _0x65b2=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x5b26[_0x57b54c];return _0x59cc19;};'use strict';var multer=require('multer');var util=require(_0x65b2('0x0'));var path=require('path');var timeout=require(_0x65b2('0x1'));var express=require(_0x65b2('0x2'));var router=express[_0x65b2('0x3')]();var auth=require(_0x65b2('0x4'));var interaction=require(_0x65b2('0x5'));var config=require(_0x65b2('0x6'));var controller=require(_0x65b2('0x7'));router['get']('/',auth[_0x65b2('0x8')](),controller[_0x65b2('0x9')]);router[_0x65b2('0xa')]('/:id',auth[_0x65b2('0x8')](),controller[_0x65b2('0xb')]);router['get'](_0x65b2('0xc'),auth[_0x65b2('0x8')](),controller[_0x65b2('0xd')]);router[_0x65b2('0xe')]('/',auth[_0x65b2('0x8')](),controller[_0x65b2('0xf')]);router[_0x65b2('0x10')](_0x65b2('0x11'),auth[_0x65b2('0x8')](),controller[_0x65b2('0x12')]);router[_0x65b2('0x13')]('/:id',auth['isAuthenticated'](),controller[_0x65b2('0x14')]);module[_0x65b2('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/schedule/schedule.attributes.js b/server/api/schedule/schedule.attributes.js
index 534aa42..59d6411 100644
--- a/server/api/schedule/schedule.attributes.js
+++ b/server/api/schedule/schedule.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf9e8=['minutes','csv','pdf','xlsx','custom','default','TEXT','sequelize','exports','STRING','BOOLEAN','DATE','ENUM','years','quarters','days'];(function(_0x44cd28,_0x1502d9){var _0x39356e=function(_0x4dfe82){while(--_0x4dfe82){_0x44cd28['push'](_0x44cd28['shift']());}};_0x39356e(++_0x1502d9);}(_0xf9e8,0xe7));var _0x8f9e=function(_0x3e83f1,_0x1b09ae){_0x3e83f1=_0x3e83f1-0x0;var _0x28cd96=_0xf9e8[_0x3e83f1];return _0x28cd96;};'use strict';var Sequelize=require(_0x8f9e('0x0'));module[_0x8f9e('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x8f9e('0x2')]},'active':{'type':Sequelize[_0x8f9e('0x3')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'0\x200\x20*\x20*\x20*'},'startAt':{'type':Sequelize['DATE'],'allowNull':![]},'endAt':{'type':Sequelize[_0x8f9e('0x4')],'allowNull':![]},'subtractNumber':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x8f9e('0x5')](_0x8f9e('0x6'),_0x8f9e('0x7'),'months','weeks',_0x8f9e('0x8'),'hours',_0x8f9e('0x9')),'allowNull':![],'defaultValue':_0x8f9e('0x8')},'output':{'type':Sequelize[_0x8f9e('0x5')](_0x8f9e('0xa'),_0x8f9e('0xb'),_0x8f9e('0xc')),'allowNull':![],'defaultValue':_0x8f9e('0xa')},'type':{'type':Sequelize[_0x8f9e('0x5')](_0x8f9e('0xd'),_0x8f9e('0xe')),'allowNull':![],'defaultValue':_0x8f9e('0xd')},'sendMail':{'type':Sequelize[_0x8f9e('0x3')],'defaultValue':![]},'email':{'type':Sequelize[_0x8f9e('0x2')]},'cc':{'type':Sequelize[_0x8f9e('0xf')]},'bcc':{'type':Sequelize[_0x8f9e('0xf')]},'sendIfEmpty':{'type':Sequelize[_0x8f9e('0x3')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x132b=['BOOLEAN','TEXT','sequelize','STRING','0\x200\x20*\x20*\x20*','DATE','ENUM','quarters','months','days','hours','minutes','pdf','xlsx','custom','default'];(function(_0x406ca0,_0x33a99f){var _0x54d57d=function(_0x8e6df4){while(--_0x8e6df4){_0x406ca0['push'](_0x406ca0['shift']());}};_0x54d57d(++_0x33a99f);}(_0x132b,0x82));var _0xb132=function(_0x22a232,_0x2a5b5e){_0x22a232=_0x22a232-0x0;var _0x3309c9=_0x132b[_0x22a232];return _0x3309c9;};'use strict';var Sequelize=require(_0xb132('0x0'));module['exports']={'name':{'type':Sequelize[_0xb132('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb132('0x2')},'startAt':{'type':Sequelize[_0xb132('0x3')],'allowNull':![]},'endAt':{'type':Sequelize[_0xb132('0x3')],'allowNull':![]},'subtractNumber':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0xb132('0x4')]('years',_0xb132('0x5'),_0xb132('0x6'),'weeks',_0xb132('0x7'),_0xb132('0x8'),_0xb132('0x9')),'allowNull':![],'defaultValue':'days'},'output':{'type':Sequelize[_0xb132('0x4')]('csv',_0xb132('0xa'),_0xb132('0xb')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize[_0xb132('0x4')](_0xb132('0xc'),_0xb132('0xd')),'allowNull':![],'defaultValue':_0xb132('0xc')},'sendMail':{'type':Sequelize[_0xb132('0xe')],'defaultValue':![]},'email':{'type':Sequelize[_0xb132('0x1')]},'cc':{'type':Sequelize[_0xb132('0xf')]},'bcc':{'type':Sequelize['TEXT']},'sendIfEmpty':{'type':Sequelize[_0xb132('0xe')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/schedule/schedule.controller.js b/server/api/schedule/schedule.controller.js
index 026ef03..3394048 100644
--- a/server/api/schedule/schedule.controller.js
+++ b/server/api/schedule/schedule.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdcf4=['limit','set','Content-Range','apply','reject','save','update','then','destroy','Scheduler','UserProfileResource','error','stack','name','index','Schedule','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','merge','type','key','VIRTUAL','field','options','rows','catch','show','params','rawAttributes','includeAll','find','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','run','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','ejs','lodash','crypto','jsforce','to-csv','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset'];(function(_0x16fe1c,_0x3f5895){var _0x8e4978=function(_0x3cf889){while(--_0x3cf889){_0x16fe1c['push'](_0x16fe1c['shift']());}};_0x8e4978(++_0x3f5895);}(_0xdcf4,0xcf));var _0x4dcf=function(_0x39351b,_0x204466){_0x39351b=_0x39351b-0x0;var _0x590900=_0xdcf4[_0x39351b];return _0x590900;};'use strict';var pdf=require(_0x4dcf('0x0'));var emlformat=require(_0x4dcf('0x1'));var rimraf=require(_0x4dcf('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4dcf('0x3'));var rp=require(_0x4dcf('0x4'));var moment=require('moment');var BPromise=require(_0x4dcf('0x5'));var Mustache=require(_0x4dcf('0x6'));var util=require(_0x4dcf('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4dcf('0x8'));var fs=require('fs');var _=require(_0x4dcf('0x9'));var squel=require('squel');var crypto=require(_0x4dcf('0xa'));var jsforce=require(_0x4dcf('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x4dcf('0xc'));var querystring=require('querystring');var Papa=require(_0x4dcf('0xd'));var Redis=require(_0x4dcf('0xe'));var authService=require(_0x4dcf('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x4dcf('0x10'));var logger=require(_0x4dcf('0x11'))('api');var utils=require(_0x4dcf('0x12'));var config=require(_0x4dcf('0x13'));var db=require(_0x4dcf('0x14'))['db'];function respondWithStatusCode(_0x19b8e5,_0x346338){_0x346338=_0x346338||0xcc;return function(_0x30a6c7){if(_0x30a6c7){return _0x19b8e5[_0x4dcf('0x15')](_0x346338);}return _0x19b8e5[_0x4dcf('0x16')](_0x346338)[_0x4dcf('0x17')]();};}function respondWithResult(_0x10b6da,_0x3e1153){_0x3e1153=_0x3e1153||0xc8;return function(_0x4d5990){if(_0x4d5990){return _0x10b6da[_0x4dcf('0x16')](_0x3e1153)[_0x4dcf('0x18')](_0x4d5990);}};}function respondWithFilteredResult(_0x564334,_0x23de35){return function(_0x41c3f8){if(_0x41c3f8){var _0x16c602=_0x41c3f8[_0x4dcf('0x19')],_0x408338=_0x23de35[_0x4dcf('0x1a')],_0x4692bb=_0x23de35[_0x4dcf('0x1a')]+_0x23de35[_0x4dcf('0x1b')],_0x2e5424;if(_0x4692bb>=_0x16c602){_0x4692bb=_0x16c602;_0x2e5424=0xc8;}else{_0x2e5424=0xce;}_0x564334[_0x4dcf('0x16')](_0x2e5424);return _0x564334[_0x4dcf('0x1c')](_0x4dcf('0x1d'),_0x408338+'-'+_0x4692bb+'/'+_0x16c602)[_0x4dcf('0x18')](_0x41c3f8);}return null;};}function patchUpdates(_0x2b14ff){return function(_0x5de24d){try{jsonpatch[_0x4dcf('0x1e')](_0x5de24d,_0x2b14ff,!![]);}catch(_0x2298e0){return BPromise[_0x4dcf('0x1f')](_0x2298e0);}return _0x5de24d[_0x4dcf('0x20')]();};}function saveUpdates(_0x2c1026,_0x17f3aa){return function(_0x5f35e0){if(_0x5f35e0){return _0x5f35e0[_0x4dcf('0x21')](_0x2c1026)[_0x4dcf('0x22')](function(_0x4519c6){return _0x4519c6;});}return null;};}function removeEntity(_0x5277e9,_0x2fb3f0){return function(_0x5ba8b5){if(_0x5ba8b5){return _0x5ba8b5[_0x4dcf('0x23')]()[_0x4dcf('0x22')](function(){var _0xf28f73=_0x5ba8b5['get']({'plain':!![]});var _0x5e7b08=_0x4dcf('0x24');return db[_0x4dcf('0x25')]['destroy']({'where':{'type':_0x5e7b08,'resourceId':_0xf28f73['id']}})[_0x4dcf('0x22')](function(){return _0x5ba8b5;});})['then'](function(){_0x5277e9[_0x4dcf('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x12e928,_0xf7e7cd){return function(_0x4bcf35){if(!_0x4bcf35){_0x12e928[_0x4dcf('0x15')](0x194);}return _0x4bcf35;};}function handleError(_0x31d797,_0x492e28){_0x492e28=_0x492e28||0x1f4;return function(_0x51e10e){logger[_0x4dcf('0x26')](_0x51e10e[_0x4dcf('0x27')]);if(_0x51e10e[_0x4dcf('0x28')]){delete _0x51e10e[_0x4dcf('0x28')];}_0x31d797[_0x4dcf('0x16')](_0x492e28)['send'](_0x51e10e);};}exports[_0x4dcf('0x29')]=function(_0x31d7f3,_0x5b3970){var _0x5b2ed1={},_0x447d71={},_0x3c2a8a={'count':0x0,'rows':[]};var _0x3c17cd=db[_0x4dcf('0x2a')]['rawAttributes'];_0x447d71[_0x4dcf('0x2b')]=_[_0x4dcf('0x2c')](_0x3c17cd);_0x447d71[_0x4dcf('0x2d')]=_[_0x4dcf('0x2c')](_0x31d7f3[_0x4dcf('0x2d')]);_0x447d71[_0x4dcf('0x2e')]=_[_0x4dcf('0x2f')](_0x447d71['model'],_0x447d71[_0x4dcf('0x2d')]);_0x5b2ed1[_0x4dcf('0x30')]=_[_0x4dcf('0x2f')](_0x447d71['model'],qs['fields'](_0x31d7f3[_0x4dcf('0x2d')][_0x4dcf('0x31')]));_0x5b2ed1[_0x4dcf('0x30')]=_0x5b2ed1['attributes'][_0x4dcf('0x32')]?_0x5b2ed1[_0x4dcf('0x30')]:_0x447d71[_0x4dcf('0x2b')];if(!_0x31d7f3[_0x4dcf('0x2d')][_0x4dcf('0x33')](_0x4dcf('0x34'))){_0x5b2ed1[_0x4dcf('0x1b')]=qs[_0x4dcf('0x1b')](_0x31d7f3[_0x4dcf('0x2d')]['limit']);_0x5b2ed1['offset']=qs[_0x4dcf('0x1a')](_0x31d7f3['query']['offset']);}_0x5b2ed1['order']=qs[_0x4dcf('0x35')](_0x31d7f3[_0x4dcf('0x2d')][_0x4dcf('0x35')]);_0x5b2ed1[_0x4dcf('0x36')]=qs[_0x4dcf('0x2e')](_['pick'](_0x31d7f3[_0x4dcf('0x2d')],_0x447d71[_0x4dcf('0x2e')]));if(_0x31d7f3['query'][_0x4dcf('0x37')]){_0x5b2ed1[_0x4dcf('0x36')]=_[_0x4dcf('0x38')](_0x5b2ed1[_0x4dcf('0x36')],{'$or':_['map'](_0x3c17cd,function(_0x55a9a3){if(_0x55a9a3[_0x4dcf('0x39')][_0x4dcf('0x3a')]!==_0x4dcf('0x3b')){var _0xaa8da9={};_0xaa8da9[_0x55a9a3[_0x4dcf('0x3c')]]={'$like':'%'+_0x31d7f3[_0x4dcf('0x2d')][_0x4dcf('0x37')]+'%'};return _0xaa8da9;}})});}_0x5b2ed1=_[_0x4dcf('0x38')]({},_0x5b2ed1,_0x31d7f3[_0x4dcf('0x3d')]);var _0x5263d2={'where':_0x5b2ed1['where']};return db[_0x4dcf('0x2a')]['count'](_0x5263d2)['then'](function(_0x6e6b50){_0x3c2a8a[_0x4dcf('0x19')]=_0x6e6b50;if(_0x31d7f3['query']['includeAll']){_0x5b2ed1['include']=[{'all':!![]}];}return db[_0x4dcf('0x2a')]['findAll'](_0x5b2ed1);})[_0x4dcf('0x22')](function(_0x524f74){_0x3c2a8a[_0x4dcf('0x3e')]=_0x524f74;return _0x3c2a8a;})[_0x4dcf('0x22')](respondWithFilteredResult(_0x5b3970,_0x5b2ed1))[_0x4dcf('0x3f')](handleError(_0x5b3970,null));};exports[_0x4dcf('0x40')]=function(_0x3b3ede,_0xb637){var _0x549277={'raw':![],'where':{'id':_0x3b3ede[_0x4dcf('0x41')]['id']}},_0x170448={};_0x170448[_0x4dcf('0x2b')]=_[_0x4dcf('0x2c')](db[_0x4dcf('0x2a')][_0x4dcf('0x42')]);_0x170448['query']=_['keys'](_0x3b3ede[_0x4dcf('0x2d')]);_0x170448[_0x4dcf('0x2e')]=_[_0x4dcf('0x2f')](_0x170448[_0x4dcf('0x2b')],_0x170448[_0x4dcf('0x2d')]);_0x549277['attributes']=_[_0x4dcf('0x2f')](_0x170448['model'],qs[_0x4dcf('0x31')](_0x3b3ede['query'][_0x4dcf('0x31')]));_0x549277['attributes']=_0x549277[_0x4dcf('0x30')][_0x4dcf('0x32')]?_0x549277[_0x4dcf('0x30')]:_0x170448[_0x4dcf('0x2b')];if(_0x3b3ede[_0x4dcf('0x2d')][_0x4dcf('0x43')]){_0x549277['include']=[{'all':!![]}];}_0x549277=_[_0x4dcf('0x38')]({},_0x549277,_0x3b3ede[_0x4dcf('0x3d')]);return db[_0x4dcf('0x2a')][_0x4dcf('0x44')](_0x549277)['then'](handleEntityNotFound(_0xb637,null))[_0x4dcf('0x22')](respondWithResult(_0xb637,null))['catch'](handleError(_0xb637,null));};exports[_0x4dcf('0x45')]=function(_0x240dda,_0x468523){return db[_0x4dcf('0x2a')][_0x4dcf('0x45')](_0x240dda[_0x4dcf('0x46')],{})[_0x4dcf('0x22')](function(_0x16f18c){var _0x5d2fb9=_0x240dda['user'][_0x4dcf('0x47')]({'plain':!![]});if(!_0x5d2fb9)throw new Error(_0x4dcf('0x48'));if(_0x5d2fb9['role']===_0x4dcf('0x49')){var _0x8a405f=_0x16f18c[_0x4dcf('0x47')]({'plain':!![]});var _0x3f625d=_0x4dcf('0x24');return db['UserProfileSection']['find']({'where':{'name':_0x3f625d,'userProfileId':_0x5d2fb9[_0x4dcf('0x4a')]},'raw':!![]})[_0x4dcf('0x22')](function(_0x534390){if(_0x534390&&_0x534390[_0x4dcf('0x4b')]===0x0){return db[_0x4dcf('0x25')][_0x4dcf('0x45')]({'name':_0x8a405f[_0x4dcf('0x28')],'resourceId':_0x8a405f['id'],'type':_0x534390[_0x4dcf('0x28')],'sectionId':_0x534390['id']},{})[_0x4dcf('0x22')](function(){return _0x16f18c;});}else{return _0x16f18c;}})[_0x4dcf('0x3f')](function(_0x3e47eb){logger[_0x4dcf('0x26')](_0x4dcf('0x4c'),_0x3e47eb);throw _0x3e47eb;});}return _0x16f18c;})[_0x4dcf('0x22')](respondWithResult(_0x468523,0xc9))['catch'](handleError(_0x468523,null));};exports['update']=function(_0x4bc201,_0x5dfd17){if(_0x4bc201[_0x4dcf('0x46')]['id']){delete _0x4bc201[_0x4dcf('0x46')]['id'];}return db[_0x4dcf('0x2a')][_0x4dcf('0x44')]({'where':{'id':_0x4bc201[_0x4dcf('0x41')]['id']}})[_0x4dcf('0x22')](handleEntityNotFound(_0x5dfd17,null))[_0x4dcf('0x22')](saveUpdates(_0x4bc201['body'],null))[_0x4dcf('0x22')](respondWithResult(_0x5dfd17,null))[_0x4dcf('0x3f')](handleError(_0x5dfd17,null));};exports[_0x4dcf('0x23')]=function(_0x576b5c,_0x465b40){return db['Schedule'][_0x4dcf('0x44')]({'where':{'id':_0x576b5c[_0x4dcf('0x41')]['id']}})[_0x4dcf('0x22')](handleEntityNotFound(_0x465b40,null))[_0x4dcf('0x22')](removeEntity(_0x465b40,null))[_0x4dcf('0x3f')](handleError(_0x465b40,null));};exports['run']=function(_0x194309,_0x4d18d5,_0x48a4d4){var _0x5cf3e4=require('../../config/schedule');return db[_0x4dcf('0x2a')]['find']({'where':{'id':_0x194309[_0x4dcf('0x41')]['id']},'raw':!![]})[_0x4dcf('0x22')](handleEntityNotFound(_0x4d18d5,null))[_0x4dcf('0x22')](function(){_0x5cf3e4[_0x4dcf('0x4d')](_0x194309[_0x4dcf('0x41')]['id']);})[_0x4dcf('0x22')](respondWithStatusCode(_0x4d18d5,null))['catch'](handleError(_0x4d18d5,null));};
\ No newline at end of file
+var _0x1686=['api','../../config/utils','../../config/environment','status','end','count','offset','limit','set','Content-Range','apply','save','update','get','Scheduler','UserProfileResource','then','sendStatus','error','stack','name','send','Schedule','rawAttributes','keys','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','map','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','length','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','run','html-pdf','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger'];(function(_0x1bbeae,_0x3d9324){var _0x5cf435=function(_0x3d1b19){while(--_0x3d1b19){_0x1bbeae['push'](_0x1bbeae['shift']());}};_0x5cf435(++_0x3d9324);}(_0x1686,0x90));var _0x6168=function(_0x17f006,_0x4221ee){_0x17f006=_0x17f006-0x0;var _0x531496=_0x1686[_0x17f006];return _0x531496;};'use strict';var pdf=require(_0x6168('0x0'));var emlformat=require(_0x6168('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x6168('0x2'));var rp=require(_0x6168('0x3'));var moment=require(_0x6168('0x4'));var BPromise=require(_0x6168('0x5'));var Mustache=require(_0x6168('0x6'));var util=require(_0x6168('0x7'));var path=require(_0x6168('0x8'));var sox=require(_0x6168('0x9'));var csv=require('to-csv');var ejs=require(_0x6168('0xa'));var fs=require('fs');var _=require(_0x6168('0xb'));var squel=require(_0x6168('0xc'));var crypto=require('crypto');var jsforce=require(_0x6168('0xd'));var deskjs=require(_0x6168('0xe'));var toCsv=require(_0x6168('0xf'));var querystring=require(_0x6168('0x10'));var Papa=require('papaparse');var Redis=require(_0x6168('0x11'));var authService=require(_0x6168('0x12'));var qs=require(_0x6168('0x13'));var hardwareService=require(_0x6168('0x14'));var logger=require(_0x6168('0x15'))(_0x6168('0x16'));var utils=require(_0x6168('0x17'));var config=require(_0x6168('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1e7936,_0x44acfd){_0x44acfd=_0x44acfd||0xcc;return function(_0x323e70){if(_0x323e70){return _0x1e7936['sendStatus'](_0x44acfd);}return _0x1e7936[_0x6168('0x19')](_0x44acfd)[_0x6168('0x1a')]();};}function respondWithResult(_0x25e1d8,_0x20592d){_0x20592d=_0x20592d||0xc8;return function(_0x1e36dd){if(_0x1e36dd){return _0x25e1d8[_0x6168('0x19')](_0x20592d)['json'](_0x1e36dd);}};}function respondWithFilteredResult(_0x5b2b38,_0x577e20){return function(_0x47fe03){if(_0x47fe03){var _0x560423=_0x47fe03[_0x6168('0x1b')],_0x31b198=_0x577e20['offset'],_0xf17dbd=_0x577e20[_0x6168('0x1c')]+_0x577e20[_0x6168('0x1d')],_0x43149c;if(_0xf17dbd>=_0x560423){_0xf17dbd=_0x560423;_0x43149c=0xc8;}else{_0x43149c=0xce;}_0x5b2b38[_0x6168('0x19')](_0x43149c);return _0x5b2b38[_0x6168('0x1e')](_0x6168('0x1f'),_0x31b198+'-'+_0xf17dbd+'/'+_0x560423)['json'](_0x47fe03);}return null;};}function patchUpdates(_0x267513){return function(_0x34ffa3){try{jsonpatch[_0x6168('0x20')](_0x34ffa3,_0x267513,!![]);}catch(_0x363afe){return BPromise['reject'](_0x363afe);}return _0x34ffa3[_0x6168('0x21')]();};}function saveUpdates(_0x1594ca,_0x202449){return function(_0x21b864){if(_0x21b864){return _0x21b864[_0x6168('0x22')](_0x1594ca)['then'](function(_0x1ed821){return _0x1ed821;});}return null;};}function removeEntity(_0x5d80a4,_0x1d90d7){return function(_0x11fd05){if(_0x11fd05){return _0x11fd05['destroy']()['then'](function(){var _0x48f87c=_0x11fd05[_0x6168('0x23')]({'plain':!![]});var _0x5a5ac0=_0x6168('0x24');return db[_0x6168('0x25')]['destroy']({'where':{'type':_0x5a5ac0,'resourceId':_0x48f87c['id']}})[_0x6168('0x26')](function(){return _0x11fd05;});})['then'](function(){_0x5d80a4['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4bbfd4,_0x5e6db2){return function(_0x32ee69){if(!_0x32ee69){_0x4bbfd4[_0x6168('0x27')](0x194);}return _0x32ee69;};}function handleError(_0x4fc472,_0xa1226f){_0xa1226f=_0xa1226f||0x1f4;return function(_0x3125a8){logger[_0x6168('0x28')](_0x3125a8[_0x6168('0x29')]);if(_0x3125a8[_0x6168('0x2a')]){delete _0x3125a8[_0x6168('0x2a')];}_0x4fc472['status'](_0xa1226f)[_0x6168('0x2b')](_0x3125a8);};}exports['index']=function(_0x369d3f,_0x26cae9){var _0x23685d={},_0x120bc2={},_0x546e34={'count':0x0,'rows':[]};var _0x92ee60=db[_0x6168('0x2c')][_0x6168('0x2d')];_0x120bc2['model']=_[_0x6168('0x2e')](_0x92ee60);_0x120bc2[_0x6168('0x2f')]=_[_0x6168('0x2e')](_0x369d3f[_0x6168('0x2f')]);_0x120bc2[_0x6168('0x30')]=_[_0x6168('0x31')](_0x120bc2[_0x6168('0x32')],_0x120bc2[_0x6168('0x2f')]);_0x23685d[_0x6168('0x33')]=_[_0x6168('0x31')](_0x120bc2[_0x6168('0x32')],qs[_0x6168('0x34')](_0x369d3f[_0x6168('0x2f')]['fields']));_0x23685d['attributes']=_0x23685d[_0x6168('0x33')]['length']?_0x23685d[_0x6168('0x33')]:_0x120bc2[_0x6168('0x32')];if(!_0x369d3f[_0x6168('0x2f')][_0x6168('0x35')](_0x6168('0x36'))){_0x23685d[_0x6168('0x1d')]=qs[_0x6168('0x1d')](_0x369d3f[_0x6168('0x2f')][_0x6168('0x1d')]);_0x23685d['offset']=qs['offset'](_0x369d3f[_0x6168('0x2f')][_0x6168('0x1c')]);}_0x23685d[_0x6168('0x37')]=qs[_0x6168('0x38')](_0x369d3f['query'][_0x6168('0x38')]);_0x23685d[_0x6168('0x39')]=qs[_0x6168('0x30')](_['pick'](_0x369d3f['query'],_0x120bc2[_0x6168('0x30')]));if(_0x369d3f[_0x6168('0x2f')][_0x6168('0x3a')]){_0x23685d[_0x6168('0x39')]=_[_0x6168('0x3b')](_0x23685d[_0x6168('0x39')],{'$or':_[_0x6168('0x3c')](_0x92ee60,function(_0x16dd10){if(_0x16dd10[_0x6168('0x3d')]['key']!==_0x6168('0x3e')){var _0x279739={};_0x279739[_0x16dd10['field']]={'$like':'%'+_0x369d3f[_0x6168('0x2f')]['filter']+'%'};return _0x279739;}})});}_0x23685d=_[_0x6168('0x3b')]({},_0x23685d,_0x369d3f[_0x6168('0x3f')]);var _0x40a336={'where':_0x23685d[_0x6168('0x39')]};return db[_0x6168('0x2c')]['count'](_0x40a336)['then'](function(_0x3e858e){_0x546e34[_0x6168('0x1b')]=_0x3e858e;if(_0x369d3f['query'][_0x6168('0x40')]){_0x23685d[_0x6168('0x41')]=[{'all':!![]}];}return db[_0x6168('0x2c')][_0x6168('0x42')](_0x23685d);})['then'](function(_0x12be4f){_0x546e34[_0x6168('0x43')]=_0x12be4f;return _0x546e34;})['then'](respondWithFilteredResult(_0x26cae9,_0x23685d))[_0x6168('0x44')](handleError(_0x26cae9,null));};exports[_0x6168('0x45')]=function(_0x234c03,_0x19f4b9){var _0x2d809d={'raw':![],'where':{'id':_0x234c03[_0x6168('0x46')]['id']}},_0x262f88={};_0x262f88[_0x6168('0x32')]=_['keys'](db[_0x6168('0x2c')]['rawAttributes']);_0x262f88[_0x6168('0x2f')]=_[_0x6168('0x2e')](_0x234c03['query']);_0x262f88[_0x6168('0x30')]=_[_0x6168('0x31')](_0x262f88[_0x6168('0x32')],_0x262f88[_0x6168('0x2f')]);_0x2d809d[_0x6168('0x33')]=_[_0x6168('0x31')](_0x262f88[_0x6168('0x32')],qs[_0x6168('0x34')](_0x234c03[_0x6168('0x2f')][_0x6168('0x34')]));_0x2d809d[_0x6168('0x33')]=_0x2d809d[_0x6168('0x33')][_0x6168('0x47')]?_0x2d809d[_0x6168('0x33')]:_0x262f88[_0x6168('0x32')];if(_0x234c03[_0x6168('0x2f')][_0x6168('0x40')]){_0x2d809d['include']=[{'all':!![]}];}_0x2d809d=_['merge']({},_0x2d809d,_0x234c03[_0x6168('0x3f')]);return db[_0x6168('0x2c')][_0x6168('0x48')](_0x2d809d)[_0x6168('0x26')](handleEntityNotFound(_0x19f4b9,null))['then'](respondWithResult(_0x19f4b9,null))['catch'](handleError(_0x19f4b9,null));};exports[_0x6168('0x49')]=function(_0x49df8e,_0x4775ac){return db[_0x6168('0x2c')][_0x6168('0x49')](_0x49df8e['body'],{})[_0x6168('0x26')](function(_0x722e26){var _0x2a50e6=_0x49df8e[_0x6168('0x4a')][_0x6168('0x23')]({'plain':!![]});if(!_0x2a50e6)throw new Error(_0x6168('0x4b'));if(_0x2a50e6[_0x6168('0x4c')]===_0x6168('0x4a')){var _0x2cf0e9=_0x722e26[_0x6168('0x23')]({'plain':!![]});var _0x349df9=_0x6168('0x24');return db[_0x6168('0x4d')][_0x6168('0x48')]({'where':{'name':_0x349df9,'userProfileId':_0x2a50e6[_0x6168('0x4e')]},'raw':!![]})[_0x6168('0x26')](function(_0x4ea893){if(_0x4ea893&&_0x4ea893[_0x6168('0x4f')]===0x0){return db[_0x6168('0x25')][_0x6168('0x49')]({'name':_0x2cf0e9[_0x6168('0x2a')],'resourceId':_0x2cf0e9['id'],'type':_0x4ea893[_0x6168('0x2a')],'sectionId':_0x4ea893['id']},{})[_0x6168('0x26')](function(){return _0x722e26;});}else{return _0x722e26;}})[_0x6168('0x44')](function(_0xaa0a82){logger[_0x6168('0x28')](_0x6168('0x50'),_0xaa0a82);throw _0xaa0a82;});}return _0x722e26;})[_0x6168('0x26')](respondWithResult(_0x4775ac,0xc9))[_0x6168('0x44')](handleError(_0x4775ac,null));};exports[_0x6168('0x22')]=function(_0x54e018,_0x34ba78){if(_0x54e018['body']['id']){delete _0x54e018['body']['id'];}return db['Schedule'][_0x6168('0x48')]({'where':{'id':_0x54e018[_0x6168('0x46')]['id']}})[_0x6168('0x26')](handleEntityNotFound(_0x34ba78,null))['then'](saveUpdates(_0x54e018['body'],null))[_0x6168('0x26')](respondWithResult(_0x34ba78,null))[_0x6168('0x44')](handleError(_0x34ba78,null));};exports[_0x6168('0x51')]=function(_0x4c2754,_0x281f4d){return db[_0x6168('0x2c')][_0x6168('0x48')]({'where':{'id':_0x4c2754[_0x6168('0x46')]['id']}})[_0x6168('0x26')](handleEntityNotFound(_0x281f4d,null))[_0x6168('0x26')](removeEntity(_0x281f4d,null))[_0x6168('0x44')](handleError(_0x281f4d,null));};exports[_0x6168('0x52')]=function(_0x36dfb8,_0x21a652,_0xc5daf0){var _0x51fd8b=require('../../config/schedule');return db['Schedule']['find']({'where':{'id':_0x36dfb8[_0x6168('0x46')]['id']},'raw':!![]})[_0x6168('0x26')](handleEntityNotFound(_0x21a652,null))[_0x6168('0x26')](function(){_0x51fd8b[_0x6168('0x52')](_0x36dfb8[_0x6168('0x46')]['id']);})[_0x6168('0x26')](respondWithStatusCode(_0x21a652,null))[_0x6168('0x44')](handleError(_0x21a652,null));};
\ No newline at end of file
diff --git a/server/api/schedule/schedule.model.js b/server/api/schedule/schedule.model.js
index d7cbcf7..ed941a6 100644
--- a/server/api/schedule/schedule.model.js
+++ b/server/api/schedule/schedule.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3076=['bluebird','request-promise','path','rimraf','../../config/environment','./schedule.attributes','exports','define','Schedule','tools_schedules','lodash','../../config/logger','api','moment'];(function(_0x4f495f,_0x1844cd){var _0x5c08c9=function(_0x357e34){while(--_0x357e34){_0x4f495f['push'](_0x4f495f['shift']());}};_0x5c08c9(++_0x1844cd);}(_0x3076,0x1e6));var _0x6307=function(_0x216dc9,_0x385e89){_0x216dc9=_0x216dc9-0x0;var _0x51f0c3=_0x3076[_0x216dc9];return _0x51f0c3;};'use strict';var _=require(_0x6307('0x0'));var util=require('util');var logger=require(_0x6307('0x1'))(_0x6307('0x2'));var moment=require(_0x6307('0x3'));var BPromise=require(_0x6307('0x4'));var rp=require(_0x6307('0x5'));var fs=require('fs');var path=require(_0x6307('0x6'));var rimraf=require(_0x6307('0x7'));var config=require(_0x6307('0x8'));var attributes=require(_0x6307('0x9'));module[_0x6307('0xa')]=function(_0x22a404,_0x5d90f5){return _0x22a404[_0x6307('0xb')](_0x6307('0xc'),attributes,{'tableName':_0x6307('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5a5f=['exports','define','Schedule','lodash','../../config/logger','bluebird','request-promise','path','rimraf','./schedule.attributes'];(function(_0x4a5c2f,_0x15bcdd){var _0x43651d=function(_0x317042){while(--_0x317042){_0x4a5c2f['push'](_0x4a5c2f['shift']());}};_0x43651d(++_0x15bcdd);}(_0x5a5f,0x85));var _0xf5a5=function(_0x212dad,_0xb862ef){_0x212dad=_0x212dad-0x0;var _0x4fea3f=_0x5a5f[_0x212dad];return _0x4fea3f;};'use strict';var _=require(_0xf5a5('0x0'));var util=require('util');var logger=require(_0xf5a5('0x1'))('api');var moment=require('moment');var BPromise=require(_0xf5a5('0x2'));var rp=require(_0xf5a5('0x3'));var fs=require('fs');var path=require(_0xf5a5('0x4'));var rimraf=require(_0xf5a5('0x5'));var config=require('../../config/environment');var attributes=require(_0xf5a5('0x6'));module[_0xf5a5('0x7')]=function(_0x58a8c6,_0x4efdde){return _0x58a8c6[_0xf5a5('0x8')](_0xf5a5('0x9'),attributes,{'tableName':'tools_schedules','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/schedule/schedule.rpc.js b/server/api/schedule/schedule.rpc.js
index 3ce1c6f..bf0bc82 100644
--- a/server/api/schedule/schedule.rpc.js
+++ b/server/api/schedule/schedule.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa8b8=['debug','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','Schedule,\x20%s,\x20%s','request\x20sent'];(function(_0x50e89b,_0x4bded8){var _0x4b9202=function(_0x2b3dc6){while(--_0x2b3dc6){_0x50e89b['push'](_0x50e89b['shift']());}};_0x4b9202(++_0x4bded8);}(_0xa8b8,0x15c));var _0x8a8b=function(_0x49408f,_0x5e1d24){_0x49408f=_0x49408f-0x0;var _0x4b99ec=_0xa8b8[_0x49408f];return _0x4b99ec;};'use strict';var _=require(_0x8a8b('0x0'));var util=require(_0x8a8b('0x1'));var moment=require(_0x8a8b('0x2'));var BPromise=require(_0x8a8b('0x3'));var rs=require(_0x8a8b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8a8b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x8a8b('0x6'))(_0x8a8b('0x7'));var config=require(_0x8a8b('0x8'));var jayson=require(_0x8a8b('0x9'));var client=jayson[_0x8a8b('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x593bf8,_0x24a6bc,_0x467987){return new BPromise(function(_0x59102e,_0x543dd7){return client['request'](_0x593bf8,_0x467987)['then'](function(_0x5c67b7){logger['info'](_0x8a8b('0xb'),_0x24a6bc,_0x8a8b('0xc'));logger[_0x8a8b('0xd')]('Schedule,\x20%s,\x20%s,\x20%s',_0x24a6bc,_0x8a8b('0xc'),JSON[_0x8a8b('0xe')](_0x5c67b7));if(_0x5c67b7[_0x8a8b('0xf')]){if(_0x5c67b7[_0x8a8b('0xf')]['code']===0x1f4){logger[_0x8a8b('0xf')](_0x8a8b('0xb'),_0x24a6bc,_0x5c67b7['error'][_0x8a8b('0x10')]);return _0x543dd7(_0x5c67b7[_0x8a8b('0xf')][_0x8a8b('0x10')]);}logger[_0x8a8b('0xf')]('Schedule,\x20%s,\x20%s',_0x24a6bc,_0x5c67b7[_0x8a8b('0xf')][_0x8a8b('0x10')]);return _0x59102e(_0x5c67b7[_0x8a8b('0xf')]['message']);}else{logger['info'](_0x8a8b('0xb'),_0x24a6bc,_0x8a8b('0xc'));_0x59102e(_0x5c67b7[_0x8a8b('0x11')][_0x8a8b('0x10')]);}})[_0x8a8b('0x12')](function(_0x2ff801){logger[_0x8a8b('0xf')](_0x8a8b('0xb'),_0x24a6bc,_0x2ff801);_0x543dd7(_0x2ff801);});});}
\ No newline at end of file
+var _0x523a=['code','error','message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','Schedule,\x20%s,\x20%s','request\x20sent','Schedule,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x47f72e,_0x252010){var _0x4eed08=function(_0x116c9f){while(--_0x116c9f){_0x47f72e['push'](_0x47f72e['shift']());}};_0x4eed08(++_0x252010);}(_0x523a,0x175));var _0xa523=function(_0x18abd2,_0x22d4b3){_0x18abd2=_0x18abd2-0x0;var _0x1dcad6=_0x523a[_0x18abd2];return _0x1dcad6;};'use strict';var _=require(_0xa523('0x0'));var util=require('util');var moment=require(_0xa523('0x1'));var BPromise=require(_0xa523('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa523('0x3'));var db=require(_0xa523('0x4'))['db'];var utils=require(_0xa523('0x5'));var logger=require(_0xa523('0x6'))(_0xa523('0x7'));var config=require(_0xa523('0x8'));var jayson=require(_0xa523('0x9'));var client=jayson[_0xa523('0xa')][_0xa523('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x584d25,_0x85c5f6,_0x5635cc){return new BPromise(function(_0x129477,_0x447708){return client[_0xa523('0xc')](_0x584d25,_0x5635cc)['then'](function(_0x142131){logger[_0xa523('0xd')](_0xa523('0xe'),_0x85c5f6,_0xa523('0xf'));logger['debug'](_0xa523('0x10'),_0x85c5f6,_0xa523('0xf'),JSON[_0xa523('0x11')](_0x142131));if(_0x142131['error']){if(_0x142131['error'][_0xa523('0x12')]===0x1f4){logger[_0xa523('0x13')](_0xa523('0xe'),_0x85c5f6,_0x142131[_0xa523('0x13')]['message']);return _0x447708(_0x142131[_0xa523('0x13')]['message']);}logger[_0xa523('0x13')]('Schedule,\x20%s,\x20%s',_0x85c5f6,_0x142131[_0xa523('0x13')][_0xa523('0x14')]);return _0x129477(_0x142131['error']['message']);}else{logger[_0xa523('0xd')](_0xa523('0xe'),_0x85c5f6,_0xa523('0xf'));_0x129477(_0x142131[_0xa523('0x15')][_0xa523('0x14')]);}})[_0xa523('0x16')](function(_0x40ed36){logger[_0xa523('0x13')](_0xa523('0xe'),_0x85c5f6,_0x40ed36);_0x447708(_0x40ed36);});});}
\ No newline at end of file
diff --git a/server/api/screenRecording/index.js b/server/api/screenRecording/index.js
index fcc19c3..fd5b430 100644
--- a/server/api/screenRecording/index.js
+++ b/server/api/screenRecording/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1caf=['/describe','isAuthenticated','describe','show','get','download','post','create','/:id','update','delete','destroy','exports','multer','path','../../components/auth/service','../../config/environment','index'];(function(_0x2f1825,_0x517fc6){var _0x28235a=function(_0x294732){while(--_0x294732){_0x2f1825['push'](_0x2f1825['shift']());}};_0x28235a(++_0x517fc6);}(_0x1caf,0x1e1));var _0xf1ca=function(_0xae7c2f,_0xf31e04){_0xae7c2f=_0xae7c2f-0x0;var _0x5d7001=_0x1caf[_0xae7c2f];return _0x5d7001;};'use strict';var multer=require(_0xf1ca('0x0'));var util=require('util');var path=require(_0xf1ca('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0xf1ca('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0xf1ca('0x3'));var controller=require('./screenRecording.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xf1ca('0x4')]);router['get'](_0xf1ca('0x5'),auth[_0xf1ca('0x6')](),controller[_0xf1ca('0x7')]);router['get']('/:id',auth[_0xf1ca('0x6')](),controller[_0xf1ca('0x8')]);router[_0xf1ca('0x9')]('/:id/download',auth['isAuthenticated'](),controller[_0xf1ca('0xa')]);router[_0xf1ca('0xb')]('/',auth[_0xf1ca('0x6')](),controller[_0xf1ca('0xc')]);router['put'](_0xf1ca('0xd'),auth[_0xf1ca('0x6')](),controller[_0xf1ca('0xe')]);router[_0xf1ca('0xf')](_0xf1ca('0xd'),auth[_0xf1ca('0x6')](),controller[_0xf1ca('0x10')]);module[_0xf1ca('0x11')]=router;
\ No newline at end of file
+var _0x5322=['destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./screenRecording.controller','get','isAuthenticated','index','/describe','describe','/:id','show','download','post','create','put','update','delete'];(function(_0x4477e1,_0x21bdc1){var _0x1db42a=function(_0x2fb79e){while(--_0x2fb79e){_0x4477e1['push'](_0x4477e1['shift']());}};_0x1db42a(++_0x21bdc1);}(_0x5322,0xff));var _0x2532=function(_0x549278,_0x450754){_0x549278=_0x549278-0x0;var _0x1ea9a1=_0x5322[_0x549278];return _0x1ea9a1;};'use strict';var multer=require(_0x2532('0x0'));var util=require(_0x2532('0x1'));var path=require(_0x2532('0x2'));var timeout=require('connect-timeout');var express=require(_0x2532('0x3'));var router=express[_0x2532('0x4')]();var auth=require(_0x2532('0x5'));var interaction=require(_0x2532('0x6'));var config=require('../../config/environment');var controller=require(_0x2532('0x7'));router[_0x2532('0x8')]('/',auth[_0x2532('0x9')](),controller[_0x2532('0xa')]);router[_0x2532('0x8')](_0x2532('0xb'),auth['isAuthenticated'](),controller[_0x2532('0xc')]);router[_0x2532('0x8')](_0x2532('0xd'),auth[_0x2532('0x9')](),controller[_0x2532('0xe')]);router[_0x2532('0x8')]('/:id/download',auth[_0x2532('0x9')](),controller[_0x2532('0xf')]);router[_0x2532('0x10')]('/',auth['isAuthenticated'](),controller[_0x2532('0x11')]);router[_0x2532('0x12')](_0x2532('0xd'),auth[_0x2532('0x9')](),controller[_0x2532('0x13')]);router[_0x2532('0x14')](_0x2532('0xd'),auth[_0x2532('0x9')](),controller[_0x2532('0x15')]);module[_0x2532('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.attributes.js b/server/api/screenRecording/screenRecording.attributes.js
index ee41f07..af43efc 100644
--- a/server/api/screenRecording/screenRecording.attributes.js
+++ b/server/api/screenRecording/screenRecording.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1a41=['DATE','format','MM-DD-YYYY\x20HH:mm','toString','closedAt','updatedAt','moment','../../config/environment','exports','getDataValue','value','extname','STRING','INTEGER','startedAt','setDataValue'];(function(_0x1e2080,_0x53283b){var _0x260111=function(_0x15da5e){while(--_0x15da5e){_0x1e2080['push'](_0x1e2080['shift']());}};_0x260111(++_0x53283b);}(_0x1a41,0x126));var _0x11a4=function(_0xab2a11,_0x1b34fb){_0xab2a11=_0xab2a11-0x0;var _0x5421cc=_0x1a41[_0xab2a11];return _0x5421cc;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x11a4('0x0'));var path=require('path');var config=require(_0x11a4('0x1'));module[_0x11a4('0x2')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x11a4('0x3')](_0x11a4('0x4'))?path[_0x11a4('0x5')](this['getDataValue'](_0x11a4('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0x11a4('0x6')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0x11a4('0x6')],'set':function(_0x3044c2){var _0x2f3cbc=_0x3044c2['replace'](/\\/g,'/');this['setDataValue'](_0x11a4('0x4'),_0x2f3cbc);}},'rating':{'type':Sequelize[_0x11a4('0x7')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x11a4('0x7')],'set':function(_0x5cfd89){this['setDataValue'](_0x11a4('0x8'),moment()['subtract'](_0x5cfd89,'ms'));this[_0x11a4('0x9')]('closedAt',moment());this[_0x11a4('0x9')]('duration',_0x5cfd89);}},'startedAt':{'type':Sequelize[_0x11a4('0xa')],'get':function(){return moment(this[_0x11a4('0x3')](_0x11a4('0x8')))[_0x11a4('0xb')](_0x11a4('0xc'))[_0x11a4('0xd')]();}},'closedAt':{'type':Sequelize[_0x11a4('0xa')],'get':function(){return moment(this[_0x11a4('0x3')](_0x11a4('0xe')))[_0x11a4('0xb')](_0x11a4('0xc'))[_0x11a4('0xd')]();}},'createdAt':{'type':Sequelize[_0x11a4('0xa')],'get':function(){return moment(this[_0x11a4('0x3')]('createdAt'))[_0x11a4('0xb')](_0x11a4('0xc'))[_0x11a4('0xd')]();}},'updatedAt':{'type':Sequelize[_0x11a4('0xa')],'get':function(){return moment(this[_0x11a4('0x3')](_0x11a4('0xf')))[_0x11a4('0xb')](_0x11a4('0xc'))[_0x11a4('0xd')]();}}};
\ No newline at end of file
+var _0xc6aa=['VIRTUAL','getDataValue','value','extname','STRING','replace','setDataValue','INTEGER','startedAt','subtract','closedAt','format','MM-DD-YYYY\x20HH:mm','toString','DATE','sequelize','../../config/environment'];(function(_0xde07d3,_0x36f465){var _0x1f5b93=function(_0xf31be2){while(--_0xf31be2){_0xde07d3['push'](_0xde07d3['shift']());}};_0x1f5b93(++_0x36f465);}(_0xc6aa,0x75));var _0xac6a=function(_0x5da089,_0x229a34){_0x5da089=_0x5da089-0x0;var _0x4391e8=_0xc6aa[_0x5da089];return _0x4391e8;};'use strict';var Sequelize=require(_0xac6a('0x0'));var moment=require('moment');var path=require('path');var config=require(_0xac6a('0x1'));module['exports']={'format':{'type':Sequelize[_0xac6a('0x2')],'get':function(){return this[_0xac6a('0x3')](_0xac6a('0x4'))?path[_0xac6a('0x5')](this[_0xac6a('0x3')](_0xac6a('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0xac6a('0x6')]},'channel':{'type':Sequelize[_0xac6a('0x6')]},'value':{'type':Sequelize['STRING'],'set':function(_0x5b58d0){var _0x4612c6=_0x5b58d0[_0xac6a('0x7')](/\\/g,'/');this[_0xac6a('0x8')](_0xac6a('0x4'),_0x4612c6);}},'rating':{'type':Sequelize[_0xac6a('0x9')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xac6a('0x9')],'set':function(_0x447531){this[_0xac6a('0x8')](_0xac6a('0xa'),moment()[_0xac6a('0xb')](_0x447531,'ms'));this[_0xac6a('0x8')](_0xac6a('0xc'),moment());this[_0xac6a('0x8')]('duration',_0x447531);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xac6a('0x3')](_0xac6a('0xa')))[_0xac6a('0xd')](_0xac6a('0xe'))[_0xac6a('0xf')]();}},'closedAt':{'type':Sequelize[_0xac6a('0x10')],'get':function(){return moment(this[_0xac6a('0x3')](_0xac6a('0xc')))[_0xac6a('0xd')]('MM-DD-YYYY\x20HH:mm')[_0xac6a('0xf')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xac6a('0x3')]('createdAt'))['format']('MM-DD-YYYY\x20HH:mm')[_0xac6a('0xf')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xac6a('0x3')]('updatedAt'))[_0xac6a('0xd')]('MM-DD-YYYY\x20HH:mm')[_0xac6a('0xf')]();}}};
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.controller.js b/server/api/screenRecording/screenRecording.controller.js
index b76fe1e..0e4961d 100644
--- a/server/api/screenRecording/screenRecording.controller.js
+++ b/server/api/screenRecording/screenRecording.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e81=['include','rows','show','find','catch','create','body','duration','value','params','describe','../../components/encryptor','type','uniqueid','join','root','%s.cypher','existsSync','decryptFile','secrets','recording','server/files/screen_recordings','Sequelize','ValidationError','ScreenRecording\x20not\x20found','download','filename','extname','unlink','message','Not\x20found','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','path','to-csv','ejs','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','limit','set','Content-Range','reject','then','destroy','stack','name','send','index','model','differenceBy','keys','format','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','field','filter','options','ScreenRecording','count','includeAll'];(function(_0x234e1a,_0x40f0fe){var _0x55e549=function(_0x2a39b1){while(--_0x2a39b1){_0x234e1a['push'](_0x234e1a['shift']());}};_0x55e549(++_0x40f0fe);}(_0x9e81,0x18b));var _0x19e8=function(_0x246568,_0x57af04){_0x246568=_0x246568-0x0;var _0x19b302=_0x9e81[_0x246568];return _0x19b302;};'use strict';var pdf=require(_0x19e8('0x0'));var emlformat=require(_0x19e8('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x19e8('0x2'));var jsonpatch=require(_0x19e8('0x3'));var rp=require(_0x19e8('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x19e8('0x5'));var util=require(_0x19e8('0x6'));var path=require(_0x19e8('0x7'));var sox=require('sox');var csv=require(_0x19e8('0x8'));var ejs=require(_0x19e8('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x19e8('0xa'));var crypto=require('crypto');var jsforce=require(_0x19e8('0xb'));var deskjs=require(_0x19e8('0xc'));var toCsv=require(_0x19e8('0x8'));var querystring=require('querystring');var Papa=require(_0x19e8('0xd'));var Redis=require(_0x19e8('0xe'));var authService=require(_0x19e8('0xf'));var qs=require(_0x19e8('0x10'));var hardwareService=require(_0x19e8('0x11'));var logger=require(_0x19e8('0x12'))('api');var utils=require(_0x19e8('0x13'));var config=require(_0x19e8('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x15a340,_0x171a6d){_0x171a6d=_0x171a6d||0xcc;return function(_0x4462c0){if(_0x4462c0){return _0x15a340[_0x19e8('0x15')](_0x171a6d);}return _0x15a340[_0x19e8('0x16')](_0x171a6d)[_0x19e8('0x17')]();};}function respondWithResult(_0x444481,_0x26329c){_0x26329c=_0x26329c||0xc8;return function(_0xe8959b){if(_0xe8959b){return _0x444481[_0x19e8('0x16')](_0x26329c)[_0x19e8('0x18')](_0xe8959b);}};}function respondWithFilteredResult(_0x8fe361,_0x243d2d){return function(_0x504620){if(_0x504620){var _0x36e1d=_0x504620['count'],_0x22218e=_0x243d2d[_0x19e8('0x19')],_0x210d6d=_0x243d2d['offset']+_0x243d2d[_0x19e8('0x1a')],_0x160bb1;if(_0x210d6d>=_0x36e1d){_0x210d6d=_0x36e1d;_0x160bb1=0xc8;}else{_0x160bb1=0xce;}_0x8fe361[_0x19e8('0x16')](_0x160bb1);return _0x8fe361[_0x19e8('0x1b')](_0x19e8('0x1c'),_0x22218e+'-'+_0x210d6d+'/'+_0x36e1d)[_0x19e8('0x18')](_0x504620);}return null;};}function patchUpdates(_0x235dad){return function(_0x51de49){try{jsonpatch['apply'](_0x51de49,_0x235dad,!![]);}catch(_0x1da492){return BPromise[_0x19e8('0x1d')](_0x1da492);}return _0x51de49['save']();};}function saveUpdates(_0x595633,_0x554574){return function(_0x256715){if(_0x256715){return _0x256715['update'](_0x595633)[_0x19e8('0x1e')](function(_0x58495e){return _0x58495e;});}return null;};}function removeEntity(_0x2bf344,_0x593ed4){return function(_0x8918fc){if(_0x8918fc){return _0x8918fc[_0x19e8('0x1f')]()['then'](function(){_0x2bf344['status'](0xcc)[_0x19e8('0x17')]();});}};}function handleEntityNotFound(_0x3f860e,_0x5c6f19){return function(_0x2127a4){if(!_0x2127a4){_0x3f860e[_0x19e8('0x15')](0x194);}return _0x2127a4;};}function handleError(_0x1f9f33,_0x4d73ee){_0x4d73ee=_0x4d73ee||0x1f4;return function(_0x5b6b6b){logger['error'](_0x5b6b6b[_0x19e8('0x20')]);if(_0x5b6b6b[_0x19e8('0x21')]){delete _0x5b6b6b['name'];}_0x1f9f33['status'](_0x4d73ee)[_0x19e8('0x22')](_0x5b6b6b);};}exports[_0x19e8('0x23')]=function(_0x256d4e,_0x5e9ad5){var _0x1e119c={},_0x4e31dd={},_0x302803={'count':0x0,'rows':[]};var _0x2455d4=db['ScreenRecording']['rawAttributes'];_0x4e31dd[_0x19e8('0x24')]=_[_0x19e8('0x25')](_[_0x19e8('0x26')](_0x2455d4),[_0x19e8('0x27')]);_0x4e31dd[_0x19e8('0x28')]=_['keys'](_0x256d4e['query']);_0x4e31dd[_0x19e8('0x29')]=_[_0x19e8('0x2a')](_0x4e31dd['model'],_0x4e31dd[_0x19e8('0x28')]);_0x1e119c[_0x19e8('0x2b')]=_[_0x19e8('0x2a')](_0x4e31dd[_0x19e8('0x24')],qs['fields'](_0x256d4e['query'][_0x19e8('0x2c')]));_0x1e119c['attributes']=_0x1e119c[_0x19e8('0x2b')][_0x19e8('0x2d')]?_0x1e119c[_0x19e8('0x2b')]:_0x4e31dd['model'];if(!_0x256d4e[_0x19e8('0x28')][_0x19e8('0x2e')](_0x19e8('0x2f'))){_0x1e119c[_0x19e8('0x1a')]=qs[_0x19e8('0x1a')](_0x256d4e[_0x19e8('0x28')][_0x19e8('0x1a')]);_0x1e119c[_0x19e8('0x19')]=qs[_0x19e8('0x19')](_0x256d4e['query'][_0x19e8('0x19')]);}_0x1e119c[_0x19e8('0x30')]=qs[_0x19e8('0x31')](_0x256d4e[_0x19e8('0x28')]['sort']);_0x1e119c[_0x19e8('0x32')]=qs['filters'](_[_0x19e8('0x33')](_0x256d4e['query'],_0x4e31dd[_0x19e8('0x29')]));if(_0x256d4e[_0x19e8('0x28')]['filter']){_0x1e119c[_0x19e8('0x32')]=_[_0x19e8('0x34')](_0x1e119c[_0x19e8('0x32')],{'$or':_['map'](_0x2455d4,function(_0x22fd46){if(_0x22fd46['type']['key']!==_0x19e8('0x35')){var _0x4fdc7c={};_0x4fdc7c[_0x22fd46[_0x19e8('0x36')]]={'$like':'%'+_0x256d4e[_0x19e8('0x28')][_0x19e8('0x37')]+'%'};return _0x4fdc7c;}})});}_0x1e119c=_[_0x19e8('0x34')]({},_0x1e119c,_0x256d4e[_0x19e8('0x38')]);var _0x1cbe2={'where':_0x1e119c[_0x19e8('0x32')]};return db[_0x19e8('0x39')][_0x19e8('0x3a')](_0x1cbe2)[_0x19e8('0x1e')](function(_0x54d7be){_0x302803[_0x19e8('0x3a')]=_0x54d7be;if(_0x256d4e['query'][_0x19e8('0x3b')]){_0x1e119c[_0x19e8('0x3c')]=[{'all':!![]}];}return db[_0x19e8('0x39')]['findAll'](_0x1e119c);})[_0x19e8('0x1e')](function(_0x154623){_0x302803[_0x19e8('0x3d')]=_0x154623;return _0x302803;})[_0x19e8('0x1e')](respondWithFilteredResult(_0x5e9ad5,_0x1e119c))['catch'](handleError(_0x5e9ad5,null));};exports[_0x19e8('0x3e')]=function(_0x30355a,_0x38e7fb){var _0x1ceca0={'raw':![],'where':{'id':_0x30355a['params']['id']}},_0x4069ee={};_0x4069ee['model']=_['keys'](db['ScreenRecording']['rawAttributes']);_0x4069ee['query']=_[_0x19e8('0x26')](_0x30355a['query']);_0x4069ee['filters']=_['intersection'](_0x4069ee['model'],_0x4069ee[_0x19e8('0x28')]);_0x1ceca0[_0x19e8('0x2b')]=_[_0x19e8('0x2a')](_0x4069ee['model'],qs[_0x19e8('0x2c')](_0x30355a[_0x19e8('0x28')][_0x19e8('0x2c')]));_0x1ceca0[_0x19e8('0x2b')]=_0x1ceca0[_0x19e8('0x2b')][_0x19e8('0x2d')]?_0x1ceca0[_0x19e8('0x2b')]:_0x4069ee['model'];if(_0x30355a[_0x19e8('0x28')][_0x19e8('0x3b')]){_0x1ceca0[_0x19e8('0x3c')]=[{'all':!![]}];}_0x1ceca0=_['merge']({},_0x1ceca0,_0x30355a[_0x19e8('0x38')]);return db[_0x19e8('0x39')][_0x19e8('0x3f')](_0x1ceca0)[_0x19e8('0x1e')](handleEntityNotFound(_0x38e7fb,null))[_0x19e8('0x1e')](respondWithResult(_0x38e7fb,null))[_0x19e8('0x40')](handleError(_0x38e7fb,null));};exports['create']=function(_0x16941c,_0x1e2493){return db[_0x19e8('0x39')][_0x19e8('0x41')](_0x16941c[_0x19e8('0x42')],{})[_0x19e8('0x1e')](respondWithResult(_0x1e2493,0xc9))[_0x19e8('0x40')](handleError(_0x1e2493,null));};exports['update']=function(_0x27f3fb,_0xeb7c31){if(_0x27f3fb[_0x19e8('0x42')]['id']){delete _0x27f3fb[_0x19e8('0x42')]['id'];}delete _0x27f3fb[_0x19e8('0x42')][_0x19e8('0x43')];delete _0x27f3fb[_0x19e8('0x42')]['createdAt'];delete _0x27f3fb[_0x19e8('0x42')]['closedAt'];delete _0x27f3fb['body'][_0x19e8('0x44')];return db[_0x19e8('0x39')][_0x19e8('0x3f')]({'where':{'id':_0x27f3fb[_0x19e8('0x45')]['id']}})['then'](handleEntityNotFound(_0xeb7c31,null))[_0x19e8('0x1e')](saveUpdates(_0x27f3fb[_0x19e8('0x42')],null))[_0x19e8('0x1e')](respondWithResult(_0xeb7c31,null))[_0x19e8('0x40')](handleError(_0xeb7c31,null));};exports['destroy']=function(_0x4dc25c,_0x23ccf7){return db[_0x19e8('0x39')]['find']({'where':{'id':_0x4dc25c['params']['id']}})['then'](handleEntityNotFound(_0x23ccf7,null))[_0x19e8('0x1e')](removeEntity(_0x23ccf7,null))[_0x19e8('0x40')](handleError(_0x23ccf7,null));};exports[_0x19e8('0x46')]=function(_0x4deb2e,_0x2edef0){return db[_0x19e8('0x39')]['describe']()['then'](respondWithResult(_0x2edef0,null))[_0x19e8('0x40')](handleError(_0x2edef0,null));};exports['download']=function(_0x24021d,_0x4064ee,_0x2591d6){var _0x3d822d=require(_0x19e8('0x47'));var _0x5c0249=![];var _0x4cdd38={};if(_0x24021d[_0x19e8('0x28')][_0x19e8('0x48')]&&_0x24021d[_0x19e8('0x28')][_0x19e8('0x48')]===_0x19e8('0x49')){_0x4cdd38[_0x19e8('0x49')]=_0x24021d[_0x19e8('0x45')]['id'];}else{_0x4cdd38['id']=_0x24021d[_0x19e8('0x45')]['id'];}return db['ScreenRecording']['find']({'where':_0x4cdd38,'attributes':['id',_0x19e8('0x44')],'raw':!![]})[_0x19e8('0x1e')](handleEntityNotFound(_0x4064ee,null))[_0x19e8('0x1e')](function(_0x22e66d){if(_0x22e66d){var _0xb4be19=path[_0x19e8('0x4a')](config[_0x19e8('0x4b')],'server/files/screen_recordings',_0x22e66d[_0x19e8('0x44')]);var _0x3be516=util[_0x19e8('0x27')](_0x19e8('0x4c'),_0xb4be19);if(fs[_0x19e8('0x4d')](_0x3be516)){_0x5c0249=!![];return _0x3d822d[_0x19e8('0x4e')](_0x3be516,_0xb4be19,config[_0x19e8('0x4f')][_0x19e8('0x50')])['then'](function(){return _0x22e66d;});}return _0x22e66d;}})[_0x19e8('0x1e')](function(_0x1f59d2){if(_0x1f59d2){var _0xe0bef0=path[_0x19e8('0x4a')](config['root'],_0x19e8('0x51'),_0x1f59d2[_0x19e8('0x44')]);if(!fs[_0x19e8('0x4d')](_0xe0bef0)){throw new db[(_0x19e8('0x52'))][(_0x19e8('0x53'))](_0x19e8('0x54'));}if(_0x1f59d2['filename']){return _0x4064ee[_0x19e8('0x55')](_0xe0bef0,_0x1f59d2[_0x19e8('0x56')]+path[_0x19e8('0x57')](_0xe0bef0),function(){if(_0x5c0249){fs[_0x19e8('0x58')](_0xe0bef0);}});}else{return _0x4064ee[_0x19e8('0x55')](_0xe0bef0,function(_0x8062df){if(_0x5c0249){fs[_0x19e8('0x58')](_0xe0bef0);}});}}})['catch'](function(_0x3ffca5){if(_0x3ffca5[_0x19e8('0x59')]==='ScreenRecording\x20not\x20found'){_0x4064ee[_0x19e8('0x16')](0x194)[_0x19e8('0x22')](_0x19e8('0x5a'));}else{return handleError(_0x4064ee,null);}});};
\ No newline at end of file
+var _0x4bad=['moment','bluebird','path','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','end','error','name','send','index','ScreenRecording','model','format','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','map','type','key','VIRTUAL','field','merge','options','includeAll','include','catch','show','params','rawAttributes','filters','find','create','body','createdAt','value','describe','download','../../components/encryptor','uniqueid','join','root','server/files/screen_recordings','%s.cypher','existsSync','decryptFile','ValidationError','filename','unlink','ScreenRecording\x20not\x20found','Not\x20found','eml-format','zip-dir','fast-json-patch','request-promise'];(function(_0x16c2c5,_0x59f42b){var _0x1f2414=function(_0x7d9362){while(--_0x7d9362){_0x16c2c5['push'](_0x16c2c5['shift']());}};_0x1f2414(++_0x59f42b);}(_0x4bad,0xa8));var _0xd4ba=function(_0x2dfb67,_0x1cf249){_0x2dfb67=_0x2dfb67-0x0;var _0x1db9e3=_0x4bad[_0x2dfb67];return _0x1db9e3;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xd4ba('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd4ba('0x1'));var jsonpatch=require(_0xd4ba('0x2'));var rp=require(_0xd4ba('0x3'));var moment=require(_0xd4ba('0x4'));var BPromise=require(_0xd4ba('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xd4ba('0x6'));var sox=require(_0xd4ba('0x7'));var csv=require(_0xd4ba('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xd4ba('0x9'));var squel=require(_0xd4ba('0xa'));var crypto=require(_0xd4ba('0xb'));var jsforce=require(_0xd4ba('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xd4ba('0x8'));var querystring=require(_0xd4ba('0xd'));var Papa=require(_0xd4ba('0xe'));var Redis=require('ioredis');var authService=require(_0xd4ba('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xd4ba('0x10'));var logger=require('../../config/logger')(_0xd4ba('0x11'));var utils=require('../../config/utils');var config=require(_0xd4ba('0x12'));var db=require(_0xd4ba('0x13'))['db'];function respondWithStatusCode(_0x441f5f,_0x119ae7){_0x119ae7=_0x119ae7||0xcc;return function(_0x26c037){if(_0x26c037){return _0x441f5f[_0xd4ba('0x14')](_0x119ae7);}return _0x441f5f[_0xd4ba('0x15')](_0x119ae7)['end']();};}function respondWithResult(_0x5af6e2,_0xd08cf1){_0xd08cf1=_0xd08cf1||0xc8;return function(_0x1e9f03){if(_0x1e9f03){return _0x5af6e2[_0xd4ba('0x15')](_0xd08cf1)[_0xd4ba('0x16')](_0x1e9f03);}};}function respondWithFilteredResult(_0x57e0e3,_0xe4fae5){return function(_0x5a4699){if(_0x5a4699){var _0xcc2d22=_0x5a4699[_0xd4ba('0x17')],_0x62efac=_0xe4fae5[_0xd4ba('0x18')],_0x318d34=_0xe4fae5['offset']+_0xe4fae5[_0xd4ba('0x19')],_0x388c2c;if(_0x318d34>=_0xcc2d22){_0x318d34=_0xcc2d22;_0x388c2c=0xc8;}else{_0x388c2c=0xce;}_0x57e0e3[_0xd4ba('0x15')](_0x388c2c);return _0x57e0e3[_0xd4ba('0x1a')](_0xd4ba('0x1b'),_0x62efac+'-'+_0x318d34+'/'+_0xcc2d22)['json'](_0x5a4699);}return null;};}function patchUpdates(_0x5dad03){return function(_0xbcda28){try{jsonpatch[_0xd4ba('0x1c')](_0xbcda28,_0x5dad03,!![]);}catch(_0x1a3baf){return BPromise['reject'](_0x1a3baf);}return _0xbcda28[_0xd4ba('0x1d')]();};}function saveUpdates(_0x3bba33,_0x276dfc){return function(_0x12cf8e){if(_0x12cf8e){return _0x12cf8e[_0xd4ba('0x1e')](_0x3bba33)[_0xd4ba('0x1f')](function(_0x2aac5b){return _0x2aac5b;});}return null;};}function removeEntity(_0x20d9c3,_0x44e698){return function(_0x35b1cc){if(_0x35b1cc){return _0x35b1cc['destroy']()[_0xd4ba('0x1f')](function(){_0x20d9c3[_0xd4ba('0x15')](0xcc)[_0xd4ba('0x20')]();});}};}function handleEntityNotFound(_0x543338,_0x3d8b57){return function(_0x5e6b6c){if(!_0x5e6b6c){_0x543338[_0xd4ba('0x14')](0x194);}return _0x5e6b6c;};}function handleError(_0x2bb8d0,_0x496cb4){_0x496cb4=_0x496cb4||0x1f4;return function(_0x434a94){logger[_0xd4ba('0x21')](_0x434a94['stack']);if(_0x434a94[_0xd4ba('0x22')]){delete _0x434a94['name'];}_0x2bb8d0['status'](_0x496cb4)[_0xd4ba('0x23')](_0x434a94);};}exports[_0xd4ba('0x24')]=function(_0x291152,_0x4951dd){var _0x23d175={},_0x34f75f={},_0x6eba38={'count':0x0,'rows':[]};var _0x59b227=db[_0xd4ba('0x25')]['rawAttributes'];_0x34f75f[_0xd4ba('0x26')]=_['differenceBy'](_['keys'](_0x59b227),[_0xd4ba('0x27')]);_0x34f75f[_0xd4ba('0x28')]=_[_0xd4ba('0x29')](_0x291152['query']);_0x34f75f['filters']=_[_0xd4ba('0x2a')](_0x34f75f[_0xd4ba('0x26')],_0x34f75f[_0xd4ba('0x28')]);_0x23d175['attributes']=_[_0xd4ba('0x2a')](_0x34f75f[_0xd4ba('0x26')],qs[_0xd4ba('0x2b')](_0x291152[_0xd4ba('0x28')][_0xd4ba('0x2b')]));_0x23d175[_0xd4ba('0x2c')]=_0x23d175[_0xd4ba('0x2c')][_0xd4ba('0x2d')]?_0x23d175[_0xd4ba('0x2c')]:_0x34f75f[_0xd4ba('0x26')];if(!_0x291152[_0xd4ba('0x28')][_0xd4ba('0x2e')](_0xd4ba('0x2f'))){_0x23d175[_0xd4ba('0x19')]=qs[_0xd4ba('0x19')](_0x291152[_0xd4ba('0x28')][_0xd4ba('0x19')]);_0x23d175[_0xd4ba('0x18')]=qs[_0xd4ba('0x18')](_0x291152['query'][_0xd4ba('0x18')]);}_0x23d175['order']=qs[_0xd4ba('0x30')](_0x291152[_0xd4ba('0x28')]['sort']);_0x23d175['where']=qs['filters'](_[_0xd4ba('0x31')](_0x291152[_0xd4ba('0x28')],_0x34f75f['filters']));if(_0x291152[_0xd4ba('0x28')][_0xd4ba('0x32')]){_0x23d175[_0xd4ba('0x33')]=_['merge'](_0x23d175[_0xd4ba('0x33')],{'$or':_[_0xd4ba('0x34')](_0x59b227,function(_0x18530a){if(_0x18530a[_0xd4ba('0x35')][_0xd4ba('0x36')]!==_0xd4ba('0x37')){var _0x29c1ad={};_0x29c1ad[_0x18530a[_0xd4ba('0x38')]]={'$like':'%'+_0x291152[_0xd4ba('0x28')][_0xd4ba('0x32')]+'%'};return _0x29c1ad;}})});}_0x23d175=_[_0xd4ba('0x39')]({},_0x23d175,_0x291152[_0xd4ba('0x3a')]);var _0x42b33c={'where':_0x23d175['where']};return db[_0xd4ba('0x25')][_0xd4ba('0x17')](_0x42b33c)[_0xd4ba('0x1f')](function(_0x26f988){_0x6eba38['count']=_0x26f988;if(_0x291152['query'][_0xd4ba('0x3b')]){_0x23d175[_0xd4ba('0x3c')]=[{'all':!![]}];}return db[_0xd4ba('0x25')]['findAll'](_0x23d175);})[_0xd4ba('0x1f')](function(_0x1642e0){_0x6eba38['rows']=_0x1642e0;return _0x6eba38;})[_0xd4ba('0x1f')](respondWithFilteredResult(_0x4951dd,_0x23d175))[_0xd4ba('0x3d')](handleError(_0x4951dd,null));};exports[_0xd4ba('0x3e')]=function(_0x23c9ba,_0x2fd1c2){var _0x505c0b={'raw':![],'where':{'id':_0x23c9ba[_0xd4ba('0x3f')]['id']}},_0x36f8d1={};_0x36f8d1[_0xd4ba('0x26')]=_[_0xd4ba('0x29')](db['ScreenRecording'][_0xd4ba('0x40')]);_0x36f8d1[_0xd4ba('0x28')]=_[_0xd4ba('0x29')](_0x23c9ba[_0xd4ba('0x28')]);_0x36f8d1[_0xd4ba('0x41')]=_[_0xd4ba('0x2a')](_0x36f8d1['model'],_0x36f8d1[_0xd4ba('0x28')]);_0x505c0b['attributes']=_[_0xd4ba('0x2a')](_0x36f8d1[_0xd4ba('0x26')],qs['fields'](_0x23c9ba[_0xd4ba('0x28')][_0xd4ba('0x2b')]));_0x505c0b['attributes']=_0x505c0b['attributes']['length']?_0x505c0b[_0xd4ba('0x2c')]:_0x36f8d1[_0xd4ba('0x26')];if(_0x23c9ba[_0xd4ba('0x28')][_0xd4ba('0x3b')]){_0x505c0b[_0xd4ba('0x3c')]=[{'all':!![]}];}_0x505c0b=_[_0xd4ba('0x39')]({},_0x505c0b,_0x23c9ba[_0xd4ba('0x3a')]);return db[_0xd4ba('0x25')][_0xd4ba('0x42')](_0x505c0b)[_0xd4ba('0x1f')](handleEntityNotFound(_0x2fd1c2,null))[_0xd4ba('0x1f')](respondWithResult(_0x2fd1c2,null))[_0xd4ba('0x3d')](handleError(_0x2fd1c2,null));};exports[_0xd4ba('0x43')]=function(_0x313e25,_0x13f950){return db[_0xd4ba('0x25')][_0xd4ba('0x43')](_0x313e25[_0xd4ba('0x44')],{})[_0xd4ba('0x1f')](respondWithResult(_0x13f950,0xc9))[_0xd4ba('0x3d')](handleError(_0x13f950,null));};exports['update']=function(_0x377720,_0x2c4b7d){if(_0x377720[_0xd4ba('0x44')]['id']){delete _0x377720['body']['id'];}delete _0x377720['body']['duration'];delete _0x377720['body'][_0xd4ba('0x45')];delete _0x377720[_0xd4ba('0x44')]['closedAt'];delete _0x377720['body'][_0xd4ba('0x46')];return db[_0xd4ba('0x25')]['find']({'where':{'id':_0x377720[_0xd4ba('0x3f')]['id']}})[_0xd4ba('0x1f')](handleEntityNotFound(_0x2c4b7d,null))['then'](saveUpdates(_0x377720[_0xd4ba('0x44')],null))['then'](respondWithResult(_0x2c4b7d,null))[_0xd4ba('0x3d')](handleError(_0x2c4b7d,null));};exports['destroy']=function(_0xd77895,_0x9135f4){return db[_0xd4ba('0x25')][_0xd4ba('0x42')]({'where':{'id':_0xd77895[_0xd4ba('0x3f')]['id']}})['then'](handleEntityNotFound(_0x9135f4,null))[_0xd4ba('0x1f')](removeEntity(_0x9135f4,null))['catch'](handleError(_0x9135f4,null));};exports[_0xd4ba('0x47')]=function(_0x5717e1,_0x3e7946){return db['ScreenRecording']['describe']()['then'](respondWithResult(_0x3e7946,null))['catch'](handleError(_0x3e7946,null));};exports[_0xd4ba('0x48')]=function(_0x30f41f,_0x3a3918,_0x5d6960){var _0x57a793=require(_0xd4ba('0x49'));var _0x257b22=![];var _0x24a52f={};if(_0x30f41f[_0xd4ba('0x28')][_0xd4ba('0x35')]&&_0x30f41f['query']['type']==='uniqueid'){_0x24a52f[_0xd4ba('0x4a')]=_0x30f41f['params']['id'];}else{_0x24a52f['id']=_0x30f41f['params']['id'];}return db[_0xd4ba('0x25')][_0xd4ba('0x42')]({'where':_0x24a52f,'attributes':['id','value'],'raw':!![]})[_0xd4ba('0x1f')](handleEntityNotFound(_0x3a3918,null))[_0xd4ba('0x1f')](function(_0x4bdfb){if(_0x4bdfb){var _0x253574=path[_0xd4ba('0x4b')](config[_0xd4ba('0x4c')],_0xd4ba('0x4d'),_0x4bdfb['value']);var _0x4fd01c=util['format'](_0xd4ba('0x4e'),_0x253574);if(fs[_0xd4ba('0x4f')](_0x4fd01c)){_0x257b22=!![];return _0x57a793[_0xd4ba('0x50')](_0x4fd01c,_0x253574,config['secrets']['recording'])[_0xd4ba('0x1f')](function(){return _0x4bdfb;});}return _0x4bdfb;}})[_0xd4ba('0x1f')](function(_0x42f599){if(_0x42f599){var _0x4a10ca=path['join'](config['root'],_0xd4ba('0x4d'),_0x42f599['value']);if(!fs[_0xd4ba('0x4f')](_0x4a10ca)){throw new db['Sequelize'][(_0xd4ba('0x51'))]('ScreenRecording\x20not\x20found');}if(_0x42f599['filename']){return _0x3a3918['download'](_0x4a10ca,_0x42f599[_0xd4ba('0x52')]+path['extname'](_0x4a10ca),function(){if(_0x257b22){fs[_0xd4ba('0x53')](_0x4a10ca);}});}else{return _0x3a3918[_0xd4ba('0x48')](_0x4a10ca,function(_0x2b9b9f){if(_0x257b22){fs[_0xd4ba('0x53')](_0x4a10ca);}});}}})[_0xd4ba('0x3d')](function(_0x1f406f){if(_0x1f406f['message']===_0xd4ba('0x54')){_0x3a3918['status'](0x194)[_0xd4ba('0x23')](_0xd4ba('0x55'));}else{return handleError(_0x3a3918,null);}});};
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.model.js b/server/api/screenRecording/screenRecording.model.js
index 0583dab..c69405e 100644
--- a/server/api/screenRecording/screenRecording.model.js
+++ b/server/api/screenRecording/screenRecording.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x039a=['path','rimraf','./screenRecording.attributes','exports','define','ScreenRecording','screen_recordings','interactionid','isNil','value','join','root','server','files','existsSync','lodash','util','../../config/logger','api','request-promise'];(function(_0x533daa,_0xa80a60){var _0x4d0e5f=function(_0x54f2be){while(--_0x54f2be){_0x533daa['push'](_0x533daa['shift']());}};_0x4d0e5f(++_0xa80a60);}(_0x039a,0x19f));var _0xa039=function(_0x29e871,_0x330b98){_0x29e871=_0x29e871-0x0;var _0x3380e3=_0x039a[_0x29e871];return _0x3380e3;};'use strict';var _=require(_0xa039('0x0'));var util=require(_0xa039('0x1'));var logger=require(_0xa039('0x2'))(_0xa039('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa039('0x4'));var fs=require('fs');var path=require(_0xa039('0x5'));var rimraf=require(_0xa039('0x6'));var config=require('../../config/environment');var attributes=require(_0xa039('0x7'));module[_0xa039('0x8')]=function(_0x3f4515,_0xf503f3){return _0x3f4515[_0xa039('0x9')](_0xa039('0xa'),attributes,{'tableName':_0xa039('0xb'),'paranoid':![],'indexes':[{'name':_0xa039('0xc'),'fields':[_0xa039('0xc')]}],'timestamps':!![],'hooks':{'afterDestroy':function(_0x14c952,_0x3dd458,_0x24f908){return new BPromise(function(_0x3f871a,_0x296ecd){if(!_[_0xa039('0xd')](_0x14c952[_0xa039('0xe')])){var _0x339777=path[_0xa039('0xf')](config[_0xa039('0x10')],_0xa039('0x11'),_0xa039('0x12'),'screen_recordings',_0x14c952[_0xa039('0xe')]);if(fs[_0xa039('0x13')](_0x339777)){rimraf(_0x339777,function(_0x38c70e){if(_0x38c70e){console['log'](_0x38c70e);}});}}_0x3f871a();})['catch'](function(_0x32c9e0){BPromise['resolve']();})['finally'](function(){_0x24f908();});}}});};
\ No newline at end of file
+var _0x99e9=['bluebird','request-promise','rimraf','../../config/environment','define','ScreenRecording','screen_recordings','interactionid','isNil','value','join','server','existsSync','log','catch','resolve','finally','lodash','util','../../config/logger','moment'];(function(_0x510d8a,_0x4853f5){var _0x100381=function(_0x3080d0){while(--_0x3080d0){_0x510d8a['push'](_0x510d8a['shift']());}};_0x100381(++_0x4853f5);}(_0x99e9,0x137));var _0x999e=function(_0x571c00,_0x3ae028){_0x571c00=_0x571c00-0x0;var _0x2887df=_0x99e9[_0x571c00];return _0x2887df;};'use strict';var _=require(_0x999e('0x0'));var util=require(_0x999e('0x1'));var logger=require(_0x999e('0x2'))('api');var moment=require(_0x999e('0x3'));var BPromise=require(_0x999e('0x4'));var rp=require(_0x999e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x999e('0x6'));var config=require(_0x999e('0x7'));var attributes=require('./screenRecording.attributes');module['exports']=function(_0x5af0d0,_0x166058){return _0x5af0d0[_0x999e('0x8')](_0x999e('0x9'),attributes,{'tableName':_0x999e('0xa'),'paranoid':![],'indexes':[{'name':_0x999e('0xb'),'fields':[_0x999e('0xb')]}],'timestamps':!![],'hooks':{'afterDestroy':function(_0x526de9,_0xe5074e,_0x475716){return new BPromise(function(_0x4683f7,_0x508842){if(!_[_0x999e('0xc')](_0x526de9[_0x999e('0xd')])){var _0x7e9230=path[_0x999e('0xe')](config['root'],_0x999e('0xf'),'files','screen_recordings',_0x526de9[_0x999e('0xd')]);if(fs[_0x999e('0x10')](_0x7e9230)){rimraf(_0x7e9230,function(_0x33da17){if(_0x33da17){console[_0x999e('0x11')](_0x33da17);}});}}_0x4683f7();})[_0x999e('0x12')](function(_0x153eeb){BPromise[_0x999e('0x13')]();})[_0x999e('0x14')](function(){_0x475716();});}}});};
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.rpc.js b/server/api/screenRecording/screenRecording.rpc.js
index 6147c37..6b42fc5 100644
--- a/server/api/screenRecording/screenRecording.rpc.js
+++ b/server/api/screenRecording/screenRecording.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa41a=['rpc','../../config/environment','client','http','request','then','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x473577,_0x247d98){var _0x1088e1=function(_0x5b999f){while(--_0x5b999f){_0x473577['push'](_0x473577['shift']());}};_0x1088e1(++_0x247d98);}(_0xa41a,0x6b));var _0xaa41=function(_0x28c2aa,_0x103587){_0x28c2aa=_0x28c2aa-0x0;var _0xb6e435=_0xa41a[_0x28c2aa];return _0xb6e435;};'use strict';var _=require(_0xaa41('0x0'));var util=require(_0xaa41('0x1'));var moment=require('moment');var BPromise=require(_0xaa41('0x2'));var rs=require(_0xaa41('0x3'));var fs=require('fs');var Redis=require(_0xaa41('0x4'));var db=require(_0xaa41('0x5'))['db'];var utils=require(_0xaa41('0x6'));var logger=require(_0xaa41('0x7'))(_0xaa41('0x8'));var config=require(_0xaa41('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xaa41('0xa')][_0xaa41('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54bc5a,_0x5b1fff,_0x179545){return new BPromise(function(_0x202cce,_0x588ab4){return client[_0xaa41('0xc')](_0x54bc5a,_0x179545)[_0xaa41('0xd')](function(_0x409dab){logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));logger[_0xaa41('0x11')](_0xaa41('0x12'),_0x5b1fff,_0xaa41('0x10'),JSON['stringify'](_0x409dab));if(_0x409dab[_0xaa41('0x13')]){if(_0x409dab[_0xaa41('0x13')]['code']===0x1f4){logger['error'](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x588ab4(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x202cce(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}else{logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));_0x202cce(_0x409dab[_0xaa41('0x15')]['message']);}})[_0xaa41('0x16')](function(_0x16b930){logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x16b930);_0x588ab4(_0x16b930);});});}
\ No newline at end of file
+var _0x9957=['message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x521822,_0x5ea21c){var _0x21d4f9=function(_0x3c33bc){while(--_0x3c33bc){_0x521822['push'](_0x521822['shift']());}};_0x21d4f9(++_0x5ea21c);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('ScreenRecording,\x20%s,\x20%s',_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x465276(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}else{logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));_0x465276(_0x3116fb[_0x7995('0x16')]['message']);}})[_0x7995('0x17')](function(_0x565d97){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x565d97);_0x1cad37(_0x565d97);});});}
\ No newline at end of file
diff --git a/server/api/setting/index.js b/server/api/setting/index.js
index f2b3ab1..aa2148c 100644
--- a/server/api/setting/index.js
+++ b/server/api/setting/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9f3b=['/:id/logo','getLogo','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','diskStorage','join','root','format','%s%s','extname','originalname','post','single','file','addLogo','server/files/images/logos/','logologin','/:id/logo_login','preferred','addPreferred','put','/:id','update','exports','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','show'];(function(_0x5c4f56,_0x3c12ad){var _0x4d917a=function(_0x43bee8){while(--_0x43bee8){_0x5c4f56['push'](_0x5c4f56['shift']());}};_0x4d917a(++_0x3c12ad);}(_0x9f3b,0x167));var _0xb9f3=function(_0x1a5946,_0x426991){_0x1a5946=_0x1a5946-0x0;var _0x25e9d5=_0x9f3b[_0x1a5946];return _0x25e9d5;};'use strict';var multer=require('multer');var util=require(_0xb9f3('0x0'));var path=require(_0xb9f3('0x1'));var timeout=require(_0xb9f3('0x2'));var express=require(_0xb9f3('0x3'));var router=express['Router']();var auth=require(_0xb9f3('0x4'));var interaction=require(_0xb9f3('0x5'));var config=require(_0xb9f3('0x6'));var controller=require('./setting.controller');router['get']('/',auth[_0xb9f3('0x7')](),controller[_0xb9f3('0x8')]);router[_0xb9f3('0x9')]('/:id',controller[_0xb9f3('0xa')]);router[_0xb9f3('0x9')](_0xb9f3('0xb'),controller[_0xb9f3('0xc')]);router[_0xb9f3('0x9')]('/:id/logo_login',controller[_0xb9f3('0xd')]);router[_0xb9f3('0x9')](_0xb9f3('0xe'),controller[_0xb9f3('0xf')]);router[_0xb9f3('0x9')](_0xb9f3('0x10'),controller['getPreferred']);var upload=multer({'storage':multer[_0xb9f3('0x11')]({'destination':function(_0x339f91,_0x2a2e15,_0x44ec35){_0x44ec35(null,path[_0xb9f3('0x12')](config[_0xb9f3('0x13')],'server/files/images/logos/'));},'filename':function(_0x317683,_0x3d6705,_0x376a1f){_0x376a1f(null,util[_0xb9f3('0x14')](_0xb9f3('0x15'),'logo',path[_0xb9f3('0x16')](_0x3d6705[_0xb9f3('0x17')])));}})});router[_0xb9f3('0x18')](_0xb9f3('0xb'),upload[_0xb9f3('0x19')](_0xb9f3('0x1a')),controller[_0xb9f3('0x1b')]);var upload=multer({'storage':multer[_0xb9f3('0x11')]({'destination':function(_0x294ae4,_0x47f654,_0x414bc3){_0x414bc3(null,path[_0xb9f3('0x12')](config[_0xb9f3('0x13')],_0xb9f3('0x1c')));},'filename':function(_0x355ab3,_0x34e0b9,_0xa50c86){_0xa50c86(null,util[_0xb9f3('0x14')]('%s%s',_0xb9f3('0x1d'),path[_0xb9f3('0x16')](_0x34e0b9['originalname'])));}})});router['post'](_0xb9f3('0x1e'),upload['single'](_0xb9f3('0x1a')),controller['addLogoLogin']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4ca31a,_0x4c6dae,_0xd57b2c){_0xd57b2c(null,path['join'](config[_0xb9f3('0x13')],_0xb9f3('0x1c')));},'filename':function(_0xc7e2ab,_0xef4a99,_0x36de46){_0x36de46(null,util[_0xb9f3('0x14')](_0xb9f3('0x15'),_0xb9f3('0x1f'),path[_0xb9f3('0x16')](_0xef4a99[_0xb9f3('0x17')])));}})});router['post'](_0xb9f3('0x10'),upload[_0xb9f3('0x19')](_0xb9f3('0x1a')),controller[_0xb9f3('0x20')]);router[_0xb9f3('0x21')](_0xb9f3('0x22'),auth[_0xb9f3('0x7')](),controller[_0xb9f3('0x23')]);module[_0xb9f3('0x24')]=router;
\ No newline at end of file
+var _0xf7a1=['util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','get','isAuthenticated','index','/:id','/:id/logo','getLogo','/:id/logo_login','/:id/gdpr','gdpr','/:id/preferred','getPreferred','diskStorage','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','file','addLogo','join','logologin','post','addLogoLogin','single','addPreferred','put','update','exports','multer'];(function(_0x565c49,_0x54acd0){var _0x20ca34=function(_0x42f7e1){while(--_0x42f7e1){_0x565c49['push'](_0x565c49['shift']());}};_0x20ca34(++_0x54acd0);}(_0xf7a1,0x74));var _0x1f7a=function(_0x5d610d,_0x834f90){_0x5d610d=_0x5d610d-0x0;var _0x392836=_0xf7a1[_0x5d610d];return _0x392836;};'use strict';var multer=require(_0x1f7a('0x0'));var util=require(_0x1f7a('0x1'));var path=require(_0x1f7a('0x2'));var timeout=require(_0x1f7a('0x3'));var express=require(_0x1f7a('0x4'));var router=express['Router']();var auth=require(_0x1f7a('0x5'));var interaction=require(_0x1f7a('0x6'));var config=require(_0x1f7a('0x7'));var controller=require(_0x1f7a('0x8'));router[_0x1f7a('0x9')]('/',auth[_0x1f7a('0xa')](),controller[_0x1f7a('0xb')]);router[_0x1f7a('0x9')](_0x1f7a('0xc'),controller['show']);router[_0x1f7a('0x9')](_0x1f7a('0xd'),controller[_0x1f7a('0xe')]);router[_0x1f7a('0x9')](_0x1f7a('0xf'),controller['getLogoLogin']);router[_0x1f7a('0x9')](_0x1f7a('0x10'),controller[_0x1f7a('0x11')]);router[_0x1f7a('0x9')](_0x1f7a('0x12'),controller[_0x1f7a('0x13')]);var upload=multer({'storage':multer[_0x1f7a('0x14')]({'destination':function(_0x1de80d,_0x154030,_0x2a6be3){_0x2a6be3(null,path['join'](config[_0x1f7a('0x15')],_0x1f7a('0x16')));},'filename':function(_0x390af2,_0x32e0d0,_0x46632d){_0x46632d(null,util[_0x1f7a('0x17')](_0x1f7a('0x18'),_0x1f7a('0x19'),path[_0x1f7a('0x1a')](_0x32e0d0[_0x1f7a('0x1b')])));}})});router['post'](_0x1f7a('0xd'),upload['single'](_0x1f7a('0x1c')),controller[_0x1f7a('0x1d')]);var upload=multer({'storage':multer[_0x1f7a('0x14')]({'destination':function(_0x156413,_0x35bc60,_0x893aaf){_0x893aaf(null,path[_0x1f7a('0x1e')](config[_0x1f7a('0x15')],_0x1f7a('0x16')));},'filename':function(_0x3740c4,_0x2383d3,_0x5ecaa3){_0x5ecaa3(null,util[_0x1f7a('0x17')](_0x1f7a('0x18'),_0x1f7a('0x1f'),path[_0x1f7a('0x1a')](_0x2383d3[_0x1f7a('0x1b')])));}})});router[_0x1f7a('0x20')]('/:id/logo_login',upload['single'](_0x1f7a('0x1c')),controller[_0x1f7a('0x21')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4c8b6b,_0x596deb,_0x1054ba){_0x1054ba(null,path[_0x1f7a('0x1e')](config[_0x1f7a('0x15')],'server/files/images/logos/'));},'filename':function(_0x1b2f19,_0x14b423,_0x39bec0){_0x39bec0(null,util[_0x1f7a('0x17')](_0x1f7a('0x18'),'preferred',path['extname'](_0x14b423['originalname'])));}})});router[_0x1f7a('0x20')]('/:id/preferred',upload[_0x1f7a('0x22')](_0x1f7a('0x1c')),controller[_0x1f7a('0x23')]);router[_0x1f7a('0x24')](_0x1f7a('0xc'),auth[_0x1f7a('0xa')](),controller[_0x1f7a('0x25')]);module[_0x1f7a('0x26')]=router;
\ No newline at end of file
diff --git a/server/api/setting/setting.attributes.js b/server/api/setting/setting.attributes.js
index 7e437f6..0921583 100644
--- a/server/api/setting/setting.attributes.js
+++ b/server/api/setting/setting.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0bb5=['sequelize','exports','INTEGER','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted','BOOLEAN','https://www.xcally.com/bar/phonebar/autoupdater.xml'];(function(_0x35e2b5,_0x2f8581){var _0x17dced=function(_0x322c76){while(--_0x322c76){_0x35e2b5['push'](_0x35e2b5['shift']());}};_0x17dced(++_0x2f8581);}(_0x0bb5,0x148));var _0x50bb=function(_0x47b847,_0x2ca0f1){_0x47b847=_0x47b847-0x0;var _0x2e8e66=_0x0bb5[_0x47b847];return _0x2e8e66;};'use strict';var Sequelize=require(_0x50bb('0x0'));module[_0x50bb('0x1')]={'min_internal':{'type':Sequelize['INTEGER'](0xb),'unique':'min_internal','defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x50bb('0x2')](0xb),'unique':_0x50bb('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0x50bb('0x2')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x50bb('0x4')],'defaultValue':_0x50bb('0x5')},'logo':{'type':Sequelize[_0x50bb('0x4')]},'defaultLogo':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x50bb('0x4')]},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize['STRING']},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x50bb('0x4')]},'turnaddr':{'type':Sequelize['STRING']},'turnusername':{'type':Sequelize['STRING']},'turnpassword':{'type':Sequelize[_0x50bb('0x4')]},'pageTitle':{'type':Sequelize[_0x50bb('0x4')]},'defaultPageTitle':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x50bb('0x4')],'defaultValue':_0x50bb('0x7')},'enableEmailPreview':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':![]},'split':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize[_0x50bb('0x2')],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x50bb('0x2')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x50bb('0x4')],'defaultValue':'alternate'},'chatTimeout':{'type':Sequelize[_0x50bb('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x50bb('0x4')]},'defaultPreferred':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x50bb('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0x50bb('0x4')]},'allowedLoginAttempts':{'type':Sequelize[_0x50bb('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize['INTEGER'],'defaultValue':0xa}};
\ No newline at end of file
+var _0x9086=['INTEGER','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted','BOOLEAN','https://www.xcally.com/bar/phonebar/autoupdater.xml','alternate','sequelize','exports','min_internal'];(function(_0xb875ee,_0x583042){var _0x4c7f3a=function(_0x1f6661){while(--_0x1f6661){_0xb875ee['push'](_0xb875ee['shift']());}};_0x4c7f3a(++_0x583042);}(_0x9086,0x10b));var _0x6908=function(_0x593cbd,_0x141c5b){_0x593cbd=_0x593cbd-0x0;var _0x1ea4aa=_0x9086[_0x593cbd];return _0x1ea4aa;};'use strict';var Sequelize=require(_0x6908('0x0'));module[_0x6908('0x1')]={'min_internal':{'type':Sequelize['INTEGER'](0xb),'unique':_0x6908('0x2'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x6908('0x3')](0xb),'unique':_0x6908('0x4'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0x6908('0x3')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x6908('0x5')],'defaultValue':_0x6908('0x6')},'logo':{'type':Sequelize['STRING']},'defaultLogo':{'type':Sequelize[_0x6908('0x7')],'defaultValue':!![]},'loginLogo':{'type':Sequelize['STRING']},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x6908('0x5')]},'defaultHeaderWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x6908('0x7')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x6908('0x7')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x6908('0x5')]},'turnaddr':{'type':Sequelize['STRING']},'turnusername':{'type':Sequelize[_0x6908('0x5')]},'turnpassword':{'type':Sequelize['STRING']},'pageTitle':{'type':Sequelize[_0x6908('0x5')]},'defaultPageTitle':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x6908('0x7')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x6908('0x3')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x6908('0x7')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x6908('0x5')],'defaultValue':_0x6908('0x8')},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize[_0x6908('0x7')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize[_0x6908('0x3')],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x6908('0x3')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x6908('0x3')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x6908('0x5')],'defaultValue':_0x6908('0x9')},'chatTimeout':{'type':Sequelize[_0x6908('0x3')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x6908('0x7')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x6908('0x5')]},'defaultPreferred':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x6908('0x7')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize['STRING']},'allowedLoginAttempts':{'type':Sequelize[_0x6908('0x3')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x6908('0x3')],'defaultValue':0xa}};
\ No newline at end of file
diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js
index 83f9c57..f94ef92 100644
--- a/server/api/setting/setting.controller.js
+++ b/server/api/setting/setting.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['find','params','body','readFileSync','join','server/files/templates/stun.ejs','utf8','root','render','/etc/asterisk/turn_xcally.conf','res_stun_monitor.so','Reload','res_rtp_asterisk.so','addLogo','file','logo','filename','catch','addLogoLogin','loginLogo','getLogo','getLicense','preferred','defaultLogo','defaultLoginLogo','defaultPreferred','existsSync','toLower','default_logo.png','upperFirst','custom','Sequelize','ValidationError','Logo\x20not\x20found','download','../../config/license/util','getLogoLogin','server/files/images/logos','default_loginLogo.png','default','gdpr','securePassword','addPreferred','getPreferred','default_preferred.png','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','Setting,\x20%s,\x20%s','message','result','sendStatus','status','count','offset','limit','Content-Range','json','reject','save','update','then','destroy','end','stack','name','index','Setting','rawAttributes','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','field','options','includeAll','include','findAll','rows','show','keys','length'];(function(_0x2206c8,_0x11212c){var _0x4e01f0=function(_0x3145fe){while(--_0x3145fe){_0x2206c8['push'](_0x2206c8['shift']());}};_0x4e01f0(++_0x11212c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0xa9e0[_0x5b561d];return _0x431060;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var jayson=require(_0x0a9e('0x13'));var client=jayson[_0x0a9e('0x14')][_0x0a9e('0x15')]({'port':0x232a});function checkPasswordPattern(_0x26d672,_0x32d742,_0x69aeb7){if(_0x69aeb7){var _0x5db4b0=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5db4b0[_0x0a9e('0x16')](_0x32d742)){return _0x26d672;}else{throw new Error(_0x0a9e('0x17'));}}else{return _0x26d672;}}function respondWithRpcPromise(_0x2b4227,_0x281129,_0x44dcfd,_0x4d5611){return new BPromise(function(_0x52a03d,_0x22dccb){var _0x5d0880=_0x4d5611||client;return _0x5d0880[_0x0a9e('0x18')](_0x2b4227,_0x44dcfd)['then'](function(_0x16033c){logger[_0x0a9e('0x19')]('Setting,\x20%s,\x20%s',_0x281129,_0x0a9e('0x1a'));logger['debug'](_0x0a9e('0x1b'),_0x281129,_0x0a9e('0x1a'),JSON[_0x0a9e('0x1c')](_0x16033c));if(_0x16033c[_0x0a9e('0x1d')]){if(_0x16033c[_0x0a9e('0x1d')][_0x0a9e('0x1e')]===0x1f4){logger[_0x0a9e('0x1d')](_0x0a9e('0x1f'),_0x281129,_0x16033c[_0x0a9e('0x1d')][_0x0a9e('0x20')]);return _0x22dccb(_0x16033c[_0x0a9e('0x1d')][_0x0a9e('0x20')]);}logger['error'](_0x0a9e('0x1f'),_0x281129,_0x16033c[_0x0a9e('0x1d')]['message']);return _0x52a03d(_0x16033c[_0x0a9e('0x1d')]['message']);}else{logger['info'](_0x0a9e('0x1f'),_0x281129,_0x0a9e('0x1a'));_0x52a03d(_0x16033c[_0x0a9e('0x21')][_0x0a9e('0x20')]);}})['catch'](function(_0xfb6e48){logger[_0x0a9e('0x1d')](_0x0a9e('0x1f'),_0x281129,_0xfb6e48);_0x22dccb(_0xfb6e48);});});}function respondWithStatusCode(_0x4d00e6,_0x370d86){_0x370d86=_0x370d86||0xcc;return function(_0x42ac8f){if(_0x42ac8f){return _0x4d00e6[_0x0a9e('0x22')](_0x370d86);}return _0x4d00e6['status'](_0x370d86)['end']();};}function respondWithResult(_0x197ec0,_0x3a8e58){_0x3a8e58=_0x3a8e58||0xc8;return function(_0x40c424){if(_0x40c424){return _0x197ec0[_0x0a9e('0x23')](_0x3a8e58)['json'](_0x40c424);}};}function respondWithFilteredResult(_0x384319,_0x479bc4){return function(_0x45a1e7){if(_0x45a1e7){var _0x5bfb33=_0x45a1e7[_0x0a9e('0x24')],_0x1dc186=_0x479bc4[_0x0a9e('0x25')],_0x34dc65=_0x479bc4[_0x0a9e('0x25')]+_0x479bc4[_0x0a9e('0x26')],_0x25fba9;if(_0x34dc65>=_0x5bfb33){_0x34dc65=_0x5bfb33;_0x25fba9=0xc8;}else{_0x25fba9=0xce;}_0x384319[_0x0a9e('0x23')](_0x25fba9);return _0x384319['set'](_0x0a9e('0x27'),_0x1dc186+'-'+_0x34dc65+'/'+_0x5bfb33)[_0x0a9e('0x28')](_0x45a1e7);}return null;};}function patchUpdates(_0x2b1f27){return function(_0x2ec755){try{jsonpatch['apply'](_0x2ec755,_0x2b1f27,!![]);}catch(_0x15b200){return BPromise[_0x0a9e('0x29')](_0x15b200);}return _0x2ec755[_0x0a9e('0x2a')]();};}function saveUpdates(_0x824a4f,_0x58b06f){return function(_0x563b45){if(_0x563b45){return _0x563b45[_0x0a9e('0x2b')](_0x824a4f)[_0x0a9e('0x2c')](function(_0x1dbde2){return _0x1dbde2;});}return null;};}function removeEntity(_0x540530,_0x426950){return function(_0x5d1e0e){if(_0x5d1e0e){return _0x5d1e0e[_0x0a9e('0x2d')]()[_0x0a9e('0x2c')](function(){_0x540530[_0x0a9e('0x23')](0xcc)[_0x0a9e('0x2e')]();});}};}function handleEntityNotFound(_0x25ce3a,_0x5180f1){return function(_0x66c1d2){if(!_0x66c1d2){_0x25ce3a[_0x0a9e('0x22')](0x194);}return _0x66c1d2;};}function handleError(_0x40cb85,_0x2da5c0){_0x2da5c0=_0x2da5c0||0x1f4;return function(_0x2b45ea){logger[_0x0a9e('0x1d')](_0x2b45ea[_0x0a9e('0x2f')]);if(_0x2b45ea[_0x0a9e('0x30')]){delete _0x2b45ea['name'];}_0x40cb85[_0x0a9e('0x23')](_0x2da5c0)['send'](_0x2b45ea);};}exports[_0x0a9e('0x31')]=function(_0x14b13f,_0x2b7e7f){var _0x3f3d41={},_0x567193={},_0x191e91={'count':0x0,'rows':[]};var _0xd1836d=db[_0x0a9e('0x32')][_0x0a9e('0x33')];_0x567193['model']=_['keys'](_0xd1836d);_0x567193[_0x0a9e('0x34')]=_['keys'](_0x14b13f[_0x0a9e('0x34')]);_0x567193[_0x0a9e('0x35')]=_[_0x0a9e('0x36')](_0x567193[_0x0a9e('0x37')],_0x567193['query']);_0x3f3d41[_0x0a9e('0x38')]=_[_0x0a9e('0x36')](_0x567193[_0x0a9e('0x37')],qs['fields'](_0x14b13f[_0x0a9e('0x34')][_0x0a9e('0x39')]));_0x3f3d41[_0x0a9e('0x38')]=_0x3f3d41['attributes']['length']?_0x3f3d41[_0x0a9e('0x38')]:_0x567193[_0x0a9e('0x37')];if(!_0x14b13f['query'][_0x0a9e('0x3a')](_0x0a9e('0x3b'))){_0x3f3d41[_0x0a9e('0x26')]=qs[_0x0a9e('0x26')](_0x14b13f['query']['limit']);_0x3f3d41[_0x0a9e('0x25')]=qs[_0x0a9e('0x25')](_0x14b13f['query'][_0x0a9e('0x25')]);}_0x3f3d41[_0x0a9e('0x3c')]=qs[_0x0a9e('0x3d')](_0x14b13f['query'][_0x0a9e('0x3d')]);_0x3f3d41[_0x0a9e('0x3e')]=qs[_0x0a9e('0x35')](_[_0x0a9e('0x3f')](_0x14b13f[_0x0a9e('0x34')],_0x567193[_0x0a9e('0x35')]));if(_0x14b13f[_0x0a9e('0x34')][_0x0a9e('0x40')]){_0x3f3d41[_0x0a9e('0x3e')]=_[_0x0a9e('0x41')](_0x3f3d41[_0x0a9e('0x3e')],{'$or':_[_0x0a9e('0x42')](_0xd1836d,function(_0x1a7bce){if(_0x1a7bce[_0x0a9e('0x43')][_0x0a9e('0x44')]!=='VIRTUAL'){var _0x52628e={};_0x52628e[_0x1a7bce[_0x0a9e('0x45')]]={'$like':'%'+_0x14b13f[_0x0a9e('0x34')][_0x0a9e('0x40')]+'%'};return _0x52628e;}})});}_0x3f3d41=_[_0x0a9e('0x41')]({},_0x3f3d41,_0x14b13f[_0x0a9e('0x46')]);var _0xc9a702={'where':_0x3f3d41[_0x0a9e('0x3e')]};return db[_0x0a9e('0x32')][_0x0a9e('0x24')](_0xc9a702)[_0x0a9e('0x2c')](function(_0x2c2cb0){_0x191e91[_0x0a9e('0x24')]=_0x2c2cb0;if(_0x14b13f['query'][_0x0a9e('0x47')]){_0x3f3d41[_0x0a9e('0x48')]=[{'all':!![]}];}return db[_0x0a9e('0x32')][_0x0a9e('0x49')](_0x3f3d41);})[_0x0a9e('0x2c')](function(_0xbe9d19){_0x191e91[_0x0a9e('0x4a')]=_0xbe9d19;return _0x191e91;})[_0x0a9e('0x2c')](respondWithFilteredResult(_0x2b7e7f,_0x3f3d41))['catch'](handleError(_0x2b7e7f,null));};exports[_0x0a9e('0x4b')]=function(_0x48fd45,_0x473dc8){var _0x476688={'raw':![],'where':{'id':_0x48fd45['params']['id']}},_0x8d6dd1={};_0x8d6dd1[_0x0a9e('0x37')]=_[_0x0a9e('0x4c')](db[_0x0a9e('0x32')][_0x0a9e('0x33')]);_0x8d6dd1[_0x0a9e('0x34')]=_[_0x0a9e('0x4c')](_0x48fd45[_0x0a9e('0x34')]);_0x8d6dd1['filters']=_[_0x0a9e('0x36')](_0x8d6dd1[_0x0a9e('0x37')],_0x8d6dd1[_0x0a9e('0x34')]);_0x476688[_0x0a9e('0x38')]=_[_0x0a9e('0x36')](_0x8d6dd1[_0x0a9e('0x37')],qs[_0x0a9e('0x39')](_0x48fd45[_0x0a9e('0x34')][_0x0a9e('0x39')]));_0x476688['attributes']=_0x476688[_0x0a9e('0x38')][_0x0a9e('0x4d')]?_0x476688['attributes']:_0x8d6dd1['model'];if(_0x48fd45['query'][_0x0a9e('0x47')]){_0x476688[_0x0a9e('0x48')]=[{'all':!![]}];}_0x476688=_[_0x0a9e('0x41')]({},_0x476688,_0x48fd45[_0x0a9e('0x46')]);return db[_0x0a9e('0x32')][_0x0a9e('0x4e')](_0x476688)[_0x0a9e('0x2c')](handleEntityNotFound(_0x473dc8,null))[_0x0a9e('0x2c')](respondWithResult(_0x473dc8,null))['catch'](handleError(_0x473dc8,null));};exports['update']=function(_0x53975a,_0x39d77d,_0x204173){var _0x14d602;return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x53975a[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x39d77d,null))['then'](saveUpdates(_0x53975a[_0x0a9e('0x50')],null))['then'](function(_0x443e72){if(_0x443e72){_0x14d602=_0x443e72['get']({'plain':!![]});var _0x2e5e62=fs[_0x0a9e('0x51')](path[_0x0a9e('0x52')](config['root'],_0x0a9e('0x53')),_0x0a9e('0x54'));var _0x508b47=ejs['render'](_0x2e5e62,_0x14d602);var _0x128aa6=fs[_0x0a9e('0x51')](path['join'](config[_0x0a9e('0x55')],'server/files/templates/turn.ejs'),_0x0a9e('0x54'));var _0x523cd2=ejs[_0x0a9e('0x56')](_0x128aa6,_0x14d602);fs['writeFileSync']('/etc/asterisk/stun_xcally.conf',_0x508b47);fs['writeFileSync'](_0x0a9e('0x57'),_0x523cd2);return respondWithRpcPromise('Reload',_0x0a9e('0x2b'),{'module':_0x0a9e('0x58')});}})[_0x0a9e('0x2c')](function(){return respondWithRpcPromise(_0x0a9e('0x59'),_0x0a9e('0x2b'),{'module':_0x0a9e('0x5a')});})[_0x0a9e('0x2c')](function(){return _0x14d602||null;})[_0x0a9e('0x2c')](respondWithResult(_0x39d77d,null))['catch'](handleError(_0x39d77d,null));};exports[_0x0a9e('0x5b')]=function(_0x121cef,_0x2642bb,_0x30c491){if(_0x121cef[_0x0a9e('0x5c')]&&_0x121cef[_0x0a9e('0x5c')]['filename']){_0x121cef[_0x0a9e('0x50')][_0x0a9e('0x5d')]=_0x121cef['file'][_0x0a9e('0x5e')];}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x121cef['params']['id']}})['then'](handleEntityNotFound(_0x2642bb,null))['then'](saveUpdates(_0x121cef[_0x0a9e('0x50')],null))['then'](respondWithResult(_0x2642bb,null))[_0x0a9e('0x5f')](handleError(_0x2642bb,null));};exports[_0x0a9e('0x60')]=function(_0x261adb,_0x7be420,_0x1cca9f){if(_0x261adb[_0x0a9e('0x5c')]&&_0x261adb['file'][_0x0a9e('0x5e')]){_0x261adb['body'][_0x0a9e('0x61')]=_0x261adb[_0x0a9e('0x5c')][_0x0a9e('0x5e')];}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x261adb[_0x0a9e('0x4f')]['id']}})[_0x0a9e('0x2c')](handleEntityNotFound(_0x7be420,null))[_0x0a9e('0x2c')](saveUpdates(_0x261adb['body'],null))[_0x0a9e('0x2c')](respondWithResult(_0x7be420,null))[_0x0a9e('0x5f')](handleError(_0x7be420,null));};var utilLicense=require('../../config/license/util');exports[_0x0a9e('0x62')]=function(_0x17e88c,_0x88dcbf,_0x409b29){var _0x401837='server/files/images/logos';var _0x176840={'custom':![]};return utilLicense[_0x0a9e('0x63')]()[_0x0a9e('0x2c')](function(_0x47bb43){if(_0x47bb43){_0x176840=_0x47bb43;}return db[_0x0a9e('0x32')]['find']({'where':{'id':_0x17e88c['params']['id']},'attributes':[_0x0a9e('0x5d'),_0x0a9e('0x61'),_0x0a9e('0x64'),_0x0a9e('0x65'),_0x0a9e('0x66'),_0x0a9e('0x67')],'raw':!![]});})[_0x0a9e('0x2c')](handleEntityNotFound(_0x88dcbf,null))[_0x0a9e('0x2c')](function(_0x2d7205){if(_0x2d7205){var _0x1cc4f3=_0x2d7205[_0x0a9e('0x5d')]&&fs[_0x0a9e('0x68')](path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_[_0x0a9e('0x69')](_0x2d7205[_0x0a9e('0x5d')])))?path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_['toLower'](_0x2d7205[_0x0a9e('0x5d')])):path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_['toLower'](_0x0a9e('0x6a')));var _0x30944e='default'+_[_0x0a9e('0x6b')](_0x0a9e('0x5d'));if(_0x2d7205[_0x30944e]||!_0x176840[_0x0a9e('0x6c')]){_0x1cc4f3=path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_['toLower']('default_logo.png'));}if(!fs['existsSync'](_0x1cc4f3)){throw new db[(_0x0a9e('0x6d'))][(_0x0a9e('0x6e'))](_0x0a9e('0x6f'));}return _0x88dcbf[_0x0a9e('0x70')](_0x1cc4f3);}})[_0x0a9e('0x5f')](handleError(_0x88dcbf,null));};var utilLicense=require(_0x0a9e('0x71'));exports[_0x0a9e('0x72')]=function(_0x1a0677,_0x5512d1,_0x235f8f){var _0xcbc8b2=_0x0a9e('0x73');var _0x4a4fc7={'custom':![]};return utilLicense[_0x0a9e('0x63')]()['then'](function(_0x4437ff){if(_0x4437ff){_0x4a4fc7=_0x4437ff;}return db[_0x0a9e('0x32')]['find']({'where':{'id':_0x1a0677[_0x0a9e('0x4f')]['id']},'attributes':[_0x0a9e('0x5d'),_0x0a9e('0x61'),_0x0a9e('0x64'),'defaultLogo',_0x0a9e('0x66'),_0x0a9e('0x67')],'raw':!![]});})[_0x0a9e('0x2c')](handleEntityNotFound(_0x5512d1,null))[_0x0a9e('0x2c')](function(_0x5b7fc3){if(_0x5b7fc3){var _0x109ccb=_0x5b7fc3[_0x0a9e('0x61')]&&fs[_0x0a9e('0x68')](path[_0x0a9e('0x52')](config['root'],_0xcbc8b2,_[_0x0a9e('0x69')](_0x5b7fc3[_0x0a9e('0x61')])))?path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0xcbc8b2,_[_0x0a9e('0x69')](_0x5b7fc3[_0x0a9e('0x61')])):path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0xcbc8b2,_[_0x0a9e('0x69')](_0x0a9e('0x74')));var _0xc4c230=_0x0a9e('0x75')+_[_0x0a9e('0x6b')](_0x0a9e('0x61'));if(_0x5b7fc3[_0xc4c230]||!_0x4a4fc7['custom']){_0x109ccb=path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0xcbc8b2,_[_0x0a9e('0x69')]('default_loginLogo.png'));}if(!fs[_0x0a9e('0x68')](_0x109ccb)){throw new db[(_0x0a9e('0x6d'))][(_0x0a9e('0x6e'))](_0x0a9e('0x6f'));}return _0x5512d1['download'](_0x109ccb);}})['catch'](handleError(_0x5512d1,null));};exports[_0x0a9e('0x76')]=function(_0x2bbdb5,_0x4c54fa){return db[_0x0a9e('0x32')]['find']({'where':{'id':_0x2bbdb5[_0x0a9e('0x4f')]['id']},'attributes':[_0x0a9e('0x77')]})['then'](respondWithResult(_0x4c54fa,null))[_0x0a9e('0x5f')](handleError(_0x4c54fa,null));};exports[_0x0a9e('0x78')]=function(_0x2d2286,_0x42b959,_0x3755fe){if(_0x2d2286[_0x0a9e('0x5c')]&&_0x2d2286[_0x0a9e('0x5c')]['filename']){_0x2d2286[_0x0a9e('0x50')][_0x0a9e('0x64')]=_0x2d2286[_0x0a9e('0x5c')][_0x0a9e('0x5e')];}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x2d2286[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x42b959,null))[_0x0a9e('0x2c')](saveUpdates(_0x2d2286['body'],null))[_0x0a9e('0x2c')](respondWithResult(_0x42b959,null))[_0x0a9e('0x5f')](handleError(_0x42b959,null));};var utilLicense=require(_0x0a9e('0x71'));exports[_0x0a9e('0x79')]=function(_0x5af453,_0x51ccd7,_0x353384){var _0x2b9c01=_0x0a9e('0x73');var _0x5ac73d={'custom':![]};return utilLicense[_0x0a9e('0x63')]()[_0x0a9e('0x2c')](function(_0x524e38){if(_0x524e38){_0x5ac73d=_0x524e38;}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x5af453['params']['id']},'attributes':['logo','loginLogo',_0x0a9e('0x64'),_0x0a9e('0x65'),_0x0a9e('0x66'),_0x0a9e('0x67')],'raw':!![]});})[_0x0a9e('0x2c')](handleEntityNotFound(_0x51ccd7,null))[_0x0a9e('0x2c')](function(_0x5a8854){if(_0x5a8854){var _0x5fd5db=_0x5a8854['preferred']&&fs[_0x0a9e('0x68')](path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x2b9c01,_[_0x0a9e('0x69')](_0x5a8854['preferred'])))?path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x2b9c01,_[_0x0a9e('0x69')](_0x5a8854['preferred'])):path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x2b9c01,_[_0x0a9e('0x69')](_0x0a9e('0x7a')));var _0x255e49=_0x0a9e('0x75')+_[_0x0a9e('0x6b')](_0x0a9e('0x64'));if(_0x5a8854[_0x255e49]||!_0x5ac73d['custom']||!_0x5ac73d[_0x0a9e('0x64')]){_0x5fd5db=path[_0x0a9e('0x52')](config['root'],_0x2b9c01,_[_0x0a9e('0x69')](_0x0a9e('0x7a')));}if(!fs[_0x0a9e('0x68')](_0x5fd5db)){throw new db['Sequelize'][(_0x0a9e('0x6e'))]('Logo\x20not\x20found');}return _0x51ccd7[_0x0a9e('0x70')](_0x5fd5db);}})[_0x0a9e('0x5f')](handleError(_0x51ccd7,null));};
\ No newline at end of file
+var _0xa9e0=['find','params','body','readFileSync','join','server/files/templates/stun.ejs','utf8','root','render','/etc/asterisk/turn_xcally.conf','res_stun_monitor.so','Reload','res_rtp_asterisk.so','addLogo','file','logo','filename','catch','addLogoLogin','loginLogo','getLogo','getLicense','preferred','defaultLogo','defaultLoginLogo','defaultPreferred','existsSync','toLower','default_logo.png','upperFirst','custom','Sequelize','ValidationError','Logo\x20not\x20found','download','../../config/license/util','getLogoLogin','server/files/images/logos','default_loginLogo.png','default','gdpr','securePassword','addPreferred','getPreferred','default_preferred.png','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','Setting,\x20%s,\x20%s','message','result','sendStatus','status','count','offset','limit','Content-Range','json','reject','save','update','then','destroy','end','stack','name','index','Setting','rawAttributes','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','field','options','includeAll','include','findAll','rows','show','keys','length'];(function(_0x22cbc8,_0x77054a){var _0x19189c=function(_0x405464){while(--_0x405464){_0x22cbc8['push'](_0x22cbc8['shift']());}};_0x19189c(++_0x77054a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4c7fb5,_0x2548ef){_0x4c7fb5=_0x4c7fb5-0x0;var _0x2e10ac=_0xa9e0[_0x4c7fb5];return _0x2e10ac;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var jayson=require(_0x0a9e('0x13'));var client=jayson[_0x0a9e('0x14')][_0x0a9e('0x15')]({'port':0x232a});function checkPasswordPattern(_0x26d672,_0x32d742,_0x69aeb7){if(_0x69aeb7){var _0x5db4b0=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5db4b0[_0x0a9e('0x16')](_0x32d742)){return _0x26d672;}else{throw new Error(_0x0a9e('0x17'));}}else{return _0x26d672;}}function respondWithRpcPromise(_0x2b4227,_0x281129,_0x44dcfd,_0x4d5611){return new BPromise(function(_0x52a03d,_0x22dccb){var _0x5d0880=_0x4d5611||client;return _0x5d0880[_0x0a9e('0x18')](_0x2b4227,_0x44dcfd)['then'](function(_0x16033c){logger[_0x0a9e('0x19')]('Setting,\x20%s,\x20%s',_0x281129,_0x0a9e('0x1a'));logger['debug'](_0x0a9e('0x1b'),_0x281129,_0x0a9e('0x1a'),JSON[_0x0a9e('0x1c')](_0x16033c));if(_0x16033c[_0x0a9e('0x1d')]){if(_0x16033c[_0x0a9e('0x1d')][_0x0a9e('0x1e')]===0x1f4){logger[_0x0a9e('0x1d')](_0x0a9e('0x1f'),_0x281129,_0x16033c[_0x0a9e('0x1d')][_0x0a9e('0x20')]);return _0x22dccb(_0x16033c[_0x0a9e('0x1d')][_0x0a9e('0x20')]);}logger['error'](_0x0a9e('0x1f'),_0x281129,_0x16033c[_0x0a9e('0x1d')]['message']);return _0x52a03d(_0x16033c[_0x0a9e('0x1d')]['message']);}else{logger['info'](_0x0a9e('0x1f'),_0x281129,_0x0a9e('0x1a'));_0x52a03d(_0x16033c[_0x0a9e('0x21')][_0x0a9e('0x20')]);}})['catch'](function(_0xfb6e48){logger[_0x0a9e('0x1d')](_0x0a9e('0x1f'),_0x281129,_0xfb6e48);_0x22dccb(_0xfb6e48);});});}function respondWithStatusCode(_0x4d00e6,_0x370d86){_0x370d86=_0x370d86||0xcc;return function(_0x42ac8f){if(_0x42ac8f){return _0x4d00e6[_0x0a9e('0x22')](_0x370d86);}return _0x4d00e6['status'](_0x370d86)['end']();};}function respondWithResult(_0x197ec0,_0x3a8e58){_0x3a8e58=_0x3a8e58||0xc8;return function(_0x40c424){if(_0x40c424){return _0x197ec0[_0x0a9e('0x23')](_0x3a8e58)['json'](_0x40c424);}};}function respondWithFilteredResult(_0x384319,_0x479bc4){return function(_0x45a1e7){if(_0x45a1e7){var _0x5bfb33=_0x45a1e7[_0x0a9e('0x24')],_0x1dc186=_0x479bc4[_0x0a9e('0x25')],_0x34dc65=_0x479bc4[_0x0a9e('0x25')]+_0x479bc4[_0x0a9e('0x26')],_0x25fba9;if(_0x34dc65>=_0x5bfb33){_0x34dc65=_0x5bfb33;_0x25fba9=0xc8;}else{_0x25fba9=0xce;}_0x384319[_0x0a9e('0x23')](_0x25fba9);return _0x384319['set'](_0x0a9e('0x27'),_0x1dc186+'-'+_0x34dc65+'/'+_0x5bfb33)[_0x0a9e('0x28')](_0x45a1e7);}return null;};}function patchUpdates(_0x2b1f27){return function(_0x2ec755){try{jsonpatch['apply'](_0x2ec755,_0x2b1f27,!![]);}catch(_0x15b200){return BPromise[_0x0a9e('0x29')](_0x15b200);}return _0x2ec755[_0x0a9e('0x2a')]();};}function saveUpdates(_0x824a4f,_0x58b06f){return function(_0x563b45){if(_0x563b45){return _0x563b45[_0x0a9e('0x2b')](_0x824a4f)[_0x0a9e('0x2c')](function(_0x1dbde2){return _0x1dbde2;});}return null;};}function removeEntity(_0x540530,_0x426950){return function(_0x5d1e0e){if(_0x5d1e0e){return _0x5d1e0e[_0x0a9e('0x2d')]()[_0x0a9e('0x2c')](function(){_0x540530[_0x0a9e('0x23')](0xcc)[_0x0a9e('0x2e')]();});}};}function handleEntityNotFound(_0x25ce3a,_0x5180f1){return function(_0x66c1d2){if(!_0x66c1d2){_0x25ce3a[_0x0a9e('0x22')](0x194);}return _0x66c1d2;};}function handleError(_0x40cb85,_0x2da5c0){_0x2da5c0=_0x2da5c0||0x1f4;return function(_0x2b45ea){logger[_0x0a9e('0x1d')](_0x2b45ea[_0x0a9e('0x2f')]);if(_0x2b45ea[_0x0a9e('0x30')]){delete _0x2b45ea['name'];}_0x40cb85[_0x0a9e('0x23')](_0x2da5c0)['send'](_0x2b45ea);};}exports[_0x0a9e('0x31')]=function(_0x14b13f,_0x2b7e7f){var _0x3f3d41={},_0x567193={},_0x191e91={'count':0x0,'rows':[]};var _0xd1836d=db[_0x0a9e('0x32')][_0x0a9e('0x33')];_0x567193['model']=_['keys'](_0xd1836d);_0x567193[_0x0a9e('0x34')]=_['keys'](_0x14b13f[_0x0a9e('0x34')]);_0x567193[_0x0a9e('0x35')]=_[_0x0a9e('0x36')](_0x567193[_0x0a9e('0x37')],_0x567193['query']);_0x3f3d41[_0x0a9e('0x38')]=_[_0x0a9e('0x36')](_0x567193[_0x0a9e('0x37')],qs['fields'](_0x14b13f[_0x0a9e('0x34')][_0x0a9e('0x39')]));_0x3f3d41[_0x0a9e('0x38')]=_0x3f3d41['attributes']['length']?_0x3f3d41[_0x0a9e('0x38')]:_0x567193[_0x0a9e('0x37')];if(!_0x14b13f['query'][_0x0a9e('0x3a')](_0x0a9e('0x3b'))){_0x3f3d41[_0x0a9e('0x26')]=qs[_0x0a9e('0x26')](_0x14b13f['query']['limit']);_0x3f3d41[_0x0a9e('0x25')]=qs[_0x0a9e('0x25')](_0x14b13f['query'][_0x0a9e('0x25')]);}_0x3f3d41[_0x0a9e('0x3c')]=qs[_0x0a9e('0x3d')](_0x14b13f['query'][_0x0a9e('0x3d')]);_0x3f3d41[_0x0a9e('0x3e')]=qs[_0x0a9e('0x35')](_[_0x0a9e('0x3f')](_0x14b13f[_0x0a9e('0x34')],_0x567193[_0x0a9e('0x35')]));if(_0x14b13f[_0x0a9e('0x34')][_0x0a9e('0x40')]){_0x3f3d41[_0x0a9e('0x3e')]=_[_0x0a9e('0x41')](_0x3f3d41[_0x0a9e('0x3e')],{'$or':_[_0x0a9e('0x42')](_0xd1836d,function(_0x1a7bce){if(_0x1a7bce[_0x0a9e('0x43')][_0x0a9e('0x44')]!=='VIRTUAL'){var _0x52628e={};_0x52628e[_0x1a7bce[_0x0a9e('0x45')]]={'$like':'%'+_0x14b13f[_0x0a9e('0x34')][_0x0a9e('0x40')]+'%'};return _0x52628e;}})});}_0x3f3d41=_[_0x0a9e('0x41')]({},_0x3f3d41,_0x14b13f[_0x0a9e('0x46')]);var _0xc9a702={'where':_0x3f3d41[_0x0a9e('0x3e')]};return db[_0x0a9e('0x32')][_0x0a9e('0x24')](_0xc9a702)[_0x0a9e('0x2c')](function(_0x2c2cb0){_0x191e91[_0x0a9e('0x24')]=_0x2c2cb0;if(_0x14b13f['query'][_0x0a9e('0x47')]){_0x3f3d41[_0x0a9e('0x48')]=[{'all':!![]}];}return db[_0x0a9e('0x32')][_0x0a9e('0x49')](_0x3f3d41);})[_0x0a9e('0x2c')](function(_0xbe9d19){_0x191e91[_0x0a9e('0x4a')]=_0xbe9d19;return _0x191e91;})[_0x0a9e('0x2c')](respondWithFilteredResult(_0x2b7e7f,_0x3f3d41))['catch'](handleError(_0x2b7e7f,null));};exports[_0x0a9e('0x4b')]=function(_0x48fd45,_0x473dc8){var _0x476688={'raw':![],'where':{'id':_0x48fd45['params']['id']}},_0x8d6dd1={};_0x8d6dd1[_0x0a9e('0x37')]=_[_0x0a9e('0x4c')](db[_0x0a9e('0x32')][_0x0a9e('0x33')]);_0x8d6dd1[_0x0a9e('0x34')]=_[_0x0a9e('0x4c')](_0x48fd45[_0x0a9e('0x34')]);_0x8d6dd1['filters']=_[_0x0a9e('0x36')](_0x8d6dd1[_0x0a9e('0x37')],_0x8d6dd1[_0x0a9e('0x34')]);_0x476688[_0x0a9e('0x38')]=_[_0x0a9e('0x36')](_0x8d6dd1[_0x0a9e('0x37')],qs[_0x0a9e('0x39')](_0x48fd45[_0x0a9e('0x34')][_0x0a9e('0x39')]));_0x476688['attributes']=_0x476688[_0x0a9e('0x38')][_0x0a9e('0x4d')]?_0x476688['attributes']:_0x8d6dd1['model'];if(_0x48fd45['query'][_0x0a9e('0x47')]){_0x476688[_0x0a9e('0x48')]=[{'all':!![]}];}_0x476688=_[_0x0a9e('0x41')]({},_0x476688,_0x48fd45[_0x0a9e('0x46')]);return db[_0x0a9e('0x32')][_0x0a9e('0x4e')](_0x476688)[_0x0a9e('0x2c')](handleEntityNotFound(_0x473dc8,null))[_0x0a9e('0x2c')](respondWithResult(_0x473dc8,null))['catch'](handleError(_0x473dc8,null));};exports['update']=function(_0x53975a,_0x39d77d,_0x204173){var _0x14d602;return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x53975a[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x39d77d,null))['then'](saveUpdates(_0x53975a[_0x0a9e('0x50')],null))['then'](function(_0x443e72){if(_0x443e72){_0x14d602=_0x443e72['get']({'plain':!![]});var _0x2e5e62=fs[_0x0a9e('0x51')](path[_0x0a9e('0x52')](config['root'],_0x0a9e('0x53')),_0x0a9e('0x54'));var _0x508b47=ejs['render'](_0x2e5e62,_0x14d602);var _0x128aa6=fs[_0x0a9e('0x51')](path['join'](config[_0x0a9e('0x55')],'server/files/templates/turn.ejs'),_0x0a9e('0x54'));var _0x523cd2=ejs[_0x0a9e('0x56')](_0x128aa6,_0x14d602);fs['writeFileSync']('/etc/asterisk/stun_xcally.conf',_0x508b47);fs['writeFileSync'](_0x0a9e('0x57'),_0x523cd2);return respondWithRpcPromise('Reload',_0x0a9e('0x2b'),{'module':_0x0a9e('0x58')});}})[_0x0a9e('0x2c')](function(){return respondWithRpcPromise(_0x0a9e('0x59'),_0x0a9e('0x2b'),{'module':_0x0a9e('0x5a')});})[_0x0a9e('0x2c')](function(){return _0x14d602||null;})[_0x0a9e('0x2c')](respondWithResult(_0x39d77d,null))['catch'](handleError(_0x39d77d,null));};exports[_0x0a9e('0x5b')]=function(_0x121cef,_0x2642bb,_0x30c491){if(_0x121cef[_0x0a9e('0x5c')]&&_0x121cef[_0x0a9e('0x5c')]['filename']){_0x121cef[_0x0a9e('0x50')][_0x0a9e('0x5d')]=_0x121cef['file'][_0x0a9e('0x5e')];}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x121cef['params']['id']}})['then'](handleEntityNotFound(_0x2642bb,null))['then'](saveUpdates(_0x121cef[_0x0a9e('0x50')],null))['then'](respondWithResult(_0x2642bb,null))[_0x0a9e('0x5f')](handleError(_0x2642bb,null));};exports[_0x0a9e('0x60')]=function(_0x261adb,_0x7be420,_0x1cca9f){if(_0x261adb[_0x0a9e('0x5c')]&&_0x261adb['file'][_0x0a9e('0x5e')]){_0x261adb['body'][_0x0a9e('0x61')]=_0x261adb[_0x0a9e('0x5c')][_0x0a9e('0x5e')];}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x261adb[_0x0a9e('0x4f')]['id']}})[_0x0a9e('0x2c')](handleEntityNotFound(_0x7be420,null))[_0x0a9e('0x2c')](saveUpdates(_0x261adb['body'],null))[_0x0a9e('0x2c')](respondWithResult(_0x7be420,null))[_0x0a9e('0x5f')](handleError(_0x7be420,null));};var utilLicense=require('../../config/license/util');exports[_0x0a9e('0x62')]=function(_0x17e88c,_0x88dcbf,_0x409b29){var _0x401837='server/files/images/logos';var _0x176840={'custom':![]};return utilLicense[_0x0a9e('0x63')]()[_0x0a9e('0x2c')](function(_0x47bb43){if(_0x47bb43){_0x176840=_0x47bb43;}return db[_0x0a9e('0x32')]['find']({'where':{'id':_0x17e88c['params']['id']},'attributes':[_0x0a9e('0x5d'),_0x0a9e('0x61'),_0x0a9e('0x64'),_0x0a9e('0x65'),_0x0a9e('0x66'),_0x0a9e('0x67')],'raw':!![]});})[_0x0a9e('0x2c')](handleEntityNotFound(_0x88dcbf,null))[_0x0a9e('0x2c')](function(_0x2d7205){if(_0x2d7205){var _0x1cc4f3=_0x2d7205[_0x0a9e('0x5d')]&&fs[_0x0a9e('0x68')](path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_[_0x0a9e('0x69')](_0x2d7205[_0x0a9e('0x5d')])))?path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_['toLower'](_0x2d7205[_0x0a9e('0x5d')])):path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_['toLower'](_0x0a9e('0x6a')));var _0x30944e='default'+_[_0x0a9e('0x6b')](_0x0a9e('0x5d'));if(_0x2d7205[_0x30944e]||!_0x176840[_0x0a9e('0x6c')]){_0x1cc4f3=path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x401837,_['toLower']('default_logo.png'));}if(!fs['existsSync'](_0x1cc4f3)){throw new db[(_0x0a9e('0x6d'))][(_0x0a9e('0x6e'))](_0x0a9e('0x6f'));}return _0x88dcbf[_0x0a9e('0x70')](_0x1cc4f3);}})[_0x0a9e('0x5f')](handleError(_0x88dcbf,null));};var utilLicense=require(_0x0a9e('0x71'));exports[_0x0a9e('0x72')]=function(_0x1a0677,_0x5512d1,_0x235f8f){var _0xcbc8b2=_0x0a9e('0x73');var _0x4a4fc7={'custom':![]};return utilLicense[_0x0a9e('0x63')]()['then'](function(_0x4437ff){if(_0x4437ff){_0x4a4fc7=_0x4437ff;}return db[_0x0a9e('0x32')]['find']({'where':{'id':_0x1a0677[_0x0a9e('0x4f')]['id']},'attributes':[_0x0a9e('0x5d'),_0x0a9e('0x61'),_0x0a9e('0x64'),'defaultLogo',_0x0a9e('0x66'),_0x0a9e('0x67')],'raw':!![]});})[_0x0a9e('0x2c')](handleEntityNotFound(_0x5512d1,null))[_0x0a9e('0x2c')](function(_0x5b7fc3){if(_0x5b7fc3){var _0x109ccb=_0x5b7fc3[_0x0a9e('0x61')]&&fs[_0x0a9e('0x68')](path[_0x0a9e('0x52')](config['root'],_0xcbc8b2,_[_0x0a9e('0x69')](_0x5b7fc3[_0x0a9e('0x61')])))?path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0xcbc8b2,_[_0x0a9e('0x69')](_0x5b7fc3[_0x0a9e('0x61')])):path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0xcbc8b2,_[_0x0a9e('0x69')](_0x0a9e('0x74')));var _0xc4c230=_0x0a9e('0x75')+_[_0x0a9e('0x6b')](_0x0a9e('0x61'));if(_0x5b7fc3[_0xc4c230]||!_0x4a4fc7['custom']){_0x109ccb=path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0xcbc8b2,_[_0x0a9e('0x69')]('default_loginLogo.png'));}if(!fs[_0x0a9e('0x68')](_0x109ccb)){throw new db[(_0x0a9e('0x6d'))][(_0x0a9e('0x6e'))](_0x0a9e('0x6f'));}return _0x5512d1['download'](_0x109ccb);}})['catch'](handleError(_0x5512d1,null));};exports[_0x0a9e('0x76')]=function(_0x2bbdb5,_0x4c54fa){return db[_0x0a9e('0x32')]['find']({'where':{'id':_0x2bbdb5[_0x0a9e('0x4f')]['id']},'attributes':[_0x0a9e('0x77')]})['then'](respondWithResult(_0x4c54fa,null))[_0x0a9e('0x5f')](handleError(_0x4c54fa,null));};exports[_0x0a9e('0x78')]=function(_0x2d2286,_0x42b959,_0x3755fe){if(_0x2d2286[_0x0a9e('0x5c')]&&_0x2d2286[_0x0a9e('0x5c')]['filename']){_0x2d2286[_0x0a9e('0x50')][_0x0a9e('0x64')]=_0x2d2286[_0x0a9e('0x5c')][_0x0a9e('0x5e')];}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x2d2286[_0x0a9e('0x4f')]['id']}})['then'](handleEntityNotFound(_0x42b959,null))[_0x0a9e('0x2c')](saveUpdates(_0x2d2286['body'],null))[_0x0a9e('0x2c')](respondWithResult(_0x42b959,null))[_0x0a9e('0x5f')](handleError(_0x42b959,null));};var utilLicense=require(_0x0a9e('0x71'));exports[_0x0a9e('0x79')]=function(_0x5af453,_0x51ccd7,_0x353384){var _0x2b9c01=_0x0a9e('0x73');var _0x5ac73d={'custom':![]};return utilLicense[_0x0a9e('0x63')]()[_0x0a9e('0x2c')](function(_0x524e38){if(_0x524e38){_0x5ac73d=_0x524e38;}return db['Setting'][_0x0a9e('0x4e')]({'where':{'id':_0x5af453['params']['id']},'attributes':['logo','loginLogo',_0x0a9e('0x64'),_0x0a9e('0x65'),_0x0a9e('0x66'),_0x0a9e('0x67')],'raw':!![]});})[_0x0a9e('0x2c')](handleEntityNotFound(_0x51ccd7,null))[_0x0a9e('0x2c')](function(_0x5a8854){if(_0x5a8854){var _0x5fd5db=_0x5a8854['preferred']&&fs[_0x0a9e('0x68')](path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x2b9c01,_[_0x0a9e('0x69')](_0x5a8854['preferred'])))?path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x2b9c01,_[_0x0a9e('0x69')](_0x5a8854['preferred'])):path[_0x0a9e('0x52')](config[_0x0a9e('0x55')],_0x2b9c01,_[_0x0a9e('0x69')](_0x0a9e('0x7a')));var _0x255e49=_0x0a9e('0x75')+_[_0x0a9e('0x6b')](_0x0a9e('0x64'));if(_0x5a8854[_0x255e49]||!_0x5ac73d['custom']||!_0x5ac73d[_0x0a9e('0x64')]){_0x5fd5db=path[_0x0a9e('0x52')](config['root'],_0x2b9c01,_[_0x0a9e('0x69')](_0x0a9e('0x7a')));}if(!fs[_0x0a9e('0x68')](_0x5fd5db)){throw new db['Sequelize'][(_0x0a9e('0x6e'))]('Logo\x20not\x20found');}return _0x51ccd7[_0x0a9e('0x70')](_0x5fd5db);}})[_0x0a9e('0x5f')](handleError(_0x51ccd7,null));};
\ No newline at end of file
diff --git a/server/api/setting/setting.model.js b/server/api/setting/setting.model.js
index 54ea35b..6aca875 100644
--- a/server/api/setting/setting.model.js
+++ b/server/api/setting/setting.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe5b0=['./setting.attributes','exports','define','Setting','settings','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x4c1df,_0x2cccae){var _0xd9d4ee=function(_0x34d777){while(--_0x34d777){_0x4c1df['push'](_0x4c1df['shift']());}};_0xd9d4ee(++_0x2cccae);}(_0xe5b0,0x139));var _0x0e5b=function(_0x8e547b,_0x27e29c){_0x8e547b=_0x8e547b-0x0;var _0x4ca654=_0xe5b0[_0x8e547b];return _0x4ca654;};'use strict';var _=require(_0x0e5b('0x0'));var util=require(_0x0e5b('0x1'));var logger=require('../../config/logger')(_0x0e5b('0x2'));var moment=require(_0x0e5b('0x3'));var BPromise=require(_0x0e5b('0x4'));var rp=require(_0x0e5b('0x5'));var fs=require('fs');var path=require(_0x0e5b('0x6'));var rimraf=require(_0x0e5b('0x7'));var config=require(_0x0e5b('0x8'));var attributes=require(_0x0e5b('0x9'));module[_0x0e5b('0xa')]=function(_0x44110a,_0x1fbbbf){return _0x44110a[_0x0e5b('0xb')](_0x0e5b('0xc'),attributes,{'tableName':_0x0e5b('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0125=['../../config/environment','./setting.attributes','exports','define','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf'];(function(_0x5223fd,_0x44e438){var _0x338a97=function(_0x1e151e){while(--_0x1e151e){_0x5223fd['push'](_0x5223fd['shift']());}};_0x338a97(++_0x44e438);}(_0x0125,0x94));var _0x5012=function(_0x5179a5,_0x419746){_0x5179a5=_0x5179a5-0x0;var _0x15c8ce=_0x0125[_0x5179a5];return _0x15c8ce;};'use strict';var _=require(_0x5012('0x0'));var util=require(_0x5012('0x1'));var logger=require(_0x5012('0x2'))(_0x5012('0x3'));var moment=require('moment');var BPromise=require(_0x5012('0x4'));var rp=require(_0x5012('0x5'));var fs=require('fs');var path=require(_0x5012('0x6'));var rimraf=require(_0x5012('0x7'));var config=require(_0x5012('0x8'));var attributes=require(_0x5012('0x9'));module[_0x5012('0xa')]=function(_0x5ad436,_0x223ca7){return _0x5ad436[_0x5012('0xb')]('Setting',attributes,{'tableName':'settings','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/setting/setting.rpc.js b/server/api/setting/setting.rpc.js
index 3ea48c0..bf84e62 100644
--- a/server/api/setting/setting.rpc.js
+++ b/server/api/setting/setting.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3075=['../../config/logger','rpc','../../config/environment','client','http','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x5d13cb,_0x2074cc){var _0x3e74d2=function(_0x53443a){while(--_0x53443a){_0x5d13cb['push'](_0x5d13cb['shift']());}};_0x3e74d2(++_0x2074cc);}(_0x3075,0xc0));var _0x5307=function(_0x3b84a2,_0x36d727){_0x3b84a2=_0x3b84a2-0x0;var _0x4c7636=_0x3075[_0x3b84a2];return _0x4c7636;};'use strict';var _=require(_0x5307('0x0'));var util=require(_0x5307('0x1'));var moment=require('moment');var BPromise=require(_0x5307('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5307('0x3'));var db=require(_0x5307('0x4'))['db'];var utils=require(_0x5307('0x5'));var logger=require(_0x5307('0x6'))(_0x5307('0x7'));var config=require(_0x5307('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x5307('0x9')][_0x5307('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x10d770,_0x40fe19,_0x3d201b){return new BPromise(function(_0x24034d,_0x2b9ed7){return client[_0x5307('0xb')](_0x10d770,_0x3d201b)[_0x5307('0xc')](function(_0x1c0dcf){logger[_0x5307('0xd')](_0x5307('0xe'),_0x40fe19,_0x5307('0xf'));logger['debug'](_0x5307('0x10'),_0x40fe19,_0x5307('0xf'),JSON['stringify'](_0x1c0dcf));if(_0x1c0dcf[_0x5307('0x11')]){if(_0x1c0dcf[_0x5307('0x11')][_0x5307('0x12')]===0x1f4){logger[_0x5307('0x11')](_0x5307('0xe'),_0x40fe19,_0x1c0dcf[_0x5307('0x11')][_0x5307('0x13')]);return _0x2b9ed7(_0x1c0dcf[_0x5307('0x11')][_0x5307('0x13')]);}logger[_0x5307('0x11')]('Setting,\x20%s,\x20%s',_0x40fe19,_0x1c0dcf[_0x5307('0x11')][_0x5307('0x13')]);return _0x24034d(_0x1c0dcf[_0x5307('0x11')]['message']);}else{logger['info']('Setting,\x20%s,\x20%s',_0x40fe19,_0x5307('0xf'));_0x24034d(_0x1c0dcf[_0x5307('0x14')][_0x5307('0x13')]);}})[_0x5307('0x15')](function(_0x186748){logger[_0x5307('0x11')](_0x5307('0xe'),_0x40fe19,_0x186748);_0x2b9ed7(_0x186748);});});}
\ No newline at end of file
+var _0x71bd=['request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','request','info','Setting,\x20%s,\x20%s'];(function(_0x1cdc12,_0x48dc76){var _0x48fc34=function(_0x3a54ed){while(--_0x3a54ed){_0x1cdc12['push'](_0x1cdc12['shift']());}};_0x48fc34(++_0x48dc76);}(_0x71bd,0xd9));var _0xd71b=function(_0x1174bc,_0x37eb16){_0x1174bc=_0x1174bc-0x0;var _0x162a66=_0x71bd[_0x1174bc];return _0x162a66;};'use strict';var _=require(_0xd71b('0x0'));var util=require(_0xd71b('0x1'));var moment=require(_0xd71b('0x2'));var BPromise=require(_0xd71b('0x3'));var rs=require(_0xd71b('0x4'));var fs=require('fs');var Redis=require(_0xd71b('0x5'));var db=require(_0xd71b('0x6'))['db'];var utils=require(_0xd71b('0x7'));var logger=require('../../config/logger')(_0xd71b('0x8'));var config=require(_0xd71b('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xd71b('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x318de9,_0x5f543f,_0x35c76e){return new BPromise(function(_0x28592f,_0x24cb24){return client[_0xd71b('0xb')](_0x318de9,_0x35c76e)['then'](function(_0x5228b1){logger[_0xd71b('0xc')](_0xd71b('0xd'),_0x5f543f,_0xd71b('0xe'));logger[_0xd71b('0xf')](_0xd71b('0x10'),_0x5f543f,_0xd71b('0xe'),JSON['stringify'](_0x5228b1));if(_0x5228b1[_0xd71b('0x11')]){if(_0x5228b1['error'][_0xd71b('0x12')]===0x1f4){logger[_0xd71b('0x11')](_0xd71b('0xd'),_0x5f543f,_0x5228b1[_0xd71b('0x11')][_0xd71b('0x13')]);return _0x24cb24(_0x5228b1['error'][_0xd71b('0x13')]);}logger[_0xd71b('0x11')](_0xd71b('0xd'),_0x5f543f,_0x5228b1['error'][_0xd71b('0x13')]);return _0x28592f(_0x5228b1[_0xd71b('0x11')][_0xd71b('0x13')]);}else{logger[_0xd71b('0xc')](_0xd71b('0xd'),_0x5f543f,'request\x20sent');_0x28592f(_0x5228b1['result'][_0xd71b('0x13')]);}})[_0xd71b('0x14')](function(_0x4dc43d){logger[_0xd71b('0x11')](_0xd71b('0xd'),_0x5f543f,_0x4dc43d);_0x24cb24(_0x4dc43d);});});}
\ No newline at end of file
diff --git a/server/api/smsAccount/index.js b/server/api/smsAccount/index.js
index a15da88..d61046b 100644
--- a/server/api/smsAccount/index.js
+++ b/server/api/smsAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe3a8=['Router','../../components/interaction/service','./smsAccount.controller','get','index','isAuthenticated','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/status','/:id/users','post','create','addDisposition','addAnswer','/:id/notify','notify','addApplications','/:id/send','send','status','addAgents','put','delete','removeDispositions','removeAgents','util','path','connect-timeout','express'];(function(_0xd35009,_0x466f3d){var _0xc650f0=function(_0x11821d){while(--_0x11821d){_0xd35009['push'](_0xd35009['shift']());}};_0xc650f0(++_0x466f3d);}(_0xe3a8,0x94));var _0x8e3a=function(_0x5ecbad,_0x5d2eb0){_0x5ecbad=_0x5ecbad-0x0;var _0x128f2e=_0xe3a8[_0x5ecbad];return _0x128f2e;};'use strict';var multer=require('multer');var util=require(_0x8e3a('0x0'));var path=require(_0x8e3a('0x1'));var timeout=require(_0x8e3a('0x2'));var express=require(_0x8e3a('0x3'));var router=express[_0x8e3a('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x8e3a('0x5'));var config=require('../../config/environment');var controller=require(_0x8e3a('0x6'));router[_0x8e3a('0x7')]('/',auth['isAuthenticated'](),controller[_0x8e3a('0x8')]);router[_0x8e3a('0x7')]('/describe',auth[_0x8e3a('0x9')](),controller[_0x8e3a('0xa')]);router['get'](_0x8e3a('0xb'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0xc')]);router[_0x8e3a('0x7')](_0x8e3a('0xd'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0xe')]);router[_0x8e3a('0x7')](_0x8e3a('0xf'),auth['isAuthenticated'](),controller[_0x8e3a('0x10')]);router['get'](_0x8e3a('0x11'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x12')]);router[_0x8e3a('0x7')](_0x8e3a('0x13'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x14')]);router[_0x8e3a('0x7')](_0x8e3a('0x15'),controller['statusGet']);router[_0x8e3a('0x7')](_0x8e3a('0x16'),auth[_0x8e3a('0x9')](),controller['getAgents']);router[_0x8e3a('0x17')]('/',auth['isAuthenticated'](),controller[_0x8e3a('0x18')]);router[_0x8e3a('0x17')]('/:id/dispositions',auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x19')]);router[_0x8e3a('0x17')](_0x8e3a('0xf'),auth['isAuthenticated'](),controller[_0x8e3a('0x1a')]);router['post'](_0x8e3a('0x1b'),controller[_0x8e3a('0x1c')]);router['post'](_0x8e3a('0x11'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x1d')]);router[_0x8e3a('0x17')](_0x8e3a('0x1e'),auth['isAuthenticated'](),controller[_0x8e3a('0x1f')]);router['post'](_0x8e3a('0x15'),controller[_0x8e3a('0x20')]);router['post'](_0x8e3a('0x16'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x21')]);router[_0x8e3a('0x22')]('/:id',auth[_0x8e3a('0x9')](),controller['update']);router[_0x8e3a('0x23')]('/:id',auth[_0x8e3a('0x9')](),controller['destroy']);router[_0x8e3a('0x23')](_0x8e3a('0xd'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x24')]);router[_0x8e3a('0x23')](_0x8e3a('0xf'),auth[_0x8e3a('0x9')](),controller['removeAnswers']);router[_0x8e3a('0x23')](_0x8e3a('0x16'),auth[_0x8e3a('0x9')](),controller[_0x8e3a('0x25')]);module['exports']=router;
\ No newline at end of file
+var _0x018f=['get','isAuthenticated','/describe','describe','/:id','/:id/canned_answers','getAnswers','getApplications','/:id/interactions','getInteractions','/:id/status','getAgents','post','create','addDisposition','addAnswer','/:id/applications','addApplications','/:id/send','status','addAgents','put','update','destroy','delete','/:id/dispositions','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsAccount.controller'];(function(_0x2e60fc,_0x31458d){var _0x1165e7=function(_0x3360b7){while(--_0x3360b7){_0x2e60fc['push'](_0x2e60fc['shift']());}};_0x1165e7(++_0x31458d);}(_0x018f,0x93));var _0xf018=function(_0x13e300,_0x1bcb41){_0x13e300=_0x13e300-0x0;var _0x5a3eea=_0x018f[_0x13e300];return _0x5a3eea;};'use strict';var multer=require(_0xf018('0x0'));var util=require(_0xf018('0x1'));var path=require(_0xf018('0x2'));var timeout=require(_0xf018('0x3'));var express=require(_0xf018('0x4'));var router=express['Router']();var auth=require(_0xf018('0x5'));var interaction=require(_0xf018('0x6'));var config=require(_0xf018('0x7'));var controller=require(_0xf018('0x8'));router[_0xf018('0x9')]('/',auth[_0xf018('0xa')](),controller['index']);router[_0xf018('0x9')](_0xf018('0xb'),auth[_0xf018('0xa')](),controller[_0xf018('0xc')]);router[_0xf018('0x9')](_0xf018('0xd'),auth['isAuthenticated'](),controller['show']);router[_0xf018('0x9')]('/:id/dispositions',auth[_0xf018('0xa')](),controller['getDispositions']);router[_0xf018('0x9')](_0xf018('0xe'),auth[_0xf018('0xa')](),controller[_0xf018('0xf')]);router[_0xf018('0x9')]('/:id/applications',auth[_0xf018('0xa')](),controller[_0xf018('0x10')]);router['get'](_0xf018('0x11'),auth[_0xf018('0xa')](),controller[_0xf018('0x12')]);router['get'](_0xf018('0x13'),controller['statusGet']);router[_0xf018('0x9')]('/:id/users',auth[_0xf018('0xa')](),controller[_0xf018('0x14')]);router[_0xf018('0x15')]('/',auth['isAuthenticated'](),controller[_0xf018('0x16')]);router[_0xf018('0x15')]('/:id/dispositions',auth[_0xf018('0xa')](),controller[_0xf018('0x17')]);router['post'](_0xf018('0xe'),auth[_0xf018('0xa')](),controller[_0xf018('0x18')]);router[_0xf018('0x15')]('/:id/notify',controller['notify']);router['post'](_0xf018('0x19'),auth[_0xf018('0xa')](),controller[_0xf018('0x1a')]);router['post'](_0xf018('0x1b'),auth[_0xf018('0xa')](),controller['send']);router[_0xf018('0x15')](_0xf018('0x13'),controller[_0xf018('0x1c')]);router[_0xf018('0x15')]('/:id/users',auth[_0xf018('0xa')](),controller[_0xf018('0x1d')]);router[_0xf018('0x1e')](_0xf018('0xd'),auth[_0xf018('0xa')](),controller[_0xf018('0x1f')]);router['delete'](_0xf018('0xd'),auth[_0xf018('0xa')](),controller[_0xf018('0x20')]);router[_0xf018('0x21')](_0xf018('0x22'),auth['isAuthenticated'](),controller[_0xf018('0x23')]);router[_0xf018('0x21')](_0xf018('0xe'),auth[_0xf018('0xa')](),controller[_0xf018('0x24')]);router[_0xf018('0x21')]('/:id/users',auth[_0xf018('0xa')](),controller[_0xf018('0x25')]);module[_0xf018('0x26')]=router;
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.attributes.js b/server/api/smsAccount/smsAccount.attributes.js
index 25ad025..eccf541 100644
--- a/server/api/smsAccount/smsAccount.attributes.js
+++ b/server/api/smsAccount/smsAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2fe0=['infobip','intelepeer','BOOLEAN','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','name','generate','ENUM','twilio','skebby','connectel','plivo','clickatell','csc'];(function(_0x48f9c9,_0x35d031){var _0x36ba7d=function(_0x59c115){while(--_0x59c115){_0x48f9c9['push'](_0x48f9c9['shift']());}};_0x36ba7d(++_0x35d031);}(_0x2fe0,0xe3));var _0x02fe=function(_0x4365e1,_0x266220){_0x4365e1=_0x4365e1-0x0;var _0x3b6082=_0x2fe0[_0x4365e1];return _0x3b6082;};'use strict';var Sequelize=require(_0x02fe('0x0'));var rs=require(_0x02fe('0x1'));module[_0x02fe('0x2')]={'name':{'type':Sequelize[_0x02fe('0x3')],'unique':_0x02fe('0x4'),'allowNull':![]},'key':{'type':Sequelize[_0x02fe('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x02fe('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0x02fe('0x3')],'defaultValue':function(){return rs[_0x02fe('0x5')]();}},'phone':{'type':Sequelize[_0x02fe('0x3')]},'type':{'type':Sequelize[_0x02fe('0x6')](_0x02fe('0x7'),_0x02fe('0x8'),_0x02fe('0x9'),'clicksend',_0x02fe('0xa'),_0x02fe('0xb'),_0x02fe('0xc'),_0x02fe('0xd'),_0x02fe('0xe'))},'accountSid':{'type':Sequelize[_0x02fe('0x3')]},'authId':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize['STRING']},'smsMethod':{'type':Sequelize[_0x02fe('0x6')]('SI','TI','GP')},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0x02fe('0x3')]},'apiKey':{'type':Sequelize['STRING']},'senderString':{'type':Sequelize['STRING']},'deliveryReport':{'type':Sequelize[_0x02fe('0xf')],'defaultValue':![]},'description':{'type':Sequelize[_0x02fe('0x3')]},'notificationTemplate':{'type':Sequelize[_0x02fe('0x10')],'defaultValue':function(){return _0x02fe('0x11');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x02fe('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x02fe('0xf')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x02fe('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x02fe('0xf')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x02fe('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0x02fe('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x02fe('0x12')],'comment':_0x02fe('0x13')},'mandatoryDisposition':{'type':Sequelize[_0x02fe('0xf')],'defaultValue':![],'comment':_0x02fe('0x14'),'set':function(_0x46c45d){if(!_0x46c45d)this[_0x02fe('0x15')](_0x02fe('0x16'),null);this[_0x02fe('0x15')](_0x02fe('0x17'),_0x46c45d);}}};
\ No newline at end of file
+var _0x3fab=['clickatell','csc','intelepeer','TEXT','BOOLEAN','INTEGER','setDataValue','mandatoryDisposition','sequelize','name','STRING','generate','ENUM','twilio','skebby','connectel','clicksend','plivo'];(function(_0x5397eb,_0x50317e){var _0x5ea583=function(_0x51bf8){while(--_0x51bf8){_0x5397eb['push'](_0x5397eb['shift']());}};_0x5ea583(++_0x50317e);}(_0x3fab,0x1b8));var _0xb3fa=function(_0x46ebde,_0x299acd){_0x46ebde=_0x46ebde-0x0;var _0x1e3bf9=_0x3fab[_0x46ebde];return _0x1e3bf9;};'use strict';var Sequelize=require(_0xb3fa('0x0'));var rs=require('randomstring');module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0xb3fa('0x1'),'allowNull':![]},'key':{'type':Sequelize[_0xb3fa('0x2')],'allowNull':![]},'remote':{'type':Sequelize[_0xb3fa('0x2')],'allowNull':![]},'token':{'type':Sequelize[_0xb3fa('0x2')],'defaultValue':function(){return rs[_0xb3fa('0x3')]();}},'phone':{'type':Sequelize[_0xb3fa('0x2')]},'type':{'type':Sequelize[_0xb3fa('0x4')](_0xb3fa('0x5'),_0xb3fa('0x6'),_0xb3fa('0x7'),_0xb3fa('0x8'),_0xb3fa('0x9'),_0xb3fa('0xa'),_0xb3fa('0xb'),'infobip',_0xb3fa('0xc'))},'accountSid':{'type':Sequelize['STRING']},'authId':{'type':Sequelize[_0xb3fa('0x2')]},'authToken':{'type':Sequelize['STRING']},'smsMethod':{'type':Sequelize[_0xb3fa('0x4')]('SI','TI','GP')},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xb3fa('0x2')]},'apiKey':{'type':Sequelize[_0xb3fa('0x2')]},'senderString':{'type':Sequelize[_0xb3fa('0x2')]},'deliveryReport':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize[_0xb3fa('0x2')]},'notificationTemplate':{'type':Sequelize[_0xb3fa('0xd')],'defaultValue':function(){return'Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0xb3fa('0xe')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xb3fa('0xf')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xb3fa('0xe')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xb3fa('0xf')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xb3fa('0xe')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xb3fa('0xf')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0xb3fa('0x2')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xb3fa('0xf')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0xb3fa('0xe')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x2ce6fd){if(!_0x2ce6fd)this[_0xb3fa('0x10')]('mandatoryDispositionPauseId',null);this['setDataValue'](_0xb3fa('0x11'),_0x2ce6fd);}}};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.controller.js b/server/api/smsAccount/smsAccount.controller.js
index bbd1bf4..3cba3fb 100644
--- a/server/api/smsAccount/smsAccount.controller.js
+++ b/server/api/smsAccount/smsAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc267=['path','sox','ejs','lodash','squel','crypto','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','redis','defaults','localhost','./smsAccount.socket','register','jayson/promise','client','http','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','end','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','get','SmsAccounts','UserProfileResource','sendStatus','stack','name','send','index','mandatoryDispositionPause','SmsAccount','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','map','type','key','VIRTUAL','field','merge','options','include','findAll','rows','show','params','Pause','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addDisposition','Disposition','getDispositions','findOne','SmsAccountId','includeAll','removeDispositions','ids','addAnswer','CannedAnswer','order','removeAnswers','notify','sms','SmsApplication','account','applications','orderBy','Applications','priority','asc','CmContact','describe','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','ListId','mobile','twilio','Body','messageId','MessageSid','skebby','from','text','connectel','clicksend','message_id','plivo','From','infobip','results','csc','originatingAddress','fromNumber','replyMessageId','intelepeer','refid','isNil','from\x20is\x20mandatory','Sequelize','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','DESC','list','Contacts','contact','SmsInteraction','spread','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','SmsMessage','ContactId','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','Start','startRouting','receiveMessage','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','text/xml','transaction','bulkCreate','getApplications','getInteractions','Contact','Owner','fullname','internal','Tags','color','tag','to\x20is\x20mandatory','CmList','List','out','Messages','dataValues','log','endpoint\x20/status\x20POST\x20/','received\x20delivery\x20report\x20from','skebby_dispatch_id','statusInt','status_code','DELIVERED','groupName','clickatell','redif','inspect','error_code','DELIVERED_TO_GATEWAY','RECEIVED_BY_RECIPIENT','DELIVRD','message-id','state','addAgents','omit','userSmsAccount:save','removeAgents','isArray','emit','userSmsAccount:remove','getAgents','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xc267,0xdd));var _0x7c26=function(_0xe4353d,_0x390f78){_0xe4353d=_0xe4353d-0x0;var _0x5b2640=_0xc267[_0xe4353d];return _0x5b2640;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x7c26('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7c26('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7c26('0x2'));var moment=require(_0x7c26('0x3'));var BPromise=require(_0x7c26('0x4'));var Mustache=require(_0x7c26('0x5'));var util=require(_0x7c26('0x6'));var path=require(_0x7c26('0x7'));var sox=require(_0x7c26('0x8'));var csv=require('to-csv');var ejs=require(_0x7c26('0x9'));var fs=require('fs');var _=require(_0x7c26('0xa'));var squel=require(_0x7c26('0xb'));var crypto=require(_0x7c26('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x7c26('0xd'));var querystring=require(_0x7c26('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x7c26('0xf'));var qs=require(_0x7c26('0x10'));var hardwareService=require(_0x7c26('0x11'));var logger=require(_0x7c26('0x12'))(_0x7c26('0x13'));var utils=require(_0x7c26('0x14'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x7c26('0x15')]=_[_0x7c26('0x16')](config['redis'],{'host':_0x7c26('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x7c26('0x18'))[_0x7c26('0x19')](socket);var jayson=require(_0x7c26('0x1a'));var client=jayson[_0x7c26('0x1b')][_0x7c26('0x1c')]({'port':0x232c});function checkPasswordPattern(_0x521638,_0x2bbe47,_0x297b62){if(_0x297b62){var _0x2f4798=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2f4798['test'](_0x2bbe47)){return _0x521638;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x521638;}}function respondWithRpcPromise(_0x249e07,_0x584dbc,_0x42b37f,_0xb7197a){return new BPromise(function(_0x57b77a,_0x50897f){var _0x54dc57=_0xb7197a||client;return _0x54dc57[_0x7c26('0x1d')](_0x249e07,_0x42b37f)[_0x7c26('0x1e')](function(_0x789e1f){logger[_0x7c26('0x1f')](_0x7c26('0x20'),_0x584dbc,_0x7c26('0x21'));logger[_0x7c26('0x22')](_0x7c26('0x23'),_0x584dbc,_0x7c26('0x21'),JSON[_0x7c26('0x24')](_0x789e1f));if(_0x789e1f[_0x7c26('0x25')]){if(_0x789e1f[_0x7c26('0x25')]['code']===0x1f4){logger[_0x7c26('0x25')](_0x7c26('0x20'),_0x584dbc,_0x789e1f[_0x7c26('0x25')][_0x7c26('0x26')]);return _0x50897f(_0x789e1f[_0x7c26('0x25')]['message']);}logger[_0x7c26('0x25')](_0x7c26('0x20'),_0x584dbc,_0x789e1f[_0x7c26('0x25')][_0x7c26('0x26')]);return _0x57b77a(_0x789e1f[_0x7c26('0x25')][_0x7c26('0x26')]);}else{logger[_0x7c26('0x1f')]('SmsAccount,\x20%s,\x20%s',_0x584dbc,'request\x20sent');_0x57b77a(_0x789e1f[_0x7c26('0x27')][_0x7c26('0x26')]);}})[_0x7c26('0x28')](function(_0x239736){logger[_0x7c26('0x25')](_0x7c26('0x20'),_0x584dbc,_0x239736);_0x50897f(_0x239736);});});}function respondWithStatusCode(_0x4e71c5,_0x3671a1){_0x3671a1=_0x3671a1||0xcc;return function(_0x50569e){if(_0x50569e){return _0x4e71c5['sendStatus'](_0x3671a1);}return _0x4e71c5['status'](_0x3671a1)[_0x7c26('0x29')]();};}function respondWithResult(_0x46a675,_0x33832f){_0x33832f=_0x33832f||0xc8;return function(_0x29b73f){if(_0x29b73f){return _0x46a675[_0x7c26('0x2a')](_0x33832f)[_0x7c26('0x2b')](_0x29b73f);}};}function respondWithFilteredResult(_0x5ce168,_0x80ce9e){return function(_0x1a5c88){if(_0x1a5c88){var _0x565607=_0x1a5c88[_0x7c26('0x2c')],_0x52203d=_0x80ce9e[_0x7c26('0x2d')],_0x3c79b1=_0x80ce9e['offset']+_0x80ce9e[_0x7c26('0x2e')],_0x3c5835;if(_0x3c79b1>=_0x565607){_0x3c79b1=_0x565607;_0x3c5835=0xc8;}else{_0x3c5835=0xce;}_0x5ce168[_0x7c26('0x2a')](_0x3c5835);return _0x5ce168[_0x7c26('0x2f')](_0x7c26('0x30'),_0x52203d+'-'+_0x3c79b1+'/'+_0x565607)[_0x7c26('0x2b')](_0x1a5c88);}return null;};}function patchUpdates(_0x1e56a0){return function(_0x4ec942){try{jsonpatch[_0x7c26('0x31')](_0x4ec942,_0x1e56a0,!![]);}catch(_0x349736){return BPromise[_0x7c26('0x32')](_0x349736);}return _0x4ec942[_0x7c26('0x33')]();};}function saveUpdates(_0x47d110,_0x47c8a0){return function(_0x31215f){if(_0x31215f){return _0x31215f[_0x7c26('0x34')](_0x47d110)[_0x7c26('0x1e')](function(_0xacc444){return _0xacc444;});}return null;};}function removeEntity(_0x14732e,_0x1e6c63){return function(_0x498583){if(_0x498583){return _0x498583[_0x7c26('0x35')]()[_0x7c26('0x1e')](function(){var _0x231229=_0x498583[_0x7c26('0x36')]({'plain':!![]});var _0x1006fc=_0x7c26('0x37');return db[_0x7c26('0x38')][_0x7c26('0x35')]({'where':{'type':_0x1006fc,'resourceId':_0x231229['id']}})['then'](function(){return _0x498583;});})['then'](function(){_0x14732e[_0x7c26('0x2a')](0xcc)[_0x7c26('0x29')]();});}};}function handleEntityNotFound(_0x16ac89,_0x2a3d17){return function(_0x3fa1b2){if(!_0x3fa1b2){_0x16ac89[_0x7c26('0x39')](0x194);}return _0x3fa1b2;};}function handleError(_0x51fe98,_0x12991b){_0x12991b=_0x12991b||0x1f4;return function(_0x21a165){logger[_0x7c26('0x25')](_0x21a165[_0x7c26('0x3a')]);if(_0x21a165[_0x7c26('0x3b')]){delete _0x21a165[_0x7c26('0x3b')];}_0x51fe98[_0x7c26('0x2a')](_0x12991b)[_0x7c26('0x3c')](_0x21a165);};}exports[_0x7c26('0x3d')]=function(_0x338f60,_0x6ff453){var _0x4579a0={'include':[{'model':db['Pause'],'as':_0x7c26('0x3e')}]},_0x270e58={},_0x10f89d={'count':0x0,'rows':[]};var _0x19cced=db[_0x7c26('0x3f')][_0x7c26('0x40')];_0x270e58[_0x7c26('0x41')]=_[_0x7c26('0x42')](_0x19cced);_0x270e58['query']=_[_0x7c26('0x42')](_0x338f60[_0x7c26('0x43')]);_0x270e58[_0x7c26('0x44')]=_[_0x7c26('0x45')](_0x270e58[_0x7c26('0x41')],_0x270e58[_0x7c26('0x43')]);_0x4579a0[_0x7c26('0x46')]=_['intersection'](_0x270e58[_0x7c26('0x41')],qs[_0x7c26('0x47')](_0x338f60['query'][_0x7c26('0x47')]));_0x4579a0[_0x7c26('0x46')]=_0x4579a0['attributes'][_0x7c26('0x48')]?_0x4579a0[_0x7c26('0x46')]:_0x270e58[_0x7c26('0x41')];if(!_0x338f60[_0x7c26('0x43')][_0x7c26('0x49')](_0x7c26('0x4a'))){_0x4579a0['limit']=qs[_0x7c26('0x2e')](_0x338f60['query'][_0x7c26('0x2e')]);_0x4579a0[_0x7c26('0x2d')]=qs[_0x7c26('0x2d')](_0x338f60[_0x7c26('0x43')][_0x7c26('0x2d')]);}_0x4579a0['order']=qs[_0x7c26('0x4b')](_0x338f60[_0x7c26('0x43')][_0x7c26('0x4b')]);_0x4579a0[_0x7c26('0x4c')]=qs['filters'](_[_0x7c26('0x4d')](_0x338f60[_0x7c26('0x43')],_0x270e58[_0x7c26('0x44')]));if(_0x338f60[_0x7c26('0x43')][_0x7c26('0x4e')]){_0x4579a0[_0x7c26('0x4c')]=_['merge'](_0x4579a0[_0x7c26('0x4c')],{'$or':_[_0x7c26('0x4f')](_0x19cced,function(_0x2963ad){if(_0x2963ad[_0x7c26('0x50')][_0x7c26('0x51')]!==_0x7c26('0x52')){var _0x382429={};_0x382429[_0x2963ad[_0x7c26('0x53')]]={'$like':'%'+_0x338f60[_0x7c26('0x43')]['filter']+'%'};return _0x382429;}})});}_0x4579a0=_[_0x7c26('0x54')]({},_0x4579a0,_0x338f60[_0x7c26('0x55')]);var _0x2bdb70={'where':_0x4579a0[_0x7c26('0x4c')]};return db[_0x7c26('0x3f')][_0x7c26('0x2c')](_0x2bdb70)[_0x7c26('0x1e')](function(_0xc41f1c){_0x10f89d[_0x7c26('0x2c')]=_0xc41f1c;if(_0x338f60['query']['includeAll']){_0x4579a0[_0x7c26('0x56')]=[{'all':!![]}];}return db['SmsAccount'][_0x7c26('0x57')](_0x4579a0);})[_0x7c26('0x1e')](function(_0xdc480){_0x10f89d[_0x7c26('0x58')]=_0xdc480;return _0x10f89d;})[_0x7c26('0x1e')](respondWithFilteredResult(_0x6ff453,_0x4579a0))[_0x7c26('0x28')](handleError(_0x6ff453,null));};exports[_0x7c26('0x59')]=function(_0x55d53a,_0x1fc8a3){var _0xe4c2d={'raw':![],'where':{'id':_0x55d53a[_0x7c26('0x5a')]['id']},'include':[{'model':db[_0x7c26('0x5b')],'as':_0x7c26('0x3e')}]},_0x3405f3={};_0x3405f3[_0x7c26('0x41')]=_[_0x7c26('0x42')](db[_0x7c26('0x3f')]['rawAttributes']);_0x3405f3['query']=_[_0x7c26('0x42')](_0x55d53a['query']);_0x3405f3['filters']=_[_0x7c26('0x45')](_0x3405f3[_0x7c26('0x41')],_0x3405f3['query']);_0xe4c2d[_0x7c26('0x46')]=_[_0x7c26('0x45')](_0x3405f3[_0x7c26('0x41')],qs[_0x7c26('0x47')](_0x55d53a[_0x7c26('0x43')][_0x7c26('0x47')]));_0xe4c2d[_0x7c26('0x46')]=_0xe4c2d[_0x7c26('0x46')]['length']?_0xe4c2d[_0x7c26('0x46')]:_0x3405f3[_0x7c26('0x41')];if(_0x55d53a[_0x7c26('0x43')]['includeAll']){_0xe4c2d['include']=[{'all':!![]}];}_0xe4c2d=_[_0x7c26('0x54')]({},_0xe4c2d,_0x55d53a[_0x7c26('0x55')]);return db['SmsAccount'][_0x7c26('0x5c')](_0xe4c2d)[_0x7c26('0x1e')](handleEntityNotFound(_0x1fc8a3,null))[_0x7c26('0x1e')](respondWithResult(_0x1fc8a3,null))[_0x7c26('0x28')](handleError(_0x1fc8a3,null));};exports[_0x7c26('0x5d')]=function(_0x52698b,_0x5874c2){return db[_0x7c26('0x3f')][_0x7c26('0x5d')](_0x52698b[_0x7c26('0x5e')],{})[_0x7c26('0x1e')](function(_0x36b79d){var _0x1d9125=_0x52698b[_0x7c26('0x5f')]['get']({'plain':!![]});if(!_0x1d9125)throw new Error(_0x7c26('0x60'));if(_0x1d9125[_0x7c26('0x61')]===_0x7c26('0x5f')){var _0x82b09d=_0x36b79d[_0x7c26('0x36')]({'plain':!![]});var _0x440733='SmsAccounts';return db[_0x7c26('0x62')][_0x7c26('0x5c')]({'where':{'name':_0x440733,'userProfileId':_0x1d9125[_0x7c26('0x63')]},'raw':!![]})[_0x7c26('0x1e')](function(_0x478b92){if(_0x478b92&&_0x478b92[_0x7c26('0x64')]===0x0){return db[_0x7c26('0x38')][_0x7c26('0x5d')]({'name':_0x82b09d[_0x7c26('0x3b')],'resourceId':_0x82b09d['id'],'type':_0x478b92[_0x7c26('0x3b')],'sectionId':_0x478b92['id']},{})[_0x7c26('0x1e')](function(){return _0x36b79d;});}else{return _0x36b79d;}})[_0x7c26('0x28')](function(_0x42a3d4){logger[_0x7c26('0x25')](_0x7c26('0x65'),_0x42a3d4);throw _0x42a3d4;});}return _0x36b79d;})[_0x7c26('0x1e')](respondWithResult(_0x5874c2,0xc9))[_0x7c26('0x28')](handleError(_0x5874c2,null));};exports[_0x7c26('0x34')]=function(_0x460ce7,_0x82253){if(_0x460ce7[_0x7c26('0x5e')]['id']){delete _0x460ce7['body']['id'];}return db[_0x7c26('0x3f')][_0x7c26('0x5c')]({'where':{'id':_0x460ce7[_0x7c26('0x5a')]['id']},'include':[{'model':db[_0x7c26('0x5b')],'as':_0x7c26('0x3e')}]})['then'](handleEntityNotFound(_0x82253,null))[_0x7c26('0x1e')](saveUpdates(_0x460ce7[_0x7c26('0x5e')],null))['then'](respondWithResult(_0x82253,null))[_0x7c26('0x28')](handleError(_0x82253,null));};exports[_0x7c26('0x35')]=function(_0x116111,_0x2a88ca){return db['SmsAccount'][_0x7c26('0x5c')]({'where':{'id':_0x116111[_0x7c26('0x5a')]['id']}})['then'](handleEntityNotFound(_0x2a88ca,null))[_0x7c26('0x1e')](removeEntity(_0x2a88ca,null))[_0x7c26('0x28')](handleError(_0x2a88ca,null));};exports['describe']=function(_0x28f2c2,_0x274dcb){return db[_0x7c26('0x3f')]['describe']()[_0x7c26('0x1e')](respondWithResult(_0x274dcb,null))[_0x7c26('0x28')](handleError(_0x274dcb,null));};exports[_0x7c26('0x66')]=function(_0x509e1d,_0x2344f5,_0x54ba68){if(_0x509e1d[_0x7c26('0x5e')]['id']){delete _0x509e1d[_0x7c26('0x5e')]['id'];}return db['SmsAccount']['find']({'where':{'id':_0x509e1d[_0x7c26('0x5a')]['id']}})['then'](handleEntityNotFound(_0x2344f5,null))['then'](function(_0x5c013b){if(_0x5c013b){_0x509e1d[_0x7c26('0x5e')]['SmsAccountId']=_0x5c013b['id'];return db[_0x7c26('0x67')][_0x7c26('0x5d')](_0x509e1d[_0x7c26('0x5e')]);}})[_0x7c26('0x1e')](respondWithResult(_0x2344f5,null))[_0x7c26('0x28')](handleError(_0x2344f5,null));};exports[_0x7c26('0x68')]=function(_0x335368,_0x38c715,_0x1e4e8d){var _0x5389b1={'raw':![],'where':{}};var _0x367e27={};var _0x12fb81={'count':0x0,'rows':[]};return db[_0x7c26('0x3f')][_0x7c26('0x69')]({'where':{'id':_0x335368[_0x7c26('0x5a')]['id']}})['then'](handleEntityNotFound(_0x38c715,null))[_0x7c26('0x1e')](function(_0x4dff08){if(_0x4dff08){_0x367e27[_0x7c26('0x41')]=_[_0x7c26('0x42')](db['Disposition'][_0x7c26('0x40')]);_0x367e27[_0x7c26('0x43')]=_[_0x7c26('0x42')](_0x335368[_0x7c26('0x43')]);_0x367e27[_0x7c26('0x44')]=_[_0x7c26('0x45')](_0x367e27[_0x7c26('0x41')],_0x367e27[_0x7c26('0x43')]);_0x5389b1[_0x7c26('0x46')]=_[_0x7c26('0x45')](_0x367e27['model'],qs['fields'](_0x335368[_0x7c26('0x43')][_0x7c26('0x47')]));_0x5389b1[_0x7c26('0x46')]=_0x5389b1[_0x7c26('0x46')]['length']?_0x5389b1[_0x7c26('0x46')]:_0x367e27[_0x7c26('0x41')];if(!_0x335368[_0x7c26('0x43')][_0x7c26('0x49')](_0x7c26('0x4a'))){_0x5389b1['limit']=qs['limit'](_0x335368[_0x7c26('0x43')]['limit']);_0x5389b1['offset']=qs[_0x7c26('0x2d')](_0x335368[_0x7c26('0x43')][_0x7c26('0x2d')]);}_0x5389b1['order']=qs['sort'](_0x335368['query']['sort']);_0x5389b1[_0x7c26('0x4c')]=qs['filters'](_[_0x7c26('0x4d')](_0x335368[_0x7c26('0x43')],_0x367e27[_0x7c26('0x44')]));_0x5389b1[_0x7c26('0x4c')][_0x7c26('0x6a')]=_0x4dff08['id'];if(_0x335368['query']['filter']){_0x5389b1['where']=_[_0x7c26('0x54')](_0x5389b1[_0x7c26('0x4c')],{'$or':_[_0x7c26('0x4f')](_0x5389b1['attributes'],function(_0x581eed){var _0x4a62d9={};_0x4a62d9[_0x581eed]={'$like':'%'+_0x335368[_0x7c26('0x43')][_0x7c26('0x4e')]+'%'};return _0x4a62d9;})});}_0x5389b1=_[_0x7c26('0x54')]({},_0x5389b1,_0x335368['options']);return db['Disposition']['count']({'where':_0x5389b1['where']})[_0x7c26('0x1e')](function(_0x1b27a1){_0x12fb81[_0x7c26('0x2c')]=_0x1b27a1;if(_0x335368[_0x7c26('0x43')][_0x7c26('0x6b')]){_0x5389b1[_0x7c26('0x56')]=[{'all':!![]}];}return db[_0x7c26('0x67')][_0x7c26('0x57')](_0x5389b1);})[_0x7c26('0x1e')](function(_0x2e66a8){_0x12fb81['rows']=_0x2e66a8;return _0x12fb81;});}})[_0x7c26('0x1e')](respondWithFilteredResult(_0x38c715,_0x5389b1))['catch'](handleError(_0x38c715,null));};exports['removeDispositions']=function(_0x3a891f,_0x40568a,_0xed2700){return db[_0x7c26('0x3f')][_0x7c26('0x5c')]({'where':{'id':_0x3a891f[_0x7c26('0x5a')]['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x40568a,null))['then'](function(_0x2ad84e){if(_0x2ad84e){return _0x2ad84e[_0x7c26('0x6c')](_0x3a891f[_0x7c26('0x43')][_0x7c26('0x6d')]);}})[_0x7c26('0x1e')](respondWithStatusCode(_0x40568a,null))[_0x7c26('0x28')](handleError(_0x40568a,null));};exports[_0x7c26('0x6e')]=function(_0x7e99d7,_0x4f7db0,_0x21a2a3){if(_0x7e99d7[_0x7c26('0x5e')]['id']){delete _0x7e99d7['body']['id'];}return db['SmsAccount'][_0x7c26('0x5c')]({'where':{'id':_0x7e99d7[_0x7c26('0x5a')]['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x4f7db0,null))['then'](function(_0x3b2a8a){if(_0x3b2a8a){_0x7e99d7[_0x7c26('0x5e')][_0x7c26('0x6a')]=_0x3b2a8a['id'];return db['CannedAnswer'][_0x7c26('0x5d')](_0x7e99d7[_0x7c26('0x5e')]);}})[_0x7c26('0x1e')](respondWithResult(_0x4f7db0,null))[_0x7c26('0x28')](handleError(_0x4f7db0,null));};exports['getAnswers']=function(_0xccc4a,_0x268ebe,_0x17d03a){var _0x107536={'raw':![],'where':{}};var _0x20c649={};var _0x52d6d9={'count':0x0,'rows':[]};return db[_0x7c26('0x3f')]['findOne']({'where':{'id':_0xccc4a['params']['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x268ebe,null))[_0x7c26('0x1e')](function(_0x2b4f4d){if(_0x2b4f4d){_0x20c649[_0x7c26('0x41')]=_[_0x7c26('0x42')](db[_0x7c26('0x6f')]['rawAttributes']);_0x20c649['query']=_[_0x7c26('0x42')](_0xccc4a[_0x7c26('0x43')]);_0x20c649['filters']=_[_0x7c26('0x45')](_0x20c649[_0x7c26('0x41')],_0x20c649[_0x7c26('0x43')]);_0x107536[_0x7c26('0x46')]=_[_0x7c26('0x45')](_0x20c649[_0x7c26('0x41')],qs['fields'](_0xccc4a[_0x7c26('0x43')]['fields']));_0x107536['attributes']=_0x107536[_0x7c26('0x46')][_0x7c26('0x48')]?_0x107536[_0x7c26('0x46')]:_0x20c649[_0x7c26('0x41')];if(!_0xccc4a['query'][_0x7c26('0x49')](_0x7c26('0x4a'))){_0x107536[_0x7c26('0x2e')]=qs[_0x7c26('0x2e')](_0xccc4a[_0x7c26('0x43')][_0x7c26('0x2e')]);_0x107536[_0x7c26('0x2d')]=qs[_0x7c26('0x2d')](_0xccc4a[_0x7c26('0x43')][_0x7c26('0x2d')]);}_0x107536[_0x7c26('0x70')]=qs[_0x7c26('0x4b')](_0xccc4a[_0x7c26('0x43')][_0x7c26('0x4b')]);_0x107536[_0x7c26('0x4c')]=qs[_0x7c26('0x44')](_[_0x7c26('0x4d')](_0xccc4a[_0x7c26('0x43')],_0x20c649[_0x7c26('0x44')]));_0x107536[_0x7c26('0x4c')][_0x7c26('0x6a')]=_0x2b4f4d['id'];if(_0xccc4a['query'][_0x7c26('0x4e')]){_0x107536['where']=_[_0x7c26('0x54')](_0x107536[_0x7c26('0x4c')],{'$or':_['map'](_0x107536[_0x7c26('0x46')],function(_0x50c62d){var _0x41a7d0={};_0x41a7d0[_0x50c62d]={'$like':'%'+_0xccc4a['query']['filter']+'%'};return _0x41a7d0;})});}_0x107536=_[_0x7c26('0x54')]({},_0x107536,_0xccc4a[_0x7c26('0x55')]);return db[_0x7c26('0x6f')][_0x7c26('0x2c')]({'where':_0x107536[_0x7c26('0x4c')]})[_0x7c26('0x1e')](function(_0x54d5f){_0x52d6d9[_0x7c26('0x2c')]=_0x54d5f;if(_0xccc4a['query'][_0x7c26('0x6b')]){_0x107536[_0x7c26('0x56')]=[{'all':!![]}];}return db[_0x7c26('0x6f')][_0x7c26('0x57')](_0x107536);})[_0x7c26('0x1e')](function(_0x2d4c8d){_0x52d6d9[_0x7c26('0x58')]=_0x2d4c8d;return _0x52d6d9;});}})['then'](respondWithFilteredResult(_0x268ebe,_0x107536))['catch'](handleError(_0x268ebe,null));};exports['removeAnswers']=function(_0x292d86,_0x584939,_0x129261){return db[_0x7c26('0x3f')][_0x7c26('0x5c')]({'where':{'id':_0x292d86[_0x7c26('0x5a')]['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x584939,null))[_0x7c26('0x1e')](function(_0x536f4b){if(_0x536f4b){return _0x536f4b[_0x7c26('0x71')](_0x292d86[_0x7c26('0x43')][_0x7c26('0x6d')]);}})['then'](respondWithStatusCode(_0x584939,null))[_0x7c26('0x28')](handleError(_0x584939,null));};exports[_0x7c26('0x72')]=function(_0x126204,_0xe11cf5,_0x2b38b3){var _0x6c794a={'channel':_0x7c26('0x73')};var _0xa5f5b1=[];var _0x14ceaa=[];var _0x10e029={};return db[_0x7c26('0x3f')]['find']({'where':{'id':_0x126204[_0x7c26('0x5a')]['id']},'include':[{'model':db[_0x7c26('0x74')],'as':'Applications'}]})[_0x7c26('0x1e')](handleEntityNotFound(_0xe11cf5,null))[_0x7c26('0x1e')](function(_0x10dc54){_0x6c794a[_0x7c26('0x75')]=_0x10dc54;_0x6c794a[_0x7c26('0x76')]=_[_0x7c26('0x77')](_0x10dc54[_0x7c26('0x78')],[_0x7c26('0x79')],[_0x7c26('0x7a')]);if(_0x6c794a[_0x7c26('0x75')]['Applications']){delete _0x6c794a[_0x7c26('0x75')][_0x7c26('0x78')];}return db[_0x7c26('0x7b')][_0x7c26('0x7c')]();})['then'](function(_0x56a9d9){if(!_0x56a9d9){throw new db['Sequelize'][(_0x7c26('0x7d'))](_0x7c26('0x7e'));}_0xa5f5b1=_[_0x7c26('0x7f')](_[_0x7c26('0x42')](_0x56a9d9),[_0x7c26('0x80'),_0x7c26('0x81')]);_0x14ceaa=_[_0x7c26('0x7f')](_[_0x7c26('0x42')](_0x56a9d9),[_0x7c26('0x80'),_0x7c26('0x81'),'CompanyId',_0x7c26('0x82')]);_0x6c794a['body']={'mapKey':_0x7c26('0x83')};if(_0x6c794a[_0x7c26('0x75')][_0x7c26('0x50')]){switch(_0x6c794a['account']['type']){case _0x7c26('0x84'):_0x6c794a[_0x7c26('0x5e')]['from']=_0x126204[_0x7c26('0x5e')]['From'];_0x6c794a['body'][_0x7c26('0x5e')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x85')];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x86')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x87')];break;case _0x7c26('0x88'):_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x89')]='+'+_0x126204[_0x7c26('0x5e')]['sender'];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x5e')]=_0x126204['body'][_0x7c26('0x8a')];break;case _0x7c26('0x8b'):_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x89')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x89')];_0x6c794a[_0x7c26('0x5e')]['body']=_0x126204[_0x7c26('0x5e')]['message'];break;case _0x7c26('0x8c'):_0x6c794a['body']['from']=_0x126204['body'][_0x7c26('0x89')];_0x6c794a[_0x7c26('0x5e')]['body']=_0x126204[_0x7c26('0x5e')]['body'];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x86')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x8d')];break;case _0x7c26('0x8e'):_0x6c794a['body'][_0x7c26('0x89')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x8f')];_0x6c794a[_0x7c26('0x5e')]['body']=_0x126204[_0x7c26('0x5e')]['Text'];_0x6c794a[_0x7c26('0x5e')]['messageId']=_0x126204['body']['MessageUUID'];break;case _0x7c26('0x90'):_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x89')]='+'+_0x126204[_0x7c26('0x5e')]['results'][0x0][_0x7c26('0x89')];_0x6c794a[_0x7c26('0x5e')]['body']=_0x126204[_0x7c26('0x5e')][_0x7c26('0x91')][0x0][_0x7c26('0x8a')];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x86')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x91')][0x0][_0x7c26('0x86')];break;case _0x7c26('0x92'):_0x6c794a['body'][_0x7c26('0x89')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x93')];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x5e')]=_0x126204[_0x7c26('0x5e')]['segmentedMessage'][_0x7c26('0x26')];break;case'clickatell':_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x89')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x94')];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x5e')]=_0x126204[_0x7c26('0x5e')]['text'];_0x6c794a['body'][_0x7c26('0x86')]=_0x126204['body'][_0x7c26('0x95')];break;case _0x7c26('0x96'):_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x89')]=_0x126204[_0x7c26('0x5e')][_0x7c26('0x89')];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x5e')]=_0x126204['body'][_0x7c26('0x26')];_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x86')]=_0x126204['body'][_0x7c26('0x97')];break;}}if(_0x6c794a['body']['id']){delete _0x6c794a['body']['id'];}if(_[_0x7c26('0x98')](_0x6c794a['body'][_0x7c26('0x89')])){throw new db['Sequelize']['ValidationError'](_0x7c26('0x99'));}if(_[_0x7c26('0x98')](_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x5e')])||_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x5e')]===''){throw new db[(_0x7c26('0x9a'))]['ValidationError'](_0x7c26('0x9b'));}if(_[_0x7c26('0x98')](_0x6c794a['body'][_0x7c26('0x9c')])){throw new db['Sequelize'][(_0x7c26('0x7d'))](_0x7c26('0x9d')+_0x14ceaa);}if(!_[_0x7c26('0x9e')](_0x14ceaa,_0x6c794a[_0x7c26('0x5e')]['mapKey'])){throw new db[(_0x7c26('0x9a'))][(_0x7c26('0x7d'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x14ceaa);}_0x10e029[_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x9c')]]=_0x6c794a['body']['from'];return db['CmList'][_0x7c26('0x5c')]({'where':{'id':_0x6c794a[_0x7c26('0x75')][_0x7c26('0x82')]},'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x10e029,'limit':0x1,'order':[[_0x7c26('0x81'),_0x7c26('0x9f')]]}]});})['then'](handleEntityNotFound(_0xe11cf5,null))[_0x7c26('0x1e')](function(_0x40858a){if(_0x40858a){_0x6c794a[_0x7c26('0xa0')]=_['omit'](_0x40858a,[_0x7c26('0xa1')]);if(_0x40858a[_0x7c26('0xa1')][_0x7c26('0x48')]){return _0x40858a[_0x7c26('0xa1')][0x0];}var _0x1f1fbf=_[_0x7c26('0x16')](_0x6c794a[_0x7c26('0x5e')],{'firstName':_0x6c794a['body']['from'],'ListId':_0x40858a['id']});_0x1f1fbf[_0x6c794a['body']['mapKey']]=_0x6c794a['body'][_0x7c26('0x89')];return db[_0x7c26('0x7b')][_0x7c26('0x5d')](_0x1f1fbf,{'fields':_0xa5f5b1,'raw':!![]});}})[_0x7c26('0x1e')](handleEntityNotFound(_0xe11cf5,null))[_0x7c26('0x1e')](function(_0x1338de){if(_0x1338de){_0x6c794a[_0x7c26('0xa2')]=_0x1338de;var _0xd613f5={'ContactId':_0x1338de['id'],'phone':_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x89')],'SmsAccountId':_0x126204['params']['id']};var _0x2be07e={'ContactId':_0x1338de['id'],'SmsAccountId':_0x126204['params']['id'],'closed':![]};return db[_0x7c26('0xa3')]['find']({'where':_0x2be07e})[_0x7c26('0x1e')](function(_0x20c653){if(_0x20c653){return[_0x20c653,![]];}return db[_0x7c26('0xa3')][_0x7c26('0x5d')](_0xd613f5)['then'](function(_0x5c5299){return[_0x5c5299,!![]];});});}})[_0x7c26('0xa4')](function(_0x598915,_0x2276ef){_0x6c794a['interaction']=_0x598915['get']({'plain':!![]});_0x6c794a[_0x7c26('0xa5')][_0x7c26('0xa6')]=![];if(_0x2276ef){if(_0x6c794a[_0x7c26('0x75')][_0x7c26('0xa7')]){_0x6c794a['applications'][_0x7c26('0xa8')]({'id':0x0,'priority':_0x6c794a[_0x7c26('0x76')]['length']+0x1,'app':_0x7c26('0xa9'),'appdata':_0x7c26('0xaa'),'interval':_0x7c26('0xab')});}_0x6c794a['interaction']['created']=!![];}return db[_0x7c26('0xac')][_0x7c26('0x5d')]({'phone':_0x6c794a['body'][_0x7c26('0x89')],'messageId':_0x6c794a[_0x7c26('0x5e')][_0x7c26('0x86')],'body':_0x6c794a[_0x7c26('0x5e')]['body'],'SmsAccountId':_0x126204['params']['id'],'SmsInteractionId':_0x598915['id'],'direction':'in','ContactId':_0x598915[_0x7c26('0xad')],'AttachmentId':_0x6c794a[_0x7c26('0x5e')][_0x7c26('0xae')]});})['then'](function(_0x25ffb5){_0x6c794a[_0x7c26('0x26')]=_0x25ffb5;if(_0x6c794a['interaction'][_0x7c26('0xaf')]){return db[_0x7c26('0xb0')][_0x7c26('0x5c')]({'attributes':['id','name'],'where':{'id':_0x6c794a['interaction']['UserId']}})['then'](function(_0x219848){if(_0x219848){_0x6c794a[_0x7c26('0x76')][_0x7c26('0xb1')]({'id':0x0,'priority':0x0,'app':_0x7c26('0xb2'),'appdata':_0x219848[_0x7c26('0x3b')]+','+(_0x6c794a[_0x7c26('0x75')][_0x7c26('0xb3')]||0xa),'interval':_0x7c26('0xab')});}return respondWithRpcPromise(_0x7c26('0xb4'),_0x7c26('0xb5'),_0x6c794a);});}return respondWithRpcPromise(_0x7c26('0xb4'),_0x7c26('0xb5'),_0x6c794a);})[_0x7c26('0x1e')](function(_0x23b1fc){if(_0x23b1fc){var _0xdb6552=0xc8;var _0x2e4e9a=_0x7c26('0xb6');logger[_0x7c26('0x1f')](_0x7c26('0x23'),_0x2e4e9a,_0xdb6552,_0x7c26('0xb7'));logger['debug'](_0x7c26('0xb8'),_0x2e4e9a,_0xdb6552,_0x7c26('0xb7'),JSON[_0x7c26('0x24')](_0x23b1fc));if(_0x6c794a['account'][_0x7c26('0x50')]===_0x7c26('0x84')){return _0xe11cf5['status'](_0xdb6552)['set']('Content-Type',_0x7c26('0xb9'))[_0x7c26('0x3c')]('\x0a ');}else{return _0xe11cf5[_0x7c26('0x2a')](_0xdb6552)[_0x7c26('0x2b')](_0x23b1fc);}}})[_0x7c26('0x28')](handleError(_0xe11cf5,null));};exports['addApplications']=function(_0x4a023e,_0x1c84e3,_0x3f9112){return db[_0x7c26('0x3f')][_0x7c26('0x69')]({'where':{'id':_0x4a023e[_0x7c26('0x5a')]['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x1c84e3,null))['then'](function(_0xc8b40a){if(_0xc8b40a){return db['sequelize'][_0x7c26('0xba')](function(_0x292b94){return db[_0x7c26('0x74')]['destroy']({'where':{'SmsAccountId':_0x4a023e[_0x7c26('0x5a')]['id']},'transaction':_0x292b94})[_0x7c26('0x1e')](function(_0x1d4771){var _0x50fa45=_['map'](_0x4a023e['body'],function(_0x3980db){_0x3980db['SmsAccountId']=_0x4a023e['params']['id'];return _0x3980db;});return db[_0x7c26('0x74')][_0x7c26('0xbb')](_0x50fa45,{'transaction':_0x292b94});});})[_0x7c26('0x1e')](function(){return db[_0x7c26('0x74')]['findAndCountAll']({'where':{'SmsAccountId':_0x4a023e['params']['id']},'order':_0x7c26('0x79')});});}})['then'](respondWithResult(_0x1c84e3,null))['catch'](handleError(_0x1c84e3,null));};exports['getApplications']=function(_0x5be851,_0x3d4784,_0x7c6cec){var _0x4000aa={};var _0x46a8b7={};var _0x11efc8;var _0x3f222e;return db[_0x7c26('0x3f')]['findOne']({'where':{'id':_0x5be851[_0x7c26('0x5a')]['id']}})['then'](handleEntityNotFound(_0x3d4784,null))[_0x7c26('0x1e')](function(_0x2995c5){if(_0x2995c5){_0x11efc8=_0x2995c5;_0x46a8b7[_0x7c26('0x41')]=_[_0x7c26('0x42')](db[_0x7c26('0x74')][_0x7c26('0x40')]);_0x46a8b7[_0x7c26('0x43')]=_[_0x7c26('0x42')](_0x5be851[_0x7c26('0x43')]);_0x46a8b7[_0x7c26('0x44')]=_[_0x7c26('0x45')](_0x46a8b7[_0x7c26('0x41')],_0x46a8b7[_0x7c26('0x43')]);_0x4000aa['attributes']=_['intersection'](_0x46a8b7[_0x7c26('0x41')],qs[_0x7c26('0x47')](_0x5be851[_0x7c26('0x43')][_0x7c26('0x47')]));_0x4000aa[_0x7c26('0x46')]=_0x4000aa[_0x7c26('0x46')]['length']?_0x4000aa[_0x7c26('0x46')]:_0x46a8b7['model'];_0x4000aa[_0x7c26('0x70')]=qs[_0x7c26('0x4b')](_0x5be851['query'][_0x7c26('0x4b')]);_0x4000aa[_0x7c26('0x4c')]=qs[_0x7c26('0x44')](_[_0x7c26('0x4d')](_0x5be851[_0x7c26('0x43')],_0x46a8b7['filters']));if(_0x5be851[_0x7c26('0x43')][_0x7c26('0x4e')]){_0x4000aa[_0x7c26('0x4c')]=_[_0x7c26('0x54')](_0x4000aa['where'],{'$or':_[_0x7c26('0x4f')](_0x4000aa[_0x7c26('0x46')],function(_0x1a0abc){var _0x7232b9={};_0x7232b9[_0x1a0abc]={'$like':'%'+_0x5be851['query']['filter']+'%'};return _0x7232b9;})});}_0x4000aa=_[_0x7c26('0x54')]({},_0x4000aa,_0x5be851[_0x7c26('0x55')]);return _0x11efc8['getApplications'](_0x4000aa);}})[_0x7c26('0x1e')](function(_0x2342c4){if(_0x2342c4){_0x3f222e=_0x2342c4[_0x7c26('0x48')];if(!_0x5be851['query'][_0x7c26('0x49')](_0x7c26('0x4a'))){_0x4000aa[_0x7c26('0x2e')]=qs['limit'](_0x5be851['query'][_0x7c26('0x2e')]);_0x4000aa[_0x7c26('0x2d')]=qs[_0x7c26('0x2d')](_0x5be851[_0x7c26('0x43')][_0x7c26('0x2d')]);}return _0x11efc8[_0x7c26('0xbc')](_0x4000aa);}})[_0x7c26('0x1e')](function(_0x44db07){if(_0x44db07){return _0x44db07?{'count':_0x3f222e,'rows':_0x44db07}:null;}})['then'](respondWithResult(_0x3d4784,null))['catch'](handleError(_0x3d4784,null));};exports[_0x7c26('0xbd')]=function(_0x3e178d,_0x1f6eef,_0xf96cb7){var _0x342f38={'raw':![],'where':{}};var _0x46b095={};var _0x378862={'count':0x0,'rows':[]};return db[_0x7c26('0x3f')][_0x7c26('0x69')]({'where':{'id':_0x3e178d[_0x7c26('0x5a')]['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x1f6eef,null))[_0x7c26('0x1e')](function(_0x473387){if(_0x473387){_0x46b095[_0x7c26('0x41')]=_[_0x7c26('0x42')](db[_0x7c26('0xa3')]['rawAttributes']);_0x46b095[_0x7c26('0x43')]=_[_0x7c26('0x42')](_0x3e178d['query']);_0x46b095['filters']=_[_0x7c26('0x45')](_0x46b095[_0x7c26('0x41')],_0x46b095[_0x7c26('0x43')]);_0x342f38[_0x7c26('0x46')]=_[_0x7c26('0x45')](_0x46b095[_0x7c26('0x41')],qs[_0x7c26('0x47')](_0x3e178d[_0x7c26('0x43')][_0x7c26('0x47')]));_0x342f38[_0x7c26('0x46')]=_0x342f38[_0x7c26('0x46')]['length']?_0x342f38[_0x7c26('0x46')]:_0x46b095[_0x7c26('0x41')];if(!_0x3e178d[_0x7c26('0x43')][_0x7c26('0x49')](_0x7c26('0x4a'))){_0x342f38[_0x7c26('0x2e')]=qs['limit'](_0x3e178d[_0x7c26('0x43')]['limit']);_0x342f38[_0x7c26('0x2d')]=qs[_0x7c26('0x2d')](_0x3e178d[_0x7c26('0x43')]['offset']);}_0x342f38['order']=qs[_0x7c26('0x4b')](_0x3e178d[_0x7c26('0x43')][_0x7c26('0x4b')]);_0x342f38[_0x7c26('0x4c')]=qs[_0x7c26('0x44')](_[_0x7c26('0x4d')](_0x3e178d[_0x7c26('0x43')],_0x46b095['filters']));_0x342f38['where'][_0x7c26('0x6a')]=_0x473387['id'];if(_0x3e178d[_0x7c26('0x43')]['filter']){_0x342f38['where']=_[_0x7c26('0x54')](_0x342f38['where'],{'$or':_[_0x7c26('0x4f')](_0x342f38['attributes'],function(_0x4f5bd4){var _0x2072b7={};_0x2072b7[_0x4f5bd4]={'$like':'%'+_0x3e178d['query'][_0x7c26('0x4e')]+'%'};return _0x2072b7;})});}_0x342f38=_['merge']({},_0x342f38,_0x3e178d[_0x7c26('0x55')]);return db['SmsInteraction']['count']({'where':_0x342f38['where']})[_0x7c26('0x1e')](function(_0x50be8c){_0x378862[_0x7c26('0x2c')]=_0x50be8c;if(_0x3e178d[_0x7c26('0x43')][_0x7c26('0x6b')]){_0x342f38[_0x7c26('0x56')]=[{'model':db[_0x7c26('0x7b')],'as':_0x7c26('0xbe'),'required':![]},{'model':db['User'],'as':_0x7c26('0xbf'),'attributes':[_0x7c26('0x3b'),_0x7c26('0xc0'),_0x7c26('0xc1')],'required':![]},{'model':db['Tag'],'as':_0x7c26('0xc2'),'attributes':['id',_0x7c26('0x3b'),_0x7c26('0xc3')],'where':_0x3e178d['query'][_0x7c26('0xc4')]?{'id':_0x3e178d['query'][_0x7c26('0xc4')]}:undefined,'required':_0x3e178d['query'][_0x7c26('0xc4')]?!![]:![]}];}return db[_0x7c26('0xa3')][_0x7c26('0x57')](_0x342f38);})[_0x7c26('0x1e')](function(_0x5aaa7e){_0x378862['rows']=_0x5aaa7e;return _0x378862;});}})['then'](respondWithFilteredResult(_0x1f6eef,_0x342f38))[_0x7c26('0x28')](handleError(_0x1f6eef,null));};exports[_0x7c26('0x3c')]=function(_0xc14e42,_0x246102,_0x5a32d2){var _0x241e9b,_0x453104,_0x344687;if(_[_0x7c26('0x98')](_0xc14e42['body'][_0x7c26('0x5e')])||_0xc14e42[_0x7c26('0x5e')][_0x7c26('0x5e')]===''){throw new db[(_0x7c26('0x9a'))]['ValidationError'](_0x7c26('0x9b'));}if(_[_0x7c26('0x98')](_0xc14e42[_0x7c26('0x5e')]['to'])){throw new db[(_0x7c26('0x9a'))][(_0x7c26('0x7d'))](_0x7c26('0xc5'));}_0x241e9b=_0xc14e42[_0x7c26('0x5e')]['to'];return db[_0x7c26('0x3f')]['find']({'where':{'id':_0xc14e42[_0x7c26('0x5a')]['id']},'include':[{'model':db[_0x7c26('0xc6')],'as':'List','include':[{'model':db[_0x7c26('0x7b')],'as':'Contacts','where':{'mobile':_0x241e9b},'limit':0x1,'order':[[_0x7c26('0x81'),'DESC']]}]}]})['then'](handleEntityNotFound(_0x246102,null))['then'](function(_0x2f6115){if(_0x2f6115&&_0x2f6115['List']){_0x453104=_0x2f6115[_0x7c26('0x36')]({'plain':!![]});if(_0x453104[_0x7c26('0xc7')]&&_0x453104[_0x7c26('0xc7')][_0x7c26('0xa1')][_0x7c26('0x48')]){return _0x453104[_0x7c26('0xc7')][_0x7c26('0xa1')][0x0];}return db[_0x7c26('0x7b')][_0x7c26('0x5d')](_[_0x7c26('0x16')](_0xc14e42[_0x7c26('0x5e')],{'firstName':_0x241e9b,'mobile':_0x241e9b,'phone':_0x241e9b,'ListId':_0x453104[_0x7c26('0x82')]}));}})['then'](handleEntityNotFound(_0x246102,null))[_0x7c26('0x1e')](function(_0x5d18bf){if(_0x5d18bf){_0x344687=_0x5d18bf;return db['SmsInteraction'][_0x7c26('0x5c')]({'where':{'ContactId':_0x344687['id'],'closed':![],'SmsAccountId':_0x453104['id']}})['then'](function(_0x14b722){if(_0x14b722){return[_0x14b722,![]];}return db['SmsInteraction']['create']({'UserId':_0xc14e42[_0x7c26('0x5f')]['id'],'ContactId':_0x344687['id'],'SmsAccountId':_0x453104['id'],'phone':_0x241e9b,'firstMsgDirection':_0x7c26('0xc8'),'Messages':[_['merge'](_0xc14e42[_0x7c26('0x5e')],{'read':![],'body':_0xc14e42[_0x7c26('0x5e')][_0x7c26('0x5e')],'phone':_0x241e9b,'SmsAccountId':_0x453104['id'],'UserId':_0xc14e42[_0x7c26('0x5f')]['id'],'ContactId':_0x344687['id']})]},{'include':[{'model':db[_0x7c26('0xac')],'as':_0x7c26('0xc9')}]})[_0x7c26('0x1e')](function(_0x37aa74){return[_0x37aa74,!![]];});});}})[_0x7c26('0xa4')](function(_0x2bab36,_0x474bc2){if(_0x474bc2){return _0x2bab36;}return db[_0x7c26('0xac')]['create'](_['merge'](_0xc14e42['body'],{'read':![],'body':_0xc14e42[_0x7c26('0x5e')][_0x7c26('0x5e')],'phone':_0x241e9b,'SmsAccountId':_0x453104['id'],'SmsInteractionId':_0x2bab36['id'],'UserId':_0xc14e42[_0x7c26('0x5f')]['id'],'ContactId':_0x344687['id']}))['then'](function(_0x8d3206){_0x2bab36[_0x7c26('0xca')][_0x7c26('0xc9')]=[];_0x2bab36['dataValues'][_0x7c26('0xc9')][_0x7c26('0xa8')](_0x8d3206[_0x7c26('0xca')]);return _0x2bab36;});})[_0x7c26('0x1e')](respondWithResult(_0x246102,null))[_0x7c26('0x28')](handleError(_0x246102,null));};exports[_0x7c26('0x2a')]=function(_0x51dd4f,_0x31d2d6,_0x2c2ce4){if(_0x51dd4f[_0x7c26('0x5e')]['id']){delete _0x51dd4f[_0x7c26('0x5e')]['id'];}console[_0x7c26('0xcb')](_0x7c26('0xcc'),_0x51dd4f[_0x7c26('0x5e')]);var _0x516bbd,_0x5ced4b,_0x511f8a;return db[_0x7c26('0x3f')]['find']({'where':{'id':_0x51dd4f[_0x7c26('0x5a')]['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x31d2d6,null))[_0x7c26('0x1e')](function(_0x5c0f71){if(_0x5c0f71){_0x511f8a=_0x5c0f71;logger['debug'](_0x7c26('0x23'),_0x7c26('0x2a'),_0x7c26('0xcd'),_0x5c0f71[_0x7c26('0x50')],util['inspect'](_0x51dd4f[_0x7c26('0x5e')],{'showHidden':![],'depth':null}));switch(_0x5c0f71[_0x7c26('0x50')]){case'skebby':if(_0x51dd4f[_0x7c26('0x5e')]['skebby_dispatch_id']&&_0x51dd4f['body'][_0x7c26('0x2a')]){_0x5ced4b=_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x2a')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x51dd4f['body'][_0x7c26('0xce')]}});}break;case _0x7c26('0x8b'):if(_0x51dd4f[_0x7c26('0x5e')]['requestid']&&_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0xcf')]){_0x5ced4b=_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0xcf')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x51dd4f[_0x7c26('0x5e')]['requestid']}});}break;case'clicksend':if(_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x8d')]&&_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0xd0')]){_0x5ced4b=_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0xd0')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x8d')]}});}break;case _0x7c26('0x90'):var _0x4f9bc5=_0x51dd4f[_0x7c26('0x5e')]['results'][0x0];if(_0x4f9bc5[_0x7c26('0x86')]&&_0x4f9bc5['status']['groupName']===_0x7c26('0xd1')){_0x5ced4b=_0x4f9bc5['status'][_0x7c26('0xd2')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x4f9bc5[_0x7c26('0x86')]}});}break;case _0x7c26('0xd3'):if(_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x86')]&&_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x2a')]){_0x5ced4b=_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x2a')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x86')]}});}break;case _0x7c26('0x96'):if(_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0xd4')]&&_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x2a')]){_0x5ced4b=_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x2a')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x51dd4f['body'][_0x7c26('0xd4')]}});}break;}}})['then'](handleEntityNotFound(_0x31d2d6,null))[_0x7c26('0x1e')](function(_0x17b2df){if(_0x17b2df){_0x516bbd=_0x17b2df;switch(_0x511f8a[_0x7c26('0x50')]){case _0x7c26('0x88'):if(_0x5ced4b===_0x7c26('0xd1')){return _0x516bbd[_0x7c26('0x34')]({'read':!![]});}else{logger[_0x7c26('0x25')](_0x7c26('0x23'),_0x7c26('0x2a'),_0x7c26('0x88'),util[_0x7c26('0xd5')](_0x51dd4f[_0x7c26('0x5e')],{'showHidden':![],'depth':null}));}break;case _0x7c26('0x8b'):if(_0x5ced4b==='1'){return _0x516bbd[_0x7c26('0x34')]({'read':!![]});}else{logger[_0x7c26('0x25')](_0x7c26('0x23'),'status',_0x7c26('0x88'),util[_0x7c26('0xd5')](_0x51dd4f['body'],{'showHidden':![],'depth':null}));}break;case _0x7c26('0x8c'):if(!_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0xd6')]&&_0x5ced4b>=0xc8&&_0x5ced4b<=0xce){return _0x516bbd[_0x7c26('0x34')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0x7c26('0x2a'),'clicksend',util[_0x7c26('0xd5')](_0x51dd4f[_0x7c26('0x5e')],{'showHidden':![],'depth':null}));}break;case _0x7c26('0x90'):var _0x128c5d=_0x51dd4f[_0x7c26('0x5e')][_0x7c26('0x91')][0x0];if(_0x128c5d[_0x7c26('0x2a')][_0x7c26('0xd2')]==='DELIVERED'){return _0x516bbd[_0x7c26('0x34')]({'read':!![]});}else{logger[_0x7c26('0x25')](_0x7c26('0x23'),_0x7c26('0x2a'),_0x7c26('0x90'),util[_0x7c26('0xd5')](_0x51dd4f['body'],{'showHidden':![],'depth':null}));}break;case _0x7c26('0xd3'):if(_0x5ced4b==_0x7c26('0xd7')||_0x5ced4b==_0x7c26('0xd8')){return _0x516bbd[_0x7c26('0x34')]({'read':!![]});}else{logger['error'](_0x7c26('0x23'),'status',_0x7c26('0xd3'),util[_0x7c26('0xd5')](_0x51dd4f[_0x7c26('0x5e')],{'showHidden':![],'depth':null}));}break;case _0x7c26('0x96'):if(_0x5ced4b===_0x7c26('0xd9')||_0x5ced4b==='ACCEPTD'){return _0x516bbd[_0x7c26('0x34')]({'read':!![]});}else{logger[_0x7c26('0x25')](_0x7c26('0x23'),_0x7c26('0x2a'),_0x7c26('0x96'),util[_0x7c26('0xd5')](_0x51dd4f['body'],{'showHidden':![],'depth':null}));}break;}return _0x516bbd;}})['then'](respondWithResult(_0x31d2d6,null))['catch'](handleError(_0x31d2d6,null));};exports['statusGet']=function(_0x29b8ad,_0x1ac979,_0x398a77){var _0x4c3b1b,_0x1a8b1c,_0xae1c14;return db[_0x7c26('0x3f')][_0x7c26('0x5c')]({'where':{'id':_0x29b8ad[_0x7c26('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1ac979,null))['then'](function(_0x3ebfc2){if(_0x3ebfc2){_0xae1c14=_0x3ebfc2;logger['debug'](_0x7c26('0x23'),_0x7c26('0x2a'),_0x7c26('0xcd'),_0x3ebfc2['type'],util[_0x7c26('0xd5')](_0x29b8ad['query'],{'showHidden':![],'depth':null}));switch(_0x3ebfc2[_0x7c26('0x50')]){case _0x7c26('0x92'):if(_0x29b8ad[_0x7c26('0x43')][_0x7c26('0xda')]&&_0x29b8ad[_0x7c26('0x43')][_0x7c26('0xdb')]){_0x1a8b1c=_0x29b8ad['query'][_0x7c26('0xdb')];return db[_0x7c26('0xac')][_0x7c26('0x5c')]({'where':{'messageId':_0x29b8ad[_0x7c26('0x43')][_0x7c26('0xda')]}});}break;}}})[_0x7c26('0x1e')](handleEntityNotFound(_0x1ac979,null))[_0x7c26('0x1e')](function(_0x4793c3){if(_0x4793c3){_0x4c3b1b=_0x4793c3;switch(_0xae1c14[_0x7c26('0x50')]){case _0x7c26('0x92'):if(_0x1a8b1c==='2'||_0x1a8b1c==='6'){return _0x4c3b1b[_0x7c26('0x34')]({'read':!![]});}else{logger[_0x7c26('0x25')](_0x7c26('0x23'),_0x7c26('0x2a'),_0x7c26('0x92'),util[_0x7c26('0xd5')](_0x29b8ad[_0x7c26('0x43')],{'showHidden':![],'depth':null}));};break;}return _0x4c3b1b;}})[_0x7c26('0x1e')](respondWithResult(_0x1ac979,null))[_0x7c26('0x28')](handleError(_0x1ac979,null));};exports[_0x7c26('0xdc')]=function(_0x233fc2,_0x5f1758,_0x2d9cd8){return db[_0x7c26('0x3f')][_0x7c26('0x5c')]({'where':{'id':_0x233fc2['params']['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0x5f1758,null))[_0x7c26('0x1e')](function(_0x8fb02e){if(_0x8fb02e){return _0x8fb02e['addAgents'](_0x233fc2[_0x7c26('0x5e')][_0x7c26('0x6d')],_[_0x7c26('0xdd')](_0x233fc2[_0x7c26('0x5e')],[_0x7c26('0x6d'),'id'])||{})[_0x7c26('0xa4')](function(_0x106fa3){for(var _0x4958eb=0x0;_0x4958eb<_0x233fc2['body'][_0x7c26('0x6d')][_0x7c26('0x48')];_0x4958eb+=0x1){socket['emit'](_0x7c26('0xde'),{'UserId':_0x233fc2[_0x7c26('0x5e')]['ids'][_0x4958eb],'SmsAccountId':_0x233fc2[_0x7c26('0x5a')]['id']});}return _0x106fa3;});}})[_0x7c26('0x1e')](respondWithResult(_0x5f1758,null))[_0x7c26('0x28')](handleError(_0x5f1758,null));};exports[_0x7c26('0xdf')]=function(_0x35b966,_0x87b265,_0x2bf743){return db['SmsAccount'][_0x7c26('0x5c')]({'where':{'id':_0x35b966['params']['id']}})['then'](handleEntityNotFound(_0x87b265,null))[_0x7c26('0x1e')](function(_0x1641d7){if(_0x1641d7){return _0x1641d7['removeAgents'](_0x35b966[_0x7c26('0x43')][_0x7c26('0x6d')])[_0x7c26('0x1e')](function(){if(_[_0x7c26('0xe0')](_0x35b966[_0x7c26('0x43')]['ids'])){for(var _0x4d7b53=0x0;_0x4d7b53<_0x35b966[_0x7c26('0x43')]['ids']['length'];_0x4d7b53+=0x1){socket[_0x7c26('0xe1')]('userSmsAccount:remove',{'UserId':Number(_0x35b966[_0x7c26('0x43')][_0x7c26('0x6d')][_0x4d7b53]),'SmsAccountId':Number(_0x35b966['params']['id'])});}}else{socket[_0x7c26('0xe1')](_0x7c26('0xe2'),{'UserId':Number(_0x35b966[_0x7c26('0x43')]['ids']),'SmsAccountId':Number(_0x35b966[_0x7c26('0x5a')]['id'])});}});}})[_0x7c26('0x1e')](respondWithStatusCode(_0x87b265,null))['catch'](handleError(_0x87b265,null));};exports[_0x7c26('0xe3')]=function(_0x39fd98,_0xef9c99,_0x485cde){var _0x39be33={};var _0x426ddd={};var _0x4476b0;var _0x163e57;return db['SmsAccount'][_0x7c26('0x69')]({'where':{'id':_0x39fd98['params']['id']}})[_0x7c26('0x1e')](handleEntityNotFound(_0xef9c99,null))[_0x7c26('0x1e')](function(_0x4659c0){if(_0x4659c0){_0x4476b0=_0x4659c0;_0x426ddd[_0x7c26('0x41')]=_[_0x7c26('0x42')](db[_0x7c26('0xb0')][_0x7c26('0x40')]);_0x426ddd[_0x7c26('0x43')]=_[_0x7c26('0x42')](_0x39fd98[_0x7c26('0x43')]);_0x426ddd['filters']=_[_0x7c26('0x45')](_0x426ddd['model'],_0x426ddd[_0x7c26('0x43')]);_0x39be33[_0x7c26('0x46')]=_['intersection'](_0x426ddd[_0x7c26('0x41')],qs[_0x7c26('0x47')](_0x39fd98[_0x7c26('0x43')][_0x7c26('0x47')]));_0x39be33[_0x7c26('0x46')]=_0x39be33[_0x7c26('0x46')][_0x7c26('0x48')]?_0x39be33[_0x7c26('0x46')]:_0x426ddd[_0x7c26('0x41')];_0x39be33[_0x7c26('0x70')]=qs[_0x7c26('0x4b')](_0x39fd98[_0x7c26('0x43')]['sort']);_0x39be33[_0x7c26('0x4c')]=qs[_0x7c26('0x44')](_[_0x7c26('0x4d')](_0x39fd98['query'],_0x426ddd['filters']));if(_0x39fd98[_0x7c26('0x43')][_0x7c26('0x4e')]){_0x39be33['where']=_[_0x7c26('0x54')](_0x39be33[_0x7c26('0x4c')],{'$or':_[_0x7c26('0x4f')](_0x39be33[_0x7c26('0x46')],function(_0x35b605){var _0x24e8a5={};_0x24e8a5[_0x35b605]={'$like':'%'+_0x39fd98[_0x7c26('0x43')]['filter']+'%'};return _0x24e8a5;})});}_0x39be33=_['merge']({},_0x39be33,_0x39fd98[_0x7c26('0x55')]);return _0x4476b0[_0x7c26('0xe3')](_0x39be33);}})[_0x7c26('0x1e')](function(_0x4aa139){if(_0x4aa139){_0x163e57=_0x4aa139[_0x7c26('0x48')];if(!_0x39fd98[_0x7c26('0x43')]['hasOwnProperty'](_0x7c26('0x4a'))){_0x39be33[_0x7c26('0x2e')]=qs['limit'](_0x39fd98[_0x7c26('0x43')][_0x7c26('0x2e')]);_0x39be33[_0x7c26('0x2d')]=qs[_0x7c26('0x2d')](_0x39fd98[_0x7c26('0x43')][_0x7c26('0x2d')]);}return _0x4476b0[_0x7c26('0xe3')](_0x39be33);}})[_0x7c26('0x1e')](function(_0x10f55a){if(_0x10f55a){return _0x10f55a?{'count':_0x163e57,'rows':_0x10f55a}:null;}})[_0x7c26('0x1e')](respondWithResult(_0xef9c99,null))[_0x7c26('0x28')](handleError(_0xef9c99,null));};
\ No newline at end of file
+var _0x2bf1=['localhost','socket.io-emitter','redis','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','destroy','SmsAccounts','name','send','index','Pause','mandatoryDispositionPause','SmsAccount','rawAttributes','keys','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','includeAll','include','findAll','rows','catch','show','params','options','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','SmsAccountId','Disposition','getDispositions','findOne','removeDispositions','addAnswer','CannedAnswer','getAnswers','removeAnswers','ids','notify','Applications','account','applications','orderBy','priority','asc','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','mobile','from','From','Body','messageId','MessageSid','skebby','text','connectel','clicksend','message_id','plivo','Text','MessageUUID','infobip','results','segmentedMessage','clickatell','fromNumber','replyMessageId','intelepeer','refid','isNil','from\x20is\x20mandatory','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','Contacts','DESC','list','SmsInteraction','spread','interaction','autoclose','push','unmanaged','*,*,*,*','created','ContactId','UserId','User','unshift','agent','waitForTheAssignedAgent','Start','startRouting','receiveMessage','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','twilio','text/xml','addApplications','sequelize','transaction','SmsApplication','bulkCreate','findAndCountAll','getApplications','getInteractions','fullname','internal','Tag','color','tag','to\x20is\x20mandatory','List','out','SmsMessage','Messages','dataValues','log','received\x20delivery\x20report\x20from','inspect','skebby_dispatch_id','requestid','statusInt','status_code','groupName','redif','DELIVERED','DELIVERED_TO_GATEWAY','DELIVRD','statusGet','csc','message-id','state','addAgents','omit','userSmsAccount:save','removeAgents','isArray','emit','userSmsAccount:remove','getAgents','html-pdf','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','defaults'];(function(_0x48f1bf,_0x303e56){var _0x17b3ed=function(_0x14cac1){while(--_0x14cac1){_0x48f1bf['push'](_0x48f1bf['shift']());}};_0x17b3ed(++_0x303e56);}(_0x2bf1,0xcb));var _0x12bf=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0x2bf1[_0x2b10c6];return _0x3789d2;};'use strict';var pdf=require(_0x12bf('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x12bf('0x1'));var rp=require(_0x12bf('0x2'));var moment=require(_0x12bf('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x12bf('0x4'));var util=require('util');var path=require(_0x12bf('0x5'));var sox=require(_0x12bf('0x6'));var csv=require(_0x12bf('0x7'));var ejs=require(_0x12bf('0x8'));var fs=require('fs');var _=require(_0x12bf('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x12bf('0xa'));var toCsv=require(_0x12bf('0x7'));var querystring=require(_0x12bf('0xb'));var Papa=require(_0x12bf('0xc'));var Redis=require(_0x12bf('0xd'));var authService=require(_0x12bf('0xe'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x12bf('0xf'));var logger=require(_0x12bf('0x10'))('api');var utils=require('../../config/utils');var config=require(_0x12bf('0x11'));var db=require(_0x12bf('0x12'))['db'];config['redis']=_[_0x12bf('0x13')](config['redis'],{'host':_0x12bf('0x14'),'port':0x18eb});var socket=require(_0x12bf('0x15'))(new Redis(config[_0x12bf('0x16')]));require('./smsAccount.socket')['register'](socket);var jayson=require(_0x12bf('0x17'));var client=jayson[_0x12bf('0x18')][_0x12bf('0x19')]({'port':0x232c});function checkPasswordPattern(_0x4eb38c,_0x529e31,_0x2ff916){if(_0x2ff916){var _0x2b6b37=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2b6b37[_0x12bf('0x1a')](_0x529e31)){return _0x4eb38c;}else{throw new Error(_0x12bf('0x1b'));}}else{return _0x4eb38c;}}function respondWithRpcPromise(_0x47fa05,_0x99c49,_0x324a66,_0x5ef067){return new BPromise(function(_0x2a70c3,_0x5ea25f){var _0x2ec694=_0x5ef067||client;return _0x2ec694[_0x12bf('0x1c')](_0x47fa05,_0x324a66)['then'](function(_0x443135){logger[_0x12bf('0x1d')](_0x12bf('0x1e'),_0x99c49,_0x12bf('0x1f'));logger[_0x12bf('0x20')](_0x12bf('0x21'),_0x99c49,_0x12bf('0x1f'),JSON['stringify'](_0x443135));if(_0x443135[_0x12bf('0x22')]){if(_0x443135[_0x12bf('0x22')][_0x12bf('0x23')]===0x1f4){logger[_0x12bf('0x22')](_0x12bf('0x1e'),_0x99c49,_0x443135['error'][_0x12bf('0x24')]);return _0x5ea25f(_0x443135['error'][_0x12bf('0x24')]);}logger['error'](_0x12bf('0x1e'),_0x99c49,_0x443135[_0x12bf('0x22')][_0x12bf('0x24')]);return _0x2a70c3(_0x443135[_0x12bf('0x22')][_0x12bf('0x24')]);}else{logger[_0x12bf('0x1d')](_0x12bf('0x1e'),_0x99c49,_0x12bf('0x1f'));_0x2a70c3(_0x443135[_0x12bf('0x25')]['message']);}})['catch'](function(_0x2d580f){logger[_0x12bf('0x22')]('SmsAccount,\x20%s,\x20%s',_0x99c49,_0x2d580f);_0x5ea25f(_0x2d580f);});});}function respondWithStatusCode(_0x191af7,_0x546d26){_0x546d26=_0x546d26||0xcc;return function(_0x19d648){if(_0x19d648){return _0x191af7[_0x12bf('0x26')](_0x546d26);}return _0x191af7[_0x12bf('0x27')](_0x546d26)[_0x12bf('0x28')]();};}function respondWithResult(_0x3a4989,_0xe4425e){_0xe4425e=_0xe4425e||0xc8;return function(_0x4f1d03){if(_0x4f1d03){return _0x3a4989[_0x12bf('0x27')](_0xe4425e)[_0x12bf('0x29')](_0x4f1d03);}};}function respondWithFilteredResult(_0x1127c8,_0x5c3d01){return function(_0x3421d0){if(_0x3421d0){var _0x1a9dfd=_0x3421d0[_0x12bf('0x2a')],_0x563e8d=_0x5c3d01[_0x12bf('0x2b')],_0x43de2a=_0x5c3d01[_0x12bf('0x2b')]+_0x5c3d01[_0x12bf('0x2c')],_0x3c4a07;if(_0x43de2a>=_0x1a9dfd){_0x43de2a=_0x1a9dfd;_0x3c4a07=0xc8;}else{_0x3c4a07=0xce;}_0x1127c8[_0x12bf('0x27')](_0x3c4a07);return _0x1127c8[_0x12bf('0x2d')](_0x12bf('0x2e'),_0x563e8d+'-'+_0x43de2a+'/'+_0x1a9dfd)[_0x12bf('0x29')](_0x3421d0);}return null;};}function patchUpdates(_0x3bebb6){return function(_0x53064c){try{jsonpatch['apply'](_0x53064c,_0x3bebb6,!![]);}catch(_0x4055dc){return BPromise[_0x12bf('0x2f')](_0x4055dc);}return _0x53064c[_0x12bf('0x30')]();};}function saveUpdates(_0x3ec027,_0x1e6b23){return function(_0xeebcae){if(_0xeebcae){return _0xeebcae[_0x12bf('0x31')](_0x3ec027)[_0x12bf('0x32')](function(_0x387a58){return _0x387a58;});}return null;};}function removeEntity(_0x377938,_0x2ad717){return function(_0xb713b0){if(_0xb713b0){return _0xb713b0[_0x12bf('0x33')]()[_0x12bf('0x32')](function(){var _0x5edd5c=_0xb713b0['get']({'plain':!![]});var _0x382552=_0x12bf('0x34');return db['UserProfileResource'][_0x12bf('0x33')]({'where':{'type':_0x382552,'resourceId':_0x5edd5c['id']}})[_0x12bf('0x32')](function(){return _0xb713b0;});})[_0x12bf('0x32')](function(){_0x377938[_0x12bf('0x27')](0xcc)[_0x12bf('0x28')]();});}};}function handleEntityNotFound(_0x16f35d,_0x5a190a){return function(_0xaac509){if(!_0xaac509){_0x16f35d[_0x12bf('0x26')](0x194);}return _0xaac509;};}function handleError(_0x39bf49,_0x2372f2){_0x2372f2=_0x2372f2||0x1f4;return function(_0x5a45b9){logger['error'](_0x5a45b9['stack']);if(_0x5a45b9['name']){delete _0x5a45b9[_0x12bf('0x35')];}_0x39bf49[_0x12bf('0x27')](_0x2372f2)[_0x12bf('0x36')](_0x5a45b9);};}exports[_0x12bf('0x37')]=function(_0xe76631,_0x24ac90){var _0x50474e={'include':[{'model':db[_0x12bf('0x38')],'as':_0x12bf('0x39')}]},_0x309d2e={},_0x9fb45e={'count':0x0,'rows':[]};var _0x19f052=db[_0x12bf('0x3a')][_0x12bf('0x3b')];_0x309d2e['model']=_[_0x12bf('0x3c')](_0x19f052);_0x309d2e[_0x12bf('0x3d')]=_[_0x12bf('0x3c')](_0xe76631[_0x12bf('0x3d')]);_0x309d2e[_0x12bf('0x3e')]=_[_0x12bf('0x3f')](_0x309d2e['model'],_0x309d2e['query']);_0x50474e[_0x12bf('0x40')]=_['intersection'](_0x309d2e[_0x12bf('0x41')],qs[_0x12bf('0x42')](_0xe76631['query']['fields']));_0x50474e[_0x12bf('0x40')]=_0x50474e['attributes'][_0x12bf('0x43')]?_0x50474e[_0x12bf('0x40')]:_0x309d2e['model'];if(!_0xe76631[_0x12bf('0x3d')][_0x12bf('0x44')](_0x12bf('0x45'))){_0x50474e[_0x12bf('0x2c')]=qs['limit'](_0xe76631['query'][_0x12bf('0x2c')]);_0x50474e['offset']=qs['offset'](_0xe76631[_0x12bf('0x3d')]['offset']);}_0x50474e[_0x12bf('0x46')]=qs[_0x12bf('0x47')](_0xe76631['query'][_0x12bf('0x47')]);_0x50474e[_0x12bf('0x48')]=qs['filters'](_[_0x12bf('0x49')](_0xe76631[_0x12bf('0x3d')],_0x309d2e[_0x12bf('0x3e')]));if(_0xe76631[_0x12bf('0x3d')][_0x12bf('0x4a')]){_0x50474e[_0x12bf('0x48')]=_[_0x12bf('0x4b')](_0x50474e[_0x12bf('0x48')],{'$or':_[_0x12bf('0x4c')](_0x19f052,function(_0x237ab2){if(_0x237ab2[_0x12bf('0x4d')][_0x12bf('0x4e')]!==_0x12bf('0x4f')){var _0x2f535b={};_0x2f535b[_0x237ab2[_0x12bf('0x50')]]={'$like':'%'+_0xe76631[_0x12bf('0x3d')][_0x12bf('0x4a')]+'%'};return _0x2f535b;}})});}_0x50474e=_[_0x12bf('0x4b')]({},_0x50474e,_0xe76631['options']);var _0x522939={'where':_0x50474e[_0x12bf('0x48')]};return db[_0x12bf('0x3a')][_0x12bf('0x2a')](_0x522939)['then'](function(_0x378527){_0x9fb45e[_0x12bf('0x2a')]=_0x378527;if(_0xe76631[_0x12bf('0x3d')][_0x12bf('0x51')]){_0x50474e[_0x12bf('0x52')]=[{'all':!![]}];}return db[_0x12bf('0x3a')][_0x12bf('0x53')](_0x50474e);})['then'](function(_0x258190){_0x9fb45e[_0x12bf('0x54')]=_0x258190;return _0x9fb45e;})['then'](respondWithFilteredResult(_0x24ac90,_0x50474e))[_0x12bf('0x55')](handleError(_0x24ac90,null));};exports[_0x12bf('0x56')]=function(_0x18a208,_0x442ce8){var _0x2fd58d={'raw':![],'where':{'id':_0x18a208[_0x12bf('0x57')]['id']},'include':[{'model':db[_0x12bf('0x38')],'as':_0x12bf('0x39')}]},_0x4126d2={};_0x4126d2[_0x12bf('0x41')]=_[_0x12bf('0x3c')](db[_0x12bf('0x3a')]['rawAttributes']);_0x4126d2['query']=_[_0x12bf('0x3c')](_0x18a208[_0x12bf('0x3d')]);_0x4126d2['filters']=_[_0x12bf('0x3f')](_0x4126d2[_0x12bf('0x41')],_0x4126d2[_0x12bf('0x3d')]);_0x2fd58d[_0x12bf('0x40')]=_[_0x12bf('0x3f')](_0x4126d2[_0x12bf('0x41')],qs[_0x12bf('0x42')](_0x18a208[_0x12bf('0x3d')]['fields']));_0x2fd58d[_0x12bf('0x40')]=_0x2fd58d[_0x12bf('0x40')]['length']?_0x2fd58d[_0x12bf('0x40')]:_0x4126d2[_0x12bf('0x41')];if(_0x18a208['query'][_0x12bf('0x51')]){_0x2fd58d[_0x12bf('0x52')]=[{'all':!![]}];}_0x2fd58d=_[_0x12bf('0x4b')]({},_0x2fd58d,_0x18a208[_0x12bf('0x58')]);return db[_0x12bf('0x3a')][_0x12bf('0x59')](_0x2fd58d)[_0x12bf('0x32')](handleEntityNotFound(_0x442ce8,null))['then'](respondWithResult(_0x442ce8,null))[_0x12bf('0x55')](handleError(_0x442ce8,null));};exports[_0x12bf('0x5a')]=function(_0x50c04b,_0x312e0e){return db['SmsAccount'][_0x12bf('0x5a')](_0x50c04b['body'],{})[_0x12bf('0x32')](function(_0x45d28b){var _0x2fb6c8=_0x50c04b[_0x12bf('0x5b')][_0x12bf('0x5c')]({'plain':!![]});if(!_0x2fb6c8)throw new Error(_0x12bf('0x5d'));if(_0x2fb6c8[_0x12bf('0x5e')]===_0x12bf('0x5b')){var _0x58335b=_0x45d28b[_0x12bf('0x5c')]({'plain':!![]});var _0x3256c4='SmsAccounts';return db[_0x12bf('0x5f')][_0x12bf('0x59')]({'where':{'name':_0x3256c4,'userProfileId':_0x2fb6c8[_0x12bf('0x60')]},'raw':!![]})[_0x12bf('0x32')](function(_0x108598){if(_0x108598&&_0x108598['autoAssociation']===0x0){return db['UserProfileResource'][_0x12bf('0x5a')]({'name':_0x58335b['name'],'resourceId':_0x58335b['id'],'type':_0x108598[_0x12bf('0x35')],'sectionId':_0x108598['id']},{})[_0x12bf('0x32')](function(){return _0x45d28b;});}else{return _0x45d28b;}})[_0x12bf('0x55')](function(_0x1f081a){logger[_0x12bf('0x22')](_0x12bf('0x61'),_0x1f081a);throw _0x1f081a;});}return _0x45d28b;})[_0x12bf('0x32')](respondWithResult(_0x312e0e,0xc9))[_0x12bf('0x55')](handleError(_0x312e0e,null));};exports['update']=function(_0x2c9da5,_0x2a7954){if(_0x2c9da5['body']['id']){delete _0x2c9da5[_0x12bf('0x62')]['id'];}return db[_0x12bf('0x3a')][_0x12bf('0x59')]({'where':{'id':_0x2c9da5[_0x12bf('0x57')]['id']},'include':[{'model':db[_0x12bf('0x38')],'as':_0x12bf('0x39')}]})[_0x12bf('0x32')](handleEntityNotFound(_0x2a7954,null))[_0x12bf('0x32')](saveUpdates(_0x2c9da5[_0x12bf('0x62')],null))[_0x12bf('0x32')](respondWithResult(_0x2a7954,null))[_0x12bf('0x55')](handleError(_0x2a7954,null));};exports[_0x12bf('0x33')]=function(_0x33efbb,_0x10df76){return db[_0x12bf('0x3a')][_0x12bf('0x59')]({'where':{'id':_0x33efbb[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x10df76,null))[_0x12bf('0x32')](removeEntity(_0x10df76,null))['catch'](handleError(_0x10df76,null));};exports[_0x12bf('0x63')]=function(_0x3fb42f,_0x56a0b4){return db[_0x12bf('0x3a')][_0x12bf('0x63')]()[_0x12bf('0x32')](respondWithResult(_0x56a0b4,null))['catch'](handleError(_0x56a0b4,null));};exports[_0x12bf('0x64')]=function(_0x501305,_0x482645,_0x1ebcbe){if(_0x501305['body']['id']){delete _0x501305[_0x12bf('0x62')]['id'];}return db[_0x12bf('0x3a')][_0x12bf('0x59')]({'where':{'id':_0x501305[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x482645,null))['then'](function(_0x387b57){if(_0x387b57){_0x501305[_0x12bf('0x62')][_0x12bf('0x65')]=_0x387b57['id'];return db[_0x12bf('0x66')][_0x12bf('0x5a')](_0x501305['body']);}})[_0x12bf('0x32')](respondWithResult(_0x482645,null))[_0x12bf('0x55')](handleError(_0x482645,null));};exports[_0x12bf('0x67')]=function(_0xf25c4e,_0x208f66,_0x351d57){var _0x5a8a27={'raw':![],'where':{}};var _0x5b1f07={};var _0x6fa567={'count':0x0,'rows':[]};return db[_0x12bf('0x3a')][_0x12bf('0x68')]({'where':{'id':_0xf25c4e[_0x12bf('0x57')]['id']}})['then'](handleEntityNotFound(_0x208f66,null))[_0x12bf('0x32')](function(_0x537b13){if(_0x537b13){_0x5b1f07[_0x12bf('0x41')]=_[_0x12bf('0x3c')](db[_0x12bf('0x66')][_0x12bf('0x3b')]);_0x5b1f07[_0x12bf('0x3d')]=_['keys'](_0xf25c4e['query']);_0x5b1f07['filters']=_[_0x12bf('0x3f')](_0x5b1f07[_0x12bf('0x41')],_0x5b1f07[_0x12bf('0x3d')]);_0x5a8a27['attributes']=_[_0x12bf('0x3f')](_0x5b1f07['model'],qs[_0x12bf('0x42')](_0xf25c4e['query'][_0x12bf('0x42')]));_0x5a8a27[_0x12bf('0x40')]=_0x5a8a27['attributes'][_0x12bf('0x43')]?_0x5a8a27['attributes']:_0x5b1f07[_0x12bf('0x41')];if(!_0xf25c4e[_0x12bf('0x3d')]['hasOwnProperty'](_0x12bf('0x45'))){_0x5a8a27[_0x12bf('0x2c')]=qs[_0x12bf('0x2c')](_0xf25c4e[_0x12bf('0x3d')][_0x12bf('0x2c')]);_0x5a8a27[_0x12bf('0x2b')]=qs[_0x12bf('0x2b')](_0xf25c4e['query'][_0x12bf('0x2b')]);}_0x5a8a27[_0x12bf('0x46')]=qs[_0x12bf('0x47')](_0xf25c4e['query'][_0x12bf('0x47')]);_0x5a8a27[_0x12bf('0x48')]=qs[_0x12bf('0x3e')](_[_0x12bf('0x49')](_0xf25c4e['query'],_0x5b1f07['filters']));_0x5a8a27['where'][_0x12bf('0x65')]=_0x537b13['id'];if(_0xf25c4e[_0x12bf('0x3d')]['filter']){_0x5a8a27['where']=_[_0x12bf('0x4b')](_0x5a8a27[_0x12bf('0x48')],{'$or':_[_0x12bf('0x4c')](_0x5a8a27['attributes'],function(_0x2250b2){var _0x4dbda4={};_0x4dbda4[_0x2250b2]={'$like':'%'+_0xf25c4e['query'][_0x12bf('0x4a')]+'%'};return _0x4dbda4;})});}_0x5a8a27=_[_0x12bf('0x4b')]({},_0x5a8a27,_0xf25c4e[_0x12bf('0x58')]);return db['Disposition']['count']({'where':_0x5a8a27[_0x12bf('0x48')]})[_0x12bf('0x32')](function(_0x14a48f){_0x6fa567['count']=_0x14a48f;if(_0xf25c4e[_0x12bf('0x3d')][_0x12bf('0x51')]){_0x5a8a27[_0x12bf('0x52')]=[{'all':!![]}];}return db['Disposition'][_0x12bf('0x53')](_0x5a8a27);})['then'](function(_0x2ade5a){_0x6fa567[_0x12bf('0x54')]=_0x2ade5a;return _0x6fa567;});}})['then'](respondWithFilteredResult(_0x208f66,_0x5a8a27))[_0x12bf('0x55')](handleError(_0x208f66,null));};exports['removeDispositions']=function(_0x960d8b,_0x5e8efb,_0x1a92a1){return db[_0x12bf('0x3a')]['find']({'where':{'id':_0x960d8b[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x5e8efb,null))[_0x12bf('0x32')](function(_0xc0fbba){if(_0xc0fbba){return _0xc0fbba[_0x12bf('0x69')](_0x960d8b['query']['ids']);}})[_0x12bf('0x32')](respondWithStatusCode(_0x5e8efb,null))['catch'](handleError(_0x5e8efb,null));};exports[_0x12bf('0x6a')]=function(_0x676973,_0x41ff18,_0x2ed5f2){if(_0x676973['body']['id']){delete _0x676973['body']['id'];}return db[_0x12bf('0x3a')]['find']({'where':{'id':_0x676973[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x41ff18,null))[_0x12bf('0x32')](function(_0x1a5567){if(_0x1a5567){_0x676973[_0x12bf('0x62')]['SmsAccountId']=_0x1a5567['id'];return db[_0x12bf('0x6b')]['create'](_0x676973[_0x12bf('0x62')]);}})[_0x12bf('0x32')](respondWithResult(_0x41ff18,null))[_0x12bf('0x55')](handleError(_0x41ff18,null));};exports[_0x12bf('0x6c')]=function(_0x5e1160,_0x1a4113,_0x1bd3ef){var _0x1c4271={'raw':![],'where':{}};var _0x4f909f={};var _0x1df757={'count':0x0,'rows':[]};return db[_0x12bf('0x3a')][_0x12bf('0x68')]({'where':{'id':_0x5e1160[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x1a4113,null))[_0x12bf('0x32')](function(_0x44d000){if(_0x44d000){_0x4f909f[_0x12bf('0x41')]=_['keys'](db[_0x12bf('0x6b')][_0x12bf('0x3b')]);_0x4f909f[_0x12bf('0x3d')]=_[_0x12bf('0x3c')](_0x5e1160[_0x12bf('0x3d')]);_0x4f909f[_0x12bf('0x3e')]=_['intersection'](_0x4f909f['model'],_0x4f909f[_0x12bf('0x3d')]);_0x1c4271['attributes']=_[_0x12bf('0x3f')](_0x4f909f['model'],qs[_0x12bf('0x42')](_0x5e1160[_0x12bf('0x3d')]['fields']));_0x1c4271[_0x12bf('0x40')]=_0x1c4271['attributes'][_0x12bf('0x43')]?_0x1c4271[_0x12bf('0x40')]:_0x4f909f[_0x12bf('0x41')];if(!_0x5e1160[_0x12bf('0x3d')]['hasOwnProperty']('nolimit')){_0x1c4271['limit']=qs['limit'](_0x5e1160['query'][_0x12bf('0x2c')]);_0x1c4271[_0x12bf('0x2b')]=qs[_0x12bf('0x2b')](_0x5e1160[_0x12bf('0x3d')]['offset']);}_0x1c4271[_0x12bf('0x46')]=qs[_0x12bf('0x47')](_0x5e1160[_0x12bf('0x3d')][_0x12bf('0x47')]);_0x1c4271['where']=qs[_0x12bf('0x3e')](_[_0x12bf('0x49')](_0x5e1160[_0x12bf('0x3d')],_0x4f909f[_0x12bf('0x3e')]));_0x1c4271[_0x12bf('0x48')][_0x12bf('0x65')]=_0x44d000['id'];if(_0x5e1160[_0x12bf('0x3d')][_0x12bf('0x4a')]){_0x1c4271[_0x12bf('0x48')]=_[_0x12bf('0x4b')](_0x1c4271[_0x12bf('0x48')],{'$or':_['map'](_0x1c4271[_0x12bf('0x40')],function(_0xa02295){var _0x2c177e={};_0x2c177e[_0xa02295]={'$like':'%'+_0x5e1160[_0x12bf('0x3d')][_0x12bf('0x4a')]+'%'};return _0x2c177e;})});}_0x1c4271=_['merge']({},_0x1c4271,_0x5e1160[_0x12bf('0x58')]);return db[_0x12bf('0x6b')][_0x12bf('0x2a')]({'where':_0x1c4271[_0x12bf('0x48')]})[_0x12bf('0x32')](function(_0x589750){_0x1df757['count']=_0x589750;if(_0x5e1160[_0x12bf('0x3d')][_0x12bf('0x51')]){_0x1c4271[_0x12bf('0x52')]=[{'all':!![]}];}return db[_0x12bf('0x6b')][_0x12bf('0x53')](_0x1c4271);})[_0x12bf('0x32')](function(_0x4ce372){_0x1df757[_0x12bf('0x54')]=_0x4ce372;return _0x1df757;});}})['then'](respondWithFilteredResult(_0x1a4113,_0x1c4271))[_0x12bf('0x55')](handleError(_0x1a4113,null));};exports[_0x12bf('0x6d')]=function(_0x23e44c,_0x516b74,_0x48964e){return db[_0x12bf('0x3a')][_0x12bf('0x59')]({'where':{'id':_0x23e44c['params']['id']}})['then'](handleEntityNotFound(_0x516b74,null))[_0x12bf('0x32')](function(_0x2befd5){if(_0x2befd5){return _0x2befd5[_0x12bf('0x6d')](_0x23e44c[_0x12bf('0x3d')][_0x12bf('0x6e')]);}})['then'](respondWithStatusCode(_0x516b74,null))[_0x12bf('0x55')](handleError(_0x516b74,null));};exports[_0x12bf('0x6f')]=function(_0x139e29,_0x24d249,_0x939007){var _0x5874e2={'channel':'sms'};var _0x3e010e=[];var _0x3dcdf1=[];var _0xd3560b={};return db['SmsAccount'][_0x12bf('0x59')]({'where':{'id':_0x139e29[_0x12bf('0x57')]['id']},'include':[{'model':db['SmsApplication'],'as':_0x12bf('0x70')}]})[_0x12bf('0x32')](handleEntityNotFound(_0x24d249,null))[_0x12bf('0x32')](function(_0x51e766){_0x5874e2[_0x12bf('0x71')]=_0x51e766;_0x5874e2[_0x12bf('0x72')]=_[_0x12bf('0x73')](_0x51e766[_0x12bf('0x70')],[_0x12bf('0x74')],[_0x12bf('0x75')]);if(_0x5874e2[_0x12bf('0x71')][_0x12bf('0x70')]){delete _0x5874e2['account'][_0x12bf('0x70')];}return db[_0x12bf('0x76')][_0x12bf('0x63')]();})[_0x12bf('0x32')](function(_0x21f4ee){if(!_0x21f4ee){throw new db[(_0x12bf('0x77'))][(_0x12bf('0x78'))](_0x12bf('0x79'));}_0x3e010e=_[_0x12bf('0x7a')](_[_0x12bf('0x3c')](_0x21f4ee),[_0x12bf('0x7b'),_0x12bf('0x7c')]);_0x3dcdf1=_[_0x12bf('0x7a')](_[_0x12bf('0x3c')](_0x21f4ee),[_0x12bf('0x7b'),_0x12bf('0x7c'),_0x12bf('0x7d'),_0x12bf('0x7e')]);_0x5874e2[_0x12bf('0x62')]={'mapKey':_0x12bf('0x7f')};if(_0x5874e2[_0x12bf('0x71')][_0x12bf('0x4d')]){switch(_0x5874e2[_0x12bf('0x71')][_0x12bf('0x4d')]){case'twilio':_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x81')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]=_0x139e29['body'][_0x12bf('0x82')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x83')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x84')];break;case _0x12bf('0x85'):_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')]='+'+_0x139e29[_0x12bf('0x62')]['sender'];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x86')];break;case _0x12bf('0x87'):_0x5874e2['body']['from']=_0x139e29['body'][_0x12bf('0x80')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x24')];break;case _0x12bf('0x88'):_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x80')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x62')];_0x5874e2['body'][_0x12bf('0x83')]=_0x139e29['body'][_0x12bf('0x89')];break;case _0x12bf('0x8a'):_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')]=_0x139e29[_0x12bf('0x62')]['From'];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x8b')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x83')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x8c')];break;case _0x12bf('0x8d'):_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')]='+'+_0x139e29['body'][_0x12bf('0x8e')][0x0]['from'];_0x5874e2['body'][_0x12bf('0x62')]=_0x139e29['body'][_0x12bf('0x8e')][0x0]['text'];_0x5874e2['body'][_0x12bf('0x83')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x8e')][0x0][_0x12bf('0x83')];break;case'csc':_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')]=_0x139e29[_0x12bf('0x62')]['originatingAddress'];_0x5874e2[_0x12bf('0x62')]['body']=_0x139e29[_0x12bf('0x62')][_0x12bf('0x8f')][_0x12bf('0x24')];break;case _0x12bf('0x90'):_0x5874e2[_0x12bf('0x62')]['from']=_0x139e29[_0x12bf('0x62')][_0x12bf('0x91')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x86')];_0x5874e2[_0x12bf('0x62')][_0x12bf('0x83')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x92')];break;case _0x12bf('0x93'):_0x5874e2['body'][_0x12bf('0x80')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x80')];_0x5874e2[_0x12bf('0x62')]['body']=_0x139e29['body'][_0x12bf('0x24')];_0x5874e2['body'][_0x12bf('0x83')]=_0x139e29[_0x12bf('0x62')][_0x12bf('0x94')];break;}}if(_0x5874e2[_0x12bf('0x62')]['id']){delete _0x5874e2['body']['id'];}if(_[_0x12bf('0x95')](_0x5874e2[_0x12bf('0x62')]['from'])){throw new db[(_0x12bf('0x77'))][(_0x12bf('0x78'))](_0x12bf('0x96'));}if(_[_0x12bf('0x95')](_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')])||_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')]===''){throw new db[(_0x12bf('0x77'))][(_0x12bf('0x78'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x12bf('0x95')](_0x5874e2[_0x12bf('0x62')][_0x12bf('0x97')])){throw new db[(_0x12bf('0x77'))][(_0x12bf('0x78'))](_0x12bf('0x98')+_0x3dcdf1);}if(!_[_0x12bf('0x99')](_0x3dcdf1,_0x5874e2[_0x12bf('0x62')][_0x12bf('0x97')])){throw new db[(_0x12bf('0x77'))][(_0x12bf('0x78'))](_0x12bf('0x9a')+_0x3dcdf1);}_0xd3560b[_0x5874e2[_0x12bf('0x62')]['mapKey']]=_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')];return db['CmList'][_0x12bf('0x59')]({'where':{'id':_0x5874e2['account'][_0x12bf('0x7e')]},'include':[{'model':db[_0x12bf('0x76')],'as':_0x12bf('0x9b'),'where':_0xd3560b,'limit':0x1,'order':[[_0x12bf('0x7c'),_0x12bf('0x9c')]]}]});})[_0x12bf('0x32')](handleEntityNotFound(_0x24d249,null))[_0x12bf('0x32')](function(_0x3b9688){if(_0x3b9688){_0x5874e2[_0x12bf('0x9d')]=_['omit'](_0x3b9688,[_0x12bf('0x9b')]);if(_0x3b9688[_0x12bf('0x9b')][_0x12bf('0x43')]){return _0x3b9688[_0x12bf('0x9b')][0x0];}var _0x58ea93=_[_0x12bf('0x13')](_0x5874e2['body'],{'firstName':_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')],'ListId':_0x3b9688['id']});_0x58ea93[_0x5874e2[_0x12bf('0x62')][_0x12bf('0x97')]]=_0x5874e2[_0x12bf('0x62')]['from'];return db[_0x12bf('0x76')][_0x12bf('0x5a')](_0x58ea93,{'fields':_0x3e010e,'raw':!![]});}})[_0x12bf('0x32')](handleEntityNotFound(_0x24d249,null))[_0x12bf('0x32')](function(_0x8e6b34){if(_0x8e6b34){_0x5874e2['contact']=_0x8e6b34;var _0x5e01d2={'ContactId':_0x8e6b34['id'],'phone':_0x5874e2['body'][_0x12bf('0x80')],'SmsAccountId':_0x139e29[_0x12bf('0x57')]['id']};var _0x39a86a={'ContactId':_0x8e6b34['id'],'SmsAccountId':_0x139e29['params']['id'],'closed':![]};return db[_0x12bf('0x9e')][_0x12bf('0x59')]({'where':_0x39a86a})['then'](function(_0xfaaf2b){if(_0xfaaf2b){return[_0xfaaf2b,![]];}return db[_0x12bf('0x9e')][_0x12bf('0x5a')](_0x5e01d2)[_0x12bf('0x32')](function(_0x3ab947){return[_0x3ab947,!![]];});});}})[_0x12bf('0x9f')](function(_0x57edf9,_0x18e16a){_0x5874e2[_0x12bf('0xa0')]=_0x57edf9[_0x12bf('0x5c')]({'plain':!![]});_0x5874e2[_0x12bf('0xa0')]['created']=![];if(_0x18e16a){if(_0x5874e2[_0x12bf('0x71')][_0x12bf('0xa1')]){_0x5874e2[_0x12bf('0x72')][_0x12bf('0xa2')]({'id':0x0,'priority':_0x5874e2[_0x12bf('0x72')][_0x12bf('0x43')]+0x1,'app':'close','appdata':_0x12bf('0xa3'),'interval':_0x12bf('0xa4')});}_0x5874e2[_0x12bf('0xa0')][_0x12bf('0xa5')]=!![];}return db['SmsMessage'][_0x12bf('0x5a')]({'phone':_0x5874e2[_0x12bf('0x62')][_0x12bf('0x80')],'messageId':_0x5874e2[_0x12bf('0x62')][_0x12bf('0x83')],'body':_0x5874e2[_0x12bf('0x62')][_0x12bf('0x62')],'SmsAccountId':_0x139e29['params']['id'],'SmsInteractionId':_0x57edf9['id'],'direction':'in','ContactId':_0x57edf9[_0x12bf('0xa6')],'AttachmentId':_0x5874e2[_0x12bf('0x62')]['AttachmentId']});})[_0x12bf('0x32')](function(_0x300b5f){_0x5874e2[_0x12bf('0x24')]=_0x300b5f;if(_0x5874e2[_0x12bf('0xa0')][_0x12bf('0xa7')]){return db[_0x12bf('0xa8')]['find']({'attributes':['id',_0x12bf('0x35')],'where':{'id':_0x5874e2[_0x12bf('0xa0')]['UserId']}})['then'](function(_0x999cb3){if(_0x999cb3){_0x5874e2[_0x12bf('0x72')][_0x12bf('0xa9')]({'id':0x0,'priority':0x0,'app':_0x12bf('0xaa'),'appdata':_0x999cb3[_0x12bf('0x35')]+','+(_0x5874e2[_0x12bf('0x71')][_0x12bf('0xab')]||0xa),'interval':_0x12bf('0xa4')});}return respondWithRpcPromise(_0x12bf('0xac'),_0x12bf('0xad'),_0x5874e2);});}return respondWithRpcPromise(_0x12bf('0xac'),_0x12bf('0xad'),_0x5874e2);})['then'](function(_0x51ef87){if(_0x51ef87){var _0x3cd88c=0xc8;var _0x28b99f=_0x12bf('0xae');logger[_0x12bf('0x1d')](_0x12bf('0x21'),_0x28b99f,_0x3cd88c,_0x12bf('0xaf'));logger[_0x12bf('0x20')](_0x12bf('0xb0'),_0x28b99f,_0x3cd88c,_0x12bf('0xaf'),JSON[_0x12bf('0xb1')](_0x51ef87));if(_0x5874e2[_0x12bf('0x71')][_0x12bf('0x4d')]===_0x12bf('0xb2')){return _0x24d249[_0x12bf('0x27')](_0x3cd88c)['set']('Content-Type',_0x12bf('0xb3'))[_0x12bf('0x36')]('\x0a ');}else{return _0x24d249[_0x12bf('0x27')](_0x3cd88c)[_0x12bf('0x29')](_0x51ef87);}}})[_0x12bf('0x55')](handleError(_0x24d249,null));};exports[_0x12bf('0xb4')]=function(_0x44a219,_0x238ccd,_0x5e9b3b){return db[_0x12bf('0x3a')][_0x12bf('0x68')]({'where':{'id':_0x44a219[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x238ccd,null))['then'](function(_0x311c45){if(_0x311c45){return db[_0x12bf('0xb5')][_0x12bf('0xb6')](function(_0x2f4544){return db[_0x12bf('0xb7')]['destroy']({'where':{'SmsAccountId':_0x44a219['params']['id']},'transaction':_0x2f4544})['then'](function(_0x316148){var _0x146b13=_[_0x12bf('0x4c')](_0x44a219[_0x12bf('0x62')],function(_0x1fc1d0){_0x1fc1d0[_0x12bf('0x65')]=_0x44a219['params']['id'];return _0x1fc1d0;});return db[_0x12bf('0xb7')][_0x12bf('0xb8')](_0x146b13,{'transaction':_0x2f4544});});})['then'](function(){return db[_0x12bf('0xb7')][_0x12bf('0xb9')]({'where':{'SmsAccountId':_0x44a219[_0x12bf('0x57')]['id']},'order':_0x12bf('0x74')});});}})[_0x12bf('0x32')](respondWithResult(_0x238ccd,null))[_0x12bf('0x55')](handleError(_0x238ccd,null));};exports['getApplications']=function(_0x393290,_0x416ffb,_0x550dc7){var _0x34bea8={};var _0x2f0bb6={};var _0x4474d7;var _0x4cc453;return db[_0x12bf('0x3a')][_0x12bf('0x68')]({'where':{'id':_0x393290[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x416ffb,null))[_0x12bf('0x32')](function(_0x666202){if(_0x666202){_0x4474d7=_0x666202;_0x2f0bb6['model']=_['keys'](db[_0x12bf('0xb7')][_0x12bf('0x3b')]);_0x2f0bb6[_0x12bf('0x3d')]=_[_0x12bf('0x3c')](_0x393290['query']);_0x2f0bb6['filters']=_[_0x12bf('0x3f')](_0x2f0bb6[_0x12bf('0x41')],_0x2f0bb6[_0x12bf('0x3d')]);_0x34bea8[_0x12bf('0x40')]=_['intersection'](_0x2f0bb6[_0x12bf('0x41')],qs[_0x12bf('0x42')](_0x393290[_0x12bf('0x3d')][_0x12bf('0x42')]));_0x34bea8[_0x12bf('0x40')]=_0x34bea8[_0x12bf('0x40')]['length']?_0x34bea8['attributes']:_0x2f0bb6[_0x12bf('0x41')];_0x34bea8[_0x12bf('0x46')]=qs[_0x12bf('0x47')](_0x393290[_0x12bf('0x3d')][_0x12bf('0x47')]);_0x34bea8[_0x12bf('0x48')]=qs['filters'](_[_0x12bf('0x49')](_0x393290[_0x12bf('0x3d')],_0x2f0bb6[_0x12bf('0x3e')]));if(_0x393290['query'][_0x12bf('0x4a')]){_0x34bea8['where']=_['merge'](_0x34bea8[_0x12bf('0x48')],{'$or':_[_0x12bf('0x4c')](_0x34bea8[_0x12bf('0x40')],function(_0x35a9f6){var _0x594fc2={};_0x594fc2[_0x35a9f6]={'$like':'%'+_0x393290[_0x12bf('0x3d')]['filter']+'%'};return _0x594fc2;})});}_0x34bea8=_[_0x12bf('0x4b')]({},_0x34bea8,_0x393290[_0x12bf('0x58')]);return _0x4474d7['getApplications'](_0x34bea8);}})[_0x12bf('0x32')](function(_0x26e537){if(_0x26e537){_0x4cc453=_0x26e537[_0x12bf('0x43')];if(!_0x393290['query']['hasOwnProperty']('nolimit')){_0x34bea8[_0x12bf('0x2c')]=qs[_0x12bf('0x2c')](_0x393290[_0x12bf('0x3d')]['limit']);_0x34bea8[_0x12bf('0x2b')]=qs['offset'](_0x393290['query'][_0x12bf('0x2b')]);}return _0x4474d7[_0x12bf('0xba')](_0x34bea8);}})[_0x12bf('0x32')](function(_0x5cc582){if(_0x5cc582){return _0x5cc582?{'count':_0x4cc453,'rows':_0x5cc582}:null;}})[_0x12bf('0x32')](respondWithResult(_0x416ffb,null))[_0x12bf('0x55')](handleError(_0x416ffb,null));};exports[_0x12bf('0xbb')]=function(_0x2befde,_0x523167,_0x1a2b00){var _0x1af353={'raw':![],'where':{}};var _0x49e3e4={};var _0x4cdd0a={'count':0x0,'rows':[]};return db[_0x12bf('0x3a')][_0x12bf('0x68')]({'where':{'id':_0x2befde[_0x12bf('0x57')]['id']}})['then'](handleEntityNotFound(_0x523167,null))[_0x12bf('0x32')](function(_0x3523a8){if(_0x3523a8){_0x49e3e4[_0x12bf('0x41')]=_['keys'](db['SmsInteraction']['rawAttributes']);_0x49e3e4[_0x12bf('0x3d')]=_[_0x12bf('0x3c')](_0x2befde[_0x12bf('0x3d')]);_0x49e3e4[_0x12bf('0x3e')]=_[_0x12bf('0x3f')](_0x49e3e4[_0x12bf('0x41')],_0x49e3e4['query']);_0x1af353['attributes']=_[_0x12bf('0x3f')](_0x49e3e4[_0x12bf('0x41')],qs[_0x12bf('0x42')](_0x2befde[_0x12bf('0x3d')][_0x12bf('0x42')]));_0x1af353[_0x12bf('0x40')]=_0x1af353[_0x12bf('0x40')][_0x12bf('0x43')]?_0x1af353[_0x12bf('0x40')]:_0x49e3e4[_0x12bf('0x41')];if(!_0x2befde['query'][_0x12bf('0x44')](_0x12bf('0x45'))){_0x1af353['limit']=qs[_0x12bf('0x2c')](_0x2befde['query'][_0x12bf('0x2c')]);_0x1af353[_0x12bf('0x2b')]=qs[_0x12bf('0x2b')](_0x2befde['query']['offset']);}_0x1af353[_0x12bf('0x46')]=qs['sort'](_0x2befde[_0x12bf('0x3d')][_0x12bf('0x47')]);_0x1af353[_0x12bf('0x48')]=qs[_0x12bf('0x3e')](_[_0x12bf('0x49')](_0x2befde['query'],_0x49e3e4['filters']));_0x1af353['where'][_0x12bf('0x65')]=_0x3523a8['id'];if(_0x2befde[_0x12bf('0x3d')][_0x12bf('0x4a')]){_0x1af353[_0x12bf('0x48')]=_[_0x12bf('0x4b')](_0x1af353[_0x12bf('0x48')],{'$or':_[_0x12bf('0x4c')](_0x1af353['attributes'],function(_0x3a543c){var _0x4664af={};_0x4664af[_0x3a543c]={'$like':'%'+_0x2befde[_0x12bf('0x3d')]['filter']+'%'};return _0x4664af;})});}_0x1af353=_[_0x12bf('0x4b')]({},_0x1af353,_0x2befde['options']);return db[_0x12bf('0x9e')][_0x12bf('0x2a')]({'where':_0x1af353['where']})[_0x12bf('0x32')](function(_0x3e7490){_0x4cdd0a[_0x12bf('0x2a')]=_0x3e7490;if(_0x2befde[_0x12bf('0x3d')][_0x12bf('0x51')]){_0x1af353['include']=[{'model':db['CmContact'],'as':'Contact','required':![]},{'model':db['User'],'as':'Owner','attributes':[_0x12bf('0x35'),_0x12bf('0xbc'),_0x12bf('0xbd')],'required':![]},{'model':db[_0x12bf('0xbe')],'as':'Tags','attributes':['id',_0x12bf('0x35'),_0x12bf('0xbf')],'where':_0x2befde[_0x12bf('0x3d')][_0x12bf('0xc0')]?{'id':_0x2befde['query'][_0x12bf('0xc0')]}:undefined,'required':_0x2befde['query'][_0x12bf('0xc0')]?!![]:![]}];}return db[_0x12bf('0x9e')][_0x12bf('0x53')](_0x1af353);})[_0x12bf('0x32')](function(_0x18e66e){_0x4cdd0a[_0x12bf('0x54')]=_0x18e66e;return _0x4cdd0a;});}})[_0x12bf('0x32')](respondWithFilteredResult(_0x523167,_0x1af353))[_0x12bf('0x55')](handleError(_0x523167,null));};exports[_0x12bf('0x36')]=function(_0x1c50c7,_0x23b3a1,_0x1893d9){var _0x333200,_0x1188bf,_0x5b4972;if(_[_0x12bf('0x95')](_0x1c50c7[_0x12bf('0x62')][_0x12bf('0x62')])||_0x1c50c7[_0x12bf('0x62')][_0x12bf('0x62')]===''){throw new db[(_0x12bf('0x77'))]['ValidationError']('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x12bf('0x95')](_0x1c50c7['body']['to'])){throw new db[(_0x12bf('0x77'))][(_0x12bf('0x78'))](_0x12bf('0xc1'));}_0x333200=_0x1c50c7[_0x12bf('0x62')]['to'];return db[_0x12bf('0x3a')]['find']({'where':{'id':_0x1c50c7[_0x12bf('0x57')]['id']},'include':[{'model':db['CmList'],'as':_0x12bf('0xc2'),'include':[{'model':db[_0x12bf('0x76')],'as':_0x12bf('0x9b'),'where':{'mobile':_0x333200},'limit':0x1,'order':[['updatedAt','DESC']]}]}]})[_0x12bf('0x32')](handleEntityNotFound(_0x23b3a1,null))['then'](function(_0x59a9a8){if(_0x59a9a8&&_0x59a9a8[_0x12bf('0xc2')]){_0x1188bf=_0x59a9a8[_0x12bf('0x5c')]({'plain':!![]});if(_0x1188bf['List']&&_0x1188bf[_0x12bf('0xc2')][_0x12bf('0x9b')][_0x12bf('0x43')]){return _0x1188bf[_0x12bf('0xc2')]['Contacts'][0x0];}return db[_0x12bf('0x76')][_0x12bf('0x5a')](_['defaults'](_0x1c50c7[_0x12bf('0x62')],{'firstName':_0x333200,'mobile':_0x333200,'phone':_0x333200,'ListId':_0x1188bf[_0x12bf('0x7e')]}));}})['then'](handleEntityNotFound(_0x23b3a1,null))[_0x12bf('0x32')](function(_0x433225){if(_0x433225){_0x5b4972=_0x433225;return db[_0x12bf('0x9e')][_0x12bf('0x59')]({'where':{'ContactId':_0x5b4972['id'],'closed':![],'SmsAccountId':_0x1188bf['id']}})[_0x12bf('0x32')](function(_0x25f0db){if(_0x25f0db){return[_0x25f0db,![]];}return db[_0x12bf('0x9e')]['create']({'UserId':_0x1c50c7[_0x12bf('0x5b')]['id'],'ContactId':_0x5b4972['id'],'SmsAccountId':_0x1188bf['id'],'phone':_0x333200,'firstMsgDirection':_0x12bf('0xc3'),'Messages':[_[_0x12bf('0x4b')](_0x1c50c7[_0x12bf('0x62')],{'read':![],'body':_0x1c50c7[_0x12bf('0x62')][_0x12bf('0x62')],'phone':_0x333200,'SmsAccountId':_0x1188bf['id'],'UserId':_0x1c50c7[_0x12bf('0x5b')]['id'],'ContactId':_0x5b4972['id']})]},{'include':[{'model':db[_0x12bf('0xc4')],'as':_0x12bf('0xc5')}]})[_0x12bf('0x32')](function(_0x5ecb44){return[_0x5ecb44,!![]];});});}})[_0x12bf('0x9f')](function(_0x2a18ac,_0x52a5d7){if(_0x52a5d7){return _0x2a18ac;}return db[_0x12bf('0xc4')][_0x12bf('0x5a')](_[_0x12bf('0x4b')](_0x1c50c7[_0x12bf('0x62')],{'read':![],'body':_0x1c50c7[_0x12bf('0x62')][_0x12bf('0x62')],'phone':_0x333200,'SmsAccountId':_0x1188bf['id'],'SmsInteractionId':_0x2a18ac['id'],'UserId':_0x1c50c7['user']['id'],'ContactId':_0x5b4972['id']}))[_0x12bf('0x32')](function(_0x476265){_0x2a18ac[_0x12bf('0xc6')][_0x12bf('0xc5')]=[];_0x2a18ac[_0x12bf('0xc6')][_0x12bf('0xc5')]['push'](_0x476265['dataValues']);return _0x2a18ac;});})[_0x12bf('0x32')](respondWithResult(_0x23b3a1,null))['catch'](handleError(_0x23b3a1,null));};exports[_0x12bf('0x27')]=function(_0x5ade2e,_0x4a6698,_0x236e46){if(_0x5ade2e['body']['id']){delete _0x5ade2e[_0x12bf('0x62')]['id'];}console[_0x12bf('0xc7')]('endpoint\x20/status\x20POST\x20/',_0x5ade2e['body']);var _0xde5a4b,_0x8d64fb,_0x30c849;return db[_0x12bf('0x3a')][_0x12bf('0x59')]({'where':{'id':_0x5ade2e['params']['id']}})['then'](handleEntityNotFound(_0x4a6698,null))[_0x12bf('0x32')](function(_0x4d0f7a){if(_0x4d0f7a){_0x30c849=_0x4d0f7a;logger['debug'](_0x12bf('0x21'),_0x12bf('0x27'),_0x12bf('0xc8'),_0x4d0f7a[_0x12bf('0x4d')],util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));switch(_0x4d0f7a[_0x12bf('0x4d')]){case _0x12bf('0x85'):if(_0x5ade2e['body'][_0x12bf('0xca')]&&_0x5ade2e['body'][_0x12bf('0x27')]){_0x8d64fb=_0x5ade2e[_0x12bf('0x62')]['status'];return db['SmsMessage']['find']({'where':{'messageId':_0x5ade2e[_0x12bf('0x62')][_0x12bf('0xca')]}});}break;case'connectel':if(_0x5ade2e[_0x12bf('0x62')][_0x12bf('0xcb')]&&_0x5ade2e[_0x12bf('0x62')][_0x12bf('0xcc')]){_0x8d64fb=_0x5ade2e[_0x12bf('0x62')][_0x12bf('0xcc')];return db['SmsMessage'][_0x12bf('0x59')]({'where':{'messageId':_0x5ade2e['body'][_0x12bf('0xcb')]}});}break;case'clicksend':if(_0x5ade2e[_0x12bf('0x62')][_0x12bf('0x89')]&&_0x5ade2e[_0x12bf('0x62')]['status_code']){_0x8d64fb=_0x5ade2e[_0x12bf('0x62')][_0x12bf('0xcd')];return db[_0x12bf('0xc4')]['find']({'where':{'messageId':_0x5ade2e[_0x12bf('0x62')]['message_id']}});}break;case'infobip':var _0x403a15=_0x5ade2e[_0x12bf('0x62')][_0x12bf('0x8e')][0x0];if(_0x403a15[_0x12bf('0x83')]&&_0x403a15[_0x12bf('0x27')][_0x12bf('0xce')]==='DELIVERED'){_0x8d64fb=_0x403a15[_0x12bf('0x27')][_0x12bf('0xce')];return db['SmsMessage']['find']({'where':{'messageId':_0x403a15[_0x12bf('0x83')]}});}break;case _0x12bf('0x90'):if(_0x5ade2e['body'][_0x12bf('0x83')]&&_0x5ade2e['body'][_0x12bf('0x27')]){_0x8d64fb=_0x5ade2e[_0x12bf('0x62')][_0x12bf('0x27')];return db[_0x12bf('0xc4')][_0x12bf('0x59')]({'where':{'messageId':_0x5ade2e[_0x12bf('0x62')][_0x12bf('0x83')]}});}break;case'intelepeer':if(_0x5ade2e[_0x12bf('0x62')][_0x12bf('0xcf')]&&_0x5ade2e['body'][_0x12bf('0x27')]){_0x8d64fb=_0x5ade2e[_0x12bf('0x62')][_0x12bf('0x27')];return db[_0x12bf('0xc4')]['find']({'where':{'messageId':_0x5ade2e['body'][_0x12bf('0xcf')]}});}break;}}})[_0x12bf('0x32')](handleEntityNotFound(_0x4a6698,null))[_0x12bf('0x32')](function(_0x5656ad){if(_0x5656ad){_0xde5a4b=_0x5656ad;switch(_0x30c849[_0x12bf('0x4d')]){case _0x12bf('0x85'):if(_0x8d64fb===_0x12bf('0xd0')){return _0xde5a4b['update']({'read':!![]});}else{logger['error'](_0x12bf('0x21'),_0x12bf('0x27'),'skebby',util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));}break;case'connectel':if(_0x8d64fb==='1'){return _0xde5a4b[_0x12bf('0x31')]({'read':!![]});}else{logger[_0x12bf('0x22')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x12bf('0x27'),_0x12bf('0x85'),util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));}break;case _0x12bf('0x88'):if(!_0x5ade2e[_0x12bf('0x62')]['error_code']&&_0x8d64fb>=0xc8&&_0x8d64fb<=0xce){return _0xde5a4b[_0x12bf('0x31')]({'read':!![]});}else{logger[_0x12bf('0x22')](_0x12bf('0x21'),_0x12bf('0x27'),_0x12bf('0x88'),util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));}break;case _0x12bf('0x8d'):var _0x44bcf8=_0x5ade2e[_0x12bf('0x62')][_0x12bf('0x8e')][0x0];if(_0x44bcf8[_0x12bf('0x27')][_0x12bf('0xce')]===_0x12bf('0xd0')){return _0xde5a4b[_0x12bf('0x31')]({'read':!![]});}else{logger[_0x12bf('0x22')](_0x12bf('0x21'),_0x12bf('0x27'),_0x12bf('0x8d'),util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));}break;case _0x12bf('0x90'):if(_0x8d64fb==_0x12bf('0xd1')||_0x8d64fb=='RECEIVED_BY_RECIPIENT'){return _0xde5a4b[_0x12bf('0x31')]({'read':!![]});}else{logger[_0x12bf('0x22')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x12bf('0x27'),_0x12bf('0x90'),util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));}break;case'intelepeer':if(_0x8d64fb===_0x12bf('0xd2')||_0x8d64fb==='ACCEPTD'){return _0xde5a4b[_0x12bf('0x31')]({'read':!![]});}else{logger[_0x12bf('0x22')](_0x12bf('0x21'),_0x12bf('0x27'),_0x12bf('0x93'),util[_0x12bf('0xc9')](_0x5ade2e[_0x12bf('0x62')],{'showHidden':![],'depth':null}));}break;}return _0xde5a4b;}})[_0x12bf('0x32')](respondWithResult(_0x4a6698,null))[_0x12bf('0x55')](handleError(_0x4a6698,null));};exports[_0x12bf('0xd3')]=function(_0x1f1b78,_0x28ec3a,_0x1faeb6){var _0x448c10,_0x556fac,_0x30e83e;return db[_0x12bf('0x3a')]['find']({'where':{'id':_0x1f1b78[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x28ec3a,null))[_0x12bf('0x32')](function(_0x1b80ed){if(_0x1b80ed){_0x30e83e=_0x1b80ed;logger[_0x12bf('0x20')](_0x12bf('0x21'),_0x12bf('0x27'),_0x12bf('0xc8'),_0x1b80ed[_0x12bf('0x4d')],util[_0x12bf('0xc9')](_0x1f1b78[_0x12bf('0x3d')],{'showHidden':![],'depth':null}));switch(_0x1b80ed[_0x12bf('0x4d')]){case _0x12bf('0xd4'):if(_0x1f1b78[_0x12bf('0x3d')][_0x12bf('0xd5')]&&_0x1f1b78[_0x12bf('0x3d')][_0x12bf('0xd6')]){_0x556fac=_0x1f1b78[_0x12bf('0x3d')][_0x12bf('0xd6')];return db['SmsMessage'][_0x12bf('0x59')]({'where':{'messageId':_0x1f1b78[_0x12bf('0x3d')]['message-id']}});}break;}}})['then'](handleEntityNotFound(_0x28ec3a,null))['then'](function(_0x5f52e0){if(_0x5f52e0){_0x448c10=_0x5f52e0;switch(_0x30e83e[_0x12bf('0x4d')]){case'csc':if(_0x556fac==='2'||_0x556fac==='6'){return _0x448c10[_0x12bf('0x31')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0x12bf('0x27'),_0x12bf('0xd4'),util['inspect'](_0x1f1b78['query'],{'showHidden':![],'depth':null}));};break;}return _0x448c10;}})[_0x12bf('0x32')](respondWithResult(_0x28ec3a,null))[_0x12bf('0x55')](handleError(_0x28ec3a,null));};exports['addAgents']=function(_0x4fe313,_0x4ecad3,_0x1faedc){return db['SmsAccount'][_0x12bf('0x59')]({'where':{'id':_0x4fe313['params']['id']}})['then'](handleEntityNotFound(_0x4ecad3,null))[_0x12bf('0x32')](function(_0x5e2104){if(_0x5e2104){return _0x5e2104[_0x12bf('0xd7')](_0x4fe313[_0x12bf('0x62')][_0x12bf('0x6e')],_[_0x12bf('0xd8')](_0x4fe313[_0x12bf('0x62')],[_0x12bf('0x6e'),'id'])||{})['spread'](function(_0x5d4ff1){for(var _0xc40de4=0x0;_0xc40de4<_0x4fe313[_0x12bf('0x62')][_0x12bf('0x6e')][_0x12bf('0x43')];_0xc40de4+=0x1){socket['emit'](_0x12bf('0xd9'),{'UserId':_0x4fe313[_0x12bf('0x62')]['ids'][_0xc40de4],'SmsAccountId':_0x4fe313[_0x12bf('0x57')]['id']});}return _0x5d4ff1;});}})[_0x12bf('0x32')](respondWithResult(_0x4ecad3,null))[_0x12bf('0x55')](handleError(_0x4ecad3,null));};exports[_0x12bf('0xda')]=function(_0x5e12da,_0x228c79,_0x51fa5f){return db[_0x12bf('0x3a')][_0x12bf('0x59')]({'where':{'id':_0x5e12da[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x228c79,null))[_0x12bf('0x32')](function(_0x2cdd72){if(_0x2cdd72){return _0x2cdd72[_0x12bf('0xda')](_0x5e12da['query']['ids'])[_0x12bf('0x32')](function(){if(_[_0x12bf('0xdb')](_0x5e12da[_0x12bf('0x3d')]['ids'])){for(var _0x136702=0x0;_0x136702<_0x5e12da[_0x12bf('0x3d')][_0x12bf('0x6e')]['length'];_0x136702+=0x1){socket[_0x12bf('0xdc')](_0x12bf('0xdd'),{'UserId':Number(_0x5e12da[_0x12bf('0x3d')][_0x12bf('0x6e')][_0x136702]),'SmsAccountId':Number(_0x5e12da[_0x12bf('0x57')]['id'])});}}else{socket[_0x12bf('0xdc')](_0x12bf('0xdd'),{'UserId':Number(_0x5e12da['query']['ids']),'SmsAccountId':Number(_0x5e12da[_0x12bf('0x57')]['id'])});}});}})[_0x12bf('0x32')](respondWithStatusCode(_0x228c79,null))[_0x12bf('0x55')](handleError(_0x228c79,null));};exports['getAgents']=function(_0x200285,_0x2a622b,_0x111bc9){var _0x5f2a43={};var _0xe2f02c={};var _0x35f55a;var _0x363296;return db[_0x12bf('0x3a')][_0x12bf('0x68')]({'where':{'id':_0x200285[_0x12bf('0x57')]['id']}})[_0x12bf('0x32')](handleEntityNotFound(_0x2a622b,null))['then'](function(_0x1ff069){if(_0x1ff069){_0x35f55a=_0x1ff069;_0xe2f02c[_0x12bf('0x41')]=_['keys'](db[_0x12bf('0xa8')][_0x12bf('0x3b')]);_0xe2f02c[_0x12bf('0x3d')]=_[_0x12bf('0x3c')](_0x200285[_0x12bf('0x3d')]);_0xe2f02c[_0x12bf('0x3e')]=_[_0x12bf('0x3f')](_0xe2f02c[_0x12bf('0x41')],_0xe2f02c['query']);_0x5f2a43[_0x12bf('0x40')]=_[_0x12bf('0x3f')](_0xe2f02c['model'],qs['fields'](_0x200285[_0x12bf('0x3d')][_0x12bf('0x42')]));_0x5f2a43[_0x12bf('0x40')]=_0x5f2a43['attributes'][_0x12bf('0x43')]?_0x5f2a43[_0x12bf('0x40')]:_0xe2f02c[_0x12bf('0x41')];_0x5f2a43[_0x12bf('0x46')]=qs[_0x12bf('0x47')](_0x200285[_0x12bf('0x3d')][_0x12bf('0x47')]);_0x5f2a43[_0x12bf('0x48')]=qs[_0x12bf('0x3e')](_['pick'](_0x200285[_0x12bf('0x3d')],_0xe2f02c[_0x12bf('0x3e')]));if(_0x200285[_0x12bf('0x3d')]['filter']){_0x5f2a43['where']=_['merge'](_0x5f2a43[_0x12bf('0x48')],{'$or':_[_0x12bf('0x4c')](_0x5f2a43[_0x12bf('0x40')],function(_0x93944b){var _0x4f927f={};_0x4f927f[_0x93944b]={'$like':'%'+_0x200285[_0x12bf('0x3d')][_0x12bf('0x4a')]+'%'};return _0x4f927f;})});}_0x5f2a43=_[_0x12bf('0x4b')]({},_0x5f2a43,_0x200285[_0x12bf('0x58')]);return _0x35f55a[_0x12bf('0xde')](_0x5f2a43);}})[_0x12bf('0x32')](function(_0x2bc2e9){if(_0x2bc2e9){_0x363296=_0x2bc2e9['length'];if(!_0x200285[_0x12bf('0x3d')][_0x12bf('0x44')]('nolimit')){_0x5f2a43['limit']=qs[_0x12bf('0x2c')](_0x200285[_0x12bf('0x3d')][_0x12bf('0x2c')]);_0x5f2a43['offset']=qs[_0x12bf('0x2b')](_0x200285[_0x12bf('0x3d')]['offset']);}return _0x35f55a[_0x12bf('0xde')](_0x5f2a43);}})['then'](function(_0x1491fb){if(_0x1491fb){return _0x1491fb?{'count':_0x363296,'rows':_0x1491fb}:null;}})['then'](respondWithResult(_0x2a622b,null))[_0x12bf('0x55')](handleError(_0x2a622b,null));};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.events.js b/server/api/smsAccount/smsAccount.events.js
index b02f732..6a053e1 100644
--- a/server/api/smsAccount/smsAccount.events.js
+++ b/server/api/smsAccount/smsAccount.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x938d=['hook','exports','events','../../mysqldb','setMaxListeners','save','update','emit','hasOwnProperty'];(function(_0x29ef70,_0x21c3c0){var _0x3b9220=function(_0x377fb3){while(--_0x377fb3){_0x29ef70['push'](_0x29ef70['shift']());}};_0x3b9220(++_0x21c3c0);}(_0x938d,0x122));var _0xd938=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x938d[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0xd938('0x0'));var SmsAccount=require(_0xd938('0x1'))['db']['SmsAccount'];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0xd938('0x2')](0x0);var events={'afterCreate':_0xd938('0x3'),'afterUpdate':_0xd938('0x4'),'afterDestroy':'remove'};function emitEvent(_0x5f0056){return function(_0xc9f24b,_0x429911,_0x11b9bb){SmsAccountEvents['emit'](_0x5f0056+':'+_0xc9f24b['id'],_0xc9f24b);SmsAccountEvents[_0xd938('0x5')](_0x5f0056,_0xc9f24b);_0x11b9bb(null);};}for(var e in events){if(events[_0xd938('0x6')](e)){var event=events[e];SmsAccount[_0xd938('0x7')](e,emitEvent(event));}}module[_0xd938('0x8')]=SmsAccountEvents;
\ No newline at end of file
+var _0x6737=['emit','hasOwnProperty','../../mysqldb','SmsAccount','save','update','remove'];(function(_0x4f49a9,_0x4ffff1){var _0x1fb629=function(_0x5be8ec){while(--_0x5be8ec){_0x4f49a9['push'](_0x4f49a9['shift']());}};_0x1fb629(++_0x4ffff1);}(_0x6737,0xe2));var _0x7673=function(_0x259d29,_0x32ca6d){_0x259d29=_0x259d29-0x0;var _0x32834f=_0x6737[_0x259d29];return _0x32834f;};'use strict';var EventEmitter=require('events');var SmsAccount=require(_0x7673('0x0'))['db'][_0x7673('0x1')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7673('0x2'),'afterUpdate':_0x7673('0x3'),'afterDestroy':_0x7673('0x4')};function emitEvent(_0x12efff){return function(_0x54002e,_0x32e6f2,_0x22ce8d){SmsAccountEvents['emit'](_0x12efff+':'+_0x54002e['id'],_0x54002e);SmsAccountEvents[_0x7673('0x5')](_0x12efff,_0x54002e);_0x22ce8d(null);};}for(var e in events){if(events[_0x7673('0x6')](e)){var event=events[e];SmsAccount['hook'](e,emitEvent(event));}}module['exports']=SmsAccountEvents;
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.model.js b/server/api/smsAccount/smsAccount.model.js
index a19edfe..684fe9d 100644
--- a/server/api/smsAccount/smsAccount.model.js
+++ b/server/api/smsAccount/smsAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe6ee=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./smsAccount.attributes','exports','define','SmsAccount','sms_accounts'];(function(_0x269a50,_0x36bfb1){var _0x10dd31=function(_0x26e91f){while(--_0x26e91f){_0x269a50['push'](_0x269a50['shift']());}};_0x10dd31(++_0x36bfb1);}(_0xe6ee,0xa8));var _0xee6e=function(_0x593ebc,_0x2a4c66){_0x593ebc=_0x593ebc-0x0;var _0x18f9eb=_0xe6ee[_0x593ebc];return _0x18f9eb;};'use strict';var _=require(_0xee6e('0x0'));var util=require(_0xee6e('0x1'));var logger=require(_0xee6e('0x2'))(_0xee6e('0x3'));var moment=require(_0xee6e('0x4'));var BPromise=require(_0xee6e('0x5'));var rp=require(_0xee6e('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xee6e('0x7'));var config=require(_0xee6e('0x8'));var attributes=require(_0xee6e('0x9'));module[_0xee6e('0xa')]=function(_0x3418f2,_0x30238b){return _0x3418f2[_0xee6e('0xb')](_0xee6e('0xc'),attributes,{'tableName':_0xee6e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x00eb=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','SmsAccount','sms_accounts'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0x00eb,0x138));var _0xb00e=function(_0x23c07c,_0x4564f9){_0x23c07c=_0x23c07c-0x0;var _0x2c70e1=_0x00eb[_0x23c07c];return _0x2c70e1;};'use strict';var _=require(_0xb00e('0x0'));var util=require(_0xb00e('0x1'));var logger=require(_0xb00e('0x2'))(_0xb00e('0x3'));var moment=require(_0xb00e('0x4'));var BPromise=require(_0xb00e('0x5'));var rp=require(_0xb00e('0x6'));var fs=require('fs');var path=require(_0xb00e('0x7'));var rimraf=require(_0xb00e('0x8'));var config=require(_0xb00e('0x9'));var attributes=require('./smsAccount.attributes');module[_0xb00e('0xa')]=function(_0x274b4e,_0x25534c){return _0x274b4e['define'](_0xb00e('0xb'),attributes,{'tableName':_0xb00e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.rpc.js b/server/api/smsAccount/smsAccount.rpc.js
index d6e73f4..7979929 100644
--- a/server/api/smsAccount/smsAccount.rpc.js
+++ b/server/api/smsAccount/smsAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0132=['message','result','catch','ShowSmsAccount','SmsAccount','raw','options','where','attributes','include','model','stringify','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','localhost','socket.io-emitter','register','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x5f5731,_0x3feab8){var _0x3b9b6b=function(_0x200bbf){while(--_0x200bbf){_0x5f5731['push'](_0x5f5731['shift']());}};_0x3b9b6b(++_0x3feab8);}(_0x0132,0x108));var _0x2013=function(_0x3bf2bc,_0x163f93){_0x3bf2bc=_0x3bf2bc-0x0;var _0x4a4f86=_0x0132[_0x3bf2bc];return _0x4a4f86;};'use strict';var _=require('lodash');var util=require(_0x2013('0x0'));var moment=require(_0x2013('0x1'));var BPromise=require(_0x2013('0x2'));var rs=require(_0x2013('0x3'));var fs=require('fs');var Redis=require(_0x2013('0x4'));var db=require(_0x2013('0x5'))['db'];var utils=require(_0x2013('0x6'));var logger=require(_0x2013('0x7'))(_0x2013('0x8'));var config=require('../../config/environment');var jayson=require(_0x2013('0x9'));var client=jayson[_0x2013('0xa')]['http']({'port':0x232a});config[_0x2013('0xb')]=_['defaults'](config[_0x2013('0xb')],{'host':_0x2013('0xc'),'port':0x18eb});var socket=require(_0x2013('0xd'))(new Redis(config[_0x2013('0xb')]));require('./smsAccount.socket')[_0x2013('0xe')](socket);function respondWithRpcPromise(_0x4fcb60,_0x4a3685,_0x4b4de){return new BPromise(function(_0x477a98,_0x290297){return client[_0x2013('0xf')](_0x4fcb60,_0x4b4de)[_0x2013('0x10')](function(_0x461f6a){logger[_0x2013('0x11')](_0x2013('0x12'),_0x4a3685,_0x2013('0x13'));logger[_0x2013('0x14')](_0x2013('0x15'),_0x4a3685,_0x2013('0x13'),JSON['stringify'](_0x461f6a));if(_0x461f6a[_0x2013('0x16')]){if(_0x461f6a['error'][_0x2013('0x17')]===0x1f4){logger[_0x2013('0x16')]('SmsAccount,\x20%s,\x20%s',_0x4a3685,_0x461f6a[_0x2013('0x16')]['message']);return _0x290297(_0x461f6a[_0x2013('0x16')]['message']);}logger[_0x2013('0x16')]('SmsAccount,\x20%s,\x20%s',_0x4a3685,_0x461f6a[_0x2013('0x16')][_0x2013('0x18')]);return _0x477a98(_0x461f6a[_0x2013('0x16')][_0x2013('0x18')]);}else{logger['info'](_0x2013('0x12'),_0x4a3685,'request\x20sent');_0x477a98(_0x461f6a[_0x2013('0x19')]['message']);}})[_0x2013('0x1a')](function(_0x387401){logger[_0x2013('0x16')](_0x2013('0x12'),_0x4a3685,_0x387401);_0x290297(_0x387401);});});}exports[_0x2013('0x1b')]=function(_0x26ea9f){var _0x5629d0=this;return new Promise(function(_0x2ff27d,_0x369ea7){return db[_0x2013('0x1c')]['find']({'raw':_0x26ea9f['options']?_0x26ea9f['options'][_0x2013('0x1d')]===undefined?!![]:![]:!![],'where':_0x26ea9f[_0x2013('0x1e')]?_0x26ea9f['options'][_0x2013('0x1f')]||null:null,'attributes':_0x26ea9f[_0x2013('0x1e')]?_0x26ea9f[_0x2013('0x1e')][_0x2013('0x20')]||null:null,'include':_0x26ea9f[_0x2013('0x1e')]?_0x26ea9f[_0x2013('0x1e')][_0x2013('0x21')]?_['map'](_0x26ea9f[_0x2013('0x1e')][_0x2013('0x21')],function(_0x4ab322){return{'model':db[_0x4ab322[_0x2013('0x22')]],'as':_0x4ab322['as'],'attributes':_0x4ab322[_0x2013('0x20')],'include':_0x4ab322[_0x2013('0x21')]?_['map'](_0x4ab322[_0x2013('0x21')],function(_0x54c898){return{'model':db[_0x54c898[_0x2013('0x22')]],'as':_0x54c898['as'],'attributes':_0x54c898[_0x2013('0x20')],'include':_0x54c898[_0x2013('0x21')]?_['map'](_0x54c898[_0x2013('0x21')],function(_0x2955d9){return{'model':db[_0x2955d9[_0x2013('0x22')]],'as':_0x2955d9['as'],'attributes':_0x2955d9['attributes']};}):[]};}):[]};}):[]:[]})[_0x2013('0x10')](function(_0x12b14e){logger[_0x2013('0x11')](_0x2013('0x1b'),_0x26ea9f);logger[_0x2013('0x14')](_0x2013('0x1b'),_0x26ea9f,JSON[_0x2013('0x23')](_0x12b14e));_0x2ff27d(_0x12b14e);})['catch'](function(_0x3bf5e5){logger[_0x2013('0x16')]('ShowSmsAccount',_0x3bf5e5[_0x2013('0x18')],_0x26ea9f);_0x369ea7(_0x5629d0['error'](0x1f4,_0x3bf5e5[_0x2013('0x18')]));});});};
\ No newline at end of file
+var _0xb2bd=['options','where','attributes','include','map','model','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','register','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','ShowSmsAccount','SmsAccount','find'];(function(_0x4b9978,_0x58eb71){var _0x42f0e5=function(_0x4ff5dc){while(--_0x4ff5dc){_0x4b9978['push'](_0x4b9978['shift']());}};_0x42f0e5(++_0x58eb71);}(_0xb2bd,0x1e7));var _0xdb2b=function(_0x5c6fd7,_0x22042a){_0x5c6fd7=_0x5c6fd7-0x0;var _0x194362=_0xb2bd[_0x5c6fd7];return _0x194362;};'use strict';var _=require(_0xdb2b('0x0'));var util=require(_0xdb2b('0x1'));var moment=require(_0xdb2b('0x2'));var BPromise=require('bluebird');var rs=require(_0xdb2b('0x3'));var fs=require('fs');var Redis=require(_0xdb2b('0x4'));var db=require(_0xdb2b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xdb2b('0x6'))(_0xdb2b('0x7'));var config=require(_0xdb2b('0x8'));var jayson=require(_0xdb2b('0x9'));var client=jayson['client'][_0xdb2b('0xa')]({'port':0x232a});config[_0xdb2b('0xb')]=_[_0xdb2b('0xc')](config['redis'],{'host':_0xdb2b('0xd'),'port':0x18eb});var socket=require(_0xdb2b('0xe'))(new Redis(config[_0xdb2b('0xb')]));require(_0xdb2b('0xf'))[_0xdb2b('0x10')](socket);function respondWithRpcPromise(_0x9e1f89,_0x5103d1,_0x2186a3){return new BPromise(function(_0x2c5f05,_0xc196f0){return client[_0xdb2b('0x11')](_0x9e1f89,_0x2186a3)[_0xdb2b('0x12')](function(_0x1f3977){logger[_0xdb2b('0x13')](_0xdb2b('0x14'),_0x5103d1,_0xdb2b('0x15'));logger[_0xdb2b('0x16')](_0xdb2b('0x17'),_0x5103d1,_0xdb2b('0x15'),JSON[_0xdb2b('0x18')](_0x1f3977));if(_0x1f3977['error']){if(_0x1f3977['error']['code']===0x1f4){logger[_0xdb2b('0x19')]('SmsAccount,\x20%s,\x20%s',_0x5103d1,_0x1f3977[_0xdb2b('0x19')][_0xdb2b('0x1a')]);return _0xc196f0(_0x1f3977[_0xdb2b('0x19')][_0xdb2b('0x1a')]);}logger[_0xdb2b('0x19')](_0xdb2b('0x14'),_0x5103d1,_0x1f3977['error'][_0xdb2b('0x1a')]);return _0x2c5f05(_0x1f3977[_0xdb2b('0x19')][_0xdb2b('0x1a')]);}else{logger[_0xdb2b('0x13')](_0xdb2b('0x14'),_0x5103d1,_0xdb2b('0x15'));_0x2c5f05(_0x1f3977['result'][_0xdb2b('0x1a')]);}})[_0xdb2b('0x1b')](function(_0x287d07){logger[_0xdb2b('0x19')](_0xdb2b('0x14'),_0x5103d1,_0x287d07);_0xc196f0(_0x287d07);});});}exports[_0xdb2b('0x1c')]=function(_0x166e7f){var _0x337fa1=this;return new Promise(function(_0x481454,_0x50524a){return db[_0xdb2b('0x1d')][_0xdb2b('0x1e')]({'raw':_0x166e7f[_0xdb2b('0x1f')]?_0x166e7f[_0xdb2b('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0x166e7f['options']?_0x166e7f['options'][_0xdb2b('0x20')]||null:null,'attributes':_0x166e7f[_0xdb2b('0x1f')]?_0x166e7f[_0xdb2b('0x1f')][_0xdb2b('0x21')]||null:null,'include':_0x166e7f[_0xdb2b('0x1f')]?_0x166e7f['options'][_0xdb2b('0x22')]?_[_0xdb2b('0x23')](_0x166e7f[_0xdb2b('0x1f')]['include'],function(_0x5f5529){return{'model':db[_0x5f5529['model']],'as':_0x5f5529['as'],'attributes':_0x5f5529['attributes'],'include':_0x5f5529['include']?_['map'](_0x5f5529[_0xdb2b('0x22')],function(_0x199229){return{'model':db[_0x199229[_0xdb2b('0x24')]],'as':_0x199229['as'],'attributes':_0x199229[_0xdb2b('0x21')],'include':_0x199229[_0xdb2b('0x22')]?_['map'](_0x199229[_0xdb2b('0x22')],function(_0x90999b){return{'model':db[_0x90999b[_0xdb2b('0x24')]],'as':_0x90999b['as'],'attributes':_0x90999b[_0xdb2b('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x173587){logger[_0xdb2b('0x13')](_0xdb2b('0x1c'),_0x166e7f);logger[_0xdb2b('0x16')](_0xdb2b('0x1c'),_0x166e7f,JSON[_0xdb2b('0x18')](_0x173587));_0x481454(_0x173587);})[_0xdb2b('0x1b')](function(_0x125985){logger['error'](_0xdb2b('0x1c'),_0x125985['message'],_0x166e7f);_0x50524a(_0x337fa1[_0xdb2b('0x19')](0x1f4,_0x125985['message']));});});};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.socket.js b/server/api/smsAccount/smsAccount.socket.js
index 7008ec8..e225317 100644
--- a/server/api/smsAccount/smsAccount.socket.js
+++ b/server/api/smsAccount/smsAccount.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x67bd=['register','length','smsAccount:','./smsAccount.events','save','remove','update','emit','removeListener'];(function(_0x5a7428,_0x15f1ed){var _0x564861=function(_0x37c4a3){while(--_0x37c4a3){_0x5a7428['push'](_0x5a7428['shift']());}};_0x564861(++_0x15f1ed);}(_0x67bd,0x198));var _0xd67b=function(_0x1d42bd,_0x38bf68){_0x1d42bd=_0x1d42bd-0x0;var _0x122a6e=_0x67bd[_0x1d42bd];return _0x122a6e;};'use strict';var SmsAccountEvents=require(_0xd67b('0x0'));var events=[_0xd67b('0x1'),_0xd67b('0x2'),_0xd67b('0x3')];function createListener(_0x1aaa41,_0x15c727){return function(_0x501577){_0x15c727[_0xd67b('0x4')](_0x1aaa41,_0x501577);};}function removeListener(_0x44c4bb,_0x18ac80){return function(){SmsAccountEvents[_0xd67b('0x5')](_0x44c4bb,_0x18ac80);};}exports[_0xd67b('0x6')]=function(_0x4f6883){for(var _0x4854fe=0x0,_0x76be12=events[_0xd67b('0x7')];_0x4854fe<_0x76be12;_0x4854fe++){var _0x547948=events[_0x4854fe];var _0x5b173b=createListener(_0xd67b('0x8')+_0x547948,_0x4f6883);SmsAccountEvents['on'](_0x547948,_0x5b173b);}};
\ No newline at end of file
+var _0x702d=['removeListener','register','smsAccount:','./smsAccount.events','save','remove','emit'];(function(_0x137255,_0x34572a){var _0x15da63=function(_0x4d54c6){while(--_0x4d54c6){_0x137255['push'](_0x137255['shift']());}};_0x15da63(++_0x34572a);}(_0x702d,0x129));var _0xd702=function(_0x21e1e5,_0x5e4810){_0x21e1e5=_0x21e1e5-0x0;var _0x1d0582=_0x702d[_0x21e1e5];return _0x1d0582;};'use strict';var SmsAccountEvents=require(_0xd702('0x0'));var events=[_0xd702('0x1'),_0xd702('0x2'),'update'];function createListener(_0x328f96,_0x42c66d){return function(_0x33a842){_0x42c66d[_0xd702('0x3')](_0x328f96,_0x33a842);};}function removeListener(_0x14d0e7,_0x166317){return function(){SmsAccountEvents[_0xd702('0x4')](_0x14d0e7,_0x166317);};}exports[_0xd702('0x5')]=function(_0x4feea2){for(var _0x22e59e=0x0,_0x1e4915=events['length'];_0x22e59e<_0x1e4915;_0x22e59e++){var _0x4168ce=events[_0x22e59e];var _0x1b4c2c=createListener(_0xd702('0x6')+_0x4168ce,_0x4feea2);SmsAccountEvents['on'](_0x4168ce,_0x1b4c2c);}};
\ No newline at end of file
diff --git a/server/api/smsApplication/index.js b/server/api/smsApplication/index.js
index f68e0d9..1470edf 100644
--- a/server/api/smsApplication/index.js
+++ b/server/api/smsApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb133=['destroy','exports','multer','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','/:id','show','create','put','update','delete'];(function(_0x179327,_0x4fec2b){var _0x38e0aa=function(_0x170552){while(--_0x170552){_0x179327['push'](_0x179327['shift']());}};_0x38e0aa(++_0x4fec2b);}(_0xb133,0xbd));var _0x3b13=function(_0x500419,_0x549162){_0x500419=_0x500419-0x0;var _0x241c1a=_0xb133[_0x500419];return _0x241c1a;};'use strict';var multer=require(_0x3b13('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x3b13('0x1')]();var auth=require(_0x3b13('0x2'));var interaction=require(_0x3b13('0x3'));var config=require(_0x3b13('0x4'));var controller=require(_0x3b13('0x5'));router[_0x3b13('0x6')]('/',auth[_0x3b13('0x7')](),controller[_0x3b13('0x8')]);router[_0x3b13('0x6')](_0x3b13('0x9'),auth[_0x3b13('0x7')](),controller[_0x3b13('0xa')]);router['post']('/',auth[_0x3b13('0x7')](),controller[_0x3b13('0xb')]);router[_0x3b13('0xc')](_0x3b13('0x9'),auth[_0x3b13('0x7')](),controller[_0x3b13('0xd')]);router[_0x3b13('0xe')]('/:id',auth[_0x3b13('0x7')](),controller[_0x3b13('0xf')]);module[_0x3b13('0x10')]=router;
\ No newline at end of file
+var _0x68bc=['show','post','create','put','update','delete','destroy','exports','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','./smsApplication.controller','get','isAuthenticated','index','/:id'];(function(_0x30302a,_0x22da3d){var _0x5153e8=function(_0x2ae84f){while(--_0x2ae84f){_0x30302a['push'](_0x30302a['shift']());}};_0x5153e8(++_0x22da3d);}(_0x68bc,0x15e));var _0xc68b=function(_0x19d48b,_0x4d018c){_0x19d48b=_0x19d48b-0x0;var _0x59b0fe=_0x68bc[_0x19d48b];return _0x59b0fe;};'use strict';var multer=require(_0xc68b('0x0'));var util=require(_0xc68b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xc68b('0x2'));var router=express[_0xc68b('0x3')]();var auth=require(_0xc68b('0x4'));var interaction=require(_0xc68b('0x5'));var config=require('../../config/environment');var controller=require(_0xc68b('0x6'));router[_0xc68b('0x7')]('/',auth[_0xc68b('0x8')](),controller[_0xc68b('0x9')]);router['get'](_0xc68b('0xa'),auth[_0xc68b('0x8')](),controller[_0xc68b('0xb')]);router[_0xc68b('0xc')]('/',auth['isAuthenticated'](),controller[_0xc68b('0xd')]);router[_0xc68b('0xe')](_0xc68b('0xa'),auth[_0xc68b('0x8')](),controller[_0xc68b('0xf')]);router[_0xc68b('0x10')]('/:id',auth[_0xc68b('0x8')](),controller[_0xc68b('0x11')]);module[_0xc68b('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.attributes.js b/server/api/smsApplication/smsApplication.attributes.js
index 96dc28f..26b9d19 100644
--- a/server/api/smsApplication/smsApplication.attributes.js
+++ b/server/api/smsApplication/smsApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6b02=['INTEGER','STRING','noop','*,*,*,*','exports'];(function(_0x129901,_0x4bf77d){var _0x18846d=function(_0x4210c6){while(--_0x4210c6){_0x129901['push'](_0x129901['shift']());}};_0x18846d(++_0x4bf77d);}(_0x6b02,0x1d0));var _0x26b0=function(_0x552694,_0x501105){_0x552694=_0x552694-0x0;var _0x3d2808=_0x6b02[_0x552694];return _0x3d2808;};'use strict';var Sequelize=require('sequelize');module[_0x26b0('0x0')]={'priority':{'type':Sequelize[_0x26b0('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x26b0('0x2')],'allowNull':![],'defaultValue':_0x26b0('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x26b0('0x2')]},'interval':{'type':Sequelize[_0x26b0('0x2')],'defaultValue':_0x26b0('0x4')}};
\ No newline at end of file
+var _0x6c99=['INTEGER','*,*,*,*','sequelize'];(function(_0x14fa92,_0x2d1011){var _0x2f8e6c=function(_0x523a70){while(--_0x523a70){_0x14fa92['push'](_0x14fa92['shift']());}};_0x2f8e6c(++_0x2d1011);}(_0x6c99,0x9b));var _0x96c9=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0x6c99[_0x4c12ec];return _0x3ae42c;};'use strict';var Sequelize=require(_0x96c9('0x0'));module['exports']={'priority':{'type':Sequelize[_0x96c9('0x1')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x96c9('0x2')}};
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.controller.js b/server/api/smsApplication/smsApplication.controller.js
index e5fde51..28661d7 100644
--- a/server/api/smsApplication/smsApplication.controller.js
+++ b/server/api/smsApplication/smsApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x51a3=['path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','apply','reject','update','then','destroy','error','stack','name','send','SmsApplication','rawAttributes','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','field','options','includeAll','include','findAll','catch','show','params','length','find','create','body','html-pdf','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x51a3,0xd0));var _0x351a=function(_0x4c0622,_0x5dacaf){_0x4c0622=_0x4c0622-0x0;var _0x1799d8=_0x51a3[_0x4c0622];return _0x1799d8;};'use strict';var pdf=require(_0x351a('0x0'));var emlformat=require(_0x351a('0x1'));var rimraf=require(_0x351a('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x351a('0x3'));var rp=require('request-promise');var moment=require(_0x351a('0x4'));var BPromise=require(_0x351a('0x5'));var Mustache=require(_0x351a('0x6'));var util=require(_0x351a('0x7'));var path=require(_0x351a('0x8'));var sox=require(_0x351a('0x9'));var csv=require(_0x351a('0xa'));var ejs=require(_0x351a('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x351a('0xc'));var jsforce=require(_0x351a('0xd'));var deskjs=require(_0x351a('0xe'));var toCsv=require(_0x351a('0xa'));var querystring=require(_0x351a('0xf'));var Papa=require(_0x351a('0x10'));var Redis=require(_0x351a('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x351a('0x12'));var hardwareService=require(_0x351a('0x13'));var logger=require(_0x351a('0x14'))(_0x351a('0x15'));var utils=require(_0x351a('0x16'));var config=require(_0x351a('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3130c6,_0x221072){_0x221072=_0x221072||0xcc;return function(_0x502f54){if(_0x502f54){return _0x3130c6[_0x351a('0x18')](_0x221072);}return _0x3130c6[_0x351a('0x19')](_0x221072)[_0x351a('0x1a')]();};}function respondWithResult(_0x14a3ba,_0x428db5){_0x428db5=_0x428db5||0xc8;return function(_0x1db101){if(_0x1db101){return _0x14a3ba[_0x351a('0x19')](_0x428db5)[_0x351a('0x1b')](_0x1db101);}};}function respondWithFilteredResult(_0x42baaa,_0x2c36aa){return function(_0x5b2ba9){if(_0x5b2ba9){var _0x115189=_0x5b2ba9[_0x351a('0x1c')],_0xf4005d=_0x2c36aa['offset'],_0x2fe720=_0x2c36aa[_0x351a('0x1d')]+_0x2c36aa[_0x351a('0x1e')],_0xbb6b;if(_0x2fe720>=_0x115189){_0x2fe720=_0x115189;_0xbb6b=0xc8;}else{_0xbb6b=0xce;}_0x42baaa[_0x351a('0x19')](_0xbb6b);return _0x42baaa[_0x351a('0x1f')]('Content-Range',_0xf4005d+'-'+_0x2fe720+'/'+_0x115189)[_0x351a('0x1b')](_0x5b2ba9);}return null;};}function patchUpdates(_0x2953b5){return function(_0x518f0f){try{jsonpatch[_0x351a('0x20')](_0x518f0f,_0x2953b5,!![]);}catch(_0x192d70){return BPromise[_0x351a('0x21')](_0x192d70);}return _0x518f0f['save']();};}function saveUpdates(_0x292092,_0x15e7ce){return function(_0x4aadeb){if(_0x4aadeb){return _0x4aadeb[_0x351a('0x22')](_0x292092)[_0x351a('0x23')](function(_0x3629a2){return _0x3629a2;});}return null;};}function removeEntity(_0x4c619f,_0x5d49ae){return function(_0x1427b7){if(_0x1427b7){return _0x1427b7[_0x351a('0x24')]()[_0x351a('0x23')](function(){_0x4c619f['status'](0xcc)[_0x351a('0x1a')]();});}};}function handleEntityNotFound(_0xa72435,_0x1af707){return function(_0x2a7f39){if(!_0x2a7f39){_0xa72435[_0x351a('0x18')](0x194);}return _0x2a7f39;};}function handleError(_0x4e9a3c,_0x5d4311){_0x5d4311=_0x5d4311||0x1f4;return function(_0x38e4e4){logger[_0x351a('0x25')](_0x38e4e4[_0x351a('0x26')]);if(_0x38e4e4[_0x351a('0x27')]){delete _0x38e4e4[_0x351a('0x27')];}_0x4e9a3c['status'](_0x5d4311)[_0x351a('0x28')](_0x38e4e4);};}exports['index']=function(_0x30e1b8,_0x299cfb){var _0x4deb6f={},_0x10d560={},_0x272a0d={'count':0x0,'rows':[]};var _0x4c3bcb=db[_0x351a('0x29')][_0x351a('0x2a')];_0x10d560[_0x351a('0x2b')]=_[_0x351a('0x2c')](_0x4c3bcb);_0x10d560[_0x351a('0x2d')]=_[_0x351a('0x2c')](_0x30e1b8[_0x351a('0x2d')]);_0x10d560[_0x351a('0x2e')]=_['intersection'](_0x10d560[_0x351a('0x2b')],_0x10d560[_0x351a('0x2d')]);_0x4deb6f['attributes']=_[_0x351a('0x2f')](_0x10d560[_0x351a('0x2b')],qs[_0x351a('0x30')](_0x30e1b8[_0x351a('0x2d')][_0x351a('0x30')]));_0x4deb6f[_0x351a('0x31')]=_0x4deb6f['attributes']['length']?_0x4deb6f[_0x351a('0x31')]:_0x10d560[_0x351a('0x2b')];if(!_0x30e1b8[_0x351a('0x2d')][_0x351a('0x32')](_0x351a('0x33'))){_0x4deb6f[_0x351a('0x1e')]=qs[_0x351a('0x1e')](_0x30e1b8[_0x351a('0x2d')][_0x351a('0x1e')]);_0x4deb6f['offset']=qs[_0x351a('0x1d')](_0x30e1b8[_0x351a('0x2d')][_0x351a('0x1d')]);}_0x4deb6f[_0x351a('0x34')]=qs[_0x351a('0x35')](_0x30e1b8['query'][_0x351a('0x35')]);_0x4deb6f[_0x351a('0x36')]=qs[_0x351a('0x2e')](_[_0x351a('0x37')](_0x30e1b8[_0x351a('0x2d')],_0x10d560[_0x351a('0x2e')]));if(_0x30e1b8[_0x351a('0x2d')][_0x351a('0x38')]){_0x4deb6f[_0x351a('0x36')]=_[_0x351a('0x39')](_0x4deb6f['where'],{'$or':_[_0x351a('0x3a')](_0x4c3bcb,function(_0x5898e1){if(_0x5898e1['type']['key']!==_0x351a('0x3b')){var _0x4068ec={};_0x4068ec[_0x5898e1[_0x351a('0x3c')]]={'$like':'%'+_0x30e1b8[_0x351a('0x2d')]['filter']+'%'};return _0x4068ec;}})});}_0x4deb6f=_['merge']({},_0x4deb6f,_0x30e1b8[_0x351a('0x3d')]);var _0x5a73cd={'where':_0x4deb6f[_0x351a('0x36')]};return db[_0x351a('0x29')]['count'](_0x5a73cd)['then'](function(_0x5e33c8){_0x272a0d['count']=_0x5e33c8;if(_0x30e1b8['query'][_0x351a('0x3e')]){_0x4deb6f[_0x351a('0x3f')]=[{'all':!![]}];}return db[_0x351a('0x29')][_0x351a('0x40')](_0x4deb6f);})[_0x351a('0x23')](function(_0x5a8267){_0x272a0d['rows']=_0x5a8267;return _0x272a0d;})[_0x351a('0x23')](respondWithFilteredResult(_0x299cfb,_0x4deb6f))[_0x351a('0x41')](handleError(_0x299cfb,null));};exports[_0x351a('0x42')]=function(_0xf14634,_0x44fafe){var _0x5a5e07={'raw':!![],'where':{'id':_0xf14634[_0x351a('0x43')]['id']}},_0x1fed8b={};_0x1fed8b[_0x351a('0x2b')]=_[_0x351a('0x2c')](db[_0x351a('0x29')]['rawAttributes']);_0x1fed8b[_0x351a('0x2d')]=_['keys'](_0xf14634[_0x351a('0x2d')]);_0x1fed8b['filters']=_[_0x351a('0x2f')](_0x1fed8b['model'],_0x1fed8b[_0x351a('0x2d')]);_0x5a5e07[_0x351a('0x31')]=_[_0x351a('0x2f')](_0x1fed8b[_0x351a('0x2b')],qs[_0x351a('0x30')](_0xf14634[_0x351a('0x2d')][_0x351a('0x30')]));_0x5a5e07[_0x351a('0x31')]=_0x5a5e07[_0x351a('0x31')][_0x351a('0x44')]?_0x5a5e07[_0x351a('0x31')]:_0x1fed8b[_0x351a('0x2b')];if(_0xf14634[_0x351a('0x2d')][_0x351a('0x3e')]){_0x5a5e07[_0x351a('0x3f')]=[{'all':!![]}];}_0x5a5e07=_[_0x351a('0x39')]({},_0x5a5e07,_0xf14634[_0x351a('0x3d')]);return db[_0x351a('0x29')][_0x351a('0x45')](_0x5a5e07)['then'](handleEntityNotFound(_0x44fafe,null))['then'](respondWithResult(_0x44fafe,null))[_0x351a('0x41')](handleError(_0x44fafe,null));};exports[_0x351a('0x46')]=function(_0x4a435c,_0x21fa04){return db[_0x351a('0x29')][_0x351a('0x46')](_0x4a435c[_0x351a('0x47')],{})['then'](respondWithResult(_0x21fa04,0xc9))[_0x351a('0x41')](handleError(_0x21fa04,null));};exports[_0x351a('0x22')]=function(_0x269771,_0x12fba7){if(_0x269771[_0x351a('0x47')]['id']){delete _0x269771[_0x351a('0x47')]['id'];}return db['SmsApplication'][_0x351a('0x45')]({'where':{'id':_0x269771[_0x351a('0x43')]['id']}})[_0x351a('0x23')](handleEntityNotFound(_0x12fba7,null))[_0x351a('0x23')](saveUpdates(_0x269771[_0x351a('0x47')],null))[_0x351a('0x23')](respondWithResult(_0x12fba7,null))[_0x351a('0x41')](handleError(_0x12fba7,null));};exports['destroy']=function(_0x2fded1,_0x53ed26){return db[_0x351a('0x29')]['find']({'where':{'id':_0x2fded1[_0x351a('0x43')]['id']}})[_0x351a('0x23')](handleEntityNotFound(_0x53ed26,null))[_0x351a('0x23')](removeEntity(_0x53ed26,null))['catch'](handleError(_0x53ed26,null));};
\ No newline at end of file
+var _0xe45b=['findAll','rows','catch','show','keys','rawAttributes','include','merge','create','body','update','find','params','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','sox','to-csv','ejs','lodash','squel','crypto','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','end','status','count','offset','limit','set','apply','reject','save','then','destroy','error','stack','name','send','index','SmsApplication','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','map','type','key','VIRTUAL','field','options','includeAll'];(function(_0x46aff0,_0x122890){var _0x9d78cf=function(_0x3f14cb){while(--_0x3f14cb){_0x46aff0['push'](_0x46aff0['shift']());}};_0x9d78cf(++_0x122890);}(_0xe45b,0xe5));var _0xbe45=function(_0x14e5e5,_0x481c11){_0x14e5e5=_0x14e5e5-0x0;var _0x2bee68=_0xe45b[_0x14e5e5];return _0x2bee68;};'use strict';var pdf=require(_0xbe45('0x0'));var emlformat=require(_0xbe45('0x1'));var rimraf=require(_0xbe45('0x2'));var zipdir=require(_0xbe45('0x3'));var jsonpatch=require(_0xbe45('0x4'));var rp=require(_0xbe45('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xbe45('0x6'));var util=require('util');var path=require('path');var sox=require(_0xbe45('0x7'));var csv=require(_0xbe45('0x8'));var ejs=require(_0xbe45('0x9'));var fs=require('fs');var _=require(_0xbe45('0xa'));var squel=require(_0xbe45('0xb'));var crypto=require(_0xbe45('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xbe45('0x8'));var querystring=require(_0xbe45('0xd'));var Papa=require('papaparse');var Redis=require(_0xbe45('0xe'));var authService=require(_0xbe45('0xf'));var qs=require(_0xbe45('0x10'));var hardwareService=require(_0xbe45('0x11'));var logger=require(_0xbe45('0x12'))(_0xbe45('0x13'));var utils=require(_0xbe45('0x14'));var config=require('../../config/environment');var db=require(_0xbe45('0x15'))['db'];function respondWithStatusCode(_0x557514,_0x107996){_0x107996=_0x107996||0xcc;return function(_0x4a5c36){if(_0x4a5c36){return _0x557514[_0xbe45('0x16')](_0x107996);}return _0x557514['status'](_0x107996)[_0xbe45('0x17')]();};}function respondWithResult(_0x529ac5,_0x49e435){_0x49e435=_0x49e435||0xc8;return function(_0x2f632f){if(_0x2f632f){return _0x529ac5[_0xbe45('0x18')](_0x49e435)['json'](_0x2f632f);}};}function respondWithFilteredResult(_0x1cb0b2,_0x2732ff){return function(_0x18d5a0){if(_0x18d5a0){var _0x4e2691=_0x18d5a0[_0xbe45('0x19')],_0xa1bf3f=_0x2732ff[_0xbe45('0x1a')],_0x3da47f=_0x2732ff[_0xbe45('0x1a')]+_0x2732ff[_0xbe45('0x1b')],_0x2a2ac1;if(_0x3da47f>=_0x4e2691){_0x3da47f=_0x4e2691;_0x2a2ac1=0xc8;}else{_0x2a2ac1=0xce;}_0x1cb0b2[_0xbe45('0x18')](_0x2a2ac1);return _0x1cb0b2[_0xbe45('0x1c')]('Content-Range',_0xa1bf3f+'-'+_0x3da47f+'/'+_0x4e2691)['json'](_0x18d5a0);}return null;};}function patchUpdates(_0x3e3891){return function(_0x3dd36a){try{jsonpatch[_0xbe45('0x1d')](_0x3dd36a,_0x3e3891,!![]);}catch(_0x520c58){return BPromise[_0xbe45('0x1e')](_0x520c58);}return _0x3dd36a[_0xbe45('0x1f')]();};}function saveUpdates(_0x206486,_0xeb1acb){return function(_0x2ece5f){if(_0x2ece5f){return _0x2ece5f['update'](_0x206486)[_0xbe45('0x20')](function(_0x4c00f8){return _0x4c00f8;});}return null;};}function removeEntity(_0x418f4f,_0xe86bcb){return function(_0x29b6c4){if(_0x29b6c4){return _0x29b6c4[_0xbe45('0x21')]()[_0xbe45('0x20')](function(){_0x418f4f['status'](0xcc)[_0xbe45('0x17')]();});}};}function handleEntityNotFound(_0x52eb79,_0x19c25a){return function(_0x199b8d){if(!_0x199b8d){_0x52eb79[_0xbe45('0x16')](0x194);}return _0x199b8d;};}function handleError(_0x1572b4,_0xae1a54){_0xae1a54=_0xae1a54||0x1f4;return function(_0x44c190){logger[_0xbe45('0x22')](_0x44c190[_0xbe45('0x23')]);if(_0x44c190[_0xbe45('0x24')]){delete _0x44c190['name'];}_0x1572b4[_0xbe45('0x18')](_0xae1a54)[_0xbe45('0x25')](_0x44c190);};}exports[_0xbe45('0x26')]=function(_0x2ea914,_0x1a133d){var _0x51922f={},_0x551ae3={},_0x18024a={'count':0x0,'rows':[]};var _0x2c83f4=db[_0xbe45('0x27')]['rawAttributes'];_0x551ae3[_0xbe45('0x28')]=_['keys'](_0x2c83f4);_0x551ae3[_0xbe45('0x29')]=_['keys'](_0x2ea914[_0xbe45('0x29')]);_0x551ae3[_0xbe45('0x2a')]=_[_0xbe45('0x2b')](_0x551ae3[_0xbe45('0x28')],_0x551ae3[_0xbe45('0x29')]);_0x51922f[_0xbe45('0x2c')]=_[_0xbe45('0x2b')](_0x551ae3[_0xbe45('0x28')],qs[_0xbe45('0x2d')](_0x2ea914[_0xbe45('0x29')][_0xbe45('0x2d')]));_0x51922f[_0xbe45('0x2c')]=_0x51922f[_0xbe45('0x2c')][_0xbe45('0x2e')]?_0x51922f[_0xbe45('0x2c')]:_0x551ae3[_0xbe45('0x28')];if(!_0x2ea914[_0xbe45('0x29')]['hasOwnProperty'](_0xbe45('0x2f'))){_0x51922f[_0xbe45('0x1b')]=qs[_0xbe45('0x1b')](_0x2ea914[_0xbe45('0x29')][_0xbe45('0x1b')]);_0x51922f[_0xbe45('0x1a')]=qs[_0xbe45('0x1a')](_0x2ea914[_0xbe45('0x29')][_0xbe45('0x1a')]);}_0x51922f[_0xbe45('0x30')]=qs[_0xbe45('0x31')](_0x2ea914[_0xbe45('0x29')]['sort']);_0x51922f[_0xbe45('0x32')]=qs[_0xbe45('0x2a')](_['pick'](_0x2ea914[_0xbe45('0x29')],_0x551ae3[_0xbe45('0x2a')]));if(_0x2ea914['query'][_0xbe45('0x33')]){_0x51922f[_0xbe45('0x32')]=_['merge'](_0x51922f[_0xbe45('0x32')],{'$or':_[_0xbe45('0x34')](_0x2c83f4,function(_0x578815){if(_0x578815[_0xbe45('0x35')][_0xbe45('0x36')]!==_0xbe45('0x37')){var _0x29d08b={};_0x29d08b[_0x578815[_0xbe45('0x38')]]={'$like':'%'+_0x2ea914[_0xbe45('0x29')][_0xbe45('0x33')]+'%'};return _0x29d08b;}})});}_0x51922f=_['merge']({},_0x51922f,_0x2ea914[_0xbe45('0x39')]);var _0x45cf34={'where':_0x51922f[_0xbe45('0x32')]};return db['SmsApplication']['count'](_0x45cf34)['then'](function(_0x99cbfb){_0x18024a['count']=_0x99cbfb;if(_0x2ea914[_0xbe45('0x29')][_0xbe45('0x3a')]){_0x51922f['include']=[{'all':!![]}];}return db['SmsApplication'][_0xbe45('0x3b')](_0x51922f);})['then'](function(_0x5a9842){_0x18024a[_0xbe45('0x3c')]=_0x5a9842;return _0x18024a;})[_0xbe45('0x20')](respondWithFilteredResult(_0x1a133d,_0x51922f))[_0xbe45('0x3d')](handleError(_0x1a133d,null));};exports[_0xbe45('0x3e')]=function(_0x7efdec,_0x1de341){var _0x3e9a27={'raw':!![],'where':{'id':_0x7efdec['params']['id']}},_0x2a255f={};_0x2a255f[_0xbe45('0x28')]=_[_0xbe45('0x3f')](db[_0xbe45('0x27')][_0xbe45('0x40')]);_0x2a255f['query']=_['keys'](_0x7efdec['query']);_0x2a255f['filters']=_[_0xbe45('0x2b')](_0x2a255f[_0xbe45('0x28')],_0x2a255f[_0xbe45('0x29')]);_0x3e9a27[_0xbe45('0x2c')]=_[_0xbe45('0x2b')](_0x2a255f[_0xbe45('0x28')],qs[_0xbe45('0x2d')](_0x7efdec[_0xbe45('0x29')][_0xbe45('0x2d')]));_0x3e9a27[_0xbe45('0x2c')]=_0x3e9a27[_0xbe45('0x2c')][_0xbe45('0x2e')]?_0x3e9a27['attributes']:_0x2a255f[_0xbe45('0x28')];if(_0x7efdec[_0xbe45('0x29')]['includeAll']){_0x3e9a27[_0xbe45('0x41')]=[{'all':!![]}];}_0x3e9a27=_[_0xbe45('0x42')]({},_0x3e9a27,_0x7efdec['options']);return db[_0xbe45('0x27')]['find'](_0x3e9a27)[_0xbe45('0x20')](handleEntityNotFound(_0x1de341,null))[_0xbe45('0x20')](respondWithResult(_0x1de341,null))[_0xbe45('0x3d')](handleError(_0x1de341,null));};exports[_0xbe45('0x43')]=function(_0x202052,_0x39c91b){return db[_0xbe45('0x27')][_0xbe45('0x43')](_0x202052[_0xbe45('0x44')],{})['then'](respondWithResult(_0x39c91b,0xc9))[_0xbe45('0x3d')](handleError(_0x39c91b,null));};exports[_0xbe45('0x45')]=function(_0x3b8ca2,_0x2eab99){if(_0x3b8ca2[_0xbe45('0x44')]['id']){delete _0x3b8ca2['body']['id'];}return db[_0xbe45('0x27')][_0xbe45('0x46')]({'where':{'id':_0x3b8ca2[_0xbe45('0x47')]['id']}})['then'](handleEntityNotFound(_0x2eab99,null))[_0xbe45('0x20')](saveUpdates(_0x3b8ca2['body'],null))['then'](respondWithResult(_0x2eab99,null))['catch'](handleError(_0x2eab99,null));};exports['destroy']=function(_0x30ede7,_0x5c54a3){return db[_0xbe45('0x27')][_0xbe45('0x46')]({'where':{'id':_0x30ede7[_0xbe45('0x47')]['id']}})[_0xbe45('0x20')](handleEntityNotFound(_0x5c54a3,null))['then'](removeEntity(_0x5c54a3,null))[_0xbe45('0x3d')](handleError(_0x5c54a3,null));};
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.model.js b/server/api/smsApplication/smsApplication.model.js
index 0b10887..b3e2d33 100644
--- a/server/api/smsApplication/smsApplication.model.js
+++ b/server/api/smsApplication/smsApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x66fa=['rimraf','../../config/environment','define','SmsApplication','sms_applications','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path'];(function(_0x2afc3b,_0x445fe8){var _0x3ae690=function(_0x8ed44e){while(--_0x8ed44e){_0x2afc3b['push'](_0x2afc3b['shift']());}};_0x3ae690(++_0x445fe8);}(_0x66fa,0x117));var _0xa66f=function(_0x1e92e4,_0x59fa49){_0x1e92e4=_0x1e92e4-0x0;var _0x44ce0d=_0x66fa[_0x1e92e4];return _0x44ce0d;};'use strict';var _=require(_0xa66f('0x0'));var util=require(_0xa66f('0x1'));var logger=require('../../config/logger')(_0xa66f('0x2'));var moment=require(_0xa66f('0x3'));var BPromise=require(_0xa66f('0x4'));var rp=require(_0xa66f('0x5'));var fs=require('fs');var path=require(_0xa66f('0x6'));var rimraf=require(_0xa66f('0x7'));var config=require(_0xa66f('0x8'));var attributes=require('./smsApplication.attributes');module['exports']=function(_0x2239d3,_0x20a150){return _0x2239d3[_0xa66f('0x9')](_0xa66f('0xa'),attributes,{'tableName':_0xa66f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xa66f('0xc')});};
\ No newline at end of file
+var _0x4975=['path','rimraf','../../config/environment','./smsApplication.attributes','exports','SmsApplication','sms_applications','utf8mb4','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x419956,_0x320f04){var _0x275c62=function(_0x24afe0){while(--_0x24afe0){_0x419956['push'](_0x419956['shift']());}};_0x275c62(++_0x320f04);}(_0x4975,0x86));var _0x5497=function(_0xe3f79d,_0x2c3431){_0xe3f79d=_0xe3f79d-0x0;var _0x5aeab5=_0x4975[_0xe3f79d];return _0x5aeab5;};'use strict';var _=require(_0x5497('0x0'));var util=require('util');var logger=require(_0x5497('0x1'))(_0x5497('0x2'));var moment=require(_0x5497('0x3'));var BPromise=require(_0x5497('0x4'));var rp=require(_0x5497('0x5'));var fs=require('fs');var path=require(_0x5497('0x6'));var rimraf=require(_0x5497('0x7'));var config=require(_0x5497('0x8'));var attributes=require(_0x5497('0x9'));module[_0x5497('0xa')]=function(_0x539a27,_0x37e48d){return _0x539a27['define'](_0x5497('0xb'),attributes,{'tableName':_0x5497('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5497('0xd'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.rpc.js b/server/api/smsApplication/smsApplication.rpc.js
index e43f0ab..5a1062b 100644
--- a/server/api/smsApplication/smsApplication.rpc.js
+++ b/server/api/smsApplication/smsApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcac9=['util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','debug','SmsApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SmsApplication,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x24693e,_0x2ba888){var _0x53e672=function(_0x5f6cff){while(--_0x5f6cff){_0x24693e['push'](_0x24693e['shift']());}};_0x53e672(++_0x2ba888);}(_0xcac9,0x18f));var _0x9cac=function(_0x1347f8,_0x233feb){_0x1347f8=_0x1347f8-0x0;var _0x218368=_0xcac9[_0x1347f8];return _0x218368;};'use strict';var _=require(_0x9cac('0x0'));var util=require(_0x9cac('0x1'));var moment=require(_0x9cac('0x2'));var BPromise=require('bluebird');var rs=require(_0x9cac('0x3'));var fs=require('fs');var Redis=require(_0x9cac('0x4'));var db=require(_0x9cac('0x5'))['db'];var utils=require(_0x9cac('0x6'));var logger=require(_0x9cac('0x7'))(_0x9cac('0x8'));var config=require(_0x9cac('0x9'));var jayson=require(_0x9cac('0xa'));var client=jayson[_0x9cac('0xb')][_0x9cac('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xe2b7d,_0x1f0226,_0x3c1c45){return new BPromise(function(_0x13a8a5,_0x44c131){return client[_0x9cac('0xd')](_0xe2b7d,_0x3c1c45)['then'](function(_0x38895c){logger[_0x9cac('0xe')]('SmsApplication,\x20%s,\x20%s',_0x1f0226,'request\x20sent');logger[_0x9cac('0xf')](_0x9cac('0x10'),_0x1f0226,_0x9cac('0x11'),JSON[_0x9cac('0x12')](_0x38895c));if(_0x38895c['error']){if(_0x38895c[_0x9cac('0x13')][_0x9cac('0x14')]===0x1f4){logger[_0x9cac('0x13')](_0x9cac('0x15'),_0x1f0226,_0x38895c[_0x9cac('0x13')]['message']);return _0x44c131(_0x38895c[_0x9cac('0x13')]['message']);}logger['error'](_0x9cac('0x15'),_0x1f0226,_0x38895c['error']['message']);return _0x13a8a5(_0x38895c[_0x9cac('0x13')][_0x9cac('0x16')]);}else{logger[_0x9cac('0xe')]('SmsApplication,\x20%s,\x20%s',_0x1f0226,'request\x20sent');_0x13a8a5(_0x38895c[_0x9cac('0x17')][_0x9cac('0x16')]);}})[_0x9cac('0x18')](function(_0x2067c4){logger['error']('SmsApplication,\x20%s,\x20%s',_0x1f0226,_0x2067c4);_0x44c131(_0x2067c4);});});}
\ No newline at end of file
+var _0x3ad6=['util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash'];(function(_0x2b0f81,_0x3917f0){var _0x5ce74c=function(_0x12dc0d){while(--_0x12dc0d){_0x2b0f81['push'](_0x2b0f81['shift']());}};_0x5ce74c(++_0x3917f0);}(_0x3ad6,0xc5));var _0x63ad=function(_0xd1e9df,_0x5cd235){_0xd1e9df=_0xd1e9df-0x0;var _0x1b33a9=_0x3ad6[_0xd1e9df];return _0x1b33a9;};'use strict';var _=require(_0x63ad('0x0'));var util=require(_0x63ad('0x1'));var moment=require(_0x63ad('0x2'));var BPromise=require(_0x63ad('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x63ad('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x63ad('0x5'));var logger=require(_0x63ad('0x6'))(_0x63ad('0x7'));var config=require('../../config/environment');var jayson=require(_0x63ad('0x8'));var client=jayson[_0x63ad('0x9')][_0x63ad('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf34bed,_0x5ba585,_0x3088f5){return new BPromise(function(_0x23eca5,_0x215f1c){return client[_0x63ad('0xb')](_0xf34bed,_0x3088f5)[_0x63ad('0xc')](function(_0x20178b){logger[_0x63ad('0xd')](_0x63ad('0xe'),_0x5ba585,_0x63ad('0xf'));logger[_0x63ad('0x10')](_0x63ad('0x11'),_0x5ba585,_0x63ad('0xf'),JSON['stringify'](_0x20178b));if(_0x20178b[_0x63ad('0x12')]){if(_0x20178b['error']['code']===0x1f4){logger['error'](_0x63ad('0xe'),_0x5ba585,_0x20178b[_0x63ad('0x12')][_0x63ad('0x13')]);return _0x215f1c(_0x20178b['error']['message']);}logger[_0x63ad('0x12')](_0x63ad('0xe'),_0x5ba585,_0x20178b['error']['message']);return _0x23eca5(_0x20178b[_0x63ad('0x12')][_0x63ad('0x13')]);}else{logger[_0x63ad('0xd')](_0x63ad('0xe'),_0x5ba585,_0x63ad('0xf'));_0x23eca5(_0x20178b[_0x63ad('0x14')]['message']);}})[_0x63ad('0x15')](function(_0x3d9eae){logger[_0x63ad('0x12')](_0x63ad('0xe'),_0x5ba585,_0x3d9eae);_0x215f1c(_0x3d9eae);});});}
\ No newline at end of file
diff --git a/server/api/smsInteraction/index.js b/server/api/smsInteraction/index.js
index 1c82140..8c58686 100644
--- a/server/api/smsInteraction/index.js
+++ b/server/api/smsInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x54a1=['../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','getMessages','download','create','post','/:id/tags','tracked','sms','smsinteraction:addtags','addTags','put','smsinteraction:update','update','delete','destroy','removeTags','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x1b2702,_0x6462f3){var _0x52190c=function(_0x4f8c6d){while(--_0x4f8c6d){_0x1b2702['push'](_0x1b2702['shift']());}};_0x52190c(++_0x6462f3);}(_0x54a1,0x1ba));var _0x154a=function(_0x40220a,_0x22feb1){_0x40220a=_0x40220a-0x0;var _0x3903cc=_0x54a1[_0x40220a];return _0x3903cc;};'use strict';var multer=require(_0x154a('0x0'));var util=require(_0x154a('0x1'));var path=require(_0x154a('0x2'));var timeout=require(_0x154a('0x3'));var express=require(_0x154a('0x4'));var router=express[_0x154a('0x5')]();var auth=require(_0x154a('0x6'));var interaction=require(_0x154a('0x7'));var config=require('../../config/environment');var controller=require('./smsInteraction.controller');router[_0x154a('0x8')]('/',auth[_0x154a('0x9')](),controller[_0x154a('0xa')]);router[_0x154a('0x8')](_0x154a('0xb'),auth['isAuthenticated'](),controller[_0x154a('0xc')]);router[_0x154a('0x8')](_0x154a('0xd'),auth[_0x154a('0x9')](),controller[_0x154a('0xe')]);router['get'](_0x154a('0xf'),auth['isAuthenticated'](),controller[_0x154a('0x10')]);router['get']('/:id/download',auth[_0x154a('0x9')](),controller[_0x154a('0x11')]);router['post']('/',auth[_0x154a('0x9')](),controller[_0x154a('0x12')]);router['post'](_0x154a('0xf'),auth[_0x154a('0x9')](),controller['addMessage']);router[_0x154a('0x13')](_0x154a('0x14'),auth[_0x154a('0x9')](),interaction[_0x154a('0x15')](_0x154a('0x16'),_0x154a('0x17')),controller[_0x154a('0x18')]);router[_0x154a('0x19')](_0x154a('0xd'),auth[_0x154a('0x9')](),interaction[_0x154a('0x15')](_0x154a('0x16'),_0x154a('0x1a')),controller[_0x154a('0x1b')]);router[_0x154a('0x1c')](_0x154a('0xd'),auth[_0x154a('0x9')](),interaction[_0x154a('0x15')](_0x154a('0x16'),'smsinteraction:destroy'),controller[_0x154a('0x1d')]);router[_0x154a('0x1c')](_0x154a('0x14'),auth[_0x154a('0x9')](),controller[_0x154a('0x1e')]);module[_0x154a('0x1f')]=router;
\ No newline at end of file
+var _0x47d2=['/:id/tags','tracked','sms','smsinteraction:addtags','addTags','put','smsinteraction:update','update','delete','smsinteraction:destroy','destroy','removeTags','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','/:id/download','download','post','create','addMessage'];(function(_0xf10840,_0xad3916){var _0x1fdf7e=function(_0x463be3){while(--_0x463be3){_0xf10840['push'](_0xf10840['shift']());}};_0x1fdf7e(++_0xad3916);}(_0x47d2,0x12c));var _0x247d=function(_0x100b7b,_0x3ecafe){_0x100b7b=_0x100b7b-0x0;var _0x121458=_0x47d2[_0x100b7b];return _0x121458;};'use strict';var multer=require(_0x247d('0x0'));var util=require('util');var path=require(_0x247d('0x1'));var timeout=require(_0x247d('0x2'));var express=require(_0x247d('0x3'));var router=express[_0x247d('0x4')]();var auth=require(_0x247d('0x5'));var interaction=require(_0x247d('0x6'));var config=require('../../config/environment');var controller=require('./smsInteraction.controller');router[_0x247d('0x7')]('/',auth[_0x247d('0x8')](),controller[_0x247d('0x9')]);router[_0x247d('0x7')](_0x247d('0xa'),auth[_0x247d('0x8')](),controller[_0x247d('0xb')]);router[_0x247d('0x7')](_0x247d('0xc'),auth[_0x247d('0x8')](),controller[_0x247d('0xd')]);router['get'](_0x247d('0xe'),auth[_0x247d('0x8')](),controller['getMessages']);router[_0x247d('0x7')](_0x247d('0xf'),auth[_0x247d('0x8')](),controller[_0x247d('0x10')]);router[_0x247d('0x11')]('/',auth[_0x247d('0x8')](),controller[_0x247d('0x12')]);router[_0x247d('0x11')](_0x247d('0xe'),auth[_0x247d('0x8')](),controller[_0x247d('0x13')]);router['post'](_0x247d('0x14'),auth[_0x247d('0x8')](),interaction[_0x247d('0x15')](_0x247d('0x16'),_0x247d('0x17')),controller[_0x247d('0x18')]);router[_0x247d('0x19')]('/:id',auth['isAuthenticated'](),interaction['tracked']('sms',_0x247d('0x1a')),controller[_0x247d('0x1b')]);router[_0x247d('0x1c')](_0x247d('0xc'),auth[_0x247d('0x8')](),interaction['tracked'](_0x247d('0x16'),_0x247d('0x1d')),controller[_0x247d('0x1e')]);router['delete'](_0x247d('0x14'),auth[_0x247d('0x8')](),controller[_0x247d('0x1f')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.attributes.js b/server/api/smsInteraction/smsInteraction.attributes.js
index 2e5d4ed..d5cc762 100644
--- a/server/api/smsInteraction/smsInteraction.attributes.js
+++ b/server/api/smsInteraction/smsInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x201a=['exports','BOOLEAN','DATE','STRING','ENUM','out','sequelize','moment'];(function(_0x5725fd,_0x2556e9){var _0x56510a=function(_0x475de7){while(--_0x475de7){_0x5725fd['push'](_0x5725fd['shift']());}};_0x56510a(++_0x2556e9);}(_0x201a,0x176));var _0xa201=function(_0x333b6d,_0x3bd1ee){_0x333b6d=_0x333b6d-0x0;var _0xcd6d9b=_0x201a[_0x333b6d];return _0xcd6d9b;};'use strict';var Sequelize=require(_0xa201('0x0'));var moment=require(_0xa201('0x1'));module[_0xa201('0x2')]={'closed':{'type':Sequelize[_0xa201('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xa201('0x4')]},'disposition':{'type':Sequelize[_0xa201('0x5')]},'note':{'type':Sequelize[_0xa201('0x5')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0xa201('0x4')]},'firstMsgDirection':{'type':Sequelize[_0xa201('0x6')]('in',_0xa201('0x7')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xa201('0x6')]('in',_0xa201('0x7')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
+var _0x1c8d=['exports','STRING','DATE','out','ENUM','sequelize','moment'];(function(_0x56e469,_0x134f1f){var _0x459c64=function(_0x5ad2f0){while(--_0x5ad2f0){_0x56e469['push'](_0x56e469['shift']());}};_0x459c64(++_0x134f1f);}(_0x1c8d,0x155));var _0xd1c8=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x1c8d[_0x6c993a];return _0x27f547;};'use strict';var Sequelize=require(_0xd1c8('0x0'));var moment=require(_0xd1c8('0x1'));module[_0xd1c8('0x2')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xd1c8('0x3')]},'note':{'type':Sequelize[_0xd1c8('0x3')]},'phone':{'type':Sequelize[_0xd1c8('0x3')]},'read1stAt':{'type':Sequelize[_0xd1c8('0x4')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xd1c8('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xd1c8('0x4')]},'lastMsgDirection':{'type':Sequelize[_0xd1c8('0x6')]('in',_0xd1c8('0x5')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.controller.js b/server/api/smsInteraction/smsInteraction.controller.js
index 1904f19..f1c2e0b 100644
--- a/server/api/smsInteraction/smsInteraction.controller.js
+++ b/server/api/smsInteraction/smsInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xba5b=['select','field','tools_tags','sms_messages','me.direction\x20=\x20\x27in\x27','me.read\x20=\x20false','u.id','ui.SmsInteractionId','user_has_sms_interactions','left_join','users','u.id\x20=\x20ui.UserId','sms_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','a.id\x20=\x20i.SmsAccountId','me.SmsInteractionId\x20=\x20i.id','expr','parse','advancedFilter','forEach','createdAt','value','dateStart','startOf','day','utc','format','and','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','isArray','condition','TagId','Messages.count','tableAlias','\x20IN\x20?','\x20=\x20?','ContactId','\x20LIKE\x20?','c.lastName','c.email','LIKE','c.firstName','\x20>\x20?','isNil','SmsAccountId','i.SmsAccountId\x20IN\x20?','concat','$gte','$lte','null','\x20IS\x20NULL','filter','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','toString','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','DESC','group','i.id','QueryTypes','SELECT','clone','COUNT(*)','read','%s\x20=\x200','having','`Messages.count`\x20=\x200','%s\x20>\x200','`Messages.count`\x20>\x200','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','it.SmsInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','t.id\x20IN\x20?','mail_interaction_has_tags','it.MailInteractionId\x20=\x20i.id','sequelize','keyBy','Account.key','i.*','Contact.firstName','Contact.lastName','Contact.email','c.phone','Contact.phone','Contact.mobile','c.fax','Contact.fax','GROUP_CONCAT(DISTINCT\x20t.id)','sms_interaction_has_tags','ui.SmsInteractionId\x20IN\x20?','groupBy','SmsInteractionId','all','show','params','include','merge','options','find','create','body','update','describe','addMessage','ids','omit','getMessages','findOne','nolimit','YYYY-MM-DD\x20HH:mm:ss','includeAll','rows','setTags','spread','Tag','findAll','color','emit','smsInteractionTags:save','removeTags','download','unix','join','root','server','files','transcript-%d-%s.zip','Messages','direction','secret','User','CmContact','firstName','SmsAccount','Account','fullname','get','40px','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Interaction\x20Transcript \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','30px',' \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{page}}/{{pages}} \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','%s\x20#%d','Sms','YYYY-MM-DD','closed','out','Contact','lastName','downloadInteraction.html','toFile','transcript-','.pdf','log','err','unlinkSync','html-pdf','eml-format','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','count','offset','limit','set','Content-Range','apply','reject','save','destroy','end','error','stack','name','send','unreadMessages','SmsMessage','then','Users','map','Tags','TagIds','split','push','catch','SmsInteraction','rawAttributes','keys','query','filters','intersection','attributes','fields','length','model','hasOwnProperty','order','sort','where'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xba5b,0xa1));var _0xbba5=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xba5b[_0x2be8c2];return _0x97f531;};'use strict';var pdf=require(_0xbba5('0x0'));var emlformat=require(_0xbba5('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xbba5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbba5('0x3'));var moment=require('moment');var BPromise=require(_0xbba5('0x4'));var Mustache=require(_0xbba5('0x5'));var util=require(_0xbba5('0x6'));var path=require(_0xbba5('0x7'));var sox=require(_0xbba5('0x8'));var csv=require(_0xbba5('0x9'));var ejs=require(_0xbba5('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xbba5('0xb'));var crypto=require(_0xbba5('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xbba5('0xd'));var Papa=require(_0xbba5('0xe'));var Redis=require('ioredis');var authService=require(_0xbba5('0xf'));var qs=require(_0xbba5('0x10'));var hardwareService=require(_0xbba5('0x11'));var logger=require(_0xbba5('0x12'))('api');var utils=require(_0xbba5('0x13'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0xbba5('0x14')]=_[_0xbba5('0x15')](config['redis'],{'host':_0xbba5('0x16'),'port':0x18eb});var socket=require(_0xbba5('0x17'))(new Redis(config[_0xbba5('0x14')]));require('./smsInteraction.socket')[_0xbba5('0x18')](socket);function respondWithStatusCode(_0x50321e,_0x2354cd){_0x2354cd=_0x2354cd||0xcc;return function(_0x24a819){if(_0x24a819){return _0x50321e[_0xbba5('0x19')](_0x2354cd);}return _0x50321e[_0xbba5('0x1a')](_0x2354cd)['end']();};}function respondWithResult(_0x956fa2,_0x27bb02){_0x27bb02=_0x27bb02||0xc8;return function(_0x192246){if(_0x192246){return _0x956fa2[_0xbba5('0x1a')](_0x27bb02)['json'](_0x192246);}};}function respondWithFilteredResult(_0x5d2a84,_0x266c96){return function(_0x1c8245){if(_0x1c8245){var _0x58e0bc=_0x1c8245[_0xbba5('0x1b')],_0x1ee96b=_0x266c96[_0xbba5('0x1c')],_0x1cc39a=_0x266c96[_0xbba5('0x1c')]+_0x266c96[_0xbba5('0x1d')],_0x1b96ab;if(_0x1cc39a>=_0x58e0bc){_0x1cc39a=_0x58e0bc;_0x1b96ab=0xc8;}else{_0x1b96ab=0xce;}_0x5d2a84[_0xbba5('0x1a')](_0x1b96ab);return _0x5d2a84[_0xbba5('0x1e')](_0xbba5('0x1f'),_0x1ee96b+'-'+_0x1cc39a+'/'+_0x58e0bc)['json'](_0x1c8245);}return null;};}function patchUpdates(_0x3ee7a3){return function(_0x3953cf){try{jsonpatch[_0xbba5('0x20')](_0x3953cf,_0x3ee7a3,!![]);}catch(_0x43041c){return BPromise[_0xbba5('0x21')](_0x43041c);}return _0x3953cf[_0xbba5('0x22')]();};}function saveUpdates(_0x6a7e95,_0xc70f68){return function(_0x4ffc69){if(_0x4ffc69){return _0x4ffc69['update'](_0x6a7e95)['then'](function(_0x348723){return _0x348723;});}return null;};}function removeEntity(_0x1defae,_0x5b2cd8){return function(_0x37f6ba){if(_0x37f6ba){return _0x37f6ba[_0xbba5('0x23')]()['then'](function(){_0x1defae[_0xbba5('0x1a')](0xcc)[_0xbba5('0x24')]();});}};}function handleEntityNotFound(_0x481a44,_0x3fae83){return function(_0x2728d1){if(!_0x2728d1){_0x481a44[_0xbba5('0x19')](0x194);}return _0x2728d1;};}function handleError(_0x1c145f,_0x25db9d){_0x25db9d=_0x25db9d||0x1f4;return function(_0x1244c0){logger[_0xbba5('0x25')](_0x1244c0[_0xbba5('0x26')]);if(_0x1244c0[_0xbba5('0x27')]){delete _0x1244c0[_0xbba5('0x27')];}_0x1c145f['status'](_0x25db9d)[_0xbba5('0x28')](_0x1244c0);};}function getInteractionUnreadMessages(_0x2cbf9a){return new BPromise(function(_0x3bf6b0,_0xf76917){try{if(_0x2cbf9a['closed']){_0x2cbf9a[_0xbba5('0x29')]=0x0;_0x3bf6b0(_0x2cbf9a);}else{return db[_0xbba5('0x2a')][_0xbba5('0x1b')]({'where':{'SmsInteractionId':_0x2cbf9a['id'],'direction':'in','read':![]}})[_0xbba5('0x2b')](function(_0x213c7a){_0x2cbf9a['unreadMessages']=_0x213c7a;_0x3bf6b0(_0x2cbf9a);});}}catch(_0x23fa36){_0xf76917(_0x23fa36);}});}function getInteractionUsers(_0x57508e,_0x4605ea){return new BPromise(function(_0x282b6d,_0x4de293){try{if(_0x4605ea[_0x57508e['id']]){_0x57508e[_0xbba5('0x2c')]=_[_0xbba5('0x2d')](_0x4605ea[_0x57508e['id']],function(_0x90273){return{'id':_0x90273['id']};});}}catch(_0x313f89){_0x4de293(_0x313f89);}_0x282b6d(_0x57508e);});}function getInteractionTags(_0x211753,_0x1c0bef){return new BPromise(function(_0x1f8af8,_0x5714cb){try{if(_0x211753['TagIds']){_0x211753[_0xbba5('0x2e')]=[];_0x211753[_0xbba5('0x2f')][_0xbba5('0x30')](',')['forEach'](function(_0x512d31){_0x211753['Tags'][_0xbba5('0x31')](_0x1c0bef[_0x512d31]);});}delete _0x211753[_0xbba5('0x2f')];}catch(_0x41da65){_0x5714cb(_0x41da65);}_0x1f8af8(_0x211753);});}function updateSmsInteraction(_0x28b714,_0x245365,_0x2a932a){return new BPromise(function(_0x5e9435,_0x80e172){return getInteractionUnreadMessages(_0x28b714)[_0xbba5('0x2b')](function(_0xe8ebdc){return getInteractionUsers(_0xe8ebdc,_0x2a932a);})[_0xbba5('0x2b')](function(_0x57f988){return getInteractionTags(_0x57f988,_0x245365);})[_0xbba5('0x2b')](function(_0x50b643){_0x5e9435(_0x50b643);})[_0xbba5('0x32')](function(_0x4635ab){_0x80e172(_0x4635ab);});});}exports['index']=function(_0x5b8f77,_0x4508b4){var _0x421649={},_0x54b00c={},_0x7a4cfc={'count':0x0,'rows':[]};var _0x26b464=db[_0xbba5('0x33')][_0xbba5('0x34')];_0x54b00c['model']=_[_0xbba5('0x35')](_0x26b464);_0x54b00c[_0xbba5('0x36')]=_[_0xbba5('0x35')](_0x5b8f77['query']);_0x54b00c[_0xbba5('0x37')]=_[_0xbba5('0x38')](_0x54b00c['model'],_0x54b00c[_0xbba5('0x36')]);_0x421649[_0xbba5('0x39')]=_[_0xbba5('0x38')](_0x54b00c['model'],qs['fields'](_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x3a')]));_0x421649[_0xbba5('0x39')]=_0x421649[_0xbba5('0x39')][_0xbba5('0x3b')]?_0x421649[_0xbba5('0x39')]:_0x54b00c[_0xbba5('0x3c')];if(!_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x3d')]('nolimit')){_0x421649['limit']=qs[_0xbba5('0x1d')](_0x5b8f77['query'][_0xbba5('0x1d')]);_0x421649[_0xbba5('0x1c')]=qs[_0xbba5('0x1c')](_0x5b8f77[_0xbba5('0x36')]['offset']);}_0x421649[_0xbba5('0x3e')]=qs[_0xbba5('0x3f')](_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x3f')]);_0x421649[_0xbba5('0x40')]=qs[_0xbba5('0x37')](_['pick'](_0x5b8f77[_0xbba5('0x36')],_0x54b00c[_0xbba5('0x37')]));var _0xff5da5=[];var _0x4d74c8=squel[_0xbba5('0x41')]()[_0xbba5('0x42')]('id')['field']('name')[_0xbba5('0x42')]('color')['from'](_0xbba5('0x43'));var _0x2f6055=squel[_0xbba5('0x41')]()[_0xbba5('0x42')]('COUNT(*)')['from'](_0xbba5('0x44'),'me')[_0xbba5('0x40')]('me.SmsInteractionId\x20=\x20i.id')['where'](_0xbba5('0x45'))['where'](_0xbba5('0x46'));var _0x2d08a8=squel['select']()[_0xbba5('0x42')](_0xbba5('0x47'))[_0xbba5('0x42')](_0xbba5('0x48'))['from'](_0xbba5('0x49'),'ui')[_0xbba5('0x4a')](_0xbba5('0x4b'),'u',_0xbba5('0x4c'));var _0x1b5e8e=squel[_0xbba5('0x41')]()['from'](_0xbba5('0x4d'),'i')[_0xbba5('0x4a')](_0xbba5('0x4e'),'c',_0xbba5('0x4f'))['left_join'](_0xbba5('0x4b'),'o',_0xbba5('0x50'))[_0xbba5('0x4a')]('sms_accounts','a',_0xbba5('0x51'))[_0xbba5('0x4a')](_0xbba5('0x44'),'me',_0xbba5('0x52'));var _0x5c9729=squel[_0xbba5('0x53')]();if(_0x5b8f77[_0xbba5('0x36')]['advancedFilter']){var _0x38a4e4=JSON[_0xbba5('0x54')](_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x55')]);_['keys'](_0x38a4e4)[_0xbba5('0x56')](function(_0x2f63c6){var _0x3d9776=_0x38a4e4[_0x2f63c6];if(_0x2f63c6===_0xbba5('0x57')){var _0x2b246b=moment(_0x3d9776[_0xbba5('0x58')][_0xbba5('0x59')])[_0xbba5('0x5a')](_0xbba5('0x5b'))[_0xbba5('0x5c')]()[_0xbba5('0x5d')]();var _0x4e60d6=moment(_0x4e60d6)['utc']()['endOf'](_0xbba5('0x5b'))[_0xbba5('0x5d')]();_0x5c9729[_0xbba5('0x5e')](_0xbba5('0x5f'),_0x2b246b,_0x4e60d6);}else{if(_[_0xbba5('0x60')](_0x3d9776[_0xbba5('0x61')])){_0x3d9776['condition'][_0xbba5('0x56')](function(_0x2de6dc){switch(_0x3d9776[_0xbba5('0x61')]['value']){case'IS':if(_0x2f63c6!==_0xbba5('0x62')&&_0x2f63c6!==_0xbba5('0x63')){if(_[_0xbba5('0x60')](_0x3d9776[_0xbba5('0x58')])&&_0x3d9776[_0xbba5('0x58')][_0xbba5('0x3b')]>0x1){_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x65'),_0x3d9776[_0xbba5('0x58')]);}else{_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x66'),_0x3d9776[_0xbba5('0x58')][0x0]);}}break;case'=':_0x5c9729[_0xbba5('0x5e')](_0x3d9776['tableAlias']+'.'+_0x2f63c6+'\x20=\x20?',_0x3d9776[_0xbba5('0x58')]);break;case'LIKE':if(_0x2f63c6===_0xbba5('0x67')){_0x5c9729[_0xbba5('0x5e')]('c.firstName'+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');_0x5c9729['or'](_0xbba5('0x69')+_0xbba5('0x68'),'%'+_0x3d9776['value']+'%');_0x5c9729['or'](_0xbba5('0x6a')+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');}else{_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');}break;case'>':_0x5c9729[_0xbba5('0x5e')](_0x3d9776['tableAlias']+'.'+_0x2f63c6+'\x20>\x20?',_0x3d9776['value']);break;case'<':_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+'\x20<\x20?',_0x3d9776['value']);break;}});}else{switch(_0x3d9776['condition'][_0xbba5('0x58')]){case'IS':if(_0x2f63c6!==_0xbba5('0x62')&&_0x2f63c6!==_0xbba5('0x63')){if(_[_0xbba5('0x60')](_0x3d9776['value'])&&_0x3d9776[_0xbba5('0x58')][_0xbba5('0x3b')]>0x1){_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x65'),_0x3d9776[_0xbba5('0x58')]);}else{_0x5c9729['and'](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x66'),_0x3d9776['value'][0x0]);}}break;case'=':_0x5c9729[_0xbba5('0x5e')](_0x3d9776['tableAlias']+'.'+_0x2f63c6+_0xbba5('0x66'),_0x3d9776[_0xbba5('0x58')]);break;case _0xbba5('0x6b'):if(_0x2f63c6==='ContactId'){_0x5c9729['and'](_0xbba5('0x6c')+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');_0x5c9729['or'](_0xbba5('0x69')+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');_0x5c9729['or'](_0xbba5('0x6a')+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');}else{_0x5c9729['and'](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x68'),'%'+_0x3d9776[_0xbba5('0x58')]+'%');}break;case'>':_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+_0xbba5('0x6d'),_0x3d9776[_0xbba5('0x58')]);break;case'<':_0x5c9729[_0xbba5('0x5e')](_0x3d9776[_0xbba5('0x64')]+'.'+_0x2f63c6+'\x20<\x20?',_0x3d9776[_0xbba5('0x58')]);break;}}}});}else{var _0x256947=_(Object[_0xbba5('0x35')](_0x5b8f77[_0xbba5('0x36')]))['map'](function(_0x5ee77c){return _0x26b464['hasOwnProperty'](_0x5ee77c)?_0x5ee77c:undefined;})['filter'](function(_0x487462){return!_[_0xbba5('0x6e')](_0x487462);})['value']();if(!_['isEmpty'](_0x256947)){_0x256947['forEach'](function(_0x1a8484){if(_0x1a8484===_0xbba5('0x6f')){_0x1b5e8e['where'](_0xbba5('0x70'),[][_0xbba5('0x71')](_0x5b8f77['query'][_0x1a8484]));}else if(_0x1a8484===_0xbba5('0x57')){var _0x45e8c6=JSON[_0xbba5('0x54')](_0x5b8f77[_0xbba5('0x36')][_0x1a8484])[_0xbba5('0x72')];var _0x5d056c=JSON[_0xbba5('0x54')](_0x5b8f77[_0xbba5('0x36')][_0x1a8484])[_0xbba5('0x73')];_0x1b5e8e['where'](_0xbba5('0x5f'),_0x45e8c6,_0x5d056c);}else{if(_0x5b8f77[_0xbba5('0x36')][_0x1a8484]===_0xbba5('0x74')){_0x1b5e8e['where']('i.'+_0x1a8484+_0xbba5('0x75'));}else{_0x1b5e8e[_0xbba5('0x40')]('i.'+_0x1a8484+_0xbba5('0x66'),_0x5b8f77[_0xbba5('0x36')][_0x1a8484]);}}});}if(_0x5b8f77['query'][_0xbba5('0x76')]){var _0x27e552=_0x5b8f77[_0xbba5('0x36')]['filter'][_0xbba5('0x77')]('\x5c','\x5c\x5c')[_0xbba5('0x77')]('\x27\x27',_0xbba5('0x78'));if(qs[_0xbba5('0x79')](_0x27e552)){_0x5c9729['or'](_0xbba5('0x7a'),_0x27e552+'%')['or']('i.phone\x20LIKE\x20?',_0x27e552+'%');}else{var _0xdd5ef5=[];_0x27e552[_0xbba5('0x30')]('\x20')[_0xbba5('0x56')](function(_0x50e167){_0xdd5ef5[_0xbba5('0x31')]('+'+_0x50e167[_0xbba5('0x7b')]());});var _0x170317=_0xdd5ef5['join']('\x20');_0x5c9729['or'](_0xbba5('0x7c'),_0x170317)['or'](_0xbba5('0x7d'),_0x27e552+'%');}}}_0x1b5e8e['where'](_0x5c9729);if(_0x421649['order']){_0x421649[_0xbba5('0x3e')]['forEach'](function(_0x23138c){_0x1b5e8e[_0xbba5('0x3e')]('i.'+_0x23138c[0x0],_0x23138c[0x1]===_0xbba5('0x7e')?![]:!![]);});}_0x1b5e8e[_0xbba5('0x7f')](_0xbba5('0x80'));var _0xccd017={'type':db['Sequelize'][_0xbba5('0x81')][_0xbba5('0x82')],'raw':!![]};var _0x40ca7e=_0x1b5e8e[_0xbba5('0x83')]()[_0xbba5('0x42')](_0xbba5('0x84'));if(!_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x55')]){if(_0x5b8f77[_0xbba5('0x36')]['read']){if(_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x85')]==0x1){_0x40ca7e[_0xbba5('0x40')](util[_0xbba5('0x5d')](_0xbba5('0x86'),_0x2f6055[_0xbba5('0x7b')]()));_0x1b5e8e[_0xbba5('0x87')](_0xbba5('0x88'));}else{_0x40ca7e['where'](util[_0xbba5('0x5d')](_0xbba5('0x89'),_0x2f6055[_0xbba5('0x7b')]()));_0x1b5e8e['having'](_0xbba5('0x8a'));}}if(_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x8b')]){var _0x14782b=_[_0xbba5('0x60')](_0x5b8f77['query'][_0xbba5('0x8b')])?_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x8b')]:new Array(_0x5b8f77[_0xbba5('0x36')]['tag']);var _0x2a5713=squel[_0xbba5('0x53')]();_0x14782b['forEach'](function(_0x3db5d0){_0x2a5713['or'](_0xbba5('0x8c'),'%,'+_0x3db5d0+',%');});_0x1b5e8e[_0xbba5('0x87')](_0x2a5713);_0x40ca7e['left_join']('sms_interaction_has_tags','it',_0xbba5('0x8d'));_0x40ca7e[_0xbba5('0x4a')](_0xbba5('0x43'),'t',_0xbba5('0x8e'));_0x40ca7e[_0xbba5('0x40')](_0xbba5('0x8f'),_0x14782b);}}else{var _0x38a4e4=JSON['parse'](_0x5b8f77[_0xbba5('0x36')][_0xbba5('0x55')]);_[_0xbba5('0x35')](_0x38a4e4)[_0xbba5('0x56')](function(_0x212d31){var _0x2361a5=_0x38a4e4[_0x212d31];if(_0x212d31===_0xbba5('0x62')){var _0x33c443=_0x2361a5['value'];var _0x2a3a3c=squel[_0xbba5('0x53')]();_0x33c443[_0xbba5('0x56')](function(_0x1f6baf){_0x2a3a3c['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x1f6baf+',%');});_0x1b5e8e['having'](_0x2a3a3c);_0x40ca7e[_0xbba5('0x4a')](_0xbba5('0x90'),'it',_0xbba5('0x91'));_0x40ca7e[_0xbba5('0x4a')](_0xbba5('0x43'),'t',_0xbba5('0x8e'));_0x40ca7e['where'](_0xbba5('0x8f'),_0x33c443);}else if(_0x212d31===_0xbba5('0x63')){if(_0x2361a5[_0xbba5('0x58')]['length']===0x1){if(_0x2361a5[_0xbba5('0x58')][0x0]===0x1){_0x40ca7e[_0xbba5('0x40')](util['format'](_0xbba5('0x86'),_0x2f6055[_0xbba5('0x7b')]()));_0x1b5e8e['having']('`Messages.count`\x20=\x200');}else{_0x40ca7e[_0xbba5('0x40')](util[_0xbba5('0x5d')](_0xbba5('0x89'),_0x2f6055[_0xbba5('0x7b')]()));_0x1b5e8e['having'](_0xbba5('0x8a'));}}}});}db[_0xbba5('0x92')][_0xbba5('0x36')](_0x40ca7e[_0xbba5('0x7b')](),_0xccd017)[_0xbba5('0x2b')](function(_0x31fa5f){_0x7a4cfc[_0xbba5('0x1b')]=_0x31fa5f[_0xbba5('0x3b')];if(_0x7a4cfc['count']===0x0)return[];return db[_0xbba5('0x92')]['query'](_0x4d74c8[_0xbba5('0x7b')](),_0xccd017)[_0xbba5('0x2b')](function(_0x5c9343){_0xff5da5=_[_0xbba5('0x93')](_0x5c9343,'id');_0xccd017=_['merge'](_0xccd017,{'model':db[_0xbba5('0x33')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x1b5e8e['field']('a.key',_0xbba5('0x94'));_0x1b5e8e[_0xbba5('0x42')](_0xbba5('0x95'));_0x1b5e8e[_0xbba5('0x42')](_0xbba5('0x6c'),_0xbba5('0x96'));_0x1b5e8e[_0xbba5('0x42')](_0xbba5('0x69'),_0xbba5('0x97'));_0x1b5e8e['field'](_0xbba5('0x6a'),_0xbba5('0x98'));_0x1b5e8e[_0xbba5('0x42')](_0xbba5('0x99'),_0xbba5('0x9a'));_0x1b5e8e[_0xbba5('0x42')]('c.mobile',_0xbba5('0x9b'));_0x1b5e8e[_0xbba5('0x42')](_0xbba5('0x9c'),_0xbba5('0x9d'));_0x1b5e8e['field'](_0xbba5('0x9e'),'TagIds');_0x1b5e8e['left_join'](_0xbba5('0x9f'),'it','it.SmsInteractionId\x20=\x20i.id');_0x1b5e8e['left_join'](_0xbba5('0x43'),'t','t.id\x20=\x20it.TagId');_0x1b5e8e[_0xbba5('0x1d')](_0x421649['limit']);_0x1b5e8e['offset'](_0x421649[_0xbba5('0x1c')]);return db[_0xbba5('0x92')][_0xbba5('0x36')](_0x1b5e8e[_0xbba5('0x7b')](),_0xccd017);})[_0xbba5('0x2b')](function(_0x2f5e12){_0x2d08a8[_0xbba5('0x40')](_0xbba5('0xa0'),_['map'](_0x2f5e12,'id'));return db[_0xbba5('0x92')][_0xbba5('0x36')](_0x2d08a8[_0xbba5('0x7b')](),_0xccd017)[_0xbba5('0x2b')](function(_0x517f4d){var _0x104648=_[_0xbba5('0xa1')](_0x517f4d,_0xbba5('0xa2'));var _0x2a7114=[];_0x2f5e12[_0xbba5('0x56')](function(_0x17df88){_0x2a7114[_0xbba5('0x31')](updateSmsInteraction(_0x17df88,_0xff5da5,_0x104648));});return BPromise[_0xbba5('0xa3')](_0x2a7114);});});})[_0xbba5('0x2b')](function(_0x24c247){_0x7a4cfc['rows']=_0x24c247;return _0x7a4cfc;})[_0xbba5('0x2b')](respondWithFilteredResult(_0x4508b4,_0x421649))['catch'](handleError(_0x4508b4,null));};exports[_0xbba5('0xa4')]=function(_0x149346,_0x41a2a9){var _0x13abf6={'raw':![],'where':{'id':_0x149346[_0xbba5('0xa5')]['id']}},_0x125afe={};_0x125afe[_0xbba5('0x3c')]=_[_0xbba5('0x35')](db[_0xbba5('0x33')]['rawAttributes']);_0x125afe[_0xbba5('0x36')]=_['keys'](_0x149346['query']);_0x125afe[_0xbba5('0x37')]=_[_0xbba5('0x38')](_0x125afe[_0xbba5('0x3c')],_0x125afe[_0xbba5('0x36')]);_0x13abf6['attributes']=_[_0xbba5('0x38')](_0x125afe[_0xbba5('0x3c')],qs['fields'](_0x149346[_0xbba5('0x36')]['fields']));_0x13abf6[_0xbba5('0x39')]=_0x13abf6['attributes'][_0xbba5('0x3b')]?_0x13abf6[_0xbba5('0x39')]:_0x125afe['model'];if(_0x149346[_0xbba5('0x36')]['includeAll']){_0x13abf6[_0xbba5('0xa6')]=[{'all':!![]}];}_0x13abf6=_[_0xbba5('0xa7')]({},_0x13abf6,_0x149346[_0xbba5('0xa8')]);return db[_0xbba5('0x33')][_0xbba5('0xa9')](_0x13abf6)['then'](handleEntityNotFound(_0x41a2a9,null))[_0xbba5('0x2b')](respondWithResult(_0x41a2a9,null))[_0xbba5('0x32')](handleError(_0x41a2a9,null));};exports[_0xbba5('0xaa')]=function(_0x44536e,_0x2b0563){return db[_0xbba5('0x33')][_0xbba5('0xaa')](_0x44536e[_0xbba5('0xab')],{})['then'](respondWithResult(_0x2b0563,0xc9))['catch'](handleError(_0x2b0563,null));};exports[_0xbba5('0xac')]=function(_0x41eff7,_0x25697a){if(_0x41eff7['body']['id']){delete _0x41eff7[_0xbba5('0xab')]['id'];}return db[_0xbba5('0x33')]['find']({'where':{'id':_0x41eff7['params']['id']}})['then'](handleEntityNotFound(_0x25697a,null))['then'](saveUpdates(_0x41eff7[_0xbba5('0xab')],null))[_0xbba5('0x2b')](respondWithResult(_0x25697a,null))[_0xbba5('0x32')](handleError(_0x25697a,null));};exports[_0xbba5('0x23')]=function(_0x3cd670,_0x412906){return db[_0xbba5('0x33')]['find']({'where':{'id':_0x3cd670[_0xbba5('0xa5')]['id']}})[_0xbba5('0x2b')](handleEntityNotFound(_0x412906,null))['then'](removeEntity(_0x412906,null))[_0xbba5('0x32')](handleError(_0x412906,null));};exports[_0xbba5('0xad')]=function(_0x16abd5,_0x4d3363){return db[_0xbba5('0x33')][_0xbba5('0xad')]()['then'](respondWithResult(_0x4d3363,null))['catch'](handleError(_0x4d3363,null));};exports[_0xbba5('0xae')]=function(_0x239813,_0x14614c,_0x6faae3){return db[_0xbba5('0x2a')][_0xbba5('0xa9')]({'where':{'id':_0x239813[_0xbba5('0xa5')]['id']}})['then'](handleEntityNotFound(_0x14614c,null))[_0xbba5('0x2b')](function(_0x4d5da0){if(_0x4d5da0){return _0x4d5da0[_0xbba5('0xae')](_0x239813[_0xbba5('0xab')][_0xbba5('0xaf')],_[_0xbba5('0xb0')](_0x239813['body'],[_0xbba5('0xaf'),'id'])||{});}})['then'](respondWithResult(_0x14614c,null))[_0xbba5('0x32')](handleError(_0x14614c,null));};exports[_0xbba5('0xb1')]=function(_0x15c84,_0x4ce33b,_0x4be8d7){var _0x1e6a8e={'raw':![],'where':{}};var _0x1c8043={};var _0x3a2b3b={'count':0x0,'rows':[]};return db['SmsInteraction'][_0xbba5('0xb2')]({'where':{'id':_0x15c84[_0xbba5('0xa5')]['id']}})[_0xbba5('0x2b')](handleEntityNotFound(_0x4ce33b,null))['then'](function(_0x12ec08){if(_0x12ec08){_0x1c8043[_0xbba5('0x3c')]=_[_0xbba5('0x35')](db['SmsMessage']['rawAttributes']);_0x1c8043[_0xbba5('0x36')]=_['keys'](_0x15c84[_0xbba5('0x36')]);_0x1c8043[_0xbba5('0x37')]=_[_0xbba5('0x38')](_0x1c8043[_0xbba5('0x3c')],_0x1c8043[_0xbba5('0x36')]);_0x1e6a8e[_0xbba5('0x39')]=_[_0xbba5('0x38')](_0x1c8043[_0xbba5('0x3c')],qs[_0xbba5('0x3a')](_0x15c84[_0xbba5('0x36')][_0xbba5('0x3a')]));_0x1e6a8e['attributes']=_0x1e6a8e[_0xbba5('0x39')]['length']?_0x1e6a8e[_0xbba5('0x39')]:_0x1c8043[_0xbba5('0x3c')];if(!_0x15c84[_0xbba5('0x36')][_0xbba5('0x3d')](_0xbba5('0xb3'))){_0x1e6a8e[_0xbba5('0x1d')]=qs[_0xbba5('0x1d')](_0x15c84['query'][_0xbba5('0x1d')]);_0x1e6a8e['offset']=qs[_0xbba5('0x1c')](_0x15c84['query'][_0xbba5('0x1c')]);}_0x1e6a8e[_0xbba5('0x3e')]=qs[_0xbba5('0x3f')](_0x15c84['query']['sort']);_0x1e6a8e[_0xbba5('0x40')]=qs[_0xbba5('0x37')](_['pick'](_0x15c84[_0xbba5('0x36')],_0x1c8043[_0xbba5('0x37')]));_0x1e6a8e[_0xbba5('0x40')][_0xbba5('0xa2')]=_0x12ec08['id'];if(_0x15c84[_0xbba5('0x36')][_0xbba5('0x76')]){_0x1e6a8e['where']=_[_0xbba5('0xa7')](_0x1e6a8e[_0xbba5('0x40')],{'$or':_[_0xbba5('0x2d')](_0x1e6a8e['attributes'],function(_0x276a3e){var _0x3af6c9={};_0x3af6c9[_0x276a3e]={'$like':'%'+_0x15c84[_0xbba5('0x36')]['filter']+'%'};return _0x3af6c9;})});}if(_0x15c84[_0xbba5('0x36')][_0xbba5('0x72')]){var _0xc4e3da=_0x15c84[_0xbba5('0x36')][_0xbba5('0x72')][_0xbba5('0x30')](',');var _0x417938={};_0x417938[_0xc4e3da[0x0]]={'$gte':moment(_0xc4e3da[0x1])['format'](_0xbba5('0xb4'))};_0x1e6a8e[_0xbba5('0x40')]=_[_0xbba5('0xa7')](_0x1e6a8e[_0xbba5('0x40')],_0x417938);}_0x1e6a8e=_[_0xbba5('0xa7')]({},_0x1e6a8e,_0x15c84[_0xbba5('0xa8')]);return db[_0xbba5('0x2a')][_0xbba5('0x1b')]({'where':_0x1e6a8e['where']})[_0xbba5('0x2b')](function(_0x1dac1f){_0x3a2b3b[_0xbba5('0x1b')]=_0x1dac1f;if(_0x15c84['query'][_0xbba5('0xb5')]){_0x1e6a8e[_0xbba5('0xa6')]=[{'all':!![]}];}return db[_0xbba5('0x2a')]['findAll'](_0x1e6a8e);})['then'](function(_0x5824f5){_0x3a2b3b[_0xbba5('0xb6')]=_0x5824f5;return _0x3a2b3b;});}})['then'](respondWithFilteredResult(_0x4ce33b,_0x1e6a8e))['catch'](handleError(_0x4ce33b,null));};exports['addTags']=function(_0x5c0f6e,_0xeb9def,_0x1fc108){return db['SmsInteraction'][_0xbba5('0xa9')]({'where':{'id':_0x5c0f6e[_0xbba5('0xa5')]['id']}})[_0xbba5('0x2b')](handleEntityNotFound(_0xeb9def,null))[_0xbba5('0x2b')](function(_0xcae8a7){if(_0xcae8a7){return _0xcae8a7[_0xbba5('0xb7')](_0x5c0f6e[_0xbba5('0xab')][_0xbba5('0xaf')],_[_0xbba5('0xb0')](_0x5c0f6e[_0xbba5('0xab')],[_0xbba5('0xaf'),'id'])||{})[_0xbba5('0xb8')](function(){return db[_0xbba5('0xb9')][_0xbba5('0xba')]({'attributes':['id',_0xbba5('0x27'),_0xbba5('0xbb')],'where':{'id':_0x5c0f6e[_0xbba5('0xab')][_0xbba5('0xaf')]}});})[_0xbba5('0x2b')](function(_0x230041){socket[_0xbba5('0xbc')](_0xbba5('0xbd'),{'id':Number(_0x5c0f6e[_0xbba5('0xa5')]['id']),'tags':_0x230041||[]});return{'id':Number(_0x5c0f6e[_0xbba5('0xa5')]['id']),'tags':_0x230041||[]};});}})[_0xbba5('0x2b')](respondWithResult(_0xeb9def,null))[_0xbba5('0x32')](handleError(_0xeb9def,null));};exports[_0xbba5('0xbe')]=function(_0xd6078e,_0x4307e0,_0x28bb1d){return db[_0xbba5('0x33')][_0xbba5('0xa9')]({'where':{'id':_0xd6078e[_0xbba5('0xa5')]['id']}})[_0xbba5('0x2b')](handleEntityNotFound(_0x4307e0,null))[_0xbba5('0x2b')](function(_0x55566b){if(_0x55566b){return _0x55566b[_0xbba5('0xbe')](_0xd6078e['query'][_0xbba5('0xaf')]);}})[_0xbba5('0x2b')](respondWithStatusCode(_0x4307e0,null))[_0xbba5('0x32')](handleError(_0x4307e0,null));};exports[_0xbba5('0xbf')]=function(_0x205ba1,_0x52e02d){var _0x33922a=moment()[_0xbba5('0xc0')]()['toString']();var _0x54035d=path[_0xbba5('0xc1')](config[_0xbba5('0xc2')],_0xbba5('0xc3'),_0xbba5('0xc4'),'tmp');var _0x361d12=path[_0xbba5('0xc1')](config[_0xbba5('0xc2')],'server',_0xbba5('0xc4'),'attachments');var _0x2fa63f=path[_0xbba5('0xc1')](_0x54035d,_0x33922a);var _0x5b87f2=util['format'](_0xbba5('0xc5'),_0x205ba1[_0xbba5('0xa5')]['id'],_0x33922a);var _0x109dd9=path[_0xbba5('0xc1')](_0x54035d,_0x5b87f2);var _0xa7299d=![];return db[_0xbba5('0x33')][_0xbba5('0xa9')]({'where':{'id':_0x205ba1[_0xbba5('0xa5')]['id']},'include':[{'model':db[_0xbba5('0x2a')],'as':_0xbba5('0xc6'),'attributes':['id',_0xbba5('0xab'),_0xbba5('0x57'),_0xbba5('0xc7'),_0xbba5('0xc8')],'include':[{'model':db['User'],'as':_0xbba5('0xc9'),'attributes':['id','fullname'],'raw':!![]},{'model':db[_0xbba5('0xca')],'as':'Contact','attributes':['id',_0xbba5('0xcb'),'lastName'],'raw':!![]}]},{'model':db[_0xbba5('0xcc')],'as':_0xbba5('0xcd'),'attributes':['id',_0xbba5('0x27')]},{'model':db['User'],'as':'Owner','attributes':['id',_0xbba5('0xce')]}]})[_0xbba5('0x2b')](handleEntityNotFound(_0x52e02d,null))[_0xbba5('0x2b')](function(_0x507213){if(_0x507213){var _0x5796ca=_0x507213[_0xbba5('0xcf')]({'plain':!![]});_0xa7299d=!![];var _0x281708={'format':'A4','border':'10px','header':{'height':_0xbba5('0xd0'),'contents':{'first':_0xbba5('0xd1')}},'footer':{'height':_0xbba5('0xd2'),'contents':{'default':util[_0xbba5('0x5d')](_0xbba5('0xd3'),util[_0xbba5('0x5d')](_0xbba5('0xd4'),_0xbba5('0xd5'),_0x5796ca['id']),moment()[_0xbba5('0x5d')](_0xbba5('0xd6'))[_0xbba5('0x7b')]())}}};fs['mkdirSync'](_0x2fa63f);var _0x5de78f={'channel':_0xbba5('0xd5'),'account':_0x5796ca[_0xbba5('0xcd')]['name'],'agent':_0x5796ca['Owner']?_0x5796ca['Owner'][_0xbba5('0xce')]:'N.A.','createdAt':moment(_0x5796ca[_0xbba5('0x57')])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0xbba5('0x7b')](),'closedAt':_0x5796ca[_0xbba5('0xd7')]?moment(_0x5796ca['closedAt'])['format'](_0xbba5('0xb4'))[_0xbba5('0x7b')]():'','disposition':_0x5796ca['disposition'],'messages':_(_0x5796ca[_0xbba5('0xc6')])[_0xbba5('0x76')]({'secret':![]})[_0xbba5('0x2d')](function(_0x5703c0){return{'date':moment(_0x5703c0[_0xbba5('0x57')])[_0xbba5('0x5d')](_0xbba5('0xb4'))['toString'](),'sender':_0x5703c0['direction']===_0xbba5('0xd8')?_0x5703c0[_0xbba5('0xc9')]?_0x5703c0[_0xbba5('0xc9')]['fullname']:'System':_0x5703c0['Contact'][_0xbba5('0xcb')]+(_0x5703c0[_0xbba5('0xd9')][_0xbba5('0xda')]?'\x20'+_0x5703c0[_0xbba5('0xd9')][_0xbba5('0xda')]:''),'body':_0x5703c0[_0xbba5('0xab')],'direction':_0x5703c0[_0xbba5('0xc7')]===_0xbba5('0xd8')?'A':'C','secret':_0x5703c0[_0xbba5('0xc8')]};})[_0xbba5('0x58')]()};return ejs['renderFile'](path[_0xbba5('0xc1')](config[_0xbba5('0xc2')],_0xbba5('0xc3'),'views',_0xbba5('0xdb')),{'interaction':_0x5de78f})[_0xbba5('0x2b')](function(_0x28bc81){return new BPromise(function(_0x218665,_0x20cdcc){pdf[_0xbba5('0xaa')](_0x28bc81,_0x281708)[_0xbba5('0xdc')](path[_0xbba5('0xc1')](_0x2fa63f,_0xbba5('0xdd')+_0x5796ca['id']+'-'+_0x33922a+_0xbba5('0xde')),function(_0x37656a,_0x31df66){if(_0x37656a)return _0x20cdcc(_0x37656a);_0x218665(_0x31df66);});});});}})[_0xbba5('0x2b')](function(){if(_0xa7299d){return new BPromise(function(_0x38399d,_0x5aca47){zipdir(_0x2fa63f,{'saveTo':_0x109dd9},function(_0x468549,_0x1e3cec){if(_0x468549)return _0x5aca47(_0x468549);return _0x38399d(_0x1e3cec);});})[_0xbba5('0x2b')](function(){return new BPromise(function(_0x3af299,_0x37d759){rimraf(_0x2fa63f,function(_0x174705){if(_0x174705)_0x37d759(_0x174705);return _0x3af299();});});})[_0xbba5('0x2b')](function(){return _0x52e02d['download'](_0x109dd9,_0x5b87f2,function(_0x5db798){if(_0x5db798){console[_0xbba5('0xdf')](_0xbba5('0xe0'),_0x5db798);}else{fs[_0xbba5('0xe1')](_0x109dd9);}});});}else{return _0x52e02d['sendStatus'](0xc8);}})[_0xbba5('0x32')](handleError(_0x52e02d,null));};
\ No newline at end of file
+var _0xf15e=['then','error','name','send','closed','unreadMessages','SmsMessage','Users','map','Tags','TagIds','split','push','catch','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','select','field','color','from','tools_tags','me.SmsInteractionId\x20=\x20i.id','me.direction\x20=\x20\x27in\x27','u.id','user_has_sms_interactions','left_join','users','sms_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','a.id\x20=\x20i.SmsAccountId','sms_messages','expr','parse','advancedFilter','forEach','createdAt','value','dateStart','startOf','day','utc','format','endOf','and','isArray','condition','Messages.count','tableAlias','\x20IN\x20?','\x20=\x20?','LIKE','ContactId','c.firstName','\x20LIKE\x20?','c.lastName','c.email','\x20>\x20?','\x20<\x20?','TagId','filter','isNil','SmsAccountId','i.SmsAccountId\x20IN\x20?','concat','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20IS\x20NULL','replace','\x27\x27\x27\x27','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','join','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','DESC','group','i.id','Sequelize','QueryTypes','SELECT','clone','COUNT(*)','read','%s\x20=\x200','toString','having','`Messages.count`\x20=\x200','`Messages.count`\x20>\x200','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','it.SmsInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','mail_interaction_has_tags','t.id\x20IN\x20?','%s\x20>\x200','keyBy','SmsInteraction','a.key','Account.key','i.*','Contact.firstName','Contact.lastName','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','GROUP_CONCAT(DISTINCT\x20t.id)','sms_interaction_has_tags','sequelize','ui.SmsInteractionId\x20IN\x20?','groupBy','all','rows','includeAll','include','merge','options','find','create','body','params','describe','addMessage','ids','findOne','SmsInteractionId','findAll','addTags','setTags','omit','spread','emit','removeTags','download','root','tmp','files','attachments','direction','secret','User','CmContact','Contact','firstName','lastName','SmsAccount','Account','get','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Interaction\x20Transcript \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','30px',' \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{page}}/{{pages}} \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%s \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','%s\x20#%d','Sms','YYYY-MM-DD','Owner','N.A.','YYYY-MM-DD\x20HH:mm:ss','closedAt','disposition','Messages','out','fullname','System','toFile','transcript-','.pdf','log','err','unlinkSync','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','end','json','count','offset','limit','status','Content-Range','reject','save','update','destroy'];(function(_0x4b1032,_0x36952e){var _0x5a1d55=function(_0x282e9b){while(--_0x282e9b){_0x4b1032['push'](_0x4b1032['shift']());}};_0x5a1d55(++_0x36952e);}(_0xf15e,0xb9));var _0xef15=function(_0x326462,_0x45f1c3){_0x326462=_0x326462-0x0;var _0x4cc34b=_0xf15e[_0x326462];return _0x4cc34b;};'use strict';var pdf=require(_0xef15('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xef15('0x1'));var zipdir=require(_0xef15('0x2'));var jsonpatch=require(_0xef15('0x3'));var rp=require(_0xef15('0x4'));var moment=require(_0xef15('0x5'));var BPromise=require(_0xef15('0x6'));var Mustache=require('mustache');var util=require(_0xef15('0x7'));var path=require(_0xef15('0x8'));var sox=require(_0xef15('0x9'));var csv=require(_0xef15('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xef15('0xb'));var squel=require(_0xef15('0xc'));var crypto=require(_0xef15('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xef15('0xe'));var toCsv=require(_0xef15('0xa'));var querystring=require(_0xef15('0xf'));var Papa=require(_0xef15('0x10'));var Redis=require('ioredis');var authService=require(_0xef15('0x11'));var qs=require(_0xef15('0x12'));var hardwareService=require(_0xef15('0x13'));var logger=require('../../config/logger')(_0xef15('0x14'));var utils=require(_0xef15('0x15'));var config=require(_0xef15('0x16'));var db=require(_0xef15('0x17'))['db'];config[_0xef15('0x18')]=_['defaults'](config['redis'],{'host':_0xef15('0x19'),'port':0x18eb});var socket=require(_0xef15('0x1a'))(new Redis(config[_0xef15('0x18')]));require('./smsInteraction.socket')[_0xef15('0x1b')](socket);function respondWithStatusCode(_0x536148,_0x1ee1fc){_0x1ee1fc=_0x1ee1fc||0xcc;return function(_0x28896d){if(_0x28896d){return _0x536148[_0xef15('0x1c')](_0x1ee1fc);}return _0x536148['status'](_0x1ee1fc)[_0xef15('0x1d')]();};}function respondWithResult(_0x5de063,_0x5b526f){_0x5b526f=_0x5b526f||0xc8;return function(_0x3122ee){if(_0x3122ee){return _0x5de063['status'](_0x5b526f)[_0xef15('0x1e')](_0x3122ee);}};}function respondWithFilteredResult(_0x153ca2,_0x3bf2ff){return function(_0x2454a9){if(_0x2454a9){var _0x437843=_0x2454a9[_0xef15('0x1f')],_0x4c086a=_0x3bf2ff[_0xef15('0x20')],_0x393047=_0x3bf2ff['offset']+_0x3bf2ff[_0xef15('0x21')],_0x2ea603;if(_0x393047>=_0x437843){_0x393047=_0x437843;_0x2ea603=0xc8;}else{_0x2ea603=0xce;}_0x153ca2[_0xef15('0x22')](_0x2ea603);return _0x153ca2['set'](_0xef15('0x23'),_0x4c086a+'-'+_0x393047+'/'+_0x437843)[_0xef15('0x1e')](_0x2454a9);}return null;};}function patchUpdates(_0x47f78c){return function(_0x57bea0){try{jsonpatch['apply'](_0x57bea0,_0x47f78c,!![]);}catch(_0x4280e3){return BPromise[_0xef15('0x24')](_0x4280e3);}return _0x57bea0[_0xef15('0x25')]();};}function saveUpdates(_0x564a5f,_0x33f8de){return function(_0x592ec5){if(_0x592ec5){return _0x592ec5[_0xef15('0x26')](_0x564a5f)['then'](function(_0x539709){return _0x539709;});}return null;};}function removeEntity(_0x23c6a8,_0x10c887){return function(_0x54163e){if(_0x54163e){return _0x54163e[_0xef15('0x27')]()[_0xef15('0x28')](function(){_0x23c6a8['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x220b6d,_0x172f5b){return function(_0x165bec){if(!_0x165bec){_0x220b6d[_0xef15('0x1c')](0x194);}return _0x165bec;};}function handleError(_0xc91dd3,_0x14e1bc){_0x14e1bc=_0x14e1bc||0x1f4;return function(_0x418d77){logger[_0xef15('0x29')](_0x418d77['stack']);if(_0x418d77[_0xef15('0x2a')]){delete _0x418d77['name'];}_0xc91dd3['status'](_0x14e1bc)[_0xef15('0x2b')](_0x418d77);};}function getInteractionUnreadMessages(_0x464612){return new BPromise(function(_0x41aab5,_0x144d72){try{if(_0x464612[_0xef15('0x2c')]){_0x464612[_0xef15('0x2d')]=0x0;_0x41aab5(_0x464612);}else{return db[_0xef15('0x2e')][_0xef15('0x1f')]({'where':{'SmsInteractionId':_0x464612['id'],'direction':'in','read':![]}})['then'](function(_0x826a0d){_0x464612[_0xef15('0x2d')]=_0x826a0d;_0x41aab5(_0x464612);});}}catch(_0x5ab7fd){_0x144d72(_0x5ab7fd);}});}function getInteractionUsers(_0x40cd9e,_0x170c50){return new BPromise(function(_0x4b894f,_0x2ee2b3){try{if(_0x170c50[_0x40cd9e['id']]){_0x40cd9e[_0xef15('0x2f')]=_[_0xef15('0x30')](_0x170c50[_0x40cd9e['id']],function(_0x1fa054){return{'id':_0x1fa054['id']};});}}catch(_0xbe1723){_0x2ee2b3(_0xbe1723);}_0x4b894f(_0x40cd9e);});}function getInteractionTags(_0x318c29,_0x44e07d){return new BPromise(function(_0x234739,_0x2f2eee){try{if(_0x318c29['TagIds']){_0x318c29[_0xef15('0x31')]=[];_0x318c29[_0xef15('0x32')][_0xef15('0x33')](',')['forEach'](function(_0x3db124){_0x318c29[_0xef15('0x31')][_0xef15('0x34')](_0x44e07d[_0x3db124]);});}delete _0x318c29[_0xef15('0x32')];}catch(_0x5123ab){_0x2f2eee(_0x5123ab);}_0x234739(_0x318c29);});}function updateSmsInteraction(_0x200311,_0x1575cb,_0x228d3d){return new BPromise(function(_0x1d6a6b,_0x4f94bb){return getInteractionUnreadMessages(_0x200311)[_0xef15('0x28')](function(_0x2c2c34){return getInteractionUsers(_0x2c2c34,_0x228d3d);})['then'](function(_0x49535b){return getInteractionTags(_0x49535b,_0x1575cb);})[_0xef15('0x28')](function(_0x1044ac){_0x1d6a6b(_0x1044ac);})[_0xef15('0x35')](function(_0x5b8126){_0x4f94bb(_0x5b8126);});});}exports[_0xef15('0x36')]=function(_0x3ee1e7,_0x2ed023){var _0x28e92d={},_0x18e607={},_0x194f8f={'count':0x0,'rows':[]};var _0xc0e1e=db['SmsInteraction'][_0xef15('0x37')];_0x18e607[_0xef15('0x38')]=_[_0xef15('0x39')](_0xc0e1e);_0x18e607[_0xef15('0x3a')]=_['keys'](_0x3ee1e7[_0xef15('0x3a')]);_0x18e607[_0xef15('0x3b')]=_[_0xef15('0x3c')](_0x18e607['model'],_0x18e607[_0xef15('0x3a')]);_0x28e92d[_0xef15('0x3d')]=_[_0xef15('0x3c')](_0x18e607[_0xef15('0x38')],qs[_0xef15('0x3e')](_0x3ee1e7['query'][_0xef15('0x3e')]));_0x28e92d[_0xef15('0x3d')]=_0x28e92d[_0xef15('0x3d')][_0xef15('0x3f')]?_0x28e92d[_0xef15('0x3d')]:_0x18e607[_0xef15('0x38')];if(!_0x3ee1e7['query'][_0xef15('0x40')](_0xef15('0x41'))){_0x28e92d['limit']=qs[_0xef15('0x21')](_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x21')]);_0x28e92d[_0xef15('0x20')]=qs['offset'](_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x20')]);}_0x28e92d[_0xef15('0x42')]=qs['sort'](_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x43')]);_0x28e92d[_0xef15('0x44')]=qs['filters'](_['pick'](_0x3ee1e7['query'],_0x18e607[_0xef15('0x3b')]));var _0x219416=[];var _0x4cad03=squel[_0xef15('0x45')]()[_0xef15('0x46')]('id')[_0xef15('0x46')](_0xef15('0x2a'))[_0xef15('0x46')](_0xef15('0x47'))[_0xef15('0x48')](_0xef15('0x49'));var _0x35c72c=squel[_0xef15('0x45')]()[_0xef15('0x46')]('COUNT(*)')[_0xef15('0x48')]('sms_messages','me')[_0xef15('0x44')](_0xef15('0x4a'))[_0xef15('0x44')](_0xef15('0x4b'))[_0xef15('0x44')]('me.read\x20=\x20false');var _0x2b9f6d=squel[_0xef15('0x45')]()[_0xef15('0x46')](_0xef15('0x4c'))[_0xef15('0x46')]('ui.SmsInteractionId')['from'](_0xef15('0x4d'),'ui')[_0xef15('0x4e')](_0xef15('0x4f'),'u','u.id\x20=\x20ui.UserId');var _0x439d85=squel[_0xef15('0x45')]()[_0xef15('0x48')](_0xef15('0x50'),'i')[_0xef15('0x4e')](_0xef15('0x51'),'c',_0xef15('0x52'))[_0xef15('0x4e')](_0xef15('0x4f'),'o','o.id\x20=\x20i.UserId')[_0xef15('0x4e')]('sms_accounts','a',_0xef15('0x53'))[_0xef15('0x4e')](_0xef15('0x54'),'me','me.SmsInteractionId\x20=\x20i.id');var _0x5f2e2c=squel[_0xef15('0x55')]();if(_0x3ee1e7['query']['advancedFilter']){var _0x5f4831=JSON[_0xef15('0x56')](_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x57')]);_['keys'](_0x5f4831)[_0xef15('0x58')](function(_0x4f38a4){var _0x53bbd3=_0x5f4831[_0x4f38a4];if(_0x4f38a4===_0xef15('0x59')){var _0x1575a4=moment(_0x53bbd3[_0xef15('0x5a')][_0xef15('0x5b')])[_0xef15('0x5c')](_0xef15('0x5d'))[_0xef15('0x5e')]()[_0xef15('0x5f')]();var _0x1ede91=moment(_0x1ede91)[_0xef15('0x5e')]()[_0xef15('0x60')](_0xef15('0x5d'))['format']();_0x5f2e2c[_0xef15('0x61')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x1575a4,_0x1ede91);}else{if(_[_0xef15('0x62')](_0x53bbd3[_0xef15('0x63')])){_0x53bbd3[_0xef15('0x63')][_0xef15('0x58')](function(_0x478fa8){switch(_0x53bbd3[_0xef15('0x63')]['value']){case'IS':if(_0x4f38a4!=='TagId'&&_0x4f38a4!==_0xef15('0x64')){if(_[_0xef15('0x62')](_0x53bbd3['value'])&&_0x53bbd3[_0xef15('0x5a')]['length']>0x1){_0x5f2e2c[_0xef15('0x61')](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x66'),_0x53bbd3[_0xef15('0x5a')]);}else{_0x5f2e2c['and'](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x67'),_0x53bbd3[_0xef15('0x5a')][0x0]);}}break;case'=':_0x5f2e2c[_0xef15('0x61')](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+'\x20=\x20?',_0x53bbd3[_0xef15('0x5a')]);break;case _0xef15('0x68'):if(_0x4f38a4===_0xef15('0x69')){_0x5f2e2c[_0xef15('0x61')](_0xef15('0x6a')+_0xef15('0x6b'),'%'+_0x53bbd3[_0xef15('0x5a')]+'%');_0x5f2e2c['or'](_0xef15('0x6c')+'\x20LIKE\x20?','%'+_0x53bbd3['value']+'%');_0x5f2e2c['or'](_0xef15('0x6d')+'\x20LIKE\x20?','%'+_0x53bbd3[_0xef15('0x5a')]+'%');}else{_0x5f2e2c[_0xef15('0x61')](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x6b'),'%'+_0x53bbd3[_0xef15('0x5a')]+'%');}break;case'>':_0x5f2e2c[_0xef15('0x61')](_0x53bbd3['tableAlias']+'.'+_0x4f38a4+_0xef15('0x6e'),_0x53bbd3[_0xef15('0x5a')]);break;case'<':_0x5f2e2c[_0xef15('0x61')](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x6f'),_0x53bbd3['value']);break;}});}else{switch(_0x53bbd3[_0xef15('0x63')]['value']){case'IS':if(_0x4f38a4!==_0xef15('0x70')&&_0x4f38a4!=='Messages.count'){if(_['isArray'](_0x53bbd3['value'])&&_0x53bbd3[_0xef15('0x5a')][_0xef15('0x3f')]>0x1){_0x5f2e2c[_0xef15('0x61')](_0x53bbd3['tableAlias']+'.'+_0x4f38a4+_0xef15('0x66'),_0x53bbd3['value']);}else{_0x5f2e2c[_0xef15('0x61')](_0x53bbd3['tableAlias']+'.'+_0x4f38a4+_0xef15('0x67'),_0x53bbd3[_0xef15('0x5a')][0x0]);}}break;case'=':_0x5f2e2c[_0xef15('0x61')](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x67'),_0x53bbd3[_0xef15('0x5a')]);break;case _0xef15('0x68'):if(_0x4f38a4===_0xef15('0x69')){_0x5f2e2c['and'](_0xef15('0x6a')+_0xef15('0x6b'),'%'+_0x53bbd3['value']+'%');_0x5f2e2c['or'](_0xef15('0x6c')+_0xef15('0x6b'),'%'+_0x53bbd3[_0xef15('0x5a')]+'%');_0x5f2e2c['or'](_0xef15('0x6d')+'\x20LIKE\x20?','%'+_0x53bbd3[_0xef15('0x5a')]+'%');}else{_0x5f2e2c[_0xef15('0x61')](_0x53bbd3['tableAlias']+'.'+_0x4f38a4+_0xef15('0x6b'),'%'+_0x53bbd3[_0xef15('0x5a')]+'%');}break;case'>':_0x5f2e2c['and'](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x6e'),_0x53bbd3['value']);break;case'<':_0x5f2e2c[_0xef15('0x61')](_0x53bbd3[_0xef15('0x65')]+'.'+_0x4f38a4+_0xef15('0x6f'),_0x53bbd3[_0xef15('0x5a')]);break;}}}});}else{var _0x3e0032=_(Object['keys'](_0x3ee1e7[_0xef15('0x3a')]))[_0xef15('0x30')](function(_0x247ce6){return _0xc0e1e[_0xef15('0x40')](_0x247ce6)?_0x247ce6:undefined;})[_0xef15('0x71')](function(_0x5b66b6){return!_[_0xef15('0x72')](_0x5b66b6);})[_0xef15('0x5a')]();if(!_['isEmpty'](_0x3e0032)){_0x3e0032[_0xef15('0x58')](function(_0x4a233e){if(_0x4a233e===_0xef15('0x73')){_0x439d85[_0xef15('0x44')](_0xef15('0x74'),[][_0xef15('0x75')](_0x3ee1e7[_0xef15('0x3a')][_0x4a233e]));}else if(_0x4a233e===_0xef15('0x59')){var _0x44ab40=JSON[_0xef15('0x56')](_0x3ee1e7['query'][_0x4a233e])[_0xef15('0x76')];var _0x3ee014=JSON['parse'](_0x3ee1e7[_0xef15('0x3a')][_0x4a233e])[_0xef15('0x77')];_0x439d85['where'](_0xef15('0x78'),_0x44ab40,_0x3ee014);}else{if(_0x3ee1e7[_0xef15('0x3a')][_0x4a233e]==='null'){_0x439d85[_0xef15('0x44')]('i.'+_0x4a233e+_0xef15('0x79'));}else{_0x439d85[_0xef15('0x44')]('i.'+_0x4a233e+_0xef15('0x67'),_0x3ee1e7[_0xef15('0x3a')][_0x4a233e]);}}});}if(_0x3ee1e7[_0xef15('0x3a')]['filter']){var _0x130613=_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x71')][_0xef15('0x7a')]('\x5c','\x5c\x5c')[_0xef15('0x7a')]('\x27\x27',_0xef15('0x7b'));if(qs['isNumeric'](_0x130613)){_0x5f2e2c['or'](_0xef15('0x7c'),_0x130613+'%')['or'](_0xef15('0x7d'),_0x130613+'%');}else{var _0x5b0ccc=[];_0x130613[_0xef15('0x33')]('\x20')[_0xef15('0x58')](function(_0x1f4610){_0x5b0ccc[_0xef15('0x34')]('+'+_0x1f4610['toString']());});var _0x511a79=_0x5b0ccc[_0xef15('0x7e')]('\x20');_0x5f2e2c['or'](_0xef15('0x7f'),_0x511a79)['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x130613+'%');}}}_0x439d85['where'](_0x5f2e2c);if(_0x28e92d[_0xef15('0x42')]){_0x28e92d[_0xef15('0x42')]['forEach'](function(_0x497ca1){_0x439d85[_0xef15('0x42')]('i.'+_0x497ca1[0x0],_0x497ca1[0x1]===_0xef15('0x80')?![]:!![]);});}_0x439d85[_0xef15('0x81')](_0xef15('0x82'));var _0x1c52c7={'type':db[_0xef15('0x83')][_0xef15('0x84')][_0xef15('0x85')],'raw':!![]};var _0x44f924=_0x439d85[_0xef15('0x86')]()[_0xef15('0x46')](_0xef15('0x87'));if(!_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x57')]){if(_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x88')]){if(_0x3ee1e7['query'][_0xef15('0x88')]==0x1){_0x44f924[_0xef15('0x44')](util['format'](_0xef15('0x89'),_0x35c72c[_0xef15('0x8a')]()));_0x439d85[_0xef15('0x8b')](_0xef15('0x8c'));}else{_0x44f924['where'](util[_0xef15('0x5f')]('%s\x20>\x200',_0x35c72c[_0xef15('0x8a')]()));_0x439d85[_0xef15('0x8b')](_0xef15('0x8d'));}}if(_0x3ee1e7[_0xef15('0x3a')]['tag']){var _0x350f76=_[_0xef15('0x62')](_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x8e')])?_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x8e')]:new Array(_0x3ee1e7[_0xef15('0x3a')][_0xef15('0x8e')]);var _0x4f3aeb=squel[_0xef15('0x55')]();_0x350f76[_0xef15('0x58')](function(_0x418810){_0x4f3aeb['or'](_0xef15('0x8f'),'%,'+_0x418810+',%');});_0x439d85[_0xef15('0x8b')](_0x4f3aeb);_0x44f924[_0xef15('0x4e')]('sms_interaction_has_tags','it',_0xef15('0x90'));_0x44f924['left_join']('tools_tags','t',_0xef15('0x91'));_0x44f924[_0xef15('0x44')]('t.id\x20IN\x20?',_0x350f76);}}else{var _0x5f4831=JSON['parse'](_0x3ee1e7['query'][_0xef15('0x57')]);_[_0xef15('0x39')](_0x5f4831)[_0xef15('0x58')](function(_0x16ad2a){var _0x2d8700=_0x5f4831[_0x16ad2a];if(_0x16ad2a==='TagId'){var _0x23768a=_0x2d8700[_0xef15('0x5a')];var _0x17b551=squel[_0xef15('0x55')]();_0x23768a[_0xef15('0x58')](function(_0x5f267d){_0x17b551['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x5f267d+',%');});_0x439d85[_0xef15('0x8b')](_0x17b551);_0x44f924[_0xef15('0x4e')](_0xef15('0x92'),'it','it.MailInteractionId\x20=\x20i.id');_0x44f924[_0xef15('0x4e')](_0xef15('0x49'),'t','t.id\x20=\x20it.TagId');_0x44f924[_0xef15('0x44')](_0xef15('0x93'),_0x23768a);}else if(_0x16ad2a===_0xef15('0x64')){if(_0x2d8700[_0xef15('0x5a')][_0xef15('0x3f')]===0x1){if(_0x2d8700[_0xef15('0x5a')][0x0]===0x1){_0x44f924[_0xef15('0x44')](util[_0xef15('0x5f')](_0xef15('0x89'),_0x35c72c[_0xef15('0x8a')]()));_0x439d85['having'](_0xef15('0x8c'));}else{_0x44f924[_0xef15('0x44')](util[_0xef15('0x5f')](_0xef15('0x94'),_0x35c72c[_0xef15('0x8a')]()));_0x439d85['having'](_0xef15('0x8d'));}}}});}db['sequelize'][_0xef15('0x3a')](_0x44f924['toString'](),_0x1c52c7)[_0xef15('0x28')](function(_0x5c29ad){_0x194f8f[_0xef15('0x1f')]=_0x5c29ad[_0xef15('0x3f')];if(_0x194f8f[_0xef15('0x1f')]===0x0)return[];return db['sequelize'][_0xef15('0x3a')](_0x4cad03['toString'](),_0x1c52c7)[_0xef15('0x28')](function(_0x3385b8){_0x219416=_[_0xef15('0x95')](_0x3385b8,'id');_0x1c52c7=_['merge'](_0x1c52c7,{'model':db[_0xef15('0x96')],'mapToModel':!![],'raw':!![],'nest':!![]});_0x439d85[_0xef15('0x46')](_0xef15('0x97'),_0xef15('0x98'));_0x439d85[_0xef15('0x46')](_0xef15('0x99'));_0x439d85['field']('c.firstName',_0xef15('0x9a'));_0x439d85[_0xef15('0x46')](_0xef15('0x6c'),_0xef15('0x9b'));_0x439d85[_0xef15('0x46')]('c.email',_0xef15('0x9c'));_0x439d85[_0xef15('0x46')](_0xef15('0x9d'),_0xef15('0x9e'));_0x439d85[_0xef15('0x46')](_0xef15('0x9f'),_0xef15('0xa0'));_0x439d85[_0xef15('0x46')](_0xef15('0xa1'),'Contact.fax');_0x439d85['field'](_0xef15('0xa2'),'TagIds');_0x439d85[_0xef15('0x4e')](_0xef15('0xa3'),'it','it.SmsInteractionId\x20=\x20i.id');_0x439d85['left_join'](_0xef15('0x49'),'t',_0xef15('0x91'));_0x439d85['limit'](_0x28e92d[_0xef15('0x21')]);_0x439d85[_0xef15('0x20')](_0x28e92d[_0xef15('0x20')]);return db[_0xef15('0xa4')][_0xef15('0x3a')](_0x439d85[_0xef15('0x8a')](),_0x1c52c7);})[_0xef15('0x28')](function(_0x4e7a48){_0x2b9f6d['where'](_0xef15('0xa5'),_[_0xef15('0x30')](_0x4e7a48,'id'));return db[_0xef15('0xa4')][_0xef15('0x3a')](_0x2b9f6d[_0xef15('0x8a')](),_0x1c52c7)['then'](function(_0x154fac){var _0x24d2ef=_[_0xef15('0xa6')](_0x154fac,'SmsInteractionId');var _0x1de597=[];_0x4e7a48[_0xef15('0x58')](function(_0x11a409){_0x1de597[_0xef15('0x34')](updateSmsInteraction(_0x11a409,_0x219416,_0x24d2ef));});return BPromise[_0xef15('0xa7')](_0x1de597);});});})['then'](function(_0x50224e){_0x194f8f[_0xef15('0xa8')]=_0x50224e;return _0x194f8f;})[_0xef15('0x28')](respondWithFilteredResult(_0x2ed023,_0x28e92d))[_0xef15('0x35')](handleError(_0x2ed023,null));};exports['show']=function(_0x16ad71,_0x4826e0){var _0x3d951a={'raw':![],'where':{'id':_0x16ad71['params']['id']}},_0x32b9ba={};_0x32b9ba[_0xef15('0x38')]=_[_0xef15('0x39')](db[_0xef15('0x96')][_0xef15('0x37')]);_0x32b9ba[_0xef15('0x3a')]=_['keys'](_0x16ad71[_0xef15('0x3a')]);_0x32b9ba[_0xef15('0x3b')]=_[_0xef15('0x3c')](_0x32b9ba[_0xef15('0x38')],_0x32b9ba[_0xef15('0x3a')]);_0x3d951a['attributes']=_[_0xef15('0x3c')](_0x32b9ba[_0xef15('0x38')],qs['fields'](_0x16ad71[_0xef15('0x3a')][_0xef15('0x3e')]));_0x3d951a[_0xef15('0x3d')]=_0x3d951a[_0xef15('0x3d')][_0xef15('0x3f')]?_0x3d951a[_0xef15('0x3d')]:_0x32b9ba['model'];if(_0x16ad71[_0xef15('0x3a')][_0xef15('0xa9')]){_0x3d951a[_0xef15('0xaa')]=[{'all':!![]}];}_0x3d951a=_[_0xef15('0xab')]({},_0x3d951a,_0x16ad71[_0xef15('0xac')]);return db[_0xef15('0x96')][_0xef15('0xad')](_0x3d951a)['then'](handleEntityNotFound(_0x4826e0,null))[_0xef15('0x28')](respondWithResult(_0x4826e0,null))[_0xef15('0x35')](handleError(_0x4826e0,null));};exports[_0xef15('0xae')]=function(_0x11f002,_0x36d743){return db['SmsInteraction'][_0xef15('0xae')](_0x11f002[_0xef15('0xaf')],{})[_0xef15('0x28')](respondWithResult(_0x36d743,0xc9))[_0xef15('0x35')](handleError(_0x36d743,null));};exports[_0xef15('0x26')]=function(_0x32a929,_0x49e17a){if(_0x32a929[_0xef15('0xaf')]['id']){delete _0x32a929[_0xef15('0xaf')]['id'];}return db['SmsInteraction']['find']({'where':{'id':_0x32a929[_0xef15('0xb0')]['id']}})['then'](handleEntityNotFound(_0x49e17a,null))[_0xef15('0x28')](saveUpdates(_0x32a929[_0xef15('0xaf')],null))['then'](respondWithResult(_0x49e17a,null))[_0xef15('0x35')](handleError(_0x49e17a,null));};exports['destroy']=function(_0xa33eb9,_0x15cc09){return db[_0xef15('0x96')][_0xef15('0xad')]({'where':{'id':_0xa33eb9['params']['id']}})[_0xef15('0x28')](handleEntityNotFound(_0x15cc09,null))['then'](removeEntity(_0x15cc09,null))[_0xef15('0x35')](handleError(_0x15cc09,null));};exports[_0xef15('0xb1')]=function(_0x3406e2,_0x261413){return db[_0xef15('0x96')]['describe']()[_0xef15('0x28')](respondWithResult(_0x261413,null))[_0xef15('0x35')](handleError(_0x261413,null));};exports[_0xef15('0xb2')]=function(_0x5d08ae,_0xb72f89,_0x587794){return db[_0xef15('0x2e')][_0xef15('0xad')]({'where':{'id':_0x5d08ae[_0xef15('0xb0')]['id']}})[_0xef15('0x28')](handleEntityNotFound(_0xb72f89,null))['then'](function(_0x4a72de){if(_0x4a72de){return _0x4a72de[_0xef15('0xb2')](_0x5d08ae[_0xef15('0xaf')][_0xef15('0xb3')],_['omit'](_0x5d08ae[_0xef15('0xaf')],[_0xef15('0xb3'),'id'])||{});}})[_0xef15('0x28')](respondWithResult(_0xb72f89,null))['catch'](handleError(_0xb72f89,null));};exports['getMessages']=function(_0x4c881f,_0x1551aa,_0x24e676){var _0x1a0f99={'raw':![],'where':{}};var _0x43c20e={};var _0x42d954={'count':0x0,'rows':[]};return db[_0xef15('0x96')][_0xef15('0xb4')]({'where':{'id':_0x4c881f[_0xef15('0xb0')]['id']}})['then'](handleEntityNotFound(_0x1551aa,null))[_0xef15('0x28')](function(_0x2e969c){if(_0x2e969c){_0x43c20e['model']=_[_0xef15('0x39')](db[_0xef15('0x2e')][_0xef15('0x37')]);_0x43c20e[_0xef15('0x3a')]=_['keys'](_0x4c881f['query']);_0x43c20e[_0xef15('0x3b')]=_[_0xef15('0x3c')](_0x43c20e['model'],_0x43c20e[_0xef15('0x3a')]);_0x1a0f99[_0xef15('0x3d')]=_[_0xef15('0x3c')](_0x43c20e[_0xef15('0x38')],qs[_0xef15('0x3e')](_0x4c881f['query']['fields']));_0x1a0f99['attributes']=_0x1a0f99[_0xef15('0x3d')][_0xef15('0x3f')]?_0x1a0f99[_0xef15('0x3d')]:_0x43c20e[_0xef15('0x38')];if(!_0x4c881f['query'][_0xef15('0x40')](_0xef15('0x41'))){_0x1a0f99[_0xef15('0x21')]=qs[_0xef15('0x21')](_0x4c881f['query'][_0xef15('0x21')]);_0x1a0f99['offset']=qs[_0xef15('0x20')](_0x4c881f['query'][_0xef15('0x20')]);}_0x1a0f99['order']=qs['sort'](_0x4c881f[_0xef15('0x3a')][_0xef15('0x43')]);_0x1a0f99['where']=qs['filters'](_['pick'](_0x4c881f[_0xef15('0x3a')],_0x43c20e[_0xef15('0x3b')]));_0x1a0f99[_0xef15('0x44')][_0xef15('0xb5')]=_0x2e969c['id'];if(_0x4c881f[_0xef15('0x3a')][_0xef15('0x71')]){_0x1a0f99['where']=_['merge'](_0x1a0f99[_0xef15('0x44')],{'$or':_['map'](_0x1a0f99[_0xef15('0x3d')],function(_0x18588a){var _0x3fdae6={};_0x3fdae6[_0x18588a]={'$like':'%'+_0x4c881f[_0xef15('0x3a')][_0xef15('0x71')]+'%'};return _0x3fdae6;})});}if(_0x4c881f['query']['$gte']){var _0x78cfd=_0x4c881f['query'][_0xef15('0x76')][_0xef15('0x33')](',');var _0x18f333={};_0x18f333[_0x78cfd[0x0]]={'$gte':moment(_0x78cfd[0x1])[_0xef15('0x5f')]('YYYY-MM-DD\x20HH:mm:ss')};_0x1a0f99[_0xef15('0x44')]=_[_0xef15('0xab')](_0x1a0f99['where'],_0x18f333);}_0x1a0f99=_[_0xef15('0xab')]({},_0x1a0f99,_0x4c881f[_0xef15('0xac')]);return db[_0xef15('0x2e')][_0xef15('0x1f')]({'where':_0x1a0f99['where']})[_0xef15('0x28')](function(_0x47c6fa){_0x42d954[_0xef15('0x1f')]=_0x47c6fa;if(_0x4c881f[_0xef15('0x3a')][_0xef15('0xa9')]){_0x1a0f99['include']=[{'all':!![]}];}return db[_0xef15('0x2e')][_0xef15('0xb6')](_0x1a0f99);})['then'](function(_0xea4de9){_0x42d954[_0xef15('0xa8')]=_0xea4de9;return _0x42d954;});}})[_0xef15('0x28')](respondWithFilteredResult(_0x1551aa,_0x1a0f99))[_0xef15('0x35')](handleError(_0x1551aa,null));};exports[_0xef15('0xb7')]=function(_0x4dbcb3,_0x359309,_0xd6335c){return db[_0xef15('0x96')]['find']({'where':{'id':_0x4dbcb3[_0xef15('0xb0')]['id']}})[_0xef15('0x28')](handleEntityNotFound(_0x359309,null))[_0xef15('0x28')](function(_0x14f09f){if(_0x14f09f){return _0x14f09f[_0xef15('0xb8')](_0x4dbcb3[_0xef15('0xaf')][_0xef15('0xb3')],_[_0xef15('0xb9')](_0x4dbcb3['body'],[_0xef15('0xb3'),'id'])||{})[_0xef15('0xba')](function(){return db['Tag'][_0xef15('0xb6')]({'attributes':['id','name',_0xef15('0x47')],'where':{'id':_0x4dbcb3[_0xef15('0xaf')][_0xef15('0xb3')]}});})[_0xef15('0x28')](function(_0x280ddd){socket[_0xef15('0xbb')]('smsInteractionTags:save',{'id':Number(_0x4dbcb3[_0xef15('0xb0')]['id']),'tags':_0x280ddd||[]});return{'id':Number(_0x4dbcb3[_0xef15('0xb0')]['id']),'tags':_0x280ddd||[]};});}})[_0xef15('0x28')](respondWithResult(_0x359309,null))[_0xef15('0x35')](handleError(_0x359309,null));};exports[_0xef15('0xbc')]=function(_0x3ae5ac,_0x3ce011,_0x205daa){return db[_0xef15('0x96')][_0xef15('0xad')]({'where':{'id':_0x3ae5ac[_0xef15('0xb0')]['id']}})[_0xef15('0x28')](handleEntityNotFound(_0x3ce011,null))['then'](function(_0x23dacd){if(_0x23dacd){return _0x23dacd[_0xef15('0xbc')](_0x3ae5ac[_0xef15('0x3a')][_0xef15('0xb3')]);}})[_0xef15('0x28')](respondWithStatusCode(_0x3ce011,null))[_0xef15('0x35')](handleError(_0x3ce011,null));};exports[_0xef15('0xbd')]=function(_0x4d1e3a,_0xfc8384){var _0x830303=moment()['unix']()[_0xef15('0x8a')]();var _0x487717=path[_0xef15('0x7e')](config[_0xef15('0xbe')],'server','files',_0xef15('0xbf'));var _0x182d1c=path[_0xef15('0x7e')](config[_0xef15('0xbe')],'server',_0xef15('0xc0'),_0xef15('0xc1'));var _0x2410b0=path[_0xef15('0x7e')](_0x487717,_0x830303);var _0x1406db=util[_0xef15('0x5f')]('transcript-%d-%s.zip',_0x4d1e3a['params']['id'],_0x830303);var _0x4ddf79=path[_0xef15('0x7e')](_0x487717,_0x1406db);var _0x29b47f=![];return db[_0xef15('0x96')][_0xef15('0xad')]({'where':{'id':_0x4d1e3a[_0xef15('0xb0')]['id']},'include':[{'model':db[_0xef15('0x2e')],'as':'Messages','attributes':['id',_0xef15('0xaf'),_0xef15('0x59'),_0xef15('0xc2'),_0xef15('0xc3')],'include':[{'model':db[_0xef15('0xc4')],'as':_0xef15('0xc4'),'attributes':['id','fullname'],'raw':!![]},{'model':db[_0xef15('0xc5')],'as':_0xef15('0xc6'),'attributes':['id',_0xef15('0xc7'),_0xef15('0xc8')],'raw':!![]}]},{'model':db[_0xef15('0xc9')],'as':_0xef15('0xca'),'attributes':['id',_0xef15('0x2a')]},{'model':db[_0xef15('0xc4')],'as':'Owner','attributes':['id','fullname']}]})[_0xef15('0x28')](handleEntityNotFound(_0xfc8384,null))['then'](function(_0x4efee7){if(_0x4efee7){var _0x221e27=_0x4efee7[_0xef15('0xcb')]({'plain':!![]});_0x29b47f=!![];var _0x37d00d={'format':'A4','border':'10px','header':{'height':'40px','contents':{'first':_0xef15('0xcc')}},'footer':{'height':_0xef15('0xcd'),'contents':{'default':util[_0xef15('0x5f')](_0xef15('0xce'),util['format'](_0xef15('0xcf'),_0xef15('0xd0'),_0x221e27['id']),moment()[_0xef15('0x5f')](_0xef15('0xd1'))[_0xef15('0x8a')]())}}};fs['mkdirSync'](_0x2410b0);var _0x3ec47a={'channel':_0xef15('0xd0'),'account':_0x221e27['Account'][_0xef15('0x2a')],'agent':_0x221e27[_0xef15('0xd2')]?_0x221e27[_0xef15('0xd2')]['fullname']:_0xef15('0xd3'),'createdAt':moment(_0x221e27[_0xef15('0x59')])['format'](_0xef15('0xd4'))[_0xef15('0x8a')](),'closedAt':_0x221e27[_0xef15('0x2c')]?moment(_0x221e27[_0xef15('0xd5')])[_0xef15('0x5f')]('YYYY-MM-DD\x20HH:mm:ss')[_0xef15('0x8a')]():'','disposition':_0x221e27[_0xef15('0xd6')],'messages':_(_0x221e27[_0xef15('0xd7')])[_0xef15('0x71')]({'secret':![]})[_0xef15('0x30')](function(_0x5179d7){return{'date':moment(_0x5179d7[_0xef15('0x59')])[_0xef15('0x5f')](_0xef15('0xd4'))[_0xef15('0x8a')](),'sender':_0x5179d7[_0xef15('0xc2')]===_0xef15('0xd8')?_0x5179d7[_0xef15('0xc4')]?_0x5179d7[_0xef15('0xc4')][_0xef15('0xd9')]:_0xef15('0xda'):_0x5179d7[_0xef15('0xc6')][_0xef15('0xc7')]+(_0x5179d7['Contact']['lastName']?'\x20'+_0x5179d7[_0xef15('0xc6')]['lastName']:''),'body':_0x5179d7[_0xef15('0xaf')],'direction':_0x5179d7[_0xef15('0xc2')]===_0xef15('0xd8')?'A':'C','secret':_0x5179d7[_0xef15('0xc3')]};})[_0xef15('0x5a')]()};return ejs['renderFile'](path[_0xef15('0x7e')](config[_0xef15('0xbe')],'server','views','downloadInteraction.html'),{'interaction':_0x3ec47a})[_0xef15('0x28')](function(_0x595852){return new BPromise(function(_0x492470,_0x29c1c6){pdf['create'](_0x595852,_0x37d00d)[_0xef15('0xdb')](path[_0xef15('0x7e')](_0x2410b0,_0xef15('0xdc')+_0x221e27['id']+'-'+_0x830303+_0xef15('0xdd')),function(_0x4687c3,_0x172308){if(_0x4687c3)return _0x29c1c6(_0x4687c3);_0x492470(_0x172308);});});});}})[_0xef15('0x28')](function(){if(_0x29b47f){return new BPromise(function(_0x369ff3,_0x4d886d){zipdir(_0x2410b0,{'saveTo':_0x4ddf79},function(_0x37b072,_0x3d6184){if(_0x37b072)return _0x4d886d(_0x37b072);return _0x369ff3(_0x3d6184);});})[_0xef15('0x28')](function(){return new BPromise(function(_0x437c9f,_0x4ed36a){rimraf(_0x2410b0,function(_0x1b32a3){if(_0x1b32a3)_0x4ed36a(_0x1b32a3);return _0x437c9f();});});})[_0xef15('0x28')](function(){return _0xfc8384[_0xef15('0xbd')](_0x4ddf79,_0x1406db,function(_0x1dc3a6){if(_0x1dc3a6){console[_0xef15('0xde')](_0xef15('0xdf'),_0x1dc3a6);}else{fs[_0xef15('0xe0')](_0x4ddf79);}});});}else{return _0xfc8384[_0xef15('0x1c')](0xc8);}})[_0xef15('0x35')](handleError(_0xfc8384,null));};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.events.js b/server/api/smsInteraction/smsInteraction.events.js
index af231eb..b281be0 100644
--- a/server/api/smsInteraction/smsInteraction.events.js
+++ b/server/api/smsInteraction/smsInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x73f6=['map','findAll','then','setDataValue','unreadMessages','length','emit','catch','hasOwnProperty','hook','events','../../mysqldb','SmsInteraction','SmsMessage','setMaxListeners','save','update','getUsers','Users'];(function(_0x459064,_0x4b7fc5){var _0x18c1d7=function(_0x1fa937){while(--_0x1fa937){_0x459064['push'](_0x459064['shift']());}};_0x18c1d7(++_0x4b7fc5);}(_0x73f6,0x8f));var _0x673f=function(_0x2283dc,_0x2fcfc5){_0x2283dc=_0x2283dc-0x0;var _0x16db90=_0x73f6[_0x2283dc];return _0x16db90;};'use strict';var EventEmitter=require(_0x673f('0x0'));var SmsInteraction=require(_0x673f('0x1'))['db'][_0x673f('0x2')];var SmsMessage=require(_0x673f('0x1'))['db'][_0x673f('0x3')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x673f('0x4')](0x0);var events={'afterCreate':_0x673f('0x5'),'afterUpdate':_0x673f('0x6'),'afterDestroy':'remove'};function emitEvent(_0x4dfbe2){return function(_0x57778e,_0x23fef8,_0x596198){_0x57778e[_0x673f('0x7')]({'attributes':['id'],'raw':!![]})['then'](function(_0x2d3170){_0x57778e['setDataValue'](_0x673f('0x8'),_0x2d3170[_0x673f('0x9')](function(_0x47c9f8){return{'id':_0x47c9f8['id']};}));return SmsMessage[_0x673f('0xa')]({'where':{'SmsInteractionId':_0x57778e['id'],'direction':'in','read':![]},'raw':!![]});})[_0x673f('0xb')](function(_0x39eb36){_0x57778e[_0x673f('0xc')](_0x673f('0xd'),_0x39eb36[_0x673f('0xe')]);SmsInteractionEvents[_0x673f('0xf')](_0x4dfbe2+':'+_0x57778e['id'],_0x57778e);SmsInteractionEvents[_0x673f('0xf')](_0x4dfbe2,_0x57778e);_0x596198(null);})[_0x673f('0x10')](_0x596198(null));};}for(var e in events){if(events[_0x673f('0x11')](e)){var event=events[e];SmsInteraction[_0x673f('0x12')](e,emitEvent(event));}}module['exports']=SmsInteractionEvents;
\ No newline at end of file
+var _0x6050=['events','../../mysqldb','SmsInteraction','SmsMessage','save','remove','getUsers','setDataValue','Users','map','findAll','then','unreadMessages','length','emit','hasOwnProperty','hook','exports'];(function(_0x2ebbbb,_0x2eb4b8){var _0xd3481b=function(_0x3c3163){while(--_0x3c3163){_0x2ebbbb['push'](_0x2ebbbb['shift']());}};_0xd3481b(++_0x2eb4b8);}(_0x6050,0x18c));var _0x0605=function(_0x1db828,_0x9af4d9){_0x1db828=_0x1db828-0x0;var _0x4de543=_0x6050[_0x1db828];return _0x4de543;};'use strict';var EventEmitter=require(_0x0605('0x0'));var SmsInteraction=require(_0x0605('0x1'))['db'][_0x0605('0x2')];var SmsMessage=require(_0x0605('0x1'))['db'][_0x0605('0x3')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0605('0x4'),'afterUpdate':'update','afterDestroy':_0x0605('0x5')};function emitEvent(_0x310ded){return function(_0xd5f452,_0x3a5383,_0x5eec99){_0xd5f452[_0x0605('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x2feecb){_0xd5f452[_0x0605('0x7')](_0x0605('0x8'),_0x2feecb[_0x0605('0x9')](function(_0x447f52){return{'id':_0x447f52['id']};}));return SmsMessage[_0x0605('0xa')]({'where':{'SmsInteractionId':_0xd5f452['id'],'direction':'in','read':![]},'raw':!![]});})[_0x0605('0xb')](function(_0x40ca07){_0xd5f452[_0x0605('0x7')](_0x0605('0xc'),_0x40ca07[_0x0605('0xd')]);SmsInteractionEvents[_0x0605('0xe')](_0x310ded+':'+_0xd5f452['id'],_0xd5f452);SmsInteractionEvents[_0x0605('0xe')](_0x310ded,_0xd5f452);_0x5eec99(null);})['catch'](_0x5eec99(null));};}for(var e in events){if(events[_0x0605('0xf')](e)){var event=events[e];SmsInteraction[_0x0605('0x10')](e,emitEvent(event));}}module[_0x0605('0x11')]=SmsInteractionEvents;
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.model.js b/server/api/smsInteraction/smsInteraction.model.js
index d505530..ef1ba4b 100644
--- a/server/api/smsInteraction/smsInteraction.model.js
+++ b/server/api/smsInteraction/smsInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x33bb=['request-promise','path','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment'];(function(_0x101e7b,_0x4ef05b){var _0x4995c0=function(_0x1a6488){while(--_0x1a6488){_0x101e7b['push'](_0x101e7b['shift']());}};_0x4995c0(++_0x4ef05b);}(_0x33bb,0xb0));var _0xb33b=function(_0xe3c947,_0x339c91){_0xe3c947=_0xe3c947-0x0;var _0x283a90=_0x33bb[_0xe3c947];return _0x283a90;};'use strict';var _=require(_0xb33b('0x0'));var util=require('util');var logger=require(_0xb33b('0x1'))(_0xb33b('0x2'));var moment=require(_0xb33b('0x3'));var BPromise=require('bluebird');var rp=require(_0xb33b('0x4'));var fs=require('fs');var path=require(_0xb33b('0x5'));var rimraf=require('rimraf');var config=require(_0xb33b('0x6'));var attributes=require(_0xb33b('0x7'));module[_0xb33b('0x8')]=function(_0x38ab40,_0x578481){return _0x38ab40[_0xb33b('0x9')](_0xb33b('0xa'),attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x577fbf,_0x17ff0e,_0x2932c8){if(_0x577fbf[_0xb33b('0xb')](_0xb33b('0xc'))){_0x577fbf[_0xb33b('0xd')]=moment()['format'](_0xb33b('0xe'));}_0x2932c8(null,_0x577fbf);}}});};
\ No newline at end of file
+var _0xe7d1=['bluebird','request-promise','path','../../config/environment','define','SmsInteraction','sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','api','moment'];(function(_0x67f30a,_0x2e62de){var _0x59b41e=function(_0x1716a5){while(--_0x1716a5){_0x67f30a['push'](_0x67f30a['shift']());}};_0x59b41e(++_0x2e62de);}(_0xe7d1,0x1dd));var _0x1e7d=function(_0x157ce1,_0x2c1928){_0x157ce1=_0x157ce1-0x0;var _0x49d683=_0xe7d1[_0x157ce1];return _0x49d683;};'use strict';var _=require('lodash');var util=require(_0x1e7d('0x0'));var logger=require('../../config/logger')(_0x1e7d('0x1'));var moment=require(_0x1e7d('0x2'));var BPromise=require(_0x1e7d('0x3'));var rp=require(_0x1e7d('0x4'));var fs=require('fs');var path=require(_0x1e7d('0x5'));var rimraf=require('rimraf');var config=require(_0x1e7d('0x6'));var attributes=require('./smsInteraction.attributes');module['exports']=function(_0x5ba3d0,_0x4a34ae){return _0x5ba3d0[_0x1e7d('0x7')](_0x1e7d('0x8'),attributes,{'tableName':_0x1e7d('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4a0a7c,_0x707bba,_0x255091){if(_0x4a0a7c[_0x1e7d('0xa')](_0x1e7d('0xb'))){_0x4a0a7c[_0x1e7d('0xc')]=moment()[_0x1e7d('0xd')](_0x1e7d('0xe'));}_0x255091(null,_0x4a0a7c);}}});};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.rpc.js b/server/api/smsInteraction/smsInteraction.rpc.js
index 4995f13..c6a74b6 100644
--- a/server/api/smsInteraction/smsInteraction.rpc.js
+++ b/server/api/smsInteraction/smsInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa529=['then','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','socket.io-emitter','./smsInteraction.socket','register','request','info','SmsInteraction,\x20%s,\x20%s','debug','SmsInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','SmsInteraction','update','body','options','where','limit','UpdateSmsInteraction','find'];(function(_0x13ffce,_0x2f1baa){var _0x141dd5=function(_0x1ac084){while(--_0x1ac084){_0x13ffce['push'](_0x13ffce['shift']());}};_0x141dd5(++_0x2f1baa);}(_0xa529,0x18c));var _0x9a52=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa529[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x9a52('0x0'));var util=require(_0x9a52('0x1'));var moment=require(_0x9a52('0x2'));var BPromise=require(_0x9a52('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9a52('0x4'));var db=require(_0x9a52('0x5'))['db'];var utils=require(_0x9a52('0x6'));var logger=require(_0x9a52('0x7'))(_0x9a52('0x8'));var config=require(_0x9a52('0x9'));var jayson=require(_0x9a52('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0x9a52('0xb')]=_['defaults'](config[_0x9a52('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x9a52('0xc'))(new Redis(config[_0x9a52('0xb')]));require(_0x9a52('0xd'))[_0x9a52('0xe')](socket);function respondWithRpcPromise(_0x4b0c4a,_0x199e2c,_0x8ea0d){return new BPromise(function(_0x3c968c,_0x571754){return client[_0x9a52('0xf')](_0x4b0c4a,_0x8ea0d)['then'](function(_0x30bf15){logger[_0x9a52('0x10')](_0x9a52('0x11'),_0x199e2c,'request\x20sent');logger[_0x9a52('0x12')](_0x9a52('0x13'),_0x199e2c,_0x9a52('0x14'),JSON[_0x9a52('0x15')](_0x30bf15));if(_0x30bf15[_0x9a52('0x16')]){if(_0x30bf15[_0x9a52('0x16')]['code']===0x1f4){logger['error'](_0x9a52('0x11'),_0x199e2c,_0x30bf15['error'][_0x9a52('0x17')]);return _0x571754(_0x30bf15['error'][_0x9a52('0x17')]);}logger[_0x9a52('0x16')]('SmsInteraction,\x20%s,\x20%s',_0x199e2c,_0x30bf15['error'][_0x9a52('0x17')]);return _0x3c968c(_0x30bf15[_0x9a52('0x16')][_0x9a52('0x17')]);}else{logger[_0x9a52('0x10')](_0x9a52('0x11'),_0x199e2c,_0x9a52('0x14'));_0x3c968c(_0x30bf15['result'][_0x9a52('0x17')]);}})[_0x9a52('0x18')](function(_0x3235c7){logger['error'](_0x9a52('0x11'),_0x199e2c,_0x3235c7);_0x571754(_0x3235c7);});});}exports['UpdateSmsInteraction']=function(_0x1096ad){var _0x4c136d=this;return new Promise(function(_0x2b43e0,_0x29ea4f){return db[_0x9a52('0x19')][_0x9a52('0x1a')](_0x1096ad[_0x9a52('0x1b')],{'raw':_0x1096ad[_0x9a52('0x1c')]?_0x1096ad[_0x9a52('0x1c')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1096ad['options']?_0x1096ad[_0x9a52('0x1c')][_0x9a52('0x1d')]||null:null,'attributes':_0x1096ad[_0x9a52('0x1c')]?_0x1096ad[_0x9a52('0x1c')]['attributes']||null:null,'limit':_0x1096ad[_0x9a52('0x1c')]?_0x1096ad[_0x9a52('0x1c')][_0x9a52('0x1e')]||null:null})['then'](function(_0x585533){logger[_0x9a52('0x10')](_0x9a52('0x1f'),_0x1096ad);logger[_0x9a52('0x12')](_0x9a52('0x1f'),_0x1096ad,JSON['stringify'](_0x585533));_0x2b43e0(_0x585533);})[_0x9a52('0x18')](function(_0x546d4e){logger[_0x9a52('0x16')]('UpdateSmsInteraction',_0x546d4e[_0x9a52('0x17')],_0x1096ad);_0x29ea4f(_0x4c136d[_0x9a52('0x16')](0x1f4,_0x546d4e[_0x9a52('0x17')]));});});};exports['AddTagsToSmsInteraction']=function(_0x3d5243){return new Promise(function(_0x1a2358,_0x4e594e){return db[_0x9a52('0x19')][_0x9a52('0x20')]({'where':_0x3d5243['options']?_0x3d5243[_0x9a52('0x1c')]['where']||null:null})[_0x9a52('0x21')](function(_0x186c67){if(_0x186c67){return _0x186c67[_0x9a52('0x22')](_0x3d5243['body'][_0x9a52('0x23')],_[_0x9a52('0x24')](_0x3d5243['body'],[_0x9a52('0x23'),'id'])||{});}})[_0x9a52('0x25')](function(_0x49f51b){logger['info']('AddTags',_0x3d5243);logger[_0x9a52('0x12')](_0x9a52('0x26'),_0x3d5243,JSON[_0x9a52('0x15')](_0x49f51b));_0x1a2358(_0x49f51b);})['catch'](function(_0x4e4ecd){logger[_0x9a52('0x16')](_0x9a52('0x26'),_0x4e4ecd[_0x9a52('0x17')],_0x3d5243);_0x4e594e(_this['error'](0x1f4,_0x4e4ecd[_0x9a52('0x17')]));});});};
\ No newline at end of file
+var _0x9a06=['spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','request','info','SmsInteraction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','UpdateSmsInteraction','SmsInteraction','update','body','options','raw','then','AddTagsToSmsInteraction','find','addTags','omit','ids'];(function(_0x52b845,_0x3efad4){var _0x1f41a8=function(_0x154b0a){while(--_0x154b0a){_0x52b845['push'](_0x52b845['shift']());}};_0x1f41a8(++_0x3efad4);}(_0x9a06,0x15a));var _0x69a0=function(_0xe386ff,_0x426113){_0xe386ff=_0xe386ff-0x0;var _0x39f34b=_0x9a06[_0xe386ff];return _0x39f34b;};'use strict';var _=require(_0x69a0('0x0'));var util=require(_0x69a0('0x1'));var moment=require(_0x69a0('0x2'));var BPromise=require(_0x69a0('0x3'));var rs=require(_0x69a0('0x4'));var fs=require('fs');var Redis=require(_0x69a0('0x5'));var db=require(_0x69a0('0x6'))['db'];var utils=require(_0x69a0('0x7'));var logger=require('../../config/logger')(_0x69a0('0x8'));var config=require(_0x69a0('0x9'));var jayson=require(_0x69a0('0xa'));var client=jayson[_0x69a0('0xb')][_0x69a0('0xc')]({'port':0x232a});config[_0x69a0('0xd')]=_[_0x69a0('0xe')](config[_0x69a0('0xd')],{'host':_0x69a0('0xf'),'port':0x18eb});var socket=require(_0x69a0('0x10'))(new Redis(config[_0x69a0('0xd')]));require(_0x69a0('0x11'))['register'](socket);function respondWithRpcPromise(_0x3bce48,_0x28877a,_0x4c00e9){return new BPromise(function(_0x5e76e0,_0x3bd153){return client[_0x69a0('0x12')](_0x3bce48,_0x4c00e9)['then'](function(_0x1f82fb){logger[_0x69a0('0x13')](_0x69a0('0x14'),_0x28877a,_0x69a0('0x15'));logger[_0x69a0('0x16')]('SmsInteraction,\x20%s,\x20%s,\x20%s',_0x28877a,_0x69a0('0x15'),JSON[_0x69a0('0x17')](_0x1f82fb));if(_0x1f82fb[_0x69a0('0x18')]){if(_0x1f82fb[_0x69a0('0x18')][_0x69a0('0x19')]===0x1f4){logger[_0x69a0('0x18')](_0x69a0('0x14'),_0x28877a,_0x1f82fb[_0x69a0('0x18')][_0x69a0('0x1a')]);return _0x3bd153(_0x1f82fb[_0x69a0('0x18')][_0x69a0('0x1a')]);}logger[_0x69a0('0x18')]('SmsInteraction,\x20%s,\x20%s',_0x28877a,_0x1f82fb[_0x69a0('0x18')][_0x69a0('0x1a')]);return _0x5e76e0(_0x1f82fb['error'][_0x69a0('0x1a')]);}else{logger[_0x69a0('0x13')](_0x69a0('0x14'),_0x28877a,_0x69a0('0x15'));_0x5e76e0(_0x1f82fb[_0x69a0('0x1b')][_0x69a0('0x1a')]);}})[_0x69a0('0x1c')](function(_0x1ddfae){logger[_0x69a0('0x18')](_0x69a0('0x14'),_0x28877a,_0x1ddfae);_0x3bd153(_0x1ddfae);});});}exports[_0x69a0('0x1d')]=function(_0x229744){var _0x2f19a9=this;return new Promise(function(_0x35d063,_0xc0587){return db[_0x69a0('0x1e')][_0x69a0('0x1f')](_0x229744[_0x69a0('0x20')],{'raw':_0x229744[_0x69a0('0x21')]?_0x229744['options'][_0x69a0('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x229744[_0x69a0('0x21')]?_0x229744[_0x69a0('0x21')]['where']||null:null,'attributes':_0x229744[_0x69a0('0x21')]?_0x229744['options']['attributes']||null:null,'limit':_0x229744[_0x69a0('0x21')]?_0x229744[_0x69a0('0x21')]['limit']||null:null})[_0x69a0('0x23')](function(_0x429bf9){logger[_0x69a0('0x13')](_0x69a0('0x1d'),_0x229744);logger[_0x69a0('0x16')](_0x69a0('0x1d'),_0x229744,JSON['stringify'](_0x429bf9));_0x35d063(_0x429bf9);})['catch'](function(_0x24c92a){logger[_0x69a0('0x18')](_0x69a0('0x1d'),_0x24c92a[_0x69a0('0x1a')],_0x229744);_0xc0587(_0x2f19a9[_0x69a0('0x18')](0x1f4,_0x24c92a[_0x69a0('0x1a')]));});});};exports[_0x69a0('0x24')]=function(_0x35bdb5){return new Promise(function(_0x2210ab,_0x4e0b94){return db['SmsInteraction'][_0x69a0('0x25')]({'where':_0x35bdb5['options']?_0x35bdb5['options']['where']||null:null})[_0x69a0('0x23')](function(_0xa25575){if(_0xa25575){return _0xa25575[_0x69a0('0x26')](_0x35bdb5[_0x69a0('0x20')]['ids'],_[_0x69a0('0x27')](_0x35bdb5[_0x69a0('0x20')],[_0x69a0('0x28'),'id'])||{});}})[_0x69a0('0x29')](function(_0x2f9dac){logger[_0x69a0('0x13')](_0x69a0('0x2a'),_0x35bdb5);logger[_0x69a0('0x16')](_0x69a0('0x2a'),_0x35bdb5,JSON[_0x69a0('0x17')](_0x2f9dac));_0x2210ab(_0x2f9dac);})[_0x69a0('0x1c')](function(_0x3f2756){logger['error'](_0x69a0('0x2a'),_0x3f2756['message'],_0x35bdb5);_0x4e0b94(_this[_0x69a0('0x18')](0x1f4,_0x3f2756[_0x69a0('0x1a')]));});});};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.socket.js b/server/api/smsInteraction/smsInteraction.socket.js
index aa1e98b..20ba0ac 100644
--- a/server/api/smsInteraction/smsInteraction.socket.js
+++ b/server/api/smsInteraction/smsInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb1c1=['update','emit','./smsInteraction.events','save','remove'];(function(_0x2e655a,_0x6d5799){var _0x26f13b=function(_0x2dd535){while(--_0x2dd535){_0x2e655a['push'](_0x2e655a['shift']());}};_0x26f13b(++_0x6d5799);}(_0xb1c1,0x1c4));var _0x1b1c=function(_0x5624a4,_0x1af663){_0x5624a4=_0x5624a4-0x0;var _0x51ad8e=_0xb1c1[_0x5624a4];return _0x51ad8e;};'use strict';var SmsInteractionEvents=require(_0x1b1c('0x0'));var events=[_0x1b1c('0x1'),_0x1b1c('0x2'),_0x1b1c('0x3')];function createListener(_0x39986c,_0x4a73cf){return function(_0x2817d4){_0x4a73cf[_0x1b1c('0x4')](_0x39986c,_0x2817d4);};}function removeListener(_0x56aff3,_0x4209b1){return function(){SmsInteractionEvents['removeListener'](_0x56aff3,_0x4209b1);};}exports['register']=function(_0x3779c7){for(var _0x28e092=0x0,_0x11e077=events['length'];_0x28e092<_0x11e077;_0x28e092++){var _0x2bf986=events[_0x28e092];var _0x5ae490=createListener('smsInteraction:'+_0x2bf986,_0x3779c7);SmsInteractionEvents['on'](_0x2bf986,_0x5ae490);}};
\ No newline at end of file
+var _0xfb64=['save','remove','update','emit','removeListener','register','length','./smsInteraction.events'];(function(_0x126257,_0x5b8ed2){var _0x54e2ba=function(_0x32ec8b){while(--_0x32ec8b){_0x126257['push'](_0x126257['shift']());}};_0x54e2ba(++_0x5b8ed2);}(_0xfb64,0x157));var _0x4fb6=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xfb64[_0x57b54c];return _0x59cc19;};'use strict';var SmsInteractionEvents=require(_0x4fb6('0x0'));var events=[_0x4fb6('0x1'),_0x4fb6('0x2'),_0x4fb6('0x3')];function createListener(_0x2a428e,_0x58d1a1){return function(_0x74e9bb){_0x58d1a1[_0x4fb6('0x4')](_0x2a428e,_0x74e9bb);};}function removeListener(_0x2e0697,_0x415911){return function(){SmsInteractionEvents[_0x4fb6('0x5')](_0x2e0697,_0x415911);};}exports[_0x4fb6('0x6')]=function(_0x3aa438){for(var _0x214021=0x0,_0x414be6=events[_0x4fb6('0x7')];_0x214021<_0x414be6;_0x214021++){var _0x43936c=events[_0x214021];var _0x1bb438=createListener('smsInteraction:'+_0x43936c,_0x3aa438);SmsInteractionEvents['on'](_0x43936c,_0x1bb438);}};
\ No newline at end of file
diff --git a/server/api/smsMessage/index.js b/server/api/smsMessage/index.js
index 388c448..8a8dc98 100644
--- a/server/api/smsMessage/index.js
+++ b/server/api/smsMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x61d0=['smsmessage:create','create','put','/:id','update','/:id/accept','accept','/:id/reject','delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsMessage.controller','isAuthenticated','index','get','/describe','show','post','tracked','sms'];(function(_0x170af3,_0x2e0cf0){var _0x335027=function(_0x5eca13){while(--_0x5eca13){_0x170af3['push'](_0x170af3['shift']());}};_0x335027(++_0x2e0cf0);}(_0x61d0,0x123));var _0x061d=function(_0x8ba19a,_0x1d2b2b){_0x8ba19a=_0x8ba19a-0x0;var _0x2bd8b4=_0x61d0[_0x8ba19a];return _0x2bd8b4;};'use strict';var multer=require(_0x061d('0x0'));var util=require(_0x061d('0x1'));var path=require(_0x061d('0x2'));var timeout=require(_0x061d('0x3'));var express=require(_0x061d('0x4'));var router=express['Router']();var auth=require(_0x061d('0x5'));var interaction=require(_0x061d('0x6'));var config=require(_0x061d('0x7'));var controller=require(_0x061d('0x8'));router['get']('/',auth[_0x061d('0x9')](),controller[_0x061d('0xa')]);router[_0x061d('0xb')](_0x061d('0xc'),auth[_0x061d('0x9')](),controller['describe']);router['get']('/:id',auth['isAuthenticated'](),controller[_0x061d('0xd')]);router[_0x061d('0xe')]('/',auth[_0x061d('0x9')](),interaction[_0x061d('0xf')](_0x061d('0x10'),_0x061d('0x11')),controller[_0x061d('0x12')]);router['post']('/:id/status',controller['status']);router[_0x061d('0x13')](_0x061d('0x14'),auth['isAuthenticated'](),controller[_0x061d('0x15')]);router[_0x061d('0x13')](_0x061d('0x16'),auth[_0x061d('0x9')](),controller[_0x061d('0x17')]);router[_0x061d('0x13')](_0x061d('0x18'),auth[_0x061d('0x9')](),controller['reject']);router[_0x061d('0x19')](_0x061d('0x14'),auth[_0x061d('0x9')](),controller[_0x061d('0x1a')]);module[_0x061d('0x1b')]=router;
\ No newline at end of file
+var _0x89c4=['sms','smsmessage:create','create','post','/:id/status','status','/:id','update','put','reject','multer','util','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsMessage.controller','get','isAuthenticated','index','/describe','describe','show','tracked'];(function(_0x3aeb32,_0x19cc52){var _0x56e9cc=function(_0x3a2ffe){while(--_0x3a2ffe){_0x3aeb32['push'](_0x3aeb32['shift']());}};_0x56e9cc(++_0x19cc52);}(_0x89c4,0x82));var _0x489c=function(_0x29a0be,_0x1bb468){_0x29a0be=_0x29a0be-0x0;var _0x51e58e=_0x89c4[_0x29a0be];return _0x51e58e;};'use strict';var multer=require(_0x489c('0x0'));var util=require(_0x489c('0x1'));var path=require('path');var timeout=require(_0x489c('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x489c('0x3'));var interaction=require(_0x489c('0x4'));var config=require(_0x489c('0x5'));var controller=require(_0x489c('0x6'));router[_0x489c('0x7')]('/',auth[_0x489c('0x8')](),controller[_0x489c('0x9')]);router['get'](_0x489c('0xa'),auth[_0x489c('0x8')](),controller[_0x489c('0xb')]);router[_0x489c('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x489c('0xc')]);router['post']('/',auth[_0x489c('0x8')](),interaction[_0x489c('0xd')](_0x489c('0xe'),_0x489c('0xf')),controller[_0x489c('0x10')]);router[_0x489c('0x11')](_0x489c('0x12'),controller[_0x489c('0x13')]);router['put'](_0x489c('0x14'),auth['isAuthenticated'](),controller[_0x489c('0x15')]);router['put']('/:id/accept',auth[_0x489c('0x8')](),controller['accept']);router[_0x489c('0x16')]('/:id/reject',auth[_0x489c('0x8')](),controller[_0x489c('0x17')]);router['delete'](_0x489c('0x14'),auth[_0x489c('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.attributes.js b/server/api/smsMessage/smsMessage.attributes.js
index 442ce73..4afd997 100644
--- a/server/api/smsMessage/smsMessage.attributes.js
+++ b/server/api/smsMessage/smsMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6003=['TEXT','medium','out','STRING','DATE','BOOLEAN','sequelize','exports'];(function(_0x4ce7c8,_0x5c2758){var _0x506ee9=function(_0x281b23){while(--_0x281b23){_0x4ce7c8['push'](_0x4ce7c8['shift']());}};_0x506ee9(++_0x5c2758);}(_0x6003,0xae));var _0x3600=function(_0x4efe04,_0x2dbc26){_0x4efe04=_0x4efe04-0x0;var _0x1004b2=_0x6003[_0x4efe04];return _0x1004b2;};'use strict';var Sequelize=require(_0x3600('0x0'));module[_0x3600('0x1')]={'body':{'type':Sequelize[_0x3600('0x2')](_0x3600('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x3600('0x4')),'defaultValue':_0x3600('0x4'),'allowNull':![]},'messageId':{'type':Sequelize[_0x3600('0x5')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize[_0x3600('0x6')]},'secret':{'type':Sequelize[_0x3600('0x7')],'defaultValue':![]}};
\ No newline at end of file
+var _0xb182=['DATE','BOOLEAN','exports','TEXT','medium','out','STRING'];(function(_0x4667e2,_0xfc6a27){var _0x56c078=function(_0x83cf32){while(--_0x83cf32){_0x4667e2['push'](_0x4667e2['shift']());}};_0x56c078(++_0xfc6a27);}(_0xb182,0x121));var _0x2b18=function(_0x119b3e,_0x588d50){_0x119b3e=_0x119b3e-0x0;var _0x1169ae=_0xb182[_0x119b3e];return _0x1169ae;};'use strict';var Sequelize=require('sequelize');module[_0x2b18('0x0')]={'body':{'type':Sequelize[_0x2b18('0x1')](_0x2b18('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x2b18('0x3')),'defaultValue':_0x2b18('0x3'),'allowNull':![]},'messageId':{'type':Sequelize[_0x2b18('0x4')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize[_0x2b18('0x5')]},'secret':{'type':Sequelize[_0x2b18('0x6')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.controller.js b/server/api/smsMessage/smsMessage.controller.js
index bd1f32a..40c8835 100644
--- a/server/api/smsMessage/smsMessage.controller.js
+++ b/server/api/smsMessage/smsMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf2dc=['register','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','SmsMessage,\x20%s,\x20%s','request\x20sent','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','save','update','end','name','send','index','SmsMessage','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','merge','map','type','key','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','body','describe','accept','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','CmContact','Contact','SmsInteraction','SmsInteractionId','isNil','get','info','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','interaction','null','AcceptMessage','acceptMessage','manual','interface','channel','event','EventManager','acceptmessage','sms','agent','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SIP/%s','reject','rejectmessage','SmsAccount','SmsAccountId','debug','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','indexOf','sent','delivered','Status','plivio','infobip','results','groupName','DELIVERED','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../mysqldb','defaults','socket.io-emitter','./smsMessage.socket'];(function(_0xeeb5c6,_0x3d3361){var _0xed6d58=function(_0x12c1db){while(--_0x12c1db){_0xeeb5c6['push'](_0xeeb5c6['shift']());}};_0xed6d58(++_0x3d3361);}(_0xf2dc,0x71));var _0xcf2d=function(_0x10fbe6,_0x5c22c4){_0x10fbe6=_0x10fbe6-0x0;var _0x535420=_0xf2dc[_0x10fbe6];return _0x535420;};'use strict';var pdf=require(_0xcf2d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xcf2d('0x1'));var zipdir=require(_0xcf2d('0x2'));var jsonpatch=require(_0xcf2d('0x3'));var rp=require(_0xcf2d('0x4'));var moment=require(_0xcf2d('0x5'));var BPromise=require(_0xcf2d('0x6'));var Mustache=require(_0xcf2d('0x7'));var util=require(_0xcf2d('0x8'));var path=require(_0xcf2d('0x9'));var sox=require(_0xcf2d('0xa'));var csv=require('to-csv');var ejs=require(_0xcf2d('0xb'));var fs=require('fs');var _=require(_0xcf2d('0xc'));var squel=require(_0xcf2d('0xd'));var crypto=require(_0xcf2d('0xe'));var jsforce=require(_0xcf2d('0xf'));var deskjs=require(_0xcf2d('0x10'));var toCsv=require(_0xcf2d('0x11'));var querystring=require(_0xcf2d('0x12'));var Papa=require(_0xcf2d('0x13'));var Redis=require('ioredis');var authService=require(_0xcf2d('0x14'));var qs=require(_0xcf2d('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xcf2d('0x16'))(_0xcf2d('0x17'));var utils=require(_0xcf2d('0x18'));var config=require('../../config/environment');var db=require(_0xcf2d('0x19'))['db'];config['redis']=_[_0xcf2d('0x1a')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xcf2d('0x1b'))(new Redis(config['redis']));require(_0xcf2d('0x1c'))[_0xcf2d('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson[_0xcf2d('0x1e')][_0xcf2d('0x1f')]({'port':0x232c});var client9002=jayson[_0xcf2d('0x1e')][_0xcf2d('0x1f')]({'port':0x232a});function checkPasswordPattern(_0x2c3ef0,_0x5c7020,_0x1a3474){if(_0x1a3474){var _0x97815b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x97815b[_0xcf2d('0x20')](_0x5c7020)){return _0x2c3ef0;}else{throw new Error(_0xcf2d('0x21'));}}else{return _0x2c3ef0;}}function respondWithRpcPromise(_0x1e0cc8,_0x1a2e7e,_0x3e2c1b,_0x35c287){return new BPromise(function(_0x11cf99,_0x8f7a8e){var _0x31f5d5=_0x35c287||client;return _0x31f5d5[_0xcf2d('0x22')](_0x1e0cc8,_0x3e2c1b)[_0xcf2d('0x23')](function(_0x463bef){logger['info'](_0xcf2d('0x24'),_0x1a2e7e,_0xcf2d('0x25'));logger['debug'](_0xcf2d('0x26'),_0x1a2e7e,_0xcf2d('0x25'),JSON[_0xcf2d('0x27')](_0x463bef));if(_0x463bef[_0xcf2d('0x28')]){if(_0x463bef[_0xcf2d('0x28')][_0xcf2d('0x29')]===0x1f4){logger['error'](_0xcf2d('0x24'),_0x1a2e7e,_0x463bef[_0xcf2d('0x28')]['message']);return _0x8f7a8e(_0x463bef['error'][_0xcf2d('0x2a')]);}logger[_0xcf2d('0x28')](_0xcf2d('0x24'),_0x1a2e7e,_0x463bef['error'][_0xcf2d('0x2a')]);return _0x11cf99(_0x463bef[_0xcf2d('0x28')][_0xcf2d('0x2a')]);}else{logger['info'](_0xcf2d('0x24'),_0x1a2e7e,_0xcf2d('0x25'));_0x11cf99(_0x463bef[_0xcf2d('0x2b')][_0xcf2d('0x2a')]);}})['catch'](function(_0x321d86){logger['error'](_0xcf2d('0x24'),_0x1a2e7e,_0x321d86);_0x8f7a8e(_0x321d86);});});}function respondWithStatusCode(_0x4c2b5a,_0x2a4db5){_0x2a4db5=_0x2a4db5||0xcc;return function(_0x35f1d3){if(_0x35f1d3){return _0x4c2b5a[_0xcf2d('0x2c')](_0x2a4db5);}return _0x4c2b5a[_0xcf2d('0x2d')](_0x2a4db5)['end']();};}function respondWithResult(_0x52e4ac,_0x531cfd){_0x531cfd=_0x531cfd||0xc8;return function(_0x1d55c7){if(_0x1d55c7){return _0x52e4ac[_0xcf2d('0x2d')](_0x531cfd)[_0xcf2d('0x2e')](_0x1d55c7);}};}function respondWithFilteredResult(_0x44ff9d,_0x15c718){return function(_0x417fb2){if(_0x417fb2){var _0x5a1589=_0x417fb2[_0xcf2d('0x2f')],_0x4934a9=_0x15c718['offset'],_0x386bce=_0x15c718[_0xcf2d('0x30')]+_0x15c718[_0xcf2d('0x31')],_0x20282d;if(_0x386bce>=_0x5a1589){_0x386bce=_0x5a1589;_0x20282d=0xc8;}else{_0x20282d=0xce;}_0x44ff9d[_0xcf2d('0x2d')](_0x20282d);return _0x44ff9d[_0xcf2d('0x32')](_0xcf2d('0x33'),_0x4934a9+'-'+_0x386bce+'/'+_0x5a1589)[_0xcf2d('0x2e')](_0x417fb2);}return null;};}function patchUpdates(_0x3081aa){return function(_0x3f328f){try{jsonpatch[_0xcf2d('0x34')](_0x3f328f,_0x3081aa,!![]);}catch(_0x15901e){return BPromise['reject'](_0x15901e);}return _0x3f328f[_0xcf2d('0x35')]();};}function saveUpdates(_0x12fac8,_0x3e1922){return function(_0xd6eca){if(_0xd6eca){return _0xd6eca[_0xcf2d('0x36')](_0x12fac8)[_0xcf2d('0x23')](function(_0x1c4d25){return _0x1c4d25;});}return null;};}function removeEntity(_0x203b23,_0x44521f){return function(_0x43700f){if(_0x43700f){return _0x43700f['destroy']()[_0xcf2d('0x23')](function(){_0x203b23[_0xcf2d('0x2d')](0xcc)[_0xcf2d('0x37')]();});}};}function handleEntityNotFound(_0x3753c0,_0x35916d){return function(_0x55ece8){if(!_0x55ece8){_0x3753c0[_0xcf2d('0x2c')](0x194);}return _0x55ece8;};}function handleError(_0x1ca0b7,_0x3553bb){_0x3553bb=_0x3553bb||0x1f4;return function(_0x10783a){logger[_0xcf2d('0x28')](_0x10783a['stack']);if(_0x10783a['name']){delete _0x10783a[_0xcf2d('0x38')];}_0x1ca0b7[_0xcf2d('0x2d')](_0x3553bb)[_0xcf2d('0x39')](_0x10783a);};}exports[_0xcf2d('0x3a')]=function(_0x3c00f0,_0x4e8cbd){var _0x2b0b5c={},_0x4a7d09={},_0x4aae11={'count':0x0,'rows':[]};var _0x551fbb=db[_0xcf2d('0x3b')][_0xcf2d('0x3c')];_0x4a7d09[_0xcf2d('0x3d')]=_[_0xcf2d('0x3e')](_0x551fbb);_0x4a7d09[_0xcf2d('0x3f')]=_[_0xcf2d('0x3e')](_0x3c00f0[_0xcf2d('0x3f')]);_0x4a7d09[_0xcf2d('0x40')]=_[_0xcf2d('0x41')](_0x4a7d09[_0xcf2d('0x3d')],_0x4a7d09['query']);_0x2b0b5c[_0xcf2d('0x42')]=_[_0xcf2d('0x41')](_0x4a7d09['model'],qs['fields'](_0x3c00f0['query'][_0xcf2d('0x43')]));_0x2b0b5c[_0xcf2d('0x42')]=_0x2b0b5c['attributes'][_0xcf2d('0x44')]?_0x2b0b5c[_0xcf2d('0x42')]:_0x4a7d09['model'];if(!_0x3c00f0[_0xcf2d('0x3f')][_0xcf2d('0x45')](_0xcf2d('0x46'))){_0x2b0b5c[_0xcf2d('0x31')]=qs['limit'](_0x3c00f0[_0xcf2d('0x3f')]['limit']);_0x2b0b5c['offset']=qs['offset'](_0x3c00f0[_0xcf2d('0x3f')][_0xcf2d('0x30')]);}_0x2b0b5c[_0xcf2d('0x47')]=qs['sort'](_0x3c00f0[_0xcf2d('0x3f')]['sort']);_0x2b0b5c['where']=qs['filters'](_['pick'](_0x3c00f0[_0xcf2d('0x3f')],_0x4a7d09[_0xcf2d('0x40')]));if(_0x3c00f0['query']['filter']){_0x2b0b5c[_0xcf2d('0x48')]=_[_0xcf2d('0x49')](_0x2b0b5c['where'],{'$or':_[_0xcf2d('0x4a')](_0x551fbb,function(_0x410785){if(_0x410785[_0xcf2d('0x4b')][_0xcf2d('0x4c')]!==_0xcf2d('0x4d')){var _0x1f19a3={};_0x1f19a3[_0x410785['field']]={'$like':'%'+_0x3c00f0[_0xcf2d('0x3f')]['filter']+'%'};return _0x1f19a3;}})});}_0x2b0b5c=_[_0xcf2d('0x49')]({},_0x2b0b5c,_0x3c00f0[_0xcf2d('0x4e')]);var _0x3e4ee5={'where':_0x2b0b5c['where']};return db[_0xcf2d('0x3b')][_0xcf2d('0x2f')](_0x3e4ee5)['then'](function(_0xfebae8){_0x4aae11['count']=_0xfebae8;if(_0x3c00f0['query'][_0xcf2d('0x4f')]){_0x2b0b5c[_0xcf2d('0x50')]=[{'all':!![]}];}return db[_0xcf2d('0x3b')]['findAll'](_0x2b0b5c);})[_0xcf2d('0x23')](function(_0x14947d){_0x4aae11[_0xcf2d('0x51')]=_0x14947d;return _0x4aae11;})['then'](respondWithFilteredResult(_0x4e8cbd,_0x2b0b5c))[_0xcf2d('0x52')](handleError(_0x4e8cbd,null));};exports[_0xcf2d('0x53')]=function(_0x321c4b,_0x5860ad){var _0x2dd7ea={'raw':!![],'where':{'id':_0x321c4b[_0xcf2d('0x54')]['id']}},_0x1d9287={};_0x1d9287['model']=_['keys'](db[_0xcf2d('0x3b')]['rawAttributes']);_0x1d9287[_0xcf2d('0x3f')]=_['keys'](_0x321c4b[_0xcf2d('0x3f')]);_0x1d9287[_0xcf2d('0x40')]=_[_0xcf2d('0x41')](_0x1d9287[_0xcf2d('0x3d')],_0x1d9287[_0xcf2d('0x3f')]);_0x2dd7ea[_0xcf2d('0x42')]=_[_0xcf2d('0x41')](_0x1d9287['model'],qs[_0xcf2d('0x43')](_0x321c4b[_0xcf2d('0x3f')][_0xcf2d('0x43')]));_0x2dd7ea['attributes']=_0x2dd7ea['attributes']['length']?_0x2dd7ea[_0xcf2d('0x42')]:_0x1d9287[_0xcf2d('0x3d')];if(_0x321c4b['query'][_0xcf2d('0x4f')]){_0x2dd7ea['include']=[{'all':!![]}];}_0x2dd7ea=_[_0xcf2d('0x49')]({},_0x2dd7ea,_0x321c4b['options']);return db[_0xcf2d('0x3b')][_0xcf2d('0x55')](_0x2dd7ea)[_0xcf2d('0x23')](handleEntityNotFound(_0x5860ad,null))['then'](respondWithResult(_0x5860ad,null))['catch'](handleError(_0x5860ad,null));};exports['create']=function(_0x10aaf1,_0x4fc5f3){return db[_0xcf2d('0x3b')]['create'](_0x10aaf1[_0xcf2d('0x56')],{})[_0xcf2d('0x23')](respondWithResult(_0x4fc5f3,0xc9))['catch'](handleError(_0x4fc5f3,null));};exports[_0xcf2d('0x36')]=function(_0x237bd2,_0x473b4d){if(_0x237bd2[_0xcf2d('0x56')]['id']){delete _0x237bd2[_0xcf2d('0x56')]['id'];}return db[_0xcf2d('0x3b')][_0xcf2d('0x55')]({'where':{'id':_0x237bd2['params']['id']}})['then'](handleEntityNotFound(_0x473b4d,null))[_0xcf2d('0x23')](saveUpdates(_0x237bd2[_0xcf2d('0x56')],null))[_0xcf2d('0x23')](respondWithResult(_0x473b4d,null))[_0xcf2d('0x52')](handleError(_0x473b4d,null));};exports['destroy']=function(_0x3cf0f6,_0x377b1e){return db[_0xcf2d('0x3b')][_0xcf2d('0x55')]({'where':{'id':_0x3cf0f6[_0xcf2d('0x54')]['id']}})[_0xcf2d('0x23')](handleEntityNotFound(_0x377b1e,null))[_0xcf2d('0x23')](removeEntity(_0x377b1e,null))[_0xcf2d('0x52')](handleError(_0x377b1e,null));};exports[_0xcf2d('0x57')]=function(_0x5eea83,_0xe13db){return db[_0xcf2d('0x3b')][_0xcf2d('0x57')]()[_0xcf2d('0x23')](respondWithResult(_0xe13db,null))['catch'](handleError(_0xe13db,null));};var interaction_log=require(_0xcf2d('0x16'))('sms-interactions');exports[_0xcf2d('0x58')]=function(_0xc918db,_0x2b17e0,_0x27f4f1){var _0x2e4d17={'channel':'sms'};if(_0xc918db[_0xcf2d('0x56')]['id']){delete _0xc918db[_0xcf2d('0x56')]['id'];}_0xc918db[_0xcf2d('0x56')][_0xcf2d('0x59')]=!![];_0xc918db[_0xcf2d('0x56')][_0xcf2d('0x5a')]=moment()[_0xcf2d('0x5b')](_0xcf2d('0x5c'));_0xc918db['body'][_0xcf2d('0x5d')]=_0xc918db[_0xcf2d('0x56')]['UserId']||_0xc918db['user']['id'];return db['SmsMessage'][_0xcf2d('0x55')]({'where':{'id':_0xc918db[_0xcf2d('0x54')]['id'],'UserId':null},'include':[{'model':db[_0xcf2d('0x5e')],'as':_0xcf2d('0x5f')}]})['then'](handleEntityNotFound(_0x2b17e0,null))[_0xcf2d('0x23')](saveUpdates(_0xc918db[_0xcf2d('0x56')],null))['then'](function(_0x156bb3){if(_0x156bb3){_0x2e4d17['message']=_0x156bb3['get']({'plain':!![]});return db[_0xcf2d('0x60')]['find']({'where':{'id':_0x156bb3[_0xcf2d('0x61')]}});}return null;})['then'](handleEntityNotFound(_0x2b17e0,null))['then'](function(_0x82b326){if(_0x82b326){return _0x82b326[_0xcf2d('0x36')]({'UserId':_0xc918db[_0xcf2d('0x56')]['UserId'],'read1stAt':_[_0xcf2d('0x62')](_0x82b326['read1stAt'])?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0xcf2d('0x23')](function(_0x414e84){if(_0x414e84){_0x2e4d17['interaction']=_0x414e84[_0xcf2d('0x63')]({'plain':!![]});interaction_log[_0xcf2d('0x64')](_0xcf2d('0x65'),_0xc918db[_0xcf2d('0x66')]['id'],_0xc918db[_0xcf2d('0x66')][_0xcf2d('0x38')],_0xc918db[_0xcf2d('0x66')][_0xcf2d('0x67')],_0x2e4d17[_0xcf2d('0x68')]['id'],_0xc918db['body']?JSON[_0xcf2d('0x27')](_0xc918db[_0xcf2d('0x56')]):_0xcf2d('0x69'));return respondWithRpcPromise(_0xcf2d('0x6a'),_0xcf2d('0x6b'),_0x2e4d17);}return null;})[_0xcf2d('0x23')](function(_0x2014bb){if(_0x2014bb){if(_0xc918db['body'][_0xcf2d('0x6c')]){_0x2e4d17['message'][_0xcf2d('0x6d')]=util[_0xcf2d('0x5b')]('SIP/%s',_0xc918db[_0xcf2d('0x66')]['name']);_0x2e4d17[_0xcf2d('0x2a')][_0xcf2d('0x6e')]=_0x2e4d17[_0xcf2d('0x6e')];_0x2e4d17['message'][_0xcf2d('0x6f')]='accept';return respondWithRpcPromise(_0xcf2d('0x70'),'EventManager',{'event':_0xcf2d('0x71'),'message':_0x2e4d17[_0xcf2d('0x2a')]},client9002)['then'](function(){return _0x2e4d17;});}return _0x2e4d17;}return null;})['then'](respondWithResult(_0x2b17e0,null))[_0xcf2d('0x52')](handleError(_0x2b17e0,null));};var interaction_log=require('../../config/logger')('sms-interactions');exports['reject']=function(_0x3a3983,_0x29211b,_0x89f821){var _0x8bbfe5={'agent':{},'channel':_0xcf2d('0x72')};if(_0x3a3983['body']['id']){delete _0x3a3983[_0xcf2d('0x56')]['id'];}_0x3a3983[_0xcf2d('0x56')][_0xcf2d('0x5d')]=_0x3a3983['body'][_0xcf2d('0x5d')]||_0x3a3983[_0xcf2d('0x66')]['id'];_0x8bbfe5[_0xcf2d('0x73')]['id']=_0x3a3983[_0xcf2d('0x56')][_0xcf2d('0x5d')];return db[_0xcf2d('0x3b')][_0xcf2d('0x55')]({'where':{'id':_0x3a3983[_0xcf2d('0x54')]['id'],'UserId':null}})[_0xcf2d('0x23')](handleEntityNotFound(_0x29211b,null))[_0xcf2d('0x23')](function(_0x296979){if(_0x296979){_0x8bbfe5['message']=_0x296979[_0xcf2d('0x63')]({'plain':!![]});return db[_0xcf2d('0x60')][_0xcf2d('0x55')]({'where':{'id':_0x296979[_0xcf2d('0x61')]}});}return null;})[_0xcf2d('0x23')](handleEntityNotFound(_0x29211b,null))[_0xcf2d('0x23')](function(_0x4254f5){if(_0x4254f5){_0x8bbfe5['interaction']=_0x4254f5['get']({'plain':!![]});interaction_log[_0xcf2d('0x64')](_0xcf2d('0x74'),_0x3a3983[_0xcf2d('0x66')]['id'],_0x3a3983['user']['name'],_0x3a3983[_0xcf2d('0x66')]['role'],_0x8bbfe5['interaction']['id'],_0x3a3983[_0xcf2d('0x56')]?JSON[_0xcf2d('0x27')](_0x3a3983[_0xcf2d('0x56')]):_0xcf2d('0x69'));return respondWithRpcPromise(_0xcf2d('0x75'),_0xcf2d('0x76'),_0x8bbfe5);}return null;})[_0xcf2d('0x23')](function(_0x41ea42){if(_0x41ea42){_0x41ea42['message']['interface']=util[_0xcf2d('0x5b')](_0xcf2d('0x77'),_0x3a3983['user'][_0xcf2d('0x38')]);_0x41ea42[_0xcf2d('0x2a')]['channel']=_0x8bbfe5[_0xcf2d('0x6e')];_0x41ea42['message'][_0xcf2d('0x6f')]=_0xcf2d('0x78');respondWithRpcPromise('EventManager',_0xcf2d('0x70'),{'event':_0xcf2d('0x79'),'message':_0x41ea42[_0xcf2d('0x2a')]},client9002);return _0x8bbfe5;}return null;})['then'](respondWithResult(_0x29211b,null))['catch'](handleError(_0x29211b,null));};exports['status']=function(_0x6161b0,_0x596c31,_0x47c640){if(_0x6161b0[_0xcf2d('0x56')]['id']){delete _0x6161b0[_0xcf2d('0x56')]['id'];}var _0x59848f;return db['SmsMessage']['find']({'where':{'id':_0x6161b0['params']['id']}})[_0xcf2d('0x23')](handleEntityNotFound(_0x596c31,null))[_0xcf2d('0x23')](function(_0x5a4180){if(_0x5a4180){_0x59848f=_0x5a4180;return db[_0xcf2d('0x7a')][_0xcf2d('0x55')]({'where':{'id':_0x5a4180[_0xcf2d('0x7b')]}});}})[_0xcf2d('0x23')](handleEntityNotFound(_0x596c31,null))[_0xcf2d('0x23')](function(_0x51c915){if(_0x51c915){logger[_0xcf2d('0x7c')](_0xcf2d('0x26'),_0xcf2d('0x2d'),_0xcf2d('0x7d'),_0x51c915[_0xcf2d('0x4b')],util[_0xcf2d('0x7e')](_0x6161b0['body'],{'showHidden':![],'depth':null}));switch(_0x51c915['type']){case _0xcf2d('0x7f'):if(_0x6161b0[_0xcf2d('0x56')][_0xcf2d('0x80')]&&_0x6161b0[_0xcf2d('0x56')][_0xcf2d('0x80')]===_0x59848f[_0xcf2d('0x81')]){return _0x59848f[_0xcf2d('0x36')]({'read':!![]});}else{logger[_0xcf2d('0x28')](_0xcf2d('0x82'),_0xcf2d('0x2d'),'twilio',util['inspect'](_0x6161b0['body'],{'showHidden':![],'depth':null}));}break;case _0xcf2d('0x83'):if(_0x6161b0[_0xcf2d('0x56')][_0xcf2d('0x84')]&&_0x6161b0[_0xcf2d('0x56')][_0xcf2d('0x84')]===_0x59848f[_0xcf2d('0x81')]&&_[_0xcf2d('0x85')]([_0xcf2d('0x86'),_0xcf2d('0x87')],_0x6161b0['body'][_0xcf2d('0x88')])>=0x0){return _0x59848f['update']({'read':!![]});}else{logger[_0xcf2d('0x28')](_0xcf2d('0x82'),'status',_0xcf2d('0x89'),util['inspect'](_0x6161b0[_0xcf2d('0x56')],{'showHidden':![],'depth':null}));}break;case _0xcf2d('0x8a'):var _0x32a5a2=_0x6161b0[_0xcf2d('0x56')][_0xcf2d('0x8b')][0x0];if(_0x32a5a2['status'][_0xcf2d('0x8c')]===_0xcf2d('0x8d')){return _0x59848f[_0xcf2d('0x36')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xcf2d('0x2d'),'infobip',util[_0xcf2d('0x7e')](_0x6161b0[_0xcf2d('0x56')],{'showHidden':![],'depth':null}));}break;}return _0x59848f;}})[_0xcf2d('0x23')](respondWithResult(_0x596c31,null))[_0xcf2d('0x52')](handleError(_0x596c31,null));};
\ No newline at end of file
+var _0xa10d=['include','findAll','rows','params','length','includeAll','options','find','create','body','describe','../../config/logger','sms-interactions','accept','sms','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','CmContact','Contact','SmsInteraction','isNil','read1stAt','get','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','interaction','null','acceptMessage','SIP/%s','channel','event','EventManager','acceptmessage','agent','SmsInteractionId','role','RejectMessage','interface','rejectmessage','SmsAccount','received\x20delivery\x20report\x20from','MessageSid','messageId','SmsAccount,\x20%s,\x20%s,\x20%s','twilio','inspect','MessageUUID','sent','delivered','infobip','results','groupName','DELIVERED','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','end','status','json','count','offset','limit','Content-Range','apply','reject','save','update','destroy','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','pick','filter','where','merge','type','key','VIRTUAL','field','SmsMessage'];(function(_0x36ed48,_0x1ee0d4){var _0x51c63a=function(_0x2d0a40){while(--_0x2d0a40){_0x36ed48['push'](_0x36ed48['shift']());}};_0x51c63a(++_0x1ee0d4);}(_0xa10d,0x14b));var _0xda10=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0xa10d[_0x19950b];return _0x3c6b41;};'use strict';var pdf=require(_0xda10('0x0'));var emlformat=require(_0xda10('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xda10('0x2'));var jsonpatch=require(_0xda10('0x3'));var rp=require(_0xda10('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xda10('0x5'));var util=require(_0xda10('0x6'));var path=require(_0xda10('0x7'));var sox=require(_0xda10('0x8'));var csv=require(_0xda10('0x9'));var ejs=require(_0xda10('0xa'));var fs=require('fs');var _=require(_0xda10('0xb'));var squel=require(_0xda10('0xc'));var crypto=require(_0xda10('0xd'));var jsforce=require(_0xda10('0xe'));var deskjs=require(_0xda10('0xf'));var toCsv=require(_0xda10('0x9'));var querystring=require(_0xda10('0x10'));var Papa=require(_0xda10('0x11'));var Redis=require(_0xda10('0x12'));var authService=require(_0xda10('0x13'));var qs=require(_0xda10('0x14'));var hardwareService=require(_0xda10('0x15'));var logger=require('../../config/logger')(_0xda10('0x16'));var utils=require(_0xda10('0x17'));var config=require(_0xda10('0x18'));var db=require(_0xda10('0x19'))['db'];config[_0xda10('0x1a')]=_[_0xda10('0x1b')](config[_0xda10('0x1a')],{'host':_0xda10('0x1c'),'port':0x18eb});var socket=require(_0xda10('0x1d'))(new Redis(config[_0xda10('0x1a')]));require(_0xda10('0x1e'))['register'](socket);var jayson=require(_0xda10('0x1f'));var client=jayson[_0xda10('0x20')][_0xda10('0x21')]({'port':0x232c});var client9002=jayson[_0xda10('0x20')][_0xda10('0x21')]({'port':0x232a});function checkPasswordPattern(_0x29cb41,_0x4c5900,_0x2afb1c){if(_0x2afb1c){var _0x3598b8=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3598b8[_0xda10('0x22')](_0x4c5900)){return _0x29cb41;}else{throw new Error(_0xda10('0x23'));}}else{return _0x29cb41;}}function respondWithRpcPromise(_0x164ed6,_0x49bf3c,_0x881bfe,_0x19bbe4){return new BPromise(function(_0x2cfa52,_0x173627){var _0x2f9302=_0x19bbe4||client;return _0x2f9302['request'](_0x164ed6,_0x881bfe)[_0xda10('0x24')](function(_0x4a2a06){logger[_0xda10('0x25')](_0xda10('0x26'),_0x49bf3c,_0xda10('0x27'));logger[_0xda10('0x28')](_0xda10('0x29'),_0x49bf3c,_0xda10('0x27'),JSON[_0xda10('0x2a')](_0x4a2a06));if(_0x4a2a06[_0xda10('0x2b')]){if(_0x4a2a06[_0xda10('0x2b')][_0xda10('0x2c')]===0x1f4){logger[_0xda10('0x2b')]('SmsMessage,\x20%s,\x20%s',_0x49bf3c,_0x4a2a06[_0xda10('0x2b')]['message']);return _0x173627(_0x4a2a06[_0xda10('0x2b')]['message']);}logger[_0xda10('0x2b')]('SmsMessage,\x20%s,\x20%s',_0x49bf3c,_0x4a2a06[_0xda10('0x2b')]['message']);return _0x2cfa52(_0x4a2a06[_0xda10('0x2b')][_0xda10('0x2d')]);}else{logger[_0xda10('0x25')](_0xda10('0x26'),_0x49bf3c,_0xda10('0x27'));_0x2cfa52(_0x4a2a06['result']['message']);}})[_0xda10('0x2e')](function(_0x222f21){logger['error'](_0xda10('0x26'),_0x49bf3c,_0x222f21);_0x173627(_0x222f21);});});}function respondWithStatusCode(_0x2542a1,_0x4d0d6c){_0x4d0d6c=_0x4d0d6c||0xcc;return function(_0x50db27){if(_0x50db27){return _0x2542a1[_0xda10('0x2f')](_0x4d0d6c);}return _0x2542a1['status'](_0x4d0d6c)[_0xda10('0x30')]();};}function respondWithResult(_0x46bb36,_0x2bfd7a){_0x2bfd7a=_0x2bfd7a||0xc8;return function(_0x142a06){if(_0x142a06){return _0x46bb36[_0xda10('0x31')](_0x2bfd7a)[_0xda10('0x32')](_0x142a06);}};}function respondWithFilteredResult(_0x22b7c3,_0x5d45e1){return function(_0x2161bd){if(_0x2161bd){var _0x5203c2=_0x2161bd[_0xda10('0x33')],_0x51cb67=_0x5d45e1[_0xda10('0x34')],_0x1363d0=_0x5d45e1[_0xda10('0x34')]+_0x5d45e1[_0xda10('0x35')],_0x5d9593;if(_0x1363d0>=_0x5203c2){_0x1363d0=_0x5203c2;_0x5d9593=0xc8;}else{_0x5d9593=0xce;}_0x22b7c3[_0xda10('0x31')](_0x5d9593);return _0x22b7c3['set'](_0xda10('0x36'),_0x51cb67+'-'+_0x1363d0+'/'+_0x5203c2)[_0xda10('0x32')](_0x2161bd);}return null;};}function patchUpdates(_0x27af57){return function(_0x3930f3){try{jsonpatch[_0xda10('0x37')](_0x3930f3,_0x27af57,!![]);}catch(_0x3db7e0){return BPromise[_0xda10('0x38')](_0x3db7e0);}return _0x3930f3[_0xda10('0x39')]();};}function saveUpdates(_0x3d0f25,_0x57875c){return function(_0xa2bfff){if(_0xa2bfff){return _0xa2bfff[_0xda10('0x3a')](_0x3d0f25)[_0xda10('0x24')](function(_0x3aad90){return _0x3aad90;});}return null;};}function removeEntity(_0x44b2d6,_0x33e56f){return function(_0x3b983e){if(_0x3b983e){return _0x3b983e[_0xda10('0x3b')]()['then'](function(){_0x44b2d6[_0xda10('0x31')](0xcc)['end']();});}};}function handleEntityNotFound(_0x11396f,_0x50aacd){return function(_0x5dedca){if(!_0x5dedca){_0x11396f[_0xda10('0x2f')](0x194);}return _0x5dedca;};}function handleError(_0x5651e8,_0x30b7c7){_0x30b7c7=_0x30b7c7||0x1f4;return function(_0x532d45){logger[_0xda10('0x2b')](_0x532d45['stack']);if(_0x532d45[_0xda10('0x3c')]){delete _0x532d45['name'];}_0x5651e8['status'](_0x30b7c7)[_0xda10('0x3d')](_0x532d45);};}exports[_0xda10('0x3e')]=function(_0x20e946,_0x3330e8){var _0x2b110b={},_0x29afc1={},_0x1bc435={'count':0x0,'rows':[]};var _0x4ecc52=db['SmsMessage'][_0xda10('0x3f')];_0x29afc1[_0xda10('0x40')]=_[_0xda10('0x41')](_0x4ecc52);_0x29afc1[_0xda10('0x42')]=_[_0xda10('0x41')](_0x20e946[_0xda10('0x42')]);_0x29afc1[_0xda10('0x43')]=_[_0xda10('0x44')](_0x29afc1[_0xda10('0x40')],_0x29afc1[_0xda10('0x42')]);_0x2b110b[_0xda10('0x45')]=_[_0xda10('0x44')](_0x29afc1[_0xda10('0x40')],qs[_0xda10('0x46')](_0x20e946[_0xda10('0x42')][_0xda10('0x46')]));_0x2b110b['attributes']=_0x2b110b['attributes']['length']?_0x2b110b[_0xda10('0x45')]:_0x29afc1['model'];if(!_0x20e946[_0xda10('0x42')][_0xda10('0x47')](_0xda10('0x48'))){_0x2b110b[_0xda10('0x35')]=qs['limit'](_0x20e946['query']['limit']);_0x2b110b[_0xda10('0x34')]=qs[_0xda10('0x34')](_0x20e946[_0xda10('0x42')]['offset']);}_0x2b110b['order']=qs[_0xda10('0x49')](_0x20e946[_0xda10('0x42')][_0xda10('0x49')]);_0x2b110b['where']=qs['filters'](_[_0xda10('0x4a')](_0x20e946[_0xda10('0x42')],_0x29afc1[_0xda10('0x43')]));if(_0x20e946['query'][_0xda10('0x4b')]){_0x2b110b[_0xda10('0x4c')]=_[_0xda10('0x4d')](_0x2b110b[_0xda10('0x4c')],{'$or':_['map'](_0x4ecc52,function(_0x197d4c){if(_0x197d4c[_0xda10('0x4e')][_0xda10('0x4f')]!==_0xda10('0x50')){var _0x2aae16={};_0x2aae16[_0x197d4c[_0xda10('0x51')]]={'$like':'%'+_0x20e946['query']['filter']+'%'};return _0x2aae16;}})});}_0x2b110b=_[_0xda10('0x4d')]({},_0x2b110b,_0x20e946['options']);var _0x4753d0={'where':_0x2b110b[_0xda10('0x4c')]};return db[_0xda10('0x52')][_0xda10('0x33')](_0x4753d0)['then'](function(_0x2495b4){_0x1bc435[_0xda10('0x33')]=_0x2495b4;if(_0x20e946[_0xda10('0x42')]['includeAll']){_0x2b110b[_0xda10('0x53')]=[{'all':!![]}];}return db[_0xda10('0x52')][_0xda10('0x54')](_0x2b110b);})['then'](function(_0x3f53c6){_0x1bc435[_0xda10('0x55')]=_0x3f53c6;return _0x1bc435;})['then'](respondWithFilteredResult(_0x3330e8,_0x2b110b))[_0xda10('0x2e')](handleError(_0x3330e8,null));};exports['show']=function(_0x138aae,_0x34da1b){var _0x388e1a={'raw':!![],'where':{'id':_0x138aae[_0xda10('0x56')]['id']}},_0x4951fe={};_0x4951fe['model']=_[_0xda10('0x41')](db[_0xda10('0x52')][_0xda10('0x3f')]);_0x4951fe[_0xda10('0x42')]=_[_0xda10('0x41')](_0x138aae[_0xda10('0x42')]);_0x4951fe[_0xda10('0x43')]=_[_0xda10('0x44')](_0x4951fe[_0xda10('0x40')],_0x4951fe[_0xda10('0x42')]);_0x388e1a[_0xda10('0x45')]=_[_0xda10('0x44')](_0x4951fe[_0xda10('0x40')],qs[_0xda10('0x46')](_0x138aae[_0xda10('0x42')][_0xda10('0x46')]));_0x388e1a[_0xda10('0x45')]=_0x388e1a[_0xda10('0x45')][_0xda10('0x57')]?_0x388e1a[_0xda10('0x45')]:_0x4951fe[_0xda10('0x40')];if(_0x138aae[_0xda10('0x42')][_0xda10('0x58')]){_0x388e1a[_0xda10('0x53')]=[{'all':!![]}];}_0x388e1a=_[_0xda10('0x4d')]({},_0x388e1a,_0x138aae[_0xda10('0x59')]);return db['SmsMessage'][_0xda10('0x5a')](_0x388e1a)[_0xda10('0x24')](handleEntityNotFound(_0x34da1b,null))['then'](respondWithResult(_0x34da1b,null))[_0xda10('0x2e')](handleError(_0x34da1b,null));};exports['create']=function(_0x23bafc,_0x2b3cb6){return db[_0xda10('0x52')][_0xda10('0x5b')](_0x23bafc['body'],{})[_0xda10('0x24')](respondWithResult(_0x2b3cb6,0xc9))[_0xda10('0x2e')](handleError(_0x2b3cb6,null));};exports[_0xda10('0x3a')]=function(_0x12619f,_0x2fab1b){if(_0x12619f['body']['id']){delete _0x12619f[_0xda10('0x5c')]['id'];}return db['SmsMessage'][_0xda10('0x5a')]({'where':{'id':_0x12619f[_0xda10('0x56')]['id']}})[_0xda10('0x24')](handleEntityNotFound(_0x2fab1b,null))[_0xda10('0x24')](saveUpdates(_0x12619f[_0xda10('0x5c')],null))[_0xda10('0x24')](respondWithResult(_0x2fab1b,null))[_0xda10('0x2e')](handleError(_0x2fab1b,null));};exports['destroy']=function(_0x1c5837,_0x4ccd79){return db[_0xda10('0x52')][_0xda10('0x5a')]({'where':{'id':_0x1c5837[_0xda10('0x56')]['id']}})[_0xda10('0x24')](handleEntityNotFound(_0x4ccd79,null))['then'](removeEntity(_0x4ccd79,null))['catch'](handleError(_0x4ccd79,null));};exports[_0xda10('0x5d')]=function(_0x2ea46f,_0x841032){return db['SmsMessage'][_0xda10('0x5d')]()[_0xda10('0x24')](respondWithResult(_0x841032,null))['catch'](handleError(_0x841032,null));};var interaction_log=require(_0xda10('0x5e'))(_0xda10('0x5f'));exports[_0xda10('0x60')]=function(_0x2003af,_0xcfc283,_0x19ec9d){var _0x3325c6={'channel':_0xda10('0x61')};if(_0x2003af['body']['id']){delete _0x2003af['body']['id'];}_0x2003af[_0xda10('0x5c')][_0xda10('0x62')]=!![];_0x2003af[_0xda10('0x5c')]['readAt']=moment()[_0xda10('0x63')](_0xda10('0x64'));_0x2003af[_0xda10('0x5c')]['UserId']=_0x2003af['body'][_0xda10('0x65')]||_0x2003af['user']['id'];return db[_0xda10('0x52')][_0xda10('0x5a')]({'where':{'id':_0x2003af['params']['id'],'UserId':null},'include':[{'model':db[_0xda10('0x66')],'as':_0xda10('0x67')}]})['then'](handleEntityNotFound(_0xcfc283,null))[_0xda10('0x24')](saveUpdates(_0x2003af['body'],null))[_0xda10('0x24')](function(_0x311def){if(_0x311def){_0x3325c6[_0xda10('0x2d')]=_0x311def['get']({'plain':!![]});return db[_0xda10('0x68')][_0xda10('0x5a')]({'where':{'id':_0x311def['SmsInteractionId']}});}return null;})[_0xda10('0x24')](handleEntityNotFound(_0xcfc283,null))[_0xda10('0x24')](function(_0x5f3a62){if(_0x5f3a62){return _0x5f3a62[_0xda10('0x3a')]({'UserId':_0x2003af['body'][_0xda10('0x65')],'read1stAt':_[_0xda10('0x69')](_0x5f3a62[_0xda10('0x6a')])?moment()['format'](_0xda10('0x64')):undefined});}return null;})['then'](function(_0xc352bd){if(_0xc352bd){_0x3325c6['interaction']=_0xc352bd[_0xda10('0x6b')]({'plain':!![]});interaction_log[_0xda10('0x25')](_0xda10('0x6c'),_0x2003af[_0xda10('0x6d')]['id'],_0x2003af[_0xda10('0x6d')][_0xda10('0x3c')],_0x2003af['user']['role'],_0x3325c6[_0xda10('0x6e')]['id'],_0x2003af[_0xda10('0x5c')]?JSON[_0xda10('0x2a')](_0x2003af[_0xda10('0x5c')]):_0xda10('0x6f'));return respondWithRpcPromise('AcceptMessage',_0xda10('0x70'),_0x3325c6);}return null;})[_0xda10('0x24')](function(_0x33f365){if(_0x33f365){if(_0x2003af[_0xda10('0x5c')]['manual']){_0x3325c6[_0xda10('0x2d')]['interface']=util[_0xda10('0x63')](_0xda10('0x71'),_0x2003af[_0xda10('0x6d')][_0xda10('0x3c')]);_0x3325c6[_0xda10('0x2d')][_0xda10('0x72')]=_0x3325c6['channel'];_0x3325c6['message'][_0xda10('0x73')]=_0xda10('0x60');return respondWithRpcPromise(_0xda10('0x74'),_0xda10('0x74'),{'event':_0xda10('0x75'),'message':_0x3325c6[_0xda10('0x2d')]},client9002)[_0xda10('0x24')](function(){return _0x3325c6;});}return _0x3325c6;}return null;})[_0xda10('0x24')](respondWithResult(_0xcfc283,null))['catch'](handleError(_0xcfc283,null));};var interaction_log=require(_0xda10('0x5e'))(_0xda10('0x5f'));exports['reject']=function(_0x2bc29b,_0x241471,_0x30d2ac){var _0x2bbeb6={'agent':{},'channel':_0xda10('0x61')};if(_0x2bc29b[_0xda10('0x5c')]['id']){delete _0x2bc29b[_0xda10('0x5c')]['id'];}_0x2bc29b[_0xda10('0x5c')][_0xda10('0x65')]=_0x2bc29b['body']['UserId']||_0x2bc29b[_0xda10('0x6d')]['id'];_0x2bbeb6[_0xda10('0x76')]['id']=_0x2bc29b[_0xda10('0x5c')][_0xda10('0x65')];return db['SmsMessage'][_0xda10('0x5a')]({'where':{'id':_0x2bc29b[_0xda10('0x56')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x241471,null))['then'](function(_0x59a111){if(_0x59a111){_0x2bbeb6[_0xda10('0x2d')]=_0x59a111[_0xda10('0x6b')]({'plain':!![]});return db[_0xda10('0x68')]['find']({'where':{'id':_0x59a111[_0xda10('0x77')]}});}return null;})[_0xda10('0x24')](handleEntityNotFound(_0x241471,null))[_0xda10('0x24')](function(_0xc824b4){if(_0xc824b4){_0x2bbeb6['interaction']=_0xc824b4[_0xda10('0x6b')]({'plain':!![]});interaction_log['info']('[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x2bc29b[_0xda10('0x6d')]['id'],_0x2bc29b['user'][_0xda10('0x3c')],_0x2bc29b[_0xda10('0x6d')][_0xda10('0x78')],_0x2bbeb6[_0xda10('0x6e')]['id'],_0x2bc29b[_0xda10('0x5c')]?JSON[_0xda10('0x2a')](_0x2bc29b[_0xda10('0x5c')]):_0xda10('0x6f'));return respondWithRpcPromise(_0xda10('0x79'),'rejectMessage',_0x2bbeb6);}return null;})[_0xda10('0x24')](function(_0x8350f1){if(_0x8350f1){_0x8350f1[_0xda10('0x2d')][_0xda10('0x7a')]=util[_0xda10('0x63')]('SIP/%s',_0x2bc29b[_0xda10('0x6d')][_0xda10('0x3c')]);_0x8350f1[_0xda10('0x2d')]['channel']=_0x2bbeb6['channel'];_0x8350f1[_0xda10('0x2d')][_0xda10('0x73')]=_0xda10('0x38');respondWithRpcPromise(_0xda10('0x74'),'EventManager',{'event':_0xda10('0x7b'),'message':_0x8350f1[_0xda10('0x2d')]},client9002);return _0x2bbeb6;}return null;})[_0xda10('0x24')](respondWithResult(_0x241471,null))[_0xda10('0x2e')](handleError(_0x241471,null));};exports['status']=function(_0xd844d6,_0x17f868,_0x20393c){if(_0xd844d6['body']['id']){delete _0xd844d6['body']['id'];}var _0x5f1d58;return db[_0xda10('0x52')][_0xda10('0x5a')]({'where':{'id':_0xd844d6[_0xda10('0x56')]['id']}})[_0xda10('0x24')](handleEntityNotFound(_0x17f868,null))[_0xda10('0x24')](function(_0x4f150b){if(_0x4f150b){_0x5f1d58=_0x4f150b;return db[_0xda10('0x7c')][_0xda10('0x5a')]({'where':{'id':_0x4f150b['SmsAccountId']}});}})[_0xda10('0x24')](handleEntityNotFound(_0x17f868,null))[_0xda10('0x24')](function(_0x25c383){if(_0x25c383){logger[_0xda10('0x28')](_0xda10('0x29'),'status',_0xda10('0x7d'),_0x25c383[_0xda10('0x4e')],util['inspect'](_0xd844d6['body'],{'showHidden':![],'depth':null}));switch(_0x25c383[_0xda10('0x4e')]){case'twilio':if(_0xd844d6[_0xda10('0x5c')][_0xda10('0x7e')]&&_0xd844d6[_0xda10('0x5c')]['MessageSid']===_0x5f1d58[_0xda10('0x7f')]){return _0x5f1d58['update']({'read':!![]});}else{logger[_0xda10('0x2b')](_0xda10('0x80'),_0xda10('0x31'),_0xda10('0x81'),util[_0xda10('0x82')](_0xd844d6['body'],{'showHidden':![],'depth':null}));}break;case'plivo':if(_0xd844d6[_0xda10('0x5c')]['MessageUUID']&&_0xd844d6['body'][_0xda10('0x83')]===_0x5f1d58['messageId']&&_['indexOf']([_0xda10('0x84'),_0xda10('0x85')],_0xd844d6[_0xda10('0x5c')]['Status'])>=0x0){return _0x5f1d58[_0xda10('0x3a')]({'read':!![]});}else{logger[_0xda10('0x2b')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xda10('0x31'),'plivio',util[_0xda10('0x82')](_0xd844d6[_0xda10('0x5c')],{'showHidden':![],'depth':null}));}break;case _0xda10('0x86'):var _0x2993b9=_0xd844d6[_0xda10('0x5c')][_0xda10('0x87')][0x0];if(_0x2993b9[_0xda10('0x31')][_0xda10('0x88')]===_0xda10('0x89')){return _0x5f1d58['update']({'read':!![]});}else{logger['error'](_0xda10('0x80'),_0xda10('0x31'),_0xda10('0x86'),util[_0xda10('0x82')](_0xd844d6[_0xda10('0x5c')],{'showHidden':![],'depth':null}));}break;}return _0x5f1d58;}})[_0xda10('0x24')](respondWithResult(_0x17f868,null))[_0xda10('0x2e')](handleError(_0x17f868,null));};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.events.js b/server/api/smsMessage/smsMessage.events.js
index 678dab8..48b9737 100644
--- a/server/api/smsMessage/smsMessage.events.js
+++ b/server/api/smsMessage/smsMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3423=['remove','emit','hasOwnProperty','hook','exports','SmsMessage','setMaxListeners','save','update'];(function(_0x5a636f,_0x3fec2b){var _0x6a8cfb=function(_0x20e6ca){while(--_0x20e6ca){_0x5a636f['push'](_0x5a636f['shift']());}};_0x6a8cfb(++_0x3fec2b);}(_0x3423,0x188));var _0x3342=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3423[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require('events');var SmsMessage=require('../../mysqldb')['db'][_0x3342('0x0')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x3342('0x1')](0x0);var events={'afterCreate':_0x3342('0x2'),'afterUpdate':_0x3342('0x3'),'afterDestroy':_0x3342('0x4')};function emitEvent(_0x28aad1){return function(_0x2207ce,_0x3c5d8d,_0x3075f8){SmsMessageEvents[_0x3342('0x5')](_0x28aad1+':'+_0x2207ce['id'],_0x2207ce);SmsMessageEvents[_0x3342('0x5')](_0x28aad1,_0x2207ce);_0x3075f8(null);};}for(var e in events){if(events[_0x3342('0x6')](e)){var event=events[e];SmsMessage[_0x3342('0x7')](e,emitEvent(event));}}module[_0x3342('0x8')]=SmsMessageEvents;
\ No newline at end of file
+var _0xd139=['save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x13fbb6,_0x22b508){var _0x26fe48=function(_0x458c42){while(--_0x458c42){_0x13fbb6['push'](_0x13fbb6['shift']());}};_0x26fe48(++_0x22b508);}(_0xd139,0x14e));var _0x9d13=function(_0x1fac75,_0x2f233b){_0x1fac75=_0x1fac75-0x0;var _0x13abd7=_0xd139[_0x1fac75];return _0x13abd7;};'use strict';var EventEmitter=require(_0x9d13('0x0'));var SmsMessage=require(_0x9d13('0x1'))['db']['SmsMessage'];var SmsMessageEvents=new EventEmitter();SmsMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9d13('0x2'),'afterUpdate':_0x9d13('0x3'),'afterDestroy':_0x9d13('0x4')};function emitEvent(_0x1994e8){return function(_0x1d39f0,_0xdeacf6,_0x16b9f2){SmsMessageEvents['emit'](_0x1994e8+':'+_0x1d39f0['id'],_0x1d39f0);SmsMessageEvents[_0x9d13('0x5')](_0x1994e8,_0x1d39f0);_0x16b9f2(null);};}for(var e in events){if(events[_0x9d13('0x6')](e)){var event=events[e];SmsMessage['hook'](e,emitEvent(event));}}module[_0x9d13('0x7')]=SmsMessageEvents;
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.model.js b/server/api/smsMessage/smsMessage.model.js
index 6eaaffb..988824a 100644
--- a/server/api/smsMessage/smsMessage.model.js
+++ b/server/api/smsMessage/smsMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x07db=['format','%s:%s','https://rest.clicksend.com/v3/sms/send','toString','base64','http_code','data','queued_count','head','message_id','clickSend','plivo','authId','/api/sms/messages/','Basic\x20%s','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','login','text','timestamp','keys','sort','length','createHash','md5','digest','https://sms.csc.lv/external/get/send.php?','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','uuid','UTF-8','apiMessageId','intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','code','message','refid','status','finally','utf8mb4','utf8mb4_unicode_ci','util','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define','SmsMessage','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction','toLowerCase','secret','isNil','UserId','findOne','then','update','createdAt','error','out','SmsAccount','SmsAccountId','type','twilio','accountSid','authToken','phone','messages','create','remote','/status?token=','token','sid','afterCreate','inspect','SmsMessage,\x20%s,\x20%s,\x20%s','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','login?username=','&password=','GET','split','sms','POST','user_key','session_key','internal_order_id','deliveryReport','read','skebby','catch','Missing\x20parameters:\x20username,\x20password','connectel','senderString','https://smsapi.connectel.se/api/send/','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion'];(function(_0x37c07d,_0xdbdb5f){var _0x10dadc=function(_0x2bafb7){while(--_0x2bafb7){_0x37c07d['push'](_0x37c07d['shift']());}};_0x10dadc(++_0xdbdb5f);}(_0x07db,0xad));var _0xb07d=function(_0x1c68d9,_0x1591f1){_0x1c68d9=_0x1c68d9-0x0;var _0x5a47f8=_0x07db[_0x1c68d9];return _0x5a47f8;};'use strict';var _=require('lodash');var util=require(_0xb07d('0x0'));var logger=require('../../config/logger')(_0xb07d('0x1'));var moment=require(_0xb07d('0x2'));var BPromise=require(_0xb07d('0x3'));var rp=require(_0xb07d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb07d('0x5'));var config=require(_0xb07d('0x6'));var attributes=require('./smsMessage.attributes');module[_0xb07d('0x7')]=function(_0x34fef1,_0x411cd6){return _0x34fef1[_0xb07d('0x8')](_0xb07d('0x9'),attributes,{'tableName':'sms_messages','paranoid':![],'indexes':[{'name':'messageId','fields':[_0xb07d('0xa')]},{'name':_0xb07d('0xb'),'fields':[_0xb07d('0xc')],'type':_0xb07d('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x4d2b4f,_0x1ecd06,_0x874c9c){var _0x5712ee=_0x34fef1[_0xb07d('0xe')];var _0x3cb531=_0x4d2b4f[_0xb07d('0xf')]({'plain':!![]});if(_0x3cb531[_0xb07d('0x10')]['toLowerCase']()==='in'||_0x3cb531['direction'][_0xb07d('0x11')]()==='out'&&!_0x3cb531[_0xb07d('0x12')]&&!_[_0xb07d('0x13')](_0x3cb531[_0xb07d('0x14')])){_0x5712ee['SmsInteraction'][_0xb07d('0x15')]({'where':{'id':_0x3cb531['SmsInteractionId']}})[_0xb07d('0x16')](function(_0x4dc2a5){if(_0x4dc2a5){_0x4dc2a5[_0xb07d('0x17')]({'lastMsgAt':_0x3cb531[_0xb07d('0x18')],'lastMsgDirection':_0x3cb531[_0xb07d('0x10')][_0xb07d('0x11')]()});}})['catch'](function(_0x1d7771){console[_0xb07d('0x19')](_0x1d7771);});}if(_0x3cb531['direction']===_0xb07d('0x1a')&&!_0x3cb531[_0xb07d('0x12')]){var _0x2fa796;_0x5712ee[_0xb07d('0x1b')]['find']({'where':{'id':_0x3cb531[_0xb07d('0x1c')]},'raw':!![]})['then'](function(_0x4918bc){_0x2fa796=_0x4918bc;if(_0x2fa796&&_0x2fa796[_0xb07d('0x1d')]){switch(_0x2fa796[_0xb07d('0x1d')]){case _0xb07d('0x1e'):var _0x201f06=require(_0xb07d('0x1e'));if(_0x2fa796[_0xb07d('0x1f')]&&_0x2fa796[_0xb07d('0x20')]&&_0x2fa796[_0xb07d('0x21')]){var _0xbc959c=new _0x201f06(_0x2fa796[_0xb07d('0x1f')],_0x2fa796[_0xb07d('0x20')]);_0xbc959c[_0xb07d('0x22')][_0xb07d('0x23')]({'body':_0x3cb531[_0xb07d('0xc')],'to':_0x3cb531[_0xb07d('0x21')],'from':_0x2fa796[_0xb07d('0x21')],'statusCallback':_0x2fa796[_0xb07d('0x24')]+'/api/sms/messages/'+_0x3cb531['id']+_0xb07d('0x25')+_0x2fa796[_0xb07d('0x26')]})[_0xb07d('0x16')](function(_0x10e382){if(_0x10e382[_0xb07d('0x27')]){return _0x4d2b4f[_0xb07d('0x17')]({'messageId':_0x10e382[_0xb07d('0x27')]});}})['catch'](function(_0x280015){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xb07d('0x28'),'twilio',util[_0xb07d('0x29')](_0x280015,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x1e'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case'skebby':var _0x24910f=_0xb07d('0x2b');if(_0x2fa796[_0xb07d('0x2c')]&&_0x2fa796[_0xb07d('0x2d')]){var _0xd8c0e0={'recipient':[_0x3cb531['phone']],'message':_0x3cb531[_0xb07d('0xc')],'message_type':_0x2fa796['smsMethod']};if(_0x2fa796[_0xb07d('0x2e')]&&_0x2fa796['smsMethod']!=='SI'){_0xd8c0e0['sender']=_0x2fa796[_0xb07d('0x21')];}var _0x531ca8={'url':_0x24910f+_0xb07d('0x2f')+_0x2fa796[_0xb07d('0x2c')]+_0xb07d('0x30')+_0x2fa796[_0xb07d('0x2d')],'method':_0xb07d('0x31')};rp(_0x531ca8)[_0xb07d('0x16')](function(_0x293042){var _0x10dce5=_0x293042[_0xb07d('0x32')](';');var _0x4ce609={'user_key':_0x10dce5[0x0],'session_key':_0x10dce5[0x1]};_0x531ca8={'url':_0x24910f+_0xb07d('0x33'),'method':_0xb07d('0x34'),'headers':{'user_key':_0x4ce609[_0xb07d('0x35')],'Session_key':_0x4ce609[_0xb07d('0x36')]},'json':!![],'body':_0xd8c0e0};return rp(_0x531ca8);})[_0xb07d('0x16')](function(_0x41a219){if(_0x41a219['total_sent']>=0x1){var _0x16af2d={'messageId':_0x41a219[_0xb07d('0x37')]};if(_0x2fa796['smsMethod']!=='GP'||!_0x2fa796[_0xb07d('0x38')]){_0x16af2d[_0xb07d('0x39')]=!![];}return _0x4d2b4f[_0xb07d('0x17')](_0x16af2d);}else{return logger[_0xb07d('0x19')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xb07d('0x3a'),util[_0xb07d('0x29')](_0x41a219,{'showHidden':![],'depth':null}));}})[_0xb07d('0x3b')](function(_0x5e0d96){return logger['error'](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x3a'),util[_0xb07d('0x29')](_0x5e0d96,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),'afterCreate',_0xb07d('0x3a'),_0xb07d('0x3c'));}break;case _0xb07d('0x3d'):if(_0x2fa796[_0xb07d('0x20')]){var _0x36753c={'recipient':_0x3cb531[_0xb07d('0x21')],'message':_0x3cb531['body'],'sender':_0x2fa796[_0xb07d('0x3e')]||_0x2fa796['phone'],'authorization':_0x2fa796[_0xb07d('0x20')]};var _0x1ecd06={'method':_0xb07d('0x34'),'uri':_0xb07d('0x3f'),'body':_0x36753c,'json':!![]};rp(_0x1ecd06)[_0xb07d('0x16')](function(_0x5f1ad0){var _0x48e93f={'messageId':_0x5f1ad0['requestid']};if(!_0x2fa796[_0xb07d('0x38')]){_0x48e93f[_0xb07d('0x39')]=!![];}return _0x4d2b4f['update'](_0x48e93f);})['catch'](function(_0x497b2b){logger['error'](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x3d'),util[_0xb07d('0x29')](_0x497b2b,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x3d'),_0xb07d('0x40'));}break;case _0xb07d('0x41'):if(_0x2fa796[_0xb07d('0x2c')]&&_0x2fa796[_0xb07d('0x2d')]){var _0x36753c={'messages':[{'source':_0xb07d('0x42'),'to':_0x3cb531[_0xb07d('0x21')],'body':_0x3cb531[_0xb07d('0xc')],'from':_0x2fa796[_0xb07d('0x3e')]||_0x2fa796[_0xb07d('0x21')]}]};var _0x5c076a=util[_0xb07d('0x43')](_0xb07d('0x44'),_0x2fa796[_0xb07d('0x2c')],_0x2fa796[_0xb07d('0x2d')]);var _0x1ecd06={'method':_0xb07d('0x34'),'uri':_0xb07d('0x45'),'body':_0x36753c,'headers':{'Authorization':util[_0xb07d('0x43')]('Basic\x20%s',new Buffer(_0x5c076a)[_0xb07d('0x46')](_0xb07d('0x47')))},'json':!![]};rp(_0x1ecd06)[_0xb07d('0x16')](function(_0x2f4c22){if(_0x2f4c22[_0xb07d('0x48')]>=0xc8&&_0x2f4c22[_0xb07d('0x48')]<=0xce){if(_0x2f4c22[_0xb07d('0x49')]&&_0x2f4c22[_0xb07d('0x49')][_0xb07d('0x4a')]>0x0){var _0x48f89e=_[_0xb07d('0x4b')](_0x2f4c22[_0xb07d('0x49')]['messages']);var _0x724196={'messageId':_0x48f89e[_0xb07d('0x4c')]};if(!_0x2fa796['deliveryReport']){_0x724196[_0xb07d('0x39')]=!![];}return _0x4d2b4f[_0xb07d('0x17')](_0x724196);}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x4d'),util[_0xb07d('0x29')](_0x2f4c22,{'showHidden':![],'depth':null}));}}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x4d'),util[_0xb07d('0x29')](_0x2f4c22,{'showHidden':![],'depth':null}));}})['catch'](function(_0xe5d4e4){logger[_0xb07d('0x19')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xb07d('0x28'),_0xb07d('0x4d'),util[_0xb07d('0x29')](_0xe5d4e4,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xb07d('0x28'),_0xb07d('0x4d'),_0xb07d('0x3c'));}break;case _0xb07d('0x4e'):if(_0x2fa796[_0xb07d('0x4f')]&&_0x2fa796[_0xb07d('0x20')]){var _0x36753c={'dst':_0x3cb531['phone'],'text':_0x3cb531[_0xb07d('0xc')],'src':_0x2fa796['senderString']||_0x2fa796[_0xb07d('0x21')],'url':_0x2fa796[_0xb07d('0x24')]+_0xb07d('0x50')+_0x3cb531['id']+'/status?token='+_0x2fa796[_0xb07d('0x26')]};var _0x5c076a=util['format']('%s:%s',_0x2fa796[_0xb07d('0x4f')],_0x2fa796[_0xb07d('0x20')]);var _0x1ecd06={'method':'POST','uri':util['format']('https://api.plivo.com/v1/Account/%s/Message/',_0x2fa796[_0xb07d('0x4f')]),'body':_0x36753c,'headers':{'Authorization':util['format'](_0xb07d('0x51'),new Buffer(_0x5c076a)[_0xb07d('0x46')](_0xb07d('0x47')))},'json':!![]};rp(_0x1ecd06)[_0xb07d('0x16')](function(_0x538a05){var _0x55dfdb={'messageId':_0x538a05[_0xb07d('0x52')][0x0]};return _0x4d2b4f[_0xb07d('0x17')](_0x55dfdb);})[_0xb07d('0x3b')](function(_0x728962){logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),'plivo',util[_0xb07d('0x29')](_0x728962,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xb07d('0x2a'),_0xb07d('0x28'),'plivo',_0xb07d('0x53'));}break;case _0xb07d('0x54'):if(_0x2fa796[_0xb07d('0x2c')]&&_0x2fa796[_0xb07d('0x2d')]){if(_0x2fa796[_0xb07d('0x55')]){var _0x307fa6={'method':'POST','uri':_0x2fa796['baseUrl']+_0xb07d('0x56'),'body':{'username':_0x2fa796[_0xb07d('0x2c')],'password':_0x2fa796['password']},'json':!![]};return rp(_0x307fa6)[_0xb07d('0x16')](function(_0x11e0f2){var _0x387552={'method':_0xb07d('0x34'),'uri':_0x2fa796['baseUrl']+_0xb07d('0x57'),'body':{'messages':[{'from':_0x2fa796[_0xb07d('0x21')],'destinations':[{'to':_0x3cb531[_0xb07d('0x21')]}],'text':_0x3cb531[_0xb07d('0xc')],'notifyUrl':_0x2fa796[_0xb07d('0x24')]+'/api/sms/messages/'+_0x3cb531['id']+_0xb07d('0x25')+_0x2fa796['token'],'notifyContentType':_0xb07d('0x58'),'callbackData':_0x2fa796[_0xb07d('0x21')]+';'+_0x3cb531[_0xb07d('0xc')]}]},'headers':{'Authorization':_0xb07d('0x59')+_0x11e0f2[_0xb07d('0x26')]},'json':!![]};return rp(_0x387552)[_0xb07d('0x16')](function(_0x1e52c2){if(_0x1e52c2['messages']){var _0x4e8021={'messageId':_0x1e52c2[_0xb07d('0x22')][0x0][_0xb07d('0xa')]};if(!_0x2fa796[_0xb07d('0x38')]){_0x4e8021[_0xb07d('0x39')]=!![];}return _0x4d2b4f[_0xb07d('0x17')](_0x4e8021);}else{return logger['error'](_0xb07d('0x2a'),_0xb07d('0x28'),'infobip',util[_0xb07d('0x29')](_0x1e52c2,{'showHidden':![],'depth':null}));}});})[_0xb07d('0x3b')](function(_0x4f22ad){return logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x54'),util['inspect'](_0x4f22ad,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x54'),_0xb07d('0x5a'));}}else{logger[_0xb07d('0x19')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xb07d('0x54'),_0xb07d('0x3c'));}break;case _0xb07d('0x5b'):var _0x338b2f=require(_0xb07d('0x5c'));if(_0x2fa796[_0xb07d('0x5d')]){var _0x306c91={};_0x306c91[_0xb07d('0x5e')]=_0x2fa796[_0xb07d('0x2c')];_0x306c91[_0xb07d('0x21')]=_0x3cb531[_0xb07d('0x21')];_0x306c91['sender']=_0x2fa796[_0xb07d('0x21')];_0x306c91[_0xb07d('0x5f')]=_0x3cb531[_0xb07d('0xc')];_0x306c91[_0xb07d('0x60')]=+new Date();var _0x19959='';var _0x4a307d='';var _0x3034b1=Object[_0xb07d('0x61')](_0x306c91);_0x3034b1[_0xb07d('0x62')]();for(var _0x5e4e93=0x0;_0x5e4e93<_0x3034b1[_0xb07d('0x63')];_0x5e4e93++){if(_0x19959!=''){_0x19959+='&';}_0x19959+=_0x3034b1[_0x5e4e93]+'='+encodeURIComponent(_0x306c91[_0x3034b1[_0x5e4e93]]);_0x4a307d+=_0x306c91[_0x3034b1[_0x5e4e93]];}_0x4a307d+=_0x2fa796[_0xb07d('0x5d')];_0x4a307d=_0x338b2f[_0xb07d('0x64')](_0xb07d('0x65'))['update'](_0x4a307d)[_0xb07d('0x66')]('hex');if(_0x19959!==''){_0x19959+='&';}_0x19959+='signature='+_0x4a307d;var _0x531ca8={'method':_0xb07d('0x31'),'uri':_0xb07d('0x67')+_0x19959,'json':!![]};return rp(_0x531ca8)[_0xb07d('0x16')](function(_0x26740d){var _0x38a5ae=Object[_0xb07d('0x61')](_0x26740d);if(_0x26740d[_0x38a5ae[0x0]][_0xb07d('0x19')]&&parseInt(_0x26740d[_0x38a5ae[0x0]][_0xb07d('0x19')])===0x0){var _0x109d9d={'messageId':_0x26740d[_0x38a5ae[0x0]]['id_sms']};if(!_0x2fa796[_0xb07d('0x38')]){_0x109d9d[_0xb07d('0x39')]=!![];}return _0x4d2b4f[_0xb07d('0x17')](_0x109d9d);}else{return logger[_0xb07d('0x19')](_0xb07d('0x2a'),'afterCreate',_0xb07d('0x5b'),util['inspect'](_0x26740d[_0xb07d('0x19')],{'showHidden':![],'depth':null}));}})[_0xb07d('0x3b')](function(_0x5766da){return logger[_0xb07d('0x19')](_0xb07d('0x2a'),'afterCreate','csc',util['inspect'](_0x5766da,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x5b'),_0xb07d('0x68'));}break;case _0xb07d('0x69'):if(_0x2fa796['apiKey']){var _0x47f339={'method':_0xb07d('0x34'),'uri':_0xb07d('0x6a'),'headers':{'Authorization':_0x2fa796[_0xb07d('0x5d')]},'body':{'content':_0x3cb531[_0xb07d('0xc')],'to':[_0x3cb531[_0xb07d('0x21')]],'from':_0x2fa796['phone'],'binary':![],'clientMessageId':_0xb07d('0x6b'),'charset':_0xb07d('0x6c')},'json':!![]};rp(_0x47f339)[_0xb07d('0x16')](function(_0x3b3be3){if(!_0x3b3be3['error']){var _0x419727={'messageId':_0x3b3be3[_0xb07d('0x22')][0x0][_0xb07d('0x6d')]};if(!_0x2fa796['deliveryReport']){_0x419727['read']=!![];}return _0x4d2b4f[_0xb07d('0x17')](_0x419727);}else{return logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x69'),util[_0xb07d('0x29')](_0x3b3be3[_0xb07d('0x19')],{'showHidden':![],'depth':null}));}})[_0xb07d('0x3b')](function(_0x2cf342){return logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x69'),util[_0xb07d('0x29')](_0x2cf342,{'showHidden':![],'depth':null}));});}else{logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),_0xb07d('0x69'),_0xb07d('0x68'));}break;case _0xb07d('0x6e'):if(_0x2fa796[_0xb07d('0x5d')]){var _0x313e3a={};var _0x531ca8={'method':_0xb07d('0x34'),'uri':_0xb07d('0x6f'),'headers':{'Authorization':_0xb07d('0x70')+_0x2fa796['apiKey'],'Content-Type':'application/json'},'body':{'from':_0x2fa796['phone'],'to':_0x3cb531[_0xb07d('0x21')],'text':_0x3cb531[_0xb07d('0xc')]},'json':!![]};return rp(_0x531ca8)[_0xb07d('0x16')](function(_0xe798a3){if(_0xe798a3[_0xb07d('0x71')]==0xca){_0x313e3a['message']=_0xe798a3;var _0x3ed1e8={'method':_0xb07d('0x34'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/mdr','headers':{'Authorization':_0xb07d('0x70')+_0x2fa796[_0xb07d('0x5d')],'Content-Type':'application/json'},'body':{'refid':_0x313e3a[_0xb07d('0x72')][_0xb07d('0x73')]},'json':!![]};return rp(_0x3ed1e8)[_0xb07d('0x16')](function(_0x2b933d){_0x313e3a[_0xb07d('0x74')]=_0x2b933d;var _0x5daa8b={'messageId':_0x313e3a[_0xb07d('0x72')]['refid'],'read':!![]};return _0x4d2b4f[_0xb07d('0x17')](_0x5daa8b);});}else{return logger[_0xb07d('0x19')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xb07d('0x6e'),util[_0xb07d('0x29')](_0xe798a3,{'showHidden':![],'depth':null}));}})['catch'](function(_0x321e4b){return logger[_0xb07d('0x19')](_0xb07d('0x2a'),_0xb07d('0x28'),'intelepeer',util[_0xb07d('0x29')](_0x321e4b,{'showHidden':![],'depth':null}));});}else{return logger[_0xb07d('0x19')](_0xb07d('0x2a'),'afterCreate',_0xb07d('0x6e'),'Token\x20not\x20received');}break;}}})[_0xb07d('0x75')](function(){_0x874c9c();});}else{_0x874c9c();}}},'charset':_0xb07d('0x76'),'collate':_0xb07d('0x77')});};
\ No newline at end of file
+var _0xe9e9=['bluebird','path','rimraf','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','get','direction','toLowerCase','out','secret','isNil','UserId','SmsInteraction','then','update','createdAt','catch','error','SmsAccount','find','SmsAccountId','type','twilio','accountSid','authToken','phone','messages','create','remote','/api/sms/messages/','sid','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','login?username=','sms','POST','user_key','session_key','total_sent','deliveryReport','read','inspect','Missing\x20parameters:\x20username,\x20password','connectel','Missing\x20parameters:\x20authToken','xCALLY\x20Motion','senderString','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','http_code','data','queued_count','head','message_id','clickSend','plivo','authId','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','baseUrl','/auth/1/session','/sms/2/text/advanced','/status?token=','token','application/json','IBSSO\x20','infobip','Missing\x20parameters:\x20base_url','csc','apiKey','login','text','timestamp','keys','sort','length','md5','digest','hex','https://sms.csc.lv/external/get/send.php?','Missing\x20parameters:\x20apiKey','uuid','UTF-8','apiMessageId','clickatell','https://api.intelepeer.com/_rest/v4/app/sms/send','code','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','status','intelepeer','Token\x20not\x20received','finally','utf8mb4_unicode_ci','lodash','util','../../config/logger','api'];(function(_0x445e66,_0x56b365){var _0x4a1436=function(_0x53b6b5){while(--_0x53b6b5){_0x445e66['push'](_0x445e66['shift']());}};_0x4a1436(++_0x56b365);}(_0xe9e9,0xe4));var _0x9e9e=function(_0x461af8,_0x14f1e8){_0x461af8=_0x461af8-0x0;var _0x5d877b=_0xe9e9[_0x461af8];return _0x5d877b;};'use strict';var _=require(_0x9e9e('0x0'));var util=require(_0x9e9e('0x1'));var logger=require(_0x9e9e('0x2'))(_0x9e9e('0x3'));var moment=require('moment');var BPromise=require(_0x9e9e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9e9e('0x5'));var rimraf=require(_0x9e9e('0x6'));var config=require(_0x9e9e('0x7'));var attributes=require(_0x9e9e('0x8'));module[_0x9e9e('0x9')]=function(_0x3faec2,_0x34196c){return _0x3faec2[_0x9e9e('0xa')](_0x9e9e('0xb'),attributes,{'tableName':_0x9e9e('0xc'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x9e9e('0xd')]},{'name':_0x9e9e('0xe'),'fields':[_0x9e9e('0xf')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x311b15,_0x5207ea,_0x4b637d){var _0x4be820=_0x3faec2['models'];var _0x177999=_0x311b15[_0x9e9e('0x10')]({'plain':!![]});if(_0x177999[_0x9e9e('0x11')]['toLowerCase']()==='in'||_0x177999['direction'][_0x9e9e('0x12')]()===_0x9e9e('0x13')&&!_0x177999[_0x9e9e('0x14')]&&!_[_0x9e9e('0x15')](_0x177999[_0x9e9e('0x16')])){_0x4be820[_0x9e9e('0x17')]['findOne']({'where':{'id':_0x177999['SmsInteractionId']}})[_0x9e9e('0x18')](function(_0x262237){if(_0x262237){_0x262237[_0x9e9e('0x19')]({'lastMsgAt':_0x177999[_0x9e9e('0x1a')],'lastMsgDirection':_0x177999['direction']['toLowerCase']()});}})[_0x9e9e('0x1b')](function(_0x3babb5){console[_0x9e9e('0x1c')](_0x3babb5);});}if(_0x177999[_0x9e9e('0x11')]===_0x9e9e('0x13')&&!_0x177999[_0x9e9e('0x14')]){var _0x328783;_0x4be820[_0x9e9e('0x1d')][_0x9e9e('0x1e')]({'where':{'id':_0x177999[_0x9e9e('0x1f')]},'raw':!![]})[_0x9e9e('0x18')](function(_0x5c5e4c){_0x328783=_0x5c5e4c;if(_0x328783&&_0x328783[_0x9e9e('0x20')]){switch(_0x328783[_0x9e9e('0x20')]){case _0x9e9e('0x21'):var _0x5cbc16=require(_0x9e9e('0x21'));if(_0x328783[_0x9e9e('0x22')]&&_0x328783[_0x9e9e('0x23')]&&_0x328783[_0x9e9e('0x24')]){var _0x2d00b9=new _0x5cbc16(_0x328783[_0x9e9e('0x22')],_0x328783[_0x9e9e('0x23')]);_0x2d00b9[_0x9e9e('0x25')][_0x9e9e('0x26')]({'body':_0x177999['body'],'to':_0x177999[_0x9e9e('0x24')],'from':_0x328783['phone'],'statusCallback':_0x328783[_0x9e9e('0x27')]+_0x9e9e('0x28')+_0x177999['id']+'/status?token='+_0x328783['token']})[_0x9e9e('0x18')](function(_0x4625e9){if(_0x4625e9[_0x9e9e('0x29')]){return _0x311b15['update']({'messageId':_0x4625e9[_0x9e9e('0x29')]});}})[_0x9e9e('0x1b')](function(_0x249bcd){logger['error'](_0x9e9e('0x2a'),'afterCreate',_0x9e9e('0x21'),util['inspect'](_0x249bcd,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x9e9e('0x2b'),_0x9e9e('0x21'),_0x9e9e('0x2c'));}break;case _0x9e9e('0x2d'):var _0x20fdc6=_0x9e9e('0x2e');if(_0x328783[_0x9e9e('0x2f')]&&_0x328783[_0x9e9e('0x30')]){var _0x5d341d={'recipient':[_0x177999[_0x9e9e('0x24')]],'message':_0x177999['body'],'message_type':_0x328783[_0x9e9e('0x31')]};if(_0x328783[_0x9e9e('0x31')]&&_0x328783[_0x9e9e('0x31')]!=='SI'){_0x5d341d[_0x9e9e('0x32')]=_0x328783[_0x9e9e('0x24')];}var _0x38fcf8={'url':_0x20fdc6+_0x9e9e('0x33')+_0x328783['username']+'&password='+_0x328783['password'],'method':'GET'};rp(_0x38fcf8)['then'](function(_0xfb5d9d){var _0x203b4e=_0xfb5d9d['split'](';');var _0x312d24={'user_key':_0x203b4e[0x0],'session_key':_0x203b4e[0x1]};_0x38fcf8={'url':_0x20fdc6+_0x9e9e('0x34'),'method':_0x9e9e('0x35'),'headers':{'user_key':_0x312d24[_0x9e9e('0x36')],'Session_key':_0x312d24[_0x9e9e('0x37')]},'json':!![],'body':_0x5d341d};return rp(_0x38fcf8);})[_0x9e9e('0x18')](function(_0xdaede9){if(_0xdaede9[_0x9e9e('0x38')]>=0x1){var _0x46a416={'messageId':_0xdaede9['internal_order_id']};if(_0x328783[_0x9e9e('0x31')]!=='GP'||!_0x328783[_0x9e9e('0x39')]){_0x46a416[_0x9e9e('0x3a')]=!![];}return _0x311b15[_0x9e9e('0x19')](_0x46a416);}else{return logger[_0x9e9e('0x1c')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x9e9e('0x2b'),'skebby',util[_0x9e9e('0x3b')](_0xdaede9,{'showHidden':![],'depth':null}));}})[_0x9e9e('0x1b')](function(_0x2f7e7e){return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x2d'),util[_0x9e9e('0x3b')](_0x2f7e7e,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x2d'),_0x9e9e('0x3c'));}break;case _0x9e9e('0x3d'):if(_0x328783[_0x9e9e('0x23')]){var _0x65f2fc={'recipient':_0x177999[_0x9e9e('0x24')],'message':_0x177999[_0x9e9e('0xf')],'sender':_0x328783['senderString']||_0x328783[_0x9e9e('0x24')],'authorization':_0x328783[_0x9e9e('0x23')]};var _0x5207ea={'method':'POST','uri':'https://smsapi.connectel.se/api/send/','body':_0x65f2fc,'json':!![]};rp(_0x5207ea)[_0x9e9e('0x18')](function(_0x477b5d){var _0x1e5d62={'messageId':_0x477b5d['requestid']};if(!_0x328783[_0x9e9e('0x39')]){_0x1e5d62[_0x9e9e('0x3a')]=!![];}return _0x311b15['update'](_0x1e5d62);})[_0x9e9e('0x1b')](function(_0x4ca35f){logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),'connectel',util['inspect'](_0x4ca35f,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x3d'),_0x9e9e('0x3e'));}break;case'clicksend':if(_0x328783[_0x9e9e('0x2f')]&&_0x328783[_0x9e9e('0x30')]){var _0x65f2fc={'messages':[{'source':_0x9e9e('0x3f'),'to':_0x177999[_0x9e9e('0x24')],'body':_0x177999[_0x9e9e('0xf')],'from':_0x328783[_0x9e9e('0x40')]||_0x328783['phone']}]};var _0x2a4bc9=util[_0x9e9e('0x41')](_0x9e9e('0x42'),_0x328783['username'],_0x328783[_0x9e9e('0x30')]);var _0x5207ea={'method':_0x9e9e('0x35'),'uri':_0x9e9e('0x43'),'body':_0x65f2fc,'headers':{'Authorization':util[_0x9e9e('0x41')](_0x9e9e('0x44'),new Buffer(_0x2a4bc9)[_0x9e9e('0x45')]('base64'))},'json':!![]};rp(_0x5207ea)[_0x9e9e('0x18')](function(_0x3a1f04){if(_0x3a1f04[_0x9e9e('0x46')]>=0xc8&&_0x3a1f04['http_code']<=0xce){if(_0x3a1f04[_0x9e9e('0x47')]&&_0x3a1f04[_0x9e9e('0x47')][_0x9e9e('0x48')]>0x0){var _0x361014=_[_0x9e9e('0x49')](_0x3a1f04['data']['messages']);var _0x2db9df={'messageId':_0x361014[_0x9e9e('0x4a')]};if(!_0x328783['deliveryReport']){_0x2db9df[_0x9e9e('0x3a')]=!![];}return _0x311b15[_0x9e9e('0x19')](_0x2db9df);}else{logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x4b'),util[_0x9e9e('0x3b')](_0x3a1f04,{'showHidden':![],'depth':null}));}}else{logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x4b'),util[_0x9e9e('0x3b')](_0x3a1f04,{'showHidden':![],'depth':null}));}})[_0x9e9e('0x1b')](function(_0x2ccbe9){logger['error'](_0x9e9e('0x2a'),_0x9e9e('0x2b'),'clickSend',util[_0x9e9e('0x3b')](_0x2ccbe9,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x9e9e('0x4b'),_0x9e9e('0x3c'));}break;case _0x9e9e('0x4c'):if(_0x328783[_0x9e9e('0x4d')]&&_0x328783[_0x9e9e('0x23')]){var _0x65f2fc={'dst':_0x177999[_0x9e9e('0x24')],'text':_0x177999[_0x9e9e('0xf')],'src':_0x328783[_0x9e9e('0x40')]||_0x328783[_0x9e9e('0x24')],'url':_0x328783[_0x9e9e('0x27')]+_0x9e9e('0x28')+_0x177999['id']+'/status?token='+_0x328783['token']};var _0x2a4bc9=util[_0x9e9e('0x41')](_0x9e9e('0x42'),_0x328783[_0x9e9e('0x4d')],_0x328783[_0x9e9e('0x23')]);var _0x5207ea={'method':_0x9e9e('0x35'),'uri':util[_0x9e9e('0x41')]('https://api.plivo.com/v1/Account/%s/Message/',_0x328783[_0x9e9e('0x4d')]),'body':_0x65f2fc,'headers':{'Authorization':util['format'](_0x9e9e('0x44'),new Buffer(_0x2a4bc9)['toString']('base64'))},'json':!![]};rp(_0x5207ea)[_0x9e9e('0x18')](function(_0x36d912){var _0x3d2244={'messageId':_0x36d912[_0x9e9e('0x4e')][0x0]};return _0x311b15['update'](_0x3d2244);})[_0x9e9e('0x1b')](function(_0xff48f2){logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),'plivo',util[_0x9e9e('0x3b')](_0xff48f2,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x4c'),_0x9e9e('0x4f'));}break;case'infobip':if(_0x328783[_0x9e9e('0x2f')]&&_0x328783[_0x9e9e('0x30')]){if(_0x328783[_0x9e9e('0x50')]){var _0x1d6e91={'method':_0x9e9e('0x35'),'uri':_0x328783['baseUrl']+_0x9e9e('0x51'),'body':{'username':_0x328783[_0x9e9e('0x2f')],'password':_0x328783[_0x9e9e('0x30')]},'json':!![]};return rp(_0x1d6e91)['then'](function(_0x4f48d1){var _0x584e3f={'method':_0x9e9e('0x35'),'uri':_0x328783[_0x9e9e('0x50')]+_0x9e9e('0x52'),'body':{'messages':[{'from':_0x328783[_0x9e9e('0x24')],'destinations':[{'to':_0x177999[_0x9e9e('0x24')]}],'text':_0x177999['body'],'notifyUrl':_0x328783[_0x9e9e('0x27')]+_0x9e9e('0x28')+_0x177999['id']+_0x9e9e('0x53')+_0x328783[_0x9e9e('0x54')],'notifyContentType':_0x9e9e('0x55'),'callbackData':_0x328783[_0x9e9e('0x24')]+';'+_0x177999['body']}]},'headers':{'Authorization':_0x9e9e('0x56')+_0x4f48d1[_0x9e9e('0x54')]},'json':!![]};return rp(_0x584e3f)[_0x9e9e('0x18')](function(_0x2b9309){if(_0x2b9309[_0x9e9e('0x25')]){var _0x17a3c0={'messageId':_0x2b9309[_0x9e9e('0x25')][0x0][_0x9e9e('0xd')]};if(!_0x328783[_0x9e9e('0x39')]){_0x17a3c0[_0x9e9e('0x3a')]=!![];}return _0x311b15[_0x9e9e('0x19')](_0x17a3c0);}else{return logger[_0x9e9e('0x1c')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x9e9e('0x2b'),_0x9e9e('0x57'),util[_0x9e9e('0x3b')](_0x2b9309,{'showHidden':![],'depth':null}));}});})[_0x9e9e('0x1b')](function(_0x43065c){return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),'infobip',util[_0x9e9e('0x3b')](_0x43065c,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x9e9e('0x2b'),_0x9e9e('0x57'),_0x9e9e('0x58'));}}else{logger[_0x9e9e('0x1c')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','infobip',_0x9e9e('0x3c'));}break;case _0x9e9e('0x59'):var _0x16e18e=require('crypto');if(_0x328783[_0x9e9e('0x5a')]){var _0x4b03e6={};_0x4b03e6[_0x9e9e('0x5b')]=_0x328783[_0x9e9e('0x2f')];_0x4b03e6[_0x9e9e('0x24')]=_0x177999[_0x9e9e('0x24')];_0x4b03e6['sender']=_0x328783[_0x9e9e('0x24')];_0x4b03e6[_0x9e9e('0x5c')]=_0x177999[_0x9e9e('0xf')];_0x4b03e6[_0x9e9e('0x5d')]=+new Date();var _0x2ddcda='';var _0x3e1680='';var _0x351ce1=Object[_0x9e9e('0x5e')](_0x4b03e6);_0x351ce1[_0x9e9e('0x5f')]();for(var _0x971c4f=0x0;_0x971c4f<_0x351ce1[_0x9e9e('0x60')];_0x971c4f++){if(_0x2ddcda!=''){_0x2ddcda+='&';}_0x2ddcda+=_0x351ce1[_0x971c4f]+'='+encodeURIComponent(_0x4b03e6[_0x351ce1[_0x971c4f]]);_0x3e1680+=_0x4b03e6[_0x351ce1[_0x971c4f]];}_0x3e1680+=_0x328783[_0x9e9e('0x5a')];_0x3e1680=_0x16e18e['createHash'](_0x9e9e('0x61'))[_0x9e9e('0x19')](_0x3e1680)[_0x9e9e('0x62')](_0x9e9e('0x63'));if(_0x2ddcda!==''){_0x2ddcda+='&';}_0x2ddcda+='signature='+_0x3e1680;var _0x38fcf8={'method':'GET','uri':_0x9e9e('0x64')+_0x2ddcda,'json':!![]};return rp(_0x38fcf8)[_0x9e9e('0x18')](function(_0x43b167){var _0x59f233=Object['keys'](_0x43b167);if(_0x43b167[_0x59f233[0x0]]['error']&&parseInt(_0x43b167[_0x59f233[0x0]]['error'])===0x0){var _0x2d810e={'messageId':_0x43b167[_0x59f233[0x0]]['id_sms']};if(!_0x328783[_0x9e9e('0x39')]){_0x2d810e[_0x9e9e('0x3a')]=!![];}return _0x311b15[_0x9e9e('0x19')](_0x2d810e);}else{return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x59'),util[_0x9e9e('0x3b')](_0x43b167[_0x9e9e('0x1c')],{'showHidden':![],'depth':null}));}})[_0x9e9e('0x1b')](function(_0x575727){return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),'csc',util[_0x9e9e('0x3b')](_0x575727,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x59'),_0x9e9e('0x65'));}break;case'clickatell':if(_0x328783[_0x9e9e('0x5a')]){var _0x48c28={'method':_0x9e9e('0x35'),'uri':'https://platform.clickatell.com/messages','headers':{'Authorization':_0x328783[_0x9e9e('0x5a')]},'body':{'content':_0x177999[_0x9e9e('0xf')],'to':[_0x177999['phone']],'from':_0x328783[_0x9e9e('0x24')],'binary':![],'clientMessageId':_0x9e9e('0x66'),'charset':_0x9e9e('0x67')},'json':!![]};rp(_0x48c28)[_0x9e9e('0x18')](function(_0x49d067){if(!_0x49d067[_0x9e9e('0x1c')]){var _0x589ed0={'messageId':_0x49d067[_0x9e9e('0x25')][0x0][_0x9e9e('0x68')]};if(!_0x328783[_0x9e9e('0x39')]){_0x589ed0[_0x9e9e('0x3a')]=!![];}return _0x311b15[_0x9e9e('0x19')](_0x589ed0);}else{return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),'afterCreate',_0x9e9e('0x69'),util[_0x9e9e('0x3b')](_0x49d067[_0x9e9e('0x1c')],{'showHidden':![],'depth':null}));}})[_0x9e9e('0x1b')](function(_0x9b6c75){return logger['error'](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x69'),util['inspect'](_0x9b6c75,{'showHidden':![],'depth':null}));});}else{logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),'afterCreate',_0x9e9e('0x69'),_0x9e9e('0x65'));}break;case'intelepeer':if(_0x328783[_0x9e9e('0x5a')]){var _0x450c60={};var _0x38fcf8={'method':_0x9e9e('0x35'),'uri':_0x9e9e('0x6a'),'headers':{'Authorization':'Bearer\x20'+_0x328783[_0x9e9e('0x5a')],'Content-Type':_0x9e9e('0x55')},'body':{'from':_0x328783['phone'],'to':_0x177999[_0x9e9e('0x24')],'text':_0x177999[_0x9e9e('0xf')]},'json':!![]};return rp(_0x38fcf8)[_0x9e9e('0x18')](function(_0x5a4d48){if(_0x5a4d48[_0x9e9e('0x6b')]==0xca){_0x450c60[_0x9e9e('0x6c')]=_0x5a4d48;var _0x4a9222={'method':_0x9e9e('0x35'),'uri':_0x9e9e('0x6d'),'headers':{'Authorization':'Bearer\x20'+_0x328783['apiKey'],'Content-Type':_0x9e9e('0x55')},'body':{'refid':_0x450c60[_0x9e9e('0x6c')][_0x9e9e('0x6e')]},'json':!![]};return rp(_0x4a9222)[_0x9e9e('0x18')](function(_0x325bf2){_0x450c60[_0x9e9e('0x6f')]=_0x325bf2;var _0x3bc2bb={'messageId':_0x450c60[_0x9e9e('0x6c')]['refid'],'read':!![]};return _0x311b15['update'](_0x3bc2bb);});}else{return logger['error'](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x70'),util[_0x9e9e('0x3b')](_0x5a4d48,{'showHidden':![],'depth':null}));}})['catch'](function(_0x28dc86){return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),'afterCreate',_0x9e9e('0x70'),util[_0x9e9e('0x3b')](_0x28dc86,{'showHidden':![],'depth':null}));});}else{return logger[_0x9e9e('0x1c')](_0x9e9e('0x2a'),_0x9e9e('0x2b'),_0x9e9e('0x70'),_0x9e9e('0x71'));}break;}}})[_0x9e9e('0x72')](function(){_0x4b637d();});}else{_0x4b637d();}}},'charset':'utf8mb4','collate':_0x9e9e('0x73')});};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.rpc.js b/server/api/smsMessage/smsMessage.rpc.js
index 7f23c4c..bdb9d84 100644
--- a/server/api/smsMessage/smsMessage.rpc.js
+++ b/server/api/smsMessage/smsMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf2c6=['body','options','raw','then','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','error','message','info','catch','CreateSmsMessage','SmsMessage','create'];(function(_0x2c0171,_0x2e5a1c){var _0x9652f0=function(_0x19dd34){while(--_0x19dd34){_0x2c0171['push'](_0x2c0171['shift']());}};_0x9652f0(++_0x2e5a1c);}(_0xf2c6,0x1c6));var _0x6f2c=function(_0x3c4737,_0x2329ec){_0x3c4737=_0x3c4737-0x0;var _0x2bb926=_0xf2c6[_0x3c4737];return _0x2bb926;};'use strict';var _=require(_0x6f2c('0x0'));var util=require(_0x6f2c('0x1'));var moment=require(_0x6f2c('0x2'));var BPromise=require(_0x6f2c('0x3'));var rs=require(_0x6f2c('0x4'));var fs=require('fs');var Redis=require(_0x6f2c('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x6f2c('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x6f2c('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6f2c('0x8')][_0x6f2c('0x9')]({'port':0x232a});config[_0x6f2c('0xa')]=_[_0x6f2c('0xb')](config[_0x6f2c('0xa')],{'host':_0x6f2c('0xc'),'port':0x18eb});var socket=require(_0x6f2c('0xd'))(new Redis(config[_0x6f2c('0xa')]));require('./smsMessage.socket')[_0x6f2c('0xe')](socket);function respondWithRpcPromise(_0x2b18b6,_0x2bb732,_0x368ca1){return new BPromise(function(_0x5a988d,_0x4fb929){return client[_0x6f2c('0xf')](_0x2b18b6,_0x368ca1)['then'](function(_0x208c38){logger['info'](_0x6f2c('0x10'),_0x2bb732,_0x6f2c('0x11'));logger[_0x6f2c('0x12')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x2bb732,_0x6f2c('0x11'),JSON['stringify'](_0x208c38));if(_0x208c38['error']){if(_0x208c38[_0x6f2c('0x13')]['code']===0x1f4){logger[_0x6f2c('0x13')]('SmsMessage,\x20%s,\x20%s',_0x2bb732,_0x208c38[_0x6f2c('0x13')]['message']);return _0x4fb929(_0x208c38[_0x6f2c('0x13')][_0x6f2c('0x14')]);}logger[_0x6f2c('0x13')](_0x6f2c('0x10'),_0x2bb732,_0x208c38[_0x6f2c('0x13')]['message']);return _0x5a988d(_0x208c38[_0x6f2c('0x13')]['message']);}else{logger[_0x6f2c('0x15')](_0x6f2c('0x10'),_0x2bb732,'request\x20sent');_0x5a988d(_0x208c38['result'][_0x6f2c('0x14')]);}})[_0x6f2c('0x16')](function(_0x579a02){logger[_0x6f2c('0x13')]('SmsMessage,\x20%s,\x20%s',_0x2bb732,_0x579a02);_0x4fb929(_0x579a02);});});}exports[_0x6f2c('0x17')]=function(_0x1afe63){var _0xee1cf7=this;return new Promise(function(_0x234051,_0x4737f7){return db[_0x6f2c('0x18')][_0x6f2c('0x19')](_0x1afe63[_0x6f2c('0x1a')],{'raw':_0x1afe63['options']?_0x1afe63[_0x6f2c('0x1b')][_0x6f2c('0x1c')]===undefined?!![]:![]:!![]})[_0x6f2c('0x1d')](function(_0x357053){logger['info'](_0x6f2c('0x17'),_0x1afe63);logger[_0x6f2c('0x12')](_0x6f2c('0x17'),_0x1afe63,JSON['stringify'](_0x357053));_0x234051(_0x357053);})[_0x6f2c('0x16')](function(_0x5b396b){logger[_0x6f2c('0x13')](_0x6f2c('0x17'),_0x5b396b[_0x6f2c('0x14')],_0x1afe63);_0x4737f7(_0xee1cf7['error'](0x1f4,_0x5b396b['message']));});});};
\ No newline at end of file
+var _0xdfea=['./smsMessage.socket','register','request','SmsMessage,\x20%s,\x20%s','request\x20sent','SmsMessage,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','SmsMessage','create','body','options','raw','CreateSmsMessage','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter'];(function(_0x125ff8,_0x41925f){var _0x2d9ef=function(_0x4ef34c){while(--_0x4ef34c){_0x125ff8['push'](_0x125ff8['shift']());}};_0x2d9ef(++_0x41925f);}(_0xdfea,0x1a4));var _0xadfe=function(_0x126e42,_0x10d4c8){_0x126e42=_0x126e42-0x0;var _0x199795=_0xdfea[_0x126e42];return _0x199795;};'use strict';var _=require(_0xadfe('0x0'));var util=require(_0xadfe('0x1'));var moment=require('moment');var BPromise=require(_0xadfe('0x2'));var rs=require(_0xadfe('0x3'));var fs=require('fs');var Redis=require(_0xadfe('0x4'));var db=require(_0xadfe('0x5'))['db'];var utils=require(_0xadfe('0x6'));var logger=require('../../config/logger')(_0xadfe('0x7'));var config=require(_0xadfe('0x8'));var jayson=require(_0xadfe('0x9'));var client=jayson['client'][_0xadfe('0xa')]({'port':0x232a});config[_0xadfe('0xb')]=_[_0xadfe('0xc')](config[_0xadfe('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xadfe('0xd'))(new Redis(config[_0xadfe('0xb')]));require(_0xadfe('0xe'))[_0xadfe('0xf')](socket);function respondWithRpcPromise(_0x4cdfc4,_0x9ce075,_0x2b2f97){return new BPromise(function(_0x14c418,_0x51271d){return client[_0xadfe('0x10')](_0x4cdfc4,_0x2b2f97)['then'](function(_0x83ecf6){logger['info'](_0xadfe('0x11'),_0x9ce075,_0xadfe('0x12'));logger['debug'](_0xadfe('0x13'),_0x9ce075,_0xadfe('0x12'),JSON['stringify'](_0x83ecf6));if(_0x83ecf6['error']){if(_0x83ecf6[_0xadfe('0x14')][_0xadfe('0x15')]===0x1f4){logger[_0xadfe('0x14')](_0xadfe('0x11'),_0x9ce075,_0x83ecf6[_0xadfe('0x14')][_0xadfe('0x16')]);return _0x51271d(_0x83ecf6[_0xadfe('0x14')]['message']);}logger[_0xadfe('0x14')](_0xadfe('0x11'),_0x9ce075,_0x83ecf6[_0xadfe('0x14')]['message']);return _0x14c418(_0x83ecf6[_0xadfe('0x14')][_0xadfe('0x16')]);}else{logger[_0xadfe('0x17')](_0xadfe('0x11'),_0x9ce075,'request\x20sent');_0x14c418(_0x83ecf6['result']['message']);}})[_0xadfe('0x18')](function(_0x563705){logger[_0xadfe('0x14')](_0xadfe('0x11'),_0x9ce075,_0x563705);_0x51271d(_0x563705);});});}exports['CreateSmsMessage']=function(_0xbd0b9d){var _0x4701e7=this;return new Promise(function(_0x15888a,_0x3a4031){return db[_0xadfe('0x19')][_0xadfe('0x1a')](_0xbd0b9d[_0xadfe('0x1b')],{'raw':_0xbd0b9d[_0xadfe('0x1c')]?_0xbd0b9d[_0xadfe('0x1c')][_0xadfe('0x1d')]===undefined?!![]:![]:!![]})['then'](function(_0x38979d){logger[_0xadfe('0x17')](_0xadfe('0x1e'),_0xbd0b9d);logger['debug'](_0xadfe('0x1e'),_0xbd0b9d,JSON['stringify'](_0x38979d));_0x15888a(_0x38979d);})[_0xadfe('0x18')](function(_0x3d3eaf){logger[_0xadfe('0x14')](_0xadfe('0x1e'),_0x3d3eaf[_0xadfe('0x16')],_0xbd0b9d);_0x3a4031(_0x4701e7['error'](0x1f4,_0x3d3eaf[_0xadfe('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.socket.js b/server/api/smsMessage/smsMessage.socket.js
index 2e18472..6df654d 100644
--- a/server/api/smsMessage/smsMessage.socket.js
+++ b/server/api/smsMessage/smsMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3aff=['smsMessage:','./smsMessage.events','save','remove','update','emit','register','length'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x3aff,0xf1));var _0xf3af=function(_0xe9dca5,_0x57b560){_0xe9dca5=_0xe9dca5-0x0;var _0x220191=_0x3aff[_0xe9dca5];return _0x220191;};'use strict';var SmsMessageEvents=require(_0xf3af('0x0'));var events=[_0xf3af('0x1'),_0xf3af('0x2'),_0xf3af('0x3')];function createListener(_0x109771,_0x4d05ec){return function(_0x55b66d){_0x4d05ec[_0xf3af('0x4')](_0x109771,_0x55b66d);};}function removeListener(_0x1a6821,_0x4122d6){return function(){SmsMessageEvents['removeListener'](_0x1a6821,_0x4122d6);};}exports[_0xf3af('0x5')]=function(_0x36326f){for(var _0x4b8ccf=0x0,_0x5392c6=events[_0xf3af('0x6')];_0x4b8ccf<_0x5392c6;_0x4b8ccf++){var _0x543b14=events[_0x4b8ccf];var _0x409024=createListener(_0xf3af('0x7')+_0x543b14,_0x36326f);SmsMessageEvents['on'](_0x543b14,_0x409024);}};
\ No newline at end of file
+var _0xf998=['length','./smsMessage.events','save','emit','removeListener','register'];(function(_0x40ac85,_0x5e2d7e){var _0x34fe27=function(_0x50c68d){while(--_0x50c68d){_0x40ac85['push'](_0x40ac85['shift']());}};_0x34fe27(++_0x5e2d7e);}(_0xf998,0x10f));var _0x8f99=function(_0x2f90d0,_0x1d9ec1){_0x2f90d0=_0x2f90d0-0x0;var _0x25ed4b=_0xf998[_0x2f90d0];return _0x25ed4b;};'use strict';var SmsMessageEvents=require(_0x8f99('0x0'));var events=[_0x8f99('0x1'),'remove','update'];function createListener(_0x592d07,_0x4af5db){return function(_0x2c90e3){_0x4af5db[_0x8f99('0x2')](_0x592d07,_0x2c90e3);};}function removeListener(_0x112a2d,_0x4c7394){return function(){SmsMessageEvents[_0x8f99('0x3')](_0x112a2d,_0x4c7394);};}exports[_0x8f99('0x4')]=function(_0x53ba17){for(var _0x4fdb79=0x0,_0x5dbe34=events[_0x8f99('0x5')];_0x4fdb79<_0x5dbe34;_0x4fdb79++){var _0x6ff24=events[_0x4fdb79];var _0x50480c=createListener('smsMessage:'+_0x6ff24,_0x53ba17);SmsMessageEvents['on'](_0x6ff24,_0x50480c);}};
\ No newline at end of file
diff --git a/server/api/smsQueue/index.js b/server/api/smsQueue/index.js
index f521988..0575a97 100644
--- a/server/api/smsQueue/index.js
+++ b/server/api/smsQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeb2d=['express','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueue.controller','isAuthenticated','index','get','/describe','describe','/:id','show','getMembers','getTeams','/:id/users','post','create','addTeams','put','delete','destroy','removeTeams','removeAgents','exports','multer','util','path','connect-timeout'];(function(_0x479b99,_0x1e5bec){var _0x1e7eb7=function(_0x52ac6c){while(--_0x52ac6c){_0x479b99['push'](_0x479b99['shift']());}};_0x1e7eb7(++_0x1e5bec);}(_0xeb2d,0x1d8));var _0xdeb2=function(_0x2946f5,_0x3d5f4c){_0x2946f5=_0x2946f5-0x0;var _0x169ed0=_0xeb2d[_0x2946f5];return _0x169ed0;};'use strict';var multer=require(_0xdeb2('0x0'));var util=require(_0xdeb2('0x1'));var path=require(_0xdeb2('0x2'));var timeout=require(_0xdeb2('0x3'));var express=require(_0xdeb2('0x4'));var router=express['Router']();var auth=require(_0xdeb2('0x5'));var interaction=require(_0xdeb2('0x6'));var config=require(_0xdeb2('0x7'));var controller=require(_0xdeb2('0x8'));router['get']('/',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0xa')]);router[_0xdeb2('0xb')](_0xdeb2('0xc'),auth[_0xdeb2('0x9')](),controller[_0xdeb2('0xd')]);router['get'](_0xdeb2('0xe'),auth[_0xdeb2('0x9')](),controller[_0xdeb2('0xf')]);router[_0xdeb2('0xb')]('/:id/members',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x10')]);router[_0xdeb2('0xb')]('/:id/teams',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x11')]);router[_0xdeb2('0xb')](_0xdeb2('0x12'),auth[_0xdeb2('0x9')](),controller['getAgents']);router[_0xdeb2('0x13')]('/',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x14')]);router['post']('/:id/teams',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x15')]);router[_0xdeb2('0x13')]('/:id/users',auth[_0xdeb2('0x9')](),controller['addAgents']);router[_0xdeb2('0x16')](_0xdeb2('0xe'),auth['isAuthenticated'](),controller['update']);router[_0xdeb2('0x17')](_0xdeb2('0xe'),auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x18')]);router['delete']('/:id/teams',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x19')]);router[_0xdeb2('0x17')]('/:id/users',auth[_0xdeb2('0x9')](),controller[_0xdeb2('0x1a')]);module[_0xdeb2('0x1b')]=router;
\ No newline at end of file
+var _0x0ea7=['/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','update','delete','destroy','removeAgents','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getMembers'];(function(_0x5b1c48,_0x128a7f){var _0x5ab9aa=function(_0x20fed6){while(--_0x20fed6){_0x5b1c48['push'](_0x5b1c48['shift']());}};_0x5ab9aa(++_0x128a7f);}(_0x0ea7,0xc8));var _0x70ea=function(_0x3be65b,_0x54d4ee){_0x3be65b=_0x3be65b-0x0;var _0x314196=_0x0ea7[_0x3be65b];return _0x314196;};'use strict';var multer=require('multer');var util=require(_0x70ea('0x0'));var path=require(_0x70ea('0x1'));var timeout=require(_0x70ea('0x2'));var express=require(_0x70ea('0x3'));var router=express[_0x70ea('0x4')]();var auth=require(_0x70ea('0x5'));var interaction=require(_0x70ea('0x6'));var config=require(_0x70ea('0x7'));var controller=require('./smsQueue.controller');router[_0x70ea('0x8')]('/',auth[_0x70ea('0x9')](),controller[_0x70ea('0xa')]);router[_0x70ea('0x8')](_0x70ea('0xb'),auth[_0x70ea('0x9')](),controller[_0x70ea('0xc')]);router[_0x70ea('0x8')](_0x70ea('0xd'),auth['isAuthenticated'](),controller[_0x70ea('0xe')]);router['get'](_0x70ea('0xf'),auth[_0x70ea('0x9')](),controller[_0x70ea('0x10')]);router['get'](_0x70ea('0x11'),auth[_0x70ea('0x9')](),controller[_0x70ea('0x12')]);router[_0x70ea('0x8')](_0x70ea('0x13'),auth['isAuthenticated'](),controller[_0x70ea('0x14')]);router[_0x70ea('0x15')]('/',auth[_0x70ea('0x9')](),controller[_0x70ea('0x16')]);router[_0x70ea('0x15')]('/:id/teams',auth['isAuthenticated'](),controller[_0x70ea('0x17')]);router[_0x70ea('0x15')](_0x70ea('0x13'),auth[_0x70ea('0x9')](),controller[_0x70ea('0x18')]);router[_0x70ea('0x19')](_0x70ea('0xd'),auth['isAuthenticated'](),controller[_0x70ea('0x1a')]);router[_0x70ea('0x1b')](_0x70ea('0xd'),auth[_0x70ea('0x9')](),controller[_0x70ea('0x1c')]);router[_0x70ea('0x1b')]('/:id/teams',auth[_0x70ea('0x9')](),controller['removeTeams']);router[_0x70ea('0x1b')](_0x70ea('0x13'),auth[_0x70ea('0x9')](),controller[_0x70ea('0x1d')]);module[_0x70ea('0x1e')]=router;
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.attributes.js b/server/api/smsQueue/smsQueue.attributes.js
index 97e4812..5275b8b 100644
--- a/server/api/smsQueue/smsQueue.attributes.js
+++ b/server/api/smsQueue/smsQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc332=['name','beepall','roundrobin','exports','STRING'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xc332,0x76));var _0x2c33=function(_0x29a14b,_0x298b39){_0x29a14b=_0x29a14b-0x0;var _0x2371ca=_0xc332[_0x29a14b];return _0x2371ca;};'use strict';var Sequelize=require('sequelize');module[_0x2c33('0x0')]={'name':{'type':Sequelize[_0x2c33('0x1')],'unique':_0x2c33('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM']('rrmemory',_0x2c33('0x3'),_0x2c33('0x4'))}};
\ No newline at end of file
+var _0x3705=['roundrobin','sequelize','exports','STRING','name','ENUM','rrmemory','beepall'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x3705,0xe9));var _0x5370=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0x3705[_0x178e48];return _0x440d7e;};'use strict';var Sequelize=require(_0x5370('0x0'));module[_0x5370('0x1')]={'name':{'type':Sequelize[_0x5370('0x2')],'unique':_0x5370('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x5370('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x5370('0x4')](_0x5370('0x5'),_0x5370('0x6'),_0x5370('0x7'))}};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.controller.js b/server/api/smsQueue/smsQueue.controller.js
index b3f1c05..bff2153 100644
--- a/server/api/smsQueue/smsQueue.controller.js
+++ b/server/api/smsQueue/smsQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8a56=['count','offset','limit','apply','reject','destroy','get','UserProfileResource','then','stack','name','send','index','SmsQueue','model','query','keys','attributes','fields','length','nolimit','sort','filters','pick','filter','where','merge','map','type','key','VIRTUAL','options','include','findAll','rows','catch','show','rawAttributes','intersection','create','user','role','SmsQueues','find','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','params','describe','getMembers','findOne','UserSmsQueue','hasOwnProperty','order','SmsQueueId','User','findAndCountAll','agent','smsPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','teams','Team','Agents','online','interface','flatMap','sequelize','transaction','addTeams','findOrCreate','forEach','emit','userSmsQueue:save','removeTeams','ids','select','field','tq.TeamId','join','user_has_teams','SmsQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','QueryTypes','every','TeamId','union','compact','isEmpty','removeAgents','userSmsQueue:remove','addAgents','omit','getAgents','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','lodash','squel','desk.js','to-csv','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket','register','sendStatus','status','end','json'];(function(_0x560e24,_0x183a99){var _0x1baf4e=function(_0x823eaf){while(--_0x823eaf){_0x560e24['push'](_0x560e24['shift']());}};_0x1baf4e(++_0x183a99);}(_0x8a56,0xef));var _0x68a5=function(_0x4d521e,_0x58ba39){_0x4d521e=_0x4d521e-0x0;var _0x3beb42=_0x8a56[_0x4d521e];return _0x3beb42;};'use strict';var pdf=require(_0x68a5('0x0'));var emlformat=require(_0x68a5('0x1'));var rimraf=require(_0x68a5('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x68a5('0x3'));var rp=require(_0x68a5('0x4'));var moment=require(_0x68a5('0x5'));var BPromise=require(_0x68a5('0x6'));var Mustache=require(_0x68a5('0x7'));var util=require(_0x68a5('0x8'));var path=require('path');var sox=require(_0x68a5('0x9'));var csv=require('to-csv');var ejs=require(_0x68a5('0xa'));var fs=require('fs');var _=require(_0x68a5('0xb'));var squel=require(_0x68a5('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x68a5('0xd'));var toCsv=require(_0x68a5('0xe'));var querystring=require('querystring');var Papa=require(_0x68a5('0xf'));var Redis=require(_0x68a5('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x68a5('0x11'));var hardwareService=require(_0x68a5('0x12'));var logger=require(_0x68a5('0x13'))(_0x68a5('0x14'));var utils=require(_0x68a5('0x15'));var config=require(_0x68a5('0x16'));var db=require('../../mysqldb')['db'];config[_0x68a5('0x17')]=_[_0x68a5('0x18')](config[_0x68a5('0x17')],{'host':_0x68a5('0x19'),'port':0x18eb});var socket=require(_0x68a5('0x1a'))(new Redis(config[_0x68a5('0x17')]));require(_0x68a5('0x1b'))[_0x68a5('0x1c')](socket);function respondWithStatusCode(_0x5f36af,_0x45483a){_0x45483a=_0x45483a||0xcc;return function(_0x1f7b07){if(_0x1f7b07){return _0x5f36af[_0x68a5('0x1d')](_0x45483a);}return _0x5f36af[_0x68a5('0x1e')](_0x45483a)[_0x68a5('0x1f')]();};}function respondWithResult(_0x1ed360,_0x11c4f0){_0x11c4f0=_0x11c4f0||0xc8;return function(_0x18e4f5){if(_0x18e4f5){return _0x1ed360['status'](_0x11c4f0)[_0x68a5('0x20')](_0x18e4f5);}};}function respondWithFilteredResult(_0x419646,_0x333cb1){return function(_0x30c71d){if(_0x30c71d){var _0x105690=_0x30c71d[_0x68a5('0x21')],_0x3dea8a=_0x333cb1['offset'],_0x704dce=_0x333cb1[_0x68a5('0x22')]+_0x333cb1[_0x68a5('0x23')],_0x5161a9;if(_0x704dce>=_0x105690){_0x704dce=_0x105690;_0x5161a9=0xc8;}else{_0x5161a9=0xce;}_0x419646[_0x68a5('0x1e')](_0x5161a9);return _0x419646['set']('Content-Range',_0x3dea8a+'-'+_0x704dce+'/'+_0x105690)[_0x68a5('0x20')](_0x30c71d);}return null;};}function patchUpdates(_0x5c37dc){return function(_0x1e971d){try{jsonpatch[_0x68a5('0x24')](_0x1e971d,_0x5c37dc,!![]);}catch(_0x134ef8){return BPromise[_0x68a5('0x25')](_0x134ef8);}return _0x1e971d['save']();};}function saveUpdates(_0x3e1196,_0x4e01a5){return function(_0xa7d8c){if(_0xa7d8c){return _0xa7d8c['update'](_0x3e1196)['then'](function(_0x66f327){return _0x66f327;});}return null;};}function removeEntity(_0x35a7fe,_0x4acc55){return function(_0x170ce6){if(_0x170ce6){return _0x170ce6[_0x68a5('0x26')]()['then'](function(){var _0xaad4ac=_0x170ce6[_0x68a5('0x27')]({'plain':!![]});var _0x545893='SmsQueues';return db[_0x68a5('0x28')][_0x68a5('0x26')]({'where':{'type':_0x545893,'resourceId':_0xaad4ac['id']}})[_0x68a5('0x29')](function(){return _0x170ce6;});})[_0x68a5('0x29')](function(){_0x35a7fe['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x33040c,_0x2737f2){return function(_0x2f3fe3){if(!_0x2f3fe3){_0x33040c[_0x68a5('0x1d')](0x194);}return _0x2f3fe3;};}function handleError(_0x3fb7d1,_0x2996d2){_0x2996d2=_0x2996d2||0x1f4;return function(_0x148996){logger['error'](_0x148996[_0x68a5('0x2a')]);if(_0x148996[_0x68a5('0x2b')]){delete _0x148996[_0x68a5('0x2b')];}_0x3fb7d1[_0x68a5('0x1e')](_0x2996d2)[_0x68a5('0x2c')](_0x148996);};}exports[_0x68a5('0x2d')]=function(_0x8b284e,_0x833d1a){var _0x1f52eb={},_0x5a8cf9={},_0x1c0e6f={'count':0x0,'rows':[]};var _0x413be7=db[_0x68a5('0x2e')]['rawAttributes'];_0x5a8cf9[_0x68a5('0x2f')]=_['keys'](_0x413be7);_0x5a8cf9[_0x68a5('0x30')]=_[_0x68a5('0x31')](_0x8b284e[_0x68a5('0x30')]);_0x5a8cf9['filters']=_['intersection'](_0x5a8cf9[_0x68a5('0x2f')],_0x5a8cf9[_0x68a5('0x30')]);_0x1f52eb[_0x68a5('0x32')]=_['intersection'](_0x5a8cf9[_0x68a5('0x2f')],qs[_0x68a5('0x33')](_0x8b284e[_0x68a5('0x30')]['fields']));_0x1f52eb[_0x68a5('0x32')]=_0x1f52eb['attributes'][_0x68a5('0x34')]?_0x1f52eb[_0x68a5('0x32')]:_0x5a8cf9[_0x68a5('0x2f')];if(!_0x8b284e['query']['hasOwnProperty'](_0x68a5('0x35'))){_0x1f52eb[_0x68a5('0x23')]=qs[_0x68a5('0x23')](_0x8b284e[_0x68a5('0x30')][_0x68a5('0x23')]);_0x1f52eb[_0x68a5('0x22')]=qs['offset'](_0x8b284e['query'][_0x68a5('0x22')]);}_0x1f52eb['order']=qs[_0x68a5('0x36')](_0x8b284e[_0x68a5('0x30')][_0x68a5('0x36')]);_0x1f52eb['where']=qs[_0x68a5('0x37')](_[_0x68a5('0x38')](_0x8b284e[_0x68a5('0x30')],_0x5a8cf9[_0x68a5('0x37')]));if(_0x8b284e['query'][_0x68a5('0x39')]){_0x1f52eb[_0x68a5('0x3a')]=_[_0x68a5('0x3b')](_0x1f52eb['where'],{'$or':_[_0x68a5('0x3c')](_0x413be7,function(_0x56a603){if(_0x56a603[_0x68a5('0x3d')][_0x68a5('0x3e')]!==_0x68a5('0x3f')){var _0x4b6f59={};_0x4b6f59[_0x56a603['field']]={'$like':'%'+_0x8b284e[_0x68a5('0x30')][_0x68a5('0x39')]+'%'};return _0x4b6f59;}})});}_0x1f52eb=_[_0x68a5('0x3b')]({},_0x1f52eb,_0x8b284e[_0x68a5('0x40')]);var _0x3a7da2={'where':_0x1f52eb[_0x68a5('0x3a')]};return db[_0x68a5('0x2e')][_0x68a5('0x21')](_0x3a7da2)['then'](function(_0x1b7457){_0x1c0e6f[_0x68a5('0x21')]=_0x1b7457;if(_0x8b284e['query']['includeAll']){_0x1f52eb[_0x68a5('0x41')]=[{'all':!![]}];}return db[_0x68a5('0x2e')][_0x68a5('0x42')](_0x1f52eb);})[_0x68a5('0x29')](function(_0x16f7df){_0x1c0e6f[_0x68a5('0x43')]=_0x16f7df;return _0x1c0e6f;})[_0x68a5('0x29')](respondWithFilteredResult(_0x833d1a,_0x1f52eb))[_0x68a5('0x44')](handleError(_0x833d1a,null));};exports[_0x68a5('0x45')]=function(_0x16c9cb,_0x4e440c){var _0x1c7cb9={'raw':!![],'where':{'id':_0x16c9cb['params']['id']}},_0x128b01={};_0x128b01[_0x68a5('0x2f')]=_[_0x68a5('0x31')](db[_0x68a5('0x2e')][_0x68a5('0x46')]);_0x128b01[_0x68a5('0x30')]=_[_0x68a5('0x31')](_0x16c9cb['query']);_0x128b01[_0x68a5('0x37')]=_[_0x68a5('0x47')](_0x128b01[_0x68a5('0x2f')],_0x128b01['query']);_0x1c7cb9['attributes']=_[_0x68a5('0x47')](_0x128b01['model'],qs[_0x68a5('0x33')](_0x16c9cb[_0x68a5('0x30')][_0x68a5('0x33')]));_0x1c7cb9[_0x68a5('0x32')]=_0x1c7cb9['attributes']['length']?_0x1c7cb9['attributes']:_0x128b01[_0x68a5('0x2f')];if(_0x16c9cb[_0x68a5('0x30')]['includeAll']){_0x1c7cb9[_0x68a5('0x41')]=[{'all':!![]}];}_0x1c7cb9=_[_0x68a5('0x3b')]({},_0x1c7cb9,_0x16c9cb[_0x68a5('0x40')]);return db[_0x68a5('0x2e')]['find'](_0x1c7cb9)[_0x68a5('0x29')](handleEntityNotFound(_0x4e440c,null))[_0x68a5('0x29')](respondWithResult(_0x4e440c,null))[_0x68a5('0x44')](handleError(_0x4e440c,null));};exports['create']=function(_0x5eddd7,_0x4b4dd4){return db[_0x68a5('0x2e')][_0x68a5('0x48')](_0x5eddd7['body'],{})['then'](function(_0x147d06){var _0x49b584=_0x5eddd7[_0x68a5('0x49')]['get']({'plain':!![]});if(!_0x49b584)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x49b584[_0x68a5('0x4a')]===_0x68a5('0x49')){var _0x24bf5f=_0x147d06[_0x68a5('0x27')]({'plain':!![]});var _0x15504b=_0x68a5('0x4b');return db['UserProfileSection'][_0x68a5('0x4c')]({'where':{'name':_0x15504b,'userProfileId':_0x49b584[_0x68a5('0x4d')]},'raw':!![]})['then'](function(_0x41a97d){if(_0x41a97d&&_0x41a97d[_0x68a5('0x4e')]===0x0){return db['UserProfileResource'][_0x68a5('0x48')]({'name':_0x24bf5f[_0x68a5('0x2b')],'resourceId':_0x24bf5f['id'],'type':_0x41a97d[_0x68a5('0x2b')],'sectionId':_0x41a97d['id']},{})[_0x68a5('0x29')](function(){return _0x147d06;});}else{return _0x147d06;}})['catch'](function(_0x2b4552){logger[_0x68a5('0x4f')](_0x68a5('0x50'),_0x2b4552);throw _0x2b4552;});}return _0x147d06;})['then'](respondWithResult(_0x4b4dd4,0xc9))['catch'](handleError(_0x4b4dd4,null));};exports[_0x68a5('0x51')]=function(_0x536a18,_0x157813){if(_0x536a18[_0x68a5('0x52')]['id']){delete _0x536a18['body']['id'];}return db[_0x68a5('0x2e')][_0x68a5('0x4c')]({'where':{'id':_0x536a18['params']['id']}})[_0x68a5('0x29')](handleEntityNotFound(_0x157813,null))[_0x68a5('0x29')](saveUpdates(_0x536a18[_0x68a5('0x52')],null))['then'](respondWithResult(_0x157813,null))[_0x68a5('0x44')](handleError(_0x157813,null));};exports[_0x68a5('0x26')]=function(_0x40179d,_0x8845f6){return db[_0x68a5('0x2e')][_0x68a5('0x4c')]({'where':{'id':_0x40179d[_0x68a5('0x53')]['id']}})[_0x68a5('0x29')](handleEntityNotFound(_0x8845f6,null))[_0x68a5('0x29')](removeEntity(_0x8845f6,null))[_0x68a5('0x44')](handleError(_0x8845f6,null));};exports['describe']=function(_0x20cd91,_0x2717bf){return db['SmsQueue'][_0x68a5('0x54')]()[_0x68a5('0x29')](respondWithResult(_0x2717bf,null))[_0x68a5('0x44')](handleError(_0x2717bf,null));};exports[_0x68a5('0x55')]=function(_0x312be5,_0x2c926f,_0x413c0e){var _0x59e86d={'raw':!![],'where':{}},_0x3d4897={},_0x541da1;return db[_0x68a5('0x2e')][_0x68a5('0x56')]({'where':{'id':_0x312be5[_0x68a5('0x53')]['id']}})[_0x68a5('0x29')](handleEntityNotFound(_0x2c926f,null))['then'](function(_0x504fe1){if(_0x504fe1){_0x541da1=_0x504fe1[_0x68a5('0x27')]({'plain':!![]});_0x3d4897[_0x68a5('0x2f')]=_[_0x68a5('0x31')](db[_0x68a5('0x57')][_0x68a5('0x46')]);_0x3d4897[_0x68a5('0x30')]=_[_0x68a5('0x31')](_0x312be5[_0x68a5('0x30')]);_0x3d4897[_0x68a5('0x37')]=_[_0x68a5('0x47')](_0x3d4897[_0x68a5('0x2f')],_0x3d4897[_0x68a5('0x30')]);_0x59e86d[_0x68a5('0x32')]=_[_0x68a5('0x47')](_0x3d4897[_0x68a5('0x2f')],qs[_0x68a5('0x33')](_0x312be5[_0x68a5('0x30')]['fields']));_0x59e86d[_0x68a5('0x32')]=_0x59e86d['attributes'][_0x68a5('0x34')]?_0x59e86d[_0x68a5('0x32')]:_0x3d4897[_0x68a5('0x2f')];if(!_0x312be5['query'][_0x68a5('0x58')](_0x68a5('0x35'))){_0x59e86d['limit']=qs[_0x68a5('0x23')](_0x312be5[_0x68a5('0x30')][_0x68a5('0x23')]);_0x59e86d[_0x68a5('0x22')]=qs[_0x68a5('0x22')](_0x312be5['query']['offset']);}_0x59e86d[_0x68a5('0x59')]=qs['sort'](_0x312be5[_0x68a5('0x30')][_0x68a5('0x36')]);_0x59e86d[_0x68a5('0x3a')]=qs[_0x68a5('0x37')](_['pick'](_0x312be5['query'],_0x3d4897[_0x68a5('0x37')]));_0x59e86d[_0x68a5('0x3a')][_0x68a5('0x5a')]=_0x504fe1['id'];if(_0x312be5['query'][_0x68a5('0x39')]){_0x59e86d[_0x68a5('0x3a')]=_['merge'](_0x59e86d['where'],{'$or':_[_0x68a5('0x3c')](_0x59e86d['attributes'],function(_0x3df367){var _0x417090={};_0x417090[_0x3df367]={'$like':'%'+_0x312be5['query'][_0x68a5('0x39')]+'%'};return _0x417090;})});}_0x59e86d=_['merge']({},_0x59e86d,_0x312be5[_0x68a5('0x40')]);return db[_0x68a5('0x57')][_0x68a5('0x42')](_0x59e86d);}})['then'](function(_0x44c4b3){if(_0x44c4b3){return db[_0x68a5('0x5b')][_0x68a5('0x5c')]({'where':{'id':_[_0x68a5('0x3c')](_0x44c4b3,'UserId'),'role':_0x68a5('0x5d')},'attributes':['id','name',_0x68a5('0x5e'),_0x68a5('0x5f'),_0x68a5('0x60')]});}})[_0x68a5('0x29')](function(_0x57e07e){if(_0x57e07e){return{'count':_0x57e07e[_0x68a5('0x21')],'rows':_[_0x68a5('0x3c')](_0x57e07e[_0x68a5('0x43')],function(_0x27e1c9){return{'membername':_0x27e1c9['name'],'UserId':_0x27e1c9['id'],'queue_name':_0x541da1[_0x68a5('0x2b')],'SmsQueueId':_0x541da1['id'],'interface':util[_0x68a5('0x61')](_0x68a5('0x62'),_0x68a5('0x63'),_0x27e1c9['name']),'penalty':0x0,'paused':_0x27e1c9[_0x68a5('0x5e')],'createdAt':_0x27e1c9['createdAt'],'updatedAt':_0x27e1c9[_0x68a5('0x5f')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x68a5('0x29')](respondWithFilteredResult(_0x2c926f,_0x59e86d))[_0x68a5('0x44')](handleError(_0x2c926f,null));};exports[_0x68a5('0x64')]=function(_0x59958e,_0x167a1c,_0x1a1ec7){var _0x19fc9a={};var _0x4e1125={};var _0x9a13f9;var _0x21af05;return db[_0x68a5('0x2e')][_0x68a5('0x56')]({'where':{'id':_0x59958e['params']['id']}})[_0x68a5('0x29')](handleEntityNotFound(_0x167a1c,null))[_0x68a5('0x29')](function(_0x30b8a9){if(_0x30b8a9){_0x9a13f9=_0x30b8a9;_0x4e1125[_0x68a5('0x2f')]=_[_0x68a5('0x31')](db['Team']['rawAttributes']);_0x4e1125[_0x68a5('0x30')]=_['keys'](_0x59958e['query']);_0x4e1125[_0x68a5('0x37')]=_['intersection'](_0x4e1125[_0x68a5('0x2f')],_0x4e1125[_0x68a5('0x30')]);_0x19fc9a[_0x68a5('0x32')]=_[_0x68a5('0x47')](_0x4e1125['model'],qs[_0x68a5('0x33')](_0x59958e[_0x68a5('0x30')][_0x68a5('0x33')]));_0x19fc9a[_0x68a5('0x32')]=_0x19fc9a[_0x68a5('0x32')][_0x68a5('0x34')]?_0x19fc9a[_0x68a5('0x32')]:_0x4e1125['model'];_0x19fc9a[_0x68a5('0x59')]=qs['sort'](_0x59958e[_0x68a5('0x30')][_0x68a5('0x36')]);_0x19fc9a['where']=qs[_0x68a5('0x37')](_[_0x68a5('0x38')](_0x59958e[_0x68a5('0x30')],_0x4e1125[_0x68a5('0x37')]));if(_0x59958e[_0x68a5('0x30')][_0x68a5('0x39')]){_0x19fc9a[_0x68a5('0x3a')]=_[_0x68a5('0x3b')](_0x19fc9a[_0x68a5('0x3a')],{'$or':_[_0x68a5('0x3c')](_0x19fc9a[_0x68a5('0x32')],function(_0x37a571){var _0x32845d={};_0x32845d[_0x37a571]={'$like':'%'+_0x59958e[_0x68a5('0x30')]['filter']+'%'};return _0x32845d;})});}_0x19fc9a=_[_0x68a5('0x3b')]({},_0x19fc9a,_0x59958e['options']);return _0x9a13f9[_0x68a5('0x64')](_0x19fc9a);}})[_0x68a5('0x29')](function(_0x36b41b){if(_0x36b41b){_0x21af05=_0x36b41b[_0x68a5('0x34')];if(!_0x59958e[_0x68a5('0x30')][_0x68a5('0x58')](_0x68a5('0x35'))){_0x19fc9a[_0x68a5('0x23')]=qs['limit'](_0x59958e[_0x68a5('0x30')][_0x68a5('0x23')]);_0x19fc9a[_0x68a5('0x22')]=qs[_0x68a5('0x22')](_0x59958e['query'][_0x68a5('0x22')]);}return _0x9a13f9[_0x68a5('0x64')](_0x19fc9a);}})[_0x68a5('0x29')](function(_0x3c6b20){if(_0x3c6b20){return _0x3c6b20?{'count':_0x21af05,'rows':_0x3c6b20}:null;}})[_0x68a5('0x29')](respondWithResult(_0x167a1c,null))[_0x68a5('0x44')](handleError(_0x167a1c,null));};exports['addTeams']=function(_0x2261c6,_0x4046bc,_0x50c4e3){var _0x304459=_0x2261c6[_0x68a5('0x52')][_0x68a5('0x65')];return db[_0x68a5('0x66')]['findAll']({'where':{'id':_[_0x68a5('0x3c')](_0x304459,'id')},'attributes':['id'],'include':[{'model':db[_0x68a5('0x5b')],'as':_0x68a5('0x67'),'attributes':['id',_0x68a5('0x2b'),_0x68a5('0x68'),'voicePause',_0x68a5('0x69')],'raw':!![]}]})[_0x68a5('0x29')](function(_0x5cce87){if(_0x5cce87){var _0x53811e=_[_0x68a5('0x6a')](_0x5cce87,function(_0x82f460){var _0x416a79=_0x82f460['get']({'plain':!![]});return _0x416a79[_0x68a5('0x67')];});return db[_0x68a5('0x2e')][_0x68a5('0x4c')]({'where':{'id':_0x2261c6['params']['id']}})[_0x68a5('0x29')](function(_0x5527a7){return db[_0x68a5('0x6b')][_0x68a5('0x6c')](function(_0x3f06f7){return _0x5527a7[_0x68a5('0x6d')](_[_0x68a5('0x3c')](_0x304459,'id'),{'transaction':_0x3f06f7})['then'](function(){return BPromise['each'](_0x53811e,function(_0x47725c){return db[_0x68a5('0x57')][_0x68a5('0x6e')]({'where':{'UserId':_0x47725c['id'],'SmsQueueId':_0x2261c6[_0x68a5('0x53')]['id']},'transaction':_0x3f06f7});});})[_0x68a5('0x29')](function(){_0x53811e[_0x68a5('0x6f')](function(_0x372180){socket[_0x68a5('0x70')](_0x68a5('0x71'),{'UserId':_0x372180['id'],'SmsQueueId':_0x5527a7['id']});});});});});}})[_0x68a5('0x29')](respondWithStatusCode(_0x4046bc,null))[_0x68a5('0x44')](handleError(_0x4046bc,null));};exports[_0x68a5('0x72')]=function(_0x3060a6,_0xd2cb2b,_0x41d8cc){return db['Team'][_0x68a5('0x42')]({'where':{'id':_0x3060a6[_0x68a5('0x30')][_0x68a5('0x73')]},'attributes':['id'],'include':[{'model':db[_0x68a5('0x5b')],'as':_0x68a5('0x67'),'attributes':['id'],'raw':!![]}]})[_0x68a5('0x29')](handleEntityNotFound(_0xd2cb2b,null))[_0x68a5('0x29')](function(_0x123404){var _0x3d41e8=_[_0x68a5('0x3c')](_0x123404,'id');var _0x5fca24=[];var _0x36559f=[];var _0x2889c0=squel[_0x68a5('0x74')]();_0x2889c0[_0x68a5('0x75')](_0x68a5('0x76'))['from']('team_has_sms_queues','tq')[_0x68a5('0x77')](_0x68a5('0x78'),'ut','ut.TeamId\x20=\x20tq.TeamId')['where'](_0x68a5('0x79'),_0x3060a6[_0x68a5('0x53')]['id']);for(var _0x3e4d6d=0x0;_0x3e4d6d<_0x123404[_0x68a5('0x34')];_0x3e4d6d+=0x1){let _0x1f6b09=_0x123404[_0x3e4d6d];for(var _0x5b5882=0x0;_0x5b5882<_0x1f6b09[_0x68a5('0x67')][_0x68a5('0x34')];_0x5b5882+=0x1){let _0x42856f=_0x1f6b09[_0x68a5('0x67')][_0x5b5882];var _0x13faea=_0x2889c0[_0x68a5('0x7a')]();_0x13faea['where'](_0x68a5('0x7b'),_0x42856f['id']);_0x36559f['push'](db[_0x68a5('0x6b')][_0x68a5('0x30')](_0x13faea[_0x68a5('0x7c')](),{'type':db[_0x68a5('0x6b')][_0x68a5('0x7d')]['SELECT']})['then'](function(_0x30ec59){if(_0x30ec59[_0x68a5('0x34')]===0x1){return _0x42856f['id'];}else{var _0x26a0ab=_[_0x68a5('0x7e')](_[_0x68a5('0x3c')](_0x30ec59,_0x68a5('0x7f')),function(_0x45d90b){return _['includes'](_0x3d41e8,_0x45d90b);});if(_0x26a0ab){return _0x42856f['id'];}}}));}}return BPromise['all'](_0x36559f)['then'](function(_0x19b0c3){_0x5fca24=_(_0x5fca24)[_0x68a5('0x80')](_0x19b0c3)[_0x68a5('0x81')]()['value']();return db['SmsQueue']['find']({'where':{'id':_0x3060a6[_0x68a5('0x53')]['id']}})[_0x68a5('0x29')](function(_0x2c0759){return db[_0x68a5('0x6b')][_0x68a5('0x6c')](function(_0x12e3f5){return _0x2c0759[_0x68a5('0x72')](_0x3060a6[_0x68a5('0x30')]['ids'],{'transaction':_0x12e3f5})[_0x68a5('0x29')](function(){if(!_[_0x68a5('0x82')](_0x5fca24)){return _0x2c0759[_0x68a5('0x83')](_0x5fca24,{'transaction':_0x12e3f5});}})['then'](function(){_0x5fca24[_0x68a5('0x6f')](function(_0x4eec8f){socket[_0x68a5('0x70')](_0x68a5('0x84'),{'UserId':_0x4eec8f,'SmsQueueId':_0x2c0759['id']});});});});});});})[_0x68a5('0x29')](respondWithStatusCode(_0xd2cb2b,null))[_0x68a5('0x44')](handleError(_0xd2cb2b,null));};exports[_0x68a5('0x85')]=function(_0x3f28e5,_0x257711,_0x1e2c1f){return db[_0x68a5('0x2e')][_0x68a5('0x4c')]({'where':{'id':_0x3f28e5['params']['id']}})[_0x68a5('0x29')](handleEntityNotFound(_0x257711,null))[_0x68a5('0x29')](function(_0x79a593){if(_0x79a593){return _0x79a593[_0x68a5('0x85')](_0x3f28e5[_0x68a5('0x52')][_0x68a5('0x73')],_[_0x68a5('0x86')](_0x3f28e5[_0x68a5('0x52')],[_0x68a5('0x73'),'id'])||{})['spread'](function(_0x1b7368){for(var _0x7e2eef=0x0;_0x7e2eef<_0x3f28e5[_0x68a5('0x52')][_0x68a5('0x73')][_0x68a5('0x34')];_0x7e2eef+=0x1){socket[_0x68a5('0x70')](_0x68a5('0x71'),{'UserId':_0x3f28e5[_0x68a5('0x52')][_0x68a5('0x73')][_0x7e2eef],'SmsQueueId':_0x3f28e5[_0x68a5('0x53')]['id']});}return _0x1b7368;});}})[_0x68a5('0x29')](respondWithResult(_0x257711,null))[_0x68a5('0x44')](handleError(_0x257711,null));};exports[_0x68a5('0x83')]=function(_0x30f186,_0x2f2451,_0x362f3b){return db[_0x68a5('0x2e')][_0x68a5('0x4c')]({'where':{'id':_0x30f186['params']['id']}})['then'](handleEntityNotFound(_0x2f2451,null))[_0x68a5('0x29')](function(_0x180567){if(_0x180567){return _0x180567[_0x68a5('0x83')](_0x30f186['query'][_0x68a5('0x73')])[_0x68a5('0x29')](function(){if(_['isArray'](_0x30f186[_0x68a5('0x30')][_0x68a5('0x73')])){for(var _0x3a3861=0x0;_0x3a3861<_0x30f186[_0x68a5('0x30')]['ids'][_0x68a5('0x34')];_0x3a3861+=0x1){socket[_0x68a5('0x70')](_0x68a5('0x84'),{'UserId':Number(_0x30f186[_0x68a5('0x30')][_0x68a5('0x73')][_0x3a3861]),'SmsQueueId':Number(_0x30f186['params']['id'])});}}else{socket[_0x68a5('0x70')](_0x68a5('0x84'),{'UserId':Number(_0x30f186[_0x68a5('0x30')]['ids']),'SmsQueueId':Number(_0x30f186[_0x68a5('0x53')]['id'])});}});}})[_0x68a5('0x29')](respondWithStatusCode(_0x2f2451,null))['catch'](handleError(_0x2f2451,null));};exports['getAgents']=function(_0x30e345,_0x3b039c,_0x184565){var _0x589fee={};var _0x5a4535={};var _0x847768;var _0x3846da;return db[_0x68a5('0x2e')][_0x68a5('0x56')]({'where':{'id':_0x30e345[_0x68a5('0x53')]['id']}})[_0x68a5('0x29')](handleEntityNotFound(_0x3b039c,null))[_0x68a5('0x29')](function(_0x17ef70){if(_0x17ef70){_0x847768=_0x17ef70;_0x5a4535['model']=_[_0x68a5('0x31')](db['User'][_0x68a5('0x46')]);_0x5a4535['query']=_[_0x68a5('0x31')](_0x30e345['query']);_0x5a4535['filters']=_['intersection'](_0x5a4535[_0x68a5('0x2f')],_0x5a4535['query']);_0x589fee[_0x68a5('0x32')]=_[_0x68a5('0x47')](_0x5a4535['model'],qs['fields'](_0x30e345[_0x68a5('0x30')][_0x68a5('0x33')]));_0x589fee[_0x68a5('0x32')]=_0x589fee[_0x68a5('0x32')][_0x68a5('0x34')]?_0x589fee[_0x68a5('0x32')]:_0x5a4535[_0x68a5('0x2f')];_0x589fee[_0x68a5('0x59')]=qs[_0x68a5('0x36')](_0x30e345[_0x68a5('0x30')][_0x68a5('0x36')]);_0x589fee[_0x68a5('0x3a')]=qs[_0x68a5('0x37')](_[_0x68a5('0x38')](_0x30e345[_0x68a5('0x30')],_0x5a4535[_0x68a5('0x37')]));if(_0x30e345[_0x68a5('0x30')][_0x68a5('0x39')]){_0x589fee['where']=_[_0x68a5('0x3b')](_0x589fee['where'],{'$or':_[_0x68a5('0x3c')](_0x589fee['attributes'],function(_0x171ca4){var _0x2ba090={};_0x2ba090[_0x171ca4]={'$like':'%'+_0x30e345['query'][_0x68a5('0x39')]+'%'};return _0x2ba090;})});}_0x589fee=_[_0x68a5('0x3b')]({},_0x589fee,_0x30e345['options']);return _0x847768[_0x68a5('0x87')](_0x589fee);}})[_0x68a5('0x29')](function(_0x375db2){if(_0x375db2){_0x3846da=_0x375db2[_0x68a5('0x34')];if(!_0x30e345[_0x68a5('0x30')][_0x68a5('0x58')](_0x68a5('0x35'))){_0x589fee['limit']=qs['limit'](_0x30e345[_0x68a5('0x30')][_0x68a5('0x23')]);_0x589fee[_0x68a5('0x22')]=qs[_0x68a5('0x22')](_0x30e345[_0x68a5('0x30')][_0x68a5('0x22')]);}return _0x847768['getAgents'](_0x589fee);}})[_0x68a5('0x29')](function(_0x213959){if(_0x213959){return _0x213959?{'count':_0x3846da,'rows':_0x213959}:null;}})[_0x68a5('0x29')](respondWithResult(_0x3b039c,null))[_0x68a5('0x44')](handleError(_0x3b039c,null));};
\ No newline at end of file
+var _0xc7ba=['../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','./smsQueue.socket','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','save','update','then','destroy','get','SmsQueues','UserProfileResource','stack','name','send','index','SmsQueue','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','key','VIRTUAL','field','merge','includeAll','findAll','rows','catch','show','params','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserSmsQueue','map','User','findAndCountAll','agent','smsPause','createdAt','format','%s/%s','SIP','updatedAt','getTeams','Team','addTeams','teams','Agents','online','voicePause','interface','transaction','findOrCreate','forEach','emit','userSmsQueue:save','removeTeams','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','sequelize','toString','QueryTypes','SELECT','TeamId','all','union','value','ids','isEmpty','removeAgents','addAgents','omit','spread','userSmsQueue:remove','options','getAgents','html-pdf','eml-format','rimraf','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','squel','desk.js','querystring','papaparse'];(function(_0x197481,_0x43d5fd){var _0x34655b=function(_0x1a8434){while(--_0x1a8434){_0x197481['push'](_0x197481['shift']());}};_0x34655b(++_0x43d5fd);}(_0xc7ba,0x78));var _0xac7b=function(_0x42342a,_0x766a6){_0x42342a=_0x42342a-0x0;var _0x17912c=_0xc7ba[_0x42342a];return _0x17912c;};'use strict';var pdf=require(_0xac7b('0x0'));var emlformat=require(_0xac7b('0x1'));var rimraf=require(_0xac7b('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xac7b('0x3'));var moment=require(_0xac7b('0x4'));var BPromise=require(_0xac7b('0x5'));var Mustache=require('mustache');var util=require(_0xac7b('0x6'));var path=require(_0xac7b('0x7'));var sox=require(_0xac7b('0x8'));var csv=require(_0xac7b('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xac7b('0xa'));var squel=require(_0xac7b('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xac7b('0xc'));var toCsv=require('to-csv');var querystring=require(_0xac7b('0xd'));var Papa=require(_0xac7b('0xe'));var Redis=require('ioredis');var authService=require(_0xac7b('0xf'));var qs=require(_0xac7b('0x10'));var hardwareService=require(_0xac7b('0x11'));var logger=require(_0xac7b('0x12'))(_0xac7b('0x13'));var utils=require(_0xac7b('0x14'));var config=require('../../config/environment');var db=require(_0xac7b('0x15'))['db'];config[_0xac7b('0x16')]=_[_0xac7b('0x17')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xac7b('0x18'))['register'](socket);function respondWithStatusCode(_0x15feed,_0x19aa5b){_0x19aa5b=_0x19aa5b||0xcc;return function(_0x1a4531){if(_0x1a4531){return _0x15feed[_0xac7b('0x19')](_0x19aa5b);}return _0x15feed[_0xac7b('0x1a')](_0x19aa5b)[_0xac7b('0x1b')]();};}function respondWithResult(_0x4c70c0,_0x13cb4f){_0x13cb4f=_0x13cb4f||0xc8;return function(_0x2efa9c){if(_0x2efa9c){return _0x4c70c0['status'](_0x13cb4f)['json'](_0x2efa9c);}};}function respondWithFilteredResult(_0x572795,_0x56821c){return function(_0x321424){if(_0x321424){var _0x5b56a3=_0x321424[_0xac7b('0x1c')],_0x43f1a0=_0x56821c['offset'],_0x52ebaf=_0x56821c[_0xac7b('0x1d')]+_0x56821c[_0xac7b('0x1e')],_0x534bbf;if(_0x52ebaf>=_0x5b56a3){_0x52ebaf=_0x5b56a3;_0x534bbf=0xc8;}else{_0x534bbf=0xce;}_0x572795[_0xac7b('0x1a')](_0x534bbf);return _0x572795[_0xac7b('0x1f')](_0xac7b('0x20'),_0x43f1a0+'-'+_0x52ebaf+'/'+_0x5b56a3)[_0xac7b('0x21')](_0x321424);}return null;};}function patchUpdates(_0x5a4b77){return function(_0x2a4d7b){try{jsonpatch[_0xac7b('0x22')](_0x2a4d7b,_0x5a4b77,!![]);}catch(_0x2429b2){return BPromise['reject'](_0x2429b2);}return _0x2a4d7b[_0xac7b('0x23')]();};}function saveUpdates(_0xe7f875,_0x25b16c){return function(_0x3aca7b){if(_0x3aca7b){return _0x3aca7b[_0xac7b('0x24')](_0xe7f875)[_0xac7b('0x25')](function(_0x289a18){return _0x289a18;});}return null;};}function removeEntity(_0x3d2c4f,_0x1181ab){return function(_0x583918){if(_0x583918){return _0x583918[_0xac7b('0x26')]()['then'](function(){var _0x5b1346=_0x583918[_0xac7b('0x27')]({'plain':!![]});var _0x418d16=_0xac7b('0x28');return db[_0xac7b('0x29')][_0xac7b('0x26')]({'where':{'type':_0x418d16,'resourceId':_0x5b1346['id']}})[_0xac7b('0x25')](function(){return _0x583918;});})['then'](function(){_0x3d2c4f[_0xac7b('0x1a')](0xcc)[_0xac7b('0x1b')]();});}};}function handleEntityNotFound(_0xe290da,_0x3c0fa9){return function(_0x4c73ff){if(!_0x4c73ff){_0xe290da[_0xac7b('0x19')](0x194);}return _0x4c73ff;};}function handleError(_0x476014,_0x4197f7){_0x4197f7=_0x4197f7||0x1f4;return function(_0x184c0b){logger['error'](_0x184c0b[_0xac7b('0x2a')]);if(_0x184c0b[_0xac7b('0x2b')]){delete _0x184c0b[_0xac7b('0x2b')];}_0x476014['status'](_0x4197f7)[_0xac7b('0x2c')](_0x184c0b);};}exports[_0xac7b('0x2d')]=function(_0x5cea44,_0x3c38da){var _0xf1af0a={},_0x206787={},_0x4ff3ae={'count':0x0,'rows':[]};var _0x455c76=db[_0xac7b('0x2e')][_0xac7b('0x2f')];_0x206787[_0xac7b('0x30')]=_[_0xac7b('0x31')](_0x455c76);_0x206787[_0xac7b('0x32')]=_[_0xac7b('0x31')](_0x5cea44[_0xac7b('0x32')]);_0x206787[_0xac7b('0x33')]=_['intersection'](_0x206787[_0xac7b('0x30')],_0x206787['query']);_0xf1af0a['attributes']=_[_0xac7b('0x34')](_0x206787[_0xac7b('0x30')],qs[_0xac7b('0x35')](_0x5cea44[_0xac7b('0x32')][_0xac7b('0x35')]));_0xf1af0a[_0xac7b('0x36')]=_0xf1af0a[_0xac7b('0x36')][_0xac7b('0x37')]?_0xf1af0a['attributes']:_0x206787[_0xac7b('0x30')];if(!_0x5cea44[_0xac7b('0x32')][_0xac7b('0x38')](_0xac7b('0x39'))){_0xf1af0a['limit']=qs[_0xac7b('0x1e')](_0x5cea44['query']['limit']);_0xf1af0a[_0xac7b('0x1d')]=qs[_0xac7b('0x1d')](_0x5cea44['query'][_0xac7b('0x1d')]);}_0xf1af0a[_0xac7b('0x3a')]=qs[_0xac7b('0x3b')](_0x5cea44['query'][_0xac7b('0x3b')]);_0xf1af0a[_0xac7b('0x3c')]=qs[_0xac7b('0x33')](_[_0xac7b('0x3d')](_0x5cea44[_0xac7b('0x32')],_0x206787[_0xac7b('0x33')]));if(_0x5cea44[_0xac7b('0x32')][_0xac7b('0x3e')]){_0xf1af0a['where']=_['merge'](_0xf1af0a[_0xac7b('0x3c')],{'$or':_['map'](_0x455c76,function(_0x4df8f4){if(_0x4df8f4[_0xac7b('0x3f')][_0xac7b('0x40')]!==_0xac7b('0x41')){var _0x341daf={};_0x341daf[_0x4df8f4[_0xac7b('0x42')]]={'$like':'%'+_0x5cea44[_0xac7b('0x32')][_0xac7b('0x3e')]+'%'};return _0x341daf;}})});}_0xf1af0a=_[_0xac7b('0x43')]({},_0xf1af0a,_0x5cea44['options']);var _0x2f068a={'where':_0xf1af0a['where']};return db[_0xac7b('0x2e')][_0xac7b('0x1c')](_0x2f068a)[_0xac7b('0x25')](function(_0x5c5cd6){_0x4ff3ae[_0xac7b('0x1c')]=_0x5c5cd6;if(_0x5cea44[_0xac7b('0x32')][_0xac7b('0x44')]){_0xf1af0a['include']=[{'all':!![]}];}return db[_0xac7b('0x2e')][_0xac7b('0x45')](_0xf1af0a);})[_0xac7b('0x25')](function(_0x17005d){_0x4ff3ae[_0xac7b('0x46')]=_0x17005d;return _0x4ff3ae;})[_0xac7b('0x25')](respondWithFilteredResult(_0x3c38da,_0xf1af0a))[_0xac7b('0x47')](handleError(_0x3c38da,null));};exports[_0xac7b('0x48')]=function(_0x40d7e2,_0x3ff3cb){var _0x2bb6bf={'raw':!![],'where':{'id':_0x40d7e2[_0xac7b('0x49')]['id']}},_0xe5f210={};_0xe5f210[_0xac7b('0x30')]=_[_0xac7b('0x31')](db[_0xac7b('0x2e')]['rawAttributes']);_0xe5f210['query']=_[_0xac7b('0x31')](_0x40d7e2[_0xac7b('0x32')]);_0xe5f210[_0xac7b('0x33')]=_[_0xac7b('0x34')](_0xe5f210['model'],_0xe5f210[_0xac7b('0x32')]);_0x2bb6bf[_0xac7b('0x36')]=_[_0xac7b('0x34')](_0xe5f210[_0xac7b('0x30')],qs[_0xac7b('0x35')](_0x40d7e2[_0xac7b('0x32')]['fields']));_0x2bb6bf[_0xac7b('0x36')]=_0x2bb6bf[_0xac7b('0x36')][_0xac7b('0x37')]?_0x2bb6bf[_0xac7b('0x36')]:_0xe5f210['model'];if(_0x40d7e2[_0xac7b('0x32')][_0xac7b('0x44')]){_0x2bb6bf[_0xac7b('0x4a')]=[{'all':!![]}];}_0x2bb6bf=_[_0xac7b('0x43')]({},_0x2bb6bf,_0x40d7e2['options']);return db['SmsQueue'][_0xac7b('0x4b')](_0x2bb6bf)[_0xac7b('0x25')](handleEntityNotFound(_0x3ff3cb,null))[_0xac7b('0x25')](respondWithResult(_0x3ff3cb,null))[_0xac7b('0x47')](handleError(_0x3ff3cb,null));};exports[_0xac7b('0x4c')]=function(_0x1550e1,_0x564f0a){return db['SmsQueue'][_0xac7b('0x4c')](_0x1550e1['body'],{})['then'](function(_0x172751){var _0x4ecf38=_0x1550e1[_0xac7b('0x4d')][_0xac7b('0x27')]({'plain':!![]});if(!_0x4ecf38)throw new Error(_0xac7b('0x4e'));if(_0x4ecf38['role']===_0xac7b('0x4d')){var _0x5c119b=_0x172751[_0xac7b('0x27')]({'plain':!![]});var _0x558cc1=_0xac7b('0x28');return db[_0xac7b('0x4f')]['find']({'where':{'name':_0x558cc1,'userProfileId':_0x4ecf38['userProfileId']},'raw':!![]})[_0xac7b('0x25')](function(_0x36bdc5){if(_0x36bdc5&&_0x36bdc5['autoAssociation']===0x0){return db[_0xac7b('0x29')][_0xac7b('0x4c')]({'name':_0x5c119b['name'],'resourceId':_0x5c119b['id'],'type':_0x36bdc5[_0xac7b('0x2b')],'sectionId':_0x36bdc5['id']},{})[_0xac7b('0x25')](function(){return _0x172751;});}else{return _0x172751;}})[_0xac7b('0x47')](function(_0x506a8c){logger[_0xac7b('0x50')](_0xac7b('0x51'),_0x506a8c);throw _0x506a8c;});}return _0x172751;})[_0xac7b('0x25')](respondWithResult(_0x564f0a,0xc9))[_0xac7b('0x47')](handleError(_0x564f0a,null));};exports[_0xac7b('0x24')]=function(_0x4d35c3,_0xc31c2a){if(_0x4d35c3[_0xac7b('0x52')]['id']){delete _0x4d35c3[_0xac7b('0x52')]['id'];}return db[_0xac7b('0x2e')][_0xac7b('0x4b')]({'where':{'id':_0x4d35c3[_0xac7b('0x49')]['id']}})[_0xac7b('0x25')](handleEntityNotFound(_0xc31c2a,null))[_0xac7b('0x25')](saveUpdates(_0x4d35c3[_0xac7b('0x52')],null))['then'](respondWithResult(_0xc31c2a,null))[_0xac7b('0x47')](handleError(_0xc31c2a,null));};exports['destroy']=function(_0x451366,_0x4db27b){return db[_0xac7b('0x2e')][_0xac7b('0x4b')]({'where':{'id':_0x451366[_0xac7b('0x49')]['id']}})[_0xac7b('0x25')](handleEntityNotFound(_0x4db27b,null))[_0xac7b('0x25')](removeEntity(_0x4db27b,null))[_0xac7b('0x47')](handleError(_0x4db27b,null));};exports[_0xac7b('0x53')]=function(_0x3a98e4,_0x525cf6){return db[_0xac7b('0x2e')][_0xac7b('0x53')]()[_0xac7b('0x25')](respondWithResult(_0x525cf6,null))['catch'](handleError(_0x525cf6,null));};exports[_0xac7b('0x54')]=function(_0xd7e369,_0x5206bf,_0x5f27ec){var _0x80ee3={'raw':!![],'where':{}},_0x14fdde={},_0x4dc917;return db[_0xac7b('0x2e')][_0xac7b('0x55')]({'where':{'id':_0xd7e369[_0xac7b('0x49')]['id']}})['then'](handleEntityNotFound(_0x5206bf,null))[_0xac7b('0x25')](function(_0xd2adf1){if(_0xd2adf1){_0x4dc917=_0xd2adf1['get']({'plain':!![]});_0x14fdde[_0xac7b('0x30')]=_['keys'](db[_0xac7b('0x56')][_0xac7b('0x2f')]);_0x14fdde[_0xac7b('0x32')]=_[_0xac7b('0x31')](_0xd7e369['query']);_0x14fdde[_0xac7b('0x33')]=_['intersection'](_0x14fdde['model'],_0x14fdde[_0xac7b('0x32')]);_0x80ee3[_0xac7b('0x36')]=_[_0xac7b('0x34')](_0x14fdde['model'],qs[_0xac7b('0x35')](_0xd7e369[_0xac7b('0x32')]['fields']));_0x80ee3[_0xac7b('0x36')]=_0x80ee3['attributes']['length']?_0x80ee3[_0xac7b('0x36')]:_0x14fdde['model'];if(!_0xd7e369[_0xac7b('0x32')]['hasOwnProperty'](_0xac7b('0x39'))){_0x80ee3[_0xac7b('0x1e')]=qs[_0xac7b('0x1e')](_0xd7e369['query']['limit']);_0x80ee3[_0xac7b('0x1d')]=qs['offset'](_0xd7e369[_0xac7b('0x32')][_0xac7b('0x1d')]);}_0x80ee3[_0xac7b('0x3a')]=qs[_0xac7b('0x3b')](_0xd7e369['query'][_0xac7b('0x3b')]);_0x80ee3['where']=qs['filters'](_[_0xac7b('0x3d')](_0xd7e369['query'],_0x14fdde[_0xac7b('0x33')]));_0x80ee3[_0xac7b('0x3c')]['SmsQueueId']=_0xd2adf1['id'];if(_0xd7e369['query'][_0xac7b('0x3e')]){_0x80ee3[_0xac7b('0x3c')]=_[_0xac7b('0x43')](_0x80ee3[_0xac7b('0x3c')],{'$or':_[_0xac7b('0x57')](_0x80ee3[_0xac7b('0x36')],function(_0x307f04){var _0xeab98b={};_0xeab98b[_0x307f04]={'$like':'%'+_0xd7e369[_0xac7b('0x32')][_0xac7b('0x3e')]+'%'};return _0xeab98b;})});}_0x80ee3=_[_0xac7b('0x43')]({},_0x80ee3,_0xd7e369['options']);return db[_0xac7b('0x56')][_0xac7b('0x45')](_0x80ee3);}})[_0xac7b('0x25')](function(_0x1949ee){if(_0x1949ee){return db[_0xac7b('0x58')][_0xac7b('0x59')]({'where':{'id':_[_0xac7b('0x57')](_0x1949ee,'UserId'),'role':_0xac7b('0x5a')},'attributes':['id',_0xac7b('0x2b'),_0xac7b('0x5b'),'updatedAt',_0xac7b('0x5c')]});}})['then'](function(_0x3fbf56){if(_0x3fbf56){return{'count':_0x3fbf56[_0xac7b('0x1c')],'rows':_[_0xac7b('0x57')](_0x3fbf56['rows'],function(_0x25833b){return{'membername':_0x25833b['name'],'UserId':_0x25833b['id'],'queue_name':_0x4dc917['name'],'SmsQueueId':_0x4dc917['id'],'interface':util[_0xac7b('0x5d')](_0xac7b('0x5e'),_0xac7b('0x5f'),_0x25833b[_0xac7b('0x2b')]),'penalty':0x0,'paused':_0x25833b[_0xac7b('0x5b')],'createdAt':_0x25833b[_0xac7b('0x5c')],'updatedAt':_0x25833b[_0xac7b('0x60')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x5206bf,_0x80ee3))[_0xac7b('0x47')](handleError(_0x5206bf,null));};exports[_0xac7b('0x61')]=function(_0x5c7ed7,_0x5b9818,_0x455cc1){var _0x4d4d0e={};var _0x4bc6e5={};var _0x96f101;var _0x2e26b2;return db[_0xac7b('0x2e')]['findOne']({'where':{'id':_0x5c7ed7['params']['id']}})[_0xac7b('0x25')](handleEntityNotFound(_0x5b9818,null))[_0xac7b('0x25')](function(_0x253942){if(_0x253942){_0x96f101=_0x253942;_0x4bc6e5['model']=_[_0xac7b('0x31')](db[_0xac7b('0x62')][_0xac7b('0x2f')]);_0x4bc6e5['query']=_[_0xac7b('0x31')](_0x5c7ed7[_0xac7b('0x32')]);_0x4bc6e5['filters']=_[_0xac7b('0x34')](_0x4bc6e5[_0xac7b('0x30')],_0x4bc6e5[_0xac7b('0x32')]);_0x4d4d0e[_0xac7b('0x36')]=_[_0xac7b('0x34')](_0x4bc6e5['model'],qs[_0xac7b('0x35')](_0x5c7ed7[_0xac7b('0x32')][_0xac7b('0x35')]));_0x4d4d0e[_0xac7b('0x36')]=_0x4d4d0e[_0xac7b('0x36')][_0xac7b('0x37')]?_0x4d4d0e[_0xac7b('0x36')]:_0x4bc6e5[_0xac7b('0x30')];_0x4d4d0e[_0xac7b('0x3a')]=qs['sort'](_0x5c7ed7[_0xac7b('0x32')][_0xac7b('0x3b')]);_0x4d4d0e['where']=qs[_0xac7b('0x33')](_['pick'](_0x5c7ed7[_0xac7b('0x32')],_0x4bc6e5['filters']));if(_0x5c7ed7[_0xac7b('0x32')][_0xac7b('0x3e')]){_0x4d4d0e[_0xac7b('0x3c')]=_[_0xac7b('0x43')](_0x4d4d0e[_0xac7b('0x3c')],{'$or':_[_0xac7b('0x57')](_0x4d4d0e[_0xac7b('0x36')],function(_0x51c67e){var _0x4475ff={};_0x4475ff[_0x51c67e]={'$like':'%'+_0x5c7ed7[_0xac7b('0x32')][_0xac7b('0x3e')]+'%'};return _0x4475ff;})});}_0x4d4d0e=_[_0xac7b('0x43')]({},_0x4d4d0e,_0x5c7ed7['options']);return _0x96f101[_0xac7b('0x61')](_0x4d4d0e);}})[_0xac7b('0x25')](function(_0x1f3c00){if(_0x1f3c00){_0x2e26b2=_0x1f3c00[_0xac7b('0x37')];if(!_0x5c7ed7[_0xac7b('0x32')][_0xac7b('0x38')](_0xac7b('0x39'))){_0x4d4d0e[_0xac7b('0x1e')]=qs[_0xac7b('0x1e')](_0x5c7ed7['query'][_0xac7b('0x1e')]);_0x4d4d0e[_0xac7b('0x1d')]=qs[_0xac7b('0x1d')](_0x5c7ed7[_0xac7b('0x32')][_0xac7b('0x1d')]);}return _0x96f101['getTeams'](_0x4d4d0e);}})[_0xac7b('0x25')](function(_0x2872db){if(_0x2872db){return _0x2872db?{'count':_0x2e26b2,'rows':_0x2872db}:null;}})[_0xac7b('0x25')](respondWithResult(_0x5b9818,null))[_0xac7b('0x47')](handleError(_0x5b9818,null));};exports[_0xac7b('0x63')]=function(_0x5757af,_0x5149d5,_0x94ff36){var _0x4dcb8b=_0x5757af[_0xac7b('0x52')][_0xac7b('0x64')];return db['Team'][_0xac7b('0x45')]({'where':{'id':_[_0xac7b('0x57')](_0x4dcb8b,'id')},'attributes':['id'],'include':[{'model':db[_0xac7b('0x58')],'as':_0xac7b('0x65'),'attributes':['id',_0xac7b('0x2b'),_0xac7b('0x66'),_0xac7b('0x67'),_0xac7b('0x68')],'raw':!![]}]})[_0xac7b('0x25')](function(_0x48d34a){if(_0x48d34a){var _0x1d678f=_['flatMap'](_0x48d34a,function(_0x3c6a20){var _0x13bcda=_0x3c6a20[_0xac7b('0x27')]({'plain':!![]});return _0x13bcda[_0xac7b('0x65')];});return db[_0xac7b('0x2e')][_0xac7b('0x4b')]({'where':{'id':_0x5757af[_0xac7b('0x49')]['id']}})[_0xac7b('0x25')](function(_0x5f42d1){return db['sequelize'][_0xac7b('0x69')](function(_0x166b71){return _0x5f42d1['addTeams'](_[_0xac7b('0x57')](_0x4dcb8b,'id'),{'transaction':_0x166b71})['then'](function(){return BPromise['each'](_0x1d678f,function(_0x2b1735){return db[_0xac7b('0x56')][_0xac7b('0x6a')]({'where':{'UserId':_0x2b1735['id'],'SmsQueueId':_0x5757af[_0xac7b('0x49')]['id']},'transaction':_0x166b71});});})[_0xac7b('0x25')](function(){_0x1d678f[_0xac7b('0x6b')](function(_0x54cac){socket[_0xac7b('0x6c')](_0xac7b('0x6d'),{'UserId':_0x54cac['id'],'SmsQueueId':_0x5f42d1['id']});});});});});}})[_0xac7b('0x25')](respondWithStatusCode(_0x5149d5,null))[_0xac7b('0x47')](handleError(_0x5149d5,null));};exports[_0xac7b('0x6e')]=function(_0x5dfd25,_0x15a078,_0x51a596){return db[_0xac7b('0x62')][_0xac7b('0x45')]({'where':{'id':_0x5dfd25[_0xac7b('0x32')]['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xac7b('0x25')](handleEntityNotFound(_0x15a078,null))['then'](function(_0x5ec90a){var _0x4aba9d=_['map'](_0x5ec90a,'id');var _0x56a494=[];var _0x35b97c=[];var _0x4826fb=squel['select']();_0x4826fb[_0xac7b('0x42')]('tq.TeamId')[_0xac7b('0x6f')]('team_has_sms_queues','tq')[_0xac7b('0x70')](_0xac7b('0x71'),'ut',_0xac7b('0x72'))['where']('SmsQueueId\x20=\x20?',_0x5dfd25[_0xac7b('0x49')]['id']);for(var _0x1acee0=0x0;_0x1acee0<_0x5ec90a[_0xac7b('0x37')];_0x1acee0+=0x1){let _0x4e17d3=_0x5ec90a[_0x1acee0];for(var _0x18a9ad=0x0;_0x18a9ad<_0x4e17d3[_0xac7b('0x65')][_0xac7b('0x37')];_0x18a9ad+=0x1){let _0x424d05=_0x4e17d3['Agents'][_0x18a9ad];var _0x50f48e=_0x4826fb[_0xac7b('0x73')]();_0x50f48e[_0xac7b('0x3c')](_0xac7b('0x74'),_0x424d05['id']);_0x35b97c[_0xac7b('0x75')](db[_0xac7b('0x76')][_0xac7b('0x32')](_0x50f48e[_0xac7b('0x77')](),{'type':db[_0xac7b('0x76')][_0xac7b('0x78')][_0xac7b('0x79')]})[_0xac7b('0x25')](function(_0x338e89){if(_0x338e89[_0xac7b('0x37')]===0x1){return _0x424d05['id'];}else{var _0x5c7759=_['every'](_['map'](_0x338e89,_0xac7b('0x7a')),function(_0xeb4edc){return _['includes'](_0x4aba9d,_0xeb4edc);});if(_0x5c7759){return _0x424d05['id'];}}}));}}return BPromise[_0xac7b('0x7b')](_0x35b97c)['then'](function(_0xa81e42){_0x56a494=_(_0x56a494)[_0xac7b('0x7c')](_0xa81e42)['compact']()[_0xac7b('0x7d')]();return db[_0xac7b('0x2e')][_0xac7b('0x4b')]({'where':{'id':_0x5dfd25[_0xac7b('0x49')]['id']}})[_0xac7b('0x25')](function(_0x2cc392){return db[_0xac7b('0x76')][_0xac7b('0x69')](function(_0x6687){return _0x2cc392[_0xac7b('0x6e')](_0x5dfd25[_0xac7b('0x32')][_0xac7b('0x7e')],{'transaction':_0x6687})[_0xac7b('0x25')](function(){if(!_[_0xac7b('0x7f')](_0x56a494)){return _0x2cc392[_0xac7b('0x80')](_0x56a494,{'transaction':_0x6687});}})[_0xac7b('0x25')](function(){_0x56a494[_0xac7b('0x6b')](function(_0x1c19b7){socket[_0xac7b('0x6c')]('userSmsQueue:remove',{'UserId':_0x1c19b7,'SmsQueueId':_0x2cc392['id']});});});});});});})[_0xac7b('0x25')](respondWithStatusCode(_0x15a078,null))[_0xac7b('0x47')](handleError(_0x15a078,null));};exports[_0xac7b('0x81')]=function(_0x58451d,_0x4ae7e4,_0x4d9447){return db[_0xac7b('0x2e')][_0xac7b('0x4b')]({'where':{'id':_0x58451d['params']['id']}})['then'](handleEntityNotFound(_0x4ae7e4,null))[_0xac7b('0x25')](function(_0x3b3286){if(_0x3b3286){return _0x3b3286[_0xac7b('0x81')](_0x58451d[_0xac7b('0x52')]['ids'],_[_0xac7b('0x82')](_0x58451d[_0xac7b('0x52')],[_0xac7b('0x7e'),'id'])||{})[_0xac7b('0x83')](function(_0x48f41e){for(var _0x54348f=0x0;_0x54348f<_0x58451d[_0xac7b('0x52')][_0xac7b('0x7e')][_0xac7b('0x37')];_0x54348f+=0x1){socket[_0xac7b('0x6c')]('userSmsQueue:save',{'UserId':_0x58451d['body'][_0xac7b('0x7e')][_0x54348f],'SmsQueueId':_0x58451d['params']['id']});}return _0x48f41e;});}})[_0xac7b('0x25')](respondWithResult(_0x4ae7e4,null))[_0xac7b('0x47')](handleError(_0x4ae7e4,null));};exports['removeAgents']=function(_0x4c5f2c,_0x4af427,_0x12882b){return db['SmsQueue']['find']({'where':{'id':_0x4c5f2c[_0xac7b('0x49')]['id']}})['then'](handleEntityNotFound(_0x4af427,null))[_0xac7b('0x25')](function(_0x4c4f1d){if(_0x4c4f1d){return _0x4c4f1d['removeAgents'](_0x4c5f2c[_0xac7b('0x32')][_0xac7b('0x7e')])[_0xac7b('0x25')](function(){if(_['isArray'](_0x4c5f2c[_0xac7b('0x32')][_0xac7b('0x7e')])){for(var _0x2e04bf=0x0;_0x2e04bf<_0x4c5f2c['query'][_0xac7b('0x7e')][_0xac7b('0x37')];_0x2e04bf+=0x1){socket['emit'](_0xac7b('0x84'),{'UserId':Number(_0x4c5f2c['query']['ids'][_0x2e04bf]),'SmsQueueId':Number(_0x4c5f2c[_0xac7b('0x49')]['id'])});}}else{socket['emit'](_0xac7b('0x84'),{'UserId':Number(_0x4c5f2c[_0xac7b('0x32')][_0xac7b('0x7e')]),'SmsQueueId':Number(_0x4c5f2c[_0xac7b('0x49')]['id'])});}});}})[_0xac7b('0x25')](respondWithStatusCode(_0x4af427,null))['catch'](handleError(_0x4af427,null));};exports['getAgents']=function(_0x24ceab,_0x1e2a11,_0x45c503){var _0x4bc085={};var _0x5bb491={};var _0x5ad153;var _0x1a525a;return db[_0xac7b('0x2e')][_0xac7b('0x55')]({'where':{'id':_0x24ceab['params']['id']}})[_0xac7b('0x25')](handleEntityNotFound(_0x1e2a11,null))[_0xac7b('0x25')](function(_0x395562){if(_0x395562){_0x5ad153=_0x395562;_0x5bb491[_0xac7b('0x30')]=_[_0xac7b('0x31')](db[_0xac7b('0x58')][_0xac7b('0x2f')]);_0x5bb491[_0xac7b('0x32')]=_[_0xac7b('0x31')](_0x24ceab[_0xac7b('0x32')]);_0x5bb491[_0xac7b('0x33')]=_[_0xac7b('0x34')](_0x5bb491[_0xac7b('0x30')],_0x5bb491['query']);_0x4bc085['attributes']=_['intersection'](_0x5bb491[_0xac7b('0x30')],qs[_0xac7b('0x35')](_0x24ceab['query'][_0xac7b('0x35')]));_0x4bc085[_0xac7b('0x36')]=_0x4bc085['attributes'][_0xac7b('0x37')]?_0x4bc085[_0xac7b('0x36')]:_0x5bb491[_0xac7b('0x30')];_0x4bc085['order']=qs[_0xac7b('0x3b')](_0x24ceab[_0xac7b('0x32')][_0xac7b('0x3b')]);_0x4bc085['where']=qs[_0xac7b('0x33')](_['pick'](_0x24ceab[_0xac7b('0x32')],_0x5bb491['filters']));if(_0x24ceab[_0xac7b('0x32')][_0xac7b('0x3e')]){_0x4bc085[_0xac7b('0x3c')]=_['merge'](_0x4bc085[_0xac7b('0x3c')],{'$or':_[_0xac7b('0x57')](_0x4bc085[_0xac7b('0x36')],function(_0x338704){var _0x67306d={};_0x67306d[_0x338704]={'$like':'%'+_0x24ceab[_0xac7b('0x32')][_0xac7b('0x3e')]+'%'};return _0x67306d;})});}_0x4bc085=_[_0xac7b('0x43')]({},_0x4bc085,_0x24ceab[_0xac7b('0x85')]);return _0x5ad153[_0xac7b('0x86')](_0x4bc085);}})[_0xac7b('0x25')](function(_0x507b7d){if(_0x507b7d){_0x1a525a=_0x507b7d[_0xac7b('0x37')];if(!_0x24ceab['query'][_0xac7b('0x38')](_0xac7b('0x39'))){_0x4bc085['limit']=qs[_0xac7b('0x1e')](_0x24ceab['query'][_0xac7b('0x1e')]);_0x4bc085['offset']=qs['offset'](_0x24ceab[_0xac7b('0x32')][_0xac7b('0x1d')]);}return _0x5ad153['getAgents'](_0x4bc085);}})[_0xac7b('0x25')](function(_0x366c78){if(_0x366c78){return _0x366c78?{'count':_0x1a525a,'rows':_0x366c78}:null;}})[_0xac7b('0x25')](respondWithResult(_0x1e2a11,null))[_0xac7b('0x47')](handleError(_0x1e2a11,null));};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.events.js b/server/api/smsQueue/smsQueue.events.js
index f40f1bd..2ad9e19 100644
--- a/server/api/smsQueue/smsQueue.events.js
+++ b/server/api/smsQueue/smsQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdd8d=['update','remove','emit','hasOwnProperty','exports','events','SmsQueue','setMaxListeners'];(function(_0x283e4d,_0xd4043c){var _0x3ee73a=function(_0x3aaaaa){while(--_0x3aaaaa){_0x283e4d['push'](_0x283e4d['shift']());}};_0x3ee73a(++_0xd4043c);}(_0xdd8d,0xe5));var _0xddd8=function(_0x5c4d27,_0x5b0822){_0x5c4d27=_0x5c4d27-0x0;var _0x1dda1a=_0xdd8d[_0x5c4d27];return _0x1dda1a;};'use strict';var EventEmitter=require(_0xddd8('0x0'));var SmsQueue=require('../../mysqldb')['db'][_0xddd8('0x1')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xddd8('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xddd8('0x3'),'afterDestroy':_0xddd8('0x4')};function emitEvent(_0x333086){return function(_0x55ef18,_0x3b3789,_0x25d4f5){SmsQueueEvents[_0xddd8('0x5')](_0x333086+':'+_0x55ef18['id'],_0x55ef18);SmsQueueEvents[_0xddd8('0x5')](_0x333086,_0x55ef18);_0x25d4f5(null);};}for(var e in events){if(events[_0xddd8('0x6')](e)){var event=events[e];SmsQueue['hook'](e,emitEvent(event));}}module[_0xddd8('0x7')]=SmsQueueEvents;
\ No newline at end of file
+var _0xaec3=['hook','exports','events','../../mysqldb','SmsQueue','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x332be8,_0x45c577){var _0x2fc5fd=function(_0x18cdf2){while(--_0x18cdf2){_0x332be8['push'](_0x332be8['shift']());}};_0x2fc5fd(++_0x45c577);}(_0xaec3,0x7a));var _0x3aec=function(_0xb52ff,_0x4b77ee){_0xb52ff=_0xb52ff-0x0;var _0x36de52=_0xaec3[_0xb52ff];return _0x36de52;};'use strict';var EventEmitter=require(_0x3aec('0x0'));var SmsQueue=require(_0x3aec('0x1'))['db'][_0x3aec('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x3aec('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3aec('0x4'),'afterDestroy':_0x3aec('0x5')};function emitEvent(_0x166acb){return function(_0x27a520,_0xd478d5,_0x43d547){SmsQueueEvents[_0x3aec('0x6')](_0x166acb+':'+_0x27a520['id'],_0x27a520);SmsQueueEvents[_0x3aec('0x6')](_0x166acb,_0x27a520);_0x43d547(null);};}for(var e in events){if(events[_0x3aec('0x7')](e)){var event=events[e];SmsQueue[_0x3aec('0x8')](e,emitEvent(event));}}module[_0x3aec('0x9')]=SmsQueueEvents;
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.model.js b/server/api/smsQueue/smsQueue.model.js
index b494a4b..8a1e859 100644
--- a/server/api/smsQueue/smsQueue.model.js
+++ b/server/api/smsQueue/smsQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x77d4=['util','api','bluebird','request-promise','../../config/environment','./smsQueue.attributes','exports','define'];(function(_0x284e2b,_0x2fb0ea){var _0x5190a9=function(_0x3cea82){while(--_0x3cea82){_0x284e2b['push'](_0x284e2b['shift']());}};_0x5190a9(++_0x2fb0ea);}(_0x77d4,0x108));var _0x477d=function(_0x4e4519,_0x392ae){_0x4e4519=_0x4e4519-0x0;var _0x340044=_0x77d4[_0x4e4519];return _0x340044;};'use strict';var _=require('lodash');var util=require(_0x477d('0x0'));var logger=require('../../config/logger')(_0x477d('0x1'));var moment=require('moment');var BPromise=require(_0x477d('0x2'));var rp=require(_0x477d('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x477d('0x4'));var attributes=require(_0x477d('0x5'));module[_0x477d('0x6')]=function(_0x471fca,_0x2545e5){return _0x471fca[_0x477d('0x7')]('SmsQueue',attributes,{'tableName':'sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6eed=['request-promise','path','./smsQueue.attributes','exports','define','lodash','util','../../config/logger','api','moment'];(function(_0x57350d,_0x44d9df){var _0x704b27=function(_0x2b03ac){while(--_0x2b03ac){_0x57350d['push'](_0x57350d['shift']());}};_0x704b27(++_0x44d9df);}(_0x6eed,0xff));var _0xd6ee=function(_0x240b84,_0x1990e6){_0x240b84=_0x240b84-0x0;var _0x502ab7=_0x6eed[_0x240b84];return _0x502ab7;};'use strict';var _=require(_0xd6ee('0x0'));var util=require(_0xd6ee('0x1'));var logger=require(_0xd6ee('0x2'))(_0xd6ee('0x3'));var moment=require(_0xd6ee('0x4'));var BPromise=require('bluebird');var rp=require(_0xd6ee('0x5'));var fs=require('fs');var path=require(_0xd6ee('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xd6ee('0x7'));module[_0xd6ee('0x8')]=function(_0x1c4f36,_0x37abca){return _0x1c4f36[_0xd6ee('0x9')]('SmsQueue',attributes,{'tableName':'sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.rpc.js b/server/api/smsQueue/smsQueue.rpc.js
index 5abe90c..2ca1312 100644
--- a/server/api/smsQueue/smsQueue.rpc.js
+++ b/server/api/smsQueue/smsQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x760e=['code','message','catch','GetSmsQueue','SmsQueue','findAll','options','raw','where','attributes','limit','include','map','model','then','find','ShowSmsQueue','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket','register','info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error'];(function(_0x37b06b,_0x1e36cf){var _0x496f64=function(_0x34df72){while(--_0x34df72){_0x37b06b['push'](_0x37b06b['shift']());}};_0x496f64(++_0x1e36cf);}(_0x760e,0x1d4));var _0xe760=function(_0x1b6877,_0x3ad552){_0x1b6877=_0x1b6877-0x0;var _0x381643=_0x760e[_0x1b6877];return _0x381643;};'use strict';var _=require(_0xe760('0x0'));var util=require(_0xe760('0x1'));var moment=require(_0xe760('0x2'));var BPromise=require(_0xe760('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe760('0x4'));var db=require(_0xe760('0x5'))['db'];var utils=require(_0xe760('0x6'));var logger=require('../../config/logger')(_0xe760('0x7'));var config=require(_0xe760('0x8'));var jayson=require(_0xe760('0x9'));var client=jayson[_0xe760('0xa')][_0xe760('0xb')]({'port':0x232a});config[_0xe760('0xc')]=_[_0xe760('0xd')](config['redis'],{'host':_0xe760('0xe'),'port':0x18eb});var socket=require(_0xe760('0xf'))(new Redis(config[_0xe760('0xc')]));require(_0xe760('0x10'))[_0xe760('0x11')](socket);function respondWithRpcPromise(_0xe02f76,_0x7000a7,_0x267ac2){return new BPromise(function(_0xf2d7ed,_0x348e7a){return client['request'](_0xe02f76,_0x267ac2)['then'](function(_0x3d0856){logger[_0xe760('0x12')](_0xe760('0x13'),_0x7000a7,_0xe760('0x14'));logger[_0xe760('0x15')]('SmsQueue,\x20%s,\x20%s,\x20%s',_0x7000a7,'request\x20sent',JSON[_0xe760('0x16')](_0x3d0856));if(_0x3d0856['error']){if(_0x3d0856[_0xe760('0x17')][_0xe760('0x18')]===0x1f4){logger[_0xe760('0x17')](_0xe760('0x13'),_0x7000a7,_0x3d0856[_0xe760('0x17')][_0xe760('0x19')]);return _0x348e7a(_0x3d0856[_0xe760('0x17')][_0xe760('0x19')]);}logger[_0xe760('0x17')](_0xe760('0x13'),_0x7000a7,_0x3d0856['error'][_0xe760('0x19')]);return _0xf2d7ed(_0x3d0856['error'][_0xe760('0x19')]);}else{logger[_0xe760('0x12')](_0xe760('0x13'),_0x7000a7,_0xe760('0x14'));_0xf2d7ed(_0x3d0856['result'][_0xe760('0x19')]);}})[_0xe760('0x1a')](function(_0x3bf213){logger['error'](_0xe760('0x13'),_0x7000a7,_0x3bf213);_0x348e7a(_0x3bf213);});});}exports[_0xe760('0x1b')]=function(_0x1dbf62){var _0x25685c=this;return new Promise(function(_0x49ef87,_0x3a39ae){return db[_0xe760('0x1c')][_0xe760('0x1d')]({'raw':_0x1dbf62[_0xe760('0x1e')]?_0x1dbf62['options'][_0xe760('0x1f')]===undefined?!![]:![]:!![],'where':_0x1dbf62[_0xe760('0x1e')]?_0x1dbf62['options'][_0xe760('0x20')]||null:null,'attributes':_0x1dbf62[_0xe760('0x1e')]?_0x1dbf62['options'][_0xe760('0x21')]||null:null,'limit':_0x1dbf62[_0xe760('0x1e')]?_0x1dbf62[_0xe760('0x1e')][_0xe760('0x22')]||null:null,'include':_0x1dbf62['options']?_0x1dbf62[_0xe760('0x1e')][_0xe760('0x23')]?_[_0xe760('0x24')](_0x1dbf62['options'][_0xe760('0x23')],function(_0x5b8165){return{'model':db[_0x5b8165[_0xe760('0x25')]],'as':_0x5b8165['as'],'attributes':_0x5b8165[_0xe760('0x21')],'include':_0x5b8165[_0xe760('0x23')]?_[_0xe760('0x24')](_0x5b8165['include'],function(_0x3b9c14){return{'model':db[_0x3b9c14['model']],'as':_0x3b9c14['as'],'attributes':_0x3b9c14[_0xe760('0x21')],'include':_0x3b9c14[_0xe760('0x23')]?_['map'](_0x3b9c14['include'],function(_0x477136){return{'model':db[_0x477136[_0xe760('0x25')]],'as':_0x477136['as'],'attributes':_0x477136[_0xe760('0x21')]};}):[]};}):[]};}):[]:[]})[_0xe760('0x26')](function(_0x2ddc10){logger['info'](_0xe760('0x1b'),_0x1dbf62);logger[_0xe760('0x15')]('GetSmsQueue',_0x1dbf62,JSON[_0xe760('0x16')](_0x2ddc10));_0x49ef87(_0x2ddc10);})[_0xe760('0x1a')](function(_0x3f94c0){logger['error']('GetSmsQueue',_0x3f94c0[_0xe760('0x19')],_0x1dbf62);_0x3a39ae(_0x25685c[_0xe760('0x17')](0x1f4,_0x3f94c0[_0xe760('0x19')]));});});};exports['ShowSmsQueue']=function(_0x1efeda){var _0x5d1c58=this;return new Promise(function(_0x43d6d4,_0x3a8b33){return db[_0xe760('0x1c')][_0xe760('0x27')]({'raw':_0x1efeda[_0xe760('0x1e')]?_0x1efeda[_0xe760('0x1e')][_0xe760('0x1f')]===undefined?!![]:![]:!![],'where':_0x1efeda[_0xe760('0x1e')]?_0x1efeda[_0xe760('0x1e')]['where']||null:null,'attributes':_0x1efeda[_0xe760('0x1e')]?_0x1efeda[_0xe760('0x1e')][_0xe760('0x21')]||null:null,'include':_0x1efeda[_0xe760('0x1e')]?_0x1efeda['options'][_0xe760('0x23')]?_['map'](_0x1efeda[_0xe760('0x1e')][_0xe760('0x23')],function(_0x4f3def){return{'model':db[_0x4f3def[_0xe760('0x25')]],'as':_0x4f3def['as'],'attributes':_0x4f3def[_0xe760('0x21')],'include':_0x4f3def[_0xe760('0x23')]?_[_0xe760('0x24')](_0x4f3def['include'],function(_0x43f5d1){return{'model':db[_0x43f5d1[_0xe760('0x25')]],'as':_0x43f5d1['as'],'attributes':_0x43f5d1[_0xe760('0x21')],'include':_0x43f5d1[_0xe760('0x23')]?_[_0xe760('0x24')](_0x43f5d1[_0xe760('0x23')],function(_0xb561a6){return{'model':db[_0xb561a6[_0xe760('0x25')]],'as':_0xb561a6['as'],'attributes':_0xb561a6[_0xe760('0x21')]};}):[]};}):[]};}):[]:[]})[_0xe760('0x26')](function(_0x3de2eb){logger[_0xe760('0x12')]('ShowSmsQueue',_0x1efeda);logger[_0xe760('0x15')](_0xe760('0x28'),_0x1efeda,JSON[_0xe760('0x16')](_0x3de2eb));_0x43d6d4(_0x3de2eb);})[_0xe760('0x1a')](function(_0x33acae){logger[_0xe760('0x17')]('ShowSmsQueue',_0x33acae['message'],_0x1efeda);_0x3a8b33(_0x5d1c58['error'](0x1f4,_0x33acae['message']));});});};
\ No newline at end of file
+var _0x1175=['ShowSmsQueue','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','register','request','then','info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','SmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetSmsQueue','SmsQueue','findAll','options','raw','where','attributes','include','map','model'];(function(_0x505a5c,_0x5a8f6f){var _0x3d14fc=function(_0x32dc7e){while(--_0x32dc7e){_0x505a5c['push'](_0x505a5c['shift']());}};_0x3d14fc(++_0x5a8f6f);}(_0x1175,0x139));var _0x5117=function(_0x354160,_0xf0d4b9){_0x354160=_0x354160-0x0;var _0x31bd97=_0x1175[_0x354160];return _0x31bd97;};'use strict';var _=require('lodash');var util=require(_0x5117('0x0'));var moment=require(_0x5117('0x1'));var BPromise=require(_0x5117('0x2'));var rs=require(_0x5117('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5117('0x4'))['db'];var utils=require(_0x5117('0x5'));var logger=require(_0x5117('0x6'))(_0x5117('0x7'));var config=require(_0x5117('0x8'));var jayson=require(_0x5117('0x9'));var client=jayson[_0x5117('0xa')]['http']({'port':0x232a});config[_0x5117('0xb')]=_['defaults'](config[_0x5117('0xb')],{'host':_0x5117('0xc'),'port':0x18eb});var socket=require(_0x5117('0xd'))(new Redis(config[_0x5117('0xb')]));require('./smsQueue.socket')[_0x5117('0xe')](socket);function respondWithRpcPromise(_0x38c55a,_0x154ae9,_0x5dd522){return new BPromise(function(_0x57f3a2,_0x3e41cc){return client[_0x5117('0xf')](_0x38c55a,_0x5dd522)[_0x5117('0x10')](function(_0x531481){logger[_0x5117('0x11')](_0x5117('0x12'),_0x154ae9,_0x5117('0x13'));logger[_0x5117('0x14')](_0x5117('0x15'),_0x154ae9,'request\x20sent',JSON[_0x5117('0x16')](_0x531481));if(_0x531481[_0x5117('0x17')]){if(_0x531481['error'][_0x5117('0x18')]===0x1f4){logger[_0x5117('0x17')](_0x5117('0x12'),_0x154ae9,_0x531481[_0x5117('0x17')]['message']);return _0x3e41cc(_0x531481[_0x5117('0x17')]['message']);}logger['error'](_0x5117('0x12'),_0x154ae9,_0x531481[_0x5117('0x17')][_0x5117('0x19')]);return _0x57f3a2(_0x531481[_0x5117('0x17')][_0x5117('0x19')]);}else{logger[_0x5117('0x11')]('SmsQueue,\x20%s,\x20%s',_0x154ae9,_0x5117('0x13'));_0x57f3a2(_0x531481[_0x5117('0x1a')]['message']);}})[_0x5117('0x1b')](function(_0x300852){logger[_0x5117('0x17')](_0x5117('0x12'),_0x154ae9,_0x300852);_0x3e41cc(_0x300852);});});}exports[_0x5117('0x1c')]=function(_0x3bd091){var _0x3b30db=this;return new Promise(function(_0x101516,_0x1e25ea){return db[_0x5117('0x1d')][_0x5117('0x1e')]({'raw':_0x3bd091[_0x5117('0x1f')]?_0x3bd091[_0x5117('0x1f')][_0x5117('0x20')]===undefined?!![]:![]:!![],'where':_0x3bd091['options']?_0x3bd091[_0x5117('0x1f')][_0x5117('0x21')]||null:null,'attributes':_0x3bd091['options']?_0x3bd091['options'][_0x5117('0x22')]||null:null,'limit':_0x3bd091['options']?_0x3bd091['options']['limit']||null:null,'include':_0x3bd091['options']?_0x3bd091[_0x5117('0x1f')][_0x5117('0x23')]?_[_0x5117('0x24')](_0x3bd091['options'][_0x5117('0x23')],function(_0x3d3997){return{'model':db[_0x3d3997[_0x5117('0x25')]],'as':_0x3d3997['as'],'attributes':_0x3d3997[_0x5117('0x22')],'include':_0x3d3997[_0x5117('0x23')]?_[_0x5117('0x24')](_0x3d3997[_0x5117('0x23')],function(_0x86fcb){return{'model':db[_0x86fcb['model']],'as':_0x86fcb['as'],'attributes':_0x86fcb[_0x5117('0x22')],'include':_0x86fcb[_0x5117('0x23')]?_['map'](_0x86fcb[_0x5117('0x23')],function(_0x47336b){return{'model':db[_0x47336b['model']],'as':_0x47336b['as'],'attributes':_0x47336b[_0x5117('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3c6e9e){logger[_0x5117('0x11')]('GetSmsQueue',_0x3bd091);logger[_0x5117('0x14')]('GetSmsQueue',_0x3bd091,JSON[_0x5117('0x16')](_0x3c6e9e));_0x101516(_0x3c6e9e);})['catch'](function(_0x37fe99){logger[_0x5117('0x17')](_0x5117('0x1c'),_0x37fe99[_0x5117('0x19')],_0x3bd091);_0x1e25ea(_0x3b30db[_0x5117('0x17')](0x1f4,_0x37fe99[_0x5117('0x19')]));});});};exports[_0x5117('0x26')]=function(_0x542aa7){var _0x2d75fa=this;return new Promise(function(_0x52d487,_0x44b078){return db[_0x5117('0x1d')]['find']({'raw':_0x542aa7[_0x5117('0x1f')]?_0x542aa7[_0x5117('0x1f')][_0x5117('0x20')]===undefined?!![]:![]:!![],'where':_0x542aa7['options']?_0x542aa7['options'][_0x5117('0x21')]||null:null,'attributes':_0x542aa7[_0x5117('0x1f')]?_0x542aa7[_0x5117('0x1f')]['attributes']||null:null,'include':_0x542aa7[_0x5117('0x1f')]?_0x542aa7['options'][_0x5117('0x23')]?_[_0x5117('0x24')](_0x542aa7[_0x5117('0x1f')][_0x5117('0x23')],function(_0x49e667){return{'model':db[_0x49e667[_0x5117('0x25')]],'as':_0x49e667['as'],'attributes':_0x49e667[_0x5117('0x22')],'include':_0x49e667[_0x5117('0x23')]?_[_0x5117('0x24')](_0x49e667['include'],function(_0x18b9ca){return{'model':db[_0x18b9ca[_0x5117('0x25')]],'as':_0x18b9ca['as'],'attributes':_0x18b9ca[_0x5117('0x22')],'include':_0x18b9ca['include']?_[_0x5117('0x24')](_0x18b9ca[_0x5117('0x23')],function(_0x575b37){return{'model':db[_0x575b37['model']],'as':_0x575b37['as'],'attributes':_0x575b37[_0x5117('0x22')]};}):[]};}):[]};}):[]:[]})[_0x5117('0x10')](function(_0x2d8a11){logger[_0x5117('0x11')](_0x5117('0x26'),_0x542aa7);logger['debug'](_0x5117('0x26'),_0x542aa7,JSON[_0x5117('0x16')](_0x2d8a11));_0x52d487(_0x2d8a11);})['catch'](function(_0x1043b5){logger['error']('ShowSmsQueue',_0x1043b5[_0x5117('0x19')],_0x542aa7);_0x44b078(_0x2d75fa[_0x5117('0x17')](0x1f4,_0x1043b5['message']));});});};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.socket.js b/server/api/smsQueue/smsQueue.socket.js
index 400951f..000023a 100644
--- a/server/api/smsQueue/smsQueue.socket.js
+++ b/server/api/smsQueue/smsQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaf3e=['removeListener','register','length','smsQueue:','./smsQueue.events','save','update'];(function(_0x53f608,_0x256def){var _0x495b7d=function(_0x467eab){while(--_0x467eab){_0x53f608['push'](_0x53f608['shift']());}};_0x495b7d(++_0x256def);}(_0xaf3e,0xcf));var _0xeaf3=function(_0x15a634,_0x4feb86){_0x15a634=_0x15a634-0x0;var _0xf4f7a0=_0xaf3e[_0x15a634];return _0xf4f7a0;};'use strict';var SmsQueueEvents=require(_0xeaf3('0x0'));var events=[_0xeaf3('0x1'),'remove',_0xeaf3('0x2')];function createListener(_0x4b0d1d,_0x169ca4){return function(_0x2d2fea){_0x169ca4['emit'](_0x4b0d1d,_0x2d2fea);};}function removeListener(_0x18d8a3,_0x3cd900){return function(){SmsQueueEvents[_0xeaf3('0x3')](_0x18d8a3,_0x3cd900);};}exports[_0xeaf3('0x4')]=function(_0x320838){for(var _0x5e6e69=0x0,_0x33071f=events[_0xeaf3('0x5')];_0x5e6e69<_0x33071f;_0x5e6e69++){var _0xa51f56=events[_0x5e6e69];var _0x120b24=createListener(_0xeaf3('0x6')+_0xa51f56,_0x320838);SmsQueueEvents['on'](_0xa51f56,_0x120b24);}};
\ No newline at end of file
+var _0x06f1=['register','smsQueue:','./smsQueue.events','save','remove','removeListener'];(function(_0x23c791,_0xa8bee3){var _0x57b777=function(_0x25f8c4){while(--_0x25f8c4){_0x23c791['push'](_0x23c791['shift']());}};_0x57b777(++_0xa8bee3);}(_0x06f1,0x6e));var _0x106f=function(_0x473520,_0x4afe80){_0x473520=_0x473520-0x0;var _0x2ef302=_0x06f1[_0x473520];return _0x2ef302;};'use strict';var SmsQueueEvents=require(_0x106f('0x0'));var events=[_0x106f('0x1'),_0x106f('0x2'),'update'];function createListener(_0x183aa2,_0x583c5f){return function(_0x409456){_0x583c5f['emit'](_0x183aa2,_0x409456);};}function removeListener(_0x48ef1c,_0x11ebc2){return function(){SmsQueueEvents[_0x106f('0x3')](_0x48ef1c,_0x11ebc2);};}exports[_0x106f('0x4')]=function(_0x24f34d){for(var _0x1d7e96=0x0,_0x1e7fb4=events['length'];_0x1d7e96<_0x1e7fb4;_0x1d7e96++){var _0x1c517e=events[_0x1d7e96];var _0x55d45b=createListener(_0x106f('0x5')+_0x1c517e,_0x24f34d);SmsQueueEvents['on'](_0x1c517e,_0x55d45b);}};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/index.js b/server/api/smsQueueReport/index.js
index 83a5ad5..69f8193 100644
--- a/server/api/smsQueueReport/index.js
+++ b/server/api/smsQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3cb7=['create','put','/:id','update','delete','destroy','exports','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueueReport.controller','get','isAuthenticated','/describe','describe','show','post'];(function(_0x515115,_0x53971d){var _0x386083=function(_0x10b15f){while(--_0x10b15f){_0x515115['push'](_0x515115['shift']());}};_0x386083(++_0x53971d);}(_0x3cb7,0xcf));var _0x73cb=function(_0x435ce7,_0x5bf1ef){_0x435ce7=_0x435ce7-0x0;var _0x47edc0=_0x3cb7[_0x435ce7];return _0x47edc0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x73cb('0x0'));var timeout=require('connect-timeout');var express=require(_0x73cb('0x1'));var router=express[_0x73cb('0x2')]();var auth=require(_0x73cb('0x3'));var interaction=require(_0x73cb('0x4'));var config=require(_0x73cb('0x5'));var controller=require(_0x73cb('0x6'));router[_0x73cb('0x7')]('/',auth[_0x73cb('0x8')](),controller['index']);router[_0x73cb('0x7')](_0x73cb('0x9'),auth[_0x73cb('0x8')](),controller[_0x73cb('0xa')]);router[_0x73cb('0x7')]('/:id',auth[_0x73cb('0x8')](),controller[_0x73cb('0xb')]);router[_0x73cb('0xc')]('/',auth[_0x73cb('0x8')](),controller[_0x73cb('0xd')]);router[_0x73cb('0xe')](_0x73cb('0xf'),auth['isAuthenticated'](),controller[_0x73cb('0x10')]);router[_0x73cb('0x11')](_0x73cb('0xf'),auth[_0x73cb('0x8')](),controller[_0x73cb('0x12')]);module[_0x73cb('0x13')]=router;
\ No newline at end of file
+var _0x553a=['Router','../../config/environment','isAuthenticated','/describe','describe','/:id','show','post','update','delete','destroy','exports','util','connect-timeout','express'];(function(_0x495c53,_0x5dd58b){var _0x20abe0=function(_0x29db0f){while(--_0x29db0f){_0x495c53['push'](_0x495c53['shift']());}};_0x20abe0(++_0x5dd58b);}(_0x553a,0x192));var _0xa553=function(_0x2125f0,_0x2f23b9){_0x2125f0=_0x2125f0-0x0;var _0x12d6eb=_0x553a[_0x2125f0];return _0x12d6eb;};'use strict';var multer=require('multer');var util=require(_0xa553('0x0'));var path=require('path');var timeout=require(_0xa553('0x1'));var express=require(_0xa553('0x2'));var router=express[_0xa553('0x3')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xa553('0x4'));var controller=require('./smsQueueReport.controller');router['get']('/',auth[_0xa553('0x5')](),controller['index']);router['get'](_0xa553('0x6'),auth[_0xa553('0x5')](),controller[_0xa553('0x7')]);router['get'](_0xa553('0x8'),auth['isAuthenticated'](),controller[_0xa553('0x9')]);router[_0xa553('0xa')]('/',auth[_0xa553('0x5')](),controller['create']);router['put'](_0xa553('0x8'),auth['isAuthenticated'](),controller[_0xa553('0xb')]);router[_0xa553('0xc')](_0xa553('0x8'),auth['isAuthenticated'](),controller[_0xa553('0xd')]);module[_0xa553('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.attributes.js b/server/api/smsQueueReport/smsQueueReport.attributes.js
index 606d09c..b80515d 100644
--- a/server/api/smsQueueReport/smsQueueReport.attributes.js
+++ b/server/api/smsQueueReport/smsQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd0a5=['STRING','DATE','sequelize','exports'];(function(_0x5b1aed,_0x322c17){var _0x26add8=function(_0x58a9d7){while(--_0x58a9d7){_0x5b1aed['push'](_0x5b1aed['shift']());}};_0x26add8(++_0x322c17);}(_0xd0a5,0x18a));var _0x5d0a=function(_0x58b876,_0x2d6b21){_0x58b876=_0x58b876-0x0;var _0x775c2d=_0xd0a5[_0x58b876];return _0x775c2d;};'use strict';var moment=require('moment');var Sequelize=require(_0x5d0a('0x0'));module[_0x5d0a('0x1')]={'uniqueid':{'type':Sequelize[_0x5d0a('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x5d0a('0x2')]},'joinAt':{'type':Sequelize[_0x5d0a('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x5d0a('0x3')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x1a7b=['sequelize','exports','STRING','DATE','moment'];(function(_0x5e1af8,_0xd5227e){var _0x4cbf83=function(_0x56c0c8){while(--_0x56c0c8){_0x5e1af8['push'](_0x5e1af8['shift']());}};_0x4cbf83(++_0xd5227e);}(_0x1a7b,0xea));var _0xb1a7=function(_0x4a2718,_0x2b8edb){_0x4a2718=_0x4a2718-0x0;var _0x41cddf=_0x1a7b[_0x4a2718];return _0x41cddf;};'use strict';var moment=require(_0xb1a7('0x0'));var Sequelize=require(_0xb1a7('0x1'));module[_0xb1a7('0x2')]={'uniqueid':{'type':Sequelize[_0xb1a7('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0xb1a7('0x4')]},'leaveAt':{'type':Sequelize[_0xb1a7('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0xb1a7('0x3')]}};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.controller.js b/server/api/smsQueueReport/smsQueueReport.controller.js
index 16475cf..2c7bdc5 100644
--- a/server/api/smsQueueReport/smsQueueReport.controller.js
+++ b/server/api/smsQueueReport/smsQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd5bf=['VIRTUAL','field','filter','options','includeAll','include','findAll','rows','catch','show','find','create','body','params','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','set','Content-Range','update','then','error','name','SmsQueueReport','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','merge','type','key'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xd5bf,0x173));var _0xfd5b=function(_0x47ea86,_0x4cb245){_0x47ea86=_0x47ea86-0x0;var _0x4f1026=_0xd5bf[_0x47ea86];return _0x4f1026;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xfd5b('0x0'));var rimraf=require(_0xfd5b('0x1'));var zipdir=require(_0xfd5b('0x2'));var jsonpatch=require(_0xfd5b('0x3'));var rp=require(_0xfd5b('0x4'));var moment=require(_0xfd5b('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xfd5b('0x6'));var util=require(_0xfd5b('0x7'));var path=require('path');var sox=require(_0xfd5b('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xfd5b('0x9'));var crypto=require(_0xfd5b('0xa'));var jsforce=require(_0xfd5b('0xb'));var deskjs=require(_0xfd5b('0xc'));var toCsv=require(_0xfd5b('0xd'));var querystring=require('querystring');var Papa=require(_0xfd5b('0xe'));var Redis=require(_0xfd5b('0xf'));var authService=require(_0xfd5b('0x10'));var qs=require(_0xfd5b('0x11'));var hardwareService=require(_0xfd5b('0x12'));var logger=require(_0xfd5b('0x13'))(_0xfd5b('0x14'));var utils=require(_0xfd5b('0x15'));var config=require(_0xfd5b('0x16'));var db=require(_0xfd5b('0x17'))['db'];function respondWithStatusCode(_0x156acb,_0x4aaa84){_0x4aaa84=_0x4aaa84||0xcc;return function(_0x391f5e){if(_0x391f5e){return _0x156acb[_0xfd5b('0x18')](_0x4aaa84);}return _0x156acb['status'](_0x4aaa84)[_0xfd5b('0x19')]();};}function respondWithResult(_0x19ca0e,_0xdf5abf){_0xdf5abf=_0xdf5abf||0xc8;return function(_0x48e878){if(_0x48e878){return _0x19ca0e[_0xfd5b('0x1a')](_0xdf5abf)[_0xfd5b('0x1b')](_0x48e878);}};}function respondWithFilteredResult(_0x1537d5,_0x58a0ff){return function(_0xf21820){if(_0xf21820){var _0x33367b=_0xf21820[_0xfd5b('0x1c')],_0x4389f4=_0x58a0ff[_0xfd5b('0x1d')],_0x512cf4=_0x58a0ff[_0xfd5b('0x1d')]+_0x58a0ff[_0xfd5b('0x1e')],_0x51e5e5;if(_0x512cf4>=_0x33367b){_0x512cf4=_0x33367b;_0x51e5e5=0xc8;}else{_0x51e5e5=0xce;}_0x1537d5[_0xfd5b('0x1a')](_0x51e5e5);return _0x1537d5[_0xfd5b('0x1f')](_0xfd5b('0x20'),_0x4389f4+'-'+_0x512cf4+'/'+_0x33367b)['json'](_0xf21820);}return null;};}function patchUpdates(_0x350c05){return function(_0x3d9548){try{jsonpatch['apply'](_0x3d9548,_0x350c05,!![]);}catch(_0x3fc153){return BPromise['reject'](_0x3fc153);}return _0x3d9548['save']();};}function saveUpdates(_0x10f71c,_0x37a8e6){return function(_0x1a25de){if(_0x1a25de){return _0x1a25de[_0xfd5b('0x21')](_0x10f71c)[_0xfd5b('0x22')](function(_0x33c41a){return _0x33c41a;});}return null;};}function removeEntity(_0x8056d1,_0x1b6403){return function(_0x768599){if(_0x768599){return _0x768599['destroy']()[_0xfd5b('0x22')](function(){_0x8056d1[_0xfd5b('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4fe97a,_0x439c8d){return function(_0x2b142b){if(!_0x2b142b){_0x4fe97a[_0xfd5b('0x18')](0x194);}return _0x2b142b;};}function handleError(_0x4d669f,_0x5a472d){_0x5a472d=_0x5a472d||0x1f4;return function(_0x264e52){logger[_0xfd5b('0x23')](_0x264e52['stack']);if(_0x264e52[_0xfd5b('0x24')]){delete _0x264e52['name'];}_0x4d669f[_0xfd5b('0x1a')](_0x5a472d)['send'](_0x264e52);};}exports['index']=function(_0x42b288,_0x5bc6aa){var _0x1de1d9={},_0x2b2afc={},_0x166bc5={'count':0x0,'rows':[]};var _0x31c469=db[_0xfd5b('0x25')][_0xfd5b('0x26')];_0x2b2afc[_0xfd5b('0x27')]=_[_0xfd5b('0x28')](_0x31c469);_0x2b2afc[_0xfd5b('0x29')]=_[_0xfd5b('0x28')](_0x42b288['query']);_0x2b2afc[_0xfd5b('0x2a')]=_[_0xfd5b('0x2b')](_0x2b2afc[_0xfd5b('0x27')],_0x2b2afc[_0xfd5b('0x29')]);_0x1de1d9['attributes']=_[_0xfd5b('0x2b')](_0x2b2afc['model'],qs[_0xfd5b('0x2c')](_0x42b288[_0xfd5b('0x29')]['fields']));_0x1de1d9[_0xfd5b('0x2d')]=_0x1de1d9[_0xfd5b('0x2d')][_0xfd5b('0x2e')]?_0x1de1d9[_0xfd5b('0x2d')]:_0x2b2afc[_0xfd5b('0x27')];if(!_0x42b288[_0xfd5b('0x29')][_0xfd5b('0x2f')](_0xfd5b('0x30'))){_0x1de1d9['limit']=qs['limit'](_0x42b288[_0xfd5b('0x29')][_0xfd5b('0x1e')]);_0x1de1d9['offset']=qs[_0xfd5b('0x1d')](_0x42b288[_0xfd5b('0x29')][_0xfd5b('0x1d')]);}_0x1de1d9['order']=qs[_0xfd5b('0x31')](_0x42b288[_0xfd5b('0x29')][_0xfd5b('0x31')]);_0x1de1d9[_0xfd5b('0x32')]=qs[_0xfd5b('0x2a')](_[_0xfd5b('0x33')](_0x42b288[_0xfd5b('0x29')],_0x2b2afc[_0xfd5b('0x2a')]));if(_0x42b288[_0xfd5b('0x29')]['filter']){_0x1de1d9['where']=_[_0xfd5b('0x34')](_0x1de1d9[_0xfd5b('0x32')],{'$or':_['map'](_0x31c469,function(_0x3b41a0){if(_0x3b41a0[_0xfd5b('0x35')][_0xfd5b('0x36')]!==_0xfd5b('0x37')){var _0xcf4266={};_0xcf4266[_0x3b41a0[_0xfd5b('0x38')]]={'$like':'%'+_0x42b288['query'][_0xfd5b('0x39')]+'%'};return _0xcf4266;}})});}_0x1de1d9=_[_0xfd5b('0x34')]({},_0x1de1d9,_0x42b288[_0xfd5b('0x3a')]);var _0x2cdb4a={'where':_0x1de1d9[_0xfd5b('0x32')]};return db[_0xfd5b('0x25')][_0xfd5b('0x1c')](_0x2cdb4a)['then'](function(_0x44f707){_0x166bc5[_0xfd5b('0x1c')]=_0x44f707;if(_0x42b288['query'][_0xfd5b('0x3b')]){_0x1de1d9[_0xfd5b('0x3c')]=[{'all':!![]}];}return db['SmsQueueReport'][_0xfd5b('0x3d')](_0x1de1d9);})[_0xfd5b('0x22')](function(_0x31ffe6){_0x166bc5[_0xfd5b('0x3e')]=_0x31ffe6;return _0x166bc5;})[_0xfd5b('0x22')](respondWithFilteredResult(_0x5bc6aa,_0x1de1d9))[_0xfd5b('0x3f')](handleError(_0x5bc6aa,null));};exports[_0xfd5b('0x40')]=function(_0x26cceb,_0x5acb06){var _0x1f243f={'raw':!![],'where':{'id':_0x26cceb['params']['id']}},_0x2ecec2={};_0x2ecec2[_0xfd5b('0x27')]=_[_0xfd5b('0x28')](db[_0xfd5b('0x25')]['rawAttributes']);_0x2ecec2[_0xfd5b('0x29')]=_[_0xfd5b('0x28')](_0x26cceb[_0xfd5b('0x29')]);_0x2ecec2[_0xfd5b('0x2a')]=_[_0xfd5b('0x2b')](_0x2ecec2['model'],_0x2ecec2['query']);_0x1f243f['attributes']=_[_0xfd5b('0x2b')](_0x2ecec2[_0xfd5b('0x27')],qs['fields'](_0x26cceb['query'][_0xfd5b('0x2c')]));_0x1f243f[_0xfd5b('0x2d')]=_0x1f243f['attributes']['length']?_0x1f243f[_0xfd5b('0x2d')]:_0x2ecec2[_0xfd5b('0x27')];if(_0x26cceb['query'][_0xfd5b('0x3b')]){_0x1f243f[_0xfd5b('0x3c')]=[{'all':!![]}];}_0x1f243f=_['merge']({},_0x1f243f,_0x26cceb['options']);return db[_0xfd5b('0x25')][_0xfd5b('0x41')](_0x1f243f)[_0xfd5b('0x22')](handleEntityNotFound(_0x5acb06,null))['then'](respondWithResult(_0x5acb06,null))[_0xfd5b('0x3f')](handleError(_0x5acb06,null));};exports[_0xfd5b('0x42')]=function(_0x25bd75,_0x899697){return db[_0xfd5b('0x25')][_0xfd5b('0x42')](_0x25bd75[_0xfd5b('0x43')],{})[_0xfd5b('0x22')](respondWithResult(_0x899697,0xc9))[_0xfd5b('0x3f')](handleError(_0x899697,null));};exports['update']=function(_0x375ff8,_0xc621e9){if(_0x375ff8[_0xfd5b('0x43')]['id']){delete _0x375ff8[_0xfd5b('0x43')]['id'];}return db['SmsQueueReport'][_0xfd5b('0x41')]({'where':{'id':_0x375ff8[_0xfd5b('0x44')]['id']}})[_0xfd5b('0x22')](handleEntityNotFound(_0xc621e9,null))[_0xfd5b('0x22')](saveUpdates(_0x375ff8[_0xfd5b('0x43')],null))['then'](respondWithResult(_0xc621e9,null))[_0xfd5b('0x3f')](handleError(_0xc621e9,null));};exports[_0xfd5b('0x45')]=function(_0x15651d,_0x17fe20){return db[_0xfd5b('0x25')][_0xfd5b('0x41')]({'where':{'id':_0x15651d[_0xfd5b('0x44')]['id']}})['then'](handleEntityNotFound(_0x17fe20,null))[_0xfd5b('0x22')](removeEntity(_0x17fe20,null))[_0xfd5b('0x3f')](handleError(_0x17fe20,null));};exports['describe']=function(_0x2839ee,_0x43cbcd){return db[_0xfd5b('0x25')][_0xfd5b('0x46')]()[_0xfd5b('0x22')](respondWithResult(_0x43cbcd,null))[_0xfd5b('0x3f')](handleError(_0x43cbcd,null));};
\ No newline at end of file
+var _0xed5e=['catch','show','params','includeAll','include','options','find','create','body','destroy','describe','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','limit','set','json','apply','reject','save','update','then','end','stack','name','send','index','SmsQueueReport','rawAttributes','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','where','filters','pick','filter','merge','map','type','key','field','count','findAll','rows'];(function(_0x22a33a,_0x4a7487){var _0x2d0a92=function(_0x4c27e2){while(--_0x4c27e2){_0x22a33a['push'](_0x22a33a['shift']());}};_0x2d0a92(++_0x4a7487);}(_0xed5e,0xec));var _0xeed5=function(_0x2bdc9d,_0x5ef92b){_0x2bdc9d=_0x2bdc9d-0x0;var _0x1ac0ba=_0xed5e[_0x2bdc9d];return _0x1ac0ba;};'use strict';var pdf=require(_0xeed5('0x0'));var emlformat=require(_0xeed5('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xeed5('0x2'));var jsonpatch=require(_0xeed5('0x3'));var rp=require(_0xeed5('0x4'));var moment=require(_0xeed5('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xeed5('0x6'));var util=require('util');var path=require(_0xeed5('0x7'));var sox=require(_0xeed5('0x8'));var csv=require(_0xeed5('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xeed5('0xa'));var squel=require(_0xeed5('0xb'));var crypto=require(_0xeed5('0xc'));var jsforce=require(_0xeed5('0xd'));var deskjs=require(_0xeed5('0xe'));var toCsv=require('to-csv');var querystring=require(_0xeed5('0xf'));var Papa=require(_0xeed5('0x10'));var Redis=require(_0xeed5('0x11'));var authService=require(_0xeed5('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xeed5('0x13'))(_0xeed5('0x14'));var utils=require(_0xeed5('0x15'));var config=require(_0xeed5('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5cf145,_0x3ad41c){_0x3ad41c=_0x3ad41c||0xcc;return function(_0x3b4ce2){if(_0x3b4ce2){return _0x5cf145[_0xeed5('0x17')](_0x3ad41c);}return _0x5cf145['status'](_0x3ad41c)['end']();};}function respondWithResult(_0x3f65e0,_0x9e23cf){_0x9e23cf=_0x9e23cf||0xc8;return function(_0x81a1bc){if(_0x81a1bc){return _0x3f65e0[_0xeed5('0x18')](_0x9e23cf)['json'](_0x81a1bc);}};}function respondWithFilteredResult(_0x253e42,_0x325af3){return function(_0x2145da){if(_0x2145da){var _0x28893d=_0x2145da['count'],_0x32cf64=_0x325af3['offset'],_0x5afdf6=_0x325af3['offset']+_0x325af3[_0xeed5('0x19')],_0x53727f;if(_0x5afdf6>=_0x28893d){_0x5afdf6=_0x28893d;_0x53727f=0xc8;}else{_0x53727f=0xce;}_0x253e42[_0xeed5('0x18')](_0x53727f);return _0x253e42[_0xeed5('0x1a')]('Content-Range',_0x32cf64+'-'+_0x5afdf6+'/'+_0x28893d)[_0xeed5('0x1b')](_0x2145da);}return null;};}function patchUpdates(_0x1eaddd){return function(_0xb2af45){try{jsonpatch[_0xeed5('0x1c')](_0xb2af45,_0x1eaddd,!![]);}catch(_0x47211f){return BPromise[_0xeed5('0x1d')](_0x47211f);}return _0xb2af45[_0xeed5('0x1e')]();};}function saveUpdates(_0x410632,_0x1000a7){return function(_0x1a308e){if(_0x1a308e){return _0x1a308e[_0xeed5('0x1f')](_0x410632)[_0xeed5('0x20')](function(_0x17f0ea){return _0x17f0ea;});}return null;};}function removeEntity(_0x403f61,_0x133e91){return function(_0x54544e){if(_0x54544e){return _0x54544e['destroy']()['then'](function(){_0x403f61[_0xeed5('0x18')](0xcc)[_0xeed5('0x21')]();});}};}function handleEntityNotFound(_0xfd36da,_0x2168c1){return function(_0x4b7ce0){if(!_0x4b7ce0){_0xfd36da['sendStatus'](0x194);}return _0x4b7ce0;};}function handleError(_0x1eb54b,_0x38ca2f){_0x38ca2f=_0x38ca2f||0x1f4;return function(_0x48bd7b){logger['error'](_0x48bd7b[_0xeed5('0x22')]);if(_0x48bd7b[_0xeed5('0x23')]){delete _0x48bd7b[_0xeed5('0x23')];}_0x1eb54b['status'](_0x38ca2f)[_0xeed5('0x24')](_0x48bd7b);};}exports[_0xeed5('0x25')]=function(_0x52a69e,_0x198bd7){var _0x597131={},_0x2f6d20={},_0x8b6558={'count':0x0,'rows':[]};var _0x15b6fa=db[_0xeed5('0x26')][_0xeed5('0x27')];_0x2f6d20['model']=_['keys'](_0x15b6fa);_0x2f6d20[_0xeed5('0x28')]=_[_0xeed5('0x29')](_0x52a69e[_0xeed5('0x28')]);_0x2f6d20['filters']=_[_0xeed5('0x2a')](_0x2f6d20[_0xeed5('0x2b')],_0x2f6d20[_0xeed5('0x28')]);_0x597131[_0xeed5('0x2c')]=_[_0xeed5('0x2a')](_0x2f6d20['model'],qs[_0xeed5('0x2d')](_0x52a69e[_0xeed5('0x28')][_0xeed5('0x2d')]));_0x597131[_0xeed5('0x2c')]=_0x597131[_0xeed5('0x2c')][_0xeed5('0x2e')]?_0x597131[_0xeed5('0x2c')]:_0x2f6d20['model'];if(!_0x52a69e[_0xeed5('0x28')][_0xeed5('0x2f')](_0xeed5('0x30'))){_0x597131[_0xeed5('0x19')]=qs[_0xeed5('0x19')](_0x52a69e[_0xeed5('0x28')]['limit']);_0x597131[_0xeed5('0x31')]=qs[_0xeed5('0x31')](_0x52a69e[_0xeed5('0x28')][_0xeed5('0x31')]);}_0x597131[_0xeed5('0x32')]=qs[_0xeed5('0x33')](_0x52a69e[_0xeed5('0x28')][_0xeed5('0x33')]);_0x597131[_0xeed5('0x34')]=qs[_0xeed5('0x35')](_[_0xeed5('0x36')](_0x52a69e[_0xeed5('0x28')],_0x2f6d20[_0xeed5('0x35')]));if(_0x52a69e[_0xeed5('0x28')][_0xeed5('0x37')]){_0x597131[_0xeed5('0x34')]=_[_0xeed5('0x38')](_0x597131[_0xeed5('0x34')],{'$or':_[_0xeed5('0x39')](_0x15b6fa,function(_0x4a2770){if(_0x4a2770[_0xeed5('0x3a')][_0xeed5('0x3b')]!=='VIRTUAL'){var _0x2ffac8={};_0x2ffac8[_0x4a2770[_0xeed5('0x3c')]]={'$like':'%'+_0x52a69e[_0xeed5('0x28')][_0xeed5('0x37')]+'%'};return _0x2ffac8;}})});}_0x597131=_['merge']({},_0x597131,_0x52a69e['options']);var _0xabbe3d={'where':_0x597131[_0xeed5('0x34')]};return db['SmsQueueReport'][_0xeed5('0x3d')](_0xabbe3d)[_0xeed5('0x20')](function(_0x5a9f4f){_0x8b6558['count']=_0x5a9f4f;if(_0x52a69e[_0xeed5('0x28')]['includeAll']){_0x597131['include']=[{'all':!![]}];}return db[_0xeed5('0x26')][_0xeed5('0x3e')](_0x597131);})[_0xeed5('0x20')](function(_0x4217d4){_0x8b6558[_0xeed5('0x3f')]=_0x4217d4;return _0x8b6558;})['then'](respondWithFilteredResult(_0x198bd7,_0x597131))[_0xeed5('0x40')](handleError(_0x198bd7,null));};exports[_0xeed5('0x41')]=function(_0x460547,_0x52e24e){var _0x5416ee={'raw':!![],'where':{'id':_0x460547[_0xeed5('0x42')]['id']}},_0x5cd95e={};_0x5cd95e[_0xeed5('0x2b')]=_[_0xeed5('0x29')](db['SmsQueueReport'][_0xeed5('0x27')]);_0x5cd95e['query']=_[_0xeed5('0x29')](_0x460547[_0xeed5('0x28')]);_0x5cd95e[_0xeed5('0x35')]=_[_0xeed5('0x2a')](_0x5cd95e[_0xeed5('0x2b')],_0x5cd95e['query']);_0x5416ee['attributes']=_['intersection'](_0x5cd95e[_0xeed5('0x2b')],qs[_0xeed5('0x2d')](_0x460547[_0xeed5('0x28')][_0xeed5('0x2d')]));_0x5416ee[_0xeed5('0x2c')]=_0x5416ee[_0xeed5('0x2c')][_0xeed5('0x2e')]?_0x5416ee[_0xeed5('0x2c')]:_0x5cd95e['model'];if(_0x460547[_0xeed5('0x28')][_0xeed5('0x43')]){_0x5416ee[_0xeed5('0x44')]=[{'all':!![]}];}_0x5416ee=_[_0xeed5('0x38')]({},_0x5416ee,_0x460547[_0xeed5('0x45')]);return db[_0xeed5('0x26')][_0xeed5('0x46')](_0x5416ee)[_0xeed5('0x20')](handleEntityNotFound(_0x52e24e,null))['then'](respondWithResult(_0x52e24e,null))[_0xeed5('0x40')](handleError(_0x52e24e,null));};exports[_0xeed5('0x47')]=function(_0x4682b0,_0x234e9d){return db['SmsQueueReport'][_0xeed5('0x47')](_0x4682b0[_0xeed5('0x48')],{})[_0xeed5('0x20')](respondWithResult(_0x234e9d,0xc9))[_0xeed5('0x40')](handleError(_0x234e9d,null));};exports['update']=function(_0x38ef1e,_0x416f47){if(_0x38ef1e[_0xeed5('0x48')]['id']){delete _0x38ef1e[_0xeed5('0x48')]['id'];}return db[_0xeed5('0x26')][_0xeed5('0x46')]({'where':{'id':_0x38ef1e['params']['id']}})[_0xeed5('0x20')](handleEntityNotFound(_0x416f47,null))[_0xeed5('0x20')](saveUpdates(_0x38ef1e[_0xeed5('0x48')],null))[_0xeed5('0x20')](respondWithResult(_0x416f47,null))['catch'](handleError(_0x416f47,null));};exports[_0xeed5('0x49')]=function(_0x3fcab9,_0x2eaaa8){return db['SmsQueueReport'][_0xeed5('0x46')]({'where':{'id':_0x3fcab9[_0xeed5('0x42')]['id']}})[_0xeed5('0x20')](handleEntityNotFound(_0x2eaaa8,null))[_0xeed5('0x20')](removeEntity(_0x2eaaa8,null))[_0xeed5('0x40')](handleError(_0x2eaaa8,null));};exports[_0xeed5('0x4a')]=function(_0x2e6f9e,_0xd81348){return db[_0xeed5('0x26')][_0xeed5('0x4a')]()[_0xeed5('0x20')](respondWithResult(_0xd81348,null))['catch'](handleError(_0xd81348,null));};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.model.js b/server/api/smsQueueReport/smsQueueReport.model.js
index 23f3c80..1d8281a 100644
--- a/server/api/smsQueueReport/smsQueueReport.model.js
+++ b/server/api/smsQueueReport/smsQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc5af=['lodash','util','../../config/logger','api','bluebird','request-promise','path','./smsQueueReport.attributes','exports','SmsQueueReport','report_sms_queue'];(function(_0x247410,_0x300a2d){var _0x52f5e3=function(_0x36df1c){while(--_0x36df1c){_0x247410['push'](_0x247410['shift']());}};_0x52f5e3(++_0x300a2d);}(_0xc5af,0x155));var _0xfc5a=function(_0x51566a,_0x4f96bc){_0x51566a=_0x51566a-0x0;var _0x152159=_0xc5af[_0x51566a];return _0x152159;};'use strict';var _=require(_0xfc5a('0x0'));var util=require(_0xfc5a('0x1'));var logger=require(_0xfc5a('0x2'))(_0xfc5a('0x3'));var moment=require('moment');var BPromise=require(_0xfc5a('0x4'));var rp=require(_0xfc5a('0x5'));var fs=require('fs');var path=require(_0xfc5a('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xfc5a('0x7'));module[_0xfc5a('0x8')]=function(_0x4ada5d,_0x1c0d8f){return _0x4ada5d['define'](_0xfc5a('0x9'),attributes,{'tableName':_0xfc5a('0xa'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd5cc=['../../config/logger','api','moment','bluebird','path','./smsQueueReport.attributes','exports','define','SmsQueueReport','report_sms_queue','uniqueid','lodash','util'];(function(_0x4c105c,_0x495f0a){var _0x375b1d=function(_0x5206f5){while(--_0x5206f5){_0x4c105c['push'](_0x4c105c['shift']());}};_0x375b1d(++_0x495f0a);}(_0xd5cc,0x129));var _0xcd5c=function(_0x40e370,_0x4f7ecb){_0x40e370=_0x40e370-0x0;var _0x5971f2=_0xd5cc[_0x40e370];return _0x5971f2;};'use strict';var _=require(_0xcd5c('0x0'));var util=require(_0xcd5c('0x1'));var logger=require(_0xcd5c('0x2'))(_0xcd5c('0x3'));var moment=require(_0xcd5c('0x4'));var BPromise=require(_0xcd5c('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcd5c('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xcd5c('0x7'));module[_0xcd5c('0x8')]=function(_0x358330,_0x342686){return _0x358330[_0xcd5c('0x9')](_0xcd5c('0xa'),attributes,{'tableName':_0xcd5c('0xb'),'paranoid':![],'indexes':[{'name':_0xcd5c('0xc'),'fields':[_0xcd5c('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.rpc.js b/server/api/smsQueueReport/smsQueueReport.rpc.js
index b482f80..7b06c0d 100644
--- a/server/api/smsQueueReport/smsQueueReport.rpc.js
+++ b/server/api/smsQueueReport/smsQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7429=['SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateSmsQueueReport','SmsQueueReport','create','options','UpdateSmsQueueReport','update','body','attributes','limit','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/environment','jayson/promise','client','request','then'];(function(_0x2a4f7d,_0x1974f7){var _0x1fd5b6=function(_0x1346dc){while(--_0x1346dc){_0x2a4f7d['push'](_0x2a4f7d['shift']());}};_0x1fd5b6(++_0x1974f7);}(_0x7429,0x1c6));var _0x9742=function(_0x298219,_0x440eb3){_0x298219=_0x298219-0x0;var _0x2b0199=_0x7429[_0x298219];return _0x2b0199;};'use strict';var _=require(_0x9742('0x0'));var util=require(_0x9742('0x1'));var moment=require(_0x9742('0x2'));var BPromise=require(_0x9742('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9742('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x9742('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x9742('0x6'));var jayson=require(_0x9742('0x7'));var client=jayson[_0x9742('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0xc7ca69,_0x168b17,_0x50e490){return new BPromise(function(_0x468341,_0xf06e5e){return client[_0x9742('0x9')](_0xc7ca69,_0x50e490)[_0x9742('0xa')](function(_0x48975e){logger['info'](_0x9742('0xb'),_0x168b17,_0x9742('0xc'));logger[_0x9742('0xd')](_0x9742('0xe'),_0x168b17,_0x9742('0xc'),JSON[_0x9742('0xf')](_0x48975e));if(_0x48975e[_0x9742('0x10')]){if(_0x48975e[_0x9742('0x10')][_0x9742('0x11')]===0x1f4){logger[_0x9742('0x10')](_0x9742('0xb'),_0x168b17,_0x48975e[_0x9742('0x10')][_0x9742('0x12')]);return _0xf06e5e(_0x48975e[_0x9742('0x10')]['message']);}logger['error']('SmsQueueReport,\x20%s,\x20%s',_0x168b17,_0x48975e[_0x9742('0x10')][_0x9742('0x12')]);return _0x468341(_0x48975e[_0x9742('0x10')][_0x9742('0x12')]);}else{logger[_0x9742('0x13')](_0x9742('0xb'),_0x168b17,'request\x20sent');_0x468341(_0x48975e[_0x9742('0x14')][_0x9742('0x12')]);}})[_0x9742('0x15')](function(_0x27b1ab){logger[_0x9742('0x10')]('SmsQueueReport,\x20%s,\x20%s',_0x168b17,_0x27b1ab);_0xf06e5e(_0x27b1ab);});});}exports[_0x9742('0x16')]=function(_0x5bf303){var _0x53f8a1=this;return new Promise(function(_0x116a7e,_0x8244e2){return db[_0x9742('0x17')][_0x9742('0x18')](_0x5bf303['body'],{'raw':_0x5bf303[_0x9742('0x19')]?_0x5bf303['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0xceea17){logger[_0x9742('0x13')](_0x9742('0x16'),_0x5bf303);logger[_0x9742('0xd')](_0x9742('0x16'),_0x5bf303,JSON[_0x9742('0xf')](_0xceea17));_0x116a7e(_0xceea17);})[_0x9742('0x15')](function(_0x2bea73){logger[_0x9742('0x10')](_0x9742('0x16'),_0x2bea73[_0x9742('0x12')],_0x5bf303);_0x8244e2(_0x53f8a1[_0x9742('0x10')](0x1f4,_0x2bea73[_0x9742('0x12')]));});});};exports[_0x9742('0x1a')]=function(_0x1c735b){var _0x590ad6=this;return new Promise(function(_0x49cd26,_0x25fa0f){return db[_0x9742('0x17')][_0x9742('0x1b')](_0x1c735b[_0x9742('0x1c')],{'raw':_0x1c735b[_0x9742('0x19')]?_0x1c735b[_0x9742('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1c735b['options']?_0x1c735b[_0x9742('0x19')]['where']||null:null,'attributes':_0x1c735b[_0x9742('0x19')]?_0x1c735b[_0x9742('0x19')][_0x9742('0x1d')]||null:null,'limit':_0x1c735b[_0x9742('0x19')]?_0x1c735b[_0x9742('0x19')][_0x9742('0x1e')]||null:null})[_0x9742('0xa')](function(_0x2a1fde){logger[_0x9742('0x13')](_0x9742('0x1a'),_0x1c735b);logger[_0x9742('0xd')](_0x9742('0x1a'),_0x1c735b,JSON[_0x9742('0xf')](_0x2a1fde));_0x49cd26(_0x2a1fde);})[_0x9742('0x15')](function(_0x433422){logger[_0x9742('0x10')]('UpdateSmsQueueReport',_0x433422['message'],_0x1c735b);_0x25fa0f(_0x590ad6[_0x9742('0x10')](0x1f4,_0x433422['message']));});});};
\ No newline at end of file
+var _0x9c9f=['body','options','debug','UpdateSmsQueueReport','update','raw','where','attributes','limit','stringify','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','SmsQueueReport,\x20%s,\x20%s,\x20%s','error','message','result','CreateSmsQueueReport','SmsQueueReport','create'];(function(_0x3d62fa,_0x39022c){var _0x521629=function(_0x512234){while(--_0x512234){_0x3d62fa['push'](_0x3d62fa['shift']());}};_0x521629(++_0x39022c);}(_0x9c9f,0xd1));var _0xf9c9=function(_0x36b503,_0x31364a){_0x36b503=_0x36b503-0x0;var _0x1c2c30=_0x9c9f[_0x36b503];return _0x1c2c30;};'use strict';var _=require(_0xf9c9('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf9c9('0x1'));var rs=require(_0xf9c9('0x2'));var fs=require('fs');var Redis=require(_0xf9c9('0x3'));var db=require(_0xf9c9('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf9c9('0x5'))(_0xf9c9('0x6'));var config=require(_0xf9c9('0x7'));var jayson=require(_0xf9c9('0x8'));var client=jayson[_0xf9c9('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1cada1,_0x16b032,_0x8ea905){return new BPromise(function(_0x13e2b9,_0x7dc248){return client[_0xf9c9('0xa')](_0x1cada1,_0x8ea905)[_0xf9c9('0xb')](function(_0x1fca0c){logger[_0xf9c9('0xc')](_0xf9c9('0xd'),_0x16b032,_0xf9c9('0xe'));logger['debug'](_0xf9c9('0xf'),_0x16b032,_0xf9c9('0xe'),JSON['stringify'](_0x1fca0c));if(_0x1fca0c['error']){if(_0x1fca0c[_0xf9c9('0x10')]['code']===0x1f4){logger[_0xf9c9('0x10')]('SmsQueueReport,\x20%s,\x20%s',_0x16b032,_0x1fca0c['error']['message']);return _0x7dc248(_0x1fca0c['error'][_0xf9c9('0x11')]);}logger['error']('SmsQueueReport,\x20%s,\x20%s',_0x16b032,_0x1fca0c[_0xf9c9('0x10')]['message']);return _0x13e2b9(_0x1fca0c[_0xf9c9('0x10')][_0xf9c9('0x11')]);}else{logger[_0xf9c9('0xc')](_0xf9c9('0xd'),_0x16b032,_0xf9c9('0xe'));_0x13e2b9(_0x1fca0c[_0xf9c9('0x12')][_0xf9c9('0x11')]);}})['catch'](function(_0x108f1e){logger[_0xf9c9('0x10')](_0xf9c9('0xd'),_0x16b032,_0x108f1e);_0x7dc248(_0x108f1e);});});}exports[_0xf9c9('0x13')]=function(_0x478458){var _0x2b54ec=this;return new Promise(function(_0x10aa4d,_0x4e3760){return db[_0xf9c9('0x14')][_0xf9c9('0x15')](_0x478458[_0xf9c9('0x16')],{'raw':_0x478458[_0xf9c9('0x17')]?_0x478458[_0xf9c9('0x17')]['raw']===undefined?!![]:![]:!![]})[_0xf9c9('0xb')](function(_0xbc3969){logger['info'](_0xf9c9('0x13'),_0x478458);logger[_0xf9c9('0x18')](_0xf9c9('0x13'),_0x478458,JSON['stringify'](_0xbc3969));_0x10aa4d(_0xbc3969);})['catch'](function(_0x33e44f){logger[_0xf9c9('0x10')](_0xf9c9('0x13'),_0x33e44f['message'],_0x478458);_0x4e3760(_0x2b54ec[_0xf9c9('0x10')](0x1f4,_0x33e44f[_0xf9c9('0x11')]));});});};exports[_0xf9c9('0x19')]=function(_0xda99b7){var _0x3604ea=this;return new Promise(function(_0x16dcd7,_0x4c9843){return db[_0xf9c9('0x14')][_0xf9c9('0x1a')](_0xda99b7[_0xf9c9('0x16')],{'raw':_0xda99b7[_0xf9c9('0x17')]?_0xda99b7['options'][_0xf9c9('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xda99b7['options']?_0xda99b7[_0xf9c9('0x17')][_0xf9c9('0x1c')]||null:null,'attributes':_0xda99b7['options']?_0xda99b7[_0xf9c9('0x17')][_0xf9c9('0x1d')]||null:null,'limit':_0xda99b7[_0xf9c9('0x17')]?_0xda99b7[_0xf9c9('0x17')][_0xf9c9('0x1e')]||null:null})[_0xf9c9('0xb')](function(_0x4c41be){logger[_0xf9c9('0xc')](_0xf9c9('0x19'),_0xda99b7);logger[_0xf9c9('0x18')](_0xf9c9('0x19'),_0xda99b7,JSON[_0xf9c9('0x1f')](_0x4c41be));_0x16dcd7(_0x4c41be);})[_0xf9c9('0x20')](function(_0x3f52d3){logger[_0xf9c9('0x10')](_0xf9c9('0x19'),_0x3f52d3[_0xf9c9('0x11')],_0xda99b7);_0x4c9843(_0x3604ea[_0xf9c9('0x10')](0x1f4,_0x3f52d3[_0xf9c9('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/index.js b/server/api/smsTransferReport/index.js
index 70629d7..b61bdc2 100644
--- a/server/api/smsTransferReport/index.js
+++ b/server/api/smsTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4650=['../../components/auth/service','../../components/interaction/service','../../config/environment','./smsTransferReport.controller','get','isAuthenticated','/describe','describe','/:id','post','create','put','update','destroy','exports','multer','util','connect-timeout','Router'];(function(_0x7c9f16,_0x1a5b08){var _0x5a9326=function(_0x2144b3){while(--_0x2144b3){_0x7c9f16['push'](_0x7c9f16['shift']());}};_0x5a9326(++_0x1a5b08);}(_0x4650,0x119));var _0x0465=function(_0x37d7f9,_0x1db79b){_0x37d7f9=_0x37d7f9-0x0;var _0x1f03a6=_0x4650[_0x37d7f9];return _0x1f03a6;};'use strict';var multer=require(_0x0465('0x0'));var util=require(_0x0465('0x1'));var path=require('path');var timeout=require(_0x0465('0x2'));var express=require('express');var router=express[_0x0465('0x3')]();var auth=require(_0x0465('0x4'));var interaction=require(_0x0465('0x5'));var config=require(_0x0465('0x6'));var controller=require(_0x0465('0x7'));router[_0x0465('0x8')]('/',auth[_0x0465('0x9')](),controller['index']);router[_0x0465('0x8')](_0x0465('0xa'),auth[_0x0465('0x9')](),controller[_0x0465('0xb')]);router[_0x0465('0x8')](_0x0465('0xc'),auth[_0x0465('0x9')](),controller['show']);router[_0x0465('0xd')]('/',auth['isAuthenticated'](),controller[_0x0465('0xe')]);router[_0x0465('0xf')](_0x0465('0xc'),auth[_0x0465('0x9')](),controller[_0x0465('0x10')]);router['delete'](_0x0465('0xc'),auth[_0x0465('0x9')](),controller[_0x0465('0x11')]);module[_0x0465('0x12')]=router;
\ No newline at end of file
+var _0x9b97=['exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','/:id','show','post','put','update','delete','destroy'];(function(_0x2a3d1f,_0x15ae1e){var _0x4ccd89=function(_0x43a17c){while(--_0x43a17c){_0x2a3d1f['push'](_0x2a3d1f['shift']());}};_0x4ccd89(++_0x15ae1e);}(_0x9b97,0x11e));var _0x79b9=function(_0x24fd40,_0x4d05ac){_0x24fd40=_0x24fd40-0x0;var _0x164173=_0x9b97[_0x24fd40];return _0x164173;};'use strict';var multer=require(_0x79b9('0x0'));var util=require('util');var path=require(_0x79b9('0x1'));var timeout=require(_0x79b9('0x2'));var express=require(_0x79b9('0x3'));var router=express[_0x79b9('0x4')]();var auth=require(_0x79b9('0x5'));var interaction=require(_0x79b9('0x6'));var config=require('../../config/environment');var controller=require('./smsTransferReport.controller');router[_0x79b9('0x7')]('/',auth[_0x79b9('0x8')](),controller[_0x79b9('0x9')]);router['get'](_0x79b9('0xa'),auth[_0x79b9('0x8')](),controller['describe']);router[_0x79b9('0x7')](_0x79b9('0xb'),auth[_0x79b9('0x8')](),controller[_0x79b9('0xc')]);router[_0x79b9('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0x79b9('0xe')](_0x79b9('0xb'),auth[_0x79b9('0x8')](),controller[_0x79b9('0xf')]);router[_0x79b9('0x10')](_0x79b9('0xb'),auth[_0x79b9('0x8')](),controller[_0x79b9('0x11')]);module[_0x79b9('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.attributes.js b/server/api/smsTransferReport/smsTransferReport.attributes.js
index 210be86..d7e1ac8 100644
--- a/server/api/smsTransferReport/smsTransferReport.attributes.js
+++ b/server/api/smsTransferReport/smsTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9236=['ENUM','account','agent','queue','DATE','moment','sequelize','STRING'];(function(_0x153846,_0x1227ad){var _0x3ee557=function(_0x514e76){while(--_0x514e76){_0x153846['push'](_0x153846['shift']());}};_0x3ee557(++_0x1227ad);}(_0x9236,0xf5));var _0x6923=function(_0x51eb18,_0x2478b3){_0x51eb18=_0x51eb18-0x0;var _0x57dc15=_0x9236[_0x51eb18];return _0x57dc15;};'use strict';var moment=require(_0x6923('0x0'));var Sequelize=require(_0x6923('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x6923('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x6923('0x3')](_0x6923('0x4'),_0x6923('0x5'),_0x6923('0x6')),'allowNull':![],'defaultValue':_0x6923('0x6')},'transferredAt':{'type':Sequelize[_0x6923('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
+var _0x5cc5=['exports','ENUM','account','DATE','NOW','moment','sequelize'];(function(_0x3c5e8b,_0x17513d){var _0x1784b6=function(_0x31cb23){while(--_0x31cb23){_0x3c5e8b['push'](_0x3c5e8b['shift']());}};_0x1784b6(++_0x17513d);}(_0x5cc5,0xfa));var _0x55cc=function(_0x2601b4,_0x315e78){_0x2601b4=_0x2601b4-0x0;var _0x3e3661=_0x5cc5[_0x2601b4];return _0x3e3661;};'use strict';var moment=require(_0x55cc('0x0'));var Sequelize=require(_0x55cc('0x1'));module[_0x55cc('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x55cc('0x3')](_0x55cc('0x4'),'agent','queue'),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0x55cc('0x5')],'allowNull':![],'defaultValue':Sequelize[_0x55cc('0x6')]}};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.controller.js b/server/api/smsTransferReport/smsTransferReport.controller.js
index b4c2ee3..a48538b 100644
--- a/server/api/smsTransferReport/smsTransferReport.controller.js
+++ b/server/api/smsTransferReport/smsTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcd59=['order','sort','where','pick','filter','merge','map','type','VIRTUAL','options','SmsTransferReport','includeAll','include','findAll','rows','catch','show','params','length','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','reject','save','update','then','destroy','error','stack','name','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','nolimit','limit'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0xcd59,0x14b));var _0x9cd5=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xcd59[_0x5447fd];return _0x15b28a;};'use strict';var pdf=require(_0x9cd5('0x0'));var emlformat=require(_0x9cd5('0x1'));var rimraf=require(_0x9cd5('0x2'));var zipdir=require(_0x9cd5('0x3'));var jsonpatch=require(_0x9cd5('0x4'));var rp=require(_0x9cd5('0x5'));var moment=require('moment');var BPromise=require(_0x9cd5('0x6'));var Mustache=require(_0x9cd5('0x7'));var util=require(_0x9cd5('0x8'));var path=require(_0x9cd5('0x9'));var sox=require(_0x9cd5('0xa'));var csv=require(_0x9cd5('0xb'));var ejs=require(_0x9cd5('0xc'));var fs=require('fs');var _=require(_0x9cd5('0xd'));var squel=require(_0x9cd5('0xe'));var crypto=require(_0x9cd5('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x9cd5('0x10'));var toCsv=require(_0x9cd5('0xb'));var querystring=require(_0x9cd5('0x11'));var Papa=require(_0x9cd5('0x12'));var Redis=require(_0x9cd5('0x13'));var authService=require(_0x9cd5('0x14'));var qs=require(_0x9cd5('0x15'));var hardwareService=require(_0x9cd5('0x16'));var logger=require('../../config/logger')(_0x9cd5('0x17'));var utils=require(_0x9cd5('0x18'));var config=require(_0x9cd5('0x19'));var db=require(_0x9cd5('0x1a'))['db'];function respondWithStatusCode(_0x508c12,_0x58d6de){_0x58d6de=_0x58d6de||0xcc;return function(_0x2c9cf1){if(_0x2c9cf1){return _0x508c12[_0x9cd5('0x1b')](_0x58d6de);}return _0x508c12[_0x9cd5('0x1c')](_0x58d6de)[_0x9cd5('0x1d')]();};}function respondWithResult(_0x2ccc05,_0x2a1606){_0x2a1606=_0x2a1606||0xc8;return function(_0x52698b){if(_0x52698b){return _0x2ccc05[_0x9cd5('0x1c')](_0x2a1606)[_0x9cd5('0x1e')](_0x52698b);}};}function respondWithFilteredResult(_0x21d768,_0x4b9ac8){return function(_0x541cb8){if(_0x541cb8){var _0x5c4f3d=_0x541cb8[_0x9cd5('0x1f')],_0x258305=_0x4b9ac8[_0x9cd5('0x20')],_0x1ea3f7=_0x4b9ac8[_0x9cd5('0x20')]+_0x4b9ac8['limit'],_0x565db7;if(_0x1ea3f7>=_0x5c4f3d){_0x1ea3f7=_0x5c4f3d;_0x565db7=0xc8;}else{_0x565db7=0xce;}_0x21d768[_0x9cd5('0x1c')](_0x565db7);return _0x21d768[_0x9cd5('0x21')](_0x9cd5('0x22'),_0x258305+'-'+_0x1ea3f7+'/'+_0x5c4f3d)[_0x9cd5('0x1e')](_0x541cb8);}return null;};}function patchUpdates(_0x21da57){return function(_0x1ff788){try{jsonpatch['apply'](_0x1ff788,_0x21da57,!![]);}catch(_0x37ea13){return BPromise[_0x9cd5('0x23')](_0x37ea13);}return _0x1ff788[_0x9cd5('0x24')]();};}function saveUpdates(_0xb97394,_0x2e2b47){return function(_0x4ed8b9){if(_0x4ed8b9){return _0x4ed8b9[_0x9cd5('0x25')](_0xb97394)[_0x9cd5('0x26')](function(_0x3f1f5c){return _0x3f1f5c;});}return null;};}function removeEntity(_0x12e402,_0x2ce1ae){return function(_0x1185d7){if(_0x1185d7){return _0x1185d7[_0x9cd5('0x27')]()[_0x9cd5('0x26')](function(){_0x12e402[_0x9cd5('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x297f0e,_0xba8ee9){return function(_0x1a88e3){if(!_0x1a88e3){_0x297f0e[_0x9cd5('0x1b')](0x194);}return _0x1a88e3;};}function handleError(_0x56c05d,_0x24ae67){_0x24ae67=_0x24ae67||0x1f4;return function(_0x990c25){logger[_0x9cd5('0x28')](_0x990c25[_0x9cd5('0x29')]);if(_0x990c25[_0x9cd5('0x2a')]){delete _0x990c25[_0x9cd5('0x2a')];}_0x56c05d[_0x9cd5('0x1c')](_0x24ae67)['send'](_0x990c25);};}exports[_0x9cd5('0x2b')]=function(_0x64a1c4,_0x2f1e4b){var _0x4af6c8={},_0x5c33e9={},_0x2e45a3={'count':0x0,'rows':[]};var _0x502257=db['SmsTransferReport'][_0x9cd5('0x2c')];_0x5c33e9[_0x9cd5('0x2d')]=_[_0x9cd5('0x2e')](_0x502257);_0x5c33e9['query']=_[_0x9cd5('0x2e')](_0x64a1c4[_0x9cd5('0x2f')]);_0x5c33e9[_0x9cd5('0x30')]=_[_0x9cd5('0x31')](_0x5c33e9[_0x9cd5('0x2d')],_0x5c33e9[_0x9cd5('0x2f')]);_0x4af6c8[_0x9cd5('0x32')]=_[_0x9cd5('0x31')](_0x5c33e9[_0x9cd5('0x2d')],qs[_0x9cd5('0x33')](_0x64a1c4[_0x9cd5('0x2f')][_0x9cd5('0x33')]));_0x4af6c8[_0x9cd5('0x32')]=_0x4af6c8[_0x9cd5('0x32')]['length']?_0x4af6c8[_0x9cd5('0x32')]:_0x5c33e9[_0x9cd5('0x2d')];if(!_0x64a1c4['query']['hasOwnProperty'](_0x9cd5('0x34'))){_0x4af6c8[_0x9cd5('0x35')]=qs['limit'](_0x64a1c4[_0x9cd5('0x2f')]['limit']);_0x4af6c8['offset']=qs[_0x9cd5('0x20')](_0x64a1c4[_0x9cd5('0x2f')][_0x9cd5('0x20')]);}_0x4af6c8[_0x9cd5('0x36')]=qs['sort'](_0x64a1c4[_0x9cd5('0x2f')][_0x9cd5('0x37')]);_0x4af6c8[_0x9cd5('0x38')]=qs['filters'](_[_0x9cd5('0x39')](_0x64a1c4[_0x9cd5('0x2f')],_0x5c33e9[_0x9cd5('0x30')]));if(_0x64a1c4[_0x9cd5('0x2f')][_0x9cd5('0x3a')]){_0x4af6c8[_0x9cd5('0x38')]=_[_0x9cd5('0x3b')](_0x4af6c8[_0x9cd5('0x38')],{'$or':_[_0x9cd5('0x3c')](_0x502257,function(_0x1ed01d){if(_0x1ed01d[_0x9cd5('0x3d')]['key']!==_0x9cd5('0x3e')){var _0x5405e0={};_0x5405e0[_0x1ed01d['field']]={'$like':'%'+_0x64a1c4[_0x9cd5('0x2f')][_0x9cd5('0x3a')]+'%'};return _0x5405e0;}})});}_0x4af6c8=_[_0x9cd5('0x3b')]({},_0x4af6c8,_0x64a1c4[_0x9cd5('0x3f')]);var _0x54bc49={'where':_0x4af6c8[_0x9cd5('0x38')]};return db[_0x9cd5('0x40')][_0x9cd5('0x1f')](_0x54bc49)[_0x9cd5('0x26')](function(_0x5cd84a){_0x2e45a3[_0x9cd5('0x1f')]=_0x5cd84a;if(_0x64a1c4[_0x9cd5('0x2f')][_0x9cd5('0x41')]){_0x4af6c8[_0x9cd5('0x42')]=[{'all':!![]}];}return db[_0x9cd5('0x40')][_0x9cd5('0x43')](_0x4af6c8);})['then'](function(_0x26cf61){_0x2e45a3[_0x9cd5('0x44')]=_0x26cf61;return _0x2e45a3;})[_0x9cd5('0x26')](respondWithFilteredResult(_0x2f1e4b,_0x4af6c8))[_0x9cd5('0x45')](handleError(_0x2f1e4b,null));};exports[_0x9cd5('0x46')]=function(_0x4182bd,_0x12d604){var _0x1ee8a4={'raw':!![],'where':{'id':_0x4182bd[_0x9cd5('0x47')]['id']}},_0x350fff={};_0x350fff[_0x9cd5('0x2d')]=_[_0x9cd5('0x2e')](db[_0x9cd5('0x40')][_0x9cd5('0x2c')]);_0x350fff[_0x9cd5('0x2f')]=_[_0x9cd5('0x2e')](_0x4182bd[_0x9cd5('0x2f')]);_0x350fff[_0x9cd5('0x30')]=_['intersection'](_0x350fff[_0x9cd5('0x2d')],_0x350fff['query']);_0x1ee8a4[_0x9cd5('0x32')]=_[_0x9cd5('0x31')](_0x350fff[_0x9cd5('0x2d')],qs[_0x9cd5('0x33')](_0x4182bd[_0x9cd5('0x2f')]['fields']));_0x1ee8a4[_0x9cd5('0x32')]=_0x1ee8a4[_0x9cd5('0x32')][_0x9cd5('0x48')]?_0x1ee8a4['attributes']:_0x350fff[_0x9cd5('0x2d')];if(_0x4182bd[_0x9cd5('0x2f')][_0x9cd5('0x41')]){_0x1ee8a4[_0x9cd5('0x42')]=[{'all':!![]}];}_0x1ee8a4=_['merge']({},_0x1ee8a4,_0x4182bd[_0x9cd5('0x3f')]);return db[_0x9cd5('0x40')][_0x9cd5('0x49')](_0x1ee8a4)[_0x9cd5('0x26')](handleEntityNotFound(_0x12d604,null))[_0x9cd5('0x26')](respondWithResult(_0x12d604,null))[_0x9cd5('0x45')](handleError(_0x12d604,null));};exports[_0x9cd5('0x4a')]=function(_0x1cd873,_0x1e06be){return db[_0x9cd5('0x40')][_0x9cd5('0x4a')](_0x1cd873[_0x9cd5('0x4b')],{})[_0x9cd5('0x26')](respondWithResult(_0x1e06be,0xc9))[_0x9cd5('0x45')](handleError(_0x1e06be,null));};exports[_0x9cd5('0x25')]=function(_0xc1631b,_0x11cf40){if(_0xc1631b[_0x9cd5('0x4b')]['id']){delete _0xc1631b['body']['id'];}return db[_0x9cd5('0x40')][_0x9cd5('0x49')]({'where':{'id':_0xc1631b[_0x9cd5('0x47')]['id']}})[_0x9cd5('0x26')](handleEntityNotFound(_0x11cf40,null))['then'](saveUpdates(_0xc1631b[_0x9cd5('0x4b')],null))[_0x9cd5('0x26')](respondWithResult(_0x11cf40,null))['catch'](handleError(_0x11cf40,null));};exports[_0x9cd5('0x27')]=function(_0x155652,_0x152b17){return db[_0x9cd5('0x40')][_0x9cd5('0x49')]({'where':{'id':_0x155652[_0x9cd5('0x47')]['id']}})[_0x9cd5('0x26')](handleEntityNotFound(_0x152b17,null))[_0x9cd5('0x26')](removeEntity(_0x152b17,null))['catch'](handleError(_0x152b17,null));};exports['describe']=function(_0x1f2278,_0x96b49a){return db[_0x9cd5('0x40')][_0x9cd5('0x4c')]()['then'](respondWithResult(_0x96b49a,null))[_0x9cd5('0x45')](handleError(_0x96b49a,null));};
\ No newline at end of file
+var _0x5162=['Content-Range','apply','reject','save','update','then','sendStatus','error','stack','name','send','index','SmsTransferReport','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','map','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','describe','html-pdf','request-promise','moment','bluebird','mustache','util','path','sox','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../mysqldb','status','end','json','count','offset','limit'];(function(_0x5f3309,_0x37871b){var _0xea65ec=function(_0x4fbe43){while(--_0x4fbe43){_0x5f3309['push'](_0x5f3309['shift']());}};_0xea65ec(++_0x37871b);}(_0x5162,0x103));var _0x2516=function(_0x11c221,_0x65c6a5){_0x11c221=_0x11c221-0x0;var _0x26deef=_0x5162[_0x11c221];return _0x26deef;};'use strict';var pdf=require(_0x2516('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x2516('0x1'));var moment=require(_0x2516('0x2'));var BPromise=require(_0x2516('0x3'));var Mustache=require(_0x2516('0x4'));var util=require(_0x2516('0x5'));var path=require(_0x2516('0x6'));var sox=require(_0x2516('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x2516('0x8'));var crypto=require(_0x2516('0x9'));var jsforce=require(_0x2516('0xa'));var deskjs=require(_0x2516('0xb'));var toCsv=require(_0x2516('0xc'));var querystring=require(_0x2516('0xd'));var Papa=require(_0x2516('0xe'));var Redis=require('ioredis');var authService=require(_0x2516('0xf'));var qs=require(_0x2516('0x10'));var hardwareService=require(_0x2516('0x11'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x2516('0x12'))['db'];function respondWithStatusCode(_0x3c7762,_0x310d1a){_0x310d1a=_0x310d1a||0xcc;return function(_0x3ef6ff){if(_0x3ef6ff){return _0x3c7762['sendStatus'](_0x310d1a);}return _0x3c7762[_0x2516('0x13')](_0x310d1a)[_0x2516('0x14')]();};}function respondWithResult(_0x171da2,_0xb28714){_0xb28714=_0xb28714||0xc8;return function(_0x42c771){if(_0x42c771){return _0x171da2[_0x2516('0x13')](_0xb28714)[_0x2516('0x15')](_0x42c771);}};}function respondWithFilteredResult(_0x2edb47,_0x1b3c7e){return function(_0x181a28){if(_0x181a28){var _0x2637e8=_0x181a28[_0x2516('0x16')],_0x2ec31f=_0x1b3c7e['offset'],_0x19aacb=_0x1b3c7e[_0x2516('0x17')]+_0x1b3c7e[_0x2516('0x18')],_0x5dee15;if(_0x19aacb>=_0x2637e8){_0x19aacb=_0x2637e8;_0x5dee15=0xc8;}else{_0x5dee15=0xce;}_0x2edb47[_0x2516('0x13')](_0x5dee15);return _0x2edb47['set'](_0x2516('0x19'),_0x2ec31f+'-'+_0x19aacb+'/'+_0x2637e8)['json'](_0x181a28);}return null;};}function patchUpdates(_0x532d46){return function(_0x31a817){try{jsonpatch[_0x2516('0x1a')](_0x31a817,_0x532d46,!![]);}catch(_0x151168){return BPromise[_0x2516('0x1b')](_0x151168);}return _0x31a817[_0x2516('0x1c')]();};}function saveUpdates(_0x42ba50,_0x2bf0ee){return function(_0x113616){if(_0x113616){return _0x113616[_0x2516('0x1d')](_0x42ba50)[_0x2516('0x1e')](function(_0x39ba5b){return _0x39ba5b;});}return null;};}function removeEntity(_0x11e78b,_0x1b0831){return function(_0x4fb7d9){if(_0x4fb7d9){return _0x4fb7d9['destroy']()[_0x2516('0x1e')](function(){_0x11e78b[_0x2516('0x13')](0xcc)[_0x2516('0x14')]();});}};}function handleEntityNotFound(_0x2d5b1b,_0x3ffb6d){return function(_0x32de7a){if(!_0x32de7a){_0x2d5b1b[_0x2516('0x1f')](0x194);}return _0x32de7a;};}function handleError(_0x950477,_0x4b1d4f){_0x4b1d4f=_0x4b1d4f||0x1f4;return function(_0xa4538d){logger[_0x2516('0x20')](_0xa4538d[_0x2516('0x21')]);if(_0xa4538d[_0x2516('0x22')]){delete _0xa4538d['name'];}_0x950477[_0x2516('0x13')](_0x4b1d4f)[_0x2516('0x23')](_0xa4538d);};}exports[_0x2516('0x24')]=function(_0x3d728a,_0xd84b29){var _0x4a3dc8={},_0x3c5c3c={},_0x1750e7={'count':0x0,'rows':[]};var _0x935035=db[_0x2516('0x25')][_0x2516('0x26')];_0x3c5c3c[_0x2516('0x27')]=_['keys'](_0x935035);_0x3c5c3c[_0x2516('0x28')]=_[_0x2516('0x29')](_0x3d728a['query']);_0x3c5c3c[_0x2516('0x2a')]=_[_0x2516('0x2b')](_0x3c5c3c[_0x2516('0x27')],_0x3c5c3c[_0x2516('0x28')]);_0x4a3dc8[_0x2516('0x2c')]=_[_0x2516('0x2b')](_0x3c5c3c[_0x2516('0x27')],qs[_0x2516('0x2d')](_0x3d728a[_0x2516('0x28')][_0x2516('0x2d')]));_0x4a3dc8[_0x2516('0x2c')]=_0x4a3dc8[_0x2516('0x2c')][_0x2516('0x2e')]?_0x4a3dc8[_0x2516('0x2c')]:_0x3c5c3c[_0x2516('0x27')];if(!_0x3d728a['query'][_0x2516('0x2f')]('nolimit')){_0x4a3dc8[_0x2516('0x18')]=qs['limit'](_0x3d728a[_0x2516('0x28')]['limit']);_0x4a3dc8[_0x2516('0x17')]=qs[_0x2516('0x17')](_0x3d728a[_0x2516('0x28')][_0x2516('0x17')]);}_0x4a3dc8[_0x2516('0x30')]=qs[_0x2516('0x31')](_0x3d728a[_0x2516('0x28')][_0x2516('0x31')]);_0x4a3dc8[_0x2516('0x32')]=qs['filters'](_[_0x2516('0x33')](_0x3d728a[_0x2516('0x28')],_0x3c5c3c[_0x2516('0x2a')]));if(_0x3d728a[_0x2516('0x28')]['filter']){_0x4a3dc8['where']=_[_0x2516('0x34')](_0x4a3dc8[_0x2516('0x32')],{'$or':_[_0x2516('0x35')](_0x935035,function(_0x1d9b16){if(_0x1d9b16[_0x2516('0x36')][_0x2516('0x37')]!==_0x2516('0x38')){var _0x1bc9ee={};_0x1bc9ee[_0x1d9b16[_0x2516('0x39')]]={'$like':'%'+_0x3d728a[_0x2516('0x28')]['filter']+'%'};return _0x1bc9ee;}})});}_0x4a3dc8=_['merge']({},_0x4a3dc8,_0x3d728a[_0x2516('0x3a')]);var _0x322021={'where':_0x4a3dc8['where']};return db['SmsTransferReport'][_0x2516('0x16')](_0x322021)[_0x2516('0x1e')](function(_0x47cf10){_0x1750e7[_0x2516('0x16')]=_0x47cf10;if(_0x3d728a['query'][_0x2516('0x3b')]){_0x4a3dc8[_0x2516('0x3c')]=[{'all':!![]}];}return db['SmsTransferReport'][_0x2516('0x3d')](_0x4a3dc8);})[_0x2516('0x1e')](function(_0x155cf7){_0x1750e7[_0x2516('0x3e')]=_0x155cf7;return _0x1750e7;})[_0x2516('0x1e')](respondWithFilteredResult(_0xd84b29,_0x4a3dc8))[_0x2516('0x3f')](handleError(_0xd84b29,null));};exports[_0x2516('0x40')]=function(_0x2371a8,_0x346e31){var _0xc1c0fb={'raw':!![],'where':{'id':_0x2371a8[_0x2516('0x41')]['id']}},_0x38ca2e={};_0x38ca2e[_0x2516('0x27')]=_['keys'](db[_0x2516('0x25')][_0x2516('0x26')]);_0x38ca2e['query']=_[_0x2516('0x29')](_0x2371a8[_0x2516('0x28')]);_0x38ca2e[_0x2516('0x2a')]=_[_0x2516('0x2b')](_0x38ca2e[_0x2516('0x27')],_0x38ca2e['query']);_0xc1c0fb[_0x2516('0x2c')]=_[_0x2516('0x2b')](_0x38ca2e[_0x2516('0x27')],qs[_0x2516('0x2d')](_0x2371a8[_0x2516('0x28')][_0x2516('0x2d')]));_0xc1c0fb['attributes']=_0xc1c0fb[_0x2516('0x2c')][_0x2516('0x2e')]?_0xc1c0fb[_0x2516('0x2c')]:_0x38ca2e[_0x2516('0x27')];if(_0x2371a8[_0x2516('0x28')][_0x2516('0x3b')]){_0xc1c0fb[_0x2516('0x3c')]=[{'all':!![]}];}_0xc1c0fb=_['merge']({},_0xc1c0fb,_0x2371a8[_0x2516('0x3a')]);return db['SmsTransferReport'][_0x2516('0x42')](_0xc1c0fb)['then'](handleEntityNotFound(_0x346e31,null))[_0x2516('0x1e')](respondWithResult(_0x346e31,null))[_0x2516('0x3f')](handleError(_0x346e31,null));};exports[_0x2516('0x43')]=function(_0x47f9a0,_0x4a2de3){return db[_0x2516('0x25')][_0x2516('0x43')](_0x47f9a0['body'],{})['then'](respondWithResult(_0x4a2de3,0xc9))[_0x2516('0x3f')](handleError(_0x4a2de3,null));};exports[_0x2516('0x1d')]=function(_0x34f3d5,_0x53e61c){if(_0x34f3d5[_0x2516('0x44')]['id']){delete _0x34f3d5['body']['id'];}return db[_0x2516('0x25')][_0x2516('0x42')]({'where':{'id':_0x34f3d5[_0x2516('0x41')]['id']}})[_0x2516('0x1e')](handleEntityNotFound(_0x53e61c,null))['then'](saveUpdates(_0x34f3d5[_0x2516('0x44')],null))[_0x2516('0x1e')](respondWithResult(_0x53e61c,null))[_0x2516('0x3f')](handleError(_0x53e61c,null));};exports[_0x2516('0x45')]=function(_0x43874c,_0x482883){return db[_0x2516('0x25')][_0x2516('0x42')]({'where':{'id':_0x43874c[_0x2516('0x41')]['id']}})[_0x2516('0x1e')](handleEntityNotFound(_0x482883,null))['then'](removeEntity(_0x482883,null))[_0x2516('0x3f')](handleError(_0x482883,null));};exports[_0x2516('0x46')]=function(_0x19b57a,_0x41b716){return db[_0x2516('0x25')]['describe']()[_0x2516('0x1e')](respondWithResult(_0x41b716,null))[_0x2516('0x3f')](handleError(_0x41b716,null));};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.model.js b/server/api/smsTransferReport/smsTransferReport.model.js
index f75e504..4fef517 100644
--- a/server/api/smsTransferReport/smsTransferReport.model.js
+++ b/server/api/smsTransferReport/smsTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe541=['moment','request-promise','../../config/environment','./smsTransferReport.attributes','exports','define','SmsTransferReport','uniqueid','api'];(function(_0x4eed26,_0x29a3d3){var _0x43d711=function(_0x102ac3){while(--_0x102ac3){_0x4eed26['push'](_0x4eed26['shift']());}};_0x43d711(++_0x29a3d3);}(_0xe541,0xbc));var _0x1e54=function(_0xce44ee,_0x387d70){_0xce44ee=_0xce44ee-0x0;var _0xf97a49=_0xe541[_0xce44ee];return _0xf97a49;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x1e54('0x0'));var moment=require(_0x1e54('0x1'));var BPromise=require('bluebird');var rp=require(_0x1e54('0x2'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1e54('0x3'));var attributes=require(_0x1e54('0x4'));module[_0x1e54('0x5')]=function(_0x222ed2,_0x487238){return _0x222ed2[_0x1e54('0x6')](_0x1e54('0x7'),attributes,{'tableName':'report_sms_transfer','paranoid':![],'indexes':[{'name':_0x1e54('0x8'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2a89=['rimraf','../../config/environment','exports','SmsTransferReport','report_sms_transfer','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x174b7a,_0x264194){var _0x5afe3d=function(_0x49e308){while(--_0x49e308){_0x174b7a['push'](_0x174b7a['shift']());}};_0x5afe3d(++_0x264194);}(_0x2a89,0x13d));var _0x92a8=function(_0xd83772,_0x36e2bd){_0xd83772=_0xd83772-0x0;var _0x1dfcb2=_0x2a89[_0xd83772];return _0x1dfcb2;};'use strict';var _=require(_0x92a8('0x0'));var util=require(_0x92a8('0x1'));var logger=require(_0x92a8('0x2'))(_0x92a8('0x3'));var moment=require(_0x92a8('0x4'));var BPromise=require(_0x92a8('0x5'));var rp=require(_0x92a8('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x92a8('0x7'));var config=require(_0x92a8('0x8'));var attributes=require('./smsTransferReport.attributes');module[_0x92a8('0x9')]=function(_0x4b756b,_0x123d94){return _0x4b756b['define'](_0x92a8('0xa'),attributes,{'tableName':_0x92a8('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.rpc.js b/server/api/smsTransferReport/smsTransferReport.rpc.js
index a824109..c25ce7d 100644
--- a/server/api/smsTransferReport/smsTransferReport.rpc.js
+++ b/server/api/smsTransferReport/smsTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5204=['rpc','jayson/promise','client','http','request','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x5204,0xdf));var _0x4520=function(_0x379799,_0x4ccf16){_0x379799=_0x379799-0x0;var _0x46e431=_0x5204[_0x379799];return _0x46e431;};'use strict';var _=require(_0x4520('0x0'));var util=require(_0x4520('0x1'));var moment=require('moment');var BPromise=require(_0x4520('0x2'));var rs=require(_0x4520('0x3'));var fs=require('fs');var Redis=require(_0x4520('0x4'));var db=require(_0x4520('0x5'))['db'];var utils=require(_0x4520('0x6'));var logger=require('../../config/logger')(_0x4520('0x7'));var config=require('../../config/environment');var jayson=require(_0x4520('0x8'));var client=jayson[_0x4520('0x9')][_0x4520('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe741c2,_0x396d29,_0x446dc9){return new BPromise(function(_0x27890f,_0x55b44f){return client[_0x4520('0xb')](_0xe741c2,_0x446dc9)['then'](function(_0x168e62){logger[_0x4520('0xc')](_0x4520('0xd'),_0x396d29,_0x4520('0xe'));logger[_0x4520('0xf')](_0x4520('0x10'),_0x396d29,_0x4520('0xe'),JSON[_0x4520('0x11')](_0x168e62));if(_0x168e62[_0x4520('0x12')]){if(_0x168e62[_0x4520('0x12')][_0x4520('0x13')]===0x1f4){logger[_0x4520('0x12')](_0x4520('0xd'),_0x396d29,_0x168e62[_0x4520('0x12')][_0x4520('0x14')]);return _0x55b44f(_0x168e62[_0x4520('0x12')][_0x4520('0x14')]);}logger[_0x4520('0x12')](_0x4520('0xd'),_0x396d29,_0x168e62[_0x4520('0x12')][_0x4520('0x14')]);return _0x27890f(_0x168e62['error'][_0x4520('0x14')]);}else{logger[_0x4520('0xc')](_0x4520('0xd'),_0x396d29,_0x4520('0xe'));_0x27890f(_0x168e62[_0x4520('0x15')]['message']);}})[_0x4520('0x16')](function(_0x33ac29){logger[_0x4520('0x12')](_0x4520('0xd'),_0x396d29,_0x33ac29);_0x55b44f(_0x33ac29);});});}
\ No newline at end of file
+var _0xeca8=['../../config/environment','jayson/promise','http','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xeca8,0x1f2));var _0x8eca=function(_0x45d082,_0x372701){_0x45d082=_0x45d082-0x0;var _0x43b70d=_0xeca8[_0x45d082];return _0x43b70d;};'use strict';var _=require(_0x8eca('0x0'));var util=require(_0x8eca('0x1'));var moment=require(_0x8eca('0x2'));var BPromise=require(_0x8eca('0x3'));var rs=require(_0x8eca('0x4'));var fs=require('fs');var Redis=require(_0x8eca('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8eca('0x6'));var logger=require('../../config/logger')(_0x8eca('0x7'));var config=require(_0x8eca('0x8'));var jayson=require(_0x8eca('0x9'));var client=jayson['client'][_0x8eca('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x12c679,_0xe6e3f2,_0x39f40a){return new BPromise(function(_0xedaeca,_0x3b901f){return client['request'](_0x12c679,_0x39f40a)[_0x8eca('0xb')](function(_0x19208c){logger[_0x8eca('0xc')](_0x8eca('0xd'),_0xe6e3f2,_0x8eca('0xe'));logger[_0x8eca('0xf')](_0x8eca('0x10'),_0xe6e3f2,_0x8eca('0xe'),JSON[_0x8eca('0x11')](_0x19208c));if(_0x19208c[_0x8eca('0x12')]){if(_0x19208c['error'][_0x8eca('0x13')]===0x1f4){logger['error'](_0x8eca('0xd'),_0xe6e3f2,_0x19208c[_0x8eca('0x12')]['message']);return _0x3b901f(_0x19208c[_0x8eca('0x12')]['message']);}logger['error']('SmsTransferReport,\x20%s,\x20%s',_0xe6e3f2,_0x19208c[_0x8eca('0x12')][_0x8eca('0x14')]);return _0xedaeca(_0x19208c[_0x8eca('0x12')][_0x8eca('0x14')]);}else{logger[_0x8eca('0xc')](_0x8eca('0xd'),_0xe6e3f2,_0x8eca('0xe'));_0xedaeca(_0x19208c['result'][_0x8eca('0x14')]);}})[_0x8eca('0x15')](function(_0x4b8c67){logger[_0x8eca('0x12')](_0x8eca('0xd'),_0xe6e3f2,_0x4b8c67);_0x3b901f(_0x4b8c67);});});}
\ No newline at end of file
diff --git a/server/api/sound/index.js b/server/api/sound/index.js
index 8640db1..3509847 100644
--- a/server/api/sound/index.js
+++ b/server/api/sound/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2916=['now','post','single','create','put','update','delete','/:id','exports','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','show','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','format','basename','extname'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2916,0xc3));var _0x6291=function(_0x4c586e,_0x2571ae){_0x4c586e=_0x4c586e-0x0;var _0x40d9a5=_0x2916[_0x4c586e];return _0x40d9a5;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x6291('0x0'));var timeout=require(_0x6291('0x1'));var express=require(_0x6291('0x2'));var router=express['Router']();var auth=require(_0x6291('0x3'));var interaction=require(_0x6291('0x4'));var config=require(_0x6291('0x5'));var controller=require(_0x6291('0x6'));router[_0x6291('0x7')]('/',auth[_0x6291('0x8')](),controller[_0x6291('0x9')]);router[_0x6291('0x7')]('/:id',auth[_0x6291('0x8')](),controller[_0x6291('0xa')]);router[_0x6291('0x7')](_0x6291('0xb'),auth[_0x6291('0x8')](),controller[_0x6291('0xc')]);var upload=multer({'storage':multer[_0x6291('0xd')]({'destination':function(_0x38a6fe,_0x150161,_0x503e5f){_0x503e5f(null,path[_0x6291('0xe')](config[_0x6291('0xf')],_0x6291('0x10')));},'filename':function(_0x3368b1,_0x1500be,_0x347a9f){_0x1500be[_0x6291('0x11')]=_0x1500be[_0x6291('0x11')][_0x6291('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x347a9f(null,util[_0x6291('0x13')]('%s-%s%s',path[_0x6291('0x14')](_0x1500be[_0x6291('0x11')],path[_0x6291('0x15')](_0x1500be['originalname'])),Date[_0x6291('0x16')](),path[_0x6291('0x15')](_0x1500be['originalname'])));}})});router[_0x6291('0x17')]('/',upload[_0x6291('0x18')]('file'),controller[_0x6291('0x19')]);router[_0x6291('0x1a')]('/:id',auth[_0x6291('0x8')](),controller[_0x6291('0x1b')]);router[_0x6291('0x1c')](_0x6291('0x1d'),auth['isAuthenticated'](),controller[_0x6291('0x1c')]);module[_0x6291('0x1e')]=router;
\ No newline at end of file
+var _0xbc15=['../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/:id','show','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','basename','extname','now','single','file','create','put','delete','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x49de53,_0x37026f){var _0x1951a5=function(_0x476a27){while(--_0x476a27){_0x49de53['push'](_0x49de53['shift']());}};_0x1951a5(++_0x37026f);}(_0xbc15,0x1cb));var _0x5bc1=function(_0x5ce40c,_0x141492){_0x5ce40c=_0x5ce40c-0x0;var _0xfd84a2=_0xbc15[_0x5ce40c];return _0xfd84a2;};'use strict';var multer=require(_0x5bc1('0x0'));var util=require(_0x5bc1('0x1'));var path=require(_0x5bc1('0x2'));var timeout=require(_0x5bc1('0x3'));var express=require(_0x5bc1('0x4'));var router=express[_0x5bc1('0x5')]();var auth=require(_0x5bc1('0x6'));var interaction=require(_0x5bc1('0x7'));var config=require('../../config/environment');var controller=require('./sound.controller');router[_0x5bc1('0x8')]('/',auth[_0x5bc1('0x9')](),controller['index']);router['get'](_0x5bc1('0xa'),auth[_0x5bc1('0x9')](),controller[_0x5bc1('0xb')]);router[_0x5bc1('0x8')](_0x5bc1('0xc'),auth[_0x5bc1('0x9')](),controller[_0x5bc1('0xd')]);var upload=multer({'storage':multer[_0x5bc1('0xe')]({'destination':function(_0x40e550,_0x3d06e7,_0x598961){_0x598961(null,path[_0x5bc1('0xf')](config[_0x5bc1('0x10')],_0x5bc1('0x11')));},'filename':function(_0x55450c,_0x430f74,_0x10f617){_0x430f74[_0x5bc1('0x12')]=_0x430f74['originalname'][_0x5bc1('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x10f617(null,util[_0x5bc1('0x14')](_0x5bc1('0x15'),path[_0x5bc1('0x16')](_0x430f74[_0x5bc1('0x12')],path[_0x5bc1('0x17')](_0x430f74[_0x5bc1('0x12')])),Date[_0x5bc1('0x18')](),path[_0x5bc1('0x17')](_0x430f74[_0x5bc1('0x12')])));}})});router['post']('/',upload[_0x5bc1('0x19')](_0x5bc1('0x1a')),controller[_0x5bc1('0x1b')]);router[_0x5bc1('0x1c')](_0x5bc1('0xa'),auth['isAuthenticated'](),controller['update']);router[_0x5bc1('0x1d')]('/:id',auth['isAuthenticated'](),controller[_0x5bc1('0x1d')]);module[_0x5bc1('0x1e')]=router;
\ No newline at end of file
diff --git a/server/api/sound/sound.attributes.js b/server/api/sound/sound.attributes.js
index cb5608a..5aaaf51 100644
--- a/server/api/sound/sound.attributes.js
+++ b/server/api/sound/sound.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e95=['BIGINT','INTEGER','sequelize','exports','STRING','name','FLOAT'];(function(_0x10fd03,_0x58fdfd){var _0x5f4acd=function(_0x997936){while(--_0x997936){_0x10fd03['push'](_0x10fd03['shift']());}};_0x5f4acd(++_0x58fdfd);}(_0x3e95,0x152));var _0x53e9=function(_0x46aeb1,_0x5d5868){_0x46aeb1=_0x46aeb1-0x0;var _0x859a43=_0x3e95[_0x46aeb1];return _0x859a43;};'use strict';var Sequelize=require(_0x53e9('0x0'));module[_0x53e9('0x1')]={'name':{'type':Sequelize[_0x53e9('0x2')],'unique':_0x53e9('0x3'),'allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize['STRING'],'defaultValue':''},'description':{'type':Sequelize[_0x53e9('0x2')]},'original_format':{'type':Sequelize[_0x53e9('0x2')]},'original_duration':{'type':Sequelize[_0x53e9('0x4')]},'original_sampleCount':{'type':Sequelize[_0x53e9('0x5')]},'original_channelCount':{'type':Sequelize[_0x53e9('0x6')]},'original_bitRate':{'type':Sequelize[_0x53e9('0x5')]},'original_sampleRate':{'type':Sequelize[_0x53e9('0x6')]},'converted_format':{'type':Sequelize['STRING']},'converted_duration':{'type':Sequelize[_0x53e9('0x4')]},'converted_sampleCount':{'type':Sequelize[_0x53e9('0x5')]},'converted_channelCount':{'type':Sequelize[_0x53e9('0x6')]},'converted_bitRate':{'type':Sequelize[_0x53e9('0x5')]},'converted_sampleRate':{'type':Sequelize[_0x53e9('0x6')]}};
\ No newline at end of file
+var _0xc94c=['BIGINT','INTEGER','exports','name','STRING','FLOAT'];(function(_0x15d5ae,_0x38dea2){var _0x3f65c7=function(_0x4eb7f9){while(--_0x4eb7f9){_0x15d5ae['push'](_0x15d5ae['shift']());}};_0x3f65c7(++_0x38dea2);}(_0xc94c,0x194));var _0xcc94=function(_0x5c2d9e,_0x4d9364){_0x5c2d9e=_0x5c2d9e-0x0;var _0x43ea71=_0xc94c[_0x5c2d9e];return _0x43ea71;};'use strict';var Sequelize=require('sequelize');module[_0xcc94('0x0')]={'name':{'type':Sequelize['STRING'],'unique':_0xcc94('0x1'),'allowNull':![]},'save_name':{'type':Sequelize[_0xcc94('0x2')]},'display_name':{'type':Sequelize[_0xcc94('0x2')],'defaultValue':''},'description':{'type':Sequelize[_0xcc94('0x2')]},'original_format':{'type':Sequelize[_0xcc94('0x2')]},'original_duration':{'type':Sequelize[_0xcc94('0x3')]},'original_sampleCount':{'type':Sequelize[_0xcc94('0x4')]},'original_channelCount':{'type':Sequelize[_0xcc94('0x5')]},'original_bitRate':{'type':Sequelize['BIGINT']},'original_sampleRate':{'type':Sequelize['INTEGER']},'converted_format':{'type':Sequelize[_0xcc94('0x2')]},'converted_duration':{'type':Sequelize[_0xcc94('0x3')]},'converted_sampleCount':{'type':Sequelize['BIGINT']},'converted_channelCount':{'type':Sequelize[_0xcc94('0x5')]},'converted_bitRate':{'type':Sequelize[_0xcc94('0x4')]},'converted_sampleRate':{'type':Sequelize[_0xcc94('0x5')]}};
\ No newline at end of file
diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js
index 5474dfc..e3c10bf 100644
--- a/server/api/sound/sound.controller.js
+++ b/server/api/sound/sound.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xffe1=['show','params','intersection','download','find','save_name','existsSync','join','server/files/sounds/converted','converted_format','Sequelize','ValidationError','Sound\x20not\x20found','root','format','%s.%s','create','originalname','extname','file','basename','filename','substring','wav','server/files/sounds/original','Sound\x20upload\x20filepath:\x20%s','info','Sound\x20upload\x20destination:\x20%s','chmodSync','0777','transcode','send','src','original_duration','duration','sampleCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','dest','converted_duration','converted_sampleCount','converted_bitRate','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','start','description','delete','original_format','unlinkSync','rimraf','zip-dir','fast-json-patch','moment','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','Content-Range','apply','update','then','destroy','get','Sounds','UserProfileResource','error','stack','name','index','Sound','rawAttributes','model','query','keys','attributes','fields','hasOwnProperty','nolimit','limit','offset','order','sort','where','filters','pick','merge','map','type','key','VIRTUAL','filter','options','includeAll','include','findAll','catch'];(function(_0x3a3551,_0x10b5bf){var _0x438822=function(_0x286ae4){while(--_0x286ae4){_0x3a3551['push'](_0x3a3551['shift']());}};_0x438822(++_0x10b5bf);}(_0xffe1,0x12a));var _0x1ffe=function(_0x273cd0,_0x15c4b5){_0x273cd0=_0x273cd0-0x0;var _0x53125f=_0xffe1[_0x273cd0];return _0x53125f;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x1ffe('0x0'));var zipdir=require(_0x1ffe('0x1'));var jsonpatch=require(_0x1ffe('0x2'));var rp=require('request-promise');var moment=require(_0x1ffe('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x1ffe('0x4'));var util=require('util');var path=require(_0x1ffe('0x5'));var sox=require(_0x1ffe('0x6'));var csv=require(_0x1ffe('0x7'));var ejs=require(_0x1ffe('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x1ffe('0x9'));var crypto=require(_0x1ffe('0xa'));var jsforce=require(_0x1ffe('0xb'));var deskjs=require(_0x1ffe('0xc'));var toCsv=require(_0x1ffe('0x7'));var querystring=require(_0x1ffe('0xd'));var Papa=require('papaparse');var Redis=require(_0x1ffe('0xe'));var authService=require(_0x1ffe('0xf'));var qs=require(_0x1ffe('0x10'));var hardwareService=require(_0x1ffe('0x11'));var logger=require(_0x1ffe('0x12'))('api');var utils=require('../../config/utils');var config=require(_0x1ffe('0x13'));var db=require(_0x1ffe('0x14'))['db'];function respondWithStatusCode(_0x1e0ba7,_0xcc8288){_0xcc8288=_0xcc8288||0xcc;return function(_0xff727d){if(_0xff727d){return _0x1e0ba7[_0x1ffe('0x15')](_0xcc8288);}return _0x1e0ba7[_0x1ffe('0x16')](_0xcc8288)[_0x1ffe('0x17')]();};}function respondWithResult(_0x5c4926,_0x541a33){_0x541a33=_0x541a33||0xc8;return function(_0x1ca3a7){if(_0x1ca3a7){return _0x5c4926[_0x1ffe('0x16')](_0x541a33)[_0x1ffe('0x18')](_0x1ca3a7);}};}function respondWithFilteredResult(_0x154f19,_0x34e267){return function(_0x198376){if(_0x198376){var _0x3e090c=_0x198376[_0x1ffe('0x19')],_0x45f42c=_0x34e267['offset'],_0x3ae324=_0x34e267['offset']+_0x34e267['limit'],_0xc3ba82;if(_0x3ae324>=_0x3e090c){_0x3ae324=_0x3e090c;_0xc3ba82=0xc8;}else{_0xc3ba82=0xce;}_0x154f19['status'](_0xc3ba82);return _0x154f19['set'](_0x1ffe('0x1a'),_0x45f42c+'-'+_0x3ae324+'/'+_0x3e090c)['json'](_0x198376);}return null;};}function patchUpdates(_0xd0c460){return function(_0x5c3ca1){try{jsonpatch[_0x1ffe('0x1b')](_0x5c3ca1,_0xd0c460,!![]);}catch(_0x589122){return BPromise['reject'](_0x589122);}return _0x5c3ca1['save']();};}function saveUpdates(_0xf365ea,_0x315b2c){return function(_0x3195e1){if(_0x3195e1){return _0x3195e1[_0x1ffe('0x1c')](_0xf365ea)[_0x1ffe('0x1d')](function(_0x4b20cf){return _0x4b20cf;});}return null;};}function removeEntity(_0x2e7635,_0x1a7cf1){return function(_0xb54b34){if(_0xb54b34){return _0xb54b34[_0x1ffe('0x1e')]()[_0x1ffe('0x1d')](function(){var _0x27409e=_0xb54b34[_0x1ffe('0x1f')]({'plain':!![]});var _0x5a7c6e=_0x1ffe('0x20');return db[_0x1ffe('0x21')][_0x1ffe('0x1e')]({'where':{'type':_0x5a7c6e,'resourceId':_0x27409e['id']}})['then'](function(){return _0xb54b34;});})[_0x1ffe('0x1d')](function(){_0x2e7635[_0x1ffe('0x16')](0xcc)[_0x1ffe('0x17')]();});}};}function handleEntityNotFound(_0x3f072b,_0x1348d0){return function(_0x51584b){if(!_0x51584b){_0x3f072b['sendStatus'](0x194);}return _0x51584b;};}function handleError(_0x493ca2,_0x4f53c0){_0x4f53c0=_0x4f53c0||0x1f4;return function(_0x206747){logger[_0x1ffe('0x22')](_0x206747[_0x1ffe('0x23')]);if(_0x206747[_0x1ffe('0x24')]){delete _0x206747[_0x1ffe('0x24')];}_0x493ca2[_0x1ffe('0x16')](_0x4f53c0)['send'](_0x206747);};}exports[_0x1ffe('0x25')]=function(_0x150563,_0x1a0d59){var _0x4faded={},_0x548ddc={},_0x36f6b3={'count':0x0,'rows':[]};var _0x39a25c=db[_0x1ffe('0x26')][_0x1ffe('0x27')];_0x548ddc[_0x1ffe('0x28')]=_['keys'](_0x39a25c);_0x548ddc[_0x1ffe('0x29')]=_[_0x1ffe('0x2a')](_0x150563[_0x1ffe('0x29')]);_0x548ddc['filters']=_['intersection'](_0x548ddc[_0x1ffe('0x28')],_0x548ddc['query']);_0x4faded[_0x1ffe('0x2b')]=_['intersection'](_0x548ddc['model'],qs[_0x1ffe('0x2c')](_0x150563[_0x1ffe('0x29')][_0x1ffe('0x2c')]));_0x4faded[_0x1ffe('0x2b')]=_0x4faded[_0x1ffe('0x2b')]['length']?_0x4faded['attributes']:_0x548ddc['model'];if(!_0x150563[_0x1ffe('0x29')][_0x1ffe('0x2d')](_0x1ffe('0x2e'))){_0x4faded[_0x1ffe('0x2f')]=qs[_0x1ffe('0x2f')](_0x150563[_0x1ffe('0x29')]['limit']);_0x4faded[_0x1ffe('0x30')]=qs['offset'](_0x150563[_0x1ffe('0x29')][_0x1ffe('0x30')]);}_0x4faded[_0x1ffe('0x31')]=qs[_0x1ffe('0x32')](_0x150563[_0x1ffe('0x29')][_0x1ffe('0x32')]);_0x4faded[_0x1ffe('0x33')]=qs[_0x1ffe('0x34')](_[_0x1ffe('0x35')](_0x150563[_0x1ffe('0x29')],_0x548ddc[_0x1ffe('0x34')]));if(_0x150563[_0x1ffe('0x29')]['filter']){_0x4faded['where']=_[_0x1ffe('0x36')](_0x4faded[_0x1ffe('0x33')],{'$or':_[_0x1ffe('0x37')](_0x39a25c,function(_0x35f79e){if(_0x35f79e[_0x1ffe('0x38')][_0x1ffe('0x39')]!==_0x1ffe('0x3a')){var _0x19e71c={};_0x19e71c[_0x35f79e['field']]={'$like':'%'+_0x150563[_0x1ffe('0x29')][_0x1ffe('0x3b')]+'%'};return _0x19e71c;}})});}_0x4faded=_['merge']({},_0x4faded,_0x150563[_0x1ffe('0x3c')]);var _0xc0843f={'where':_0x4faded[_0x1ffe('0x33')]};return db[_0x1ffe('0x26')][_0x1ffe('0x19')](_0xc0843f)['then'](function(_0xade64d){_0x36f6b3['count']=_0xade64d;if(_0x150563[_0x1ffe('0x29')][_0x1ffe('0x3d')]){_0x4faded[_0x1ffe('0x3e')]=[{'all':!![]}];}return db[_0x1ffe('0x26')][_0x1ffe('0x3f')](_0x4faded);})[_0x1ffe('0x1d')](function(_0x4462ce){_0x36f6b3['rows']=_0x4462ce;return _0x36f6b3;})[_0x1ffe('0x1d')](respondWithFilteredResult(_0x1a0d59,_0x4faded))[_0x1ffe('0x40')](handleError(_0x1a0d59,null));};exports[_0x1ffe('0x41')]=function(_0x30410e,_0x12b358){var _0x73aab9={'raw':!![],'where':{'id':_0x30410e[_0x1ffe('0x42')]['id']}},_0x4a38e8={};_0x4a38e8[_0x1ffe('0x28')]=_['keys'](db['Sound']['rawAttributes']);_0x4a38e8[_0x1ffe('0x29')]=_[_0x1ffe('0x2a')](_0x30410e[_0x1ffe('0x29')]);_0x4a38e8[_0x1ffe('0x34')]=_['intersection'](_0x4a38e8[_0x1ffe('0x28')],_0x4a38e8[_0x1ffe('0x29')]);_0x73aab9[_0x1ffe('0x2b')]=_[_0x1ffe('0x43')](_0x4a38e8[_0x1ffe('0x28')],qs['fields'](_0x30410e['query'][_0x1ffe('0x2c')]));_0x73aab9['attributes']=_0x73aab9['attributes']['length']?_0x73aab9['attributes']:_0x4a38e8[_0x1ffe('0x28')];if(_0x30410e[_0x1ffe('0x29')][_0x1ffe('0x3d')]){_0x73aab9['include']=[{'all':!![]}];}_0x73aab9=_['merge']({},_0x73aab9,_0x30410e[_0x1ffe('0x3c')]);return db[_0x1ffe('0x26')]['find'](_0x73aab9)['then'](handleEntityNotFound(_0x12b358,null))[_0x1ffe('0x1d')](respondWithResult(_0x12b358,null))[_0x1ffe('0x40')](handleError(_0x12b358,null));};exports[_0x1ffe('0x44')]=function(_0x39193c,_0x263e6e,_0x432922){return db[_0x1ffe('0x26')][_0x1ffe('0x45')]({'where':{'id':_0x39193c['params']['id']},'attributes':[_0x1ffe('0x24'),_0x1ffe('0x46'),'converted_format'],'raw':!![]})[_0x1ffe('0x1d')](handleEntityNotFound(_0x263e6e,null))['then'](function(_0xaed5c9){if(_0xaed5c9){if(!fs[_0x1ffe('0x47')](path[_0x1ffe('0x48')](config['root'],_0x1ffe('0x49'),_0xaed5c9[_0x1ffe('0x46')]+'.'+_0xaed5c9[_0x1ffe('0x4a')]))){throw new db[(_0x1ffe('0x4b'))][(_0x1ffe('0x4c'))](_0x1ffe('0x4d'));}return _0x263e6e[_0x1ffe('0x44')](path['join'](config[_0x1ffe('0x4e')],_0x1ffe('0x49'),util[_0x1ffe('0x4f')](_0x1ffe('0x50'),_0xaed5c9[_0x1ffe('0x46')],_0xaed5c9['converted_format'])),util[_0x1ffe('0x4f')](_0x1ffe('0x50'),_0xaed5c9[_0x1ffe('0x24')],_0xaed5c9[_0x1ffe('0x4a')]));}return null;})[_0x1ffe('0x40')](handleError(_0x263e6e,null));};exports[_0x1ffe('0x51')]=function(_0x62b7bf,_0x56d99b,_0xddaae2){var _0x551820={'name':path['basename'](_0x62b7bf['file'][_0x1ffe('0x52')],path[_0x1ffe('0x53')](_0x62b7bf[_0x1ffe('0x54')][_0x1ffe('0x52')])),'save_name':path[_0x1ffe('0x55')](_0x62b7bf['file'][_0x1ffe('0x56')],path[_0x1ffe('0x53')](_0x62b7bf['file'][_0x1ffe('0x56')])),'original_format':path[_0x1ffe('0x53')](_0x62b7bf[_0x1ffe('0x54')]['originalname'])[_0x1ffe('0x57')](0x1),'converted_format':_0x1ffe('0x58')};var _0x212f20=path[_0x1ffe('0x48')](config[_0x1ffe('0x4e')],_0x1ffe('0x59'),_0x62b7bf['file'][_0x1ffe('0x56')]);var _0x486a2f=path[_0x1ffe('0x48')](config[_0x1ffe('0x4e')],_0x1ffe('0x49'),util['format'](_0x1ffe('0x50'),path[_0x1ffe('0x55')](_0x62b7bf['file'][_0x1ffe('0x56')],path[_0x1ffe('0x53')](_0x62b7bf['file'][_0x1ffe('0x56')])),_0x551820[_0x1ffe('0x4a')]));logger['info'](_0x1ffe('0x5a'),_0x212f20);logger[_0x1ffe('0x5b')](_0x1ffe('0x5c'),_0x486a2f);try{fs[_0x1ffe('0x5d')](_0x212f20,parseInt(_0x1ffe('0x5e'),0x8));var _0x2ec8ec=sox[_0x1ffe('0x5f')](_0x212f20,_0x486a2f,{'sampleRate':0x1f40,'format':_0x1ffe('0x58'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x2ec8ec['on']('error',function(_0x3b4452){fs['unlinkSync'](_0x212f20);_0x56d99b[_0x1ffe('0x16')](0x1f4)[_0x1ffe('0x60')](_0x3b4452);});_0x2ec8ec['on'](_0x1ffe('0x61'),function(_0x99f6bc){_0x551820[_0x1ffe('0x62')]=isNaN(_0x99f6bc[_0x1ffe('0x63')])?null:_0x99f6bc[_0x1ffe('0x63')]*0x3e8;_0x551820['original_sampleCount']=isNaN(_0x99f6bc[_0x1ffe('0x64')])?null:_0x99f6bc[_0x1ffe('0x64')];_0x551820['original_channelCount']=isNaN(_0x99f6bc[_0x1ffe('0x65')])?null:_0x99f6bc[_0x1ffe('0x65')];_0x551820[_0x1ffe('0x66')]=isNaN(_0x99f6bc[_0x1ffe('0x67')])?null:_0x99f6bc[_0x1ffe('0x67')];_0x551820[_0x1ffe('0x68')]=isNaN(_0x99f6bc[_0x1ffe('0x69')])?null:_0x99f6bc['sampleRate'];});_0x2ec8ec['on'](_0x1ffe('0x6a'),function(_0x163688){_0x551820[_0x1ffe('0x6b')]=isNaN(_0x163688[_0x1ffe('0x63')])?null:_0x163688['duration']*0x3e8;_0x551820[_0x1ffe('0x6c')]=isNaN(_0x163688[_0x1ffe('0x64')])?null:_0x163688[_0x1ffe('0x64')];_0x551820['converted_channelCount']=isNaN(_0x163688[_0x1ffe('0x65')])?null:_0x163688[_0x1ffe('0x65')];_0x551820[_0x1ffe('0x6d')]=isNaN(_0x163688['bitRate'])?null:_0x163688[_0x1ffe('0x67')];_0x551820['converted_sampleRate']=isNaN(_0x163688[_0x1ffe('0x69')])?null:_0x163688[_0x1ffe('0x69')];});_0x2ec8ec['on']('end',function(){fs['chmodSync'](_0x486a2f,parseInt(_0x1ffe('0x5e'),0x8));return db[_0x1ffe('0x26')][_0x1ffe('0x51')](_0x551820)[_0x1ffe('0x1d')](function(_0x59bf9e){var _0x1a7a1e={'role':_0x62b7bf[_0x1ffe('0x6e')]['role'],'userProfileId':_0x62b7bf[_0x1ffe('0x6e')][_0x1ffe('0x6f')]};if(!_0x1a7a1e)throw new Error(_0x1ffe('0x70'));if(_0x1a7a1e[_0x1ffe('0x71')]==='user'){var _0x2a816c=_0x59bf9e[_0x1ffe('0x1f')]({'plain':!![]});return db[_0x1ffe('0x72')][_0x1ffe('0x45')]({'where':{'name':_0x1ffe('0x20'),'userProfileId':_0x1a7a1e['userProfileId']},'raw':!![]})[_0x1ffe('0x1d')](function(_0x59e684){if(_0x59e684&&_0x59e684[_0x1ffe('0x73')]===0x0){return db['UserProfileResource'][_0x1ffe('0x51')]({'name':_0x2a816c[_0x1ffe('0x24')],'resourceId':_0x2a816c['id'],'type':_0x59e684[_0x1ffe('0x24')],'sectionId':_0x59e684['id']},{})['then'](function(){return _0x59bf9e;});}else{return _0x59bf9e;}})[_0x1ffe('0x40')](function(_0x2d830e){logger[_0x1ffe('0x22')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2d830e);throw _0x2d830e;});}return _0x59bf9e;})[_0x1ffe('0x1d')](respondWithResult(_0x56d99b,null))['catch'](handleError(_0x56d99b,null));});_0x2ec8ec[_0x1ffe('0x74')]();}catch(_0xe2d905){_0x56d99b[_0x1ffe('0x16')](0x1f4)[_0x1ffe('0x60')](_0xe2d905);}};exports['update']=function(_0x27fff4,_0x14215d,_0x312b8a){return db['Sound'][_0x1ffe('0x45')]({'where':{'id':_0x27fff4['params']['id']}})[_0x1ffe('0x1d')](handleEntityNotFound(_0x14215d,null))['then'](saveUpdates(_[_0x1ffe('0x35')](_0x27fff4[_0x1ffe('0x6e')],[_0x1ffe('0x24'),_0x1ffe('0x75')]),null))['then'](respondWithResult(_0x14215d,null))[_0x1ffe('0x40')](handleError(_0x14215d,null));};exports[_0x1ffe('0x76')]=function(_0x4580a2,_0x800252,_0x4983c0){return db['Sound'][_0x1ffe('0x45')]({'where':{'id':_0x4580a2['params']['id']}})[_0x1ffe('0x1d')](function(_0x15d4ef){if(_0x15d4ef){return _0x15d4ef[_0x1ffe('0x1e')]();}})['then'](function(_0x491eb8){var _0x395e5b=path[_0x1ffe('0x48')](config[_0x1ffe('0x4e')],'server/files/sounds/original',util['format'](_0x1ffe('0x50'),_0x491eb8[_0x1ffe('0x46')],_0x491eb8[_0x1ffe('0x77')]));var _0xd08550=path['join'](config[_0x1ffe('0x4e')],_0x1ffe('0x49'),util[_0x1ffe('0x4f')]('%s.%s',_0x491eb8[_0x1ffe('0x46')],_0x491eb8[_0x1ffe('0x4a')]));fs[_0x1ffe('0x78')](_0x395e5b);fs[_0x1ffe('0x78')](_0xd08550);return _0x491eb8;})['then'](function(_0x4b8b61){if(_0x4b8b61){return _0x800252[_0x1ffe('0x16')](0xcc)[_0x1ffe('0x17')]();}})[_0x1ffe('0x1d')](handleEntityNotFound(_0x800252,null))[_0x1ffe('0x40')](handleError(_0x800252,null));};
\ No newline at end of file
+var _0xcd47=['original_bitRate','bitRate','sampleRate','dest','converted_duration','converted_sampleCount','converted_channelCount','converted_bitRate','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','description','delete','html-pdf','eml-format','rimraf','request-promise','moment','path','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','end','status','json','count','offset','set','apply','reject','save','update','then','destroy','get','Sounds','UserProfileResource','sendStatus','name','send','index','Sound','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','map','key','VIRTUAL','field','options','include','findAll','rows','catch','show','params','find','download','save_name','existsSync','root','server/files/sounds/converted','converted_format','Sequelize','Sound\x20not\x20found','join','format','%s.%s','basename','file','extname','filename','originalname','server/files/sounds/original','info','Sound\x20upload\x20filepath:\x20%s','chmodSync','0777','transcode','wav','unlinkSync','src','duration','original_sampleCount','sampleCount','original_channelCount','channelCount'];(function(_0x3d2b78,_0x5272fd){var _0x3d474a=function(_0x391fdc){while(--_0x391fdc){_0x3d2b78['push'](_0x3d2b78['shift']());}};_0x3d474a(++_0x5272fd);}(_0xcd47,0x179));var _0x7cd4=function(_0x38e247,_0x2cd7b5){_0x38e247=_0x38e247-0x0;var _0x1be41b=_0xcd47[_0x38e247];return _0x1be41b;};'use strict';var pdf=require(_0x7cd4('0x0'));var emlformat=require(_0x7cd4('0x1'));var rimraf=require(_0x7cd4('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x7cd4('0x3'));var moment=require(_0x7cd4('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x7cd4('0x5'));var sox=require('sox');var csv=require(_0x7cd4('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x7cd4('0x7'));var squel=require('squel');var crypto=require(_0x7cd4('0x8'));var jsforce=require(_0x7cd4('0x9'));var deskjs=require(_0x7cd4('0xa'));var toCsv=require(_0x7cd4('0x6'));var querystring=require(_0x7cd4('0xb'));var Papa=require(_0x7cd4('0xc'));var Redis=require('ioredis');var authService=require(_0x7cd4('0xd'));var qs=require(_0x7cd4('0xe'));var hardwareService=require(_0x7cd4('0xf'));var logger=require(_0x7cd4('0x10'))(_0x7cd4('0x11'));var utils=require(_0x7cd4('0x12'));var config=require('../../config/environment');var db=require(_0x7cd4('0x13'))['db'];function respondWithStatusCode(_0x680fe,_0x45e337){_0x45e337=_0x45e337||0xcc;return function(_0x24b644){if(_0x24b644){return _0x680fe['sendStatus'](_0x45e337);}return _0x680fe['status'](_0x45e337)[_0x7cd4('0x14')]();};}function respondWithResult(_0x1d6938,_0x42c840){_0x42c840=_0x42c840||0xc8;return function(_0x644153){if(_0x644153){return _0x1d6938[_0x7cd4('0x15')](_0x42c840)[_0x7cd4('0x16')](_0x644153);}};}function respondWithFilteredResult(_0x5ab4b8,_0x2b2cb2){return function(_0x271c92){if(_0x271c92){var _0x308110=_0x271c92[_0x7cd4('0x17')],_0x19222d=_0x2b2cb2['offset'],_0x2163ba=_0x2b2cb2[_0x7cd4('0x18')]+_0x2b2cb2['limit'],_0x2de7f1;if(_0x2163ba>=_0x308110){_0x2163ba=_0x308110;_0x2de7f1=0xc8;}else{_0x2de7f1=0xce;}_0x5ab4b8[_0x7cd4('0x15')](_0x2de7f1);return _0x5ab4b8[_0x7cd4('0x19')]('Content-Range',_0x19222d+'-'+_0x2163ba+'/'+_0x308110)[_0x7cd4('0x16')](_0x271c92);}return null;};}function patchUpdates(_0x483c5d){return function(_0x204c0a){try{jsonpatch[_0x7cd4('0x1a')](_0x204c0a,_0x483c5d,!![]);}catch(_0xea9e6e){return BPromise[_0x7cd4('0x1b')](_0xea9e6e);}return _0x204c0a[_0x7cd4('0x1c')]();};}function saveUpdates(_0x2c311b,_0x4648e7){return function(_0x16ae96){if(_0x16ae96){return _0x16ae96[_0x7cd4('0x1d')](_0x2c311b)[_0x7cd4('0x1e')](function(_0x31c07c){return _0x31c07c;});}return null;};}function removeEntity(_0x1a8396,_0x1062b4){return function(_0x58c1c6){if(_0x58c1c6){return _0x58c1c6[_0x7cd4('0x1f')]()[_0x7cd4('0x1e')](function(){var _0x47f76f=_0x58c1c6[_0x7cd4('0x20')]({'plain':!![]});var _0x4c14c5=_0x7cd4('0x21');return db[_0x7cd4('0x22')][_0x7cd4('0x1f')]({'where':{'type':_0x4c14c5,'resourceId':_0x47f76f['id']}})[_0x7cd4('0x1e')](function(){return _0x58c1c6;});})[_0x7cd4('0x1e')](function(){_0x1a8396[_0x7cd4('0x15')](0xcc)[_0x7cd4('0x14')]();});}};}function handleEntityNotFound(_0x7d2e64,_0x215721){return function(_0x3df316){if(!_0x3df316){_0x7d2e64[_0x7cd4('0x23')](0x194);}return _0x3df316;};}function handleError(_0x15db8b,_0x68eb25){_0x68eb25=_0x68eb25||0x1f4;return function(_0x4cc8f0){logger['error'](_0x4cc8f0['stack']);if(_0x4cc8f0[_0x7cd4('0x24')]){delete _0x4cc8f0[_0x7cd4('0x24')];}_0x15db8b['status'](_0x68eb25)[_0x7cd4('0x25')](_0x4cc8f0);};}exports[_0x7cd4('0x26')]=function(_0x5dbe39,_0x5c8620){var _0x642e95={},_0x5ed5e6={},_0x369d06={'count':0x0,'rows':[]};var _0x3dba05=db[_0x7cd4('0x27')][_0x7cd4('0x28')];_0x5ed5e6[_0x7cd4('0x29')]=_[_0x7cd4('0x2a')](_0x3dba05);_0x5ed5e6[_0x7cd4('0x2b')]=_['keys'](_0x5dbe39['query']);_0x5ed5e6[_0x7cd4('0x2c')]=_[_0x7cd4('0x2d')](_0x5ed5e6[_0x7cd4('0x29')],_0x5ed5e6[_0x7cd4('0x2b')]);_0x642e95[_0x7cd4('0x2e')]=_[_0x7cd4('0x2d')](_0x5ed5e6[_0x7cd4('0x29')],qs[_0x7cd4('0x2f')](_0x5dbe39[_0x7cd4('0x2b')][_0x7cd4('0x2f')]));_0x642e95['attributes']=_0x642e95[_0x7cd4('0x2e')][_0x7cd4('0x30')]?_0x642e95[_0x7cd4('0x2e')]:_0x5ed5e6[_0x7cd4('0x29')];if(!_0x5dbe39['query'][_0x7cd4('0x31')]('nolimit')){_0x642e95[_0x7cd4('0x32')]=qs['limit'](_0x5dbe39[_0x7cd4('0x2b')][_0x7cd4('0x32')]);_0x642e95[_0x7cd4('0x18')]=qs[_0x7cd4('0x18')](_0x5dbe39[_0x7cd4('0x2b')][_0x7cd4('0x18')]);}_0x642e95[_0x7cd4('0x33')]=qs[_0x7cd4('0x34')](_0x5dbe39[_0x7cd4('0x2b')][_0x7cd4('0x34')]);_0x642e95[_0x7cd4('0x35')]=qs[_0x7cd4('0x2c')](_[_0x7cd4('0x36')](_0x5dbe39['query'],_0x5ed5e6['filters']));if(_0x5dbe39['query'][_0x7cd4('0x37')]){_0x642e95[_0x7cd4('0x35')]=_[_0x7cd4('0x38')](_0x642e95['where'],{'$or':_[_0x7cd4('0x39')](_0x3dba05,function(_0x43da28){if(_0x43da28['type'][_0x7cd4('0x3a')]!==_0x7cd4('0x3b')){var _0x2fc9dd={};_0x2fc9dd[_0x43da28[_0x7cd4('0x3c')]]={'$like':'%'+_0x5dbe39[_0x7cd4('0x2b')][_0x7cd4('0x37')]+'%'};return _0x2fc9dd;}})});}_0x642e95=_[_0x7cd4('0x38')]({},_0x642e95,_0x5dbe39[_0x7cd4('0x3d')]);var _0x992cd2={'where':_0x642e95[_0x7cd4('0x35')]};return db['Sound'][_0x7cd4('0x17')](_0x992cd2)[_0x7cd4('0x1e')](function(_0x141353){_0x369d06[_0x7cd4('0x17')]=_0x141353;if(_0x5dbe39['query']['includeAll']){_0x642e95[_0x7cd4('0x3e')]=[{'all':!![]}];}return db[_0x7cd4('0x27')][_0x7cd4('0x3f')](_0x642e95);})['then'](function(_0x53797b){_0x369d06[_0x7cd4('0x40')]=_0x53797b;return _0x369d06;})[_0x7cd4('0x1e')](respondWithFilteredResult(_0x5c8620,_0x642e95))[_0x7cd4('0x41')](handleError(_0x5c8620,null));};exports[_0x7cd4('0x42')]=function(_0x17de7c,_0x22e50c){var _0x5a67fe={'raw':!![],'where':{'id':_0x17de7c[_0x7cd4('0x43')]['id']}},_0x3f6316={};_0x3f6316[_0x7cd4('0x29')]=_[_0x7cd4('0x2a')](db[_0x7cd4('0x27')]['rawAttributes']);_0x3f6316[_0x7cd4('0x2b')]=_[_0x7cd4('0x2a')](_0x17de7c[_0x7cd4('0x2b')]);_0x3f6316[_0x7cd4('0x2c')]=_['intersection'](_0x3f6316['model'],_0x3f6316[_0x7cd4('0x2b')]);_0x5a67fe[_0x7cd4('0x2e')]=_['intersection'](_0x3f6316['model'],qs[_0x7cd4('0x2f')](_0x17de7c[_0x7cd4('0x2b')][_0x7cd4('0x2f')]));_0x5a67fe[_0x7cd4('0x2e')]=_0x5a67fe[_0x7cd4('0x2e')]['length']?_0x5a67fe[_0x7cd4('0x2e')]:_0x3f6316['model'];if(_0x17de7c['query']['includeAll']){_0x5a67fe[_0x7cd4('0x3e')]=[{'all':!![]}];}_0x5a67fe=_[_0x7cd4('0x38')]({},_0x5a67fe,_0x17de7c[_0x7cd4('0x3d')]);return db['Sound'][_0x7cd4('0x44')](_0x5a67fe)['then'](handleEntityNotFound(_0x22e50c,null))[_0x7cd4('0x1e')](respondWithResult(_0x22e50c,null))[_0x7cd4('0x41')](handleError(_0x22e50c,null));};exports[_0x7cd4('0x45')]=function(_0x2f1946,_0x35ad03,_0x3034d1){return db[_0x7cd4('0x27')][_0x7cd4('0x44')]({'where':{'id':_0x2f1946[_0x7cd4('0x43')]['id']},'attributes':[_0x7cd4('0x24'),_0x7cd4('0x46'),'converted_format'],'raw':!![]})[_0x7cd4('0x1e')](handleEntityNotFound(_0x35ad03,null))[_0x7cd4('0x1e')](function(_0x5aa4ff){if(_0x5aa4ff){if(!fs[_0x7cd4('0x47')](path['join'](config[_0x7cd4('0x48')],_0x7cd4('0x49'),_0x5aa4ff[_0x7cd4('0x46')]+'.'+_0x5aa4ff[_0x7cd4('0x4a')]))){throw new db[(_0x7cd4('0x4b'))]['ValidationError'](_0x7cd4('0x4c'));}return _0x35ad03[_0x7cd4('0x45')](path[_0x7cd4('0x4d')](config[_0x7cd4('0x48')],_0x7cd4('0x49'),util[_0x7cd4('0x4e')]('%s.%s',_0x5aa4ff['save_name'],_0x5aa4ff[_0x7cd4('0x4a')])),util[_0x7cd4('0x4e')](_0x7cd4('0x4f'),_0x5aa4ff[_0x7cd4('0x24')],_0x5aa4ff[_0x7cd4('0x4a')]));}return null;})[_0x7cd4('0x41')](handleError(_0x35ad03,null));};exports['create']=function(_0x367713,_0x38d958,_0x5b8451){var _0x502f75={'name':path[_0x7cd4('0x50')](_0x367713[_0x7cd4('0x51')]['originalname'],path[_0x7cd4('0x52')](_0x367713[_0x7cd4('0x51')]['originalname'])),'save_name':path['basename'](_0x367713[_0x7cd4('0x51')][_0x7cd4('0x53')],path['extname'](_0x367713[_0x7cd4('0x51')][_0x7cd4('0x53')])),'original_format':path[_0x7cd4('0x52')](_0x367713[_0x7cd4('0x51')][_0x7cd4('0x54')])['substring'](0x1),'converted_format':'wav'};var _0x221322=path[_0x7cd4('0x4d')](config[_0x7cd4('0x48')],_0x7cd4('0x55'),_0x367713[_0x7cd4('0x51')][_0x7cd4('0x53')]);var _0x2998a9=path[_0x7cd4('0x4d')](config[_0x7cd4('0x48')],_0x7cd4('0x49'),util[_0x7cd4('0x4e')](_0x7cd4('0x4f'),path[_0x7cd4('0x50')](_0x367713[_0x7cd4('0x51')][_0x7cd4('0x53')],path[_0x7cd4('0x52')](_0x367713[_0x7cd4('0x51')]['filename'])),_0x502f75['converted_format']));logger[_0x7cd4('0x56')](_0x7cd4('0x57'),_0x221322);logger[_0x7cd4('0x56')]('Sound\x20upload\x20destination:\x20%s',_0x2998a9);try{fs[_0x7cd4('0x58')](_0x221322,parseInt(_0x7cd4('0x59'),0x8));var _0x503db1=sox[_0x7cd4('0x5a')](_0x221322,_0x2998a9,{'sampleRate':0x1f40,'format':_0x7cd4('0x5b'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x503db1['on']('error',function(_0x4be3b3){fs[_0x7cd4('0x5c')](_0x221322);_0x38d958['status'](0x1f4)['send'](_0x4be3b3);});_0x503db1['on'](_0x7cd4('0x5d'),function(_0x4d2f30){_0x502f75['original_duration']=isNaN(_0x4d2f30[_0x7cd4('0x5e')])?null:_0x4d2f30[_0x7cd4('0x5e')]*0x3e8;_0x502f75[_0x7cd4('0x5f')]=isNaN(_0x4d2f30['sampleCount'])?null:_0x4d2f30[_0x7cd4('0x60')];_0x502f75[_0x7cd4('0x61')]=isNaN(_0x4d2f30['channelCount'])?null:_0x4d2f30[_0x7cd4('0x62')];_0x502f75[_0x7cd4('0x63')]=isNaN(_0x4d2f30[_0x7cd4('0x64')])?null:_0x4d2f30[_0x7cd4('0x64')];_0x502f75['original_sampleRate']=isNaN(_0x4d2f30[_0x7cd4('0x65')])?null:_0x4d2f30[_0x7cd4('0x65')];});_0x503db1['on'](_0x7cd4('0x66'),function(_0x1cb4f1){_0x502f75[_0x7cd4('0x67')]=isNaN(_0x1cb4f1[_0x7cd4('0x5e')])?null:_0x1cb4f1[_0x7cd4('0x5e')]*0x3e8;_0x502f75[_0x7cd4('0x68')]=isNaN(_0x1cb4f1['sampleCount'])?null:_0x1cb4f1[_0x7cd4('0x60')];_0x502f75[_0x7cd4('0x69')]=isNaN(_0x1cb4f1[_0x7cd4('0x62')])?null:_0x1cb4f1[_0x7cd4('0x62')];_0x502f75[_0x7cd4('0x6a')]=isNaN(_0x1cb4f1[_0x7cd4('0x64')])?null:_0x1cb4f1[_0x7cd4('0x64')];_0x502f75['converted_sampleRate']=isNaN(_0x1cb4f1[_0x7cd4('0x65')])?null:_0x1cb4f1[_0x7cd4('0x65')];});_0x503db1['on'](_0x7cd4('0x14'),function(){fs['chmodSync'](_0x2998a9,parseInt(_0x7cd4('0x59'),0x8));return db['Sound'][_0x7cd4('0x6b')](_0x502f75)[_0x7cd4('0x1e')](function(_0x1f2a90){var _0x4b3b9f={'role':_0x367713[_0x7cd4('0x6c')]['role'],'userProfileId':_0x367713[_0x7cd4('0x6c')]['userProfileId']};if(!_0x4b3b9f)throw new Error(_0x7cd4('0x6d'));if(_0x4b3b9f[_0x7cd4('0x6e')]==='user'){var _0xcc87c1=_0x1f2a90[_0x7cd4('0x20')]({'plain':!![]});return db[_0x7cd4('0x6f')][_0x7cd4('0x44')]({'where':{'name':_0x7cd4('0x21'),'userProfileId':_0x4b3b9f[_0x7cd4('0x70')]},'raw':!![]})[_0x7cd4('0x1e')](function(_0x32a6bd){if(_0x32a6bd&&_0x32a6bd[_0x7cd4('0x71')]===0x0){return db[_0x7cd4('0x22')][_0x7cd4('0x6b')]({'name':_0xcc87c1['name'],'resourceId':_0xcc87c1['id'],'type':_0x32a6bd[_0x7cd4('0x24')],'sectionId':_0x32a6bd['id']},{})['then'](function(){return _0x1f2a90;});}else{return _0x1f2a90;}})['catch'](function(_0x361585){logger[_0x7cd4('0x72')](_0x7cd4('0x73'),_0x361585);throw _0x361585;});}return _0x1f2a90;})[_0x7cd4('0x1e')](respondWithResult(_0x38d958,null))[_0x7cd4('0x41')](handleError(_0x38d958,null));});_0x503db1[_0x7cd4('0x74')]();}catch(_0x310f4f){_0x38d958[_0x7cd4('0x15')](0x1f4)[_0x7cd4('0x25')](_0x310f4f);}};exports[_0x7cd4('0x1d')]=function(_0x4c11e0,_0x45080d,_0xc27774){return db[_0x7cd4('0x27')][_0x7cd4('0x44')]({'where':{'id':_0x4c11e0[_0x7cd4('0x43')]['id']}})['then'](handleEntityNotFound(_0x45080d,null))['then'](saveUpdates(_[_0x7cd4('0x36')](_0x4c11e0[_0x7cd4('0x6c')],[_0x7cd4('0x24'),_0x7cd4('0x75')]),null))['then'](respondWithResult(_0x45080d,null))['catch'](handleError(_0x45080d,null));};exports[_0x7cd4('0x76')]=function(_0x3efeb3,_0xf5db28,_0x523e72){return db[_0x7cd4('0x27')][_0x7cd4('0x44')]({'where':{'id':_0x3efeb3[_0x7cd4('0x43')]['id']}})[_0x7cd4('0x1e')](function(_0x652225){if(_0x652225){return _0x652225[_0x7cd4('0x1f')]();}})[_0x7cd4('0x1e')](function(_0x388f66){var _0x2ba792=path['join'](config[_0x7cd4('0x48')],_0x7cd4('0x55'),util[_0x7cd4('0x4e')](_0x7cd4('0x4f'),_0x388f66[_0x7cd4('0x46')],_0x388f66['original_format']));var _0x1480a5=path[_0x7cd4('0x4d')](config[_0x7cd4('0x48')],'server/files/sounds/converted',util['format'](_0x7cd4('0x4f'),_0x388f66[_0x7cd4('0x46')],_0x388f66[_0x7cd4('0x4a')]));fs[_0x7cd4('0x5c')](_0x2ba792);fs[_0x7cd4('0x5c')](_0x1480a5);return _0x388f66;})[_0x7cd4('0x1e')](function(_0x4cc883){if(_0x4cc883){return _0xf5db28[_0x7cd4('0x15')](0xcc)[_0x7cd4('0x14')]();}})[_0x7cd4('0x1e')](handleEntityNotFound(_0xf5db28,null))[_0x7cd4('0x41')](handleError(_0xf5db28,null));};
\ No newline at end of file
diff --git a/server/api/sound/sound.model.js b/server/api/sound/sound.model.js
index 0ec2a5f..4d0bd23 100644
--- a/server/api/sound/sound.model.js
+++ b/server/api/sound/sound.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x18ad=['path','../../config/environment','exports','define','Sound','tools_sounds','lodash','../../config/logger','moment','bluebird','request-promise'];(function(_0x35eb4c,_0x57dc96){var _0x5f5a1d=function(_0x54a8fc){while(--_0x54a8fc){_0x35eb4c['push'](_0x35eb4c['shift']());}};_0x5f5a1d(++_0x57dc96);}(_0x18ad,0xf8));var _0xd18a=function(_0x1ee62e,_0x159bb2){_0x1ee62e=_0x1ee62e-0x0;var _0x27c6c8=_0x18ad[_0x1ee62e];return _0x27c6c8;};'use strict';var _=require(_0xd18a('0x0'));var util=require('util');var logger=require(_0xd18a('0x1'))('api');var moment=require(_0xd18a('0x2'));var BPromise=require(_0xd18a('0x3'));var rp=require(_0xd18a('0x4'));var fs=require('fs');var path=require(_0xd18a('0x5'));var rimraf=require('rimraf');var config=require(_0xd18a('0x6'));var attributes=require('./sound.attributes');module[_0xd18a('0x7')]=function(_0x390e1e,_0x29e718){return _0x390e1e[_0xd18a('0x8')](_0xd18a('0x9'),attributes,{'tableName':_0xd18a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xff14=['util','../../config/logger','moment','bluebird','../../config/environment','define','Sound','tools_sounds'];(function(_0x278cb8,_0xe0d7f1){var _0x3bfbea=function(_0x317b46){while(--_0x317b46){_0x278cb8['push'](_0x278cb8['shift']());}};_0x3bfbea(++_0xe0d7f1);}(_0xff14,0x1a8));var _0x4ff1=function(_0x15d913,_0x51cf7a){_0x15d913=_0x15d913-0x0;var _0x4ae65e=_0xff14[_0x15d913];return _0x4ae65e;};'use strict';var _=require('lodash');var util=require(_0x4ff1('0x0'));var logger=require(_0x4ff1('0x1'))('api');var moment=require(_0x4ff1('0x2'));var BPromise=require(_0x4ff1('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x4ff1('0x4'));var attributes=require('./sound.attributes');module['exports']=function(_0x510f33,_0x2e4c6f){return _0x510f33[_0x4ff1('0x5')](_0x4ff1('0x6'),attributes,{'tableName':_0x4ff1('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/sound/sound.rpc.js b/server/api/sound/sound.rpc.js
index 3583726..99e8a85 100644
--- a/server/api/sound/sound.rpc.js
+++ b/server/api/sound/sound.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['request\x20sent','debug','Sound,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowSound','Sound','options','raw','where','include','model','attributes','map','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','Sound,\x20%s,\x20%s'];(function(_0x33843e,_0xa4a794){var _0x3d8b5f=function(_0x25b8f0){while(--_0x25b8f0){_0x33843e['push'](_0x33843e['shift']());}};_0x3d8b5f(++_0xa4a794);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0d8b('0x2'));var db=require(_0x0d8b('0x3'))['db'];var utils=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0d8b('0x7')][_0x0d8b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x39f43a,_0x4a4470,_0x413284){return new BPromise(function(_0x284169,_0x58e4e2){return client[_0x0d8b('0x9')](_0x39f43a,_0x413284)[_0x0d8b('0xa')](function(_0x3b027f){logger[_0x0d8b('0xb')](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));logger[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x4a4470,'request\x20sent',JSON[_0x0d8b('0x10')](_0x3b027f));if(_0x3b027f['error']){if(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x12')]===0x1f4){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x58e4e2(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x284169(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}else{logger['info'](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));_0x284169(_0x3b027f[_0x0d8b('0x14')][_0x0d8b('0x13')]);}})[_0x0d8b('0x15')](function(_0x5cd485){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x5cd485);_0x58e4e2(_0x5cd485);});});}exports[_0x0d8b('0x16')]=function(_0x5fecbd){var _0x333674=this;return new Promise(function(_0x18dd2d,_0x264b39){return db[_0x0d8b('0x17')]['find']({'raw':_0x5fecbd[_0x0d8b('0x18')]?_0x5fecbd[_0x0d8b('0x18')][_0x0d8b('0x19')]===undefined?!![]:![]:!![],'where':_0x5fecbd[_0x0d8b('0x18')]?_0x5fecbd[_0x0d8b('0x18')][_0x0d8b('0x1a')]||null:null,'attributes':_0x5fecbd[_0x0d8b('0x18')]?_0x5fecbd[_0x0d8b('0x18')]['attributes']||null:null,'include':_0x5fecbd['options']?_0x5fecbd[_0x0d8b('0x18')]['include']?_['map'](_0x5fecbd['options'][_0x0d8b('0x1b')],function(_0x2b924f){return{'model':db[_0x2b924f[_0x0d8b('0x1c')]],'as':_0x2b924f['as'],'attributes':_0x2b924f[_0x0d8b('0x1d')],'include':_0x2b924f[_0x0d8b('0x1b')]?_[_0x0d8b('0x1e')](_0x2b924f[_0x0d8b('0x1b')],function(_0x4562cb){return{'model':db[_0x4562cb[_0x0d8b('0x1c')]],'as':_0x4562cb['as'],'attributes':_0x4562cb['attributes'],'include':_0x4562cb[_0x0d8b('0x1b')]?_[_0x0d8b('0x1e')](_0x4562cb['include'],function(_0xe1ef20){return{'model':db[_0xe1ef20['model']],'as':_0xe1ef20['as'],'attributes':_0xe1ef20[_0x0d8b('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x0d8b('0xa')](function(_0xa2af02){logger['info']('ShowSound',_0x5fecbd);logger[_0x0d8b('0xe')](_0x0d8b('0x16'),_0x5fecbd,JSON['stringify'](_0xa2af02));_0x18dd2d(_0xa2af02);})[_0x0d8b('0x15')](function(_0x59aa83){logger[_0x0d8b('0x11')]('ShowSound',_0x59aa83[_0x0d8b('0x13')],_0x5fecbd);_0x264b39(_0x333674['error'](0x1f4,_0x59aa83[_0x0d8b('0x13')]));});});};
\ No newline at end of file
+var _0xd8b0=['request\x20sent','debug','Sound,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowSound','Sound','options','raw','where','include','model','attributes','map','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','Sound,\x20%s,\x20%s'];(function(_0x4ae4be,_0x3d6348){var _0x3aa438=function(_0x1c2420){while(--_0x1c2420){_0x4ae4be['push'](_0x4ae4be['shift']());}};_0x3aa438(++_0x3d6348);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0d8b('0x2'));var db=require(_0x0d8b('0x3'))['db'];var utils=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0d8b('0x7')][_0x0d8b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x39f43a,_0x4a4470,_0x413284){return new BPromise(function(_0x284169,_0x58e4e2){return client[_0x0d8b('0x9')](_0x39f43a,_0x413284)[_0x0d8b('0xa')](function(_0x3b027f){logger[_0x0d8b('0xb')](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));logger[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x4a4470,'request\x20sent',JSON[_0x0d8b('0x10')](_0x3b027f));if(_0x3b027f['error']){if(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x12')]===0x1f4){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x58e4e2(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x284169(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}else{logger['info'](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));_0x284169(_0x3b027f[_0x0d8b('0x14')][_0x0d8b('0x13')]);}})[_0x0d8b('0x15')](function(_0x5cd485){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x5cd485);_0x58e4e2(_0x5cd485);});});}exports[_0x0d8b('0x16')]=function(_0x5fecbd){var _0x333674=this;return new Promise(function(_0x18dd2d,_0x264b39){return db[_0x0d8b('0x17')]['find']({'raw':_0x5fecbd[_0x0d8b('0x18')]?_0x5fecbd[_0x0d8b('0x18')][_0x0d8b('0x19')]===undefined?!![]:![]:!![],'where':_0x5fecbd[_0x0d8b('0x18')]?_0x5fecbd[_0x0d8b('0x18')][_0x0d8b('0x1a')]||null:null,'attributes':_0x5fecbd[_0x0d8b('0x18')]?_0x5fecbd[_0x0d8b('0x18')]['attributes']||null:null,'include':_0x5fecbd['options']?_0x5fecbd[_0x0d8b('0x18')]['include']?_['map'](_0x5fecbd['options'][_0x0d8b('0x1b')],function(_0x2b924f){return{'model':db[_0x2b924f[_0x0d8b('0x1c')]],'as':_0x2b924f['as'],'attributes':_0x2b924f[_0x0d8b('0x1d')],'include':_0x2b924f[_0x0d8b('0x1b')]?_[_0x0d8b('0x1e')](_0x2b924f[_0x0d8b('0x1b')],function(_0x4562cb){return{'model':db[_0x4562cb[_0x0d8b('0x1c')]],'as':_0x4562cb['as'],'attributes':_0x4562cb['attributes'],'include':_0x4562cb[_0x0d8b('0x1b')]?_[_0x0d8b('0x1e')](_0x4562cb['include'],function(_0xe1ef20){return{'model':db[_0xe1ef20['model']],'as':_0xe1ef20['as'],'attributes':_0xe1ef20[_0x0d8b('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x0d8b('0xa')](function(_0xa2af02){logger['info']('ShowSound',_0x5fecbd);logger[_0x0d8b('0xe')](_0x0d8b('0x16'),_0x5fecbd,JSON['stringify'](_0xa2af02));_0x18dd2d(_0xa2af02);})[_0x0d8b('0x15')](function(_0x59aa83){logger[_0x0d8b('0x11')]('ShowSound',_0x59aa83[_0x0d8b('0x13')],_0x5fecbd);_0x264b39(_0x333674['error'](0x1f4,_0x59aa83[_0x0d8b('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/squareMessage/index.js b/server/api/squareMessage/index.js
index d5575c9..224ebd4 100644
--- a/server/api/squareMessage/index.js
+++ b/server/api/squareMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb676=['get','/:id','post','create','delete','destroy','multer','path','connect-timeout','express','Router','../../config/environment','./squareMessage.controller','isAuthenticated'];(function(_0x387777,_0x356171){var _0x3f84c0=function(_0x4d4423){while(--_0x4d4423){_0x387777['push'](_0x387777['shift']());}};_0x3f84c0(++_0x356171);}(_0xb676,0xbc));var _0x6b67=function(_0x19159a,_0x1cb5c3){_0x19159a=_0x19159a-0x0;var _0xa677f4=_0xb676[_0x19159a];return _0xa677f4;};'use strict';var multer=require(_0x6b67('0x0'));var util=require('util');var path=require(_0x6b67('0x1'));var timeout=require(_0x6b67('0x2'));var express=require(_0x6b67('0x3'));var router=express[_0x6b67('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x6b67('0x5'));var controller=require(_0x6b67('0x6'));router['get']('/',auth[_0x6b67('0x7')](),controller['index']);router[_0x6b67('0x8')](_0x6b67('0x9'),auth[_0x6b67('0x7')](),controller['show']);router[_0x6b67('0xa')]('/',auth[_0x6b67('0x7')](),controller[_0x6b67('0xb')]);router['put'](_0x6b67('0x9'),auth[_0x6b67('0x7')](),controller['update']);router[_0x6b67('0xc')](_0x6b67('0x9'),auth[_0x6b67('0x7')](),controller[_0x6b67('0xd')]);module['exports']=router;
\ No newline at end of file
+var _0x44a3=['multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./squareMessage.controller','get','isAuthenticated','index','create','put','/:id','delete','destroy'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x44a3,0x1a9));var _0x344a=function(_0x385b70,_0x52974f){_0x385b70=_0x385b70-0x0;var _0x33e2ef=_0x44a3[_0x385b70];return _0x33e2ef;};'use strict';var multer=require(_0x344a('0x0'));var util=require(_0x344a('0x1'));var path=require(_0x344a('0x2'));var timeout=require(_0x344a('0x3'));var express=require(_0x344a('0x4'));var router=express[_0x344a('0x5')]();var auth=require(_0x344a('0x6'));var interaction=require(_0x344a('0x7'));var config=require('../../config/environment');var controller=require(_0x344a('0x8'));router[_0x344a('0x9')]('/',auth[_0x344a('0xa')](),controller[_0x344a('0xb')]);router[_0x344a('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x344a('0xa')](),controller[_0x344a('0xc')]);router[_0x344a('0xd')](_0x344a('0xe'),auth[_0x344a('0xa')](),controller['update']);router[_0x344a('0xf')](_0x344a('0xe'),auth['isAuthenticated'](),controller[_0x344a('0x10')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.attributes.js b/server/api/squareMessage/squareMessage.attributes.js
index 54129c0..964169c 100644
--- a/server/api/squareMessage/squareMessage.attributes.js
+++ b/server/api/squareMessage/squareMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf251=['sequelize','exports','TEXT','ENUM','out'];(function(_0x270716,_0x56318e){var _0x44cab4=function(_0x5ef645){while(--_0x5ef645){_0x270716['push'](_0x270716['shift']());}};_0x44cab4(++_0x56318e);}(_0xf251,0xdc));var _0x1f25=function(_0x3bd961,_0x26f947){_0x3bd961=_0x3bd961-0x0;var _0xbeeb8e=_0xf251[_0x3bd961];return _0xbeeb8e;};'use strict';var Sequelize=require(_0x1f25('0x0'));module[_0x1f25('0x1')]={'uniqueid':{'type':Sequelize['STRING']},'body':{'type':Sequelize[_0x1f25('0x2')]('medium'),'allowNull':![]},'direction':{'type':Sequelize[_0x1f25('0x3')]('in',_0x1f25('0x4')),'defaultValue':_0x1f25('0x4'),'allowNull':![]}};
\ No newline at end of file
+var _0x1c82=['STRING','TEXT','medium','ENUM','out','sequelize','exports'];(function(_0x35da42,_0x5c2610){var _0x370035=function(_0x546db5){while(--_0x546db5){_0x35da42['push'](_0x35da42['shift']());}};_0x370035(++_0x5c2610);}(_0x1c82,0x171));var _0x21c8=function(_0x6cbf86,_0x30b9cd){_0x6cbf86=_0x6cbf86-0x0;var _0x3e3924=_0x1c82[_0x6cbf86];return _0x3e3924;};'use strict';var Sequelize=require(_0x21c8('0x0'));module[_0x21c8('0x1')]={'uniqueid':{'type':Sequelize[_0x21c8('0x2')]},'body':{'type':Sequelize[_0x21c8('0x3')](_0x21c8('0x4')),'allowNull':![]},'direction':{'type':Sequelize[_0x21c8('0x5')]('in',_0x21c8('0x6')),'defaultValue':'out','allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.controller.js b/server/api/squareMessage/squareMessage.controller.js
index 4b5c016..e0b58e9 100644
--- a/server/api/squareMessage/squareMessage.controller.js
+++ b/server/api/squareMessage/squareMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc97e=['hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','key','field','includeAll','include','findAll','rows','catch','show','keys','find','create','body','params','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','SquareMessage','rawAttributes','model','query','filters','intersection','attributes','fields','length'];(function(_0x34b02e,_0x80e586){var _0x22d937=function(_0x493340){while(--_0x493340){_0x34b02e['push'](_0x34b02e['shift']());}};_0x22d937(++_0x80e586);}(_0xc97e,0x1c6));var _0xec97=function(_0x2f10e4,_0x445b0a){_0x2f10e4=_0x2f10e4-0x0;var _0x482dea=_0xc97e[_0x2f10e4];return _0x482dea;};'use strict';var pdf=require(_0xec97('0x0'));var emlformat=require(_0xec97('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xec97('0x2'));var jsonpatch=require(_0xec97('0x3'));var rp=require(_0xec97('0x4'));var moment=require(_0xec97('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xec97('0x6'));var util=require(_0xec97('0x7'));var path=require(_0xec97('0x8'));var sox=require(_0xec97('0x9'));var csv=require(_0xec97('0xa'));var ejs=require(_0xec97('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0xec97('0xc'));var crypto=require('crypto');var jsforce=require(_0xec97('0xd'));var deskjs=require(_0xec97('0xe'));var toCsv=require(_0xec97('0xa'));var querystring=require(_0xec97('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xec97('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xec97('0x11'));var logger=require(_0xec97('0x12'))(_0xec97('0x13'));var utils=require(_0xec97('0x14'));var config=require('../../config/environment');var db=require(_0xec97('0x15'))['db'];function respondWithStatusCode(_0x261310,_0x18d14a){_0x18d14a=_0x18d14a||0xcc;return function(_0x494531){if(_0x494531){return _0x261310[_0xec97('0x16')](_0x18d14a);}return _0x261310[_0xec97('0x17')](_0x18d14a)[_0xec97('0x18')]();};}function respondWithResult(_0x51bc34,_0x2d04bf){_0x2d04bf=_0x2d04bf||0xc8;return function(_0x529dfa){if(_0x529dfa){return _0x51bc34[_0xec97('0x17')](_0x2d04bf)[_0xec97('0x19')](_0x529dfa);}};}function respondWithFilteredResult(_0x213dfb,_0x265024){return function(_0x553843){if(_0x553843){var _0x147dfa=_0x553843[_0xec97('0x1a')],_0x152e07=_0x265024[_0xec97('0x1b')],_0x1c2b3c=_0x265024[_0xec97('0x1b')]+_0x265024[_0xec97('0x1c')],_0x135f10;if(_0x1c2b3c>=_0x147dfa){_0x1c2b3c=_0x147dfa;_0x135f10=0xc8;}else{_0x135f10=0xce;}_0x213dfb['status'](_0x135f10);return _0x213dfb[_0xec97('0x1d')](_0xec97('0x1e'),_0x152e07+'-'+_0x1c2b3c+'/'+_0x147dfa)[_0xec97('0x19')](_0x553843);}return null;};}function patchUpdates(_0x4988eb){return function(_0x10c9c3){try{jsonpatch[_0xec97('0x1f')](_0x10c9c3,_0x4988eb,!![]);}catch(_0x12267e){return BPromise[_0xec97('0x20')](_0x12267e);}return _0x10c9c3[_0xec97('0x21')]();};}function saveUpdates(_0x535e31,_0x4e7270){return function(_0x27641e){if(_0x27641e){return _0x27641e[_0xec97('0x22')](_0x535e31)[_0xec97('0x23')](function(_0x257c62){return _0x257c62;});}return null;};}function removeEntity(_0x57187b,_0x3479e3){return function(_0x3ced69){if(_0x3ced69){return _0x3ced69[_0xec97('0x24')]()[_0xec97('0x23')](function(){_0x57187b[_0xec97('0x17')](0xcc)[_0xec97('0x18')]();});}};}function handleEntityNotFound(_0x483963,_0x31c9f1){return function(_0x3cbfd2){if(!_0x3cbfd2){_0x483963[_0xec97('0x16')](0x194);}return _0x3cbfd2;};}function handleError(_0x29fed2,_0x229a72){_0x229a72=_0x229a72||0x1f4;return function(_0x190948){logger[_0xec97('0x25')](_0x190948[_0xec97('0x26')]);if(_0x190948[_0xec97('0x27')]){delete _0x190948[_0xec97('0x27')];}_0x29fed2[_0xec97('0x17')](_0x229a72)[_0xec97('0x28')](_0x190948);};}exports['index']=function(_0x235b08,_0x4ba695){var _0x551688={},_0x17a978={},_0x45db59={'count':0x0,'rows':[]};var _0x8e62ce=db[_0xec97('0x29')][_0xec97('0x2a')];_0x17a978[_0xec97('0x2b')]=_['keys'](_0x8e62ce);_0x17a978[_0xec97('0x2c')]=_['keys'](_0x235b08['query']);_0x17a978[_0xec97('0x2d')]=_[_0xec97('0x2e')](_0x17a978[_0xec97('0x2b')],_0x17a978[_0xec97('0x2c')]);_0x551688[_0xec97('0x2f')]=_[_0xec97('0x2e')](_0x17a978[_0xec97('0x2b')],qs[_0xec97('0x30')](_0x235b08[_0xec97('0x2c')][_0xec97('0x30')]));_0x551688[_0xec97('0x2f')]=_0x551688[_0xec97('0x2f')][_0xec97('0x31')]?_0x551688['attributes']:_0x17a978[_0xec97('0x2b')];if(!_0x235b08[_0xec97('0x2c')][_0xec97('0x32')](_0xec97('0x33'))){_0x551688[_0xec97('0x1c')]=qs['limit'](_0x235b08[_0xec97('0x2c')][_0xec97('0x1c')]);_0x551688[_0xec97('0x1b')]=qs[_0xec97('0x1b')](_0x235b08[_0xec97('0x2c')][_0xec97('0x1b')]);}_0x551688[_0xec97('0x34')]=qs['sort'](_0x235b08[_0xec97('0x2c')][_0xec97('0x35')]);_0x551688[_0xec97('0x36')]=qs['filters'](_[_0xec97('0x37')](_0x235b08[_0xec97('0x2c')],_0x17a978[_0xec97('0x2d')]));if(_0x235b08[_0xec97('0x2c')][_0xec97('0x38')]){_0x551688[_0xec97('0x36')]=_[_0xec97('0x39')](_0x551688[_0xec97('0x36')],{'$or':_[_0xec97('0x3a')](_0x8e62ce,function(_0x60152c){if(_0x60152c['type'][_0xec97('0x3b')]!=='VIRTUAL'){var _0x8b2dce={};_0x8b2dce[_0x60152c[_0xec97('0x3c')]]={'$like':'%'+_0x235b08[_0xec97('0x2c')][_0xec97('0x38')]+'%'};return _0x8b2dce;}})});}_0x551688=_[_0xec97('0x39')]({},_0x551688,_0x235b08['options']);var _0x1e71e1={'where':_0x551688[_0xec97('0x36')]};return db[_0xec97('0x29')]['count'](_0x1e71e1)[_0xec97('0x23')](function(_0x2e2281){_0x45db59['count']=_0x2e2281;if(_0x235b08[_0xec97('0x2c')][_0xec97('0x3d')]){_0x551688[_0xec97('0x3e')]=[{'all':!![]}];}return db[_0xec97('0x29')][_0xec97('0x3f')](_0x551688);})[_0xec97('0x23')](function(_0x510eaf){_0x45db59[_0xec97('0x40')]=_0x510eaf;return _0x45db59;})['then'](respondWithFilteredResult(_0x4ba695,_0x551688))[_0xec97('0x41')](handleError(_0x4ba695,null));};exports[_0xec97('0x42')]=function(_0x683af7,_0x458110){var _0x5f15c6={'raw':!![],'where':{'id':_0x683af7['params']['id']}},_0x185f19={};_0x185f19['model']=_[_0xec97('0x43')](db['SquareMessage'][_0xec97('0x2a')]);_0x185f19[_0xec97('0x2c')]=_[_0xec97('0x43')](_0x683af7[_0xec97('0x2c')]);_0x185f19['filters']=_[_0xec97('0x2e')](_0x185f19[_0xec97('0x2b')],_0x185f19['query']);_0x5f15c6[_0xec97('0x2f')]=_[_0xec97('0x2e')](_0x185f19[_0xec97('0x2b')],qs['fields'](_0x683af7[_0xec97('0x2c')][_0xec97('0x30')]));_0x5f15c6[_0xec97('0x2f')]=_0x5f15c6[_0xec97('0x2f')][_0xec97('0x31')]?_0x5f15c6[_0xec97('0x2f')]:_0x185f19[_0xec97('0x2b')];if(_0x683af7[_0xec97('0x2c')]['includeAll']){_0x5f15c6['include']=[{'all':!![]}];}_0x5f15c6=_['merge']({},_0x5f15c6,_0x683af7['options']);return db['SquareMessage'][_0xec97('0x44')](_0x5f15c6)[_0xec97('0x23')](handleEntityNotFound(_0x458110,null))['then'](respondWithResult(_0x458110,null))[_0xec97('0x41')](handleError(_0x458110,null));};exports[_0xec97('0x45')]=function(_0xb71b10,_0x2785ef){return db['SquareMessage'][_0xec97('0x45')](_0xb71b10[_0xec97('0x46')],{})['then'](respondWithResult(_0x2785ef,0xc9))[_0xec97('0x41')](handleError(_0x2785ef,null));};exports[_0xec97('0x22')]=function(_0x3217e3,_0x1848dd){if(_0x3217e3[_0xec97('0x46')]['id']){delete _0x3217e3[_0xec97('0x46')]['id'];}return db[_0xec97('0x29')][_0xec97('0x44')]({'where':{'id':_0x3217e3[_0xec97('0x47')]['id']}})[_0xec97('0x23')](handleEntityNotFound(_0x1848dd,null))['then'](saveUpdates(_0x3217e3[_0xec97('0x46')],null))['then'](respondWithResult(_0x1848dd,null))[_0xec97('0x41')](handleError(_0x1848dd,null));};exports[_0xec97('0x24')]=function(_0xb2bdae,_0x4f87bc){return db[_0xec97('0x29')][_0xec97('0x44')]({'where':{'id':_0xb2bdae[_0xec97('0x47')]['id']}})[_0xec97('0x23')](handleEntityNotFound(_0x4f87bc,null))[_0xec97('0x23')](removeEntity(_0x4f87bc,null))[_0xec97('0x41')](handleError(_0x4f87bc,null));};
\ No newline at end of file
+var _0xb7fc=['sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','end','error','name','index','SquareMessage','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','type','VIRTUAL','field','merge','options','includeAll','findAll','catch','show','find','create','body','params','html-pdf','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x4b81be,_0x3469ca){var _0x57b0c2=function(_0x2a5608){while(--_0x2a5608){_0x4b81be['push'](_0x4b81be['shift']());}};_0x57b0c2(++_0x3469ca);}(_0xb7fc,0x193));var _0xcb7f=function(_0x179d86,_0x139c2c){_0x179d86=_0x179d86-0x0;var _0x437ec7=_0xb7fc[_0x179d86];return _0x437ec7;};'use strict';var pdf=require(_0xcb7f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xcb7f('0x1'));var zipdir=require(_0xcb7f('0x2'));var jsonpatch=require(_0xcb7f('0x3'));var rp=require('request-promise');var moment=require(_0xcb7f('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xcb7f('0x5'));var util=require(_0xcb7f('0x6'));var path=require(_0xcb7f('0x7'));var sox=require(_0xcb7f('0x8'));var csv=require('to-csv');var ejs=require(_0xcb7f('0x9'));var fs=require('fs');var _=require(_0xcb7f('0xa'));var squel=require('squel');var crypto=require(_0xcb7f('0xb'));var jsforce=require(_0xcb7f('0xc'));var deskjs=require(_0xcb7f('0xd'));var toCsv=require(_0xcb7f('0xe'));var querystring=require(_0xcb7f('0xf'));var Papa=require('papaparse');var Redis=require(_0xcb7f('0x10'));var authService=require(_0xcb7f('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xcb7f('0x12'));var logger=require(_0xcb7f('0x13'))(_0xcb7f('0x14'));var utils=require(_0xcb7f('0x15'));var config=require(_0xcb7f('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x26ab7d,_0x1d5811){_0x1d5811=_0x1d5811||0xcc;return function(_0x2f24af){if(_0x2f24af){return _0x26ab7d[_0xcb7f('0x17')](_0x1d5811);}return _0x26ab7d[_0xcb7f('0x18')](_0x1d5811)['end']();};}function respondWithResult(_0x344273,_0x5b77ae){_0x5b77ae=_0x5b77ae||0xc8;return function(_0x4c8934){if(_0x4c8934){return _0x344273[_0xcb7f('0x18')](_0x5b77ae)[_0xcb7f('0x19')](_0x4c8934);}};}function respondWithFilteredResult(_0x1cb0cf,_0x56f678){return function(_0x3a7419){if(_0x3a7419){var _0x53871a=_0x3a7419[_0xcb7f('0x1a')],_0x1a4763=_0x56f678['offset'],_0xef694f=_0x56f678[_0xcb7f('0x1b')]+_0x56f678[_0xcb7f('0x1c')],_0x202a3a;if(_0xef694f>=_0x53871a){_0xef694f=_0x53871a;_0x202a3a=0xc8;}else{_0x202a3a=0xce;}_0x1cb0cf['status'](_0x202a3a);return _0x1cb0cf[_0xcb7f('0x1d')](_0xcb7f('0x1e'),_0x1a4763+'-'+_0xef694f+'/'+_0x53871a)[_0xcb7f('0x19')](_0x3a7419);}return null;};}function patchUpdates(_0x462ac6){return function(_0x54bc13){try{jsonpatch[_0xcb7f('0x1f')](_0x54bc13,_0x462ac6,!![]);}catch(_0x4a577e){return BPromise[_0xcb7f('0x20')](_0x4a577e);}return _0x54bc13[_0xcb7f('0x21')]();};}function saveUpdates(_0x55c01d,_0x496cfa){return function(_0x4f8b9f){if(_0x4f8b9f){return _0x4f8b9f[_0xcb7f('0x22')](_0x55c01d)[_0xcb7f('0x23')](function(_0x5d5c8a){return _0x5d5c8a;});}return null;};}function removeEntity(_0x508fb9,_0x5dfbfa){return function(_0x584046){if(_0x584046){return _0x584046[_0xcb7f('0x24')]()[_0xcb7f('0x23')](function(){_0x508fb9['status'](0xcc)[_0xcb7f('0x25')]();});}};}function handleEntityNotFound(_0x56719b,_0x31e351){return function(_0x16c21f){if(!_0x16c21f){_0x56719b['sendStatus'](0x194);}return _0x16c21f;};}function handleError(_0x447188,_0x98a0ba){_0x98a0ba=_0x98a0ba||0x1f4;return function(_0x801502){logger[_0xcb7f('0x26')](_0x801502['stack']);if(_0x801502[_0xcb7f('0x27')]){delete _0x801502[_0xcb7f('0x27')];}_0x447188[_0xcb7f('0x18')](_0x98a0ba)['send'](_0x801502);};}exports[_0xcb7f('0x28')]=function(_0x41e2aa,_0x3895f8){var _0x17ee54={},_0xc689b4={},_0x4706b7={'count':0x0,'rows':[]};var _0x5e6e22=db[_0xcb7f('0x29')][_0xcb7f('0x2a')];_0xc689b4[_0xcb7f('0x2b')]=_[_0xcb7f('0x2c')](_0x5e6e22);_0xc689b4[_0xcb7f('0x2d')]=_['keys'](_0x41e2aa[_0xcb7f('0x2d')]);_0xc689b4[_0xcb7f('0x2e')]=_[_0xcb7f('0x2f')](_0xc689b4['model'],_0xc689b4[_0xcb7f('0x2d')]);_0x17ee54[_0xcb7f('0x30')]=_[_0xcb7f('0x2f')](_0xc689b4[_0xcb7f('0x2b')],qs[_0xcb7f('0x31')](_0x41e2aa[_0xcb7f('0x2d')][_0xcb7f('0x31')]));_0x17ee54['attributes']=_0x17ee54[_0xcb7f('0x30')][_0xcb7f('0x32')]?_0x17ee54[_0xcb7f('0x30')]:_0xc689b4[_0xcb7f('0x2b')];if(!_0x41e2aa[_0xcb7f('0x2d')][_0xcb7f('0x33')](_0xcb7f('0x34'))){_0x17ee54[_0xcb7f('0x1c')]=qs[_0xcb7f('0x1c')](_0x41e2aa['query']['limit']);_0x17ee54[_0xcb7f('0x1b')]=qs[_0xcb7f('0x1b')](_0x41e2aa[_0xcb7f('0x2d')][_0xcb7f('0x1b')]);}_0x17ee54[_0xcb7f('0x35')]=qs[_0xcb7f('0x36')](_0x41e2aa[_0xcb7f('0x2d')]['sort']);_0x17ee54['where']=qs[_0xcb7f('0x2e')](_[_0xcb7f('0x37')](_0x41e2aa['query'],_0xc689b4[_0xcb7f('0x2e')]));if(_0x41e2aa[_0xcb7f('0x2d')][_0xcb7f('0x38')]){_0x17ee54[_0xcb7f('0x39')]=_['merge'](_0x17ee54[_0xcb7f('0x39')],{'$or':_['map'](_0x5e6e22,function(_0x15073b){if(_0x15073b[_0xcb7f('0x3a')]['key']!==_0xcb7f('0x3b')){var _0x2b1e38={};_0x2b1e38[_0x15073b[_0xcb7f('0x3c')]]={'$like':'%'+_0x41e2aa[_0xcb7f('0x2d')]['filter']+'%'};return _0x2b1e38;}})});}_0x17ee54=_[_0xcb7f('0x3d')]({},_0x17ee54,_0x41e2aa[_0xcb7f('0x3e')]);var _0x2bbfec={'where':_0x17ee54[_0xcb7f('0x39')]};return db['SquareMessage'][_0xcb7f('0x1a')](_0x2bbfec)[_0xcb7f('0x23')](function(_0x51b908){_0x4706b7['count']=_0x51b908;if(_0x41e2aa[_0xcb7f('0x2d')][_0xcb7f('0x3f')]){_0x17ee54['include']=[{'all':!![]}];}return db[_0xcb7f('0x29')][_0xcb7f('0x40')](_0x17ee54);})['then'](function(_0x27de83){_0x4706b7['rows']=_0x27de83;return _0x4706b7;})[_0xcb7f('0x23')](respondWithFilteredResult(_0x3895f8,_0x17ee54))[_0xcb7f('0x41')](handleError(_0x3895f8,null));};exports[_0xcb7f('0x42')]=function(_0x5c83be,_0x4bc2cc){var _0x30ea3b={'raw':!![],'where':{'id':_0x5c83be['params']['id']}},_0x278921={};_0x278921[_0xcb7f('0x2b')]=_['keys'](db[_0xcb7f('0x29')][_0xcb7f('0x2a')]);_0x278921[_0xcb7f('0x2d')]=_[_0xcb7f('0x2c')](_0x5c83be[_0xcb7f('0x2d')]);_0x278921[_0xcb7f('0x2e')]=_[_0xcb7f('0x2f')](_0x278921['model'],_0x278921[_0xcb7f('0x2d')]);_0x30ea3b[_0xcb7f('0x30')]=_[_0xcb7f('0x2f')](_0x278921[_0xcb7f('0x2b')],qs['fields'](_0x5c83be[_0xcb7f('0x2d')]['fields']));_0x30ea3b[_0xcb7f('0x30')]=_0x30ea3b[_0xcb7f('0x30')]['length']?_0x30ea3b[_0xcb7f('0x30')]:_0x278921[_0xcb7f('0x2b')];if(_0x5c83be[_0xcb7f('0x2d')][_0xcb7f('0x3f')]){_0x30ea3b['include']=[{'all':!![]}];}_0x30ea3b=_[_0xcb7f('0x3d')]({},_0x30ea3b,_0x5c83be['options']);return db[_0xcb7f('0x29')][_0xcb7f('0x43')](_0x30ea3b)[_0xcb7f('0x23')](handleEntityNotFound(_0x4bc2cc,null))[_0xcb7f('0x23')](respondWithResult(_0x4bc2cc,null))[_0xcb7f('0x41')](handleError(_0x4bc2cc,null));};exports[_0xcb7f('0x44')]=function(_0x126279,_0xabc1e){return db[_0xcb7f('0x29')][_0xcb7f('0x44')](_0x126279[_0xcb7f('0x45')],{})[_0xcb7f('0x23')](respondWithResult(_0xabc1e,0xc9))[_0xcb7f('0x41')](handleError(_0xabc1e,null));};exports[_0xcb7f('0x22')]=function(_0x14c516,_0xb4ae44){if(_0x14c516[_0xcb7f('0x45')]['id']){delete _0x14c516['body']['id'];}return db['SquareMessage']['find']({'where':{'id':_0x14c516[_0xcb7f('0x46')]['id']}})[_0xcb7f('0x23')](handleEntityNotFound(_0xb4ae44,null))[_0xcb7f('0x23')](saveUpdates(_0x14c516[_0xcb7f('0x45')],null))[_0xcb7f('0x23')](respondWithResult(_0xb4ae44,null))[_0xcb7f('0x41')](handleError(_0xb4ae44,null));};exports[_0xcb7f('0x24')]=function(_0x8ea93e,_0x47faa6){return db['SquareMessage'][_0xcb7f('0x43')]({'where':{'id':_0x8ea93e[_0xcb7f('0x46')]['id']}})[_0xcb7f('0x23')](handleEntityNotFound(_0x47faa6,null))[_0xcb7f('0x23')](removeEntity(_0x47faa6,null))[_0xcb7f('0x41')](handleError(_0x47faa6,null));};
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.model.js b/server/api/squareMessage/squareMessage.model.js
index 4359e64..d5cacda 100644
--- a/server/api/squareMessage/squareMessage.model.js
+++ b/server/api/squareMessage/squareMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6e74=['api','moment','bluebird','path','rimraf','./squareMessage.attributes','exports','define','lodash'];(function(_0x32f7d7,_0x54231b){var _0x133d09=function(_0x41a7ab){while(--_0x41a7ab){_0x32f7d7['push'](_0x32f7d7['shift']());}};_0x133d09(++_0x54231b);}(_0x6e74,0xb3));var _0x46e7=function(_0x1e7f0d,_0x23ff13){_0x1e7f0d=_0x1e7f0d-0x0;var _0x1fe8ae=_0x6e74[_0x1e7f0d];return _0x1fe8ae;};'use strict';var _=require(_0x46e7('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x46e7('0x1'));var moment=require(_0x46e7('0x2'));var BPromise=require(_0x46e7('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x46e7('0x4'));var rimraf=require(_0x46e7('0x5'));var config=require('../../config/environment');var attributes=require(_0x46e7('0x6'));module[_0x46e7('0x7')]=function(_0x539162,_0x330b13){return _0x539162[_0x46e7('0x8')]('SquareMessage',attributes,{'tableName':'square_messages','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x02fb=['square_messages','lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','exports','SquareMessage'];(function(_0x39db05,_0x747f45){var _0x2e7ce5=function(_0x4470d1){while(--_0x4470d1){_0x39db05['push'](_0x39db05['shift']());}};_0x2e7ce5(++_0x747f45);}(_0x02fb,0x109));var _0xb02f=function(_0x4bc79b,_0x19e9e8){_0x4bc79b=_0x4bc79b-0x0;var _0x32d49a=_0x02fb[_0x4bc79b];return _0x32d49a;};'use strict';var _=require(_0xb02f('0x0'));var util=require('util');var logger=require(_0xb02f('0x1'))(_0xb02f('0x2'));var moment=require(_0xb02f('0x3'));var BPromise=require(_0xb02f('0x4'));var rp=require(_0xb02f('0x5'));var fs=require('fs');var path=require(_0xb02f('0x6'));var rimraf=require('rimraf');var config=require(_0xb02f('0x7'));var attributes=require('./squareMessage.attributes');module[_0xb02f('0x8')]=function(_0x461acc,_0x317f60){return _0x461acc['define'](_0xb02f('0x9'),attributes,{'tableName':_0xb02f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.rpc.js b/server/api/squareMessage/squareMessage.rpc.js
index 6a91848..b1589c9 100644
--- a/server/api/squareMessage/squareMessage.rpc.js
+++ b/server/api/squareMessage/squareMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb2f3=['message','result','catch','CreateSquareMessage','create','body','options','raw','stringify','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','then','info','request\x20sent','debug','error','code','SquareMessage,\x20%s,\x20%s'];(function(_0x16dfee,_0x1dba0b){var _0x3ced82=function(_0x1fac3f){while(--_0x1fac3f){_0x16dfee['push'](_0x16dfee['shift']());}};_0x3ced82(++_0x1dba0b);}(_0xb2f3,0x1b2));var _0x3b2f=function(_0x36884e,_0x48008f){_0x36884e=_0x36884e-0x0;var _0x1cc367=_0xb2f3[_0x36884e];return _0x1cc367;};'use strict';var _=require('lodash');var util=require(_0x3b2f('0x0'));var moment=require('moment');var BPromise=require(_0x3b2f('0x1'));var rs=require(_0x3b2f('0x2'));var fs=require('fs');var Redis=require(_0x3b2f('0x3'));var db=require(_0x3b2f('0x4'))['db'];var utils=require(_0x3b2f('0x5'));var logger=require('../../config/logger')(_0x3b2f('0x6'));var config=require('../../config/environment');var jayson=require(_0x3b2f('0x7'));var client=jayson[_0x3b2f('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3f2cfe,_0x3570b9,_0xe6b4fd){return new BPromise(function(_0xd4d40b,_0x201a04){return client['request'](_0x3f2cfe,_0xe6b4fd)[_0x3b2f('0x9')](function(_0xdd7db5){logger[_0x3b2f('0xa')]('SquareMessage,\x20%s,\x20%s',_0x3570b9,_0x3b2f('0xb'));logger[_0x3b2f('0xc')]('SquareMessage,\x20%s,\x20%s,\x20%s',_0x3570b9,_0x3b2f('0xb'),JSON['stringify'](_0xdd7db5));if(_0xdd7db5[_0x3b2f('0xd')]){if(_0xdd7db5['error'][_0x3b2f('0xe')]===0x1f4){logger['error'](_0x3b2f('0xf'),_0x3570b9,_0xdd7db5[_0x3b2f('0xd')]['message']);return _0x201a04(_0xdd7db5['error'][_0x3b2f('0x10')]);}logger[_0x3b2f('0xd')](_0x3b2f('0xf'),_0x3570b9,_0xdd7db5[_0x3b2f('0xd')][_0x3b2f('0x10')]);return _0xd4d40b(_0xdd7db5[_0x3b2f('0xd')]['message']);}else{logger[_0x3b2f('0xa')](_0x3b2f('0xf'),_0x3570b9,'request\x20sent');_0xd4d40b(_0xdd7db5[_0x3b2f('0x11')]['message']);}})[_0x3b2f('0x12')](function(_0x13d3bd){logger[_0x3b2f('0xd')](_0x3b2f('0xf'),_0x3570b9,_0x13d3bd);_0x201a04(_0x13d3bd);});});}exports[_0x3b2f('0x13')]=function(_0x24f886){var _0x4ed8ca=this;return new Promise(function(_0x1f1bff,_0x437fb3){return db['SquareMessage'][_0x3b2f('0x14')](_0x24f886[_0x3b2f('0x15')],{'raw':_0x24f886[_0x3b2f('0x16')]?_0x24f886['options'][_0x3b2f('0x17')]===undefined?!![]:![]:!![]})[_0x3b2f('0x9')](function(_0x5da506){logger[_0x3b2f('0xa')]('CreateSquareMessage',_0x24f886);logger[_0x3b2f('0xc')](_0x3b2f('0x13'),_0x24f886,JSON[_0x3b2f('0x18')](_0x5da506));_0x1f1bff(_0x5da506);})[_0x3b2f('0x12')](function(_0x1c1551){logger[_0x3b2f('0xd')]('CreateSquareMessage',_0x1c1551[_0x3b2f('0x10')],_0x24f886);_0x437fb3(_0x4ed8ca[_0x3b2f('0xd')](0x1f4,_0x1c1551['message']));});});};
\ No newline at end of file
+var _0xd1e0=['../../config/environment','jayson/promise','http','request','then','info','SquareMessage,\x20%s,\x20%s','request\x20sent','debug','SquareMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateSquareMessage','SquareMessage','create','body','options','raw','stringify','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x3f3f40,_0x4c71f4){var _0x403b7a=function(_0x509014){while(--_0x509014){_0x3f3f40['push'](_0x3f3f40['shift']());}};_0x403b7a(++_0x4c71f4);}(_0xd1e0,0x1ac));var _0x0d1e=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0xd1e0[_0x18ab2a];return _0x16dcee;};'use strict';var _=require(_0x0d1e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x0d1e('0x1'));var rs=require(_0x0d1e('0x2'));var fs=require('fs');var Redis=require(_0x0d1e('0x3'));var db=require(_0x0d1e('0x4'))['db'];var utils=require(_0x0d1e('0x5'));var logger=require('../../config/logger')(_0x0d1e('0x6'));var config=require(_0x0d1e('0x7'));var jayson=require(_0x0d1e('0x8'));var client=jayson['client'][_0x0d1e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x8f0585,_0x3ba6a1,_0x31d6c0){return new BPromise(function(_0x232734,_0x249bbe){return client[_0x0d1e('0xa')](_0x8f0585,_0x31d6c0)[_0x0d1e('0xb')](function(_0x41ae36){logger[_0x0d1e('0xc')](_0x0d1e('0xd'),_0x3ba6a1,_0x0d1e('0xe'));logger[_0x0d1e('0xf')](_0x0d1e('0x10'),_0x3ba6a1,_0x0d1e('0xe'),JSON['stringify'](_0x41ae36));if(_0x41ae36['error']){if(_0x41ae36[_0x0d1e('0x11')][_0x0d1e('0x12')]===0x1f4){logger[_0x0d1e('0x11')](_0x0d1e('0xd'),_0x3ba6a1,_0x41ae36[_0x0d1e('0x11')]['message']);return _0x249bbe(_0x41ae36['error']['message']);}logger[_0x0d1e('0x11')](_0x0d1e('0xd'),_0x3ba6a1,_0x41ae36[_0x0d1e('0x11')]['message']);return _0x232734(_0x41ae36[_0x0d1e('0x11')][_0x0d1e('0x13')]);}else{logger[_0x0d1e('0xc')](_0x0d1e('0xd'),_0x3ba6a1,_0x0d1e('0xe'));_0x232734(_0x41ae36[_0x0d1e('0x14')]['message']);}})[_0x0d1e('0x15')](function(_0x3b3f0e){logger['error'](_0x0d1e('0xd'),_0x3ba6a1,_0x3b3f0e);_0x249bbe(_0x3b3f0e);});});}exports[_0x0d1e('0x16')]=function(_0x13de3f){var _0x2e9101=this;return new Promise(function(_0x53c37a,_0x3f8c85){return db[_0x0d1e('0x17')][_0x0d1e('0x18')](_0x13de3f[_0x0d1e('0x19')],{'raw':_0x13de3f[_0x0d1e('0x1a')]?_0x13de3f['options'][_0x0d1e('0x1b')]===undefined?!![]:![]:!![]})[_0x0d1e('0xb')](function(_0x34b17b){logger[_0x0d1e('0xc')](_0x0d1e('0x16'),_0x13de3f);logger['debug'](_0x0d1e('0x16'),_0x13de3f,JSON[_0x0d1e('0x1c')](_0x34b17b));_0x53c37a(_0x34b17b);})[_0x0d1e('0x15')](function(_0x3cbcce){logger[_0x0d1e('0x11')]('CreateSquareMessage',_0x3cbcce['message'],_0x13de3f);_0x3f8c85(_0x2e9101[_0x0d1e('0x11')](0x1f4,_0x3cbcce[_0x0d1e('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/squareOdbc/index.js b/server/api/squareOdbc/index.js
index e8efb33..1b27572 100644
--- a/server/api/squareOdbc/index.js
+++ b/server/api/squareOdbc/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb9a7=['isAuthenticated','index','/:id','show','/:id/test','create','update','destroy','util','Router','../../components/interaction/service','../../config/environment','./squareOdbc.controller','get'];(function(_0xf0c94c,_0x45ba37){var _0x130452=function(_0xe9245f){while(--_0xe9245f){_0xf0c94c['push'](_0xf0c94c['shift']());}};_0x130452(++_0x45ba37);}(_0xb9a7,0x112));var _0x7b9a=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xb9a7[_0xfae23b];return _0x200640;};'use strict';var multer=require('multer');var util=require(_0x7b9a('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x7b9a('0x1')]();var auth=require('../../components/auth/service');var interaction=require(_0x7b9a('0x2'));var config=require(_0x7b9a('0x3'));var controller=require(_0x7b9a('0x4'));router[_0x7b9a('0x5')]('/',auth[_0x7b9a('0x6')](),controller[_0x7b9a('0x7')]);router[_0x7b9a('0x5')](_0x7b9a('0x8'),auth[_0x7b9a('0x6')](),controller[_0x7b9a('0x9')]);router['get'](_0x7b9a('0xa'),auth[_0x7b9a('0x6')](),timeout('15s'),controller['test']);router['post']('/',auth[_0x7b9a('0x6')](),controller[_0x7b9a('0xb')]);router['put'](_0x7b9a('0x8'),auth['isAuthenticated'](),controller[_0x7b9a('0xc')]);router['delete'](_0x7b9a('0x8'),auth[_0x7b9a('0x6')](),controller[_0x7b9a('0xd')]);module['exports']=router;
\ No newline at end of file
+var _0x8a9a=['get','isAuthenticated','index','/:id','/:id/test','15s','test','post','put','delete','destroy','exports','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service'];(function(_0x574617,_0x42eccc){var _0x29de90=function(_0x367aff){while(--_0x367aff){_0x574617['push'](_0x574617['shift']());}};_0x29de90(++_0x42eccc);}(_0x8a9a,0x193));var _0xa8a9=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x8a9a[_0x2d7f0e];return _0x110b07;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xa8a9('0x0'));var timeout=require(_0xa8a9('0x1'));var express=require(_0xa8a9('0x2'));var router=express['Router']();var auth=require(_0xa8a9('0x3'));var interaction=require(_0xa8a9('0x4'));var config=require('../../config/environment');var controller=require('./squareOdbc.controller');router[_0xa8a9('0x5')]('/',auth[_0xa8a9('0x6')](),controller[_0xa8a9('0x7')]);router[_0xa8a9('0x5')](_0xa8a9('0x8'),auth['isAuthenticated'](),controller['show']);router[_0xa8a9('0x5')](_0xa8a9('0x9'),auth[_0xa8a9('0x6')](),timeout(_0xa8a9('0xa')),controller[_0xa8a9('0xb')]);router[_0xa8a9('0xc')]('/',auth[_0xa8a9('0x6')](),controller['create']);router[_0xa8a9('0xd')]('/:id',auth[_0xa8a9('0x6')](),controller['update']);router[_0xa8a9('0xe')](_0xa8a9('0x8'),auth[_0xa8a9('0x6')](),controller[_0xa8a9('0xf')]);module[_0xa8a9('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.attributes.js b/server/api/squareOdbc/squareOdbc.attributes.js
index a9b5a98..83faaa1 100644
--- a/server/api/squareOdbc/squareOdbc.attributes.js
+++ b/server/api/squareOdbc/squareOdbc.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x018d=['sequelize','exports','name','STRING'];(function(_0x822ece,_0x9e72fb){var _0x589150=function(_0x839078){while(--_0x839078){_0x822ece['push'](_0x822ece['shift']());}};_0x589150(++_0x9e72fb);}(_0x018d,0x10c));var _0xd018=function(_0x485e5d,_0x5b6dfd){_0x485e5d=_0x485e5d-0x0;var _0xe47c92=_0x018d[_0x485e5d];return _0xe47c92;};'use strict';var Sequelize=require(_0xd018('0x0'));module[_0xd018('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xd018('0x2'),'allowNull':![]},'dsn':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xd018('0x3')]}};
\ No newline at end of file
+var _0x3a5e=['STRING','name','sequelize'];(function(_0x2f88bf,_0x761a0e){var _0x1b451e=function(_0x1116fa){while(--_0x1116fa){_0x2f88bf['push'](_0x2f88bf['shift']());}};_0x1b451e(++_0x761a0e);}(_0x3a5e,0xaa));var _0xe3a5=function(_0x1f995a,_0x4b94b0){_0x1f995a=_0x1f995a-0x0;var _0x374bb2=_0x3a5e[_0x1f995a];return _0x374bb2;};'use strict';var Sequelize=require(_0xe3a5('0x0'));module['exports']={'name':{'type':Sequelize[_0xe3a5('0x1')],'unique':_0xe3a5('0x2'),'allowNull':![]},'dsn':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xe3a5('0x1')]}};
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.controller.js b/server/api/squareOdbc/squareOdbc.controller.js
index 1181b2a..24c67d1 100644
--- a/server/api/squareOdbc/squareOdbc.controller.js
+++ b/server/api/squareOdbc/squareOdbc.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7f09=['crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','apply','then','destroy','get','UserProfileResource','error','stack','name','send','SquareOdbc','rawAttributes','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','key','field','merge','options','includeAll','findAll','rows','catch','show','params','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','ODBC','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','test','dsn','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel'];(function(_0x4a5c9e,_0x5bec39){var _0x55b760=function(_0x2e51c4){while(--_0x2e51c4){_0x4a5c9e['push'](_0x4a5c9e['shift']());}};_0x55b760(++_0x5bec39);}(_0x7f09,0x174));var _0x97f0=function(_0x2dd9fe,_0x4653fc){_0x2dd9fe=_0x2dd9fe-0x0;var _0x979e87=_0x7f09[_0x2dd9fe];return _0x979e87;};'use strict';var pdf=require(_0x97f0('0x0'));var emlformat=require(_0x97f0('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x97f0('0x2'));var jsonpatch=require(_0x97f0('0x3'));var rp=require(_0x97f0('0x4'));var moment=require(_0x97f0('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x97f0('0x6'));var util=require(_0x97f0('0x7'));var path=require(_0x97f0('0x8'));var sox=require('sox');var csv=require(_0x97f0('0x9'));var ejs=require(_0x97f0('0xa'));var fs=require('fs');var _=require(_0x97f0('0xb'));var squel=require(_0x97f0('0xc'));var crypto=require(_0x97f0('0xd'));var jsforce=require(_0x97f0('0xe'));var deskjs=require(_0x97f0('0xf'));var toCsv=require(_0x97f0('0x9'));var querystring=require('querystring');var Papa=require(_0x97f0('0x10'));var Redis=require('ioredis');var authService=require(_0x97f0('0x11'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x97f0('0x12'));var logger=require(_0x97f0('0x13'))('api');var utils=require(_0x97f0('0x14'));var config=require(_0x97f0('0x15'));var db=require(_0x97f0('0x16'))['db'];function respondWithStatusCode(_0x4e3cc8,_0x2bee44){_0x2bee44=_0x2bee44||0xcc;return function(_0x392cca){if(_0x392cca){return _0x4e3cc8[_0x97f0('0x17')](_0x2bee44);}return _0x4e3cc8[_0x97f0('0x18')](_0x2bee44)[_0x97f0('0x19')]();};}function respondWithResult(_0x5bd61d,_0x4ba1a8){_0x4ba1a8=_0x4ba1a8||0xc8;return function(_0x4540d2){if(_0x4540d2){return _0x5bd61d[_0x97f0('0x18')](_0x4ba1a8)[_0x97f0('0x1a')](_0x4540d2);}};}function respondWithFilteredResult(_0xdc0470,_0x2c51d5){return function(_0x62bd1a){if(_0x62bd1a){var _0x78fb44=_0x62bd1a[_0x97f0('0x1b')],_0x1200a0=_0x2c51d5[_0x97f0('0x1c')],_0x49e7d2=_0x2c51d5['offset']+_0x2c51d5[_0x97f0('0x1d')],_0x2b1c1c;if(_0x49e7d2>=_0x78fb44){_0x49e7d2=_0x78fb44;_0x2b1c1c=0xc8;}else{_0x2b1c1c=0xce;}_0xdc0470[_0x97f0('0x18')](_0x2b1c1c);return _0xdc0470[_0x97f0('0x1e')]('Content-Range',_0x1200a0+'-'+_0x49e7d2+'/'+_0x78fb44)['json'](_0x62bd1a);}return null;};}function patchUpdates(_0x32ce9b){return function(_0x3299e8){try{jsonpatch[_0x97f0('0x1f')](_0x3299e8,_0x32ce9b,!![]);}catch(_0x146eaf){return BPromise['reject'](_0x146eaf);}return _0x3299e8['save']();};}function saveUpdates(_0x16b483,_0x3e0500){return function(_0x1e60a5){if(_0x1e60a5){return _0x1e60a5['update'](_0x16b483)[_0x97f0('0x20')](function(_0x4c1cb5){return _0x4c1cb5;});}return null;};}function removeEntity(_0x227631,_0x461548){return function(_0x1b49a5){if(_0x1b49a5){return _0x1b49a5[_0x97f0('0x21')]()[_0x97f0('0x20')](function(){var _0x26732f=_0x1b49a5[_0x97f0('0x22')]({'plain':!![]});var _0x4719a1='ODBC';return db[_0x97f0('0x23')][_0x97f0('0x21')]({'where':{'type':_0x4719a1,'resourceId':_0x26732f['id']}})[_0x97f0('0x20')](function(){return _0x1b49a5;});})[_0x97f0('0x20')](function(){_0x227631[_0x97f0('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x33096a,_0x1b5ebd){return function(_0x45f6da){if(!_0x45f6da){_0x33096a[_0x97f0('0x17')](0x194);}return _0x45f6da;};}function handleError(_0x28f962,_0x554b8d){_0x554b8d=_0x554b8d||0x1f4;return function(_0x8bbe17){logger[_0x97f0('0x24')](_0x8bbe17[_0x97f0('0x25')]);if(_0x8bbe17[_0x97f0('0x26')]){delete _0x8bbe17[_0x97f0('0x26')];}_0x28f962[_0x97f0('0x18')](_0x554b8d)[_0x97f0('0x27')](_0x8bbe17);};}exports['index']=function(_0x3b56c2,_0x34c9b6){var _0x5a0528={},_0x1908e6={},_0x2dfb57={'count':0x0,'rows':[]};var _0x414a92=db[_0x97f0('0x28')][_0x97f0('0x29')];_0x1908e6['model']=_['keys'](_0x414a92);_0x1908e6[_0x97f0('0x2a')]=_[_0x97f0('0x2b')](_0x3b56c2[_0x97f0('0x2a')]);_0x1908e6[_0x97f0('0x2c')]=_[_0x97f0('0x2d')](_0x1908e6[_0x97f0('0x2e')],_0x1908e6[_0x97f0('0x2a')]);_0x5a0528[_0x97f0('0x2f')]=_[_0x97f0('0x2d')](_0x1908e6[_0x97f0('0x2e')],qs[_0x97f0('0x30')](_0x3b56c2[_0x97f0('0x2a')][_0x97f0('0x30')]));_0x5a0528['attributes']=_0x5a0528[_0x97f0('0x2f')][_0x97f0('0x31')]?_0x5a0528[_0x97f0('0x2f')]:_0x1908e6[_0x97f0('0x2e')];if(!_0x3b56c2[_0x97f0('0x2a')][_0x97f0('0x32')](_0x97f0('0x33'))){_0x5a0528['limit']=qs[_0x97f0('0x1d')](_0x3b56c2['query'][_0x97f0('0x1d')]);_0x5a0528['offset']=qs[_0x97f0('0x1c')](_0x3b56c2[_0x97f0('0x2a')][_0x97f0('0x1c')]);}_0x5a0528[_0x97f0('0x34')]=qs[_0x97f0('0x35')](_0x3b56c2[_0x97f0('0x2a')][_0x97f0('0x35')]);_0x5a0528['where']=qs[_0x97f0('0x2c')](_[_0x97f0('0x36')](_0x3b56c2[_0x97f0('0x2a')],_0x1908e6[_0x97f0('0x2c')]));if(_0x3b56c2['query'][_0x97f0('0x37')]){_0x5a0528[_0x97f0('0x38')]=_['merge'](_0x5a0528[_0x97f0('0x38')],{'$or':_['map'](_0x414a92,function(_0x5ced0a){if(_0x5ced0a['type'][_0x97f0('0x39')]!=='VIRTUAL'){var _0xd9bf12={};_0xd9bf12[_0x5ced0a[_0x97f0('0x3a')]]={'$like':'%'+_0x3b56c2[_0x97f0('0x2a')][_0x97f0('0x37')]+'%'};return _0xd9bf12;}})});}_0x5a0528=_[_0x97f0('0x3b')]({},_0x5a0528,_0x3b56c2[_0x97f0('0x3c')]);var _0xc3acd0={'where':_0x5a0528['where']};return db[_0x97f0('0x28')][_0x97f0('0x1b')](_0xc3acd0)[_0x97f0('0x20')](function(_0x35dc3e){_0x2dfb57[_0x97f0('0x1b')]=_0x35dc3e;if(_0x3b56c2[_0x97f0('0x2a')][_0x97f0('0x3d')]){_0x5a0528['include']=[{'all':!![]}];}return db[_0x97f0('0x28')][_0x97f0('0x3e')](_0x5a0528);})[_0x97f0('0x20')](function(_0x23da3d){_0x2dfb57[_0x97f0('0x3f')]=_0x23da3d;return _0x2dfb57;})[_0x97f0('0x20')](respondWithFilteredResult(_0x34c9b6,_0x5a0528))[_0x97f0('0x40')](handleError(_0x34c9b6,null));};exports[_0x97f0('0x41')]=function(_0x597812,_0x3b51d4){var _0x235e2a={'raw':!![],'where':{'id':_0x597812[_0x97f0('0x42')]['id']}},_0x2d69e5={};_0x2d69e5['model']=_[_0x97f0('0x2b')](db[_0x97f0('0x28')][_0x97f0('0x29')]);_0x2d69e5[_0x97f0('0x2a')]=_[_0x97f0('0x2b')](_0x597812[_0x97f0('0x2a')]);_0x2d69e5[_0x97f0('0x2c')]=_[_0x97f0('0x2d')](_0x2d69e5[_0x97f0('0x2e')],_0x2d69e5['query']);_0x235e2a[_0x97f0('0x2f')]=_[_0x97f0('0x2d')](_0x2d69e5[_0x97f0('0x2e')],qs[_0x97f0('0x30')](_0x597812[_0x97f0('0x2a')]['fields']));_0x235e2a[_0x97f0('0x2f')]=_0x235e2a[_0x97f0('0x2f')][_0x97f0('0x31')]?_0x235e2a[_0x97f0('0x2f')]:_0x2d69e5[_0x97f0('0x2e')];if(_0x597812[_0x97f0('0x2a')][_0x97f0('0x3d')]){_0x235e2a[_0x97f0('0x43')]=[{'all':!![]}];}_0x235e2a=_[_0x97f0('0x3b')]({},_0x235e2a,_0x597812[_0x97f0('0x3c')]);return db[_0x97f0('0x28')][_0x97f0('0x44')](_0x235e2a)[_0x97f0('0x20')](handleEntityNotFound(_0x3b51d4,null))[_0x97f0('0x20')](respondWithResult(_0x3b51d4,null))[_0x97f0('0x40')](handleError(_0x3b51d4,null));};exports['create']=function(_0x27b48b,_0x5650aa){return db['SquareOdbc'][_0x97f0('0x45')](_0x27b48b[_0x97f0('0x46')],{})[_0x97f0('0x20')](function(_0x2721db){var _0x28b424=_0x27b48b[_0x97f0('0x47')][_0x97f0('0x22')]({'plain':!![]});if(!_0x28b424)throw new Error(_0x97f0('0x48'));if(_0x28b424['role']===_0x97f0('0x47')){var _0x1eda36=_0x2721db['get']({'plain':!![]});var _0x45a306=_0x97f0('0x49');return db['UserProfileSection'][_0x97f0('0x44')]({'where':{'name':_0x45a306,'userProfileId':_0x28b424['userProfileId']},'raw':!![]})[_0x97f0('0x20')](function(_0x2c0200){if(_0x2c0200&&_0x2c0200['autoAssociation']===0x0){return db[_0x97f0('0x23')]['create']({'name':_0x1eda36['name'],'resourceId':_0x1eda36['id'],'type':_0x2c0200[_0x97f0('0x26')],'sectionId':_0x2c0200['id']},{})[_0x97f0('0x20')](function(){return _0x2721db;});}else{return _0x2721db;}})['catch'](function(_0x1dfa0d){logger[_0x97f0('0x24')](_0x97f0('0x4a'),_0x1dfa0d);throw _0x1dfa0d;});}return _0x2721db;})['then'](respondWithResult(_0x5650aa,0xc9))[_0x97f0('0x40')](handleError(_0x5650aa,null));};exports['update']=function(_0x12620f,_0xf9a2ae){if(_0x12620f[_0x97f0('0x46')]['id']){delete _0x12620f['body']['id'];}return db['SquareOdbc'][_0x97f0('0x44')]({'where':{'id':_0x12620f['params']['id']}})[_0x97f0('0x20')](handleEntityNotFound(_0xf9a2ae,null))['then'](saveUpdates(_0x12620f[_0x97f0('0x46')],null))['then'](respondWithResult(_0xf9a2ae,null))[_0x97f0('0x40')](handleError(_0xf9a2ae,null));};exports[_0x97f0('0x21')]=function(_0x5f26f8,_0x222923){return db[_0x97f0('0x28')][_0x97f0('0x44')]({'where':{'id':_0x5f26f8['params']['id']}})[_0x97f0('0x20')](handleEntityNotFound(_0x222923,null))[_0x97f0('0x20')](removeEntity(_0x222923,null))[_0x97f0('0x40')](handleError(_0x222923,null));};exports[_0x97f0('0x4b')]=function(_0x2eb82f,_0x3d2cce,_0x308061){var _0x3099a7;return db[_0x97f0('0x28')][_0x97f0('0x44')]({'where':{'id':_0x2eb82f[_0x97f0('0x42')]['id']},'attributes':['id',_0x97f0('0x4c')]})[_0x97f0('0x20')](handleEntityNotFound(_0x3d2cce,null))[_0x97f0('0x20')](function(_0x3a4a1a){if(_0x3a4a1a){var _0x32c983=require('odbc')();_0x32c983['openSync'](_0x3a4a1a[_0x97f0('0x4c')]);_0x32c983['closeSync']();return _0x3a4a1a;}})[_0x97f0('0x20')](respondWithResult(_0x3d2cce,null))[_0x97f0('0x40')](handleError(_0x3d2cce,null));};
\ No newline at end of file
+var _0x32ad=['desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','end','status','json','count','offset','limit','set','Content-Range','save','update','then','destroy','get','ODBC','UserProfileResource','error','name','send','SquareOdbc','rawAttributes','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','filter','merge','map','type','VIRTUAL','field','options','includeAll','include','findAll','catch','show','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','test','dsn','odbc','openSync','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce'];(function(_0x175a34,_0x29eadf){var _0x3afdf8=function(_0xd7c9dd){while(--_0xd7c9dd){_0x175a34['push'](_0x175a34['shift']());}};_0x3afdf8(++_0x29eadf);}(_0x32ad,0x99));var _0xd32a=function(_0x2118b3,_0x596128){_0x2118b3=_0x2118b3-0x0;var _0x10bb6b=_0x32ad[_0x2118b3];return _0x10bb6b;};'use strict';var pdf=require(_0xd32a('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xd32a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd32a('0x2'));var rp=require(_0xd32a('0x3'));var moment=require(_0xd32a('0x4'));var BPromise=require(_0xd32a('0x5'));var Mustache=require(_0xd32a('0x6'));var util=require(_0xd32a('0x7'));var path=require(_0xd32a('0x8'));var sox=require('sox');var csv=require(_0xd32a('0x9'));var ejs=require(_0xd32a('0xa'));var fs=require('fs');var _=require(_0xd32a('0xb'));var squel=require(_0xd32a('0xc'));var crypto=require(_0xd32a('0xd'));var jsforce=require(_0xd32a('0xe'));var deskjs=require(_0xd32a('0xf'));var toCsv=require(_0xd32a('0x9'));var querystring=require(_0xd32a('0x10'));var Papa=require(_0xd32a('0x11'));var Redis=require('ioredis');var authService=require(_0xd32a('0x12'));var qs=require(_0xd32a('0x13'));var hardwareService=require(_0xd32a('0x14'));var logger=require(_0xd32a('0x15'))(_0xd32a('0x16'));var utils=require(_0xd32a('0x17'));var config=require(_0xd32a('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xde6345,_0xd76e7b){_0xd76e7b=_0xd76e7b||0xcc;return function(_0x1d83ac){if(_0x1d83ac){return _0xde6345[_0xd32a('0x19')](_0xd76e7b);}return _0xde6345['status'](_0xd76e7b)[_0xd32a('0x1a')]();};}function respondWithResult(_0x1febe6,_0x1dc386){_0x1dc386=_0x1dc386||0xc8;return function(_0x1feef3){if(_0x1feef3){return _0x1febe6[_0xd32a('0x1b')](_0x1dc386)[_0xd32a('0x1c')](_0x1feef3);}};}function respondWithFilteredResult(_0x2e3d16,_0xa5dd2){return function(_0x2be815){if(_0x2be815){var _0x43b50e=_0x2be815[_0xd32a('0x1d')],_0x2ab5f5=_0xa5dd2[_0xd32a('0x1e')],_0x4c34e4=_0xa5dd2['offset']+_0xa5dd2[_0xd32a('0x1f')],_0x54d945;if(_0x4c34e4>=_0x43b50e){_0x4c34e4=_0x43b50e;_0x54d945=0xc8;}else{_0x54d945=0xce;}_0x2e3d16[_0xd32a('0x1b')](_0x54d945);return _0x2e3d16[_0xd32a('0x20')](_0xd32a('0x21'),_0x2ab5f5+'-'+_0x4c34e4+'/'+_0x43b50e)[_0xd32a('0x1c')](_0x2be815);}return null;};}function patchUpdates(_0x22512b){return function(_0x466f2a){try{jsonpatch['apply'](_0x466f2a,_0x22512b,!![]);}catch(_0x1a3314){return BPromise['reject'](_0x1a3314);}return _0x466f2a[_0xd32a('0x22')]();};}function saveUpdates(_0x153144,_0x29db45){return function(_0x524494){if(_0x524494){return _0x524494[_0xd32a('0x23')](_0x153144)[_0xd32a('0x24')](function(_0x30bc87){return _0x30bc87;});}return null;};}function removeEntity(_0x113457,_0x5d3349){return function(_0x5d79f2){if(_0x5d79f2){return _0x5d79f2[_0xd32a('0x25')]()['then'](function(){var _0x146235=_0x5d79f2[_0xd32a('0x26')]({'plain':!![]});var _0x2ec9f0=_0xd32a('0x27');return db[_0xd32a('0x28')]['destroy']({'where':{'type':_0x2ec9f0,'resourceId':_0x146235['id']}})['then'](function(){return _0x5d79f2;});})[_0xd32a('0x24')](function(){_0x113457[_0xd32a('0x1b')](0xcc)[_0xd32a('0x1a')]();});}};}function handleEntityNotFound(_0x35fdd5,_0x36d05f){return function(_0x298b63){if(!_0x298b63){_0x35fdd5['sendStatus'](0x194);}return _0x298b63;};}function handleError(_0x5f4c11,_0x579d98){_0x579d98=_0x579d98||0x1f4;return function(_0x4d5a2e){logger[_0xd32a('0x29')](_0x4d5a2e['stack']);if(_0x4d5a2e[_0xd32a('0x2a')]){delete _0x4d5a2e[_0xd32a('0x2a')];}_0x5f4c11[_0xd32a('0x1b')](_0x579d98)[_0xd32a('0x2b')](_0x4d5a2e);};}exports['index']=function(_0x95bfe0,_0x3f7f31){var _0x4a097b={},_0x400c21={},_0x46af49={'count':0x0,'rows':[]};var _0x89c278=db[_0xd32a('0x2c')][_0xd32a('0x2d')];_0x400c21[_0xd32a('0x2e')]=_[_0xd32a('0x2f')](_0x89c278);_0x400c21[_0xd32a('0x30')]=_[_0xd32a('0x2f')](_0x95bfe0['query']);_0x400c21['filters']=_[_0xd32a('0x31')](_0x400c21['model'],_0x400c21['query']);_0x4a097b[_0xd32a('0x32')]=_[_0xd32a('0x31')](_0x400c21['model'],qs['fields'](_0x95bfe0[_0xd32a('0x30')][_0xd32a('0x33')]));_0x4a097b['attributes']=_0x4a097b[_0xd32a('0x32')][_0xd32a('0x34')]?_0x4a097b[_0xd32a('0x32')]:_0x400c21['model'];if(!_0x95bfe0['query'][_0xd32a('0x35')]('nolimit')){_0x4a097b[_0xd32a('0x1f')]=qs[_0xd32a('0x1f')](_0x95bfe0['query'][_0xd32a('0x1f')]);_0x4a097b['offset']=qs[_0xd32a('0x1e')](_0x95bfe0[_0xd32a('0x30')][_0xd32a('0x1e')]);}_0x4a097b[_0xd32a('0x36')]=qs[_0xd32a('0x37')](_0x95bfe0['query'][_0xd32a('0x37')]);_0x4a097b[_0xd32a('0x38')]=qs[_0xd32a('0x39')](_['pick'](_0x95bfe0[_0xd32a('0x30')],_0x400c21[_0xd32a('0x39')]));if(_0x95bfe0[_0xd32a('0x30')][_0xd32a('0x3a')]){_0x4a097b[_0xd32a('0x38')]=_[_0xd32a('0x3b')](_0x4a097b[_0xd32a('0x38')],{'$or':_[_0xd32a('0x3c')](_0x89c278,function(_0x411b32){if(_0x411b32[_0xd32a('0x3d')]['key']!==_0xd32a('0x3e')){var _0x4d297c={};_0x4d297c[_0x411b32[_0xd32a('0x3f')]]={'$like':'%'+_0x95bfe0[_0xd32a('0x30')]['filter']+'%'};return _0x4d297c;}})});}_0x4a097b=_[_0xd32a('0x3b')]({},_0x4a097b,_0x95bfe0[_0xd32a('0x40')]);var _0x1bde7c={'where':_0x4a097b[_0xd32a('0x38')]};return db[_0xd32a('0x2c')]['count'](_0x1bde7c)[_0xd32a('0x24')](function(_0x4d406a){_0x46af49['count']=_0x4d406a;if(_0x95bfe0[_0xd32a('0x30')][_0xd32a('0x41')]){_0x4a097b[_0xd32a('0x42')]=[{'all':!![]}];}return db[_0xd32a('0x2c')][_0xd32a('0x43')](_0x4a097b);})[_0xd32a('0x24')](function(_0xf290de){_0x46af49['rows']=_0xf290de;return _0x46af49;})['then'](respondWithFilteredResult(_0x3f7f31,_0x4a097b))[_0xd32a('0x44')](handleError(_0x3f7f31,null));};exports[_0xd32a('0x45')]=function(_0x56be61,_0x379ec9){var _0x39d144={'raw':!![],'where':{'id':_0x56be61['params']['id']}},_0x23a7bc={};_0x23a7bc[_0xd32a('0x2e')]=_[_0xd32a('0x2f')](db[_0xd32a('0x2c')][_0xd32a('0x2d')]);_0x23a7bc['query']=_[_0xd32a('0x2f')](_0x56be61['query']);_0x23a7bc[_0xd32a('0x39')]=_[_0xd32a('0x31')](_0x23a7bc[_0xd32a('0x2e')],_0x23a7bc['query']);_0x39d144[_0xd32a('0x32')]=_[_0xd32a('0x31')](_0x23a7bc[_0xd32a('0x2e')],qs['fields'](_0x56be61[_0xd32a('0x30')][_0xd32a('0x33')]));_0x39d144[_0xd32a('0x32')]=_0x39d144[_0xd32a('0x32')][_0xd32a('0x34')]?_0x39d144['attributes']:_0x23a7bc['model'];if(_0x56be61[_0xd32a('0x30')]['includeAll']){_0x39d144[_0xd32a('0x42')]=[{'all':!![]}];}_0x39d144=_[_0xd32a('0x3b')]({},_0x39d144,_0x56be61[_0xd32a('0x40')]);return db['SquareOdbc'][_0xd32a('0x46')](_0x39d144)[_0xd32a('0x24')](handleEntityNotFound(_0x379ec9,null))[_0xd32a('0x24')](respondWithResult(_0x379ec9,null))['catch'](handleError(_0x379ec9,null));};exports[_0xd32a('0x47')]=function(_0x548135,_0x5071b4){return db[_0xd32a('0x2c')][_0xd32a('0x47')](_0x548135[_0xd32a('0x48')],{})['then'](function(_0x5692dd){var _0x593fbe=_0x548135[_0xd32a('0x49')][_0xd32a('0x26')]({'plain':!![]});if(!_0x593fbe)throw new Error(_0xd32a('0x4a'));if(_0x593fbe[_0xd32a('0x4b')]===_0xd32a('0x49')){var _0x45ed45=_0x5692dd[_0xd32a('0x26')]({'plain':!![]});var _0x2830bc=_0xd32a('0x27');return db['UserProfileSection']['find']({'where':{'name':_0x2830bc,'userProfileId':_0x593fbe[_0xd32a('0x4c')]},'raw':!![]})[_0xd32a('0x24')](function(_0x32e100){if(_0x32e100&&_0x32e100[_0xd32a('0x4d')]===0x0){return db['UserProfileResource'][_0xd32a('0x47')]({'name':_0x45ed45[_0xd32a('0x2a')],'resourceId':_0x45ed45['id'],'type':_0x32e100[_0xd32a('0x2a')],'sectionId':_0x32e100['id']},{})[_0xd32a('0x24')](function(){return _0x5692dd;});}else{return _0x5692dd;}})[_0xd32a('0x44')](function(_0x1967d1){logger[_0xd32a('0x29')](_0xd32a('0x4e'),_0x1967d1);throw _0x1967d1;});}return _0x5692dd;})['then'](respondWithResult(_0x5071b4,0xc9))[_0xd32a('0x44')](handleError(_0x5071b4,null));};exports[_0xd32a('0x23')]=function(_0x6271f7,_0x41f80f){if(_0x6271f7[_0xd32a('0x48')]['id']){delete _0x6271f7[_0xd32a('0x48')]['id'];}return db[_0xd32a('0x2c')][_0xd32a('0x46')]({'where':{'id':_0x6271f7[_0xd32a('0x4f')]['id']}})['then'](handleEntityNotFound(_0x41f80f,null))['then'](saveUpdates(_0x6271f7[_0xd32a('0x48')],null))[_0xd32a('0x24')](respondWithResult(_0x41f80f,null))['catch'](handleError(_0x41f80f,null));};exports[_0xd32a('0x25')]=function(_0x4e7a16,_0x3d8656){return db[_0xd32a('0x2c')][_0xd32a('0x46')]({'where':{'id':_0x4e7a16['params']['id']}})[_0xd32a('0x24')](handleEntityNotFound(_0x3d8656,null))[_0xd32a('0x24')](removeEntity(_0x3d8656,null))['catch'](handleError(_0x3d8656,null));};exports[_0xd32a('0x50')]=function(_0x90ecf7,_0x2584ab,_0x5ec120){var _0x2a3170;return db[_0xd32a('0x2c')][_0xd32a('0x46')]({'where':{'id':_0x90ecf7[_0xd32a('0x4f')]['id']},'attributes':['id',_0xd32a('0x51')]})[_0xd32a('0x24')](handleEntityNotFound(_0x2584ab,null))[_0xd32a('0x24')](function(_0x1a13d4){if(_0x1a13d4){var _0x210dd4=require(_0xd32a('0x52'))();_0x210dd4[_0xd32a('0x53')](_0x1a13d4[_0xd32a('0x51')]);_0x210dd4['closeSync']();return _0x1a13d4;}})[_0xd32a('0x24')](respondWithResult(_0x2584ab,null))['catch'](handleError(_0x2584ab,null));};
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.model.js b/server/api/squareOdbc/squareOdbc.model.js
index 5ee0353..d95902f 100644
--- a/server/api/squareOdbc/squareOdbc.model.js
+++ b/server/api/squareOdbc/squareOdbc.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeb3b=['request-promise','path','rimraf','../../config/environment','exports','define','SquareOdbc','square_odbc','lodash','../../config/logger','moment'];(function(_0x10a2d3,_0x47c606){var _0x206a62=function(_0x368c7a){while(--_0x368c7a){_0x10a2d3['push'](_0x10a2d3['shift']());}};_0x206a62(++_0x47c606);}(_0xeb3b,0x110));var _0xbeb3=function(_0x386306,_0x1363c9){_0x386306=_0x386306-0x0;var _0xcb23d=_0xeb3b[_0x386306];return _0xcb23d;};'use strict';var _=require(_0xbeb3('0x0'));var util=require('util');var logger=require(_0xbeb3('0x1'))('api');var moment=require(_0xbeb3('0x2'));var BPromise=require('bluebird');var rp=require(_0xbeb3('0x3'));var fs=require('fs');var path=require(_0xbeb3('0x4'));var rimraf=require(_0xbeb3('0x5'));var config=require(_0xbeb3('0x6'));var attributes=require('./squareOdbc.attributes');module[_0xbeb3('0x7')]=function(_0x510a94,_0xbd592){return _0x510a94[_0xbeb3('0x8')](_0xbeb3('0x9'),attributes,{'tableName':_0xbeb3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdad8=['request-promise','path','rimraf','../../config/environment','./squareOdbc.attributes','exports','square_odbc','lodash','../../config/logger','api','moment','bluebird'];(function(_0x1965c7,_0x47ec37){var _0x373770=function(_0x417c87){while(--_0x417c87){_0x1965c7['push'](_0x1965c7['shift']());}};_0x373770(++_0x47ec37);}(_0xdad8,0x73));var _0x8dad=function(_0x63f723,_0xa4aadd){_0x63f723=_0x63f723-0x0;var _0x165fad=_0xdad8[_0x63f723];return _0x165fad;};'use strict';var _=require(_0x8dad('0x0'));var util=require('util');var logger=require(_0x8dad('0x1'))(_0x8dad('0x2'));var moment=require(_0x8dad('0x3'));var BPromise=require(_0x8dad('0x4'));var rp=require(_0x8dad('0x5'));var fs=require('fs');var path=require(_0x8dad('0x6'));var rimraf=require(_0x8dad('0x7'));var config=require(_0x8dad('0x8'));var attributes=require(_0x8dad('0x9'));module[_0x8dad('0xa')]=function(_0x60b343,_0x232965){return _0x60b343['define']('SquareOdbc',attributes,{'tableName':_0x8dad('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.rpc.js b/server/api/squareOdbc/squareOdbc.rpc.js
index 97aa89d..15ad285 100644
--- a/server/api/squareOdbc/squareOdbc.rpc.js
+++ b/server/api/squareOdbc/squareOdbc.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x608f=['find','options','raw','where','attributes','include','model','map','ShowSquareOdbc','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','error','message','result','catch'];(function(_0x5b4e7a,_0x6dbe4b){var _0x404acc=function(_0xb80def){while(--_0xb80def){_0x5b4e7a['push'](_0x5b4e7a['shift']());}};_0x404acc(++_0x6dbe4b);}(_0x608f,0xc6));var _0xf608=function(_0x3c88e4,_0x38116a){_0x3c88e4=_0x3c88e4-0x0;var _0x3f3ae6=_0x608f[_0x3c88e4];return _0x3f3ae6;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf608('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf608('0x1'))['db'];var utils=require(_0xf608('0x2'));var logger=require(_0xf608('0x3'))(_0xf608('0x4'));var config=require('../../config/environment');var jayson=require(_0xf608('0x5'));var client=jayson[_0xf608('0x6')][_0xf608('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2aafce,_0x18887c,_0x32011d){return new BPromise(function(_0x258e10,_0x17e396){return client['request'](_0x2aafce,_0x32011d)[_0xf608('0x8')](function(_0x56cba2){logger[_0xf608('0x9')](_0xf608('0xa'),_0x18887c,_0xf608('0xb'));logger[_0xf608('0xc')](_0xf608('0xd'),_0x18887c,'request\x20sent',JSON['stringify'](_0x56cba2));if(_0x56cba2['error']){if(_0x56cba2[_0xf608('0xe')]['code']===0x1f4){logger[_0xf608('0xe')]('SquareOdbc,\x20%s,\x20%s',_0x18887c,_0x56cba2[_0xf608('0xe')][_0xf608('0xf')]);return _0x17e396(_0x56cba2['error'][_0xf608('0xf')]);}logger[_0xf608('0xe')]('SquareOdbc,\x20%s,\x20%s',_0x18887c,_0x56cba2['error']['message']);return _0x258e10(_0x56cba2['error'][_0xf608('0xf')]);}else{logger[_0xf608('0x9')](_0xf608('0xa'),_0x18887c,_0xf608('0xb'));_0x258e10(_0x56cba2[_0xf608('0x10')][_0xf608('0xf')]);}})[_0xf608('0x11')](function(_0x59a469){logger[_0xf608('0xe')](_0xf608('0xa'),_0x18887c,_0x59a469);_0x17e396(_0x59a469);});});}exports['ShowSquareOdbc']=function(_0x3df3a3){var _0x485668=this;return new Promise(function(_0x3f6d53,_0x4ff878){return db['SquareOdbc'][_0xf608('0x12')]({'raw':_0x3df3a3[_0xf608('0x13')]?_0x3df3a3[_0xf608('0x13')][_0xf608('0x14')]===undefined?!![]:![]:!![],'where':_0x3df3a3['options']?_0x3df3a3[_0xf608('0x13')][_0xf608('0x15')]||null:null,'attributes':_0x3df3a3[_0xf608('0x13')]?_0x3df3a3[_0xf608('0x13')][_0xf608('0x16')]||null:null,'include':_0x3df3a3[_0xf608('0x13')]?_0x3df3a3[_0xf608('0x13')][_0xf608('0x17')]?_['map'](_0x3df3a3[_0xf608('0x13')][_0xf608('0x17')],function(_0x251b1e){return{'model':db[_0x251b1e[_0xf608('0x18')]],'as':_0x251b1e['as'],'attributes':_0x251b1e[_0xf608('0x16')],'include':_0x251b1e[_0xf608('0x17')]?_[_0xf608('0x19')](_0x251b1e[_0xf608('0x17')],function(_0x515ea4){return{'model':db[_0x515ea4[_0xf608('0x18')]],'as':_0x515ea4['as'],'attributes':_0x515ea4['attributes'],'include':_0x515ea4[_0xf608('0x17')]?_[_0xf608('0x19')](_0x515ea4[_0xf608('0x17')],function(_0x5328f6){return{'model':db[_0x5328f6[_0xf608('0x18')]],'as':_0x5328f6['as'],'attributes':_0x5328f6[_0xf608('0x16')]};}):[]};}):[]};}):[]:[]})[_0xf608('0x8')](function(_0x69ab41){logger['info']('ShowSquareOdbc',_0x3df3a3);logger[_0xf608('0xc')](_0xf608('0x1a'),_0x3df3a3,JSON['stringify'](_0x69ab41));_0x3f6d53(_0x69ab41);})['catch'](function(_0x3d45b3){logger[_0xf608('0xe')](_0xf608('0x1a'),_0x3d45b3[_0xf608('0xf')],_0x3df3a3);_0x4ff878(_0x485668[_0xf608('0xe')](0x1f4,_0x3d45b3[_0xf608('0xf')]));});});};
\ No newline at end of file
+var _0xea6e=['find','options','where','attributes','include','model','lodash','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SquareOdbc,\x20%s,\x20%s','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','ShowSquareOdbc'];(function(_0x564702,_0x5239fd){var _0x1b76e6=function(_0xfd59a6){while(--_0xfd59a6){_0x564702['push'](_0x564702['shift']());}};_0x1b76e6(++_0x5239fd);}(_0xea6e,0x1c8));var _0xeea6=function(_0x490a5d,_0x22b24a){_0x490a5d=_0x490a5d-0x0;var _0x3a5c35=_0xea6e[_0x490a5d];return _0x3a5c35;};'use strict';var _=require(_0xeea6('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xeea6('0x1'));var rs=require(_0xeea6('0x2'));var fs=require('fs');var Redis=require(_0xeea6('0x3'));var db=require(_0xeea6('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xeea6('0x5'));var config=require(_0xeea6('0x6'));var jayson=require(_0xeea6('0x7'));var client=jayson[_0xeea6('0x8')][_0xeea6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x472894,_0x4448cb,_0x43135c){return new BPromise(function(_0x2fd276,_0x274265){return client[_0xeea6('0xa')](_0x472894,_0x43135c)[_0xeea6('0xb')](function(_0x131879){logger[_0xeea6('0xc')](_0xeea6('0xd'),_0x4448cb,'request\x20sent');logger[_0xeea6('0xe')](_0xeea6('0xf'),_0x4448cb,_0xeea6('0x10'),JSON[_0xeea6('0x11')](_0x131879));if(_0x131879[_0xeea6('0x12')]){if(_0x131879[_0xeea6('0x12')][_0xeea6('0x13')]===0x1f4){logger[_0xeea6('0x12')](_0xeea6('0xd'),_0x4448cb,_0x131879[_0xeea6('0x12')][_0xeea6('0x14')]);return _0x274265(_0x131879['error']['message']);}logger[_0xeea6('0x12')](_0xeea6('0xd'),_0x4448cb,_0x131879[_0xeea6('0x12')][_0xeea6('0x14')]);return _0x2fd276(_0x131879[_0xeea6('0x12')]['message']);}else{logger[_0xeea6('0xc')]('SquareOdbc,\x20%s,\x20%s',_0x4448cb,_0xeea6('0x10'));_0x2fd276(_0x131879[_0xeea6('0x15')][_0xeea6('0x14')]);}})[_0xeea6('0x16')](function(_0x1a4ea4){logger[_0xeea6('0x12')]('SquareOdbc,\x20%s,\x20%s',_0x4448cb,_0x1a4ea4);_0x274265(_0x1a4ea4);});});}exports[_0xeea6('0x17')]=function(_0x522ee8){var _0x105c1f=this;return new Promise(function(_0x224290,_0x298ffa){return db['SquareOdbc'][_0xeea6('0x18')]({'raw':_0x522ee8['options']?_0x522ee8[_0xeea6('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x522ee8[_0xeea6('0x19')]?_0x522ee8['options'][_0xeea6('0x1a')]||null:null,'attributes':_0x522ee8[_0xeea6('0x19')]?_0x522ee8[_0xeea6('0x19')][_0xeea6('0x1b')]||null:null,'include':_0x522ee8['options']?_0x522ee8[_0xeea6('0x19')][_0xeea6('0x1c')]?_['map'](_0x522ee8['options'][_0xeea6('0x1c')],function(_0x1ebeef){return{'model':db[_0x1ebeef[_0xeea6('0x1d')]],'as':_0x1ebeef['as'],'attributes':_0x1ebeef[_0xeea6('0x1b')],'include':_0x1ebeef[_0xeea6('0x1c')]?_['map'](_0x1ebeef[_0xeea6('0x1c')],function(_0x1920e0){return{'model':db[_0x1920e0[_0xeea6('0x1d')]],'as':_0x1920e0['as'],'attributes':_0x1920e0['attributes'],'include':_0x1920e0[_0xeea6('0x1c')]?_['map'](_0x1920e0[_0xeea6('0x1c')],function(_0x1dfdd6){return{'model':db[_0x1dfdd6['model']],'as':_0x1dfdd6['as'],'attributes':_0x1dfdd6[_0xeea6('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xeea6('0xb')](function(_0x257ef9){logger[_0xeea6('0xc')](_0xeea6('0x17'),_0x522ee8);logger[_0xeea6('0xe')](_0xeea6('0x17'),_0x522ee8,JSON['stringify'](_0x257ef9));_0x224290(_0x257ef9);})[_0xeea6('0x16')](function(_0x4d8578){logger[_0xeea6('0x12')]('ShowSquareOdbc',_0x4d8578[_0xeea6('0x14')],_0x522ee8);_0x298ffa(_0x105c1f[_0xeea6('0x12')](0x1f4,_0x4d8578[_0xeea6('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/squareProject/index.js b/server/api/squareProject/index.js
index 9105d60..43dde6b 100644
--- a/server/api/squareProject/index.js
+++ b/server/api/squareProject/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x86ec=['exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareProject.controller','get','index','/:id','isAuthenticated','post','create','/:id/users','put','update'];(function(_0x48d8b5,_0x32bc20){var _0x2ff04c=function(_0x10b437){while(--_0x10b437){_0x48d8b5['push'](_0x48d8b5['shift']());}};_0x2ff04c(++_0x32bc20);}(_0x86ec,0x10b));var _0xc86e=function(_0x34133c,_0x36651d){_0x34133c=_0x34133c-0x0;var _0xb85426=_0x86ec[_0x34133c];return _0xb85426;};'use strict';var multer=require(_0xc86e('0x0'));var util=require(_0xc86e('0x1'));var path=require(_0xc86e('0x2'));var timeout=require('connect-timeout');var express=require(_0xc86e('0x3'));var router=express[_0xc86e('0x4')]();var auth=require(_0xc86e('0x5'));var interaction=require(_0xc86e('0x6'));var config=require(_0xc86e('0x7'));var controller=require(_0xc86e('0x8'));router[_0xc86e('0x9')]('/',auth['isAuthenticated'](),controller[_0xc86e('0xa')]);router['get'](_0xc86e('0xb'),auth[_0xc86e('0xc')](),controller['show']);router['get']('/:id/users',auth[_0xc86e('0xc')](),controller['getUsers']);router[_0xc86e('0xd')]('/',auth[_0xc86e('0xc')](),controller[_0xc86e('0xe')]);router['post'](_0xc86e('0xf'),auth[_0xc86e('0xc')](),controller['addUsers']);router[_0xc86e('0x10')]('/:id',auth[_0xc86e('0xc')](),controller[_0xc86e('0x11')]);router['delete'](_0xc86e('0xb'),auth[_0xc86e('0xc')](),controller['destroy']);router['delete'](_0xc86e('0xf'),auth[_0xc86e('0xc')](),controller['removeUsers']);module[_0xc86e('0x12')]=router;
\ No newline at end of file
+var _0x33c1=['express','Router','../../components/interaction/service','../../config/environment','./squareProject.controller','get','isAuthenticated','index','/:id','show','/:id/users','getUsers','post','addUsers','update','delete','removeUsers','exports','multer','util','connect-timeout'];(function(_0x9bc4cc,_0x5ee99f){var _0x514972=function(_0x313935){while(--_0x313935){_0x9bc4cc['push'](_0x9bc4cc['shift']());}};_0x514972(++_0x5ee99f);}(_0x33c1,0x90));var _0x133c=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x33c1[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0x133c('0x0'));var util=require(_0x133c('0x1'));var path=require('path');var timeout=require(_0x133c('0x2'));var express=require(_0x133c('0x3'));var router=express[_0x133c('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x133c('0x5'));var config=require(_0x133c('0x6'));var controller=require(_0x133c('0x7'));router[_0x133c('0x8')]('/',auth[_0x133c('0x9')](),controller[_0x133c('0xa')]);router[_0x133c('0x8')](_0x133c('0xb'),auth['isAuthenticated'](),controller[_0x133c('0xc')]);router[_0x133c('0x8')](_0x133c('0xd'),auth[_0x133c('0x9')](),controller[_0x133c('0xe')]);router[_0x133c('0xf')]('/',auth[_0x133c('0x9')](),controller['create']);router[_0x133c('0xf')](_0x133c('0xd'),auth[_0x133c('0x9')](),controller[_0x133c('0x10')]);router['put'](_0x133c('0xb'),auth[_0x133c('0x9')](),controller[_0x133c('0x11')]);router[_0x133c('0x12')](_0x133c('0xb'),auth[_0x133c('0x9')](),controller['destroy']);router[_0x133c('0x12')](_0x133c('0xd'),auth[_0x133c('0x9')](),controller[_0x133c('0x13')]);module[_0x133c('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.attributes.js b/server/api/squareProject/squareProject.attributes.js
index 19c59b2..cf9e20f 100644
--- a/server/api/squareProject/squareProject.attributes.js
+++ b/server/api/squareProject/squareProject.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1751=['STRING','name','TEXT','BLOB','long','getDataValue','preproduction','toString','utf8','production','sequelize','exports'];(function(_0x53422d,_0x268c5b){var _0x4ee300=function(_0xa882cf){while(--_0xa882cf){_0x53422d['push'](_0x53422d['shift']());}};_0x4ee300(++_0x268c5b);}(_0x1751,0x76));var _0x1175=function(_0x4ce404,_0x47621c){_0x4ce404=_0x4ce404-0x0;var _0x5704d7=_0x1751[_0x4ce404];return _0x5704d7;};'use strict';var Sequelize=require(_0x1175('0x0'));module[_0x1175('0x1')]={'name':{'type':Sequelize[_0x1175('0x2')],'unique':_0x1175('0x3'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'notes':{'type':Sequelize[_0x1175('0x4')]},'preproduction':{'type':Sequelize[_0x1175('0x5')](_0x1175('0x6')),'get':function(){if(this[_0x1175('0x7')](_0x1175('0x8'))){return this[_0x1175('0x7')](_0x1175('0x8'))[_0x1175('0x9')](_0x1175('0xa'));}}},'production':{'type':Sequelize[_0x1175('0x5')](_0x1175('0x6')),'get':function(){if(this[_0x1175('0x7')](_0x1175('0xb'))){return this[_0x1175('0x7')](_0x1175('0xb'))[_0x1175('0x9')](_0x1175('0xa'));}}}};
\ No newline at end of file
+var _0x8784=['name','STRING','TEXT','BLOB','long','getDataValue','preproduction','toString','utf8','production','sequelize','exports'];(function(_0x4d830c,_0x459112){var _0x5913a4=function(_0x559421){while(--_0x559421){_0x4d830c['push'](_0x4d830c['shift']());}};_0x5913a4(++_0x459112);}(_0x8784,0x172));var _0x4878=function(_0x16771d,_0x224c60){_0x16771d=_0x16771d-0x0;var _0x386f11=_0x8784[_0x16771d];return _0x386f11;};'use strict';var Sequelize=require(_0x4878('0x0'));module[_0x4878('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x4878('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0x4878('0x3')]},'notes':{'type':Sequelize[_0x4878('0x4')]},'preproduction':{'type':Sequelize[_0x4878('0x5')](_0x4878('0x6')),'get':function(){if(this['getDataValue']('preproduction')){return this[_0x4878('0x7')](_0x4878('0x8'))[_0x4878('0x9')](_0x4878('0xa'));}}},'production':{'type':Sequelize[_0x4878('0x5')](_0x4878('0x6')),'get':function(){if(this[_0x4878('0x7')](_0x4878('0xb'))){return this[_0x4878('0x7')]('production')[_0x4878('0x9')](_0x4878('0xa'));}}}};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.controller.js b/server/api/squareProject/squareProject.controller.js
index 7d4dc29..9057169 100644
--- a/server/api/squareProject/squareProject.controller.js
+++ b/server/api/squareProject/squareProject.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe3da=['SquareProjects','error','stack','name','index','model','keys','query','filters','intersection','attributes','hasOwnProperty','nolimit','order','sort','where','pick','merge','map','type','key','VIRTUAL','field','options','count','includeAll','include','SquareProject','findAll','rows','catch','show','params','fields','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','addUsers','ids','omit','removeUsers','isArray','emit','userSquareProject:remove','findOne','User','rawAttributes','length','filter','getUsers','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','redis','defaults','socket.io-emitter','./squareProject.socket','register','status','end','offset','limit','set','json','apply','reject','save','update','then','destroy','get'];(function(_0x398fa6,_0x21e694){var _0x329d55=function(_0x586640){while(--_0x586640){_0x398fa6['push'](_0x398fa6['shift']());}};_0x329d55(++_0x21e694);}(_0xe3da,0x1cd));var _0xae3d=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xe3da[_0xfae23b];return _0x200640;};'use strict';var pdf=require(_0xae3d('0x0'));var emlformat=require(_0xae3d('0x1'));var rimraf=require(_0xae3d('0x2'));var zipdir=require(_0xae3d('0x3'));var jsonpatch=require(_0xae3d('0x4'));var rp=require(_0xae3d('0x5'));var moment=require(_0xae3d('0x6'));var BPromise=require(_0xae3d('0x7'));var Mustache=require(_0xae3d('0x8'));var util=require(_0xae3d('0x9'));var path=require(_0xae3d('0xa'));var sox=require(_0xae3d('0xb'));var csv=require(_0xae3d('0xc'));var ejs=require(_0xae3d('0xd'));var fs=require('fs');var _=require(_0xae3d('0xe'));var squel=require(_0xae3d('0xf'));var crypto=require('crypto');var jsforce=require(_0xae3d('0x10'));var deskjs=require(_0xae3d('0x11'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xae3d('0x12'));var Redis=require(_0xae3d('0x13'));var authService=require(_0xae3d('0x14'));var qs=require(_0xae3d('0x15'));var hardwareService=require(_0xae3d('0x16'));var logger=require(_0xae3d('0x17'))('api');var utils=require(_0xae3d('0x18'));var config=require('../../config/environment');var db=require(_0xae3d('0x19'))['db'];config[_0xae3d('0x1a')]=_[_0xae3d('0x1b')](config[_0xae3d('0x1a')],{'host':'localhost','port':0x18eb});var socket=require(_0xae3d('0x1c'))(new Redis(config[_0xae3d('0x1a')]));require(_0xae3d('0x1d'))[_0xae3d('0x1e')](socket);function respondWithStatusCode(_0x2afdd3,_0x430659){_0x430659=_0x430659||0xcc;return function(_0x31498d){if(_0x31498d){return _0x2afdd3['sendStatus'](_0x430659);}return _0x2afdd3[_0xae3d('0x1f')](_0x430659)[_0xae3d('0x20')]();};}function respondWithResult(_0x46295b,_0x230afb){_0x230afb=_0x230afb||0xc8;return function(_0x192c13){if(_0x192c13){return _0x46295b[_0xae3d('0x1f')](_0x230afb)['json'](_0x192c13);}};}function respondWithFilteredResult(_0xe925fd,_0x33449a){return function(_0x2e31f1){if(_0x2e31f1){var _0x5303c2=_0x2e31f1['count'],_0x3f8cf9=_0x33449a[_0xae3d('0x21')],_0x4cbe4e=_0x33449a[_0xae3d('0x21')]+_0x33449a[_0xae3d('0x22')],_0x558e42;if(_0x4cbe4e>=_0x5303c2){_0x4cbe4e=_0x5303c2;_0x558e42=0xc8;}else{_0x558e42=0xce;}_0xe925fd[_0xae3d('0x1f')](_0x558e42);return _0xe925fd[_0xae3d('0x23')]('Content-Range',_0x3f8cf9+'-'+_0x4cbe4e+'/'+_0x5303c2)[_0xae3d('0x24')](_0x2e31f1);}return null;};}function patchUpdates(_0x48f00e){return function(_0x4a09c2){try{jsonpatch[_0xae3d('0x25')](_0x4a09c2,_0x48f00e,!![]);}catch(_0x1415e8){return BPromise[_0xae3d('0x26')](_0x1415e8);}return _0x4a09c2[_0xae3d('0x27')]();};}function saveUpdates(_0x3e7afc,_0x26c419){return function(_0x155099){if(_0x155099){return _0x155099[_0xae3d('0x28')](_0x3e7afc)[_0xae3d('0x29')](function(_0x300be8){return _0x300be8;});}return null;};}function removeEntity(_0x9bf34a,_0x37f5ff){return function(_0x1b2acb){if(_0x1b2acb){return _0x1b2acb[_0xae3d('0x2a')]()[_0xae3d('0x29')](function(){var _0xfb54f6=_0x1b2acb[_0xae3d('0x2b')]({'plain':!![]});var _0x2131e9=_0xae3d('0x2c');return db['UserProfileResource'][_0xae3d('0x2a')]({'where':{'type':_0x2131e9,'resourceId':_0xfb54f6['id']}})[_0xae3d('0x29')](function(){return _0x1b2acb;});})[_0xae3d('0x29')](function(){_0x9bf34a[_0xae3d('0x1f')](0xcc)[_0xae3d('0x20')]();});}};}function handleEntityNotFound(_0x4391db,_0x8de288){return function(_0x54c1e1){if(!_0x54c1e1){_0x4391db['sendStatus'](0x194);}return _0x54c1e1;};}function handleError(_0x12e3a5,_0x1281aa){_0x1281aa=_0x1281aa||0x1f4;return function(_0x3a5840){logger[_0xae3d('0x2d')](_0x3a5840[_0xae3d('0x2e')]);if(_0x3a5840['name']){delete _0x3a5840[_0xae3d('0x2f')];}_0x12e3a5[_0xae3d('0x1f')](_0x1281aa)['send'](_0x3a5840);};}exports[_0xae3d('0x30')]=function(_0x323715,_0x2cf750){var _0x46f484={},_0x432c04={},_0x6ef13c={'count':0x0,'rows':[]};var _0x5356d4=db['SquareProject']['rawAttributes'];_0x432c04[_0xae3d('0x31')]=_[_0xae3d('0x32')](_0x5356d4);_0x432c04[_0xae3d('0x33')]=_[_0xae3d('0x32')](_0x323715['query']);_0x432c04[_0xae3d('0x34')]=_[_0xae3d('0x35')](_0x432c04[_0xae3d('0x31')],_0x432c04[_0xae3d('0x33')]);_0x46f484[_0xae3d('0x36')]=_[_0xae3d('0x35')](_0x432c04[_0xae3d('0x31')],qs['fields'](_0x323715[_0xae3d('0x33')]['fields']));_0x46f484['attributes']=_0x46f484[_0xae3d('0x36')]['length']?_0x46f484[_0xae3d('0x36')]:_0x432c04['model'];if(!_0x323715['query'][_0xae3d('0x37')](_0xae3d('0x38'))){_0x46f484[_0xae3d('0x22')]=qs['limit'](_0x323715[_0xae3d('0x33')]['limit']);_0x46f484[_0xae3d('0x21')]=qs[_0xae3d('0x21')](_0x323715[_0xae3d('0x33')][_0xae3d('0x21')]);}_0x46f484[_0xae3d('0x39')]=qs[_0xae3d('0x3a')](_0x323715[_0xae3d('0x33')][_0xae3d('0x3a')]);_0x46f484[_0xae3d('0x3b')]=qs[_0xae3d('0x34')](_[_0xae3d('0x3c')](_0x323715['query'],_0x432c04['filters']));if(_0x323715[_0xae3d('0x33')]['filter']){_0x46f484[_0xae3d('0x3b')]=_[_0xae3d('0x3d')](_0x46f484[_0xae3d('0x3b')],{'$or':_[_0xae3d('0x3e')](_0x5356d4,function(_0x2c2892){if(_0x2c2892[_0xae3d('0x3f')][_0xae3d('0x40')]!==_0xae3d('0x41')){var _0x26de54={};_0x26de54[_0x2c2892[_0xae3d('0x42')]]={'$like':'%'+_0x323715[_0xae3d('0x33')]['filter']+'%'};return _0x26de54;}})});}_0x46f484=_[_0xae3d('0x3d')]({},_0x46f484,_0x323715[_0xae3d('0x43')]);var _0xb82d5d={'where':_0x46f484['where']};return db['SquareProject'][_0xae3d('0x44')](_0xb82d5d)[_0xae3d('0x29')](function(_0x524cf2){_0x6ef13c[_0xae3d('0x44')]=_0x524cf2;if(_0x323715[_0xae3d('0x33')][_0xae3d('0x45')]){_0x46f484[_0xae3d('0x46')]=[{'all':!![]}];}return db[_0xae3d('0x47')][_0xae3d('0x48')](_0x46f484);})['then'](function(_0x4513ea){_0x6ef13c[_0xae3d('0x49')]=_0x4513ea;return _0x6ef13c;})[_0xae3d('0x29')](respondWithFilteredResult(_0x2cf750,_0x46f484))[_0xae3d('0x4a')](handleError(_0x2cf750,null));};exports[_0xae3d('0x4b')]=function(_0x515220,_0x473d56){var _0x4f7346={'raw':![],'where':{'id':_0x515220[_0xae3d('0x4c')]['id']}},_0x43a8fc={};_0x43a8fc[_0xae3d('0x31')]=_[_0xae3d('0x32')](db['SquareProject']['rawAttributes']);_0x43a8fc['query']=_[_0xae3d('0x32')](_0x515220[_0xae3d('0x33')]);_0x43a8fc['filters']=_['intersection'](_0x43a8fc['model'],_0x43a8fc[_0xae3d('0x33')]);_0x4f7346[_0xae3d('0x36')]=_[_0xae3d('0x35')](_0x43a8fc[_0xae3d('0x31')],qs[_0xae3d('0x4d')](_0x515220[_0xae3d('0x33')][_0xae3d('0x4d')]));_0x4f7346['attributes']=_0x4f7346['attributes']['length']?_0x4f7346[_0xae3d('0x36')]:_0x43a8fc['model'];if(_0x515220[_0xae3d('0x33')][_0xae3d('0x45')]){_0x4f7346[_0xae3d('0x46')]=[{'all':!![]}];}_0x4f7346=_[_0xae3d('0x3d')]({},_0x4f7346,_0x515220[_0xae3d('0x43')]);return db[_0xae3d('0x47')][_0xae3d('0x4e')](_0x4f7346)[_0xae3d('0x29')](handleEntityNotFound(_0x473d56,null))[_0xae3d('0x29')](respondWithResult(_0x473d56,null))[_0xae3d('0x4a')](handleError(_0x473d56,null));};exports[_0xae3d('0x4f')]=function(_0x5684a1,_0x53f835){return db['SquareProject'][_0xae3d('0x4f')](_0x5684a1[_0xae3d('0x50')],{})[_0xae3d('0x29')](function(_0x6fa6c){var _0x5dd886=_0x5684a1['user'][_0xae3d('0x2b')]({'plain':!![]});if(!_0x5dd886)throw new Error(_0xae3d('0x51'));if(_0x5dd886[_0xae3d('0x52')]===_0xae3d('0x53')){var _0x58e918=_0x6fa6c[_0xae3d('0x2b')]({'plain':!![]});var _0xf446b=_0xae3d('0x2c');return db[_0xae3d('0x54')][_0xae3d('0x4e')]({'where':{'name':_0xf446b,'userProfileId':_0x5dd886[_0xae3d('0x55')]},'raw':!![]})[_0xae3d('0x29')](function(_0x291c7d){if(_0x291c7d&&_0x291c7d[_0xae3d('0x56')]===0x0){return db[_0xae3d('0x57')][_0xae3d('0x4f')]({'name':_0x58e918[_0xae3d('0x2f')],'resourceId':_0x58e918['id'],'type':_0x291c7d['name'],'sectionId':_0x291c7d['id']},{})['then'](function(){return _0x6fa6c;});}else{return _0x6fa6c;}})['catch'](function(_0xb46d7){logger[_0xae3d('0x2d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xb46d7);throw _0xb46d7;});}return _0x6fa6c;})[_0xae3d('0x29')](respondWithResult(_0x53f835,0xc9))['catch'](handleError(_0x53f835,null));};exports['update']=function(_0xc19da7,_0x194f7c){if(_0xc19da7[_0xae3d('0x50')]['id']){delete _0xc19da7[_0xae3d('0x50')]['id'];}return db[_0xae3d('0x47')][_0xae3d('0x4e')]({'where':{'id':_0xc19da7[_0xae3d('0x4c')]['id']}})['then'](handleEntityNotFound(_0x194f7c,null))[_0xae3d('0x29')](saveUpdates(_0xc19da7[_0xae3d('0x50')],null))[_0xae3d('0x29')](respondWithResult(_0x194f7c,null))[_0xae3d('0x4a')](handleError(_0x194f7c,null));};exports['destroy']=function(_0x25222d,_0x155c3a){return db[_0xae3d('0x47')][_0xae3d('0x4e')]({'where':{'id':_0x25222d['params']['id']}})['then'](handleEntityNotFound(_0x155c3a,null))['then'](removeEntity(_0x155c3a,null))[_0xae3d('0x4a')](handleError(_0x155c3a,null));};exports['addUsers']=function(_0x5ce3a8,_0x3c57b9,_0x1e8f2f){return db[_0xae3d('0x47')][_0xae3d('0x4e')]({'where':{'id':_0x5ce3a8[_0xae3d('0x4c')]['id']}})[_0xae3d('0x29')](handleEntityNotFound(_0x3c57b9,null))['then'](function(_0x42e9af){if(_0x42e9af){return _0x42e9af[_0xae3d('0x58')](_0x5ce3a8[_0xae3d('0x50')][_0xae3d('0x59')],_[_0xae3d('0x5a')](_0x5ce3a8[_0xae3d('0x50')],['ids','id'])||{});}})[_0xae3d('0x29')](respondWithResult(_0x3c57b9,null))[_0xae3d('0x4a')](handleError(_0x3c57b9,null));};exports[_0xae3d('0x5b')]=function(_0x4d4c6e,_0x4b83b2,_0x4cd4fd){return db[_0xae3d('0x47')][_0xae3d('0x4e')]({'where':{'id':_0x4d4c6e['params']['id']}})[_0xae3d('0x29')](handleEntityNotFound(_0x4b83b2,null))[_0xae3d('0x29')](function(_0x363595){if(_0x363595){return _0x363595['removeUsers'](_0x4d4c6e[_0xae3d('0x33')][_0xae3d('0x59')])[_0xae3d('0x29')](function(){if(_[_0xae3d('0x5c')](_0x4d4c6e[_0xae3d('0x33')][_0xae3d('0x59')])){for(var _0x39dff1=0x0;_0x39dff1<_0x4d4c6e[_0xae3d('0x33')]['ids']['length'];_0x39dff1+=0x1){socket[_0xae3d('0x5d')](_0xae3d('0x5e'),{'UserId':Number(_0x4d4c6e[_0xae3d('0x33')]['ids'][_0x39dff1]),'SquareProjectId':Number(_0x4d4c6e['params']['id'])});}}else{socket[_0xae3d('0x5d')](_0xae3d('0x5e'),{'UserId':Number(_0x4d4c6e[_0xae3d('0x33')][_0xae3d('0x59')]),'SquareProjectId':Number(_0x4d4c6e['params']['id'])});}});}})[_0xae3d('0x29')](respondWithStatusCode(_0x4b83b2,null))[_0xae3d('0x4a')](handleError(_0x4b83b2,null));};exports['getUsers']=function(_0x19aab4,_0x2c221b,_0x1d60df){var _0x419e37={};var _0x3753df={};var _0x1b88a1;var _0x161a0b;return db['SquareProject'][_0xae3d('0x5f')]({'where':{'id':_0x19aab4[_0xae3d('0x4c')]['id']}})[_0xae3d('0x29')](handleEntityNotFound(_0x2c221b,null))[_0xae3d('0x29')](function(_0x2641d3){if(_0x2641d3){_0x1b88a1=_0x2641d3;_0x3753df['model']=_[_0xae3d('0x32')](db[_0xae3d('0x60')][_0xae3d('0x61')]);_0x3753df[_0xae3d('0x33')]=_[_0xae3d('0x32')](_0x19aab4[_0xae3d('0x33')]);_0x3753df['filters']=_[_0xae3d('0x35')](_0x3753df[_0xae3d('0x31')],_0x3753df['query']);_0x419e37[_0xae3d('0x36')]=_[_0xae3d('0x35')](_0x3753df[_0xae3d('0x31')],qs['fields'](_0x19aab4['query'][_0xae3d('0x4d')]));_0x419e37[_0xae3d('0x36')]=_0x419e37[_0xae3d('0x36')][_0xae3d('0x62')]?_0x419e37[_0xae3d('0x36')]:_0x3753df[_0xae3d('0x31')];_0x419e37[_0xae3d('0x39')]=qs['sort'](_0x19aab4[_0xae3d('0x33')][_0xae3d('0x3a')]);_0x419e37['where']=qs[_0xae3d('0x34')](_['pick'](_0x19aab4[_0xae3d('0x33')],_0x3753df[_0xae3d('0x34')]));if(_0x19aab4[_0xae3d('0x33')][_0xae3d('0x63')]){_0x419e37[_0xae3d('0x3b')]=_['merge'](_0x419e37[_0xae3d('0x3b')],{'$or':_[_0xae3d('0x3e')](_0x419e37[_0xae3d('0x36')],function(_0x5f1e9c){var _0x546991={};_0x546991[_0x5f1e9c]={'$like':'%'+_0x19aab4[_0xae3d('0x33')][_0xae3d('0x63')]+'%'};return _0x546991;})});}_0x419e37=_['merge']({},_0x419e37,_0x19aab4['options']);return _0x1b88a1[_0xae3d('0x64')](_0x419e37);}})['then'](function(_0x388880){if(_0x388880){_0x161a0b=_0x388880['length'];if(!_0x19aab4['query']['hasOwnProperty']('nolimit')){_0x419e37[_0xae3d('0x22')]=qs[_0xae3d('0x22')](_0x19aab4['query']['limit']);_0x419e37[_0xae3d('0x21')]=qs[_0xae3d('0x21')](_0x19aab4[_0xae3d('0x33')][_0xae3d('0x21')]);}return _0x1b88a1[_0xae3d('0x64')](_0x419e37);}})[_0xae3d('0x29')](function(_0x3971db){if(_0x3971db){return _0x3971db?{'count':_0x161a0b,'rows':_0x3971db}:null;}})['then'](respondWithResult(_0x2c221b,null))[_0xae3d('0x4a')](handleError(_0x2c221b,null));};
\ No newline at end of file
+var _0x958a=['isArray','emit','userSquareProject:remove','getUsers','hasOwnProperty','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','./squareProject.socket','register','end','status','json','offset','limit','set','Content-Range','apply','save','update','destroy','then','get','SquareProjects','sendStatus','name','send','rawAttributes','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','map','type','key','field','options','SquareProject','count','includeAll','include','findAll','rows','show','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','addUsers','ids','omit','removeUsers'];(function(_0x155900,_0x90c7a5){var _0x3a0004=function(_0x99393b){while(--_0x99393b){_0x155900['push'](_0x155900['shift']());}};_0x3a0004(++_0x90c7a5);}(_0x958a,0x128));var _0xa958=function(_0x34c322,_0x36d359){_0x34c322=_0x34c322-0x0;var _0xd78f67=_0x958a[_0x34c322];return _0xd78f67;};'use strict';var pdf=require(_0xa958('0x0'));var emlformat=require(_0xa958('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa958('0x2'));var jsonpatch=require(_0xa958('0x3'));var rp=require(_0xa958('0x4'));var moment=require(_0xa958('0x5'));var BPromise=require(_0xa958('0x6'));var Mustache=require('mustache');var util=require(_0xa958('0x7'));var path=require('path');var sox=require(_0xa958('0x8'));var csv=require(_0xa958('0x9'));var ejs=require(_0xa958('0xa'));var fs=require('fs');var _=require(_0xa958('0xb'));var squel=require(_0xa958('0xc'));var crypto=require(_0xa958('0xd'));var jsforce=require(_0xa958('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xa958('0xf'));var Papa=require(_0xa958('0x10'));var Redis=require(_0xa958('0x11'));var authService=require(_0xa958('0x12'));var qs=require(_0xa958('0x13'));var hardwareService=require(_0xa958('0x14'));var logger=require(_0xa958('0x15'))(_0xa958('0x16'));var utils=require(_0xa958('0x17'));var config=require(_0xa958('0x18'));var db=require(_0xa958('0x19'))['db'];config[_0xa958('0x1a')]=_[_0xa958('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa958('0x1a')]));require(_0xa958('0x1c'))[_0xa958('0x1d')](socket);function respondWithStatusCode(_0x591d4d,_0x3ebc66){_0x3ebc66=_0x3ebc66||0xcc;return function(_0x54c439){if(_0x54c439){return _0x591d4d['sendStatus'](_0x3ebc66);}return _0x591d4d['status'](_0x3ebc66)[_0xa958('0x1e')]();};}function respondWithResult(_0x15fca8,_0xb90ac6){_0xb90ac6=_0xb90ac6||0xc8;return function(_0x6a81c7){if(_0x6a81c7){return _0x15fca8[_0xa958('0x1f')](_0xb90ac6)[_0xa958('0x20')](_0x6a81c7);}};}function respondWithFilteredResult(_0x23736f,_0x21e366){return function(_0x4d836f){if(_0x4d836f){var _0x39af49=_0x4d836f['count'],_0x4eadc9=_0x21e366[_0xa958('0x21')],_0x3a053f=_0x21e366[_0xa958('0x21')]+_0x21e366[_0xa958('0x22')],_0x70d13e;if(_0x3a053f>=_0x39af49){_0x3a053f=_0x39af49;_0x70d13e=0xc8;}else{_0x70d13e=0xce;}_0x23736f[_0xa958('0x1f')](_0x70d13e);return _0x23736f[_0xa958('0x23')](_0xa958('0x24'),_0x4eadc9+'-'+_0x3a053f+'/'+_0x39af49)['json'](_0x4d836f);}return null;};}function patchUpdates(_0x4a90c2){return function(_0x373661){try{jsonpatch[_0xa958('0x25')](_0x373661,_0x4a90c2,!![]);}catch(_0x16c0be){return BPromise['reject'](_0x16c0be);}return _0x373661[_0xa958('0x26')]();};}function saveUpdates(_0x383aa3,_0x5c091a){return function(_0x28cf12){if(_0x28cf12){return _0x28cf12[_0xa958('0x27')](_0x383aa3)['then'](function(_0x5c5a2b){return _0x5c5a2b;});}return null;};}function removeEntity(_0x201ed3,_0x40b51e){return function(_0x50b3c3){if(_0x50b3c3){return _0x50b3c3[_0xa958('0x28')]()[_0xa958('0x29')](function(){var _0x2f03df=_0x50b3c3[_0xa958('0x2a')]({'plain':!![]});var _0x16b04a=_0xa958('0x2b');return db['UserProfileResource'][_0xa958('0x28')]({'where':{'type':_0x16b04a,'resourceId':_0x2f03df['id']}})['then'](function(){return _0x50b3c3;});})[_0xa958('0x29')](function(){_0x201ed3[_0xa958('0x1f')](0xcc)[_0xa958('0x1e')]();});}};}function handleEntityNotFound(_0x18f600,_0x21541f){return function(_0xddc7f6){if(!_0xddc7f6){_0x18f600[_0xa958('0x2c')](0x194);}return _0xddc7f6;};}function handleError(_0xc75ae9,_0x12cfde){_0x12cfde=_0x12cfde||0x1f4;return function(_0x404d07){logger['error'](_0x404d07['stack']);if(_0x404d07[_0xa958('0x2d')]){delete _0x404d07['name'];}_0xc75ae9[_0xa958('0x1f')](_0x12cfde)[_0xa958('0x2e')](_0x404d07);};}exports['index']=function(_0x23bdbf,_0x3d4711){var _0x179bc2={},_0x374c77={},_0x283452={'count':0x0,'rows':[]};var _0x54ad35=db['SquareProject'][_0xa958('0x2f')];_0x374c77['model']=_['keys'](_0x54ad35);_0x374c77[_0xa958('0x30')]=_[_0xa958('0x31')](_0x23bdbf[_0xa958('0x30')]);_0x374c77[_0xa958('0x32')]=_[_0xa958('0x33')](_0x374c77[_0xa958('0x34')],_0x374c77['query']);_0x179bc2[_0xa958('0x35')]=_['intersection'](_0x374c77['model'],qs[_0xa958('0x36')](_0x23bdbf[_0xa958('0x30')][_0xa958('0x36')]));_0x179bc2[_0xa958('0x35')]=_0x179bc2[_0xa958('0x35')][_0xa958('0x37')]?_0x179bc2[_0xa958('0x35')]:_0x374c77[_0xa958('0x34')];if(!_0x23bdbf['query']['hasOwnProperty'](_0xa958('0x38'))){_0x179bc2[_0xa958('0x22')]=qs[_0xa958('0x22')](_0x23bdbf[_0xa958('0x30')][_0xa958('0x22')]);_0x179bc2['offset']=qs[_0xa958('0x21')](_0x23bdbf[_0xa958('0x30')][_0xa958('0x21')]);}_0x179bc2[_0xa958('0x39')]=qs['sort'](_0x23bdbf[_0xa958('0x30')][_0xa958('0x3a')]);_0x179bc2[_0xa958('0x3b')]=qs[_0xa958('0x32')](_[_0xa958('0x3c')](_0x23bdbf['query'],_0x374c77[_0xa958('0x32')]));if(_0x23bdbf[_0xa958('0x30')][_0xa958('0x3d')]){_0x179bc2[_0xa958('0x3b')]=_[_0xa958('0x3e')](_0x179bc2[_0xa958('0x3b')],{'$or':_[_0xa958('0x3f')](_0x54ad35,function(_0x452ded){if(_0x452ded[_0xa958('0x40')][_0xa958('0x41')]!=='VIRTUAL'){var _0x34ff45={};_0x34ff45[_0x452ded[_0xa958('0x42')]]={'$like':'%'+_0x23bdbf[_0xa958('0x30')]['filter']+'%'};return _0x34ff45;}})});}_0x179bc2=_[_0xa958('0x3e')]({},_0x179bc2,_0x23bdbf[_0xa958('0x43')]);var _0x53df5d={'where':_0x179bc2['where']};return db[_0xa958('0x44')]['count'](_0x53df5d)[_0xa958('0x29')](function(_0x5b6251){_0x283452[_0xa958('0x45')]=_0x5b6251;if(_0x23bdbf['query'][_0xa958('0x46')]){_0x179bc2[_0xa958('0x47')]=[{'all':!![]}];}return db[_0xa958('0x44')][_0xa958('0x48')](_0x179bc2);})[_0xa958('0x29')](function(_0x45b383){_0x283452[_0xa958('0x49')]=_0x45b383;return _0x283452;})[_0xa958('0x29')](respondWithFilteredResult(_0x3d4711,_0x179bc2))['catch'](handleError(_0x3d4711,null));};exports[_0xa958('0x4a')]=function(_0x38dfb4,_0x2720c3){var _0x5ab319={'raw':![],'where':{'id':_0x38dfb4['params']['id']}},_0x585b19={};_0x585b19[_0xa958('0x34')]=_[_0xa958('0x31')](db[_0xa958('0x44')][_0xa958('0x2f')]);_0x585b19[_0xa958('0x30')]=_['keys'](_0x38dfb4[_0xa958('0x30')]);_0x585b19[_0xa958('0x32')]=_[_0xa958('0x33')](_0x585b19[_0xa958('0x34')],_0x585b19[_0xa958('0x30')]);_0x5ab319[_0xa958('0x35')]=_[_0xa958('0x33')](_0x585b19[_0xa958('0x34')],qs[_0xa958('0x36')](_0x38dfb4[_0xa958('0x30')][_0xa958('0x36')]));_0x5ab319[_0xa958('0x35')]=_0x5ab319[_0xa958('0x35')][_0xa958('0x37')]?_0x5ab319[_0xa958('0x35')]:_0x585b19[_0xa958('0x34')];if(_0x38dfb4[_0xa958('0x30')]['includeAll']){_0x5ab319['include']=[{'all':!![]}];}_0x5ab319=_['merge']({},_0x5ab319,_0x38dfb4[_0xa958('0x43')]);return db[_0xa958('0x44')][_0xa958('0x4b')](_0x5ab319)[_0xa958('0x29')](handleEntityNotFound(_0x2720c3,null))['then'](respondWithResult(_0x2720c3,null))[_0xa958('0x4c')](handleError(_0x2720c3,null));};exports[_0xa958('0x4d')]=function(_0xa07b67,_0x439eb7){return db[_0xa958('0x44')]['create'](_0xa07b67[_0xa958('0x4e')],{})[_0xa958('0x29')](function(_0x3f8407){var _0x5eb8ab=_0xa07b67[_0xa958('0x4f')]['get']({'plain':!![]});if(!_0x5eb8ab)throw new Error(_0xa958('0x50'));if(_0x5eb8ab[_0xa958('0x51')]===_0xa958('0x4f')){var _0x4e0740=_0x3f8407[_0xa958('0x2a')]({'plain':!![]});var _0x5a0794=_0xa958('0x2b');return db[_0xa958('0x52')][_0xa958('0x4b')]({'where':{'name':_0x5a0794,'userProfileId':_0x5eb8ab[_0xa958('0x53')]},'raw':!![]})[_0xa958('0x29')](function(_0x4fbbcf){if(_0x4fbbcf&&_0x4fbbcf[_0xa958('0x54')]===0x0){return db['UserProfileResource'][_0xa958('0x4d')]({'name':_0x4e0740[_0xa958('0x2d')],'resourceId':_0x4e0740['id'],'type':_0x4fbbcf['name'],'sectionId':_0x4fbbcf['id']},{})[_0xa958('0x29')](function(){return _0x3f8407;});}else{return _0x3f8407;}})['catch'](function(_0x317059){logger[_0xa958('0x55')](_0xa958('0x56'),_0x317059);throw _0x317059;});}return _0x3f8407;})[_0xa958('0x29')](respondWithResult(_0x439eb7,0xc9))[_0xa958('0x4c')](handleError(_0x439eb7,null));};exports[_0xa958('0x27')]=function(_0x1928b7,_0x4060ba){if(_0x1928b7[_0xa958('0x4e')]['id']){delete _0x1928b7['body']['id'];}return db[_0xa958('0x44')]['find']({'where':{'id':_0x1928b7[_0xa958('0x57')]['id']}})[_0xa958('0x29')](handleEntityNotFound(_0x4060ba,null))[_0xa958('0x29')](saveUpdates(_0x1928b7['body'],null))['then'](respondWithResult(_0x4060ba,null))[_0xa958('0x4c')](handleError(_0x4060ba,null));};exports[_0xa958('0x28')]=function(_0x108df9,_0x307127){return db['SquareProject'][_0xa958('0x4b')]({'where':{'id':_0x108df9[_0xa958('0x57')]['id']}})['then'](handleEntityNotFound(_0x307127,null))[_0xa958('0x29')](removeEntity(_0x307127,null))[_0xa958('0x4c')](handleError(_0x307127,null));};exports['addUsers']=function(_0x386fb7,_0x541ba2,_0x5629c4){return db['SquareProject'][_0xa958('0x4b')]({'where':{'id':_0x386fb7[_0xa958('0x57')]['id']}})[_0xa958('0x29')](handleEntityNotFound(_0x541ba2,null))[_0xa958('0x29')](function(_0x5001ec){if(_0x5001ec){return _0x5001ec[_0xa958('0x58')](_0x386fb7['body'][_0xa958('0x59')],_[_0xa958('0x5a')](_0x386fb7[_0xa958('0x4e')],[_0xa958('0x59'),'id'])||{});}})[_0xa958('0x29')](respondWithResult(_0x541ba2,null))[_0xa958('0x4c')](handleError(_0x541ba2,null));};exports['removeUsers']=function(_0x4937a5,_0x317637,_0x377e71){return db[_0xa958('0x44')][_0xa958('0x4b')]({'where':{'id':_0x4937a5[_0xa958('0x57')]['id']}})['then'](handleEntityNotFound(_0x317637,null))[_0xa958('0x29')](function(_0x35d885){if(_0x35d885){return _0x35d885[_0xa958('0x5b')](_0x4937a5['query'][_0xa958('0x59')])[_0xa958('0x29')](function(){if(_[_0xa958('0x5c')](_0x4937a5[_0xa958('0x30')][_0xa958('0x59')])){for(var _0x2d40b1=0x0;_0x2d40b1<_0x4937a5[_0xa958('0x30')]['ids']['length'];_0x2d40b1+=0x1){socket[_0xa958('0x5d')]('userSquareProject:remove',{'UserId':Number(_0x4937a5[_0xa958('0x30')][_0xa958('0x59')][_0x2d40b1]),'SquareProjectId':Number(_0x4937a5[_0xa958('0x57')]['id'])});}}else{socket[_0xa958('0x5d')](_0xa958('0x5e'),{'UserId':Number(_0x4937a5[_0xa958('0x30')][_0xa958('0x59')]),'SquareProjectId':Number(_0x4937a5[_0xa958('0x57')]['id'])});}});}})[_0xa958('0x29')](respondWithStatusCode(_0x317637,null))['catch'](handleError(_0x317637,null));};exports[_0xa958('0x5f')]=function(_0x1d1729,_0x4f9358,_0x53a26d){var _0x2c913d={};var _0x43877f={};var _0xa769e0;var _0x36d3cd;return db[_0xa958('0x44')]['findOne']({'where':{'id':_0x1d1729[_0xa958('0x57')]['id']}})['then'](handleEntityNotFound(_0x4f9358,null))[_0xa958('0x29')](function(_0x59957d){if(_0x59957d){_0xa769e0=_0x59957d;_0x43877f[_0xa958('0x34')]=_[_0xa958('0x31')](db['User'][_0xa958('0x2f')]);_0x43877f[_0xa958('0x30')]=_[_0xa958('0x31')](_0x1d1729[_0xa958('0x30')]);_0x43877f[_0xa958('0x32')]=_[_0xa958('0x33')](_0x43877f[_0xa958('0x34')],_0x43877f[_0xa958('0x30')]);_0x2c913d['attributes']=_['intersection'](_0x43877f['model'],qs[_0xa958('0x36')](_0x1d1729['query'][_0xa958('0x36')]));_0x2c913d[_0xa958('0x35')]=_0x2c913d['attributes']['length']?_0x2c913d[_0xa958('0x35')]:_0x43877f[_0xa958('0x34')];_0x2c913d[_0xa958('0x39')]=qs[_0xa958('0x3a')](_0x1d1729[_0xa958('0x30')]['sort']);_0x2c913d[_0xa958('0x3b')]=qs['filters'](_[_0xa958('0x3c')](_0x1d1729[_0xa958('0x30')],_0x43877f[_0xa958('0x32')]));if(_0x1d1729['query'][_0xa958('0x3d')]){_0x2c913d[_0xa958('0x3b')]=_['merge'](_0x2c913d[_0xa958('0x3b')],{'$or':_[_0xa958('0x3f')](_0x2c913d[_0xa958('0x35')],function(_0xb57878){var _0x1cd29c={};_0x1cd29c[_0xb57878]={'$like':'%'+_0x1d1729['query'][_0xa958('0x3d')]+'%'};return _0x1cd29c;})});}_0x2c913d=_['merge']({},_0x2c913d,_0x1d1729[_0xa958('0x43')]);return _0xa769e0['getUsers'](_0x2c913d);}})[_0xa958('0x29')](function(_0x436369){if(_0x436369){_0x36d3cd=_0x436369[_0xa958('0x37')];if(!_0x1d1729[_0xa958('0x30')][_0xa958('0x60')](_0xa958('0x38'))){_0x2c913d[_0xa958('0x22')]=qs['limit'](_0x1d1729['query'][_0xa958('0x22')]);_0x2c913d['offset']=qs[_0xa958('0x21')](_0x1d1729[_0xa958('0x30')][_0xa958('0x21')]);}return _0xa769e0[_0xa958('0x5f')](_0x2c913d);}})[_0xa958('0x29')](function(_0x1ef99d){if(_0x1ef99d){return _0x1ef99d?{'count':_0x36d3cd,'rows':_0x1ef99d}:null;}})[_0xa958('0x29')](respondWithResult(_0x4f9358,null))[_0xa958('0x4c')](handleError(_0x4f9358,null));};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.events.js b/server/api/squareProject/squareProject.events.js
index 9d1a725..95471af 100644
--- a/server/api/squareProject/squareProject.events.js
+++ b/server/api/squareProject/squareProject.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1a10=['save','update','remove','emit','hook','exports','events','SquareProject','setMaxListeners'];(function(_0x26b8b5,_0xf5c2c1){var _0x2150a9=function(_0x1ca1be){while(--_0x1ca1be){_0x26b8b5['push'](_0x26b8b5['shift']());}};_0x2150a9(++_0xf5c2c1);}(_0x1a10,0x12f));var _0x01a1=function(_0x42681d,_0x544073){_0x42681d=_0x42681d-0x0;var _0x229d05=_0x1a10[_0x42681d];return _0x229d05;};'use strict';var EventEmitter=require(_0x01a1('0x0'));var SquareProject=require('../../mysqldb')['db'][_0x01a1('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x01a1('0x2')](0x0);var events={'afterCreate':_0x01a1('0x3'),'afterUpdate':_0x01a1('0x4'),'afterDestroy':_0x01a1('0x5')};function emitEvent(_0x7f38b){return function(_0x2a48ba,_0x1a6078,_0x184080){SquareProjectEvents[_0x01a1('0x6')](_0x7f38b+':'+_0x2a48ba['id'],_0x2a48ba);SquareProjectEvents[_0x01a1('0x6')](_0x7f38b,_0x2a48ba);_0x184080(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0x01a1('0x7')](e,emitEvent(event));}}module[_0x01a1('0x8')]=SquareProjectEvents;
\ No newline at end of file
+var _0xcbcd=['../../mysqldb','SquareProject','setMaxListeners','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x1f7d6c,_0x512583){var _0x5e0321=function(_0x40cfb9){while(--_0x40cfb9){_0x1f7d6c['push'](_0x1f7d6c['shift']());}};_0x5e0321(++_0x512583);}(_0xcbcd,0x1c1));var _0xdcbc=function(_0xd0b415,_0x149675){_0xd0b415=_0xd0b415-0x0;var _0x2bdf2c=_0xcbcd[_0xd0b415];return _0x2bdf2c;};'use strict';var EventEmitter=require(_0xdcbc('0x0'));var SquareProject=require(_0xdcbc('0x1'))['db'][_0xdcbc('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xdcbc('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xdcbc('0x4'),'afterDestroy':_0xdcbc('0x5')};function emitEvent(_0x56e7b7){return function(_0x56880a,_0x80128f,_0x1e260c){SquareProjectEvents[_0xdcbc('0x6')](_0x56e7b7+':'+_0x56880a['id'],_0x56880a);SquareProjectEvents[_0xdcbc('0x6')](_0x56e7b7,_0x56880a);_0x1e260c(null);};}for(var e in events){if(events[_0xdcbc('0x7')](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0xdcbc('0x8')]=SquareProjectEvents;
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.model.js b/server/api/squareProject/squareProject.model.js
index b10167b..32a4864 100644
--- a/server/api/squareProject/squareProject.model.js
+++ b/server/api/squareProject/squareProject.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x92c7=['moment','request-promise','path','rimraf','./squareProject.attributes','exports','define','square_projects','lodash','util','../../config/logger','api'];(function(_0x2cde0a,_0x1f9695){var _0x260610=function(_0x179089){while(--_0x179089){_0x2cde0a['push'](_0x2cde0a['shift']());}};_0x260610(++_0x1f9695);}(_0x92c7,0x158));var _0x792c=function(_0x232f39,_0x1cc796){_0x232f39=_0x232f39-0x0;var _0x1de85d=_0x92c7[_0x232f39];return _0x1de85d;};'use strict';var _=require(_0x792c('0x0'));var util=require(_0x792c('0x1'));var logger=require(_0x792c('0x2'))(_0x792c('0x3'));var moment=require(_0x792c('0x4'));var BPromise=require('bluebird');var rp=require(_0x792c('0x5'));var fs=require('fs');var path=require(_0x792c('0x6'));var rimraf=require(_0x792c('0x7'));var config=require('../../config/environment');var attributes=require(_0x792c('0x8'));module[_0x792c('0x9')]=function(_0x12dbae,_0x47c06f){return _0x12dbae[_0x792c('0xa')]('SquareProject',attributes,{'tableName':_0x792c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x53c8=['SquareProject','square_projects','lodash','../../config/logger','moment','request-promise','rimraf','../../config/environment','./squareProject.attributes','exports','define'];(function(_0x33c9f8,_0x5aedbb){var _0x2d7004=function(_0x4f4f43){while(--_0x4f4f43){_0x33c9f8['push'](_0x33c9f8['shift']());}};_0x2d7004(++_0x5aedbb);}(_0x53c8,0x1af));var _0x853c=function(_0x25701b,_0x2a6976){_0x25701b=_0x25701b-0x0;var _0x3a8a2c=_0x53c8[_0x25701b];return _0x3a8a2c;};'use strict';var _=require(_0x853c('0x0'));var util=require('util');var logger=require(_0x853c('0x1'))('api');var moment=require(_0x853c('0x2'));var BPromise=require('bluebird');var rp=require(_0x853c('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x853c('0x4'));var config=require(_0x853c('0x5'));var attributes=require(_0x853c('0x6'));module[_0x853c('0x7')]=function(_0x55f027,_0xa780db){return _0x55f027[_0x853c('0x8')](_0x853c('0x9'),attributes,{'tableName':_0x853c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.rpc.js b/server/api/squareProject/squareProject.rpc.js
index 20c2ba9..e1660d0 100644
--- a/server/api/squareProject/squareProject.rpc.js
+++ b/server/api/squareProject/squareProject.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['catch','ShowSquareProject','find','options','raw','where','attributes','include','map','model','then','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','register','SquareProject,\x20%s,\x20%s','request\x20sent','debug','SquareProject,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result'];(function(_0x5a969f,_0x3a4855){var _0x63d1f2=function(_0x493233){while(--_0x493233){_0x5a969f['push'](_0x5a969f['shift']());}};_0x63d1f2(++_0x3a4855);}(_0xa9e0,0x123));var _0x0a9e=function(_0x21aec3,_0x5c97e9){_0x21aec3=_0x21aec3-0x0;var _0x288bbc=_0xa9e0[_0x21aec3];return _0x288bbc;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});config[_0x0a9e('0xa')]=_[_0x0a9e('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x0a9e('0xc'))(new Redis(config['redis']));require('./squareProject.socket')[_0x0a9e('0xd')](socket);function respondWithRpcPromise(_0xf81284,_0x307b3e,_0x3ab53f){return new BPromise(function(_0xfeb75b,_0xbd1168){return client['request'](_0xf81284,_0x3ab53f)['then'](function(_0x527cdd){logger['info'](_0x0a9e('0xe'),_0x307b3e,_0x0a9e('0xf'));logger[_0x0a9e('0x10')](_0x0a9e('0x11'),_0x307b3e,_0x0a9e('0xf'),JSON[_0x0a9e('0x12')](_0x527cdd));if(_0x527cdd['error']){if(_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x14')]===0x1f4){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x15')]);return _0xbd1168(_0x527cdd['error'][_0x0a9e('0x15')]);}logger['error'](_0x0a9e('0xe'),_0x307b3e,_0x527cdd['error'][_0x0a9e('0x15')]);return _0xfeb75b(_0x527cdd[_0x0a9e('0x13')]['message']);}else{logger[_0x0a9e('0x16')]('SquareProject,\x20%s,\x20%s',_0x307b3e,_0x0a9e('0xf'));_0xfeb75b(_0x527cdd[_0x0a9e('0x17')][_0x0a9e('0x15')]);}})[_0x0a9e('0x18')](function(_0x31b1ca){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x31b1ca);_0xbd1168(_0x31b1ca);});});}exports[_0x0a9e('0x19')]=function(_0x1314ae){var _0x112016=this;return new Promise(function(_0x1c696a,_0x105080){return db['SquareProject'][_0x0a9e('0x1a')]({'raw':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae['options'][_0x0a9e('0x1c')]===undefined?!![]:![]:!![],'where':_0x1314ae['options']?_0x1314ae['options'][_0x0a9e('0x1d')]||null:null,'attributes':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1e')]||null:null,'include':_0x1314ae['options']?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1f')]?_[_0x0a9e('0x20')](_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1f')],function(_0x42ac8f){return{'model':db[_0x42ac8f[_0x0a9e('0x21')]],'as':_0x42ac8f['as'],'attributes':_0x42ac8f['attributes'],'include':_0x42ac8f['include']?_[_0x0a9e('0x20')](_0x42ac8f[_0x0a9e('0x1f')],function(_0x40c424){return{'model':db[_0x40c424[_0x0a9e('0x21')]],'as':_0x40c424['as'],'attributes':_0x40c424['attributes'],'include':_0x40c424[_0x0a9e('0x1f')]?_['map'](_0x40c424[_0x0a9e('0x1f')],function(_0x5bfb33){return{'model':db[_0x5bfb33[_0x0a9e('0x21')]],'as':_0x5bfb33['as'],'attributes':_0x5bfb33[_0x0a9e('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x22')](function(_0x14433c){logger[_0x0a9e('0x16')](_0x0a9e('0x19'),_0x1314ae);logger[_0x0a9e('0x10')](_0x0a9e('0x19'),_0x1314ae,JSON['stringify'](_0x14433c));_0x1c696a(_0x14433c);})[_0x0a9e('0x18')](function(_0x468813){logger[_0x0a9e('0x13')](_0x0a9e('0x19'),_0x468813['message'],_0x1314ae);_0x105080(_0x112016[_0x0a9e('0x13')](0x1f4,_0x468813[_0x0a9e('0x15')]));});});};
\ No newline at end of file
+var _0xa9e0=['catch','ShowSquareProject','find','options','raw','where','attributes','include','map','model','then','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','register','SquareProject,\x20%s,\x20%s','request\x20sent','debug','SquareProject,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result'];(function(_0x18d8e9,_0x2d9568){var _0x1b9102=function(_0x4ecf17){while(--_0x4ecf17){_0x18d8e9['push'](_0x18d8e9['shift']());}};_0x1b9102(++_0x2d9568);}(_0xa9e0,0x123));var _0x0a9e=function(_0x36dfbd,_0x5bfe2d){_0x36dfbd=_0x36dfbd-0x0;var _0x4ecad9=_0xa9e0[_0x36dfbd];return _0x4ecad9;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});config[_0x0a9e('0xa')]=_[_0x0a9e('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x0a9e('0xc'))(new Redis(config['redis']));require('./squareProject.socket')[_0x0a9e('0xd')](socket);function respondWithRpcPromise(_0xf81284,_0x307b3e,_0x3ab53f){return new BPromise(function(_0xfeb75b,_0xbd1168){return client['request'](_0xf81284,_0x3ab53f)['then'](function(_0x527cdd){logger['info'](_0x0a9e('0xe'),_0x307b3e,_0x0a9e('0xf'));logger[_0x0a9e('0x10')](_0x0a9e('0x11'),_0x307b3e,_0x0a9e('0xf'),JSON[_0x0a9e('0x12')](_0x527cdd));if(_0x527cdd['error']){if(_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x14')]===0x1f4){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x15')]);return _0xbd1168(_0x527cdd['error'][_0x0a9e('0x15')]);}logger['error'](_0x0a9e('0xe'),_0x307b3e,_0x527cdd['error'][_0x0a9e('0x15')]);return _0xfeb75b(_0x527cdd[_0x0a9e('0x13')]['message']);}else{logger[_0x0a9e('0x16')]('SquareProject,\x20%s,\x20%s',_0x307b3e,_0x0a9e('0xf'));_0xfeb75b(_0x527cdd[_0x0a9e('0x17')][_0x0a9e('0x15')]);}})[_0x0a9e('0x18')](function(_0x31b1ca){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x31b1ca);_0xbd1168(_0x31b1ca);});});}exports[_0x0a9e('0x19')]=function(_0x1314ae){var _0x112016=this;return new Promise(function(_0x1c696a,_0x105080){return db['SquareProject'][_0x0a9e('0x1a')]({'raw':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae['options'][_0x0a9e('0x1c')]===undefined?!![]:![]:!![],'where':_0x1314ae['options']?_0x1314ae['options'][_0x0a9e('0x1d')]||null:null,'attributes':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1e')]||null:null,'include':_0x1314ae['options']?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1f')]?_[_0x0a9e('0x20')](_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1f')],function(_0x42ac8f){return{'model':db[_0x42ac8f[_0x0a9e('0x21')]],'as':_0x42ac8f['as'],'attributes':_0x42ac8f['attributes'],'include':_0x42ac8f['include']?_[_0x0a9e('0x20')](_0x42ac8f[_0x0a9e('0x1f')],function(_0x40c424){return{'model':db[_0x40c424[_0x0a9e('0x21')]],'as':_0x40c424['as'],'attributes':_0x40c424['attributes'],'include':_0x40c424[_0x0a9e('0x1f')]?_['map'](_0x40c424[_0x0a9e('0x1f')],function(_0x5bfb33){return{'model':db[_0x5bfb33[_0x0a9e('0x21')]],'as':_0x5bfb33['as'],'attributes':_0x5bfb33[_0x0a9e('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x22')](function(_0x14433c){logger[_0x0a9e('0x16')](_0x0a9e('0x19'),_0x1314ae);logger[_0x0a9e('0x10')](_0x0a9e('0x19'),_0x1314ae,JSON['stringify'](_0x14433c));_0x1c696a(_0x14433c);})[_0x0a9e('0x18')](function(_0x468813){logger[_0x0a9e('0x13')](_0x0a9e('0x19'),_0x468813['message'],_0x1314ae);_0x105080(_0x112016[_0x0a9e('0x13')](0x1f4,_0x468813[_0x0a9e('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.socket.js b/server/api/squareProject/squareProject.socket.js
index 557441a..e9afc7e 100644
--- a/server/api/squareProject/squareProject.socket.js
+++ b/server/api/squareProject/squareProject.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x710e=['length','squareProject:','./squareProject.events','update','emit','removeListener'];(function(_0x3aa5ec,_0x112681){var _0x37f811=function(_0x2a2246){while(--_0x2a2246){_0x3aa5ec['push'](_0x3aa5ec['shift']());}};_0x37f811(++_0x112681);}(_0x710e,0xb6));var _0xe710=function(_0x16dbfc,_0x3bc5ae){_0x16dbfc=_0x16dbfc-0x0;var _0x20e2f5=_0x710e[_0x16dbfc];return _0x20e2f5;};'use strict';var SquareProjectEvents=require(_0xe710('0x0'));var events=['save','remove',_0xe710('0x1')];function createListener(_0x44db10,_0xcc99f0){return function(_0x17e478){_0xcc99f0[_0xe710('0x2')](_0x44db10,_0x17e478);};}function removeListener(_0x4c22aa,_0x17600b){return function(){SquareProjectEvents[_0xe710('0x3')](_0x4c22aa,_0x17600b);};}exports['register']=function(_0x5a9e4c){for(var _0xd8271b=0x0,_0x302291=events[_0xe710('0x4')];_0xd8271b<_0x302291;_0xd8271b++){var _0x211a33=events[_0xd8271b];var _0xf86a0f=createListener(_0xe710('0x5')+_0x211a33,_0x5a9e4c);SquareProjectEvents['on'](_0x211a33,_0xf86a0f);}};
\ No newline at end of file
+var _0x2e31=['./squareProject.events','save','remove','removeListener','squareProject:'];(function(_0x5f09c5,_0x2bfca0){var _0x426ad9=function(_0x18fe5f){while(--_0x18fe5f){_0x5f09c5['push'](_0x5f09c5['shift']());}};_0x426ad9(++_0x2bfca0);}(_0x2e31,0x145));var _0x12e3=function(_0x558a12,_0x4ba8ac){_0x558a12=_0x558a12-0x0;var _0xf2a9f5=_0x2e31[_0x558a12];return _0xf2a9f5;};'use strict';var SquareProjectEvents=require(_0x12e3('0x0'));var events=[_0x12e3('0x1'),_0x12e3('0x2'),'update'];function createListener(_0x152c5f,_0x217ada){return function(_0x503380){_0x217ada['emit'](_0x152c5f,_0x503380);};}function removeListener(_0x146b6b,_0x3d2ac0){return function(){SquareProjectEvents[_0x12e3('0x3')](_0x146b6b,_0x3d2ac0);};}exports['register']=function(_0x3173f9){for(var _0x16ed6b=0x0,_0x5aefcf=events['length'];_0x16ed6b<_0x5aefcf;_0x16ed6b++){var _0x37f287=events[_0x16ed6b];var _0x403cc5=createListener(_0x12e3('0x4')+_0x37f287,_0x3173f9);SquareProjectEvents['on'](_0x37f287,_0x403cc5);}};
\ No newline at end of file
diff --git a/server/api/squareRecording/index.js b/server/api/squareRecording/index.js
index 3f47fe4..15fb381 100644
--- a/server/api/squareRecording/index.js
+++ b/server/api/squareRecording/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb2ef=['Router','../../components/auth/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','index','/:id','show','download','post','put','update','delete','exports','multer','util','path','express'];(function(_0x3331b2,_0x5da208){var _0x4977b4=function(_0x21c636){while(--_0x21c636){_0x3331b2['push'](_0x3331b2['shift']());}};_0x4977b4(++_0x5da208);}(_0xb2ef,0xa7));var _0xfb2e=function(_0x2cb0a9,_0x2ec8a3){_0x2cb0a9=_0x2cb0a9-0x0;var _0x44c916=_0xb2ef[_0x2cb0a9];return _0x44c916;};'use strict';var multer=require(_0xfb2e('0x0'));var util=require(_0xfb2e('0x1'));var path=require(_0xfb2e('0x2'));var timeout=require('connect-timeout');var express=require(_0xfb2e('0x3'));var router=express[_0xfb2e('0x4')]();var auth=require(_0xfb2e('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xfb2e('0x6'));var controller=require(_0xfb2e('0x7'));router[_0xfb2e('0x8')]('/',auth[_0xfb2e('0x9')](),controller[_0xfb2e('0xa')]);router[_0xfb2e('0x8')](_0xfb2e('0xb'),auth[_0xfb2e('0x9')](),controller[_0xfb2e('0xc')]);router[_0xfb2e('0x8')]('/:id/download',auth[_0xfb2e('0x9')](),controller[_0xfb2e('0xd')]);router[_0xfb2e('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0xfb2e('0xf')](_0xfb2e('0xb'),auth['isAuthenticated'](),controller[_0xfb2e('0x10')]);router[_0xfb2e('0x11')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xfb2e('0x12')]=router;
\ No newline at end of file
+var _0x0238=['destroy','multer','util','path','connect-timeout','../../components/auth/service','./squareRecording.controller','get','isAuthenticated','/:id','/:id/download','post','create','delete'];(function(_0x5da946,_0x5996d9){var _0x6587b5=function(_0x2a6034){while(--_0x2a6034){_0x5da946['push'](_0x5da946['shift']());}};_0x6587b5(++_0x5996d9);}(_0x0238,0x1cf));var _0x8023=function(_0x810025,_0x34bb04){_0x810025=_0x810025-0x0;var _0x4dbc81=_0x0238[_0x810025];return _0x4dbc81;};'use strict';var multer=require(_0x8023('0x0'));var util=require(_0x8023('0x1'));var path=require(_0x8023('0x2'));var timeout=require(_0x8023('0x3'));var express=require('express');var router=express['Router']();var auth=require(_0x8023('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x8023('0x5'));router[_0x8023('0x6')]('/',auth[_0x8023('0x7')](),controller['index']);router[_0x8023('0x6')](_0x8023('0x8'),auth[_0x8023('0x7')](),controller['show']);router[_0x8023('0x6')](_0x8023('0x9'),auth[_0x8023('0x7')](),controller['download']);router[_0x8023('0xa')]('/',auth['isAuthenticated'](),controller[_0x8023('0xb')]);router['put']('/:id',auth[_0x8023('0x7')](),controller['update']);router[_0x8023('0xc')](_0x8023('0x8'),auth[_0x8023('0x7')](),controller[_0x8023('0xd')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.attributes.js b/server/api/squareRecording/squareRecording.attributes.js
index 21f8a3e..605727e 100644
--- a/server/api/squareRecording/squareRecording.attributes.js
+++ b/server/api/squareRecording/squareRecording.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb39f=['STRING','exports'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0xb39f,0x13d));var _0xfb39=function(_0x4c2121,_0x210773){_0x4c2121=_0x4c2121-0x0;var _0x1d47bf=_0xb39f[_0x4c2121];return _0x1d47bf;};'use strict';var Sequelize=require('sequelize');module[_0xfb39('0x0')]={'uniqueid':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0xfb39('0x1')]},'calleridname':{'type':Sequelize[_0xfb39('0x1')]},'context':{'type':Sequelize[_0xfb39('0x1')]},'extension':{'type':Sequelize[_0xfb39('0x1')]},'priority':{'type':Sequelize[_0xfb39('0x1')]},'accountcode':{'type':Sequelize[_0xfb39('0x1')]},'dnid':{'type':Sequelize[_0xfb39('0x1')]},'projectName':{'type':Sequelize[_0xfb39('0x1')]},'saveName':{'type':Sequelize[_0xfb39('0x1')]},'filename':{'type':Sequelize['STRING']},'savePath':{'type':Sequelize[_0xfb39('0x1')]}};
\ No newline at end of file
+var _0x6b68=['exports','STRING','sequelize'];(function(_0x24e0c9,_0x284109){var _0x4448f0=function(_0x576980){while(--_0x576980){_0x24e0c9['push'](_0x24e0c9['shift']());}};_0x4448f0(++_0x284109);}(_0x6b68,0x1f4));var _0x86b6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6b68[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x86b6('0x0'));module[_0x86b6('0x1')]={'uniqueid':{'type':Sequelize[_0x86b6('0x2')]},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x86b6('0x2')]},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x86b6('0x2')]},'priority':{'type':Sequelize[_0x86b6('0x2')]},'accountcode':{'type':Sequelize[_0x86b6('0x2')]},'dnid':{'type':Sequelize[_0x86b6('0x2')]},'projectName':{'type':Sequelize[_0x86b6('0x2')]},'saveName':{'type':Sequelize[_0x86b6('0x2')]},'filename':{'type':Sequelize['STRING']},'savePath':{'type':Sequelize[_0x86b6('0x2')]}};
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.controller.js b/server/api/squareRecording/squareRecording.controller.js
index fd83b75..e7401d1 100644
--- a/server/api/squareRecording/squareRecording.controller.js
+++ b/server/api/squareRecording/squareRecording.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb237=['save','update','then','destroy','error','name','send','SquareRecording','rawAttributes','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','merge','type','VIRTUAL','field','filter','options','includeAll','include','rows','catch','show','params','length','find','create','body','download','../../components/encryptor','uniqueid','savePath','filename','format','%s.cypher','decryptFile','recording','existsSync','Sequelize','ValidationError','SquareRecording\x20not\x20found','extname','unlink','Not\x20found','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','Content-Range','reject'];(function(_0x468403,_0x503cea){var _0x231ccb=function(_0xe74d2a){while(--_0xe74d2a){_0x468403['push'](_0x468403['shift']());}};_0x231ccb(++_0x503cea);}(_0xb237,0x1ed));var _0x7b23=function(_0x35f34b,_0x57dad1){_0x35f34b=_0x35f34b-0x0;var _0x21a3b0=_0xb237[_0x35f34b];return _0x21a3b0;};'use strict';var pdf=require(_0x7b23('0x0'));var emlformat=require(_0x7b23('0x1'));var rimraf=require(_0x7b23('0x2'));var zipdir=require(_0x7b23('0x3'));var jsonpatch=require(_0x7b23('0x4'));var rp=require(_0x7b23('0x5'));var moment=require(_0x7b23('0x6'));var BPromise=require(_0x7b23('0x7'));var Mustache=require(_0x7b23('0x8'));var util=require(_0x7b23('0x9'));var path=require('path');var sox=require(_0x7b23('0xa'));var csv=require(_0x7b23('0xb'));var ejs=require(_0x7b23('0xc'));var fs=require('fs');var _=require(_0x7b23('0xd'));var squel=require(_0x7b23('0xe'));var crypto=require(_0x7b23('0xf'));var jsforce=require(_0x7b23('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x7b23('0xb'));var querystring=require(_0x7b23('0x11'));var Papa=require('papaparse');var Redis=require(_0x7b23('0x12'));var authService=require(_0x7b23('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x7b23('0x14'));var logger=require(_0x7b23('0x15'))(_0x7b23('0x16'));var utils=require(_0x7b23('0x17'));var config=require(_0x7b23('0x18'));var db=require(_0x7b23('0x19'))['db'];function respondWithStatusCode(_0xb58220,_0x25f597){_0x25f597=_0x25f597||0xcc;return function(_0x1b24d9){if(_0x1b24d9){return _0xb58220[_0x7b23('0x1a')](_0x25f597);}return _0xb58220['status'](_0x25f597)[_0x7b23('0x1b')]();};}function respondWithResult(_0x1a18c5,_0x1e645a){_0x1e645a=_0x1e645a||0xc8;return function(_0xfd0068){if(_0xfd0068){return _0x1a18c5[_0x7b23('0x1c')](_0x1e645a)[_0x7b23('0x1d')](_0xfd0068);}};}function respondWithFilteredResult(_0x1053ff,_0x1c215a){return function(_0x335d87){if(_0x335d87){var _0x346b43=_0x335d87[_0x7b23('0x1e')],_0x549fb5=_0x1c215a[_0x7b23('0x1f')],_0x64f7f7=_0x1c215a[_0x7b23('0x1f')]+_0x1c215a[_0x7b23('0x20')],_0x4bff1e;if(_0x64f7f7>=_0x346b43){_0x64f7f7=_0x346b43;_0x4bff1e=0xc8;}else{_0x4bff1e=0xce;}_0x1053ff[_0x7b23('0x1c')](_0x4bff1e);return _0x1053ff['set'](_0x7b23('0x21'),_0x549fb5+'-'+_0x64f7f7+'/'+_0x346b43)[_0x7b23('0x1d')](_0x335d87);}return null;};}function patchUpdates(_0x3c5889){return function(_0x1fa47c){try{jsonpatch['apply'](_0x1fa47c,_0x3c5889,!![]);}catch(_0x57e2d6){return BPromise[_0x7b23('0x22')](_0x57e2d6);}return _0x1fa47c[_0x7b23('0x23')]();};}function saveUpdates(_0x439887,_0x18fb45){return function(_0x25c111){if(_0x25c111){return _0x25c111[_0x7b23('0x24')](_0x439887)[_0x7b23('0x25')](function(_0x260560){return _0x260560;});}return null;};}function removeEntity(_0x4068a9,_0x34e540){return function(_0x54ac0e){if(_0x54ac0e){return _0x54ac0e[_0x7b23('0x26')]()[_0x7b23('0x25')](function(){_0x4068a9[_0x7b23('0x1c')](0xcc)[_0x7b23('0x1b')]();});}};}function handleEntityNotFound(_0x51feaf,_0x468dbd){return function(_0x2cedbe){if(!_0x2cedbe){_0x51feaf['sendStatus'](0x194);}return _0x2cedbe;};}function handleError(_0x138076,_0x20ce43){_0x20ce43=_0x20ce43||0x1f4;return function(_0x2eb2dc){logger[_0x7b23('0x27')](_0x2eb2dc['stack']);if(_0x2eb2dc[_0x7b23('0x28')]){delete _0x2eb2dc['name'];}_0x138076[_0x7b23('0x1c')](_0x20ce43)[_0x7b23('0x29')](_0x2eb2dc);};}exports['index']=function(_0x1d0a1b,_0x3c50ae){var _0x3bdad9={},_0x53662c={},_0x6f47bc={'count':0x0,'rows':[]};var _0x46c1fb=db[_0x7b23('0x2a')][_0x7b23('0x2b')];_0x53662c['model']=_['keys'](_0x46c1fb);_0x53662c[_0x7b23('0x2c')]=_[_0x7b23('0x2d')](_0x1d0a1b['query']);_0x53662c[_0x7b23('0x2e')]=_[_0x7b23('0x2f')](_0x53662c[_0x7b23('0x30')],_0x53662c['query']);_0x3bdad9[_0x7b23('0x31')]=_[_0x7b23('0x2f')](_0x53662c[_0x7b23('0x30')],qs[_0x7b23('0x32')](_0x1d0a1b['query'][_0x7b23('0x32')]));_0x3bdad9['attributes']=_0x3bdad9[_0x7b23('0x31')]['length']?_0x3bdad9['attributes']:_0x53662c[_0x7b23('0x30')];if(!_0x1d0a1b[_0x7b23('0x2c')][_0x7b23('0x33')](_0x7b23('0x34'))){_0x3bdad9[_0x7b23('0x20')]=qs[_0x7b23('0x20')](_0x1d0a1b[_0x7b23('0x2c')]['limit']);_0x3bdad9[_0x7b23('0x1f')]=qs[_0x7b23('0x1f')](_0x1d0a1b['query'][_0x7b23('0x1f')]);}_0x3bdad9[_0x7b23('0x35')]=qs[_0x7b23('0x36')](_0x1d0a1b['query'][_0x7b23('0x36')]);_0x3bdad9[_0x7b23('0x37')]=qs[_0x7b23('0x2e')](_['pick'](_0x1d0a1b[_0x7b23('0x2c')],_0x53662c[_0x7b23('0x2e')]));if(_0x1d0a1b['query']['filter']){_0x3bdad9['where']=_[_0x7b23('0x38')](_0x3bdad9['where'],{'$or':_['map'](_0x46c1fb,function(_0xaff464){if(_0xaff464[_0x7b23('0x39')]['key']!==_0x7b23('0x3a')){var _0x590d0c={};_0x590d0c[_0xaff464[_0x7b23('0x3b')]]={'$like':'%'+_0x1d0a1b[_0x7b23('0x2c')][_0x7b23('0x3c')]+'%'};return _0x590d0c;}})});}_0x3bdad9=_[_0x7b23('0x38')]({},_0x3bdad9,_0x1d0a1b[_0x7b23('0x3d')]);var _0x1e8f14={'where':_0x3bdad9[_0x7b23('0x37')]};return db['SquareRecording'][_0x7b23('0x1e')](_0x1e8f14)[_0x7b23('0x25')](function(_0x408861){_0x6f47bc[_0x7b23('0x1e')]=_0x408861;if(_0x1d0a1b[_0x7b23('0x2c')][_0x7b23('0x3e')]){_0x3bdad9[_0x7b23('0x3f')]=[{'all':!![]}];}return db['SquareRecording']['findAll'](_0x3bdad9);})[_0x7b23('0x25')](function(_0xc8fd57){_0x6f47bc[_0x7b23('0x40')]=_0xc8fd57;return _0x6f47bc;})[_0x7b23('0x25')](respondWithFilteredResult(_0x3c50ae,_0x3bdad9))[_0x7b23('0x41')](handleError(_0x3c50ae,null));};exports[_0x7b23('0x42')]=function(_0x39026d,_0x1e4d66){var _0x275399={'raw':!![],'where':{'id':_0x39026d[_0x7b23('0x43')]['id']}},_0x33eea7={};_0x33eea7['model']=_[_0x7b23('0x2d')](db['SquareRecording']['rawAttributes']);_0x33eea7[_0x7b23('0x2c')]=_[_0x7b23('0x2d')](_0x39026d[_0x7b23('0x2c')]);_0x33eea7[_0x7b23('0x2e')]=_[_0x7b23('0x2f')](_0x33eea7[_0x7b23('0x30')],_0x33eea7[_0x7b23('0x2c')]);_0x275399[_0x7b23('0x31')]=_[_0x7b23('0x2f')](_0x33eea7[_0x7b23('0x30')],qs['fields'](_0x39026d[_0x7b23('0x2c')][_0x7b23('0x32')]));_0x275399['attributes']=_0x275399['attributes'][_0x7b23('0x44')]?_0x275399[_0x7b23('0x31')]:_0x33eea7[_0x7b23('0x30')];if(_0x39026d[_0x7b23('0x2c')][_0x7b23('0x3e')]){_0x275399[_0x7b23('0x3f')]=[{'all':!![]}];}_0x275399=_['merge']({},_0x275399,_0x39026d[_0x7b23('0x3d')]);return db[_0x7b23('0x2a')][_0x7b23('0x45')](_0x275399)[_0x7b23('0x25')](handleEntityNotFound(_0x1e4d66,null))['then'](respondWithResult(_0x1e4d66,null))[_0x7b23('0x41')](handleError(_0x1e4d66,null));};exports[_0x7b23('0x46')]=function(_0x55cb23,_0x105410){return db[_0x7b23('0x2a')][_0x7b23('0x46')](_0x55cb23[_0x7b23('0x47')],{})[_0x7b23('0x25')](respondWithResult(_0x105410,0xc9))[_0x7b23('0x41')](handleError(_0x105410,null));};exports[_0x7b23('0x24')]=function(_0x475503,_0x3d373b){if(_0x475503[_0x7b23('0x47')]['id']){delete _0x475503[_0x7b23('0x47')]['id'];}return db[_0x7b23('0x2a')][_0x7b23('0x45')]({'where':{'id':_0x475503[_0x7b23('0x43')]['id']}})[_0x7b23('0x25')](handleEntityNotFound(_0x3d373b,null))[_0x7b23('0x25')](saveUpdates(_0x475503[_0x7b23('0x47')],null))['then'](respondWithResult(_0x3d373b,null))['catch'](handleError(_0x3d373b,null));};exports[_0x7b23('0x26')]=function(_0x4fbd50,_0x1c13ab){return db[_0x7b23('0x2a')]['find']({'where':{'id':_0x4fbd50[_0x7b23('0x43')]['id']}})[_0x7b23('0x25')](handleEntityNotFound(_0x1c13ab,null))[_0x7b23('0x25')](removeEntity(_0x1c13ab,null))[_0x7b23('0x41')](handleError(_0x1c13ab,null));};exports[_0x7b23('0x48')]=function(_0x5d1eee,_0x562472,_0x135fae){var _0x54abf7=require(_0x7b23('0x49'));var _0x383430=![];var _0x47c101={};if(_0x5d1eee[_0x7b23('0x2c')][_0x7b23('0x39')]&&_0x5d1eee[_0x7b23('0x2c')][_0x7b23('0x39')]==='uniqueid'){_0x47c101[_0x7b23('0x4a')]=_0x5d1eee['params']['id'];}else{_0x47c101['id']=_0x5d1eee['params']['id'];}return db[_0x7b23('0x2a')]['find']({'where':_0x47c101,'attributes':['id',_0x7b23('0x4b'),_0x7b23('0x4c')],'raw':!![]})[_0x7b23('0x25')](handleEntityNotFound(_0x562472,null))['then'](function(_0x5bfc60){if(_0x5bfc60){var _0x102712=_0x5bfc60['savePath'];var _0x4f4a05=util[_0x7b23('0x4d')](_0x7b23('0x4e'),_0x102712);if(fs['existsSync'](_0x4f4a05)){_0x383430=!![];return _0x54abf7[_0x7b23('0x4f')](_0x4f4a05,_0x102712,config['secrets'][_0x7b23('0x50')])[_0x7b23('0x25')](function(){return _0x5bfc60;});}return _0x5bfc60;}})['then'](function(_0x477dab){if(_0x477dab){var _0xd68e06=_0x477dab[_0x7b23('0x4b')];if(!fs[_0x7b23('0x51')](_0xd68e06)){throw new db[(_0x7b23('0x52'))][(_0x7b23('0x53'))](_0x7b23('0x54'));}if(_0x477dab['filename']){return _0x562472[_0x7b23('0x48')](_0xd68e06,_0x477dab[_0x7b23('0x4c')]+path[_0x7b23('0x55')](_0xd68e06),function(){if(_0x383430){fs[_0x7b23('0x56')](_0xd68e06);}});}else{return _0x562472[_0x7b23('0x48')](_0xd68e06,function(_0x53fd86){if(_0x383430){fs['unlink'](_0xd68e06);}});}}})[_0x7b23('0x41')](function(_0x49b4b9){if(_0x49b4b9['message']===_0x7b23('0x54')){_0x562472[_0x7b23('0x1c')](0x194)[_0x7b23('0x29')](_0x7b23('0x57'));}else{return handleError(_0x562472,null);}});};
\ No newline at end of file
+var _0xa26e=['Not\x20found','html-pdf','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','lodash','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','end','status','offset','limit','json','apply','save','update','then','destroy','error','name','send','index','model','keys','filters','query','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','pick','filter','merge','type','key','VIRTUAL','field','where','SquareRecording','count','includeAll','include','findAll','rows','catch','show','params','length','find','create','body','download','../../components/encryptor','uniqueid','savePath','filename','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','extname','unlink','message'];(function(_0x3cdf76,_0x63322b){var _0x1f1bdb=function(_0x6e3bd1){while(--_0x6e3bd1){_0x3cdf76['push'](_0x3cdf76['shift']());}};_0x1f1bdb(++_0x63322b);}(_0xa26e,0x14d));var _0xea26=function(_0x1e1645,_0x44100f){_0x1e1645=_0x1e1645-0x0;var _0x511e70=_0xa26e[_0x1e1645];return _0x511e70;};'use strict';var pdf=require(_0xea26('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xea26('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xea26('0x2'));var rp=require(_0xea26('0x3'));var moment=require('moment');var BPromise=require(_0xea26('0x4'));var Mustache=require(_0xea26('0x5'));var util=require(_0xea26('0x6'));var path=require(_0xea26('0x7'));var sox=require('sox');var csv=require(_0xea26('0x8'));var ejs=require(_0xea26('0x9'));var fs=require('fs');var _=require(_0xea26('0xa'));var squel=require('squel');var crypto=require(_0xea26('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xea26('0xc'));var toCsv=require(_0xea26('0x8'));var querystring=require(_0xea26('0xd'));var Papa=require('papaparse');var Redis=require(_0xea26('0xe'));var authService=require(_0xea26('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xea26('0x10'));var logger=require(_0xea26('0x11'))('api');var utils=require(_0xea26('0x12'));var config=require(_0xea26('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3ac186,_0x1b3b6b){_0x1b3b6b=_0x1b3b6b||0xcc;return function(_0x207394){if(_0x207394){return _0x3ac186[_0xea26('0x14')](_0x1b3b6b);}return _0x3ac186['status'](_0x1b3b6b)[_0xea26('0x15')]();};}function respondWithResult(_0x4c7919,_0x582f3b){_0x582f3b=_0x582f3b||0xc8;return function(_0x3eb318){if(_0x3eb318){return _0x4c7919[_0xea26('0x16')](_0x582f3b)['json'](_0x3eb318);}};}function respondWithFilteredResult(_0x12f0bc,_0x5a4b9c){return function(_0x16813f){if(_0x16813f){var _0x445806=_0x16813f['count'],_0x10533c=_0x5a4b9c[_0xea26('0x17')],_0x4383ad=_0x5a4b9c[_0xea26('0x17')]+_0x5a4b9c[_0xea26('0x18')],_0x5bca30;if(_0x4383ad>=_0x445806){_0x4383ad=_0x445806;_0x5bca30=0xc8;}else{_0x5bca30=0xce;}_0x12f0bc[_0xea26('0x16')](_0x5bca30);return _0x12f0bc['set']('Content-Range',_0x10533c+'-'+_0x4383ad+'/'+_0x445806)[_0xea26('0x19')](_0x16813f);}return null;};}function patchUpdates(_0xb91a6b){return function(_0xd3396c){try{jsonpatch[_0xea26('0x1a')](_0xd3396c,_0xb91a6b,!![]);}catch(_0x45f5f4){return BPromise['reject'](_0x45f5f4);}return _0xd3396c[_0xea26('0x1b')]();};}function saveUpdates(_0x647ea5,_0xed1d5a){return function(_0x5b6b5f){if(_0x5b6b5f){return _0x5b6b5f[_0xea26('0x1c')](_0x647ea5)[_0xea26('0x1d')](function(_0x16e512){return _0x16e512;});}return null;};}function removeEntity(_0x38037e,_0xe35b49){return function(_0x4415a5){if(_0x4415a5){return _0x4415a5[_0xea26('0x1e')]()[_0xea26('0x1d')](function(){_0x38037e[_0xea26('0x16')](0xcc)[_0xea26('0x15')]();});}};}function handleEntityNotFound(_0x509fac,_0x37abf4){return function(_0x122a16){if(!_0x122a16){_0x509fac[_0xea26('0x14')](0x194);}return _0x122a16;};}function handleError(_0x14c65a,_0x2e03c5){_0x2e03c5=_0x2e03c5||0x1f4;return function(_0x42d8ac){logger[_0xea26('0x1f')](_0x42d8ac['stack']);if(_0x42d8ac[_0xea26('0x20')]){delete _0x42d8ac[_0xea26('0x20')];}_0x14c65a[_0xea26('0x16')](_0x2e03c5)[_0xea26('0x21')](_0x42d8ac);};}exports[_0xea26('0x22')]=function(_0x204153,_0x1c8724){var _0x3e59b6={},_0x251048={},_0xd3dff3={'count':0x0,'rows':[]};var _0x1bf93d=db['SquareRecording']['rawAttributes'];_0x251048[_0xea26('0x23')]=_[_0xea26('0x24')](_0x1bf93d);_0x251048['query']=_[_0xea26('0x24')](_0x204153['query']);_0x251048[_0xea26('0x25')]=_['intersection'](_0x251048[_0xea26('0x23')],_0x251048[_0xea26('0x26')]);_0x3e59b6[_0xea26('0x27')]=_[_0xea26('0x28')](_0x251048[_0xea26('0x23')],qs['fields'](_0x204153['query'][_0xea26('0x29')]));_0x3e59b6['attributes']=_0x3e59b6[_0xea26('0x27')]['length']?_0x3e59b6[_0xea26('0x27')]:_0x251048[_0xea26('0x23')];if(!_0x204153['query'][_0xea26('0x2a')](_0xea26('0x2b'))){_0x3e59b6[_0xea26('0x18')]=qs[_0xea26('0x18')](_0x204153[_0xea26('0x26')][_0xea26('0x18')]);_0x3e59b6[_0xea26('0x17')]=qs[_0xea26('0x17')](_0x204153[_0xea26('0x26')][_0xea26('0x17')]);}_0x3e59b6[_0xea26('0x2c')]=qs[_0xea26('0x2d')](_0x204153['query'][_0xea26('0x2d')]);_0x3e59b6['where']=qs[_0xea26('0x25')](_[_0xea26('0x2e')](_0x204153[_0xea26('0x26')],_0x251048[_0xea26('0x25')]));if(_0x204153['query'][_0xea26('0x2f')]){_0x3e59b6['where']=_[_0xea26('0x30')](_0x3e59b6['where'],{'$or':_['map'](_0x1bf93d,function(_0x582a11){if(_0x582a11[_0xea26('0x31')][_0xea26('0x32')]!==_0xea26('0x33')){var _0x1641db={};_0x1641db[_0x582a11[_0xea26('0x34')]]={'$like':'%'+_0x204153[_0xea26('0x26')]['filter']+'%'};return _0x1641db;}})});}_0x3e59b6=_[_0xea26('0x30')]({},_0x3e59b6,_0x204153['options']);var _0x2b4854={'where':_0x3e59b6[_0xea26('0x35')]};return db[_0xea26('0x36')]['count'](_0x2b4854)[_0xea26('0x1d')](function(_0x188e6a){_0xd3dff3[_0xea26('0x37')]=_0x188e6a;if(_0x204153[_0xea26('0x26')][_0xea26('0x38')]){_0x3e59b6[_0xea26('0x39')]=[{'all':!![]}];}return db[_0xea26('0x36')][_0xea26('0x3a')](_0x3e59b6);})['then'](function(_0x4e9ea4){_0xd3dff3[_0xea26('0x3b')]=_0x4e9ea4;return _0xd3dff3;})[_0xea26('0x1d')](respondWithFilteredResult(_0x1c8724,_0x3e59b6))[_0xea26('0x3c')](handleError(_0x1c8724,null));};exports[_0xea26('0x3d')]=function(_0x100bac,_0x415985){var _0x275e44={'raw':!![],'where':{'id':_0x100bac[_0xea26('0x3e')]['id']}},_0x4b12d5={};_0x4b12d5[_0xea26('0x23')]=_[_0xea26('0x24')](db[_0xea26('0x36')]['rawAttributes']);_0x4b12d5[_0xea26('0x26')]=_['keys'](_0x100bac['query']);_0x4b12d5[_0xea26('0x25')]=_['intersection'](_0x4b12d5[_0xea26('0x23')],_0x4b12d5[_0xea26('0x26')]);_0x275e44[_0xea26('0x27')]=_[_0xea26('0x28')](_0x4b12d5[_0xea26('0x23')],qs['fields'](_0x100bac[_0xea26('0x26')]['fields']));_0x275e44[_0xea26('0x27')]=_0x275e44[_0xea26('0x27')][_0xea26('0x3f')]?_0x275e44[_0xea26('0x27')]:_0x4b12d5[_0xea26('0x23')];if(_0x100bac[_0xea26('0x26')][_0xea26('0x38')]){_0x275e44[_0xea26('0x39')]=[{'all':!![]}];}_0x275e44=_[_0xea26('0x30')]({},_0x275e44,_0x100bac['options']);return db[_0xea26('0x36')][_0xea26('0x40')](_0x275e44)[_0xea26('0x1d')](handleEntityNotFound(_0x415985,null))[_0xea26('0x1d')](respondWithResult(_0x415985,null))['catch'](handleError(_0x415985,null));};exports[_0xea26('0x41')]=function(_0x2c477f,_0x5b5c23){return db[_0xea26('0x36')][_0xea26('0x41')](_0x2c477f[_0xea26('0x42')],{})[_0xea26('0x1d')](respondWithResult(_0x5b5c23,0xc9))[_0xea26('0x3c')](handleError(_0x5b5c23,null));};exports['update']=function(_0x3b4397,_0x210f3e){if(_0x3b4397[_0xea26('0x42')]['id']){delete _0x3b4397[_0xea26('0x42')]['id'];}return db['SquareRecording'][_0xea26('0x40')]({'where':{'id':_0x3b4397[_0xea26('0x3e')]['id']}})[_0xea26('0x1d')](handleEntityNotFound(_0x210f3e,null))[_0xea26('0x1d')](saveUpdates(_0x3b4397[_0xea26('0x42')],null))[_0xea26('0x1d')](respondWithResult(_0x210f3e,null))[_0xea26('0x3c')](handleError(_0x210f3e,null));};exports['destroy']=function(_0x521c14,_0x558df5){return db[_0xea26('0x36')][_0xea26('0x40')]({'where':{'id':_0x521c14[_0xea26('0x3e')]['id']}})[_0xea26('0x1d')](handleEntityNotFound(_0x558df5,null))[_0xea26('0x1d')](removeEntity(_0x558df5,null))[_0xea26('0x3c')](handleError(_0x558df5,null));};exports[_0xea26('0x43')]=function(_0x2c8c3b,_0x17aa6e,_0xfb1998){var _0x23c292=require(_0xea26('0x44'));var _0xdf69df=![];var _0x53d2e8={};if(_0x2c8c3b[_0xea26('0x26')]['type']&&_0x2c8c3b['query'][_0xea26('0x31')]===_0xea26('0x45')){_0x53d2e8[_0xea26('0x45')]=_0x2c8c3b[_0xea26('0x3e')]['id'];}else{_0x53d2e8['id']=_0x2c8c3b['params']['id'];}return db[_0xea26('0x36')][_0xea26('0x40')]({'where':_0x53d2e8,'attributes':['id',_0xea26('0x46'),_0xea26('0x47')],'raw':!![]})['then'](handleEntityNotFound(_0x17aa6e,null))[_0xea26('0x1d')](function(_0xbef8e0){if(_0xbef8e0){var _0xc0b897=_0xbef8e0[_0xea26('0x46')];var _0x5f1008=util['format']('%s.cypher',_0xc0b897);if(fs[_0xea26('0x48')](_0x5f1008)){_0xdf69df=!![];return _0x23c292[_0xea26('0x49')](_0x5f1008,_0xc0b897,config[_0xea26('0x4a')][_0xea26('0x4b')])[_0xea26('0x1d')](function(){return _0xbef8e0;});}return _0xbef8e0;}})[_0xea26('0x1d')](function(_0xb2d1c6){if(_0xb2d1c6){var _0x188939=_0xb2d1c6[_0xea26('0x46')];if(!fs[_0xea26('0x48')](_0x188939)){throw new db[(_0xea26('0x4c'))][(_0xea26('0x4d'))](_0xea26('0x4e'));}if(_0xb2d1c6['filename']){return _0x17aa6e[_0xea26('0x43')](_0x188939,_0xb2d1c6[_0xea26('0x47')]+path[_0xea26('0x4f')](_0x188939),function(){if(_0xdf69df){fs[_0xea26('0x50')](_0x188939);}});}else{return _0x17aa6e[_0xea26('0x43')](_0x188939,function(_0x5b695b){if(_0xdf69df){fs[_0xea26('0x50')](_0x188939);}});}}})[_0xea26('0x3c')](function(_0x58c13f){if(_0x58c13f[_0xea26('0x51')]===_0xea26('0x4e')){_0x17aa6e[_0xea26('0x16')](0x194)[_0xea26('0x21')](_0xea26('0x52'));}else{return handleError(_0x17aa6e,null);}});};
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.model.js b/server/api/squareRecording/squareRecording.model.js
index afd4c98..570007f 100644
--- a/server/api/squareRecording/squareRecording.model.js
+++ b/server/api/squareRecording/squareRecording.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3773=['SquareRecording','square_recordings','lodash','util','api','moment','bluebird','path','rimraf','./squareRecording.attributes','exports'];(function(_0x123c39,_0x1c73c3){var _0x574f89=function(_0x140ec5){while(--_0x140ec5){_0x123c39['push'](_0x123c39['shift']());}};_0x574f89(++_0x1c73c3);}(_0x3773,0x120));var _0x3377=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x3773[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0x3377('0x0'));var util=require(_0x3377('0x1'));var logger=require('../../config/logger')(_0x3377('0x2'));var moment=require(_0x3377('0x3'));var BPromise=require(_0x3377('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3377('0x5'));var rimraf=require(_0x3377('0x6'));var config=require('../../config/environment');var attributes=require(_0x3377('0x7'));module[_0x3377('0x8')]=function(_0x40c2ac,_0x3f43bd){return _0x40c2ac['define'](_0x3377('0x9'),attributes,{'tableName':_0x3377('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9281=['define','SquareRecording','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./squareRecording.attributes','exports'];(function(_0xd70515,_0x50cfb3){var _0x1e9a3a=function(_0xbb7d0c){while(--_0xbb7d0c){_0xd70515['push'](_0xd70515['shift']());}};_0x1e9a3a(++_0x50cfb3);}(_0x9281,0x110));var _0x1928=function(_0x1ddc22,_0x1b0f22){_0x1ddc22=_0x1ddc22-0x0;var _0x3aef2e=_0x9281[_0x1ddc22];return _0x3aef2e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x1928('0x0'))(_0x1928('0x1'));var moment=require('moment');var BPromise=require(_0x1928('0x2'));var rp=require(_0x1928('0x3'));var fs=require('fs');var path=require(_0x1928('0x4'));var rimraf=require('rimraf');var config=require(_0x1928('0x5'));var attributes=require(_0x1928('0x6'));module[_0x1928('0x7')]=function(_0x279e45,_0x371d2d){return _0x279e45[_0x1928('0x8')](_0x1928('0x9'),attributes,{'tableName':'square_recordings','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.rpc.js b/server/api/squareRecording/squareRecording.rpc.js
index 9169920..d5a1a9a 100644
--- a/server/api/squareRecording/squareRecording.rpc.js
+++ b/server/api/squareRecording/squareRecording.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1851=['bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','SquareRecording','create','body','options','raw','CreateSquareRecording','catch','lodash','util'];(function(_0x44b3bd,_0x44c97d){var _0x1efc4a=function(_0x5d0205){while(--_0x5d0205){_0x44b3bd['push'](_0x44b3bd['shift']());}};_0x1efc4a(++_0x44c97d);}(_0x1851,0xee));var _0x1185=function(_0x5e1a77,_0x440700){_0x5e1a77=_0x5e1a77-0x0;var _0x4fc1ff=_0x1851[_0x5e1a77];return _0x4fc1ff;};'use strict';var _=require(_0x1185('0x0'));var util=require(_0x1185('0x1'));var moment=require('moment');var BPromise=require(_0x1185('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1185('0x3'));var db=require(_0x1185('0x4'))['db'];var utils=require(_0x1185('0x5'));var logger=require(_0x1185('0x6'))('rpc');var config=require(_0x1185('0x7'));var jayson=require(_0x1185('0x8'));var client=jayson[_0x1185('0x9')][_0x1185('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4f2eec,_0xd83cce,_0x237b7d){return new BPromise(function(_0x51827a,_0x452229){return client[_0x1185('0xb')](_0x4f2eec,_0x237b7d)[_0x1185('0xc')](function(_0x5b3d46){logger[_0x1185('0xd')](_0x1185('0xe'),_0xd83cce,_0x1185('0xf'));logger[_0x1185('0x10')](_0x1185('0x11'),_0xd83cce,_0x1185('0xf'),JSON[_0x1185('0x12')](_0x5b3d46));if(_0x5b3d46['error']){if(_0x5b3d46['error'][_0x1185('0x13')]===0x1f4){logger[_0x1185('0x14')](_0x1185('0xe'),_0xd83cce,_0x5b3d46['error'][_0x1185('0x15')]);return _0x452229(_0x5b3d46[_0x1185('0x14')][_0x1185('0x15')]);}logger['error'](_0x1185('0xe'),_0xd83cce,_0x5b3d46[_0x1185('0x14')][_0x1185('0x15')]);return _0x51827a(_0x5b3d46[_0x1185('0x14')][_0x1185('0x15')]);}else{logger['info'](_0x1185('0xe'),_0xd83cce,_0x1185('0xf'));_0x51827a(_0x5b3d46[_0x1185('0x16')][_0x1185('0x15')]);}})['catch'](function(_0x53d5d1){logger[_0x1185('0x14')](_0x1185('0xe'),_0xd83cce,_0x53d5d1);_0x452229(_0x53d5d1);});});}exports['CreateSquareRecording']=function(_0x20ff11){var _0x5af007=this;return new Promise(function(_0x4171d2,_0x320d5d){return db[_0x1185('0x17')][_0x1185('0x18')](_0x20ff11[_0x1185('0x19')],{'raw':_0x20ff11[_0x1185('0x1a')]?_0x20ff11[_0x1185('0x1a')][_0x1185('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x2b4734){logger['info'](_0x1185('0x1c'),_0x20ff11);logger[_0x1185('0x10')]('CreateSquareRecording',_0x20ff11,JSON['stringify'](_0x2b4734));_0x4171d2(_0x2b4734);})[_0x1185('0x1d')](function(_0x39cbf4){logger[_0x1185('0x14')]('CreateSquareRecording',_0x39cbf4[_0x1185('0x15')],_0x20ff11);_0x320d5d(_0x5af007[_0x1185('0x14')](0x1f4,_0x39cbf4[_0x1185('0x15')]));});});};
\ No newline at end of file
+var _0x6945=['catch','lodash','util','bluebird','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','SquareRecording,\x20%s,\x20%s','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','SquareRecording','options','CreateSquareRecording','debug'];(function(_0x2f3319,_0x724b5b){var _0xb226c5=function(_0x57759a){while(--_0x57759a){_0x2f3319['push'](_0x2f3319['shift']());}};_0xb226c5(++_0x724b5b);}(_0x6945,0x139));var _0x5694=function(_0x4268a3,_0x120185){_0x4268a3=_0x4268a3-0x0;var _0xd9f763=_0x6945[_0x4268a3];return _0xd9f763;};'use strict';var _=require(_0x5694('0x0'));var util=require(_0x5694('0x1'));var moment=require('moment');var BPromise=require(_0x5694('0x2'));var rs=require(_0x5694('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x5694('0x4'));var logger=require('../../config/logger')(_0x5694('0x5'));var config=require(_0x5694('0x6'));var jayson=require(_0x5694('0x7'));var client=jayson[_0x5694('0x8')][_0x5694('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x11fc8f,_0x535019,_0x1ac787){return new BPromise(function(_0x3c546f,_0x8b0df2){return client[_0x5694('0xa')](_0x11fc8f,_0x1ac787)[_0x5694('0xb')](function(_0x55b03f){logger['info'](_0x5694('0xc'),_0x535019,_0x5694('0xd'));logger['debug'](_0x5694('0xe'),_0x535019,_0x5694('0xd'),JSON[_0x5694('0xf')](_0x55b03f));if(_0x55b03f['error']){if(_0x55b03f[_0x5694('0x10')][_0x5694('0x11')]===0x1f4){logger['error']('SquareRecording,\x20%s,\x20%s',_0x535019,_0x55b03f['error'][_0x5694('0x12')]);return _0x8b0df2(_0x55b03f[_0x5694('0x10')][_0x5694('0x12')]);}logger[_0x5694('0x10')](_0x5694('0xc'),_0x535019,_0x55b03f[_0x5694('0x10')][_0x5694('0x12')]);return _0x3c546f(_0x55b03f[_0x5694('0x10')]['message']);}else{logger[_0x5694('0x13')](_0x5694('0xc'),_0x535019,_0x5694('0xd'));_0x3c546f(_0x55b03f[_0x5694('0x14')][_0x5694('0x12')]);}})['catch'](function(_0x268815){logger['error'](_0x5694('0xc'),_0x535019,_0x268815);_0x8b0df2(_0x268815);});});}exports['CreateSquareRecording']=function(_0x28d469){var _0x6ae7c3=this;return new Promise(function(_0x464df9,_0x449bcc){return db[_0x5694('0x15')]['create'](_0x28d469['body'],{'raw':_0x28d469[_0x5694('0x16')]?_0x28d469[_0x5694('0x16')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x168560){logger[_0x5694('0x13')](_0x5694('0x17'),_0x28d469);logger[_0x5694('0x18')](_0x5694('0x17'),_0x28d469,JSON['stringify'](_0x168560));_0x464df9(_0x168560);})[_0x5694('0x19')](function(_0x41750a){logger[_0x5694('0x10')](_0x5694('0x17'),_0x41750a['message'],_0x28d469);_0x449bcc(_0x6ae7c3['error'](0x1f4,_0x41750a[_0x5694('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/squareReport/index.js b/server/api/squareReport/index.js
index f74173d..49bbddc 100644
--- a/server/api/squareReport/index.js
+++ b/server/api/squareReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x604b=['connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./squareReport.controller','get','isAuthenticated','/describe','/:id','create','put','update','delete','exports','multer','util'];(function(_0x1a0450,_0x4b666f){var _0x2a72a3=function(_0x5db057){while(--_0x5db057){_0x1a0450['push'](_0x1a0450['shift']());}};_0x2a72a3(++_0x4b666f);}(_0x604b,0x9e));var _0xb604=function(_0x289677,_0x4ee1a6){_0x289677=_0x289677-0x0;var _0xa2f0c6=_0x604b[_0x289677];return _0xa2f0c6;};'use strict';var multer=require(_0xb604('0x0'));var util=require(_0xb604('0x1'));var path=require('path');var timeout=require(_0xb604('0x2'));var express=require('express');var router=express[_0xb604('0x3')]();var auth=require(_0xb604('0x4'));var interaction=require(_0xb604('0x5'));var config=require('../../config/environment');var controller=require(_0xb604('0x6'));router[_0xb604('0x7')]('/',auth[_0xb604('0x8')](),controller['index']);router[_0xb604('0x7')](_0xb604('0x9'),auth['isAuthenticated'](),controller['describe']);router['get'](_0xb604('0xa'),auth[_0xb604('0x8')](),controller['show']);router['post']('/',auth['isAuthenticated'](),controller[_0xb604('0xb')]);router[_0xb604('0xc')]('/:id',auth[_0xb604('0x8')](),controller[_0xb604('0xd')]);router[_0xb604('0xe')](_0xb604('0xa'),auth['isAuthenticated'](),controller['destroy']);module[_0xb604('0xf')]=router;
\ No newline at end of file
+var _0x54e8=['put','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReport.controller','get','isAuthenticated','/describe','/:id','show','post','create'];(function(_0x32be56,_0x162a53){var _0x46eedc=function(_0x97180){while(--_0x97180){_0x32be56['push'](_0x32be56['shift']());}};_0x46eedc(++_0x162a53);}(_0x54e8,0x158));var _0x854e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x54e8[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x854e('0x0'));var util=require(_0x854e('0x1'));var path=require(_0x854e('0x2'));var timeout=require(_0x854e('0x3'));var express=require('express');var router=express[_0x854e('0x4')]();var auth=require(_0x854e('0x5'));var interaction=require(_0x854e('0x6'));var config=require(_0x854e('0x7'));var controller=require(_0x854e('0x8'));router[_0x854e('0x9')]('/',auth[_0x854e('0xa')](),controller['index']);router[_0x854e('0x9')](_0x854e('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0x854e('0x9')](_0x854e('0xc'),auth['isAuthenticated'](),controller[_0x854e('0xd')]);router[_0x854e('0xe')]('/',auth[_0x854e('0xa')](),controller[_0x854e('0xf')]);router[_0x854e('0x10')](_0x854e('0xc'),auth[_0x854e('0xa')](),controller['update']);router[_0x854e('0x11')](_0x854e('0xc'),auth['isAuthenticated'](),controller[_0x854e('0x12')]);module[_0x854e('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.attributes.js b/server/api/squareReport/squareReport.attributes.js
index 3eb5ba3..0a7d06b 100644
--- a/server/api/squareReport/squareReport.attributes.js
+++ b/server/api/squareReport/squareReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x04d0=['STRING','DATE'];(function(_0x4f4b5b,_0x75183){var _0x769fa5=function(_0xd0571c){while(--_0xd0571c){_0x4f4b5b['push'](_0x4f4b5b['shift']());}};_0x769fa5(++_0x75183);}(_0x04d0,0x10a));var _0x004d=function(_0x327d15,_0x56e816){_0x327d15=_0x327d15-0x0;var _0x3641b7=_0x04d0[_0x327d15];return _0x3641b7;};'use strict';var Sequelize=require('sequelize');module['exports']={'network':{'type':Sequelize[_0x004d('0x0')]},'network_script':{'type':Sequelize[_0x004d('0x0')]},'request':{'type':Sequelize[_0x004d('0x0')]},'channel':{'type':Sequelize[_0x004d('0x0')]},'language':{'type':Sequelize[_0x004d('0x0')]},'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize['STRING']},'version':{'type':Sequelize[_0x004d('0x0')]},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x004d('0x0')]},'callingpres':{'type':Sequelize[_0x004d('0x0')]},'callingani2':{'type':Sequelize['STRING']},'callington':{'type':Sequelize[_0x004d('0x0')]},'callingtns':{'type':Sequelize[_0x004d('0x0')]},'dnid':{'type':Sequelize['STRING']},'rdnis':{'type':Sequelize[_0x004d('0x0')]},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x004d('0x0')]},'priority':{'type':Sequelize[_0x004d('0x0')]},'enhanced':{'type':Sequelize[_0x004d('0x0')]},'accountcode':{'type':Sequelize['STRING']},'threadid':{'type':Sequelize[_0x004d('0x0')]},'project_name':{'type':Sequelize[_0x004d('0x0')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x004d('0x1')]},'bot':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x4e83=['exports','STRING','DATE','BOOLEAN'];(function(_0x1507d3,_0x2bdf04){var _0x76770a=function(_0x5a33bb){while(--_0x5a33bb){_0x1507d3['push'](_0x1507d3['shift']());}};_0x76770a(++_0x2bdf04);}(_0x4e83,0x88));var _0x34e8=function(_0x131090,_0x4b5e43){_0x131090=_0x131090-0x0;var _0x1e10cf=_0x4e83[_0x131090];return _0x1e10cf;};'use strict';var Sequelize=require('sequelize');module[_0x34e8('0x0')]={'network':{'type':Sequelize[_0x34e8('0x1')]},'network_script':{'type':Sequelize[_0x34e8('0x1')]},'request':{'type':Sequelize[_0x34e8('0x1')]},'channel':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x34e8('0x1')]},'type':{'type':Sequelize[_0x34e8('0x1')]},'uniqueid':{'type':Sequelize[_0x34e8('0x1')]},'version':{'type':Sequelize[_0x34e8('0x1')]},'callerid':{'type':Sequelize[_0x34e8('0x1')]},'calleridname':{'type':Sequelize[_0x34e8('0x1')]},'callingpres':{'type':Sequelize[_0x34e8('0x1')]},'callingani2':{'type':Sequelize[_0x34e8('0x1')]},'callington':{'type':Sequelize[_0x34e8('0x1')]},'callingtns':{'type':Sequelize[_0x34e8('0x1')]},'dnid':{'type':Sequelize[_0x34e8('0x1')]},'rdnis':{'type':Sequelize[_0x34e8('0x1')]},'context':{'type':Sequelize[_0x34e8('0x1')]},'extension':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x34e8('0x1')]},'enhanced':{'type':Sequelize[_0x34e8('0x1')]},'accountcode':{'type':Sequelize[_0x34e8('0x1')]},'threadid':{'type':Sequelize['STRING']},'project_name':{'type':Sequelize[_0x34e8('0x1')]},'joinAt':{'type':Sequelize[_0x34e8('0x2')]},'leaveAt':{'type':Sequelize[_0x34e8('0x2')]},'bot':{'type':Sequelize[_0x34e8('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.controller.js b/server/api/squareReport/squareReport.controller.js
index 20db61b..160f9f8 100644
--- a/server/api/squareReport/squareReport.controller.js
+++ b/server/api/squareReport/squareReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1623=['where','pick','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','create','body','update','describe','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','end','status','json','count','offset','set','Content-Range','apply','reject','save','then','destroy','error','stack','name','send','index','SquareReport','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','sort'];(function(_0x381bad,_0x5c3ff9){var _0x6a24a6=function(_0x51e11a){while(--_0x51e11a){_0x381bad['push'](_0x381bad['shift']());}};_0x6a24a6(++_0x5c3ff9);}(_0x1623,0x147));var _0x3162=function(_0x1c50cb,_0x2777b9){_0x1c50cb=_0x1c50cb-0x0;var _0x129530=_0x1623[_0x1c50cb];return _0x129530;};'use strict';var pdf=require(_0x3162('0x0'));var emlformat=require(_0x3162('0x1'));var rimraf=require(_0x3162('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3162('0x3'));var rp=require(_0x3162('0x4'));var moment=require(_0x3162('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x3162('0x6'));var util=require('util');var path=require('path');var sox=require(_0x3162('0x7'));var csv=require(_0x3162('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x3162('0x9'));var squel=require(_0x3162('0xa'));var crypto=require(_0x3162('0xb'));var jsforce=require(_0x3162('0xc'));var deskjs=require(_0x3162('0xd'));var toCsv=require(_0x3162('0x8'));var querystring=require(_0x3162('0xe'));var Papa=require('papaparse');var Redis=require(_0x3162('0xf'));var authService=require(_0x3162('0x10'));var qs=require(_0x3162('0x11'));var hardwareService=require(_0x3162('0x12'));var logger=require(_0x3162('0x13'))(_0x3162('0x14'));var utils=require(_0x3162('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1696f7,_0x23f731){_0x23f731=_0x23f731||0xcc;return function(_0x9a45e1){if(_0x9a45e1){return _0x1696f7[_0x3162('0x16')](_0x23f731);}return _0x1696f7['status'](_0x23f731)[_0x3162('0x17')]();};}function respondWithResult(_0x368bf0,_0xdefcf3){_0xdefcf3=_0xdefcf3||0xc8;return function(_0x412dae){if(_0x412dae){return _0x368bf0[_0x3162('0x18')](_0xdefcf3)[_0x3162('0x19')](_0x412dae);}};}function respondWithFilteredResult(_0x151d50,_0x11a06d){return function(_0x36cf70){if(_0x36cf70){var _0x2ca48e=_0x36cf70[_0x3162('0x1a')],_0x413337=_0x11a06d[_0x3162('0x1b')],_0x15e24d=_0x11a06d[_0x3162('0x1b')]+_0x11a06d['limit'],_0x9125c8;if(_0x15e24d>=_0x2ca48e){_0x15e24d=_0x2ca48e;_0x9125c8=0xc8;}else{_0x9125c8=0xce;}_0x151d50['status'](_0x9125c8);return _0x151d50[_0x3162('0x1c')](_0x3162('0x1d'),_0x413337+'-'+_0x15e24d+'/'+_0x2ca48e)['json'](_0x36cf70);}return null;};}function patchUpdates(_0x169f66){return function(_0x2216ce){try{jsonpatch[_0x3162('0x1e')](_0x2216ce,_0x169f66,!![]);}catch(_0x4714cb){return BPromise[_0x3162('0x1f')](_0x4714cb);}return _0x2216ce[_0x3162('0x20')]();};}function saveUpdates(_0x281a7b,_0x2714d4){return function(_0x42c095){if(_0x42c095){return _0x42c095['update'](_0x281a7b)[_0x3162('0x21')](function(_0x2c0b19){return _0x2c0b19;});}return null;};}function removeEntity(_0x49c174,_0x3f2ce6){return function(_0x24b3e6){if(_0x24b3e6){return _0x24b3e6[_0x3162('0x22')]()['then'](function(){_0x49c174[_0x3162('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1c5836,_0xc24cbc){return function(_0x597934){if(!_0x597934){_0x1c5836[_0x3162('0x16')](0x194);}return _0x597934;};}function handleError(_0x1e0a0f,_0x560302){_0x560302=_0x560302||0x1f4;return function(_0x3e7375){logger[_0x3162('0x23')](_0x3e7375[_0x3162('0x24')]);if(_0x3e7375[_0x3162('0x25')]){delete _0x3e7375[_0x3162('0x25')];}_0x1e0a0f[_0x3162('0x18')](_0x560302)[_0x3162('0x26')](_0x3e7375);};}exports[_0x3162('0x27')]=function(_0x4f83c1,_0x19e97e){var _0x1d51df={},_0x40f537={},_0x5294c9={'count':0x0,'rows':[]};var _0x4befc5=db[_0x3162('0x28')]['rawAttributes'];_0x40f537[_0x3162('0x29')]=_[_0x3162('0x2a')](_0x4befc5);_0x40f537[_0x3162('0x2b')]=_['keys'](_0x4f83c1[_0x3162('0x2b')]);_0x40f537[_0x3162('0x2c')]=_['intersection'](_0x40f537[_0x3162('0x29')],_0x40f537['query']);_0x1d51df[_0x3162('0x2d')]=_[_0x3162('0x2e')](_0x40f537[_0x3162('0x29')],qs[_0x3162('0x2f')](_0x4f83c1[_0x3162('0x2b')][_0x3162('0x2f')]));_0x1d51df[_0x3162('0x2d')]=_0x1d51df[_0x3162('0x2d')][_0x3162('0x30')]?_0x1d51df[_0x3162('0x2d')]:_0x40f537['model'];if(!_0x4f83c1[_0x3162('0x2b')][_0x3162('0x31')](_0x3162('0x32'))){_0x1d51df[_0x3162('0x33')]=qs[_0x3162('0x33')](_0x4f83c1[_0x3162('0x2b')][_0x3162('0x33')]);_0x1d51df[_0x3162('0x1b')]=qs['offset'](_0x4f83c1[_0x3162('0x2b')]['offset']);}_0x1d51df['order']=qs['sort'](_0x4f83c1['query'][_0x3162('0x34')]);_0x1d51df[_0x3162('0x35')]=qs[_0x3162('0x2c')](_[_0x3162('0x36')](_0x4f83c1[_0x3162('0x2b')],_0x40f537[_0x3162('0x2c')]));if(_0x4f83c1[_0x3162('0x2b')][_0x3162('0x37')]){_0x1d51df[_0x3162('0x35')]=_[_0x3162('0x38')](_0x1d51df['where'],{'$or':_[_0x3162('0x39')](_0x4befc5,function(_0x5557e4){if(_0x5557e4[_0x3162('0x3a')][_0x3162('0x3b')]!==_0x3162('0x3c')){var _0x33b0a4={};_0x33b0a4[_0x5557e4[_0x3162('0x3d')]]={'$like':'%'+_0x4f83c1[_0x3162('0x2b')][_0x3162('0x37')]+'%'};return _0x33b0a4;}})});}_0x1d51df=_[_0x3162('0x38')]({},_0x1d51df,_0x4f83c1[_0x3162('0x3e')]);var _0x4f6098={'where':_0x1d51df[_0x3162('0x35')]};return db[_0x3162('0x28')][_0x3162('0x1a')](_0x4f6098)[_0x3162('0x21')](function(_0x44d5f1){_0x5294c9['count']=_0x44d5f1;if(_0x4f83c1[_0x3162('0x2b')][_0x3162('0x3f')]){_0x1d51df[_0x3162('0x40')]=[{'all':!![]}];}return db[_0x3162('0x28')][_0x3162('0x41')](_0x1d51df);})[_0x3162('0x21')](function(_0x45712d){_0x5294c9[_0x3162('0x42')]=_0x45712d;return _0x5294c9;})[_0x3162('0x21')](respondWithFilteredResult(_0x19e97e,_0x1d51df))['catch'](handleError(_0x19e97e,null));};exports[_0x3162('0x43')]=function(_0x1edb5c,_0x5b5a5f){var _0x5884f8={'raw':!![],'where':{'id':_0x1edb5c[_0x3162('0x44')]['id']}},_0x49dd70={};_0x49dd70[_0x3162('0x29')]=_['keys'](db[_0x3162('0x28')][_0x3162('0x45')]);_0x49dd70['query']=_[_0x3162('0x2a')](_0x1edb5c[_0x3162('0x2b')]);_0x49dd70[_0x3162('0x2c')]=_[_0x3162('0x2e')](_0x49dd70[_0x3162('0x29')],_0x49dd70[_0x3162('0x2b')]);_0x5884f8[_0x3162('0x2d')]=_[_0x3162('0x2e')](_0x49dd70['model'],qs['fields'](_0x1edb5c[_0x3162('0x2b')][_0x3162('0x2f')]));_0x5884f8['attributes']=_0x5884f8[_0x3162('0x2d')][_0x3162('0x30')]?_0x5884f8[_0x3162('0x2d')]:_0x49dd70[_0x3162('0x29')];if(_0x1edb5c[_0x3162('0x2b')][_0x3162('0x3f')]){_0x5884f8[_0x3162('0x40')]=[{'all':!![]}];}_0x5884f8=_[_0x3162('0x38')]({},_0x5884f8,_0x1edb5c[_0x3162('0x3e')]);return db['SquareReport'][_0x3162('0x46')](_0x5884f8)[_0x3162('0x21')](handleEntityNotFound(_0x5b5a5f,null))['then'](respondWithResult(_0x5b5a5f,null))[_0x3162('0x47')](handleError(_0x5b5a5f,null));};exports['create']=function(_0x4ad565,_0x52565b){return db[_0x3162('0x28')][_0x3162('0x48')](_0x4ad565[_0x3162('0x49')],{})[_0x3162('0x21')](respondWithResult(_0x52565b,0xc9))[_0x3162('0x47')](handleError(_0x52565b,null));};exports[_0x3162('0x4a')]=function(_0x4dece2,_0x1d2c59){if(_0x4dece2[_0x3162('0x49')]['id']){delete _0x4dece2[_0x3162('0x49')]['id'];}return db[_0x3162('0x28')][_0x3162('0x46')]({'where':{'id':_0x4dece2[_0x3162('0x44')]['id']}})[_0x3162('0x21')](handleEntityNotFound(_0x1d2c59,null))[_0x3162('0x21')](saveUpdates(_0x4dece2[_0x3162('0x49')],null))[_0x3162('0x21')](respondWithResult(_0x1d2c59,null))[_0x3162('0x47')](handleError(_0x1d2c59,null));};exports[_0x3162('0x22')]=function(_0x3c915e,_0x24b8ca){return db[_0x3162('0x28')][_0x3162('0x46')]({'where':{'id':_0x3c915e[_0x3162('0x44')]['id']}})['then'](handleEntityNotFound(_0x24b8ca,null))[_0x3162('0x21')](removeEntity(_0x24b8ca,null))[_0x3162('0x47')](handleError(_0x24b8ca,null));};exports[_0x3162('0x4b')]=function(_0x1fad57,_0x2755d9){return db[_0x3162('0x28')][_0x3162('0x4b')]()[_0x3162('0x21')](respondWithResult(_0x2755d9,null))[_0x3162('0x47')](handleError(_0x2755d9,null));};
\ No newline at end of file
+var _0x3cd3=['attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','key','field','options','includeAll','include','findAll','show','fields','length','find','create','body','catch','params','describe','html-pdf','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','count','offset','limit','json','apply','reject','update','then','destroy','stack','name','send','SquareReport','rawAttributes','model','query','keys','filters','intersection'];(function(_0x66072d,_0xc339fb){var _0xbaca20=function(_0x485eba){while(--_0x485eba){_0x66072d['push'](_0x66072d['shift']());}};_0xbaca20(++_0xc339fb);}(_0x3cd3,0x131));var _0x33cd=function(_0x2e8b60,_0x17fb10){_0x2e8b60=_0x2e8b60-0x0;var _0x45fcb4=_0x3cd3[_0x2e8b60];return _0x45fcb4;};'use strict';var pdf=require(_0x33cd('0x0'));var emlformat=require(_0x33cd('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x33cd('0x2'));var rp=require(_0x33cd('0x3'));var moment=require(_0x33cd('0x4'));var BPromise=require(_0x33cd('0x5'));var Mustache=require(_0x33cd('0x6'));var util=require(_0x33cd('0x7'));var path=require(_0x33cd('0x8'));var sox=require(_0x33cd('0x9'));var csv=require(_0x33cd('0xa'));var ejs=require(_0x33cd('0xb'));var fs=require('fs');var _=require(_0x33cd('0xc'));var squel=require('squel');var crypto=require(_0x33cd('0xd'));var jsforce=require(_0x33cd('0xe'));var deskjs=require(_0x33cd('0xf'));var toCsv=require('to-csv');var querystring=require(_0x33cd('0x10'));var Papa=require('papaparse');var Redis=require(_0x33cd('0x11'));var authService=require(_0x33cd('0x12'));var qs=require(_0x33cd('0x13'));var hardwareService=require(_0x33cd('0x14'));var logger=require(_0x33cd('0x15'))(_0x33cd('0x16'));var utils=require(_0x33cd('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x12c426,_0x5c7424){_0x5c7424=_0x5c7424||0xcc;return function(_0x4950d8){if(_0x4950d8){return _0x12c426[_0x33cd('0x18')](_0x5c7424);}return _0x12c426['status'](_0x5c7424)['end']();};}function respondWithResult(_0x51c02c,_0x55eadc){_0x55eadc=_0x55eadc||0xc8;return function(_0x23c81b){if(_0x23c81b){return _0x51c02c[_0x33cd('0x19')](_0x55eadc)['json'](_0x23c81b);}};}function respondWithFilteredResult(_0x83228d,_0x63ab24){return function(_0x459040){if(_0x459040){var _0x3a2529=_0x459040[_0x33cd('0x1a')],_0xefb978=_0x63ab24['offset'],_0x593661=_0x63ab24[_0x33cd('0x1b')]+_0x63ab24[_0x33cd('0x1c')],_0x4c95e5;if(_0x593661>=_0x3a2529){_0x593661=_0x3a2529;_0x4c95e5=0xc8;}else{_0x4c95e5=0xce;}_0x83228d[_0x33cd('0x19')](_0x4c95e5);return _0x83228d['set']('Content-Range',_0xefb978+'-'+_0x593661+'/'+_0x3a2529)[_0x33cd('0x1d')](_0x459040);}return null;};}function patchUpdates(_0x312fef){return function(_0x51e798){try{jsonpatch[_0x33cd('0x1e')](_0x51e798,_0x312fef,!![]);}catch(_0x17b6d1){return BPromise[_0x33cd('0x1f')](_0x17b6d1);}return _0x51e798['save']();};}function saveUpdates(_0x1fad1e,_0x5bd29b){return function(_0x235603){if(_0x235603){return _0x235603[_0x33cd('0x20')](_0x1fad1e)[_0x33cd('0x21')](function(_0x50ab23){return _0x50ab23;});}return null;};}function removeEntity(_0x1db1cd,_0x477584){return function(_0x1e28dc){if(_0x1e28dc){return _0x1e28dc[_0x33cd('0x22')]()[_0x33cd('0x21')](function(){_0x1db1cd['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4befee,_0x426de4){return function(_0x324d3f){if(!_0x324d3f){_0x4befee['sendStatus'](0x194);}return _0x324d3f;};}function handleError(_0x2d14d1,_0x4980e8){_0x4980e8=_0x4980e8||0x1f4;return function(_0x241e8d){logger['error'](_0x241e8d[_0x33cd('0x23')]);if(_0x241e8d['name']){delete _0x241e8d[_0x33cd('0x24')];}_0x2d14d1[_0x33cd('0x19')](_0x4980e8)[_0x33cd('0x25')](_0x241e8d);};}exports['index']=function(_0x5c60a8,_0x39c5dc){var _0x528d09={},_0x18f01f={},_0x32949c={'count':0x0,'rows':[]};var _0x362cf6=db[_0x33cd('0x26')][_0x33cd('0x27')];_0x18f01f[_0x33cd('0x28')]=_['keys'](_0x362cf6);_0x18f01f[_0x33cd('0x29')]=_[_0x33cd('0x2a')](_0x5c60a8[_0x33cd('0x29')]);_0x18f01f[_0x33cd('0x2b')]=_[_0x33cd('0x2c')](_0x18f01f[_0x33cd('0x28')],_0x18f01f[_0x33cd('0x29')]);_0x528d09[_0x33cd('0x2d')]=_[_0x33cd('0x2c')](_0x18f01f[_0x33cd('0x28')],qs['fields'](_0x5c60a8['query']['fields']));_0x528d09[_0x33cd('0x2d')]=_0x528d09[_0x33cd('0x2d')]['length']?_0x528d09[_0x33cd('0x2d')]:_0x18f01f[_0x33cd('0x28')];if(!_0x5c60a8[_0x33cd('0x29')][_0x33cd('0x2e')](_0x33cd('0x2f'))){_0x528d09[_0x33cd('0x1c')]=qs[_0x33cd('0x1c')](_0x5c60a8[_0x33cd('0x29')][_0x33cd('0x1c')]);_0x528d09[_0x33cd('0x1b')]=qs['offset'](_0x5c60a8[_0x33cd('0x29')][_0x33cd('0x1b')]);}_0x528d09[_0x33cd('0x30')]=qs[_0x33cd('0x31')](_0x5c60a8[_0x33cd('0x29')]['sort']);_0x528d09[_0x33cd('0x32')]=qs[_0x33cd('0x2b')](_[_0x33cd('0x33')](_0x5c60a8[_0x33cd('0x29')],_0x18f01f[_0x33cd('0x2b')]));if(_0x5c60a8[_0x33cd('0x29')][_0x33cd('0x34')]){_0x528d09[_0x33cd('0x32')]=_[_0x33cd('0x35')](_0x528d09['where'],{'$or':_[_0x33cd('0x36')](_0x362cf6,function(_0x59b14a){if(_0x59b14a['type'][_0x33cd('0x37')]!=='VIRTUAL'){var _0x5e1c12={};_0x5e1c12[_0x59b14a[_0x33cd('0x38')]]={'$like':'%'+_0x5c60a8[_0x33cd('0x29')][_0x33cd('0x34')]+'%'};return _0x5e1c12;}})});}_0x528d09=_[_0x33cd('0x35')]({},_0x528d09,_0x5c60a8[_0x33cd('0x39')]);var _0x160d77={'where':_0x528d09[_0x33cd('0x32')]};return db['SquareReport']['count'](_0x160d77)[_0x33cd('0x21')](function(_0x4e82ce){_0x32949c[_0x33cd('0x1a')]=_0x4e82ce;if(_0x5c60a8[_0x33cd('0x29')][_0x33cd('0x3a')]){_0x528d09[_0x33cd('0x3b')]=[{'all':!![]}];}return db[_0x33cd('0x26')][_0x33cd('0x3c')](_0x528d09);})[_0x33cd('0x21')](function(_0x5d0255){_0x32949c['rows']=_0x5d0255;return _0x32949c;})[_0x33cd('0x21')](respondWithFilteredResult(_0x39c5dc,_0x528d09))['catch'](handleError(_0x39c5dc,null));};exports[_0x33cd('0x3d')]=function(_0x121f74,_0x5ca0a9){var _0x344639={'raw':!![],'where':{'id':_0x121f74['params']['id']}},_0x302c5f={};_0x302c5f[_0x33cd('0x28')]=_[_0x33cd('0x2a')](db['SquareReport'][_0x33cd('0x27')]);_0x302c5f['query']=_[_0x33cd('0x2a')](_0x121f74[_0x33cd('0x29')]);_0x302c5f[_0x33cd('0x2b')]=_['intersection'](_0x302c5f[_0x33cd('0x28')],_0x302c5f[_0x33cd('0x29')]);_0x344639[_0x33cd('0x2d')]=_[_0x33cd('0x2c')](_0x302c5f[_0x33cd('0x28')],qs[_0x33cd('0x3e')](_0x121f74[_0x33cd('0x29')]['fields']));_0x344639[_0x33cd('0x2d')]=_0x344639[_0x33cd('0x2d')][_0x33cd('0x3f')]?_0x344639[_0x33cd('0x2d')]:_0x302c5f['model'];if(_0x121f74[_0x33cd('0x29')]['includeAll']){_0x344639[_0x33cd('0x3b')]=[{'all':!![]}];}_0x344639=_[_0x33cd('0x35')]({},_0x344639,_0x121f74['options']);return db[_0x33cd('0x26')][_0x33cd('0x40')](_0x344639)[_0x33cd('0x21')](handleEntityNotFound(_0x5ca0a9,null))[_0x33cd('0x21')](respondWithResult(_0x5ca0a9,null))['catch'](handleError(_0x5ca0a9,null));};exports[_0x33cd('0x41')]=function(_0x3fdb7b,_0x3f71f4){return db[_0x33cd('0x26')][_0x33cd('0x41')](_0x3fdb7b[_0x33cd('0x42')],{})[_0x33cd('0x21')](respondWithResult(_0x3f71f4,0xc9))[_0x33cd('0x43')](handleError(_0x3f71f4,null));};exports['update']=function(_0x4ffc04,_0x49bcdb){if(_0x4ffc04[_0x33cd('0x42')]['id']){delete _0x4ffc04[_0x33cd('0x42')]['id'];}return db['SquareReport'][_0x33cd('0x40')]({'where':{'id':_0x4ffc04[_0x33cd('0x44')]['id']}})[_0x33cd('0x21')](handleEntityNotFound(_0x49bcdb,null))[_0x33cd('0x21')](saveUpdates(_0x4ffc04['body'],null))[_0x33cd('0x21')](respondWithResult(_0x49bcdb,null))['catch'](handleError(_0x49bcdb,null));};exports['destroy']=function(_0x2d3694,_0x5ef741){return db[_0x33cd('0x26')]['find']({'where':{'id':_0x2d3694[_0x33cd('0x44')]['id']}})[_0x33cd('0x21')](handleEntityNotFound(_0x5ef741,null))['then'](removeEntity(_0x5ef741,null))['catch'](handleError(_0x5ef741,null));};exports[_0x33cd('0x45')]=function(_0x5747eb,_0x55e6f8){return db['SquareReport'][_0x33cd('0x45')]()[_0x33cd('0x21')](respondWithResult(_0x55e6f8,null))[_0x33cd('0x43')](handleError(_0x55e6f8,null));};
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.model.js b/server/api/squareReport/squareReport.model.js
index a478975..a40c53c 100644
--- a/server/api/squareReport/squareReport.model.js
+++ b/server/api/squareReport/squareReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['exports','define','SquareReport','uniqueid','leaveAt','lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','./squareReport.attributes'];(function(_0x207b85,_0x32e40c){var _0x4e37d2=function(_0x1b455b){while(--_0x1b455b){_0x207b85['push'](_0x207b85['shift']());}};_0x4e37d2(++_0x32e40c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1b828b,_0x344400){_0x1b828b=_0x1b828b-0x0;var _0x98da1a=_0xa9e0[_0x1b828b];return _0x98da1a;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'report_square','paranoid':![],'indexes':[{'name':'uid_pname','fields':[_0x0a9e('0xb'),'project_name']},{'name':'leaveAt','fields':[_0x0a9e('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x9957=['api','bluebird','request-promise','path','rimraf','./squareReport.attributes','exports','define','SquareReport','uid_pname','uniqueid','leaveAt','lodash','util','../../config/logger'];(function(_0x5540cb,_0x1af47e){var _0x22e2db=function(_0x16ad6e){while(--_0x16ad6e){_0x5540cb['push'](_0x5540cb['shift']());}};_0x22e2db(++_0x1af47e);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'report_square','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xd'),'project_name']},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.rpc.js b/server/api/squareReport/squareReport.rpc.js
index 01261dc..20d351c 100644
--- a/server/api/squareReport/squareReport.rpc.js
+++ b/server/api/squareReport/squareReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3443=['moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SquareReport,\x20%s,\x20%s','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSquareReport','body','options','raw','SquareReport','where','attributes','limit','UpdateSquareReport','lodash','util'];(function(_0x16281a,_0x2a2bbb){var _0x5ae67f=function(_0x334052){while(--_0x334052){_0x16281a['push'](_0x16281a['shift']());}};_0x5ae67f(++_0x2a2bbb);}(_0x3443,0x116));var _0x3344=function(_0x7226b6,_0x27ad47){_0x7226b6=_0x7226b6-0x0;var _0x410202=_0x3443[_0x7226b6];return _0x410202;};'use strict';var _=require(_0x3344('0x0'));var util=require(_0x3344('0x1'));var moment=require(_0x3344('0x2'));var BPromise=require(_0x3344('0x3'));var rs=require(_0x3344('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3344('0x5'))['db'];var utils=require(_0x3344('0x6'));var logger=require(_0x3344('0x7'))(_0x3344('0x8'));var config=require(_0x3344('0x9'));var jayson=require(_0x3344('0xa'));var client=jayson[_0x3344('0xb')][_0x3344('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x380466,_0x1440d6,_0x139fca){return new BPromise(function(_0xb44dd9,_0x5ebfb0){return client[_0x3344('0xd')](_0x380466,_0x139fca)[_0x3344('0xe')](function(_0x383846){logger[_0x3344('0xf')](_0x3344('0x10'),_0x1440d6,_0x3344('0x11'));logger[_0x3344('0x12')](_0x3344('0x13'),_0x1440d6,'request\x20sent',JSON[_0x3344('0x14')](_0x383846));if(_0x383846['error']){if(_0x383846[_0x3344('0x15')][_0x3344('0x16')]===0x1f4){logger[_0x3344('0x15')](_0x3344('0x10'),_0x1440d6,_0x383846['error']['message']);return _0x5ebfb0(_0x383846['error'][_0x3344('0x17')]);}logger[_0x3344('0x15')](_0x3344('0x10'),_0x1440d6,_0x383846['error'][_0x3344('0x17')]);return _0xb44dd9(_0x383846[_0x3344('0x15')][_0x3344('0x17')]);}else{logger[_0x3344('0xf')]('SquareReport,\x20%s,\x20%s',_0x1440d6,'request\x20sent');_0xb44dd9(_0x383846[_0x3344('0x18')][_0x3344('0x17')]);}})[_0x3344('0x19')](function(_0x34fd72){logger[_0x3344('0x15')]('SquareReport,\x20%s,\x20%s',_0x1440d6,_0x34fd72);_0x5ebfb0(_0x34fd72);});});}exports[_0x3344('0x1a')]=function(_0x24ad0f){var _0x232e7f=this;return new Promise(function(_0x2c9ca3,_0x330b23){return db['SquareReport']['create'](_0x24ad0f[_0x3344('0x1b')],{'raw':_0x24ad0f[_0x3344('0x1c')]?_0x24ad0f['options'][_0x3344('0x1d')]===undefined?!![]:![]:!![]})[_0x3344('0xe')](function(_0x278b1b){logger[_0x3344('0xf')](_0x3344('0x1a'),_0x24ad0f);logger[_0x3344('0x12')](_0x3344('0x1a'),_0x24ad0f,JSON[_0x3344('0x14')](_0x278b1b));_0x2c9ca3(_0x278b1b);})[_0x3344('0x19')](function(_0x2f56f6){logger['error'](_0x3344('0x1a'),_0x2f56f6[_0x3344('0x17')],_0x24ad0f);_0x330b23(_0x232e7f['error'](0x1f4,_0x2f56f6[_0x3344('0x17')]));});});};exports['UpdateSquareReport']=function(_0x13d55e){var _0x3675c3=this;return new Promise(function(_0x161cca,_0x2ad864){return db[_0x3344('0x1e')]['update'](_0x13d55e['body'],{'raw':_0x13d55e[_0x3344('0x1c')]?_0x13d55e[_0x3344('0x1c')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x13d55e[_0x3344('0x1c')]?_0x13d55e[_0x3344('0x1c')][_0x3344('0x1f')]||null:null,'attributes':_0x13d55e[_0x3344('0x1c')]?_0x13d55e[_0x3344('0x1c')][_0x3344('0x20')]||null:null,'limit':_0x13d55e[_0x3344('0x1c')]?_0x13d55e['options'][_0x3344('0x21')]||null:null})[_0x3344('0xe')](function(_0x271cc6){logger['info'](_0x3344('0x22'),_0x13d55e);logger[_0x3344('0x12')](_0x3344('0x22'),_0x13d55e,JSON[_0x3344('0x14')](_0x271cc6));_0x161cca(_0x271cc6);})['catch'](function(_0x40e291){logger[_0x3344('0x15')]('UpdateSquareReport',_0x40e291[_0x3344('0x17')],_0x13d55e);_0x2ad864(_0x3675c3['error'](0x1f4,_0x40e291[_0x3344('0x17')]));});});};
\ No newline at end of file
+var _0x4b3f=['lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','info','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','SquareReport,\x20%s,\x20%s','message','result','catch','SquareReport','create','body','options','raw','CreateSquareReport','UpdateSquareReport','update','attributes','limit'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x4b3f,0x1ef));var _0xf4b3=function(_0x1aa0cb,_0xdfb6a0){_0x1aa0cb=_0x1aa0cb-0x0;var _0x101050=_0x4b3f[_0x1aa0cb];return _0x101050;};'use strict';var _=require(_0xf4b3('0x0'));var util=require(_0xf4b3('0x1'));var moment=require('moment');var BPromise=require(_0xf4b3('0x2'));var rs=require(_0xf4b3('0x3'));var fs=require('fs');var Redis=require(_0xf4b3('0x4'));var db=require(_0xf4b3('0x5'))['db'];var utils=require(_0xf4b3('0x6'));var logger=require(_0xf4b3('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf4b3('0x8')][_0xf4b3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2ce59d,_0x545677,_0x5a2247){return new BPromise(function(_0x4b33f2,_0x23a603){return client[_0xf4b3('0xa')](_0x2ce59d,_0x5a2247)[_0xf4b3('0xb')](function(_0x29f30c){logger[_0xf4b3('0xc')]('SquareReport,\x20%s,\x20%s',_0x545677,_0xf4b3('0xd'));logger[_0xf4b3('0xe')](_0xf4b3('0xf'),_0x545677,'request\x20sent',JSON[_0xf4b3('0x10')](_0x29f30c));if(_0x29f30c[_0xf4b3('0x11')]){if(_0x29f30c[_0xf4b3('0x11')][_0xf4b3('0x12')]===0x1f4){logger[_0xf4b3('0x11')](_0xf4b3('0x13'),_0x545677,_0x29f30c[_0xf4b3('0x11')][_0xf4b3('0x14')]);return _0x23a603(_0x29f30c[_0xf4b3('0x11')][_0xf4b3('0x14')]);}logger[_0xf4b3('0x11')](_0xf4b3('0x13'),_0x545677,_0x29f30c[_0xf4b3('0x11')][_0xf4b3('0x14')]);return _0x4b33f2(_0x29f30c[_0xf4b3('0x11')][_0xf4b3('0x14')]);}else{logger['info'](_0xf4b3('0x13'),_0x545677,_0xf4b3('0xd'));_0x4b33f2(_0x29f30c[_0xf4b3('0x15')]['message']);}})[_0xf4b3('0x16')](function(_0x27954f){logger['error'](_0xf4b3('0x13'),_0x545677,_0x27954f);_0x23a603(_0x27954f);});});}exports['CreateSquareReport']=function(_0x8624aa){var _0x47557a=this;return new Promise(function(_0x267aa5,_0x178e27){return db[_0xf4b3('0x17')][_0xf4b3('0x18')](_0x8624aa[_0xf4b3('0x19')],{'raw':_0x8624aa[_0xf4b3('0x1a')]?_0x8624aa['options'][_0xf4b3('0x1b')]===undefined?!![]:![]:!![]})[_0xf4b3('0xb')](function(_0x2af4e3){logger[_0xf4b3('0xc')](_0xf4b3('0x1c'),_0x8624aa);logger[_0xf4b3('0xe')](_0xf4b3('0x1c'),_0x8624aa,JSON[_0xf4b3('0x10')](_0x2af4e3));_0x267aa5(_0x2af4e3);})[_0xf4b3('0x16')](function(_0x292807){logger[_0xf4b3('0x11')](_0xf4b3('0x1c'),_0x292807[_0xf4b3('0x14')],_0x8624aa);_0x178e27(_0x47557a[_0xf4b3('0x11')](0x1f4,_0x292807[_0xf4b3('0x14')]));});});};exports[_0xf4b3('0x1d')]=function(_0x128c0c){var _0x2612fa=this;return new Promise(function(_0x3b9a84,_0x525295){return db[_0xf4b3('0x17')][_0xf4b3('0x1e')](_0x128c0c[_0xf4b3('0x19')],{'raw':_0x128c0c[_0xf4b3('0x1a')]?_0x128c0c[_0xf4b3('0x1a')][_0xf4b3('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x128c0c['options']?_0x128c0c[_0xf4b3('0x1a')]['where']||null:null,'attributes':_0x128c0c[_0xf4b3('0x1a')]?_0x128c0c[_0xf4b3('0x1a')][_0xf4b3('0x1f')]||null:null,'limit':_0x128c0c['options']?_0x128c0c[_0xf4b3('0x1a')][_0xf4b3('0x20')]||null:null})['then'](function(_0x195fbf){logger[_0xf4b3('0xc')](_0xf4b3('0x1d'),_0x128c0c);logger[_0xf4b3('0xe')](_0xf4b3('0x1d'),_0x128c0c,JSON[_0xf4b3('0x10')](_0x195fbf));_0x3b9a84(_0x195fbf);})[_0xf4b3('0x16')](function(_0x5b83a9){logger[_0xf4b3('0x11')](_0xf4b3('0x1d'),_0x5b83a9['message'],_0x128c0c);_0x525295(_0x2612fa[_0xf4b3('0x11')](0x1f4,_0x5b83a9[_0xf4b3('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/index.js b/server/api/squareReportDetail/index.js
index 580e843..a43888a 100644
--- a/server/api/squareReportDetail/index.js
+++ b/server/api/squareReportDetail/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd182=['update','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','get','isAuthenticated','index','/describe','describe','/:id','create','put'];(function(_0x373d96,_0x3463bc){var _0x2f528e=function(_0x25ac5a){while(--_0x25ac5a){_0x373d96['push'](_0x373d96['shift']());}};_0x2f528e(++_0x3463bc);}(_0xd182,0x67));var _0x2d18=function(_0xcfc1d8,_0x222fd){_0xcfc1d8=_0xcfc1d8-0x0;var _0x4a04f6=_0xd182[_0xcfc1d8];return _0x4a04f6;};'use strict';var multer=require(_0x2d18('0x0'));var util=require('util');var path=require(_0x2d18('0x1'));var timeout=require(_0x2d18('0x2'));var express=require(_0x2d18('0x3'));var router=express[_0x2d18('0x4')]();var auth=require(_0x2d18('0x5'));var interaction=require(_0x2d18('0x6'));var config=require(_0x2d18('0x7'));var controller=require(_0x2d18('0x8'));router[_0x2d18('0x9')]('/',auth[_0x2d18('0xa')](),controller[_0x2d18('0xb')]);router[_0x2d18('0x9')](_0x2d18('0xc'),auth[_0x2d18('0xa')](),controller[_0x2d18('0xd')]);router['get'](_0x2d18('0xe'),auth[_0x2d18('0xa')](),controller['show']);router['post']('/',auth[_0x2d18('0xa')](),controller[_0x2d18('0xf')]);router[_0x2d18('0x10')]('/:id',auth[_0x2d18('0xa')](),controller[_0x2d18('0x11')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x2d18('0x12')]);module[_0x2d18('0x13')]=router;
\ No newline at end of file
+var _0xfb91=['isAuthenticated','index','/:id','show','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./squareReportDetail.controller','get'];(function(_0x4a33d0,_0x5a061c){var _0x523923=function(_0x41a3bb){while(--_0x41a3bb){_0x4a33d0['push'](_0x4a33d0['shift']());}};_0x523923(++_0x5a061c);}(_0xfb91,0x122));var _0x1fb9=function(_0x51e43d,_0x47f638){_0x51e43d=_0x51e43d-0x0;var _0x14aeab=_0xfb91[_0x51e43d];return _0x14aeab;};'use strict';var multer=require(_0x1fb9('0x0'));var util=require(_0x1fb9('0x1'));var path=require(_0x1fb9('0x2'));var timeout=require(_0x1fb9('0x3'));var express=require(_0x1fb9('0x4'));var router=express[_0x1fb9('0x5')]();var auth=require(_0x1fb9('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x1fb9('0x7'));var controller=require(_0x1fb9('0x8'));router[_0x1fb9('0x9')]('/',auth[_0x1fb9('0xa')](),controller[_0x1fb9('0xb')]);router[_0x1fb9('0x9')]('/describe',auth[_0x1fb9('0xa')](),controller['describe']);router[_0x1fb9('0x9')](_0x1fb9('0xc'),auth['isAuthenticated'](),controller[_0x1fb9('0xd')]);router[_0x1fb9('0xe')]('/',auth[_0x1fb9('0xa')](),controller[_0x1fb9('0xf')]);router['put']('/:id',auth[_0x1fb9('0xa')](),controller[_0x1fb9('0x10')]);router[_0x1fb9('0x11')](_0x1fb9('0xc'),auth['isAuthenticated'](),controller[_0x1fb9('0x12')]);module[_0x1fb9('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.attributes.js b/server/api/squareReportDetail/squareReportDetail.attributes.js
index 7c0ab7e..e202c30 100644
--- a/server/api/squareReportDetail/squareReportDetail.attributes.js
+++ b/server/api/squareReportDetail/squareReportDetail.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5702=['exports','STRING','TEXT','sequelize'];(function(_0x5d32da,_0x5d5b9e){var _0x1b6ea2=function(_0x597e5d){while(--_0x597e5d){_0x5d32da['push'](_0x5d32da['shift']());}};_0x1b6ea2(++_0x5d5b9e);}(_0x5702,0x107));var _0x2570=function(_0x10a899,_0x3f0e3d){_0x10a899=_0x10a899-0x0;var _0x1c1d9e=_0x5702[_0x10a899];return _0x1c1d9e;};'use strict';var Sequelize=require(_0x2570('0x0'));module[_0x2570('0x1')]={'uniqueid':{'type':Sequelize[_0x2570('0x2')]},'node':{'type':Sequelize[_0x2570('0x2')]},'application':{'type':Sequelize[_0x2570('0x2')]},'data':{'type':Sequelize[_0x2570('0x3')]},'project_name':{'type':Sequelize[_0x2570('0x2')]},'callerid':{'type':Sequelize[_0x2570('0x2')]}};
\ No newline at end of file
+var _0x9a39=['exports','STRING','TEXT','sequelize'];(function(_0x1ae31c,_0x8dcd2d){var _0x19519d=function(_0x22b8cd){while(--_0x22b8cd){_0x1ae31c['push'](_0x1ae31c['shift']());}};_0x19519d(++_0x8dcd2d);}(_0x9a39,0x1bf));var _0x99a3=function(_0x4b8b93,_0x40ac11){_0x4b8b93=_0x4b8b93-0x0;var _0x4851ba=_0x9a39[_0x4b8b93];return _0x4851ba;};'use strict';var Sequelize=require(_0x99a3('0x0'));module[_0x99a3('0x1')]={'uniqueid':{'type':Sequelize[_0x99a3('0x2')]},'node':{'type':Sequelize['STRING']},'application':{'type':Sequelize[_0x99a3('0x2')]},'data':{'type':Sequelize[_0x99a3('0x3')]},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0x99a3('0x2')]}};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.controller.js b/server/api/squareReportDetail/squareReportDetail.controller.js
index 9214a69..81a8e70 100644
--- a/server/api/squareReportDetail/squareReportDetail.controller.js
+++ b/server/api/squareReportDetail/squareReportDetail.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xadc5=['length','hasOwnProperty','nolimit','limit','order','where','filters','pick','filter','map','type','key','VIRTUAL','field','merge','options','count','includeAll','include','rows','catch','show','params','find','create','body','describe','eml-format','zip-dir','request-promise','moment','bluebird','util','sox','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','index','SquareDetailsReport','keys','query','intersection','model','attributes','fields'];(function(_0x27736d,_0x19cb1b){var _0xa32ede=function(_0x1dcf3a){while(--_0x1dcf3a){_0x27736d['push'](_0x27736d['shift']());}};_0xa32ede(++_0x19cb1b);}(_0xadc5,0x1cb));var _0x5adc=function(_0x5086c7,_0x7882a6){_0x5086c7=_0x5086c7-0x0;var _0x380563=_0xadc5[_0x5086c7];return _0x380563;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x5adc('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5adc('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5adc('0x2'));var moment=require(_0x5adc('0x3'));var BPromise=require(_0x5adc('0x4'));var Mustache=require('mustache');var util=require(_0x5adc('0x5'));var path=require('path');var sox=require(_0x5adc('0x6'));var csv=require('to-csv');var ejs=require(_0x5adc('0x7'));var fs=require('fs');var _=require(_0x5adc('0x8'));var squel=require(_0x5adc('0x9'));var crypto=require(_0x5adc('0xa'));var jsforce=require(_0x5adc('0xb'));var deskjs=require(_0x5adc('0xc'));var toCsv=require('to-csv');var querystring=require(_0x5adc('0xd'));var Papa=require('papaparse');var Redis=require(_0x5adc('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x5adc('0xf'));var hardwareService=require(_0x5adc('0x10'));var logger=require(_0x5adc('0x11'))(_0x5adc('0x12'));var utils=require(_0x5adc('0x13'));var config=require(_0x5adc('0x14'));var db=require(_0x5adc('0x15'))['db'];function respondWithStatusCode(_0x28b3c5,_0x1e5057){_0x1e5057=_0x1e5057||0xcc;return function(_0x439541){if(_0x439541){return _0x28b3c5[_0x5adc('0x16')](_0x1e5057);}return _0x28b3c5[_0x5adc('0x17')](_0x1e5057)['end']();};}function respondWithResult(_0x489590,_0x4d7626){_0x4d7626=_0x4d7626||0xc8;return function(_0x372fa7){if(_0x372fa7){return _0x489590['status'](_0x4d7626)[_0x5adc('0x18')](_0x372fa7);}};}function respondWithFilteredResult(_0x395618,_0x2cf1b6){return function(_0x4c9873){if(_0x4c9873){var _0x11ff59=_0x4c9873['count'],_0x518214=_0x2cf1b6['offset'],_0x52711c=_0x2cf1b6[_0x5adc('0x19')]+_0x2cf1b6['limit'],_0x4457c8;if(_0x52711c>=_0x11ff59){_0x52711c=_0x11ff59;_0x4457c8=0xc8;}else{_0x4457c8=0xce;}_0x395618['status'](_0x4457c8);return _0x395618[_0x5adc('0x1a')](_0x5adc('0x1b'),_0x518214+'-'+_0x52711c+'/'+_0x11ff59)[_0x5adc('0x18')](_0x4c9873);}return null;};}function patchUpdates(_0x3e22a3){return function(_0x11f343){try{jsonpatch[_0x5adc('0x1c')](_0x11f343,_0x3e22a3,!![]);}catch(_0x5e53e8){return BPromise[_0x5adc('0x1d')](_0x5e53e8);}return _0x11f343[_0x5adc('0x1e')]();};}function saveUpdates(_0x13fef9,_0x2ef846){return function(_0x545e94){if(_0x545e94){return _0x545e94[_0x5adc('0x1f')](_0x13fef9)[_0x5adc('0x20')](function(_0x2b19b6){return _0x2b19b6;});}return null;};}function removeEntity(_0x1ce95f,_0x4c2d8a){return function(_0x37d30f){if(_0x37d30f){return _0x37d30f[_0x5adc('0x21')]()[_0x5adc('0x20')](function(){_0x1ce95f['status'](0xcc)[_0x5adc('0x22')]();});}};}function handleEntityNotFound(_0x18e2b5,_0x540217){return function(_0x12730f){if(!_0x12730f){_0x18e2b5[_0x5adc('0x16')](0x194);}return _0x12730f;};}function handleError(_0x109ef4,_0x19c32c){_0x19c32c=_0x19c32c||0x1f4;return function(_0x20e0ed){logger[_0x5adc('0x23')](_0x20e0ed[_0x5adc('0x24')]);if(_0x20e0ed['name']){delete _0x20e0ed['name'];}_0x109ef4[_0x5adc('0x17')](_0x19c32c)['send'](_0x20e0ed);};}exports[_0x5adc('0x25')]=function(_0x162b07,_0x48896f){var _0x5860bf={},_0x266715={},_0x2d4637={'count':0x0,'rows':[]};var _0x18a9c4=db[_0x5adc('0x26')]['rawAttributes'];_0x266715['model']=_[_0x5adc('0x27')](_0x18a9c4);_0x266715[_0x5adc('0x28')]=_['keys'](_0x162b07['query']);_0x266715['filters']=_[_0x5adc('0x29')](_0x266715[_0x5adc('0x2a')],_0x266715[_0x5adc('0x28')]);_0x5860bf[_0x5adc('0x2b')]=_[_0x5adc('0x29')](_0x266715[_0x5adc('0x2a')],qs[_0x5adc('0x2c')](_0x162b07['query'][_0x5adc('0x2c')]));_0x5860bf[_0x5adc('0x2b')]=_0x5860bf['attributes'][_0x5adc('0x2d')]?_0x5860bf[_0x5adc('0x2b')]:_0x266715[_0x5adc('0x2a')];if(!_0x162b07[_0x5adc('0x28')][_0x5adc('0x2e')](_0x5adc('0x2f'))){_0x5860bf[_0x5adc('0x30')]=qs['limit'](_0x162b07[_0x5adc('0x28')][_0x5adc('0x30')]);_0x5860bf['offset']=qs[_0x5adc('0x19')](_0x162b07[_0x5adc('0x28')][_0x5adc('0x19')]);}_0x5860bf[_0x5adc('0x31')]=qs['sort'](_0x162b07[_0x5adc('0x28')]['sort']);_0x5860bf[_0x5adc('0x32')]=qs[_0x5adc('0x33')](_[_0x5adc('0x34')](_0x162b07[_0x5adc('0x28')],_0x266715['filters']));if(_0x162b07[_0x5adc('0x28')][_0x5adc('0x35')]){_0x5860bf[_0x5adc('0x32')]=_['merge'](_0x5860bf[_0x5adc('0x32')],{'$or':_[_0x5adc('0x36')](_0x18a9c4,function(_0x401a80){if(_0x401a80[_0x5adc('0x37')][_0x5adc('0x38')]!==_0x5adc('0x39')){var _0x3d923f={};_0x3d923f[_0x401a80[_0x5adc('0x3a')]]={'$like':'%'+_0x162b07[_0x5adc('0x28')][_0x5adc('0x35')]+'%'};return _0x3d923f;}})});}_0x5860bf=_[_0x5adc('0x3b')]({},_0x5860bf,_0x162b07[_0x5adc('0x3c')]);var _0x583dc2={'where':_0x5860bf[_0x5adc('0x32')]};return db[_0x5adc('0x26')]['count'](_0x583dc2)[_0x5adc('0x20')](function(_0xf8d922){_0x2d4637[_0x5adc('0x3d')]=_0xf8d922;if(_0x162b07[_0x5adc('0x28')][_0x5adc('0x3e')]){_0x5860bf[_0x5adc('0x3f')]=[{'all':!![]}];}return db[_0x5adc('0x26')]['findAll'](_0x5860bf);})[_0x5adc('0x20')](function(_0x228fb1){_0x2d4637[_0x5adc('0x40')]=_0x228fb1;return _0x2d4637;})[_0x5adc('0x20')](respondWithFilteredResult(_0x48896f,_0x5860bf))[_0x5adc('0x41')](handleError(_0x48896f,null));};exports[_0x5adc('0x42')]=function(_0xa1fd94,_0x465aaa){var _0x45093b={'raw':!![],'where':{'id':_0xa1fd94[_0x5adc('0x43')]['id']}},_0x5709a7={};_0x5709a7[_0x5adc('0x2a')]=_[_0x5adc('0x27')](db[_0x5adc('0x26')]['rawAttributes']);_0x5709a7[_0x5adc('0x28')]=_['keys'](_0xa1fd94[_0x5adc('0x28')]);_0x5709a7[_0x5adc('0x33')]=_[_0x5adc('0x29')](_0x5709a7[_0x5adc('0x2a')],_0x5709a7[_0x5adc('0x28')]);_0x45093b[_0x5adc('0x2b')]=_[_0x5adc('0x29')](_0x5709a7[_0x5adc('0x2a')],qs[_0x5adc('0x2c')](_0xa1fd94[_0x5adc('0x28')][_0x5adc('0x2c')]));_0x45093b['attributes']=_0x45093b[_0x5adc('0x2b')][_0x5adc('0x2d')]?_0x45093b[_0x5adc('0x2b')]:_0x5709a7[_0x5adc('0x2a')];if(_0xa1fd94['query'][_0x5adc('0x3e')]){_0x45093b['include']=[{'all':!![]}];}_0x45093b=_[_0x5adc('0x3b')]({},_0x45093b,_0xa1fd94[_0x5adc('0x3c')]);return db[_0x5adc('0x26')][_0x5adc('0x44')](_0x45093b)[_0x5adc('0x20')](handleEntityNotFound(_0x465aaa,null))['then'](respondWithResult(_0x465aaa,null))[_0x5adc('0x41')](handleError(_0x465aaa,null));};exports[_0x5adc('0x45')]=function(_0xccad2e,_0x2b3a02){return db[_0x5adc('0x26')][_0x5adc('0x45')](_0xccad2e[_0x5adc('0x46')],{})[_0x5adc('0x20')](respondWithResult(_0x2b3a02,0xc9))['catch'](handleError(_0x2b3a02,null));};exports[_0x5adc('0x1f')]=function(_0x4679b8,_0x1f2d8b){if(_0x4679b8[_0x5adc('0x46')]['id']){delete _0x4679b8[_0x5adc('0x46')]['id'];}return db['SquareDetailsReport'][_0x5adc('0x44')]({'where':{'id':_0x4679b8[_0x5adc('0x43')]['id']}})['then'](handleEntityNotFound(_0x1f2d8b,null))[_0x5adc('0x20')](saveUpdates(_0x4679b8['body'],null))[_0x5adc('0x20')](respondWithResult(_0x1f2d8b,null))[_0x5adc('0x41')](handleError(_0x1f2d8b,null));};exports[_0x5adc('0x21')]=function(_0x576b26,_0x3d54fb){return db[_0x5adc('0x26')][_0x5adc('0x44')]({'where':{'id':_0x576b26[_0x5adc('0x43')]['id']}})['then'](handleEntityNotFound(_0x3d54fb,null))[_0x5adc('0x20')](removeEntity(_0x3d54fb,null))[_0x5adc('0x41')](handleError(_0x3d54fb,null));};exports[_0x5adc('0x47')]=function(_0x1c2535,_0x4a5fc3){return db[_0x5adc('0x26')][_0x5adc('0x47')]()[_0x5adc('0x20')](respondWithResult(_0x4a5fc3,null))[_0x5adc('0x41')](handleError(_0x4a5fc3,null));};
\ No newline at end of file
+var _0xa750=['save','update','then','sendStatus','error','send','index','SquareDetailsReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','map','type','key','VIRTUAL','field','filter','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','apply','reject'];(function(_0x282999,_0x4df660){var _0x30681f=function(_0x50e926){while(--_0x50e926){_0x282999['push'](_0x282999['shift']());}};_0x30681f(++_0x4df660);}(_0xa750,0x169));var _0x0a75=function(_0x5dd7e3,_0x45ffe8){_0x5dd7e3=_0x5dd7e3-0x0;var _0x2c680e=_0xa750[_0x5dd7e3];return _0x2c680e;};'use strict';var pdf=require(_0x0a75('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x0a75('0x1'));var zipdir=require(_0x0a75('0x2'));var jsonpatch=require(_0x0a75('0x3'));var rp=require(_0x0a75('0x4'));var moment=require(_0x0a75('0x5'));var BPromise=require(_0x0a75('0x6'));var Mustache=require(_0x0a75('0x7'));var util=require(_0x0a75('0x8'));var path=require(_0x0a75('0x9'));var sox=require(_0x0a75('0xa'));var csv=require(_0x0a75('0xb'));var ejs=require(_0x0a75('0xc'));var fs=require('fs');var _=require(_0x0a75('0xd'));var squel=require(_0x0a75('0xe'));var crypto=require(_0x0a75('0xf'));var jsforce=require(_0x0a75('0x10'));var deskjs=require(_0x0a75('0x11'));var toCsv=require(_0x0a75('0xb'));var querystring=require(_0x0a75('0x12'));var Papa=require(_0x0a75('0x13'));var Redis=require(_0x0a75('0x14'));var authService=require(_0x0a75('0x15'));var qs=require(_0x0a75('0x16'));var hardwareService=require(_0x0a75('0x17'));var logger=require(_0x0a75('0x18'))(_0x0a75('0x19'));var utils=require(_0x0a75('0x1a'));var config=require(_0x0a75('0x1b'));var db=require(_0x0a75('0x1c'))['db'];function respondWithStatusCode(_0x494263,_0x5f40f6){_0x5f40f6=_0x5f40f6||0xcc;return function(_0x50a383){if(_0x50a383){return _0x494263['sendStatus'](_0x5f40f6);}return _0x494263[_0x0a75('0x1d')](_0x5f40f6)[_0x0a75('0x1e')]();};}function respondWithResult(_0x41782d,_0x4fb1ee){_0x4fb1ee=_0x4fb1ee||0xc8;return function(_0x2fcc61){if(_0x2fcc61){return _0x41782d[_0x0a75('0x1d')](_0x4fb1ee)[_0x0a75('0x1f')](_0x2fcc61);}};}function respondWithFilteredResult(_0x3471ab,_0x33e403){return function(_0x2c1e8e){if(_0x2c1e8e){var _0xd0be7=_0x2c1e8e[_0x0a75('0x20')],_0x47732a=_0x33e403[_0x0a75('0x21')],_0x579196=_0x33e403[_0x0a75('0x21')]+_0x33e403[_0x0a75('0x22')],_0x2bc04f;if(_0x579196>=_0xd0be7){_0x579196=_0xd0be7;_0x2bc04f=0xc8;}else{_0x2bc04f=0xce;}_0x3471ab[_0x0a75('0x1d')](_0x2bc04f);return _0x3471ab[_0x0a75('0x23')](_0x0a75('0x24'),_0x47732a+'-'+_0x579196+'/'+_0xd0be7)['json'](_0x2c1e8e);}return null;};}function patchUpdates(_0x3bdb19){return function(_0x2e1f69){try{jsonpatch[_0x0a75('0x25')](_0x2e1f69,_0x3bdb19,!![]);}catch(_0x30f264){return BPromise[_0x0a75('0x26')](_0x30f264);}return _0x2e1f69[_0x0a75('0x27')]();};}function saveUpdates(_0x5292a6,_0x472bd9){return function(_0x1b98bc){if(_0x1b98bc){return _0x1b98bc[_0x0a75('0x28')](_0x5292a6)[_0x0a75('0x29')](function(_0x13f2da){return _0x13f2da;});}return null;};}function removeEntity(_0x236688,_0x34df09){return function(_0x256713){if(_0x256713){return _0x256713['destroy']()[_0x0a75('0x29')](function(){_0x236688[_0x0a75('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x568f42,_0x4cb701){return function(_0x52e073){if(!_0x52e073){_0x568f42[_0x0a75('0x2a')](0x194);}return _0x52e073;};}function handleError(_0x5d598b,_0x22b55f){_0x22b55f=_0x22b55f||0x1f4;return function(_0x1869fa){logger[_0x0a75('0x2b')](_0x1869fa['stack']);if(_0x1869fa['name']){delete _0x1869fa['name'];}_0x5d598b['status'](_0x22b55f)[_0x0a75('0x2c')](_0x1869fa);};}exports[_0x0a75('0x2d')]=function(_0x5a60ad,_0x2b46f6){var _0x30567f={},_0x5722aa={},_0x845645={'count':0x0,'rows':[]};var _0xcb54b5=db[_0x0a75('0x2e')][_0x0a75('0x2f')];_0x5722aa[_0x0a75('0x30')]=_[_0x0a75('0x31')](_0xcb54b5);_0x5722aa['query']=_[_0x0a75('0x31')](_0x5a60ad[_0x0a75('0x32')]);_0x5722aa[_0x0a75('0x33')]=_[_0x0a75('0x34')](_0x5722aa[_0x0a75('0x30')],_0x5722aa[_0x0a75('0x32')]);_0x30567f[_0x0a75('0x35')]=_[_0x0a75('0x34')](_0x5722aa['model'],qs[_0x0a75('0x36')](_0x5a60ad[_0x0a75('0x32')][_0x0a75('0x36')]));_0x30567f[_0x0a75('0x35')]=_0x30567f['attributes'][_0x0a75('0x37')]?_0x30567f[_0x0a75('0x35')]:_0x5722aa[_0x0a75('0x30')];if(!_0x5a60ad[_0x0a75('0x32')][_0x0a75('0x38')]('nolimit')){_0x30567f[_0x0a75('0x22')]=qs['limit'](_0x5a60ad[_0x0a75('0x32')][_0x0a75('0x22')]);_0x30567f['offset']=qs[_0x0a75('0x21')](_0x5a60ad[_0x0a75('0x32')]['offset']);}_0x30567f[_0x0a75('0x39')]=qs[_0x0a75('0x3a')](_0x5a60ad[_0x0a75('0x32')][_0x0a75('0x3a')]);_0x30567f[_0x0a75('0x3b')]=qs['filters'](_[_0x0a75('0x3c')](_0x5a60ad[_0x0a75('0x32')],_0x5722aa[_0x0a75('0x33')]));if(_0x5a60ad[_0x0a75('0x32')]['filter']){_0x30567f['where']=_[_0x0a75('0x3d')](_0x30567f[_0x0a75('0x3b')],{'$or':_[_0x0a75('0x3e')](_0xcb54b5,function(_0x1ebdaa){if(_0x1ebdaa[_0x0a75('0x3f')][_0x0a75('0x40')]!==_0x0a75('0x41')){var _0x1676d4={};_0x1676d4[_0x1ebdaa[_0x0a75('0x42')]]={'$like':'%'+_0x5a60ad[_0x0a75('0x32')][_0x0a75('0x43')]+'%'};return _0x1676d4;}})});}_0x30567f=_[_0x0a75('0x3d')]({},_0x30567f,_0x5a60ad[_0x0a75('0x44')]);var _0x4d0abb={'where':_0x30567f[_0x0a75('0x3b')]};return db[_0x0a75('0x2e')][_0x0a75('0x20')](_0x4d0abb)[_0x0a75('0x29')](function(_0x4621a3){_0x845645[_0x0a75('0x20')]=_0x4621a3;if(_0x5a60ad[_0x0a75('0x32')][_0x0a75('0x45')]){_0x30567f[_0x0a75('0x46')]=[{'all':!![]}];}return db[_0x0a75('0x2e')][_0x0a75('0x47')](_0x30567f);})[_0x0a75('0x29')](function(_0x5caa38){_0x845645[_0x0a75('0x48')]=_0x5caa38;return _0x845645;})[_0x0a75('0x29')](respondWithFilteredResult(_0x2b46f6,_0x30567f))[_0x0a75('0x49')](handleError(_0x2b46f6,null));};exports[_0x0a75('0x4a')]=function(_0x19e727,_0x42177d){var _0x356df5={'raw':!![],'where':{'id':_0x19e727[_0x0a75('0x4b')]['id']}},_0xebb33={};_0xebb33[_0x0a75('0x30')]=_[_0x0a75('0x31')](db[_0x0a75('0x2e')][_0x0a75('0x2f')]);_0xebb33[_0x0a75('0x32')]=_[_0x0a75('0x31')](_0x19e727[_0x0a75('0x32')]);_0xebb33['filters']=_['intersection'](_0xebb33['model'],_0xebb33['query']);_0x356df5[_0x0a75('0x35')]=_['intersection'](_0xebb33[_0x0a75('0x30')],qs[_0x0a75('0x36')](_0x19e727['query'][_0x0a75('0x36')]));_0x356df5[_0x0a75('0x35')]=_0x356df5['attributes'][_0x0a75('0x37')]?_0x356df5[_0x0a75('0x35')]:_0xebb33[_0x0a75('0x30')];if(_0x19e727[_0x0a75('0x32')]['includeAll']){_0x356df5['include']=[{'all':!![]}];}_0x356df5=_[_0x0a75('0x3d')]({},_0x356df5,_0x19e727[_0x0a75('0x44')]);return db[_0x0a75('0x2e')][_0x0a75('0x4c')](_0x356df5)[_0x0a75('0x29')](handleEntityNotFound(_0x42177d,null))[_0x0a75('0x29')](respondWithResult(_0x42177d,null))[_0x0a75('0x49')](handleError(_0x42177d,null));};exports[_0x0a75('0x4d')]=function(_0x3e914e,_0x3810d3){return db[_0x0a75('0x2e')]['create'](_0x3e914e['body'],{})['then'](respondWithResult(_0x3810d3,0xc9))[_0x0a75('0x49')](handleError(_0x3810d3,null));};exports[_0x0a75('0x28')]=function(_0x145bf7,_0x1b6240){if(_0x145bf7[_0x0a75('0x4e')]['id']){delete _0x145bf7['body']['id'];}return db[_0x0a75('0x2e')]['find']({'where':{'id':_0x145bf7['params']['id']}})[_0x0a75('0x29')](handleEntityNotFound(_0x1b6240,null))[_0x0a75('0x29')](saveUpdates(_0x145bf7[_0x0a75('0x4e')],null))[_0x0a75('0x29')](respondWithResult(_0x1b6240,null))['catch'](handleError(_0x1b6240,null));};exports[_0x0a75('0x4f')]=function(_0x3a96e4,_0x4f4946){return db[_0x0a75('0x2e')][_0x0a75('0x4c')]({'where':{'id':_0x3a96e4['params']['id']}})[_0x0a75('0x29')](handleEntityNotFound(_0x4f4946,null))[_0x0a75('0x29')](removeEntity(_0x4f4946,null))[_0x0a75('0x49')](handleError(_0x4f4946,null));};exports['describe']=function(_0x4d3939,_0x33f6c8){return db[_0x0a75('0x2e')]['describe']()[_0x0a75('0x29')](respondWithResult(_0x33f6c8,null))[_0x0a75('0x49')](handleError(_0x33f6c8,null));};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.model.js b/server/api/squareReportDetail/squareReportDetail.model.js
index 66423f6..42fe018 100644
--- a/server/api/squareReportDetail/squareReportDetail.model.js
+++ b/server/api/squareReportDetail/squareReportDetail.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa93e=['api','bluebird','path','./squareReportDetail.attributes','exports','define','SquareDetailsReport','../../config/logger'];(function(_0x56957f,_0x5cf4d4){var _0x130b32=function(_0x2352e1){while(--_0x2352e1){_0x56957f['push'](_0x56957f['shift']());}};_0x130b32(++_0x5cf4d4);}(_0xa93e,0x1df));var _0xea93=function(_0x349a2d,_0x10b177){_0x349a2d=_0x349a2d-0x0;var _0x1fc778=_0xa93e[_0x349a2d];return _0x1fc778;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xea93('0x0'))(_0xea93('0x1'));var moment=require('moment');var BPromise=require(_0xea93('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xea93('0x3'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xea93('0x4'));module[_0xea93('0x5')]=function(_0x6c6985,_0x26def3){return _0x6c6985[_0xea93('0x6')](_0xea93('0x7'),attributes,{'tableName':'report_square_details','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdbfa=['../../config/environment','./squareReportDetail.attributes','exports','define','SquareDetailsReport','report_square_details','api','bluebird','request-promise','rimraf'];(function(_0x34f3a4,_0x3a7243){var _0x37b21b=function(_0x3995b3){while(--_0x3995b3){_0x34f3a4['push'](_0x34f3a4['shift']());}};_0x37b21b(++_0x3a7243);}(_0xdbfa,0x128));var _0xadbf=function(_0x5cff31,_0x5d5b03){_0x5cff31=_0x5cff31-0x0;var _0x5a1495=_0xdbfa[_0x5cff31];return _0x5a1495;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0xadbf('0x0'));var moment=require('moment');var BPromise=require(_0xadbf('0x1'));var rp=require(_0xadbf('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0xadbf('0x3'));var config=require(_0xadbf('0x4'));var attributes=require(_0xadbf('0x5'));module[_0xadbf('0x6')]=function(_0xd2abca,_0x5bad41){return _0xd2abca[_0xadbf('0x7')](_0xadbf('0x8'),attributes,{'tableName':_0xadbf('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.rpc.js b/server/api/squareReportDetail/squareReportDetail.rpc.js
index 8ac91ee..00596fa 100644
--- a/server/api/squareReportDetail/squareReportDetail.rpc.js
+++ b/server/api/squareReportDetail/squareReportDetail.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x88d5=['stringify','error','code','message','result','catch','SquareDetailsReport,\x20%s,\x20%s','SquareDetailsReport','options','CreateSquareDetailsReport','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug'];(function(_0x505f29,_0xff212a){var _0x3c279e=function(_0x5df9df){while(--_0x5df9df){_0x505f29['push'](_0x505f29['shift']());}};_0x3c279e(++_0xff212a);}(_0x88d5,0x76));var _0x588d=function(_0x14b62e,_0x3b8096){_0x14b62e=_0x14b62e-0x0;var _0x42ad69=_0x88d5[_0x14b62e];return _0x42ad69;};'use strict';var _=require(_0x588d('0x0'));var util=require(_0x588d('0x1'));var moment=require(_0x588d('0x2'));var BPromise=require(_0x588d('0x3'));var rs=require(_0x588d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x588d('0x5'))['db'];var utils=require(_0x588d('0x6'));var logger=require('../../config/logger')(_0x588d('0x7'));var config=require(_0x588d('0x8'));var jayson=require(_0x588d('0x9'));var client=jayson[_0x588d('0xa')][_0x588d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x413748,_0x579dca,_0x57699a){return new BPromise(function(_0x41ddf3,_0x141982){return client[_0x588d('0xc')](_0x413748,_0x57699a)[_0x588d('0xd')](function(_0x51c1d3){logger[_0x588d('0xe')]('SquareDetailsReport,\x20%s,\x20%s',_0x579dca,_0x588d('0xf'));logger[_0x588d('0x10')]('SquareDetailsReport,\x20%s,\x20%s,\x20%s',_0x579dca,_0x588d('0xf'),JSON[_0x588d('0x11')](_0x51c1d3));if(_0x51c1d3[_0x588d('0x12')]){if(_0x51c1d3['error'][_0x588d('0x13')]===0x1f4){logger[_0x588d('0x12')]('SquareDetailsReport,\x20%s,\x20%s',_0x579dca,_0x51c1d3[_0x588d('0x12')][_0x588d('0x14')]);return _0x141982(_0x51c1d3[_0x588d('0x12')][_0x588d('0x14')]);}logger[_0x588d('0x12')]('SquareDetailsReport,\x20%s,\x20%s',_0x579dca,_0x51c1d3['error'][_0x588d('0x14')]);return _0x41ddf3(_0x51c1d3[_0x588d('0x12')][_0x588d('0x14')]);}else{logger['info']('SquareDetailsReport,\x20%s,\x20%s',_0x579dca,_0x588d('0xf'));_0x41ddf3(_0x51c1d3[_0x588d('0x15')]['message']);}})[_0x588d('0x16')](function(_0x73302d){logger[_0x588d('0x12')](_0x588d('0x17'),_0x579dca,_0x73302d);_0x141982(_0x73302d);});});}exports['CreateSquareDetailsReport']=function(_0x2f2800){var _0x432da4=this;return new Promise(function(_0x5dcba7,_0x2daf0c){return db[_0x588d('0x18')]['create'](_0x2f2800['body'],{'raw':_0x2f2800[_0x588d('0x19')]?_0x2f2800[_0x588d('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x588d('0xd')](function(_0x12c58c){logger[_0x588d('0xe')]('CreateSquareDetailsReport',_0x2f2800);logger[_0x588d('0x10')]('CreateSquareDetailsReport',_0x2f2800,JSON['stringify'](_0x12c58c));_0x5dcba7(_0x12c58c);})['catch'](function(_0x56b034){logger[_0x588d('0x12')](_0x588d('0x1a'),_0x56b034[_0x588d('0x14')],_0x2f2800);_0x2daf0c(_0x432da4['error'](0x1f4,_0x56b034[_0x588d('0x14')]));});});};
\ No newline at end of file
+var _0xc4a1=['debug','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','SquareDetailsReport,\x20%s,\x20%s','SquareDetailsReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','info','catch','create','body','options','raw','CreateSquareDetailsReport'];(function(_0x1067d3,_0x5d511e){var _0x1ba21c=function(_0x2c410d){while(--_0x2c410d){_0x1067d3['push'](_0x1067d3['shift']());}};_0x1ba21c(++_0x5d511e);}(_0xc4a1,0x1ef));var _0x1c4a=function(_0x207e81,_0x4090a9){_0x207e81=_0x207e81-0x0;var _0x5ae947=_0xc4a1[_0x207e81];return _0x5ae947;};'use strict';var _=require(_0x1c4a('0x0'));var util=require('util');var moment=require(_0x1c4a('0x1'));var BPromise=require(_0x1c4a('0x2'));var rs=require(_0x1c4a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1c4a('0x4'))['db'];var utils=require(_0x1c4a('0x5'));var logger=require(_0x1c4a('0x6'))(_0x1c4a('0x7'));var config=require(_0x1c4a('0x8'));var jayson=require(_0x1c4a('0x9'));var client=jayson[_0x1c4a('0xa')][_0x1c4a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x46e47d,_0x420058,_0x2f84b0){return new BPromise(function(_0xef9b92,_0x456e39){return client['request'](_0x46e47d,_0x2f84b0)[_0x1c4a('0xc')](function(_0x4272ec){logger['info'](_0x1c4a('0xd'),_0x420058,'request\x20sent');logger['debug'](_0x1c4a('0xe'),_0x420058,_0x1c4a('0xf'),JSON['stringify'](_0x4272ec));if(_0x4272ec[_0x1c4a('0x10')]){if(_0x4272ec[_0x1c4a('0x10')]['code']===0x1f4){logger['error'](_0x1c4a('0xd'),_0x420058,_0x4272ec[_0x1c4a('0x10')]['message']);return _0x456e39(_0x4272ec['error'][_0x1c4a('0x11')]);}logger[_0x1c4a('0x10')](_0x1c4a('0xd'),_0x420058,_0x4272ec[_0x1c4a('0x10')][_0x1c4a('0x11')]);return _0xef9b92(_0x4272ec[_0x1c4a('0x10')][_0x1c4a('0x11')]);}else{logger[_0x1c4a('0x12')](_0x1c4a('0xd'),_0x420058,_0x1c4a('0xf'));_0xef9b92(_0x4272ec['result'][_0x1c4a('0x11')]);}})[_0x1c4a('0x13')](function(_0x1b1358){logger[_0x1c4a('0x10')]('SquareDetailsReport,\x20%s,\x20%s',_0x420058,_0x1b1358);_0x456e39(_0x1b1358);});});}exports['CreateSquareDetailsReport']=function(_0x460dbb){var _0x2f1cf0=this;return new Promise(function(_0x1f59da,_0x5f4cac){return db['SquareDetailsReport'][_0x1c4a('0x14')](_0x460dbb[_0x1c4a('0x15')],{'raw':_0x460dbb['options']?_0x460dbb[_0x1c4a('0x16')][_0x1c4a('0x17')]===undefined?!![]:![]:!![]})[_0x1c4a('0xc')](function(_0x5324a9){logger['info'](_0x1c4a('0x18'),_0x460dbb);logger[_0x1c4a('0x19')]('CreateSquareDetailsReport',_0x460dbb,JSON['stringify'](_0x5324a9));_0x1f59da(_0x5324a9);})[_0x1c4a('0x13')](function(_0x473ef3){logger[_0x1c4a('0x10')](_0x1c4a('0x18'),_0x473ef3['message'],_0x460dbb);_0x5f4cac(_0x2f1cf0[_0x1c4a('0x10')](0x1f4,_0x473ef3[_0x1c4a('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/system/index.js b/server/api/system/index.js
index 56376e7..a4397c2 100644
--- a/server/api/system/index.js
+++ b/server/api/system/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf330=['killProcess','exports','express','../../components/auth/service','./system.controller','get','isAuthenticated','/process/:pid/kill'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xf330,0x1aa));var _0x0f33=function(_0x561fef,_0x1295fb){_0x561fef=_0x561fef-0x0;var _0x49fdb2=_0xf330[_0x561fef];return _0x49fdb2;};'use strict';var express=require(_0x0f33('0x0'));var router=express['Router']();var auth=require(_0x0f33('0x1'));var controller=require(_0x0f33('0x2'));router[_0x0f33('0x3')]('/',auth[_0x0f33('0x4')](),controller['index']);router[_0x0f33('0x3')](_0x0f33('0x5'),auth[_0x0f33('0x4')](),controller[_0x0f33('0x6')]);module[_0x0f33('0x7')]=router;
\ No newline at end of file
+var _0xde2e=['./system.controller','get','isAuthenticated','index','/process/:pid/kill','killProcess','express','Router','../../components/auth/service'];(function(_0xa8883,_0x1f107f){var _0x479426=function(_0x4e56b9){while(--_0x4e56b9){_0xa8883['push'](_0xa8883['shift']());}};_0x479426(++_0x1f107f);}(_0xde2e,0x69));var _0xede2=function(_0x40bffc,_0x3a45d7){_0x40bffc=_0x40bffc-0x0;var _0x3007e9=_0xde2e[_0x40bffc];return _0x3007e9;};'use strict';var express=require(_0xede2('0x0'));var router=express[_0xede2('0x1')]();var auth=require(_0xede2('0x2'));var controller=require(_0xede2('0x3'));router[_0xede2('0x4')]('/',auth[_0xede2('0x5')](),controller[_0xede2('0x6')]);router['get'](_0xede2('0x7'),auth['isAuthenticated'](),controller[_0xede2('0x8')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/system/system.controller.js b/server/api/system/system.controller.js
index 823bfaf..f4659f9 100644
--- a/server/api/system/system.controller.js
+++ b/server/api/system/system.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4c4f=['killProcess','systeminformation','child_process','../../config/logger','api','util','bluebird','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','send','then','catch','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','split','indexOf','pid','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly'];(function(_0x3554cb,_0x489d00){var _0x471d35=function(_0x3597ee){while(--_0x3597ee){_0x3554cb['push'](_0x3554cb['shift']());}};_0x471d35(++_0x489d00);}(_0x4c4f,0x109));var _0xf4c4=function(_0x59cf50,_0x174e60){_0x59cf50=_0x59cf50-0x0;var _0x8409ec=_0x4c4f[_0x59cf50];return _0x8409ec;};'use strict';var info=require(_0xf4c4('0x0'));var exec=require(_0xf4c4('0x1'))['exec'];var logger=require(_0xf4c4('0x2'))(_0xf4c4('0x3'));var util=require(_0xf4c4('0x4'));var BPromise=require(_0xf4c4('0x5'));var _=require('lodash');function handleError(_0x3a769d,_0x52cdaf,_0x3e44b0){_0x52cdaf=_0x52cdaf||0x1f4;return function(_0x374706){logger[_0xf4c4('0x6')](_0xf4c4('0x7'),_0x3e44b0,_0x52cdaf,util['inspect'](_0x374706,{'showHidden':![],'depth':null}));delete _0x374706[_0xf4c4('0x8')];_0x3a769d[_0xf4c4('0x9')](_0x52cdaf)[_0xf4c4('0xa')](_0x374706);};}exports['index']=function(_0x521b14,_0x44ffc7){return info['getAllData']()[_0xf4c4('0xb')](function(_0x492e2a){return _0x44ffc7['status'](0xc8)['json'](_0x492e2a);})[_0xf4c4('0xc')](function(_0x207874){return _0x44ffc7[_0xf4c4('0x9')](0x1f4)['json'](_0x207874);});};exports['killProcess']=function(_0x2b914d,_0x500c16){var _0x35a0d4=['components/import/cm'];return new BPromise(function(_0x3c89ed,_0x59f7e2){return exec(util[_0xf4c4('0xd')](_0xf4c4('0xe'),_0x2b914d[_0xf4c4('0xf')]['pid']),function(_0x3419c9,_0x2eae89,_0x482e17){if(_0x3419c9){return _0x59f7e2(_0x3419c9);}return _0x3c89ed(_0x2eae89);});})[_0xf4c4('0xb')](function(_0x3a1177){var _0x43abc8=![];var _0x2f4c6c=_0x3a1177[_0xf4c4('0x10')](/\n/);for(var _0x960eb2=0x0,_0x5e35ab=_0x35a0d4['length'];_0x960eb2<_0x5e35ab,_0x43abc8===![];_0x960eb2+=0x1){if(_0x3a1177[_0xf4c4('0x11')](_0x35a0d4[_0x960eb2])>=0x0){_0x43abc8=!![];}}if(!_0x43abc8){throw new Error(util[_0xf4c4('0xd')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x2b914d[_0xf4c4('0xf')][_0xf4c4('0x12')]));}process['kill'](_0x2b914d[_0xf4c4('0xf')][_0xf4c4('0x12')],_0xf4c4('0x13'));return _0x500c16[_0xf4c4('0x9')](0xc8)['json']({'message':util['format'](_0xf4c4('0x14'),_0x2b914d[_0xf4c4('0xf')][_0xf4c4('0x12')])});})[_0xf4c4('0xc')](handleError(_0x500c16,null,_0xf4c4('0x15')));};
\ No newline at end of file
+var _0xbec4=['../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','status','send','index','getAllData','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','then','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','systeminformation','child_process','exec'];(function(_0x1daaa3,_0x18048f){var _0x386391=function(_0x4c1ef1){while(--_0x4c1ef1){_0x1daaa3['push'](_0x1daaa3['shift']());}};_0x386391(++_0x18048f);}(_0xbec4,0x8e));var _0x4bec=function(_0x56bf67,_0x1131a0){_0x56bf67=_0x56bf67-0x0;var _0x456708=_0xbec4[_0x56bf67];return _0x456708;};'use strict';var info=require(_0x4bec('0x0'));var exec=require(_0x4bec('0x1'))[_0x4bec('0x2')];var logger=require(_0x4bec('0x3'))(_0x4bec('0x4'));var util=require(_0x4bec('0x5'));var BPromise=require(_0x4bec('0x6'));var _=require(_0x4bec('0x7'));function handleError(_0x44fc3a,_0x3ca681,_0x40a91f){_0x3ca681=_0x3ca681||0x1f4;return function(_0x3d69f8){logger[_0x4bec('0x8')](_0x4bec('0x9'),_0x40a91f,_0x3ca681,util[_0x4bec('0xa')](_0x3d69f8,{'showHidden':![],'depth':null}));delete _0x3d69f8['name'];_0x44fc3a[_0x4bec('0xb')](_0x3ca681)[_0x4bec('0xc')](_0x3d69f8);};}exports[_0x4bec('0xd')]=function(_0x5de48c,_0x346f70){return info[_0x4bec('0xe')]()['then'](function(_0x3ce791){return _0x346f70[_0x4bec('0xb')](0xc8)[_0x4bec('0xf')](_0x3ce791);})[_0x4bec('0x10')](function(_0x1e0630){return _0x346f70[_0x4bec('0xb')](0x1f4)[_0x4bec('0xf')](_0x1e0630);});};exports[_0x4bec('0x11')]=function(_0x54ae0d,_0x531e47){var _0x25bc9d=[_0x4bec('0x12')];return new BPromise(function(_0x4573d9,_0x149c38){return exec(util[_0x4bec('0x13')](_0x4bec('0x14'),_0x54ae0d[_0x4bec('0x15')][_0x4bec('0x16')]),function(_0x380a62,_0x559766,_0x199989){if(_0x380a62){return _0x149c38(_0x380a62);}return _0x4573d9(_0x559766);});})[_0x4bec('0x17')](function(_0x23330f){var _0x16141b=![];var _0xad6651=_0x23330f[_0x4bec('0x18')](/\n/);for(var _0x35b605=0x0,_0x4f27a9=_0x25bc9d[_0x4bec('0x19')];_0x35b605<_0x4f27a9,_0x16141b===![];_0x35b605+=0x1){if(_0x23330f[_0x4bec('0x1a')](_0x25bc9d[_0x35b605])>=0x0){_0x16141b=!![];}}if(!_0x16141b){throw new Error(util['format'](_0x4bec('0x1b'),_0x54ae0d[_0x4bec('0x15')][_0x4bec('0x16')]));}process[_0x4bec('0x1c')](_0x54ae0d['params'][_0x4bec('0x16')],'SIGINT');return _0x531e47[_0x4bec('0xb')](0xc8)[_0x4bec('0xf')]({'message':util[_0x4bec('0x13')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x54ae0d[_0x4bec('0x15')][_0x4bec('0x16')])});})[_0x4bec('0x10')](handleError(_0x531e47,null,_0x4bec('0x11')));};
\ No newline at end of file
diff --git a/server/api/tag/index.js b/server/api/tag/index.js
index b8e30c9..59f0609 100644
--- a/server/api/tag/index.js
+++ b/server/api/tag/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2032=['get','isAuthenticated','index','/:id','show','post','update','delete','destroy','util','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./tag.controller'];(function(_0x521be0,_0x430a89){var _0x1efb7d=function(_0x3cfd05){while(--_0x3cfd05){_0x521be0['push'](_0x521be0['shift']());}};_0x1efb7d(++_0x430a89);}(_0x2032,0xd9));var _0x2203=function(_0x21ee04,_0x32b89c){_0x21ee04=_0x21ee04-0x0;var _0x51bbf9=_0x2032[_0x21ee04];return _0x51bbf9;};'use strict';var multer=require('multer');var util=require(_0x2203('0x0'));var path=require(_0x2203('0x1'));var timeout=require(_0x2203('0x2'));var express=require('express');var router=express[_0x2203('0x3')]();var auth=require(_0x2203('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x2203('0x5'));var controller=require(_0x2203('0x6'));router[_0x2203('0x7')]('/',auth[_0x2203('0x8')](),controller[_0x2203('0x9')]);router[_0x2203('0x7')](_0x2203('0xa'),auth[_0x2203('0x8')](),controller[_0x2203('0xb')]);router[_0x2203('0xc')]('/',auth[_0x2203('0x8')](),controller['create']);router['put'](_0x2203('0xa'),auth['isAuthenticated'](),controller[_0x2203('0xd')]);router[_0x2203('0xe')](_0x2203('0xa'),auth['isAuthenticated'](),controller[_0x2203('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0x2032=['get','isAuthenticated','index','/:id','show','post','update','delete','destroy','util','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./tag.controller'];(function(_0x266e22,_0x4a101a){var _0x321998=function(_0x28718a){while(--_0x28718a){_0x266e22['push'](_0x266e22['shift']());}};_0x321998(++_0x4a101a);}(_0x2032,0xd9));var _0x2203=function(_0x20ef77,_0x5912f7){_0x20ef77=_0x20ef77-0x0;var _0x39ab26=_0x2032[_0x20ef77];return _0x39ab26;};'use strict';var multer=require('multer');var util=require(_0x2203('0x0'));var path=require(_0x2203('0x1'));var timeout=require(_0x2203('0x2'));var express=require('express');var router=express[_0x2203('0x3')]();var auth=require(_0x2203('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x2203('0x5'));var controller=require(_0x2203('0x6'));router[_0x2203('0x7')]('/',auth[_0x2203('0x8')](),controller[_0x2203('0x9')]);router[_0x2203('0x7')](_0x2203('0xa'),auth[_0x2203('0x8')](),controller[_0x2203('0xb')]);router[_0x2203('0xc')]('/',auth[_0x2203('0x8')](),controller['create']);router['put'](_0x2203('0xa'),auth['isAuthenticated'](),controller[_0x2203('0xd')]);router[_0x2203('0xe')](_0x2203('0xa'),auth['isAuthenticated'](),controller[_0x2203('0xf')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/tag/tag.attributes.js b/server/api/tag/tag.attributes.js
index d203b9e..ba87291 100644
--- a/server/api/tag/tag.attributes.js
+++ b/server/api/tag/tag.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8763=['STRING','#0091EA','sequelize'];(function(_0x1b2334,_0x2a254a){var _0x5bf933=function(_0x3e0f41){while(--_0x3e0f41){_0x1b2334['push'](_0x1b2334['shift']());}};_0x5bf933(++_0x2a254a);}(_0x8763,0x137));var _0x3876=function(_0x17d647,_0x4ff422){_0x17d647=_0x17d647-0x0;var _0x18083b=_0x8763[_0x17d647];return _0x18083b;};'use strict';var Sequelize=require(_0x3876('0x0'));module['exports']={'name':{'type':Sequelize[_0x3876('0x1')],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x3876('0x1')],'defaultValue':_0x3876('0x2')},'description':{'type':Sequelize[_0x3876('0x1')]}};
\ No newline at end of file
+var _0x4a48=['#0091EA','sequelize','exports','STRING','name'];(function(_0x1254a7,_0x375b70){var _0x2736b8=function(_0x120610){while(--_0x120610){_0x1254a7['push'](_0x1254a7['shift']());}};_0x2736b8(++_0x375b70);}(_0x4a48,0xce));var _0x84a4=function(_0x1523a0,_0x268053){_0x1523a0=_0x1523a0-0x0;var _0x5be00a=_0x4a48[_0x1523a0];return _0x5be00a;};'use strict';var Sequelize=require(_0x84a4('0x0'));module[_0x84a4('0x1')]={'name':{'type':Sequelize[_0x84a4('0x2')],'unique':_0x84a4('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x84a4('0x2')],'defaultValue':_0x84a4('0x4')},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js
index 85f76df..7e39dd1 100644
--- a/server/api/tag/tag.controller.js
+++ b/server/api/tag/tag.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfcf0=['html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','status','end','json','offset','limit','set','apply','save','then','destroy','get','UserProfileResource','error','stack','name','send','index','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','map','field','merge','Tag','count','includeAll','include','findAll','rows','show','options','catch','create','body','user','Tags','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','find','params'];(function(_0x2493f7,_0x49c670){var _0x594ab2=function(_0x344ec2){while(--_0x344ec2){_0x2493f7['push'](_0x2493f7['shift']());}};_0x594ab2(++_0x49c670);}(_0xfcf0,0x138));var _0x0fcf=function(_0x36d203,_0x3653f3){_0x36d203=_0x36d203-0x0;var _0x2f9e62=_0xfcf0[_0x36d203];return _0x2f9e62;};'use strict';var pdf=require(_0x0fcf('0x0'));var emlformat=require(_0x0fcf('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x0fcf('0x2'));var jsonpatch=require(_0x0fcf('0x3'));var rp=require(_0x0fcf('0x4'));var moment=require(_0x0fcf('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0fcf('0x6'));var util=require(_0x0fcf('0x7'));var path=require(_0x0fcf('0x8'));var sox=require(_0x0fcf('0x9'));var csv=require(_0x0fcf('0xa'));var ejs=require(_0x0fcf('0xb'));var fs=require('fs');var _=require(_0x0fcf('0xc'));var squel=require(_0x0fcf('0xd'));var crypto=require('crypto');var jsforce=require(_0x0fcf('0xe'));var deskjs=require(_0x0fcf('0xf'));var toCsv=require(_0x0fcf('0xa'));var querystring=require('querystring');var Papa=require(_0x0fcf('0x10'));var Redis=require(_0x0fcf('0x11'));var authService=require(_0x0fcf('0x12'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x0fcf('0x13'));var logger=require('../../config/logger')(_0x0fcf('0x14'));var utils=require(_0x0fcf('0x15'));var config=require(_0x0fcf('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5f40fb,_0x29336a){_0x29336a=_0x29336a||0xcc;return function(_0x3c999e){if(_0x3c999e){return _0x5f40fb['sendStatus'](_0x29336a);}return _0x5f40fb[_0x0fcf('0x17')](_0x29336a)[_0x0fcf('0x18')]();};}function respondWithResult(_0x160d2c,_0x26b169){_0x26b169=_0x26b169||0xc8;return function(_0x25fadc){if(_0x25fadc){return _0x160d2c['status'](_0x26b169)[_0x0fcf('0x19')](_0x25fadc);}};}function respondWithFilteredResult(_0x3701c9,_0x1fcb47){return function(_0x5e867f){if(_0x5e867f){var _0x3c09c4=_0x5e867f['count'],_0x610106=_0x1fcb47[_0x0fcf('0x1a')],_0x445207=_0x1fcb47[_0x0fcf('0x1a')]+_0x1fcb47[_0x0fcf('0x1b')],_0x177c8f;if(_0x445207>=_0x3c09c4){_0x445207=_0x3c09c4;_0x177c8f=0xc8;}else{_0x177c8f=0xce;}_0x3701c9[_0x0fcf('0x17')](_0x177c8f);return _0x3701c9[_0x0fcf('0x1c')]('Content-Range',_0x610106+'-'+_0x445207+'/'+_0x3c09c4)[_0x0fcf('0x19')](_0x5e867f);}return null;};}function patchUpdates(_0x1a8f58){return function(_0x5dad87){try{jsonpatch[_0x0fcf('0x1d')](_0x5dad87,_0x1a8f58,!![]);}catch(_0x1b9a90){return BPromise['reject'](_0x1b9a90);}return _0x5dad87[_0x0fcf('0x1e')]();};}function saveUpdates(_0x50ac4a,_0x3fc9e6){return function(_0x13454e){if(_0x13454e){return _0x13454e['update'](_0x50ac4a)[_0x0fcf('0x1f')](function(_0x3f28d0){return _0x3f28d0;});}return null;};}function removeEntity(_0x29dbdf,_0x5c459c){return function(_0x2f03ce){if(_0x2f03ce){return _0x2f03ce[_0x0fcf('0x20')]()[_0x0fcf('0x1f')](function(){var _0x41b20b=_0x2f03ce[_0x0fcf('0x21')]({'plain':!![]});var _0x30e1b0='Tags';return db[_0x0fcf('0x22')][_0x0fcf('0x20')]({'where':{'type':_0x30e1b0,'resourceId':_0x41b20b['id']}})[_0x0fcf('0x1f')](function(){return _0x2f03ce;});})[_0x0fcf('0x1f')](function(){_0x29dbdf[_0x0fcf('0x17')](0xcc)[_0x0fcf('0x18')]();});}};}function handleEntityNotFound(_0x2ce990,_0x18f269){return function(_0x117510){if(!_0x117510){_0x2ce990['sendStatus'](0x194);}return _0x117510;};}function handleError(_0x18965e,_0xc107a){_0xc107a=_0xc107a||0x1f4;return function(_0x41b7a2){logger[_0x0fcf('0x23')](_0x41b7a2[_0x0fcf('0x24')]);if(_0x41b7a2[_0x0fcf('0x25')]){delete _0x41b7a2[_0x0fcf('0x25')];}_0x18965e['status'](_0xc107a)[_0x0fcf('0x26')](_0x41b7a2);};}exports[_0x0fcf('0x27')]=function(_0x200517,_0x35180d){var _0x49fd0e={},_0x5d9bcd={},_0x4af80d={'count':0x0,'rows':[]};var _0x428194=db['Tag'][_0x0fcf('0x28')];_0x5d9bcd[_0x0fcf('0x29')]=_['keys'](_0x428194);_0x5d9bcd[_0x0fcf('0x2a')]=_[_0x0fcf('0x2b')](_0x200517[_0x0fcf('0x2a')]);_0x5d9bcd[_0x0fcf('0x2c')]=_[_0x0fcf('0x2d')](_0x5d9bcd[_0x0fcf('0x29')],_0x5d9bcd['query']);_0x49fd0e[_0x0fcf('0x2e')]=_[_0x0fcf('0x2d')](_0x5d9bcd[_0x0fcf('0x29')],qs[_0x0fcf('0x2f')](_0x200517[_0x0fcf('0x2a')][_0x0fcf('0x2f')]));_0x49fd0e['attributes']=_0x49fd0e[_0x0fcf('0x2e')][_0x0fcf('0x30')]?_0x49fd0e[_0x0fcf('0x2e')]:_0x5d9bcd[_0x0fcf('0x29')];if(!_0x200517[_0x0fcf('0x2a')][_0x0fcf('0x31')](_0x0fcf('0x32'))){_0x49fd0e[_0x0fcf('0x1b')]=qs[_0x0fcf('0x1b')](_0x200517[_0x0fcf('0x2a')][_0x0fcf('0x1b')]);_0x49fd0e[_0x0fcf('0x1a')]=qs[_0x0fcf('0x1a')](_0x200517[_0x0fcf('0x2a')]['offset']);}_0x49fd0e['order']=qs[_0x0fcf('0x33')](_0x200517['query']['sort']);_0x49fd0e[_0x0fcf('0x34')]=qs[_0x0fcf('0x2c')](_[_0x0fcf('0x35')](_0x200517['query'],_0x5d9bcd['filters']));if(_0x200517[_0x0fcf('0x2a')][_0x0fcf('0x36')]){_0x49fd0e[_0x0fcf('0x34')]=_['merge'](_0x49fd0e[_0x0fcf('0x34')],{'$or':_[_0x0fcf('0x37')](_0x428194,function(_0x29067e){if(_0x29067e['type']['key']!=='VIRTUAL'){var _0x3c24cb={};_0x3c24cb[_0x29067e[_0x0fcf('0x38')]]={'$like':'%'+_0x200517[_0x0fcf('0x2a')][_0x0fcf('0x36')]+'%'};return _0x3c24cb;}})});}_0x49fd0e=_[_0x0fcf('0x39')]({},_0x49fd0e,_0x200517['options']);var _0x394cdf={'where':_0x49fd0e[_0x0fcf('0x34')]};return db[_0x0fcf('0x3a')]['count'](_0x394cdf)['then'](function(_0x13e4b2){_0x4af80d[_0x0fcf('0x3b')]=_0x13e4b2;if(_0x200517[_0x0fcf('0x2a')][_0x0fcf('0x3c')]){_0x49fd0e[_0x0fcf('0x3d')]=[{'all':!![]}];}return db['Tag'][_0x0fcf('0x3e')](_0x49fd0e);})[_0x0fcf('0x1f')](function(_0x130e18){_0x4af80d[_0x0fcf('0x3f')]=_0x130e18;return _0x4af80d;})['then'](respondWithFilteredResult(_0x35180d,_0x49fd0e))['catch'](handleError(_0x35180d,null));};exports[_0x0fcf('0x40')]=function(_0x2444a6,_0x5544e3){var _0x1b984e={'raw':!![],'where':{'id':_0x2444a6['params']['id']}},_0x400f11={};_0x400f11[_0x0fcf('0x29')]=_[_0x0fcf('0x2b')](db[_0x0fcf('0x3a')][_0x0fcf('0x28')]);_0x400f11[_0x0fcf('0x2a')]=_['keys'](_0x2444a6[_0x0fcf('0x2a')]);_0x400f11[_0x0fcf('0x2c')]=_['intersection'](_0x400f11['model'],_0x400f11[_0x0fcf('0x2a')]);_0x1b984e['attributes']=_['intersection'](_0x400f11[_0x0fcf('0x29')],qs[_0x0fcf('0x2f')](_0x2444a6[_0x0fcf('0x2a')][_0x0fcf('0x2f')]));_0x1b984e[_0x0fcf('0x2e')]=_0x1b984e[_0x0fcf('0x2e')][_0x0fcf('0x30')]?_0x1b984e[_0x0fcf('0x2e')]:_0x400f11[_0x0fcf('0x29')];if(_0x2444a6[_0x0fcf('0x2a')]['includeAll']){_0x1b984e[_0x0fcf('0x3d')]=[{'all':!![]}];}_0x1b984e=_[_0x0fcf('0x39')]({},_0x1b984e,_0x2444a6[_0x0fcf('0x41')]);return db['Tag']['find'](_0x1b984e)[_0x0fcf('0x1f')](handleEntityNotFound(_0x5544e3,null))[_0x0fcf('0x1f')](respondWithResult(_0x5544e3,null))[_0x0fcf('0x42')](handleError(_0x5544e3,null));};exports[_0x0fcf('0x43')]=function(_0x59e167,_0x592bb4){return db[_0x0fcf('0x3a')][_0x0fcf('0x43')](_0x59e167[_0x0fcf('0x44')],{})[_0x0fcf('0x1f')](function(_0x345188){var _0x1a7475=_0x59e167[_0x0fcf('0x45')][_0x0fcf('0x21')]({'plain':!![]});if(!_0x1a7475)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1a7475['role']===_0x0fcf('0x45')){var _0x243699=_0x345188[_0x0fcf('0x21')]({'plain':!![]});var _0x486d01=_0x0fcf('0x46');return db[_0x0fcf('0x47')]['find']({'where':{'name':_0x486d01,'userProfileId':_0x1a7475[_0x0fcf('0x48')]},'raw':!![]})[_0x0fcf('0x1f')](function(_0x491453){if(_0x491453&&_0x491453[_0x0fcf('0x49')]===0x0){return db[_0x0fcf('0x22')][_0x0fcf('0x43')]({'name':_0x243699[_0x0fcf('0x25')],'resourceId':_0x243699['id'],'type':_0x491453['name'],'sectionId':_0x491453['id']},{})[_0x0fcf('0x1f')](function(){return _0x345188;});}else{return _0x345188;}})[_0x0fcf('0x42')](function(_0x1bb062){logger[_0x0fcf('0x23')](_0x0fcf('0x4a'),_0x1bb062);throw _0x1bb062;});}return _0x345188;})[_0x0fcf('0x1f')](respondWithResult(_0x592bb4,0xc9))[_0x0fcf('0x42')](handleError(_0x592bb4,null));};exports[_0x0fcf('0x4b')]=function(_0x389d71,_0x3a473c){if(_0x389d71[_0x0fcf('0x44')]['id']){delete _0x389d71[_0x0fcf('0x44')]['id'];}return db[_0x0fcf('0x3a')][_0x0fcf('0x4c')]({'where':{'id':_0x389d71['params']['id']}})[_0x0fcf('0x1f')](handleEntityNotFound(_0x3a473c,null))['then'](saveUpdates(_0x389d71[_0x0fcf('0x44')],null))[_0x0fcf('0x1f')](respondWithResult(_0x3a473c,null))[_0x0fcf('0x42')](handleError(_0x3a473c,null));};exports[_0x0fcf('0x20')]=function(_0x27b8ae,_0x5d2576){return db[_0x0fcf('0x3a')]['find']({'where':{'id':_0x27b8ae[_0x0fcf('0x4d')]['id']}})[_0x0fcf('0x1f')](handleEntityNotFound(_0x5d2576,null))['then'](removeEntity(_0x5d2576,null))[_0x0fcf('0x42')](handleError(_0x5d2576,null));};
\ No newline at end of file
+var _0x5d17=['keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','type','key','VIRTUAL','field','options','Tag','includeAll','include','findAll','rows','catch','show','params','merge','find','create','body','user','role','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','eml-format','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','end','count','offset','limit','set','Content-Range','json','apply','save','update','then','destroy','get','Tags','UserProfileResource','sendStatus','name','send','index','rawAttributes','model'];(function(_0x606dba,_0x486093){var _0x25bffe=function(_0x50e8ad){while(--_0x50e8ad){_0x606dba['push'](_0x606dba['shift']());}};_0x25bffe(++_0x486093);}(_0x5d17,0x114));var _0x75d1=function(_0x332109,_0x474add){_0x332109=_0x332109-0x0;var _0x7a6ab2=_0x5d17[_0x332109];return _0x7a6ab2;};'use strict';var pdf=require(_0x75d1('0x0'));var emlformat=require(_0x75d1('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x75d1('0x2'));var rp=require(_0x75d1('0x3'));var moment=require(_0x75d1('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x75d1('0x5'));var util=require(_0x75d1('0x6'));var path=require(_0x75d1('0x7'));var sox=require(_0x75d1('0x8'));var csv=require('to-csv');var ejs=require(_0x75d1('0x9'));var fs=require('fs');var _=require(_0x75d1('0xa'));var squel=require(_0x75d1('0xb'));var crypto=require(_0x75d1('0xc'));var jsforce=require(_0x75d1('0xd'));var deskjs=require(_0x75d1('0xe'));var toCsv=require(_0x75d1('0xf'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x75d1('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x75d1('0x11'));var logger=require(_0x75d1('0x12'))('api');var utils=require(_0x75d1('0x13'));var config=require(_0x75d1('0x14'));var db=require(_0x75d1('0x15'))['db'];function respondWithStatusCode(_0xe07f4a,_0x6c1265){_0x6c1265=_0x6c1265||0xcc;return function(_0xd089cf){if(_0xd089cf){return _0xe07f4a['sendStatus'](_0x6c1265);}return _0xe07f4a[_0x75d1('0x16')](_0x6c1265)[_0x75d1('0x17')]();};}function respondWithResult(_0x3af408,_0x314a71){_0x314a71=_0x314a71||0xc8;return function(_0x49d723){if(_0x49d723){return _0x3af408['status'](_0x314a71)['json'](_0x49d723);}};}function respondWithFilteredResult(_0x24ba98,_0x12fa32){return function(_0x2fd022){if(_0x2fd022){var _0x52e649=_0x2fd022[_0x75d1('0x18')],_0x1f9620=_0x12fa32[_0x75d1('0x19')],_0x3fff9b=_0x12fa32[_0x75d1('0x19')]+_0x12fa32[_0x75d1('0x1a')],_0x1d30f3;if(_0x3fff9b>=_0x52e649){_0x3fff9b=_0x52e649;_0x1d30f3=0xc8;}else{_0x1d30f3=0xce;}_0x24ba98[_0x75d1('0x16')](_0x1d30f3);return _0x24ba98[_0x75d1('0x1b')](_0x75d1('0x1c'),_0x1f9620+'-'+_0x3fff9b+'/'+_0x52e649)[_0x75d1('0x1d')](_0x2fd022);}return null;};}function patchUpdates(_0x5761db){return function(_0x493fff){try{jsonpatch[_0x75d1('0x1e')](_0x493fff,_0x5761db,!![]);}catch(_0x42b7ac){return BPromise['reject'](_0x42b7ac);}return _0x493fff[_0x75d1('0x1f')]();};}function saveUpdates(_0x406143,_0x579731){return function(_0xf6cc70){if(_0xf6cc70){return _0xf6cc70[_0x75d1('0x20')](_0x406143)[_0x75d1('0x21')](function(_0x51d3b0){return _0x51d3b0;});}return null;};}function removeEntity(_0x1d9d25,_0x522924){return function(_0x501cc7){if(_0x501cc7){return _0x501cc7[_0x75d1('0x22')]()[_0x75d1('0x21')](function(){var _0x526f6c=_0x501cc7[_0x75d1('0x23')]({'plain':!![]});var _0x5e70ec=_0x75d1('0x24');return db[_0x75d1('0x25')][_0x75d1('0x22')]({'where':{'type':_0x5e70ec,'resourceId':_0x526f6c['id']}})['then'](function(){return _0x501cc7;});})['then'](function(){_0x1d9d25[_0x75d1('0x16')](0xcc)[_0x75d1('0x17')]();});}};}function handleEntityNotFound(_0x315ce5,_0x18184b){return function(_0x51d043){if(!_0x51d043){_0x315ce5[_0x75d1('0x26')](0x194);}return _0x51d043;};}function handleError(_0x2b5848,_0x367238){_0x367238=_0x367238||0x1f4;return function(_0x51138e){logger['error'](_0x51138e['stack']);if(_0x51138e[_0x75d1('0x27')]){delete _0x51138e[_0x75d1('0x27')];}_0x2b5848[_0x75d1('0x16')](_0x367238)[_0x75d1('0x28')](_0x51138e);};}exports[_0x75d1('0x29')]=function(_0x519ceb,_0x4d292e){var _0x410e16={},_0x197f52={},_0x4967b5={'count':0x0,'rows':[]};var _0x2408b6=db['Tag'][_0x75d1('0x2a')];_0x197f52[_0x75d1('0x2b')]=_[_0x75d1('0x2c')](_0x2408b6);_0x197f52[_0x75d1('0x2d')]=_[_0x75d1('0x2c')](_0x519ceb['query']);_0x197f52[_0x75d1('0x2e')]=_[_0x75d1('0x2f')](_0x197f52[_0x75d1('0x2b')],_0x197f52[_0x75d1('0x2d')]);_0x410e16['attributes']=_[_0x75d1('0x2f')](_0x197f52['model'],qs[_0x75d1('0x30')](_0x519ceb[_0x75d1('0x2d')]['fields']));_0x410e16[_0x75d1('0x31')]=_0x410e16[_0x75d1('0x31')][_0x75d1('0x32')]?_0x410e16[_0x75d1('0x31')]:_0x197f52[_0x75d1('0x2b')];if(!_0x519ceb['query'][_0x75d1('0x33')](_0x75d1('0x34'))){_0x410e16[_0x75d1('0x1a')]=qs[_0x75d1('0x1a')](_0x519ceb['query']['limit']);_0x410e16['offset']=qs[_0x75d1('0x19')](_0x519ceb[_0x75d1('0x2d')][_0x75d1('0x19')]);}_0x410e16[_0x75d1('0x35')]=qs[_0x75d1('0x36')](_0x519ceb[_0x75d1('0x2d')][_0x75d1('0x36')]);_0x410e16[_0x75d1('0x37')]=qs[_0x75d1('0x2e')](_['pick'](_0x519ceb[_0x75d1('0x2d')],_0x197f52[_0x75d1('0x2e')]));if(_0x519ceb[_0x75d1('0x2d')][_0x75d1('0x38')]){_0x410e16[_0x75d1('0x37')]=_['merge'](_0x410e16['where'],{'$or':_['map'](_0x2408b6,function(_0x1058b7){if(_0x1058b7[_0x75d1('0x39')][_0x75d1('0x3a')]!==_0x75d1('0x3b')){var _0x460b92={};_0x460b92[_0x1058b7[_0x75d1('0x3c')]]={'$like':'%'+_0x519ceb['query']['filter']+'%'};return _0x460b92;}})});}_0x410e16=_['merge']({},_0x410e16,_0x519ceb[_0x75d1('0x3d')]);var _0x4cb084={'where':_0x410e16['where']};return db[_0x75d1('0x3e')][_0x75d1('0x18')](_0x4cb084)[_0x75d1('0x21')](function(_0x46854c){_0x4967b5['count']=_0x46854c;if(_0x519ceb[_0x75d1('0x2d')][_0x75d1('0x3f')]){_0x410e16[_0x75d1('0x40')]=[{'all':!![]}];}return db[_0x75d1('0x3e')][_0x75d1('0x41')](_0x410e16);})[_0x75d1('0x21')](function(_0x33df05){_0x4967b5[_0x75d1('0x42')]=_0x33df05;return _0x4967b5;})[_0x75d1('0x21')](respondWithFilteredResult(_0x4d292e,_0x410e16))[_0x75d1('0x43')](handleError(_0x4d292e,null));};exports[_0x75d1('0x44')]=function(_0x93922f,_0xe14be9){var _0x577e6e={'raw':!![],'where':{'id':_0x93922f[_0x75d1('0x45')]['id']}},_0x16550e={};_0x16550e[_0x75d1('0x2b')]=_[_0x75d1('0x2c')](db[_0x75d1('0x3e')][_0x75d1('0x2a')]);_0x16550e[_0x75d1('0x2d')]=_[_0x75d1('0x2c')](_0x93922f['query']);_0x16550e['filters']=_[_0x75d1('0x2f')](_0x16550e[_0x75d1('0x2b')],_0x16550e[_0x75d1('0x2d')]);_0x577e6e[_0x75d1('0x31')]=_['intersection'](_0x16550e[_0x75d1('0x2b')],qs[_0x75d1('0x30')](_0x93922f[_0x75d1('0x2d')][_0x75d1('0x30')]));_0x577e6e['attributes']=_0x577e6e[_0x75d1('0x31')][_0x75d1('0x32')]?_0x577e6e[_0x75d1('0x31')]:_0x16550e[_0x75d1('0x2b')];if(_0x93922f['query'][_0x75d1('0x3f')]){_0x577e6e['include']=[{'all':!![]}];}_0x577e6e=_[_0x75d1('0x46')]({},_0x577e6e,_0x93922f[_0x75d1('0x3d')]);return db[_0x75d1('0x3e')][_0x75d1('0x47')](_0x577e6e)[_0x75d1('0x21')](handleEntityNotFound(_0xe14be9,null))[_0x75d1('0x21')](respondWithResult(_0xe14be9,null))['catch'](handleError(_0xe14be9,null));};exports[_0x75d1('0x48')]=function(_0x589ad8,_0x5b7663){return db[_0x75d1('0x3e')][_0x75d1('0x48')](_0x589ad8[_0x75d1('0x49')],{})[_0x75d1('0x21')](function(_0x16f744){var _0x15567a=_0x589ad8[_0x75d1('0x4a')]['get']({'plain':!![]});if(!_0x15567a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x15567a[_0x75d1('0x4b')]===_0x75d1('0x4a')){var _0x50def3=_0x16f744[_0x75d1('0x23')]({'plain':!![]});var _0x2fa44a=_0x75d1('0x24');return db['UserProfileSection'][_0x75d1('0x47')]({'where':{'name':_0x2fa44a,'userProfileId':_0x15567a[_0x75d1('0x4c')]},'raw':!![]})[_0x75d1('0x21')](function(_0x3be4b5){if(_0x3be4b5&&_0x3be4b5[_0x75d1('0x4d')]===0x0){return db[_0x75d1('0x25')][_0x75d1('0x48')]({'name':_0x50def3['name'],'resourceId':_0x50def3['id'],'type':_0x3be4b5[_0x75d1('0x27')],'sectionId':_0x3be4b5['id']},{})[_0x75d1('0x21')](function(){return _0x16f744;});}else{return _0x16f744;}})[_0x75d1('0x43')](function(_0x395e0b){logger[_0x75d1('0x4e')](_0x75d1('0x4f'),_0x395e0b);throw _0x395e0b;});}return _0x16f744;})[_0x75d1('0x21')](respondWithResult(_0x5b7663,0xc9))['catch'](handleError(_0x5b7663,null));};exports[_0x75d1('0x20')]=function(_0x3af9c5,_0x42d587){if(_0x3af9c5['body']['id']){delete _0x3af9c5[_0x75d1('0x49')]['id'];}return db[_0x75d1('0x3e')][_0x75d1('0x47')]({'where':{'id':_0x3af9c5[_0x75d1('0x45')]['id']}})[_0x75d1('0x21')](handleEntityNotFound(_0x42d587,null))[_0x75d1('0x21')](saveUpdates(_0x3af9c5['body'],null))[_0x75d1('0x21')](respondWithResult(_0x42d587,null))[_0x75d1('0x43')](handleError(_0x42d587,null));};exports[_0x75d1('0x22')]=function(_0x46e665,_0x2e746a){return db[_0x75d1('0x3e')][_0x75d1('0x47')]({'where':{'id':_0x46e665[_0x75d1('0x45')]['id']}})[_0x75d1('0x21')](handleEntityNotFound(_0x2e746a,null))[_0x75d1('0x21')](removeEntity(_0x2e746a,null))[_0x75d1('0x43')](handleError(_0x2e746a,null));};
\ No newline at end of file
diff --git a/server/api/tag/tag.model.js b/server/api/tag/tag.model.js
index 9d72ff6..85a2ea3 100644
--- a/server/api/tag/tag.model.js
+++ b/server/api/tag/tag.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x82a4=['moment','bluebird','path','rimraf','../../config/environment','exports','define','tools_tags','lodash','util','../../config/logger','api'];(function(_0x25701b,_0x2a6976){var _0x3a8a2c=function(_0x1a5e78){while(--_0x1a5e78){_0x25701b['push'](_0x25701b['shift']());}};_0x3a8a2c(++_0x2a6976);}(_0x82a4,0x98));var _0x482a=function(_0x344296,_0x420026){_0x344296=_0x344296-0x0;var _0x3ce79f=_0x82a4[_0x344296];return _0x3ce79f;};'use strict';var _=require(_0x482a('0x0'));var util=require(_0x482a('0x1'));var logger=require(_0x482a('0x2'))(_0x482a('0x3'));var moment=require(_0x482a('0x4'));var BPromise=require(_0x482a('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x482a('0x6'));var rimraf=require(_0x482a('0x7'));var config=require(_0x482a('0x8'));var attributes=require('./tag.attributes');module[_0x482a('0x9')]=function(_0x53c1b8,_0x3629ad){return _0x53c1b8[_0x482a('0xa')]('Tag',attributes,{'tableName':_0x482a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb5d3=['Tag','tools_tags','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./tag.attributes','define'];(function(_0x1f239e,_0x367b43){var _0x826971=function(_0x2c5777){while(--_0x2c5777){_0x1f239e['push'](_0x1f239e['shift']());}};_0x826971(++_0x367b43);}(_0xb5d3,0x188));var _0x3b5d=function(_0x4051be,_0x4e30dc){_0x4051be=_0x4051be-0x0;var _0x10d8e5=_0xb5d3[_0x4051be];return _0x10d8e5;};'use strict';var _=require(_0x3b5d('0x0'));var util=require(_0x3b5d('0x1'));var logger=require(_0x3b5d('0x2'))(_0x3b5d('0x3'));var moment=require('moment');var BPromise=require(_0x3b5d('0x4'));var rp=require(_0x3b5d('0x5'));var fs=require('fs');var path=require(_0x3b5d('0x6'));var rimraf=require(_0x3b5d('0x7'));var config=require(_0x3b5d('0x8'));var attributes=require(_0x3b5d('0x9'));module['exports']=function(_0x11131e,_0x8f8c34){return _0x11131e[_0x3b5d('0xa')](_0x3b5d('0xb'),attributes,{'tableName':_0x3b5d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/tag/tag.rpc.js b/server/api/tag/tag.rpc.js
index f6191c7..5610813 100644
--- a/server/api/tag/tag.rpc.js
+++ b/server/api/tag/tag.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x618d=['ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','request','then','Tag,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','util','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x618d,0x1a0));var _0xd618=function(_0x127a3c,_0xd22972){_0x127a3c=_0x127a3c-0x0;var _0x5a999b=_0x618d[_0x127a3c];return _0x5a999b;};'use strict';var _=require('lodash');var util=require(_0xd618('0x0'));var moment=require(_0xd618('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd618('0x2'));var db=require(_0xd618('0x3'))['db'];var utils=require(_0xd618('0x4'));var logger=require('../../config/logger')(_0xd618('0x5'));var config=require(_0xd618('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xd618('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x582c26,_0x997c50,_0x4bcc79){return new BPromise(function(_0x19791c,_0x387e5f){return client[_0xd618('0x8')](_0x582c26,_0x4bcc79)[_0xd618('0x9')](function(_0x3c1872){logger['info'](_0xd618('0xa'),_0x997c50,_0xd618('0xb'));logger[_0xd618('0xc')]('Tag,\x20%s,\x20%s,\x20%s',_0x997c50,'request\x20sent',JSON[_0xd618('0xd')](_0x3c1872));if(_0x3c1872[_0xd618('0xe')]){if(_0x3c1872[_0xd618('0xe')][_0xd618('0xf')]===0x1f4){logger['error']('Tag,\x20%s,\x20%s',_0x997c50,_0x3c1872[_0xd618('0xe')]['message']);return _0x387e5f(_0x3c1872[_0xd618('0xe')][_0xd618('0x10')]);}logger[_0xd618('0xe')](_0xd618('0xa'),_0x997c50,_0x3c1872[_0xd618('0xe')][_0xd618('0x10')]);return _0x19791c(_0x3c1872[_0xd618('0xe')][_0xd618('0x10')]);}else{logger['info']('Tag,\x20%s,\x20%s',_0x997c50,_0xd618('0xb'));_0x19791c(_0x3c1872[_0xd618('0x11')][_0xd618('0x10')]);}})[_0xd618('0x12')](function(_0x1c1827){logger['error'](_0xd618('0xa'),_0x997c50,_0x1c1827);_0x387e5f(_0x1c1827);});});}
\ No newline at end of file
+var _0xbc06=['request\x20sent','stringify','error','Tag,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','request','then','info','Tag,\x20%s,\x20%s,\x20%s'];(function(_0x5c701c,_0x1ecba4){var _0x345bf5=function(_0x323d0f){while(--_0x323d0f){_0x5c701c['push'](_0x5c701c['shift']());}};_0x345bf5(++_0x1ecba4);}(_0xbc06,0x197));var _0x6bc0=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xbc06[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x6bc0('0x0'));var util=require(_0x6bc0('0x1'));var moment=require(_0x6bc0('0x2'));var BPromise=require(_0x6bc0('0x3'));var rs=require(_0x6bc0('0x4'));var fs=require('fs');var Redis=require(_0x6bc0('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x6bc0('0x6'));var logger=require('../../config/logger')(_0x6bc0('0x7'));var config=require(_0x6bc0('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1b2270,_0x3bb3d8,_0x446d31){return new BPromise(function(_0x5a9663,_0x394cab){return client[_0x6bc0('0x9')](_0x1b2270,_0x446d31)[_0x6bc0('0xa')](function(_0x1fbb2c){logger[_0x6bc0('0xb')]('Tag,\x20%s,\x20%s',_0x3bb3d8,'request\x20sent');logger['debug'](_0x6bc0('0xc'),_0x3bb3d8,_0x6bc0('0xd'),JSON[_0x6bc0('0xe')](_0x1fbb2c));if(_0x1fbb2c[_0x6bc0('0xf')]){if(_0x1fbb2c[_0x6bc0('0xf')]['code']===0x1f4){logger['error'](_0x6bc0('0x10'),_0x3bb3d8,_0x1fbb2c[_0x6bc0('0xf')][_0x6bc0('0x11')]);return _0x394cab(_0x1fbb2c[_0x6bc0('0xf')][_0x6bc0('0x11')]);}logger[_0x6bc0('0xf')](_0x6bc0('0x10'),_0x3bb3d8,_0x1fbb2c['error']['message']);return _0x5a9663(_0x1fbb2c[_0x6bc0('0xf')][_0x6bc0('0x11')]);}else{logger[_0x6bc0('0xb')]('Tag,\x20%s,\x20%s',_0x3bb3d8,'request\x20sent');_0x5a9663(_0x1fbb2c[_0x6bc0('0x12')][_0x6bc0('0x11')]);}})[_0x6bc0('0x13')](function(_0x528852){logger['error']('Tag,\x20%s,\x20%s',_0x3bb3d8,_0x528852);_0x394cab(_0x528852);});});}
\ No newline at end of file
diff --git a/server/api/team/index.js b/server/api/team/index.js
index c36803b..506b835 100644
--- a/server/api/team/index.js
+++ b/server/api/team/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdf3d=['./team.controller','get','index','/:id','isAuthenticated','/:id/users','getAgents','post','create','/:id/queues','put','update','delete','destroy','removeQueues','exports','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x454017,_0x4c2948){var _0x22d946=function(_0x3b9da6){while(--_0x3b9da6){_0x454017['push'](_0x454017['shift']());}};_0x22d946(++_0x4c2948);}(_0xdf3d,0x170));var _0xddf3=function(_0x1ccbcc,_0x5c948b){_0x1ccbcc=_0x1ccbcc-0x0;var _0x1e873f=_0xdf3d[_0x1ccbcc];return _0x1e873f;};'use strict';var multer=require('multer');var util=require(_0xddf3('0x0'));var path=require(_0xddf3('0x1'));var timeout=require(_0xddf3('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xddf3('0x3'));var interaction=require(_0xddf3('0x4'));var config=require(_0xddf3('0x5'));var controller=require(_0xddf3('0x6'));router[_0xddf3('0x7')]('/',auth['isAuthenticated'](),controller[_0xddf3('0x8')]);router[_0xddf3('0x7')](_0xddf3('0x9'),auth[_0xddf3('0xa')](),controller['show']);router['get']('/:id/queues',auth['isAuthenticated'](),controller['getQueues']);router[_0xddf3('0x7')](_0xddf3('0xb'),auth['isAuthenticated'](),controller[_0xddf3('0xc')]);router[_0xddf3('0xd')]('/',auth['isAuthenticated'](),controller[_0xddf3('0xe')]);router[_0xddf3('0xd')](_0xddf3('0xf'),auth[_0xddf3('0xa')](),controller['addQueues']);router[_0xddf3('0xd')](_0xddf3('0xb'),auth[_0xddf3('0xa')](),controller['addAgents']);router[_0xddf3('0x10')]('/:id',auth[_0xddf3('0xa')](),controller[_0xddf3('0x11')]);router[_0xddf3('0x12')](_0xddf3('0x9'),auth[_0xddf3('0xa')](),controller[_0xddf3('0x13')]);router[_0xddf3('0x12')]('/:id/queues',auth[_0xddf3('0xa')](),controller[_0xddf3('0x14')]);router[_0xddf3('0x12')](_0xddf3('0xb'),auth['isAuthenticated'](),controller['removeAgents']);module[_0xddf3('0x15')]=router;
\ No newline at end of file
+var _0xcf53=['destroy','removeQueues','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','isAuthenticated','index','get','/:id','show','/:id/queues','getQueues','post','addQueues','/:id/users','addAgents','put','update','delete'];(function(_0x5e805e,_0x24be08){var _0x4df834=function(_0x449d35){while(--_0x449d35){_0x5e805e['push'](_0x5e805e['shift']());}};_0x4df834(++_0x24be08);}(_0xcf53,0x1e9));var _0x3cf5=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xcf53[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x3cf5('0x0'));var util=require(_0x3cf5('0x1'));var path=require(_0x3cf5('0x2'));var timeout=require(_0x3cf5('0x3'));var express=require(_0x3cf5('0x4'));var router=express[_0x3cf5('0x5')]();var auth=require(_0x3cf5('0x6'));var interaction=require(_0x3cf5('0x7'));var config=require(_0x3cf5('0x8'));var controller=require(_0x3cf5('0x9'));router['get']('/',auth[_0x3cf5('0xa')](),controller[_0x3cf5('0xb')]);router[_0x3cf5('0xc')](_0x3cf5('0xd'),auth[_0x3cf5('0xa')](),controller[_0x3cf5('0xe')]);router[_0x3cf5('0xc')](_0x3cf5('0xf'),auth[_0x3cf5('0xa')](),controller[_0x3cf5('0x10')]);router['get']('/:id/users',auth[_0x3cf5('0xa')](),controller['getAgents']);router[_0x3cf5('0x11')]('/',auth[_0x3cf5('0xa')](),controller['create']);router[_0x3cf5('0x11')](_0x3cf5('0xf'),auth[_0x3cf5('0xa')](),controller[_0x3cf5('0x12')]);router['post'](_0x3cf5('0x13'),auth['isAuthenticated'](),controller[_0x3cf5('0x14')]);router[_0x3cf5('0x15')]('/:id',auth['isAuthenticated'](),controller[_0x3cf5('0x16')]);router[_0x3cf5('0x17')](_0x3cf5('0xd'),auth[_0x3cf5('0xa')](),controller[_0x3cf5('0x18')]);router['delete'](_0x3cf5('0xf'),auth[_0x3cf5('0xa')](),controller[_0x3cf5('0x19')]);router['delete']('/:id/users',auth[_0x3cf5('0xa')](),controller['removeAgents']);module[_0x3cf5('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/team/team.attributes.js b/server/api/team/team.attributes.js
index 11f6016..172c0da 100644
--- a/server/api/team/team.attributes.js
+++ b/server/api/team/team.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcda6=['STRING'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0xcda6,0x170));var _0x6cda=function(_0x5c4d85,_0x462eb7){_0x5c4d85=_0x5c4d85-0x0;var _0x532c16=_0xcda6[_0x5c4d85];return _0x532c16;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x6cda('0x0')],'allowNull':![],'unique':'name'},'description':{'type':Sequelize[_0x6cda('0x0')]}};
\ No newline at end of file
+var _0x474b=['STRING','exports','name'];(function(_0x1fd675,_0x165dfe){var _0x16b554=function(_0x5761ff){while(--_0x5761ff){_0x1fd675['push'](_0x1fd675['shift']());}};_0x16b554(++_0x165dfe);}(_0x474b,0xbb));var _0xb474=function(_0x5cc926,_0x1ebdde){_0x5cc926=_0x5cc926-0x0;var _0x5db40a=_0x474b[_0x5cc926];return _0x5db40a;};'use strict';var Sequelize=require('sequelize');module[_0xb474('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xb474('0x1')},'description':{'type':Sequelize[_0xb474('0x2')]}};
\ No newline at end of file
diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js
index b524d8e..0dfc961 100644
--- a/server/api/team/team.controller.js
+++ b/server/api/team/team.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['addQueues','findOne','add','ids','removeQueues','remove','Voice','Chat','Mail','Sms','Fax','Openchannel','each','addAgents','User','findAll','online','voicePause','UserVoiceQueueRt','upsert','isNil','interface','format','omit','spread','userTeam:save','voice','chat','mail','sms','openchannel','removeAgents','isArray','emit','userTeam:remove','getAgents','nolimit','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','get','error','stack','name','index','Team','rawAttributes','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','filters','filter','merge','where','map','type','key','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Teams','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getQueues','isValidChannel','channel','Sequelize','ValidationError','Unknown\x20channel','capitalize','toLowerCase','Queue','pick','Queues'];(function(_0x45afc4,_0xeaa0e3){var _0x43e32b=function(_0x4fa1b0){while(--_0x4fa1b0){_0x45afc4['push'](_0x45afc4['shift']());}};_0x43e32b(++_0xeaa0e3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0xa9e0[_0x187ee1];return _0x388160;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x0a9e('0x13')]=_[_0x0a9e('0x14')](config[_0x0a9e('0x13')],{'host':_0x0a9e('0x15'),'port':0x18eb});var socket=require(_0x0a9e('0x16'))(new Redis(config[_0x0a9e('0x13')]));require('./team.socket')[_0x0a9e('0x17')](socket);function respondWithStatusCode(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xcc;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x18')](_0x2b4227);}return _0x239b12[_0x0a9e('0x19')](_0x2b4227)['end']();};}function respondWithResult(_0x22dccb,_0x5d0880){_0x5d0880=_0x5d0880||0xc8;return function(_0x1985b6){if(_0x1985b6){return _0x22dccb['status'](_0x5d0880)[_0x0a9e('0x1a')](_0x1985b6);}};}function respondWithFilteredResult(_0x12066b,_0x48f32d){return function(_0x225616){if(_0x225616){var _0x5a0a06=_0x225616[_0x0a9e('0x1b')],_0x459eb1=_0x48f32d[_0x0a9e('0x1c')],_0x478723=_0x48f32d[_0x0a9e('0x1c')]+_0x48f32d[_0x0a9e('0x1d')],_0x106033;if(_0x478723>=_0x5a0a06){_0x478723=_0x5a0a06;_0x106033=0xc8;}else{_0x106033=0xce;}_0x12066b[_0x0a9e('0x19')](_0x106033);return _0x12066b[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x459eb1+'-'+_0x478723+'/'+_0x5a0a06)[_0x0a9e('0x1a')](_0x225616);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x20')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x21')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x22')](_0x5a09ef)[_0x0a9e('0x23')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x24')]()[_0x0a9e('0x23')](function(){var _0x370d86=_0x2fb0e4[_0x0a9e('0x25')]({'plain':!![]});var _0x16b1ca='Teams';return db['UserProfileResource'][_0x0a9e('0x24')]({'where':{'type':_0x16b1ca,'resourceId':_0x370d86['id']}})[_0x0a9e('0x23')](function(){return _0x2fb0e4;});})[_0x0a9e('0x23')](function(){_0x4abc77[_0x0a9e('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x384319,_0x479bc4){return function(_0x45a1e7){if(!_0x45a1e7){_0x384319['sendStatus'](0x194);}return _0x45a1e7;};}function handleError(_0x1dc186,_0x34dc65){_0x34dc65=_0x34dc65||0x1f4;return function(_0x25fba9){logger[_0x0a9e('0x26')](_0x25fba9[_0x0a9e('0x27')]);if(_0x25fba9[_0x0a9e('0x28')]){delete _0x25fba9[_0x0a9e('0x28')];}_0x1dc186[_0x0a9e('0x19')](_0x34dc65)['send'](_0x25fba9);};}exports[_0x0a9e('0x29')]=function(_0x468813,_0x2b1f27){var _0x2ec755={},_0x5c877d={},_0x15b200={'count':0x0,'rows':[]};var _0x40e7a3=db[_0x0a9e('0x2a')][_0x0a9e('0x2b')];_0x5c877d[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x40e7a3);_0x5c877d[_0x0a9e('0x2e')]=_[_0x0a9e('0x2d')](_0x468813[_0x0a9e('0x2e')]);_0x5c877d['filters']=_[_0x0a9e('0x2f')](_0x5c877d['model'],_0x5c877d[_0x0a9e('0x2e')]);_0x2ec755[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x5c877d[_0x0a9e('0x2c')],qs[_0x0a9e('0x31')](_0x468813['query'][_0x0a9e('0x31')]));_0x2ec755[_0x0a9e('0x30')]=_0x2ec755[_0x0a9e('0x30')][_0x0a9e('0x32')]?_0x2ec755[_0x0a9e('0x30')]:_0x5c877d[_0x0a9e('0x2c')];if(!_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x33')]('nolimit')){_0x2ec755[_0x0a9e('0x1d')]=qs['limit'](_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x1d')]);_0x2ec755[_0x0a9e('0x1c')]=qs[_0x0a9e('0x1c')](_0x468813['query'][_0x0a9e('0x1c')]);}_0x2ec755[_0x0a9e('0x34')]=qs[_0x0a9e('0x35')](_0x468813[_0x0a9e('0x2e')]['sort']);_0x2ec755['where']=qs[_0x0a9e('0x36')](_['pick'](_0x468813[_0x0a9e('0x2e')],_0x5c877d[_0x0a9e('0x36')]));if(_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x37')]){_0x2ec755['where']=_[_0x0a9e('0x38')](_0x2ec755[_0x0a9e('0x39')],{'$or':_[_0x0a9e('0x3a')](_0x40e7a3,function(_0x533942){if(_0x533942[_0x0a9e('0x3b')][_0x0a9e('0x3c')]!==_0x0a9e('0x3d')){var _0x4c1c0e={};_0x4c1c0e[_0x533942['field']]={'$like':'%'+_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x37')]+'%'};return _0x4c1c0e;}})});}_0x2ec755=_['merge']({},_0x2ec755,_0x468813[_0x0a9e('0x3e')]);var _0x419125={'where':_0x2ec755[_0x0a9e('0x39')]};return db[_0x0a9e('0x2a')]['count'](_0x419125)['then'](function(_0x15e37d){_0x15b200[_0x0a9e('0x1b')]=_0x15e37d;if(_0x468813['query'][_0x0a9e('0x3f')]){_0x2ec755[_0x0a9e('0x40')]=[{'all':!![]}];}return db[_0x0a9e('0x2a')]['findAll'](_0x2ec755);})[_0x0a9e('0x23')](function(_0x2cfea9){_0x15b200[_0x0a9e('0x41')]=_0x2cfea9;return _0x15b200;})[_0x0a9e('0x23')](respondWithFilteredResult(_0x2b1f27,_0x2ec755))[_0x0a9e('0x42')](handleError(_0x2b1f27,null));};exports[_0x0a9e('0x43')]=function(_0x2881b3,_0x45a9b8){var _0x23b089={'raw':![],'where':{'id':_0x2881b3[_0x0a9e('0x44')]['id']}},_0x3da2cd={};_0x3da2cd[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](db[_0x0a9e('0x2a')][_0x0a9e('0x2b')]);_0x3da2cd['query']=_['keys'](_0x2881b3[_0x0a9e('0x2e')]);_0x3da2cd[_0x0a9e('0x36')]=_[_0x0a9e('0x2f')](_0x3da2cd[_0x0a9e('0x2c')],_0x3da2cd[_0x0a9e('0x2e')]);_0x23b089[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x3da2cd[_0x0a9e('0x2c')],qs[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2e')][_0x0a9e('0x31')]));_0x23b089[_0x0a9e('0x30')]=_0x23b089['attributes'][_0x0a9e('0x32')]?_0x23b089[_0x0a9e('0x30')]:_0x3da2cd[_0x0a9e('0x2c')];if(_0x2881b3[_0x0a9e('0x2e')][_0x0a9e('0x3f')]){_0x23b089[_0x0a9e('0x40')]=[{'all':!![]}];}_0x23b089=_[_0x0a9e('0x38')]({},_0x23b089,_0x2881b3[_0x0a9e('0x3e')]);return db['Team'][_0x0a9e('0x45')](_0x23b089)['then'](handleEntityNotFound(_0x45a9b8,null))[_0x0a9e('0x23')](respondWithResult(_0x45a9b8,null))[_0x0a9e('0x42')](handleError(_0x45a9b8,null));};exports[_0x0a9e('0x46')]=function(_0x562fb4,_0x14bec2){return db[_0x0a9e('0x2a')][_0x0a9e('0x46')](_0x562fb4[_0x0a9e('0x47')],{})[_0x0a9e('0x23')](function(_0x37be73){var _0x45bf7f=_0x562fb4['user'][_0x0a9e('0x25')]({'plain':!![]});if(!_0x45bf7f)throw new Error(_0x0a9e('0x48'));if(_0x45bf7f[_0x0a9e('0x49')]===_0x0a9e('0x4a')){var _0x409789=_0x37be73[_0x0a9e('0x25')]({'plain':!![]});var _0x6054ee=_0x0a9e('0x4b');return db[_0x0a9e('0x4c')]['find']({'where':{'name':_0x6054ee,'userProfileId':_0x45bf7f[_0x0a9e('0x4d')]},'raw':!![]})[_0x0a9e('0x23')](function(_0x4f7240){if(_0x4f7240&&_0x4f7240['autoAssociation']===0x0){return db['UserProfileResource'][_0x0a9e('0x46')]({'name':_0x409789[_0x0a9e('0x28')],'resourceId':_0x409789['id'],'type':_0x4f7240[_0x0a9e('0x28')],'sectionId':_0x4f7240['id']},{})[_0x0a9e('0x23')](function(){return _0x37be73;});}else{return _0x37be73;}})[_0x0a9e('0x42')](function(_0x30decb){logger[_0x0a9e('0x26')](_0x0a9e('0x4e'),_0x30decb);throw _0x30decb;});}return _0x37be73;})['then'](respondWithResult(_0x14bec2,0xc9))['catch'](handleError(_0x14bec2,null));};exports['update']=function(_0x39d77d,_0x204173){if(_0x39d77d[_0x0a9e('0x47')]['id']){delete _0x39d77d['body']['id'];}return db[_0x0a9e('0x2a')][_0x0a9e('0x45')]({'where':{'id':_0x39d77d['params']['id']}})['then'](handleEntityNotFound(_0x204173,null))[_0x0a9e('0x23')](saveUpdates(_0x39d77d['body'],null))[_0x0a9e('0x23')](respondWithResult(_0x204173,null))['catch'](handleError(_0x204173,null));};exports[_0x0a9e('0x24')]=function(_0x3c20b2,_0x439340){return db['Team'][_0x0a9e('0x45')]({'where':{'id':_0x3c20b2[_0x0a9e('0x44')]['id']}})['then'](handleEntityNotFound(_0x439340,null))['then'](removeEntity(_0x439340,null))[_0x0a9e('0x42')](handleError(_0x439340,null));};exports[_0x0a9e('0x4f')]=function(_0x49c095,_0x145931,_0x5ce9ac){return db[_0x0a9e('0x2a')]['findOne']({'where':{'id':_0x49c095[_0x0a9e('0x44')]['id']}})['then'](handleEntityNotFound(_0x145931,null))['then'](function(_0x5df0ad){if(!_0x49c095[_0x0a9e('0x2e')]['channel']||!utils[_0x0a9e('0x50')](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x51')])){throw new db[(_0x0a9e('0x52'))][(_0x0a9e('0x53'))](_0x0a9e('0x54'));}var _0xd10662={};var _0x28d814={};_0x28d814['model']=_[_0x0a9e('0x2d')](db[_[_0x0a9e('0x55')](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x51')][_0x0a9e('0x56')]())+_0x0a9e('0x57')]['rawAttributes']);_0x28d814[_0x0a9e('0x2e')]=_[_0x0a9e('0x2d')](_0x49c095['query']);_0x28d814[_0x0a9e('0x36')]=_['intersection'](_0x28d814[_0x0a9e('0x2c')],_0x28d814['query']);_0xd10662['attributes']=_['intersection'](_0x28d814[_0x0a9e('0x2c')],qs['fields'](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x31')]));_0xd10662[_0x0a9e('0x30')]=_0xd10662[_0x0a9e('0x30')][_0x0a9e('0x32')]?_0xd10662[_0x0a9e('0x30')]:_0x28d814['model'];_0xd10662[_0x0a9e('0x1d')]=qs['limit'](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x1d')]);_0xd10662[_0x0a9e('0x1c')]=qs['offset'](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x1c')]);_0xd10662[_0x0a9e('0x34')]=qs[_0x0a9e('0x35')](_0x49c095['query'][_0x0a9e('0x35')]);_0xd10662[_0x0a9e('0x39')]=qs['filters'](_[_0x0a9e('0x58')](_0x49c095[_0x0a9e('0x2e')],_0x28d814[_0x0a9e('0x36')]));_0xd10662=_[_0x0a9e('0x38')]({},_0xd10662,_0x49c095[_0x0a9e('0x3e')]);return _0x5df0ad['get'+_[_0x0a9e('0x55')](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x51')]['toLowerCase']())+_0x0a9e('0x59')](_0xd10662);})['then'](respondWithResult(_0x145931,null))['catch'](handleError(_0x145931,null));};exports[_0x0a9e('0x5a')]=function(_0x4556c5,_0x9375fb,_0x19c995){return db[_0x0a9e('0x2a')][_0x0a9e('0x5b')]({'where':{'id':_0x4556c5[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](function(_0x2d7205){if(_0x2d7205){if(!_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x51')]||!utils[_0x0a9e('0x50')](_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x51')])){throw new db[(_0x0a9e('0x52'))][(_0x0a9e('0x53'))](_0x0a9e('0x54'));}return _0x2d7205[_0x0a9e('0x5c')+_['capitalize'](_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x51')][_0x0a9e('0x56')]())+'Queues'](_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x5d')]);}return null;})['then'](handleEntityNotFound(_0x9375fb,null))[_0x0a9e('0x23')](respondWithStatusCode(_0x9375fb,null))[_0x0a9e('0x42')](handleError(_0x9375fb,null));};exports[_0x0a9e('0x5e')]=function(_0x427946,_0x13b5c0,_0x4a43a8){return db['Team']['findOne']({'where':{'id':_0x427946[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](function(_0x1104ad){if(_0x1104ad){if(!_0x427946[_0x0a9e('0x2e')][_0x0a9e('0x51')]||!utils[_0x0a9e('0x50')](_0x427946[_0x0a9e('0x2e')][_0x0a9e('0x51')])){throw new db['Sequelize'][(_0x0a9e('0x53'))](_0x0a9e('0x54'));}return _0x1104ad[_0x0a9e('0x5f')+_['capitalize'](_0x427946[_0x0a9e('0x2e')]['channel'][_0x0a9e('0x56')]())+_0x0a9e('0x59')](_0x427946['query'][_0x0a9e('0x5d')]);}return null;})[_0x0a9e('0x23')](handleEntityNotFound(_0x13b5c0,null))[_0x0a9e('0x23')](respondWithStatusCode(_0x13b5c0,null))[_0x0a9e('0x42')](handleError(_0x13b5c0,null));};exports['addAgents']=function(_0x1d442c,_0x2e9552,_0x371533){return db[_0x0a9e('0x2a')]['find']({'where':{'id':_0x1d442c[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x2e9552,null))[_0x0a9e('0x23')](function(_0x361b21){if(_0x361b21){var _0x4abc8f=[_0x0a9e('0x60'),_0x0a9e('0x61'),_0x0a9e('0x62'),_0x0a9e('0x63'),_0x0a9e('0x64'),_0x0a9e('0x65')];return BPromise[_0x0a9e('0x66')](_0x4abc8f,function(_0x3df0e3){return _0x361b21[_0x0a9e('0x25')+_0x3df0e3+_0x0a9e('0x59')]({'attributes':['id',_0x0a9e('0x28')]})[_0x0a9e('0x23')](function(_0x25744a){return BPromise[_0x0a9e('0x66')](_0x25744a,function(_0x5b35db){return _0x5b35db[_0x0a9e('0x67')](_0x1d442c[_0x0a9e('0x47')][_0x0a9e('0x5d')])['then'](function(){if(_0x3df0e3===_0x0a9e('0x60')){return db[_0x0a9e('0x68')][_0x0a9e('0x69')]({'where':{'id':_0x1d442c[_0x0a9e('0x47')]['ids']},'attributes':['id','name',_0x0a9e('0x6a'),_0x0a9e('0x6b'),'interface'],'raw':!![]})[_0x0a9e('0x23')](function(_0x53a6a1){return BPromise[_0x0a9e('0x66')](_[_0x0a9e('0x37')](_0x53a6a1,{'online':0x1}),function(_0x5637a1){return db[_0x0a9e('0x6c')][_0x0a9e('0x6d')]({'membername':_0x5637a1[_0x0a9e('0x28')],'UserId':_0x5637a1['id'],'queue_name':_0x5b35db[_0x0a9e('0x28')],'VoiceQueueId':_0x5b35db['id'],'interface':_[_0x0a9e('0x6e')](_0x5637a1[_0x0a9e('0x6f')])?util[_0x0a9e('0x70')]('SIP/%s',_0x5637a1[_0x0a9e('0x28')]):_0x5637a1[_0x0a9e('0x6f')],'paused':_0x5637a1[_0x0a9e('0x6b')]||![],'penalty':0x0});});});}});});})[_0x0a9e('0x23')](function(){return _0x361b21;});})['then'](function(){return _0x361b21;});}})[_0x0a9e('0x23')](function(_0xf0db1){if(_0xf0db1){return _0xf0db1['addAgents'](_0x1d442c[_0x0a9e('0x47')]['ids'],_[_0x0a9e('0x71')](_0x1d442c[_0x0a9e('0x47')],[_0x0a9e('0x5d'),'id'])||{})[_0x0a9e('0x72')](function(_0x5af453){for(var _0x51ccd7=0x0;_0x51ccd7<_0x1d442c[_0x0a9e('0x47')][_0x0a9e('0x5d')][_0x0a9e('0x32')];_0x51ccd7+=0x1){socket['emit'](_0x0a9e('0x73'),{'UserId':_0x1d442c[_0x0a9e('0x47')]['ids'][_0x51ccd7],'TeamId':_0x1d442c['params']['id']});}return _0x5af453;});}})[_0x0a9e('0x23')](respondWithResult(_0x2e9552,null))['catch'](handleError(_0x2e9552,null));};exports['removeAgents']=function(_0x4dc6b3,_0x81d748,_0xf3601c){return db[_0x0a9e('0x2a')][_0x0a9e('0x45')]({'where':{'id':_0x4dc6b3[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x81d748,null))['then'](function(_0x5fd5db){if(_0x5fd5db){return BPromise['each']([_0x0a9e('0x74'),_0x0a9e('0x75'),_0x0a9e('0x76'),_0x0a9e('0x77'),'fax',_0x0a9e('0x78')],function(_0x32f761){return _0x5fd5db[_0x0a9e('0x25')+_['capitalize'](_0x32f761)+_0x0a9e('0x59')]({'attributes':['id',_0x0a9e('0x28')]})[_0x0a9e('0x23')](function(_0x22063c){return BPromise[_0x0a9e('0x66')](_0x22063c,function(_0x1910bf){return _0x1910bf[_0x0a9e('0x79')](_0x4dc6b3[_0x0a9e('0x2e')]['ids'])[_0x0a9e('0x23')](function(){if(_0x32f761===_0x0a9e('0x74')){return db['UserVoiceQueueRt'][_0x0a9e('0x24')]({'where':{'VoiceQueueId':_0x1910bf['id'],'UserId':_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')]}});}});});})['then'](function(){return _0x5fd5db;});})[_0x0a9e('0x23')](function(){return _0x5fd5db;});}})['then'](function(_0x8c8fbe){if(_0x8c8fbe){return _0x8c8fbe[_0x0a9e('0x79')](_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')])[_0x0a9e('0x23')](function(){if(_[_0x0a9e('0x7a')](_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')])){for(var _0x501050=0x0;_0x501050<_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')][_0x0a9e('0x32')];_0x501050+=0x1){socket[_0x0a9e('0x7b')](_0x0a9e('0x7c'),{'UserId':Number(_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')][_0x501050]),'TeamId':Number(_0x4dc6b3[_0x0a9e('0x44')]['id'])});}}else{socket[_0x0a9e('0x7b')](_0x0a9e('0x7c'),{'UserId':Number(_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')]),'TeamId':Number(_0x4dc6b3[_0x0a9e('0x44')]['id'])});}});}})['then'](respondWithStatusCode(_0x81d748,null))[_0x0a9e('0x42')](handleError(_0x81d748,null));};exports[_0x0a9e('0x7d')]=function(_0x12843d,_0x2ed526,_0xb0599a){var _0x5d9ddb={};var _0x3afc8c={};var _0x1756c7;var _0x5ce99d;return db[_0x0a9e('0x2a')]['findOne']({'where':{'id':_0x12843d[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x2ed526,null))[_0x0a9e('0x23')](function(_0xf8c6c4){if(_0xf8c6c4){_0x1756c7=_0xf8c6c4;_0x3afc8c['model']=_[_0x0a9e('0x2d')](db['User'][_0x0a9e('0x2b')]);_0x3afc8c[_0x0a9e('0x2e')]=_['keys'](_0x12843d[_0x0a9e('0x2e')]);_0x3afc8c[_0x0a9e('0x36')]=_[_0x0a9e('0x2f')](_0x3afc8c['model'],_0x3afc8c['query']);_0x5d9ddb[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x3afc8c[_0x0a9e('0x2c')],qs[_0x0a9e('0x31')](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x31')]));_0x5d9ddb[_0x0a9e('0x30')]=_0x5d9ddb[_0x0a9e('0x30')][_0x0a9e('0x32')]?_0x5d9ddb['attributes']:_0x3afc8c[_0x0a9e('0x2c')];_0x5d9ddb['order']=qs[_0x0a9e('0x35')](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x35')]);_0x5d9ddb[_0x0a9e('0x39')]=qs[_0x0a9e('0x36')](_['pick'](_0x12843d[_0x0a9e('0x2e')],_0x3afc8c[_0x0a9e('0x36')]));if(_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x37')]){_0x5d9ddb[_0x0a9e('0x39')]=_['merge'](_0x5d9ddb['where'],{'$or':_[_0x0a9e('0x3a')](_0x5d9ddb['attributes'],function(_0x25eae0){var _0x4658df={};_0x4658df[_0x25eae0]={'$like':'%'+_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x37')]+'%'};return _0x4658df;})});}_0x5d9ddb=_[_0x0a9e('0x38')]({},_0x5d9ddb,_0x12843d[_0x0a9e('0x3e')]);return _0x1756c7['getAgents'](_0x5d9ddb);}})['then'](function(_0x1889ed){if(_0x1889ed){_0x5ce99d=_0x1889ed['length'];if(!_0x12843d[_0x0a9e('0x2e')]['hasOwnProperty'](_0x0a9e('0x7e'))){_0x5d9ddb['limit']=qs['limit'](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x1d')]);_0x5d9ddb['offset']=qs[_0x0a9e('0x1c')](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x1c')]);}return _0x1756c7[_0x0a9e('0x7d')](_0x5d9ddb);}})[_0x0a9e('0x23')](function(_0x5ab0bc){if(_0x5ab0bc){return _0x5ab0bc?{'count':_0x5ce99d,'rows':_0x5ab0bc}:null;}})['then'](respondWithResult(_0x2ed526,null))[_0x0a9e('0x42')](handleError(_0x2ed526,null));};
\ No newline at end of file
+var _0xa9e0=['addQueues','findOne','add','ids','removeQueues','remove','Voice','Chat','Mail','Sms','Fax','Openchannel','each','addAgents','User','findAll','online','voicePause','UserVoiceQueueRt','upsert','isNil','interface','format','omit','spread','userTeam:save','voice','chat','mail','sms','openchannel','removeAgents','isArray','emit','userTeam:remove','getAgents','nolimit','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','get','error','stack','name','index','Team','rawAttributes','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','filters','filter','merge','where','map','type','key','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Teams','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getQueues','isValidChannel','channel','Sequelize','ValidationError','Unknown\x20channel','capitalize','toLowerCase','Queue','pick','Queues'];(function(_0x2da23f,_0x14ea55){var _0x59cbe9=function(_0x4bea91){while(--_0x4bea91){_0x2da23f['push'](_0x2da23f['shift']());}};_0x59cbe9(++_0x14ea55);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3e112d,_0x2bb132){_0x3e112d=_0x3e112d-0x0;var _0x531c31=_0xa9e0[_0x3e112d];return _0x531c31;};'use strict';var pdf=require(_0x0a9e('0x0'));var emlformat=require(_0x0a9e('0x1'));var rimraf=require(_0x0a9e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0a9e('0x3'));var moment=require('moment');var BPromise=require(_0x0a9e('0x4'));var Mustache=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var path=require(_0x0a9e('0x7'));var sox=require(_0x0a9e('0x8'));var csv=require('to-csv');var ejs=require(_0x0a9e('0x9'));var fs=require('fs');var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var hardwareService=require(_0x0a9e('0x11'));var logger=require(_0x0a9e('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x0a9e('0x13')]=_[_0x0a9e('0x14')](config[_0x0a9e('0x13')],{'host':_0x0a9e('0x15'),'port':0x18eb});var socket=require(_0x0a9e('0x16'))(new Redis(config[_0x0a9e('0x13')]));require('./team.socket')[_0x0a9e('0x17')](socket);function respondWithStatusCode(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xcc;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x18')](_0x2b4227);}return _0x239b12[_0x0a9e('0x19')](_0x2b4227)['end']();};}function respondWithResult(_0x22dccb,_0x5d0880){_0x5d0880=_0x5d0880||0xc8;return function(_0x1985b6){if(_0x1985b6){return _0x22dccb['status'](_0x5d0880)[_0x0a9e('0x1a')](_0x1985b6);}};}function respondWithFilteredResult(_0x12066b,_0x48f32d){return function(_0x225616){if(_0x225616){var _0x5a0a06=_0x225616[_0x0a9e('0x1b')],_0x459eb1=_0x48f32d[_0x0a9e('0x1c')],_0x478723=_0x48f32d[_0x0a9e('0x1c')]+_0x48f32d[_0x0a9e('0x1d')],_0x106033;if(_0x478723>=_0x5a0a06){_0x478723=_0x5a0a06;_0x106033=0xc8;}else{_0x106033=0xce;}_0x12066b[_0x0a9e('0x19')](_0x106033);return _0x12066b[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x459eb1+'-'+_0x478723+'/'+_0x5a0a06)[_0x0a9e('0x1a')](_0x225616);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x20')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x21')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x22')](_0x5a09ef)[_0x0a9e('0x23')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x24')]()[_0x0a9e('0x23')](function(){var _0x370d86=_0x2fb0e4[_0x0a9e('0x25')]({'plain':!![]});var _0x16b1ca='Teams';return db['UserProfileResource'][_0x0a9e('0x24')]({'where':{'type':_0x16b1ca,'resourceId':_0x370d86['id']}})[_0x0a9e('0x23')](function(){return _0x2fb0e4;});})[_0x0a9e('0x23')](function(){_0x4abc77[_0x0a9e('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x384319,_0x479bc4){return function(_0x45a1e7){if(!_0x45a1e7){_0x384319['sendStatus'](0x194);}return _0x45a1e7;};}function handleError(_0x1dc186,_0x34dc65){_0x34dc65=_0x34dc65||0x1f4;return function(_0x25fba9){logger[_0x0a9e('0x26')](_0x25fba9[_0x0a9e('0x27')]);if(_0x25fba9[_0x0a9e('0x28')]){delete _0x25fba9[_0x0a9e('0x28')];}_0x1dc186[_0x0a9e('0x19')](_0x34dc65)['send'](_0x25fba9);};}exports[_0x0a9e('0x29')]=function(_0x468813,_0x2b1f27){var _0x2ec755={},_0x5c877d={},_0x15b200={'count':0x0,'rows':[]};var _0x40e7a3=db[_0x0a9e('0x2a')][_0x0a9e('0x2b')];_0x5c877d[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x40e7a3);_0x5c877d[_0x0a9e('0x2e')]=_[_0x0a9e('0x2d')](_0x468813[_0x0a9e('0x2e')]);_0x5c877d['filters']=_[_0x0a9e('0x2f')](_0x5c877d['model'],_0x5c877d[_0x0a9e('0x2e')]);_0x2ec755[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x5c877d[_0x0a9e('0x2c')],qs[_0x0a9e('0x31')](_0x468813['query'][_0x0a9e('0x31')]));_0x2ec755[_0x0a9e('0x30')]=_0x2ec755[_0x0a9e('0x30')][_0x0a9e('0x32')]?_0x2ec755[_0x0a9e('0x30')]:_0x5c877d[_0x0a9e('0x2c')];if(!_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x33')]('nolimit')){_0x2ec755[_0x0a9e('0x1d')]=qs['limit'](_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x1d')]);_0x2ec755[_0x0a9e('0x1c')]=qs[_0x0a9e('0x1c')](_0x468813['query'][_0x0a9e('0x1c')]);}_0x2ec755[_0x0a9e('0x34')]=qs[_0x0a9e('0x35')](_0x468813[_0x0a9e('0x2e')]['sort']);_0x2ec755['where']=qs[_0x0a9e('0x36')](_['pick'](_0x468813[_0x0a9e('0x2e')],_0x5c877d[_0x0a9e('0x36')]));if(_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x37')]){_0x2ec755['where']=_[_0x0a9e('0x38')](_0x2ec755[_0x0a9e('0x39')],{'$or':_[_0x0a9e('0x3a')](_0x40e7a3,function(_0x533942){if(_0x533942[_0x0a9e('0x3b')][_0x0a9e('0x3c')]!==_0x0a9e('0x3d')){var _0x4c1c0e={};_0x4c1c0e[_0x533942['field']]={'$like':'%'+_0x468813[_0x0a9e('0x2e')][_0x0a9e('0x37')]+'%'};return _0x4c1c0e;}})});}_0x2ec755=_['merge']({},_0x2ec755,_0x468813[_0x0a9e('0x3e')]);var _0x419125={'where':_0x2ec755[_0x0a9e('0x39')]};return db[_0x0a9e('0x2a')]['count'](_0x419125)['then'](function(_0x15e37d){_0x15b200[_0x0a9e('0x1b')]=_0x15e37d;if(_0x468813['query'][_0x0a9e('0x3f')]){_0x2ec755[_0x0a9e('0x40')]=[{'all':!![]}];}return db[_0x0a9e('0x2a')]['findAll'](_0x2ec755);})[_0x0a9e('0x23')](function(_0x2cfea9){_0x15b200[_0x0a9e('0x41')]=_0x2cfea9;return _0x15b200;})[_0x0a9e('0x23')](respondWithFilteredResult(_0x2b1f27,_0x2ec755))[_0x0a9e('0x42')](handleError(_0x2b1f27,null));};exports[_0x0a9e('0x43')]=function(_0x2881b3,_0x45a9b8){var _0x23b089={'raw':![],'where':{'id':_0x2881b3[_0x0a9e('0x44')]['id']}},_0x3da2cd={};_0x3da2cd[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](db[_0x0a9e('0x2a')][_0x0a9e('0x2b')]);_0x3da2cd['query']=_['keys'](_0x2881b3[_0x0a9e('0x2e')]);_0x3da2cd[_0x0a9e('0x36')]=_[_0x0a9e('0x2f')](_0x3da2cd[_0x0a9e('0x2c')],_0x3da2cd[_0x0a9e('0x2e')]);_0x23b089[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x3da2cd[_0x0a9e('0x2c')],qs[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2e')][_0x0a9e('0x31')]));_0x23b089[_0x0a9e('0x30')]=_0x23b089['attributes'][_0x0a9e('0x32')]?_0x23b089[_0x0a9e('0x30')]:_0x3da2cd[_0x0a9e('0x2c')];if(_0x2881b3[_0x0a9e('0x2e')][_0x0a9e('0x3f')]){_0x23b089[_0x0a9e('0x40')]=[{'all':!![]}];}_0x23b089=_[_0x0a9e('0x38')]({},_0x23b089,_0x2881b3[_0x0a9e('0x3e')]);return db['Team'][_0x0a9e('0x45')](_0x23b089)['then'](handleEntityNotFound(_0x45a9b8,null))[_0x0a9e('0x23')](respondWithResult(_0x45a9b8,null))[_0x0a9e('0x42')](handleError(_0x45a9b8,null));};exports[_0x0a9e('0x46')]=function(_0x562fb4,_0x14bec2){return db[_0x0a9e('0x2a')][_0x0a9e('0x46')](_0x562fb4[_0x0a9e('0x47')],{})[_0x0a9e('0x23')](function(_0x37be73){var _0x45bf7f=_0x562fb4['user'][_0x0a9e('0x25')]({'plain':!![]});if(!_0x45bf7f)throw new Error(_0x0a9e('0x48'));if(_0x45bf7f[_0x0a9e('0x49')]===_0x0a9e('0x4a')){var _0x409789=_0x37be73[_0x0a9e('0x25')]({'plain':!![]});var _0x6054ee=_0x0a9e('0x4b');return db[_0x0a9e('0x4c')]['find']({'where':{'name':_0x6054ee,'userProfileId':_0x45bf7f[_0x0a9e('0x4d')]},'raw':!![]})[_0x0a9e('0x23')](function(_0x4f7240){if(_0x4f7240&&_0x4f7240['autoAssociation']===0x0){return db['UserProfileResource'][_0x0a9e('0x46')]({'name':_0x409789[_0x0a9e('0x28')],'resourceId':_0x409789['id'],'type':_0x4f7240[_0x0a9e('0x28')],'sectionId':_0x4f7240['id']},{})[_0x0a9e('0x23')](function(){return _0x37be73;});}else{return _0x37be73;}})[_0x0a9e('0x42')](function(_0x30decb){logger[_0x0a9e('0x26')](_0x0a9e('0x4e'),_0x30decb);throw _0x30decb;});}return _0x37be73;})['then'](respondWithResult(_0x14bec2,0xc9))['catch'](handleError(_0x14bec2,null));};exports['update']=function(_0x39d77d,_0x204173){if(_0x39d77d[_0x0a9e('0x47')]['id']){delete _0x39d77d['body']['id'];}return db[_0x0a9e('0x2a')][_0x0a9e('0x45')]({'where':{'id':_0x39d77d['params']['id']}})['then'](handleEntityNotFound(_0x204173,null))[_0x0a9e('0x23')](saveUpdates(_0x39d77d['body'],null))[_0x0a9e('0x23')](respondWithResult(_0x204173,null))['catch'](handleError(_0x204173,null));};exports[_0x0a9e('0x24')]=function(_0x3c20b2,_0x439340){return db['Team'][_0x0a9e('0x45')]({'where':{'id':_0x3c20b2[_0x0a9e('0x44')]['id']}})['then'](handleEntityNotFound(_0x439340,null))['then'](removeEntity(_0x439340,null))[_0x0a9e('0x42')](handleError(_0x439340,null));};exports[_0x0a9e('0x4f')]=function(_0x49c095,_0x145931,_0x5ce9ac){return db[_0x0a9e('0x2a')]['findOne']({'where':{'id':_0x49c095[_0x0a9e('0x44')]['id']}})['then'](handleEntityNotFound(_0x145931,null))['then'](function(_0x5df0ad){if(!_0x49c095[_0x0a9e('0x2e')]['channel']||!utils[_0x0a9e('0x50')](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x51')])){throw new db[(_0x0a9e('0x52'))][(_0x0a9e('0x53'))](_0x0a9e('0x54'));}var _0xd10662={};var _0x28d814={};_0x28d814['model']=_[_0x0a9e('0x2d')](db[_[_0x0a9e('0x55')](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x51')][_0x0a9e('0x56')]())+_0x0a9e('0x57')]['rawAttributes']);_0x28d814[_0x0a9e('0x2e')]=_[_0x0a9e('0x2d')](_0x49c095['query']);_0x28d814[_0x0a9e('0x36')]=_['intersection'](_0x28d814[_0x0a9e('0x2c')],_0x28d814['query']);_0xd10662['attributes']=_['intersection'](_0x28d814[_0x0a9e('0x2c')],qs['fields'](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x31')]));_0xd10662[_0x0a9e('0x30')]=_0xd10662[_0x0a9e('0x30')][_0x0a9e('0x32')]?_0xd10662[_0x0a9e('0x30')]:_0x28d814['model'];_0xd10662[_0x0a9e('0x1d')]=qs['limit'](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x1d')]);_0xd10662[_0x0a9e('0x1c')]=qs['offset'](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x1c')]);_0xd10662[_0x0a9e('0x34')]=qs[_0x0a9e('0x35')](_0x49c095['query'][_0x0a9e('0x35')]);_0xd10662[_0x0a9e('0x39')]=qs['filters'](_[_0x0a9e('0x58')](_0x49c095[_0x0a9e('0x2e')],_0x28d814[_0x0a9e('0x36')]));_0xd10662=_[_0x0a9e('0x38')]({},_0xd10662,_0x49c095[_0x0a9e('0x3e')]);return _0x5df0ad['get'+_[_0x0a9e('0x55')](_0x49c095[_0x0a9e('0x2e')][_0x0a9e('0x51')]['toLowerCase']())+_0x0a9e('0x59')](_0xd10662);})['then'](respondWithResult(_0x145931,null))['catch'](handleError(_0x145931,null));};exports[_0x0a9e('0x5a')]=function(_0x4556c5,_0x9375fb,_0x19c995){return db[_0x0a9e('0x2a')][_0x0a9e('0x5b')]({'where':{'id':_0x4556c5[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](function(_0x2d7205){if(_0x2d7205){if(!_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x51')]||!utils[_0x0a9e('0x50')](_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x51')])){throw new db[(_0x0a9e('0x52'))][(_0x0a9e('0x53'))](_0x0a9e('0x54'));}return _0x2d7205[_0x0a9e('0x5c')+_['capitalize'](_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x51')][_0x0a9e('0x56')]())+'Queues'](_0x4556c5[_0x0a9e('0x47')][_0x0a9e('0x5d')]);}return null;})['then'](handleEntityNotFound(_0x9375fb,null))[_0x0a9e('0x23')](respondWithStatusCode(_0x9375fb,null))[_0x0a9e('0x42')](handleError(_0x9375fb,null));};exports[_0x0a9e('0x5e')]=function(_0x427946,_0x13b5c0,_0x4a43a8){return db['Team']['findOne']({'where':{'id':_0x427946[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](function(_0x1104ad){if(_0x1104ad){if(!_0x427946[_0x0a9e('0x2e')][_0x0a9e('0x51')]||!utils[_0x0a9e('0x50')](_0x427946[_0x0a9e('0x2e')][_0x0a9e('0x51')])){throw new db['Sequelize'][(_0x0a9e('0x53'))](_0x0a9e('0x54'));}return _0x1104ad[_0x0a9e('0x5f')+_['capitalize'](_0x427946[_0x0a9e('0x2e')]['channel'][_0x0a9e('0x56')]())+_0x0a9e('0x59')](_0x427946['query'][_0x0a9e('0x5d')]);}return null;})[_0x0a9e('0x23')](handleEntityNotFound(_0x13b5c0,null))[_0x0a9e('0x23')](respondWithStatusCode(_0x13b5c0,null))[_0x0a9e('0x42')](handleError(_0x13b5c0,null));};exports['addAgents']=function(_0x1d442c,_0x2e9552,_0x371533){return db[_0x0a9e('0x2a')]['find']({'where':{'id':_0x1d442c[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x2e9552,null))[_0x0a9e('0x23')](function(_0x361b21){if(_0x361b21){var _0x4abc8f=[_0x0a9e('0x60'),_0x0a9e('0x61'),_0x0a9e('0x62'),_0x0a9e('0x63'),_0x0a9e('0x64'),_0x0a9e('0x65')];return BPromise[_0x0a9e('0x66')](_0x4abc8f,function(_0x3df0e3){return _0x361b21[_0x0a9e('0x25')+_0x3df0e3+_0x0a9e('0x59')]({'attributes':['id',_0x0a9e('0x28')]})[_0x0a9e('0x23')](function(_0x25744a){return BPromise[_0x0a9e('0x66')](_0x25744a,function(_0x5b35db){return _0x5b35db[_0x0a9e('0x67')](_0x1d442c[_0x0a9e('0x47')][_0x0a9e('0x5d')])['then'](function(){if(_0x3df0e3===_0x0a9e('0x60')){return db[_0x0a9e('0x68')][_0x0a9e('0x69')]({'where':{'id':_0x1d442c[_0x0a9e('0x47')]['ids']},'attributes':['id','name',_0x0a9e('0x6a'),_0x0a9e('0x6b'),'interface'],'raw':!![]})[_0x0a9e('0x23')](function(_0x53a6a1){return BPromise[_0x0a9e('0x66')](_[_0x0a9e('0x37')](_0x53a6a1,{'online':0x1}),function(_0x5637a1){return db[_0x0a9e('0x6c')][_0x0a9e('0x6d')]({'membername':_0x5637a1[_0x0a9e('0x28')],'UserId':_0x5637a1['id'],'queue_name':_0x5b35db[_0x0a9e('0x28')],'VoiceQueueId':_0x5b35db['id'],'interface':_[_0x0a9e('0x6e')](_0x5637a1[_0x0a9e('0x6f')])?util[_0x0a9e('0x70')]('SIP/%s',_0x5637a1[_0x0a9e('0x28')]):_0x5637a1[_0x0a9e('0x6f')],'paused':_0x5637a1[_0x0a9e('0x6b')]||![],'penalty':0x0});});});}});});})[_0x0a9e('0x23')](function(){return _0x361b21;});})['then'](function(){return _0x361b21;});}})[_0x0a9e('0x23')](function(_0xf0db1){if(_0xf0db1){return _0xf0db1['addAgents'](_0x1d442c[_0x0a9e('0x47')]['ids'],_[_0x0a9e('0x71')](_0x1d442c[_0x0a9e('0x47')],[_0x0a9e('0x5d'),'id'])||{})[_0x0a9e('0x72')](function(_0x5af453){for(var _0x51ccd7=0x0;_0x51ccd7<_0x1d442c[_0x0a9e('0x47')][_0x0a9e('0x5d')][_0x0a9e('0x32')];_0x51ccd7+=0x1){socket['emit'](_0x0a9e('0x73'),{'UserId':_0x1d442c[_0x0a9e('0x47')]['ids'][_0x51ccd7],'TeamId':_0x1d442c['params']['id']});}return _0x5af453;});}})[_0x0a9e('0x23')](respondWithResult(_0x2e9552,null))['catch'](handleError(_0x2e9552,null));};exports['removeAgents']=function(_0x4dc6b3,_0x81d748,_0xf3601c){return db[_0x0a9e('0x2a')][_0x0a9e('0x45')]({'where':{'id':_0x4dc6b3[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x81d748,null))['then'](function(_0x5fd5db){if(_0x5fd5db){return BPromise['each']([_0x0a9e('0x74'),_0x0a9e('0x75'),_0x0a9e('0x76'),_0x0a9e('0x77'),'fax',_0x0a9e('0x78')],function(_0x32f761){return _0x5fd5db[_0x0a9e('0x25')+_['capitalize'](_0x32f761)+_0x0a9e('0x59')]({'attributes':['id',_0x0a9e('0x28')]})[_0x0a9e('0x23')](function(_0x22063c){return BPromise[_0x0a9e('0x66')](_0x22063c,function(_0x1910bf){return _0x1910bf[_0x0a9e('0x79')](_0x4dc6b3[_0x0a9e('0x2e')]['ids'])[_0x0a9e('0x23')](function(){if(_0x32f761===_0x0a9e('0x74')){return db['UserVoiceQueueRt'][_0x0a9e('0x24')]({'where':{'VoiceQueueId':_0x1910bf['id'],'UserId':_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')]}});}});});})['then'](function(){return _0x5fd5db;});})[_0x0a9e('0x23')](function(){return _0x5fd5db;});}})['then'](function(_0x8c8fbe){if(_0x8c8fbe){return _0x8c8fbe[_0x0a9e('0x79')](_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')])[_0x0a9e('0x23')](function(){if(_[_0x0a9e('0x7a')](_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')])){for(var _0x501050=0x0;_0x501050<_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')][_0x0a9e('0x32')];_0x501050+=0x1){socket[_0x0a9e('0x7b')](_0x0a9e('0x7c'),{'UserId':Number(_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')][_0x501050]),'TeamId':Number(_0x4dc6b3[_0x0a9e('0x44')]['id'])});}}else{socket[_0x0a9e('0x7b')](_0x0a9e('0x7c'),{'UserId':Number(_0x4dc6b3[_0x0a9e('0x2e')][_0x0a9e('0x5d')]),'TeamId':Number(_0x4dc6b3[_0x0a9e('0x44')]['id'])});}});}})['then'](respondWithStatusCode(_0x81d748,null))[_0x0a9e('0x42')](handleError(_0x81d748,null));};exports[_0x0a9e('0x7d')]=function(_0x12843d,_0x2ed526,_0xb0599a){var _0x5d9ddb={};var _0x3afc8c={};var _0x1756c7;var _0x5ce99d;return db[_0x0a9e('0x2a')]['findOne']({'where':{'id':_0x12843d[_0x0a9e('0x44')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x2ed526,null))[_0x0a9e('0x23')](function(_0xf8c6c4){if(_0xf8c6c4){_0x1756c7=_0xf8c6c4;_0x3afc8c['model']=_[_0x0a9e('0x2d')](db['User'][_0x0a9e('0x2b')]);_0x3afc8c[_0x0a9e('0x2e')]=_['keys'](_0x12843d[_0x0a9e('0x2e')]);_0x3afc8c[_0x0a9e('0x36')]=_[_0x0a9e('0x2f')](_0x3afc8c['model'],_0x3afc8c['query']);_0x5d9ddb[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x3afc8c[_0x0a9e('0x2c')],qs[_0x0a9e('0x31')](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x31')]));_0x5d9ddb[_0x0a9e('0x30')]=_0x5d9ddb[_0x0a9e('0x30')][_0x0a9e('0x32')]?_0x5d9ddb['attributes']:_0x3afc8c[_0x0a9e('0x2c')];_0x5d9ddb['order']=qs[_0x0a9e('0x35')](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x35')]);_0x5d9ddb[_0x0a9e('0x39')]=qs[_0x0a9e('0x36')](_['pick'](_0x12843d[_0x0a9e('0x2e')],_0x3afc8c[_0x0a9e('0x36')]));if(_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x37')]){_0x5d9ddb[_0x0a9e('0x39')]=_['merge'](_0x5d9ddb['where'],{'$or':_[_0x0a9e('0x3a')](_0x5d9ddb['attributes'],function(_0x25eae0){var _0x4658df={};_0x4658df[_0x25eae0]={'$like':'%'+_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x37')]+'%'};return _0x4658df;})});}_0x5d9ddb=_[_0x0a9e('0x38')]({},_0x5d9ddb,_0x12843d[_0x0a9e('0x3e')]);return _0x1756c7['getAgents'](_0x5d9ddb);}})['then'](function(_0x1889ed){if(_0x1889ed){_0x5ce99d=_0x1889ed['length'];if(!_0x12843d[_0x0a9e('0x2e')]['hasOwnProperty'](_0x0a9e('0x7e'))){_0x5d9ddb['limit']=qs['limit'](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x1d')]);_0x5d9ddb['offset']=qs[_0x0a9e('0x1c')](_0x12843d[_0x0a9e('0x2e')][_0x0a9e('0x1c')]);}return _0x1756c7[_0x0a9e('0x7d')](_0x5d9ddb);}})[_0x0a9e('0x23')](function(_0x5ab0bc){if(_0x5ab0bc){return _0x5ab0bc?{'count':_0x5ce99d,'rows':_0x5ab0bc}:null;}})['then'](respondWithResult(_0x2ed526,null))[_0x0a9e('0x42')](handleError(_0x2ed526,null));};
\ No newline at end of file
diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js
index 2369647..3111f78 100644
--- a/server/api/team/team.events.js
+++ b/server/api/team/team.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1261=['update','remove','hasOwnProperty','hook','../../mysqldb','Team','setMaxListeners','save'];(function(_0xea2c75,_0x4bf4bd){var _0x2bebca=function(_0x2a60f3){while(--_0x2a60f3){_0xea2c75['push'](_0xea2c75['shift']());}};_0x2bebca(++_0x4bf4bd);}(_0x1261,0x144));var _0x1126=function(_0x261b08,_0x563d91){_0x261b08=_0x261b08-0x0;var _0xeeaf84=_0x1261[_0x261b08];return _0xeeaf84;};'use strict';var EventEmitter=require('events');var Team=require(_0x1126('0x0'))['db'][_0x1126('0x1')];var TeamEvents=new EventEmitter();TeamEvents[_0x1126('0x2')](0x0);var events={'afterCreate':_0x1126('0x3'),'afterUpdate':_0x1126('0x4'),'afterDestroy':_0x1126('0x5')};function emitEvent(_0x3cc93f){return function(_0x4245ca,_0x21a480,_0x75a851){TeamEvents['emit'](_0x3cc93f+':'+_0x4245ca['id'],_0x4245ca);TeamEvents['emit'](_0x3cc93f,_0x4245ca);_0x75a851(null);};}for(var e in events){if(events[_0x1126('0x6')](e)){var event=events[e];Team[_0x1126('0x7')](e,emitEvent(event));}}module['exports']=TeamEvents;
\ No newline at end of file
+var _0x7046=['events','../../mysqldb','Team','setMaxListeners','update','remove','emit','hasOwnProperty','exports'];(function(_0x4542e1,_0x49de90){var _0x4591cf=function(_0x2ae33c){while(--_0x2ae33c){_0x4542e1['push'](_0x4542e1['shift']());}};_0x4591cf(++_0x49de90);}(_0x7046,0x144));var _0x6704=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0x7046[_0x5d6456];return _0x4d66c1;};'use strict';var EventEmitter=require(_0x6704('0x0'));var Team=require(_0x6704('0x1'))['db'][_0x6704('0x2')];var TeamEvents=new EventEmitter();TeamEvents[_0x6704('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x6704('0x4'),'afterDestroy':_0x6704('0x5')};function emitEvent(_0x2899c5){return function(_0x5258e7,_0x1e9b2a,_0x35bcc6){TeamEvents[_0x6704('0x6')](_0x2899c5+':'+_0x5258e7['id'],_0x5258e7);TeamEvents[_0x6704('0x6')](_0x2899c5,_0x5258e7);_0x35bcc6(null);};}for(var e in events){if(events[_0x6704('0x7')](e)){var event=events[e];Team['hook'](e,emitEvent(event));}}module[_0x6704('0x8')]=TeamEvents;
\ No newline at end of file
diff --git a/server/api/team/team.model.js b/server/api/team/team.model.js
index 32b4cf0..59ee51d 100644
--- a/server/api/team/team.model.js
+++ b/server/api/team/team.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6429=['Team','teams','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./team.attributes','exports'];(function(_0xc1126b,_0x144b9e){var _0x5cc9d5=function(_0x174617){while(--_0x174617){_0xc1126b['push'](_0xc1126b['shift']());}};_0x5cc9d5(++_0x144b9e);}(_0x6429,0x1bc));var _0x9642=function(_0x38d5b2,_0xe77bf4){_0x38d5b2=_0x38d5b2-0x0;var _0x5b4ba8=_0x6429[_0x38d5b2];return _0x5b4ba8;};'use strict';var _=require(_0x9642('0x0'));var util=require(_0x9642('0x1'));var logger=require(_0x9642('0x2'))(_0x9642('0x3'));var moment=require(_0x9642('0x4'));var BPromise=require('bluebird');var rp=require(_0x9642('0x5'));var fs=require('fs');var path=require(_0x9642('0x6'));var rimraf=require(_0x9642('0x7'));var config=require(_0x9642('0x8'));var attributes=require(_0x9642('0x9'));module[_0x9642('0xa')]=function(_0x265307,_0x1bb079){return _0x265307['define'](_0x9642('0xb'),attributes,{'tableName':_0x9642('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1608=['util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./team.attributes','exports','define','teams','lodash'];(function(_0x4c05b1,_0x1c7660){var _0x206ae9=function(_0x3e3642){while(--_0x3e3642){_0x4c05b1['push'](_0x4c05b1['shift']());}};_0x206ae9(++_0x1c7660);}(_0x1608,0x1d3));var _0x8160=function(_0x1b116e,_0x1f698b){_0x1b116e=_0x1b116e-0x0;var _0x42bfae=_0x1608[_0x1b116e];return _0x42bfae;};'use strict';var _=require(_0x8160('0x0'));var util=require(_0x8160('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x8160('0x2'));var BPromise=require(_0x8160('0x3'));var rp=require(_0x8160('0x4'));var fs=require('fs');var path=require(_0x8160('0x5'));var rimraf=require(_0x8160('0x6'));var config=require(_0x8160('0x7'));var attributes=require(_0x8160('0x8'));module[_0x8160('0x9')]=function(_0x298fe8,_0x4fa8be){return _0x298fe8[_0x8160('0xa')]('Team',attributes,{'tableName':_0x8160('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/team/team.rpc.js b/server/api/team/team.rpc.js
index c2c6971..0d7aa7c 100644
--- a/server/api/team/team.rpc.js
+++ b/server/api/team/team.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4582=['info','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','request','then','Team,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x3d34da,_0x3abcc1){var _0xcf6af8=function(_0x300a53){while(--_0x300a53){_0x3d34da['push'](_0x3d34da['shift']());}};_0xcf6af8(++_0x3abcc1);}(_0x4582,0x12c));var _0x2458=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4582[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2458('0x0'));var util=require(_0x2458('0x1'));var moment=require(_0x2458('0x2'));var BPromise=require('bluebird');var rs=require(_0x2458('0x3'));var fs=require('fs');var Redis=require(_0x2458('0x4'));var db=require(_0x2458('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x2458('0x6'))(_0x2458('0x7'));var config=require('../../config/environment');var jayson=require(_0x2458('0x8'));var client=jayson[_0x2458('0x9')][_0x2458('0xa')]({'port':0x232a});config[_0x2458('0xb')]=_['defaults'](config['redis'],{'host':_0x2458('0xc'),'port':0x18eb});var socket=require(_0x2458('0xd'))(new Redis(config[_0x2458('0xb')]));require('./team.socket')[_0x2458('0xe')](socket);function respondWithRpcPromise(_0x12eb80,_0x3a1b86,_0x3df590){return new BPromise(function(_0x52347c,_0x4e6120){return client[_0x2458('0xf')](_0x12eb80,_0x3df590)[_0x2458('0x10')](function(_0x538113){logger['info'](_0x2458('0x11'),_0x3a1b86,_0x2458('0x12'));logger[_0x2458('0x13')]('Team,\x20%s,\x20%s,\x20%s',_0x3a1b86,_0x2458('0x12'),JSON[_0x2458('0x14')](_0x538113));if(_0x538113[_0x2458('0x15')]){if(_0x538113[_0x2458('0x15')][_0x2458('0x16')]===0x1f4){logger[_0x2458('0x15')](_0x2458('0x11'),_0x3a1b86,_0x538113['error'][_0x2458('0x17')]);return _0x4e6120(_0x538113[_0x2458('0x15')][_0x2458('0x17')]);}logger[_0x2458('0x15')](_0x2458('0x11'),_0x3a1b86,_0x538113[_0x2458('0x15')][_0x2458('0x17')]);return _0x52347c(_0x538113[_0x2458('0x15')][_0x2458('0x17')]);}else{logger[_0x2458('0x18')](_0x2458('0x11'),_0x3a1b86,_0x2458('0x12'));_0x52347c(_0x538113[_0x2458('0x19')][_0x2458('0x17')]);}})[_0x2458('0x1a')](function(_0x3ca4bd){logger[_0x2458('0x15')](_0x2458('0x11'),_0x3a1b86,_0x3ca4bd);_0x4e6120(_0x3ca4bd);});});}
\ No newline at end of file
+var _0xb1d9=['./team.socket','register','request','info','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','error','Team,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x2bbfb9,_0x5cc756){var _0x2bd33f=function(_0x23388f){while(--_0x23388f){_0x2bbfb9['push'](_0x2bbfb9['shift']());}};_0x2bd33f(++_0x5cc756);}(_0xb1d9,0x1cd));var _0x9b1d=function(_0x24ade1,_0x1eedd1){_0x24ade1=_0x24ade1-0x0;var _0x3cd702=_0xb1d9[_0x24ade1];return _0x3cd702;};'use strict';var _=require(_0x9b1d('0x0'));var util=require(_0x9b1d('0x1'));var moment=require(_0x9b1d('0x2'));var BPromise=require(_0x9b1d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9b1d('0x4'));var db=require(_0x9b1d('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9b1d('0x6'));var config=require(_0x9b1d('0x7'));var jayson=require(_0x9b1d('0x8'));var client=jayson[_0x9b1d('0x9')][_0x9b1d('0xa')]({'port':0x232a});config['redis']=_['defaults'](config[_0x9b1d('0xb')],{'host':_0x9b1d('0xc'),'port':0x18eb});var socket=require(_0x9b1d('0xd'))(new Redis(config[_0x9b1d('0xb')]));require(_0x9b1d('0xe'))[_0x9b1d('0xf')](socket);function respondWithRpcPromise(_0x22e774,_0x3fabd4,_0x2386a3){return new BPromise(function(_0x446a19,_0x3edbe0){return client[_0x9b1d('0x10')](_0x22e774,_0x2386a3)['then'](function(_0x47ef89){logger[_0x9b1d('0x11')]('Team,\x20%s,\x20%s',_0x3fabd4,_0x9b1d('0x12'));logger['debug'](_0x9b1d('0x13'),_0x3fabd4,_0x9b1d('0x12'),JSON[_0x9b1d('0x14')](_0x47ef89));if(_0x47ef89[_0x9b1d('0x15')]){if(_0x47ef89[_0x9b1d('0x15')]['code']===0x1f4){logger[_0x9b1d('0x15')](_0x9b1d('0x16'),_0x3fabd4,_0x47ef89['error'][_0x9b1d('0x17')]);return _0x3edbe0(_0x47ef89[_0x9b1d('0x15')]['message']);}logger['error'](_0x9b1d('0x16'),_0x3fabd4,_0x47ef89['error'][_0x9b1d('0x17')]);return _0x446a19(_0x47ef89[_0x9b1d('0x15')]['message']);}else{logger[_0x9b1d('0x11')]('Team,\x20%s,\x20%s',_0x3fabd4,_0x9b1d('0x12'));_0x446a19(_0x47ef89[_0x9b1d('0x18')][_0x9b1d('0x17')]);}})['catch'](function(_0x37bcc9){logger[_0x9b1d('0x15')](_0x9b1d('0x16'),_0x3fabd4,_0x37bcc9);_0x3edbe0(_0x37bcc9);});});}
\ No newline at end of file
diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js
index 314875c..7f5f0c5 100644
--- a/server/api/team/team.socket.js
+++ b/server/api/team/team.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x02d4=['emit','removeListener','register','length','remove','update'];(function(_0x754ab4,_0x56daa7){var _0x34079a=function(_0x295ec1){while(--_0x295ec1){_0x754ab4['push'](_0x754ab4['shift']());}};_0x34079a(++_0x56daa7);}(_0x02d4,0x106));var _0x402d=function(_0x39f85c,_0xa09403){_0x39f85c=_0x39f85c-0x0;var _0x366d30=_0x02d4[_0x39f85c];return _0x366d30;};'use strict';var TeamEvents=require('./team.events');var events=['save',_0x402d('0x0'),_0x402d('0x1')];function createListener(_0x44744a,_0x56e0bb){return function(_0x551f47){_0x56e0bb[_0x402d('0x2')](_0x44744a,_0x551f47);};}function removeListener(_0x2c7e66,_0xcb76fb){return function(){TeamEvents[_0x402d('0x3')](_0x2c7e66,_0xcb76fb);};}exports[_0x402d('0x4')]=function(_0xe7a583){for(var _0x332e9d=0x0,_0x4f62da=events[_0x402d('0x5')];_0x332e9d<_0x4f62da;_0x332e9d++){var _0x387f37=events[_0x332e9d];var _0x4da378=createListener('team:'+_0x387f37,_0xe7a583);TeamEvents['on'](_0x387f37,_0x4da378);}};
\ No newline at end of file
+var _0x38b1=['removeListener','register','length','team:','./team.events','remove'];(function(_0x54d4a8,_0x585a59){var _0x3b321b=function(_0x245c6a){while(--_0x245c6a){_0x54d4a8['push'](_0x54d4a8['shift']());}};_0x3b321b(++_0x585a59);}(_0x38b1,0x190));var _0x138b=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x38b1[_0x3b380d];return _0x54502b;};'use strict';var TeamEvents=require(_0x138b('0x0'));var events=['save',_0x138b('0x1'),'update'];function createListener(_0x8d21fd,_0x27c750){return function(_0x34b8bf){_0x27c750['emit'](_0x8d21fd,_0x34b8bf);};}function removeListener(_0x278ec0,_0x3adc48){return function(){TeamEvents[_0x138b('0x2')](_0x278ec0,_0x3adc48);};}exports[_0x138b('0x3')]=function(_0x1b5ccd){for(var _0x209f27=0x0,_0x4486be=events[_0x138b('0x4')];_0x209f27<_0x4486be;_0x209f27++){var _0x3f2d97=events[_0x209f27];var _0x310f42=createListener(_0x138b('0x5')+_0x3f2d97,_0x1b5ccd);TeamEvents['on'](_0x3f2d97,_0x310f42);}};
\ No newline at end of file
diff --git a/server/api/template/index.js b/server/api/template/index.js
index 3d2007c..f6b2490 100644
--- a/server/api/template/index.js
+++ b/server/api/template/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd19d=['post','create','put','delete','multer','util','path','express','Router','../../components/auth/service','../../config/environment','./template.controller','get','isAuthenticated','/:id','show'];(function(_0x1db0d9,_0x5965a2){var _0x27cea6=function(_0x548aa1){while(--_0x548aa1){_0x1db0d9['push'](_0x1db0d9['shift']());}};_0x27cea6(++_0x5965a2);}(_0xd19d,0x1e4));var _0xdd19=function(_0x40b330,_0x42458b){_0x40b330=_0x40b330-0x0;var _0x27ae9a=_0xd19d[_0x40b330];return _0x27ae9a;};'use strict';var multer=require(_0xdd19('0x0'));var util=require(_0xdd19('0x1'));var path=require(_0xdd19('0x2'));var timeout=require('connect-timeout');var express=require(_0xdd19('0x3'));var router=express[_0xdd19('0x4')]();var auth=require(_0xdd19('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xdd19('0x6'));var controller=require(_0xdd19('0x7'));router[_0xdd19('0x8')]('/',auth[_0xdd19('0x9')](),controller['index']);router[_0xdd19('0x8')](_0xdd19('0xa'),auth[_0xdd19('0x9')](),controller[_0xdd19('0xb')]);router[_0xdd19('0xc')]('/',auth[_0xdd19('0x9')](),controller[_0xdd19('0xd')]);router[_0xdd19('0xe')](_0xdd19('0xa'),auth[_0xdd19('0x9')](),controller['update']);router[_0xdd19('0xf')](_0xdd19('0xa'),auth[_0xdd19('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x4d1a=['../../components/auth/service','../../components/interaction/service','../../config/environment','./template.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express'];(function(_0x1827ed,_0x4af0ee){var _0x14fe55=function(_0x4197aa){while(--_0x4197aa){_0x1827ed['push'](_0x1827ed['shift']());}};_0x14fe55(++_0x4af0ee);}(_0x4d1a,0x100));var _0xa4d1=function(_0x1f1cb6,_0x502f2b){_0x1f1cb6=_0x1f1cb6-0x0;var _0x3c8415=_0x4d1a[_0x1f1cb6];return _0x3c8415;};'use strict';var multer=require(_0xa4d1('0x0'));var util=require('util');var path=require(_0xa4d1('0x1'));var timeout=require(_0xa4d1('0x2'));var express=require(_0xa4d1('0x3'));var router=express['Router']();var auth=require(_0xa4d1('0x4'));var interaction=require(_0xa4d1('0x5'));var config=require(_0xa4d1('0x6'));var controller=require(_0xa4d1('0x7'));router[_0xa4d1('0x8')]('/',auth[_0xa4d1('0x9')](),controller[_0xa4d1('0xa')]);router[_0xa4d1('0x8')](_0xa4d1('0xb'),auth['isAuthenticated'](),controller[_0xa4d1('0xc')]);router[_0xa4d1('0xd')]('/',auth['isAuthenticated'](),controller[_0xa4d1('0xe')]);router[_0xa4d1('0xf')](_0xa4d1('0xb'),auth[_0xa4d1('0x9')](),controller[_0xa4d1('0x10')]);router[_0xa4d1('0x11')]('/:id',auth[_0xa4d1('0x9')](),controller[_0xa4d1('0x12')]);module[_0xa4d1('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/template/template.attributes.js b/server/api/template/template.attributes.js
index 08c5e27..9c016f7 100644
--- a/server/api/template/template.attributes.js
+++ b/server/api/template/template.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5325=['sequelize','STRING'];(function(_0x2179f1,_0x21c653){var _0x176ec9=function(_0x4c4a4c){while(--_0x4c4a4c){_0x2179f1['push'](_0x2179f1['shift']());}};_0x176ec9(++_0x21c653);}(_0x5325,0xbe));var _0x5532=function(_0xdd07b,_0x1e3550){_0xdd07b=_0xdd07b-0x0;var _0xca8c02=_0x5325[_0xdd07b];return _0xca8c02;};'use strict';var Sequelize=require(_0x5532('0x0'));module['exports']={'name':{'type':Sequelize[_0x5532('0x1')]},'description':{'type':Sequelize[_0x5532('0x1')]},'html':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0x515d=['exports','STRING','TEXT'];(function(_0x4efcc5,_0x1d0c44){var _0x38e25f=function(_0x301cad){while(--_0x301cad){_0x4efcc5['push'](_0x4efcc5['shift']());}};_0x38e25f(++_0x1d0c44);}(_0x515d,0x1e0));var _0xd515=function(_0xaa7a59,_0x5c644e){_0xaa7a59=_0xaa7a59-0x0;var _0x3c3a52=_0x515d[_0xaa7a59];return _0x3c3a52;};'use strict';var Sequelize=require('sequelize');module[_0xd515('0x0')]={'name':{'type':Sequelize[_0xd515('0x1')]},'description':{'type':Sequelize[_0xd515('0x1')]},'html':{'type':Sequelize[_0xd515('0x2')]}};
\ No newline at end of file
diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js
index 7cd1ca5..c5ef596 100644
--- a/server/api/template/template.controller.js
+++ b/server/api/template/template.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4a45=['autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','json','count','offset','limit','status','Content-Range','save','update','then','destroy','get','stack','name','send','index','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick','type','key','VIRTUAL','field','filter','merge','options','Template','includeAll','include','findAll','catch','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId'];(function(_0x186d09,_0x17031d){var _0xb18440=function(_0x3afd38){while(--_0x3afd38){_0x186d09['push'](_0x186d09['shift']());}};_0xb18440(++_0x17031d);}(_0x4a45,0xfd));var _0x54a4=function(_0x5d89ec,_0x3cedab){_0x5d89ec=_0x5d89ec-0x0;var _0x3cc41c=_0x4a45[_0x5d89ec];return _0x3cc41c;};'use strict';var pdf=require(_0x54a4('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x54a4('0x1'));var zipdir=require(_0x54a4('0x2'));var jsonpatch=require(_0x54a4('0x3'));var rp=require(_0x54a4('0x4'));var moment=require(_0x54a4('0x5'));var BPromise=require(_0x54a4('0x6'));var Mustache=require(_0x54a4('0x7'));var util=require(_0x54a4('0x8'));var path=require('path');var sox=require(_0x54a4('0x9'));var csv=require(_0x54a4('0xa'));var ejs=require(_0x54a4('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x54a4('0xc'));var crypto=require('crypto');var jsforce=require(_0x54a4('0xd'));var deskjs=require(_0x54a4('0xe'));var toCsv=require(_0x54a4('0xa'));var querystring=require(_0x54a4('0xf'));var Papa=require(_0x54a4('0x10'));var Redis=require(_0x54a4('0x11'));var authService=require(_0x54a4('0x12'));var qs=require(_0x54a4('0x13'));var hardwareService=require(_0x54a4('0x14'));var logger=require(_0x54a4('0x15'))(_0x54a4('0x16'));var utils=require(_0x54a4('0x17'));var config=require(_0x54a4('0x18'));var db=require(_0x54a4('0x19'))['db'];function respondWithStatusCode(_0x2f957d,_0x16f889){_0x16f889=_0x16f889||0xcc;return function(_0x1ba3c6){if(_0x1ba3c6){return _0x2f957d[_0x54a4('0x1a')](_0x16f889);}return _0x2f957d['status'](_0x16f889)[_0x54a4('0x1b')]();};}function respondWithResult(_0x5c7c29,_0x273f0b){_0x273f0b=_0x273f0b||0xc8;return function(_0x553a2f){if(_0x553a2f){return _0x5c7c29['status'](_0x273f0b)[_0x54a4('0x1c')](_0x553a2f);}};}function respondWithFilteredResult(_0xc9a09a,_0x3fe638){return function(_0x11a3b1){if(_0x11a3b1){var _0xd4a2a4=_0x11a3b1[_0x54a4('0x1d')],_0x5eccf9=_0x3fe638['offset'],_0x462686=_0x3fe638[_0x54a4('0x1e')]+_0x3fe638[_0x54a4('0x1f')],_0x2ae585;if(_0x462686>=_0xd4a2a4){_0x462686=_0xd4a2a4;_0x2ae585=0xc8;}else{_0x2ae585=0xce;}_0xc9a09a[_0x54a4('0x20')](_0x2ae585);return _0xc9a09a['set'](_0x54a4('0x21'),_0x5eccf9+'-'+_0x462686+'/'+_0xd4a2a4)[_0x54a4('0x1c')](_0x11a3b1);}return null;};}function patchUpdates(_0x3c8013){return function(_0x4d1781){try{jsonpatch['apply'](_0x4d1781,_0x3c8013,!![]);}catch(_0x54d5d4){return BPromise['reject'](_0x54d5d4);}return _0x4d1781[_0x54a4('0x22')]();};}function saveUpdates(_0x56c8f8,_0x14f871){return function(_0x22d676){if(_0x22d676){return _0x22d676[_0x54a4('0x23')](_0x56c8f8)[_0x54a4('0x24')](function(_0x16b3e2){return _0x16b3e2;});}return null;};}function removeEntity(_0xddee0e,_0x31f5e1){return function(_0x73e8fb){if(_0x73e8fb){return _0x73e8fb[_0x54a4('0x25')]()[_0x54a4('0x24')](function(){var _0x1b3fd2=_0x73e8fb[_0x54a4('0x26')]({'plain':!![]});var _0x489327='Templates';return db['UserProfileResource'][_0x54a4('0x25')]({'where':{'type':_0x489327,'resourceId':_0x1b3fd2['id']}})['then'](function(){return _0x73e8fb;});})[_0x54a4('0x24')](function(){_0xddee0e[_0x54a4('0x20')](0xcc)[_0x54a4('0x1b')]();});}};}function handleEntityNotFound(_0x4f922c,_0x3a0191){return function(_0x3e7a62){if(!_0x3e7a62){_0x4f922c[_0x54a4('0x1a')](0x194);}return _0x3e7a62;};}function handleError(_0x6966b8,_0x33c9a0){_0x33c9a0=_0x33c9a0||0x1f4;return function(_0x387df9){logger['error'](_0x387df9[_0x54a4('0x27')]);if(_0x387df9[_0x54a4('0x28')]){delete _0x387df9[_0x54a4('0x28')];}_0x6966b8['status'](_0x33c9a0)[_0x54a4('0x29')](_0x387df9);};}exports[_0x54a4('0x2a')]=function(_0x5a0f3e,_0x38798b){var _0x2bc5ac={},_0x2a1e79={},_0x5dff19={'count':0x0,'rows':[]};var _0x1e5086=db['Template'][_0x54a4('0x2b')];_0x2a1e79[_0x54a4('0x2c')]=_[_0x54a4('0x2d')](_0x1e5086);_0x2a1e79[_0x54a4('0x2e')]=_[_0x54a4('0x2d')](_0x5a0f3e[_0x54a4('0x2e')]);_0x2a1e79[_0x54a4('0x2f')]=_[_0x54a4('0x30')](_0x2a1e79[_0x54a4('0x2c')],_0x2a1e79['query']);_0x2bc5ac[_0x54a4('0x31')]=_[_0x54a4('0x30')](_0x2a1e79[_0x54a4('0x2c')],qs[_0x54a4('0x32')](_0x5a0f3e[_0x54a4('0x2e')]['fields']));_0x2bc5ac[_0x54a4('0x31')]=_0x2bc5ac[_0x54a4('0x31')][_0x54a4('0x33')]?_0x2bc5ac['attributes']:_0x2a1e79[_0x54a4('0x2c')];if(!_0x5a0f3e[_0x54a4('0x2e')][_0x54a4('0x34')](_0x54a4('0x35'))){_0x2bc5ac[_0x54a4('0x1f')]=qs[_0x54a4('0x1f')](_0x5a0f3e[_0x54a4('0x2e')][_0x54a4('0x1f')]);_0x2bc5ac[_0x54a4('0x1e')]=qs['offset'](_0x5a0f3e['query']['offset']);}_0x2bc5ac[_0x54a4('0x36')]=qs['sort'](_0x5a0f3e['query']['sort']);_0x2bc5ac[_0x54a4('0x37')]=qs[_0x54a4('0x2f')](_[_0x54a4('0x38')](_0x5a0f3e[_0x54a4('0x2e')],_0x2a1e79['filters']));if(_0x5a0f3e[_0x54a4('0x2e')]['filter']){_0x2bc5ac[_0x54a4('0x37')]=_['merge'](_0x2bc5ac['where'],{'$or':_['map'](_0x1e5086,function(_0x42ab58){if(_0x42ab58[_0x54a4('0x39')][_0x54a4('0x3a')]!==_0x54a4('0x3b')){var _0x50eb1e={};_0x50eb1e[_0x42ab58[_0x54a4('0x3c')]]={'$like':'%'+_0x5a0f3e[_0x54a4('0x2e')][_0x54a4('0x3d')]+'%'};return _0x50eb1e;}})});}_0x2bc5ac=_[_0x54a4('0x3e')]({},_0x2bc5ac,_0x5a0f3e[_0x54a4('0x3f')]);var _0x24fe1a={'where':_0x2bc5ac[_0x54a4('0x37')]};return db[_0x54a4('0x40')][_0x54a4('0x1d')](_0x24fe1a)[_0x54a4('0x24')](function(_0x5cf5c6){_0x5dff19['count']=_0x5cf5c6;if(_0x5a0f3e[_0x54a4('0x2e')][_0x54a4('0x41')]){_0x2bc5ac[_0x54a4('0x42')]=[{'all':!![]}];}return db[_0x54a4('0x40')][_0x54a4('0x43')](_0x2bc5ac);})['then'](function(_0x46b010){_0x5dff19['rows']=_0x46b010;return _0x5dff19;})[_0x54a4('0x24')](respondWithFilteredResult(_0x38798b,_0x2bc5ac))[_0x54a4('0x44')](handleError(_0x38798b,null));};exports[_0x54a4('0x45')]=function(_0x28ec7d,_0x3ea8fb){var _0x4b8022={'raw':!![],'where':{'id':_0x28ec7d[_0x54a4('0x46')]['id']}},_0x5816d6={};_0x5816d6['model']=_[_0x54a4('0x2d')](db[_0x54a4('0x40')][_0x54a4('0x2b')]);_0x5816d6[_0x54a4('0x2e')]=_[_0x54a4('0x2d')](_0x28ec7d['query']);_0x5816d6[_0x54a4('0x2f')]=_[_0x54a4('0x30')](_0x5816d6[_0x54a4('0x2c')],_0x5816d6[_0x54a4('0x2e')]);_0x4b8022['attributes']=_[_0x54a4('0x30')](_0x5816d6['model'],qs['fields'](_0x28ec7d[_0x54a4('0x2e')]['fields']));_0x4b8022[_0x54a4('0x31')]=_0x4b8022['attributes'][_0x54a4('0x33')]?_0x4b8022[_0x54a4('0x31')]:_0x5816d6[_0x54a4('0x2c')];if(_0x28ec7d[_0x54a4('0x2e')]['includeAll']){_0x4b8022[_0x54a4('0x42')]=[{'all':!![]}];}_0x4b8022=_[_0x54a4('0x3e')]({},_0x4b8022,_0x28ec7d[_0x54a4('0x3f')]);return db[_0x54a4('0x40')][_0x54a4('0x47')](_0x4b8022)[_0x54a4('0x24')](handleEntityNotFound(_0x3ea8fb,null))[_0x54a4('0x24')](respondWithResult(_0x3ea8fb,null))[_0x54a4('0x44')](handleError(_0x3ea8fb,null));};exports[_0x54a4('0x48')]=function(_0x388ed0,_0x306f69){return db[_0x54a4('0x40')][_0x54a4('0x48')](_0x388ed0[_0x54a4('0x49')],{})['then'](function(_0x40f82a){var _0x1e5fc8=_0x388ed0[_0x54a4('0x4a')]['get']({'plain':!![]});if(!_0x1e5fc8)throw new Error(_0x54a4('0x4b'));if(_0x1e5fc8[_0x54a4('0x4c')]===_0x54a4('0x4a')){var _0x467ded=_0x40f82a['get']({'plain':!![]});var _0x2520b8='Templates';return db[_0x54a4('0x4d')][_0x54a4('0x47')]({'where':{'name':_0x2520b8,'userProfileId':_0x1e5fc8[_0x54a4('0x4e')]},'raw':!![]})[_0x54a4('0x24')](function(_0x16d597){if(_0x16d597&&_0x16d597[_0x54a4('0x4f')]===0x0){return db[_0x54a4('0x50')][_0x54a4('0x48')]({'name':_0x467ded['name'],'resourceId':_0x467ded['id'],'type':_0x16d597['name'],'sectionId':_0x16d597['id']},{})[_0x54a4('0x24')](function(){return _0x40f82a;});}else{return _0x40f82a;}})[_0x54a4('0x44')](function(_0x4ffeca){logger[_0x54a4('0x51')](_0x54a4('0x52'),_0x4ffeca);throw _0x4ffeca;});}return _0x40f82a;})['then'](respondWithResult(_0x306f69,0xc9))['catch'](handleError(_0x306f69,null));};exports['update']=function(_0x157d36,_0x40eb67){if(_0x157d36[_0x54a4('0x49')]['id']){delete _0x157d36['body']['id'];}return db['Template'][_0x54a4('0x47')]({'where':{'id':_0x157d36[_0x54a4('0x46')]['id']}})['then'](handleEntityNotFound(_0x40eb67,null))['then'](saveUpdates(_0x157d36[_0x54a4('0x49')],null))[_0x54a4('0x24')](respondWithResult(_0x40eb67,null))[_0x54a4('0x44')](handleError(_0x40eb67,null));};exports[_0x54a4('0x25')]=function(_0x2ad408,_0x522768){return db[_0x54a4('0x40')]['find']({'where':{'id':_0x2ad408[_0x54a4('0x46')]['id']}})[_0x54a4('0x24')](handleEntityNotFound(_0x522768,null))[_0x54a4('0x24')](removeEntity(_0x522768,null))[_0x54a4('0x44')](handleError(_0x522768,null));};
\ No newline at end of file
+var _0xb3a8=['ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','count','offset','limit','set','Content-Range','json','reject','save','update','then','destroy','get','UserProfileResource','error','stack','name','send','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','pick','where','merge','map','type','key','field','options','Template','include','findAll','catch','show','params','includeAll','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Templates','UserProfileSection','find','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','rimraf','request-promise','mustache','sox','to-csv','ejs','squel','crypto','desk.js','papaparse'];(function(_0x2eda62,_0x50fc2d){var _0x3733cf=function(_0x1be610){while(--_0x1be610){_0x2eda62['push'](_0x2eda62['shift']());}};_0x3733cf(++_0x50fc2d);}(_0xb3a8,0xd3));var _0x8b3a=function(_0x43d16c,_0x2b5447){_0x43d16c=_0x43d16c-0x0;var _0x208cce=_0xb3a8[_0x43d16c];return _0x208cce;};'use strict';var pdf=require(_0x8b3a('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x8b3a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x8b3a('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x8b3a('0x3'));var util=require('util');var path=require('path');var sox=require(_0x8b3a('0x4'));var csv=require(_0x8b3a('0x5'));var ejs=require(_0x8b3a('0x6'));var fs=require('fs');var _=require('lodash');var squel=require(_0x8b3a('0x7'));var crypto=require(_0x8b3a('0x8'));var jsforce=require('jsforce');var deskjs=require(_0x8b3a('0x9'));var toCsv=require(_0x8b3a('0x5'));var querystring=require('querystring');var Papa=require(_0x8b3a('0xa'));var Redis=require(_0x8b3a('0xb'));var authService=require(_0x8b3a('0xc'));var qs=require(_0x8b3a('0xd'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8b3a('0xe'))(_0x8b3a('0xf'));var utils=require(_0x8b3a('0x10'));var config=require(_0x8b3a('0x11'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x597d9f,_0x343bf4){_0x343bf4=_0x343bf4||0xcc;return function(_0x2c998e){if(_0x2c998e){return _0x597d9f[_0x8b3a('0x12')](_0x343bf4);}return _0x597d9f[_0x8b3a('0x13')](_0x343bf4)[_0x8b3a('0x14')]();};}function respondWithResult(_0x2d2b14,_0xca5d63){_0xca5d63=_0xca5d63||0xc8;return function(_0x144180){if(_0x144180){return _0x2d2b14[_0x8b3a('0x13')](_0xca5d63)['json'](_0x144180);}};}function respondWithFilteredResult(_0x445b60,_0x37860f){return function(_0x5c8c11){if(_0x5c8c11){var _0x289e47=_0x5c8c11[_0x8b3a('0x15')],_0x58fa21=_0x37860f['offset'],_0x522c86=_0x37860f[_0x8b3a('0x16')]+_0x37860f[_0x8b3a('0x17')],_0x36a557;if(_0x522c86>=_0x289e47){_0x522c86=_0x289e47;_0x36a557=0xc8;}else{_0x36a557=0xce;}_0x445b60['status'](_0x36a557);return _0x445b60[_0x8b3a('0x18')](_0x8b3a('0x19'),_0x58fa21+'-'+_0x522c86+'/'+_0x289e47)[_0x8b3a('0x1a')](_0x5c8c11);}return null;};}function patchUpdates(_0x422c7f){return function(_0x20f97e){try{jsonpatch['apply'](_0x20f97e,_0x422c7f,!![]);}catch(_0x1dc4df){return BPromise[_0x8b3a('0x1b')](_0x1dc4df);}return _0x20f97e[_0x8b3a('0x1c')]();};}function saveUpdates(_0x4da834,_0x23a10b){return function(_0x4a99fe){if(_0x4a99fe){return _0x4a99fe[_0x8b3a('0x1d')](_0x4da834)[_0x8b3a('0x1e')](function(_0x41e62d){return _0x41e62d;});}return null;};}function removeEntity(_0x27862d,_0x4e4858){return function(_0x560d24){if(_0x560d24){return _0x560d24[_0x8b3a('0x1f')]()['then'](function(){var _0x1eef81=_0x560d24[_0x8b3a('0x20')]({'plain':!![]});var _0xf89cd0='Templates';return db[_0x8b3a('0x21')]['destroy']({'where':{'type':_0xf89cd0,'resourceId':_0x1eef81['id']}})[_0x8b3a('0x1e')](function(){return _0x560d24;});})[_0x8b3a('0x1e')](function(){_0x27862d[_0x8b3a('0x13')](0xcc)[_0x8b3a('0x14')]();});}};}function handleEntityNotFound(_0x5b5ce2,_0x1dd413){return function(_0x5f5db1){if(!_0x5f5db1){_0x5b5ce2[_0x8b3a('0x12')](0x194);}return _0x5f5db1;};}function handleError(_0x44f878,_0x328d39){_0x328d39=_0x328d39||0x1f4;return function(_0x5a711c){logger[_0x8b3a('0x22')](_0x5a711c[_0x8b3a('0x23')]);if(_0x5a711c[_0x8b3a('0x24')]){delete _0x5a711c[_0x8b3a('0x24')];}_0x44f878[_0x8b3a('0x13')](_0x328d39)[_0x8b3a('0x25')](_0x5a711c);};}exports['index']=function(_0x11e833,_0x39a4d8){var _0x498af8={},_0x57ac60={},_0x462712={'count':0x0,'rows':[]};var _0x251e78=db['Template'][_0x8b3a('0x26')];_0x57ac60[_0x8b3a('0x27')]=_['keys'](_0x251e78);_0x57ac60['query']=_[_0x8b3a('0x28')](_0x11e833[_0x8b3a('0x29')]);_0x57ac60[_0x8b3a('0x2a')]=_[_0x8b3a('0x2b')](_0x57ac60['model'],_0x57ac60[_0x8b3a('0x29')]);_0x498af8[_0x8b3a('0x2c')]=_[_0x8b3a('0x2b')](_0x57ac60['model'],qs[_0x8b3a('0x2d')](_0x11e833[_0x8b3a('0x29')][_0x8b3a('0x2d')]));_0x498af8['attributes']=_0x498af8['attributes'][_0x8b3a('0x2e')]?_0x498af8[_0x8b3a('0x2c')]:_0x57ac60[_0x8b3a('0x27')];if(!_0x11e833[_0x8b3a('0x29')][_0x8b3a('0x2f')]('nolimit')){_0x498af8['limit']=qs[_0x8b3a('0x17')](_0x11e833[_0x8b3a('0x29')][_0x8b3a('0x17')]);_0x498af8[_0x8b3a('0x16')]=qs[_0x8b3a('0x16')](_0x11e833[_0x8b3a('0x29')][_0x8b3a('0x16')]);}_0x498af8[_0x8b3a('0x30')]=qs['sort'](_0x11e833[_0x8b3a('0x29')][_0x8b3a('0x31')]);_0x498af8['where']=qs[_0x8b3a('0x2a')](_[_0x8b3a('0x32')](_0x11e833[_0x8b3a('0x29')],_0x57ac60[_0x8b3a('0x2a')]));if(_0x11e833['query']['filter']){_0x498af8[_0x8b3a('0x33')]=_[_0x8b3a('0x34')](_0x498af8['where'],{'$or':_[_0x8b3a('0x35')](_0x251e78,function(_0x5ed24e){if(_0x5ed24e[_0x8b3a('0x36')][_0x8b3a('0x37')]!=='VIRTUAL'){var _0x56445d={};_0x56445d[_0x5ed24e[_0x8b3a('0x38')]]={'$like':'%'+_0x11e833[_0x8b3a('0x29')]['filter']+'%'};return _0x56445d;}})});}_0x498af8=_[_0x8b3a('0x34')]({},_0x498af8,_0x11e833[_0x8b3a('0x39')]);var _0x462f91={'where':_0x498af8['where']};return db[_0x8b3a('0x3a')][_0x8b3a('0x15')](_0x462f91)[_0x8b3a('0x1e')](function(_0x26c279){_0x462712['count']=_0x26c279;if(_0x11e833[_0x8b3a('0x29')]['includeAll']){_0x498af8[_0x8b3a('0x3b')]=[{'all':!![]}];}return db[_0x8b3a('0x3a')][_0x8b3a('0x3c')](_0x498af8);})[_0x8b3a('0x1e')](function(_0x913f5f){_0x462712['rows']=_0x913f5f;return _0x462712;})['then'](respondWithFilteredResult(_0x39a4d8,_0x498af8))[_0x8b3a('0x3d')](handleError(_0x39a4d8,null));};exports[_0x8b3a('0x3e')]=function(_0x1ed8e9,_0x40303d){var _0x16ec96={'raw':!![],'where':{'id':_0x1ed8e9[_0x8b3a('0x3f')]['id']}},_0x1eda21={};_0x1eda21[_0x8b3a('0x27')]=_[_0x8b3a('0x28')](db['Template']['rawAttributes']);_0x1eda21[_0x8b3a('0x29')]=_['keys'](_0x1ed8e9[_0x8b3a('0x29')]);_0x1eda21[_0x8b3a('0x2a')]=_['intersection'](_0x1eda21['model'],_0x1eda21[_0x8b3a('0x29')]);_0x16ec96['attributes']=_[_0x8b3a('0x2b')](_0x1eda21[_0x8b3a('0x27')],qs[_0x8b3a('0x2d')](_0x1ed8e9[_0x8b3a('0x29')][_0x8b3a('0x2d')]));_0x16ec96[_0x8b3a('0x2c')]=_0x16ec96[_0x8b3a('0x2c')][_0x8b3a('0x2e')]?_0x16ec96[_0x8b3a('0x2c')]:_0x1eda21['model'];if(_0x1ed8e9[_0x8b3a('0x29')][_0x8b3a('0x40')]){_0x16ec96[_0x8b3a('0x3b')]=[{'all':!![]}];}_0x16ec96=_[_0x8b3a('0x34')]({},_0x16ec96,_0x1ed8e9['options']);return db[_0x8b3a('0x3a')]['find'](_0x16ec96)[_0x8b3a('0x1e')](handleEntityNotFound(_0x40303d,null))[_0x8b3a('0x1e')](respondWithResult(_0x40303d,null))['catch'](handleError(_0x40303d,null));};exports[_0x8b3a('0x41')]=function(_0x4d02e8,_0xad29a){return db['Template'][_0x8b3a('0x41')](_0x4d02e8[_0x8b3a('0x42')],{})['then'](function(_0x4b79f2){var _0x3fd1bb=_0x4d02e8[_0x8b3a('0x43')][_0x8b3a('0x20')]({'plain':!![]});if(!_0x3fd1bb)throw new Error(_0x8b3a('0x44'));if(_0x3fd1bb[_0x8b3a('0x45')]==='user'){var _0x48c54f=_0x4b79f2[_0x8b3a('0x20')]({'plain':!![]});var _0x498c8c=_0x8b3a('0x46');return db[_0x8b3a('0x47')][_0x8b3a('0x48')]({'where':{'name':_0x498c8c,'userProfileId':_0x3fd1bb['userProfileId']},'raw':!![]})[_0x8b3a('0x1e')](function(_0x3507f2){if(_0x3507f2&&_0x3507f2['autoAssociation']===0x0){return db[_0x8b3a('0x21')][_0x8b3a('0x41')]({'name':_0x48c54f[_0x8b3a('0x24')],'resourceId':_0x48c54f['id'],'type':_0x3507f2[_0x8b3a('0x24')],'sectionId':_0x3507f2['id']},{})[_0x8b3a('0x1e')](function(){return _0x4b79f2;});}else{return _0x4b79f2;}})[_0x8b3a('0x3d')](function(_0x44360a){logger[_0x8b3a('0x22')](_0x8b3a('0x49'),_0x44360a);throw _0x44360a;});}return _0x4b79f2;})[_0x8b3a('0x1e')](respondWithResult(_0xad29a,0xc9))[_0x8b3a('0x3d')](handleError(_0xad29a,null));};exports[_0x8b3a('0x1d')]=function(_0x2be5cb,_0x14ecb6){if(_0x2be5cb['body']['id']){delete _0x2be5cb[_0x8b3a('0x42')]['id'];}return db[_0x8b3a('0x3a')][_0x8b3a('0x48')]({'where':{'id':_0x2be5cb['params']['id']}})[_0x8b3a('0x1e')](handleEntityNotFound(_0x14ecb6,null))['then'](saveUpdates(_0x2be5cb[_0x8b3a('0x42')],null))[_0x8b3a('0x1e')](respondWithResult(_0x14ecb6,null))[_0x8b3a('0x3d')](handleError(_0x14ecb6,null));};exports[_0x8b3a('0x1f')]=function(_0x36be32,_0x7950d7){return db[_0x8b3a('0x3a')][_0x8b3a('0x48')]({'where':{'id':_0x36be32['params']['id']}})[_0x8b3a('0x1e')](handleEntityNotFound(_0x7950d7,null))[_0x8b3a('0x1e')](removeEntity(_0x7950d7,null))[_0x8b3a('0x3d')](handleError(_0x7950d7,null));};
\ No newline at end of file
diff --git a/server/api/template/template.model.js b/server/api/template/template.model.js
index 09686c6..5401919 100644
--- a/server/api/template/template.model.js
+++ b/server/api/template/template.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x34b7=['request-promise','path','./template.attributes','exports','define','Template','../../config/logger','api','moment','bluebird'];(function(_0x44b346,_0xeb097d){var _0x1c2f2b=function(_0x4e1f23){while(--_0x4e1f23){_0x44b346['push'](_0x44b346['shift']());}};_0x1c2f2b(++_0xeb097d);}(_0x34b7,0x196));var _0x734b=function(_0x357f0a,_0x37aa60){_0x357f0a=_0x357f0a-0x0;var _0x10d41b=_0x34b7[_0x357f0a];return _0x10d41b;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x734b('0x0'))(_0x734b('0x1'));var moment=require(_0x734b('0x2'));var BPromise=require(_0x734b('0x3'));var rp=require(_0x734b('0x4'));var fs=require('fs');var path=require(_0x734b('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x734b('0x6'));module[_0x734b('0x7')]=function(_0x2f3128,_0x34fd70){return _0x2f3128[_0x734b('0x8')](_0x734b('0x9'),attributes,{'tableName':'tools_templates','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9354=['../../config/environment','./template.attributes','exports','define','Template','tools_templates','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x602ca8,_0x568e82){var _0x26e8ab=function(_0x3fb700){while(--_0x3fb700){_0x602ca8['push'](_0x602ca8['shift']());}};_0x26e8ab(++_0x568e82);}(_0x9354,0x96));var _0x4935=function(_0x4c1ad8,_0x55e28d){_0x4c1ad8=_0x4c1ad8-0x0;var _0x2c617b=_0x9354[_0x4c1ad8];return _0x2c617b;};'use strict';var _=require('lodash');var util=require(_0x4935('0x0'));var logger=require(_0x4935('0x1'))('api');var moment=require(_0x4935('0x2'));var BPromise=require(_0x4935('0x3'));var rp=require(_0x4935('0x4'));var fs=require('fs');var path=require(_0x4935('0x5'));var rimraf=require('rimraf');var config=require(_0x4935('0x6'));var attributes=require(_0x4935('0x7'));module[_0x4935('0x8')]=function(_0x2d518a,_0x263864){return _0x2d518a[_0x4935('0x9')](_0x4935('0xa'),attributes,{'tableName':_0x4935('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/template/template.rpc.js b/server/api/template/template.rpc.js
index a314031..c0aab76 100644
--- a/server/api/template/template.rpc.js
+++ b/server/api/template/template.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe7a9=['error','code','Template,\x20%s,\x20%s','message','result','catch','GetTemplate','findAll','options','where','attributes','map','include','model','debug','lodash','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','request\x20sent','Template,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x141c3b,_0x3d461f){var _0xa7957b=function(_0x5ebd33){while(--_0x5ebd33){_0x141c3b['push'](_0x141c3b['shift']());}};_0xa7957b(++_0x3d461f);}(_0xe7a9,0x127));var _0x9e7a=function(_0x130f40,_0x4eeb8a){_0x130f40=_0x130f40-0x0;var _0xc1348f=_0xe7a9[_0x130f40];return _0xc1348f;};'use strict';var _=require(_0x9e7a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9e7a('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9e7a('0x2'));var logger=require(_0x9e7a('0x3'))(_0x9e7a('0x4'));var config=require(_0x9e7a('0x5'));var jayson=require(_0x9e7a('0x6'));var client=jayson[_0x9e7a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x47db4b,_0x3fbe1b,_0x34d237){return new BPromise(function(_0x57d81a,_0x40b2b2){return client['request'](_0x47db4b,_0x34d237)[_0x9e7a('0x8')](function(_0xc420fb){logger[_0x9e7a('0x9')]('Template,\x20%s,\x20%s',_0x3fbe1b,_0x9e7a('0xa'));logger['debug'](_0x9e7a('0xb'),_0x3fbe1b,_0x9e7a('0xa'),JSON[_0x9e7a('0xc')](_0xc420fb));if(_0xc420fb[_0x9e7a('0xd')]){if(_0xc420fb[_0x9e7a('0xd')][_0x9e7a('0xe')]===0x1f4){logger[_0x9e7a('0xd')](_0x9e7a('0xf'),_0x3fbe1b,_0xc420fb['error'][_0x9e7a('0x10')]);return _0x40b2b2(_0xc420fb[_0x9e7a('0xd')][_0x9e7a('0x10')]);}logger[_0x9e7a('0xd')]('Template,\x20%s,\x20%s',_0x3fbe1b,_0xc420fb[_0x9e7a('0xd')][_0x9e7a('0x10')]);return _0x57d81a(_0xc420fb[_0x9e7a('0xd')][_0x9e7a('0x10')]);}else{logger[_0x9e7a('0x9')](_0x9e7a('0xf'),_0x3fbe1b,'request\x20sent');_0x57d81a(_0xc420fb[_0x9e7a('0x11')][_0x9e7a('0x10')]);}})[_0x9e7a('0x12')](function(_0x454f95){logger[_0x9e7a('0xd')]('Template,\x20%s,\x20%s',_0x3fbe1b,_0x454f95);_0x40b2b2(_0x454f95);});});}exports[_0x9e7a('0x13')]=function(_0x35b9d7){var _0x186fc1=this;return new Promise(function(_0x5a5de6,_0x695c39){return db['Template'][_0x9e7a('0x14')]({'raw':_0x35b9d7[_0x9e7a('0x15')]?_0x35b9d7[_0x9e7a('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x35b9d7[_0x9e7a('0x15')]?_0x35b9d7[_0x9e7a('0x15')][_0x9e7a('0x16')]||null:null,'attributes':_0x35b9d7['options']?_0x35b9d7[_0x9e7a('0x15')][_0x9e7a('0x17')]||null:null,'limit':_0x35b9d7[_0x9e7a('0x15')]?_0x35b9d7['options']['limit']||null:null,'include':_0x35b9d7[_0x9e7a('0x15')]?_0x35b9d7[_0x9e7a('0x15')]['include']?_[_0x9e7a('0x18')](_0x35b9d7[_0x9e7a('0x15')][_0x9e7a('0x19')],function(_0x4ad77a){return{'model':db[_0x4ad77a['model']],'as':_0x4ad77a['as'],'attributes':_0x4ad77a[_0x9e7a('0x17')],'include':_0x4ad77a[_0x9e7a('0x19')]?_['map'](_0x4ad77a[_0x9e7a('0x19')],function(_0x39055f){return{'model':db[_0x39055f[_0x9e7a('0x1a')]],'as':_0x39055f['as'],'attributes':_0x39055f[_0x9e7a('0x17')],'include':_0x39055f[_0x9e7a('0x19')]?_[_0x9e7a('0x18')](_0x39055f[_0x9e7a('0x19')],function(_0x468a56){return{'model':db[_0x468a56[_0x9e7a('0x1a')]],'as':_0x468a56['as'],'attributes':_0x468a56[_0x9e7a('0x17')]};}):[]};}):[]};}):[]:[]})[_0x9e7a('0x8')](function(_0x47f267){logger[_0x9e7a('0x9')](_0x9e7a('0x13'),_0x35b9d7);logger[_0x9e7a('0x1b')]('GetTemplate',_0x35b9d7,JSON[_0x9e7a('0xc')](_0x47f267));_0x5a5de6(_0x47f267);})['catch'](function(_0x190336){logger[_0x9e7a('0xd')]('GetTemplate',_0x190336[_0x9e7a('0x10')],_0x35b9d7);_0x695c39(_0x186fc1[_0x9e7a('0xd')](0x1f4,_0x190336[_0x9e7a('0x10')]));});});};
\ No newline at end of file
+var _0x691a=['include','map','model','debug','GetTemplate','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Template,\x20%s,\x20%s','request\x20sent','Template,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','findAll','options','where','attributes'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x691a,0x1a5));var _0xa691=function(_0x5ddf8e,_0x3e318d){_0x5ddf8e=_0x5ddf8e-0x0;var _0x26dfba=_0x691a[_0x5ddf8e];return _0x26dfba;};'use strict';var _=require(_0xa691('0x0'));var util=require(_0xa691('0x1'));var moment=require(_0xa691('0x2'));var BPromise=require(_0xa691('0x3'));var rs=require(_0xa691('0x4'));var fs=require('fs');var Redis=require(_0xa691('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xa691('0x6'));var logger=require('../../config/logger')(_0xa691('0x7'));var config=require(_0xa691('0x8'));var jayson=require(_0xa691('0x9'));var client=jayson[_0xa691('0xa')][_0xa691('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4d8b22,_0x11e631,_0x54d8a3){return new BPromise(function(_0x22079c,_0x1b1131){return client[_0xa691('0xc')](_0x4d8b22,_0x54d8a3)[_0xa691('0xd')](function(_0x35795e){logger[_0xa691('0xe')](_0xa691('0xf'),_0x11e631,_0xa691('0x10'));logger['debug'](_0xa691('0x11'),_0x11e631,_0xa691('0x10'),JSON[_0xa691('0x12')](_0x35795e));if(_0x35795e[_0xa691('0x13')]){if(_0x35795e[_0xa691('0x13')][_0xa691('0x14')]===0x1f4){logger[_0xa691('0x13')](_0xa691('0xf'),_0x11e631,_0x35795e['error'][_0xa691('0x15')]);return _0x1b1131(_0x35795e['error'][_0xa691('0x15')]);}logger['error'](_0xa691('0xf'),_0x11e631,_0x35795e['error'][_0xa691('0x15')]);return _0x22079c(_0x35795e['error'][_0xa691('0x15')]);}else{logger[_0xa691('0xe')]('Template,\x20%s,\x20%s',_0x11e631,_0xa691('0x10'));_0x22079c(_0x35795e['result'][_0xa691('0x15')]);}})[_0xa691('0x16')](function(_0x51acaa){logger[_0xa691('0x13')](_0xa691('0xf'),_0x11e631,_0x51acaa);_0x1b1131(_0x51acaa);});});}exports['GetTemplate']=function(_0x9a663e){var _0x4fcdfa=this;return new Promise(function(_0x2d5a40,_0xdc2a3f){return db['Template'][_0xa691('0x17')]({'raw':_0x9a663e[_0xa691('0x18')]?_0x9a663e['options']['raw']===undefined?!![]:![]:!![],'where':_0x9a663e[_0xa691('0x18')]?_0x9a663e['options'][_0xa691('0x19')]||null:null,'attributes':_0x9a663e[_0xa691('0x18')]?_0x9a663e[_0xa691('0x18')][_0xa691('0x1a')]||null:null,'limit':_0x9a663e['options']?_0x9a663e['options']['limit']||null:null,'include':_0x9a663e['options']?_0x9a663e[_0xa691('0x18')][_0xa691('0x1b')]?_[_0xa691('0x1c')](_0x9a663e[_0xa691('0x18')][_0xa691('0x1b')],function(_0x345ed7){return{'model':db[_0x345ed7[_0xa691('0x1d')]],'as':_0x345ed7['as'],'attributes':_0x345ed7[_0xa691('0x1a')],'include':_0x345ed7[_0xa691('0x1b')]?_[_0xa691('0x1c')](_0x345ed7[_0xa691('0x1b')],function(_0x359281){return{'model':db[_0x359281[_0xa691('0x1d')]],'as':_0x359281['as'],'attributes':_0x359281['attributes'],'include':_0x359281[_0xa691('0x1b')]?_[_0xa691('0x1c')](_0x359281['include'],function(_0x2271da){return{'model':db[_0x2271da[_0xa691('0x1d')]],'as':_0x2271da['as'],'attributes':_0x2271da[_0xa691('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xa691('0xd')](function(_0x1046a1){logger[_0xa691('0xe')]('GetTemplate',_0x9a663e);logger[_0xa691('0x1e')](_0xa691('0x1f'),_0x9a663e,JSON[_0xa691('0x12')](_0x1046a1));_0x2d5a40(_0x1046a1);})[_0xa691('0x16')](function(_0x5218df){logger[_0xa691('0x13')](_0xa691('0x1f'),_0x5218df[_0xa691('0x15')],_0x9a663e);_0xdc2a3f(_0x4fcdfa[_0xa691('0x13')](0x1f4,_0x5218df[_0xa691('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js
index 115a951..a6bbfde 100644
--- a/server/api/trigger/index.js
+++ b/server/api/trigger/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['Router','../../components/interaction/service','../../config/environment','./trigger.controller','get','isAuthenticated','/:id','/:id/all_conditions','/:id/any_conditions','getAnyConditions','/:id/actions','create','post','addAllCondition','addAnyCondition','addAction','update','exports','multer','util','path'];(function(_0x35fb63,_0x2255ba){var _0x3324b1=function(_0x2b3537){while(--_0x2b3537){_0x35fb63['push'](_0x35fb63['shift']());}};_0x3324b1(++_0x2255ba);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3c4737,_0x2329ec){_0x3c4737=_0x3c4737-0x0;var _0x2bb926=_0xa9e0[_0x3c4737];return _0x2bb926;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x0a9e('0x4'));var config=require(_0x0a9e('0x5'));var controller=require(_0x0a9e('0x6'));router[_0x0a9e('0x7')]('/',auth[_0x0a9e('0x8')](),controller['index']);router[_0x0a9e('0x7')](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller['show']);router['get'](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['getAllConditions']);router[_0x0a9e('0x7')](_0x0a9e('0xb'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xc')]);router[_0x0a9e('0x7')](_0x0a9e('0xd'),auth['isAuthenticated'](),controller['getActions']);router['post']('/',auth['isAuthenticated'](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')](_0x0a9e('0xa'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')]('/:id/any_conditions',auth[_0x0a9e('0x8')](),controller[_0x0a9e('0x11')]);router[_0x0a9e('0xf')](_0x0a9e('0xd'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0x12')]);router['put'](_0x0a9e('0x9'),auth['isAuthenticated'](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller['destroy']);module[_0x0a9e('0x14')]=router;
\ No newline at end of file
+var _0xa9e0=['Router','../../components/interaction/service','../../config/environment','./trigger.controller','get','isAuthenticated','/:id','/:id/all_conditions','/:id/any_conditions','getAnyConditions','/:id/actions','create','post','addAllCondition','addAnyCondition','addAction','update','exports','multer','util','path'];(function(_0x483ab2,_0x16f6cb){var _0x5b84af=function(_0x295492){while(--_0x295492){_0x483ab2['push'](_0x483ab2['shift']());}};_0x5b84af(++_0x16f6cb);}(_0xa9e0,0x123));var _0x0a9e=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0xa9e0[_0x187ee1];return _0x388160;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x0a9e('0x4'));var config=require(_0x0a9e('0x5'));var controller=require(_0x0a9e('0x6'));router[_0x0a9e('0x7')]('/',auth[_0x0a9e('0x8')](),controller['index']);router[_0x0a9e('0x7')](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller['show']);router['get'](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['getAllConditions']);router[_0x0a9e('0x7')](_0x0a9e('0xb'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xc')]);router[_0x0a9e('0x7')](_0x0a9e('0xd'),auth['isAuthenticated'](),controller['getActions']);router['post']('/',auth['isAuthenticated'](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')](_0x0a9e('0xa'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')]('/:id/any_conditions',auth[_0x0a9e('0x8')](),controller[_0x0a9e('0x11')]);router[_0x0a9e('0xf')](_0x0a9e('0xd'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0x12')]);router['put'](_0x0a9e('0x9'),auth['isAuthenticated'](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0x9'),auth[_0x0a9e('0x8')](),controller['destroy']);module[_0x0a9e('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/trigger/trigger.attributes.js b/server/api/trigger/trigger.attributes.js
index f48907b..8ca1825 100644
--- a/server/api/trigger/trigger.attributes.js
+++ b/server/api/trigger/trigger.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3dbb=['STRING','BOOLEAN','sequelize','exports'];(function(_0x1bc407,_0x3f1881){var _0x34c9e3=function(_0x3d10c7){while(--_0x3d10c7){_0x1bc407['push'](_0x1bc407['shift']());}};_0x34c9e3(++_0x3f1881);}(_0x3dbb,0x10a));var _0xb3db=function(_0x1624f5,_0xa2f147){_0x1624f5=_0x1624f5-0x0;var _0x23b431=_0x3dbb[_0x1624f5];return _0x23b431;};'use strict';var Sequelize=require(_0xb3db('0x0'));module[_0xb3db('0x1')]={'name':{'type':Sequelize[_0xb3db('0x2')]},'channel':{'type':Sequelize[_0xb3db('0x2')]},'description':{'type':Sequelize[_0xb3db('0x2')]},'status':{'type':Sequelize[_0xb3db('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0x7e59=['STRING','BOOLEAN','sequelize','exports'];(function(_0x4c2f17,_0x5c6821){var _0x20919e=function(_0x31eef7){while(--_0x31eef7){_0x4c2f17['push'](_0x4c2f17['shift']());}};_0x20919e(++_0x5c6821);}(_0x7e59,0x146));var _0x97e5=function(_0x55593f,_0x4a39d9){_0x55593f=_0x55593f-0x0;var _0x159e06=_0x7e59[_0x55593f];return _0x159e06;};'use strict';var Sequelize=require(_0x97e5('0x0'));module[_0x97e5('0x1')]={'name':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x97e5('0x2')]},'description':{'type':Sequelize[_0x97e5('0x2')]},'status':{'type':Sequelize[_0x97e5('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js
index 34760d9..3fbc80b 100644
--- a/server/api/trigger/trigger.controller.js
+++ b/server/api/trigger/trigger.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa74f=['../../mysqldb','sendStatus','status','end','json','count','offset','limit','reject','save','update','destroy','then','error','name','send','Trigger','keys','filters','intersection','model','query','fields','attributes','hasOwnProperty','nolimit','order','sort','filter','where','merge','map','key','VIRTUAL','field','options','include','findAll','rows','catch','show','rawAttributes','length','includeAll','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','addAllCondition','addAnyCondition','Condition','getAllConditions','findOne','pick','getAnyConditions','addAction','getActions','Action','rimraf','request-promise','moment','bluebird','mustache','path','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment'];(function(_0xceb524,_0x5566ee){var _0x428c07=function(_0x259af2){while(--_0x259af2){_0xceb524['push'](_0xceb524['shift']());}};_0x428c07(++_0x5566ee);}(_0xa74f,0x9a));var _0xfa74=function(_0x10291b,_0x518773){_0x10291b=_0x10291b-0x0;var _0x1d5fbe=_0xa74f[_0x10291b];return _0x1d5fbe;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xfa74('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xfa74('0x1'));var moment=require(_0xfa74('0x2'));var BPromise=require(_0xfa74('0x3'));var Mustache=require(_0xfa74('0x4'));var util=require('util');var path=require(_0xfa74('0x5'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xfa74('0x6'));var fs=require('fs');var _=require(_0xfa74('0x7'));var squel=require(_0xfa74('0x8'));var crypto=require(_0xfa74('0x9'));var jsforce=require(_0xfa74('0xa'));var deskjs=require(_0xfa74('0xb'));var toCsv=require('to-csv');var querystring=require(_0xfa74('0xc'));var Papa=require(_0xfa74('0xd'));var Redis=require(_0xfa74('0xe'));var authService=require(_0xfa74('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xfa74('0x10'));var logger=require(_0xfa74('0x11'))('api');var utils=require(_0xfa74('0x12'));var config=require(_0xfa74('0x13'));var db=require(_0xfa74('0x14'))['db'];function respondWithStatusCode(_0x307d35,_0x5bc6b7){_0x5bc6b7=_0x5bc6b7||0xcc;return function(_0x23591a){if(_0x23591a){return _0x307d35[_0xfa74('0x15')](_0x5bc6b7);}return _0x307d35[_0xfa74('0x16')](_0x5bc6b7)[_0xfa74('0x17')]();};}function respondWithResult(_0x4ad407,_0x3553e7){_0x3553e7=_0x3553e7||0xc8;return function(_0x33cda3){if(_0x33cda3){return _0x4ad407[_0xfa74('0x16')](_0x3553e7)[_0xfa74('0x18')](_0x33cda3);}};}function respondWithFilteredResult(_0xe3c97e,_0x47c8fb){return function(_0x199d20){if(_0x199d20){var _0x13d911=_0x199d20[_0xfa74('0x19')],_0x947da6=_0x47c8fb[_0xfa74('0x1a')],_0x1f1de0=_0x47c8fb['offset']+_0x47c8fb[_0xfa74('0x1b')],_0x3867f8;if(_0x1f1de0>=_0x13d911){_0x1f1de0=_0x13d911;_0x3867f8=0xc8;}else{_0x3867f8=0xce;}_0xe3c97e[_0xfa74('0x16')](_0x3867f8);return _0xe3c97e['set']('Content-Range',_0x947da6+'-'+_0x1f1de0+'/'+_0x13d911)[_0xfa74('0x18')](_0x199d20);}return null;};}function patchUpdates(_0x25a36b){return function(_0xb8fe6b){try{jsonpatch['apply'](_0xb8fe6b,_0x25a36b,!![]);}catch(_0x3bede6){return BPromise[_0xfa74('0x1c')](_0x3bede6);}return _0xb8fe6b[_0xfa74('0x1d')]();};}function saveUpdates(_0x59a00c,_0xd35110){return function(_0x302eb4){if(_0x302eb4){return _0x302eb4[_0xfa74('0x1e')](_0x59a00c)['then'](function(_0x5466ca){return _0x5466ca;});}return null;};}function removeEntity(_0x100851,_0x2257a0){return function(_0x9932db){if(_0x9932db){return _0x9932db[_0xfa74('0x1f')]()[_0xfa74('0x20')](function(){var _0x554e0e=_0x9932db['get']({'plain':!![]});var _0x3721bf='Triggers';return db['UserProfileResource']['destroy']({'where':{'type':_0x3721bf,'resourceId':_0x554e0e['id']}})[_0xfa74('0x20')](function(){return _0x9932db;});})[_0xfa74('0x20')](function(){_0x100851[_0xfa74('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x530f99,_0x9eb68c){return function(_0xeb6c11){if(!_0xeb6c11){_0x530f99['sendStatus'](0x194);}return _0xeb6c11;};}function handleError(_0x62e1be,_0x5d3b26){_0x5d3b26=_0x5d3b26||0x1f4;return function(_0x1a8cf7){logger[_0xfa74('0x21')](_0x1a8cf7['stack']);if(_0x1a8cf7[_0xfa74('0x22')]){delete _0x1a8cf7[_0xfa74('0x22')];}_0x62e1be[_0xfa74('0x16')](_0x5d3b26)[_0xfa74('0x23')](_0x1a8cf7);};}exports['index']=function(_0xd9c55d,_0x2f7cd7){var _0x204e01={},_0x57d90e={},_0x4d4bed={'count':0x0,'rows':[]};var _0x1322a4=db[_0xfa74('0x24')]['rawAttributes'];_0x57d90e['model']=_[_0xfa74('0x25')](_0x1322a4);_0x57d90e['query']=_[_0xfa74('0x25')](_0xd9c55d['query']);_0x57d90e[_0xfa74('0x26')]=_[_0xfa74('0x27')](_0x57d90e[_0xfa74('0x28')],_0x57d90e[_0xfa74('0x29')]);_0x204e01['attributes']=_[_0xfa74('0x27')](_0x57d90e[_0xfa74('0x28')],qs[_0xfa74('0x2a')](_0xd9c55d[_0xfa74('0x29')][_0xfa74('0x2a')]));_0x204e01[_0xfa74('0x2b')]=_0x204e01[_0xfa74('0x2b')]['length']?_0x204e01[_0xfa74('0x2b')]:_0x57d90e['model'];if(!_0xd9c55d[_0xfa74('0x29')][_0xfa74('0x2c')](_0xfa74('0x2d'))){_0x204e01[_0xfa74('0x1b')]=qs['limit'](_0xd9c55d['query'][_0xfa74('0x1b')]);_0x204e01[_0xfa74('0x1a')]=qs[_0xfa74('0x1a')](_0xd9c55d[_0xfa74('0x29')]['offset']);}_0x204e01[_0xfa74('0x2e')]=qs[_0xfa74('0x2f')](_0xd9c55d['query']['sort']);_0x204e01['where']=qs['filters'](_['pick'](_0xd9c55d[_0xfa74('0x29')],_0x57d90e[_0xfa74('0x26')]));if(_0xd9c55d[_0xfa74('0x29')][_0xfa74('0x30')]){_0x204e01[_0xfa74('0x31')]=_[_0xfa74('0x32')](_0x204e01[_0xfa74('0x31')],{'$or':_[_0xfa74('0x33')](_0x1322a4,function(_0x1a2d52){if(_0x1a2d52['type'][_0xfa74('0x34')]!==_0xfa74('0x35')){var _0x430339={};_0x430339[_0x1a2d52[_0xfa74('0x36')]]={'$like':'%'+_0xd9c55d[_0xfa74('0x29')][_0xfa74('0x30')]+'%'};return _0x430339;}})});}_0x204e01=_['merge']({},_0x204e01,_0xd9c55d[_0xfa74('0x37')]);var _0x1f0806={'where':_0x204e01[_0xfa74('0x31')]};return db[_0xfa74('0x24')]['count'](_0x1f0806)[_0xfa74('0x20')](function(_0x13d9a5){_0x4d4bed[_0xfa74('0x19')]=_0x13d9a5;if(_0xd9c55d[_0xfa74('0x29')]['includeAll']){_0x204e01[_0xfa74('0x38')]=[{'all':!![]}];}return db[_0xfa74('0x24')][_0xfa74('0x39')](_0x204e01);})['then'](function(_0x5d32bc){_0x4d4bed[_0xfa74('0x3a')]=_0x5d32bc;return _0x4d4bed;})[_0xfa74('0x20')](respondWithFilteredResult(_0x2f7cd7,_0x204e01))[_0xfa74('0x3b')](handleError(_0x2f7cd7,null));};exports[_0xfa74('0x3c')]=function(_0x55f4e3,_0x1ab026){var _0x171923={'raw':![],'where':{'id':_0x55f4e3['params']['id']}},_0x54e66d={};_0x54e66d['model']=_['keys'](db[_0xfa74('0x24')][_0xfa74('0x3d')]);_0x54e66d[_0xfa74('0x29')]=_[_0xfa74('0x25')](_0x55f4e3[_0xfa74('0x29')]);_0x54e66d[_0xfa74('0x26')]=_[_0xfa74('0x27')](_0x54e66d['model'],_0x54e66d[_0xfa74('0x29')]);_0x171923[_0xfa74('0x2b')]=_[_0xfa74('0x27')](_0x54e66d[_0xfa74('0x28')],qs[_0xfa74('0x2a')](_0x55f4e3['query'][_0xfa74('0x2a')]));_0x171923[_0xfa74('0x2b')]=_0x171923[_0xfa74('0x2b')][_0xfa74('0x3e')]?_0x171923[_0xfa74('0x2b')]:_0x54e66d[_0xfa74('0x28')];if(_0x55f4e3[_0xfa74('0x29')][_0xfa74('0x3f')]){_0x171923[_0xfa74('0x38')]=[{'all':!![]}];}_0x171923=_[_0xfa74('0x32')]({},_0x171923,_0x55f4e3['options']);return db[_0xfa74('0x24')]['find'](_0x171923)[_0xfa74('0x20')](handleEntityNotFound(_0x1ab026,null))[_0xfa74('0x20')](respondWithResult(_0x1ab026,null))[_0xfa74('0x3b')](handleError(_0x1ab026,null));};exports[_0xfa74('0x40')]=function(_0x4911a5,_0x2d1ca7){return db[_0xfa74('0x24')]['create'](_0x4911a5[_0xfa74('0x41')],{})[_0xfa74('0x20')](function(_0x5cbb70){var _0x2be89f=_0x4911a5[_0xfa74('0x42')][_0xfa74('0x43')]({'plain':!![]});if(!_0x2be89f)throw new Error(_0xfa74('0x44'));if(_0x2be89f[_0xfa74('0x45')]==='user'){var _0x54e06c=_0x5cbb70[_0xfa74('0x43')]({'plain':!![]});var _0x91df44='Triggers';return db[_0xfa74('0x46')][_0xfa74('0x47')]({'where':{'name':_0x91df44,'userProfileId':_0x2be89f[_0xfa74('0x48')]},'raw':!![]})['then'](function(_0x4af9ea){if(_0x4af9ea&&_0x4af9ea[_0xfa74('0x49')]===0x0){return db[_0xfa74('0x4a')][_0xfa74('0x40')]({'name':_0x54e06c[_0xfa74('0x22')],'resourceId':_0x54e06c['id'],'type':_0x4af9ea[_0xfa74('0x22')],'sectionId':_0x4af9ea['id']},{})[_0xfa74('0x20')](function(){return _0x5cbb70;});}else{return _0x5cbb70;}})[_0xfa74('0x3b')](function(_0x30992b){logger['error'](_0xfa74('0x4b'),_0x30992b);throw _0x30992b;});}return _0x5cbb70;})[_0xfa74('0x20')](respondWithResult(_0x2d1ca7,0xc9))[_0xfa74('0x3b')](handleError(_0x2d1ca7,null));};exports[_0xfa74('0x1e')]=function(_0x569801,_0x4ec218){if(_0x569801[_0xfa74('0x41')]['id']){delete _0x569801['body']['id'];}return db[_0xfa74('0x24')][_0xfa74('0x47')]({'where':{'id':_0x569801[_0xfa74('0x4c')]['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x4ec218,null))[_0xfa74('0x20')](saveUpdates(_0x569801[_0xfa74('0x41')],null))[_0xfa74('0x20')](respondWithResult(_0x4ec218,null))['catch'](handleError(_0x4ec218,null));};exports[_0xfa74('0x1f')]=function(_0x4bcee3,_0x21d7c5){return db['Trigger']['find']({'where':{'id':_0x4bcee3[_0xfa74('0x4c')]['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x21d7c5,null))['then'](removeEntity(_0x21d7c5,null))['catch'](handleError(_0x21d7c5,null));};exports[_0xfa74('0x4d')]=function(_0x1ab715,_0x8afe72,_0x234899){if(_0x1ab715[_0xfa74('0x41')]['id']){delete _0x1ab715[_0xfa74('0x41')]['id'];}return db[_0xfa74('0x24')][_0xfa74('0x47')]({'where':{'id':_0x1ab715[_0xfa74('0x4c')]['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x8afe72,null))['then'](function(_0x42ca2a){if(_0x42ca2a){_0x1ab715[_0xfa74('0x41')]['TriggerAllId']=_0x42ca2a['id'];return db['Condition'][_0xfa74('0x40')](_0x1ab715[_0xfa74('0x41')]);}})[_0xfa74('0x20')](respondWithResult(_0x8afe72,null))[_0xfa74('0x3b')](handleError(_0x8afe72,null));};exports[_0xfa74('0x4e')]=function(_0x5475f1,_0x36cfc6,_0x4d6235){if(_0x5475f1[_0xfa74('0x41')]['id']){delete _0x5475f1[_0xfa74('0x41')]['id'];}return db[_0xfa74('0x24')]['find']({'where':{'id':_0x5475f1['params']['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x36cfc6,null))[_0xfa74('0x20')](function(_0x3b6834){if(_0x3b6834){_0x5475f1[_0xfa74('0x41')]['TriggerAnyId']=_0x3b6834['id'];return db[_0xfa74('0x4f')][_0xfa74('0x40')](_0x5475f1['body']);}})[_0xfa74('0x20')](respondWithResult(_0x36cfc6,null))[_0xfa74('0x3b')](handleError(_0x36cfc6,null));};exports[_0xfa74('0x50')]=function(_0x1681e7,_0x4c4061,_0x2e6eb7){var _0x5e5579={};var _0x2c610a={};var _0x3ceb9d;var _0x38ce69;return db[_0xfa74('0x24')][_0xfa74('0x51')]({'where':{'id':_0x1681e7[_0xfa74('0x4c')]['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x4c4061,null))[_0xfa74('0x20')](function(_0x16fc06){if(_0x16fc06){_0x3ceb9d=_0x16fc06;_0x2c610a[_0xfa74('0x28')]=_[_0xfa74('0x25')](db[_0xfa74('0x4f')][_0xfa74('0x3d')]);_0x2c610a[_0xfa74('0x29')]=_[_0xfa74('0x25')](_0x1681e7['query']);_0x2c610a[_0xfa74('0x26')]=_[_0xfa74('0x27')](_0x2c610a['model'],_0x2c610a['query']);_0x5e5579[_0xfa74('0x2b')]=_['intersection'](_0x2c610a[_0xfa74('0x28')],qs[_0xfa74('0x2a')](_0x1681e7[_0xfa74('0x29')]['fields']));_0x5e5579[_0xfa74('0x2b')]=_0x5e5579['attributes']['length']?_0x5e5579[_0xfa74('0x2b')]:_0x2c610a[_0xfa74('0x28')];_0x5e5579[_0xfa74('0x2e')]=qs[_0xfa74('0x2f')](_0x1681e7[_0xfa74('0x29')][_0xfa74('0x2f')]);_0x5e5579[_0xfa74('0x31')]=qs[_0xfa74('0x26')](_[_0xfa74('0x52')](_0x1681e7[_0xfa74('0x29')],_0x2c610a[_0xfa74('0x26')]));if(_0x1681e7['query'][_0xfa74('0x30')]){_0x5e5579['where']=_[_0xfa74('0x32')](_0x5e5579[_0xfa74('0x31')],{'$or':_[_0xfa74('0x33')](_0x5e5579['attributes'],function(_0x773f98){var _0x11f2bc={};_0x11f2bc[_0x773f98]={'$like':'%'+_0x1681e7[_0xfa74('0x29')]['filter']+'%'};return _0x11f2bc;})});}_0x5e5579=_[_0xfa74('0x32')]({},_0x5e5579,_0x1681e7[_0xfa74('0x37')]);return _0x3ceb9d[_0xfa74('0x50')](_0x5e5579);}})[_0xfa74('0x20')](function(_0x10e5f5){if(_0x10e5f5){_0x38ce69=_0x10e5f5['length'];if(!_0x1681e7[_0xfa74('0x29')][_0xfa74('0x2c')](_0xfa74('0x2d'))){_0x5e5579[_0xfa74('0x1b')]=qs[_0xfa74('0x1b')](_0x1681e7[_0xfa74('0x29')][_0xfa74('0x1b')]);_0x5e5579[_0xfa74('0x1a')]=qs[_0xfa74('0x1a')](_0x1681e7[_0xfa74('0x29')][_0xfa74('0x1a')]);}return _0x3ceb9d[_0xfa74('0x50')](_0x5e5579);}})['then'](function(_0xc0fb33){if(_0xc0fb33){return _0xc0fb33?{'count':_0x38ce69,'rows':_0xc0fb33}:null;}})[_0xfa74('0x20')](respondWithResult(_0x4c4061,null))[_0xfa74('0x3b')](handleError(_0x4c4061,null));};exports[_0xfa74('0x53')]=function(_0x356b38,_0xfe8dce,_0x3b167c){var _0x197881={};var _0x491529={};var _0x22acfa;var _0x182f3e;return db[_0xfa74('0x24')][_0xfa74('0x51')]({'where':{'id':_0x356b38['params']['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0xfe8dce,null))[_0xfa74('0x20')](function(_0xdcc2a6){if(_0xdcc2a6){_0x22acfa=_0xdcc2a6;_0x491529[_0xfa74('0x28')]=_['keys'](db[_0xfa74('0x4f')]['rawAttributes']);_0x491529['query']=_[_0xfa74('0x25')](_0x356b38['query']);_0x491529[_0xfa74('0x26')]=_[_0xfa74('0x27')](_0x491529['model'],_0x491529['query']);_0x197881[_0xfa74('0x2b')]=_[_0xfa74('0x27')](_0x491529[_0xfa74('0x28')],qs[_0xfa74('0x2a')](_0x356b38['query']['fields']));_0x197881['attributes']=_0x197881[_0xfa74('0x2b')][_0xfa74('0x3e')]?_0x197881[_0xfa74('0x2b')]:_0x491529[_0xfa74('0x28')];_0x197881[_0xfa74('0x2e')]=qs['sort'](_0x356b38[_0xfa74('0x29')][_0xfa74('0x2f')]);_0x197881[_0xfa74('0x31')]=qs[_0xfa74('0x26')](_[_0xfa74('0x52')](_0x356b38[_0xfa74('0x29')],_0x491529[_0xfa74('0x26')]));if(_0x356b38[_0xfa74('0x29')][_0xfa74('0x30')]){_0x197881['where']=_['merge'](_0x197881['where'],{'$or':_[_0xfa74('0x33')](_0x197881[_0xfa74('0x2b')],function(_0x1a2571){var _0x119604={};_0x119604[_0x1a2571]={'$like':'%'+_0x356b38[_0xfa74('0x29')]['filter']+'%'};return _0x119604;})});}_0x197881=_[_0xfa74('0x32')]({},_0x197881,_0x356b38[_0xfa74('0x37')]);return _0x22acfa['getAnyConditions'](_0x197881);}})[_0xfa74('0x20')](function(_0x495a77){if(_0x495a77){_0x182f3e=_0x495a77[_0xfa74('0x3e')];if(!_0x356b38[_0xfa74('0x29')][_0xfa74('0x2c')](_0xfa74('0x2d'))){_0x197881[_0xfa74('0x1b')]=qs[_0xfa74('0x1b')](_0x356b38[_0xfa74('0x29')][_0xfa74('0x1b')]);_0x197881['offset']=qs['offset'](_0x356b38['query'][_0xfa74('0x1a')]);}return _0x22acfa[_0xfa74('0x53')](_0x197881);}})['then'](function(_0x379608){if(_0x379608){return _0x379608?{'count':_0x182f3e,'rows':_0x379608}:null;}})[_0xfa74('0x20')](respondWithResult(_0xfe8dce,null))[_0xfa74('0x3b')](handleError(_0xfe8dce,null));};exports[_0xfa74('0x54')]=function(_0x4a65dc,_0x46885c,_0x4837c5){if(_0x4a65dc['body']['id']){delete _0x4a65dc[_0xfa74('0x41')]['id'];}return db[_0xfa74('0x24')][_0xfa74('0x47')]({'where':{'id':_0x4a65dc['params']['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x46885c,null))[_0xfa74('0x20')](function(_0x53c4d5){if(_0x53c4d5){_0x4a65dc[_0xfa74('0x41')]['TriggerId']=_0x53c4d5['id'];return db['Action']['create'](_0x4a65dc[_0xfa74('0x41')]);}})[_0xfa74('0x20')](respondWithResult(_0x46885c,null))[_0xfa74('0x3b')](handleError(_0x46885c,null));};exports[_0xfa74('0x55')]=function(_0xcc89d6,_0x5a67cb,_0x505f15){var _0x370bf5={};var _0x52657c={};var _0x90dfe7;var _0x2d9311;return db[_0xfa74('0x24')][_0xfa74('0x51')]({'where':{'id':_0xcc89d6[_0xfa74('0x4c')]['id']}})[_0xfa74('0x20')](handleEntityNotFound(_0x5a67cb,null))[_0xfa74('0x20')](function(_0x3870a9){if(_0x3870a9){_0x90dfe7=_0x3870a9;_0x52657c[_0xfa74('0x28')]=_['keys'](db[_0xfa74('0x56')][_0xfa74('0x3d')]);_0x52657c[_0xfa74('0x29')]=_[_0xfa74('0x25')](_0xcc89d6[_0xfa74('0x29')]);_0x52657c[_0xfa74('0x26')]=_[_0xfa74('0x27')](_0x52657c[_0xfa74('0x28')],_0x52657c[_0xfa74('0x29')]);_0x370bf5[_0xfa74('0x2b')]=_[_0xfa74('0x27')](_0x52657c['model'],qs['fields'](_0xcc89d6[_0xfa74('0x29')][_0xfa74('0x2a')]));_0x370bf5[_0xfa74('0x2b')]=_0x370bf5['attributes']['length']?_0x370bf5[_0xfa74('0x2b')]:_0x52657c[_0xfa74('0x28')];_0x370bf5[_0xfa74('0x2e')]=qs[_0xfa74('0x2f')](_0xcc89d6[_0xfa74('0x29')][_0xfa74('0x2f')]);_0x370bf5[_0xfa74('0x31')]=qs['filters'](_[_0xfa74('0x52')](_0xcc89d6['query'],_0x52657c['filters']));if(_0xcc89d6[_0xfa74('0x29')][_0xfa74('0x30')]){_0x370bf5[_0xfa74('0x31')]=_['merge'](_0x370bf5[_0xfa74('0x31')],{'$or':_['map'](_0x370bf5['attributes'],function(_0x4603c7){var _0x14046e={};_0x14046e[_0x4603c7]={'$like':'%'+_0xcc89d6[_0xfa74('0x29')][_0xfa74('0x30')]+'%'};return _0x14046e;})});}_0x370bf5=_[_0xfa74('0x32')]({},_0x370bf5,_0xcc89d6[_0xfa74('0x37')]);return _0x90dfe7['getActions'](_0x370bf5);}})[_0xfa74('0x20')](function(_0x2576c9){if(_0x2576c9){_0x2d9311=_0x2576c9['length'];if(!_0xcc89d6[_0xfa74('0x29')][_0xfa74('0x2c')](_0xfa74('0x2d'))){_0x370bf5['limit']=qs[_0xfa74('0x1b')](_0xcc89d6[_0xfa74('0x29')]['limit']);_0x370bf5[_0xfa74('0x1a')]=qs[_0xfa74('0x1a')](_0xcc89d6[_0xfa74('0x29')]['offset']);}return _0x90dfe7[_0xfa74('0x55')](_0x370bf5);}})['then'](function(_0x57befb){if(_0x57befb){return _0x57befb?{'count':_0x2d9311,'rows':_0x57befb}:null;}})[_0xfa74('0x20')](respondWithResult(_0x5a67cb,null))['catch'](handleError(_0x5a67cb,null));};
\ No newline at end of file
+var _0x2917=['where','filter','merge','type','key','VIRTUAL','options','Trigger','includeAll','include','findAll','catch','show','params','length','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','addAllCondition','TriggerAllId','Condition','TriggerAnyId','getAllConditions','findOne','pick','getAnyConditions','addAction','TriggerId','Action','map','getActions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','then','destroy','get','Triggers','stack','name','send','rawAttributes','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','limit','order','sort'];(function(_0x8585ff,_0x9232d){var _0x3ff111=function(_0x1c40bc){while(--_0x1c40bc){_0x8585ff['push'](_0x8585ff['shift']());}};_0x3ff111(++_0x9232d);}(_0x2917,0x142));var _0x7291=function(_0xaf25ae,_0x2001c1){_0xaf25ae=_0xaf25ae-0x0;var _0x49732d=_0x2917[_0xaf25ae];return _0x49732d;};'use strict';var pdf=require(_0x7291('0x0'));var emlformat=require(_0x7291('0x1'));var rimraf=require(_0x7291('0x2'));var zipdir=require(_0x7291('0x3'));var jsonpatch=require(_0x7291('0x4'));var rp=require(_0x7291('0x5'));var moment=require(_0x7291('0x6'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x7291('0x7'));var path=require(_0x7291('0x8'));var sox=require(_0x7291('0x9'));var csv=require(_0x7291('0xa'));var ejs=require(_0x7291('0xb'));var fs=require('fs');var _=require(_0x7291('0xc'));var squel=require(_0x7291('0xd'));var crypto=require(_0x7291('0xe'));var jsforce=require(_0x7291('0xf'));var deskjs=require(_0x7291('0x10'));var toCsv=require(_0x7291('0xa'));var querystring=require(_0x7291('0x11'));var Papa=require(_0x7291('0x12'));var Redis=require(_0x7291('0x13'));var authService=require(_0x7291('0x14'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x7291('0x15'));var logger=require(_0x7291('0x16'))(_0x7291('0x17'));var utils=require(_0x7291('0x18'));var config=require(_0x7291('0x19'));var db=require(_0x7291('0x1a'))['db'];function respondWithStatusCode(_0x4cba88,_0x4fd701){_0x4fd701=_0x4fd701||0xcc;return function(_0x1834fa){if(_0x1834fa){return _0x4cba88[_0x7291('0x1b')](_0x4fd701);}return _0x4cba88[_0x7291('0x1c')](_0x4fd701)[_0x7291('0x1d')]();};}function respondWithResult(_0x51eb17,_0xc32b1d){_0xc32b1d=_0xc32b1d||0xc8;return function(_0xc3166b){if(_0xc3166b){return _0x51eb17['status'](_0xc32b1d)[_0x7291('0x1e')](_0xc3166b);}};}function respondWithFilteredResult(_0x1b48d2,_0x1777e1){return function(_0x51d353){if(_0x51d353){var _0x55cca6=_0x51d353[_0x7291('0x1f')],_0x34808c=_0x1777e1[_0x7291('0x20')],_0x304a33=_0x1777e1[_0x7291('0x20')]+_0x1777e1['limit'],_0x431ccd;if(_0x304a33>=_0x55cca6){_0x304a33=_0x55cca6;_0x431ccd=0xc8;}else{_0x431ccd=0xce;}_0x1b48d2[_0x7291('0x1c')](_0x431ccd);return _0x1b48d2[_0x7291('0x21')](_0x7291('0x22'),_0x34808c+'-'+_0x304a33+'/'+_0x55cca6)[_0x7291('0x1e')](_0x51d353);}return null;};}function patchUpdates(_0x1634c1){return function(_0x4f6fea){try{jsonpatch[_0x7291('0x23')](_0x4f6fea,_0x1634c1,!![]);}catch(_0x52d5a7){return BPromise[_0x7291('0x24')](_0x52d5a7);}return _0x4f6fea[_0x7291('0x25')]();};}function saveUpdates(_0x382134,_0x5229d6){return function(_0x53ba59){if(_0x53ba59){return _0x53ba59['update'](_0x382134)[_0x7291('0x26')](function(_0x1aa349){return _0x1aa349;});}return null;};}function removeEntity(_0x4ef5e2,_0x483279){return function(_0x56bf5f){if(_0x56bf5f){return _0x56bf5f[_0x7291('0x27')]()['then'](function(){var _0x17839a=_0x56bf5f[_0x7291('0x28')]({'plain':!![]});var _0x5d7fd8=_0x7291('0x29');return db['UserProfileResource'][_0x7291('0x27')]({'where':{'type':_0x5d7fd8,'resourceId':_0x17839a['id']}})[_0x7291('0x26')](function(){return _0x56bf5f;});})['then'](function(){_0x4ef5e2[_0x7291('0x1c')](0xcc)[_0x7291('0x1d')]();});}};}function handleEntityNotFound(_0x32169c,_0xa6f1eb){return function(_0x1dfa36){if(!_0x1dfa36){_0x32169c[_0x7291('0x1b')](0x194);}return _0x1dfa36;};}function handleError(_0x3b099f,_0x110d11){_0x110d11=_0x110d11||0x1f4;return function(_0x3fd1d2){logger['error'](_0x3fd1d2[_0x7291('0x2a')]);if(_0x3fd1d2[_0x7291('0x2b')]){delete _0x3fd1d2['name'];}_0x3b099f[_0x7291('0x1c')](_0x110d11)[_0x7291('0x2c')](_0x3fd1d2);};}exports['index']=function(_0x386667,_0x45762f){var _0x522ef7={},_0x31207c={},_0x10e006={'count':0x0,'rows':[]};var _0xf32830=db['Trigger'][_0x7291('0x2d')];_0x31207c['model']=_['keys'](_0xf32830);_0x31207c[_0x7291('0x2e')]=_[_0x7291('0x2f')](_0x386667[_0x7291('0x2e')]);_0x31207c[_0x7291('0x30')]=_[_0x7291('0x31')](_0x31207c[_0x7291('0x32')],_0x31207c[_0x7291('0x2e')]);_0x522ef7[_0x7291('0x33')]=_[_0x7291('0x31')](_0x31207c[_0x7291('0x32')],qs[_0x7291('0x34')](_0x386667[_0x7291('0x2e')][_0x7291('0x34')]));_0x522ef7['attributes']=_0x522ef7[_0x7291('0x33')]['length']?_0x522ef7['attributes']:_0x31207c['model'];if(!_0x386667[_0x7291('0x2e')][_0x7291('0x35')](_0x7291('0x36'))){_0x522ef7[_0x7291('0x37')]=qs[_0x7291('0x37')](_0x386667['query'][_0x7291('0x37')]);_0x522ef7[_0x7291('0x20')]=qs['offset'](_0x386667[_0x7291('0x2e')][_0x7291('0x20')]);}_0x522ef7[_0x7291('0x38')]=qs[_0x7291('0x39')](_0x386667['query']['sort']);_0x522ef7[_0x7291('0x3a')]=qs[_0x7291('0x30')](_['pick'](_0x386667['query'],_0x31207c[_0x7291('0x30')]));if(_0x386667[_0x7291('0x2e')][_0x7291('0x3b')]){_0x522ef7[_0x7291('0x3a')]=_[_0x7291('0x3c')](_0x522ef7['where'],{'$or':_['map'](_0xf32830,function(_0x123107){if(_0x123107[_0x7291('0x3d')][_0x7291('0x3e')]!==_0x7291('0x3f')){var _0x1103d2={};_0x1103d2[_0x123107['field']]={'$like':'%'+_0x386667[_0x7291('0x2e')]['filter']+'%'};return _0x1103d2;}})});}_0x522ef7=_[_0x7291('0x3c')]({},_0x522ef7,_0x386667[_0x7291('0x40')]);var _0x4d8387={'where':_0x522ef7['where']};return db[_0x7291('0x41')][_0x7291('0x1f')](_0x4d8387)[_0x7291('0x26')](function(_0x46ea9b){_0x10e006[_0x7291('0x1f')]=_0x46ea9b;if(_0x386667[_0x7291('0x2e')][_0x7291('0x42')]){_0x522ef7[_0x7291('0x43')]=[{'all':!![]}];}return db[_0x7291('0x41')][_0x7291('0x44')](_0x522ef7);})[_0x7291('0x26')](function(_0x11885a){_0x10e006['rows']=_0x11885a;return _0x10e006;})[_0x7291('0x26')](respondWithFilteredResult(_0x45762f,_0x522ef7))[_0x7291('0x45')](handleError(_0x45762f,null));};exports[_0x7291('0x46')]=function(_0x42dff8,_0x34ad6){var _0x263815={'raw':![],'where':{'id':_0x42dff8[_0x7291('0x47')]['id']}},_0x5c60cd={};_0x5c60cd[_0x7291('0x32')]=_[_0x7291('0x2f')](db[_0x7291('0x41')]['rawAttributes']);_0x5c60cd[_0x7291('0x2e')]=_[_0x7291('0x2f')](_0x42dff8[_0x7291('0x2e')]);_0x5c60cd[_0x7291('0x30')]=_[_0x7291('0x31')](_0x5c60cd[_0x7291('0x32')],_0x5c60cd[_0x7291('0x2e')]);_0x263815[_0x7291('0x33')]=_[_0x7291('0x31')](_0x5c60cd['model'],qs[_0x7291('0x34')](_0x42dff8['query'][_0x7291('0x34')]));_0x263815[_0x7291('0x33')]=_0x263815[_0x7291('0x33')][_0x7291('0x48')]?_0x263815[_0x7291('0x33')]:_0x5c60cd[_0x7291('0x32')];if(_0x42dff8[_0x7291('0x2e')][_0x7291('0x42')]){_0x263815['include']=[{'all':!![]}];}_0x263815=_[_0x7291('0x3c')]({},_0x263815,_0x42dff8[_0x7291('0x40')]);return db[_0x7291('0x41')][_0x7291('0x49')](_0x263815)[_0x7291('0x26')](handleEntityNotFound(_0x34ad6,null))[_0x7291('0x26')](respondWithResult(_0x34ad6,null))[_0x7291('0x45')](handleError(_0x34ad6,null));};exports[_0x7291('0x4a')]=function(_0x2a408e,_0x1a3c15){return db[_0x7291('0x41')][_0x7291('0x4a')](_0x2a408e[_0x7291('0x4b')],{})[_0x7291('0x26')](function(_0xf728a9){var _0x22df4c=_0x2a408e['user'][_0x7291('0x28')]({'plain':!![]});if(!_0x22df4c)throw new Error(_0x7291('0x4c'));if(_0x22df4c['role']===_0x7291('0x4d')){var _0x108c0d=_0xf728a9[_0x7291('0x28')]({'plain':!![]});var _0x48566a='Triggers';return db[_0x7291('0x4e')]['find']({'where':{'name':_0x48566a,'userProfileId':_0x22df4c['userProfileId']},'raw':!![]})[_0x7291('0x26')](function(_0x1ae3fd){if(_0x1ae3fd&&_0x1ae3fd[_0x7291('0x4f')]===0x0){return db['UserProfileResource'][_0x7291('0x4a')]({'name':_0x108c0d[_0x7291('0x2b')],'resourceId':_0x108c0d['id'],'type':_0x1ae3fd[_0x7291('0x2b')],'sectionId':_0x1ae3fd['id']},{})[_0x7291('0x26')](function(){return _0xf728a9;});}else{return _0xf728a9;}})['catch'](function(_0x2a6081){logger['error'](_0x7291('0x50'),_0x2a6081);throw _0x2a6081;});}return _0xf728a9;})[_0x7291('0x26')](respondWithResult(_0x1a3c15,0xc9))[_0x7291('0x45')](handleError(_0x1a3c15,null));};exports[_0x7291('0x51')]=function(_0x1b93b9,_0x3cb537){if(_0x1b93b9[_0x7291('0x4b')]['id']){delete _0x1b93b9[_0x7291('0x4b')]['id'];}return db[_0x7291('0x41')][_0x7291('0x49')]({'where':{'id':_0x1b93b9['params']['id']}})[_0x7291('0x26')](handleEntityNotFound(_0x3cb537,null))[_0x7291('0x26')](saveUpdates(_0x1b93b9['body'],null))[_0x7291('0x26')](respondWithResult(_0x3cb537,null))[_0x7291('0x45')](handleError(_0x3cb537,null));};exports['destroy']=function(_0x5047ac,_0xb1e3d2){return db['Trigger'][_0x7291('0x49')]({'where':{'id':_0x5047ac[_0x7291('0x47')]['id']}})['then'](handleEntityNotFound(_0xb1e3d2,null))[_0x7291('0x26')](removeEntity(_0xb1e3d2,null))[_0x7291('0x45')](handleError(_0xb1e3d2,null));};exports[_0x7291('0x52')]=function(_0x326794,_0x50a4fb,_0x51ff3c){if(_0x326794['body']['id']){delete _0x326794[_0x7291('0x4b')]['id'];}return db[_0x7291('0x41')][_0x7291('0x49')]({'where':{'id':_0x326794[_0x7291('0x47')]['id']}})[_0x7291('0x26')](handleEntityNotFound(_0x50a4fb,null))['then'](function(_0x21a1cb){if(_0x21a1cb){_0x326794[_0x7291('0x4b')][_0x7291('0x53')]=_0x21a1cb['id'];return db[_0x7291('0x54')]['create'](_0x326794[_0x7291('0x4b')]);}})[_0x7291('0x26')](respondWithResult(_0x50a4fb,null))[_0x7291('0x45')](handleError(_0x50a4fb,null));};exports['addAnyCondition']=function(_0x28cfee,_0xd348b4,_0x5b24a3){if(_0x28cfee[_0x7291('0x4b')]['id']){delete _0x28cfee[_0x7291('0x4b')]['id'];}return db[_0x7291('0x41')][_0x7291('0x49')]({'where':{'id':_0x28cfee[_0x7291('0x47')]['id']}})['then'](handleEntityNotFound(_0xd348b4,null))[_0x7291('0x26')](function(_0x3498d6){if(_0x3498d6){_0x28cfee['body'][_0x7291('0x55')]=_0x3498d6['id'];return db[_0x7291('0x54')][_0x7291('0x4a')](_0x28cfee[_0x7291('0x4b')]);}})[_0x7291('0x26')](respondWithResult(_0xd348b4,null))[_0x7291('0x45')](handleError(_0xd348b4,null));};exports[_0x7291('0x56')]=function(_0x5098ed,_0x879b22,_0x1cac3e){var _0x4f8320={};var _0x595cb0={};var _0xf28521;var _0x1a6ac1;return db[_0x7291('0x41')][_0x7291('0x57')]({'where':{'id':_0x5098ed[_0x7291('0x47')]['id']}})[_0x7291('0x26')](handleEntityNotFound(_0x879b22,null))[_0x7291('0x26')](function(_0x53b8b8){if(_0x53b8b8){_0xf28521=_0x53b8b8;_0x595cb0[_0x7291('0x32')]=_[_0x7291('0x2f')](db[_0x7291('0x54')]['rawAttributes']);_0x595cb0[_0x7291('0x2e')]=_[_0x7291('0x2f')](_0x5098ed[_0x7291('0x2e')]);_0x595cb0[_0x7291('0x30')]=_['intersection'](_0x595cb0[_0x7291('0x32')],_0x595cb0[_0x7291('0x2e')]);_0x4f8320['attributes']=_[_0x7291('0x31')](_0x595cb0['model'],qs['fields'](_0x5098ed[_0x7291('0x2e')][_0x7291('0x34')]));_0x4f8320[_0x7291('0x33')]=_0x4f8320[_0x7291('0x33')]['length']?_0x4f8320[_0x7291('0x33')]:_0x595cb0[_0x7291('0x32')];_0x4f8320[_0x7291('0x38')]=qs[_0x7291('0x39')](_0x5098ed[_0x7291('0x2e')][_0x7291('0x39')]);_0x4f8320['where']=qs['filters'](_[_0x7291('0x58')](_0x5098ed[_0x7291('0x2e')],_0x595cb0['filters']));if(_0x5098ed[_0x7291('0x2e')][_0x7291('0x3b')]){_0x4f8320['where']=_[_0x7291('0x3c')](_0x4f8320[_0x7291('0x3a')],{'$or':_['map'](_0x4f8320[_0x7291('0x33')],function(_0x2f2a40){var _0x461f0d={};_0x461f0d[_0x2f2a40]={'$like':'%'+_0x5098ed['query'][_0x7291('0x3b')]+'%'};return _0x461f0d;})});}_0x4f8320=_[_0x7291('0x3c')]({},_0x4f8320,_0x5098ed[_0x7291('0x40')]);return _0xf28521[_0x7291('0x56')](_0x4f8320);}})[_0x7291('0x26')](function(_0x3ee410){if(_0x3ee410){_0x1a6ac1=_0x3ee410['length'];if(!_0x5098ed['query'][_0x7291('0x35')](_0x7291('0x36'))){_0x4f8320[_0x7291('0x37')]=qs[_0x7291('0x37')](_0x5098ed[_0x7291('0x2e')][_0x7291('0x37')]);_0x4f8320[_0x7291('0x20')]=qs[_0x7291('0x20')](_0x5098ed['query'][_0x7291('0x20')]);}return _0xf28521[_0x7291('0x56')](_0x4f8320);}})[_0x7291('0x26')](function(_0x57346d){if(_0x57346d){return _0x57346d?{'count':_0x1a6ac1,'rows':_0x57346d}:null;}})[_0x7291('0x26')](respondWithResult(_0x879b22,null))['catch'](handleError(_0x879b22,null));};exports['getAnyConditions']=function(_0x1bcab3,_0xd3acf1,_0x24b9c3){var _0x32f814={};var _0x2e321b={};var _0x383b9a;var _0x7713aa;return db['Trigger'][_0x7291('0x57')]({'where':{'id':_0x1bcab3[_0x7291('0x47')]['id']}})[_0x7291('0x26')](handleEntityNotFound(_0xd3acf1,null))[_0x7291('0x26')](function(_0x30ae4b){if(_0x30ae4b){_0x383b9a=_0x30ae4b;_0x2e321b[_0x7291('0x32')]=_[_0x7291('0x2f')](db[_0x7291('0x54')]['rawAttributes']);_0x2e321b[_0x7291('0x2e')]=_[_0x7291('0x2f')](_0x1bcab3[_0x7291('0x2e')]);_0x2e321b[_0x7291('0x30')]=_[_0x7291('0x31')](_0x2e321b[_0x7291('0x32')],_0x2e321b[_0x7291('0x2e')]);_0x32f814[_0x7291('0x33')]=_[_0x7291('0x31')](_0x2e321b[_0x7291('0x32')],qs[_0x7291('0x34')](_0x1bcab3['query'][_0x7291('0x34')]));_0x32f814[_0x7291('0x33')]=_0x32f814[_0x7291('0x33')][_0x7291('0x48')]?_0x32f814[_0x7291('0x33')]:_0x2e321b[_0x7291('0x32')];_0x32f814[_0x7291('0x38')]=qs[_0x7291('0x39')](_0x1bcab3[_0x7291('0x2e')]['sort']);_0x32f814[_0x7291('0x3a')]=qs[_0x7291('0x30')](_[_0x7291('0x58')](_0x1bcab3[_0x7291('0x2e')],_0x2e321b[_0x7291('0x30')]));if(_0x1bcab3[_0x7291('0x2e')][_0x7291('0x3b')]){_0x32f814[_0x7291('0x3a')]=_[_0x7291('0x3c')](_0x32f814['where'],{'$or':_['map'](_0x32f814[_0x7291('0x33')],function(_0x25632d){var _0x343fa9={};_0x343fa9[_0x25632d]={'$like':'%'+_0x1bcab3[_0x7291('0x2e')][_0x7291('0x3b')]+'%'};return _0x343fa9;})});}_0x32f814=_[_0x7291('0x3c')]({},_0x32f814,_0x1bcab3[_0x7291('0x40')]);return _0x383b9a[_0x7291('0x59')](_0x32f814);}})['then'](function(_0x546591){if(_0x546591){_0x7713aa=_0x546591[_0x7291('0x48')];if(!_0x1bcab3[_0x7291('0x2e')][_0x7291('0x35')](_0x7291('0x36'))){_0x32f814['limit']=qs[_0x7291('0x37')](_0x1bcab3[_0x7291('0x2e')][_0x7291('0x37')]);_0x32f814[_0x7291('0x20')]=qs[_0x7291('0x20')](_0x1bcab3['query']['offset']);}return _0x383b9a[_0x7291('0x59')](_0x32f814);}})[_0x7291('0x26')](function(_0x5843ce){if(_0x5843ce){return _0x5843ce?{'count':_0x7713aa,'rows':_0x5843ce}:null;}})['then'](respondWithResult(_0xd3acf1,null))['catch'](handleError(_0xd3acf1,null));};exports[_0x7291('0x5a')]=function(_0x1790dc,_0x2598e6,_0x33d540){if(_0x1790dc[_0x7291('0x4b')]['id']){delete _0x1790dc[_0x7291('0x4b')]['id'];}return db[_0x7291('0x41')][_0x7291('0x49')]({'where':{'id':_0x1790dc[_0x7291('0x47')]['id']}})[_0x7291('0x26')](handleEntityNotFound(_0x2598e6,null))[_0x7291('0x26')](function(_0x137742){if(_0x137742){_0x1790dc[_0x7291('0x4b')][_0x7291('0x5b')]=_0x137742['id'];return db[_0x7291('0x5c')][_0x7291('0x4a')](_0x1790dc[_0x7291('0x4b')]);}})[_0x7291('0x26')](respondWithResult(_0x2598e6,null))[_0x7291('0x45')](handleError(_0x2598e6,null));};exports['getActions']=function(_0x5853c0,_0x15e3c7,_0x2bde72){var _0x1e4b0d={};var _0x33c5d0={};var _0x40699e;var _0x583a6b;return db[_0x7291('0x41')][_0x7291('0x57')]({'where':{'id':_0x5853c0[_0x7291('0x47')]['id']}})['then'](handleEntityNotFound(_0x15e3c7,null))[_0x7291('0x26')](function(_0xcc6f93){if(_0xcc6f93){_0x40699e=_0xcc6f93;_0x33c5d0[_0x7291('0x32')]=_[_0x7291('0x2f')](db[_0x7291('0x5c')][_0x7291('0x2d')]);_0x33c5d0[_0x7291('0x2e')]=_[_0x7291('0x2f')](_0x5853c0[_0x7291('0x2e')]);_0x33c5d0[_0x7291('0x30')]=_['intersection'](_0x33c5d0[_0x7291('0x32')],_0x33c5d0['query']);_0x1e4b0d['attributes']=_[_0x7291('0x31')](_0x33c5d0[_0x7291('0x32')],qs[_0x7291('0x34')](_0x5853c0[_0x7291('0x2e')][_0x7291('0x34')]));_0x1e4b0d[_0x7291('0x33')]=_0x1e4b0d[_0x7291('0x33')][_0x7291('0x48')]?_0x1e4b0d['attributes']:_0x33c5d0[_0x7291('0x32')];_0x1e4b0d[_0x7291('0x38')]=qs[_0x7291('0x39')](_0x5853c0['query']['sort']);_0x1e4b0d[_0x7291('0x3a')]=qs[_0x7291('0x30')](_[_0x7291('0x58')](_0x5853c0[_0x7291('0x2e')],_0x33c5d0[_0x7291('0x30')]));if(_0x5853c0['query']['filter']){_0x1e4b0d[_0x7291('0x3a')]=_[_0x7291('0x3c')](_0x1e4b0d[_0x7291('0x3a')],{'$or':_[_0x7291('0x5d')](_0x1e4b0d[_0x7291('0x33')],function(_0xaaa99d){var _0x118911={};_0x118911[_0xaaa99d]={'$like':'%'+_0x5853c0[_0x7291('0x2e')][_0x7291('0x3b')]+'%'};return _0x118911;})});}_0x1e4b0d=_[_0x7291('0x3c')]({},_0x1e4b0d,_0x5853c0[_0x7291('0x40')]);return _0x40699e[_0x7291('0x5e')](_0x1e4b0d);}})[_0x7291('0x26')](function(_0xf0a7e2){if(_0xf0a7e2){_0x583a6b=_0xf0a7e2[_0x7291('0x48')];if(!_0x5853c0['query'][_0x7291('0x35')]('nolimit')){_0x1e4b0d[_0x7291('0x37')]=qs[_0x7291('0x37')](_0x5853c0[_0x7291('0x2e')]['limit']);_0x1e4b0d[_0x7291('0x20')]=qs['offset'](_0x5853c0[_0x7291('0x2e')]['offset']);}return _0x40699e[_0x7291('0x5e')](_0x1e4b0d);}})['then'](function(_0x327d51){if(_0x327d51){return _0x327d51?{'count':_0x583a6b,'rows':_0x327d51}:null;}})['then'](respondWithResult(_0x15e3c7,null))[_0x7291('0x45')](handleError(_0x15e3c7,null));};
\ No newline at end of file
diff --git a/server/api/trigger/trigger.model.js b/server/api/trigger/trigger.model.js
index 951a19a..ae8e92b 100644
--- a/server/api/trigger/trigger.model.js
+++ b/server/api/trigger/trigger.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaa88=['util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./trigger.attributes','Trigger','tools_triggers','lodash'];(function(_0x58ca97,_0x31bf89){var _0x5d1970=function(_0x3deb7b){while(--_0x3deb7b){_0x58ca97['push'](_0x58ca97['shift']());}};_0x5d1970(++_0x31bf89);}(_0xaa88,0x137));var _0x8aa8=function(_0x4c80d7,_0x2bef29){_0x4c80d7=_0x4c80d7-0x0;var _0x3c5095=_0xaa88[_0x4c80d7];return _0x3c5095;};'use strict';var _=require(_0x8aa8('0x0'));var util=require(_0x8aa8('0x1'));var logger=require(_0x8aa8('0x2'))(_0x8aa8('0x3'));var moment=require('moment');var BPromise=require(_0x8aa8('0x4'));var rp=require(_0x8aa8('0x5'));var fs=require('fs');var path=require(_0x8aa8('0x6'));var rimraf=require(_0x8aa8('0x7'));var config=require(_0x8aa8('0x8'));var attributes=require(_0x8aa8('0x9'));module['exports']=function(_0x5bda0d,_0x460042){return _0x5bda0d['define'](_0x8aa8('0xa'),attributes,{'tableName':_0x8aa8('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0713=['moment','bluebird','request-promise','rimraf','../../config/environment','./trigger.attributes','exports','define','Trigger','tools_triggers','../../config/logger','api'];(function(_0x4d1c6b,_0x2b5236){var _0x249475=function(_0xab55e4){while(--_0xab55e4){_0x4d1c6b['push'](_0x4d1c6b['shift']());}};_0x249475(++_0x2b5236);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));module[_0x3071('0x8')]=function(_0xabd7b6,_0x41cf76){return _0xabd7b6[_0x3071('0x9')](_0x3071('0xa'),attributes,{'tableName':_0x3071('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/trigger/trigger.rpc.js b/server/api/trigger/trigger.rpc.js
index 580771d..f4668f5 100644
--- a/server/api/trigger/trigger.rpc.js
+++ b/server/api/trigger/trigger.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b1=['Trigger,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetTrigger','options','raw','where','include','map','model','attributes','Trigger','ShowTrigger','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Trigger,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x596c17,_0x19fb82){var _0x47c17c=function(_0x1d8ce9){while(--_0x1d8ce9){_0x596c17['push'](_0x596c17['shift']());}};_0x47c17c(++_0x19fb82);}(_0xd8b1,0xe3));var _0x1d8b=function(_0x1b9981,_0x49f74b){_0x1b9981=_0x1b9981-0x0;var _0x497342=_0xd8b1[_0x1b9981];return _0x497342;};'use strict';var _=require('lodash');var util=require(_0x1d8b('0x0'));var moment=require(_0x1d8b('0x1'));var BPromise=require(_0x1d8b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1d8b('0x3'));var db=require(_0x1d8b('0x4'))['db'];var utils=require(_0x1d8b('0x5'));var logger=require(_0x1d8b('0x6'))(_0x1d8b('0x7'));var config=require(_0x1d8b('0x8'));var jayson=require(_0x1d8b('0x9'));var client=jayson[_0x1d8b('0xa')][_0x1d8b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x271927,_0x4e61f7,_0x28eab4){return new BPromise(function(_0x25fd83,_0x5d03bb){return client[_0x1d8b('0xc')](_0x271927,_0x28eab4)[_0x1d8b('0xd')](function(_0x27c4c3){logger[_0x1d8b('0xe')](_0x1d8b('0xf'),_0x4e61f7,_0x1d8b('0x10'));logger[_0x1d8b('0x11')](_0x1d8b('0x12'),_0x4e61f7,_0x1d8b('0x10'),JSON[_0x1d8b('0x13')](_0x27c4c3));if(_0x27c4c3[_0x1d8b('0x14')]){if(_0x27c4c3[_0x1d8b('0x14')][_0x1d8b('0x15')]===0x1f4){logger[_0x1d8b('0x14')]('Trigger,\x20%s,\x20%s',_0x4e61f7,_0x27c4c3[_0x1d8b('0x14')][_0x1d8b('0x16')]);return _0x5d03bb(_0x27c4c3[_0x1d8b('0x14')]['message']);}logger[_0x1d8b('0x14')](_0x1d8b('0xf'),_0x4e61f7,_0x27c4c3['error'][_0x1d8b('0x16')]);return _0x25fd83(_0x27c4c3[_0x1d8b('0x14')][_0x1d8b('0x16')]);}else{logger[_0x1d8b('0xe')](_0x1d8b('0xf'),_0x4e61f7,_0x1d8b('0x10'));_0x25fd83(_0x27c4c3[_0x1d8b('0x17')]['message']);}})[_0x1d8b('0x18')](function(_0x2b03e8){logger['error'](_0x1d8b('0xf'),_0x4e61f7,_0x2b03e8);_0x5d03bb(_0x2b03e8);});});}exports[_0x1d8b('0x19')]=function(_0x7f5ad){var _0x1b8ed4=this;return new Promise(function(_0x4fd0aa,_0x8afa4a){return db['Trigger']['findAll']({'raw':_0x7f5ad[_0x1d8b('0x1a')]?_0x7f5ad[_0x1d8b('0x1a')][_0x1d8b('0x1b')]===undefined?!![]:![]:!![],'where':_0x7f5ad['options']?_0x7f5ad[_0x1d8b('0x1a')][_0x1d8b('0x1c')]||null:null,'attributes':_0x7f5ad[_0x1d8b('0x1a')]?_0x7f5ad[_0x1d8b('0x1a')]['attributes']||null:null,'limit':_0x7f5ad[_0x1d8b('0x1a')]?_0x7f5ad[_0x1d8b('0x1a')]['limit']||null:null,'include':_0x7f5ad[_0x1d8b('0x1a')]?_0x7f5ad['options'][_0x1d8b('0x1d')]?_[_0x1d8b('0x1e')](_0x7f5ad['options'][_0x1d8b('0x1d')],function(_0x1da2fd){return{'model':db[_0x1da2fd[_0x1d8b('0x1f')]],'as':_0x1da2fd['as'],'attributes':_0x1da2fd[_0x1d8b('0x20')],'include':_0x1da2fd['include']?_[_0x1d8b('0x1e')](_0x1da2fd[_0x1d8b('0x1d')],function(_0x5d44ca){return{'model':db[_0x5d44ca[_0x1d8b('0x1f')]],'as':_0x5d44ca['as'],'attributes':_0x5d44ca[_0x1d8b('0x20')],'include':_0x5d44ca[_0x1d8b('0x1d')]?_[_0x1d8b('0x1e')](_0x5d44ca[_0x1d8b('0x1d')],function(_0x2e593e){return{'model':db[_0x2e593e[_0x1d8b('0x1f')]],'as':_0x2e593e['as'],'attributes':_0x2e593e[_0x1d8b('0x20')]};}):[]};}):[]};}):[]:[]})[_0x1d8b('0xd')](function(_0x3bdf68){logger[_0x1d8b('0xe')]('GetTrigger',_0x7f5ad);logger[_0x1d8b('0x11')]('GetTrigger',_0x7f5ad,JSON[_0x1d8b('0x13')](_0x3bdf68));_0x4fd0aa(_0x3bdf68);})['catch'](function(_0x3ca409){logger[_0x1d8b('0x14')]('GetTrigger',_0x3ca409[_0x1d8b('0x16')],_0x7f5ad);_0x8afa4a(_0x1b8ed4[_0x1d8b('0x14')](0x1f4,_0x3ca409[_0x1d8b('0x16')]));});});};exports['ShowTrigger']=function(_0x5ac52f){var _0x53aefa=this;return new Promise(function(_0x21a0cd,_0xce6422){return db[_0x1d8b('0x21')]['find']({'raw':_0x5ac52f['options']?_0x5ac52f[_0x1d8b('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x5ac52f[_0x1d8b('0x1a')]?_0x5ac52f[_0x1d8b('0x1a')][_0x1d8b('0x1c')]||null:null,'attributes':_0x5ac52f[_0x1d8b('0x1a')]?_0x5ac52f[_0x1d8b('0x1a')][_0x1d8b('0x20')]||null:null,'include':_0x5ac52f[_0x1d8b('0x1a')]?_0x5ac52f[_0x1d8b('0x1a')][_0x1d8b('0x1d')]?_[_0x1d8b('0x1e')](_0x5ac52f['options'][_0x1d8b('0x1d')],function(_0xf705b){return{'model':db[_0xf705b['model']],'as':_0xf705b['as'],'attributes':_0xf705b[_0x1d8b('0x20')],'include':_0xf705b['include']?_[_0x1d8b('0x1e')](_0xf705b[_0x1d8b('0x1d')],function(_0x1b3b4b){return{'model':db[_0x1b3b4b['model']],'as':_0x1b3b4b['as'],'attributes':_0x1b3b4b['attributes'],'include':_0x1b3b4b[_0x1d8b('0x1d')]?_[_0x1d8b('0x1e')](_0x1b3b4b['include'],function(_0x4a1dcf){return{'model':db[_0x4a1dcf[_0x1d8b('0x1f')]],'as':_0x4a1dcf['as'],'attributes':_0x4a1dcf[_0x1d8b('0x20')]};}):[]};}):[]};}):[]:[]})[_0x1d8b('0xd')](function(_0x8fd1b){logger[_0x1d8b('0xe')]('ShowTrigger',_0x5ac52f);logger[_0x1d8b('0x11')](_0x1d8b('0x22'),_0x5ac52f,JSON[_0x1d8b('0x13')](_0x8fd1b));_0x21a0cd(_0x8fd1b);})[_0x1d8b('0x18')](function(_0x101731){logger[_0x1d8b('0x14')](_0x1d8b('0x22'),_0x101731['message'],_0x5ac52f);_0xce6422(_0x53aefa[_0x1d8b('0x14')](0x1f4,_0x101731[_0x1d8b('0x16')]));});});};
\ No newline at end of file
+var _0xa2c8=['catch','ShowTrigger','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','request\x20sent','debug','Trigger,\x20%s,\x20%s,\x20%s','stringify','code','error','message','Trigger,\x20%s,\x20%s','result','GetTrigger','Trigger','findAll','options','raw','where','attributes','include','map','model','then'];(function(_0x846918,_0x20d1fa){var _0x29a40c=function(_0xd79323){while(--_0xd79323){_0x846918['push'](_0x846918['shift']());}};_0x29a40c(++_0x20d1fa);}(_0xa2c8,0x11a));var _0x8a2c=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa2c8[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x8a2c('0x0'));var util=require(_0x8a2c('0x1'));var moment=require(_0x8a2c('0x2'));var BPromise=require(_0x8a2c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8a2c('0x4'))['db'];var utils=require(_0x8a2c('0x5'));var logger=require(_0x8a2c('0x6'))(_0x8a2c('0x7'));var config=require(_0x8a2c('0x8'));var jayson=require(_0x8a2c('0x9'));var client=jayson['client'][_0x8a2c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x74e652,_0x4d0490,_0x118f69){return new BPromise(function(_0x132494,_0x32b0d6){return client[_0x8a2c('0xb')](_0x74e652,_0x118f69)['then'](function(_0x3b3969){logger[_0x8a2c('0xc')]('Trigger,\x20%s,\x20%s',_0x4d0490,_0x8a2c('0xd'));logger[_0x8a2c('0xe')](_0x8a2c('0xf'),_0x4d0490,_0x8a2c('0xd'),JSON[_0x8a2c('0x10')](_0x3b3969));if(_0x3b3969['error']){if(_0x3b3969['error'][_0x8a2c('0x11')]===0x1f4){logger[_0x8a2c('0x12')]('Trigger,\x20%s,\x20%s',_0x4d0490,_0x3b3969[_0x8a2c('0x12')][_0x8a2c('0x13')]);return _0x32b0d6(_0x3b3969[_0x8a2c('0x12')][_0x8a2c('0x13')]);}logger[_0x8a2c('0x12')](_0x8a2c('0x14'),_0x4d0490,_0x3b3969[_0x8a2c('0x12')]['message']);return _0x132494(_0x3b3969['error'][_0x8a2c('0x13')]);}else{logger['info']('Trigger,\x20%s,\x20%s',_0x4d0490,_0x8a2c('0xd'));_0x132494(_0x3b3969[_0x8a2c('0x15')]['message']);}})['catch'](function(_0xa05e33){logger[_0x8a2c('0x12')](_0x8a2c('0x14'),_0x4d0490,_0xa05e33);_0x32b0d6(_0xa05e33);});});}exports[_0x8a2c('0x16')]=function(_0x4c04d5){var _0x231fdc=this;return new Promise(function(_0x4d7654,_0x5ccdd5){return db[_0x8a2c('0x17')][_0x8a2c('0x18')]({'raw':_0x4c04d5[_0x8a2c('0x19')]?_0x4c04d5[_0x8a2c('0x19')][_0x8a2c('0x1a')]===undefined?!![]:![]:!![],'where':_0x4c04d5[_0x8a2c('0x19')]?_0x4c04d5[_0x8a2c('0x19')][_0x8a2c('0x1b')]||null:null,'attributes':_0x4c04d5['options']?_0x4c04d5[_0x8a2c('0x19')][_0x8a2c('0x1c')]||null:null,'limit':_0x4c04d5[_0x8a2c('0x19')]?_0x4c04d5[_0x8a2c('0x19')]['limit']||null:null,'include':_0x4c04d5[_0x8a2c('0x19')]?_0x4c04d5[_0x8a2c('0x19')][_0x8a2c('0x1d')]?_[_0x8a2c('0x1e')](_0x4c04d5[_0x8a2c('0x19')][_0x8a2c('0x1d')],function(_0x1418a3){return{'model':db[_0x1418a3['model']],'as':_0x1418a3['as'],'attributes':_0x1418a3['attributes'],'include':_0x1418a3[_0x8a2c('0x1d')]?_[_0x8a2c('0x1e')](_0x1418a3['include'],function(_0x45c8d6){return{'model':db[_0x45c8d6[_0x8a2c('0x1f')]],'as':_0x45c8d6['as'],'attributes':_0x45c8d6[_0x8a2c('0x1c')],'include':_0x45c8d6[_0x8a2c('0x1d')]?_[_0x8a2c('0x1e')](_0x45c8d6[_0x8a2c('0x1d')],function(_0x15bb6e){return{'model':db[_0x15bb6e['model']],'as':_0x15bb6e['as'],'attributes':_0x15bb6e[_0x8a2c('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8a2c('0x20')](function(_0x3abdf1){logger[_0x8a2c('0xc')]('GetTrigger',_0x4c04d5);logger[_0x8a2c('0xe')]('GetTrigger',_0x4c04d5,JSON[_0x8a2c('0x10')](_0x3abdf1));_0x4d7654(_0x3abdf1);})[_0x8a2c('0x21')](function(_0x3d39c6){logger['error']('GetTrigger',_0x3d39c6[_0x8a2c('0x13')],_0x4c04d5);_0x5ccdd5(_0x231fdc[_0x8a2c('0x12')](0x1f4,_0x3d39c6[_0x8a2c('0x13')]));});});};exports[_0x8a2c('0x22')]=function(_0x46bc6b){var _0x22cc0b=this;return new Promise(function(_0x531dbe,_0x3a1a32){return db['Trigger']['find']({'raw':_0x46bc6b[_0x8a2c('0x19')]?_0x46bc6b[_0x8a2c('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x46bc6b[_0x8a2c('0x19')]?_0x46bc6b[_0x8a2c('0x19')][_0x8a2c('0x1b')]||null:null,'attributes':_0x46bc6b[_0x8a2c('0x19')]?_0x46bc6b[_0x8a2c('0x19')][_0x8a2c('0x1c')]||null:null,'include':_0x46bc6b[_0x8a2c('0x19')]?_0x46bc6b[_0x8a2c('0x19')][_0x8a2c('0x1d')]?_[_0x8a2c('0x1e')](_0x46bc6b['options'][_0x8a2c('0x1d')],function(_0x2013b6){return{'model':db[_0x2013b6['model']],'as':_0x2013b6['as'],'attributes':_0x2013b6[_0x8a2c('0x1c')],'include':_0x2013b6['include']?_['map'](_0x2013b6[_0x8a2c('0x1d')],function(_0x136acc){return{'model':db[_0x136acc[_0x8a2c('0x1f')]],'as':_0x136acc['as'],'attributes':_0x136acc[_0x8a2c('0x1c')],'include':_0x136acc[_0x8a2c('0x1d')]?_[_0x8a2c('0x1e')](_0x136acc[_0x8a2c('0x1d')],function(_0xe5d32a){return{'model':db[_0xe5d32a[_0x8a2c('0x1f')]],'as':_0xe5d32a['as'],'attributes':_0xe5d32a[_0x8a2c('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8a2c('0x20')](function(_0x51e699){logger['info'](_0x8a2c('0x22'),_0x46bc6b);logger[_0x8a2c('0xe')](_0x8a2c('0x22'),_0x46bc6b,JSON[_0x8a2c('0x10')](_0x51e699));_0x531dbe(_0x51e699);})[_0x8a2c('0x21')](function(_0xa1e827){logger['error']('ShowTrigger',_0xa1e827[_0x8a2c('0x13')],_0x46bc6b);_0x3a1a32(_0x22cc0b['error'](0x1f4,_0xa1e827[_0x8a2c('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js
index 8da4296..6159a3d 100644
--- a/server/api/trunk/index.js
+++ b/server/api/trunk/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf19c=['/:id/clone','clone','create','put','destroy','exports','multer','util','connect-timeout','express','../../components/auth/service','./trunk.controller','index','get','/:id','isAuthenticated','show'];(function(_0x1128b5,_0x4cb996){var _0x18c744=function(_0x188ca4){while(--_0x188ca4){_0x1128b5['push'](_0x1128b5['shift']());}};_0x18c744(++_0x4cb996);}(_0xf19c,0x16b));var _0xcf19=function(_0x239d63,_0x7348ca){_0x239d63=_0x239d63-0x0;var _0x3f46ad=_0xf19c[_0x239d63];return _0x3f46ad;};'use strict';var multer=require(_0xcf19('0x0'));var util=require(_0xcf19('0x1'));var path=require('path');var timeout=require(_0xcf19('0x2'));var express=require(_0xcf19('0x3'));var router=express['Router']();var auth=require(_0xcf19('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xcf19('0x5'));router['get']('/',auth['isAuthenticated'](),controller[_0xcf19('0x6')]);router[_0xcf19('0x7')](_0xcf19('0x8'),auth[_0xcf19('0x9')](),controller[_0xcf19('0xa')]);router['post'](_0xcf19('0xb'),auth[_0xcf19('0x9')](),controller[_0xcf19('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0xcf19('0xd')]);router[_0xcf19('0xe')](_0xcf19('0x8'),auth[_0xcf19('0x9')](),controller['update']);router['delete'](_0xcf19('0x8'),auth['isAuthenticated'](),controller[_0xcf19('0xf')]);module[_0xcf19('0x10')]=router;
\ No newline at end of file
+var _0xfda4=['clone','put','/:id','update','exports','util','path','Router','./trunk.controller','get','isAuthenticated','index','show','post','/:id/clone'];(function(_0x1b0653,_0x3fa176){var _0x1de229=function(_0x247b98){while(--_0x247b98){_0x1b0653['push'](_0x1b0653['shift']());}};_0x1de229(++_0x3fa176);}(_0xfda4,0x113));var _0x4fda=function(_0xf9cc12,_0x8a5a90){_0xf9cc12=_0xf9cc12-0x0;var _0x1827fa=_0xfda4[_0xf9cc12];return _0x1827fa;};'use strict';var multer=require('multer');var util=require(_0x4fda('0x0'));var path=require(_0x4fda('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x4fda('0x2')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x4fda('0x3'));router[_0x4fda('0x4')]('/',auth[_0x4fda('0x5')](),controller[_0x4fda('0x6')]);router[_0x4fda('0x4')]('/:id',auth[_0x4fda('0x5')](),controller[_0x4fda('0x7')]);router[_0x4fda('0x8')](_0x4fda('0x9'),auth[_0x4fda('0x5')](),controller[_0x4fda('0xa')]);router[_0x4fda('0x8')]('/',auth[_0x4fda('0x5')](),controller['create']);router[_0x4fda('0xb')](_0x4fda('0xc'),auth['isAuthenticated'](),controller[_0x4fda('0xd')]);router['delete'](_0x4fda('0xc'),auth[_0x4fda('0x5')](),controller['destroy']);module[_0x4fda('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/trunk/trunk.attributes.js b/server/api/trunk/trunk.attributes.js
index 8085d59..e735c48 100644
--- a/server/api/trunk/trunk.attributes.js
+++ b/server/api/trunk/trunk.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbaf0=['setDataValue','transport','join','getDataValue','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','shortinfo','inband','auto','yes','outgoing','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','\x22\x22\x20<>','INTEGER','always','accept','refuse','originate','uac','uas','pai','fingerprint','active','passive','actpass','dynamic','nonat','update,nonat','exports','STRING','name','ENUM','friend','user','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_FAILED_SCREEN','udp'];(function(_0x5be40e,_0x12997e){var _0x3db6e1=function(_0x3fa7c8){while(--_0x3fa7c8){_0x5be40e['push'](_0x5be40e['shift']());}};_0x3db6e1(++_0x12997e);}(_0xbaf0,0x12a));var _0x0baf=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xbaf0[_0x5ddb1c];return _0x354adc;};'use strict';var Sequelize=require('sequelize');module[_0x0baf('0x0')]={'name':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'unique':_0x0baf('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x4'),_0x0baf('0x5'),'peer'),'allowNull':![],'defaultValue':_0x0baf('0x4')},'context':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'defaultValue':_0x0baf('0x6')},'callingpres':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x7'),_0x0baf('0x8'),_0x0baf('0x9'),_0x0baf('0xa'),_0x0baf('0xb'),'PROHIB_PASSED_SCREEN',_0x0baf('0xc'),'PROHIB')},'deny':{'type':Sequelize[_0x0baf('0x1')]},'permit':{'type':Sequelize[_0x0baf('0x1')]},'secret':{'type':Sequelize[_0x0baf('0x1')]},'md5secret':{'type':Sequelize[_0x0baf('0x1')]},'remotesecret':{'type':Sequelize[_0x0baf('0x1')]},'transport':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':_0x0baf('0xd'),'set':function(_0x245a6b){this[_0x0baf('0xe')](_0x0baf('0xf'),_0x245a6b?_0x245a6b[_0x0baf('0x10')](','):null);},'get':function(){return this['getDataValue']('transport')?this[_0x0baf('0x11')](_0x0baf('0xf'))[_0x0baf('0x12')](','):null;},'comment':_0x0baf('0x13')},'dtmfmode':{'type':Sequelize['ENUM'](_0x0baf('0x14'),'info',_0x0baf('0x15'),_0x0baf('0x16'),_0x0baf('0x17')),'defaultValue':_0x0baf('0x14')},'directmedia':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no','nonat','update',_0x0baf('0x19')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x0baf('0x1')]},'directmediadeny':{'type':Sequelize[_0x0baf('0x1')]},'nat':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':'force_rport,comedia','set':function(_0x63c820){this[_0x0baf('0xe')](_0x0baf('0x1a'),_0x63c820?_0x63c820[_0x0baf('0x10')](','):null);},'get':function(){return this[_0x0baf('0x11')](_0x0baf('0x1a'))?this['getDataValue']('nat')[_0x0baf('0x12')](','):null;},'comment':_0x0baf('0x1b')},'callgroup':{'type':Sequelize[_0x0baf('0x1')]},'namedcallgroup':{'type':Sequelize[_0x0baf('0x1')]},'pickupgroup':{'type':Sequelize[_0x0baf('0x1')]},'namedpickupgroup':{'type':Sequelize[_0x0baf('0x1')]},'language':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x0baf('0x1')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':_0x0baf('0x1c')},'allow':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x0baf('0x1d'),'set':function(_0x482522){this[_0x0baf('0xe')]('allow',_0x482522?_0x482522['join'](';'):_0x0baf('0x1d'));},'get':function(){return this['getDataValue']('allow')?this[_0x0baf('0x11')](_0x0baf('0x1e'))[_0x0baf('0x12')](';'):null;},'comment':_0x0baf('0x1f')},'autoframing':{'type':Sequelize[_0x0baf('0x3')]('yes','no')},'insecure':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':_0x0baf('0x20'),'set':function(_0x1ca35a){this[_0x0baf('0xe')](_0x0baf('0x21'),_0x1ca35a?_0x1ca35a[_0x0baf('0x10')](','):null);},'get':function(){return this[_0x0baf('0x11')]('insecure')?this[_0x0baf('0x11')](_0x0baf('0x21'))[_0x0baf('0x12')](','):null;},'comment':_0x0baf('0x22')},'trustrpid':{'type':Sequelize['ENUM'](_0x0baf('0x18'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x0baf('0x3')]('yes','no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no',_0x0baf('0x23'))},'promiscredir':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'useclientcode':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'accountcode':{'type':Sequelize['INTEGER'](0xb)},'setvar':{'type':Sequelize[_0x0baf('0x1')]},'callerid':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':_0x0baf('0x24')},'amaflags':{'type':Sequelize[_0x0baf('0x1')]},'callcounter':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no'),'defaultValue':_0x0baf('0x18')},'busylevel':{'type':Sequelize[_0x0baf('0x25')](0xb)},'allowoverlap':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'allowsubscribe':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'allowtransfer':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'ignoresdpversion':{'type':Sequelize['ENUM'](_0x0baf('0x18'),'no')},'subscribecontext':{'type':Sequelize['STRING']},'template':{'type':Sequelize[_0x0baf('0x1')]},'videosupport':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no',_0x0baf('0x26')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb)},'rfc2833compensate':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'mailbox':{'type':Sequelize['STRING']},'session_timers':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x27'),_0x0baf('0x28'),_0x0baf('0x29'))},'session_expires':{'type':Sequelize[_0x0baf('0x25')](0xb)},'session_minse':{'type':Sequelize[_0x0baf('0x25')](0xb)},'session_refresher':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x2a'),'uas'),'defaultValue':_0x0baf('0x2b')},'t38pt_usertpsource':{'type':Sequelize[_0x0baf('0x1')]},'regexten':{'type':Sequelize['STRING']},'fromdomain':{'type':Sequelize[_0x0baf('0x1')]},'fromuser':{'type':Sequelize['STRING']},'port':{'type':Sequelize['INTEGER'](0x5)},'qualify':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no'),'defaultValue':'yes'},'keepalive':{'type':Sequelize['INTEGER'](0xb)},'defaultip':{'type':Sequelize[_0x0baf('0x1')]},'defaultuser':{'type':Sequelize[_0x0baf('0x1')]},'rtptimeout':{'type':Sequelize[_0x0baf('0x25')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x0baf('0x25')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x0baf('0x25')](0xb)},'sendrpid':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no',_0x0baf('0x2c')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x0baf('0x1')]},'callbackextension':{'type':Sequelize[_0x0baf('0x1')]},'timert1':{'type':Sequelize[_0x0baf('0x25')](0xb)},'timerb':{'type':Sequelize[_0x0baf('0x25')](0xb)},'qualifyfreq':{'type':Sequelize[_0x0baf('0x25')](0xb)},'contactpermit':{'type':Sequelize[_0x0baf('0x1')]},'contactdeny':{'type':Sequelize['STRING']},'contactacl':{'type':Sequelize[_0x0baf('0x1')]},'unsolicited_mailbox':{'type':Sequelize[_0x0baf('0x1')]},'use_q850_reason':{'type':Sequelize['STRING']},'maxforwards':{'type':Sequelize[_0x0baf('0x25')](0xb)},'encryption':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'force_avp':{'type':Sequelize[_0x0baf('0x3')]('yes','no')},'icesupport':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'dtlsenable':{'type':Sequelize['ENUM'](_0x0baf('0x18'),'no')},'dtlsverify':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no',_0x0baf('0x2d'),'certificate')},'dtlsrekey':{'type':Sequelize[_0x0baf('0x25')](0xb)},'dtlscertfile':{'type':Sequelize[_0x0baf('0x1')]},'dtlsprivatekey':{'type':Sequelize[_0x0baf('0x1')]},'dtlscipher':{'type':Sequelize[_0x0baf('0x1')]},'dtlscafile':{'type':Sequelize[_0x0baf('0x1')]},'dtlscapath':{'type':Sequelize[_0x0baf('0x1')]},'dtlssetup':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x2e'),_0x0baf('0x2f'),_0x0baf('0x30')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize['STRING']},'usereqphone':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x0baf('0x1')]},'recordofffeature':{'type':Sequelize[_0x0baf('0x1')]},'call_limit':{'type':Sequelize[_0x0baf('0x25')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize['ENUM'](_0x0baf('0x18'),'no')},'subscribemwi':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no')},'vmexten':{'type':Sequelize[_0x0baf('0x1')]},'mohinterpret':{'type':Sequelize[_0x0baf('0x1')]},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize[_0x0baf('0x1')]},'description':{'type':Sequelize[_0x0baf('0x1')]},'host':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':_0x0baf('0x31')},'canreinvite':{'type':Sequelize[_0x0baf('0x3')](_0x0baf('0x18'),'no',_0x0baf('0x32'),'update',_0x0baf('0x33')),'defaultValue':'no'},'registry':{'type':Sequelize[_0x0baf('0x1')]},'otherFields':{'type':Sequelize[_0x0baf('0x1')]},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':'no'}};
\ No newline at end of file
+var _0x757a=['always','accept','refuse','originate','uac','uas','pai','fingerprint','certificate','active','passive','actpass','dynamic','update,nonat','exports','STRING','user','peer','friend','from-voip-provider','ENUM','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','setDataValue','transport','shortinfo','inband','auto','rfc2833','yes','nonat','update','outgoing','nat','join','getDataValue','split','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','\x22\x22\x20<>'];(function(_0x34da85,_0x335118){var _0x4d27d9=function(_0x52bee8){while(--_0x52bee8){_0x34da85['push'](_0x34da85['shift']());}};_0x4d27d9(++_0x335118);}(_0x757a,0xde));var _0xa757=function(_0x306b73,_0x3c49b6){_0x306b73=_0x306b73-0x0;var _0x19f4d0=_0x757a[_0x306b73];return _0x19f4d0;};'use strict';var Sequelize=require('sequelize');module[_0xa757('0x0')]={'name':{'type':Sequelize[_0xa757('0x1')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM']('friend',_0xa757('0x2'),_0xa757('0x3')),'allowNull':![],'defaultValue':_0xa757('0x4')},'context':{'type':Sequelize[_0xa757('0x1')],'allowNull':![],'defaultValue':_0xa757('0x5')},'callingpres':{'type':Sequelize[_0xa757('0x6')]('ALLOWED_NOT_SCREENED',_0xa757('0x7'),_0xa757('0x8'),'ALLOWED',_0xa757('0x9'),_0xa757('0xa'),_0xa757('0xb'),_0xa757('0xc'))},'deny':{'type':Sequelize[_0xa757('0x1')]},'permit':{'type':Sequelize['STRING']},'secret':{'type':Sequelize[_0xa757('0x1')]},'md5secret':{'type':Sequelize[_0xa757('0x1')]},'remotesecret':{'type':Sequelize[_0xa757('0x1')]},'transport':{'type':Sequelize[_0xa757('0x1')],'defaultValue':_0xa757('0xd'),'set':function(_0x188ad5){this[_0xa757('0xe')]('transport',_0x188ad5?_0x188ad5['join'](','):null);},'get':function(){return this['getDataValue']('transport')?this['getDataValue'](_0xa757('0xf'))['split'](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0xa757('0x6')]('rfc2833','info',_0xa757('0x10'),_0xa757('0x11'),_0xa757('0x12')),'defaultValue':_0xa757('0x13')},'directmedia':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no',_0xa757('0x15'),_0xa757('0x16'),_0xa757('0x17')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0xa757('0x6')]('yes','no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0xa757('0x1')]},'directmediadeny':{'type':Sequelize[_0xa757('0x1')]},'nat':{'type':Sequelize[_0xa757('0x1')],'defaultValue':'force_rport,comedia','set':function(_0x54b305){this[_0xa757('0xe')](_0xa757('0x18'),_0x54b305?_0x54b305[_0xa757('0x19')](','):null);},'get':function(){return this[_0xa757('0x1a')](_0xa757('0x18'))?this[_0xa757('0x1a')]('nat')[_0xa757('0x1b')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'},'callgroup':{'type':Sequelize[_0xa757('0x1')]},'namedcallgroup':{'type':Sequelize[_0xa757('0x1')]},'pickupgroup':{'type':Sequelize[_0xa757('0x1')]},'namedpickupgroup':{'type':Sequelize[_0xa757('0x1')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize['STRING'],'allowNull':!![]},'disallow':{'type':Sequelize[_0xa757('0x1')],'defaultValue':_0xa757('0x1c')},'allow':{'type':Sequelize[_0xa757('0x1')],'allowNull':![],'defaultValue':_0xa757('0x1d'),'set':function(_0x1d6e2){this[_0xa757('0xe')](_0xa757('0x1e'),_0x1d6e2?_0x1d6e2[_0xa757('0x19')](';'):_0xa757('0x1d'));},'get':function(){return this['getDataValue'](_0xa757('0x1e'))?this['getDataValue'](_0xa757('0x1e'))['split'](';'):null;},'comment':_0xa757('0x1f')},'autoframing':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'insecure':{'type':Sequelize['STRING'],'defaultValue':_0xa757('0x20'),'set':function(_0xcd98bd){this[_0xa757('0xe')](_0xa757('0x21'),_0xcd98bd?_0xcd98bd['join'](','):null);},'get':function(){return this[_0xa757('0x1a')]('insecure')?this['getDataValue']('insecure')['split'](','):null;},'comment':_0xa757('0x22')},'trustrpid':{'type':Sequelize['ENUM'](_0xa757('0x14'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0xa757('0x6')]('yes','no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0xa757('0x6')]('yes','no',_0xa757('0x23'))},'promiscredir':{'type':Sequelize[_0xa757('0x6')]('yes','no')},'useclientcode':{'type':Sequelize[_0xa757('0x6')]('yes','no')},'accountcode':{'type':Sequelize[_0xa757('0x24')](0xb)},'setvar':{'type':Sequelize[_0xa757('0x1')]},'callerid':{'type':Sequelize[_0xa757('0x1')],'defaultValue':_0xa757('0x25')},'amaflags':{'type':Sequelize[_0xa757('0x1')]},'callcounter':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no'),'defaultValue':_0xa757('0x14')},'busylevel':{'type':Sequelize[_0xa757('0x24')](0xb)},'allowoverlap':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'allowsubscribe':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'allowtransfer':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'ignoresdpversion':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'subscribecontext':{'type':Sequelize[_0xa757('0x1')]},'template':{'type':Sequelize[_0xa757('0x1')]},'videosupport':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no',_0xa757('0x26')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0xa757('0x24')](0xb)},'rfc2833compensate':{'type':Sequelize[_0xa757('0x6')]('yes','no')},'mailbox':{'type':Sequelize[_0xa757('0x1')]},'session_timers':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x27'),_0xa757('0x28'),_0xa757('0x29'))},'session_expires':{'type':Sequelize['INTEGER'](0xb)},'session_minse':{'type':Sequelize[_0xa757('0x24')](0xb)},'session_refresher':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x2a'),_0xa757('0x2b')),'defaultValue':_0xa757('0x2b')},'t38pt_usertpsource':{'type':Sequelize[_0xa757('0x1')]},'regexten':{'type':Sequelize['STRING']},'fromdomain':{'type':Sequelize[_0xa757('0x1')]},'fromuser':{'type':Sequelize[_0xa757('0x1')]},'port':{'type':Sequelize[_0xa757('0x24')](0x5)},'qualify':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no'),'defaultValue':_0xa757('0x14')},'keepalive':{'type':Sequelize[_0xa757('0x24')](0xb)},'defaultip':{'type':Sequelize[_0xa757('0x1')]},'defaultuser':{'type':Sequelize[_0xa757('0x1')]},'rtptimeout':{'type':Sequelize['INTEGER'](0xb)},'rtpholdtimeout':{'type':Sequelize[_0xa757('0x24')](0xb)},'rtpkeepalive':{'type':Sequelize[_0xa757('0x24')](0xb)},'sendrpid':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no',_0xa757('0x2c')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0xa757('0x1')]},'callbackextension':{'type':Sequelize['STRING']},'timert1':{'type':Sequelize[_0xa757('0x24')](0xb)},'timerb':{'type':Sequelize[_0xa757('0x24')](0xb)},'qualifyfreq':{'type':Sequelize['INTEGER'](0xb)},'contactpermit':{'type':Sequelize['STRING']},'contactdeny':{'type':Sequelize[_0xa757('0x1')]},'contactacl':{'type':Sequelize[_0xa757('0x1')]},'unsolicited_mailbox':{'type':Sequelize['STRING']},'use_q850_reason':{'type':Sequelize['STRING']},'maxforwards':{'type':Sequelize[_0xa757('0x24')](0xb)},'encryption':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0xa757('0x14'),'no')},'force_avp':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'icesupport':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x14'),'no')},'dtlsenable':{'type':Sequelize['ENUM'](_0xa757('0x14'),'no')},'dtlsverify':{'type':Sequelize['ENUM']('yes','no',_0xa757('0x2d'),_0xa757('0x2e'))},'dtlsrekey':{'type':Sequelize[_0xa757('0x24')](0xb)},'dtlscertfile':{'type':Sequelize[_0xa757('0x1')]},'dtlsprivatekey':{'type':Sequelize[_0xa757('0x1')]},'dtlscipher':{'type':Sequelize['STRING']},'dtlscafile':{'type':Sequelize['STRING']},'dtlscapath':{'type':Sequelize[_0xa757('0x1')]},'dtlssetup':{'type':Sequelize[_0xa757('0x6')](_0xa757('0x2f'),_0xa757('0x30'),_0xa757('0x31')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0xa757('0x1')]},'usereqphone':{'type':Sequelize['ENUM'](_0xa757('0x14'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0xa757('0x1')]},'recordofffeature':{'type':Sequelize['STRING']},'call_limit':{'type':Sequelize[_0xa757('0x24')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize['ENUM'](_0xa757('0x14'),'no')},'subscribemwi':{'type':Sequelize[_0xa757('0x6')]('yes','no')},'vmexten':{'type':Sequelize[_0xa757('0x1')]},'mohinterpret':{'type':Sequelize[_0xa757('0x1')]},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize[_0xa757('0x1')]},'description':{'type':Sequelize[_0xa757('0x1')]},'host':{'type':Sequelize[_0xa757('0x1')],'defaultValue':_0xa757('0x32')},'canreinvite':{'type':Sequelize['ENUM'](_0xa757('0x14'),'no',_0xa757('0x15'),_0xa757('0x16'),_0xa757('0x33')),'defaultValue':'no'},'registry':{'type':Sequelize['STRING']},'otherFields':{'type':Sequelize[_0xa757('0x1')]},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize['STRING'],'defaultValue':'no'}};
\ No newline at end of file
diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js
index 7d36a0e..a9e0f9f 100644
--- a/server/api/trunk/trunk.controller.js
+++ b/server/api/trunk/trunk.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x74d7=['../../config/logger','api','../../mysqldb','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','Trunk,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','sendStatus','end','status','json','count','offset','limit','Content-Range','apply','reject','save','destroy','Trunks','UserProfileResource','stack','name','send','index','Trunk','rawAttributes','model','keys','query','intersection','attributes','fields','length','order','sort','where','pick','filters','filter','map','VIRTUAL','field','merge','include','findAll','rows','show','includeAll','find','clone','params','get','createdAt','body','omit','updatedAt','user','role','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','join','root','utf8','readFileSync','server/files/templates/registry.ejs','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload','update','server/files/templates/trunk.ejs','chan_sip.so','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware'];(function(_0x3ab0f7,_0x421925){var _0x55ab91=function(_0x23bee2){while(--_0x23bee2){_0x3ab0f7['push'](_0x3ab0f7['shift']());}};_0x55ab91(++_0x421925);}(_0x74d7,0xc4));var _0x774d=function(_0xb725be,_0x45bd01){_0xb725be=_0xb725be-0x0;var _0x2f2424=_0x74d7[_0xb725be];return _0x2f2424;};'use strict';var pdf=require(_0x774d('0x0'));var emlformat=require(_0x774d('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x774d('0x2'));var jsonpatch=require(_0x774d('0x3'));var rp=require(_0x774d('0x4'));var moment=require(_0x774d('0x5'));var BPromise=require(_0x774d('0x6'));var Mustache=require(_0x774d('0x7'));var util=require(_0x774d('0x8'));var path=require(_0x774d('0x9'));var sox=require(_0x774d('0xa'));var csv=require('to-csv');var ejs=require(_0x774d('0xb'));var fs=require('fs');var _=require(_0x774d('0xc'));var squel=require(_0x774d('0xd'));var crypto=require('crypto');var jsforce=require(_0x774d('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x774d('0xf'));var querystring=require(_0x774d('0x10'));var Papa=require(_0x774d('0x11'));var Redis=require(_0x774d('0x12'));var authService=require(_0x774d('0x13'));var qs=require(_0x774d('0x14'));var hardwareService=require(_0x774d('0x15'));var logger=require(_0x774d('0x16'))(_0x774d('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x774d('0x18'))['db'];var jayson=require(_0x774d('0x19'));var client=jayson[_0x774d('0x1a')]['http']({'port':0x232a});function checkPasswordPattern(_0x2083ac,_0x4b7b85,_0x5055b7){if(_0x5055b7){var _0x10de08=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x10de08[_0x774d('0x1b')](_0x4b7b85)){return _0x2083ac;}else{throw new Error(_0x774d('0x1c'));}}else{return _0x2083ac;}}function respondWithRpcPromise(_0x4363a3,_0x5d15bc,_0x4908a6,_0x4c0447){return new BPromise(function(_0x3bbd0c,_0x1f0add){var _0x10f501=_0x4c0447||client;return _0x10f501['request'](_0x4363a3,_0x4908a6)[_0x774d('0x1d')](function(_0x247d2c){logger['info'](_0x774d('0x1e'),_0x5d15bc,'request\x20sent');logger['debug']('Trunk,\x20%s,\x20%s,\x20%s',_0x5d15bc,_0x774d('0x1f'),JSON[_0x774d('0x20')](_0x247d2c));if(_0x247d2c['error']){if(_0x247d2c[_0x774d('0x21')]['code']===0x1f4){logger['error'](_0x774d('0x1e'),_0x5d15bc,_0x247d2c['error'][_0x774d('0x22')]);return _0x1f0add(_0x247d2c[_0x774d('0x21')]['message']);}logger[_0x774d('0x21')](_0x774d('0x1e'),_0x5d15bc,_0x247d2c[_0x774d('0x21')][_0x774d('0x22')]);return _0x3bbd0c(_0x247d2c['error'][_0x774d('0x22')]);}else{logger[_0x774d('0x23')](_0x774d('0x1e'),_0x5d15bc,_0x774d('0x1f'));_0x3bbd0c(_0x247d2c[_0x774d('0x24')]['message']);}})[_0x774d('0x25')](function(_0x41977d){logger['error']('Trunk,\x20%s,\x20%s',_0x5d15bc,_0x41977d);_0x1f0add(_0x41977d);});});}function respondWithStatusCode(_0x522006,_0x74d6ce){_0x74d6ce=_0x74d6ce||0xcc;return function(_0x1f8b24){if(_0x1f8b24){return _0x522006[_0x774d('0x26')](_0x74d6ce);}return _0x522006['status'](_0x74d6ce)[_0x774d('0x27')]();};}function respondWithResult(_0x41e7e9,_0x12607b){_0x12607b=_0x12607b||0xc8;return function(_0x2a6b1e){if(_0x2a6b1e){return _0x41e7e9[_0x774d('0x28')](_0x12607b)[_0x774d('0x29')](_0x2a6b1e);}};}function respondWithFilteredResult(_0x13a8e0,_0xe36410){return function(_0x22b629){if(_0x22b629){var _0x483bd0=_0x22b629[_0x774d('0x2a')],_0x3db899=_0xe36410[_0x774d('0x2b')],_0x1561bf=_0xe36410['offset']+_0xe36410[_0x774d('0x2c')],_0x2f9e69;if(_0x1561bf>=_0x483bd0){_0x1561bf=_0x483bd0;_0x2f9e69=0xc8;}else{_0x2f9e69=0xce;}_0x13a8e0[_0x774d('0x28')](_0x2f9e69);return _0x13a8e0['set'](_0x774d('0x2d'),_0x3db899+'-'+_0x1561bf+'/'+_0x483bd0)['json'](_0x22b629);}return null;};}function patchUpdates(_0x544147){return function(_0x55d99b){try{jsonpatch[_0x774d('0x2e')](_0x55d99b,_0x544147,!![]);}catch(_0x1d84ef){return BPromise[_0x774d('0x2f')](_0x1d84ef);}return _0x55d99b[_0x774d('0x30')]();};}function saveUpdates(_0xdff35b,_0x4c5fd0){return function(_0x448e6c){if(_0x448e6c){return _0x448e6c['update'](_0xdff35b)[_0x774d('0x1d')](function(_0x4ced36){return _0x4ced36;});}return null;};}function removeEntity(_0x40d04d,_0xdeb55a){return function(_0xf97cda){if(_0xf97cda){return _0xf97cda[_0x774d('0x31')]()[_0x774d('0x1d')](function(){var _0x470d48=_0xf97cda['get']({'plain':!![]});var _0x35c5b3=_0x774d('0x32');return db[_0x774d('0x33')][_0x774d('0x31')]({'where':{'type':_0x35c5b3,'resourceId':_0x470d48['id']}})[_0x774d('0x1d')](function(){return _0xf97cda;});})[_0x774d('0x1d')](function(){_0x40d04d[_0x774d('0x28')](0xcc)[_0x774d('0x27')]();});}};}function handleEntityNotFound(_0x3f6142,_0x3d21ff){return function(_0x58831f){if(!_0x58831f){_0x3f6142[_0x774d('0x26')](0x194);}return _0x58831f;};}function handleError(_0x3b8561,_0x1c78d6){_0x1c78d6=_0x1c78d6||0x1f4;return function(_0x57dc8f){logger[_0x774d('0x21')](_0x57dc8f[_0x774d('0x34')]);if(_0x57dc8f[_0x774d('0x35')]){delete _0x57dc8f[_0x774d('0x35')];}_0x3b8561['status'](_0x1c78d6)[_0x774d('0x36')](_0x57dc8f);};}exports[_0x774d('0x37')]=function(_0x2e94fd,_0x1ec24d){var _0x517690={},_0x4a2bf7={},_0x5aac26={'count':0x0,'rows':[]};var _0x32e3bf=db[_0x774d('0x38')][_0x774d('0x39')];_0x4a2bf7[_0x774d('0x3a')]=_[_0x774d('0x3b')](_0x32e3bf);_0x4a2bf7[_0x774d('0x3c')]=_[_0x774d('0x3b')](_0x2e94fd[_0x774d('0x3c')]);_0x4a2bf7['filters']=_[_0x774d('0x3d')](_0x4a2bf7[_0x774d('0x3a')],_0x4a2bf7[_0x774d('0x3c')]);_0x517690[_0x774d('0x3e')]=_['intersection'](_0x4a2bf7[_0x774d('0x3a')],qs[_0x774d('0x3f')](_0x2e94fd[_0x774d('0x3c')][_0x774d('0x3f')]));_0x517690[_0x774d('0x3e')]=_0x517690[_0x774d('0x3e')][_0x774d('0x40')]?_0x517690['attributes']:_0x4a2bf7[_0x774d('0x3a')];if(!_0x2e94fd[_0x774d('0x3c')]['hasOwnProperty']('nolimit')){_0x517690[_0x774d('0x2c')]=qs[_0x774d('0x2c')](_0x2e94fd['query'][_0x774d('0x2c')]);_0x517690[_0x774d('0x2b')]=qs[_0x774d('0x2b')](_0x2e94fd[_0x774d('0x3c')][_0x774d('0x2b')]);}_0x517690[_0x774d('0x41')]=qs['sort'](_0x2e94fd[_0x774d('0x3c')][_0x774d('0x42')]);_0x517690[_0x774d('0x43')]=qs['filters'](_[_0x774d('0x44')](_0x2e94fd['query'],_0x4a2bf7[_0x774d('0x45')]));if(_0x2e94fd[_0x774d('0x3c')][_0x774d('0x46')]){_0x517690[_0x774d('0x43')]=_['merge'](_0x517690[_0x774d('0x43')],{'$or':_[_0x774d('0x47')](_0x32e3bf,function(_0x37b794){if(_0x37b794['type']['key']!==_0x774d('0x48')){var _0x45351b={};_0x45351b[_0x37b794[_0x774d('0x49')]]={'$like':'%'+_0x2e94fd[_0x774d('0x3c')][_0x774d('0x46')]+'%'};return _0x45351b;}})});}_0x517690=_[_0x774d('0x4a')]({},_0x517690,_0x2e94fd['options']);var _0x4155e0={'where':_0x517690[_0x774d('0x43')]};return db[_0x774d('0x38')][_0x774d('0x2a')](_0x4155e0)['then'](function(_0x5a55ed){_0x5aac26[_0x774d('0x2a')]=_0x5a55ed;if(_0x2e94fd[_0x774d('0x3c')]['includeAll']){_0x517690[_0x774d('0x4b')]=[{'all':!![]}];}return db[_0x774d('0x38')][_0x774d('0x4c')](_0x517690);})['then'](function(_0x14a643){_0x5aac26[_0x774d('0x4d')]=_0x14a643;return _0x5aac26;})['then'](respondWithFilteredResult(_0x1ec24d,_0x517690))[_0x774d('0x25')](handleError(_0x1ec24d,null));};exports[_0x774d('0x4e')]=function(_0x400d0f,_0x5e8a1a){var _0x4ad6e5={'raw':![],'where':{'id':_0x400d0f['params']['id']}},_0x153442={};_0x153442[_0x774d('0x3a')]=_[_0x774d('0x3b')](db[_0x774d('0x38')]['rawAttributes']);_0x153442[_0x774d('0x3c')]=_['keys'](_0x400d0f['query']);_0x153442['filters']=_['intersection'](_0x153442[_0x774d('0x3a')],_0x153442[_0x774d('0x3c')]);_0x4ad6e5[_0x774d('0x3e')]=_['intersection'](_0x153442[_0x774d('0x3a')],qs[_0x774d('0x3f')](_0x400d0f['query'][_0x774d('0x3f')]));_0x4ad6e5[_0x774d('0x3e')]=_0x4ad6e5['attributes'][_0x774d('0x40')]?_0x4ad6e5[_0x774d('0x3e')]:_0x153442[_0x774d('0x3a')];if(_0x400d0f[_0x774d('0x3c')][_0x774d('0x4f')]){_0x4ad6e5[_0x774d('0x4b')]=[{'all':!![]}];}_0x4ad6e5=_[_0x774d('0x4a')]({},_0x4ad6e5,_0x400d0f['options']);return db[_0x774d('0x38')][_0x774d('0x50')](_0x4ad6e5)['then'](handleEntityNotFound(_0x5e8a1a,null))['then'](respondWithResult(_0x5e8a1a,null))['catch'](handleError(_0x5e8a1a,null));};exports[_0x774d('0x51')]=function(_0xa1061,_0x5afbe3){var _0x30bfd8={'raw':![],'where':{'id':_0xa1061[_0x774d('0x52')]['id']}},_0x407936={};_0x407936[_0x774d('0x3a')]=_[_0x774d('0x3b')](db[_0x774d('0x38')][_0x774d('0x39')]);_0x30bfd8[_0x774d('0x3e')]=_['intersection'](_0x407936['model'],qs[_0x774d('0x3f')](_0xa1061[_0x774d('0x3c')][_0x774d('0x3f')]));_0x30bfd8[_0x774d('0x3e')]=_0x30bfd8[_0x774d('0x3e')][_0x774d('0x40')]?_0x30bfd8[_0x774d('0x3e')]:_0x407936['model'];if(_0xa1061['query'][_0x774d('0x4f')]){_0x30bfd8[_0x774d('0x4b')]=[{'all':!![]}];}_0x30bfd8=_[_0x774d('0x4a')]({},_0x30bfd8,_0xa1061['options']);return db[_0x774d('0x38')][_0x774d('0x50')](_0x30bfd8)['then'](handleEntityNotFound(_0x5afbe3,null))[_0x774d('0x1d')](function(_0x1183b0){if(_0x1183b0){var _0xb31b59=_0x1183b0[_0x774d('0x53')]({'plain':!![]});_0xb31b59=qs['omit'](_0xb31b59,['id',_0x774d('0x54'),'updatedAt']);_0xa1061[_0x774d('0x55')]=_[_0x774d('0x56')](_0xa1061['body'],['id',_0x774d('0x54'),_0x774d('0x57')]);return db[_0x774d('0x38')]['create'](_[_0x774d('0x4a')](_0xb31b59,_0xa1061[_0x774d('0x55')]),{'include':_0xa1061['query']['includeAll']?[{'all':!![]}]:undefined})[_0x774d('0x1d')](function(_0x35da60){var _0x1835c1=_0xa1061[_0x774d('0x58')][_0x774d('0x53')]({'plain':!![]});if(!_0x1835c1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1835c1[_0x774d('0x59')]==='user'){var _0x118418=_0x35da60['get']({'plain':!![]});var _0x105ea4=_0x774d('0x32');return db[_0x774d('0x5a')][_0x774d('0x50')]({'where':{'name':_0x105ea4,'userProfileId':_0x1835c1[_0x774d('0x5b')]},'raw':!![]})['then'](function(_0x4f4be0){if(_0x4f4be0&&_0x4f4be0[_0x774d('0x5c')]===0x0){return db[_0x774d('0x33')][_0x774d('0x5d')]({'name':_0x118418['name'],'resourceId':_0x118418['id'],'type':_0x4f4be0[_0x774d('0x35')],'sectionId':_0x4f4be0['id']},{})['then'](function(){return _0x35da60;});}else{return _0x35da60;}})[_0x774d('0x25')](function(_0x1f1f83){logger[_0x774d('0x21')](_0x774d('0x5e'),_0x1f1f83);throw _0x1f1f83;});}return _0x35da60;});}})['then'](respondWithResult(_0x5afbe3,0xc9))[_0x774d('0x25')](handleError(_0x5afbe3,null));};exports[_0x774d('0x5d')]=function(_0x48c585,_0x2c84e6,_0x53e8af){var _0x164db3;return db['Trunk'][_0x774d('0x5d')](_0x48c585['body'],{'raw':!![]})[_0x774d('0x1d')](function(_0x5f35e4){_0x164db3=_0x5f35e4;return db[_0x774d('0x38')]['findAll']({'raw':!![]});})[_0x774d('0x1d')](function(_0x57c459){var _0x5cf3d5=fs['readFileSync'](path[_0x774d('0x5f')](config[_0x774d('0x60')],'server/files/templates/trunk.ejs'),_0x774d('0x61'));var _0x4a8076=fs[_0x774d('0x62')](path['join'](config[_0x774d('0x60')],_0x774d('0x63')),_0x774d('0x61'));var _0x37dd11=ejs[_0x774d('0x64')](_0x5cf3d5,{'trunks':_0x57c459||[]});fs[_0x774d('0x65')](_0x774d('0x66'),_0x37dd11);if(_0x164db3[_0x774d('0x67')]){var _0x276a29=ejs[_0x774d('0x64')](_0x4a8076,{'trunks':_0x57c459||[]});fs[_0x774d('0x65')](_0x774d('0x68'),_0x276a29);}})['then'](function(){return respondWithRpcPromise(_0x774d('0x69'),_0x774d('0x5d'),{'module':'chan_sip.so'});})[_0x774d('0x1d')](function(){var _0x263aca=_0x48c585[_0x774d('0x58')][_0x774d('0x53')]({'plain':!![]});if(!_0x263aca)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x263aca[_0x774d('0x59')]===_0x774d('0x58')){var _0x16085b=_0x164db3['get']({'plain':!![]});return db[_0x774d('0x5a')][_0x774d('0x50')]({'where':{'name':_0x774d('0x32'),'userProfileId':_0x263aca[_0x774d('0x5b')]},'raw':!![]})[_0x774d('0x1d')](function(_0x2577ca){if(_0x2577ca&&_0x2577ca[_0x774d('0x5c')]===0x0){return db[_0x774d('0x33')]['create']({'name':_0x16085b[_0x774d('0x35')],'resourceId':_0x16085b['id'],'type':_0x2577ca['name'],'sectionId':_0x2577ca['id']},{})['then'](function(){return _0x164db3;});}else{return _0x164db3;}})['catch'](function(_0x34c071){logger[_0x774d('0x21')](_0x774d('0x5e'),_0x34c071);throw _0x34c071;});}return _0x164db3;})['then'](respondWithResult(_0x2c84e6,0xc9))['catch'](handleError(_0x2c84e6,null));};exports[_0x774d('0x6a')]=function(_0x614cb7,_0x2f34ef,_0x5b3deb){var _0x5e8e01;return db[_0x774d('0x38')][_0x774d('0x50')]({'where':{'id':_0x614cb7[_0x774d('0x52')]['id']}})[_0x774d('0x1d')](handleEntityNotFound(_0x2f34ef,null))['then'](saveUpdates(_0x614cb7['body'],null))[_0x774d('0x1d')](function(_0x28f623){if(_0x28f623){_0x5e8e01=_0x28f623;return db[_0x774d('0x38')][_0x774d('0x4c')]({'raw':!![]});}})['then'](function(_0x28128f){if(_0x28128f){var _0x1bf56b=fs[_0x774d('0x62')](path[_0x774d('0x5f')](config[_0x774d('0x60')],_0x774d('0x6b')),_0x774d('0x61'));var _0x5e9408=fs['readFileSync'](path['join'](config[_0x774d('0x60')],_0x774d('0x63')),_0x774d('0x61'));var _0x4e7b68=ejs['render'](_0x1bf56b,{'trunks':_0x28128f||[]});fs['writeFileSync']('/etc/asterisk/sip_xcally_trunks.conf',_0x4e7b68);var _0x20b5b7=ejs[_0x774d('0x64')](_0x5e9408,{'trunks':_0x28128f||[]});fs['writeFileSync'](_0x774d('0x68'),_0x20b5b7);return respondWithRpcPromise(_0x774d('0x69'),_0x774d('0x6a'),{'module':_0x774d('0x6c')});}return null;})[_0x774d('0x1d')](function(_0x147846){if(_0x147846){return _0x5e8e01;}})['then'](respondWithResult(_0x2f34ef,null))[_0x774d('0x25')](handleError(_0x2f34ef,null));};exports[_0x774d('0x31')]=function(_0x13f997,_0x11508e,_0x311ed7){var _0x493cd4;return db[_0x774d('0x38')][_0x774d('0x50')]({'where':{'id':_0x13f997[_0x774d('0x52')]['id']}})['then'](handleEntityNotFound(_0x11508e,null))[_0x774d('0x1d')](removeEntity(_0x11508e,null))[_0x774d('0x1d')](function(){return db[_0x774d('0x38')]['findAll']({'raw':!![]});})[_0x774d('0x1d')](function(_0x19b096){var _0x4708ae=fs[_0x774d('0x62')](path[_0x774d('0x5f')](config['root'],_0x774d('0x6b')),'utf8');var _0x129d92=fs[_0x774d('0x62')](path[_0x774d('0x5f')](config['root'],_0x774d('0x63')),'utf8');var _0x583aa1=ejs[_0x774d('0x64')](_0x4708ae,{'trunks':_0x19b096});var _0x34aa2c=ejs[_0x774d('0x64')](_0x129d92,{'trunks':_0x19b096});fs[_0x774d('0x65')](_0x774d('0x66'),_0x583aa1);fs[_0x774d('0x65')]('/etc/asterisk/sip_xcally_registers.conf',_0x34aa2c);return respondWithRpcPromise(_0x774d('0x69'),_0x774d('0x31'),{'module':_0x774d('0x6c')});})[_0x774d('0x25')](handleError(_0x11508e,null));};
\ No newline at end of file
+var _0x00f4=['Trunk,\x20%s,\x20%s','message','result','catch','sendStatus','status','json','count','offset','set','Content-Range','apply','reject','update','then','get','Trunks','UserProfileResource','destroy','end','send','index','Trunk','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','merge','map','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','rawAttributes','clone','params','createdAt','body','omit','updatedAt','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','name','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','root','server/files/templates/trunk.ejs','utf8','server/files/templates/registry.ejs','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','join','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','debug','request\x20sent','stringify','error'];(function(_0x24bbc9,_0x49c2c2){var _0x176a0b=function(_0x3ea511){while(--_0x3ea511){_0x24bbc9['push'](_0x24bbc9['shift']());}};_0x176a0b(++_0x49c2c2);}(_0x00f4,0x137));var _0x400f=function(_0x300729,_0x28f27a){_0x300729=_0x300729-0x0;var _0x523b97=_0x00f4[_0x300729];return _0x523b97;};'use strict';var pdf=require(_0x400f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x400f('0x1'));var zipdir=require(_0x400f('0x2'));var jsonpatch=require(_0x400f('0x3'));var rp=require(_0x400f('0x4'));var moment=require(_0x400f('0x5'));var BPromise=require(_0x400f('0x6'));var Mustache=require(_0x400f('0x7'));var util=require('util');var path=require('path');var sox=require(_0x400f('0x8'));var csv=require('to-csv');var ejs=require(_0x400f('0x9'));var fs=require('fs');var _=require(_0x400f('0xa'));var squel=require(_0x400f('0xb'));var crypto=require(_0x400f('0xc'));var jsforce=require(_0x400f('0xd'));var deskjs=require(_0x400f('0xe'));var toCsv=require(_0x400f('0xf'));var querystring=require('querystring');var Papa=require(_0x400f('0x10'));var Redis=require(_0x400f('0x11'));var authService=require(_0x400f('0x12'));var qs=require(_0x400f('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x400f('0x14'))(_0x400f('0x15'));var utils=require('../../config/utils');var config=require(_0x400f('0x16'));var db=require('../../mysqldb')['db'];var jayson=require(_0x400f('0x17'));var client=jayson[_0x400f('0x18')][_0x400f('0x19')]({'port':0x232a});function checkPasswordPattern(_0x439014,_0x5bd038,_0x5738f8){if(_0x5738f8){var _0x532b00=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x532b00[_0x400f('0x1a')](_0x5bd038)){return _0x439014;}else{throw new Error(_0x400f('0x1b'));}}else{return _0x439014;}}function respondWithRpcPromise(_0x1971a3,_0x1c0d02,_0x4a8da3,_0x4705f6){return new BPromise(function(_0x113c15,_0x3106ed){var _0x40f275=_0x4705f6||client;return _0x40f275[_0x400f('0x1c')](_0x1971a3,_0x4a8da3)['then'](function(_0x10c25e){logger[_0x400f('0x1d')]('Trunk,\x20%s,\x20%s',_0x1c0d02,'request\x20sent');logger[_0x400f('0x1e')]('Trunk,\x20%s,\x20%s,\x20%s',_0x1c0d02,_0x400f('0x1f'),JSON[_0x400f('0x20')](_0x10c25e));if(_0x10c25e[_0x400f('0x21')]){if(_0x10c25e[_0x400f('0x21')]['code']===0x1f4){logger[_0x400f('0x21')](_0x400f('0x22'),_0x1c0d02,_0x10c25e[_0x400f('0x21')][_0x400f('0x23')]);return _0x3106ed(_0x10c25e[_0x400f('0x21')][_0x400f('0x23')]);}logger[_0x400f('0x21')]('Trunk,\x20%s,\x20%s',_0x1c0d02,_0x10c25e[_0x400f('0x21')][_0x400f('0x23')]);return _0x113c15(_0x10c25e[_0x400f('0x21')][_0x400f('0x23')]);}else{logger[_0x400f('0x1d')](_0x400f('0x22'),_0x1c0d02,_0x400f('0x1f'));_0x113c15(_0x10c25e[_0x400f('0x24')][_0x400f('0x23')]);}})[_0x400f('0x25')](function(_0x5c7f44){logger[_0x400f('0x21')](_0x400f('0x22'),_0x1c0d02,_0x5c7f44);_0x3106ed(_0x5c7f44);});});}function respondWithStatusCode(_0x442c66,_0x1173d1){_0x1173d1=_0x1173d1||0xcc;return function(_0x185e24){if(_0x185e24){return _0x442c66[_0x400f('0x26')](_0x1173d1);}return _0x442c66[_0x400f('0x27')](_0x1173d1)['end']();};}function respondWithResult(_0x2fe1f0,_0x1d345e){_0x1d345e=_0x1d345e||0xc8;return function(_0x8ae90){if(_0x8ae90){return _0x2fe1f0[_0x400f('0x27')](_0x1d345e)[_0x400f('0x28')](_0x8ae90);}};}function respondWithFilteredResult(_0x1b62be,_0x359257){return function(_0x3c0efe){if(_0x3c0efe){var _0x462166=_0x3c0efe[_0x400f('0x29')],_0x1d324a=_0x359257[_0x400f('0x2a')],_0x4261a7=_0x359257[_0x400f('0x2a')]+_0x359257['limit'],_0x5c52f2;if(_0x4261a7>=_0x462166){_0x4261a7=_0x462166;_0x5c52f2=0xc8;}else{_0x5c52f2=0xce;}_0x1b62be['status'](_0x5c52f2);return _0x1b62be[_0x400f('0x2b')](_0x400f('0x2c'),_0x1d324a+'-'+_0x4261a7+'/'+_0x462166)[_0x400f('0x28')](_0x3c0efe);}return null;};}function patchUpdates(_0x11f18f){return function(_0x214550){try{jsonpatch[_0x400f('0x2d')](_0x214550,_0x11f18f,!![]);}catch(_0x1a7a42){return BPromise[_0x400f('0x2e')](_0x1a7a42);}return _0x214550['save']();};}function saveUpdates(_0x4cff3f,_0x3fc814){return function(_0x25dac7){if(_0x25dac7){return _0x25dac7[_0x400f('0x2f')](_0x4cff3f)[_0x400f('0x30')](function(_0x8549ec){return _0x8549ec;});}return null;};}function removeEntity(_0x5d1975,_0x275ef0){return function(_0x2601ce){if(_0x2601ce){return _0x2601ce['destroy']()[_0x400f('0x30')](function(){var _0x863eda=_0x2601ce[_0x400f('0x31')]({'plain':!![]});var _0x4b67af=_0x400f('0x32');return db[_0x400f('0x33')][_0x400f('0x34')]({'where':{'type':_0x4b67af,'resourceId':_0x863eda['id']}})[_0x400f('0x30')](function(){return _0x2601ce;});})[_0x400f('0x30')](function(){_0x5d1975[_0x400f('0x27')](0xcc)[_0x400f('0x35')]();});}};}function handleEntityNotFound(_0xb24216,_0x2272b3){return function(_0x265292){if(!_0x265292){_0xb24216['sendStatus'](0x194);}return _0x265292;};}function handleError(_0x4454df,_0x24e515){_0x24e515=_0x24e515||0x1f4;return function(_0x3e6597){logger[_0x400f('0x21')](_0x3e6597['stack']);if(_0x3e6597['name']){delete _0x3e6597['name'];}_0x4454df[_0x400f('0x27')](_0x24e515)[_0x400f('0x36')](_0x3e6597);};}exports[_0x400f('0x37')]=function(_0x56f036,_0x4d44b0){var _0x19ceb3={},_0x138315={},_0x467c64={'count':0x0,'rows':[]};var _0x15461a=db[_0x400f('0x38')]['rawAttributes'];_0x138315[_0x400f('0x39')]=_[_0x400f('0x3a')](_0x15461a);_0x138315[_0x400f('0x3b')]=_['keys'](_0x56f036[_0x400f('0x3b')]);_0x138315[_0x400f('0x3c')]=_[_0x400f('0x3d')](_0x138315[_0x400f('0x39')],_0x138315[_0x400f('0x3b')]);_0x19ceb3[_0x400f('0x3e')]=_[_0x400f('0x3d')](_0x138315[_0x400f('0x39')],qs[_0x400f('0x3f')](_0x56f036[_0x400f('0x3b')]['fields']));_0x19ceb3[_0x400f('0x3e')]=_0x19ceb3[_0x400f('0x3e')][_0x400f('0x40')]?_0x19ceb3[_0x400f('0x3e')]:_0x138315[_0x400f('0x39')];if(!_0x56f036[_0x400f('0x3b')][_0x400f('0x41')](_0x400f('0x42'))){_0x19ceb3[_0x400f('0x43')]=qs[_0x400f('0x43')](_0x56f036['query'][_0x400f('0x43')]);_0x19ceb3[_0x400f('0x2a')]=qs['offset'](_0x56f036[_0x400f('0x3b')][_0x400f('0x2a')]);}_0x19ceb3[_0x400f('0x44')]=qs[_0x400f('0x45')](_0x56f036[_0x400f('0x3b')]['sort']);_0x19ceb3['where']=qs[_0x400f('0x3c')](_[_0x400f('0x46')](_0x56f036['query'],_0x138315[_0x400f('0x3c')]));if(_0x56f036[_0x400f('0x3b')][_0x400f('0x47')]){_0x19ceb3[_0x400f('0x48')]=_[_0x400f('0x49')](_0x19ceb3['where'],{'$or':_[_0x400f('0x4a')](_0x15461a,function(_0x2c63b9){if(_0x2c63b9[_0x400f('0x4b')][_0x400f('0x4c')]!==_0x400f('0x4d')){var _0x49f0cc={};_0x49f0cc[_0x2c63b9[_0x400f('0x4e')]]={'$like':'%'+_0x56f036[_0x400f('0x3b')][_0x400f('0x47')]+'%'};return _0x49f0cc;}})});}_0x19ceb3=_['merge']({},_0x19ceb3,_0x56f036[_0x400f('0x4f')]);var _0x3aca4d={'where':_0x19ceb3[_0x400f('0x48')]};return db[_0x400f('0x38')]['count'](_0x3aca4d)[_0x400f('0x30')](function(_0x10477b){_0x467c64[_0x400f('0x29')]=_0x10477b;if(_0x56f036['query'][_0x400f('0x50')]){_0x19ceb3[_0x400f('0x51')]=[{'all':!![]}];}return db[_0x400f('0x38')][_0x400f('0x52')](_0x19ceb3);})[_0x400f('0x30')](function(_0x5a54b7){_0x467c64[_0x400f('0x53')]=_0x5a54b7;return _0x467c64;})[_0x400f('0x30')](respondWithFilteredResult(_0x4d44b0,_0x19ceb3))[_0x400f('0x25')](handleError(_0x4d44b0,null));};exports[_0x400f('0x54')]=function(_0x4487a3,_0x5c644a){var _0x2f3923={'raw':![],'where':{'id':_0x4487a3['params']['id']}},_0x590262={};_0x590262[_0x400f('0x39')]=_[_0x400f('0x3a')](db[_0x400f('0x38')][_0x400f('0x55')]);_0x590262[_0x400f('0x3b')]=_[_0x400f('0x3a')](_0x4487a3[_0x400f('0x3b')]);_0x590262[_0x400f('0x3c')]=_[_0x400f('0x3d')](_0x590262[_0x400f('0x39')],_0x590262['query']);_0x2f3923[_0x400f('0x3e')]=_[_0x400f('0x3d')](_0x590262[_0x400f('0x39')],qs[_0x400f('0x3f')](_0x4487a3[_0x400f('0x3b')][_0x400f('0x3f')]));_0x2f3923[_0x400f('0x3e')]=_0x2f3923['attributes'][_0x400f('0x40')]?_0x2f3923[_0x400f('0x3e')]:_0x590262['model'];if(_0x4487a3[_0x400f('0x3b')][_0x400f('0x50')]){_0x2f3923[_0x400f('0x51')]=[{'all':!![]}];}_0x2f3923=_[_0x400f('0x49')]({},_0x2f3923,_0x4487a3[_0x400f('0x4f')]);return db[_0x400f('0x38')]['find'](_0x2f3923)[_0x400f('0x30')](handleEntityNotFound(_0x5c644a,null))[_0x400f('0x30')](respondWithResult(_0x5c644a,null))['catch'](handleError(_0x5c644a,null));};exports[_0x400f('0x56')]=function(_0x4b4a86,_0x51b180){var _0x4a403a={'raw':![],'where':{'id':_0x4b4a86[_0x400f('0x57')]['id']}},_0x388e49={};_0x388e49[_0x400f('0x39')]=_[_0x400f('0x3a')](db[_0x400f('0x38')][_0x400f('0x55')]);_0x4a403a[_0x400f('0x3e')]=_[_0x400f('0x3d')](_0x388e49[_0x400f('0x39')],qs[_0x400f('0x3f')](_0x4b4a86[_0x400f('0x3b')]['fields']));_0x4a403a[_0x400f('0x3e')]=_0x4a403a['attributes']['length']?_0x4a403a[_0x400f('0x3e')]:_0x388e49[_0x400f('0x39')];if(_0x4b4a86[_0x400f('0x3b')][_0x400f('0x50')]){_0x4a403a[_0x400f('0x51')]=[{'all':!![]}];}_0x4a403a=_[_0x400f('0x49')]({},_0x4a403a,_0x4b4a86[_0x400f('0x4f')]);return db[_0x400f('0x38')]['find'](_0x4a403a)[_0x400f('0x30')](handleEntityNotFound(_0x51b180,null))[_0x400f('0x30')](function(_0x371182){if(_0x371182){var _0x4956a6=_0x371182[_0x400f('0x31')]({'plain':!![]});_0x4956a6=qs['omit'](_0x4956a6,['id',_0x400f('0x58'),'updatedAt']);_0x4b4a86[_0x400f('0x59')]=_[_0x400f('0x5a')](_0x4b4a86['body'],['id',_0x400f('0x58'),_0x400f('0x5b')]);return db[_0x400f('0x38')][_0x400f('0x5c')](_[_0x400f('0x49')](_0x4956a6,_0x4b4a86['body']),{'include':_0x4b4a86[_0x400f('0x3b')][_0x400f('0x50')]?[{'all':!![]}]:undefined})['then'](function(_0x3f70b0){var _0x3c753b=_0x4b4a86[_0x400f('0x5d')]['get']({'plain':!![]});if(!_0x3c753b)throw new Error(_0x400f('0x5e'));if(_0x3c753b[_0x400f('0x5f')]===_0x400f('0x5d')){var _0x47e2ce=_0x3f70b0[_0x400f('0x31')]({'plain':!![]});var _0x5e768c='Trunks';return db[_0x400f('0x60')][_0x400f('0x61')]({'where':{'name':_0x5e768c,'userProfileId':_0x3c753b[_0x400f('0x62')]},'raw':!![]})[_0x400f('0x30')](function(_0x1a3bcb){if(_0x1a3bcb&&_0x1a3bcb[_0x400f('0x63')]===0x0){return db[_0x400f('0x33')][_0x400f('0x5c')]({'name':_0x47e2ce[_0x400f('0x64')],'resourceId':_0x47e2ce['id'],'type':_0x1a3bcb[_0x400f('0x64')],'sectionId':_0x1a3bcb['id']},{})['then'](function(){return _0x3f70b0;});}else{return _0x3f70b0;}})[_0x400f('0x25')](function(_0x2ccaf7){logger[_0x400f('0x21')](_0x400f('0x65'),_0x2ccaf7);throw _0x2ccaf7;});}return _0x3f70b0;});}})['then'](respondWithResult(_0x51b180,0xc9))[_0x400f('0x25')](handleError(_0x51b180,null));};exports['create']=function(_0x16eb08,_0x2e3dea,_0x8db446){var _0x1901fc;return db[_0x400f('0x38')][_0x400f('0x5c')](_0x16eb08['body'],{'raw':!![]})[_0x400f('0x30')](function(_0x3b56d7){_0x1901fc=_0x3b56d7;return db[_0x400f('0x38')]['findAll']({'raw':!![]});})[_0x400f('0x30')](function(_0x1cb5dd){var _0xf99d99=fs[_0x400f('0x66')](path['join'](config[_0x400f('0x67')],_0x400f('0x68')),_0x400f('0x69'));var _0x204c65=fs['readFileSync'](path['join'](config[_0x400f('0x67')],_0x400f('0x6a')),'utf8');var _0xe2bb5f=ejs[_0x400f('0x6b')](_0xf99d99,{'trunks':_0x1cb5dd||[]});fs[_0x400f('0x6c')](_0x400f('0x6d'),_0xe2bb5f);if(_0x1901fc[_0x400f('0x6e')]){var _0x34ef81=ejs[_0x400f('0x6b')](_0x204c65,{'trunks':_0x1cb5dd||[]});fs[_0x400f('0x6c')](_0x400f('0x6f'),_0x34ef81);}})[_0x400f('0x30')](function(){return respondWithRpcPromise(_0x400f('0x70'),'create',{'module':'chan_sip.so'});})[_0x400f('0x30')](function(){var _0x46cb82=_0x16eb08[_0x400f('0x5d')][_0x400f('0x31')]({'plain':!![]});if(!_0x46cb82)throw new Error(_0x400f('0x5e'));if(_0x46cb82[_0x400f('0x5f')]===_0x400f('0x5d')){var _0x4bc28c=_0x1901fc[_0x400f('0x31')]({'plain':!![]});return db['UserProfileSection'][_0x400f('0x61')]({'where':{'name':_0x400f('0x32'),'userProfileId':_0x46cb82[_0x400f('0x62')]},'raw':!![]})['then'](function(_0x388810){if(_0x388810&&_0x388810[_0x400f('0x63')]===0x0){return db[_0x400f('0x33')]['create']({'name':_0x4bc28c['name'],'resourceId':_0x4bc28c['id'],'type':_0x388810[_0x400f('0x64')],'sectionId':_0x388810['id']},{})[_0x400f('0x30')](function(){return _0x1901fc;});}else{return _0x1901fc;}})[_0x400f('0x25')](function(_0x395ebf){logger[_0x400f('0x21')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x395ebf);throw _0x395ebf;});}return _0x1901fc;})[_0x400f('0x30')](respondWithResult(_0x2e3dea,0xc9))[_0x400f('0x25')](handleError(_0x2e3dea,null));};exports[_0x400f('0x2f')]=function(_0x5506b8,_0x45d448,_0x47cadb){var _0x351999;return db[_0x400f('0x38')][_0x400f('0x61')]({'where':{'id':_0x5506b8[_0x400f('0x57')]['id']}})['then'](handleEntityNotFound(_0x45d448,null))[_0x400f('0x30')](saveUpdates(_0x5506b8['body'],null))[_0x400f('0x30')](function(_0x4453c4){if(_0x4453c4){_0x351999=_0x4453c4;return db[_0x400f('0x38')][_0x400f('0x52')]({'raw':!![]});}})[_0x400f('0x30')](function(_0x4ae71f){if(_0x4ae71f){var _0xd9defa=fs[_0x400f('0x66')](path['join'](config['root'],_0x400f('0x68')),_0x400f('0x69'));var _0xaf32dc=fs[_0x400f('0x66')](path['join'](config['root'],_0x400f('0x6a')),_0x400f('0x69'));var _0x13da60=ejs['render'](_0xd9defa,{'trunks':_0x4ae71f||[]});fs['writeFileSync']('/etc/asterisk/sip_xcally_trunks.conf',_0x13da60);var _0x4ea721=ejs[_0x400f('0x6b')](_0xaf32dc,{'trunks':_0x4ae71f||[]});fs[_0x400f('0x6c')](_0x400f('0x6f'),_0x4ea721);return respondWithRpcPromise(_0x400f('0x70'),_0x400f('0x2f'),{'module':_0x400f('0x71')});}return null;})[_0x400f('0x30')](function(_0x2f9162){if(_0x2f9162){return _0x351999;}})[_0x400f('0x30')](respondWithResult(_0x45d448,null))['catch'](handleError(_0x45d448,null));};exports['destroy']=function(_0x518e7e,_0x17ed94,_0x1050b9){var _0x291388;return db[_0x400f('0x38')][_0x400f('0x61')]({'where':{'id':_0x518e7e[_0x400f('0x57')]['id']}})['then'](handleEntityNotFound(_0x17ed94,null))[_0x400f('0x30')](removeEntity(_0x17ed94,null))[_0x400f('0x30')](function(){return db['Trunk'][_0x400f('0x52')]({'raw':!![]});})[_0x400f('0x30')](function(_0x125010){var _0x3fff06=fs[_0x400f('0x66')](path[_0x400f('0x72')](config[_0x400f('0x67')],'server/files/templates/trunk.ejs'),'utf8');var _0xa30cc8=fs[_0x400f('0x66')](path[_0x400f('0x72')](config[_0x400f('0x67')],'server/files/templates/registry.ejs'),'utf8');var _0x4443a3=ejs[_0x400f('0x6b')](_0x3fff06,{'trunks':_0x125010});var _0x336cc1=ejs[_0x400f('0x6b')](_0xa30cc8,{'trunks':_0x125010});fs['writeFileSync'](_0x400f('0x6d'),_0x4443a3);fs[_0x400f('0x6c')](_0x400f('0x6f'),_0x336cc1);return respondWithRpcPromise(_0x400f('0x70'),_0x400f('0x34'),{'module':_0x400f('0x71')});})[_0x400f('0x25')](handleError(_0x17ed94,null));};
\ No newline at end of file
diff --git a/server/api/trunk/trunk.model.js b/server/api/trunk/trunk.model.js
index 6cb0cff..7117c9d 100644
--- a/server/api/trunk/trunk.model.js
+++ b/server/api/trunk/trunk.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe0c3=['lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./trunk.attributes','define','Trunk','tools_trunks'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe0c3,0xea));var _0x3e0c=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xe0c3[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x3e0c('0x0'));var util=require('util');var logger=require(_0x3e0c('0x1'))(_0x3e0c('0x2'));var moment=require(_0x3e0c('0x3'));var BPromise=require(_0x3e0c('0x4'));var rp=require(_0x3e0c('0x5'));var fs=require('fs');var path=require(_0x3e0c('0x6'));var rimraf=require(_0x3e0c('0x7'));var config=require(_0x3e0c('0x8'));var attributes=require(_0x3e0c('0x9'));module['exports']=function(_0x530ebf,_0x163adf){return _0x530ebf[_0x3e0c('0xa')](_0x3e0c('0xb'),attributes,{'tableName':_0x3e0c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8c32=['exports','define','Trunk','tools_trunks','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./trunk.attributes'];(function(_0x3cb30b,_0x504b3e){var _0x2ca717=function(_0x32a3d9){while(--_0x32a3d9){_0x3cb30b['push'](_0x3cb30b['shift']());}};_0x2ca717(++_0x504b3e);}(_0x8c32,0x130));var _0x28c3=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x8c32[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require(_0x28c3('0x0'));var util=require(_0x28c3('0x1'));var logger=require(_0x28c3('0x2'))(_0x28c3('0x3'));var moment=require(_0x28c3('0x4'));var BPromise=require(_0x28c3('0x5'));var rp=require(_0x28c3('0x6'));var fs=require('fs');var path=require(_0x28c3('0x7'));var rimraf=require(_0x28c3('0x8'));var config=require(_0x28c3('0x9'));var attributes=require(_0x28c3('0xa'));module[_0x28c3('0xb')]=function(_0x537b4f,_0x2861c9){return _0x537b4f[_0x28c3('0xc')](_0x28c3('0xd'),attributes,{'tableName':_0x28c3('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/trunk/trunk.rpc.js b/server/api/trunk/trunk.rpc.js
index 35d8cce..dcc592d 100644
--- a/server/api/trunk/trunk.rpc.js
+++ b/server/api/trunk/trunk.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6a88=['where','attributes','limit','include','map','model','info','catch','ShowTrunk','find','raw','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetTrunk','Trunk','findAll','options'];(function(_0x5a047c,_0x55ff5c){var _0x3cfc04=function(_0x5931ed){while(--_0x5931ed){_0x5a047c['push'](_0x5a047c['shift']());}};_0x3cfc04(++_0x55ff5c);}(_0x6a88,0x9f));var _0x86a8=function(_0x59db37,_0x14464c){_0x59db37=_0x59db37-0x0;var _0x3a4d97=_0x6a88[_0x59db37];return _0x3a4d97;};'use strict';var _=require(_0x86a8('0x0'));var util=require(_0x86a8('0x1'));var moment=require(_0x86a8('0x2'));var BPromise=require('bluebird');var rs=require(_0x86a8('0x3'));var fs=require('fs');var Redis=require(_0x86a8('0x4'));var db=require(_0x86a8('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x86a8('0x6'))(_0x86a8('0x7'));var config=require('../../config/environment');var jayson=require(_0x86a8('0x8'));var client=jayson[_0x86a8('0x9')][_0x86a8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x32911c,_0x41e289,_0x1e5e7a){return new BPromise(function(_0x1a2a49,_0x533ee3){return client[_0x86a8('0xb')](_0x32911c,_0x1e5e7a)[_0x86a8('0xc')](function(_0x180e50){logger['info'](_0x86a8('0xd'),_0x41e289,_0x86a8('0xe'));logger[_0x86a8('0xf')](_0x86a8('0x10'),_0x41e289,'request\x20sent',JSON[_0x86a8('0x11')](_0x180e50));if(_0x180e50['error']){if(_0x180e50[_0x86a8('0x12')][_0x86a8('0x13')]===0x1f4){logger[_0x86a8('0x12')](_0x86a8('0xd'),_0x41e289,_0x180e50[_0x86a8('0x12')][_0x86a8('0x14')]);return _0x533ee3(_0x180e50['error']['message']);}logger[_0x86a8('0x12')](_0x86a8('0xd'),_0x41e289,_0x180e50[_0x86a8('0x12')][_0x86a8('0x14')]);return _0x1a2a49(_0x180e50['error']['message']);}else{logger['info'](_0x86a8('0xd'),_0x41e289,_0x86a8('0xe'));_0x1a2a49(_0x180e50[_0x86a8('0x15')][_0x86a8('0x14')]);}})['catch'](function(_0xcc2ac6){logger[_0x86a8('0x12')](_0x86a8('0xd'),_0x41e289,_0xcc2ac6);_0x533ee3(_0xcc2ac6);});});}exports[_0x86a8('0x16')]=function(_0x2b790a){var _0x146bac=this;return new Promise(function(_0x8d8d5c,_0x53380f){return db[_0x86a8('0x17')][_0x86a8('0x18')]({'raw':_0x2b790a[_0x86a8('0x19')]?_0x2b790a[_0x86a8('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x2b790a['options']?_0x2b790a['options'][_0x86a8('0x1a')]||null:null,'attributes':_0x2b790a[_0x86a8('0x19')]?_0x2b790a[_0x86a8('0x19')][_0x86a8('0x1b')]||null:null,'limit':_0x2b790a[_0x86a8('0x19')]?_0x2b790a[_0x86a8('0x19')][_0x86a8('0x1c')]||null:null,'include':_0x2b790a['options']?_0x2b790a[_0x86a8('0x19')][_0x86a8('0x1d')]?_[_0x86a8('0x1e')](_0x2b790a['options'][_0x86a8('0x1d')],function(_0x4eef00){return{'model':db[_0x4eef00[_0x86a8('0x1f')]],'as':_0x4eef00['as'],'attributes':_0x4eef00[_0x86a8('0x1b')],'include':_0x4eef00[_0x86a8('0x1d')]?_[_0x86a8('0x1e')](_0x4eef00[_0x86a8('0x1d')],function(_0xc0ae35){return{'model':db[_0xc0ae35[_0x86a8('0x1f')]],'as':_0xc0ae35['as'],'attributes':_0xc0ae35[_0x86a8('0x1b')],'include':_0xc0ae35['include']?_[_0x86a8('0x1e')](_0xc0ae35[_0x86a8('0x1d')],function(_0xf5949c){return{'model':db[_0xf5949c['model']],'as':_0xf5949c['as'],'attributes':_0xf5949c[_0x86a8('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x86a8('0xc')](function(_0x239ad7){logger[_0x86a8('0x20')](_0x86a8('0x16'),_0x2b790a);logger[_0x86a8('0xf')](_0x86a8('0x16'),_0x2b790a,JSON[_0x86a8('0x11')](_0x239ad7));_0x8d8d5c(_0x239ad7);})[_0x86a8('0x21')](function(_0x3ce82c){logger[_0x86a8('0x12')]('GetTrunk',_0x3ce82c[_0x86a8('0x14')],_0x2b790a);_0x53380f(_0x146bac[_0x86a8('0x12')](0x1f4,_0x3ce82c[_0x86a8('0x14')]));});});};exports[_0x86a8('0x22')]=function(_0x383890){var _0x2ce47f=this;return new Promise(function(_0x11d93e,_0x497aa7){return db['Trunk'][_0x86a8('0x23')]({'raw':_0x383890[_0x86a8('0x19')]?_0x383890[_0x86a8('0x19')][_0x86a8('0x24')]===undefined?!![]:![]:!![],'where':_0x383890['options']?_0x383890['options']['where']||null:null,'attributes':_0x383890[_0x86a8('0x19')]?_0x383890[_0x86a8('0x19')]['attributes']||null:null,'include':_0x383890[_0x86a8('0x19')]?_0x383890[_0x86a8('0x19')][_0x86a8('0x1d')]?_['map'](_0x383890['options']['include'],function(_0x2a57b7){return{'model':db[_0x2a57b7[_0x86a8('0x1f')]],'as':_0x2a57b7['as'],'attributes':_0x2a57b7[_0x86a8('0x1b')],'include':_0x2a57b7[_0x86a8('0x1d')]?_['map'](_0x2a57b7['include'],function(_0x3be09d){return{'model':db[_0x3be09d[_0x86a8('0x1f')]],'as':_0x3be09d['as'],'attributes':_0x3be09d[_0x86a8('0x1b')],'include':_0x3be09d['include']?_[_0x86a8('0x1e')](_0x3be09d[_0x86a8('0x1d')],function(_0x55ab9d){return{'model':db[_0x55ab9d[_0x86a8('0x1f')]],'as':_0x55ab9d['as'],'attributes':_0x55ab9d[_0x86a8('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x86a8('0xc')](function(_0x4f59c0){logger['info']('ShowTrunk',_0x383890);logger[_0x86a8('0xf')](_0x86a8('0x22'),_0x383890,JSON[_0x86a8('0x11')](_0x4f59c0));_0x11d93e(_0x4f59c0);})[_0x86a8('0x21')](function(_0x4c7479){logger['error']('ShowTrunk',_0x4c7479[_0x86a8('0x14')],_0x383890);_0x497aa7(_0x2ce47f[_0x86a8('0x12')](0x1f4,_0x4c7479['message']));});});};
\ No newline at end of file
+var _0x836c=['Trunk','findAll','options','raw','where','attributes','include','map','model','debug','ShowTrunk','find','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','then','info','Trunk,\x20%s,\x20%s','request\x20sent','Trunk,\x20%s,\x20%s,\x20%s','error','message','result','catch','GetTrunk'];(function(_0x5e282c,_0x11fe10){var _0x7efe5e=function(_0x460164){while(--_0x460164){_0x5e282c['push'](_0x5e282c['shift']());}};_0x7efe5e(++_0x11fe10);}(_0x836c,0x11d));var _0xc836=function(_0x19fc7f,_0x3056f9){_0x19fc7f=_0x19fc7f-0x0;var _0x151e5c=_0x836c[_0x19fc7f];return _0x151e5c;};'use strict';var _=require(_0xc836('0x0'));var util=require(_0xc836('0x1'));var moment=require(_0xc836('0x2'));var BPromise=require(_0xc836('0x3'));var rs=require(_0xc836('0x4'));var fs=require('fs');var Redis=require(_0xc836('0x5'));var db=require(_0xc836('0x6'))['db'];var utils=require(_0xc836('0x7'));var logger=require(_0xc836('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0xc836('0x9'));var client=jayson['client'][_0xc836('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x47ad14,_0x5438af,_0x2eb5a2){return new BPromise(function(_0x4f385a,_0x44ee31){return client['request'](_0x47ad14,_0x2eb5a2)[_0xc836('0xb')](function(_0x323844){logger[_0xc836('0xc')](_0xc836('0xd'),_0x5438af,_0xc836('0xe'));logger['debug'](_0xc836('0xf'),_0x5438af,_0xc836('0xe'),JSON['stringify'](_0x323844));if(_0x323844[_0xc836('0x10')]){if(_0x323844[_0xc836('0x10')]['code']===0x1f4){logger['error']('Trunk,\x20%s,\x20%s',_0x5438af,_0x323844['error']['message']);return _0x44ee31(_0x323844[_0xc836('0x10')][_0xc836('0x11')]);}logger['error'](_0xc836('0xd'),_0x5438af,_0x323844[_0xc836('0x10')][_0xc836('0x11')]);return _0x4f385a(_0x323844[_0xc836('0x10')][_0xc836('0x11')]);}else{logger['info'](_0xc836('0xd'),_0x5438af,_0xc836('0xe'));_0x4f385a(_0x323844[_0xc836('0x12')][_0xc836('0x11')]);}})[_0xc836('0x13')](function(_0x21f10b){logger['error'](_0xc836('0xd'),_0x5438af,_0x21f10b);_0x44ee31(_0x21f10b);});});}exports[_0xc836('0x14')]=function(_0x25f741){var _0x39a8a4=this;return new Promise(function(_0x1dba50,_0x345774){return db[_0xc836('0x15')][_0xc836('0x16')]({'raw':_0x25f741[_0xc836('0x17')]?_0x25f741[_0xc836('0x17')][_0xc836('0x18')]===undefined?!![]:![]:!![],'where':_0x25f741[_0xc836('0x17')]?_0x25f741[_0xc836('0x17')][_0xc836('0x19')]||null:null,'attributes':_0x25f741[_0xc836('0x17')]?_0x25f741['options'][_0xc836('0x1a')]||null:null,'limit':_0x25f741[_0xc836('0x17')]?_0x25f741[_0xc836('0x17')]['limit']||null:null,'include':_0x25f741['options']?_0x25f741[_0xc836('0x17')][_0xc836('0x1b')]?_[_0xc836('0x1c')](_0x25f741[_0xc836('0x17')][_0xc836('0x1b')],function(_0x4971b2){return{'model':db[_0x4971b2[_0xc836('0x1d')]],'as':_0x4971b2['as'],'attributes':_0x4971b2['attributes'],'include':_0x4971b2[_0xc836('0x1b')]?_[_0xc836('0x1c')](_0x4971b2['include'],function(_0x13d0d3){return{'model':db[_0x13d0d3[_0xc836('0x1d')]],'as':_0x13d0d3['as'],'attributes':_0x13d0d3['attributes'],'include':_0x13d0d3[_0xc836('0x1b')]?_['map'](_0x13d0d3[_0xc836('0x1b')],function(_0x1d3943){return{'model':db[_0x1d3943[_0xc836('0x1d')]],'as':_0x1d3943['as'],'attributes':_0x1d3943['attributes']};}):[]};}):[]};}):[]:[]})[_0xc836('0xb')](function(_0x31bb21){logger[_0xc836('0xc')](_0xc836('0x14'),_0x25f741);logger[_0xc836('0x1e')](_0xc836('0x14'),_0x25f741,JSON['stringify'](_0x31bb21));_0x1dba50(_0x31bb21);})[_0xc836('0x13')](function(_0x93444c){logger['error']('GetTrunk',_0x93444c[_0xc836('0x11')],_0x25f741);_0x345774(_0x39a8a4[_0xc836('0x10')](0x1f4,_0x93444c[_0xc836('0x11')]));});});};exports[_0xc836('0x1f')]=function(_0x6ad87){var _0x3b7e30=this;return new Promise(function(_0x4a82bd,_0x2e0a73){return db['Trunk'][_0xc836('0x20')]({'raw':_0x6ad87[_0xc836('0x17')]?_0x6ad87['options'][_0xc836('0x18')]===undefined?!![]:![]:!![],'where':_0x6ad87['options']?_0x6ad87[_0xc836('0x17')][_0xc836('0x19')]||null:null,'attributes':_0x6ad87['options']?_0x6ad87[_0xc836('0x17')][_0xc836('0x1a')]||null:null,'include':_0x6ad87[_0xc836('0x17')]?_0x6ad87['options'][_0xc836('0x1b')]?_[_0xc836('0x1c')](_0x6ad87['options']['include'],function(_0x210d1c){return{'model':db[_0x210d1c['model']],'as':_0x210d1c['as'],'attributes':_0x210d1c['attributes'],'include':_0x210d1c[_0xc836('0x1b')]?_[_0xc836('0x1c')](_0x210d1c[_0xc836('0x1b')],function(_0x2c6bc9){return{'model':db[_0x2c6bc9[_0xc836('0x1d')]],'as':_0x2c6bc9['as'],'attributes':_0x2c6bc9[_0xc836('0x1a')],'include':_0x2c6bc9[_0xc836('0x1b')]?_[_0xc836('0x1c')](_0x2c6bc9[_0xc836('0x1b')],function(_0x276955){return{'model':db[_0x276955[_0xc836('0x1d')]],'as':_0x276955['as'],'attributes':_0x276955[_0xc836('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xf10587){logger[_0xc836('0xc')](_0xc836('0x1f'),_0x6ad87);logger[_0xc836('0x1e')](_0xc836('0x1f'),_0x6ad87,JSON[_0xc836('0x21')](_0xf10587));_0x4a82bd(_0xf10587);})['catch'](function(_0x1462b3){logger['error']('ShowTrunk',_0x1462b3[_0xc836('0x11')],_0x6ad87);_0x2e0a73(_0x3b7e30[_0xc836('0x10')](0x1f4,_0x1462b3[_0xc836('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/user/index.js b/server/api/user/index.js
index 23a3716..ceef5a6 100644
--- a/server/api/user/index.js
+++ b/server/api/user/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7d19=['getSquareProjects','/:id/scheduled_calls','getApiKey','post','/create_many','bulkCreate','/:id/contacts','create','diskStorage','join','root','server/files/images/','format','%s-%s','now','originalname','file','/:id/login','/:id/logout','logout','/:id/pause','pause','/:id/unpause','unpause','addTeams','/:id/chat_interactions','addChatInteractions','/:id/mail_interactions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','addFaxAccounts','addMailAccounts','addOpenchannelAccounts','addSmsAccounts','addSquareProjects','/:id/api_key','createApiKey','put','/:id/password','changePassword','delete','removeQueues','removeTeams','destroy','removeMailInteractions','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts','removeSquareProjects','removeApiKey','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./user.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/avatar','getAvatar','getContacts','/:id/queues','getQueues','/:id/queues_rt','getGroups','/:id/recordings','getRecordings','/:id/chat/interactions','getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','getSmsInteractions','/:id/fax/interactions','getFaxInteractions','/:id/teams','getTeams','/:id/lists','getLists','/:id/agents','getAgents','getVoicePrefixes','/:id/fax_accounts','getFaxAccounts','/:id/mail_accounts','getMailAccounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','getSmsAccounts','/:id/chat_websites','getChatWebsites','/:id/square_projects'];(function(_0xcb78c9,_0x3c3774){var _0x25486c=function(_0x5172e9){while(--_0x5172e9){_0xcb78c9['push'](_0xcb78c9['shift']());}};_0x25486c(++_0x3c3774);}(_0x7d19,0x9e));var _0x97d1=function(_0x32aac9,_0x5eb63d){_0x32aac9=_0x32aac9-0x0;var _0x51bafd=_0x7d19[_0x32aac9];return _0x51bafd;};'use strict';var multer=require(_0x97d1('0x0'));var util=require('util');var path=require(_0x97d1('0x1'));var timeout=require(_0x97d1('0x2'));var express=require(_0x97d1('0x3'));var router=express[_0x97d1('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x97d1('0x5'));var config=require(_0x97d1('0x6'));var controller=require(_0x97d1('0x7'));router[_0x97d1('0x8')]('/',auth[_0x97d1('0x9')](),controller[_0x97d1('0xa')]);router[_0x97d1('0x8')](_0x97d1('0xb'),auth[_0x97d1('0x9')](),controller['describe']);router['get'](_0x97d1('0xc'),auth[_0x97d1('0x9')](),controller[_0x97d1('0xd')]);router[_0x97d1('0x8')](_0x97d1('0xe'),controller[_0x97d1('0xf')]);router['get']('/:id/contacts',auth[_0x97d1('0x9')](),controller[_0x97d1('0x10')]);router[_0x97d1('0x8')](_0x97d1('0x11'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x12')]);router['get'](_0x97d1('0x13'),auth[_0x97d1('0x9')](),controller['getVoiceQueuesRt']);router[_0x97d1('0x8')]('/:id/groups',auth[_0x97d1('0x9')](),controller[_0x97d1('0x14')]);router[_0x97d1('0x8')](_0x97d1('0x15'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x16')]);router[_0x97d1('0x8')]('/:id/screen_recordings',auth[_0x97d1('0x9')](),controller['getScreenRecordings']);router[_0x97d1('0x8')](_0x97d1('0x17'),auth['isAuthenticated'](),controller[_0x97d1('0x18')]);router['get'](_0x97d1('0x19'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x1a')]);router[_0x97d1('0x8')](_0x97d1('0x1b'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x1c')]);router[_0x97d1('0x8')]('/:id/sms/interactions',auth[_0x97d1('0x9')](),controller[_0x97d1('0x1d')]);router[_0x97d1('0x8')](_0x97d1('0x1e'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x1f')]);router['get'](_0x97d1('0x20'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x21')]);router[_0x97d1('0x8')](_0x97d1('0x22'),auth['isAuthenticated'](),controller[_0x97d1('0x23')]);router[_0x97d1('0x8')](_0x97d1('0x24'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x25')]);router[_0x97d1('0x8')]('/:id/prefixes',auth[_0x97d1('0x9')](),controller[_0x97d1('0x26')]);router[_0x97d1('0x8')](_0x97d1('0x27'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x28')]);router[_0x97d1('0x8')](_0x97d1('0x29'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x2a')]);router['get'](_0x97d1('0x2b'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x2c')]);router[_0x97d1('0x8')](_0x97d1('0x2d'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x2e')]);router[_0x97d1('0x8')](_0x97d1('0x2f'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x30')]);router[_0x97d1('0x8')](_0x97d1('0x31'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x32')]);router[_0x97d1('0x8')](_0x97d1('0x33'),auth[_0x97d1('0x9')](),controller['getScheduledCalls']);router[_0x97d1('0x8')]('/:id/api_key',auth[_0x97d1('0x9')](),controller[_0x97d1('0x34')]);router[_0x97d1('0x35')](_0x97d1('0x36'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x37')]);router[_0x97d1('0x35')](_0x97d1('0x38'),auth[_0x97d1('0x9')](),controller['addContacts']);router[_0x97d1('0x35')]('/',auth[_0x97d1('0x9')](),controller[_0x97d1('0x39')]);router[_0x97d1('0x35')](_0x97d1('0x11'),auth[_0x97d1('0x9')](),controller['addQueues']);var upload=multer({'storage':multer[_0x97d1('0x3a')]({'destination':function(_0x5bbd1d,_0x109caa,_0x46e938){_0x46e938(null,path[_0x97d1('0x3b')](config[_0x97d1('0x3c')],_0x97d1('0x3d')));},'filename':function(_0x5b2ef9,_0x59b551,_0x2265b1){_0x2265b1(null,util[_0x97d1('0x3e')](_0x97d1('0x3f'),Date[_0x97d1('0x40')](),_0x59b551[_0x97d1('0x41')]));}})});router[_0x97d1('0x35')](_0x97d1('0xe'),upload['single'](_0x97d1('0x42')),controller['addAvatar']);router['post'](_0x97d1('0x43'),auth['isAuthenticated'](),controller['login']);router['post'](_0x97d1('0x44'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x45')]);router[_0x97d1('0x35')](_0x97d1('0x46'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x47')]);router[_0x97d1('0x35')](_0x97d1('0x48'),auth['isAuthenticated'](),controller[_0x97d1('0x49')]);router[_0x97d1('0x35')](_0x97d1('0x20'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x4a')]);router['post'](_0x97d1('0x4b'),auth['isAuthenticated'](),controller[_0x97d1('0x4c')]);router[_0x97d1('0x35')](_0x97d1('0x4d'),auth[_0x97d1('0x9')](),controller['addMailInteractions']);router[_0x97d1('0x35')](_0x97d1('0x4e'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x4f')]);router[_0x97d1('0x35')](_0x97d1('0x50'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x51')]);router[_0x97d1('0x35')](_0x97d1('0x52'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x53')]);router[_0x97d1('0x35')](_0x97d1('0x27'),auth['isAuthenticated'](),controller[_0x97d1('0x54')]);router['post'](_0x97d1('0x29'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x55')]);router[_0x97d1('0x35')](_0x97d1('0x2b'),auth['isAuthenticated'](),controller[_0x97d1('0x56')]);router[_0x97d1('0x35')](_0x97d1('0x2d'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x57')]);router[_0x97d1('0x35')](_0x97d1('0x2f'),auth['isAuthenticated'](),controller['addChatWebsites']);router[_0x97d1('0x35')](_0x97d1('0x31'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x58')]);router[_0x97d1('0x35')](_0x97d1('0x59'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x5a')]);router[_0x97d1('0x5b')](_0x97d1('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x97d1('0x5b')](_0x97d1('0x5c'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x5d')]);router[_0x97d1('0x5e')](_0x97d1('0x11'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x5f')]);router[_0x97d1('0x5e')](_0x97d1('0x20'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x60')]);router[_0x97d1('0x5e')]('/:id',auth[_0x97d1('0x9')](),controller[_0x97d1('0x61')]);router[_0x97d1('0x5e')](_0x97d1('0x4b'),auth[_0x97d1('0x9')](),controller['removeChatInteractions']);router['delete']('/:id/mail_interactions',auth['isAuthenticated'](),controller[_0x97d1('0x62')]);router[_0x97d1('0x5e')]('/:id/fax_interactions',auth[_0x97d1('0x9')](),controller['removeFaxInteractions']);router[_0x97d1('0x5e')]('/:id/sms_interactions',auth['isAuthenticated'](),controller['removeSmsInteractions']);router['delete'](_0x97d1('0x52'),auth[_0x97d1('0x9')](),controller['removeOpenchannelInteractions']);router[_0x97d1('0x5e')](_0x97d1('0x27'),auth[_0x97d1('0x9')](),controller['removeFaxAccounts']);router[_0x97d1('0x5e')](_0x97d1('0x29'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x63')]);router['delete'](_0x97d1('0x2b'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x64')]);router['delete'](_0x97d1('0x2d'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x65')]);router['delete'](_0x97d1('0x2f'),auth[_0x97d1('0x9')](),controller['removeChatWebsites']);router[_0x97d1('0x5e')](_0x97d1('0x31'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x66')]);router['delete'](_0x97d1('0x59'),auth[_0x97d1('0x9')](),controller[_0x97d1('0x67')]);module['exports']=router;
\ No newline at end of file
+var _0xd523=['join','server/files/images/','format','now','single','/:id/login','/:id/logout','logout','/:id/pause','addTeams','addChatInteractions','/:id/mail_interactions','addMailInteractions','/:id/fax_interactions','addFaxInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','addFaxAccounts','addMailAccounts','/:id/openchannel_accounts','addOpenchannelAccounts','/:id/sms_accounts','addChatWebsites','/:id/api_key','createApiKey','put','/:id/password','changePassword','delete','removeTeams','destroy','/:id/chat_interactions','removeChatInteractions','removeMailInteractions','/:id/sms_interactions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts','removeChatWebsites','removeApiKey','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./user.controller','get','isAuthenticated','index','describe','/:id','show','/:id/avatar','getAvatar','/:id/contacts','getContacts','/:id/queues','getQueues','getVoiceQueuesRt','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/fax/interactions','getFaxInteractions','/:id/teams','/:id/lists','/:id/agents','getAgents','/:id/prefixes','getVoicePrefixes','/:id/fax_accounts','/:id/mail_accounts','getMailAccounts','getOpenchannelAccounts','getSmsAccounts','/:id/chat_websites','getChatWebsites','/:id/square_projects','getScheduledCalls','post','bulkCreate','addContacts','create','addQueues','diskStorage'];(function(_0x2fa773,_0x435c1b){var _0x13831f=function(_0x1fe51b){while(--_0x1fe51b){_0x2fa773['push'](_0x2fa773['shift']());}};_0x13831f(++_0x435c1b);}(_0xd523,0x153));var _0x3d52=function(_0x5dc760,_0x35a3b1){_0x5dc760=_0x5dc760-0x0;var _0x2e49e4=_0xd523[_0x5dc760];return _0x2e49e4;};'use strict';var multer=require(_0x3d52('0x0'));var util=require(_0x3d52('0x1'));var path=require(_0x3d52('0x2'));var timeout=require(_0x3d52('0x3'));var express=require('express');var router=express[_0x3d52('0x4')]();var auth=require(_0x3d52('0x5'));var interaction=require(_0x3d52('0x6'));var config=require('../../config/environment');var controller=require(_0x3d52('0x7'));router[_0x3d52('0x8')]('/',auth[_0x3d52('0x9')](),controller[_0x3d52('0xa')]);router['get']('/describe',auth[_0x3d52('0x9')](),controller[_0x3d52('0xb')]);router[_0x3d52('0x8')](_0x3d52('0xc'),auth[_0x3d52('0x9')](),controller[_0x3d52('0xd')]);router[_0x3d52('0x8')](_0x3d52('0xe'),controller[_0x3d52('0xf')]);router['get'](_0x3d52('0x10'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x11')]);router[_0x3d52('0x8')](_0x3d52('0x12'),auth['isAuthenticated'](),controller[_0x3d52('0x13')]);router['get']('/:id/queues_rt',auth[_0x3d52('0x9')](),controller[_0x3d52('0x14')]);router['get']('/:id/groups',auth['isAuthenticated'](),controller[_0x3d52('0x15')]);router[_0x3d52('0x8')](_0x3d52('0x16'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x17')]);router[_0x3d52('0x8')](_0x3d52('0x18'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x19')]);router[_0x3d52('0x8')](_0x3d52('0x1a'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x1b')]);router[_0x3d52('0x8')](_0x3d52('0x1c'),auth['isAuthenticated'](),controller[_0x3d52('0x1d')]);router[_0x3d52('0x8')](_0x3d52('0x1e'),auth['isAuthenticated'](),controller[_0x3d52('0x1f')]);router[_0x3d52('0x8')](_0x3d52('0x20'),auth['isAuthenticated'](),controller[_0x3d52('0x21')]);router[_0x3d52('0x8')](_0x3d52('0x22'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x23')]);router[_0x3d52('0x8')](_0x3d52('0x24'),auth[_0x3d52('0x9')](),controller['getTeams']);router[_0x3d52('0x8')](_0x3d52('0x25'),auth[_0x3d52('0x9')](),controller['getLists']);router[_0x3d52('0x8')](_0x3d52('0x26'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x27')]);router[_0x3d52('0x8')](_0x3d52('0x28'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x29')]);router[_0x3d52('0x8')](_0x3d52('0x2a'),auth[_0x3d52('0x9')](),controller['getFaxAccounts']);router[_0x3d52('0x8')](_0x3d52('0x2b'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x2c')]);router['get']('/:id/openchannel_accounts',auth[_0x3d52('0x9')](),controller[_0x3d52('0x2d')]);router[_0x3d52('0x8')]('/:id/sms_accounts',auth[_0x3d52('0x9')](),controller[_0x3d52('0x2e')]);router[_0x3d52('0x8')](_0x3d52('0x2f'),auth['isAuthenticated'](),controller[_0x3d52('0x30')]);router[_0x3d52('0x8')](_0x3d52('0x31'),auth[_0x3d52('0x9')](),controller['getSquareProjects']);router[_0x3d52('0x8')]('/:id/scheduled_calls',auth[_0x3d52('0x9')](),controller[_0x3d52('0x32')]);router[_0x3d52('0x8')]('/:id/api_key',auth[_0x3d52('0x9')](),controller['getApiKey']);router[_0x3d52('0x33')]('/create_many',auth['isAuthenticated'](),controller[_0x3d52('0x34')]);router[_0x3d52('0x33')](_0x3d52('0x10'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x35')]);router[_0x3d52('0x33')]('/',auth[_0x3d52('0x9')](),controller[_0x3d52('0x36')]);router[_0x3d52('0x33')]('/:id/queues',auth[_0x3d52('0x9')](),controller[_0x3d52('0x37')]);var upload=multer({'storage':multer[_0x3d52('0x38')]({'destination':function(_0x44cd83,_0x4c78bb,_0x1696f5){_0x1696f5(null,path[_0x3d52('0x39')](config['root'],_0x3d52('0x3a')));},'filename':function(_0x4fdb9c,_0x464764,_0x1be7ca){_0x1be7ca(null,util[_0x3d52('0x3b')]('%s-%s',Date[_0x3d52('0x3c')](),_0x464764['originalname']));}})});router[_0x3d52('0x33')](_0x3d52('0xe'),upload[_0x3d52('0x3d')]('file'),controller['addAvatar']);router[_0x3d52('0x33')](_0x3d52('0x3e'),auth[_0x3d52('0x9')](),controller['login']);router[_0x3d52('0x33')](_0x3d52('0x3f'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x40')]);router['post'](_0x3d52('0x41'),auth['isAuthenticated'](),controller['pause']);router[_0x3d52('0x33')]('/:id/unpause',auth[_0x3d52('0x9')](),controller['unpause']);router[_0x3d52('0x33')]('/:id/teams',auth[_0x3d52('0x9')](),controller[_0x3d52('0x42')]);router[_0x3d52('0x33')]('/:id/chat_interactions',auth[_0x3d52('0x9')](),controller[_0x3d52('0x43')]);router['post'](_0x3d52('0x44'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x45')]);router[_0x3d52('0x33')](_0x3d52('0x46'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x47')]);router[_0x3d52('0x33')]('/:id/sms_interactions',auth['isAuthenticated'](),controller['addSmsInteractions']);router['post'](_0x3d52('0x48'),auth['isAuthenticated'](),controller[_0x3d52('0x49')]);router['post'](_0x3d52('0x2a'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x4a')]);router[_0x3d52('0x33')]('/:id/mail_accounts',auth[_0x3d52('0x9')](),controller[_0x3d52('0x4b')]);router['post'](_0x3d52('0x4c'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x4d')]);router['post'](_0x3d52('0x4e'),auth['isAuthenticated'](),controller['addSmsAccounts']);router['post']('/:id/chat_websites',auth[_0x3d52('0x9')](),controller[_0x3d52('0x4f')]);router[_0x3d52('0x33')]('/:id/square_projects',auth[_0x3d52('0x9')](),controller['addSquareProjects']);router[_0x3d52('0x33')](_0x3d52('0x50'),auth['isAuthenticated'](),controller[_0x3d52('0x51')]);router[_0x3d52('0x52')](_0x3d52('0xc'),auth[_0x3d52('0x9')](),controller['update']);router['put'](_0x3d52('0x53'),auth['isAuthenticated'](),controller[_0x3d52('0x54')]);router[_0x3d52('0x55')](_0x3d52('0x12'),auth[_0x3d52('0x9')](),controller['removeQueues']);router[_0x3d52('0x55')]('/:id/teams',auth[_0x3d52('0x9')](),controller[_0x3d52('0x56')]);router['delete'](_0x3d52('0xc'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x57')]);router[_0x3d52('0x55')](_0x3d52('0x58'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x59')]);router[_0x3d52('0x55')](_0x3d52('0x44'),auth['isAuthenticated'](),controller[_0x3d52('0x5a')]);router[_0x3d52('0x55')]('/:id/fax_interactions',auth[_0x3d52('0x9')](),controller['removeFaxInteractions']);router[_0x3d52('0x55')](_0x3d52('0x5b'),auth[_0x3d52('0x9')](),controller['removeSmsInteractions']);router[_0x3d52('0x55')](_0x3d52('0x48'),auth['isAuthenticated'](),controller['removeOpenchannelInteractions']);router[_0x3d52('0x55')](_0x3d52('0x2a'),auth['isAuthenticated'](),controller[_0x3d52('0x5c')]);router[_0x3d52('0x55')](_0x3d52('0x2b'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x5d')]);router[_0x3d52('0x55')]('/:id/openchannel_accounts',auth[_0x3d52('0x9')](),controller[_0x3d52('0x5e')]);router[_0x3d52('0x55')](_0x3d52('0x4e'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x5f')]);router[_0x3d52('0x55')](_0x3d52('0x2f'),auth['isAuthenticated'](),controller[_0x3d52('0x60')]);router['delete'](_0x3d52('0x31'),auth[_0x3d52('0x9')](),controller['removeSquareProjects']);router['delete'](_0x3d52('0x50'),auth[_0x3d52('0x9')](),controller[_0x3d52('0x61')]);module[_0x3d52('0x62')]=router;
\ No newline at end of file
diff --git a/server/api/user/user.attributes.js b/server/api/user/user.attributes.js
index c9c6cea..3732d52 100644
--- a/server/api/user/user.attributes.js
+++ b/server/api/user/user.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['map','phoneBarEnableScreenRecordingByAgent','string','false','screenrecording','blockedAt','loginAttempts','sequelize','moment','STRING','name','setDataValue','The\x20name\x20of\x20the\x20user','fullname','format','\x22%s\x22\x20<%s>','getDataValue','internal','email','ENUM','admin','user','agent','telephone','local','INTEGER','callerid','DATE','BOOLEAN','friend','peer','ALLOWED_PASSED_SCREEN','ALLOWED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','transport','join','split','rfc2833','shortinfo','inband','auto','yes','nonat','update','outgoing','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','never','\x22\x22\x20<>','always','accept','refuse','originate','uac','uas','fingerprint','actpass','update,nonat','showWebBar','isArray','udp','wss','encryption','icesupport','dtlsenable','dtlsverify','dtlssetup','dtlscertfile','dtlsprivatekey','avpf','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','rtcp_mux','TEXT','permissions'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x0d8b('0x0'));var moment=require(_0x0d8b('0x1'));var util=require('util');var _=require('lodash');module['exports']={'name':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':![],'unique':_0x0d8b('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x43bca1){this[_0x0d8b('0x4')](_0x0d8b('0x3'),_0x43bca1);this['setDataValue']('defaultuser',_0x43bca1);},'comment':_0x0d8b('0x5')},'fullname':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':![],'set':function(_0x39f43a){this['setDataValue'](_0x0d8b('0x6'),_0x39f43a);this[_0x0d8b('0x4')]('callerid',util[_0x0d8b('0x7')](_0x0d8b('0x8'),_0x39f43a,this[_0x0d8b('0x9')](_0x0d8b('0xa'))));}},'alias':{'type':Sequelize[_0x0d8b('0x2')]},'email':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':![],'unique':_0x0d8b('0xb'),'validate':{'isEmail':!![]},'set':function(_0x28f87c){if(_0x28f87c){this['setDataValue'](_0x0d8b('0xb'),_0x28f87c['toLowerCase']());}}},'role':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0xd'),_0x0d8b('0xe'),_0x0d8b('0xf'),_0x0d8b('0x10')),'allowNull':![]},'password':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0x0d8b('0x2')],'defaultValue':_0x0d8b('0x11')},'internal':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':![],'unique':_0x0d8b('0xa'),'set':function(_0x5ad086){this[_0x0d8b('0x4')](_0x0d8b('0xa'),_0x5ad086);this[_0x0d8b('0x4')]('accountcode',_0x5ad086);this[_0x0d8b('0x4')](_0x0d8b('0x13'),util[_0x0d8b('0x7')](_0x0d8b('0x8'),this[_0x0d8b('0x9')]('fullname'),_0x5ad086));}},'salt':{'type':Sequelize[_0x0d8b('0x2')]},'phone':{'type':Sequelize[_0x0d8b('0x2')]},'mobile':{'type':Sequelize[_0x0d8b('0x2')]},'address':{'type':Sequelize[_0x0d8b('0x2')]},'zipcode':{'type':Sequelize[_0x0d8b('0x2')]},'userpic':{'type':Sequelize[_0x0d8b('0x2')]},'city':{'type':Sequelize[_0x0d8b('0x2')]},'country':{'type':Sequelize[_0x0d8b('0x2')]},'online':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x0d8b('0x14')]},'voicePause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x0d8b('0x2')],'defaultValue':'DEFAULT\x20PAUSE'},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0x0d8b('0x12')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x0d8b('0x12')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'chanspy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'host':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![],'defaultValue':'dynamic'},'ipaddr':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'port':{'type':Sequelize['INTEGER'](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'regserver':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'useragent':{'type':Sequelize['STRING'],'allowNull':!![]},'lastms':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x16'),'user',_0x0d8b('0x17')),'allowNull':!![],'defaultValue':'friend'},'context':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![],'defaultValue':'from-sip'},'callingpres':{'type':Sequelize[_0x0d8b('0xc')]('ALLOWED_NOT_SCREENED',_0x0d8b('0x18'),'ALLOWED_FAILED_SCREEN',_0x0d8b('0x19'),'PROHIB_NOT_SCREENED',_0x0d8b('0x1a'),_0x0d8b('0x1b'),_0x0d8b('0x1c')),'allowNull':!![]},'deny':{'type':Sequelize['STRING'],'allowNull':!![]},'permit':{'type':Sequelize['STRING'],'allowNull':!![]},'secret':{'type':Sequelize['STRING'],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'remotesecret':{'type':Sequelize['STRING'],'allowNull':!![]},'transport':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![],'defaultValue':'udp','set':function(_0x5d05fc){this[_0x0d8b('0x4')](_0x0d8b('0x1d'),_0x5d05fc?_0x5d05fc[_0x0d8b('0x1e')](','):null);},'get':function(){return this[_0x0d8b('0x9')](_0x0d8b('0x1d'))?this[_0x0d8b('0x9')](_0x0d8b('0x1d'))[_0x0d8b('0x1f')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x20'),'info',_0x0d8b('0x21'),_0x0d8b('0x22'),_0x0d8b('0x23')),'allowNull':!![],'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no',_0x0d8b('0x25'),_0x0d8b('0x26'),_0x0d8b('0x27')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'directmediadeny':{'type':Sequelize['STRING'],'allowNull':!![]},'nat':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![],'defaultValue':_0x0d8b('0x28'),'set':function(_0x188af2){this[_0x0d8b('0x4')](_0x0d8b('0x29'),_0x188af2?_0x188af2['join'](','):null);},'get':function(){return this['getDataValue'](_0x0d8b('0x29'))?this['getDataValue']('nat')[_0x0d8b('0x1f')](','):null;},'comment':_0x0d8b('0x2a')},'callgroup':{'type':Sequelize[_0x0d8b('0x2')]},'namedcallgroup':{'type':Sequelize[_0x0d8b('0x2')]},'pickupgroup':{'type':Sequelize[_0x0d8b('0x2')]},'namedpickupgroup':{'type':Sequelize[_0x0d8b('0x2')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x0d8b('0x2')]},'disallow':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':![],'defaultValue':_0x0d8b('0x2b')},'allow':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':![],'defaultValue':_0x0d8b('0x2c'),'set':function(_0x1a39ad){this[_0x0d8b('0x4')]('allow',_0x1a39ad?_0x1a39ad[_0x0d8b('0x1e')](';'):_0x0d8b('0x2c'));},'get':function(){return this[_0x0d8b('0x9')](_0x0d8b('0x2d'))?this['getDataValue'](_0x0d8b('0x2d'))['split'](';'):null;},'comment':_0x0d8b('0x2e')},'autoframing':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![],'set':function(_0x35fa7e){this[_0x0d8b('0x4')](_0x0d8b('0x2f'),_0x35fa7e?_0x35fa7e[_0x0d8b('0x1e')](','):null);},'get':function(){return this[_0x0d8b('0x9')](_0x0d8b('0x2f'))?this['getDataValue']('insecure')['split'](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]'},'trustrpid':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize['ENUM']('yes','no',_0x0d8b('0x30')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize['STRING'],'allowNull':!![]},'callerid':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x0d8b('0x31')},'amaflags':{'type':Sequelize['STRING'],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x0d8b('0xc')]('yes','no'),'allowNull':!![],'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x0d8b('0xc')]('yes','no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize['STRING'],'allowNull':!![]},'template':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no',_0x0d8b('0x32')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x33'),_0x0d8b('0x34'),_0x0d8b('0x35')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x36'),_0x0d8b('0x37')),'allowNull':!![],'defaultValue':_0x0d8b('0x37')},'t38pt_usertpsource':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'regexten':{'type':Sequelize['STRING'],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'fromuser':{'type':Sequelize['STRING'],'allowNull':!![]},'qualify':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![],'defaultValue':_0x0d8b('0x24')},'keepalive':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'defaultuser':{'type':Sequelize['STRING'],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING'],'allowNull':!![]},'callbackextension':{'type':Sequelize['STRING'],'allowNull':!![]},'timert1':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'timerb':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'contactdeny':{'type':Sequelize['STRING'],'allowNull':!![]},'contactacl':{'type':Sequelize['STRING'],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'maxforwards':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'encryption':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0x0d8b('0xc')]('yes','no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize['ENUM'](_0x0d8b('0x24'),'no',_0x0d8b('0x38'),'certificate'),'allowNull':!![]},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'dtlscapath':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x0d8b('0xc')]('active','passive',_0x0d8b('0x39')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'usereqphone':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0x0d8b('0x12')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'mohinterpret':{'type':Sequelize['STRING'],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no',_0x0d8b('0x25'),_0x0d8b('0x26'),_0x0d8b('0x3a')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x0d8b('0x2')]},'resetPasswordExpires':{'type':Sequelize['DATE']},'showWebBar':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x0,'set':function(_0x451940){this[_0x0d8b('0x4')](_0x0d8b('0x3b'),_0x451940);var _0x43ad22=this['get']({'plain':!![]});switch(_0x451940){case 0x0:case 0x1:var _0x1e1dce=_0x43ad22[_0x0d8b('0x1d')]?_[_0x0d8b('0x3c')](_0x43ad22[_0x0d8b('0x1d')])?_0x43ad22[_0x0d8b('0x1d')]['join']():_0x43ad22['transport']:_0x0d8b('0x3d');if(_0x1e1dce===_0x0d8b('0x3e')){_0x1e1dce=_0x0d8b('0x3d');}this[_0x0d8b('0x4')]('transport',_0x1e1dce);this[_0x0d8b('0x4')](_0x0d8b('0x3f'),'no');this[_0x0d8b('0x4')]('avpf',null);this[_0x0d8b('0x4')]('force_avp',null);this[_0x0d8b('0x4')](_0x0d8b('0x40'),null);this[_0x0d8b('0x4')](_0x0d8b('0x41'),null);this[_0x0d8b('0x4')](_0x0d8b('0x42'),null);this['setDataValue'](_0x0d8b('0x43'),null);this['setDataValue'](_0x0d8b('0x44'),null);this[_0x0d8b('0x4')](_0x0d8b('0x45'),null);this[_0x0d8b('0x4')]('rtcp_mux','no');break;case 0x2:this[_0x0d8b('0x4')](_0x0d8b('0x1d'),_0x0d8b('0x3e'));this[_0x0d8b('0x4')](_0x0d8b('0x3f'),_0x0d8b('0x24'));this[_0x0d8b('0x4')](_0x0d8b('0x46'),_0x0d8b('0x24'));this[_0x0d8b('0x4')]('force_avp','yes');this[_0x0d8b('0x4')](_0x0d8b('0x40'),'yes');this[_0x0d8b('0x4')]('dtlsenable','yes');this[_0x0d8b('0x4')](_0x0d8b('0x42'),'no');this['setDataValue']('dtlssetup',_0x0d8b('0x39'));this[_0x0d8b('0x4')](_0x0d8b('0x44'),_0x43ad22[_0x0d8b('0x44')]||_0x0d8b('0x47'));this[_0x0d8b('0x4')](_0x0d8b('0x45'),_0x43ad22['dtlsprivatekey']||_0x0d8b('0x48'));this['setDataValue'](_0x0d8b('0x49'),_0x0d8b('0x24'));break;default:}}},'permissions':{'type':Sequelize[_0x0d8b('0x4a')],'set':function(_0x14a34b){this['setDataValue'](_0x0d8b('0x4b'),_0x14a34b?_0x14a34b['join'](','):[]);},'get':function(){return this[_0x0d8b('0x9')](_0x0d8b('0x4b'))?_[_0x0d8b('0x4c')](this[_0x0d8b('0x9')](_0x0d8b('0x4b'))[_0x0d8b('0x1f')](','),function(_0x3e927c){return parseInt(_0x3e927c,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x0d8b('0x2')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x0d8b('0x2')]},'phoneBarBusyNumber':{'type':Sequelize[_0x0d8b('0x2')]},'phoneBarUnconditional':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize['STRING'],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x0d8b('0xc')](_0x0d8b('0x24'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x0d8b('0x2')]},'passwordResetAt':{'type':Sequelize[_0x0d8b('0x14')],'defaultValue':null},'phoneBarEnableJaws':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0d8b('0x9')](_0x0d8b('0x4d'))?this['getDataValue'](_0x0d8b('0x4d')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'interface':{'type':Sequelize[_0x0d8b('0x2')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x0d8b('0x2')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![],'set':function(_0x5007c0){if(typeof _0x5007c0===_0x0d8b('0x4e')){var _0x16df83=_0x5007c0==='1'?!![]:_0x5007c0==='0'?![]:_0x5007c0==='true'?!![]:_0x5007c0===_0x0d8b('0x4f')?![]:![];this[_0x0d8b('0x4')](_0x0d8b('0x50'),_0x16df83);}else{this['setDataValue']('screenrecording',_0x5007c0);}}},'blocked':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![],'set':function(_0x3aeb45){this[_0x0d8b('0x4')]('blocked',_0x3aeb45);if(_0x3aeb45===!![]){this['setDataValue'](_0x0d8b('0x51'),moment());this[_0x0d8b('0x4')](_0x0d8b('0x52'),0x0);}else{this[_0x0d8b('0x4')](_0x0d8b('0x51'),null);}}},'blockedAt':{'type':Sequelize[_0x0d8b('0x14')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x0d8b('0x12')],'defaultValue':0x0},'disabled':{'type':Sequelize[_0x0d8b('0x15')],'defaultValue':![]}};
\ No newline at end of file
+var _0xe706=['ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','udp','transport','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','inband','auto','yes','update','outgoing','force_rport,comedia','nat','join','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','never','\x22\x22\x20<>','always','accept','refuse','originate','uac','uas','fingerprint','certificate','active','passive','actpass','nonat','get','isArray','wss','avpf','dtlsenable','dtlsverify','dtlssetup','dtlscertfile','dtlsprivatekey','rtcp_mux','force_avp','icesupport','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','TEXT','permissions','map','VIRTUAL','phoneBarEnableScreenRecordingByAgent','string','false','screenrecording','blocked','blockedAt','loginAttempts','sequelize','moment','util','exports','STRING','name','setDataValue','defaultuser','The\x20name\x20of\x20the\x20user','fullname','callerid','format','\x22%s\x22\x20<%s>','getDataValue','internal','email','ENUM','admin','user','agent','telephone','local','accountcode','BOOLEAN','DATE','DEFAULT\x20PAUSE','INTEGER','dynamic','friend','peer','from-sip','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe706,0xa3));var _0x6e70=function(_0x3d4e74,_0x21b4e5){_0x3d4e74=_0x3d4e74-0x0;var _0x57613d=_0xe706[_0x3d4e74];return _0x57613d;};'use strict';var Sequelize=require(_0x6e70('0x0'));var moment=require(_0x6e70('0x1'));var util=require(_0x6e70('0x2'));var _=require('lodash');module[_0x6e70('0x3')]={'name':{'type':Sequelize[_0x6e70('0x4')],'allowNull':![],'unique':_0x6e70('0x5'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x7dfbc3){this[_0x6e70('0x6')](_0x6e70('0x5'),_0x7dfbc3);this[_0x6e70('0x6')](_0x6e70('0x7'),_0x7dfbc3);},'comment':_0x6e70('0x8')},'fullname':{'type':Sequelize[_0x6e70('0x4')],'allowNull':![],'set':function(_0x36357b){this[_0x6e70('0x6')](_0x6e70('0x9'),_0x36357b);this[_0x6e70('0x6')](_0x6e70('0xa'),util[_0x6e70('0xb')](_0x6e70('0xc'),_0x36357b,this[_0x6e70('0xd')](_0x6e70('0xe'))));}},'alias':{'type':Sequelize[_0x6e70('0x4')]},'email':{'type':Sequelize[_0x6e70('0x4')],'allowNull':![],'unique':_0x6e70('0xf'),'validate':{'isEmail':!![]},'set':function(_0x37b3e0){if(_0x37b3e0){this[_0x6e70('0x6')]('email',_0x37b3e0['toLowerCase']());}}},'role':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x11'),_0x6e70('0x12'),_0x6e70('0x13'),_0x6e70('0x14')),'allowNull':![]},'password':{'type':Sequelize[_0x6e70('0x4')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0x6e70('0x4')],'defaultValue':_0x6e70('0x15')},'internal':{'type':Sequelize['INTEGER'](0xb),'allowNull':![],'unique':'internal','set':function(_0x48bc72){this[_0x6e70('0x6')]('internal',_0x48bc72);this['setDataValue'](_0x6e70('0x16'),_0x48bc72);this[_0x6e70('0x6')]('callerid',util[_0x6e70('0xb')]('\x22%s\x22\x20<%s>',this[_0x6e70('0xd')](_0x6e70('0x9')),_0x48bc72));}},'salt':{'type':Sequelize['STRING']},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0x6e70('0x4')]},'address':{'type':Sequelize['STRING']},'zipcode':{'type':Sequelize[_0x6e70('0x4')]},'userpic':{'type':Sequelize[_0x6e70('0x4')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize['STRING']},'online':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x6e70('0x18')]},'voicePause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x6e70('0x4')],'defaultValue':_0x6e70('0x19')},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x6e70('0x1a')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize['INTEGER'],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'host':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![],'defaultValue':_0x6e70('0x1b')},'ipaddr':{'type':Sequelize['STRING'],'allowNull':!![]},'port':{'type':Sequelize[_0x6e70('0x1a')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'regserver':{'type':Sequelize['STRING'],'allowNull':!![]},'useragent':{'type':Sequelize['STRING'],'allowNull':!![]},'lastms':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x1c'),_0x6e70('0x12'),_0x6e70('0x1d')),'allowNull':!![],'defaultValue':'friend'},'context':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![],'defaultValue':_0x6e70('0x1e')},'callingpres':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x1f'),_0x6e70('0x20'),_0x6e70('0x21'),_0x6e70('0x22'),_0x6e70('0x23'),_0x6e70('0x24'),_0x6e70('0x25'),'PROHIB'),'allowNull':!![]},'deny':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'permit':{'type':Sequelize['STRING'],'allowNull':!![]},'secret':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'md5secret':{'type':Sequelize['STRING'],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'transport':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![],'defaultValue':_0x6e70('0x26'),'set':function(_0x56f6f7){this[_0x6e70('0x6')](_0x6e70('0x27'),_0x56f6f7?_0x56f6f7['join'](','):null);},'get':function(){return this[_0x6e70('0xd')](_0x6e70('0x27'))?this['getDataValue'](_0x6e70('0x27'))[_0x6e70('0x28')](','):null;},'comment':_0x6e70('0x29')},'dtmfmode':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2a'),_0x6e70('0x2b'),_0x6e70('0x2c'),_0x6e70('0x2d'),_0x6e70('0x2e')),'allowNull':!![],'defaultValue':_0x6e70('0x2a')},'directmedia':{'type':Sequelize['ENUM'](_0x6e70('0x2f'),'no','nonat',_0x6e70('0x30'),_0x6e70('0x31')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'nat':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![],'defaultValue':_0x6e70('0x32'),'set':function(_0x80bebb){this[_0x6e70('0x6')](_0x6e70('0x33'),_0x80bebb?_0x80bebb[_0x6e70('0x34')](','):null);},'get':function(){return this[_0x6e70('0xd')]('nat')?this['getDataValue']('nat')[_0x6e70('0x28')](','):null;},'comment':_0x6e70('0x35')},'callgroup':{'type':Sequelize[_0x6e70('0x4')]},'namedcallgroup':{'type':Sequelize[_0x6e70('0x4')]},'pickupgroup':{'type':Sequelize[_0x6e70('0x4')]},'namedpickupgroup':{'type':Sequelize[_0x6e70('0x4')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x6e70('0x4')]},'disallow':{'type':Sequelize[_0x6e70('0x4')],'allowNull':![],'defaultValue':_0x6e70('0x36')},'allow':{'type':Sequelize[_0x6e70('0x4')],'allowNull':![],'defaultValue':_0x6e70('0x37'),'set':function(_0x37bf46){this[_0x6e70('0x6')](_0x6e70('0x38'),_0x37bf46?_0x37bf46['join'](';'):_0x6e70('0x37'));},'get':function(){return this[_0x6e70('0xd')](_0x6e70('0x38'))?this[_0x6e70('0xd')](_0x6e70('0x38'))[_0x6e70('0x28')](';'):null;},'comment':_0x6e70('0x39')},'autoframing':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'insecure':{'type':Sequelize['STRING'],'allowNull':!![],'set':function(_0x154e0c){this[_0x6e70('0x6')](_0x6e70('0x3a'),_0x154e0c?_0x154e0c[_0x6e70('0x34')](','):null);},'get':function(){return this[_0x6e70('0xd')]('insecure')?this[_0x6e70('0xd')](_0x6e70('0x3a'))[_0x6e70('0x28')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]'},'trustrpid':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x6e70('0x10')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no',_0x6e70('0x3b')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x6e70('0x10')]('yes','no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0x6e70('0x10')]('yes','no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'callerid':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![],'defaultValue':_0x6e70('0x3c')},'amaflags':{'type':Sequelize['STRING'],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![],'defaultValue':_0x6e70('0x2f')},'busylevel':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x6e70('0x10')]('yes','no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'template':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x6e70('0x10')]('yes','no',_0x6e70('0x3d')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'session_timers':{'type':Sequelize['ENUM'](_0x6e70('0x3e'),_0x6e70('0x3f'),_0x6e70('0x40')),'allowNull':!![]},'session_expires':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x41'),_0x6e70('0x42')),'allowNull':!![],'defaultValue':_0x6e70('0x42')},'t38pt_usertpsource':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'fromdomain':{'type':Sequelize['STRING'],'allowNull':!![]},'fromuser':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'qualify':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![],'defaultValue':_0x6e70('0x2f')},'keepalive':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultuser':{'type':Sequelize['STRING'],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING'],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'timert1':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'contactdeny':{'type':Sequelize['STRING'],'allowNull':!![]},'contactacl':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0x6e70('0x2f'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x6e70('0x10')]('yes','no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize['ENUM'](_0x6e70('0x2f'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no',_0x6e70('0x43'),_0x6e70('0x44')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x45'),_0x6e70('0x46'),_0x6e70('0x47')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0x6e70('0x1a')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'mohinterpret':{'type':Sequelize['STRING'],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no',_0x6e70('0x48'),_0x6e70('0x30'),'update,nonat'),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x6e70('0x4')]},'resetPasswordExpires':{'type':Sequelize['DATE']},'showWebBar':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0,'set':function(_0x692205){this[_0x6e70('0x6')]('showWebBar',_0x692205);var _0x51f268=this[_0x6e70('0x49')]({'plain':!![]});switch(_0x692205){case 0x0:case 0x1:var _0xd6bccd=_0x51f268[_0x6e70('0x27')]?_[_0x6e70('0x4a')](_0x51f268[_0x6e70('0x27')])?_0x51f268[_0x6e70('0x27')][_0x6e70('0x34')]():_0x51f268['transport']:'udp';if(_0xd6bccd===_0x6e70('0x4b')){_0xd6bccd=_0x6e70('0x26');}this[_0x6e70('0x6')](_0x6e70('0x27'),_0xd6bccd);this['setDataValue']('encryption','no');this[_0x6e70('0x6')](_0x6e70('0x4c'),null);this['setDataValue']('force_avp',null);this[_0x6e70('0x6')]('icesupport',null);this[_0x6e70('0x6')](_0x6e70('0x4d'),null);this[_0x6e70('0x6')](_0x6e70('0x4e'),null);this[_0x6e70('0x6')](_0x6e70('0x4f'),null);this[_0x6e70('0x6')](_0x6e70('0x50'),null);this['setDataValue'](_0x6e70('0x51'),null);this[_0x6e70('0x6')](_0x6e70('0x52'),'no');break;case 0x2:this[_0x6e70('0x6')](_0x6e70('0x27'),'wss');this['setDataValue']('encryption',_0x6e70('0x2f'));this[_0x6e70('0x6')](_0x6e70('0x4c'),'yes');this['setDataValue'](_0x6e70('0x53'),_0x6e70('0x2f'));this[_0x6e70('0x6')](_0x6e70('0x54'),_0x6e70('0x2f'));this[_0x6e70('0x6')]('dtlsenable',_0x6e70('0x2f'));this[_0x6e70('0x6')](_0x6e70('0x4e'),'no');this[_0x6e70('0x6')]('dtlssetup',_0x6e70('0x47'));this['setDataValue']('dtlscertfile',_0x51f268[_0x6e70('0x50')]||_0x6e70('0x55'));this[_0x6e70('0x6')](_0x6e70('0x51'),_0x51f268[_0x6e70('0x51')]||_0x6e70('0x56'));this['setDataValue'](_0x6e70('0x52'),_0x6e70('0x2f'));break;default:}}},'permissions':{'type':Sequelize[_0x6e70('0x57')],'set':function(_0x18e64c){this[_0x6e70('0x6')](_0x6e70('0x58'),_0x18e64c?_0x18e64c[_0x6e70('0x34')](','):[]);},'get':function(){return this[_0x6e70('0xd')](_0x6e70('0x58'))?_[_0x6e70('0x59')](this['getDataValue'](_0x6e70('0x58'))[_0x6e70('0x28')](','),function(_0x577c3b){return parseInt(_0x577c3b,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize['STRING']},'phoneBarNoReplyNumber':{'type':Sequelize['STRING']},'phoneBarBusyNumber':{'type':Sequelize[_0x6e70('0x4')]},'phoneBarUnconditional':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x6e70('0x4')],'defaultValue':''},'crudPermissions':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x6e70('0x10')](_0x6e70('0x2f'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x6e70('0x4')]},'passwordResetAt':{'type':Sequelize[_0x6e70('0x18')],'defaultValue':null},'phoneBarEnableJaws':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize[_0x6e70('0x5a')],'get':function(){return this[_0x6e70('0xd')](_0x6e70('0x5b'))?this[_0x6e70('0xd')](_0x6e70('0x5b')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'hotdesk':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'interface':{'type':Sequelize['STRING'],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize['STRING'],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x6e70('0x4')],'allowNull':!![]},'screenrecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'set':function(_0x5b5471){if(typeof _0x5b5471===_0x6e70('0x5c')){var _0x48e04b=_0x5b5471==='1'?!![]:_0x5b5471==='0'?![]:_0x5b5471==='true'?!![]:_0x5b5471===_0x6e70('0x5d')?![]:![];this[_0x6e70('0x6')](_0x6e70('0x5e'),_0x48e04b);}else{this['setDataValue']('screenrecording',_0x5b5471);}}},'blocked':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'set':function(_0x3e7be7){this['setDataValue'](_0x6e70('0x5f'),_0x3e7be7);if(_0x3e7be7===!![]){this[_0x6e70('0x6')](_0x6e70('0x60'),moment());this[_0x6e70('0x6')](_0x6e70('0x61'),0x0);}else{this[_0x6e70('0x6')](_0x6e70('0x60'),null);}}},'blockedAt':{'type':Sequelize['DATE'],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x6e70('0x1a')],'defaultValue':0x0},'disabled':{'type':Sequelize[_0x6e70('0x17')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js
index 47249f1..c5c3e92 100644
--- a/server/api/user/user.controller.js
+++ b/server/api/user/user.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x67dc=['QueuePause','PAUSE','updateAttributes','DEFAULT\x20PAUSE','unpause','mailPause','chatPause','faxPause','openchannelPause','lastPauseAt','manual','mail','chat','fax','sms','openchannel','%s%s','getTeams','addTeams','removeTeams','CmList','getLists','getAgents','values','send','You\x20can\x27t\x20delete\x20yourself','addChatInteractions','user_has_chat_interactions:save','removeChatInteractions','user_has_chat_interactions:remove','addMailInteractions','user_has_mail_interactions:save','removeMailInteractions','isArray','user_has_mail_interactions:remove','addFaxInteractions','user_has_fax_interactions:save','removeFaxInteractions','user_has_fax_interactions:remove','addSmsInteractions','user_has_sms_interactions:save','removeSmsInteractions','user_has_sms_interactions:remove','user_has_openchannel_interactions:save','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','getVoicePrefixes','VoicePrefix','getFaxAccounts','FaxAccount','addFaxAccounts','removeFaxAccounts','getMailAccounts','MailAccount','addMailAccounts','getOpenchannelAccounts','OpenchannelAccount','addOpenchannelAccounts','removeOpenchannelAccounts','SmsAccount','getSmsAccounts','addSmsAccounts','removeSmsAccounts','getChatWebsites','ChatWebsite','addChatWebsites','removeChatWebsites','getSquareProjects','SquareProject','addSquareProjects','removeSquareProjects','CmHopper','concat','$and','$gte','$ne','$eq','$not','$between','$notBetween','$like','$notLike','$notILike','$overlap','$contains','$any','lastName','Contact','dialActive','VoiceQueue','retrieveApiKey','You\x20don\x27t\x20have\x20sufficient\x20privelages\x20to\x20access\x20this\x20resource.','generateApiKey','apiKeyNonce','apiKeyIat','API\x20key\x20not\x20available','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./user.socket','jayson/promise','client','http','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','User,\x20%s,\x20%s','request\x20sent','User,\x20%s,\x20%s,\x20%s','error','message','result','sendStatus','status','end','offset','limit','set','Content-Range','json','apply','save','update','destroy','get','user','Agents','agent','Telephones','telephone','filter','ignore','map','value','includes','role','find','name','UserProfileResource','User','rawAttributes','model','differenceBy','keys','password','query','filters','attributes','length','nolimit','sort','where','merge','type','key','VIRTUAL','sequelize','lower','col','field','options','count','includeAll','include','catch','params','intersection','fields','bulkCreate','body','describe','addContacts','ids','omit','agent\x20role','admin','../../config/license/util','getLicense','telephones','users','License\x20limit\x20reached','format','count\x20%s:\x20%s','create','internal','Setting','findById','securePassword','min_internal','max','isNil','select\x20(select\x20IFNULL(max(internal)+1,1)\x20from\x20users\x20where\x20internal\x20<\x20md.internal)\x20as\x20\x27from\x27,\x20md.internal\x20-\x201\x20as\x20\x27to\x27\x20from\x20users\x20md\x20where\x20md.internal\x20!=\x201\x20and\x20not\x20exists\x20(select\x201\x20from\x20users\x20md2\x20where\x20md2.internal\x20=\x20md.internal\x20-\x201)','QueryTypes','SELECT','from','mailbox','fullname','email','permissions','101','102','103','110','104','106','107','108','109','111','VoiceMail','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','changePassword','oldPassword','newPassword','New\x20password\x20must\x20be\x20different\x20from\x20old\x20one','Sequelize','Invalid\x20body\x20format.\x20Use\x20oldPassord\x20and\x20newPassword','authenticate','ValidationError','Wrong\x20credentials','Invalid\x20body\x20format.\x20Use\x20newPassword','Unauthorized','channel','online','loginInPause','voicePause','isValidChannel','Unknown\x20channel','add','capitalize','toLowerCase','Queues','penalty','spread','QueueId','voice','push','interface','SIP/%s','each','UserVoiceQueueRt','upsert','removeQueues','remove','emit','Queue:remove','addAvatar','userpic','filename','getAvatar','join','root','server/files/images/logos/default_profile.png','download','existsSync','server/files/images/','findOne','CmContact','order','pick','getContacts','hasOwnProperty','List','Tag','Tags','color','tag','getQueues','Queue','findAll','Unknown\x20role','getVoiceQueuesRt','getGroups','ChatGroup','getRecordings','VoiceRecording','UserId','rows','getScreenRecordings','ScreenRecording','getChatInteractions','ChatInteraction','getOpenchannelInteractions','OpenchannelInteraction','getMailInteractions','MailInteraction','getSmsInteractions','getFaxInteractions','phone','mobile','LOCAL/%s@from-sip/n','intrf','user:%s','user:forcelogout','headers','x-forwarded-for','connection','remoteAddress','socket','getVoiceQueues','UserVoiceQueue.penalty','forEach','YYYY-MM-DD\x20HH:mm:ss','getChannels','device','MemberReport','LOGININPAUSE','resolve','all','pause'];(function(_0x3d60ce,_0x43897a){var _0xd316cc=function(_0x1bd8d6){while(--_0x1bd8d6){_0x3d60ce['push'](_0x3d60ce['shift']());}};_0xd316cc(++_0x43897a);}(_0x67dc,0x1b1));var _0xc67d=function(_0x474bc0,_0x26989c){_0x474bc0=_0x474bc0-0x0;var _0x4b24cf=_0x67dc[_0x474bc0];return _0x4b24cf;};'use strict';var pdf=require(_0xc67d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xc67d('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc67d('0x2'));var rp=require(_0xc67d('0x3'));var moment=require(_0xc67d('0x4'));var BPromise=require(_0xc67d('0x5'));var Mustache=require(_0xc67d('0x6'));var util=require(_0xc67d('0x7'));var path=require(_0xc67d('0x8'));var sox=require(_0xc67d('0x9'));var csv=require(_0xc67d('0xa'));var ejs=require(_0xc67d('0xb'));var fs=require('fs');var _=require(_0xc67d('0xc'));var squel=require('squel');var crypto=require(_0xc67d('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xc67d('0xe'));var toCsv=require(_0xc67d('0xa'));var querystring=require(_0xc67d('0xf'));var Papa=require(_0xc67d('0x10'));var Redis=require('ioredis');var authService=require(_0xc67d('0x11'));var qs=require(_0xc67d('0x12'));var hardwareService=require(_0xc67d('0x13'));var logger=require('../../config/logger')(_0xc67d('0x14'));var utils=require('../../config/utils');var config=require(_0xc67d('0x15'));var db=require(_0xc67d('0x16'))['db'];config['redis']=_['defaults'](config[_0xc67d('0x17')],{'host':_0xc67d('0x18'),'port':0x18eb});var socket=require(_0xc67d('0x19'))(new Redis(config[_0xc67d('0x17')]));require(_0xc67d('0x1a'))['register'](socket);var jayson=require(_0xc67d('0x1b'));var client=jayson[_0xc67d('0x1c')][_0xc67d('0x1d')]({'port':0x232a});function checkPasswordPattern(_0x52f501,_0x12e171,_0x107f09){if(_0x107f09){var _0x28d2e7=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x28d2e7[_0xc67d('0x1e')](_0x12e171)){return _0x52f501;}else{throw new Error(_0xc67d('0x1f'));}}else{return _0x52f501;}}function respondWithRpcPromise(_0x4f6de3,_0x3c6a14,_0x178ca3,_0x389cd1){return new BPromise(function(_0x118844,_0x168fcf){var _0x3e158f=_0x389cd1||client;return _0x3e158f['request'](_0x4f6de3,_0x178ca3)[_0xc67d('0x20')](function(_0x509379){logger[_0xc67d('0x21')](_0xc67d('0x22'),_0x3c6a14,_0xc67d('0x23'));logger['debug'](_0xc67d('0x24'),_0x3c6a14,_0xc67d('0x23'),JSON['stringify'](_0x509379));if(_0x509379[_0xc67d('0x25')]){if(_0x509379[_0xc67d('0x25')]['code']===0x1f4){logger[_0xc67d('0x25')](_0xc67d('0x22'),_0x3c6a14,_0x509379[_0xc67d('0x25')][_0xc67d('0x26')]);return _0x168fcf(_0x509379[_0xc67d('0x25')][_0xc67d('0x26')]);}logger[_0xc67d('0x25')](_0xc67d('0x22'),_0x3c6a14,_0x509379[_0xc67d('0x25')][_0xc67d('0x26')]);return _0x118844(_0x509379[_0xc67d('0x25')]['message']);}else{logger[_0xc67d('0x21')]('User,\x20%s,\x20%s',_0x3c6a14,_0xc67d('0x23'));_0x118844(_0x509379[_0xc67d('0x27')][_0xc67d('0x26')]);}})['catch'](function(_0x57c7df){logger[_0xc67d('0x25')](_0xc67d('0x22'),_0x3c6a14,_0x57c7df);_0x168fcf(_0x57c7df);});});}function respondWithStatusCode(_0x2f61d1,_0x38de2e){_0x38de2e=_0x38de2e||0xcc;return function(_0x53d8bf){if(_0x53d8bf){return _0x2f61d1[_0xc67d('0x28')](_0x38de2e);}return _0x2f61d1[_0xc67d('0x29')](_0x38de2e)[_0xc67d('0x2a')]();};}function respondWithResult(_0x30b8c2,_0x5b05b1){_0x5b05b1=_0x5b05b1||0xc8;return function(_0x210e06){if(_0x210e06){return _0x30b8c2[_0xc67d('0x29')](_0x5b05b1)['json'](_0x210e06);}};}function respondWithFilteredResult(_0x550a32,_0x4d015b){return function(_0x56f5f3){if(_0x56f5f3){var _0x10fac9=_0x56f5f3['count'],_0x5452aa=_0x4d015b[_0xc67d('0x2b')],_0x19de30=_0x4d015b[_0xc67d('0x2b')]+_0x4d015b[_0xc67d('0x2c')],_0x5ab35a;if(_0x19de30>=_0x10fac9){_0x19de30=_0x10fac9;_0x5ab35a=0xc8;}else{_0x5ab35a=0xce;}_0x550a32[_0xc67d('0x29')](_0x5ab35a);return _0x550a32[_0xc67d('0x2d')](_0xc67d('0x2e'),_0x5452aa+'-'+_0x19de30+'/'+_0x10fac9)[_0xc67d('0x2f')](_0x56f5f3);}return null;};}function patchUpdates(_0x59cf87){return function(_0x6c0d13){try{jsonpatch[_0xc67d('0x30')](_0x6c0d13,_0x59cf87,!![]);}catch(_0x3815f4){return BPromise['reject'](_0x3815f4);}return _0x6c0d13[_0xc67d('0x31')]();};}function saveUpdates(_0x4e92f1,_0x226e13){return function(_0x43cab1){if(_0x43cab1){return _0x43cab1[_0xc67d('0x32')](_0x4e92f1)['then'](function(_0x316493){return _0x316493;});}return null;};}function removeEntity(_0x491c19,_0x561cf6){return function(_0x34848c){if(_0x34848c){return _0x34848c[_0xc67d('0x33')]()['then'](function(){var _0x43d506=_0x34848c[_0xc67d('0x34')]({'plain':!![]});var _0x24b908=[{'name':'Users','value':_0xc67d('0x35'),'ignore':!![]},{'name':_0xc67d('0x36'),'value':_0xc67d('0x37'),'ignore':![]},{'name':_0xc67d('0x38'),'value':_0xc67d('0x39'),'ignore':![]}];var _0x1c35f9=_(_0x24b908)[_0xc67d('0x3a')](_0xc67d('0x3b'))[_0xc67d('0x3c')]('value')[_0xc67d('0x3d')]();if(_[_0xc67d('0x3e')](_0x1c35f9,_0x43d506[_0xc67d('0x3f')])){return;}var _0x22f4d8=_[_0xc67d('0x40')](_0x24b908,[_0xc67d('0x3d'),_0x43d506[_0xc67d('0x3f')]])[_0xc67d('0x41')];return db[_0xc67d('0x42')][_0xc67d('0x33')]({'where':{'type':_0x22f4d8,'resourceId':_0x43d506['id']}})[_0xc67d('0x20')](function(){return _0x34848c;});})[_0xc67d('0x20')](function(){_0x491c19['status'](0xcc)[_0xc67d('0x2a')]();});}};}function handleEntityNotFound(_0x455d4d,_0x1f08a2){return function(_0x14fbe5){if(!_0x14fbe5){_0x455d4d['sendStatus'](0x194);}return _0x14fbe5;};}function handleError(_0x203fac,_0x3916e5){_0x3916e5=_0x3916e5||0x1f4;return function(_0x2c8ce2){logger[_0xc67d('0x25')](_0x2c8ce2['stack']);if(_0x2c8ce2['name']){delete _0x2c8ce2['name'];}_0x203fac[_0xc67d('0x29')](_0x3916e5)['send'](_0x2c8ce2);};}exports['index']=function(_0x3dd55b,_0x16ec44){var _0x221e57={},_0x4bc84f={},_0xcfbe33={'count':0x0,'rows':[]};var _0x36ac5a=db[_0xc67d('0x43')][_0xc67d('0x44')];_0x4bc84f[_0xc67d('0x45')]=_[_0xc67d('0x46')](_[_0xc67d('0x47')](_0x36ac5a),[_0xc67d('0x48'),'salt']);_0x4bc84f[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x3dd55b[_0xc67d('0x49')]);_0x4bc84f[_0xc67d('0x4a')]=_['intersection'](_0x4bc84f[_0xc67d('0x45')],_0x4bc84f[_0xc67d('0x49')]);_0x221e57[_0xc67d('0x4b')]=_['intersection'](_0x4bc84f[_0xc67d('0x45')],qs['fields'](_0x3dd55b[_0xc67d('0x49')]['fields']));_0x221e57['attributes']=_0x221e57['attributes'][_0xc67d('0x4c')]?_0x221e57[_0xc67d('0x4b')]:_0x4bc84f[_0xc67d('0x45')];if(!_0x3dd55b[_0xc67d('0x49')]['hasOwnProperty'](_0xc67d('0x4d'))){_0x221e57[_0xc67d('0x2c')]=qs['limit'](_0x3dd55b[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x221e57['offset']=qs[_0xc67d('0x2b')](_0x3dd55b[_0xc67d('0x49')][_0xc67d('0x2b')]);}_0x221e57['order']=qs[_0xc67d('0x4e')](_0x3dd55b[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x221e57[_0xc67d('0x4f')]=qs['filters'](_['pick'](_0x3dd55b[_0xc67d('0x49')],_0x4bc84f[_0xc67d('0x4a')]));if(_0x3dd55b['query'][_0xc67d('0x3a')]){_0x221e57[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x221e57['where'],{'$or':_['map'](_0x36ac5a,function(_0x1a666a){if(_0x1a666a[_0xc67d('0x51')][_0xc67d('0x52')]!==_0xc67d('0x53')){return db[_0xc67d('0x54')][_0xc67d('0x4f')](db[_0xc67d('0x54')]['fn'](_0xc67d('0x55'),db['sequelize'][_0xc67d('0x56')](_0x1a666a[_0xc67d('0x57')])),{'$like':db[_0xc67d('0x54')]['fn']('lower','%'+_0x3dd55b['query']['filter']+'%')});}})});}_0x221e57=_['merge']({},_0x221e57,_0x3dd55b[_0xc67d('0x58')]);var _0x10604b={'where':_0x221e57[_0xc67d('0x4f')]};return db[_0xc67d('0x43')][_0xc67d('0x59')](_0x10604b)[_0xc67d('0x20')](function(_0x5a39a2){_0xcfbe33[_0xc67d('0x59')]=_0x5a39a2;if(_0x3dd55b[_0xc67d('0x49')][_0xc67d('0x5a')]){_0x221e57[_0xc67d('0x5b')]=[{'all':!![]}];}return db[_0xc67d('0x43')]['findAll'](_0x221e57);})[_0xc67d('0x20')](function(_0x575e5a){_0xcfbe33['rows']=_0x575e5a;return _0xcfbe33;})[_0xc67d('0x20')](respondWithFilteredResult(_0x16ec44,_0x221e57))[_0xc67d('0x5c')](handleError(_0x16ec44,null));};exports['show']=function(_0x40920f,_0x2607f7){var _0x2de4ed={'raw':![],'where':{'id':_0x40920f[_0xc67d('0x5d')]['id']}},_0x54063d={};_0x54063d[_0xc67d('0x45')]=_['differenceBy'](_['keys'](db['User'][_0xc67d('0x44')]),[_0xc67d('0x48'),'salt']);_0x54063d[_0xc67d('0x49')]=_['keys'](_0x40920f['query']);_0x54063d[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x54063d[_0xc67d('0x45')],_0x54063d[_0xc67d('0x49')]);_0x2de4ed['attributes']=_[_0xc67d('0x5e')](_0x54063d[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0x40920f[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x2de4ed[_0xc67d('0x4b')]=_0x2de4ed[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x2de4ed['attributes']:_0x54063d['model'];if(_0x40920f[_0xc67d('0x49')]['includeAll']){_0x2de4ed[_0xc67d('0x5b')]=[{'all':!![]}];}_0x2de4ed=_[_0xc67d('0x50')]({},_0x2de4ed,_0x40920f[_0xc67d('0x58')]);return db[_0xc67d('0x43')][_0xc67d('0x40')](_0x2de4ed)['then'](handleEntityNotFound(_0x2607f7,null))[_0xc67d('0x20')](respondWithResult(_0x2607f7,null))[_0xc67d('0x5c')](handleError(_0x2607f7,null));};exports[_0xc67d('0x60')]=function(_0x2f0888,_0x2e33ba){return db['User'][_0xc67d('0x60')](_0x2f0888[_0xc67d('0x61')],{'raw':![],'individualHooks':!![]})[_0xc67d('0x20')](respondWithResult(_0x2e33ba,0xc9))[_0xc67d('0x5c')](handleError(_0x2e33ba,null));};exports[_0xc67d('0x32')]=function(_0x11742f,_0x26c4aa){if(_0x11742f[_0xc67d('0x61')]['id']){delete _0x11742f['body']['id'];}delete _0x11742f[_0xc67d('0x61')][_0xc67d('0x3f')];return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0x11742f[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x26c4aa,null))['then'](saveUpdates(_0x11742f[_0xc67d('0x61')],null))[_0xc67d('0x20')](respondWithResult(_0x26c4aa,null))['catch'](handleError(_0x26c4aa,null));};exports[_0xc67d('0x62')]=function(_0x4fb017,_0x1649f1){return db[_0xc67d('0x43')][_0xc67d('0x62')]()[_0xc67d('0x20')](respondWithResult(_0x1649f1,null))[_0xc67d('0x5c')](handleError(_0x1649f1,null));};exports['addContacts']=function(_0x225731,_0x21e78d,_0x32e123){return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0x225731[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x21e78d,null))[_0xc67d('0x20')](function(_0x84a507){if(_0x84a507){return _0x84a507[_0xc67d('0x63')](_0x225731[_0xc67d('0x61')][_0xc67d('0x64')],_[_0xc67d('0x65')](_0x225731[_0xc67d('0x61')],['ids','id'])||{});}})[_0xc67d('0x20')](respondWithResult(_0x21e78d,null))['catch'](handleError(_0x21e78d,null));};var getLicense=function(_0x5875a3){return new BPromise(function(_0x448fa6,_0x14d65a){var _0x3c6737=0x0;_0x5875a3['body'][_0xc67d('0x3f')]===_0xc67d('0x37')&&_0x448fa6(_0xc67d('0x66'));return db[_0xc67d('0x43')][_0xc67d('0x59')]({'where':{'$or':[{'role':_0x5875a3[_0xc67d('0x61')][_0xc67d('0x3f')]===_0xc67d('0x39')?_0xc67d('0x39'):[_0xc67d('0x67'),_0xc67d('0x35')]}]}})[_0xc67d('0x20')](function(_0x1ed309){_0x3c6737=_0x1ed309;return require(_0xc67d('0x68'))[_0xc67d('0x69')]();})[_0xc67d('0x20')](function(_0x5e3ce0){var _0xbc5f1d=_0x5875a3[_0xc67d('0x61')]['role']==='telephone'?_0xc67d('0x6a'):_0xc67d('0x6b');if(!_['isNil'](_0x5e3ce0[_0xbc5f1d])&&_0x3c6737>=_0x5e3ce0[_0xbc5f1d]){return _0x14d65a({'message':_0xc67d('0x6c')});}return _0x448fa6(util[_0xc67d('0x6d')](_0xc67d('0x6e'),_0xbc5f1d,_0x3c6737));})['catch'](function(_0x5a47b7){return _0x14d65a(_0x5a47b7);});});};exports[_0xc67d('0x6f')]=function(_0x557c75,_0x3ef928){return getLicense(_0x557c75)['then'](function(_0x215628){if(!_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]){var _0x5f5309;return db[_0xc67d('0x71')][_0xc67d('0x72')](0x1)['then'](function(_0x4c57fd){_0x4c57fd[_0xc67d('0x73')]=!![];return checkPasswordPattern(_0x4c57fd,_0x557c75[_0xc67d('0x61')]['password'],_0x4c57fd[_0xc67d('0x73')]);})[_0xc67d('0x20')](function(_0x202441){_0x5f5309=_0x202441[_0xc67d('0x74')];return db[_0xc67d('0x43')][_0xc67d('0x75')](_0xc67d('0x70'));})['then'](function(_0x56806f){if(_[_0xc67d('0x76')](_0x56806f)){if(_0x5f5309){_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]=_0x5f5309;}else{_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]=0x1;}}else{if(_[_0xc67d('0x76')](_0x5f5309)||_0x5f5309==_0x56806f){_0x557c75['body'][_0xc67d('0x70')]=_0x56806f+0x1;}else if(_0x5f5309>_0x56806f){_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]=_0x5f5309;}else{return db[_0xc67d('0x54')]['query'](_0xc67d('0x77'),{'type':db[_0xc67d('0x54')][_0xc67d('0x78')][_0xc67d('0x79')]})['then'](function(_0x21d824){if(_0x21d824&&_0x21d824[_0xc67d('0x4c')]){for(var _0x1ea2df=0x0,_0x5be008=_0x21d824[_0xc67d('0x4c')];_0x1ea2df<_0x5be008&&_[_0xc67d('0x76')](_0x557c75['body'][_0xc67d('0x70')]);_0x1ea2df++){if(_0x5f5309<=_0x21d824[_0x1ea2df]['from']){_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]=_0x21d824[_0x1ea2df]['from'];}else if(_0x5f5309>_0x21d824[_0x1ea2df][_0xc67d('0x7a')]&&_0x5f5309<=_0x21d824[_0x1ea2df]['to']){_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]=_0x5f5309;}}}if(_[_0xc67d('0x76')](_0x557c75[_0xc67d('0x61')]['internal'])){_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')]=_0x56806f+0x1;}});}}});}})[_0xc67d('0x20')](function(){if(_0x557c75[_0xc67d('0x61')]['voicemail']){_0x557c75[_0xc67d('0x61')][_0xc67d('0x7b')]=_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')];_0x557c75[_0xc67d('0x61')]['VoiceMail']={'mailbox':_0x557c75[_0xc67d('0x61')][_0xc67d('0x70')],'password':_0x557c75[_0xc67d('0x61')][_0xc67d('0x48')],'fullname':_0x557c75[_0xc67d('0x61')][_0xc67d('0x7c')],'email':_0x557c75[_0xc67d('0x61')][_0xc67d('0x7d')]};}if(_0x557c75[_0xc67d('0x61')]&&_0x557c75[_0xc67d('0x61')][_0xc67d('0x3f')]==='agent'){_0x557c75[_0xc67d('0x61')][_0xc67d('0x7e')]=[_0xc67d('0x7f'),_0xc67d('0x80'),_0xc67d('0x81'),_0xc67d('0x82'),_0xc67d('0x83'),'105',_0xc67d('0x84'),_0xc67d('0x85'),_0xc67d('0x86'),_0xc67d('0x87'),'100',_0xc67d('0x88')];}return db['User'][_0xc67d('0x6f')](_0x557c75[_0xc67d('0x61')],{'include':[{'model':db[_0xc67d('0x89')],'as':_0xc67d('0x89')}]});})['then'](function(_0x817aa2){if(_0x557c75[_0xc67d('0x61')]['role']===_0xc67d('0x35'))return _0x817aa2;var _0x431186=_0x557c75[_0xc67d('0x35')][_0xc67d('0x34')]({'plain':!![]});if(!_0x431186)throw new Error(_0xc67d('0x8a'));if(_0x431186['role']===_0xc67d('0x35')){var _0x31d3f0=_0x817aa2[_0xc67d('0x34')]({'plain':!![]});var _0x1f015a=[{'name':_0xc67d('0x36'),'value':_0xc67d('0x37')},{'name':'Telephones','value':_0xc67d('0x39')}];var _0x292d59=_[_0xc67d('0x40')](_0x1f015a,['value',_0x31d3f0['role']])[_0xc67d('0x41')];return db[_0xc67d('0x8b')][_0xc67d('0x40')]({'where':{'name':_0x292d59,'userProfileId':_0x431186['userProfileId']},'raw':!![]})[_0xc67d('0x20')](function(_0x5b8fec){if(_0x5b8fec&&_0x5b8fec[_0xc67d('0x8c')]===0x0){return db['UserProfileResource'][_0xc67d('0x6f')]({'name':_0x31d3f0[_0xc67d('0x41')],'resourceId':_0x31d3f0['id'],'type':_0x5b8fec[_0xc67d('0x41')],'sectionId':_0x5b8fec['id']},{})[_0xc67d('0x20')](function(){return _0x817aa2;});}else{return _0x817aa2;}})['catch'](function(_0x46b9b0){logger[_0xc67d('0x25')](_0xc67d('0x8d'),_0x46b9b0);throw _0x46b9b0;});}return _0x817aa2;})[_0xc67d('0x20')](respondWithResult(_0x3ef928,0xc9))[_0xc67d('0x5c')](handleError(_0x3ef928,null));};exports[_0xc67d('0x8e')]=function(_0x284239,_0x456cf2,_0x3d0800){var _0x5920cb=![];if(_0x284239[_0xc67d('0x61')]['id']){delete _0x284239['body']['id'];}if(!_[_0xc67d('0x76')](_0x284239['body']['oldPassword'])){if(_0x284239[_0xc67d('0x61')][_0xc67d('0x8f')]===_0x284239[_0xc67d('0x61')][_0xc67d('0x90')]){throw new Error(_0xc67d('0x91'));}}return db[_0xc67d('0x43')]['find']({'where':{'id':_0x284239[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](function(_0x59eec6){if(_0x59eec6){if(_0x59eec6['id']==_0x284239[_0xc67d('0x35')]['id']){if(!_0x284239[_0xc67d('0x61')][_0xc67d('0x8f')]||!_0x284239[_0xc67d('0x61')][_0xc67d('0x90')]){throw new db[(_0xc67d('0x92'))]['ValidationError'](_0xc67d('0x93'));}if(!_0x59eec6[_0xc67d('0x94')](_0x284239[_0xc67d('0x61')][_0xc67d('0x8f')])){throw new db['Sequelize'][(_0xc67d('0x95'))](_0xc67d('0x96'));}if(_0x284239[_0xc67d('0x61')][_0xc67d('0x8f')]==_0x284239['body'][_0xc67d('0x90')]){throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))]('New\x20password\x20must\x20be\x20different\x20from\x20old\x20password');}return _0x59eec6;}else if(_0x284239['user'][_0xc67d('0x3f')]==_0xc67d('0x67')){if(!_0x284239[_0xc67d('0x61')]['newPassword']){throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))]('Invalid\x20body\x20format.\x20Use\x20newPassword');}return _0x59eec6;}else if(_0x284239[_0xc67d('0x35')][_0xc67d('0x3f')]==_0xc67d('0x35')){if(!_0x284239[_0xc67d('0x61')]['newPassword']){throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))](_0xc67d('0x97'));}if(_0x59eec6[_0xc67d('0x3f')]!='agent'){throw new db[(_0xc67d('0x92'))]['ValidationError'](_0xc67d('0x98'));}return _0x59eec6;}else{throw new db['Sequelize'][(_0xc67d('0x95'))](_0xc67d('0x98'));}}return null;})['then'](handleEntityNotFound(_0x456cf2,null))[_0xc67d('0x20')](function(_0x240743){return db['Setting']['findOne']({'attributes':['id',_0xc67d('0x73')]})[_0xc67d('0x20')](function(_0x4c046e){_0x5920cb=_0x4c046e[_0xc67d('0x73')];return checkPasswordPattern(_0x240743,_0x284239['body']['newPassword'],_0x5920cb);});})[_0xc67d('0x20')](saveUpdates({'password':_0x284239[_0xc67d('0x61')]['newPassword'],'passwordResetAt':_0x284239[_0xc67d('0x35')]['id']==_0x284239[_0xc67d('0x5d')]['id']?moment():null},null))[_0xc67d('0x20')](respondWithResult(_0x456cf2,null))['catch'](handleError(_0x456cf2,null));};exports['addQueues']=function(_0x2c6d6e,_0x122be9,_0x1772d8){var _0x217b4e=_0x2c6d6e[_0xc67d('0x61')][_0xc67d('0x99')];return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0x2c6d6e[_0xc67d('0x5d')]['id']},'attributes':['id','name',_0xc67d('0x3f'),_0xc67d('0x9a'),_0xc67d('0x9b'),_0xc67d('0x9c'),'interface']})[_0xc67d('0x20')](handleEntityNotFound(_0x122be9,null))['then'](function(_0x161e72){if(_0x161e72){if(!utils[_0xc67d('0x9d')](_0x217b4e)){throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))](_0xc67d('0x9e'));}return _0x161e72[_0xc67d('0x9f')+_[_0xc67d('0xa0')](_0x217b4e[_0xc67d('0xa1')]())+_0xc67d('0xa2')](_0x2c6d6e[_0xc67d('0x61')][_0xc67d('0x64')],{'penalty':_0x2c6d6e[_0xc67d('0x61')][_0xc67d('0xa3')]||0x0})[_0xc67d('0xa4')](function(_0x4390c5){for(var _0x184e83=0x0;_0x184e83<_0x2c6d6e[_0xc67d('0x61')][_0xc67d('0x64')][_0xc67d('0x4c')];_0x184e83+=0x1){var _0xe61441={'UserId':_0x2c6d6e['params']['id']};_0xe61441[_[_0xc67d('0xa0')](_0x217b4e[_0xc67d('0xa1')]())+_0xc67d('0xa5')]=_0x2c6d6e[_0xc67d('0x61')][_0xc67d('0x64')][_0x184e83];socket['emit'](_0xc67d('0x35')+_['capitalize'](_0x217b4e[_0xc67d('0xa1')]())+'Queue:save',_0xe61441);}return _0x4390c5;})[_0xc67d('0x20')](function(){if(_0x217b4e==='voice'){return db['VoiceQueue']['findAll']({'where':{'id':_0x2c6d6e[_0xc67d('0x61')]['ids']||[]},'raw':!![],'attributes':['id',_0xc67d('0x41')]});}})[_0xc67d('0x20')](function(_0x5a825f){var _0x5f1ac9=_0x161e72[_0xc67d('0x34')]({'plain':!![]});var _0x219700=[];if(_0x217b4e===_0xc67d('0xa6')&&_0x5f1ac9[_0xc67d('0x3f')]===_0xc67d('0x37')&&_0x5f1ac9[_0xc67d('0x9a')]){for(var _0x275050=0x0;_0x275050<_0x5a825f['length'];_0x275050+=0x1){_0x219700[_0xc67d('0xa7')]({'membername':_0x5f1ac9['name'],'UserId':_0x5f1ac9['id'],'queue_name':_0x5a825f[_0x275050][_0xc67d('0x41')],'VoiceQueueId':_0x5a825f[_0x275050]['id'],'interface':_['isNil'](_0x5f1ac9[_0xc67d('0xa8')])?util[_0xc67d('0x6d')](_0xc67d('0xa9'),_0x5f1ac9[_0xc67d('0x41')]):_0x5f1ac9['interface'],'paused':_0x5f1ac9[_0xc67d('0x9c')]||![],'penalty':_0x2c6d6e[_0xc67d('0x61')][_0xc67d('0xa3')]||0x0});}return BPromise[_0xc67d('0xaa')](_0x219700,function(_0x2d644e){return db[_0xc67d('0xab')][_0xc67d('0xac')](_0x2d644e);});}return _0x161e72;});}})[_0xc67d('0x20')](respondWithStatusCode(_0x122be9,null))['catch'](handleError(_0x122be9,null));};exports[_0xc67d('0xad')]=function(_0x26826d,_0x2d46ed,_0x154915){var _0x426551;return db[_0xc67d('0x43')]['find']({'where':{'id':_0x26826d[_0xc67d('0x5d')]['id']},'attributes':['id','name',_0xc67d('0x3f')]})[_0xc67d('0x20')](handleEntityNotFound(_0x2d46ed,null))[_0xc67d('0x20')](function(_0x23185d){if(_0x23185d){_0x426551=_0x23185d;if(!_0x26826d[_0xc67d('0x49')][_0xc67d('0x99')]||!utils[_0xc67d('0x9d')](_0x26826d[_0xc67d('0x49')][_0xc67d('0x99')])){throw new db[(_0xc67d('0x92'))]['ValidationError'](_0xc67d('0x9e'));}return _0x23185d[_0xc67d('0xae')+_[_0xc67d('0xa0')](_0x26826d[_0xc67d('0x49')][_0xc67d('0x99')][_0xc67d('0xa1')]())+'Queues'](_0x26826d[_0xc67d('0x49')][_0xc67d('0x64')]);}})[_0xc67d('0x20')](function(_0x1d10ae){for(var _0x840c94=0x0;_0x840c94<_0x26826d['query'][_0xc67d('0x64')][_0xc67d('0x4c')];_0x840c94+=0x1){var _0x456057={'UserId':_0x26826d[_0xc67d('0x5d')]['id']};_0x456057[_['capitalize'](_0x26826d['query'][_0xc67d('0x99')][_0xc67d('0xa1')]())+_0xc67d('0xa5')]=_0x26826d[_0xc67d('0x49')]['ids'][_0x840c94];socket[_0xc67d('0xaf')](_0xc67d('0x35')+_[_0xc67d('0xa0')](_0x26826d[_0xc67d('0x49')][_0xc67d('0x99')][_0xc67d('0xa1')]())+_0xc67d('0xb0'),_0x456057);}return _0x1d10ae;})[_0xc67d('0x20')](function(){if(_0x26826d['query'][_0xc67d('0x99')]===_0xc67d('0xa6')){return db[_0xc67d('0xab')][_0xc67d('0x33')]({'where':{'UserId':_0x26826d['params']['id'],'VoiceQueueId':_0x26826d[_0xc67d('0x49')][_0xc67d('0x64')]},'individualHooks':!![]})[_0xc67d('0x20')](function(){return _0x426551;});}return _0x426551;})[_0xc67d('0x20')](respondWithStatusCode(_0x2d46ed,null))['catch'](handleError(_0x2d46ed,null));};exports[_0xc67d('0xb1')]=function(_0x5e4909,_0x4d2e98,_0x5799b9){_0x5e4909[_0xc67d('0x61')][_0xc67d('0xb2')]=_0x5e4909['file'][_0xc67d('0xb3')];return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0x5e4909[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x4d2e98,null))[_0xc67d('0x20')](saveUpdates(_0x5e4909[_0xc67d('0x61')],null))['then'](respondWithResult(_0x4d2e98,null))[_0xc67d('0x5c')](handleError(_0x4d2e98,null));};exports[_0xc67d('0xb4')]=function(_0x6f748c,_0x1c4e91,_0x5732d4){var _0x296c40=path[_0xc67d('0xb5')](config[_0xc67d('0xb6')],_0xc67d('0xb7'));return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0x6f748c[_0xc67d('0x5d')]['id']},'attributes':['id',_0xc67d('0xb2')],'raw':!![]})[_0xc67d('0x20')](handleEntityNotFound(_0x1c4e91,null))[_0xc67d('0x20')](function(_0x36c020){if(_0x36c020){if(_[_0xc67d('0x76')](_0x36c020[_0xc67d('0xb2')])){return _0x1c4e91[_0xc67d('0xb8')](_0x296c40);}else{if(!fs[_0xc67d('0xb9')](path['join'](config[_0xc67d('0xb6')],_0xc67d('0xba'),_0x36c020[_0xc67d('0xb2')]))){return _0x1c4e91['download'](_0x296c40);}return _0x1c4e91['download'](path[_0xc67d('0xb5')](config[_0xc67d('0xb6')],_0xc67d('0xba'),_0x36c020[_0xc67d('0xb2')]));}}})['catch'](handleError(_0x1c4e91,null));};exports['getContacts']=function(_0x423d1b,_0x3da4b0,_0x332cab){var _0x84b75d={};var _0x30a712={};var _0x2e93a8;var _0x111ef7;return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0x423d1b[_0xc67d('0x5d')]['id']}})['then'](handleEntityNotFound(_0x3da4b0,null))['then'](function(_0xf66044){if(_0xf66044){_0x2e93a8=_0xf66044;_0x30a712[_0xc67d('0x45')]=_[_0xc67d('0x47')](db[_0xc67d('0xbc')][_0xc67d('0x44')]);_0x30a712[_0xc67d('0x49')]=_['keys'](_0x423d1b['query']);_0x30a712['filters']=_[_0xc67d('0x5e')](_0x30a712[_0xc67d('0x45')],_0x30a712[_0xc67d('0x49')]);_0x84b75d[_0xc67d('0x4b')]=_['intersection'](_0x30a712[_0xc67d('0x45')],qs['fields'](_0x423d1b[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x84b75d['attributes']=_0x84b75d[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x84b75d[_0xc67d('0x4b')]:_0x30a712[_0xc67d('0x45')];_0x84b75d[_0xc67d('0xbd')]=qs[_0xc67d('0x4e')](_0x423d1b[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x84b75d[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0x423d1b[_0xc67d('0x49')],_0x30a712[_0xc67d('0x4a')]));if(_0x423d1b[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x84b75d[_0xc67d('0x4f')]=_['merge'](_0x84b75d['where'],{'$or':_[_0xc67d('0x3c')](_0x84b75d[_0xc67d('0x4b')],function(_0x2be6f2){var _0x43da09={};_0x43da09[_0x2be6f2]={'$like':'%'+_0x423d1b[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x43da09;})});}_0x84b75d=_['merge']({},_0x84b75d,_0x423d1b[_0xc67d('0x58')]);return _0x2e93a8[_0xc67d('0xbf')](_0x84b75d);}})[_0xc67d('0x20')](function(_0x481c21){if(_0x481c21){_0x111ef7=_0x481c21[_0xc67d('0x4c')];if(_0x423d1b[_0xc67d('0x49')][_0xc67d('0xc0')](_0xc67d('0x5a'))){_0x84b75d[_0xc67d('0x5b')]=[{'model':db['CmList'],'as':_0xc67d('0xc1'),'required':![]},{'model':db[_0xc67d('0xc2')],'as':_0xc67d('0xc3'),'attributes':['id',_0xc67d('0x41'),_0xc67d('0xc4')],'where':_0x423d1b[_0xc67d('0x49')]['tag']?{'id':_0x423d1b[_0xc67d('0x49')][_0xc67d('0xc5')]}:undefined,'required':_0x423d1b['query'][_0xc67d('0xc5')]?!![]:![]}];}if(!_0x423d1b[_0xc67d('0x49')][_0xc67d('0xc0')](_0xc67d('0x4d'))){_0x84b75d[_0xc67d('0x2c')]=qs[_0xc67d('0x2c')](_0x423d1b[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x84b75d[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0x423d1b[_0xc67d('0x49')][_0xc67d('0x2b')]);}return _0x2e93a8[_0xc67d('0xbf')](_0x84b75d);}})[_0xc67d('0x20')](function(_0x1fc831){if(_0x1fc831){return _0x1fc831?{'count':_0x111ef7,'rows':_0x1fc831}:null;}})[_0xc67d('0x20')](respondWithResult(_0x3da4b0,null))[_0xc67d('0x5c')](handleError(_0x3da4b0,null));};exports[_0xc67d('0xc6')]=function(_0x1c4a49,_0x507a66,_0xcf2d02){var _0x5ded81;var _0x128150;var _0x5e9772={};var _0xdcb9a5;return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0x1c4a49[_0xc67d('0x5d')]['id']},'attributes':['id',_0xc67d('0x41'),_0xc67d('0x3f')]})[_0xc67d('0x20')](handleEntityNotFound(_0x507a66,null))[_0xc67d('0x20')](function(_0x5b3375){if(!utils[_0xc67d('0x9d')](_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x99')])){throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))]('Unknown\x20channel');}_0x5ded81=_0x5b3375;var _0x3fb94e={};_0x3fb94e[_0xc67d('0x45')]=_[_0xc67d('0x47')](db[_[_0xc67d('0xa0')](_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x99')])+_0xc67d('0xc7')][_0xc67d('0x44')]);_0x3fb94e[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x1c4a49[_0xc67d('0x49')]);_0x3fb94e[_0xc67d('0x4a')]=_['intersection'](_0x3fb94e[_0xc67d('0x45')],_0x3fb94e[_0xc67d('0x49')]);_0x5e9772[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x3fb94e[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0x1c4a49[_0xc67d('0x49')]['fields']));_0x5e9772[_0xc67d('0x4b')]=_0x5e9772[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x5e9772[_0xc67d('0x4b')]:_0x3fb94e[_0xc67d('0x45')];_0x5e9772[_0xc67d('0xbd')]=qs['sort'](_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x5e9772[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_['pick'](_0x1c4a49[_0xc67d('0x49')],_0x3fb94e[_0xc67d('0x4a')]));if(_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x5e9772['where']=_['merge'](_0x5e9772[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x5e9772['attributes'],function(_0x2c57aa){var _0x2da06b={};_0x2da06b[_0x2c57aa]={'$like':'%'+_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x2da06b;})});}_0x5e9772=_[_0xc67d('0x50')]({},_0x5e9772,_0x1c4a49['options']);switch(_0x5ded81['role']){case'admin':return db[_['capitalize'](_0x1c4a49[_0xc67d('0x49')]['channel'])+_0xc67d('0xc7')][_0xc67d('0xc8')](_0x5e9772);case _0xc67d('0x35'):case _0xc67d('0x37'):return _0x5ded81['get'+_['capitalize'](_0x1c4a49['query'][_0xc67d('0x99')])+_0xc67d('0xa2')](_0x5e9772);default:throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))](_0xc67d('0xc9'));}})[_0xc67d('0x20')](function(_0x598006){_0xdcb9a5=_0x598006['length'];if(!_0x1c4a49[_0xc67d('0x49')][_0xc67d('0xc0')]('nolimit')){_0x5e9772['limit']=qs['limit'](_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x5e9772[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0x1c4a49[_0xc67d('0x49')]['offset']);}switch(_0x5ded81[_0xc67d('0x3f')]){case _0xc67d('0x67'):return db[_[_0xc67d('0xa0')](_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x99')])+_0xc67d('0xc7')][_0xc67d('0xc8')](_0x5e9772);case _0xc67d('0x35'):case'agent':return _0x5ded81[_0xc67d('0x34')+_[_0xc67d('0xa0')](_0x1c4a49[_0xc67d('0x49')][_0xc67d('0x99')])+_0xc67d('0xa2')](_0x5e9772);}})['then'](function(_0x4d5070){return{'count':_0xdcb9a5,'rows':_0x4d5070};})[_0xc67d('0x20')](respondWithResult(_0x507a66,null))[_0xc67d('0x5c')](handleError(_0x507a66,null));};exports['getVoiceQueuesRt']=function(_0x3b0093,_0x43a4e5,_0x2b5dca){var _0x163db2={};var _0x4d55b8={};var _0x438656;var _0x3ea234;return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0x3b0093[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x43a4e5,null))[_0xc67d('0x20')](function(_0x3d73dc){if(_0x3d73dc){_0x438656=_0x3d73dc;_0x4d55b8[_0xc67d('0x45')]=_['keys'](db['UserVoiceQueueRt'][_0xc67d('0x44')]);_0x4d55b8[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x3b0093[_0xc67d('0x49')]);_0x4d55b8[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x4d55b8[_0xc67d('0x45')],_0x4d55b8[_0xc67d('0x49')]);_0x163db2[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x4d55b8[_0xc67d('0x45')],qs['fields'](_0x3b0093['query']['fields']));_0x163db2['attributes']=_0x163db2[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x163db2[_0xc67d('0x4b')]:_0x4d55b8[_0xc67d('0x45')];_0x163db2[_0xc67d('0xbd')]=qs[_0xc67d('0x4e')](_0x3b0093[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x163db2[_0xc67d('0x4f')]=qs['filters'](_[_0xc67d('0xbe')](_0x3b0093[_0xc67d('0x49')],_0x4d55b8[_0xc67d('0x4a')]));if(_0x3b0093['query'][_0xc67d('0x3a')]){_0x163db2['where']=_[_0xc67d('0x50')](_0x163db2['where'],{'$or':_[_0xc67d('0x3c')](_0x163db2[_0xc67d('0x4b')],function(_0x1818f9){var _0x12cff2={};_0x12cff2[_0x1818f9]={'$like':'%'+_0x3b0093['query']['filter']+'%'};return _0x12cff2;})});}_0x163db2=_[_0xc67d('0x50')]({},_0x163db2,_0x3b0093['options']);return _0x438656[_0xc67d('0xca')](_0x163db2);}})[_0xc67d('0x20')](function(_0xddd632){if(_0xddd632){_0x3ea234=_0xddd632['length'];if(!_0x3b0093['query'][_0xc67d('0xc0')](_0xc67d('0x4d'))){_0x163db2['limit']=qs['limit'](_0x3b0093[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x163db2[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0x3b0093[_0xc67d('0x49')][_0xc67d('0x2b')]);}return _0x438656[_0xc67d('0xca')](_0x163db2);}})['then'](function(_0x12786d){if(_0x12786d){return _0x12786d?{'count':_0x3ea234,'rows':_0x12786d}:null;}})[_0xc67d('0x20')](respondWithResult(_0x43a4e5,null))[_0xc67d('0x5c')](handleError(_0x43a4e5,null));};exports[_0xc67d('0xcb')]=function(_0x3416b0,_0x2f2c09,_0x2710fd){var _0x2f1abd={};var _0x4b18a2={};var _0x153227;var _0x475d74;return db['User'][_0xc67d('0xbb')]({'where':{'id':_0x3416b0[_0xc67d('0x5d')]['id']}})['then'](handleEntityNotFound(_0x2f2c09,null))[_0xc67d('0x20')](function(_0x39a11e){if(_0x39a11e){_0x153227=_0x39a11e;_0x4b18a2[_0xc67d('0x45')]=_[_0xc67d('0x47')](db[_0xc67d('0xcc')][_0xc67d('0x44')]);_0x4b18a2[_0xc67d('0x49')]=_['keys'](_0x3416b0[_0xc67d('0x49')]);_0x4b18a2[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x4b18a2[_0xc67d('0x45')],_0x4b18a2[_0xc67d('0x49')]);_0x2f1abd['attributes']=_[_0xc67d('0x5e')](_0x4b18a2[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0x3416b0[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x2f1abd[_0xc67d('0x4b')]=_0x2f1abd[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x2f1abd[_0xc67d('0x4b')]:_0x4b18a2[_0xc67d('0x45')];_0x2f1abd['order']=qs['sort'](_0x3416b0[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x2f1abd[_0xc67d('0x4f')]=qs['filters'](_[_0xc67d('0xbe')](_0x3416b0[_0xc67d('0x49')],_0x4b18a2[_0xc67d('0x4a')]));if(_0x3416b0[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x2f1abd[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x2f1abd[_0xc67d('0x4f')],{'$or':_['map'](_0x2f1abd[_0xc67d('0x4b')],function(_0x53eaf8){var _0x397107={};_0x397107[_0x53eaf8]={'$like':'%'+_0x3416b0['query'][_0xc67d('0x3a')]+'%'};return _0x397107;})});}_0x2f1abd=_[_0xc67d('0x50')]({},_0x2f1abd,_0x3416b0[_0xc67d('0x58')]);return _0x153227['getGroups'](_0x2f1abd);}})[_0xc67d('0x20')](function(_0x2b1d83){if(_0x2b1d83){_0x475d74=_0x2b1d83[_0xc67d('0x4c')];if(!_0x3416b0[_0xc67d('0x49')][_0xc67d('0xc0')](_0xc67d('0x4d'))){_0x2f1abd[_0xc67d('0x2c')]=qs['limit'](_0x3416b0[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x2f1abd[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0x3416b0['query'][_0xc67d('0x2b')]);}return _0x153227[_0xc67d('0xcb')](_0x2f1abd);}})[_0xc67d('0x20')](function(_0x319240){if(_0x319240){return _0x319240?{'count':_0x475d74,'rows':_0x319240}:null;}})[_0xc67d('0x20')](respondWithResult(_0x2f2c09,null))['catch'](handleError(_0x2f2c09,null));};exports[_0xc67d('0xcd')]=function(_0x479940,_0xe7e92,_0xc18fd8){var _0x2ba26f={'raw':!![],'where':{}};var _0x1440ce={};var _0x2e3268={'count':0x0,'rows':[]};return db['User']['findOne']({'where':{'id':_0x479940[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0xe7e92,null))[_0xc67d('0x20')](function(_0x420168){if(_0x420168){_0x1440ce['model']=_['keys'](db[_0xc67d('0xce')]['rawAttributes']);_0x1440ce[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x479940[_0xc67d('0x49')]);_0x1440ce[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x1440ce[_0xc67d('0x45')],_0x1440ce[_0xc67d('0x49')]);_0x2ba26f['attributes']=_[_0xc67d('0x5e')](_0x1440ce['model'],qs['fields'](_0x479940[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x2ba26f[_0xc67d('0x4b')]=_0x2ba26f[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x2ba26f[_0xc67d('0x4b')]:_0x1440ce[_0xc67d('0x45')];if(!_0x479940[_0xc67d('0x49')][_0xc67d('0xc0')]('nolimit')){_0x2ba26f[_0xc67d('0x2c')]=qs['limit'](_0x479940['query'][_0xc67d('0x2c')]);_0x2ba26f[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0x479940[_0xc67d('0x49')]['offset']);}_0x2ba26f['order']=qs[_0xc67d('0x4e')](_0x479940['query']['sort']);_0x2ba26f[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0x479940['query'],_0x1440ce[_0xc67d('0x4a')]));_0x2ba26f[_0xc67d('0x4f')][_0xc67d('0xcf')]=_0x420168['id'];if(_0x479940[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x2ba26f['where']=_[_0xc67d('0x50')](_0x2ba26f[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x2ba26f[_0xc67d('0x4b')],function(_0x703aec){var _0x3c251d={};_0x3c251d[_0x703aec]={'$like':'%'+_0x479940['query']['filter']+'%'};return _0x3c251d;})});}_0x2ba26f=_[_0xc67d('0x50')]({},_0x2ba26f,_0x479940[_0xc67d('0x58')]);return db[_0xc67d('0xce')][_0xc67d('0x59')]({'where':_0x2ba26f[_0xc67d('0x4f')]})[_0xc67d('0x20')](function(_0x34050f){_0x2e3268[_0xc67d('0x59')]=_0x34050f;if(_0x479940['query'][_0xc67d('0x5a')]){_0x2ba26f[_0xc67d('0x5b')]=[{'all':!![]}];}return db[_0xc67d('0xce')][_0xc67d('0xc8')](_0x2ba26f);})[_0xc67d('0x20')](function(_0x4c8570){_0x2e3268[_0xc67d('0xd0')]=_0x4c8570;return _0x2e3268;});}})[_0xc67d('0x20')](respondWithFilteredResult(_0xe7e92,_0x2ba26f))[_0xc67d('0x5c')](handleError(_0xe7e92,null));};exports[_0xc67d('0xd1')]=function(_0x5a5242,_0x28d93d,_0x4ed386){var _0x695426={'raw':!![],'where':{}};var _0x4f8b50={};var _0x173c13={'count':0x0,'rows':[]};return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0x5a5242[_0xc67d('0x5d')]['id']}})['then'](handleEntityNotFound(_0x28d93d,null))[_0xc67d('0x20')](function(_0x216f36){if(_0x216f36){_0x4f8b50[_0xc67d('0x45')]=_[_0xc67d('0x47')](db['ScreenRecording']['rawAttributes']);_0x4f8b50['query']=_[_0xc67d('0x47')](_0x5a5242['query']);_0x4f8b50[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x4f8b50[_0xc67d('0x45')],_0x4f8b50[_0xc67d('0x49')]);_0x695426[_0xc67d('0x4b')]=_['intersection'](_0x4f8b50[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0x5a5242[_0xc67d('0x49')]['fields']));_0x695426[_0xc67d('0x4b')]=_0x695426[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x695426['attributes']:_0x4f8b50[_0xc67d('0x45')];if(!_0x5a5242[_0xc67d('0x49')]['hasOwnProperty'](_0xc67d('0x4d'))){_0x695426[_0xc67d('0x2c')]=qs[_0xc67d('0x2c')](_0x5a5242['query'][_0xc67d('0x2c')]);_0x695426['offset']=qs['offset'](_0x5a5242['query']['offset']);}_0x695426['order']=qs[_0xc67d('0x4e')](_0x5a5242['query'][_0xc67d('0x4e')]);_0x695426[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0x5a5242[_0xc67d('0x49')],_0x4f8b50[_0xc67d('0x4a')]));_0x695426['where'][_0xc67d('0xcf')]=_0x216f36['id'];if(_0x5a5242['query'][_0xc67d('0x3a')]){_0x695426[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x695426[_0xc67d('0x4f')],{'$or':_['map'](_0x695426[_0xc67d('0x4b')],function(_0x2690a1){var _0x435fcd={};_0x435fcd[_0x2690a1]={'$like':'%'+_0x5a5242[_0xc67d('0x49')]['filter']+'%'};return _0x435fcd;})});}_0x695426=_[_0xc67d('0x50')]({},_0x695426,_0x5a5242['options']);return db[_0xc67d('0xd2')][_0xc67d('0x59')]({'where':_0x695426[_0xc67d('0x4f')]})['then'](function(_0x33b749){_0x173c13[_0xc67d('0x59')]=_0x33b749;if(_0x5a5242['query']['includeAll']){_0x695426['include']=[{'all':!![]}];}return db[_0xc67d('0xd2')]['findAll'](_0x695426);})['then'](function(_0x5a5625){_0x173c13[_0xc67d('0xd0')]=_0x5a5625;return _0x173c13;});}})[_0xc67d('0x20')](respondWithFilteredResult(_0x28d93d,_0x695426))[_0xc67d('0x5c')](handleError(_0x28d93d,null));};exports[_0xc67d('0xd3')]=function(_0xb6706a,_0x970387,_0x4d9cd4){var _0x425d6a={};var _0x32c5c3={};var _0x363112;var _0x1cc904;return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0xb6706a[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x970387,null))[_0xc67d('0x20')](function(_0x18f9d7){if(_0x18f9d7){_0x363112=_0x18f9d7;_0x32c5c3[_0xc67d('0x45')]=_['keys'](db[_0xc67d('0xd4')][_0xc67d('0x44')]);_0x32c5c3[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0xb6706a[_0xc67d('0x49')]);_0x32c5c3[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x32c5c3[_0xc67d('0x45')],_0x32c5c3[_0xc67d('0x49')]);_0x425d6a[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x32c5c3[_0xc67d('0x45')],qs['fields'](_0xb6706a[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x425d6a[_0xc67d('0x4b')]=_0x425d6a[_0xc67d('0x4b')]['length']?_0x425d6a[_0xc67d('0x4b')]:_0x32c5c3[_0xc67d('0x45')];_0x425d6a[_0xc67d('0xbd')]=qs[_0xc67d('0x4e')](_0xb6706a[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x425d6a[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0xb6706a[_0xc67d('0x49')],_0x32c5c3[_0xc67d('0x4a')]));if(_0xb6706a[_0xc67d('0x49')]['filter']){_0x425d6a[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x425d6a[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x425d6a[_0xc67d('0x4b')],function(_0x450d22){var _0x4379c9={};_0x4379c9[_0x450d22]={'$like':'%'+_0xb6706a['query'][_0xc67d('0x3a')]+'%'};return _0x4379c9;})});}_0x425d6a=_[_0xc67d('0x50')]({},_0x425d6a,_0xb6706a[_0xc67d('0x58')]);return _0x363112[_0xc67d('0xd3')](_0x425d6a);}})[_0xc67d('0x20')](function(_0x5bd294){if(_0x5bd294){_0x1cc904=_0x5bd294[_0xc67d('0x4c')];if(!_0xb6706a[_0xc67d('0x49')]['hasOwnProperty'](_0xc67d('0x4d'))){_0x425d6a['limit']=qs[_0xc67d('0x2c')](_0xb6706a[_0xc67d('0x49')]['limit']);_0x425d6a[_0xc67d('0x2b')]=qs['offset'](_0xb6706a[_0xc67d('0x49')][_0xc67d('0x2b')]);}return _0x363112[_0xc67d('0xd3')](_0x425d6a);}})[_0xc67d('0x20')](function(_0x5a7ae4){if(_0x5a7ae4){return _0x5a7ae4?{'count':_0x1cc904,'rows':_0x5a7ae4}:null;}})[_0xc67d('0x20')](respondWithResult(_0x970387,null))[_0xc67d('0x5c')](handleError(_0x970387,null));};exports[_0xc67d('0xd5')]=function(_0x65d9d2,_0x4567a2,_0x588f6c){var _0x193ea9={};var _0xc0e4b7={};var _0x264235;var _0xf17cb;return db['User'][_0xc67d('0xbb')]({'where':{'id':_0x65d9d2[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x4567a2,null))['then'](function(_0x458b83){if(_0x458b83){_0x264235=_0x458b83;_0xc0e4b7[_0xc67d('0x45')]=_[_0xc67d('0x47')](db[_0xc67d('0xd6')][_0xc67d('0x44')]);_0xc0e4b7[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x65d9d2[_0xc67d('0x49')]);_0xc0e4b7['filters']=_[_0xc67d('0x5e')](_0xc0e4b7[_0xc67d('0x45')],_0xc0e4b7[_0xc67d('0x49')]);_0x193ea9[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0xc0e4b7['model'],qs[_0xc67d('0x5f')](_0x65d9d2['query'][_0xc67d('0x5f')]));_0x193ea9[_0xc67d('0x4b')]=_0x193ea9[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x193ea9[_0xc67d('0x4b')]:_0xc0e4b7[_0xc67d('0x45')];_0x193ea9[_0xc67d('0xbd')]=qs[_0xc67d('0x4e')](_0x65d9d2[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x193ea9['where']=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0x65d9d2[_0xc67d('0x49')],_0xc0e4b7['filters']));if(_0x65d9d2[_0xc67d('0x49')]['filter']){_0x193ea9[_0xc67d('0x4f')]=_['merge'](_0x193ea9[_0xc67d('0x4f')],{'$or':_['map'](_0x193ea9[_0xc67d('0x4b')],function(_0x1127a5){var _0xa6e208={};_0xa6e208[_0x1127a5]={'$like':'%'+_0x65d9d2[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0xa6e208;})});}_0x193ea9=_['merge']({},_0x193ea9,_0x65d9d2['options']);return _0x264235[_0xc67d('0xd5')](_0x193ea9);}})[_0xc67d('0x20')](function(_0x36d427){if(_0x36d427){_0xf17cb=_0x36d427[_0xc67d('0x4c')];if(!_0x65d9d2['query']['hasOwnProperty'](_0xc67d('0x4d'))){_0x193ea9[_0xc67d('0x2c')]=qs[_0xc67d('0x2c')](_0x65d9d2[_0xc67d('0x49')]['limit']);_0x193ea9['offset']=qs[_0xc67d('0x2b')](_0x65d9d2[_0xc67d('0x49')][_0xc67d('0x2b')]);}return _0x264235['getOpenchannelInteractions'](_0x193ea9);}})['then'](function(_0x433383){if(_0x433383){return _0x433383?{'count':_0xf17cb,'rows':_0x433383}:null;}})[_0xc67d('0x20')](respondWithResult(_0x4567a2,null))['catch'](handleError(_0x4567a2,null));};exports[_0xc67d('0xd7')]=function(_0x319450,_0x478bac,_0x8b7bb2){var _0x10f1a9={'raw':!![],'where':{}};var _0x3e678a={};var _0x3a69bc={'count':0x0,'rows':[]};return db[_0xc67d('0x43')]['findOne']({'where':{'id':_0x319450[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x478bac,null))[_0xc67d('0x20')](function(_0x217b6b){if(_0x217b6b){_0x3e678a[_0xc67d('0x45')]=_[_0xc67d('0x47')](db[_0xc67d('0xd8')][_0xc67d('0x44')]);_0x3e678a[_0xc67d('0x49')]=_['keys'](_0x319450[_0xc67d('0x49')]);_0x3e678a[_0xc67d('0x4a')]=_['intersection'](_0x3e678a[_0xc67d('0x45')],_0x3e678a['query']);_0x10f1a9[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x3e678a['model'],qs[_0xc67d('0x5f')](_0x319450[_0xc67d('0x49')]['fields']));_0x10f1a9[_0xc67d('0x4b')]=_0x10f1a9['attributes'][_0xc67d('0x4c')]?_0x10f1a9[_0xc67d('0x4b')]:_0x3e678a[_0xc67d('0x45')];if(!_0x319450[_0xc67d('0x49')]['hasOwnProperty'](_0xc67d('0x4d'))){_0x10f1a9[_0xc67d('0x2c')]=qs['limit'](_0x319450[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x10f1a9[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0x319450['query']['offset']);}_0x10f1a9[_0xc67d('0xbd')]=qs['sort'](_0x319450['query']['sort']);_0x10f1a9[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_['pick'](_0x319450[_0xc67d('0x49')],_0x3e678a[_0xc67d('0x4a')]));_0x10f1a9['where'][_0xc67d('0xcf')]=_0x217b6b['id'];if(_0x319450['query'][_0xc67d('0x3a')]){_0x10f1a9[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x10f1a9[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x10f1a9[_0xc67d('0x4b')],function(_0x43685b){var _0x581446={};_0x581446[_0x43685b]={'$like':'%'+_0x319450[_0xc67d('0x49')]['filter']+'%'};return _0x581446;})});}_0x10f1a9=_[_0xc67d('0x50')]({},_0x10f1a9,_0x319450[_0xc67d('0x58')]);return db['MailInteraction'][_0xc67d('0x59')]({'where':_0x10f1a9['where']})['then'](function(_0x235576){_0x3a69bc['count']=_0x235576;if(_0x319450[_0xc67d('0x49')][_0xc67d('0x5a')]){_0x10f1a9[_0xc67d('0x5b')]=[{'all':!![]}];}return db[_0xc67d('0xd8')][_0xc67d('0xc8')](_0x10f1a9);})[_0xc67d('0x20')](function(_0x2929d2){_0x3a69bc['rows']=_0x2929d2;return _0x3a69bc;});}})[_0xc67d('0x20')](respondWithFilteredResult(_0x478bac,_0x10f1a9))[_0xc67d('0x5c')](handleError(_0x478bac,null));};exports[_0xc67d('0xd9')]=function(_0x182151,_0x14d707,_0x26830b){var _0x3dcb04={};var _0x35224e={};var _0x56229e;var _0x351f16;return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0x182151[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x14d707,null))[_0xc67d('0x20')](function(_0x289be4){if(_0x289be4){_0x56229e=_0x289be4;_0x35224e[_0xc67d('0x45')]=_[_0xc67d('0x47')](db['SmsInteraction'][_0xc67d('0x44')]);_0x35224e[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x182151[_0xc67d('0x49')]);_0x35224e['filters']=_[_0xc67d('0x5e')](_0x35224e[_0xc67d('0x45')],_0x35224e[_0xc67d('0x49')]);_0x3dcb04['attributes']=_['intersection'](_0x35224e[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0x182151[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x3dcb04[_0xc67d('0x4b')]=_0x3dcb04[_0xc67d('0x4b')]['length']?_0x3dcb04[_0xc67d('0x4b')]:_0x35224e['model'];_0x3dcb04['order']=qs[_0xc67d('0x4e')](_0x182151[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x3dcb04[_0xc67d('0x4f')]=qs['filters'](_[_0xc67d('0xbe')](_0x182151[_0xc67d('0x49')],_0x35224e[_0xc67d('0x4a')]));if(_0x182151[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x3dcb04[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x3dcb04[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x3dcb04[_0xc67d('0x4b')],function(_0x4a0780){var _0x2e3179={};_0x2e3179[_0x4a0780]={'$like':'%'+_0x182151[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x2e3179;})});}_0x3dcb04=_[_0xc67d('0x50')]({},_0x3dcb04,_0x182151[_0xc67d('0x58')]);return _0x56229e[_0xc67d('0xd9')](_0x3dcb04);}})['then'](function(_0x4f3a91){if(_0x4f3a91){_0x351f16=_0x4f3a91[_0xc67d('0x4c')];if(!_0x182151['query'][_0xc67d('0xc0')](_0xc67d('0x4d'))){_0x3dcb04[_0xc67d('0x2c')]=qs['limit'](_0x182151[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x3dcb04['offset']=qs[_0xc67d('0x2b')](_0x182151['query']['offset']);}return _0x56229e[_0xc67d('0xd9')](_0x3dcb04);}})[_0xc67d('0x20')](function(_0x227c93){if(_0x227c93){return _0x227c93?{'count':_0x351f16,'rows':_0x227c93}:null;}})[_0xc67d('0x20')](respondWithResult(_0x14d707,null))[_0xc67d('0x5c')](handleError(_0x14d707,null));};exports[_0xc67d('0xda')]=function(_0x2dd7d5,_0x439b3d,_0x544787){var _0x1a218b={};var _0x2f5103={};var _0x316bc2;var _0x451d58;return db['User'][_0xc67d('0xbb')]({'where':{'id':_0x2dd7d5[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x439b3d,null))[_0xc67d('0x20')](function(_0x5a4d74){if(_0x5a4d74){_0x316bc2=_0x5a4d74;_0x2f5103[_0xc67d('0x45')]=_[_0xc67d('0x47')](db['FaxInteraction'][_0xc67d('0x44')]);_0x2f5103[_0xc67d('0x49')]=_['keys'](_0x2dd7d5[_0xc67d('0x49')]);_0x2f5103[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x2f5103[_0xc67d('0x45')],_0x2f5103[_0xc67d('0x49')]);_0x1a218b[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x2f5103['model'],qs[_0xc67d('0x5f')](_0x2dd7d5[_0xc67d('0x49')]['fields']));_0x1a218b[_0xc67d('0x4b')]=_0x1a218b[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x1a218b[_0xc67d('0x4b')]:_0x2f5103[_0xc67d('0x45')];_0x1a218b['order']=qs['sort'](_0x2dd7d5[_0xc67d('0x49')][_0xc67d('0x4e')]);_0x1a218b[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0x2dd7d5[_0xc67d('0x49')],_0x2f5103[_0xc67d('0x4a')]));if(_0x2dd7d5[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x1a218b['where']=_[_0xc67d('0x50')](_0x1a218b[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x1a218b[_0xc67d('0x4b')],function(_0x5480f1){var _0x2f314e={};_0x2f314e[_0x5480f1]={'$like':'%'+_0x2dd7d5[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x2f314e;})});}_0x1a218b=_[_0xc67d('0x50')]({},_0x1a218b,_0x2dd7d5['options']);return _0x316bc2[_0xc67d('0xda')](_0x1a218b);}})[_0xc67d('0x20')](function(_0x25a369){if(_0x25a369){_0x451d58=_0x25a369['length'];if(!_0x2dd7d5[_0xc67d('0x49')]['hasOwnProperty'](_0xc67d('0x4d'))){_0x1a218b[_0xc67d('0x2c')]=qs[_0xc67d('0x2c')](_0x2dd7d5['query']['limit']);_0x1a218b[_0xc67d('0x2b')]=qs['offset'](_0x2dd7d5[_0xc67d('0x49')][_0xc67d('0x2b')]);}return _0x316bc2['getFaxInteractions'](_0x1a218b);}})['then'](function(_0x545674){if(_0x545674){return _0x545674?{'count':_0x451d58,'rows':_0x545674}:null;}})['then'](respondWithResult(_0x439b3d,null))[_0xc67d('0x5c')](handleError(_0x439b3d,null));};exports['login']=function(_0x5c8b36,_0x11b3a5,_0x5699de){var _0x56cb96;var _0x35f629;var _0x3cb001;var _0x2fd65d=!_[_0xc67d('0x76')](_0x5c8b36[_0xc67d('0x5d')]['id'])?_0x5c8b36[_0xc67d('0x5d')]['id']:!_[_0xc67d('0x76')](_0x5c8b36[_0xc67d('0x35')]['id'])?_0x5c8b36[_0xc67d('0x35')]['id']:null;return db['User'][_0xc67d('0x40')]({'where':{'id':_0x2fd65d,'role':_0xc67d('0x37')},'attributes':['id',_0xc67d('0x41'),_0xc67d('0xdb'),_0xc67d('0xdc'),'role',_0xc67d('0x70'),'loginInPause']})[_0xc67d('0x20')](handleEntityNotFound(_0x11b3a5,null))[_0xc67d('0x20')](function(_0x31a2a0){if(_0x31a2a0){_0x56cb96=_0x31a2a0;if(_0x5c8b36[_0xc67d('0x61')][_0xc67d('0xa8')]){_0x3cb001=util[_0xc67d('0x6d')](_0xc67d('0xdd'),_0x56cb96[_0x5c8b36[_0xc67d('0x61')][_0xc67d('0xa8')]]);}else if(_0x5c8b36[_0xc67d('0x61')][_0xc67d('0xde')]){_0x3cb001=util[_0xc67d('0x6d')](_0xc67d('0xa9'),_0x5c8b36['body'][_0xc67d('0xde')]);}else{_0x3cb001=util['format'](_0xc67d('0xa9'),_0x56cb96[_0xc67d('0x41')]);}socket['to'](util[_0xc67d('0x6d')](_0xc67d('0xdf'),_0x56cb96[_0xc67d('0x41')]))['emit'](_0xc67d('0xe0'),{'ip':_0x5c8b36[_0xc67d('0xe1')][_0xc67d('0xe2')]||_0x5c8b36[_0xc67d('0xe3')][_0xc67d('0xe4')]||_0x5c8b36[_0xc67d('0xe5')]['remoteAddress']||_0x5c8b36[_0xc67d('0xe3')]['socket'][_0xc67d('0xe4')]});return db[_0xc67d('0xab')][_0xc67d('0x33')]({'where':{'membername':_0x56cb96[_0xc67d('0x41')]},'individualHooks':!![]});}})[_0xc67d('0x20')](function(_0x341b2e){if(_0x56cb96){return _0x56cb96[_0xc67d('0xe6')]({'raw':!![]});}})[_0xc67d('0x20')](function(_0x2b58f1){var _0x48ae05=[];if(_0x2b58f1){_0x35f629=_0x2b58f1;if(_0x35f629['length']){for(var _0x641ab2=0x0;_0x641ab2<_0x35f629['length'];_0x641ab2++){_0x48ae05[_0xc67d('0xa7')]({'membername':_0x56cb96[_0xc67d('0x41')],'UserId':_0x56cb96['id'],'queue_name':_0x35f629[_0x641ab2][_0xc67d('0x41')],'VoiceQueueId':_0x35f629[_0x641ab2]['id'],'interface':_0x3cb001,'paused':_0x56cb96[_0xc67d('0x9b')]||![],'penalty':_0x35f629[_0x641ab2][_0xc67d('0xe7')]||0x0});}return BPromise[_0xc67d('0xaa')](_0x48ae05,function(_0x131a33){return db[_0xc67d('0xab')][_0xc67d('0xac')](_0x131a33);});}}})[_0xc67d('0x20')](function(){return db['MemberReport']['findAll']({'where':{'membername':_0x56cb96[_0xc67d('0x41')],'exitAt':null}});})['then'](function(_0x23fbf3){var _0x412ef4=[];_0x23fbf3[_0xc67d('0xe8')](function(_0x123d90){_0x412ef4[_0xc67d('0xa7')](_0x123d90[_0xc67d('0x32')]({'exitAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9'))}));});return BPromise['all'](_0x412ef4);})['then'](function(){var _0xcda55a=[];var _0x5df1ea=[];var _0x508fd1=utils[_0xc67d('0xea')]();var _0x498712={'membername':_0x56cb96[_0xc67d('0x41')],'interface':_0x3cb001,'enterAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9')),'role':_0x56cb96[_0xc67d('0x3f')],'internal':_0x56cb96['internal']};_0x508fd1[_0xc67d('0xe8')](function(_0x21b20d){_0xcda55a['push'](_[_0xc67d('0x50')]({'channel':_0x21b20d,'type':'LOGIN','data1':_0x5c8b36['body'][_0xc67d('0xeb')],'data2':_0x3cb001},_0x498712));if(_0x56cb96['loginInPause']){_0x5df1ea[_0xc67d('0xa7')](_[_0xc67d('0x50')]({'channel':_0x21b20d,'type':'PAUSE','data1':'LOGININPAUSE'},_0x498712));}});return db[_0xc67d('0xec')][_0xc67d('0x60')](_0xcda55a['concat'](_0x5df1ea),{'individualHooks':!![]});})['then'](function(){return _0x56cb96[_0xc67d('0x32')]({'online':!![],'lastLoginAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9')),'voicePause':_0x56cb96[_0xc67d('0x9b')]||![],'mailPause':_0x56cb96[_0xc67d('0x9b')]||![],'chatPause':_0x56cb96['loginInPause']||![],'faxPause':_0x56cb96['loginInPause']||![],'smsPause':_0x56cb96[_0xc67d('0x9b')]||![],'openchannelPause':_0x56cb96[_0xc67d('0x9b')]||![],'pauseType':_0x56cb96[_0xc67d('0x9b')]?_0xc67d('0xed'):null,'interface':_0x3cb001,'lastPauseAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9'))});})[_0xc67d('0x20')](function(_0x394b88){if(_0x5c8b36['isMiddleware']){return _0x5699de();}else{return BPromise[_0xc67d('0xee')](_0x394b88)[_0xc67d('0x20')](respondWithResult(_0x11b3a5,null));}})['catch'](handleError(_0x11b3a5,null));};exports['logout']=function(_0xf36230,_0x3661bd,_0x57c5da){var _0x5069b1;return db['User'][_0xc67d('0x40')]({'where':{'id':_0xf36230[_0xc67d('0x5d')]['id'],'role':_0xc67d('0x37')},'attributes':['id',_0xc67d('0x41'),'role']})[_0xc67d('0x20')](handleEntityNotFound(_0x3661bd,null))[_0xc67d('0x20')](function(_0x5641cc){if(_0x5641cc){_0x5069b1=_0x5641cc;return db[_0xc67d('0xab')][_0xc67d('0x33')]({'where':{'membername':_0x5069b1['name']},'individualHooks':!![]});}})[_0xc67d('0x20')](function(){return db[_0xc67d('0xec')][_0xc67d('0xc8')]({'where':{'membername':_0x5069b1['name'],'exitAt':null}});})[_0xc67d('0x20')](function(_0x1bddea){var _0x40f3bb=[];_0x1bddea[_0xc67d('0xe8')](function(_0x2ae8dd){_0x40f3bb['push'](_0x2ae8dd[_0xc67d('0x32')]({'exitAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9'))}));});return BPromise[_0xc67d('0xef')](_0x40f3bb);})[_0xc67d('0x20')](function(){return _0x5069b1['update']({'online':![],'lastLoginAt':null,'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'interface':null});})['then'](respondWithResult(_0x3661bd,null))['catch'](handleError(_0x3661bd,null));};exports[_0xc67d('0xf0')]=function(_0x52a0e7,_0x3dfaec,_0x16c9ea){var _0x25797c;return db[_0xc67d('0xab')][_0xc67d('0x32')]({'paused':0x1},{'where':{'UserId':_0x52a0e7['params']['id']},'individualHooks':!![]})[_0xc67d('0x20')](function(){return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0x52a0e7[_0xc67d('0x5d')]['id'],'role':_0xc67d('0x37')},'attributes':['id',_0xc67d('0x41'),_0xc67d('0x3f'),_0xc67d('0x70'),_0xc67d('0xa8')]});})[_0xc67d('0x20')](handleEntityNotFound(_0x3dfaec,null))[_0xc67d('0x20')](function(_0x4a154c){if(_0x4a154c){_0x25797c=_0x4a154c;return respondWithRpcPromise(_0xc67d('0xf1'),'pause',{'id':_0x25797c['id'],'name':_0x25797c[_0xc67d('0x41')],'pause':!![]});}})['then'](function(){if(_0x25797c){return db[_0xc67d('0xec')]['findAll']({'where':{'membername':_0x25797c[_0xc67d('0x41')],'type':_0xc67d('0xf2'),'exitAt':null}});}})[_0xc67d('0x20')](function(_0x70aff3){if(_0x70aff3[_0xc67d('0x4c')]){var _0xe581c9=moment()[_0xc67d('0x6d')](_0xc67d('0xe9'));for(var _0x508d86=0x0,_0x4d3f9f=_0x70aff3[_0xc67d('0x4c')];_0x508d86<_0x4d3f9f;_0x508d86++){_0x70aff3[_0x508d86][_0xc67d('0xf3')]({'exitAt':_0xe581c9});}}})[_0xc67d('0x20')](function(){var _0xdedf7a=[];var _0x3c9e1d=utils['getChannels']();_0x3c9e1d[_0xc67d('0xe8')](function(_0x205cd0){_0xdedf7a[_0xc67d('0xa7')]({'channel':_0x205cd0,'membername':_0x25797c['name'],'interface':_['isNil'](_0x25797c['interface'])?util['format'](_0xc67d('0xa9'),_0x25797c['name']):_0x25797c['interface'],'type':_0xc67d('0xf2'),'enterAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9')),'data1':_0x52a0e7[_0xc67d('0x61')]['type']||_0xc67d('0xf4'),'role':_0x25797c[_0xc67d('0x3f')],'internal':_0x25797c['internal']});});return db['MemberReport'][_0xc67d('0x60')](_0xdedf7a,{'individualHooks':!![]});})[_0xc67d('0x20')](function(){return _0x25797c['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'pauseType':_0x52a0e7[_0xc67d('0x61')]['type']||_0xc67d('0xf4'),'lastPauseAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9'))});})['then'](respondWithResult(_0x3dfaec,null))[_0xc67d('0x5c')](handleError(_0x3dfaec,null));};exports[_0xc67d('0xf5')]=function(_0x4b4f43,_0x5ef4ae,_0x538cac){var _0x22ac0f;return db['User']['find']({'where':{'id':_0x4b4f43[_0xc67d('0x5d')]['id']},'attributes':['id',_0xc67d('0x41'),_0xc67d('0x3f'),_0xc67d('0x9c'),_0xc67d('0xf6'),_0xc67d('0xf7'),_0xc67d('0xf8'),_0xc67d('0xf9'),'smsPause','pauseType',_0xc67d('0xfa')]})[_0xc67d('0x20')](handleEntityNotFound(_0x5ef4ae,null))[_0xc67d('0x20')](function(_0x1dbc2a){if(_0x1dbc2a){_0x22ac0f=_0x1dbc2a;if(_0x4b4f43[_0xc67d('0x61')]['channel']&&!utils['isValidChannel'](_0x4b4f43[_0xc67d('0x61')][_0xc67d('0x99')])){throw new db[(_0xc67d('0x92'))][(_0xc67d('0x95'))](_0xc67d('0x9e'));}switch(_0x4b4f43[_0xc67d('0x61')][_0xc67d('0x99')]){case _0xc67d('0xa6'):return respondWithRpcPromise(_0xc67d('0xf1'),'unpause',{'id':_0x22ac0f['id'],'name':_0x22ac0f[_0xc67d('0x41')],'pause':![]})['then'](function(){return db['UserVoiceQueueRt'][_0xc67d('0x32')]({'paused':0x0},{'where':{'UserId':_0x22ac0f['id']},'individualHooks':!![]});})[_0xc67d('0x20')](function(){return db[_0xc67d('0xec')][_0xc67d('0x40')]({'where':{'channel':_0x4b4f43[_0xc67d('0x61')][_0xc67d('0x99')],'membername':_0x22ac0f[_0xc67d('0x41')],'type':_0xc67d('0xf2'),'exitAt':null}});})[_0xc67d('0x20')](function(_0x3de5db){if(_0x3de5db){return _0x3de5db['update']({'exitAt':moment()[_0xc67d('0x6d')](_0xc67d('0xe9')),'data2':_0xc67d('0xfb')},{'individualHooks':!![]});}return null;})[_0xc67d('0x20')](function(){return _0x22ac0f[_0xc67d('0x32')]({'voicePause':![]});});case _0xc67d('0xfc'):case _0xc67d('0xfd'):case _0xc67d('0xfe'):case _0xc67d('0xff'):case _0xc67d('0x100'):return db[_0xc67d('0xec')][_0xc67d('0x40')]({'where':{'channel':_0x4b4f43[_0xc67d('0x61')][_0xc67d('0x99')],'membername':_0x22ac0f[_0xc67d('0x41')],'type':_0xc67d('0xf2'),'exitAt':null}})['then'](function(_0x2f96e5){if(_0x2f96e5){return _0x2f96e5[_0xc67d('0x32')]({'exitAt':moment()['format'](_0xc67d('0xe9')),'data2':_0xc67d('0xfb')},{'individualHooks':!![]});}return null;})[_0xc67d('0x20')](function(){var _0x2eee4f={};_[_0xc67d('0x2d')](_0x2eee4f,util[_0xc67d('0x6d')](_0xc67d('0x101'),_0x4b4f43[_0xc67d('0x61')][_0xc67d('0x99')],'Pause'),![]);return _0x22ac0f[_0xc67d('0x32')](_0x2eee4f);});default:return respondWithRpcPromise(_0xc67d('0xf1'),_0xc67d('0xf5'),{'id':_0x22ac0f['id'],'name':_0x22ac0f[_0xc67d('0x41')],'pause':![]})['then'](function(){return db[_0xc67d('0xab')]['update']({'paused':0x0},{'where':{'UserId':_0x22ac0f['id']}});})[_0xc67d('0x20')](function(){return db[_0xc67d('0xec')]['findAll']({'where':{'membername':_0x22ac0f[_0xc67d('0x41')],'type':_0xc67d('0xf2'),'exitAt':null}});})[_0xc67d('0x20')](function(_0x3a3724){var _0xd43461=[];_0x3a3724[_0xc67d('0xe8')](function(_0x4b14a3){_0xd43461[_0xc67d('0xa7')](_0x4b14a3[_0xc67d('0x32')]({'exitAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'data2':'manual'}));});return BPromise[_0xc67d('0xef')](_0xd43461);})[_0xc67d('0x20')](function(){return _0x22ac0f[_0xc67d('0x32')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});});}}})['then'](respondWithResult(_0x5ef4ae,null))[_0xc67d('0x5c')](handleError(_0x5ef4ae,null));};exports[_0xc67d('0x102')]=function(_0x4b5954,_0x47b52f,_0x15724e){var _0x257b04={};var _0x99a379={};var _0x78154f;var _0x4dccbb;return db['User'][_0xc67d('0xbb')]({'where':{'id':_0x4b5954[_0xc67d('0x5d')]['id']}})['then'](handleEntityNotFound(_0x47b52f,null))[_0xc67d('0x20')](function(_0x1f37c0){if(_0x1f37c0){_0x78154f=_0x1f37c0;_0x99a379[_0xc67d('0x45')]=_['keys'](db['Team'][_0xc67d('0x44')]);_0x99a379[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0x4b5954[_0xc67d('0x49')]);_0x99a379[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x99a379[_0xc67d('0x45')],_0x99a379['query']);_0x257b04[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x99a379[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0x4b5954[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x257b04[_0xc67d('0x4b')]=_0x257b04[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x257b04[_0xc67d('0x4b')]:_0x99a379[_0xc67d('0x45')];_0x257b04[_0xc67d('0xbd')]=qs['sort'](_0x4b5954['query'][_0xc67d('0x4e')]);_0x257b04[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0x4b5954[_0xc67d('0x49')],_0x99a379[_0xc67d('0x4a')]));if(_0x4b5954[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x257b04[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x257b04[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x257b04[_0xc67d('0x4b')],function(_0x2efa5b){var _0x5cb873={};_0x5cb873[_0x2efa5b]={'$like':'%'+_0x4b5954[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x5cb873;})});}_0x257b04=_[_0xc67d('0x50')]({},_0x257b04,_0x4b5954[_0xc67d('0x58')]);return _0x78154f[_0xc67d('0x102')](_0x257b04);}})['then'](function(_0x216178){if(_0x216178){_0x4dccbb=_0x216178[_0xc67d('0x4c')];if(!_0x4b5954[_0xc67d('0x49')][_0xc67d('0xc0')](_0xc67d('0x4d'))){_0x257b04[_0xc67d('0x2c')]=qs['limit'](_0x4b5954[_0xc67d('0x49')][_0xc67d('0x2c')]);_0x257b04['offset']=qs[_0xc67d('0x2b')](_0x4b5954[_0xc67d('0x49')]['offset']);}return _0x78154f['getTeams'](_0x257b04);}})['then'](function(_0x5c1487){if(_0x5c1487){return _0x5c1487?{'count':_0x4dccbb,'rows':_0x5c1487}:null;}})[_0xc67d('0x20')](respondWithResult(_0x47b52f,null))['catch'](handleError(_0x47b52f,null));};exports[_0xc67d('0x103')]=function(_0x42f906,_0x4fe2f4,_0x27991a){return db[_0xc67d('0x43')]['find']({'where':{'id':_0x42f906[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x4fe2f4,null))[_0xc67d('0x20')](function(_0x241dc3){if(_0x241dc3){return _0x241dc3['addTeams'](_0x42f906['body']['ids'],_[_0xc67d('0x65')](_0x42f906[_0xc67d('0x61')],[_0xc67d('0x64'),'id'])||{});}})[_0xc67d('0x20')](respondWithResult(_0x4fe2f4,null))[_0xc67d('0x5c')](handleError(_0x4fe2f4,null));};exports[_0xc67d('0x104')]=function(_0xcb92ff,_0x27a7d4,_0x213d60){return db[_0xc67d('0x43')][_0xc67d('0x40')]({'where':{'id':_0xcb92ff[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x27a7d4,null))[_0xc67d('0x20')](function(_0x360ece){if(_0x360ece){return _0x360ece[_0xc67d('0x104')](_0xcb92ff[_0xc67d('0x49')][_0xc67d('0x64')]);}})[_0xc67d('0x20')](respondWithStatusCode(_0x27a7d4,null))['catch'](handleError(_0x27a7d4,null));};exports['getLists']=function(_0xd15196,_0x76a80e,_0x3b31ba){var _0x1a35fd={};var _0x377784={};var _0x4893cb;var _0x5f0ba5;return db[_0xc67d('0x43')]['findOne']({'where':{'id':_0xd15196[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x76a80e,null))['then'](function(_0x5e7a97){if(_0x5e7a97){_0x4893cb=_0x5e7a97;_0x377784[_0xc67d('0x45')]=_[_0xc67d('0x47')](db[_0xc67d('0x105')][_0xc67d('0x44')]);_0x377784[_0xc67d('0x49')]=_['keys'](_0xd15196[_0xc67d('0x49')]);_0x377784['filters']=_[_0xc67d('0x5e')](_0x377784[_0xc67d('0x45')],_0x377784['query']);_0x1a35fd['attributes']=_[_0xc67d('0x5e')](_0x377784[_0xc67d('0x45')],qs[_0xc67d('0x5f')](_0xd15196['query']['fields']));_0x1a35fd[_0xc67d('0x4b')]=_0x1a35fd[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x1a35fd[_0xc67d('0x4b')]:_0x377784[_0xc67d('0x45')];_0x1a35fd['order']=qs['sort'](_0xd15196['query']['sort']);_0x1a35fd[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0xd15196[_0xc67d('0x49')],_0x377784[_0xc67d('0x4a')]));if(_0xd15196[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x1a35fd['where']=_[_0xc67d('0x50')](_0x1a35fd[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x1a35fd[_0xc67d('0x4b')],function(_0x447578){var _0x545928={};_0x545928[_0x447578]={'$like':'%'+_0xd15196[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x545928;})});}_0x1a35fd=_[_0xc67d('0x50')]({},_0x1a35fd,_0xd15196[_0xc67d('0x58')]);return _0x4893cb[_0xc67d('0x106')](_0x1a35fd);}})['then'](function(_0x3c52d9){if(_0x3c52d9){_0x5f0ba5=_0x3c52d9[_0xc67d('0x4c')];if(!_0xd15196['query'][_0xc67d('0xc0')](_0xc67d('0x4d'))){_0x1a35fd[_0xc67d('0x2c')]=qs[_0xc67d('0x2c')](_0xd15196['query'][_0xc67d('0x2c')]);_0x1a35fd[_0xc67d('0x2b')]=qs[_0xc67d('0x2b')](_0xd15196[_0xc67d('0x49')][_0xc67d('0x2b')]);}return _0x4893cb['getLists'](_0x1a35fd);}})[_0xc67d('0x20')](function(_0x361436){if(_0x361436){return _0x361436?{'count':_0x5f0ba5,'rows':_0x361436}:null;}})[_0xc67d('0x20')](respondWithResult(_0x76a80e,null))['catch'](handleError(_0x76a80e,null));};exports[_0xc67d('0x107')]=function(_0xfa697,_0x36e3a9,_0x24aa34){var _0x3246bd={};var _0x20fc98={};var _0x5c5357;var _0x151de6;return db[_0xc67d('0x43')][_0xc67d('0xbb')]({'where':{'id':_0xfa697[_0xc67d('0x5d')]['id']}})[_0xc67d('0x20')](handleEntityNotFound(_0x36e3a9,null))[_0xc67d('0x20')](function(_0x5b4b7e){if(_0x5b4b7e){_0x5c5357=_0x5b4b7e;_0x20fc98[_0xc67d('0x45')]=_[_0xc67d('0x47')](db['User']['rawAttributes']);_0x20fc98[_0xc67d('0x49')]=_[_0xc67d('0x47')](_0xfa697['query']);_0x20fc98[_0xc67d('0x4a')]=_[_0xc67d('0x5e')](_0x20fc98[_0xc67d('0x45')],_0x20fc98['query']);_0x3246bd[_0xc67d('0x4b')]=_[_0xc67d('0x5e')](_0x20fc98[_0xc67d('0x45')],qs['fields'](_0xfa697[_0xc67d('0x49')][_0xc67d('0x5f')]));_0x3246bd[_0xc67d('0x4b')]=_0x3246bd[_0xc67d('0x4b')][_0xc67d('0x4c')]?_0x3246bd[_0xc67d('0x4b')]:_0x20fc98[_0xc67d('0x45')];_0x3246bd[_0xc67d('0xbd')]=qs['sort'](_0xfa697[_0xc67d('0x49')]['sort']);_0x3246bd[_0xc67d('0x4f')]=qs[_0xc67d('0x4a')](_[_0xc67d('0xbe')](_0xfa697[_0xc67d('0x49')],_0x20fc98['filters']));if(_0xfa697[_0xc67d('0x49')][_0xc67d('0x3a')]){_0x3246bd[_0xc67d('0x4f')]=_[_0xc67d('0x50')](_0x3246bd[_0xc67d('0x4f')],{'$or':_[_0xc67d('0x3c')](_0x3246bd[_0xc67d('0x4b')],function(_0x103776){var _0x935b87={};_0x935b87[_0x103776]={'$like':'%'+_0xfa697[_0xc67d('0x49')][_0xc67d('0x3a')]+'%'};return _0x935b87;})});}_0x3246bd[_0xc67d('0x45')]=db[_0xc67d('0x43')];_0x3246bd['as']='Agents';_0x3246bd=_['merge']({},_0x3246bd,_0xfa697[_0xc67d('0x58')]);return _0x5c5357[_0xc67d('0xe6')]({'include':[_0x3246bd]});}})[_0xc67d('0x20')](function(_0xba5af1){if(_0xba5af1){var _0x50ffbd={},_0x54c1c6=[],_0x3af707=0x0;for(var _0x28d457=0x0;_0x28d457<_0xba5af1[_0xc67d('0x4c')];_0x28d457+=0x1){for(var _0x17dd14=0x0,_0x333b30;_0x17dd14<_0xba5af1[_0x28d457][_0xc67d('0x36')]['length'];_0x17dd14+=0x1){_0x333b30=_0xba5af1[_0x28d457][_0xc67d('0x36')][_0x17dd14][_0xc67d('0x34')]({'plain':!![]});_0x50ffbd[_0x333b30['id']]=_0x333b30;}}_0x50ffbd=_[_0xc67d('0x108')](_0x50ffbd);for(var _0x2486c9=qs[_0xc67d('0x2b')](_0xfa697[_0xc67d('0x49')][_0xc67d('0x2b')]);_0x2486c9<_0x50ffbd['length']&&_0x54c1c6[_0xc67d('0x4c')]=_0x331174){_0x1be6d6=_0x331174;_0x19c5c0=0xc8;}else{_0x19c5c0=0xce;}_0x18607e[_0x2315('0x2b')](_0x19c5c0);return _0x18607e[_0x2315('0x2e')](_0x2315('0x2f'),_0x43fb51+'-'+_0x1be6d6+'/'+_0x331174)[_0x2315('0x30')](_0x528ed7);}return null;};}function patchUpdates(_0x3ca460){return function(_0x314adb){try{jsonpatch['apply'](_0x314adb,_0x3ca460,!![]);}catch(_0x1e8602){return BPromise[_0x2315('0x31')](_0x1e8602);}return _0x314adb[_0x2315('0x32')]();};}function saveUpdates(_0x4ebc75,_0x419e98){return function(_0x5d42fb){if(_0x5d42fb){return _0x5d42fb[_0x2315('0x33')](_0x4ebc75)['then'](function(_0x5c8bcf){return _0x5c8bcf;});}return null;};}function removeEntity(_0x263c7b,_0x216fea){return function(_0x440f39){if(_0x440f39){return _0x440f39['destroy']()[_0x2315('0x1e')](function(){var _0x2c0c10=_0x440f39[_0x2315('0x34')]({'plain':!![]});var _0x5a0f8f=[{'name':_0x2315('0x35'),'value':_0x2315('0x36'),'ignore':!![]},{'name':_0x2315('0x37'),'value':_0x2315('0x38'),'ignore':![]},{'name':_0x2315('0x39'),'value':_0x2315('0x3a'),'ignore':![]}];var _0x26c1ec=_(_0x5a0f8f)[_0x2315('0x3b')]('ignore')[_0x2315('0x3c')](_0x2315('0x3d'))[_0x2315('0x3d')]();if(_[_0x2315('0x3e')](_0x26c1ec,_0x2c0c10[_0x2315('0x3f')])){return;}var _0x459c48=_[_0x2315('0x40')](_0x5a0f8f,[_0x2315('0x3d'),_0x2c0c10[_0x2315('0x3f')]])[_0x2315('0x41')];return db[_0x2315('0x42')][_0x2315('0x43')]({'where':{'type':_0x459c48,'resourceId':_0x2c0c10['id']}})[_0x2315('0x1e')](function(){return _0x440f39;});})[_0x2315('0x1e')](function(){_0x263c7b[_0x2315('0x2b')](0xcc)[_0x2315('0x44')]();});}};}function handleEntityNotFound(_0x3a126c,_0x24da92){return function(_0x3af6e6){if(!_0x3af6e6){_0x3a126c['sendStatus'](0x194);}return _0x3af6e6;};}function handleError(_0x54bf9f,_0x351abe){_0x351abe=_0x351abe||0x1f4;return function(_0x1fba4e){logger[_0x2315('0x23')](_0x1fba4e[_0x2315('0x45')]);if(_0x1fba4e['name']){delete _0x1fba4e['name'];}_0x54bf9f[_0x2315('0x2b')](_0x351abe)[_0x2315('0x46')](_0x1fba4e);};}exports[_0x2315('0x47')]=function(_0x327781,_0x5a7956){var _0x4de122={},_0x5d993c={},_0xbcd40e={'count':0x0,'rows':[]};var _0x38eac0=db['User']['rawAttributes'];_0x5d993c[_0x2315('0x48')]=_[_0x2315('0x49')](_[_0x2315('0x4a')](_0x38eac0),[_0x2315('0x4b'),'salt']);_0x5d993c[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x327781[_0x2315('0x4c')]);_0x5d993c[_0x2315('0x4d')]=_['intersection'](_0x5d993c[_0x2315('0x48')],_0x5d993c[_0x2315('0x4c')]);_0x4de122[_0x2315('0x4e')]=_['intersection'](_0x5d993c[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x327781[_0x2315('0x4c')]['fields']));_0x4de122['attributes']=_0x4de122[_0x2315('0x4e')][_0x2315('0x50')]?_0x4de122[_0x2315('0x4e')]:_0x5d993c['model'];if(!_0x327781[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x4de122[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x327781['query'][_0x2315('0x53')]);_0x4de122['offset']=qs[_0x2315('0x2d')](_0x327781[_0x2315('0x4c')][_0x2315('0x2d')]);}_0x4de122[_0x2315('0x54')]=qs[_0x2315('0x55')](_0x327781[_0x2315('0x4c')][_0x2315('0x55')]);_0x4de122[_0x2315('0x56')]=qs[_0x2315('0x4d')](_['pick'](_0x327781[_0x2315('0x4c')],_0x5d993c['filters']));if(_0x327781['query']['filter']){_0x4de122[_0x2315('0x56')]=_[_0x2315('0x57')](_0x4de122['where'],{'$or':_[_0x2315('0x3c')](_0x38eac0,function(_0x4bcfde){if(_0x4bcfde['type'][_0x2315('0x58')]!==_0x2315('0x59')){return db[_0x2315('0x5a')][_0x2315('0x56')](db['sequelize']['fn']('lower',db[_0x2315('0x5a')][_0x2315('0x5b')](_0x4bcfde[_0x2315('0x5c')])),{'$like':db[_0x2315('0x5a')]['fn'](_0x2315('0x5d'),'%'+_0x327781[_0x2315('0x4c')][_0x2315('0x3b')]+'%')});}})});}_0x4de122=_['merge']({},_0x4de122,_0x327781[_0x2315('0x5e')]);var _0x198a7d={'where':_0x4de122[_0x2315('0x56')]};return db[_0x2315('0x5f')][_0x2315('0x2c')](_0x198a7d)[_0x2315('0x1e')](function(_0x243b0c){_0xbcd40e['count']=_0x243b0c;if(_0x327781[_0x2315('0x4c')][_0x2315('0x60')]){_0x4de122[_0x2315('0x61')]=[{'all':!![]}];}return db[_0x2315('0x5f')]['findAll'](_0x4de122);})[_0x2315('0x1e')](function(_0xa9edad){_0xbcd40e[_0x2315('0x62')]=_0xa9edad;return _0xbcd40e;})[_0x2315('0x1e')](respondWithFilteredResult(_0x5a7956,_0x4de122))[_0x2315('0x29')](handleError(_0x5a7956,null));};exports['show']=function(_0x1cddaf,_0x4856ae){var _0x312f87={'raw':![],'where':{'id':_0x1cddaf['params']['id']}},_0x59215c={};_0x59215c[_0x2315('0x48')]=_['differenceBy'](_[_0x2315('0x4a')](db[_0x2315('0x5f')][_0x2315('0x63')]),[_0x2315('0x4b'),_0x2315('0x64')]);_0x59215c[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x1cddaf[_0x2315('0x4c')]);_0x59215c['filters']=_[_0x2315('0x65')](_0x59215c[_0x2315('0x48')],_0x59215c[_0x2315('0x4c')]);_0x312f87[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x59215c[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x1cddaf[_0x2315('0x4c')][_0x2315('0x4f')]));_0x312f87[_0x2315('0x4e')]=_0x312f87[_0x2315('0x4e')][_0x2315('0x50')]?_0x312f87[_0x2315('0x4e')]:_0x59215c['model'];if(_0x1cddaf[_0x2315('0x4c')]['includeAll']){_0x312f87[_0x2315('0x61')]=[{'all':!![]}];}_0x312f87=_['merge']({},_0x312f87,_0x1cddaf['options']);return db[_0x2315('0x5f')][_0x2315('0x40')](_0x312f87)[_0x2315('0x1e')](handleEntityNotFound(_0x4856ae,null))[_0x2315('0x1e')](respondWithResult(_0x4856ae,null))[_0x2315('0x29')](handleError(_0x4856ae,null));};exports['bulkCreate']=function(_0x5273e5,_0x232161){return db[_0x2315('0x5f')][_0x2315('0x66')](_0x5273e5[_0x2315('0x67')],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x232161,0xc9))[_0x2315('0x29')](handleError(_0x232161,null));};exports[_0x2315('0x33')]=function(_0x391f80,_0x55db8b){if(_0x391f80['body']['id']){delete _0x391f80[_0x2315('0x67')]['id'];}delete _0x391f80[_0x2315('0x67')][_0x2315('0x3f')];return db['User']['find']({'where':{'id':_0x391f80[_0x2315('0x68')]['id']}})['then'](handleEntityNotFound(_0x55db8b,null))[_0x2315('0x1e')](saveUpdates(_0x391f80[_0x2315('0x67')],null))[_0x2315('0x1e')](respondWithResult(_0x55db8b,null))[_0x2315('0x29')](handleError(_0x55db8b,null));};exports['describe']=function(_0x8539dc,_0x332018){return db[_0x2315('0x5f')][_0x2315('0x69')]()['then'](respondWithResult(_0x332018,null))['catch'](handleError(_0x332018,null));};exports[_0x2315('0x6a')]=function(_0x4670c7,_0x482da5,_0x4b4557){return db[_0x2315('0x5f')][_0x2315('0x40')]({'where':{'id':_0x4670c7[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x482da5,null))[_0x2315('0x1e')](function(_0x368f6e){if(_0x368f6e){return _0x368f6e[_0x2315('0x6a')](_0x4670c7[_0x2315('0x67')]['ids'],_['omit'](_0x4670c7[_0x2315('0x67')],['ids','id'])||{});}})[_0x2315('0x1e')](respondWithResult(_0x482da5,null))[_0x2315('0x29')](handleError(_0x482da5,null));};var getLicense=function(_0x3d4796){return new BPromise(function(_0x1a2051,_0x227f0f){var _0x18f95e=0x0;_0x3d4796[_0x2315('0x67')][_0x2315('0x3f')]===_0x2315('0x38')&&_0x1a2051(_0x2315('0x6b'));return db[_0x2315('0x5f')][_0x2315('0x2c')]({'where':{'$or':[{'role':_0x3d4796[_0x2315('0x67')]['role']==='telephone'?_0x2315('0x3a'):[_0x2315('0x6c'),_0x2315('0x36')]}]}})[_0x2315('0x1e')](function(_0x4ff1f7){_0x18f95e=_0x4ff1f7;return require(_0x2315('0x6d'))['getLicense']();})[_0x2315('0x1e')](function(_0xbd95c1){var _0x7a07a4=_0x3d4796[_0x2315('0x67')][_0x2315('0x3f')]===_0x2315('0x3a')?'telephones':_0x2315('0x6e');if(!_['isNil'](_0xbd95c1[_0x7a07a4])&&_0x18f95e>=_0xbd95c1[_0x7a07a4]){return _0x227f0f({'message':'License\x20limit\x20reached'});}return _0x1a2051(util['format'](_0x2315('0x6f'),_0x7a07a4,_0x18f95e));})[_0x2315('0x29')](function(_0x46111e){return _0x227f0f(_0x46111e);});});};exports['create']=function(_0x15ccc8,_0x5b5805){return getLicense(_0x15ccc8)[_0x2315('0x1e')](function(_0x4883ef){if(!_0x15ccc8['body'][_0x2315('0x70')]){var _0x5cd46a;return db['Setting'][_0x2315('0x71')](0x1)[_0x2315('0x1e')](function(_0x3ad2b1){_0x3ad2b1[_0x2315('0x72')]=!![];return checkPasswordPattern(_0x3ad2b1,_0x15ccc8[_0x2315('0x67')]['password'],_0x3ad2b1[_0x2315('0x72')]);})[_0x2315('0x1e')](function(_0x41cdc5){_0x5cd46a=_0x41cdc5['min_internal'];return db[_0x2315('0x5f')][_0x2315('0x73')](_0x2315('0x70'));})[_0x2315('0x1e')](function(_0x123c87){if(_[_0x2315('0x74')](_0x123c87)){if(_0x5cd46a){_0x15ccc8[_0x2315('0x67')][_0x2315('0x70')]=_0x5cd46a;}else{_0x15ccc8['body'][_0x2315('0x70')]=0x1;}}else{if(_[_0x2315('0x74')](_0x5cd46a)||_0x5cd46a==_0x123c87){_0x15ccc8[_0x2315('0x67')][_0x2315('0x70')]=_0x123c87+0x1;}else if(_0x5cd46a>_0x123c87){_0x15ccc8['body'][_0x2315('0x70')]=_0x5cd46a;}else{return db[_0x2315('0x5a')][_0x2315('0x4c')](_0x2315('0x75'),{'type':db[_0x2315('0x5a')]['QueryTypes'][_0x2315('0x76')]})['then'](function(_0x395569){if(_0x395569&&_0x395569[_0x2315('0x50')]){for(var _0x32d49d=0x0,_0x31975f=_0x395569[_0x2315('0x50')];_0x32d49d<_0x31975f&&_[_0x2315('0x74')](_0x15ccc8[_0x2315('0x67')]['internal']);_0x32d49d++){if(_0x5cd46a<=_0x395569[_0x32d49d][_0x2315('0x77')]){_0x15ccc8[_0x2315('0x67')][_0x2315('0x70')]=_0x395569[_0x32d49d][_0x2315('0x77')];}else if(_0x5cd46a>_0x395569[_0x32d49d][_0x2315('0x77')]&&_0x5cd46a<=_0x395569[_0x32d49d]['to']){_0x15ccc8['body'][_0x2315('0x70')]=_0x5cd46a;}}}if(_['isNil'](_0x15ccc8[_0x2315('0x67')]['internal'])){_0x15ccc8[_0x2315('0x67')][_0x2315('0x70')]=_0x123c87+0x1;}});}}});}})[_0x2315('0x1e')](function(){if(_0x15ccc8[_0x2315('0x67')][_0x2315('0x78')]){_0x15ccc8['body'][_0x2315('0x79')]=_0x15ccc8['body'][_0x2315('0x70')];_0x15ccc8[_0x2315('0x67')][_0x2315('0x7a')]={'mailbox':_0x15ccc8['body'][_0x2315('0x70')],'password':_0x15ccc8[_0x2315('0x67')][_0x2315('0x4b')],'fullname':_0x15ccc8['body'][_0x2315('0x7b')],'email':_0x15ccc8[_0x2315('0x67')][_0x2315('0x7c')]};}if(_0x15ccc8[_0x2315('0x67')]&&_0x15ccc8['body'][_0x2315('0x3f')]===_0x2315('0x38')){_0x15ccc8['body'][_0x2315('0x7d')]=[_0x2315('0x7e'),_0x2315('0x7f'),_0x2315('0x80'),_0x2315('0x81'),_0x2315('0x82'),_0x2315('0x83'),'106',_0x2315('0x84'),_0x2315('0x85'),_0x2315('0x86'),_0x2315('0x87'),'111'];}return db['User']['create'](_0x15ccc8[_0x2315('0x67')],{'include':[{'model':db[_0x2315('0x7a')],'as':_0x2315('0x7a')}]});})[_0x2315('0x1e')](function(_0x3dc5a8){if(_0x15ccc8[_0x2315('0x67')][_0x2315('0x3f')]==='user')return _0x3dc5a8;var _0x486dbf=_0x15ccc8['user']['get']({'plain':!![]});if(!_0x486dbf)throw new Error(_0x2315('0x88'));if(_0x486dbf['role']===_0x2315('0x36')){var _0x5bbcaf=_0x3dc5a8[_0x2315('0x34')]({'plain':!![]});var _0x41b05e=[{'name':_0x2315('0x37'),'value':_0x2315('0x38')},{'name':'Telephones','value':_0x2315('0x3a')}];var _0x193a06=_['find'](_0x41b05e,[_0x2315('0x3d'),_0x5bbcaf[_0x2315('0x3f')]])[_0x2315('0x41')];return db['UserProfileSection'][_0x2315('0x40')]({'where':{'name':_0x193a06,'userProfileId':_0x486dbf[_0x2315('0x89')]},'raw':!![]})['then'](function(_0x31337d){if(_0x31337d&&_0x31337d[_0x2315('0x8a')]===0x0){return db['UserProfileResource'][_0x2315('0x8b')]({'name':_0x5bbcaf[_0x2315('0x41')],'resourceId':_0x5bbcaf['id'],'type':_0x31337d[_0x2315('0x41')],'sectionId':_0x31337d['id']},{})[_0x2315('0x1e')](function(){return _0x3dc5a8;});}else{return _0x3dc5a8;}})[_0x2315('0x29')](function(_0x569b39){logger[_0x2315('0x23')](_0x2315('0x8c'),_0x569b39);throw _0x569b39;});}return _0x3dc5a8;})[_0x2315('0x1e')](respondWithResult(_0x5b5805,0xc9))[_0x2315('0x29')](handleError(_0x5b5805,null));};exports[_0x2315('0x8d')]=function(_0x3f0aee,_0x359ea0,_0x3ca229){var _0xc3f03e=![];if(_0x3f0aee['body']['id']){delete _0x3f0aee[_0x2315('0x67')]['id'];}if(!_['isNil'](_0x3f0aee['body']['oldPassword'])){if(_0x3f0aee['body'][_0x2315('0x8e')]===_0x3f0aee['body']['newPassword']){throw new Error('New\x20password\x20must\x20be\x20different\x20from\x20old\x20one');}}return db[_0x2315('0x5f')][_0x2315('0x40')]({'where':{'id':_0x3f0aee[_0x2315('0x68')]['id']}})['then'](function(_0x549295){if(_0x549295){if(_0x549295['id']==_0x3f0aee[_0x2315('0x36')]['id']){if(!_0x3f0aee['body'][_0x2315('0x8e')]||!_0x3f0aee[_0x2315('0x67')][_0x2315('0x8f')]){throw new db['Sequelize']['ValidationError']('Invalid\x20body\x20format.\x20Use\x20oldPassord\x20and\x20newPassword');}if(!_0x549295[_0x2315('0x90')](_0x3f0aee['body']['oldPassword'])){throw new db[(_0x2315('0x91'))][(_0x2315('0x92'))](_0x2315('0x93'));}if(_0x3f0aee['body']['oldPassword']==_0x3f0aee[_0x2315('0x67')][_0x2315('0x8f')]){throw new db['Sequelize']['ValidationError'](_0x2315('0x94'));}return _0x549295;}else if(_0x3f0aee[_0x2315('0x36')][_0x2315('0x3f')]=='admin'){if(!_0x3f0aee[_0x2315('0x67')][_0x2315('0x8f')]){throw new db['Sequelize']['ValidationError'](_0x2315('0x95'));}return _0x549295;}else if(_0x3f0aee['user']['role']==_0x2315('0x36')){if(!_0x3f0aee[_0x2315('0x67')][_0x2315('0x8f')]){throw new db[(_0x2315('0x91'))]['ValidationError']('Invalid\x20body\x20format.\x20Use\x20newPassword');}if(_0x549295[_0x2315('0x3f')]!=_0x2315('0x38')){throw new db['Sequelize'][(_0x2315('0x92'))](_0x2315('0x96'));}return _0x549295;}else{throw new db[(_0x2315('0x91'))][(_0x2315('0x92'))](_0x2315('0x96'));}}return null;})[_0x2315('0x1e')](handleEntityNotFound(_0x359ea0,null))[_0x2315('0x1e')](function(_0x712c48){return db[_0x2315('0x97')][_0x2315('0x98')]({'attributes':['id',_0x2315('0x72')]})[_0x2315('0x1e')](function(_0x44894a){_0xc3f03e=_0x44894a[_0x2315('0x72')];return checkPasswordPattern(_0x712c48,_0x3f0aee['body'][_0x2315('0x8f')],_0xc3f03e);});})['then'](saveUpdates({'password':_0x3f0aee[_0x2315('0x67')]['newPassword'],'passwordResetAt':_0x3f0aee[_0x2315('0x36')]['id']==_0x3f0aee[_0x2315('0x68')]['id']?moment():null},null))[_0x2315('0x1e')](respondWithResult(_0x359ea0,null))[_0x2315('0x29')](handleError(_0x359ea0,null));};exports[_0x2315('0x99')]=function(_0x2b764f,_0x26eafb,_0x44c384){var _0x5a3548=_0x2b764f[_0x2315('0x67')][_0x2315('0x9a')];return db[_0x2315('0x5f')][_0x2315('0x40')]({'where':{'id':_0x2b764f[_0x2315('0x68')]['id']},'attributes':['id','name',_0x2315('0x3f'),_0x2315('0x9b'),_0x2315('0x9c'),_0x2315('0x9d'),_0x2315('0x9e')]})['then'](handleEntityNotFound(_0x26eafb,null))[_0x2315('0x1e')](function(_0x43bb5d){if(_0x43bb5d){if(!utils[_0x2315('0x9f')](_0x5a3548)){throw new db['Sequelize'][(_0x2315('0x92'))]('Unknown\x20channel');}return _0x43bb5d[_0x2315('0xa0')+_[_0x2315('0xa1')](_0x5a3548[_0x2315('0xa2')]())+'Queues'](_0x2b764f[_0x2315('0x67')][_0x2315('0xa3')],{'penalty':_0x2b764f[_0x2315('0x67')][_0x2315('0xa4')]||0x0})[_0x2315('0xa5')](function(_0x9be351){for(var _0x2d68fa=0x0;_0x2d68fa<_0x2b764f['body'][_0x2315('0xa3')][_0x2315('0x50')];_0x2d68fa+=0x1){var _0x80ba6a={'UserId':_0x2b764f[_0x2315('0x68')]['id']};_0x80ba6a[_['capitalize'](_0x5a3548['toLowerCase']())+'QueueId']=_0x2b764f[_0x2315('0x67')][_0x2315('0xa3')][_0x2d68fa];socket[_0x2315('0xa6')]('user'+_[_0x2315('0xa1')](_0x5a3548[_0x2315('0xa2')]())+'Queue:save',_0x80ba6a);}return _0x9be351;})[_0x2315('0x1e')](function(){if(_0x5a3548===_0x2315('0xa7')){return db[_0x2315('0xa8')][_0x2315('0xa9')]({'where':{'id':_0x2b764f[_0x2315('0x67')]['ids']||[]},'raw':!![],'attributes':['id',_0x2315('0x41')]});}})[_0x2315('0x1e')](function(_0x3bc7fe){var _0x5c770e=_0x43bb5d[_0x2315('0x34')]({'plain':!![]});var _0x2bf743=[];if(_0x5a3548===_0x2315('0xa7')&&_0x5c770e[_0x2315('0x3f')]===_0x2315('0x38')&&_0x5c770e[_0x2315('0x9b')]){for(var _0x37013a=0x0;_0x37013a<_0x3bc7fe['length'];_0x37013a+=0x1){_0x2bf743[_0x2315('0xaa')]({'membername':_0x5c770e[_0x2315('0x41')],'UserId':_0x5c770e['id'],'queue_name':_0x3bc7fe[_0x37013a][_0x2315('0x41')],'VoiceQueueId':_0x3bc7fe[_0x37013a]['id'],'interface':_[_0x2315('0x74')](_0x5c770e[_0x2315('0x9e')])?util[_0x2315('0xab')](_0x2315('0xac'),_0x5c770e[_0x2315('0x41')]):_0x5c770e['interface'],'paused':_0x5c770e['voicePause']||![],'penalty':_0x2b764f[_0x2315('0x67')]['penalty']||0x0});}return BPromise[_0x2315('0xad')](_0x2bf743,function(_0x1064d0){return db[_0x2315('0xae')][_0x2315('0xaf')](_0x1064d0);});}return _0x43bb5d;});}})[_0x2315('0x1e')](respondWithStatusCode(_0x26eafb,null))['catch'](handleError(_0x26eafb,null));};exports[_0x2315('0xb0')]=function(_0x4a8596,_0xd2fa25,_0x1fd69e){var _0x45a68b;return db[_0x2315('0x5f')][_0x2315('0x40')]({'where':{'id':_0x4a8596[_0x2315('0x68')]['id']},'attributes':['id','name','role']})[_0x2315('0x1e')](handleEntityNotFound(_0xd2fa25,null))[_0x2315('0x1e')](function(_0x470e89){if(_0x470e89){_0x45a68b=_0x470e89;if(!_0x4a8596[_0x2315('0x4c')]['channel']||!utils[_0x2315('0x9f')](_0x4a8596[_0x2315('0x4c')]['channel'])){throw new db[(_0x2315('0x91'))][(_0x2315('0x92'))]('Unknown\x20channel');}return _0x470e89[_0x2315('0xb1')+_['capitalize'](_0x4a8596[_0x2315('0x4c')]['channel'][_0x2315('0xa2')]())+'Queues'](_0x4a8596[_0x2315('0x4c')][_0x2315('0xa3')]);}})[_0x2315('0x1e')](function(_0x1c2d13){for(var _0x4ced65=0x0;_0x4ced65<_0x4a8596[_0x2315('0x4c')]['ids']['length'];_0x4ced65+=0x1){var _0x347cb5={'UserId':_0x4a8596[_0x2315('0x68')]['id']};_0x347cb5[_[_0x2315('0xa1')](_0x4a8596['query'][_0x2315('0x9a')][_0x2315('0xa2')]())+_0x2315('0xb2')]=_0x4a8596[_0x2315('0x4c')][_0x2315('0xa3')][_0x4ced65];socket[_0x2315('0xa6')](_0x2315('0x36')+_['capitalize'](_0x4a8596['query'][_0x2315('0x9a')][_0x2315('0xa2')]())+_0x2315('0xb3'),_0x347cb5);}return _0x1c2d13;})[_0x2315('0x1e')](function(){if(_0x4a8596[_0x2315('0x4c')]['channel']===_0x2315('0xa7')){return db[_0x2315('0xae')][_0x2315('0x43')]({'where':{'UserId':_0x4a8596[_0x2315('0x68')]['id'],'VoiceQueueId':_0x4a8596[_0x2315('0x4c')][_0x2315('0xa3')]},'individualHooks':!![]})['then'](function(){return _0x45a68b;});}return _0x45a68b;})[_0x2315('0x1e')](respondWithStatusCode(_0xd2fa25,null))[_0x2315('0x29')](handleError(_0xd2fa25,null));};exports[_0x2315('0xb4')]=function(_0x863658,_0x18b38b,_0x3b8338){_0x863658['body']['userpic']=_0x863658['file']['filename'];return db['User']['find']({'where':{'id':_0x863658[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x18b38b,null))[_0x2315('0x1e')](saveUpdates(_0x863658[_0x2315('0x67')],null))['then'](respondWithResult(_0x18b38b,null))['catch'](handleError(_0x18b38b,null));};exports[_0x2315('0xb5')]=function(_0x7e1af1,_0x33b8d0,_0x3a3d51){var _0x31fe26=path[_0x2315('0xb6')](config[_0x2315('0xb7')],_0x2315('0xb8'));return db['User'][_0x2315('0x40')]({'where':{'id':_0x7e1af1[_0x2315('0x68')]['id']},'attributes':['id',_0x2315('0xb9')],'raw':!![]})['then'](handleEntityNotFound(_0x33b8d0,null))[_0x2315('0x1e')](function(_0x51e7c3){if(_0x51e7c3){if(_[_0x2315('0x74')](_0x51e7c3[_0x2315('0xb9')])){return _0x33b8d0['download'](_0x31fe26);}else{if(!fs[_0x2315('0xba')](path['join'](config[_0x2315('0xb7')],_0x2315('0xbb'),_0x51e7c3['userpic']))){return _0x33b8d0[_0x2315('0xbc')](_0x31fe26);}return _0x33b8d0[_0x2315('0xbc')](path[_0x2315('0xb6')](config[_0x2315('0xb7')],'server/files/images/',_0x51e7c3[_0x2315('0xb9')]));}}})[_0x2315('0x29')](handleError(_0x33b8d0,null));};exports['getContacts']=function(_0x259d69,_0x4537ed,_0x43dc43){var _0x56702b={};var _0x41c883={};var _0x517ae9;var _0x3de62e;return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x259d69['params']['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x4537ed,null))[_0x2315('0x1e')](function(_0x5f3763){if(_0x5f3763){_0x517ae9=_0x5f3763;_0x41c883['model']=_[_0x2315('0x4a')](db['CmContact'][_0x2315('0x63')]);_0x41c883[_0x2315('0x4c')]=_['keys'](_0x259d69['query']);_0x41c883[_0x2315('0x4d')]=_[_0x2315('0x65')](_0x41c883[_0x2315('0x48')],_0x41c883['query']);_0x56702b[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x41c883[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x259d69[_0x2315('0x4c')][_0x2315('0x4f')]));_0x56702b[_0x2315('0x4e')]=_0x56702b['attributes'][_0x2315('0x50')]?_0x56702b['attributes']:_0x41c883[_0x2315('0x48')];_0x56702b['order']=qs['sort'](_0x259d69['query'][_0x2315('0x55')]);_0x56702b[_0x2315('0x56')]=qs[_0x2315('0x4d')](_['pick'](_0x259d69[_0x2315('0x4c')],_0x41c883['filters']));if(_0x259d69['query'][_0x2315('0x3b')]){_0x56702b[_0x2315('0x56')]=_[_0x2315('0x57')](_0x56702b[_0x2315('0x56')],{'$or':_[_0x2315('0x3c')](_0x56702b[_0x2315('0x4e')],function(_0x42c72b){var _0x405820={};_0x405820[_0x42c72b]={'$like':'%'+_0x259d69[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x405820;})});}_0x56702b=_['merge']({},_0x56702b,_0x259d69['options']);return _0x517ae9['getContacts'](_0x56702b);}})[_0x2315('0x1e')](function(_0x345ec3){if(_0x345ec3){_0x3de62e=_0x345ec3['length'];if(_0x259d69[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x60'))){_0x56702b['include']=[{'model':db[_0x2315('0xbd')],'as':_0x2315('0xbe'),'required':![]},{'model':db[_0x2315('0xbf')],'as':_0x2315('0xc0'),'attributes':['id',_0x2315('0x41'),_0x2315('0xc1')],'where':_0x259d69[_0x2315('0x4c')][_0x2315('0xc2')]?{'id':_0x259d69[_0x2315('0x4c')][_0x2315('0xc2')]}:undefined,'required':_0x259d69[_0x2315('0x4c')][_0x2315('0xc2')]?!![]:![]}];}if(!_0x259d69[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x56702b[_0x2315('0x53')]=qs['limit'](_0x259d69[_0x2315('0x4c')][_0x2315('0x53')]);_0x56702b[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0x259d69[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x517ae9[_0x2315('0xc3')](_0x56702b);}})[_0x2315('0x1e')](function(_0x1a6032){if(_0x1a6032){return _0x1a6032?{'count':_0x3de62e,'rows':_0x1a6032}:null;}})[_0x2315('0x1e')](respondWithResult(_0x4537ed,null))['catch'](handleError(_0x4537ed,null));};exports['getQueues']=function(_0x433a24,_0x4972ef,_0x53b572){var _0xe73061;var _0x4a1bfb;var _0x2b5ab4={};var _0x345057;return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x433a24[_0x2315('0x68')]['id']},'attributes':['id',_0x2315('0x41'),_0x2315('0x3f')]})[_0x2315('0x1e')](handleEntityNotFound(_0x4972ef,null))[_0x2315('0x1e')](function(_0x3e2e9a){if(!utils['isValidChannel'](_0x433a24[_0x2315('0x4c')][_0x2315('0x9a')])){throw new db[(_0x2315('0x91'))][(_0x2315('0x92'))](_0x2315('0xc4'));}_0xe73061=_0x3e2e9a;var _0x4dcfe7={};_0x4dcfe7[_0x2315('0x48')]=_['keys'](db[_[_0x2315('0xa1')](_0x433a24['query'][_0x2315('0x9a')])+_0x2315('0xc5')]['rawAttributes']);_0x4dcfe7[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x433a24[_0x2315('0x4c')]);_0x4dcfe7[_0x2315('0x4d')]=_[_0x2315('0x65')](_0x4dcfe7[_0x2315('0x48')],_0x4dcfe7[_0x2315('0x4c')]);_0x2b5ab4['attributes']=_[_0x2315('0x65')](_0x4dcfe7['model'],qs[_0x2315('0x4f')](_0x433a24[_0x2315('0x4c')][_0x2315('0x4f')]));_0x2b5ab4[_0x2315('0x4e')]=_0x2b5ab4[_0x2315('0x4e')]['length']?_0x2b5ab4[_0x2315('0x4e')]:_0x4dcfe7[_0x2315('0x48')];_0x2b5ab4[_0x2315('0x54')]=qs['sort'](_0x433a24[_0x2315('0x4c')][_0x2315('0x55')]);_0x2b5ab4[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x433a24[_0x2315('0x4c')],_0x4dcfe7['filters']));if(_0x433a24[_0x2315('0x4c')][_0x2315('0x3b')]){_0x2b5ab4[_0x2315('0x56')]=_[_0x2315('0x57')](_0x2b5ab4[_0x2315('0x56')],{'$or':_[_0x2315('0x3c')](_0x2b5ab4[_0x2315('0x4e')],function(_0xb7b490){var _0x1b1e0b={};_0x1b1e0b[_0xb7b490]={'$like':'%'+_0x433a24[_0x2315('0x4c')]['filter']+'%'};return _0x1b1e0b;})});}_0x2b5ab4=_[_0x2315('0x57')]({},_0x2b5ab4,_0x433a24[_0x2315('0x5e')]);switch(_0xe73061[_0x2315('0x3f')]){case _0x2315('0x6c'):return db[_['capitalize'](_0x433a24[_0x2315('0x4c')][_0x2315('0x9a')])+'Queue'][_0x2315('0xa9')](_0x2b5ab4);case'user':case'agent':return _0xe73061['get'+_['capitalize'](_0x433a24[_0x2315('0x4c')][_0x2315('0x9a')])+'Queues'](_0x2b5ab4);default:throw new db[(_0x2315('0x91'))][(_0x2315('0x92'))](_0x2315('0xc7'));}})[_0x2315('0x1e')](function(_0x13911c){_0x345057=_0x13911c[_0x2315('0x50')];if(!_0x433a24['query'][_0x2315('0x51')](_0x2315('0x52'))){_0x2b5ab4[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x433a24['query'][_0x2315('0x53')]);_0x2b5ab4['offset']=qs[_0x2315('0x2d')](_0x433a24[_0x2315('0x4c')][_0x2315('0x2d')]);}switch(_0xe73061[_0x2315('0x3f')]){case _0x2315('0x6c'):return db[_['capitalize'](_0x433a24[_0x2315('0x4c')]['channel'])+_0x2315('0xc5')][_0x2315('0xa9')](_0x2b5ab4);case _0x2315('0x36'):case _0x2315('0x38'):return _0xe73061[_0x2315('0x34')+_[_0x2315('0xa1')](_0x433a24['query']['channel'])+_0x2315('0xc8')](_0x2b5ab4);}})[_0x2315('0x1e')](function(_0xa67629){return{'count':_0x345057,'rows':_0xa67629};})[_0x2315('0x1e')](respondWithResult(_0x4972ef,null))[_0x2315('0x29')](handleError(_0x4972ef,null));};exports[_0x2315('0xc9')]=function(_0x2f9ac1,_0x16d8f9,_0x360e31){var _0x97cd27={};var _0x12dba3={};var _0x7d7204;var _0x301184;return db[_0x2315('0x5f')]['findOne']({'where':{'id':_0x2f9ac1['params']['id']}})['then'](handleEntityNotFound(_0x16d8f9,null))[_0x2315('0x1e')](function(_0xcc9fa4){if(_0xcc9fa4){_0x7d7204=_0xcc9fa4;_0x12dba3['model']=_[_0x2315('0x4a')](db['UserVoiceQueueRt'][_0x2315('0x63')]);_0x12dba3[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x2f9ac1[_0x2315('0x4c')]);_0x12dba3['filters']=_[_0x2315('0x65')](_0x12dba3['model'],_0x12dba3['query']);_0x97cd27[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x12dba3[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x2f9ac1[_0x2315('0x4c')][_0x2315('0x4f')]));_0x97cd27['attributes']=_0x97cd27['attributes'][_0x2315('0x50')]?_0x97cd27[_0x2315('0x4e')]:_0x12dba3[_0x2315('0x48')];_0x97cd27['order']=qs[_0x2315('0x55')](_0x2f9ac1['query']['sort']);_0x97cd27['where']=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x2f9ac1[_0x2315('0x4c')],_0x12dba3['filters']));if(_0x2f9ac1['query']['filter']){_0x97cd27['where']=_[_0x2315('0x57')](_0x97cd27[_0x2315('0x56')],{'$or':_['map'](_0x97cd27[_0x2315('0x4e')],function(_0xb198e0){var _0x919b98={};_0x919b98[_0xb198e0]={'$like':'%'+_0x2f9ac1['query'][_0x2315('0x3b')]+'%'};return _0x919b98;})});}_0x97cd27=_[_0x2315('0x57')]({},_0x97cd27,_0x2f9ac1[_0x2315('0x5e')]);return _0x7d7204[_0x2315('0xc9')](_0x97cd27);}})[_0x2315('0x1e')](function(_0x92137a){if(_0x92137a){_0x301184=_0x92137a[_0x2315('0x50')];if(!_0x2f9ac1[_0x2315('0x4c')]['hasOwnProperty'](_0x2315('0x52'))){_0x97cd27['limit']=qs['limit'](_0x2f9ac1['query'][_0x2315('0x53')]);_0x97cd27['offset']=qs['offset'](_0x2f9ac1[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x7d7204[_0x2315('0xc9')](_0x97cd27);}})[_0x2315('0x1e')](function(_0x350734){if(_0x350734){return _0x350734?{'count':_0x301184,'rows':_0x350734}:null;}})[_0x2315('0x1e')](respondWithResult(_0x16d8f9,null))[_0x2315('0x29')](handleError(_0x16d8f9,null));};exports[_0x2315('0xca')]=function(_0x45e0f7,_0x151de8,_0x110440){var _0x36fe9b={};var _0x180921={};var _0x3f0c18;var _0x1b90cb;return db[_0x2315('0x5f')]['findOne']({'where':{'id':_0x45e0f7[_0x2315('0x68')]['id']}})['then'](handleEntityNotFound(_0x151de8,null))['then'](function(_0x321fa1){if(_0x321fa1){_0x3f0c18=_0x321fa1;_0x180921[_0x2315('0x48')]=_[_0x2315('0x4a')](db[_0x2315('0xcb')][_0x2315('0x63')]);_0x180921[_0x2315('0x4c')]=_['keys'](_0x45e0f7[_0x2315('0x4c')]);_0x180921[_0x2315('0x4d')]=_[_0x2315('0x65')](_0x180921[_0x2315('0x48')],_0x180921[_0x2315('0x4c')]);_0x36fe9b[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x180921[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x45e0f7[_0x2315('0x4c')][_0x2315('0x4f')]));_0x36fe9b[_0x2315('0x4e')]=_0x36fe9b['attributes'][_0x2315('0x50')]?_0x36fe9b[_0x2315('0x4e')]:_0x180921[_0x2315('0x48')];_0x36fe9b['order']=qs['sort'](_0x45e0f7[_0x2315('0x4c')]['sort']);_0x36fe9b[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x45e0f7[_0x2315('0x4c')],_0x180921['filters']));if(_0x45e0f7[_0x2315('0x4c')][_0x2315('0x3b')]){_0x36fe9b[_0x2315('0x56')]=_[_0x2315('0x57')](_0x36fe9b[_0x2315('0x56')],{'$or':_['map'](_0x36fe9b[_0x2315('0x4e')],function(_0x58eae8){var _0x3b65ef={};_0x3b65ef[_0x58eae8]={'$like':'%'+_0x45e0f7[_0x2315('0x4c')]['filter']+'%'};return _0x3b65ef;})});}_0x36fe9b=_[_0x2315('0x57')]({},_0x36fe9b,_0x45e0f7[_0x2315('0x5e')]);return _0x3f0c18[_0x2315('0xca')](_0x36fe9b);}})[_0x2315('0x1e')](function(_0x25e75e){if(_0x25e75e){_0x1b90cb=_0x25e75e[_0x2315('0x50')];if(!_0x45e0f7['query']['hasOwnProperty'](_0x2315('0x52'))){_0x36fe9b[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x45e0f7[_0x2315('0x4c')][_0x2315('0x53')]);_0x36fe9b[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0x45e0f7[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x3f0c18[_0x2315('0xca')](_0x36fe9b);}})[_0x2315('0x1e')](function(_0x598677){if(_0x598677){return _0x598677?{'count':_0x1b90cb,'rows':_0x598677}:null;}})[_0x2315('0x1e')](respondWithResult(_0x151de8,null))['catch'](handleError(_0x151de8,null));};exports[_0x2315('0xcc')]=function(_0x10e11e,_0xc20a,_0x58f9eb){var _0x328d43={'raw':!![],'where':{}};var _0x2a469d={};var _0x38a8d0={'count':0x0,'rows':[]};return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x10e11e['params']['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0xc20a,null))[_0x2315('0x1e')](function(_0x46ebc5){if(_0x46ebc5){_0x2a469d[_0x2315('0x48')]=_['keys'](db[_0x2315('0xcd')][_0x2315('0x63')]);_0x2a469d['query']=_[_0x2315('0x4a')](_0x10e11e[_0x2315('0x4c')]);_0x2a469d[_0x2315('0x4d')]=_['intersection'](_0x2a469d['model'],_0x2a469d[_0x2315('0x4c')]);_0x328d43[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x2a469d[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x10e11e[_0x2315('0x4c')][_0x2315('0x4f')]));_0x328d43[_0x2315('0x4e')]=_0x328d43[_0x2315('0x4e')][_0x2315('0x50')]?_0x328d43[_0x2315('0x4e')]:_0x2a469d[_0x2315('0x48')];if(!_0x10e11e[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x328d43['limit']=qs[_0x2315('0x53')](_0x10e11e[_0x2315('0x4c')]['limit']);_0x328d43[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0x10e11e[_0x2315('0x4c')]['offset']);}_0x328d43[_0x2315('0x54')]=qs['sort'](_0x10e11e['query'][_0x2315('0x55')]);_0x328d43[_0x2315('0x56')]=qs[_0x2315('0x4d')](_['pick'](_0x10e11e[_0x2315('0x4c')],_0x2a469d[_0x2315('0x4d')]));_0x328d43[_0x2315('0x56')][_0x2315('0xce')]=_0x46ebc5['id'];if(_0x10e11e['query'][_0x2315('0x3b')]){_0x328d43['where']=_[_0x2315('0x57')](_0x328d43[_0x2315('0x56')],{'$or':_[_0x2315('0x3c')](_0x328d43['attributes'],function(_0x3204c5){var _0x59d427={};_0x59d427[_0x3204c5]={'$like':'%'+_0x10e11e['query']['filter']+'%'};return _0x59d427;})});}_0x328d43=_[_0x2315('0x57')]({},_0x328d43,_0x10e11e['options']);return db[_0x2315('0xcd')][_0x2315('0x2c')]({'where':_0x328d43['where']})['then'](function(_0x202de7){_0x38a8d0['count']=_0x202de7;if(_0x10e11e[_0x2315('0x4c')][_0x2315('0x60')]){_0x328d43['include']=[{'all':!![]}];}return db[_0x2315('0xcd')][_0x2315('0xa9')](_0x328d43);})[_0x2315('0x1e')](function(_0x2dea04){_0x38a8d0[_0x2315('0x62')]=_0x2dea04;return _0x38a8d0;});}})['then'](respondWithFilteredResult(_0xc20a,_0x328d43))[_0x2315('0x29')](handleError(_0xc20a,null));};exports[_0x2315('0xcf')]=function(_0x3f1a42,_0x124893,_0x417740){var _0xc7b816={'raw':!![],'where':{}};var _0x1d9209={};var _0x145877={'count':0x0,'rows':[]};return db['User'][_0x2315('0x98')]({'where':{'id':_0x3f1a42[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x124893,null))[_0x2315('0x1e')](function(_0x882387){if(_0x882387){_0x1d9209[_0x2315('0x48')]=_['keys'](db[_0x2315('0xd0')]['rawAttributes']);_0x1d9209['query']=_[_0x2315('0x4a')](_0x3f1a42[_0x2315('0x4c')]);_0x1d9209['filters']=_[_0x2315('0x65')](_0x1d9209['model'],_0x1d9209[_0x2315('0x4c')]);_0xc7b816[_0x2315('0x4e')]=_['intersection'](_0x1d9209[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x3f1a42[_0x2315('0x4c')][_0x2315('0x4f')]));_0xc7b816['attributes']=_0xc7b816['attributes'][_0x2315('0x50')]?_0xc7b816[_0x2315('0x4e')]:_0x1d9209[_0x2315('0x48')];if(!_0x3f1a42['query'][_0x2315('0x51')](_0x2315('0x52'))){_0xc7b816[_0x2315('0x53')]=qs['limit'](_0x3f1a42['query'][_0x2315('0x53')]);_0xc7b816['offset']=qs[_0x2315('0x2d')](_0x3f1a42['query'][_0x2315('0x2d')]);}_0xc7b816[_0x2315('0x54')]=qs['sort'](_0x3f1a42[_0x2315('0x4c')][_0x2315('0x55')]);_0xc7b816['where']=qs['filters'](_[_0x2315('0xc6')](_0x3f1a42[_0x2315('0x4c')],_0x1d9209['filters']));_0xc7b816[_0x2315('0x56')]['UserId']=_0x882387['id'];if(_0x3f1a42['query'][_0x2315('0x3b')]){_0xc7b816[_0x2315('0x56')]=_['merge'](_0xc7b816[_0x2315('0x56')],{'$or':_['map'](_0xc7b816[_0x2315('0x4e')],function(_0x2d0b6e){var _0x199006={};_0x199006[_0x2d0b6e]={'$like':'%'+_0x3f1a42[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x199006;})});}_0xc7b816=_[_0x2315('0x57')]({},_0xc7b816,_0x3f1a42['options']);return db[_0x2315('0xd0')]['count']({'where':_0xc7b816[_0x2315('0x56')]})[_0x2315('0x1e')](function(_0x2a1f8b){_0x145877['count']=_0x2a1f8b;if(_0x3f1a42['query']['includeAll']){_0xc7b816[_0x2315('0x61')]=[{'all':!![]}];}return db[_0x2315('0xd0')][_0x2315('0xa9')](_0xc7b816);})[_0x2315('0x1e')](function(_0x4f4a16){_0x145877[_0x2315('0x62')]=_0x4f4a16;return _0x145877;});}})[_0x2315('0x1e')](respondWithFilteredResult(_0x124893,_0xc7b816))[_0x2315('0x29')](handleError(_0x124893,null));};exports[_0x2315('0xd1')]=function(_0x34cb98,_0x3b18c9,_0x564785){var _0x7e33a5={};var _0xacc818={};var _0x2e8311;var _0x352c1e;return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x34cb98[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x3b18c9,null))['then'](function(_0x5d09c1){if(_0x5d09c1){_0x2e8311=_0x5d09c1;_0xacc818['model']=_[_0x2315('0x4a')](db[_0x2315('0xd2')][_0x2315('0x63')]);_0xacc818[_0x2315('0x4c')]=_['keys'](_0x34cb98[_0x2315('0x4c')]);_0xacc818[_0x2315('0x4d')]=_[_0x2315('0x65')](_0xacc818[_0x2315('0x48')],_0xacc818[_0x2315('0x4c')]);_0x7e33a5[_0x2315('0x4e')]=_[_0x2315('0x65')](_0xacc818[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x34cb98[_0x2315('0x4c')][_0x2315('0x4f')]));_0x7e33a5[_0x2315('0x4e')]=_0x7e33a5[_0x2315('0x4e')][_0x2315('0x50')]?_0x7e33a5[_0x2315('0x4e')]:_0xacc818[_0x2315('0x48')];_0x7e33a5[_0x2315('0x54')]=qs[_0x2315('0x55')](_0x34cb98[_0x2315('0x4c')][_0x2315('0x55')]);_0x7e33a5[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x34cb98[_0x2315('0x4c')],_0xacc818['filters']));if(_0x34cb98[_0x2315('0x4c')][_0x2315('0x3b')]){_0x7e33a5[_0x2315('0x56')]=_[_0x2315('0x57')](_0x7e33a5[_0x2315('0x56')],{'$or':_[_0x2315('0x3c')](_0x7e33a5[_0x2315('0x4e')],function(_0x5d4482){var _0x4a54e3={};_0x4a54e3[_0x5d4482]={'$like':'%'+_0x34cb98[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x4a54e3;})});}_0x7e33a5=_['merge']({},_0x7e33a5,_0x34cb98[_0x2315('0x5e')]);return _0x2e8311[_0x2315('0xd1')](_0x7e33a5);}})[_0x2315('0x1e')](function(_0x3b15c3){if(_0x3b15c3){_0x352c1e=_0x3b15c3[_0x2315('0x50')];if(!_0x34cb98[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x7e33a5[_0x2315('0x53')]=qs['limit'](_0x34cb98[_0x2315('0x4c')][_0x2315('0x53')]);_0x7e33a5['offset']=qs['offset'](_0x34cb98[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x2e8311[_0x2315('0xd1')](_0x7e33a5);}})[_0x2315('0x1e')](function(_0x3b2e4c){if(_0x3b2e4c){return _0x3b2e4c?{'count':_0x352c1e,'rows':_0x3b2e4c}:null;}})[_0x2315('0x1e')](respondWithResult(_0x3b18c9,null))[_0x2315('0x29')](handleError(_0x3b18c9,null));};exports[_0x2315('0xd3')]=function(_0x4ef3f4,_0x28e1f9,_0x26653e){var _0x2cda0c={};var _0x48aefd={};var _0x42f10d;var _0x2f41d7;return db['User']['findOne']({'where':{'id':_0x4ef3f4[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x28e1f9,null))[_0x2315('0x1e')](function(_0x29dba4){if(_0x29dba4){_0x42f10d=_0x29dba4;_0x48aefd[_0x2315('0x48')]=_[_0x2315('0x4a')](db[_0x2315('0xd4')]['rawAttributes']);_0x48aefd['query']=_[_0x2315('0x4a')](_0x4ef3f4['query']);_0x48aefd[_0x2315('0x4d')]=_[_0x2315('0x65')](_0x48aefd['model'],_0x48aefd['query']);_0x2cda0c[_0x2315('0x4e')]=_['intersection'](_0x48aefd['model'],qs['fields'](_0x4ef3f4['query'][_0x2315('0x4f')]));_0x2cda0c[_0x2315('0x4e')]=_0x2cda0c[_0x2315('0x4e')]['length']?_0x2cda0c[_0x2315('0x4e')]:_0x48aefd[_0x2315('0x48')];_0x2cda0c[_0x2315('0x54')]=qs[_0x2315('0x55')](_0x4ef3f4[_0x2315('0x4c')][_0x2315('0x55')]);_0x2cda0c[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x4ef3f4['query'],_0x48aefd[_0x2315('0x4d')]));if(_0x4ef3f4[_0x2315('0x4c')][_0x2315('0x3b')]){_0x2cda0c[_0x2315('0x56')]=_['merge'](_0x2cda0c[_0x2315('0x56')],{'$or':_['map'](_0x2cda0c[_0x2315('0x4e')],function(_0x155bfe){var _0x1a3cf7={};_0x1a3cf7[_0x155bfe]={'$like':'%'+_0x4ef3f4[_0x2315('0x4c')]['filter']+'%'};return _0x1a3cf7;})});}_0x2cda0c=_[_0x2315('0x57')]({},_0x2cda0c,_0x4ef3f4[_0x2315('0x5e')]);return _0x42f10d[_0x2315('0xd3')](_0x2cda0c);}})[_0x2315('0x1e')](function(_0x26ee3d){if(_0x26ee3d){_0x2f41d7=_0x26ee3d[_0x2315('0x50')];if(!_0x4ef3f4[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x2cda0c[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x4ef3f4[_0x2315('0x4c')][_0x2315('0x53')]);_0x2cda0c[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0x4ef3f4[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x42f10d[_0x2315('0xd3')](_0x2cda0c);}})[_0x2315('0x1e')](function(_0x2c5f4b){if(_0x2c5f4b){return _0x2c5f4b?{'count':_0x2f41d7,'rows':_0x2c5f4b}:null;}})[_0x2315('0x1e')](respondWithResult(_0x28e1f9,null))[_0x2315('0x29')](handleError(_0x28e1f9,null));};exports[_0x2315('0xd5')]=function(_0xb1bec4,_0x395f87,_0x359071){var _0x2ac5d6={'raw':!![],'where':{}};var _0x522acc={};var _0x2643ca={'count':0x0,'rows':[]};return db['User'][_0x2315('0x98')]({'where':{'id':_0xb1bec4[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x395f87,null))[_0x2315('0x1e')](function(_0x537f91){if(_0x537f91){_0x522acc[_0x2315('0x48')]=_['keys'](db[_0x2315('0xd6')][_0x2315('0x63')]);_0x522acc[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0xb1bec4[_0x2315('0x4c')]);_0x522acc['filters']=_[_0x2315('0x65')](_0x522acc[_0x2315('0x48')],_0x522acc[_0x2315('0x4c')]);_0x2ac5d6[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x522acc[_0x2315('0x48')],qs['fields'](_0xb1bec4['query'][_0x2315('0x4f')]));_0x2ac5d6[_0x2315('0x4e')]=_0x2ac5d6[_0x2315('0x4e')][_0x2315('0x50')]?_0x2ac5d6[_0x2315('0x4e')]:_0x522acc[_0x2315('0x48')];if(!_0xb1bec4[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x2ac5d6[_0x2315('0x53')]=qs[_0x2315('0x53')](_0xb1bec4['query'][_0x2315('0x53')]);_0x2ac5d6[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0xb1bec4['query'][_0x2315('0x2d')]);}_0x2ac5d6[_0x2315('0x54')]=qs[_0x2315('0x55')](_0xb1bec4[_0x2315('0x4c')][_0x2315('0x55')]);_0x2ac5d6[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0xb1bec4[_0x2315('0x4c')],_0x522acc[_0x2315('0x4d')]));_0x2ac5d6[_0x2315('0x56')][_0x2315('0xce')]=_0x537f91['id'];if(_0xb1bec4[_0x2315('0x4c')][_0x2315('0x3b')]){_0x2ac5d6[_0x2315('0x56')]=_[_0x2315('0x57')](_0x2ac5d6[_0x2315('0x56')],{'$or':_[_0x2315('0x3c')](_0x2ac5d6['attributes'],function(_0x270d6f){var _0x370add={};_0x370add[_0x270d6f]={'$like':'%'+_0xb1bec4[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x370add;})});}_0x2ac5d6=_[_0x2315('0x57')]({},_0x2ac5d6,_0xb1bec4[_0x2315('0x5e')]);return db[_0x2315('0xd6')][_0x2315('0x2c')]({'where':_0x2ac5d6[_0x2315('0x56')]})['then'](function(_0x3e6f92){_0x2643ca[_0x2315('0x2c')]=_0x3e6f92;if(_0xb1bec4[_0x2315('0x4c')][_0x2315('0x60')]){_0x2ac5d6[_0x2315('0x61')]=[{'all':!![]}];}return db[_0x2315('0xd6')][_0x2315('0xa9')](_0x2ac5d6);})[_0x2315('0x1e')](function(_0x527360){_0x2643ca[_0x2315('0x62')]=_0x527360;return _0x2643ca;});}})[_0x2315('0x1e')](respondWithFilteredResult(_0x395f87,_0x2ac5d6))[_0x2315('0x29')](handleError(_0x395f87,null));};exports[_0x2315('0xd7')]=function(_0x20f504,_0xaa1c02,_0x141d93){var _0xbd1c7e={};var _0x5c9713={};var _0x286378;var _0x9874ae;return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x20f504[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0xaa1c02,null))[_0x2315('0x1e')](function(_0x2488ed){if(_0x2488ed){_0x286378=_0x2488ed;_0x5c9713[_0x2315('0x48')]=_[_0x2315('0x4a')](db['SmsInteraction']['rawAttributes']);_0x5c9713[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x20f504[_0x2315('0x4c')]);_0x5c9713['filters']=_[_0x2315('0x65')](_0x5c9713['model'],_0x5c9713[_0x2315('0x4c')]);_0xbd1c7e[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x5c9713[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x20f504[_0x2315('0x4c')][_0x2315('0x4f')]));_0xbd1c7e[_0x2315('0x4e')]=_0xbd1c7e[_0x2315('0x4e')]['length']?_0xbd1c7e['attributes']:_0x5c9713[_0x2315('0x48')];_0xbd1c7e[_0x2315('0x54')]=qs[_0x2315('0x55')](_0x20f504[_0x2315('0x4c')][_0x2315('0x55')]);_0xbd1c7e[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x20f504['query'],_0x5c9713[_0x2315('0x4d')]));if(_0x20f504[_0x2315('0x4c')][_0x2315('0x3b')]){_0xbd1c7e['where']=_[_0x2315('0x57')](_0xbd1c7e[_0x2315('0x56')],{'$or':_[_0x2315('0x3c')](_0xbd1c7e[_0x2315('0x4e')],function(_0xfabf29){var _0x86f690={};_0x86f690[_0xfabf29]={'$like':'%'+_0x20f504['query'][_0x2315('0x3b')]+'%'};return _0x86f690;})});}_0xbd1c7e=_['merge']({},_0xbd1c7e,_0x20f504[_0x2315('0x5e')]);return _0x286378[_0x2315('0xd7')](_0xbd1c7e);}})[_0x2315('0x1e')](function(_0x2b2e87){if(_0x2b2e87){_0x9874ae=_0x2b2e87[_0x2315('0x50')];if(!_0x20f504[_0x2315('0x4c')][_0x2315('0x51')]('nolimit')){_0xbd1c7e[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x20f504['query']['limit']);_0xbd1c7e['offset']=qs[_0x2315('0x2d')](_0x20f504[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x286378['getSmsInteractions'](_0xbd1c7e);}})[_0x2315('0x1e')](function(_0x1f632a){if(_0x1f632a){return _0x1f632a?{'count':_0x9874ae,'rows':_0x1f632a}:null;}})['then'](respondWithResult(_0xaa1c02,null))[_0x2315('0x29')](handleError(_0xaa1c02,null));};exports[_0x2315('0xd8')]=function(_0x1c3f00,_0x564125,_0x994931){var _0x57f87b={};var _0x23f897={};var _0x1cb1c9;var _0x8e880;return db[_0x2315('0x5f')]['findOne']({'where':{'id':_0x1c3f00['params']['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x564125,null))[_0x2315('0x1e')](function(_0x4352a4){if(_0x4352a4){_0x1cb1c9=_0x4352a4;_0x23f897[_0x2315('0x48')]=_[_0x2315('0x4a')](db[_0x2315('0xd9')][_0x2315('0x63')]);_0x23f897[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x1c3f00['query']);_0x23f897['filters']=_[_0x2315('0x65')](_0x23f897[_0x2315('0x48')],_0x23f897[_0x2315('0x4c')]);_0x57f87b[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x23f897[_0x2315('0x48')],qs['fields'](_0x1c3f00[_0x2315('0x4c')][_0x2315('0x4f')]));_0x57f87b[_0x2315('0x4e')]=_0x57f87b['attributes'][_0x2315('0x50')]?_0x57f87b[_0x2315('0x4e')]:_0x23f897[_0x2315('0x48')];_0x57f87b['order']=qs[_0x2315('0x55')](_0x1c3f00['query'][_0x2315('0x55')]);_0x57f87b['where']=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x1c3f00[_0x2315('0x4c')],_0x23f897['filters']));if(_0x1c3f00[_0x2315('0x4c')][_0x2315('0x3b')]){_0x57f87b['where']=_[_0x2315('0x57')](_0x57f87b['where'],{'$or':_[_0x2315('0x3c')](_0x57f87b[_0x2315('0x4e')],function(_0x3a6e20){var _0x1aaa09={};_0x1aaa09[_0x3a6e20]={'$like':'%'+_0x1c3f00[_0x2315('0x4c')]['filter']+'%'};return _0x1aaa09;})});}_0x57f87b=_[_0x2315('0x57')]({},_0x57f87b,_0x1c3f00[_0x2315('0x5e')]);return _0x1cb1c9[_0x2315('0xd8')](_0x57f87b);}})[_0x2315('0x1e')](function(_0x3bdf31){if(_0x3bdf31){_0x8e880=_0x3bdf31['length'];if(!_0x1c3f00[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x57f87b['limit']=qs[_0x2315('0x53')](_0x1c3f00['query'][_0x2315('0x53')]);_0x57f87b[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0x1c3f00[_0x2315('0x4c')][_0x2315('0x2d')]);}return _0x1cb1c9[_0x2315('0xd8')](_0x57f87b);}})[_0x2315('0x1e')](function(_0x5115e2){if(_0x5115e2){return _0x5115e2?{'count':_0x8e880,'rows':_0x5115e2}:null;}})['then'](respondWithResult(_0x564125,null))[_0x2315('0x29')](handleError(_0x564125,null));};exports[_0x2315('0xda')]=function(_0x1dca06,_0x3684f5,_0x113096){var _0x3b0d58;var _0x44865e;var _0x26b6aa;var _0x2f9a59=!_['isNil'](_0x1dca06[_0x2315('0x68')]['id'])?_0x1dca06['params']['id']:!_[_0x2315('0x74')](_0x1dca06[_0x2315('0x36')]['id'])?_0x1dca06[_0x2315('0x36')]['id']:null;return db[_0x2315('0x5f')][_0x2315('0x40')]({'where':{'id':_0x2f9a59,'role':_0x2315('0x38')},'attributes':['id',_0x2315('0x41'),'phone','mobile','role','internal','loginInPause']})['then'](handleEntityNotFound(_0x3684f5,null))['then'](function(_0x5d1818){if(_0x5d1818){_0x3b0d58=_0x5d1818;if(_0x1dca06[_0x2315('0x67')][_0x2315('0x9e')]){_0x26b6aa=util[_0x2315('0xab')](_0x2315('0xdb'),_0x3b0d58[_0x1dca06[_0x2315('0x67')]['interface']]);}else if(_0x1dca06[_0x2315('0x67')][_0x2315('0xdc')]){_0x26b6aa=util[_0x2315('0xab')](_0x2315('0xac'),_0x1dca06['body'][_0x2315('0xdc')]);}else{_0x26b6aa=util['format']('SIP/%s',_0x3b0d58[_0x2315('0x41')]);}socket['to'](util[_0x2315('0xab')](_0x2315('0xdd'),_0x3b0d58['name']))[_0x2315('0xa6')](_0x2315('0xde'),{'ip':_0x1dca06[_0x2315('0xdf')][_0x2315('0xe0')]||_0x1dca06[_0x2315('0xe1')][_0x2315('0xe2')]||_0x1dca06[_0x2315('0xe3')][_0x2315('0xe2')]||_0x1dca06[_0x2315('0xe1')][_0x2315('0xe3')][_0x2315('0xe2')]});return db[_0x2315('0xae')][_0x2315('0x43')]({'where':{'membername':_0x3b0d58['name']},'individualHooks':!![]});}})[_0x2315('0x1e')](function(_0x4b386c){if(_0x3b0d58){return _0x3b0d58[_0x2315('0xe4')]({'raw':!![]});}})['then'](function(_0x4e5597){var _0x2db3af=[];if(_0x4e5597){_0x44865e=_0x4e5597;if(_0x44865e[_0x2315('0x50')]){for(var _0x3846c8=0x0;_0x3846c8<_0x44865e[_0x2315('0x50')];_0x3846c8++){_0x2db3af[_0x2315('0xaa')]({'membername':_0x3b0d58[_0x2315('0x41')],'UserId':_0x3b0d58['id'],'queue_name':_0x44865e[_0x3846c8][_0x2315('0x41')],'VoiceQueueId':_0x44865e[_0x3846c8]['id'],'interface':_0x26b6aa,'paused':_0x3b0d58[_0x2315('0x9c')]||![],'penalty':_0x44865e[_0x3846c8]['UserVoiceQueue.penalty']||0x0});}return BPromise['each'](_0x2db3af,function(_0x43be2b){return db['UserVoiceQueueRt']['upsert'](_0x43be2b);});}}})['then'](function(){return db[_0x2315('0xe5')][_0x2315('0xa9')]({'where':{'membername':_0x3b0d58[_0x2315('0x41')],'exitAt':null}});})['then'](function(_0x323625){var _0x4c1504=[];_0x323625['forEach'](function(_0x37630f){_0x4c1504['push'](_0x37630f[_0x2315('0x33')]({'exitAt':moment()[_0x2315('0xab')](_0x2315('0xe6'))}));});return BPromise[_0x2315('0xe7')](_0x4c1504);})[_0x2315('0x1e')](function(){var _0x4f0899=[];var _0x2a0ee7=[];var _0x2abf37=utils['getChannels']();var _0x246764={'membername':_0x3b0d58['name'],'interface':_0x26b6aa,'enterAt':moment()[_0x2315('0xab')](_0x2315('0xe6')),'role':_0x3b0d58[_0x2315('0x3f')],'internal':_0x3b0d58[_0x2315('0x70')]};_0x2abf37[_0x2315('0xe8')](function(_0x7b03e9){_0x4f0899['push'](_[_0x2315('0x57')]({'channel':_0x7b03e9,'type':_0x2315('0xe9'),'data1':_0x1dca06[_0x2315('0x67')][_0x2315('0xea')],'data2':_0x26b6aa},_0x246764));if(_0x3b0d58['loginInPause']){_0x2a0ee7[_0x2315('0xaa')](_[_0x2315('0x57')]({'channel':_0x7b03e9,'type':'PAUSE','data1':'LOGININPAUSE'},_0x246764));}});return db[_0x2315('0xe5')][_0x2315('0x66')](_0x4f0899['concat'](_0x2a0ee7),{'individualHooks':!![]});})[_0x2315('0x1e')](function(){return _0x3b0d58[_0x2315('0x33')]({'online':!![],'lastLoginAt':moment()[_0x2315('0xab')]('YYYY-MM-DD\x20HH:mm:ss'),'voicePause':_0x3b0d58[_0x2315('0x9c')]||![],'mailPause':_0x3b0d58['loginInPause']||![],'chatPause':_0x3b0d58[_0x2315('0x9c')]||![],'faxPause':_0x3b0d58[_0x2315('0x9c')]||![],'smsPause':_0x3b0d58[_0x2315('0x9c')]||![],'openchannelPause':_0x3b0d58['loginInPause']||![],'pauseType':_0x3b0d58[_0x2315('0x9c')]?_0x2315('0xeb'):null,'interface':_0x26b6aa,'lastPauseAt':moment()['format'](_0x2315('0xe6'))});})['then'](function(_0x4791d1){if(_0x1dca06[_0x2315('0xec')]){return _0x113096();}else{return BPromise[_0x2315('0xed')](_0x4791d1)[_0x2315('0x1e')](respondWithResult(_0x3684f5,null));}})[_0x2315('0x29')](handleError(_0x3684f5,null));};exports[_0x2315('0xee')]=function(_0x3d8b3a,_0x1771e9,_0x45f7c4){var _0x3ad85c;return db['User'][_0x2315('0x40')]({'where':{'id':_0x3d8b3a[_0x2315('0x68')]['id'],'role':'agent'},'attributes':['id',_0x2315('0x41'),_0x2315('0x3f')]})['then'](handleEntityNotFound(_0x1771e9,null))[_0x2315('0x1e')](function(_0x426e60){if(_0x426e60){_0x3ad85c=_0x426e60;return db[_0x2315('0xae')][_0x2315('0x43')]({'where':{'membername':_0x3ad85c[_0x2315('0x41')]},'individualHooks':!![]});}})[_0x2315('0x1e')](function(){return db[_0x2315('0xe5')]['findAll']({'where':{'membername':_0x3ad85c[_0x2315('0x41')],'exitAt':null}});})[_0x2315('0x1e')](function(_0x2b6299){var _0x9dea22=[];_0x2b6299['forEach'](function(_0x2080fc){_0x9dea22[_0x2315('0xaa')](_0x2080fc[_0x2315('0x33')]({'exitAt':moment()[_0x2315('0xab')]('YYYY-MM-DD\x20HH:mm:ss')}));});return BPromise[_0x2315('0xe7')](_0x9dea22);})[_0x2315('0x1e')](function(){return _0x3ad85c[_0x2315('0x33')]({'online':![],'lastLoginAt':null,'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'interface':null});})[_0x2315('0x1e')](respondWithResult(_0x1771e9,null))[_0x2315('0x29')](handleError(_0x1771e9,null));};exports[_0x2315('0xef')]=function(_0x5c8655,_0x16fb3b,_0x9c84d3){var _0x3bded1;return db[_0x2315('0xae')][_0x2315('0x33')]({'paused':0x1},{'where':{'UserId':_0x5c8655[_0x2315('0x68')]['id']},'individualHooks':!![]})['then'](function(){return db[_0x2315('0x5f')]['find']({'where':{'id':_0x5c8655['params']['id'],'role':'agent'},'attributes':['id','name',_0x2315('0x3f'),_0x2315('0x70'),_0x2315('0x9e')]});})['then'](handleEntityNotFound(_0x16fb3b,null))[_0x2315('0x1e')](function(_0x1edacb){if(_0x1edacb){_0x3bded1=_0x1edacb;return respondWithRpcPromise(_0x2315('0xf0'),'pause',{'id':_0x3bded1['id'],'name':_0x3bded1[_0x2315('0x41')],'pause':!![]});}})[_0x2315('0x1e')](function(){if(_0x3bded1){return db[_0x2315('0xe5')][_0x2315('0xa9')]({'where':{'membername':_0x3bded1['name'],'type':_0x2315('0xf1'),'exitAt':null}});}})['then'](function(_0x31e48a){if(_0x31e48a[_0x2315('0x50')]){var _0x1ebc45=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');for(var _0x43fc1d=0x0,_0x276ffc=_0x31e48a[_0x2315('0x50')];_0x43fc1d<_0x276ffc;_0x43fc1d++){_0x31e48a[_0x43fc1d][_0x2315('0xf2')]({'exitAt':_0x1ebc45});}}})[_0x2315('0x1e')](function(){var _0x16efa1=[];var _0xff5f27=utils['getChannels']();_0xff5f27['forEach'](function(_0x302d1a){_0x16efa1['push']({'channel':_0x302d1a,'membername':_0x3bded1[_0x2315('0x41')],'interface':_['isNil'](_0x3bded1['interface'])?util[_0x2315('0xab')](_0x2315('0xac'),_0x3bded1['name']):_0x3bded1[_0x2315('0x9e')],'type':_0x2315('0xf1'),'enterAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'data1':_0x5c8655[_0x2315('0x67')][_0x2315('0xf3')]||_0x2315('0xf4'),'role':_0x3bded1[_0x2315('0x3f')],'internal':_0x3bded1[_0x2315('0x70')]});});return db['MemberReport'][_0x2315('0x66')](_0x16efa1,{'individualHooks':!![]});})[_0x2315('0x1e')](function(){return _0x3bded1['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'pauseType':_0x5c8655[_0x2315('0x67')]['type']||_0x2315('0xf4'),'lastPauseAt':moment()[_0x2315('0xab')](_0x2315('0xe6'))});})[_0x2315('0x1e')](respondWithResult(_0x16fb3b,null))[_0x2315('0x29')](handleError(_0x16fb3b,null));};exports['unpause']=function(_0x2586b4,_0x4b29f9,_0x293157){var _0x28efce;return db[_0x2315('0x5f')][_0x2315('0x40')]({'where':{'id':_0x2586b4[_0x2315('0x68')]['id']},'attributes':['id','name',_0x2315('0x3f'),_0x2315('0x9d'),_0x2315('0xf5'),_0x2315('0xf6'),_0x2315('0xf7'),_0x2315('0xf8'),_0x2315('0xf9'),_0x2315('0xfa'),'lastPauseAt']})[_0x2315('0x1e')](handleEntityNotFound(_0x4b29f9,null))[_0x2315('0x1e')](function(_0x57490a){if(_0x57490a){_0x28efce=_0x57490a;if(_0x2586b4[_0x2315('0x67')][_0x2315('0x9a')]&&!utils[_0x2315('0x9f')](_0x2586b4['body'][_0x2315('0x9a')])){throw new db[(_0x2315('0x91'))]['ValidationError'](_0x2315('0xc4'));}switch(_0x2586b4[_0x2315('0x67')][_0x2315('0x9a')]){case _0x2315('0xa7'):return respondWithRpcPromise('QueuePause',_0x2315('0xfb'),{'id':_0x28efce['id'],'name':_0x28efce[_0x2315('0x41')],'pause':![]})[_0x2315('0x1e')](function(){return db[_0x2315('0xae')][_0x2315('0x33')]({'paused':0x0},{'where':{'UserId':_0x28efce['id']},'individualHooks':!![]});})[_0x2315('0x1e')](function(){return db[_0x2315('0xe5')][_0x2315('0x40')]({'where':{'channel':_0x2586b4[_0x2315('0x67')][_0x2315('0x9a')],'membername':_0x28efce[_0x2315('0x41')],'type':_0x2315('0xf1'),'exitAt':null}});})[_0x2315('0x1e')](function(_0x1ae922){if(_0x1ae922){return _0x1ae922[_0x2315('0x33')]({'exitAt':moment()['format'](_0x2315('0xe6')),'data2':'manual'},{'individualHooks':!![]});}return null;})[_0x2315('0x1e')](function(){return _0x28efce[_0x2315('0x33')]({'voicePause':![]});});case _0x2315('0xfc'):case'chat':case'fax':case _0x2315('0xfd'):case _0x2315('0xfe'):return db['MemberReport'][_0x2315('0x40')]({'where':{'channel':_0x2586b4[_0x2315('0x67')][_0x2315('0x9a')],'membername':_0x28efce[_0x2315('0x41')],'type':_0x2315('0xf1'),'exitAt':null}})[_0x2315('0x1e')](function(_0x288ef8){if(_0x288ef8){return _0x288ef8[_0x2315('0x33')]({'exitAt':moment()['format'](_0x2315('0xe6')),'data2':'manual'},{'individualHooks':!![]});}return null;})['then'](function(){var _0x2dc9b7={};_[_0x2315('0x2e')](_0x2dc9b7,util[_0x2315('0xab')]('%s%s',_0x2586b4[_0x2315('0x67')][_0x2315('0x9a')],_0x2315('0xff')),![]);return _0x28efce['update'](_0x2dc9b7);});default:return respondWithRpcPromise('QueuePause',_0x2315('0xfb'),{'id':_0x28efce['id'],'name':_0x28efce['name'],'pause':![]})[_0x2315('0x1e')](function(){return db[_0x2315('0xae')][_0x2315('0x33')]({'paused':0x0},{'where':{'UserId':_0x28efce['id']}});})['then'](function(){return db['MemberReport']['findAll']({'where':{'membername':_0x28efce['name'],'type':_0x2315('0xf1'),'exitAt':null}});})['then'](function(_0x542b1d){var _0x33157f=[];_0x542b1d[_0x2315('0xe8')](function(_0x3c6420){_0x33157f[_0x2315('0xaa')](_0x3c6420[_0x2315('0x33')]({'exitAt':moment()[_0x2315('0xab')](_0x2315('0xe6')),'data2':_0x2315('0x100')}));});return BPromise[_0x2315('0xe7')](_0x33157f);})['then'](function(){return _0x28efce[_0x2315('0x33')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});});}}})[_0x2315('0x1e')](respondWithResult(_0x4b29f9,null))[_0x2315('0x29')](handleError(_0x4b29f9,null));};exports[_0x2315('0x101')]=function(_0x3f44c6,_0x489924,_0x36919f){var _0x2c02f8={};var _0x1eb8f0={};var _0x29b55e;var _0x5b69ba;return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x3f44c6[_0x2315('0x68')]['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x489924,null))[_0x2315('0x1e')](function(_0x2ba2f0){if(_0x2ba2f0){_0x29b55e=_0x2ba2f0;_0x1eb8f0[_0x2315('0x48')]=_[_0x2315('0x4a')](db[_0x2315('0x102')][_0x2315('0x63')]);_0x1eb8f0[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x3f44c6['query']);_0x1eb8f0[_0x2315('0x4d')]=_[_0x2315('0x65')](_0x1eb8f0[_0x2315('0x48')],_0x1eb8f0['query']);_0x2c02f8[_0x2315('0x4e')]=_['intersection'](_0x1eb8f0['model'],qs[_0x2315('0x4f')](_0x3f44c6[_0x2315('0x4c')][_0x2315('0x4f')]));_0x2c02f8[_0x2315('0x4e')]=_0x2c02f8[_0x2315('0x4e')][_0x2315('0x50')]?_0x2c02f8['attributes']:_0x1eb8f0['model'];_0x2c02f8[_0x2315('0x54')]=qs[_0x2315('0x55')](_0x3f44c6[_0x2315('0x4c')][_0x2315('0x55')]);_0x2c02f8['where']=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x3f44c6[_0x2315('0x4c')],_0x1eb8f0[_0x2315('0x4d')]));if(_0x3f44c6[_0x2315('0x4c')]['filter']){_0x2c02f8[_0x2315('0x56')]=_[_0x2315('0x57')](_0x2c02f8[_0x2315('0x56')],{'$or':_['map'](_0x2c02f8[_0x2315('0x4e')],function(_0x44e702){var _0x223ffb={};_0x223ffb[_0x44e702]={'$like':'%'+_0x3f44c6[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x223ffb;})});}_0x2c02f8=_[_0x2315('0x57')]({},_0x2c02f8,_0x3f44c6[_0x2315('0x5e')]);return _0x29b55e['getTeams'](_0x2c02f8);}})[_0x2315('0x1e')](function(_0x4ad36a){if(_0x4ad36a){_0x5b69ba=_0x4ad36a[_0x2315('0x50')];if(!_0x3f44c6[_0x2315('0x4c')][_0x2315('0x51')](_0x2315('0x52'))){_0x2c02f8[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x3f44c6[_0x2315('0x4c')][_0x2315('0x53')]);_0x2c02f8['offset']=qs[_0x2315('0x2d')](_0x3f44c6[_0x2315('0x4c')]['offset']);}return _0x29b55e[_0x2315('0x101')](_0x2c02f8);}})[_0x2315('0x1e')](function(_0x2747fa){if(_0x2747fa){return _0x2747fa?{'count':_0x5b69ba,'rows':_0x2747fa}:null;}})[_0x2315('0x1e')](respondWithResult(_0x489924,null))[_0x2315('0x29')](handleError(_0x489924,null));};exports[_0x2315('0x103')]=function(_0x506a7a,_0x6b1767,_0x3b0a37){return db['User'][_0x2315('0x40')]({'where':{'id':_0x506a7a[_0x2315('0x68')]['id']}})['then'](handleEntityNotFound(_0x6b1767,null))[_0x2315('0x1e')](function(_0x13a100){if(_0x13a100){return _0x13a100['addTeams'](_0x506a7a[_0x2315('0x67')][_0x2315('0xa3')],_['omit'](_0x506a7a[_0x2315('0x67')],[_0x2315('0xa3'),'id'])||{});}})[_0x2315('0x1e')](respondWithResult(_0x6b1767,null))[_0x2315('0x29')](handleError(_0x6b1767,null));};exports['removeTeams']=function(_0x211e12,_0x51161c,_0x76c9ab){return db['User'][_0x2315('0x40')]({'where':{'id':_0x211e12[_0x2315('0x68')]['id']}})['then'](handleEntityNotFound(_0x51161c,null))[_0x2315('0x1e')](function(_0x24f285){if(_0x24f285){return _0x24f285[_0x2315('0x104')](_0x211e12['query'][_0x2315('0xa3')]);}})[_0x2315('0x1e')](respondWithStatusCode(_0x51161c,null))[_0x2315('0x29')](handleError(_0x51161c,null));};exports[_0x2315('0x105')]=function(_0x24aadc,_0x37c4a3,_0x491872){var _0x2f50f2={};var _0x47ffca={};var _0x13d394;var _0x287210;return db['User'][_0x2315('0x98')]({'where':{'id':_0x24aadc['params']['id']}})[_0x2315('0x1e')](handleEntityNotFound(_0x37c4a3,null))[_0x2315('0x1e')](function(_0xc626a8){if(_0xc626a8){_0x13d394=_0xc626a8;_0x47ffca['model']=_[_0x2315('0x4a')](db[_0x2315('0xbd')][_0x2315('0x63')]);_0x47ffca[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x24aadc[_0x2315('0x4c')]);_0x47ffca[_0x2315('0x4d')]=_['intersection'](_0x47ffca[_0x2315('0x48')],_0x47ffca[_0x2315('0x4c')]);_0x2f50f2[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x47ffca[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x24aadc[_0x2315('0x4c')]['fields']));_0x2f50f2['attributes']=_0x2f50f2[_0x2315('0x4e')][_0x2315('0x50')]?_0x2f50f2['attributes']:_0x47ffca[_0x2315('0x48')];_0x2f50f2[_0x2315('0x54')]=qs['sort'](_0x24aadc[_0x2315('0x4c')][_0x2315('0x55')]);_0x2f50f2['where']=qs[_0x2315('0x4d')](_['pick'](_0x24aadc[_0x2315('0x4c')],_0x47ffca[_0x2315('0x4d')]));if(_0x24aadc['query'][_0x2315('0x3b')]){_0x2f50f2[_0x2315('0x56')]=_['merge'](_0x2f50f2['where'],{'$or':_[_0x2315('0x3c')](_0x2f50f2[_0x2315('0x4e')],function(_0x33cbc4){var _0x313c9a={};_0x313c9a[_0x33cbc4]={'$like':'%'+_0x24aadc[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x313c9a;})});}_0x2f50f2=_[_0x2315('0x57')]({},_0x2f50f2,_0x24aadc['options']);return _0x13d394[_0x2315('0x105')](_0x2f50f2);}})[_0x2315('0x1e')](function(_0x222a3f){if(_0x222a3f){_0x287210=_0x222a3f[_0x2315('0x50')];if(!_0x24aadc[_0x2315('0x4c')]['hasOwnProperty'](_0x2315('0x52'))){_0x2f50f2[_0x2315('0x53')]=qs[_0x2315('0x53')](_0x24aadc[_0x2315('0x4c')][_0x2315('0x53')]);_0x2f50f2[_0x2315('0x2d')]=qs[_0x2315('0x2d')](_0x24aadc[_0x2315('0x4c')]['offset']);}return _0x13d394['getLists'](_0x2f50f2);}})[_0x2315('0x1e')](function(_0x1c1d2d){if(_0x1c1d2d){return _0x1c1d2d?{'count':_0x287210,'rows':_0x1c1d2d}:null;}})[_0x2315('0x1e')](respondWithResult(_0x37c4a3,null))[_0x2315('0x29')](handleError(_0x37c4a3,null));};exports[_0x2315('0x106')]=function(_0x1365a4,_0x217e92,_0x5b8c30){var _0x90ce8f={};var _0x5095e4={};var _0x1b66bf;var _0x3486a8;return db[_0x2315('0x5f')][_0x2315('0x98')]({'where':{'id':_0x1365a4['params']['id']}})['then'](handleEntityNotFound(_0x217e92,null))[_0x2315('0x1e')](function(_0x1aca78){if(_0x1aca78){_0x1b66bf=_0x1aca78;_0x5095e4[_0x2315('0x48')]=_['keys'](db[_0x2315('0x5f')]['rawAttributes']);_0x5095e4[_0x2315('0x4c')]=_[_0x2315('0x4a')](_0x1365a4[_0x2315('0x4c')]);_0x5095e4['filters']=_[_0x2315('0x65')](_0x5095e4['model'],_0x5095e4['query']);_0x90ce8f[_0x2315('0x4e')]=_[_0x2315('0x65')](_0x5095e4[_0x2315('0x48')],qs[_0x2315('0x4f')](_0x1365a4[_0x2315('0x4c')][_0x2315('0x4f')]));_0x90ce8f[_0x2315('0x4e')]=_0x90ce8f[_0x2315('0x4e')][_0x2315('0x50')]?_0x90ce8f[_0x2315('0x4e')]:_0x5095e4[_0x2315('0x48')];_0x90ce8f[_0x2315('0x54')]=qs[_0x2315('0x55')](_0x1365a4[_0x2315('0x4c')][_0x2315('0x55')]);_0x90ce8f[_0x2315('0x56')]=qs[_0x2315('0x4d')](_[_0x2315('0xc6')](_0x1365a4[_0x2315('0x4c')],_0x5095e4[_0x2315('0x4d')]));if(_0x1365a4[_0x2315('0x4c')][_0x2315('0x3b')]){_0x90ce8f[_0x2315('0x56')]=_['merge'](_0x90ce8f['where'],{'$or':_[_0x2315('0x3c')](_0x90ce8f[_0x2315('0x4e')],function(_0xdfe0f3){var _0x55d048={};_0x55d048[_0xdfe0f3]={'$like':'%'+_0x1365a4[_0x2315('0x4c')][_0x2315('0x3b')]+'%'};return _0x55d048;})});}_0x90ce8f[_0x2315('0x48')]=db[_0x2315('0x5f')];_0x90ce8f['as']='Agents';_0x90ce8f=_[_0x2315('0x57')]({},_0x90ce8f,_0x1365a4['options']);return _0x1b66bf[_0x2315('0xe4')]({'include':[_0x90ce8f]});}})['then'](function(_0x210ec3){if(_0x210ec3){var _0x10578a={},_0x23da22=[],_0x140065=0x0;for(var _0x14ba8b=0x0;_0x14ba8b<_0x210ec3[_0x2315('0x50')];_0x14ba8b+=0x1){for(var _0x495fd1=0x0,_0x15c135;_0x495fd1<_0x210ec3[_0x14ba8b][_0x2315('0x37')]['length'];_0x495fd1+=0x1){_0x15c135=_0x210ec3[_0x14ba8b]['Agents'][_0x495fd1]['get']({'plain':!![]});_0x10578a[_0x15c135['id']]=_0x15c135;}}_0x10578a=_['values'](_0x10578a);for(var _0x5c4d5d=qs[_0x2315('0x2d')](_0x1365a4[_0x2315('0x4c')]['offset']);_0x5c4d5d<_0x10578a[_0x2315('0x50')]&&_0x23da22[_0x2315('0x50')]=_0x24f75[_0x0d8b('0x4e')]){throw new Error(_0x0d8b('0x4f'));}})[_0x0d8b('0xd')](function(){if(_0x156859){return db[_0x0d8b('0x2b')]['destroy']({'where':{'membername':_0x156859[_0x0d8b('0x27')]},'individualHooks':!![]});}})[_0x0d8b('0xd')](function(){if(_0x156859){return _0x156859['getVoiceQueues']({'raw':!![]});}})[_0x0d8b('0xd')](function(_0x105df9){if(_0x156859){if(_0x105df9){var _0x303d6=[];_0x40d265=_0x105df9;if(_0x40d265[_0x0d8b('0x2d')]){for(var _0x16141a=0x0;_0x16141a<_0x40d265[_0x0d8b('0x2d')];_0x16141a++){_0x303d6[_0x0d8b('0x2f')](db[_0x0d8b('0x2b')][_0x0d8b('0x50')]({'membername':_0x156859[_0x0d8b('0x27')],'UserId':_0x156859['id'],'queue_name':_0x40d265[_0x16141a][_0x0d8b('0x27')],'VoiceQueueId':_0x40d265[_0x16141a]['id'],'interface':_0x1ca60c,'paused':_0x156859[_0x0d8b('0x4a')]||![],'penalty':_0x40d265[_0x16141a]['UserVoiceQueue.penalty']||0x0}));}return BPromise[_0x0d8b('0x47')](_0x303d6);}}}})[_0x0d8b('0xd')](function(){if(_0x156859){return db[_0x0d8b('0x35')]['findAll']({'where':{'membername':_0x156859['name'],'exitAt':null}});}})[_0x0d8b('0xd')](function(_0x3aeb45){if(_0x156859){if(_0x3aeb45&&_0x3aeb45[_0x0d8b('0x2d')]){var _0x5b76af=[];_0x3aeb45['forEach'](function(_0x42de18){_0x5b76af[_0x0d8b('0x2f')](_0x42de18[_0x0d8b('0x2c')]({'exitAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31'))}));});return BPromise[_0x0d8b('0x47')](_0x5b76af);}}})[_0x0d8b('0xd')](function(_0x2c826b){if(_0x156859){var _0x20a3dd=[];var _0x3a5aea=[];var _0x195901=utils[_0x0d8b('0x51')]();var _0x3b060e={'membername':_0x156859['name'],'interface':_0x1ca60c,'enterAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'role':_0x156859['role'],'internal':_0x156859['internal']};_0x195901[_0x0d8b('0x2e')](function(_0x1dad9f){_0x20a3dd[_0x0d8b('0x2f')](_[_0x0d8b('0x52')]({'channel':_0x1dad9f,'type':_0x0d8b('0x53'),'data1':_0x0d8b('0x54'),'data2':_0x1ca60c},_0x3b060e));if(_0x156859['loginInPause']){_0x3a5aea['push'](_['merge']({'channel':_0x1dad9f,'type':_0x0d8b('0x44'),'data1':_0x0d8b('0x55')},_0x3b060e));}});return db[_0x0d8b('0x35')][_0x0d8b('0x36')](_0x20a3dd[_0x0d8b('0x56')](_0x3a5aea),{'individualHooks':!![]});}})[_0x0d8b('0xd')](function(){if(_0x156859){return _0x156859['update']({'online':!![],'lastLoginAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'voicePause':_0x156859['loginInPause']||![],'mailPause':_0x156859[_0x0d8b('0x4a')]||![],'chatPause':_0x156859['loginInPause']||![],'faxPause':_0x156859[_0x0d8b('0x4a')]||![],'smsPause':_0x156859[_0x0d8b('0x4a')]||![],'openchannelPause':_0x156859[_0x0d8b('0x4a')]||![],'pauseType':_0x156859[_0x0d8b('0x4a')]?_0x0d8b('0x55'):null,'lastPauseAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'interface':_0x1ca60c});}})[_0x0d8b('0xd')](function(_0x391121){_0x435090(_0x391121);})[_0x0d8b('0x18')](function(_0x276558){_0x2ab72b(_0x70e4b2[_0x0d8b('0x14')](0x1f4,_0x276558['message']));});});};
\ No newline at end of file
+var _0xd8b0=['util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','redis','localhost','./user.socket','register','then','info','User,\x20%s,\x20%s','request\x20sent','debug','User,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetUser','User','findAll','raw','options','attributes','limit','include','model','map','ShowUser','find','where','PauseUser','name','role','internal','interface','UserVoiceQueueRt','update','length','forEach','push','format','YYYY-MM-DD\x20HH:mm:ss','body','DEFAULT\x20PAUSE','uniqueid','MemberReport','bulkCreate','type','UnpauseUser','channel','Unknown\x20channel','voice','system','mail','chat','fax','sms','set','%s%s','Pause','PAUSE','findOne','destroy','all','LoginUser','mobile','loginInPause','count','agent','getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','upsert','getChannels','merge','LOGIN','callysquare','LOGININPAUSE','concat','lodash'];(function(_0x39a52c,_0x451bdf){var _0x5ce01e=function(_0x556813){while(--_0x556813){_0x39a52c['push'](_0x39a52c['shift']());}};_0x5ce01e(++_0x451bdf);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0d8b('0x2'));var db=require(_0x0d8b('0x3'))['db'];var utils=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0d8b('0x7')][_0x0d8b('0x8')]({'port':0x232a});config[_0x0d8b('0x9')]=_['defaults'](config[_0x0d8b('0x9')],{'host':_0x0d8b('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0d8b('0x9')]));require(_0x0d8b('0xb'))[_0x0d8b('0xc')](socket);function respondWithRpcPromise(_0x1f4800,_0x28ff7f,_0x1cac62){return new BPromise(function(_0x2c5e9e,_0x28f87c){return client['request'](_0x1f4800,_0x1cac62)[_0x0d8b('0xd')](function(_0x4e0269){logger[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x28ff7f,_0x0d8b('0x10'));logger[_0x0d8b('0x11')](_0x0d8b('0x12'),_0x28ff7f,_0x0d8b('0x10'),JSON[_0x0d8b('0x13')](_0x4e0269));if(_0x4e0269[_0x0d8b('0x14')]){if(_0x4e0269[_0x0d8b('0x14')][_0x0d8b('0x15')]===0x1f4){logger[_0x0d8b('0x14')](_0x0d8b('0xf'),_0x28ff7f,_0x4e0269[_0x0d8b('0x14')][_0x0d8b('0x16')]);return _0x28f87c(_0x4e0269['error'][_0x0d8b('0x16')]);}logger[_0x0d8b('0x14')](_0x0d8b('0xf'),_0x28ff7f,_0x4e0269[_0x0d8b('0x14')][_0x0d8b('0x16')]);return _0x2c5e9e(_0x4e0269['error'][_0x0d8b('0x16')]);}else{logger[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x28ff7f,_0x0d8b('0x10'));_0x2c5e9e(_0x4e0269[_0x0d8b('0x17')][_0x0d8b('0x16')]);}})[_0x0d8b('0x18')](function(_0xa3612a){logger['error'](_0x0d8b('0xf'),_0x28ff7f,_0xa3612a);_0x28f87c(_0xa3612a);});});}exports[_0x0d8b('0x19')]=function(_0x196c0a){var _0x143372=this;return new Promise(function(_0x24e8ed,_0x5b709c){return db[_0x0d8b('0x1a')][_0x0d8b('0x1b')]({'raw':_0x196c0a['options']?_0x196c0a['options'][_0x0d8b('0x1c')]===undefined?!![]:![]:!![],'where':_0x196c0a['options']?_0x196c0a['options']['where']||null:null,'attributes':_0x196c0a[_0x0d8b('0x1d')]?_0x196c0a[_0x0d8b('0x1d')][_0x0d8b('0x1e')]||null:null,'limit':_0x196c0a[_0x0d8b('0x1d')]?_0x196c0a[_0x0d8b('0x1d')][_0x0d8b('0x1f')]||null:null,'include':_0x196c0a[_0x0d8b('0x1d')]?_0x196c0a[_0x0d8b('0x1d')][_0x0d8b('0x20')]?_['map'](_0x196c0a[_0x0d8b('0x1d')][_0x0d8b('0x20')],function(_0x5363e3){return{'model':db[_0x5363e3[_0x0d8b('0x21')]],'as':_0x5363e3['as'],'attributes':_0x5363e3['attributes'],'include':_0x5363e3[_0x0d8b('0x20')]?_[_0x0d8b('0x22')](_0x5363e3[_0x0d8b('0x20')],function(_0x4fe6f9){return{'model':db[_0x4fe6f9['model']],'as':_0x4fe6f9['as'],'attributes':_0x4fe6f9[_0x0d8b('0x1e')],'include':_0x4fe6f9[_0x0d8b('0x20')]?_['map'](_0x4fe6f9[_0x0d8b('0x20')],function(_0x59aa83){return{'model':db[_0x59aa83[_0x0d8b('0x21')]],'as':_0x59aa83['as'],'attributes':_0x59aa83['attributes']};}):[]};}):[]};}):[]:[]})[_0x0d8b('0xd')](function(_0x48f24f){logger[_0x0d8b('0xe')]('GetUser',_0x196c0a);logger[_0x0d8b('0x11')]('GetUser',_0x196c0a,JSON[_0x0d8b('0x13')](_0x48f24f));_0x24e8ed(_0x48f24f);})[_0x0d8b('0x18')](function(_0x2c058d){logger['error']('GetUser',_0x2c058d['message'],_0x196c0a);_0x5b709c(_0x143372[_0x0d8b('0x14')](0x1f4,_0x2c058d['message']));});});};exports[_0x0d8b('0x23')]=function(_0x54f6f3){var _0x5d05fc=this;return new Promise(function(_0x36017a,_0x1b6920){return db[_0x0d8b('0x1a')][_0x0d8b('0x24')]({'raw':_0x54f6f3[_0x0d8b('0x1d')]?_0x54f6f3[_0x0d8b('0x1d')][_0x0d8b('0x1c')]===undefined?!![]:![]:!![],'where':_0x54f6f3[_0x0d8b('0x1d')]?_0x54f6f3['options'][_0x0d8b('0x25')]||null:null,'attributes':_0x54f6f3[_0x0d8b('0x1d')]?_0x54f6f3['options'][_0x0d8b('0x1e')]||null:null,'include':_0x54f6f3[_0x0d8b('0x1d')]?_0x54f6f3[_0x0d8b('0x1d')]['include']?_[_0x0d8b('0x22')](_0x54f6f3[_0x0d8b('0x1d')][_0x0d8b('0x20')],function(_0x31ceba){return{'model':db[_0x31ceba[_0x0d8b('0x21')]],'as':_0x31ceba['as'],'attributes':_0x31ceba['attributes'],'include':_0x31ceba[_0x0d8b('0x20')]?_[_0x0d8b('0x22')](_0x31ceba['include'],function(_0x1180ac){return{'model':db[_0x1180ac[_0x0d8b('0x21')]],'as':_0x1180ac['as'],'attributes':_0x1180ac[_0x0d8b('0x1e')],'include':_0x1180ac[_0x0d8b('0x20')]?_[_0x0d8b('0x22')](_0x1180ac['include'],function(_0x497a71){return{'model':db[_0x497a71[_0x0d8b('0x21')]],'as':_0x497a71['as'],'attributes':_0x497a71['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0xc179bd){logger[_0x0d8b('0xe')](_0x0d8b('0x23'),_0x54f6f3);logger[_0x0d8b('0x11')](_0x0d8b('0x23'),_0x54f6f3,JSON[_0x0d8b('0x13')](_0xc179bd));_0x36017a(_0xc179bd);})['catch'](function(_0x6e5bab){logger[_0x0d8b('0x14')](_0x0d8b('0x23'),_0x6e5bab[_0x0d8b('0x16')],_0x54f6f3);_0x1b6920(_0x5d05fc[_0x0d8b('0x14')](0x1f4,_0x6e5bab[_0x0d8b('0x16')]));});});};exports[_0x0d8b('0x26')]=function(_0x5c980b){var _0x1d06b6=this;return new Promise(function(_0x34acb5,_0x3fa955){var _0x1f196d;return db['User'][_0x0d8b('0x24')]({'where':_0x5c980b['options'][_0x0d8b('0x25')]||{},'attributes':['id',_0x0d8b('0x27'),_0x0d8b('0x28'),_0x0d8b('0x29'),_0x0d8b('0x2a')]})[_0x0d8b('0xd')](function(_0x1ff17d){if(_0x1ff17d){_0x1f196d=_0x1ff17d;return db[_0x0d8b('0x2b')][_0x0d8b('0x2c')]({'paused':0x1},{'where':{'UserId':_0x1f196d['id']},'individualHooks':!![]});}})[_0x0d8b('0xd')](function(){if(_0x1f196d){return db['MemberReport']['findAll']({'where':{'membername':_0x1f196d['name'],'type':'PAUSE','exitAt':null}});}})['then'](function(_0x1a46f6){if(_0x1f196d){if(_0x1a46f6&&_0x1a46f6[_0x0d8b('0x2d')]){var _0x1e2433=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');for(var _0x1b216d=0x0,_0x192de1=_0x1a46f6[_0x0d8b('0x2d')];_0x1b216d<_0x192de1;_0x1b216d++){_0x1a46f6[_0x1b216d]['updateAttributes']({'exitAt':_0x1e2433});}}}})[_0x0d8b('0xd')](function(){if(_0x1f196d){var _0x26941a=[];var _0x5059ad=utils['getChannels']();_0x5059ad[_0x0d8b('0x2e')](function(_0x495870){_0x26941a[_0x0d8b('0x2f')]({'channel':_0x495870,'membername':_0x1f196d['name'],'interface':_['isNil'](_0x1f196d[_0x0d8b('0x2a')])?util[_0x0d8b('0x30')]('SIP/%s',_0x1f196d['name']):_0x1f196d['interface'],'type':'PAUSE','enterAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'data1':_0x5c980b[_0x0d8b('0x32')]['type']||_0x0d8b('0x33'),'role':_0x1f196d[_0x0d8b('0x28')],'internal':_0x1f196d[_0x0d8b('0x29')],'uniqueid':_0x5c980b[_0x0d8b('0x32')][_0x0d8b('0x34')]||null});});return db[_0x0d8b('0x35')][_0x0d8b('0x36')](_0x26941a,{'individualHooks':!![]});}})[_0x0d8b('0xd')](function(){if(_0x1f196d){return _0x1f196d[_0x0d8b('0x2c')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'pauseType':_0x5c980b[_0x0d8b('0x32')][_0x0d8b('0x37')]||_0x0d8b('0x33'),'lastPauseAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31'))});}})[_0x0d8b('0xd')](function(_0xdfcf32){_0x34acb5(_0xdfcf32);})[_0x0d8b('0x18')](function(_0x1e162c){_0x3fa955(_0x1d06b6[_0x0d8b('0x14')](0x1f4,_0x1e162c['message']));});});};exports[_0x0d8b('0x38')]=function(_0x4d8850){var _0x5d29ab=this;return new Promise(function(_0x39a31d,_0x113fb7){var _0x3f943a;return db[_0x0d8b('0x1a')]['findOne']({'where':_0x4d8850[_0x0d8b('0x1d')][_0x0d8b('0x25')]||{},'attributes':['id',_0x0d8b('0x27')]})[_0x0d8b('0xd')](function(_0x45cd22){if(_0x45cd22){_0x3f943a=_0x45cd22;if(_0x4d8850['body']['channel']&&!utils['isValidChannel'](_0x4d8850['body'][_0x0d8b('0x39')])){throw new Error(_0x0d8b('0x3a'));}switch(_0x4d8850['body']['channel']){case _0x0d8b('0x3b'):return db[_0x0d8b('0x2b')]['update']({'paused':0x0},{'where':{'UserId':_0x3f943a['id']}})['then'](function(){return db[_0x0d8b('0x35')][_0x0d8b('0x24')]({'where':{'channel':_0x4d8850[_0x0d8b('0x32')][_0x0d8b('0x39')],'membername':_0x3f943a[_0x0d8b('0x27')],'type':'PAUSE','exitAt':null}});})[_0x0d8b('0xd')](function(_0x2afe34){if(_0x2afe34){return _0x2afe34['update']({'exitAt':moment()['format'](_0x0d8b('0x31')),'data2':_0x0d8b('0x3c')},{'individualHooks':!![]});}return null;})['then'](function(){return _0x3f943a['update']({'voicePause':![]});});case _0x0d8b('0x3d'):case _0x0d8b('0x3e'):case _0x0d8b('0x3f'):case _0x0d8b('0x40'):case'openchannel':return db[_0x0d8b('0x35')]['find']({'where':{'channel':_0x4d8850['body'][_0x0d8b('0x39')],'membername':_0x3f943a[_0x0d8b('0x27')],'type':'PAUSE','exitAt':null}})['then'](function(_0x44ed23){return _0x44ed23[_0x0d8b('0x2c')]({'exitAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'data2':_0x0d8b('0x3c')},{'individualHooks':!![]});})[_0x0d8b('0xd')](function(){var _0x3978e5={};_[_0x0d8b('0x41')](_0x3978e5,util['format'](_0x0d8b('0x42'),_0x4d8850[_0x0d8b('0x32')][_0x0d8b('0x39')],_0x0d8b('0x43')),![]);return _0x3f943a[_0x0d8b('0x2c')](_0x3978e5);});default:return db[_0x0d8b('0x2b')][_0x0d8b('0x2c')]({'paused':0x0},{'where':{'UserId':_0x3f943a['id']}})[_0x0d8b('0xd')](function(){return db[_0x0d8b('0x35')]['findAll']({'where':{'membername':_0x3f943a[_0x0d8b('0x27')],'type':_0x0d8b('0x44'),'exitAt':null}});})[_0x0d8b('0xd')](function(_0x23de9e){var _0x43ad22=[];_0x23de9e['forEach'](function(_0x1e1dce){_0x43ad22[_0x0d8b('0x2f')](_0x1e1dce[_0x0d8b('0x2c')]({'exitAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'data2':'system'}));});return BPromise['all'](_0x43ad22);})[_0x0d8b('0xd')](function(){return _0x3f943a[_0x0d8b('0x2c')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});});}}})[_0x0d8b('0xd')](function(_0xbbb520){_0x39a31d(_0xbbb520);})['catch'](function(_0x199122){_0x113fb7(_0x5d29ab[_0x0d8b('0x14')](0x1f4,_0x199122[_0x0d8b('0x16')]));});});};exports['LogoutUser']=function(_0x2f19f4){var _0x532a85=this;return new Promise(function(_0x2fce07,_0x3ed63e){var _0x1efce6;return db[_0x0d8b('0x1a')][_0x0d8b('0x45')]({'where':_0x2f19f4[_0x0d8b('0x1d')]['where']||{},'attributes':['id',_0x0d8b('0x27')]})['then'](function(_0x71e8d8){if(_0x71e8d8){_0x1efce6=_0x71e8d8;return db[_0x0d8b('0x2b')][_0x0d8b('0x46')]({'where':{'membername':_0x1efce6[_0x0d8b('0x27')]},'individualHooks':!![]});}})['then'](function(){if(_0x1efce6){return db[_0x0d8b('0x35')][_0x0d8b('0x1b')]({'where':{'membername':_0x1efce6[_0x0d8b('0x27')],'exitAt':null}});}})[_0x0d8b('0xd')](function(_0x2ccdae){if(_0x1efce6){if(_0x2ccdae&&_0x2ccdae[_0x0d8b('0x2d')]){var _0x223fd8=[];_0x2ccdae[_0x0d8b('0x2e')](function(_0x2ce282){_0x223fd8[_0x0d8b('0x2f')](_0x2ce282['update']({'exitAt':moment()['format'](_0x0d8b('0x31'))}));});return BPromise[_0x0d8b('0x47')](_0x223fd8);}}})['then'](function(){if(_0x1efce6){return _0x1efce6[_0x0d8b('0x2c')]({'online':![],'lastLoginAt':null,'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})['then'](function(_0x5cc960){_0x2fce07(_0x5cc960);})[_0x0d8b('0x18')](function(_0x1c4e96){_0x3ed63e(_0x532a85['error'](0x1f4,_0x1c4e96['message']));});});};exports[_0x0d8b('0x48')]=function(_0x1c007b){var _0x70e4b2=this;return new Promise(function(_0x435090,_0x2ab72b){var _0x156859;var _0x40d265;var _0x5b4402;var _0x1ca60c;return db['User'][_0x0d8b('0x45')]({'where':_0x1c007b[_0x0d8b('0x1d')][_0x0d8b('0x25')]||{},'attributes':['id',_0x0d8b('0x27'),'role',_0x0d8b('0x49'),'phone',_0x0d8b('0x29'),_0x0d8b('0x4a'),_0x0d8b('0x2a')]})[_0x0d8b('0xd')](function(_0xc5c35f){if(_0xc5c35f){_0x156859=_0xc5c35f;_0x1ca60c=_0x1c007b[_0x0d8b('0x32')][_0x0d8b('0x2a')]?_0x1c007b[_0x0d8b('0x32')][_0x0d8b('0x2a')]:util[_0x0d8b('0x30')]('SIP/%s',_0x156859[_0x0d8b('0x27')]);return db['User'][_0x0d8b('0x4b')]({'where':{'role':_0x0d8b('0x4c'),'online':!![],'id':{'$ne':_0x156859['id']}}});}})['then'](function(_0x1a62b9){if(_0x1a62b9){_0x5b4402=_0x1a62b9;return require('../../config/license/util')[_0x0d8b('0x4d')]();}})[_0x0d8b('0xd')](function(_0x24f75){if(_0x24f75&&_0x24f75[_0x0d8b('0x4e')]&&_0x5b4402>=_0x24f75[_0x0d8b('0x4e')]){throw new Error(_0x0d8b('0x4f'));}})[_0x0d8b('0xd')](function(){if(_0x156859){return db[_0x0d8b('0x2b')]['destroy']({'where':{'membername':_0x156859[_0x0d8b('0x27')]},'individualHooks':!![]});}})[_0x0d8b('0xd')](function(){if(_0x156859){return _0x156859['getVoiceQueues']({'raw':!![]});}})[_0x0d8b('0xd')](function(_0x105df9){if(_0x156859){if(_0x105df9){var _0x303d6=[];_0x40d265=_0x105df9;if(_0x40d265[_0x0d8b('0x2d')]){for(var _0x16141a=0x0;_0x16141a<_0x40d265[_0x0d8b('0x2d')];_0x16141a++){_0x303d6[_0x0d8b('0x2f')](db[_0x0d8b('0x2b')][_0x0d8b('0x50')]({'membername':_0x156859[_0x0d8b('0x27')],'UserId':_0x156859['id'],'queue_name':_0x40d265[_0x16141a][_0x0d8b('0x27')],'VoiceQueueId':_0x40d265[_0x16141a]['id'],'interface':_0x1ca60c,'paused':_0x156859[_0x0d8b('0x4a')]||![],'penalty':_0x40d265[_0x16141a]['UserVoiceQueue.penalty']||0x0}));}return BPromise[_0x0d8b('0x47')](_0x303d6);}}}})[_0x0d8b('0xd')](function(){if(_0x156859){return db[_0x0d8b('0x35')]['findAll']({'where':{'membername':_0x156859['name'],'exitAt':null}});}})[_0x0d8b('0xd')](function(_0x3aeb45){if(_0x156859){if(_0x3aeb45&&_0x3aeb45[_0x0d8b('0x2d')]){var _0x5b76af=[];_0x3aeb45['forEach'](function(_0x42de18){_0x5b76af[_0x0d8b('0x2f')](_0x42de18[_0x0d8b('0x2c')]({'exitAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31'))}));});return BPromise[_0x0d8b('0x47')](_0x5b76af);}}})[_0x0d8b('0xd')](function(_0x2c826b){if(_0x156859){var _0x20a3dd=[];var _0x3a5aea=[];var _0x195901=utils[_0x0d8b('0x51')]();var _0x3b060e={'membername':_0x156859['name'],'interface':_0x1ca60c,'enterAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'role':_0x156859['role'],'internal':_0x156859['internal']};_0x195901[_0x0d8b('0x2e')](function(_0x1dad9f){_0x20a3dd[_0x0d8b('0x2f')](_[_0x0d8b('0x52')]({'channel':_0x1dad9f,'type':_0x0d8b('0x53'),'data1':_0x0d8b('0x54'),'data2':_0x1ca60c},_0x3b060e));if(_0x156859['loginInPause']){_0x3a5aea['push'](_['merge']({'channel':_0x1dad9f,'type':_0x0d8b('0x44'),'data1':_0x0d8b('0x55')},_0x3b060e));}});return db[_0x0d8b('0x35')][_0x0d8b('0x36')](_0x20a3dd[_0x0d8b('0x56')](_0x3a5aea),{'individualHooks':!![]});}})[_0x0d8b('0xd')](function(){if(_0x156859){return _0x156859['update']({'online':!![],'lastLoginAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'voicePause':_0x156859['loginInPause']||![],'mailPause':_0x156859[_0x0d8b('0x4a')]||![],'chatPause':_0x156859['loginInPause']||![],'faxPause':_0x156859[_0x0d8b('0x4a')]||![],'smsPause':_0x156859[_0x0d8b('0x4a')]||![],'openchannelPause':_0x156859[_0x0d8b('0x4a')]||![],'pauseType':_0x156859[_0x0d8b('0x4a')]?_0x0d8b('0x55'):null,'lastPauseAt':moment()[_0x0d8b('0x30')](_0x0d8b('0x31')),'interface':_0x1ca60c});}})[_0x0d8b('0xd')](function(_0x391121){_0x435090(_0x391121);})[_0x0d8b('0x18')](function(_0x276558){_0x2ab72b(_0x70e4b2[_0x0d8b('0x14')](0x1f4,_0x276558['message']));});});};
\ No newline at end of file
diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js
index 9e5d520..399a616 100644
--- a/server/api/user/user.socket.js
+++ b/server/api/user/user.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4960=['save','emit','removeListener','register','length'];(function(_0x5375ba,_0x192a03){var _0x186a6f=function(_0x42ff3e){while(--_0x42ff3e){_0x5375ba['push'](_0x5375ba['shift']());}};_0x186a6f(++_0x192a03);}(_0x4960,0x73));var _0x0496=function(_0x1189b5,_0x25084b){_0x1189b5=_0x1189b5-0x0;var _0x4cce46=_0x4960[_0x1189b5];return _0x4cce46;};'use strict';var UserEvents=require('./user.events');var events=[_0x0496('0x0'),'remove','update'];function createListener(_0x4328e5,_0x1bb38d){return function(_0x45ca6e){_0x1bb38d[_0x0496('0x1')](_0x4328e5,_0x45ca6e);};}function removeListener(_0x338110,_0x511144){return function(){UserEvents[_0x0496('0x2')](_0x338110,_0x511144);};}exports[_0x0496('0x3')]=function(_0x4cf95b){for(var _0x23d30c=0x0,_0x379e2=events[_0x0496('0x4')];_0x23d30c<_0x379e2;_0x23d30c++){var _0x50991a=events[_0x23d30c];var _0xe3ecb8=createListener('user:'+_0x50991a,_0x4cf95b);UserEvents['on'](_0x50991a,_0xe3ecb8);}};
\ No newline at end of file
+var _0x68ab=['update','emit','register','length','user:','./user.events','save','remove'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x68ab,0x12d));var _0xb68a=function(_0x3acfa3,_0x13ea7a){_0x3acfa3=_0x3acfa3-0x0;var _0xcfe26e=_0x68ab[_0x3acfa3];return _0xcfe26e;};'use strict';var UserEvents=require(_0xb68a('0x0'));var events=[_0xb68a('0x1'),_0xb68a('0x2'),_0xb68a('0x3')];function createListener(_0x2270d0,_0x168fd9){return function(_0x3cda8c){_0x168fd9[_0xb68a('0x4')](_0x2270d0,_0x3cda8c);};}function removeListener(_0x47ec5e,_0x2c83bf){return function(){UserEvents['removeListener'](_0x47ec5e,_0x2c83bf);};}exports[_0xb68a('0x5')]=function(_0x34a0b0){for(var _0x5855a4=0x0,_0x8ca7a6=events[_0xb68a('0x6')];_0x5855a4<_0x8ca7a6;_0x5855a4++){var _0x52e48a=events[_0x5855a4];var _0x4135d5=createListener(_0xb68a('0x7')+_0x52e48a,_0x34a0b0);UserEvents['on'](_0x52e48a,_0x4135d5);}};
\ No newline at end of file
diff --git a/server/api/userChatQueue/index.js b/server/api/userChatQueue/index.js
index 1d560be..acc750d 100644
--- a/server/api/userChatQueue/index.js
+++ b/server/api/userChatQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ef3=['../../components/interaction/service','../../config/environment','multer','util','path','connect-timeout','express','Router'];(function(_0xee2ea8,_0x592330){var _0x2720f8=function(_0x221c4b){while(--_0x221c4b){_0xee2ea8['push'](_0xee2ea8['shift']());}};_0x2720f8(++_0x592330);}(_0x2ef3,0xba));var _0x32ef=function(_0x229eae,_0x1d64c2){_0x229eae=_0x229eae-0x0;var _0x47acfe=_0x2ef3[_0x229eae];return _0x47acfe;};'use strict';var multer=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var path=require(_0x32ef('0x2'));var timeout=require(_0x32ef('0x3'));var express=require(_0x32ef('0x4'));var router=express[_0x32ef('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x32ef('0x6'));var config=require(_0x32ef('0x7'));module['exports']=router;
\ No newline at end of file
+var _0xc6c0=['../../components/interaction/service','../../config/environment','exports','multer','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x22cca5,_0x5a1b84){var _0x1456eb=function(_0x47ac40){while(--_0x47ac40){_0x22cca5['push'](_0x22cca5['shift']());}};_0x1456eb(++_0x5a1b84);}(_0xc6c0,0x13e));var _0x0c6c=function(_0x20aae1,_0x51efd4){_0x20aae1=_0x20aae1-0x0;var _0x510601=_0xc6c0[_0x20aae1];return _0x510601;};'use strict';var multer=require(_0x0c6c('0x0'));var util=require('util');var path=require(_0x0c6c('0x1'));var timeout=require(_0x0c6c('0x2'));var express=require(_0x0c6c('0x3'));var router=express[_0x0c6c('0x4')]();var auth=require(_0x0c6c('0x5'));var interaction=require(_0x0c6c('0x6'));var config=require(_0x0c6c('0x7'));module[_0x0c6c('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/userChatQueue/userChatQueue.attributes.js b/server/api/userChatQueue/userChatQueue.attributes.js
index 0a3de9a..5215572 100644
--- a/server/api/userChatQueue/userChatQueue.attributes.js
+++ b/server/api/userChatQueue/userChatQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xed4f=['exports'];(function(_0x36884e,_0x48008f){var _0x1cc367=function(_0x388a78){while(--_0x388a78){_0x36884e['push'](_0x36884e['shift']());}};_0x1cc367(++_0x48008f);}(_0xed4f,0x171));var _0xfed4=function(_0x63e8bd,_0x2b3f3f){_0x63e8bd=_0x63e8bd-0x0;var _0x1a9b9f=_0xed4f[_0x63e8bd];return _0x1a9b9f;};'use strict';var Sequelize=require('sequelize');module[_0xfed4('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xf41c=['exports','INTEGER','sequelize'];(function(_0x5a6d86,_0x19e39b){var _0x5cf7ad=function(_0x3442ef){while(--_0x3442ef){_0x5a6d86['push'](_0x5a6d86['shift']());}};_0x5cf7ad(++_0x19e39b);}(_0xf41c,0x6e));var _0xcf41=function(_0x56e270,_0x1f18df){_0x56e270=_0x56e270-0x0;var _0x3045c6=_0xf41c[_0x56e270];return _0x3045c6;};'use strict';var Sequelize=require(_0xcf41('0x0'));module[_0xcf41('0x1')]={'penalty':{'type':Sequelize[_0xcf41('0x2')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/userChatQueue/userChatQueue.model.js b/server/api/userChatQueue/userChatQueue.model.js
index aa822ef..7bd88fb 100644
--- a/server/api/userChatQueue/userChatQueue.model.js
+++ b/server/api/userChatQueue/userChatQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x539f=['UserChatQueue','user_has_chat_queues','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','exports'];(function(_0x2ae8ce,_0x2a5a1f){var _0x4bf686=function(_0x41cabf){while(--_0x41cabf){_0x2ae8ce['push'](_0x2ae8ce['shift']());}};_0x4bf686(++_0x2a5a1f);}(_0x539f,0xde));var _0xf539=function(_0x1efbc3,_0x5a94b4){_0x1efbc3=_0x1efbc3-0x0;var _0x21c873=_0x539f[_0x1efbc3];return _0x21c873;};'use strict';var _=require('lodash');var util=require(_0xf539('0x0'));var logger=require(_0xf539('0x1'))('api');var moment=require(_0xf539('0x2'));var BPromise=require(_0xf539('0x3'));var rp=require(_0xf539('0x4'));var fs=require('fs');var path=require(_0xf539('0x5'));var rimraf=require('rimraf');var config=require(_0xf539('0x6'));var attributes=require('./userChatQueue.attributes');module[_0xf539('0x7')]=function(_0x3c14a8,_0x13fc6b){return _0x3c14a8['define'](_0xf539('0x8'),attributes,{'tableName':_0xf539('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc6bd=['./userChatQueue.attributes','exports','define','UserChatQueue','user_has_chat_queues','util','../../config/logger','bluebird','path','rimraf','../../config/environment'];(function(_0x37b5ff,_0x1f53fa){var _0x3d0577=function(_0x2e49fc){while(--_0x2e49fc){_0x37b5ff['push'](_0x37b5ff['shift']());}};_0x3d0577(++_0x1f53fa);}(_0xc6bd,0x1e9));var _0xdc6b=function(_0x3888ae,_0x5c8de7){_0x3888ae=_0x3888ae-0x0;var _0x2e8ad7=_0xc6bd[_0x3888ae];return _0x2e8ad7;};'use strict';var _=require('lodash');var util=require(_0xdc6b('0x0'));var logger=require(_0xdc6b('0x1'))('api');var moment=require('moment');var BPromise=require(_0xdc6b('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdc6b('0x3'));var rimraf=require(_0xdc6b('0x4'));var config=require(_0xdc6b('0x5'));var attributes=require(_0xdc6b('0x6'));module[_0xdc6b('0x7')]=function(_0x3f052d,_0x468c29){return _0x3f052d[_0xdc6b('0x8')](_0xdc6b('0x9'),attributes,{'tableName':_0xdc6b('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userChatQueue/userChatQueue.rpc.js b/server/api/userChatQueue/userChatQueue.rpc.js
index 7f74c1e..f82dbeb 100644
--- a/server/api/userChatQueue/userChatQueue.rpc.js
+++ b/server/api/userChatQueue/userChatQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdcb8=['../../config/utils','rpc','../../config/environment','jayson/promise','client','http','info','UserChatQueue,\x20%s,\x20%s','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','util','moment','bluebird','ioredis'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0xdcb8,0x7a));var _0x8dcb=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xdcb8[_0x3b380d];return _0x54502b;};'use strict';var _=require('lodash');var util=require(_0x8dcb('0x0'));var moment=require(_0x8dcb('0x1'));var BPromise=require(_0x8dcb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8dcb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x8dcb('0x4'));var logger=require('../../config/logger')(_0x8dcb('0x5'));var config=require(_0x8dcb('0x6'));var jayson=require(_0x8dcb('0x7'));var client=jayson[_0x8dcb('0x8')][_0x8dcb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x27be5c,_0x15f903,_0x1b62c5){return new BPromise(function(_0x32fe73,_0xa45932){return client['request'](_0x27be5c,_0x1b62c5)['then'](function(_0x3d588d){logger[_0x8dcb('0xa')](_0x8dcb('0xb'),_0x15f903,'request\x20sent');logger[_0x8dcb('0xc')](_0x8dcb('0xd'),_0x15f903,_0x8dcb('0xe'),JSON['stringify'](_0x3d588d));if(_0x3d588d['error']){if(_0x3d588d[_0x8dcb('0xf')][_0x8dcb('0x10')]===0x1f4){logger[_0x8dcb('0xf')](_0x8dcb('0xb'),_0x15f903,_0x3d588d[_0x8dcb('0xf')][_0x8dcb('0x11')]);return _0xa45932(_0x3d588d['error'][_0x8dcb('0x11')]);}logger[_0x8dcb('0xf')](_0x8dcb('0xb'),_0x15f903,_0x3d588d[_0x8dcb('0xf')][_0x8dcb('0x11')]);return _0x32fe73(_0x3d588d[_0x8dcb('0xf')][_0x8dcb('0x11')]);}else{logger['info']('UserChatQueue,\x20%s,\x20%s',_0x15f903,_0x8dcb('0xe'));_0x32fe73(_0x3d588d['result']['message']);}})['catch'](function(_0x3f0d67){logger['error'](_0x8dcb('0xb'),_0x15f903,_0x3f0d67);_0xa45932(_0x3f0d67);});});}
\ No newline at end of file
+var _0x66cd=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','UserChatQueue,\x20%s,\x20%s','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','lodash','util','moment','bluebird'];(function(_0x281b67,_0x28b9aa){var _0x14fe26=function(_0x280c3a){while(--_0x280c3a){_0x281b67['push'](_0x281b67['shift']());}};_0x14fe26(++_0x28b9aa);}(_0x66cd,0xa4));var _0xd66c=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x66cd[_0x2b4411];return _0x8e41ef;};'use strict';var _=require(_0xd66c('0x0'));var util=require(_0xd66c('0x1'));var moment=require(_0xd66c('0x2'));var BPromise=require(_0xd66c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd66c('0x4'));var db=require(_0xd66c('0x5'))['db'];var utils=require(_0xd66c('0x6'));var logger=require(_0xd66c('0x7'))(_0xd66c('0x8'));var config=require('../../config/environment');var jayson=require(_0xd66c('0x9'));var client=jayson[_0xd66c('0xa')][_0xd66c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x528f64,_0x43d66d,_0x4d47fa){return new BPromise(function(_0x2cfaaa,_0x5c09b9){return client[_0xd66c('0xc')](_0x528f64,_0x4d47fa)[_0xd66c('0xd')](function(_0x32657d){logger[_0xd66c('0xe')](_0xd66c('0xf'),_0x43d66d,'request\x20sent');logger[_0xd66c('0x10')](_0xd66c('0x11'),_0x43d66d,'request\x20sent',JSON['stringify'](_0x32657d));if(_0x32657d[_0xd66c('0x12')]){if(_0x32657d[_0xd66c('0x12')][_0xd66c('0x13')]===0x1f4){logger['error'](_0xd66c('0xf'),_0x43d66d,_0x32657d['error']['message']);return _0x5c09b9(_0x32657d[_0xd66c('0x12')][_0xd66c('0x14')]);}logger['error'](_0xd66c('0xf'),_0x43d66d,_0x32657d[_0xd66c('0x12')][_0xd66c('0x14')]);return _0x2cfaaa(_0x32657d['error'][_0xd66c('0x14')]);}else{logger['info']('UserChatQueue,\x20%s,\x20%s',_0x43d66d,_0xd66c('0x15'));_0x2cfaaa(_0x32657d[_0xd66c('0x16')][_0xd66c('0x14')]);}})[_0xd66c('0x17')](function(_0x41fd3e){logger[_0xd66c('0x12')]('UserChatQueue,\x20%s,\x20%s',_0x43d66d,_0x41fd3e);_0x5c09b9(_0x41fd3e);});});}
\ No newline at end of file
diff --git a/server/api/userFaxQueue/index.js b/server/api/userFaxQueue/index.js
index 902d4fc..a22f348 100644
--- a/server/api/userFaxQueue/index.js
+++ b/server/api/userFaxQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeae8=['express','../../components/auth/service','../../config/environment','exports','multer','util','path'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xeae8,0x66));var _0x8eae=function(_0x3873e2,_0x1190ea){_0x3873e2=_0x3873e2-0x0;var _0x4e1895=_0xeae8[_0x3873e2];return _0x4e1895;};'use strict';var multer=require(_0x8eae('0x0'));var util=require(_0x8eae('0x1'));var path=require(_0x8eae('0x2'));var timeout=require('connect-timeout');var express=require(_0x8eae('0x3'));var router=express['Router']();var auth=require(_0x8eae('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x8eae('0x5'));module[_0x8eae('0x6')]=router;
\ No newline at end of file
+var _0xf40b=['util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','exports'];(function(_0x36f325,_0x3d2e7f){var _0x332f25=function(_0x4f8314){while(--_0x4f8314){_0x36f325['push'](_0x36f325['shift']());}};_0x332f25(++_0x3d2e7f);}(_0xf40b,0xb0));var _0xbf40=function(_0x3a23b4,_0x49d839){_0x3a23b4=_0x3a23b4-0x0;var _0x302bca=_0xf40b[_0x3a23b4];return _0x302bca;};'use strict';var multer=require('multer');var util=require(_0xbf40('0x0'));var path=require(_0xbf40('0x1'));var timeout=require(_0xbf40('0x2'));var express=require(_0xbf40('0x3'));var router=express['Router']();var auth=require(_0xbf40('0x4'));var interaction=require(_0xbf40('0x5'));var config=require(_0xbf40('0x6'));module[_0xbf40('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/userFaxQueue/userFaxQueue.attributes.js b/server/api/userFaxQueue/userFaxQueue.attributes.js
index ab506fd..3dc35ba 100644
--- a/server/api/userFaxQueue/userFaxQueue.attributes.js
+++ b/server/api/userFaxQueue/userFaxQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe207=['sequelize','exports','INTEGER','STRING'];(function(_0x55f8b4,_0x43f30d){var _0x2475f9=function(_0xdd6f4a){while(--_0xdd6f4a){_0x55f8b4['push'](_0x55f8b4['shift']());}};_0x2475f9(++_0x43f30d);}(_0xe207,0x154));var _0x7e20=function(_0x3dacbb,_0x32aaf0){_0x3dacbb=_0x3dacbb-0x0;var _0x4b8897=_0xe207[_0x3dacbb];return _0x4b8897;};'use strict';var Sequelize=require(_0x7e20('0x0'));module[_0x7e20('0x1')]={'penalty':{'type':Sequelize[_0x7e20('0x2')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x7e20('0x2')],'defaultValue':0x0},'queue':{'type':Sequelize[_0x7e20('0x3')]}};
\ No newline at end of file
+var _0x5f7b=['sequelize','exports','INTEGER','STRING'];(function(_0x31fc83,_0x562631){var _0x46b451=function(_0x4f9467){while(--_0x4f9467){_0x31fc83['push'](_0x31fc83['shift']());}};_0x46b451(++_0x562631);}(_0x5f7b,0x104));var _0xb5f7=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0x5f7b[_0x2aec52];return _0x3b8835;};'use strict';var Sequelize=require(_0xb5f7('0x0'));module[_0xb5f7('0x1')]={'penalty':{'type':Sequelize[_0xb5f7('0x2')],'defaultValue':0x0},'assigned':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'queue':{'type':Sequelize[_0xb5f7('0x3')]}};
\ No newline at end of file
diff --git a/server/api/userFaxQueue/userFaxQueue.model.js b/server/api/userFaxQueue/userFaxQueue.model.js
index 50a7cc2..1e39e6b 100644
--- a/server/api/userFaxQueue/userFaxQueue.model.js
+++ b/server/api/userFaxQueue/userFaxQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf363=['util','api','bluebird','request-promise','path','../../config/environment','./userFaxQueue.attributes','UserFaxQueue','user_has_fax_queues','lodash'];(function(_0x7729b1,_0x468322){var _0x349504=function(_0x401cee){while(--_0x401cee){_0x7729b1['push'](_0x7729b1['shift']());}};_0x349504(++_0x468322);}(_0xf363,0x103));var _0x3f36=function(_0x32b1de,_0x5d2ddd){_0x32b1de=_0x32b1de-0x0;var _0x17214c=_0xf363[_0x32b1de];return _0x17214c;};'use strict';var _=require(_0x3f36('0x0'));var util=require(_0x3f36('0x1'));var logger=require('../../config/logger')(_0x3f36('0x2'));var moment=require('moment');var BPromise=require(_0x3f36('0x3'));var rp=require(_0x3f36('0x4'));var fs=require('fs');var path=require(_0x3f36('0x5'));var rimraf=require('rimraf');var config=require(_0x3f36('0x6'));var attributes=require(_0x3f36('0x7'));module['exports']=function(_0x564f03,_0x5970b1){return _0x564f03['define'](_0x3f36('0x8'),attributes,{'tableName':_0x3f36('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe177=['request-promise','path','rimraf','./userFaxQueue.attributes','exports','define','UserFaxQueue','lodash','api'];(function(_0x34620e,_0x582015){var _0x3d33cd=function(_0x19dc7f){while(--_0x19dc7f){_0x34620e['push'](_0x34620e['shift']());}};_0x3d33cd(++_0x582015);}(_0xe177,0xb2));var _0x7e17=function(_0x469983,_0x4d603d){_0x469983=_0x469983-0x0;var _0x434c83=_0xe177[_0x469983];return _0x434c83;};'use strict';var _=require(_0x7e17('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x7e17('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x7e17('0x2'));var fs=require('fs');var path=require(_0x7e17('0x3'));var rimraf=require(_0x7e17('0x4'));var config=require('../../config/environment');var attributes=require(_0x7e17('0x5'));module[_0x7e17('0x6')]=function(_0x46c999,_0x16ecfa){return _0x46c999[_0x7e17('0x7')](_0x7e17('0x8'),attributes,{'tableName':'user_has_fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userFaxQueue/userFaxQueue.rpc.js b/server/api/userFaxQueue/userFaxQueue.rpc.js
index 760541a..8869688 100644
--- a/server/api/userFaxQueue/userFaxQueue.rpc.js
+++ b/server/api/userFaxQueue/userFaxQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf16e=['../../config/environment','jayson/promise','client','http','request','then','info','UserFaxQueue,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x56c775,_0x4908a9){var _0x48f194=function(_0x4ee2cb){while(--_0x4ee2cb){_0x56c775['push'](_0x56c775['shift']());}};_0x48f194(++_0x4908a9);}(_0xf16e,0xc8));var _0xef16=function(_0x2555d0,_0x4150a6){_0x2555d0=_0x2555d0-0x0;var _0x3bb486=_0xf16e[_0x2555d0];return _0x3bb486;};'use strict';var _=require('lodash');var util=require(_0xef16('0x0'));var moment=require(_0xef16('0x1'));var BPromise=require('bluebird');var rs=require(_0xef16('0x2'));var fs=require('fs');var Redis=require(_0xef16('0x3'));var db=require(_0xef16('0x4'))['db'];var utils=require(_0xef16('0x5'));var logger=require(_0xef16('0x6'))('rpc');var config=require(_0xef16('0x7'));var jayson=require(_0xef16('0x8'));var client=jayson[_0xef16('0x9')][_0xef16('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x203e50,_0x3c6ab1,_0x29c63a){return new BPromise(function(_0x486a7e,_0x14bdb1){return client[_0xef16('0xb')](_0x203e50,_0x29c63a)[_0xef16('0xc')](function(_0x1daf54){logger[_0xef16('0xd')](_0xef16('0xe'),_0x3c6ab1,'request\x20sent');logger[_0xef16('0xf')]('UserFaxQueue,\x20%s,\x20%s,\x20%s',_0x3c6ab1,_0xef16('0x10'),JSON[_0xef16('0x11')](_0x1daf54));if(_0x1daf54[_0xef16('0x12')]){if(_0x1daf54[_0xef16('0x12')][_0xef16('0x13')]===0x1f4){logger[_0xef16('0x12')](_0xef16('0xe'),_0x3c6ab1,_0x1daf54['error'][_0xef16('0x14')]);return _0x14bdb1(_0x1daf54[_0xef16('0x12')][_0xef16('0x14')]);}logger[_0xef16('0x12')](_0xef16('0xe'),_0x3c6ab1,_0x1daf54['error'][_0xef16('0x14')]);return _0x486a7e(_0x1daf54[_0xef16('0x12')][_0xef16('0x14')]);}else{logger[_0xef16('0xd')]('UserFaxQueue,\x20%s,\x20%s',_0x3c6ab1,_0xef16('0x10'));_0x486a7e(_0x1daf54[_0xef16('0x15')][_0xef16('0x14')]);}})[_0xef16('0x16')](function(_0x5928cd){logger[_0xef16('0x12')](_0xef16('0xe'),_0x3c6ab1,_0x5928cd);_0x14bdb1(_0x5928cd);});});}
\ No newline at end of file
+var _0xeca1=['info','UserFaxQueue,\x20%s,\x20%s','request\x20sent','UserFaxQueue,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xeca1,0xa0));var _0x1eca=function(_0x25af24,_0x9e945b){_0x25af24=_0x25af24-0x0;var _0x42ce2c=_0xeca1[_0x25af24];return _0x42ce2c;};'use strict';var _=require(_0x1eca('0x0'));var util=require(_0x1eca('0x1'));var moment=require(_0x1eca('0x2'));var BPromise=require(_0x1eca('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1eca('0x4'))['db'];var utils=require(_0x1eca('0x5'));var logger=require(_0x1eca('0x6'))('rpc');var config=require(_0x1eca('0x7'));var jayson=require(_0x1eca('0x8'));var client=jayson['client'][_0x1eca('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x209326,_0x932c03,_0x2cf6fa){return new BPromise(function(_0x196d0f,_0x32d886){return client[_0x1eca('0xa')](_0x209326,_0x2cf6fa)['then'](function(_0x439aa1){logger[_0x1eca('0xb')](_0x1eca('0xc'),_0x932c03,_0x1eca('0xd'));logger['debug'](_0x1eca('0xe'),_0x932c03,'request\x20sent',JSON['stringify'](_0x439aa1));if(_0x439aa1[_0x1eca('0xf')]){if(_0x439aa1[_0x1eca('0xf')]['code']===0x1f4){logger[_0x1eca('0xf')](_0x1eca('0xc'),_0x932c03,_0x439aa1[_0x1eca('0xf')]['message']);return _0x32d886(_0x439aa1[_0x1eca('0xf')][_0x1eca('0x10')]);}logger[_0x1eca('0xf')](_0x1eca('0xc'),_0x932c03,_0x439aa1['error'][_0x1eca('0x10')]);return _0x196d0f(_0x439aa1[_0x1eca('0xf')]['message']);}else{logger[_0x1eca('0xb')](_0x1eca('0xc'),_0x932c03,_0x1eca('0xd'));_0x196d0f(_0x439aa1[_0x1eca('0x11')][_0x1eca('0x10')]);}})[_0x1eca('0x12')](function(_0xac707f){logger['error'](_0x1eca('0xc'),_0x932c03,_0xac707f);_0x32d886(_0xac707f);});});}
\ No newline at end of file
diff --git a/server/api/userMailQueue/index.js b/server/api/userMailQueue/index.js
index b61fb1b..5894184 100644
--- a/server/api/userMailQueue/index.js
+++ b/server/api/userMailQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9829=['express','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util','path','connect-timeout'];(function(_0x35540f,_0xba2ab7){var _0x43208f=function(_0x40a192){while(--_0x40a192){_0x35540f['push'](_0x35540f['shift']());}};_0x43208f(++_0xba2ab7);}(_0x9829,0xc4));var _0x9982=function(_0x13ce0c,_0x3f2a0d){_0x13ce0c=_0x13ce0c-0x0;var _0x4388fb=_0x9829[_0x13ce0c];return _0x4388fb;};'use strict';var multer=require(_0x9982('0x0'));var util=require(_0x9982('0x1'));var path=require(_0x9982('0x2'));var timeout=require(_0x9982('0x3'));var express=require(_0x9982('0x4'));var router=express['Router']();var auth=require(_0x9982('0x5'));var interaction=require(_0x9982('0x6'));var config=require(_0x9982('0x7'));module['exports']=router;
\ No newline at end of file
+var _0x9e2e=['express','../../components/interaction/service','../../config/environment','exports','multer','util','path'];(function(_0x40a975,_0x2b90d7){var _0x185322=function(_0x989bc){while(--_0x989bc){_0x40a975['push'](_0x40a975['shift']());}};_0x185322(++_0x2b90d7);}(_0x9e2e,0xd6));var _0xe9e2=function(_0x3d40b2,_0xd39f14){_0x3d40b2=_0x3d40b2-0x0;var _0x3e0817=_0x9e2e[_0x3d40b2];return _0x3e0817;};'use strict';var multer=require(_0xe9e2('0x0'));var util=require(_0xe9e2('0x1'));var path=require(_0xe9e2('0x2'));var timeout=require('connect-timeout');var express=require(_0xe9e2('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xe9e2('0x4'));var config=require(_0xe9e2('0x5'));module[_0xe9e2('0x6')]=router;
\ No newline at end of file
diff --git a/server/api/userMailQueue/userMailQueue.attributes.js b/server/api/userMailQueue/userMailQueue.attributes.js
index f1cfd19..6233df9 100644
--- a/server/api/userMailQueue/userMailQueue.attributes.js
+++ b/server/api/userMailQueue/userMailQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe826=['INTEGER','exports'];(function(_0x5ba834,_0x39a9c4){var _0x2e2795=function(_0x33a7b0){while(--_0x33a7b0){_0x5ba834['push'](_0x5ba834['shift']());}};_0x2e2795(++_0x39a9c4);}(_0xe826,0x181));var _0x6e82=function(_0x2385fc,_0x4c17b4){_0x2385fc=_0x2385fc-0x0;var _0x5e7e2e=_0xe826[_0x2385fc];return _0x5e7e2e;};'use strict';var Sequelize=require('sequelize');module[_0x6e82('0x0')]={'penalty':{'type':Sequelize[_0x6e82('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x33a8=['sequelize','exports','INTEGER'];(function(_0x2bdecd,_0x21805f){var _0x56116e=function(_0x297d20){while(--_0x297d20){_0x2bdecd['push'](_0x2bdecd['shift']());}};_0x56116e(++_0x21805f);}(_0x33a8,0xb7));var _0x833a=function(_0x581ca4,_0x1c62bd){_0x581ca4=_0x581ca4-0x0;var _0x26ed2e=_0x33a8[_0x581ca4];return _0x26ed2e;};'use strict';var Sequelize=require(_0x833a('0x0'));module[_0x833a('0x1')]={'penalty':{'type':Sequelize[_0x833a('0x2')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/userMailQueue/userMailQueue.model.js b/server/api/userMailQueue/userMailQueue.model.js
index 62d19e1..ad8d87e 100644
--- a/server/api/userMailQueue/userMailQueue.model.js
+++ b/server/api/userMailQueue/userMailQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1a37=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','UserMailQueue','user_has_mail_queues','lodash','util'];(function(_0x27e304,_0x46ec55){var _0xd79d7e=function(_0x403034){while(--_0x403034){_0x27e304['push'](_0x27e304['shift']());}};_0xd79d7e(++_0x46ec55);}(_0x1a37,0xb4));var _0x71a3=function(_0x58afd5,_0x534a48){_0x58afd5=_0x58afd5-0x0;var _0x3e503b=_0x1a37[_0x58afd5];return _0x3e503b;};'use strict';var _=require(_0x71a3('0x0'));var util=require(_0x71a3('0x1'));var logger=require(_0x71a3('0x2'))(_0x71a3('0x3'));var moment=require(_0x71a3('0x4'));var BPromise=require(_0x71a3('0x5'));var rp=require(_0x71a3('0x6'));var fs=require('fs');var path=require(_0x71a3('0x7'));var rimraf=require(_0x71a3('0x8'));var config=require(_0x71a3('0x9'));var attributes=require('./userMailQueue.attributes');module[_0x71a3('0xa')]=function(_0x4f6b7a,_0xd09f7){return _0x4f6b7a[_0x71a3('0xb')](_0x71a3('0xc'),attributes,{'tableName':_0x71a3('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xef0f=['moment','request-promise','path','rimraf','./userMailQueue.attributes','exports','define','UserMailQueue','lodash','../../config/logger','api'];(function(_0x1abb11,_0xd68915){var _0x149a9f=function(_0x5c74d5){while(--_0x5c74d5){_0x1abb11['push'](_0x1abb11['shift']());}};_0x149a9f(++_0xd68915);}(_0xef0f,0x168));var _0xfef0=function(_0x5efc18,_0x522924){_0x5efc18=_0x5efc18-0x0;var _0x1b2530=_0xef0f[_0x5efc18];return _0x1b2530;};'use strict';var _=require(_0xfef0('0x0'));var util=require('util');var logger=require(_0xfef0('0x1'))(_0xfef0('0x2'));var moment=require(_0xfef0('0x3'));var BPromise=require('bluebird');var rp=require(_0xfef0('0x4'));var fs=require('fs');var path=require(_0xfef0('0x5'));var rimraf=require(_0xfef0('0x6'));var config=require('../../config/environment');var attributes=require(_0xfef0('0x7'));module[_0xfef0('0x8')]=function(_0x2697df,_0x315a8c){return _0x2697df[_0xfef0('0x9')](_0xfef0('0xa'),attributes,{'tableName':'user_has_mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userMailQueue/userMailQueue.rpc.js b/server/api/userMailQueue/userMailQueue.rpc.js
index a423f56..a6a5e64 100644
--- a/server/api/userMailQueue/userMailQueue.rpc.js
+++ b/server/api/userMailQueue/userMailQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x943b=['../../config/environment','jayson/promise','client','http','request','info','UserMailQueue,\x20%s,\x20%s','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x57f83,_0x49aa24){var _0x436b52=function(_0x491af9){while(--_0x491af9){_0x57f83['push'](_0x57f83['shift']());}};_0x436b52(++_0x49aa24);}(_0x943b,0x1f1));var _0xb943=function(_0x542e93,_0x3f64cd){_0x542e93=_0x542e93-0x0;var _0x320226=_0x943b[_0x542e93];return _0x320226;};'use strict';var _=require(_0xb943('0x0'));var util=require('util');var moment=require(_0xb943('0x1'));var BPromise=require('bluebird');var rs=require(_0xb943('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb943('0x3'))['db'];var utils=require(_0xb943('0x4'));var logger=require(_0xb943('0x5'))(_0xb943('0x6'));var config=require(_0xb943('0x7'));var jayson=require(_0xb943('0x8'));var client=jayson[_0xb943('0x9')][_0xb943('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2f1b72,_0x5f18ed,_0x6ffffc){return new BPromise(function(_0xe66313,_0x64bd1c){return client[_0xb943('0xb')](_0x2f1b72,_0x6ffffc)['then'](function(_0x18c92e){logger[_0xb943('0xc')](_0xb943('0xd'),_0x5f18ed,'request\x20sent');logger[_0xb943('0xe')](_0xb943('0xf'),_0x5f18ed,_0xb943('0x10'),JSON[_0xb943('0x11')](_0x18c92e));if(_0x18c92e[_0xb943('0x12')]){if(_0x18c92e[_0xb943('0x12')]['code']===0x1f4){logger[_0xb943('0x12')](_0xb943('0xd'),_0x5f18ed,_0x18c92e['error']['message']);return _0x64bd1c(_0x18c92e[_0xb943('0x12')][_0xb943('0x13')]);}logger['error'](_0xb943('0xd'),_0x5f18ed,_0x18c92e[_0xb943('0x12')]['message']);return _0xe66313(_0x18c92e[_0xb943('0x12')][_0xb943('0x13')]);}else{logger[_0xb943('0xc')](_0xb943('0xd'),_0x5f18ed,_0xb943('0x10'));_0xe66313(_0x18c92e[_0xb943('0x14')][_0xb943('0x13')]);}})['catch'](function(_0x22140a){logger[_0xb943('0x12')](_0xb943('0xd'),_0x5f18ed,_0x22140a);_0x64bd1c(_0x22140a);});});}
\ No newline at end of file
+var _0x4236=['../../config/environment','client','http','request','info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x5e7514,_0x30c2e1){var _0x12f472=function(_0x33ddb6){while(--_0x33ddb6){_0x5e7514['push'](_0x5e7514['shift']());}};_0x12f472(++_0x30c2e1);}(_0x4236,0x1dc));var _0x6423=function(_0x155861,_0x435025){_0x155861=_0x155861-0x0;var _0x5ccf17=_0x4236[_0x155861];return _0x5ccf17;};'use strict';var _=require('lodash');var util=require(_0x6423('0x0'));var moment=require(_0x6423('0x1'));var BPromise=require('bluebird');var rs=require(_0x6423('0x2'));var fs=require('fs');var Redis=require(_0x6423('0x3'));var db=require(_0x6423('0x4'))['db'];var utils=require(_0x6423('0x5'));var logger=require(_0x6423('0x6'))('rpc');var config=require(_0x6423('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6423('0x8')][_0x6423('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1715df,_0x3e0182,_0x5f4f18){return new BPromise(function(_0x34ebb4,_0x1c0c47){return client[_0x6423('0xa')](_0x1715df,_0x5f4f18)['then'](function(_0x39bd5b){logger[_0x6423('0xb')](_0x6423('0xc'),_0x3e0182,_0x6423('0xd'));logger[_0x6423('0xe')](_0x6423('0xf'),_0x3e0182,'request\x20sent',JSON[_0x6423('0x10')](_0x39bd5b));if(_0x39bd5b[_0x6423('0x11')]){if(_0x39bd5b['error'][_0x6423('0x12')]===0x1f4){logger['error']('UserMailQueue,\x20%s,\x20%s',_0x3e0182,_0x39bd5b[_0x6423('0x11')][_0x6423('0x13')]);return _0x1c0c47(_0x39bd5b[_0x6423('0x11')][_0x6423('0x13')]);}logger[_0x6423('0x11')]('UserMailQueue,\x20%s,\x20%s',_0x3e0182,_0x39bd5b[_0x6423('0x11')][_0x6423('0x13')]);return _0x34ebb4(_0x39bd5b[_0x6423('0x11')][_0x6423('0x13')]);}else{logger[_0x6423('0xb')](_0x6423('0xc'),_0x3e0182,_0x6423('0xd'));_0x34ebb4(_0x39bd5b['result'][_0x6423('0x13')]);}})[_0x6423('0x14')](function(_0x4887dc){logger[_0x6423('0x11')](_0x6423('0xc'),_0x3e0182,_0x4887dc);_0x1c0c47(_0x4887dc);});});}
\ No newline at end of file
diff --git a/server/api/userOpenchannelQueue/index.js b/server/api/userOpenchannelQueue/index.js
index 66d24ae..c359ae3 100644
--- a/server/api/userOpenchannelQueue/index.js
+++ b/server/api/userOpenchannelQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb46f=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','exports','multer','util'];(function(_0x446836,_0x19becf){var _0x4f0793=function(_0x5cc460){while(--_0x5cc460){_0x446836['push'](_0x446836['shift']());}};_0x4f0793(++_0x19becf);}(_0xb46f,0xb6));var _0xfb46=function(_0xe4a03f,_0xd83d01){_0xe4a03f=_0xe4a03f-0x0;var _0x5654db=_0xb46f[_0xe4a03f];return _0x5654db;};'use strict';var multer=require(_0xfb46('0x0'));var util=require(_0xfb46('0x1'));var path=require('path');var timeout=require(_0xfb46('0x2'));var express=require(_0xfb46('0x3'));var router=express[_0xfb46('0x4')]();var auth=require(_0xfb46('0x5'));var interaction=require(_0xfb46('0x6'));var config=require('../../config/environment');module[_0xfb46('0x7')]=router;
\ No newline at end of file
+var _0x938d=['Router','../../config/environment','exports','multer','util','connect-timeout','express'];(function(_0x53c8a5,_0x2a6cd1){var _0xc9e75f=function(_0x1ceabb){while(--_0x1ceabb){_0x53c8a5['push'](_0x53c8a5['shift']());}};_0xc9e75f(++_0x2a6cd1);}(_0x938d,0x122));var _0xd938=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x938d[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xd938('0x0'));var util=require(_0xd938('0x1'));var path=require('path');var timeout=require(_0xd938('0x2'));var express=require(_0xd938('0x3'));var router=express[_0xd938('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xd938('0x5'));module[_0xd938('0x6')]=router;
\ No newline at end of file
diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js
index 35c241e..99c946b 100644
--- a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js
+++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcfd3=['exports'];(function(_0x577e7f,_0x4b6b77){var _0x341f4e=function(_0x1a5757){while(--_0x1a5757){_0x577e7f['push'](_0x577e7f['shift']());}};_0x341f4e(++_0x4b6b77);}(_0xcfd3,0xe2));var _0x3cfd=function(_0x15797a,_0x16274f){_0x15797a=_0x15797a-0x0;var _0x3e2618=_0xcfd3[_0x15797a];return _0x3e2618;};'use strict';var Sequelize=require('sequelize');module[_0x3cfd('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xe00c=['sequelize','INTEGER'];(function(_0x9c2427,_0x17c865){var _0x51984f=function(_0x177af6){while(--_0x177af6){_0x9c2427['push'](_0x9c2427['shift']());}};_0x51984f(++_0x17c865);}(_0xe00c,0x86));var _0xce00=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe00c[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xce00('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xce00('0x1')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js
index ed53473..055cf66 100644
--- a/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js
+++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x564a=['user_has_openchannel_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userOpenchannelQueue.attributes','exports','UserOpenchannelQueue'];(function(_0x228a4a,_0x23d65e){var _0x3d3937=function(_0x3e9511){while(--_0x3e9511){_0x228a4a['push'](_0x228a4a['shift']());}};_0x3d3937(++_0x23d65e);}(_0x564a,0x1a5));var _0xa564=function(_0x1e639f,_0x271ab6){_0x1e639f=_0x1e639f-0x0;var _0x45be8b=_0x564a[_0x1e639f];return _0x45be8b;};'use strict';var _=require(_0xa564('0x0'));var util=require(_0xa564('0x1'));var logger=require(_0xa564('0x2'))(_0xa564('0x3'));var moment=require(_0xa564('0x4'));var BPromise=require(_0xa564('0x5'));var rp=require(_0xa564('0x6'));var fs=require('fs');var path=require(_0xa564('0x7'));var rimraf=require(_0xa564('0x8'));var config=require(_0xa564('0x9'));var attributes=require(_0xa564('0xa'));module[_0xa564('0xb')]=function(_0x403638,_0x516648){return _0x403638['define'](_0xa564('0xc'),attributes,{'tableName':_0xa564('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5e24=['UserOpenchannelQueue','user_has_openchannel_queues','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./userOpenchannelQueue.attributes','exports'];(function(_0x54b870,_0x509c4d){var _0x14b605=function(_0x58d72b){while(--_0x58d72b){_0x54b870['push'](_0x54b870['shift']());}};_0x14b605(++_0x509c4d);}(_0x5e24,0x1af));var _0x45e2=function(_0x2ed21d,_0x2728b7){_0x2ed21d=_0x2ed21d-0x0;var _0x3d38d7=_0x5e24[_0x2ed21d];return _0x3d38d7;};'use strict';var _=require(_0x45e2('0x0'));var util=require(_0x45e2('0x1'));var logger=require(_0x45e2('0x2'))(_0x45e2('0x3'));var moment=require('moment');var BPromise=require(_0x45e2('0x4'));var rp=require(_0x45e2('0x5'));var fs=require('fs');var path=require(_0x45e2('0x6'));var rimraf=require(_0x45e2('0x7'));var config=require(_0x45e2('0x8'));var attributes=require(_0x45e2('0x9'));module[_0x45e2('0xa')]=function(_0x291f36,_0x33e576){return _0x291f36['define'](_0x45e2('0xb'),attributes,{'tableName':_0x45e2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js
index c130f98..735b276 100644
--- a/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js
+++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x27fe=['lodash','moment','bluebird','ioredis','../../config/logger','rpc','../../config/environment','client','http','then','UserOpenchannelQueue,\x20%s,\x20%s','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result'];(function(_0x1e41f1,_0x450e58){var _0x1dfef1=function(_0x1209af){while(--_0x1209af){_0x1e41f1['push'](_0x1e41f1['shift']());}};_0x1dfef1(++_0x450e58);}(_0x27fe,0x18c));var _0xe27f=function(_0x1e3c16,_0x372caa){_0x1e3c16=_0x1e3c16-0x0;var _0x47a0c9=_0x27fe[_0x1e3c16];return _0x47a0c9;};'use strict';var _=require(_0xe27f('0x0'));var util=require('util');var moment=require(_0xe27f('0x1'));var BPromise=require(_0xe27f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe27f('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xe27f('0x4'))(_0xe27f('0x5'));var config=require(_0xe27f('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xe27f('0x7')][_0xe27f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x45a62d,_0x2c431f,_0x1fb3fb){return new BPromise(function(_0x5688ea,_0x3758b3){return client['request'](_0x45a62d,_0x1fb3fb)[_0xe27f('0x9')](function(_0x5bee56){logger['info'](_0xe27f('0xa'),_0x2c431f,'request\x20sent');logger['debug'](_0xe27f('0xb'),_0x2c431f,_0xe27f('0xc'),JSON[_0xe27f('0xd')](_0x5bee56));if(_0x5bee56['error']){if(_0x5bee56[_0xe27f('0xe')]['code']===0x1f4){logger['error']('UserOpenchannelQueue,\x20%s,\x20%s',_0x2c431f,_0x5bee56[_0xe27f('0xe')][_0xe27f('0xf')]);return _0x3758b3(_0x5bee56[_0xe27f('0xe')][_0xe27f('0xf')]);}logger[_0xe27f('0xe')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x2c431f,_0x5bee56['error'][_0xe27f('0xf')]);return _0x5688ea(_0x5bee56['error'][_0xe27f('0xf')]);}else{logger[_0xe27f('0x10')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x2c431f,_0xe27f('0xc'));_0x5688ea(_0x5bee56[_0xe27f('0x11')][_0xe27f('0xf')]);}})['catch'](function(_0xb97610){logger['error'](_0xe27f('0xa'),_0x2c431f,_0xb97610);_0x3758b3(_0xb97610);});});}
\ No newline at end of file
+var _0xee0e=['stringify','error','message','result','catch','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','UserOpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s'];(function(_0x373670,_0x5f311f){var _0x38589b=function(_0x49ed40){while(--_0x49ed40){_0x373670['push'](_0x373670['shift']());}};_0x38589b(++_0x5f311f);}(_0xee0e,0xc2));var _0xeee0=function(_0x2351c4,_0x1dca54){_0x2351c4=_0x2351c4-0x0;var _0x1dd3f8=_0xee0e[_0x2351c4];return _0x1dd3f8;};'use strict';var _=require('lodash');var util=require(_0xeee0('0x0'));var moment=require('moment');var BPromise=require(_0xeee0('0x1'));var rs=require(_0xeee0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xeee0('0x3'))['db'];var utils=require(_0xeee0('0x4'));var logger=require(_0xeee0('0x5'))(_0xeee0('0x6'));var config=require(_0xeee0('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xeee0('0x8')][_0xeee0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c1eb7,_0x28b258,_0x5281d5){return new BPromise(function(_0x4f28ef,_0x2057fc){return client[_0xeee0('0xa')](_0x2c1eb7,_0x5281d5)[_0xeee0('0xb')](function(_0x553341){logger['info'](_0xeee0('0xc'),_0x28b258,_0xeee0('0xd'));logger[_0xeee0('0xe')](_0xeee0('0xf'),_0x28b258,'request\x20sent',JSON[_0xeee0('0x10')](_0x553341));if(_0x553341[_0xeee0('0x11')]){if(_0x553341[_0xeee0('0x11')]['code']===0x1f4){logger['error']('UserOpenchannelQueue,\x20%s,\x20%s',_0x28b258,_0x553341[_0xeee0('0x11')][_0xeee0('0x12')]);return _0x2057fc(_0x553341[_0xeee0('0x11')][_0xeee0('0x12')]);}logger[_0xeee0('0x11')](_0xeee0('0xc'),_0x28b258,_0x553341[_0xeee0('0x11')][_0xeee0('0x12')]);return _0x4f28ef(_0x553341['error'][_0xeee0('0x12')]);}else{logger['info'](_0xeee0('0xc'),_0x28b258,_0xeee0('0xd'));_0x4f28ef(_0x553341[_0xeee0('0x13')][_0xeee0('0x12')]);}})[_0xeee0('0x14')](function(_0x3d24cd){logger[_0xeee0('0x11')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x28b258,_0x3d24cd);_0x2057fc(_0x3d24cd);});});}
\ No newline at end of file
diff --git a/server/api/userProfile/index.js b/server/api/userProfile/index.js
index 7a71990..1d475a4 100644
--- a/server/api/userProfile/index.js
+++ b/server/api/userProfile/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0e11=['isAuthenticated','show','/:id/resources','getResources','create','post','/:id/clone','/:id/sections','addSections','addResources','put','update','delete','destroy','removeResources','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./userProfile.controller','get','/describe','/:id'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x0e11,0x1e3));var _0x10e1=function(_0x337fb0,_0x619442){_0x337fb0=_0x337fb0-0x0;var _0xb09b02=_0x0e11[_0x337fb0];return _0xb09b02;};'use strict';var multer=require(_0x10e1('0x0'));var util=require(_0x10e1('0x1'));var path=require('path');var timeout=require(_0x10e1('0x2'));var express=require(_0x10e1('0x3'));var router=express[_0x10e1('0x4')]();var auth=require(_0x10e1('0x5'));var interaction=require(_0x10e1('0x6'));var config=require('../../config/environment');var controller=require(_0x10e1('0x7'));router[_0x10e1('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x10e1('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0x10e1('0x8')](_0x10e1('0xa'),auth[_0x10e1('0xb')](),controller[_0x10e1('0xc')]);router[_0x10e1('0x8')](_0x10e1('0xd'),auth['isAuthenticated'](),controller[_0x10e1('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0x10e1('0xf')]);router[_0x10e1('0x10')](_0x10e1('0x11'),auth['isAuthenticated'](),controller['clone']);router['post'](_0x10e1('0x12'),auth['isAuthenticated'](),controller[_0x10e1('0x13')]);router[_0x10e1('0x10')](_0x10e1('0xd'),auth['isAuthenticated'](),controller[_0x10e1('0x14')]);router[_0x10e1('0x15')](_0x10e1('0xa'),auth['isAuthenticated'](),controller[_0x10e1('0x16')]);router[_0x10e1('0x17')]('/:id',auth[_0x10e1('0xb')](),controller[_0x10e1('0x18')]);router['delete'](_0x10e1('0x12'),auth[_0x10e1('0xb')](),controller['removeSections']);router[_0x10e1('0x17')](_0x10e1('0xd'),auth[_0x10e1('0xb')](),controller[_0x10e1('0x19')]);module['exports']=router;
\ No newline at end of file
+var _0xf412=['index','/describe','describe','show','/:id/resources','getResources','post','clone','/:id/sections','addSections','/:id','update','delete','destroy','removeSections','removeResources','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./userProfile.controller','get','isAuthenticated'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xf412,0xb9));var _0x2f41=function(_0x267484,_0x3eb131){_0x267484=_0x267484-0x0;var _0x14a356=_0xf412[_0x267484];return _0x14a356;};'use strict';var multer=require(_0x2f41('0x0'));var util=require(_0x2f41('0x1'));var path=require(_0x2f41('0x2'));var timeout=require(_0x2f41('0x3'));var express=require(_0x2f41('0x4'));var router=express[_0x2f41('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x2f41('0x6'));var config=require(_0x2f41('0x7'));var controller=require(_0x2f41('0x8'));router[_0x2f41('0x9')]('/',auth[_0x2f41('0xa')](),controller[_0x2f41('0xb')]);router['get'](_0x2f41('0xc'),auth[_0x2f41('0xa')](),controller[_0x2f41('0xd')]);router[_0x2f41('0x9')]('/:id',auth[_0x2f41('0xa')](),controller[_0x2f41('0xe')]);router[_0x2f41('0x9')](_0x2f41('0xf'),auth[_0x2f41('0xa')](),controller[_0x2f41('0x10')]);router[_0x2f41('0x11')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/clone',auth[_0x2f41('0xa')](),controller[_0x2f41('0x12')]);router[_0x2f41('0x11')](_0x2f41('0x13'),auth[_0x2f41('0xa')](),controller[_0x2f41('0x14')]);router[_0x2f41('0x11')](_0x2f41('0xf'),auth[_0x2f41('0xa')](),controller['addResources']);router['put'](_0x2f41('0x15'),auth[_0x2f41('0xa')](),controller[_0x2f41('0x16')]);router[_0x2f41('0x17')](_0x2f41('0x15'),auth['isAuthenticated'](),controller[_0x2f41('0x18')]);router['delete'](_0x2f41('0x13'),auth['isAuthenticated'](),controller[_0x2f41('0x19')]);router[_0x2f41('0x17')](_0x2f41('0xf'),auth[_0x2f41('0xa')](),controller[_0x2f41('0x1a')]);module[_0x2f41('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.attributes.js b/server/api/userProfile/userProfile.attributes.js
index a4a4c10..88f38ff 100644
--- a/server/api/userProfile/userProfile.attributes.js
+++ b/server/api/userProfile/userProfile.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8b22=['crudPermissions','join','getDataValue','split','STRING','name','setDataValue'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x8b22,0x74));var _0x28b2=function(_0x5a98c6,_0x572c02){_0x5a98c6=_0x5a98c6-0x0;var _0x4cdaa9=_0x8b22[_0x5a98c6];return _0x4cdaa9;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x28b2('0x0')],'allowNull':![],'unique':_0x28b2('0x1')},'crudPermissions':{'type':Sequelize['STRING'],'set':function(_0x2c2f09){this[_0x28b2('0x2')](_0x28b2('0x3'),_0x2c2f09?_0x2c2f09[_0x28b2('0x4')](''):[]);},'get':function(){return this[_0x28b2('0x5')](_0x28b2('0x3'))?this['getDataValue'](_0x28b2('0x3'))[_0x28b2('0x6')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x28b2('0x0')],'allowNull':!![]}};
\ No newline at end of file
+var _0x1ecc=['exports','STRING','name','crudPermissions','join','getDataValue','split','sequelize'];(function(_0x3eb892,_0x452dfc){var _0x463876=function(_0x4c8f67){while(--_0x4c8f67){_0x3eb892['push'](_0x3eb892['shift']());}};_0x463876(++_0x452dfc);}(_0x1ecc,0xe7));var _0xc1ec=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0x1ecc[_0x2064e5];return _0x21a233;};'use strict';var Sequelize=require(_0xc1ec('0x0'));module[_0xc1ec('0x1')]={'name':{'type':Sequelize[_0xc1ec('0x2')],'allowNull':![],'unique':_0xc1ec('0x3')},'crudPermissions':{'type':Sequelize[_0xc1ec('0x2')],'set':function(_0x4e1b8f){this['setDataValue'](_0xc1ec('0x4'),_0x4e1b8f?_0x4e1b8f[_0xc1ec('0x5')](''):[]);},'get':function(){return this[_0xc1ec('0x6')](_0xc1ec('0x4'))?this[_0xc1ec('0x6')](_0xc1ec('0x4'))[_0xc1ec('0x7')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize['STRING'],'allowNull':!![]}};
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.controller.js b/server/api/userProfile/userProfile.controller.js
index 29fea52..a5302c5 100644
--- a/server/api/userProfile/userProfile.controller.js
+++ b/server/api/userProfile/userProfile.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2a31=['sugarcrmaccounts','SugarcrmAccount','zohoaccounts','ZohoAccount','vtigeraccounts','CannedAnswer','Disposition','customdashboards','Dashboard','intervals','Interval','pauses','Pause','Schedule','sounds','Sound','tags','templates','Template','triggers','trunks','Trunk','variables','Variable','plugins','Plugin','Reports','metrics','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./userProfile.socket','register','status','end','json','count','offset','limit','set','Content-Range','reject','save','then','destroy','sendStatus','error','stack','name','send','UserProfile','rawAttributes','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','type','key','VIRTUAL','includeAll','include','findAll','catch','show','params','options','find','create','body','clone','get','updatedAt','crudPermissions','createdAt','sequelize','transaction','UserProfileSection','each','autoAssociation','UserProfileResource','omit','sectionId','Resources','update','describe','addSections','push','removeSections','ids','userProfileId','bulkCreate','removeResources','getResources','section','undefined','ValidationError','Unknown\x20section','mergeResources','childModel','isEmpty','parentSections','findOne','union','all','order','field','AnalyticExtractedReport','foreignKey','associatedResources','forEach','reportId','CustomReports','rows','CmContact','Tag','Tags','ThroughTags','color','value','resourceId','toLowerCase','squareprojects','SquareProject','odbc','SquareOdbc','squarerecordings','SquareRecording','SquareProjects','projects','JscriptyProject','contacts','Lists','ListId','CmList','companies','globalcustomfields','CmCustomField','chatqueues','ChatQueue','ChatWebsite','faxqueues','FaxQueue','FaxAccount','inboundroutes','outboundroutes','VoiceExtension','contexts','VoiceContext','voicerecordings','Agents','membername','User','agent','Telephones','role','telephone','queue','VoiceQueue','inbound','QueueCampaigns','musiconholds','VoiceChanSpy','voiceprefixes','VoicePrefix','ivrcampaigns','Campaign','mailaccounts','openchannelqueues','openchannelaccounts','smsqueues','SmsAccount','Team','queuecampaigns','VoiceQueues','users','telephones','Users','admin','user','zendeskaccounts','ZendeskAccount','salesforceaccounts','SalesforceAccount','FreshdeskAccount'];(function(_0x48c2ae,_0x4cea90){var _0x8f7531=function(_0x126458){while(--_0x126458){_0x48c2ae['push'](_0x48c2ae['shift']());}};_0x8f7531(++_0x4cea90);}(_0x2a31,0xf7));var _0x12a3=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0x2a31[_0x4baae2];return _0x1a2285;};'use strict';var pdf=require(_0x12a3('0x0'));var emlformat=require(_0x12a3('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x12a3('0x2'));var jsonpatch=require(_0x12a3('0x3'));var rp=require(_0x12a3('0x4'));var moment=require(_0x12a3('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x12a3('0x6'));var path=require(_0x12a3('0x7'));var sox=require(_0x12a3('0x8'));var csv=require(_0x12a3('0x9'));var ejs=require(_0x12a3('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x12a3('0xb'));var crypto=require('crypto');var jsforce=require(_0x12a3('0xc'));var deskjs=require(_0x12a3('0xd'));var toCsv=require(_0x12a3('0x9'));var querystring=require(_0x12a3('0xe'));var Papa=require(_0x12a3('0xf'));var Redis=require(_0x12a3('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x12a3('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x12a3('0x12'))(_0x12a3('0x13'));var utils=require('../../config/utils');var config=require(_0x12a3('0x14'));var db=require(_0x12a3('0x15'))['db'];config['redis']=_[_0x12a3('0x16')](config[_0x12a3('0x17')],{'host':_0x12a3('0x18'),'port':0x18eb});var socket=require(_0x12a3('0x19'))(new Redis(config['redis']));require(_0x12a3('0x1a'))[_0x12a3('0x1b')](socket);function respondWithStatusCode(_0x5138ac,_0x3f90e8){_0x3f90e8=_0x3f90e8||0xcc;return function(_0x456888){if(_0x456888){return _0x5138ac['sendStatus'](_0x3f90e8);}return _0x5138ac[_0x12a3('0x1c')](_0x3f90e8)[_0x12a3('0x1d')]();};}function respondWithResult(_0x5aa72e,_0x503628){_0x503628=_0x503628||0xc8;return function(_0x16f860){if(_0x16f860){return _0x5aa72e[_0x12a3('0x1c')](_0x503628)[_0x12a3('0x1e')](_0x16f860);}};}function respondWithFilteredResult(_0x2ed375,_0x5b6322){return function(_0x1d1c44){if(_0x1d1c44){var _0x4c1917=_0x1d1c44[_0x12a3('0x1f')],_0x3a1b20=_0x5b6322['offset'],_0x1ebac2=_0x5b6322[_0x12a3('0x20')]+_0x5b6322[_0x12a3('0x21')],_0x5cd068;if(_0x1ebac2>=_0x4c1917){_0x1ebac2=_0x4c1917;_0x5cd068=0xc8;}else{_0x5cd068=0xce;}_0x2ed375['status'](_0x5cd068);return _0x2ed375[_0x12a3('0x22')](_0x12a3('0x23'),_0x3a1b20+'-'+_0x1ebac2+'/'+_0x4c1917)['json'](_0x1d1c44);}return null;};}function patchUpdates(_0x45bd1d){return function(_0xfc328b){try{jsonpatch['apply'](_0xfc328b,_0x45bd1d,!![]);}catch(_0x3c42f5){return BPromise[_0x12a3('0x24')](_0x3c42f5);}return _0xfc328b[_0x12a3('0x25')]();};}function saveUpdates(_0x2f50c3,_0x4458d1){return function(_0x1b392b){if(_0x1b392b){return _0x1b392b['update'](_0x2f50c3)[_0x12a3('0x26')](function(_0x50d9a4){return _0x50d9a4;});}return null;};}function removeEntity(_0x7b10c9,_0x51e9ec){return function(_0x448e46){if(_0x448e46){return _0x448e46[_0x12a3('0x27')]()[_0x12a3('0x26')](function(){_0x7b10c9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1c9b77,_0x4b5806){return function(_0xbbce5c){if(!_0xbbce5c){_0x1c9b77[_0x12a3('0x28')](0x194);}return _0xbbce5c;};}function handleError(_0x3c0b76,_0x2fd4c1){_0x2fd4c1=_0x2fd4c1||0x1f4;return function(_0x3dcc96){logger[_0x12a3('0x29')](_0x3dcc96[_0x12a3('0x2a')]);if(_0x3dcc96['name']){delete _0x3dcc96[_0x12a3('0x2b')];}_0x3c0b76['status'](_0x2fd4c1)[_0x12a3('0x2c')](_0x3dcc96);};}exports['index']=function(_0xf6e8ee,_0x201e66){var _0x6857f={},_0x227f39={},_0x4325d5={'count':0x0,'rows':[]};var _0x10d281=db[_0x12a3('0x2d')][_0x12a3('0x2e')];_0x227f39[_0x12a3('0x2f')]=_[_0x12a3('0x30')](_0x10d281);_0x227f39[_0x12a3('0x31')]=_[_0x12a3('0x30')](_0xf6e8ee[_0x12a3('0x31')]);_0x227f39[_0x12a3('0x32')]=_['intersection'](_0x227f39[_0x12a3('0x2f')],_0x227f39[_0x12a3('0x31')]);_0x6857f['attributes']=_[_0x12a3('0x33')](_0x227f39[_0x12a3('0x2f')],qs[_0x12a3('0x34')](_0xf6e8ee[_0x12a3('0x31')][_0x12a3('0x34')]));_0x6857f['attributes']=_0x6857f[_0x12a3('0x35')][_0x12a3('0x36')]?_0x6857f[_0x12a3('0x35')]:_0x227f39['model'];if(!_0xf6e8ee[_0x12a3('0x31')][_0x12a3('0x37')](_0x12a3('0x38'))){_0x6857f[_0x12a3('0x21')]=qs[_0x12a3('0x21')](_0xf6e8ee[_0x12a3('0x31')]['limit']);_0x6857f['offset']=qs['offset'](_0xf6e8ee[_0x12a3('0x31')]['offset']);}_0x6857f['order']=qs['sort'](_0xf6e8ee[_0x12a3('0x31')][_0x12a3('0x39')]);_0x6857f[_0x12a3('0x3a')]=qs[_0x12a3('0x32')](_[_0x12a3('0x3b')](_0xf6e8ee[_0x12a3('0x31')],_0x227f39[_0x12a3('0x32')]));if(_0xf6e8ee['query'][_0x12a3('0x3c')]){_0x6857f['where']=_[_0x12a3('0x3d')](_0x6857f[_0x12a3('0x3a')],{'$or':_[_0x12a3('0x3e')](_0x10d281,function(_0x110c20){if(_0x110c20[_0x12a3('0x3f')][_0x12a3('0x40')]!==_0x12a3('0x41')){var _0x3e9907={};_0x3e9907[_0x110c20['field']]={'$like':'%'+_0xf6e8ee[_0x12a3('0x31')]['filter']+'%'};return _0x3e9907;}})});}_0x6857f=_[_0x12a3('0x3d')]({},_0x6857f,_0xf6e8ee['options']);var _0x255047={'where':_0x6857f[_0x12a3('0x3a')]};return db[_0x12a3('0x2d')]['count'](_0x255047)['then'](function(_0x2b7189){_0x4325d5[_0x12a3('0x1f')]=_0x2b7189;if(_0xf6e8ee[_0x12a3('0x31')][_0x12a3('0x42')]){_0x6857f[_0x12a3('0x43')]=[{'all':!![]}];}return db[_0x12a3('0x2d')][_0x12a3('0x44')](_0x6857f);})[_0x12a3('0x26')](function(_0x4c9882){_0x4325d5['rows']=_0x4c9882;return _0x4325d5;})[_0x12a3('0x26')](respondWithFilteredResult(_0x201e66,_0x6857f))[_0x12a3('0x45')](handleError(_0x201e66,null));};exports[_0x12a3('0x46')]=function(_0x5e2704,_0x5b5007){var _0x2375e9={'raw':![],'where':{'id':_0x5e2704[_0x12a3('0x47')]['id']}},_0x57ced7={};_0x57ced7[_0x12a3('0x2f')]=_['keys'](db[_0x12a3('0x2d')]['rawAttributes']);_0x57ced7[_0x12a3('0x31')]=_[_0x12a3('0x30')](_0x5e2704[_0x12a3('0x31')]);_0x57ced7[_0x12a3('0x32')]=_[_0x12a3('0x33')](_0x57ced7[_0x12a3('0x2f')],_0x57ced7[_0x12a3('0x31')]);_0x2375e9[_0x12a3('0x35')]=_[_0x12a3('0x33')](_0x57ced7['model'],qs[_0x12a3('0x34')](_0x5e2704[_0x12a3('0x31')][_0x12a3('0x34')]));_0x2375e9[_0x12a3('0x35')]=_0x2375e9[_0x12a3('0x35')][_0x12a3('0x36')]?_0x2375e9[_0x12a3('0x35')]:_0x57ced7[_0x12a3('0x2f')];if(_0x5e2704['query'][_0x12a3('0x42')]){_0x2375e9['include']=[{'all':!![]}];}_0x2375e9=_[_0x12a3('0x3d')]({},_0x2375e9,_0x5e2704[_0x12a3('0x48')]);return db[_0x12a3('0x2d')][_0x12a3('0x49')](_0x2375e9)[_0x12a3('0x26')](handleEntityNotFound(_0x5b5007,null))[_0x12a3('0x26')](respondWithResult(_0x5b5007,null))[_0x12a3('0x45')](handleError(_0x5b5007,null));};exports[_0x12a3('0x4a')]=function(_0x4b5da0,_0x2d8ebe){return db[_0x12a3('0x2d')][_0x12a3('0x4a')](_0x4b5da0[_0x12a3('0x4b')],{})[_0x12a3('0x26')](respondWithResult(_0x2d8ebe,0xc9))[_0x12a3('0x45')](handleError(_0x2d8ebe,null));};exports[_0x12a3('0x4c')]=function(_0x2f76b4,_0x46c1c3){var _0x22f500={'raw':![],'where':{'id':_0x2f76b4[_0x12a3('0x47')]['id']}},_0x5b61ae={};_0x5b61ae['model']=_[_0x12a3('0x30')](db[_0x12a3('0x2d')][_0x12a3('0x2e')]);_0x22f500[_0x12a3('0x35')]=_[_0x12a3('0x33')](_0x5b61ae[_0x12a3('0x2f')],qs[_0x12a3('0x34')](_0x2f76b4['query']['fields']));_0x22f500[_0x12a3('0x35')]=_0x22f500['attributes'][_0x12a3('0x36')]?_0x22f500[_0x12a3('0x35')]:_0x5b61ae[_0x12a3('0x2f')];if(_0x2f76b4[_0x12a3('0x31')][_0x12a3('0x42')]){_0x22f500[_0x12a3('0x43')]=[{'all':!![]}];}_0x22f500=_[_0x12a3('0x3d')]({},_0x22f500,_0x2f76b4[_0x12a3('0x48')]);return db[_0x12a3('0x2d')]['find'](_0x22f500)[_0x12a3('0x26')](handleEntityNotFound(_0x46c1c3,null))['then'](function(_0x47c11e){if(_0x47c11e){var _0x33da0b=_0x47c11e[_0x12a3('0x4d')]({'plain':!![]});_0x33da0b=qs['omit'](_0x33da0b,['id','createdAt',_0x12a3('0x4e'),_0x12a3('0x4f')]);_0x2f76b4['body']=_['omit'](_0x2f76b4[_0x12a3('0x4b')],['id',_0x12a3('0x50'),_0x12a3('0x4e')]);return db[_0x12a3('0x51')][_0x12a3('0x52')](function(_0x313d70){return db[_0x12a3('0x2d')]['create'](_[_0x12a3('0x3d')](_0x33da0b,_0x2f76b4[_0x12a3('0x4b')]),{'include':_0x2f76b4[_0x12a3('0x31')][_0x12a3('0x42')]?[{'all':!![]}]:undefined,'transaction':_0x313d70})[_0x12a3('0x26')](function(_0xb2793e){var _0x48ecfc=_0xb2793e[_0x12a3('0x4d')]({'plain':!![]});return db[_0x12a3('0x53')]['findAll']({'where':{'userProfileId':_0x2f76b4[_0x12a3('0x47')]['id']},'raw':!![]})['then'](function(_0xdb64c8){if(_0xdb64c8){return BPromise[_0x12a3('0x54')](_0xdb64c8,function(_0x389d58){return new BPromise(function(_0x53f60f,_0x33ec0b){if(_0x389d58['autoAssociation']===null||_0x389d58[_0x12a3('0x55')]===0x1)_0x53f60f(null);return db[_0x12a3('0x56')][_0x12a3('0x44')]({'where':{'sectionId':_0x389d58['id']},'raw':!![]})[_0x12a3('0x26')](function(_0xd426dd){var _0x165e60=_[_0x12a3('0x3e')](_0xd426dd,function(_0xf80af8){return qs[_0x12a3('0x57')](_0xf80af8,['id',_0x12a3('0x50'),_0x12a3('0x4e'),_0x12a3('0x58')]);});_0x53f60f(_0x165e60);})[_0x12a3('0x45')](function(_0x926162){_0x33ec0b(_0x926162);});})[_0x12a3('0x26')](function(_0x5568a7){var _0x4725de=qs[_0x12a3('0x57')](_0x389d58,['id',_0x12a3('0x50'),_0x12a3('0x4e')]);_0x4725de['userProfileId']=_0x48ecfc['id'];if(_0x5568a7)_0x4725de[_0x12a3('0x59')]=_0x5568a7;return _0x4725de;})[_0x12a3('0x26')](function(_0x1f989d){return db[_0x12a3('0x53')][_0x12a3('0x4a')](_0x1f989d,{'include':[{'model':db[_0x12a3('0x56')],'as':_0x12a3('0x59')}],'raw':!![],'transaction':_0x313d70});});})[_0x12a3('0x26')](function(){return _0x48ecfc;});}});});});}})['then'](respondWithResult(_0x46c1c3,0xc9))[_0x12a3('0x45')](handleError(_0x46c1c3,null));};exports[_0x12a3('0x5a')]=function(_0x3a6c14,_0x432139){if(_0x3a6c14[_0x12a3('0x4b')]['id']){delete _0x3a6c14[_0x12a3('0x4b')]['id'];}return db[_0x12a3('0x2d')][_0x12a3('0x49')]({'where':{'id':_0x3a6c14['params']['id']}})['then'](handleEntityNotFound(_0x432139,null))[_0x12a3('0x26')](saveUpdates(_0x3a6c14[_0x12a3('0x4b')],null))[_0x12a3('0x26')](respondWithResult(_0x432139,null))[_0x12a3('0x45')](handleError(_0x432139,null));};exports[_0x12a3('0x27')]=function(_0x530cbb,_0x44188a){return db[_0x12a3('0x2d')][_0x12a3('0x49')]({'where':{'id':_0x530cbb['params']['id']}})[_0x12a3('0x26')](handleEntityNotFound(_0x44188a,null))[_0x12a3('0x26')](removeEntity(_0x44188a,null))['catch'](handleError(_0x44188a,null));};exports[_0x12a3('0x5b')]=function(_0x1c56fa,_0x1ec69f){return db[_0x12a3('0x2d')]['describe']()['then'](respondWithResult(_0x1ec69f,null))[_0x12a3('0x45')](handleError(_0x1ec69f,null));};exports[_0x12a3('0x5c')]=function(_0x4ac062,_0x492fe1){var _0x5d41d6=_0x4ac062[_0x12a3('0x4b')];return db[_0x12a3('0x2d')]['find']({'where':{'id':_0x4ac062[_0x12a3('0x47')]['id']}})['then'](handleEntityNotFound(_0x492fe1,null))[_0x12a3('0x26')](function(_0x279a16){if(_0x279a16){return db['sequelize']['transaction'](function(_0x1b4bac){return db['UserProfileSection'][_0x12a3('0x27')]({'where':{'userProfileId':_0x4ac062[_0x12a3('0x47')]['id'],'sectionId':_[_0x12a3('0x3e')](_0x5d41d6,function(_0x34e082){return _0x34e082['sectionId'];})},'transaction':_0x1b4bac})[_0x12a3('0x26')](function(){var _0x5d6bd8=_[_0x12a3('0x3e')](_0x5d41d6,function(_0x3e832b){_0x3e832b['userProfileId']=_0x4ac062['params']['id'];return _0x3e832b;});var _0xfa66db=[];return BPromise[_0x12a3('0x54')](_0x5d6bd8,function(_0xf3efda){return db['UserProfileSection'][_0x12a3('0x4a')](_0xf3efda,{'include':[{'model':db[_0x12a3('0x56')],'as':_0x12a3('0x59')}],'raw':!![],'transaction':_0x1b4bac})[_0x12a3('0x26')](function(_0x1aeab9){_0xfa66db[_0x12a3('0x5d')](_0x1aeab9[_0x12a3('0x4d')]({'plain':!![]}));});})[_0x12a3('0x26')](function(){return _0xfa66db;});});});}})[_0x12a3('0x26')](function(_0x3374ad){return _0x3374ad;})[_0x12a3('0x26')](respondWithResult(_0x492fe1,null))[_0x12a3('0x45')](handleError(_0x492fe1,null));};exports[_0x12a3('0x5e')]=function(_0x205d86,_0x48f5fb){var _0x9a6a3a;return db[_0x12a3('0x2d')][_0x12a3('0x49')]({'where':{'id':_0x205d86[_0x12a3('0x47')]['id']},'attributes':['id','name']})[_0x12a3('0x26')](handleEntityNotFound(_0x48f5fb,null))['then'](function(_0x1c1e64){if(_0x1c1e64){_0x9a6a3a=_0x1c1e64;return db[_0x12a3('0x53')][_0x12a3('0x27')]({'where':{'userProfileId':_0x205d86[_0x12a3('0x47')]['id'],'sectionId':_0x205d86[_0x12a3('0x31')][_0x12a3('0x5f')]}});}})[_0x12a3('0x26')](function(){return _0x9a6a3a;})[_0x12a3('0x26')](respondWithStatusCode(_0x48f5fb,null))[_0x12a3('0x45')](handleError(_0x48f5fb,null));};exports['addResources']=function(_0x232ed4,_0xa9a8f9){return db[_0x12a3('0x2d')]['find']({'where':{'id':_0x232ed4[_0x12a3('0x47')]['id']}})[_0x12a3('0x26')](handleEntityNotFound(_0xa9a8f9,null))[_0x12a3('0x26')](function(_0x5b60e3){if(_0x5b60e3){return db[_0x12a3('0x51')][_0x12a3('0x52')](function(_0x3786d5){return db[_0x12a3('0x53')][_0x12a3('0x44')]({'where':{'userProfileId':_0x232ed4['params']['id']},'attributes':['id'],'raw':!![]})[_0x12a3('0x26')](function(_0x333950){if(_0x333950){return db['UserProfileSection'][_0x12a3('0x27')]({'where':{'userProfileId':_0x232ed4[_0x12a3('0x47')]['id'],'id':_[_0x12a3('0x3e')](_0x333950,function(_0x18081f){return _0x18081f['id'];})},'transaction':_0x3786d5});}})[_0x12a3('0x26')](function(_0x1d656d){var _0x26b819=_['map'](_0x232ed4['body'],function(_0x5869fb){_0x5869fb[_0x12a3('0x60')]=_0x232ed4[_0x12a3('0x47')]['id'];return _0x5869fb;});return db[_0x12a3('0x53')][_0x12a3('0x61')](_0x26b819,{'raw':!![],'transaction':_0x3786d5});})[_0x12a3('0x26')](function(_0x10e2b7){var _0x276b05=_[_0x12a3('0x3c')](_[_0x12a3('0x3e')](_0x10e2b7,function(_0x131284){return _0x131284[_0x12a3('0x4d')]({'plain':!![]});}),{'includeAll':![]});if(_0x276b05){return db['UserProfileSection']['findAll']({'where':{'userProfileId':_0x232ed4[_0x12a3('0x47')]['id'],'sectionId':_[_0x12a3('0x3e')](_0x276b05,function(_0x56cfae){return _0x56cfae['sectionId'];})},'attributes':['id',_0x12a3('0x58')],'raw':!![]})[_0x12a3('0x26')](function(_0x189bb9){var _0x4916bc=_[_0x12a3('0x3e')](_0x232ed4[_0x12a3('0x4b')],function(_0x1c9d82){_0x1c9d82[_0x12a3('0x60')]=_0x232ed4['params']['id'];return _0x1c9d82;});return db[_0x12a3('0x56')][_0x12a3('0x61')](_0x4916bc,{'raw':!![],'transaction':_0x3786d5});});}})[_0x12a3('0x45')](handleError(_0xa9a8f9,null));});}})[_0x12a3('0x26')](function(_0x2f6592){var _0x13bd59=_[_0x12a3('0x3e')](_0x2f6592,function(_0xe3cd5e){return _0xe3cd5e[_0x12a3('0x4d')]({'plain':!![]});});})[_0x12a3('0x26')](respondWithResult(_0xa9a8f9,null))[_0x12a3('0x45')](handleError(_0xa9a8f9,null));};exports[_0x12a3('0x62')]=function(_0x27d538,_0x48922f,_0xf56f8e){return db['UserProfile'][_0x12a3('0x49')]({'where':{'id':_0x27d538[_0x12a3('0x47')]['id']}})['then'](handleEntityNotFound(_0x48922f,null))[_0x12a3('0x26')](function(_0x52a788){if(_0x52a788){return _0x52a788['removeResources'](_0x27d538[_0x12a3('0x31')][_0x12a3('0x5f')]);}})[_0x12a3('0x26')](respondWithStatusCode(_0x48922f,null))[_0x12a3('0x45')](handleError(_0x48922f,null));};exports[_0x12a3('0x63')]=function(_0x35eb2a,_0x2e1e7e){var _0x12f3fc={'raw':![],'where':{}};var _0x1134de={};var _0x393b62={'count':0x0,'rows':[]};var _0x1a5660=_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x64')];if(typeof _0x1a5660===_0x12a3('0x65')){throw new db['Sequelize'][(_0x12a3('0x66'))](_0x12a3('0x67'));}var _0x218327=_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x68')]||![];var _0x4e4a3a=getQueryModels(_0x1a5660,_0x218327);if(typeof _0x4e4a3a[_0x12a3('0x69')]===_0x12a3('0x65')){throw new db['Sequelize']['ValidationError']('Invalid\x20section\x20\x27'+_0x1a5660+'\x27');}var _0x570e7e=[];if(!_[_0x12a3('0x6a')](_0x4e4a3a[_0x12a3('0x6b')])){_0x570e7e=_0x4e4a3a[_0x12a3('0x6b')];}else{_0x570e7e=[{'name':_0x1a5660}];}return db[_0x12a3('0x2d')][_0x12a3('0x6c')]({'where':{'id':_0x35eb2a[_0x12a3('0x47')]['id']}})[_0x12a3('0x26')](handleEntityNotFound(_0x2e1e7e,null))[_0x12a3('0x26')](function(_0x5964c1){if(_0x5964c1){var _0x57a847=[];for(var _0x3bbb20=0x0;_0x3bbb20<_0x570e7e[_0x12a3('0x36')];_0x3bbb20++){_0x57a847[_0x12a3('0x5d')](db[_0x12a3('0x53')][_0x12a3('0x6c')]({'where':{'userProfileId':_0x5964c1['id'],'name':_0x570e7e[_0x3bbb20][_0x12a3('0x2b')]},'raw':!![]}));}return BPromise['all'](_0x57a847);}})['then'](function(_0x5b52e5){var _0x5dd303=_[_0x12a3('0x3c')](_0x5b52e5,function(_0x275259){return _0x275259?_0x275259:undefined;});var _0x4f2a95=_['filter'](_0x570e7e,['ignore',!![]]);var _0x3e7d5d=_[_0x12a3('0x6a')](_0x5dd303)&&_[_0x12a3('0x6a')](_0x4f2a95)?null:_[_0x12a3('0x6d')](_0x4f2a95,_0x5dd303);if(_0x3e7d5d){var _0x1ad968=[];for(var _0x5bd4be=0x0;_0x5bd4be<_0x3e7d5d[_0x12a3('0x36')];_0x5bd4be++){var _0xb33cd0=_['find'](_0x570e7e,function(_0x15f0d4){return _0x3e7d5d[_0x5bd4be]?_0x15f0d4[_0x12a3('0x2b')]===_0x3e7d5d[_0x5bd4be][_0x12a3('0x2b')]:null;});if(_0xb33cd0){if(_0x3e7d5d[_0x5bd4be]['ignore']){_0x1ad968[_0x12a3('0x5d')](getAllResources(_0x4e4a3a[_0x12a3('0x69')],_0x3e7d5d[_0x5bd4be]));}else{if(!_0x3e7d5d[_0x5bd4be]['autoAssociation']){_0x1ad968[_0x12a3('0x5d')](getAllowedResources(_0xb33cd0,_0x3e7d5d[_0x5bd4be],_0x4e4a3a['childModel']));}else{if(_0xb33cd0['model']){_0x1ad968['push'](getAllFilteredResources(_0xb33cd0,_0x3e7d5d[_0x5bd4be]));}}}}}return BPromise[_0x12a3('0x6e')](_0x1ad968);}else{return null;}})[_0x12a3('0x26')](function(_0x3774b9){var _0x402de4=_0x3774b9;var _0x3860bd=null;if(_0x402de4){_0x3860bd=_0x402de4[_0x12a3('0x36')]===0x1?_0x402de4[0x0]:null;}if(_0x3860bd||_0x402de4){var _0x367ea8=db[_0x4e4a3a[_0x12a3('0x69')]][_0x12a3('0x2e')];_0x1134de[_0x12a3('0x2f')]=_[_0x12a3('0x30')](_0x367ea8);_0x1134de[_0x12a3('0x31')]=_[_0x12a3('0x30')](_0x35eb2a[_0x12a3('0x31')]);_0x1134de[_0x12a3('0x32')]=_['intersection'](_0x1134de['model'],_0x1134de[_0x12a3('0x31')]);_0x12f3fc[_0x12a3('0x35')]=_[_0x12a3('0x33')](_0x1134de[_0x12a3('0x2f')],qs[_0x12a3('0x34')](_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x34')]));_0x12f3fc[_0x12a3('0x35')]=_0x12f3fc['attributes'][_0x12a3('0x36')]?_0x12f3fc[_0x12a3('0x35')]:_0x1134de[_0x12a3('0x2f')];if(!_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x37')](_0x12a3('0x38'))){_0x12f3fc['limit']=qs['limit'](_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x21')]);_0x12f3fc[_0x12a3('0x20')]=qs['offset'](_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x20')]);}_0x12f3fc[_0x12a3('0x6f')]=qs[_0x12a3('0x39')](_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x39')]);_0x12f3fc[_0x12a3('0x3a')]=qs[_0x12a3('0x32')](_['pick'](_0x35eb2a[_0x12a3('0x31')],_0x1134de['filters']));if(_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x3c')]){_0x12f3fc['where']=_['merge'](_0x12f3fc[_0x12a3('0x3a')],{'$or':_[_0x12a3('0x3e')](_0x367ea8,function(_0x8c1642){if(_0x8c1642[_0x12a3('0x3f')][_0x12a3('0x40')]!==_0x12a3('0x41')){var _0x10d0d3={};_0x10d0d3[_0x8c1642[_0x12a3('0x70')]]={'$like':'%'+_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x3c')]+'%'};return _0x10d0d3;}})});}var _0x30735d=[];if(_0x3860bd){var _0x5defb3=_[_0x12a3('0x49')](_0x570e7e,[_0x12a3('0x2b'),_0x3860bd[_0x12a3('0x2b')]]);if(_0x5defb3['field']){var _0x445e2d={};if(_0x4e4a3a['childModel']===_0x12a3('0x71')){_0x445e2d[_0x5defb3[_0x12a3('0x72')]]=_[_0x12a3('0x3e')](_0x3860bd['associatedResources'],'id');}else{_0x445e2d[_0x5defb3[_0x12a3('0x72')]]=_0x3860bd[_0x12a3('0x73')];}_0x30735d['push'](_0x445e2d);}else{_0x12f3fc[_0x12a3('0x3a')]['id']=_0x3860bd[_0x12a3('0x73')];}}else{for(var _0x5db295=0x0;_0x5db295<_0x402de4['length'];_0x5db295++){var _0x5defb3=_[_0x12a3('0x49')](_0x570e7e,[_0x12a3('0x2b'),_0x402de4[_0x5db295][_0x12a3('0x2b')]]);if(_0x5defb3[_0x12a3('0x70')]){var _0x445e2d={};_0x445e2d[_0x5defb3[_0x12a3('0x72')]]=_0x402de4[_0x5db295][_0x12a3('0x73')];_0x30735d[_0x12a3('0x5d')](_0x445e2d);}else{if(!_0x12f3fc[_0x12a3('0x3a')]['id'])_0x12f3fc[_0x12a3('0x3a')]['id']=[];_0x402de4[_0x5db295]['associatedResources']['forEach'](function(_0x4259f3){_0x12f3fc[_0x12a3('0x3a')]['id'][_0x12a3('0x5d')](_0x4259f3);});}}}if(!_[_0x12a3('0x6a')](_0x30735d)){_0x12f3fc['where']=_[_0x12a3('0x3d')](_0x12f3fc[_0x12a3('0x3a')],{'$and':{'$or':_0x30735d}});}_0x12f3fc=_['merge']({},_0x12f3fc,_0x35eb2a['options']);if(_0x3860bd&&!_0x3860bd[_0x12a3('0x55')]&&_0x4e4a3a[_0x12a3('0x69')]===_0x12a3('0x71')){if(_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x42')]){_0x12f3fc['include']=[{'all':!![]}];}return db[_0x4e4a3a[_0x12a3('0x69')]][_0x12a3('0x44')](_0x12f3fc)[_0x12a3('0x26')](function(_0x567ce2){var _0xbf7922=[];_0x567ce2[_0x12a3('0x74')](function(_0x27a058){var _0xb3e883;switch(_0x27a058['reportType']){case'default':_0xb3e883=_['find'](_0x3860bd[_0x12a3('0x73')],function(_0x1f4efc){return _0x1f4efc['id']===_0x27a058[_0x12a3('0x75')]&&_0x1f4efc[_0x12a3('0x3f')]==='DefaultReports';});break;case'custom':_0xb3e883=_[_0x12a3('0x49')](_0x3860bd[_0x12a3('0x73')],function(_0x267420){return _0x267420['id']===_0x27a058['reportId']&&_0x267420[_0x12a3('0x3f')]===_0x12a3('0x76');});break;}if(_0xb3e883)_0xbf7922[_0x12a3('0x5d')](_0x27a058);});_0x393b62['count']=_0xbf7922[_0x12a3('0x36')];_0x393b62[_0x12a3('0x77')]=_0xbf7922;return _0x393b62;});}else{return db[_0x4e4a3a[_0x12a3('0x69')]][_0x12a3('0x1f')]({'where':_0x12f3fc[_0x12a3('0x3a')]})[_0x12a3('0x26')](function(_0xe2911d){_0x393b62[_0x12a3('0x1f')]=_0xe2911d;if(_0x35eb2a[_0x12a3('0x31')][_0x12a3('0x42')]){if(_0x4e4a3a['childModel']===_0x12a3('0x78')){_0x12f3fc['include']=[{'model':db[_0x12a3('0x79')],'as':_0x12a3('0x7a'),'attributes':['id',_0x12a3('0x2b'),'color'],'required':_0x35eb2a[_0x12a3('0x31')]['tag']?!![]:![]},{'model':db['Tag'],'as':_0x12a3('0x7b'),'attributes':['id',_0x12a3('0x2b'),_0x12a3('0x7c')],'through':_0x35eb2a[_0x12a3('0x31')]['tag']?{'attributes':[],'where':{'TagId':_0x35eb2a[_0x12a3('0x31')]['tag']||undefined}}:{},'required':_0x35eb2a[_0x12a3('0x31')]['tag']?!![]:![]}];}else{_0x12f3fc[_0x12a3('0x43')]=[{'all':!![]}];}}return db[_0x4e4a3a[_0x12a3('0x69')]]['findAll'](_0x12f3fc);})[_0x12a3('0x26')](function(_0x10e937){_0x393b62['rows']=_0x10e937;return _0x393b62;});}}else{return _0x393b62;}})[_0x12a3('0x26')](respondWithFilteredResult(_0x2e1e7e,_0x12f3fc))[_0x12a3('0x45')](handleError(_0x2e1e7e,null));};function getAllResources(_0x48d991,_0x5c4b6c){return new BPromise(function(_0xe474d0,_0x258508){if(_0x5c4b6c){var _0x3109c7=_0x5c4b6c['filter']?{[_0x5c4b6c[_0x12a3('0x3c')][_0x12a3('0x70')]]:_0x5c4b6c[_0x12a3('0x3c')][_0x12a3('0x7d')]}:undefined;return db[_0x48d991][_0x12a3('0x44')]({'where':_0x3109c7,'raw':!![]})[_0x12a3('0x26')](function(_0x8e65){_0x5c4b6c[_0x12a3('0x73')]=_[_0x12a3('0x3e')](_0x8e65,'id');_0xe474d0(_0x5c4b6c);})[_0x12a3('0x45')](function(_0x325cef){_0x258508(_0x325cef);});}else{_0xe474d0(null);}});}function getAllFilteredResources(_0x4f590b,_0x56ba21){return new BPromise(function(_0x5dabb1,_0x21cb7e){var _0x318337=_0x4f590b[_0x12a3('0x3c')]?{[_0x4f590b[_0x12a3('0x3c')][_0x12a3('0x70')]]:_0x4f590b[_0x12a3('0x3c')][_0x12a3('0x7d')]}:undefined;return db[_0x4f590b[_0x12a3('0x2f')]][_0x12a3('0x44')]({'where':_0x318337,'raw':!![]})[_0x12a3('0x26')](function(_0x5e699d){_0x56ba21[_0x12a3('0x73')]=_[_0x12a3('0x3e')](_0x5e699d,function(_0xf20d4){return _0xf20d4[_0x12a3('0x2b')];});_0x5dabb1(_0x56ba21);})[_0x12a3('0x45')](function(_0x5746bd){_0x21cb7e(_0x5746bd);});});}function getAllowedResources(_0x17b666,_0x122960,_0x58d995){return new BPromise(function(_0x514a54,_0x3bc512){if(_0x122960){return db[_0x12a3('0x56')]['findAll']({'where':{'sectionId':_0x122960['id']},'raw':!![]})[_0x12a3('0x26')](function(_0x3a1588){if(_0x17b666[_0x12a3('0x70')]&&_0x17b666[_0x12a3('0x70')]!=='id'){_0x122960[_0x12a3('0x73')]=_[_0x12a3('0x3e')](_0x3a1588,function(_0x3ff73d){return _0x3ff73d[_0x17b666[_0x12a3('0x70')]];});}else{if(_0x58d995==='AnalyticExtractedReport'){_0x122960[_0x12a3('0x73')]=_['map'](_0x3a1588,function(_0x121d6c){return{'id':_0x121d6c['resourceId'],'type':_0x121d6c[_0x12a3('0x3f')]};});}else{_0x122960[_0x12a3('0x73')]=_[_0x12a3('0x3e')](_0x3a1588,function(_0x1ade0f){return _0x1ade0f[_0x12a3('0x7e')];});}}_0x514a54(_0x122960);})[_0x12a3('0x45')](function(_0x3cd530){_0x3bc512(_0x3cd530);});}else{_0x514a54(null);}});}function getQueryModels(_0x166c79,_0x34c698){var _0xe1e36b=_0x166c79[_0x12a3('0x7f')]();var _0xeba2fd={'childModel':undefined,'parentSections':[]};switch(_0xe1e36b){case _0x12a3('0x80'):_0xeba2fd['childModel']=_0x12a3('0x81');break;case _0x12a3('0x82'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x83');break;case _0x12a3('0x84'):_0xeba2fd['childModel']=_0x12a3('0x85');_0xeba2fd[_0x12a3('0x6b')]=[{'name':_0x12a3('0x86'),'field':'name','foreignKey':'projectName'}];break;case _0x12a3('0x87'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x88');break;case _0x12a3('0x89'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x78');_0xeba2fd['parentSections']=[{'name':_0x12a3('0x8a'),'field':'id','foreignKey':_0x12a3('0x8b')}];break;case'lists':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x8c');break;case _0x12a3('0x8d'):_0xeba2fd[_0x12a3('0x69')]='CmCompany';break;case _0x12a3('0x8e'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x8f');break;case _0x12a3('0x90'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x91');break;case'chatwebsites':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x92');break;case _0x12a3('0x93'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x94');break;case'faxaccounts':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x95');break;case _0x12a3('0x96'):case'internalroutes':case _0x12a3('0x97'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x98');break;case _0x12a3('0x99'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x9a');break;case'voicemails':_0xeba2fd[_0x12a3('0x69')]='VoiceMail';break;case _0x12a3('0x9b'):_0xeba2fd[_0x12a3('0x69')]='VoiceRecording';_0xeba2fd[_0x12a3('0x6b')]=[{'name':_0x12a3('0x9c'),'field':_0x12a3('0x2b'),'foreignKey':_0x12a3('0x9d'),'model':_0x12a3('0x9e'),'filter':{'field':'role','value':[_0x12a3('0x9f')]}},{'name':_0x12a3('0xa0'),'field':_0x12a3('0x2b'),'foreignKey':'membername','model':_0x12a3('0x9e'),'filter':{'field':_0x12a3('0xa1'),'value':[_0x12a3('0xa2')]}},{'name':'VoiceQueues','field':_0x12a3('0x2b'),'foreignKey':_0x12a3('0xa3'),'model':_0x12a3('0xa4'),'filter':{'field':_0x12a3('0x3f'),'value':[_0x12a3('0xa5')]}},{'name':_0x12a3('0xa6'),'field':'name','foreignKey':'queue','model':'VoiceQueue','filter':{'field':_0x12a3('0x3f'),'value':['outbound']}}];break;case _0x12a3('0xa7'):_0xeba2fd[_0x12a3('0x69')]='VoiceMusicOnHold';break;case'chanspies':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xa8');break;case _0x12a3('0xa9'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xaa');break;case _0x12a3('0xab'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xac');break;case'mailqueues':_0xeba2fd[_0x12a3('0x69')]='MailQueue';break;case _0x12a3('0xad'):_0xeba2fd[_0x12a3('0x69')]='MailAccount';break;case'mailsubstatuses':_0xeba2fd[_0x12a3('0x69')]='MailSubstatus';break;case _0x12a3('0xae'):_0xeba2fd[_0x12a3('0x69')]='OpenchannelQueue';break;case _0x12a3('0xaf'):_0xeba2fd['childModel']='OpenchannelAccount';break;case _0x12a3('0xb0'):_0xeba2fd['childModel']='SmsQueue';break;case'smsaccounts':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xb1');break;case'teams':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xb2');break;case'voicequeues':case _0x12a3('0xb3'):_0xeba2fd['childModel']=_0x12a3('0xa4');if(_0x34c698){_0xeba2fd[_0x12a3('0x6b')]=[{'name':_0x12a3('0xb4')},{'name':'QueueCampaigns'}];}break;case _0x12a3('0xb5'):case'agents':case _0x12a3('0xb6'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x9e');if(_0x34c698){_0xeba2fd[_0x12a3('0x6b')]=[{'name':_0x12a3('0xb7'),'filter':{'field':_0x12a3('0xa1'),'value':[_0x12a3('0xb8'),_0x12a3('0xb9')]},'ignore':!![]},{'name':_0x12a3('0x9c')},{'name':_0x12a3('0xa0')}];}break;case _0x12a3('0xba'):_0xeba2fd['childModel']=_0x12a3('0xbb');break;case _0x12a3('0xbc'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xbd');break;case'freshdeskaccounts':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xbe');break;case _0x12a3('0xbf'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xc0');break;case'deskaccounts':_0xeba2fd[_0x12a3('0x69')]='DeskAccount';break;case _0x12a3('0xc1'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xc2');break;case _0x12a3('0xc3'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x9e');break;case'cannedanswers':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xc4');break;case'dispositions':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xc5');break;case _0x12a3('0xc6'):_0xeba2fd['childModel']=_0x12a3('0xc7');break;case _0x12a3('0xc8'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xc9');break;case _0x12a3('0xca'):_0xeba2fd['childModel']=_0x12a3('0xcb');break;case'scheduler':_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xcc');break;case _0x12a3('0xcd'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xce');break;case _0x12a3('0xcf'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0x79');break;case _0x12a3('0xd0'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xd1');break;case _0x12a3('0xd2'):_0xeba2fd['childModel']='Trigger';break;case _0x12a3('0xd3'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xd4');break;case _0x12a3('0xd5'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xd6');break;case _0x12a3('0xd7'):_0xeba2fd[_0x12a3('0x69')]=_0x12a3('0xd8');break;case'extractedreports':_0xeba2fd['childModel']=_0x12a3('0x71');_0xeba2fd[_0x12a3('0x6b')]=[{'name':_0x12a3('0xd9'),'field':'id','foreignKey':_0x12a3('0x75')}];break;case _0x12a3('0xda'):_0xeba2fd[_0x12a3('0x69')]='AnalyticMetric';break;default:return _0xeba2fd;}return _0xeba2fd;}
\ No newline at end of file
+var _0xb2f4=['VoiceContext','VoiceMail','VoiceRecording','membername','User','role','agent','Telephones','telephone','VoiceQueue','QueueCampaigns','queue','outbound','musiconholds','VoiceMusicOnHold','chanspies','VoiceChanSpy','voiceprefixes','VoicePrefix','Campaign','MailQueue','mailaccounts','mailsubstatuses','MailSubstatus','openchannelqueues','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','SmsQueue','SmsAccount','teams','Team','voicequeues','queuecampaigns','VoiceQueues','users','telephones','Users','admin','user','Agents','salesforceaccounts','SalesforceAccount','freshdeskaccounts','FreshdeskAccount','sugarcrmaccounts','SugarcrmAccount','deskaccounts','zohoaccounts','vtigeraccounts','CannedAnswer','dispositions','Disposition','customdashboards','intervals','pauses','Pause','scheduler','Schedule','Sound','tags','templates','triggers','Trigger','trunks','variables','Variable','Plugin','extractedreports','AnalyticExtractedReport','Reports','reportId','metrics','AnalyticMetric','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','defaults','localhost','redis','./userProfile.socket','sendStatus','status','json','offset','set','Content-Range','apply','reject','save','update','then','end','error','name','send','index','UserProfile','keys','intersection','model','attributes','fields','query','hasOwnProperty','limit','order','sort','filters','filter','merge','where','VIRTUAL','field','options','count','include','rows','catch','show','params','rawAttributes','length','find','create','body','clone','includeAll','omit','createdAt','updatedAt','sequelize','transaction','get','UserProfileSection','findAll','each','autoAssociation','UserProfileResource','map','userProfileId','Resources','destroy','describe','addSections','sectionId','push','ids','addResources','bulkCreate','removeResources','section','undefined','Sequelize','ValidationError','Unknown\x20section','mergeResources','Invalid\x20section\x20\x27','isEmpty','parentSections','findOne','all','ignore','union','childModel','nolimit','type','key','foreignKey','associatedResources','forEach','default','DefaultReports','custom','CmContact','Tag','Tags','tag','ThroughTags','color','value','resourceId','toLowerCase','squareprojects','SquareProject','odbc','SquareOdbc','squarerecordings','SquareProjects','projectName','JscriptyProject','contacts','Lists','ListId','CmList','CmCompany','globalcustomfields','ChatQueue','faxqueues','FaxQueue','inboundroutes','internalroutes','outboundroutes','VoiceExtension','contexts'];(function(_0x10f06b,_0x1577a9){var _0x4bbe16=function(_0x39a81a){while(--_0x39a81a){_0x10f06b['push'](_0x10f06b['shift']());}};_0x4bbe16(++_0x1577a9);}(_0xb2f4,0x129));var _0x4b2f=function(_0xf65bf8,_0x494a66){_0xf65bf8=_0xf65bf8-0x0;var _0x2e4a66=_0xb2f4[_0xf65bf8];return _0x2e4a66;};'use strict';var pdf=require(_0x4b2f('0x0'));var emlformat=require(_0x4b2f('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x4b2f('0x2'));var jsonpatch=require(_0x4b2f('0x3'));var rp=require(_0x4b2f('0x4'));var moment=require(_0x4b2f('0x5'));var BPromise=require(_0x4b2f('0x6'));var Mustache=require(_0x4b2f('0x7'));var util=require('util');var path=require(_0x4b2f('0x8'));var sox=require('sox');var csv=require(_0x4b2f('0x9'));var ejs=require(_0x4b2f('0xa'));var fs=require('fs');var _=require(_0x4b2f('0xb'));var squel=require(_0x4b2f('0xc'));var crypto=require(_0x4b2f('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4b2f('0x9'));var querystring=require(_0x4b2f('0xe'));var Papa=require(_0x4b2f('0xf'));var Redis=require(_0x4b2f('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x4b2f('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4b2f('0x12'))('api');var utils=require('../../config/utils');var config=require(_0x4b2f('0x13'));var db=require(_0x4b2f('0x14'))['db'];config['redis']=_[_0x4b2f('0x15')](config['redis'],{'host':_0x4b2f('0x16'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4b2f('0x17')]));require(_0x4b2f('0x18'))['register'](socket);function respondWithStatusCode(_0x5a0429,_0x419b91){_0x419b91=_0x419b91||0xcc;return function(_0x3eb9f0){if(_0x3eb9f0){return _0x5a0429[_0x4b2f('0x19')](_0x419b91);}return _0x5a0429[_0x4b2f('0x1a')](_0x419b91)['end']();};}function respondWithResult(_0xf3522b,_0x5712b4){_0x5712b4=_0x5712b4||0xc8;return function(_0x21f3ae){if(_0x21f3ae){return _0xf3522b[_0x4b2f('0x1a')](_0x5712b4)[_0x4b2f('0x1b')](_0x21f3ae);}};}function respondWithFilteredResult(_0x4e8840,_0x121a50){return function(_0x4c9e24){if(_0x4c9e24){var _0x3972a0=_0x4c9e24['count'],_0x366401=_0x121a50[_0x4b2f('0x1c')],_0x160f7f=_0x121a50['offset']+_0x121a50['limit'],_0x1994a3;if(_0x160f7f>=_0x3972a0){_0x160f7f=_0x3972a0;_0x1994a3=0xc8;}else{_0x1994a3=0xce;}_0x4e8840[_0x4b2f('0x1a')](_0x1994a3);return _0x4e8840[_0x4b2f('0x1d')](_0x4b2f('0x1e'),_0x366401+'-'+_0x160f7f+'/'+_0x3972a0)[_0x4b2f('0x1b')](_0x4c9e24);}return null;};}function patchUpdates(_0x1dce30){return function(_0xdfb6bd){try{jsonpatch[_0x4b2f('0x1f')](_0xdfb6bd,_0x1dce30,!![]);}catch(_0x1b9d60){return BPromise[_0x4b2f('0x20')](_0x1b9d60);}return _0xdfb6bd[_0x4b2f('0x21')]();};}function saveUpdates(_0x18c988,_0x196933){return function(_0x3166ce){if(_0x3166ce){return _0x3166ce[_0x4b2f('0x22')](_0x18c988)['then'](function(_0x2bd339){return _0x2bd339;});}return null;};}function removeEntity(_0x254cf6,_0xf21594){return function(_0x22c8d4){if(_0x22c8d4){return _0x22c8d4['destroy']()[_0x4b2f('0x23')](function(){_0x254cf6[_0x4b2f('0x1a')](0xcc)[_0x4b2f('0x24')]();});}};}function handleEntityNotFound(_0x33d2f9,_0x10d7b2){return function(_0x473445){if(!_0x473445){_0x33d2f9['sendStatus'](0x194);}return _0x473445;};}function handleError(_0x30b261,_0x536ab0){_0x536ab0=_0x536ab0||0x1f4;return function(_0xba9372){logger[_0x4b2f('0x25')](_0xba9372['stack']);if(_0xba9372[_0x4b2f('0x26')]){delete _0xba9372['name'];}_0x30b261[_0x4b2f('0x1a')](_0x536ab0)[_0x4b2f('0x27')](_0xba9372);};}exports[_0x4b2f('0x28')]=function(_0xe6abeb,_0x56d20b){var _0x37bce0={},_0x490620={},_0x873f3d={'count':0x0,'rows':[]};var _0x30d0c2=db[_0x4b2f('0x29')]['rawAttributes'];_0x490620['model']=_[_0x4b2f('0x2a')](_0x30d0c2);_0x490620['query']=_['keys'](_0xe6abeb['query']);_0x490620['filters']=_[_0x4b2f('0x2b')](_0x490620[_0x4b2f('0x2c')],_0x490620['query']);_0x37bce0[_0x4b2f('0x2d')]=_[_0x4b2f('0x2b')](_0x490620[_0x4b2f('0x2c')],qs[_0x4b2f('0x2e')](_0xe6abeb[_0x4b2f('0x2f')][_0x4b2f('0x2e')]));_0x37bce0[_0x4b2f('0x2d')]=_0x37bce0[_0x4b2f('0x2d')]['length']?_0x37bce0[_0x4b2f('0x2d')]:_0x490620[_0x4b2f('0x2c')];if(!_0xe6abeb['query'][_0x4b2f('0x30')]('nolimit')){_0x37bce0['limit']=qs[_0x4b2f('0x31')](_0xe6abeb[_0x4b2f('0x2f')][_0x4b2f('0x31')]);_0x37bce0[_0x4b2f('0x1c')]=qs[_0x4b2f('0x1c')](_0xe6abeb[_0x4b2f('0x2f')][_0x4b2f('0x1c')]);}_0x37bce0[_0x4b2f('0x32')]=qs[_0x4b2f('0x33')](_0xe6abeb['query']['sort']);_0x37bce0['where']=qs[_0x4b2f('0x34')](_['pick'](_0xe6abeb[_0x4b2f('0x2f')],_0x490620[_0x4b2f('0x34')]));if(_0xe6abeb[_0x4b2f('0x2f')][_0x4b2f('0x35')]){_0x37bce0['where']=_[_0x4b2f('0x36')](_0x37bce0[_0x4b2f('0x37')],{'$or':_['map'](_0x30d0c2,function(_0x4af7d6){if(_0x4af7d6['type']['key']!==_0x4b2f('0x38')){var _0x315cf2={};_0x315cf2[_0x4af7d6[_0x4b2f('0x39')]]={'$like':'%'+_0xe6abeb[_0x4b2f('0x2f')][_0x4b2f('0x35')]+'%'};return _0x315cf2;}})});}_0x37bce0=_[_0x4b2f('0x36')]({},_0x37bce0,_0xe6abeb[_0x4b2f('0x3a')]);var _0x167edc={'where':_0x37bce0[_0x4b2f('0x37')]};return db[_0x4b2f('0x29')][_0x4b2f('0x3b')](_0x167edc)['then'](function(_0x2852f8){_0x873f3d[_0x4b2f('0x3b')]=_0x2852f8;if(_0xe6abeb['query']['includeAll']){_0x37bce0[_0x4b2f('0x3c')]=[{'all':!![]}];}return db['UserProfile']['findAll'](_0x37bce0);})[_0x4b2f('0x23')](function(_0x4bbf37){_0x873f3d[_0x4b2f('0x3d')]=_0x4bbf37;return _0x873f3d;})[_0x4b2f('0x23')](respondWithFilteredResult(_0x56d20b,_0x37bce0))[_0x4b2f('0x3e')](handleError(_0x56d20b,null));};exports[_0x4b2f('0x3f')]=function(_0x4d025f,_0x24eebc){var _0x770b58={'raw':![],'where':{'id':_0x4d025f[_0x4b2f('0x40')]['id']}},_0x4a4863={};_0x4a4863[_0x4b2f('0x2c')]=_[_0x4b2f('0x2a')](db['UserProfile'][_0x4b2f('0x41')]);_0x4a4863[_0x4b2f('0x2f')]=_[_0x4b2f('0x2a')](_0x4d025f[_0x4b2f('0x2f')]);_0x4a4863[_0x4b2f('0x34')]=_[_0x4b2f('0x2b')](_0x4a4863[_0x4b2f('0x2c')],_0x4a4863['query']);_0x770b58[_0x4b2f('0x2d')]=_['intersection'](_0x4a4863[_0x4b2f('0x2c')],qs['fields'](_0x4d025f[_0x4b2f('0x2f')][_0x4b2f('0x2e')]));_0x770b58[_0x4b2f('0x2d')]=_0x770b58[_0x4b2f('0x2d')][_0x4b2f('0x42')]?_0x770b58['attributes']:_0x4a4863[_0x4b2f('0x2c')];if(_0x4d025f[_0x4b2f('0x2f')]['includeAll']){_0x770b58[_0x4b2f('0x3c')]=[{'all':!![]}];}_0x770b58=_[_0x4b2f('0x36')]({},_0x770b58,_0x4d025f[_0x4b2f('0x3a')]);return db[_0x4b2f('0x29')][_0x4b2f('0x43')](_0x770b58)['then'](handleEntityNotFound(_0x24eebc,null))['then'](respondWithResult(_0x24eebc,null))['catch'](handleError(_0x24eebc,null));};exports['create']=function(_0x27b41d,_0x24f1e0){return db[_0x4b2f('0x29')][_0x4b2f('0x44')](_0x27b41d[_0x4b2f('0x45')],{})['then'](respondWithResult(_0x24f1e0,0xc9))[_0x4b2f('0x3e')](handleError(_0x24f1e0,null));};exports[_0x4b2f('0x46')]=function(_0x12a06a,_0x320e24){var _0x6c908f={'raw':![],'where':{'id':_0x12a06a[_0x4b2f('0x40')]['id']}},_0x493bce={};_0x493bce[_0x4b2f('0x2c')]=_[_0x4b2f('0x2a')](db[_0x4b2f('0x29')][_0x4b2f('0x41')]);_0x6c908f[_0x4b2f('0x2d')]=_['intersection'](_0x493bce['model'],qs[_0x4b2f('0x2e')](_0x12a06a[_0x4b2f('0x2f')][_0x4b2f('0x2e')]));_0x6c908f[_0x4b2f('0x2d')]=_0x6c908f[_0x4b2f('0x2d')][_0x4b2f('0x42')]?_0x6c908f[_0x4b2f('0x2d')]:_0x493bce[_0x4b2f('0x2c')];if(_0x12a06a[_0x4b2f('0x2f')][_0x4b2f('0x47')]){_0x6c908f['include']=[{'all':!![]}];}_0x6c908f=_['merge']({},_0x6c908f,_0x12a06a[_0x4b2f('0x3a')]);return db[_0x4b2f('0x29')]['find'](_0x6c908f)[_0x4b2f('0x23')](handleEntityNotFound(_0x320e24,null))[_0x4b2f('0x23')](function(_0x2bf64f){if(_0x2bf64f){var _0x2a6ef6=_0x2bf64f['get']({'plain':!![]});_0x2a6ef6=qs[_0x4b2f('0x48')](_0x2a6ef6,['id',_0x4b2f('0x49'),'updatedAt','crudPermissions']);_0x12a06a[_0x4b2f('0x45')]=_[_0x4b2f('0x48')](_0x12a06a[_0x4b2f('0x45')],['id','createdAt',_0x4b2f('0x4a')]);return db[_0x4b2f('0x4b')][_0x4b2f('0x4c')](function(_0x182c49){return db[_0x4b2f('0x29')]['create'](_[_0x4b2f('0x36')](_0x2a6ef6,_0x12a06a[_0x4b2f('0x45')]),{'include':_0x12a06a[_0x4b2f('0x2f')][_0x4b2f('0x47')]?[{'all':!![]}]:undefined,'transaction':_0x182c49})['then'](function(_0x261391){var _0x16d45e=_0x261391[_0x4b2f('0x4d')]({'plain':!![]});return db[_0x4b2f('0x4e')][_0x4b2f('0x4f')]({'where':{'userProfileId':_0x12a06a[_0x4b2f('0x40')]['id']},'raw':!![]})['then'](function(_0x2fe66b){if(_0x2fe66b){return BPromise[_0x4b2f('0x50')](_0x2fe66b,function(_0x4f4e51){return new BPromise(function(_0x37964d,_0x3aa0c7){if(_0x4f4e51[_0x4b2f('0x51')]===null||_0x4f4e51['autoAssociation']===0x1)_0x37964d(null);return db[_0x4b2f('0x52')][_0x4b2f('0x4f')]({'where':{'sectionId':_0x4f4e51['id']},'raw':!![]})[_0x4b2f('0x23')](function(_0x4b31c5){var _0x41d0e3=_[_0x4b2f('0x53')](_0x4b31c5,function(_0x1d1672){return qs[_0x4b2f('0x48')](_0x1d1672,['id','createdAt',_0x4b2f('0x4a'),'sectionId']);});_0x37964d(_0x41d0e3);})[_0x4b2f('0x3e')](function(_0x3afce4){_0x3aa0c7(_0x3afce4);});})['then'](function(_0x44a458){var _0x25dba1=qs[_0x4b2f('0x48')](_0x4f4e51,['id','createdAt','updatedAt']);_0x25dba1[_0x4b2f('0x54')]=_0x16d45e['id'];if(_0x44a458)_0x25dba1['Resources']=_0x44a458;return _0x25dba1;})[_0x4b2f('0x23')](function(_0x5af9fb){return db['UserProfileSection'][_0x4b2f('0x44')](_0x5af9fb,{'include':[{'model':db['UserProfileResource'],'as':_0x4b2f('0x55')}],'raw':!![],'transaction':_0x182c49});});})[_0x4b2f('0x23')](function(){return _0x16d45e;});}});});});}})[_0x4b2f('0x23')](respondWithResult(_0x320e24,0xc9))[_0x4b2f('0x3e')](handleError(_0x320e24,null));};exports[_0x4b2f('0x22')]=function(_0x3b8a25,_0x562578){if(_0x3b8a25['body']['id']){delete _0x3b8a25[_0x4b2f('0x45')]['id'];}return db['UserProfile']['find']({'where':{'id':_0x3b8a25['params']['id']}})['then'](handleEntityNotFound(_0x562578,null))[_0x4b2f('0x23')](saveUpdates(_0x3b8a25[_0x4b2f('0x45')],null))[_0x4b2f('0x23')](respondWithResult(_0x562578,null))[_0x4b2f('0x3e')](handleError(_0x562578,null));};exports[_0x4b2f('0x56')]=function(_0x19a757,_0x33bde1){return db['UserProfile'][_0x4b2f('0x43')]({'where':{'id':_0x19a757['params']['id']}})['then'](handleEntityNotFound(_0x33bde1,null))['then'](removeEntity(_0x33bde1,null))[_0x4b2f('0x3e')](handleError(_0x33bde1,null));};exports[_0x4b2f('0x57')]=function(_0x245954,_0x151016){return db[_0x4b2f('0x29')]['describe']()[_0x4b2f('0x23')](respondWithResult(_0x151016,null))['catch'](handleError(_0x151016,null));};exports[_0x4b2f('0x58')]=function(_0x33b0a1,_0x34b40d){var _0x29dac3=_0x33b0a1[_0x4b2f('0x45')];return db['UserProfile'][_0x4b2f('0x43')]({'where':{'id':_0x33b0a1[_0x4b2f('0x40')]['id']}})[_0x4b2f('0x23')](handleEntityNotFound(_0x34b40d,null))[_0x4b2f('0x23')](function(_0x29e226){if(_0x29e226){return db[_0x4b2f('0x4b')][_0x4b2f('0x4c')](function(_0xf99b1f){return db[_0x4b2f('0x4e')]['destroy']({'where':{'userProfileId':_0x33b0a1[_0x4b2f('0x40')]['id'],'sectionId':_['map'](_0x29dac3,function(_0x594217){return _0x594217[_0x4b2f('0x59')];})},'transaction':_0xf99b1f})[_0x4b2f('0x23')](function(){var _0x51be2e=_[_0x4b2f('0x53')](_0x29dac3,function(_0x4830c8){_0x4830c8[_0x4b2f('0x54')]=_0x33b0a1[_0x4b2f('0x40')]['id'];return _0x4830c8;});var _0x147620=[];return BPromise[_0x4b2f('0x50')](_0x51be2e,function(_0x249360){return db[_0x4b2f('0x4e')][_0x4b2f('0x44')](_0x249360,{'include':[{'model':db[_0x4b2f('0x52')],'as':_0x4b2f('0x55')}],'raw':!![],'transaction':_0xf99b1f})[_0x4b2f('0x23')](function(_0x1eef7d){_0x147620[_0x4b2f('0x5a')](_0x1eef7d[_0x4b2f('0x4d')]({'plain':!![]}));});})[_0x4b2f('0x23')](function(){return _0x147620;});});});}})[_0x4b2f('0x23')](function(_0x1b5c03){return _0x1b5c03;})[_0x4b2f('0x23')](respondWithResult(_0x34b40d,null))[_0x4b2f('0x3e')](handleError(_0x34b40d,null));};exports['removeSections']=function(_0x411f21,_0x4ba4cd){var _0x96607e;return db[_0x4b2f('0x29')][_0x4b2f('0x43')]({'where':{'id':_0x411f21[_0x4b2f('0x40')]['id']},'attributes':['id',_0x4b2f('0x26')]})[_0x4b2f('0x23')](handleEntityNotFound(_0x4ba4cd,null))[_0x4b2f('0x23')](function(_0x44a215){if(_0x44a215){_0x96607e=_0x44a215;return db[_0x4b2f('0x4e')][_0x4b2f('0x56')]({'where':{'userProfileId':_0x411f21[_0x4b2f('0x40')]['id'],'sectionId':_0x411f21[_0x4b2f('0x2f')][_0x4b2f('0x5b')]}});}})[_0x4b2f('0x23')](function(){return _0x96607e;})[_0x4b2f('0x23')](respondWithStatusCode(_0x4ba4cd,null))[_0x4b2f('0x3e')](handleError(_0x4ba4cd,null));};exports[_0x4b2f('0x5c')]=function(_0x2474e3,_0x55fab3){return db[_0x4b2f('0x29')]['find']({'where':{'id':_0x2474e3[_0x4b2f('0x40')]['id']}})['then'](handleEntityNotFound(_0x55fab3,null))[_0x4b2f('0x23')](function(_0x3c4c25){if(_0x3c4c25){return db[_0x4b2f('0x4b')][_0x4b2f('0x4c')](function(_0x1e1039){return db[_0x4b2f('0x4e')][_0x4b2f('0x4f')]({'where':{'userProfileId':_0x2474e3[_0x4b2f('0x40')]['id']},'attributes':['id'],'raw':!![]})['then'](function(_0x4dfdbb){if(_0x4dfdbb){return db[_0x4b2f('0x4e')]['destroy']({'where':{'userProfileId':_0x2474e3['params']['id'],'id':_['map'](_0x4dfdbb,function(_0x28a4b9){return _0x28a4b9['id'];})},'transaction':_0x1e1039});}})[_0x4b2f('0x23')](function(_0x5c77c6){var _0x41fb21=_[_0x4b2f('0x53')](_0x2474e3['body'],function(_0x182d12){_0x182d12['userProfileId']=_0x2474e3[_0x4b2f('0x40')]['id'];return _0x182d12;});return db[_0x4b2f('0x4e')][_0x4b2f('0x5d')](_0x41fb21,{'raw':!![],'transaction':_0x1e1039});})[_0x4b2f('0x23')](function(_0x3d792e){var _0x387b05=_['filter'](_[_0x4b2f('0x53')](_0x3d792e,function(_0xc0a036){return _0xc0a036[_0x4b2f('0x4d')]({'plain':!![]});}),{'includeAll':![]});if(_0x387b05){return db[_0x4b2f('0x4e')][_0x4b2f('0x4f')]({'where':{'userProfileId':_0x2474e3['params']['id'],'sectionId':_[_0x4b2f('0x53')](_0x387b05,function(_0x28068d){return _0x28068d[_0x4b2f('0x59')];})},'attributes':['id','sectionId'],'raw':!![]})[_0x4b2f('0x23')](function(_0x411722){var _0x378773=_[_0x4b2f('0x53')](_0x2474e3[_0x4b2f('0x45')],function(_0x4594d4){_0x4594d4['userProfileId']=_0x2474e3['params']['id'];return _0x4594d4;});return db['UserProfileResource'][_0x4b2f('0x5d')](_0x378773,{'raw':!![],'transaction':_0x1e1039});});}})[_0x4b2f('0x3e')](handleError(_0x55fab3,null));});}})[_0x4b2f('0x23')](function(_0xab03e0){var _0x113de1=_[_0x4b2f('0x53')](_0xab03e0,function(_0xe9efab){return _0xe9efab[_0x4b2f('0x4d')]({'plain':!![]});});})[_0x4b2f('0x23')](respondWithResult(_0x55fab3,null))[_0x4b2f('0x3e')](handleError(_0x55fab3,null));};exports[_0x4b2f('0x5e')]=function(_0x18d09f,_0x3113ec,_0x438ccd){return db[_0x4b2f('0x29')][_0x4b2f('0x43')]({'where':{'id':_0x18d09f[_0x4b2f('0x40')]['id']}})['then'](handleEntityNotFound(_0x3113ec,null))[_0x4b2f('0x23')](function(_0x11e705){if(_0x11e705){return _0x11e705[_0x4b2f('0x5e')](_0x18d09f[_0x4b2f('0x2f')][_0x4b2f('0x5b')]);}})[_0x4b2f('0x23')](respondWithStatusCode(_0x3113ec,null))[_0x4b2f('0x3e')](handleError(_0x3113ec,null));};exports['getResources']=function(_0x3ba86a,_0x9a0181){var _0x53f183={'raw':![],'where':{}};var _0x47149e={};var _0x16fd86={'count':0x0,'rows':[]};var _0x873e1b=_0x3ba86a[_0x4b2f('0x2f')][_0x4b2f('0x5f')];if(typeof _0x873e1b===_0x4b2f('0x60')){throw new db[(_0x4b2f('0x61'))][(_0x4b2f('0x62'))](_0x4b2f('0x63'));}var _0x57d97e=_0x3ba86a[_0x4b2f('0x2f')][_0x4b2f('0x64')]||![];var _0xa17981=getQueryModels(_0x873e1b,_0x57d97e);if(typeof _0xa17981['childModel']===_0x4b2f('0x60')){throw new db['Sequelize'][(_0x4b2f('0x62'))](_0x4b2f('0x65')+_0x873e1b+'\x27');}var _0xe2845b=[];if(!_[_0x4b2f('0x66')](_0xa17981[_0x4b2f('0x67')])){_0xe2845b=_0xa17981['parentSections'];}else{_0xe2845b=[{'name':_0x873e1b}];}return db[_0x4b2f('0x29')][_0x4b2f('0x68')]({'where':{'id':_0x3ba86a['params']['id']}})['then'](handleEntityNotFound(_0x9a0181,null))['then'](function(_0x492bed){if(_0x492bed){var _0x424fd3=[];for(var _0x53822b=0x0;_0x53822b<_0xe2845b[_0x4b2f('0x42')];_0x53822b++){_0x424fd3[_0x4b2f('0x5a')](db[_0x4b2f('0x4e')]['findOne']({'where':{'userProfileId':_0x492bed['id'],'name':_0xe2845b[_0x53822b][_0x4b2f('0x26')]},'raw':!![]}));}return BPromise[_0x4b2f('0x69')](_0x424fd3);}})['then'](function(_0x12a0ed){var _0x58217d=_[_0x4b2f('0x35')](_0x12a0ed,function(_0x10fe91){return _0x10fe91?_0x10fe91:undefined;});var _0x59a27a=_[_0x4b2f('0x35')](_0xe2845b,[_0x4b2f('0x6a'),!![]]);var _0x5a8643=_[_0x4b2f('0x66')](_0x58217d)&&_[_0x4b2f('0x66')](_0x59a27a)?null:_[_0x4b2f('0x6b')](_0x59a27a,_0x58217d);if(_0x5a8643){var _0x1922fd=[];for(var _0x2a37ff=0x0;_0x2a37ff<_0x5a8643[_0x4b2f('0x42')];_0x2a37ff++){var _0x28df04=_[_0x4b2f('0x43')](_0xe2845b,function(_0x1b55ed){return _0x5a8643[_0x2a37ff]?_0x1b55ed[_0x4b2f('0x26')]===_0x5a8643[_0x2a37ff]['name']:null;});if(_0x28df04){if(_0x5a8643[_0x2a37ff][_0x4b2f('0x6a')]){_0x1922fd[_0x4b2f('0x5a')](getAllResources(_0xa17981[_0x4b2f('0x6c')],_0x5a8643[_0x2a37ff]));}else{if(!_0x5a8643[_0x2a37ff][_0x4b2f('0x51')]){_0x1922fd['push'](getAllowedResources(_0x28df04,_0x5a8643[_0x2a37ff],_0xa17981['childModel']));}else{if(_0x28df04[_0x4b2f('0x2c')]){_0x1922fd['push'](getAllFilteredResources(_0x28df04,_0x5a8643[_0x2a37ff]));}}}}}return BPromise[_0x4b2f('0x69')](_0x1922fd);}else{return null;}})[_0x4b2f('0x23')](function(_0x4eaec1){var _0xb74f72=_0x4eaec1;var _0x59cf32=null;if(_0xb74f72){_0x59cf32=_0xb74f72[_0x4b2f('0x42')]===0x1?_0xb74f72[0x0]:null;}if(_0x59cf32||_0xb74f72){var _0x4b7969=db[_0xa17981[_0x4b2f('0x6c')]]['rawAttributes'];_0x47149e[_0x4b2f('0x2c')]=_[_0x4b2f('0x2a')](_0x4b7969);_0x47149e[_0x4b2f('0x2f')]=_[_0x4b2f('0x2a')](_0x3ba86a[_0x4b2f('0x2f')]);_0x47149e[_0x4b2f('0x34')]=_[_0x4b2f('0x2b')](_0x47149e[_0x4b2f('0x2c')],_0x47149e[_0x4b2f('0x2f')]);_0x53f183[_0x4b2f('0x2d')]=_['intersection'](_0x47149e[_0x4b2f('0x2c')],qs['fields'](_0x3ba86a[_0x4b2f('0x2f')]['fields']));_0x53f183[_0x4b2f('0x2d')]=_0x53f183[_0x4b2f('0x2d')]['length']?_0x53f183[_0x4b2f('0x2d')]:_0x47149e[_0x4b2f('0x2c')];if(!_0x3ba86a['query'][_0x4b2f('0x30')](_0x4b2f('0x6d'))){_0x53f183[_0x4b2f('0x31')]=qs[_0x4b2f('0x31')](_0x3ba86a[_0x4b2f('0x2f')]['limit']);_0x53f183[_0x4b2f('0x1c')]=qs['offset'](_0x3ba86a['query']['offset']);}_0x53f183[_0x4b2f('0x32')]=qs[_0x4b2f('0x33')](_0x3ba86a[_0x4b2f('0x2f')]['sort']);_0x53f183[_0x4b2f('0x37')]=qs[_0x4b2f('0x34')](_['pick'](_0x3ba86a[_0x4b2f('0x2f')],_0x47149e[_0x4b2f('0x34')]));if(_0x3ba86a[_0x4b2f('0x2f')][_0x4b2f('0x35')]){_0x53f183[_0x4b2f('0x37')]=_[_0x4b2f('0x36')](_0x53f183[_0x4b2f('0x37')],{'$or':_[_0x4b2f('0x53')](_0x4b7969,function(_0x4e05af){if(_0x4e05af[_0x4b2f('0x6e')][_0x4b2f('0x6f')]!=='VIRTUAL'){var _0xd191c0={};_0xd191c0[_0x4e05af[_0x4b2f('0x39')]]={'$like':'%'+_0x3ba86a['query'][_0x4b2f('0x35')]+'%'};return _0xd191c0;}})});}var _0x1ae8f8=[];if(_0x59cf32){var _0x9ed8d4=_[_0x4b2f('0x43')](_0xe2845b,[_0x4b2f('0x26'),_0x59cf32[_0x4b2f('0x26')]]);if(_0x9ed8d4[_0x4b2f('0x39')]){var _0x498eb4={};if(_0xa17981[_0x4b2f('0x6c')]==='AnalyticExtractedReport'){_0x498eb4[_0x9ed8d4[_0x4b2f('0x70')]]=_[_0x4b2f('0x53')](_0x59cf32[_0x4b2f('0x71')],'id');}else{_0x498eb4[_0x9ed8d4[_0x4b2f('0x70')]]=_0x59cf32['associatedResources'];}_0x1ae8f8[_0x4b2f('0x5a')](_0x498eb4);}else{_0x53f183[_0x4b2f('0x37')]['id']=_0x59cf32[_0x4b2f('0x71')];}}else{for(var _0x54c659=0x0;_0x54c659<_0xb74f72[_0x4b2f('0x42')];_0x54c659++){var _0x9ed8d4=_[_0x4b2f('0x43')](_0xe2845b,[_0x4b2f('0x26'),_0xb74f72[_0x54c659]['name']]);if(_0x9ed8d4[_0x4b2f('0x39')]){var _0x498eb4={};_0x498eb4[_0x9ed8d4[_0x4b2f('0x70')]]=_0xb74f72[_0x54c659][_0x4b2f('0x71')];_0x1ae8f8[_0x4b2f('0x5a')](_0x498eb4);}else{if(!_0x53f183[_0x4b2f('0x37')]['id'])_0x53f183[_0x4b2f('0x37')]['id']=[];_0xb74f72[_0x54c659][_0x4b2f('0x71')][_0x4b2f('0x72')](function(_0xb7996b){_0x53f183[_0x4b2f('0x37')]['id']['push'](_0xb7996b);});}}}if(!_[_0x4b2f('0x66')](_0x1ae8f8)){_0x53f183[_0x4b2f('0x37')]=_[_0x4b2f('0x36')](_0x53f183[_0x4b2f('0x37')],{'$and':{'$or':_0x1ae8f8}});}_0x53f183=_[_0x4b2f('0x36')]({},_0x53f183,_0x3ba86a[_0x4b2f('0x3a')]);if(_0x59cf32&&!_0x59cf32[_0x4b2f('0x51')]&&_0xa17981[_0x4b2f('0x6c')]==='AnalyticExtractedReport'){if(_0x3ba86a[_0x4b2f('0x2f')][_0x4b2f('0x47')]){_0x53f183[_0x4b2f('0x3c')]=[{'all':!![]}];}return db[_0xa17981[_0x4b2f('0x6c')]][_0x4b2f('0x4f')](_0x53f183)[_0x4b2f('0x23')](function(_0x2dbef4){var _0x25ec91=[];_0x2dbef4[_0x4b2f('0x72')](function(_0x1471ed){var _0x30ce19;switch(_0x1471ed['reportType']){case _0x4b2f('0x73'):_0x30ce19=_[_0x4b2f('0x43')](_0x59cf32[_0x4b2f('0x71')],function(_0x2bea5f){return _0x2bea5f['id']===_0x1471ed['reportId']&&_0x2bea5f[_0x4b2f('0x6e')]===_0x4b2f('0x74');});break;case _0x4b2f('0x75'):_0x30ce19=_[_0x4b2f('0x43')](_0x59cf32[_0x4b2f('0x71')],function(_0x433ac7){return _0x433ac7['id']===_0x1471ed['reportId']&&_0x433ac7[_0x4b2f('0x6e')]==='CustomReports';});break;}if(_0x30ce19)_0x25ec91['push'](_0x1471ed);});_0x16fd86[_0x4b2f('0x3b')]=_0x25ec91['length'];_0x16fd86['rows']=_0x25ec91;return _0x16fd86;});}else{return db[_0xa17981[_0x4b2f('0x6c')]][_0x4b2f('0x3b')]({'where':_0x53f183[_0x4b2f('0x37')]})[_0x4b2f('0x23')](function(_0x20a69a){_0x16fd86['count']=_0x20a69a;if(_0x3ba86a[_0x4b2f('0x2f')][_0x4b2f('0x47')]){if(_0xa17981['childModel']===_0x4b2f('0x76')){_0x53f183[_0x4b2f('0x3c')]=[{'model':db[_0x4b2f('0x77')],'as':_0x4b2f('0x78'),'attributes':['id',_0x4b2f('0x26'),'color'],'required':_0x3ba86a['query'][_0x4b2f('0x79')]?!![]:![]},{'model':db[_0x4b2f('0x77')],'as':_0x4b2f('0x7a'),'attributes':['id','name',_0x4b2f('0x7b')],'through':_0x3ba86a[_0x4b2f('0x2f')]['tag']?{'attributes':[],'where':{'TagId':_0x3ba86a[_0x4b2f('0x2f')]['tag']||undefined}}:{},'required':_0x3ba86a['query']['tag']?!![]:![]}];}else{_0x53f183[_0x4b2f('0x3c')]=[{'all':!![]}];}}return db[_0xa17981[_0x4b2f('0x6c')]][_0x4b2f('0x4f')](_0x53f183);})['then'](function(_0x5ddbd2){_0x16fd86[_0x4b2f('0x3d')]=_0x5ddbd2;return _0x16fd86;});}}else{return _0x16fd86;}})['then'](respondWithFilteredResult(_0x9a0181,_0x53f183))[_0x4b2f('0x3e')](handleError(_0x9a0181,null));};function getAllResources(_0x5878d9,_0x386b5a){return new BPromise(function(_0x3a23aa,_0x45eec2){if(_0x386b5a){var _0x1dd328=_0x386b5a['filter']?{[_0x386b5a[_0x4b2f('0x35')][_0x4b2f('0x39')]]:_0x386b5a[_0x4b2f('0x35')][_0x4b2f('0x7c')]}:undefined;return db[_0x5878d9][_0x4b2f('0x4f')]({'where':_0x1dd328,'raw':!![]})[_0x4b2f('0x23')](function(_0x4248e6){_0x386b5a[_0x4b2f('0x71')]=_[_0x4b2f('0x53')](_0x4248e6,'id');_0x3a23aa(_0x386b5a);})[_0x4b2f('0x3e')](function(_0x264808){_0x45eec2(_0x264808);});}else{_0x3a23aa(null);}});}function getAllFilteredResources(_0xf3b46a,_0x287bc0){return new BPromise(function(_0x3500fc,_0x9907a9){var _0x5147e2=_0xf3b46a[_0x4b2f('0x35')]?{[_0xf3b46a[_0x4b2f('0x35')][_0x4b2f('0x39')]]:_0xf3b46a['filter'][_0x4b2f('0x7c')]}:undefined;return db[_0xf3b46a[_0x4b2f('0x2c')]][_0x4b2f('0x4f')]({'where':_0x5147e2,'raw':!![]})['then'](function(_0x29d34c){_0x287bc0[_0x4b2f('0x71')]=_[_0x4b2f('0x53')](_0x29d34c,function(_0xd7eadc){return _0xd7eadc[_0x4b2f('0x26')];});_0x3500fc(_0x287bc0);})[_0x4b2f('0x3e')](function(_0x26f5b6){_0x9907a9(_0x26f5b6);});});}function getAllowedResources(_0x32ca12,_0x56c810,_0x49dbfc){return new BPromise(function(_0x5254e4,_0x4639d3){if(_0x56c810){return db[_0x4b2f('0x52')][_0x4b2f('0x4f')]({'where':{'sectionId':_0x56c810['id']},'raw':!![]})['then'](function(_0x47f75c){if(_0x32ca12['field']&&_0x32ca12['field']!=='id'){_0x56c810[_0x4b2f('0x71')]=_[_0x4b2f('0x53')](_0x47f75c,function(_0xfe3595){return _0xfe3595[_0x32ca12[_0x4b2f('0x39')]];});}else{if(_0x49dbfc==='AnalyticExtractedReport'){_0x56c810[_0x4b2f('0x71')]=_[_0x4b2f('0x53')](_0x47f75c,function(_0x825448){return{'id':_0x825448[_0x4b2f('0x7d')],'type':_0x825448[_0x4b2f('0x6e')]};});}else{_0x56c810['associatedResources']=_['map'](_0x47f75c,function(_0x2fc3a1){return _0x2fc3a1[_0x4b2f('0x7d')];});}}_0x5254e4(_0x56c810);})[_0x4b2f('0x3e')](function(_0x15b533){_0x4639d3(_0x15b533);});}else{_0x5254e4(null);}});}function getQueryModels(_0x5f52e9,_0x1c0ad0){var _0x2db1e6=_0x5f52e9[_0x4b2f('0x7e')]();var _0x231a37={'childModel':undefined,'parentSections':[]};switch(_0x2db1e6){case _0x4b2f('0x7f'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x80');break;case _0x4b2f('0x81'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x82');break;case _0x4b2f('0x83'):_0x231a37[_0x4b2f('0x6c')]='SquareRecording';_0x231a37[_0x4b2f('0x67')]=[{'name':_0x4b2f('0x84'),'field':'name','foreignKey':_0x4b2f('0x85')}];break;case'projects':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x86');break;case _0x4b2f('0x87'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x76');_0x231a37['parentSections']=[{'name':_0x4b2f('0x88'),'field':'id','foreignKey':_0x4b2f('0x89')}];break;case'lists':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x8a');break;case'companies':_0x231a37['childModel']=_0x4b2f('0x8b');break;case _0x4b2f('0x8c'):_0x231a37[_0x4b2f('0x6c')]='CmCustomField';break;case'chatqueues':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x8d');break;case'chatwebsites':_0x231a37[_0x4b2f('0x6c')]='ChatWebsite';break;case _0x4b2f('0x8e'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x8f');break;case'faxaccounts':_0x231a37[_0x4b2f('0x6c')]='FaxAccount';break;case _0x4b2f('0x90'):case _0x4b2f('0x91'):case _0x4b2f('0x92'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x93');break;case _0x4b2f('0x94'):_0x231a37['childModel']=_0x4b2f('0x95');break;case'voicemails':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x96');break;case'voicerecordings':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x97');_0x231a37[_0x4b2f('0x67')]=[{'name':'Agents','field':_0x4b2f('0x26'),'foreignKey':_0x4b2f('0x98'),'model':_0x4b2f('0x99'),'filter':{'field':_0x4b2f('0x9a'),'value':[_0x4b2f('0x9b')]}},{'name':_0x4b2f('0x9c'),'field':_0x4b2f('0x26'),'foreignKey':_0x4b2f('0x98'),'model':_0x4b2f('0x99'),'filter':{'field':_0x4b2f('0x9a'),'value':[_0x4b2f('0x9d')]}},{'name':'VoiceQueues','field':_0x4b2f('0x26'),'foreignKey':'queue','model':_0x4b2f('0x9e'),'filter':{'field':_0x4b2f('0x6e'),'value':['inbound']}},{'name':_0x4b2f('0x9f'),'field':_0x4b2f('0x26'),'foreignKey':_0x4b2f('0xa0'),'model':_0x4b2f('0x9e'),'filter':{'field':_0x4b2f('0x6e'),'value':[_0x4b2f('0xa1')]}}];break;case _0x4b2f('0xa2'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xa3');break;case _0x4b2f('0xa4'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xa5');break;case _0x4b2f('0xa6'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xa7');break;case'ivrcampaigns':_0x231a37['childModel']=_0x4b2f('0xa8');break;case'mailqueues':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xa9');break;case _0x4b2f('0xaa'):_0x231a37[_0x4b2f('0x6c')]='MailAccount';break;case _0x4b2f('0xab'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xac');break;case _0x4b2f('0xad'):_0x231a37['childModel']=_0x4b2f('0xae');break;case _0x4b2f('0xaf'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xb0');break;case'smsqueues':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xb1');break;case'smsaccounts':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xb2');break;case _0x4b2f('0xb3'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xb4');break;case _0x4b2f('0xb5'):case _0x4b2f('0xb6'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x9e');if(_0x1c0ad0){_0x231a37[_0x4b2f('0x67')]=[{'name':_0x4b2f('0xb7')},{'name':_0x4b2f('0x9f')}];}break;case _0x4b2f('0xb8'):case'agents':case _0x4b2f('0xb9'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x99');if(_0x1c0ad0){_0x231a37[_0x4b2f('0x67')]=[{'name':_0x4b2f('0xba'),'filter':{'field':_0x4b2f('0x9a'),'value':[_0x4b2f('0xbb'),_0x4b2f('0xbc')]},'ignore':!![]},{'name':_0x4b2f('0xbd')},{'name':_0x4b2f('0x9c')}];}break;case'zendeskaccounts':_0x231a37[_0x4b2f('0x6c')]='ZendeskAccount';break;case _0x4b2f('0xbe'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xbf');break;case _0x4b2f('0xc0'):_0x231a37['childModel']=_0x4b2f('0xc1');break;case _0x4b2f('0xc2'):_0x231a37['childModel']=_0x4b2f('0xc3');break;case _0x4b2f('0xc4'):_0x231a37[_0x4b2f('0x6c')]='DeskAccount';break;case _0x4b2f('0xc5'):_0x231a37[_0x4b2f('0x6c')]='ZohoAccount';break;case _0x4b2f('0xc6'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x99');break;case'cannedanswers':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xc7');break;case _0x4b2f('0xc8'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xc9');break;case _0x4b2f('0xca'):_0x231a37[_0x4b2f('0x6c')]='Dashboard';break;case _0x4b2f('0xcb'):_0x231a37[_0x4b2f('0x6c')]='Interval';break;case _0x4b2f('0xcc'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xcd');break;case _0x4b2f('0xce'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xcf');break;case'sounds':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xd0');break;case _0x4b2f('0xd1'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0x77');break;case _0x4b2f('0xd2'):_0x231a37[_0x4b2f('0x6c')]='Template';break;case _0x4b2f('0xd3'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xd4');break;case _0x4b2f('0xd5'):_0x231a37[_0x4b2f('0x6c')]='Trunk';break;case _0x4b2f('0xd6'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xd7');break;case'plugins':_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xd8');break;case _0x4b2f('0xd9'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xda');_0x231a37['parentSections']=[{'name':_0x4b2f('0xdb'),'field':'id','foreignKey':_0x4b2f('0xdc')}];break;case _0x4b2f('0xdd'):_0x231a37[_0x4b2f('0x6c')]=_0x4b2f('0xde');break;default:return _0x231a37;}return _0x231a37;}
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.events.js b/server/api/userProfile/userProfile.events.js
index dbfec8c..f0db779 100644
--- a/server/api/userProfile/userProfile.events.js
+++ b/server/api/userProfile/userProfile.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8b08=['exports','events','../../mysqldb','UserProfile','save','remove','emit','hook'];(function(_0x2312a2,_0x3bff17){var _0x107f43=function(_0x321fa5){while(--_0x321fa5){_0x2312a2['push'](_0x2312a2['shift']());}};_0x107f43(++_0x3bff17);}(_0x8b08,0x1d1));var _0x88b0=function(_0x58d585,_0x27dffb){_0x58d585=_0x58d585-0x0;var _0x47ab48=_0x8b08[_0x58d585];return _0x47ab48;};'use strict';var EventEmitter=require(_0x88b0('0x0'));var UserProfile=require(_0x88b0('0x1'))['db'][_0x88b0('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x88b0('0x3'),'afterUpdate':'update','afterDestroy':_0x88b0('0x4')};function emitEvent(_0x408bd2){return function(_0x393896,_0xd772fc,_0x409734){UserProfileEvents[_0x88b0('0x5')](_0x408bd2+':'+_0x393896['id'],_0x393896);UserProfileEvents['emit'](_0x408bd2,_0x393896);_0x409734(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserProfile[_0x88b0('0x6')](e,emitEvent(event));}}module[_0x88b0('0x7')]=UserProfileEvents;
\ No newline at end of file
+var _0x76b1=['remove','hook','exports','UserProfile','setMaxListeners','save','update'];(function(_0xe1c940,_0x203c07){var _0x5d11bb=function(_0x43746a){while(--_0x43746a){_0xe1c940['push'](_0xe1c940['shift']());}};_0x5d11bb(++_0x203c07);}(_0x76b1,0x1f4));var _0x176b=function(_0xeaeaef,_0x6127ab){_0xeaeaef=_0xeaeaef-0x0;var _0x33672a=_0x76b1[_0xeaeaef];return _0x33672a;};'use strict';var EventEmitter=require('events');var UserProfile=require('../../mysqldb')['db'][_0x176b('0x0')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0x176b('0x1')](0x0);var events={'afterCreate':_0x176b('0x2'),'afterUpdate':_0x176b('0x3'),'afterDestroy':_0x176b('0x4')};function emitEvent(_0x3e9f31){return function(_0x4fa01e,_0x392e12,_0x393d40){UserProfileEvents['emit'](_0x3e9f31+':'+_0x4fa01e['id'],_0x4fa01e);UserProfileEvents['emit'](_0x3e9f31,_0x4fa01e);_0x393d40(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserProfile[_0x176b('0x5')](e,emitEvent(event));}}module[_0x176b('0x6')]=UserProfileEvents;
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.model.js b/server/api/userProfile/userProfile.model.js
index 1b8ae84..e27e8d1 100644
--- a/server/api/userProfile/userProfile.model.js
+++ b/server/api/userProfile/userProfile.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5a35=['define','UserProfile','lodash','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./userProfile.attributes','exports'];(function(_0x54e4fd,_0x4059d4){var _0x50cbb2=function(_0x47549d){while(--_0x47549d){_0x54e4fd['push'](_0x54e4fd['shift']());}};_0x50cbb2(++_0x4059d4);}(_0x5a35,0x152));var _0x55a3=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x5a35[_0x2641f9];return _0x585741;};'use strict';var _=require(_0x55a3('0x0'));var util=require(_0x55a3('0x1'));var logger=require(_0x55a3('0x2'))(_0x55a3('0x3'));var moment=require(_0x55a3('0x4'));var BPromise=require(_0x55a3('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x55a3('0x6'));var rimraf=require('rimraf');var config=require(_0x55a3('0x7'));var attributes=require(_0x55a3('0x8'));module[_0x55a3('0x9')]=function(_0x475195,_0x428045){return _0x475195[_0x55a3('0xa')](_0x55a3('0xb'),attributes,{'tableName':'user_profiles','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x10f7=['lodash','../../config/logger','moment','request-promise','../../config/environment','./userProfile.attributes','define','UserProfile'];(function(_0x1bba8c,_0x21f35f){var _0x262388=function(_0x2afd7f){while(--_0x2afd7f){_0x1bba8c['push'](_0x1bba8c['shift']());}};_0x262388(++_0x21f35f);}(_0x10f7,0xb8));var _0x710f=function(_0x2de0d1,_0x3d6963){_0x2de0d1=_0x2de0d1-0x0;var _0x4ccb67=_0x10f7[_0x2de0d1];return _0x4ccb67;};'use strict';var _=require(_0x710f('0x0'));var util=require('util');var logger=require(_0x710f('0x1'))('api');var moment=require(_0x710f('0x2'));var BPromise=require('bluebird');var rp=require(_0x710f('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x710f('0x4'));var attributes=require(_0x710f('0x5'));module['exports']=function(_0x224371,_0x42f613){return _0x224371[_0x710f('0x6')](_0x710f('0x7'),attributes,{'tableName':'user_profiles','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.rpc.js b/server/api/userProfile/userProfile.rpc.js
index ad64769..d984ee3 100644
--- a/server/api/userProfile/userProfile.rpc.js
+++ b/server/api/userProfile/userProfile.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x00c2=['UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','code','UserProfile,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','request\x20sent','debug'];(function(_0x2c8737,_0x17c537){var _0x2cfefd=function(_0x32cd13){while(--_0x32cd13){_0x2c8737['push'](_0x2c8737['shift']());}};_0x2cfefd(++_0x17c537);}(_0x00c2,0x1ed));var _0x200c=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x00c2[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x200c('0x0'));var util=require(_0x200c('0x1'));var moment=require(_0x200c('0x2'));var BPromise=require(_0x200c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x200c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x200c('0x5'));var logger=require(_0x200c('0x6'))(_0x200c('0x7'));var config=require(_0x200c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x200c('0x9')][_0x200c('0xa')]({'port':0x232a});config[_0x200c('0xb')]=_[_0x200c('0xc')](config[_0x200c('0xb')],{'host':_0x200c('0xd'),'port':0x18eb});var socket=require(_0x200c('0xe'))(new Redis(config[_0x200c('0xb')]));require('./userProfile.socket')[_0x200c('0xf')](socket);function respondWithRpcPromise(_0x27eee8,_0x55147d,_0x133165){return new BPromise(function(_0x187471,_0x2d106b){return client[_0x200c('0x10')](_0x27eee8,_0x133165)[_0x200c('0x11')](function(_0x393cd2){logger['info']('UserProfile,\x20%s,\x20%s',_0x55147d,_0x200c('0x12'));logger[_0x200c('0x13')](_0x200c('0x14'),_0x55147d,_0x200c('0x12'),JSON[_0x200c('0x15')](_0x393cd2));if(_0x393cd2[_0x200c('0x16')]){if(_0x393cd2[_0x200c('0x16')][_0x200c('0x17')]===0x1f4){logger[_0x200c('0x16')](_0x200c('0x18'),_0x55147d,_0x393cd2['error'][_0x200c('0x19')]);return _0x2d106b(_0x393cd2[_0x200c('0x16')][_0x200c('0x19')]);}logger['error'](_0x200c('0x18'),_0x55147d,_0x393cd2[_0x200c('0x16')]['message']);return _0x187471(_0x393cd2['error']['message']);}else{logger['info'](_0x200c('0x18'),_0x55147d,_0x200c('0x12'));_0x187471(_0x393cd2[_0x200c('0x1a')][_0x200c('0x19')]);}})['catch'](function(_0x3babf0){logger[_0x200c('0x16')](_0x200c('0x18'),_0x55147d,_0x3babf0);_0x2d106b(_0x3babf0);});});}
\ No newline at end of file
+var _0x0171=['bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults','redis','socket.io-emitter','request','then','info','UserProfile,\x20%s,\x20%s','request\x20sent','debug','UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','util','moment'];(function(_0x211b35,_0xfdde10){var _0x1fa0fb=function(_0x143700){while(--_0x143700){_0x211b35['push'](_0x211b35['shift']());}};_0x1fa0fb(++_0xfdde10);}(_0x0171,0x9a));var _0x1017=function(_0x2601b4,_0xd585d9){_0x2601b4=_0x2601b4-0x0;var _0x1a92ce=_0x0171[_0x2601b4];return _0x1a92ce;};'use strict';var _=require('lodash');var util=require(_0x1017('0x0'));var moment=require(_0x1017('0x1'));var BPromise=require(_0x1017('0x2'));var rs=require(_0x1017('0x3'));var fs=require('fs');var Redis=require(_0x1017('0x4'));var db=require(_0x1017('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1017('0x6'))(_0x1017('0x7'));var config=require(_0x1017('0x8'));var jayson=require(_0x1017('0x9'));var client=jayson[_0x1017('0xa')]['http']({'port':0x232a});config['redis']=_[_0x1017('0xb')](config[_0x1017('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x1017('0xd'))(new Redis(config[_0x1017('0xc')]));require('./userProfile.socket')['register'](socket);function respondWithRpcPromise(_0x5d40f4,_0x4a3d63,_0x12b4b3){return new BPromise(function(_0x11a629,_0x3dc431){return client[_0x1017('0xe')](_0x5d40f4,_0x12b4b3)[_0x1017('0xf')](function(_0x22e328){logger[_0x1017('0x10')](_0x1017('0x11'),_0x4a3d63,_0x1017('0x12'));logger[_0x1017('0x13')](_0x1017('0x14'),_0x4a3d63,_0x1017('0x12'),JSON[_0x1017('0x15')](_0x22e328));if(_0x22e328[_0x1017('0x16')]){if(_0x22e328[_0x1017('0x16')][_0x1017('0x17')]===0x1f4){logger[_0x1017('0x16')]('UserProfile,\x20%s,\x20%s',_0x4a3d63,_0x22e328['error'][_0x1017('0x18')]);return _0x3dc431(_0x22e328[_0x1017('0x16')][_0x1017('0x18')]);}logger[_0x1017('0x16')](_0x1017('0x11'),_0x4a3d63,_0x22e328[_0x1017('0x16')][_0x1017('0x18')]);return _0x11a629(_0x22e328[_0x1017('0x16')]['message']);}else{logger[_0x1017('0x10')](_0x1017('0x11'),_0x4a3d63,'request\x20sent');_0x11a629(_0x22e328[_0x1017('0x19')][_0x1017('0x18')]);}})['catch'](function(_0x517563){logger[_0x1017('0x16')](_0x1017('0x11'),_0x4a3d63,_0x517563);_0x3dc431(_0x517563);});});}
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.socket.js b/server/api/userProfile/userProfile.socket.js
index 25b9a17..e86efe4 100644
--- a/server/api/userProfile/userProfile.socket.js
+++ b/server/api/userProfile/userProfile.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x615a=['remove','emit','removeListener','length','userProfile:','./userProfile.events'];(function(_0x3e8556,_0xc4576d){var _0x90b12=function(_0x46dc77){while(--_0x46dc77){_0x3e8556['push'](_0x3e8556['shift']());}};_0x90b12(++_0xc4576d);}(_0x615a,0x119));var _0xa615=function(_0x4e0403,_0x23bb0a){_0x4e0403=_0x4e0403-0x0;var _0xb4ab4f=_0x615a[_0x4e0403];return _0xb4ab4f;};'use strict';var UserProfileEvents=require(_0xa615('0x0'));var events=['save',_0xa615('0x1'),'update'];function createListener(_0x7e1c17,_0x33c100){return function(_0x30bb4f){_0x33c100[_0xa615('0x2')](_0x7e1c17,_0x30bb4f);};}function removeListener(_0x52ae35,_0x1d9a38){return function(){UserProfileEvents[_0xa615('0x3')](_0x52ae35,_0x1d9a38);};}exports['register']=function(_0x320680){for(var _0x5d04bd=0x0,_0x44afda=events[_0xa615('0x4')];_0x5d04bd<_0x44afda;_0x5d04bd++){var _0x2db48d=events[_0x5d04bd];var _0x1e714d=createListener(_0xa615('0x5')+_0x2db48d,_0x320680);UserProfileEvents['on'](_0x2db48d,_0x1e714d);}};
\ No newline at end of file
+var _0xf611=['emit','removeListener','length','userProfile:','save','remove','update'];(function(_0x14331f,_0x3f26ab){var _0x47dcca=function(_0x86f67d){while(--_0x86f67d){_0x14331f['push'](_0x14331f['shift']());}};_0x47dcca(++_0x3f26ab);}(_0xf611,0x7b));var _0x1f61=function(_0x330414,_0x4f3207){_0x330414=_0x330414-0x0;var _0x99dbff=_0xf611[_0x330414];return _0x99dbff;};'use strict';var UserProfileEvents=require('./userProfile.events');var events=[_0x1f61('0x0'),_0x1f61('0x1'),_0x1f61('0x2')];function createListener(_0x58da3e,_0x5e6707){return function(_0x5ede64){_0x5e6707[_0x1f61('0x3')](_0x58da3e,_0x5ede64);};}function removeListener(_0x4e0df1,_0xdc8d91){return function(){UserProfileEvents[_0x1f61('0x4')](_0x4e0df1,_0xdc8d91);};}exports['register']=function(_0x4faa5b){for(var _0x290165=0x0,_0x34a924=events[_0x1f61('0x5')];_0x290165<_0x34a924;_0x290165++){var _0x21e3f6=events[_0x290165];var _0x5b2e5b=createListener(_0x1f61('0x6')+_0x21e3f6,_0x4faa5b);UserProfileEvents['on'](_0x21e3f6,_0x5b2e5b);}};
\ No newline at end of file
diff --git a/server/api/userProfileResource/index.js b/server/api/userProfileResource/index.js
index 7212757..346c9e1 100644
--- a/server/api/userProfileResource/index.js
+++ b/server/api/userProfileResource/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x63ef=['/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','express','Router','../../config/environment','./userProfileResource.controller','isAuthenticated','index','/describe','describe','get'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x63ef,0x11a));var _0xf63e=function(_0x3e32a8,_0x255953){_0x3e32a8=_0x3e32a8-0x0;var _0x2997b0=_0x63ef[_0x3e32a8];return _0x2997b0;};'use strict';var multer=require(_0xf63e('0x0'));var util=require(_0xf63e('0x1'));var path=require(_0xf63e('0x2'));var timeout=require('connect-timeout');var express=require(_0xf63e('0x3'));var router=express[_0xf63e('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xf63e('0x5'));var controller=require(_0xf63e('0x6'));router['get']('/',auth[_0xf63e('0x7')](),controller[_0xf63e('0x8')]);router['get'](_0xf63e('0x9'),auth[_0xf63e('0x7')](),controller[_0xf63e('0xa')]);router[_0xf63e('0xb')](_0xf63e('0xc'),auth[_0xf63e('0x7')](),controller[_0xf63e('0xd')]);router[_0xf63e('0xe')]('/',auth[_0xf63e('0x7')](),controller[_0xf63e('0xf')]);router[_0xf63e('0x10')](_0xf63e('0xc'),auth[_0xf63e('0x7')](),controller[_0xf63e('0x11')]);router[_0xf63e('0x12')]('/:id',auth[_0xf63e('0x7')](),controller[_0xf63e('0x13')]);module[_0xf63e('0x14')]=router;
\ No newline at end of file
+var _0x414f=['../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfileResource.controller','get','isAuthenticated','describe','show','post','create','put','/:id','update','destroy','exports','multer','path','connect-timeout','Router'];(function(_0x5b6e2a,_0x3c2918){var _0x21fa56=function(_0x44a167){while(--_0x44a167){_0x5b6e2a['push'](_0x5b6e2a['shift']());}};_0x21fa56(++_0x3c2918);}(_0x414f,0x13f));var _0xf414=function(_0x31f6d2,_0x49129c){_0x31f6d2=_0x31f6d2-0x0;var _0xd9d2ba=_0x414f[_0x31f6d2];return _0xd9d2ba;};'use strict';var multer=require(_0xf414('0x0'));var util=require('util');var path=require(_0xf414('0x1'));var timeout=require(_0xf414('0x2'));var express=require('express');var router=express[_0xf414('0x3')]();var auth=require(_0xf414('0x4'));var interaction=require(_0xf414('0x5'));var config=require(_0xf414('0x6'));var controller=require(_0xf414('0x7'));router[_0xf414('0x8')]('/',auth[_0xf414('0x9')](),controller['index']);router[_0xf414('0x8')]('/describe',auth[_0xf414('0x9')](),controller[_0xf414('0xa')]);router[_0xf414('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xf414('0xb')]);router[_0xf414('0xc')]('/',auth[_0xf414('0x9')](),controller[_0xf414('0xd')]);router[_0xf414('0xe')](_0xf414('0xf'),auth[_0xf414('0x9')](),controller[_0xf414('0x10')]);router['delete']('/:id',auth[_0xf414('0x9')](),controller[_0xf414('0x11')]);module[_0xf414('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.attributes.js b/server/api/userProfileResource/userProfileResource.attributes.js
index abd84b2..1b71516 100644
--- a/server/api/userProfileResource/userProfileResource.attributes.js
+++ b/server/api/userProfileResource/userProfileResource.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x74a2=['STRING','INTEGER','sequelize','exports'];(function(_0x42c778,_0xbef382){var _0x5571e1=function(_0xc50da2){while(--_0xc50da2){_0x42c778['push'](_0x42c778['shift']());}};_0x5571e1(++_0xbef382);}(_0x74a2,0x1c6));var _0x274a=function(_0x53c256,_0x382a24){_0x53c256=_0x53c256-0x0;var _0x25feb6=_0x74a2[_0x53c256];return _0x25feb6;};'use strict';var Sequelize=require(_0x274a('0x0'));module[_0x274a('0x1')]={'name':{'type':Sequelize[_0x274a('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x274a('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x274a('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xe3f9=['exports','STRING','INTEGER','sequelize'];(function(_0x417c48,_0x13e15b){var _0x4a7d3f=function(_0x9dba09){while(--_0x9dba09){_0x417c48['push'](_0x417c48['shift']());}};_0x4a7d3f(++_0x13e15b);}(_0xe3f9,0x137));var _0x9e3f=function(_0x41397b,_0x481d0e){_0x41397b=_0x41397b-0x0;var _0x5f4677=_0xe3f9[_0x41397b];return _0x5f4677;};'use strict';var Sequelize=require(_0x9e3f('0x0'));module[_0x9e3f('0x1')]={'name':{'type':Sequelize[_0x9e3f('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x9e3f('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x9e3f('0x2')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.controller.js b/server/api/userProfileResource/userProfileResource.controller.js
index 0a07eb7..1c696c4 100644
--- a/server/api/userProfileResource/userProfileResource.controller.js
+++ b/server/api/userProfileResource/userProfileResource.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf3cd=['error','stack','name','send','index','UserProfileResource','keys','query','intersection','model','fields','attributes','length','nolimit','limit','sort','filters','where','merge','map','key','field','filter','options','include','findAll','rows','catch','show','params','includeAll','find','body','update','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','set','Content-Range','json','apply','reject','save','destroy','then'];(function(_0x2b0294,_0x1ec42a){var _0x5db64e=function(_0x2e35bd){while(--_0x2e35bd){_0x2b0294['push'](_0x2b0294['shift']());}};_0x5db64e(++_0x1ec42a);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0xf3cd[_0x373dee];return _0x46798f;};'use strict';var pdf=require(_0xdf3c('0x0'));var emlformat=require(_0xdf3c('0x1'));var rimraf=require(_0xdf3c('0x2'));var zipdir=require(_0xdf3c('0x3'));var jsonpatch=require(_0xdf3c('0x4'));var rp=require(_0xdf3c('0x5'));var moment=require('moment');var BPromise=require(_0xdf3c('0x6'));var Mustache=require(_0xdf3c('0x7'));var util=require(_0xdf3c('0x8'));var path=require('path');var sox=require(_0xdf3c('0x9'));var csv=require(_0xdf3c('0xa'));var ejs=require(_0xdf3c('0xb'));var fs=require('fs');var _=require(_0xdf3c('0xc'));var squel=require(_0xdf3c('0xd'));var crypto=require(_0xdf3c('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xdf3c('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xdf3c('0x10'));var Redis=require(_0xdf3c('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xdf3c('0x12'));var hardwareService=require(_0xdf3c('0x13'));var logger=require(_0xdf3c('0x14'))(_0xdf3c('0x15'));var utils=require(_0xdf3c('0x16'));var config=require(_0xdf3c('0x17'));var db=require(_0xdf3c('0x18'))['db'];function respondWithStatusCode(_0x32d2db,_0x5e8925){_0x5e8925=_0x5e8925||0xcc;return function(_0x1d483c){if(_0x1d483c){return _0x32d2db[_0xdf3c('0x19')](_0x5e8925);}return _0x32d2db[_0xdf3c('0x1a')](_0x5e8925)[_0xdf3c('0x1b')]();};}function respondWithResult(_0x59e431,_0x2ae4ad){_0x2ae4ad=_0x2ae4ad||0xc8;return function(_0x461079){if(_0x461079){return _0x59e431[_0xdf3c('0x1a')](_0x2ae4ad)['json'](_0x461079);}};}function respondWithFilteredResult(_0x18aafa,_0x38b01d){return function(_0x173041){if(_0x173041){var _0x4274fd=_0x173041[_0xdf3c('0x1c')],_0x21e587=_0x38b01d[_0xdf3c('0x1d')],_0x1a7a5a=_0x38b01d[_0xdf3c('0x1d')]+_0x38b01d['limit'],_0x305ea5;if(_0x1a7a5a>=_0x4274fd){_0x1a7a5a=_0x4274fd;_0x305ea5=0xc8;}else{_0x305ea5=0xce;}_0x18aafa[_0xdf3c('0x1a')](_0x305ea5);return _0x18aafa[_0xdf3c('0x1e')](_0xdf3c('0x1f'),_0x21e587+'-'+_0x1a7a5a+'/'+_0x4274fd)[_0xdf3c('0x20')](_0x173041);}return null;};}function patchUpdates(_0x1e2690){return function(_0x113b56){try{jsonpatch[_0xdf3c('0x21')](_0x113b56,_0x1e2690,!![]);}catch(_0x3ee0af){return BPromise[_0xdf3c('0x22')](_0x3ee0af);}return _0x113b56[_0xdf3c('0x23')]();};}function saveUpdates(_0x267488,_0x3d14cc){return function(_0x25487c){if(_0x25487c){return _0x25487c['update'](_0x267488)['then'](function(_0x3aa254){return _0x3aa254;});}return null;};}function removeEntity(_0x583ce4,_0x15776c){return function(_0x40e7ec){if(_0x40e7ec){return _0x40e7ec[_0xdf3c('0x24')]()[_0xdf3c('0x25')](function(){_0x583ce4[_0xdf3c('0x1a')](0xcc)[_0xdf3c('0x1b')]();});}};}function handleEntityNotFound(_0x50d8ca,_0x22a164){return function(_0x213d75){if(!_0x213d75){_0x50d8ca[_0xdf3c('0x19')](0x194);}return _0x213d75;};}function handleError(_0x24754a,_0x40032a){_0x40032a=_0x40032a||0x1f4;return function(_0x3b5371){logger[_0xdf3c('0x26')](_0x3b5371[_0xdf3c('0x27')]);if(_0x3b5371[_0xdf3c('0x28')]){delete _0x3b5371[_0xdf3c('0x28')];}_0x24754a['status'](_0x40032a)[_0xdf3c('0x29')](_0x3b5371);};}exports[_0xdf3c('0x2a')]=function(_0x4b57a4,_0xdc8962){var _0x59659e={},_0x4eaced={},_0x508be9={'count':0x0,'rows':[]};var _0x14aac9=db[_0xdf3c('0x2b')]['rawAttributes'];_0x4eaced['model']=_[_0xdf3c('0x2c')](_0x14aac9);_0x4eaced[_0xdf3c('0x2d')]=_[_0xdf3c('0x2c')](_0x4b57a4[_0xdf3c('0x2d')]);_0x4eaced['filters']=_[_0xdf3c('0x2e')](_0x4eaced[_0xdf3c('0x2f')],_0x4eaced['query']);_0x59659e['attributes']=_[_0xdf3c('0x2e')](_0x4eaced[_0xdf3c('0x2f')],qs[_0xdf3c('0x30')](_0x4b57a4['query'][_0xdf3c('0x30')]));_0x59659e[_0xdf3c('0x31')]=_0x59659e[_0xdf3c('0x31')][_0xdf3c('0x32')]?_0x59659e['attributes']:_0x4eaced[_0xdf3c('0x2f')];if(!_0x4b57a4[_0xdf3c('0x2d')]['hasOwnProperty'](_0xdf3c('0x33'))){_0x59659e[_0xdf3c('0x34')]=qs[_0xdf3c('0x34')](_0x4b57a4[_0xdf3c('0x2d')]['limit']);_0x59659e[_0xdf3c('0x1d')]=qs[_0xdf3c('0x1d')](_0x4b57a4[_0xdf3c('0x2d')][_0xdf3c('0x1d')]);}_0x59659e['order']=qs[_0xdf3c('0x35')](_0x4b57a4[_0xdf3c('0x2d')]['sort']);_0x59659e['where']=qs[_0xdf3c('0x36')](_['pick'](_0x4b57a4[_0xdf3c('0x2d')],_0x4eaced['filters']));if(_0x4b57a4['query']['filter']){_0x59659e[_0xdf3c('0x37')]=_[_0xdf3c('0x38')](_0x59659e[_0xdf3c('0x37')],{'$or':_[_0xdf3c('0x39')](_0x14aac9,function(_0x54c25f){if(_0x54c25f['type'][_0xdf3c('0x3a')]!=='VIRTUAL'){var _0x46e40f={};_0x46e40f[_0x54c25f[_0xdf3c('0x3b')]]={'$like':'%'+_0x4b57a4[_0xdf3c('0x2d')][_0xdf3c('0x3c')]+'%'};return _0x46e40f;}})});}_0x59659e=_[_0xdf3c('0x38')]({},_0x59659e,_0x4b57a4[_0xdf3c('0x3d')]);var _0x1c7335={'where':_0x59659e[_0xdf3c('0x37')]};return db[_0xdf3c('0x2b')]['count'](_0x1c7335)[_0xdf3c('0x25')](function(_0x54e689){_0x508be9['count']=_0x54e689;if(_0x4b57a4[_0xdf3c('0x2d')]['includeAll']){_0x59659e[_0xdf3c('0x3e')]=[{'all':!![]}];}return db['UserProfileResource'][_0xdf3c('0x3f')](_0x59659e);})[_0xdf3c('0x25')](function(_0x1c6dee){_0x508be9[_0xdf3c('0x40')]=_0x1c6dee;return _0x508be9;})[_0xdf3c('0x25')](respondWithFilteredResult(_0xdc8962,_0x59659e))[_0xdf3c('0x41')](handleError(_0xdc8962,null));};exports[_0xdf3c('0x42')]=function(_0x3d47fb,_0x3cf131){var _0xa65478={'raw':![],'where':{'id':_0x3d47fb[_0xdf3c('0x43')]['id']}},_0x424acf={};_0x424acf['model']=_['keys'](db[_0xdf3c('0x2b')]['rawAttributes']);_0x424acf[_0xdf3c('0x2d')]=_[_0xdf3c('0x2c')](_0x3d47fb[_0xdf3c('0x2d')]);_0x424acf[_0xdf3c('0x36')]=_['intersection'](_0x424acf['model'],_0x424acf[_0xdf3c('0x2d')]);_0xa65478[_0xdf3c('0x31')]=_[_0xdf3c('0x2e')](_0x424acf['model'],qs[_0xdf3c('0x30')](_0x3d47fb[_0xdf3c('0x2d')][_0xdf3c('0x30')]));_0xa65478[_0xdf3c('0x31')]=_0xa65478['attributes'][_0xdf3c('0x32')]?_0xa65478[_0xdf3c('0x31')]:_0x424acf[_0xdf3c('0x2f')];if(_0x3d47fb[_0xdf3c('0x2d')][_0xdf3c('0x44')]){_0xa65478['include']=[{'all':!![]}];}_0xa65478=_[_0xdf3c('0x38')]({},_0xa65478,_0x3d47fb[_0xdf3c('0x3d')]);return db[_0xdf3c('0x2b')][_0xdf3c('0x45')](_0xa65478)[_0xdf3c('0x25')](handleEntityNotFound(_0x3cf131,null))[_0xdf3c('0x25')](respondWithResult(_0x3cf131,null))['catch'](handleError(_0x3cf131,null));};exports['create']=function(_0x2c6c6d,_0x2be86d){return db['UserProfileResource']['create'](_0x2c6c6d[_0xdf3c('0x46')],{})[_0xdf3c('0x25')](respondWithResult(_0x2be86d,0xc9))[_0xdf3c('0x41')](handleError(_0x2be86d,null));};exports[_0xdf3c('0x47')]=function(_0xaae4bc,_0x2dbf54){if(_0xaae4bc[_0xdf3c('0x46')]['id']){delete _0xaae4bc[_0xdf3c('0x46')]['id'];}return db[_0xdf3c('0x2b')]['find']({'where':{'id':_0xaae4bc[_0xdf3c('0x43')]['id']}})[_0xdf3c('0x25')](handleEntityNotFound(_0x2dbf54,null))[_0xdf3c('0x25')](saveUpdates(_0xaae4bc[_0xdf3c('0x46')],null))[_0xdf3c('0x25')](respondWithResult(_0x2dbf54,null))[_0xdf3c('0x41')](handleError(_0x2dbf54,null));};exports[_0xdf3c('0x24')]=function(_0x553f70,_0x1751a8){return db['UserProfileResource'][_0xdf3c('0x45')]({'where':{'id':_0x553f70['params']['id']}})[_0xdf3c('0x25')](handleEntityNotFound(_0x1751a8,null))[_0xdf3c('0x25')](removeEntity(_0x1751a8,null))[_0xdf3c('0x41')](handleError(_0x1751a8,null));};exports[_0xdf3c('0x48')]=function(_0x5eef94,_0x55da0f){return db['UserProfileResource'][_0xdf3c('0x48')]()['then'](respondWithResult(_0x55da0f,null))[_0xdf3c('0x41')](handleError(_0x55da0f,null));};
\ No newline at end of file
+var _0x008c=['fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','desk.js','papaparse','ioredis','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','apply','destroy','then','end','error','send','index','UserProfileResource','rawAttributes','model','query','keys','filters','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','filter','merge','type','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','intersection','options','create','body','find','describe','html-pdf','eml-format','rimraf','zip-dir'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x008c,0x188));var _0xc008=function(_0x4d9403,_0x33c5f0){_0x4d9403=_0x4d9403-0x0;var _0x5eef11=_0x008c[_0x4d9403];return _0x5eef11;};'use strict';var pdf=require(_0xc008('0x0'));var emlformat=require(_0xc008('0x1'));var rimraf=require(_0xc008('0x2'));var zipdir=require(_0xc008('0x3'));var jsonpatch=require(_0xc008('0x4'));var rp=require('request-promise');var moment=require(_0xc008('0x5'));var BPromise=require(_0xc008('0x6'));var Mustache=require(_0xc008('0x7'));var util=require(_0xc008('0x8'));var path=require(_0xc008('0x9'));var sox=require(_0xc008('0xa'));var csv=require(_0xc008('0xb'));var ejs=require(_0xc008('0xc'));var fs=require('fs');var _=require(_0xc008('0xd'));var squel=require('squel');var crypto=require(_0xc008('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xc008('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xc008('0x10'));var Redis=require(_0xc008('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require('../../config/license/hardware');var logger=require(_0xc008('0x12'))(_0xc008('0x13'));var utils=require('../../config/utils');var config=require(_0xc008('0x14'));var db=require(_0xc008('0x15'))['db'];function respondWithStatusCode(_0x2ea200,_0x2a5b4e){_0x2a5b4e=_0x2a5b4e||0xcc;return function(_0x9ffa93){if(_0x9ffa93){return _0x2ea200[_0xc008('0x16')](_0x2a5b4e);}return _0x2ea200[_0xc008('0x17')](_0x2a5b4e)['end']();};}function respondWithResult(_0x560e28,_0x33f44c){_0x33f44c=_0x33f44c||0xc8;return function(_0x50c1ab){if(_0x50c1ab){return _0x560e28[_0xc008('0x17')](_0x33f44c)[_0xc008('0x18')](_0x50c1ab);}};}function respondWithFilteredResult(_0x2073ef,_0x339ffc){return function(_0x3f0ecf){if(_0x3f0ecf){var _0x5ee00b=_0x3f0ecf[_0xc008('0x19')],_0x5e894e=_0x339ffc[_0xc008('0x1a')],_0x4bd0f4=_0x339ffc[_0xc008('0x1a')]+_0x339ffc['limit'],_0x11ef38;if(_0x4bd0f4>=_0x5ee00b){_0x4bd0f4=_0x5ee00b;_0x11ef38=0xc8;}else{_0x11ef38=0xce;}_0x2073ef['status'](_0x11ef38);return _0x2073ef['set']('Content-Range',_0x5e894e+'-'+_0x4bd0f4+'/'+_0x5ee00b)[_0xc008('0x18')](_0x3f0ecf);}return null;};}function patchUpdates(_0x462af5){return function(_0x501137){try{jsonpatch[_0xc008('0x1b')](_0x501137,_0x462af5,!![]);}catch(_0x5906e6){return BPromise['reject'](_0x5906e6);}return _0x501137['save']();};}function saveUpdates(_0x50261c,_0x5754a0){return function(_0x4b9726){if(_0x4b9726){return _0x4b9726['update'](_0x50261c)['then'](function(_0x4a582d){return _0x4a582d;});}return null;};}function removeEntity(_0x5a58bd,_0x13a263){return function(_0x4777a6){if(_0x4777a6){return _0x4777a6[_0xc008('0x1c')]()[_0xc008('0x1d')](function(){_0x5a58bd[_0xc008('0x17')](0xcc)[_0xc008('0x1e')]();});}};}function handleEntityNotFound(_0x4f43e2,_0x459fd9){return function(_0x5c85f2){if(!_0x5c85f2){_0x4f43e2['sendStatus'](0x194);}return _0x5c85f2;};}function handleError(_0x218599,_0x36f358){_0x36f358=_0x36f358||0x1f4;return function(_0x2e3cfb){logger[_0xc008('0x1f')](_0x2e3cfb['stack']);if(_0x2e3cfb['name']){delete _0x2e3cfb['name'];}_0x218599[_0xc008('0x17')](_0x36f358)[_0xc008('0x20')](_0x2e3cfb);};}exports[_0xc008('0x21')]=function(_0x2e31c2,_0x5bebd9){var _0x5e2aca={},_0x4fce9c={},_0x4adbab={'count':0x0,'rows':[]};var _0x4caaf4=db[_0xc008('0x22')][_0xc008('0x23')];_0x4fce9c[_0xc008('0x24')]=_['keys'](_0x4caaf4);_0x4fce9c[_0xc008('0x25')]=_[_0xc008('0x26')](_0x2e31c2[_0xc008('0x25')]);_0x4fce9c[_0xc008('0x27')]=_['intersection'](_0x4fce9c[_0xc008('0x24')],_0x4fce9c[_0xc008('0x25')]);_0x5e2aca['attributes']=_['intersection'](_0x4fce9c['model'],qs[_0xc008('0x28')](_0x2e31c2[_0xc008('0x25')][_0xc008('0x28')]));_0x5e2aca[_0xc008('0x29')]=_0x5e2aca[_0xc008('0x29')][_0xc008('0x2a')]?_0x5e2aca[_0xc008('0x29')]:_0x4fce9c[_0xc008('0x24')];if(!_0x2e31c2[_0xc008('0x25')][_0xc008('0x2b')](_0xc008('0x2c'))){_0x5e2aca[_0xc008('0x2d')]=qs['limit'](_0x2e31c2[_0xc008('0x25')][_0xc008('0x2d')]);_0x5e2aca['offset']=qs[_0xc008('0x1a')](_0x2e31c2[_0xc008('0x25')][_0xc008('0x1a')]);}_0x5e2aca[_0xc008('0x2e')]=qs[_0xc008('0x2f')](_0x2e31c2[_0xc008('0x25')][_0xc008('0x2f')]);_0x5e2aca[_0xc008('0x30')]=qs[_0xc008('0x27')](_['pick'](_0x2e31c2[_0xc008('0x25')],_0x4fce9c[_0xc008('0x27')]));if(_0x2e31c2[_0xc008('0x25')][_0xc008('0x31')]){_0x5e2aca[_0xc008('0x30')]=_[_0xc008('0x32')](_0x5e2aca[_0xc008('0x30')],{'$or':_['map'](_0x4caaf4,function(_0x35f360){if(_0x35f360[_0xc008('0x33')]['key']!==_0xc008('0x34')){var _0x15453c={};_0x15453c[_0x35f360['field']]={'$like':'%'+_0x2e31c2[_0xc008('0x25')][_0xc008('0x31')]+'%'};return _0x15453c;}})});}_0x5e2aca=_[_0xc008('0x32')]({},_0x5e2aca,_0x2e31c2['options']);var _0x53b353={'where':_0x5e2aca['where']};return db[_0xc008('0x22')]['count'](_0x53b353)[_0xc008('0x1d')](function(_0x3884dd){_0x4adbab[_0xc008('0x19')]=_0x3884dd;if(_0x2e31c2[_0xc008('0x25')][_0xc008('0x35')]){_0x5e2aca[_0xc008('0x36')]=[{'all':!![]}];}return db[_0xc008('0x22')][_0xc008('0x37')](_0x5e2aca);})[_0xc008('0x1d')](function(_0x387dfd){_0x4adbab[_0xc008('0x38')]=_0x387dfd;return _0x4adbab;})[_0xc008('0x1d')](respondWithFilteredResult(_0x5bebd9,_0x5e2aca))[_0xc008('0x39')](handleError(_0x5bebd9,null));};exports[_0xc008('0x3a')]=function(_0x4cace5,_0x3238b4){var _0x23c4db={'raw':![],'where':{'id':_0x4cace5[_0xc008('0x3b')]['id']}},_0x30b7df={};_0x30b7df['model']=_[_0xc008('0x26')](db[_0xc008('0x22')][_0xc008('0x23')]);_0x30b7df[_0xc008('0x25')]=_[_0xc008('0x26')](_0x4cace5['query']);_0x30b7df[_0xc008('0x27')]=_[_0xc008('0x3c')](_0x30b7df[_0xc008('0x24')],_0x30b7df[_0xc008('0x25')]);_0x23c4db[_0xc008('0x29')]=_['intersection'](_0x30b7df[_0xc008('0x24')],qs[_0xc008('0x28')](_0x4cace5[_0xc008('0x25')][_0xc008('0x28')]));_0x23c4db['attributes']=_0x23c4db[_0xc008('0x29')][_0xc008('0x2a')]?_0x23c4db[_0xc008('0x29')]:_0x30b7df['model'];if(_0x4cace5[_0xc008('0x25')]['includeAll']){_0x23c4db[_0xc008('0x36')]=[{'all':!![]}];}_0x23c4db=_['merge']({},_0x23c4db,_0x4cace5[_0xc008('0x3d')]);return db[_0xc008('0x22')]['find'](_0x23c4db)[_0xc008('0x1d')](handleEntityNotFound(_0x3238b4,null))[_0xc008('0x1d')](respondWithResult(_0x3238b4,null))[_0xc008('0x39')](handleError(_0x3238b4,null));};exports['create']=function(_0x1cec64,_0x2a9b5c){return db[_0xc008('0x22')][_0xc008('0x3e')](_0x1cec64[_0xc008('0x3f')],{})[_0xc008('0x1d')](respondWithResult(_0x2a9b5c,0xc9))['catch'](handleError(_0x2a9b5c,null));};exports['update']=function(_0x5283a8,_0x4552ed){if(_0x5283a8[_0xc008('0x3f')]['id']){delete _0x5283a8[_0xc008('0x3f')]['id'];}return db[_0xc008('0x22')][_0xc008('0x40')]({'where':{'id':_0x5283a8[_0xc008('0x3b')]['id']}})[_0xc008('0x1d')](handleEntityNotFound(_0x4552ed,null))[_0xc008('0x1d')](saveUpdates(_0x5283a8['body'],null))['then'](respondWithResult(_0x4552ed,null))['catch'](handleError(_0x4552ed,null));};exports[_0xc008('0x1c')]=function(_0x2651cf,_0x158eae){return db['UserProfileResource'][_0xc008('0x40')]({'where':{'id':_0x2651cf[_0xc008('0x3b')]['id']}})[_0xc008('0x1d')](handleEntityNotFound(_0x158eae,null))[_0xc008('0x1d')](removeEntity(_0x158eae,null))[_0xc008('0x39')](handleError(_0x158eae,null));};exports[_0xc008('0x41')]=function(_0x17ec90,_0x405e87){return db[_0xc008('0x22')][_0xc008('0x41')]()['then'](respondWithResult(_0x405e87,null))['catch'](handleError(_0x405e87,null));};
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.model.js b/server/api/userProfileResource/userProfileResource.model.js
index 7b40a70..241ac3b 100644
--- a/server/api/userProfileResource/userProfileResource.model.js
+++ b/server/api/userProfileResource/userProfileResource.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4c67=['define','UserProfileResource','user_profile_has_resources','compositeIndex','sectionId','lodash','util','moment','request-promise','rimraf','../../config/environment','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4c67,0x191));var _0x74c6=function(_0x426e77,_0x222a99){_0x426e77=_0x426e77-0x0;var _0x2d116e=_0x4c67[_0x426e77];return _0x2d116e;};'use strict';var _=require(_0x74c6('0x0'));var util=require(_0x74c6('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x74c6('0x2'));var BPromise=require('bluebird');var rp=require(_0x74c6('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x74c6('0x4'));var config=require(_0x74c6('0x5'));var attributes=require('./userProfileResource.attributes');module[_0x74c6('0x6')]=function(_0x323bb0,_0x16560a){return _0x323bb0[_0x74c6('0x7')](_0x74c6('0x8'),attributes,{'tableName':_0x74c6('0x9'),'paranoid':![],'indexes':[{'name':_0x74c6('0xa'),'fields':['resourceId',_0x74c6('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xc7ec=['bluebird','path','rimraf','../../config/environment','./userProfileResource.attributes','exports','define','UserProfileResource','user_profile_has_resources','resourceId','lodash','util','../../config/logger','api'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0xc7ec,0x122));var _0xcc7e=function(_0x3d27ba,_0x2671a3){_0x3d27ba=_0x3d27ba-0x0;var _0xf01885=_0xc7ec[_0x3d27ba];return _0xf01885;};'use strict';var _=require(_0xcc7e('0x0'));var util=require(_0xcc7e('0x1'));var logger=require(_0xcc7e('0x2'))(_0xcc7e('0x3'));var moment=require('moment');var BPromise=require(_0xcc7e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcc7e('0x5'));var rimraf=require(_0xcc7e('0x6'));var config=require(_0xcc7e('0x7'));var attributes=require(_0xcc7e('0x8'));module[_0xcc7e('0x9')]=function(_0x2cca1c,_0x156c66){return _0x2cca1c[_0xcc7e('0xa')](_0xcc7e('0xb'),attributes,{'tableName':_0xcc7e('0xc'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':[_0xcc7e('0xd'),'sectionId']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.rpc.js b/server/api/userProfileResource/userProfileResource.rpc.js
index f8342dd..c828db4 100644
--- a/server/api/userProfileResource/userProfileResource.rpc.js
+++ b/server/api/userProfileResource/userProfileResource.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xffd6=['ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0xffd6,0x97));var _0x6ffd=function(_0xf71120,_0x25b7f9){_0xf71120=_0xf71120-0x0;var _0xbe2fd3=_0xffd6[_0xf71120];return _0xbe2fd3;};'use strict';var _=require(_0x6ffd('0x0'));var util=require(_0x6ffd('0x1'));var moment=require(_0x6ffd('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6ffd('0x3'));var db=require(_0x6ffd('0x4'))['db'];var utils=require(_0x6ffd('0x5'));var logger=require('../../config/logger')(_0x6ffd('0x6'));var config=require(_0x6ffd('0x7'));var jayson=require(_0x6ffd('0x8'));var client=jayson[_0x6ffd('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x122b71,_0xeefe34,_0x2445a0){return new BPromise(function(_0x1fbbe6,_0x1d8b50){return client['request'](_0x122b71,_0x2445a0)[_0x6ffd('0xa')](function(_0x417f34){logger['info'](_0x6ffd('0xb'),_0xeefe34,_0x6ffd('0xc'));logger[_0x6ffd('0xd')](_0x6ffd('0xe'),_0xeefe34,_0x6ffd('0xc'),JSON[_0x6ffd('0xf')](_0x417f34));if(_0x417f34[_0x6ffd('0x10')]){if(_0x417f34['error'][_0x6ffd('0x11')]===0x1f4){logger[_0x6ffd('0x10')]('UserProfileResource,\x20%s,\x20%s',_0xeefe34,_0x417f34[_0x6ffd('0x10')][_0x6ffd('0x12')]);return _0x1d8b50(_0x417f34[_0x6ffd('0x10')][_0x6ffd('0x12')]);}logger['error'](_0x6ffd('0xb'),_0xeefe34,_0x417f34['error'][_0x6ffd('0x12')]);return _0x1fbbe6(_0x417f34['error'][_0x6ffd('0x12')]);}else{logger[_0x6ffd('0x13')](_0x6ffd('0xb'),_0xeefe34,'request\x20sent');_0x1fbbe6(_0x417f34[_0x6ffd('0x14')][_0x6ffd('0x12')]);}})[_0x6ffd('0x15')](function(_0x3394b2){logger[_0x6ffd('0x10')](_0x6ffd('0xb'),_0xeefe34,_0x3394b2);_0x1d8b50(_0x3394b2);});});}
\ No newline at end of file
+var _0x8ca9=['info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','http','request','then'];(function(_0x4c9aa8,_0x415617){var _0x5163d3=function(_0x447021){while(--_0x447021){_0x4c9aa8['push'](_0x4c9aa8['shift']());}};_0x5163d3(++_0x415617);}(_0x8ca9,0x9c));var _0x98ca=function(_0x3d7d62,_0x110895){_0x3d7d62=_0x3d7d62-0x0;var _0x50c07c=_0x8ca9[_0x3d7d62];return _0x50c07c;};'use strict';var _=require(_0x98ca('0x0'));var util=require(_0x98ca('0x1'));var moment=require(_0x98ca('0x2'));var BPromise=require(_0x98ca('0x3'));var rs=require(_0x98ca('0x4'));var fs=require('fs');var Redis=require(_0x98ca('0x5'));var db=require(_0x98ca('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x98ca('0x7'));var config=require('../../config/environment');var jayson=require(_0x98ca('0x8'));var client=jayson['client'][_0x98ca('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xca4097,_0x18c349,_0x2852a0){return new BPromise(function(_0x323c95,_0x28a37a){return client[_0x98ca('0xa')](_0xca4097,_0x2852a0)[_0x98ca('0xb')](function(_0x277c29){logger[_0x98ca('0xc')](_0x98ca('0xd'),_0x18c349,_0x98ca('0xe'));logger[_0x98ca('0xf')](_0x98ca('0x10'),_0x18c349,_0x98ca('0xe'),JSON[_0x98ca('0x11')](_0x277c29));if(_0x277c29[_0x98ca('0x12')]){if(_0x277c29[_0x98ca('0x12')]['code']===0x1f4){logger[_0x98ca('0x12')](_0x98ca('0xd'),_0x18c349,_0x277c29[_0x98ca('0x12')][_0x98ca('0x13')]);return _0x28a37a(_0x277c29['error'][_0x98ca('0x13')]);}logger[_0x98ca('0x12')](_0x98ca('0xd'),_0x18c349,_0x277c29[_0x98ca('0x12')][_0x98ca('0x13')]);return _0x323c95(_0x277c29[_0x98ca('0x12')][_0x98ca('0x13')]);}else{logger['info'](_0x98ca('0xd'),_0x18c349,_0x98ca('0xe'));_0x323c95(_0x277c29[_0x98ca('0x14')][_0x98ca('0x13')]);}})['catch'](function(_0x238c1a){logger[_0x98ca('0x12')](_0x98ca('0xd'),_0x18c349,_0x238c1a);_0x28a37a(_0x238c1a);});});}
\ No newline at end of file
diff --git a/server/api/userProfileSection/index.js b/server/api/userProfileSection/index.js
index 265a03b..145233f 100644
--- a/server/api/userProfileSection/index.js
+++ b/server/api/userProfileSection/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa75e=['show','post','put','update','delete','destroy','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x334c6a,_0x18a185){var _0x3d43f7=function(_0x223fa2){while(--_0x223fa2){_0x334c6a['push'](_0x334c6a['shift']());}};_0x3d43f7(++_0x18a185);}(_0xa75e,0x8b));var _0xea75=function(_0x2c1826,_0x4b3db9){_0x2c1826=_0x2c1826-0x0;var _0x197bf1=_0xa75e[_0x2c1826];return _0x197bf1;};'use strict';var multer=require(_0xea75('0x0'));var util=require('util');var path=require(_0xea75('0x1'));var timeout=require(_0xea75('0x2'));var express=require(_0xea75('0x3'));var router=express['Router']();var auth=require(_0xea75('0x4'));var interaction=require(_0xea75('0x5'));var config=require(_0xea75('0x6'));var controller=require('./userProfileSection.controller');router[_0xea75('0x7')]('/',auth[_0xea75('0x8')](),controller[_0xea75('0x9')]);router[_0xea75('0x7')](_0xea75('0xa'),auth[_0xea75('0x8')](),controller[_0xea75('0xb')]);router['get'](_0xea75('0xc'),auth[_0xea75('0x8')](),controller[_0xea75('0xd')]);router[_0xea75('0xe')]('/',auth[_0xea75('0x8')](),controller['create']);router[_0xea75('0xf')](_0xea75('0xc'),auth[_0xea75('0x8')](),controller[_0xea75('0x10')]);router[_0xea75('0x11')]('/:id',auth[_0xea75('0x8')](),controller[_0xea75('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x9278=['/describe','isAuthenticated','describe','show','post','create','put','/:id','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index'];(function(_0x2c5784,_0x151f1e){var _0x5399c6=function(_0x58ea33){while(--_0x58ea33){_0x2c5784['push'](_0x2c5784['shift']());}};_0x5399c6(++_0x151f1e);}(_0x9278,0x79));var _0x8927=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x9278[_0x2be8c2];return _0x97f531;};'use strict';var multer=require(_0x8927('0x0'));var util=require(_0x8927('0x1'));var path=require(_0x8927('0x2'));var timeout=require(_0x8927('0x3'));var express=require(_0x8927('0x4'));var router=express[_0x8927('0x5')]();var auth=require(_0x8927('0x6'));var interaction=require(_0x8927('0x7'));var config=require(_0x8927('0x8'));var controller=require('./userProfileSection.controller');router[_0x8927('0x9')]('/',auth['isAuthenticated'](),controller[_0x8927('0xa')]);router[_0x8927('0x9')](_0x8927('0xb'),auth[_0x8927('0xc')](),controller[_0x8927('0xd')]);router[_0x8927('0x9')]('/:id',auth[_0x8927('0xc')](),controller[_0x8927('0xe')]);router[_0x8927('0xf')]('/',auth[_0x8927('0xc')](),controller[_0x8927('0x10')]);router[_0x8927('0x11')](_0x8927('0x12'),auth[_0x8927('0xc')](),controller[_0x8927('0x13')]);router[_0x8927('0x14')](_0x8927('0x12'),auth['isAuthenticated'](),controller[_0x8927('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.attributes.js b/server/api/userProfileSection/userProfileSection.attributes.js
index 336099a..4c5fa85 100644
--- a/server/api/userProfileSection/userProfileSection.attributes.js
+++ b/server/api/userProfileSection/userProfileSection.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e0=['split','sequelize','exports','STRING','BOOLEAN','crudPermissions','getDataValue'];(function(_0x541152,_0x4c4d20){var _0x188bd3=function(_0xa8d128){while(--_0xa8d128){_0x541152['push'](_0x541152['shift']());}};_0x188bd3(++_0x4c4d20);}(_0x70e0,0x17b));var _0x070e=function(_0x40c2f4,_0x53b288){_0x40c2f4=_0x40c2f4-0x0;var _0x2bfd69=_0x70e0[_0x40c2f4];return _0x2bfd69;};'use strict';var Sequelize=require(_0x070e('0x0'));module[_0x070e('0x1')]={'name':{'type':Sequelize[_0x070e('0x2')],'allowNull':![]},'category':{'type':Sequelize['STRING'],'allowNull':![]},'sectionId':{'type':Sequelize['INTEGER'],'allowNull':![]},'enabled':{'type':Sequelize[_0x070e('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x070e('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x070e('0x2')],'set':function(_0x2593e5){this['setDataValue'](_0x070e('0x4'),_0x2593e5?_0x2593e5['join'](''):[]);},'get':function(){return this[_0x070e('0x5')]('crudPermissions')?this['getDataValue']('crudPermissions')[_0x070e('0x6')](''):[];}}};
\ No newline at end of file
+var _0x34e8=['setDataValue','crudPermissions','join','split','sequelize','exports','STRING','BOOLEAN'];(function(_0x4b0e01,_0x12291b){var _0x500ce0=function(_0x2b8b91){while(--_0x2b8b91){_0x4b0e01['push'](_0x4b0e01['shift']());}};_0x500ce0(++_0x12291b);}(_0x34e8,0x12c));var _0x834e=function(_0x4503f7,_0x531957){_0x4503f7=_0x4503f7-0x0;var _0x36c28d=_0x34e8[_0x4503f7];return _0x36c28d;};'use strict';var Sequelize=require(_0x834e('0x0'));module[_0x834e('0x1')]={'name':{'type':Sequelize[_0x834e('0x2')],'allowNull':![]},'category':{'type':Sequelize[_0x834e('0x2')],'allowNull':![]},'sectionId':{'type':Sequelize['INTEGER'],'allowNull':![]},'enabled':{'type':Sequelize[_0x834e('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x834e('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x834e('0x2')],'set':function(_0x31bf20){this[_0x834e('0x4')](_0x834e('0x5'),_0x31bf20?_0x31bf20[_0x834e('0x6')](''):[]);},'get':function(){return this['getDataValue'](_0x834e('0x5'))?this['getDataValue'](_0x834e('0x5'))[_0x834e('0x7')](''):[];}}};
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.controller.js b/server/api/userProfileSection/userProfileSection.controller.js
index d117adf..e8d70da 100644
--- a/server/api/userProfileSection/userProfileSection.controller.js
+++ b/server/api/userProfileSection/userProfileSection.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x44c2=['request-promise','moment','bluebird','mustache','util','path','ejs','squel','desk.js','to-csv','papaparse','../../components/parsers/qs','../../config/logger','../../config/utils','status','end','json','count','offset','limit','set','Content-Range','apply','update','then','destroy','error','name','send','index','UserProfileSection','rawAttributes','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','map','type','VIRTUAL','field','findAll','catch','params','includeAll','include','options','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir'];(function(_0x2af29a,_0x4f44bc){var _0x5ef02f=function(_0x4349ef){while(--_0x4349ef){_0x2af29a['push'](_0x2af29a['shift']());}};_0x5ef02f(++_0x4f44bc);}(_0x44c2,0x100));var _0x244c=function(_0x24f862,_0x4b645a){_0x24f862=_0x24f862-0x0;var _0x198aa4=_0x44c2[_0x24f862];return _0x198aa4;};'use strict';var pdf=require(_0x244c('0x0'));var emlformat=require(_0x244c('0x1'));var rimraf=require(_0x244c('0x2'));var zipdir=require(_0x244c('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x244c('0x4'));var moment=require(_0x244c('0x5'));var BPromise=require(_0x244c('0x6'));var Mustache=require(_0x244c('0x7'));var util=require(_0x244c('0x8'));var path=require(_0x244c('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x244c('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x244c('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x244c('0xc'));var toCsv=require(_0x244c('0xd'));var querystring=require('querystring');var Papa=require(_0x244c('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x244c('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x244c('0x10'))('api');var utils=require(_0x244c('0x11'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xe9b017,_0x313368){_0x313368=_0x313368||0xcc;return function(_0x2440d0){if(_0x2440d0){return _0xe9b017['sendStatus'](_0x313368);}return _0xe9b017[_0x244c('0x12')](_0x313368)[_0x244c('0x13')]();};}function respondWithResult(_0xc2602,_0x2ee162){_0x2ee162=_0x2ee162||0xc8;return function(_0x7785a7){if(_0x7785a7){return _0xc2602[_0x244c('0x12')](_0x2ee162)[_0x244c('0x14')](_0x7785a7);}};}function respondWithFilteredResult(_0x58f634,_0xb399e4){return function(_0x4c4001){if(_0x4c4001){var _0x50538b=_0x4c4001[_0x244c('0x15')],_0x151f1f=_0xb399e4['offset'],_0x94e7a4=_0xb399e4[_0x244c('0x16')]+_0xb399e4[_0x244c('0x17')],_0x2773e7;if(_0x94e7a4>=_0x50538b){_0x94e7a4=_0x50538b;_0x2773e7=0xc8;}else{_0x2773e7=0xce;}_0x58f634[_0x244c('0x12')](_0x2773e7);return _0x58f634[_0x244c('0x18')](_0x244c('0x19'),_0x151f1f+'-'+_0x94e7a4+'/'+_0x50538b)['json'](_0x4c4001);}return null;};}function patchUpdates(_0x3531b){return function(_0x2af7eb){try{jsonpatch[_0x244c('0x1a')](_0x2af7eb,_0x3531b,!![]);}catch(_0x5a7356){return BPromise['reject'](_0x5a7356);}return _0x2af7eb['save']();};}function saveUpdates(_0x330719,_0x1d9711){return function(_0x1ad17c){if(_0x1ad17c){return _0x1ad17c[_0x244c('0x1b')](_0x330719)[_0x244c('0x1c')](function(_0x2ed849){return _0x2ed849;});}return null;};}function removeEntity(_0x4b55af,_0x2b9691){return function(_0x2de472){if(_0x2de472){return _0x2de472[_0x244c('0x1d')]()['then'](function(){_0x4b55af[_0x244c('0x12')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4bd46e,_0x458fc5){return function(_0x6aa1f4){if(!_0x6aa1f4){_0x4bd46e['sendStatus'](0x194);}return _0x6aa1f4;};}function handleError(_0x43c5af,_0x189e5e){_0x189e5e=_0x189e5e||0x1f4;return function(_0x2147bf){logger[_0x244c('0x1e')](_0x2147bf['stack']);if(_0x2147bf[_0x244c('0x1f')]){delete _0x2147bf[_0x244c('0x1f')];}_0x43c5af[_0x244c('0x12')](_0x189e5e)[_0x244c('0x20')](_0x2147bf);};}exports[_0x244c('0x21')]=function(_0x584d44,_0x5269cd){var _0x19c4fc={},_0x2f35a5={},_0x193c50={'count':0x0,'rows':[]};var _0x2e1bfc=db[_0x244c('0x22')][_0x244c('0x23')];_0x2f35a5[_0x244c('0x24')]=_[_0x244c('0x25')](_0x2e1bfc);_0x2f35a5[_0x244c('0x26')]=_[_0x244c('0x25')](_0x584d44['query']);_0x2f35a5['filters']=_[_0x244c('0x27')](_0x2f35a5[_0x244c('0x24')],_0x2f35a5[_0x244c('0x26')]);_0x19c4fc[_0x244c('0x28')]=_[_0x244c('0x27')](_0x2f35a5[_0x244c('0x24')],qs['fields'](_0x584d44[_0x244c('0x26')][_0x244c('0x29')]));_0x19c4fc[_0x244c('0x28')]=_0x19c4fc[_0x244c('0x28')][_0x244c('0x2a')]?_0x19c4fc[_0x244c('0x28')]:_0x2f35a5[_0x244c('0x24')];if(!_0x584d44[_0x244c('0x26')][_0x244c('0x2b')](_0x244c('0x2c'))){_0x19c4fc[_0x244c('0x17')]=qs[_0x244c('0x17')](_0x584d44['query'][_0x244c('0x17')]);_0x19c4fc[_0x244c('0x16')]=qs[_0x244c('0x16')](_0x584d44[_0x244c('0x26')][_0x244c('0x16')]);}_0x19c4fc[_0x244c('0x2d')]=qs[_0x244c('0x2e')](_0x584d44[_0x244c('0x26')]['sort']);_0x19c4fc[_0x244c('0x2f')]=qs[_0x244c('0x30')](_['pick'](_0x584d44[_0x244c('0x26')],_0x2f35a5[_0x244c('0x30')]));if(_0x584d44[_0x244c('0x26')][_0x244c('0x31')]){_0x19c4fc[_0x244c('0x2f')]=_[_0x244c('0x32')](_0x19c4fc[_0x244c('0x2f')],{'$or':_[_0x244c('0x33')](_0x2e1bfc,function(_0x10454a){if(_0x10454a[_0x244c('0x34')]['key']!==_0x244c('0x35')){var _0x1a32c8={};_0x1a32c8[_0x10454a[_0x244c('0x36')]]={'$like':'%'+_0x584d44[_0x244c('0x26')][_0x244c('0x31')]+'%'};return _0x1a32c8;}})});}_0x19c4fc=_['merge']({},_0x19c4fc,_0x584d44['options']);var _0x3e5a34={'where':_0x19c4fc['where']};return db[_0x244c('0x22')][_0x244c('0x15')](_0x3e5a34)[_0x244c('0x1c')](function(_0x1849b3){_0x193c50[_0x244c('0x15')]=_0x1849b3;if(_0x584d44[_0x244c('0x26')]['includeAll']){_0x19c4fc['include']=[{'all':!![]}];}return db[_0x244c('0x22')][_0x244c('0x37')](_0x19c4fc);})[_0x244c('0x1c')](function(_0x16c2d9){_0x193c50['rows']=_0x16c2d9;return _0x193c50;})[_0x244c('0x1c')](respondWithFilteredResult(_0x5269cd,_0x19c4fc))[_0x244c('0x38')](handleError(_0x5269cd,null));};exports['show']=function(_0xbb14b1,_0x543484){var _0x3d201d={'raw':![],'where':{'id':_0xbb14b1[_0x244c('0x39')]['id']}},_0x2e09bc={};_0x2e09bc[_0x244c('0x24')]=_['keys'](db['UserProfileSection'][_0x244c('0x23')]);_0x2e09bc['query']=_[_0x244c('0x25')](_0xbb14b1[_0x244c('0x26')]);_0x2e09bc[_0x244c('0x30')]=_[_0x244c('0x27')](_0x2e09bc[_0x244c('0x24')],_0x2e09bc[_0x244c('0x26')]);_0x3d201d[_0x244c('0x28')]=_['intersection'](_0x2e09bc[_0x244c('0x24')],qs[_0x244c('0x29')](_0xbb14b1[_0x244c('0x26')][_0x244c('0x29')]));_0x3d201d[_0x244c('0x28')]=_0x3d201d[_0x244c('0x28')][_0x244c('0x2a')]?_0x3d201d[_0x244c('0x28')]:_0x2e09bc[_0x244c('0x24')];if(_0xbb14b1[_0x244c('0x26')][_0x244c('0x3a')]){_0x3d201d[_0x244c('0x3b')]=[{'all':!![]}];}_0x3d201d=_[_0x244c('0x32')]({},_0x3d201d,_0xbb14b1[_0x244c('0x3c')]);return db[_0x244c('0x22')][_0x244c('0x3d')](_0x3d201d)[_0x244c('0x1c')](handleEntityNotFound(_0x543484,null))[_0x244c('0x1c')](respondWithResult(_0x543484,null))[_0x244c('0x38')](handleError(_0x543484,null));};exports['create']=function(_0x5a2508,_0x21fc79){return db[_0x244c('0x22')][_0x244c('0x3e')](_0x5a2508[_0x244c('0x3f')],{})['then'](respondWithResult(_0x21fc79,0xc9))[_0x244c('0x38')](handleError(_0x21fc79,null));};exports[_0x244c('0x1b')]=function(_0x6f340d,_0x240342){if(_0x6f340d[_0x244c('0x3f')]['id']){delete _0x6f340d[_0x244c('0x3f')]['id'];}return db[_0x244c('0x22')][_0x244c('0x3d')]({'where':{'id':_0x6f340d['params']['id']}})[_0x244c('0x1c')](handleEntityNotFound(_0x240342,null))['then'](saveUpdates(_0x6f340d[_0x244c('0x3f')],null))[_0x244c('0x1c')](respondWithResult(_0x240342,null))['catch'](handleError(_0x240342,null));};exports[_0x244c('0x1d')]=function(_0x21c9e9,_0x22219f){return db[_0x244c('0x22')]['find']({'where':{'id':_0x21c9e9[_0x244c('0x39')]['id']}})[_0x244c('0x1c')](handleEntityNotFound(_0x22219f,null))[_0x244c('0x1c')](removeEntity(_0x22219f,null))[_0x244c('0x38')](handleError(_0x22219f,null));};exports[_0x244c('0x40')]=function(_0x1a2968,_0x58f136){return db['UserProfileSection'][_0x244c('0x40')]()[_0x244c('0x1c')](respondWithResult(_0x58f136,null))[_0x244c('0x38')](handleError(_0x58f136,null));};
\ No newline at end of file
+var _0xb90a=['intersection','fields','attributes','length','hasOwnProperty','order','sort','pick','where','merge','type','key','VIRTUAL','field','filter','options','UserProfileSection','includeAll','catch','show','include','find','create','body','params','describe','html-pdf','eml-format','zip-dir','util','path','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','save','update','then','destroy','stack','name','send','index','rawAttributes','model','keys','query','filters'];(function(_0x4aa4e6,_0x278c45){var _0x322588=function(_0x19279d){while(--_0x19279d){_0x4aa4e6['push'](_0x4aa4e6['shift']());}};_0x322588(++_0x278c45);}(_0xb90a,0x12a));var _0xab90=function(_0x38e31a,_0x43dc19){_0x38e31a=_0x38e31a-0x0;var _0x3e6817=_0xb90a[_0x38e31a];return _0x3e6817;};'use strict';var pdf=require(_0xab90('0x0'));var emlformat=require(_0xab90('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xab90('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xab90('0x3'));var path=require(_0xab90('0x4'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xab90('0x5'));var fs=require('fs');var _=require(_0xab90('0x6'));var squel=require(_0xab90('0x7'));var crypto=require('crypto');var jsforce=require(_0xab90('0x8'));var deskjs=require(_0xab90('0x9'));var toCsv=require(_0xab90('0xa'));var querystring=require(_0xab90('0xb'));var Papa=require(_0xab90('0xc'));var Redis=require(_0xab90('0xd'));var authService=require(_0xab90('0xe'));var qs=require(_0xab90('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xab90('0x10'))(_0xab90('0x11'));var utils=require(_0xab90('0x12'));var config=require(_0xab90('0x13'));var db=require(_0xab90('0x14'))['db'];function respondWithStatusCode(_0x5a00c9,_0x1dd739){_0x1dd739=_0x1dd739||0xcc;return function(_0x97ab00){if(_0x97ab00){return _0x5a00c9[_0xab90('0x15')](_0x1dd739);}return _0x5a00c9[_0xab90('0x16')](_0x1dd739)[_0xab90('0x17')]();};}function respondWithResult(_0x46c5e5,_0x57a03d){_0x57a03d=_0x57a03d||0xc8;return function(_0x11e95a){if(_0x11e95a){return _0x46c5e5[_0xab90('0x16')](_0x57a03d)[_0xab90('0x18')](_0x11e95a);}};}function respondWithFilteredResult(_0x9abf7c,_0x29f352){return function(_0x1c3d44){if(_0x1c3d44){var _0x556828=_0x1c3d44[_0xab90('0x19')],_0x282723=_0x29f352['offset'],_0x5b68bd=_0x29f352[_0xab90('0x1a')]+_0x29f352[_0xab90('0x1b')],_0x78ce5a;if(_0x5b68bd>=_0x556828){_0x5b68bd=_0x556828;_0x78ce5a=0xc8;}else{_0x78ce5a=0xce;}_0x9abf7c[_0xab90('0x16')](_0x78ce5a);return _0x9abf7c['set'](_0xab90('0x1c'),_0x282723+'-'+_0x5b68bd+'/'+_0x556828)[_0xab90('0x18')](_0x1c3d44);}return null;};}function patchUpdates(_0x1d5222){return function(_0x1ff44e){try{jsonpatch['apply'](_0x1ff44e,_0x1d5222,!![]);}catch(_0x2f6904){return BPromise['reject'](_0x2f6904);}return _0x1ff44e[_0xab90('0x1d')]();};}function saveUpdates(_0x5d5dda,_0x12b19a){return function(_0x143d54){if(_0x143d54){return _0x143d54[_0xab90('0x1e')](_0x5d5dda)[_0xab90('0x1f')](function(_0x5d5c1c){return _0x5d5c1c;});}return null;};}function removeEntity(_0x351bf1,_0x327631){return function(_0x2fa268){if(_0x2fa268){return _0x2fa268[_0xab90('0x20')]()[_0xab90('0x1f')](function(){_0x351bf1[_0xab90('0x16')](0xcc)[_0xab90('0x17')]();});}};}function handleEntityNotFound(_0x210b5e,_0x84eb68){return function(_0x2cdc7f){if(!_0x2cdc7f){_0x210b5e[_0xab90('0x15')](0x194);}return _0x2cdc7f;};}function handleError(_0x23c089,_0x1c680c){_0x1c680c=_0x1c680c||0x1f4;return function(_0x195e90){logger['error'](_0x195e90[_0xab90('0x21')]);if(_0x195e90[_0xab90('0x22')]){delete _0x195e90[_0xab90('0x22')];}_0x23c089[_0xab90('0x16')](_0x1c680c)[_0xab90('0x23')](_0x195e90);};}exports[_0xab90('0x24')]=function(_0x2cad38,_0x20ce8a){var _0x1a79d0={},_0x52acf0={},_0x38b3ae={'count':0x0,'rows':[]};var _0x4642a9=db['UserProfileSection'][_0xab90('0x25')];_0x52acf0[_0xab90('0x26')]=_[_0xab90('0x27')](_0x4642a9);_0x52acf0[_0xab90('0x28')]=_[_0xab90('0x27')](_0x2cad38[_0xab90('0x28')]);_0x52acf0[_0xab90('0x29')]=_[_0xab90('0x2a')](_0x52acf0[_0xab90('0x26')],_0x52acf0[_0xab90('0x28')]);_0x1a79d0['attributes']=_['intersection'](_0x52acf0['model'],qs[_0xab90('0x2b')](_0x2cad38['query'][_0xab90('0x2b')]));_0x1a79d0[_0xab90('0x2c')]=_0x1a79d0[_0xab90('0x2c')][_0xab90('0x2d')]?_0x1a79d0['attributes']:_0x52acf0[_0xab90('0x26')];if(!_0x2cad38[_0xab90('0x28')][_0xab90('0x2e')]('nolimit')){_0x1a79d0['limit']=qs[_0xab90('0x1b')](_0x2cad38[_0xab90('0x28')][_0xab90('0x1b')]);_0x1a79d0[_0xab90('0x1a')]=qs[_0xab90('0x1a')](_0x2cad38[_0xab90('0x28')][_0xab90('0x1a')]);}_0x1a79d0[_0xab90('0x2f')]=qs[_0xab90('0x30')](_0x2cad38[_0xab90('0x28')][_0xab90('0x30')]);_0x1a79d0['where']=qs[_0xab90('0x29')](_[_0xab90('0x31')](_0x2cad38[_0xab90('0x28')],_0x52acf0[_0xab90('0x29')]));if(_0x2cad38[_0xab90('0x28')]['filter']){_0x1a79d0[_0xab90('0x32')]=_[_0xab90('0x33')](_0x1a79d0[_0xab90('0x32')],{'$or':_['map'](_0x4642a9,function(_0x24031c){if(_0x24031c[_0xab90('0x34')][_0xab90('0x35')]!==_0xab90('0x36')){var _0x36e83b={};_0x36e83b[_0x24031c[_0xab90('0x37')]]={'$like':'%'+_0x2cad38['query'][_0xab90('0x38')]+'%'};return _0x36e83b;}})});}_0x1a79d0=_['merge']({},_0x1a79d0,_0x2cad38[_0xab90('0x39')]);var _0xe310d1={'where':_0x1a79d0['where']};return db[_0xab90('0x3a')]['count'](_0xe310d1)[_0xab90('0x1f')](function(_0xda35a0){_0x38b3ae[_0xab90('0x19')]=_0xda35a0;if(_0x2cad38[_0xab90('0x28')][_0xab90('0x3b')]){_0x1a79d0['include']=[{'all':!![]}];}return db[_0xab90('0x3a')]['findAll'](_0x1a79d0);})[_0xab90('0x1f')](function(_0x1fadc9){_0x38b3ae['rows']=_0x1fadc9;return _0x38b3ae;})[_0xab90('0x1f')](respondWithFilteredResult(_0x20ce8a,_0x1a79d0))[_0xab90('0x3c')](handleError(_0x20ce8a,null));};exports[_0xab90('0x3d')]=function(_0x5557a4,_0x313469){var _0x12ba0b={'raw':![],'where':{'id':_0x5557a4['params']['id']}},_0x4e0bc7={};_0x4e0bc7[_0xab90('0x26')]=_[_0xab90('0x27')](db[_0xab90('0x3a')][_0xab90('0x25')]);_0x4e0bc7[_0xab90('0x28')]=_[_0xab90('0x27')](_0x5557a4[_0xab90('0x28')]);_0x4e0bc7['filters']=_[_0xab90('0x2a')](_0x4e0bc7['model'],_0x4e0bc7[_0xab90('0x28')]);_0x12ba0b['attributes']=_[_0xab90('0x2a')](_0x4e0bc7[_0xab90('0x26')],qs[_0xab90('0x2b')](_0x5557a4[_0xab90('0x28')][_0xab90('0x2b')]));_0x12ba0b[_0xab90('0x2c')]=_0x12ba0b[_0xab90('0x2c')][_0xab90('0x2d')]?_0x12ba0b['attributes']:_0x4e0bc7['model'];if(_0x5557a4['query']['includeAll']){_0x12ba0b[_0xab90('0x3e')]=[{'all':!![]}];}_0x12ba0b=_['merge']({},_0x12ba0b,_0x5557a4[_0xab90('0x39')]);return db[_0xab90('0x3a')][_0xab90('0x3f')](_0x12ba0b)[_0xab90('0x1f')](handleEntityNotFound(_0x313469,null))[_0xab90('0x1f')](respondWithResult(_0x313469,null))['catch'](handleError(_0x313469,null));};exports[_0xab90('0x40')]=function(_0x4e5655,_0x4410dc){return db[_0xab90('0x3a')]['create'](_0x4e5655[_0xab90('0x41')],{})[_0xab90('0x1f')](respondWithResult(_0x4410dc,0xc9))[_0xab90('0x3c')](handleError(_0x4410dc,null));};exports[_0xab90('0x1e')]=function(_0x22aa04,_0x2ba4cb){if(_0x22aa04['body']['id']){delete _0x22aa04[_0xab90('0x41')]['id'];}return db['UserProfileSection'][_0xab90('0x3f')]({'where':{'id':_0x22aa04['params']['id']}})[_0xab90('0x1f')](handleEntityNotFound(_0x2ba4cb,null))['then'](saveUpdates(_0x22aa04[_0xab90('0x41')],null))['then'](respondWithResult(_0x2ba4cb,null))['catch'](handleError(_0x2ba4cb,null));};exports['destroy']=function(_0x1bd4bd,_0x1bb19f){return db[_0xab90('0x3a')][_0xab90('0x3f')]({'where':{'id':_0x1bd4bd[_0xab90('0x42')]['id']}})[_0xab90('0x1f')](handleEntityNotFound(_0x1bb19f,null))[_0xab90('0x1f')](removeEntity(_0x1bb19f,null))[_0xab90('0x3c')](handleError(_0x1bb19f,null));};exports[_0xab90('0x43')]=function(_0x4c416d,_0x2a8860){return db[_0xab90('0x3a')][_0xab90('0x43')]()['then'](respondWithResult(_0x2a8860,null))['catch'](handleError(_0x2a8860,null));};
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.model.js b/server/api/userProfileSection/userProfileSection.model.js
index d024010..519b4e2 100644
--- a/server/api/userProfileSection/userProfileSection.model.js
+++ b/server/api/userProfileSection/userProfileSection.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4ab0=['define','UserProfileSection','user_profile_has_sections','sectionId','userProfileId','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','exports'];(function(_0x2d2258,_0x2ce510){var _0x18e155=function(_0x11949e){while(--_0x11949e){_0x2d2258['push'](_0x2d2258['shift']());}};_0x18e155(++_0x2ce510);}(_0x4ab0,0xd5));var _0x04ab=function(_0x5f477d,_0x91c33b){_0x5f477d=_0x5f477d-0x0;var _0x359c3b=_0x4ab0[_0x5f477d];return _0x359c3b;};'use strict';var _=require('lodash');var util=require(_0x04ab('0x0'));var logger=require(_0x04ab('0x1'))(_0x04ab('0x2'));var moment=require(_0x04ab('0x3'));var BPromise=require(_0x04ab('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x04ab('0x5'));var config=require(_0x04ab('0x6'));var attributes=require('./userProfileSection.attributes');module[_0x04ab('0x7')]=function(_0x2c5730,_0x4edd2e){return _0x2c5730[_0x04ab('0x8')](_0x04ab('0x9'),attributes,{'tableName':_0x04ab('0xa'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':[_0x04ab('0xb'),_0x04ab('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2b6d=['define','UserProfileSection','user_profile_has_sections','compositeIndex','userProfileId','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./userProfileSection.attributes','exports'];(function(_0x2695c8,_0x534298){var _0x957b8d=function(_0x255996){while(--_0x255996){_0x2695c8['push'](_0x2695c8['shift']());}};_0x957b8d(++_0x534298);}(_0x2b6d,0x1d6));var _0xd2b6=function(_0x434fc8,_0x415c49){_0x434fc8=_0x434fc8-0x0;var _0xcb03ce=_0x2b6d[_0x434fc8];return _0xcb03ce;};'use strict';var _=require(_0xd2b6('0x0'));var util=require(_0xd2b6('0x1'));var logger=require(_0xd2b6('0x2'))('api');var moment=require(_0xd2b6('0x3'));var BPromise=require(_0xd2b6('0x4'));var rp=require(_0xd2b6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd2b6('0x6'));var config=require(_0xd2b6('0x7'));var attributes=require(_0xd2b6('0x8'));module[_0xd2b6('0x9')]=function(_0x1b3e84,_0x930641){return _0x1b3e84[_0xd2b6('0xa')](_0xd2b6('0xb'),attributes,{'tableName':_0xd2b6('0xc'),'paranoid':![],'indexes':[{'name':_0xd2b6('0xd'),'fields':['sectionId',_0xd2b6('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.rpc.js b/server/api/userProfileSection/userProfileSection.rpc.js
index 070bad2..ce301d7 100644
--- a/server/api/userProfileSection/userProfileSection.rpc.js
+++ b/server/api/userProfileSection/userProfileSection.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb9f1=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x293512,_0x4ecf5a){var _0x125fb2=function(_0x5a7a32){while(--_0x5a7a32){_0x293512['push'](_0x293512['shift']());}};_0x125fb2(++_0x4ecf5a);}(_0xb9f1,0xfc));var _0x1b9f=function(_0x13d4ba,_0x183dc3){_0x13d4ba=_0x13d4ba-0x0;var _0x2c9a31=_0xb9f1[_0x13d4ba];return _0x2c9a31;};'use strict';var _=require(_0x1b9f('0x0'));var util=require(_0x1b9f('0x1'));var moment=require(_0x1b9f('0x2'));var BPromise=require(_0x1b9f('0x3'));var rs=require(_0x1b9f('0x4'));var fs=require('fs');var Redis=require(_0x1b9f('0x5'));var db=require(_0x1b9f('0x6'))['db'];var utils=require(_0x1b9f('0x7'));var logger=require(_0x1b9f('0x8'))(_0x1b9f('0x9'));var config=require(_0x1b9f('0xa'));var jayson=require(_0x1b9f('0xb'));var client=jayson[_0x1b9f('0xc')][_0x1b9f('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x4303b6,_0x378f00,_0x223504){return new BPromise(function(_0xddc65c,_0x133a74){return client[_0x1b9f('0xe')](_0x4303b6,_0x223504)[_0x1b9f('0xf')](function(_0xdc7cdb){logger['info'](_0x1b9f('0x10'),_0x378f00,_0x1b9f('0x11'));logger[_0x1b9f('0x12')](_0x1b9f('0x13'),_0x378f00,_0x1b9f('0x11'),JSON[_0x1b9f('0x14')](_0xdc7cdb));if(_0xdc7cdb[_0x1b9f('0x15')]){if(_0xdc7cdb['error'][_0x1b9f('0x16')]===0x1f4){logger[_0x1b9f('0x15')](_0x1b9f('0x10'),_0x378f00,_0xdc7cdb[_0x1b9f('0x15')]['message']);return _0x133a74(_0xdc7cdb[_0x1b9f('0x15')][_0x1b9f('0x17')]);}logger[_0x1b9f('0x15')](_0x1b9f('0x10'),_0x378f00,_0xdc7cdb[_0x1b9f('0x15')]['message']);return _0xddc65c(_0xdc7cdb[_0x1b9f('0x15')]['message']);}else{logger[_0x1b9f('0x18')](_0x1b9f('0x10'),_0x378f00,_0x1b9f('0x11'));_0xddc65c(_0xdc7cdb['result'][_0x1b9f('0x17')]);}})[_0x1b9f('0x19')](function(_0x526959){logger[_0x1b9f('0x15')](_0x1b9f('0x10'),_0x378f00,_0x526959);_0x133a74(_0x526959);});});}
\ No newline at end of file
+var _0x995a=['stringify','error','message','UserProfileSection,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x3ef5bb,_0x27e3ac){var _0x59d620=function(_0x46cd45){while(--_0x46cd45){_0x3ef5bb['push'](_0x3ef5bb['shift']());}};_0x59d620(++_0x27e3ac);}(_0x995a,0x176));var _0xa995=function(_0x230bdd,_0x3317c8){_0x230bdd=_0x230bdd-0x0;var _0x4e8e47=_0x995a[_0x230bdd];return _0x4e8e47;};'use strict';var _=require(_0xa995('0x0'));var util=require(_0xa995('0x1'));var moment=require(_0xa995('0x2'));var BPromise=require(_0xa995('0x3'));var rs=require(_0xa995('0x4'));var fs=require('fs');var Redis=require(_0xa995('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xa995('0x6'));var logger=require(_0xa995('0x7'))(_0xa995('0x8'));var config=require(_0xa995('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xa995('0xa')][_0xa995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x353cf6,_0x323f41,_0x273408){return new BPromise(function(_0x44ca95,_0x478bdf){return client[_0xa995('0xc')](_0x353cf6,_0x273408)[_0xa995('0xd')](function(_0x50c3bd){logger['info']('UserProfileSection,\x20%s,\x20%s',_0x323f41,'request\x20sent');logger[_0xa995('0xe')](_0xa995('0xf'),_0x323f41,_0xa995('0x10'),JSON[_0xa995('0x11')](_0x50c3bd));if(_0x50c3bd[_0xa995('0x12')]){if(_0x50c3bd[_0xa995('0x12')]['code']===0x1f4){logger['error']('UserProfileSection,\x20%s,\x20%s',_0x323f41,_0x50c3bd[_0xa995('0x12')]['message']);return _0x478bdf(_0x50c3bd['error'][_0xa995('0x13')]);}logger[_0xa995('0x12')](_0xa995('0x14'),_0x323f41,_0x50c3bd['error'][_0xa995('0x13')]);return _0x44ca95(_0x50c3bd['error'][_0xa995('0x13')]);}else{logger['info'](_0xa995('0x14'),_0x323f41,_0xa995('0x10'));_0x44ca95(_0x50c3bd[_0xa995('0x15')]['message']);}})[_0xa995('0x16')](function(_0x3ec2bd){logger[_0xa995('0x12')](_0xa995('0x14'),_0x323f41,_0x3ec2bd);_0x478bdf(_0x3ec2bd);});});}
\ No newline at end of file
diff --git a/server/api/userSmsQueue/index.js b/server/api/userSmsQueue/index.js
index 0683187..38bc945 100644
--- a/server/api/userSmsQueue/index.js
+++ b/server/api/userSmsQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2f2e=['../../components/auth/service','../../components/interaction/service','../../config/environment','exports','util','path','express'];(function(_0x3720ce,_0x5c6e5b){var _0x5fd6da=function(_0x3cf176){while(--_0x3cf176){_0x3720ce['push'](_0x3720ce['shift']());}};_0x5fd6da(++_0x5c6e5b);}(_0x2f2e,0x146));var _0xe2f2=function(_0x152136,_0x4f14f1){_0x152136=_0x152136-0x0;var _0x20df44=_0x2f2e[_0x152136];return _0x20df44;};'use strict';var multer=require('multer');var util=require(_0xe2f2('0x0'));var path=require(_0xe2f2('0x1'));var timeout=require('connect-timeout');var express=require(_0xe2f2('0x2'));var router=express['Router']();var auth=require(_0xe2f2('0x3'));var interaction=require(_0xe2f2('0x4'));var config=require(_0xe2f2('0x5'));module[_0xe2f2('0x6')]=router;
\ No newline at end of file
+var _0xdf98=['../../components/auth/service','../../components/interaction/service','../../config/environment','exports','multer','path','Router'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xdf98,0xcf));var _0x8df9=function(_0xfd1fcd,_0x3182b7){_0xfd1fcd=_0xfd1fcd-0x0;var _0x1e0646=_0xdf98[_0xfd1fcd];return _0x1e0646;};'use strict';var multer=require(_0x8df9('0x0'));var util=require('util');var path=require(_0x8df9('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x8df9('0x2')]();var auth=require(_0x8df9('0x3'));var interaction=require(_0x8df9('0x4'));var config=require(_0x8df9('0x5'));module[_0x8df9('0x6')]=router;
\ No newline at end of file
diff --git a/server/api/userSmsQueue/userSmsQueue.attributes.js b/server/api/userSmsQueue/userSmsQueue.attributes.js
index b3a82b8..9e83ffd 100644
--- a/server/api/userSmsQueue/userSmsQueue.attributes.js
+++ b/server/api/userSmsQueue/userSmsQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6e61=['INTEGER'];(function(_0xdea933,_0x3cbcd6){var _0x40fe06=function(_0x115506){while(--_0x115506){_0xdea933['push'](_0xdea933['shift']());}};_0x40fe06(++_0x3cbcd6);}(_0x6e61,0xe7));var _0x16e6=function(_0x2ef9c5,_0x25f716){_0x2ef9c5=_0x2ef9c5-0x0;var _0x3a7119=_0x6e61[_0x2ef9c5];return _0x3a7119;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x16e6('0x0')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x4fac=['sequelize','INTEGER'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4fac,0x1a0));var _0xc4fa=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x4fac[_0x57b54c];return _0x59cc19;};'use strict';var Sequelize=require(_0xc4fa('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xc4fa('0x1')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/userSmsQueue/userSmsQueue.model.js b/server/api/userSmsQueue/userSmsQueue.model.js
index 95bc6bb..95b1a68 100644
--- a/server/api/userSmsQueue/userSmsQueue.model.js
+++ b/server/api/userSmsQueue/userSmsQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6659=['api','moment','bluebird','request-promise','path','../../config/environment','./userSmsQueue.attributes','exports','define','user_has_sms_queues','lodash','util','../../config/logger'];(function(_0x5a7b35,_0x156f93){var _0x59b62a=function(_0x33c3fb){while(--_0x33c3fb){_0x5a7b35['push'](_0x5a7b35['shift']());}};_0x59b62a(++_0x156f93);}(_0x6659,0x169));var _0x9665=function(_0x7216be,_0x1c3f49){_0x7216be=_0x7216be-0x0;var _0x7807fd=_0x6659[_0x7216be];return _0x7807fd;};'use strict';var _=require(_0x9665('0x0'));var util=require(_0x9665('0x1'));var logger=require(_0x9665('0x2'))(_0x9665('0x3'));var moment=require(_0x9665('0x4'));var BPromise=require(_0x9665('0x5'));var rp=require(_0x9665('0x6'));var fs=require('fs');var path=require(_0x9665('0x7'));var rimraf=require('rimraf');var config=require(_0x9665('0x8'));var attributes=require(_0x9665('0x9'));module[_0x9665('0xa')]=function(_0x4cf75a,_0x467ae3){return _0x4cf75a[_0x9665('0xb')]('UserSmsQueue',attributes,{'tableName':_0x9665('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x91c6=['request-promise','path','../../config/environment','./userSmsQueue.attributes','exports','define','user_has_sms_queues','lodash','api','moment','bluebird'];(function(_0x3aa6d4,_0x58a363){var _0x2bce8b=function(_0x104c5d){while(--_0x104c5d){_0x3aa6d4['push'](_0x3aa6d4['shift']());}};_0x2bce8b(++_0x58a363);}(_0x91c6,0xf9));var _0x691c=function(_0x1b45d4,_0x550533){_0x1b45d4=_0x1b45d4-0x0;var _0x189761=_0x91c6[_0x1b45d4];return _0x189761;};'use strict';var _=require(_0x691c('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x691c('0x1'));var moment=require(_0x691c('0x2'));var BPromise=require(_0x691c('0x3'));var rp=require(_0x691c('0x4'));var fs=require('fs');var path=require(_0x691c('0x5'));var rimraf=require('rimraf');var config=require(_0x691c('0x6'));var attributes=require(_0x691c('0x7'));module[_0x691c('0x8')]=function(_0x1b2e82,_0x3dddf8){return _0x1b2e82[_0x691c('0x9')]('UserSmsQueue',attributes,{'tableName':_0x691c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userSmsQueue/userSmsQueue.rpc.js b/server/api/userSmsQueue/userSmsQueue.rpc.js
index 88f2599..b0ac281 100644
--- a/server/api/userSmsQueue/userSmsQueue.rpc.js
+++ b/server/api/userSmsQueue/userSmsQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4050=['UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','UserSmsQueue,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4050,0x7f));var _0x0405=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0x4050[_0x376b45];return _0x2341b3;};'use strict';var _=require(_0x0405('0x0'));var util=require(_0x0405('0x1'));var moment=require(_0x0405('0x2'));var BPromise=require(_0x0405('0x3'));var rs=require(_0x0405('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0405('0x5'))['db'];var utils=require(_0x0405('0x6'));var logger=require(_0x0405('0x7'))(_0x0405('0x8'));var config=require(_0x0405('0x9'));var jayson=require(_0x0405('0xa'));var client=jayson[_0x0405('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1980f7,_0x14179e,_0x5f4665){return new BPromise(function(_0x50fe09,_0x332f57){return client['request'](_0x1980f7,_0x5f4665)[_0x0405('0xc')](function(_0x5ee145){logger[_0x0405('0xd')](_0x0405('0xe'),_0x14179e,_0x0405('0xf'));logger[_0x0405('0x10')](_0x0405('0x11'),_0x14179e,_0x0405('0xf'),JSON[_0x0405('0x12')](_0x5ee145));if(_0x5ee145[_0x0405('0x13')]){if(_0x5ee145['error'][_0x0405('0x14')]===0x1f4){logger[_0x0405('0x13')](_0x0405('0xe'),_0x14179e,_0x5ee145['error'][_0x0405('0x15')]);return _0x332f57(_0x5ee145[_0x0405('0x13')]['message']);}logger['error']('UserSmsQueue,\x20%s,\x20%s',_0x14179e,_0x5ee145[_0x0405('0x13')][_0x0405('0x15')]);return _0x50fe09(_0x5ee145[_0x0405('0x13')][_0x0405('0x15')]);}else{logger['info'](_0x0405('0xe'),_0x14179e,_0x0405('0xf'));_0x50fe09(_0x5ee145[_0x0405('0x16')]['message']);}})[_0x0405('0x17')](function(_0x4930bc){logger[_0x0405('0x13')](_0x0405('0xe'),_0x14179e,_0x4930bc);_0x332f57(_0x4930bc);});});}
\ No newline at end of file
+var _0xef79=['http','info','UserSmsQueue,\x20%s,\x20%s','request\x20sent','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','client'];(function(_0x366456,_0x260fcc){var _0x27aacd=function(_0x54ebc7){while(--_0x54ebc7){_0x366456['push'](_0x366456['shift']());}};_0x27aacd(++_0x260fcc);}(_0xef79,0xd4));var _0x9ef7=function(_0x43456b,_0x262bbe){_0x43456b=_0x43456b-0x0;var _0x4cde42=_0xef79[_0x43456b];return _0x4cde42;};'use strict';var _=require(_0x9ef7('0x0'));var util=require(_0x9ef7('0x1'));var moment=require(_0x9ef7('0x2'));var BPromise=require(_0x9ef7('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9ef7('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x9ef7('0x5'));var logger=require(_0x9ef7('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9ef7('0x7')][_0x9ef7('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x19dbff,_0x2d0c28,_0x30e1e1){return new BPromise(function(_0x1a4595,_0x2307d4){return client['request'](_0x19dbff,_0x30e1e1)['then'](function(_0x5f1cd0){logger[_0x9ef7('0x9')](_0x9ef7('0xa'),_0x2d0c28,_0x9ef7('0xb'));logger[_0x9ef7('0xc')](_0x9ef7('0xd'),_0x2d0c28,_0x9ef7('0xb'),JSON[_0x9ef7('0xe')](_0x5f1cd0));if(_0x5f1cd0[_0x9ef7('0xf')]){if(_0x5f1cd0['error'][_0x9ef7('0x10')]===0x1f4){logger[_0x9ef7('0xf')](_0x9ef7('0xa'),_0x2d0c28,_0x5f1cd0['error'][_0x9ef7('0x11')]);return _0x2307d4(_0x5f1cd0[_0x9ef7('0xf')][_0x9ef7('0x11')]);}logger[_0x9ef7('0xf')](_0x9ef7('0xa'),_0x2d0c28,_0x5f1cd0[_0x9ef7('0xf')][_0x9ef7('0x11')]);return _0x1a4595(_0x5f1cd0[_0x9ef7('0xf')][_0x9ef7('0x11')]);}else{logger['info']('UserSmsQueue,\x20%s,\x20%s',_0x2d0c28,_0x9ef7('0xb'));_0x1a4595(_0x5f1cd0[_0x9ef7('0x12')][_0x9ef7('0x11')]);}})[_0x9ef7('0x13')](function(_0x425fa4){logger['error']('UserSmsQueue,\x20%s,\x20%s',_0x2d0c28,_0x425fa4);_0x2307d4(_0x425fa4);});});}
\ No newline at end of file
diff --git a/server/api/userVoiceQueue/index.js b/server/api/userVoiceQueue/index.js
index 19c760f..2582c4d 100644
--- a/server/api/userVoiceQueue/index.js
+++ b/server/api/userVoiceQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3fc6=['express','Router','../../components/interaction/service','../../config/environment','exports','multer','path','connect-timeout'];(function(_0x42ec8b,_0x3aec6c){var _0xeafa81=function(_0x4f3dcd){while(--_0x4f3dcd){_0x42ec8b['push'](_0x42ec8b['shift']());}};_0xeafa81(++_0x3aec6c);}(_0x3fc6,0x115));var _0x63fc=function(_0x241e01,_0x38f389){_0x241e01=_0x241e01-0x0;var _0x5b13b6=_0x3fc6[_0x241e01];return _0x5b13b6;};'use strict';var multer=require(_0x63fc('0x0'));var util=require('util');var path=require(_0x63fc('0x1'));var timeout=require(_0x63fc('0x2'));var express=require(_0x63fc('0x3'));var router=express[_0x63fc('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x63fc('0x5'));var config=require(_0x63fc('0x6'));module[_0x63fc('0x7')]=router;
\ No newline at end of file
+var _0x0f80=['util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','exports'];(function(_0x295a55,_0x56e0dc){var _0x3890cf=function(_0x284d42){while(--_0x284d42){_0x295a55['push'](_0x295a55['shift']());}};_0x3890cf(++_0x56e0dc);}(_0x0f80,0x108));var _0x00f8=function(_0x4008c8,_0x145c43){_0x4008c8=_0x4008c8-0x0;var _0x435c19=_0x0f80[_0x4008c8];return _0x435c19;};'use strict';var multer=require('multer');var util=require(_0x00f8('0x0'));var path=require(_0x00f8('0x1'));var timeout=require(_0x00f8('0x2'));var express=require(_0x00f8('0x3'));var router=express[_0x00f8('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x00f8('0x5'));var config=require(_0x00f8('0x6'));module[_0x00f8('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/userVoiceQueue/userVoiceQueue.attributes.js b/server/api/userVoiceQueue/userVoiceQueue.attributes.js
index 67f9899..b1df156 100644
--- a/server/api/userVoiceQueue/userVoiceQueue.attributes.js
+++ b/server/api/userVoiceQueue/userVoiceQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0848=['exports','sequelize'];(function(_0x3489dc,_0x5c9f11){var _0x53b272=function(_0x465420){while(--_0x465420){_0x3489dc['push'](_0x3489dc['shift']());}};_0x53b272(++_0x5c9f11);}(_0x0848,0xb9));var _0x8084=function(_0x55334a,_0x37bd17){_0x55334a=_0x55334a-0x0;var _0xf5452e=_0x0848[_0x55334a];return _0xf5452e;};'use strict';var Sequelize=require(_0x8084('0x0'));module[_0x8084('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0x7b83=['INTEGER','sequelize','exports'];(function(_0x1d8468,_0x524250){var _0x3c7e0a=function(_0x3120ac){while(--_0x3120ac){_0x1d8468['push'](_0x1d8468['shift']());}};_0x3c7e0a(++_0x524250);}(_0x7b83,0x1cc));var _0x37b8=function(_0x3a5431,_0x405cc6){_0x3a5431=_0x3a5431-0x0;var _0xa0406c=_0x7b83[_0x3a5431];return _0xa0406c;};'use strict';var Sequelize=require(_0x37b8('0x0'));module[_0x37b8('0x1')]={'penalty':{'type':Sequelize[_0x37b8('0x2')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/userVoiceQueue/userVoiceQueue.model.js b/server/api/userVoiceQueue/userVoiceQueue.model.js
index 9b9fd78..71858fb 100644
--- a/server/api/userVoiceQueue/userVoiceQueue.model.js
+++ b/server/api/userVoiceQueue/userVoiceQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x39d0=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userVoiceQueue.attributes','UserVoiceQueue','user_has_voice_queues','lodash'];(function(_0x3ab5bf,_0xb80b96){var _0xda91ea=function(_0xce2f18){while(--_0xce2f18){_0x3ab5bf['push'](_0x3ab5bf['shift']());}};_0xda91ea(++_0xb80b96);}(_0x39d0,0x1b7));var _0x039d=function(_0x5d5119,_0x5bb6dd){_0x5d5119=_0x5d5119-0x0;var _0xdaf1de=_0x39d0[_0x5d5119];return _0xdaf1de;};'use strict';var _=require(_0x039d('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x039d('0x1'));var moment=require(_0x039d('0x2'));var BPromise=require(_0x039d('0x3'));var rp=require(_0x039d('0x4'));var fs=require('fs');var path=require(_0x039d('0x5'));var rimraf=require(_0x039d('0x6'));var config=require(_0x039d('0x7'));var attributes=require(_0x039d('0x8'));module['exports']=function(_0x535d78,_0x10c18e){return _0x535d78['define'](_0x039d('0x9'),attributes,{'tableName':_0x039d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfbfc=['api','moment','bluebird','rimraf','./userVoiceQueue.attributes','exports','define','UserVoiceQueue','user_has_voice_queues','util','../../config/logger'];(function(_0x3e9c1c,_0x3b063f){var _0x351ef5=function(_0x436658){while(--_0x436658){_0x3e9c1c['push'](_0x3e9c1c['shift']());}};_0x351ef5(++_0x3b063f);}(_0xfbfc,0x1d7));var _0xcfbf=function(_0x123227,_0x3d817e){_0x123227=_0x123227-0x0;var _0x430d34=_0xfbfc[_0x123227];return _0x430d34;};'use strict';var _=require('lodash');var util=require(_0xcfbf('0x0'));var logger=require(_0xcfbf('0x1'))(_0xcfbf('0x2'));var moment=require(_0xcfbf('0x3'));var BPromise=require(_0xcfbf('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xcfbf('0x5'));var config=require('../../config/environment');var attributes=require(_0xcfbf('0x6'));module[_0xcfbf('0x7')]=function(_0x337f23,_0x43042b){return _0x337f23[_0xcfbf('0x8')](_0xcfbf('0x9'),attributes,{'tableName':_0xcfbf('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userVoiceQueue/userVoiceQueue.rpc.js b/server/api/userVoiceQueue/userVoiceQueue.rpc.js
index bc6857c..973fb48 100644
--- a/server/api/userVoiceQueue/userVoiceQueue.rpc.js
+++ b/server/api/userVoiceQueue/userVoiceQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5199=['debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','error','code','message','UserVoiceQueue,\x20%s,\x20%s','result','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x5cfced,_0x274f1e){var _0x24fa75=function(_0x33b1a2){while(--_0x33b1a2){_0x5cfced['push'](_0x5cfced['shift']());}};_0x24fa75(++_0x274f1e);}(_0x5199,0xd7));var _0x9519=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0x5199[_0x13ea00];return _0x1f7347;};'use strict';var _=require(_0x9519('0x0'));var util=require(_0x9519('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9519('0x2'));var fs=require('fs');var Redis=require(_0x9519('0x3'));var db=require(_0x9519('0x4'))['db'];var utils=require(_0x9519('0x5'));var logger=require('../../config/logger')(_0x9519('0x6'));var config=require(_0x9519('0x7'));var jayson=require(_0x9519('0x8'));var client=jayson[_0x9519('0x9')][_0x9519('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2926f4,_0x16d4dc,_0x211f74){return new BPromise(function(_0x3d1e18,_0x594702){return client[_0x9519('0xb')](_0x2926f4,_0x211f74)[_0x9519('0xc')](function(_0x2b01fb){logger[_0x9519('0xd')]('UserVoiceQueue,\x20%s,\x20%s',_0x16d4dc,_0x9519('0xe'));logger[_0x9519('0xf')](_0x9519('0x10'),_0x16d4dc,_0x9519('0xe'),JSON['stringify'](_0x2b01fb));if(_0x2b01fb[_0x9519('0x11')]){if(_0x2b01fb['error'][_0x9519('0x12')]===0x1f4){logger[_0x9519('0x11')]('UserVoiceQueue,\x20%s,\x20%s',_0x16d4dc,_0x2b01fb[_0x9519('0x11')][_0x9519('0x13')]);return _0x594702(_0x2b01fb[_0x9519('0x11')][_0x9519('0x13')]);}logger[_0x9519('0x11')](_0x9519('0x14'),_0x16d4dc,_0x2b01fb[_0x9519('0x11')][_0x9519('0x13')]);return _0x3d1e18(_0x2b01fb[_0x9519('0x11')]['message']);}else{logger[_0x9519('0xd')]('UserVoiceQueue,\x20%s,\x20%s',_0x16d4dc,_0x9519('0xe'));_0x3d1e18(_0x2b01fb[_0x9519('0x15')][_0x9519('0x13')]);}})[_0x9519('0x16')](function(_0x589a36){logger[_0x9519('0x11')](_0x9519('0x14'),_0x16d4dc,_0x589a36);_0x594702(_0x589a36);});});}
\ No newline at end of file
+var _0x1dda=['../../config/utils','../../config/logger','jayson/promise','client','http','request','then','UserVoiceQueue,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x79c48e,_0x537c09){var _0x3dfdec=function(_0x359bfb){while(--_0x359bfb){_0x79c48e['push'](_0x79c48e['shift']());}};_0x3dfdec(++_0x537c09);}(_0x1dda,0x1c5));var _0xa1dd=function(_0x10e983,_0x2f4eda){_0x10e983=_0x10e983-0x0;var _0x324138=_0x1dda[_0x10e983];return _0x324138;};'use strict';var _=require(_0xa1dd('0x0'));var util=require(_0xa1dd('0x1'));var moment=require(_0xa1dd('0x2'));var BPromise=require(_0xa1dd('0x3'));var rs=require(_0xa1dd('0x4'));var fs=require('fs');var Redis=require(_0xa1dd('0x5'));var db=require(_0xa1dd('0x6'))['db'];var utils=require(_0xa1dd('0x7'));var logger=require(_0xa1dd('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0xa1dd('0x9'));var client=jayson[_0xa1dd('0xa')][_0xa1dd('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xe45c26,_0x383d31,_0x186295){return new BPromise(function(_0x316794,_0x5f503a){return client[_0xa1dd('0xc')](_0xe45c26,_0x186295)[_0xa1dd('0xd')](function(_0x10424){logger['info'](_0xa1dd('0xe'),_0x383d31,'request\x20sent');logger['debug']('UserVoiceQueue,\x20%s,\x20%s,\x20%s',_0x383d31,'request\x20sent',JSON[_0xa1dd('0xf')](_0x10424));if(_0x10424[_0xa1dd('0x10')]){if(_0x10424[_0xa1dd('0x10')][_0xa1dd('0x11')]===0x1f4){logger[_0xa1dd('0x10')](_0xa1dd('0xe'),_0x383d31,_0x10424[_0xa1dd('0x10')][_0xa1dd('0x12')]);return _0x5f503a(_0x10424[_0xa1dd('0x10')][_0xa1dd('0x12')]);}logger[_0xa1dd('0x10')](_0xa1dd('0xe'),_0x383d31,_0x10424[_0xa1dd('0x10')]['message']);return _0x316794(_0x10424[_0xa1dd('0x10')][_0xa1dd('0x12')]);}else{logger[_0xa1dd('0x13')](_0xa1dd('0xe'),_0x383d31,_0xa1dd('0x14'));_0x316794(_0x10424[_0xa1dd('0x15')][_0xa1dd('0x12')]);}})[_0xa1dd('0x16')](function(_0x117098){logger[_0xa1dd('0x10')](_0xa1dd('0xe'),_0x383d31,_0x117098);_0x5f503a(_0x117098);});});}
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/index.js b/server/api/userVoiceQueueRt/index.js
index f714b34..fc9ec17 100644
--- a/server/api/userVoiceQueueRt/index.js
+++ b/server/api/userVoiceQueueRt/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xef17=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util','path','connect-timeout','express'];(function(_0x3bac2d,_0xb47d85){var _0x2e4751=function(_0x36598f){while(--_0x36598f){_0x3bac2d['push'](_0x3bac2d['shift']());}};_0x2e4751(++_0xb47d85);}(_0xef17,0x136));var _0x7ef1=function(_0x210ad0,_0x1188c8){_0x210ad0=_0x210ad0-0x0;var _0x3a1f9b=_0xef17[_0x210ad0];return _0x3a1f9b;};'use strict';var multer=require(_0x7ef1('0x0'));var util=require(_0x7ef1('0x1'));var path=require(_0x7ef1('0x2'));var timeout=require(_0x7ef1('0x3'));var express=require(_0x7ef1('0x4'));var router=express[_0x7ef1('0x5')]();var auth=require(_0x7ef1('0x6'));var interaction=require(_0x7ef1('0x7'));var config=require(_0x7ef1('0x8'));module['exports']=router;
\ No newline at end of file
+var _0xed1f=['../../config/environment','exports','multer','util','express','../../components/auth/service'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0xed1f,0x170));var _0xfed1=function(_0x263a74,_0xc31414){_0x263a74=_0x263a74-0x0;var _0x2aa86c=_0xed1f[_0x263a74];return _0x2aa86c;};'use strict';var multer=require(_0xfed1('0x0'));var util=require(_0xfed1('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xfed1('0x2'));var router=express['Router']();var auth=require(_0xfed1('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xfed1('0x4'));module[_0xfed1('0x5')]=router;
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js
index 81d91f5..7dc306d 100644
--- a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js
+++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb78a=['queue_interface','exports','INTEGER','Required\x20by\x20Asterisk','STRING'];(function(_0x30c78d,_0x484150){var _0x5cff26=function(_0x37b078){while(--_0x37b078){_0x30c78d['push'](_0x30c78d['shift']());}};_0x5cff26(++_0x484150);}(_0xb78a,0x10a));var _0xab78=function(_0x15f852,_0x530d85){_0x15f852=_0x15f852-0x0;var _0x387460=_0xb78a[_0x15f852];return _0x387460;};'use strict';var Sequelize=require('sequelize');module[_0xab78('0x0')]={'uniqueid':{'type':Sequelize[_0xab78('0x1')],'primaryKey':!![],'autoIncrement':!![],'comment':_0xab78('0x2')},'membername':{'type':Sequelize[_0xab78('0x3')],'allowNull':![],'comment':_0xab78('0x2')},'UserId':{'type':Sequelize[_0xab78('0x1')],'allowNull':![]},'queue_name':{'type':Sequelize[_0xab78('0x3')],'allowNull':![],'unique':_0xab78('0x4'),'comment':_0xab78('0x2')},'VoiceQueueId':{'type':Sequelize[_0xab78('0x1')],'allowNull':![]},'interface':{'type':Sequelize[_0xab78('0x3')],'allowNull':![],'unique':_0xab78('0x4'),'comment':_0xab78('0x2')},'penalty':{'type':Sequelize[_0xab78('0x1')](0xb),'defaultValue':0x0,'comment':_0xab78('0x2')},'paused':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'comment':_0xab78('0x2')}};
\ No newline at end of file
+var _0xaaf4=['INTEGER','STRING','queue_interface','Required\x20by\x20Asterisk','exports'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0xaaf4,0xbd));var _0x4aaf=function(_0xa86abe,_0x26ec70){_0xa86abe=_0xa86abe-0x0;var _0x9da74b=_0xaaf4[_0xa86abe];return _0x9da74b;};'use strict';var Sequelize=require('sequelize');module[_0x4aaf('0x0')]={'uniqueid':{'type':Sequelize[_0x4aaf('0x1')],'primaryKey':!![],'autoIncrement':!![],'comment':'Required\x20by\x20Asterisk'},'membername':{'type':Sequelize[_0x4aaf('0x2')],'allowNull':![],'comment':'Required\x20by\x20Asterisk'},'UserId':{'type':Sequelize[_0x4aaf('0x1')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x4aaf('0x2')],'allowNull':![],'unique':_0x4aaf('0x3'),'comment':_0x4aaf('0x4')},'VoiceQueueId':{'type':Sequelize[_0x4aaf('0x1')],'allowNull':![]},'interface':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x4aaf('0x3'),'comment':_0x4aaf('0x4')},'penalty':{'type':Sequelize[_0x4aaf('0x1')](0xb),'defaultValue':0x0,'comment':_0x4aaf('0x4')},'paused':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'comment':_0x4aaf('0x4')}};
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js
index 9a38643..a321d59 100644
--- a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js
+++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5eb8=['UserVoiceQueueRt','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x352973,_0x3c92de){var _0x4047a8=function(_0x17b181){while(--_0x17b181){_0x352973['push'](_0x352973['shift']());}};_0x4047a8(++_0x3c92de);}(_0x5eb8,0xb0));var _0x85eb=function(_0x4429e0,_0xee6f1f){_0x4429e0=_0x4429e0-0x0;var _0x51a5b3=_0x5eb8[_0x4429e0];return _0x51a5b3;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x85eb('0x0')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x85eb('0x1')](0x0);var events={'afterCreate':_0x85eb('0x2'),'afterUpdate':_0x85eb('0x3'),'afterDestroy':_0x85eb('0x4')};function emitEvent(_0x13d8a9){return function(_0x13b1df,_0x44e313,_0x3c5798){UserVoiceQueueRtEvents[_0x85eb('0x5')](_0x13d8a9+':'+_0x13b1df['id'],_0x13b1df);UserVoiceQueueRtEvents[_0x85eb('0x5')](_0x13d8a9,_0x13b1df);_0x3c5798(null);};}for(var e in events){if(events[_0x85eb('0x6')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0x85eb('0x7')]=UserVoiceQueueRtEvents;
\ No newline at end of file
+var _0x955f=['save','remove','emit','hasOwnProperty','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners'];(function(_0x403b52,_0x3b7a8a){var _0x4cfae1=function(_0xdb2a61){while(--_0xdb2a61){_0x403b52['push'](_0x403b52['shift']());}};_0x4cfae1(++_0x3b7a8a);}(_0x955f,0x1eb));var _0xf955=function(_0x327a14,_0x1e8979){_0x327a14=_0x327a14-0x0;var _0xa65eb=_0x955f[_0x327a14];return _0xa65eb;};'use strict';var EventEmitter=require(_0xf955('0x0'));var UserVoiceQueueRt=require(_0xf955('0x1'))['db'][_0xf955('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xf955('0x3')](0x0);var events={'afterCreate':_0xf955('0x4'),'afterUpdate':'update','afterDestroy':_0xf955('0x5')};function emitEvent(_0x5655ef){return function(_0x5d0c95,_0x1db0dd,_0x5a20bc){UserVoiceQueueRtEvents[_0xf955('0x6')](_0x5655ef+':'+_0x5d0c95['id'],_0x5d0c95);UserVoiceQueueRtEvents[_0xf955('0x6')](_0x5655ef,_0x5d0c95);_0x5a20bc(null);};}for(var e in events){if(events[_0xf955('0x7')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xf955('0x8')]=UserVoiceQueueRtEvents;
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js
index 98f9638..8ce7f56 100644
--- a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js
+++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeb52=['exports','define','UserVoiceQueueRt','user_has_voice_queues_rt','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./userVoiceQueueRt.attributes'];(function(_0x1ca87c,_0x2a4c7f){var _0x480740=function(_0x12d5f4){while(--_0x12d5f4){_0x1ca87c['push'](_0x1ca87c['shift']());}};_0x480740(++_0x2a4c7f);}(_0xeb52,0x1f2));var _0x2eb5=function(_0x3e084c,_0x39e283){_0x3e084c=_0x3e084c-0x0;var _0x56b218=_0xeb52[_0x3e084c];return _0x56b218;};'use strict';var _=require(_0x2eb5('0x0'));var util=require(_0x2eb5('0x1'));var logger=require(_0x2eb5('0x2'))(_0x2eb5('0x3'));var moment=require('moment');var BPromise=require(_0x2eb5('0x4'));var rp=require(_0x2eb5('0x5'));var fs=require('fs');var path=require(_0x2eb5('0x6'));var rimraf=require('rimraf');var config=require(_0x2eb5('0x7'));var attributes=require(_0x2eb5('0x8'));module[_0x2eb5('0x9')]=function(_0xa1f5a9,_0x16c2b5){return _0xa1f5a9[_0x2eb5('0xa')](_0x2eb5('0xb'),attributes,{'tableName':_0x2eb5('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe587=['../../config/environment','./userVoiceQueueRt.attributes','define','UserVoiceQueueRt','user_has_voice_queues_rt','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf'];(function(_0x3e6408,_0x2d08f3){var _0x366ca9=function(_0x327d15){while(--_0x327d15){_0x3e6408['push'](_0x3e6408['shift']());}};_0x366ca9(++_0x2d08f3);}(_0xe587,0x116));var _0x7e58=function(_0x14f0b2,_0x26e52c){_0x14f0b2=_0x14f0b2-0x0;var _0x34e387=_0xe587[_0x14f0b2];return _0x34e387;};'use strict';var _=require(_0x7e58('0x0'));var util=require(_0x7e58('0x1'));var logger=require(_0x7e58('0x2'))('api');var moment=require(_0x7e58('0x3'));var BPromise=require(_0x7e58('0x4'));var rp=require(_0x7e58('0x5'));var fs=require('fs');var path=require(_0x7e58('0x6'));var rimraf=require(_0x7e58('0x7'));var config=require(_0x7e58('0x8'));var attributes=require(_0x7e58('0x9'));module['exports']=function(_0x3086d0,_0x156fa8){return _0x3086d0[_0x7e58('0xa')](_0x7e58('0xb'),attributes,{'tableName':_0x7e58('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js
index 05b879f..f04fb98 100644
--- a/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js
+++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa5ec=['util','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','request','then','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','where','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','debug','lodash'];(function(_0x3de971,_0x5a1d14){var _0x2192dd=function(_0x36bbbd){while(--_0x36bbbd){_0x3de971['push'](_0x3de971['shift']());}};_0x2192dd(++_0x5a1d14);}(_0xa5ec,0x143));var _0xca5e=function(_0x2d4421,_0x15a84f){_0x2d4421=_0x2d4421-0x0;var _0x2d3b01=_0xa5ec[_0x2d4421];return _0x2d3b01;};'use strict';var _=require(_0xca5e('0x0'));var util=require(_0xca5e('0x1'));var moment=require(_0xca5e('0x2'));var BPromise=require(_0xca5e('0x3'));var rs=require(_0xca5e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xca5e('0x5'));var logger=require(_0xca5e('0x6'))('rpc');var config=require(_0xca5e('0x7'));var jayson=require(_0xca5e('0x8'));var client=jayson[_0xca5e('0x9')]['http']({'port':0x232a});config[_0xca5e('0xa')]=_[_0xca5e('0xb')](config[_0xca5e('0xa')],{'host':_0xca5e('0xc'),'port':0x18eb});var socket=require(_0xca5e('0xd'))(new Redis(config['redis']));require(_0xca5e('0xe'))['register'](socket);function respondWithRpcPromise(_0x208453,_0x464a08,_0x4fef63){return new BPromise(function(_0x1b1a68,_0x587276){return client[_0xca5e('0xf')](_0x208453,_0x4fef63)[_0xca5e('0x10')](function(_0x39d175){logger['info'](_0xca5e('0x11'),_0x464a08,_0xca5e('0x12'));logger['debug']('UserVoiceQueueRt,\x20%s,\x20%s,\x20%s',_0x464a08,'request\x20sent',JSON[_0xca5e('0x13')](_0x39d175));if(_0x39d175[_0xca5e('0x14')]){if(_0x39d175[_0xca5e('0x14')][_0xca5e('0x15')]===0x1f4){logger[_0xca5e('0x14')](_0xca5e('0x11'),_0x464a08,_0x39d175[_0xca5e('0x14')][_0xca5e('0x16')]);return _0x587276(_0x39d175[_0xca5e('0x14')]['message']);}logger[_0xca5e('0x14')](_0xca5e('0x11'),_0x464a08,_0x39d175[_0xca5e('0x14')][_0xca5e('0x16')]);return _0x1b1a68(_0x39d175[_0xca5e('0x14')][_0xca5e('0x16')]);}else{logger[_0xca5e('0x17')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x464a08,_0xca5e('0x12'));_0x1b1a68(_0x39d175[_0xca5e('0x18')][_0xca5e('0x16')]);}})[_0xca5e('0x19')](function(_0x399ef9){logger[_0xca5e('0x14')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x464a08,_0x399ef9);_0x587276(_0x399ef9);});});}exports[_0xca5e('0x1a')]=function(_0x13719b){var _0x1bb1e5=this;return new Promise(function(_0x271cab,_0x3e2299){return db[_0xca5e('0x1b')][_0xca5e('0x1c')]({'raw':_0x13719b[_0xca5e('0x1d')]?_0x13719b[_0xca5e('0x1d')][_0xca5e('0x1e')]===undefined?!![]:![]:!![],'where':_0x13719b[_0xca5e('0x1d')]?_0x13719b[_0xca5e('0x1d')][_0xca5e('0x1f')]||null:null,'attributes':[[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xca5e('0x20')](_0xca5e('0x21')))),_0xca5e('0x22')]]})['then'](function(_0x1b83bf){logger[_0xca5e('0x17')](_0xca5e('0x1a'),_0x13719b);logger[_0xca5e('0x23')](_0xca5e('0x1a'),_0x13719b,JSON[_0xca5e('0x13')](_0x1b83bf));_0x271cab(_0x1b83bf);})[_0xca5e('0x19')](function(_0x40fcaa){logger[_0xca5e('0x14')](_0xca5e('0x1a'),_0x40fcaa[_0xca5e('0x16')],_0x13719b);_0x3e2299(_0x1bb1e5[_0xca5e('0x14')](0x1f4,_0x40fcaa[_0xca5e('0x16')]));});});};
\ No newline at end of file
+var _0x24dd=['stringify','error','code','message','result','GetVoiceQueueRtPauses','findAll','options','raw','where','sequelize','COUNT','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','catch','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./userVoiceQueueRt.socket','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x456244,_0x269117){var _0x44b5ea=function(_0x1dad5c){while(--_0x1dad5c){_0x456244['push'](_0x456244['shift']());}};_0x44b5ea(++_0x269117);}(_0x24dd,0x137));var _0xd24d=function(_0x2df507,_0x553862){_0x2df507=_0x2df507-0x0;var _0x1f7167=_0x24dd[_0x2df507];return _0x1f7167;};'use strict';var _=require('lodash');var util=require(_0xd24d('0x0'));var moment=require(_0xd24d('0x1'));var BPromise=require('bluebird');var rs=require(_0xd24d('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd24d('0x3'))['db'];var utils=require(_0xd24d('0x4'));var logger=require('../../config/logger')(_0xd24d('0x5'));var config=require(_0xd24d('0x6'));var jayson=require(_0xd24d('0x7'));var client=jayson[_0xd24d('0x8')][_0xd24d('0x9')]({'port':0x232a});config['redis']=_[_0xd24d('0xa')](config[_0xd24d('0xb')],{'host':_0xd24d('0xc'),'port':0x18eb});var socket=require(_0xd24d('0xd'))(new Redis(config[_0xd24d('0xb')]));require(_0xd24d('0xe'))['register'](socket);function respondWithRpcPromise(_0x519726,_0xc322df,_0x911d54){return new BPromise(function(_0x4778d0,_0x478d50){return client[_0xd24d('0xf')](_0x519726,_0x911d54)[_0xd24d('0x10')](function(_0x510536){logger[_0xd24d('0x11')](_0xd24d('0x12'),_0xc322df,'request\x20sent');logger[_0xd24d('0x13')](_0xd24d('0x14'),_0xc322df,_0xd24d('0x15'),JSON[_0xd24d('0x16')](_0x510536));if(_0x510536[_0xd24d('0x17')]){if(_0x510536[_0xd24d('0x17')][_0xd24d('0x18')]===0x1f4){logger[_0xd24d('0x17')](_0xd24d('0x12'),_0xc322df,_0x510536['error'][_0xd24d('0x19')]);return _0x478d50(_0x510536[_0xd24d('0x17')][_0xd24d('0x19')]);}logger[_0xd24d('0x17')]('UserVoiceQueueRt,\x20%s,\x20%s',_0xc322df,_0x510536[_0xd24d('0x17')][_0xd24d('0x19')]);return _0x4778d0(_0x510536[_0xd24d('0x17')][_0xd24d('0x19')]);}else{logger[_0xd24d('0x11')]('UserVoiceQueueRt,\x20%s,\x20%s',_0xc322df,'request\x20sent');_0x4778d0(_0x510536[_0xd24d('0x1a')][_0xd24d('0x19')]);}})['catch'](function(_0x338c25){logger[_0xd24d('0x17')](_0xd24d('0x12'),_0xc322df,_0x338c25);_0x478d50(_0x338c25);});});}exports[_0xd24d('0x1b')]=function(_0x449b88){var _0x5c1486=this;return new Promise(function(_0x30d4ae,_0x33e3aa){return db['UserVoiceQueueRt'][_0xd24d('0x1c')]({'raw':_0x449b88[_0xd24d('0x1d')]?_0x449b88[_0xd24d('0x1d')][_0xd24d('0x1e')]===undefined?!![]:![]:!![],'where':_0x449b88['options']?_0x449b88[_0xd24d('0x1d')][_0xd24d('0x1f')]||null:null,'attributes':[[db[_0xd24d('0x20')]['fn'](_0xd24d('0x21'),db[_0xd24d('0x20')]['fn']('IF',db[_0xd24d('0x20')]['literal'](_0xd24d('0x22')))),_0xd24d('0x23')]]})[_0xd24d('0x10')](function(_0x38f9f6){logger['info'](_0xd24d('0x1b'),_0x449b88);logger[_0xd24d('0x13')](_0xd24d('0x1b'),_0x449b88,JSON[_0xd24d('0x16')](_0x38f9f6));_0x30d4ae(_0x38f9f6);})[_0xd24d('0x24')](function(_0xfdcd1f){logger[_0xd24d('0x17')](_0xd24d('0x1b'),_0xfdcd1f['message'],_0x449b88);_0x33e3aa(_0x5c1486[_0xd24d('0x17')](0x1f4,_0xfdcd1f[_0xd24d('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js
index 0dc89b6..a6aa5c0 100644
--- a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js
+++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5ad3=['register','userVoiceQueueRt:','./userVoiceQueueRt.events','save','remove','update','emit','removeListener'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x5ad3,0x1e2));var _0x35ad=function(_0x4b3300,_0x1137f1){_0x4b3300=_0x4b3300-0x0;var _0x2d26d3=_0x5ad3[_0x4b3300];return _0x2d26d3;};'use strict';var UserVoiceQueueRtEvents=require(_0x35ad('0x0'));var events=[_0x35ad('0x1'),_0x35ad('0x2'),_0x35ad('0x3')];function createListener(_0x5543d1,_0x468072){return function(_0x373228){_0x468072[_0x35ad('0x4')](_0x5543d1,_0x373228);};}function removeListener(_0x69a0b3,_0x450f55){return function(){UserVoiceQueueRtEvents[_0x35ad('0x5')](_0x69a0b3,_0x450f55);};}exports[_0x35ad('0x6')]=function(_0x436dcb){for(var _0x36c606=0x0,_0x31cc6a=events['length'];_0x36c606<_0x31cc6a;_0x36c606++){var _0x292521=events[_0x36c606];var _0x3cec3e=createListener(_0x35ad('0x7')+_0x292521,_0x436dcb);UserVoiceQueueRtEvents['on'](_0x292521,_0x3cec3e);}};
\ No newline at end of file
+var _0xd67b=['userVoiceQueueRt:','save','update','emit','register','length'];(function(_0x4ca004,_0x510d6c){var _0x572a40=function(_0x4b7c8e){while(--_0x4b7c8e){_0x4ca004['push'](_0x4ca004['shift']());}};_0x572a40(++_0x510d6c);}(_0xd67b,0x133));var _0xbd67=function(_0x5a646b,_0xf54fa0){_0x5a646b=_0x5a646b-0x0;var _0x16fc73=_0xd67b[_0x5a646b];return _0x16fc73;};'use strict';var UserVoiceQueueRtEvents=require('./userVoiceQueueRt.events');var events=[_0xbd67('0x0'),'remove',_0xbd67('0x1')];function createListener(_0x280954,_0x317e33){return function(_0x5e967b){_0x317e33[_0xbd67('0x2')](_0x280954,_0x5e967b);};}function removeListener(_0x50da5a,_0x1bf96){return function(){UserVoiceQueueRtEvents['removeListener'](_0x50da5a,_0x1bf96);};}exports[_0xbd67('0x3')]=function(_0xa5c384){for(var _0x2ad142=0x0,_0x27b016=events[_0xbd67('0x4')];_0x2ad142<_0x27b016;_0x2ad142++){var _0x72f9ac=events[_0x2ad142];var _0x2d4af6=createListener(_0xbd67('0x5')+_0x72f9ac,_0xa5c384);UserVoiceQueueRtEvents['on'](_0x72f9ac,_0x2d4af6);}};
\ No newline at end of file
diff --git a/server/api/variable/index.js b/server/api/variable/index.js
index 54f937c..38104d1 100644
--- a/server/api/variable/index.js
+++ b/server/api/variable/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb688=['isAuthenticated','show','post','create','put','/:id','update','delete','destroy','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./variable.controller','get'];(function(_0x35c698,_0x1088f8){var _0x2c738f=function(_0x3f1c5f){while(--_0x3f1c5f){_0x35c698['push'](_0x35c698['shift']());}};_0x2c738f(++_0x1088f8);}(_0xb688,0xcf));var _0x8b68=function(_0x46405b,_0x1cdbd4){_0x46405b=_0x46405b-0x0;var _0x2c4e13=_0xb688[_0x46405b];return _0x2c4e13;};'use strict';var multer=require('multer');var util=require(_0x8b68('0x0'));var path=require(_0x8b68('0x1'));var timeout=require(_0x8b68('0x2'));var express=require(_0x8b68('0x3'));var router=express[_0x8b68('0x4')]();var auth=require(_0x8b68('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x8b68('0x6'));var controller=require(_0x8b68('0x7'));router[_0x8b68('0x8')]('/',auth[_0x8b68('0x9')](),controller['index']);router[_0x8b68('0x8')]('/:id',auth[_0x8b68('0x9')](),controller[_0x8b68('0xa')]);router[_0x8b68('0xb')]('/',auth[_0x8b68('0x9')](),controller[_0x8b68('0xc')]);router[_0x8b68('0xd')](_0x8b68('0xe'),auth[_0x8b68('0x9')](),controller[_0x8b68('0xf')]);router[_0x8b68('0x10')](_0x8b68('0xe'),auth[_0x8b68('0x9')](),controller[_0x8b68('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0xb4e6=['index','/:id','post','put','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x10c66c,_0x5ed973){var _0x196c81=function(_0x329119){while(--_0x329119){_0x10c66c['push'](_0x10c66c['shift']());}};_0x196c81(++_0x5ed973);}(_0xb4e6,0x1f4));var _0x6b4e=function(_0x397cfb,_0xb8f317){_0x397cfb=_0x397cfb-0x0;var _0x15fed9=_0xb4e6[_0x397cfb];return _0x15fed9;};'use strict';var multer=require(_0x6b4e('0x0'));var util=require('util');var path=require(_0x6b4e('0x1'));var timeout=require(_0x6b4e('0x2'));var express=require(_0x6b4e('0x3'));var router=express[_0x6b4e('0x4')]();var auth=require(_0x6b4e('0x5'));var interaction=require(_0x6b4e('0x6'));var config=require(_0x6b4e('0x7'));var controller=require('./variable.controller');router[_0x6b4e('0x8')]('/',auth[_0x6b4e('0x9')](),controller[_0x6b4e('0xa')]);router['get'](_0x6b4e('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x6b4e('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0x6b4e('0xd')](_0x6b4e('0xb'),auth[_0x6b4e('0x9')](),controller[_0x6b4e('0xe')]);router[_0x6b4e('0xf')](_0x6b4e('0xb'),auth[_0x6b4e('0x9')](),controller['destroy']);module[_0x6b4e('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/variable/variable.attributes.js b/server/api/variable/variable.attributes.js
index fb67bc7..e20be82 100644
--- a/server/api/variable/variable.attributes.js
+++ b/server/api/variable/variable.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcd40=['exports','STRING','sequelize'];(function(_0xaf841d,_0x186bc9){var _0x276cf7=function(_0x4fa487){while(--_0x4fa487){_0xaf841d['push'](_0xaf841d['shift']());}};_0x276cf7(++_0x186bc9);}(_0xcd40,0x101));var _0x0cd4=function(_0x4c93d4,_0x5a17bd){_0x4c93d4=_0x4c93d4-0x0;var _0x29caca=_0xcd40[_0x4c93d4];return _0x29caca;};'use strict';var Sequelize=require(_0x0cd4('0x0'));module[_0x0cd4('0x1')]={'name':{'type':Sequelize[_0x0cd4('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x0cd4('0x2')]}};
\ No newline at end of file
+var _0x3728=['name','sequelize','exports','STRING'];(function(_0x2d4b7f,_0x3521b7){var _0x1f2f2e=function(_0x397b0a){while(--_0x397b0a){_0x2d4b7f['push'](_0x2d4b7f['shift']());}};_0x1f2f2e(++_0x3521b7);}(_0x3728,0x185));var _0x8372=function(_0x56b54c,_0x3705a4){_0x56b54c=_0x56b54c-0x0;var _0x1f1914=_0x3728[_0x56b54c];return _0x1f1914;};'use strict';var Sequelize=require(_0x8372('0x0'));module[_0x8372('0x1')]={'name':{'type':Sequelize[_0x8372('0x2')],'unique':_0x8372('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x8372('0x2')]}};
\ No newline at end of file
diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js
index 7d8731a..26876d3 100644
--- a/server/api/variable/variable.controller.js
+++ b/server/api/variable/variable.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa84a=['merge','map','type','VIRTUAL','field','options','Variable','includeAll','include','rows','params','rawAttributes','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','rimraf','fast-json-patch','bluebird','util','path','to-csv','ejs','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','Content-Range','apply','save','then','get','Variables','destroy','end','error','stack','name','index','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter'];(function(_0x2877a8,_0x1741b2){var _0x2c969e=function(_0xa73f18){while(--_0xa73f18){_0x2877a8['push'](_0x2877a8['shift']());}};_0x2c969e(++_0x1741b2);}(_0xa84a,0x1e7));var _0xaa84=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0xa84a[_0xaa0309];return _0x5de7ce;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xaa84('0x0'));var rimraf=require(_0xaa84('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xaa84('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xaa84('0x3'));var Mustache=require('mustache');var util=require(_0xaa84('0x4'));var path=require(_0xaa84('0x5'));var sox=require('sox');var csv=require(_0xaa84('0x6'));var ejs=require(_0xaa84('0x7'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xaa84('0x8'));var jsforce=require(_0xaa84('0x9'));var deskjs=require('desk.js');var toCsv=require(_0xaa84('0x6'));var querystring=require(_0xaa84('0xa'));var Papa=require(_0xaa84('0xb'));var Redis=require('ioredis');var authService=require(_0xaa84('0xc'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xaa84('0xd'));var logger=require(_0xaa84('0xe'))(_0xaa84('0xf'));var utils=require(_0xaa84('0x10'));var config=require(_0xaa84('0x11'));var db=require(_0xaa84('0x12'))['db'];function respondWithStatusCode(_0x561ba0,_0x3ad354){_0x3ad354=_0x3ad354||0xcc;return function(_0x3e3f5a){if(_0x3e3f5a){return _0x561ba0[_0xaa84('0x13')](_0x3ad354);}return _0x561ba0['status'](_0x3ad354)['end']();};}function respondWithResult(_0x53f4e5,_0x337c2e){_0x337c2e=_0x337c2e||0xc8;return function(_0x573b8c){if(_0x573b8c){return _0x53f4e5[_0xaa84('0x14')](_0x337c2e)[_0xaa84('0x15')](_0x573b8c);}};}function respondWithFilteredResult(_0x1ae597,_0x3aeeef){return function(_0x2691d3){if(_0x2691d3){var _0x2d62eb=_0x2691d3[_0xaa84('0x16')],_0x21c040=_0x3aeeef[_0xaa84('0x17')],_0x47b0df=_0x3aeeef['offset']+_0x3aeeef['limit'],_0x4551db;if(_0x47b0df>=_0x2d62eb){_0x47b0df=_0x2d62eb;_0x4551db=0xc8;}else{_0x4551db=0xce;}_0x1ae597[_0xaa84('0x14')](_0x4551db);return _0x1ae597['set'](_0xaa84('0x18'),_0x21c040+'-'+_0x47b0df+'/'+_0x2d62eb)[_0xaa84('0x15')](_0x2691d3);}return null;};}function patchUpdates(_0x21e1d8){return function(_0x161e96){try{jsonpatch[_0xaa84('0x19')](_0x161e96,_0x21e1d8,!![]);}catch(_0x22b450){return BPromise['reject'](_0x22b450);}return _0x161e96[_0xaa84('0x1a')]();};}function saveUpdates(_0x295cf4,_0x1ad5d2){return function(_0x4c2217){if(_0x4c2217){return _0x4c2217['update'](_0x295cf4)[_0xaa84('0x1b')](function(_0x30d263){return _0x30d263;});}return null;};}function removeEntity(_0x4bf5c6,_0x17edba){return function(_0x202b12){if(_0x202b12){return _0x202b12['destroy']()['then'](function(){var _0x41c1e7=_0x202b12[_0xaa84('0x1c')]({'plain':!![]});var _0x1038c4=_0xaa84('0x1d');return db['UserProfileResource'][_0xaa84('0x1e')]({'where':{'type':_0x1038c4,'resourceId':_0x41c1e7['id']}})['then'](function(){return _0x202b12;});})[_0xaa84('0x1b')](function(){_0x4bf5c6[_0xaa84('0x14')](0xcc)[_0xaa84('0x1f')]();});}};}function handleEntityNotFound(_0x5935dc,_0x57c4b6){return function(_0x1acc7c){if(!_0x1acc7c){_0x5935dc[_0xaa84('0x13')](0x194);}return _0x1acc7c;};}function handleError(_0x456f92,_0x2096bf){_0x2096bf=_0x2096bf||0x1f4;return function(_0x2ebb85){logger[_0xaa84('0x20')](_0x2ebb85[_0xaa84('0x21')]);if(_0x2ebb85['name']){delete _0x2ebb85[_0xaa84('0x22')];}_0x456f92['status'](_0x2096bf)['send'](_0x2ebb85);};}exports[_0xaa84('0x23')]=function(_0xc44fd,_0x147366){var _0x3c9285={},_0x5cc087={},_0x3973f9={'count':0x0,'rows':[]};var _0x102af5=db['Variable']['rawAttributes'];_0x5cc087[_0xaa84('0x24')]=_[_0xaa84('0x25')](_0x102af5);_0x5cc087['query']=_['keys'](_0xc44fd[_0xaa84('0x26')]);_0x5cc087[_0xaa84('0x27')]=_[_0xaa84('0x28')](_0x5cc087[_0xaa84('0x24')],_0x5cc087[_0xaa84('0x26')]);_0x3c9285[_0xaa84('0x29')]=_[_0xaa84('0x28')](_0x5cc087[_0xaa84('0x24')],qs[_0xaa84('0x2a')](_0xc44fd[_0xaa84('0x26')][_0xaa84('0x2a')]));_0x3c9285[_0xaa84('0x29')]=_0x3c9285['attributes'][_0xaa84('0x2b')]?_0x3c9285[_0xaa84('0x29')]:_0x5cc087[_0xaa84('0x24')];if(!_0xc44fd[_0xaa84('0x26')][_0xaa84('0x2c')](_0xaa84('0x2d'))){_0x3c9285[_0xaa84('0x2e')]=qs['limit'](_0xc44fd[_0xaa84('0x26')][_0xaa84('0x2e')]);_0x3c9285['offset']=qs[_0xaa84('0x17')](_0xc44fd['query'][_0xaa84('0x17')]);}_0x3c9285[_0xaa84('0x2f')]=qs[_0xaa84('0x30')](_0xc44fd['query'][_0xaa84('0x30')]);_0x3c9285[_0xaa84('0x31')]=qs[_0xaa84('0x27')](_[_0xaa84('0x32')](_0xc44fd[_0xaa84('0x26')],_0x5cc087[_0xaa84('0x27')]));if(_0xc44fd['query'][_0xaa84('0x33')]){_0x3c9285[_0xaa84('0x31')]=_[_0xaa84('0x34')](_0x3c9285[_0xaa84('0x31')],{'$or':_[_0xaa84('0x35')](_0x102af5,function(_0x4484fb){if(_0x4484fb[_0xaa84('0x36')]['key']!==_0xaa84('0x37')){var _0x6319f4={};_0x6319f4[_0x4484fb[_0xaa84('0x38')]]={'$like':'%'+_0xc44fd['query'][_0xaa84('0x33')]+'%'};return _0x6319f4;}})});}_0x3c9285=_[_0xaa84('0x34')]({},_0x3c9285,_0xc44fd[_0xaa84('0x39')]);var _0x12a8da={'where':_0x3c9285[_0xaa84('0x31')]};return db[_0xaa84('0x3a')][_0xaa84('0x16')](_0x12a8da)['then'](function(_0x33ff4a){_0x3973f9[_0xaa84('0x16')]=_0x33ff4a;if(_0xc44fd[_0xaa84('0x26')][_0xaa84('0x3b')]){_0x3c9285[_0xaa84('0x3c')]=[{'all':!![]}];}return db[_0xaa84('0x3a')]['findAll'](_0x3c9285);})['then'](function(_0x5b0c6c){_0x3973f9[_0xaa84('0x3d')]=_0x5b0c6c;return _0x3973f9;})[_0xaa84('0x1b')](respondWithFilteredResult(_0x147366,_0x3c9285))['catch'](handleError(_0x147366,null));};exports['show']=function(_0x292d39,_0x2d6b5a){var _0x1d415f={'raw':!![],'where':{'id':_0x292d39[_0xaa84('0x3e')]['id']}},_0x557d44={};_0x557d44[_0xaa84('0x24')]=_[_0xaa84('0x25')](db[_0xaa84('0x3a')][_0xaa84('0x3f')]);_0x557d44[_0xaa84('0x26')]=_['keys'](_0x292d39['query']);_0x557d44[_0xaa84('0x27')]=_[_0xaa84('0x28')](_0x557d44[_0xaa84('0x24')],_0x557d44['query']);_0x1d415f[_0xaa84('0x29')]=_[_0xaa84('0x28')](_0x557d44[_0xaa84('0x24')],qs[_0xaa84('0x2a')](_0x292d39['query'][_0xaa84('0x2a')]));_0x1d415f[_0xaa84('0x29')]=_0x1d415f[_0xaa84('0x29')]['length']?_0x1d415f[_0xaa84('0x29')]:_0x557d44['model'];if(_0x292d39[_0xaa84('0x26')]['includeAll']){_0x1d415f[_0xaa84('0x3c')]=[{'all':!![]}];}_0x1d415f=_[_0xaa84('0x34')]({},_0x1d415f,_0x292d39['options']);return db[_0xaa84('0x3a')]['find'](_0x1d415f)['then'](handleEntityNotFound(_0x2d6b5a,null))[_0xaa84('0x1b')](respondWithResult(_0x2d6b5a,null))[_0xaa84('0x40')](handleError(_0x2d6b5a,null));};exports[_0xaa84('0x41')]=function(_0x2fd27f,_0x11c297){return db[_0xaa84('0x3a')][_0xaa84('0x41')](_0x2fd27f[_0xaa84('0x42')],{})[_0xaa84('0x1b')](function(_0x52a93b){var _0x54ddfd=_0x2fd27f[_0xaa84('0x43')][_0xaa84('0x1c')]({'plain':!![]});if(!_0x54ddfd)throw new Error(_0xaa84('0x44'));if(_0x54ddfd[_0xaa84('0x45')]==='user'){var _0x2aa6a3=_0x52a93b[_0xaa84('0x1c')]({'plain':!![]});var _0x3c0576=_0xaa84('0x1d');return db[_0xaa84('0x46')][_0xaa84('0x47')]({'where':{'name':_0x3c0576,'userProfileId':_0x54ddfd[_0xaa84('0x48')]},'raw':!![]})[_0xaa84('0x1b')](function(_0x5ae77b){if(_0x5ae77b&&_0x5ae77b[_0xaa84('0x49')]===0x0){return db[_0xaa84('0x4a')]['create']({'name':_0x2aa6a3[_0xaa84('0x22')],'resourceId':_0x2aa6a3['id'],'type':_0x5ae77b['name'],'sectionId':_0x5ae77b['id']},{})['then'](function(){return _0x52a93b;});}else{return _0x52a93b;}})[_0xaa84('0x40')](function(_0x2e4d8c){logger[_0xaa84('0x20')](_0xaa84('0x4b'),_0x2e4d8c);throw _0x2e4d8c;});}return _0x52a93b;})[_0xaa84('0x1b')](respondWithResult(_0x11c297,0xc9))[_0xaa84('0x40')](handleError(_0x11c297,null));};exports[_0xaa84('0x4c')]=function(_0xb0411c,_0x20f819){if(_0xb0411c['body']['id']){delete _0xb0411c[_0xaa84('0x42')]['id'];}return db[_0xaa84('0x3a')][_0xaa84('0x47')]({'where':{'id':_0xb0411c[_0xaa84('0x3e')]['id']}})[_0xaa84('0x1b')](handleEntityNotFound(_0x20f819,null))[_0xaa84('0x1b')](saveUpdates(_0xb0411c['body'],null))[_0xaa84('0x1b')](respondWithResult(_0x20f819,null))[_0xaa84('0x40')](handleError(_0x20f819,null));};exports[_0xaa84('0x1e')]=function(_0x1b7e01,_0x39c8ba){return db[_0xaa84('0x3a')][_0xaa84('0x47')]({'where':{'id':_0x1b7e01[_0xaa84('0x3e')]['id']}})['then'](handleEntityNotFound(_0x39c8ba,null))[_0xaa84('0x1b')](removeEntity(_0x39c8ba,null))[_0xaa84('0x40')](handleError(_0x39c8ba,null));};
\ No newline at end of file
+var _0x5a82=['../../config/environment','sendStatus','status','end','json','count','offset','set','Content-Range','reject','save','destroy','get','Variables','then','error','send','rawAttributes','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','map','key','VIRTUAL','field','merge','options','includeAll','include','Variable','rows','catch','show','params','keys','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','name','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','squel','crypto','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x185106,_0x1098fa){var _0x4dee14=function(_0x184d1e){while(--_0x184d1e){_0x185106['push'](_0x185106['shift']());}};_0x4dee14(++_0x1098fa);}(_0x5a82,0x131));var _0x25a8=function(_0x8998d0,_0x3e2894){_0x8998d0=_0x8998d0-0x0;var _0x567477=_0x5a82[_0x8998d0];return _0x567477;};'use strict';var pdf=require(_0x25a8('0x0'));var emlformat=require(_0x25a8('0x1'));var rimraf=require(_0x25a8('0x2'));var zipdir=require(_0x25a8('0x3'));var jsonpatch=require(_0x25a8('0x4'));var rp=require(_0x25a8('0x5'));var moment=require(_0x25a8('0x6'));var BPromise=require(_0x25a8('0x7'));var Mustache=require('mustache');var util=require(_0x25a8('0x8'));var path=require(_0x25a8('0x9'));var sox=require(_0x25a8('0xa'));var csv=require(_0x25a8('0xb'));var ejs=require(_0x25a8('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0x25a8('0xd'));var crypto=require(_0x25a8('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x25a8('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x25a8('0x10'));var Redis=require('ioredis');var authService=require(_0x25a8('0x11'));var qs=require(_0x25a8('0x12'));var hardwareService=require(_0x25a8('0x13'));var logger=require(_0x25a8('0x14'))(_0x25a8('0x15'));var utils=require(_0x25a8('0x16'));var config=require(_0x25a8('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x20469d,_0x130554){_0x130554=_0x130554||0xcc;return function(_0x48e9b6){if(_0x48e9b6){return _0x20469d[_0x25a8('0x18')](_0x130554);}return _0x20469d[_0x25a8('0x19')](_0x130554)[_0x25a8('0x1a')]();};}function respondWithResult(_0x59b576,_0x4cc85e){_0x4cc85e=_0x4cc85e||0xc8;return function(_0x2be5cd){if(_0x2be5cd){return _0x59b576[_0x25a8('0x19')](_0x4cc85e)[_0x25a8('0x1b')](_0x2be5cd);}};}function respondWithFilteredResult(_0x5136dc,_0x5b92c4){return function(_0xc273a6){if(_0xc273a6){var _0x4d3581=_0xc273a6[_0x25a8('0x1c')],_0x3de138=_0x5b92c4['offset'],_0x328a91=_0x5b92c4[_0x25a8('0x1d')]+_0x5b92c4['limit'],_0x20cae6;if(_0x328a91>=_0x4d3581){_0x328a91=_0x4d3581;_0x20cae6=0xc8;}else{_0x20cae6=0xce;}_0x5136dc[_0x25a8('0x19')](_0x20cae6);return _0x5136dc[_0x25a8('0x1e')](_0x25a8('0x1f'),_0x3de138+'-'+_0x328a91+'/'+_0x4d3581)['json'](_0xc273a6);}return null;};}function patchUpdates(_0x2d26fb){return function(_0x1ad5ed){try{jsonpatch['apply'](_0x1ad5ed,_0x2d26fb,!![]);}catch(_0x16596e){return BPromise[_0x25a8('0x20')](_0x16596e);}return _0x1ad5ed[_0x25a8('0x21')]();};}function saveUpdates(_0x530589,_0x48c4f7){return function(_0x5b9819){if(_0x5b9819){return _0x5b9819['update'](_0x530589)['then'](function(_0x3f4147){return _0x3f4147;});}return null;};}function removeEntity(_0xf45484,_0x47c7f3){return function(_0x1b6e5d){if(_0x1b6e5d){return _0x1b6e5d[_0x25a8('0x22')]()['then'](function(){var _0x5d14bc=_0x1b6e5d[_0x25a8('0x23')]({'plain':!![]});var _0x314e4a=_0x25a8('0x24');return db['UserProfileResource'][_0x25a8('0x22')]({'where':{'type':_0x314e4a,'resourceId':_0x5d14bc['id']}})['then'](function(){return _0x1b6e5d;});})[_0x25a8('0x25')](function(){_0xf45484['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e259a,_0x110c1f){return function(_0xf3303e){if(!_0xf3303e){_0x1e259a[_0x25a8('0x18')](0x194);}return _0xf3303e;};}function handleError(_0x304791,_0x34df32){_0x34df32=_0x34df32||0x1f4;return function(_0x433370){logger[_0x25a8('0x26')](_0x433370['stack']);if(_0x433370['name']){delete _0x433370['name'];}_0x304791[_0x25a8('0x19')](_0x34df32)[_0x25a8('0x27')](_0x433370);};}exports['index']=function(_0x3e0331,_0x581005){var _0x42f2df={},_0x173ca2={},_0x2529b7={'count':0x0,'rows':[]};var _0x289da9=db['Variable'][_0x25a8('0x28')];_0x173ca2[_0x25a8('0x29')]=_['keys'](_0x289da9);_0x173ca2[_0x25a8('0x2a')]=_['keys'](_0x3e0331[_0x25a8('0x2a')]);_0x173ca2[_0x25a8('0x2b')]=_[_0x25a8('0x2c')](_0x173ca2[_0x25a8('0x29')],_0x173ca2[_0x25a8('0x2a')]);_0x42f2df[_0x25a8('0x2d')]=_[_0x25a8('0x2c')](_0x173ca2['model'],qs['fields'](_0x3e0331[_0x25a8('0x2a')][_0x25a8('0x2e')]));_0x42f2df[_0x25a8('0x2d')]=_0x42f2df[_0x25a8('0x2d')][_0x25a8('0x2f')]?_0x42f2df[_0x25a8('0x2d')]:_0x173ca2['model'];if(!_0x3e0331['query'][_0x25a8('0x30')](_0x25a8('0x31'))){_0x42f2df[_0x25a8('0x32')]=qs[_0x25a8('0x32')](_0x3e0331[_0x25a8('0x2a')]['limit']);_0x42f2df[_0x25a8('0x1d')]=qs[_0x25a8('0x1d')](_0x3e0331[_0x25a8('0x2a')]['offset']);}_0x42f2df['order']=qs[_0x25a8('0x33')](_0x3e0331[_0x25a8('0x2a')][_0x25a8('0x33')]);_0x42f2df[_0x25a8('0x34')]=qs[_0x25a8('0x2b')](_[_0x25a8('0x35')](_0x3e0331[_0x25a8('0x2a')],_0x173ca2['filters']));if(_0x3e0331[_0x25a8('0x2a')][_0x25a8('0x36')]){_0x42f2df['where']=_['merge'](_0x42f2df[_0x25a8('0x34')],{'$or':_[_0x25a8('0x37')](_0x289da9,function(_0x1814c8){if(_0x1814c8['type'][_0x25a8('0x38')]!==_0x25a8('0x39')){var _0x118663={};_0x118663[_0x1814c8[_0x25a8('0x3a')]]={'$like':'%'+_0x3e0331['query'][_0x25a8('0x36')]+'%'};return _0x118663;}})});}_0x42f2df=_[_0x25a8('0x3b')]({},_0x42f2df,_0x3e0331[_0x25a8('0x3c')]);var _0x2f2e51={'where':_0x42f2df[_0x25a8('0x34')]};return db['Variable'][_0x25a8('0x1c')](_0x2f2e51)[_0x25a8('0x25')](function(_0x3e3ce4){_0x2529b7[_0x25a8('0x1c')]=_0x3e3ce4;if(_0x3e0331['query'][_0x25a8('0x3d')]){_0x42f2df[_0x25a8('0x3e')]=[{'all':!![]}];}return db[_0x25a8('0x3f')]['findAll'](_0x42f2df);})[_0x25a8('0x25')](function(_0x4bff91){_0x2529b7[_0x25a8('0x40')]=_0x4bff91;return _0x2529b7;})[_0x25a8('0x25')](respondWithFilteredResult(_0x581005,_0x42f2df))[_0x25a8('0x41')](handleError(_0x581005,null));};exports[_0x25a8('0x42')]=function(_0x4a86c4,_0x120bbf){var _0x39c473={'raw':!![],'where':{'id':_0x4a86c4[_0x25a8('0x43')]['id']}},_0x3a05e2={};_0x3a05e2['model']=_[_0x25a8('0x44')](db[_0x25a8('0x3f')][_0x25a8('0x28')]);_0x3a05e2[_0x25a8('0x2a')]=_[_0x25a8('0x44')](_0x4a86c4[_0x25a8('0x2a')]);_0x3a05e2[_0x25a8('0x2b')]=_['intersection'](_0x3a05e2[_0x25a8('0x29')],_0x3a05e2[_0x25a8('0x2a')]);_0x39c473[_0x25a8('0x2d')]=_['intersection'](_0x3a05e2['model'],qs[_0x25a8('0x2e')](_0x4a86c4[_0x25a8('0x2a')]['fields']));_0x39c473[_0x25a8('0x2d')]=_0x39c473['attributes'][_0x25a8('0x2f')]?_0x39c473[_0x25a8('0x2d')]:_0x3a05e2['model'];if(_0x4a86c4[_0x25a8('0x2a')][_0x25a8('0x3d')]){_0x39c473[_0x25a8('0x3e')]=[{'all':!![]}];}_0x39c473=_[_0x25a8('0x3b')]({},_0x39c473,_0x4a86c4[_0x25a8('0x3c')]);return db[_0x25a8('0x3f')][_0x25a8('0x45')](_0x39c473)[_0x25a8('0x25')](handleEntityNotFound(_0x120bbf,null))[_0x25a8('0x25')](respondWithResult(_0x120bbf,null))[_0x25a8('0x41')](handleError(_0x120bbf,null));};exports[_0x25a8('0x46')]=function(_0x4c1519,_0x3dd9ca){return db['Variable'][_0x25a8('0x46')](_0x4c1519['body'],{})[_0x25a8('0x25')](function(_0x56b570){var _0x40b48f=_0x4c1519[_0x25a8('0x47')][_0x25a8('0x23')]({'plain':!![]});if(!_0x40b48f)throw new Error(_0x25a8('0x48'));if(_0x40b48f[_0x25a8('0x49')]===_0x25a8('0x47')){var _0x2d1c27=_0x56b570[_0x25a8('0x23')]({'plain':!![]});var _0x4b019c=_0x25a8('0x24');return db[_0x25a8('0x4a')][_0x25a8('0x45')]({'where':{'name':_0x4b019c,'userProfileId':_0x40b48f[_0x25a8('0x4b')]},'raw':!![]})[_0x25a8('0x25')](function(_0x3980bb){if(_0x3980bb&&_0x3980bb[_0x25a8('0x4c')]===0x0){return db[_0x25a8('0x4d')][_0x25a8('0x46')]({'name':_0x2d1c27[_0x25a8('0x4e')],'resourceId':_0x2d1c27['id'],'type':_0x3980bb[_0x25a8('0x4e')],'sectionId':_0x3980bb['id']},{})['then'](function(){return _0x56b570;});}else{return _0x56b570;}})['catch'](function(_0x2c2257){logger[_0x25a8('0x26')](_0x25a8('0x4f'),_0x2c2257);throw _0x2c2257;});}return _0x56b570;})[_0x25a8('0x25')](respondWithResult(_0x3dd9ca,0xc9))[_0x25a8('0x41')](handleError(_0x3dd9ca,null));};exports[_0x25a8('0x50')]=function(_0x10178f,_0x10ecc3){if(_0x10178f[_0x25a8('0x51')]['id']){delete _0x10178f['body']['id'];}return db[_0x25a8('0x3f')][_0x25a8('0x45')]({'where':{'id':_0x10178f[_0x25a8('0x43')]['id']}})[_0x25a8('0x25')](handleEntityNotFound(_0x10ecc3,null))[_0x25a8('0x25')](saveUpdates(_0x10178f[_0x25a8('0x51')],null))[_0x25a8('0x25')](respondWithResult(_0x10ecc3,null))[_0x25a8('0x41')](handleError(_0x10ecc3,null));};exports[_0x25a8('0x22')]=function(_0x46dd39,_0x4659f8){return db['Variable']['find']({'where':{'id':_0x46dd39['params']['id']}})[_0x25a8('0x25')](handleEntityNotFound(_0x4659f8,null))[_0x25a8('0x25')](removeEntity(_0x4659f8,null))[_0x25a8('0x41')](handleError(_0x4659f8,null));};
\ No newline at end of file
diff --git a/server/api/variable/variable.model.js b/server/api/variable/variable.model.js
index f8b706d..84879e2 100644
--- a/server/api/variable/variable.model.js
+++ b/server/api/variable/variable.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1f2d=['exports','define','Variable','tools_variables','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./variable.attributes'];(function(_0x281372,_0x2a5398){var _0x4957b6=function(_0x3918ed){while(--_0x3918ed){_0x281372['push'](_0x281372['shift']());}};_0x4957b6(++_0x2a5398);}(_0x1f2d,0x1c4));var _0xd1f2=function(_0x5235dd,_0x3f91cf){_0x5235dd=_0x5235dd-0x0;var _0x13059d=_0x1f2d[_0x5235dd];return _0x13059d;};'use strict';var _=require(_0xd1f2('0x0'));var util=require(_0xd1f2('0x1'));var logger=require(_0xd1f2('0x2'))(_0xd1f2('0x3'));var moment=require('moment');var BPromise=require(_0xd1f2('0x4'));var rp=require(_0xd1f2('0x5'));var fs=require('fs');var path=require(_0xd1f2('0x6'));var rimraf=require(_0xd1f2('0x7'));var config=require(_0xd1f2('0x8'));var attributes=require(_0xd1f2('0x9'));module[_0xd1f2('0xa')]=function(_0x185be2,_0x3e318d){return _0x185be2[_0xd1f2('0xb')](_0xd1f2('0xc'),attributes,{'tableName':_0xd1f2('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x33ac=['exports','Variable','tools_variables','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./variable.attributes'];(function(_0x589187,_0x317515){var _0x4966da=function(_0x428406){while(--_0x428406){_0x589187['push'](_0x589187['shift']());}};_0x4966da(++_0x317515);}(_0x33ac,0x1f2));var _0xc33a=function(_0x38fe1f,_0x1fa85e){_0x38fe1f=_0x38fe1f-0x0;var _0x2d7ed3=_0x33ac[_0x38fe1f];return _0x2d7ed3;};'use strict';var _=require('lodash');var util=require(_0xc33a('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0xc33a('0x1'));var BPromise=require(_0xc33a('0x2'));var rp=require(_0xc33a('0x3'));var fs=require('fs');var path=require(_0xc33a('0x4'));var rimraf=require(_0xc33a('0x5'));var config=require(_0xc33a('0x6'));var attributes=require(_0xc33a('0x7'));module[_0xc33a('0x8')]=function(_0x322368,_0x554de7){return _0x322368['define'](_0xc33a('0x9'),attributes,{'tableName':_0xc33a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/variable/variable.rpc.js b/server/api/variable/variable.rpc.js
index 444edd1..17af58a 100644
--- a/server/api/variable/variable.rpc.js
+++ b/server/api/variable/variable.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8061=['find','options','where','include','attributes','map','stringify','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','error','message','info','ShowVariable','Variable'];(function(_0x178856,_0x41f045){var _0x3c7fe7=function(_0x4d9ce4){while(--_0x4d9ce4){_0x178856['push'](_0x178856['shift']());}};_0x3c7fe7(++_0x41f045);}(_0x8061,0xc2));var _0x1806=function(_0x42821e,_0x20e5e5){_0x42821e=_0x42821e-0x0;var _0x117baf=_0x8061[_0x42821e];return _0x117baf;};'use strict';var _=require(_0x1806('0x0'));var util=require(_0x1806('0x1'));var moment=require('moment');var BPromise=require(_0x1806('0x2'));var rs=require(_0x1806('0x3'));var fs=require('fs');var Redis=require(_0x1806('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x1806('0x5'));var logger=require(_0x1806('0x6'))(_0x1806('0x7'));var config=require(_0x1806('0x8'));var jayson=require(_0x1806('0x9'));var client=jayson[_0x1806('0xa')][_0x1806('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x187b0d,_0x5eb27f,_0x209036){return new BPromise(function(_0x3d69aa,_0x30e325){return client[_0x1806('0xc')](_0x187b0d,_0x209036)[_0x1806('0xd')](function(_0x20fe08){logger['info'](_0x1806('0xe'),_0x5eb27f,_0x1806('0xf'));logger[_0x1806('0x10')](_0x1806('0x11'),_0x5eb27f,'request\x20sent',JSON['stringify'](_0x20fe08));if(_0x20fe08[_0x1806('0x12')]){if(_0x20fe08[_0x1806('0x12')]['code']===0x1f4){logger[_0x1806('0x12')](_0x1806('0xe'),_0x5eb27f,_0x20fe08['error'][_0x1806('0x13')]);return _0x30e325(_0x20fe08['error'][_0x1806('0x13')]);}logger['error'](_0x1806('0xe'),_0x5eb27f,_0x20fe08['error']['message']);return _0x3d69aa(_0x20fe08['error']['message']);}else{logger[_0x1806('0x14')]('Variable,\x20%s,\x20%s',_0x5eb27f,_0x1806('0xf'));_0x3d69aa(_0x20fe08['result'][_0x1806('0x13')]);}})['catch'](function(_0x2dc406){logger[_0x1806('0x12')]('Variable,\x20%s,\x20%s',_0x5eb27f,_0x2dc406);_0x30e325(_0x2dc406);});});}exports[_0x1806('0x15')]=function(_0x4fa77c){var _0x3cccd5=this;return new Promise(function(_0x2ba32f,_0x15e366){return db[_0x1806('0x16')][_0x1806('0x17')]({'raw':_0x4fa77c['options']?_0x4fa77c[_0x1806('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4fa77c[_0x1806('0x18')]?_0x4fa77c[_0x1806('0x18')][_0x1806('0x19')]||null:null,'attributes':_0x4fa77c[_0x1806('0x18')]?_0x4fa77c[_0x1806('0x18')]['attributes']||null:null,'include':_0x4fa77c[_0x1806('0x18')]?_0x4fa77c[_0x1806('0x18')][_0x1806('0x1a')]?_['map'](_0x4fa77c[_0x1806('0x18')][_0x1806('0x1a')],function(_0xa474db){return{'model':db[_0xa474db['model']],'as':_0xa474db['as'],'attributes':_0xa474db[_0x1806('0x1b')],'include':_0xa474db[_0x1806('0x1a')]?_[_0x1806('0x1c')](_0xa474db[_0x1806('0x1a')],function(_0x3bcea1){return{'model':db[_0x3bcea1['model']],'as':_0x3bcea1['as'],'attributes':_0x3bcea1[_0x1806('0x1b')],'include':_0x3bcea1[_0x1806('0x1a')]?_['map'](_0x3bcea1['include'],function(_0x370ae9){return{'model':db[_0x370ae9['model']],'as':_0x370ae9['as'],'attributes':_0x370ae9[_0x1806('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x1806('0xd')](function(_0x1697b1){logger[_0x1806('0x14')]('ShowVariable',_0x4fa77c);logger['debug']('ShowVariable',_0x4fa77c,JSON[_0x1806('0x1d')](_0x1697b1));_0x2ba32f(_0x1697b1);})[_0x1806('0x1e')](function(_0x5af6f2){logger[_0x1806('0x12')](_0x1806('0x15'),_0x5af6f2[_0x1806('0x13')],_0x4fa77c);_0x15e366(_0x3cccd5[_0x1806('0x12')](0x1f4,_0x5af6f2[_0x1806('0x13')]));});});};
\ No newline at end of file
+var _0x3b65=['request\x20sent','Variable,\x20%s,\x20%s,\x20%s','stringify','error','Variable,\x20%s,\x20%s','message','catch','ShowVariable','find','options','raw','where','attributes','include','map','model','debug','lodash','moment','bluebird','ioredis','../../config/utils','rpc','jayson/promise','client','http','request','then','info'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0x3b65,0x1e1));var _0x53b6=function(_0x2c5fa2,_0x4db145){_0x2c5fa2=_0x2c5fa2-0x0;var _0x3894a5=_0x3b65[_0x2c5fa2];return _0x3894a5;};'use strict';var _=require(_0x53b6('0x0'));var util=require('util');var moment=require(_0x53b6('0x1'));var BPromise=require(_0x53b6('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x53b6('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x53b6('0x4'));var logger=require('../../config/logger')(_0x53b6('0x5'));var config=require('../../config/environment');var jayson=require(_0x53b6('0x6'));var client=jayson[_0x53b6('0x7')][_0x53b6('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3f1e82,_0x353ffc,_0x309771){return new BPromise(function(_0x226289,_0x4bfb26){return client[_0x53b6('0x9')](_0x3f1e82,_0x309771)[_0x53b6('0xa')](function(_0x52b447){logger[_0x53b6('0xb')]('Variable,\x20%s,\x20%s',_0x353ffc,_0x53b6('0xc'));logger['debug'](_0x53b6('0xd'),_0x353ffc,'request\x20sent',JSON[_0x53b6('0xe')](_0x52b447));if(_0x52b447[_0x53b6('0xf')]){if(_0x52b447[_0x53b6('0xf')]['code']===0x1f4){logger[_0x53b6('0xf')](_0x53b6('0x10'),_0x353ffc,_0x52b447[_0x53b6('0xf')][_0x53b6('0x11')]);return _0x4bfb26(_0x52b447[_0x53b6('0xf')]['message']);}logger[_0x53b6('0xf')](_0x53b6('0x10'),_0x353ffc,_0x52b447['error']['message']);return _0x226289(_0x52b447[_0x53b6('0xf')][_0x53b6('0x11')]);}else{logger[_0x53b6('0xb')](_0x53b6('0x10'),_0x353ffc,'request\x20sent');_0x226289(_0x52b447['result']['message']);}})[_0x53b6('0x12')](function(_0x3ce506){logger[_0x53b6('0xf')]('Variable,\x20%s,\x20%s',_0x353ffc,_0x3ce506);_0x4bfb26(_0x3ce506);});});}exports[_0x53b6('0x13')]=function(_0x1f640c){var _0x120bd0=this;return new Promise(function(_0xb97778,_0x560e39){return db['Variable'][_0x53b6('0x14')]({'raw':_0x1f640c[_0x53b6('0x15')]?_0x1f640c[_0x53b6('0x15')][_0x53b6('0x16')]===undefined?!![]:![]:!![],'where':_0x1f640c[_0x53b6('0x15')]?_0x1f640c['options'][_0x53b6('0x17')]||null:null,'attributes':_0x1f640c[_0x53b6('0x15')]?_0x1f640c[_0x53b6('0x15')][_0x53b6('0x18')]||null:null,'include':_0x1f640c['options']?_0x1f640c[_0x53b6('0x15')][_0x53b6('0x19')]?_[_0x53b6('0x1a')](_0x1f640c[_0x53b6('0x15')][_0x53b6('0x19')],function(_0x5e800d){return{'model':db[_0x5e800d[_0x53b6('0x1b')]],'as':_0x5e800d['as'],'attributes':_0x5e800d[_0x53b6('0x18')],'include':_0x5e800d[_0x53b6('0x19')]?_[_0x53b6('0x1a')](_0x5e800d['include'],function(_0x49deb1){return{'model':db[_0x49deb1[_0x53b6('0x1b')]],'as':_0x49deb1['as'],'attributes':_0x49deb1[_0x53b6('0x18')],'include':_0x49deb1['include']?_[_0x53b6('0x1a')](_0x49deb1['include'],function(_0x449c0e){return{'model':db[_0x449c0e[_0x53b6('0x1b')]],'as':_0x449c0e['as'],'attributes':_0x449c0e[_0x53b6('0x18')]};}):[]};}):[]};}):[]:[]})[_0x53b6('0xa')](function(_0x3d1c99){logger[_0x53b6('0xb')](_0x53b6('0x13'),_0x1f640c);logger[_0x53b6('0x1c')](_0x53b6('0x13'),_0x1f640c,JSON['stringify'](_0x3d1c99));_0xb97778(_0x3d1c99);})[_0x53b6('0x12')](function(_0x56ea5a){logger[_0x53b6('0xf')](_0x53b6('0x13'),_0x56ea5a[_0x53b6('0x11')],_0x1f640c);_0x560e39(_0x120bd0[_0x53b6('0xf')](0x1f4,_0x56ea5a[_0x53b6('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/version/index.js b/server/api/version/index.js
index dcb9c50..bb3b790 100644
--- a/server/api/version/index.js
+++ b/server/api/version/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8ed7=['reset','/pull','pull','/restart','restart','migrations','exports','express','./version.controller','index','get','isAuthenticated','canUpdate','/reset'];(function(_0x5520ba,_0x36bd48){var _0x2bdba8=function(_0x37cf40){while(--_0x37cf40){_0x5520ba['push'](_0x5520ba['shift']());}};_0x2bdba8(++_0x36bd48);}(_0x8ed7,0x19d));var _0x78ed=function(_0x1bbc6b,_0x2efebc){_0x1bbc6b=_0x1bbc6b-0x0;var _0x322034=_0x8ed7[_0x1bbc6b];return _0x322034;};'use strict';var express=require(_0x78ed('0x0'));var router=express['Router']();var auth=require('../../components/auth/service');var controller=require(_0x78ed('0x1'));router['get']('/',controller[_0x78ed('0x2')]);router[_0x78ed('0x3')]('/fetch',auth[_0x78ed('0x4')](),auth[_0x78ed('0x5')](),controller['fetch']);router[_0x78ed('0x3')](_0x78ed('0x6'),auth['isAuthenticated'](),auth[_0x78ed('0x5')](),controller[_0x78ed('0x7')]);router[_0x78ed('0x3')](_0x78ed('0x8'),auth[_0x78ed('0x4')](),auth[_0x78ed('0x5')](),controller[_0x78ed('0x9')]);router[_0x78ed('0x3')](_0x78ed('0xa'),auth['isAuthenticated'](),controller[_0x78ed('0xb')]);router[_0x78ed('0x3')]('/migrations',controller[_0x78ed('0xc')]);module[_0x78ed('0xd')]=router;
\ No newline at end of file
+var _0xc2bb=['get','index','isAuthenticated','canUpdate','fetch','/pull','pull','/migrations','migrations','express','../../components/auth/service','./version.controller'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc2bb,0xc9));var _0xbc2b=function(_0x55cbf9,_0x38f1ec){_0x55cbf9=_0x55cbf9-0x0;var _0x582a5b=_0xc2bb[_0x55cbf9];return _0x582a5b;};'use strict';var express=require(_0xbc2b('0x0'));var router=express['Router']();var auth=require(_0xbc2b('0x1'));var controller=require(_0xbc2b('0x2'));router[_0xbc2b('0x3')]('/',controller[_0xbc2b('0x4')]);router[_0xbc2b('0x3')]('/fetch',auth[_0xbc2b('0x5')](),auth[_0xbc2b('0x6')](),controller[_0xbc2b('0x7')]);router[_0xbc2b('0x3')]('/reset',auth[_0xbc2b('0x5')](),auth['canUpdate'](),controller['reset']);router[_0xbc2b('0x3')](_0xbc2b('0x8'),auth[_0xbc2b('0x5')](),auth[_0xbc2b('0x6')](),controller[_0xbc2b('0x9')]);router[_0xbc2b('0x3')]('/restart',auth[_0xbc2b('0x5')](),controller['restart']);router[_0xbc2b('0x3')](_0xbc2b('0xa'),controller[_0xbc2b('0xb')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/version/version.controller.js b/server/api/version/version.controller.js
index f9a935d..aaf51b4 100644
--- a/server/api/version/version.controller.js
+++ b/server/api/version/version.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6f7f=['.js','push','length','sort','sequelize','Migration','getQueryInterface','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','map','Database\x20migrated\x20successfully\x20from\x20version\x20','\x20to\x20','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','pkginfo','child_process','../../mysqldb','../../config/environment','../../config/pm2','update','simple-git','root','index','exports','version','query','latest','2.0.0','status','json','fetch','master','error','info','git\x20fetch\x20origin\x20master','reset','--hard','FETCH_HEAD','git\x20reset\x20--hard\x20FETCH_HEAD','pull','npm\x20install\x20--production','restart','motion2','then','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','readdirSync','join','server','migrations','replace'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6f7f,0x11c));var _0xf6f7=function(_0x41930f,_0x3bfe3c){_0x41930f=_0x41930f-0x0;var _0x5195f3=_0x6f7f[_0x41930f];return _0x5195f3;};'use strict';var Umzug=require(_0xf6f7('0x0'));var path=require(_0xf6f7('0x1'));var fs=require('fs');var _=require(_0xf6f7('0x2'));var pkginfo=require(_0xf6f7('0x3'))(module,'version');var compareVersions=require('compare-versions');var exec=require(_0xf6f7('0x4'))['exec'];var db=require(_0xf6f7('0x5'))['db'];var config=require(_0xf6f7('0x6'));var pm2=require(_0xf6f7('0x7'));var logger=require('../../config/logger')(_0xf6f7('0x8'));var git=require(_0xf6f7('0x9'))(config[_0xf6f7('0xa')]);exports[_0xf6f7('0xb')]=function(_0x445989,_0x29282c){var _0x1b8667={'current':module[_0xf6f7('0xc')][_0xf6f7('0xd')],'phonebar':0x2};if(_0x445989[_0xf6f7('0xe')]&&_0x445989[_0xf6f7('0xe')][_0xf6f7('0xf')]){return git['fetch']()['tags'](function(_0x1cf466,_0xbc36){_0x1b8667[_0xf6f7('0xf')]=(_0x1cf466?module[_0xf6f7('0xc')][_0xf6f7('0xd')]:_0xbc36[_0xf6f7('0xf')])||_0xf6f7('0x10');return _0x29282c[_0xf6f7('0x11')](0xc8)[_0xf6f7('0x12')](_0x1b8667);});}else{return _0x29282c['status'](0xc8)[_0xf6f7('0x12')](_0x1b8667);}};exports['fetch']=function(_0x55340b,_0x36a008){return git[_0xf6f7('0x13')](['origin',_0xf6f7('0x14')],function(_0x2aa0d7){if(_0x2aa0d7){logger[_0xf6f7('0x15')](_0x2aa0d7);return _0x36a008['status'](0x1f4)[_0xf6f7('0x12')](_0x2aa0d7);}logger[_0xf6f7('0x16')]('git\x20fetch');return _0x36a008[_0xf6f7('0x11')](0xc8)[_0xf6f7('0x12')]({'output':_0xf6f7('0x17')});});};exports['reset']=function(_0x37ee5c,_0x4f8b33){return git[_0xf6f7('0x18')]([_0xf6f7('0x19'),_0xf6f7('0x1a')],function(_0x2257f2){if(_0x2257f2){logger[_0xf6f7('0x15')](_0x2257f2);return _0x4f8b33['status'](0x1f4)[_0xf6f7('0x12')](_0x2257f2);}logger[_0xf6f7('0x16')](_0xf6f7('0x1b'));return _0x4f8b33['status'](0xc8)[_0xf6f7('0x12')]({'output':'git\x20reset\x20--hard'});});};exports[_0xf6f7('0x1c')]=function(_0x3282b4,_0x2e58be){exec(_0xf6f7('0x1d'),function(_0xbf7735,_0x368036,_0x466504){logger[_0xf6f7('0x16')](_0x368036);logger['info'](_0x466504);if(_0xbf7735){logger[_0xf6f7('0x15')](_0xbf7735);return _0x2e58be[_0xf6f7('0x11')](0x1f4)[_0xf6f7('0x12')](_0xbf7735);}return _0x2e58be['status'](0xc8)[_0xf6f7('0x12')]({'output':_0x368036});});};exports[_0xf6f7('0x1e')]=function(_0x5ab3c9,_0x1b7c4c){return pm2[_0xf6f7('0x1e')](_0xf6f7('0x1f'))[_0xf6f7('0x20')](function(_0x3d86b9){logger[_0xf6f7('0x16')]('pm2\x20restart\x20motion\x20%s',_0x3d86b9);return _0x1b7c4c[_0xf6f7('0x11')](0xc8)[_0xf6f7('0x12')]({'output':_0xf6f7('0x21')});})[_0xf6f7('0x22')](function(_0x22adc2){logger[_0xf6f7('0x15')](_0x22adc2);return _0x1b7c4c[_0xf6f7('0x11')](0x1f4)[_0xf6f7('0x12')](_0x22adc2);});};exports['migrations']=function(_0xe51b9f,_0x32ec3f){var _0x4ba369=fs[_0xf6f7('0x23')](path[_0xf6f7('0x24')](config[_0xf6f7('0xa')],_0xf6f7('0x25'),_0xf6f7('0x26')));var _0x1551a6=[];for(var _0x133d6d=0x0;_0x133d6d<_0x4ba369['length'];_0x133d6d++){var _0x5ed4a3=_0x4ba369[_0x133d6d][_0xf6f7('0x27')](_0xf6f7('0x28'),'');if(compareVersions(module[_0xf6f7('0xc')][_0xf6f7('0xd')],_0x5ed4a3)===-0x1){_0x1551a6[_0xf6f7('0x29')](_0x5ed4a3);}}if(_0x1551a6[_0xf6f7('0x2a')]){var _0xb2fcaf=_0x1551a6[_0xf6f7('0x2b')](compareVersions);var _0x32f083=new Umzug({'storage':_0xf6f7('0x2c'),'storageOptions':{'model':db[_0xf6f7('0x2d')],'modelName':'Migration','columnName':'version'},'migrations':{'params':[db['sequelize'][_0xf6f7('0x2e')](),db[_0xf6f7('0x2c')][_0xf6f7('0x2f')],function(){throw new Error(_0xf6f7('0x30'));}],'path':path['join'](config[_0xf6f7('0xa')],_0xf6f7('0x25'),_0xf6f7('0x26')),'pattern':/\.js$/}});_0x32f083['up']({'migrations':_[_0xf6f7('0x31')](_0xb2fcaf,function(_0x2c9e63){return _0x2c9e63+_0xf6f7('0x28');})})['then'](function(){return _0x32ec3f[_0xf6f7('0x11')](0xc8)[_0xf6f7('0x12')]({'output':_0xf6f7('0x32')+module[_0xf6f7('0xc')]['version']+_0xf6f7('0x33')+_['last'](_0xb2fcaf),'migrations':_[_0xf6f7('0x24')](_0xb2fcaf)});})[_0xf6f7('0x22')](function(_0x29babb){if(_0x29babb instanceof db[_0xf6f7('0x2c')][_0xf6f7('0x34')]){return _0x32ec3f[_0xf6f7('0x11')](0xc8)['json']({'output':_0xf6f7('0x35')});}else{return _0x32ec3f[_0xf6f7('0x11')](0x1f4)['json'](_0x29babb);}});}else{return _0x32ec3f['status'](0xc8)[_0xf6f7('0x12')]({'output':_0xf6f7('0x35')});}};
\ No newline at end of file
+var _0xb0d9=['getQueryInterface','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','Database\x20migrated\x20successfully\x20from\x20version\x20','\x20to\x20','last','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','pkginfo','version','compare-versions','exec','../../config/logger','update','simple-git','root','index','exports','query','latest','tags','status','json','fetch','master','error','git\x20fetch','reset','--hard','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','npm\x20install\x20--production','info','restart','motion2','then','pm2\x20restart\x20motion\x20%s','catch','migrations','readdirSync','join','server','length','replace','.js','sort','sequelize','Migration'];(function(_0x1f6691,_0x3a3d46){var _0xf786b6=function(_0x2afbdb){while(--_0x2afbdb){_0x1f6691['push'](_0x1f6691['shift']());}};_0xf786b6(++_0x3a3d46);}(_0xb0d9,0x10c));var _0x9b0d=function(_0x38722f,_0x45cf2a){_0x38722f=_0x38722f-0x0;var _0x998373=_0xb0d9[_0x38722f];return _0x998373;};'use strict';var Umzug=require(_0x9b0d('0x0'));var path=require(_0x9b0d('0x1'));var fs=require('fs');var _=require(_0x9b0d('0x2'));var pkginfo=require(_0x9b0d('0x3'))(module,_0x9b0d('0x4'));var compareVersions=require(_0x9b0d('0x5'));var exec=require('child_process')[_0x9b0d('0x6')];var db=require('../../mysqldb')['db'];var config=require('../../config/environment');var pm2=require('../../config/pm2');var logger=require(_0x9b0d('0x7'))(_0x9b0d('0x8'));var git=require(_0x9b0d('0x9'))(config[_0x9b0d('0xa')]);exports[_0x9b0d('0xb')]=function(_0x45c371,_0x32ee67){var _0x30cd11={'current':module[_0x9b0d('0xc')]['version'],'phonebar':0x2};if(_0x45c371['query']&&_0x45c371[_0x9b0d('0xd')][_0x9b0d('0xe')]){return git['fetch']()[_0x9b0d('0xf')](function(_0x118863,_0x506ef2){_0x30cd11[_0x9b0d('0xe')]=(_0x118863?module[_0x9b0d('0xc')]['version']:_0x506ef2[_0x9b0d('0xe')])||'2.0.0';return _0x32ee67[_0x9b0d('0x10')](0xc8)[_0x9b0d('0x11')](_0x30cd11);});}else{return _0x32ee67[_0x9b0d('0x10')](0xc8)['json'](_0x30cd11);}};exports[_0x9b0d('0x12')]=function(_0x551445,_0x404f33){return git[_0x9b0d('0x12')](['origin',_0x9b0d('0x13')],function(_0x49902e){if(_0x49902e){logger[_0x9b0d('0x14')](_0x49902e);return _0x404f33[_0x9b0d('0x10')](0x1f4)[_0x9b0d('0x11')](_0x49902e);}logger['info'](_0x9b0d('0x15'));return _0x404f33[_0x9b0d('0x10')](0xc8)['json']({'output':'git\x20fetch\x20origin\x20master'});});};exports['reset']=function(_0x2e9957,_0xd8bb89){return git[_0x9b0d('0x16')]([_0x9b0d('0x17'),'FETCH_HEAD'],function(_0x292a17){if(_0x292a17){logger[_0x9b0d('0x14')](_0x292a17);return _0xd8bb89[_0x9b0d('0x10')](0x1f4)[_0x9b0d('0x11')](_0x292a17);}logger['info'](_0x9b0d('0x18'));return _0xd8bb89[_0x9b0d('0x10')](0xc8)[_0x9b0d('0x11')]({'output':_0x9b0d('0x19')});});};exports[_0x9b0d('0x1a')]=function(_0x49a49a,_0x3268f4){exec(_0x9b0d('0x1b'),function(_0x313780,_0x14c01b,_0x74065a){logger[_0x9b0d('0x1c')](_0x14c01b);logger[_0x9b0d('0x1c')](_0x74065a);if(_0x313780){logger[_0x9b0d('0x14')](_0x313780);return _0x3268f4[_0x9b0d('0x10')](0x1f4)[_0x9b0d('0x11')](_0x313780);}return _0x3268f4[_0x9b0d('0x10')](0xc8)['json']({'output':_0x14c01b});});};exports[_0x9b0d('0x1d')]=function(_0x4f774c,_0x26ecfc){return pm2[_0x9b0d('0x1d')](_0x9b0d('0x1e'))[_0x9b0d('0x1f')](function(_0x213861){logger[_0x9b0d('0x1c')](_0x9b0d('0x20'),_0x213861);return _0x26ecfc[_0x9b0d('0x10')](0xc8)[_0x9b0d('0x11')]({'output':'Your\x20system\x20has\x20been\x20restart\x20successfully'});})[_0x9b0d('0x21')](function(_0x3c96b9){logger[_0x9b0d('0x14')](_0x3c96b9);return _0x26ecfc[_0x9b0d('0x10')](0x1f4)[_0x9b0d('0x11')](_0x3c96b9);});};exports[_0x9b0d('0x22')]=function(_0x4ee722,_0x2b3795){var _0xee0911=fs[_0x9b0d('0x23')](path[_0x9b0d('0x24')](config['root'],_0x9b0d('0x25'),'migrations'));var _0x1d2a63=[];for(var _0x561d9f=0x0;_0x561d9f<_0xee0911[_0x9b0d('0x26')];_0x561d9f++){var _0x4ff235=_0xee0911[_0x561d9f][_0x9b0d('0x27')](_0x9b0d('0x28'),'');if(compareVersions(module['exports'][_0x9b0d('0x4')],_0x4ff235)===-0x1){_0x1d2a63['push'](_0x4ff235);}}if(_0x1d2a63['length']){var _0x1b16a7=_0x1d2a63[_0x9b0d('0x29')](compareVersions);var _0xb35144=new Umzug({'storage':_0x9b0d('0x2a'),'storageOptions':{'model':db[_0x9b0d('0x2b')],'modelName':'Migration','columnName':_0x9b0d('0x4')},'migrations':{'params':[db[_0x9b0d('0x2a')][_0x9b0d('0x2c')](),db[_0x9b0d('0x2a')][_0x9b0d('0x2d')],function(){throw new Error(_0x9b0d('0x2e'));}],'path':path[_0x9b0d('0x24')](config[_0x9b0d('0xa')],_0x9b0d('0x25'),_0x9b0d('0x22')),'pattern':/\.js$/}});_0xb35144['up']({'migrations':_['map'](_0x1b16a7,function(_0x290c62){return _0x290c62+_0x9b0d('0x28');})})[_0x9b0d('0x1f')](function(){return _0x2b3795['status'](0xc8)['json']({'output':_0x9b0d('0x2f')+module['exports']['version']+_0x9b0d('0x30')+_[_0x9b0d('0x31')](_0x1b16a7),'migrations':_['join'](_0x1b16a7)});})[_0x9b0d('0x21')](function(_0xb0246){if(_0xb0246 instanceof db['sequelize'][_0x9b0d('0x32')]){return _0x2b3795[_0x9b0d('0x10')](0xc8)[_0x9b0d('0x11')]({'output':_0x9b0d('0x33')});}else{return _0x2b3795[_0x9b0d('0x10')](0x1f4)[_0x9b0d('0x11')](_0xb0246);}});}else{return _0x2b3795[_0x9b0d('0x10')](0xc8)['json']({'output':'Database\x20already\x20up-to-date'});}};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/index.js b/server/api/voiceAgentReport/index.js
index 8319361..1d14276 100644
--- a/server/api/voiceAgentReport/index.js
+++ b/server/api/voiceAgentReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ef3=['express','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','post','create','update','delete','destroy','multer','util','path','connect-timeout'];(function(_0x3a902a,_0xca8442){var _0x24f2d5=function(_0xb6799a){while(--_0xb6799a){_0x3a902a['push'](_0x3a902a['shift']());}};_0x24f2d5(++_0xca8442);}(_0x2ef3,0xba));var _0x32ef=function(_0x212be7,_0x2a5aab){_0x212be7=_0x212be7-0x0;var _0x35f1be=_0x2ef3[_0x212be7];return _0x35f1be;};'use strict';var multer=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var path=require(_0x32ef('0x2'));var timeout=require(_0x32ef('0x3'));var express=require(_0x32ef('0x4'));var router=express[_0x32ef('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x32ef('0x6'));var config=require(_0x32ef('0x7'));var controller=require('./voiceAgentReport.controller');router[_0x32ef('0x8')]('/',auth[_0x32ef('0x9')](),controller['index']);router['get'](_0x32ef('0xa'),auth[_0x32ef('0x9')](),controller[_0x32ef('0xb')]);router[_0x32ef('0x8')](_0x32ef('0xc'),auth[_0x32ef('0x9')](),controller[_0x32ef('0xd')]);router[_0x32ef('0xe')]('/',auth[_0x32ef('0x9')](),controller[_0x32ef('0xf')]);router['put']('/:id',auth[_0x32ef('0x9')](),controller[_0x32ef('0x10')]);router[_0x32ef('0x11')](_0x32ef('0xc'),auth['isAuthenticated'](),controller[_0x32ef('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x7880=['util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./voiceAgentReport.controller','get','isAuthenticated','index','/describe','describe','post','create','put','/:id','update','destroy','exports'];(function(_0xcc1a85,_0x28e9e0){var _0x5e0b2c=function(_0x58f481){while(--_0x58f481){_0xcc1a85['push'](_0xcc1a85['shift']());}};_0x5e0b2c(++_0x28e9e0);}(_0x7880,0x1f4));var _0x0788=function(_0x5cc3d4,_0xbcbf9b){_0x5cc3d4=_0x5cc3d4-0x0;var _0x17ca31=_0x7880[_0x5cc3d4];return _0x17ca31;};'use strict';var multer=require('multer');var util=require(_0x0788('0x0'));var path=require(_0x0788('0x1'));var timeout=require(_0x0788('0x2'));var express=require(_0x0788('0x3'));var router=express[_0x0788('0x4')]();var auth=require(_0x0788('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x0788('0x6'));var controller=require(_0x0788('0x7'));router[_0x0788('0x8')]('/',auth[_0x0788('0x9')](),controller[_0x0788('0xa')]);router[_0x0788('0x8')](_0x0788('0xb'),auth[_0x0788('0x9')](),controller[_0x0788('0xc')]);router[_0x0788('0x8')]('/:id',auth[_0x0788('0x9')](),controller['show']);router[_0x0788('0xd')]('/',auth['isAuthenticated'](),controller[_0x0788('0xe')]);router[_0x0788('0xf')](_0x0788('0x10'),auth[_0x0788('0x9')](),controller[_0x0788('0x11')]);router['delete'](_0x0788('0x10'),auth[_0x0788('0x9')](),controller[_0x0788('0x12')]);module[_0x0788('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/voiceAgentReport.attributes.js b/server/api/voiceAgentReport/voiceAgentReport.attributes.js
index bd444c1..4cff15b 100644
--- a/server/api/voiceAgentReport/voiceAgentReport.attributes.js
+++ b/server/api/voiceAgentReport/voiceAgentReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1214=['INTEGER','BOOLEAN','sequelize','exports','STRING','DATE'];(function(_0x8ac17f,_0x53f8fd){var _0x29ded1=function(_0x1e32bf){while(--_0x1e32bf){_0x8ac17f['push'](_0x8ac17f['shift']());}};_0x29ded1(++_0x53f8fd);}(_0x1214,0xc8));var _0x4121=function(_0x3b30be,_0x47bcd9){_0x3b30be=_0x3b30be-0x0;var _0x546361=_0x1214[_0x3b30be];return _0x546361;};'use strict';var Sequelize=require(_0x4121('0x0'));module[_0x4121('0x1')]={'type':{'type':Sequelize[_0x4121('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x4121('0x2')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x4121('0x2')]},'interface':{'type':Sequelize[_0x4121('0x2')]},'membername':{'type':Sequelize[_0x4121('0x2')]},'agentcalledAt':{'type':Sequelize[_0x4121('0x3')]},'agentconnectAt':{'type':Sequelize[_0x4121('0x3')]},'agentcompleteAt':{'type':Sequelize[_0x4121('0x3')]},'agentringnoanswerAt':{'type':Sequelize[_0x4121('0x3')]},'agentdumpAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize[_0x4121('0x4')]},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0x4121('0x5')],'defaultValue':![]},'agentdump':{'type':Sequelize[_0x4121('0x5')],'defaultValue':![]},'talktime':{'type':Sequelize[_0x4121('0x4')]},'agentacw':{'type':Sequelize[_0x4121('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x4121('0x4')]},'reason':{'type':Sequelize['STRING']},'lastevent':{'type':Sequelize[_0x4121('0x2')]},'channel':{'type':Sequelize[_0x4121('0x2')]},'channelstate':{'type':Sequelize[_0x4121('0x4')]},'channelstatedesc':{'type':Sequelize[_0x4121('0x2')]},'connectedlinenum':{'type':Sequelize[_0x4121('0x2')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x4121('0x2')]},'accountcode':{'type':Sequelize[_0x4121('0x2')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0x4121('0x2')]},'priority':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize[_0x4121('0x2')]},'destchannelstate':{'type':Sequelize[_0x4121('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0x4121('0x2')]},'destcalleridnum':{'type':Sequelize[_0x4121('0x2')]},'destcalleridname':{'type':Sequelize[_0x4121('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0x4121('0x2')]},'destconnectedlinename':{'type':Sequelize[_0x4121('0x2')]},'destlanguage':{'type':Sequelize[_0x4121('0x2')]},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize[_0x4121('0x2')]},'destexten':{'type':Sequelize[_0x4121('0x2')]},'destpriority':{'type':Sequelize[_0x4121('0x2')]},'destuniqueid':{'type':Sequelize[_0x4121('0x2')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize['STRING']},'answeredelsewheremembername':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize[_0x4121('0x5')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize[_0x4121('0x2')]},'transferuniqueid':{'type':Sequelize[_0x4121('0x2')]},'agententerreason':{'type':Sequelize[_0x4121('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xcf12=['exports','STRING','DATE','INTEGER','BOOLEAN'];(function(_0x45f951,_0x2750c8){var _0x24756c=function(_0x31c931){while(--_0x31c931){_0x45f951['push'](_0x45f951['shift']());}};_0x24756c(++_0x2750c8);}(_0xcf12,0x127));var _0x2cf1=function(_0x1709cc,_0x3a0ed9){_0x1709cc=_0x1709cc-0x0;var _0x42a064=_0xcf12[_0x1709cc];return _0x42a064;};'use strict';var Sequelize=require('sequelize');module[_0x2cf1('0x0')]={'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x2cf1('0x1')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x2cf1('0x1')]},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0x2cf1('0x1')]},'agentcalledAt':{'type':Sequelize[_0x2cf1('0x2')]},'agentconnectAt':{'type':Sequelize['DATE']},'agentcompleteAt':{'type':Sequelize[_0x2cf1('0x2')]},'agentringnoanswerAt':{'type':Sequelize[_0x2cf1('0x2')]},'agentdumpAt':{'type':Sequelize[_0x2cf1('0x2')]},'holdtime':{'type':Sequelize[_0x2cf1('0x3')]},'agentcomplete':{'type':Sequelize[_0x2cf1('0x4')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0x2cf1('0x4')],'defaultValue':![]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x2cf1('0x3')]},'reason':{'type':Sequelize[_0x2cf1('0x1')]},'lastevent':{'type':Sequelize[_0x2cf1('0x1')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0x2cf1('0x1')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0x2cf1('0x1')]},'language':{'type':Sequelize[_0x2cf1('0x1')]},'accountcode':{'type':Sequelize[_0x2cf1('0x1')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x2cf1('0x1')]},'destchannel':{'type':Sequelize[_0x2cf1('0x1')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0x2cf1('0x1')]},'destcalleridnum':{'type':Sequelize[_0x2cf1('0x1')]},'destcalleridname':{'type':Sequelize[_0x2cf1('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0x2cf1('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x2cf1('0x1')]},'destlanguage':{'type':Sequelize[_0x2cf1('0x1')]},'destaccountcode':{'type':Sequelize[_0x2cf1('0x1')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x2cf1('0x1')]},'destpriority':{'type':Sequelize[_0x2cf1('0x1')]},'destuniqueid':{'type':Sequelize[_0x2cf1('0x1')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0x2cf1('0x1')]},'answeredelsewheremembername':{'type':Sequelize[_0x2cf1('0x1')]},'transfer':{'type':Sequelize[_0x2cf1('0x4')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x2cf1('0x1')],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize['STRING']},'transferuniqueid':{'type':Sequelize['STRING']},'agententerreason':{'type':Sequelize[_0x2cf1('0x3')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/voiceAgentReport.controller.js b/server/api/voiceAgentReport/voiceAgentReport.controller.js
index 76119a0..258e802 100644
--- a/server/api/voiceAgentReport/voiceAgentReport.controller.js
+++ b/server/api/voiceAgentReport/voiceAgentReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x41e7=['catch','show','find','create','update','body','params','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','util','path','sox','ejs','squel','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','type','key','field','options','includeAll','include','rows'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x41e7,0x175));var _0x741e=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x41e7[_0x19e35c];return _0x3e1fe8;};'use strict';var pdf=require(_0x741e('0x0'));var emlformat=require(_0x741e('0x1'));var rimraf=require(_0x741e('0x2'));var zipdir=require(_0x741e('0x3'));var jsonpatch=require(_0x741e('0x4'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x741e('0x5'));var Mustache=require('mustache');var util=require(_0x741e('0x6'));var path=require(_0x741e('0x7'));var sox=require(_0x741e('0x8'));var csv=require('to-csv');var ejs=require(_0x741e('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x741e('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x741e('0xb'));var toCsv=require(_0x741e('0xc'));var querystring=require(_0x741e('0xd'));var Papa=require(_0x741e('0xe'));var Redis=require(_0x741e('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x741e('0x10'));var hardwareService=require(_0x741e('0x11'));var logger=require(_0x741e('0x12'))(_0x741e('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x741e('0x14'))['db'];function respondWithStatusCode(_0x3a12b0,_0x175a24){_0x175a24=_0x175a24||0xcc;return function(_0x4f26a0){if(_0x4f26a0){return _0x3a12b0[_0x741e('0x15')](_0x175a24);}return _0x3a12b0[_0x741e('0x16')](_0x175a24)[_0x741e('0x17')]();};}function respondWithResult(_0x53feb1,_0x4a768e){_0x4a768e=_0x4a768e||0xc8;return function(_0x6d3daa){if(_0x6d3daa){return _0x53feb1['status'](_0x4a768e)[_0x741e('0x18')](_0x6d3daa);}};}function respondWithFilteredResult(_0x717bff,_0x44cdfd){return function(_0x3e5aa9){if(_0x3e5aa9){var _0x1f7ea8=_0x3e5aa9[_0x741e('0x19')],_0x1021cc=_0x44cdfd[_0x741e('0x1a')],_0x17d8bb=_0x44cdfd[_0x741e('0x1a')]+_0x44cdfd['limit'],_0x5b0ee4;if(_0x17d8bb>=_0x1f7ea8){_0x17d8bb=_0x1f7ea8;_0x5b0ee4=0xc8;}else{_0x5b0ee4=0xce;}_0x717bff[_0x741e('0x16')](_0x5b0ee4);return _0x717bff[_0x741e('0x1b')](_0x741e('0x1c'),_0x1021cc+'-'+_0x17d8bb+'/'+_0x1f7ea8)[_0x741e('0x18')](_0x3e5aa9);}return null;};}function patchUpdates(_0xb9e487){return function(_0xfc5d13){try{jsonpatch[_0x741e('0x1d')](_0xfc5d13,_0xb9e487,!![]);}catch(_0x2be15c){return BPromise[_0x741e('0x1e')](_0x2be15c);}return _0xfc5d13[_0x741e('0x1f')]();};}function saveUpdates(_0x44aa3c,_0x1beec1){return function(_0x15f3f6){if(_0x15f3f6){return _0x15f3f6['update'](_0x44aa3c)[_0x741e('0x20')](function(_0x2b3a54){return _0x2b3a54;});}return null;};}function removeEntity(_0xd039f5,_0x36152f){return function(_0x1f48bd){if(_0x1f48bd){return _0x1f48bd[_0x741e('0x21')]()[_0x741e('0x20')](function(){_0xd039f5[_0x741e('0x16')](0xcc)[_0x741e('0x17')]();});}};}function handleEntityNotFound(_0x3cf3f7,_0x53d0d4){return function(_0x1ba07b){if(!_0x1ba07b){_0x3cf3f7['sendStatus'](0x194);}return _0x1ba07b;};}function handleError(_0x1b2ed9,_0x2443f2){_0x2443f2=_0x2443f2||0x1f4;return function(_0x50a83f){logger['error'](_0x50a83f[_0x741e('0x22')]);if(_0x50a83f[_0x741e('0x23')]){delete _0x50a83f[_0x741e('0x23')];}_0x1b2ed9[_0x741e('0x16')](_0x2443f2)[_0x741e('0x24')](_0x50a83f);};}exports[_0x741e('0x25')]=function(_0x1bf73f,_0xa3faed){var _0x5d615e={},_0x2f7a68={},_0x312091={'count':0x0,'rows':[]};var _0x3afbea=db[_0x741e('0x26')][_0x741e('0x27')];_0x2f7a68[_0x741e('0x28')]=_[_0x741e('0x29')](_0x3afbea);_0x2f7a68['query']=_[_0x741e('0x29')](_0x1bf73f[_0x741e('0x2a')]);_0x2f7a68[_0x741e('0x2b')]=_[_0x741e('0x2c')](_0x2f7a68['model'],_0x2f7a68[_0x741e('0x2a')]);_0x5d615e[_0x741e('0x2d')]=_[_0x741e('0x2c')](_0x2f7a68[_0x741e('0x28')],qs[_0x741e('0x2e')](_0x1bf73f[_0x741e('0x2a')][_0x741e('0x2e')]));_0x5d615e[_0x741e('0x2d')]=_0x5d615e[_0x741e('0x2d')][_0x741e('0x2f')]?_0x5d615e[_0x741e('0x2d')]:_0x2f7a68[_0x741e('0x28')];if(!_0x1bf73f[_0x741e('0x2a')][_0x741e('0x30')](_0x741e('0x31'))){_0x5d615e['limit']=qs[_0x741e('0x32')](_0x1bf73f['query'][_0x741e('0x32')]);_0x5d615e[_0x741e('0x1a')]=qs[_0x741e('0x1a')](_0x1bf73f[_0x741e('0x2a')]['offset']);}_0x5d615e[_0x741e('0x33')]=qs[_0x741e('0x34')](_0x1bf73f[_0x741e('0x2a')][_0x741e('0x34')]);_0x5d615e[_0x741e('0x35')]=qs['filters'](_[_0x741e('0x36')](_0x1bf73f['query'],_0x2f7a68[_0x741e('0x2b')]));if(_0x1bf73f['query'][_0x741e('0x37')]){_0x5d615e[_0x741e('0x35')]=_[_0x741e('0x38')](_0x5d615e[_0x741e('0x35')],{'$or':_[_0x741e('0x39')](_0x3afbea,function(_0x5b7657){if(_0x5b7657[_0x741e('0x3a')][_0x741e('0x3b')]!=='VIRTUAL'){var _0x6fbf2c={};_0x6fbf2c[_0x5b7657[_0x741e('0x3c')]]={'$like':'%'+_0x1bf73f[_0x741e('0x2a')][_0x741e('0x37')]+'%'};return _0x6fbf2c;}})});}_0x5d615e=_[_0x741e('0x38')]({},_0x5d615e,_0x1bf73f[_0x741e('0x3d')]);var _0xf0f8e8={'where':_0x5d615e[_0x741e('0x35')]};return db[_0x741e('0x26')][_0x741e('0x19')](_0xf0f8e8)[_0x741e('0x20')](function(_0x57b4f5){_0x312091[_0x741e('0x19')]=_0x57b4f5;if(_0x1bf73f['query'][_0x741e('0x3e')]){_0x5d615e[_0x741e('0x3f')]=[{'all':!![]}];}return db[_0x741e('0x26')]['findAll'](_0x5d615e);})[_0x741e('0x20')](function(_0x9ca8a7){_0x312091[_0x741e('0x40')]=_0x9ca8a7;return _0x312091;})[_0x741e('0x20')](respondWithFilteredResult(_0xa3faed,_0x5d615e))[_0x741e('0x41')](handleError(_0xa3faed,null));};exports[_0x741e('0x42')]=function(_0x3a09ce,_0x7f2286){var _0x41ec4b={'raw':![],'where':{'id':_0x3a09ce['params']['id']}},_0x1e3532={};_0x1e3532[_0x741e('0x28')]=_[_0x741e('0x29')](db[_0x741e('0x26')][_0x741e('0x27')]);_0x1e3532[_0x741e('0x2a')]=_[_0x741e('0x29')](_0x3a09ce['query']);_0x1e3532[_0x741e('0x2b')]=_[_0x741e('0x2c')](_0x1e3532[_0x741e('0x28')],_0x1e3532[_0x741e('0x2a')]);_0x41ec4b[_0x741e('0x2d')]=_[_0x741e('0x2c')](_0x1e3532['model'],qs['fields'](_0x3a09ce[_0x741e('0x2a')][_0x741e('0x2e')]));_0x41ec4b[_0x741e('0x2d')]=_0x41ec4b[_0x741e('0x2d')][_0x741e('0x2f')]?_0x41ec4b[_0x741e('0x2d')]:_0x1e3532[_0x741e('0x28')];if(_0x3a09ce[_0x741e('0x2a')]['includeAll']){_0x41ec4b[_0x741e('0x3f')]=[{'all':!![]}];}_0x41ec4b=_[_0x741e('0x38')]({},_0x41ec4b,_0x3a09ce[_0x741e('0x3d')]);return db[_0x741e('0x26')][_0x741e('0x43')](_0x41ec4b)[_0x741e('0x20')](handleEntityNotFound(_0x7f2286,null))[_0x741e('0x20')](respondWithResult(_0x7f2286,null))['catch'](handleError(_0x7f2286,null));};exports[_0x741e('0x44')]=function(_0x576110,_0x5b3256){return db[_0x741e('0x26')][_0x741e('0x44')](_0x576110['body'],{})[_0x741e('0x20')](respondWithResult(_0x5b3256,0xc9))['catch'](handleError(_0x5b3256,null));};exports[_0x741e('0x45')]=function(_0x5a26b2,_0x21a67d){if(_0x5a26b2[_0x741e('0x46')]['id']){delete _0x5a26b2[_0x741e('0x46')]['id'];}return db[_0x741e('0x26')][_0x741e('0x43')]({'where':{'id':_0x5a26b2[_0x741e('0x47')]['id']}})[_0x741e('0x20')](handleEntityNotFound(_0x21a67d,null))['then'](saveUpdates(_0x5a26b2[_0x741e('0x46')],null))['then'](respondWithResult(_0x21a67d,null))[_0x741e('0x41')](handleError(_0x21a67d,null));};exports[_0x741e('0x21')]=function(_0x46af04,_0x126d81){return db['VoiceAgentReport'][_0x741e('0x43')]({'where':{'id':_0x46af04['params']['id']}})[_0x741e('0x20')](handleEntityNotFound(_0x126d81,null))[_0x741e('0x20')](removeEntity(_0x126d81,null))['catch'](handleError(_0x126d81,null));};exports['describe']=function(_0xea4d3b,_0x3d56e3){return db[_0x741e('0x26')][_0x741e('0x48')]()[_0x741e('0x20')](respondWithResult(_0x3d56e3,null))['catch'](handleError(_0x3d56e3,null));};
\ No newline at end of file
+var _0xb140=['model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','filter','where','merge','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','length','catch','create','body','find','params','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','lodash','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','save','update','then','stack','name','send','VoiceAgentReport','rawAttributes'];(function(_0x22da61,_0x237ba9){var _0x40b728=function(_0x24db93){while(--_0x24db93){_0x22da61['push'](_0x22da61['shift']());}};_0x40b728(++_0x237ba9);}(_0xb140,0x132));var _0x0b14=function(_0x459ee0,_0x1e950d){_0x459ee0=_0x459ee0-0x0;var _0x1b87c8=_0xb140[_0x459ee0];return _0x1b87c8;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x0b14('0x0'));var rimraf=require(_0x0b14('0x1'));var zipdir=require(_0x0b14('0x2'));var jsonpatch=require(_0x0b14('0x3'));var rp=require(_0x0b14('0x4'));var moment=require(_0x0b14('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0b14('0x6'));var util=require(_0x0b14('0x7'));var path=require('path');var sox=require(_0x0b14('0x8'));var csv=require(_0x0b14('0x9'));var ejs=require(_0x0b14('0xa'));var fs=require('fs');var _=require(_0x0b14('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x0b14('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x0b14('0x9'));var querystring=require(_0x0b14('0xd'));var Papa=require(_0x0b14('0xe'));var Redis=require(_0x0b14('0xf'));var authService=require(_0x0b14('0x10'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x0b14('0x11'));var logger=require('../../config/logger')(_0x0b14('0x12'));var utils=require(_0x0b14('0x13'));var config=require(_0x0b14('0x14'));var db=require(_0x0b14('0x15'))['db'];function respondWithStatusCode(_0x5f27a4,_0x2cc02b){_0x2cc02b=_0x2cc02b||0xcc;return function(_0x385b67){if(_0x385b67){return _0x5f27a4[_0x0b14('0x16')](_0x2cc02b);}return _0x5f27a4[_0x0b14('0x17')](_0x2cc02b)[_0x0b14('0x18')]();};}function respondWithResult(_0x48757e,_0x47553f){_0x47553f=_0x47553f||0xc8;return function(_0x4b6a36){if(_0x4b6a36){return _0x48757e['status'](_0x47553f)[_0x0b14('0x19')](_0x4b6a36);}};}function respondWithFilteredResult(_0x3df385,_0x169719){return function(_0x1786ec){if(_0x1786ec){var _0x5373ae=_0x1786ec[_0x0b14('0x1a')],_0x32c28b=_0x169719['offset'],_0x56bd76=_0x169719[_0x0b14('0x1b')]+_0x169719[_0x0b14('0x1c')],_0xd913df;if(_0x56bd76>=_0x5373ae){_0x56bd76=_0x5373ae;_0xd913df=0xc8;}else{_0xd913df=0xce;}_0x3df385[_0x0b14('0x17')](_0xd913df);return _0x3df385[_0x0b14('0x1d')](_0x0b14('0x1e'),_0x32c28b+'-'+_0x56bd76+'/'+_0x5373ae)[_0x0b14('0x19')](_0x1786ec);}return null;};}function patchUpdates(_0x232947){return function(_0x58018b){try{jsonpatch['apply'](_0x58018b,_0x232947,!![]);}catch(_0xf8f796){return BPromise['reject'](_0xf8f796);}return _0x58018b[_0x0b14('0x1f')]();};}function saveUpdates(_0x3b6ccf,_0x4d72a6){return function(_0xbd13cb){if(_0xbd13cb){return _0xbd13cb[_0x0b14('0x20')](_0x3b6ccf)[_0x0b14('0x21')](function(_0x1464db){return _0x1464db;});}return null;};}function removeEntity(_0x5cd9b9,_0x408911){return function(_0x282b4e){if(_0x282b4e){return _0x282b4e['destroy']()[_0x0b14('0x21')](function(){_0x5cd9b9['status'](0xcc)[_0x0b14('0x18')]();});}};}function handleEntityNotFound(_0x35056f,_0x4f273b){return function(_0x549fd9){if(!_0x549fd9){_0x35056f[_0x0b14('0x16')](0x194);}return _0x549fd9;};}function handleError(_0x5c18d9,_0x367fbe){_0x367fbe=_0x367fbe||0x1f4;return function(_0x58e7e3){logger['error'](_0x58e7e3[_0x0b14('0x22')]);if(_0x58e7e3[_0x0b14('0x23')]){delete _0x58e7e3[_0x0b14('0x23')];}_0x5c18d9['status'](_0x367fbe)[_0x0b14('0x24')](_0x58e7e3);};}exports['index']=function(_0x415652,_0x106681){var _0xdf1a92={},_0x298980={},_0xc63a84={'count':0x0,'rows':[]};var _0xd92bd9=db[_0x0b14('0x25')][_0x0b14('0x26')];_0x298980[_0x0b14('0x27')]=_[_0x0b14('0x28')](_0xd92bd9);_0x298980['query']=_[_0x0b14('0x28')](_0x415652[_0x0b14('0x29')]);_0x298980[_0x0b14('0x2a')]=_[_0x0b14('0x2b')](_0x298980[_0x0b14('0x27')],_0x298980[_0x0b14('0x29')]);_0xdf1a92[_0x0b14('0x2c')]=_[_0x0b14('0x2b')](_0x298980[_0x0b14('0x27')],qs[_0x0b14('0x2d')](_0x415652[_0x0b14('0x29')][_0x0b14('0x2d')]));_0xdf1a92[_0x0b14('0x2c')]=_0xdf1a92[_0x0b14('0x2c')]['length']?_0xdf1a92[_0x0b14('0x2c')]:_0x298980[_0x0b14('0x27')];if(!_0x415652[_0x0b14('0x29')][_0x0b14('0x2e')](_0x0b14('0x2f'))){_0xdf1a92['limit']=qs[_0x0b14('0x1c')](_0x415652[_0x0b14('0x29')][_0x0b14('0x1c')]);_0xdf1a92[_0x0b14('0x1b')]=qs['offset'](_0x415652['query'][_0x0b14('0x1b')]);}_0xdf1a92['order']=qs[_0x0b14('0x30')](_0x415652[_0x0b14('0x29')][_0x0b14('0x30')]);_0xdf1a92['where']=qs[_0x0b14('0x2a')](_['pick'](_0x415652[_0x0b14('0x29')],_0x298980[_0x0b14('0x2a')]));if(_0x415652[_0x0b14('0x29')][_0x0b14('0x31')]){_0xdf1a92[_0x0b14('0x32')]=_[_0x0b14('0x33')](_0xdf1a92[_0x0b14('0x32')],{'$or':_['map'](_0xd92bd9,function(_0x52bff3){if(_0x52bff3['type'][_0x0b14('0x34')]!==_0x0b14('0x35')){var _0x22eb6e={};_0x22eb6e[_0x52bff3[_0x0b14('0x36')]]={'$like':'%'+_0x415652[_0x0b14('0x29')][_0x0b14('0x31')]+'%'};return _0x22eb6e;}})});}_0xdf1a92=_['merge']({},_0xdf1a92,_0x415652[_0x0b14('0x37')]);var _0x3c1714={'where':_0xdf1a92[_0x0b14('0x32')]};return db[_0x0b14('0x25')]['count'](_0x3c1714)['then'](function(_0x51fc39){_0xc63a84[_0x0b14('0x1a')]=_0x51fc39;if(_0x415652['query'][_0x0b14('0x38')]){_0xdf1a92[_0x0b14('0x39')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0b14('0x3a')](_0xdf1a92);})[_0x0b14('0x21')](function(_0x341db0){_0xc63a84[_0x0b14('0x3b')]=_0x341db0;return _0xc63a84;})[_0x0b14('0x21')](respondWithFilteredResult(_0x106681,_0xdf1a92))['catch'](handleError(_0x106681,null));};exports[_0x0b14('0x3c')]=function(_0x42d8fb,_0x50768e){var _0x5158f1={'raw':![],'where':{'id':_0x42d8fb['params']['id']}},_0x3915a8={};_0x3915a8[_0x0b14('0x27')]=_['keys'](db[_0x0b14('0x25')][_0x0b14('0x26')]);_0x3915a8[_0x0b14('0x29')]=_[_0x0b14('0x28')](_0x42d8fb[_0x0b14('0x29')]);_0x3915a8[_0x0b14('0x2a')]=_[_0x0b14('0x2b')](_0x3915a8[_0x0b14('0x27')],_0x3915a8['query']);_0x5158f1[_0x0b14('0x2c')]=_['intersection'](_0x3915a8[_0x0b14('0x27')],qs[_0x0b14('0x2d')](_0x42d8fb[_0x0b14('0x29')][_0x0b14('0x2d')]));_0x5158f1[_0x0b14('0x2c')]=_0x5158f1['attributes'][_0x0b14('0x3d')]?_0x5158f1[_0x0b14('0x2c')]:_0x3915a8[_0x0b14('0x27')];if(_0x42d8fb[_0x0b14('0x29')][_0x0b14('0x38')]){_0x5158f1['include']=[{'all':!![]}];}_0x5158f1=_['merge']({},_0x5158f1,_0x42d8fb[_0x0b14('0x37')]);return db['VoiceAgentReport']['find'](_0x5158f1)['then'](handleEntityNotFound(_0x50768e,null))['then'](respondWithResult(_0x50768e,null))[_0x0b14('0x3e')](handleError(_0x50768e,null));};exports[_0x0b14('0x3f')]=function(_0x2ad13c,_0x4bb25b){return db[_0x0b14('0x25')][_0x0b14('0x3f')](_0x2ad13c['body'],{})[_0x0b14('0x21')](respondWithResult(_0x4bb25b,0xc9))['catch'](handleError(_0x4bb25b,null));};exports[_0x0b14('0x20')]=function(_0x28d028,_0x23b36c){if(_0x28d028[_0x0b14('0x40')]['id']){delete _0x28d028[_0x0b14('0x40')]['id'];}return db[_0x0b14('0x25')][_0x0b14('0x41')]({'where':{'id':_0x28d028[_0x0b14('0x42')]['id']}})['then'](handleEntityNotFound(_0x23b36c,null))[_0x0b14('0x21')](saveUpdates(_0x28d028[_0x0b14('0x40')],null))['then'](respondWithResult(_0x23b36c,null))[_0x0b14('0x3e')](handleError(_0x23b36c,null));};exports[_0x0b14('0x43')]=function(_0x17179e,_0x32ac07){return db[_0x0b14('0x25')]['find']({'where':{'id':_0x17179e['params']['id']}})[_0x0b14('0x21')](handleEntityNotFound(_0x32ac07,null))['then'](removeEntity(_0x32ac07,null))[_0x0b14('0x3e')](handleError(_0x32ac07,null));};exports[_0x0b14('0x44')]=function(_0x3a781f,_0x2536a5){return db[_0x0b14('0x25')][_0x0b14('0x44')]()[_0x0b14('0x21')](respondWithResult(_0x2536a5,null))[_0x0b14('0x3e')](handleError(_0x2536a5,null));};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/voiceAgentReport.model.js b/server/api/voiceAgentReport/voiceAgentReport.model.js
index 205dcbd..38fd86e 100644
--- a/server/api/voiceAgentReport/voiceAgentReport.model.js
+++ b/server/api/voiceAgentReport/voiceAgentReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac1b=['define','VoiceAgentReport','report_agent','uniqueid','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceAgentReport.attributes','exports'];(function(_0x30621e,_0x1bec0c){var _0x561226=function(_0x3974cd){while(--_0x3974cd){_0x30621e['push'](_0x30621e['shift']());}};_0x561226(++_0x1bec0c);}(_0xac1b,0x146));var _0xbac1=function(_0x4cca28,_0x20a0f9){_0x4cca28=_0x4cca28-0x0;var _0x42bbff=_0xac1b[_0x4cca28];return _0x42bbff;};'use strict';var _=require(_0xbac1('0x0'));var util=require(_0xbac1('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbac1('0x2'));var BPromise=require(_0xbac1('0x3'));var rp=require(_0xbac1('0x4'));var fs=require('fs');var path=require(_0xbac1('0x5'));var rimraf=require(_0xbac1('0x6'));var config=require(_0xbac1('0x7'));var attributes=require(_0xbac1('0x8'));module[_0xbac1('0x9')]=function(_0x35b734,_0x1d9316){return _0x35b734[_0xbac1('0xa')](_0xbac1('0xb'),attributes,{'tableName':_0xbac1('0xc'),'paranoid':![],'indexes':[{'fields':[_0xbac1('0xd'),'destuniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa046=['report_agent','destuniqueid','lodash','util','../../config/logger','moment','path','rimraf','../../config/environment','./voiceAgentReport.attributes','exports','define','VoiceAgentReport'];(function(_0x3f3f40,_0x4e745f){var _0x32c366=function(_0x343f6a){while(--_0x343f6a){_0x3f3f40['push'](_0x3f3f40['shift']());}};_0x32c366(++_0x4e745f);}(_0xa046,0xab));var _0x6a04=function(_0x177b56,_0xf790ca){_0x177b56=_0x177b56-0x0;var _0x434738=_0xa046[_0x177b56];return _0x434738;};'use strict';var _=require(_0x6a04('0x0'));var util=require(_0x6a04('0x1'));var logger=require(_0x6a04('0x2'))('api');var moment=require(_0x6a04('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x6a04('0x4'));var rimraf=require(_0x6a04('0x5'));var config=require(_0x6a04('0x6'));var attributes=require(_0x6a04('0x7'));module[_0x6a04('0x8')]=function(_0x2c1a1e,_0x30510d){return _0x2c1a1e[_0x6a04('0x9')](_0x6a04('0xa'),attributes,{'tableName':_0x6a04('0xb'),'paranoid':![],'indexes':[{'fields':['uniqueid',_0x6a04('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/voiceAgentReport.rpc.js b/server/api/voiceAgentReport/voiceAgentReport.rpc.js
index 4a904f6..ecf1eb9 100644
--- a/server/api/voiceAgentReport/voiceAgentReport.rpc.js
+++ b/server/api/voiceAgentReport/voiceAgentReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x814b=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateVoiceAgentReport','body','raw','stringify','VoiceAgentReport','update','options','where','attributes','limit','UpdateVoiceAgentReport','lodash','util'];(function(_0x3ab99a,_0x3ce898){var _0x454822=function(_0x11e3ef){while(--_0x11e3ef){_0x3ab99a['push'](_0x3ab99a['shift']());}};_0x454822(++_0x3ce898);}(_0x814b,0x1a2));var _0xb814=function(_0x1627ae,_0x2aaa24){_0x1627ae=_0x1627ae-0x0;var _0x34b38f=_0x814b[_0x1627ae];return _0x34b38f;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var moment=require(_0xb814('0x2'));var BPromise=require(_0xb814('0x3'));var rs=require(_0xb814('0x4'));var fs=require('fs');var Redis=require(_0xb814('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xb814('0x6'));var logger=require(_0xb814('0x7'))(_0xb814('0x8'));var config=require(_0xb814('0x9'));var jayson=require(_0xb814('0xa'));var client=jayson[_0xb814('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3b0829,_0x2e6272,_0x5c8539){return new BPromise(function(_0x271af9,_0x2913a6){return client[_0xb814('0xc')](_0x3b0829,_0x5c8539)[_0xb814('0xd')](function(_0x1fea33){logger[_0xb814('0xe')](_0xb814('0xf'),_0x2e6272,_0xb814('0x10'));logger[_0xb814('0x11')](_0xb814('0x12'),_0x2e6272,_0xb814('0x10'),JSON['stringify'](_0x1fea33));if(_0x1fea33[_0xb814('0x13')]){if(_0x1fea33['error'][_0xb814('0x14')]===0x1f4){logger[_0xb814('0x13')](_0xb814('0xf'),_0x2e6272,_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);return _0x2913a6(_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);}logger[_0xb814('0x13')](_0xb814('0xf'),_0x2e6272,_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);return _0x271af9(_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);}else{logger[_0xb814('0xe')](_0xb814('0xf'),_0x2e6272,_0xb814('0x10'));_0x271af9(_0x1fea33[_0xb814('0x16')][_0xb814('0x15')]);}})[_0xb814('0x17')](function(_0x21b73f){logger[_0xb814('0x13')]('VoiceAgentReport,\x20%s,\x20%s',_0x2e6272,_0x21b73f);_0x2913a6(_0x21b73f);});});}exports[_0xb814('0x18')]=function(_0x55ba16){var _0x270598=this;return new Promise(function(_0xfac75b,_0x4c3007){return db['VoiceAgentReport']['create'](_0x55ba16[_0xb814('0x19')],{'raw':_0x55ba16['options']?_0x55ba16['options'][_0xb814('0x1a')]===undefined?!![]:![]:!![]})[_0xb814('0xd')](function(_0x25b6b6){logger['info'](_0xb814('0x18'),_0x55ba16);logger['debug'](_0xb814('0x18'),_0x55ba16,JSON[_0xb814('0x1b')](_0x25b6b6));_0xfac75b(_0x25b6b6);})[_0xb814('0x17')](function(_0x470e81){logger[_0xb814('0x13')](_0xb814('0x18'),_0x470e81[_0xb814('0x15')],_0x55ba16);_0x4c3007(_0x270598['error'](0x1f4,_0x470e81[_0xb814('0x15')]));});});};exports['UpdateVoiceAgentReport']=function(_0x3f81d0){var _0x457dac=this;return new Promise(function(_0x31c7ec,_0x208927){return db[_0xb814('0x1c')][_0xb814('0x1d')](_0x3f81d0[_0xb814('0x19')],{'raw':_0x3f81d0['options']?_0x3f81d0[_0xb814('0x1e')][_0xb814('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f81d0[_0xb814('0x1e')]?_0x3f81d0[_0xb814('0x1e')][_0xb814('0x1f')]||null:null,'attributes':_0x3f81d0[_0xb814('0x1e')]?_0x3f81d0[_0xb814('0x1e')][_0xb814('0x20')]||null:null,'limit':_0x3f81d0['options']?_0x3f81d0[_0xb814('0x1e')][_0xb814('0x21')]||null:null})['then'](function(_0x9008b2){logger[_0xb814('0xe')](_0xb814('0x22'),_0x3f81d0);logger['debug'](_0xb814('0x22'),_0x3f81d0,JSON[_0xb814('0x1b')](_0x9008b2));_0x31c7ec(_0x9008b2);})['catch'](function(_0x338a28){logger['error'](_0xb814('0x22'),_0x338a28['message'],_0x3f81d0);_0x208927(_0x457dac['error'](0x1f4,_0x338a28[_0xb814('0x15')]));});});};
\ No newline at end of file
+var _0x7a54=['moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','VoiceAgentReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','VoiceAgentReport','create','body','options','raw','CreateVoiceAgentReport','UpdateVoiceAgentReport','update','where','attributes','limit','then','lodash','util'];(function(_0x3237eb,_0x125122){var _0x2d7c8c=function(_0x6ca6b5){while(--_0x6ca6b5){_0x3237eb['push'](_0x3237eb['shift']());}};_0x2d7c8c(++_0x125122);}(_0x7a54,0x106));var _0x47a5=function(_0xd28a33,_0x417963){_0xd28a33=_0xd28a33-0x0;var _0x50d39c=_0x7a54[_0xd28a33];return _0x50d39c;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['CreateVoiceAgentReport']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateVoiceAgentReport',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});};exports[_0x47a5('0x1b')]=function(_0x513981){var _0x28747d=this;return new Promise(function(_0xc4cd63,_0x4437f1){return db[_0x47a5('0x15')][_0x47a5('0x1c')](_0x513981['body'],{'raw':_0x513981['options']?_0x513981[_0x47a5('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x513981[_0x47a5('0x18')]?_0x513981['options'][_0x47a5('0x1d')]||null:null,'attributes':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1e')]||null:null,'limit':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1f')]||null:null})[_0x47a5('0x20')](function(_0x16631f){logger[_0x47a5('0xb')](_0x47a5('0x1b'),_0x513981);logger[_0x47a5('0xd')](_0x47a5('0x1b'),_0x513981,JSON['stringify'](_0x16631f));_0xc4cd63(_0x16631f);})[_0x47a5('0x14')](function(_0x51833b){logger[_0x47a5('0xf')](_0x47a5('0x1b'),_0x51833b[_0x47a5('0x11')],_0x513981);_0x4437f1(_0x28747d['error'](0x1f4,_0x51833b[_0x47a5('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/index.js b/server/api/voiceCallReport/index.js
index 3b38ebb..517affd 100644
--- a/server/api/voiceCallReport/index.js
+++ b/server/api/voiceCallReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x78fc=['util','express','Router','../../components/interaction/service','./voiceCallReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','put','delete','exports'];(function(_0x341c05,_0x23e674){var _0x10ffeb=function(_0x2665e8){while(--_0x2665e8){_0x341c05['push'](_0x341c05['shift']());}};_0x10ffeb(++_0x23e674);}(_0x78fc,0x195));var _0xc78f=function(_0x374ccf,_0xa945c4){_0x374ccf=_0x374ccf-0x0;var _0x443cde=_0x78fc[_0x374ccf];return _0x443cde;};'use strict';var multer=require('multer');var util=require(_0xc78f('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xc78f('0x1'));var router=express[_0xc78f('0x2')]();var auth=require('../../components/auth/service');var interaction=require(_0xc78f('0x3'));var config=require('../../config/environment');var controller=require(_0xc78f('0x4'));router[_0xc78f('0x5')]('/',auth[_0xc78f('0x6')](),controller[_0xc78f('0x7')]);router['get'](_0xc78f('0x8'),auth['isAuthenticated'](),controller[_0xc78f('0x9')]);router[_0xc78f('0x5')](_0xc78f('0xa'),auth[_0xc78f('0x6')](),controller['show']);router[_0xc78f('0xb')]('/',auth[_0xc78f('0x6')](),controller['create']);router[_0xc78f('0xc')](_0xc78f('0xa'),auth[_0xc78f('0x6')](),controller['update']);router[_0xc78f('0xd')](_0xc78f('0xa'),auth[_0xc78f('0x6')](),controller['destroy']);module[_0xc78f('0xe')]=router;
\ No newline at end of file
+var _0xa7cd=['create','put','/:id','update','delete','destroy','multer','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','./voiceCallReport.controller','index','get','isAuthenticated','describe'];(function(_0x3cf920,_0x3be623){var _0x1db19c=function(_0x60dcd4){while(--_0x60dcd4){_0x3cf920['push'](_0x3cf920['shift']());}};_0x1db19c(++_0x3be623);}(_0xa7cd,0x15c));var _0xda7c=function(_0x2e4fbe,_0xe928df){_0x2e4fbe=_0x2e4fbe-0x0;var _0x35a27d=_0xa7cd[_0x2e4fbe];return _0x35a27d;};'use strict';var multer=require(_0xda7c('0x0'));var util=require(_0xda7c('0x1'));var path=require(_0xda7c('0x2'));var timeout=require(_0xda7c('0x3'));var express=require(_0xda7c('0x4'));var router=express['Router']();var auth=require(_0xda7c('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xda7c('0x6'));var controller=require(_0xda7c('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xda7c('0x8')]);router[_0xda7c('0x9')]('/describe',auth[_0xda7c('0xa')](),controller[_0xda7c('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0xda7c('0xa')](),controller[_0xda7c('0xc')]);router[_0xda7c('0xd')](_0xda7c('0xe'),auth[_0xda7c('0xa')](),controller[_0xda7c('0xf')]);router[_0xda7c('0x10')](_0xda7c('0xe'),auth[_0xda7c('0xa')](),controller[_0xda7c('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.attributes.js b/server/api/voiceCallReport/voiceCallReport.attributes.js
index c488115..8c6e456 100644
--- a/server/api/voiceCallReport/voiceCallReport.attributes.js
+++ b/server/api/voiceCallReport/voiceCallReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd6f8=['sequelize','exports','STRING','ENUM','inbound','outbound','inbound-fax','dialer','TEXT','DATE','INTEGER'];(function(_0x11fd50,_0x5c6aa2){var _0x38b70f=function(_0x5714c0){while(--_0x5714c0){_0x11fd50['push'](_0x11fd50['shift']());}};_0x38b70f(++_0x5c6aa2);}(_0xd6f8,0x9a));var _0x8d6f=function(_0x428dbd,_0x30eeb5){_0x428dbd=_0x428dbd-0x0;var _0xc411d8=_0xd6f8[_0x428dbd];return _0xc411d8;};'use strict';var Sequelize=require(_0x8d6f('0x0'));module[_0x8d6f('0x1')]={'uniqueid':{'type':Sequelize[_0x8d6f('0x2')]},'type':{'type':Sequelize[_0x8d6f('0x3')](_0x8d6f('0x4'),'internal',_0x8d6f('0x5'),_0x8d6f('0x6'),'outbound-fax',_0x8d6f('0x7'))},'tag':{'type':Sequelize[_0x8d6f('0x2')]},'accountcode':{'type':Sequelize[_0x8d6f('0x2')]},'source':{'type':Sequelize[_0x8d6f('0x2')]},'destination':{'type':Sequelize[_0x8d6f('0x2')]},'destinationcontext':{'type':Sequelize[_0x8d6f('0x2')]},'callerid':{'type':Sequelize[_0x8d6f('0x2')]},'channel':{'type':Sequelize['STRING']},'destinationchannel':{'type':Sequelize[_0x8d6f('0x2')]},'lastapplication':{'type':Sequelize[_0x8d6f('0x2')]},'lastdata':{'type':Sequelize[_0x8d6f('0x8')]},'starttime':{'type':Sequelize[_0x8d6f('0x9')]},'systemanswertime':{'type':Sequelize[_0x8d6f('0x9')]},'answertime':{'type':Sequelize[_0x8d6f('0x9')]},'endtime':{'type':Sequelize[_0x8d6f('0x9')]},'duration':{'type':Sequelize[_0x8d6f('0xa')]},'billableseconds':{'type':Sequelize[_0x8d6f('0xa')]},'mohtime':{'type':Sequelize[_0x8d6f('0xa')],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x8d6f('0x2')]},'amaflags':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0x8d6f('0x2')]},'userDisposition':{'type':Sequelize[_0x8d6f('0x2')]},'note':{'type':Sequelize[_0x8d6f('0x2')]},'prefix':{'type':Sequelize[_0x8d6f('0x2')]},'routeid':{'type':Sequelize['INTEGER']},'sipcallid':{'type':Sequelize[_0x8d6f('0x2')]}};
\ No newline at end of file
+var _0x7f03=['sequelize','exports','STRING','inbound','outbound','outbound-fax','dialer','TEXT','DATE','INTEGER'];(function(_0x5ecadc,_0x1cf9f1){var _0x565037=function(_0x22908b){while(--_0x22908b){_0x5ecadc['push'](_0x5ecadc['shift']());}};_0x565037(++_0x1cf9f1);}(_0x7f03,0x1ae));var _0x37f0=function(_0x8652ac,_0x5485c2){_0x8652ac=_0x8652ac-0x0;var _0x4eeb2b=_0x7f03[_0x8652ac];return _0x4eeb2b;};'use strict';var Sequelize=require(_0x37f0('0x0'));module[_0x37f0('0x1')]={'uniqueid':{'type':Sequelize[_0x37f0('0x2')]},'type':{'type':Sequelize['ENUM'](_0x37f0('0x3'),'internal',_0x37f0('0x4'),'inbound-fax',_0x37f0('0x5'),_0x37f0('0x6'))},'tag':{'type':Sequelize[_0x37f0('0x2')]},'accountcode':{'type':Sequelize[_0x37f0('0x2')]},'source':{'type':Sequelize[_0x37f0('0x2')]},'destination':{'type':Sequelize[_0x37f0('0x2')]},'destinationcontext':{'type':Sequelize[_0x37f0('0x2')]},'callerid':{'type':Sequelize[_0x37f0('0x2')]},'channel':{'type':Sequelize[_0x37f0('0x2')]},'destinationchannel':{'type':Sequelize[_0x37f0('0x2')]},'lastapplication':{'type':Sequelize[_0x37f0('0x2')]},'lastdata':{'type':Sequelize[_0x37f0('0x7')]},'starttime':{'type':Sequelize[_0x37f0('0x8')]},'systemanswertime':{'type':Sequelize[_0x37f0('0x8')]},'answertime':{'type':Sequelize[_0x37f0('0x8')]},'endtime':{'type':Sequelize[_0x37f0('0x8')]},'duration':{'type':Sequelize[_0x37f0('0x9')]},'billableseconds':{'type':Sequelize[_0x37f0('0x9')]},'mohtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize[_0x37f0('0x2')]},'note':{'type':Sequelize['STRING']},'prefix':{'type':Sequelize['STRING']},'routeid':{'type':Sequelize[_0x37f0('0x9')]},'sipcallid':{'type':Sequelize[_0x37f0('0x2')]}};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.controller.js b/server/api/voiceCallReport/voiceCallReport.controller.js
index 7632e94..86bad99 100644
--- a/server/api/voiceCallReport/voiceCallReport.controller.js
+++ b/server/api/voiceCallReport/voiceCallReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe706=['fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','VoiceCallReport','rawAttributes','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','include','fullname','alias','User','findAll','rows','catch','params','find','create','body','describe','uniqueid','user','html-pdf','eml-format','rimraf'];(function(_0x5b78e8,_0x55096b){var _0xf2c321=function(_0x4e0cff){while(--_0x4e0cff){_0x5b78e8['push'](_0x5b78e8['shift']());}};_0xf2c321(++_0x55096b);}(_0xe706,0xa3));var _0x6e70=function(_0x5cc30e,_0x2646b6){_0x5cc30e=_0x5cc30e-0x0;var _0x208c6d=_0xe706[_0x5cc30e];return _0x208c6d;};'use strict';var pdf=require(_0x6e70('0x0'));var emlformat=require(_0x6e70('0x1'));var rimraf=require(_0x6e70('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6e70('0x3'));var rp=require(_0x6e70('0x4'));var moment=require(_0x6e70('0x5'));var BPromise=require(_0x6e70('0x6'));var Mustache=require(_0x6e70('0x7'));var util=require(_0x6e70('0x8'));var path=require(_0x6e70('0x9'));var sox=require(_0x6e70('0xa'));var csv=require(_0x6e70('0xb'));var ejs=require(_0x6e70('0xc'));var fs=require('fs');var _=require(_0x6e70('0xd'));var squel=require(_0x6e70('0xe'));var crypto=require(_0x6e70('0xf'));var jsforce=require(_0x6e70('0x10'));var deskjs=require(_0x6e70('0x11'));var toCsv=require(_0x6e70('0xb'));var querystring=require(_0x6e70('0x12'));var Papa=require(_0x6e70('0x13'));var Redis=require(_0x6e70('0x14'));var authService=require(_0x6e70('0x15'));var qs=require(_0x6e70('0x16'));var hardwareService=require(_0x6e70('0x17'));var logger=require(_0x6e70('0x18'))(_0x6e70('0x19'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x6e70('0x1a'))['db'];function respondWithStatusCode(_0x15a1a5,_0x18cf27){_0x18cf27=_0x18cf27||0xcc;return function(_0x27dd9b){if(_0x27dd9b){return _0x15a1a5[_0x6e70('0x1b')](_0x18cf27);}return _0x15a1a5[_0x6e70('0x1c')](_0x18cf27)[_0x6e70('0x1d')]();};}function respondWithResult(_0x181005,_0x5dfbaa){_0x5dfbaa=_0x5dfbaa||0xc8;return function(_0x52737e){if(_0x52737e){return _0x181005['status'](_0x5dfbaa)[_0x6e70('0x1e')](_0x52737e);}};}function respondWithFilteredResult(_0x5a37a6,_0x53aed0){return function(_0x304716){if(_0x304716){var _0x22c50c=_0x304716[_0x6e70('0x1f')],_0x5d9263=_0x53aed0[_0x6e70('0x20')],_0x24f3ac=_0x53aed0['offset']+_0x53aed0['limit'],_0x5c3fe7;if(_0x24f3ac>=_0x22c50c){_0x24f3ac=_0x22c50c;_0x5c3fe7=0xc8;}else{_0x5c3fe7=0xce;}_0x5a37a6[_0x6e70('0x1c')](_0x5c3fe7);return _0x5a37a6['set'](_0x6e70('0x21'),_0x5d9263+'-'+_0x24f3ac+'/'+_0x22c50c)[_0x6e70('0x1e')](_0x304716);}return null;};}function patchUpdates(_0x53acdc){return function(_0x497d61){try{jsonpatch[_0x6e70('0x22')](_0x497d61,_0x53acdc,!![]);}catch(_0x208e21){return BPromise[_0x6e70('0x23')](_0x208e21);}return _0x497d61[_0x6e70('0x24')]();};}function saveUpdates(_0x3af484,_0xcdf9f2){return function(_0x1b2453){if(_0x1b2453){return _0x1b2453[_0x6e70('0x25')](_0x3af484)[_0x6e70('0x26')](function(_0xb29a2a){return _0xb29a2a;});}return null;};}function removeEntity(_0x4a0cfe,_0x228350){return function(_0x344b65){if(_0x344b65){return _0x344b65[_0x6e70('0x27')]()['then'](function(){_0x4a0cfe[_0x6e70('0x1c')](0xcc)[_0x6e70('0x1d')]();});}};}function handleEntityNotFound(_0x3337a6,_0x50da2c){return function(_0x10fc91){if(!_0x10fc91){_0x3337a6['sendStatus'](0x194);}return _0x10fc91;};}function handleError(_0x50aec2,_0x4e97c7){_0x4e97c7=_0x4e97c7||0x1f4;return function(_0x41e352){logger[_0x6e70('0x28')](_0x41e352['stack']);if(_0x41e352[_0x6e70('0x29')]){delete _0x41e352[_0x6e70('0x29')];}_0x50aec2['status'](_0x4e97c7)[_0x6e70('0x2a')](_0x41e352);};}exports[_0x6e70('0x2b')]=function(_0x2bb231,_0x4a67ac){var _0x54a5fe={},_0x2c4d37={},_0x3af17f={'count':0x0,'rows':[]};var _0x83c836=db[_0x6e70('0x2c')][_0x6e70('0x2d')];_0x2c4d37['model']=_[_0x6e70('0x2e')](_0x83c836);_0x2c4d37[_0x6e70('0x2f')]=_[_0x6e70('0x2e')](_0x2bb231[_0x6e70('0x2f')]);_0x2c4d37[_0x6e70('0x30')]=_[_0x6e70('0x31')](_0x2c4d37[_0x6e70('0x32')],_0x2c4d37[_0x6e70('0x2f')]);_0x54a5fe[_0x6e70('0x33')]=_[_0x6e70('0x31')](_0x2c4d37['model'],qs[_0x6e70('0x34')](_0x2bb231['query'][_0x6e70('0x34')]));_0x54a5fe['attributes']=_0x54a5fe[_0x6e70('0x33')][_0x6e70('0x35')]?_0x54a5fe[_0x6e70('0x33')]:_0x2c4d37['model'];if(!_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x36')]('nolimit')){_0x54a5fe[_0x6e70('0x37')]=qs[_0x6e70('0x37')](_0x2bb231['query'][_0x6e70('0x37')]);_0x54a5fe[_0x6e70('0x20')]=qs[_0x6e70('0x20')](_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x20')]);}_0x54a5fe[_0x6e70('0x38')]=qs[_0x6e70('0x39')](_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x39')]);_0x54a5fe[_0x6e70('0x3a')]=qs['filters'](_[_0x6e70('0x3b')](_0x2bb231['query'],_0x2c4d37[_0x6e70('0x30')]));if(_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x3c')]){_0x54a5fe[_0x6e70('0x3a')]=_[_0x6e70('0x3d')](_0x54a5fe[_0x6e70('0x3a')],{'$or':_[_0x6e70('0x3e')](_0x83c836,function(_0xdd0bee){if(_0xdd0bee[_0x6e70('0x3f')][_0x6e70('0x40')]!==_0x6e70('0x41')){var _0x23d5e2={};_0x23d5e2[_0xdd0bee[_0x6e70('0x42')]]={'$like':'%'+_0x2bb231['query']['filter']+'%'};return _0x23d5e2;}})});}_0x54a5fe=_['merge']({},_0x54a5fe,_0x2bb231[_0x6e70('0x43')]);var _0x3841a0={'where':_0x54a5fe[_0x6e70('0x3a')]};return db[_0x6e70('0x2c')][_0x6e70('0x1f')](_0x3841a0)[_0x6e70('0x26')](function(_0x572a71){_0x3af17f[_0x6e70('0x1f')]=_0x572a71;if(_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x44')]){_0x54a5fe[_0x6e70('0x45')]=[{'attributes':['id',_0x6e70('0x29'),_0x6e70('0x46'),_0x6e70('0x47')],'model':db[_0x6e70('0x48')],'as':'User'}];}return db[_0x6e70('0x2c')][_0x6e70('0x49')](_0x54a5fe);})[_0x6e70('0x26')](function(_0x31cad2){_0x3af17f[_0x6e70('0x4a')]=_0x31cad2;return _0x3af17f;})[_0x6e70('0x26')](respondWithFilteredResult(_0x4a67ac,_0x54a5fe))[_0x6e70('0x4b')](handleError(_0x4a67ac,null));};exports['show']=function(_0x56ea6e,_0x5ae898){var _0x154e0c={'raw':!![],'where':{'id':_0x56ea6e[_0x6e70('0x4c')]['id']}},_0x2b63cc={};_0x2b63cc[_0x6e70('0x32')]=_[_0x6e70('0x2e')](db['VoiceCallReport'][_0x6e70('0x2d')]);_0x2b63cc[_0x6e70('0x2f')]=_[_0x6e70('0x2e')](_0x56ea6e['query']);_0x2b63cc['filters']=_['intersection'](_0x2b63cc[_0x6e70('0x32')],_0x2b63cc['query']);_0x154e0c[_0x6e70('0x33')]=_[_0x6e70('0x31')](_0x2b63cc[_0x6e70('0x32')],qs[_0x6e70('0x34')](_0x56ea6e['query'][_0x6e70('0x34')]));_0x154e0c['attributes']=_0x154e0c[_0x6e70('0x33')][_0x6e70('0x35')]?_0x154e0c[_0x6e70('0x33')]:_0x2b63cc[_0x6e70('0x32')];if(_0x56ea6e['query'][_0x6e70('0x44')]){_0x154e0c[_0x6e70('0x45')]=[{'all':!![]}];}_0x154e0c=_[_0x6e70('0x3d')]({},_0x154e0c,_0x56ea6e[_0x6e70('0x43')]);return db[_0x6e70('0x2c')][_0x6e70('0x4d')](_0x154e0c)[_0x6e70('0x26')](handleEntityNotFound(_0x5ae898,null))['then'](respondWithResult(_0x5ae898,null))[_0x6e70('0x4b')](handleError(_0x5ae898,null));};exports[_0x6e70('0x4e')]=function(_0x10de2a,_0x2f99cb){return db[_0x6e70('0x2c')][_0x6e70('0x4e')](_0x10de2a[_0x6e70('0x4f')],{})['then'](respondWithResult(_0x2f99cb,0xc9))[_0x6e70('0x4b')](handleError(_0x2f99cb,null));};exports['destroy']=function(_0x11794e,_0x3836e4){return db['VoiceCallReport']['find']({'where':{'id':_0x11794e[_0x6e70('0x4c')]['id']}})[_0x6e70('0x26')](handleEntityNotFound(_0x3836e4,null))[_0x6e70('0x26')](removeEntity(_0x3836e4,null))['catch'](handleError(_0x3836e4,null));};exports['describe']=function(_0x238ebb,_0x11ac3d){return db[_0x6e70('0x2c')][_0x6e70('0x50')]()[_0x6e70('0x26')](respondWithResult(_0x11ac3d,null))[_0x6e70('0x4b')](handleError(_0x11ac3d,null));};exports['update']=function(_0x756a5b,_0x3aa1a6){if(_0x756a5b[_0x6e70('0x4f')][_0x6e70('0x51')]){delete _0x756a5b[_0x6e70('0x4f')]['uniqueid'];}return db['VoiceCallReport'][_0x6e70('0x4d')]({'where':{'uniqueid':_0x756a5b[_0x6e70('0x4c')]['id'],'UserId':{'$or':[null,_0x756a5b[_0x6e70('0x52')]['id']]}}})[_0x6e70('0x26')](handleEntityNotFound(_0x3aa1a6,null))[_0x6e70('0x26')](saveUpdates(_0x756a5b['body'],null))[_0x6e70('0x26')](respondWithResult(_0x3aa1a6,null))[_0x6e70('0x4b')](handleError(_0x3aa1a6,null));};
\ No newline at end of file
+var _0xe706=['fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','VoiceCallReport','rawAttributes','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','include','fullname','alias','User','findAll','rows','catch','params','find','create','body','describe','uniqueid','user','html-pdf','eml-format','rimraf'];(function(_0x2714ec,_0x36daa4){var _0x2608e5=function(_0x408468){while(--_0x408468){_0x2714ec['push'](_0x2714ec['shift']());}};_0x2608e5(++_0x36daa4);}(_0xe706,0xa3));var _0x6e70=function(_0x21aec3,_0x5c97e9){_0x21aec3=_0x21aec3-0x0;var _0x288bbc=_0xe706[_0x21aec3];return _0x288bbc;};'use strict';var pdf=require(_0x6e70('0x0'));var emlformat=require(_0x6e70('0x1'));var rimraf=require(_0x6e70('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6e70('0x3'));var rp=require(_0x6e70('0x4'));var moment=require(_0x6e70('0x5'));var BPromise=require(_0x6e70('0x6'));var Mustache=require(_0x6e70('0x7'));var util=require(_0x6e70('0x8'));var path=require(_0x6e70('0x9'));var sox=require(_0x6e70('0xa'));var csv=require(_0x6e70('0xb'));var ejs=require(_0x6e70('0xc'));var fs=require('fs');var _=require(_0x6e70('0xd'));var squel=require(_0x6e70('0xe'));var crypto=require(_0x6e70('0xf'));var jsforce=require(_0x6e70('0x10'));var deskjs=require(_0x6e70('0x11'));var toCsv=require(_0x6e70('0xb'));var querystring=require(_0x6e70('0x12'));var Papa=require(_0x6e70('0x13'));var Redis=require(_0x6e70('0x14'));var authService=require(_0x6e70('0x15'));var qs=require(_0x6e70('0x16'));var hardwareService=require(_0x6e70('0x17'));var logger=require(_0x6e70('0x18'))(_0x6e70('0x19'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x6e70('0x1a'))['db'];function respondWithStatusCode(_0x15a1a5,_0x18cf27){_0x18cf27=_0x18cf27||0xcc;return function(_0x27dd9b){if(_0x27dd9b){return _0x15a1a5[_0x6e70('0x1b')](_0x18cf27);}return _0x15a1a5[_0x6e70('0x1c')](_0x18cf27)[_0x6e70('0x1d')]();};}function respondWithResult(_0x181005,_0x5dfbaa){_0x5dfbaa=_0x5dfbaa||0xc8;return function(_0x52737e){if(_0x52737e){return _0x181005['status'](_0x5dfbaa)[_0x6e70('0x1e')](_0x52737e);}};}function respondWithFilteredResult(_0x5a37a6,_0x53aed0){return function(_0x304716){if(_0x304716){var _0x22c50c=_0x304716[_0x6e70('0x1f')],_0x5d9263=_0x53aed0[_0x6e70('0x20')],_0x24f3ac=_0x53aed0['offset']+_0x53aed0['limit'],_0x5c3fe7;if(_0x24f3ac>=_0x22c50c){_0x24f3ac=_0x22c50c;_0x5c3fe7=0xc8;}else{_0x5c3fe7=0xce;}_0x5a37a6[_0x6e70('0x1c')](_0x5c3fe7);return _0x5a37a6['set'](_0x6e70('0x21'),_0x5d9263+'-'+_0x24f3ac+'/'+_0x22c50c)[_0x6e70('0x1e')](_0x304716);}return null;};}function patchUpdates(_0x53acdc){return function(_0x497d61){try{jsonpatch[_0x6e70('0x22')](_0x497d61,_0x53acdc,!![]);}catch(_0x208e21){return BPromise[_0x6e70('0x23')](_0x208e21);}return _0x497d61[_0x6e70('0x24')]();};}function saveUpdates(_0x3af484,_0xcdf9f2){return function(_0x1b2453){if(_0x1b2453){return _0x1b2453[_0x6e70('0x25')](_0x3af484)[_0x6e70('0x26')](function(_0xb29a2a){return _0xb29a2a;});}return null;};}function removeEntity(_0x4a0cfe,_0x228350){return function(_0x344b65){if(_0x344b65){return _0x344b65[_0x6e70('0x27')]()['then'](function(){_0x4a0cfe[_0x6e70('0x1c')](0xcc)[_0x6e70('0x1d')]();});}};}function handleEntityNotFound(_0x3337a6,_0x50da2c){return function(_0x10fc91){if(!_0x10fc91){_0x3337a6['sendStatus'](0x194);}return _0x10fc91;};}function handleError(_0x50aec2,_0x4e97c7){_0x4e97c7=_0x4e97c7||0x1f4;return function(_0x41e352){logger[_0x6e70('0x28')](_0x41e352['stack']);if(_0x41e352[_0x6e70('0x29')]){delete _0x41e352[_0x6e70('0x29')];}_0x50aec2['status'](_0x4e97c7)[_0x6e70('0x2a')](_0x41e352);};}exports[_0x6e70('0x2b')]=function(_0x2bb231,_0x4a67ac){var _0x54a5fe={},_0x2c4d37={},_0x3af17f={'count':0x0,'rows':[]};var _0x83c836=db[_0x6e70('0x2c')][_0x6e70('0x2d')];_0x2c4d37['model']=_[_0x6e70('0x2e')](_0x83c836);_0x2c4d37[_0x6e70('0x2f')]=_[_0x6e70('0x2e')](_0x2bb231[_0x6e70('0x2f')]);_0x2c4d37[_0x6e70('0x30')]=_[_0x6e70('0x31')](_0x2c4d37[_0x6e70('0x32')],_0x2c4d37[_0x6e70('0x2f')]);_0x54a5fe[_0x6e70('0x33')]=_[_0x6e70('0x31')](_0x2c4d37['model'],qs[_0x6e70('0x34')](_0x2bb231['query'][_0x6e70('0x34')]));_0x54a5fe['attributes']=_0x54a5fe[_0x6e70('0x33')][_0x6e70('0x35')]?_0x54a5fe[_0x6e70('0x33')]:_0x2c4d37['model'];if(!_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x36')]('nolimit')){_0x54a5fe[_0x6e70('0x37')]=qs[_0x6e70('0x37')](_0x2bb231['query'][_0x6e70('0x37')]);_0x54a5fe[_0x6e70('0x20')]=qs[_0x6e70('0x20')](_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x20')]);}_0x54a5fe[_0x6e70('0x38')]=qs[_0x6e70('0x39')](_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x39')]);_0x54a5fe[_0x6e70('0x3a')]=qs['filters'](_[_0x6e70('0x3b')](_0x2bb231['query'],_0x2c4d37[_0x6e70('0x30')]));if(_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x3c')]){_0x54a5fe[_0x6e70('0x3a')]=_[_0x6e70('0x3d')](_0x54a5fe[_0x6e70('0x3a')],{'$or':_[_0x6e70('0x3e')](_0x83c836,function(_0xdd0bee){if(_0xdd0bee[_0x6e70('0x3f')][_0x6e70('0x40')]!==_0x6e70('0x41')){var _0x23d5e2={};_0x23d5e2[_0xdd0bee[_0x6e70('0x42')]]={'$like':'%'+_0x2bb231['query']['filter']+'%'};return _0x23d5e2;}})});}_0x54a5fe=_['merge']({},_0x54a5fe,_0x2bb231[_0x6e70('0x43')]);var _0x3841a0={'where':_0x54a5fe[_0x6e70('0x3a')]};return db[_0x6e70('0x2c')][_0x6e70('0x1f')](_0x3841a0)[_0x6e70('0x26')](function(_0x572a71){_0x3af17f[_0x6e70('0x1f')]=_0x572a71;if(_0x2bb231[_0x6e70('0x2f')][_0x6e70('0x44')]){_0x54a5fe[_0x6e70('0x45')]=[{'attributes':['id',_0x6e70('0x29'),_0x6e70('0x46'),_0x6e70('0x47')],'model':db[_0x6e70('0x48')],'as':'User'}];}return db[_0x6e70('0x2c')][_0x6e70('0x49')](_0x54a5fe);})[_0x6e70('0x26')](function(_0x31cad2){_0x3af17f[_0x6e70('0x4a')]=_0x31cad2;return _0x3af17f;})[_0x6e70('0x26')](respondWithFilteredResult(_0x4a67ac,_0x54a5fe))[_0x6e70('0x4b')](handleError(_0x4a67ac,null));};exports['show']=function(_0x56ea6e,_0x5ae898){var _0x154e0c={'raw':!![],'where':{'id':_0x56ea6e[_0x6e70('0x4c')]['id']}},_0x2b63cc={};_0x2b63cc[_0x6e70('0x32')]=_[_0x6e70('0x2e')](db['VoiceCallReport'][_0x6e70('0x2d')]);_0x2b63cc[_0x6e70('0x2f')]=_[_0x6e70('0x2e')](_0x56ea6e['query']);_0x2b63cc['filters']=_['intersection'](_0x2b63cc[_0x6e70('0x32')],_0x2b63cc['query']);_0x154e0c[_0x6e70('0x33')]=_[_0x6e70('0x31')](_0x2b63cc[_0x6e70('0x32')],qs[_0x6e70('0x34')](_0x56ea6e['query'][_0x6e70('0x34')]));_0x154e0c['attributes']=_0x154e0c[_0x6e70('0x33')][_0x6e70('0x35')]?_0x154e0c[_0x6e70('0x33')]:_0x2b63cc[_0x6e70('0x32')];if(_0x56ea6e['query'][_0x6e70('0x44')]){_0x154e0c[_0x6e70('0x45')]=[{'all':!![]}];}_0x154e0c=_[_0x6e70('0x3d')]({},_0x154e0c,_0x56ea6e[_0x6e70('0x43')]);return db[_0x6e70('0x2c')][_0x6e70('0x4d')](_0x154e0c)[_0x6e70('0x26')](handleEntityNotFound(_0x5ae898,null))['then'](respondWithResult(_0x5ae898,null))[_0x6e70('0x4b')](handleError(_0x5ae898,null));};exports[_0x6e70('0x4e')]=function(_0x10de2a,_0x2f99cb){return db[_0x6e70('0x2c')][_0x6e70('0x4e')](_0x10de2a[_0x6e70('0x4f')],{})['then'](respondWithResult(_0x2f99cb,0xc9))[_0x6e70('0x4b')](handleError(_0x2f99cb,null));};exports['destroy']=function(_0x11794e,_0x3836e4){return db['VoiceCallReport']['find']({'where':{'id':_0x11794e[_0x6e70('0x4c')]['id']}})[_0x6e70('0x26')](handleEntityNotFound(_0x3836e4,null))[_0x6e70('0x26')](removeEntity(_0x3836e4,null))['catch'](handleError(_0x3836e4,null));};exports['describe']=function(_0x238ebb,_0x11ac3d){return db[_0x6e70('0x2c')][_0x6e70('0x50')]()[_0x6e70('0x26')](respondWithResult(_0x11ac3d,null))[_0x6e70('0x4b')](handleError(_0x11ac3d,null));};exports['update']=function(_0x756a5b,_0x3aa1a6){if(_0x756a5b[_0x6e70('0x4f')][_0x6e70('0x51')]){delete _0x756a5b[_0x6e70('0x4f')]['uniqueid'];}return db['VoiceCallReport'][_0x6e70('0x4d')]({'where':{'uniqueid':_0x756a5b[_0x6e70('0x4c')]['id'],'UserId':{'$or':[null,_0x756a5b[_0x6e70('0x52')]['id']]}}})[_0x6e70('0x26')](handleEntityNotFound(_0x3aa1a6,null))[_0x6e70('0x26')](saveUpdates(_0x756a5b['body'],null))[_0x6e70('0x26')](respondWithResult(_0x3aa1a6,null))[_0x6e70('0x4b')](handleError(_0x3aa1a6,null));};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.model.js b/server/api/voiceCallReport/voiceCallReport.model.js
index fcf4522..ab3ce5c 100644
--- a/server/api/voiceCallReport/voiceCallReport.model.js
+++ b/server/api/voiceCallReport/voiceCallReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe9e5=['exports','define','VoiceCallReport','report_call','uniqueid','lodash','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./voiceCallReport.attributes'];(function(_0x4c6265,_0x499bc9){var _0x19e126=function(_0x471729){while(--_0x471729){_0x4c6265['push'](_0x4c6265['shift']());}};_0x19e126(++_0x499bc9);}(_0xe9e5,0x1bf));var _0x5e9e=function(_0x4014e1,_0x4b210b){_0x4014e1=_0x4014e1-0x0;var _0x9a7cb0=_0xe9e5[_0x4014e1];return _0x9a7cb0;};'use strict';var _=require(_0x5e9e('0x0'));var util=require('util');var logger=require(_0x5e9e('0x1'))(_0x5e9e('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x5e9e('0x3'));var fs=require('fs');var path=require(_0x5e9e('0x4'));var rimraf=require(_0x5e9e('0x5'));var config=require(_0x5e9e('0x6'));var attributes=require(_0x5e9e('0x7'));module[_0x5e9e('0x8')]=function(_0x171a3d,_0x41e6d6){return _0x171a3d[_0x5e9e('0x9')](_0x5e9e('0xa'),attributes,{'tableName':_0x5e9e('0xb'),'paranoid':![],'indexes':[{'fields':[_0x5e9e('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xe596=['./voiceCallReport.attributes','define','VoiceCallReport','report_call','uniqueid','lodash','util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x23ad03,_0x368a53){var _0x83df94=function(_0x35dced){while(--_0x35dced){_0x23ad03['push'](_0x23ad03['shift']());}};_0x83df94(++_0x368a53);}(_0xe596,0x10d));var _0x6e59=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xe596[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x6e59('0x0'));var util=require(_0x6e59('0x1'));var logger=require(_0x6e59('0x2'))('api');var moment=require('moment');var BPromise=require(_0x6e59('0x3'));var rp=require(_0x6e59('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6e59('0x5'));var config=require(_0x6e59('0x6'));var attributes=require(_0x6e59('0x7'));module['exports']=function(_0x1338db,_0x1aa732){return _0x1338db[_0x6e59('0x8')](_0x6e59('0x9'),attributes,{'tableName':_0x6e59('0xa'),'paranoid':![],'indexes':[{'fields':[_0x6e59('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.rpc.js b/server/api/voiceCallReport/voiceCallReport.rpc.js
index 790e5aa..3d9725c 100644
--- a/server/api/voiceCallReport/voiceCallReport.rpc.js
+++ b/server/api/voiceCallReport/voiceCallReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf0d6=['include','map','model','then','catch','body','CreateVoiceCallReport','UpdateVoiceCallReport','update','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','GetVoiceCallReport','VoiceCallReport','options','raw','where','attributes','limit'];(function(_0xb56e7a,_0xb59712){var _0x534734=function(_0x356959){while(--_0x356959){_0xb56e7a['push'](_0xb56e7a['shift']());}};_0x534734(++_0xb59712);}(_0xf0d6,0x99));var _0x6f0d=function(_0x4ae664,_0x110897){_0x4ae664=_0x4ae664-0x0;var _0x43a45d=_0xf0d6[_0x4ae664];return _0x43a45d;};'use strict';var _=require('lodash');var util=require(_0x6f0d('0x0'));var moment=require('moment');var BPromise=require(_0x6f0d('0x1'));var rs=require(_0x6f0d('0x2'));var fs=require('fs');var Redis=require(_0x6f0d('0x3'));var db=require(_0x6f0d('0x4'))['db'];var utils=require(_0x6f0d('0x5'));var logger=require(_0x6f0d('0x6'))(_0x6f0d('0x7'));var config=require('../../config/environment');var jayson=require(_0x6f0d('0x8'));var client=jayson[_0x6f0d('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x166481,_0x330cce,_0x3480f6){return new BPromise(function(_0x1d021a,_0x41d2eb){return client[_0x6f0d('0xa')](_0x166481,_0x3480f6)['then'](function(_0x50a8cc){logger['info'](_0x6f0d('0xb'),_0x330cce,_0x6f0d('0xc'));logger[_0x6f0d('0xd')](_0x6f0d('0xe'),_0x330cce,_0x6f0d('0xc'),JSON[_0x6f0d('0xf')](_0x50a8cc));if(_0x50a8cc[_0x6f0d('0x10')]){if(_0x50a8cc[_0x6f0d('0x10')][_0x6f0d('0x11')]===0x1f4){logger[_0x6f0d('0x10')](_0x6f0d('0xb'),_0x330cce,_0x50a8cc[_0x6f0d('0x10')][_0x6f0d('0x12')]);return _0x41d2eb(_0x50a8cc[_0x6f0d('0x10')]['message']);}logger['error'](_0x6f0d('0xb'),_0x330cce,_0x50a8cc[_0x6f0d('0x10')][_0x6f0d('0x12')]);return _0x1d021a(_0x50a8cc['error']['message']);}else{logger[_0x6f0d('0x13')](_0x6f0d('0xb'),_0x330cce,_0x6f0d('0xc'));_0x1d021a(_0x50a8cc['result'][_0x6f0d('0x12')]);}})['catch'](function(_0x58805f){logger[_0x6f0d('0x10')](_0x6f0d('0xb'),_0x330cce,_0x58805f);_0x41d2eb(_0x58805f);});});}exports[_0x6f0d('0x14')]=function(_0x585df1){var _0x16e932=this;return new Promise(function(_0x5b8d45,_0x19dd64){return db[_0x6f0d('0x15')]['findAll']({'raw':_0x585df1['options']?_0x585df1[_0x6f0d('0x16')][_0x6f0d('0x17')]===undefined?!![]:![]:!![],'where':_0x585df1[_0x6f0d('0x16')]?_0x585df1[_0x6f0d('0x16')][_0x6f0d('0x18')]||null:null,'attributes':_0x585df1[_0x6f0d('0x16')]?_0x585df1[_0x6f0d('0x16')][_0x6f0d('0x19')]||null:null,'limit':_0x585df1[_0x6f0d('0x16')]?_0x585df1[_0x6f0d('0x16')][_0x6f0d('0x1a')]||null:null,'include':_0x585df1[_0x6f0d('0x16')]?_0x585df1[_0x6f0d('0x16')][_0x6f0d('0x1b')]?_[_0x6f0d('0x1c')](_0x585df1[_0x6f0d('0x16')][_0x6f0d('0x1b')],function(_0x157584){return{'model':db[_0x157584[_0x6f0d('0x1d')]],'as':_0x157584['as'],'attributes':_0x157584[_0x6f0d('0x19')],'include':_0x157584[_0x6f0d('0x1b')]?_[_0x6f0d('0x1c')](_0x157584[_0x6f0d('0x1b')],function(_0x2aaa0c){return{'model':db[_0x2aaa0c[_0x6f0d('0x1d')]],'as':_0x2aaa0c['as'],'attributes':_0x2aaa0c['attributes'],'include':_0x2aaa0c[_0x6f0d('0x1b')]?_[_0x6f0d('0x1c')](_0x2aaa0c[_0x6f0d('0x1b')],function(_0x484861){return{'model':db[_0x484861['model']],'as':_0x484861['as'],'attributes':_0x484861[_0x6f0d('0x19')]};}):[]};}):[]};}):[]:[]})[_0x6f0d('0x1e')](function(_0x5a1960){logger['info'](_0x6f0d('0x14'),_0x585df1);logger[_0x6f0d('0xd')](_0x6f0d('0x14'),_0x585df1,JSON['stringify'](_0x5a1960));_0x5b8d45(_0x5a1960);})[_0x6f0d('0x1f')](function(_0x239086){logger[_0x6f0d('0x10')]('GetVoiceCallReport',_0x239086[_0x6f0d('0x12')],_0x585df1);_0x19dd64(_0x16e932[_0x6f0d('0x10')](0x1f4,_0x239086[_0x6f0d('0x12')]));});});};exports['CreateVoiceCallReport']=function(_0x304f37){var _0x1bed0c=this;return new Promise(function(_0x4a3718,_0x5228a9){return db[_0x6f0d('0x15')]['create'](_0x304f37[_0x6f0d('0x20')],{'raw':_0x304f37['options']?_0x304f37[_0x6f0d('0x16')][_0x6f0d('0x17')]===undefined?!![]:![]:!![]})[_0x6f0d('0x1e')](function(_0x24f60b){logger[_0x6f0d('0x13')](_0x6f0d('0x21'),_0x304f37);logger[_0x6f0d('0xd')]('CreateVoiceCallReport',_0x304f37,JSON[_0x6f0d('0xf')](_0x24f60b));_0x4a3718(_0x24f60b);})['catch'](function(_0x50b687){logger[_0x6f0d('0x10')](_0x6f0d('0x21'),_0x50b687['message'],_0x304f37);_0x5228a9(_0x1bed0c[_0x6f0d('0x10')](0x1f4,_0x50b687[_0x6f0d('0x12')]));});});};exports[_0x6f0d('0x22')]=function(_0x24bba0){var _0x28d5ca=this;return new Promise(function(_0x469d8e,_0x9152bc){return db[_0x6f0d('0x15')][_0x6f0d('0x23')](_0x24bba0[_0x6f0d('0x20')],{'raw':_0x24bba0[_0x6f0d('0x16')]?_0x24bba0[_0x6f0d('0x16')][_0x6f0d('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x24bba0[_0x6f0d('0x16')]?_0x24bba0['options'][_0x6f0d('0x18')]||null:null,'attributes':_0x24bba0['options']?_0x24bba0['options'][_0x6f0d('0x19')]||null:null,'limit':_0x24bba0['options']?_0x24bba0['options']['limit']||null:null})['then'](function(_0x5a87c4){logger['info']('UpdateVoiceCallReport',_0x24bba0);logger[_0x6f0d('0xd')](_0x6f0d('0x22'),_0x24bba0,JSON[_0x6f0d('0xf')](_0x5a87c4));_0x469d8e(_0x5a87c4);})[_0x6f0d('0x1f')](function(_0x35982f){logger[_0x6f0d('0x10')](_0x6f0d('0x22'),_0x35982f[_0x6f0d('0x12')],_0x24bba0);_0x9152bc(_0x28d5ca[_0x6f0d('0x10')](0x1f4,_0x35982f['message']));});});};
\ No newline at end of file
+var _0xe31e=['../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','GetVoiceCallReport','VoiceCallReport','options','raw','where','attributes','limit','include','map','model','CreateVoiceCallReport','body','catch','UpdateVoiceCallReport','randomstring','ioredis'];(function(_0x3162a0,_0x23f7e2){var _0x4f67a1=function(_0x2164aa){while(--_0x2164aa){_0x3162a0['push'](_0x3162a0['shift']());}};_0x4f67a1(++_0x23f7e2);}(_0xe31e,0x1de));var _0xee31=function(_0x1c2928,_0x259f3f){_0x1c2928=_0x1c2928-0x0;var _0x56aec4=_0xe31e[_0x1c2928];return _0x56aec4;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xee31('0x0'));var fs=require('fs');var Redis=require(_0xee31('0x1'));var db=require(_0xee31('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0xee31('0x3'))(_0xee31('0x4'));var config=require('../../config/environment');var jayson=require(_0xee31('0x5'));var client=jayson[_0xee31('0x6')][_0xee31('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4c1665,_0x4ea30c,_0x422549){return new BPromise(function(_0x5dcd04,_0x1fc82e){return client['request'](_0x4c1665,_0x422549)[_0xee31('0x8')](function(_0x5b5bb0){logger[_0xee31('0x9')](_0xee31('0xa'),_0x4ea30c,_0xee31('0xb'));logger[_0xee31('0xc')](_0xee31('0xd'),_0x4ea30c,_0xee31('0xb'),JSON[_0xee31('0xe')](_0x5b5bb0));if(_0x5b5bb0['error']){if(_0x5b5bb0['error']['code']===0x1f4){logger['error'](_0xee31('0xa'),_0x4ea30c,_0x5b5bb0[_0xee31('0xf')]['message']);return _0x1fc82e(_0x5b5bb0[_0xee31('0xf')][_0xee31('0x10')]);}logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x4ea30c,_0x5b5bb0[_0xee31('0xf')][_0xee31('0x10')]);return _0x5dcd04(_0x5b5bb0[_0xee31('0xf')]['message']);}else{logger[_0xee31('0x9')](_0xee31('0xa'),_0x4ea30c,_0xee31('0xb'));_0x5dcd04(_0x5b5bb0[_0xee31('0x11')][_0xee31('0x10')]);}})['catch'](function(_0xdf4890){logger[_0xee31('0xf')](_0xee31('0xa'),_0x4ea30c,_0xdf4890);_0x1fc82e(_0xdf4890);});});}exports[_0xee31('0x12')]=function(_0xed275){var _0x522729=this;return new Promise(function(_0x34ed8b,_0xeb37df){return db[_0xee31('0x13')]['findAll']({'raw':_0xed275['options']?_0xed275[_0xee31('0x14')][_0xee31('0x15')]===undefined?!![]:![]:!![],'where':_0xed275[_0xee31('0x14')]?_0xed275[_0xee31('0x14')][_0xee31('0x16')]||null:null,'attributes':_0xed275[_0xee31('0x14')]?_0xed275[_0xee31('0x14')][_0xee31('0x17')]||null:null,'limit':_0xed275[_0xee31('0x14')]?_0xed275[_0xee31('0x14')][_0xee31('0x18')]||null:null,'include':_0xed275['options']?_0xed275[_0xee31('0x14')][_0xee31('0x19')]?_[_0xee31('0x1a')](_0xed275['options'][_0xee31('0x19')],function(_0x25d82f){return{'model':db[_0x25d82f[_0xee31('0x1b')]],'as':_0x25d82f['as'],'attributes':_0x25d82f['attributes'],'include':_0x25d82f[_0xee31('0x19')]?_[_0xee31('0x1a')](_0x25d82f[_0xee31('0x19')],function(_0x551dc){return{'model':db[_0x551dc[_0xee31('0x1b')]],'as':_0x551dc['as'],'attributes':_0x551dc['attributes'],'include':_0x551dc[_0xee31('0x19')]?_['map'](_0x551dc[_0xee31('0x19')],function(_0x10b248){return{'model':db[_0x10b248['model']],'as':_0x10b248['as'],'attributes':_0x10b248[_0xee31('0x17')]};}):[]};}):[]};}):[]:[]})[_0xee31('0x8')](function(_0x2c9bfc){logger[_0xee31('0x9')](_0xee31('0x12'),_0xed275);logger[_0xee31('0xc')](_0xee31('0x12'),_0xed275,JSON[_0xee31('0xe')](_0x2c9bfc));_0x34ed8b(_0x2c9bfc);})['catch'](function(_0x33a5b8){logger[_0xee31('0xf')](_0xee31('0x12'),_0x33a5b8['message'],_0xed275);_0xeb37df(_0x522729[_0xee31('0xf')](0x1f4,_0x33a5b8['message']));});});};exports[_0xee31('0x1c')]=function(_0x2ebcc6){var _0x3aa479=this;return new Promise(function(_0x50e0b7,_0x3ce91f){return db[_0xee31('0x13')]['create'](_0x2ebcc6[_0xee31('0x1d')],{'raw':_0x2ebcc6[_0xee31('0x14')]?_0x2ebcc6[_0xee31('0x14')][_0xee31('0x15')]===undefined?!![]:![]:!![]})['then'](function(_0x1d3b7f){logger['info'](_0xee31('0x1c'),_0x2ebcc6);logger[_0xee31('0xc')]('CreateVoiceCallReport',_0x2ebcc6,JSON[_0xee31('0xe')](_0x1d3b7f));_0x50e0b7(_0x1d3b7f);})[_0xee31('0x1e')](function(_0x2f2ac6){logger[_0xee31('0xf')]('CreateVoiceCallReport',_0x2f2ac6['message'],_0x2ebcc6);_0x3ce91f(_0x3aa479[_0xee31('0xf')](0x1f4,_0x2f2ac6[_0xee31('0x10')]));});});};exports['UpdateVoiceCallReport']=function(_0x2b2170){var _0x29a42c=this;return new Promise(function(_0x3cf6ab,_0x3e57d2){return db[_0xee31('0x13')]['update'](_0x2b2170[_0xee31('0x1d')],{'raw':_0x2b2170[_0xee31('0x14')]?_0x2b2170[_0xee31('0x14')][_0xee31('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2b2170[_0xee31('0x14')]?_0x2b2170['options'][_0xee31('0x16')]||null:null,'attributes':_0x2b2170[_0xee31('0x14')]?_0x2b2170['options'][_0xee31('0x17')]||null:null,'limit':_0x2b2170[_0xee31('0x14')]?_0x2b2170['options'][_0xee31('0x18')]||null:null})[_0xee31('0x8')](function(_0x1b12ef){logger[_0xee31('0x9')](_0xee31('0x1f'),_0x2b2170);logger['debug'](_0xee31('0x1f'),_0x2b2170,JSON[_0xee31('0xe')](_0x1b12ef));_0x3cf6ab(_0x1b12ef);})[_0xee31('0x1e')](function(_0x46e0b1){logger[_0xee31('0xf')](_0xee31('0x1f'),_0x46e0b1[_0xee31('0x10')],_0x2b2170);_0x3e57d2(_0x29a42c[_0xee31('0xf')](0x1f4,_0x46e0b1[_0xee31('0x10')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/index.js b/server/api/voiceChanSpy/index.js
index 5eda252..808d559 100644
--- a/server/api/voiceChanSpy/index.js
+++ b/server/api/voiceChanSpy/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x81e9=['multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceChanSpy.controller','get','isAuthenticated','index','/:id','show','post','put','update','delete','destroy','exports'];(function(_0x28e6c8,_0x4cb727){var _0x384a5f=function(_0x3f4c82){while(--_0x3f4c82){_0x28e6c8['push'](_0x28e6c8['shift']());}};_0x384a5f(++_0x4cb727);}(_0x81e9,0x104));var _0x981e=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x81e9[_0x17d9e3];return _0x14192d;};'use strict';var multer=require(_0x981e('0x0'));var util=require(_0x981e('0x1'));var path=require(_0x981e('0x2'));var timeout=require(_0x981e('0x3'));var express=require(_0x981e('0x4'));var router=express['Router']();var auth=require(_0x981e('0x5'));var interaction=require(_0x981e('0x6'));var config=require(_0x981e('0x7'));var controller=require(_0x981e('0x8'));router[_0x981e('0x9')]('/',auth[_0x981e('0xa')](),controller[_0x981e('0xb')]);router[_0x981e('0x9')](_0x981e('0xc'),auth[_0x981e('0xa')](),controller[_0x981e('0xd')]);router[_0x981e('0xe')]('/',auth[_0x981e('0xa')](),controller['create']);router[_0x981e('0xf')](_0x981e('0xc'),auth[_0x981e('0xa')](),controller[_0x981e('0x10')]);router[_0x981e('0x11')](_0x981e('0xc'),auth[_0x981e('0xa')](),controller[_0x981e('0x12')]);module[_0x981e('0x13')]=router;
\ No newline at end of file
+var _0x5bd0=['./voiceChanSpy.controller','isAuthenticated','index','show','post','create','/:id','delete','exports','multer','path','express','../../components/interaction/service','../../config/environment'];(function(_0x1ee66d,_0x26a049){var _0x274466=function(_0x46b1c8){while(--_0x46b1c8){_0x1ee66d['push'](_0x1ee66d['shift']());}};_0x274466(++_0x26a049);}(_0x5bd0,0x175));var _0x05bd=function(_0x459b74,_0x5773bd){_0x459b74=_0x459b74-0x0;var _0x46cb16=_0x5bd0[_0x459b74];return _0x46cb16;};'use strict';var multer=require(_0x05bd('0x0'));var util=require('util');var path=require(_0x05bd('0x1'));var timeout=require('connect-timeout');var express=require(_0x05bd('0x2'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x05bd('0x3'));var config=require(_0x05bd('0x4'));var controller=require(_0x05bd('0x5'));router['get']('/',auth[_0x05bd('0x6')](),controller[_0x05bd('0x7')]);router['get']('/:id',auth[_0x05bd('0x6')](),controller[_0x05bd('0x8')]);router[_0x05bd('0x9')]('/',auth[_0x05bd('0x6')](),controller[_0x05bd('0xa')]);router['put'](_0x05bd('0xb'),auth[_0x05bd('0x6')](),controller['update']);router[_0x05bd('0xc')]('/:id',auth[_0x05bd('0x6')](),controller['destroy']);module[_0x05bd('0xd')]=router;
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.attributes.js b/server/api/voiceChanSpy/voiceChanSpy.attributes.js
index 01bb216..fbfc16c 100644
--- a/server/api/voiceChanSpy/voiceChanSpy.attributes.js
+++ b/server/api/voiceChanSpy/voiceChanSpy.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa2f5=['options','getDataValue','BOOLEAN','sequelize','exports','STRING'];(function(_0x6b368c,_0x43784a){var _0x422bd2=function(_0x1bdfd8){while(--_0x1bdfd8){_0x6b368c['push'](_0x6b368c['shift']());}};_0x422bd2(++_0x43784a);}(_0xa2f5,0x123));var _0x5a2f=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0xa2f5[_0x160c73];return _0xd9302;};'use strict';var Sequelize=require(_0x5a2f('0x0'));module[_0x5a2f('0x1')]={'name':{'type':Sequelize[_0x5a2f('0x2')]},'prefix':{'type':Sequelize[_0x5a2f('0x2')],'unique':'name','allowNull':![]},'options':{'type':Sequelize[_0x5a2f('0x2')],'set':function(_0x3bab41){this['setDataValue'](_0x5a2f('0x3'),_0x3bab41?_0x3bab41['join'](''):[]);},'get':function(){return this[_0x5a2f('0x4')](_0x5a2f('0x3'))?this[_0x5a2f('0x4')](_0x5a2f('0x3'))['split'](''):[];}},'auth':{'type':Sequelize[_0x5a2f('0x5')],'defaultValue':![]},'password':{'type':Sequelize['STRING']},'record':{'type':Sequelize[_0x5a2f('0x5')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x5a2f('0x2')]},'description':{'type':Sequelize[_0x5a2f('0x2')]}};
\ No newline at end of file
+var _0x65b8=['name','STRING','options','getDataValue','split','BOOLEAN','sequelize','exports'];(function(_0x27fe26,_0x3b8ca7){var _0x4fcb35=function(_0x35e0ae){while(--_0x35e0ae){_0x27fe26['push'](_0x27fe26['shift']());}};_0x4fcb35(++_0x3b8ca7);}(_0x65b8,0x15e));var _0x865b=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x65b8[_0x502c7d];return _0x30b7ed;};'use strict';var Sequelize=require(_0x865b('0x0'));module[_0x865b('0x1')]={'name':{'type':Sequelize['STRING']},'prefix':{'type':Sequelize['STRING'],'unique':_0x865b('0x2'),'allowNull':![]},'options':{'type':Sequelize[_0x865b('0x3')],'set':function(_0x203736){this['setDataValue'](_0x865b('0x4'),_0x203736?_0x203736['join'](''):[]);},'get':function(){return this[_0x865b('0x5')](_0x865b('0x4'))?this[_0x865b('0x5')](_0x865b('0x4'))[_0x865b('0x6')](''):[];}},'auth':{'type':Sequelize[_0x865b('0x7')],'defaultValue':![]},'password':{'type':Sequelize[_0x865b('0x3')]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x865b('0x3')]},'description':{'type':Sequelize[_0x865b('0x3')]}};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.controller.js b/server/api/voiceChanSpy/voiceChanSpy.controller.js
index 7d46f20..8663a86 100644
--- a/server/api/voiceChanSpy/voiceChanSpy.controller.js
+++ b/server/api/voiceChanSpy/voiceChanSpy.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e3a=['order','sort','merge','where','map','type','key','VIRTUAL','field','filter','count','include','VoiceChanSpy','findAll','rows','show','params','includeAll','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','html-pdf','eml-format','rimraf','zip-dir','mustache','util','path','sox','to-csv','ejs','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','end','json','offset','limit','status','set','Content-Range','apply','save','then','get','ChanSpies','UserProfileResource','destroy','error','stack','name','send','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x7390de,_0x202939){var _0x465ca0=function(_0x341dfb){while(--_0x341dfb){_0x7390de['push'](_0x7390de['shift']());}};_0x465ca0(++_0x202939);}(_0x9e3a,0x6b));var _0xa9e3=function(_0x2c3622,_0x297483){_0x2c3622=_0x2c3622-0x0;var _0x46e7de=_0x9e3a[_0x2c3622];return _0x46e7de;};'use strict';var pdf=require(_0xa9e3('0x0'));var emlformat=require(_0xa9e3('0x1'));var rimraf=require(_0xa9e3('0x2'));var zipdir=require(_0xa9e3('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xa9e3('0x4'));var util=require(_0xa9e3('0x5'));var path=require(_0xa9e3('0x6'));var sox=require(_0xa9e3('0x7'));var csv=require(_0xa9e3('0x8'));var ejs=require(_0xa9e3('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa9e3('0xa'));var crypto=require(_0xa9e3('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xa9e3('0xc'));var toCsv=require('to-csv');var querystring=require(_0xa9e3('0xd'));var Papa=require('papaparse');var Redis=require(_0xa9e3('0xe'));var authService=require(_0xa9e3('0xf'));var qs=require(_0xa9e3('0x10'));var hardwareService=require(_0xa9e3('0x11'));var logger=require(_0xa9e3('0x12'))(_0xa9e3('0x13'));var utils=require('../../config/utils');var config=require(_0xa9e3('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x38aa37,_0x4c948d){_0x4c948d=_0x4c948d||0xcc;return function(_0x469ba4){if(_0x469ba4){return _0x38aa37[_0xa9e3('0x15')](_0x4c948d);}return _0x38aa37['status'](_0x4c948d)[_0xa9e3('0x16')]();};}function respondWithResult(_0x215b46,_0x10e34f){_0x10e34f=_0x10e34f||0xc8;return function(_0x44d3a3){if(_0x44d3a3){return _0x215b46['status'](_0x10e34f)[_0xa9e3('0x17')](_0x44d3a3);}};}function respondWithFilteredResult(_0x4adc4b,_0x180f7a){return function(_0x558eb7){if(_0x558eb7){var _0x9b8dd3=_0x558eb7['count'],_0x5e0c98=_0x180f7a[_0xa9e3('0x18')],_0x47216c=_0x180f7a[_0xa9e3('0x18')]+_0x180f7a[_0xa9e3('0x19')],_0x1be90f;if(_0x47216c>=_0x9b8dd3){_0x47216c=_0x9b8dd3;_0x1be90f=0xc8;}else{_0x1be90f=0xce;}_0x4adc4b[_0xa9e3('0x1a')](_0x1be90f);return _0x4adc4b[_0xa9e3('0x1b')](_0xa9e3('0x1c'),_0x5e0c98+'-'+_0x47216c+'/'+_0x9b8dd3)[_0xa9e3('0x17')](_0x558eb7);}return null;};}function patchUpdates(_0x523454){return function(_0x4e1dfe){try{jsonpatch[_0xa9e3('0x1d')](_0x4e1dfe,_0x523454,!![]);}catch(_0x3ef616){return BPromise['reject'](_0x3ef616);}return _0x4e1dfe[_0xa9e3('0x1e')]();};}function saveUpdates(_0x2e0fe3,_0x4f88a0){return function(_0x5a1d08){if(_0x5a1d08){return _0x5a1d08['update'](_0x2e0fe3)[_0xa9e3('0x1f')](function(_0x277805){return _0x277805;});}return null;};}function removeEntity(_0x2cb4b1,_0x528202){return function(_0x482678){if(_0x482678){return _0x482678['destroy']()[_0xa9e3('0x1f')](function(){var _0x372b28=_0x482678[_0xa9e3('0x20')]({'plain':!![]});var _0x3e3db0=_0xa9e3('0x21');return db[_0xa9e3('0x22')][_0xa9e3('0x23')]({'where':{'type':_0x3e3db0,'resourceId':_0x372b28['id']}})[_0xa9e3('0x1f')](function(){return _0x482678;});})[_0xa9e3('0x1f')](function(){_0x2cb4b1[_0xa9e3('0x1a')](0xcc)[_0xa9e3('0x16')]();});}};}function handleEntityNotFound(_0x242e6e,_0x1fe2e3){return function(_0x533732){if(!_0x533732){_0x242e6e[_0xa9e3('0x15')](0x194);}return _0x533732;};}function handleError(_0x51e09c,_0x25c29e){_0x25c29e=_0x25c29e||0x1f4;return function(_0x17238f){logger[_0xa9e3('0x24')](_0x17238f[_0xa9e3('0x25')]);if(_0x17238f[_0xa9e3('0x26')]){delete _0x17238f['name'];}_0x51e09c[_0xa9e3('0x1a')](_0x25c29e)[_0xa9e3('0x27')](_0x17238f);};}exports['index']=function(_0x6de796,_0x245427){var _0x276a90={},_0x42c6af={},_0x4c874e={'count':0x0,'rows':[]};var _0x3ddf28=db['VoiceChanSpy'][_0xa9e3('0x28')];_0x42c6af[_0xa9e3('0x29')]=_[_0xa9e3('0x2a')](_0x3ddf28);_0x42c6af[_0xa9e3('0x2b')]=_[_0xa9e3('0x2a')](_0x6de796['query']);_0x42c6af[_0xa9e3('0x2c')]=_[_0xa9e3('0x2d')](_0x42c6af[_0xa9e3('0x29')],_0x42c6af[_0xa9e3('0x2b')]);_0x276a90[_0xa9e3('0x2e')]=_[_0xa9e3('0x2d')](_0x42c6af[_0xa9e3('0x29')],qs[_0xa9e3('0x2f')](_0x6de796[_0xa9e3('0x2b')]['fields']));_0x276a90['attributes']=_0x276a90[_0xa9e3('0x2e')][_0xa9e3('0x30')]?_0x276a90['attributes']:_0x42c6af['model'];if(!_0x6de796[_0xa9e3('0x2b')][_0xa9e3('0x31')](_0xa9e3('0x32'))){_0x276a90[_0xa9e3('0x19')]=qs[_0xa9e3('0x19')](_0x6de796['query'][_0xa9e3('0x19')]);_0x276a90['offset']=qs[_0xa9e3('0x18')](_0x6de796[_0xa9e3('0x2b')][_0xa9e3('0x18')]);}_0x276a90[_0xa9e3('0x33')]=qs[_0xa9e3('0x34')](_0x6de796['query'][_0xa9e3('0x34')]);_0x276a90['where']=qs[_0xa9e3('0x2c')](_['pick'](_0x6de796['query'],_0x42c6af[_0xa9e3('0x2c')]));if(_0x6de796[_0xa9e3('0x2b')]['filter']){_0x276a90['where']=_[_0xa9e3('0x35')](_0x276a90[_0xa9e3('0x36')],{'$or':_[_0xa9e3('0x37')](_0x3ddf28,function(_0x251115){if(_0x251115[_0xa9e3('0x38')][_0xa9e3('0x39')]!==_0xa9e3('0x3a')){var _0xbd0a77={};_0xbd0a77[_0x251115[_0xa9e3('0x3b')]]={'$like':'%'+_0x6de796[_0xa9e3('0x2b')][_0xa9e3('0x3c')]+'%'};return _0xbd0a77;}})});}_0x276a90=_[_0xa9e3('0x35')]({},_0x276a90,_0x6de796['options']);var _0x5e1195={'where':_0x276a90[_0xa9e3('0x36')]};return db['VoiceChanSpy'][_0xa9e3('0x3d')](_0x5e1195)[_0xa9e3('0x1f')](function(_0x116616){_0x4c874e['count']=_0x116616;if(_0x6de796[_0xa9e3('0x2b')]['includeAll']){_0x276a90[_0xa9e3('0x3e')]=[{'all':!![]}];}return db[_0xa9e3('0x3f')][_0xa9e3('0x40')](_0x276a90);})[_0xa9e3('0x1f')](function(_0x281bea){_0x4c874e[_0xa9e3('0x41')]=_0x281bea;return _0x4c874e;})[_0xa9e3('0x1f')](respondWithFilteredResult(_0x245427,_0x276a90))['catch'](handleError(_0x245427,null));};exports[_0xa9e3('0x42')]=function(_0x426f37,_0x174430){var _0x50e546={'raw':![],'where':{'id':_0x426f37[_0xa9e3('0x43')]['id']}},_0x20992f={};_0x20992f[_0xa9e3('0x29')]=_[_0xa9e3('0x2a')](db['VoiceChanSpy'][_0xa9e3('0x28')]);_0x20992f[_0xa9e3('0x2b')]=_['keys'](_0x426f37[_0xa9e3('0x2b')]);_0x20992f[_0xa9e3('0x2c')]=_[_0xa9e3('0x2d')](_0x20992f[_0xa9e3('0x29')],_0x20992f['query']);_0x50e546['attributes']=_[_0xa9e3('0x2d')](_0x20992f[_0xa9e3('0x29')],qs['fields'](_0x426f37[_0xa9e3('0x2b')][_0xa9e3('0x2f')]));_0x50e546[_0xa9e3('0x2e')]=_0x50e546['attributes'][_0xa9e3('0x30')]?_0x50e546[_0xa9e3('0x2e')]:_0x20992f[_0xa9e3('0x29')];if(_0x426f37[_0xa9e3('0x2b')][_0xa9e3('0x44')]){_0x50e546[_0xa9e3('0x3e')]=[{'all':!![]}];}_0x50e546=_[_0xa9e3('0x35')]({},_0x50e546,_0x426f37['options']);return db['VoiceChanSpy'][_0xa9e3('0x45')](_0x50e546)['then'](handleEntityNotFound(_0x174430,null))[_0xa9e3('0x1f')](respondWithResult(_0x174430,null))[_0xa9e3('0x46')](handleError(_0x174430,null));};exports[_0xa9e3('0x47')]=function(_0x4d70b4,_0x321d04){return db['VoiceChanSpy'][_0xa9e3('0x47')](_0x4d70b4[_0xa9e3('0x48')],{})[_0xa9e3('0x1f')](function(_0x3b3d39){var _0x5c9fa5=_0x4d70b4[_0xa9e3('0x49')][_0xa9e3('0x20')]({'plain':!![]});if(!_0x5c9fa5)throw new Error(_0xa9e3('0x4a'));if(_0x5c9fa5['role']===_0xa9e3('0x49')){var _0x3bf6e4=_0x3b3d39[_0xa9e3('0x20')]({'plain':!![]});var _0x52fa00='ChanSpies';return db[_0xa9e3('0x4b')]['find']({'where':{'name':_0x52fa00,'userProfileId':_0x5c9fa5['userProfileId']},'raw':!![]})[_0xa9e3('0x1f')](function(_0x130d7a){if(_0x130d7a&&_0x130d7a[_0xa9e3('0x4c')]===0x0){return db['UserProfileResource'][_0xa9e3('0x47')]({'name':_0x3bf6e4[_0xa9e3('0x26')],'resourceId':_0x3bf6e4['id'],'type':_0x130d7a[_0xa9e3('0x26')],'sectionId':_0x130d7a['id']},{})[_0xa9e3('0x1f')](function(){return _0x3b3d39;});}else{return _0x3b3d39;}})[_0xa9e3('0x46')](function(_0x323604){logger[_0xa9e3('0x24')](_0xa9e3('0x4d'),_0x323604);throw _0x323604;});}return _0x3b3d39;})[_0xa9e3('0x1f')](respondWithResult(_0x321d04,0xc9))[_0xa9e3('0x46')](handleError(_0x321d04,null));};exports[_0xa9e3('0x4e')]=function(_0x5ea8d7,_0x58d11c){if(_0x5ea8d7[_0xa9e3('0x48')]['id']){delete _0x5ea8d7[_0xa9e3('0x48')]['id'];}return db[_0xa9e3('0x3f')][_0xa9e3('0x45')]({'where':{'id':_0x5ea8d7[_0xa9e3('0x43')]['id']}})[_0xa9e3('0x1f')](handleEntityNotFound(_0x58d11c,null))[_0xa9e3('0x1f')](saveUpdates(_0x5ea8d7['body'],null))[_0xa9e3('0x1f')](respondWithResult(_0x58d11c,null))[_0xa9e3('0x46')](handleError(_0x58d11c,null));};exports['destroy']=function(_0x483578,_0x3d3867){return db['VoiceChanSpy'][_0xa9e3('0x45')]({'where':{'id':_0x483578[_0xa9e3('0x43')]['id']}})['then'](handleEntityNotFound(_0x3d3867,null))['then'](removeEntity(_0x3d3867,null))['catch'](handleError(_0x3d3867,null));};
\ No newline at end of file
+var _0x1bf2=['model','attributes','fields','length','hasOwnProperty','limit','order','sort','pick','where','type','key','VIRTUAL','field','options','count','includeAll','include','findAll','rows','catch','params','rawAttributes','merge','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','util','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','set','Content-Range','reject','save','update','destroy','then','get','ChanSpies','UserProfileResource','end','error','stack','name','send','VoiceChanSpy','keys','query','filters','intersection'];(function(_0x153e55,_0x2934a9){var _0x247804=function(_0x5daaaa){while(--_0x5daaaa){_0x153e55['push'](_0x153e55['shift']());}};_0x247804(++_0x2934a9);}(_0x1bf2,0x6d));var _0x21bf=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0x1bf2[_0x3054be];return _0x3df150;};'use strict';var pdf=require(_0x21bf('0x0'));var emlformat=require(_0x21bf('0x1'));var rimraf=require(_0x21bf('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x21bf('0x3'));var rp=require(_0x21bf('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x21bf('0x5'));var path=require('path');var sox=require(_0x21bf('0x6'));var csv=require(_0x21bf('0x7'));var ejs=require(_0x21bf('0x8'));var fs=require('fs');var _=require(_0x21bf('0x9'));var squel=require(_0x21bf('0xa'));var crypto=require(_0x21bf('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x21bf('0xc'));var toCsv=require(_0x21bf('0x7'));var querystring=require(_0x21bf('0xd'));var Papa=require(_0x21bf('0xe'));var Redis=require('ioredis');var authService=require(_0x21bf('0xf'));var qs=require(_0x21bf('0x10'));var hardwareService=require(_0x21bf('0x11'));var logger=require('../../config/logger')(_0x21bf('0x12'));var utils=require('../../config/utils');var config=require(_0x21bf('0x13'));var db=require(_0x21bf('0x14'))['db'];function respondWithStatusCode(_0xda6b47,_0xcfea73){_0xcfea73=_0xcfea73||0xcc;return function(_0x57253e){if(_0x57253e){return _0xda6b47[_0x21bf('0x15')](_0xcfea73);}return _0xda6b47[_0x21bf('0x16')](_0xcfea73)['end']();};}function respondWithResult(_0x28ff8a,_0x43b28a){_0x43b28a=_0x43b28a||0xc8;return function(_0x40bd5f){if(_0x40bd5f){return _0x28ff8a[_0x21bf('0x16')](_0x43b28a)[_0x21bf('0x17')](_0x40bd5f);}};}function respondWithFilteredResult(_0x46f0b6,_0x3550d2){return function(_0x45182b){if(_0x45182b){var _0x14d541=_0x45182b['count'],_0x3850b6=_0x3550d2[_0x21bf('0x18')],_0x3c22af=_0x3550d2[_0x21bf('0x18')]+_0x3550d2['limit'],_0x460ba1;if(_0x3c22af>=_0x14d541){_0x3c22af=_0x14d541;_0x460ba1=0xc8;}else{_0x460ba1=0xce;}_0x46f0b6[_0x21bf('0x16')](_0x460ba1);return _0x46f0b6[_0x21bf('0x19')](_0x21bf('0x1a'),_0x3850b6+'-'+_0x3c22af+'/'+_0x14d541)['json'](_0x45182b);}return null;};}function patchUpdates(_0x5a881d){return function(_0x569c2f){try{jsonpatch['apply'](_0x569c2f,_0x5a881d,!![]);}catch(_0x4b2bf7){return BPromise[_0x21bf('0x1b')](_0x4b2bf7);}return _0x569c2f[_0x21bf('0x1c')]();};}function saveUpdates(_0x2b9ef1,_0xecafda){return function(_0x580ebe){if(_0x580ebe){return _0x580ebe[_0x21bf('0x1d')](_0x2b9ef1)['then'](function(_0xa2f961){return _0xa2f961;});}return null;};}function removeEntity(_0x343bdd,_0x639e42){return function(_0x4a819c){if(_0x4a819c){return _0x4a819c[_0x21bf('0x1e')]()[_0x21bf('0x1f')](function(){var _0x1b770f=_0x4a819c[_0x21bf('0x20')]({'plain':!![]});var _0x2d7eb0=_0x21bf('0x21');return db[_0x21bf('0x22')][_0x21bf('0x1e')]({'where':{'type':_0x2d7eb0,'resourceId':_0x1b770f['id']}})[_0x21bf('0x1f')](function(){return _0x4a819c;});})[_0x21bf('0x1f')](function(){_0x343bdd['status'](0xcc)[_0x21bf('0x23')]();});}};}function handleEntityNotFound(_0x3e93dc,_0x42a485){return function(_0x50cbcc){if(!_0x50cbcc){_0x3e93dc['sendStatus'](0x194);}return _0x50cbcc;};}function handleError(_0x101b6d,_0x55bed6){_0x55bed6=_0x55bed6||0x1f4;return function(_0x42a216){logger[_0x21bf('0x24')](_0x42a216[_0x21bf('0x25')]);if(_0x42a216[_0x21bf('0x26')]){delete _0x42a216[_0x21bf('0x26')];}_0x101b6d['status'](_0x55bed6)[_0x21bf('0x27')](_0x42a216);};}exports['index']=function(_0x303cd5,_0x238de3){var _0x3b2f6b={},_0xdce7a4={},_0x20a021={'count':0x0,'rows':[]};var _0x486224=db[_0x21bf('0x28')]['rawAttributes'];_0xdce7a4['model']=_[_0x21bf('0x29')](_0x486224);_0xdce7a4[_0x21bf('0x2a')]=_[_0x21bf('0x29')](_0x303cd5['query']);_0xdce7a4[_0x21bf('0x2b')]=_[_0x21bf('0x2c')](_0xdce7a4[_0x21bf('0x2d')],_0xdce7a4[_0x21bf('0x2a')]);_0x3b2f6b[_0x21bf('0x2e')]=_[_0x21bf('0x2c')](_0xdce7a4[_0x21bf('0x2d')],qs[_0x21bf('0x2f')](_0x303cd5[_0x21bf('0x2a')][_0x21bf('0x2f')]));_0x3b2f6b['attributes']=_0x3b2f6b['attributes'][_0x21bf('0x30')]?_0x3b2f6b['attributes']:_0xdce7a4[_0x21bf('0x2d')];if(!_0x303cd5[_0x21bf('0x2a')][_0x21bf('0x31')]('nolimit')){_0x3b2f6b[_0x21bf('0x32')]=qs['limit'](_0x303cd5[_0x21bf('0x2a')][_0x21bf('0x32')]);_0x3b2f6b[_0x21bf('0x18')]=qs[_0x21bf('0x18')](_0x303cd5[_0x21bf('0x2a')]['offset']);}_0x3b2f6b[_0x21bf('0x33')]=qs[_0x21bf('0x34')](_0x303cd5[_0x21bf('0x2a')]['sort']);_0x3b2f6b['where']=qs[_0x21bf('0x2b')](_[_0x21bf('0x35')](_0x303cd5['query'],_0xdce7a4[_0x21bf('0x2b')]));if(_0x303cd5['query']['filter']){_0x3b2f6b[_0x21bf('0x36')]=_['merge'](_0x3b2f6b['where'],{'$or':_['map'](_0x486224,function(_0x1fc293){if(_0x1fc293[_0x21bf('0x37')][_0x21bf('0x38')]!==_0x21bf('0x39')){var _0x212698={};_0x212698[_0x1fc293[_0x21bf('0x3a')]]={'$like':'%'+_0x303cd5[_0x21bf('0x2a')]['filter']+'%'};return _0x212698;}})});}_0x3b2f6b=_['merge']({},_0x3b2f6b,_0x303cd5[_0x21bf('0x3b')]);var _0x64405f={'where':_0x3b2f6b['where']};return db[_0x21bf('0x28')][_0x21bf('0x3c')](_0x64405f)[_0x21bf('0x1f')](function(_0x1ef8e3){_0x20a021['count']=_0x1ef8e3;if(_0x303cd5['query'][_0x21bf('0x3d')]){_0x3b2f6b[_0x21bf('0x3e')]=[{'all':!![]}];}return db[_0x21bf('0x28')][_0x21bf('0x3f')](_0x3b2f6b);})[_0x21bf('0x1f')](function(_0x11175e){_0x20a021[_0x21bf('0x40')]=_0x11175e;return _0x20a021;})[_0x21bf('0x1f')](respondWithFilteredResult(_0x238de3,_0x3b2f6b))[_0x21bf('0x41')](handleError(_0x238de3,null));};exports['show']=function(_0xe5ed93,_0x368a11){var _0x40c08e={'raw':![],'where':{'id':_0xe5ed93[_0x21bf('0x42')]['id']}},_0x15f1f4={};_0x15f1f4['model']=_['keys'](db[_0x21bf('0x28')][_0x21bf('0x43')]);_0x15f1f4[_0x21bf('0x2a')]=_[_0x21bf('0x29')](_0xe5ed93[_0x21bf('0x2a')]);_0x15f1f4[_0x21bf('0x2b')]=_[_0x21bf('0x2c')](_0x15f1f4['model'],_0x15f1f4[_0x21bf('0x2a')]);_0x40c08e[_0x21bf('0x2e')]=_[_0x21bf('0x2c')](_0x15f1f4[_0x21bf('0x2d')],qs[_0x21bf('0x2f')](_0xe5ed93['query'][_0x21bf('0x2f')]));_0x40c08e[_0x21bf('0x2e')]=_0x40c08e[_0x21bf('0x2e')][_0x21bf('0x30')]?_0x40c08e[_0x21bf('0x2e')]:_0x15f1f4[_0x21bf('0x2d')];if(_0xe5ed93[_0x21bf('0x2a')][_0x21bf('0x3d')]){_0x40c08e[_0x21bf('0x3e')]=[{'all':!![]}];}_0x40c08e=_[_0x21bf('0x44')]({},_0x40c08e,_0xe5ed93[_0x21bf('0x3b')]);return db[_0x21bf('0x28')][_0x21bf('0x45')](_0x40c08e)[_0x21bf('0x1f')](handleEntityNotFound(_0x368a11,null))[_0x21bf('0x1f')](respondWithResult(_0x368a11,null))[_0x21bf('0x41')](handleError(_0x368a11,null));};exports['create']=function(_0x287b95,_0x22ecbb){return db[_0x21bf('0x28')][_0x21bf('0x46')](_0x287b95[_0x21bf('0x47')],{})[_0x21bf('0x1f')](function(_0x22352c){var _0x4033b7=_0x287b95[_0x21bf('0x48')][_0x21bf('0x20')]({'plain':!![]});if(!_0x4033b7)throw new Error(_0x21bf('0x49'));if(_0x4033b7[_0x21bf('0x4a')]===_0x21bf('0x48')){var _0x125c36=_0x22352c[_0x21bf('0x20')]({'plain':!![]});var _0x24688f='ChanSpies';return db['UserProfileSection'][_0x21bf('0x45')]({'where':{'name':_0x24688f,'userProfileId':_0x4033b7[_0x21bf('0x4b')]},'raw':!![]})[_0x21bf('0x1f')](function(_0xd8ae3b){if(_0xd8ae3b&&_0xd8ae3b[_0x21bf('0x4c')]===0x0){return db[_0x21bf('0x22')][_0x21bf('0x46')]({'name':_0x125c36[_0x21bf('0x26')],'resourceId':_0x125c36['id'],'type':_0xd8ae3b['name'],'sectionId':_0xd8ae3b['id']},{})['then'](function(){return _0x22352c;});}else{return _0x22352c;}})[_0x21bf('0x41')](function(_0x51a7f1){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x51a7f1);throw _0x51a7f1;});}return _0x22352c;})[_0x21bf('0x1f')](respondWithResult(_0x22ecbb,0xc9))[_0x21bf('0x41')](handleError(_0x22ecbb,null));};exports['update']=function(_0x489873,_0x2ee104){if(_0x489873[_0x21bf('0x47')]['id']){delete _0x489873[_0x21bf('0x47')]['id'];}return db[_0x21bf('0x28')][_0x21bf('0x45')]({'where':{'id':_0x489873[_0x21bf('0x42')]['id']}})[_0x21bf('0x1f')](handleEntityNotFound(_0x2ee104,null))[_0x21bf('0x1f')](saveUpdates(_0x489873[_0x21bf('0x47')],null))[_0x21bf('0x1f')](respondWithResult(_0x2ee104,null))[_0x21bf('0x41')](handleError(_0x2ee104,null));};exports[_0x21bf('0x1e')]=function(_0x308a4b,_0x5d0f70){return db[_0x21bf('0x28')][_0x21bf('0x45')]({'where':{'id':_0x308a4b[_0x21bf('0x42')]['id']}})[_0x21bf('0x1f')](handleEntityNotFound(_0x5d0f70,null))[_0x21bf('0x1f')](removeEntity(_0x5d0f70,null))[_0x21bf('0x41')](handleError(_0x5d0f70,null));};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.model.js b/server/api/voiceChanSpy/voiceChanSpy.model.js
index 2f928c5..9b7d059 100644
--- a/server/api/voiceChanSpy/voiceChanSpy.model.js
+++ b/server/api/voiceChanSpy/voiceChanSpy.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc964=['name','options','join','StopMixMonitor','length','internal','concat','User','findAll','catch','exports','define','VoiceChanSpy','voice_chanspy','bulkCreate','VoiceExtension','destroy','then','lodash','util','./voiceChanSpy.attributes','context','from-sip','format','%s%s','prefix','system','merge','Set','chanspy','record','${UNIQUEID}.%s,ab','recordingFormat','push','password','SIP/%s,%s'];(function(_0x4ff521,_0x15e68e){var _0x311344=function(_0x3d8852){while(--_0x3d8852){_0x4ff521['push'](_0x4ff521['shift']());}};_0x311344(++_0x15e68e);}(_0xc964,0x7e));var _0x4c96=function(_0x5c7e3d,_0x3e1f73){_0x5c7e3d=_0x5c7e3d-0x0;var _0x3daff5=_0xc964[_0x5c7e3d];return _0x3daff5;};'use strict';var _=require(_0x4c96('0x0'));var util=require(_0x4c96('0x1'));var BPromise=require('bluebird');var attributes=require(_0x4c96('0x2'));var getUserApplications=function(_0x8d390f,_0x90fbb1,_0x591daa){var _0x2777bb=0x1;var _0x491d1e=[];var _0x1b0a58={'context':_0x90fbb1[_0x4c96('0x3')]||_0x4c96('0x4'),'exten':util[_0x4c96('0x5')](_0x4c96('0x6'),_0x8d390f[_0x4c96('0x7')],_0x591daa),'type':_0x4c96('0x8'),'isApp':![],'ChanSpyId':_0x8d390f['id'],'UserId':_0x90fbb1['id']};_0x491d1e['push'](_[_0x4c96('0x9')]({'app':_0x4c96('0xa'),'appdata':util[_0x4c96('0x5')]('CDR(type)=%s',_0x4c96('0xb')),'priority':_0x2777bb++},_0x1b0a58));if(_0x8d390f[_0x4c96('0xc')]){_0x491d1e['push'](_['merge']({'app':'MixMonitor','appdata':util[_0x4c96('0x5')](_0x4c96('0xd'),_0x8d390f[_0x4c96('0xe')]),'priority':_0x2777bb++},_0x1b0a58));}if(_0x8d390f['auth']){_0x491d1e[_0x4c96('0xf')](_['merge']({'app':'Authenticate','appdata':_0x8d390f[_0x4c96('0x10')],'priority':_0x2777bb++},_0x1b0a58));}_0x491d1e[_0x4c96('0xf')](_[_0x4c96('0x9')]({'app':'ChanSpy','appdata':util['format'](_0x4c96('0x11'),_0x90fbb1[_0x4c96('0x12')],_0x8d390f[_0x4c96('0x13')]?_0x8d390f['options'][_0x4c96('0x14')](''):''),'priority':_0x2777bb++},_0x1b0a58));if(_0x8d390f[_0x4c96('0xc')]){_0x491d1e[_0x4c96('0xf')](_[_0x4c96('0x9')]({'app':_0x4c96('0x15'),'priority':_0x2777bb++},_0x1b0a58));}return _0x491d1e;};var getChanSpyApplications=function(_0x66964b,_0xeb18f3){var _0x4a3fca=[];for(var _0x388237=0x0,_0x5eef93=0x1;_0x388237<_0xeb18f3[_0x4c96('0x16')];_0x388237++,_0x5eef93=0x1){_0x4a3fca=_0x4a3fca['concat'](getUserApplications(_0x66964b,_0xeb18f3[_0x388237],_0xeb18f3[_0x388237][_0x4c96('0x17')]));if(_0xeb18f3[_0x388237]['internal']!=_0xeb18f3[_0x388237][_0x4c96('0x12')]){_0x4a3fca=_0x4a3fca[_0x4c96('0x18')](getUserApplications(_0x66964b,_0xeb18f3[_0x388237],_0xeb18f3[_0x388237][_0x4c96('0x12')]));}}return _0x4a3fca;};var getChanSpyPromise=function(_0x1588aa,_0x8a802a){return new BPromise(function(_0x32552d,_0xeb42d8){return _0x1588aa[_0x4c96('0x19')][_0x4c96('0x1a')]({'attributes':['id',_0x4c96('0x12'),_0x4c96('0x17')],'where':{'role':'agent','chanspy':!![]},'raw':!![]})['then'](function(_0x5ea092){if(_0x5ea092){return _0x32552d(getChanSpyApplications(_0x8a802a,_0x5ea092));}return _0x32552d([]);})[_0x4c96('0x1b')](function(_0x13eaa0){_0xeb42d8(_0x13eaa0);});});};module[_0x4c96('0x1c')]=function(_0x2bf708,_0x3b9a10){var _0x422fc6=_0x2bf708['models'];return _0x2bf708[_0x4c96('0x1d')](_0x4c96('0x1e'),attributes,{'tableName':_0x4c96('0x1f'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x31a854,_0x2f6f93,_0x23fbfa){return getChanSpyPromise(_0x422fc6,_0x31a854)['then'](function(_0x367d99){if(_0x367d99&&_0x367d99[_0x4c96('0x16')]){return _0x422fc6['VoiceExtension'][_0x4c96('0x20')](_0x367d99);}})['then'](function(){_0x23fbfa();})[_0x4c96('0x1b')](function(_0x2a7605){_0x23fbfa(_0x2a7605);});},'afterUpdate':function(_0x25b276,_0x1543d8,_0x59a913){return _0x422fc6[_0x4c96('0x21')][_0x4c96('0x22')]({'where':{'ChanSpyId':_0x25b276['id']}})[_0x4c96('0x23')](function(){return getChanSpyPromise(_0x422fc6,_0x25b276);})[_0x4c96('0x23')](function(_0x280c6b){if(_0x280c6b&&_0x280c6b[_0x4c96('0x16')]){return _0x422fc6['VoiceExtension'][_0x4c96('0x20')](_0x280c6b);}})[_0x4c96('0x23')](function(){_0x59a913();})[_0x4c96('0x1b')](function(_0x2041df){_0x59a913(_0x2041df);});},'afterDestroy':function(_0x9fffd1,_0x1712c4,_0x4c5e1a){return _0x422fc6['VoiceExtension'][_0x4c96('0x22')]({'where':{'ChanSpyId':_0x9fffd1['id']}})[_0x4c96('0x23')](function(){_0x4c5e1a();})[_0x4c96('0x1b')](function(_0xa64090){_0x4c5e1a(_0xa64090);});}}});};
\ No newline at end of file
+var _0xa4fb=['catch','models','define','VoiceChanSpy','voice_chanspy','VoiceExtension','destroy','bulkCreate','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','format','%s%s','prefix','system','push','merge','Set','chanspy','MixMonitor','${UNIQUEID}.%s,ab','recordingFormat','Authenticate','password','ChanSpy','SIP/%s,%s','name','options','join','record','StopMixMonitor','length','internal','concat','User','findAll','agent','then'];(function(_0x4dfd10,_0x3169d5){var _0x267950=function(_0x15b4ae){while(--_0x15b4ae){_0x4dfd10['push'](_0x4dfd10['shift']());}};_0x267950(++_0x3169d5);}(_0xa4fb,0x150));var _0xba4f=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0xa4fb[_0xc4001c];return _0x49f7bc;};'use strict';var _=require(_0xba4f('0x0'));var util=require(_0xba4f('0x1'));var BPromise=require(_0xba4f('0x2'));var attributes=require(_0xba4f('0x3'));var getUserApplications=function(_0x569bf7,_0x5d2269,_0x4131a6){var _0x196e5b=0x1;var _0x27a519=[];var _0x4ac34c={'context':_0x5d2269[_0xba4f('0x4')]||_0xba4f('0x5'),'exten':util[_0xba4f('0x6')](_0xba4f('0x7'),_0x569bf7[_0xba4f('0x8')],_0x4131a6),'type':_0xba4f('0x9'),'isApp':![],'ChanSpyId':_0x569bf7['id'],'UserId':_0x5d2269['id']};_0x27a519[_0xba4f('0xa')](_[_0xba4f('0xb')]({'app':_0xba4f('0xc'),'appdata':util[_0xba4f('0x6')]('CDR(type)=%s',_0xba4f('0xd')),'priority':_0x196e5b++},_0x4ac34c));if(_0x569bf7['record']){_0x27a519[_0xba4f('0xa')](_[_0xba4f('0xb')]({'app':_0xba4f('0xe'),'appdata':util[_0xba4f('0x6')](_0xba4f('0xf'),_0x569bf7[_0xba4f('0x10')]),'priority':_0x196e5b++},_0x4ac34c));}if(_0x569bf7['auth']){_0x27a519[_0xba4f('0xa')](_[_0xba4f('0xb')]({'app':_0xba4f('0x11'),'appdata':_0x569bf7[_0xba4f('0x12')],'priority':_0x196e5b++},_0x4ac34c));}_0x27a519[_0xba4f('0xa')](_[_0xba4f('0xb')]({'app':_0xba4f('0x13'),'appdata':util[_0xba4f('0x6')](_0xba4f('0x14'),_0x5d2269[_0xba4f('0x15')],_0x569bf7['options']?_0x569bf7[_0xba4f('0x16')][_0xba4f('0x17')](''):''),'priority':_0x196e5b++},_0x4ac34c));if(_0x569bf7[_0xba4f('0x18')]){_0x27a519['push'](_['merge']({'app':_0xba4f('0x19'),'priority':_0x196e5b++},_0x4ac34c));}return _0x27a519;};var getChanSpyApplications=function(_0x26d144,_0x104caf){var _0xc0a442=[];for(var _0x218dea=0x0,_0x3e3540=0x1;_0x218dea<_0x104caf[_0xba4f('0x1a')];_0x218dea++,_0x3e3540=0x1){_0xc0a442=_0xc0a442['concat'](getUserApplications(_0x26d144,_0x104caf[_0x218dea],_0x104caf[_0x218dea][_0xba4f('0x1b')]));if(_0x104caf[_0x218dea][_0xba4f('0x1b')]!=_0x104caf[_0x218dea]['name']){_0xc0a442=_0xc0a442[_0xba4f('0x1c')](getUserApplications(_0x26d144,_0x104caf[_0x218dea],_0x104caf[_0x218dea]['name']));}}return _0xc0a442;};var getChanSpyPromise=function(_0x666124,_0x11e784){return new BPromise(function(_0x26e470,_0x30581b){return _0x666124[_0xba4f('0x1d')][_0xba4f('0x1e')]({'attributes':['id','name',_0xba4f('0x1b')],'where':{'role':_0xba4f('0x1f'),'chanspy':!![]},'raw':!![]})[_0xba4f('0x20')](function(_0x5ab4fb){if(_0x5ab4fb){return _0x26e470(getChanSpyApplications(_0x11e784,_0x5ab4fb));}return _0x26e470([]);})[_0xba4f('0x21')](function(_0x5a3ed0){_0x30581b(_0x5a3ed0);});});};module['exports']=function(_0x2a7f19,_0x46c07d){var _0x155eb7=_0x2a7f19[_0xba4f('0x22')];return _0x2a7f19[_0xba4f('0x23')](_0xba4f('0x24'),attributes,{'tableName':_0xba4f('0x25'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5b9899,_0x5ec4ae,_0xd65629){return getChanSpyPromise(_0x155eb7,_0x5b9899)[_0xba4f('0x20')](function(_0x3fa60b){if(_0x3fa60b&&_0x3fa60b[_0xba4f('0x1a')]){return _0x155eb7[_0xba4f('0x26')]['bulkCreate'](_0x3fa60b);}})['then'](function(){_0xd65629();})[_0xba4f('0x21')](function(_0x103f21){_0xd65629(_0x103f21);});},'afterUpdate':function(_0x1d639a,_0x294be5,_0x2053d7){return _0x155eb7[_0xba4f('0x26')][_0xba4f('0x27')]({'where':{'ChanSpyId':_0x1d639a['id']}})[_0xba4f('0x20')](function(){return getChanSpyPromise(_0x155eb7,_0x1d639a);})[_0xba4f('0x20')](function(_0x597270){if(_0x597270&&_0x597270[_0xba4f('0x1a')]){return _0x155eb7['VoiceExtension'][_0xba4f('0x28')](_0x597270);}})[_0xba4f('0x20')](function(){_0x2053d7();})['catch'](function(_0x3bc2ea){_0x2053d7(_0x3bc2ea);});},'afterDestroy':function(_0x341566,_0x24fe58,_0x201998){return _0x155eb7[_0xba4f('0x26')][_0xba4f('0x27')]({'where':{'ChanSpyId':_0x341566['id']}})[_0xba4f('0x20')](function(){_0x201998();})[_0xba4f('0x21')](function(_0x111fbe){_0x201998(_0x111fbe);});}}});};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.rpc.js b/server/api/voiceChanSpy/voiceChanSpy.rpc.js
index a88193d..da23601 100644
--- a/server/api/voiceChanSpy/voiceChanSpy.rpc.js
+++ b/server/api/voiceChanSpy/voiceChanSpy.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd3d1=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceChanSpy,\x20%s,\x20%s','request\x20sent','debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring','ioredis','../../mysqldb'];(function(_0x259afb,_0x6089ee){var _0x1354c=function(_0x442790){while(--_0x442790){_0x259afb['push'](_0x259afb['shift']());}};_0x1354c(++_0x6089ee);}(_0xd3d1,0x172));var _0x1d3d=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0xd3d1[_0x4c12ec];return _0x3ae42c;};'use strict';var _=require(_0x1d3d('0x0'));var util=require(_0x1d3d('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x1d3d('0x2'));var fs=require('fs');var Redis=require(_0x1d3d('0x3'));var db=require(_0x1d3d('0x4'))['db'];var utils=require(_0x1d3d('0x5'));var logger=require(_0x1d3d('0x6'))(_0x1d3d('0x7'));var config=require(_0x1d3d('0x8'));var jayson=require(_0x1d3d('0x9'));var client=jayson[_0x1d3d('0xa')][_0x1d3d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3831ce,_0xb1b3c6,_0xe10bca){return new BPromise(function(_0x2c377c,_0xbea61e){return client[_0x1d3d('0xc')](_0x3831ce,_0xe10bca)[_0x1d3d('0xd')](function(_0x510a37){logger[_0x1d3d('0xe')](_0x1d3d('0xf'),_0xb1b3c6,_0x1d3d('0x10'));logger[_0x1d3d('0x11')](_0x1d3d('0x12'),_0xb1b3c6,_0x1d3d('0x10'),JSON[_0x1d3d('0x13')](_0x510a37));if(_0x510a37[_0x1d3d('0x14')]){if(_0x510a37[_0x1d3d('0x14')][_0x1d3d('0x15')]===0x1f4){logger[_0x1d3d('0x14')]('VoiceChanSpy,\x20%s,\x20%s',_0xb1b3c6,_0x510a37[_0x1d3d('0x14')][_0x1d3d('0x16')]);return _0xbea61e(_0x510a37['error']['message']);}logger[_0x1d3d('0x14')](_0x1d3d('0xf'),_0xb1b3c6,_0x510a37[_0x1d3d('0x14')]['message']);return _0x2c377c(_0x510a37[_0x1d3d('0x14')]['message']);}else{logger[_0x1d3d('0xe')](_0x1d3d('0xf'),_0xb1b3c6,_0x1d3d('0x10'));_0x2c377c(_0x510a37[_0x1d3d('0x17')][_0x1d3d('0x16')]);}})[_0x1d3d('0x18')](function(_0x3dcb67){logger['error']('VoiceChanSpy,\x20%s,\x20%s',_0xb1b3c6,_0x3dcb67);_0xbea61e(_0x3dcb67);});});}
\ No newline at end of file
+var _0x0c6e=['rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','VoiceChanSpy,\x20%s,\x20%s','message','result','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x5adecf,_0x33fcce){var _0x555cc2=function(_0xe56fa8){while(--_0xe56fa8){_0x5adecf['push'](_0x5adecf['shift']());}};_0x555cc2(++_0x33fcce);}(_0x0c6e,0xb0));var _0xe0c6=function(_0x5dbfeb,_0x1d48be){_0x5dbfeb=_0x5dbfeb-0x0;var _0x155e68=_0x0c6e[_0x5dbfeb];return _0x155e68;};'use strict';var _=require(_0xe0c6('0x0'));var util=require(_0xe0c6('0x1'));var moment=require('moment');var BPromise=require(_0xe0c6('0x2'));var rs=require(_0xe0c6('0x3'));var fs=require('fs');var Redis=require(_0xe0c6('0x4'));var db=require(_0xe0c6('0x5'))['db'];var utils=require(_0xe0c6('0x6'));var logger=require(_0xe0c6('0x7'))(_0xe0c6('0x8'));var config=require(_0xe0c6('0x9'));var jayson=require(_0xe0c6('0xa'));var client=jayson[_0xe0c6('0xb')][_0xe0c6('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4d274d,_0xa24b8a,_0x3cfbb4){return new BPromise(function(_0x2936a8,_0x510519){return client[_0xe0c6('0xd')](_0x4d274d,_0x3cfbb4)[_0xe0c6('0xe')](function(_0x4bf936){logger['info']('VoiceChanSpy,\x20%s,\x20%s',_0xa24b8a,_0xe0c6('0xf'));logger[_0xe0c6('0x10')](_0xe0c6('0x11'),_0xa24b8a,_0xe0c6('0xf'),JSON[_0xe0c6('0x12')](_0x4bf936));if(_0x4bf936[_0xe0c6('0x13')]){if(_0x4bf936['error']['code']===0x1f4){logger[_0xe0c6('0x13')](_0xe0c6('0x14'),_0xa24b8a,_0x4bf936[_0xe0c6('0x13')][_0xe0c6('0x15')]);return _0x510519(_0x4bf936[_0xe0c6('0x13')][_0xe0c6('0x15')]);}logger[_0xe0c6('0x13')](_0xe0c6('0x14'),_0xa24b8a,_0x4bf936[_0xe0c6('0x13')]['message']);return _0x2936a8(_0x4bf936[_0xe0c6('0x13')]['message']);}else{logger['info'](_0xe0c6('0x14'),_0xa24b8a,'request\x20sent');_0x2936a8(_0x4bf936[_0xe0c6('0x16')][_0xe0c6('0x15')]);}})['catch'](function(_0x3579a9){logger[_0xe0c6('0x13')](_0xe0c6('0x14'),_0xa24b8a,_0x3579a9);_0x510519(_0x3579a9);});});}
\ No newline at end of file
diff --git a/server/api/voiceContext/index.js b/server/api/voiceContext/index.js
index b33e36d..eb7eae1 100644
--- a/server/api/voiceContext/index.js
+++ b/server/api/voiceContext/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4849=['exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceContext.controller','get','isAuthenticated','index','show','create','put','/:id','update','delete','destroy'];(function(_0x1be153,_0x22290f){var _0x316441=function(_0xc72b9b){while(--_0xc72b9b){_0x1be153['push'](_0x1be153['shift']());}};_0x316441(++_0x22290f);}(_0x4849,0xf8));var _0x9484=function(_0x52d9f1,_0x159b27){_0x52d9f1=_0x52d9f1-0x0;var _0x4c349b=_0x4849[_0x52d9f1];return _0x4c349b;};'use strict';var multer=require(_0x9484('0x0'));var util=require(_0x9484('0x1'));var path=require(_0x9484('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x9484('0x3')]();var auth=require(_0x9484('0x4'));var interaction=require(_0x9484('0x5'));var config=require(_0x9484('0x6'));var controller=require(_0x9484('0x7'));router[_0x9484('0x8')]('/',auth[_0x9484('0x9')](),controller[_0x9484('0xa')]);router[_0x9484('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x9484('0xb')]);router['post']('/',auth[_0x9484('0x9')](),controller[_0x9484('0xc')]);router[_0x9484('0xd')](_0x9484('0xe'),auth[_0x9484('0x9')](),controller[_0x9484('0xf')]);router[_0x9484('0x10')](_0x9484('0xe'),auth[_0x9484('0x9')](),controller[_0x9484('0x11')]);module[_0x9484('0x12')]=router;
\ No newline at end of file
+var _0xdfb1=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/:id','show','post','isAuthenticated','create','update','destroy','exports','multer','util','path','connect-timeout'];(function(_0x43dc7e,_0x49a390){var _0x21e12d=function(_0x15cc1a){while(--_0x15cc1a){_0x43dc7e['push'](_0x43dc7e['shift']());}};_0x21e12d(++_0x49a390);}(_0xdfb1,0x8c));var _0x1dfb=function(_0x1e914b,_0x10e3a2){_0x1e914b=_0x1e914b-0x0;var _0xdd63a5=_0xdfb1[_0x1e914b];return _0xdd63a5;};'use strict';var multer=require(_0x1dfb('0x0'));var util=require(_0x1dfb('0x1'));var path=require(_0x1dfb('0x2'));var timeout=require(_0x1dfb('0x3'));var express=require('express');var router=express[_0x1dfb('0x4')]();var auth=require(_0x1dfb('0x5'));var interaction=require(_0x1dfb('0x6'));var config=require(_0x1dfb('0x7'));var controller=require('./voiceContext.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x1dfb('0x8')]);router[_0x1dfb('0x9')](_0x1dfb('0xa'),auth['isAuthenticated'](),controller[_0x1dfb('0xb')]);router[_0x1dfb('0xc')]('/',auth[_0x1dfb('0xd')](),controller[_0x1dfb('0xe')]);router['put'](_0x1dfb('0xa'),auth[_0x1dfb('0xd')](),controller[_0x1dfb('0xf')]);router['delete'](_0x1dfb('0xa'),auth[_0x1dfb('0xd')](),controller[_0x1dfb('0x10')]);module[_0x1dfb('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/voiceContext/voiceContext.attributes.js b/server/api/voiceContext/voiceContext.attributes.js
index 411c88f..b5d9085 100644
--- a/server/api/voiceContext/voiceContext.attributes.js
+++ b/server/api/voiceContext/voiceContext.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe37f=['name','BOOLEAN','sequelize','exports','STRING'];(function(_0x3a5039,_0x55c165){var _0x403fcf=function(_0x16cba3){while(--_0x16cba3){_0x3a5039['push'](_0x3a5039['shift']());}};_0x403fcf(++_0x55c165);}(_0xe37f,0x101));var _0xfe37=function(_0x34933a,_0x327378){_0x34933a=_0x34933a-0x0;var _0x36abb4=_0xe37f[_0x34933a];return _0x36abb4;};'use strict';var Sequelize=require(_0xfe37('0x0'));module[_0xfe37('0x1')]={'name':{'type':Sequelize[_0xfe37('0x2')],'unique':_0xfe37('0x3')},'description':{'type':Sequelize[_0xfe37('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0xfe37('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x0e94=['STRING','BOOLEAN','sequelize','exports'];(function(_0x19c38e,_0x370cf5){var _0x5436cb=function(_0x24b18d){while(--_0x24b18d){_0x19c38e['push'](_0x19c38e['shift']());}};_0x5436cb(++_0x370cf5);}(_0x0e94,0x112));var _0x40e9=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x0e94[_0x4b055c];return _0x4b62bb;};'use strict';var Sequelize=require(_0x40e9('0x0'));module[_0x40e9('0x1')]={'name':{'type':Sequelize[_0x40e9('0x2')],'unique':'name'},'description':{'type':Sequelize[_0x40e9('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0x40e9('0x3')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/voiceContext/voiceContext.controller.js b/server/api/voiceContext/voiceContext.controller.js
index f9a1454..92c43de 100644
--- a/server/api/voiceContext/voiceContext.controller.js
+++ b/server/api/voiceContext/voiceContext.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe67d=['../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../mysqldb','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','json','count','offset','limit','status','set','save','destroy','Contexts','stack','name','send','index','VoiceContext','model','keys','filters','intersection','attributes','query','length','hasOwnProperty','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','options','includeAll','include','findAll','rows','show','params','fields','find','create','readFileSync','join','root','server/files/templates/context.ejs','utf8','render','/etc/asterisk/extensions_xcally_contexts.conf','chan_sip.so','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','writeFileSync','Reload','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service'];(function(_0x5a899c,_0x22369e){var _0x25f8b4=function(_0x317251){while(--_0x317251){_0x5a899c['push'](_0x5a899c['shift']());}};_0x25f8b4(++_0x22369e);}(_0xe67d,0x123));var _0xde67=function(_0x4cad49,_0x5c3bb3){_0x4cad49=_0x4cad49-0x0;var _0x5e0a00=_0xe67d[_0x4cad49];return _0x5e0a00;};'use strict';var pdf=require(_0xde67('0x0'));var emlformat=require(_0xde67('0x1'));var rimraf=require(_0xde67('0x2'));var zipdir=require(_0xde67('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xde67('0x4'));var moment=require(_0xde67('0x5'));var BPromise=require(_0xde67('0x6'));var Mustache=require(_0xde67('0x7'));var util=require('util');var path=require(_0xde67('0x8'));var sox=require(_0xde67('0x9'));var csv=require('to-csv');var ejs=require(_0xde67('0xa'));var fs=require('fs');var _=require(_0xde67('0xb'));var squel=require(_0xde67('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xde67('0xd'));var toCsv=require('to-csv');var querystring=require(_0xde67('0xe'));var Papa=require(_0xde67('0xf'));var Redis=require(_0xde67('0x10'));var authService=require(_0xde67('0x11'));var qs=require(_0xde67('0x12'));var hardwareService=require(_0xde67('0x13'));var logger=require(_0xde67('0x14'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xde67('0x15'))['db'];var jayson=require(_0xde67('0x16'));var client=jayson[_0xde67('0x17')]['http']({'port':0x232a});function checkPasswordPattern(_0x531647,_0x3cf337,_0x4a33b6){if(_0x4a33b6){var _0xa2abcd=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0xa2abcd[_0xde67('0x18')](_0x3cf337)){return _0x531647;}else{throw new Error(_0xde67('0x19'));}}else{return _0x531647;}}function respondWithRpcPromise(_0x43c405,_0xf42914,_0x1fd3aa,_0x3f344d){return new BPromise(function(_0x415651,_0x273aad){var _0x29fe9b=_0x3f344d||client;return _0x29fe9b[_0xde67('0x1a')](_0x43c405,_0x1fd3aa)[_0xde67('0x1b')](function(_0x59e068){logger[_0xde67('0x1c')](_0xde67('0x1d'),_0xf42914,_0xde67('0x1e'));logger[_0xde67('0x1f')](_0xde67('0x20'),_0xf42914,_0xde67('0x1e'),JSON[_0xde67('0x21')](_0x59e068));if(_0x59e068['error']){if(_0x59e068[_0xde67('0x22')][_0xde67('0x23')]===0x1f4){logger[_0xde67('0x22')](_0xde67('0x1d'),_0xf42914,_0x59e068[_0xde67('0x22')][_0xde67('0x24')]);return _0x273aad(_0x59e068[_0xde67('0x22')]['message']);}logger[_0xde67('0x22')](_0xde67('0x1d'),_0xf42914,_0x59e068['error'][_0xde67('0x24')]);return _0x415651(_0x59e068[_0xde67('0x22')][_0xde67('0x24')]);}else{logger[_0xde67('0x1c')](_0xde67('0x1d'),_0xf42914,_0xde67('0x1e'));_0x415651(_0x59e068[_0xde67('0x25')][_0xde67('0x24')]);}})[_0xde67('0x26')](function(_0x1d1bc0){logger['error'](_0xde67('0x1d'),_0xf42914,_0x1d1bc0);_0x273aad(_0x1d1bc0);});});}function respondWithStatusCode(_0x305021,_0x45e38e){_0x45e38e=_0x45e38e||0xcc;return function(_0x3c32d0){if(_0x3c32d0){return _0x305021[_0xde67('0x27')](_0x45e38e);}return _0x305021['status'](_0x45e38e)['end']();};}function respondWithResult(_0x500bcf,_0x4d3ebd){_0x4d3ebd=_0x4d3ebd||0xc8;return function(_0x2250cb){if(_0x2250cb){return _0x500bcf['status'](_0x4d3ebd)[_0xde67('0x28')](_0x2250cb);}};}function respondWithFilteredResult(_0x2dbb8e,_0x39439e){return function(_0x2ded64){if(_0x2ded64){var _0x3629c7=_0x2ded64[_0xde67('0x29')],_0x1c8d9d=_0x39439e[_0xde67('0x2a')],_0x5296ff=_0x39439e[_0xde67('0x2a')]+_0x39439e[_0xde67('0x2b')],_0x484d27;if(_0x5296ff>=_0x3629c7){_0x5296ff=_0x3629c7;_0x484d27=0xc8;}else{_0x484d27=0xce;}_0x2dbb8e[_0xde67('0x2c')](_0x484d27);return _0x2dbb8e[_0xde67('0x2d')]('Content-Range',_0x1c8d9d+'-'+_0x5296ff+'/'+_0x3629c7)['json'](_0x2ded64);}return null;};}function patchUpdates(_0xe246d8){return function(_0xac0bd7){try{jsonpatch['apply'](_0xac0bd7,_0xe246d8,!![]);}catch(_0x616107){return BPromise['reject'](_0x616107);}return _0xac0bd7[_0xde67('0x2e')]();};}function saveUpdates(_0x4b4f10,_0x6aa67d){return function(_0x4e0b58){if(_0x4e0b58){return _0x4e0b58['update'](_0x4b4f10)[_0xde67('0x1b')](function(_0x56522d){return _0x56522d;});}return null;};}function removeEntity(_0x590f6c,_0x432e61){return function(_0x2c7222){if(_0x2c7222){return _0x2c7222[_0xde67('0x2f')]()['then'](function(){var _0x3d73f1=_0x2c7222['get']({'plain':!![]});var _0x14ef02=_0xde67('0x30');return db['UserProfileResource'][_0xde67('0x2f')]({'where':{'type':_0x14ef02,'resourceId':_0x3d73f1['id']}})[_0xde67('0x1b')](function(){return _0x2c7222;});})[_0xde67('0x1b')](function(){_0x590f6c[_0xde67('0x2c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1197f7,_0x343d1b){return function(_0x4699af){if(!_0x4699af){_0x1197f7['sendStatus'](0x194);}return _0x4699af;};}function handleError(_0x4fe640,_0x2f4145){_0x2f4145=_0x2f4145||0x1f4;return function(_0x4b4547){logger[_0xde67('0x22')](_0x4b4547[_0xde67('0x31')]);if(_0x4b4547[_0xde67('0x32')]){delete _0x4b4547['name'];}_0x4fe640[_0xde67('0x2c')](_0x2f4145)[_0xde67('0x33')](_0x4b4547);};}exports[_0xde67('0x34')]=function(_0xe7fab7,_0x49b648){var _0x4173ae={},_0x4db295={},_0x2297e4={'count':0x0,'rows':[]};var _0x54e6c7=db[_0xde67('0x35')]['rawAttributes'];_0x4db295[_0xde67('0x36')]=_[_0xde67('0x37')](_0x54e6c7);_0x4db295['query']=_[_0xde67('0x37')](_0xe7fab7['query']);_0x4db295[_0xde67('0x38')]=_[_0xde67('0x39')](_0x4db295[_0xde67('0x36')],_0x4db295['query']);_0x4173ae[_0xde67('0x3a')]=_[_0xde67('0x39')](_0x4db295[_0xde67('0x36')],qs['fields'](_0xe7fab7[_0xde67('0x3b')]['fields']));_0x4173ae[_0xde67('0x3a')]=_0x4173ae['attributes'][_0xde67('0x3c')]?_0x4173ae[_0xde67('0x3a')]:_0x4db295[_0xde67('0x36')];if(!_0xe7fab7[_0xde67('0x3b')][_0xde67('0x3d')]('nolimit')){_0x4173ae[_0xde67('0x2b')]=qs[_0xde67('0x2b')](_0xe7fab7['query'][_0xde67('0x2b')]);_0x4173ae['offset']=qs[_0xde67('0x2a')](_0xe7fab7[_0xde67('0x3b')][_0xde67('0x2a')]);}_0x4173ae['order']=qs[_0xde67('0x3e')](_0xe7fab7['query'][_0xde67('0x3e')]);_0x4173ae[_0xde67('0x3f')]=qs['filters'](_[_0xde67('0x40')](_0xe7fab7[_0xde67('0x3b')],_0x4db295['filters']));if(_0xe7fab7[_0xde67('0x3b')][_0xde67('0x41')]){_0x4173ae[_0xde67('0x3f')]=_[_0xde67('0x42')](_0x4173ae[_0xde67('0x3f')],{'$or':_[_0xde67('0x43')](_0x54e6c7,function(_0x1dad2d){if(_0x1dad2d[_0xde67('0x44')][_0xde67('0x45')]!==_0xde67('0x46')){var _0x532d91={};_0x532d91[_0x1dad2d[_0xde67('0x47')]]={'$like':'%'+_0xe7fab7['query'][_0xde67('0x41')]+'%'};return _0x532d91;}})});}_0x4173ae=_[_0xde67('0x42')]({},_0x4173ae,_0xe7fab7[_0xde67('0x48')]);var _0xd0e6cc={'where':_0x4173ae[_0xde67('0x3f')]};return db[_0xde67('0x35')][_0xde67('0x29')](_0xd0e6cc)['then'](function(_0x3bf648){_0x2297e4[_0xde67('0x29')]=_0x3bf648;if(_0xe7fab7[_0xde67('0x3b')][_0xde67('0x49')]){_0x4173ae[_0xde67('0x4a')]=[{'all':!![]}];}return db['VoiceContext'][_0xde67('0x4b')](_0x4173ae);})[_0xde67('0x1b')](function(_0x621c06){_0x2297e4[_0xde67('0x4c')]=_0x621c06;return _0x2297e4;})[_0xde67('0x1b')](respondWithFilteredResult(_0x49b648,_0x4173ae))['catch'](handleError(_0x49b648,null));};exports[_0xde67('0x4d')]=function(_0x5297bc,_0xbb9318){var _0x32fb4a={'raw':![],'where':{'id':_0x5297bc[_0xde67('0x4e')]['id']}},_0x2bc2c5={};_0x2bc2c5[_0xde67('0x36')]=_[_0xde67('0x37')](db[_0xde67('0x35')]['rawAttributes']);_0x2bc2c5['query']=_[_0xde67('0x37')](_0x5297bc[_0xde67('0x3b')]);_0x2bc2c5[_0xde67('0x38')]=_[_0xde67('0x39')](_0x2bc2c5[_0xde67('0x36')],_0x2bc2c5[_0xde67('0x3b')]);_0x32fb4a['attributes']=_[_0xde67('0x39')](_0x2bc2c5[_0xde67('0x36')],qs['fields'](_0x5297bc[_0xde67('0x3b')][_0xde67('0x4f')]));_0x32fb4a[_0xde67('0x3a')]=_0x32fb4a[_0xde67('0x3a')][_0xde67('0x3c')]?_0x32fb4a[_0xde67('0x3a')]:_0x2bc2c5[_0xde67('0x36')];if(_0x5297bc[_0xde67('0x3b')]['includeAll']){_0x32fb4a[_0xde67('0x4a')]=[{'all':!![]}];}_0x32fb4a=_[_0xde67('0x42')]({},_0x32fb4a,_0x5297bc[_0xde67('0x48')]);return db[_0xde67('0x35')][_0xde67('0x50')](_0x32fb4a)[_0xde67('0x1b')](handleEntityNotFound(_0xbb9318,null))[_0xde67('0x1b')](respondWithResult(_0xbb9318,null))[_0xde67('0x26')](handleError(_0xbb9318,null));};exports['create']=function(_0x22032f,_0x536cef,_0xbed40b){var _0x245982;return db['VoiceContext'][_0xde67('0x51')](_0x22032f['body'],{'raw':!![]})[_0xde67('0x1b')](function(_0x56cf89){_0x245982=_0x56cf89;return db[_0xde67('0x35')]['findAll']({'raw':!![]});})['then'](function(_0x118391){var _0x5148ec=fs[_0xde67('0x52')](path[_0xde67('0x53')](config[_0xde67('0x54')],_0xde67('0x55')),_0xde67('0x56'));var _0xebc1d9=ejs[_0xde67('0x57')](_0x5148ec,{'contexts':_0x118391||[]});fs['writeFileSync'](_0xde67('0x58'),_0xebc1d9);})[_0xde67('0x1b')](function(){return respondWithRpcPromise('Reload','create',{'module':_0xde67('0x59')});})[_0xde67('0x1b')](function(){var _0x26b2d2=_0x22032f[_0xde67('0x5a')]['get']({'plain':!![]});if(!_0x26b2d2)throw new Error(_0xde67('0x5b'));if(_0x26b2d2[_0xde67('0x5c')]===_0xde67('0x5a')){var _0x192f47=_0x245982[_0xde67('0x5d')]({'plain':!![]});return db[_0xde67('0x5e')]['find']({'where':{'name':_0xde67('0x30'),'userProfileId':_0x26b2d2[_0xde67('0x5f')]},'raw':!![]})['then'](function(_0xfd8e61){if(_0xfd8e61&&_0xfd8e61[_0xde67('0x60')]===0x0){return db[_0xde67('0x61')][_0xde67('0x51')]({'name':_0x192f47[_0xde67('0x32')],'resourceId':_0x192f47['id'],'type':_0xfd8e61[_0xde67('0x32')],'sectionId':_0xfd8e61['id']},{})[_0xde67('0x1b')](function(){return _0x245982;});}else{return _0x245982;}})[_0xde67('0x26')](function(_0x698e5b){logger[_0xde67('0x22')](_0xde67('0x62'),_0x698e5b);throw _0x698e5b;});}return _0x245982;})['then'](respondWithResult(_0x536cef,0xc9))['catch'](handleError(_0x536cef,null));};exports[_0xde67('0x63')]=function(_0x27beec,_0x42ef8a,_0x16d7b6){var _0x43b94f;return db[_0xde67('0x35')][_0xde67('0x50')]({'where':{'id':_0x27beec[_0xde67('0x4e')]['id']}})[_0xde67('0x1b')](handleEntityNotFound(_0x42ef8a,null))['then'](saveUpdates(_0x27beec[_0xde67('0x64')],null))[_0xde67('0x1b')](function(_0xf8438c){if(_0xf8438c){_0x43b94f=_0xf8438c;return db['VoiceContext'][_0xde67('0x4b')]({'raw':!![]});}})['then'](function(_0x1dafd4){var _0x375912=fs['readFileSync'](path[_0xde67('0x53')](config[_0xde67('0x54')],_0xde67('0x55')),_0xde67('0x56'));var _0x1d711d=ejs[_0xde67('0x57')](_0x375912,{'contexts':_0x1dafd4||[]});fs[_0xde67('0x65')](_0xde67('0x58'),_0x1d711d);})['then'](function(){return respondWithRpcPromise(_0xde67('0x66'),_0xde67('0x63'),{'module':'chan_sip.so'});})[_0xde67('0x1b')](function(){return _0x43b94f;})[_0xde67('0x1b')](respondWithResult(_0x42ef8a,null))[_0xde67('0x26')](handleError(_0x42ef8a,null));};exports[_0xde67('0x2f')]=function(_0x5b79af,_0x33f21e,_0x5200ba){var _0x1f7291;return db[_0xde67('0x35')][_0xde67('0x50')]({'where':{'id':_0x5b79af[_0xde67('0x4e')]['id']}})[_0xde67('0x1b')](handleEntityNotFound(_0x33f21e,null))[_0xde67('0x1b')](removeEntity(_0x33f21e,null))[_0xde67('0x1b')](function(){return db[_0xde67('0x35')]['findAll']({'raw':!![]});})[_0xde67('0x1b')](function(_0x28a6c1){var _0x550b5=fs[_0xde67('0x52')](path[_0xde67('0x53')](config['root'],_0xde67('0x55')),_0xde67('0x56'));var _0x4527b8=ejs['render'](_0x550b5,{'contexts':_0x28a6c1});fs[_0xde67('0x65')](_0xde67('0x58'),_0x4527b8);return respondWithRpcPromise('Reload','destroy',{'module':_0xde67('0x59')});})[_0xde67('0x26')](handleError(_0x33f21e,null));};
\ No newline at end of file
+var _0xad9d=['Contexts','stack','name','send','index','VoiceContext','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','type','key','VIRTUAL','filter','includeAll','findAll','show','rawAttributes','include','options','find','create','body','readFileSync','join','root','server/files/templates/context.ejs','render','Reload','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','utf8','writeFileSync','chan_sip.so','/etc/asterisk/extensions_xcally_contexts.conf','html-pdf','rimraf','fast-json-patch','moment','bluebird','mustache','util','sox','ejs','lodash','squel','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','jayson/promise','client','test','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','destroy','get'];(function(_0x5c351c,_0x2046d8){var _0x26f3b3=function(_0x47ac18){while(--_0x47ac18){_0x5c351c['push'](_0x5c351c['shift']());}};_0x26f3b3(++_0x2046d8);}(_0xad9d,0x1d4));var _0xdad9=function(_0x340a7d,_0x529e5b){_0x340a7d=_0x340a7d-0x0;var _0x2fe444=_0xad9d[_0x340a7d];return _0x2fe444;};'use strict';var pdf=require(_0xdad9('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xdad9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xdad9('0x2'));var rp=require('request-promise');var moment=require(_0xdad9('0x3'));var BPromise=require(_0xdad9('0x4'));var Mustache=require(_0xdad9('0x5'));var util=require(_0xdad9('0x6'));var path=require('path');var sox=require(_0xdad9('0x7'));var csv=require('to-csv');var ejs=require(_0xdad9('0x8'));var fs=require('fs');var _=require(_0xdad9('0x9'));var squel=require(_0xdad9('0xa'));var crypto=require('crypto');var jsforce=require(_0xdad9('0xb'));var deskjs=require(_0xdad9('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xdad9('0xd'));var authService=require(_0xdad9('0xe'));var qs=require(_0xdad9('0xf'));var hardwareService=require(_0xdad9('0x10'));var logger=require(_0xdad9('0x11'))(_0xdad9('0x12'));var utils=require('../../config/utils');var config=require(_0xdad9('0x13'));var db=require(_0xdad9('0x14'))['db'];var jayson=require(_0xdad9('0x15'));var client=jayson[_0xdad9('0x16')]['http']({'port':0x232a});function checkPasswordPattern(_0x46069d,_0x33f1c4,_0x4c3c71){if(_0x4c3c71){var _0x13c487=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x13c487[_0xdad9('0x17')](_0x33f1c4)){return _0x46069d;}else{throw new Error(_0xdad9('0x18'));}}else{return _0x46069d;}}function respondWithRpcPromise(_0x41c466,_0x3ebca6,_0x47dee3,_0x1be883){return new BPromise(function(_0x38d1ba,_0x136471){var _0x3e18a1=_0x1be883||client;return _0x3e18a1[_0xdad9('0x19')](_0x41c466,_0x47dee3)[_0xdad9('0x1a')](function(_0x1a846d){logger['info'](_0xdad9('0x1b'),_0x3ebca6,_0xdad9('0x1c'));logger[_0xdad9('0x1d')](_0xdad9('0x1e'),_0x3ebca6,_0xdad9('0x1c'),JSON[_0xdad9('0x1f')](_0x1a846d));if(_0x1a846d[_0xdad9('0x20')]){if(_0x1a846d[_0xdad9('0x20')][_0xdad9('0x21')]===0x1f4){logger[_0xdad9('0x20')](_0xdad9('0x1b'),_0x3ebca6,_0x1a846d['error']['message']);return _0x136471(_0x1a846d[_0xdad9('0x20')][_0xdad9('0x22')]);}logger[_0xdad9('0x20')]('VoiceContext,\x20%s,\x20%s',_0x3ebca6,_0x1a846d[_0xdad9('0x20')]['message']);return _0x38d1ba(_0x1a846d[_0xdad9('0x20')][_0xdad9('0x22')]);}else{logger[_0xdad9('0x23')](_0xdad9('0x1b'),_0x3ebca6,_0xdad9('0x1c'));_0x38d1ba(_0x1a846d[_0xdad9('0x24')][_0xdad9('0x22')]);}})[_0xdad9('0x25')](function(_0x391eb9){logger[_0xdad9('0x20')](_0xdad9('0x1b'),_0x3ebca6,_0x391eb9);_0x136471(_0x391eb9);});});}function respondWithStatusCode(_0x40f6fc,_0x4d2376){_0x4d2376=_0x4d2376||0xcc;return function(_0x3874e9){if(_0x3874e9){return _0x40f6fc[_0xdad9('0x26')](_0x4d2376);}return _0x40f6fc[_0xdad9('0x27')](_0x4d2376)[_0xdad9('0x28')]();};}function respondWithResult(_0x2345b1,_0x22fed7){_0x22fed7=_0x22fed7||0xc8;return function(_0x1f496d){if(_0x1f496d){return _0x2345b1[_0xdad9('0x27')](_0x22fed7)[_0xdad9('0x29')](_0x1f496d);}};}function respondWithFilteredResult(_0x20a578,_0x4ca350){return function(_0x55e4b8){if(_0x55e4b8){var _0x4a9849=_0x55e4b8[_0xdad9('0x2a')],_0x48daf8=_0x4ca350[_0xdad9('0x2b')],_0x3d129d=_0x4ca350[_0xdad9('0x2b')]+_0x4ca350[_0xdad9('0x2c')],_0x53004f;if(_0x3d129d>=_0x4a9849){_0x3d129d=_0x4a9849;_0x53004f=0xc8;}else{_0x53004f=0xce;}_0x20a578[_0xdad9('0x27')](_0x53004f);return _0x20a578[_0xdad9('0x2d')](_0xdad9('0x2e'),_0x48daf8+'-'+_0x3d129d+'/'+_0x4a9849)[_0xdad9('0x29')](_0x55e4b8);}return null;};}function patchUpdates(_0x29d336){return function(_0x3b3018){try{jsonpatch['apply'](_0x3b3018,_0x29d336,!![]);}catch(_0x13b709){return BPromise[_0xdad9('0x2f')](_0x13b709);}return _0x3b3018[_0xdad9('0x30')]();};}function saveUpdates(_0x4e12d9,_0x3c025e){return function(_0x322120){if(_0x322120){return _0x322120[_0xdad9('0x31')](_0x4e12d9)['then'](function(_0x2f1f4a){return _0x2f1f4a;});}return null;};}function removeEntity(_0x5b3948,_0x30bfbc){return function(_0x7f08bf){if(_0x7f08bf){return _0x7f08bf[_0xdad9('0x32')]()[_0xdad9('0x1a')](function(){var _0x1d9c0a=_0x7f08bf[_0xdad9('0x33')]({'plain':!![]});var _0x26bf3a=_0xdad9('0x34');return db['UserProfileResource'][_0xdad9('0x32')]({'where':{'type':_0x26bf3a,'resourceId':_0x1d9c0a['id']}})[_0xdad9('0x1a')](function(){return _0x7f08bf;});})[_0xdad9('0x1a')](function(){_0x5b3948[_0xdad9('0x27')](0xcc)[_0xdad9('0x28')]();});}};}function handleEntityNotFound(_0x431a0e,_0x5e9a65){return function(_0xb36cad){if(!_0xb36cad){_0x431a0e[_0xdad9('0x26')](0x194);}return _0xb36cad;};}function handleError(_0x1efea6,_0x147bdf){_0x147bdf=_0x147bdf||0x1f4;return function(_0x37b278){logger[_0xdad9('0x20')](_0x37b278[_0xdad9('0x35')]);if(_0x37b278[_0xdad9('0x36')]){delete _0x37b278[_0xdad9('0x36')];}_0x1efea6['status'](_0x147bdf)[_0xdad9('0x37')](_0x37b278);};}exports[_0xdad9('0x38')]=function(_0x51b28b,_0x351a7e){var _0x5a72fb={},_0xaac5f6={},_0x145584={'count':0x0,'rows':[]};var _0xd26d04=db[_0xdad9('0x39')]['rawAttributes'];_0xaac5f6[_0xdad9('0x3a')]=_[_0xdad9('0x3b')](_0xd26d04);_0xaac5f6[_0xdad9('0x3c')]=_[_0xdad9('0x3b')](_0x51b28b[_0xdad9('0x3c')]);_0xaac5f6[_0xdad9('0x3d')]=_[_0xdad9('0x3e')](_0xaac5f6['model'],_0xaac5f6['query']);_0x5a72fb[_0xdad9('0x3f')]=_['intersection'](_0xaac5f6[_0xdad9('0x3a')],qs[_0xdad9('0x40')](_0x51b28b[_0xdad9('0x3c')]['fields']));_0x5a72fb['attributes']=_0x5a72fb[_0xdad9('0x3f')][_0xdad9('0x41')]?_0x5a72fb[_0xdad9('0x3f')]:_0xaac5f6[_0xdad9('0x3a')];if(!_0x51b28b[_0xdad9('0x3c')][_0xdad9('0x42')](_0xdad9('0x43'))){_0x5a72fb[_0xdad9('0x2c')]=qs[_0xdad9('0x2c')](_0x51b28b[_0xdad9('0x3c')]['limit']);_0x5a72fb[_0xdad9('0x2b')]=qs[_0xdad9('0x2b')](_0x51b28b[_0xdad9('0x3c')]['offset']);}_0x5a72fb['order']=qs[_0xdad9('0x44')](_0x51b28b[_0xdad9('0x3c')]['sort']);_0x5a72fb[_0xdad9('0x45')]=qs[_0xdad9('0x3d')](_[_0xdad9('0x46')](_0x51b28b[_0xdad9('0x3c')],_0xaac5f6['filters']));if(_0x51b28b[_0xdad9('0x3c')]['filter']){_0x5a72fb[_0xdad9('0x45')]=_[_0xdad9('0x47')](_0x5a72fb['where'],{'$or':_['map'](_0xd26d04,function(_0x5326f){if(_0x5326f[_0xdad9('0x48')][_0xdad9('0x49')]!==_0xdad9('0x4a')){var _0x57fce3={};_0x57fce3[_0x5326f['field']]={'$like':'%'+_0x51b28b[_0xdad9('0x3c')][_0xdad9('0x4b')]+'%'};return _0x57fce3;}})});}_0x5a72fb=_[_0xdad9('0x47')]({},_0x5a72fb,_0x51b28b['options']);var _0x134f2a={'where':_0x5a72fb['where']};return db['VoiceContext'][_0xdad9('0x2a')](_0x134f2a)[_0xdad9('0x1a')](function(_0x5d1e14){_0x145584['count']=_0x5d1e14;if(_0x51b28b[_0xdad9('0x3c')][_0xdad9('0x4c')]){_0x5a72fb['include']=[{'all':!![]}];}return db['VoiceContext'][_0xdad9('0x4d')](_0x5a72fb);})[_0xdad9('0x1a')](function(_0xdf55e){_0x145584['rows']=_0xdf55e;return _0x145584;})['then'](respondWithFilteredResult(_0x351a7e,_0x5a72fb))[_0xdad9('0x25')](handleError(_0x351a7e,null));};exports[_0xdad9('0x4e')]=function(_0x135463,_0xb626c2){var _0x4b5e14={'raw':![],'where':{'id':_0x135463['params']['id']}},_0x2a5f3c={};_0x2a5f3c['model']=_[_0xdad9('0x3b')](db['VoiceContext'][_0xdad9('0x4f')]);_0x2a5f3c['query']=_[_0xdad9('0x3b')](_0x135463[_0xdad9('0x3c')]);_0x2a5f3c[_0xdad9('0x3d')]=_['intersection'](_0x2a5f3c[_0xdad9('0x3a')],_0x2a5f3c[_0xdad9('0x3c')]);_0x4b5e14[_0xdad9('0x3f')]=_[_0xdad9('0x3e')](_0x2a5f3c[_0xdad9('0x3a')],qs['fields'](_0x135463[_0xdad9('0x3c')]['fields']));_0x4b5e14['attributes']=_0x4b5e14[_0xdad9('0x3f')][_0xdad9('0x41')]?_0x4b5e14[_0xdad9('0x3f')]:_0x2a5f3c[_0xdad9('0x3a')];if(_0x135463['query'][_0xdad9('0x4c')]){_0x4b5e14[_0xdad9('0x50')]=[{'all':!![]}];}_0x4b5e14=_['merge']({},_0x4b5e14,_0x135463[_0xdad9('0x51')]);return db[_0xdad9('0x39')][_0xdad9('0x52')](_0x4b5e14)[_0xdad9('0x1a')](handleEntityNotFound(_0xb626c2,null))[_0xdad9('0x1a')](respondWithResult(_0xb626c2,null))[_0xdad9('0x25')](handleError(_0xb626c2,null));};exports[_0xdad9('0x53')]=function(_0x30de57,_0x2ccc44,_0x45e16c){var _0x397cab;return db[_0xdad9('0x39')][_0xdad9('0x53')](_0x30de57[_0xdad9('0x54')],{'raw':!![]})['then'](function(_0x8ce746){_0x397cab=_0x8ce746;return db[_0xdad9('0x39')][_0xdad9('0x4d')]({'raw':!![]});})[_0xdad9('0x1a')](function(_0x18e70b){var _0x5f121a=fs[_0xdad9('0x55')](path[_0xdad9('0x56')](config[_0xdad9('0x57')],_0xdad9('0x58')),'utf8');var _0x4d0ff2=ejs[_0xdad9('0x59')](_0x5f121a,{'contexts':_0x18e70b||[]});fs['writeFileSync']('/etc/asterisk/extensions_xcally_contexts.conf',_0x4d0ff2);})[_0xdad9('0x1a')](function(){return respondWithRpcPromise(_0xdad9('0x5a'),_0xdad9('0x53'),{'module':'chan_sip.so'});})[_0xdad9('0x1a')](function(){var _0x4601c4=_0x30de57[_0xdad9('0x5b')][_0xdad9('0x33')]({'plain':!![]});if(!_0x4601c4)throw new Error(_0xdad9('0x5c'));if(_0x4601c4[_0xdad9('0x5d')]==='user'){var _0x1980f9=_0x397cab['get']({'plain':!![]});return db[_0xdad9('0x5e')][_0xdad9('0x52')]({'where':{'name':_0xdad9('0x34'),'userProfileId':_0x4601c4[_0xdad9('0x5f')]},'raw':!![]})[_0xdad9('0x1a')](function(_0x239769){if(_0x239769&&_0x239769[_0xdad9('0x60')]===0x0){return db[_0xdad9('0x61')][_0xdad9('0x53')]({'name':_0x1980f9[_0xdad9('0x36')],'resourceId':_0x1980f9['id'],'type':_0x239769[_0xdad9('0x36')],'sectionId':_0x239769['id']},{})[_0xdad9('0x1a')](function(){return _0x397cab;});}else{return _0x397cab;}})[_0xdad9('0x25')](function(_0x3dc7d1){logger[_0xdad9('0x20')](_0xdad9('0x62'),_0x3dc7d1);throw _0x3dc7d1;});}return _0x397cab;})['then'](respondWithResult(_0x2ccc44,0xc9))[_0xdad9('0x25')](handleError(_0x2ccc44,null));};exports[_0xdad9('0x31')]=function(_0x2ae8d0,_0x5a24d6,_0x5f2cd0){var _0x7c91f3;return db[_0xdad9('0x39')][_0xdad9('0x52')]({'where':{'id':_0x2ae8d0[_0xdad9('0x63')]['id']}})[_0xdad9('0x1a')](handleEntityNotFound(_0x5a24d6,null))['then'](saveUpdates(_0x2ae8d0[_0xdad9('0x54')],null))['then'](function(_0x14251c){if(_0x14251c){_0x7c91f3=_0x14251c;return db[_0xdad9('0x39')][_0xdad9('0x4d')]({'raw':!![]});}})[_0xdad9('0x1a')](function(_0x5e6cd6){var _0x4e5a60=fs[_0xdad9('0x55')](path[_0xdad9('0x56')](config[_0xdad9('0x57')],'server/files/templates/context.ejs'),_0xdad9('0x64'));var _0x41807e=ejs[_0xdad9('0x59')](_0x4e5a60,{'contexts':_0x5e6cd6||[]});fs[_0xdad9('0x65')]('/etc/asterisk/extensions_xcally_contexts.conf',_0x41807e);})[_0xdad9('0x1a')](function(){return respondWithRpcPromise(_0xdad9('0x5a'),'update',{'module':_0xdad9('0x66')});})[_0xdad9('0x1a')](function(){return _0x7c91f3;})[_0xdad9('0x1a')](respondWithResult(_0x5a24d6,null))[_0xdad9('0x25')](handleError(_0x5a24d6,null));};exports[_0xdad9('0x32')]=function(_0x412ea8,_0x332078,_0x3dc230){var _0xc772bc;return db[_0xdad9('0x39')][_0xdad9('0x52')]({'where':{'id':_0x412ea8['params']['id']}})['then'](handleEntityNotFound(_0x332078,null))['then'](removeEntity(_0x332078,null))[_0xdad9('0x1a')](function(){return db[_0xdad9('0x39')][_0xdad9('0x4d')]({'raw':!![]});})['then'](function(_0x39665b){var _0x1b1cda=fs[_0xdad9('0x55')](path[_0xdad9('0x56')](config[_0xdad9('0x57')],_0xdad9('0x58')),_0xdad9('0x64'));var _0x5b7ad2=ejs[_0xdad9('0x59')](_0x1b1cda,{'contexts':_0x39665b});fs[_0xdad9('0x65')](_0xdad9('0x67'),_0x5b7ad2);return respondWithRpcPromise(_0xdad9('0x5a'),_0xdad9('0x32'),{'module':_0xdad9('0x66')});})[_0xdad9('0x25')](handleError(_0x332078,null));};
\ No newline at end of file
diff --git a/server/api/voiceContext/voiceContext.model.js b/server/api/voiceContext/voiceContext.model.js
index 1b8fbb1..b119826 100644
--- a/server/api/voiceContext/voiceContext.model.js
+++ b/server/api/voiceContext/voiceContext.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x587c=['lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','exports','define','VoiceContext','voice_contexts'];(function(_0x4b33d1,_0x2414e1){var _0x9e7221=function(_0x476ecc){while(--_0x476ecc){_0x4b33d1['push'](_0x4b33d1['shift']());}};_0x9e7221(++_0x2414e1);}(_0x587c,0xc6));var _0xc587=function(_0x189e06,_0x1a1cf6){_0x189e06=_0x189e06-0x0;var _0xfb38ce=_0x587c[_0x189e06];return _0xfb38ce;};'use strict';var _=require(_0xc587('0x0'));var util=require(_0xc587('0x1'));var logger=require(_0xc587('0x2'))('api');var moment=require('moment');var BPromise=require(_0xc587('0x3'));var rp=require(_0xc587('0x4'));var fs=require('fs');var path=require(_0xc587('0x5'));var rimraf=require(_0xc587('0x6'));var config=require('../../config/environment');var attributes=require('./voiceContext.attributes');module[_0xc587('0x7')]=function(_0x4e2e5e,_0x41b44c){return _0x4e2e5e[_0xc587('0x8')](_0xc587('0x9'),attributes,{'tableName':_0xc587('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe92e=['moment','request-promise','path','rimraf','../../config/environment','define','lodash','util','api'];(function(_0x5e6d65,_0x5db89c){var _0x5e1f75=function(_0x3729a1){while(--_0x3729a1){_0x5e6d65['push'](_0x5e6d65['shift']());}};_0x5e1f75(++_0x5db89c);}(_0xe92e,0x69));var _0xee92=function(_0x33cde8,_0x2a3f44){_0x33cde8=_0x33cde8-0x0;var _0x15cb1b=_0xe92e[_0x33cde8];return _0x15cb1b;};'use strict';var _=require(_0xee92('0x0'));var util=require(_0xee92('0x1'));var logger=require('../../config/logger')(_0xee92('0x2'));var moment=require(_0xee92('0x3'));var BPromise=require('bluebird');var rp=require(_0xee92('0x4'));var fs=require('fs');var path=require(_0xee92('0x5'));var rimraf=require(_0xee92('0x6'));var config=require(_0xee92('0x7'));var attributes=require('./voiceContext.attributes');module['exports']=function(_0x58e441,_0x3ae273){return _0x58e441[_0xee92('0x8')]('VoiceContext',attributes,{'tableName':'voice_contexts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceContext/voiceContext.rpc.js b/server/api/voiceContext/voiceContext.rpc.js
index b368ba5..0fbab8d 100644
--- a/server/api/voiceContext/voiceContext.rpc.js
+++ b/server/api/voiceContext/voiceContext.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3aa9=['VoiceContext,\x20%s,\x20%s','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','http','then','info'];(function(_0x1fb794,_0x297464){var _0x5d2095=function(_0x3371a5){while(--_0x3371a5){_0x1fb794['push'](_0x1fb794['shift']());}};_0x5d2095(++_0x297464);}(_0x3aa9,0x163));var _0x93aa=function(_0x179475,_0x496b3d){_0x179475=_0x179475-0x0;var _0x31ff8a=_0x3aa9[_0x179475];return _0x31ff8a;};'use strict';var _=require(_0x93aa('0x0'));var util=require(_0x93aa('0x1'));var moment=require(_0x93aa('0x2'));var BPromise=require(_0x93aa('0x3'));var rs=require(_0x93aa('0x4'));var fs=require('fs');var Redis=require(_0x93aa('0x5'));var db=require(_0x93aa('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x93aa('0x7'))(_0x93aa('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x93aa('0x9')][_0x93aa('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x6bb203,_0x70f421,_0x248026){return new BPromise(function(_0x1c8cc8,_0x37c4a2){return client['request'](_0x6bb203,_0x248026)[_0x93aa('0xb')](function(_0x51aab8){logger[_0x93aa('0xc')](_0x93aa('0xd'),_0x70f421,'request\x20sent');logger[_0x93aa('0xe')](_0x93aa('0xf'),_0x70f421,'request\x20sent',JSON[_0x93aa('0x10')](_0x51aab8));if(_0x51aab8[_0x93aa('0x11')]){if(_0x51aab8[_0x93aa('0x11')][_0x93aa('0x12')]===0x1f4){logger['error'](_0x93aa('0xd'),_0x70f421,_0x51aab8[_0x93aa('0x11')]['message']);return _0x37c4a2(_0x51aab8[_0x93aa('0x11')][_0x93aa('0x13')]);}logger[_0x93aa('0x11')](_0x93aa('0xd'),_0x70f421,_0x51aab8['error'][_0x93aa('0x13')]);return _0x1c8cc8(_0x51aab8[_0x93aa('0x11')][_0x93aa('0x13')]);}else{logger[_0x93aa('0xc')]('VoiceContext,\x20%s,\x20%s',_0x70f421,_0x93aa('0x14'));_0x1c8cc8(_0x51aab8[_0x93aa('0x15')]['message']);}})[_0x93aa('0x16')](function(_0x432658){logger['error'](_0x93aa('0xd'),_0x70f421,_0x432658);_0x37c4a2(_0x432658);});});}
\ No newline at end of file
+var _0x6af9=['request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','VoiceContext,\x20%s,\x20%s','debug','VoiceContext,\x20%s,\x20%s,\x20%s'];(function(_0xe885be,_0x559186){var _0x20703a=function(_0xd26139){while(--_0xd26139){_0xe885be['push'](_0xe885be['shift']());}};_0x20703a(++_0x559186);}(_0x6af9,0x92));var _0x96af=function(_0x51da75,_0x17ddec){_0x51da75=_0x51da75-0x0;var _0x40b076=_0x6af9[_0x51da75];return _0x40b076;};'use strict';var _=require(_0x96af('0x0'));var util=require(_0x96af('0x1'));var moment=require('moment');var BPromise=require(_0x96af('0x2'));var rs=require(_0x96af('0x3'));var fs=require('fs');var Redis=require(_0x96af('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x96af('0x5'))(_0x96af('0x6'));var config=require(_0x96af('0x7'));var jayson=require(_0x96af('0x8'));var client=jayson[_0x96af('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x297f9a,_0xeccc9,_0x3ae2e8){return new BPromise(function(_0x396f52,_0x2ea2c7){return client[_0x96af('0xa')](_0x297f9a,_0x3ae2e8)[_0x96af('0xb')](function(_0x2c190a){logger['info'](_0x96af('0xc'),_0xeccc9,'request\x20sent');logger[_0x96af('0xd')](_0x96af('0xe'),_0xeccc9,_0x96af('0xf'),JSON[_0x96af('0x10')](_0x2c190a));if(_0x2c190a[_0x96af('0x11')]){if(_0x2c190a[_0x96af('0x11')][_0x96af('0x12')]===0x1f4){logger[_0x96af('0x11')]('VoiceContext,\x20%s,\x20%s',_0xeccc9,_0x2c190a[_0x96af('0x11')][_0x96af('0x13')]);return _0x2ea2c7(_0x2c190a[_0x96af('0x11')][_0x96af('0x13')]);}logger['error'](_0x96af('0xc'),_0xeccc9,_0x2c190a[_0x96af('0x11')][_0x96af('0x13')]);return _0x396f52(_0x2c190a[_0x96af('0x11')][_0x96af('0x13')]);}else{logger[_0x96af('0x14')](_0x96af('0xc'),_0xeccc9,'request\x20sent');_0x396f52(_0x2c190a[_0x96af('0x15')][_0x96af('0x13')]);}})[_0x96af('0x16')](function(_0x25e401){logger[_0x96af('0x11')](_0x96af('0xc'),_0xeccc9,_0x25e401);_0x2ea2c7(_0x25e401);});});}
\ No newline at end of file
diff --git a/server/api/voiceDialReport/index.js b/server/api/voiceDialReport/index.js
index 4a17796..27a65b5 100644
--- a/server/api/voiceDialReport/index.js
+++ b/server/api/voiceDialReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3a0f=['post','create','update','delete','/:id','destroy','exports','multer','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe'];(function(_0xf4870,_0x27f69e){var _0x35507a=function(_0x1ab13b){while(--_0x1ab13b){_0xf4870['push'](_0xf4870['shift']());}};_0x35507a(++_0x27f69e);}(_0x3a0f,0x1db));var _0xf3a0=function(_0x3c7aee,_0x3a945a){_0x3c7aee=_0x3c7aee-0x0;var _0x4f11d5=_0x3a0f[_0x3c7aee];return _0x4f11d5;};'use strict';var multer=require(_0xf3a0('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xf3a0('0x1'));var router=express[_0xf3a0('0x2')]();var auth=require(_0xf3a0('0x3'));var interaction=require(_0xf3a0('0x4'));var config=require(_0xf3a0('0x5'));var controller=require('./voiceDialReport.controller');router[_0xf3a0('0x6')]('/',auth[_0xf3a0('0x7')](),controller[_0xf3a0('0x8')]);router['get'](_0xf3a0('0x9'),auth[_0xf3a0('0x7')](),controller[_0xf3a0('0xa')]);router[_0xf3a0('0x6')]('/:id',auth[_0xf3a0('0x7')](),controller['show']);router[_0xf3a0('0xb')]('/',auth[_0xf3a0('0x7')](),controller[_0xf3a0('0xc')]);router['put']('/:id',auth[_0xf3a0('0x7')](),controller[_0xf3a0('0xd')]);router[_0xf3a0('0xe')](_0xf3a0('0xf'),auth[_0xf3a0('0x7')](),controller[_0xf3a0('0x10')]);module[_0xf3a0('0x11')]=router;
\ No newline at end of file
+var _0xaa7d=['show','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceDialReport.controller','get','isAuthenticated','index','/:id'];(function(_0x11934c,_0x56d052){var _0x2013d3=function(_0x1cc912){while(--_0x1cc912){_0x11934c['push'](_0x11934c['shift']());}};_0x2013d3(++_0x56d052);}(_0xaa7d,0x1d4));var _0xdaa7=function(_0x28a5ad,_0x520afa){_0x28a5ad=_0x28a5ad-0x0;var _0x176b8a=_0xaa7d[_0x28a5ad];return _0x176b8a;};'use strict';var multer=require(_0xdaa7('0x0'));var util=require('util');var path=require(_0xdaa7('0x1'));var timeout=require(_0xdaa7('0x2'));var express=require('express');var router=express[_0xdaa7('0x3')]();var auth=require(_0xdaa7('0x4'));var interaction=require(_0xdaa7('0x5'));var config=require(_0xdaa7('0x6'));var controller=require(_0xdaa7('0x7'));router[_0xdaa7('0x8')]('/',auth[_0xdaa7('0x9')](),controller[_0xdaa7('0xa')]);router[_0xdaa7('0x8')]('/describe',auth[_0xdaa7('0x9')](),controller['describe']);router[_0xdaa7('0x8')](_0xdaa7('0xb'),auth['isAuthenticated'](),controller[_0xdaa7('0xc')]);router[_0xdaa7('0xd')]('/',auth[_0xdaa7('0x9')](),controller[_0xdaa7('0xe')]);router[_0xdaa7('0xf')](_0xdaa7('0xb'),auth['isAuthenticated'](),controller[_0xdaa7('0x10')]);router[_0xdaa7('0x11')](_0xdaa7('0xb'),auth['isAuthenticated'](),controller[_0xdaa7('0x12')]);module[_0xdaa7('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.attributes.js b/server/api/voiceDialReport/voiceDialReport.attributes.js
index 0e6ed65..51551cc 100644
--- a/server/api/voiceDialReport/voiceDialReport.attributes.js
+++ b/server/api/voiceDialReport/voiceDialReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x638f=['exports','STRING','INTEGER','DATE','called,connect,complete','sequelize'];(function(_0x12b83d,_0x4bcec7){var _0x1fd39d=function(_0x449185){while(--_0x449185){_0x12b83d['push'](_0x12b83d['shift']());}};_0x1fd39d(++_0x4bcec7);}(_0x638f,0x107));var _0xf638=function(_0x7cb5eb,_0x40e72c){_0x7cb5eb=_0x7cb5eb-0x0;var _0x5006df=_0x638f[_0x7cb5eb];return _0x5006df;};'use strict';var Sequelize=require(_0xf638('0x0'));module[_0xf638('0x1')]={'privilege':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xf638('0x2')]},'channelstate':{'type':Sequelize[_0xf638('0x3')]},'channelstatedesc':{'type':Sequelize[_0xf638('0x2')]},'calleridnum':{'type':Sequelize[_0xf638('0x2')]},'calleridname':{'type':Sequelize[_0xf638('0x2')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0xf638('0x2')]},'accountcode':{'type':Sequelize[_0xf638('0x2')]},'context':{'type':Sequelize[_0xf638('0x2')]},'exten':{'type':Sequelize[_0xf638('0x2')]},'priority':{'type':Sequelize[_0xf638('0x3')]},'uniqueid':{'type':Sequelize[_0xf638('0x2')]},'linkedid':{'type':Sequelize[_0xf638('0x2')]},'destchannel':{'type':Sequelize[_0xf638('0x2')]},'destchannelstate':{'type':Sequelize[_0xf638('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0xf638('0x2')]},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0xf638('0x2')]},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize[_0xf638('0x2')]},'destaccountcode':{'type':Sequelize[_0xf638('0x2')]},'destcontext':{'type':Sequelize[_0xf638('0x2')]},'destexten':{'type':Sequelize[_0xf638('0x2')]},'destpriority':{'type':Sequelize['INTEGER']},'destuniqueid':{'type':Sequelize[_0xf638('0x2')]},'destlinkedid':{'type':Sequelize[_0xf638('0x2')]},'dialstring':{'type':Sequelize[_0xf638('0x2')]},'dialstatus':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0xf638('0x4')]},'answertime':{'type':Sequelize[_0xf638('0x4')]},'endtime':{'type':Sequelize[_0xf638('0x4')]},'lastevent':{'type':Sequelize[_0xf638('0x2')],'comment':_0xf638('0x5')},'routeId':{'type':Sequelize[_0xf638('0x3')]},'duration':{'type':Sequelize[_0xf638('0x3')]},'holdtime':{'type':Sequelize[_0xf638('0x3')]},'billableseconds':{'type':Sequelize[_0xf638('0x3')]}};
\ No newline at end of file
+var _0x6fcf=['STRING','INTEGER','DATE','called,connect,complete','sequelize','exports'];(function(_0x54fca4,_0xf52330){var _0x56f39=function(_0x5b0531){while(--_0x5b0531){_0x54fca4['push'](_0x54fca4['shift']());}};_0x56f39(++_0xf52330);}(_0x6fcf,0x1a2));var _0xf6fc=function(_0x1118eb,_0x476f0a){_0x1118eb=_0x1118eb-0x0;var _0x2dbcd0=_0x6fcf[_0x1118eb];return _0x2dbcd0;};'use strict';var Sequelize=require(_0xf6fc('0x0'));module[_0xf6fc('0x1')]={'privilege':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xf6fc('0x2')]},'channelstate':{'type':Sequelize[_0xf6fc('0x3')]},'channelstatedesc':{'type':Sequelize[_0xf6fc('0x2')]},'calleridnum':{'type':Sequelize[_0xf6fc('0x2')]},'calleridname':{'type':Sequelize[_0xf6fc('0x2')]},'connectedlinenum':{'type':Sequelize[_0xf6fc('0x2')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0xf6fc('0x2')]},'accountcode':{'type':Sequelize[_0xf6fc('0x2')]},'context':{'type':Sequelize[_0xf6fc('0x2')]},'exten':{'type':Sequelize[_0xf6fc('0x2')]},'priority':{'type':Sequelize[_0xf6fc('0x3')]},'uniqueid':{'type':Sequelize[_0xf6fc('0x2')]},'linkedid':{'type':Sequelize[_0xf6fc('0x2')]},'destchannel':{'type':Sequelize[_0xf6fc('0x2')]},'destchannelstate':{'type':Sequelize[_0xf6fc('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0xf6fc('0x2')]},'destcalleridnum':{'type':Sequelize[_0xf6fc('0x2')]},'destcalleridname':{'type':Sequelize[_0xf6fc('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xf6fc('0x2')]},'destconnectedlinename':{'type':Sequelize[_0xf6fc('0x2')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xf6fc('0x2')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0xf6fc('0x2')]},'destpriority':{'type':Sequelize[_0xf6fc('0x3')]},'destuniqueid':{'type':Sequelize['STRING']},'destlinkedid':{'type':Sequelize[_0xf6fc('0x2')]},'dialstring':{'type':Sequelize[_0xf6fc('0x2')]},'dialstatus':{'type':Sequelize[_0xf6fc('0x2')]},'starttime':{'type':Sequelize['DATE']},'answertime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0xf6fc('0x4')]},'lastevent':{'type':Sequelize[_0xf6fc('0x2')],'comment':_0xf6fc('0x5')},'routeId':{'type':Sequelize['INTEGER']},'duration':{'type':Sequelize[_0xf6fc('0x3')]},'holdtime':{'type':Sequelize[_0xf6fc('0x3')]},'billableseconds':{'type':Sequelize[_0xf6fc('0x3')]}};
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.controller.js b/server/api/voiceDialReport/voiceDialReport.controller.js
index b514a7a..2dc4161 100644
--- a/server/api/voiceDialReport/voiceDialReport.controller.js
+++ b/server/api/voiceDialReport/voiceDialReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2392=['mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','json','count','offset','status','Content-Range','apply','save','update','then','error','stack','name','send','index','keys','query','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filters','merge','map','key','field','filter','options','VoiceDialReport','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','html-pdf','eml-format','zip-dir','fast-json-patch','bluebird'];(function(_0x75f869,_0x3690d6){var _0x10af8b=function(_0x22d3ff){while(--_0x22d3ff){_0x75f869['push'](_0x75f869['shift']());}};_0x10af8b(++_0x3690d6);}(_0x2392,0xd0));var _0x2239=function(_0x414675,_0x298ae5){_0x414675=_0x414675-0x0;var _0x41c678=_0x2392[_0x414675];return _0x41c678;};'use strict';var pdf=require(_0x2239('0x0'));var emlformat=require(_0x2239('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x2239('0x2'));var jsonpatch=require(_0x2239('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x2239('0x4'));var Mustache=require(_0x2239('0x5'));var util=require(_0x2239('0x6'));var path=require(_0x2239('0x7'));var sox=require(_0x2239('0x8'));var csv=require(_0x2239('0x9'));var ejs=require(_0x2239('0xa'));var fs=require('fs');var _=require(_0x2239('0xb'));var squel=require(_0x2239('0xc'));var crypto=require(_0x2239('0xd'));var jsforce=require(_0x2239('0xe'));var deskjs=require(_0x2239('0xf'));var toCsv=require(_0x2239('0x9'));var querystring=require('querystring');var Papa=require(_0x2239('0x10'));var Redis=require(_0x2239('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x2239('0x12'));var logger=require(_0x2239('0x13'))(_0x2239('0x14'));var utils=require(_0x2239('0x15'));var config=require(_0x2239('0x16'));var db=require(_0x2239('0x17'))['db'];function respondWithStatusCode(_0x2c2037,_0x5e4305){_0x5e4305=_0x5e4305||0xcc;return function(_0x4702dd){if(_0x4702dd){return _0x2c2037[_0x2239('0x18')](_0x5e4305);}return _0x2c2037['status'](_0x5e4305)[_0x2239('0x19')]();};}function respondWithResult(_0x13e54e,_0x4508dc){_0x4508dc=_0x4508dc||0xc8;return function(_0x3338b0){if(_0x3338b0){return _0x13e54e['status'](_0x4508dc)[_0x2239('0x1a')](_0x3338b0);}};}function respondWithFilteredResult(_0x50be7b,_0x2a6806){return function(_0x163e09){if(_0x163e09){var _0x4236da=_0x163e09[_0x2239('0x1b')],_0x472ce2=_0x2a6806['offset'],_0x4f23ce=_0x2a6806[_0x2239('0x1c')]+_0x2a6806['limit'],_0x1e1171;if(_0x4f23ce>=_0x4236da){_0x4f23ce=_0x4236da;_0x1e1171=0xc8;}else{_0x1e1171=0xce;}_0x50be7b[_0x2239('0x1d')](_0x1e1171);return _0x50be7b['set'](_0x2239('0x1e'),_0x472ce2+'-'+_0x4f23ce+'/'+_0x4236da)['json'](_0x163e09);}return null;};}function patchUpdates(_0x2f8f10){return function(_0x10257f){try{jsonpatch[_0x2239('0x1f')](_0x10257f,_0x2f8f10,!![]);}catch(_0x3d8fd9){return BPromise['reject'](_0x3d8fd9);}return _0x10257f[_0x2239('0x20')]();};}function saveUpdates(_0x4c5956,_0x2ead1e){return function(_0x4917cb){if(_0x4917cb){return _0x4917cb[_0x2239('0x21')](_0x4c5956)[_0x2239('0x22')](function(_0x2c2d74){return _0x2c2d74;});}return null;};}function removeEntity(_0x49dc2b,_0x47bb3f){return function(_0x2b2000){if(_0x2b2000){return _0x2b2000['destroy']()[_0x2239('0x22')](function(){_0x49dc2b[_0x2239('0x1d')](0xcc)[_0x2239('0x19')]();});}};}function handleEntityNotFound(_0x407581,_0x54af84){return function(_0x1f1f49){if(!_0x1f1f49){_0x407581[_0x2239('0x18')](0x194);}return _0x1f1f49;};}function handleError(_0x282253,_0x21b497){_0x21b497=_0x21b497||0x1f4;return function(_0x5c0fa7){logger[_0x2239('0x23')](_0x5c0fa7[_0x2239('0x24')]);if(_0x5c0fa7[_0x2239('0x25')]){delete _0x5c0fa7['name'];}_0x282253[_0x2239('0x1d')](_0x21b497)[_0x2239('0x26')](_0x5c0fa7);};}exports[_0x2239('0x27')]=function(_0x1c179e,_0x1ba564){var _0x1937ee={},_0xcb6711={},_0x4f4135={'count':0x0,'rows':[]};var _0x5a1a52=db['VoiceDialReport']['rawAttributes'];_0xcb6711['model']=_[_0x2239('0x28')](_0x5a1a52);_0xcb6711[_0x2239('0x29')]=_[_0x2239('0x28')](_0x1c179e[_0x2239('0x29')]);_0xcb6711['filters']=_[_0x2239('0x2a')](_0xcb6711[_0x2239('0x2b')],_0xcb6711[_0x2239('0x29')]);_0x1937ee[_0x2239('0x2c')]=_[_0x2239('0x2a')](_0xcb6711[_0x2239('0x2b')],qs[_0x2239('0x2d')](_0x1c179e['query'][_0x2239('0x2d')]));_0x1937ee[_0x2239('0x2c')]=_0x1937ee[_0x2239('0x2c')][_0x2239('0x2e')]?_0x1937ee[_0x2239('0x2c')]:_0xcb6711['model'];if(!_0x1c179e[_0x2239('0x29')][_0x2239('0x2f')]('nolimit')){_0x1937ee['limit']=qs['limit'](_0x1c179e['query']['limit']);_0x1937ee[_0x2239('0x1c')]=qs[_0x2239('0x1c')](_0x1c179e[_0x2239('0x29')][_0x2239('0x1c')]);}_0x1937ee[_0x2239('0x30')]=qs['sort'](_0x1c179e[_0x2239('0x29')][_0x2239('0x31')]);_0x1937ee[_0x2239('0x32')]=qs['filters'](_[_0x2239('0x33')](_0x1c179e[_0x2239('0x29')],_0xcb6711[_0x2239('0x34')]));if(_0x1c179e['query']['filter']){_0x1937ee['where']=_[_0x2239('0x35')](_0x1937ee[_0x2239('0x32')],{'$or':_[_0x2239('0x36')](_0x5a1a52,function(_0x4b0ea8){if(_0x4b0ea8['type'][_0x2239('0x37')]!=='VIRTUAL'){var _0x3e4f04={};_0x3e4f04[_0x4b0ea8[_0x2239('0x38')]]={'$like':'%'+_0x1c179e[_0x2239('0x29')][_0x2239('0x39')]+'%'};return _0x3e4f04;}})});}_0x1937ee=_['merge']({},_0x1937ee,_0x1c179e[_0x2239('0x3a')]);var _0x3ef148={'where':_0x1937ee[_0x2239('0x32')]};return db[_0x2239('0x3b')][_0x2239('0x1b')](_0x3ef148)[_0x2239('0x22')](function(_0x22bcfb){_0x4f4135[_0x2239('0x1b')]=_0x22bcfb;if(_0x1c179e['query'][_0x2239('0x3c')]){_0x1937ee[_0x2239('0x3d')]=[{'all':!![]}];}return db[_0x2239('0x3b')][_0x2239('0x3e')](_0x1937ee);})[_0x2239('0x22')](function(_0x1c112d){_0x4f4135[_0x2239('0x3f')]=_0x1c112d;return _0x4f4135;})[_0x2239('0x22')](respondWithFilteredResult(_0x1ba564,_0x1937ee))[_0x2239('0x40')](handleError(_0x1ba564,null));};exports[_0x2239('0x41')]=function(_0x5b59ac,_0x2c318a){var _0x39dc99={'raw':!![],'where':{'id':_0x5b59ac[_0x2239('0x42')]['id']}},_0x16304d={};_0x16304d['model']=_['keys'](db[_0x2239('0x3b')]['rawAttributes']);_0x16304d[_0x2239('0x29')]=_['keys'](_0x5b59ac[_0x2239('0x29')]);_0x16304d[_0x2239('0x34')]=_['intersection'](_0x16304d['model'],_0x16304d['query']);_0x39dc99[_0x2239('0x2c')]=_['intersection'](_0x16304d[_0x2239('0x2b')],qs[_0x2239('0x2d')](_0x5b59ac['query'][_0x2239('0x2d')]));_0x39dc99[_0x2239('0x2c')]=_0x39dc99[_0x2239('0x2c')][_0x2239('0x2e')]?_0x39dc99[_0x2239('0x2c')]:_0x16304d[_0x2239('0x2b')];if(_0x5b59ac[_0x2239('0x29')][_0x2239('0x3c')]){_0x39dc99[_0x2239('0x3d')]=[{'all':!![]}];}_0x39dc99=_['merge']({},_0x39dc99,_0x5b59ac[_0x2239('0x3a')]);return db['VoiceDialReport'][_0x2239('0x43')](_0x39dc99)['then'](handleEntityNotFound(_0x2c318a,null))[_0x2239('0x22')](respondWithResult(_0x2c318a,null))[_0x2239('0x40')](handleError(_0x2c318a,null));};exports['create']=function(_0x6e6f05,_0x5ddfca){return db[_0x2239('0x3b')][_0x2239('0x44')](_0x6e6f05[_0x2239('0x45')],{})['then'](respondWithResult(_0x5ddfca,0xc9))['catch'](handleError(_0x5ddfca,null));};exports['update']=function(_0x1e07e0,_0x24210c){if(_0x1e07e0[_0x2239('0x45')]['id']){delete _0x1e07e0[_0x2239('0x45')]['id'];}return db[_0x2239('0x3b')][_0x2239('0x43')]({'where':{'id':_0x1e07e0['params']['id']}})[_0x2239('0x22')](handleEntityNotFound(_0x24210c,null))[_0x2239('0x22')](saveUpdates(_0x1e07e0[_0x2239('0x45')],null))['then'](respondWithResult(_0x24210c,null))[_0x2239('0x40')](handleError(_0x24210c,null));};exports['destroy']=function(_0x4a9c3c,_0x410bc6){return db[_0x2239('0x3b')][_0x2239('0x43')]({'where':{'id':_0x4a9c3c[_0x2239('0x42')]['id']}})[_0x2239('0x22')](handleEntityNotFound(_0x410bc6,null))['then'](removeEntity(_0x410bc6,null))[_0x2239('0x40')](handleError(_0x410bc6,null));};exports[_0x2239('0x46')]=function(_0x56d6d0,_0x592918){return db['VoiceDialReport'][_0x2239('0x46')]()['then'](respondWithResult(_0x592918,null))[_0x2239('0x40')](handleError(_0x592918,null));};
\ No newline at end of file
+var _0xd58c=['../../components/parsers/qs','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','set','apply','reject','update','then','destroy','error','name','index','VoiceDialReport','model','query','intersection','attributes','length','limit','order','sort','where','filters','merge','map','type','key','VIRTUAL','field','filter','options','include','findAll','rows','catch','params','keys','fields','find','create','body','describe','html-pdf','eml-format','rimraf','fast-json-patch','moment','mustache','util','path','sox','to-csv','squel','crypto','jsforce','desk.js','papaparse','ioredis'];(function(_0x2ac512,_0x18d0fc){var _0x41a20e=function(_0x4c1ac2){while(--_0x4c1ac2){_0x2ac512['push'](_0x2ac512['shift']());}};_0x41a20e(++_0x18d0fc);}(_0xd58c,0xb6));var _0xcd58=function(_0x448d58,_0x589775){_0x448d58=_0x448d58-0x0;var _0x1d7af4=_0xd58c[_0x448d58];return _0x1d7af4;};'use strict';var pdf=require(_0xcd58('0x0'));var emlformat=require(_0xcd58('0x1'));var rimraf=require(_0xcd58('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xcd58('0x3'));var rp=require('request-promise');var moment=require(_0xcd58('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xcd58('0x5'));var util=require(_0xcd58('0x6'));var path=require(_0xcd58('0x7'));var sox=require(_0xcd58('0x8'));var csv=require(_0xcd58('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xcd58('0xa'));var crypto=require(_0xcd58('0xb'));var jsforce=require(_0xcd58('0xc'));var deskjs=require(_0xcd58('0xd'));var toCsv=require(_0xcd58('0x9'));var querystring=require('querystring');var Papa=require(_0xcd58('0xe'));var Redis=require(_0xcd58('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xcd58('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xcd58('0x11'))(_0xcd58('0x12'));var utils=require(_0xcd58('0x13'));var config=require('../../config/environment');var db=require(_0xcd58('0x14'))['db'];function respondWithStatusCode(_0x4ac3e3,_0x2a17d4){_0x2a17d4=_0x2a17d4||0xcc;return function(_0x51880c){if(_0x51880c){return _0x4ac3e3[_0xcd58('0x15')](_0x2a17d4);}return _0x4ac3e3[_0xcd58('0x16')](_0x2a17d4)[_0xcd58('0x17')]();};}function respondWithResult(_0x17b93f,_0x37561b){_0x37561b=_0x37561b||0xc8;return function(_0x202412){if(_0x202412){return _0x17b93f[_0xcd58('0x16')](_0x37561b)[_0xcd58('0x18')](_0x202412);}};}function respondWithFilteredResult(_0x4d9a56,_0x5d0aa3){return function(_0x3ce190){if(_0x3ce190){var _0xa225e3=_0x3ce190[_0xcd58('0x19')],_0x3d5e86=_0x5d0aa3[_0xcd58('0x1a')],_0x51f5b6=_0x5d0aa3[_0xcd58('0x1a')]+_0x5d0aa3['limit'],_0x515fc3;if(_0x51f5b6>=_0xa225e3){_0x51f5b6=_0xa225e3;_0x515fc3=0xc8;}else{_0x515fc3=0xce;}_0x4d9a56['status'](_0x515fc3);return _0x4d9a56[_0xcd58('0x1b')]('Content-Range',_0x3d5e86+'-'+_0x51f5b6+'/'+_0xa225e3)[_0xcd58('0x18')](_0x3ce190);}return null;};}function patchUpdates(_0x39dc9c){return function(_0x2824a6){try{jsonpatch[_0xcd58('0x1c')](_0x2824a6,_0x39dc9c,!![]);}catch(_0x491198){return BPromise[_0xcd58('0x1d')](_0x491198);}return _0x2824a6['save']();};}function saveUpdates(_0x4b106f,_0x5c0c54){return function(_0x503c5){if(_0x503c5){return _0x503c5[_0xcd58('0x1e')](_0x4b106f)[_0xcd58('0x1f')](function(_0x5229cb){return _0x5229cb;});}return null;};}function removeEntity(_0xb7325f,_0x2a8681){return function(_0x5c241c){if(_0x5c241c){return _0x5c241c[_0xcd58('0x20')]()[_0xcd58('0x1f')](function(){_0xb7325f[_0xcd58('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x566d56,_0x2592a1){return function(_0x3eae55){if(!_0x3eae55){_0x566d56[_0xcd58('0x15')](0x194);}return _0x3eae55;};}function handleError(_0x33feb3,_0x2e1322){_0x2e1322=_0x2e1322||0x1f4;return function(_0x38a559){logger[_0xcd58('0x21')](_0x38a559['stack']);if(_0x38a559['name']){delete _0x38a559[_0xcd58('0x22')];}_0x33feb3[_0xcd58('0x16')](_0x2e1322)['send'](_0x38a559);};}exports[_0xcd58('0x23')]=function(_0x580c2b,_0x26bb62){var _0x2ec6b1={},_0x75bb8e={},_0x1784ff={'count':0x0,'rows':[]};var _0x2b64b8=db[_0xcd58('0x24')]['rawAttributes'];_0x75bb8e[_0xcd58('0x25')]=_['keys'](_0x2b64b8);_0x75bb8e[_0xcd58('0x26')]=_['keys'](_0x580c2b[_0xcd58('0x26')]);_0x75bb8e['filters']=_[_0xcd58('0x27')](_0x75bb8e['model'],_0x75bb8e[_0xcd58('0x26')]);_0x2ec6b1[_0xcd58('0x28')]=_[_0xcd58('0x27')](_0x75bb8e[_0xcd58('0x25')],qs['fields'](_0x580c2b[_0xcd58('0x26')]['fields']));_0x2ec6b1[_0xcd58('0x28')]=_0x2ec6b1[_0xcd58('0x28')][_0xcd58('0x29')]?_0x2ec6b1[_0xcd58('0x28')]:_0x75bb8e[_0xcd58('0x25')];if(!_0x580c2b[_0xcd58('0x26')]['hasOwnProperty']('nolimit')){_0x2ec6b1[_0xcd58('0x2a')]=qs['limit'](_0x580c2b['query'][_0xcd58('0x2a')]);_0x2ec6b1[_0xcd58('0x1a')]=qs[_0xcd58('0x1a')](_0x580c2b[_0xcd58('0x26')][_0xcd58('0x1a')]);}_0x2ec6b1[_0xcd58('0x2b')]=qs['sort'](_0x580c2b['query'][_0xcd58('0x2c')]);_0x2ec6b1[_0xcd58('0x2d')]=qs[_0xcd58('0x2e')](_['pick'](_0x580c2b[_0xcd58('0x26')],_0x75bb8e[_0xcd58('0x2e')]));if(_0x580c2b[_0xcd58('0x26')]['filter']){_0x2ec6b1['where']=_[_0xcd58('0x2f')](_0x2ec6b1[_0xcd58('0x2d')],{'$or':_[_0xcd58('0x30')](_0x2b64b8,function(_0x354924){if(_0x354924[_0xcd58('0x31')][_0xcd58('0x32')]!==_0xcd58('0x33')){var _0x24d522={};_0x24d522[_0x354924[_0xcd58('0x34')]]={'$like':'%'+_0x580c2b[_0xcd58('0x26')][_0xcd58('0x35')]+'%'};return _0x24d522;}})});}_0x2ec6b1=_[_0xcd58('0x2f')]({},_0x2ec6b1,_0x580c2b[_0xcd58('0x36')]);var _0x4407f7={'where':_0x2ec6b1[_0xcd58('0x2d')]};return db[_0xcd58('0x24')][_0xcd58('0x19')](_0x4407f7)[_0xcd58('0x1f')](function(_0x9d4a09){_0x1784ff[_0xcd58('0x19')]=_0x9d4a09;if(_0x580c2b[_0xcd58('0x26')]['includeAll']){_0x2ec6b1[_0xcd58('0x37')]=[{'all':!![]}];}return db[_0xcd58('0x24')][_0xcd58('0x38')](_0x2ec6b1);})['then'](function(_0x2e637c){_0x1784ff[_0xcd58('0x39')]=_0x2e637c;return _0x1784ff;})['then'](respondWithFilteredResult(_0x26bb62,_0x2ec6b1))[_0xcd58('0x3a')](handleError(_0x26bb62,null));};exports['show']=function(_0x54b587,_0x46518b){var _0x4ca4b6={'raw':!![],'where':{'id':_0x54b587[_0xcd58('0x3b')]['id']}},_0x5e5da2={};_0x5e5da2[_0xcd58('0x25')]=_[_0xcd58('0x3c')](db['VoiceDialReport']['rawAttributes']);_0x5e5da2[_0xcd58('0x26')]=_['keys'](_0x54b587[_0xcd58('0x26')]);_0x5e5da2[_0xcd58('0x2e')]=_['intersection'](_0x5e5da2['model'],_0x5e5da2[_0xcd58('0x26')]);_0x4ca4b6[_0xcd58('0x28')]=_[_0xcd58('0x27')](_0x5e5da2[_0xcd58('0x25')],qs[_0xcd58('0x3d')](_0x54b587[_0xcd58('0x26')][_0xcd58('0x3d')]));_0x4ca4b6[_0xcd58('0x28')]=_0x4ca4b6[_0xcd58('0x28')][_0xcd58('0x29')]?_0x4ca4b6[_0xcd58('0x28')]:_0x5e5da2[_0xcd58('0x25')];if(_0x54b587[_0xcd58('0x26')]['includeAll']){_0x4ca4b6[_0xcd58('0x37')]=[{'all':!![]}];}_0x4ca4b6=_[_0xcd58('0x2f')]({},_0x4ca4b6,_0x54b587[_0xcd58('0x36')]);return db['VoiceDialReport'][_0xcd58('0x3e')](_0x4ca4b6)[_0xcd58('0x1f')](handleEntityNotFound(_0x46518b,null))[_0xcd58('0x1f')](respondWithResult(_0x46518b,null))[_0xcd58('0x3a')](handleError(_0x46518b,null));};exports['create']=function(_0x1b4b67,_0x26dd8f){return db[_0xcd58('0x24')][_0xcd58('0x3f')](_0x1b4b67[_0xcd58('0x40')],{})[_0xcd58('0x1f')](respondWithResult(_0x26dd8f,0xc9))[_0xcd58('0x3a')](handleError(_0x26dd8f,null));};exports[_0xcd58('0x1e')]=function(_0x452e7e,_0xd839c){if(_0x452e7e['body']['id']){delete _0x452e7e[_0xcd58('0x40')]['id'];}return db[_0xcd58('0x24')][_0xcd58('0x3e')]({'where':{'id':_0x452e7e[_0xcd58('0x3b')]['id']}})[_0xcd58('0x1f')](handleEntityNotFound(_0xd839c,null))[_0xcd58('0x1f')](saveUpdates(_0x452e7e[_0xcd58('0x40')],null))[_0xcd58('0x1f')](respondWithResult(_0xd839c,null))[_0xcd58('0x3a')](handleError(_0xd839c,null));};exports[_0xcd58('0x20')]=function(_0x1416fa,_0x1e39d8){return db['VoiceDialReport'][_0xcd58('0x3e')]({'where':{'id':_0x1416fa[_0xcd58('0x3b')]['id']}})['then'](handleEntityNotFound(_0x1e39d8,null))[_0xcd58('0x1f')](removeEntity(_0x1e39d8,null))[_0xcd58('0x3a')](handleError(_0x1e39d8,null));};exports[_0xcd58('0x41')]=function(_0x160c39,_0x424cfb){return db[_0xcd58('0x24')]['describe']()['then'](respondWithResult(_0x424cfb,null))[_0xcd58('0x3a')](handleError(_0x424cfb,null));};
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.model.js b/server/api/voiceDialReport/voiceDialReport.model.js
index e887740..a357568 100644
--- a/server/api/voiceDialReport/voiceDialReport.model.js
+++ b/server/api/voiceDialReport/voiceDialReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd5b6=['define','VoiceDialReport','report_dial','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./voiceDialReport.attributes','exports'];(function(_0x2c8745,_0x4ba4b5){var _0x3d96dc=function(_0xc06a1e){while(--_0xc06a1e){_0x2c8745['push'](_0x2c8745['shift']());}};_0x3d96dc(++_0x4ba4b5);}(_0xd5b6,0x73));var _0x6d5b=function(_0x22d0b9,_0x20bc8a){_0x22d0b9=_0x22d0b9-0x0;var _0x1f5203=_0xd5b6[_0x22d0b9];return _0x1f5203;};'use strict';var _=require(_0x6d5b('0x0'));var util=require(_0x6d5b('0x1'));var logger=require(_0x6d5b('0x2'))(_0x6d5b('0x3'));var moment=require(_0x6d5b('0x4'));var BPromise=require(_0x6d5b('0x5'));var rp=require(_0x6d5b('0x6'));var fs=require('fs');var path=require(_0x6d5b('0x7'));var rimraf=require('rimraf');var config=require(_0x6d5b('0x8'));var attributes=require(_0x6d5b('0x9'));module[_0x6d5b('0xa')]=function(_0x4935ef,_0x1c2490){return _0x4935ef[_0x6d5b('0xb')](_0x6d5b('0xc'),attributes,{'tableName':_0x6d5b('0xd'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd5b6=['define','VoiceDialReport','report_dial','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./voiceDialReport.attributes','exports'];(function(_0x2abc69,_0x5463d6){var _0x4eb01e=function(_0x3fba6d){while(--_0x3fba6d){_0x2abc69['push'](_0x2abc69['shift']());}};_0x4eb01e(++_0x5463d6);}(_0xd5b6,0x73));var _0x6d5b=function(_0x1f338a,_0x56817d){_0x1f338a=_0x1f338a-0x0;var _0x186eb4=_0xd5b6[_0x1f338a];return _0x186eb4;};'use strict';var _=require(_0x6d5b('0x0'));var util=require(_0x6d5b('0x1'));var logger=require(_0x6d5b('0x2'))(_0x6d5b('0x3'));var moment=require(_0x6d5b('0x4'));var BPromise=require(_0x6d5b('0x5'));var rp=require(_0x6d5b('0x6'));var fs=require('fs');var path=require(_0x6d5b('0x7'));var rimraf=require('rimraf');var config=require(_0x6d5b('0x8'));var attributes=require(_0x6d5b('0x9'));module[_0x6d5b('0xa')]=function(_0x4935ef,_0x1c2490){return _0x4935ef[_0x6d5b('0xb')](_0x6d5b('0xc'),attributes,{'tableName':_0x6d5b('0xd'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.rpc.js b/server/api/voiceDialReport/voiceDialReport.rpc.js
index 5df89c2..c8a5ef7 100644
--- a/server/api/voiceDialReport/voiceDialReport.rpc.js
+++ b/server/api/voiceDialReport/voiceDialReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc125=['info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateVoiceDialReport','body','options','raw','catch','UpdateVoiceDialReport','VoiceDialReport','update','where','attributes','limit','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x3a2ee2,_0x59d56b){var _0x1e7d1e=function(_0x815530){while(--_0x815530){_0x3a2ee2['push'](_0x3a2ee2['shift']());}};_0x1e7d1e(++_0x59d56b);}(_0xc125,0x150));var _0x5c12=function(_0x563414,_0x23f683){_0x563414=_0x563414-0x0;var _0xe32724=_0xc125[_0x563414];return _0xe32724;};'use strict';var _=require('lodash');var util=require(_0x5c12('0x0'));var moment=require('moment');var BPromise=require(_0x5c12('0x1'));var rs=require(_0x5c12('0x2'));var fs=require('fs');var Redis=require(_0x5c12('0x3'));var db=require(_0x5c12('0x4'))['db'];var utils=require(_0x5c12('0x5'));var logger=require(_0x5c12('0x6'))(_0x5c12('0x7'));var config=require(_0x5c12('0x8'));var jayson=require(_0x5c12('0x9'));var client=jayson[_0x5c12('0xa')][_0x5c12('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x11ace0,_0x4cab65,_0x1d0635){return new BPromise(function(_0x4465e3,_0x52a111){return client[_0x5c12('0xc')](_0x11ace0,_0x1d0635)[_0x5c12('0xd')](function(_0x3f7347){logger[_0x5c12('0xe')](_0x5c12('0xf'),_0x4cab65,_0x5c12('0x10'));logger[_0x5c12('0x11')](_0x5c12('0x12'),_0x4cab65,'request\x20sent',JSON[_0x5c12('0x13')](_0x3f7347));if(_0x3f7347[_0x5c12('0x14')]){if(_0x3f7347[_0x5c12('0x14')][_0x5c12('0x15')]===0x1f4){logger[_0x5c12('0x14')]('VoiceDialReport,\x20%s,\x20%s',_0x4cab65,_0x3f7347['error'][_0x5c12('0x16')]);return _0x52a111(_0x3f7347['error'][_0x5c12('0x16')]);}logger[_0x5c12('0x14')](_0x5c12('0xf'),_0x4cab65,_0x3f7347['error']['message']);return _0x4465e3(_0x3f7347[_0x5c12('0x14')][_0x5c12('0x16')]);}else{logger['info'](_0x5c12('0xf'),_0x4cab65,_0x5c12('0x10'));_0x4465e3(_0x3f7347[_0x5c12('0x17')]['message']);}})['catch'](function(_0x1d6487){logger[_0x5c12('0x14')](_0x5c12('0xf'),_0x4cab65,_0x1d6487);_0x52a111(_0x1d6487);});});}exports[_0x5c12('0x18')]=function(_0x1bd895){var _0xf1daab=this;return new Promise(function(_0x16543f,_0x2a6528){return db['VoiceDialReport']['create'](_0x1bd895[_0x5c12('0x19')],{'raw':_0x1bd895[_0x5c12('0x1a')]?_0x1bd895[_0x5c12('0x1a')][_0x5c12('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x3ea1b5){logger['info'](_0x5c12('0x18'),_0x1bd895);logger[_0x5c12('0x11')]('CreateVoiceDialReport',_0x1bd895,JSON['stringify'](_0x3ea1b5));_0x16543f(_0x3ea1b5);})[_0x5c12('0x1c')](function(_0x5f7e40){logger['error'](_0x5c12('0x18'),_0x5f7e40['message'],_0x1bd895);_0x2a6528(_0xf1daab[_0x5c12('0x14')](0x1f4,_0x5f7e40[_0x5c12('0x16')]));});});};exports[_0x5c12('0x1d')]=function(_0x40f6ab){var _0x3752a3=this;return new Promise(function(_0x1ff2ca,_0x3720f5){return db[_0x5c12('0x1e')][_0x5c12('0x1f')](_0x40f6ab[_0x5c12('0x19')],{'raw':_0x40f6ab[_0x5c12('0x1a')]?_0x40f6ab[_0x5c12('0x1a')][_0x5c12('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x40f6ab['options']?_0x40f6ab[_0x5c12('0x1a')][_0x5c12('0x20')]||null:null,'attributes':_0x40f6ab[_0x5c12('0x1a')]?_0x40f6ab[_0x5c12('0x1a')][_0x5c12('0x21')]||null:null,'limit':_0x40f6ab[_0x5c12('0x1a')]?_0x40f6ab['options'][_0x5c12('0x22')]||null:null})[_0x5c12('0xd')](function(_0x4d21b6){logger['info']('UpdateVoiceDialReport',_0x40f6ab);logger[_0x5c12('0x11')](_0x5c12('0x1d'),_0x40f6ab,JSON['stringify'](_0x4d21b6));_0x1ff2ca(_0x4d21b6);})[_0x5c12('0x1c')](function(_0x274f32){logger[_0x5c12('0x14')]('UpdateVoiceDialReport',_0x274f32[_0x5c12('0x16')],_0x40f6ab);_0x3720f5(_0x3752a3['error'](0x1f4,_0x274f32[_0x5c12('0x16')]));});});};
\ No newline at end of file
+var _0xe205=['limit','UpdateVoiceDialReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','CreateVoiceDialReport','VoiceDialReport','body','options','raw','update','where'];(function(_0x5cb3a7,_0x4bffa7){var _0x509ce4=function(_0xb0444a){while(--_0xb0444a){_0x5cb3a7['push'](_0x5cb3a7['shift']());}};_0x509ce4(++_0x4bffa7);}(_0xe205,0xa7));var _0x5e20=function(_0x5f34be,_0x36d8b3){_0x5f34be=_0x5f34be-0x0;var _0x29a8fc=_0xe205[_0x5f34be];return _0x29a8fc;};'use strict';var _=require(_0x5e20('0x0'));var util=require(_0x5e20('0x1'));var moment=require(_0x5e20('0x2'));var BPromise=require(_0x5e20('0x3'));var rs=require(_0x5e20('0x4'));var fs=require('fs');var Redis=require(_0x5e20('0x5'));var db=require(_0x5e20('0x6'))['db'];var utils=require(_0x5e20('0x7'));var logger=require(_0x5e20('0x8'))('rpc');var config=require(_0x5e20('0x9'));var jayson=require(_0x5e20('0xa'));var client=jayson[_0x5e20('0xb')][_0x5e20('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5eca5c,_0x4cc88d,_0x3a382f){return new BPromise(function(_0x4c9332,_0x533e18){return client[_0x5e20('0xd')](_0x5eca5c,_0x3a382f)[_0x5e20('0xe')](function(_0x5c1eee){logger[_0x5e20('0xf')](_0x5e20('0x10'),_0x4cc88d,_0x5e20('0x11'));logger[_0x5e20('0x12')]('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0x4cc88d,_0x5e20('0x11'),JSON[_0x5e20('0x13')](_0x5c1eee));if(_0x5c1eee[_0x5e20('0x14')]){if(_0x5c1eee[_0x5e20('0x14')][_0x5e20('0x15')]===0x1f4){logger[_0x5e20('0x14')]('VoiceDialReport,\x20%s,\x20%s',_0x4cc88d,_0x5c1eee[_0x5e20('0x14')][_0x5e20('0x16')]);return _0x533e18(_0x5c1eee[_0x5e20('0x14')]['message']);}logger[_0x5e20('0x14')]('VoiceDialReport,\x20%s,\x20%s',_0x4cc88d,_0x5c1eee[_0x5e20('0x14')]['message']);return _0x4c9332(_0x5c1eee[_0x5e20('0x14')][_0x5e20('0x16')]);}else{logger[_0x5e20('0xf')](_0x5e20('0x10'),_0x4cc88d,_0x5e20('0x11'));_0x4c9332(_0x5c1eee['result'][_0x5e20('0x16')]);}})[_0x5e20('0x17')](function(_0x166ffd){logger[_0x5e20('0x14')](_0x5e20('0x10'),_0x4cc88d,_0x166ffd);_0x533e18(_0x166ffd);});});}exports[_0x5e20('0x18')]=function(_0x1cc706){var _0xf3488f=this;return new Promise(function(_0x4d3e4a,_0x434686){return db[_0x5e20('0x19')]['create'](_0x1cc706[_0x5e20('0x1a')],{'raw':_0x1cc706[_0x5e20('0x1b')]?_0x1cc706[_0x5e20('0x1b')][_0x5e20('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x2954fc){logger['info']('CreateVoiceDialReport',_0x1cc706);logger['debug']('CreateVoiceDialReport',_0x1cc706,JSON[_0x5e20('0x13')](_0x2954fc));_0x4d3e4a(_0x2954fc);})['catch'](function(_0x3d89e4){logger[_0x5e20('0x14')](_0x5e20('0x18'),_0x3d89e4[_0x5e20('0x16')],_0x1cc706);_0x434686(_0xf3488f[_0x5e20('0x14')](0x1f4,_0x3d89e4[_0x5e20('0x16')]));});});};exports['UpdateVoiceDialReport']=function(_0x15705f){var _0x5a755f=this;return new Promise(function(_0x52d4f5,_0x33993a){return db[_0x5e20('0x19')][_0x5e20('0x1d')](_0x15705f[_0x5e20('0x1a')],{'raw':_0x15705f[_0x5e20('0x1b')]?_0x15705f[_0x5e20('0x1b')][_0x5e20('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x15705f['options']?_0x15705f[_0x5e20('0x1b')][_0x5e20('0x1e')]||null:null,'attributes':_0x15705f[_0x5e20('0x1b')]?_0x15705f[_0x5e20('0x1b')]['attributes']||null:null,'limit':_0x15705f[_0x5e20('0x1b')]?_0x15705f[_0x5e20('0x1b')][_0x5e20('0x1f')]||null:null})[_0x5e20('0xe')](function(_0xbed73a){logger[_0x5e20('0xf')]('UpdateVoiceDialReport',_0x15705f);logger[_0x5e20('0x12')](_0x5e20('0x20'),_0x15705f,JSON['stringify'](_0xbed73a));_0x52d4f5(_0xbed73a);})[_0x5e20('0x17')](function(_0x21d1d8){logger[_0x5e20('0x14')](_0x5e20('0x20'),_0x21d1d8[_0x5e20('0x16')],_0x15705f);_0x33993a(_0x5a755f[_0x5e20('0x14')](0x1f4,_0x21d1d8['message']));});});};
\ No newline at end of file
diff --git a/server/api/voiceExtension/index.js b/server/api/voiceExtension/index.js
index a645346..9ec01c4 100644
--- a/server/api/voiceExtension/index.js
+++ b/server/api/voiceExtension/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcf3d=['../../config/environment','./voiceExtension.controller','get','isAuthenticated','index','/:id','show','post','/:id/applications','addApplications','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/interaction/service'];(function(_0x455e5e,_0x16b8a2){var _0x58e4d5=function(_0x45f3fd){while(--_0x45f3fd){_0x455e5e['push'](_0x455e5e['shift']());}};_0x58e4d5(++_0x16b8a2);}(_0xcf3d,0x19e));var _0xdcf3=function(_0x4f1d9b,_0x42f314){_0x4f1d9b=_0x4f1d9b-0x0;var _0x51dcd7=_0xcf3d[_0x4f1d9b];return _0x51dcd7;};'use strict';var multer=require(_0xdcf3('0x0'));var util=require(_0xdcf3('0x1'));var path=require(_0xdcf3('0x2'));var timeout=require(_0xdcf3('0x3'));var express=require('express');var router=express[_0xdcf3('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xdcf3('0x5'));var config=require(_0xdcf3('0x6'));var controller=require(_0xdcf3('0x7'));router[_0xdcf3('0x8')]('/',auth[_0xdcf3('0x9')](),controller[_0xdcf3('0xa')]);router['get'](_0xdcf3('0xb'),auth['isAuthenticated'](),controller[_0xdcf3('0xc')]);router[_0xdcf3('0xd')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0xdcf3('0xe'),auth[_0xdcf3('0x9')](),controller[_0xdcf3('0xf')]);router[_0xdcf3('0x10')](_0xdcf3('0xb'),auth[_0xdcf3('0x9')](),controller[_0xdcf3('0x11')]);router[_0xdcf3('0x12')](_0xdcf3('0xb'),auth['isAuthenticated'](),controller[_0xdcf3('0x13')]);module[_0xdcf3('0x14')]=router;
\ No newline at end of file
+var _0xeef7=['util','connect-timeout','express','../../config/environment','./voiceExtension.controller','get','/:id','isAuthenticated','show','create','post','/:id/applications','addApplications','put','delete','destroy','exports','multer'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xeef7,0x7d));var _0x7eef=function(_0x32ca32,_0x238b2b){_0x32ca32=_0x32ca32-0x0;var _0x5438ff=_0xeef7[_0x32ca32];return _0x5438ff;};'use strict';var multer=require(_0x7eef('0x0'));var util=require(_0x7eef('0x1'));var path=require('path');var timeout=require(_0x7eef('0x2'));var express=require(_0x7eef('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7eef('0x4'));var controller=require(_0x7eef('0x5'));router[_0x7eef('0x6')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x7eef('0x7'),auth[_0x7eef('0x8')](),controller[_0x7eef('0x9')]);router['post']('/',auth[_0x7eef('0x8')](),controller[_0x7eef('0xa')]);router[_0x7eef('0xb')](_0x7eef('0xc'),auth[_0x7eef('0x8')](),controller[_0x7eef('0xd')]);router[_0x7eef('0xe')](_0x7eef('0x7'),auth[_0x7eef('0x8')](),controller['update']);router[_0x7eef('0xf')](_0x7eef('0x7'),auth[_0x7eef('0x8')](),controller[_0x7eef('0x10')]);module[_0x7eef('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.attributes.js b/server/api/voiceExtension/voiceExtension.attributes.js
index a358618..ce4bc8f 100644
--- a/server/api/voiceExtension/voiceExtension.attributes.js
+++ b/server/api/voiceExtension/voiceExtension.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd3d1=['outbound-fax','system','any','*,*,*,*','INTEGER','BOOLEAN','wav','VIRTUAL','getDataValue','exten','sequelize','exports','STRING','compositeIndex','NoOp','ENUM','inbound','outbound','internal','inbound-fax'];(function(_0x33c1c3,_0x415e89){var _0x28dc4c=function(_0x2e4b59){while(--_0x2e4b59){_0x33c1c3['push'](_0x33c1c3['shift']());}};_0x28dc4c(++_0x415e89);}(_0xd3d1,0x172));var _0x1d3d=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xd3d1[_0x2be8c2];return _0x97f531;};'use strict';var Sequelize=require(_0x1d3d('0x0'));module[_0x1d3d('0x1')]={'context':{'type':Sequelize['STRING'],'allowNull':![],'unique':'compositeIndex','validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0x1d3d('0x2')],'allowNull':![],'unique':_0x1d3d('0x3')},'priority':{'type':Sequelize[_0x1d3d('0x2')],'allowNull':![],'defaultValue':'1','unique':_0x1d3d('0x3')},'tag':{'type':Sequelize[_0x1d3d('0x2')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0x1d3d('0x2')],'allowNull':![],'defaultValue':_0x1d3d('0x4')},'appdata':{'type':Sequelize[_0x1d3d('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0x1d3d('0x5')](_0x1d3d('0x6'),_0x1d3d('0x7'),_0x1d3d('0x8'),_0x1d3d('0x9'),_0x1d3d('0xa'),_0x1d3d('0xb'),_0x1d3d('0xc')),'allowNull':![]},'description':{'type':Sequelize[_0x1d3d('0x2')]},'interval':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x1d3d('0xd')},'IntervalId':{'type':Sequelize[_0x1d3d('0xe')]},'isApp':{'type':Sequelize[_0x1d3d('0xf')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0x1d3d('0x2')],'defaultValue':null},'callerID':{'type':Sequelize[_0x1d3d('0x2')],'allowNull':!![]},'record':{'type':Sequelize[_0x1d3d('0xf')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0x1d3d('0xe')]},'recordingFormat':{'type':Sequelize[_0x1d3d('0x2')],'defaultValue':_0x1d3d('0x10')},'answer':{'type':Sequelize[_0x1d3d('0xf')],'defaultValue':!![]},'name':{'type':Sequelize[_0x1d3d('0x11')],'get':function(_0x479216){return this[_0x1d3d('0x12')](_0x1d3d('0x13'));}}};
\ No newline at end of file
+var _0x41bb=['VIRTUAL','exten','sequelize','exports','compositeIndex','STRING','NoOp','ENUM','inbound-fax','outbound-fax','any','*,*,*,*','INTEGER','BOOLEAN','wav'];(function(_0x4961bd,_0x39d847){var _0x3f83cf=function(_0x5250a6){while(--_0x5250a6){_0x4961bd['push'](_0x4961bd['shift']());}};_0x3f83cf(++_0x39d847);}(_0x41bb,0xc5));var _0xb41b=function(_0x487363,_0xabd92c){_0x487363=_0x487363-0x0;var _0x198e1d=_0x41bb[_0x487363];return _0x198e1d;};'use strict';var Sequelize=require(_0xb41b('0x0'));module[_0xb41b('0x1')]={'context':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xb41b('0x2'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xb41b('0x2')},'priority':{'type':Sequelize[_0xb41b('0x3')],'allowNull':![],'defaultValue':'1','unique':_0xb41b('0x2')},'tag':{'type':Sequelize[_0xb41b('0x3')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb41b('0x4')},'appdata':{'type':Sequelize[_0xb41b('0x3')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0xb41b('0x5')]('inbound','outbound','internal',_0xb41b('0x6'),_0xb41b('0x7'),'system',_0xb41b('0x8')),'allowNull':![]},'description':{'type':Sequelize[_0xb41b('0x3')]},'interval':{'type':Sequelize[_0xb41b('0x3')],'allowNull':![],'defaultValue':_0xb41b('0x9')},'IntervalId':{'type':Sequelize[_0xb41b('0xa')]},'isApp':{'type':Sequelize[_0xb41b('0xb')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0xb41b('0x3')],'defaultValue':null},'callerID':{'type':Sequelize['STRING'],'allowNull':!![]},'record':{'type':Sequelize[_0xb41b('0xb')],'defaultValue':![]},'cutdigits':{'type':Sequelize['INTEGER']},'recordingFormat':{'type':Sequelize[_0xb41b('0x3')],'defaultValue':_0xb41b('0xc')},'answer':{'type':Sequelize[_0xb41b('0xb')],'defaultValue':!![]},'name':{'type':Sequelize[_0xb41b('0xd')],'get':function(_0x2066d5){return this['getDataValue'](_0xb41b('0xe'));}}};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.controller.js b/server/api/voiceExtension/voiceExtension.controller.js
index 8fa07f5..44e08e1 100644
--- a/server/api/voiceExtension/voiceExtension.controller.js
+++ b/server/api/voiceExtension/voiceExtension.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8d07=['sendStatus','status','end','json','offset','limit','set','Content-Range','apply','save','update','destroy','then','get','InboundRoutes','inbound','outbound','InternalRoutes','filter','ignore','value','includes','type','find','name','UserProfileResource','error','stack','send','index','VoiceExtension','rawAttributes','keys','query','model','attributes','intersection','fields','length','sort','where','filters','merge','map','key','field','options','count','includeAll','include','rows','show','params','catch','create','body','concat','exten','user','role','internal','UserProfileSection','userProfileId','autoAssociation','pick','context','description','recordingFormat','cutdigits','findOne','sequelize','transaction','VoiceExtensionId','bulkCreate','findAndCountAll','cast(priority\x20as\x20unsigned)','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','defaults','redis','localhost','socket.io-emitter','./voiceExtension.socket','register'];(function(_0x2aeee7,_0x50968d){var _0x19f768=function(_0x31a4a4){while(--_0x31a4a4){_0x2aeee7['push'](_0x2aeee7['shift']());}};_0x19f768(++_0x50968d);}(_0x8d07,0x11c));var _0x78d0=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0x8d07[_0x3899d1];return _0xeb4a7d;};'use strict';var pdf=require(_0x78d0('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x78d0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x78d0('0x2'));var rp=require(_0x78d0('0x3'));var moment=require(_0x78d0('0x4'));var BPromise=require(_0x78d0('0x5'));var Mustache=require('mustache');var util=require(_0x78d0('0x6'));var path=require(_0x78d0('0x7'));var sox=require(_0x78d0('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x78d0('0x9'));var crypto=require(_0x78d0('0xa'));var jsforce=require(_0x78d0('0xb'));var deskjs=require(_0x78d0('0xc'));var toCsv=require('to-csv');var querystring=require(_0x78d0('0xd'));var Papa=require(_0x78d0('0xe'));var Redis=require(_0x78d0('0xf'));var authService=require(_0x78d0('0x10'));var qs=require(_0x78d0('0x11'));var hardwareService=require(_0x78d0('0x12'));var logger=require(_0x78d0('0x13'))(_0x78d0('0x14'));var utils=require(_0x78d0('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x78d0('0x16')](config[_0x78d0('0x17')],{'host':_0x78d0('0x18'),'port':0x18eb});var socket=require(_0x78d0('0x19'))(new Redis(config[_0x78d0('0x17')]));require(_0x78d0('0x1a'))[_0x78d0('0x1b')](socket);function respondWithStatusCode(_0x4ad098,_0x377fdc){_0x377fdc=_0x377fdc||0xcc;return function(_0xe7aaf1){if(_0xe7aaf1){return _0x4ad098[_0x78d0('0x1c')](_0x377fdc);}return _0x4ad098[_0x78d0('0x1d')](_0x377fdc)[_0x78d0('0x1e')]();};}function respondWithResult(_0x57cf98,_0x54bcac){_0x54bcac=_0x54bcac||0xc8;return function(_0x32a626){if(_0x32a626){return _0x57cf98[_0x78d0('0x1d')](_0x54bcac)[_0x78d0('0x1f')](_0x32a626);}};}function respondWithFilteredResult(_0x222177,_0x97d3f7){return function(_0x1e55fc){if(_0x1e55fc){var _0xc8f5a0=_0x1e55fc['count'],_0x16f4d3=_0x97d3f7[_0x78d0('0x20')],_0x93de07=_0x97d3f7[_0x78d0('0x20')]+_0x97d3f7[_0x78d0('0x21')],_0x216419;if(_0x93de07>=_0xc8f5a0){_0x93de07=_0xc8f5a0;_0x216419=0xc8;}else{_0x216419=0xce;}_0x222177['status'](_0x216419);return _0x222177[_0x78d0('0x22')](_0x78d0('0x23'),_0x16f4d3+'-'+_0x93de07+'/'+_0xc8f5a0)[_0x78d0('0x1f')](_0x1e55fc);}return null;};}function patchUpdates(_0x38984d){return function(_0x563310){try{jsonpatch[_0x78d0('0x24')](_0x563310,_0x38984d,!![]);}catch(_0x416041){return BPromise['reject'](_0x416041);}return _0x563310[_0x78d0('0x25')]();};}function saveUpdates(_0x3af72a,_0x380d19){return function(_0xf49d5a){if(_0xf49d5a){return _0xf49d5a[_0x78d0('0x26')](_0x3af72a)['then'](function(_0x4d47c2){return _0x4d47c2;});}return null;};}function removeEntity(_0x598cd0,_0x4b1a1e){return function(_0x3a61e2){if(_0x3a61e2){return _0x3a61e2[_0x78d0('0x27')]()[_0x78d0('0x28')](function(){var _0x26011a=_0x3a61e2[_0x78d0('0x29')]({'plain':!![]});var _0x454785=[{'name':_0x78d0('0x2a'),'value':_0x78d0('0x2b'),'ignore':![]},{'name':'OutboundRoutes','value':_0x78d0('0x2c'),'ignore':![]},{'name':_0x78d0('0x2d'),'value':'internal','ignore':![]}];var _0x4b7b87=_(_0x454785)[_0x78d0('0x2e')](_0x78d0('0x2f'))['map'](_0x78d0('0x30'))['value']();if(_[_0x78d0('0x31')](_0x4b7b87,_0x26011a[_0x78d0('0x32')])){return;}var _0x455c5f=_[_0x78d0('0x33')](_0x454785,['value',_0x26011a['type']])[_0x78d0('0x34')];return db[_0x78d0('0x35')][_0x78d0('0x27')]({'where':{'type':_0x455c5f,'resourceId':_0x26011a['id']}})['then'](function(){return _0x3a61e2;});})['then'](function(){_0x598cd0[_0x78d0('0x1d')](0xcc)[_0x78d0('0x1e')]();});}};}function handleEntityNotFound(_0x5ed089,_0x500f8d){return function(_0x273597){if(!_0x273597){_0x5ed089[_0x78d0('0x1c')](0x194);}return _0x273597;};}function handleError(_0x15bfbe,_0xf08903){_0xf08903=_0xf08903||0x1f4;return function(_0x5bd70c){logger[_0x78d0('0x36')](_0x5bd70c[_0x78d0('0x37')]);if(_0x5bd70c['name']){delete _0x5bd70c[_0x78d0('0x34')];}_0x15bfbe['status'](_0xf08903)[_0x78d0('0x38')](_0x5bd70c);};}exports[_0x78d0('0x39')]=function(_0x1774be,_0x2d2507){var _0x35583b={},_0x531bd1={},_0x3783a7={'count':0x0,'rows':[]};var _0x50f811=db[_0x78d0('0x3a')][_0x78d0('0x3b')];_0x531bd1['model']=_[_0x78d0('0x3c')](_0x50f811);_0x531bd1[_0x78d0('0x3d')]=_[_0x78d0('0x3c')](_0x1774be['query']);_0x531bd1['filters']=_['intersection'](_0x531bd1[_0x78d0('0x3e')],_0x531bd1[_0x78d0('0x3d')]);_0x35583b[_0x78d0('0x3f')]=_[_0x78d0('0x40')](_0x531bd1['model'],qs[_0x78d0('0x41')](_0x1774be[_0x78d0('0x3d')]['fields']));_0x35583b[_0x78d0('0x3f')]=_0x35583b['attributes'][_0x78d0('0x42')]?_0x35583b[_0x78d0('0x3f')]:_0x531bd1[_0x78d0('0x3e')];if(!_0x1774be[_0x78d0('0x3d')]['hasOwnProperty']('nolimit')){_0x35583b[_0x78d0('0x21')]=qs[_0x78d0('0x21')](_0x1774be['query'][_0x78d0('0x21')]);_0x35583b[_0x78d0('0x20')]=qs[_0x78d0('0x20')](_0x1774be['query'][_0x78d0('0x20')]);}_0x35583b['order']=qs['sort'](_0x1774be['query'][_0x78d0('0x43')]);_0x35583b[_0x78d0('0x44')]=qs['filters'](_['pick'](_0x1774be[_0x78d0('0x3d')],_0x531bd1[_0x78d0('0x45')]));if(_0x1774be['query'][_0x78d0('0x2e')]){_0x35583b[_0x78d0('0x44')]=_[_0x78d0('0x46')](_0x35583b[_0x78d0('0x44')],{'$or':_[_0x78d0('0x47')](_0x50f811,function(_0x8622c9){if(_0x8622c9[_0x78d0('0x32')][_0x78d0('0x48')]!=='VIRTUAL'){var _0x2c5cbe={};_0x2c5cbe[_0x8622c9[_0x78d0('0x49')]]={'$like':'%'+_0x1774be[_0x78d0('0x3d')][_0x78d0('0x2e')]+'%'};return _0x2c5cbe;}})});}_0x35583b=_['merge']({},_0x35583b,_0x1774be[_0x78d0('0x4a')]);var _0x333cc4={'where':_0x35583b[_0x78d0('0x44')]};return db['VoiceExtension'][_0x78d0('0x4b')](_0x333cc4)['then'](function(_0x3db8fd){_0x3783a7[_0x78d0('0x4b')]=_0x3db8fd;if(_0x1774be[_0x78d0('0x3d')][_0x78d0('0x4c')]){_0x35583b[_0x78d0('0x4d')]=[{'all':!![]}];}return db['VoiceExtension']['findAll'](_0x35583b);})[_0x78d0('0x28')](function(_0x11ebeb){_0x3783a7[_0x78d0('0x4e')]=_0x11ebeb;return _0x3783a7;})[_0x78d0('0x28')](respondWithFilteredResult(_0x2d2507,_0x35583b))['catch'](handleError(_0x2d2507,null));};exports[_0x78d0('0x4f')]=function(_0x44fce2,_0x107ac3){var _0x5648b4={'raw':![],'where':{'id':_0x44fce2[_0x78d0('0x50')]['id']}},_0x114a3b={};_0x114a3b[_0x78d0('0x3e')]=_['keys'](db[_0x78d0('0x3a')][_0x78d0('0x3b')]);_0x114a3b['query']=_[_0x78d0('0x3c')](_0x44fce2[_0x78d0('0x3d')]);_0x114a3b[_0x78d0('0x45')]=_[_0x78d0('0x40')](_0x114a3b[_0x78d0('0x3e')],_0x114a3b[_0x78d0('0x3d')]);_0x5648b4['attributes']=_[_0x78d0('0x40')](_0x114a3b[_0x78d0('0x3e')],qs['fields'](_0x44fce2[_0x78d0('0x3d')][_0x78d0('0x41')]));_0x5648b4[_0x78d0('0x3f')]=_0x5648b4[_0x78d0('0x3f')][_0x78d0('0x42')]?_0x5648b4[_0x78d0('0x3f')]:_0x114a3b[_0x78d0('0x3e')];if(_0x44fce2['query'][_0x78d0('0x4c')]){_0x5648b4[_0x78d0('0x4d')]=[{'all':!![]}];}_0x5648b4=_[_0x78d0('0x46')]({},_0x5648b4,_0x44fce2[_0x78d0('0x4a')]);return db[_0x78d0('0x3a')][_0x78d0('0x33')](_0x5648b4)[_0x78d0('0x28')](handleEntityNotFound(_0x107ac3,null))['then'](respondWithResult(_0x107ac3,null))[_0x78d0('0x51')](handleError(_0x107ac3,null));};exports['destroy']=function(_0x29db49,_0x928620){return db[_0x78d0('0x3a')][_0x78d0('0x33')]({'where':{'id':_0x29db49['params']['id']}})[_0x78d0('0x28')](handleEntityNotFound(_0x928620,null))[_0x78d0('0x28')](removeEntity(_0x928620,null))[_0x78d0('0x51')](handleError(_0x928620,null));};exports[_0x78d0('0x52')]=function(_0xdc83f,_0xffad51){if(_0xdc83f[_0x78d0('0x53')][_0x78d0('0x32')]===_0x78d0('0x2c')&&!_['startsWith'](_0xdc83f['body']['exten'],'_')){_0xdc83f[_0x78d0('0x53')]['exten']='_'[_0x78d0('0x54')](_0xdc83f[_0x78d0('0x53')][_0x78d0('0x55')]);}return db['VoiceExtension']['create'](_0xdc83f[_0x78d0('0x53')],{'raw':![]})['then'](function(_0x545251){var _0x3111ab=_0xdc83f[_0x78d0('0x56')][_0x78d0('0x29')]({'plain':!![]});if(!_0x3111ab)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3111ab[_0x78d0('0x57')]==='user'){var _0x2a386=_0x545251['get']({'plain':!![]});var _0x3e72a9=[{'name':_0x78d0('0x2a'),'value':_0x78d0('0x2b')},{'name':'OutboundRoutes','value':_0x78d0('0x2c')},{'name':_0x78d0('0x2d'),'value':_0x78d0('0x58')}];var _0x183429=_[_0x78d0('0x33')](_0x3e72a9,['value',_0x2a386[_0x78d0('0x32')]])['name'];return db[_0x78d0('0x59')][_0x78d0('0x33')]({'where':{'name':_0x183429,'userProfileId':_0x3111ab[_0x78d0('0x5a')]},'raw':!![]})['then'](function(_0x57bd8b){if(_0x57bd8b&&_0x57bd8b[_0x78d0('0x5b')]===0x0){return db[_0x78d0('0x35')][_0x78d0('0x52')]({'name':_0x2a386[_0x78d0('0x34')],'resourceId':_0x2a386['id'],'type':_0x57bd8b[_0x78d0('0x34')],'sectionId':_0x57bd8b['id']},{})[_0x78d0('0x28')](function(){return _0x545251;});}else{return _0x545251;}})['catch'](function(_0x54dceb){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x54dceb);throw _0x54dceb;});}return _0x545251;})[_0x78d0('0x28')](respondWithResult(_0xffad51,0xc9))['catch'](handleError(_0xffad51,null));};exports['update']=function(_0x49409d,_0x14be2a){if(_0x49409d['body']['id']){delete _0x49409d[_0x78d0('0x53')]['id'];}return db[_0x78d0('0x3a')][_0x78d0('0x33')]({'where':{'id':_0x49409d[_0x78d0('0x50')]['id']}})[_0x78d0('0x28')](handleEntityNotFound(_0x14be2a,null))['then'](function(_0x32962f){if(_0x32962f){return db[_0x78d0('0x3a')][_0x78d0('0x26')](_[_0x78d0('0x5c')](_0x49409d[_0x78d0('0x53')],[_0x78d0('0x55'),_0x78d0('0x5d'),_0x78d0('0x5e'),_0x78d0('0x5f'),_0x78d0('0x60'),'mandatoryDisposition']),{'where':{'context':_0x32962f[_0x78d0('0x5d')],'exten':_0x32962f['exten']},'individualHooks':!![]})[_0x78d0('0x28')](function(_0x2679b9){return _0x2679b9;});}return null;})[_0x78d0('0x28')](respondWithStatusCode(_0x14be2a,null))[_0x78d0('0x51')](handleError(_0x14be2a,null));};exports['addApplications']=function(_0x2524a6,_0x25dfd0,_0x29576a){return db['VoiceExtension'][_0x78d0('0x61')]({'where':{'id':_0x2524a6[_0x78d0('0x50')]['id']}})[_0x78d0('0x28')](handleEntityNotFound(_0x25dfd0,null))['then'](function(_0xfb4bd5){if(_0xfb4bd5){return db[_0x78d0('0x62')][_0x78d0('0x63')](function(_0x49fddd){return db[_0x78d0('0x3a')][_0x78d0('0x27')]({'where':{'VoiceExtensionId':_0x2524a6['params']['id']},'transaction':_0x49fddd})['then'](function(_0x403b63){var _0x53d613=_[_0x78d0('0x47')](_0x2524a6[_0x78d0('0x53')],function(_0x3036b7){_0x3036b7[_0x78d0('0x64')]=_0x2524a6['params']['id'];return _0x3036b7;});return db[_0x78d0('0x3a')][_0x78d0('0x65')](_0x53d613,{'transaction':_0x49fddd});});})[_0x78d0('0x28')](function(){return db[_0x78d0('0x3a')][_0x78d0('0x66')]({'where':{'isApp':!![],'VoiceExtensionId':_0x2524a6[_0x78d0('0x50')]['id']},'order':_0x78d0('0x67')});});}})['then'](respondWithResult(_0x25dfd0,null))['catch'](handleError(_0x25dfd0,null));};
\ No newline at end of file
+var _0x8a81=['fields','length','hasOwnProperty','nolimit','order','sort','where','filters','merge','map','key','VIRTUAL','field','options','includeAll','include','findAll','catch','show','params','create','body','startsWith','exten','concat','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','UserProfileResource','error','update','context','description','recordingFormat','cutdigits','mandatoryDisposition','addApplications','findOne','sequelize','transaction','VoiceExtensionId','findAndCountAll','cast(priority\x20as\x20unsigned)','html-pdf','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','reject','save','destroy','then','get','InboundRoutes','inbound','OutboundRoutes','outbound','internal','filter','ignore','value','includes','type','find','name','stack','send','index','VoiceExtension','rawAttributes','query','keys','intersection','model','attributes'];(function(_0x564242,_0x4159f7){var _0x2906fb=function(_0xed2acc){while(--_0xed2acc){_0x564242['push'](_0x564242['shift']());}};_0x2906fb(++_0x4159f7);}(_0x8a81,0x16d));var _0x18a8=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x8a81[_0x321bb2];return _0x9c12ed;};'use strict';var pdf=require(_0x18a8('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x18a8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x18a8('0x2'));var rp=require(_0x18a8('0x3'));var moment=require(_0x18a8('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x18a8('0x5'));var util=require(_0x18a8('0x6'));var path=require(_0x18a8('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x18a8('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x18a8('0x9'));var crypto=require(_0x18a8('0xa'));var jsforce=require(_0x18a8('0xb'));var deskjs=require(_0x18a8('0xc'));var toCsv=require(_0x18a8('0xd'));var querystring=require(_0x18a8('0xe'));var Papa=require('papaparse');var Redis=require(_0x18a8('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x18a8('0x10'));var hardwareService=require(_0x18a8('0x11'));var logger=require('../../config/logger')('api');var utils=require(_0x18a8('0x12'));var config=require(_0x18a8('0x13'));var db=require(_0x18a8('0x14'))['db'];config[_0x18a8('0x15')]=_[_0x18a8('0x16')](config[_0x18a8('0x15')],{'host':_0x18a8('0x17'),'port':0x18eb});var socket=require(_0x18a8('0x18'))(new Redis(config['redis']));require('./voiceExtension.socket')[_0x18a8('0x19')](socket);function respondWithStatusCode(_0x15546a,_0xf9fed7){_0xf9fed7=_0xf9fed7||0xcc;return function(_0x48cbe4){if(_0x48cbe4){return _0x15546a[_0x18a8('0x1a')](_0xf9fed7);}return _0x15546a['status'](_0xf9fed7)[_0x18a8('0x1b')]();};}function respondWithResult(_0x566a0a,_0x200139){_0x200139=_0x200139||0xc8;return function(_0x2411dc){if(_0x2411dc){return _0x566a0a[_0x18a8('0x1c')](_0x200139)[_0x18a8('0x1d')](_0x2411dc);}};}function respondWithFilteredResult(_0x6e2190,_0x384d47){return function(_0x159c5a){if(_0x159c5a){var _0x21e3b4=_0x159c5a[_0x18a8('0x1e')],_0x6960b0=_0x384d47[_0x18a8('0x1f')],_0xb8b836=_0x384d47[_0x18a8('0x1f')]+_0x384d47[_0x18a8('0x20')],_0x55ea12;if(_0xb8b836>=_0x21e3b4){_0xb8b836=_0x21e3b4;_0x55ea12=0xc8;}else{_0x55ea12=0xce;}_0x6e2190[_0x18a8('0x1c')](_0x55ea12);return _0x6e2190[_0x18a8('0x21')](_0x18a8('0x22'),_0x6960b0+'-'+_0xb8b836+'/'+_0x21e3b4)['json'](_0x159c5a);}return null;};}function patchUpdates(_0x2b074b){return function(_0x12431b){try{jsonpatch[_0x18a8('0x23')](_0x12431b,_0x2b074b,!![]);}catch(_0x9dc47c){return BPromise[_0x18a8('0x24')](_0x9dc47c);}return _0x12431b[_0x18a8('0x25')]();};}function saveUpdates(_0x461900,_0x3f0e19){return function(_0xb49fb6){if(_0xb49fb6){return _0xb49fb6['update'](_0x461900)['then'](function(_0x462fb0){return _0x462fb0;});}return null;};}function removeEntity(_0xbcf4d6,_0x204f56){return function(_0x353b3e){if(_0x353b3e){return _0x353b3e[_0x18a8('0x26')]()[_0x18a8('0x27')](function(){var _0x48254d=_0x353b3e[_0x18a8('0x28')]({'plain':!![]});var _0xf79c80=[{'name':_0x18a8('0x29'),'value':_0x18a8('0x2a'),'ignore':![]},{'name':_0x18a8('0x2b'),'value':_0x18a8('0x2c'),'ignore':![]},{'name':'InternalRoutes','value':_0x18a8('0x2d'),'ignore':![]}];var _0x1397cb=_(_0xf79c80)[_0x18a8('0x2e')](_0x18a8('0x2f'))['map'](_0x18a8('0x30'))[_0x18a8('0x30')]();if(_[_0x18a8('0x31')](_0x1397cb,_0x48254d[_0x18a8('0x32')])){return;}var _0x1ceee9=_[_0x18a8('0x33')](_0xf79c80,[_0x18a8('0x30'),_0x48254d[_0x18a8('0x32')]])[_0x18a8('0x34')];return db['UserProfileResource'][_0x18a8('0x26')]({'where':{'type':_0x1ceee9,'resourceId':_0x48254d['id']}})['then'](function(){return _0x353b3e;});})['then'](function(){_0xbcf4d6['status'](0xcc)[_0x18a8('0x1b')]();});}};}function handleEntityNotFound(_0xbc808d,_0x52fa35){return function(_0x277045){if(!_0x277045){_0xbc808d[_0x18a8('0x1a')](0x194);}return _0x277045;};}function handleError(_0x53cfb6,_0x260198){_0x260198=_0x260198||0x1f4;return function(_0x3f4189){logger['error'](_0x3f4189[_0x18a8('0x35')]);if(_0x3f4189['name']){delete _0x3f4189[_0x18a8('0x34')];}_0x53cfb6[_0x18a8('0x1c')](_0x260198)[_0x18a8('0x36')](_0x3f4189);};}exports[_0x18a8('0x37')]=function(_0x5a811e,_0xec86fc){var _0x30ccc6={},_0x2c228e={},_0x3eb892={'count':0x0,'rows':[]};var _0xc64deb=db[_0x18a8('0x38')][_0x18a8('0x39')];_0x2c228e['model']=_['keys'](_0xc64deb);_0x2c228e[_0x18a8('0x3a')]=_[_0x18a8('0x3b')](_0x5a811e['query']);_0x2c228e['filters']=_[_0x18a8('0x3c')](_0x2c228e[_0x18a8('0x3d')],_0x2c228e[_0x18a8('0x3a')]);_0x30ccc6[_0x18a8('0x3e')]=_[_0x18a8('0x3c')](_0x2c228e[_0x18a8('0x3d')],qs[_0x18a8('0x3f')](_0x5a811e[_0x18a8('0x3a')]['fields']));_0x30ccc6[_0x18a8('0x3e')]=_0x30ccc6[_0x18a8('0x3e')][_0x18a8('0x40')]?_0x30ccc6[_0x18a8('0x3e')]:_0x2c228e[_0x18a8('0x3d')];if(!_0x5a811e[_0x18a8('0x3a')][_0x18a8('0x41')](_0x18a8('0x42'))){_0x30ccc6[_0x18a8('0x20')]=qs[_0x18a8('0x20')](_0x5a811e['query'][_0x18a8('0x20')]);_0x30ccc6[_0x18a8('0x1f')]=qs[_0x18a8('0x1f')](_0x5a811e[_0x18a8('0x3a')][_0x18a8('0x1f')]);}_0x30ccc6[_0x18a8('0x43')]=qs['sort'](_0x5a811e[_0x18a8('0x3a')][_0x18a8('0x44')]);_0x30ccc6[_0x18a8('0x45')]=qs[_0x18a8('0x46')](_['pick'](_0x5a811e[_0x18a8('0x3a')],_0x2c228e['filters']));if(_0x5a811e[_0x18a8('0x3a')][_0x18a8('0x2e')]){_0x30ccc6['where']=_[_0x18a8('0x47')](_0x30ccc6[_0x18a8('0x45')],{'$or':_[_0x18a8('0x48')](_0xc64deb,function(_0x8306e9){if(_0x8306e9['type'][_0x18a8('0x49')]!==_0x18a8('0x4a')){var _0x52965c={};_0x52965c[_0x8306e9[_0x18a8('0x4b')]]={'$like':'%'+_0x5a811e['query'][_0x18a8('0x2e')]+'%'};return _0x52965c;}})});}_0x30ccc6=_[_0x18a8('0x47')]({},_0x30ccc6,_0x5a811e[_0x18a8('0x4c')]);var _0x12a31a={'where':_0x30ccc6['where']};return db[_0x18a8('0x38')][_0x18a8('0x1e')](_0x12a31a)[_0x18a8('0x27')](function(_0x2bf470){_0x3eb892[_0x18a8('0x1e')]=_0x2bf470;if(_0x5a811e[_0x18a8('0x3a')][_0x18a8('0x4d')]){_0x30ccc6[_0x18a8('0x4e')]=[{'all':!![]}];}return db['VoiceExtension'][_0x18a8('0x4f')](_0x30ccc6);})[_0x18a8('0x27')](function(_0x2ffcb8){_0x3eb892['rows']=_0x2ffcb8;return _0x3eb892;})['then'](respondWithFilteredResult(_0xec86fc,_0x30ccc6))[_0x18a8('0x50')](handleError(_0xec86fc,null));};exports[_0x18a8('0x51')]=function(_0x236637,_0x2ee5f1){var _0x58a7ce={'raw':![],'where':{'id':_0x236637[_0x18a8('0x52')]['id']}},_0x3e2601={};_0x3e2601['model']=_[_0x18a8('0x3b')](db[_0x18a8('0x38')]['rawAttributes']);_0x3e2601[_0x18a8('0x3a')]=_[_0x18a8('0x3b')](_0x236637['query']);_0x3e2601['filters']=_[_0x18a8('0x3c')](_0x3e2601[_0x18a8('0x3d')],_0x3e2601[_0x18a8('0x3a')]);_0x58a7ce['attributes']=_['intersection'](_0x3e2601[_0x18a8('0x3d')],qs['fields'](_0x236637[_0x18a8('0x3a')][_0x18a8('0x3f')]));_0x58a7ce[_0x18a8('0x3e')]=_0x58a7ce['attributes']['length']?_0x58a7ce[_0x18a8('0x3e')]:_0x3e2601['model'];if(_0x236637[_0x18a8('0x3a')][_0x18a8('0x4d')]){_0x58a7ce['include']=[{'all':!![]}];}_0x58a7ce=_['merge']({},_0x58a7ce,_0x236637[_0x18a8('0x4c')]);return db['VoiceExtension']['find'](_0x58a7ce)[_0x18a8('0x27')](handleEntityNotFound(_0x2ee5f1,null))[_0x18a8('0x27')](respondWithResult(_0x2ee5f1,null))['catch'](handleError(_0x2ee5f1,null));};exports['destroy']=function(_0x4cbf81,_0x229848){return db[_0x18a8('0x38')][_0x18a8('0x33')]({'where':{'id':_0x4cbf81[_0x18a8('0x52')]['id']}})[_0x18a8('0x27')](handleEntityNotFound(_0x229848,null))[_0x18a8('0x27')](removeEntity(_0x229848,null))['catch'](handleError(_0x229848,null));};exports[_0x18a8('0x53')]=function(_0x2a4d29,_0x1e4cce){if(_0x2a4d29[_0x18a8('0x54')][_0x18a8('0x32')]===_0x18a8('0x2c')&&!_[_0x18a8('0x55')](_0x2a4d29['body']['exten'],'_')){_0x2a4d29[_0x18a8('0x54')][_0x18a8('0x56')]='_'[_0x18a8('0x57')](_0x2a4d29[_0x18a8('0x54')][_0x18a8('0x56')]);}return db[_0x18a8('0x38')][_0x18a8('0x53')](_0x2a4d29[_0x18a8('0x54')],{'raw':![]})[_0x18a8('0x27')](function(_0xfb3cd7){var _0x4f1c4f=_0x2a4d29[_0x18a8('0x58')]['get']({'plain':!![]});if(!_0x4f1c4f)throw new Error(_0x18a8('0x59'));if(_0x4f1c4f['role']===_0x18a8('0x58')){var _0x500683=_0xfb3cd7['get']({'plain':!![]});var _0xbaecfb=[{'name':_0x18a8('0x29'),'value':'inbound'},{'name':'OutboundRoutes','value':'outbound'},{'name':'InternalRoutes','value':_0x18a8('0x2d')}];var _0x3d588d=_[_0x18a8('0x33')](_0xbaecfb,['value',_0x500683[_0x18a8('0x32')]])[_0x18a8('0x34')];return db[_0x18a8('0x5a')][_0x18a8('0x33')]({'where':{'name':_0x3d588d,'userProfileId':_0x4f1c4f[_0x18a8('0x5b')]},'raw':!![]})[_0x18a8('0x27')](function(_0x4c700a){if(_0x4c700a&&_0x4c700a['autoAssociation']===0x0){return db[_0x18a8('0x5c')][_0x18a8('0x53')]({'name':_0x500683[_0x18a8('0x34')],'resourceId':_0x500683['id'],'type':_0x4c700a['name'],'sectionId':_0x4c700a['id']},{})[_0x18a8('0x27')](function(){return _0xfb3cd7;});}else{return _0xfb3cd7;}})[_0x18a8('0x50')](function(_0xf465c1){logger[_0x18a8('0x5d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xf465c1);throw _0xf465c1;});}return _0xfb3cd7;})[_0x18a8('0x27')](respondWithResult(_0x1e4cce,0xc9))[_0x18a8('0x50')](handleError(_0x1e4cce,null));};exports[_0x18a8('0x5e')]=function(_0xd695b7,_0x49e488){if(_0xd695b7['body']['id']){delete _0xd695b7[_0x18a8('0x54')]['id'];}return db[_0x18a8('0x38')][_0x18a8('0x33')]({'where':{'id':_0xd695b7['params']['id']}})[_0x18a8('0x27')](handleEntityNotFound(_0x49e488,null))[_0x18a8('0x27')](function(_0x4288f2){if(_0x4288f2){return db[_0x18a8('0x38')][_0x18a8('0x5e')](_['pick'](_0xd695b7[_0x18a8('0x54')],[_0x18a8('0x56'),_0x18a8('0x5f'),_0x18a8('0x60'),_0x18a8('0x61'),_0x18a8('0x62'),_0x18a8('0x63')]),{'where':{'context':_0x4288f2['context'],'exten':_0x4288f2[_0x18a8('0x56')]},'individualHooks':!![]})[_0x18a8('0x27')](function(_0x47019e){return _0x47019e;});}return null;})[_0x18a8('0x27')](respondWithStatusCode(_0x49e488,null))[_0x18a8('0x50')](handleError(_0x49e488,null));};exports[_0x18a8('0x64')]=function(_0x1ea1d9,_0x4222c5,_0x502955){return db[_0x18a8('0x38')][_0x18a8('0x65')]({'where':{'id':_0x1ea1d9[_0x18a8('0x52')]['id']}})['then'](handleEntityNotFound(_0x4222c5,null))['then'](function(_0x361816){if(_0x361816){return db[_0x18a8('0x66')][_0x18a8('0x67')](function(_0x4a100a){return db[_0x18a8('0x38')][_0x18a8('0x26')]({'where':{'VoiceExtensionId':_0x1ea1d9[_0x18a8('0x52')]['id']},'transaction':_0x4a100a})[_0x18a8('0x27')](function(_0x329352){var _0x26b8d2=_['map'](_0x1ea1d9[_0x18a8('0x54')],function(_0x430560){_0x430560[_0x18a8('0x68')]=_0x1ea1d9[_0x18a8('0x52')]['id'];return _0x430560;});return db[_0x18a8('0x38')]['bulkCreate'](_0x26b8d2,{'transaction':_0x4a100a});});})['then'](function(){return db[_0x18a8('0x38')][_0x18a8('0x69')]({'where':{'isApp':!![],'VoiceExtensionId':_0x1ea1d9[_0x18a8('0x52')]['id']},'order':_0x18a8('0x6a')});});}})[_0x18a8('0x27')](respondWithResult(_0x4222c5,null))[_0x18a8('0x50')](handleError(_0x4222c5,null));};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.events.js b/server/api/voiceExtension/voiceExtension.events.js
index a5d1171..1d3a4b1 100644
--- a/server/api/voiceExtension/voiceExtension.events.js
+++ b/server/api/voiceExtension/voiceExtension.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c44=['save','update','remove','emit','hasOwnProperty','hook','exports','VoiceExtension','setMaxListeners'];(function(_0x27dec4,_0x114c3a){var _0x5ee7a5=function(_0x5a93a7){while(--_0x5a93a7){_0x27dec4['push'](_0x27dec4['shift']());}};_0x5ee7a5(++_0x114c3a);}(_0x9c44,0x178));var _0x49c4=function(_0x565c49,_0x54acd0){_0x565c49=_0x565c49-0x0;var _0x20ca34=_0x9c44[_0x565c49];return _0x20ca34;};'use strict';var EventEmitter=require('events');var VoiceExtension=require('../../mysqldb')['db'][_0x49c4('0x0')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x49c4('0x1')](0x0);var events={'afterCreate':_0x49c4('0x2'),'afterUpdate':_0x49c4('0x3'),'afterDestroy':_0x49c4('0x4')};function emitEvent(_0x2ad237){return function(_0x4e0313,_0x4941f1,_0x41a183){VoiceExtensionEvents['emit'](_0x2ad237+':'+_0x4e0313['id'],_0x4e0313);VoiceExtensionEvents[_0x49c4('0x5')](_0x2ad237,_0x4e0313);_0x41a183(null);};}for(var e in events){if(events[_0x49c4('0x6')](e)){var event=events[e];VoiceExtension[_0x49c4('0x7')](e,emitEvent(event));}}module[_0x49c4('0x8')]=VoiceExtensionEvents;
\ No newline at end of file
+var _0x008c=['save','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceExtension','setMaxListeners'];(function(_0x567707,_0x164632){var _0x4f6c0f=function(_0x4f0027){while(--_0x4f0027){_0x567707['push'](_0x567707['shift']());}};_0x4f6c0f(++_0x164632);}(_0x008c,0x188));var _0xc008=function(_0x39780c,_0x5782c9){_0x39780c=_0x39780c-0x0;var _0x53c19b=_0x008c[_0x39780c];return _0x53c19b;};'use strict';var EventEmitter=require(_0xc008('0x0'));var VoiceExtension=require(_0xc008('0x1'))['db'][_0xc008('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xc008('0x3')](0x0);var events={'afterCreate':_0xc008('0x4'),'afterUpdate':'update','afterDestroy':_0xc008('0x5')};function emitEvent(_0x47063f){return function(_0x10b33c,_0x163bd9,_0x1cbe76){VoiceExtensionEvents[_0xc008('0x6')](_0x47063f+':'+_0x10b33c['id'],_0x10b33c);VoiceExtensionEvents[_0xc008('0x6')](_0x47063f,_0x10b33c);_0x1cbe76(null);};}for(var e in events){if(events[_0xc008('0x7')](e)){var event=events[e];VoiceExtension[_0xc008('0x8')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.model.js b/server/api/voiceExtension/voiceExtension.model.js
index 28ef4d4..17a5a55 100644
--- a/server/api/voiceExtension/voiceExtension.model.js
+++ b/server/api/voiceExtension/voiceExtension.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfd33=['voice_extensions','lodash','util','../../config/logger','api','bluebird','path','../../config/environment','./voiceExtension.attributes','exports','define'];(function(_0x6d91a,_0x3c06dc){var _0x405faf=function(_0x4b157a){while(--_0x4b157a){_0x6d91a['push'](_0x6d91a['shift']());}};_0x405faf(++_0x3c06dc);}(_0xfd33,0xe8));var _0x3fd3=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0xfd33[_0x15bc81];return _0x59440e;};'use strict';var _=require(_0x3fd3('0x0'));var util=require(_0x3fd3('0x1'));var logger=require(_0x3fd3('0x2'))(_0x3fd3('0x3'));var moment=require('moment');var BPromise=require(_0x3fd3('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3fd3('0x5'));var rimraf=require('rimraf');var config=require(_0x3fd3('0x6'));var attributes=require(_0x3fd3('0x7'));module[_0x3fd3('0x8')]=function(_0x23c4af,_0x32031a){return _0x23c4af[_0x3fd3('0x9')]('VoiceExtension',attributes,{'tableName':_0x3fd3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbbcb=['voice_extensions','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','VoiceExtension'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xbbcb,0xf1));var _0xbbbc=function(_0x3024d8,_0x3502b8){_0x3024d8=_0x3024d8-0x0;var _0x47d171=_0xbbcb[_0x3024d8];return _0x47d171;};'use strict';var _=require(_0xbbbc('0x0'));var util=require(_0xbbbc('0x1'));var logger=require(_0xbbbc('0x2'))(_0xbbbc('0x3'));var moment=require(_0xbbbc('0x4'));var BPromise=require(_0xbbbc('0x5'));var rp=require(_0xbbbc('0x6'));var fs=require('fs');var path=require(_0xbbbc('0x7'));var rimraf=require(_0xbbbc('0x8'));var config=require('../../config/environment');var attributes=require('./voiceExtension.attributes');module[_0xbbbc('0x9')]=function(_0x307ed0,_0x161339){return _0x307ed0['define'](_0xbbbc('0xa'),attributes,{'tableName':_0xbbbc('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.rpc.js b/server/api/voiceExtension/voiceExtension.rpc.js
index b99fce9..d8808f4 100644
--- a/server/api/voiceExtension/voiceExtension.rpc.js
+++ b/server/api/voiceExtension/voiceExtension.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ffd=['./voiceExtension.socket','request','then','info','VoiceExtension,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetVoiceExtension','VoiceExtension','findAll','options','attributes','limit','include','map','model','debug','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter'];(function(_0x380050,_0x1e4df4){var _0x1282d8=function(_0x5a22a1){while(--_0x5a22a1){_0x380050['push'](_0x380050['shift']());}};_0x1282d8(++_0x1e4df4);}(_0x9ffd,0xaa));var _0xd9ff=function(_0x29679c,_0x4b37e7){_0x29679c=_0x29679c-0x0;var _0x283cec=_0x9ffd[_0x29679c];return _0x283cec;};'use strict';var _=require(_0xd9ff('0x0'));var util=require(_0xd9ff('0x1'));var moment=require(_0xd9ff('0x2'));var BPromise=require('bluebird');var rs=require(_0xd9ff('0x3'));var fs=require('fs');var Redis=require(_0xd9ff('0x4'));var db=require(_0xd9ff('0x5'))['db'];var utils=require(_0xd9ff('0x6'));var logger=require('../../config/logger')(_0xd9ff('0x7'));var config=require(_0xd9ff('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd9ff('0x9')][_0xd9ff('0xa')]({'port':0x232a});config[_0xd9ff('0xb')]=_[_0xd9ff('0xc')](config[_0xd9ff('0xb')],{'host':_0xd9ff('0xd'),'port':0x18eb});var socket=require(_0xd9ff('0xe'))(new Redis(config[_0xd9ff('0xb')]));require(_0xd9ff('0xf'))['register'](socket);function respondWithRpcPromise(_0x54a555,_0x567f79,_0x5aa954){return new BPromise(function(_0x2355ab,_0x2fd77a){return client[_0xd9ff('0x10')](_0x54a555,_0x5aa954)[_0xd9ff('0x11')](function(_0x37d2c0){logger[_0xd9ff('0x12')](_0xd9ff('0x13'),_0x567f79,_0xd9ff('0x14'));logger['debug']('VoiceExtension,\x20%s,\x20%s,\x20%s',_0x567f79,_0xd9ff('0x14'),JSON[_0xd9ff('0x15')](_0x37d2c0));if(_0x37d2c0[_0xd9ff('0x16')]){if(_0x37d2c0[_0xd9ff('0x16')][_0xd9ff('0x17')]===0x1f4){logger['error'](_0xd9ff('0x13'),_0x567f79,_0x37d2c0[_0xd9ff('0x16')]['message']);return _0x2fd77a(_0x37d2c0[_0xd9ff('0x16')]['message']);}logger['error']('VoiceExtension,\x20%s,\x20%s',_0x567f79,_0x37d2c0['error'][_0xd9ff('0x18')]);return _0x2355ab(_0x37d2c0['error'][_0xd9ff('0x18')]);}else{logger[_0xd9ff('0x12')](_0xd9ff('0x13'),_0x567f79,_0xd9ff('0x14'));_0x2355ab(_0x37d2c0[_0xd9ff('0x19')][_0xd9ff('0x18')]);}})[_0xd9ff('0x1a')](function(_0x128588){logger[_0xd9ff('0x16')](_0xd9ff('0x13'),_0x567f79,_0x128588);_0x2fd77a(_0x128588);});});}exports[_0xd9ff('0x1b')]=function(_0x39ef37){var _0x46a6ab=this;return new Promise(function(_0x4c8740,_0x4cf8ec){return db[_0xd9ff('0x1c')][_0xd9ff('0x1d')]({'raw':_0x39ef37['options']?_0x39ef37['options']['raw']===undefined?!![]:![]:!![],'where':_0x39ef37['options']?_0x39ef37[_0xd9ff('0x1e')]['where']||null:null,'attributes':_0x39ef37[_0xd9ff('0x1e')]?_0x39ef37[_0xd9ff('0x1e')][_0xd9ff('0x1f')]||null:null,'limit':_0x39ef37[_0xd9ff('0x1e')]?_0x39ef37[_0xd9ff('0x1e')][_0xd9ff('0x20')]||null:null,'include':_0x39ef37['options']?_0x39ef37['options'][_0xd9ff('0x21')]?_['map'](_0x39ef37[_0xd9ff('0x1e')]['include'],function(_0x285002){return{'model':db[_0x285002['model']],'as':_0x285002['as'],'attributes':_0x285002[_0xd9ff('0x1f')],'include':_0x285002[_0xd9ff('0x21')]?_[_0xd9ff('0x22')](_0x285002[_0xd9ff('0x21')],function(_0x5d685e){return{'model':db[_0x5d685e[_0xd9ff('0x23')]],'as':_0x5d685e['as'],'attributes':_0x5d685e[_0xd9ff('0x1f')],'include':_0x5d685e[_0xd9ff('0x21')]?_[_0xd9ff('0x22')](_0x5d685e['include'],function(_0x1d3684){return{'model':db[_0x1d3684[_0xd9ff('0x23')]],'as':_0x1d3684['as'],'attributes':_0x1d3684[_0xd9ff('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xd9ff('0x11')](function(_0x263d3a){logger[_0xd9ff('0x12')](_0xd9ff('0x1b'),_0x39ef37);logger[_0xd9ff('0x24')](_0xd9ff('0x1b'),_0x39ef37,JSON['stringify'](_0x263d3a));_0x4c8740(_0x263d3a);})[_0xd9ff('0x1a')](function(_0x4ba2be){logger[_0xd9ff('0x16')](_0xd9ff('0x1b'),_0x4ba2be[_0xd9ff('0x18')],_0x39ef37);_0x4cf8ec(_0x46a6ab['error'](0x1f4,_0x4ba2be[_0xd9ff('0x18')]));});});};
\ No newline at end of file
+var _0x4483=['message','request\x20sent','GetVoiceExtension','VoiceExtension','findAll','options','where','limit','map','include','model','attributes','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./voiceExtension.socket','register','request','then','info','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify','error','VoiceExtension,\x20%s,\x20%s'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x4483,0x1a3));var _0x3448=function(_0x2824ab,_0x449624){_0x2824ab=_0x2824ab-0x0;var _0x145db7=_0x4483[_0x2824ab];return _0x145db7;};'use strict';var _=require(_0x3448('0x0'));var util=require(_0x3448('0x1'));var moment=require(_0x3448('0x2'));var BPromise=require('bluebird');var rs=require(_0x3448('0x3'));var fs=require('fs');var Redis=require(_0x3448('0x4'));var db=require(_0x3448('0x5'))['db'];var utils=require(_0x3448('0x6'));var logger=require(_0x3448('0x7'))('rpc');var config=require(_0x3448('0x8'));var jayson=require(_0x3448('0x9'));var client=jayson[_0x3448('0xa')][_0x3448('0xb')]({'port':0x232a});config[_0x3448('0xc')]=_[_0x3448('0xd')](config[_0x3448('0xc')],{'host':_0x3448('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x3448('0xf'))[_0x3448('0x10')](socket);function respondWithRpcPromise(_0xc36409,_0x6f82ca,_0x3f4364){return new BPromise(function(_0x1e645a,_0x2bdf02){return client[_0x3448('0x11')](_0xc36409,_0x3f4364)[_0x3448('0x12')](function(_0x35bb7b){logger[_0x3448('0x13')]('VoiceExtension,\x20%s,\x20%s',_0x6f82ca,'request\x20sent');logger[_0x3448('0x14')](_0x3448('0x15'),_0x6f82ca,'request\x20sent',JSON[_0x3448('0x16')](_0x35bb7b));if(_0x35bb7b[_0x3448('0x17')]){if(_0x35bb7b[_0x3448('0x17')]['code']===0x1f4){logger[_0x3448('0x17')](_0x3448('0x18'),_0x6f82ca,_0x35bb7b['error'][_0x3448('0x19')]);return _0x2bdf02(_0x35bb7b[_0x3448('0x17')][_0x3448('0x19')]);}logger['error'](_0x3448('0x18'),_0x6f82ca,_0x35bb7b[_0x3448('0x17')][_0x3448('0x19')]);return _0x1e645a(_0x35bb7b[_0x3448('0x17')][_0x3448('0x19')]);}else{logger[_0x3448('0x13')](_0x3448('0x18'),_0x6f82ca,_0x3448('0x1a'));_0x1e645a(_0x35bb7b['result'][_0x3448('0x19')]);}})['catch'](function(_0x48f94a){logger['error'](_0x3448('0x18'),_0x6f82ca,_0x48f94a);_0x2bdf02(_0x48f94a);});});}exports[_0x3448('0x1b')]=function(_0xda4040){var _0x5b5e26=this;return new Promise(function(_0x3df082,_0x392c8d){return db[_0x3448('0x1c')][_0x3448('0x1d')]({'raw':_0xda4040[_0x3448('0x1e')]?_0xda4040[_0x3448('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0xda4040['options']?_0xda4040['options'][_0x3448('0x1f')]||null:null,'attributes':_0xda4040[_0x3448('0x1e')]?_0xda4040['options']['attributes']||null:null,'limit':_0xda4040[_0x3448('0x1e')]?_0xda4040[_0x3448('0x1e')][_0x3448('0x20')]||null:null,'include':_0xda4040[_0x3448('0x1e')]?_0xda4040[_0x3448('0x1e')]['include']?_[_0x3448('0x21')](_0xda4040[_0x3448('0x1e')][_0x3448('0x22')],function(_0x2088de){return{'model':db[_0x2088de[_0x3448('0x23')]],'as':_0x2088de['as'],'attributes':_0x2088de['attributes'],'include':_0x2088de[_0x3448('0x22')]?_[_0x3448('0x21')](_0x2088de['include'],function(_0x19a479){return{'model':db[_0x19a479[_0x3448('0x23')]],'as':_0x19a479['as'],'attributes':_0x19a479[_0x3448('0x24')],'include':_0x19a479[_0x3448('0x22')]?_[_0x3448('0x21')](_0x19a479[_0x3448('0x22')],function(_0x31be64){return{'model':db[_0x31be64[_0x3448('0x23')]],'as':_0x31be64['as'],'attributes':_0x31be64['attributes']};}):[]};}):[]};}):[]:[]})[_0x3448('0x12')](function(_0x450704){logger[_0x3448('0x13')]('GetVoiceExtension',_0xda4040);logger[_0x3448('0x14')]('GetVoiceExtension',_0xda4040,JSON['stringify'](_0x450704));_0x3df082(_0x450704);})['catch'](function(_0x52fb48){logger[_0x3448('0x17')]('GetVoiceExtension',_0x52fb48['message'],_0xda4040);_0x392c8d(_0x5b5e26[_0x3448('0x17')](0x1f4,_0x52fb48[_0x3448('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.socket.js b/server/api/voiceExtension/voiceExtension.socket.js
index 737311c..c2b46da 100644
--- a/server/api/voiceExtension/voiceExtension.socket.js
+++ b/server/api/voiceExtension/voiceExtension.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc962=['voiceExtension:','./voiceExtension.events','save','remove','update','emit','removeListener','register','length'];(function(_0x5471ec,_0x1ce81a){var _0x121d4c=function(_0xefb655){while(--_0xefb655){_0x5471ec['push'](_0x5471ec['shift']());}};_0x121d4c(++_0x1ce81a);}(_0xc962,0xd0));var _0x2c96=function(_0x4fd4b0,_0x3f0356){_0x4fd4b0=_0x4fd4b0-0x0;var _0x45ab2a=_0xc962[_0x4fd4b0];return _0x45ab2a;};'use strict';var VoiceExtensionEvents=require(_0x2c96('0x0'));var events=[_0x2c96('0x1'),_0x2c96('0x2'),_0x2c96('0x3')];function createListener(_0x32b3e8,_0x406104){return function(_0x57a1c0){_0x406104[_0x2c96('0x4')](_0x32b3e8,_0x57a1c0);};}function removeListener(_0x1bbd51,_0x18aac8){return function(){VoiceExtensionEvents[_0x2c96('0x5')](_0x1bbd51,_0x18aac8);};}exports[_0x2c96('0x6')]=function(_0x1a978c){for(var _0x503e0d=0x0,_0x2ceaa2=events[_0x2c96('0x7')];_0x503e0d<_0x2ceaa2;_0x503e0d++){var _0x3fba11=events[_0x503e0d];var _0x3cea02=createListener(_0x2c96('0x8')+_0x3fba11,_0x1a978c);VoiceExtensionEvents['on'](_0x3fba11,_0x3cea02);}};
\ No newline at end of file
+var _0x70e9=['register','length','voiceExtension:','./voiceExtension.events','save','remove','emit','removeListener'];(function(_0x1e4360,_0x930b9b){var _0x31e6b4=function(_0x49dd8e){while(--_0x49dd8e){_0x1e4360['push'](_0x1e4360['shift']());}};_0x31e6b4(++_0x930b9b);}(_0x70e9,0x1a3));var _0x970e=function(_0xcfc037,_0x55be32){_0xcfc037=_0xcfc037-0x0;var _0x5e4637=_0x70e9[_0xcfc037];return _0x5e4637;};'use strict';var VoiceExtensionEvents=require(_0x970e('0x0'));var events=[_0x970e('0x1'),_0x970e('0x2'),'update'];function createListener(_0x398e0f,_0x52e75a){return function(_0x3810d9){_0x52e75a[_0x970e('0x3')](_0x398e0f,_0x3810d9);};}function removeListener(_0x30fbbe,_0x5ea130){return function(){VoiceExtensionEvents[_0x970e('0x4')](_0x30fbbe,_0x5ea130);};}exports[_0x970e('0x5')]=function(_0x18f046){for(var _0x3b25f9=0x0,_0x4fbdaf=events[_0x970e('0x6')];_0x3b25f9<_0x4fbdaf;_0x3b25f9++){var _0x16fe2b=events[_0x3b25f9];var _0x51c92a=createListener(_0x970e('0x7')+_0x16fe2b,_0x18f046);VoiceExtensionEvents['on'](_0x16fe2b,_0x51c92a);}};
\ No newline at end of file
diff --git a/server/api/voiceMail/index.js b/server/api/voiceMail/index.js
index b7c444a..1302ffa 100644
--- a/server/api/voiceMail/index.js
+++ b/server/api/voiceMail/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3a51=['isAuthenticated','get','/:id','show','/:id/messages','create','put','update','delete','exports','util','connect-timeout','Router'];(function(_0x277107,_0x3420dc){var _0x1da046=function(_0x47122d){while(--_0x47122d){_0x277107['push'](_0x277107['shift']());}};_0x1da046(++_0x3420dc);}(_0x3a51,0x1c4));var _0x13a5=function(_0x32126b,_0x9bc478){_0x32126b=_0x32126b-0x0;var _0x1ce486=_0x3a51[_0x32126b];return _0x1ce486;};'use strict';var multer=require('multer');var util=require(_0x13a5('0x0'));var path=require('path');var timeout=require(_0x13a5('0x1'));var express=require('express');var router=express[_0x13a5('0x2')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./voiceMail.controller');router['get']('/',auth[_0x13a5('0x3')](),controller['index']);router[_0x13a5('0x4')](_0x13a5('0x5'),auth[_0x13a5('0x3')](),controller[_0x13a5('0x6')]);router[_0x13a5('0x4')](_0x13a5('0x7'),auth[_0x13a5('0x3')](),controller['getMessages']);router['post']('/',auth[_0x13a5('0x3')](),controller[_0x13a5('0x8')]);router[_0x13a5('0x9')]('/:id',auth[_0x13a5('0x3')](),controller[_0x13a5('0xa')]);router[_0x13a5('0xb')](_0x13a5('0x5'),auth[_0x13a5('0x3')](),controller['destroy']);module[_0x13a5('0xc')]=router;
\ No newline at end of file
+var _0x4f6a=['isAuthenticated','show','getMessages','post','create','put','delete','destroy','exports','multer','connect-timeout','express','../../components/auth/service','../../config/environment','./voiceMail.controller','get','index','/:id'];(function(_0x5e8c71,_0x49ca90){var _0x213f07=function(_0x1e7f0b){while(--_0x1e7f0b){_0x5e8c71['push'](_0x5e8c71['shift']());}};_0x213f07(++_0x49ca90);}(_0x4f6a,0x1ef));var _0xa4f6=function(_0x2c961d,_0x106e3a){_0x2c961d=_0x2c961d-0x0;var _0xb29a42=_0x4f6a[_0x2c961d];return _0xb29a42;};'use strict';var multer=require(_0xa4f6('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xa4f6('0x1'));var express=require(_0xa4f6('0x2'));var router=express['Router']();var auth=require(_0xa4f6('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xa4f6('0x4'));var controller=require(_0xa4f6('0x5'));router[_0xa4f6('0x6')]('/',auth['isAuthenticated'](),controller[_0xa4f6('0x7')]);router[_0xa4f6('0x6')](_0xa4f6('0x8'),auth[_0xa4f6('0x9')](),controller[_0xa4f6('0xa')]);router['get']('/:id/messages',auth[_0xa4f6('0x9')](),controller[_0xa4f6('0xb')]);router[_0xa4f6('0xc')]('/',auth[_0xa4f6('0x9')](),controller[_0xa4f6('0xd')]);router[_0xa4f6('0xe')]('/:id',auth[_0xa4f6('0x9')](),controller['update']);router[_0xa4f6('0xf')]('/:id',auth[_0xa4f6('0x9')](),controller[_0xa4f6('0x10')]);module[_0xa4f6('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.attributes.js b/server/api/voiceMail/voiceMail.attributes.js
index db56b34..0a1d520 100644
--- a/server/api/voiceMail/voiceMail.attributes.js
+++ b/server/api/voiceMail/voiceMail.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xda04=['trim','ENUM','yes','TINYINT(4)','INTEGER','fullname','\x20-\x20','mailbox','sequelize','exports','STRING','contest_mailbox','setDataValue','string'];(function(_0xb06b77,_0x319c09){var _0x58cf07=function(_0x397a27){while(--_0x397a27){_0xb06b77['push'](_0xb06b77['shift']());}};_0x58cf07(++_0x319c09);}(_0xda04,0x94));var _0x4da0=function(_0x513789,_0x3d7067){_0x513789=_0x513789-0x0;var _0xbdc2f3=_0xda04[_0x513789];return _0xbdc2f3;};'use strict';var Sequelize=require(_0x4da0('0x0'));module[_0x4da0('0x1')]={'customer_id':{'type':Sequelize[_0x4da0('0x2')]},'context':{'type':Sequelize[_0x4da0('0x2')],'defaultValue':'from-voicemail','unique':_0x4da0('0x3')},'mailbox':{'type':Sequelize[_0x4da0('0x2')],'defaultValue':'','allowNull':![],'unique':_0x4da0('0x3')},'password':{'type':Sequelize[_0x4da0('0x2')]},'fullname':{'type':Sequelize[_0x4da0('0x2')]},'email':{'type':Sequelize[_0x4da0('0x2')],'validate':{'isEmail':!![]},'set':function(_0x9889d7){this[_0x4da0('0x4')]('email',typeof _0x9889d7===_0x4da0('0x5')&&_0x9889d7['trim']()?_0x9889d7[_0x4da0('0x6')]():null);}},'pager':{'type':Sequelize[_0x4da0('0x2')]},'tz':{'type':Sequelize[_0x4da0('0x2')],'defaultValue':'central'},'attach':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':_0x4da0('0x8'),'allowNull':![]},'saycid':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'yes','allowNull':![]},'dialout':{'type':Sequelize[_0x4da0('0x2')]},'callback':{'type':Sequelize[_0x4da0('0x2')]},'review':{'type':Sequelize['ENUM'](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0x4da0('0x9'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':_0x4da0('0x8'),'allowNull':![]},'forcename':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0x4da0('0x7')](_0x4da0('0x8'),'no'),'defaultValue':'yes','allowNull':![]},'stamp':{'type':'TIMESTAMP'},'emailsubject':{'type':Sequelize[_0x4da0('0x2')]},'emailbody':{'type':Sequelize['STRING']},'maxsecs':{'type':Sequelize['INTEGER'](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0x4da0('0xa')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue'](_0x4da0('0xb'))+_0x4da0('0xc')+this['getDataValue'](_0x4da0('0xd'));}}};
\ No newline at end of file
+var _0xc1c8=['VIRTUAL','getDataValue','fullname','\x20-\x20','mailbox','sequelize','STRING','from-voicemail','contest_mailbox','setDataValue','email','string','trim','central','ENUM','yes','TINYINT(4)','TIMESTAMP','INTEGER'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc1c8,0x64));var _0x8c1c=function(_0x2b8568,_0x2c8f64){_0x2b8568=_0x2b8568-0x0;var _0x2d7321=_0xc1c8[_0x2b8568];return _0x2d7321;};'use strict';var Sequelize=require(_0x8c1c('0x0'));module['exports']={'customer_id':{'type':Sequelize[_0x8c1c('0x1')]},'context':{'type':Sequelize[_0x8c1c('0x1')],'defaultValue':_0x8c1c('0x2'),'unique':_0x8c1c('0x3')},'mailbox':{'type':Sequelize[_0x8c1c('0x1')],'defaultValue':'','allowNull':![],'unique':_0x8c1c('0x3')},'password':{'type':Sequelize[_0x8c1c('0x1')]},'fullname':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x8c1c('0x1')],'validate':{'isEmail':!![]},'set':function(_0x258148){this[_0x8c1c('0x4')](_0x8c1c('0x5'),typeof _0x258148===_0x8c1c('0x6')&&_0x258148[_0x8c1c('0x7')]()?_0x258148['trim']():null);}},'pager':{'type':Sequelize[_0x8c1c('0x1')]},'tz':{'type':Sequelize[_0x8c1c('0x1')],'defaultValue':_0x8c1c('0x8')},'attach':{'type':Sequelize[_0x8c1c('0x9')]('yes','no'),'defaultValue':_0x8c1c('0xa'),'allowNull':![]},'saycid':{'type':Sequelize[_0x8c1c('0x9')](_0x8c1c('0xa'),'no'),'defaultValue':_0x8c1c('0xa'),'allowNull':![]},'dialout':{'type':Sequelize[_0x8c1c('0x1')]},'callback':{'type':Sequelize[_0x8c1c('0x1')]},'review':{'type':Sequelize['ENUM'](_0x8c1c('0xa'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0x8c1c('0x9')](_0x8c1c('0xa'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0x8c1c('0x9')](_0x8c1c('0xa'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0x8c1c('0x9')](_0x8c1c('0xa'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0x8c1c('0xb'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0x8c1c('0x9')](_0x8c1c('0xa'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0x8c1c('0x9')]('yes','no'),'defaultValue':_0x8c1c('0xa'),'allowNull':![]},'forcename':{'type':Sequelize[_0x8c1c('0x9')]('yes','no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0x8c1c('0x9')](_0x8c1c('0xa'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0x8c1c('0x9')]('yes','no'),'defaultValue':_0x8c1c('0xa'),'allowNull':![]},'stamp':{'type':_0x8c1c('0xc')},'emailsubject':{'type':Sequelize[_0x8c1c('0x1')]},'emailbody':{'type':Sequelize['STRING']},'maxsecs':{'type':Sequelize[_0x8c1c('0xd')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0x8c1c('0xd')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0x8c1c('0xe')],'get':function(){return this[_0x8c1c('0xf')](_0x8c1c('0x10'))+_0x8c1c('0x11')+this[_0x8c1c('0xf')](_0x8c1c('0x12'));}}};
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.controller.js b/server/api/voiceMail/voiceMail.controller.js
index 503d814..e4dbceb 100644
--- a/server/api/voiceMail/voiceMail.controller.js
+++ b/server/api/voiceMail/voiceMail.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x042b=['error','getMessages','VoiceMailMessage','mailbox','findAndCountAll','html-pdf','rimraf','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','Voicemails','UserProfileResource','stack','name','send','index','VoiceMail','rawAttributes','model','keys','query','attributes','fields','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','type','key','VIRTUAL','field','options','includeAll','include','findAll','catch','show','params','intersection','length','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation'];(function(_0x4f4757,_0x44241a){var _0x549c37=function(_0x3c3cfb){while(--_0x3c3cfb){_0x4f4757['push'](_0x4f4757['shift']());}};_0x549c37(++_0x44241a);}(_0x042b,0xfe));var _0xb042=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x042b[_0x2dafbe];return _0x58a45a;};'use strict';var pdf=require(_0xb042('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xb042('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb042('0x2'));var rp=require(_0xb042('0x3'));var moment=require(_0xb042('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xb042('0x5'));var util=require('util');var path=require(_0xb042('0x6'));var sox=require(_0xb042('0x7'));var csv=require(_0xb042('0x8'));var ejs=require(_0xb042('0x9'));var fs=require('fs');var _=require(_0xb042('0xa'));var squel=require('squel');var crypto=require(_0xb042('0xb'));var jsforce=require(_0xb042('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xb042('0x8'));var querystring=require('querystring');var Papa=require(_0xb042('0xd'));var Redis=require(_0xb042('0xe'));var authService=require(_0xb042('0xf'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xb042('0x10'));var logger=require('../../config/logger')(_0xb042('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xc1e78f,_0x19b7c3){_0x19b7c3=_0x19b7c3||0xcc;return function(_0x570d55){if(_0x570d55){return _0xc1e78f[_0xb042('0x12')](_0x19b7c3);}return _0xc1e78f[_0xb042('0x13')](_0x19b7c3)[_0xb042('0x14')]();};}function respondWithResult(_0x47e684,_0x1be2da){_0x1be2da=_0x1be2da||0xc8;return function(_0x75fa05){if(_0x75fa05){return _0x47e684['status'](_0x1be2da)[_0xb042('0x15')](_0x75fa05);}};}function respondWithFilteredResult(_0x26767c,_0x20d480){return function(_0x19c64f){if(_0x19c64f){var _0x3d1f93=_0x19c64f[_0xb042('0x16')],_0x50bb1e=_0x20d480[_0xb042('0x17')],_0x320878=_0x20d480[_0xb042('0x17')]+_0x20d480[_0xb042('0x18')],_0x4dbfc2;if(_0x320878>=_0x3d1f93){_0x320878=_0x3d1f93;_0x4dbfc2=0xc8;}else{_0x4dbfc2=0xce;}_0x26767c[_0xb042('0x13')](_0x4dbfc2);return _0x26767c[_0xb042('0x19')](_0xb042('0x1a'),_0x50bb1e+'-'+_0x320878+'/'+_0x3d1f93)['json'](_0x19c64f);}return null;};}function patchUpdates(_0x5ef0c1){return function(_0x36cd76){try{jsonpatch[_0xb042('0x1b')](_0x36cd76,_0x5ef0c1,!![]);}catch(_0x3dad93){return BPromise[_0xb042('0x1c')](_0x3dad93);}return _0x36cd76[_0xb042('0x1d')]();};}function saveUpdates(_0x7f2053,_0x31664a){return function(_0x263003){if(_0x263003){return _0x263003[_0xb042('0x1e')](_0x7f2053)['then'](function(_0x58fbaf){return _0x58fbaf;});}return null;};}function removeEntity(_0x97158e,_0xa5cffe){return function(_0xf522b3){if(_0xf522b3){return _0xf522b3[_0xb042('0x1f')]()[_0xb042('0x20')](function(){var _0x102782=_0xf522b3['get']({'plain':!![]});var _0x1de70f=_0xb042('0x21');return db[_0xb042('0x22')][_0xb042('0x1f')]({'where':{'type':_0x1de70f,'resourceId':_0x102782['id']}})[_0xb042('0x20')](function(){return _0xf522b3;});})[_0xb042('0x20')](function(){_0x97158e['status'](0xcc)[_0xb042('0x14')]();});}};}function handleEntityNotFound(_0x250e3b,_0x272dd2){return function(_0x2f2446){if(!_0x2f2446){_0x250e3b[_0xb042('0x12')](0x194);}return _0x2f2446;};}function handleError(_0x3292a0,_0x395ecf){_0x395ecf=_0x395ecf||0x1f4;return function(_0x381d5e){logger['error'](_0x381d5e[_0xb042('0x23')]);if(_0x381d5e['name']){delete _0x381d5e[_0xb042('0x24')];}_0x3292a0[_0xb042('0x13')](_0x395ecf)[_0xb042('0x25')](_0x381d5e);};}exports[_0xb042('0x26')]=function(_0x36152f,_0x3d380f){var _0x2aabba={},_0x57af55={},_0x2ae7d2={'count':0x0,'rows':[]};var _0x53d090=db[_0xb042('0x27')][_0xb042('0x28')];_0x57af55[_0xb042('0x29')]=_[_0xb042('0x2a')](_0x53d090);_0x57af55[_0xb042('0x2b')]=_[_0xb042('0x2a')](_0x36152f['query']);_0x57af55['filters']=_['intersection'](_0x57af55[_0xb042('0x29')],_0x57af55['query']);_0x2aabba[_0xb042('0x2c')]=_['intersection'](_0x57af55['model'],qs[_0xb042('0x2d')](_0x36152f[_0xb042('0x2b')]['fields']));_0x2aabba['attributes']=_0x2aabba['attributes']['length']?_0x2aabba[_0xb042('0x2c')]:_0x57af55[_0xb042('0x29')];if(!_0x36152f['query'][_0xb042('0x2e')](_0xb042('0x2f'))){_0x2aabba[_0xb042('0x18')]=qs[_0xb042('0x18')](_0x36152f[_0xb042('0x2b')]['limit']);_0x2aabba[_0xb042('0x17')]=qs[_0xb042('0x17')](_0x36152f[_0xb042('0x2b')]['offset']);}_0x2aabba[_0xb042('0x30')]=qs['sort'](_0x36152f[_0xb042('0x2b')][_0xb042('0x31')]);_0x2aabba['where']=qs[_0xb042('0x32')](_[_0xb042('0x33')](_0x36152f[_0xb042('0x2b')],_0x57af55[_0xb042('0x32')]));if(_0x36152f[_0xb042('0x2b')][_0xb042('0x34')]){_0x2aabba[_0xb042('0x35')]=_[_0xb042('0x36')](_0x2aabba[_0xb042('0x35')],{'$or':_['map'](_0x53d090,function(_0x34a90a){if(_0x34a90a[_0xb042('0x37')][_0xb042('0x38')]!==_0xb042('0x39')){var _0x41b082={};_0x41b082[_0x34a90a[_0xb042('0x3a')]]={'$like':'%'+_0x36152f['query']['filter']+'%'};return _0x41b082;}})});}_0x2aabba=_[_0xb042('0x36')]({},_0x2aabba,_0x36152f[_0xb042('0x3b')]);var _0x21104f={'where':_0x2aabba[_0xb042('0x35')]};return db[_0xb042('0x27')][_0xb042('0x16')](_0x21104f)[_0xb042('0x20')](function(_0x44cda3){_0x2ae7d2[_0xb042('0x16')]=_0x44cda3;if(_0x36152f[_0xb042('0x2b')][_0xb042('0x3c')]){_0x2aabba[_0xb042('0x3d')]=[{'all':!![]}];}return db[_0xb042('0x27')][_0xb042('0x3e')](_0x2aabba);})[_0xb042('0x20')](function(_0x5c4922){_0x2ae7d2['rows']=_0x5c4922;return _0x2ae7d2;})[_0xb042('0x20')](respondWithFilteredResult(_0x3d380f,_0x2aabba))[_0xb042('0x3f')](handleError(_0x3d380f,null));};exports[_0xb042('0x40')]=function(_0x2d21bf,_0x3f9b56){var _0x861cf5={'raw':!![],'where':{'id':_0x2d21bf[_0xb042('0x41')]['id']}},_0x394c21={};_0x394c21['model']=_[_0xb042('0x2a')](db[_0xb042('0x27')]['rawAttributes']);_0x394c21[_0xb042('0x2b')]=_[_0xb042('0x2a')](_0x2d21bf[_0xb042('0x2b')]);_0x394c21['filters']=_[_0xb042('0x42')](_0x394c21[_0xb042('0x29')],_0x394c21[_0xb042('0x2b')]);_0x861cf5['attributes']=_[_0xb042('0x42')](_0x394c21[_0xb042('0x29')],qs[_0xb042('0x2d')](_0x2d21bf[_0xb042('0x2b')]['fields']));_0x861cf5[_0xb042('0x2c')]=_0x861cf5[_0xb042('0x2c')][_0xb042('0x43')]?_0x861cf5['attributes']:_0x394c21[_0xb042('0x29')];if(_0x2d21bf[_0xb042('0x2b')]['includeAll']){_0x861cf5[_0xb042('0x3d')]=[{'all':!![]}];}_0x861cf5=_[_0xb042('0x36')]({},_0x861cf5,_0x2d21bf[_0xb042('0x3b')]);return db[_0xb042('0x27')][_0xb042('0x44')](_0x861cf5)[_0xb042('0x20')](handleEntityNotFound(_0x3f9b56,null))['then'](respondWithResult(_0x3f9b56,null))[_0xb042('0x3f')](handleError(_0x3f9b56,null));};exports[_0xb042('0x45')]=function(_0x2487c5,_0x300950){return db[_0xb042('0x27')][_0xb042('0x45')](_0x2487c5[_0xb042('0x46')],{})['then'](function(_0x725f5d){var _0x50bcf5=_0x2487c5[_0xb042('0x47')][_0xb042('0x48')]({'plain':!![]});if(!_0x50bcf5)throw new Error(_0xb042('0x49'));if(_0x50bcf5[_0xb042('0x4a')]===_0xb042('0x47')){var _0x2a39ed=_0x725f5d[_0xb042('0x48')]({'plain':!![]});var _0x21fbe9=_0xb042('0x21');return db[_0xb042('0x4b')][_0xb042('0x44')]({'where':{'name':_0x21fbe9,'userProfileId':_0x50bcf5[_0xb042('0x4c')]},'raw':!![]})[_0xb042('0x20')](function(_0x367872){if(_0x367872&&_0x367872[_0xb042('0x4d')]===0x0){return db[_0xb042('0x22')][_0xb042('0x45')]({'name':_0x2a39ed[_0xb042('0x24')],'resourceId':_0x2a39ed['id'],'type':_0x367872['name'],'sectionId':_0x367872['id']},{})[_0xb042('0x20')](function(){return _0x725f5d;});}else{return _0x725f5d;}})['catch'](function(_0xcc272b){logger[_0xb042('0x4e')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xcc272b);throw _0xcc272b;});}return _0x725f5d;})[_0xb042('0x20')](respondWithResult(_0x300950,0xc9))[_0xb042('0x3f')](handleError(_0x300950,null));};exports[_0xb042('0x1e')]=function(_0x101393,_0x55e8ed){if(_0x101393[_0xb042('0x46')]['id']){delete _0x101393[_0xb042('0x46')]['id'];}return db[_0xb042('0x27')]['find']({'where':{'id':_0x101393['params']['id']}})[_0xb042('0x20')](handleEntityNotFound(_0x55e8ed,null))['then'](saveUpdates(_0x101393['body'],null))[_0xb042('0x20')](respondWithResult(_0x55e8ed,null))[_0xb042('0x3f')](handleError(_0x55e8ed,null));};exports[_0xb042('0x1f')]=function(_0x5b1a73,_0x2e847f){return db['VoiceMail'][_0xb042('0x44')]({'where':{'id':_0x5b1a73[_0xb042('0x41')]['id']}})[_0xb042('0x20')](handleEntityNotFound(_0x2e847f,null))[_0xb042('0x20')](removeEntity(_0x2e847f,null))[_0xb042('0x3f')](handleError(_0x2e847f,null));};exports[_0xb042('0x4f')]=function(_0x59ed51,_0x1320c1,_0x2c0f12){return db['VoiceMail']['findOne']({'where':{'id':_0x59ed51['params']['id']}})[_0xb042('0x20')](handleEntityNotFound(_0x1320c1,null))[_0xb042('0x20')](function(_0x11723){var _0xd745c7;var _0xebfaf9={},_0x1799d1={};_0x1799d1['model']=_[_0xb042('0x2a')](db[_0xb042('0x50')]['rawAttributes']);_0x1799d1[_0xb042('0x2b')]=_[_0xb042('0x2a')](_0x59ed51['query']);_0x1799d1[_0xb042('0x32')]=_[_0xb042('0x42')](_0x1799d1[_0xb042('0x29')],_0x1799d1[_0xb042('0x2b')]);_0xebfaf9['attributes']=_[_0xb042('0x42')](_0x1799d1['model'],qs[_0xb042('0x2d')](_0x59ed51[_0xb042('0x2b')][_0xb042('0x2d')]));_0xebfaf9['attributes']=_0xebfaf9[_0xb042('0x2c')][_0xb042('0x43')]?_0xebfaf9[_0xb042('0x2c')]:_0x1799d1['model'];if(!_0x59ed51[_0xb042('0x2b')]['hasOwnProperty']('nolimit')){_0xebfaf9[_0xb042('0x18')]=qs[_0xb042('0x18')](_0x59ed51[_0xb042('0x2b')][_0xb042('0x18')]);_0xebfaf9['offset']=qs[_0xb042('0x17')](_0x59ed51[_0xb042('0x2b')]['offset']);}_0xebfaf9[_0xb042('0x30')]=qs[_0xb042('0x31')](_0x59ed51['query']['sort']);_0xebfaf9[_0xb042('0x35')]=qs[_0xb042('0x32')](_['pick'](_0x59ed51['query'],_0x1799d1['filters']));if(_0x59ed51[_0xb042('0x2b')][_0xb042('0x34')]){_0xebfaf9[_0xb042('0x35')]=_[_0xb042('0x36')](_0xebfaf9[_0xb042('0x35')],{'$or':_['map'](_0xebfaf9[_0xb042('0x2c')],function(_0x2ddd99){var _0x247a29={};_0x247a29[_0x2ddd99]={'$like':'%'+_0x59ed51[_0xb042('0x2b')][_0xb042('0x34')]+'%'};return _0x247a29;})});}_0xebfaf9[_0xb042('0x35')]=_[_0xb042('0x36')](_0xebfaf9[_0xb042('0x35')],{'mailboxuser':_0x11723[_0xb042('0x51')]});_0xebfaf9=_[_0xb042('0x36')]({},_0xebfaf9,_0x59ed51[_0xb042('0x3b')]);return db[_0xb042('0x50')][_0xb042('0x52')](_0xebfaf9)['then'](respondWithFilteredResult(_0x1320c1,_0xebfaf9));})[_0xb042('0x3f')](handleError(_0x1320c1,null));};
\ No newline at end of file
+var _0x0752=['crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','reject','then','destroy','get','Voicemails','UserProfileResource','error','stack','name','send','index','VoiceMail','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','type','key','VIRTUAL','field','filter','merge','options','include','findAll','rows','catch','show','params','includeAll','find','create','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','findOne','VoiceMailMessage','pick','map','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','squel'];(function(_0x469add,_0x50ef21){var _0x2e8a26=function(_0x39a4d6){while(--_0x39a4d6){_0x469add['push'](_0x469add['shift']());}};_0x2e8a26(++_0x50ef21);}(_0x0752,0xf6));var _0x2075=function(_0x3ff4ab,_0x365001){_0x3ff4ab=_0x3ff4ab-0x0;var _0x1c1a09=_0x0752[_0x3ff4ab];return _0x1c1a09;};'use strict';var pdf=require(_0x2075('0x0'));var emlformat=require(_0x2075('0x1'));var rimraf=require(_0x2075('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2075('0x3'));var rp=require(_0x2075('0x4'));var moment=require('moment');var BPromise=require(_0x2075('0x5'));var Mustache=require(_0x2075('0x6'));var util=require(_0x2075('0x7'));var path=require(_0x2075('0x8'));var sox=require(_0x2075('0x9'));var csv=require(_0x2075('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x2075('0xb'));var crypto=require(_0x2075('0xc'));var jsforce=require(_0x2075('0xd'));var deskjs=require(_0x2075('0xe'));var toCsv=require(_0x2075('0xa'));var querystring=require(_0x2075('0xf'));var Papa=require(_0x2075('0x10'));var Redis=require(_0x2075('0x11'));var authService=require(_0x2075('0x12'));var qs=require(_0x2075('0x13'));var hardwareService=require(_0x2075('0x14'));var logger=require(_0x2075('0x15'))(_0x2075('0x16'));var utils=require('../../config/utils');var config=require(_0x2075('0x17'));var db=require(_0x2075('0x18'))['db'];function respondWithStatusCode(_0x4a9181,_0x26308d){_0x26308d=_0x26308d||0xcc;return function(_0x1f8e19){if(_0x1f8e19){return _0x4a9181[_0x2075('0x19')](_0x26308d);}return _0x4a9181[_0x2075('0x1a')](_0x26308d)[_0x2075('0x1b')]();};}function respondWithResult(_0x485ada,_0x3cea53){_0x3cea53=_0x3cea53||0xc8;return function(_0x51ed8e){if(_0x51ed8e){return _0x485ada[_0x2075('0x1a')](_0x3cea53)[_0x2075('0x1c')](_0x51ed8e);}};}function respondWithFilteredResult(_0x251110,_0x5cc0ba){return function(_0x595f5a){if(_0x595f5a){var _0x3a7304=_0x595f5a[_0x2075('0x1d')],_0x3fc803=_0x5cc0ba[_0x2075('0x1e')],_0x2a4db7=_0x5cc0ba['offset']+_0x5cc0ba[_0x2075('0x1f')],_0x14e40d;if(_0x2a4db7>=_0x3a7304){_0x2a4db7=_0x3a7304;_0x14e40d=0xc8;}else{_0x14e40d=0xce;}_0x251110[_0x2075('0x1a')](_0x14e40d);return _0x251110[_0x2075('0x20')]('Content-Range',_0x3fc803+'-'+_0x2a4db7+'/'+_0x3a7304)[_0x2075('0x1c')](_0x595f5a);}return null;};}function patchUpdates(_0x507b88){return function(_0x1c2683){try{jsonpatch['apply'](_0x1c2683,_0x507b88,!![]);}catch(_0x149907){return BPromise[_0x2075('0x21')](_0x149907);}return _0x1c2683['save']();};}function saveUpdates(_0x3a0db5,_0x58431e){return function(_0x32c064){if(_0x32c064){return _0x32c064['update'](_0x3a0db5)[_0x2075('0x22')](function(_0x3cabf3){return _0x3cabf3;});}return null;};}function removeEntity(_0x4e30c0,_0x114e56){return function(_0x57b0d3){if(_0x57b0d3){return _0x57b0d3[_0x2075('0x23')]()[_0x2075('0x22')](function(){var _0x27aaa7=_0x57b0d3[_0x2075('0x24')]({'plain':!![]});var _0x148a84=_0x2075('0x25');return db[_0x2075('0x26')][_0x2075('0x23')]({'where':{'type':_0x148a84,'resourceId':_0x27aaa7['id']}})[_0x2075('0x22')](function(){return _0x57b0d3;});})[_0x2075('0x22')](function(){_0x4e30c0[_0x2075('0x1a')](0xcc)[_0x2075('0x1b')]();});}};}function handleEntityNotFound(_0x121b99,_0x474981){return function(_0x3f5464){if(!_0x3f5464){_0x121b99[_0x2075('0x19')](0x194);}return _0x3f5464;};}function handleError(_0x17cb33,_0x287d23){_0x287d23=_0x287d23||0x1f4;return function(_0xd47a91){logger[_0x2075('0x27')](_0xd47a91[_0x2075('0x28')]);if(_0xd47a91[_0x2075('0x29')]){delete _0xd47a91['name'];}_0x17cb33[_0x2075('0x1a')](_0x287d23)[_0x2075('0x2a')](_0xd47a91);};}exports[_0x2075('0x2b')]=function(_0x2bc469,_0x242108){var _0x3e7d7b={},_0x6bf25b={},_0x507069={'count':0x0,'rows':[]};var _0x3d0aa0=db[_0x2075('0x2c')][_0x2075('0x2d')];_0x6bf25b[_0x2075('0x2e')]=_[_0x2075('0x2f')](_0x3d0aa0);_0x6bf25b[_0x2075('0x30')]=_[_0x2075('0x2f')](_0x2bc469['query']);_0x6bf25b[_0x2075('0x31')]=_[_0x2075('0x32')](_0x6bf25b['model'],_0x6bf25b[_0x2075('0x30')]);_0x3e7d7b[_0x2075('0x33')]=_['intersection'](_0x6bf25b[_0x2075('0x2e')],qs[_0x2075('0x34')](_0x2bc469['query'][_0x2075('0x34')]));_0x3e7d7b[_0x2075('0x33')]=_0x3e7d7b[_0x2075('0x33')][_0x2075('0x35')]?_0x3e7d7b['attributes']:_0x6bf25b[_0x2075('0x2e')];if(!_0x2bc469[_0x2075('0x30')][_0x2075('0x36')](_0x2075('0x37'))){_0x3e7d7b['limit']=qs[_0x2075('0x1f')](_0x2bc469[_0x2075('0x30')]['limit']);_0x3e7d7b['offset']=qs[_0x2075('0x1e')](_0x2bc469[_0x2075('0x30')][_0x2075('0x1e')]);}_0x3e7d7b[_0x2075('0x38')]=qs[_0x2075('0x39')](_0x2bc469[_0x2075('0x30')][_0x2075('0x39')]);_0x3e7d7b[_0x2075('0x3a')]=qs[_0x2075('0x31')](_['pick'](_0x2bc469['query'],_0x6bf25b[_0x2075('0x31')]));if(_0x2bc469['query']['filter']){_0x3e7d7b[_0x2075('0x3a')]=_['merge'](_0x3e7d7b[_0x2075('0x3a')],{'$or':_['map'](_0x3d0aa0,function(_0x42a8d7){if(_0x42a8d7[_0x2075('0x3b')][_0x2075('0x3c')]!==_0x2075('0x3d')){var _0x10a97d={};_0x10a97d[_0x42a8d7[_0x2075('0x3e')]]={'$like':'%'+_0x2bc469[_0x2075('0x30')][_0x2075('0x3f')]+'%'};return _0x10a97d;}})});}_0x3e7d7b=_[_0x2075('0x40')]({},_0x3e7d7b,_0x2bc469[_0x2075('0x41')]);var _0x4f047f={'where':_0x3e7d7b[_0x2075('0x3a')]};return db[_0x2075('0x2c')][_0x2075('0x1d')](_0x4f047f)[_0x2075('0x22')](function(_0x387b5e){_0x507069[_0x2075('0x1d')]=_0x387b5e;if(_0x2bc469['query']['includeAll']){_0x3e7d7b[_0x2075('0x42')]=[{'all':!![]}];}return db['VoiceMail'][_0x2075('0x43')](_0x3e7d7b);})[_0x2075('0x22')](function(_0x181d28){_0x507069[_0x2075('0x44')]=_0x181d28;return _0x507069;})[_0x2075('0x22')](respondWithFilteredResult(_0x242108,_0x3e7d7b))[_0x2075('0x45')](handleError(_0x242108,null));};exports[_0x2075('0x46')]=function(_0x4d774d,_0x478a27){var _0x55c339={'raw':!![],'where':{'id':_0x4d774d[_0x2075('0x47')]['id']}},_0x4a2add={};_0x4a2add[_0x2075('0x2e')]=_['keys'](db[_0x2075('0x2c')][_0x2075('0x2d')]);_0x4a2add[_0x2075('0x30')]=_['keys'](_0x4d774d[_0x2075('0x30')]);_0x4a2add[_0x2075('0x31')]=_[_0x2075('0x32')](_0x4a2add[_0x2075('0x2e')],_0x4a2add['query']);_0x55c339['attributes']=_[_0x2075('0x32')](_0x4a2add['model'],qs[_0x2075('0x34')](_0x4d774d[_0x2075('0x30')][_0x2075('0x34')]));_0x55c339[_0x2075('0x33')]=_0x55c339[_0x2075('0x33')][_0x2075('0x35')]?_0x55c339[_0x2075('0x33')]:_0x4a2add[_0x2075('0x2e')];if(_0x4d774d['query'][_0x2075('0x48')]){_0x55c339['include']=[{'all':!![]}];}_0x55c339=_['merge']({},_0x55c339,_0x4d774d[_0x2075('0x41')]);return db[_0x2075('0x2c')][_0x2075('0x49')](_0x55c339)[_0x2075('0x22')](handleEntityNotFound(_0x478a27,null))['then'](respondWithResult(_0x478a27,null))[_0x2075('0x45')](handleError(_0x478a27,null));};exports[_0x2075('0x4a')]=function(_0x23db58,_0x498f1c){return db[_0x2075('0x2c')][_0x2075('0x4a')](_0x23db58['body'],{})[_0x2075('0x22')](function(_0x3bdbe6){var _0x4f5b83=_0x23db58[_0x2075('0x4b')][_0x2075('0x24')]({'plain':!![]});if(!_0x4f5b83)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4f5b83[_0x2075('0x4c')]==='user'){var _0x3723a7=_0x3bdbe6[_0x2075('0x24')]({'plain':!![]});var _0x3b8531=_0x2075('0x25');return db[_0x2075('0x4d')][_0x2075('0x49')]({'where':{'name':_0x3b8531,'userProfileId':_0x4f5b83[_0x2075('0x4e')]},'raw':!![]})[_0x2075('0x22')](function(_0x54f411){if(_0x54f411&&_0x54f411[_0x2075('0x4f')]===0x0){return db['UserProfileResource'][_0x2075('0x4a')]({'name':_0x3723a7[_0x2075('0x29')],'resourceId':_0x3723a7['id'],'type':_0x54f411[_0x2075('0x29')],'sectionId':_0x54f411['id']},{})['then'](function(){return _0x3bdbe6;});}else{return _0x3bdbe6;}})['catch'](function(_0x1dd5b9){logger[_0x2075('0x27')](_0x2075('0x50'),_0x1dd5b9);throw _0x1dd5b9;});}return _0x3bdbe6;})[_0x2075('0x22')](respondWithResult(_0x498f1c,0xc9))['catch'](handleError(_0x498f1c,null));};exports['update']=function(_0x18da9d,_0x2d6f50){if(_0x18da9d[_0x2075('0x51')]['id']){delete _0x18da9d[_0x2075('0x51')]['id'];}return db['VoiceMail']['find']({'where':{'id':_0x18da9d[_0x2075('0x47')]['id']}})[_0x2075('0x22')](handleEntityNotFound(_0x2d6f50,null))[_0x2075('0x22')](saveUpdates(_0x18da9d['body'],null))[_0x2075('0x22')](respondWithResult(_0x2d6f50,null))[_0x2075('0x45')](handleError(_0x2d6f50,null));};exports['destroy']=function(_0x384cfe,_0x377bdb){return db[_0x2075('0x2c')][_0x2075('0x49')]({'where':{'id':_0x384cfe['params']['id']}})['then'](handleEntityNotFound(_0x377bdb,null))['then'](removeEntity(_0x377bdb,null))['catch'](handleError(_0x377bdb,null));};exports['getMessages']=function(_0x248fba,_0x39fb02,_0x482f23){return db[_0x2075('0x2c')][_0x2075('0x52')]({'where':{'id':_0x248fba[_0x2075('0x47')]['id']}})['then'](handleEntityNotFound(_0x39fb02,null))['then'](function(_0x2d1679){var _0x1a1b53;var _0x3145be={},_0x20369f={};_0x20369f[_0x2075('0x2e')]=_['keys'](db[_0x2075('0x53')][_0x2075('0x2d')]);_0x20369f['query']=_[_0x2075('0x2f')](_0x248fba['query']);_0x20369f[_0x2075('0x31')]=_['intersection'](_0x20369f['model'],_0x20369f[_0x2075('0x30')]);_0x3145be['attributes']=_[_0x2075('0x32')](_0x20369f['model'],qs[_0x2075('0x34')](_0x248fba[_0x2075('0x30')][_0x2075('0x34')]));_0x3145be[_0x2075('0x33')]=_0x3145be[_0x2075('0x33')][_0x2075('0x35')]?_0x3145be[_0x2075('0x33')]:_0x20369f[_0x2075('0x2e')];if(!_0x248fba[_0x2075('0x30')]['hasOwnProperty'](_0x2075('0x37'))){_0x3145be[_0x2075('0x1f')]=qs[_0x2075('0x1f')](_0x248fba[_0x2075('0x30')][_0x2075('0x1f')]);_0x3145be[_0x2075('0x1e')]=qs[_0x2075('0x1e')](_0x248fba['query']['offset']);}_0x3145be[_0x2075('0x38')]=qs[_0x2075('0x39')](_0x248fba[_0x2075('0x30')][_0x2075('0x39')]);_0x3145be[_0x2075('0x3a')]=qs[_0x2075('0x31')](_[_0x2075('0x54')](_0x248fba['query'],_0x20369f[_0x2075('0x31')]));if(_0x248fba[_0x2075('0x30')][_0x2075('0x3f')]){_0x3145be[_0x2075('0x3a')]=_[_0x2075('0x40')](_0x3145be[_0x2075('0x3a')],{'$or':_[_0x2075('0x55')](_0x3145be[_0x2075('0x33')],function(_0x44f0e1){var _0x36faee={};_0x36faee[_0x44f0e1]={'$like':'%'+_0x248fba['query'][_0x2075('0x3f')]+'%'};return _0x36faee;})});}_0x3145be[_0x2075('0x3a')]=_[_0x2075('0x40')](_0x3145be[_0x2075('0x3a')],{'mailboxuser':_0x2d1679['mailbox']});_0x3145be=_[_0x2075('0x40')]({},_0x3145be,_0x248fba[_0x2075('0x41')]);return db[_0x2075('0x53')]['findAndCountAll'](_0x3145be)['then'](respondWithFilteredResult(_0x39fb02,_0x3145be));})[_0x2075('0x45')](handleError(_0x39fb02,null));};
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.model.js b/server/api/voiceMail/voiceMail.model.js
index 86154ea..e51f5f1 100644
--- a/server/api/voiceMail/voiceMail.model.js
+++ b/server/api/voiceMail/voiceMail.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3cf6=['./voiceMail.attributes','VoiceMail','voice_voicemail','context','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0x5e9f80,_0x10f39d){var _0x3bf9ae=function(_0x3459b5){while(--_0x3459b5){_0x5e9f80['push'](_0x5e9f80['shift']());}};_0x3bf9ae(++_0x10f39d);}(_0x3cf6,0x64));var _0x63cf=function(_0x4e3cb6,_0x29d42e){_0x4e3cb6=_0x4e3cb6-0x0;var _0x4b7685=_0x3cf6[_0x4e3cb6];return _0x4b7685;};'use strict';var _=require('lodash');var util=require(_0x63cf('0x0'));var logger=require(_0x63cf('0x1'))(_0x63cf('0x2'));var moment=require(_0x63cf('0x3'));var BPromise=require(_0x63cf('0x4'));var rp=require(_0x63cf('0x5'));var fs=require('fs');var path=require(_0x63cf('0x6'));var rimraf=require('rimraf');var config=require(_0x63cf('0x7'));var attributes=require(_0x63cf('0x8'));module['exports']=function(_0x513a0f,_0xb50f61){return _0x513a0f['define'](_0x63cf('0x9'),attributes,{'tableName':_0x63cf('0xa'),'paranoid':![],'indexes':[{'name':'mailbox_context','fields':['mailbox',_0x63cf('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6418=['VoiceMail','voice_voicemail','mailbox','context','api','moment','request-promise','rimraf','../../config/environment','exports','define'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x6418,0x17a));var _0x8641=function(_0x414eaa,_0x1ac192){_0x414eaa=_0x414eaa-0x0;var _0x35e317=_0x6418[_0x414eaa];return _0x35e317;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x8641('0x0'));var moment=require(_0x8641('0x1'));var BPromise=require('bluebird');var rp=require(_0x8641('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0x8641('0x3'));var config=require(_0x8641('0x4'));var attributes=require('./voiceMail.attributes');module[_0x8641('0x5')]=function(_0x36032c,_0x5602e4){return _0x36032c[_0x8641('0x6')](_0x8641('0x7'),attributes,{'tableName':_0x8641('0x8'),'paranoid':![],'indexes':[{'name':'mailbox_context','fields':[_0x8641('0x9'),_0x8641('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.rpc.js b/server/api/voiceMail/voiceMail.rpc.js
index 78722a5..dbf3b89 100644
--- a/server/api/voiceMail/voiceMail.rpc.js
+++ b/server/api/voiceMail/voiceMail.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4bfb=['../../config/environment','jayson/promise','http','then','info','VoiceMail,\x20%s,\x20%s','VoiceMail,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x5efbf8,_0x334430){var _0x57f96e=function(_0x34a2d4){while(--_0x34a2d4){_0x5efbf8['push'](_0x5efbf8['shift']());}};_0x57f96e(++_0x334430);}(_0x4bfb,0x6a));var _0xb4bf=function(_0x5a1a51,_0x144c79){_0x5a1a51=_0x5a1a51-0x0;var _0x47edd7=_0x4bfb[_0x5a1a51];return _0x47edd7;};'use strict';var _=require(_0xb4bf('0x0'));var util=require(_0xb4bf('0x1'));var moment=require(_0xb4bf('0x2'));var BPromise=require(_0xb4bf('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb4bf('0x4'));var db=require(_0xb4bf('0x5'))['db'];var utils=require(_0xb4bf('0x6'));var logger=require(_0xb4bf('0x7'))(_0xb4bf('0x8'));var config=require(_0xb4bf('0x9'));var jayson=require(_0xb4bf('0xa'));var client=jayson['client'][_0xb4bf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x10268f,_0x27d25c,_0x1340b6){return new BPromise(function(_0x1ac469,_0x2b4da7){return client['request'](_0x10268f,_0x1340b6)[_0xb4bf('0xc')](function(_0x35449e){logger[_0xb4bf('0xd')](_0xb4bf('0xe'),_0x27d25c,'request\x20sent');logger['debug'](_0xb4bf('0xf'),_0x27d25c,_0xb4bf('0x10'),JSON[_0xb4bf('0x11')](_0x35449e));if(_0x35449e[_0xb4bf('0x12')]){if(_0x35449e[_0xb4bf('0x12')][_0xb4bf('0x13')]===0x1f4){logger[_0xb4bf('0x12')](_0xb4bf('0xe'),_0x27d25c,_0x35449e['error'][_0xb4bf('0x14')]);return _0x2b4da7(_0x35449e[_0xb4bf('0x12')][_0xb4bf('0x14')]);}logger[_0xb4bf('0x12')]('VoiceMail,\x20%s,\x20%s',_0x27d25c,_0x35449e[_0xb4bf('0x12')][_0xb4bf('0x14')]);return _0x1ac469(_0x35449e[_0xb4bf('0x12')][_0xb4bf('0x14')]);}else{logger[_0xb4bf('0xd')](_0xb4bf('0xe'),_0x27d25c,_0xb4bf('0x10'));_0x1ac469(_0x35449e[_0xb4bf('0x15')][_0xb4bf('0x14')]);}})[_0xb4bf('0x16')](function(_0x26ba6b){logger[_0xb4bf('0x12')](_0xb4bf('0xe'),_0x27d25c,_0x26ba6b);_0x2b4da7(_0x26ba6b);});});}
\ No newline at end of file
+var _0xcd74=['VoiceMail,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceMail,\x20%s,\x20%s','debug'];(function(_0x5d19f6,_0x53002e){var _0x471a38=function(_0x58baf4){while(--_0x58baf4){_0x5d19f6['push'](_0x5d19f6['shift']());}};_0x471a38(++_0x53002e);}(_0xcd74,0xdf));var _0x4cd7=function(_0x1450bb,_0x1d5853){_0x1450bb=_0x1450bb-0x0;var _0x18b74f=_0xcd74[_0x1450bb];return _0x18b74f;};'use strict';var _=require(_0x4cd7('0x0'));var util=require(_0x4cd7('0x1'));var moment=require(_0x4cd7('0x2'));var BPromise=require(_0x4cd7('0x3'));var rs=require(_0x4cd7('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x4cd7('0x5'));var logger=require(_0x4cd7('0x6'))(_0x4cd7('0x7'));var config=require(_0x4cd7('0x8'));var jayson=require(_0x4cd7('0x9'));var client=jayson[_0x4cd7('0xa')][_0x4cd7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x19a2c9,_0x17b152,_0x29b790){return new BPromise(function(_0x54856d,_0xf16757){return client[_0x4cd7('0xc')](_0x19a2c9,_0x29b790)[_0x4cd7('0xd')](function(_0x2a694e){logger[_0x4cd7('0xe')](_0x4cd7('0xf'),_0x17b152,'request\x20sent');logger[_0x4cd7('0x10')](_0x4cd7('0x11'),_0x17b152,_0x4cd7('0x12'),JSON['stringify'](_0x2a694e));if(_0x2a694e[_0x4cd7('0x13')]){if(_0x2a694e[_0x4cd7('0x13')][_0x4cd7('0x14')]===0x1f4){logger['error'](_0x4cd7('0xf'),_0x17b152,_0x2a694e['error'][_0x4cd7('0x15')]);return _0xf16757(_0x2a694e['error']['message']);}logger[_0x4cd7('0x13')](_0x4cd7('0xf'),_0x17b152,_0x2a694e[_0x4cd7('0x13')][_0x4cd7('0x15')]);return _0x54856d(_0x2a694e['error'][_0x4cd7('0x15')]);}else{logger[_0x4cd7('0xe')](_0x4cd7('0xf'),_0x17b152,'request\x20sent');_0x54856d(_0x2a694e[_0x4cd7('0x16')][_0x4cd7('0x15')]);}})[_0x4cd7('0x17')](function(_0x5b62d1){logger['error'](_0x4cd7('0xf'),_0x17b152,_0x5b62d1);_0xf16757(_0x5b62d1);});});}
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/index.js b/server/api/voiceMailMessage/index.js
index 0b52d8c..27b61f4 100644
--- a/server/api/voiceMailMessage/index.js
+++ b/server/api/voiceMailMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfe18=['../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/download','download','post','put','update','destroy','exports','multer','util','connect-timeout','express'];(function(_0x8db583,_0x5bb1b3){var _0x276f94=function(_0x2280d1){while(--_0x2280d1){_0x8db583['push'](_0x8db583['shift']());}};_0x276f94(++_0x5bb1b3);}(_0xfe18,0xf8));var _0x8fe1=function(_0x36519a,_0x264ce2){_0x36519a=_0x36519a-0x0;var _0x43a91e=_0xfe18[_0x36519a];return _0x43a91e;};'use strict';var multer=require(_0x8fe1('0x0'));var util=require(_0x8fe1('0x1'));var path=require('path');var timeout=require(_0x8fe1('0x2'));var express=require(_0x8fe1('0x3'));var router=express['Router']();var auth=require(_0x8fe1('0x4'));var interaction=require(_0x8fe1('0x5'));var config=require(_0x8fe1('0x6'));var controller=require('./voiceMailMessage.controller');router[_0x8fe1('0x7')]('/',auth[_0x8fe1('0x8')](),controller[_0x8fe1('0x9')]);router[_0x8fe1('0x7')](_0x8fe1('0xa'),auth[_0x8fe1('0x8')](),controller['show']);router['get'](_0x8fe1('0xb'),auth[_0x8fe1('0x8')](),controller[_0x8fe1('0xc')]);router[_0x8fe1('0xd')]('/',auth[_0x8fe1('0x8')](),controller['create']);router[_0x8fe1('0xe')]('/:id',auth[_0x8fe1('0x8')](),controller[_0x8fe1('0xf')]);router['delete'](_0x8fe1('0xa'),auth[_0x8fe1('0x8')](),controller[_0x8fe1('0x10')]);module[_0x8fe1('0x11')]=router;
\ No newline at end of file
+var _0x2525=['index','get','/:id','show','/:id/download','download','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated'];(function(_0x4cdd4d,_0x3cce1e){var _0x1bbd06=function(_0x4578cf){while(--_0x4578cf){_0x4cdd4d['push'](_0x4cdd4d['shift']());}};_0x1bbd06(++_0x3cce1e);}(_0x2525,0x1f0));var _0x5252=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0x2525[_0x34bf97];return _0x292719;};'use strict';var multer=require(_0x5252('0x0'));var util=require(_0x5252('0x1'));var path=require(_0x5252('0x2'));var timeout=require(_0x5252('0x3'));var express=require(_0x5252('0x4'));var router=express[_0x5252('0x5')]();var auth=require(_0x5252('0x6'));var interaction=require(_0x5252('0x7'));var config=require(_0x5252('0x8'));var controller=require('./voiceMailMessage.controller');router['get']('/',auth[_0x5252('0x9')](),controller[_0x5252('0xa')]);router[_0x5252('0xb')](_0x5252('0xc'),auth[_0x5252('0x9')](),controller[_0x5252('0xd')]);router['get'](_0x5252('0xe'),auth['isAuthenticated'](),controller[_0x5252('0xf')]);router[_0x5252('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0x5252('0x11')]('/:id',auth[_0x5252('0x9')](),controller[_0x5252('0x12')]);router[_0x5252('0x13')](_0x5252('0xc'),auth[_0x5252('0x9')](),controller[_0x5252('0x14')]);module[_0x5252('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.attributes.js b/server/api/voiceMailMessage/voiceMailMessage.attributes.js
index 98a92f1..f4316fa 100644
--- a/server/api/voiceMailMessage/voiceMailMessage.attributes.js
+++ b/server/api/voiceMailMessage/voiceMailMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x991e=['getDataValue','INTEGER','STRING','BLOB','long','sequelize','VIRTUAL'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x991e,0xe5));var _0xe991=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0x991e[_0x173441];return _0x2423a8;};'use strict';var Sequelize=require(_0xe991('0x0'));module['exports']={'name':{'type':Sequelize[_0xe991('0x1')],'get':function(_0x3979bf){return this[_0xe991('0x2')]('id');}},'msgnum':{'type':Sequelize[_0xe991('0x3')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'context':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'callerid':{'type':Sequelize['STRING'],'defaultValue':''},'origtime':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'duration':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'recording':{'type':Sequelize[_0xe991('0x5')](_0xe991('0x6')),'defaultValue':null},'flag':{'type':Sequelize[_0xe991('0x4')],'defaultValue':''},'msg_id':{'type':Sequelize['STRING'],'defaultValue':''},'stamp':{'type':'TIMESTAMP','allowNull':![]}};
\ No newline at end of file
+var _0xd8dc=['getDataValue','INTEGER','STRING','BLOB','long','TIMESTAMP','sequelize','exports','VIRTUAL'];(function(_0x1ba868,_0x2c3dac){var _0x454122=function(_0x312e28){while(--_0x312e28){_0x1ba868['push'](_0x1ba868['shift']());}};_0x454122(++_0x2c3dac);}(_0xd8dc,0xd5));var _0xcd8d=function(_0x7bc63a,_0x26422a){_0x7bc63a=_0x7bc63a-0x0;var _0xed898e=_0xd8dc[_0x7bc63a];return _0xed898e;};'use strict';var Sequelize=require(_0xcd8d('0x0'));module[_0xcd8d('0x1')]={'name':{'type':Sequelize[_0xcd8d('0x2')],'get':function(_0x31e370){return this[_0xcd8d('0x3')]('id');}},'msgnum':{'type':Sequelize[_0xcd8d('0x4')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize['STRING'],'defaultValue':''},'context':{'type':Sequelize[_0xcd8d('0x5')],'defaultValue':''},'macrocontext':{'type':Sequelize['STRING'],'defaultValue':''},'callerid':{'type':Sequelize[_0xcd8d('0x5')],'defaultValue':''},'origtime':{'type':Sequelize[_0xcd8d('0x5')],'defaultValue':''},'duration':{'type':Sequelize[_0xcd8d('0x5')],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0xcd8d('0x5')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0xcd8d('0x5')],'defaultValue':''},'recording':{'type':Sequelize[_0xcd8d('0x6')](_0xcd8d('0x7')),'defaultValue':null},'flag':{'type':Sequelize['STRING'],'defaultValue':''},'msg_id':{'type':Sequelize['STRING'],'defaultValue':''},'stamp':{'type':_0xcd8d('0x8'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.controller.js b/server/api/voiceMailMessage/voiceMailMessage.controller.js
index 982d38f..b8d60aa 100644
--- a/server/api/voiceMailMessage/voiceMailMessage.controller.js
+++ b/server/api/voiceMailMessage/voiceMailMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb8eb=['ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','error','name','send','index','VoiceMailMessage','rawAttributes','model','differenceBy','query','keys','filters','intersection','attributes','fields','nolimit','order','sort','where','filter','type','VIRTUAL','field','merge','includeAll','include','findAll','catch','show','params','options','find','create','body','recording','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','msg_id','Content-Disposition','html-pdf','eml-format','zip-dir','request-promise','mustache','util','path','to-csv'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0xb8eb,0x1b4));var _0xbb8e=function(_0x13da4b,_0xe95f7b){_0x13da4b=_0x13da4b-0x0;var _0x3db622=_0xb8eb[_0x13da4b];return _0x3db622;};'use strict';var pdf=require(_0xbb8e('0x0'));var emlformat=require(_0xbb8e('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xbb8e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbb8e('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xbb8e('0x4'));var util=require(_0xbb8e('0x5'));var path=require(_0xbb8e('0x6'));var sox=require('sox');var csv=require(_0xbb8e('0x7'));var ejs=require(_0xbb8e('0x8'));var fs=require('fs');var _=require(_0xbb8e('0x9'));var squel=require(_0xbb8e('0xa'));var crypto=require(_0xbb8e('0xb'));var jsforce=require(_0xbb8e('0xc'));var deskjs=require(_0xbb8e('0xd'));var toCsv=require(_0xbb8e('0x7'));var querystring=require(_0xbb8e('0xe'));var Papa=require(_0xbb8e('0xf'));var Redis=require(_0xbb8e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xbb8e('0x11'));var hardwareService=require(_0xbb8e('0x12'));var logger=require(_0xbb8e('0x13'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xbb8e('0x14'))['db'];function respondWithStatusCode(_0x3c63fe,_0x2dc86){_0x2dc86=_0x2dc86||0xcc;return function(_0x49cdda){if(_0x49cdda){return _0x3c63fe[_0xbb8e('0x15')](_0x2dc86);}return _0x3c63fe[_0xbb8e('0x16')](_0x2dc86)[_0xbb8e('0x17')]();};}function respondWithResult(_0x4653bb,_0x3f7132){_0x3f7132=_0x3f7132||0xc8;return function(_0x2bdcf3){if(_0x2bdcf3){return _0x4653bb[_0xbb8e('0x16')](_0x3f7132)[_0xbb8e('0x18')](_0x2bdcf3);}};}function respondWithFilteredResult(_0x3f8497,_0x20da17){return function(_0x3ee59b){if(_0x3ee59b){var _0xc6b953=_0x3ee59b[_0xbb8e('0x19')],_0x339247=_0x20da17[_0xbb8e('0x1a')],_0x5c733c=_0x20da17['offset']+_0x20da17[_0xbb8e('0x1b')],_0x5bbc0c;if(_0x5c733c>=_0xc6b953){_0x5c733c=_0xc6b953;_0x5bbc0c=0xc8;}else{_0x5bbc0c=0xce;}_0x3f8497[_0xbb8e('0x16')](_0x5bbc0c);return _0x3f8497[_0xbb8e('0x1c')](_0xbb8e('0x1d'),_0x339247+'-'+_0x5c733c+'/'+_0xc6b953)['json'](_0x3ee59b);}return null;};}function patchUpdates(_0x5f22ae){return function(_0x464835){try{jsonpatch[_0xbb8e('0x1e')](_0x464835,_0x5f22ae,!![]);}catch(_0x49f7c2){return BPromise[_0xbb8e('0x1f')](_0x49f7c2);}return _0x464835['save']();};}function saveUpdates(_0x2504b3,_0x3722cd){return function(_0x1ff493){if(_0x1ff493){return _0x1ff493[_0xbb8e('0x20')](_0x2504b3)[_0xbb8e('0x21')](function(_0x48720f){return _0x48720f;});}return null;};}function removeEntity(_0x173cc1,_0x56566d){return function(_0x1a8d8a){if(_0x1a8d8a){return _0x1a8d8a[_0xbb8e('0x22')]()['then'](function(){_0x173cc1[_0xbb8e('0x16')](0xcc)[_0xbb8e('0x17')]();});}};}function handleEntityNotFound(_0x3f80e8,_0x5e14f9){return function(_0x443e54){if(!_0x443e54){_0x3f80e8[_0xbb8e('0x15')](0x194);}return _0x443e54;};}function handleError(_0x52fca9,_0x310483){_0x310483=_0x310483||0x1f4;return function(_0x109c3b){logger[_0xbb8e('0x23')](_0x109c3b['stack']);if(_0x109c3b[_0xbb8e('0x24')]){delete _0x109c3b['name'];}_0x52fca9[_0xbb8e('0x16')](_0x310483)[_0xbb8e('0x25')](_0x109c3b);};}exports[_0xbb8e('0x26')]=function(_0x383910,_0x3eafdf){var _0x5f5277={},_0x11a488={},_0x27411a={'count':0x0,'rows':[]};var _0x30134b=db[_0xbb8e('0x27')][_0xbb8e('0x28')];_0x11a488[_0xbb8e('0x29')]=_[_0xbb8e('0x2a')](_['keys'](_0x30134b),[_0xbb8e('0x24')]);_0x11a488[_0xbb8e('0x2b')]=_[_0xbb8e('0x2c')](_0x383910['query']);_0x11a488[_0xbb8e('0x2d')]=_[_0xbb8e('0x2e')](_0x11a488[_0xbb8e('0x29')],_0x11a488[_0xbb8e('0x2b')]);_0x5f5277[_0xbb8e('0x2f')]=_['intersection'](_0x11a488[_0xbb8e('0x29')],qs[_0xbb8e('0x30')](_0x383910[_0xbb8e('0x2b')][_0xbb8e('0x30')]));_0x5f5277['attributes']=_0x5f5277['attributes']['length']?_0x5f5277[_0xbb8e('0x2f')]:_0x11a488[_0xbb8e('0x29')];if(!_0x383910[_0xbb8e('0x2b')]['hasOwnProperty'](_0xbb8e('0x31'))){_0x5f5277[_0xbb8e('0x1b')]=qs[_0xbb8e('0x1b')](_0x383910['query'][_0xbb8e('0x1b')]);_0x5f5277[_0xbb8e('0x1a')]=qs['offset'](_0x383910['query'][_0xbb8e('0x1a')]);}_0x5f5277[_0xbb8e('0x32')]=qs[_0xbb8e('0x33')](_0x383910['query'][_0xbb8e('0x33')]);_0x5f5277[_0xbb8e('0x34')]=qs[_0xbb8e('0x2d')](_['pick'](_0x383910[_0xbb8e('0x2b')],_0x11a488[_0xbb8e('0x2d')]));if(_0x383910[_0xbb8e('0x2b')][_0xbb8e('0x35')]){_0x5f5277['where']=_['merge'](_0x5f5277['where'],{'$or':_['map'](_0x30134b,function(_0xb0284){if(_0xb0284[_0xbb8e('0x36')]['key']!==_0xbb8e('0x37')){var _0x522e3d={};_0x522e3d[_0xb0284[_0xbb8e('0x38')]]={'$like':'%'+_0x383910[_0xbb8e('0x2b')]['filter']+'%'};return _0x522e3d;}})});}_0x5f5277=_[_0xbb8e('0x39')]({},_0x5f5277,_0x383910['options']);var _0x1e5c38={'where':_0x5f5277[_0xbb8e('0x34')]};return db['VoiceMailMessage'][_0xbb8e('0x19')](_0x1e5c38)[_0xbb8e('0x21')](function(_0x2d2f70){_0x27411a['count']=_0x2d2f70;if(_0x383910[_0xbb8e('0x2b')][_0xbb8e('0x3a')]){_0x5f5277[_0xbb8e('0x3b')]=[{'all':!![]}];}return db[_0xbb8e('0x27')][_0xbb8e('0x3c')](_0x5f5277);})[_0xbb8e('0x21')](function(_0x108321){_0x27411a['rows']=_0x108321;return _0x27411a;})[_0xbb8e('0x21')](respondWithFilteredResult(_0x3eafdf,_0x5f5277))[_0xbb8e('0x3d')](handleError(_0x3eafdf,null));};exports[_0xbb8e('0x3e')]=function(_0x155e56,_0x2332f2){var _0x85db74={'raw':!![],'where':{'id':_0x155e56[_0xbb8e('0x3f')]['id']}},_0x227a57={};_0x227a57[_0xbb8e('0x29')]=_[_0xbb8e('0x2c')](db[_0xbb8e('0x27')][_0xbb8e('0x28')]);_0x227a57['query']=_[_0xbb8e('0x2c')](_0x155e56[_0xbb8e('0x2b')]);_0x227a57[_0xbb8e('0x2d')]=_['intersection'](_0x227a57[_0xbb8e('0x29')],_0x227a57[_0xbb8e('0x2b')]);_0x85db74[_0xbb8e('0x2f')]=_[_0xbb8e('0x2e')](_0x227a57[_0xbb8e('0x29')],qs[_0xbb8e('0x30')](_0x155e56['query'][_0xbb8e('0x30')]));_0x85db74[_0xbb8e('0x2f')]=_0x85db74['attributes']['length']?_0x85db74[_0xbb8e('0x2f')]:_0x227a57[_0xbb8e('0x29')];if(_0x155e56[_0xbb8e('0x2b')][_0xbb8e('0x3a')]){_0x85db74['include']=[{'all':!![]}];}_0x85db74=_[_0xbb8e('0x39')]({},_0x85db74,_0x155e56[_0xbb8e('0x40')]);return db[_0xbb8e('0x27')][_0xbb8e('0x41')](_0x85db74)[_0xbb8e('0x21')](handleEntityNotFound(_0x2332f2,null))[_0xbb8e('0x21')](respondWithResult(_0x2332f2,null))[_0xbb8e('0x3d')](handleError(_0x2332f2,null));};exports[_0xbb8e('0x42')]=function(_0x30dcf7,_0x4b0d65){return db['VoiceMailMessage']['create'](_0x30dcf7[_0xbb8e('0x43')],{})[_0xbb8e('0x21')](respondWithResult(_0x4b0d65,0xc9))[_0xbb8e('0x3d')](handleError(_0x4b0d65,null));};exports[_0xbb8e('0x20')]=function(_0x173982,_0x284610){if(_0x173982[_0xbb8e('0x43')]['id']){delete _0x173982[_0xbb8e('0x43')]['id'];}return db[_0xbb8e('0x27')]['find']({'where':{'id':_0x173982[_0xbb8e('0x3f')]['id']}})[_0xbb8e('0x21')](handleEntityNotFound(_0x284610,null))[_0xbb8e('0x21')](saveUpdates(_0x173982[_0xbb8e('0x43')],null))[_0xbb8e('0x21')](respondWithResult(_0x284610,null))[_0xbb8e('0x3d')](handleError(_0x284610,null));};exports['destroy']=function(_0x443d47,_0x3f102c){return db[_0xbb8e('0x27')]['find']({'where':{'id':_0x443d47[_0xbb8e('0x3f')]['id']}})[_0xbb8e('0x21')](handleEntityNotFound(_0x3f102c,null))[_0xbb8e('0x21')](removeEntity(_0x3f102c,null))[_0xbb8e('0x3d')](handleError(_0x3f102c,null));};exports['download']=function(_0xfe7209,_0x1def39,_0x788ede){return db['VoiceMailMessage'][_0xbb8e('0x41')]({'where':{'id':_0xfe7209[_0xbb8e('0x3f')]['id']},'attributes':['id','recording','msg_id']})[_0xbb8e('0x21')](handleEntityNotFound(_0x1def39,null))[_0xbb8e('0x21')](function(_0x2826ef){if(_0x2826ef){if(!_0x2826ef[_0xbb8e('0x44')]){throw new db[(_0xbb8e('0x45'))][(_0xbb8e('0x46'))](_0xbb8e('0x47'));}var _0x3b1d13={'Content-Type':'audio/wav','Content-Disposition':'attachment'};if(_0x2826ef[_0xbb8e('0x48')]){_0x3b1d13[_0xbb8e('0x49')]='attachment;\x20filename=\x22'+_0x2826ef[_0xbb8e('0x48')]+'.wav\x22';}_0x1def39[_0xbb8e('0x1c')](_0x3b1d13);return _0x1def39[_0xbb8e('0x25')](new Buffer(_0x2826ef[_0xbb8e('0x44')]));}})['catch'](handleError(_0x1def39,null));};
\ No newline at end of file
+var _0x9211=['crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','VoiceMailMessage','rawAttributes','model','differenceBy','keys','query','filters','intersection','attributes','fields','hasOwnProperty','limit','sort','where','merge','map','type','key','field','options','includeAll','include','findAll','catch','show','params','length','find','create','body','download','recording','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','msg_id','Content-Disposition','.wav\x22','html-pdf','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','sox','lodash'];(function(_0x39092c,_0x167f0c){var _0x7e47a=function(_0x17f710){while(--_0x17f710){_0x39092c['push'](_0x39092c['shift']());}};_0x7e47a(++_0x167f0c);}(_0x9211,0x99));var _0x1921=function(_0x9dca4c,_0xc09e49){_0x9dca4c=_0x9dca4c-0x0;var _0x4c8506=_0x9211[_0x9dca4c];return _0x4c8506;};'use strict';var pdf=require(_0x1921('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x1921('0x1'));var zipdir=require(_0x1921('0x2'));var jsonpatch=require(_0x1921('0x3'));var rp=require('request-promise');var moment=require(_0x1921('0x4'));var BPromise=require(_0x1921('0x5'));var Mustache=require('mustache');var util=require(_0x1921('0x6'));var path=require('path');var sox=require(_0x1921('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x1921('0x8'));var squel=require('squel');var crypto=require(_0x1921('0x9'));var jsforce=require(_0x1921('0xa'));var deskjs=require(_0x1921('0xb'));var toCsv=require(_0x1921('0xc'));var querystring=require(_0x1921('0xd'));var Papa=require(_0x1921('0xe'));var Redis=require('ioredis');var authService=require(_0x1921('0xf'));var qs=require(_0x1921('0x10'));var hardwareService=require(_0x1921('0x11'));var logger=require(_0x1921('0x12'))(_0x1921('0x13'));var utils=require(_0x1921('0x14'));var config=require(_0x1921('0x15'));var db=require(_0x1921('0x16'))['db'];function respondWithStatusCode(_0x5132c2,_0x3f92fc){_0x3f92fc=_0x3f92fc||0xcc;return function(_0x129914){if(_0x129914){return _0x5132c2[_0x1921('0x17')](_0x3f92fc);}return _0x5132c2[_0x1921('0x18')](_0x3f92fc)[_0x1921('0x19')]();};}function respondWithResult(_0x433114,_0x3f4f66){_0x3f4f66=_0x3f4f66||0xc8;return function(_0x2cbae0){if(_0x2cbae0){return _0x433114[_0x1921('0x18')](_0x3f4f66)[_0x1921('0x1a')](_0x2cbae0);}};}function respondWithFilteredResult(_0x85e0eb,_0x26799c){return function(_0xa67869){if(_0xa67869){var _0x1b4f11=_0xa67869[_0x1921('0x1b')],_0x44133d=_0x26799c[_0x1921('0x1c')],_0x20df9e=_0x26799c[_0x1921('0x1c')]+_0x26799c['limit'],_0x45a455;if(_0x20df9e>=_0x1b4f11){_0x20df9e=_0x1b4f11;_0x45a455=0xc8;}else{_0x45a455=0xce;}_0x85e0eb[_0x1921('0x18')](_0x45a455);return _0x85e0eb[_0x1921('0x1d')](_0x1921('0x1e'),_0x44133d+'-'+_0x20df9e+'/'+_0x1b4f11)[_0x1921('0x1a')](_0xa67869);}return null;};}function patchUpdates(_0x2bcfb2){return function(_0x298a92){try{jsonpatch[_0x1921('0x1f')](_0x298a92,_0x2bcfb2,!![]);}catch(_0x4c5856){return BPromise[_0x1921('0x20')](_0x4c5856);}return _0x298a92[_0x1921('0x21')]();};}function saveUpdates(_0x14ef24,_0x55e6b0){return function(_0x5e3474){if(_0x5e3474){return _0x5e3474[_0x1921('0x22')](_0x14ef24)[_0x1921('0x23')](function(_0x3f0017){return _0x3f0017;});}return null;};}function removeEntity(_0x59ff1d,_0x20b9fa){return function(_0x48f000){if(_0x48f000){return _0x48f000[_0x1921('0x24')]()[_0x1921('0x23')](function(){_0x59ff1d[_0x1921('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2db363,_0x80a3d1){return function(_0x3ecbac){if(!_0x3ecbac){_0x2db363[_0x1921('0x17')](0x194);}return _0x3ecbac;};}function handleError(_0x43817e,_0x2f7d4a){_0x2f7d4a=_0x2f7d4a||0x1f4;return function(_0x51bf4a){logger[_0x1921('0x25')](_0x51bf4a['stack']);if(_0x51bf4a[_0x1921('0x26')]){delete _0x51bf4a['name'];}_0x43817e[_0x1921('0x18')](_0x2f7d4a)[_0x1921('0x27')](_0x51bf4a);};}exports[_0x1921('0x28')]=function(_0x1f68d1,_0xa45ca8){var _0x3b9a93={},_0x543e54={},_0x14174a={'count':0x0,'rows':[]};var _0x11e27a=db[_0x1921('0x29')][_0x1921('0x2a')];_0x543e54[_0x1921('0x2b')]=_[_0x1921('0x2c')](_[_0x1921('0x2d')](_0x11e27a),[_0x1921('0x26')]);_0x543e54['query']=_[_0x1921('0x2d')](_0x1f68d1[_0x1921('0x2e')]);_0x543e54[_0x1921('0x2f')]=_[_0x1921('0x30')](_0x543e54[_0x1921('0x2b')],_0x543e54[_0x1921('0x2e')]);_0x3b9a93[_0x1921('0x31')]=_['intersection'](_0x543e54[_0x1921('0x2b')],qs[_0x1921('0x32')](_0x1f68d1[_0x1921('0x2e')][_0x1921('0x32')]));_0x3b9a93[_0x1921('0x31')]=_0x3b9a93[_0x1921('0x31')]['length']?_0x3b9a93[_0x1921('0x31')]:_0x543e54[_0x1921('0x2b')];if(!_0x1f68d1['query'][_0x1921('0x33')]('nolimit')){_0x3b9a93[_0x1921('0x34')]=qs['limit'](_0x1f68d1['query'][_0x1921('0x34')]);_0x3b9a93['offset']=qs['offset'](_0x1f68d1[_0x1921('0x2e')]['offset']);}_0x3b9a93['order']=qs['sort'](_0x1f68d1[_0x1921('0x2e')][_0x1921('0x35')]);_0x3b9a93[_0x1921('0x36')]=qs[_0x1921('0x2f')](_['pick'](_0x1f68d1[_0x1921('0x2e')],_0x543e54[_0x1921('0x2f')]));if(_0x1f68d1[_0x1921('0x2e')]['filter']){_0x3b9a93[_0x1921('0x36')]=_[_0x1921('0x37')](_0x3b9a93[_0x1921('0x36')],{'$or':_[_0x1921('0x38')](_0x11e27a,function(_0x3cfc78){if(_0x3cfc78[_0x1921('0x39')][_0x1921('0x3a')]!=='VIRTUAL'){var _0x3adb97={};_0x3adb97[_0x3cfc78[_0x1921('0x3b')]]={'$like':'%'+_0x1f68d1[_0x1921('0x2e')]['filter']+'%'};return _0x3adb97;}})});}_0x3b9a93=_[_0x1921('0x37')]({},_0x3b9a93,_0x1f68d1[_0x1921('0x3c')]);var _0x308506={'where':_0x3b9a93[_0x1921('0x36')]};return db[_0x1921('0x29')][_0x1921('0x1b')](_0x308506)['then'](function(_0x39154e){_0x14174a[_0x1921('0x1b')]=_0x39154e;if(_0x1f68d1[_0x1921('0x2e')][_0x1921('0x3d')]){_0x3b9a93[_0x1921('0x3e')]=[{'all':!![]}];}return db[_0x1921('0x29')][_0x1921('0x3f')](_0x3b9a93);})[_0x1921('0x23')](function(_0x2672a7){_0x14174a['rows']=_0x2672a7;return _0x14174a;})[_0x1921('0x23')](respondWithFilteredResult(_0xa45ca8,_0x3b9a93))[_0x1921('0x40')](handleError(_0xa45ca8,null));};exports[_0x1921('0x41')]=function(_0x3d3025,_0x496d5a){var _0x1f9005={'raw':!![],'where':{'id':_0x3d3025[_0x1921('0x42')]['id']}},_0x35dff1={};_0x35dff1[_0x1921('0x2b')]=_[_0x1921('0x2d')](db['VoiceMailMessage'][_0x1921('0x2a')]);_0x35dff1[_0x1921('0x2e')]=_[_0x1921('0x2d')](_0x3d3025[_0x1921('0x2e')]);_0x35dff1[_0x1921('0x2f')]=_[_0x1921('0x30')](_0x35dff1[_0x1921('0x2b')],_0x35dff1[_0x1921('0x2e')]);_0x1f9005['attributes']=_['intersection'](_0x35dff1['model'],qs['fields'](_0x3d3025[_0x1921('0x2e')][_0x1921('0x32')]));_0x1f9005[_0x1921('0x31')]=_0x1f9005[_0x1921('0x31')][_0x1921('0x43')]?_0x1f9005[_0x1921('0x31')]:_0x35dff1[_0x1921('0x2b')];if(_0x3d3025[_0x1921('0x2e')][_0x1921('0x3d')]){_0x1f9005[_0x1921('0x3e')]=[{'all':!![]}];}_0x1f9005=_['merge']({},_0x1f9005,_0x3d3025[_0x1921('0x3c')]);return db[_0x1921('0x29')][_0x1921('0x44')](_0x1f9005)['then'](handleEntityNotFound(_0x496d5a,null))[_0x1921('0x23')](respondWithResult(_0x496d5a,null))[_0x1921('0x40')](handleError(_0x496d5a,null));};exports['create']=function(_0x557289,_0x196ea5){return db[_0x1921('0x29')][_0x1921('0x45')](_0x557289[_0x1921('0x46')],{})[_0x1921('0x23')](respondWithResult(_0x196ea5,0xc9))[_0x1921('0x40')](handleError(_0x196ea5,null));};exports['update']=function(_0x2f84c7,_0x2677cf){if(_0x2f84c7[_0x1921('0x46')]['id']){delete _0x2f84c7[_0x1921('0x46')]['id'];}return db[_0x1921('0x29')][_0x1921('0x44')]({'where':{'id':_0x2f84c7[_0x1921('0x42')]['id']}})[_0x1921('0x23')](handleEntityNotFound(_0x2677cf,null))[_0x1921('0x23')](saveUpdates(_0x2f84c7[_0x1921('0x46')],null))[_0x1921('0x23')](respondWithResult(_0x2677cf,null))[_0x1921('0x40')](handleError(_0x2677cf,null));};exports[_0x1921('0x24')]=function(_0x5b9154,_0x450f2f){return db[_0x1921('0x29')][_0x1921('0x44')]({'where':{'id':_0x5b9154[_0x1921('0x42')]['id']}})[_0x1921('0x23')](handleEntityNotFound(_0x450f2f,null))[_0x1921('0x23')](removeEntity(_0x450f2f,null))[_0x1921('0x40')](handleError(_0x450f2f,null));};exports[_0x1921('0x47')]=function(_0x4d5695,_0x7d98bc,_0x3b7648){return db[_0x1921('0x29')][_0x1921('0x44')]({'where':{'id':_0x4d5695[_0x1921('0x42')]['id']},'attributes':['id',_0x1921('0x48'),'msg_id']})[_0x1921('0x23')](handleEntityNotFound(_0x7d98bc,null))['then'](function(_0x25d350){if(_0x25d350){if(!_0x25d350[_0x1921('0x48')]){throw new db[(_0x1921('0x49'))][(_0x1921('0x4a'))](_0x1921('0x4b'));}var _0x17c9b7={'Content-Type':_0x1921('0x4c'),'Content-Disposition':_0x1921('0x4d')};if(_0x25d350[_0x1921('0x4e')]){_0x17c9b7[_0x1921('0x4f')]='attachment;\x20filename=\x22'+_0x25d350[_0x1921('0x4e')]+_0x1921('0x50');}_0x7d98bc[_0x1921('0x1d')](_0x17c9b7);return _0x7d98bc['send'](new Buffer(_0x25d350[_0x1921('0x48')]));}})['catch'](handleError(_0x7d98bc,null));};
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.model.js b/server/api/voiceMailMessage/voiceMailMessage.model.js
index 8e633a0..354dd6c 100644
--- a/server/api/voiceMailMessage/voiceMailMessage.model.js
+++ b/server/api/voiceMailMessage/voiceMailMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x529e=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./voiceMailMessage.attributes','exports','define','VoiceMailMessage','voice_voicemail_messages','dir','lodash'];(function(_0x3827ee,_0x337d5e){var _0x5b22d3=function(_0x28095f){while(--_0x28095f){_0x3827ee['push'](_0x3827ee['shift']());}};_0x5b22d3(++_0x337d5e);}(_0x529e,0xfb));var _0xe529=function(_0x12b73b,_0x1c8786){_0x12b73b=_0x12b73b-0x0;var _0x1c9cb6=_0x529e[_0x12b73b];return _0x1c9cb6;};'use strict';var _=require(_0xe529('0x0'));var util=require('util');var logger=require(_0xe529('0x1'))(_0xe529('0x2'));var moment=require(_0xe529('0x3'));var BPromise=require(_0xe529('0x4'));var rp=require(_0xe529('0x5'));var fs=require('fs');var path=require(_0xe529('0x6'));var rimraf=require(_0xe529('0x7'));var config=require('../../config/environment');var attributes=require(_0xe529('0x8'));module[_0xe529('0x9')]=function(_0x2f1792,_0x4768dc){return _0x2f1792[_0xe529('0xa')](_0xe529('0xb'),attributes,{'tableName':_0xe529('0xc'),'paranoid':![],'indexes':[{'name':_0xe529('0xd'),'fields':[_0xe529('0xd')]}],'timestamps':![]});};
\ No newline at end of file
+var _0xe87e=['request-promise','path','../../config/environment','define','VoiceMailMessage','voice_voicemail_messages','dir','lodash','util','moment','bluebird'];(function(_0x3eef0f,_0x380369){var _0x4e8a69=function(_0x461335){while(--_0x461335){_0x3eef0f['push'](_0x3eef0f['shift']());}};_0x4e8a69(++_0x380369);}(_0xe87e,0x125));var _0xee87=function(_0x9dfc10,_0x19c2d5){_0x9dfc10=_0x9dfc10-0x0;var _0x4f938a=_0xe87e[_0x9dfc10];return _0x4f938a;};'use strict';var _=require(_0xee87('0x0'));var util=require(_0xee87('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xee87('0x2'));var BPromise=require(_0xee87('0x3'));var rp=require(_0xee87('0x4'));var fs=require('fs');var path=require(_0xee87('0x5'));var rimraf=require('rimraf');var config=require(_0xee87('0x6'));var attributes=require('./voiceMailMessage.attributes');module['exports']=function(_0x4f286d,_0x3e4b41){return _0x4f286d[_0xee87('0x7')](_0xee87('0x8'),attributes,{'tableName':_0xee87('0x9'),'paranoid':![],'indexes':[{'name':_0xee87('0xa'),'fields':[_0xee87('0xa')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.rpc.js b/server/api/voiceMailMessage/voiceMailMessage.rpc.js
index b743f4b..c64b028 100644
--- a/server/api/voiceMailMessage/voiceMailMessage.rpc.js
+++ b/server/api/voiceMailMessage/voiceMailMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8feb=['rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceMailMessage,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x1acb55,_0x1aa606){var _0x4dcfa7=function(_0x2311d3){while(--_0x2311d3){_0x1acb55['push'](_0x1acb55['shift']());}};_0x4dcfa7(++_0x1aa606);}(_0x8feb,0x179));var _0xb8fe=function(_0x31abbb,_0x446cf0){_0x31abbb=_0x31abbb-0x0;var _0x1ba919=_0x8feb[_0x31abbb];return _0x1ba919;};'use strict';var _=require(_0xb8fe('0x0'));var util=require(_0xb8fe('0x1'));var moment=require('moment');var BPromise=require(_0xb8fe('0x2'));var rs=require(_0xb8fe('0x3'));var fs=require('fs');var Redis=require(_0xb8fe('0x4'));var db=require(_0xb8fe('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb8fe('0x6'))(_0xb8fe('0x7'));var config=require(_0xb8fe('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xb8fe('0x9')][_0xb8fe('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2fd018,_0x3202fa,_0x49aa6b){return new BPromise(function(_0x200a62,_0x2275d1){return client[_0xb8fe('0xb')](_0x2fd018,_0x49aa6b)[_0xb8fe('0xc')](function(_0x67849){logger[_0xb8fe('0xd')]('VoiceMailMessage,\x20%s,\x20%s',_0x3202fa,_0xb8fe('0xe'));logger[_0xb8fe('0xf')](_0xb8fe('0x10'),_0x3202fa,_0xb8fe('0xe'),JSON[_0xb8fe('0x11')](_0x67849));if(_0x67849[_0xb8fe('0x12')]){if(_0x67849[_0xb8fe('0x12')][_0xb8fe('0x13')]===0x1f4){logger[_0xb8fe('0x12')](_0xb8fe('0x14'),_0x3202fa,_0x67849[_0xb8fe('0x12')][_0xb8fe('0x15')]);return _0x2275d1(_0x67849[_0xb8fe('0x12')][_0xb8fe('0x15')]);}logger['error'](_0xb8fe('0x14'),_0x3202fa,_0x67849[_0xb8fe('0x12')][_0xb8fe('0x15')]);return _0x200a62(_0x67849['error']['message']);}else{logger['info'](_0xb8fe('0x14'),_0x3202fa,_0xb8fe('0xe'));_0x200a62(_0x67849[_0xb8fe('0x16')][_0xb8fe('0x15')]);}})[_0xb8fe('0x17')](function(_0x133c11){logger['error'](_0xb8fe('0x14'),_0x3202fa,_0x133c11);_0x2275d1(_0x133c11);});});}
\ No newline at end of file
+var _0x0a90=['randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','VoiceMailMessage,\x20%s,\x20%s','request\x20sent','VoiceMailMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','util','moment'];(function(_0x589f71,_0x212326){var _0x5763bd=function(_0x2cb8e1){while(--_0x2cb8e1){_0x589f71['push'](_0x589f71['shift']());}};_0x5763bd(++_0x212326);}(_0x0a90,0x185));var _0x00a9=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0x0a90[_0x82129b];return _0x2ae5dc;};'use strict';var _=require('lodash');var util=require(_0x00a9('0x0'));var moment=require(_0x00a9('0x1'));var BPromise=require('bluebird');var rs=require(_0x00a9('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x00a9('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x00a9('0x4'))(_0x00a9('0x5'));var config=require(_0x00a9('0x6'));var jayson=require(_0x00a9('0x7'));var client=jayson['client'][_0x00a9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x824ed,_0x32cd77,_0x18ade3){return new BPromise(function(_0x50df9d,_0x4085df){return client['request'](_0x824ed,_0x18ade3)['then'](function(_0x110f5b){logger[_0x00a9('0x9')](_0x00a9('0xa'),_0x32cd77,_0x00a9('0xb'));logger['debug'](_0x00a9('0xc'),_0x32cd77,_0x00a9('0xb'),JSON[_0x00a9('0xd')](_0x110f5b));if(_0x110f5b[_0x00a9('0xe')]){if(_0x110f5b[_0x00a9('0xe')]['code']===0x1f4){logger[_0x00a9('0xe')](_0x00a9('0xa'),_0x32cd77,_0x110f5b['error'][_0x00a9('0xf')]);return _0x4085df(_0x110f5b[_0x00a9('0xe')][_0x00a9('0xf')]);}logger[_0x00a9('0xe')](_0x00a9('0xa'),_0x32cd77,_0x110f5b[_0x00a9('0xe')][_0x00a9('0xf')]);return _0x50df9d(_0x110f5b[_0x00a9('0xe')][_0x00a9('0xf')]);}else{logger[_0x00a9('0x9')](_0x00a9('0xa'),_0x32cd77,_0x00a9('0xb'));_0x50df9d(_0x110f5b[_0x00a9('0x10')]['message']);}})['catch'](function(_0x2b1bb1){logger['error'](_0x00a9('0xa'),_0x32cd77,_0x2b1bb1);_0x4085df(_0x2b1bb1);});});}
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/index.js b/server/api/voiceMusicOnHold/index.js
index ec32687..98fd902 100644
--- a/server/api/voiceMusicOnHold/index.js
+++ b/server/api/voiceMusicOnHold/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb821=['./voiceMusicOnHold.controller','get','isAuthenticated','/:id','show','/:id/sounds','getSounds','post','create','addSound','put','delete','destroy','/:id/sounds/:id2','exports','util','path','Router','../../config/environment'];(function(_0x43f31a,_0x279869){var _0x17775c=function(_0xa27dbe){while(--_0xa27dbe){_0x43f31a['push'](_0x43f31a['shift']());}};_0x17775c(++_0x279869);}(_0xb821,0xa7));var _0x1b82=function(_0x1508ec,_0x3db05e){_0x1508ec=_0x1508ec-0x0;var _0x1bd8e3=_0xb821[_0x1508ec];return _0x1bd8e3;};'use strict';var multer=require('multer');var util=require(_0x1b82('0x0'));var path=require(_0x1b82('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x1b82('0x2')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x1b82('0x3'));var controller=require(_0x1b82('0x4'));router[_0x1b82('0x5')]('/',auth[_0x1b82('0x6')](),controller['index']);router[_0x1b82('0x5')](_0x1b82('0x7'),auth[_0x1b82('0x6')](),controller[_0x1b82('0x8')]);router[_0x1b82('0x5')](_0x1b82('0x9'),auth[_0x1b82('0x6')](),controller[_0x1b82('0xa')]);router[_0x1b82('0xb')]('/',auth['isAuthenticated'](),controller[_0x1b82('0xc')]);router[_0x1b82('0xb')](_0x1b82('0x9'),auth[_0x1b82('0x6')](),controller[_0x1b82('0xd')]);router[_0x1b82('0xe')](_0x1b82('0x7'),auth[_0x1b82('0x6')](),controller['update']);router[_0x1b82('0xf')](_0x1b82('0x7'),auth[_0x1b82('0x6')](),controller[_0x1b82('0x10')]);router['delete'](_0x1b82('0x11'),auth['isAuthenticated'](),controller['removeSound']);module[_0x1b82('0x12')]=router;
\ No newline at end of file
+var _0x22fb=['/:id/sounds/:id2','removeSound','exports','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/sounds','getSounds','post','create','addSound','update','destroy','delete'];(function(_0x29b778,_0x620b7b){var _0x561839=function(_0xcfd0e7){while(--_0xcfd0e7){_0x29b778['push'](_0x29b778['shift']());}};_0x561839(++_0x620b7b);}(_0x22fb,0x192));var _0xb22f=function(_0xc3d96,_0x3bb1a4){_0xc3d96=_0xc3d96-0x0;var _0x1a382e=_0x22fb[_0xc3d96];return _0x1a382e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xb22f('0x0'));var timeout=require('connect-timeout');var express=require(_0xb22f('0x1'));var router=express[_0xb22f('0x2')]();var auth=require(_0xb22f('0x3'));var interaction=require(_0xb22f('0x4'));var config=require(_0xb22f('0x5'));var controller=require('./voiceMusicOnHold.controller');router[_0xb22f('0x6')]('/',auth[_0xb22f('0x7')](),controller[_0xb22f('0x8')]);router[_0xb22f('0x6')](_0xb22f('0x9'),auth[_0xb22f('0x7')](),controller['show']);router[_0xb22f('0x6')](_0xb22f('0xa'),auth[_0xb22f('0x7')](),controller[_0xb22f('0xb')]);router[_0xb22f('0xc')]('/',auth[_0xb22f('0x7')](),controller[_0xb22f('0xd')]);router[_0xb22f('0xc')](_0xb22f('0xa'),auth[_0xb22f('0x7')](),controller[_0xb22f('0xe')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xb22f('0xf')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xb22f('0x10')]);router[_0xb22f('0x11')](_0xb22f('0x12'),auth[_0xb22f('0x7')](),controller[_0xb22f('0x13')]);module[_0xb22f('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js
index 2b8e6ab..876bc75 100644
--- a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js
+++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b9a=['mp3nb','quietmp3','alpha','TIMESTAMP','sequelize','exports','STRING','name','ENUM','custom','files'];(function(_0x53cc5d,_0x322901){var _0x5e3968=function(_0x700f99){while(--_0x700f99){_0x53cc5d['push'](_0x53cc5d['shift']());}};_0x5e3968(++_0x322901);}(_0x2b9a,0x164));var _0xa2b9=function(_0x59e225,_0x190985){_0x59e225=_0x59e225-0x0;var _0x5dc34b=_0x2b9a[_0x59e225];return _0x5dc34b;};'use strict';var Sequelize=require(_0xa2b9('0x0'));module[_0xa2b9('0x1')]={'name':{'type':Sequelize[_0xa2b9('0x2')],'allowNull':![],'unique':_0xa2b9('0x3')},'mode':{'type':Sequelize[_0xa2b9('0x4')](_0xa2b9('0x5'),_0xa2b9('0x6'),_0xa2b9('0x7'),'quietmp3nb',_0xa2b9('0x8'),'mp3'),'allowNull':!![],'defaultValue':'files'},'directory':{'type':Sequelize['STRING'],'allowNull':!![]},'application':{'type':Sequelize[_0xa2b9('0x2')],'allowNull':!![]},'digit':{'type':Sequelize[_0xa2b9('0x2')],'allowNull':!![]},'sort':{'type':Sequelize[_0xa2b9('0x2')],'allowNull':!![],'defaultValue':_0xa2b9('0x9')},'format':{'type':Sequelize[_0xa2b9('0x2')],'allowNull':!![]},'stamp':{'type':_0xa2b9('0xa')},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xfea6=['alpha','TIMESTAMP','BOOLEAN','exports','STRING','name','custom','files','quietmp3nb','quietmp3','mp3'];(function(_0x3635ce,_0x33a6f9){var _0x97ecd0=function(_0x123d98){while(--_0x123d98){_0x3635ce['push'](_0x3635ce['shift']());}};_0x97ecd0(++_0x33a6f9);}(_0xfea6,0x16e));var _0x6fea=function(_0x121c8e,_0x5334ae){_0x121c8e=_0x121c8e-0x0;var _0x31fe1f=_0xfea6[_0x121c8e];return _0x31fe1f;};'use strict';var Sequelize=require('sequelize');module[_0x6fea('0x0')]={'name':{'type':Sequelize[_0x6fea('0x1')],'allowNull':![],'unique':_0x6fea('0x2')},'mode':{'type':Sequelize['ENUM'](_0x6fea('0x3'),_0x6fea('0x4'),'mp3nb',_0x6fea('0x5'),_0x6fea('0x6'),_0x6fea('0x7')),'allowNull':!![],'defaultValue':_0x6fea('0x4')},'directory':{'type':Sequelize['STRING'],'allowNull':!![]},'application':{'type':Sequelize[_0x6fea('0x1')],'allowNull':!![]},'digit':{'type':Sequelize[_0x6fea('0x1')],'allowNull':!![]},'sort':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x6fea('0x8')},'format':{'type':Sequelize[_0x6fea('0x1')],'allowNull':!![]},'stamp':{'type':_0x6fea('0x9')},'defaultEntry':{'type':Sequelize[_0x6fea('0xa')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js
index ff542e8..9d05707 100644
--- a/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js
+++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x330c=['mode','files','directory','root','server/files/moh','mkdirSync','0777','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','transaction','readdirSync','forEach','unlinkSync','join','rmdirSync','Sequelize','message','addSound','findOne','createdAt','server/files/sounds/converted','save_name','converted_format','format','symlinkSync','removeSound','id2','Sound','%s.%s','ValidationError','getSounds','sort','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','end','status','json','count','offset','limit','set','Content-Range','apply','reject','save','then','destroy','get','MusicOnHolds','UserProfileResource','sendStatus','stack','name','send','index','VoiceMusicOnHold','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick','filter','merge','map','key','VIRTUAL','includeAll','include','findAll','catch','show','params','options','body','find','create','sequelize'];(function(_0x2a80a8,_0x4fddd1){var _0x510a66=function(_0x45e84c){while(--_0x45e84c){_0x2a80a8['push'](_0x2a80a8['shift']());}};_0x510a66(++_0x4fddd1);}(_0x330c,0x177));var _0xc330=function(_0x182da3,_0x398a19){_0x182da3=_0x182da3-0x0;var _0x56e36e=_0x330c[_0x182da3];return _0x56e36e;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc330('0x0'));var rimraf=require(_0xc330('0x1'));var zipdir=require(_0xc330('0x2'));var jsonpatch=require(_0xc330('0x3'));var rp=require(_0xc330('0x4'));var moment=require('moment');var BPromise=require(_0xc330('0x5'));var Mustache=require(_0xc330('0x6'));var util=require(_0xc330('0x7'));var path=require(_0xc330('0x8'));var sox=require(_0xc330('0x9'));var csv=require(_0xc330('0xa'));var ejs=require(_0xc330('0xb'));var fs=require('fs');var _=require(_0xc330('0xc'));var squel=require(_0xc330('0xd'));var crypto=require(_0xc330('0xe'));var jsforce=require(_0xc330('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xc330('0x10'));var Papa=require(_0xc330('0x11'));var Redis=require(_0xc330('0x12'));var authService=require(_0xc330('0x13'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0xc330('0x14'));var logger=require(_0xc330('0x15'))(_0xc330('0x16'));var utils=require(_0xc330('0x17'));var config=require(_0xc330('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5099fc,_0x425e9b){_0x425e9b=_0x425e9b||0xcc;return function(_0x3d3c98){if(_0x3d3c98){return _0x5099fc['sendStatus'](_0x425e9b);}return _0x5099fc['status'](_0x425e9b)[_0xc330('0x19')]();};}function respondWithResult(_0x27ad42,_0x557316){_0x557316=_0x557316||0xc8;return function(_0x103fb4){if(_0x103fb4){return _0x27ad42[_0xc330('0x1a')](_0x557316)[_0xc330('0x1b')](_0x103fb4);}};}function respondWithFilteredResult(_0x3d492b,_0x11d1c0){return function(_0x1dc49f){if(_0x1dc49f){var _0x5b1a32=_0x1dc49f[_0xc330('0x1c')],_0x17b486=_0x11d1c0[_0xc330('0x1d')],_0x344490=_0x11d1c0[_0xc330('0x1d')]+_0x11d1c0[_0xc330('0x1e')],_0x338b1f;if(_0x344490>=_0x5b1a32){_0x344490=_0x5b1a32;_0x338b1f=0xc8;}else{_0x338b1f=0xce;}_0x3d492b['status'](_0x338b1f);return _0x3d492b[_0xc330('0x1f')](_0xc330('0x20'),_0x17b486+'-'+_0x344490+'/'+_0x5b1a32)['json'](_0x1dc49f);}return null;};}function patchUpdates(_0x27e91e){return function(_0x40e444){try{jsonpatch[_0xc330('0x21')](_0x40e444,_0x27e91e,!![]);}catch(_0x4acc94){return BPromise[_0xc330('0x22')](_0x4acc94);}return _0x40e444[_0xc330('0x23')]();};}function saveUpdates(_0x478629,_0x541a61){return function(_0x235689){if(_0x235689){return _0x235689['update'](_0x478629)[_0xc330('0x24')](function(_0x7d7eaa){return _0x7d7eaa;});}return null;};}function removeEntity(_0x196f99,_0x34544b){return function(_0x4ac035){if(_0x4ac035){return _0x4ac035[_0xc330('0x25')]()[_0xc330('0x24')](function(){var _0x252203=_0x4ac035[_0xc330('0x26')]({'plain':!![]});var _0x39a6d6=_0xc330('0x27');return db[_0xc330('0x28')]['destroy']({'where':{'type':_0x39a6d6,'resourceId':_0x252203['id']}})[_0xc330('0x24')](function(){return _0x4ac035;});})[_0xc330('0x24')](function(){_0x196f99[_0xc330('0x1a')](0xcc)[_0xc330('0x19')]();});}};}function handleEntityNotFound(_0x502353,_0x48cca6){return function(_0x49d5d7){if(!_0x49d5d7){_0x502353[_0xc330('0x29')](0x194);}return _0x49d5d7;};}function handleError(_0x2df2a5,_0x3a316){_0x3a316=_0x3a316||0x1f4;return function(_0x234bd8){logger['error'](_0x234bd8[_0xc330('0x2a')]);if(_0x234bd8[_0xc330('0x2b')]){delete _0x234bd8[_0xc330('0x2b')];}_0x2df2a5[_0xc330('0x1a')](_0x3a316)[_0xc330('0x2c')](_0x234bd8);};}exports[_0xc330('0x2d')]=function(_0xcc349f,_0x482bc7){var _0x52ed47={},_0x307aef={},_0x56325e={'count':0x0,'rows':[]};var _0x88e381=db[_0xc330('0x2e')][_0xc330('0x2f')];_0x307aef[_0xc330('0x30')]=_['keys'](_0x88e381);_0x307aef[_0xc330('0x31')]=_[_0xc330('0x32')](_0xcc349f[_0xc330('0x31')]);_0x307aef[_0xc330('0x33')]=_[_0xc330('0x34')](_0x307aef['model'],_0x307aef['query']);_0x52ed47[_0xc330('0x35')]=_[_0xc330('0x34')](_0x307aef[_0xc330('0x30')],qs['fields'](_0xcc349f['query'][_0xc330('0x36')]));_0x52ed47['attributes']=_0x52ed47['attributes'][_0xc330('0x37')]?_0x52ed47['attributes']:_0x307aef[_0xc330('0x30')];if(!_0xcc349f[_0xc330('0x31')][_0xc330('0x38')](_0xc330('0x39'))){_0x52ed47['limit']=qs[_0xc330('0x1e')](_0xcc349f['query'][_0xc330('0x1e')]);_0x52ed47['offset']=qs[_0xc330('0x1d')](_0xcc349f['query'][_0xc330('0x1d')]);}_0x52ed47[_0xc330('0x3a')]=qs['sort'](_0xcc349f[_0xc330('0x31')]['sort']);_0x52ed47[_0xc330('0x3b')]=qs[_0xc330('0x33')](_[_0xc330('0x3c')](_0xcc349f['query'],_0x307aef[_0xc330('0x33')]));if(_0xcc349f[_0xc330('0x31')][_0xc330('0x3d')]){_0x52ed47[_0xc330('0x3b')]=_[_0xc330('0x3e')](_0x52ed47['where'],{'$or':_[_0xc330('0x3f')](_0x88e381,function(_0x364928){if(_0x364928['type'][_0xc330('0x40')]!==_0xc330('0x41')){var _0x3cc458={};_0x3cc458[_0x364928['field']]={'$like':'%'+_0xcc349f[_0xc330('0x31')][_0xc330('0x3d')]+'%'};return _0x3cc458;}})});}_0x52ed47=_[_0xc330('0x3e')]({},_0x52ed47,_0xcc349f['options']);var _0x38b314={'where':_0x52ed47[_0xc330('0x3b')]};return db['VoiceMusicOnHold'][_0xc330('0x1c')](_0x38b314)['then'](function(_0x1bfd68){_0x56325e[_0xc330('0x1c')]=_0x1bfd68;if(_0xcc349f['query'][_0xc330('0x42')]){_0x52ed47[_0xc330('0x43')]=[{'all':!![]}];}return db[_0xc330('0x2e')][_0xc330('0x44')](_0x52ed47);})[_0xc330('0x24')](function(_0x5f0c20){_0x56325e['rows']=_0x5f0c20;return _0x56325e;})[_0xc330('0x24')](respondWithFilteredResult(_0x482bc7,_0x52ed47))[_0xc330('0x45')](handleError(_0x482bc7,null));};exports[_0xc330('0x46')]=function(_0xd6d69c,_0x2457d8){var _0x3b5b0d={'raw':![],'where':{'id':_0xd6d69c[_0xc330('0x47')]['id']}},_0x47c3b9={};_0x47c3b9['model']=_[_0xc330('0x32')](db[_0xc330('0x2e')][_0xc330('0x2f')]);_0x47c3b9['query']=_[_0xc330('0x32')](_0xd6d69c[_0xc330('0x31')]);_0x47c3b9['filters']=_[_0xc330('0x34')](_0x47c3b9[_0xc330('0x30')],_0x47c3b9[_0xc330('0x31')]);_0x3b5b0d[_0xc330('0x35')]=_['intersection'](_0x47c3b9['model'],qs[_0xc330('0x36')](_0xd6d69c['query']['fields']));_0x3b5b0d[_0xc330('0x35')]=_0x3b5b0d[_0xc330('0x35')][_0xc330('0x37')]?_0x3b5b0d[_0xc330('0x35')]:_0x47c3b9[_0xc330('0x30')];if(_0xd6d69c[_0xc330('0x31')][_0xc330('0x42')]){_0x3b5b0d[_0xc330('0x43')]=[{'all':!![]}];}_0x3b5b0d=_[_0xc330('0x3e')]({},_0x3b5b0d,_0xd6d69c[_0xc330('0x48')]);return db[_0xc330('0x2e')]['find'](_0x3b5b0d)[_0xc330('0x24')](handleEntityNotFound(_0x2457d8,null))[_0xc330('0x24')](respondWithResult(_0x2457d8,null))[_0xc330('0x45')](handleError(_0x2457d8,null));};exports['update']=function(_0x20ef75,_0x45dac3){if(_0x20ef75[_0xc330('0x49')]['id']){delete _0x20ef75[_0xc330('0x49')]['id'];}return db[_0xc330('0x2e')][_0xc330('0x4a')]({'where':{'id':_0x20ef75[_0xc330('0x47')]['id']}})[_0xc330('0x24')](handleEntityNotFound(_0x45dac3,null))['then'](saveUpdates(_0x20ef75[_0xc330('0x49')],null))[_0xc330('0x24')](respondWithResult(_0x45dac3,null))[_0xc330('0x45')](handleError(_0x45dac3,null));};exports[_0xc330('0x4b')]=function(_0x354340,_0x15bc58,_0x365931){return db[_0xc330('0x4c')]['transaction'](function(_0x52afad){if(_0x354340[_0xc330('0x49')][_0xc330('0x4d')]===_0xc330('0x4e')){_0x354340['body'][_0xc330('0x4f')]=path['join'](config[_0xc330('0x50')],_0xc330('0x51'),_0x354340[_0xc330('0x49')]['name']);}return db[_0xc330('0x2e')][_0xc330('0x4b')](_0x354340[_0xc330('0x49')],{'transaction':_0x52afad})[_0xc330('0x24')](function(_0x4d985d){if(_0x354340[_0xc330('0x49')]['mode']===_0xc330('0x4e')){fs[_0xc330('0x52')](_0x4d985d[_0xc330('0x4f')],parseInt(_0xc330('0x53'),0x8));}var _0x5a798e=_0x354340[_0xc330('0x54')]['get']({'plain':!![]});if(!_0x5a798e)throw new Error(_0xc330('0x55'));if(_0x5a798e['role']==='user'){var _0x4fabbe=_0x4d985d[_0xc330('0x26')]({'plain':!![]});return db[_0xc330('0x56')]['find']({'where':{'name':'MusicOnHolds','userProfileId':_0x5a798e[_0xc330('0x57')]},'raw':!![]})['then'](function(_0x2f6e33){if(_0x2f6e33&&_0x2f6e33[_0xc330('0x58')]===0x0){return db[_0xc330('0x28')][_0xc330('0x4b')]({'name':_0x4fabbe[_0xc330('0x2b')],'resourceId':_0x4fabbe['id'],'type':_0x2f6e33[_0xc330('0x2b')],'sectionId':_0x2f6e33['id']},{})[_0xc330('0x24')](function(){return _0x4d985d;});}else{return _0x4d985d;}})['catch'](function(_0x201713){logger['error'](_0xc330('0x59'),_0x201713);});}return _0x4d985d;});})[_0xc330('0x24')](respondWithResult(_0x15bc58,0xc9))['catch'](handleError(_0x15bc58,null));};exports['destroy']=function(_0x28f593,_0x2bc730,_0xb24da2){var _0x1ad70e;return db[_0xc330('0x2e')][_0xc330('0x4a')]({'where':{'id':_0x28f593[_0xc330('0x47')]['id']}})[_0xc330('0x24')](function(_0x398d07){if(_0x398d07){return db[_0xc330('0x4c')][_0xc330('0x5a')](function(_0x4f64b2){return _0x398d07[_0xc330('0x25')]({'transaction':_0x4f64b2,'raw':!![]})[_0xc330('0x24')](function(_0x82281a){if(_0x82281a[_0xc330('0x4f')]){fs[_0xc330('0x5b')](_0x82281a['directory'])[_0xc330('0x5c')](function(_0xf23b78){fs[_0xc330('0x5d')](path[_0xc330('0x5e')](_0x82281a[_0xc330('0x4f')],_0xf23b78));});fs[_0xc330('0x5f')](_0x82281a[_0xc330('0x4f')]);}return _0x82281a;});})[_0xc330('0x45')](function(_0x193c2f){throw new db[(_0xc330('0x60'))]['ValidationError'](_0x193c2f[_0xc330('0x61')]);});}})[_0xc330('0x24')](handleEntityNotFound(_0x2bc730,null))[_0xc330('0x24')](removeEntity(_0x2bc730,null))[_0xc330('0x45')](handleError(_0x2bc730,null));};exports[_0xc330('0x62')]=function(_0x155b8c,_0x13c898,_0x1ee204){return db[_0xc330('0x4c')][_0xc330('0x5a')](function(_0x2558a7){var _0x5beb77;return db['VoiceMusicOnHold'][_0xc330('0x4a')]({'where':{'id':_0x155b8c[_0xc330('0x47')]['id']}})['then'](function(_0x5bafaa){if(_0x5bafaa){_0x5beb77=_0x5bafaa;return _0x5bafaa['addSound'](_0x155b8c['body']['id'],{'transaction':_0x2558a7});}})[_0xc330('0x24')](function(_0x182428){if(_0x182428){return db['Sound'][_0xc330('0x63')]({'where':{'id':_0x155b8c['body']['id']},'attributes':['id','name','save_name','converted_format',_0xc330('0x64')],'raw':!![]});}})['then'](function(_0x3182d6){if(_0x3182d6){var _0x3ce124=path[_0xc330('0x5e')](config[_0xc330('0x50')],_0xc330('0x65'),util['format']('%s.%s',path['basename'](_0x3182d6[_0xc330('0x66')],path['extname'](_0x3182d6[_0xc330('0x66')])),_0x3182d6[_0xc330('0x67')]));var _0x40f0b6=path['join'](config['root'],'server/files/moh',_0x5beb77[_0xc330('0x2b')],util[_0xc330('0x68')]('%s.%s',_0x3182d6['name'],_0x3182d6[_0xc330('0x67')]));fs[_0xc330('0x69')](_0x3ce124,_0x40f0b6);return _0x3182d6;}})['catch'](function(_0x25776d){throw new db[(_0xc330('0x60'))]['ValidationError'](_0x25776d[_0xc330('0x61')]);});})[_0xc330('0x24')](handleEntityNotFound(_0x13c898,null))[_0xc330('0x24')](respondWithResult(_0x13c898,0xc9))['catch'](handleError(_0x13c898,null));};exports['removeSound']=function(_0x3d343d,_0x31a04a,_0x1b5a54){return db['sequelize'][_0xc330('0x5a')](function(_0x431b0a){var _0x4979f0;return db[_0xc330('0x2e')][_0xc330('0x63')]({'where':{'id':_0x3d343d[_0xc330('0x47')]['id']}})[_0xc330('0x24')](handleEntityNotFound(_0x31a04a,null))[_0xc330('0x24')](function(_0x414adc){if(_0x414adc){_0x4979f0=_0x414adc;return _0x414adc[_0xc330('0x6a')](_0x3d343d[_0xc330('0x47')][_0xc330('0x6b')]);}})['then'](function(_0x5d2e2c){if(_0x5d2e2c){return db[_0xc330('0x6c')][_0xc330('0x63')]({'where':{'id':_0x3d343d[_0xc330('0x47')]['id2']},'attributes':['id','name',_0xc330('0x66'),_0xc330('0x67'),_0xc330('0x64')],'raw':!![]});}})[_0xc330('0x24')](function(_0x4fe1bd){if(_0x4fe1bd){fs[_0xc330('0x5d')](path['join'](_0x4979f0[_0xc330('0x4f')],util[_0xc330('0x68')](_0xc330('0x6d'),_0x4fe1bd[_0xc330('0x2b')],_0x4fe1bd[_0xc330('0x67')])));return _0x4fe1bd;}})['catch'](function(_0x1c1c2b){throw new db[(_0xc330('0x60'))][(_0xc330('0x6e'))](_0x1c1c2b[_0xc330('0x61')]);});})[_0xc330('0x24')](handleEntityNotFound(_0x31a04a,null))[_0xc330('0x24')](respondWithStatusCode(_0x31a04a,0xcc))['catch'](handleError(_0x31a04a,null));};exports[_0xc330('0x6f')]=function(_0x1eac2e,_0x26bda9,_0x306f3b){var _0x366749={};var _0x1ca91c={};var _0xaea6e7;var _0x115359;return db[_0xc330('0x2e')][_0xc330('0x63')]({'where':{'id':_0x1eac2e['params']['id']}})[_0xc330('0x24')](handleEntityNotFound(_0x26bda9,null))[_0xc330('0x24')](function(_0x3ea50c){if(_0x3ea50c){_0xaea6e7=_0x3ea50c;_0x1ca91c[_0xc330('0x30')]=_['keys'](db[_0xc330('0x6c')][_0xc330('0x2f')]);_0x1ca91c[_0xc330('0x31')]=_[_0xc330('0x32')](_0x1eac2e[_0xc330('0x31')]);_0x1ca91c[_0xc330('0x33')]=_[_0xc330('0x34')](_0x1ca91c[_0xc330('0x30')],_0x1ca91c[_0xc330('0x31')]);_0x366749[_0xc330('0x35')]=_['intersection'](_0x1ca91c[_0xc330('0x30')],qs[_0xc330('0x36')](_0x1eac2e[_0xc330('0x31')][_0xc330('0x36')]));_0x366749[_0xc330('0x35')]=_0x366749[_0xc330('0x35')][_0xc330('0x37')]?_0x366749[_0xc330('0x35')]:_0x1ca91c[_0xc330('0x30')];_0x366749['order']=qs[_0xc330('0x70')](_0x1eac2e[_0xc330('0x31')][_0xc330('0x70')]);_0x366749['where']=qs[_0xc330('0x33')](_[_0xc330('0x3c')](_0x1eac2e['query'],_0x1ca91c[_0xc330('0x33')]));if(_0x1eac2e[_0xc330('0x31')][_0xc330('0x3d')]){_0x366749[_0xc330('0x3b')]=_['merge'](_0x366749[_0xc330('0x3b')],{'$or':_[_0xc330('0x3f')](_0x366749[_0xc330('0x35')],function(_0x3bba59){var _0x5659cc={};_0x5659cc[_0x3bba59]={'$like':'%'+_0x1eac2e[_0xc330('0x31')]['filter']+'%'};return _0x5659cc;})});}_0x366749=_[_0xc330('0x3e')]({},_0x366749,_0x1eac2e['options']);return _0xaea6e7[_0xc330('0x6f')](_0x366749);}})[_0xc330('0x24')](function(_0x5b2a55){if(_0x5b2a55){_0x115359=_0x5b2a55[_0xc330('0x37')];if(!_0x1eac2e[_0xc330('0x31')][_0xc330('0x38')](_0xc330('0x39'))){_0x366749[_0xc330('0x1e')]=qs[_0xc330('0x1e')](_0x1eac2e['query']['limit']);_0x366749[_0xc330('0x1d')]=qs['offset'](_0x1eac2e[_0xc330('0x31')][_0xc330('0x1d')]);}return _0xaea6e7['getSounds'](_0x366749);}})[_0xc330('0x24')](function(_0x17c961){if(_0x17c961){return _0x17c961?{'count':_0x115359,'rows':_0x17c961}:null;}})[_0xc330('0x24')](respondWithResult(_0x26bda9,null))['catch'](handleError(_0x26bda9,null));};
\ No newline at end of file
+var _0xbcd9=['params','find','body','create','sequelize','transaction','mode','directory','root','server/files/moh','files','0777','user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readdirSync','forEach','unlinkSync','join','rmdirSync','ValidationError','message','addSound','save_name','converted_format','createdAt','server/files/sounds/converted','format','%s.%s','basename','symlinkSync','removeSound','findOne','id2','Sequelize','getSounds','Sound','nolimit','offset','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','limit','set','Content-Range','apply','reject','save','update','then','get','MusicOnHolds','UserProfileResource','destroy','sendStatus','error','stack','name','send','index','VoiceMusicOnHold','rawAttributes','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','map','type','key','VIRTUAL','field','count','includeAll','include','catch'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xbcd9,0x9b));var _0x9bcd=function(_0x1def68,_0x3f243e){_0x1def68=_0x1def68-0x0;var _0xe4e470=_0xbcd9[_0x1def68];return _0xe4e470;};'use strict';var pdf=require(_0x9bcd('0x0'));var emlformat=require(_0x9bcd('0x1'));var rimraf=require(_0x9bcd('0x2'));var zipdir=require(_0x9bcd('0x3'));var jsonpatch=require(_0x9bcd('0x4'));var rp=require(_0x9bcd('0x5'));var moment=require('moment');var BPromise=require(_0x9bcd('0x6'));var Mustache=require('mustache');var util=require(_0x9bcd('0x7'));var path=require(_0x9bcd('0x8'));var sox=require('sox');var csv=require(_0x9bcd('0x9'));var ejs=require(_0x9bcd('0xa'));var fs=require('fs');var _=require(_0x9bcd('0xb'));var squel=require('squel');var crypto=require(_0x9bcd('0xc'));var jsforce=require(_0x9bcd('0xd'));var deskjs=require(_0x9bcd('0xe'));var toCsv=require('to-csv');var querystring=require(_0x9bcd('0xf'));var Papa=require(_0x9bcd('0x10'));var Redis=require(_0x9bcd('0x11'));var authService=require(_0x9bcd('0x12'));var qs=require(_0x9bcd('0x13'));var hardwareService=require(_0x9bcd('0x14'));var logger=require(_0x9bcd('0x15'))(_0x9bcd('0x16'));var utils=require(_0x9bcd('0x17'));var config=require(_0x9bcd('0x18'));var db=require(_0x9bcd('0x19'))['db'];function respondWithStatusCode(_0x43c649,_0x81d886){_0x81d886=_0x81d886||0xcc;return function(_0x32ab83){if(_0x32ab83){return _0x43c649['sendStatus'](_0x81d886);}return _0x43c649[_0x9bcd('0x1a')](_0x81d886)[_0x9bcd('0x1b')]();};}function respondWithResult(_0x442f66,_0x59032a){_0x59032a=_0x59032a||0xc8;return function(_0x35a4e3){if(_0x35a4e3){return _0x442f66[_0x9bcd('0x1a')](_0x59032a)[_0x9bcd('0x1c')](_0x35a4e3);}};}function respondWithFilteredResult(_0x5bb1f0,_0x25712c){return function(_0x108421){if(_0x108421){var _0x47350f=_0x108421['count'],_0x20c84c=_0x25712c['offset'],_0x55fad6=_0x25712c['offset']+_0x25712c[_0x9bcd('0x1d')],_0x5e199f;if(_0x55fad6>=_0x47350f){_0x55fad6=_0x47350f;_0x5e199f=0xc8;}else{_0x5e199f=0xce;}_0x5bb1f0[_0x9bcd('0x1a')](_0x5e199f);return _0x5bb1f0[_0x9bcd('0x1e')](_0x9bcd('0x1f'),_0x20c84c+'-'+_0x55fad6+'/'+_0x47350f)[_0x9bcd('0x1c')](_0x108421);}return null;};}function patchUpdates(_0x215013){return function(_0xcf3754){try{jsonpatch[_0x9bcd('0x20')](_0xcf3754,_0x215013,!![]);}catch(_0x2f4f40){return BPromise[_0x9bcd('0x21')](_0x2f4f40);}return _0xcf3754[_0x9bcd('0x22')]();};}function saveUpdates(_0x51ab7a,_0x3641a9){return function(_0xb024c2){if(_0xb024c2){return _0xb024c2[_0x9bcd('0x23')](_0x51ab7a)[_0x9bcd('0x24')](function(_0x5604de){return _0x5604de;});}return null;};}function removeEntity(_0x3d8e5f,_0x2fc7d8){return function(_0x56febf){if(_0x56febf){return _0x56febf['destroy']()[_0x9bcd('0x24')](function(){var _0x26b34e=_0x56febf[_0x9bcd('0x25')]({'plain':!![]});var _0x2f11c7=_0x9bcd('0x26');return db[_0x9bcd('0x27')][_0x9bcd('0x28')]({'where':{'type':_0x2f11c7,'resourceId':_0x26b34e['id']}})[_0x9bcd('0x24')](function(){return _0x56febf;});})[_0x9bcd('0x24')](function(){_0x3d8e5f[_0x9bcd('0x1a')](0xcc)[_0x9bcd('0x1b')]();});}};}function handleEntityNotFound(_0x4a62e1,_0x5bf4ca){return function(_0x160e70){if(!_0x160e70){_0x4a62e1[_0x9bcd('0x29')](0x194);}return _0x160e70;};}function handleError(_0x57ee48,_0x3eb73e){_0x3eb73e=_0x3eb73e||0x1f4;return function(_0x559d57){logger[_0x9bcd('0x2a')](_0x559d57[_0x9bcd('0x2b')]);if(_0x559d57['name']){delete _0x559d57[_0x9bcd('0x2c')];}_0x57ee48[_0x9bcd('0x1a')](_0x3eb73e)[_0x9bcd('0x2d')](_0x559d57);};}exports[_0x9bcd('0x2e')]=function(_0x308d48,_0x32f26a){var _0x1846c3={},_0x1a8537={},_0x1c464d={'count':0x0,'rows':[]};var _0x58aafe=db[_0x9bcd('0x2f')][_0x9bcd('0x30')];_0x1a8537[_0x9bcd('0x31')]=_[_0x9bcd('0x32')](_0x58aafe);_0x1a8537[_0x9bcd('0x33')]=_[_0x9bcd('0x32')](_0x308d48[_0x9bcd('0x33')]);_0x1a8537[_0x9bcd('0x34')]=_['intersection'](_0x1a8537[_0x9bcd('0x31')],_0x1a8537[_0x9bcd('0x33')]);_0x1846c3[_0x9bcd('0x35')]=_[_0x9bcd('0x36')](_0x1a8537[_0x9bcd('0x31')],qs['fields'](_0x308d48[_0x9bcd('0x33')][_0x9bcd('0x37')]));_0x1846c3[_0x9bcd('0x35')]=_0x1846c3[_0x9bcd('0x35')][_0x9bcd('0x38')]?_0x1846c3[_0x9bcd('0x35')]:_0x1a8537['model'];if(!_0x308d48[_0x9bcd('0x33')][_0x9bcd('0x39')]('nolimit')){_0x1846c3[_0x9bcd('0x1d')]=qs[_0x9bcd('0x1d')](_0x308d48[_0x9bcd('0x33')][_0x9bcd('0x1d')]);_0x1846c3['offset']=qs['offset'](_0x308d48['query']['offset']);}_0x1846c3[_0x9bcd('0x3a')]=qs[_0x9bcd('0x3b')](_0x308d48['query'][_0x9bcd('0x3b')]);_0x1846c3[_0x9bcd('0x3c')]=qs[_0x9bcd('0x34')](_[_0x9bcd('0x3d')](_0x308d48[_0x9bcd('0x33')],_0x1a8537[_0x9bcd('0x34')]));if(_0x308d48[_0x9bcd('0x33')][_0x9bcd('0x3e')]){_0x1846c3['where']=_[_0x9bcd('0x3f')](_0x1846c3[_0x9bcd('0x3c')],{'$or':_[_0x9bcd('0x40')](_0x58aafe,function(_0x9ae094){if(_0x9ae094[_0x9bcd('0x41')][_0x9bcd('0x42')]!==_0x9bcd('0x43')){var _0x468e54={};_0x468e54[_0x9ae094[_0x9bcd('0x44')]]={'$like':'%'+_0x308d48['query'][_0x9bcd('0x3e')]+'%'};return _0x468e54;}})});}_0x1846c3=_['merge']({},_0x1846c3,_0x308d48['options']);var _0xd9ed1f={'where':_0x1846c3[_0x9bcd('0x3c')]};return db[_0x9bcd('0x2f')][_0x9bcd('0x45')](_0xd9ed1f)['then'](function(_0x587914){_0x1c464d[_0x9bcd('0x45')]=_0x587914;if(_0x308d48['query'][_0x9bcd('0x46')]){_0x1846c3[_0x9bcd('0x47')]=[{'all':!![]}];}return db['VoiceMusicOnHold']['findAll'](_0x1846c3);})[_0x9bcd('0x24')](function(_0x31867e){_0x1c464d['rows']=_0x31867e;return _0x1c464d;})[_0x9bcd('0x24')](respondWithFilteredResult(_0x32f26a,_0x1846c3))[_0x9bcd('0x48')](handleError(_0x32f26a,null));};exports['show']=function(_0x9cc63e,_0x2c3ec1){var _0x1567f3={'raw':![],'where':{'id':_0x9cc63e[_0x9bcd('0x49')]['id']}},_0x478920={};_0x478920[_0x9bcd('0x31')]=_['keys'](db[_0x9bcd('0x2f')][_0x9bcd('0x30')]);_0x478920['query']=_[_0x9bcd('0x32')](_0x9cc63e[_0x9bcd('0x33')]);_0x478920[_0x9bcd('0x34')]=_[_0x9bcd('0x36')](_0x478920[_0x9bcd('0x31')],_0x478920[_0x9bcd('0x33')]);_0x1567f3[_0x9bcd('0x35')]=_['intersection'](_0x478920['model'],qs[_0x9bcd('0x37')](_0x9cc63e[_0x9bcd('0x33')][_0x9bcd('0x37')]));_0x1567f3[_0x9bcd('0x35')]=_0x1567f3[_0x9bcd('0x35')][_0x9bcd('0x38')]?_0x1567f3[_0x9bcd('0x35')]:_0x478920[_0x9bcd('0x31')];if(_0x9cc63e[_0x9bcd('0x33')][_0x9bcd('0x46')]){_0x1567f3[_0x9bcd('0x47')]=[{'all':!![]}];}_0x1567f3=_['merge']({},_0x1567f3,_0x9cc63e['options']);return db[_0x9bcd('0x2f')][_0x9bcd('0x4a')](_0x1567f3)[_0x9bcd('0x24')](handleEntityNotFound(_0x2c3ec1,null))[_0x9bcd('0x24')](respondWithResult(_0x2c3ec1,null))[_0x9bcd('0x48')](handleError(_0x2c3ec1,null));};exports['update']=function(_0xab1252,_0xb1e9b9){if(_0xab1252['body']['id']){delete _0xab1252[_0x9bcd('0x4b')]['id'];}return db['VoiceMusicOnHold'][_0x9bcd('0x4a')]({'where':{'id':_0xab1252[_0x9bcd('0x49')]['id']}})[_0x9bcd('0x24')](handleEntityNotFound(_0xb1e9b9,null))[_0x9bcd('0x24')](saveUpdates(_0xab1252[_0x9bcd('0x4b')],null))[_0x9bcd('0x24')](respondWithResult(_0xb1e9b9,null))[_0x9bcd('0x48')](handleError(_0xb1e9b9,null));};exports[_0x9bcd('0x4c')]=function(_0x50ece9,_0x128cf6,_0x5720aa){return db[_0x9bcd('0x4d')][_0x9bcd('0x4e')](function(_0x4aa322){if(_0x50ece9[_0x9bcd('0x4b')][_0x9bcd('0x4f')]==='files'){_0x50ece9['body'][_0x9bcd('0x50')]=path['join'](config[_0x9bcd('0x51')],_0x9bcd('0x52'),_0x50ece9['body'][_0x9bcd('0x2c')]);}return db[_0x9bcd('0x2f')][_0x9bcd('0x4c')](_0x50ece9[_0x9bcd('0x4b')],{'transaction':_0x4aa322})[_0x9bcd('0x24')](function(_0x52a4dd){if(_0x50ece9[_0x9bcd('0x4b')][_0x9bcd('0x4f')]===_0x9bcd('0x53')){fs['mkdirSync'](_0x52a4dd['directory'],parseInt(_0x9bcd('0x54'),0x8));}var _0x5262d7=_0x50ece9[_0x9bcd('0x55')][_0x9bcd('0x25')]({'plain':!![]});if(!_0x5262d7)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5262d7[_0x9bcd('0x56')]===_0x9bcd('0x55')){var _0x1bbadc=_0x52a4dd['get']({'plain':!![]});return db[_0x9bcd('0x57')][_0x9bcd('0x4a')]({'where':{'name':'MusicOnHolds','userProfileId':_0x5262d7[_0x9bcd('0x58')]},'raw':!![]})['then'](function(_0x5a635b){if(_0x5a635b&&_0x5a635b['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x1bbadc['name'],'resourceId':_0x1bbadc['id'],'type':_0x5a635b[_0x9bcd('0x2c')],'sectionId':_0x5a635b['id']},{})[_0x9bcd('0x24')](function(){return _0x52a4dd;});}else{return _0x52a4dd;}})[_0x9bcd('0x48')](function(_0x3ef62d){logger[_0x9bcd('0x2a')](_0x9bcd('0x59'),_0x3ef62d);});}return _0x52a4dd;});})[_0x9bcd('0x24')](respondWithResult(_0x128cf6,0xc9))[_0x9bcd('0x48')](handleError(_0x128cf6,null));};exports[_0x9bcd('0x28')]=function(_0x5e3db7,_0x1368a9,_0x46c202){var _0x55be65;return db['VoiceMusicOnHold'][_0x9bcd('0x4a')]({'where':{'id':_0x5e3db7[_0x9bcd('0x49')]['id']}})[_0x9bcd('0x24')](function(_0x42e0f3){if(_0x42e0f3){return db['sequelize'][_0x9bcd('0x4e')](function(_0x336268){return _0x42e0f3[_0x9bcd('0x28')]({'transaction':_0x336268,'raw':!![]})[_0x9bcd('0x24')](function(_0x27c178){if(_0x27c178[_0x9bcd('0x50')]){fs[_0x9bcd('0x5a')](_0x27c178[_0x9bcd('0x50')])[_0x9bcd('0x5b')](function(_0x77a33e){fs[_0x9bcd('0x5c')](path[_0x9bcd('0x5d')](_0x27c178[_0x9bcd('0x50')],_0x77a33e));});fs[_0x9bcd('0x5e')](_0x27c178[_0x9bcd('0x50')]);}return _0x27c178;});})[_0x9bcd('0x48')](function(_0x34d0bf){throw new db['Sequelize'][(_0x9bcd('0x5f'))](_0x34d0bf[_0x9bcd('0x60')]);});}})[_0x9bcd('0x24')](handleEntityNotFound(_0x1368a9,null))[_0x9bcd('0x24')](removeEntity(_0x1368a9,null))[_0x9bcd('0x48')](handleError(_0x1368a9,null));};exports[_0x9bcd('0x61')]=function(_0x58cea6,_0x4b8a5d,_0x4226ae){return db['sequelize'][_0x9bcd('0x4e')](function(_0xf293b5){var _0x32303f;return db[_0x9bcd('0x2f')][_0x9bcd('0x4a')]({'where':{'id':_0x58cea6[_0x9bcd('0x49')]['id']}})['then'](function(_0x3ea615){if(_0x3ea615){_0x32303f=_0x3ea615;return _0x3ea615['addSound'](_0x58cea6[_0x9bcd('0x4b')]['id'],{'transaction':_0xf293b5});}})[_0x9bcd('0x24')](function(_0x36e8af){if(_0x36e8af){return db['Sound']['findOne']({'where':{'id':_0x58cea6[_0x9bcd('0x4b')]['id']},'attributes':['id',_0x9bcd('0x2c'),_0x9bcd('0x62'),_0x9bcd('0x63'),_0x9bcd('0x64')],'raw':!![]});}})[_0x9bcd('0x24')](function(_0x234fcf){if(_0x234fcf){var _0x25ca4c=path['join'](config[_0x9bcd('0x51')],_0x9bcd('0x65'),util[_0x9bcd('0x66')](_0x9bcd('0x67'),path[_0x9bcd('0x68')](_0x234fcf[_0x9bcd('0x62')],path['extname'](_0x234fcf[_0x9bcd('0x62')])),_0x234fcf[_0x9bcd('0x63')]));var _0x20aff0=path[_0x9bcd('0x5d')](config[_0x9bcd('0x51')],_0x9bcd('0x52'),_0x32303f[_0x9bcd('0x2c')],util['format'](_0x9bcd('0x67'),_0x234fcf[_0x9bcd('0x2c')],_0x234fcf[_0x9bcd('0x63')]));fs[_0x9bcd('0x69')](_0x25ca4c,_0x20aff0);return _0x234fcf;}})[_0x9bcd('0x48')](function(_0x427216){throw new db['Sequelize'][(_0x9bcd('0x5f'))](_0x427216[_0x9bcd('0x60')]);});})[_0x9bcd('0x24')](handleEntityNotFound(_0x4b8a5d,null))[_0x9bcd('0x24')](respondWithResult(_0x4b8a5d,0xc9))[_0x9bcd('0x48')](handleError(_0x4b8a5d,null));};exports[_0x9bcd('0x6a')]=function(_0x16087d,_0x7b1b2f,_0x4b06de){return db[_0x9bcd('0x4d')]['transaction'](function(_0x30b9fd){var _0x1cb293;return db[_0x9bcd('0x2f')][_0x9bcd('0x6b')]({'where':{'id':_0x16087d[_0x9bcd('0x49')]['id']}})[_0x9bcd('0x24')](handleEntityNotFound(_0x7b1b2f,null))['then'](function(_0x32b9d7){if(_0x32b9d7){_0x1cb293=_0x32b9d7;return _0x32b9d7[_0x9bcd('0x6a')](_0x16087d[_0x9bcd('0x49')][_0x9bcd('0x6c')]);}})['then'](function(_0x526959){if(_0x526959){return db['Sound'][_0x9bcd('0x6b')]({'where':{'id':_0x16087d[_0x9bcd('0x49')]['id2']},'attributes':['id','name',_0x9bcd('0x62'),_0x9bcd('0x63'),_0x9bcd('0x64')],'raw':!![]});}})['then'](function(_0x49802e){if(_0x49802e){fs[_0x9bcd('0x5c')](path[_0x9bcd('0x5d')](_0x1cb293[_0x9bcd('0x50')],util[_0x9bcd('0x66')]('%s.%s',_0x49802e[_0x9bcd('0x2c')],_0x49802e[_0x9bcd('0x63')])));return _0x49802e;}})[_0x9bcd('0x48')](function(_0x359ff7){throw new db[(_0x9bcd('0x6d'))][(_0x9bcd('0x5f'))](_0x359ff7[_0x9bcd('0x60')]);});})[_0x9bcd('0x24')](handleEntityNotFound(_0x7b1b2f,null))[_0x9bcd('0x24')](respondWithStatusCode(_0x7b1b2f,0xcc))[_0x9bcd('0x48')](handleError(_0x7b1b2f,null));};exports[_0x9bcd('0x6e')]=function(_0x30d674,_0x22ffaa,_0x11951f){var _0x2dea95={};var _0x45040e={};var _0x487732;var _0x384a40;return db[_0x9bcd('0x2f')]['findOne']({'where':{'id':_0x30d674[_0x9bcd('0x49')]['id']}})[_0x9bcd('0x24')](handleEntityNotFound(_0x22ffaa,null))['then'](function(_0x37bbc5){if(_0x37bbc5){_0x487732=_0x37bbc5;_0x45040e[_0x9bcd('0x31')]=_[_0x9bcd('0x32')](db[_0x9bcd('0x6f')][_0x9bcd('0x30')]);_0x45040e[_0x9bcd('0x33')]=_['keys'](_0x30d674[_0x9bcd('0x33')]);_0x45040e[_0x9bcd('0x34')]=_[_0x9bcd('0x36')](_0x45040e[_0x9bcd('0x31')],_0x45040e[_0x9bcd('0x33')]);_0x2dea95['attributes']=_[_0x9bcd('0x36')](_0x45040e[_0x9bcd('0x31')],qs[_0x9bcd('0x37')](_0x30d674['query'][_0x9bcd('0x37')]));_0x2dea95[_0x9bcd('0x35')]=_0x2dea95['attributes'][_0x9bcd('0x38')]?_0x2dea95[_0x9bcd('0x35')]:_0x45040e['model'];_0x2dea95[_0x9bcd('0x3a')]=qs[_0x9bcd('0x3b')](_0x30d674['query'][_0x9bcd('0x3b')]);_0x2dea95['where']=qs[_0x9bcd('0x34')](_[_0x9bcd('0x3d')](_0x30d674['query'],_0x45040e['filters']));if(_0x30d674['query']['filter']){_0x2dea95[_0x9bcd('0x3c')]=_['merge'](_0x2dea95['where'],{'$or':_[_0x9bcd('0x40')](_0x2dea95[_0x9bcd('0x35')],function(_0x25d84c){var _0x4c632b={};_0x4c632b[_0x25d84c]={'$like':'%'+_0x30d674[_0x9bcd('0x33')]['filter']+'%'};return _0x4c632b;})});}_0x2dea95=_[_0x9bcd('0x3f')]({},_0x2dea95,_0x30d674['options']);return _0x487732['getSounds'](_0x2dea95);}})[_0x9bcd('0x24')](function(_0x102238){if(_0x102238){_0x384a40=_0x102238[_0x9bcd('0x38')];if(!_0x30d674['query']['hasOwnProperty'](_0x9bcd('0x70'))){_0x2dea95['limit']=qs[_0x9bcd('0x1d')](_0x30d674[_0x9bcd('0x33')][_0x9bcd('0x1d')]);_0x2dea95['offset']=qs[_0x9bcd('0x71')](_0x30d674[_0x9bcd('0x33')]['offset']);}return _0x487732[_0x9bcd('0x6e')](_0x2dea95);}})[_0x9bcd('0x24')](function(_0x76cde9){if(_0x76cde9){return _0x76cde9?{'count':_0x384a40,'rows':_0x76cde9}:null;}})[_0x9bcd('0x24')](respondWithResult(_0x22ffaa,null))[_0x9bcd('0x48')](handleError(_0x22ffaa,null));};
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js
index 2bd18f9..f606956 100644
--- a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js
+++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd326=['util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./voiceMusicOnHold.attributes','VoiceMusicOnHold','voice_musiconhold','lodash'];(function(_0x24d5a6,_0x28a515){var _0x1496be=function(_0x446280){while(--_0x446280){_0x24d5a6['push'](_0x24d5a6['shift']());}};_0x1496be(++_0x28a515);}(_0xd326,0x1c2));var _0x6d32=function(_0x4eae76,_0x4731d5){_0x4eae76=_0x4eae76-0x0;var _0x17c1b7=_0xd326[_0x4eae76];return _0x17c1b7;};'use strict';var _=require(_0x6d32('0x0'));var util=require(_0x6d32('0x1'));var logger=require(_0x6d32('0x2'))(_0x6d32('0x3'));var moment=require(_0x6d32('0x4'));var BPromise=require('bluebird');var rp=require(_0x6d32('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6d32('0x6'));var config=require(_0x6d32('0x7'));var attributes=require(_0x6d32('0x8'));module['exports']=function(_0x3df5eb,_0x2dc91c){return _0x3df5eb['define'](_0x6d32('0x9'),attributes,{'tableName':_0x6d32('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x984b=['path','rimraf','./voiceMusicOnHold.attributes','exports','VoiceMusicOnHold','voice_musiconhold','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x4b8e86,_0x2bf512){var _0x43bb32=function(_0x334d7a){while(--_0x334d7a){_0x4b8e86['push'](_0x4b8e86['shift']());}};_0x43bb32(++_0x2bf512);}(_0x984b,0x17a));var _0xb984=function(_0x520295,_0x4b3c32){_0x520295=_0x520295-0x0;var _0x5ce53d=_0x984b[_0x520295];return _0x5ce53d;};'use strict';var _=require(_0xb984('0x0'));var util=require(_0xb984('0x1'));var logger=require(_0xb984('0x2'))('api');var moment=require(_0xb984('0x3'));var BPromise=require(_0xb984('0x4'));var rp=require(_0xb984('0x5'));var fs=require('fs');var path=require(_0xb984('0x6'));var rimraf=require(_0xb984('0x7'));var config=require('../../config/environment');var attributes=require(_0xb984('0x8'));module[_0xb984('0x9')]=function(_0x451c38,_0xe84650){return _0x451c38['define'](_0xb984('0xa'),attributes,{'tableName':_0xb984('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js
index f0f44df..583424e 100644
--- a/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js
+++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xea1a=['client','http','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise'];(function(_0x295da2,_0x154687){var _0x6279ab=function(_0x59415a){while(--_0x59415a){_0x295da2['push'](_0x295da2['shift']());}};_0x6279ab(++_0x154687);}(_0xea1a,0x98));var _0xaea1=function(_0x38e1fa,_0x7195fa){_0x38e1fa=_0x38e1fa-0x0;var _0x1ee34e=_0xea1a[_0x38e1fa];return _0x1ee34e;};'use strict';var _=require(_0xaea1('0x0'));var util=require(_0xaea1('0x1'));var moment=require(_0xaea1('0x2'));var BPromise=require(_0xaea1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xaea1('0x4'));var db=require(_0xaea1('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xaea1('0x6'))(_0xaea1('0x7'));var config=require('../../config/environment');var jayson=require(_0xaea1('0x8'));var client=jayson[_0xaea1('0x9')][_0xaea1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x55883d,_0x49f8d9,_0x41ee55){return new BPromise(function(_0x339f7d,_0x5eaef0){return client['request'](_0x55883d,_0x41ee55)[_0xaea1('0xb')](function(_0x35cd53){logger[_0xaea1('0xc')](_0xaea1('0xd'),_0x49f8d9,_0xaea1('0xe'));logger[_0xaea1('0xf')](_0xaea1('0x10'),_0x49f8d9,_0xaea1('0xe'),JSON[_0xaea1('0x11')](_0x35cd53));if(_0x35cd53['error']){if(_0x35cd53[_0xaea1('0x12')][_0xaea1('0x13')]===0x1f4){logger[_0xaea1('0x12')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x49f8d9,_0x35cd53[_0xaea1('0x12')][_0xaea1('0x14')]);return _0x5eaef0(_0x35cd53[_0xaea1('0x12')][_0xaea1('0x14')]);}logger[_0xaea1('0x12')](_0xaea1('0xd'),_0x49f8d9,_0x35cd53[_0xaea1('0x12')][_0xaea1('0x14')]);return _0x339f7d(_0x35cd53[_0xaea1('0x12')]['message']);}else{logger[_0xaea1('0xc')](_0xaea1('0xd'),_0x49f8d9,_0xaea1('0xe'));_0x339f7d(_0x35cd53[_0xaea1('0x15')]['message']);}})[_0xaea1('0x16')](function(_0x3bdf58){logger[_0xaea1('0x12')](_0xaea1('0xd'),_0x49f8d9,_0x3bdf58);_0x5eaef0(_0x3bdf58);});});}
\ No newline at end of file
+var _0x0f79=['result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceMusicOnHold,\x20%s,\x20%s','message','info'];(function(_0xbb091,_0x3fe7ee){var _0x467a04=function(_0x3a978d){while(--_0x3a978d){_0xbb091['push'](_0xbb091['shift']());}};_0x467a04(++_0x3fe7ee);}(_0x0f79,0xd1));var _0x90f7=function(_0x1ab180,_0x382b2c){_0x1ab180=_0x1ab180-0x0;var _0xfb2c2d=_0x0f79[_0x1ab180];return _0xfb2c2d;};'use strict';var _=require('lodash');var util=require(_0x90f7('0x0'));var moment=require(_0x90f7('0x1'));var BPromise=require(_0x90f7('0x2'));var rs=require(_0x90f7('0x3'));var fs=require('fs');var Redis=require(_0x90f7('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x90f7('0x5'));var logger=require(_0x90f7('0x6'))('rpc');var config=require(_0x90f7('0x7'));var jayson=require(_0x90f7('0x8'));var client=jayson[_0x90f7('0x9')][_0x90f7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x311344,_0x66a858,_0x2b9250){return new BPromise(function(_0x36e1c7,_0x218756){return client['request'](_0x311344,_0x2b9250)[_0x90f7('0xb')](function(_0x48acda){logger['info']('VoiceMusicOnHold,\x20%s,\x20%s',_0x66a858,_0x90f7('0xc'));logger[_0x90f7('0xd')](_0x90f7('0xe'),_0x66a858,_0x90f7('0xc'),JSON[_0x90f7('0xf')](_0x48acda));if(_0x48acda['error']){if(_0x48acda[_0x90f7('0x10')][_0x90f7('0x11')]===0x1f4){logger['error'](_0x90f7('0x12'),_0x66a858,_0x48acda['error'][_0x90f7('0x13')]);return _0x218756(_0x48acda[_0x90f7('0x10')][_0x90f7('0x13')]);}logger['error'](_0x90f7('0x12'),_0x66a858,_0x48acda[_0x90f7('0x10')][_0x90f7('0x13')]);return _0x36e1c7(_0x48acda[_0x90f7('0x10')]['message']);}else{logger[_0x90f7('0x14')](_0x90f7('0x12'),_0x66a858,_0x90f7('0xc'));_0x36e1c7(_0x48acda[_0x90f7('0x15')][_0x90f7('0x13')]);}})[_0x90f7('0x16')](function(_0x1a45c4){logger['error']('VoiceMusicOnHold,\x20%s,\x20%s',_0x66a858,_0x1a45c4);_0x218756(_0x1a45c4);});});}
\ No newline at end of file
diff --git a/server/api/voicePrefix/index.js b/server/api/voicePrefix/index.js
index 8785912..cb6ccbb 100644
--- a/server/api/voicePrefix/index.js
+++ b/server/api/voicePrefix/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc370=['addAgents','put','delete','destroy','removeAgents','exports','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./voicePrefix.controller','isAuthenticated','index','get','/describe','/:id','/:id/users','getAgents','post','create'];(function(_0x35f5b5,_0x389e18){var _0x16c86b=function(_0x1e6b4f){while(--_0x1e6b4f){_0x35f5b5['push'](_0x35f5b5['shift']());}};_0x16c86b(++_0x389e18);}(_0xc370,0x13a));var _0x0c37=function(_0x2c6200,_0x3ea2ac){_0x2c6200=_0x2c6200-0x0;var _0x29a36b=_0xc370[_0x2c6200];return _0x29a36b;};'use strict';var multer=require('multer');var util=require(_0x0c37('0x0'));var path=require('path');var timeout=require(_0x0c37('0x1'));var express=require(_0x0c37('0x2'));var router=express[_0x0c37('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x0c37('0x4'));var config=require(_0x0c37('0x5'));var controller=require(_0x0c37('0x6'));router['get']('/',auth[_0x0c37('0x7')](),controller[_0x0c37('0x8')]);router[_0x0c37('0x9')](_0x0c37('0xa'),auth[_0x0c37('0x7')](),controller['describe']);router[_0x0c37('0x9')](_0x0c37('0xb'),auth[_0x0c37('0x7')](),controller['show']);router['get'](_0x0c37('0xc'),auth[_0x0c37('0x7')](),controller[_0x0c37('0xd')]);router[_0x0c37('0xe')]('/',auth[_0x0c37('0x7')](),controller[_0x0c37('0xf')]);router['post'](_0x0c37('0xc'),auth[_0x0c37('0x7')](),controller[_0x0c37('0x10')]);router[_0x0c37('0x11')](_0x0c37('0xb'),auth[_0x0c37('0x7')](),controller['update']);router[_0x0c37('0x12')](_0x0c37('0xb'),auth[_0x0c37('0x7')](),controller[_0x0c37('0x13')]);router[_0x0c37('0x12')](_0x0c37('0xc'),auth[_0x0c37('0x7')](),controller[_0x0c37('0x14')]);module[_0x0c37('0x15')]=router;
\ No newline at end of file
+var _0x082b=['../../components/auth/service','../../components/interaction/service','./voicePrefix.controller','get','index','describe','show','/:id/users','isAuthenticated','getAgents','post','create','addAgents','put','/:id','update','destroy','delete','removeAgents','exports','multer','util','connect-timeout','Router'];(function(_0x57cc7a,_0x1e738d){var _0x5d6159=function(_0xb455d5){while(--_0xb455d5){_0x57cc7a['push'](_0x57cc7a['shift']());}};_0x5d6159(++_0x1e738d);}(_0x082b,0x1ac));var _0xb082=function(_0x286307,_0x309486){_0x286307=_0x286307-0x0;var _0x58cf6a=_0x082b[_0x286307];return _0x58cf6a;};'use strict';var multer=require(_0xb082('0x0'));var util=require(_0xb082('0x1'));var path=require('path');var timeout=require(_0xb082('0x2'));var express=require('express');var router=express[_0xb082('0x3')]();var auth=require(_0xb082('0x4'));var interaction=require(_0xb082('0x5'));var config=require('../../config/environment');var controller=require(_0xb082('0x6'));router[_0xb082('0x7')]('/',auth['isAuthenticated'](),controller[_0xb082('0x8')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0xb082('0x9')]);router[_0xb082('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xb082('0xa')]);router[_0xb082('0x7')](_0xb082('0xb'),auth[_0xb082('0xc')](),controller[_0xb082('0xd')]);router[_0xb082('0xe')]('/',auth[_0xb082('0xc')](),controller[_0xb082('0xf')]);router[_0xb082('0xe')](_0xb082('0xb'),auth[_0xb082('0xc')](),controller[_0xb082('0x10')]);router[_0xb082('0x11')](_0xb082('0x12'),auth[_0xb082('0xc')](),controller[_0xb082('0x13')]);router['delete'](_0xb082('0x12'),auth['isAuthenticated'](),controller[_0xb082('0x14')]);router[_0xb082('0x15')](_0xb082('0xb'),auth[_0xb082('0xc')](),controller[_0xb082('0x16')]);module[_0xb082('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.attributes.js b/server/api/voicePrefix/voicePrefix.attributes.js
index 4df27bb..21d4a12 100644
--- a/server/api/voicePrefix/voicePrefix.attributes.js
+++ b/server/api/voicePrefix/voicePrefix.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8eaa=['VIRTUAL','system-','name','exports'];(function(_0x25599b,_0x5368e9){var _0x4cc078=function(_0x40422f){while(--_0x40422f){_0x25599b['push'](_0x25599b['shift']());}};_0x4cc078(++_0x5368e9);}(_0x8eaa,0x157));var _0xa8ea=function(_0x14ab37,_0x516aee){_0x14ab37=_0x14ab37-0x0;var _0x252b5b=_0x8eaa[_0x14ab37];return _0x252b5b;};'use strict';var Sequelize=require('sequelize');module[_0xa8ea('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'prefix':{'type':Sequelize[_0xa8ea('0x1')],'get':function(_0x28d288){return _0xa8ea('0x2')+this['getDataValue'](_0xa8ea('0x3'))+'-';}},'description':{'type':Sequelize['STRING']},'callerIdAll':{'type':Sequelize['STRING']},'VoiceExtensionId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x0003=['STRING','VIRTUAL','system-','getDataValue','exports'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x0003,0x13a));var _0x3000=function(_0x397c37,_0x501529){_0x397c37=_0x397c37-0x0;var _0x1bd8d5=_0x0003[_0x397c37];return _0x1bd8d5;};'use strict';var Sequelize=require('sequelize');module[_0x3000('0x0')]={'name':{'type':Sequelize[_0x3000('0x1')],'allowNull':![],'unique':'name'},'prefix':{'type':Sequelize[_0x3000('0x2')],'get':function(_0x2488d7){return _0x3000('0x3')+this[_0x3000('0x4')]('name')+'-';}},'description':{'type':Sequelize[_0x3000('0x1')]},'callerIdAll':{'type':Sequelize[_0x3000('0x1')]},'VoiceExtensionId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.controller.js b/server/api/voicePrefix/voicePrefix.controller.js
index 8e92b71..449b756 100644
--- a/server/api/voicePrefix/voicePrefix.controller.js
+++ b/server/api/voicePrefix/voicePrefix.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x55ca=['intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','merge','where','type','VIRTUAL','options','includeAll','include','catch','params','rawAttributes','describe','create','sequelize','transaction','body','VoiceExtension','find','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','exten','app','system','description','priority','appdata','prefix','NoOp','Voice\x20Prefix','VoicePrefixId','bulkCreate','Extensions\x20creation\x20failed','push','Set','callerIdAll','PREFIX-CALLERIDALL=','goto','${EXTEN:','charAt','system-','findById','addAgents','omit','ids','spread','userVoicePrefix:save','removeAgents','isArray','emit','userVoicePrefix:remove','getAgents','findOne','User','html-pdf','eml-format','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','sendStatus','status','end','json','count','offset','limit','reject','update','then','get','VoicePrefixes','UserProfileResource','destroy','stack','name','send','index','VoicePrefix','model','keys','query','filters'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x55ca,0x126));var _0xa55c=function(_0x2e0443,_0x7e5974){_0x2e0443=_0x2e0443-0x0;var _0x52d450=_0x55ca[_0x2e0443];return _0x52d450;};'use strict';var pdf=require(_0xa55c('0x0'));var emlformat=require(_0xa55c('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xa55c('0x2'));var moment=require(_0xa55c('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xa55c('0x4'));var util=require(_0xa55c('0x5'));var path=require(_0xa55c('0x6'));var sox=require(_0xa55c('0x7'));var csv=require(_0xa55c('0x8'));var ejs=require(_0xa55c('0x9'));var fs=require('fs');var _=require(_0xa55c('0xa'));var squel=require('squel');var crypto=require(_0xa55c('0xb'));var jsforce=require(_0xa55c('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa55c('0x8'));var querystring=require(_0xa55c('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xa55c('0xe'));var qs=require(_0xa55c('0xf'));var hardwareService=require(_0xa55c('0x10'));var logger=require(_0xa55c('0x11'))(_0xa55c('0x12'));var utils=require(_0xa55c('0x13'));var config=require(_0xa55c('0x14'));var db=require(_0xa55c('0x15'))['db'];config[_0xa55c('0x16')]=_[_0xa55c('0x17')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xa55c('0x18'))(new Redis(config['redis']));require('./voicePrefix.socket')['register'](socket);function respondWithStatusCode(_0x18ee85,_0x3930e4){_0x3930e4=_0x3930e4||0xcc;return function(_0x462cd6){if(_0x462cd6){return _0x18ee85[_0xa55c('0x19')](_0x3930e4);}return _0x18ee85[_0xa55c('0x1a')](_0x3930e4)[_0xa55c('0x1b')]();};}function respondWithResult(_0x4e0b2f,_0x3ccf65){_0x3ccf65=_0x3ccf65||0xc8;return function(_0x3dcf4f){if(_0x3dcf4f){return _0x4e0b2f[_0xa55c('0x1a')](_0x3ccf65)[_0xa55c('0x1c')](_0x3dcf4f);}};}function respondWithFilteredResult(_0x1c4cfd,_0x3ae86b){return function(_0x51590e){if(_0x51590e){var _0x2d09d8=_0x51590e[_0xa55c('0x1d')],_0x24783b=_0x3ae86b[_0xa55c('0x1e')],_0x4cee3c=_0x3ae86b[_0xa55c('0x1e')]+_0x3ae86b[_0xa55c('0x1f')],_0x3d4c9e;if(_0x4cee3c>=_0x2d09d8){_0x4cee3c=_0x2d09d8;_0x3d4c9e=0xc8;}else{_0x3d4c9e=0xce;}_0x1c4cfd[_0xa55c('0x1a')](_0x3d4c9e);return _0x1c4cfd['set']('Content-Range',_0x24783b+'-'+_0x4cee3c+'/'+_0x2d09d8)[_0xa55c('0x1c')](_0x51590e);}return null;};}function patchUpdates(_0x3776ac){return function(_0xade4c4){try{jsonpatch['apply'](_0xade4c4,_0x3776ac,!![]);}catch(_0x383d92){return BPromise[_0xa55c('0x20')](_0x383d92);}return _0xade4c4['save']();};}function saveUpdates(_0x187a87,_0x133096){return function(_0x940f28){if(_0x940f28){return _0x940f28[_0xa55c('0x21')](_0x187a87)[_0xa55c('0x22')](function(_0x49ed04){return _0x49ed04;});}return null;};}function removeEntity(_0x1fc828,_0x504c24){return function(_0x5ba836){if(_0x5ba836){return _0x5ba836['destroy']()[_0xa55c('0x22')](function(){var _0x54b038=_0x5ba836[_0xa55c('0x23')]({'plain':!![]});var _0x190757=_0xa55c('0x24');return db[_0xa55c('0x25')][_0xa55c('0x26')]({'where':{'type':_0x190757,'resourceId':_0x54b038['id']}})[_0xa55c('0x22')](function(){return _0x5ba836;});})[_0xa55c('0x22')](function(){_0x1fc828[_0xa55c('0x1a')](0xcc)[_0xa55c('0x1b')]();});}};}function handleEntityNotFound(_0x3cd152,_0x1273d7){return function(_0x57f271){if(!_0x57f271){_0x3cd152[_0xa55c('0x19')](0x194);}return _0x57f271;};}function handleError(_0x28814f,_0x1c9f6b){_0x1c9f6b=_0x1c9f6b||0x1f4;return function(_0x906caa){logger['error'](_0x906caa[_0xa55c('0x27')]);if(_0x906caa[_0xa55c('0x28')]){delete _0x906caa[_0xa55c('0x28')];}_0x28814f[_0xa55c('0x1a')](_0x1c9f6b)[_0xa55c('0x29')](_0x906caa);};}exports[_0xa55c('0x2a')]=function(_0x52d37f,_0x23e698){var _0x490b7d={},_0x35c9c2={},_0x1d730b={'count':0x0,'rows':[]};var _0x1cc53e=db[_0xa55c('0x2b')]['rawAttributes'];_0x35c9c2[_0xa55c('0x2c')]=_[_0xa55c('0x2d')](_0x1cc53e);_0x35c9c2[_0xa55c('0x2e')]=_[_0xa55c('0x2d')](_0x52d37f[_0xa55c('0x2e')]);_0x35c9c2[_0xa55c('0x2f')]=_[_0xa55c('0x30')](_0x35c9c2[_0xa55c('0x2c')],_0x35c9c2[_0xa55c('0x2e')]);_0x490b7d[_0xa55c('0x31')]=_[_0xa55c('0x30')](_0x35c9c2['model'],qs['fields'](_0x52d37f[_0xa55c('0x2e')][_0xa55c('0x32')]));_0x490b7d['attributes']=_0x490b7d[_0xa55c('0x31')][_0xa55c('0x33')]?_0x490b7d[_0xa55c('0x31')]:_0x35c9c2[_0xa55c('0x2c')];if(!_0x52d37f[_0xa55c('0x2e')][_0xa55c('0x34')](_0xa55c('0x35'))){_0x490b7d[_0xa55c('0x1f')]=qs[_0xa55c('0x1f')](_0x52d37f['query']['limit']);_0x490b7d['offset']=qs[_0xa55c('0x1e')](_0x52d37f[_0xa55c('0x2e')][_0xa55c('0x1e')]);}_0x490b7d['order']=qs[_0xa55c('0x36')](_0x52d37f['query'][_0xa55c('0x36')]);_0x490b7d['where']=qs[_0xa55c('0x2f')](_[_0xa55c('0x37')](_0x52d37f[_0xa55c('0x2e')],_0x35c9c2['filters']));if(_0x52d37f[_0xa55c('0x2e')][_0xa55c('0x38')]){_0x490b7d['where']=_[_0xa55c('0x39')](_0x490b7d[_0xa55c('0x3a')],{'$or':_['map'](_0x1cc53e,function(_0x529ff8){if(_0x529ff8[_0xa55c('0x3b')]['key']!==_0xa55c('0x3c')){var _0x284bcf={};_0x284bcf[_0x529ff8['field']]={'$like':'%'+_0x52d37f['query']['filter']+'%'};return _0x284bcf;}})});}_0x490b7d=_['merge']({},_0x490b7d,_0x52d37f[_0xa55c('0x3d')]);var _0x45bd15={'where':_0x490b7d[_0xa55c('0x3a')]};return db[_0xa55c('0x2b')][_0xa55c('0x1d')](_0x45bd15)['then'](function(_0x3d52d8){_0x1d730b[_0xa55c('0x1d')]=_0x3d52d8;if(_0x52d37f[_0xa55c('0x2e')][_0xa55c('0x3e')]){_0x490b7d[_0xa55c('0x3f')]=[{'all':!![]}];}return db[_0xa55c('0x2b')]['findAll'](_0x490b7d);})[_0xa55c('0x22')](function(_0x5ee63d){_0x1d730b['rows']=_0x5ee63d;return _0x1d730b;})[_0xa55c('0x22')](respondWithFilteredResult(_0x23e698,_0x490b7d))[_0xa55c('0x40')](handleError(_0x23e698,null));};exports['show']=function(_0x2bd98b,_0x508bd3){var _0x5f25f7={'raw':![],'where':{'id':_0x2bd98b[_0xa55c('0x41')]['id']}},_0x2f8449={};_0x2f8449[_0xa55c('0x2c')]=_['keys'](db[_0xa55c('0x2b')][_0xa55c('0x42')]);_0x2f8449['query']=_[_0xa55c('0x2d')](_0x2bd98b['query']);_0x2f8449[_0xa55c('0x2f')]=_[_0xa55c('0x30')](_0x2f8449['model'],_0x2f8449[_0xa55c('0x2e')]);_0x5f25f7[_0xa55c('0x31')]=_['intersection'](_0x2f8449[_0xa55c('0x2c')],qs[_0xa55c('0x32')](_0x2bd98b[_0xa55c('0x2e')]['fields']));_0x5f25f7[_0xa55c('0x31')]=_0x5f25f7['attributes'][_0xa55c('0x33')]?_0x5f25f7[_0xa55c('0x31')]:_0x2f8449[_0xa55c('0x2c')];if(_0x2bd98b['query'][_0xa55c('0x3e')]){_0x5f25f7[_0xa55c('0x3f')]=[{'all':!![]}];}_0x5f25f7=_['merge']({},_0x5f25f7,_0x2bd98b[_0xa55c('0x3d')]);return db[_0xa55c('0x2b')]['find'](_0x5f25f7)[_0xa55c('0x22')](handleEntityNotFound(_0x508bd3,null))[_0xa55c('0x22')](respondWithResult(_0x508bd3,null))['catch'](handleError(_0x508bd3,null));};exports[_0xa55c('0x26')]=function(_0x81cee8,_0x219a68){return db[_0xa55c('0x2b')]['find']({'where':{'id':_0x81cee8[_0xa55c('0x41')]['id']}})['then'](handleEntityNotFound(_0x219a68,null))[_0xa55c('0x22')](removeEntity(_0x219a68,null))[_0xa55c('0x40')](handleError(_0x219a68,null));};exports[_0xa55c('0x43')]=function(_0x4a7adc,_0x39bd3d){return db[_0xa55c('0x2b')]['describe']()[_0xa55c('0x22')](respondWithResult(_0x39bd3d,null))[_0xa55c('0x40')](handleError(_0x39bd3d,null));};exports[_0xa55c('0x44')]=function(_0xcd78c5,_0x36b7e9){var _0x1c84d9;return db[_0xa55c('0x45')][_0xa55c('0x46')](function(_0x3c147b){return db[_0xa55c('0x2b')]['create'](_0xcd78c5[_0xa55c('0x47')],{'transaction':_0x3c147b})[_0xa55c('0x22')](function(_0x216de8){_0x1c84d9=_0x216de8['get']({'plain':!![]});return db[_0xa55c('0x48')][_0xa55c('0x49')]({'where':{'id':_0x1c84d9['VoiceExtensionId']},'raw':!![]})[_0xa55c('0x22')](function(_0x4fa412){return createVoicePrefixExtensions(_0x1c84d9,_0x4fa412,_0x3c147b);});});})[_0xa55c('0x22')](function(){var _0x228df4=_0xcd78c5[_0xa55c('0x4a')][_0xa55c('0x23')]({'plain':!![]});if(!_0x228df4)throw new Error(_0xa55c('0x4b'));if(_0x228df4['role']===_0xa55c('0x4a')){var _0x4607ca=_0x1c84d9;return db['UserProfileSection'][_0xa55c('0x49')]({'where':{'name':_0xa55c('0x24'),'userProfileId':_0x228df4[_0xa55c('0x4c')]},'raw':!![]})[_0xa55c('0x22')](function(_0x50176b){if(_0x50176b&&_0x50176b['autoAssociation']===0x0){return db[_0xa55c('0x25')][_0xa55c('0x44')]({'name':_0x4607ca[_0xa55c('0x28')],'resourceId':_0x4607ca['id'],'type':_0x50176b[_0xa55c('0x28')],'sectionId':_0x50176b['id']},{})['then'](function(){return _0x1c84d9;});}else{return _0x1c84d9;}})[_0xa55c('0x40')](function(_0x5ce463){logger[_0xa55c('0x4d')](_0xa55c('0x4e'),_0x5ce463);throw _0x5ce463;});}return _0x1c84d9;})[_0xa55c('0x22')](respondWithResult(_0x36b7e9,null))[_0xa55c('0x40')](handleError(_0x36b7e9,null));};function Extension(_0xec640,_0x53b2f7,_0x1cb73b,_0x54f776){this[_0xa55c('0x4f')]=_0xa55c('0x50');this[_0xa55c('0x51')]=_0xec640;this[_0xa55c('0x52')]=_0x1cb73b;this[_0xa55c('0x3b')]=_0xa55c('0x53');this[_0xa55c('0x54')]='Voice\x20Prefix\x20Extension';this[_0xa55c('0x55')]=_0x53b2f7;this[_0xa55c('0x56')]=_0x54f776;}function createVoicePrefixExtensions(_0x2f2d21,_0x23a30e,_0x3fa00f){return new BPromise(function(_0x5ba2b0,_0xa72718){var _0x3cd40d=new Extension(formatPrefixName(_0x2f2d21[_0xa55c('0x57')]),0x1,_0xa55c('0x58'),_0xa55c('0x59'));_0x3cd40d['VoicePrefixId']=_0x2f2d21['id'];return db[_0xa55c('0x48')][_0xa55c('0x44')](_0x3cd40d,{'transaction':_0x3fa00f})[_0xa55c('0x22')](function(_0x16d9b2){var _0x3ba56d=_0x16d9b2['get']({'plain':!![]});var _0x419fc3=_['map'](addVoicePrefixExtensions(_0x2f2d21,_0x23a30e),function(_0x2e482a){_0x2e482a['VoiceExtensionId']=_0x3ba56d['id'];_0x2e482a[_0xa55c('0x5a')]=_0x2f2d21['id'];return _0x2e482a;});return db['VoiceExtension'][_0xa55c('0x5b')](_0x419fc3,{'transaction':_0x3fa00f})[_0xa55c('0x22')](function(_0x21d6b4){if(!_0x21d6b4){return _0xa72718(_0xa55c('0x5c'));}else{return _0x5ba2b0(_0x21d6b4);}})[_0xa55c('0x40')](function(_0x3a5a52){return _0xa72718(_0x3a5a52);});});;});};function addVoicePrefixExtensions(_0xafaf8c,_0x2f2226){var _0x14b515=[];var _0x1acf50=formatPrefixName(_0xafaf8c['prefix']);_0x14b515[_0xa55c('0x5d')](new Extension(_0x1acf50,0x2,_0xa55c('0x5e'),'CDR(prefix)='+_0xafaf8c[_0xa55c('0x28')]));if(_0xafaf8c[_0xa55c('0x5f')]){_0x14b515[_0xa55c('0x5d')](new Extension(_0x1acf50,0x3,_0xa55c('0x5e'),_0xa55c('0x60')+_0xafaf8c[_0xa55c('0x5f')]));}else{_0x14b515[_0xa55c('0x5d')](new Extension(_0x1acf50,0x3,_0xa55c('0x58'),'No\x20callerid\x20available'));}_0x14b515[_0xa55c('0x5d')](new Extension(_0x1acf50,0x4,_0xa55c('0x61'),_0x2f2226[_0xa55c('0x4f')]+','+_0xa55c('0x62')+(0x8+_0xafaf8c[_0xa55c('0x28')][_0xa55c('0x33')])+'}'+','+0x1));return _0x14b515;}function formatPrefixName(_0x2f1237){var _0x4249c1='_';for(var _0x25d5a1=0x0;_0x25d5a1<_0x2f1237['length'];_0x25d5a1++){if(_0x2f1237[_0xa55c('0x63')](_0x25d5a1)=='-'){_0x4249c1+=_0x2f1237[_0xa55c('0x63')](_0x25d5a1);}else{_0x4249c1+='['+_0x2f1237[_0xa55c('0x63')](_0x25d5a1)+']';}}_0x4249c1+='.';return _0x4249c1;}exports[_0xa55c('0x21')]=function(_0x3a269d,_0x10e711,_0x3ea755){var _0x3606b2=_0x3a269d[_0xa55c('0x47')];_0x3606b2[_0xa55c('0x57')]=_0xa55c('0x64')+_0x3606b2['name']+'-';return db[_0xa55c('0x45')]['transaction'](function(_0x1228a4){return db[_0xa55c('0x2b')][_0xa55c('0x21')](_0x3606b2,{'where':{'id':_0x3606b2['id']},'transaction':_0x1228a4})['then'](function(){return db['VoiceExtension'][_0xa55c('0x26')]({'where':{'VoicePrefixId':_0x3606b2['id']},'transaction':_0x1228a4})[_0xa55c('0x22')](function(){return db[_0xa55c('0x48')][_0xa55c('0x49')]({'where':{'id':_0x3606b2['VoiceExtensionId']},'raw':!![]})[_0xa55c('0x22')](function(_0xd02251){return createVoicePrefixExtensions(_0x3606b2,_0xd02251,_0x1228a4);});});});})[_0xa55c('0x22')](function(){return db[_0xa55c('0x2b')][_0xa55c('0x65')](_0x3606b2['id']);})['then'](respondWithResult(_0x10e711,null))['catch'](handleError(_0x10e711,null));};exports[_0xa55c('0x66')]=function(_0x38689e,_0x3f9d0a,_0x36ee32){return db[_0xa55c('0x2b')]['find']({'where':{'id':_0x38689e[_0xa55c('0x41')]['id']}})[_0xa55c('0x22')](handleEntityNotFound(_0x3f9d0a,null))['then'](function(_0x2ce255){if(_0x2ce255){return _0x2ce255[_0xa55c('0x66')](_0x38689e[_0xa55c('0x47')]['ids'],_[_0xa55c('0x67')](_0x38689e[_0xa55c('0x47')],[_0xa55c('0x68'),'id'])||{})[_0xa55c('0x69')](function(_0x232143){for(var _0x506f74=0x0;_0x506f74<_0x38689e[_0xa55c('0x47')][_0xa55c('0x68')]['length'];_0x506f74+=0x1){socket['emit'](_0xa55c('0x6a'),{'UserId':_0x38689e['body'][_0xa55c('0x68')][_0x506f74],'VoicePrefixId':_0x38689e[_0xa55c('0x41')]['id']});}return _0x232143;});}})[_0xa55c('0x22')](respondWithResult(_0x3f9d0a,null))[_0xa55c('0x40')](handleError(_0x3f9d0a,null));};exports[_0xa55c('0x6b')]=function(_0x3f1132,_0x22b06f,_0xff7b1c){return db[_0xa55c('0x2b')]['find']({'where':{'id':_0x3f1132[_0xa55c('0x41')]['id']}})[_0xa55c('0x22')](handleEntityNotFound(_0x22b06f,null))[_0xa55c('0x22')](function(_0x20ddd0){if(_0x20ddd0){return _0x20ddd0['removeAgents'](_0x3f1132[_0xa55c('0x2e')][_0xa55c('0x68')])[_0xa55c('0x22')](function(){if(_[_0xa55c('0x6c')](_0x3f1132['query']['ids'])){for(var _0x367470=0x0;_0x367470<_0x3f1132[_0xa55c('0x2e')][_0xa55c('0x68')][_0xa55c('0x33')];_0x367470+=0x1){socket['emit']('userVoicePrefix:remove',{'UserId':Number(_0x3f1132[_0xa55c('0x2e')][_0xa55c('0x68')][_0x367470]),'VoicePrefixId':Number(_0x3f1132[_0xa55c('0x41')]['id'])});}}else{socket[_0xa55c('0x6d')](_0xa55c('0x6e'),{'UserId':Number(_0x3f1132[_0xa55c('0x2e')][_0xa55c('0x68')]),'VoicePrefixId':Number(_0x3f1132['params']['id'])});}});}})[_0xa55c('0x22')](respondWithStatusCode(_0x22b06f,null))['catch'](handleError(_0x22b06f,null));};exports[_0xa55c('0x6f')]=function(_0x4845c3,_0x36ded7,_0x313cdc){var _0x441c11={};var _0xcc187f={};var _0xe3444f;var _0x402f02;return db[_0xa55c('0x2b')][_0xa55c('0x70')]({'where':{'id':_0x4845c3['params']['id']}})['then'](handleEntityNotFound(_0x36ded7,null))[_0xa55c('0x22')](function(_0x2948b1){if(_0x2948b1){_0xe3444f=_0x2948b1;_0xcc187f[_0xa55c('0x2c')]=_[_0xa55c('0x2d')](db[_0xa55c('0x71')][_0xa55c('0x42')]);_0xcc187f['query']=_[_0xa55c('0x2d')](_0x4845c3[_0xa55c('0x2e')]);_0xcc187f[_0xa55c('0x2f')]=_[_0xa55c('0x30')](_0xcc187f[_0xa55c('0x2c')],_0xcc187f[_0xa55c('0x2e')]);_0x441c11[_0xa55c('0x31')]=_[_0xa55c('0x30')](_0xcc187f['model'],qs[_0xa55c('0x32')](_0x4845c3[_0xa55c('0x2e')][_0xa55c('0x32')]));_0x441c11[_0xa55c('0x31')]=_0x441c11[_0xa55c('0x31')]['length']?_0x441c11[_0xa55c('0x31')]:_0xcc187f[_0xa55c('0x2c')];_0x441c11['order']=qs['sort'](_0x4845c3[_0xa55c('0x2e')][_0xa55c('0x36')]);_0x441c11['where']=qs['filters'](_['pick'](_0x4845c3['query'],_0xcc187f[_0xa55c('0x2f')]));if(_0x4845c3[_0xa55c('0x2e')][_0xa55c('0x38')]){_0x441c11[_0xa55c('0x3a')]=_[_0xa55c('0x39')](_0x441c11[_0xa55c('0x3a')],{'$or':_['map'](_0x441c11[_0xa55c('0x31')],function(_0x3b6abe){var _0x2c89b1={};_0x2c89b1[_0x3b6abe]={'$like':'%'+_0x4845c3[_0xa55c('0x2e')]['filter']+'%'};return _0x2c89b1;})});}_0x441c11=_[_0xa55c('0x39')]({},_0x441c11,_0x4845c3[_0xa55c('0x3d')]);return _0xe3444f[_0xa55c('0x6f')](_0x441c11);}})['then'](function(_0x3459fd){if(_0x3459fd){_0x402f02=_0x3459fd['length'];if(!_0x4845c3['query'][_0xa55c('0x34')](_0xa55c('0x35'))){_0x441c11[_0xa55c('0x1f')]=qs[_0xa55c('0x1f')](_0x4845c3[_0xa55c('0x2e')][_0xa55c('0x1f')]);_0x441c11[_0xa55c('0x1e')]=qs['offset'](_0x4845c3['query'][_0xa55c('0x1e')]);}return _0xe3444f[_0xa55c('0x6f')](_0x441c11);}})[_0xa55c('0x22')](function(_0x1f4bc8){if(_0x1f4bc8){return _0x1f4bc8?{'count':_0x402f02,'rows':_0x1f4bc8}:null;}})[_0xa55c('0x22')](respondWithResult(_0x36ded7,null))[_0xa55c('0x40')](handleError(_0x36ded7,null));};
\ No newline at end of file
+var _0x3e74=['VoicePrefixId','bulkCreate','Extensions\x20creation\x20failed','prefix','push','Set','callerIdAll','No\x20callerid\x20available','goto','${EXTEN:','charAt','system-','transaction','findById','addAgents','ids','omit','emit','userVoicePrefix:save','removeAgents','getAgents','findOne','User','hasOwnProperty','nolimit','html-pdf','rimraf','zip-dir','fast-json-patch','bluebird','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','status','end','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','get','VoicePrefixes','sendStatus','stack','name','send','index','VoicePrefix','rawAttributes','keys','query','filters','model','attributes','intersection','fields','length','order','sort','where','filter','merge','map','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','find','params','describe','create','sequelize','body','VoiceExtension','VoiceExtensionId','role','user','UserProfileSection','autoAssociation','UserProfileResource','error','exten','app','system','priority','appdata','NoOp','Voice\x20Prefix'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x3e74,0x175));var _0x43e7=function(_0x73123e,_0x22aaa3){_0x73123e=_0x73123e-0x0;var _0x50b144=_0x3e74[_0x73123e];return _0x50b144;};'use strict';var pdf=require(_0x43e7('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x43e7('0x1'));var zipdir=require(_0x43e7('0x2'));var jsonpatch=require(_0x43e7('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x43e7('0x4'));var Mustache=require('mustache');var util=require(_0x43e7('0x5'));var path=require(_0x43e7('0x6'));var sox=require(_0x43e7('0x7'));var csv=require(_0x43e7('0x8'));var ejs=require(_0x43e7('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x43e7('0xa'));var crypto=require(_0x43e7('0xb'));var jsforce=require(_0x43e7('0xc'));var deskjs=require(_0x43e7('0xd'));var toCsv=require(_0x43e7('0x8'));var querystring=require('querystring');var Papa=require(_0x43e7('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x43e7('0xf'));var hardwareService=require(_0x43e7('0x10'));var logger=require('../../config/logger')(_0x43e7('0x11'));var utils=require('../../config/utils');var config=require(_0x43e7('0x12'));var db=require(_0x43e7('0x13'))['db'];config['redis']=_[_0x43e7('0x14')](config[_0x43e7('0x15')],{'host':_0x43e7('0x16'),'port':0x18eb});var socket=require(_0x43e7('0x17'))(new Redis(config['redis']));require('./voicePrefix.socket')[_0x43e7('0x18')](socket);function respondWithStatusCode(_0x21fdd3,_0x44b0bd){_0x44b0bd=_0x44b0bd||0xcc;return function(_0x51b974){if(_0x51b974){return _0x21fdd3['sendStatus'](_0x44b0bd);}return _0x21fdd3[_0x43e7('0x19')](_0x44b0bd)[_0x43e7('0x1a')]();};}function respondWithResult(_0x203378,_0x328445){_0x328445=_0x328445||0xc8;return function(_0x4de324){if(_0x4de324){return _0x203378['status'](_0x328445)[_0x43e7('0x1b')](_0x4de324);}};}function respondWithFilteredResult(_0x264575,_0x273a32){return function(_0x5d346f){if(_0x5d346f){var _0x4b5a6b=_0x5d346f[_0x43e7('0x1c')],_0x446986=_0x273a32[_0x43e7('0x1d')],_0x1ca758=_0x273a32[_0x43e7('0x1d')]+_0x273a32[_0x43e7('0x1e')],_0x9037d3;if(_0x1ca758>=_0x4b5a6b){_0x1ca758=_0x4b5a6b;_0x9037d3=0xc8;}else{_0x9037d3=0xce;}_0x264575[_0x43e7('0x19')](_0x9037d3);return _0x264575[_0x43e7('0x1f')](_0x43e7('0x20'),_0x446986+'-'+_0x1ca758+'/'+_0x4b5a6b)[_0x43e7('0x1b')](_0x5d346f);}return null;};}function patchUpdates(_0x177ee1){return function(_0x4b5d64){try{jsonpatch[_0x43e7('0x21')](_0x4b5d64,_0x177ee1,!![]);}catch(_0x3c6625){return BPromise['reject'](_0x3c6625);}return _0x4b5d64[_0x43e7('0x22')]();};}function saveUpdates(_0x3e281e,_0x3945bb){return function(_0x28aacc){if(_0x28aacc){return _0x28aacc[_0x43e7('0x23')](_0x3e281e)[_0x43e7('0x24')](function(_0x54a9e7){return _0x54a9e7;});}return null;};}function removeEntity(_0x454359,_0x4eea52){return function(_0x4c9df3){if(_0x4c9df3){return _0x4c9df3[_0x43e7('0x25')]()[_0x43e7('0x24')](function(){var _0x4b2b9f=_0x4c9df3[_0x43e7('0x26')]({'plain':!![]});var _0x4ca5cf=_0x43e7('0x27');return db['UserProfileResource'][_0x43e7('0x25')]({'where':{'type':_0x4ca5cf,'resourceId':_0x4b2b9f['id']}})[_0x43e7('0x24')](function(){return _0x4c9df3;});})[_0x43e7('0x24')](function(){_0x454359[_0x43e7('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x52b7b3,_0x805b54){return function(_0x501551){if(!_0x501551){_0x52b7b3[_0x43e7('0x28')](0x194);}return _0x501551;};}function handleError(_0x40dc8f,_0x3565cf){_0x3565cf=_0x3565cf||0x1f4;return function(_0xb1fc63){logger['error'](_0xb1fc63[_0x43e7('0x29')]);if(_0xb1fc63[_0x43e7('0x2a')]){delete _0xb1fc63[_0x43e7('0x2a')];}_0x40dc8f[_0x43e7('0x19')](_0x3565cf)[_0x43e7('0x2b')](_0xb1fc63);};}exports[_0x43e7('0x2c')]=function(_0x2b85a5,_0x31b2a6){var _0x3bf475={},_0x35dbcd={},_0x17df44={'count':0x0,'rows':[]};var _0x19725a=db[_0x43e7('0x2d')][_0x43e7('0x2e')];_0x35dbcd['model']=_[_0x43e7('0x2f')](_0x19725a);_0x35dbcd[_0x43e7('0x30')]=_[_0x43e7('0x2f')](_0x2b85a5[_0x43e7('0x30')]);_0x35dbcd[_0x43e7('0x31')]=_['intersection'](_0x35dbcd[_0x43e7('0x32')],_0x35dbcd[_0x43e7('0x30')]);_0x3bf475[_0x43e7('0x33')]=_[_0x43e7('0x34')](_0x35dbcd['model'],qs['fields'](_0x2b85a5['query'][_0x43e7('0x35')]));_0x3bf475[_0x43e7('0x33')]=_0x3bf475[_0x43e7('0x33')][_0x43e7('0x36')]?_0x3bf475[_0x43e7('0x33')]:_0x35dbcd[_0x43e7('0x32')];if(!_0x2b85a5['query']['hasOwnProperty']('nolimit')){_0x3bf475['limit']=qs['limit'](_0x2b85a5['query']['limit']);_0x3bf475[_0x43e7('0x1d')]=qs['offset'](_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x1d')]);}_0x3bf475[_0x43e7('0x37')]=qs[_0x43e7('0x38')](_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x38')]);_0x3bf475[_0x43e7('0x39')]=qs['filters'](_['pick'](_0x2b85a5['query'],_0x35dbcd[_0x43e7('0x31')]));if(_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x3a')]){_0x3bf475[_0x43e7('0x39')]=_[_0x43e7('0x3b')](_0x3bf475[_0x43e7('0x39')],{'$or':_[_0x43e7('0x3c')](_0x19725a,function(_0x2ffd43){if(_0x2ffd43['type'][_0x43e7('0x3d')]!==_0x43e7('0x3e')){var _0x4a3ea2={};_0x4a3ea2[_0x2ffd43[_0x43e7('0x3f')]]={'$like':'%'+_0x2b85a5['query'][_0x43e7('0x3a')]+'%'};return _0x4a3ea2;}})});}_0x3bf475=_[_0x43e7('0x3b')]({},_0x3bf475,_0x2b85a5[_0x43e7('0x40')]);var _0x353852={'where':_0x3bf475[_0x43e7('0x39')]};return db[_0x43e7('0x2d')]['count'](_0x353852)['then'](function(_0x30dfa9){_0x17df44[_0x43e7('0x1c')]=_0x30dfa9;if(_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x41')]){_0x3bf475[_0x43e7('0x42')]=[{'all':!![]}];}return db['VoicePrefix'][_0x43e7('0x43')](_0x3bf475);})[_0x43e7('0x24')](function(_0x575439){_0x17df44[_0x43e7('0x44')]=_0x575439;return _0x17df44;})['then'](respondWithFilteredResult(_0x31b2a6,_0x3bf475))[_0x43e7('0x45')](handleError(_0x31b2a6,null));};exports['show']=function(_0x3d81ae,_0x3b4235){var _0x3a5807={'raw':![],'where':{'id':_0x3d81ae['params']['id']}},_0x1c2c6b={};_0x1c2c6b['model']=_[_0x43e7('0x2f')](db[_0x43e7('0x2d')][_0x43e7('0x2e')]);_0x1c2c6b[_0x43e7('0x30')]=_['keys'](_0x3d81ae['query']);_0x1c2c6b['filters']=_[_0x43e7('0x34')](_0x1c2c6b['model'],_0x1c2c6b[_0x43e7('0x30')]);_0x3a5807['attributes']=_['intersection'](_0x1c2c6b[_0x43e7('0x32')],qs['fields'](_0x3d81ae[_0x43e7('0x30')][_0x43e7('0x35')]));_0x3a5807[_0x43e7('0x33')]=_0x3a5807[_0x43e7('0x33')]['length']?_0x3a5807[_0x43e7('0x33')]:_0x1c2c6b[_0x43e7('0x32')];if(_0x3d81ae[_0x43e7('0x30')][_0x43e7('0x41')]){_0x3a5807[_0x43e7('0x42')]=[{'all':!![]}];}_0x3a5807=_[_0x43e7('0x3b')]({},_0x3a5807,_0x3d81ae['options']);return db['VoicePrefix'][_0x43e7('0x46')](_0x3a5807)[_0x43e7('0x24')](handleEntityNotFound(_0x3b4235,null))[_0x43e7('0x24')](respondWithResult(_0x3b4235,null))['catch'](handleError(_0x3b4235,null));};exports['destroy']=function(_0x56489b,_0x292ded){return db[_0x43e7('0x2d')]['find']({'where':{'id':_0x56489b[_0x43e7('0x47')]['id']}})[_0x43e7('0x24')](handleEntityNotFound(_0x292ded,null))[_0x43e7('0x24')](removeEntity(_0x292ded,null))['catch'](handleError(_0x292ded,null));};exports['describe']=function(_0x4ec263,_0x4de644){return db[_0x43e7('0x2d')][_0x43e7('0x48')]()['then'](respondWithResult(_0x4de644,null))[_0x43e7('0x45')](handleError(_0x4de644,null));};exports[_0x43e7('0x49')]=function(_0x426bcb,_0x895f41){var _0x4a0ce5;return db[_0x43e7('0x4a')]['transaction'](function(_0x4bebd4){return db[_0x43e7('0x2d')][_0x43e7('0x49')](_0x426bcb[_0x43e7('0x4b')],{'transaction':_0x4bebd4})[_0x43e7('0x24')](function(_0x13503c){_0x4a0ce5=_0x13503c[_0x43e7('0x26')]({'plain':!![]});return db[_0x43e7('0x4c')][_0x43e7('0x46')]({'where':{'id':_0x4a0ce5[_0x43e7('0x4d')]},'raw':!![]})[_0x43e7('0x24')](function(_0x58dfd0){return createVoicePrefixExtensions(_0x4a0ce5,_0x58dfd0,_0x4bebd4);});});})[_0x43e7('0x24')](function(){var _0x46c910=_0x426bcb['user'][_0x43e7('0x26')]({'plain':!![]});if(!_0x46c910)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x46c910[_0x43e7('0x4e')]===_0x43e7('0x4f')){var _0x34e2ec=_0x4a0ce5;return db[_0x43e7('0x50')][_0x43e7('0x46')]({'where':{'name':'VoicePrefixes','userProfileId':_0x46c910['userProfileId']},'raw':!![]})[_0x43e7('0x24')](function(_0x2ab7ee){if(_0x2ab7ee&&_0x2ab7ee[_0x43e7('0x51')]===0x0){return db[_0x43e7('0x52')][_0x43e7('0x49')]({'name':_0x34e2ec[_0x43e7('0x2a')],'resourceId':_0x34e2ec['id'],'type':_0x2ab7ee[_0x43e7('0x2a')],'sectionId':_0x2ab7ee['id']},{})[_0x43e7('0x24')](function(){return _0x4a0ce5;});}else{return _0x4a0ce5;}})[_0x43e7('0x45')](function(_0x24e758){logger[_0x43e7('0x53')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x24e758);throw _0x24e758;});}return _0x4a0ce5;})[_0x43e7('0x24')](respondWithResult(_0x895f41,null))[_0x43e7('0x45')](handleError(_0x895f41,null));};function Extension(_0x50a3fa,_0x4314d8,_0x220bf2,_0x2d0052){this['context']='from-sip';this[_0x43e7('0x54')]=_0x50a3fa;this[_0x43e7('0x55')]=_0x220bf2;this['type']=_0x43e7('0x56');this['description']='Voice\x20Prefix\x20Extension';this[_0x43e7('0x57')]=_0x4314d8;this[_0x43e7('0x58')]=_0x2d0052;}function createVoicePrefixExtensions(_0x1f7c02,_0x40155c,_0x68697){return new BPromise(function(_0x4dfdb0,_0xc3976){var _0xdb9fbe=new Extension(formatPrefixName(_0x1f7c02['prefix']),0x1,_0x43e7('0x59'),_0x43e7('0x5a'));_0xdb9fbe[_0x43e7('0x5b')]=_0x1f7c02['id'];return db['VoiceExtension']['create'](_0xdb9fbe,{'transaction':_0x68697})['then'](function(_0x2ada55){var _0x4058ce=_0x2ada55[_0x43e7('0x26')]({'plain':!![]});var _0x3a6404=_['map'](addVoicePrefixExtensions(_0x1f7c02,_0x40155c),function(_0x5a50fc){_0x5a50fc[_0x43e7('0x4d')]=_0x4058ce['id'];_0x5a50fc[_0x43e7('0x5b')]=_0x1f7c02['id'];return _0x5a50fc;});return db[_0x43e7('0x4c')][_0x43e7('0x5c')](_0x3a6404,{'transaction':_0x68697})['then'](function(_0x4438c0){if(!_0x4438c0){return _0xc3976(_0x43e7('0x5d'));}else{return _0x4dfdb0(_0x4438c0);}})[_0x43e7('0x45')](function(_0x2a194d){return _0xc3976(_0x2a194d);});});;});};function addVoicePrefixExtensions(_0x3369b8,_0xd41e79){var _0x4665db=[];var _0x46748f=formatPrefixName(_0x3369b8[_0x43e7('0x5e')]);_0x4665db[_0x43e7('0x5f')](new Extension(_0x46748f,0x2,_0x43e7('0x60'),'CDR(prefix)='+_0x3369b8['name']));if(_0x3369b8[_0x43e7('0x61')]){_0x4665db['push'](new Extension(_0x46748f,0x3,'Set','PREFIX-CALLERIDALL='+_0x3369b8[_0x43e7('0x61')]));}else{_0x4665db[_0x43e7('0x5f')](new Extension(_0x46748f,0x3,'NoOp',_0x43e7('0x62')));}_0x4665db[_0x43e7('0x5f')](new Extension(_0x46748f,0x4,_0x43e7('0x63'),_0xd41e79['context']+','+_0x43e7('0x64')+(0x8+_0x3369b8[_0x43e7('0x2a')][_0x43e7('0x36')])+'}'+','+0x1));return _0x4665db;}function formatPrefixName(_0xc9723){var _0x2f43d7='_';for(var _0x472a19=0x0;_0x472a19<_0xc9723[_0x43e7('0x36')];_0x472a19++){if(_0xc9723['charAt'](_0x472a19)=='-'){_0x2f43d7+=_0xc9723[_0x43e7('0x65')](_0x472a19);}else{_0x2f43d7+='['+_0xc9723[_0x43e7('0x65')](_0x472a19)+']';}}_0x2f43d7+='.';return _0x2f43d7;}exports[_0x43e7('0x23')]=function(_0x549f4e,_0x56b06d,_0x30377a){var _0x5c3ad8=_0x549f4e['body'];_0x5c3ad8[_0x43e7('0x5e')]=_0x43e7('0x66')+_0x5c3ad8['name']+'-';return db[_0x43e7('0x4a')][_0x43e7('0x67')](function(_0x1e2fed){return db[_0x43e7('0x2d')][_0x43e7('0x23')](_0x5c3ad8,{'where':{'id':_0x5c3ad8['id']},'transaction':_0x1e2fed})[_0x43e7('0x24')](function(){return db[_0x43e7('0x4c')]['destroy']({'where':{'VoicePrefixId':_0x5c3ad8['id']},'transaction':_0x1e2fed})[_0x43e7('0x24')](function(){return db[_0x43e7('0x4c')]['find']({'where':{'id':_0x5c3ad8[_0x43e7('0x4d')]},'raw':!![]})['then'](function(_0x26ee52){return createVoicePrefixExtensions(_0x5c3ad8,_0x26ee52,_0x1e2fed);});});});})[_0x43e7('0x24')](function(){return db[_0x43e7('0x2d')][_0x43e7('0x68')](_0x5c3ad8['id']);})['then'](respondWithResult(_0x56b06d,null))[_0x43e7('0x45')](handleError(_0x56b06d,null));};exports[_0x43e7('0x69')]=function(_0xf929a5,_0x556001,_0x17889c){return db[_0x43e7('0x2d')][_0x43e7('0x46')]({'where':{'id':_0xf929a5[_0x43e7('0x47')]['id']}})[_0x43e7('0x24')](handleEntityNotFound(_0x556001,null))['then'](function(_0xb51897){if(_0xb51897){return _0xb51897[_0x43e7('0x69')](_0xf929a5[_0x43e7('0x4b')][_0x43e7('0x6a')],_[_0x43e7('0x6b')](_0xf929a5[_0x43e7('0x4b')],[_0x43e7('0x6a'),'id'])||{})['spread'](function(_0x499ee9){for(var _0x405faa=0x0;_0x405faa<_0xf929a5['body']['ids']['length'];_0x405faa+=0x1){socket[_0x43e7('0x6c')](_0x43e7('0x6d'),{'UserId':_0xf929a5[_0x43e7('0x4b')][_0x43e7('0x6a')][_0x405faa],'VoicePrefixId':_0xf929a5[_0x43e7('0x47')]['id']});}return _0x499ee9;});}})[_0x43e7('0x24')](respondWithResult(_0x556001,null))['catch'](handleError(_0x556001,null));};exports[_0x43e7('0x6e')]=function(_0x1ead5b,_0x2cd420,_0x5b4c76){return db[_0x43e7('0x2d')][_0x43e7('0x46')]({'where':{'id':_0x1ead5b[_0x43e7('0x47')]['id']}})[_0x43e7('0x24')](handleEntityNotFound(_0x2cd420,null))[_0x43e7('0x24')](function(_0xeb6340){if(_0xeb6340){return _0xeb6340[_0x43e7('0x6e')](_0x1ead5b[_0x43e7('0x30')]['ids'])['then'](function(){if(_['isArray'](_0x1ead5b[_0x43e7('0x30')][_0x43e7('0x6a')])){for(var _0x5355ff=0x0;_0x5355ff<_0x1ead5b[_0x43e7('0x30')][_0x43e7('0x6a')][_0x43e7('0x36')];_0x5355ff+=0x1){socket[_0x43e7('0x6c')]('userVoicePrefix:remove',{'UserId':Number(_0x1ead5b['query']['ids'][_0x5355ff]),'VoicePrefixId':Number(_0x1ead5b[_0x43e7('0x47')]['id'])});}}else{socket[_0x43e7('0x6c')]('userVoicePrefix:remove',{'UserId':Number(_0x1ead5b['query'][_0x43e7('0x6a')]),'VoicePrefixId':Number(_0x1ead5b[_0x43e7('0x47')]['id'])});}});}})[_0x43e7('0x24')](respondWithStatusCode(_0x2cd420,null))['catch'](handleError(_0x2cd420,null));};exports[_0x43e7('0x6f')]=function(_0x3d750f,_0x401654,_0xb04082){var _0x48f1dc={};var _0x1d7048={};var _0x520943;var _0xa66309;return db[_0x43e7('0x2d')][_0x43e7('0x70')]({'where':{'id':_0x3d750f[_0x43e7('0x47')]['id']}})[_0x43e7('0x24')](handleEntityNotFound(_0x401654,null))[_0x43e7('0x24')](function(_0x126133){if(_0x126133){_0x520943=_0x126133;_0x1d7048['model']=_[_0x43e7('0x2f')](db[_0x43e7('0x71')][_0x43e7('0x2e')]);_0x1d7048[_0x43e7('0x30')]=_['keys'](_0x3d750f['query']);_0x1d7048['filters']=_[_0x43e7('0x34')](_0x1d7048['model'],_0x1d7048[_0x43e7('0x30')]);_0x48f1dc[_0x43e7('0x33')]=_[_0x43e7('0x34')](_0x1d7048[_0x43e7('0x32')],qs[_0x43e7('0x35')](_0x3d750f[_0x43e7('0x30')][_0x43e7('0x35')]));_0x48f1dc[_0x43e7('0x33')]=_0x48f1dc[_0x43e7('0x33')][_0x43e7('0x36')]?_0x48f1dc[_0x43e7('0x33')]:_0x1d7048['model'];_0x48f1dc[_0x43e7('0x37')]=qs[_0x43e7('0x38')](_0x3d750f[_0x43e7('0x30')][_0x43e7('0x38')]);_0x48f1dc[_0x43e7('0x39')]=qs['filters'](_['pick'](_0x3d750f[_0x43e7('0x30')],_0x1d7048[_0x43e7('0x31')]));if(_0x3d750f['query'][_0x43e7('0x3a')]){_0x48f1dc[_0x43e7('0x39')]=_['merge'](_0x48f1dc['where'],{'$or':_[_0x43e7('0x3c')](_0x48f1dc[_0x43e7('0x33')],function(_0x22947e){var _0x1c0a84={};_0x1c0a84[_0x22947e]={'$like':'%'+_0x3d750f[_0x43e7('0x30')]['filter']+'%'};return _0x1c0a84;})});}_0x48f1dc=_['merge']({},_0x48f1dc,_0x3d750f[_0x43e7('0x40')]);return _0x520943[_0x43e7('0x6f')](_0x48f1dc);}})[_0x43e7('0x24')](function(_0x38ba7a){if(_0x38ba7a){_0xa66309=_0x38ba7a['length'];if(!_0x3d750f[_0x43e7('0x30')][_0x43e7('0x72')](_0x43e7('0x73'))){_0x48f1dc[_0x43e7('0x1e')]=qs['limit'](_0x3d750f[_0x43e7('0x30')][_0x43e7('0x1e')]);_0x48f1dc[_0x43e7('0x1d')]=qs[_0x43e7('0x1d')](_0x3d750f[_0x43e7('0x30')]['offset']);}return _0x520943[_0x43e7('0x6f')](_0x48f1dc);}})[_0x43e7('0x24')](function(_0x509d8d){if(_0x509d8d){return _0x509d8d?{'count':_0xa66309,'rows':_0x509d8d}:null;}})[_0x43e7('0x24')](respondWithResult(_0x401654,null))[_0x43e7('0x45')](handleError(_0x401654,null));};
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.events.js b/server/api/voicePrefix/voicePrefix.events.js
index 055280f..caf1d9c 100644
--- a/server/api/voicePrefix/voicePrefix.events.js
+++ b/server/api/voicePrefix/voicePrefix.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['hasOwnProperty','hook','exports','events','../../mysqldb','VoicePrefix','update','emit'];(function(_0x28669c,_0x1f62c4){var _0x4a3af6=function(_0x3e25d5){while(--_0x3e25d5){_0x28669c['push'](_0x28669c['shift']());}};_0x4a3af6(++_0x1f62c4);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xa9e0[_0xbe200f];return _0x192597;};'use strict';var EventEmitter=require(_0x0a9e('0x0'));var VoicePrefix=require(_0x0a9e('0x1'))['db'][_0x0a9e('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x0a9e('0x3'),'afterDestroy':'remove'};function emitEvent(_0x333808){return function(_0x432180,_0x2ab90b,_0x991246){VoicePrefixEvents[_0x0a9e('0x4')](_0x333808+':'+_0x432180['id'],_0x432180);VoicePrefixEvents['emit'](_0x333808,_0x432180);_0x991246(null);};}for(var e in events){if(events[_0x0a9e('0x5')](e)){var event=events[e];VoicePrefix[_0x0a9e('0x6')](e,emitEvent(event));}}module[_0x0a9e('0x7')]=VoicePrefixEvents;
\ No newline at end of file
+var _0xb10b=['hasOwnProperty','hook','events','VoicePrefix','setMaxListeners','save','remove','emit'];(function(_0x3a2b32,_0x493d37){var _0xaa79fe=function(_0x3fc6cf){while(--_0x3fc6cf){_0x3a2b32['push'](_0x3a2b32['shift']());}};_0xaa79fe(++_0x493d37);}(_0xb10b,0x12a));var _0xbb10=function(_0x4432f2,_0x22697a){_0x4432f2=_0x4432f2-0x0;var _0x1c97d6=_0xb10b[_0x4432f2];return _0x1c97d6;};'use strict';var EventEmitter=require(_0xbb10('0x0'));var VoicePrefix=require('../../mysqldb')['db'][_0xbb10('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xbb10('0x2')](0x0);var events={'afterCreate':_0xbb10('0x3'),'afterUpdate':'update','afterDestroy':_0xbb10('0x4')};function emitEvent(_0x9bbed){return function(_0x460981,_0x22320e,_0x49baf4){VoicePrefixEvents[_0xbb10('0x5')](_0x9bbed+':'+_0x460981['id'],_0x460981);VoicePrefixEvents['emit'](_0x9bbed,_0x460981);_0x49baf4(null);};}for(var e in events){if(events[_0xbb10('0x6')](e)){var event=events[e];VoicePrefix[_0xbb10('0x7')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.model.js b/server/api/voicePrefix/voicePrefix.model.js
index 1a95365..145071a 100644
--- a/server/api/voicePrefix/voicePrefix.model.js
+++ b/server/api/voicePrefix/voicePrefix.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbc11=['./voicePrefix.attributes','exports','define','VoicePrefix','voice_prefixes','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf'];(function(_0x124c36,_0x2662c0){var _0xa42712=function(_0x355398){while(--_0x355398){_0x124c36['push'](_0x124c36['shift']());}};_0xa42712(++_0x2662c0);}(_0xbc11,0x185));var _0x1bc1=function(_0x382ddb,_0x193237){_0x382ddb=_0x382ddb-0x0;var _0x5ce8f3=_0xbc11[_0x382ddb];return _0x5ce8f3;};'use strict';var _=require(_0x1bc1('0x0'));var util=require(_0x1bc1('0x1'));var logger=require(_0x1bc1('0x2'))('api');var moment=require('moment');var BPromise=require(_0x1bc1('0x3'));var rp=require(_0x1bc1('0x4'));var fs=require('fs');var path=require(_0x1bc1('0x5'));var rimraf=require(_0x1bc1('0x6'));var config=require('../../config/environment');var attributes=require(_0x1bc1('0x7'));module[_0x1bc1('0x8')]=function(_0x3851a8,_0x2bc4f9){return _0x3851a8[_0x1bc1('0x9')](_0x1bc1('0xa'),attributes,{'tableName':_0x1bc1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd38b=['define','voice_prefixes','lodash','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./voicePrefix.attributes','exports'];(function(_0xab649b,_0x1519e9){var _0x3b7584=function(_0x4b878e){while(--_0x4b878e){_0xab649b['push'](_0xab649b['shift']());}};_0x3b7584(++_0x1519e9);}(_0xd38b,0x115));var _0xbd38=function(_0x1a9c75,_0xa83750){_0x1a9c75=_0x1a9c75-0x0;var _0xb2f37e=_0xd38b[_0x1a9c75];return _0xb2f37e;};'use strict';var _=require(_0xbd38('0x0'));var util=require('util');var logger=require(_0xbd38('0x1'))('api');var moment=require('moment');var BPromise=require(_0xbd38('0x2'));var rp=require(_0xbd38('0x3'));var fs=require('fs');var path=require(_0xbd38('0x4'));var rimraf=require(_0xbd38('0x5'));var config=require(_0xbd38('0x6'));var attributes=require(_0xbd38('0x7'));module[_0xbd38('0x8')]=function(_0x16338f,_0x1416fb){return _0x16338f[_0xbd38('0x9')]('VoicePrefix',attributes,{'tableName':_0xbd38('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.rpc.js b/server/api/voicePrefix/voicePrefix.rpc.js
index f5a2f55..13ea164 100644
--- a/server/api/voicePrefix/voicePrefix.rpc.js
+++ b/server/api/voicePrefix/voicePrefix.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7963=['message','result','catch','lodash','bluebird','randomstring','ioredis','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./voicePrefix.socket','register','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x46b8f8,_0x3f9908){var _0x28eafe=function(_0x4f60c1){while(--_0x4f60c1){_0x46b8f8['push'](_0x46b8f8['shift']());}};_0x28eafe(++_0x3f9908);}(_0x7963,0x1a3));var _0x3796=function(_0x4b2494,_0x494d41){_0x4b2494=_0x4b2494-0x0;var _0x2c1436=_0x7963[_0x4b2494];return _0x2c1436;};'use strict';var _=require(_0x3796('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3796('0x1'));var rs=require(_0x3796('0x2'));var fs=require('fs');var Redis=require(_0x3796('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x3796('0x4'))(_0x3796('0x5'));var config=require('../../config/environment');var jayson=require(_0x3796('0x6'));var client=jayson[_0x3796('0x7')][_0x3796('0x8')]({'port':0x232a});config[_0x3796('0x9')]=_[_0x3796('0xa')](config['redis'],{'host':_0x3796('0xb'),'port':0x18eb});var socket=require(_0x3796('0xc'))(new Redis(config[_0x3796('0x9')]));require(_0x3796('0xd'))[_0x3796('0xe')](socket);function respondWithRpcPromise(_0x4be570,_0x20c474,_0x31860b){return new BPromise(function(_0x6015c6,_0x402601){return client['request'](_0x4be570,_0x31860b)[_0x3796('0xf')](function(_0x16ebc0){logger[_0x3796('0x10')](_0x3796('0x11'),_0x20c474,_0x3796('0x12'));logger[_0x3796('0x13')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x20c474,_0x3796('0x12'),JSON[_0x3796('0x14')](_0x16ebc0));if(_0x16ebc0[_0x3796('0x15')]){if(_0x16ebc0[_0x3796('0x15')][_0x3796('0x16')]===0x1f4){logger[_0x3796('0x15')](_0x3796('0x11'),_0x20c474,_0x16ebc0['error'][_0x3796('0x17')]);return _0x402601(_0x16ebc0[_0x3796('0x15')]['message']);}logger[_0x3796('0x15')]('VoicePrefix,\x20%s,\x20%s',_0x20c474,_0x16ebc0[_0x3796('0x15')][_0x3796('0x17')]);return _0x6015c6(_0x16ebc0['error'][_0x3796('0x17')]);}else{logger[_0x3796('0x10')]('VoicePrefix,\x20%s,\x20%s',_0x20c474,_0x3796('0x12'));_0x6015c6(_0x16ebc0[_0x3796('0x18')]['message']);}})[_0x3796('0x19')](function(_0x5c6517){logger[_0x3796('0x15')](_0x3796('0x11'),_0x20c474,_0x5c6517);_0x402601(_0x5c6517);});});}
\ No newline at end of file
+var _0xcbd4=['./voicePrefix.socket','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x153be7,_0x42f43c){var _0x338590=function(_0x11771d){while(--_0x11771d){_0x153be7['push'](_0x153be7['shift']());}};_0x338590(++_0x42f43c);}(_0xcbd4,0xed));var _0x4cbd=function(_0x38a177,_0x59a7bb){_0x38a177=_0x38a177-0x0;var _0x58f656=_0xcbd4[_0x38a177];return _0x58f656;};'use strict';var _=require(_0x4cbd('0x0'));var util=require('util');var moment=require(_0x4cbd('0x1'));var BPromise=require(_0x4cbd('0x2'));var rs=require(_0x4cbd('0x3'));var fs=require('fs');var Redis=require(_0x4cbd('0x4'));var db=require(_0x4cbd('0x5'))['db'];var utils=require(_0x4cbd('0x6'));var logger=require(_0x4cbd('0x7'))('rpc');var config=require(_0x4cbd('0x8'));var jayson=require(_0x4cbd('0x9'));var client=jayson[_0x4cbd('0xa')][_0x4cbd('0xb')]({'port':0x232a});config[_0x4cbd('0xc')]=_['defaults'](config['redis'],{'host':_0x4cbd('0xd'),'port':0x18eb});var socket=require(_0x4cbd('0xe'))(new Redis(config[_0x4cbd('0xc')]));require(_0x4cbd('0xf'))['register'](socket);function respondWithRpcPromise(_0x15a4a8,_0x447500,_0x15f5cd){return new BPromise(function(_0x48e84c,_0x332c38){return client[_0x4cbd('0x10')](_0x15a4a8,_0x15f5cd)[_0x4cbd('0x11')](function(_0x1d25e7){logger[_0x4cbd('0x12')](_0x4cbd('0x13'),_0x447500,_0x4cbd('0x14'));logger[_0x4cbd('0x15')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x447500,_0x4cbd('0x14'),JSON[_0x4cbd('0x16')](_0x1d25e7));if(_0x1d25e7['error']){if(_0x1d25e7[_0x4cbd('0x17')][_0x4cbd('0x18')]===0x1f4){logger[_0x4cbd('0x17')](_0x4cbd('0x13'),_0x447500,_0x1d25e7['error'][_0x4cbd('0x19')]);return _0x332c38(_0x1d25e7[_0x4cbd('0x17')][_0x4cbd('0x19')]);}logger['error'](_0x4cbd('0x13'),_0x447500,_0x1d25e7[_0x4cbd('0x17')][_0x4cbd('0x19')]);return _0x48e84c(_0x1d25e7[_0x4cbd('0x17')][_0x4cbd('0x19')]);}else{logger[_0x4cbd('0x12')](_0x4cbd('0x13'),_0x447500,'request\x20sent');_0x48e84c(_0x1d25e7[_0x4cbd('0x1a')][_0x4cbd('0x19')]);}})[_0x4cbd('0x1b')](function(_0x13f0e7){logger[_0x4cbd('0x17')]('VoicePrefix,\x20%s,\x20%s',_0x447500,_0x13f0e7);_0x332c38(_0x13f0e7);});});}
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.socket.js b/server/api/voicePrefix/voicePrefix.socket.js
index 1b20a86..ea84763 100644
--- a/server/api/voicePrefix/voicePrefix.socket.js
+++ b/server/api/voicePrefix/voicePrefix.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0502=['register','voicePrefix:','./voicePrefix.events','save','remove','emit','removeListener'];(function(_0x12e4b2,_0x16f3a5){var _0x8d32a2=function(_0x509498){while(--_0x509498){_0x12e4b2['push'](_0x12e4b2['shift']());}};_0x8d32a2(++_0x16f3a5);}(_0x0502,0x16e));var _0x2050=function(_0x3d95f6,_0xd9817c){_0x3d95f6=_0x3d95f6-0x0;var _0x25f03c=_0x0502[_0x3d95f6];return _0x25f03c;};'use strict';var VoicePrefixEvents=require(_0x2050('0x0'));var events=[_0x2050('0x1'),_0x2050('0x2'),'update'];function createListener(_0x1d38bb,_0x5d818a){return function(_0x2d79a5){_0x5d818a[_0x2050('0x3')](_0x1d38bb,_0x2d79a5);};}function removeListener(_0x1795b2,_0x2730b0){return function(){VoicePrefixEvents[_0x2050('0x4')](_0x1795b2,_0x2730b0);};}exports[_0x2050('0x5')]=function(_0x1ca305){for(var _0x6c34ab=0x0,_0x481faa=events['length'];_0x6c34ab<_0x481faa;_0x6c34ab++){var _0x5c891d=events[_0x6c34ab];var _0x59b5b2=createListener(_0x2050('0x6')+_0x5c891d,_0x1ca305);VoicePrefixEvents['on'](_0x5c891d,_0x59b5b2);}};
\ No newline at end of file
+var _0x2c9b=['emit','removeListener','register','length','voicePrefix:','./voicePrefix.events','update'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x2c9b,0x1be));var _0xb2c9=function(_0x5c535d,_0x2c8aed){_0x5c535d=_0x5c535d-0x0;var _0x3f3426=_0x2c9b[_0x5c535d];return _0x3f3426;};'use strict';var VoicePrefixEvents=require(_0xb2c9('0x0'));var events=['save','remove',_0xb2c9('0x1')];function createListener(_0x4fdad1,_0x2147c0){return function(_0x524224){_0x2147c0[_0xb2c9('0x2')](_0x4fdad1,_0x524224);};}function removeListener(_0x3d1212,_0x12c687){return function(){VoicePrefixEvents[_0xb2c9('0x3')](_0x3d1212,_0x12c687);};}exports[_0xb2c9('0x4')]=function(_0x1ce422){for(var _0x418b30=0x0,_0x4566ea=events[_0xb2c9('0x5')];_0x418b30<_0x4566ea;_0x418b30++){var _0x528a9f=events[_0x418b30];var _0x26606b=createListener(_0xb2c9('0x6')+_0x528a9f,_0x1ce422);VoicePrefixEvents['on'](_0x528a9f,_0x26606b);}};
\ No newline at end of file
diff --git a/server/api/voiceQueue/index.js b/server/api/voiceQueue/index.js
index 50640b1..9859ab4 100644
--- a/server/api/voiceQueue/index.js
+++ b/server/api/voiceQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdda4=['clone','addAgents','addLists','addBlackLists','put','destroy','delete','removeTeams','removeAgents','removeLists','removeBlackLists','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','isAuthenticated','index','/:id','show','/:id/hoppers','getHoppers','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/teams','/:id/users','getAgents','/:id/members','getLists','/:id/blacklists','getBlackLists','post','create'];(function(_0x2c45d5,_0x1c6d60){var _0x40c883=function(_0x4dd939){while(--_0x4dd939){_0x2c45d5['push'](_0x2c45d5['shift']());}};_0x40c883(++_0x1c6d60);}(_0xdda4,0x1a6));var _0x4dda=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0xdda4[_0x5c351c];return _0x26f3b3;};'use strict';var multer=require('multer');var util=require(_0x4dda('0x0'));var path=require('path');var timeout=require(_0x4dda('0x1'));var express=require(_0x4dda('0x2'));var router=express[_0x4dda('0x3')]();var auth=require(_0x4dda('0x4'));var interaction=require(_0x4dda('0x5'));var config=require(_0x4dda('0x6'));var controller=require(_0x4dda('0x7'));router[_0x4dda('0x8')]('/',auth[_0x4dda('0x9')](),controller[_0x4dda('0xa')]);router[_0x4dda('0x8')](_0x4dda('0xb'),auth[_0x4dda('0x9')](),controller[_0x4dda('0xc')]);router[_0x4dda('0x8')](_0x4dda('0xd'),auth['isAuthenticated'](),controller[_0x4dda('0xe')]);router['get']('/:id/hopper_histories',auth[_0x4dda('0x9')](),controller[_0x4dda('0xf')]);router[_0x4dda('0x8')](_0x4dda('0x10'),auth[_0x4dda('0x9')](),controller[_0x4dda('0x11')]);router[_0x4dda('0x8')](_0x4dda('0x12'),auth['isAuthenticated'](),controller[_0x4dda('0x13')]);router[_0x4dda('0x8')](_0x4dda('0x14'),auth['isAuthenticated'](),controller['getTeams']);router[_0x4dda('0x8')](_0x4dda('0x15'),auth['isAuthenticated'](),controller[_0x4dda('0x16')]);router['get'](_0x4dda('0x17'),auth[_0x4dda('0x9')](),controller['getMembers']);router[_0x4dda('0x8')]('/:id/lists',auth['isAuthenticated'](),controller[_0x4dda('0x18')]);router[_0x4dda('0x8')](_0x4dda('0x19'),auth[_0x4dda('0x9')](),controller[_0x4dda('0x1a')]);router[_0x4dda('0x1b')]('/',auth[_0x4dda('0x9')](),controller[_0x4dda('0x1c')]);router[_0x4dda('0x1b')]('/:id/clone',auth['isAuthenticated'](),controller[_0x4dda('0x1d')]);router['post'](_0x4dda('0x14'),auth[_0x4dda('0x9')](),controller['addTeams']);router[_0x4dda('0x1b')](_0x4dda('0x15'),auth['isAuthenticated'](),controller[_0x4dda('0x1e')]);router[_0x4dda('0x1b')]('/:id/lists',auth[_0x4dda('0x9')](),controller[_0x4dda('0x1f')]);router[_0x4dda('0x1b')](_0x4dda('0x19'),auth[_0x4dda('0x9')](),controller[_0x4dda('0x20')]);router[_0x4dda('0x21')](_0x4dda('0xb'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x4dda('0xb'),auth[_0x4dda('0x9')](),controller[_0x4dda('0x22')]);router[_0x4dda('0x23')](_0x4dda('0x14'),auth['isAuthenticated'](),controller[_0x4dda('0x24')]);router[_0x4dda('0x23')](_0x4dda('0x15'),auth['isAuthenticated'](),controller[_0x4dda('0x25')]);router[_0x4dda('0x23')]('/:id/lists',auth[_0x4dda('0x9')](),controller[_0x4dda('0x26')]);router[_0x4dda('0x23')]('/:id/blacklists',auth[_0x4dda('0x9')](),controller[_0x4dda('0x27')]);module[_0x4dda('0x28')]=router;
\ No newline at end of file
+var _0x5d36=['put','/:id','update','delete','destroy','removeTeams','removeAgents','removeBlackLists','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','isAuthenticated','show','getHoppers','/:id/hopper_finals','/:id/hopper_black','getHopperBlacks','/:id/teams','getTeams','/:id/users','getAgents','getMembers','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','/:id/clone','clone','addTeams','addLists','addBlackLists'];(function(_0x810e4d,_0x909ef4){var _0x13f01c=function(_0x12fd89){while(--_0x12fd89){_0x810e4d['push'](_0x810e4d['shift']());}};_0x13f01c(++_0x909ef4);}(_0x5d36,0x11a));var _0x65d3=function(_0x12995e,_0x573c6d){_0x12995e=_0x12995e-0x0;var _0x321a35=_0x5d36[_0x12995e];return _0x321a35;};'use strict';var multer=require(_0x65d3('0x0'));var util=require(_0x65d3('0x1'));var path=require(_0x65d3('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x65d3('0x3')]();var auth=require(_0x65d3('0x4'));var interaction=require(_0x65d3('0x5'));var config=require(_0x65d3('0x6'));var controller=require(_0x65d3('0x7'));router[_0x65d3('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x65d3('0x8')]('/:id',auth[_0x65d3('0x9')](),controller[_0x65d3('0xa')]);router[_0x65d3('0x8')]('/:id/hoppers',auth[_0x65d3('0x9')](),controller[_0x65d3('0xb')]);router[_0x65d3('0x8')]('/:id/hopper_histories',auth['isAuthenticated'](),controller['getHopperHistories']);router['get'](_0x65d3('0xc'),auth[_0x65d3('0x9')](),controller['getHopperFinals']);router['get'](_0x65d3('0xd'),auth['isAuthenticated'](),controller[_0x65d3('0xe')]);router[_0x65d3('0x8')](_0x65d3('0xf'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x10')]);router['get'](_0x65d3('0x11'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x12')]);router[_0x65d3('0x8')]('/:id/members',auth[_0x65d3('0x9')](),controller[_0x65d3('0x13')]);router[_0x65d3('0x8')](_0x65d3('0x14'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x15')]);router[_0x65d3('0x8')](_0x65d3('0x16'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x17')]);router[_0x65d3('0x18')]('/',auth[_0x65d3('0x9')](),controller['create']);router['post'](_0x65d3('0x19'),auth['isAuthenticated'](),controller[_0x65d3('0x1a')]);router[_0x65d3('0x18')](_0x65d3('0xf'),auth['isAuthenticated'](),controller[_0x65d3('0x1b')]);router[_0x65d3('0x18')](_0x65d3('0x11'),auth[_0x65d3('0x9')](),controller['addAgents']);router[_0x65d3('0x18')]('/:id/lists',auth[_0x65d3('0x9')](),controller[_0x65d3('0x1c')]);router[_0x65d3('0x18')](_0x65d3('0x16'),auth['isAuthenticated'](),controller[_0x65d3('0x1d')]);router[_0x65d3('0x1e')](_0x65d3('0x1f'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x20')]);router[_0x65d3('0x21')]('/:id',auth[_0x65d3('0x9')](),controller[_0x65d3('0x22')]);router[_0x65d3('0x21')]('/:id/teams',auth['isAuthenticated'](),controller[_0x65d3('0x23')]);router[_0x65d3('0x21')](_0x65d3('0x11'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x24')]);router[_0x65d3('0x21')](_0x65d3('0x14'),auth[_0x65d3('0x9')](),controller['removeLists']);router[_0x65d3('0x21')](_0x65d3('0x16'),auth[_0x65d3('0x9')](),controller[_0x65d3('0x25')]);module[_0x65d3('0x26')]=router;
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.attributes.js b/server/api/voiceQueue/voiceQueue.attributes.js
index 8d68b23..c5f031a 100644
--- a/server/api/voiceQueue/voiceQueue.attributes.js
+++ b/server/api/voiceQueue/voiceQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4acd=['Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','Active/Disactive\x20Recall\x20In\x20Queue','DESC','ASC','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','exports','STRING','name','ENUM','inbound','outbound','default','ringall','leastrecent','random','rrmemory','linear','wrandom','rrordered','setDataValue','strategy','getDataValue','type','dialMethod','booked','roundrobin','progressive','predictive','power','INTEGER','yes','all','once','TEXT','periodic_announce','split','joinempty','join','leavewhenempty','acw','wrapuptime','BOOLEAN','Active/Disactive\x20Campaign','preview','Dial\x20Method.','UNSIGNED','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','dropRate','Only\x20for\x20predictive\x20method.','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always'];(function(_0x10004e,_0xd701e6){var _0x5af990=function(_0x4bab6a){while(--_0x4bab6a){_0x10004e['push'](_0x10004e['shift']());}};_0x5af990(++_0xd701e6);}(_0x4acd,0xe7));var _0xd4ac=function(_0x128450,_0x5869ba){_0x128450=_0x128450-0x0;var _0x4d80ed=_0x4acd[_0x128450];return _0x4d80ed;};'use strict';var Sequelize=require('sequelize');module[_0xd4ac('0x0')]={'name':{'type':Sequelize[_0xd4ac('0x1')],'allowNull':![],'unique':_0xd4ac('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x4'),_0xd4ac('0x5')),'allowNull':![],'defaultValue':_0xd4ac('0x4')},'musiconhold':{'type':Sequelize['STRING'],'defaultValue':_0xd4ac('0x6')},'announce':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':''},'strategy':{'type':Sequelize['ENUM']('rr',_0xd4ac('0x7'),_0xd4ac('0x8'),'fewestcalls',_0xd4ac('0x9'),_0xd4ac('0xa'),_0xd4ac('0xb'),_0xd4ac('0xc'),_0xd4ac('0xd')),'allowNull':![],'defaultValue':'ringall','set':function(_0x17678f){this[_0xd4ac('0xe')](_0xd4ac('0xf'),_0x17678f?_0x17678f:_0xd4ac('0xa'));},'get':function(){var _0x511cdc=this[_0xd4ac('0x10')](_0xd4ac('0x11'));var _0x18d5a8=this[_0xd4ac('0x10')](_0xd4ac('0x12'));var _0xabe655=this['getDataValue'](_0xd4ac('0xf'));if(_0x511cdc==='inbound'){return _0xabe655;}if(_0x18d5a8==='booked'&&_0xabe655===_0xd4ac('0xa')||_0x18d5a8===_0xd4ac('0x13')&&_0xabe655===_0xd4ac('0x14')){return _0xabe655;}if(_0x18d5a8===_0xd4ac('0x15')||_0x18d5a8===_0xd4ac('0x16')||_0x18d5a8===_0xd4ac('0x17')){return _0xabe655;}return null;}},'servicelevel':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0xd4ac('0x18')](0xb)},'timeout':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize['STRING']},'weight':{'type':Sequelize[_0xd4ac('0x18')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize['ENUM'](_0xd4ac('0x19'),'no'),'defaultValue':_0xd4ac('0x19')},'autopause':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x19'),'no',_0xd4ac('0x1a')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0xd4ac('0x18')](0xb)},'autopausebusy':{'type':Sequelize[_0xd4ac('0x3')]('yes','no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize['ENUM'](_0xd4ac('0x19'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize['ENUM'](_0xd4ac('0x19'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0xd4ac('0x3')]('yes','no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize['ENUM'](_0xd4ac('0x19'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize['STRING'],'allowNull':!![]},'membergosub':{'type':Sequelize[_0xd4ac('0x1')],'allowNull':!![]},'announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x19'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'yes'},'announce_holdtime':{'type':Sequelize['ENUM'](_0xd4ac('0x19'),'no',_0xd4ac('0x1b')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize['ENUM']('yes','no')},'announce_position_limit':{'type':Sequelize[_0xd4ac('0x18')](0xb)},'announce_round_seconds':{'type':Sequelize[_0xd4ac('0x3')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0xd4ac('0x1')]},'queue_youarenext':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'queue_thereare':{'type':Sequelize['STRING'],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'queue_minute':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'queue_reporthold':{'type':Sequelize['STRING']},'queue_quantity1':{'type':Sequelize['STRING']},'queue_quantity2':{'type':Sequelize[_0xd4ac('0x1')]},'queue_periodic_announce':{'type':Sequelize[_0xd4ac('0x1')]},'queue_less_than':{'type':Sequelize[_0xd4ac('0x1')]},'periodic_announce':{'type':Sequelize[_0xd4ac('0x1c')],'set':function(_0x3bf90b){this['setDataValue'](_0xd4ac('0x1d'),_0x3bf90b?_0x3bf90b['join'](','):[]);},'get':function(){return this['getDataValue'](_0xd4ac('0x1d'))?this[_0xd4ac('0x10')](_0xd4ac('0x1d'))[_0xd4ac('0x1e')](','):[];}},'joinempty':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':_0xd4ac('0x19'),'set':function(_0x2cfb71){this[_0xd4ac('0xe')](_0xd4ac('0x1f'),_0x2cfb71?_0x2cfb71[_0xd4ac('0x20')](','):[]);},'get':function(){return this[_0xd4ac('0x10')]('joinempty')?this[_0xd4ac('0x10')](_0xd4ac('0x1f'))[_0xd4ac('0x1e')](','):[];}},'leavewhenempty':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':'no','set':function(_0xa99729){this[_0xd4ac('0xe')](_0xd4ac('0x21'),_0xa99729?_0xa99729[_0xd4ac('0x20')](','):[]);},'get':function(){return this[_0xd4ac('0x10')](_0xd4ac('0x21'))?this[_0xd4ac('0x10')](_0xd4ac('0x21'))[_0xd4ac('0x1e')](','):[];}},'reportholdtime':{'type':Sequelize['ENUM'](_0xd4ac('0x19'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x19'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0xd4ac('0x3')]('yes','no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0xd4ac('0x1')]},'description':{'type':Sequelize[_0xd4ac('0x1')]},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x296a30){this['setDataValue'](_0xd4ac('0x22'),_0x296a30);if(_0x296a30){if(this[_0xd4ac('0x10')](_0xd4ac('0x23'))<0x2){this[_0xd4ac('0xe')](_0xd4ac('0x23'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0xd4ac('0x18')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0xd4ac('0x24')],'defaultValue':0x0,'comment':_0xd4ac('0x25')},'dialMethod':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x26'),_0xd4ac('0x15'),_0xd4ac('0x17'),_0xd4ac('0x16'),_0xd4ac('0x13')),'defaultValue':_0xd4ac('0x15'),'comment':_0xd4ac('0x27')},'dialLimitChannel':{'type':Sequelize[_0xd4ac('0x18')](0x4)['UNSIGNED'],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20channels,\x200\x20means\x20unlimited.'},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0xd4ac('0x28')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0xd4ac('0x29')},'dialPowerLevel':{'type':Sequelize[_0xd4ac('0x2a')](0x2)[_0xd4ac('0x28')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0xd4ac('0x2b')},'dialPredictiveOptimization':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x2c'),_0xd4ac('0x2d')),'defaultValue':_0xd4ac('0x2d'),'comment':_0xd4ac('0x2e')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0xd4ac('0x2a')](0x2)[_0xd4ac('0x28')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0xd4ac('0x2f')},'dialPredictiveInterval':{'type':Sequelize[_0xd4ac('0x18')](0x3)['UNSIGNED'],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':'Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)'},'dialOriginateCallerIdName':{'type':Sequelize[_0xd4ac('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xd4ac('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xd4ac('0x30')},'dialQueueOptions':{'type':Sequelize['STRING'],'defaultValue':_0xd4ac('0x31'),'comment':'https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue'},'dialQueueTimeout':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)'},'dialQueueProject':{'type':Sequelize[_0xd4ac('0x1')],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)'},'dialCongestionMaxRetry':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xd4ac('0x32')},'dialCongestionRetryFrequency':{'type':Sequelize[_0xd4ac('0x18')](0x5)[_0xd4ac('0x28')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xd4ac('0x33')},'dialBusyMaxRetry':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xd4ac('0x34')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xd4ac('0x28')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xd4ac('0x28')],'defaultValue':0x3,'comment':_0xd4ac('0x35')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xd4ac('0x18')](0x5)[_0xd4ac('0x28')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0xd4ac('0x18')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xd4ac('0x36')},'dialTimezone':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':_0xd4ac('0x37')},'dialPrefix':{'type':Sequelize[_0xd4ac('0x1')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0xd4ac('0x38'),'never','onlyIfOpen'),'defaultValue':_0xd4ac('0x38')},'dialAMDActive':{'type':Sequelize[_0xd4ac('0x24')],'defaultValue':0x0,'comment':_0xd4ac('0x39')},'dialAMDInitialSilence':{'type':Sequelize[_0xd4ac('0x18')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xd4ac('0x3a')},'dialAMDGreeting':{'type':Sequelize[_0xd4ac('0x18')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xd4ac('0x3b')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xd4ac('0x18')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xd4ac('0x3c')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0xd4ac('0x18')](0x9)[_0xd4ac('0x28')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0xd4ac('0x18')](0x9)[_0xd4ac('0x28')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize['INTEGER'](0x9)[_0xd4ac('0x28')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xd4ac('0x3d')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xd4ac('0x18')](0x9)[_0xd4ac('0x28')],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0xd4ac('0x28')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xd4ac('0x3e')},'dialAMDMaximumWordLength':{'type':Sequelize[_0xd4ac('0x18')](0x9)[_0xd4ac('0x28')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xd4ac('0x3f')},'dialRecallMeTimeout':{'type':Sequelize[_0xd4ac('0x18')](0x5)[_0xd4ac('0x28')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':'#RecallMe\x20Timeout\x20(min:1)'},'dialRecallInQueue':{'type':Sequelize[_0xd4ac('0x24')],'defaultValue':0x0,'comment':_0xd4ac('0x40')},'dialOrderByScheduledAt':{'type':Sequelize[_0xd4ac('0x3')](_0xd4ac('0x41'),_0xd4ac('0x42')),'defaultValue':_0xd4ac('0x41')},'dialQueueProject2':{'type':Sequelize[_0xd4ac('0x1')],'comment':_0xd4ac('0x43')},'dialAgiAfterHangupClient':{'type':Sequelize[_0xd4ac('0x24')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0xd4ac('0x24')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xd4ac('0x44')},'dialCutDigit':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xd4ac('0x45')},'mandatoryDispositionPauseId':{'type':Sequelize[_0xd4ac('0x18')],'allowNull':!![],'comment':_0xd4ac('0x46')},'mandatoryDisposition':{'type':Sequelize[_0xd4ac('0x24')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x3782ff){if(!_0x3782ff)this[_0xd4ac('0xe')](_0xd4ac('0x47'),null);this[_0xd4ac('0xe')]('mandatoryDisposition',_0x3782ff);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize['INTEGER'](0x3)[_0xd4ac('0x28')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0xd4ac('0x18')](0x3)[_0xd4ac('0x28')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}}};
\ No newline at end of file
+var _0xb275=['Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','inbound','outbound','STRING','default','ENUM','leastrecent','fewestcalls','random','rrmemory','linear','wrandom','rrordered','ringall','setDataValue','strategy','getDataValue','dialMethod','booked','progressive','predictive','power','INTEGER','yes','all','once','periodic_announce','join','split','joinempty','leavewhenempty','BOOLEAN','acw','wrapuptime','Active/Disactive\x20Campaign','preview','Dial\x20Method.','UNSIGNED','Max\x209999\x20channels,\x200\x20means\x20unlimited.','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','dropRate','Only\x20for\x20predictive\x20method.'];(function(_0x9269fd,_0x28b3bb){var _0x2d3c7c=function(_0x2422dc){while(--_0x2422dc){_0x9269fd['push'](_0x9269fd['shift']());}};_0x2d3c7c(++_0x28b3bb);}(_0xb275,0x14a));var _0x5b27=function(_0x2744ec,_0x410599){_0x2744ec=_0x2744ec-0x0;var _0x5a7daa=_0xb275[_0x2744ec];return _0x5a7daa;};'use strict';var Sequelize=require(_0x5b27('0x0'));module[_0x5b27('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x5b27('0x2'),_0x5b27('0x3')),'allowNull':![],'defaultValue':_0x5b27('0x2')},'musiconhold':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':_0x5b27('0x5')},'announce':{'type':Sequelize['STRING'],'defaultValue':''},'strategy':{'type':Sequelize[_0x5b27('0x6')]('rr','ringall',_0x5b27('0x7'),_0x5b27('0x8'),_0x5b27('0x9'),_0x5b27('0xa'),_0x5b27('0xb'),_0x5b27('0xc'),_0x5b27('0xd')),'allowNull':![],'defaultValue':_0x5b27('0xe'),'set':function(_0x27d110){this[_0x5b27('0xf')](_0x5b27('0x10'),_0x27d110?_0x27d110:_0x5b27('0xa'));},'get':function(){var _0x2147f3=this[_0x5b27('0x11')]('type');var _0x19fb4c=this['getDataValue'](_0x5b27('0x12'));var _0xf72738=this[_0x5b27('0x11')](_0x5b27('0x10'));if(_0x2147f3===_0x5b27('0x2')){return _0xf72738;}if(_0x19fb4c===_0x5b27('0x13')&&_0xf72738===_0x5b27('0xa')||_0x19fb4c==='booked'&&_0xf72738==='roundrobin'){return _0xf72738;}if(_0x19fb4c===_0x5b27('0x14')||_0x19fb4c===_0x5b27('0x15')||_0x19fb4c===_0x5b27('0x16')){return _0xf72738;}return null;}},'servicelevel':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x5b27('0x17')](0xb)},'timeout':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize['STRING']},'weight':{'type':Sequelize[_0x5b27('0x17')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x5b27('0x6')]('yes','no'),'defaultValue':_0x5b27('0x18')},'autopause':{'type':Sequelize[_0x5b27('0x6')]('yes','no',_0x5b27('0x19')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x5b27('0x17')](0xb)},'autopausebusy':{'type':Sequelize['ENUM'](_0x5b27('0x18'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x18'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize['ENUM'](_0x5b27('0x18'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x18'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x18'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize['ENUM'](_0x5b27('0x18'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize['STRING'],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x5b27('0x4')],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x18'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize['ENUM'](_0x5b27('0x18'),'no'),'defaultValue':_0x5b27('0x18')},'announce_holdtime':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x18'),'no',_0x5b27('0x1a')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x5b27('0x6')]('yes','no')},'announce_position_limit':{'type':Sequelize['INTEGER'](0xb)},'announce_round_seconds':{'type':Sequelize[_0x5b27('0x6')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize['STRING'],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x5b27('0x4')]},'queue_youarenext':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'queue_holdtime':{'type':Sequelize['STRING'],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x5b27('0x4')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x5b27('0x4')]},'queue_quantity1':{'type':Sequelize['STRING']},'queue_quantity2':{'type':Sequelize['STRING']},'queue_periodic_announce':{'type':Sequelize[_0x5b27('0x4')]},'queue_less_than':{'type':Sequelize[_0x5b27('0x4')]},'periodic_announce':{'type':Sequelize['TEXT'],'set':function(_0x5d3d9a){this[_0x5b27('0xf')](_0x5b27('0x1b'),_0x5d3d9a?_0x5d3d9a[_0x5b27('0x1c')](','):[]);},'get':function(){return this[_0x5b27('0x11')](_0x5b27('0x1b'))?this['getDataValue'](_0x5b27('0x1b'))[_0x5b27('0x1d')](','):[];}},'joinempty':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':_0x5b27('0x18'),'set':function(_0xe2afde){this['setDataValue'](_0x5b27('0x1e'),_0xe2afde?_0xe2afde[_0x5b27('0x1c')](','):[]);},'get':function(){return this[_0x5b27('0x11')](_0x5b27('0x1e'))?this[_0x5b27('0x11')](_0x5b27('0x1e'))[_0x5b27('0x1d')](','):[];}},'leavewhenempty':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':'no','set':function(_0x530bb4){this[_0x5b27('0xf')](_0x5b27('0x1f'),_0x530bb4?_0x530bb4[_0x5b27('0x1c')](','):[]);},'get':function(){return this['getDataValue'](_0x5b27('0x1f'))?this[_0x5b27('0x11')]('leavewhenempty')[_0x5b27('0x1d')](','):[];}},'reportholdtime':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x18'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize['ENUM'](_0x5b27('0x18'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize['ENUM'](_0x5b27('0x18'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x5b27('0x4')]},'description':{'type':Sequelize[_0x5b27('0x4')]},'acw':{'type':Sequelize[_0x5b27('0x20')],'defaultValue':0x0,'set':function(_0x4fa7a2){this[_0x5b27('0xf')](_0x5b27('0x21'),_0x4fa7a2);if(_0x4fa7a2){if(this[_0x5b27('0x11')](_0x5b27('0x22'))<0x2){this[_0x5b27('0xf')](_0x5b27('0x22'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x5b27('0x17')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x5b27('0x20')],'defaultValue':0x0,'comment':_0x5b27('0x23')},'dialMethod':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x24'),_0x5b27('0x14'),'power','predictive','booked'),'defaultValue':'progressive','comment':_0x5b27('0x25')},'dialLimitChannel':{'type':Sequelize[_0x5b27('0x17')](0x4)[_0x5b27('0x26')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x5b27('0x27')},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)['UNSIGNED'],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.'},'dialPowerLevel':{'type':Sequelize[_0x5b27('0x28')](0x2)[_0x5b27('0x26')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x5b27('0x29')},'dialPredictiveOptimization':{'type':Sequelize['ENUM'](_0x5b27('0x2a'),'dropRate'),'defaultValue':_0x5b27('0x2b'),'comment':_0x5b27('0x2c')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x5b27('0x28')](0x2)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x5b27('0x2d')},'dialPredictiveInterval':{'type':Sequelize[_0x5b27('0x17')](0x3)[_0x5b27('0x26')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x5b27('0x2e')},'dialOriginateCallerIdName':{'type':Sequelize[_0x5b27('0x4')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x5b27('0x4')]},'dialOriginateTimeout':{'type':Sequelize[_0x5b27('0x17')](0x3)[_0x5b27('0x26')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x5b27('0x2f')},'dialQueueOptions':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':_0x5b27('0x30'),'comment':'https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue'},'dialQueueTimeout':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x5b27('0x31')},'dialQueueProject':{'type':Sequelize[_0x5b27('0x4')],'comment':_0x5b27('0x32')},'dialCongestionMaxRetry':{'type':Sequelize[_0x5b27('0x17')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x5b27('0x33')},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x5b27('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x5b27('0x34')},'dialBusyMaxRetry':{'type':Sequelize[_0x5b27('0x17')](0x3)[_0x5b27('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize[_0x5b27('0x17')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x5b27('0x17')](0x3)[_0x5b27('0x26')],'defaultValue':0x3,'comment':_0x5b27('0x35')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x5b27('0x17')](0x5)[_0x5b27('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x5b27('0x36')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x5b27('0x26')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x5b27('0x37')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x5b27('0x4')],'defaultValue':_0x5b27('0x38')},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x5b27('0x6')](_0x5b27('0x39'),'never',_0x5b27('0x3a')),'defaultValue':_0x5b27('0x39')},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x5b27('0x3b')},'dialAMDInitialSilence':{'type':Sequelize[_0x5b27('0x17')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x5b27('0x3c')},'dialAMDGreeting':{'type':Sequelize[_0x5b27('0x17')](0x9)[_0x5b27('0x26')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x5b27('0x3d')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x5b27('0x17')](0x9)[_0x5b27('0x26')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x5b27('0x3e')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0x5b27('0x26')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0x5b27('0x17')](0x9)[_0x5b27('0x26')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x5b27('0x3f')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x5b27('0x17')](0x9)[_0x5b27('0x26')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x5b27('0x40')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x5b27('0x17')](0x9)[_0x5b27('0x26')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x5b27('0x41')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0x5b27('0x26')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x5b27('0x42')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x5b27('0x43')},'dialRecallMeTimeout':{'type':Sequelize[_0x5b27('0x17')](0x5)[_0x5b27('0x26')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':'#RecallMe\x20Timeout\x20(min:1)'},'dialRecallInQueue':{'type':Sequelize[_0x5b27('0x20')],'defaultValue':0x0,'comment':'Active/Disactive\x20Recall\x20In\x20Queue'},'dialOrderByScheduledAt':{'type':Sequelize[_0x5b27('0x6')]('DESC',_0x5b27('0x44')),'defaultValue':_0x5b27('0x45')},'dialQueueProject2':{'type':Sequelize[_0x5b27('0x4')],'comment':_0x5b27('0x32')},'dialAgiAfterHangupClient':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x5b27('0x20')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x5b27('0x17')](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x5b27('0x46')},'dialCutDigit':{'type':Sequelize[_0x5b27('0x17')](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x5b27('0x47')},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'comment':_0x5b27('0x48')},'mandatoryDisposition':{'type':Sequelize[_0x5b27('0x20')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x530317){if(!_0x530317)this['setDataValue'](_0x5b27('0x49'),null);this[_0x5b27('0xf')](_0x5b27('0x4a'),_0x530317);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x5b27('0x17')](0x3)[_0x5b27('0x26')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x5b27('0x26')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}}};
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.controller.js b/server/api/voiceQueue/voiceQueue.controller.js
index 3b498d1..8e0b6a2 100644
--- a/server/api/voiceQueue/voiceQueue.controller.js
+++ b/server/api/voiceQueue/voiceQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x13f6=['map','key','VIRTUAL','field','options','includeAll','include','findAll','rows','catch','params','length','body','user','get','inbound','UserProfileSection','autoAssociation','UserProfileResource','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','createdAt','role','userProfileId','getHoppers','findOne','CmHopper','VoiceQueueId','getHopperHistories','CmHopperHistory','hasOwnProperty','getHopperFinals','CmHopperFinal','CmHopperBlack','getTeams','addTeams','teams','Team','User','online','voicePause','interface','flatMap','Agents','forEach','penalty','transaction','UserVoiceQueue','findOrCreate','each','UserVoiceQueueRt','upsert','isNil','format','emit','userVoiceQueue:save','removeTeams','select','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','toString','SELECT','every','TeamId','union','compact','sequelize','ids','isEmpty','removeAgents','userVoiceQueue:remove','addAgents','omit','spread','all','isArray','getAgents','getMembers','getLists','CmList','addLists','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','ListId','updatedAt','phone','NOW()','CmListId','cm_contacts','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','onlyIfOpen','deletedAt\x20IS\x20NULL','push','removeLists','getBlackLists','addBlackLists','cm_hopper_black','removeBlackLists','html-pdf','eml-format','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','redis','defaults','./voiceQueue.socket','register','sendStatus','status','end','count','offset','limit','Content-Range','apply','reject','save','update','then','destroy','VoiceQueues','QueueCampaigns','outbound','value','includes','type','find','error','stack','name','send','index','VoiceQueue','rawAttributes','model','query','keys','filters','intersection','fields','attributes','nolimit','order','sort','where','pick','filter','merge'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x13f6,0x124));var _0x613f=function(_0x4c5389,_0x2a594d){_0x4c5389=_0x4c5389-0x0;var _0x417c8a=_0x13f6[_0x4c5389];return _0x417c8a;};'use strict';var pdf=require(_0x613f('0x0'));var emlformat=require(_0x613f('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x613f('0x2'));var rp=require(_0x613f('0x3'));var moment=require(_0x613f('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x613f('0x5'));var util=require(_0x613f('0x6'));var path=require(_0x613f('0x7'));var sox=require('sox');var csv=require(_0x613f('0x8'));var ejs=require(_0x613f('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x613f('0xa'));var toCsv=require(_0x613f('0x8'));var querystring=require(_0x613f('0xb'));var Papa=require(_0x613f('0xc'));var Redis=require('ioredis');var authService=require(_0x613f('0xd'));var qs=require(_0x613f('0xe'));var hardwareService=require(_0x613f('0xf'));var logger=require('../../config/logger')(_0x613f('0x10'));var utils=require(_0x613f('0x11'));var config=require(_0x613f('0x12'));var db=require('../../mysqldb')['db'];config[_0x613f('0x13')]=_[_0x613f('0x14')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x613f('0x13')]));require(_0x613f('0x15'))[_0x613f('0x16')](socket);function respondWithStatusCode(_0x375db1,_0x329fcf){_0x329fcf=_0x329fcf||0xcc;return function(_0x4a6fc){if(_0x4a6fc){return _0x375db1[_0x613f('0x17')](_0x329fcf);}return _0x375db1[_0x613f('0x18')](_0x329fcf)[_0x613f('0x19')]();};}function respondWithResult(_0x1d68fd,_0x548218){_0x548218=_0x548218||0xc8;return function(_0x3c9edf){if(_0x3c9edf){return _0x1d68fd['status'](_0x548218)['json'](_0x3c9edf);}};}function respondWithFilteredResult(_0x1bc605,_0x2f244d){return function(_0x544eca){if(_0x544eca){var _0x39e417=_0x544eca[_0x613f('0x1a')],_0x4f9dae=_0x2f244d[_0x613f('0x1b')],_0x62ebfe=_0x2f244d[_0x613f('0x1b')]+_0x2f244d[_0x613f('0x1c')],_0x1e5a11;if(_0x62ebfe>=_0x39e417){_0x62ebfe=_0x39e417;_0x1e5a11=0xc8;}else{_0x1e5a11=0xce;}_0x1bc605['status'](_0x1e5a11);return _0x1bc605['set'](_0x613f('0x1d'),_0x4f9dae+'-'+_0x62ebfe+'/'+_0x39e417)['json'](_0x544eca);}return null;};}function patchUpdates(_0x48493c){return function(_0x3c9b58){try{jsonpatch[_0x613f('0x1e')](_0x3c9b58,_0x48493c,!![]);}catch(_0x4f5a5a){return BPromise[_0x613f('0x1f')](_0x4f5a5a);}return _0x3c9b58[_0x613f('0x20')]();};}function saveUpdates(_0x2aa14b,_0x48b28a){return function(_0x5401c2){if(_0x5401c2){return _0x5401c2[_0x613f('0x21')](_0x2aa14b)[_0x613f('0x22')](function(_0x2acfcf){return _0x2acfcf;});}return null;};}function removeEntity(_0x51f376,_0x41104e){return function(_0x33e0c6){if(_0x33e0c6){return _0x33e0c6[_0x613f('0x23')]()[_0x613f('0x22')](function(){var _0x3013a1=_0x33e0c6['get']({'plain':!![]});var _0x30fb15=[{'name':_0x613f('0x24'),'value':'inbound','ignore':![]},{'name':_0x613f('0x25'),'value':_0x613f('0x26'),'ignore':![]}];var _0x32e747=_(_0x30fb15)['filter']('ignore')['map'](_0x613f('0x27'))['value']();if(_[_0x613f('0x28')](_0x32e747,_0x3013a1[_0x613f('0x29')])){return;}var _0x4ca372=_[_0x613f('0x2a')](_0x30fb15,[_0x613f('0x27'),_0x3013a1['type']])['name'];return db['UserProfileResource'][_0x613f('0x23')]({'where':{'type':_0x4ca372,'resourceId':_0x3013a1['id']}})[_0x613f('0x22')](function(){return _0x33e0c6;});})[_0x613f('0x22')](function(){_0x51f376['status'](0xcc)[_0x613f('0x19')]();});}};}function handleEntityNotFound(_0x439478,_0xd335a6){return function(_0x19bb8f){if(!_0x19bb8f){_0x439478['sendStatus'](0x194);}return _0x19bb8f;};}function handleError(_0x31ccbd,_0x5b2a1f){_0x5b2a1f=_0x5b2a1f||0x1f4;return function(_0x165852){logger[_0x613f('0x2b')](_0x165852[_0x613f('0x2c')]);if(_0x165852[_0x613f('0x2d')]){delete _0x165852['name'];}_0x31ccbd[_0x613f('0x18')](_0x5b2a1f)[_0x613f('0x2e')](_0x165852);};}exports[_0x613f('0x2f')]=function(_0x4d8b98,_0x21a1d1){var _0x4af0de={},_0x3df7bf={},_0x11e7c2={'count':0x0,'rows':[]};var _0xc8976c=db[_0x613f('0x30')][_0x613f('0x31')];_0x3df7bf[_0x613f('0x32')]=_['keys'](_0xc8976c);_0x3df7bf[_0x613f('0x33')]=_[_0x613f('0x34')](_0x4d8b98[_0x613f('0x33')]);_0x3df7bf[_0x613f('0x35')]=_[_0x613f('0x36')](_0x3df7bf['model'],_0x3df7bf['query']);_0x4af0de['attributes']=_[_0x613f('0x36')](_0x3df7bf[_0x613f('0x32')],qs[_0x613f('0x37')](_0x4d8b98[_0x613f('0x33')]['fields']));_0x4af0de[_0x613f('0x38')]=_0x4af0de[_0x613f('0x38')]['length']?_0x4af0de[_0x613f('0x38')]:_0x3df7bf['model'];if(!_0x4d8b98[_0x613f('0x33')]['hasOwnProperty'](_0x613f('0x39'))){_0x4af0de['limit']=qs[_0x613f('0x1c')](_0x4d8b98[_0x613f('0x33')][_0x613f('0x1c')]);_0x4af0de['offset']=qs[_0x613f('0x1b')](_0x4d8b98[_0x613f('0x33')][_0x613f('0x1b')]);}_0x4af0de[_0x613f('0x3a')]=qs[_0x613f('0x3b')](_0x4d8b98[_0x613f('0x33')][_0x613f('0x3b')]);_0x4af0de[_0x613f('0x3c')]=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x4d8b98['query'],_0x3df7bf[_0x613f('0x35')]));if(_0x4d8b98[_0x613f('0x33')][_0x613f('0x3e')]){_0x4af0de[_0x613f('0x3c')]=_[_0x613f('0x3f')](_0x4af0de[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0xc8976c,function(_0x5a8e77){if(_0x5a8e77[_0x613f('0x29')][_0x613f('0x41')]!==_0x613f('0x42')){var _0x3d2d7b={};_0x3d2d7b[_0x5a8e77[_0x613f('0x43')]]={'$like':'%'+_0x4d8b98[_0x613f('0x33')][_0x613f('0x3e')]+'%'};return _0x3d2d7b;}})});}_0x4af0de=_['merge']({},_0x4af0de,_0x4d8b98[_0x613f('0x44')]);var _0x18f427={'where':_0x4af0de[_0x613f('0x3c')]};return db[_0x613f('0x30')][_0x613f('0x1a')](_0x18f427)[_0x613f('0x22')](function(_0x2b4e9f){_0x11e7c2[_0x613f('0x1a')]=_0x2b4e9f;if(_0x4d8b98[_0x613f('0x33')][_0x613f('0x45')]){_0x4af0de[_0x613f('0x46')]=[{'all':!![]}];}return db[_0x613f('0x30')][_0x613f('0x47')](_0x4af0de);})['then'](function(_0x3472f6){_0x11e7c2[_0x613f('0x48')]=_0x3472f6;return _0x11e7c2;})[_0x613f('0x22')](respondWithFilteredResult(_0x21a1d1,_0x4af0de))[_0x613f('0x49')](handleError(_0x21a1d1,null));};exports['show']=function(_0x152a3c,_0x15b54a){var _0x38aa12={'raw':![],'where':{'id':_0x152a3c[_0x613f('0x4a')]['id']}},_0x16b288={};_0x16b288[_0x613f('0x32')]=_[_0x613f('0x34')](db[_0x613f('0x30')][_0x613f('0x31')]);_0x16b288[_0x613f('0x33')]=_['keys'](_0x152a3c['query']);_0x16b288[_0x613f('0x35')]=_[_0x613f('0x36')](_0x16b288['model'],_0x16b288[_0x613f('0x33')]);_0x38aa12[_0x613f('0x38')]=_[_0x613f('0x36')](_0x16b288[_0x613f('0x32')],qs[_0x613f('0x37')](_0x152a3c[_0x613f('0x33')][_0x613f('0x37')]));_0x38aa12[_0x613f('0x38')]=_0x38aa12[_0x613f('0x38')][_0x613f('0x4b')]?_0x38aa12[_0x613f('0x38')]:_0x16b288[_0x613f('0x32')];if(_0x152a3c[_0x613f('0x33')][_0x613f('0x45')]){_0x38aa12[_0x613f('0x46')]=[{'all':!![]}];}_0x38aa12=_[_0x613f('0x3f')]({},_0x38aa12,_0x152a3c[_0x613f('0x44')]);return db[_0x613f('0x30')]['find'](_0x38aa12)['then'](handleEntityNotFound(_0x15b54a,null))[_0x613f('0x22')](respondWithResult(_0x15b54a,null))[_0x613f('0x49')](handleError(_0x15b54a,null));};exports['create']=function(_0x48d29a,_0x94968f){return db['VoiceQueue']['create'](_0x48d29a[_0x613f('0x4c')],{})[_0x613f('0x22')](function(_0x26ba69){var _0x52b62f=_0x48d29a[_0x613f('0x4d')][_0x613f('0x4e')]({'plain':!![]});if(!_0x52b62f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x52b62f['role']===_0x613f('0x4d')){var _0x30d7b1=_0x26ba69[_0x613f('0x4e')]({'plain':!![]});var _0x145009=[{'name':_0x613f('0x24'),'value':_0x613f('0x4f')},{'name':_0x613f('0x25'),'value':'outbound'}];var _0x4c6096=_[_0x613f('0x2a')](_0x145009,['value',_0x30d7b1['type']])[_0x613f('0x2d')];return db[_0x613f('0x50')][_0x613f('0x2a')]({'where':{'name':_0x4c6096,'userProfileId':_0x52b62f['userProfileId']},'raw':!![]})[_0x613f('0x22')](function(_0x3ab684){if(_0x3ab684&&_0x3ab684[_0x613f('0x51')]===0x0){return db[_0x613f('0x52')][_0x613f('0x53')]({'name':_0x30d7b1[_0x613f('0x2d')],'resourceId':_0x30d7b1['id'],'type':_0x3ab684[_0x613f('0x2d')],'sectionId':_0x3ab684['id']},{})['then'](function(){return _0x26ba69;});}else{return _0x26ba69;}})[_0x613f('0x49')](function(_0x4ff3ad){logger[_0x613f('0x2b')](_0x613f('0x54'),_0x4ff3ad);throw _0x4ff3ad;});}return _0x26ba69;})[_0x613f('0x22')](respondWithResult(_0x94968f,0xc9))[_0x613f('0x49')](handleError(_0x94968f,null));};exports[_0x613f('0x55')]=function(_0x1df0c8,_0x2161f6){var _0x447d69={'raw':![],'where':{'id':_0x1df0c8[_0x613f('0x4a')]['id']}},_0x214d01={};_0x214d01[_0x613f('0x32')]=_[_0x613f('0x34')](db[_0x613f('0x30')]['rawAttributes']);_0x447d69['attributes']=_[_0x613f('0x36')](_0x214d01['model'],qs[_0x613f('0x37')](_0x1df0c8[_0x613f('0x33')][_0x613f('0x37')]));_0x447d69[_0x613f('0x38')]=_0x447d69[_0x613f('0x38')][_0x613f('0x4b')]?_0x447d69[_0x613f('0x38')]:_0x214d01[_0x613f('0x32')];if(_0x1df0c8[_0x613f('0x33')][_0x613f('0x45')]){_0x447d69[_0x613f('0x46')]=[{'all':!![]}];}_0x447d69=_['merge']({},_0x447d69,_0x1df0c8[_0x613f('0x44')]);return db[_0x613f('0x30')][_0x613f('0x2a')](_0x447d69)[_0x613f('0x22')](handleEntityNotFound(_0x2161f6,null))['then'](function(_0xacca40){if(_0xacca40){var _0xe28447=_0xacca40['get']({'plain':!![]});_0xe28447=qs['omit'](_0xe28447,['id',_0x613f('0x56'),'updatedAt']);_0x1df0c8['body']=_['omit'](_0x1df0c8[_0x613f('0x4c')],['id','createdAt','updatedAt']);return db['VoiceQueue'][_0x613f('0x53')](_[_0x613f('0x3f')](_0xe28447,_0x1df0c8['body']),{'include':_0x1df0c8[_0x613f('0x33')][_0x613f('0x45')]?[{'all':!![]}]:undefined})[_0x613f('0x22')](function(_0x2a7ca7){var _0x5b8712=_0x1df0c8[_0x613f('0x4d')][_0x613f('0x4e')]({'plain':!![]});if(!_0x5b8712)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5b8712[_0x613f('0x57')]===_0x613f('0x4d')){var _0xae53fa=_0x2a7ca7[_0x613f('0x4e')]({'plain':!![]});var _0x1d28d5=[{'name':_0x613f('0x24'),'value':_0x613f('0x4f')},{'name':_0x613f('0x25'),'value':_0x613f('0x26')}];var _0x2aca4d=_[_0x613f('0x2a')](_0x1d28d5,[_0x613f('0x27'),_0xae53fa['type']])[_0x613f('0x2d')];return db[_0x613f('0x50')][_0x613f('0x2a')]({'where':{'name':_0x2aca4d,'userProfileId':_0x5b8712[_0x613f('0x58')]},'raw':!![]})[_0x613f('0x22')](function(_0x2d9b65){if(_0x2d9b65&&_0x2d9b65['autoAssociation']===0x0){return db[_0x613f('0x52')][_0x613f('0x53')]({'name':_0xae53fa[_0x613f('0x2d')],'resourceId':_0xae53fa['id'],'type':_0x2d9b65[_0x613f('0x2d')],'sectionId':_0x2d9b65['id']},{})[_0x613f('0x22')](function(){return _0x2a7ca7;});}else{return _0x2a7ca7;}})[_0x613f('0x49')](function(_0x4ec334){logger['error'](_0x613f('0x54'),_0x4ec334);throw _0x4ec334;});}return _0x2a7ca7;});}})[_0x613f('0x22')](respondWithResult(_0x2161f6,0xc9))[_0x613f('0x49')](handleError(_0x2161f6,null));};exports[_0x613f('0x21')]=function(_0x4f28c7,_0x11d2f4){if(_0x4f28c7[_0x613f('0x4c')]['id']){delete _0x4f28c7[_0x613f('0x4c')]['id'];}return db[_0x613f('0x30')]['find']({'where':{'id':_0x4f28c7[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x11d2f4,null))[_0x613f('0x22')](saveUpdates(_0x4f28c7[_0x613f('0x4c')],null))[_0x613f('0x22')](respondWithResult(_0x11d2f4,null))[_0x613f('0x49')](handleError(_0x11d2f4,null));};exports[_0x613f('0x23')]=function(_0x46ec08,_0x5dc81a){return db[_0x613f('0x30')][_0x613f('0x2a')]({'where':{'id':_0x46ec08[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x5dc81a,null))[_0x613f('0x22')](removeEntity(_0x5dc81a,null))[_0x613f('0x49')](handleError(_0x5dc81a,null));};exports[_0x613f('0x59')]=function(_0x276044,_0x7f3043,_0x300b69){var _0x4c4710={'raw':![],'where':{}};var _0x2c4b88={};var _0x285424={'count':0x0,'rows':[]};return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0x276044[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x7f3043,null))[_0x613f('0x22')](function(_0x2e28a7){if(_0x2e28a7){_0x2c4b88[_0x613f('0x32')]=_[_0x613f('0x34')](db[_0x613f('0x5b')]['rawAttributes']);_0x2c4b88[_0x613f('0x33')]=_[_0x613f('0x34')](_0x276044[_0x613f('0x33')]);_0x2c4b88[_0x613f('0x35')]=_[_0x613f('0x36')](_0x2c4b88[_0x613f('0x32')],_0x2c4b88[_0x613f('0x33')]);_0x4c4710[_0x613f('0x38')]=_[_0x613f('0x36')](_0x2c4b88[_0x613f('0x32')],qs[_0x613f('0x37')](_0x276044[_0x613f('0x33')]['fields']));_0x4c4710[_0x613f('0x38')]=_0x4c4710[_0x613f('0x38')]['length']?_0x4c4710[_0x613f('0x38')]:_0x2c4b88['model'];if(!_0x276044[_0x613f('0x33')]['hasOwnProperty']('nolimit')){_0x4c4710[_0x613f('0x1c')]=qs[_0x613f('0x1c')](_0x276044[_0x613f('0x33')][_0x613f('0x1c')]);_0x4c4710[_0x613f('0x1b')]=qs[_0x613f('0x1b')](_0x276044[_0x613f('0x33')]['offset']);}_0x4c4710[_0x613f('0x3a')]=qs[_0x613f('0x3b')](_0x276044[_0x613f('0x33')][_0x613f('0x3b')]);_0x4c4710[_0x613f('0x3c')]=qs['filters'](_[_0x613f('0x3d')](_0x276044[_0x613f('0x33')],_0x2c4b88['filters']));_0x4c4710[_0x613f('0x3c')][_0x613f('0x5c')]=_0x2e28a7['id'];if(_0x276044[_0x613f('0x33')]['filter']){_0x4c4710['where']=_['merge'](_0x4c4710[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x4c4710['attributes'],function(_0x23e150){var _0x13ae55={};_0x13ae55[_0x23e150]={'$like':'%'+_0x276044[_0x613f('0x33')]['filter']+'%'};return _0x13ae55;})});}_0x4c4710=_[_0x613f('0x3f')]({},_0x4c4710,_0x276044['options']);return db[_0x613f('0x5b')]['count']({'where':_0x4c4710['where']})[_0x613f('0x22')](function(_0x1b5f6e){_0x285424[_0x613f('0x1a')]=_0x1b5f6e;if(_0x276044[_0x613f('0x33')][_0x613f('0x45')]){_0x4c4710[_0x613f('0x46')]=[{'all':!![]}];}return db[_0x613f('0x5b')][_0x613f('0x47')](_0x4c4710);})[_0x613f('0x22')](function(_0x5fb7a4){_0x285424[_0x613f('0x48')]=_0x5fb7a4;return _0x285424;});}})['then'](respondWithFilteredResult(_0x7f3043,_0x4c4710))[_0x613f('0x49')](handleError(_0x7f3043,null));};exports[_0x613f('0x5d')]=function(_0xa17a7d,_0x1e51e2,_0x399491){var _0x2b3220={'raw':!![],'where':{}};var _0x15f027={};var _0x5a5034={'count':0x0,'rows':[]};return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0xa17a7d[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x1e51e2,null))['then'](function(_0x102e35){if(_0x102e35){_0x15f027[_0x613f('0x32')]=_[_0x613f('0x34')](db[_0x613f('0x5e')][_0x613f('0x31')]);_0x15f027[_0x613f('0x33')]=_['keys'](_0xa17a7d[_0x613f('0x33')]);_0x15f027[_0x613f('0x35')]=_['intersection'](_0x15f027[_0x613f('0x32')],_0x15f027[_0x613f('0x33')]);_0x2b3220[_0x613f('0x38')]=_[_0x613f('0x36')](_0x15f027[_0x613f('0x32')],qs['fields'](_0xa17a7d[_0x613f('0x33')][_0x613f('0x37')]));_0x2b3220[_0x613f('0x38')]=_0x2b3220[_0x613f('0x38')][_0x613f('0x4b')]?_0x2b3220[_0x613f('0x38')]:_0x15f027['model'];if(!_0xa17a7d['query'][_0x613f('0x5f')](_0x613f('0x39'))){_0x2b3220[_0x613f('0x1c')]=qs['limit'](_0xa17a7d[_0x613f('0x33')][_0x613f('0x1c')]);_0x2b3220[_0x613f('0x1b')]=qs[_0x613f('0x1b')](_0xa17a7d['query'][_0x613f('0x1b')]);}_0x2b3220[_0x613f('0x3a')]=qs['sort'](_0xa17a7d['query']['sort']);_0x2b3220[_0x613f('0x3c')]=qs['filters'](_[_0x613f('0x3d')](_0xa17a7d[_0x613f('0x33')],_0x15f027[_0x613f('0x35')]));_0x2b3220[_0x613f('0x3c')]['VoiceQueueId']=_0x102e35['id'];if(_0xa17a7d[_0x613f('0x33')][_0x613f('0x3e')]){_0x2b3220[_0x613f('0x3c')]=_[_0x613f('0x3f')](_0x2b3220[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x2b3220[_0x613f('0x38')],function(_0x5159ab){var _0x286977={};_0x286977[_0x5159ab]={'$like':'%'+_0xa17a7d[_0x613f('0x33')][_0x613f('0x3e')]+'%'};return _0x286977;})});}_0x2b3220=_['merge']({},_0x2b3220,_0xa17a7d[_0x613f('0x44')]);return db[_0x613f('0x5e')][_0x613f('0x1a')]({'where':_0x2b3220['where']})[_0x613f('0x22')](function(_0xe74780){_0x5a5034[_0x613f('0x1a')]=_0xe74780;if(_0xa17a7d[_0x613f('0x33')][_0x613f('0x45')]){_0x2b3220[_0x613f('0x46')]=[{'all':!![]}];}return db[_0x613f('0x5e')][_0x613f('0x47')](_0x2b3220);})['then'](function(_0x514600){_0x5a5034[_0x613f('0x48')]=_0x514600;return _0x5a5034;});}})[_0x613f('0x22')](respondWithFilteredResult(_0x1e51e2,_0x2b3220))[_0x613f('0x49')](handleError(_0x1e51e2,null));};exports[_0x613f('0x60')]=function(_0x13acaa,_0x4f5f07,_0xf11a5e){var _0x4e560f={'raw':!![],'where':{}};var _0x1f72e7={};var _0x23300e={'count':0x0,'rows':[]};return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0x13acaa['params']['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x4f5f07,null))[_0x613f('0x22')](function(_0x4cb3d1){if(_0x4cb3d1){_0x1f72e7[_0x613f('0x32')]=_['keys'](db[_0x613f('0x61')][_0x613f('0x31')]);_0x1f72e7[_0x613f('0x33')]=_[_0x613f('0x34')](_0x13acaa[_0x613f('0x33')]);_0x1f72e7['filters']=_[_0x613f('0x36')](_0x1f72e7[_0x613f('0x32')],_0x1f72e7['query']);_0x4e560f[_0x613f('0x38')]=_['intersection'](_0x1f72e7[_0x613f('0x32')],qs[_0x613f('0x37')](_0x13acaa[_0x613f('0x33')][_0x613f('0x37')]));_0x4e560f[_0x613f('0x38')]=_0x4e560f[_0x613f('0x38')][_0x613f('0x4b')]?_0x4e560f['attributes']:_0x1f72e7[_0x613f('0x32')];if(!_0x13acaa[_0x613f('0x33')][_0x613f('0x5f')](_0x613f('0x39'))){_0x4e560f[_0x613f('0x1c')]=qs[_0x613f('0x1c')](_0x13acaa[_0x613f('0x33')][_0x613f('0x1c')]);_0x4e560f[_0x613f('0x1b')]=qs[_0x613f('0x1b')](_0x13acaa['query'][_0x613f('0x1b')]);}_0x4e560f[_0x613f('0x3a')]=qs['sort'](_0x13acaa[_0x613f('0x33')][_0x613f('0x3b')]);_0x4e560f['where']=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x13acaa[_0x613f('0x33')],_0x1f72e7[_0x613f('0x35')]));_0x4e560f[_0x613f('0x3c')][_0x613f('0x5c')]=_0x4cb3d1['id'];if(_0x13acaa[_0x613f('0x33')][_0x613f('0x3e')]){_0x4e560f[_0x613f('0x3c')]=_[_0x613f('0x3f')](_0x4e560f[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x4e560f[_0x613f('0x38')],function(_0x2112be){var _0x6110c0={};_0x6110c0[_0x2112be]={'$like':'%'+_0x13acaa[_0x613f('0x33')][_0x613f('0x3e')]+'%'};return _0x6110c0;})});}_0x4e560f=_[_0x613f('0x3f')]({},_0x4e560f,_0x13acaa[_0x613f('0x44')]);return db[_0x613f('0x61')]['count']({'where':_0x4e560f[_0x613f('0x3c')]})['then'](function(_0xf56397){_0x23300e[_0x613f('0x1a')]=_0xf56397;if(_0x13acaa['query'][_0x613f('0x45')]){_0x4e560f[_0x613f('0x46')]=[{'all':!![]}];}return db[_0x613f('0x61')][_0x613f('0x47')](_0x4e560f);})[_0x613f('0x22')](function(_0x442fca){_0x23300e['rows']=_0x442fca;return _0x23300e;});}})[_0x613f('0x22')](respondWithFilteredResult(_0x4f5f07,_0x4e560f))[_0x613f('0x49')](handleError(_0x4f5f07,null));};exports['getHopperBlacks']=function(_0x7b1c89,_0x33c934,_0x11bb03){var _0x1811b8={'raw':!![],'where':{}};var _0x925f03={};var _0x2315e5={'count':0x0,'rows':[]};return db['VoiceQueue'][_0x613f('0x5a')]({'where':{'id':_0x7b1c89[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x33c934,null))[_0x613f('0x22')](function(_0x32b5f6){if(_0x32b5f6){_0x925f03[_0x613f('0x32')]=_[_0x613f('0x34')](db[_0x613f('0x62')]['rawAttributes']);_0x925f03[_0x613f('0x33')]=_['keys'](_0x7b1c89['query']);_0x925f03[_0x613f('0x35')]=_[_0x613f('0x36')](_0x925f03['model'],_0x925f03[_0x613f('0x33')]);_0x1811b8[_0x613f('0x38')]=_[_0x613f('0x36')](_0x925f03[_0x613f('0x32')],qs[_0x613f('0x37')](_0x7b1c89[_0x613f('0x33')][_0x613f('0x37')]));_0x1811b8[_0x613f('0x38')]=_0x1811b8[_0x613f('0x38')]['length']?_0x1811b8[_0x613f('0x38')]:_0x925f03['model'];if(!_0x7b1c89[_0x613f('0x33')][_0x613f('0x5f')]('nolimit')){_0x1811b8[_0x613f('0x1c')]=qs['limit'](_0x7b1c89[_0x613f('0x33')][_0x613f('0x1c')]);_0x1811b8[_0x613f('0x1b')]=qs['offset'](_0x7b1c89[_0x613f('0x33')][_0x613f('0x1b')]);}_0x1811b8[_0x613f('0x3a')]=qs[_0x613f('0x3b')](_0x7b1c89[_0x613f('0x33')][_0x613f('0x3b')]);_0x1811b8[_0x613f('0x3c')]=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x7b1c89['query'],_0x925f03[_0x613f('0x35')]));_0x1811b8[_0x613f('0x3c')][_0x613f('0x5c')]=_0x32b5f6['id'];if(_0x7b1c89['query'][_0x613f('0x3e')]){_0x1811b8[_0x613f('0x3c')]=_[_0x613f('0x3f')](_0x1811b8[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x1811b8[_0x613f('0x38')],function(_0x36dc8f){var _0x335135={};_0x335135[_0x36dc8f]={'$like':'%'+_0x7b1c89['query'][_0x613f('0x3e')]+'%'};return _0x335135;})});}_0x1811b8=_[_0x613f('0x3f')]({},_0x1811b8,_0x7b1c89[_0x613f('0x44')]);return db[_0x613f('0x62')][_0x613f('0x1a')]({'where':_0x1811b8[_0x613f('0x3c')]})[_0x613f('0x22')](function(_0x23e393){_0x2315e5['count']=_0x23e393;if(_0x7b1c89['query'][_0x613f('0x45')]){_0x1811b8[_0x613f('0x46')]=[{'all':!![]}];}return db[_0x613f('0x62')]['findAll'](_0x1811b8);})[_0x613f('0x22')](function(_0x1e13d6){_0x2315e5[_0x613f('0x48')]=_0x1e13d6;return _0x2315e5;});}})['then'](respondWithFilteredResult(_0x33c934,_0x1811b8))[_0x613f('0x49')](handleError(_0x33c934,null));};exports['getTeams']=function(_0x54d104,_0x2b1107,_0x3c85a0){var _0x47e312={};var _0xe1e503={};var _0x33d28a;var _0x55332e;return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0x54d104[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x2b1107,null))[_0x613f('0x22')](function(_0x48a67f){if(_0x48a67f){_0x33d28a=_0x48a67f;_0xe1e503['model']=_[_0x613f('0x34')](db['Team'][_0x613f('0x31')]);_0xe1e503['query']=_[_0x613f('0x34')](_0x54d104['query']);_0xe1e503[_0x613f('0x35')]=_['intersection'](_0xe1e503['model'],_0xe1e503[_0x613f('0x33')]);_0x47e312[_0x613f('0x38')]=_['intersection'](_0xe1e503[_0x613f('0x32')],qs['fields'](_0x54d104['query']['fields']));_0x47e312[_0x613f('0x38')]=_0x47e312[_0x613f('0x38')][_0x613f('0x4b')]?_0x47e312['attributes']:_0xe1e503[_0x613f('0x32')];_0x47e312[_0x613f('0x3a')]=qs[_0x613f('0x3b')](_0x54d104['query'][_0x613f('0x3b')]);_0x47e312[_0x613f('0x3c')]=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x54d104[_0x613f('0x33')],_0xe1e503[_0x613f('0x35')]));if(_0x54d104[_0x613f('0x33')]['filter']){_0x47e312[_0x613f('0x3c')]=_[_0x613f('0x3f')](_0x47e312[_0x613f('0x3c')],{'$or':_['map'](_0x47e312[_0x613f('0x38')],function(_0x380e1a){var _0xcc214f={};_0xcc214f[_0x380e1a]={'$like':'%'+_0x54d104['query'][_0x613f('0x3e')]+'%'};return _0xcc214f;})});}_0x47e312=_[_0x613f('0x3f')]({},_0x47e312,_0x54d104[_0x613f('0x44')]);return _0x33d28a['getTeams'](_0x47e312);}})[_0x613f('0x22')](function(_0x555718){if(_0x555718){_0x55332e=_0x555718[_0x613f('0x4b')];if(!_0x54d104[_0x613f('0x33')][_0x613f('0x5f')](_0x613f('0x39'))){_0x47e312[_0x613f('0x1c')]=qs[_0x613f('0x1c')](_0x54d104[_0x613f('0x33')]['limit']);_0x47e312['offset']=qs['offset'](_0x54d104[_0x613f('0x33')][_0x613f('0x1b')]);}return _0x33d28a[_0x613f('0x63')](_0x47e312);}})[_0x613f('0x22')](function(_0x4d35e5){if(_0x4d35e5){return _0x4d35e5?{'count':_0x55332e,'rows':_0x4d35e5}:null;}})['then'](respondWithResult(_0x2b1107,null))[_0x613f('0x49')](handleError(_0x2b1107,null));};exports[_0x613f('0x64')]=function(_0x43b494,_0x2b66fb,_0x8f44a5){var _0x4e6e3d=_0x43b494['body'][_0x613f('0x65')];return db[_0x613f('0x66')][_0x613f('0x47')]({'where':{'id':_[_0x613f('0x40')](_0x4e6e3d,'id')},'attributes':['id'],'include':[{'model':db[_0x613f('0x67')],'as':'Agents','attributes':['id',_0x613f('0x2d'),_0x613f('0x68'),_0x613f('0x69'),_0x613f('0x6a')],'raw':!![]}]})[_0x613f('0x22')](function(_0x30ff21){if(_0x30ff21){var _0xae025=_[_0x613f('0x6b')](_0x30ff21,function(_0xbfd651){var _0x2a7324=_0xbfd651[_0x613f('0x4e')]({'plain':!![]});_0x2a7324[_0x613f('0x6c')][_0x613f('0x6d')](function(_0x576277){_0x576277[_0x613f('0x6e')]=_[_0x613f('0x2a')](_0x4e6e3d,{'id':_0x2a7324['id']})[_0x613f('0x6e')];});return _0x2a7324[_0x613f('0x6c')];});return db['VoiceQueue'][_0x613f('0x2a')]({'where':{'id':_0x43b494[_0x613f('0x4a')]['id']}})['then'](function(_0x3d82fe){return db['sequelize'][_0x613f('0x6f')](function(_0x2f147c){return _0x3d82fe['addTeams'](_['map'](_0x4e6e3d,'id'),{'transaction':_0x2f147c})[_0x613f('0x22')](function(){return BPromise['each'](_0xae025,function(_0x523e8e){return db[_0x613f('0x70')][_0x613f('0x71')]({'where':{'UserId':_0x523e8e['id'],'VoiceQueueId':_0x43b494['params']['id']},'defaults':{'penalty':_0x523e8e[_0x613f('0x6e')]},'transaction':_0x2f147c});});})['then'](function(){return BPromise[_0x613f('0x72')](_['filter'](_0xae025,{'online':!![]}),function(_0x3465b4){return db[_0x613f('0x73')][_0x613f('0x74')]({'membername':_0x3465b4[_0x613f('0x2d')],'UserId':_0x3465b4['id'],'queue_name':_0x3d82fe['name'],'VoiceQueueId':_0x3d82fe['id'],'interface':_[_0x613f('0x75')](_0x3465b4[_0x613f('0x6a')])?util[_0x613f('0x76')]('SIP/%s',_0x3465b4['name']):_0x3465b4['interface'],'paused':_0x3465b4[_0x613f('0x69')]||![],'penalty':_0x3465b4['penalty']},{'transaction':_0x2f147c});});})[_0x613f('0x22')](function(){_0xae025['forEach'](function(_0x25ed21){socket[_0x613f('0x77')](_0x613f('0x78'),{'UserId':_0x25ed21['id'],'VoiceQueueId':_0x3d82fe['id']});});});});});}})[_0x613f('0x22')](respondWithStatusCode(_0x2b66fb,null))[_0x613f('0x49')](handleError(_0x2b66fb,null));};exports[_0x613f('0x79')]=function(_0x487cbf,_0x2e57ab,_0x12b73c){return db[_0x613f('0x66')]['findAll']({'where':{'id':_0x487cbf[_0x613f('0x33')]['ids']},'attributes':['id'],'include':[{'model':db[_0x613f('0x67')],'as':_0x613f('0x6c'),'attributes':['id'],'raw':!![]}]})[_0x613f('0x22')](handleEntityNotFound(_0x2e57ab,null))['then'](function(_0x3f481f){var _0x5dda7d=_[_0x613f('0x40')](_0x3f481f,'id');var _0x5788da=[];var _0x3ec98e=[];var _0x46afb0=squel[_0x613f('0x7a')]();_0x46afb0[_0x613f('0x43')]('tq.TeamId')[_0x613f('0x7b')]('team_has_voice_queues','tq')[_0x613f('0x7c')](_0x613f('0x7d'),'ut',_0x613f('0x7e'))['where'](_0x613f('0x7f'),_0x487cbf[_0x613f('0x4a')]['id']);for(var _0x62cd9d=0x0;_0x62cd9d<_0x3f481f[_0x613f('0x4b')];_0x62cd9d+=0x1){let _0x1d8212=_0x3f481f[_0x62cd9d];for(var _0x250558=0x0;_0x250558<_0x1d8212[_0x613f('0x6c')][_0x613f('0x4b')];_0x250558+=0x1){let _0x292a88=_0x1d8212[_0x613f('0x6c')][_0x250558];var _0x483b81=_0x46afb0['clone']();_0x483b81[_0x613f('0x3c')](_0x613f('0x80'),_0x292a88['id']);_0x3ec98e['push'](db['sequelize']['query'](_0x483b81[_0x613f('0x81')](),{'type':db['sequelize']['QueryTypes'][_0x613f('0x82')]})[_0x613f('0x22')](function(_0x5b2411){if(_0x5b2411[_0x613f('0x4b')]===0x1){return _0x292a88['id'];}else{var _0x5eda6e=_[_0x613f('0x83')](_['map'](_0x5b2411,_0x613f('0x84')),function(_0x552891){return _[_0x613f('0x28')](_0x5dda7d,_0x552891);});if(_0x5eda6e){return _0x292a88['id'];}}}));}}return BPromise['all'](_0x3ec98e)['then'](function(_0x444e5b){_0x5788da=_(_0x5788da)[_0x613f('0x85')](_0x444e5b)[_0x613f('0x86')]()[_0x613f('0x27')]();return db[_0x613f('0x30')]['find']({'where':{'id':_0x487cbf[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](function(_0x26ecd5){return db[_0x613f('0x87')][_0x613f('0x6f')](function(_0xd103fb){return _0x26ecd5[_0x613f('0x79')](_0x487cbf[_0x613f('0x33')][_0x613f('0x88')],{'transaction':_0xd103fb})[_0x613f('0x22')](function(){if(!_[_0x613f('0x89')](_0x5788da)){return _0x26ecd5[_0x613f('0x8a')](_0x5788da,{'transaction':_0xd103fb})[_0x613f('0x22')](function(){return db[_0x613f('0x73')]['destroy']({'where':{'VoiceQueueId':_0x487cbf['params']['id'],'UserId':_0x5788da},'transaction':_0xd103fb});});}})[_0x613f('0x22')](function(){_0x5788da[_0x613f('0x6d')](function(_0x2d2803){socket[_0x613f('0x77')](_0x613f('0x8b'),{'UserId':_0x2d2803,'VoiceQueueId':_0x26ecd5['id']});});});});});});})['then'](respondWithStatusCode(_0x2e57ab,null))['catch'](handleError(_0x2e57ab,null));};exports[_0x613f('0x8c')]=function(_0x27767a,_0x378898,_0x3671b4){var _0x48b47b,_0x1e05a6;return db[_0x613f('0x30')][_0x613f('0x2a')]({'where':{'id':_0x27767a['params']['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x378898,null))[_0x613f('0x22')](function(_0x93e886){if(_0x93e886){_0x1e05a6=_0x93e886;return _0x93e886['addAgents'](_0x27767a[_0x613f('0x4c')][_0x613f('0x88')],_[_0x613f('0x8d')](_0x27767a[_0x613f('0x4c')],['ids','id'])||{})[_0x613f('0x8e')](function(_0x1fd03f){for(var _0x1cdeba=0x0;_0x1cdeba<_0x27767a['body'][_0x613f('0x88')][_0x613f('0x4b')];_0x1cdeba+=0x1){socket['emit'](_0x613f('0x78'),{'UserId':_0x27767a[_0x613f('0x4c')][_0x613f('0x88')][_0x1cdeba],'VoiceQueueId':_0x27767a['params']['id']});}return _0x1fd03f;});}})[_0x613f('0x22')](function(_0x4a8b09){_0x48b47b=_0x4a8b09||[];if(_0x1e05a6){return db[_0x613f('0x67')][_0x613f('0x47')]({'where':{'id':_0x27767a['body'][_0x613f('0x88')]},'attributes':['id',_0x613f('0x2d'),_0x613f('0x68'),'voicePause',_0x613f('0x6a')],'raw':!![]});}})[_0x613f('0x22')](function(_0x5d72d8){if(!_[_0x613f('0x89')](_0x5d72d8)){var _0x1345d7=[];for(var _0x301c2f=0x0;_0x301c2f<_0x5d72d8[_0x613f('0x4b')];_0x301c2f++){if(_0x5d72d8[_0x301c2f]['online']){_0x1345d7['push'](db[_0x613f('0x73')][_0x613f('0x74')]({'membername':_0x5d72d8[_0x301c2f][_0x613f('0x2d')],'UserId':_0x5d72d8[_0x301c2f]['id'],'queue_name':_0x1e05a6['name'],'VoiceQueueId':_0x1e05a6['id'],'interface':_[_0x613f('0x75')](_0x5d72d8[_0x301c2f]['interface'])?util['format']('SIP/%s',_0x5d72d8[_0x301c2f]['name']):_0x5d72d8[_0x301c2f][_0x613f('0x6a')],'paused':_0x5d72d8[_0x301c2f][_0x613f('0x69')]||![],'penalty':_0x27767a[_0x613f('0x4c')][_0x613f('0x6e')]||0x0}));}}return BPromise[_0x613f('0x8f')](_0x1345d7);}})[_0x613f('0x22')](function(){return _0x48b47b;})[_0x613f('0x22')](respondWithResult(_0x378898,null))['catch'](handleError(_0x378898,null));};exports['removeAgents']=function(_0x55e56a,_0x2dc9c3,_0x4cfb5d){return db[_0x613f('0x30')][_0x613f('0x2a')]({'where':{'id':_0x55e56a[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x2dc9c3,null))[_0x613f('0x22')](function(_0x520640){if(_0x520640){return _0x520640[_0x613f('0x8a')](_0x55e56a[_0x613f('0x33')][_0x613f('0x88')])['then'](function(){if(_[_0x613f('0x90')](_0x55e56a[_0x613f('0x33')][_0x613f('0x88')])){for(var _0x14e7c1=0x0;_0x14e7c1<_0x55e56a[_0x613f('0x33')][_0x613f('0x88')][_0x613f('0x4b')];_0x14e7c1+=0x1){socket[_0x613f('0x77')](_0x613f('0x8b'),{'UserId':Number(_0x55e56a['query']['ids'][_0x14e7c1]),'VoiceQueueId':Number(_0x55e56a[_0x613f('0x4a')]['id'])});}}else{socket[_0x613f('0x77')](_0x613f('0x8b'),{'UserId':Number(_0x55e56a[_0x613f('0x33')]['ids']),'VoiceQueueId':Number(_0x55e56a[_0x613f('0x4a')]['id'])});}});}})[_0x613f('0x22')](function(_0x234a6f){return db['UserVoiceQueueRt'][_0x613f('0x23')]({'where':{'VoiceQueueId':_0x55e56a[_0x613f('0x4a')]['id'],'UserId':_0x55e56a['query'][_0x613f('0x88')]}})[_0x613f('0x22')](function(){return _0x234a6f;});})[_0x613f('0x22')](respondWithStatusCode(_0x2dc9c3,null))[_0x613f('0x49')](handleError(_0x2dc9c3,null));};exports[_0x613f('0x91')]=function(_0x5e1d67,_0x5244af,_0x4b8c69){var _0x4d548d={};var _0x1c0615={};var _0x2e20fc;var _0x29362e;return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0x5e1d67[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x5244af,null))[_0x613f('0x22')](function(_0x137bfa){if(_0x137bfa){_0x2e20fc=_0x137bfa;_0x1c0615['model']=_[_0x613f('0x34')](db[_0x613f('0x67')][_0x613f('0x31')]);_0x1c0615[_0x613f('0x33')]=_[_0x613f('0x34')](_0x5e1d67[_0x613f('0x33')]);_0x1c0615['filters']=_[_0x613f('0x36')](_0x1c0615['model'],_0x1c0615[_0x613f('0x33')]);_0x4d548d['attributes']=_[_0x613f('0x36')](_0x1c0615[_0x613f('0x32')],qs[_0x613f('0x37')](_0x5e1d67[_0x613f('0x33')][_0x613f('0x37')]));_0x4d548d[_0x613f('0x38')]=_0x4d548d['attributes']['length']?_0x4d548d[_0x613f('0x38')]:_0x1c0615[_0x613f('0x32')];_0x4d548d['order']=qs[_0x613f('0x3b')](_0x5e1d67[_0x613f('0x33')][_0x613f('0x3b')]);_0x4d548d['where']=qs[_0x613f('0x35')](_['pick'](_0x5e1d67[_0x613f('0x33')],_0x1c0615[_0x613f('0x35')]));if(_0x5e1d67[_0x613f('0x33')][_0x613f('0x3e')]){_0x4d548d['where']=_[_0x613f('0x3f')](_0x4d548d[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x4d548d[_0x613f('0x38')],function(_0x413234){var _0x141780={};_0x141780[_0x413234]={'$like':'%'+_0x5e1d67[_0x613f('0x33')][_0x613f('0x3e')]+'%'};return _0x141780;})});}_0x4d548d=_[_0x613f('0x3f')]({},_0x4d548d,_0x5e1d67['options']);return _0x2e20fc[_0x613f('0x91')](_0x4d548d);}})[_0x613f('0x22')](function(_0x5bda6e){if(_0x5bda6e){_0x29362e=_0x5bda6e[_0x613f('0x4b')];if(!_0x5e1d67[_0x613f('0x33')][_0x613f('0x5f')](_0x613f('0x39'))){_0x4d548d[_0x613f('0x1c')]=qs[_0x613f('0x1c')](_0x5e1d67[_0x613f('0x33')]['limit']);_0x4d548d['offset']=qs[_0x613f('0x1b')](_0x5e1d67['query'][_0x613f('0x1b')]);}return _0x2e20fc[_0x613f('0x91')](_0x4d548d);}})[_0x613f('0x22')](function(_0x3b6d2e){if(_0x3b6d2e){return _0x3b6d2e?{'count':_0x29362e,'rows':_0x3b6d2e}:null;}})['then'](respondWithResult(_0x5244af,null))[_0x613f('0x49')](handleError(_0x5244af,null));};exports[_0x613f('0x92')]=function(_0x32cc83,_0xd8441,_0x1fac19){var _0x560010={};var _0x4286c7={};var _0x44fbf1;var _0x7554d6;return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0x32cc83[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0xd8441,null))[_0x613f('0x22')](function(_0x4835f3){if(_0x4835f3){_0x44fbf1=_0x4835f3;_0x4286c7[_0x613f('0x32')]=_[_0x613f('0x34')](db['UserVoiceQueueRt']['rawAttributes']);_0x4286c7['query']=_[_0x613f('0x34')](_0x32cc83[_0x613f('0x33')]);_0x4286c7[_0x613f('0x35')]=_[_0x613f('0x36')](_0x4286c7[_0x613f('0x32')],_0x4286c7[_0x613f('0x33')]);_0x560010[_0x613f('0x38')]=_[_0x613f('0x36')](_0x4286c7['model'],qs[_0x613f('0x37')](_0x32cc83['query'][_0x613f('0x37')]));_0x560010['attributes']=_0x560010[_0x613f('0x38')]['length']?_0x560010[_0x613f('0x38')]:_0x4286c7['model'];_0x560010['order']=qs[_0x613f('0x3b')](_0x32cc83['query']['sort']);_0x560010[_0x613f('0x3c')]=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x32cc83[_0x613f('0x33')],_0x4286c7[_0x613f('0x35')]));if(_0x32cc83[_0x613f('0x33')][_0x613f('0x3e')]){_0x560010[_0x613f('0x3c')]=_['merge'](_0x560010[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x560010[_0x613f('0x38')],function(_0xe40ecf){var _0xa16a1a={};_0xa16a1a[_0xe40ecf]={'$like':'%'+_0x32cc83[_0x613f('0x33')][_0x613f('0x3e')]+'%'};return _0xa16a1a;})});}_0x560010=_[_0x613f('0x3f')]({},_0x560010,_0x32cc83[_0x613f('0x44')]);return _0x44fbf1[_0x613f('0x92')](_0x560010);}})[_0x613f('0x22')](function(_0x24d34e){if(_0x24d34e){_0x7554d6=_0x24d34e[_0x613f('0x4b')];if(!_0x32cc83['query'][_0x613f('0x5f')](_0x613f('0x39'))){_0x560010[_0x613f('0x1c')]=qs[_0x613f('0x1c')](_0x32cc83[_0x613f('0x33')][_0x613f('0x1c')]);_0x560010[_0x613f('0x1b')]=qs['offset'](_0x32cc83[_0x613f('0x33')][_0x613f('0x1b')]);}return _0x44fbf1[_0x613f('0x92')](_0x560010);}})['then'](function(_0x2f5dd5){return _0x2f5dd5?{'count':_0x7554d6,'rows':_0x2f5dd5}:null;})[_0x613f('0x22')](respondWithResult(_0xd8441,null))['catch'](handleError(_0xd8441,null));};exports[_0x613f('0x93')]=function(_0x56603e,_0x153291,_0x30f3a3){var _0x546245={};var _0xc15dfe={};var _0x3e5650;var _0x40d88d;return db['VoiceQueue'][_0x613f('0x5a')]({'where':{'id':_0x56603e[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x153291,null))[_0x613f('0x22')](function(_0x1e58c9){if(_0x1e58c9){_0x3e5650=_0x1e58c9;_0xc15dfe[_0x613f('0x32')]=_['keys'](db[_0x613f('0x94')][_0x613f('0x31')]);_0xc15dfe[_0x613f('0x33')]=_['keys'](_0x56603e[_0x613f('0x33')]);_0xc15dfe[_0x613f('0x35')]=_[_0x613f('0x36')](_0xc15dfe[_0x613f('0x32')],_0xc15dfe['query']);_0x546245[_0x613f('0x38')]=_[_0x613f('0x36')](_0xc15dfe[_0x613f('0x32')],qs['fields'](_0x56603e[_0x613f('0x33')][_0x613f('0x37')]));_0x546245['attributes']=_0x546245['attributes'][_0x613f('0x4b')]?_0x546245[_0x613f('0x38')]:_0xc15dfe[_0x613f('0x32')];_0x546245['order']=qs['sort'](_0x56603e[_0x613f('0x33')][_0x613f('0x3b')]);_0x546245['where']=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x56603e[_0x613f('0x33')],_0xc15dfe[_0x613f('0x35')]));if(_0x56603e[_0x613f('0x33')][_0x613f('0x3e')]){_0x546245[_0x613f('0x3c')]=_[_0x613f('0x3f')](_0x546245[_0x613f('0x3c')],{'$or':_[_0x613f('0x40')](_0x546245[_0x613f('0x38')],function(_0x532a5e){var _0x25fd4b={};_0x25fd4b[_0x532a5e]={'$like':'%'+_0x56603e['query'][_0x613f('0x3e')]+'%'};return _0x25fd4b;})});}_0x546245=_[_0x613f('0x3f')]({},_0x546245,_0x56603e[_0x613f('0x44')]);return _0x3e5650[_0x613f('0x93')](_0x546245);}})['then'](function(_0x410d71){if(_0x410d71){_0x40d88d=_0x410d71[_0x613f('0x4b')];if(!_0x56603e['query']['hasOwnProperty'](_0x613f('0x39'))){_0x546245['limit']=qs[_0x613f('0x1c')](_0x56603e[_0x613f('0x33')][_0x613f('0x1c')]);_0x546245[_0x613f('0x1b')]=qs[_0x613f('0x1b')](_0x56603e[_0x613f('0x33')][_0x613f('0x1b')]);}return _0x3e5650[_0x613f('0x93')](_0x546245);}})[_0x613f('0x22')](function(_0x26196b){if(_0x26196b){return _0x26196b?{'count':_0x40d88d,'rows':_0x26196b}:null;}})['then'](respondWithResult(_0x153291,null))[_0x613f('0x49')](handleError(_0x153291,null));};exports['addLists']=function(_0x1fb88c,_0x30b478,_0x59743a){var _0x221dda,_0x3b9991;return db[_0x613f('0x30')][_0x613f('0x2a')]({'where':{'id':_0x1fb88c['params']['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x30b478,null))[_0x613f('0x22')](function(_0xcee049){if(_0xcee049){_0x3b9991=_0xcee049;return _0xcee049[_0x613f('0x95')](_0x1fb88c[_0x613f('0x4c')][_0x613f('0x88')],_[_0x613f('0x8d')](_0x1fb88c['body'],[_0x613f('0x88'),'id'])||{});}return null;})[_0x613f('0x8e')](function(_0x3075ab){var _0x1a1578;_0x221dda=_0x3075ab||[];var _0xa042d=[];if(_0x3075ab){for(var _0x59ba6c=0x0;_0x59ba6c<_0x3075ab[_0x613f('0x4b')];_0x59ba6c+=0x1){var _0x532254=_0x3075ab[_0x59ba6c][_0x613f('0x4e')]({'plain':!![]});_0x3b9991[_0x613f('0x96')]=_0x1fb88c[_0x613f('0x4c')]['dialCheckDuplicateType']?_0x1fb88c[_0x613f('0x4c')]['dialCheckDuplicateType']:_0x3b9991[_0x613f('0x96')];switch(_0x3b9991['dialCheckDuplicateType']){case _0x613f('0x97'):_0x1a1578=squel[_0x613f('0x98')]()[_0x613f('0x99')](_0x613f('0x9a'))[_0x613f('0x9b')](['phone',_0x613f('0x9c'),_0x613f('0x9d'),_0x613f('0x9e'),'VoiceQueueId',_0x613f('0x56'),_0x613f('0x9f')],squel[_0x613f('0x7a')]()[_0x613f('0x43')](_0x613f('0xa0'),_0x613f('0xa0'))[_0x613f('0x43')](_0x613f('0xa1'),_0x613f('0x9c'))['field']('id',_0x613f('0x9d'))[_0x613f('0x43')](_0x532254[_0x613f('0xa2')][_0x613f('0x81')](),'ListId')[_0x613f('0x43')](_0x1fb88c['params']['id']['toString'](),'VoiceQueueId')[_0x613f('0x43')]('NOW()','createdAt')[_0x613f('0x43')](_0x613f('0xa1'),'updatedAt')['from'](_0x613f('0xa3'))[_0x613f('0x3c')]('deletedAt\x20IS\x20NULL')[_0x613f('0x3c')](_0x613f('0xa4'),_0x532254[_0x613f('0xa2')][_0x613f('0x81')]())[_0x613f('0x3c')](_0x613f('0xa5'))[_0x613f('0x3c')](_0x613f('0xa6'),squel[_0x613f('0x7a')]()[_0x613f('0x43')](_0x613f('0xa7'))['from'](_0x613f('0xa8'))[_0x613f('0x3c')](_0x613f('0x7f'),_0x1fb88c[_0x613f('0x4a')]['id'][_0x613f('0x81')]()))['where'](_0x613f('0xa6'),squel[_0x613f('0x7a')]()[_0x613f('0x43')](_0x613f('0xa9'))['from'](_0x613f('0x9a'))['where'](_0x613f('0x7f'),_0x1fb88c[_0x613f('0x4a')]['id'][_0x613f('0x81')]())))['toString']();break;case _0x613f('0xaa'):_0x1a1578=squel['insert']()['into'](_0x613f('0x9a'))[_0x613f('0x9b')]([_0x613f('0xa0'),'scheduledAt',_0x613f('0x9d'),_0x613f('0x9e'),'VoiceQueueId',_0x613f('0x56'),_0x613f('0x9f')],squel[_0x613f('0x7a')]()[_0x613f('0x43')](_0x613f('0xa0'),_0x613f('0xa0'))[_0x613f('0x43')]('NOW()','scheduledAt')[_0x613f('0x43')]('id',_0x613f('0x9d'))[_0x613f('0x43')](_0x532254[_0x613f('0xa2')][_0x613f('0x81')](),'ListId')[_0x613f('0x43')](_0x1fb88c[_0x613f('0x4a')]['id'][_0x613f('0x81')](),_0x613f('0x5c'))[_0x613f('0x43')](_0x613f('0xa1'),_0x613f('0x56'))[_0x613f('0x43')](_0x613f('0xa1'),_0x613f('0x9f'))[_0x613f('0x7b')](_0x613f('0xa3'))['where'](_0x613f('0xab'))[_0x613f('0x3c')](_0x613f('0xa4'),_0x532254[_0x613f('0xa2')]['toString']())[_0x613f('0x3c')](_0x613f('0xa5'))[_0x613f('0x3c')](_0x613f('0xa6'),squel['select']()[_0x613f('0x43')](_0x613f('0xa9'))[_0x613f('0x7b')](_0x613f('0x9a'))[_0x613f('0x3c')]('VoiceQueueId\x20=\x20?',_0x1fb88c[_0x613f('0x4a')]['id'][_0x613f('0x81')]())))[_0x613f('0x81')]();break;default:_0x1a1578=squel[_0x613f('0x98')]()[_0x613f('0x99')](_0x613f('0x9a'))['fromQuery']([_0x613f('0xa0'),_0x613f('0x9c'),_0x613f('0x9d'),_0x613f('0x9e'),'VoiceQueueId','createdAt',_0x613f('0x9f')],squel['select']()[_0x613f('0x43')](_0x613f('0xa0'),'phone')[_0x613f('0x43')](_0x613f('0xa1'),'scheduledAt')[_0x613f('0x43')]('id',_0x613f('0x9d'))['field'](_0x532254['CmListId'][_0x613f('0x81')](),_0x613f('0x9e'))[_0x613f('0x43')](_0x1fb88c[_0x613f('0x4a')]['id']['toString'](),'VoiceQueueId')[_0x613f('0x43')](_0x613f('0xa1'),_0x613f('0x56'))[_0x613f('0x43')](_0x613f('0xa1'),_0x613f('0x9f'))['from']('cm_contacts')['where']('deletedAt\x20IS\x20NULL')[_0x613f('0x3c')](_0x613f('0xa4'),_0x532254[_0x613f('0xa2')][_0x613f('0x81')]())[_0x613f('0x3c')](_0x613f('0xa5')))[_0x613f('0x81')]();}_0xa042d[_0x613f('0xac')](db['sequelize'][_0x613f('0x33')](_0x1a1578));}return BPromise[_0x613f('0x8f')](_0xa042d);}})[_0x613f('0x22')](function(){return _0x221dda;})[_0x613f('0x22')](respondWithResult(_0x30b478,null))[_0x613f('0x49')](handleError(_0x30b478,null));};exports[_0x613f('0xad')]=function(_0x3f7de6,_0x324dde,_0x4fb375){return db[_0x613f('0x30')][_0x613f('0x2a')]({'where':{'id':_0x3f7de6['params']['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x324dde,null))[_0x613f('0x22')](function(_0x50b1b8){if(_0x50b1b8){return _0x50b1b8[_0x613f('0xad')](_0x3f7de6[_0x613f('0x33')][_0x613f('0x88')]);}})['then'](function(_0x3664d5){if(_0x3664d5){return db[_0x613f('0x5b')][_0x613f('0x23')]({'where':{'ListId':_0x3f7de6[_0x613f('0x33')][_0x613f('0x88')],'VoiceQueueId':_0x3f7de6['params']['id']}})['then'](function(){return _0x3664d5;});}})['then'](respondWithStatusCode(_0x324dde,null))[_0x613f('0x49')](handleError(_0x324dde,null));};exports['getBlackLists']=function(_0x4207b7,_0x418a1e,_0x1062ab){var _0x3a7fd9={};var _0x3a96ef={};var _0x55650a;var _0xce5503;return db[_0x613f('0x30')][_0x613f('0x5a')]({'where':{'id':_0x4207b7[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x418a1e,null))[_0x613f('0x22')](function(_0x544e25){if(_0x544e25){_0x55650a=_0x544e25;_0x3a96ef[_0x613f('0x32')]=_[_0x613f('0x34')](db[_0x613f('0x94')][_0x613f('0x31')]);_0x3a96ef[_0x613f('0x33')]=_[_0x613f('0x34')](_0x4207b7[_0x613f('0x33')]);_0x3a96ef[_0x613f('0x35')]=_[_0x613f('0x36')](_0x3a96ef[_0x613f('0x32')],_0x3a96ef[_0x613f('0x33')]);_0x3a7fd9['attributes']=_[_0x613f('0x36')](_0x3a96ef[_0x613f('0x32')],qs[_0x613f('0x37')](_0x4207b7['query'][_0x613f('0x37')]));_0x3a7fd9['attributes']=_0x3a7fd9[_0x613f('0x38')][_0x613f('0x4b')]?_0x3a7fd9['attributes']:_0x3a96ef[_0x613f('0x32')];_0x3a7fd9[_0x613f('0x3a')]=qs['sort'](_0x4207b7['query'][_0x613f('0x3b')]);_0x3a7fd9[_0x613f('0x3c')]=qs[_0x613f('0x35')](_[_0x613f('0x3d')](_0x4207b7[_0x613f('0x33')],_0x3a96ef[_0x613f('0x35')]));if(_0x4207b7['query'][_0x613f('0x3e')]){_0x3a7fd9['where']=_['merge'](_0x3a7fd9['where'],{'$or':_['map'](_0x3a7fd9[_0x613f('0x38')],function(_0x14c838){var _0xa72929={};_0xa72929[_0x14c838]={'$like':'%'+_0x4207b7[_0x613f('0x33')][_0x613f('0x3e')]+'%'};return _0xa72929;})});}_0x3a7fd9=_[_0x613f('0x3f')]({},_0x3a7fd9,_0x4207b7[_0x613f('0x44')]);return _0x55650a[_0x613f('0xae')](_0x3a7fd9);}})[_0x613f('0x22')](function(_0x52ba76){if(_0x52ba76){_0xce5503=_0x52ba76[_0x613f('0x4b')];if(!_0x4207b7['query'][_0x613f('0x5f')](_0x613f('0x39'))){_0x3a7fd9[_0x613f('0x1c')]=qs[_0x613f('0x1c')](_0x4207b7[_0x613f('0x33')][_0x613f('0x1c')]);_0x3a7fd9[_0x613f('0x1b')]=qs['offset'](_0x4207b7[_0x613f('0x33')][_0x613f('0x1b')]);}return _0x55650a[_0x613f('0xae')](_0x3a7fd9);}})[_0x613f('0x22')](function(_0x2b39a8){if(_0x2b39a8){return _0x2b39a8?{'count':_0xce5503,'rows':_0x2b39a8}:null;}})[_0x613f('0x22')](respondWithResult(_0x418a1e,null))[_0x613f('0x49')](handleError(_0x418a1e,null));};exports[_0x613f('0xaf')]=function(_0x490595,_0x54c164,_0x5a2b2a){var _0x39891d,_0x5949a4;return db['VoiceQueue'][_0x613f('0x2a')]({'where':{'id':_0x490595[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](handleEntityNotFound(_0x54c164,null))[_0x613f('0x22')](function(_0x549dd6){if(_0x549dd6){_0x5949a4=_0x549dd6;return _0x549dd6[_0x613f('0xaf')](_0x490595[_0x613f('0x4c')]['ids'],_[_0x613f('0x8d')](_0x490595[_0x613f('0x4c')],[_0x613f('0x88'),'id'])||{});}return null;})[_0x613f('0x8e')](function(_0x4403d7){var _0x164647;_0x39891d=_0x4403d7||[];var _0x2836b2=[];if(_0x4403d7){for(var _0x4c2b1d=0x0;_0x4c2b1d<_0x4403d7[_0x613f('0x4b')];_0x4c2b1d+=0x1){var _0x122ffa=_0x4403d7[_0x4c2b1d][_0x613f('0x4e')]({'plain':!![]});_0x164647=squel['insert']()[_0x613f('0x99')](_0x613f('0xb0'))[_0x613f('0x9b')](['phone','ContactId',_0x613f('0x9e'),_0x613f('0x5c'),_0x613f('0x56'),_0x613f('0x9f')],squel[_0x613f('0x7a')]()[_0x613f('0x43')](_0x613f('0xa0'),_0x613f('0xa0'))['field']('id',_0x613f('0x9d'))[_0x613f('0x43')](_0x122ffa[_0x613f('0xa2')][_0x613f('0x81')](),_0x613f('0x9e'))[_0x613f('0x43')](_0x490595['params']['id'][_0x613f('0x81')](),_0x613f('0x5c'))[_0x613f('0x43')]('NOW()',_0x613f('0x56'))[_0x613f('0x43')]('NOW()',_0x613f('0x9f'))[_0x613f('0x7b')](_0x613f('0xa3'))[_0x613f('0x3c')](_0x613f('0xab'))['where'](_0x613f('0xa4'),_0x122ffa[_0x613f('0xa2')]['toString']())[_0x613f('0x3c')](_0x613f('0xa5')))['toString']();_0x2836b2[_0x613f('0xac')](db[_0x613f('0x87')][_0x613f('0x33')](_0x164647));}return BPromise['all'](_0x2836b2);}})[_0x613f('0x22')](function(){return _0x39891d;})[_0x613f('0x22')](respondWithResult(_0x54c164,null))[_0x613f('0x49')](handleError(_0x54c164,null));};exports[_0x613f('0xb1')]=function(_0x3318aa,_0x364911,_0x262949){return db[_0x613f('0x30')][_0x613f('0x2a')]({'where':{'id':_0x3318aa[_0x613f('0x4a')]['id']}})['then'](handleEntityNotFound(_0x364911,null))[_0x613f('0x22')](function(_0x5669b9){if(_0x5669b9){return _0x5669b9[_0x613f('0xb1')](_0x3318aa[_0x613f('0x33')][_0x613f('0x88')]);}})[_0x613f('0x22')](function(_0x1d53ca){if(_0x1d53ca){return db['CmHopperBlack']['destroy']({'where':{'ListId':_0x3318aa[_0x613f('0x33')][_0x613f('0x88')],'VoiceQueueId':_0x3318aa[_0x613f('0x4a')]['id']}})[_0x613f('0x22')](function(){return _0x1d53ca;});}})[_0x613f('0x22')](respondWithStatusCode(_0x364911,null))['catch'](handleError(_0x364911,null));};
\ No newline at end of file
+var _0xd691=['VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','sequelize','toString','every','TeamId','all','compact','removeTeams','ids','forEach','emit','userVoiceQueue:remove','addAgents','isEmpty','upsert','isNil','removeAgents','isArray','getAgents','getMembers','getLists','addLists','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','NOW()','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','CmListId','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','push','removeLists','getBlackLists','CmList','addBlackLists','cm_hopper_black','removeBlackLists','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceQueue.socket','register','sendStatus','status','json','count','offset','set','Content-Range','apply','save','then','get','inbound','QueueCampaigns','filter','ignore','map','value','type','find','name','UserProfileResource','destroy','stack','send','index','VoiceQueue','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','nolimit','limit','order','sort','where','pick','merge','key','options','includeAll','include','findAll','rows','catch','show','params','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','VoiceQueues','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','createdAt','updatedAt','omit','role','outbound','UserProfileSection','update','getHoppers','findOne','VoiceQueueId','CmHopper','CmHopperHistory','hasOwnProperty','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','addTeams','teams','Team','User','Agents','online','voicePause','interface','penalty','each','UserVoiceQueue','findOrCreate','UserVoiceQueueRt','format','SIP/%s','userVoiceQueue:save','select','field','from','team_has_voice_queues','join','ut.TeamId\x20=\x20tq.TeamId'];(function(_0x1218fe,_0x508138){var _0x4ad9fd=function(_0x22a4ed){while(--_0x22a4ed){_0x1218fe['push'](_0x1218fe['shift']());}};_0x4ad9fd(++_0x508138);}(_0xd691,0xe6));var _0x1d69=function(_0x984097,_0x18e5bf){_0x984097=_0x984097-0x0;var _0x557b33=_0xd691[_0x984097];return _0x557b33;};'use strict';var pdf=require(_0x1d69('0x0'));var emlformat=require(_0x1d69('0x1'));var rimraf=require(_0x1d69('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1d69('0x3'));var rp=require(_0x1d69('0x4'));var moment=require(_0x1d69('0x5'));var BPromise=require(_0x1d69('0x6'));var Mustache=require(_0x1d69('0x7'));var util=require(_0x1d69('0x8'));var path=require(_0x1d69('0x9'));var sox=require(_0x1d69('0xa'));var csv=require(_0x1d69('0xb'));var ejs=require(_0x1d69('0xc'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x1d69('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x1d69('0xe'));var toCsv=require(_0x1d69('0xb'));var querystring=require(_0x1d69('0xf'));var Papa=require(_0x1d69('0x10'));var Redis=require('ioredis');var authService=require(_0x1d69('0x11'));var qs=require(_0x1d69('0x12'));var hardwareService=require(_0x1d69('0x13'));var logger=require(_0x1d69('0x14'))(_0x1d69('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x1d69('0x16'))['db'];config[_0x1d69('0x17')]=_[_0x1d69('0x18')](config[_0x1d69('0x17')],{'host':_0x1d69('0x19'),'port':0x18eb});var socket=require(_0x1d69('0x1a'))(new Redis(config[_0x1d69('0x17')]));require(_0x1d69('0x1b'))[_0x1d69('0x1c')](socket);function respondWithStatusCode(_0x7121cb,_0x292721){_0x292721=_0x292721||0xcc;return function(_0x1f4271){if(_0x1f4271){return _0x7121cb[_0x1d69('0x1d')](_0x292721);}return _0x7121cb['status'](_0x292721)['end']();};}function respondWithResult(_0x12e7cd,_0x3fb5d2){_0x3fb5d2=_0x3fb5d2||0xc8;return function(_0x29dd32){if(_0x29dd32){return _0x12e7cd[_0x1d69('0x1e')](_0x3fb5d2)[_0x1d69('0x1f')](_0x29dd32);}};}function respondWithFilteredResult(_0x383771,_0x5af8c6){return function(_0xb7f031){if(_0xb7f031){var _0xcf076b=_0xb7f031[_0x1d69('0x20')],_0x34f6d4=_0x5af8c6[_0x1d69('0x21')],_0x53915f=_0x5af8c6[_0x1d69('0x21')]+_0x5af8c6['limit'],_0x4cebea;if(_0x53915f>=_0xcf076b){_0x53915f=_0xcf076b;_0x4cebea=0xc8;}else{_0x4cebea=0xce;}_0x383771[_0x1d69('0x1e')](_0x4cebea);return _0x383771[_0x1d69('0x22')](_0x1d69('0x23'),_0x34f6d4+'-'+_0x53915f+'/'+_0xcf076b)[_0x1d69('0x1f')](_0xb7f031);}return null;};}function patchUpdates(_0x3ef4dc){return function(_0x24feaa){try{jsonpatch[_0x1d69('0x24')](_0x24feaa,_0x3ef4dc,!![]);}catch(_0x62968f){return BPromise['reject'](_0x62968f);}return _0x24feaa[_0x1d69('0x25')]();};}function saveUpdates(_0x122238,_0x1786e1){return function(_0x228d18){if(_0x228d18){return _0x228d18['update'](_0x122238)[_0x1d69('0x26')](function(_0x411ca0){return _0x411ca0;});}return null;};}function removeEntity(_0x2b9a7a,_0x54783d){return function(_0x5352d3){if(_0x5352d3){return _0x5352d3['destroy']()[_0x1d69('0x26')](function(){var _0x1d9b42=_0x5352d3[_0x1d69('0x27')]({'plain':!![]});var _0x1c91bf=[{'name':'VoiceQueues','value':_0x1d69('0x28'),'ignore':![]},{'name':_0x1d69('0x29'),'value':'outbound','ignore':![]}];var _0x377913=_(_0x1c91bf)[_0x1d69('0x2a')](_0x1d69('0x2b'))[_0x1d69('0x2c')](_0x1d69('0x2d'))[_0x1d69('0x2d')]();if(_['includes'](_0x377913,_0x1d9b42[_0x1d69('0x2e')])){return;}var _0x2c837e=_[_0x1d69('0x2f')](_0x1c91bf,[_0x1d69('0x2d'),_0x1d9b42[_0x1d69('0x2e')]])[_0x1d69('0x30')];return db[_0x1d69('0x31')][_0x1d69('0x32')]({'where':{'type':_0x2c837e,'resourceId':_0x1d9b42['id']}})[_0x1d69('0x26')](function(){return _0x5352d3;});})[_0x1d69('0x26')](function(){_0x2b9a7a[_0x1d69('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3affc9,_0x5bbbe3){return function(_0xed55d9){if(!_0xed55d9){_0x3affc9[_0x1d69('0x1d')](0x194);}return _0xed55d9;};}function handleError(_0x22d10f,_0x443a1b){_0x443a1b=_0x443a1b||0x1f4;return function(_0x582da2){logger['error'](_0x582da2[_0x1d69('0x33')]);if(_0x582da2['name']){delete _0x582da2[_0x1d69('0x30')];}_0x22d10f[_0x1d69('0x1e')](_0x443a1b)[_0x1d69('0x34')](_0x582da2);};}exports[_0x1d69('0x35')]=function(_0x235e3f,_0x33f283){var _0x2567ef={},_0x1894d9={},_0x527ddb={'count':0x0,'rows':[]};var _0x425a1a=db[_0x1d69('0x36')][_0x1d69('0x37')];_0x1894d9[_0x1d69('0x38')]=_[_0x1d69('0x39')](_0x425a1a);_0x1894d9['query']=_[_0x1d69('0x39')](_0x235e3f[_0x1d69('0x3a')]);_0x1894d9[_0x1d69('0x3b')]=_[_0x1d69('0x3c')](_0x1894d9[_0x1d69('0x38')],_0x1894d9['query']);_0x2567ef[_0x1d69('0x3d')]=_[_0x1d69('0x3c')](_0x1894d9[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0x235e3f['query'][_0x1d69('0x3e')]));_0x2567ef[_0x1d69('0x3d')]=_0x2567ef[_0x1d69('0x3d')][_0x1d69('0x3f')]?_0x2567ef[_0x1d69('0x3d')]:_0x1894d9['model'];if(!_0x235e3f['query']['hasOwnProperty'](_0x1d69('0x40'))){_0x2567ef[_0x1d69('0x41')]=qs['limit'](_0x235e3f[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x2567ef[_0x1d69('0x21')]=qs['offset'](_0x235e3f[_0x1d69('0x3a')][_0x1d69('0x21')]);}_0x2567ef[_0x1d69('0x42')]=qs[_0x1d69('0x43')](_0x235e3f['query'][_0x1d69('0x43')]);_0x2567ef[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x235e3f['query'],_0x1894d9[_0x1d69('0x3b')]));if(_0x235e3f[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x2567ef[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0x2567ef[_0x1d69('0x44')],{'$or':_[_0x1d69('0x2c')](_0x425a1a,function(_0x4b5664){if(_0x4b5664[_0x1d69('0x2e')][_0x1d69('0x47')]!=='VIRTUAL'){var _0x3d68c3={};_0x3d68c3[_0x4b5664['field']]={'$like':'%'+_0x235e3f[_0x1d69('0x3a')][_0x1d69('0x2a')]+'%'};return _0x3d68c3;}})});}_0x2567ef=_[_0x1d69('0x46')]({},_0x2567ef,_0x235e3f[_0x1d69('0x48')]);var _0x5b0a74={'where':_0x2567ef[_0x1d69('0x44')]};return db[_0x1d69('0x36')][_0x1d69('0x20')](_0x5b0a74)['then'](function(_0x2c1f62){_0x527ddb['count']=_0x2c1f62;if(_0x235e3f['query'][_0x1d69('0x49')]){_0x2567ef[_0x1d69('0x4a')]=[{'all':!![]}];}return db['VoiceQueue'][_0x1d69('0x4b')](_0x2567ef);})['then'](function(_0x133cbf){_0x527ddb[_0x1d69('0x4c')]=_0x133cbf;return _0x527ddb;})['then'](respondWithFilteredResult(_0x33f283,_0x2567ef))[_0x1d69('0x4d')](handleError(_0x33f283,null));};exports[_0x1d69('0x4e')]=function(_0x92e47a,_0x555dd2){var _0x246112={'raw':![],'where':{'id':_0x92e47a[_0x1d69('0x4f')]['id']}},_0x354e86={};_0x354e86[_0x1d69('0x38')]=_[_0x1d69('0x39')](db[_0x1d69('0x36')][_0x1d69('0x37')]);_0x354e86[_0x1d69('0x3a')]=_[_0x1d69('0x39')](_0x92e47a[_0x1d69('0x3a')]);_0x354e86[_0x1d69('0x3b')]=_[_0x1d69('0x3c')](_0x354e86[_0x1d69('0x38')],_0x354e86[_0x1d69('0x3a')]);_0x246112[_0x1d69('0x3d')]=_[_0x1d69('0x3c')](_0x354e86['model'],qs[_0x1d69('0x3e')](_0x92e47a[_0x1d69('0x3a')][_0x1d69('0x3e')]));_0x246112['attributes']=_0x246112['attributes'][_0x1d69('0x3f')]?_0x246112['attributes']:_0x354e86[_0x1d69('0x38')];if(_0x92e47a[_0x1d69('0x3a')][_0x1d69('0x49')]){_0x246112['include']=[{'all':!![]}];}_0x246112=_['merge']({},_0x246112,_0x92e47a[_0x1d69('0x48')]);return db['VoiceQueue'][_0x1d69('0x2f')](_0x246112)['then'](handleEntityNotFound(_0x555dd2,null))['then'](respondWithResult(_0x555dd2,null))[_0x1d69('0x4d')](handleError(_0x555dd2,null));};exports[_0x1d69('0x50')]=function(_0x3ea61c,_0xe3c94c){return db[_0x1d69('0x36')][_0x1d69('0x50')](_0x3ea61c[_0x1d69('0x51')],{})[_0x1d69('0x26')](function(_0x47d85a){var _0x28bb7b=_0x3ea61c[_0x1d69('0x52')][_0x1d69('0x27')]({'plain':!![]});if(!_0x28bb7b)throw new Error(_0x1d69('0x53'));if(_0x28bb7b['role']===_0x1d69('0x52')){var _0x5a4e1c=_0x47d85a[_0x1d69('0x27')]({'plain':!![]});var _0x321e38=[{'name':_0x1d69('0x54'),'value':'inbound'},{'name':_0x1d69('0x29'),'value':'outbound'}];var _0x2d90ec=_[_0x1d69('0x2f')](_0x321e38,[_0x1d69('0x2d'),_0x5a4e1c['type']])[_0x1d69('0x30')];return db['UserProfileSection'][_0x1d69('0x2f')]({'where':{'name':_0x2d90ec,'userProfileId':_0x28bb7b[_0x1d69('0x55')]},'raw':!![]})[_0x1d69('0x26')](function(_0x465794){if(_0x465794&&_0x465794[_0x1d69('0x56')]===0x0){return db[_0x1d69('0x31')][_0x1d69('0x50')]({'name':_0x5a4e1c[_0x1d69('0x30')],'resourceId':_0x5a4e1c['id'],'type':_0x465794[_0x1d69('0x30')],'sectionId':_0x465794['id']},{})[_0x1d69('0x26')](function(){return _0x47d85a;});}else{return _0x47d85a;}})[_0x1d69('0x4d')](function(_0xfc58ef){logger[_0x1d69('0x57')](_0x1d69('0x58'),_0xfc58ef);throw _0xfc58ef;});}return _0x47d85a;})[_0x1d69('0x26')](respondWithResult(_0xe3c94c,0xc9))[_0x1d69('0x4d')](handleError(_0xe3c94c,null));};exports[_0x1d69('0x59')]=function(_0x57a940,_0x2d2a7f){var _0x21f972={'raw':![],'where':{'id':_0x57a940[_0x1d69('0x4f')]['id']}},_0x568410={};_0x568410['model']=_[_0x1d69('0x39')](db[_0x1d69('0x36')]['rawAttributes']);_0x21f972['attributes']=_[_0x1d69('0x3c')](_0x568410[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0x57a940[_0x1d69('0x3a')]['fields']));_0x21f972[_0x1d69('0x3d')]=_0x21f972[_0x1d69('0x3d')][_0x1d69('0x3f')]?_0x21f972[_0x1d69('0x3d')]:_0x568410[_0x1d69('0x38')];if(_0x57a940[_0x1d69('0x3a')][_0x1d69('0x49')]){_0x21f972[_0x1d69('0x4a')]=[{'all':!![]}];}_0x21f972=_[_0x1d69('0x46')]({},_0x21f972,_0x57a940[_0x1d69('0x48')]);return db[_0x1d69('0x36')][_0x1d69('0x2f')](_0x21f972)[_0x1d69('0x26')](handleEntityNotFound(_0x2d2a7f,null))['then'](function(_0x3a9137){if(_0x3a9137){var _0x3ba00c=_0x3a9137[_0x1d69('0x27')]({'plain':!![]});_0x3ba00c=qs['omit'](_0x3ba00c,['id',_0x1d69('0x5a'),_0x1d69('0x5b')]);_0x57a940[_0x1d69('0x51')]=_[_0x1d69('0x5c')](_0x57a940[_0x1d69('0x51')],['id',_0x1d69('0x5a'),_0x1d69('0x5b')]);return db[_0x1d69('0x36')][_0x1d69('0x50')](_[_0x1d69('0x46')](_0x3ba00c,_0x57a940[_0x1d69('0x51')]),{'include':_0x57a940[_0x1d69('0x3a')][_0x1d69('0x49')]?[{'all':!![]}]:undefined})[_0x1d69('0x26')](function(_0x1a4a26){var _0x49ac5b=_0x57a940[_0x1d69('0x52')][_0x1d69('0x27')]({'plain':!![]});if(!_0x49ac5b)throw new Error(_0x1d69('0x53'));if(_0x49ac5b[_0x1d69('0x5d')]===_0x1d69('0x52')){var _0x57a6e7=_0x1a4a26[_0x1d69('0x27')]({'plain':!![]});var _0x122aab=[{'name':_0x1d69('0x54'),'value':'inbound'},{'name':_0x1d69('0x29'),'value':_0x1d69('0x5e')}];var _0x2e34bc=_['find'](_0x122aab,[_0x1d69('0x2d'),_0x57a6e7[_0x1d69('0x2e')]])['name'];return db[_0x1d69('0x5f')]['find']({'where':{'name':_0x2e34bc,'userProfileId':_0x49ac5b['userProfileId']},'raw':!![]})[_0x1d69('0x26')](function(_0x53204c){if(_0x53204c&&_0x53204c[_0x1d69('0x56')]===0x0){return db['UserProfileResource'][_0x1d69('0x50')]({'name':_0x57a6e7[_0x1d69('0x30')],'resourceId':_0x57a6e7['id'],'type':_0x53204c[_0x1d69('0x30')],'sectionId':_0x53204c['id']},{})[_0x1d69('0x26')](function(){return _0x1a4a26;});}else{return _0x1a4a26;}})[_0x1d69('0x4d')](function(_0x3ee570){logger['error'](_0x1d69('0x58'),_0x3ee570);throw _0x3ee570;});}return _0x1a4a26;});}})['then'](respondWithResult(_0x2d2a7f,0xc9))[_0x1d69('0x4d')](handleError(_0x2d2a7f,null));};exports[_0x1d69('0x60')]=function(_0x3afaea,_0x3ebc6e){if(_0x3afaea[_0x1d69('0x51')]['id']){delete _0x3afaea[_0x1d69('0x51')]['id'];}return db[_0x1d69('0x36')][_0x1d69('0x2f')]({'where':{'id':_0x3afaea['params']['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x3ebc6e,null))[_0x1d69('0x26')](saveUpdates(_0x3afaea[_0x1d69('0x51')],null))[_0x1d69('0x26')](respondWithResult(_0x3ebc6e,null))[_0x1d69('0x4d')](handleError(_0x3ebc6e,null));};exports['destroy']=function(_0x1b8242,_0x330bb2){return db[_0x1d69('0x36')][_0x1d69('0x2f')]({'where':{'id':_0x1b8242[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x330bb2,null))[_0x1d69('0x26')](removeEntity(_0x330bb2,null))['catch'](handleError(_0x330bb2,null));};exports[_0x1d69('0x61')]=function(_0x29941f,_0x4edd8c,_0x1b179d){var _0xc3814f={'raw':![],'where':{}};var _0x1ccf78={};var _0x4d5d29={'count':0x0,'rows':[]};return db['VoiceQueue'][_0x1d69('0x62')]({'where':{'id':_0x29941f['params']['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x4edd8c,null))[_0x1d69('0x26')](function(_0x539eab){if(_0x539eab){_0x1ccf78[_0x1d69('0x38')]=_[_0x1d69('0x39')](db['CmHopper'][_0x1d69('0x37')]);_0x1ccf78[_0x1d69('0x3a')]=_['keys'](_0x29941f[_0x1d69('0x3a')]);_0x1ccf78['filters']=_[_0x1d69('0x3c')](_0x1ccf78['model'],_0x1ccf78[_0x1d69('0x3a')]);_0xc3814f['attributes']=_['intersection'](_0x1ccf78[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0x29941f['query'][_0x1d69('0x3e')]));_0xc3814f[_0x1d69('0x3d')]=_0xc3814f['attributes'][_0x1d69('0x3f')]?_0xc3814f['attributes']:_0x1ccf78[_0x1d69('0x38')];if(!_0x29941f[_0x1d69('0x3a')]['hasOwnProperty'](_0x1d69('0x40'))){_0xc3814f[_0x1d69('0x41')]=qs[_0x1d69('0x41')](_0x29941f[_0x1d69('0x3a')][_0x1d69('0x41')]);_0xc3814f[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x29941f['query'][_0x1d69('0x21')]);}_0xc3814f['order']=qs[_0x1d69('0x43')](_0x29941f['query'][_0x1d69('0x43')]);_0xc3814f[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_['pick'](_0x29941f[_0x1d69('0x3a')],_0x1ccf78[_0x1d69('0x3b')]));_0xc3814f['where'][_0x1d69('0x63')]=_0x539eab['id'];if(_0x29941f['query'][_0x1d69('0x2a')]){_0xc3814f[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0xc3814f[_0x1d69('0x44')],{'$or':_[_0x1d69('0x2c')](_0xc3814f[_0x1d69('0x3d')],function(_0x1a1091){var _0x434efb={};_0x434efb[_0x1a1091]={'$like':'%'+_0x29941f[_0x1d69('0x3a')][_0x1d69('0x2a')]+'%'};return _0x434efb;})});}_0xc3814f=_[_0x1d69('0x46')]({},_0xc3814f,_0x29941f[_0x1d69('0x48')]);return db[_0x1d69('0x64')][_0x1d69('0x20')]({'where':_0xc3814f[_0x1d69('0x44')]})[_0x1d69('0x26')](function(_0x48befc){_0x4d5d29[_0x1d69('0x20')]=_0x48befc;if(_0x29941f['query'][_0x1d69('0x49')]){_0xc3814f[_0x1d69('0x4a')]=[{'all':!![]}];}return db[_0x1d69('0x64')][_0x1d69('0x4b')](_0xc3814f);})[_0x1d69('0x26')](function(_0x25c568){_0x4d5d29[_0x1d69('0x4c')]=_0x25c568;return _0x4d5d29;});}})['then'](respondWithFilteredResult(_0x4edd8c,_0xc3814f))[_0x1d69('0x4d')](handleError(_0x4edd8c,null));};exports['getHopperHistories']=function(_0x3d4967,_0x286f56,_0x1fb525){var _0x22f77f={'raw':!![],'where':{}};var _0x2cd079={};var _0x5d196a={'count':0x0,'rows':[]};return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x3d4967[_0x1d69('0x4f')]['id']}})['then'](handleEntityNotFound(_0x286f56,null))['then'](function(_0x433d96){if(_0x433d96){_0x2cd079[_0x1d69('0x38')]=_[_0x1d69('0x39')](db[_0x1d69('0x65')][_0x1d69('0x37')]);_0x2cd079[_0x1d69('0x3a')]=_[_0x1d69('0x39')](_0x3d4967[_0x1d69('0x3a')]);_0x2cd079[_0x1d69('0x3b')]=_['intersection'](_0x2cd079[_0x1d69('0x38')],_0x2cd079['query']);_0x22f77f[_0x1d69('0x3d')]=_['intersection'](_0x2cd079[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x3e')]));_0x22f77f['attributes']=_0x22f77f[_0x1d69('0x3d')][_0x1d69('0x3f')]?_0x22f77f[_0x1d69('0x3d')]:_0x2cd079[_0x1d69('0x38')];if(!_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x66')](_0x1d69('0x40'))){_0x22f77f[_0x1d69('0x41')]=qs[_0x1d69('0x41')](_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x22f77f[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x3d4967[_0x1d69('0x3a')]['offset']);}_0x22f77f[_0x1d69('0x42')]=qs[_0x1d69('0x43')](_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x43')]);_0x22f77f[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x3d4967['query'],_0x2cd079[_0x1d69('0x3b')]));_0x22f77f[_0x1d69('0x44')][_0x1d69('0x63')]=_0x433d96['id'];if(_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x22f77f[_0x1d69('0x44')]=_['merge'](_0x22f77f['where'],{'$or':_[_0x1d69('0x2c')](_0x22f77f[_0x1d69('0x3d')],function(_0x202403){var _0x1a68a1={};_0x1a68a1[_0x202403]={'$like':'%'+_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x2a')]+'%'};return _0x1a68a1;})});}_0x22f77f=_['merge']({},_0x22f77f,_0x3d4967[_0x1d69('0x48')]);return db[_0x1d69('0x65')]['count']({'where':_0x22f77f[_0x1d69('0x44')]})['then'](function(_0x4818d1){_0x5d196a[_0x1d69('0x20')]=_0x4818d1;if(_0x3d4967[_0x1d69('0x3a')][_0x1d69('0x49')]){_0x22f77f[_0x1d69('0x4a')]=[{'all':!![]}];}return db[_0x1d69('0x65')][_0x1d69('0x4b')](_0x22f77f);})[_0x1d69('0x26')](function(_0x4aecd6){_0x5d196a['rows']=_0x4aecd6;return _0x5d196a;});}})[_0x1d69('0x26')](respondWithFilteredResult(_0x286f56,_0x22f77f))[_0x1d69('0x4d')](handleError(_0x286f56,null));};exports[_0x1d69('0x67')]=function(_0x604382,_0x2929f3,_0x10e89){var _0x225a85={'raw':!![],'where':{}};var _0x49fc80={};var _0x44bbcb={'count':0x0,'rows':[]};return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x604382['params']['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x2929f3,null))[_0x1d69('0x26')](function(_0x3390d2){if(_0x3390d2){_0x49fc80[_0x1d69('0x38')]=_[_0x1d69('0x39')](db[_0x1d69('0x68')]['rawAttributes']);_0x49fc80[_0x1d69('0x3a')]=_[_0x1d69('0x39')](_0x604382[_0x1d69('0x3a')]);_0x49fc80[_0x1d69('0x3b')]=_[_0x1d69('0x3c')](_0x49fc80[_0x1d69('0x38')],_0x49fc80[_0x1d69('0x3a')]);_0x225a85['attributes']=_[_0x1d69('0x3c')](_0x49fc80[_0x1d69('0x38')],qs['fields'](_0x604382[_0x1d69('0x3a')][_0x1d69('0x3e')]));_0x225a85[_0x1d69('0x3d')]=_0x225a85[_0x1d69('0x3d')][_0x1d69('0x3f')]?_0x225a85['attributes']:_0x49fc80[_0x1d69('0x38')];if(!_0x604382[_0x1d69('0x3a')][_0x1d69('0x66')]('nolimit')){_0x225a85[_0x1d69('0x41')]=qs[_0x1d69('0x41')](_0x604382[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x225a85[_0x1d69('0x21')]=qs['offset'](_0x604382[_0x1d69('0x3a')][_0x1d69('0x21')]);}_0x225a85[_0x1d69('0x42')]=qs['sort'](_0x604382[_0x1d69('0x3a')][_0x1d69('0x43')]);_0x225a85[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x604382[_0x1d69('0x3a')],_0x49fc80[_0x1d69('0x3b')]));_0x225a85['where'][_0x1d69('0x63')]=_0x3390d2['id'];if(_0x604382[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x225a85[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0x225a85['where'],{'$or':_[_0x1d69('0x2c')](_0x225a85[_0x1d69('0x3d')],function(_0x54d83a){var _0x5294d5={};_0x5294d5[_0x54d83a]={'$like':'%'+_0x604382[_0x1d69('0x3a')]['filter']+'%'};return _0x5294d5;})});}_0x225a85=_['merge']({},_0x225a85,_0x604382[_0x1d69('0x48')]);return db[_0x1d69('0x68')][_0x1d69('0x20')]({'where':_0x225a85['where']})[_0x1d69('0x26')](function(_0x3c6730){_0x44bbcb['count']=_0x3c6730;if(_0x604382[_0x1d69('0x3a')][_0x1d69('0x49')]){_0x225a85[_0x1d69('0x4a')]=[{'all':!![]}];}return db[_0x1d69('0x68')][_0x1d69('0x4b')](_0x225a85);})[_0x1d69('0x26')](function(_0x2a0666){_0x44bbcb['rows']=_0x2a0666;return _0x44bbcb;});}})[_0x1d69('0x26')](respondWithFilteredResult(_0x2929f3,_0x225a85))['catch'](handleError(_0x2929f3,null));};exports[_0x1d69('0x69')]=function(_0x1765a1,_0x4c0219,_0x44a36b){var _0x322392={'raw':!![],'where':{}};var _0x4e8407={};var _0x427f75={'count':0x0,'rows':[]};return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x1765a1[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x4c0219,null))[_0x1d69('0x26')](function(_0x4098f8){if(_0x4098f8){_0x4e8407[_0x1d69('0x38')]=_['keys'](db[_0x1d69('0x6a')]['rawAttributes']);_0x4e8407[_0x1d69('0x3a')]=_['keys'](_0x1765a1[_0x1d69('0x3a')]);_0x4e8407['filters']=_['intersection'](_0x4e8407[_0x1d69('0x38')],_0x4e8407[_0x1d69('0x3a')]);_0x322392['attributes']=_[_0x1d69('0x3c')](_0x4e8407[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0x1765a1['query'][_0x1d69('0x3e')]));_0x322392['attributes']=_0x322392[_0x1d69('0x3d')]['length']?_0x322392[_0x1d69('0x3d')]:_0x4e8407[_0x1d69('0x38')];if(!_0x1765a1[_0x1d69('0x3a')][_0x1d69('0x66')](_0x1d69('0x40'))){_0x322392['limit']=qs[_0x1d69('0x41')](_0x1765a1[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x322392[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x1765a1[_0x1d69('0x3a')][_0x1d69('0x21')]);}_0x322392[_0x1d69('0x42')]=qs['sort'](_0x1765a1[_0x1d69('0x3a')][_0x1d69('0x43')]);_0x322392[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x1765a1['query'],_0x4e8407[_0x1d69('0x3b')]));_0x322392[_0x1d69('0x44')][_0x1d69('0x63')]=_0x4098f8['id'];if(_0x1765a1[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x322392[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0x322392[_0x1d69('0x44')],{'$or':_['map'](_0x322392[_0x1d69('0x3d')],function(_0x6cc84c){var _0xd3ac0c={};_0xd3ac0c[_0x6cc84c]={'$like':'%'+_0x1765a1[_0x1d69('0x3a')][_0x1d69('0x2a')]+'%'};return _0xd3ac0c;})});}_0x322392=_[_0x1d69('0x46')]({},_0x322392,_0x1765a1['options']);return db[_0x1d69('0x6a')][_0x1d69('0x20')]({'where':_0x322392[_0x1d69('0x44')]})['then'](function(_0x37aef4){_0x427f75[_0x1d69('0x20')]=_0x37aef4;if(_0x1765a1[_0x1d69('0x3a')]['includeAll']){_0x322392['include']=[{'all':!![]}];}return db[_0x1d69('0x6a')]['findAll'](_0x322392);})[_0x1d69('0x26')](function(_0x1f459a){_0x427f75['rows']=_0x1f459a;return _0x427f75;});}})[_0x1d69('0x26')](respondWithFilteredResult(_0x4c0219,_0x322392))[_0x1d69('0x4d')](handleError(_0x4c0219,null));};exports['getTeams']=function(_0x455362,_0x5127fb,_0x4b79e4){var _0x2abcd2={};var _0x278497={};var _0x456812;var _0x41ce72;return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x455362['params']['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x5127fb,null))[_0x1d69('0x26')](function(_0x46e22e){if(_0x46e22e){_0x456812=_0x46e22e;_0x278497[_0x1d69('0x38')]=_[_0x1d69('0x39')](db['Team'][_0x1d69('0x37')]);_0x278497[_0x1d69('0x3a')]=_[_0x1d69('0x39')](_0x455362[_0x1d69('0x3a')]);_0x278497['filters']=_['intersection'](_0x278497[_0x1d69('0x38')],_0x278497[_0x1d69('0x3a')]);_0x2abcd2[_0x1d69('0x3d')]=_['intersection'](_0x278497['model'],qs[_0x1d69('0x3e')](_0x455362[_0x1d69('0x3a')][_0x1d69('0x3e')]));_0x2abcd2['attributes']=_0x2abcd2[_0x1d69('0x3d')][_0x1d69('0x3f')]?_0x2abcd2['attributes']:_0x278497[_0x1d69('0x38')];_0x2abcd2[_0x1d69('0x42')]=qs['sort'](_0x455362[_0x1d69('0x3a')][_0x1d69('0x43')]);_0x2abcd2[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x455362['query'],_0x278497[_0x1d69('0x3b')]));if(_0x455362[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x2abcd2[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0x2abcd2[_0x1d69('0x44')],{'$or':_[_0x1d69('0x2c')](_0x2abcd2['attributes'],function(_0x3aef06){var _0x53e252={};_0x53e252[_0x3aef06]={'$like':'%'+_0x455362[_0x1d69('0x3a')]['filter']+'%'};return _0x53e252;})});}_0x2abcd2=_[_0x1d69('0x46')]({},_0x2abcd2,_0x455362[_0x1d69('0x48')]);return _0x456812['getTeams'](_0x2abcd2);}})['then'](function(_0x4621bd){if(_0x4621bd){_0x41ce72=_0x4621bd['length'];if(!_0x455362['query']['hasOwnProperty']('nolimit')){_0x2abcd2[_0x1d69('0x41')]=qs[_0x1d69('0x41')](_0x455362['query'][_0x1d69('0x41')]);_0x2abcd2[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x455362[_0x1d69('0x3a')][_0x1d69('0x21')]);}return _0x456812[_0x1d69('0x6b')](_0x2abcd2);}})[_0x1d69('0x26')](function(_0x25b772){if(_0x25b772){return _0x25b772?{'count':_0x41ce72,'rows':_0x25b772}:null;}})['then'](respondWithResult(_0x5127fb,null))[_0x1d69('0x4d')](handleError(_0x5127fb,null));};exports[_0x1d69('0x6c')]=function(_0x4c1f43,_0x5b80fe,_0x35148b){var _0x37ab22=_0x4c1f43[_0x1d69('0x51')][_0x1d69('0x6d')];return db[_0x1d69('0x6e')]['findAll']({'where':{'id':_[_0x1d69('0x2c')](_0x37ab22,'id')},'attributes':['id'],'include':[{'model':db[_0x1d69('0x6f')],'as':_0x1d69('0x70'),'attributes':['id',_0x1d69('0x30'),_0x1d69('0x71'),_0x1d69('0x72'),_0x1d69('0x73')],'raw':!![]}]})[_0x1d69('0x26')](function(_0x37a019){if(_0x37a019){var _0x13ca98=_['flatMap'](_0x37a019,function(_0x5b9f9e){var _0x3de20c=_0x5b9f9e[_0x1d69('0x27')]({'plain':!![]});_0x3de20c[_0x1d69('0x70')]['forEach'](function(_0x51682b){_0x51682b[_0x1d69('0x74')]=_['find'](_0x37ab22,{'id':_0x3de20c['id']})[_0x1d69('0x74')];});return _0x3de20c[_0x1d69('0x70')];});return db[_0x1d69('0x36')]['find']({'where':{'id':_0x4c1f43['params']['id']}})[_0x1d69('0x26')](function(_0x4336d0){return db['sequelize']['transaction'](function(_0x39bf3f){return _0x4336d0[_0x1d69('0x6c')](_[_0x1d69('0x2c')](_0x37ab22,'id'),{'transaction':_0x39bf3f})[_0x1d69('0x26')](function(){return BPromise[_0x1d69('0x75')](_0x13ca98,function(_0x38e8d4){return db[_0x1d69('0x76')][_0x1d69('0x77')]({'where':{'UserId':_0x38e8d4['id'],'VoiceQueueId':_0x4c1f43['params']['id']},'defaults':{'penalty':_0x38e8d4[_0x1d69('0x74')]},'transaction':_0x39bf3f});});})[_0x1d69('0x26')](function(){return BPromise['each'](_[_0x1d69('0x2a')](_0x13ca98,{'online':!![]}),function(_0xa7a68c){return db[_0x1d69('0x78')]['upsert']({'membername':_0xa7a68c[_0x1d69('0x30')],'UserId':_0xa7a68c['id'],'queue_name':_0x4336d0[_0x1d69('0x30')],'VoiceQueueId':_0x4336d0['id'],'interface':_['isNil'](_0xa7a68c[_0x1d69('0x73')])?util[_0x1d69('0x79')](_0x1d69('0x7a'),_0xa7a68c[_0x1d69('0x30')]):_0xa7a68c[_0x1d69('0x73')],'paused':_0xa7a68c['voicePause']||![],'penalty':_0xa7a68c[_0x1d69('0x74')]},{'transaction':_0x39bf3f});});})[_0x1d69('0x26')](function(){_0x13ca98['forEach'](function(_0x36f601){socket['emit'](_0x1d69('0x7b'),{'UserId':_0x36f601['id'],'VoiceQueueId':_0x4336d0['id']});});});});});}})[_0x1d69('0x26')](respondWithStatusCode(_0x5b80fe,null))[_0x1d69('0x4d')](handleError(_0x5b80fe,null));};exports['removeTeams']=function(_0x72602a,_0x31add4,_0x9192cd){return db[_0x1d69('0x6e')][_0x1d69('0x4b')]({'where':{'id':_0x72602a[_0x1d69('0x3a')]['ids']},'attributes':['id'],'include':[{'model':db[_0x1d69('0x6f')],'as':_0x1d69('0x70'),'attributes':['id'],'raw':!![]}]})[_0x1d69('0x26')](handleEntityNotFound(_0x31add4,null))[_0x1d69('0x26')](function(_0x27d0ff){var _0x224301=_['map'](_0x27d0ff,'id');var _0x34c3f0=[];var _0x43d75c=[];var _0x49bccb=squel[_0x1d69('0x7c')]();_0x49bccb[_0x1d69('0x7d')]('tq.TeamId')[_0x1d69('0x7e')](_0x1d69('0x7f'),'tq')[_0x1d69('0x80')]('user_has_teams','ut',_0x1d69('0x81'))[_0x1d69('0x44')](_0x1d69('0x82'),_0x72602a[_0x1d69('0x4f')]['id']);for(var _0xe709d=0x0;_0xe709d<_0x27d0ff[_0x1d69('0x3f')];_0xe709d+=0x1){let _0x188e1e=_0x27d0ff[_0xe709d];for(var _0x23b0f6=0x0;_0x23b0f6<_0x188e1e[_0x1d69('0x70')][_0x1d69('0x3f')];_0x23b0f6+=0x1){let _0x7ccb88=_0x188e1e[_0x1d69('0x70')][_0x23b0f6];var _0x4ee061=_0x49bccb['clone']();_0x4ee061[_0x1d69('0x44')](_0x1d69('0x83'),_0x7ccb88['id']);_0x43d75c['push'](db[_0x1d69('0x84')][_0x1d69('0x3a')](_0x4ee061[_0x1d69('0x85')](),{'type':db[_0x1d69('0x84')]['QueryTypes']['SELECT']})[_0x1d69('0x26')](function(_0x205652){if(_0x205652[_0x1d69('0x3f')]===0x1){return _0x7ccb88['id'];}else{var _0x151e39=_[_0x1d69('0x86')](_['map'](_0x205652,_0x1d69('0x87')),function(_0x569905){return _['includes'](_0x224301,_0x569905);});if(_0x151e39){return _0x7ccb88['id'];}}}));}}return BPromise[_0x1d69('0x88')](_0x43d75c)['then'](function(_0x56e55f){_0x34c3f0=_(_0x34c3f0)['union'](_0x56e55f)[_0x1d69('0x89')]()[_0x1d69('0x2d')]();return db[_0x1d69('0x36')][_0x1d69('0x2f')]({'where':{'id':_0x72602a[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](function(_0x3cf9a2){return db['sequelize']['transaction'](function(_0x45d11c){return _0x3cf9a2[_0x1d69('0x8a')](_0x72602a[_0x1d69('0x3a')][_0x1d69('0x8b')],{'transaction':_0x45d11c})[_0x1d69('0x26')](function(){if(!_['isEmpty'](_0x34c3f0)){return _0x3cf9a2['removeAgents'](_0x34c3f0,{'transaction':_0x45d11c})[_0x1d69('0x26')](function(){return db[_0x1d69('0x78')]['destroy']({'where':{'VoiceQueueId':_0x72602a[_0x1d69('0x4f')]['id'],'UserId':_0x34c3f0},'transaction':_0x45d11c});});}})[_0x1d69('0x26')](function(){_0x34c3f0[_0x1d69('0x8c')](function(_0x329f0c){socket[_0x1d69('0x8d')](_0x1d69('0x8e'),{'UserId':_0x329f0c,'VoiceQueueId':_0x3cf9a2['id']});});});});});});})['then'](respondWithStatusCode(_0x31add4,null))[_0x1d69('0x4d')](handleError(_0x31add4,null));};exports[_0x1d69('0x8f')]=function(_0x224a8e,_0x4c3d29,_0x463e15){var _0x2c90d8,_0x4f00c8;return db[_0x1d69('0x36')][_0x1d69('0x2f')]({'where':{'id':_0x224a8e[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x4c3d29,null))[_0x1d69('0x26')](function(_0x13962f){if(_0x13962f){_0x4f00c8=_0x13962f;return _0x13962f[_0x1d69('0x8f')](_0x224a8e['body']['ids'],_[_0x1d69('0x5c')](_0x224a8e['body'],[_0x1d69('0x8b'),'id'])||{})['spread'](function(_0x2cf63c){for(var _0x3ff9d3=0x0;_0x3ff9d3<_0x224a8e[_0x1d69('0x51')][_0x1d69('0x8b')][_0x1d69('0x3f')];_0x3ff9d3+=0x1){socket['emit'](_0x1d69('0x7b'),{'UserId':_0x224a8e[_0x1d69('0x51')][_0x1d69('0x8b')][_0x3ff9d3],'VoiceQueueId':_0x224a8e[_0x1d69('0x4f')]['id']});}return _0x2cf63c;});}})[_0x1d69('0x26')](function(_0x1d20c0){_0x2c90d8=_0x1d20c0||[];if(_0x4f00c8){return db['User'][_0x1d69('0x4b')]({'where':{'id':_0x224a8e[_0x1d69('0x51')]['ids']},'attributes':['id','name',_0x1d69('0x71'),_0x1d69('0x72'),_0x1d69('0x73')],'raw':!![]});}})[_0x1d69('0x26')](function(_0x1cd357){if(!_[_0x1d69('0x90')](_0x1cd357)){var _0x505652=[];for(var _0x1e3b31=0x0;_0x1e3b31<_0x1cd357[_0x1d69('0x3f')];_0x1e3b31++){if(_0x1cd357[_0x1e3b31][_0x1d69('0x71')]){_0x505652['push'](db[_0x1d69('0x78')][_0x1d69('0x91')]({'membername':_0x1cd357[_0x1e3b31]['name'],'UserId':_0x1cd357[_0x1e3b31]['id'],'queue_name':_0x4f00c8[_0x1d69('0x30')],'VoiceQueueId':_0x4f00c8['id'],'interface':_[_0x1d69('0x92')](_0x1cd357[_0x1e3b31][_0x1d69('0x73')])?util[_0x1d69('0x79')](_0x1d69('0x7a'),_0x1cd357[_0x1e3b31][_0x1d69('0x30')]):_0x1cd357[_0x1e3b31][_0x1d69('0x73')],'paused':_0x1cd357[_0x1e3b31][_0x1d69('0x72')]||![],'penalty':_0x224a8e[_0x1d69('0x51')][_0x1d69('0x74')]||0x0}));}}return BPromise['all'](_0x505652);}})['then'](function(){return _0x2c90d8;})[_0x1d69('0x26')](respondWithResult(_0x4c3d29,null))[_0x1d69('0x4d')](handleError(_0x4c3d29,null));};exports[_0x1d69('0x93')]=function(_0x4f77fc,_0x39b475,_0x5cb617){return db[_0x1d69('0x36')][_0x1d69('0x2f')]({'where':{'id':_0x4f77fc['params']['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x39b475,null))[_0x1d69('0x26')](function(_0x5e80de){if(_0x5e80de){return _0x5e80de[_0x1d69('0x93')](_0x4f77fc['query'][_0x1d69('0x8b')])['then'](function(){if(_[_0x1d69('0x94')](_0x4f77fc[_0x1d69('0x3a')][_0x1d69('0x8b')])){for(var _0x3e78c7=0x0;_0x3e78c7<_0x4f77fc[_0x1d69('0x3a')][_0x1d69('0x8b')]['length'];_0x3e78c7+=0x1){socket['emit'](_0x1d69('0x8e'),{'UserId':Number(_0x4f77fc[_0x1d69('0x3a')]['ids'][_0x3e78c7]),'VoiceQueueId':Number(_0x4f77fc[_0x1d69('0x4f')]['id'])});}}else{socket[_0x1d69('0x8d')](_0x1d69('0x8e'),{'UserId':Number(_0x4f77fc[_0x1d69('0x3a')]['ids']),'VoiceQueueId':Number(_0x4f77fc[_0x1d69('0x4f')]['id'])});}});}})[_0x1d69('0x26')](function(_0x33e636){return db[_0x1d69('0x78')][_0x1d69('0x32')]({'where':{'VoiceQueueId':_0x4f77fc[_0x1d69('0x4f')]['id'],'UserId':_0x4f77fc[_0x1d69('0x3a')]['ids']}})['then'](function(){return _0x33e636;});})[_0x1d69('0x26')](respondWithStatusCode(_0x39b475,null))[_0x1d69('0x4d')](handleError(_0x39b475,null));};exports[_0x1d69('0x95')]=function(_0x5c7ad8,_0x3b8482,_0x3e97c0){var _0x5ddd0f={};var _0x2b9fdd={};var _0x12315a;var _0x20ed78;return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x5c7ad8[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x3b8482,null))[_0x1d69('0x26')](function(_0xb3a6b5){if(_0xb3a6b5){_0x12315a=_0xb3a6b5;_0x2b9fdd[_0x1d69('0x38')]=_[_0x1d69('0x39')](db['User'][_0x1d69('0x37')]);_0x2b9fdd[_0x1d69('0x3a')]=_[_0x1d69('0x39')](_0x5c7ad8[_0x1d69('0x3a')]);_0x2b9fdd[_0x1d69('0x3b')]=_[_0x1d69('0x3c')](_0x2b9fdd[_0x1d69('0x38')],_0x2b9fdd[_0x1d69('0x3a')]);_0x5ddd0f['attributes']=_[_0x1d69('0x3c')](_0x2b9fdd[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0x5c7ad8[_0x1d69('0x3a')]['fields']));_0x5ddd0f['attributes']=_0x5ddd0f[_0x1d69('0x3d')][_0x1d69('0x3f')]?_0x5ddd0f['attributes']:_0x2b9fdd[_0x1d69('0x38')];_0x5ddd0f['order']=qs[_0x1d69('0x43')](_0x5c7ad8['query'][_0x1d69('0x43')]);_0x5ddd0f[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_['pick'](_0x5c7ad8['query'],_0x2b9fdd[_0x1d69('0x3b')]));if(_0x5c7ad8[_0x1d69('0x3a')]['filter']){_0x5ddd0f[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0x5ddd0f[_0x1d69('0x44')],{'$or':_['map'](_0x5ddd0f[_0x1d69('0x3d')],function(_0x5a6151){var _0x3c7099={};_0x3c7099[_0x5a6151]={'$like':'%'+_0x5c7ad8['query'][_0x1d69('0x2a')]+'%'};return _0x3c7099;})});}_0x5ddd0f=_[_0x1d69('0x46')]({},_0x5ddd0f,_0x5c7ad8[_0x1d69('0x48')]);return _0x12315a[_0x1d69('0x95')](_0x5ddd0f);}})[_0x1d69('0x26')](function(_0x2a8ea9){if(_0x2a8ea9){_0x20ed78=_0x2a8ea9[_0x1d69('0x3f')];if(!_0x5c7ad8[_0x1d69('0x3a')][_0x1d69('0x66')]('nolimit')){_0x5ddd0f['limit']=qs['limit'](_0x5c7ad8[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x5ddd0f[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x5c7ad8['query'][_0x1d69('0x21')]);}return _0x12315a['getAgents'](_0x5ddd0f);}})['then'](function(_0x5b5def){if(_0x5b5def){return _0x5b5def?{'count':_0x20ed78,'rows':_0x5b5def}:null;}})[_0x1d69('0x26')](respondWithResult(_0x3b8482,null))['catch'](handleError(_0x3b8482,null));};exports[_0x1d69('0x96')]=function(_0xb46892,_0x360c6c,_0x42f667){var _0x540016={};var _0x1b878f={};var _0xcc67df;var _0x466625;return db['VoiceQueue'][_0x1d69('0x62')]({'where':{'id':_0xb46892[_0x1d69('0x4f')]['id']}})['then'](handleEntityNotFound(_0x360c6c,null))[_0x1d69('0x26')](function(_0x319150){if(_0x319150){_0xcc67df=_0x319150;_0x1b878f[_0x1d69('0x38')]=_[_0x1d69('0x39')](db[_0x1d69('0x78')][_0x1d69('0x37')]);_0x1b878f[_0x1d69('0x3a')]=_['keys'](_0xb46892[_0x1d69('0x3a')]);_0x1b878f[_0x1d69('0x3b')]=_[_0x1d69('0x3c')](_0x1b878f[_0x1d69('0x38')],_0x1b878f[_0x1d69('0x3a')]);_0x540016[_0x1d69('0x3d')]=_[_0x1d69('0x3c')](_0x1b878f[_0x1d69('0x38')],qs[_0x1d69('0x3e')](_0xb46892[_0x1d69('0x3a')][_0x1d69('0x3e')]));_0x540016[_0x1d69('0x3d')]=_0x540016[_0x1d69('0x3d')]['length']?_0x540016['attributes']:_0x1b878f[_0x1d69('0x38')];_0x540016['order']=qs[_0x1d69('0x43')](_0xb46892[_0x1d69('0x3a')][_0x1d69('0x43')]);_0x540016[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0xb46892[_0x1d69('0x3a')],_0x1b878f['filters']));if(_0xb46892[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x540016[_0x1d69('0x44')]=_['merge'](_0x540016[_0x1d69('0x44')],{'$or':_[_0x1d69('0x2c')](_0x540016[_0x1d69('0x3d')],function(_0x51197f){var _0x3390a4={};_0x3390a4[_0x51197f]={'$like':'%'+_0xb46892[_0x1d69('0x3a')]['filter']+'%'};return _0x3390a4;})});}_0x540016=_[_0x1d69('0x46')]({},_0x540016,_0xb46892[_0x1d69('0x48')]);return _0xcc67df[_0x1d69('0x96')](_0x540016);}})['then'](function(_0x3b3548){if(_0x3b3548){_0x466625=_0x3b3548[_0x1d69('0x3f')];if(!_0xb46892[_0x1d69('0x3a')][_0x1d69('0x66')](_0x1d69('0x40'))){_0x540016['limit']=qs['limit'](_0xb46892[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x540016[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0xb46892[_0x1d69('0x3a')][_0x1d69('0x21')]);}return _0xcc67df['getMembers'](_0x540016);}})[_0x1d69('0x26')](function(_0x3b66d6){return _0x3b66d6?{'count':_0x466625,'rows':_0x3b66d6}:null;})['then'](respondWithResult(_0x360c6c,null))[_0x1d69('0x4d')](handleError(_0x360c6c,null));};exports[_0x1d69('0x97')]=function(_0x1b97d4,_0x250b96,_0xd1def2){var _0x343b79={};var _0x31dc0c={};var _0x2c7a29;var _0x5d4361;return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x1b97d4[_0x1d69('0x4f')]['id']}})['then'](handleEntityNotFound(_0x250b96,null))[_0x1d69('0x26')](function(_0x2b946e){if(_0x2b946e){_0x2c7a29=_0x2b946e;_0x31dc0c[_0x1d69('0x38')]=_[_0x1d69('0x39')](db['CmList'][_0x1d69('0x37')]);_0x31dc0c[_0x1d69('0x3a')]=_['keys'](_0x1b97d4['query']);_0x31dc0c[_0x1d69('0x3b')]=_[_0x1d69('0x3c')](_0x31dc0c[_0x1d69('0x38')],_0x31dc0c[_0x1d69('0x3a')]);_0x343b79[_0x1d69('0x3d')]=_[_0x1d69('0x3c')](_0x31dc0c[_0x1d69('0x38')],qs['fields'](_0x1b97d4[_0x1d69('0x3a')]['fields']));_0x343b79[_0x1d69('0x3d')]=_0x343b79['attributes']['length']?_0x343b79[_0x1d69('0x3d')]:_0x31dc0c[_0x1d69('0x38')];_0x343b79[_0x1d69('0x42')]=qs[_0x1d69('0x43')](_0x1b97d4[_0x1d69('0x3a')]['sort']);_0x343b79[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x1b97d4[_0x1d69('0x3a')],_0x31dc0c[_0x1d69('0x3b')]));if(_0x1b97d4[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x343b79[_0x1d69('0x44')]=_['merge'](_0x343b79[_0x1d69('0x44')],{'$or':_[_0x1d69('0x2c')](_0x343b79[_0x1d69('0x3d')],function(_0x316979){var _0x297bd7={};_0x297bd7[_0x316979]={'$like':'%'+_0x1b97d4[_0x1d69('0x3a')]['filter']+'%'};return _0x297bd7;})});}_0x343b79=_[_0x1d69('0x46')]({},_0x343b79,_0x1b97d4[_0x1d69('0x48')]);return _0x2c7a29[_0x1d69('0x97')](_0x343b79);}})[_0x1d69('0x26')](function(_0x10794e){if(_0x10794e){_0x5d4361=_0x10794e[_0x1d69('0x3f')];if(!_0x1b97d4[_0x1d69('0x3a')][_0x1d69('0x66')]('nolimit')){_0x343b79[_0x1d69('0x41')]=qs[_0x1d69('0x41')](_0x1b97d4[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x343b79[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x1b97d4['query'][_0x1d69('0x21')]);}return _0x2c7a29[_0x1d69('0x97')](_0x343b79);}})['then'](function(_0x3ca5e5){if(_0x3ca5e5){return _0x3ca5e5?{'count':_0x5d4361,'rows':_0x3ca5e5}:null;}})[_0x1d69('0x26')](respondWithResult(_0x250b96,null))[_0x1d69('0x4d')](handleError(_0x250b96,null));};exports[_0x1d69('0x98')]=function(_0x29ed93,_0x506d97,_0x51d7c2){var _0x1eb5df,_0x45272f;return db['VoiceQueue'][_0x1d69('0x2f')]({'where':{'id':_0x29ed93['params']['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x506d97,null))[_0x1d69('0x26')](function(_0x28604e){if(_0x28604e){_0x45272f=_0x28604e;return _0x28604e[_0x1d69('0x98')](_0x29ed93[_0x1d69('0x51')][_0x1d69('0x8b')],_['omit'](_0x29ed93[_0x1d69('0x51')],[_0x1d69('0x8b'),'id'])||{});}return null;})['spread'](function(_0x3b4237){var _0x5bbd65;_0x1eb5df=_0x3b4237||[];var _0x4ac110=[];if(_0x3b4237){for(var _0x1fdd9c=0x0;_0x1fdd9c<_0x3b4237['length'];_0x1fdd9c+=0x1){var _0x355563=_0x3b4237[_0x1fdd9c][_0x1d69('0x27')]({'plain':!![]});_0x45272f[_0x1d69('0x99')]=_0x29ed93[_0x1d69('0x51')][_0x1d69('0x99')]?_0x29ed93[_0x1d69('0x51')][_0x1d69('0x99')]:_0x45272f[_0x1d69('0x99')];switch(_0x45272f['dialCheckDuplicateType']){case _0x1d69('0x9a'):_0x5bbd65=squel[_0x1d69('0x9b')]()[_0x1d69('0x9c')](_0x1d69('0x9d'))[_0x1d69('0x9e')]([_0x1d69('0x9f'),_0x1d69('0xa0'),_0x1d69('0xa1'),_0x1d69('0xa2'),_0x1d69('0x63'),'createdAt',_0x1d69('0x5b')],squel[_0x1d69('0x7c')]()['field'](_0x1d69('0x9f'),_0x1d69('0x9f'))[_0x1d69('0x7d')](_0x1d69('0xa3'),_0x1d69('0xa0'))['field']('id','ContactId')[_0x1d69('0x7d')](_0x355563['CmListId'][_0x1d69('0x85')](),_0x1d69('0xa2'))[_0x1d69('0x7d')](_0x29ed93[_0x1d69('0x4f')]['id'][_0x1d69('0x85')](),_0x1d69('0x63'))[_0x1d69('0x7d')](_0x1d69('0xa3'),_0x1d69('0x5a'))[_0x1d69('0x7d')](_0x1d69('0xa3'),'updatedAt')[_0x1d69('0x7e')](_0x1d69('0xa4'))[_0x1d69('0x44')](_0x1d69('0xa5'))['where'](_0x1d69('0xa6'),_0x355563[_0x1d69('0xa7')][_0x1d69('0x85')]())[_0x1d69('0x44')](_0x1d69('0xa8'))[_0x1d69('0x44')](_0x1d69('0xa9'),squel[_0x1d69('0x7c')]()[_0x1d69('0x7d')](_0x1d69('0xaa'))[_0x1d69('0x7e')](_0x1d69('0xab'))['where'](_0x1d69('0x82'),_0x29ed93['params']['id']['toString']()))[_0x1d69('0x44')](_0x1d69('0xa9'),squel['select']()['field'](_0x1d69('0xac'))[_0x1d69('0x7e')](_0x1d69('0x9d'))[_0x1d69('0x44')](_0x1d69('0x82'),_0x29ed93[_0x1d69('0x4f')]['id'][_0x1d69('0x85')]())))[_0x1d69('0x85')]();break;case'onlyIfOpen':_0x5bbd65=squel[_0x1d69('0x9b')]()[_0x1d69('0x9c')](_0x1d69('0x9d'))['fromQuery']([_0x1d69('0x9f'),_0x1d69('0xa0'),'ContactId',_0x1d69('0xa2'),_0x1d69('0x63'),_0x1d69('0x5a'),'updatedAt'],squel[_0x1d69('0x7c')]()[_0x1d69('0x7d')](_0x1d69('0x9f'),'phone')[_0x1d69('0x7d')](_0x1d69('0xa3'),_0x1d69('0xa0'))['field']('id',_0x1d69('0xa1'))['field'](_0x355563['CmListId'][_0x1d69('0x85')](),_0x1d69('0xa2'))[_0x1d69('0x7d')](_0x29ed93[_0x1d69('0x4f')]['id'][_0x1d69('0x85')](),'VoiceQueueId')[_0x1d69('0x7d')](_0x1d69('0xa3'),_0x1d69('0x5a'))['field']('NOW()',_0x1d69('0x5b'))['from'](_0x1d69('0xa4'))[_0x1d69('0x44')]('deletedAt\x20IS\x20NULL')['where'](_0x1d69('0xa6'),_0x355563[_0x1d69('0xa7')][_0x1d69('0x85')]())['where'](_0x1d69('0xa8'))[_0x1d69('0x44')](_0x1d69('0xa9'),squel[_0x1d69('0x7c')]()[_0x1d69('0x7d')](_0x1d69('0xac'))[_0x1d69('0x7e')](_0x1d69('0x9d'))[_0x1d69('0x44')]('VoiceQueueId\x20=\x20?',_0x29ed93[_0x1d69('0x4f')]['id']['toString']())))[_0x1d69('0x85')]();break;default:_0x5bbd65=squel[_0x1d69('0x9b')]()['into'](_0x1d69('0x9d'))[_0x1d69('0x9e')]([_0x1d69('0x9f'),_0x1d69('0xa0'),_0x1d69('0xa1'),_0x1d69('0xa2'),_0x1d69('0x63'),_0x1d69('0x5a'),'updatedAt'],squel[_0x1d69('0x7c')]()['field'](_0x1d69('0x9f'),'phone')[_0x1d69('0x7d')]('NOW()',_0x1d69('0xa0'))[_0x1d69('0x7d')]('id',_0x1d69('0xa1'))[_0x1d69('0x7d')](_0x355563[_0x1d69('0xa7')][_0x1d69('0x85')](),'ListId')[_0x1d69('0x7d')](_0x29ed93[_0x1d69('0x4f')]['id'][_0x1d69('0x85')](),_0x1d69('0x63'))['field'](_0x1d69('0xa3'),_0x1d69('0x5a'))[_0x1d69('0x7d')](_0x1d69('0xa3'),_0x1d69('0x5b'))[_0x1d69('0x7e')](_0x1d69('0xa4'))[_0x1d69('0x44')]('deletedAt\x20IS\x20NULL')['where'](_0x1d69('0xa6'),_0x355563[_0x1d69('0xa7')][_0x1d69('0x85')]())[_0x1d69('0x44')](_0x1d69('0xa8')))[_0x1d69('0x85')]();}_0x4ac110[_0x1d69('0xad')](db['sequelize'][_0x1d69('0x3a')](_0x5bbd65));}return BPromise[_0x1d69('0x88')](_0x4ac110);}})[_0x1d69('0x26')](function(){return _0x1eb5df;})['then'](respondWithResult(_0x506d97,null))[_0x1d69('0x4d')](handleError(_0x506d97,null));};exports[_0x1d69('0xae')]=function(_0x5a2674,_0x3dba30,_0x4bdeb9){return db['VoiceQueue'][_0x1d69('0x2f')]({'where':{'id':_0x5a2674[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x3dba30,null))[_0x1d69('0x26')](function(_0x49f023){if(_0x49f023){return _0x49f023[_0x1d69('0xae')](_0x5a2674[_0x1d69('0x3a')]['ids']);}})[_0x1d69('0x26')](function(_0x2c4ab8){if(_0x2c4ab8){return db[_0x1d69('0x64')][_0x1d69('0x32')]({'where':{'ListId':_0x5a2674[_0x1d69('0x3a')][_0x1d69('0x8b')],'VoiceQueueId':_0x5a2674['params']['id']}})[_0x1d69('0x26')](function(){return _0x2c4ab8;});}})['then'](respondWithStatusCode(_0x3dba30,null))[_0x1d69('0x4d')](handleError(_0x3dba30,null));};exports[_0x1d69('0xaf')]=function(_0x369a60,_0x28cebf,_0x192818){var _0x19c81b={};var _0x3dd760={};var _0x587eb2;var _0x19ee42;return db[_0x1d69('0x36')][_0x1d69('0x62')]({'where':{'id':_0x369a60[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x28cebf,null))[_0x1d69('0x26')](function(_0x39ed66){if(_0x39ed66){_0x587eb2=_0x39ed66;_0x3dd760[_0x1d69('0x38')]=_['keys'](db[_0x1d69('0xb0')][_0x1d69('0x37')]);_0x3dd760[_0x1d69('0x3a')]=_[_0x1d69('0x39')](_0x369a60['query']);_0x3dd760['filters']=_[_0x1d69('0x3c')](_0x3dd760[_0x1d69('0x38')],_0x3dd760[_0x1d69('0x3a')]);_0x19c81b['attributes']=_[_0x1d69('0x3c')](_0x3dd760['model'],qs['fields'](_0x369a60[_0x1d69('0x3a')]['fields']));_0x19c81b[_0x1d69('0x3d')]=_0x19c81b['attributes'][_0x1d69('0x3f')]?_0x19c81b[_0x1d69('0x3d')]:_0x3dd760[_0x1d69('0x38')];_0x19c81b[_0x1d69('0x42')]=qs[_0x1d69('0x43')](_0x369a60['query'][_0x1d69('0x43')]);_0x19c81b[_0x1d69('0x44')]=qs[_0x1d69('0x3b')](_[_0x1d69('0x45')](_0x369a60[_0x1d69('0x3a')],_0x3dd760[_0x1d69('0x3b')]));if(_0x369a60[_0x1d69('0x3a')][_0x1d69('0x2a')]){_0x19c81b[_0x1d69('0x44')]=_[_0x1d69('0x46')](_0x19c81b[_0x1d69('0x44')],{'$or':_[_0x1d69('0x2c')](_0x19c81b[_0x1d69('0x3d')],function(_0x43b249){var _0x2d1f1d={};_0x2d1f1d[_0x43b249]={'$like':'%'+_0x369a60[_0x1d69('0x3a')]['filter']+'%'};return _0x2d1f1d;})});}_0x19c81b=_[_0x1d69('0x46')]({},_0x19c81b,_0x369a60[_0x1d69('0x48')]);return _0x587eb2[_0x1d69('0xaf')](_0x19c81b);}})['then'](function(_0x30a597){if(_0x30a597){_0x19ee42=_0x30a597['length'];if(!_0x369a60[_0x1d69('0x3a')][_0x1d69('0x66')]('nolimit')){_0x19c81b['limit']=qs[_0x1d69('0x41')](_0x369a60[_0x1d69('0x3a')][_0x1d69('0x41')]);_0x19c81b[_0x1d69('0x21')]=qs[_0x1d69('0x21')](_0x369a60['query'][_0x1d69('0x21')]);}return _0x587eb2[_0x1d69('0xaf')](_0x19c81b);}})[_0x1d69('0x26')](function(_0x34bb0e){if(_0x34bb0e){return _0x34bb0e?{'count':_0x19ee42,'rows':_0x34bb0e}:null;}})[_0x1d69('0x26')](respondWithResult(_0x28cebf,null))[_0x1d69('0x4d')](handleError(_0x28cebf,null));};exports[_0x1d69('0xb1')]=function(_0x487761,_0x1614b6,_0x424e9b){var _0x2eb3ca,_0xe8a66d;return db[_0x1d69('0x36')][_0x1d69('0x2f')]({'where':{'id':_0x487761[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x1614b6,null))[_0x1d69('0x26')](function(_0x3fc5d9){if(_0x3fc5d9){_0xe8a66d=_0x3fc5d9;return _0x3fc5d9[_0x1d69('0xb1')](_0x487761['body'][_0x1d69('0x8b')],_[_0x1d69('0x5c')](_0x487761['body'],[_0x1d69('0x8b'),'id'])||{});}return null;})['spread'](function(_0x1f869a){var _0x22625a;_0x2eb3ca=_0x1f869a||[];var _0x5c0e26=[];if(_0x1f869a){for(var _0x332f5b=0x0;_0x332f5b<_0x1f869a[_0x1d69('0x3f')];_0x332f5b+=0x1){var _0x2ddc89=_0x1f869a[_0x332f5b]['get']({'plain':!![]});_0x22625a=squel[_0x1d69('0x9b')]()[_0x1d69('0x9c')](_0x1d69('0xb2'))[_0x1d69('0x9e')]([_0x1d69('0x9f'),_0x1d69('0xa1'),_0x1d69('0xa2'),_0x1d69('0x63'),_0x1d69('0x5a'),'updatedAt'],squel[_0x1d69('0x7c')]()[_0x1d69('0x7d')](_0x1d69('0x9f'),_0x1d69('0x9f'))['field']('id','ContactId')[_0x1d69('0x7d')](_0x2ddc89[_0x1d69('0xa7')][_0x1d69('0x85')](),'ListId')[_0x1d69('0x7d')](_0x487761['params']['id']['toString'](),'VoiceQueueId')['field'](_0x1d69('0xa3'),_0x1d69('0x5a'))[_0x1d69('0x7d')](_0x1d69('0xa3'),'updatedAt')[_0x1d69('0x7e')](_0x1d69('0xa4'))[_0x1d69('0x44')](_0x1d69('0xa5'))[_0x1d69('0x44')]('ListId\x20=\x20?',_0x2ddc89['CmListId']['toString']())[_0x1d69('0x44')](_0x1d69('0xa8')))[_0x1d69('0x85')]();_0x5c0e26[_0x1d69('0xad')](db[_0x1d69('0x84')][_0x1d69('0x3a')](_0x22625a));}return BPromise['all'](_0x5c0e26);}})[_0x1d69('0x26')](function(){return _0x2eb3ca;})[_0x1d69('0x26')](respondWithResult(_0x1614b6,null))['catch'](handleError(_0x1614b6,null));};exports[_0x1d69('0xb3')]=function(_0x161719,_0x40e367,_0x267a74){return db[_0x1d69('0x36')]['find']({'where':{'id':_0x161719[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](handleEntityNotFound(_0x40e367,null))[_0x1d69('0x26')](function(_0x201b7f){if(_0x201b7f){return _0x201b7f[_0x1d69('0xb3')](_0x161719['query'][_0x1d69('0x8b')]);}})['then'](function(_0x1ba429){if(_0x1ba429){return db[_0x1d69('0x6a')][_0x1d69('0x32')]({'where':{'ListId':_0x161719[_0x1d69('0x3a')][_0x1d69('0x8b')],'VoiceQueueId':_0x161719[_0x1d69('0x4f')]['id']}})[_0x1d69('0x26')](function(){return _0x1ba429;});}})[_0x1d69('0x26')](respondWithStatusCode(_0x40e367,null))['catch'](handleError(_0x40e367,null));};
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.events.js b/server/api/voiceQueue/voiceQueue.events.js
index 035119d..6d1c0e8 100644
--- a/server/api/voiceQueue/voiceQueue.events.js
+++ b/server/api/voiceQueue/voiceQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x431f=['VoiceQueue','setMaxListeners','update','remove','emit','exports','events'];(function(_0x35813c,_0x8410a2){var _0x5923e8=function(_0x42d538){while(--_0x42d538){_0x35813c['push'](_0x35813c['shift']());}};_0x5923e8(++_0x8410a2);}(_0x431f,0x148));var _0xf431=function(_0x1e2f26,_0xac9308){_0x1e2f26=_0x1e2f26-0x0;var _0x44b724=_0x431f[_0x1e2f26];return _0x44b724;};'use strict';var EventEmitter=require(_0xf431('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0xf431('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xf431('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf431('0x3'),'afterDestroy':_0xf431('0x4')};function emitEvent(_0xf25f25){return function(_0x353685,_0x3b3d55,_0x3d8327){VoiceQueueEvents[_0xf431('0x5')](_0xf25f25+':'+_0x353685['id'],_0x353685);VoiceQueueEvents[_0xf431('0x5')](_0xf25f25,_0x353685);_0x3d8327(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xf431('0x6')]=VoiceQueueEvents;
\ No newline at end of file
+var _0xb938=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueue','setMaxListeners','update'];(function(_0x45061a,_0x12990a){var _0x37c9d7=function(_0xceed6a){while(--_0xceed6a){_0x45061a['push'](_0x45061a['shift']());}};_0x37c9d7(++_0x12990a);}(_0xb938,0x91));var _0x8b93=function(_0x3db34c,_0x111f90){_0x3db34c=_0x3db34c-0x0;var _0x1296d1=_0xb938[_0x3db34c];return _0x1296d1;};'use strict';var EventEmitter=require(_0x8b93('0x0'));var VoiceQueue=require(_0x8b93('0x1'))['db'][_0x8b93('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x8b93('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x8b93('0x4'),'afterDestroy':_0x8b93('0x5')};function emitEvent(_0x235010){return function(_0x10e667,_0x4e55bb,_0x4f0571){VoiceQueueEvents[_0x8b93('0x6')](_0x235010+':'+_0x10e667['id'],_0x10e667);VoiceQueueEvents[_0x8b93('0x6')](_0x235010,_0x10e667);_0x4f0571(null);};}for(var e in events){if(events[_0x8b93('0x7')](e)){var event=events[e];VoiceQueue[_0x8b93('0x8')](e,emitEvent(event));}}module[_0x8b93('0x9')]=VoiceQueueEvents;
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.model.js b/server/api/voiceQueue/voiceQueue.model.js
index c3402ec..574f595 100644
--- a/server/api/voiceQueue/voiceQueue.model.js
+++ b/server/api/voiceQueue/voiceQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6f7a=['VoiceQueue','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueue.attributes','exports','define'];(function(_0x1ed116,_0x23bc80){var _0x574066=function(_0x424f9e){while(--_0x424f9e){_0x1ed116['push'](_0x1ed116['shift']());}};_0x574066(++_0x23bc80);}(_0x6f7a,0x1ae));var _0xa6f7=function(_0x2da074,_0x2baff9){_0x2da074=_0x2da074-0x0;var _0x201085=_0x6f7a[_0x2da074];return _0x201085;};'use strict';var _=require(_0xa6f7('0x0'));var util=require(_0xa6f7('0x1'));var logger=require(_0xa6f7('0x2'))(_0xa6f7('0x3'));var moment=require('moment');var BPromise=require(_0xa6f7('0x4'));var rp=require(_0xa6f7('0x5'));var fs=require('fs');var path=require(_0xa6f7('0x6'));var rimraf=require(_0xa6f7('0x7'));var config=require(_0xa6f7('0x8'));var attributes=require(_0xa6f7('0x9'));module[_0xa6f7('0xa')]=function(_0x20cccd,_0x1fdd5f){return _0x20cccd[_0xa6f7('0xb')](_0xa6f7('0xc'),attributes,{'tableName':'voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf4eb=['./voiceQueue.attributes','exports','define','voice_queues','lodash','bluebird','rimraf','../../config/environment'];(function(_0x13b53d,_0x2d40c6){var _0x45c927=function(_0x2973fc){while(--_0x2973fc){_0x13b53d['push'](_0x13b53d['shift']());}};_0x45c927(++_0x2d40c6);}(_0xf4eb,0xec));var _0xbf4e=function(_0x3303bd,_0x13f5d3){_0x3303bd=_0x3303bd-0x0;var _0x13ad50=_0xf4eb[_0x3303bd];return _0x13ad50;};'use strict';var _=require(_0xbf4e('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xbf4e('0x1'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xbf4e('0x2'));var config=require(_0xbf4e('0x3'));var attributes=require(_0xbf4e('0x4'));module[_0xbf4e('0x5')]=function(_0xa4dcf5,_0x2fcfed){return _0xa4dcf5[_0xbf4e('0x6')]('VoiceQueue',attributes,{'tableName':_0xbf4e('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.rpc.js b/server/api/voiceQueue/voiceQueue.rpc.js
index 1bf10cc..b7459d6 100644
--- a/server/api/voiceQueue/voiceQueue.rpc.js
+++ b/server/api/voiceQueue/voiceQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['register','VoiceQueue,\x20%s,\x20%s','request\x20sent','debug','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetVoiceQueue','findAll','options','raw','where','attributes','limit','include','map','model','then','ShowVoiceQueue','VoiceQueue','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter'];(function(_0x188ee9,_0x4d4ddd){var _0x14763b=function(_0x14551d){while(--_0x14551d){_0x188ee9['push'](_0x188ee9['shift']());}};_0x14763b(++_0x4d4ddd);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xa9e0[_0x2bf141];return _0x48277b;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});config[_0x0a9e('0xa')]=_[_0x0a9e('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x0a9e('0xc'))(new Redis(config['redis']));require('./voiceQueue.socket')[_0x0a9e('0xd')](socket);function respondWithRpcPromise(_0xf81284,_0x307b3e,_0x3ab53f){return new BPromise(function(_0xfeb75b,_0xbd1168){return client['request'](_0xf81284,_0x3ab53f)['then'](function(_0x527cdd){logger['info'](_0x0a9e('0xe'),_0x307b3e,_0x0a9e('0xf'));logger[_0x0a9e('0x10')](_0x0a9e('0x11'),_0x307b3e,_0x0a9e('0xf'),JSON[_0x0a9e('0x12')](_0x527cdd));if(_0x527cdd['error']){if(_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x14')]===0x1f4){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x15')]);return _0xbd1168(_0x527cdd['error'][_0x0a9e('0x15')]);}logger['error'](_0x0a9e('0xe'),_0x307b3e,_0x527cdd['error'][_0x0a9e('0x15')]);return _0xfeb75b(_0x527cdd[_0x0a9e('0x13')]['message']);}else{logger[_0x0a9e('0x16')]('VoiceQueue,\x20%s,\x20%s',_0x307b3e,_0x0a9e('0xf'));_0xfeb75b(_0x527cdd[_0x0a9e('0x17')][_0x0a9e('0x15')]);}})[_0x0a9e('0x18')](function(_0x31b1ca){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x31b1ca);_0xbd1168(_0x31b1ca);});});}exports[_0x0a9e('0x19')]=function(_0x1314ae){var _0x112016=this;return new Promise(function(_0x1c696a,_0x105080){return db['VoiceQueue'][_0x0a9e('0x1a')]({'raw':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae['options'][_0x0a9e('0x1c')]===undefined?!![]:![]:!![],'where':_0x1314ae['options']?_0x1314ae['options'][_0x0a9e('0x1d')]||null:null,'attributes':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1e')]||null:null,'limit':_0x1314ae['options']?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1f')]||null:null,'include':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x1314ae[_0x0a9e('0x1b')]['include'],function(_0x59181e){return{'model':db[_0x59181e[_0x0a9e('0x22')]],'as':_0x59181e['as'],'attributes':_0x59181e[_0x0a9e('0x1e')],'include':_0x59181e[_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x59181e['include'],function(_0x384319){return{'model':db[_0x384319['model']],'as':_0x384319['as'],'attributes':_0x384319[_0x0a9e('0x1e')],'include':_0x384319['include']?_[_0x0a9e('0x21')](_0x384319[_0x0a9e('0x20')],function(_0x25fba9){return{'model':db[_0x25fba9[_0x0a9e('0x22')]],'as':_0x25fba9['as'],'attributes':_0x25fba9[_0x0a9e('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x23')](function(_0x11c3b6){logger[_0x0a9e('0x16')]('GetVoiceQueue',_0x1314ae);logger[_0x0a9e('0x10')](_0x0a9e('0x19'),_0x1314ae,JSON[_0x0a9e('0x12')](_0x11c3b6));_0x1c696a(_0x11c3b6);})[_0x0a9e('0x18')](function(_0x5c877d){logger[_0x0a9e('0x13')](_0x0a9e('0x19'),_0x5c877d[_0x0a9e('0x15')],_0x1314ae);_0x105080(_0x112016[_0x0a9e('0x13')](0x1f4,_0x5c877d[_0x0a9e('0x15')]));});});};exports[_0x0a9e('0x24')]=function(_0x296f41){var _0x2e8759=this;return new Promise(function(_0x1dbde2,_0x540530){return db[_0x0a9e('0x25')]['find']({'raw':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')][_0x0a9e('0x1c')]===undefined?!![]:![]:!![],'where':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')]['where']||null:null,'attributes':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')][_0x0a9e('0x1e')]||null:null,'include':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')][_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x296f41[_0x0a9e('0x1b')]['include'],function(_0x44295a){return{'model':db[_0x44295a['model']],'as':_0x44295a['as'],'attributes':_0x44295a[_0x0a9e('0x1e')],'include':_0x44295a[_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x44295a[_0x0a9e('0x20')],function(_0x567193){return{'model':db[_0x567193[_0x0a9e('0x22')]],'as':_0x567193['as'],'attributes':_0x567193[_0x0a9e('0x1e')],'include':_0x567193[_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x567193['include'],function(_0x54135e){return{'model':db[_0x54135e[_0x0a9e('0x22')]],'as':_0x54135e['as'],'attributes':_0x54135e['attributes']};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x23')](function(_0x3d9717){logger[_0x0a9e('0x16')](_0x0a9e('0x24'),_0x296f41);logger['debug'](_0x0a9e('0x24'),_0x296f41,JSON[_0x0a9e('0x12')](_0x3d9717));_0x1dbde2(_0x3d9717);})[_0x0a9e('0x18')](function(_0x533942){logger[_0x0a9e('0x13')](_0x0a9e('0x24'),_0x533942[_0x0a9e('0x15')],_0x296f41);_0x540530(_0x2e8759['error'](0x1f4,_0x533942['message']));});});};
\ No newline at end of file
+var _0xa9e0=['register','VoiceQueue,\x20%s,\x20%s','request\x20sent','debug','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetVoiceQueue','findAll','options','raw','where','attributes','limit','include','map','model','then','ShowVoiceQueue','VoiceQueue','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter'];(function(_0x48054e,_0x447bd3){var _0x12cbd3=function(_0x343a75){while(--_0x343a75){_0x48054e['push'](_0x48054e['shift']());}};_0x12cbd3(++_0x447bd3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});config[_0x0a9e('0xa')]=_[_0x0a9e('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x0a9e('0xc'))(new Redis(config['redis']));require('./voiceQueue.socket')[_0x0a9e('0xd')](socket);function respondWithRpcPromise(_0xf81284,_0x307b3e,_0x3ab53f){return new BPromise(function(_0xfeb75b,_0xbd1168){return client['request'](_0xf81284,_0x3ab53f)['then'](function(_0x527cdd){logger['info'](_0x0a9e('0xe'),_0x307b3e,_0x0a9e('0xf'));logger[_0x0a9e('0x10')](_0x0a9e('0x11'),_0x307b3e,_0x0a9e('0xf'),JSON[_0x0a9e('0x12')](_0x527cdd));if(_0x527cdd['error']){if(_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x14')]===0x1f4){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x527cdd[_0x0a9e('0x13')][_0x0a9e('0x15')]);return _0xbd1168(_0x527cdd['error'][_0x0a9e('0x15')]);}logger['error'](_0x0a9e('0xe'),_0x307b3e,_0x527cdd['error'][_0x0a9e('0x15')]);return _0xfeb75b(_0x527cdd[_0x0a9e('0x13')]['message']);}else{logger[_0x0a9e('0x16')]('VoiceQueue,\x20%s,\x20%s',_0x307b3e,_0x0a9e('0xf'));_0xfeb75b(_0x527cdd[_0x0a9e('0x17')][_0x0a9e('0x15')]);}})[_0x0a9e('0x18')](function(_0x31b1ca){logger[_0x0a9e('0x13')](_0x0a9e('0xe'),_0x307b3e,_0x31b1ca);_0xbd1168(_0x31b1ca);});});}exports[_0x0a9e('0x19')]=function(_0x1314ae){var _0x112016=this;return new Promise(function(_0x1c696a,_0x105080){return db['VoiceQueue'][_0x0a9e('0x1a')]({'raw':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae['options'][_0x0a9e('0x1c')]===undefined?!![]:![]:!![],'where':_0x1314ae['options']?_0x1314ae['options'][_0x0a9e('0x1d')]||null:null,'attributes':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1e')]||null:null,'limit':_0x1314ae['options']?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x1f')]||null:null,'include':_0x1314ae[_0x0a9e('0x1b')]?_0x1314ae[_0x0a9e('0x1b')][_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x1314ae[_0x0a9e('0x1b')]['include'],function(_0x59181e){return{'model':db[_0x59181e[_0x0a9e('0x22')]],'as':_0x59181e['as'],'attributes':_0x59181e[_0x0a9e('0x1e')],'include':_0x59181e[_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x59181e['include'],function(_0x384319){return{'model':db[_0x384319['model']],'as':_0x384319['as'],'attributes':_0x384319[_0x0a9e('0x1e')],'include':_0x384319['include']?_[_0x0a9e('0x21')](_0x384319[_0x0a9e('0x20')],function(_0x25fba9){return{'model':db[_0x25fba9[_0x0a9e('0x22')]],'as':_0x25fba9['as'],'attributes':_0x25fba9[_0x0a9e('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x23')](function(_0x11c3b6){logger[_0x0a9e('0x16')]('GetVoiceQueue',_0x1314ae);logger[_0x0a9e('0x10')](_0x0a9e('0x19'),_0x1314ae,JSON[_0x0a9e('0x12')](_0x11c3b6));_0x1c696a(_0x11c3b6);})[_0x0a9e('0x18')](function(_0x5c877d){logger[_0x0a9e('0x13')](_0x0a9e('0x19'),_0x5c877d[_0x0a9e('0x15')],_0x1314ae);_0x105080(_0x112016[_0x0a9e('0x13')](0x1f4,_0x5c877d[_0x0a9e('0x15')]));});});};exports[_0x0a9e('0x24')]=function(_0x296f41){var _0x2e8759=this;return new Promise(function(_0x1dbde2,_0x540530){return db[_0x0a9e('0x25')]['find']({'raw':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')][_0x0a9e('0x1c')]===undefined?!![]:![]:!![],'where':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')]['where']||null:null,'attributes':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')][_0x0a9e('0x1e')]||null:null,'include':_0x296f41[_0x0a9e('0x1b')]?_0x296f41[_0x0a9e('0x1b')][_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x296f41[_0x0a9e('0x1b')]['include'],function(_0x44295a){return{'model':db[_0x44295a['model']],'as':_0x44295a['as'],'attributes':_0x44295a[_0x0a9e('0x1e')],'include':_0x44295a[_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x44295a[_0x0a9e('0x20')],function(_0x567193){return{'model':db[_0x567193[_0x0a9e('0x22')]],'as':_0x567193['as'],'attributes':_0x567193[_0x0a9e('0x1e')],'include':_0x567193[_0x0a9e('0x20')]?_[_0x0a9e('0x21')](_0x567193['include'],function(_0x54135e){return{'model':db[_0x54135e[_0x0a9e('0x22')]],'as':_0x54135e['as'],'attributes':_0x54135e['attributes']};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x23')](function(_0x3d9717){logger[_0x0a9e('0x16')](_0x0a9e('0x24'),_0x296f41);logger['debug'](_0x0a9e('0x24'),_0x296f41,JSON[_0x0a9e('0x12')](_0x3d9717));_0x1dbde2(_0x3d9717);})[_0x0a9e('0x18')](function(_0x533942){logger[_0x0a9e('0x13')](_0x0a9e('0x24'),_0x533942[_0x0a9e('0x15')],_0x296f41);_0x540530(_0x2e8759['error'](0x1f4,_0x533942['message']));});});};
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.socket.js b/server/api/voiceQueue/voiceQueue.socket.js
index 3659d26..74982bb 100644
--- a/server/api/voiceQueue/voiceQueue.socket.js
+++ b/server/api/voiceQueue/voiceQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8a00=['register','length','voiceQueue:','./voiceQueue.events','save','remove','emit'];(function(_0x1dac7a,_0x1828ce){var _0x4cb363=function(_0x80f6de){while(--_0x80f6de){_0x1dac7a['push'](_0x1dac7a['shift']());}};_0x4cb363(++_0x1828ce);}(_0x8a00,0x6c));var _0x08a0=function(_0x5055e1,_0x53df73){_0x5055e1=_0x5055e1-0x0;var _0x458c5d=_0x8a00[_0x5055e1];return _0x458c5d;};'use strict';var VoiceQueueEvents=require(_0x08a0('0x0'));var events=[_0x08a0('0x1'),_0x08a0('0x2'),'update'];function createListener(_0x3cbdda,_0x1e352f){return function(_0x4aa4b5){_0x1e352f[_0x08a0('0x3')](_0x3cbdda,_0x4aa4b5);};}function removeListener(_0x58a5ba,_0x12d4a1){return function(){VoiceQueueEvents['removeListener'](_0x58a5ba,_0x12d4a1);};}exports[_0x08a0('0x4')]=function(_0x405645){for(var _0x1b1bdd=0x0,_0x404c00=events[_0x08a0('0x5')];_0x1b1bdd<_0x404c00;_0x1b1bdd++){var _0xeab536=events[_0x1b1bdd];var _0x1cd3ad=createListener(_0x08a0('0x6')+_0xeab536,_0x405645);VoiceQueueEvents['on'](_0xeab536,_0x1cd3ad);}};
\ No newline at end of file
+var _0x8227=['remove','update','emit','removeListener','register','voiceQueue:','./voiceQueue.events','save'];(function(_0x36884e,_0x48008f){var _0x1cc367=function(_0x388a78){while(--_0x388a78){_0x36884e['push'](_0x36884e['shift']());}};_0x1cc367(++_0x48008f);}(_0x8227,0x1e6));var _0x7822=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x8227[_0x321bb2];return _0x9c12ed;};'use strict';var VoiceQueueEvents=require(_0x7822('0x0'));var events=[_0x7822('0x1'),_0x7822('0x2'),_0x7822('0x3')];function createListener(_0x469a89,_0x18961c){return function(_0x3995c4){_0x18961c[_0x7822('0x4')](_0x469a89,_0x3995c4);};}function removeListener(_0x4b20c6,_0x8609c9){return function(){VoiceQueueEvents[_0x7822('0x5')](_0x4b20c6,_0x8609c9);};}exports[_0x7822('0x6')]=function(_0x51be1a){for(var _0x42c376=0x0,_0x307c07=events['length'];_0x42c376<_0x307c07;_0x42c376++){var _0x5327b9=events[_0x42c376];var _0x14915a=createListener(_0x7822('0x7')+_0x5327b9,_0x51be1a);VoiceQueueEvents['on'](_0x5327b9,_0x14915a);}};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/index.js b/server/api/voiceQueueReport/index.js
index 71c1a2b..2899e7b 100644
--- a/server/api/voiceQueueReport/index.js
+++ b/server/api/voiceQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x54bc=['put','/:id','update','delete','destroy','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','isAuthenticated','index','get','/index','getVoiceQueuesReport','post','create'];(function(_0x3591d8,_0x1278f1){var _0x66c7ea=function(_0x291f32){while(--_0x291f32){_0x3591d8['push'](_0x3591d8['shift']());}};_0x66c7ea(++_0x1278f1);}(_0x54bc,0x1d1));var _0xc54b=function(_0x3b002b,_0x47d4c1){_0x3b002b=_0x3b002b-0x0;var _0x9d09ca=_0x54bc[_0x3b002b];return _0x9d09ca;};'use strict';var multer=require(_0xc54b('0x0'));var util=require(_0xc54b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xc54b('0x2'));var router=express[_0xc54b('0x3')]();var auth=require(_0xc54b('0x4'));var interaction=require(_0xc54b('0x5'));var config=require(_0xc54b('0x6'));var controller=require(_0xc54b('0x7'));router['get']('/',auth[_0xc54b('0x8')](),controller[_0xc54b('0x9')]);router[_0xc54b('0xa')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0xc54b('0xa')](_0xc54b('0xb'),auth[_0xc54b('0x8')](),controller[_0xc54b('0xc')]);router[_0xc54b('0xa')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0xc54b('0xd')]('/',auth[_0xc54b('0x8')](),controller[_0xc54b('0xe')]);router[_0xc54b('0xf')](_0xc54b('0x10'),auth['isAuthenticated'](),controller[_0xc54b('0x11')]);router[_0xc54b('0x12')](_0xc54b('0x10'),auth[_0xc54b('0x8')](),controller[_0xc54b('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0x0deb=['index','/describe','isAuthenticated','/index','getVoiceQueuesReport','/:id','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','get'];(function(_0x33080e,_0x1c600a){var _0x407395=function(_0x5b62fd){while(--_0x5b62fd){_0x33080e['push'](_0x33080e['shift']());}};_0x407395(++_0x1c600a);}(_0x0deb,0x1ed));var _0xb0de=function(_0x261767,_0x49a0f6){_0x261767=_0x261767-0x0;var _0x19cbd5=_0x0deb[_0x261767];return _0x19cbd5;};'use strict';var multer=require(_0xb0de('0x0'));var util=require(_0xb0de('0x1'));var path=require(_0xb0de('0x2'));var timeout=require(_0xb0de('0x3'));var express=require(_0xb0de('0x4'));var router=express[_0xb0de('0x5')]();var auth=require(_0xb0de('0x6'));var interaction=require(_0xb0de('0x7'));var config=require(_0xb0de('0x8'));var controller=require(_0xb0de('0x9'));router[_0xb0de('0xa')]('/',auth['isAuthenticated'](),controller[_0xb0de('0xb')]);router['get'](_0xb0de('0xc'),auth[_0xb0de('0xd')](),controller['describe']);router['get'](_0xb0de('0xe'),auth[_0xb0de('0xd')](),controller[_0xb0de('0xf')]);router[_0xb0de('0xa')](_0xb0de('0x10'),auth['isAuthenticated'](),controller[_0xb0de('0x11')]);router[_0xb0de('0x12')]('/',auth['isAuthenticated'](),controller[_0xb0de('0x13')]);router[_0xb0de('0x14')](_0xb0de('0x10'),auth[_0xb0de('0xd')](),controller[_0xb0de('0x15')]);router['delete'](_0xb0de('0x10'),auth['isAuthenticated'](),controller[_0xb0de('0x16')]);module[_0xb0de('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.attributes.js b/server/api/voiceQueueReport/voiceQueueReport.attributes.js
index 160de1d..5b36dd5 100644
--- a/server/api/voiceQueueReport/voiceQueueReport.attributes.js
+++ b/server/api/voiceQueueReport/voiceQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8724=['format','YYYY-MM-DD\x20HH:mm:ss','diff','setDataValue','holdtime','INTEGER','BOOLEAN','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','exports','STRING','DATE','getDataValue','queuecallerjoinAt'];(function(_0x1dc9ac,_0x3ed434){var _0x736fc8=function(_0x1b4dc1){while(--_0x1b4dc1){_0x1dc9ac['push'](_0x1dc9ac['shift']());}};_0x736fc8(++_0x3ed434);}(_0x8724,0x120));var _0x4872=function(_0x485d18,_0x1b0a33){_0x485d18=_0x485d18-0x0;var _0x24a48f=_0x8724[_0x485d18];return _0x24a48f;};'use strict';var Sequelize=require(_0x4872('0x0'));var moment=require('moment');module[_0x4872('0x1')]={'type':{'type':Sequelize[_0x4872('0x2')]},'uniqueid':{'type':Sequelize[_0x4872('0x2')]},'calleridnum':{'type':Sequelize[_0x4872('0x2')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x4872('0x2')]},'queuecallerjoinAt':{'type':Sequelize[_0x4872('0x3')]},'queuecallerleaveAt':{'type':Sequelize[_0x4872('0x3')],'set':function(_0x5673cd){var _0x5784e3=moment(_0x5673cd);var _0x252c42=moment(this[_0x4872('0x4')](_0x4872('0x5')))[_0x4872('0x6')](_0x4872('0x7'));var _0x20c065=_0x5784e3[_0x4872('0x8')](_0x252c42,'seconds');this[_0x4872('0x9')]('queuecallerleaveAt',_0x5673cd);this[_0x4872('0x9')](_0x4872('0xa'),_0x20c065||null);}},'position':{'type':Sequelize['INTEGER']},'count':{'type':Sequelize[_0x4872('0xb')]},'queuecallerabandon':{'type':Sequelize[_0x4872('0xc')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize['DATE']},'queuecallercomplete':{'type':Sequelize[_0x4872('0xc')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x4872('0x3')]},'queuecallerexit':{'type':Sequelize[_0x4872('0xc')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0x4872('0x3')]},'queuecallerexitreason':{'type':Sequelize['STRING'],'comment':'COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT'},'originalposition':{'type':Sequelize[_0x4872('0xb')]},'channel':{'type':Sequelize[_0x4872('0x2')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0x4872('0x2')]},'accountcode':{'type':Sequelize[_0x4872('0x2')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0x4872('0x2')]},'priority':{'type':Sequelize[_0x4872('0x2')]},'holdtime':{'type':Sequelize[_0x4872('0xb')]},'mohtime':{'type':Sequelize[_0x4872('0xb')],'defaultValue':0x0},'assigned':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x4872('0x2')]},'transfer':{'type':Sequelize[_0x4872('0xc')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':_0x4872('0xd')},'transferexten':{'type':Sequelize[_0x4872('0x2')]},'transferuniqueid':{'type':Sequelize[_0x4872('0x2')]},'disposition':{'type':Sequelize[_0x4872('0x2')]},'queuecallerenterreason':{'type':Sequelize[_0x4872('0xb')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xf3b7=['FORWARD,\x20BLIND,\x20ATTENDED','sequelize','moment','exports','STRING','DATE','format','YYYY-MM-DD\x20HH:mm:ss','setDataValue','holdtime','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT'];(function(_0x285875,_0x2a9148){var _0x1567a4=function(_0x3b5eb4){while(--_0x3b5eb4){_0x285875['push'](_0x285875['shift']());}};_0x1567a4(++_0x2a9148);}(_0xf3b7,0x194));var _0x7f3b=function(_0x45c9bc,_0x582eb2){_0x45c9bc=_0x45c9bc-0x0;var _0xb3287a=_0xf3b7[_0x45c9bc];return _0xb3287a;};'use strict';var Sequelize=require(_0x7f3b('0x0'));var moment=require(_0x7f3b('0x1'));module[_0x7f3b('0x2')]={'type':{'type':Sequelize[_0x7f3b('0x3')]},'uniqueid':{'type':Sequelize[_0x7f3b('0x3')]},'calleridnum':{'type':Sequelize[_0x7f3b('0x3')]},'calleridname':{'type':Sequelize[_0x7f3b('0x3')]},'queue':{'type':Sequelize[_0x7f3b('0x3')]},'queuecallerjoinAt':{'type':Sequelize[_0x7f3b('0x4')]},'queuecallerleaveAt':{'type':Sequelize[_0x7f3b('0x4')],'set':function(_0x11ad85){var _0x777ecc=moment(_0x11ad85);var _0x5c0a14=moment(this['getDataValue']('queuecallerjoinAt'))[_0x7f3b('0x5')](_0x7f3b('0x6'));var _0x3be7c8=_0x777ecc['diff'](_0x5c0a14,'seconds');this[_0x7f3b('0x7')]('queuecallerleaveAt',_0x11ad85);this[_0x7f3b('0x7')](_0x7f3b('0x8'),_0x3be7c8||null);}},'position':{'type':Sequelize['INTEGER']},'count':{'type':Sequelize[_0x7f3b('0x9')]},'queuecallerabandon':{'type':Sequelize[_0x7f3b('0xa')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0x7f3b('0x4')]},'queuecallercomplete':{'type':Sequelize[_0x7f3b('0xa')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x7f3b('0x4')]},'queuecallerexit':{'type':Sequelize[_0x7f3b('0xa')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize['DATE']},'queuecallerexitreason':{'type':Sequelize['STRING'],'comment':_0x7f3b('0xb')},'originalposition':{'type':Sequelize['INTEGER']},'channel':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x7f3b('0x3')]},'connectedlinename':{'type':Sequelize[_0x7f3b('0x3')]},'accountcode':{'type':Sequelize[_0x7f3b('0x3')]},'context':{'type':Sequelize[_0x7f3b('0x3')]},'exten':{'type':Sequelize[_0x7f3b('0x3')]},'priority':{'type':Sequelize[_0x7f3b('0x3')]},'holdtime':{'type':Sequelize[_0x7f3b('0x9')]},'mohtime':{'type':Sequelize[_0x7f3b('0x9')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x7f3b('0xa')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x7f3b('0x3')]},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x7f3b('0x3')],'comment':_0x7f3b('0xc')},'transferexten':{'type':Sequelize[_0x7f3b('0x3')]},'transferuniqueid':{'type':Sequelize[_0x7f3b('0x3')]},'disposition':{'type':Sequelize[_0x7f3b('0x3')]},'queuecallerenterreason':{'type':Sequelize[_0x7f3b('0x9')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.controller.js b/server/api/voiceQueueReport/voiceQueueReport.controller.js
index 5e3e379..c775025 100644
--- a/server/api/voiceQueueReport/voiceQueueReport.controller.js
+++ b/server/api/voiceQueueReport/voiceQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xceb0=['defaults','redis','localhost','socket.io-emitter','./voiceQueueReport.socket','register','status','end','count','offset','limit','set','Content-Range','json','reject','save','update','then','sendStatus','error','stack','name','index','VoiceQueueReport','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','key','field','options','includeAll','include','findAll','rows','catch','show','find','create','body','params','destroy','describe','map','getVoiceQueuesReport','fast-json-patch','moment','bluebird','mustache','sox','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0xceb0,0x173));var _0x0ceb=function(_0x5a13b2,_0x57023b){_0x5a13b2=_0x5a13b2-0x0;var _0x2ab0c6=_0xceb0[_0x5a13b2];return _0x2ab0c6;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x0ceb('0x0'));var rp=require('request-promise');var moment=require(_0x0ceb('0x1'));var BPromise=require(_0x0ceb('0x2'));var Mustache=require(_0x0ceb('0x3'));var util=require('util');var path=require('path');var sox=require(_0x0ceb('0x4'));var csv=require(_0x0ceb('0x5'));var ejs=require(_0x0ceb('0x6'));var fs=require('fs');var _=require('lodash');var squel=require(_0x0ceb('0x7'));var crypto=require(_0x0ceb('0x8'));var jsforce=require('jsforce');var deskjs=require(_0x0ceb('0x9'));var toCsv=require('to-csv');var querystring=require(_0x0ceb('0xa'));var Papa=require(_0x0ceb('0xb'));var Redis=require(_0x0ceb('0xc'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var hardwareService=require(_0x0ceb('0xd'));var logger=require(_0x0ceb('0xe'))(_0x0ceb('0xf'));var utils=require(_0x0ceb('0x10'));var config=require(_0x0ceb('0x11'));var db=require(_0x0ceb('0x12'))['db'];config['redis']=_[_0x0ceb('0x13')](config[_0x0ceb('0x14')],{'host':_0x0ceb('0x15'),'port':0x18eb});var socket=require(_0x0ceb('0x16'))(new Redis(config[_0x0ceb('0x14')]));require(_0x0ceb('0x17'))[_0x0ceb('0x18')](socket);function respondWithStatusCode(_0x54f34e,_0x416fbb){_0x416fbb=_0x416fbb||0xcc;return function(_0x54a173){if(_0x54a173){return _0x54f34e['sendStatus'](_0x416fbb);}return _0x54f34e[_0x0ceb('0x19')](_0x416fbb)[_0x0ceb('0x1a')]();};}function respondWithResult(_0x218d6e,_0x536bdd){_0x536bdd=_0x536bdd||0xc8;return function(_0x33a190){if(_0x33a190){return _0x218d6e[_0x0ceb('0x19')](_0x536bdd)['json'](_0x33a190);}};}function respondWithFilteredResult(_0x1dc6f5,_0x221377){return function(_0x2046b6){if(_0x2046b6){var _0x436a7c=_0x2046b6[_0x0ceb('0x1b')],_0x18bed1=_0x221377[_0x0ceb('0x1c')],_0x27fbeb=_0x221377[_0x0ceb('0x1c')]+_0x221377[_0x0ceb('0x1d')],_0x2c5a89;if(_0x27fbeb>=_0x436a7c){_0x27fbeb=_0x436a7c;_0x2c5a89=0xc8;}else{_0x2c5a89=0xce;}_0x1dc6f5[_0x0ceb('0x19')](_0x2c5a89);return _0x1dc6f5[_0x0ceb('0x1e')](_0x0ceb('0x1f'),_0x18bed1+'-'+_0x27fbeb+'/'+_0x436a7c)[_0x0ceb('0x20')](_0x2046b6);}return null;};}function patchUpdates(_0x3dd970){return function(_0x241c07){try{jsonpatch['apply'](_0x241c07,_0x3dd970,!![]);}catch(_0x4eb712){return BPromise[_0x0ceb('0x21')](_0x4eb712);}return _0x241c07[_0x0ceb('0x22')]();};}function saveUpdates(_0x5d1235,_0x2fd374){return function(_0x54fce7){if(_0x54fce7){return _0x54fce7[_0x0ceb('0x23')](_0x5d1235)[_0x0ceb('0x24')](function(_0x28fb61){return _0x28fb61;});}return null;};}function removeEntity(_0x17efd7,_0x27e058){return function(_0x4a2b69){if(_0x4a2b69){return _0x4a2b69['destroy']()['then'](function(){_0x17efd7[_0x0ceb('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x336ce9,_0x4c3e4c){return function(_0x45f2fe){if(!_0x45f2fe){_0x336ce9[_0x0ceb('0x25')](0x194);}return _0x45f2fe;};}function handleError(_0x120a47,_0x72e51){_0x72e51=_0x72e51||0x1f4;return function(_0x5a15ee){logger[_0x0ceb('0x26')](_0x5a15ee[_0x0ceb('0x27')]);if(_0x5a15ee[_0x0ceb('0x28')]){delete _0x5a15ee[_0x0ceb('0x28')];}_0x120a47[_0x0ceb('0x19')](_0x72e51)['send'](_0x5a15ee);};}exports[_0x0ceb('0x29')]=function(_0x3792bb,_0x3c934b){var _0x4427b8={},_0x1ca4cb={},_0x16265d={'count':0x0,'rows':[]};var _0x58aa8b=db[_0x0ceb('0x2a')][_0x0ceb('0x2b')];_0x1ca4cb[_0x0ceb('0x2c')]=_[_0x0ceb('0x2d')](_0x58aa8b);_0x1ca4cb[_0x0ceb('0x2e')]=_[_0x0ceb('0x2d')](_0x3792bb[_0x0ceb('0x2e')]);_0x1ca4cb[_0x0ceb('0x2f')]=_[_0x0ceb('0x30')](_0x1ca4cb[_0x0ceb('0x2c')],_0x1ca4cb['query']);_0x4427b8[_0x0ceb('0x31')]=_[_0x0ceb('0x30')](_0x1ca4cb['model'],qs[_0x0ceb('0x32')](_0x3792bb[_0x0ceb('0x2e')][_0x0ceb('0x32')]));_0x4427b8['attributes']=_0x4427b8[_0x0ceb('0x31')][_0x0ceb('0x33')]?_0x4427b8[_0x0ceb('0x31')]:_0x1ca4cb[_0x0ceb('0x2c')];if(!_0x3792bb[_0x0ceb('0x2e')][_0x0ceb('0x34')](_0x0ceb('0x35'))){_0x4427b8[_0x0ceb('0x1d')]=qs[_0x0ceb('0x1d')](_0x3792bb[_0x0ceb('0x2e')][_0x0ceb('0x1d')]);_0x4427b8[_0x0ceb('0x1c')]=qs[_0x0ceb('0x1c')](_0x3792bb['query'][_0x0ceb('0x1c')]);}_0x4427b8[_0x0ceb('0x36')]=qs[_0x0ceb('0x37')](_0x3792bb[_0x0ceb('0x2e')][_0x0ceb('0x37')]);_0x4427b8[_0x0ceb('0x38')]=qs['filters'](_[_0x0ceb('0x39')](_0x3792bb['query'],_0x1ca4cb['filters']));if(_0x3792bb['query'][_0x0ceb('0x3a')]){_0x4427b8['where']=_[_0x0ceb('0x3b')](_0x4427b8[_0x0ceb('0x38')],{'$or':_['map'](_0x58aa8b,function(_0x3f730b){if(_0x3f730b[_0x0ceb('0x3c')][_0x0ceb('0x3d')]!=='VIRTUAL'){var _0x785115={};_0x785115[_0x3f730b[_0x0ceb('0x3e')]]={'$like':'%'+_0x3792bb[_0x0ceb('0x2e')][_0x0ceb('0x3a')]+'%'};return _0x785115;}})});}_0x4427b8=_[_0x0ceb('0x3b')]({},_0x4427b8,_0x3792bb[_0x0ceb('0x3f')]);var _0x31d20e={'where':_0x4427b8[_0x0ceb('0x38')]};return db[_0x0ceb('0x2a')][_0x0ceb('0x1b')](_0x31d20e)[_0x0ceb('0x24')](function(_0x1ff7db){_0x16265d[_0x0ceb('0x1b')]=_0x1ff7db;if(_0x3792bb[_0x0ceb('0x2e')][_0x0ceb('0x40')]){_0x4427b8[_0x0ceb('0x41')]=[{'all':!![]}];}return db[_0x0ceb('0x2a')][_0x0ceb('0x42')](_0x4427b8);})[_0x0ceb('0x24')](function(_0x1368c5){_0x16265d[_0x0ceb('0x43')]=_0x1368c5;return _0x16265d;})[_0x0ceb('0x24')](respondWithFilteredResult(_0x3c934b,_0x4427b8))[_0x0ceb('0x44')](handleError(_0x3c934b,null));};exports[_0x0ceb('0x45')]=function(_0xe65a48,_0x146bb8){var _0x1a9040={'raw':![],'where':{'id':_0xe65a48['params']['id']}},_0x2bad4b={};_0x2bad4b[_0x0ceb('0x2c')]=_['keys'](db['VoiceQueueReport'][_0x0ceb('0x2b')]);_0x2bad4b[_0x0ceb('0x2e')]=_[_0x0ceb('0x2d')](_0xe65a48['query']);_0x2bad4b['filters']=_[_0x0ceb('0x30')](_0x2bad4b[_0x0ceb('0x2c')],_0x2bad4b[_0x0ceb('0x2e')]);_0x1a9040[_0x0ceb('0x31')]=_[_0x0ceb('0x30')](_0x2bad4b[_0x0ceb('0x2c')],qs[_0x0ceb('0x32')](_0xe65a48[_0x0ceb('0x2e')][_0x0ceb('0x32')]));_0x1a9040['attributes']=_0x1a9040[_0x0ceb('0x31')][_0x0ceb('0x33')]?_0x1a9040[_0x0ceb('0x31')]:_0x2bad4b[_0x0ceb('0x2c')];if(_0xe65a48['query'][_0x0ceb('0x40')]){_0x1a9040['include']=[{'all':!![]}];}_0x1a9040=_[_0x0ceb('0x3b')]({},_0x1a9040,_0xe65a48['options']);return db[_0x0ceb('0x2a')][_0x0ceb('0x46')](_0x1a9040)[_0x0ceb('0x24')](handleEntityNotFound(_0x146bb8,null))[_0x0ceb('0x24')](respondWithResult(_0x146bb8,null))[_0x0ceb('0x44')](handleError(_0x146bb8,null));};exports[_0x0ceb('0x47')]=function(_0x6273bb,_0x32bfe3){return db['VoiceQueueReport'][_0x0ceb('0x47')](_0x6273bb[_0x0ceb('0x48')],{})['then'](respondWithResult(_0x32bfe3,0xc9))[_0x0ceb('0x44')](handleError(_0x32bfe3,null));};exports[_0x0ceb('0x23')]=function(_0x337666,_0x289e12){if(_0x337666[_0x0ceb('0x48')]['id']){delete _0x337666['body']['id'];}return db[_0x0ceb('0x2a')][_0x0ceb('0x46')]({'where':{'id':_0x337666[_0x0ceb('0x49')]['id']}})[_0x0ceb('0x24')](handleEntityNotFound(_0x289e12,null))[_0x0ceb('0x24')](saveUpdates(_0x337666[_0x0ceb('0x48')],null))[_0x0ceb('0x24')](respondWithResult(_0x289e12,null))[_0x0ceb('0x44')](handleError(_0x289e12,null));};exports[_0x0ceb('0x4a')]=function(_0x5ae8ec,_0x1f5e16){return db[_0x0ceb('0x2a')][_0x0ceb('0x46')]({'where':{'id':_0x5ae8ec[_0x0ceb('0x49')]['id']}})['then'](handleEntityNotFound(_0x1f5e16,null))['then'](removeEntity(_0x1f5e16,null))[_0x0ceb('0x44')](handleError(_0x1f5e16,null));};exports[_0x0ceb('0x4b')]=function(_0x16dc5e,_0x1631b9){return db[_0x0ceb('0x2a')]['describe']()[_0x0ceb('0x24')](respondWithResult(_0x1631b9,null))[_0x0ceb('0x44')](handleError(_0x1631b9,null));};exports['getVoiceQueuesReport']=function(_0x4c70ab,_0x483570){var _0x348381={},_0x33a79b={},_0x13fa76={'count':0x0,'rows':[]};_0x33a79b['model']=_[_0x0ceb('0x2d')](db[_0x0ceb('0x2a')]['rawAttributes']);_0x33a79b[_0x0ceb('0x2e')]=_[_0x0ceb('0x2d')](_0x4c70ab[_0x0ceb('0x2e')]);_0x33a79b['filters']=_[_0x0ceb('0x30')](_0x33a79b['model'],_0x33a79b[_0x0ceb('0x2e')]);_0x348381[_0x0ceb('0x31')]=_[_0x0ceb('0x30')](_0x33a79b[_0x0ceb('0x2c')],qs[_0x0ceb('0x32')](_0x4c70ab['query'][_0x0ceb('0x32')]));_0x348381[_0x0ceb('0x31')]=_0x348381[_0x0ceb('0x31')][_0x0ceb('0x33')]?_0x348381[_0x0ceb('0x31')]:_0x33a79b[_0x0ceb('0x2c')];if(!_0x4c70ab[_0x0ceb('0x2e')][_0x0ceb('0x34')](_0x0ceb('0x35'))){_0x348381[_0x0ceb('0x1d')]=qs['limit'](_0x4c70ab[_0x0ceb('0x2e')][_0x0ceb('0x1d')]);_0x348381[_0x0ceb('0x1c')]=qs[_0x0ceb('0x1c')](_0x4c70ab[_0x0ceb('0x2e')][_0x0ceb('0x1c')]);}_0x348381[_0x0ceb('0x36')]=qs['sort'](_0x4c70ab[_0x0ceb('0x2e')][_0x0ceb('0x37')]);_0x348381[_0x0ceb('0x38')]=qs[_0x0ceb('0x2f')](_[_0x0ceb('0x39')](_0x4c70ab[_0x0ceb('0x2e')],_0x33a79b[_0x0ceb('0x2f')]));if(_0x4c70ab[_0x0ceb('0x2e')][_0x0ceb('0x3a')]){_0x348381[_0x0ceb('0x38')]=_[_0x0ceb('0x3b')](_0x348381['where'],{'$or':_[_0x0ceb('0x4c')](_0x348381[_0x0ceb('0x31')],function(_0x1433e6){var _0x1609c3={};_0x1609c3[_0x1433e6]={'$like':'%'+_0x4c70ab[_0x0ceb('0x2e')]['filter']+'%'};return _0x1609c3;})});}_0x348381=_[_0x0ceb('0x3b')]({},_0x348381,_0x4c70ab[_0x0ceb('0x3f')]);var _0x4af917={'where':_0x348381[_0x0ceb('0x38')]};return db['VoiceQueueReport'][_0x0ceb('0x1b')](_0x4af917)[_0x0ceb('0x24')](function(_0x3dba7d){_0x13fa76[_0x0ceb('0x1b')]=_0x3dba7d;if(_0x4c70ab[_0x0ceb('0x2e')]['includeAll']){_0x348381[_0x0ceb('0x41')]=[{'all':!![]}];}return db[_0x0ceb('0x2a')][_0x0ceb('0x42')](_0x348381);})[_0x0ceb('0x24')](function(_0x4412f0){_0x13fa76[_0x0ceb('0x43')]=_0x4412f0;return _0x13fa76;})['then'](respondWithFilteredResult(_0x483570,_0x348381,_0x0ceb('0x4d')))[_0x0ceb('0x44')](handleError(_0x483570,null,_0x0ceb('0x4d')));};
\ No newline at end of file
+var _0xb10d=['filters','intersection','fields','length','attributes','nolimit','limit','order','sort','where','pick','filter','merge','type','key','VIRTUAL','field','includeAll','include','findAll','catch','options','find','create','body','params','describe','getVoiceQueuesReport','hasOwnProperty','map','rows','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','send','index','VoiceQueueReport','rawAttributes','model','query','keys'];(function(_0x4bdee0,_0x73e544){var _0x102ca4=function(_0x3cf1de){while(--_0x3cf1de){_0x4bdee0['push'](_0x4bdee0['shift']());}};_0x102ca4(++_0x73e544);}(_0xb10d,0x17f));var _0xdb10=function(_0x2fd6b0,_0x53242b){_0x2fd6b0=_0x2fd6b0-0x0;var _0x39997e=_0xb10d[_0x2fd6b0];return _0x39997e;};'use strict';var pdf=require(_0xdb10('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xdb10('0x1'));var zipdir=require(_0xdb10('0x2'));var jsonpatch=require(_0xdb10('0x3'));var rp=require(_0xdb10('0x4'));var moment=require(_0xdb10('0x5'));var BPromise=require(_0xdb10('0x6'));var Mustache=require(_0xdb10('0x7'));var util=require(_0xdb10('0x8'));var path=require(_0xdb10('0x9'));var sox=require(_0xdb10('0xa'));var csv=require(_0xdb10('0xb'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xdb10('0xc'));var squel=require(_0xdb10('0xd'));var crypto=require(_0xdb10('0xe'));var jsforce=require(_0xdb10('0xf'));var deskjs=require(_0xdb10('0x10'));var toCsv=require(_0xdb10('0xb'));var querystring=require(_0xdb10('0x11'));var Papa=require(_0xdb10('0x12'));var Redis=require(_0xdb10('0x13'));var authService=require(_0xdb10('0x14'));var qs=require(_0xdb10('0x15'));var hardwareService=require(_0xdb10('0x16'));var logger=require(_0xdb10('0x17'))(_0xdb10('0x18'));var utils=require(_0xdb10('0x19'));var config=require(_0xdb10('0x1a'));var db=require(_0xdb10('0x1b'))['db'];config[_0xdb10('0x1c')]=_[_0xdb10('0x1d')](config[_0xdb10('0x1c')],{'host':_0xdb10('0x1e'),'port':0x18eb});var socket=require(_0xdb10('0x1f'))(new Redis(config[_0xdb10('0x1c')]));require(_0xdb10('0x20'))['register'](socket);function respondWithStatusCode(_0x30b302,_0x1daa95){_0x1daa95=_0x1daa95||0xcc;return function(_0xf8cc1){if(_0xf8cc1){return _0x30b302[_0xdb10('0x21')](_0x1daa95);}return _0x30b302[_0xdb10('0x22')](_0x1daa95)[_0xdb10('0x23')]();};}function respondWithResult(_0x489421,_0x161e0d){_0x161e0d=_0x161e0d||0xc8;return function(_0x21393b){if(_0x21393b){return _0x489421[_0xdb10('0x22')](_0x161e0d)[_0xdb10('0x24')](_0x21393b);}};}function respondWithFilteredResult(_0xbce3f1,_0x5b484e){return function(_0xe826ef){if(_0xe826ef){var _0x52ccdd=_0xe826ef[_0xdb10('0x25')],_0xbf36da=_0x5b484e[_0xdb10('0x26')],_0x4964aa=_0x5b484e[_0xdb10('0x26')]+_0x5b484e['limit'],_0x3b9f45;if(_0x4964aa>=_0x52ccdd){_0x4964aa=_0x52ccdd;_0x3b9f45=0xc8;}else{_0x3b9f45=0xce;}_0xbce3f1[_0xdb10('0x22')](_0x3b9f45);return _0xbce3f1[_0xdb10('0x27')](_0xdb10('0x28'),_0xbf36da+'-'+_0x4964aa+'/'+_0x52ccdd)[_0xdb10('0x24')](_0xe826ef);}return null;};}function patchUpdates(_0x5b7409){return function(_0xcb38eb){try{jsonpatch[_0xdb10('0x29')](_0xcb38eb,_0x5b7409,!![]);}catch(_0x373964){return BPromise[_0xdb10('0x2a')](_0x373964);}return _0xcb38eb[_0xdb10('0x2b')]();};}function saveUpdates(_0x2b6244,_0x145497){return function(_0x30baba){if(_0x30baba){return _0x30baba[_0xdb10('0x2c')](_0x2b6244)['then'](function(_0x11a34b){return _0x11a34b;});}return null;};}function removeEntity(_0x148f2b,_0x5ba42a){return function(_0x249e94){if(_0x249e94){return _0x249e94[_0xdb10('0x2d')]()[_0xdb10('0x2e')](function(){_0x148f2b[_0xdb10('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x47db13,_0xc65e60){return function(_0x53e626){if(!_0x53e626){_0x47db13[_0xdb10('0x21')](0x194);}return _0x53e626;};}function handleError(_0x464ab,_0x39116e){_0x39116e=_0x39116e||0x1f4;return function(_0x4db7ba){logger[_0xdb10('0x2f')](_0x4db7ba[_0xdb10('0x30')]);if(_0x4db7ba[_0xdb10('0x31')]){delete _0x4db7ba[_0xdb10('0x31')];}_0x464ab[_0xdb10('0x22')](_0x39116e)[_0xdb10('0x32')](_0x4db7ba);};}exports[_0xdb10('0x33')]=function(_0x2a9ecd,_0xa48d52){var _0x42ef28={},_0x3627ae={},_0xb1c49c={'count':0x0,'rows':[]};var _0x3073de=db[_0xdb10('0x34')][_0xdb10('0x35')];_0x3627ae[_0xdb10('0x36')]=_['keys'](_0x3073de);_0x3627ae[_0xdb10('0x37')]=_[_0xdb10('0x38')](_0x2a9ecd[_0xdb10('0x37')]);_0x3627ae[_0xdb10('0x39')]=_[_0xdb10('0x3a')](_0x3627ae[_0xdb10('0x36')],_0x3627ae[_0xdb10('0x37')]);_0x42ef28['attributes']=_[_0xdb10('0x3a')](_0x3627ae[_0xdb10('0x36')],qs[_0xdb10('0x3b')](_0x2a9ecd['query']['fields']));_0x42ef28['attributes']=_0x42ef28['attributes'][_0xdb10('0x3c')]?_0x42ef28[_0xdb10('0x3d')]:_0x3627ae['model'];if(!_0x2a9ecd['query']['hasOwnProperty'](_0xdb10('0x3e'))){_0x42ef28['limit']=qs[_0xdb10('0x3f')](_0x2a9ecd[_0xdb10('0x37')]['limit']);_0x42ef28[_0xdb10('0x26')]=qs[_0xdb10('0x26')](_0x2a9ecd[_0xdb10('0x37')]['offset']);}_0x42ef28[_0xdb10('0x40')]=qs[_0xdb10('0x41')](_0x2a9ecd[_0xdb10('0x37')][_0xdb10('0x41')]);_0x42ef28[_0xdb10('0x42')]=qs[_0xdb10('0x39')](_[_0xdb10('0x43')](_0x2a9ecd[_0xdb10('0x37')],_0x3627ae[_0xdb10('0x39')]));if(_0x2a9ecd[_0xdb10('0x37')][_0xdb10('0x44')]){_0x42ef28[_0xdb10('0x42')]=_[_0xdb10('0x45')](_0x42ef28[_0xdb10('0x42')],{'$or':_['map'](_0x3073de,function(_0x5a98a5){if(_0x5a98a5[_0xdb10('0x46')][_0xdb10('0x47')]!==_0xdb10('0x48')){var _0x1f0e9e={};_0x1f0e9e[_0x5a98a5[_0xdb10('0x49')]]={'$like':'%'+_0x2a9ecd[_0xdb10('0x37')][_0xdb10('0x44')]+'%'};return _0x1f0e9e;}})});}_0x42ef28=_['merge']({},_0x42ef28,_0x2a9ecd['options']);var _0x737317={'where':_0x42ef28['where']};return db['VoiceQueueReport']['count'](_0x737317)[_0xdb10('0x2e')](function(_0x2540e1){_0xb1c49c[_0xdb10('0x25')]=_0x2540e1;if(_0x2a9ecd['query'][_0xdb10('0x4a')]){_0x42ef28[_0xdb10('0x4b')]=[{'all':!![]}];}return db[_0xdb10('0x34')][_0xdb10('0x4c')](_0x42ef28);})[_0xdb10('0x2e')](function(_0x4529ad){_0xb1c49c['rows']=_0x4529ad;return _0xb1c49c;})[_0xdb10('0x2e')](respondWithFilteredResult(_0xa48d52,_0x42ef28))[_0xdb10('0x4d')](handleError(_0xa48d52,null));};exports['show']=function(_0xff6b0a,_0x47dffd){var _0x18575f={'raw':![],'where':{'id':_0xff6b0a['params']['id']}},_0x54a98f={};_0x54a98f[_0xdb10('0x36')]=_[_0xdb10('0x38')](db[_0xdb10('0x34')][_0xdb10('0x35')]);_0x54a98f[_0xdb10('0x37')]=_[_0xdb10('0x38')](_0xff6b0a[_0xdb10('0x37')]);_0x54a98f[_0xdb10('0x39')]=_[_0xdb10('0x3a')](_0x54a98f['model'],_0x54a98f['query']);_0x18575f[_0xdb10('0x3d')]=_['intersection'](_0x54a98f[_0xdb10('0x36')],qs[_0xdb10('0x3b')](_0xff6b0a[_0xdb10('0x37')]['fields']));_0x18575f[_0xdb10('0x3d')]=_0x18575f[_0xdb10('0x3d')][_0xdb10('0x3c')]?_0x18575f[_0xdb10('0x3d')]:_0x54a98f[_0xdb10('0x36')];if(_0xff6b0a[_0xdb10('0x37')][_0xdb10('0x4a')]){_0x18575f[_0xdb10('0x4b')]=[{'all':!![]}];}_0x18575f=_[_0xdb10('0x45')]({},_0x18575f,_0xff6b0a[_0xdb10('0x4e')]);return db[_0xdb10('0x34')][_0xdb10('0x4f')](_0x18575f)['then'](handleEntityNotFound(_0x47dffd,null))[_0xdb10('0x2e')](respondWithResult(_0x47dffd,null))[_0xdb10('0x4d')](handleError(_0x47dffd,null));};exports[_0xdb10('0x50')]=function(_0x4c6260,_0xf3427b){return db[_0xdb10('0x34')][_0xdb10('0x50')](_0x4c6260[_0xdb10('0x51')],{})[_0xdb10('0x2e')](respondWithResult(_0xf3427b,0xc9))[_0xdb10('0x4d')](handleError(_0xf3427b,null));};exports[_0xdb10('0x2c')]=function(_0x4f6924,_0x47d2be){if(_0x4f6924[_0xdb10('0x51')]['id']){delete _0x4f6924[_0xdb10('0x51')]['id'];}return db[_0xdb10('0x34')][_0xdb10('0x4f')]({'where':{'id':_0x4f6924[_0xdb10('0x52')]['id']}})[_0xdb10('0x2e')](handleEntityNotFound(_0x47d2be,null))[_0xdb10('0x2e')](saveUpdates(_0x4f6924[_0xdb10('0x51')],null))[_0xdb10('0x2e')](respondWithResult(_0x47d2be,null))[_0xdb10('0x4d')](handleError(_0x47d2be,null));};exports[_0xdb10('0x2d')]=function(_0x3be222,_0x460c21){return db['VoiceQueueReport']['find']({'where':{'id':_0x3be222[_0xdb10('0x52')]['id']}})[_0xdb10('0x2e')](handleEntityNotFound(_0x460c21,null))[_0xdb10('0x2e')](removeEntity(_0x460c21,null))[_0xdb10('0x4d')](handleError(_0x460c21,null));};exports[_0xdb10('0x53')]=function(_0x12bd00,_0x494a97){return db['VoiceQueueReport']['describe']()[_0xdb10('0x2e')](respondWithResult(_0x494a97,null))[_0xdb10('0x4d')](handleError(_0x494a97,null));};exports[_0xdb10('0x54')]=function(_0x22fbd3,_0x48b071){var _0x5769b9={},_0x4cb426={},_0x34b081={'count':0x0,'rows':[]};_0x4cb426[_0xdb10('0x36')]=_['keys'](db['VoiceQueueReport']['rawAttributes']);_0x4cb426[_0xdb10('0x37')]=_[_0xdb10('0x38')](_0x22fbd3[_0xdb10('0x37')]);_0x4cb426['filters']=_['intersection'](_0x4cb426[_0xdb10('0x36')],_0x4cb426[_0xdb10('0x37')]);_0x5769b9[_0xdb10('0x3d')]=_[_0xdb10('0x3a')](_0x4cb426[_0xdb10('0x36')],qs['fields'](_0x22fbd3[_0xdb10('0x37')]['fields']));_0x5769b9[_0xdb10('0x3d')]=_0x5769b9[_0xdb10('0x3d')]['length']?_0x5769b9[_0xdb10('0x3d')]:_0x4cb426[_0xdb10('0x36')];if(!_0x22fbd3['query'][_0xdb10('0x55')](_0xdb10('0x3e'))){_0x5769b9[_0xdb10('0x3f')]=qs[_0xdb10('0x3f')](_0x22fbd3[_0xdb10('0x37')][_0xdb10('0x3f')]);_0x5769b9['offset']=qs['offset'](_0x22fbd3['query'][_0xdb10('0x26')]);}_0x5769b9['order']=qs[_0xdb10('0x41')](_0x22fbd3[_0xdb10('0x37')]['sort']);_0x5769b9['where']=qs[_0xdb10('0x39')](_[_0xdb10('0x43')](_0x22fbd3[_0xdb10('0x37')],_0x4cb426[_0xdb10('0x39')]));if(_0x22fbd3['query'][_0xdb10('0x44')]){_0x5769b9[_0xdb10('0x42')]=_[_0xdb10('0x45')](_0x5769b9[_0xdb10('0x42')],{'$or':_[_0xdb10('0x56')](_0x5769b9[_0xdb10('0x3d')],function(_0x436cbc){var _0x30f2be={};_0x30f2be[_0x436cbc]={'$like':'%'+_0x22fbd3[_0xdb10('0x37')][_0xdb10('0x44')]+'%'};return _0x30f2be;})});}_0x5769b9=_['merge']({},_0x5769b9,_0x22fbd3[_0xdb10('0x4e')]);var _0x1a9830={'where':_0x5769b9[_0xdb10('0x42')]};return db[_0xdb10('0x34')]['count'](_0x1a9830)[_0xdb10('0x2e')](function(_0x4c7242){_0x34b081[_0xdb10('0x25')]=_0x4c7242;if(_0x22fbd3[_0xdb10('0x37')][_0xdb10('0x4a')]){_0x5769b9['include']=[{'all':!![]}];}return db[_0xdb10('0x34')][_0xdb10('0x4c')](_0x5769b9);})[_0xdb10('0x2e')](function(_0x195aa7){_0x34b081[_0xdb10('0x57')]=_0x195aa7;return _0x34b081;})[_0xdb10('0x2e')](respondWithFilteredResult(_0x48b071,_0x5769b9,_0xdb10('0x54')))[_0xdb10('0x4d')](handleError(_0x48b071,null,_0xdb10('0x54')));};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.events.js b/server/api/voiceQueueReport/voiceQueueReport.events.js
index d973663..db94f5e 100644
--- a/server/api/voiceQueueReport/voiceQueueReport.events.js
+++ b/server/api/voiceQueueReport/voiceQueueReport.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x088e=['exports','events','../../mysqldb','VoiceQueueReport','save','update','remove','emit','hasOwnProperty'];(function(_0x58a4e4,_0x30110a){var _0x218254=function(_0x3e03b9){while(--_0x3e03b9){_0x58a4e4['push'](_0x58a4e4['shift']());}};_0x218254(++_0x30110a);}(_0x088e,0x172));var _0xe088=function(_0x3a2057,_0x99761c){_0x3a2057=_0x3a2057-0x0;var _0x1d602e=_0x088e[_0x3a2057];return _0x1d602e;};'use strict';var EventEmitter=require(_0xe088('0x0'));var VoiceQueueReport=require(_0xe088('0x1'))['db'][_0xe088('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe088('0x3'),'afterUpdate':_0xe088('0x4'),'afterDestroy':_0xe088('0x5')};function emitEvent(_0x1f28ac){return function(_0x3e4266,_0x32edf3,_0x14731b){VoiceQueueReportEvents['emit'](_0x1f28ac+':'+_0x3e4266['id'],_0x3e4266);VoiceQueueReportEvents[_0xe088('0x6')](_0x1f28ac,_0x3e4266);_0x14731b(null);};}for(var e in events){if(events[_0xe088('0x7')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0xe088('0x8')]=VoiceQueueReportEvents;
\ No newline at end of file
+var _0x73da=['VoiceQueueReport','setMaxListeners','save','remove','emit','exports','events','../../mysqldb'];(function(_0x7c50f8,_0x38cbac){var _0x336265=function(_0x241939){while(--_0x241939){_0x7c50f8['push'](_0x7c50f8['shift']());}};_0x336265(++_0x38cbac);}(_0x73da,0x136));var _0xa73d=function(_0x363842,_0x369636){_0x363842=_0x363842-0x0;var _0x257bc2=_0x73da[_0x363842];return _0x257bc2;};'use strict';var EventEmitter=require(_0xa73d('0x0'));var VoiceQueueReport=require(_0xa73d('0x1'))['db'][_0xa73d('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xa73d('0x3')](0x0);var events={'afterCreate':_0xa73d('0x4'),'afterUpdate':'update','afterDestroy':_0xa73d('0x5')};function emitEvent(_0x40b69a){return function(_0x50513d,_0x590ba8,_0x160ab1){VoiceQueueReportEvents[_0xa73d('0x6')](_0x40b69a+':'+_0x50513d['id'],_0x50513d);VoiceQueueReportEvents[_0xa73d('0x6')](_0x40b69a,_0x50513d);_0x160ab1(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0xa73d('0x7')]=VoiceQueueReportEvents;
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.model.js b/server/api/voiceQueueReport/voiceQueueReport.model.js
index 781eca1..de2d1bc 100644
--- a/server/api/voiceQueueReport/voiceQueueReport.model.js
+++ b/server/api/voiceQueueReport/voiceQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa99e=['moment','bluebird','request-promise','path','rimraf','./voiceQueueReport.attributes','define','VoiceQueueReport','report_queue','uniqueid','calleridnum','lodash','util','../../config/logger','api'];(function(_0x3ea3ce,_0x346f49){var _0x47975a=function(_0x36e138){while(--_0x36e138){_0x3ea3ce['push'](_0x3ea3ce['shift']());}};_0x47975a(++_0x346f49);}(_0xa99e,0x182));var _0xea99=function(_0x29dc1d,_0x1b9640){_0x29dc1d=_0x29dc1d-0x0;var _0x42bf1c=_0xa99e[_0x29dc1d];return _0x42bf1c;};'use strict';var _=require(_0xea99('0x0'));var util=require(_0xea99('0x1'));var logger=require(_0xea99('0x2'))(_0xea99('0x3'));var moment=require(_0xea99('0x4'));var BPromise=require(_0xea99('0x5'));var rp=require(_0xea99('0x6'));var fs=require('fs');var path=require(_0xea99('0x7'));var rimraf=require(_0xea99('0x8'));var config=require('../../config/environment');var attributes=require(_0xea99('0x9'));module['exports']=function(_0x42c265,_0xd46bc0){return _0x42c265[_0xea99('0xa')](_0xea99('0xb'),attributes,{'tableName':_0xea99('0xc'),'paranoid':![],'indexes':[{'fields':[_0xea99('0xd')]},{'fields':[_0xea99('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x71df=['define','VoiceQueueReport','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','exports'];(function(_0x4772d7,_0x1428e9){var _0x453117=function(_0x5f0e96){while(--_0x5f0e96){_0x4772d7['push'](_0x4772d7['shift']());}};_0x453117(++_0x1428e9);}(_0x71df,0xbd));var _0xf71d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x71df[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xf71d('0x0'));var util=require(_0xf71d('0x1'));var logger=require(_0xf71d('0x2'))('api');var moment=require(_0xf71d('0x3'));var BPromise=require(_0xf71d('0x4'));var rp=require(_0xf71d('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf71d('0x6'));var config=require(_0xf71d('0x7'));var attributes=require('./voiceQueueReport.attributes');module[_0xf71d('0x8')]=function(_0x3ff715,_0x4a17d0){return _0x3ff715[_0xf71d('0x9')](_0xf71d('0xa'),attributes,{'tableName':'report_queue','paranoid':![],'indexes':[{'fields':['uniqueid']},{'fields':['calleridnum']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.rpc.js b/server/api/voiceQueueReport/voiceQueueReport.rpc.js
index a2b7bd1..cace545 100644
--- a/server/api/voiceQueueReport/voiceQueueReport.rpc.js
+++ b/server/api/voiceQueueReport/voiceQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb635=['lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','register','info','VoiceQueueReport,\x20%s,\x20%s','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','GetVoiceQueueReport','VoiceQueueReport','raw','options','attributes','limit','include','map','model','then','stringify','CreateVoiceQueueReport','create','body','catch','UpdateVoiceQueueReport','update','where'];(function(_0xbd08b4,_0x4790ed){var _0x314f1e=function(_0x161589){while(--_0x161589){_0xbd08b4['push'](_0xbd08b4['shift']());}};_0x314f1e(++_0x4790ed);}(_0xb635,0xf6));var _0x5b63=function(_0x41dc56,_0x2b266d){_0x41dc56=_0x41dc56-0x0;var _0x4a39e9=_0xb635[_0x41dc56];return _0x4a39e9;};'use strict';var _=require(_0x5b63('0x0'));var util=require('util');var moment=require(_0x5b63('0x1'));var BPromise=require('bluebird');var rs=require(_0x5b63('0x2'));var fs=require('fs');var Redis=require(_0x5b63('0x3'));var db=require(_0x5b63('0x4'))['db'];var utils=require(_0x5b63('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x5b63('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x5b63('0x7')][_0x5b63('0x8')]({'port':0x232a});config[_0x5b63('0x9')]=_[_0x5b63('0xa')](config['redis'],{'host':_0x5b63('0xb'),'port':0x18eb});var socket=require(_0x5b63('0xc'))(new Redis(config['redis']));require(_0x5b63('0xd'))[_0x5b63('0xe')](socket);function respondWithRpcPromise(_0x3a84c1,_0x405ab1,_0x55171d){return new BPromise(function(_0x51249d,_0x548f81){return client['request'](_0x3a84c1,_0x55171d)['then'](function(_0x1a2cda){logger[_0x5b63('0xf')](_0x5b63('0x10'),_0x405ab1,'request\x20sent');logger[_0x5b63('0x11')](_0x5b63('0x12'),_0x405ab1,'request\x20sent',JSON['stringify'](_0x1a2cda));if(_0x1a2cda[_0x5b63('0x13')]){if(_0x1a2cda['error'][_0x5b63('0x14')]===0x1f4){logger[_0x5b63('0x13')](_0x5b63('0x10'),_0x405ab1,_0x1a2cda[_0x5b63('0x13')]['message']);return _0x548f81(_0x1a2cda['error'][_0x5b63('0x15')]);}logger[_0x5b63('0x13')](_0x5b63('0x10'),_0x405ab1,_0x1a2cda['error'][_0x5b63('0x15')]);return _0x51249d(_0x1a2cda['error'][_0x5b63('0x15')]);}else{logger[_0x5b63('0xf')](_0x5b63('0x10'),_0x405ab1,_0x5b63('0x16'));_0x51249d(_0x1a2cda['result'][_0x5b63('0x15')]);}})['catch'](function(_0x243788){logger['error'](_0x5b63('0x10'),_0x405ab1,_0x243788);_0x548f81(_0x243788);});});}exports[_0x5b63('0x17')]=function(_0x19d7c1){var _0x4dd26b=this;return new Promise(function(_0x6212d7,_0x33d0e1){return db[_0x5b63('0x18')]['findAll']({'raw':_0x19d7c1['options']?_0x19d7c1['options'][_0x5b63('0x19')]===undefined?!![]:![]:!![],'where':_0x19d7c1[_0x5b63('0x1a')]?_0x19d7c1['options']['where']||null:null,'attributes':_0x19d7c1[_0x5b63('0x1a')]?_0x19d7c1[_0x5b63('0x1a')][_0x5b63('0x1b')]||null:null,'limit':_0x19d7c1['options']?_0x19d7c1[_0x5b63('0x1a')][_0x5b63('0x1c')]||null:null,'include':_0x19d7c1[_0x5b63('0x1a')]?_0x19d7c1[_0x5b63('0x1a')][_0x5b63('0x1d')]?_[_0x5b63('0x1e')](_0x19d7c1[_0x5b63('0x1a')][_0x5b63('0x1d')],function(_0x4c0403){return{'model':db[_0x4c0403[_0x5b63('0x1f')]],'as':_0x4c0403['as'],'attributes':_0x4c0403[_0x5b63('0x1b')],'include':_0x4c0403[_0x5b63('0x1d')]?_[_0x5b63('0x1e')](_0x4c0403[_0x5b63('0x1d')],function(_0x301f34){return{'model':db[_0x301f34['model']],'as':_0x301f34['as'],'attributes':_0x301f34['attributes'],'include':_0x301f34['include']?_['map'](_0x301f34[_0x5b63('0x1d')],function(_0x4e02c3){return{'model':db[_0x4e02c3[_0x5b63('0x1f')]],'as':_0x4e02c3['as'],'attributes':_0x4e02c3['attributes']};}):[]};}):[]};}):[]:[]})[_0x5b63('0x20')](function(_0x565aaf){logger[_0x5b63('0xf')](_0x5b63('0x17'),_0x19d7c1);logger['debug'](_0x5b63('0x17'),_0x19d7c1,JSON[_0x5b63('0x21')](_0x565aaf));_0x6212d7(_0x565aaf);})['catch'](function(_0x51a232){logger[_0x5b63('0x13')](_0x5b63('0x17'),_0x51a232[_0x5b63('0x15')],_0x19d7c1);_0x33d0e1(_0x4dd26b['error'](0x1f4,_0x51a232[_0x5b63('0x15')]));});});};exports[_0x5b63('0x22')]=function(_0x1d382a){var _0x3fd1b1=this;return new Promise(function(_0x533bac,_0xf5c325){return db[_0x5b63('0x18')][_0x5b63('0x23')](_0x1d382a[_0x5b63('0x24')],{'raw':_0x1d382a[_0x5b63('0x1a')]?_0x1d382a['options'][_0x5b63('0x19')]===undefined?!![]:![]:!![]})[_0x5b63('0x20')](function(_0xedfcb7){logger[_0x5b63('0xf')](_0x5b63('0x22'),_0x1d382a);logger['debug']('CreateVoiceQueueReport',_0x1d382a,JSON[_0x5b63('0x21')](_0xedfcb7));_0x533bac(_0xedfcb7);})[_0x5b63('0x25')](function(_0x3b352b){logger[_0x5b63('0x13')]('CreateVoiceQueueReport',_0x3b352b[_0x5b63('0x15')],_0x1d382a);_0xf5c325(_0x3fd1b1[_0x5b63('0x13')](0x1f4,_0x3b352b[_0x5b63('0x15')]));});});};exports[_0x5b63('0x26')]=function(_0x4766d4){var _0x24e560=this;return new Promise(function(_0x320f94,_0x2a2ad0){return db[_0x5b63('0x18')][_0x5b63('0x27')](_0x4766d4[_0x5b63('0x24')],{'raw':_0x4766d4[_0x5b63('0x1a')]?_0x4766d4['options'][_0x5b63('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4766d4[_0x5b63('0x1a')]?_0x4766d4[_0x5b63('0x1a')][_0x5b63('0x28')]||null:null,'attributes':_0x4766d4[_0x5b63('0x1a')]?_0x4766d4[_0x5b63('0x1a')][_0x5b63('0x1b')]||null:null,'limit':_0x4766d4['options']?_0x4766d4[_0x5b63('0x1a')]['limit']||null:null})[_0x5b63('0x20')](function(_0x1c48f2){logger['info'](_0x5b63('0x26'),_0x4766d4);logger['debug'](_0x5b63('0x26'),_0x4766d4,JSON['stringify'](_0x1c48f2));_0x320f94(_0x1c48f2);})['catch'](function(_0x571de1){logger[_0x5b63('0x13')](_0x5b63('0x26'),_0x571de1['message'],_0x4766d4);_0x2a2ad0(_0x24e560[_0x5b63('0x13')](0x1f4,_0x571de1[_0x5b63('0x15')]));});});};
\ No newline at end of file
+var _0x352b=['create','UpdateVoiceQueueReport','update','body','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./voiceQueueReport.socket','register','info','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceQueueReport','findAll','options','raw','where','attributes','limit','include','map','model','then','CreateVoiceQueueReport'];(function(_0x55a589,_0x445cc2){var _0x55dcdf=function(_0x3f61f3){while(--_0x3f61f3){_0x55a589['push'](_0x55a589['shift']());}};_0x55dcdf(++_0x445cc2);}(_0x352b,0x187));var _0xb352=function(_0x490808,_0x3dc16d){_0x490808=_0x490808-0x0;var _0x1c5738=_0x352b[_0x490808];return _0x1c5738;};'use strict';var _=require('lodash');var util=require(_0xb352('0x0'));var moment=require('moment');var BPromise=require(_0xb352('0x1'));var rs=require(_0xb352('0x2'));var fs=require('fs');var Redis=require(_0xb352('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xb352('0x4'));var logger=require(_0xb352('0x5'))(_0xb352('0x6'));var config=require('../../config/environment');var jayson=require(_0xb352('0x7'));var client=jayson[_0xb352('0x8')][_0xb352('0x9')]({'port':0x232a});config['redis']=_[_0xb352('0xa')](config[_0xb352('0xb')],{'host':_0xb352('0xc'),'port':0x18eb});var socket=require(_0xb352('0xd'))(new Redis(config[_0xb352('0xb')]));require(_0xb352('0xe'))[_0xb352('0xf')](socket);function respondWithRpcPromise(_0x5548a3,_0x554507,_0x35e0cb){return new BPromise(function(_0x5012d0,_0x12fa0a){return client['request'](_0x5548a3,_0x35e0cb)['then'](function(_0x2dafc7){logger[_0xb352('0x10')](_0xb352('0x11'),_0x554507,_0xb352('0x12'));logger[_0xb352('0x13')](_0xb352('0x14'),_0x554507,_0xb352('0x12'),JSON[_0xb352('0x15')](_0x2dafc7));if(_0x2dafc7[_0xb352('0x16')]){if(_0x2dafc7[_0xb352('0x16')][_0xb352('0x17')]===0x1f4){logger[_0xb352('0x16')](_0xb352('0x11'),_0x554507,_0x2dafc7[_0xb352('0x16')][_0xb352('0x18')]);return _0x12fa0a(_0x2dafc7[_0xb352('0x16')][_0xb352('0x18')]);}logger[_0xb352('0x16')](_0xb352('0x11'),_0x554507,_0x2dafc7[_0xb352('0x16')][_0xb352('0x18')]);return _0x5012d0(_0x2dafc7['error'][_0xb352('0x18')]);}else{logger[_0xb352('0x10')](_0xb352('0x11'),_0x554507,'request\x20sent');_0x5012d0(_0x2dafc7[_0xb352('0x19')][_0xb352('0x18')]);}})[_0xb352('0x1a')](function(_0x295b5e){logger[_0xb352('0x16')](_0xb352('0x11'),_0x554507,_0x295b5e);_0x12fa0a(_0x295b5e);});});}exports[_0xb352('0x1b')]=function(_0x31c659){var _0x35bc89=this;return new Promise(function(_0x13c6f2,_0x33f3ff){return db['VoiceQueueReport'][_0xb352('0x1c')]({'raw':_0x31c659['options']?_0x31c659[_0xb352('0x1d')][_0xb352('0x1e')]===undefined?!![]:![]:!![],'where':_0x31c659[_0xb352('0x1d')]?_0x31c659[_0xb352('0x1d')][_0xb352('0x1f')]||null:null,'attributes':_0x31c659[_0xb352('0x1d')]?_0x31c659['options'][_0xb352('0x20')]||null:null,'limit':_0x31c659[_0xb352('0x1d')]?_0x31c659[_0xb352('0x1d')][_0xb352('0x21')]||null:null,'include':_0x31c659[_0xb352('0x1d')]?_0x31c659[_0xb352('0x1d')][_0xb352('0x22')]?_[_0xb352('0x23')](_0x31c659['options'][_0xb352('0x22')],function(_0x116e77){return{'model':db[_0x116e77[_0xb352('0x24')]],'as':_0x116e77['as'],'attributes':_0x116e77[_0xb352('0x20')],'include':_0x116e77[_0xb352('0x22')]?_[_0xb352('0x23')](_0x116e77[_0xb352('0x22')],function(_0x2cb3e0){return{'model':db[_0x2cb3e0[_0xb352('0x24')]],'as':_0x2cb3e0['as'],'attributes':_0x2cb3e0[_0xb352('0x20')],'include':_0x2cb3e0[_0xb352('0x22')]?_[_0xb352('0x23')](_0x2cb3e0['include'],function(_0x61edf){return{'model':db[_0x61edf[_0xb352('0x24')]],'as':_0x61edf['as'],'attributes':_0x61edf[_0xb352('0x20')]};}):[]};}):[]};}):[]:[]})[_0xb352('0x25')](function(_0x518265){logger[_0xb352('0x10')](_0xb352('0x1b'),_0x31c659);logger['debug'](_0xb352('0x1b'),_0x31c659,JSON[_0xb352('0x15')](_0x518265));_0x13c6f2(_0x518265);})[_0xb352('0x1a')](function(_0x33406b){logger[_0xb352('0x16')]('GetVoiceQueueReport',_0x33406b[_0xb352('0x18')],_0x31c659);_0x33f3ff(_0x35bc89['error'](0x1f4,_0x33406b[_0xb352('0x18')]));});});};exports[_0xb352('0x26')]=function(_0x5939c9){var _0x570ca0=this;return new Promise(function(_0x6f94a5,_0x2ea429){return db['VoiceQueueReport'][_0xb352('0x27')](_0x5939c9['body'],{'raw':_0x5939c9['options']?_0x5939c9[_0xb352('0x1d')][_0xb352('0x1e')]===undefined?!![]:![]:!![]})[_0xb352('0x25')](function(_0x40c4ec){logger[_0xb352('0x10')](_0xb352('0x26'),_0x5939c9);logger[_0xb352('0x13')](_0xb352('0x26'),_0x5939c9,JSON['stringify'](_0x40c4ec));_0x6f94a5(_0x40c4ec);})[_0xb352('0x1a')](function(_0x512f59){logger[_0xb352('0x16')](_0xb352('0x26'),_0x512f59[_0xb352('0x18')],_0x5939c9);_0x2ea429(_0x570ca0[_0xb352('0x16')](0x1f4,_0x512f59[_0xb352('0x18')]));});});};exports[_0xb352('0x28')]=function(_0x5328cb){var _0x3ffccc=this;return new Promise(function(_0x130ea3,_0x580333){return db['VoiceQueueReport'][_0xb352('0x29')](_0x5328cb[_0xb352('0x2a')],{'raw':_0x5328cb[_0xb352('0x1d')]?_0x5328cb[_0xb352('0x1d')][_0xb352('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5328cb[_0xb352('0x1d')]?_0x5328cb[_0xb352('0x1d')][_0xb352('0x1f')]||null:null,'attributes':_0x5328cb['options']?_0x5328cb['options'][_0xb352('0x20')]||null:null,'limit':_0x5328cb[_0xb352('0x1d')]?_0x5328cb['options'][_0xb352('0x21')]||null:null})[_0xb352('0x25')](function(_0x2b6540){logger[_0xb352('0x10')](_0xb352('0x28'),_0x5328cb);logger[_0xb352('0x13')]('UpdateVoiceQueueReport',_0x5328cb,JSON[_0xb352('0x15')](_0x2b6540));_0x130ea3(_0x2b6540);})[_0xb352('0x1a')](function(_0x4d62ae){logger[_0xb352('0x16')](_0xb352('0x28'),_0x4d62ae['message'],_0x5328cb);_0x580333(_0x3ffccc[_0xb352('0x16')](0x1f4,_0x4d62ae[_0xb352('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.socket.js b/server/api/voiceQueueReport/voiceQueueReport.socket.js
index b336c8a..ac97816 100644
--- a/server/api/voiceQueueReport/voiceQueueReport.socket.js
+++ b/server/api/voiceQueueReport/voiceQueueReport.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x50bf=['emit','register','length','voiceQueueReport:','save','update'];(function(_0x41393a,_0xb93e63){var _0x9d51cd=function(_0x378b37){while(--_0x378b37){_0x41393a['push'](_0x41393a['shift']());}};_0x9d51cd(++_0xb93e63);}(_0x50bf,0x106));var _0xf50b=function(_0x11884b,_0x4ac311){_0x11884b=_0x11884b-0x0;var _0x79d6d1=_0x50bf[_0x11884b];return _0x79d6d1;};'use strict';var VoiceQueueReportEvents=require('./voiceQueueReport.events');var events=[_0xf50b('0x0'),'remove',_0xf50b('0x1')];function createListener(_0x2aabbf,_0x5d6cf3){return function(_0x1f0e0e){_0x5d6cf3[_0xf50b('0x2')](_0x2aabbf,_0x1f0e0e);};}function removeListener(_0x537312,_0x7138b9){return function(){VoiceQueueReportEvents['removeListener'](_0x537312,_0x7138b9);};}exports[_0xf50b('0x3')]=function(_0x5e2290){for(var _0x455b74=0x0,_0x38643f=events[_0xf50b('0x4')];_0x455b74<_0x38643f;_0x455b74++){var _0x59b57d=events[_0x455b74];var _0x13d59c=createListener(_0xf50b('0x5')+_0x59b57d,_0x5e2290);VoiceQueueReportEvents['on'](_0x59b57d,_0x13d59c);}};
\ No newline at end of file
+var _0x7add=['./voiceQueueReport.events','save','remove','emit','removeListener','voiceQueueReport:'];(function(_0x39d88a,_0xcfe53f){var _0x23c194=function(_0x47d107){while(--_0x47d107){_0x39d88a['push'](_0x39d88a['shift']());}};_0x23c194(++_0xcfe53f);}(_0x7add,0x72));var _0xd7ad=function(_0xd3adea,_0x59280c){_0xd3adea=_0xd3adea-0x0;var _0x55dea6=_0x7add[_0xd3adea];return _0x55dea6;};'use strict';var VoiceQueueReportEvents=require(_0xd7ad('0x0'));var events=[_0xd7ad('0x1'),_0xd7ad('0x2'),'update'];function createListener(_0x3085bb,_0x462ad3){return function(_0x4814c8){_0x462ad3[_0xd7ad('0x3')](_0x3085bb,_0x4814c8);};}function removeListener(_0x5bb43f,_0x212036){return function(){VoiceQueueReportEvents[_0xd7ad('0x4')](_0x5bb43f,_0x212036);};}exports['register']=function(_0x5cabde){for(var _0x59b881=0x0,_0x47aa7b=events['length'];_0x59b881<_0x47aa7b;_0x59b881++){var _0x1a96d2=events[_0x59b881];var _0x502061=createListener(_0xd7ad('0x5')+_0x1a96d2,_0x5cabde);VoiceQueueReportEvents['on'](_0x1a96d2,_0x502061);}};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/index.js b/server/api/voiceQueuesLog/index.js
index dd9d732..b1a6384 100644
--- a/server/api/voiceQueuesLog/index.js
+++ b/server/api/voiceQueuesLog/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2709=['./voiceQueuesLog.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','Router','../../components/interaction/service','../../config/environment'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x2709,0x189));var _0x9270=function(_0x49c48a,_0x69ab44){_0x49c48a=_0x49c48a-0x0;var _0x12234d=_0x2709[_0x49c48a];return _0x12234d;};'use strict';var multer=require(_0x9270('0x0'));var util=require('util');var path=require(_0x9270('0x1'));var timeout=require(_0x9270('0x2'));var express=require('express');var router=express[_0x9270('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x9270('0x4'));var config=require(_0x9270('0x5'));var controller=require(_0x9270('0x6'));router[_0x9270('0x7')]('/',auth[_0x9270('0x8')](),controller[_0x9270('0x9')]);router['get'](_0x9270('0xa'),auth[_0x9270('0x8')](),controller[_0x9270('0xb')]);router[_0x9270('0xc')]('/',auth['isAuthenticated'](),controller[_0x9270('0xd')]);router[_0x9270('0xe')](_0x9270('0xa'),auth[_0x9270('0x8')](),controller[_0x9270('0xf')]);router[_0x9270('0x10')](_0x9270('0xa'),auth[_0x9270('0x8')](),controller[_0x9270('0x11')]);module[_0x9270('0x12')]=router;
\ No newline at end of file
+var _0xcb04=['multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueuesLog.controller','isAuthenticated','index','get','/:id','show','post','create','put','update','delete','destroy','exports'];(function(_0x435674,_0x5d1b00){var _0xde33b2=function(_0x5b6f89){while(--_0x5b6f89){_0x435674['push'](_0x435674['shift']());}};_0xde33b2(++_0x5d1b00);}(_0xcb04,0x9a));var _0x4cb0=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xcb04[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x4cb0('0x0'));var util=require(_0x4cb0('0x1'));var path=require(_0x4cb0('0x2'));var timeout=require(_0x4cb0('0x3'));var express=require(_0x4cb0('0x4'));var router=express[_0x4cb0('0x5')]();var auth=require(_0x4cb0('0x6'));var interaction=require(_0x4cb0('0x7'));var config=require(_0x4cb0('0x8'));var controller=require(_0x4cb0('0x9'));router['get']('/',auth[_0x4cb0('0xa')](),controller[_0x4cb0('0xb')]);router[_0x4cb0('0xc')](_0x4cb0('0xd'),auth[_0x4cb0('0xa')](),controller[_0x4cb0('0xe')]);router[_0x4cb0('0xf')]('/',auth[_0x4cb0('0xa')](),controller[_0x4cb0('0x10')]);router[_0x4cb0('0x11')](_0x4cb0('0xd'),auth[_0x4cb0('0xa')](),controller[_0x4cb0('0x12')]);router[_0x4cb0('0x13')](_0x4cb0('0xd'),auth[_0x4cb0('0xa')](),controller[_0x4cb0('0x14')]);module[_0x4cb0('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js
index ca9f9e5..0fac2f6 100644
--- a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js
+++ b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeec6=['sequelize','moment','exports','STRING','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x4996c2,_0x67679a){var _0x29808c=function(_0x3ab2fb){while(--_0x3ab2fb){_0x4996c2['push'](_0x4996c2['shift']());}};_0x29808c(++_0x67679a);}(_0xeec6,0x1c2));var _0x6eec=function(_0x228641,_0x25d636){_0x228641=_0x228641-0x0;var _0x5d5d78=_0xeec6[_0x228641];return _0x5d5d78;};'use strict';var Sequelize=require(_0x6eec('0x0'));var moment=require(_0x6eec('0x1'));module[_0x6eec('0x2')]={'time':{'type':Sequelize[_0x6eec('0x3')]},'callid':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x6eec('0x3')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':moment()[_0x6eec('0x4')](_0x6eec('0x5'))}};
\ No newline at end of file
+var _0x98a8=['sequelize','moment','exports','STRING','DATE','YYYY-MM-DD\x20HH:mm:ss'];(function(_0xb68772,_0x5253ac){var _0x4189bb=function(_0x1b0cf3){while(--_0x1b0cf3){_0xb68772['push'](_0xb68772['shift']());}};_0x4189bb(++_0x5253ac);}(_0x98a8,0x12c));var _0x898a=function(_0x13cebd,_0x579eaa){_0x13cebd=_0x13cebd-0x0;var _0x5e78f4=_0x98a8[_0x13cebd];return _0x5e78f4;};'use strict';var Sequelize=require(_0x898a('0x0'));var moment=require(_0x898a('0x1'));module[_0x898a('0x2')]={'time':{'type':Sequelize[_0x898a('0x3')]},'callid':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x898a('0x3')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x898a('0x4')],'allowNull':![],'defaultValue':moment()['format'](_0x898a('0x5'))}};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js
index 9007739..d1d71d2 100644
--- a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js
+++ b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdc68=['update','destroy','then','end','sendStatus','error','stack','name','send','index','VoiceQueuesLog','model','keys','query','filters','intersection','attributes','hasOwnProperty','nolimit','limit','offset','order','sort','where','map','key','field','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','fields','length','find','create','body','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','count','set','Content-Range','json','apply'];(function(_0xd0cd0b,_0x490956){var _0x59cced=function(_0x567251){while(--_0x567251){_0xd0cd0b['push'](_0xd0cd0b['shift']());}};_0x59cced(++_0x490956);}(_0xdc68,0x1d5));var _0x8dc6=function(_0x5d44af,_0x400b3a){_0x5d44af=_0x5d44af-0x0;var _0x5e8bae=_0xdc68[_0x5d44af];return _0x5e8bae;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x8dc6('0x0'));var rimraf=require(_0x8dc6('0x1'));var zipdir=require(_0x8dc6('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8dc6('0x3'));var moment=require(_0x8dc6('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x8dc6('0x5'));var util=require(_0x8dc6('0x6'));var path=require(_0x8dc6('0x7'));var sox=require(_0x8dc6('0x8'));var csv=require(_0x8dc6('0x9'));var ejs=require(_0x8dc6('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x8dc6('0xb'));var crypto=require(_0x8dc6('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8dc6('0xd'));var toCsv=require(_0x8dc6('0x9'));var querystring=require(_0x8dc6('0xe'));var Papa=require(_0x8dc6('0xf'));var Redis=require(_0x8dc6('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x8dc6('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8dc6('0x12'))('api');var utils=require(_0x8dc6('0x13'));var config=require(_0x8dc6('0x14'));var db=require(_0x8dc6('0x15'))['db'];function respondWithStatusCode(_0x4494c3,_0x18ff67){_0x18ff67=_0x18ff67||0xcc;return function(_0x4d26e3){if(_0x4d26e3){return _0x4494c3['sendStatus'](_0x18ff67);}return _0x4494c3[_0x8dc6('0x16')](_0x18ff67)['end']();};}function respondWithResult(_0x4d1c06,_0x4944f5){_0x4944f5=_0x4944f5||0xc8;return function(_0x24bd90){if(_0x24bd90){return _0x4d1c06['status'](_0x4944f5)['json'](_0x24bd90);}};}function respondWithFilteredResult(_0x3fff8d,_0x10d51f){return function(_0x3826b1){if(_0x3826b1){var _0x26ba9c=_0x3826b1[_0x8dc6('0x17')],_0x2f1bc0=_0x10d51f['offset'],_0x5ac635=_0x10d51f['offset']+_0x10d51f['limit'],_0x2ef473;if(_0x5ac635>=_0x26ba9c){_0x5ac635=_0x26ba9c;_0x2ef473=0xc8;}else{_0x2ef473=0xce;}_0x3fff8d[_0x8dc6('0x16')](_0x2ef473);return _0x3fff8d[_0x8dc6('0x18')](_0x8dc6('0x19'),_0x2f1bc0+'-'+_0x5ac635+'/'+_0x26ba9c)[_0x8dc6('0x1a')](_0x3826b1);}return null;};}function patchUpdates(_0x22efae){return function(_0x53b592){try{jsonpatch[_0x8dc6('0x1b')](_0x53b592,_0x22efae,!![]);}catch(_0x5c156e){return BPromise['reject'](_0x5c156e);}return _0x53b592['save']();};}function saveUpdates(_0x2f6eeb,_0x45d62a){return function(_0x367631){if(_0x367631){return _0x367631[_0x8dc6('0x1c')](_0x2f6eeb)['then'](function(_0x384654){return _0x384654;});}return null;};}function removeEntity(_0x2008d3,_0xaab227){return function(_0x19f345){if(_0x19f345){return _0x19f345[_0x8dc6('0x1d')]()[_0x8dc6('0x1e')](function(){_0x2008d3[_0x8dc6('0x16')](0xcc)[_0x8dc6('0x1f')]();});}};}function handleEntityNotFound(_0x5b5a3c,_0x17506d){return function(_0x2c80d9){if(!_0x2c80d9){_0x5b5a3c[_0x8dc6('0x20')](0x194);}return _0x2c80d9;};}function handleError(_0x2716dd,_0x4bc2ff){_0x4bc2ff=_0x4bc2ff||0x1f4;return function(_0x5c3870){logger[_0x8dc6('0x21')](_0x5c3870[_0x8dc6('0x22')]);if(_0x5c3870[_0x8dc6('0x23')]){delete _0x5c3870[_0x8dc6('0x23')];}_0x2716dd[_0x8dc6('0x16')](_0x4bc2ff)[_0x8dc6('0x24')](_0x5c3870);};}exports[_0x8dc6('0x25')]=function(_0x4debab,_0x49363b){var _0x29d8a2={},_0x5f5d6d={},_0x56e515={'count':0x0,'rows':[]};var _0x4ea133=db[_0x8dc6('0x26')]['rawAttributes'];_0x5f5d6d[_0x8dc6('0x27')]=_[_0x8dc6('0x28')](_0x4ea133);_0x5f5d6d[_0x8dc6('0x29')]=_[_0x8dc6('0x28')](_0x4debab[_0x8dc6('0x29')]);_0x5f5d6d[_0x8dc6('0x2a')]=_['intersection'](_0x5f5d6d[_0x8dc6('0x27')],_0x5f5d6d['query']);_0x29d8a2['attributes']=_[_0x8dc6('0x2b')](_0x5f5d6d['model'],qs['fields'](_0x4debab['query']['fields']));_0x29d8a2[_0x8dc6('0x2c')]=_0x29d8a2[_0x8dc6('0x2c')]['length']?_0x29d8a2[_0x8dc6('0x2c')]:_0x5f5d6d[_0x8dc6('0x27')];if(!_0x4debab[_0x8dc6('0x29')][_0x8dc6('0x2d')](_0x8dc6('0x2e'))){_0x29d8a2[_0x8dc6('0x2f')]=qs['limit'](_0x4debab[_0x8dc6('0x29')][_0x8dc6('0x2f')]);_0x29d8a2[_0x8dc6('0x30')]=qs[_0x8dc6('0x30')](_0x4debab['query'][_0x8dc6('0x30')]);}_0x29d8a2[_0x8dc6('0x31')]=qs['sort'](_0x4debab['query'][_0x8dc6('0x32')]);_0x29d8a2[_0x8dc6('0x33')]=qs['filters'](_['pick'](_0x4debab[_0x8dc6('0x29')],_0x5f5d6d[_0x8dc6('0x2a')]));if(_0x4debab[_0x8dc6('0x29')]['filter']){_0x29d8a2['where']=_['merge'](_0x29d8a2[_0x8dc6('0x33')],{'$or':_[_0x8dc6('0x34')](_0x4ea133,function(_0x32d2fa){if(_0x32d2fa['type'][_0x8dc6('0x35')]!=='VIRTUAL'){var _0x58a7ea={};_0x58a7ea[_0x32d2fa[_0x8dc6('0x36')]]={'$like':'%'+_0x4debab[_0x8dc6('0x29')][_0x8dc6('0x37')]+'%'};return _0x58a7ea;}})});}_0x29d8a2=_[_0x8dc6('0x38')]({},_0x29d8a2,_0x4debab[_0x8dc6('0x39')]);var _0x54d4d3={'where':_0x29d8a2[_0x8dc6('0x33')]};return db[_0x8dc6('0x26')]['count'](_0x54d4d3)[_0x8dc6('0x1e')](function(_0x5f4a87){_0x56e515['count']=_0x5f4a87;if(_0x4debab[_0x8dc6('0x29')][_0x8dc6('0x3a')]){_0x29d8a2[_0x8dc6('0x3b')]=[{'all':!![]}];}return db[_0x8dc6('0x26')][_0x8dc6('0x3c')](_0x29d8a2);})['then'](function(_0xf0cb36){_0x56e515[_0x8dc6('0x3d')]=_0xf0cb36;return _0x56e515;})[_0x8dc6('0x1e')](respondWithFilteredResult(_0x49363b,_0x29d8a2))[_0x8dc6('0x3e')](handleError(_0x49363b,null));};exports[_0x8dc6('0x3f')]=function(_0x58c42b,_0xea95f4){var _0x4c117d={'raw':!![],'where':{'id':_0x58c42b[_0x8dc6('0x40')]['id']}},_0x1ab7e9={};_0x1ab7e9[_0x8dc6('0x27')]=_['keys'](db[_0x8dc6('0x26')][_0x8dc6('0x41')]);_0x1ab7e9[_0x8dc6('0x29')]=_[_0x8dc6('0x28')](_0x58c42b[_0x8dc6('0x29')]);_0x1ab7e9[_0x8dc6('0x2a')]=_[_0x8dc6('0x2b')](_0x1ab7e9[_0x8dc6('0x27')],_0x1ab7e9[_0x8dc6('0x29')]);_0x4c117d[_0x8dc6('0x2c')]=_[_0x8dc6('0x2b')](_0x1ab7e9[_0x8dc6('0x27')],qs[_0x8dc6('0x42')](_0x58c42b[_0x8dc6('0x29')][_0x8dc6('0x42')]));_0x4c117d['attributes']=_0x4c117d[_0x8dc6('0x2c')][_0x8dc6('0x43')]?_0x4c117d[_0x8dc6('0x2c')]:_0x1ab7e9[_0x8dc6('0x27')];if(_0x58c42b[_0x8dc6('0x29')]['includeAll']){_0x4c117d['include']=[{'all':!![]}];}_0x4c117d=_['merge']({},_0x4c117d,_0x58c42b[_0x8dc6('0x39')]);return db['VoiceQueuesLog'][_0x8dc6('0x44')](_0x4c117d)[_0x8dc6('0x1e')](handleEntityNotFound(_0xea95f4,null))[_0x8dc6('0x1e')](respondWithResult(_0xea95f4,null))[_0x8dc6('0x3e')](handleError(_0xea95f4,null));};exports[_0x8dc6('0x45')]=function(_0x40660d,_0x3a7d3c){return db['VoiceQueuesLog'][_0x8dc6('0x45')](_0x40660d[_0x8dc6('0x46')],{})['then'](respondWithResult(_0x3a7d3c,0xc9))['catch'](handleError(_0x3a7d3c,null));};exports[_0x8dc6('0x1c')]=function(_0x4a1463,_0x30623b){if(_0x4a1463['body']['id']){delete _0x4a1463['body']['id'];}return db[_0x8dc6('0x26')][_0x8dc6('0x44')]({'where':{'id':_0x4a1463[_0x8dc6('0x40')]['id']}})[_0x8dc6('0x1e')](handleEntityNotFound(_0x30623b,null))[_0x8dc6('0x1e')](saveUpdates(_0x4a1463['body'],null))[_0x8dc6('0x1e')](respondWithResult(_0x30623b,null))['catch'](handleError(_0x30623b,null));};exports[_0x8dc6('0x1d')]=function(_0x21ace3,_0x297af9){return db[_0x8dc6('0x26')][_0x8dc6('0x44')]({'where':{'id':_0x21ace3['params']['id']}})[_0x8dc6('0x1e')](handleEntityNotFound(_0x297af9,null))[_0x8dc6('0x1e')](removeEntity(_0x297af9,null))[_0x8dc6('0x3e')](handleError(_0x297af9,null));};
\ No newline at end of file
+var _0xa057=['Content-Range','reject','save','update','then','destroy','end','error','stack','name','send','VoiceQueuesLog','model','keys','query','filters','intersection','fields','attributes','length','order','sort','where','pick','type','key','VIRTUAL','field','merge','options','includeAll','include','findAll','show','params','rawAttributes','find','catch','create','body','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','util','path','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','limit','set'];(function(_0x1856e8,_0x4532d6){var _0x4ad341=function(_0x2495d7){while(--_0x2495d7){_0x1856e8['push'](_0x1856e8['shift']());}};_0x4ad341(++_0x4532d6);}(_0xa057,0x6f));var _0x7a05=function(_0x21f1a8,_0x3a43fc){_0x21f1a8=_0x21f1a8-0x0;var _0x580753=_0xa057[_0x21f1a8];return _0x580753;};'use strict';var pdf=require(_0x7a05('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x7a05('0x1'));var zipdir=require(_0x7a05('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7a05('0x3'));var moment=require(_0x7a05('0x4'));var BPromise=require(_0x7a05('0x5'));var Mustache=require('mustache');var util=require(_0x7a05('0x6'));var path=require(_0x7a05('0x7'));var sox=require('sox');var csv=require(_0x7a05('0x8'));var ejs=require(_0x7a05('0x9'));var fs=require('fs');var _=require(_0x7a05('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x7a05('0xb'));var deskjs=require(_0x7a05('0xc'));var toCsv=require(_0x7a05('0x8'));var querystring=require(_0x7a05('0xd'));var Papa=require(_0x7a05('0xe'));var Redis=require(_0x7a05('0xf'));var authService=require(_0x7a05('0x10'));var qs=require(_0x7a05('0x11'));var hardwareService=require(_0x7a05('0x12'));var logger=require(_0x7a05('0x13'))(_0x7a05('0x14'));var utils=require(_0x7a05('0x15'));var config=require(_0x7a05('0x16'));var db=require(_0x7a05('0x17'))['db'];function respondWithStatusCode(_0x114960,_0x45d5cc){_0x45d5cc=_0x45d5cc||0xcc;return function(_0x1c99f2){if(_0x1c99f2){return _0x114960[_0x7a05('0x18')](_0x45d5cc);}return _0x114960['status'](_0x45d5cc)['end']();};}function respondWithResult(_0x3b23df,_0x410ba4){_0x410ba4=_0x410ba4||0xc8;return function(_0x22a312){if(_0x22a312){return _0x3b23df[_0x7a05('0x19')](_0x410ba4)[_0x7a05('0x1a')](_0x22a312);}};}function respondWithFilteredResult(_0x349165,_0x8bdc53){return function(_0xf0152f){if(_0xf0152f){var _0x5e3c9d=_0xf0152f[_0x7a05('0x1b')],_0x27c6d5=_0x8bdc53[_0x7a05('0x1c')],_0x53ff89=_0x8bdc53['offset']+_0x8bdc53[_0x7a05('0x1d')],_0x398871;if(_0x53ff89>=_0x5e3c9d){_0x53ff89=_0x5e3c9d;_0x398871=0xc8;}else{_0x398871=0xce;}_0x349165[_0x7a05('0x19')](_0x398871);return _0x349165[_0x7a05('0x1e')](_0x7a05('0x1f'),_0x27c6d5+'-'+_0x53ff89+'/'+_0x5e3c9d)[_0x7a05('0x1a')](_0xf0152f);}return null;};}function patchUpdates(_0x5cc497){return function(_0x1c9af9){try{jsonpatch['apply'](_0x1c9af9,_0x5cc497,!![]);}catch(_0x119c7e){return BPromise[_0x7a05('0x20')](_0x119c7e);}return _0x1c9af9[_0x7a05('0x21')]();};}function saveUpdates(_0x4f195d,_0x910e99){return function(_0x570456){if(_0x570456){return _0x570456[_0x7a05('0x22')](_0x4f195d)[_0x7a05('0x23')](function(_0x556071){return _0x556071;});}return null;};}function removeEntity(_0x200518,_0x468e61){return function(_0x17e457){if(_0x17e457){return _0x17e457[_0x7a05('0x24')]()[_0x7a05('0x23')](function(){_0x200518[_0x7a05('0x19')](0xcc)[_0x7a05('0x25')]();});}};}function handleEntityNotFound(_0x410145,_0x1a8c6a){return function(_0x162307){if(!_0x162307){_0x410145['sendStatus'](0x194);}return _0x162307;};}function handleError(_0x175e28,_0x4d6968){_0x4d6968=_0x4d6968||0x1f4;return function(_0x51b021){logger[_0x7a05('0x26')](_0x51b021[_0x7a05('0x27')]);if(_0x51b021[_0x7a05('0x28')]){delete _0x51b021[_0x7a05('0x28')];}_0x175e28[_0x7a05('0x19')](_0x4d6968)[_0x7a05('0x29')](_0x51b021);};}exports['index']=function(_0x546b02,_0x51ee03){var _0x58aaa2={},_0x2093a9={},_0x2400a0={'count':0x0,'rows':[]};var _0x5887a4=db[_0x7a05('0x2a')]['rawAttributes'];_0x2093a9[_0x7a05('0x2b')]=_[_0x7a05('0x2c')](_0x5887a4);_0x2093a9['query']=_[_0x7a05('0x2c')](_0x546b02[_0x7a05('0x2d')]);_0x2093a9[_0x7a05('0x2e')]=_['intersection'](_0x2093a9['model'],_0x2093a9['query']);_0x58aaa2['attributes']=_[_0x7a05('0x2f')](_0x2093a9[_0x7a05('0x2b')],qs[_0x7a05('0x30')](_0x546b02[_0x7a05('0x2d')][_0x7a05('0x30')]));_0x58aaa2[_0x7a05('0x31')]=_0x58aaa2[_0x7a05('0x31')][_0x7a05('0x32')]?_0x58aaa2['attributes']:_0x2093a9[_0x7a05('0x2b')];if(!_0x546b02['query']['hasOwnProperty']('nolimit')){_0x58aaa2['limit']=qs[_0x7a05('0x1d')](_0x546b02['query'][_0x7a05('0x1d')]);_0x58aaa2[_0x7a05('0x1c')]=qs[_0x7a05('0x1c')](_0x546b02[_0x7a05('0x2d')]['offset']);}_0x58aaa2[_0x7a05('0x33')]=qs['sort'](_0x546b02[_0x7a05('0x2d')][_0x7a05('0x34')]);_0x58aaa2[_0x7a05('0x35')]=qs[_0x7a05('0x2e')](_[_0x7a05('0x36')](_0x546b02[_0x7a05('0x2d')],_0x2093a9[_0x7a05('0x2e')]));if(_0x546b02[_0x7a05('0x2d')]['filter']){_0x58aaa2[_0x7a05('0x35')]=_['merge'](_0x58aaa2[_0x7a05('0x35')],{'$or':_['map'](_0x5887a4,function(_0x50da90){if(_0x50da90[_0x7a05('0x37')][_0x7a05('0x38')]!==_0x7a05('0x39')){var _0xeaa2bf={};_0xeaa2bf[_0x50da90[_0x7a05('0x3a')]]={'$like':'%'+_0x546b02['query']['filter']+'%'};return _0xeaa2bf;}})});}_0x58aaa2=_[_0x7a05('0x3b')]({},_0x58aaa2,_0x546b02[_0x7a05('0x3c')]);var _0x137ca2={'where':_0x58aaa2[_0x7a05('0x35')]};return db[_0x7a05('0x2a')][_0x7a05('0x1b')](_0x137ca2)[_0x7a05('0x23')](function(_0x348f32){_0x2400a0[_0x7a05('0x1b')]=_0x348f32;if(_0x546b02['query'][_0x7a05('0x3d')]){_0x58aaa2[_0x7a05('0x3e')]=[{'all':!![]}];}return db[_0x7a05('0x2a')][_0x7a05('0x3f')](_0x58aaa2);})[_0x7a05('0x23')](function(_0x239bbb){_0x2400a0['rows']=_0x239bbb;return _0x2400a0;})[_0x7a05('0x23')](respondWithFilteredResult(_0x51ee03,_0x58aaa2))['catch'](handleError(_0x51ee03,null));};exports[_0x7a05('0x40')]=function(_0x2a9dea,_0x4ed4e8){var _0xc3c329={'raw':!![],'where':{'id':_0x2a9dea[_0x7a05('0x41')]['id']}},_0xaf97a7={};_0xaf97a7[_0x7a05('0x2b')]=_['keys'](db['VoiceQueuesLog'][_0x7a05('0x42')]);_0xaf97a7[_0x7a05('0x2d')]=_[_0x7a05('0x2c')](_0x2a9dea[_0x7a05('0x2d')]);_0xaf97a7[_0x7a05('0x2e')]=_[_0x7a05('0x2f')](_0xaf97a7[_0x7a05('0x2b')],_0xaf97a7[_0x7a05('0x2d')]);_0xc3c329[_0x7a05('0x31')]=_[_0x7a05('0x2f')](_0xaf97a7[_0x7a05('0x2b')],qs[_0x7a05('0x30')](_0x2a9dea['query'][_0x7a05('0x30')]));_0xc3c329[_0x7a05('0x31')]=_0xc3c329[_0x7a05('0x31')][_0x7a05('0x32')]?_0xc3c329[_0x7a05('0x31')]:_0xaf97a7[_0x7a05('0x2b')];if(_0x2a9dea['query']['includeAll']){_0xc3c329[_0x7a05('0x3e')]=[{'all':!![]}];}_0xc3c329=_[_0x7a05('0x3b')]({},_0xc3c329,_0x2a9dea[_0x7a05('0x3c')]);return db[_0x7a05('0x2a')][_0x7a05('0x43')](_0xc3c329)[_0x7a05('0x23')](handleEntityNotFound(_0x4ed4e8,null))[_0x7a05('0x23')](respondWithResult(_0x4ed4e8,null))[_0x7a05('0x44')](handleError(_0x4ed4e8,null));};exports['create']=function(_0x5d82cb,_0xc64e84){return db[_0x7a05('0x2a')][_0x7a05('0x45')](_0x5d82cb[_0x7a05('0x46')],{})[_0x7a05('0x23')](respondWithResult(_0xc64e84,0xc9))[_0x7a05('0x44')](handleError(_0xc64e84,null));};exports['update']=function(_0x10b4da,_0xd182a3){if(_0x10b4da[_0x7a05('0x46')]['id']){delete _0x10b4da[_0x7a05('0x46')]['id'];}return db[_0x7a05('0x2a')][_0x7a05('0x43')]({'where':{'id':_0x10b4da[_0x7a05('0x41')]['id']}})[_0x7a05('0x23')](handleEntityNotFound(_0xd182a3,null))['then'](saveUpdates(_0x10b4da['body'],null))['then'](respondWithResult(_0xd182a3,null))[_0x7a05('0x44')](handleError(_0xd182a3,null));};exports[_0x7a05('0x24')]=function(_0x21b2db,_0x37cfea){return db['VoiceQueuesLog'][_0x7a05('0x43')]({'where':{'id':_0x21b2db['params']['id']}})['then'](handleEntityNotFound(_0x37cfea,null))[_0x7a05('0x23')](removeEntity(_0x37cfea,null))[_0x7a05('0x44')](handleError(_0x37cfea,null));};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.model.js b/server/api/voiceQueuesLog/voiceQueuesLog.model.js
index 5802b5e..a00c5df 100644
--- a/server/api/voiceQueuesLog/voiceQueuesLog.model.js
+++ b/server/api/voiceQueuesLog/voiceQueuesLog.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xae8b=['event','dtm','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueuesLog.attributes','exports','VoiceQueuesLog','event_dtm'];(function(_0x280345,_0x5f265f){var _0x23b9f4=function(_0xc7a982){while(--_0xc7a982){_0x280345['push'](_0x280345['shift']());}};_0x23b9f4(++_0x5f265f);}(_0xae8b,0x64));var _0xbae8=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xae8b[_0x397e5f];return _0x5302b8;};'use strict';var _=require('lodash');var util=require(_0xbae8('0x0'));var logger=require(_0xbae8('0x1'))('api');var moment=require(_0xbae8('0x2'));var BPromise=require(_0xbae8('0x3'));var rp=require(_0xbae8('0x4'));var fs=require('fs');var path=require(_0xbae8('0x5'));var rimraf=require(_0xbae8('0x6'));var config=require(_0xbae8('0x7'));var attributes=require(_0xbae8('0x8'));module[_0xbae8('0x9')]=function(_0x5c483f,_0x80d35f){return _0x5c483f['define'](_0xbae8('0xa'),attributes,{'tableName':'voice_queues_log','paranoid':![],'indexes':[{'name':_0xbae8('0xb'),'fields':[_0xbae8('0xc'),_0xbae8('0xd')]}],'timestamps':![]});};
\ No newline at end of file
+var _0x4627=['exports','define','VoiceQueuesLog','voice_queues_log','event_dtm','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x2d54d1,_0x3bb863){var _0x191339=function(_0x3129b7){while(--_0x3129b7){_0x2d54d1['push'](_0x2d54d1['shift']());}};_0x191339(++_0x3bb863);}(_0x4627,0x198));var _0x7462=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0x4627[_0x1caf6a];return _0x1bf493;};'use strict';var _=require('lodash');var util=require(_0x7462('0x0'));var logger=require(_0x7462('0x1'))('api');var moment=require(_0x7462('0x2'));var BPromise=require(_0x7462('0x3'));var rp=require(_0x7462('0x4'));var fs=require('fs');var path=require(_0x7462('0x5'));var rimraf=require(_0x7462('0x6'));var config=require(_0x7462('0x7'));var attributes=require('./voiceQueuesLog.attributes');module[_0x7462('0x8')]=function(_0x56bba0,_0x3fd604){return _0x56bba0[_0x7462('0x9')](_0x7462('0xa'),attributes,{'tableName':_0x7462('0xb'),'paranoid':![],'indexes':[{'name':_0x7462('0xc'),'fields':['event','dtm']}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js
index 7520372..908b833 100644
--- a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js
+++ b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8fdb=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash'];(function(_0x1b4018,_0x4b990b){var _0x16a61e=function(_0x52dac5){while(--_0x52dac5){_0x1b4018['push'](_0x1b4018['shift']());}};_0x16a61e(++_0x4b990b);}(_0x8fdb,0xe9));var _0xb8fd=function(_0x5519a9,_0x1c5147){_0x5519a9=_0x5519a9-0x0;var _0x32f2cc=_0x8fdb[_0x5519a9];return _0x32f2cc;};'use strict';var _=require(_0xb8fd('0x0'));var util=require(_0xb8fd('0x1'));var moment=require(_0xb8fd('0x2'));var BPromise=require(_0xb8fd('0x3'));var rs=require(_0xb8fd('0x4'));var fs=require('fs');var Redis=require(_0xb8fd('0x5'));var db=require(_0xb8fd('0x6'))['db'];var utils=require(_0xb8fd('0x7'));var logger=require(_0xb8fd('0x8'))('rpc');var config=require(_0xb8fd('0x9'));var jayson=require(_0xb8fd('0xa'));var client=jayson[_0xb8fd('0xb')][_0xb8fd('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5534c7,_0x1f610f,_0xb12c5e){return new BPromise(function(_0xead34f,_0x282339){return client[_0xb8fd('0xd')](_0x5534c7,_0xb12c5e)[_0xb8fd('0xe')](function(_0x50b30d){logger['info'](_0xb8fd('0xf'),_0x1f610f,_0xb8fd('0x10'));logger[_0xb8fd('0x11')](_0xb8fd('0x12'),_0x1f610f,_0xb8fd('0x10'),JSON[_0xb8fd('0x13')](_0x50b30d));if(_0x50b30d['error']){if(_0x50b30d[_0xb8fd('0x14')][_0xb8fd('0x15')]===0x1f4){logger[_0xb8fd('0x14')](_0xb8fd('0xf'),_0x1f610f,_0x50b30d[_0xb8fd('0x14')][_0xb8fd('0x16')]);return _0x282339(_0x50b30d[_0xb8fd('0x14')]['message']);}logger[_0xb8fd('0x14')]('VoiceQueuesLog,\x20%s,\x20%s',_0x1f610f,_0x50b30d['error'][_0xb8fd('0x16')]);return _0xead34f(_0x50b30d['error']['message']);}else{logger[_0xb8fd('0x17')](_0xb8fd('0xf'),_0x1f610f,_0xb8fd('0x10'));_0xead34f(_0x50b30d[_0xb8fd('0x18')][_0xb8fd('0x16')]);}})[_0xb8fd('0x19')](function(_0x442b25){logger[_0xb8fd('0x14')](_0xb8fd('0xf'),_0x1f610f,_0x442b25);_0x282339(_0x442b25);});});}
\ No newline at end of file
+var _0x1669=['debug','stringify','error','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent'];(function(_0x32fab5,_0x1c3ea6){var _0x1983ea=function(_0x2c2289){while(--_0x2c2289){_0x32fab5['push'](_0x32fab5['shift']());}};_0x1983ea(++_0x1c3ea6);}(_0x1669,0x1e9));var _0x9166=function(_0x29ab76,_0x20c8af){_0x29ab76=_0x29ab76-0x0;var _0x30ae46=_0x1669[_0x29ab76];return _0x30ae46;};'use strict';var _=require(_0x9166('0x0'));var util=require(_0x9166('0x1'));var moment=require(_0x9166('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9166('0x3'));var db=require(_0x9166('0x4'))['db'];var utils=require(_0x9166('0x5'));var logger=require(_0x9166('0x6'))(_0x9166('0x7'));var config=require(_0x9166('0x8'));var jayson=require(_0x9166('0x9'));var client=jayson['client'][_0x9166('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x581a63,_0x2efcf4,_0x401f17){return new BPromise(function(_0x478f6f,_0x103d5e){return client[_0x9166('0xb')](_0x581a63,_0x401f17)['then'](function(_0x56e549){logger[_0x9166('0xc')](_0x9166('0xd'),_0x2efcf4,_0x9166('0xe'));logger[_0x9166('0xf')]('VoiceQueuesLog,\x20%s,\x20%s,\x20%s',_0x2efcf4,_0x9166('0xe'),JSON[_0x9166('0x10')](_0x56e549));if(_0x56e549['error']){if(_0x56e549[_0x9166('0x11')]['code']===0x1f4){logger[_0x9166('0x11')](_0x9166('0xd'),_0x2efcf4,_0x56e549['error'][_0x9166('0x12')]);return _0x103d5e(_0x56e549[_0x9166('0x11')][_0x9166('0x12')]);}logger[_0x9166('0x11')](_0x9166('0xd'),_0x2efcf4,_0x56e549[_0x9166('0x11')][_0x9166('0x12')]);return _0x478f6f(_0x56e549[_0x9166('0x11')]['message']);}else{logger['info']('VoiceQueuesLog,\x20%s,\x20%s',_0x2efcf4,_0x9166('0xe'));_0x478f6f(_0x56e549[_0x9166('0x13')][_0x9166('0x12')]);}})[_0x9166('0x14')](function(_0x573b39){logger[_0x9166('0x11')](_0x9166('0xd'),_0x2efcf4,_0x573b39);_0x103d5e(_0x573b39);});});}
\ No newline at end of file
diff --git a/server/api/voiceRecording/index.js b/server/api/voiceRecording/index.js
index 41aa613..c1e9b2d 100644
--- a/server/api/voiceRecording/index.js
+++ b/server/api/voiceRecording/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x01fe=['./voiceRecording.controller','isAuthenticated','get','/describe','describe','show','/:id/download','download','downloads','create','put','/:id','update','delete','destroy','exports','multer','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x4841b7,_0x1eda63){var _0x81d522=function(_0x26d511){while(--_0x26d511){_0x4841b7['push'](_0x4841b7['shift']());}};_0x81d522(++_0x1eda63);}(_0x01fe,0x102));var _0xe01f=function(_0x33307e,_0x26a8db){_0x33307e=_0x33307e-0x0;var _0x3bb8fc=_0x01fe[_0x33307e];return _0x3bb8fc;};'use strict';var multer=require(_0xe01f('0x0'));var util=require('util');var path=require(_0xe01f('0x1'));var timeout=require(_0xe01f('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xe01f('0x3'));var interaction=require(_0xe01f('0x4'));var config=require(_0xe01f('0x5'));var controller=require(_0xe01f('0x6'));router['get']('/',auth[_0xe01f('0x7')](),controller['index']);router[_0xe01f('0x8')](_0xe01f('0x9'),auth[_0xe01f('0x7')](),controller[_0xe01f('0xa')]);router[_0xe01f('0x8')]('/:id',auth[_0xe01f('0x7')](),controller[_0xe01f('0xb')]);router['get'](_0xe01f('0xc'),auth['isAuthenticated'](),controller[_0xe01f('0xd')]);router[_0xe01f('0x8')]('/:id/downloads',controller[_0xe01f('0xe')]);router['post']('/',auth[_0xe01f('0x7')](),controller[_0xe01f('0xf')]);router[_0xe01f('0x10')](_0xe01f('0x11'),auth[_0xe01f('0x7')](),controller[_0xe01f('0x12')]);router[_0xe01f('0x13')](_0xe01f('0x11'),auth['isAuthenticated'](),controller[_0xe01f('0x14')]);module[_0xe01f('0x15')]=router;
\ No newline at end of file
+var _0x1306=['index','/describe','describe','/:id','show','/:id/download','download','/:id/downloads','downloads','post','create','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceRecording.controller','get','isAuthenticated'];(function(_0x5a636f,_0x3fec2b){var _0x6a8cfb=function(_0x20e6ca){while(--_0x20e6ca){_0x5a636f['push'](_0x5a636f['shift']());}};_0x6a8cfb(++_0x3fec2b);}(_0x1306,0x17a));var _0x6130=function(_0x5ab4bf,_0x310b87){_0x5ab4bf=_0x5ab4bf-0x0;var _0x505742=_0x1306[_0x5ab4bf];return _0x505742;};'use strict';var multer=require(_0x6130('0x0'));var util=require(_0x6130('0x1'));var path=require(_0x6130('0x2'));var timeout=require(_0x6130('0x3'));var express=require(_0x6130('0x4'));var router=express[_0x6130('0x5')]();var auth=require(_0x6130('0x6'));var interaction=require(_0x6130('0x7'));var config=require(_0x6130('0x8'));var controller=require(_0x6130('0x9'));router[_0x6130('0xa')]('/',auth[_0x6130('0xb')](),controller[_0x6130('0xc')]);router[_0x6130('0xa')](_0x6130('0xd'),auth[_0x6130('0xb')](),controller[_0x6130('0xe')]);router[_0x6130('0xa')](_0x6130('0xf'),auth[_0x6130('0xb')](),controller[_0x6130('0x10')]);router[_0x6130('0xa')](_0x6130('0x11'),auth[_0x6130('0xb')](),controller[_0x6130('0x12')]);router[_0x6130('0xa')](_0x6130('0x13'),controller[_0x6130('0x14')]);router[_0x6130('0x15')]('/',auth['isAuthenticated'](),controller[_0x6130('0x16')]);router['put'](_0x6130('0xf'),auth[_0x6130('0xb')](),controller['update']);router[_0x6130('0x17')](_0x6130('0xf'),auth[_0x6130('0xb')](),controller[_0x6130('0x18')]);module[_0x6130('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.attributes.js b/server/api/voiceRecording/voiceRecording.attributes.js
index ac265a0..550457c 100644
--- a/server/api/voiceRecording/voiceRecording.attributes.js
+++ b/server/api/voiceRecording/voiceRecording.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3195=['membername','split','INTEGER','format','MM-DD-YYYY\x20HH:mm','toString','updatedAt','exports','VIRTUAL','getDataValue','value','extname','STRING','setDataValue','channel'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x3195,0x17e));var _0x5319=function(_0x5effeb,_0x2d4e51){_0x5effeb=_0x5effeb-0x0;var _0x4f8412=_0x3195[_0x5effeb];return _0x4f8412;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');var path=require('path');module[_0x5319('0x0')]={'format':{'type':Sequelize[_0x5319('0x1')],'get':function(){return this[_0x5319('0x2')](_0x5319('0x3'))?path[_0x5319('0x4')](this[_0x5319('0x2')]('value')):undefined;}},'uniqueid':{'type':Sequelize[_0x5319('0x5')]},'channel':{'type':Sequelize[_0x5319('0x5')],'set':function(_0x2069fb){if(_0x2069fb){this[_0x5319('0x6')](_0x5319('0x7'),_0x2069fb);this['setDataValue'](_0x5319('0x8'),_0x2069fb[_0x5319('0x9')](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x5319('0x5')]},'calleridnum':{'type':Sequelize[_0x5319('0x5')]},'calleridname':{'type':Sequelize[_0x5319('0x5')]},'connectedlinenum':{'type':Sequelize[_0x5319('0x5')]},'connectedlinename':{'type':Sequelize[_0x5319('0x5')]},'accountcode':{'type':Sequelize[_0x5319('0x5')]},'context':{'type':Sequelize[_0x5319('0x5')]},'exten':{'type':Sequelize[_0x5319('0x5')]},'value':{'type':Sequelize[_0x5319('0x5')]},'type':{'type':Sequelize[_0x5319('0x5')]},'rating':{'type':Sequelize[_0x5319('0xa')],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize[_0x5319('0x5')]},'userDisposition':{'type':Sequelize['STRING']},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue']('createdAt'))[_0x5319('0xb')](_0x5319('0xc'))[_0x5319('0xd')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x5319('0xe')))[_0x5319('0xb')](_0x5319('0xc'))[_0x5319('0xd')]();}}};
\ No newline at end of file
+var _0x4011=['updatedAt','sequelize','path','exports','VIRTUAL','extname','getDataValue','value','STRING','setDataValue','channel','split','INTEGER','createdAt','format','toString','DATE'];(function(_0x1e3c16,_0x372caa){var _0x47a0c9=function(_0x47f81d){while(--_0x47f81d){_0x1e3c16['push'](_0x1e3c16['shift']());}};_0x47a0c9(++_0x372caa);}(_0x4011,0x133));var _0x1401=function(_0x114e6a,_0x3dc9d2){_0x114e6a=_0x114e6a-0x0;var _0x423189=_0x4011[_0x114e6a];return _0x423189;};'use strict';var Sequelize=require(_0x1401('0x0'));var moment=require('moment');var path=require(_0x1401('0x1'));module[_0x1401('0x2')]={'format':{'type':Sequelize[_0x1401('0x3')],'get':function(){return this['getDataValue']('value')?path[_0x1401('0x4')](this[_0x1401('0x5')](_0x1401('0x6'))):undefined;}},'uniqueid':{'type':Sequelize[_0x1401('0x7')]},'channel':{'type':Sequelize[_0x1401('0x7')],'set':function(_0x56b18e){if(_0x56b18e){this[_0x1401('0x8')](_0x1401('0x9'),_0x56b18e);this[_0x1401('0x8')]('membername',_0x56b18e[_0x1401('0xa')](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x1401('0x7')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x1401('0x7')]},'connectedlinenum':{'type':Sequelize[_0x1401('0x7')]},'connectedlinename':{'type':Sequelize[_0x1401('0x7')]},'accountcode':{'type':Sequelize[_0x1401('0x7')]},'context':{'type':Sequelize[_0x1401('0x7')]},'exten':{'type':Sequelize[_0x1401('0x7')]},'value':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x1401('0x7')]},'rating':{'type':Sequelize[_0x1401('0xb')],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize[_0x1401('0x7')]},'userDisposition':{'type':Sequelize[_0x1401('0x7')]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x1401('0x5')](_0x1401('0xc')))[_0x1401('0xd')]('MM-DD-YYYY\x20HH:mm')[_0x1401('0xe')]();}},'updatedAt':{'type':Sequelize[_0x1401('0xf')],'get':function(){return moment(this[_0x1401('0x5')](_0x1401('0x10')))['format']('MM-DD-YYYY\x20HH:mm')[_0x1401('0xe')]();}}};
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.controller.js b/server/api/voiceRecording/voiceRecording.controller.js
index 7560894..833d2c5 100644
--- a/server/api/voiceRecording/voiceRecording.controller.js
+++ b/server/api/voiceRecording/voiceRecording.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6e91=['destroy','error','stack','name','send','index','VoiceRecording','differenceBy','keys','format','query','intersection','model','attributes','fields','length','hasOwnProperty','limit','sort','where','pick','filters','filter','merge','map','type','key','field','includeAll','include','findAll','rows','params','rawAttributes','options','find','body','catch','describe','download','../../components/encryptor','uniqueid','value','%s.cypher','existsSync','secrets','recording','Sequelize','ValidationError','filename','extname','unlink','VoiceRecording\x20not\x20found','Not\x20found','downloads','sequelize','MD5','col','token','$and','push','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','set','Content-Range','apply','save','update','then'];(function(_0x1527f3,_0x372a04){var _0x27210b=function(_0x16a38b){while(--_0x16a38b){_0x1527f3['push'](_0x1527f3['shift']());}};_0x27210b(++_0x372a04);}(_0x6e91,0xa0));var _0x16e9=function(_0x45e3af,_0x2a6ed2){_0x45e3af=_0x45e3af-0x0;var _0x1497fd=_0x6e91[_0x45e3af];return _0x1497fd;};'use strict';var pdf=require(_0x16e9('0x0'));var emlformat=require(_0x16e9('0x1'));var rimraf=require(_0x16e9('0x2'));var zipdir=require(_0x16e9('0x3'));var jsonpatch=require(_0x16e9('0x4'));var rp=require('request-promise');var moment=require(_0x16e9('0x5'));var BPromise=require(_0x16e9('0x6'));var Mustache=require(_0x16e9('0x7'));var util=require(_0x16e9('0x8'));var path=require(_0x16e9('0x9'));var sox=require(_0x16e9('0xa'));var csv=require(_0x16e9('0xb'));var ejs=require(_0x16e9('0xc'));var fs=require('fs');var _=require(_0x16e9('0xd'));var squel=require(_0x16e9('0xe'));var crypto=require(_0x16e9('0xf'));var jsforce=require(_0x16e9('0x10'));var deskjs=require(_0x16e9('0x11'));var toCsv=require(_0x16e9('0xb'));var querystring=require(_0x16e9('0x12'));var Papa=require(_0x16e9('0x13'));var Redis=require(_0x16e9('0x14'));var authService=require(_0x16e9('0x15'));var qs=require('../../components/parsers/qs');var hardwareService=require(_0x16e9('0x16'));var logger=require(_0x16e9('0x17'))('api');var utils=require('../../config/utils');var config=require(_0x16e9('0x18'));var db=require(_0x16e9('0x19'))['db'];function respondWithStatusCode(_0x1d98ea,_0x45602e){_0x45602e=_0x45602e||0xcc;return function(_0x46e5c4){if(_0x46e5c4){return _0x1d98ea[_0x16e9('0x1a')](_0x45602e);}return _0x1d98ea['status'](_0x45602e)[_0x16e9('0x1b')]();};}function respondWithResult(_0x4bf709,_0x5acde6){_0x5acde6=_0x5acde6||0xc8;return function(_0x18cb8c){if(_0x18cb8c){return _0x4bf709[_0x16e9('0x1c')](_0x5acde6)[_0x16e9('0x1d')](_0x18cb8c);}};}function respondWithFilteredResult(_0x54c55f,_0x51b129){return function(_0x3cface){if(_0x3cface){var _0x3188cf=_0x3cface[_0x16e9('0x1e')],_0x45efbf=_0x51b129[_0x16e9('0x1f')],_0x15de48=_0x51b129[_0x16e9('0x1f')]+_0x51b129['limit'],_0x3c212f;if(_0x15de48>=_0x3188cf){_0x15de48=_0x3188cf;_0x3c212f=0xc8;}else{_0x3c212f=0xce;}_0x54c55f[_0x16e9('0x1c')](_0x3c212f);return _0x54c55f[_0x16e9('0x20')](_0x16e9('0x21'),_0x45efbf+'-'+_0x15de48+'/'+_0x3188cf)['json'](_0x3cface);}return null;};}function patchUpdates(_0x2548e7){return function(_0x4774bf){try{jsonpatch[_0x16e9('0x22')](_0x4774bf,_0x2548e7,!![]);}catch(_0x550ec9){return BPromise['reject'](_0x550ec9);}return _0x4774bf[_0x16e9('0x23')]();};}function saveUpdates(_0x302f70,_0x468173){return function(_0x2267a5){if(_0x2267a5){return _0x2267a5[_0x16e9('0x24')](_0x302f70)[_0x16e9('0x25')](function(_0x142b1d){return _0x142b1d;});}return null;};}function removeEntity(_0x56ed89,_0x25e29a){return function(_0x246a46){if(_0x246a46){return _0x246a46[_0x16e9('0x26')]()[_0x16e9('0x25')](function(){_0x56ed89[_0x16e9('0x1c')](0xcc)[_0x16e9('0x1b')]();});}};}function handleEntityNotFound(_0x2e4e8c,_0x489059){return function(_0xeeff66){if(!_0xeeff66){_0x2e4e8c['sendStatus'](0x194);}return _0xeeff66;};}function handleError(_0x347a74,_0x5266ba){_0x5266ba=_0x5266ba||0x1f4;return function(_0x275ae3){logger[_0x16e9('0x27')](_0x275ae3[_0x16e9('0x28')]);if(_0x275ae3[_0x16e9('0x29')]){delete _0x275ae3[_0x16e9('0x29')];}_0x347a74[_0x16e9('0x1c')](_0x5266ba)[_0x16e9('0x2a')](_0x275ae3);};}exports[_0x16e9('0x2b')]=function(_0x254607,_0x530222){var _0x49b521={},_0x2f1b98={},_0x1edf8f={'count':0x0,'rows':[]};var _0xe6fa6b=db[_0x16e9('0x2c')]['rawAttributes'];_0x2f1b98['model']=_[_0x16e9('0x2d')](_[_0x16e9('0x2e')](_0xe6fa6b),[_0x16e9('0x2f')]);_0x2f1b98[_0x16e9('0x30')]=_[_0x16e9('0x2e')](_0x254607['query']);_0x2f1b98['filters']=_[_0x16e9('0x31')](_0x2f1b98[_0x16e9('0x32')],_0x2f1b98[_0x16e9('0x30')]);_0x49b521[_0x16e9('0x33')]=_[_0x16e9('0x31')](_0x2f1b98[_0x16e9('0x32')],qs[_0x16e9('0x34')](_0x254607[_0x16e9('0x30')][_0x16e9('0x34')]));_0x49b521[_0x16e9('0x33')]=_0x49b521['attributes'][_0x16e9('0x35')]?_0x49b521[_0x16e9('0x33')]:_0x2f1b98['model'];if(!_0x254607[_0x16e9('0x30')][_0x16e9('0x36')]('nolimit')){_0x49b521[_0x16e9('0x37')]=qs[_0x16e9('0x37')](_0x254607[_0x16e9('0x30')][_0x16e9('0x37')]);_0x49b521[_0x16e9('0x1f')]=qs[_0x16e9('0x1f')](_0x254607[_0x16e9('0x30')][_0x16e9('0x1f')]);}_0x49b521['order']=qs[_0x16e9('0x38')](_0x254607['query'][_0x16e9('0x38')]);_0x49b521[_0x16e9('0x39')]=qs['filters'](_[_0x16e9('0x3a')](_0x254607[_0x16e9('0x30')],_0x2f1b98[_0x16e9('0x3b')]));if(_0x254607[_0x16e9('0x30')][_0x16e9('0x3c')]){_0x49b521[_0x16e9('0x39')]=_[_0x16e9('0x3d')](_0x49b521[_0x16e9('0x39')],{'$or':_[_0x16e9('0x3e')](_0xe6fa6b,function(_0x5cd287){if(_0x5cd287[_0x16e9('0x3f')][_0x16e9('0x40')]!=='VIRTUAL'){var _0x5da852={};_0x5da852[_0x5cd287[_0x16e9('0x41')]]={'$like':'%'+_0x254607[_0x16e9('0x30')][_0x16e9('0x3c')]+'%'};return _0x5da852;}})});}_0x49b521=_[_0x16e9('0x3d')]({},_0x49b521,_0x254607['options']);var _0x44bd5e={'where':_0x49b521['where']};return db['VoiceRecording'][_0x16e9('0x1e')](_0x44bd5e)[_0x16e9('0x25')](function(_0x254b9c){_0x1edf8f[_0x16e9('0x1e')]=_0x254b9c;if(_0x254607[_0x16e9('0x30')][_0x16e9('0x42')]){_0x49b521[_0x16e9('0x43')]=[{'all':!![]}];}return db[_0x16e9('0x2c')][_0x16e9('0x44')](_0x49b521);})[_0x16e9('0x25')](function(_0x4d42f4){_0x1edf8f[_0x16e9('0x45')]=_0x4d42f4;return _0x1edf8f;})[_0x16e9('0x25')](respondWithFilteredResult(_0x530222,_0x49b521))['catch'](handleError(_0x530222,null));};exports['show']=function(_0x3f598c,_0x491bad){var _0x3bfc47={'raw':![],'where':{'id':_0x3f598c[_0x16e9('0x46')]['id']}},_0x342901={};_0x342901[_0x16e9('0x32')]=_[_0x16e9('0x2e')](db[_0x16e9('0x2c')][_0x16e9('0x47')]);_0x342901[_0x16e9('0x30')]=_['keys'](_0x3f598c[_0x16e9('0x30')]);_0x342901[_0x16e9('0x3b')]=_[_0x16e9('0x31')](_0x342901[_0x16e9('0x32')],_0x342901[_0x16e9('0x30')]);_0x3bfc47[_0x16e9('0x33')]=_['intersection'](_0x342901[_0x16e9('0x32')],qs['fields'](_0x3f598c[_0x16e9('0x30')][_0x16e9('0x34')]));_0x3bfc47[_0x16e9('0x33')]=_0x3bfc47['attributes']['length']?_0x3bfc47['attributes']:_0x342901[_0x16e9('0x32')];if(_0x3f598c[_0x16e9('0x30')][_0x16e9('0x42')]){_0x3bfc47[_0x16e9('0x43')]=[{'all':!![]}];}_0x3bfc47=_[_0x16e9('0x3d')]({},_0x3bfc47,_0x3f598c[_0x16e9('0x48')]);return db[_0x16e9('0x2c')][_0x16e9('0x49')](_0x3bfc47)[_0x16e9('0x25')](handleEntityNotFound(_0x491bad,null))[_0x16e9('0x25')](respondWithResult(_0x491bad,null))['catch'](handleError(_0x491bad,null));};exports['create']=function(_0x58e273,_0x57d089){return db[_0x16e9('0x2c')]['create'](_0x58e273[_0x16e9('0x4a')],{})[_0x16e9('0x25')](respondWithResult(_0x57d089,0xc9))[_0x16e9('0x4b')](handleError(_0x57d089,null));};exports[_0x16e9('0x24')]=function(_0x1f645d,_0x476592){if(_0x1f645d[_0x16e9('0x4a')]['id']){delete _0x1f645d[_0x16e9('0x4a')]['id'];}return db[_0x16e9('0x2c')]['find']({'where':{'id':_0x1f645d['params']['id']}})[_0x16e9('0x25')](handleEntityNotFound(_0x476592,null))[_0x16e9('0x25')](saveUpdates(_0x1f645d[_0x16e9('0x4a')],null))[_0x16e9('0x25')](respondWithResult(_0x476592,null))['catch'](handleError(_0x476592,null));};exports[_0x16e9('0x26')]=function(_0x40550c,_0x2c8925){return db['VoiceRecording']['find']({'where':{'id':_0x40550c[_0x16e9('0x46')]['id']}})[_0x16e9('0x25')](handleEntityNotFound(_0x2c8925,null))[_0x16e9('0x25')](removeEntity(_0x2c8925,null))['catch'](handleError(_0x2c8925,null));};exports[_0x16e9('0x4c')]=function(_0x5efe94,_0x5b508b){return db['VoiceRecording'][_0x16e9('0x4c')]()[_0x16e9('0x25')](respondWithResult(_0x5b508b,null))['catch'](handleError(_0x5b508b,null));};exports[_0x16e9('0x4d')]=function(_0xcfaeaf,_0x2a911c,_0x1de99f){var _0x15188a=require(_0x16e9('0x4e'));var _0x3c027c=![];var _0x50b8bd={};if(_0xcfaeaf['query'][_0x16e9('0x3f')]&&_0xcfaeaf[_0x16e9('0x30')]['type']===_0x16e9('0x4f')){_0x50b8bd['uniqueid']=_0xcfaeaf['params']['id'];}else{_0x50b8bd['id']=_0xcfaeaf['params']['id'];}return db[_0x16e9('0x2c')][_0x16e9('0x49')]({'where':_0x50b8bd,'attributes':['id',_0x16e9('0x50')],'raw':!![]})['then'](handleEntityNotFound(_0x2a911c,null))[_0x16e9('0x25')](function(_0xaa6ead){if(_0xaa6ead){var _0x3a6788=_0xaa6ead[_0x16e9('0x50')];var _0x503b8d=util[_0x16e9('0x2f')](_0x16e9('0x51'),_0x3a6788);if(fs[_0x16e9('0x52')](_0x503b8d)){_0x3c027c=!![];return _0x15188a['decryptFile'](_0x503b8d,_0x3a6788,config[_0x16e9('0x53')][_0x16e9('0x54')])[_0x16e9('0x25')](function(){return _0xaa6ead;});}return _0xaa6ead;}})[_0x16e9('0x25')](function(_0x4b176e){if(_0x4b176e){var _0x12c94d=_0x4b176e[_0x16e9('0x50')];if(!fs[_0x16e9('0x52')](_0x12c94d)){throw new db[(_0x16e9('0x55'))][(_0x16e9('0x56'))]('VoiceRecording\x20not\x20found');}if(_0x4b176e[_0x16e9('0x57')]){return _0x2a911c[_0x16e9('0x4d')](_0x12c94d,_0x4b176e['filename']+path[_0x16e9('0x58')](_0x12c94d),function(){if(_0x3c027c){fs[_0x16e9('0x59')](_0x12c94d);}});}else{return _0x2a911c[_0x16e9('0x4d')](_0x12c94d,function(_0x2c77a9){if(_0x3c027c){fs['unlink'](_0x12c94d);}});}}})[_0x16e9('0x4b')](function(_0x206ae4){if(_0x206ae4['message']===_0x16e9('0x5a')){_0x2a911c[_0x16e9('0x1c')](0x194)[_0x16e9('0x2a')](_0x16e9('0x5b'));}else{return handleError(_0x2a911c,null);}});};exports[_0x16e9('0x5c')]=function(_0x22b2e3,_0x24c066,_0xed279a){var _0x52d269=require(_0x16e9('0x4e'));var _0x3f0648=![];var _0x5c36c7={'$and':[db[_0x16e9('0x5d')]['where'](db[_0x16e9('0x5d')]['fn'](_0x16e9('0x5e'),db[_0x16e9('0x5d')][_0x16e9('0x5f')](_0x16e9('0x4f'))),_0x22b2e3['query'][_0x16e9('0x60')])]};if(_0x22b2e3[_0x16e9('0x30')][_0x16e9('0x3f')]&&_0x22b2e3['query'][_0x16e9('0x3f')]==='uniqueid'){_0x5c36c7[_0x16e9('0x61')][_0x16e9('0x62')]({'uniqueid':_0x22b2e3[_0x16e9('0x46')]['id']});}else{_0x5c36c7[_0x16e9('0x61')][_0x16e9('0x62')]({'id':_0x22b2e3[_0x16e9('0x46')]['id']});}return db['VoiceRecording'][_0x16e9('0x49')]({'where':_0x5c36c7,'attributes':['id',_0x16e9('0x50')],'raw':!![]})[_0x16e9('0x25')](handleEntityNotFound(_0x24c066,null))[_0x16e9('0x25')](function(_0x4f793b){if(_0x4f793b){var _0x3ffe7f=util[_0x16e9('0x2f')](_0x16e9('0x51'),_0x4f793b[_0x16e9('0x50')]);if(fs[_0x16e9('0x52')](_0x3ffe7f)){_0x3f0648=!![];return _0x52d269['decryptFile'](_0x3ffe7f,_0x4f793b[_0x16e9('0x50')],config[_0x16e9('0x53')]['recording'])[_0x16e9('0x25')](function(){return _0x4f793b;});}return _0x4f793b;}})[_0x16e9('0x25')](function(_0x48ec13){if(_0x48ec13){if(!fs['existsSync'](_0x48ec13['value'])){throw new db[(_0x16e9('0x55'))][(_0x16e9('0x56'))](_0x16e9('0x5a'));}if(_0x48ec13[_0x16e9('0x57')]){return _0x24c066[_0x16e9('0x4d')](_0x48ec13[_0x16e9('0x50')],_0x48ec13[_0x16e9('0x57')]+path[_0x16e9('0x58')](_0x48ec13[_0x16e9('0x50')]),function(){if(_0x3f0648){fs[_0x16e9('0x59')](_0x48ec13[_0x16e9('0x50')]);}});}else{return _0x24c066[_0x16e9('0x4d')](_0x48ec13[_0x16e9('0x50')],function(_0x2082f7){if(_0x3f0648){fs[_0x16e9('0x59')](_0x48ec13['value']);}});}}})[_0x16e9('0x4b')](handleError(_0x24c066,null));};
\ No newline at end of file
+var _0x3ea5=['format','query','filters','model','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','key','includeAll','include','findAll','rows','catch','show','params','intersection','length','options','find','create','body','describe','download','uniqueid','value','%s.cypher','decryptFile','recording','existsSync','ValidationError','VoiceRecording\x20not\x20found','filename','extname','unlink','message','send','downloads','../../components/encryptor','sequelize','token','$and','push','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','end','status','json','count','offset','limit','apply','reject','save','destroy','then','stack','name','index','VoiceRecording','differenceBy','keys'];(function(_0x156abe,_0x2a0417){var _0x1a3ba3=function(_0x4fc58a){while(--_0x4fc58a){_0x156abe['push'](_0x156abe['shift']());}};_0x1a3ba3(++_0x2a0417);}(_0x3ea5,0x14a));var _0x53ea=function(_0x9f26a3,_0x37671a){_0x9f26a3=_0x9f26a3-0x0;var _0x54ad80=_0x3ea5[_0x9f26a3];return _0x54ad80;};'use strict';var pdf=require(_0x53ea('0x0'));var emlformat=require(_0x53ea('0x1'));var rimraf=require(_0x53ea('0x2'));var zipdir=require(_0x53ea('0x3'));var jsonpatch=require(_0x53ea('0x4'));var rp=require(_0x53ea('0x5'));var moment=require(_0x53ea('0x6'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x53ea('0x7'));var sox=require(_0x53ea('0x8'));var csv=require(_0x53ea('0x9'));var ejs=require(_0x53ea('0xa'));var fs=require('fs');var _=require(_0x53ea('0xb'));var squel=require(_0x53ea('0xc'));var crypto=require(_0x53ea('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x53ea('0xe'));var toCsv=require(_0x53ea('0x9'));var querystring=require('querystring');var Papa=require(_0x53ea('0xf'));var Redis=require(_0x53ea('0x10'));var authService=require(_0x53ea('0x11'));var qs=require(_0x53ea('0x12'));var hardwareService=require(_0x53ea('0x13'));var logger=require(_0x53ea('0x14'))(_0x53ea('0x15'));var utils=require(_0x53ea('0x16'));var config=require(_0x53ea('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1f41e6,_0x19cf53){_0x19cf53=_0x19cf53||0xcc;return function(_0x5b8afe){if(_0x5b8afe){return _0x1f41e6[_0x53ea('0x18')](_0x19cf53);}return _0x1f41e6['status'](_0x19cf53)[_0x53ea('0x19')]();};}function respondWithResult(_0x3c8b1a,_0x16884a){_0x16884a=_0x16884a||0xc8;return function(_0x59dc50){if(_0x59dc50){return _0x3c8b1a[_0x53ea('0x1a')](_0x16884a)[_0x53ea('0x1b')](_0x59dc50);}};}function respondWithFilteredResult(_0x5b1e13,_0x1f1eab){return function(_0x18fc22){if(_0x18fc22){var _0x295657=_0x18fc22[_0x53ea('0x1c')],_0x1a3be3=_0x1f1eab[_0x53ea('0x1d')],_0x26e5c7=_0x1f1eab[_0x53ea('0x1d')]+_0x1f1eab[_0x53ea('0x1e')],_0x56bcb2;if(_0x26e5c7>=_0x295657){_0x26e5c7=_0x295657;_0x56bcb2=0xc8;}else{_0x56bcb2=0xce;}_0x5b1e13[_0x53ea('0x1a')](_0x56bcb2);return _0x5b1e13['set']('Content-Range',_0x1a3be3+'-'+_0x26e5c7+'/'+_0x295657)[_0x53ea('0x1b')](_0x18fc22);}return null;};}function patchUpdates(_0x4250e0){return function(_0x408e79){try{jsonpatch[_0x53ea('0x1f')](_0x408e79,_0x4250e0,!![]);}catch(_0xf715e){return BPromise[_0x53ea('0x20')](_0xf715e);}return _0x408e79[_0x53ea('0x21')]();};}function saveUpdates(_0x218614,_0x471974){return function(_0x535918){if(_0x535918){return _0x535918['update'](_0x218614)['then'](function(_0xb6b479){return _0xb6b479;});}return null;};}function removeEntity(_0x3cd4bd,_0x31b678){return function(_0x342abd){if(_0x342abd){return _0x342abd[_0x53ea('0x22')]()[_0x53ea('0x23')](function(){_0x3cd4bd[_0x53ea('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e786a,_0x369640){return function(_0x251b8e){if(!_0x251b8e){_0x1e786a[_0x53ea('0x18')](0x194);}return _0x251b8e;};}function handleError(_0x11e8d8,_0x331490){_0x331490=_0x331490||0x1f4;return function(_0x485a7f){logger['error'](_0x485a7f[_0x53ea('0x24')]);if(_0x485a7f[_0x53ea('0x25')]){delete _0x485a7f[_0x53ea('0x25')];}_0x11e8d8['status'](_0x331490)['send'](_0x485a7f);};}exports[_0x53ea('0x26')]=function(_0x540f0c,_0x5a212d){var _0x32dcfe={},_0x5b45ef={},_0x192501={'count':0x0,'rows':[]};var _0x47706a=db[_0x53ea('0x27')]['rawAttributes'];_0x5b45ef['model']=_[_0x53ea('0x28')](_[_0x53ea('0x29')](_0x47706a),[_0x53ea('0x2a')]);_0x5b45ef[_0x53ea('0x2b')]=_[_0x53ea('0x29')](_0x540f0c['query']);_0x5b45ef[_0x53ea('0x2c')]=_['intersection'](_0x5b45ef['model'],_0x5b45ef['query']);_0x32dcfe['attributes']=_['intersection'](_0x5b45ef[_0x53ea('0x2d')],qs[_0x53ea('0x2e')](_0x540f0c[_0x53ea('0x2b')][_0x53ea('0x2e')]));_0x32dcfe[_0x53ea('0x2f')]=_0x32dcfe['attributes']['length']?_0x32dcfe[_0x53ea('0x2f')]:_0x5b45ef['model'];if(!_0x540f0c[_0x53ea('0x2b')][_0x53ea('0x30')](_0x53ea('0x31'))){_0x32dcfe[_0x53ea('0x1e')]=qs[_0x53ea('0x1e')](_0x540f0c['query'][_0x53ea('0x1e')]);_0x32dcfe[_0x53ea('0x1d')]=qs[_0x53ea('0x1d')](_0x540f0c[_0x53ea('0x2b')]['offset']);}_0x32dcfe[_0x53ea('0x32')]=qs[_0x53ea('0x33')](_0x540f0c[_0x53ea('0x2b')][_0x53ea('0x33')]);_0x32dcfe[_0x53ea('0x34')]=qs[_0x53ea('0x2c')](_[_0x53ea('0x35')](_0x540f0c[_0x53ea('0x2b')],_0x5b45ef[_0x53ea('0x2c')]));if(_0x540f0c['query'][_0x53ea('0x36')]){_0x32dcfe[_0x53ea('0x34')]=_[_0x53ea('0x37')](_0x32dcfe[_0x53ea('0x34')],{'$or':_[_0x53ea('0x38')](_0x47706a,function(_0x1a9c72){if(_0x1a9c72[_0x53ea('0x39')][_0x53ea('0x3a')]!=='VIRTUAL'){var _0x99fab5={};_0x99fab5[_0x1a9c72['field']]={'$like':'%'+_0x540f0c[_0x53ea('0x2b')]['filter']+'%'};return _0x99fab5;}})});}_0x32dcfe=_['merge']({},_0x32dcfe,_0x540f0c['options']);var _0x8a1856={'where':_0x32dcfe['where']};return db[_0x53ea('0x27')][_0x53ea('0x1c')](_0x8a1856)[_0x53ea('0x23')](function(_0xadeb06){_0x192501[_0x53ea('0x1c')]=_0xadeb06;if(_0x540f0c[_0x53ea('0x2b')][_0x53ea('0x3b')]){_0x32dcfe[_0x53ea('0x3c')]=[{'all':!![]}];}return db[_0x53ea('0x27')][_0x53ea('0x3d')](_0x32dcfe);})[_0x53ea('0x23')](function(_0x5f0dd6){_0x192501[_0x53ea('0x3e')]=_0x5f0dd6;return _0x192501;})[_0x53ea('0x23')](respondWithFilteredResult(_0x5a212d,_0x32dcfe))[_0x53ea('0x3f')](handleError(_0x5a212d,null));};exports[_0x53ea('0x40')]=function(_0x39a49a,_0x338ebf){var _0x13ccf4={'raw':![],'where':{'id':_0x39a49a[_0x53ea('0x41')]['id']}},_0x34ee2f={};_0x34ee2f[_0x53ea('0x2d')]=_['keys'](db[_0x53ea('0x27')]['rawAttributes']);_0x34ee2f[_0x53ea('0x2b')]=_[_0x53ea('0x29')](_0x39a49a['query']);_0x34ee2f[_0x53ea('0x2c')]=_[_0x53ea('0x42')](_0x34ee2f[_0x53ea('0x2d')],_0x34ee2f['query']);_0x13ccf4[_0x53ea('0x2f')]=_[_0x53ea('0x42')](_0x34ee2f[_0x53ea('0x2d')],qs[_0x53ea('0x2e')](_0x39a49a[_0x53ea('0x2b')][_0x53ea('0x2e')]));_0x13ccf4['attributes']=_0x13ccf4[_0x53ea('0x2f')][_0x53ea('0x43')]?_0x13ccf4[_0x53ea('0x2f')]:_0x34ee2f[_0x53ea('0x2d')];if(_0x39a49a[_0x53ea('0x2b')]['includeAll']){_0x13ccf4[_0x53ea('0x3c')]=[{'all':!![]}];}_0x13ccf4=_[_0x53ea('0x37')]({},_0x13ccf4,_0x39a49a[_0x53ea('0x44')]);return db[_0x53ea('0x27')][_0x53ea('0x45')](_0x13ccf4)[_0x53ea('0x23')](handleEntityNotFound(_0x338ebf,null))['then'](respondWithResult(_0x338ebf,null))[_0x53ea('0x3f')](handleError(_0x338ebf,null));};exports['create']=function(_0x3b630e,_0x329ba6){return db[_0x53ea('0x27')][_0x53ea('0x46')](_0x3b630e[_0x53ea('0x47')],{})[_0x53ea('0x23')](respondWithResult(_0x329ba6,0xc9))[_0x53ea('0x3f')](handleError(_0x329ba6,null));};exports['update']=function(_0x20ce89,_0x5a90f3){if(_0x20ce89[_0x53ea('0x47')]['id']){delete _0x20ce89[_0x53ea('0x47')]['id'];}return db[_0x53ea('0x27')][_0x53ea('0x45')]({'where':{'id':_0x20ce89[_0x53ea('0x41')]['id']}})[_0x53ea('0x23')](handleEntityNotFound(_0x5a90f3,null))['then'](saveUpdates(_0x20ce89[_0x53ea('0x47')],null))[_0x53ea('0x23')](respondWithResult(_0x5a90f3,null))[_0x53ea('0x3f')](handleError(_0x5a90f3,null));};exports[_0x53ea('0x22')]=function(_0x5c0123,_0x3dd4ac){return db[_0x53ea('0x27')]['find']({'where':{'id':_0x5c0123[_0x53ea('0x41')]['id']}})['then'](handleEntityNotFound(_0x3dd4ac,null))[_0x53ea('0x23')](removeEntity(_0x3dd4ac,null))[_0x53ea('0x3f')](handleError(_0x3dd4ac,null));};exports[_0x53ea('0x48')]=function(_0x32c269,_0x2addbf){return db[_0x53ea('0x27')][_0x53ea('0x48')]()[_0x53ea('0x23')](respondWithResult(_0x2addbf,null))[_0x53ea('0x3f')](handleError(_0x2addbf,null));};exports[_0x53ea('0x49')]=function(_0x24fd66,_0xf722b8,_0x15a12b){var _0xc874ed=require('../../components/encryptor');var _0x1c8759=![];var _0x52e3a2={};if(_0x24fd66['query'][_0x53ea('0x39')]&&_0x24fd66[_0x53ea('0x2b')][_0x53ea('0x39')]===_0x53ea('0x4a')){_0x52e3a2[_0x53ea('0x4a')]=_0x24fd66[_0x53ea('0x41')]['id'];}else{_0x52e3a2['id']=_0x24fd66[_0x53ea('0x41')]['id'];}return db[_0x53ea('0x27')][_0x53ea('0x45')]({'where':_0x52e3a2,'attributes':['id',_0x53ea('0x4b')],'raw':!![]})[_0x53ea('0x23')](handleEntityNotFound(_0xf722b8,null))['then'](function(_0x1337c5){if(_0x1337c5){var _0x49fbf7=_0x1337c5[_0x53ea('0x4b')];var _0x3fabdd=util[_0x53ea('0x2a')](_0x53ea('0x4c'),_0x49fbf7);if(fs['existsSync'](_0x3fabdd)){_0x1c8759=!![];return _0xc874ed[_0x53ea('0x4d')](_0x3fabdd,_0x49fbf7,config['secrets'][_0x53ea('0x4e')])[_0x53ea('0x23')](function(){return _0x1337c5;});}return _0x1337c5;}})['then'](function(_0x39c986){if(_0x39c986){var _0x5b0c79=_0x39c986[_0x53ea('0x4b')];if(!fs[_0x53ea('0x4f')](_0x5b0c79)){throw new db['Sequelize'][(_0x53ea('0x50'))](_0x53ea('0x51'));}if(_0x39c986[_0x53ea('0x52')]){return _0xf722b8[_0x53ea('0x49')](_0x5b0c79,_0x39c986[_0x53ea('0x52')]+path[_0x53ea('0x53')](_0x5b0c79),function(){if(_0x1c8759){fs[_0x53ea('0x54')](_0x5b0c79);}});}else{return _0xf722b8[_0x53ea('0x49')](_0x5b0c79,function(_0x1bf296){if(_0x1c8759){fs[_0x53ea('0x54')](_0x5b0c79);}});}}})['catch'](function(_0x31a68c){if(_0x31a68c[_0x53ea('0x55')]==='VoiceRecording\x20not\x20found'){_0xf722b8[_0x53ea('0x1a')](0x194)[_0x53ea('0x56')]('Not\x20found');}else{return handleError(_0xf722b8,null);}});};exports[_0x53ea('0x57')]=function(_0x23b1d2,_0x3b7340,_0x3dd5e6){var _0x5ec99a=require(_0x53ea('0x58'));var _0x23b18a=![];var _0x5155bd={'$and':[db[_0x53ea('0x59')][_0x53ea('0x34')](db[_0x53ea('0x59')]['fn']('MD5',db[_0x53ea('0x59')]['col'](_0x53ea('0x4a'))),_0x23b1d2[_0x53ea('0x2b')][_0x53ea('0x5a')])]};if(_0x23b1d2[_0x53ea('0x2b')][_0x53ea('0x39')]&&_0x23b1d2[_0x53ea('0x2b')][_0x53ea('0x39')]===_0x53ea('0x4a')){_0x5155bd[_0x53ea('0x5b')][_0x53ea('0x5c')]({'uniqueid':_0x23b1d2[_0x53ea('0x41')]['id']});}else{_0x5155bd[_0x53ea('0x5b')][_0x53ea('0x5c')]({'id':_0x23b1d2['params']['id']});}return db[_0x53ea('0x27')][_0x53ea('0x45')]({'where':_0x5155bd,'attributes':['id','value'],'raw':!![]})[_0x53ea('0x23')](handleEntityNotFound(_0x3b7340,null))['then'](function(_0x567c67){if(_0x567c67){var _0xc0bb78=util[_0x53ea('0x2a')](_0x53ea('0x4c'),_0x567c67[_0x53ea('0x4b')]);if(fs[_0x53ea('0x4f')](_0xc0bb78)){_0x23b18a=!![];return _0x5ec99a[_0x53ea('0x4d')](_0xc0bb78,_0x567c67[_0x53ea('0x4b')],config['secrets']['recording'])[_0x53ea('0x23')](function(){return _0x567c67;});}return _0x567c67;}})[_0x53ea('0x23')](function(_0x456497){if(_0x456497){if(!fs[_0x53ea('0x4f')](_0x456497[_0x53ea('0x4b')])){throw new db['Sequelize']['ValidationError'](_0x53ea('0x51'));}if(_0x456497[_0x53ea('0x52')]){return _0x3b7340['download'](_0x456497[_0x53ea('0x4b')],_0x456497[_0x53ea('0x52')]+path[_0x53ea('0x53')](_0x456497[_0x53ea('0x4b')]),function(){if(_0x23b18a){fs[_0x53ea('0x54')](_0x456497['value']);}});}else{return _0x3b7340[_0x53ea('0x49')](_0x456497['value'],function(_0x4bfd63){if(_0x23b18a){fs[_0x53ea('0x54')](_0x456497[_0x53ea('0x4b')]);}});}}})[_0x53ea('0x3f')](handleError(_0x3b7340,null));};
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.model.js b/server/api/voiceRecording/voiceRecording.model.js
index e2b2a8f..8f95a53 100644
--- a/server/api/voiceRecording/voiceRecording.model.js
+++ b/server/api/voiceRecording/voiceRecording.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9663=['path','rimraf','../../config/environment','./voiceRecording.attributes','define','uniqueid','lodash','util','api','moment','request-promise'];(function(_0x2f203f,_0x573638){var _0x39d6b0=function(_0x1b55cd){while(--_0x1b55cd){_0x2f203f['push'](_0x2f203f['shift']());}};_0x39d6b0(++_0x573638);}(_0x9663,0x150));var _0x3966=function(_0x54edf4,_0x11dd0f){_0x54edf4=_0x54edf4-0x0;var _0x589e87=_0x9663[_0x54edf4];return _0x589e87;};'use strict';var _=require(_0x3966('0x0'));var util=require(_0x3966('0x1'));var logger=require('../../config/logger')(_0x3966('0x2'));var moment=require(_0x3966('0x3'));var BPromise=require('bluebird');var rp=require(_0x3966('0x4'));var fs=require('fs');var path=require(_0x3966('0x5'));var rimraf=require(_0x3966('0x6'));var config=require(_0x3966('0x7'));var attributes=require(_0x3966('0x8'));module['exports']=function(_0x592eca,_0x4cae2c){return _0x592eca[_0x3966('0x9')]('VoiceRecording',attributes,{'tableName':'voice_recordings','paranoid':![],'indexes':[{'name':_0x3966('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbc2d=['api','bluebird','path','rimraf','./voiceRecording.attributes','define','lodash','util','../../config/logger'];(function(_0x20a353,_0x6e01c0){var _0x39b1c2=function(_0x9e2801){while(--_0x9e2801){_0x20a353['push'](_0x20a353['shift']());}};_0x39b1c2(++_0x6e01c0);}(_0xbc2d,0x102));var _0xdbc2=function(_0x47a80b,_0x17c5d3){_0x47a80b=_0x47a80b-0x0;var _0x49056c=_0xbc2d[_0x47a80b];return _0x49056c;};'use strict';var _=require(_0xdbc2('0x0'));var util=require(_0xdbc2('0x1'));var logger=require(_0xdbc2('0x2'))(_0xdbc2('0x3'));var moment=require('moment');var BPromise=require(_0xdbc2('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdbc2('0x5'));var rimraf=require(_0xdbc2('0x6'));var config=require('../../config/environment');var attributes=require(_0xdbc2('0x7'));module['exports']=function(_0x2e02b9,_0x325f8e){return _0x2e02b9[_0xdbc2('0x8')]('VoiceRecording',attributes,{'tableName':'voice_recordings','paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.rpc.js b/server/api/voiceRecording/voiceRecording.rpc.js
index 8ffb1c7..c8650d6 100644
--- a/server/api/voiceRecording/voiceRecording.rpc.js
+++ b/server/api/voiceRecording/voiceRecording.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbbb8=['jayson/promise','client','http','info','request\x20sent','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceRecording,\x20%s,\x20%s','message','result','catch','UpdateVoiceRecording','update','body','options','raw','where','attributes','limit','then','CreateVoiceRecording','Setting','callRecordingEncryption','VoiceRecording','create','existsSync','value','format','%s.cypher','encryptFile','secrets','recording','CreateVoiceRecording\x20file\x20encrypted','debug','lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment'];(function(_0xe8a69a,_0x8fbed){var _0x4536c2=function(_0x40fe25){while(--_0x40fe25){_0xe8a69a['push'](_0xe8a69a['shift']());}};_0x4536c2(++_0x8fbed);}(_0xbbb8,0x151));var _0x8bbb=function(_0x3df0bc,_0x2c9a76){_0x3df0bc=_0x3df0bc-0x0;var _0x310c23=_0xbbb8[_0x3df0bc];return _0x310c23;};'use strict';var _=require(_0x8bbb('0x0'));var util=require(_0x8bbb('0x1'));var moment=require('moment');var BPromise=require(_0x8bbb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8bbb('0x3'));var db=require(_0x8bbb('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x8bbb('0x5'))('rpc');var config=require(_0x8bbb('0x6'));var jayson=require(_0x8bbb('0x7'));var client=jayson[_0x8bbb('0x8')][_0x8bbb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x16155a,_0x53e252,_0x46b2ff){return new BPromise(function(_0x30b4e0,_0x4bdd1e){return client['request'](_0x16155a,_0x46b2ff)['then'](function(_0x5cebf9){logger[_0x8bbb('0xa')]('VoiceRecording,\x20%s,\x20%s',_0x53e252,_0x8bbb('0xb'));logger['debug'](_0x8bbb('0xc'),_0x53e252,_0x8bbb('0xb'),JSON[_0x8bbb('0xd')](_0x5cebf9));if(_0x5cebf9[_0x8bbb('0xe')]){if(_0x5cebf9[_0x8bbb('0xe')][_0x8bbb('0xf')]===0x1f4){logger[_0x8bbb('0xe')](_0x8bbb('0x10'),_0x53e252,_0x5cebf9[_0x8bbb('0xe')]['message']);return _0x4bdd1e(_0x5cebf9['error'][_0x8bbb('0x11')]);}logger[_0x8bbb('0xe')]('VoiceRecording,\x20%s,\x20%s',_0x53e252,_0x5cebf9[_0x8bbb('0xe')][_0x8bbb('0x11')]);return _0x30b4e0(_0x5cebf9[_0x8bbb('0xe')][_0x8bbb('0x11')]);}else{logger['info'](_0x8bbb('0x10'),_0x53e252,_0x8bbb('0xb'));_0x30b4e0(_0x5cebf9[_0x8bbb('0x12')][_0x8bbb('0x11')]);}})[_0x8bbb('0x13')](function(_0x1cbedf){logger[_0x8bbb('0xe')]('VoiceRecording,\x20%s,\x20%s',_0x53e252,_0x1cbedf);_0x4bdd1e(_0x1cbedf);});});}exports[_0x8bbb('0x14')]=function(_0x1f4244){var _0x51b3f8=this;return new Promise(function(_0x3bbc3b,_0x20bdc2){return db['VoiceRecording'][_0x8bbb('0x15')](_0x1f4244[_0x8bbb('0x16')],{'raw':_0x1f4244[_0x8bbb('0x17')]?_0x1f4244[_0x8bbb('0x17')][_0x8bbb('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1f4244['options']?_0x1f4244[_0x8bbb('0x17')][_0x8bbb('0x19')]||null:null,'attributes':_0x1f4244[_0x8bbb('0x17')]?_0x1f4244[_0x8bbb('0x17')][_0x8bbb('0x1a')]||null:null,'limit':_0x1f4244[_0x8bbb('0x17')]?_0x1f4244[_0x8bbb('0x17')][_0x8bbb('0x1b')]||null:null})[_0x8bbb('0x1c')](function(_0xb9a6fe){logger[_0x8bbb('0xa')](_0x8bbb('0x14'),_0x1f4244);logger['debug'](_0x8bbb('0x14'),_0x1f4244,JSON[_0x8bbb('0xd')](_0xb9a6fe));_0x3bbc3b(_0xb9a6fe);})[_0x8bbb('0x13')](function(_0xb8de26){logger['error'](_0x8bbb('0x14'),_0xb8de26[_0x8bbb('0x11')],_0x1f4244);_0x20bdc2(_0x51b3f8[_0x8bbb('0xe')](0x1f4,_0xb8de26['message']));});});};exports[_0x8bbb('0x1d')]=function(_0x5adf32){var _0x10b82f=this;return new Promise(function(_0x507b73,_0x2eef0c){var _0x38f5d4=require('../../components/encryptor');var _0x39aa48;return db[_0x8bbb('0x1e')]['findOne']({'attributes':['id',_0x8bbb('0x1f')],'where':{'id':0x1},'raw':!![]})['then'](function(_0xca23e8){_0x39aa48=_0xca23e8;return db[_0x8bbb('0x20')][_0x8bbb('0x21')](_0x5adf32[_0x8bbb('0x16')]);})[_0x8bbb('0x1c')](function(_0x15988f){if(_0x39aa48[_0x8bbb('0x1f')]&&fs[_0x8bbb('0x22')](_0x15988f[_0x8bbb('0x23')])){var _0x3cdd8a=util[_0x8bbb('0x24')](_0x8bbb('0x25'),_0x15988f[_0x8bbb('0x23')]);return _0x38f5d4[_0x8bbb('0x26')](_0x15988f[_0x8bbb('0x23')],_0x3cdd8a,config[_0x8bbb('0x27')][_0x8bbb('0x28')])['then'](function(){fs['unlink'](_0x15988f[_0x8bbb('0x23')]);logger[_0x8bbb('0xa')](_0x8bbb('0x29'));return _0x15988f;});}return _0x15988f;})[_0x8bbb('0x1c')](function(_0xa1fbe){logger[_0x8bbb('0xa')](_0x8bbb('0x1d'),_0x5adf32);logger[_0x8bbb('0x2a')](_0x8bbb('0x1d'),_0x5adf32,JSON[_0x8bbb('0xd')](_0xa1fbe));_0x507b73(_0xa1fbe);})['catch'](function(_0x58ed35){logger[_0x8bbb('0xe')](_0x8bbb('0x1d'),_0x58ed35[_0x8bbb('0x11')],_0x5adf32);_0x2eef0c(_0x10b82f[_0x8bbb('0xe')](0x1f4,_0x58ed35['message']));});});};
\ No newline at end of file
+var _0x736c=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','VoiceRecording,\x20%s,\x20%s','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','VoiceRecording','body','options','where','attributes','limit','UpdateVoiceRecording','CreateVoiceRecording','../../components/encryptor','Setting','create','callRecordingEncryption','existsSync','value','format','%s.cypher','secrets','recording','unlink','info','CreateVoiceRecording\x20file\x20encrypted','lodash','util','randomstring','ioredis'];(function(_0x263b35,_0x421508){var _0x48168e=function(_0x3bb3a6){while(--_0x3bb3a6){_0x263b35['push'](_0x263b35['shift']());}};_0x48168e(++_0x421508);}(_0x736c,0xf2));var _0xc736=function(_0x4ec612,_0x57dfd6){_0x4ec612=_0x4ec612-0x0;var _0x52a015=_0x736c[_0x4ec612];return _0x52a015;};'use strict';var _=require(_0xc736('0x0'));var util=require(_0xc736('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xc736('0x2'));var fs=require('fs');var Redis=require(_0xc736('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xc736('0x4'));var logger=require(_0xc736('0x5'))(_0xc736('0x6'));var config=require(_0xc736('0x7'));var jayson=require(_0xc736('0x8'));var client=jayson[_0xc736('0x9')][_0xc736('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x20145a,_0x38cf4c,_0x270978){return new BPromise(function(_0x3cb3f1,_0x21e719){return client['request'](_0x20145a,_0x270978)[_0xc736('0xb')](function(_0xb3a63b){logger['info'](_0xc736('0xc'),_0x38cf4c,'request\x20sent');logger[_0xc736('0xd')](_0xc736('0xe'),_0x38cf4c,'request\x20sent',JSON[_0xc736('0xf')](_0xb3a63b));if(_0xb3a63b[_0xc736('0x10')]){if(_0xb3a63b['error']['code']===0x1f4){logger[_0xc736('0x10')]('VoiceRecording,\x20%s,\x20%s',_0x38cf4c,_0xb3a63b[_0xc736('0x10')][_0xc736('0x11')]);return _0x21e719(_0xb3a63b[_0xc736('0x10')]['message']);}logger[_0xc736('0x10')](_0xc736('0xc'),_0x38cf4c,_0xb3a63b[_0xc736('0x10')][_0xc736('0x11')]);return _0x3cb3f1(_0xb3a63b[_0xc736('0x10')][_0xc736('0x11')]);}else{logger['info'](_0xc736('0xc'),_0x38cf4c,'request\x20sent');_0x3cb3f1(_0xb3a63b[_0xc736('0x12')][_0xc736('0x11')]);}})[_0xc736('0x13')](function(_0x548e7a){logger['error'](_0xc736('0xc'),_0x38cf4c,_0x548e7a);_0x21e719(_0x548e7a);});});}exports['UpdateVoiceRecording']=function(_0x289362){var _0x5d3a41=this;return new Promise(function(_0x2fa211,_0x2b3b21){return db[_0xc736('0x14')]['update'](_0x289362[_0xc736('0x15')],{'raw':_0x289362[_0xc736('0x16')]?_0x289362[_0xc736('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x289362[_0xc736('0x16')]?_0x289362[_0xc736('0x16')][_0xc736('0x17')]||null:null,'attributes':_0x289362[_0xc736('0x16')]?_0x289362['options'][_0xc736('0x18')]||null:null,'limit':_0x289362['options']?_0x289362['options'][_0xc736('0x19')]||null:null})['then'](function(_0xd94d){logger['info']('UpdateVoiceRecording',_0x289362);logger['debug'](_0xc736('0x1a'),_0x289362,JSON[_0xc736('0xf')](_0xd94d));_0x2fa211(_0xd94d);})[_0xc736('0x13')](function(_0x4f0c67){logger['error'](_0xc736('0x1a'),_0x4f0c67[_0xc736('0x11')],_0x289362);_0x2b3b21(_0x5d3a41[_0xc736('0x10')](0x1f4,_0x4f0c67[_0xc736('0x11')]));});});};exports[_0xc736('0x1b')]=function(_0x595131){var _0x47702c=this;return new Promise(function(_0x34b655,_0x247c5d){var _0x5788d7=require(_0xc736('0x1c'));var _0x18bf37;return db[_0xc736('0x1d')]['findOne']({'attributes':['id','callRecordingEncryption'],'where':{'id':0x1},'raw':!![]})[_0xc736('0xb')](function(_0x3b4f35){_0x18bf37=_0x3b4f35;return db[_0xc736('0x14')][_0xc736('0x1e')](_0x595131['body']);})[_0xc736('0xb')](function(_0x1e2eef){if(_0x18bf37[_0xc736('0x1f')]&&fs[_0xc736('0x20')](_0x1e2eef[_0xc736('0x21')])){var _0x5787c1=util[_0xc736('0x22')](_0xc736('0x23'),_0x1e2eef[_0xc736('0x21')]);return _0x5788d7['encryptFile'](_0x1e2eef['value'],_0x5787c1,config[_0xc736('0x24')][_0xc736('0x25')])[_0xc736('0xb')](function(){fs[_0xc736('0x26')](_0x1e2eef[_0xc736('0x21')]);logger[_0xc736('0x27')](_0xc736('0x28'));return _0x1e2eef;});}return _0x1e2eef;})[_0xc736('0xb')](function(_0x1ffb1e){logger[_0xc736('0x27')]('CreateVoiceRecording',_0x595131);logger[_0xc736('0xd')]('CreateVoiceRecording',_0x595131,JSON[_0xc736('0xf')](_0x1ffb1e));_0x34b655(_0x1ffb1e);})[_0xc736('0x13')](function(_0x129e4a){logger[_0xc736('0x10')](_0xc736('0x1b'),_0x129e4a[_0xc736('0x11')],_0x595131);_0x247c5d(_0x47702c[_0xc736('0x10')](0x1f4,_0x129e4a['message']));});});};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/index.js b/server/api/voiceTransferReport/index.js
index a6babd6..dfd0674 100644
--- a/server/api/voiceTransferReport/index.js
+++ b/server/api/voiceTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf44e=['post','create','put','delete','destroy','exports','multer','util','path','express','Router','../../components/interaction/service','./voiceTransferReport.controller','get','isAuthenticated','index','/:id'];(function(_0xd63e3a,_0x1bd6eb){var _0x19c178=function(_0x56be0d){while(--_0x56be0d){_0xd63e3a['push'](_0xd63e3a['shift']());}};_0x19c178(++_0x1bd6eb);}(_0xf44e,0x1af));var _0xef44=function(_0x27e64b,_0x5e5450){_0x27e64b=_0x27e64b-0x0;var _0x513be1=_0xf44e[_0x27e64b];return _0x513be1;};'use strict';var multer=require(_0xef44('0x0'));var util=require(_0xef44('0x1'));var path=require(_0xef44('0x2'));var timeout=require('connect-timeout');var express=require(_0xef44('0x3'));var router=express[_0xef44('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xef44('0x5'));var config=require('../../config/environment');var controller=require(_0xef44('0x6'));router[_0xef44('0x7')]('/',auth[_0xef44('0x8')](),controller[_0xef44('0x9')]);router[_0xef44('0x7')](_0xef44('0xa'),auth[_0xef44('0x8')](),controller['show']);router[_0xef44('0xb')]('/',auth['isAuthenticated'](),controller[_0xef44('0xc')]);router[_0xef44('0xd')](_0xef44('0xa'),auth[_0xef44('0x8')](),controller['update']);router[_0xef44('0xe')](_0xef44('0xa'),auth[_0xef44('0x8')](),controller[_0xef44('0xf')]);module[_0xef44('0x10')]=router;
\ No newline at end of file
+var _0xdbb1=['create','put','update','delete','destroy','exports','connect-timeout','express','../../components/auth/service','../../config/environment','./voiceTransferReport.controller','get','/:id','show','post','isAuthenticated'];(function(_0x4a9771,_0x52429b){var _0x52e0ed=function(_0x5485c0){while(--_0x5485c0){_0x4a9771['push'](_0x4a9771['shift']());}};_0x52e0ed(++_0x52429b);}(_0xdbb1,0xa6));var _0x1dbb=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0xdbb1[_0x3ff085];return _0x2b68c3;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x1dbb('0x0'));var express=require(_0x1dbb('0x1'));var router=express['Router']();var auth=require(_0x1dbb('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x1dbb('0x3'));var controller=require(_0x1dbb('0x4'));router[_0x1dbb('0x5')]('/',auth['isAuthenticated'](),controller['index']);router[_0x1dbb('0x5')](_0x1dbb('0x6'),auth['isAuthenticated'](),controller[_0x1dbb('0x7')]);router[_0x1dbb('0x8')]('/',auth[_0x1dbb('0x9')](),controller[_0x1dbb('0xa')]);router[_0x1dbb('0xb')](_0x1dbb('0x6'),auth[_0x1dbb('0x9')](),controller[_0x1dbb('0xc')]);router[_0x1dbb('0xd')](_0x1dbb('0x6'),auth[_0x1dbb('0x9')](),controller[_0x1dbb('0xe')]);module[_0x1dbb('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.attributes.js b/server/api/voiceTransferReport/voiceTransferReport.attributes.js
index b5a2164..ae01fd7 100644
--- a/server/api/voiceTransferReport/voiceTransferReport.attributes.js
+++ b/server/api/voiceTransferReport/voiceTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc8c0=['Yes','sequelize','moment','exports','ENUM','attended','STRING'];(function(_0x5729f3,_0x4d9edb){var _0x58f897=function(_0x15b57f){while(--_0x15b57f){_0x5729f3['push'](_0x5729f3['shift']());}};_0x58f897(++_0x4d9edb);}(_0xc8c0,0x158));var _0x0c8c=function(_0x1e2cd4,_0x133172){_0x1e2cd4=_0x1e2cd4-0x0;var _0x2c903d=_0xc8c0[_0x1e2cd4];return _0x2c903d;};'use strict';var Sequelize=require(_0x0c8c('0x0'));var moment=require(_0x0c8c('0x1'));module[_0x0c8c('0x2')]={'type':{'type':Sequelize[_0x0c8c('0x3')]('blind',_0x0c8c('0x4'))},'result':{'type':Sequelize[_0x0c8c('0x5')]},'transfererchannel':{'type':Sequelize['STRING']},'transferercalleridnum':{'type':Sequelize[_0x0c8c('0x5')]},'transferercalleridname':{'type':Sequelize[_0x0c8c('0x5')]},'transfererconnectedlinenum':{'type':Sequelize['STRING']},'transfererconnectedlinename':{'type':Sequelize['STRING']},'transfereraccountcode':{'type':Sequelize[_0x0c8c('0x5')]},'transferercontext':{'type':Sequelize[_0x0c8c('0x5')]},'transfererexten':{'type':Sequelize['STRING']},'transfererlinkedid':{'type':Sequelize[_0x0c8c('0x5')]},'transfereechannel':{'type':Sequelize[_0x0c8c('0x5')]},'transfereecalleridnum':{'type':Sequelize[_0x0c8c('0x5')]},'transfereecalleridname':{'type':Sequelize[_0x0c8c('0x5')]},'transfereeconnectedlinenum':{'type':Sequelize['STRING']},'transfereeconnectedlinename':{'type':Sequelize[_0x0c8c('0x5')]},'transfereeaccountcode':{'type':Sequelize[_0x0c8c('0x5')]},'transfereecontext':{'type':Sequelize[_0x0c8c('0x5')]},'transfereeexten':{'type':Sequelize[_0x0c8c('0x5')]},'transfereelinkedid':{'type':Sequelize[_0x0c8c('0x5')]},'isexternal':{'type':Sequelize[_0x0c8c('0x3')](_0x0c8c('0x6'),'No')},'context':{'type':Sequelize[_0x0c8c('0x5')]},'extension':{'type':Sequelize[_0x0c8c('0x5')]}};
\ No newline at end of file
+var _0xf6cb=['STRING','sequelize','moment','exports','ENUM','blind'];(function(_0x3f0f1c,_0x5ae9a8){var _0x32f582=function(_0x54b8bc){while(--_0x54b8bc){_0x3f0f1c['push'](_0x3f0f1c['shift']());}};_0x32f582(++_0x5ae9a8);}(_0xf6cb,0x91));var _0xbf6c=function(_0x35518c,_0x1d4aab){_0x35518c=_0x35518c-0x0;var _0x3ed7e1=_0xf6cb[_0x35518c];return _0x3ed7e1;};'use strict';var Sequelize=require(_0xbf6c('0x0'));var moment=require(_0xbf6c('0x1'));module[_0xbf6c('0x2')]={'type':{'type':Sequelize[_0xbf6c('0x3')](_0xbf6c('0x4'),'attended')},'result':{'type':Sequelize[_0xbf6c('0x5')]},'transfererchannel':{'type':Sequelize[_0xbf6c('0x5')]},'transferercalleridnum':{'type':Sequelize['STRING']},'transferercalleridname':{'type':Sequelize[_0xbf6c('0x5')]},'transfererconnectedlinenum':{'type':Sequelize[_0xbf6c('0x5')]},'transfererconnectedlinename':{'type':Sequelize[_0xbf6c('0x5')]},'transfereraccountcode':{'type':Sequelize[_0xbf6c('0x5')]},'transferercontext':{'type':Sequelize[_0xbf6c('0x5')]},'transfererexten':{'type':Sequelize['STRING']},'transfererlinkedid':{'type':Sequelize[_0xbf6c('0x5')]},'transfereechannel':{'type':Sequelize[_0xbf6c('0x5')]},'transfereecalleridnum':{'type':Sequelize['STRING']},'transfereecalleridname':{'type':Sequelize[_0xbf6c('0x5')]},'transfereeconnectedlinenum':{'type':Sequelize['STRING']},'transfereeconnectedlinename':{'type':Sequelize[_0xbf6c('0x5')]},'transfereeaccountcode':{'type':Sequelize[_0xbf6c('0x5')]},'transfereecontext':{'type':Sequelize['STRING']},'transfereeexten':{'type':Sequelize['STRING']},'transfereelinkedid':{'type':Sequelize['STRING']},'isexternal':{'type':Sequelize['ENUM']('Yes','No')},'context':{'type':Sequelize[_0xbf6c('0x5')]},'extension':{'type':Sequelize[_0xbf6c('0x5')]}};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.controller.js b/server/api/voiceTransferReport/voiceTransferReport.controller.js
index 9dc51f1..a962d6a 100644
--- a/server/api/voiceTransferReport/voiceTransferReport.controller.js
+++ b/server/api/voiceTransferReport/voiceTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc7bd=['lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','destroy','then','sendStatus','error','stack','name','send','index','VoiceTransferReport','rawAttributes','keys','query','filters','model','attributes','intersection','fields','length','hasOwnProperty','order','sort','filter','where','merge','map','type','key','field','includeAll','include','findAll','catch','show','params','options','find','body','update','eml-format','rimraf','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0xc7bd,0x86));var _0xdc7b=function(_0x1161f7,_0x9d0eb6){_0x1161f7=_0x1161f7-0x0;var _0x597749=_0xc7bd[_0x1161f7];return _0x597749;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xdc7b('0x0'));var rimraf=require(_0xdc7b('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xdc7b('0x2'));var rp=require('request-promise');var moment=require(_0xdc7b('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xdc7b('0x4'));var util=require(_0xdc7b('0x5'));var path=require(_0xdc7b('0x6'));var sox=require(_0xdc7b('0x7'));var csv=require(_0xdc7b('0x8'));var ejs=require(_0xdc7b('0x9'));var fs=require('fs');var _=require(_0xdc7b('0xa'));var squel=require('squel');var crypto=require(_0xdc7b('0xb'));var jsforce=require(_0xdc7b('0xc'));var deskjs=require(_0xdc7b('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xdc7b('0xe'));var Redis=require(_0xdc7b('0xf'));var authService=require(_0xdc7b('0x10'));var qs=require(_0xdc7b('0x11'));var hardwareService=require(_0xdc7b('0x12'));var logger=require(_0xdc7b('0x13'))('api');var utils=require(_0xdc7b('0x14'));var config=require(_0xdc7b('0x15'));var db=require(_0xdc7b('0x16'))['db'];function respondWithStatusCode(_0x148801,_0x2071ff){_0x2071ff=_0x2071ff||0xcc;return function(_0x159e5a){if(_0x159e5a){return _0x148801['sendStatus'](_0x2071ff);}return _0x148801[_0xdc7b('0x17')](_0x2071ff)[_0xdc7b('0x18')]();};}function respondWithResult(_0x570325,_0x3ea038){_0x3ea038=_0x3ea038||0xc8;return function(_0x5eb8d9){if(_0x5eb8d9){return _0x570325[_0xdc7b('0x17')](_0x3ea038)[_0xdc7b('0x19')](_0x5eb8d9);}};}function respondWithFilteredResult(_0x22e150,_0x355090){return function(_0x5afa1e){if(_0x5afa1e){var _0x152ec8=_0x5afa1e[_0xdc7b('0x1a')],_0x2088f1=_0x355090[_0xdc7b('0x1b')],_0x5e0281=_0x355090[_0xdc7b('0x1b')]+_0x355090[_0xdc7b('0x1c')],_0x35c671;if(_0x5e0281>=_0x152ec8){_0x5e0281=_0x152ec8;_0x35c671=0xc8;}else{_0x35c671=0xce;}_0x22e150[_0xdc7b('0x17')](_0x35c671);return _0x22e150[_0xdc7b('0x1d')](_0xdc7b('0x1e'),_0x2088f1+'-'+_0x5e0281+'/'+_0x152ec8)['json'](_0x5afa1e);}return null;};}function patchUpdates(_0x427a74){return function(_0x54a99b){try{jsonpatch[_0xdc7b('0x1f')](_0x54a99b,_0x427a74,!![]);}catch(_0x5bcc30){return BPromise[_0xdc7b('0x20')](_0x5bcc30);}return _0x54a99b[_0xdc7b('0x21')]();};}function saveUpdates(_0x3e8420,_0x372728){return function(_0x1f516d){if(_0x1f516d){return _0x1f516d['update'](_0x3e8420)['then'](function(_0x500458){return _0x500458;});}return null;};}function removeEntity(_0x3e6972,_0x2b3723){return function(_0x4c3231){if(_0x4c3231){return _0x4c3231[_0xdc7b('0x22')]()[_0xdc7b('0x23')](function(){_0x3e6972[_0xdc7b('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3c1783,_0x4c6d14){return function(_0x3b3d3d){if(!_0x3b3d3d){_0x3c1783[_0xdc7b('0x24')](0x194);}return _0x3b3d3d;};}function handleError(_0x213d0c,_0x46255c){_0x46255c=_0x46255c||0x1f4;return function(_0x1ce512){logger[_0xdc7b('0x25')](_0x1ce512[_0xdc7b('0x26')]);if(_0x1ce512[_0xdc7b('0x27')]){delete _0x1ce512[_0xdc7b('0x27')];}_0x213d0c['status'](_0x46255c)[_0xdc7b('0x28')](_0x1ce512);};}exports[_0xdc7b('0x29')]=function(_0x21d40b,_0x169dd7){var _0x52b346={},_0x30b37d={},_0x5be3e4={'count':0x0,'rows':[]};var _0x4525d4=db[_0xdc7b('0x2a')][_0xdc7b('0x2b')];_0x30b37d['model']=_[_0xdc7b('0x2c')](_0x4525d4);_0x30b37d[_0xdc7b('0x2d')]=_[_0xdc7b('0x2c')](_0x21d40b[_0xdc7b('0x2d')]);_0x30b37d[_0xdc7b('0x2e')]=_['intersection'](_0x30b37d[_0xdc7b('0x2f')],_0x30b37d[_0xdc7b('0x2d')]);_0x52b346[_0xdc7b('0x30')]=_[_0xdc7b('0x31')](_0x30b37d['model'],qs[_0xdc7b('0x32')](_0x21d40b[_0xdc7b('0x2d')][_0xdc7b('0x32')]));_0x52b346[_0xdc7b('0x30')]=_0x52b346['attributes'][_0xdc7b('0x33')]?_0x52b346[_0xdc7b('0x30')]:_0x30b37d[_0xdc7b('0x2f')];if(!_0x21d40b[_0xdc7b('0x2d')][_0xdc7b('0x34')]('nolimit')){_0x52b346[_0xdc7b('0x1c')]=qs['limit'](_0x21d40b[_0xdc7b('0x2d')][_0xdc7b('0x1c')]);_0x52b346[_0xdc7b('0x1b')]=qs['offset'](_0x21d40b[_0xdc7b('0x2d')][_0xdc7b('0x1b')]);}_0x52b346[_0xdc7b('0x35')]=qs['sort'](_0x21d40b[_0xdc7b('0x2d')][_0xdc7b('0x36')]);_0x52b346['where']=qs[_0xdc7b('0x2e')](_['pick'](_0x21d40b[_0xdc7b('0x2d')],_0x30b37d[_0xdc7b('0x2e')]));if(_0x21d40b['query'][_0xdc7b('0x37')]){_0x52b346[_0xdc7b('0x38')]=_[_0xdc7b('0x39')](_0x52b346[_0xdc7b('0x38')],{'$or':_[_0xdc7b('0x3a')](_0x4525d4,function(_0x1fc5f6){if(_0x1fc5f6[_0xdc7b('0x3b')][_0xdc7b('0x3c')]!=='VIRTUAL'){var _0x44bb35={};_0x44bb35[_0x1fc5f6[_0xdc7b('0x3d')]]={'$like':'%'+_0x21d40b[_0xdc7b('0x2d')]['filter']+'%'};return _0x44bb35;}})});}_0x52b346=_['merge']({},_0x52b346,_0x21d40b['options']);var _0x36c272={'where':_0x52b346[_0xdc7b('0x38')]};return db[_0xdc7b('0x2a')][_0xdc7b('0x1a')](_0x36c272)[_0xdc7b('0x23')](function(_0x41cafc){_0x5be3e4[_0xdc7b('0x1a')]=_0x41cafc;if(_0x21d40b[_0xdc7b('0x2d')][_0xdc7b('0x3e')]){_0x52b346[_0xdc7b('0x3f')]=[{'all':!![]}];}return db['VoiceTransferReport'][_0xdc7b('0x40')](_0x52b346);})[_0xdc7b('0x23')](function(_0x49edcd){_0x5be3e4['rows']=_0x49edcd;return _0x5be3e4;})[_0xdc7b('0x23')](respondWithFilteredResult(_0x169dd7,_0x52b346))[_0xdc7b('0x41')](handleError(_0x169dd7,null));};exports[_0xdc7b('0x42')]=function(_0xeb2479,_0x450173){var _0x265df8={'raw':!![],'where':{'id':_0xeb2479[_0xdc7b('0x43')]['id']}},_0x2ec40e={};_0x2ec40e[_0xdc7b('0x2f')]=_[_0xdc7b('0x2c')](db['VoiceTransferReport'][_0xdc7b('0x2b')]);_0x2ec40e[_0xdc7b('0x2d')]=_[_0xdc7b('0x2c')](_0xeb2479['query']);_0x2ec40e[_0xdc7b('0x2e')]=_[_0xdc7b('0x31')](_0x2ec40e[_0xdc7b('0x2f')],_0x2ec40e[_0xdc7b('0x2d')]);_0x265df8[_0xdc7b('0x30')]=_[_0xdc7b('0x31')](_0x2ec40e[_0xdc7b('0x2f')],qs[_0xdc7b('0x32')](_0xeb2479[_0xdc7b('0x2d')][_0xdc7b('0x32')]));_0x265df8['attributes']=_0x265df8[_0xdc7b('0x30')][_0xdc7b('0x33')]?_0x265df8[_0xdc7b('0x30')]:_0x2ec40e[_0xdc7b('0x2f')];if(_0xeb2479[_0xdc7b('0x2d')]['includeAll']){_0x265df8[_0xdc7b('0x3f')]=[{'all':!![]}];}_0x265df8=_[_0xdc7b('0x39')]({},_0x265df8,_0xeb2479[_0xdc7b('0x44')]);return db['VoiceTransferReport'][_0xdc7b('0x45')](_0x265df8)[_0xdc7b('0x23')](handleEntityNotFound(_0x450173,null))[_0xdc7b('0x23')](respondWithResult(_0x450173,null))[_0xdc7b('0x41')](handleError(_0x450173,null));};exports['create']=function(_0x5c5c42,_0x2e3c76){return db['VoiceTransferReport']['create'](_0x5c5c42[_0xdc7b('0x46')],{})[_0xdc7b('0x23')](respondWithResult(_0x2e3c76,0xc9))[_0xdc7b('0x41')](handleError(_0x2e3c76,null));};exports[_0xdc7b('0x47')]=function(_0x3338f2,_0x34ec46){if(_0x3338f2['body']['id']){delete _0x3338f2['body']['id'];}return db[_0xdc7b('0x2a')][_0xdc7b('0x45')]({'where':{'id':_0x3338f2[_0xdc7b('0x43')]['id']}})[_0xdc7b('0x23')](handleEntityNotFound(_0x34ec46,null))[_0xdc7b('0x23')](saveUpdates(_0x3338f2[_0xdc7b('0x46')],null))[_0xdc7b('0x23')](respondWithResult(_0x34ec46,null))[_0xdc7b('0x41')](handleError(_0x34ec46,null));};exports[_0xdc7b('0x22')]=function(_0x22a2fa,_0x3a5785){return db['VoiceTransferReport'][_0xdc7b('0x45')]({'where':{'id':_0x22a2fa[_0xdc7b('0x43')]['id']}})['then'](handleEntityNotFound(_0x3a5785,null))['then'](removeEntity(_0x3a5785,null))[_0xdc7b('0x41')](handleError(_0x3a5785,null));};
\ No newline at end of file
+var _0x4975=['jsforce','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','model','keys','query','filters','attributes','intersection','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','type','key','field','merge','options','VoiceTransferReport','includeAll','include','rows','catch','show','params','rawAttributes','fields','create','body','find','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x4975,0x86));var _0x5497=function(_0x2cd064,_0x2bb4af){_0x2cd064=_0x2cd064-0x0;var _0xf7a850=_0x4975[_0x2cd064];return _0xf7a850;};'use strict';var pdf=require(_0x5497('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x5497('0x1'));var zipdir=require(_0x5497('0x2'));var jsonpatch=require(_0x5497('0x3'));var rp=require(_0x5497('0x4'));var moment=require(_0x5497('0x5'));var BPromise=require(_0x5497('0x6'));var Mustache=require(_0x5497('0x7'));var util=require(_0x5497('0x8'));var path=require(_0x5497('0x9'));var sox=require(_0x5497('0xa'));var csv=require('to-csv');var ejs=require(_0x5497('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x5497('0xc'));var crypto=require(_0x5497('0xd'));var jsforce=require(_0x5497('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5497('0xf'));var querystring=require('querystring');var Papa=require(_0x5497('0x10'));var Redis=require(_0x5497('0x11'));var authService=require(_0x5497('0x12'));var qs=require(_0x5497('0x13'));var hardwareService=require(_0x5497('0x14'));var logger=require(_0x5497('0x15'))(_0x5497('0x16'));var utils=require(_0x5497('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5b1162,_0xc250bb){_0xc250bb=_0xc250bb||0xcc;return function(_0x1b23df){if(_0x1b23df){return _0x5b1162[_0x5497('0x18')](_0xc250bb);}return _0x5b1162[_0x5497('0x19')](_0xc250bb)[_0x5497('0x1a')]();};}function respondWithResult(_0x365144,_0x1f7169){_0x1f7169=_0x1f7169||0xc8;return function(_0xaca97d){if(_0xaca97d){return _0x365144[_0x5497('0x19')](_0x1f7169)[_0x5497('0x1b')](_0xaca97d);}};}function respondWithFilteredResult(_0x55f590,_0x11b0a9){return function(_0x4fb8e9){if(_0x4fb8e9){var _0x4237a9=_0x4fb8e9[_0x5497('0x1c')],_0x2bfd8a=_0x11b0a9[_0x5497('0x1d')],_0x19e5f3=_0x11b0a9[_0x5497('0x1d')]+_0x11b0a9['limit'],_0x3ce50b;if(_0x19e5f3>=_0x4237a9){_0x19e5f3=_0x4237a9;_0x3ce50b=0xc8;}else{_0x3ce50b=0xce;}_0x55f590['status'](_0x3ce50b);return _0x55f590[_0x5497('0x1e')](_0x5497('0x1f'),_0x2bfd8a+'-'+_0x19e5f3+'/'+_0x4237a9)[_0x5497('0x1b')](_0x4fb8e9);}return null;};}function patchUpdates(_0x5d9e24){return function(_0xbf1ba7){try{jsonpatch[_0x5497('0x20')](_0xbf1ba7,_0x5d9e24,!![]);}catch(_0x18e8a8){return BPromise[_0x5497('0x21')](_0x18e8a8);}return _0xbf1ba7[_0x5497('0x22')]();};}function saveUpdates(_0x1f6f18,_0x16d378){return function(_0x10226f){if(_0x10226f){return _0x10226f[_0x5497('0x23')](_0x1f6f18)[_0x5497('0x24')](function(_0x186065){return _0x186065;});}return null;};}function removeEntity(_0x52c049,_0x720767){return function(_0x4d1b27){if(_0x4d1b27){return _0x4d1b27[_0x5497('0x25')]()[_0x5497('0x24')](function(){_0x52c049[_0x5497('0x19')](0xcc)[_0x5497('0x1a')]();});}};}function handleEntityNotFound(_0x35ecd9,_0x3b2fbc){return function(_0x5018fa){if(!_0x5018fa){_0x35ecd9['sendStatus'](0x194);}return _0x5018fa;};}function handleError(_0x1eefce,_0x34b97f){_0x34b97f=_0x34b97f||0x1f4;return function(_0x24482a){logger[_0x5497('0x26')](_0x24482a['stack']);if(_0x24482a[_0x5497('0x27')]){delete _0x24482a['name'];}_0x1eefce[_0x5497('0x19')](_0x34b97f)[_0x5497('0x28')](_0x24482a);};}exports[_0x5497('0x29')]=function(_0x34a1a5,_0x163a30){var _0x31cd01={},_0x48b835={},_0x4af5f4={'count':0x0,'rows':[]};var _0x5406e2=db['VoiceTransferReport']['rawAttributes'];_0x48b835[_0x5497('0x2a')]=_['keys'](_0x5406e2);_0x48b835['query']=_[_0x5497('0x2b')](_0x34a1a5[_0x5497('0x2c')]);_0x48b835[_0x5497('0x2d')]=_['intersection'](_0x48b835['model'],_0x48b835['query']);_0x31cd01[_0x5497('0x2e')]=_[_0x5497('0x2f')](_0x48b835[_0x5497('0x2a')],qs['fields'](_0x34a1a5['query']['fields']));_0x31cd01[_0x5497('0x2e')]=_0x31cd01['attributes'][_0x5497('0x30')]?_0x31cd01[_0x5497('0x2e')]:_0x48b835[_0x5497('0x2a')];if(!_0x34a1a5['query'][_0x5497('0x31')](_0x5497('0x32'))){_0x31cd01['limit']=qs[_0x5497('0x33')](_0x34a1a5[_0x5497('0x2c')][_0x5497('0x33')]);_0x31cd01['offset']=qs[_0x5497('0x1d')](_0x34a1a5[_0x5497('0x2c')][_0x5497('0x1d')]);}_0x31cd01[_0x5497('0x34')]=qs[_0x5497('0x35')](_0x34a1a5['query'][_0x5497('0x35')]);_0x31cd01[_0x5497('0x36')]=qs['filters'](_[_0x5497('0x37')](_0x34a1a5[_0x5497('0x2c')],_0x48b835[_0x5497('0x2d')]));if(_0x34a1a5[_0x5497('0x2c')][_0x5497('0x38')]){_0x31cd01[_0x5497('0x36')]=_['merge'](_0x31cd01[_0x5497('0x36')],{'$or':_['map'](_0x5406e2,function(_0x7880e4){if(_0x7880e4[_0x5497('0x39')][_0x5497('0x3a')]!=='VIRTUAL'){var _0x4ec5f7={};_0x4ec5f7[_0x7880e4[_0x5497('0x3b')]]={'$like':'%'+_0x34a1a5[_0x5497('0x2c')][_0x5497('0x38')]+'%'};return _0x4ec5f7;}})});}_0x31cd01=_[_0x5497('0x3c')]({},_0x31cd01,_0x34a1a5[_0x5497('0x3d')]);var _0xc8a689={'where':_0x31cd01['where']};return db[_0x5497('0x3e')][_0x5497('0x1c')](_0xc8a689)[_0x5497('0x24')](function(_0x2bd07a){_0x4af5f4[_0x5497('0x1c')]=_0x2bd07a;if(_0x34a1a5[_0x5497('0x2c')][_0x5497('0x3f')]){_0x31cd01[_0x5497('0x40')]=[{'all':!![]}];}return db[_0x5497('0x3e')]['findAll'](_0x31cd01);})[_0x5497('0x24')](function(_0x32fa2b){_0x4af5f4[_0x5497('0x41')]=_0x32fa2b;return _0x4af5f4;})[_0x5497('0x24')](respondWithFilteredResult(_0x163a30,_0x31cd01))[_0x5497('0x42')](handleError(_0x163a30,null));};exports[_0x5497('0x43')]=function(_0x4299be,_0x59ed13){var _0x3e5f7d={'raw':!![],'where':{'id':_0x4299be[_0x5497('0x44')]['id']}},_0x95d7d6={};_0x95d7d6[_0x5497('0x2a')]=_[_0x5497('0x2b')](db[_0x5497('0x3e')][_0x5497('0x45')]);_0x95d7d6['query']=_[_0x5497('0x2b')](_0x4299be[_0x5497('0x2c')]);_0x95d7d6[_0x5497('0x2d')]=_[_0x5497('0x2f')](_0x95d7d6[_0x5497('0x2a')],_0x95d7d6[_0x5497('0x2c')]);_0x3e5f7d[_0x5497('0x2e')]=_[_0x5497('0x2f')](_0x95d7d6[_0x5497('0x2a')],qs[_0x5497('0x46')](_0x4299be['query'][_0x5497('0x46')]));_0x3e5f7d['attributes']=_0x3e5f7d[_0x5497('0x2e')][_0x5497('0x30')]?_0x3e5f7d[_0x5497('0x2e')]:_0x95d7d6[_0x5497('0x2a')];if(_0x4299be[_0x5497('0x2c')]['includeAll']){_0x3e5f7d[_0x5497('0x40')]=[{'all':!![]}];}_0x3e5f7d=_[_0x5497('0x3c')]({},_0x3e5f7d,_0x4299be['options']);return db[_0x5497('0x3e')]['find'](_0x3e5f7d)[_0x5497('0x24')](handleEntityNotFound(_0x59ed13,null))['then'](respondWithResult(_0x59ed13,null))[_0x5497('0x42')](handleError(_0x59ed13,null));};exports[_0x5497('0x47')]=function(_0x2e8c6a,_0x3a852a){return db[_0x5497('0x3e')]['create'](_0x2e8c6a['body'],{})['then'](respondWithResult(_0x3a852a,0xc9))['catch'](handleError(_0x3a852a,null));};exports[_0x5497('0x23')]=function(_0x43c430,_0x417f31){if(_0x43c430[_0x5497('0x48')]['id']){delete _0x43c430[_0x5497('0x48')]['id'];}return db[_0x5497('0x3e')][_0x5497('0x49')]({'where':{'id':_0x43c430[_0x5497('0x44')]['id']}})[_0x5497('0x24')](handleEntityNotFound(_0x417f31,null))['then'](saveUpdates(_0x43c430[_0x5497('0x48')],null))[_0x5497('0x24')](respondWithResult(_0x417f31,null))[_0x5497('0x42')](handleError(_0x417f31,null));};exports['destroy']=function(_0x3e4da2,_0x530475){return db[_0x5497('0x3e')][_0x5497('0x49')]({'where':{'id':_0x3e4da2[_0x5497('0x44')]['id']}})['then'](handleEntityNotFound(_0x530475,null))[_0x5497('0x24')](removeEntity(_0x530475,null))[_0x5497('0x42')](handleError(_0x530475,null));};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.model.js b/server/api/voiceTransferReport/voiceTransferReport.model.js
index a325b05..53c706f 100644
--- a/server/api/voiceTransferReport/voiceTransferReport.model.js
+++ b/server/api/voiceTransferReport/voiceTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3692=['../../config/logger','moment','bluebird','../../config/environment','exports','define','lodash','util'];(function(_0x2ef8c1,_0x2f72f4){var _0x288305=function(_0x56244b){while(--_0x56244b){_0x2ef8c1['push'](_0x2ef8c1['shift']());}};_0x288305(++_0x2f72f4);}(_0x3692,0xee));var _0x2369=function(_0x5562fe,_0x4e809c){_0x5562fe=_0x5562fe-0x0;var _0x1829c7=_0x3692[_0x5562fe];return _0x1829c7;};'use strict';var _=require(_0x2369('0x0'));var util=require(_0x2369('0x1'));var logger=require(_0x2369('0x2'))('api');var moment=require(_0x2369('0x3'));var BPromise=require(_0x2369('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x2369('0x5'));var attributes=require('./voiceTransferReport.attributes');module[_0x2369('0x6')]=function(_0x37c41e,_0x2185d5){return _0x37c41e[_0x2369('0x7')]('VoiceTransferReport',attributes,{'tableName':'report_call_transfer','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7b2a=['report_call_transfer','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./voiceTransferReport.attributes','exports','define'];(function(_0x16eb92,_0x4d9fc7){var _0x448689=function(_0x2038dd){while(--_0x2038dd){_0x16eb92['push'](_0x16eb92['shift']());}};_0x448689(++_0x4d9fc7);}(_0x7b2a,0x1c8));var _0xa7b2=function(_0x4aded0,_0x5bbb35){_0x4aded0=_0x4aded0-0x0;var _0x27538c=_0x7b2a[_0x4aded0];return _0x27538c;};'use strict';var _=require(_0xa7b2('0x0'));var util=require(_0xa7b2('0x1'));var logger=require(_0xa7b2('0x2'))(_0xa7b2('0x3'));var moment=require(_0xa7b2('0x4'));var BPromise=require(_0xa7b2('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa7b2('0x6'));var rimraf=require(_0xa7b2('0x7'));var config=require(_0xa7b2('0x8'));var attributes=require(_0xa7b2('0x9'));module[_0xa7b2('0xa')]=function(_0x544249,_0x3916dd){return _0x544249[_0xa7b2('0xb')]('VoiceTransferReport',attributes,{'tableName':_0xa7b2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.rpc.js b/server/api/voiceTransferReport/voiceTransferReport.rpc.js
index f3daec0..9dd0685 100644
--- a/server/api/voiceTransferReport/voiceTransferReport.rpc.js
+++ b/server/api/voiceTransferReport/voiceTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1302=['lodash','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateVoiceTransferReport','VoiceTransferReport','body','options','raw','stringify'];(function(_0x55c968,_0x3db12f){var _0x1cd172=function(_0x20da4c){while(--_0x20da4c){_0x55c968['push'](_0x55c968['shift']());}};_0x1cd172(++_0x3db12f);}(_0x1302,0x1ee));var _0x2130=function(_0x3f539d,_0x56a1a5){_0x3f539d=_0x3f539d-0x0;var _0x32f5e5=_0x1302[_0x3f539d];return _0x32f5e5;};'use strict';var _=require(_0x2130('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2130('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x2130('0x2'));var logger=require(_0x2130('0x3'))(_0x2130('0x4'));var config=require(_0x2130('0x5'));var jayson=require(_0x2130('0x6'));var client=jayson[_0x2130('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x433f39,_0x5bf381,_0xca2f08){return new BPromise(function(_0x279e2f,_0x242669){return client[_0x2130('0x8')](_0x433f39,_0xca2f08)[_0x2130('0x9')](function(_0x113edc){logger[_0x2130('0xa')](_0x2130('0xb'),_0x5bf381,_0x2130('0xc'));logger[_0x2130('0xd')](_0x2130('0xe'),_0x5bf381,_0x2130('0xc'),JSON['stringify'](_0x113edc));if(_0x113edc[_0x2130('0xf')]){if(_0x113edc[_0x2130('0xf')][_0x2130('0x10')]===0x1f4){logger['error']('VoiceTransferReport,\x20%s,\x20%s',_0x5bf381,_0x113edc[_0x2130('0xf')][_0x2130('0x11')]);return _0x242669(_0x113edc[_0x2130('0xf')]['message']);}logger['error'](_0x2130('0xb'),_0x5bf381,_0x113edc['error'][_0x2130('0x11')]);return _0x279e2f(_0x113edc['error'][_0x2130('0x11')]);}else{logger['info'](_0x2130('0xb'),_0x5bf381,_0x2130('0xc'));_0x279e2f(_0x113edc[_0x2130('0x12')][_0x2130('0x11')]);}})[_0x2130('0x13')](function(_0x27dca5){logger[_0x2130('0xf')]('VoiceTransferReport,\x20%s,\x20%s',_0x5bf381,_0x27dca5);_0x242669(_0x27dca5);});});}exports[_0x2130('0x14')]=function(_0x3efd86){var _0x326f71=this;return new Promise(function(_0xdc9fdd,_0x2b3f4e){return db[_0x2130('0x15')]['create'](_0x3efd86[_0x2130('0x16')],{'raw':_0x3efd86[_0x2130('0x17')]?_0x3efd86[_0x2130('0x17')][_0x2130('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x3d09be){logger[_0x2130('0xa')]('CreateVoiceTransferReport',_0x3efd86);logger[_0x2130('0xd')](_0x2130('0x14'),_0x3efd86,JSON[_0x2130('0x19')](_0x3d09be));_0xdc9fdd(_0x3d09be);})[_0x2130('0x13')](function(_0x4c8160){logger[_0x2130('0xf')](_0x2130('0x14'),_0x4c8160[_0x2130('0x11')],_0x3efd86);_0x2b3f4e(_0x326f71['error'](0x1f4,_0x4c8160[_0x2130('0x11')]));});});};
\ No newline at end of file
+var _0x28af=['http','request','then','VoiceTransferReport,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','catch','CreateVoiceTransferReport','VoiceTransferReport','body','options','raw','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client'];(function(_0x54c191,_0x4a04ef){var _0x40ee4a=function(_0x200a79){while(--_0x200a79){_0x54c191['push'](_0x54c191['shift']());}};_0x40ee4a(++_0x4a04ef);}(_0x28af,0x7e));var _0xf28a=function(_0x999b85,_0x1edc2b){_0x999b85=_0x999b85-0x0;var _0x1d7124=_0x28af[_0x999b85];return _0x1d7124;};'use strict';var _=require(_0xf28a('0x0'));var util=require(_0xf28a('0x1'));var moment=require('moment');var BPromise=require(_0xf28a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf28a('0x3'));var db=require(_0xf28a('0x4'))['db'];var utils=require(_0xf28a('0x5'));var logger=require(_0xf28a('0x6'))(_0xf28a('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf28a('0x8')][_0xf28a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x23535c,_0x2166ed,_0x2d0423){return new BPromise(function(_0x444419,_0x343a38){return client[_0xf28a('0xa')](_0x23535c,_0x2d0423)[_0xf28a('0xb')](function(_0x2b7d8a){logger['info'](_0xf28a('0xc'),_0x2166ed,'request\x20sent');logger[_0xf28a('0xd')]('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x2166ed,_0xf28a('0xe'),JSON[_0xf28a('0xf')](_0x2b7d8a));if(_0x2b7d8a[_0xf28a('0x10')]){if(_0x2b7d8a[_0xf28a('0x10')][_0xf28a('0x11')]===0x1f4){logger[_0xf28a('0x10')]('VoiceTransferReport,\x20%s,\x20%s',_0x2166ed,_0x2b7d8a['error']['message']);return _0x343a38(_0x2b7d8a[_0xf28a('0x10')][_0xf28a('0x12')]);}logger[_0xf28a('0x10')](_0xf28a('0xc'),_0x2166ed,_0x2b7d8a['error']['message']);return _0x444419(_0x2b7d8a['error'][_0xf28a('0x12')]);}else{logger[_0xf28a('0x13')](_0xf28a('0xc'),_0x2166ed,_0xf28a('0xe'));_0x444419(_0x2b7d8a[_0xf28a('0x14')][_0xf28a('0x12')]);}})[_0xf28a('0x15')](function(_0x3858a7){logger[_0xf28a('0x10')]('VoiceTransferReport,\x20%s,\x20%s',_0x2166ed,_0x3858a7);_0x343a38(_0x3858a7);});});}exports[_0xf28a('0x16')]=function(_0x320adb){var _0x529883=this;return new Promise(function(_0x4c8aa3,_0x44fde3){return db[_0xf28a('0x17')]['create'](_0x320adb[_0xf28a('0x18')],{'raw':_0x320adb['options']?_0x320adb[_0xf28a('0x19')][_0xf28a('0x1a')]===undefined?!![]:![]:!![]})[_0xf28a('0xb')](function(_0xd3afeb){logger[_0xf28a('0x13')](_0xf28a('0x16'),_0x320adb);logger[_0xf28a('0xd')](_0xf28a('0x16'),_0x320adb,JSON[_0xf28a('0xf')](_0xd3afeb));_0x4c8aa3(_0xd3afeb);})[_0xf28a('0x15')](function(_0x2b2199){logger['error'](_0xf28a('0x16'),_0x2b2199[_0xf28a('0x12')],_0x320adb);_0x44fde3(_0x529883[_0xf28a('0x10')](0x1f4,_0x2b2199[_0xf28a('0x12')]));});});};
\ No newline at end of file
diff --git a/server/app.js b/server/app.js
index 9eac18d..2a7c2d6 100644
--- a/server/app.js
+++ b/server/app.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd4ea=['None','./config/seedDB','default','catch','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','lodash','./mysqldb','./rpc','./config/environment','app','./config/pm2','./config/schedule','sequelize','sync','then','listen','info','start','Online\x20apps:','map','online','name','join','Offline\x20apps:','filter','status'];(function(_0x6d9043,_0x458944){var _0x5f5962=function(_0x2027df){while(--_0x2027df){_0x6d9043['push'](_0x6d9043['shift']());}};_0x5f5962(++_0x458944);}(_0xd4ea,0x12f));var _0xad4e=function(_0x3bb706,_0x5baae3){_0x3bb706=_0x3bb706-0x0;var _0x18f011=_0xd4ea[_0x3bb706];return _0x18f011;};'use strict';var _=require(_0xad4e('0x0'));var mysqldb=require(_0xad4e('0x1'));var rpc=require(_0xad4e('0x2'));var config=require(_0xad4e('0x3'));var logger=require('./config/logger')(_0xad4e('0x4'));var pm2=require(_0xad4e('0x5'));var pm2Config=require('./config/pm2/config');var schedule=require(_0xad4e('0x6'));var chat=require('./config/schedule/chat');function main(){return mysqldb['db'][_0xad4e('0x7')][_0xad4e('0x8')]()[_0xad4e('0x9')](function(){return rpc[_0xad4e('0xa')]();})[_0xad4e('0x9')](function(_0x118f9e){logger[_0xad4e('0xb')](_0x118f9e);return chat[_0xad4e('0xc')]();})['then'](function(){return schedule[_0xad4e('0xc')]();})['then'](function(_0x3b3a07){logger['info'](_0x3b3a07);return pm2[_0xad4e('0xc')](pm2Config);})[_0xad4e('0x9')](function(_0x54dfa6){logger[_0xad4e('0xb')](_0xad4e('0xd'),_[_0xad4e('0xe')](_['filter'](_0x54dfa6,{'status':_0xad4e('0xf')}),_0xad4e('0x10'))[_0xad4e('0x11')]());logger[_0xad4e('0xb')](_0xad4e('0x12'),_[_0xad4e('0xe')](_[_0xad4e('0x13')](_0x54dfa6,function(_0x33bb73){return _0x33bb73[_0xad4e('0x14')]!==_0xad4e('0xf');}),_0xad4e('0x10'))[_0xad4e('0x11')]()||_0xad4e('0x15'));config['seedDB']&&require(_0xad4e('0x16'))[_0xad4e('0x17')]();require('./config/license')['default']();})[_0xad4e('0x18')](function(_0x7d57bd){logger[_0xad4e('0x19')](_0xad4e('0x1a'),_0x7d57bd);process['exit'](0x1);});}main();
\ No newline at end of file
+var _0xbe9b=['seedDB','./config/seedDB','default','./config/license','catch','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','./mysqldb','./config/environment','./config/logger','app','./config/pm2/config','./config/schedule','sequelize','sync','listen','info','start','then','Online\x20apps:','map','filter','name','join','status','online'];(function(_0xe19a76,_0x44ede6){var _0x1a5873=function(_0x403003){while(--_0x403003){_0xe19a76['push'](_0xe19a76['shift']());}};_0x1a5873(++_0x44ede6);}(_0xbe9b,0x14c));var _0xbbe9=function(_0xd30eaa,_0x1869e7){_0xd30eaa=_0xd30eaa-0x0;var _0x441894=_0xbe9b[_0xd30eaa];return _0x441894;};'use strict';var _=require('lodash');var mysqldb=require(_0xbbe9('0x0'));var rpc=require('./rpc');var config=require(_0xbbe9('0x1'));var logger=require(_0xbbe9('0x2'))(_0xbbe9('0x3'));var pm2=require('./config/pm2');var pm2Config=require(_0xbbe9('0x4'));var schedule=require(_0xbbe9('0x5'));var chat=require('./config/schedule/chat');function main(){return mysqldb['db'][_0xbbe9('0x6')][_0xbbe9('0x7')]()['then'](function(){return rpc[_0xbbe9('0x8')]();})['then'](function(_0x300f0e){logger[_0xbbe9('0x9')](_0x300f0e);return chat[_0xbbe9('0xa')]();})[_0xbbe9('0xb')](function(){return schedule[_0xbbe9('0xa')]();})[_0xbbe9('0xb')](function(_0x5edb3a){logger[_0xbbe9('0x9')](_0x5edb3a);return pm2[_0xbbe9('0xa')](pm2Config);})[_0xbbe9('0xb')](function(_0x1ff280){logger[_0xbbe9('0x9')](_0xbbe9('0xc'),_[_0xbbe9('0xd')](_[_0xbbe9('0xe')](_0x1ff280,{'status':'online'}),_0xbbe9('0xf'))[_0xbbe9('0x10')]());logger[_0xbbe9('0x9')]('Offline\x20apps:',_[_0xbbe9('0xd')](_['filter'](_0x1ff280,function(_0x3999b7){return _0x3999b7[_0xbbe9('0x11')]!==_0xbbe9('0x12');}),_0xbbe9('0xf'))[_0xbbe9('0x10')]()||'None');config[_0xbbe9('0x13')]&&require(_0xbbe9('0x14'))[_0xbbe9('0x15')]();require(_0xbbe9('0x16'))[_0xbbe9('0x15')]();})[_0xbbe9('0x17')](function(_0x153607){logger[_0xbbe9('0x18')](_0xbbe9('0x19'),_0x153607);process[_0xbbe9('0x1a')](0x1);});}main();
\ No newline at end of file
diff --git a/server/components/auth/service.js b/server/components/auth/service.js
index 02270a5..c3b1e43 100644
--- a/server/components/auth/service.js
+++ b/server/components/auth/service.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x467a=['update','Forbidden','sign','hasRole','indexOf','role','userRoles','isMiddleware','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','motion.user','pick','redirect','retrieveApiKey','isNil','apiKeyIat','generateApiKey','randomBytes','hex','floor','now','toString','regenerateApiKey','getUuid','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','../../mysqldb','../../config/license/hardware','lodash','jsonwebtoken','express-jwt','composable-middleware','basic-auth','crypto','secrets','session','name','email','userpic','chatPause','mailPause','faxPause','smsPause','showWebBar','phoneBarRemoteControlPort','phoneBarRemoteControl','userProfileId','isChatInteractionAuthorized','use','user','ChatInteraction','findOne','params','closed','disposition','then','unmanaged','catch','headers','authorization','startsWith','User','find','authenticate','status','Wrong\x20credentials.','Bearer','query','apikey','verify','sub','isEqual','apiKeyNonce','nonce','json','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','log','Unrecognized\x20API\x20access\x20key','Unknown\x20authorization\x20format','User\x20not\x20found.','User\x20object\x20not\x20found.','getLicense'];(function(_0x2a3b2b,_0x130451){var _0x17a84b=function(_0x1076e5){while(--_0x1076e5){_0x2a3b2b['push'](_0x2a3b2b['shift']());}};_0x17a84b(++_0x130451);}(_0x467a,0x6c));var _0xa467=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x467a[_0x14add3];return _0x4a174f;};'use strict';var db=require(_0xa467('0x0'))['db'];var config=require('../../config/environment');var hardwareConf=require(_0xa467('0x1'));var _=require(_0xa467('0x2'));var jwt=require(_0xa467('0x3'));var expressJwt=require(_0xa467('0x4'));var compose=require(_0xa467('0x5'));var basicAuth=require(_0xa467('0x6'));var crypto=require(_0xa467('0x7'));var ipaddr=require('ipaddr.js');var validateJwt=expressJwt({'secret':config[_0xa467('0x8')][_0xa467('0x9')]});var userAttributes=['id','role','fullname',_0xa467('0xa'),'internal',_0xa467('0xb'),_0xa467('0xc'),'permissions','voicePause',_0xa467('0xd'),_0xa467('0xe'),_0xa467('0xf'),_0xa467('0x10'),'openchannelPause','pauseType',_0xa467('0x11'),_0xa467('0x12'),_0xa467('0x13'),'interface',_0xa467('0x14')];exports[_0xa467('0x15')]=function(){return isAuthenticated(!![])[_0xa467('0x16')](function(_0x34269c,_0xbb6fb3,_0x2da696){if(_0x34269c[_0xa467('0x17')]){_0x2da696();}else{return db[_0xa467('0x18')][_0xa467('0x19')]({'where':{'id':_0x34269c[_0xa467('0x1a')]['id']},'attributes':['id',_0xa467('0x1b'),_0xa467('0x1c')],'raw':!![]})[_0xa467('0x1d')](function(_0x584aa5){if(_0x584aa5&&_0x584aa5['closed']){return _0xbb6fb3['status'](_0x584aa5[_0xa467('0x1c')]===_0xa467('0x1e')?0x195:0x193)['json']({'message':_0x584aa5[_0xa467('0x1c')]===_0xa467('0x1e')?'Unmanaged.':'Forbidden.'});}else{_0x2da696();}})[_0xa467('0x1f')](function(_0x45582c){_0x2da696(_0x45582c);});}});};function isAuthenticated(_0x15bdc9){return compose()['use'](function(_0x2331e3,_0x22faad,_0x1b0d35){if(_0x2331e3[_0xa467('0x20')][_0xa467('0x21')]){if(_[_0xa467('0x22')](_0x2331e3[_0xa467('0x20')][_0xa467('0x21')],'Basic')){var _0x1b7c31=basicAuth(_0x2331e3);db[_0xa467('0x23')][_0xa467('0x24')]({'where':{'name':_0x1b7c31[_0xa467('0xa')]}})[_0xa467('0x1d')](function(_0x4028f4){if(!_0x4028f4||!_0x4028f4[_0xa467('0x25')](_0x1b7c31['pass'])){return _0x22faad[_0xa467('0x26')](0x191)['json']({'message':_0xa467('0x27')});}_0x2331e3[_0xa467('0x17')]={'id':_0x4028f4['id']};_0x1b0d35();})[_0xa467('0x1f')](function(_0xd18d0d){_0x1b0d35(_0xd18d0d);});}else if(_['startsWith'](_0x2331e3[_0xa467('0x20')]['authorization'],_0xa467('0x28'))){validateJwt(_0x2331e3,_0x22faad,_0x1b0d35);}else{if(_0x15bdc9){_0x1b0d35();}else{return _0x22faad[_0xa467('0x26')](0x193)['json']({'message':'Unknown\x20authorization\x20format'});}}}else if(_0x2331e3[_0xa467('0x29')][_0xa467('0x2a')]){try{var _0x2afc49=jwt[_0xa467('0x2b')](_0x2331e3[_0xa467('0x29')][_0xa467('0x2a')],config['secrets'][_0xa467('0x9')],{'audience':hardwareConf['getUuid'](),'issuer':hardwareConf['getUuid']()});db[_0xa467('0x23')]['find']({'where':{'id':_0x2afc49[_0xa467('0x2c')]}})[_0xa467('0x1d')](function(_0x85b5b2){if(!_0x85b5b2||!_[_0xa467('0x2d')](_0x85b5b2[_0xa467('0x2e')],_0x2afc49[_0xa467('0x2f')])){return _0x22faad['status'](0x193)[_0xa467('0x30')]({'message':_0xa467('0x31')});}_0x2331e3[_0xa467('0x17')]={'id':_0x85b5b2['id']};_0x1b0d35();})[_0xa467('0x1f')](function(_0x5c5bc3){_0x1b0d35(_0x5c5bc3);});}catch(_0x2859da){console[_0xa467('0x32')](_0x2859da);return _0x22faad[_0xa467('0x26')](0x193)['json']({'message':_0xa467('0x33')});}}else if(_0x15bdc9){_0x1b0d35();}else{return _0x22faad['status'](0x193)[_0xa467('0x30')]({'message':_0xa467('0x34')});}})['use'](function(_0x4c0a8b,_0x2b79a0,_0x7c3a7f){if(_0x4c0a8b[_0xa467('0x17')]){db[_0xa467('0x23')][_0xa467('0x24')]({'where':{'id':_0x4c0a8b[_0xa467('0x17')]['id']},'attributes':userAttributes})['then'](function(_0x29f8d8){if(!_0x29f8d8){return _0x2b79a0[_0xa467('0x26')](0x194)[_0xa467('0x30')]({'message':_0xa467('0x35')});}_0x4c0a8b[_0xa467('0x17')]=_0x29f8d8;_0x7c3a7f();})[_0xa467('0x1f')](function(_0x4ea9b6){_0x7c3a7f(_0x4ea9b6);});}else if(_0x15bdc9){_0x7c3a7f();}else{return _0x2b79a0[_0xa467('0x26')](0x194)[_0xa467('0x30')]({'message':_0xa467('0x36')});}});}exports['isAuthenticated']=isAuthenticated;function canUpdate(){return compose()[_0xa467('0x16')](function(_0x5daa1b,_0x32beca,_0x5da26e){return require('../../config/license/util')[_0xa467('0x37')]()[_0xa467('0x1d')](function(_0x45f2da){if(_0x45f2da[_0xa467('0x38')]){_0x5da26e();}else{return _0x32beca[_0xa467('0x26')](0x193)[_0xa467('0x30')]({'message':_0xa467('0x39')});}})[_0xa467('0x1f')](function(_0x278bfc){_0x5da26e(_0x278bfc);});});}exports['canUpdate']=canUpdate;function signToken(_0x2ea209,_0x47e554){return jwt[_0xa467('0x3a')]({'id':_0x2ea209,'role':_0x47e554},config['secrets']['session'],{'expiresIn':0x15180});}exports['signToken']=signToken;exports[_0xa467('0x3b')]=function(_0x1938f5){if(!_0x1938f5){throw new Error('Required\x20role\x20needs\x20to\x20be\x20set');}return compose()[_0xa467('0x16')](isAuthenticated())[_0xa467('0x16')](function meetsRequirements(_0x124c59,_0x558bf9,_0x86303e){if(config['userRoles'][_0xa467('0x3c')](_0x124c59[_0xa467('0x17')][_0xa467('0x3d')])>=config[_0xa467('0x3e')][_0xa467('0x3c')](_0x1938f5)){return _0x86303e();}else{return _0x558bf9[_0xa467('0x26')](0x193)[_0xa467('0x30')]({'message':_0xa467('0x39')});}});};exports['isMiddleware']=function(_0x3c31df,_0x45ce8f,_0x6431dd){_0x3c31df[_0xa467('0x3f')]=!![];return _0x6431dd();};exports[_0xa467('0x40')]=function(_0x45d32b,_0x2843f0){if(!_0x45d32b['user']){return _0x2843f0['status'](0x194)[_0xa467('0x30')]({'message':_0xa467('0x41')});}var _0x26e8cb=signToken(_0x45d32b[_0xa467('0x17')]['id'],_0x45d32b['user']['role']);_0x2843f0[_0xa467('0x42')]('motion.token',_0x26e8cb);_0x2843f0[_0xa467('0x42')](_0xa467('0x43'),JSON['stringify'](_[_0xa467('0x44')](_0x45d32b['user'],userAttributes)));_0x2843f0[_0xa467('0x45')]('/dashboards/general');};exports[_0xa467('0x46')]=function(_0x3ff70d){if(_['isNil'](_0x3ff70d[_0xa467('0x2e')])||_[_0xa467('0x47')](_0x3ff70d[_0xa467('0x48')]))return null;else return createJwt(_0x3ff70d);};exports[_0xa467('0x49')]=function(_0x42427a){_0x42427a[_0xa467('0x2e')]=crypto[_0xa467('0x4a')](0x10)['toString'](_0xa467('0x4b'));_0x42427a['apiKeyIat']=Math[_0xa467('0x4c')](Date[_0xa467('0x4d')]()/0x3e8)[_0xa467('0x4e')]();return createJwt(_0x42427a);};exports[_0xa467('0x4f')]=function(_0x28f2f2,_0x50a606){if(_0x28f2f2[_0xa467('0x29')][_0xa467('0x2a')]){jwt[_0xa467('0x2b')](_0x28f2f2['query'][_0xa467('0x2a')],config[_0xa467('0x8')][_0xa467('0x9')],{'nonce':_0x50a606[_0xa467('0x2e')],'iat':_0x50a606[_0xa467('0x48')],'audience':hardwareConf[_0xa467('0x50')](),'issuer':hardwareConf['getUuid']()});return generateApiKey(_0x50a606);}else{throw{'message':_0xa467('0x51')};}};function createJwt(_0x161b08){return jwt[_0xa467('0x3a')]({'iat':_0x161b08[_0xa467('0x48')],'nonce':_0x161b08['apiKeyNonce']},config[_0xa467('0x8')][_0xa467('0x9')],{'algorithm':'HS512','subject':_0x161b08['id'][_0xa467('0x4e')](),'issuer':hardwareConf[_0xa467('0x50')](),'audience':hardwareConf[_0xa467('0x50')]()});}
\ No newline at end of file
+var _0x9e15=['isAuthenticated','getLicense','update','canUpdate','sign','signToken','hasRole','indexOf','Forbidden','isMiddleware','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','motion.user','pick','retrieveApiKey','isNil','apiKeyIat','generateApiKey','apiKeyNonce','randomBytes','toString','hex','floor','now','regenerateApiKey','apikey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','HS512','../../mysqldb','../../config/environment','../../config/license/hardware','lodash','jsonwebtoken','express-jwt','composable-middleware','crypto','ipaddr.js','secrets','session','role','fullname','name','internal','email','voicePause','chatPause','mailPause','smsPause','openchannelPause','phoneBarRemoteControlPort','phoneBarRemoteControl','interface','userProfileId','use','findOne','params','disposition','then','closed','unmanaged','json','Unmanaged.','Forbidden.','catch','headers','authorization','Basic','User','find','authenticate','status','Wrong\x20credentials.','user','startsWith','Bearer','Unknown\x20authorization\x20format','query','verify','getUuid','sub','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','log','User\x20not\x20found.','User\x20object\x20not\x20found.'];(function(_0x10be5d,_0x4b8b09){var _0x3c26fe=function(_0x4e60c2){while(--_0x4e60c2){_0x10be5d['push'](_0x10be5d['shift']());}};_0x3c26fe(++_0x4b8b09);}(_0x9e15,0xc6));var _0x59e1=function(_0xfa634c,_0x414e0e){_0xfa634c=_0xfa634c-0x0;var _0x73e478=_0x9e15[_0xfa634c];return _0x73e478;};'use strict';var db=require(_0x59e1('0x0'))['db'];var config=require(_0x59e1('0x1'));var hardwareConf=require(_0x59e1('0x2'));var _=require(_0x59e1('0x3'));var jwt=require(_0x59e1('0x4'));var expressJwt=require(_0x59e1('0x5'));var compose=require(_0x59e1('0x6'));var basicAuth=require('basic-auth');var crypto=require(_0x59e1('0x7'));var ipaddr=require(_0x59e1('0x8'));var validateJwt=expressJwt({'secret':config[_0x59e1('0x9')][_0x59e1('0xa')]});var userAttributes=['id',_0x59e1('0xb'),_0x59e1('0xc'),_0x59e1('0xd'),_0x59e1('0xe'),_0x59e1('0xf'),'userpic','permissions',_0x59e1('0x10'),_0x59e1('0x11'),_0x59e1('0x12'),'faxPause',_0x59e1('0x13'),_0x59e1('0x14'),'pauseType','showWebBar',_0x59e1('0x15'),_0x59e1('0x16'),_0x59e1('0x17'),_0x59e1('0x18')];exports['isChatInteractionAuthorized']=function(){return isAuthenticated(!![])[_0x59e1('0x19')](function(_0x5d27b4,_0x2e24cc,_0x46cc7d){if(_0x5d27b4['user']){_0x46cc7d();}else{return db['ChatInteraction'][_0x59e1('0x1a')]({'where':{'id':_0x5d27b4[_0x59e1('0x1b')]['id']},'attributes':['id','closed',_0x59e1('0x1c')],'raw':!![]})[_0x59e1('0x1d')](function(_0x5035fb){if(_0x5035fb&&_0x5035fb[_0x59e1('0x1e')]){return _0x2e24cc['status'](_0x5035fb[_0x59e1('0x1c')]===_0x59e1('0x1f')?0x195:0x193)[_0x59e1('0x20')]({'message':_0x5035fb[_0x59e1('0x1c')]===_0x59e1('0x1f')?_0x59e1('0x21'):_0x59e1('0x22')});}else{_0x46cc7d();}})[_0x59e1('0x23')](function(_0x4ae4b4){_0x46cc7d(_0x4ae4b4);});}});};function isAuthenticated(_0x3fccd0){return compose()['use'](function(_0x58ddb0,_0x57675b,_0x2c060e){if(_0x58ddb0['headers']['authorization']){if(_['startsWith'](_0x58ddb0[_0x59e1('0x24')][_0x59e1('0x25')],_0x59e1('0x26'))){var _0x4d38dd=basicAuth(_0x58ddb0);db[_0x59e1('0x27')][_0x59e1('0x28')]({'where':{'name':_0x4d38dd[_0x59e1('0xd')]}})[_0x59e1('0x1d')](function(_0x1edf4e){if(!_0x1edf4e||!_0x1edf4e[_0x59e1('0x29')](_0x4d38dd['pass'])){return _0x57675b[_0x59e1('0x2a')](0x191)[_0x59e1('0x20')]({'message':_0x59e1('0x2b')});}_0x58ddb0[_0x59e1('0x2c')]={'id':_0x1edf4e['id']};_0x2c060e();})[_0x59e1('0x23')](function(_0x149b8e){_0x2c060e(_0x149b8e);});}else if(_[_0x59e1('0x2d')](_0x58ddb0[_0x59e1('0x24')][_0x59e1('0x25')],_0x59e1('0x2e'))){validateJwt(_0x58ddb0,_0x57675b,_0x2c060e);}else{if(_0x3fccd0){_0x2c060e();}else{return _0x57675b[_0x59e1('0x2a')](0x193)[_0x59e1('0x20')]({'message':_0x59e1('0x2f')});}}}else if(_0x58ddb0[_0x59e1('0x30')]['apikey']){try{var _0x4cbd88=jwt[_0x59e1('0x31')](_0x58ddb0[_0x59e1('0x30')]['apikey'],config[_0x59e1('0x9')][_0x59e1('0xa')],{'audience':hardwareConf[_0x59e1('0x32')](),'issuer':hardwareConf[_0x59e1('0x32')]()});db[_0x59e1('0x27')][_0x59e1('0x28')]({'where':{'id':_0x4cbd88[_0x59e1('0x33')]}})[_0x59e1('0x1d')](function(_0x5343d6){if(!_0x5343d6||!_['isEqual'](_0x5343d6['apiKeyNonce'],_0x4cbd88[_0x59e1('0x34')])){return _0x57675b[_0x59e1('0x2a')](0x193)[_0x59e1('0x20')]({'message':_0x59e1('0x35')});}_0x58ddb0[_0x59e1('0x2c')]={'id':_0x5343d6['id']};_0x2c060e();})[_0x59e1('0x23')](function(_0x2fcc6a){_0x2c060e(_0x2fcc6a);});}catch(_0x292c0b){console[_0x59e1('0x36')](_0x292c0b);return _0x57675b['status'](0x193)['json']({'message':'Unrecognized\x20API\x20access\x20key'});}}else if(_0x3fccd0){_0x2c060e();}else{return _0x57675b[_0x59e1('0x2a')](0x193)[_0x59e1('0x20')]({'message':_0x59e1('0x2f')});}})[_0x59e1('0x19')](function(_0x35d533,_0x1e9fa2,_0x4d0c81){if(_0x35d533[_0x59e1('0x2c')]){db[_0x59e1('0x27')][_0x59e1('0x28')]({'where':{'id':_0x35d533['user']['id']},'attributes':userAttributes})[_0x59e1('0x1d')](function(_0x11357a){if(!_0x11357a){return _0x1e9fa2[_0x59e1('0x2a')](0x194)['json']({'message':_0x59e1('0x37')});}_0x35d533[_0x59e1('0x2c')]=_0x11357a;_0x4d0c81();})['catch'](function(_0x3c3fbf){_0x4d0c81(_0x3c3fbf);});}else if(_0x3fccd0){_0x4d0c81();}else{return _0x1e9fa2['status'](0x194)[_0x59e1('0x20')]({'message':_0x59e1('0x38')});}});}exports[_0x59e1('0x39')]=isAuthenticated;function canUpdate(){return compose()['use'](function(_0xf26257,_0x54b34e,_0x552239){return require('../../config/license/util')[_0x59e1('0x3a')]()[_0x59e1('0x1d')](function(_0xf47acb){if(_0xf47acb[_0x59e1('0x3b')]){_0x552239();}else{return _0x54b34e[_0x59e1('0x2a')](0x193)[_0x59e1('0x20')]({'message':'Forbidden'});}})[_0x59e1('0x23')](function(_0x383c5a){_0x552239(_0x383c5a);});});}exports[_0x59e1('0x3c')]=canUpdate;function signToken(_0xbf4993,_0x4b1d42){return jwt[_0x59e1('0x3d')]({'id':_0xbf4993,'role':_0x4b1d42},config[_0x59e1('0x9')][_0x59e1('0xa')],{'expiresIn':0x15180});}exports[_0x59e1('0x3e')]=signToken;exports[_0x59e1('0x3f')]=function(_0x1419ad){if(!_0x1419ad){throw new Error('Required\x20role\x20needs\x20to\x20be\x20set');}return compose()['use'](isAuthenticated())[_0x59e1('0x19')](function meetsRequirements(_0x57fc8d,_0x57076d,_0x188ac0){if(config['userRoles'][_0x59e1('0x40')](_0x57fc8d[_0x59e1('0x2c')][_0x59e1('0xb')])>=config['userRoles'][_0x59e1('0x40')](_0x1419ad)){return _0x188ac0();}else{return _0x57076d[_0x59e1('0x2a')](0x193)[_0x59e1('0x20')]({'message':_0x59e1('0x41')});}});};exports[_0x59e1('0x42')]=function(_0x3e7d26,_0xeee1ab,_0x49b7f4){_0x3e7d26[_0x59e1('0x42')]=!![];return _0x49b7f4();};exports['setTokenCookie']=function(_0x2a7ffb,_0x7a4318){if(!_0x2a7ffb[_0x59e1('0x2c')]){return _0x7a4318[_0x59e1('0x2a')](0x194)[_0x59e1('0x20')]({'message':_0x59e1('0x43')});}var _0x4975a3=signToken(_0x2a7ffb[_0x59e1('0x2c')]['id'],_0x2a7ffb[_0x59e1('0x2c')][_0x59e1('0xb')]);_0x7a4318['cookie']('motion.token',_0x4975a3);_0x7a4318[_0x59e1('0x44')](_0x59e1('0x45'),JSON['stringify'](_[_0x59e1('0x46')](_0x2a7ffb['user'],userAttributes)));_0x7a4318['redirect']('/dashboards/general');};exports[_0x59e1('0x47')]=function(_0x2fc4ad){if(_[_0x59e1('0x48')](_0x2fc4ad['apiKeyNonce'])||_['isNil'](_0x2fc4ad[_0x59e1('0x49')]))return null;else return createJwt(_0x2fc4ad);};exports[_0x59e1('0x4a')]=function(_0x5732cc){_0x5732cc[_0x59e1('0x4b')]=crypto[_0x59e1('0x4c')](0x10)[_0x59e1('0x4d')](_0x59e1('0x4e'));_0x5732cc['apiKeyIat']=Math[_0x59e1('0x4f')](Date[_0x59e1('0x50')]()/0x3e8)['toString']();return createJwt(_0x5732cc);};exports[_0x59e1('0x51')]=function(_0xfc4e47,_0x13c9b8){if(_0xfc4e47[_0x59e1('0x30')][_0x59e1('0x52')]){jwt[_0x59e1('0x31')](_0xfc4e47[_0x59e1('0x30')]['apikey'],config['secrets'][_0x59e1('0xa')],{'nonce':_0x13c9b8['apiKeyNonce'],'iat':_0x13c9b8[_0x59e1('0x49')],'audience':hardwareConf[_0x59e1('0x32')](),'issuer':hardwareConf[_0x59e1('0x32')]()});return generateApiKey(_0x13c9b8);}else{throw{'message':_0x59e1('0x53')};}};function createJwt(_0x1be5e7){return jwt['sign']({'iat':_0x1be5e7[_0x59e1('0x49')],'nonce':_0x1be5e7[_0x59e1('0x4b')]},config[_0x59e1('0x9')]['session'],{'algorithm':_0x59e1('0x54'),'subject':_0x1be5e7['id']['toString'](),'issuer':hardwareConf[_0x59e1('0x32')](),'audience':hardwareConf[_0x59e1('0x32')]()});}
\ No newline at end of file
diff --git a/server/components/encryptor/index.js b/server/components/encryptor/index.js
index 38f8a36..d5cf600 100644
--- a/server/components/encryptor/index.js
+++ b/server/components/encryptor/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9a98=['createCipher','algorithm','data','update','binary','end','write','createReadStream','final','close','unlink','bluebird','aes192','hasOwnProperty','encryptFile','createWriteStream'];(function(_0x511e14,_0x27f3bb){var _0x4a6ba4=function(_0x2aa1bb){while(--_0x2aa1bb){_0x511e14['push'](_0x511e14['shift']());}};_0x4a6ba4(++_0x27f3bb);}(_0x9a98,0x10b));var _0x89a9=function(_0x3f1586,_0x4a0eec){_0x3f1586=_0x3f1586-0x0;var _0x3c691a=_0x9a98[_0x3f1586];return _0x3c691a;};'use strict';var crypto=require('crypto');var fs=require('fs');var BPromise=require(_0x89a9('0x0'));var defaultOptions={'algorithm':_0x89a9('0x1')};function combineOptions(_0x1cfaaf){var _0x9e4b4c={};for(var _0x55475e in defaultOptions){if(defaultOptions[_0x89a9('0x2')](_0x55475e)){_0x9e4b4c[_0x55475e]=defaultOptions[_0x55475e];}}if(_0x1cfaaf){for(var _0x452e28 in _0x1cfaaf){if(_0x1cfaaf[_0x89a9('0x2')](_0x452e28)){_0x9e4b4c[_0x452e28]=_0x1cfaaf[_0x452e28];}}}return _0x9e4b4c;}exports[_0x89a9('0x3')]=function(_0x2832ef,_0x3d26a9,_0x5ad657,_0xfd66f9){return new BPromise(function(_0xcf7844,_0x5df6ca){_0xfd66f9=combineOptions(_0xfd66f9);var _0x1aa2d8=new Buffer(_0x5ad657);var _0x5d29d0=fs['createReadStream'](_0x2832ef);var _0x1d9e22=fs[_0x89a9('0x4')](_0x3d26a9);var _0x32384a=crypto[_0x89a9('0x5')](_0xfd66f9[_0x89a9('0x6')],_0x1aa2d8);_0x5d29d0['on'](_0x89a9('0x7'),function(_0xb8fa0c){var _0x54ea16=new Buffer(_0x32384a[_0x89a9('0x8')](_0xb8fa0c),_0x89a9('0x9'));_0x1d9e22['write'](_0x54ea16);});_0x5d29d0['on'](_0x89a9('0xa'),function(){try{var _0x4d9935=new Buffer(_0x32384a['final'](_0x89a9('0x9')),_0x89a9('0x9'));_0x1d9e22[_0x89a9('0xb')](_0x4d9935);_0x1d9e22[_0x89a9('0xa')]();_0x1d9e22['on']('close',function(){return _0xcf7844(_0x3d26a9);});}catch(_0x194189){fs['unlink'](_0x3d26a9);return _0x5df6ca(_0x194189);}});});};exports['decryptFile']=function(_0x2b37e7,_0x55a7f3,_0x5742e0,_0x56cccd){return new BPromise(function(_0x42545f,_0x35dc21){_0x56cccd=combineOptions(_0x56cccd);var _0x1349b3=new Buffer(_0x5742e0);var _0x22dfb0=fs[_0x89a9('0xc')](_0x2b37e7);var _0x51d080=fs[_0x89a9('0x4')](_0x55a7f3);var _0x5bdeb4=crypto['createDecipher'](_0x56cccd[_0x89a9('0x6')],_0x1349b3);_0x22dfb0['on'](_0x89a9('0x7'),function(_0xaccb3){var _0x174d9b=new Buffer(_0x5bdeb4[_0x89a9('0x8')](_0xaccb3),_0x89a9('0x9'));_0x51d080[_0x89a9('0xb')](_0x174d9b);});_0x22dfb0['on'](_0x89a9('0xa'),function(){try{var _0x416b57=new Buffer(_0x5bdeb4[_0x89a9('0xd')](_0x89a9('0x9')),_0x89a9('0x9'));_0x51d080[_0x89a9('0xb')](_0x416b57);_0x51d080[_0x89a9('0xa')]();_0x51d080['on'](_0x89a9('0xe'),function(){return _0x42545f(_0x55a7f3);});}catch(_0x2812e1){fs[_0x89a9('0xf')](_0x55a7f3);return _0x35dc21(_0x2812e1);}});});};
\ No newline at end of file
+var _0x253a=['unlink','decryptFile','createWriteStream','final','bluebird','aes192','hasOwnProperty','createReadStream','createCipher','algorithm','data','update','binary','write','end','close'];(function(_0x34479b,_0x53b1d1){var _0x23e1b8=function(_0x22d0e6){while(--_0x22d0e6){_0x34479b['push'](_0x34479b['shift']());}};_0x23e1b8(++_0x53b1d1);}(_0x253a,0xe4));var _0xa253=function(_0x234820,_0x11ea77){_0x234820=_0x234820-0x0;var _0x3622cb=_0x253a[_0x234820];return _0x3622cb;};'use strict';var crypto=require('crypto');var fs=require('fs');var BPromise=require(_0xa253('0x0'));var defaultOptions={'algorithm':_0xa253('0x1')};function combineOptions(_0xc58e97){var _0x276c56={};for(var _0x7de58b in defaultOptions){if(defaultOptions[_0xa253('0x2')](_0x7de58b)){_0x276c56[_0x7de58b]=defaultOptions[_0x7de58b];}}if(_0xc58e97){for(var _0xc752c3 in _0xc58e97){if(_0xc58e97[_0xa253('0x2')](_0xc752c3)){_0x276c56[_0xc752c3]=_0xc58e97[_0xc752c3];}}}return _0x276c56;}exports['encryptFile']=function(_0xbb4bbd,_0x132513,_0x154885,_0x29ed16){return new BPromise(function(_0xde37bd,_0x1a4ce6){_0x29ed16=combineOptions(_0x29ed16);var _0x13cd91=new Buffer(_0x154885);var _0x33a023=fs[_0xa253('0x3')](_0xbb4bbd);var _0x5dc5c2=fs['createWriteStream'](_0x132513);var _0x6c111c=crypto[_0xa253('0x4')](_0x29ed16[_0xa253('0x5')],_0x13cd91);_0x33a023['on'](_0xa253('0x6'),function(_0x1a13bd){var _0x5544dd=new Buffer(_0x6c111c[_0xa253('0x7')](_0x1a13bd),_0xa253('0x8'));_0x5dc5c2[_0xa253('0x9')](_0x5544dd);});_0x33a023['on']('end',function(){try{var _0x4bac20=new Buffer(_0x6c111c['final'](_0xa253('0x8')),_0xa253('0x8'));_0x5dc5c2[_0xa253('0x9')](_0x4bac20);_0x5dc5c2[_0xa253('0xa')]();_0x5dc5c2['on'](_0xa253('0xb'),function(){return _0xde37bd(_0x132513);});}catch(_0x153101){fs[_0xa253('0xc')](_0x132513);return _0x1a4ce6(_0x153101);}});});};exports[_0xa253('0xd')]=function(_0x5b7233,_0x3b0108,_0x18739b,_0x2c6e11){return new BPromise(function(_0x3d8f5a,_0x352a6c){_0x2c6e11=combineOptions(_0x2c6e11);var _0x3fdd00=new Buffer(_0x18739b);var _0x4f8fd6=fs[_0xa253('0x3')](_0x5b7233);var _0x9c088b=fs[_0xa253('0xe')](_0x3b0108);var _0x36cd70=crypto['createDecipher'](_0x2c6e11['algorithm'],_0x3fdd00);_0x4f8fd6['on']('data',function(_0x3a1eb7){var _0x31a95b=new Buffer(_0x36cd70[_0xa253('0x7')](_0x3a1eb7),_0xa253('0x8'));_0x9c088b[_0xa253('0x9')](_0x31a95b);});_0x4f8fd6['on']('end',function(){try{var _0x54c831=new Buffer(_0x36cd70[_0xa253('0xf')]('binary'),_0xa253('0x8'));_0x9c088b[_0xa253('0x9')](_0x54c831);_0x9c088b['end']();_0x9c088b['on'](_0xa253('0xb'),function(){return _0x3d8f5a(_0x3b0108);});}catch(_0x16d350){fs[_0xa253('0xc')](_0x3b0108);return _0x352a6c(_0x16d350);}});});};
\ No newline at end of file
diff --git a/server/components/export/csv.js b/server/components/export/csv.js
index 1ca96d6..9432741 100644
--- a/server/components/export/csv.js
+++ b/server/components/export/csv.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0a77=['Setting','find','split','then','splitSizeCsv','sequelize','query','format','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','length','push','dirname','basename','.csv','existsSync','join','mkdirSync','each','%s%d.%s','csv','%s.%s','writeFileSync','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','inspect','util','path','lodash','to-csv','zip-dir','../../mysqldb','analytics','argv','savename','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV'];(function(_0x339cc3,_0x37bcb7){var _0x518732=function(_0x32b07d){while(--_0x32b07d){_0x339cc3['push'](_0x339cc3['shift']());}};_0x518732(++_0x37bcb7);}(_0x0a77,0x72));var _0x70a7=function(_0x24307b,_0x319f83){_0x24307b=_0x24307b-0x0;var _0x2b9edd=_0x0a77[_0x24307b];return _0x2b9edd;};'use strict';var util=require(_0x70a7('0x0'));var path=require(_0x70a7('0x1'));var _=require(_0x70a7('0x2'));var csv=require(_0x70a7('0x3'));var fs=require('fs');var BPromise=require('bluebird');var zipdir=require(_0x70a7('0x4'));var rimraf=require('rimraf');var db=require(_0x70a7('0x5'))['db'];var dbH=require('../../mysqldb')['dbH'];var logger=require('../../config/logger')(_0x70a7('0x6'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0x70a7('0x7')][0x4];function analyticExtractedReport(_0x22b805,_0x280b66){var _0x5e19f7={'status':_0x22b805};var _0x596726={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x280b66){_0x5e19f7[_0x70a7('0x8')]=_0x280b66;}return db['AnalyticExtractedReport']['update'](_0x5e19f7,_0x596726);}function main(){var _0x3a58c1=0x1388;var _0x4e7da0;logger[_0x70a7('0x9')](util['format'](_0x70a7('0xa'),EXTRACTED_REPORT_ID,_0x70a7('0xb')));return db[_0x70a7('0xc')][_0x70a7('0xd')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x70a7('0xe'),'splitSizeCsv']})[_0x70a7('0xf')](function(_0x33252a){if(_0x33252a){_0x4e7da0=_0x33252a;_0x3a58c1=_0x4e7da0[_0x70a7('0x10')]||0x1388;}})['then'](function(){return dbH[_0x70a7('0x11')][_0x70a7('0x12')](util[_0x70a7('0x13')](_0x70a7('0x14'),QUERY),{'type':dbH[_0x70a7('0x11')][_0x70a7('0x15')][_0x70a7('0x16')]});})[_0x70a7('0xf')](function(_0x4a587b){if(!_0x4a587b[0x0][_0x70a7('0x17')]){return analyticExtractedReport(_0x70a7('0x18'));}var _0x491c45=[];var _0x3bb065=0x0;var _0x3225df=!![];if(_0x4a587b&&_0x4a587b[_0x70a7('0x19')]){var _0x3c343c=_0x4a587b[0x0]['num']%(_0x3bb065+_0x3a58c1);if(_0x4e7da0['split']){for(;_0x3225df;_0x3bb065+=_0x3a58c1,_0x3c343c=_0x4a587b[0x0]['num']%(_0x3bb065+_0x3a58c1)){if(_0x3c343c==0x0||_0x3c343c==_0x4a587b[0x0]['num']){_0x3225df=![];}_0x491c45['push'](dbH[_0x70a7('0x11')][_0x70a7('0x12')](util[_0x70a7('0x13')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x3a58c1,_0x3bb065),{'type':dbH['sequelize'][_0x70a7('0x15')][_0x70a7('0x16')]}));}}else{_0x491c45[_0x70a7('0x1a')](dbH[_0x70a7('0x11')]['query'](QUERY,{'type':dbH[_0x70a7('0x11')][_0x70a7('0x15')][_0x70a7('0x16')]}));}}var _0x5b4e92=path[_0x70a7('0x1b')](PATH);var _0x5c815e=path[_0x70a7('0x1c')](PATH,_0x70a7('0x1d'));var _0x5292e8=_0x4e7da0[_0x70a7('0xe')]&&_0x491c45['length']>0x1;var _0x4406ba=[];if(!fs[_0x70a7('0x1e')](path[_0x70a7('0x1f')](_0x5b4e92,_0x5c815e))&&_0x5292e8){fs[_0x70a7('0x20')](path['join'](_0x5b4e92,_0x5c815e));}return BPromise[_0x70a7('0x21')](_0x491c45,function(_0x5a707f){_0x4406ba[_0x70a7('0x1a')](_0x5a707f);})[_0x70a7('0xf')](function(){for(var _0x8efc33=0x0;_0x8efc33<_0x4406ba[_0x70a7('0x19')];_0x8efc33+=0x1){var _0x5df954;var _0x5a89f7=_0x4406ba[_0x8efc33];if(_0x5292e8){_0x5df954=path[_0x70a7('0x1f')](_0x5b4e92,_0x5c815e,util[_0x70a7('0x13')](_0x70a7('0x22'),_0x5c815e,_0x8efc33,_0x70a7('0x23')));}else{_0x5df954=path[_0x70a7('0x1f')](_0x5b4e92,util[_0x70a7('0x13')](_0x70a7('0x24'),_0x5c815e,_0x70a7('0x23')));}fs[_0x70a7('0x25')](_0x5df954,csv(_0x5a89f7));}})[_0x70a7('0xf')](function(){if(_0x5292e8){zipdir(path[_0x70a7('0x1f')](_0x5b4e92,_0x5c815e),{'saveTo':path['join'](_0x5b4e92,util['format'](_0x70a7('0x24'),_0x5c815e,_0x70a7('0x26')))},function(_0x116bb5,_0x9fa4ae){});rimraf(path['join'](_0x5b4e92,_0x5c815e),function(){});}})['then'](function(){logger[_0x70a7('0x9')](util['format'](_0x70a7('0x27'),EXTRACTED_REPORT_ID,_0x70a7('0xb')));return analyticExtractedReport(_0x70a7('0x28'),_0x5292e8?util['format']('%s.%s',_0x5c815e,_0x5292e8?'zip':_0x70a7('0x23')):null);});})['catch'](function(_0x245ebd){logger['info'](util[_0x70a7('0x13')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,'CSV'),util[_0x70a7('0x29')](_0x245ebd,{'showHidden':![],'depth':null}));return analyticExtractedReport('Failed');});}main();
\ No newline at end of file
+var _0x5dfd=['basename','existsSync','join','each','%s%d.%s','csv','format','writeFileSync','zip','info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','catch','inspect','util','path','lodash','to-csv','bluebird','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','analytics','argv','savename','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV','Setting','find','split','splitSizeCsv','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','num','Empty','length','push','SELECT','dirname'];(function(_0x2e6dee,_0x1a61b0){var _0x47706=function(_0x365546){while(--_0x365546){_0x2e6dee['push'](_0x2e6dee['shift']());}};_0x47706(++_0x1a61b0);}(_0x5dfd,0x16e));var _0xd5df=function(_0x22eb96,_0x3c2d8d){_0x22eb96=_0x22eb96-0x0;var _0x5e1adf=_0x5dfd[_0x22eb96];return _0x5e1adf;};'use strict';var util=require(_0xd5df('0x0'));var path=require(_0xd5df('0x1'));var _=require(_0xd5df('0x2'));var csv=require(_0xd5df('0x3'));var fs=require('fs');var BPromise=require(_0xd5df('0x4'));var zipdir=require(_0xd5df('0x5'));var rimraf=require(_0xd5df('0x6'));var db=require(_0xd5df('0x7'))['db'];var dbH=require(_0xd5df('0x7'))[_0xd5df('0x8')];var logger=require(_0xd5df('0x9'))(_0xd5df('0xa'));var EXTRACTED_REPORT_ID=Number(process[_0xd5df('0xb')][0x2]);var QUERY=process[_0xd5df('0xb')][0x3];var PATH=process[_0xd5df('0xb')][0x4];function analyticExtractedReport(_0x42d555,_0x3ed65f){var _0x5438a4={'status':_0x42d555};var _0x321392={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x3ed65f){_0x5438a4[_0xd5df('0xc')]=_0x3ed65f;}return db['AnalyticExtractedReport']['update'](_0x5438a4,_0x321392);}function main(){var _0x3e089a=0x1388;var _0x4d3cb7;logger['info'](util['format'](_0xd5df('0xd'),EXTRACTED_REPORT_ID,_0xd5df('0xe')));return db[_0xd5df('0xf')][_0xd5df('0x10')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xd5df('0x11'),_0xd5df('0x12')]})[_0xd5df('0x13')](function(_0x3468bf){if(_0x3468bf){_0x4d3cb7=_0x3468bf;_0x3e089a=_0x4d3cb7['splitSizeCsv']||0x1388;}})['then'](function(){return dbH[_0xd5df('0x14')][_0xd5df('0x15')](util['format'](_0xd5df('0x16'),QUERY),{'type':dbH[_0xd5df('0x14')][_0xd5df('0x17')]['SELECT']});})['then'](function(_0xc4b6b2){if(!_0xc4b6b2[0x0][_0xd5df('0x18')]){return analyticExtractedReport(_0xd5df('0x19'));}var _0x316386=[];var _0x49b7d9=0x0;var _0x199674=!![];if(_0xc4b6b2&&_0xc4b6b2[_0xd5df('0x1a')]){var _0x57ae6c=_0xc4b6b2[0x0]['num']%(_0x49b7d9+_0x3e089a);if(_0x4d3cb7['split']){for(;_0x199674;_0x49b7d9+=_0x3e089a,_0x57ae6c=_0xc4b6b2[0x0][_0xd5df('0x18')]%(_0x49b7d9+_0x3e089a)){if(_0x57ae6c==0x0||_0x57ae6c==_0xc4b6b2[0x0][_0xd5df('0x18')]){_0x199674=![];}_0x316386[_0xd5df('0x1b')](dbH['sequelize'][_0xd5df('0x15')](util['format']('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x3e089a,_0x49b7d9),{'type':dbH[_0xd5df('0x14')][_0xd5df('0x17')][_0xd5df('0x1c')]}));}}else{_0x316386[_0xd5df('0x1b')](dbH['sequelize']['query'](QUERY,{'type':dbH['sequelize'][_0xd5df('0x17')][_0xd5df('0x1c')]}));}}var _0xaacaa7=path[_0xd5df('0x1d')](PATH);var _0x70f8b4=path[_0xd5df('0x1e')](PATH,'.csv');var _0x255768=_0x4d3cb7[_0xd5df('0x11')]&&_0x316386[_0xd5df('0x1a')]>0x1;var _0x15ea72=[];if(!fs[_0xd5df('0x1f')](path[_0xd5df('0x20')](_0xaacaa7,_0x70f8b4))&&_0x255768){fs['mkdirSync'](path[_0xd5df('0x20')](_0xaacaa7,_0x70f8b4));}return BPromise[_0xd5df('0x21')](_0x316386,function(_0x48ab75){_0x15ea72[_0xd5df('0x1b')](_0x48ab75);})[_0xd5df('0x13')](function(){for(var _0x42a948=0x0;_0x42a948<_0x15ea72[_0xd5df('0x1a')];_0x42a948+=0x1){var _0x1ade25;var _0x425048=_0x15ea72[_0x42a948];if(_0x255768){_0x1ade25=path[_0xd5df('0x20')](_0xaacaa7,_0x70f8b4,util['format'](_0xd5df('0x22'),_0x70f8b4,_0x42a948,_0xd5df('0x23')));}else{_0x1ade25=path[_0xd5df('0x20')](_0xaacaa7,util[_0xd5df('0x24')]('%s.%s',_0x70f8b4,_0xd5df('0x23')));}fs[_0xd5df('0x25')](_0x1ade25,csv(_0x425048));}})[_0xd5df('0x13')](function(){if(_0x255768){zipdir(path[_0xd5df('0x20')](_0xaacaa7,_0x70f8b4),{'saveTo':path[_0xd5df('0x20')](_0xaacaa7,util[_0xd5df('0x24')]('%s.%s',_0x70f8b4,_0xd5df('0x26')))},function(_0x2eea47,_0x38f345){});rimraf(path[_0xd5df('0x20')](_0xaacaa7,_0x70f8b4),function(){});}})[_0xd5df('0x13')](function(){logger[_0xd5df('0x27')](util[_0xd5df('0x24')](_0xd5df('0x28'),EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0xd5df('0x29'),_0x255768?util[_0xd5df('0x24')]('%s.%s',_0x70f8b4,_0x255768?_0xd5df('0x26'):_0xd5df('0x23')):null);});})[_0xd5df('0x2a')](function(_0x4c3e20){logger['info'](util[_0xd5df('0x24')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,'CSV'),util[_0xd5df('0x2b')](_0x4c3e20,{'showHidden':![],'depth':null}));return analyticExtractedReport('Failed');});}main();
\ No newline at end of file
diff --git a/server/components/export/pdf.js b/server/components/export/pdf.js
index f38e806..22091fe 100644
--- a/server/components/export/pdf.js
+++ b/server/components/export/pdf.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6333=['header','black','body','toString','content','/fonts/Roboto-Regular.ttf','/fonts/Roboto-Medium.ttf','/fonts/Roboto-MediumItalic.ttf','createPdfKitDocument','%s%d.%s','%s.%s','pdf','pipe','finish','error','log','err','info','CSV','Completed','zip','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','PDF','findOne','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','bluebird','path','moment','pdfmake/src/printer','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','argv','savename','AnalyticExtractedReport','update','hasOwnProperty','push','Empty','dirname','basename','splitSizePdf','then','length','num','sequelize','query','format','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','existsSync','mkdirSync','join','each','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','name','startDate','endDate','landscape'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x6333,0x1a2));var _0x3633=function(_0x182ebe,_0x439e11){_0x182ebe=_0x182ebe-0x0;var _0x2de47e=_0x6333[_0x182ebe];return _0x2de47e;};'use strict';var _=require('lodash');var fs=require('fs');var BPromise=require(_0x3633('0x0'));var util=require('util');var path=require(_0x3633('0x1'));var moment=require(_0x3633('0x2'));var PdfPrinter=require(_0x3633('0x3'));var zipdir=require(_0x3633('0x4'));var rimraf=require(_0x3633('0x5'));var db=require(_0x3633('0x6'))['db'];var dbH=require(_0x3633('0x6'))[_0x3633('0x7')];var logger=require(_0x3633('0x8'))('analytics');var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x3633('0x9')][0x3];var PATH=process['argv'][0x4];var NAME=process[_0x3633('0x9')][0x5];var FORMAT='MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a';var _extractedReport;function analyticExtractedReport(_0x1319f5,_0x12332e){var _0x10d7ea={'status':_0x1319f5};var _0x1749be={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x12332e){_0x10d7ea[_0x3633('0xa')]=_0x12332e;}return db[_0x3633('0xb')][_0x3633('0xc')](_0x10d7ea,_0x1749be);}function getHeader(_0x4d30b8){var _0x3bea1f=[];for(var _0x2d797d in _0x4d30b8){if(_0x4d30b8[_0x3633('0xd')](_0x2d797d)){_0x3bea1f[_0x3633('0xe')]({'text':_0x2d797d,'style':'tableHeader'});}}return _0x3bea1f;}function extractReport(_0x1d8d7d){var _0x19c714=0x1388;var _0x4ad534;if(!_0x1d8d7d[0x0]['num']){return analyticExtractedReport(_0x3633('0xf'));}var _0x198510=[];var _0x52d10f=0x0;var _0x1090d0=!![];var _0x408fe7=path[_0x3633('0x10')](PATH);var _0x4ef357=path[_0x3633('0x11')](PATH,'.pdf');var _0x6b7528=![];var _0x33d3fe=[];return db['Setting']['find']({'where':{'id':0x1},'raw':!![],'attributes':['id','split',_0x3633('0x12')]})[_0x3633('0x13')](function(_0x56b666){if(_0x56b666){_0x4ad534=_0x56b666;_0x19c714=_0x4ad534[_0x3633('0x12')]||0x3e8;}})[_0x3633('0x13')](function(){if(_0x1d8d7d&&_0x1d8d7d[_0x3633('0x14')]){var _0x40ecfb=_0x1d8d7d[0x0][_0x3633('0x15')]%(_0x52d10f+_0x19c714);if(_0x4ad534['split']){for(;_0x1090d0;_0x52d10f+=_0x19c714,_0x40ecfb=_0x1d8d7d[0x0][_0x3633('0x15')]%(_0x52d10f+_0x19c714)){if(_0x40ecfb==0x0||_0x40ecfb==_0x1d8d7d[0x0]['num']){_0x1090d0=![];}_0x198510[_0x3633('0xe')](dbH[_0x3633('0x16')][_0x3633('0x17')](util[_0x3633('0x18')](_0x3633('0x19'),QUERY,_0x19c714,_0x52d10f),{'type':dbH['sequelize'][_0x3633('0x1a')][_0x3633('0x1b')]}));}}else{_0x198510[_0x3633('0xe')](dbH[_0x3633('0x16')][_0x3633('0x17')](QUERY,{'type':dbH[_0x3633('0x16')]['QueryTypes'][_0x3633('0x1b')]}));}}_0x6b7528=_0x4ad534['split']&&_0x198510[_0x3633('0x14')]>0x1;if(!fs[_0x3633('0x1c')](path['join'](_0x408fe7,_0x4ef357))&&_0x6b7528){fs[_0x3633('0x1d')](path[_0x3633('0x1e')](_0x408fe7,_0x4ef357));}return BPromise[_0x3633('0x1f')](_0x198510,function(_0x5c135b){_0x33d3fe[_0x3633('0xe')](_0x5c135b);});})['then'](function(){return BPromise[_0x3633('0x1f')](_0x198510,function(_0x4e8d5e,_0x54dbf6){var _0x2bab73;var _0x33ae30=util['format'](_0x3633('0x20'),NAME,_extractedReport[_0x3633('0x21')],moment(_extractedReport[_0x3633('0x22')])['format'](FORMAT),moment(_extractedReport[_0x3633('0x23')])[_0x3633('0x18')](FORMAT));var _0x4fb57d={'pageSize':'A4','pageOrientation':_0x3633('0x24'),'content':[{'text':_0x33ae30,'style':_0x3633('0x25')}],'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0x3633('0x26')}}};var _0x32d59b={'headerRows':0x1,'body':[]};_0x32d59b[_0x3633('0x27')][_0x3633('0xe')](getHeader(_0x4e8d5e[0x0]));var _0x39e655;for(var _0x502140=0x0;_0x502140<_0x4e8d5e['length'];_0x502140+=0x1){_0x39e655=[];for(var _0x31ff00 in _0x4e8d5e[_0x502140]){if(_0x4e8d5e[_0x502140][_0x3633('0xd')](_0x31ff00)){_0x39e655[_0x3633('0xe')](_0x4e8d5e[_0x502140][_0x31ff00]?_[_0x3633('0x28')](_0x4e8d5e[_0x502140][_0x31ff00]):'');}}_0x32d59b[_0x3633('0x27')][_0x3633('0xe')](_0x39e655);}_0x4fb57d[_0x3633('0x29')]['push']({'table':_0x32d59b});return new BPromise(function(_0x183206,_0x1e3a42){var _0x4bac4a=new PdfPrinter({'Roboto':{'normal':__dirname+_0x3633('0x2a'),'bold':__dirname+_0x3633('0x2b'),'italics':__dirname+'/fonts/Roboto-Italic.ttf','bolditalics':__dirname+_0x3633('0x2c')}});var _0xecb4bf=_0x4bac4a[_0x3633('0x2d')](_0x4fb57d);if(_0x6b7528){_0x2bab73=path[_0x3633('0x1e')](_0x408fe7,_0x4ef357,util[_0x3633('0x18')](_0x3633('0x2e'),_0x4ef357,_0x54dbf6,'pdf'));}else{_0x2bab73=path[_0x3633('0x1e')](_0x408fe7,util[_0x3633('0x18')](_0x3633('0x2f'),_0x4ef357,_0x3633('0x30')));}var _0x4aa7c3=_0xecb4bf[_0x3633('0x31')](fs['createWriteStream'](_0x2bab73));_0x4aa7c3['on'](_0x3633('0x32'),function(){_0x183206();});_0x4aa7c3['on'](_0x3633('0x33'),function(_0x4a7d18){console[_0x3633('0x34')](_0x3633('0x35'),_0x4a7d18);_0x1e3a42(_0x4a7d18);});_0xecb4bf['end']();});});})['then'](function(){if(_0x6b7528){return new BPromise(function(_0x46b06c,_0x53cdb4){zipdir(path[_0x3633('0x1e')](_0x408fe7,_0x4ef357),{'saveTo':path['join'](_0x408fe7,util[_0x3633('0x18')](_0x3633('0x2f'),_0x4ef357,'zip'))},function(_0x211fcb){if(_0x211fcb){_0x53cdb4(_0x211fcb);}else{_0x46b06c();}});});}})['then'](function(){if(_0x6b7528){rimraf(path[_0x3633('0x1e')](_0x408fe7,_0x4ef357),function(){});}})[_0x3633('0x13')](function(){logger[_0x3633('0x36')](util[_0x3633('0x18')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0x3633('0x37')));return analyticExtractedReport(_0x3633('0x38'),_0x6b7528?util[_0x3633('0x18')]('%s.%s',_0x4ef357,_0x6b7528?_0x3633('0x39'):_0x3633('0x30')):null);});}function main(){logger['info'](util['format'](_0x3633('0x3a'),EXTRACTED_REPORT_ID,_0x3633('0x3b')));return db[_0x3633('0xb')][_0x3633('0x3c')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0x3633('0x13')](function(_0x470cd3){_extractedReport=_0x470cd3;return dbH[_0x3633('0x16')][_0x3633('0x17')](util[_0x3633('0x18')](_0x3633('0x3d'),QUERY),{'type':dbH[_0x3633('0x16')][_0x3633('0x1a')][_0x3633('0x1b')]});})[_0x3633('0x13')](extractReport)[_0x3633('0x3e')](function(_0x13fe92){logger[_0x3633('0x36')](util[_0x3633('0x18')](_0x3633('0x3f'),EXTRACTED_REPORT_ID,_0x3633('0x3b')),util[_0x3633('0x40')](_0x13fe92,{'showHidden':![],'depth':null}));return analyticExtractedReport('Failed');});}main();
\ No newline at end of file
+var _0x28dc=['moment','pdfmake/src/printer','zip-dir','../../mysqldb','dbH','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','update','hasOwnProperty','tableHeader','Empty','dirname','basename','.pdf','Setting','find','split','splitSizePdf','then','num','push','query','format','%s\x20limit\x20%d\x20OFFSET\x20%d','sequelize','QueryTypes','SELECT','join','mkdirSync','each','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','name','startDate','endDate','black','body','length','toString','content','/fonts/Roboto-Medium.ttf','/fonts/Roboto-Italic.ttf','/fonts/Roboto-MediumItalic.ttf','createPdfKitDocument','%s%d.%s','pdf','%s.%s','pipe','createWriteStream','finish','error','err','end','zip','info','CSV','Completed','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','PDF','findOne','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','lodash','util','path'];(function(_0x268fe5,_0x38ac6c){var _0x1402d2=function(_0x241c76){while(--_0x241c76){_0x268fe5['push'](_0x268fe5['shift']());}};_0x1402d2(++_0x38ac6c);}(_0x28dc,0x85));var _0xc28d=function(_0x463697,_0xccfdc4){_0x463697=_0x463697-0x0;var _0x33cfe1=_0x28dc[_0x463697];return _0x33cfe1;};'use strict';var _=require(_0xc28d('0x0'));var fs=require('fs');var BPromise=require('bluebird');var util=require(_0xc28d('0x1'));var path=require(_0xc28d('0x2'));var moment=require(_0xc28d('0x3'));var PdfPrinter=require(_0xc28d('0x4'));var zipdir=require(_0xc28d('0x5'));var rimraf=require('rimraf');var db=require(_0xc28d('0x6'))['db'];var dbH=require(_0xc28d('0x6'))[_0xc28d('0x7')];var logger=require('../../config/logger')('analytics');var EXTRACTED_REPORT_ID=Number(process[_0xc28d('0x8')][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0xc28d('0x8')][0x4];var NAME=process[_0xc28d('0x8')][0x5];var FORMAT=_0xc28d('0x9');var _extractedReport;function analyticExtractedReport(_0x5de6d2,_0x2f8fd1){var _0x23917e={'status':_0x5de6d2};var _0x1e884c={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x2f8fd1){_0x23917e[_0xc28d('0xa')]=_0x2f8fd1;}return db[_0xc28d('0xb')][_0xc28d('0xc')](_0x23917e,_0x1e884c);}function getHeader(_0x13d61a){var _0x321c59=[];for(var _0x1920ad in _0x13d61a){if(_0x13d61a[_0xc28d('0xd')](_0x1920ad)){_0x321c59['push']({'text':_0x1920ad,'style':_0xc28d('0xe')});}}return _0x321c59;}function extractReport(_0x10b9be){var _0x4e99d3=0x1388;var _0x5bed21;if(!_0x10b9be[0x0]['num']){return analyticExtractedReport(_0xc28d('0xf'));}var _0xc6766c=[];var _0x49b440=0x0;var _0x32ac44=!![];var _0x23a5dd=path[_0xc28d('0x10')](PATH);var _0x30f6ac=path[_0xc28d('0x11')](PATH,_0xc28d('0x12'));var _0x36d9d0=![];var _0xee80cc=[];return db[_0xc28d('0x13')][_0xc28d('0x14')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xc28d('0x15'),_0xc28d('0x16')]})['then'](function(_0x54eecf){if(_0x54eecf){_0x5bed21=_0x54eecf;_0x4e99d3=_0x5bed21[_0xc28d('0x16')]||0x3e8;}})[_0xc28d('0x17')](function(){if(_0x10b9be&&_0x10b9be['length']){var _0xaf4304=_0x10b9be[0x0][_0xc28d('0x18')]%(_0x49b440+_0x4e99d3);if(_0x5bed21[_0xc28d('0x15')]){for(;_0x32ac44;_0x49b440+=_0x4e99d3,_0xaf4304=_0x10b9be[0x0][_0xc28d('0x18')]%(_0x49b440+_0x4e99d3)){if(_0xaf4304==0x0||_0xaf4304==_0x10b9be[0x0][_0xc28d('0x18')]){_0x32ac44=![];}_0xc6766c[_0xc28d('0x19')](dbH['sequelize'][_0xc28d('0x1a')](util[_0xc28d('0x1b')](_0xc28d('0x1c'),QUERY,_0x4e99d3,_0x49b440),{'type':dbH[_0xc28d('0x1d')][_0xc28d('0x1e')][_0xc28d('0x1f')]}));}}else{_0xc6766c[_0xc28d('0x19')](dbH['sequelize'][_0xc28d('0x1a')](QUERY,{'type':dbH[_0xc28d('0x1d')][_0xc28d('0x1e')][_0xc28d('0x1f')]}));}}_0x36d9d0=_0x5bed21[_0xc28d('0x15')]&&_0xc6766c['length']>0x1;if(!fs['existsSync'](path[_0xc28d('0x20')](_0x23a5dd,_0x30f6ac))&&_0x36d9d0){fs[_0xc28d('0x21')](path['join'](_0x23a5dd,_0x30f6ac));}return BPromise[_0xc28d('0x22')](_0xc6766c,function(_0x4364e3){_0xee80cc['push'](_0x4364e3);});})[_0xc28d('0x17')](function(){return BPromise[_0xc28d('0x22')](_0xc6766c,function(_0x2a1e98,_0x553d64){var _0x3249d3;var _0x55d64a=util[_0xc28d('0x1b')](_0xc28d('0x23'),NAME,_extractedReport[_0xc28d('0x24')],moment(_extractedReport[_0xc28d('0x25')])['format'](FORMAT),moment(_extractedReport[_0xc28d('0x26')])['format'](FORMAT));var _0x39b6ac={'pageSize':'A4','pageOrientation':'landscape','content':[{'text':_0x55d64a,'style':'header'}],'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0xc28d('0x27')}}};var _0x217e0b={'headerRows':0x1,'body':[]};_0x217e0b[_0xc28d('0x28')][_0xc28d('0x19')](getHeader(_0x2a1e98[0x0]));var _0x2d679e;for(var _0x3a29ac=0x0;_0x3a29ac<_0x2a1e98[_0xc28d('0x29')];_0x3a29ac+=0x1){_0x2d679e=[];for(var _0x51241a in _0x2a1e98[_0x3a29ac]){if(_0x2a1e98[_0x3a29ac][_0xc28d('0xd')](_0x51241a)){_0x2d679e['push'](_0x2a1e98[_0x3a29ac][_0x51241a]?_[_0xc28d('0x2a')](_0x2a1e98[_0x3a29ac][_0x51241a]):'');}}_0x217e0b[_0xc28d('0x28')][_0xc28d('0x19')](_0x2d679e);}_0x39b6ac[_0xc28d('0x2b')][_0xc28d('0x19')]({'table':_0x217e0b});return new BPromise(function(_0x2f2512,_0x3a5b89){var _0x5f5a3f=new PdfPrinter({'Roboto':{'normal':__dirname+'/fonts/Roboto-Regular.ttf','bold':__dirname+_0xc28d('0x2c'),'italics':__dirname+_0xc28d('0x2d'),'bolditalics':__dirname+_0xc28d('0x2e')}});var _0x5bd681=_0x5f5a3f[_0xc28d('0x2f')](_0x39b6ac);if(_0x36d9d0){_0x3249d3=path[_0xc28d('0x20')](_0x23a5dd,_0x30f6ac,util[_0xc28d('0x1b')](_0xc28d('0x30'),_0x30f6ac,_0x553d64,_0xc28d('0x31')));}else{_0x3249d3=path[_0xc28d('0x20')](_0x23a5dd,util[_0xc28d('0x1b')](_0xc28d('0x32'),_0x30f6ac,_0xc28d('0x31')));}var _0x59993f=_0x5bd681[_0xc28d('0x33')](fs[_0xc28d('0x34')](_0x3249d3));_0x59993f['on'](_0xc28d('0x35'),function(){_0x2f2512();});_0x59993f['on'](_0xc28d('0x36'),function(_0x5e8fd7){console['log'](_0xc28d('0x37'),_0x5e8fd7);_0x3a5b89(_0x5e8fd7);});_0x5bd681[_0xc28d('0x38')]();});});})[_0xc28d('0x17')](function(){if(_0x36d9d0){return new BPromise(function(_0x49e40c,_0x9a8e6b){zipdir(path[_0xc28d('0x20')](_0x23a5dd,_0x30f6ac),{'saveTo':path[_0xc28d('0x20')](_0x23a5dd,util[_0xc28d('0x1b')](_0xc28d('0x32'),_0x30f6ac,_0xc28d('0x39')))},function(_0x3eb405){if(_0x3eb405){_0x9a8e6b(_0x3eb405);}else{_0x49e40c();}});});}})[_0xc28d('0x17')](function(){if(_0x36d9d0){rimraf(path[_0xc28d('0x20')](_0x23a5dd,_0x30f6ac),function(){});}})[_0xc28d('0x17')](function(){logger[_0xc28d('0x3a')](util[_0xc28d('0x1b')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0xc28d('0x3b')));return analyticExtractedReport(_0xc28d('0x3c'),_0x36d9d0?util[_0xc28d('0x1b')](_0xc28d('0x32'),_0x30f6ac,_0x36d9d0?_0xc28d('0x39'):_0xc28d('0x31')):null);});}function main(){logger[_0xc28d('0x3a')](util['format'](_0xc28d('0x3d'),EXTRACTED_REPORT_ID,_0xc28d('0x3e')));return db['AnalyticExtractedReport'][_0xc28d('0x3f')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0xc28d('0x17')](function(_0x132a1c){_extractedReport=_0x132a1c;return dbH[_0xc28d('0x1d')][_0xc28d('0x1a')](util[_0xc28d('0x1b')](_0xc28d('0x40'),QUERY),{'type':dbH[_0xc28d('0x1d')][_0xc28d('0x1e')]['SELECT']});})[_0xc28d('0x17')](extractReport)['catch'](function(_0x4d6227){logger['info'](util[_0xc28d('0x1b')](_0xc28d('0x41'),EXTRACTED_REPORT_ID,_0xc28d('0x3e')),util[_0xc28d('0x42')](_0x4d6227,{'showHidden':![],'depth':null}));return analyticExtractedReport(_0xc28d('0x43'));});}main();
\ No newline at end of file
diff --git a/server/components/export/xlsx.js b/server/components/export/xlsx.js
index 708c13a..cb307a4 100644
--- a/server/components/export/xlsx.js
+++ b/server/components/export/xlsx.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3d7a=['AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','find','split','splitSizeXlsx','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','length','push','%s\x20limit\x20%d\x20OFFSET\x20%d','dirname','basename','.xlsx','existsSync','join','%s%d.%s','%s.%s','writeFileSync','binary','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','xlsx','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','util','path','lodash','zip-dir','rimraf','../../mysqldb','../../config/logger','argv','savename'];(function(_0x3511d3,_0x4107ae){var _0x5d6321=function(_0x1a23da){while(--_0x1a23da){_0x3511d3['push'](_0x3511d3['shift']());}};_0x5d6321(++_0x4107ae);}(_0x3d7a,0x7b));var _0xa3d7=function(_0x2077be,_0x26136a){_0x2077be=_0x2077be-0x0;var _0x198bbf=_0x3d7a[_0x2077be];return _0x198bbf;};'use strict';var util=require(_0xa3d7('0x0'));var path=require(_0xa3d7('0x1'));var _=require(_0xa3d7('0x2'));var fs=require('fs');var json2xls=require('json2xls');var BPromise=require('bluebird');var zipdir=require(_0xa3d7('0x3'));var rimraf=require(_0xa3d7('0x4'));var db=require(_0xa3d7('0x5'))['db'];var dbH=require(_0xa3d7('0x5'))['dbH'];var logger=require(_0xa3d7('0x6'))('analytics');var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0xa3d7('0x7')][0x3];var PATH=process[_0xa3d7('0x7')][0x4];function analyticExtractedReport(_0x58aba8,_0x32ad4b){var _0x41a519={'status':_0x58aba8};var _0x4cfbb8={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x32ad4b){_0x41a519[_0xa3d7('0x8')]=_0x32ad4b;}return db[_0xa3d7('0x9')][_0xa3d7('0xa')](_0x41a519,_0x4cfbb8);}function main(){var _0x413a3a=0x1388;var _0x25aa25;logger[_0xa3d7('0xb')](util[_0xa3d7('0xc')](_0xa3d7('0xd'),EXTRACTED_REPORT_ID,_0xa3d7('0xe')));return db['Setting'][_0xa3d7('0xf')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xa3d7('0x10'),_0xa3d7('0x11')]})['then'](function(_0x58ee19){if(_0x58ee19){_0x25aa25=_0x58ee19;_0x413a3a=_0x25aa25['splitSizeXlsx']||0x1388;}})[_0xa3d7('0x12')](function(){return dbH[_0xa3d7('0x13')][_0xa3d7('0x14')](util[_0xa3d7('0xc')](_0xa3d7('0x15'),QUERY),{'type':dbH['sequelize'][_0xa3d7('0x16')][_0xa3d7('0x17')]});})['then'](function(_0x3dbde3){if(!_0x3dbde3[0x0][_0xa3d7('0x18')]){return analyticExtractedReport('Empty');}var _0x1d20cc=[];var _0x20852d=0x0;var _0x2069b4=!![];if(_0x25aa25[_0xa3d7('0x10')]){if(_0x3dbde3&&_0x3dbde3[_0xa3d7('0x19')]){var _0x57c3ad=_0x3dbde3[0x0][_0xa3d7('0x18')]%(_0x20852d+_0x413a3a);for(;_0x2069b4;_0x20852d+=_0x413a3a,_0x57c3ad=_0x3dbde3[0x0][_0xa3d7('0x18')]%(_0x20852d+_0x413a3a)){if(_0x57c3ad==0x0||_0x57c3ad==_0x3dbde3[0x0][_0xa3d7('0x18')]){_0x2069b4=![];}_0x1d20cc[_0xa3d7('0x1a')](dbH['sequelize']['query'](util[_0xa3d7('0xc')](_0xa3d7('0x1b'),QUERY,_0x413a3a,_0x20852d),{'type':dbH['sequelize'][_0xa3d7('0x16')][_0xa3d7('0x17')]}));}}}else{_0x1d20cc[_0xa3d7('0x1a')](dbH[_0xa3d7('0x13')][_0xa3d7('0x14')](QUERY,{'type':dbH[_0xa3d7('0x13')][_0xa3d7('0x16')][_0xa3d7('0x17')]}));}var _0x3ec62c=path[_0xa3d7('0x1c')](PATH);var _0x4efb3f=path[_0xa3d7('0x1d')](PATH,_0xa3d7('0x1e'));var _0x29a4f5=_0x25aa25[_0xa3d7('0x10')]&&_0x1d20cc['length']>0x1;var _0x3df48a=[];if(!fs[_0xa3d7('0x1f')](path['join'](_0x3ec62c,_0x4efb3f))&&_0x29a4f5){fs['mkdirSync'](path['join'](_0x3ec62c,_0x4efb3f));}return BPromise['each'](_0x1d20cc,function(_0x569274){_0x3df48a[_0xa3d7('0x1a')](_0x569274);})[_0xa3d7('0x12')](function(){for(var _0x2781f1=0x0;_0x2781f1<_0x3df48a[_0xa3d7('0x19')];_0x2781f1+=0x1){var _0x588b2a;var _0xb72216=_0x3df48a[_0x2781f1];if(_0x29a4f5){_0x588b2a=path[_0xa3d7('0x20')](_0x3ec62c,_0x4efb3f,util[_0xa3d7('0xc')](_0xa3d7('0x21'),_0x4efb3f,_0x2781f1,'xlsx'));}else{_0x588b2a=path[_0xa3d7('0x20')](_0x3ec62c,util[_0xa3d7('0xc')](_0xa3d7('0x22'),_0x4efb3f,'xlsx'));}fs[_0xa3d7('0x23')](_0x588b2a,json2xls(_0xb72216),_0xa3d7('0x24'));}})[_0xa3d7('0x12')](function(){if(_0x29a4f5){zipdir(path['join'](_0x3ec62c,_0x4efb3f),{'saveTo':path[_0xa3d7('0x20')](_0x3ec62c,util[_0xa3d7('0xc')]('%s.%s',_0x4efb3f,_0xa3d7('0x25')))},function(_0x5b1c64,_0xa6ca12){});rimraf(path[_0xa3d7('0x20')](_0x3ec62c,_0x4efb3f),function(){});}})['then'](function(){logger[_0xa3d7('0xb')](util[_0xa3d7('0xc')](_0xa3d7('0x26'),EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport(_0xa3d7('0x27'),_0x29a4f5?util[_0xa3d7('0xc')](_0xa3d7('0x22'),_0x4efb3f,_0x29a4f5?_0xa3d7('0x25'):_0xa3d7('0x28')):null);});})['catch'](function(_0x1aac95){logger[_0xa3d7('0xb')](util[_0xa3d7('0xc')](_0xa3d7('0x29'),EXTRACTED_REPORT_ID,_0xa3d7('0xe')),util[_0xa3d7('0x2a')](_0x1aac95,{'showHidden':![],'depth':null}));return analyticExtractedReport(_0xa3d7('0x2b'));});}main();
\ No newline at end of file
+var _0x6d12=['length','push','%s\x20limit\x20%d\x20OFFSET\x20%d','dirname','basename','join','mkdirSync','%s%d.%s','writeFileSync','binary','%s.%s','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','xlsx','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','util','path','lodash','json2xls','bluebird','zip-dir','rimraf','../../mysqldb','../../config/logger','analytics','argv','savename','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','find','split','splitSizeXlsx','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty'];(function(_0xa98283,_0x530e51){var _0x35b9da=function(_0x46c493){while(--_0x46c493){_0xa98283['push'](_0xa98283['shift']());}};_0x35b9da(++_0x530e51);}(_0x6d12,0x9e));var _0x26d1=function(_0x5567cd,_0x35ca37){_0x5567cd=_0x5567cd-0x0;var _0x559621=_0x6d12[_0x5567cd];return _0x559621;};'use strict';var util=require(_0x26d1('0x0'));var path=require(_0x26d1('0x1'));var _=require(_0x26d1('0x2'));var fs=require('fs');var json2xls=require(_0x26d1('0x3'));var BPromise=require(_0x26d1('0x4'));var zipdir=require(_0x26d1('0x5'));var rimraf=require(_0x26d1('0x6'));var db=require('../../mysqldb')['db'];var dbH=require(_0x26d1('0x7'))['dbH'];var logger=require(_0x26d1('0x8'))(_0x26d1('0x9'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x26d1('0xa')][0x3];var PATH=process[_0x26d1('0xa')][0x4];function analyticExtractedReport(_0x35c49e,_0x40abdb){var _0x5df607={'status':_0x35c49e};var _0x26f421={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x40abdb){_0x5df607[_0x26d1('0xb')]=_0x40abdb;}return db[_0x26d1('0xc')][_0x26d1('0xd')](_0x5df607,_0x26f421);}function main(){var _0x30661e=0x1388;var _0x1c6347;logger[_0x26d1('0xe')](util[_0x26d1('0xf')](_0x26d1('0x10'),EXTRACTED_REPORT_ID,_0x26d1('0x11')));return db[_0x26d1('0x12')][_0x26d1('0x13')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x26d1('0x14'),_0x26d1('0x15')]})[_0x26d1('0x16')](function(_0x2612b2){if(_0x2612b2){_0x1c6347=_0x2612b2;_0x30661e=_0x1c6347['splitSizeXlsx']||0x1388;}})[_0x26d1('0x16')](function(){return dbH[_0x26d1('0x17')][_0x26d1('0x18')](util[_0x26d1('0xf')](_0x26d1('0x19'),QUERY),{'type':dbH[_0x26d1('0x17')][_0x26d1('0x1a')][_0x26d1('0x1b')]});})[_0x26d1('0x16')](function(_0x55ee5f){if(!_0x55ee5f[0x0][_0x26d1('0x1c')]){return analyticExtractedReport(_0x26d1('0x1d'));}var _0x394c84=[];var _0x38a437=0x0;var _0x2de23e=!![];if(_0x1c6347['split']){if(_0x55ee5f&&_0x55ee5f[_0x26d1('0x1e')]){var _0x21c6e8=_0x55ee5f[0x0][_0x26d1('0x1c')]%(_0x38a437+_0x30661e);for(;_0x2de23e;_0x38a437+=_0x30661e,_0x21c6e8=_0x55ee5f[0x0][_0x26d1('0x1c')]%(_0x38a437+_0x30661e)){if(_0x21c6e8==0x0||_0x21c6e8==_0x55ee5f[0x0]['num']){_0x2de23e=![];}_0x394c84[_0x26d1('0x1f')](dbH[_0x26d1('0x17')][_0x26d1('0x18')](util[_0x26d1('0xf')](_0x26d1('0x20'),QUERY,_0x30661e,_0x38a437),{'type':dbH[_0x26d1('0x17')][_0x26d1('0x1a')]['SELECT']}));}}}else{_0x394c84[_0x26d1('0x1f')](dbH[_0x26d1('0x17')][_0x26d1('0x18')](QUERY,{'type':dbH[_0x26d1('0x17')][_0x26d1('0x1a')][_0x26d1('0x1b')]}));}var _0xfe75dc=path[_0x26d1('0x21')](PATH);var _0x784223=path[_0x26d1('0x22')](PATH,'.xlsx');var _0x1c24ea=_0x1c6347[_0x26d1('0x14')]&&_0x394c84[_0x26d1('0x1e')]>0x1;var _0x44fd43=[];if(!fs['existsSync'](path[_0x26d1('0x23')](_0xfe75dc,_0x784223))&&_0x1c24ea){fs[_0x26d1('0x24')](path['join'](_0xfe75dc,_0x784223));}return BPromise['each'](_0x394c84,function(_0x2e2a36){_0x44fd43[_0x26d1('0x1f')](_0x2e2a36);})['then'](function(){for(var _0x30e47e=0x0;_0x30e47e<_0x44fd43[_0x26d1('0x1e')];_0x30e47e+=0x1){var _0x597b69;var _0x5c3c37=_0x44fd43[_0x30e47e];if(_0x1c24ea){_0x597b69=path[_0x26d1('0x23')](_0xfe75dc,_0x784223,util[_0x26d1('0xf')](_0x26d1('0x25'),_0x784223,_0x30e47e,'xlsx'));}else{_0x597b69=path[_0x26d1('0x23')](_0xfe75dc,util[_0x26d1('0xf')]('%s.%s',_0x784223,'xlsx'));}fs[_0x26d1('0x26')](_0x597b69,json2xls(_0x5c3c37),_0x26d1('0x27'));}})[_0x26d1('0x16')](function(){if(_0x1c24ea){zipdir(path[_0x26d1('0x23')](_0xfe75dc,_0x784223),{'saveTo':path['join'](_0xfe75dc,util[_0x26d1('0xf')](_0x26d1('0x28'),_0x784223,_0x26d1('0x29')))},function(_0x3fc2a0,_0x347caf){});rimraf(path[_0x26d1('0x23')](_0xfe75dc,_0x784223),function(){});}})[_0x26d1('0x16')](function(){logger[_0x26d1('0xe')](util[_0x26d1('0xf')](_0x26d1('0x2a'),EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport('Completed',_0x1c24ea?util[_0x26d1('0xf')](_0x26d1('0x28'),_0x784223,_0x1c24ea?_0x26d1('0x29'):_0x26d1('0x2b')):null);});})[_0x26d1('0x2c')](function(_0x2b72b1){logger[_0x26d1('0xe')](util['format'](_0x26d1('0x2d'),EXTRACTED_REPORT_ID,_0x26d1('0x11')),util[_0x26d1('0x2e')](_0x2b72b1,{'showHidden':![],'depth':null}));return analyticExtractedReport('Failed');});}main();
\ No newline at end of file
diff --git a/server/components/extensions/rewrite.js b/server/components/extensions/rewrite.js
index b3b8714..265f58c 100644
--- a/server/components/extensions/rewrite.js
+++ b/server/components/extensions/rewrite.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd519=['$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','recordingFormat','none','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','wav','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','createdAt','*,*,*,*','interval','tag','CDR(tag)=','callerID','ExecIf','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','indexOf','app','toLowerCase','appType','custom','$[${XCALLY-MOTION-ANSWER}=0]?Answer','splice','GotoIfTime',',${EXTEN},','last','concat','bulkCreate','sortBy','catch','rewrite','lodash','util','models','Interval','findAll','then','intervals','IntervalId','VoiceExtension','uniq','map','filter','groupBy','exten','queue','playback','hasOwnProperty','priority','extensions','extension','find','push','type','format','context','VoiceExtensionId','outbound','Set','cutdigits','${EXTEN:','${EXTEN}'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xd519,0x1b6));var _0x9d51=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xd519[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x9d51('0x0'));var util=require(_0x9d51('0x1'));function rewrite(_0x4f6f8e,_0x2994e5){var _0x52eeab=this;return _0x4f6f8e[_0x9d51('0x2')][_0x9d51('0x3')][_0x9d51('0x4')]({'raw':!![]})[_0x9d51('0x5')](function(_0x3719d5){_0x52eeab[_0x9d51('0x6')]=_0x3719d5;return _0x4f6f8e[_0x9d51('0x2')]['VoiceExtension'][_0x9d51('0x4')]({'where':{'IntervalId':_0x2994e5[_0x9d51('0x7')]},'raw':!![]});})[_0x9d51('0x5')](function(_0x97cf4d){return _0x4f6f8e[_0x9d51('0x2')][_0x9d51('0x8')][_0x9d51('0x4')]({'where':{'exten':{'$in':_[_0x9d51('0x9')](_[_0x9d51('0xa')](_0x97cf4d,'exten'))}},'order':[{'raw':'CAST(priority\x20AS\x20UNSIGNED)'}],'raw':!![]});})[_0x9d51('0x5')](function(_0x199033){var _0x2466cc=_[_0x9d51('0xb')](_0x199033,{'priority':'1'});var _0x5adf83=_['filter'](_0x199033,{'isApp':0x1});var _0x1fee04=_[_0x9d51('0xc')](_0x5adf83,_0x9d51('0xd'));var _0x2f25de=[_0x9d51('0xe'),_0x9d51('0xf')];var _0xeceeb5=[];var _0xd28af=[];for(var _0x56b63f in _0x1fee04){if(_0x1fee04[_0x9d51('0x10')](_0x56b63f)){_0x52eeab[_0x9d51('0x11')]=0x2;_0x52eeab[_0x9d51('0x12')]=[];_0x52eeab[_0x9d51('0x13')]=_[_0x9d51('0x14')](_0x2466cc,{'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')]});_0x52eeab['extensions'][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':'Set','appdata':util[_0x9d51('0x17')]('CDR(type)=%s',_0x1fee04[_0x56b63f][0x0]['type']),'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab['priority']++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});if(_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')]===_0x9d51('0x1a')){if(_0x52eeab['extension']){_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0]['type'],'app':_0x9d51('0x1b'),'appdata':'CDR(destination)='+(_0x52eeab['extension'][_0x9d51('0x1c')]?_0x9d51('0x1d')+_0x52eeab[_0x9d51('0x13')][_0x9d51('0x1c')]+'}':_0x9d51('0x1e')),'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0]['exten'],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0]['VoiceExtensionId']});}_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':'CDR(routeid)='+_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')],'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0]['exten'],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});var _0x3f09fb=_0x52eeab[_0x9d51('0x11')]++;_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0]['type'],'app':'ExecIf','appdata':_0x9d51('0x1f')+(_0x3f09fb+0x2)+_0x9d51('0x20')+(_0x3f09fb+0x1)+')','context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x3f09fb,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});if(_0x52eeab['extension']){_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':_0x52eeab[_0x9d51('0x13')]['cutdigits']?_0x9d51('0x21')+_0x52eeab['extension']['cutdigits']+'}':_0x9d51('0x22'),'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});}_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':'outboundrouteid='+_0x1fee04[_0x56b63f][0x0]['VoiceExtensionId'],'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0]['VoiceExtensionId']});if(_0x52eeab[_0x9d51('0x13')]&&_0x52eeab[_0x9d51('0x13')][_0x9d51('0x10')](_0x9d51('0x23'))&&_0x52eeab['extension']['recordingFormat']!==_0x9d51('0x24')){_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':'Set','appdata':_0x9d51('0x25'),'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab['priority']++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});_0x52eeab[_0x9d51('0x12')]['push']({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':'Set','appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x52eeab[_0x9d51('0x13')][_0x9d51('0x23')]||_0x9d51('0x26'),'context':_0x1fee04[_0x56b63f][0x0]['context'],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});}}_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0]['exten'],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0]['VoiceExtensionId']});_0x52eeab[_0x9d51('0x12')]['push']({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':_0x9d51('0x27'),'context':_0x1fee04[_0x56b63f][0x0]['context'],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab['priority']++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});_0x52eeab['extensions'][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':_0x9d51('0x28'),'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'priority':_0x52eeab[_0x9d51('0x11')]++,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0]['VoiceExtensionId']});for(var _0x4047dd=0x0,_0x377fd1=0x0;_0x4047dd<_0x1fee04[_0x56b63f][_0x9d51('0x29')];_0x4047dd+=0x1,_0x377fd1=0x0){var _0xb926d3=_0x1fee04[_0x56b63f][_0x4047dd];if(_0xb926d3[_0x9d51('0x16')]){_0xb926d3[_0x9d51('0x16')]=_0xb926d3[_0x9d51('0x16')]['toLowerCase']();}var _0x121c01=[];var _0x643595=[];delete _0xb926d3['id'];delete _0xb926d3[_0x9d51('0x2a')];delete _0xb926d3['updatedAt'];var _0x9871e1=_0xb926d3['interval']!==_0x9d51('0x2b')?[_0xb926d3[_0x9d51('0x2c')]]:_0xb926d3['IntervalId']?_[_0x9d51('0xa')](_[_0x9d51('0xb')](_0x52eeab[_0x9d51('0x6')],{'IntervalId':_0xb926d3[_0x9d51('0x7')]}),_0x9d51('0x2c')):[];if(_0xb926d3[_0x9d51('0x10')](_0x9d51('0x2d'))){if(_0xb926d3[_0x9d51('0x2d')]&&_0xb926d3[_0x9d51('0x2d')]!=='--'){_0x121c01[_0x9d51('0x15')]({'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':_0x9d51('0x2e')+_0xb926d3[_0x9d51('0x2d')],'context':_0xb926d3[_0x9d51('0x18')],'exten':_0xb926d3[_0x9d51('0xd')],'priority':_0x9871e1['length']+_0x52eeab['priority']+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});}}if(_0xb926d3[_0x9d51('0x16')]===_0x9d51('0x1a')&&_0xb926d3[_0x9d51('0x10')](_0x9d51('0x2f'))){if(_0xb926d3['callerID']){_0x121c01['push']({'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x30'),'appdata':_0x9d51('0x31')+_0xb926d3['callerID']+')','context':_0xb926d3[_0x9d51('0x18')],'exten':_0xb926d3[_0x9d51('0xd')],'priority':_0x9871e1[_0x9d51('0x29')]+_0x52eeab[_0x9d51('0x11')]+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});}else{_0x121c01[_0x9d51('0x15')]({'type':_0xb926d3[_0x9d51('0x16')],'app':'ExecIf','appdata':_0x9d51('0x32'),'context':_0xb926d3[_0x9d51('0x18')],'exten':_0xb926d3[_0x9d51('0xd')],'priority':_0x9871e1['length']+_0x52eeab['priority']+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});}}if(_0xb926d3[_0x9d51('0x10')](_0x9d51('0x33'))){if(_0x2f25de[_0x9d51('0x34')](_0xb926d3[_0x9d51('0x35')][_0x9d51('0x36')]())>=0x0&&_0xb926d3[_0x9d51('0x37')]!==_0x9d51('0x38')){if(_0xb926d3[_0x9d51('0x33')]){_0x121c01['push']({'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x30'),'appdata':_0x9d51('0x39'),'context':_0xb926d3[_0x9d51('0x18')],'exten':_0xb926d3['exten'],'priority':_0x9871e1[_0x9d51('0x29')]+_0x52eeab[_0x9d51('0x11')]+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});_0x121c01['push']({'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':'XCALLY-MOTION-ANSWER=1','context':_0xb926d3[_0x9d51('0x18')],'exten':_0xb926d3[_0x9d51('0xd')],'priority':_0x9871e1[_0x9d51('0x29')]+_0x52eeab[_0x9d51('0x11')]+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});}else{_0x121c01[_0x9d51('0x15')]({'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x30'),'appdata':'$[${XCALLY-MOTION-PROGRESS}=0]?Progress','context':_0xb926d3['context'],'exten':_0xb926d3['exten'],'priority':_0x9871e1[_0x9d51('0x29')]+_0x52eeab['priority']+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});_0x121c01[_0x9d51('0x15')]({'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x1b'),'appdata':'XCALLY-MOTION-PROGRESS=1','context':_0xb926d3[_0x9d51('0x18')],'exten':_0xb926d3['exten'],'priority':_0x9871e1['length']+_0x52eeab[_0x9d51('0x11')]+_0x377fd1++,'VoiceExtensionId':_0xb926d3[_0x9d51('0x19')]});}}}for(var _0x3f3b4e=0x0;_0x3f3b4e<_0x9871e1[_0x9d51('0x29')];_0x3f3b4e+=0x1){var _0x4f08b7=_0x52eeab['priority']+_0x9871e1['length'];var _0x2bc0b8=_0x3f3b4e===_0x9871e1['length']-0x1?_0x52eeab[_0x9d51('0x11')]+_0x121c01[_0x9d51('0x29')]+_0x643595[_0x9d51('0x29')]+0x2:_0x52eeab[_0x9d51('0x11')]+_0x3f3b4e+0x1;_0x121c01[_0x9d51('0x3a')](_0x3f3b4e,0x0,{'type':_0xb926d3[_0x9d51('0x16')],'app':_0x9d51('0x3b'),'appdata':_0x9871e1[_0x3f3b4e]+'?'+_0xb926d3[_0x9d51('0x18')]+_0x9d51('0x3c')+_0x4f08b7+':'+_0xb926d3['context']+_0x9d51('0x3c')+_0x2bc0b8,'exten':_0xb926d3['exten'],'context':_0xb926d3[_0x9d51('0x18')],'priority':_0x52eeab[_0x9d51('0x11')]+_0x3f3b4e,'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});}_0xb926d3[_0x9d51('0x11')]=_0x121c01[_0x9d51('0x29')]?_[_0x9d51('0x3d')](_0x121c01)[_0x9d51('0x11')]+0x1:_0x52eeab[_0x9d51('0x11')];_0x52eeab[_0x9d51('0x11')]=(_0x643595['length']?_[_0x9d51('0x3d')](_0x643595)[_0x9d51('0x11')]:_0xb926d3[_0x9d51('0x11')])+0x1;_0x52eeab['extensions']=_[_0x9d51('0x3e')](_0x52eeab[_0x9d51('0x12')],_0x121c01,[_0xb926d3],_0x643595);}_0x52eeab[_0x9d51('0x12')][_0x9d51('0x15')]({'type':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x16')],'app':'Hangup','exten':_0x1fee04[_0x56b63f][0x0][_0x9d51('0xd')],'context':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x18')],'priority':_0x52eeab[_0x9d51('0x11')],'VoiceExtensionId':_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]});_0xeceeb5[_0x9d51('0x15')](_0x1fee04[_0x56b63f][0x0][_0x9d51('0x19')]);_0xd28af=_[_0x9d51('0x3e')](_0xd28af,_0x52eeab[_0x9d51('0x12')]);}}return _0x4f6f8e['transaction'](function(_0x5c49b8){return _0x4f6f8e[_0x9d51('0x2')][_0x9d51('0x8')]['destroy']({'where':{'VoiceExtensionId':{'$in':_0xeceeb5}},'transaction':_0x5c49b8})['then'](function(_0x5afd77){return _0x4f6f8e['models'][_0x9d51('0x8')][_0x9d51('0x3f')](_[_0x9d51('0x40')](_0xd28af,_0x9d51('0x11')),{'transaction':_0x5c49b8});});});})[_0x9d51('0x41')](function(_0x4a64bc){console['error'](_0x4a64bc);});}exports[_0x9d51('0x42')]=rewrite;
\ No newline at end of file
+var _0xc01c=['CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','exten','playback','hasOwnProperty','priority','extensions','find','push','type','Set','format','CDR(type)=%s','context','VoiceExtensionId','outbound','CDR(destination)=','extension','cutdigits','${EXTEN:','${EXTEN}','CDR(routeid)=','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','recordingFormat','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=','wav','XCALLY-MOTION-PROGRESS=0','length','createdAt','interval','map','CDR(tag)=','tag','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','indexOf','app','appType','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice','GotoIfTime',',${EXTEN},','last','concat','Hangup','transaction','destroy','sortBy','catch','util','models','findAll','then','intervals','VoiceExtension','IntervalId','uniq'];(function(_0x5418ad,_0x40742f){var _0x2cae56=function(_0x36d317){while(--_0x36d317){_0x5418ad['push'](_0x5418ad['shift']());}};_0x2cae56(++_0x40742f);}(_0xc01c,0x1c6));var _0xcc01=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc01c[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xcc01('0x0'));function rewrite(_0x4bff19,_0x19b4be){var _0x505261=this;return _0x4bff19[_0xcc01('0x1')]['Interval'][_0xcc01('0x2')]({'raw':!![]})[_0xcc01('0x3')](function(_0x4437e6){_0x505261[_0xcc01('0x4')]=_0x4437e6;return _0x4bff19[_0xcc01('0x1')][_0xcc01('0x5')][_0xcc01('0x2')]({'where':{'IntervalId':_0x19b4be[_0xcc01('0x6')]},'raw':!![]});})['then'](function(_0x352168){return _0x4bff19[_0xcc01('0x1')][_0xcc01('0x5')]['findAll']({'where':{'exten':{'$in':_[_0xcc01('0x7')](_['map'](_0x352168,'exten'))}},'order':[{'raw':_0xcc01('0x8')}],'raw':!![]});})[_0xcc01('0x3')](function(_0x31d8e6){var _0x39df15=_['filter'](_0x31d8e6,{'priority':'1'});var _0x572f6d=_[_0xcc01('0x9')](_0x31d8e6,{'isApp':0x1});var _0x4fa9bf=_[_0xcc01('0xa')](_0x572f6d,_0xcc01('0xb'));var _0x30b7c0=['queue',_0xcc01('0xc')];var _0x167435=[];var _0x611aea=[];for(var _0x260343 in _0x4fa9bf){if(_0x4fa9bf[_0xcc01('0xd')](_0x260343)){_0x505261[_0xcc01('0xe')]=0x2;_0x505261[_0xcc01('0xf')]=[];_0x505261['extension']=_[_0xcc01('0x10')](_0x39df15,{'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')]});_0x505261['extensions'][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':_0xcc01('0x13'),'appdata':util[_0xcc01('0x14')](_0xcc01('0x15'),_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')]),'context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});if(_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')]===_0xcc01('0x18')){if(_0x505261['extension']){_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0]['type'],'app':_0xcc01('0x13'),'appdata':_0xcc01('0x19')+(_0x505261[_0xcc01('0x1a')][_0xcc01('0x1b')]?_0xcc01('0x1c')+_0x505261['extension']['cutdigits']+'}':_0xcc01('0x1d')),'context':_0x4fa9bf[_0x260343][0x0]['context'],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0]['VoiceExtensionId']});}_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':_0xcc01('0x13'),'appdata':_0xcc01('0x1e')+_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')],'context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});var _0x513e89=_0x505261[_0xcc01('0xe')]++;_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':_0xcc01('0x1f'),'appdata':_0xcc01('0x20')+(_0x513e89+0x2)+'):Goto('+(_0x513e89+0x1)+')','context':_0x4fa9bf[_0x260343][0x0]['context'],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x513e89,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});if(_0x505261[_0xcc01('0x1a')]){_0x505261['extensions'][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':'Set','appdata':_0x505261[_0xcc01('0x1a')]['cutdigits']?_0xcc01('0x21')+_0x505261['extension'][_0xcc01('0x1b')]+'}':_0xcc01('0x22'),'context':_0x4fa9bf[_0x260343][0x0]['context'],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});}_0x505261['extensions'][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':_0xcc01('0x13'),'appdata':'outboundrouteid='+_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')],'context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});if(_0x505261[_0xcc01('0x1a')]&&_0x505261['extension'][_0xcc01('0xd')]('recordingFormat')&&_0x505261[_0xcc01('0x1a')][_0xcc01('0x23')]!=='none'){_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':_0xcc01('0x13'),'appdata':_0xcc01('0x24'),'context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261['priority']++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':'Set','appdata':_0xcc01('0x25')+_0x505261[_0xcc01('0x1a')][_0xcc01('0x23')]||_0xcc01('0x26'),'context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261['priority']++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});}}_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':'Set','appdata':'XCALLY-MOTION-ANSWER=0','context':_0x4fa9bf[_0x260343][0x0]['context'],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':'Set','appdata':_0xcc01('0x27'),'context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'priority':_0x505261['priority']++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});_0x505261[_0xcc01('0xf')]['push']({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':'Set','appdata':'MONITOR_OPTIONS=ab','context':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x16')],'exten':_0x4fa9bf[_0x260343][0x0]['exten'],'priority':_0x505261[_0xcc01('0xe')]++,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x17')]});for(var _0x5ca56f=0x0,_0x237790=0x0;_0x5ca56f<_0x4fa9bf[_0x260343][_0xcc01('0x28')];_0x5ca56f+=0x1,_0x237790=0x0){var _0x5421c0=_0x4fa9bf[_0x260343][_0x5ca56f];if(_0x5421c0[_0xcc01('0x12')]){_0x5421c0[_0xcc01('0x12')]=_0x5421c0[_0xcc01('0x12')]['toLowerCase']();}var _0x44a01c=[];var _0x3090db=[];delete _0x5421c0['id'];delete _0x5421c0[_0xcc01('0x29')];delete _0x5421c0['updatedAt'];var _0x3517f0=_0x5421c0[_0xcc01('0x2a')]!=='*,*,*,*'?[_0x5421c0[_0xcc01('0x2a')]]:_0x5421c0['IntervalId']?_[_0xcc01('0x2b')](_[_0xcc01('0x9')](_0x505261['intervals'],{'IntervalId':_0x5421c0[_0xcc01('0x6')]}),_0xcc01('0x2a')):[];if(_0x5421c0[_0xcc01('0xd')]('tag')){if(_0x5421c0['tag']&&_0x5421c0['tag']!=='--'){_0x44a01c[_0xcc01('0x11')]({'type':_0x5421c0[_0xcc01('0x12')],'app':_0xcc01('0x13'),'appdata':_0xcc01('0x2c')+_0x5421c0[_0xcc01('0x2d')],'context':_0x5421c0[_0xcc01('0x16')],'exten':_0x5421c0[_0xcc01('0xb')],'priority':_0x3517f0[_0xcc01('0x28')]+_0x505261[_0xcc01('0xe')]+_0x237790++,'VoiceExtensionId':_0x5421c0[_0xcc01('0x17')]});}}if(_0x5421c0['type']===_0xcc01('0x18')&&_0x5421c0[_0xcc01('0xd')](_0xcc01('0x2e'))){if(_0x5421c0[_0xcc01('0x2e')]){_0x44a01c['push']({'type':_0x5421c0[_0xcc01('0x12')],'app':_0xcc01('0x1f'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)='+_0x5421c0[_0xcc01('0x2e')]+')','context':_0x5421c0[_0xcc01('0x16')],'exten':_0x5421c0[_0xcc01('0xb')],'priority':_0x3517f0[_0xcc01('0x28')]+_0x505261[_0xcc01('0xe')]+_0x237790++,'VoiceExtensionId':_0x5421c0['VoiceExtensionId']});}else{_0x44a01c[_0xcc01('0x11')]({'type':_0x5421c0[_0xcc01('0x12')],'app':'ExecIf','appdata':_0xcc01('0x2f'),'context':_0x5421c0['context'],'exten':_0x5421c0[_0xcc01('0xb')],'priority':_0x3517f0[_0xcc01('0x28')]+_0x505261[_0xcc01('0xe')]+_0x237790++,'VoiceExtensionId':_0x5421c0['VoiceExtensionId']});}}if(_0x5421c0[_0xcc01('0xd')](_0xcc01('0x30'))){if(_0x30b7c0[_0xcc01('0x31')](_0x5421c0[_0xcc01('0x32')]['toLowerCase']())>=0x0&&_0x5421c0[_0xcc01('0x33')]!=='custom'){if(_0x5421c0[_0xcc01('0x30')]){_0x44a01c[_0xcc01('0x11')]({'type':_0x5421c0[_0xcc01('0x12')],'app':_0xcc01('0x1f'),'appdata':_0xcc01('0x34'),'context':_0x5421c0[_0xcc01('0x16')],'exten':_0x5421c0[_0xcc01('0xb')],'priority':_0x3517f0['length']+_0x505261[_0xcc01('0xe')]+_0x237790++,'VoiceExtensionId':_0x5421c0[_0xcc01('0x17')]});_0x44a01c[_0xcc01('0x11')]({'type':_0x5421c0[_0xcc01('0x12')],'app':'Set','appdata':_0xcc01('0x35'),'context':_0x5421c0[_0xcc01('0x16')],'exten':_0x5421c0[_0xcc01('0xb')],'priority':_0x3517f0[_0xcc01('0x28')]+_0x505261[_0xcc01('0xe')]+_0x237790++,'VoiceExtensionId':_0x5421c0[_0xcc01('0x17')]});}else{_0x44a01c[_0xcc01('0x11')]({'type':_0x5421c0['type'],'app':_0xcc01('0x1f'),'appdata':_0xcc01('0x36'),'context':_0x5421c0[_0xcc01('0x16')],'exten':_0x5421c0['exten'],'priority':_0x3517f0[_0xcc01('0x28')]+_0x505261[_0xcc01('0xe')]+_0x237790++,'VoiceExtensionId':_0x5421c0[_0xcc01('0x17')]});_0x44a01c['push']({'type':_0x5421c0[_0xcc01('0x12')],'app':_0xcc01('0x13'),'appdata':_0xcc01('0x37'),'context':_0x5421c0[_0xcc01('0x16')],'exten':_0x5421c0['exten'],'priority':_0x3517f0['length']+_0x505261['priority']+_0x237790++,'VoiceExtensionId':_0x5421c0[_0xcc01('0x17')]});}}}for(var _0xa86c91=0x0;_0xa86c91<_0x3517f0[_0xcc01('0x28')];_0xa86c91+=0x1){var _0x5e654f=_0x505261[_0xcc01('0xe')]+_0x3517f0[_0xcc01('0x28')];var _0x397dbd=_0xa86c91===_0x3517f0[_0xcc01('0x28')]-0x1?_0x505261[_0xcc01('0xe')]+_0x44a01c[_0xcc01('0x28')]+_0x3090db[_0xcc01('0x28')]+0x2:_0x505261[_0xcc01('0xe')]+_0xa86c91+0x1;_0x44a01c[_0xcc01('0x38')](_0xa86c91,0x0,{'type':_0x5421c0[_0xcc01('0x12')],'app':_0xcc01('0x39'),'appdata':_0x3517f0[_0xa86c91]+'?'+_0x5421c0[_0xcc01('0x16')]+_0xcc01('0x3a')+_0x5e654f+':'+_0x5421c0[_0xcc01('0x16')]+_0xcc01('0x3a')+_0x397dbd,'exten':_0x5421c0['exten'],'context':_0x5421c0[_0xcc01('0x16')],'priority':_0x505261[_0xcc01('0xe')]+_0xa86c91,'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0]['VoiceExtensionId']});}_0x5421c0[_0xcc01('0xe')]=_0x44a01c[_0xcc01('0x28')]?_[_0xcc01('0x3b')](_0x44a01c)[_0xcc01('0xe')]+0x1:_0x505261['priority'];_0x505261[_0xcc01('0xe')]=(_0x3090db[_0xcc01('0x28')]?_['last'](_0x3090db)[_0xcc01('0xe')]:_0x5421c0[_0xcc01('0xe')])+0x1;_0x505261['extensions']=_[_0xcc01('0x3c')](_0x505261[_0xcc01('0xf')],_0x44a01c,[_0x5421c0],_0x3090db);}_0x505261[_0xcc01('0xf')][_0xcc01('0x11')]({'type':_0x4fa9bf[_0x260343][0x0][_0xcc01('0x12')],'app':_0xcc01('0x3d'),'exten':_0x4fa9bf[_0x260343][0x0][_0xcc01('0xb')],'context':_0x4fa9bf[_0x260343][0x0]['context'],'priority':_0x505261['priority'],'VoiceExtensionId':_0x4fa9bf[_0x260343][0x0]['VoiceExtensionId']});_0x167435[_0xcc01('0x11')](_0x4fa9bf[_0x260343][0x0]['VoiceExtensionId']);_0x611aea=_[_0xcc01('0x3c')](_0x611aea,_0x505261[_0xcc01('0xf')]);}}return _0x4bff19[_0xcc01('0x3e')](function(_0xc9d7a0){return _0x4bff19['models'][_0xcc01('0x5')][_0xcc01('0x3f')]({'where':{'VoiceExtensionId':{'$in':_0x167435}},'transaction':_0xc9d7a0})[_0xcc01('0x3')](function(_0x36473e){return _0x4bff19[_0xcc01('0x1')]['VoiceExtension']['bulkCreate'](_[_0xcc01('0x40')](_0x611aea,'priority'),{'transaction':_0xc9d7a0});});});})[_0xcc01('0x41')](function(_0x5a171a){console['error'](_0x5a171a);});}exports['rewrite']=rewrite;
\ No newline at end of file
diff --git a/server/components/import/cm/csv.js b/server/components/import/cm/csv.js
index 1bbd530..ae56811 100644
--- a/server/components/import/cm/csv.js
+++ b/server/components/import/cm/csv.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcf8f=['emit','resume','contact:csv_','unlinkSync','exit','SIGINT','info','CSV\x20import\x20process\x20stopped!','resolve','createReadStream','parse','duplicate','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','bluebird','lodash','papaparse','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','../../../api/cmContact/cmContact.socket','register','argv','undefined','Missing\x20filepath\x20parameter!','null','Missing\x20binding\x20parameters!','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','index','test','isNil','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','message','join','data','firstName','firstName\x20not\x20specified!','birthDate','YYYY-MM-DD','isValid','email','email\x20format\x20is\x20not\x20valid!','CompanyId','length','find','Duplicate\x20Contact','CmContact','create','keys','then','pick','catch','stringify','cmContact','checkHopper','inspect','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','createdAt','select','field','toString','ListId','NOW()','updatedAt','cm_contacts','deletedAt\x20IS\x20NULL','where','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','from','\x20=\x20?','id\x20IN\x20?','str','phone\x20NOT\x20IN\x20(?)','calleridnum','cm_hopper_final','cm_hopper_black','VoiceQueue','findAll','outbound','dialCheckDuplicateType','CmList','Lists','always','push','query','VoiceQueueId','get','sequelize','Campaign','CampaignId','onlyIfOpen','all','cmContact,\x20%s,\x20%s','generalCheckHopper','Error\x20processing\x20rows\x20block:','finally'];(function(_0x2f4665,_0x5e83c3){var _0x30821a=function(_0x5b0b6c){while(--_0x5b0b6c){_0x2f4665['push'](_0x2f4665['shift']());}};_0x30821a(++_0x5e83c3);}(_0xcf8f,0x1ca));var _0xfcf8=function(_0x47c985,_0x4d73b8){_0x47c985=_0x47c985-0x0;var _0x9f74f5=_0xcf8f[_0x47c985];return _0x9f74f5;};'use strict';var BPromise=require(_0xfcf8('0x0'));var util=require('util');var _=require(_0xfcf8('0x1'));var fs=require('fs');var squel=require('squel');var Papa=require(_0xfcf8('0x2'));var Redis=require(_0xfcf8('0x3'));var db=require('../../../mysqldb')['db'];var config=require(_0xfcf8('0x4'));var logger=require('../../../config/logger')('api');config[_0xfcf8('0x5')]=_[_0xfcf8('0x6')](config[_0xfcf8('0x5')],{'host':_0xfcf8('0x7'),'port':0x18eb});var socket=require(_0xfcf8('0x8'))(new Redis(config['redis']));require(_0xfcf8('0x9'))[_0xfcf8('0xa')](socket);try{if(!process[_0xfcf8('0xb')][0x2]||process[_0xfcf8('0xb')][0x2]===_0xfcf8('0xc')||process[_0xfcf8('0xb')][0x2]==='null'){throw new Error(_0xfcf8('0xd'));}var FILEPATH=process[_0xfcf8('0xb')][0x2];if(!process[_0xfcf8('0xb')][0x3]||process[_0xfcf8('0xb')][0x3]===_0xfcf8('0xc')||process[_0xfcf8('0xb')][0x3]==='null'||!process[_0xfcf8('0xb')][0x4]||process[_0xfcf8('0xb')][0x4]==='undefined'||process[_0xfcf8('0xb')][0x4]===_0xfcf8('0xe')){throw new Error(_0xfcf8('0xf'));}var FIELDS=_['zipObject'](process[_0xfcf8('0xb')][0x3]['split'](','),process['argv'][0x4][_0xfcf8('0x10')](','));if(!process[_0xfcf8('0xb')][0x5]||process['argv'][0x5]===_0xfcf8('0xc')||process['argv'][0x5]===_0xfcf8('0xe')){throw new Error(_0xfcf8('0x11'));}var LISTID=process['argv'][0x5];var COMPANYID=process[_0xfcf8('0xb')][0x6]&&process['argv'][0x6]!==_0xfcf8('0xc')&&process[_0xfcf8('0xb')][0x6]!==_0xfcf8('0xe')?process[_0xfcf8('0xb')][0x6]:null;var DUPLICATES=process['argv'][0x7]&&process[_0xfcf8('0xb')][0x7]!==_0xfcf8('0xc')&&process[_0xfcf8('0xb')][0x7]!==_0xfcf8('0xe')?process['argv'][0x7]:null;if(!process['argv'][0x8]||process['argv'][0x8]===_0xfcf8('0xc')||process['argv'][0x8]===_0xfcf8('0xe')){throw new Error(_0xfcf8('0x12'));}var SOCKET_TIMESTAMP=process[_0xfcf8('0xb')][0x8];}catch(_0x4a4424){logger[_0xfcf8('0x13')](_0x4a4424);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x4f91fc,_0x517d71,_0xda1e2d,_0x2d5429){var _0xadf4b6={'message':_0x517d71};_0xadf4b6[_0x4f91fc]=!![];if(_0xda1e2d){_0xadf4b6[_0xfcf8('0x14')]=_0xda1e2d;}if(_0x2d5429){_0xadf4b6[_0xfcf8('0x15')]=_0x2d5429;}return _0xadf4b6;}function isEmail(_0x19289e){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))*$/[_0xfcf8('0x16')](_0x19289e);}function checkRow(_0x57a8fd,_0x551b2b,_0x307bcd){return new BPromise(function(_0x483e66,_0x16e86b){if(_[_0xfcf8('0x17')](_0x57a8fd)){return _0x16e86b(handleCheckRowError(_0xfcf8('0x13'),_0xfcf8('0x18'),null,_0x307bcd));}if(_0x57a8fd[_0xfcf8('0x19')]&&_0x57a8fd[_0xfcf8('0x19')]['length']){var _0x241499=_['map'](_0x57a8fd['errors'],_0xfcf8('0x1a'))[_0xfcf8('0x1b')](';');return _0x16e86b(handleCheckRowError(_0xfcf8('0x13'),_0x241499,null,_0x307bcd));}var _0x4f04b9={};for(var _0x52c696 in FIELDS){if(FIELDS['hasOwnProperty'](_0x52c696)&&FIELDS[_0x52c696]){_0x4f04b9[_0x52c696]=_0x57a8fd[_0xfcf8('0x1c')][0x0][FIELDS[_0x52c696]]||_0x57a8fd['data'][0x0]['\ufeff'+FIELDS[_0x52c696]];}}if(!_0x4f04b9[_0xfcf8('0x1d')]){return _0x16e86b(handleCheckRowError(_0xfcf8('0x13'),_0xfcf8('0x1e'),null,_0x307bcd));}if(!_0x4f04b9['phone']){return _0x16e86b(handleCheckRowError(_0xfcf8('0x13'),'phone\x20not\x20specified!',null,_0x307bcd));}if(_0x4f04b9[_0xfcf8('0x1f')]){var _0x42f153=moment(_0x4f04b9[_0xfcf8('0x1f')],_0xfcf8('0x20'));if(!_0x42f153[_0xfcf8('0x21')]()){return _0x16e86b(handleCheckRowError('error','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!',null,_0x307bcd));}}if(_0x4f04b9[_0xfcf8('0x22')]){if(!isEmail(_0x4f04b9['email'])){return _0x16e86b(handleCheckRowError(_0xfcf8('0x13'),_0xfcf8('0x23'),null,_0x307bcd));}}_0x4f04b9['ListId']=LISTID;_0x4f04b9[_0xfcf8('0x24')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0xfcf8('0x25')]&&_0x551b2b){var _0x46481c={};for(var _0x161458=0x0,_0x5d7976=DUPLICATES[_0xfcf8('0x25')];_0x161458<_0x5d7976;_0x161458+=0x1){_0x46481c[DUPLICATES[_0x161458]]=_0x4f04b9[DUPLICATES[_0x161458]];}var _0x5f355b=_[_0xfcf8('0x26')](_0x551b2b,_0x46481c);if(_0x5f355b){return _0x16e86b(handleCheckRowError('duplicate',_0xfcf8('0x27'),_0x5f355b,_0x307bcd));}}return db[_0xfcf8('0x28')][_0xfcf8('0x29')](_0x4f04b9,{'raw':!![],'hooks':![],'fields':_[_0xfcf8('0x2a')](_0x4f04b9)})[_0xfcf8('0x2b')](function(_0x9b97b3){if(DUPLICATES&&DUPLICATES[_0xfcf8('0x25')]&&_0x551b2b){_0x551b2b['push'](_[_0xfcf8('0x2c')](_0x4f04b9,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x9b97b3['id'];return _0x483e66();})[_0xfcf8('0x2d')](function(_0x4538ba){return _0x16e86b(handleCheckRowError('error','Error\x20while\x20creating\x20contact:\x20'+(_0x4538ba['message']||JSON[_0xfcf8('0x2e')](_0x4538ba)),null,_0x307bcd));});});}function checkHopper(){function _0x8b8983(){return function(_0x3958db){logger[_0xfcf8('0x13')](_0xfcf8('0x2f'),_0xfcf8('0x30'),util[_0xfcf8('0x31')](_0x3958db,{'showHidden':![],'depth':null}));};}var _0x435a1e=function(_0x29302d,_0x10f462){var _0x5522cc=squel[_0xfcf8('0x32')]()[_0xfcf8('0x33')](_0xfcf8('0x34'))[_0xfcf8('0x35')]([_0xfcf8('0x36'),_0xfcf8('0x37'),_0xfcf8('0x38'),'ListId',_0x10f462,_0xfcf8('0x39'),'updatedAt'],squel[_0xfcf8('0x3a')]()[_0xfcf8('0x3b')](_0xfcf8('0x36'),_0xfcf8('0x36'))[_0xfcf8('0x3b')]('NOW()','scheduledAt')[_0xfcf8('0x3b')]('id',_0xfcf8('0x38'))[_0xfcf8('0x3b')](LISTID[_0xfcf8('0x3c')](),_0xfcf8('0x3d'))[_0xfcf8('0x3b')](_0x29302d['id'][_0xfcf8('0x3c')](),_0x10f462)[_0xfcf8('0x3b')](_0xfcf8('0x3e'),_0xfcf8('0x39'))[_0xfcf8('0x3b')](_0xfcf8('0x3e'),_0xfcf8('0x3f'))['from'](_0xfcf8('0x40'))['where'](_0xfcf8('0x41'))[_0xfcf8('0x42')](_0xfcf8('0x43'),LISTID[_0xfcf8('0x3c')]())[_0xfcf8('0x42')](_0xfcf8('0x44'))[_0xfcf8('0x42')]('phone\x20NOT\x20IN\x20(?)',squel[_0xfcf8('0x3a')]()[_0xfcf8('0x3b')](_0xfcf8('0x36'))[_0xfcf8('0x45')](_0xfcf8('0x34'))[_0xfcf8('0x42')](_0x10f462+_0xfcf8('0x46'),_0x29302d['id'][_0xfcf8('0x3c')]())))['toString']();return _0x5522cc;};var _0x3762d7=function(_0xc1efa6,_0x9ea911){var _0x4ed9d6=squel[_0xfcf8('0x32')]()[_0xfcf8('0x33')](_0xfcf8('0x34'))[_0xfcf8('0x35')]([_0xfcf8('0x36'),_0xfcf8('0x37'),_0xfcf8('0x38'),_0xfcf8('0x3d'),_0x9ea911,'createdAt',_0xfcf8('0x3f')],squel[_0xfcf8('0x3a')]()[_0xfcf8('0x3b')](_0xfcf8('0x36'),_0xfcf8('0x36'))[_0xfcf8('0x3b')](_0xfcf8('0x3e'),_0xfcf8('0x37'))[_0xfcf8('0x3b')]('id',_0xfcf8('0x38'))['field'](LISTID[_0xfcf8('0x3c')](),_0xfcf8('0x3d'))[_0xfcf8('0x3b')](_0xc1efa6['id'][_0xfcf8('0x3c')](),_0x9ea911)['field'](_0xfcf8('0x3e'),_0xfcf8('0x39'))[_0xfcf8('0x3b')](_0xfcf8('0x3e'),_0xfcf8('0x3f'))[_0xfcf8('0x45')](_0xfcf8('0x40'))['where'](_0xfcf8('0x41'))[_0xfcf8('0x42')]('ListId\x20=\x20?',LISTID['toString']())[_0xfcf8('0x42')](_0xfcf8('0x47'),squel[_0xfcf8('0x48')](hopperContacts))[_0xfcf8('0x42')](_0xfcf8('0x44'))['where'](_0xfcf8('0x49'),squel['select']()[_0xfcf8('0x3b')](_0xfcf8('0x4a'))['from'](_0xfcf8('0x4b'))[_0xfcf8('0x42')](_0x9ea911+_0xfcf8('0x46'),_0xc1efa6['id']['toString']()))[_0xfcf8('0x42')](_0xfcf8('0x49'),squel[_0xfcf8('0x3a')]()['field'](_0xfcf8('0x36'))[_0xfcf8('0x45')](_0xfcf8('0x34'))[_0xfcf8('0x42')](_0x9ea911+_0xfcf8('0x46'),_0xc1efa6['id']['toString']())))[_0xfcf8('0x3c')]();return _0x4ed9d6;};function _0x497609(_0x43152c,_0x5b5268){var _0x5924f2=squel[_0xfcf8('0x32')]()[_0xfcf8('0x33')](_0xfcf8('0x34'))['fromQuery']([_0xfcf8('0x36'),_0xfcf8('0x37'),_0xfcf8('0x38'),_0xfcf8('0x3d'),_0x5b5268,_0xfcf8('0x39'),'updatedAt'],squel[_0xfcf8('0x3a')]()['field']('phone','phone')['field']('NOW()','scheduledAt')[_0xfcf8('0x3b')]('id','ContactId')[_0xfcf8('0x3b')](LISTID[_0xfcf8('0x3c')](),_0xfcf8('0x3d'))[_0xfcf8('0x3b')](_0x43152c['id'][_0xfcf8('0x3c')](),_0x5b5268)[_0xfcf8('0x3b')](_0xfcf8('0x3e'),_0xfcf8('0x39'))[_0xfcf8('0x3b')](_0xfcf8('0x3e'),_0xfcf8('0x3f'))[_0xfcf8('0x45')](_0xfcf8('0x40'))[_0xfcf8('0x42')](_0xfcf8('0x41'))[_0xfcf8('0x42')]('ListId\x20=\x20?',LISTID[_0xfcf8('0x3c')]())[_0xfcf8('0x42')]('id\x20IN\x20?',squel[_0xfcf8('0x48')](hopperContacts))['where'](_0xfcf8('0x44')))[_0xfcf8('0x3c')]();return _0x5924f2;}function _0x1a0460(_0x3db5e1,_0x48859d){var _0xa95d2b=squel[_0xfcf8('0x32')]()['into'](_0xfcf8('0x4c'))[_0xfcf8('0x35')]([_0xfcf8('0x36'),_0xfcf8('0x38'),'ListId',_0x48859d,_0xfcf8('0x39'),_0xfcf8('0x3f')],squel[_0xfcf8('0x3a')]()['field'](_0xfcf8('0x36'),_0xfcf8('0x36'))['field']('id',_0xfcf8('0x38'))[_0xfcf8('0x3b')](LISTID['toString'](),_0xfcf8('0x3d'))[_0xfcf8('0x3b')](_0x3db5e1['id'][_0xfcf8('0x3c')](),_0x48859d)[_0xfcf8('0x3b')]('NOW()',_0xfcf8('0x39'))['field'](_0xfcf8('0x3e'),_0xfcf8('0x3f'))['from'](_0xfcf8('0x40'))[_0xfcf8('0x42')](_0xfcf8('0x41'))[_0xfcf8('0x42')](_0xfcf8('0x43'),LISTID[_0xfcf8('0x3c')]())[_0xfcf8('0x42')](_0xfcf8('0x47'),squel[_0xfcf8('0x48')](hopperContacts))[_0xfcf8('0x42')](_0xfcf8('0x44')))[_0xfcf8('0x3c')]();return _0xa95d2b;}return db[_0xfcf8('0x4d')][_0xfcf8('0x4e')]({'where':{'type':_0xfcf8('0x4f')},'attributes':['id',_0xfcf8('0x50')],'include':[{'model':db[_0xfcf8('0x51')],'as':_0xfcf8('0x52'),'where':{'id':LISTID}}]})[_0xfcf8('0x2b')](function(_0x1c29f1){var _0x3aa527=[];if(_0x1c29f1){var _0x1a7359;for(var _0x2f551e=0x0,_0x1fe971;_0x2f551e<_0x1c29f1['length'];_0x2f551e+=0x1){_0x1fe971=_0x1c29f1[_0x2f551e]['get']({'plain':!![]});switch(_0x1fe971[_0xfcf8('0x50')]){case _0xfcf8('0x53'):_0x3aa527[_0xfcf8('0x54')](db['sequelize'][_0xfcf8('0x55')](_0x3762d7(_0x1fe971,_0xfcf8('0x56')))['then'](function(){})[_0xfcf8('0x2d')](_0x8b8983()));break;case'onlyIfOpen':_0x3aa527[_0xfcf8('0x54')](db['sequelize'][_0xfcf8('0x55')](_0x435a1e(_0x1fe971,_0xfcf8('0x56')))[_0xfcf8('0x2b')](function(){})[_0xfcf8('0x2d')](_0x8b8983()));break;default:_0x3aa527[_0xfcf8('0x54')](db['sequelize'][_0xfcf8('0x55')](_0x497609(_0x1fe971,_0xfcf8('0x56')))[_0xfcf8('0x2b')](function(){})[_0xfcf8('0x2d')](_0x8b8983()));}}}return _0x3aa527;})['all']()['then'](function(){return db['VoiceQueue'][_0xfcf8('0x4e')]({'where':{'type':'outbound'},'attributes':['id'],'include':[{'model':db[_0xfcf8('0x51')],'as':'BlackLists','where':{'id':LISTID}}]})[_0xfcf8('0x2b')](function(_0x11645d){var _0x51a51b=[];if(_0x11645d){var _0x108b2c;for(var _0x17d7dc=0x0,_0x900f8f;_0x17d7dc<_0x11645d[_0xfcf8('0x25')];_0x17d7dc+=0x1){_0x900f8f=_0x11645d[_0x17d7dc][_0xfcf8('0x57')]({'plain':!![]});_0x51a51b[_0xfcf8('0x54')](db[_0xfcf8('0x58')][_0xfcf8('0x55')](_0x1a0460(_0x900f8f,_0xfcf8('0x56')))['then'](function(){})[_0xfcf8('0x2d')](_0x8b8983()));}}return _0x51a51b;})['all']();})['then'](function(){return db[_0xfcf8('0x59')][_0xfcf8('0x4e')]({'attributes':['id',_0xfcf8('0x50')],'include':[{'model':db['CmList'],'as':_0xfcf8('0x52'),'where':{'id':LISTID}}]})[_0xfcf8('0x2b')](function(_0x3b89d2){var _0x1ff1db=[];if(_0x3b89d2){for(var _0x46005c=0x0,_0x19e9b8;_0x46005c<_0x3b89d2['length'];_0x46005c+=0x1){_0x19e9b8=_0x3b89d2[_0x46005c][_0xfcf8('0x57')]({'plain':!![]});switch(_0x19e9b8[_0xfcf8('0x50')]){case _0xfcf8('0x53'):_0x1ff1db[_0xfcf8('0x54')](db[_0xfcf8('0x58')][_0xfcf8('0x55')](_0x3762d7(_0x19e9b8,_0xfcf8('0x5a')))['then'](function(){})[_0xfcf8('0x2d')](_0x8b8983()));break;case _0xfcf8('0x5b'):_0x1ff1db['push'](db[_0xfcf8('0x58')][_0xfcf8('0x55')](_0x435a1e(_0x19e9b8,_0xfcf8('0x5a')))[_0xfcf8('0x2b')](function(){})[_0xfcf8('0x2d')](_0x8b8983()));break;default:_0x1ff1db[_0xfcf8('0x54')](db[_0xfcf8('0x58')][_0xfcf8('0x55')](_0x497609(_0x19e9b8,'CampaignId'))[_0xfcf8('0x2b')](function(){})[_0xfcf8('0x2d')](_0x8b8983()));}}}return _0x1ff1db;})[_0xfcf8('0x5c')]();})['then'](function(){return db[_0xfcf8('0x59')]['findAll']({'attributes':['id'],'include':[{'model':db[_0xfcf8('0x51')],'as':'BlackLists','where':{'id':LISTID}}]})[_0xfcf8('0x2b')](function(_0x387071){var _0x3ac256=[];if(_0x387071){for(var _0x1b4595=0x0,_0x56d85b;_0x1b4595<_0x387071[_0xfcf8('0x25')];_0x1b4595+=0x1){_0x56d85b=_0x387071[_0x1b4595]['get']({'plain':!![]});_0x3ac256[_0xfcf8('0x54')](db['sequelize'][_0xfcf8('0x55')](_0x1a0460(_0x56d85b,'CampaignId'))[_0xfcf8('0x2b')](function(){})['catch'](_0x8b8983()));}}return _0x3ac256;})[_0xfcf8('0x5c')]();})[_0xfcf8('0x2d')](function(_0x484594){logger[_0xfcf8('0x13')](_0xfcf8('0x5d'),_0xfcf8('0x5e'),_0x484594[_0xfcf8('0x1a')]);});}var processPromises=function(_0x49bced){return BPromise[_0xfcf8('0x5c')](promises)['then'](function(_0x3d2fc9){})[_0xfcf8('0x2d')](function(_0x2fe945){logger[_0xfcf8('0x13')](_0xfcf8('0x5f'),JSON[_0xfcf8('0x2e')](_0x2fe945));})[_0xfcf8('0x60')](function(){socket[_0xfcf8('0x61')]('contact:csv_'+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x49bced){return _0x49bced[_0xfcf8('0x62')]();}});};var endCsv=function(){return BPromise['resolve']()[_0xfcf8('0x2b')](function(){if(hopperContacts){return checkHopper();}})['then'](function(){socket[_0xfcf8('0x61')](_0xfcf8('0x63')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0xfcf8('0x64')](FILEPATH);}catch(_0x17dc47){logger[_0xfcf8('0x13')]('Unable\x20to\x20delete\x20temp\x20file:',JSON['stringify'](_0x17dc47));}finally{process[_0xfcf8('0x65')](0x0);}});};process['on'](_0xfcf8('0x66'),function(){logger[_0xfcf8('0x67')](_0xfcf8('0x68'));endCsv();});function main(){return BPromise[_0xfcf8('0x69')]()['then'](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0xfcf8('0x10')](',');return db[_0xfcf8('0x28')]['findAll']({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0xfcf8('0x2b')](function(_0x12383a){var _0x18f159=fs[_0xfcf8('0x6a')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0xfcf8('0x6b')](_0x18f159,{'header':!![],'skipEmptyLines':!![],'step':function(_0x3d762f,_0x45728f){total+=0x1;var _0x491cf5=total;promises[_0xfcf8('0x54')](checkRow(_0x3d762f,_0x12383a,_0x491cf5)[_0xfcf8('0x2b')](function(){success+=0x1;})[_0xfcf8('0x2d')](function(_0x3b0a52){if(_0x3b0a52[_0xfcf8('0x13')]){errors+=0x1;delete _0x3b0a52[_0xfcf8('0x13')];}else if(_0x3b0a52[_0xfcf8('0x6c')]){duplicates+=0x1;delete _0x3b0a52['duplicate'];}rows['push'](_0x3b0a52);}));if(total%0xc8===0x0){_0x45728f['pause']();return processPromises(_0x45728f);}},'complete':function(){return processPromises()[_0xfcf8('0x2b')](function(){logger[_0xfcf8('0x67')](_0xfcf8('0x6d'));endCsv();});},'error':function(_0x483311,_0x2e3cb6){logger['info'](_0xfcf8('0x6e'),JSON[_0xfcf8('0x2e')](_0x483311));endCsv();}});})[_0xfcf8('0x2d')](function(_0x43f9aa){logger[_0xfcf8('0x13')]('Error\x20executing\x20contact\x20csv\x20import:',JSON[_0xfcf8('0x2e')](_0x43f9aa));});}main();
\ No newline at end of file
+var _0xb730=['map','join','hasOwnProperty','data','firstName','firstName\x20not\x20specified!','phone','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!','email','email\x20format\x20is\x20not\x20valid!','ListId','CompanyId','length','find','duplicate','CmContact','create','then','push','pick','catch','Error\x20while\x20creating\x20contact:\x20','message','stringify','cmContact','checkHopper','inspect','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','createdAt','select','field','NOW()','toString','updatedAt','from','cm_contacts','where','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','\x20=\x20?','deletedAt\x20IS\x20NULL','id\x20IN\x20?','str','phone\x20NOT\x20IN\x20(?)','calleridnum','cm_hopper_final','VoiceQueue','outbound','dialCheckDuplicateType','CmList','get','always','sequelize','query','VoiceQueueId','onlyIfOpen','all','findAll','Campaign','Lists','CampaignId','BlackLists','cmContact,\x20%s,\x20%s','generalCheckHopper','Error\x20processing\x20rows\x20block:','finally','emit','contact:csv_','resume','resolve','Unable\x20to\x20delete\x20temp\x20file:','exit','SIGINT','info','CSV\x20import\x20process\x20stopped!','createReadStream','parse','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','Error\x20executing\x20contact\x20csv\x20import:','bluebird','util','squel','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','api','redis','defaults','localhost','socket.io-emitter','register','argv','undefined','null','Missing\x20filepath\x20parameter!','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','test','isNil','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors'];(function(_0x56cba1,_0x2b23c1){var _0x3ddfdf=function(_0x1f8771){while(--_0x1f8771){_0x56cba1['push'](_0x56cba1['shift']());}};_0x3ddfdf(++_0x2b23c1);}(_0xb730,0xca));var _0x0b73=function(_0x2fbe2e,_0x58fbcb){_0x2fbe2e=_0x2fbe2e-0x0;var _0x2963dd=_0xb730[_0x2fbe2e];return _0x2963dd;};'use strict';var BPromise=require(_0x0b73('0x0'));var util=require(_0x0b73('0x1'));var _=require('lodash');var fs=require('fs');var squel=require(_0x0b73('0x2'));var Papa=require('papaparse');var Redis=require(_0x0b73('0x3'));var db=require(_0x0b73('0x4'))['db'];var config=require(_0x0b73('0x5'));var logger=require(_0x0b73('0x6'))(_0x0b73('0x7'));config[_0x0b73('0x8')]=_[_0x0b73('0x9')](config['redis'],{'host':_0x0b73('0xa'),'port':0x18eb});var socket=require(_0x0b73('0xb'))(new Redis(config[_0x0b73('0x8')]));require('../../../api/cmContact/cmContact.socket')[_0x0b73('0xc')](socket);try{if(!process[_0x0b73('0xd')][0x2]||process[_0x0b73('0xd')][0x2]===_0x0b73('0xe')||process[_0x0b73('0xd')][0x2]===_0x0b73('0xf')){throw new Error(_0x0b73('0x10'));}var FILEPATH=process[_0x0b73('0xd')][0x2];if(!process['argv'][0x3]||process['argv'][0x3]==='undefined'||process[_0x0b73('0xd')][0x3]===_0x0b73('0xf')||!process['argv'][0x4]||process['argv'][0x4]===_0x0b73('0xe')||process[_0x0b73('0xd')][0x4]===_0x0b73('0xf')){throw new Error('Missing\x20binding\x20parameters!');}var FIELDS=_['zipObject'](process[_0x0b73('0xd')][0x3][_0x0b73('0x11')](','),process[_0x0b73('0xd')][0x4]['split'](','));if(!process['argv'][0x5]||process['argv'][0x5]===_0x0b73('0xe')||process[_0x0b73('0xd')][0x5]==='null'){throw new Error(_0x0b73('0x12'));}var LISTID=process[_0x0b73('0xd')][0x5];var COMPANYID=process[_0x0b73('0xd')][0x6]&&process['argv'][0x6]!==_0x0b73('0xe')&&process[_0x0b73('0xd')][0x6]!==_0x0b73('0xf')?process['argv'][0x6]:null;var DUPLICATES=process[_0x0b73('0xd')][0x7]&&process['argv'][0x7]!==_0x0b73('0xe')&&process[_0x0b73('0xd')][0x7]!==_0x0b73('0xf')?process[_0x0b73('0xd')][0x7]:null;if(!process[_0x0b73('0xd')][0x8]||process[_0x0b73('0xd')][0x8]===_0x0b73('0xe')||process[_0x0b73('0xd')][0x8]===_0x0b73('0xf')){throw new Error(_0x0b73('0x13'));}var SOCKET_TIMESTAMP=process[_0x0b73('0xd')][0x8];}catch(_0x3a5b1a){logger[_0x0b73('0x14')](_0x3a5b1a);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x51c5b0,_0x5284e6,_0x10dabe,_0x5dd2d6){var _0x407c32={'message':_0x5284e6};_0x407c32[_0x51c5b0]=!![];if(_0x10dabe){_0x407c32[_0x0b73('0x15')]=_0x10dabe;}if(_0x5dd2d6){_0x407c32['index']=_0x5dd2d6;}return _0x407c32;}function isEmail(_0x5cfb5d){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))*$/[_0x0b73('0x16')](_0x5cfb5d);}function checkRow(_0xb4e7ff,_0x6cdc2a,_0x3f558d){return new BPromise(function(_0xab40cb,_0x150daa){if(_[_0x0b73('0x17')](_0xb4e7ff)){return _0x150daa(handleCheckRowError('error',_0x0b73('0x18'),null,_0x3f558d));}if(_0xb4e7ff[_0x0b73('0x19')]&&_0xb4e7ff['errors']['length']){var _0x3ee325=_[_0x0b73('0x1a')](_0xb4e7ff['errors'],'message')[_0x0b73('0x1b')](';');return _0x150daa(handleCheckRowError(_0x0b73('0x14'),_0x3ee325,null,_0x3f558d));}var _0x221fa0={};for(var _0x43cf7c in FIELDS){if(FIELDS[_0x0b73('0x1c')](_0x43cf7c)&&FIELDS[_0x43cf7c]){_0x221fa0[_0x43cf7c]=_0xb4e7ff[_0x0b73('0x1d')][0x0][FIELDS[_0x43cf7c]]||_0xb4e7ff[_0x0b73('0x1d')][0x0]['\ufeff'+FIELDS[_0x43cf7c]];}}if(!_0x221fa0[_0x0b73('0x1e')]){return _0x150daa(handleCheckRowError(_0x0b73('0x14'),_0x0b73('0x1f'),null,_0x3f558d));}if(!_0x221fa0[_0x0b73('0x20')]){return _0x150daa(handleCheckRowError('error',_0x0b73('0x21'),null,_0x3f558d));}if(_0x221fa0['birthDate']){var _0x40de57=moment(_0x221fa0[_0x0b73('0x22')],_0x0b73('0x23'));if(!_0x40de57['isValid']()){return _0x150daa(handleCheckRowError(_0x0b73('0x14'),_0x0b73('0x24'),null,_0x3f558d));}}if(_0x221fa0['email']){if(!isEmail(_0x221fa0[_0x0b73('0x25')])){return _0x150daa(handleCheckRowError('error',_0x0b73('0x26'),null,_0x3f558d));}}_0x221fa0[_0x0b73('0x27')]=LISTID;_0x221fa0[_0x0b73('0x28')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x0b73('0x29')]&&_0x6cdc2a){var _0x5d46cc={};for(var _0x235af5=0x0,_0x43c9b6=DUPLICATES[_0x0b73('0x29')];_0x235af5<_0x43c9b6;_0x235af5+=0x1){_0x5d46cc[DUPLICATES[_0x235af5]]=_0x221fa0[DUPLICATES[_0x235af5]];}var _0x5f4fe7=_[_0x0b73('0x2a')](_0x6cdc2a,_0x5d46cc);if(_0x5f4fe7){return _0x150daa(handleCheckRowError(_0x0b73('0x2b'),'Duplicate\x20Contact',_0x5f4fe7,_0x3f558d));}}return db[_0x0b73('0x2c')][_0x0b73('0x2d')](_0x221fa0,{'raw':!![],'hooks':![],'fields':_['keys'](_0x221fa0)})[_0x0b73('0x2e')](function(_0xfba8f2){if(DUPLICATES&&DUPLICATES[_0x0b73('0x29')]&&_0x6cdc2a){_0x6cdc2a[_0x0b73('0x2f')](_[_0x0b73('0x30')](_0x221fa0,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0xfba8f2['id'];return _0xab40cb();})[_0x0b73('0x31')](function(_0x481fa7){return _0x150daa(handleCheckRowError(_0x0b73('0x14'),_0x0b73('0x32')+(_0x481fa7[_0x0b73('0x33')]||JSON[_0x0b73('0x34')](_0x481fa7)),null,_0x3f558d));});});}function checkHopper(){function _0x26919c(){return function(_0x5af751){logger[_0x0b73('0x14')](_0x0b73('0x35'),_0x0b73('0x36'),util[_0x0b73('0x37')](_0x5af751,{'showHidden':![],'depth':null}));};}var _0x52ee6b=function(_0x1f71f4,_0x1b5be1){var _0x5949bc=squel[_0x0b73('0x38')]()[_0x0b73('0x39')](_0x0b73('0x3a'))[_0x0b73('0x3b')]([_0x0b73('0x20'),_0x0b73('0x3c'),_0x0b73('0x3d'),'ListId',_0x1b5be1,_0x0b73('0x3e'),'updatedAt'],squel[_0x0b73('0x3f')]()[_0x0b73('0x40')](_0x0b73('0x20'),'phone')[_0x0b73('0x40')](_0x0b73('0x41'),'scheduledAt')[_0x0b73('0x40')]('id',_0x0b73('0x3d'))['field'](LISTID[_0x0b73('0x42')](),_0x0b73('0x27'))['field'](_0x1f71f4['id'][_0x0b73('0x42')](),_0x1b5be1)[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x3e'))[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x43'))[_0x0b73('0x44')](_0x0b73('0x45'))[_0x0b73('0x46')]('deletedAt\x20IS\x20NULL')[_0x0b73('0x46')](_0x0b73('0x47'),LISTID[_0x0b73('0x42')]())[_0x0b73('0x46')](_0x0b73('0x48'))[_0x0b73('0x46')]('phone\x20NOT\x20IN\x20(?)',squel[_0x0b73('0x3f')]()[_0x0b73('0x40')](_0x0b73('0x20'))['from'](_0x0b73('0x3a'))['where'](_0x1b5be1+_0x0b73('0x49'),_0x1f71f4['id'][_0x0b73('0x42')]())))['toString']();return _0x5949bc;};var _0x4f67f7=function(_0x1c11c6,_0x263ac6){var _0x21d3b6=squel[_0x0b73('0x38')]()[_0x0b73('0x39')]('cm_hopper')[_0x0b73('0x3b')](['phone','scheduledAt','ContactId',_0x0b73('0x27'),_0x263ac6,'createdAt',_0x0b73('0x43')],squel[_0x0b73('0x3f')]()[_0x0b73('0x40')]('phone','phone')[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x3c'))[_0x0b73('0x40')]('id',_0x0b73('0x3d'))[_0x0b73('0x40')](LISTID[_0x0b73('0x42')](),'ListId')[_0x0b73('0x40')](_0x1c11c6['id'][_0x0b73('0x42')](),_0x263ac6)[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x3e'))[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x43'))['from'](_0x0b73('0x45'))[_0x0b73('0x46')](_0x0b73('0x4a'))[_0x0b73('0x46')](_0x0b73('0x47'),LISTID[_0x0b73('0x42')]())['where'](_0x0b73('0x4b'),squel[_0x0b73('0x4c')](hopperContacts))[_0x0b73('0x46')](_0x0b73('0x48'))[_0x0b73('0x46')](_0x0b73('0x4d'),squel[_0x0b73('0x3f')]()[_0x0b73('0x40')](_0x0b73('0x4e'))[_0x0b73('0x44')](_0x0b73('0x4f'))['where'](_0x263ac6+_0x0b73('0x49'),_0x1c11c6['id']['toString']()))[_0x0b73('0x46')](_0x0b73('0x4d'),squel[_0x0b73('0x3f')]()[_0x0b73('0x40')]('phone')[_0x0b73('0x44')](_0x0b73('0x3a'))[_0x0b73('0x46')](_0x263ac6+'\x20=\x20?',_0x1c11c6['id'][_0x0b73('0x42')]())))[_0x0b73('0x42')]();return _0x21d3b6;};function _0x5d3b36(_0x3556b5,_0x2fdcce){var _0x929dd3=squel['insert']()['into'](_0x0b73('0x3a'))['fromQuery']([_0x0b73('0x20'),_0x0b73('0x3c'),_0x0b73('0x3d'),'ListId',_0x2fdcce,_0x0b73('0x3e'),_0x0b73('0x43')],squel[_0x0b73('0x3f')]()[_0x0b73('0x40')](_0x0b73('0x20'),_0x0b73('0x20'))[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x3c'))[_0x0b73('0x40')]('id',_0x0b73('0x3d'))[_0x0b73('0x40')](LISTID['toString'](),'ListId')[_0x0b73('0x40')](_0x3556b5['id'][_0x0b73('0x42')](),_0x2fdcce)[_0x0b73('0x40')]('NOW()',_0x0b73('0x3e'))[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x43'))[_0x0b73('0x44')](_0x0b73('0x45'))[_0x0b73('0x46')]('deletedAt\x20IS\x20NULL')[_0x0b73('0x46')]('ListId\x20=\x20?',LISTID[_0x0b73('0x42')]())[_0x0b73('0x46')](_0x0b73('0x4b'),squel[_0x0b73('0x4c')](hopperContacts))[_0x0b73('0x46')]('phone\x20IS\x20NOT\x20NULL'))[_0x0b73('0x42')]();return _0x929dd3;}function _0x4be32c(_0x362729,_0x20dcc9){var _0x3fd922=squel[_0x0b73('0x38')]()[_0x0b73('0x39')]('cm_hopper_black')['fromQuery']([_0x0b73('0x20'),_0x0b73('0x3d'),_0x0b73('0x27'),_0x20dcc9,_0x0b73('0x3e'),_0x0b73('0x43')],squel['select']()[_0x0b73('0x40')](_0x0b73('0x20'),_0x0b73('0x20'))['field']('id',_0x0b73('0x3d'))[_0x0b73('0x40')](LISTID[_0x0b73('0x42')](),_0x0b73('0x27'))[_0x0b73('0x40')](_0x362729['id'][_0x0b73('0x42')](),_0x20dcc9)[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x3e'))[_0x0b73('0x40')](_0x0b73('0x41'),_0x0b73('0x43'))[_0x0b73('0x44')](_0x0b73('0x45'))[_0x0b73('0x46')](_0x0b73('0x4a'))[_0x0b73('0x46')](_0x0b73('0x47'),LISTID[_0x0b73('0x42')]())['where']('id\x20IN\x20?',squel[_0x0b73('0x4c')](hopperContacts))[_0x0b73('0x46')](_0x0b73('0x48')))[_0x0b73('0x42')]();return _0x3fd922;}return db[_0x0b73('0x50')]['findAll']({'where':{'type':_0x0b73('0x51')},'attributes':['id',_0x0b73('0x52')],'include':[{'model':db[_0x0b73('0x53')],'as':'Lists','where':{'id':LISTID}}]})[_0x0b73('0x2e')](function(_0xc13f9b){var _0x3ad9d9=[];if(_0xc13f9b){var _0x5b45aa;for(var _0x2d2014=0x0,_0x85de84;_0x2d2014<_0xc13f9b[_0x0b73('0x29')];_0x2d2014+=0x1){_0x85de84=_0xc13f9b[_0x2d2014][_0x0b73('0x54')]({'plain':!![]});switch(_0x85de84[_0x0b73('0x52')]){case _0x0b73('0x55'):_0x3ad9d9['push'](db[_0x0b73('0x56')][_0x0b73('0x57')](_0x4f67f7(_0x85de84,_0x0b73('0x58')))[_0x0b73('0x2e')](function(){})[_0x0b73('0x31')](_0x26919c()));break;case _0x0b73('0x59'):_0x3ad9d9[_0x0b73('0x2f')](db['sequelize'][_0x0b73('0x57')](_0x52ee6b(_0x85de84,_0x0b73('0x58')))[_0x0b73('0x2e')](function(){})[_0x0b73('0x31')](_0x26919c()));break;default:_0x3ad9d9[_0x0b73('0x2f')](db[_0x0b73('0x56')][_0x0b73('0x57')](_0x5d3b36(_0x85de84,_0x0b73('0x58')))[_0x0b73('0x2e')](function(){})[_0x0b73('0x31')](_0x26919c()));}}}return _0x3ad9d9;})[_0x0b73('0x5a')]()[_0x0b73('0x2e')](function(){return db[_0x0b73('0x50')][_0x0b73('0x5b')]({'where':{'type':'outbound'},'attributes':['id'],'include':[{'model':db[_0x0b73('0x53')],'as':'BlackLists','where':{'id':LISTID}}]})[_0x0b73('0x2e')](function(_0x3b7658){var _0x1e8122=[];if(_0x3b7658){var _0x530359;for(var _0x46b984=0x0,_0x45f682;_0x46b984<_0x3b7658[_0x0b73('0x29')];_0x46b984+=0x1){_0x45f682=_0x3b7658[_0x46b984][_0x0b73('0x54')]({'plain':!![]});_0x1e8122[_0x0b73('0x2f')](db[_0x0b73('0x56')]['query'](_0x4be32c(_0x45f682,'VoiceQueueId'))[_0x0b73('0x2e')](function(){})[_0x0b73('0x31')](_0x26919c()));}}return _0x1e8122;})[_0x0b73('0x5a')]();})[_0x0b73('0x2e')](function(){return db[_0x0b73('0x5c')]['findAll']({'attributes':['id',_0x0b73('0x52')],'include':[{'model':db[_0x0b73('0x53')],'as':_0x0b73('0x5d'),'where':{'id':LISTID}}]})[_0x0b73('0x2e')](function(_0x3fe79d){var _0x3044ee=[];if(_0x3fe79d){for(var _0x46e7c4=0x0,_0x563ef6;_0x46e7c4<_0x3fe79d[_0x0b73('0x29')];_0x46e7c4+=0x1){_0x563ef6=_0x3fe79d[_0x46e7c4][_0x0b73('0x54')]({'plain':!![]});switch(_0x563ef6[_0x0b73('0x52')]){case _0x0b73('0x55'):_0x3044ee[_0x0b73('0x2f')](db[_0x0b73('0x56')][_0x0b73('0x57')](_0x4f67f7(_0x563ef6,_0x0b73('0x5e')))['then'](function(){})[_0x0b73('0x31')](_0x26919c()));break;case _0x0b73('0x59'):_0x3044ee[_0x0b73('0x2f')](db[_0x0b73('0x56')][_0x0b73('0x57')](_0x52ee6b(_0x563ef6,_0x0b73('0x5e')))[_0x0b73('0x2e')](function(){})['catch'](_0x26919c()));break;default:_0x3044ee['push'](db[_0x0b73('0x56')][_0x0b73('0x57')](_0x5d3b36(_0x563ef6,_0x0b73('0x5e')))[_0x0b73('0x2e')](function(){})[_0x0b73('0x31')](_0x26919c()));}}}return _0x3044ee;})['all']();})[_0x0b73('0x2e')](function(){return db['Campaign'][_0x0b73('0x5b')]({'attributes':['id'],'include':[{'model':db[_0x0b73('0x53')],'as':_0x0b73('0x5f'),'where':{'id':LISTID}}]})[_0x0b73('0x2e')](function(_0x5bf1e0){var _0x353deb=[];if(_0x5bf1e0){for(var _0x838f67=0x0,_0x39b004;_0x838f67<_0x5bf1e0[_0x0b73('0x29')];_0x838f67+=0x1){_0x39b004=_0x5bf1e0[_0x838f67][_0x0b73('0x54')]({'plain':!![]});_0x353deb[_0x0b73('0x2f')](db[_0x0b73('0x56')]['query'](_0x4be32c(_0x39b004,_0x0b73('0x5e')))['then'](function(){})[_0x0b73('0x31')](_0x26919c()));}}return _0x353deb;})[_0x0b73('0x5a')]();})[_0x0b73('0x31')](function(_0x36216b){logger[_0x0b73('0x14')](_0x0b73('0x60'),_0x0b73('0x61'),_0x36216b[_0x0b73('0x33')]);});}var processPromises=function(_0x5793a1){return BPromise[_0x0b73('0x5a')](promises)[_0x0b73('0x2e')](function(_0x51c047){})[_0x0b73('0x31')](function(_0x5b064b){logger['error'](_0x0b73('0x62'),JSON[_0x0b73('0x34')](_0x5b064b));})[_0x0b73('0x63')](function(){socket[_0x0b73('0x64')](_0x0b73('0x65')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x5793a1){return _0x5793a1[_0x0b73('0x66')]();}});};var endCsv=function(){return BPromise[_0x0b73('0x67')]()[_0x0b73('0x2e')](function(){if(hopperContacts){return checkHopper();}})[_0x0b73('0x2e')](function(){socket[_0x0b73('0x64')](_0x0b73('0x65')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs['unlinkSync'](FILEPATH);}catch(_0x2ccc7a){logger['error'](_0x0b73('0x68'),JSON['stringify'](_0x2ccc7a));}finally{process[_0x0b73('0x69')](0x0);}});};process['on'](_0x0b73('0x6a'),function(){logger[_0x0b73('0x6b')](_0x0b73('0x6c'));endCsv();});function main(){return BPromise['resolve']()['then'](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x0b73('0x11')](',');return db[_0x0b73('0x2c')][_0x0b73('0x5b')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})['then'](function(_0x20f3b3){var _0x96bd6e=fs[_0x0b73('0x6d')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x0b73('0x6e')](_0x96bd6e,{'header':!![],'skipEmptyLines':!![],'step':function(_0x2d0132,_0x4c753b){total+=0x1;var _0x3b0c2f=total;promises['push'](checkRow(_0x2d0132,_0x20f3b3,_0x3b0c2f)['then'](function(){success+=0x1;})[_0x0b73('0x31')](function(_0x10ef97){if(_0x10ef97['error']){errors+=0x1;delete _0x10ef97[_0x0b73('0x14')];}else if(_0x10ef97[_0x0b73('0x2b')]){duplicates+=0x1;delete _0x10ef97[_0x0b73('0x2b')];}rows[_0x0b73('0x2f')](_0x10ef97);}));if(total%0xc8===0x0){_0x4c753b['pause']();return processPromises(_0x4c753b);}},'complete':function(){return processPromises()[_0x0b73('0x2e')](function(){logger['info'](_0x0b73('0x6f'));endCsv();});},'error':function(_0x517837,_0x349dfd){logger[_0x0b73('0x6b')](_0x0b73('0x70'),JSON[_0x0b73('0x34')](_0x517837));endCsv();}});})['catch'](function(_0x282fe2){logger[_0x0b73('0x14')](_0x0b73('0x71'),JSON[_0x0b73('0x34')](_0x282fe2));});}main();
\ No newline at end of file
diff --git a/server/components/import/cm/csv2.js b/server/components/import/cm/csv2.js
index 477182e..124e64c 100644
--- a/server/components/import/cm/csv2.js
+++ b/server/components/import/cm/csv2.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x53c0=[')\x20NOT\x20IN\x20?','id\x20IN\x20?','MIN(id)','min_id','info','Received\x20SIGINT','error','message','exit','code','sequelize','query','spread','push','main','stringify','binding','socket_timestamp','root','server/files/tmp','header','writeFileSync','parse','createReadStream','data','rows','errors','hasOwnProperty','trim','replace','isValid','isNumber','includes','agent\x20not\x20exists','email','dateOfBirth','YYYY-MM-DD','firstName','length','SystemRow','appendFileSync','emit','Abort\x20parser','abort','SystemError','step','duplicates','cm_contacts_','\x20LIKE\x20cm_contacts;','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27','isNil','voice_queues_has_cm_lists','VoiceQueueId','voice_queues_has_cm_blacklists','voice_queues','campaigns_has_cm_lists','campaigns','CampaignId','each','then','finish','affectedRows','contact:import:','unlink','catch','argv','arguments\x20\x20\x20','existsSync','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','No\x20agent\x20available','SIGINT','uncaughtException','path','lodash','papaparse','util','bluebird','moment','../../../mysqldb','../../../config/environment','../../../config/logger','import','redis','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','test','select','phone','from','join','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','insert','cm_hopper','fromQuery','scheduledat','ListId','createdAt','updatedAt','priority','UserId','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','.id\x20=\x20','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','\x22onlyIfOpen\x22','toString','cm_contacts.createdAt','into','cm_hopper_black','ContactId','field','ListId\x20=\x20?','\x20=\x20?','concat','keys','CompanyId'];(function(_0x596aec,_0x14db27){var _0xac55ec=function(_0x48e149){while(--_0x48e149){_0x596aec['push'](_0x596aec['shift']());}};_0xac55ec(++_0x14db27);}(_0x53c0,0xd2));var _0x053c=function(_0x4a0e68,_0x45c08c){_0x4a0e68=_0x4a0e68-0x0;var _0x4fb274=_0x53c0[_0x4a0e68];return _0x4fb274;};'use strict';var fs=require('fs');var path=require(_0x053c('0x0'));var _=require(_0x053c('0x1'));var Papa=require(_0x053c('0x2'));var util=require(_0x053c('0x3'));var BPromise=require(_0x053c('0x4'));var moment=require(_0x053c('0x5'));var squel=require('squel');var Redis=require('ioredis');var db=require(_0x053c('0x6'))['db'];var config=require(_0x053c('0x7'));var logger=require(_0x053c('0x8'))(_0x053c('0x9'));config[_0x053c('0xa')]=_['defaults'](config['redis'],{'host':_0x053c('0xb'),'port':0x18eb});var socket=require(_0x053c('0xc'))(new Redis(config['redis']));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()[_0x053c('0xd')](_0x053c('0xe'));function isEmail(_0x20b447){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))*$/[_0x053c('0xf')](_0x20b447);}function selectNotIn(_0x1f28ba,_0x53a85c,_0x5b0e96,_0x536522,_0x422dd1){return squel[_0x053c('0x10')]()['field'](_0x053c('0x11'))[_0x053c('0x12')](_0x536522)[_0x053c('0x13')](_0x53a85c,null,_0x53a85c+'.id\x20=\x20'+_0x536522+'.'+_0x5b0e96)[_0x053c('0x14')](_0x536522+'.'+_0x5b0e96+_0x053c('0x15')+_0x1f28ba+'.'+_0x5b0e96)['where'](_0x53a85c+_0x053c('0x16')+_0x422dd1[_0x053c('0x13')]()+')');}function insertCmHopper(_0x4b2a2b,_0x2cd8e4,_0xec0532,_0x4700e1,_0x74f101){var _0x5a4b3=[_0x053c('0x17'),_0x053c('0x18'),_0x053c('0x19'),_0x053c('0x1a'),_0x2cd8e4+'.'+_0x4700e1,'cm_contacts.createdAt',_0x053c('0x1b'),_0x053c('0x1c'),_0x053c('0x1d'),'\x22'+_0x74f101+'\x22'];return squel[_0x053c('0x1e')]()['into'](_0x053c('0x1f'))[_0x053c('0x20')]([_0x053c('0x11'),_0x053c('0x21'),'ContactId',_0x053c('0x22'),_0x4700e1,_0x053c('0x23'),_0x053c('0x24'),_0x053c('0x25'),_0x053c('0x26'),'recallme'],squel[_0x053c('0x10')]()[_0x053c('0x27')](_0x5a4b3)['from'](_0x2cd8e4)['join'](_0x053c('0x28'),null,_0x053c('0x29')+_0x2cd8e4+_0x053c('0x2a'))['join'](_0xec0532,null,_0xec0532+_0x053c('0x2b')+_0x2cd8e4+'.'+_0x4700e1)['where'](_0x2cd8e4+_0x053c('0x2c'),_0x4b2a2b)['where'](_0x053c('0x2d'),NOW)[_0x053c('0x14')](_0x053c('0x2e'),selectNotIn(_0x2cd8e4,_0xec0532,_0x4700e1,'cm_hopper',[_0x053c('0x2f'),_0x053c('0x30')]))[_0x053c('0x14')](_0x053c('0x2e'),selectNotIn(_0x2cd8e4,_0xec0532,_0x4700e1,_0x053c('0x1f'),[_0x053c('0x2f')])))[_0x053c('0x31')]();}function insertCmHopperBlack(_0x2fdd85,_0x5ca11e,_0x333ceb,_0x482ede){var _0x260ab3=[_0x053c('0x17'),_0x053c('0x19'),_0x053c('0x1a'),_0x5ca11e+'.'+_0x482ede,_0x053c('0x32'),_0x053c('0x1b')];return squel[_0x053c('0x1e')]()[_0x053c('0x33')](_0x053c('0x34'))[_0x053c('0x20')]([_0x053c('0x11'),_0x053c('0x35'),'ListId',_0x482ede,_0x053c('0x23'),'updatedAt'],squel[_0x053c('0x10')]()[_0x053c('0x27')](_0x260ab3)[_0x053c('0x12')](_0x5ca11e)[_0x053c('0x13')](_0x053c('0x28'),null,_0x053c('0x29')+_0x5ca11e+'.CmListId')[_0x053c('0x13')](_0x333ceb,null,_0x333ceb+_0x053c('0x2b')+_0x5ca11e+'.'+_0x482ede)[_0x053c('0x14')](_0x5ca11e+_0x053c('0x2c'),_0x2fdd85)['where'](_0x053c('0x2d'),NOW)[_0x053c('0x14')](_0x053c('0x2e'),squel[_0x053c('0x10')]()[_0x053c('0x36')](_0x053c('0x11'))[_0x053c('0x12')](_0x053c('0x34'))[_0x053c('0x14')](_0x053c('0x37'),_0x2fdd85)[_0x053c('0x14')](_0x482ede+_0x053c('0x38'),_0x5ca11e+'.'+_0x482ede)))[_0x053c('0x31')]();}function insertCmContact(_0x102ee5,_0x3495d3,_0x562187,_0x12eab0){var _0x14b80c=_[_0x053c('0x39')](_[_0x053c('0x3a')](_0x12eab0),[_0x053c('0x22'),_0x053c('0x3b'),_0x053c('0x23'),_0x053c('0x24')]);return squel[_0x053c('0x1e')]()[_0x053c('0x33')]('cm_contacts')['fromQuery'](_0x14b80c,squel[_0x053c('0x10')]()[_0x053c('0x27')](_0x14b80c)[_0x053c('0x12')](_0x3495d3)[_0x053c('0x14')]('('+_0x562187[_0x053c('0x13')](',')+_0x053c('0x3c'),squel[_0x053c('0x10')]()[_0x053c('0x27')](_0x562187)[_0x053c('0x12')](_0x053c('0x28'))[_0x053c('0x14')](_0x053c('0x37'),_0x102ee5))['where'](_0x053c('0x3d'),squel[_0x053c('0x10')]()[_0x053c('0x36')](_0x053c('0x3e'),_0x053c('0x3f'))[_0x053c('0x12')](_0x3495d3)['group'](_0x562187[_0x053c('0x13')](','))))[_0x053c('0x31')]();}function handleStop(){logger[_0x053c('0x40')](_0x053c('0x41'));stopped=!![];}function handleUncaughtException(_0x27b32c){logger[_0x053c('0x42')](_0x27b32c[_0x053c('0x43')]);process[_0x053c('0x44')](0x1);}function handleError(_0x586db3,_0x1e1ad6){stats['errors']['push']({'name':_0x1e1ad6[_0x053c('0x45')],'message':_0x1e1ad6['message'],'row':_0x586db3});}function handleQuery(_0x36d74a){logger[_0x053c('0x40')](_0x36d74a);return db[_0x053c('0x46')][_0x053c('0x47')](_0x36d74a)[_0x053c('0x48')](function(_0x63363f){results[_0x053c('0x49')](_0x63363f);})['catch'](function(_0x46d0c6){logger['error'](_0x46d0c6['message']);});}function main(_0x50f291,_0x398879,_0x4e53fb,_0x2f100d){logger[_0x053c('0x40')](_0x053c('0x4a'),_0x50f291,JSON[_0x053c('0x4b')](_0x398879));process['send']('start');var _0x338b01=_0x398879[_0x053c('0x4c')];var _0x49301c=_0x398879[_0x053c('0x4d')];var _0x39f89c=path[_0x053c('0x13')](config[_0x053c('0x4e')],_0x053c('0x4f'),_0x49301c+'.csv');var _0xa4fe12=_[_0x053c('0x3a')](_0x338b01)[_0x053c('0x13')]();logger['info'](_0x053c('0x50'),_0xa4fe12);fs[_0x053c('0x51')](_0x39f89c,_0xa4fe12+'\x0a');Papa[_0x053c('0x52')](fs[_0x053c('0x53')](_0x50f291),{'header':!![],'skipEmptyLines':!![],'step':function(_0x37899e,_0x4feff3){try{for(var _0x292d3b=0x0,_0x2b1c1b=[];_0x292d3b<_0x37899e[_0x053c('0x54')]['length'];_0x292d3b++){stats[_0x053c('0x55')]+=0x1;if(_0x37899e[_0x053c('0x56')][_0x292d3b]){handleError(_0x37899e['data'][_0x292d3b],_0x37899e['errors'][_0x292d3b]);}else{var _0xf3697e=[];for(var _0x48f516 in _0x338b01){if(_0x338b01[_0x053c('0x57')](_0x48f516)){if(_0x37899e[_0x053c('0x54')][_0x292d3b][_0x338b01[_0x48f516]]){var _0x56ed76=_[_0x053c('0x58')](_0x37899e[_0x053c('0x54')][_0x292d3b][_0x338b01[_0x48f516]][_0x053c('0x59')](/"/g,'\x27'));switch(_0x48f516){case'scheduledat':var _0x6ce19a=moment(_0x56ed76,_0x053c('0xe'),!![]);if(_0x6ce19a[_0x053c('0x5a')]()){_0x2b1c1b[_0x053c('0x49')]('\x22'+_0x56ed76+'\x22');}else{_0xf3697e[_0x053c('0x49')]('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case _0x053c('0x25'):var _0x185962=parseInt(_0x56ed76);_0x56ed76=_['isNaN'](_0x185962)||_0x185962<0x0||_0x185962>0x4?_0x2f100d?0x3:0x2:_0x185962;_0x2b1c1b[_0x053c('0x49')]('\x22'+_0x56ed76+'\x22');break;case _0x053c('0x26'):var _0x41ae9f=parseInt(_0x56ed76);if(_[_0x053c('0x5b')](_0x41ae9f)&&_[_0x053c('0x5c')](_0x4e53fb,_0x41ae9f)){_0x2b1c1b[_0x053c('0x49')]('\x22'+_0x41ae9f+'\x22');}else{_0xf3697e['push'](_0x053c('0x5d'));}break;case _0x053c('0x5e'):if(isEmail(_0x56ed76)){_0x2b1c1b[_0x053c('0x49')]('\x22'+_0x56ed76+'\x22');}else{_0xf3697e[_0x053c('0x49')]('email\x20wrong\x20format');}break;case _0x053c('0x5f'):var _0x4e602c=moment(_0x56ed76,_0x053c('0x60'),!![]);if(_0x4e602c[_0x053c('0x5a')]()){_0x2b1c1b['push']('\x22'+_0x56ed76+'\x22');}else{_0xf3697e[_0x053c('0x49')]('dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)');}break;default:_0x2b1c1b[_0x053c('0x49')]('\x22'+_0x56ed76+'\x22');}}else{switch(_0x48f516){case _0x053c('0x61'):case _0x053c('0x11'):_0xf3697e[_0x053c('0x49')](_0x48f516+'\x20not\x20specified');break;default:_0x2b1c1b['push']('\x22\x22');}}}}if(_0xf3697e[_0x053c('0x62')]){handleError(_0x37899e[_0x053c('0x54')][_0x292d3b],{'code':_0x053c('0x63'),'message':_0xf3697e[_0x053c('0x13')]()});}else{fs[_0x053c('0x64')](_0x39f89c,_0x2b1c1b[_0x053c('0x13')]()+'\x0a');}_0x2b1c1b=[];}if(!(stats['rows']%0xc8)){socket[_0x053c('0x65')]('contact:import:'+_0x49301c,stats);stats['errors']=[];}}if(stopped){logger[_0x053c('0x40')](_0x053c('0x66'));_0x4feff3[_0x053c('0x67')]();}}catch(_0x57435a){handleError(_0x37899e['data'][_0x292d3b],{'code':_0x053c('0x68'),'message':_0x57435a[_0x053c('0x43')]});logger[_0x053c('0x42')](_0x053c('0x69'),_0x57435a[_0x053c('0x43')]);}},'complete':function(){try{var _0x439382=[];var _0x1d4280=_0x053c('0x28');if(_0x398879[_0x053c('0x6a')]&&_0x398879['duplicates'][_0x053c('0x62')]){_0x1d4280=_0x053c('0x6b')+_0x49301c;_0x439382[_0x053c('0x49')]('CREATE\x20TABLE\x20'+_0x1d4280+_0x053c('0x6c'));}var _0x44fb5b=util['format'](_0x053c('0x6d'),_0x39f89c,_0x1d4280,_0xa4fe12,_0x398879[_0x053c('0x22')],_0x398879['CompanyId']||null,NOW,NOW);if(_[_0x053c('0x6e')](_0x338b01[_0x053c('0x21')])){_0x44fb5b+=',\x20scheduledAt\x20=\x20NOW()';}_0x439382['push'](_0x44fb5b);if(_0x398879[_0x053c('0x6a')]&&_0x398879[_0x053c('0x6a')]['length']){_0x439382['push'](insertCmContact(_0x398879[_0x053c('0x22')],_0x1d4280,_0x398879[_0x053c('0x6a')],_0x338b01));_0x439382[_0x053c('0x49')]('DROP\x20TABLE\x20'+_0x1d4280+';');}_0x439382[_0x053c('0x49')](insertCmHopper(_0x398879[_0x053c('0x22')],_0x053c('0x6f'),'voice_queues',_0x053c('0x70'),_0x2f100d));_0x439382[_0x053c('0x49')](insertCmHopperBlack(_0x398879[_0x053c('0x22')],_0x053c('0x71'),_0x053c('0x72'),'VoiceQueueId'));_0x439382[_0x053c('0x49')](insertCmHopper(_0x398879[_0x053c('0x22')],_0x053c('0x73'),_0x053c('0x74'),_0x053c('0x75'),_0x2f100d));_0x439382[_0x053c('0x49')](insertCmHopperBlack(_0x398879[_0x053c('0x22')],'campaigns_has_cm_blacklists','campaigns',_0x053c('0x75')));BPromise[_0x053c('0x76')](_0x439382,handleQuery)[_0x053c('0x77')](function(_0x2f616c){stats[_0x053c('0x78')]=!![];stats['affectedRows']=_0x398879[_0x053c('0x6a')]&&_0x398879[_0x053c('0x6a')]['length']?results[0x2][_0x053c('0x79')]:results[0x0][_0x053c('0x79')];socket[_0x053c('0x65')](_0x053c('0x7a')+_0x49301c,stats);fs[_0x053c('0x7b')](_0x50f291);fs[_0x053c('0x7b')](_0x39f89c);process['exit'](0x0);})[_0x053c('0x7c')](function(_0x4f7efa){logger[_0x053c('0x42')](_0x4f7efa[_0x053c('0x43')]);process[_0x053c('0x44')](0x1);});}catch(_0x32f926){logger[_0x053c('0x42')]('complete',_0x32f926[_0x053c('0x43')]);process['exit'](0x1);}},'error':function(_0x368bf7,_0x2516bd,_0x544902,_0x1f9d27){throw new Error(_0x1f9d27);}});}function validate(){if(process[_0x053c('0x7d')]&&process['argv']['length']<0x4){throw new Error(_0x053c('0x7e'));}var _0x5b0ec8=path[_0x053c('0x13')](config[_0x053c('0x4e')],'server/files/tmp',process[_0x053c('0x7d')][0x2]);if(!fs[_0x053c('0x7f')](_0x5b0ec8)){throw new Error(_0x053c('0x80'));}var _0x7c7b75={};try{_0x7c7b75=JSON[_0x053c('0x52')](process[_0x053c('0x7d')][0x3]);if(!_0x7c7b75[_0x053c('0x4c')]){throw new Error(_0x053c('0x81'));}if(!_0x7c7b75[_0x053c('0x4c')][_0x053c('0x11')]){throw new Error(_0x053c('0x82'));}if(!_0x7c7b75[_0x053c('0x4c')]['firstName']){throw new Error(_0x053c('0x83'));}var _0x4db77a=0x0;if(_0x7c7b75['binding'][_0x053c('0x26')]){_0x4db77a=0x1;}if(!_0x7c7b75[_0x053c('0x22')]){throw new Error('ListId\x20is\x20mandatory');}}catch(_0x28c3c0){throw new Error('body\x20id\x20mandatory');}var _0x5ea83a=[];try{_0x5ea83a=_['map'](JSON['parse'](process['argv'][0x4]),'id');}catch(_0x3c5d73){logger[_0x053c('0x40')](_0x053c('0x84'));}main(_0x5b0ec8,_0x7c7b75,_0x5ea83a,_0x4db77a);}validate();process['on'](_0x053c('0x85'),handleStop);process['on'](_0x053c('0x86'),handleUncaughtException);
\ No newline at end of file
+var _0xf79a=['hasOwnProperty','push','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','priority','isNaN','includes','agent\x20not\x20exists','email','dateOfBirth','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','SystemRow','appendFileSync','emit','Abort\x20parser','abort','SystemError','step','duplicates','cm_contacts_','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','format','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27',',\x20scheduledAt\x20=\x20NOW()','DROP\x20TABLE\x20','voice_queues_has_cm_lists','voice_queues','VoiceQueueId','voice_queues_has_cm_blacklists','campaigns_has_cm_lists','campaigns','CampaignId','each','then','finish','affectedRows','contact:import:','unlink','complete','argv','arguments\x20\x20\x20','existsSync','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','No\x20agent\x20available','SIGINT','uncaughtException','path','papaparse','bluebird','moment','squel','ioredis','../../../config/environment','../../../config/logger','redis','defaults','socket.io-emitter','test','select','field','phone','from','join','.id\x20=\x20','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','cm_contacts.phone','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.updatedAt','cm_contacts.UserId','insert','into','fromQuery','scheduledat','ContactId','createdAt','UserId','recallme','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId\x20=\x20?','cm_hopper','\x22onlyIfOpen\x22','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','toString','cm_hopper_black','updatedAt','.CmListId','cm_contacts.createdAt\x20=\x20?','ListId\x20=\x20?','\x20=\x20?','keys','ListId','CompanyId',')\x20NOT\x20IN\x20?','id\x20IN\x20?','min_id','group','Received\x20SIGINT','error','message','exit','errors','code','info','sequelize','query','spread','catch','main','stringify','send','start','binding','socket_timestamp','writeFileSync','parse','data','length','rows'];(function(_0x57400a,_0x129cd2){var _0x53605d=function(_0x3cee92){while(--_0x3cee92){_0x57400a['push'](_0x57400a['shift']());}};_0x53605d(++_0x129cd2);}(_0xf79a,0x13d));var _0xaf79=function(_0x44cbec,_0x54df4d){_0x44cbec=_0x44cbec-0x0;var _0x59c77c=_0xf79a[_0x44cbec];return _0x59c77c;};'use strict';var fs=require('fs');var path=require(_0xaf79('0x0'));var _=require('lodash');var Papa=require(_0xaf79('0x1'));var util=require('util');var BPromise=require(_0xaf79('0x2'));var moment=require(_0xaf79('0x3'));var squel=require(_0xaf79('0x4'));var Redis=require(_0xaf79('0x5'));var db=require('../../../mysqldb')['db'];var config=require(_0xaf79('0x6'));var logger=require(_0xaf79('0x7'))('import');config[_0xaf79('0x8')]=_[_0xaf79('0x9')](config[_0xaf79('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0xaf79('0xa'))(new Redis(config[_0xaf79('0x8')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');function isEmail(_0x585f32){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))*$/[_0xaf79('0xb')](_0x585f32);}function selectNotIn(_0xad237d,_0x261e2f,_0x40b36d,_0x4283dc,_0x3ef566){return squel[_0xaf79('0xc')]()[_0xaf79('0xd')](_0xaf79('0xe'))[_0xaf79('0xf')](_0x4283dc)[_0xaf79('0x10')](_0x261e2f,null,_0x261e2f+_0xaf79('0x11')+_0x4283dc+'.'+_0x40b36d)[_0xaf79('0x12')](_0x4283dc+'.'+_0x40b36d+_0xaf79('0x13')+_0xad237d+'.'+_0x40b36d)['where'](_0x261e2f+_0xaf79('0x14')+_0x3ef566[_0xaf79('0x10')]()+')');}function insertCmHopper(_0x168a3a,_0x516b12,_0x35b976,_0x44c63a,_0x5e9fa1){var _0x564b21=[_0xaf79('0x15'),'cm_contacts.scheduledat',_0xaf79('0x16'),_0xaf79('0x17'),_0x516b12+'.'+_0x44c63a,_0xaf79('0x18'),_0xaf79('0x19'),'cm_contacts.priority',_0xaf79('0x1a'),'\x22'+_0x5e9fa1+'\x22'];return squel[_0xaf79('0x1b')]()[_0xaf79('0x1c')]('cm_hopper')[_0xaf79('0x1d')]([_0xaf79('0xe'),_0xaf79('0x1e'),_0xaf79('0x1f'),'ListId',_0x44c63a,_0xaf79('0x20'),'updatedAt','priority',_0xaf79('0x21'),_0xaf79('0x22')],squel[_0xaf79('0xc')]()[_0xaf79('0x23')](_0x564b21)[_0xaf79('0xf')](_0x516b12)[_0xaf79('0x10')](_0xaf79('0x24'),null,_0xaf79('0x25')+_0x516b12+'.CmListId')[_0xaf79('0x10')](_0x35b976,null,_0x35b976+_0xaf79('0x11')+_0x516b12+'.'+_0x44c63a)['where'](_0x516b12+_0xaf79('0x26'),_0x168a3a)[_0xaf79('0x12')]('cm_contacts.createdAt\x20=\x20?',NOW)[_0xaf79('0x12')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x516b12,_0x35b976,_0x44c63a,_0xaf79('0x27'),['\x22always\x22',_0xaf79('0x28')]))['where'](_0xaf79('0x29'),selectNotIn(_0x516b12,_0x35b976,_0x44c63a,'cm_hopper',[_0xaf79('0x2a')])))[_0xaf79('0x2b')]();}function insertCmHopperBlack(_0x57cc66,_0x6e1086,_0x37dd0f,_0x44fa48){var _0x437f91=['cm_contacts.phone',_0xaf79('0x16'),_0xaf79('0x17'),_0x6e1086+'.'+_0x44fa48,_0xaf79('0x18'),_0xaf79('0x19')];return squel[_0xaf79('0x1b')]()[_0xaf79('0x1c')](_0xaf79('0x2c'))['fromQuery']([_0xaf79('0xe'),_0xaf79('0x1f'),'ListId',_0x44fa48,_0xaf79('0x20'),_0xaf79('0x2d')],squel[_0xaf79('0xc')]()[_0xaf79('0x23')](_0x437f91)[_0xaf79('0xf')](_0x6e1086)['join']('cm_contacts',null,'cm_contacts.ListId\x20=\x20'+_0x6e1086+_0xaf79('0x2e'))[_0xaf79('0x10')](_0x37dd0f,null,_0x37dd0f+_0xaf79('0x11')+_0x6e1086+'.'+_0x44fa48)['where'](_0x6e1086+_0xaf79('0x26'),_0x57cc66)[_0xaf79('0x12')](_0xaf79('0x2f'),NOW)['where'](_0xaf79('0x29'),squel[_0xaf79('0xc')]()[_0xaf79('0xd')](_0xaf79('0xe'))['from'](_0xaf79('0x2c'))[_0xaf79('0x12')](_0xaf79('0x30'),_0x57cc66)['where'](_0x44fa48+_0xaf79('0x31'),_0x6e1086+'.'+_0x44fa48)))[_0xaf79('0x2b')]();}function insertCmContact(_0x39a1af,_0x406f05,_0x1753b6,_0x3f82f7){var _0x54dbd1=_['concat'](_[_0xaf79('0x32')](_0x3f82f7),[_0xaf79('0x33'),_0xaf79('0x34'),'createdAt',_0xaf79('0x2d')]);return squel['insert']()['into'](_0xaf79('0x24'))['fromQuery'](_0x54dbd1,squel[_0xaf79('0xc')]()['fields'](_0x54dbd1)[_0xaf79('0xf')](_0x406f05)['where']('('+_0x1753b6[_0xaf79('0x10')](',')+_0xaf79('0x35'),squel['select']()[_0xaf79('0x23')](_0x1753b6)['from'](_0xaf79('0x24'))['where'](_0xaf79('0x30'),_0x39a1af))[_0xaf79('0x12')](_0xaf79('0x36'),squel[_0xaf79('0xc')]()[_0xaf79('0xd')]('MIN(id)',_0xaf79('0x37'))[_0xaf79('0xf')](_0x406f05)[_0xaf79('0x38')](_0x1753b6['join'](','))))['toString']();}function handleStop(){logger['info'](_0xaf79('0x39'));stopped=!![];}function handleUncaughtException(_0xadd703){logger[_0xaf79('0x3a')](_0xadd703[_0xaf79('0x3b')]);process[_0xaf79('0x3c')](0x1);}function handleError(_0x2c9422,_0x489fda){stats[_0xaf79('0x3d')]['push']({'name':_0x489fda[_0xaf79('0x3e')],'message':_0x489fda['message'],'row':_0x2c9422});}function handleQuery(_0x33db24){logger[_0xaf79('0x3f')](_0x33db24);return db[_0xaf79('0x40')][_0xaf79('0x41')](_0x33db24)[_0xaf79('0x42')](function(_0x5da796){results['push'](_0x5da796);})[_0xaf79('0x43')](function(_0x494bb1){logger[_0xaf79('0x3a')](_0x494bb1['message']);});}function main(_0x4a4519,_0x212e07,_0x48f7cf,_0x163de7){logger['info'](_0xaf79('0x44'),_0x4a4519,JSON[_0xaf79('0x45')](_0x212e07));process[_0xaf79('0x46')](_0xaf79('0x47'));var _0x55e656=_0x212e07[_0xaf79('0x48')];var _0x7eedf7=_0x212e07[_0xaf79('0x49')];var _0x4a40a3=path['join'](config['root'],'server/files/tmp',_0x7eedf7+'.csv');var _0x53ca37=_[_0xaf79('0x32')](_0x55e656)['join']();logger[_0xaf79('0x3f')]('header',_0x53ca37);fs[_0xaf79('0x4a')](_0x4a40a3,_0x53ca37+'\x0a');Papa[_0xaf79('0x4b')](fs['createReadStream'](_0x4a4519),{'header':!![],'skipEmptyLines':!![],'step':function(_0xdf0dec,_0x2777f7){try{for(var _0x1bb989=0x0,_0x3990aa=[];_0x1bb989<_0xdf0dec[_0xaf79('0x4c')][_0xaf79('0x4d')];_0x1bb989++){stats[_0xaf79('0x4e')]+=0x1;if(_0xdf0dec['errors'][_0x1bb989]){handleError(_0xdf0dec[_0xaf79('0x4c')][_0x1bb989],_0xdf0dec[_0xaf79('0x3d')][_0x1bb989]);}else{var _0xfe13fe=[];for(var _0x3d2f40 in _0x55e656){if(_0x55e656[_0xaf79('0x4f')](_0x3d2f40)){if(_0xdf0dec[_0xaf79('0x4c')][_0x1bb989][_0x55e656[_0x3d2f40]]){var _0x5c9e1b=_['trim'](_0xdf0dec[_0xaf79('0x4c')][_0x1bb989][_0x55e656[_0x3d2f40]]['replace'](/"/g,'\x27'));switch(_0x3d2f40){case _0xaf79('0x1e'):var _0x484113=moment(_0x5c9e1b,'YYYY-MM-DD\x20HH:mm:ss',!![]);if(_0x484113['isValid']()){_0x3990aa[_0xaf79('0x50')]('\x22'+_0x5c9e1b+'\x22');}else{_0xfe13fe[_0xaf79('0x50')](_0xaf79('0x51'));}break;case _0xaf79('0x52'):var _0x13d747=parseInt(_0x5c9e1b);_0x5c9e1b=_[_0xaf79('0x53')](_0x13d747)||_0x13d747<0x0||_0x13d747>0x4?_0x163de7?0x3:0x2:_0x13d747;_0x3990aa['push']('\x22'+_0x5c9e1b+'\x22');break;case _0xaf79('0x21'):var _0xdad488=parseInt(_0x5c9e1b);if(_['isNumber'](_0xdad488)&&_[_0xaf79('0x54')](_0x48f7cf,_0xdad488)){_0x3990aa['push']('\x22'+_0xdad488+'\x22');}else{_0xfe13fe[_0xaf79('0x50')](_0xaf79('0x55'));}break;case _0xaf79('0x56'):if(isEmail(_0x5c9e1b)){_0x3990aa[_0xaf79('0x50')]('\x22'+_0x5c9e1b+'\x22');}else{_0xfe13fe[_0xaf79('0x50')]('email\x20wrong\x20format');}break;case _0xaf79('0x57'):var _0x2b12a4=moment(_0x5c9e1b,_0xaf79('0x58'),!![]);if(_0x2b12a4['isValid']()){_0x3990aa[_0xaf79('0x50')]('\x22'+_0x5c9e1b+'\x22');}else{_0xfe13fe['push'](_0xaf79('0x59'));}break;default:_0x3990aa[_0xaf79('0x50')]('\x22'+_0x5c9e1b+'\x22');}}else{switch(_0x3d2f40){case _0xaf79('0x5a'):case _0xaf79('0xe'):_0xfe13fe['push'](_0x3d2f40+'\x20not\x20specified');break;default:_0x3990aa[_0xaf79('0x50')]('\x22\x22');}}}}if(_0xfe13fe['length']){handleError(_0xdf0dec[_0xaf79('0x4c')][_0x1bb989],{'code':_0xaf79('0x5b'),'message':_0xfe13fe['join']()});}else{fs[_0xaf79('0x5c')](_0x4a40a3,_0x3990aa[_0xaf79('0x10')]()+'\x0a');}_0x3990aa=[];}if(!(stats[_0xaf79('0x4e')]%0xc8)){socket[_0xaf79('0x5d')]('contact:import:'+_0x7eedf7,stats);stats[_0xaf79('0x3d')]=[];}}if(stopped){logger[_0xaf79('0x3f')](_0xaf79('0x5e'));_0x2777f7[_0xaf79('0x5f')]();}}catch(_0x191f8a){handleError(_0xdf0dec[_0xaf79('0x4c')][_0x1bb989],{'code':_0xaf79('0x60'),'message':_0x191f8a[_0xaf79('0x3b')]});logger[_0xaf79('0x3a')](_0xaf79('0x61'),_0x191f8a['message']);}},'complete':function(){try{var _0x194776=[];var _0x3367db='cm_contacts';if(_0x212e07['duplicates']&&_0x212e07[_0xaf79('0x62')][_0xaf79('0x4d')]){_0x3367db=_0xaf79('0x63')+_0x7eedf7;_0x194776[_0xaf79('0x50')](_0xaf79('0x64')+_0x3367db+_0xaf79('0x65'));}var _0x4ba1d2=util[_0xaf79('0x66')](_0xaf79('0x67'),_0x4a40a3,_0x3367db,_0x53ca37,_0x212e07[_0xaf79('0x33')],_0x212e07[_0xaf79('0x34')]||null,NOW,NOW);if(_['isNil'](_0x55e656[_0xaf79('0x1e')])){_0x4ba1d2+=_0xaf79('0x68');}_0x194776[_0xaf79('0x50')](_0x4ba1d2);if(_0x212e07[_0xaf79('0x62')]&&_0x212e07[_0xaf79('0x62')][_0xaf79('0x4d')]){_0x194776[_0xaf79('0x50')](insertCmContact(_0x212e07[_0xaf79('0x33')],_0x3367db,_0x212e07[_0xaf79('0x62')],_0x55e656));_0x194776['push'](_0xaf79('0x69')+_0x3367db+';');}_0x194776[_0xaf79('0x50')](insertCmHopper(_0x212e07[_0xaf79('0x33')],_0xaf79('0x6a'),_0xaf79('0x6b'),_0xaf79('0x6c'),_0x163de7));_0x194776[_0xaf79('0x50')](insertCmHopperBlack(_0x212e07[_0xaf79('0x33')],_0xaf79('0x6d'),_0xaf79('0x6b'),_0xaf79('0x6c')));_0x194776[_0xaf79('0x50')](insertCmHopper(_0x212e07[_0xaf79('0x33')],_0xaf79('0x6e'),_0xaf79('0x6f'),'CampaignId',_0x163de7));_0x194776[_0xaf79('0x50')](insertCmHopperBlack(_0x212e07[_0xaf79('0x33')],'campaigns_has_cm_blacklists','campaigns',_0xaf79('0x70')));BPromise[_0xaf79('0x71')](_0x194776,handleQuery)[_0xaf79('0x72')](function(_0x35d915){stats[_0xaf79('0x73')]=!![];stats[_0xaf79('0x74')]=_0x212e07['duplicates']&&_0x212e07[_0xaf79('0x62')][_0xaf79('0x4d')]?results[0x2][_0xaf79('0x74')]:results[0x0][_0xaf79('0x74')];socket[_0xaf79('0x5d')](_0xaf79('0x75')+_0x7eedf7,stats);fs[_0xaf79('0x76')](_0x4a4519);fs[_0xaf79('0x76')](_0x4a40a3);process[_0xaf79('0x3c')](0x0);})[_0xaf79('0x43')](function(_0x2b270a){logger[_0xaf79('0x3a')](_0x2b270a[_0xaf79('0x3b')]);process['exit'](0x1);});}catch(_0x19c508){logger[_0xaf79('0x3a')](_0xaf79('0x77'),_0x19c508['message']);process[_0xaf79('0x3c')](0x1);}},'error':function(_0x2d83f2,_0xbd9527,_0x212996,_0x918cbb){throw new Error(_0x918cbb);}});}function validate(){if(process[_0xaf79('0x78')]&&process[_0xaf79('0x78')][_0xaf79('0x4d')]<0x4){throw new Error(_0xaf79('0x79'));}var _0x468ff0=path[_0xaf79('0x10')](config['root'],'server/files/tmp',process[_0xaf79('0x78')][0x2]);if(!fs[_0xaf79('0x7a')](_0x468ff0)){throw new Error('file\x20doesn\x27t\x20exists');}var _0x31c795={};try{_0x31c795=JSON[_0xaf79('0x4b')](process[_0xaf79('0x78')][0x3]);if(!_0x31c795['binding']){throw new Error(_0xaf79('0x7b'));}if(!_0x31c795[_0xaf79('0x48')][_0xaf79('0xe')]){throw new Error(_0xaf79('0x7c'));}if(!_0x31c795[_0xaf79('0x48')][_0xaf79('0x5a')]){throw new Error(_0xaf79('0x7d'));}var _0x2f6000=0x0;if(_0x31c795[_0xaf79('0x48')][_0xaf79('0x21')]){_0x2f6000=0x1;}if(!_0x31c795[_0xaf79('0x33')]){throw new Error(_0xaf79('0x7e'));}}catch(_0x27a3a6){throw new Error(_0xaf79('0x7f'));}var _0x1ac3f3=[];try{_0x1ac3f3=_[_0xaf79('0x80')](JSON[_0xaf79('0x4b')](process[_0xaf79('0x78')][0x4]),'id');}catch(_0x1f37c7){logger[_0xaf79('0x3f')](_0xaf79('0x81'));}main(_0x468ff0,_0x31c795,_0x1ac3f3,_0x2f6000);}validate();process['on'](_0xaf79('0x82'),handleStop);process['on'](_0xaf79('0x83'),handleUncaughtException);
\ No newline at end of file
diff --git a/server/components/integrations/configuration.js b/server/components/integrations/configuration.js
index 8be2c04..5869285 100644
--- a/server/components/integrations/configuration.js
+++ b/server/components/integrations/configuration.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb28=['toLowerCase','voice','inbound','variable','queue','calleridnum','outbound','push','string','Outbound\x20Call','getDescriptions','***\x20Call\x20Info\x20***','keyValue','Caller\x20Number','Caller\x20Name','calleridname','Call\x20To','destexten','Queue','uniqueid','Date','agentcalledAt','Agent\x20Name','destcalleridname','Agent\x20Number','destcalleridnum','***\x20Time\x20Info\x20***','Agent\x20Ring','Agent\x20Connect','agentconnectAt','Agent\x20Complete','holdtime','Talk\x20Time','talktime','Called\x20Number','Member\x20Name','membername','UniqueId','Complete\x20Time','Duration','Billable\x20Time','billableseconds','getSubjects','[xCALLY\x20Ticket]'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xdb28,0x106));var _0x8db2=function(_0x55b04d,_0xfe89e8){_0x55b04d=_0x55b04d-0x0;var _0x12b0f9=_0xdb28[_0x55b04d];return _0x12b0f9;};'use strict';exports[_0x8db2('0x0')]=function(_0x4221b3,_0x1dc797){var _0xf66e59=[{'type':'string','content':_0x8db2('0x1'),'variableName':null}];switch(_0x4221b3[_0x8db2('0x2')]()){case _0x8db2('0x3'):switch(_0x1dc797[_0x8db2('0x2')]()){case _0x8db2('0x4'):_0xf66e59['push']({'type':_0x8db2('0x5'),'content':'','variableName':_0x8db2('0x6')});_0xf66e59['push']({'type':'variable','content':'','variableName':_0x8db2('0x7')});break;case _0x8db2('0x8'):_0xf66e59[_0x8db2('0x9')]({'type':_0x8db2('0xa'),'content':_0x8db2('0xb'),'variableName':null});_0xf66e59[_0x8db2('0x9')]({'type':_0x8db2('0x5'),'content':'','variableName':'destcalleridnum'});break;}}return _0xf66e59;};exports[_0x8db2('0xc')]=function(_0x476216,_0x1f62af){var _0x57015f=[];switch(_0x476216[_0x8db2('0x2')]()){case _0x8db2('0x3'):switch(_0x1f62af['toLowerCase']()){case _0x8db2('0x4'):_0x57015f=[{'type':_0x8db2('0xa'),'content':_0x8db2('0xd'),'key':null,'keyType':null,'variableName':null},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0xf'),'keyType':'variable','variableName':'calleridnum'},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x10'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x11')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x12'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x13')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x14'),'keyType':'variable','variableName':_0x8db2('0x6')},{'type':_0x8db2('0xe'),'content':'','key':'UniqueId','keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x15')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x16'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x17')},{'type':'string','content':'***\x20Agent\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x18'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x19')},{'type':'keyValue','content':'','key':_0x8db2('0x1a'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x1b')},{'type':_0x8db2('0xa'),'content':_0x8db2('0x1c'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x8db2('0x1d'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x17')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x1e'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x1f')},{'type':'keyValue','content':'','key':_0x8db2('0x20'),'keyType':'variable','variableName':'agentcompleteAt'},{'type':'keyValue','content':'','key':'Hold\x20Time','keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x21')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x22'),'keyType':_0x8db2('0x5'),'variableName':_0x8db2('0x23')}];break;case'outbound':_0x57015f=[{'type':_0x8db2('0xa'),'content':_0x8db2('0xd'),'variableName':null},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x24'),'keyType':'variable','keyContent':'','variableName':_0x8db2('0x1b')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x25'),'keyType':_0x8db2('0x5'),'keyContent':'','variableName':_0x8db2('0x26')},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x27'),'keyType':_0x8db2('0x5'),'keyContent':'','variableName':_0x8db2('0x15')},{'type':'keyValue','content':'','key':_0x8db2('0x16'),'keyType':'variable','keyContent':'','variableName':'starttime'},{'type':_0x8db2('0xa'),'content':_0x8db2('0x1c')},{'type':_0x8db2('0xe'),'content':'','key':'Answer\x20Time','keyType':_0x8db2('0x5'),'keyContent':'','variableName':'answertime'},{'type':_0x8db2('0xe'),'content':'','key':_0x8db2('0x28'),'keyType':_0x8db2('0x5'),'keyContent':'','variableName':'endtime'},{'type':'keyValue','content':'','key':_0x8db2('0x29'),'keyType':_0x8db2('0x5'),'keyContent':'','variableName':'duration'},{'type':'keyValue','content':'','key':_0x8db2('0x2a'),'keyType':_0x8db2('0x5'),'keyContent':'','variableName':_0x8db2('0x2b')}];break;}}return _0x57015f;};
\ No newline at end of file
+var _0x2ef3=['destexten','queue','UniqueId','Date','***\x20Agent\x20Info\x20***','Agent\x20Name','destcalleridname','Agent\x20Number','Agent\x20Ring','agentcalledAt','Agent\x20Connect','Agent\x20Complete','Hold\x20Time','Talk\x20Time','talktime','***\x20Call\x20Info\x20***','Called\x20Number','membername','uniqueid','starttime','***\x20Time\x20Info\x20***','Answer\x20Time','endtime','Duration','duration','Billable\x20Time','getSubjects','string','[xCALLY\x20Ticket]','voice','toLowerCase','push','variable','calleridnum','outbound','Outbound\x20Call','destcalleridnum','getDescriptions','keyValue','Call\x20To'];(function(_0x548c25,_0x37a1ba){var _0x3d338e=function(_0x5af9c2){while(--_0x5af9c2){_0x548c25['push'](_0x548c25['shift']());}};_0x3d338e(++_0x37a1ba);}(_0x2ef3,0xba));var _0x32ef=function(_0x3592b3,_0x22151b){_0x3592b3=_0x3592b3-0x0;var _0x3d495d=_0x2ef3[_0x3592b3];return _0x3d495d;};'use strict';exports[_0x32ef('0x0')]=function(_0x11c049,_0x47513a){var _0x26e56e=[{'type':_0x32ef('0x1'),'content':_0x32ef('0x2'),'variableName':null}];switch(_0x11c049['toLowerCase']()){case _0x32ef('0x3'):switch(_0x47513a[_0x32ef('0x4')]()){case'inbound':_0x26e56e[_0x32ef('0x5')]({'type':_0x32ef('0x6'),'content':'','variableName':'queue'});_0x26e56e['push']({'type':_0x32ef('0x6'),'content':'','variableName':_0x32ef('0x7')});break;case _0x32ef('0x8'):_0x26e56e[_0x32ef('0x5')]({'type':_0x32ef('0x1'),'content':_0x32ef('0x9'),'variableName':null});_0x26e56e[_0x32ef('0x5')]({'type':_0x32ef('0x6'),'content':'','variableName':_0x32ef('0xa')});break;}}return _0x26e56e;};exports[_0x32ef('0xb')]=function(_0x56eb42,_0x5780e9){var _0x401d0b=[];switch(_0x56eb42[_0x32ef('0x4')]()){case _0x32ef('0x3'):switch(_0x5780e9[_0x32ef('0x4')]()){case'inbound':_0x401d0b=[{'type':_0x32ef('0x1'),'content':'***\x20Call\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x32ef('0xc'),'content':'','key':'Caller\x20Number','keyType':_0x32ef('0x6'),'variableName':_0x32ef('0x7')},{'type':'keyValue','content':'','key':'Caller\x20Name','keyType':_0x32ef('0x6'),'variableName':'calleridname'},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0xd'),'keyType':_0x32ef('0x6'),'variableName':_0x32ef('0xe')},{'type':'keyValue','content':'','key':'Queue','keyType':'variable','variableName':_0x32ef('0xf')},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x10'),'keyType':'variable','variableName':'uniqueid'},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x11'),'keyType':_0x32ef('0x6'),'variableName':'agentcalledAt'},{'type':_0x32ef('0x1'),'content':_0x32ef('0x12'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x32ef('0x13'),'keyType':_0x32ef('0x6'),'variableName':_0x32ef('0x14')},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x15'),'keyType':_0x32ef('0x6'),'variableName':'destcalleridnum'},{'type':_0x32ef('0x1'),'content':'***\x20Time\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x16'),'keyType':'variable','variableName':_0x32ef('0x17')},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x18'),'keyType':'variable','variableName':'agentconnectAt'},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x19'),'keyType':_0x32ef('0x6'),'variableName':'agentcompleteAt'},{'type':'keyValue','content':'','key':_0x32ef('0x1a'),'keyType':'variable','variableName':'holdtime'},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x1b'),'keyType':_0x32ef('0x6'),'variableName':_0x32ef('0x1c')}];break;case _0x32ef('0x8'):_0x401d0b=[{'type':_0x32ef('0x1'),'content':_0x32ef('0x1d'),'variableName':null},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x1e'),'keyType':_0x32ef('0x6'),'keyContent':'','variableName':_0x32ef('0xa')},{'type':_0x32ef('0xc'),'content':'','key':'Member\x20Name','keyType':_0x32ef('0x6'),'keyContent':'','variableName':_0x32ef('0x1f')},{'type':'keyValue','content':'','key':_0x32ef('0x10'),'keyType':_0x32ef('0x6'),'keyContent':'','variableName':_0x32ef('0x20')},{'type':_0x32ef('0xc'),'content':'','key':'Date','keyType':_0x32ef('0x6'),'keyContent':'','variableName':_0x32ef('0x21')},{'type':_0x32ef('0x1'),'content':_0x32ef('0x22')},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x23'),'keyType':_0x32ef('0x6'),'keyContent':'','variableName':'answertime'},{'type':_0x32ef('0xc'),'content':'','key':'Complete\x20Time','keyType':_0x32ef('0x6'),'keyContent':'','variableName':_0x32ef('0x24')},{'type':'keyValue','content':'','key':_0x32ef('0x25'),'keyType':_0x32ef('0x6'),'keyContent':'','variableName':_0x32ef('0x26')},{'type':_0x32ef('0xc'),'content':'','key':_0x32ef('0x27'),'keyType':'variable','keyContent':'','variableName':'billableseconds'}];break;}}return _0x401d0b;};
\ No newline at end of file
diff --git a/server/components/interaction/service.js b/server/components/interaction/service.js
index 7cf40ac..874c5f2 100644
--- a/server/components/interaction/service.js
+++ b/server/components/interaction/service.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9f75=['error','tracked','user','query','clone','body','omit','html','fax','mobile','lodash','../../config/logger','openchannel-interactions','fax-interactions','sms-interactions','chat-interactions','upperFirst','InteractionId','unknown','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','name','stringify','null','Interaction','findOne','then','info','catch'];(function(_0x110c3d,_0x12ee06){var _0x226d67=function(_0x1fb6e1){while(--_0x1fb6e1){_0x110c3d['push'](_0x110c3d['shift']());}};_0x226d67(++_0x12ee06);}(_0x9f75,0x15a));var _0x59f7=function(_0x1c11f0,_0xcef8b5){_0x1c11f0=_0x1c11f0-0x0;var _0x32a087=_0x9f75[_0x1c11f0];return _0x32a087;};'use strict';var _=require(_0x59f7('0x0'));var db=require('../../mysqldb')['db'];var loggers={'openchannel':require(_0x59f7('0x1'))(_0x59f7('0x2')),'mail':require('../../config/logger')('mail-interactions'),'fax':require(_0x59f7('0x1'))(_0x59f7('0x3')),'sms':require(_0x59f7('0x1'))(_0x59f7('0x4')),'chat':require('../../config/logger')(_0x59f7('0x5'))};function getInteractionId(_0x278f11,_0x5485fa,_0x5483bc){if(_0x278f11&&_0x278f11[_[_0x59f7('0x6')](_0x5483bc)+_0x59f7('0x7')]){return _0x278f11[_[_0x59f7('0x6')](_0x5483bc)+_0x59f7('0x7')];}else if(_0x278f11&&_0x278f11['id']){return _0x278f11['id'];}else if(_0x5485fa&&_0x5485fa['id']){return _0x5485fa['id'];}else{return _0x59f7('0x8');}}function log(_0x2c0fac,_0x553357,_0x2cd2b1,_0xdc23c7,_0x296a8d,_0x2db28a){loggers[_0x296a8d['toLowerCase']()][_0x2c0fac](_0x59f7('0x9'),_0x2db28a['toUpperCase'](),_0x553357?_0x553357['id']:null,_0x553357?_0x553357[_0x59f7('0xa')]:null,_0x553357?_0x553357['role']:null,getInteractionId(_0x2cd2b1,_0xdc23c7,_0x296a8d),_0x2cd2b1?JSON[_0x59f7('0xb')](_0x2cd2b1):_0x59f7('0xc'));}function updateUser(_0x4cee9f,_0x585044,_0xf44f98,_0x43f20f,_0x2c75a2){db[_[_0x59f7('0x6')](_0x43f20f)+_0x59f7('0xd')][_0x59f7('0xe')]({'where':{'id':getInteractionId(_0x585044,_0xf44f98,_0x43f20f)}})['then'](function(_0x4b4a18){if(_0x4b4a18){return _0x4b4a18['update']({'UserId':_0x4cee9f?_0x4cee9f['id']:null});}})[_0x59f7('0xf')](function(_0x512067){if(_0x512067){log(_0x59f7('0x10'),_0x4cee9f,_0x585044,_0xf44f98,_0x43f20f,_0x2c75a2);}})[_0x59f7('0x11')](function(){log(_0x59f7('0x12'),_0x4cee9f,_0x585044,_0xf44f98,_0x43f20f,_0x2c75a2);});}exports[_0x59f7('0x13')]=function(_0x34a5d7,_0x1521ff){return function(_0x21ca8d,_0x38de7f,_0x2f1d2b){var _0xd619db=_0x21ca8d[_0x59f7('0x14')];var _0x129f55={};var _0x57dad5=_0x21ca8d[_0x59f7('0x15')];if(_0x129f55){_0x129f55=_[_0x59f7('0x16')](_0x21ca8d[_0x59f7('0x17')]);_0x129f55=_[_0x59f7('0x18')](_0x129f55,[_0x59f7('0x17'),_0x59f7('0x19'),'phone',_0x59f7('0x1a'),_0x59f7('0x1b')]);}updateUser(_0xd619db,_0x129f55,_0x57dad5,_0x34a5d7,_0x1521ff);_0x2f1d2b(null);};};
\ No newline at end of file
+var _0xf7d1=['[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','role','null','Interaction','findOne','then','update','info','catch','error','tracked','user','query','body','omit','html','fax','mobile','lodash','../../mysqldb','../../config/logger','openchannel-interactions','mail-interactions','fax-interactions','sms-interactions','chat-interactions','upperFirst','InteractionId','unknown'];(function(_0x3f52d9,_0x1d748c){var _0x21e01f=function(_0x22e584){while(--_0x22e584){_0x3f52d9['push'](_0x3f52d9['shift']());}};_0x21e01f(++_0x1d748c);}(_0xf7d1,0x71));var _0x1f7d=function(_0x31e78a,_0x345eab){_0x31e78a=_0x31e78a-0x0;var _0xa87cd8=_0xf7d1[_0x31e78a];return _0xa87cd8;};'use strict';var _=require(_0x1f7d('0x0'));var db=require(_0x1f7d('0x1'))['db'];var loggers={'openchannel':require(_0x1f7d('0x2'))(_0x1f7d('0x3')),'mail':require('../../config/logger')(_0x1f7d('0x4')),'fax':require(_0x1f7d('0x2'))(_0x1f7d('0x5')),'sms':require(_0x1f7d('0x2'))(_0x1f7d('0x6')),'chat':require('../../config/logger')(_0x1f7d('0x7'))};function getInteractionId(_0x20ae9d,_0x60b517,_0x23b80e){if(_0x20ae9d&&_0x20ae9d[_[_0x1f7d('0x8')](_0x23b80e)+_0x1f7d('0x9')]){return _0x20ae9d[_['upperFirst'](_0x23b80e)+'InteractionId'];}else if(_0x20ae9d&&_0x20ae9d['id']){return _0x20ae9d['id'];}else if(_0x60b517&&_0x60b517['id']){return _0x60b517['id'];}else{return _0x1f7d('0xa');}}function log(_0x113af7,_0x2d7771,_0x501ce9,_0x3082e4,_0x4ff866,_0xcd642f){loggers[_0x4ff866['toLowerCase']()][_0x113af7](_0x1f7d('0xb'),_0xcd642f[_0x1f7d('0xc')](),_0x2d7771?_0x2d7771['id']:null,_0x2d7771?_0x2d7771[_0x1f7d('0xd')]:null,_0x2d7771?_0x2d7771[_0x1f7d('0xe')]:null,getInteractionId(_0x501ce9,_0x3082e4,_0x4ff866),_0x501ce9?JSON['stringify'](_0x501ce9):_0x1f7d('0xf'));}function updateUser(_0x38963d,_0xbd530e,_0x1cb53c,_0x29d986,_0x123f93){db[_[_0x1f7d('0x8')](_0x29d986)+_0x1f7d('0x10')][_0x1f7d('0x11')]({'where':{'id':getInteractionId(_0xbd530e,_0x1cb53c,_0x29d986)}})[_0x1f7d('0x12')](function(_0x5bacae){if(_0x5bacae){return _0x5bacae[_0x1f7d('0x13')]({'UserId':_0x38963d?_0x38963d['id']:null});}})['then'](function(_0x50f643){if(_0x50f643){log(_0x1f7d('0x14'),_0x38963d,_0xbd530e,_0x1cb53c,_0x29d986,_0x123f93);}})[_0x1f7d('0x15')](function(){log(_0x1f7d('0x16'),_0x38963d,_0xbd530e,_0x1cb53c,_0x29d986,_0x123f93);});}exports[_0x1f7d('0x17')]=function(_0x4fbf51,_0x5e64b4){return function(_0x547ae5,_0x43da10,_0x54db5a){var _0x3923df=_0x547ae5[_0x1f7d('0x18')];var _0x495f61={};var _0x2f110d=_0x547ae5[_0x1f7d('0x19')];if(_0x495f61){_0x495f61=_['clone'](_0x547ae5[_0x1f7d('0x1a')]);_0x495f61=_[_0x1f7d('0x1b')](_0x495f61,[_0x1f7d('0x1a'),_0x1f7d('0x1c'),'phone',_0x1f7d('0x1d'),_0x1f7d('0x1e')]);}updateUser(_0x3923df,_0x495f61,_0x2f110d,_0x4fbf51,_0x5e64b4);_0x54db5a(null);};};
\ No newline at end of file
diff --git a/server/components/license/service.js b/server/components/license/service.js
index 08396fc..b97fb52 100644
--- a/server/components/license/service.js
+++ b/server/components/license/service.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd889=['User','user','isUserLimit','util','composable-middleware','../../mysqldb','../../config/environment','data1','license','split','createDecipher','format','%s:%s:%s','utf8','final','parse','hasOwnProperty','License','findOne','then','count','status','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch'];(function(_0x4dc3e5,_0x476417){var _0x4abdb6=function(_0x3b8c71){while(--_0x3b8c71){_0x4dc3e5['push'](_0x4dc3e5['shift']());}};_0x4abdb6(++_0x476417);}(_0xd889,0x17a));var _0x9d88=function(_0x5ce497,_0xddf074){_0x5ce497=_0x5ce497-0x0;var _0x4651c9=_0xd889[_0x5ce497];return _0x4651c9;};'use strict';var crypto=require('crypto');var util=require(_0x9d88('0x0'));var compose=require(_0x9d88('0x1'));var db=require(_0x9d88('0x2'))['db'];var config=require(_0x9d88('0x3'));function getValueFromLicense(_0x4c9859,_0x68856c){if(_0x4c9859&&_0x68856c){if(_0x68856c[_0x9d88('0x4')]&&_0x68856c[_0x9d88('0x5')]){var _0x35c496=_0x68856c[_0x9d88('0x4')];var _0x3a8c3a=_0x68856c[_0x9d88('0x5')];var _0x386759=_0x35c496[_0x9d88('0x6')]('-')[0x4];var _0x56fba8=_0x35c496[_0x9d88('0x6')]('-')[0x0];var _0x41cba8=crypto[_0x9d88('0x7')]('aes-256-ctr',util[_0x9d88('0x8')](_0x9d88('0x9'),_0x386759,_0x35c496,_0x56fba8));var _0x4402e9=_0x41cba8['update'](_0x3a8c3a,'base64',_0x9d88('0xa'));_0x4402e9+=_0x41cba8[_0x9d88('0xb')](_0x9d88('0xa'));var _0x11efdd=JSON[_0x9d88('0xc')](_0x4402e9);return _0x11efdd[_0x9d88('0xd')](_0x4c9859)?_0x11efdd[_0x4c9859]:null;}}return null;}function isLimit(_0x29c2f9,_0x398787,_0x2c0e4b,_0x46c3a5){var _0x54fb79=_0x398787;return compose()['use'](function(_0x2f53d9,_0xc2ee1a,_0x111a31){return db[_0x9d88('0xe')][_0x9d88('0xf')]({'where':{'id':0x1},'raw':!![]})[_0x9d88('0x10')](function(_0x1372c0){var _0x5d6bd4=getValueFromLicense(_0x29c2f9,_0x1372c0);return _0x5d6bd4?_0x5d6bd4:_0x54fb79;})[_0x9d88('0x10')](function(_0x5e5707){_0x54fb79=_0x5e5707;return _0x2c0e4b[_0x9d88('0x11')](_0x46c3a5);})[_0x9d88('0x10')](function(_0x5707b8){if(_0x5707b8>=_0x54fb79){return _0xc2ee1a[_0x9d88('0x12')](0x193)[_0x9d88('0x13')]({'message':util[_0x9d88('0x8')](_0x9d88('0x14'),_0x29c2f9)});}_0x111a31();})[_0x9d88('0x15')](function(_0x46b66c){_0x111a31(_0x46b66c);});});}function isUserLimit(){return isLimit('users',0x1,db[_0x9d88('0x16')],{'where':{'$or':[{'role':'admin'},{'role':_0x9d88('0x17')}]}});}exports[_0x9d88('0x18')]=isUserLimit;
\ No newline at end of file
+var _0x852c=['createDecipher','aes-256-ctr','format','%s:%s:%s','update','base64','utf8','parse','hasOwnProperty','License','findOne','then','catch','users','admin','user','isUserLimit','crypto','util','../../mysqldb','../../config/environment','data1','license','split'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x852c,0x179));var _0xc852=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x852c[_0x3dd15e];return _0x231fd0;};'use strict';var crypto=require(_0xc852('0x0'));var util=require(_0xc852('0x1'));var compose=require('composable-middleware');var db=require(_0xc852('0x2'))['db'];var config=require(_0xc852('0x3'));function getValueFromLicense(_0x588687,_0x592b1c){if(_0x588687&&_0x592b1c){if(_0x592b1c[_0xc852('0x4')]&&_0x592b1c[_0xc852('0x5')]){var _0xd4b975=_0x592b1c[_0xc852('0x4')];var _0x29e3e3=_0x592b1c['license'];var _0x5e4c6a=_0xd4b975[_0xc852('0x6')]('-')[0x4];var _0x24d1c7=_0xd4b975['split']('-')[0x0];var _0x528c0c=crypto[_0xc852('0x7')](_0xc852('0x8'),util[_0xc852('0x9')](_0xc852('0xa'),_0x5e4c6a,_0xd4b975,_0x24d1c7));var _0xf3f217=_0x528c0c[_0xc852('0xb')](_0x29e3e3,_0xc852('0xc'),_0xc852('0xd'));_0xf3f217+=_0x528c0c['final'](_0xc852('0xd'));var _0x5d1f7e=JSON[_0xc852('0xe')](_0xf3f217);return _0x5d1f7e[_0xc852('0xf')](_0x588687)?_0x5d1f7e[_0x588687]:null;}}return null;}function isLimit(_0x515d01,_0x456af5,_0x5dcae3,_0x1b0e2a){var _0x2de381=_0x456af5;return compose()['use'](function(_0x276a7f,_0x5f024d,_0x2efe73){return db[_0xc852('0x10')][_0xc852('0x11')]({'where':{'id':0x1},'raw':!![]})[_0xc852('0x12')](function(_0x1db093){var _0x374345=getValueFromLicense(_0x515d01,_0x1db093);return _0x374345?_0x374345:_0x2de381;})[_0xc852('0x12')](function(_0x4c6429){_0x2de381=_0x4c6429;return _0x5dcae3['count'](_0x1b0e2a);})[_0xc852('0x12')](function(_0x1c9072){if(_0x1c9072>=_0x2de381){return _0x5f024d['status'](0x193)['json']({'message':util[_0xc852('0x9')]('Maximum\x20%s\x20limit\x20have\x20been\x20reached',_0x515d01)});}_0x2efe73();})[_0xc852('0x13')](function(_0x4e8c45){_0x2efe73(_0x4e8c45);});});}function isUserLimit(){return isLimit(_0xc852('0x14'),0x1,db['User'],{'where':{'$or':[{'role':_0xc852('0x15')},{'role':_0xc852('0x16')}]}});}exports[_0xc852('0x17')]=isUserLimit;
\ No newline at end of file
diff --git a/server/components/parsers/qs.js b/server/components/parsers/qs.js
index f9a4663..55432eb 100644
--- a/server/components/parsers/qs.js
+++ b/server/components/parsers/qs.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb8e6=['filters','isEmpty','forOwn','isArray','offset','sort','map','priority','cast','col','substr','DESC','unsigned','ASC','omit','isString','unset','hasOwnProperty','isNumeric','match','isEmail','lodash','sequelize','fields','split'];(function(_0x2beb06,_0x5f0aca){var _0x4d7cb5=function(_0x43ddeb){while(--_0x43ddeb){_0x2beb06['push'](_0x2beb06['shift']());}};_0x4d7cb5(++_0x5f0aca);}(_0xb8e6,0x15a));var _0x6b8e=function(_0x51af96,_0x2494ea){_0x51af96=_0x51af96-0x0;var _0x7c9730=_0xb8e6[_0x51af96];return _0x7c9730;};'use strict';var _=require(_0x6b8e('0x0'));var moment=require('moment');var sequelize=require(_0x6b8e('0x1'));var LIMIT_VALUE=0xfa;exports[_0x6b8e('0x2')]=function(_0x431b01){var _0x4f1a1c=null;if(_0x431b01){_0x4f1a1c=_0x431b01[_0x6b8e('0x3')](',');}return _0x4f1a1c;};exports[_0x6b8e('0x4')]=function(_0x5a7a8a){var _0x4517be={};if(!_[_0x6b8e('0x5')](_0x5a7a8a)){_0x4517be={};_[_0x6b8e('0x6')](_0x5a7a8a,function(_0x144111,_0x23aaca){try{_0x4517be[_0x23aaca]=_[_0x6b8e('0x7')](_0x144111)?_0x144111:JSON['parse'](_0x144111);}catch(_0x4011aa){_0x4517be[_0x23aaca]=_0x144111['split'](',');}});}return _0x4517be;};exports['limit']=function(_0x8c3155){_0x8c3155=parseInt(_0x8c3155,0xa);if(!_0x8c3155||_0x8c3155<0x0){_0x8c3155=LIMIT_VALUE;}return _0x8c3155;};exports[_0x6b8e('0x8')]=function(_0x17f326){_0x17f326=parseInt(_0x17f326,0xa);if(!_0x17f326||_0x17f326<0x0){_0x17f326=0x0;}return _0x17f326;};exports[_0x6b8e('0x9')]=function(_0x8c6017){var _0x21c149,_0x3eb26b=null;if(_0x8c6017){_0x21c149=_0x8c6017[_0x6b8e('0x3')](',');_0x3eb26b=_[_0x6b8e('0xa')](_0x21c149,function(_0x558d5a){if(_0x558d5a['indexOf']('-')===0x0){return[_0x558d5a===_0x6b8e('0xb')?sequelize[_0x6b8e('0xc')](sequelize[_0x6b8e('0xd')](_0x6b8e('0xb')),'unsigned'):_0x558d5a[_0x6b8e('0xe')](0x1),_0x6b8e('0xf')];}else{return[_0x558d5a===_0x6b8e('0xb')?sequelize[_0x6b8e('0xc')](sequelize[_0x6b8e('0xd')](_0x6b8e('0xb')),_0x6b8e('0x10')):_0x558d5a,_0x6b8e('0x11')];}});}return _0x3eb26b;};exports['omit']=function(_0xee245c,_0x59529d){if(_['isEmpty'](_0xee245c)){return _0xee245c;}if(_[_0x6b8e('0x7')](_0xee245c)){for(var _0x478525=0x0;_0x478525<_0xee245c['length'];_0x478525+=0x1){_0xee245c[_0x478525]=this[_0x6b8e('0x12')](_0xee245c[_0x478525],_0x59529d);}return _0xee245c;}if(!_['isObject'](_0xee245c)){return _0xee245c;}if(_[_0x6b8e('0x13')](_0x59529d)){_0x59529d=[_0x59529d];}if(!_[_0x6b8e('0x7')](_0x59529d)){return _0xee245c;}for(var _0x398d5a=0x0;_0x398d5a<_0x59529d['length'];_0x398d5a+=0x1){_[_0x6b8e('0x14')](_0xee245c,_0x59529d[_0x398d5a]);}for(var _0x3214f8 in _0xee245c){if(_0xee245c[_0x6b8e('0x15')](_0x3214f8)){_0xee245c[_0x3214f8]=this[_0x6b8e('0x12')](_0xee245c[_0x3214f8],_0x59529d);}}return _0xee245c;};exports[_0x6b8e('0x16')]=function(_0x4ba627){return _0x4ba627[_0x6b8e('0x17')](RegExp('^[0-9]*$'))?!![]:![];};exports[_0x6b8e('0x18')]=function(_0x3ebc3f){return _0x3ebc3f['match'](/^\S+@\S+$/)?!![]:![];};
\ No newline at end of file
+var _0xe2bb=['split','filters','isEmpty','isArray','limit','offset','sort','map','indexOf','priority','col','substr','DESC','unsigned','ASC','length','omit','isObject','isString','unset','hasOwnProperty','isNumeric','match','^[0-9]*$','isEmail','lodash','moment','sequelize','fields'];(function(_0x455161,_0x520f10){var _0x3e7c03=function(_0xb17908){while(--_0xb17908){_0x455161['push'](_0x455161['shift']());}};_0x3e7c03(++_0x520f10);}(_0xe2bb,0x11e));var _0xbe2b=function(_0x11eb1f,_0x826f0b){_0x11eb1f=_0x11eb1f-0x0;var _0x2121e9=_0xe2bb[_0x11eb1f];return _0x2121e9;};'use strict';var _=require(_0xbe2b('0x0'));var moment=require(_0xbe2b('0x1'));var sequelize=require(_0xbe2b('0x2'));var LIMIT_VALUE=0xfa;exports[_0xbe2b('0x3')]=function(_0x3ce8a6){var _0x2af93f=null;if(_0x3ce8a6){_0x2af93f=_0x3ce8a6[_0xbe2b('0x4')](',');}return _0x2af93f;};exports[_0xbe2b('0x5')]=function(_0x541e0){var _0x2a320e={};if(!_[_0xbe2b('0x6')](_0x541e0)){_0x2a320e={};_['forOwn'](_0x541e0,function(_0x56b64d,_0x400e0a){try{_0x2a320e[_0x400e0a]=_[_0xbe2b('0x7')](_0x56b64d)?_0x56b64d:JSON['parse'](_0x56b64d);}catch(_0x6735b8){_0x2a320e[_0x400e0a]=_0x56b64d['split'](',');}});}return _0x2a320e;};exports[_0xbe2b('0x8')]=function(_0x195fe3){_0x195fe3=parseInt(_0x195fe3,0xa);if(!_0x195fe3||_0x195fe3<0x0){_0x195fe3=LIMIT_VALUE;}return _0x195fe3;};exports[_0xbe2b('0x9')]=function(_0x10d08f){_0x10d08f=parseInt(_0x10d08f,0xa);if(!_0x10d08f||_0x10d08f<0x0){_0x10d08f=0x0;}return _0x10d08f;};exports[_0xbe2b('0xa')]=function(_0x474ccd){var _0x40a30d,_0xbb236d=null;if(_0x474ccd){_0x40a30d=_0x474ccd[_0xbe2b('0x4')](',');_0xbb236d=_[_0xbe2b('0xb')](_0x40a30d,function(_0x56dc51){if(_0x56dc51[_0xbe2b('0xc')]('-')===0x0){return[_0x56dc51===_0xbe2b('0xd')?sequelize['cast'](sequelize[_0xbe2b('0xe')]('priority'),'unsigned'):_0x56dc51[_0xbe2b('0xf')](0x1),_0xbe2b('0x10')];}else{return[_0x56dc51===_0xbe2b('0xd')?sequelize['cast'](sequelize[_0xbe2b('0xe')](_0xbe2b('0xd')),_0xbe2b('0x11')):_0x56dc51,_0xbe2b('0x12')];}});}return _0xbb236d;};exports['omit']=function(_0x3ba578,_0x290984){if(_[_0xbe2b('0x6')](_0x3ba578)){return _0x3ba578;}if(_[_0xbe2b('0x7')](_0x3ba578)){for(var _0x15544d=0x0;_0x15544d<_0x3ba578[_0xbe2b('0x13')];_0x15544d+=0x1){_0x3ba578[_0x15544d]=this[_0xbe2b('0x14')](_0x3ba578[_0x15544d],_0x290984);}return _0x3ba578;}if(!_[_0xbe2b('0x15')](_0x3ba578)){return _0x3ba578;}if(_[_0xbe2b('0x16')](_0x290984)){_0x290984=[_0x290984];}if(!_[_0xbe2b('0x7')](_0x290984)){return _0x3ba578;}for(var _0x4e80da=0x0;_0x4e80da<_0x290984[_0xbe2b('0x13')];_0x4e80da+=0x1){_[_0xbe2b('0x17')](_0x3ba578,_0x290984[_0x4e80da]);}for(var _0x280d2a in _0x3ba578){if(_0x3ba578[_0xbe2b('0x18')](_0x280d2a)){_0x3ba578[_0x280d2a]=this[_0xbe2b('0x14')](_0x3ba578[_0x280d2a],_0x290984);}}return _0x3ba578;};exports[_0xbe2b('0x19')]=function(_0x55c995){return _0x55c995[_0xbe2b('0x1a')](RegExp(_0xbe2b('0x1b')))?!![]:![];};exports[_0xbe2b('0x1c')]=function(_0x40e6d3){return _0x40e6d3[_0xbe2b('0x1a')](/^\S+@\S+$/)?!![]:![];};
\ No newline at end of file
diff --git a/server/config/express.js b/server/config/express.js
index 5bc40b0..6b102e7 100644
--- a/server/config/express.js
+++ b/server/config/express.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e0=['test','client','set','json\x20replacer','split','static','get','views','/server/views','engine','html','renderFile','view\x20engine','json','50mb','initialize','express','serve-favicon','body-parser','errorhandler','path','passport','cors','./environment','default','env','production','use','join','root','public','favicon.ico','development'];(function(_0x408444,_0x18dc36){var _0x571c6f=function(_0x300732){while(--_0x300732){_0x408444['push'](_0x408444['shift']());}};_0x571c6f(++_0x18dc36);}(_0x70e0,0x17b));var _0x070e=function(_0x761f92,_0xee261d){_0x761f92=_0x761f92-0x0;var _0x55a420=_0x70e0[_0x761f92];return _0x55a420;};'use strict';var express=require(_0x070e('0x0'));var favicon=require(_0x070e('0x1'));var bodyParser=require(_0x070e('0x2'));var methodOverride=require('method-override');var cookieParser=require('cookie-parser');var errorHandler=require(_0x070e('0x3'));var path=require(_0x070e('0x4'));var passport=require(_0x070e('0x5'));var cors=require(_0x070e('0x6'));var moment=require('moment');var config=require(_0x070e('0x7'));var db=require('../mysqldb')['db'];exports[_0x070e('0x8')]=function(_0x4b041d){var _0x56e420=_0x4b041d['get'](_0x070e('0x9'));if(_0x56e420===_0x070e('0xa')){_0x4b041d[_0x070e('0xb')](favicon(path[_0x070e('0xc')](config[_0x070e('0xd')],_0x070e('0xe'),_0x070e('0xf'))));_0x4b041d['set']('appPath',path[_0x070e('0xc')](config[_0x070e('0xd')],_0x070e('0xe')));}if(_0x56e420===_0x070e('0x10')||_0x56e420===_0x070e('0x11')){_0x4b041d[_0x070e('0xb')](favicon(path[_0x070e('0xc')](config[_0x070e('0xd')],_0x070e('0x12'),_0x070e('0xf'))));_0x4b041d[_0x070e('0x13')]('appPath',path['join'](config[_0x070e('0xd')],'client'));_0x4b041d['use'](errorHandler());}_0x4b041d['set'](_0x070e('0x14'),function(_0x14c3fd,_0x51d14d){if(this[_0x14c3fd]instanceof Date){_0x51d14d=this[_0x14c3fd]['toISOString']()[_0x070e('0x15')]('.')[0x0]+'Z';}return _0x51d14d;});_0x4b041d[_0x070e('0xb')](express[_0x070e('0x16')](_0x4b041d[_0x070e('0x17')]('appPath')));_0x4b041d['set'](_0x070e('0x18'),config[_0x070e('0xd')]+_0x070e('0x19'));_0x4b041d[_0x070e('0x1a')](_0x070e('0x1b'),require('ejs')[_0x070e('0x1c')]);_0x4b041d[_0x070e('0x13')](_0x070e('0x1d'),_0x070e('0x1b'));_0x4b041d[_0x070e('0xb')](bodyParser['urlencoded']({'limit':'50mb','extended':!![]}));_0x4b041d['use'](bodyParser[_0x070e('0x1e')]({'limit':_0x070e('0x1f')}));_0x4b041d[_0x070e('0xb')](cors());_0x4b041d['use'](methodOverride());_0x4b041d[_0x070e('0xb')](cookieParser());_0x4b041d['use'](passport[_0x070e('0x20')]());};
\ No newline at end of file
+var _0x70e0=['test','client','set','json\x20replacer','split','static','get','views','/server/views','engine','html','renderFile','view\x20engine','json','50mb','initialize','express','serve-favicon','body-parser','errorhandler','path','passport','cors','./environment','default','env','production','use','join','root','public','favicon.ico','development'];(function(_0x5cba0b,_0x56e3b2){var _0x2f48c7=function(_0x40c9ba){while(--_0x40c9ba){_0x5cba0b['push'](_0x5cba0b['shift']());}};_0x2f48c7(++_0x56e3b2);}(_0x70e0,0x17b));var _0x070e=function(_0x14ac52,_0x1a396a){_0x14ac52=_0x14ac52-0x0;var _0x188617=_0x70e0[_0x14ac52];return _0x188617;};'use strict';var express=require(_0x070e('0x0'));var favicon=require(_0x070e('0x1'));var bodyParser=require(_0x070e('0x2'));var methodOverride=require('method-override');var cookieParser=require('cookie-parser');var errorHandler=require(_0x070e('0x3'));var path=require(_0x070e('0x4'));var passport=require(_0x070e('0x5'));var cors=require(_0x070e('0x6'));var moment=require('moment');var config=require(_0x070e('0x7'));var db=require('../mysqldb')['db'];exports[_0x070e('0x8')]=function(_0x4b041d){var _0x56e420=_0x4b041d['get'](_0x070e('0x9'));if(_0x56e420===_0x070e('0xa')){_0x4b041d[_0x070e('0xb')](favicon(path[_0x070e('0xc')](config[_0x070e('0xd')],_0x070e('0xe'),_0x070e('0xf'))));_0x4b041d['set']('appPath',path[_0x070e('0xc')](config[_0x070e('0xd')],_0x070e('0xe')));}if(_0x56e420===_0x070e('0x10')||_0x56e420===_0x070e('0x11')){_0x4b041d[_0x070e('0xb')](favicon(path[_0x070e('0xc')](config[_0x070e('0xd')],_0x070e('0x12'),_0x070e('0xf'))));_0x4b041d[_0x070e('0x13')]('appPath',path['join'](config[_0x070e('0xd')],'client'));_0x4b041d['use'](errorHandler());}_0x4b041d['set'](_0x070e('0x14'),function(_0x14c3fd,_0x51d14d){if(this[_0x14c3fd]instanceof Date){_0x51d14d=this[_0x14c3fd]['toISOString']()[_0x070e('0x15')]('.')[0x0]+'Z';}return _0x51d14d;});_0x4b041d[_0x070e('0xb')](express[_0x070e('0x16')](_0x4b041d[_0x070e('0x17')]('appPath')));_0x4b041d['set'](_0x070e('0x18'),config[_0x070e('0xd')]+_0x070e('0x19'));_0x4b041d[_0x070e('0x1a')](_0x070e('0x1b'),require('ejs')[_0x070e('0x1c')]);_0x4b041d[_0x070e('0x13')](_0x070e('0x1d'),_0x070e('0x1b'));_0x4b041d[_0x070e('0xb')](bodyParser['urlencoded']({'limit':'50mb','extended':!![]}));_0x4b041d['use'](bodyParser[_0x070e('0x1e')]({'limit':_0x070e('0x1f')}));_0x4b041d[_0x070e('0xb')](cors());_0x4b041d['use'](methodOverride());_0x4b041d[_0x070e('0xb')](cookieParser());_0x4b041d['use'](passport[_0x070e('0x20')]());};
\ No newline at end of file
diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js
index 068f139..fa703ca 100644
--- a/server/config/license/hardware.js
+++ b/server/config/license/hardware.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6087=['mac','address','127.0.0.1','getFirstInterface','cpus','map','join','createHash','digest','getUuid','platform','win32','dmidecode\x20--string\x20system-uuid','utf8','hostname','macAddress','ipAddress','md5','update','hex','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','orderBy','keys','filter','IPv4','internal','concat','head'];(function(_0x29e83d,_0x4d37f8){var _0x38ccf9=function(_0x2934fd){while(--_0x2934fd){_0x29e83d['push'](_0x29e83d['shift']());}};_0x38ccf9(++_0x4d37f8);}(_0x6087,0x1e3));var _0x7608=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x6087[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0x7608('0x0'));var os=require('os');var crypto=require(_0x7608('0x1'));var machine=require(_0x7608('0x2'));var exec=require(_0x7608('0x3'))[_0x7608('0x4')];function getInterfaces(){var _0x160ee4=[];var _0x2b9bf1=os['networkInterfaces']();var _0x31baba=_[_0x7608('0x5')](_[_0x7608('0x6')](_0x2b9bf1));for(var _0x2caf22=0x0;_0x2caf22<_0x31baba['length'];_0x2caf22++){var _0x980780=_0x2b9bf1[_0x31baba[_0x2caf22]][_0x7608('0x7')](function(_0x841299){return _0x841299['family']===_0x7608('0x8')&&_0x841299[_0x7608('0x9')]===![];});_0x160ee4=_0x160ee4[_0x7608('0xa')](_0x980780);}return _0x160ee4;}function getFirstInterface(){var _0x5f25d5=_[_0x7608('0xb')](getInterfaces());return{'macAddress':_0x5f25d5&&_0x5f25d5[_0x7608('0xc')]?_0x5f25d5[_0x7608('0xc')]:'00:00:00:00:00:00','ipAddress':_0x5f25d5&&_0x5f25d5[_0x7608('0xd')]?_0x5f25d5[_0x7608('0xd')]:_0x7608('0xe')};}exports[_0x7608('0xf')]=getFirstInterface;function getCPUhash(){var _0x59a17e=_['orderBy'](os[_0x7608('0x10')]()[_0x7608('0x11')](function(_0x192a8a){return _0x192a8a['model'];}))[_0x7608('0x12')](':');return crypto[_0x7608('0x13')]('md5')['update'](_0x59a17e)[_0x7608('0x14')]('hex');}exports[_0x7608('0x15')]=function(){switch(os[_0x7608('0x16')]()){case _0x7608('0x17'):return exec(_0x7608('0x18'),{'encoding':_0x7608('0x19')})['replace']('\x0d\x0a','');default:var _0x559572=getFirstInterface();var _0x579cb2=getCPUhash();var _0x15b3ed=_0x579cb2+'|'+os[_0x7608('0x1a')]()+'|'+_0x559572[_0x7608('0x1b')]+'|'+_0x559572[_0x7608('0x1c')];var _0x51f5f4=crypto[_0x7608('0x13')](_0x7608('0x1d'))[_0x7608('0x1e')](_0x15b3ed)[_0x7608('0x14')](_0x7608('0x1f'));return _0x51f5f4[_0x7608('0x20')](0x0,0x8)+'-'+_0x51f5f4[_0x7608('0x20')](0x8,0xc)+'-'+_0x51f5f4[_0x7608('0x20')](0xc,0x10)+'-'+_0x51f5f4[_0x7608('0x20')](0x10,0x14)+'-'+_0x51f5f4[_0x7608('0x20')](0x14);}};
\ No newline at end of file
+var _0xf73a=['crypto','bimedia-machine-uuid','child_process','networkInterfaces','orderBy','keys','length','filter','family','IPv4','internal','head','mac','00:00:00:00:00:00','address','127.0.0.1','join','update','digest','getUuid','platform','dmidecode\x20--string\x20system-uuid','replace','hostname','macAddress','ipAddress','createHash','md5','hex','substring','lodash'];(function(_0x2256a9,_0x3ceabe){var _0x57cb49=function(_0x34eb5d){while(--_0x34eb5d){_0x2256a9['push'](_0x2256a9['shift']());}};_0x57cb49(++_0x3ceabe);}(_0xf73a,0xd8));var _0xaf73=function(_0x3f9d96,_0x145ece){_0x3f9d96=_0x3f9d96-0x0;var _0x7d8383=_0xf73a[_0x3f9d96];return _0x7d8383;};'use strict';var _=require(_0xaf73('0x0'));var os=require('os');var crypto=require(_0xaf73('0x1'));var machine=require(_0xaf73('0x2'));var exec=require(_0xaf73('0x3'))['execSync'];function getInterfaces(){var _0x275d9e=[];var _0x258c80=os[_0xaf73('0x4')]();var _0x294407=_[_0xaf73('0x5')](_[_0xaf73('0x6')](_0x258c80));for(var _0x1baf40=0x0;_0x1baf40<_0x294407[_0xaf73('0x7')];_0x1baf40++){var _0x209102=_0x258c80[_0x294407[_0x1baf40]][_0xaf73('0x8')](function(_0x5ae1a7){return _0x5ae1a7[_0xaf73('0x9')]===_0xaf73('0xa')&&_0x5ae1a7[_0xaf73('0xb')]===![];});_0x275d9e=_0x275d9e['concat'](_0x209102);}return _0x275d9e;}function getFirstInterface(){var _0x160c8e=_[_0xaf73('0xc')](getInterfaces());return{'macAddress':_0x160c8e&&_0x160c8e[_0xaf73('0xd')]?_0x160c8e['mac']:_0xaf73('0xe'),'ipAddress':_0x160c8e&&_0x160c8e[_0xaf73('0xf')]?_0x160c8e[_0xaf73('0xf')]:_0xaf73('0x10')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x1703f5=_[_0xaf73('0x5')](os['cpus']()['map'](function(_0x22a44f){return _0x22a44f['model'];}))[_0xaf73('0x11')](':');return crypto['createHash']('md5')[_0xaf73('0x12')](_0x1703f5)[_0xaf73('0x13')]('hex');}exports[_0xaf73('0x14')]=function(){switch(os[_0xaf73('0x15')]()){case'win32':return exec(_0xaf73('0x16'),{'encoding':'utf8'})[_0xaf73('0x17')]('\x0d\x0a','');default:var _0x9d0de6=getFirstInterface();var _0x58a031=getCPUhash();var _0x49a563=_0x58a031+'|'+os[_0xaf73('0x18')]()+'|'+_0x9d0de6[_0xaf73('0x19')]+'|'+_0x9d0de6[_0xaf73('0x1a')];var _0x4bad46=crypto[_0xaf73('0x1b')](_0xaf73('0x1c'))[_0xaf73('0x12')](_0x49a563)[_0xaf73('0x13')](_0xaf73('0x1d'));return _0x4bad46[_0xaf73('0x1e')](0x0,0x8)+'-'+_0x4bad46[_0xaf73('0x1e')](0x8,0xc)+'-'+_0x4bad46[_0xaf73('0x1e')](0xc,0x10)+'-'+_0x4bad46[_0xaf73('0x1e')](0x10,0x14)+'-'+_0x4bad46[_0xaf73('0x1e')](0x14);}};
\ No newline at end of file
diff --git a/server/config/license/index.js b/server/config/license/index.js
index a951990..ebf9500 100644
--- a/server/config/license/index.js
+++ b/server/config/license/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa815=['ipAddress','openIssue','MOTLICENSE','Motion\x20License\x20Alert','Alert','get','data2','info','Disabled','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','data1','uuid','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','diff','days','DEMO\x20START\x20AT\x20%s','message','finally','getUuid','License','findOrCreate','SERVICE\x20LICENSE\x20STARTED\x20%s','default','util','crypto','moment','bluebird','pkginfo','version','../../mysqldb','./hardware','../logger','license','../../api/jira/jira.controller','https://www.xcallymotion.com','format','%s/api/servers/%s/check?version=%s','%s/api/servers/%s/check?version=%s&oldtoken=%s','exports','GET','then','catch','createCipher','aes-256-ctr','secrets','session','utf8','base64','createDecipher','update','final','findOne','admin','fullname','|reason|','|uuid|','|machineUuid|','|name|','|email|','email','getFirstInterface'];(function(_0x2263c9,_0x419c71){var _0x56900a=function(_0x4a6402){while(--_0x4a6402){_0x2263c9['push'](_0x2263c9['shift']());}};_0x56900a(++_0x419c71);}(_0xa815,0x9a));var _0x5a81=function(_0x20c9b2,_0x55d7b1){_0x20c9b2=_0x20c9b2-0x0;var _0x2c6030=_0xa815[_0x20c9b2];return _0x2c6030;};'use strict';var util=require(_0x5a81('0x0'));var crypto=require(_0x5a81('0x1'));var moment=require(_0x5a81('0x2'));var rp=require('request-promise');var BPromise=require(_0x5a81('0x3'));var pkginfo=require(_0x5a81('0x4'))(module,_0x5a81('0x5'));var db=require(_0x5a81('0x6'))['db'];var config=require('../environment');var hardware=require(_0x5a81('0x7'));var logger=require(_0x5a81('0x8'))(_0x5a81('0x9'));var jira=require(_0x5a81('0xa'));var HOST=_0x5a81('0xb');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var ADMIN;var oldToken;function httpRequest(_0x3d3ebe){return new BPromise(function(_0x31c57b,_0x148f24){var _0x28c651=util[_0x5a81('0xc')](_0x5a81('0xd'),HOST,_0x3d3ebe,module['exports'][_0x5a81('0x5')]);if(oldToken){_0x28c651=util['format'](_0x5a81('0xe'),HOST,_0x3d3ebe,module[_0x5a81('0xf')][_0x5a81('0x5')],oldToken);}var _0x36573e={'uri':_0x28c651,'method':_0x5a81('0x10'),'timeout':0xea60,'json':!![]};return rp(_0x36573e)[_0x5a81('0x11')](function(_0x194e97){_0x31c57b(_0x194e97);})[_0x5a81('0x12')](function(_0x23700a){_0x148f24(_0x23700a);});});}function encryptDate(_0x1c7716){var _0x48fe10=crypto[_0x5a81('0x13')](_0x5a81('0x14'),config[_0x5a81('0x15')][_0x5a81('0x16')]);var _0x7950d8=_0x48fe10['update'](_0x1c7716,_0x5a81('0x17'),'base64');_0x7950d8+=_0x48fe10['final'](_0x5a81('0x18'));return _0x7950d8;}function decryptDate(_0x10ea1f){var _0x1a68b5=crypto[_0x5a81('0x19')](_0x5a81('0x14'),config['secrets'][_0x5a81('0x16')]);var _0x2229b3=_0x1a68b5[_0x5a81('0x1a')](_0x10ea1f,_0x5a81('0x18'),'utf8');_0x2229b3+=_0x1a68b5[_0x5a81('0x1b')](_0x5a81('0x17'));return _0x2229b3;}function sendJiraAlert(_0x337455,_0x2629ff,_0xa5950e){var _0x4c30dc='||FIELD||VALUE||\x0a';return db['User'][_0x5a81('0x1c')]({'where':{'role':_0x5a81('0x1d')},'attributes':[_0x5a81('0x1e'),'email'],'raw':!![]})[_0x5a81('0x11')](function(_0x55f034){ADMIN=_0x55f034;_0x4c30dc+=_0x5a81('0x1f')+_0xa5950e+'|\x0a';_0x4c30dc+=_0x5a81('0x20')+_0x337455+'|\x0a';_0x4c30dc+=_0x5a81('0x21')+_0x2629ff+'|\x0a';_0x4c30dc+=_0x5a81('0x22')+ADMIN[_0x5a81('0x1e')]+'|\x0a';_0x4c30dc+=_0x5a81('0x23')+ADMIN[_0x5a81('0x24')]+'|\x0a';return _0x4c30dc;})[_0x5a81('0x11')](function(_0x3b1bfe){var _0x3aa26b=hardware[_0x5a81('0x25')]()[_0x5a81('0x26')];return jira[_0x5a81('0x27')]({'key':_0x5a81('0x28'),'summary':_0x5a81('0x29'),'description':_0x3b1bfe,'issuetype':_0x5a81('0x2a'),'oldToken':_0x337455,'newToken':_0x2629ff,'email':ADMIN[_0x5a81('0x24')],'name':ADMIN['fullname'],'reason':GRAY_PERIOD_REASON,'ip':_0x3aa26b});});}function manageLicense(_0x230110,_0x48e8dd){var _0x331724=_0x48e8dd[_0x5a81('0x2b')]({'plain':!![]});httpRequest(_0x230110)['then'](function(_0x3a182f){if(oldToken){oldToken=undefined;}if(_0x3a182f['active']){if(!_0x331724['license']&&_0x331724[_0x5a81('0x9')]!=_0x3a182f[_0x5a81('0x9')]||_0x331724[_0x5a81('0x9')]&&_0x331724[_0x5a81('0x2c')]){logger[_0x5a81('0x2d')]('THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED');}if(_0x331724['license']&&!_0x331724['data2']&&_0x331724['license']!=_0x3a182f['license']){logger[_0x5a81('0x2d')]('THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED');}if(_0x331724[_0x5a81('0x9')]&&!_0x331724['data2']&&_0x331724[_0x5a81('0x9')]==_0x3a182f['license']){return _0x48e8dd;}return _0x48e8dd[_0x5a81('0x1a')]({'data1':_0x230110,'data2':null,'license':_0x3a182f['license']});}else{if(_0x3a182f[_0x5a81('0x9')]||_0x331724[_0x5a81('0x9')]){if(!_0x331724[_0x5a81('0x2c')]){if(_0x331724['data1']==_0x230110){GRAY_PERIOD_REASON=_0x5a81('0x2e');logger['info']('THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED');}else{GRAY_PERIOD_REASON=_0x5a81('0x2f');oldToken=_0x331724['data1'];logger[_0x5a81('0x2d')](_0x5a81('0x30'),_0x331724['data1'],_0x230110);}sendJiraAlert(_0x331724[_0x5a81('0x31')],_0x3a182f[_0x5a81('0x32')],GRAY_PERIOD_REASON);logger[_0x5a81('0x2d')](_0x5a81('0x33'),GRAY_PERIOD_REASON[_0x5a81('0x34')](),moment()[_0x5a81('0xc')](_0x5a81('0x35')));return _0x48e8dd[_0x5a81('0x1a')]({'data2':encryptDate(moment()[_0x5a81('0xc')](_0x5a81('0x35')))});}else{if(moment()[_0x5a81('0x36')](decryptDate(_0x331724[_0x5a81('0x2c')]),_0x5a81('0x37'))>DAYS){logger[_0x5a81('0x2d')](_0x5a81('0x38'),moment()['format'](_0x5a81('0x35')));return _0x48e8dd['update']({'data1':_0x230110,'data2':null,'license':null});}}}else{if(_0x331724['data1']!=_0x230110){logger['info'](_0x5a81('0x30'),_0x331724[_0x5a81('0x31')],_0x230110);return _0x48e8dd[_0x5a81('0x1a')]({'data1':_0x230110,'data2':null,'license':null});}}}return _0x48e8dd;})[_0x5a81('0x11')](function(_0x38c6fe){_0x48e8dd=_0x38c6fe;})['catch'](function(_0x808ce1){logger['error'](_0x808ce1[_0x5a81('0x39')]);})[_0x5a81('0x3a')](function(){setTimeout(function(){manageLicense(hardware[_0x5a81('0x3b')](),_0x48e8dd);},TIME);});}function defaultLicense(){var _0x345788=hardware[_0x5a81('0x3b')]();if(_0x345788){return db[_0x5a81('0x3c')][_0x5a81('0x3d')]({'where':{'id':0x1},'defaults':{'data1':_0x345788}})['spread'](function(_0x4b07d1,_0x11a871){logger[_0x5a81('0x2d')](_0x5a81('0x3e'),_0x345788);manageLicense(_0x345788,_0x4b07d1);})[_0x5a81('0x12')](function(_0x20cc3f){logger['error'](_0x20cc3f[_0x5a81('0x39')]);});}}exports[_0x5a81('0x3f')]=defaultLicense;
\ No newline at end of file
+var _0xf7df=['User','findOne','admin','fullname','email','then','|reason|','|machineUuid|','|name|','|email|','getFirstInterface','ipAddress','openIssue','MOTLICENSE','Alert','get','active','license','info','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED','data2','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','data1','Disabled','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','diff','DEMO\x20START\x20AT\x20%s','error','finally','getUuid','License','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','util','crypto','request-promise','bluebird','version','../../mysqldb','../environment','./hardware','../logger','https://www.xcallymotion.com','format','exports','%s/api/servers/%s/check?version=%s&oldtoken=%s','catch','createCipher','aes-256-ctr','session','update','utf8','final','base64','createDecipher','secrets','||FIELD||VALUE||\x0a'];(function(_0x28a526,_0x3701b6){var _0x37c878=function(_0x34c698){while(--_0x34c698){_0x28a526['push'](_0x28a526['shift']());}};_0x37c878(++_0x3701b6);}(_0xf7df,0xe4));var _0xff7d=function(_0x41b806,_0x3319d9){_0x41b806=_0x41b806-0x0;var _0x5ae08a=_0xf7df[_0x41b806];return _0x5ae08a;};'use strict';var util=require(_0xff7d('0x0'));var crypto=require(_0xff7d('0x1'));var moment=require('moment');var rp=require(_0xff7d('0x2'));var BPromise=require(_0xff7d('0x3'));var pkginfo=require('pkginfo')(module,_0xff7d('0x4'));var db=require(_0xff7d('0x5'))['db'];var config=require(_0xff7d('0x6'));var hardware=require(_0xff7d('0x7'));var logger=require(_0xff7d('0x8'))('license');var jira=require('../../api/jira/jira.controller');var HOST=_0xff7d('0x9');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var ADMIN;var oldToken;function httpRequest(_0xb12bf8){return new BPromise(function(_0x33b853,_0x269f6a){var _0x1e9f09=util[_0xff7d('0xa')]('%s/api/servers/%s/check?version=%s',HOST,_0xb12bf8,module[_0xff7d('0xb')]['version']);if(oldToken){_0x1e9f09=util[_0xff7d('0xa')](_0xff7d('0xc'),HOST,_0xb12bf8,module['exports'][_0xff7d('0x4')],oldToken);}var _0x4f6633={'uri':_0x1e9f09,'method':'GET','timeout':0xea60,'json':!![]};return rp(_0x4f6633)['then'](function(_0x52ad6d){_0x33b853(_0x52ad6d);})[_0xff7d('0xd')](function(_0x36f816){_0x269f6a(_0x36f816);});});}function encryptDate(_0x19f475){var _0x19f4f6=crypto[_0xff7d('0xe')](_0xff7d('0xf'),config['secrets'][_0xff7d('0x10')]);var _0x43b200=_0x19f4f6[_0xff7d('0x11')](_0x19f475,_0xff7d('0x12'),'base64');_0x43b200+=_0x19f4f6[_0xff7d('0x13')](_0xff7d('0x14'));return _0x43b200;}function decryptDate(_0x133b4d){var _0x5f1ffc=crypto[_0xff7d('0x15')](_0xff7d('0xf'),config[_0xff7d('0x16')][_0xff7d('0x10')]);var _0x4dcda8=_0x5f1ffc[_0xff7d('0x11')](_0x133b4d,_0xff7d('0x14'),_0xff7d('0x12'));_0x4dcda8+=_0x5f1ffc[_0xff7d('0x13')](_0xff7d('0x12'));return _0x4dcda8;}function sendJiraAlert(_0x5b1886,_0x2ed3cc,_0x1d1d20){var _0x5762db=_0xff7d('0x17');return db[_0xff7d('0x18')][_0xff7d('0x19')]({'where':{'role':_0xff7d('0x1a')},'attributes':[_0xff7d('0x1b'),_0xff7d('0x1c')],'raw':!![]})[_0xff7d('0x1d')](function(_0x4d581b){ADMIN=_0x4d581b;_0x5762db+=_0xff7d('0x1e')+_0x1d1d20+'|\x0a';_0x5762db+='|uuid|'+_0x5b1886+'|\x0a';_0x5762db+=_0xff7d('0x1f')+_0x2ed3cc+'|\x0a';_0x5762db+=_0xff7d('0x20')+ADMIN[_0xff7d('0x1b')]+'|\x0a';_0x5762db+=_0xff7d('0x21')+ADMIN['email']+'|\x0a';return _0x5762db;})['then'](function(_0x5002c7){var _0x36d0aa=hardware[_0xff7d('0x22')]()[_0xff7d('0x23')];return jira[_0xff7d('0x24')]({'key':_0xff7d('0x25'),'summary':'Motion\x20License\x20Alert','description':_0x5002c7,'issuetype':_0xff7d('0x26'),'oldToken':_0x5b1886,'newToken':_0x2ed3cc,'email':ADMIN['email'],'name':ADMIN[_0xff7d('0x1b')],'reason':GRAY_PERIOD_REASON,'ip':_0x36d0aa});});}function manageLicense(_0x5a9266,_0x54f60){var _0x76979=_0x54f60[_0xff7d('0x27')]({'plain':!![]});httpRequest(_0x5a9266)[_0xff7d('0x1d')](function(_0x4d5ab0){if(oldToken){oldToken=undefined;}if(_0x4d5ab0[_0xff7d('0x28')]){if(!_0x76979[_0xff7d('0x29')]&&_0x76979[_0xff7d('0x29')]!=_0x4d5ab0['license']||_0x76979['license']&&_0x76979['data2']){logger[_0xff7d('0x2a')](_0xff7d('0x2b'));}if(_0x76979[_0xff7d('0x29')]&&!_0x76979[_0xff7d('0x2c')]&&_0x76979['license']!=_0x4d5ab0[_0xff7d('0x29')]){logger[_0xff7d('0x2a')](_0xff7d('0x2d'));}if(_0x76979[_0xff7d('0x29')]&&!_0x76979[_0xff7d('0x2c')]&&_0x76979[_0xff7d('0x29')]==_0x4d5ab0[_0xff7d('0x29')]){return _0x54f60;}return _0x54f60[_0xff7d('0x11')]({'data1':_0x5a9266,'data2':null,'license':_0x4d5ab0[_0xff7d('0x29')]});}else{if(_0x4d5ab0[_0xff7d('0x29')]||_0x76979['license']){if(!_0x76979[_0xff7d('0x2c')]){if(_0x76979[_0xff7d('0x2e')]==_0x5a9266){GRAY_PERIOD_REASON=_0xff7d('0x2f');logger[_0xff7d('0x2a')](_0xff7d('0x30'));}else{GRAY_PERIOD_REASON=_0xff7d('0x31');oldToken=_0x76979[_0xff7d('0x2e')];logger[_0xff7d('0x2a')](_0xff7d('0x32'),_0x76979[_0xff7d('0x2e')],_0x5a9266);}sendJiraAlert(_0x76979['data1'],_0x4d5ab0['uuid'],GRAY_PERIOD_REASON);logger[_0xff7d('0x2a')](_0xff7d('0x33'),GRAY_PERIOD_REASON[_0xff7d('0x34')](),moment()[_0xff7d('0xa')](_0xff7d('0x35')));return _0x54f60['update']({'data2':encryptDate(moment()['format']('YYYY-MM-DD\x20HH:mm'))});}else{if(moment()[_0xff7d('0x36')](decryptDate(_0x76979[_0xff7d('0x2c')]),'days')>DAYS){logger[_0xff7d('0x2a')](_0xff7d('0x37'),moment()[_0xff7d('0xa')](_0xff7d('0x35')));return _0x54f60[_0xff7d('0x11')]({'data1':_0x5a9266,'data2':null,'license':null});}}}else{if(_0x76979[_0xff7d('0x2e')]!=_0x5a9266){logger['info'](_0xff7d('0x32'),_0x76979[_0xff7d('0x2e')],_0x5a9266);return _0x54f60[_0xff7d('0x11')]({'data1':_0x5a9266,'data2':null,'license':null});}}}return _0x54f60;})[_0xff7d('0x1d')](function(_0x19fdae){_0x54f60=_0x19fdae;})['catch'](function(_0x4fbdcd){logger[_0xff7d('0x38')](_0x4fbdcd['message']);})[_0xff7d('0x39')](function(){setTimeout(function(){manageLicense(hardware['getUuid'](),_0x54f60);},TIME);});}function defaultLicense(){var _0x1a2029=hardware[_0xff7d('0x3a')]();if(_0x1a2029){return db[_0xff7d('0x3b')][_0xff7d('0x3c')]({'where':{'id':0x1},'defaults':{'data1':_0x1a2029}})[_0xff7d('0x3d')](function(_0x3502c2,_0x29b3cd){logger[_0xff7d('0x2a')](_0xff7d('0x3e'),_0x1a2029);manageLicense(_0x1a2029,_0x3502c2);})[_0xff7d('0xd')](function(_0x4ac64c){logger[_0xff7d('0x38')](_0x4ac64c['message']);});}}exports['default']=defaultLicense;
\ No newline at end of file
diff --git a/server/config/license/util.js b/server/config/license/util.js
index d1572d5..a732bc6 100644
--- a/server/config/license/util.js
+++ b/server/config/license/util.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ec8=['deadline','days','grayReason','changed','disabled','2027-01-01T00:00:00.000Z','Demo\x20license','getLicense','License','find','defaults','then','checkLicense','crypto','../../mysqldb','isEmpty','License\x20key\x20value\x20not\x20found','data1','data2','split','createDecipher','aes-256-ctr','format','%s:%s:%s','base64','utf8','final','parse','demo','uuid','machineUuid','getUuid','session','update','gray'];(function(_0x1dc8ce,_0x46f0a2){var _0xc1fadd=function(_0x5acf3f){while(--_0x5acf3f){_0x1dc8ce['push'](_0x1dc8ce['shift']());}};_0xc1fadd(++_0x46f0a2);}(_0x9ec8,0x99));var _0x89ec=function(_0x8e77a8,_0x1824f8){_0x8e77a8=_0x8e77a8-0x0;var _0x4b5e85=_0x9ec8[_0x8e77a8];return _0x4b5e85;};'use strict';var crypto=require(_0x89ec('0x0'));var util=require('util');var _=require('lodash');var moment=require('moment');var hardware=require('./hardware');var config=require('../environment');var db=require(_0x89ec('0x1'))['db'];function checkLicense(_0x37ac26,_0x2bbd91){if(_0x37ac26){try{var _0x9f5358=_0x2bbd91||_0x37ac26['license'];if(_[_0x89ec('0x2')](_0x9f5358)){throw new Error(_0x89ec('0x3'));}var _0x58515d=_0x37ac26[_0x89ec('0x4')];var _0x1a911b=_0x37ac26[_0x89ec('0x5')];var _0x2f6ceb=_0x58515d['split']('-')[0x4];var _0x2e5a2b=_0x58515d[_0x89ec('0x6')]('-')[0x0];var _0x43e080=crypto[_0x89ec('0x7')](_0x89ec('0x8'),util[_0x89ec('0x9')](_0x89ec('0xa'),_0x2f6ceb,_0x58515d,_0x2e5a2b));var _0x3d28ad=_0x43e080['update'](_0x9f5358,_0x89ec('0xb'),_0x89ec('0xc'));_0x3d28ad+=_0x43e080[_0x89ec('0xd')](_0x89ec('0xc'));var _0x2ac350=JSON[_0x89ec('0xe')](_0x3d28ad);_0x2ac350[_0x89ec('0xf')]=![];_0x2ac350[_0x89ec('0x10')]=_0x58515d;_0x2ac350[_0x89ec('0x11')]=hardware[_0x89ec('0x12')]();if(_0x1a911b){var _0x189fa9=crypto[_0x89ec('0x7')]('aes-256-ctr',config['secrets'][_0x89ec('0x13')]);var _0x582429=_0x189fa9[_0x89ec('0x14')](_0x1a911b,_0x89ec('0xb'),_0x89ec('0xc'));_0x582429+=_0x189fa9['final'](_0x89ec('0xc'));_0x2ac350[_0x89ec('0x15')]=_0x582429;_0x2ac350[_0x89ec('0x16')]=moment(_0x582429)['add'](0x7,_0x89ec('0x17'))[_0x89ec('0x9')]();_0x2ac350[_0x89ec('0x18')]=_0x2ac350['uuid']!=_0x2ac350[_0x89ec('0x11')]?_0x89ec('0x19'):_0x89ec('0x1a');}return _0x2ac350;}catch(_0x1ac344){return{'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x89ec('0x1b'),'chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':'Breaking\x20license','uuid':_0x37ac26[_0x89ec('0x4')],'machineUuid':hardware[_0x89ec('0x12')](),'message':_0x1ac344['message'],'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}}return{'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x89ec('0x1b'),'chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0x89ec('0x1c'),'uuid':_0x37ac26['data1'],'machineUuid':hardware[_0x89ec('0x12')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}exports[_0x89ec('0x1d')]=function(_0x16c802){return db[_0x89ec('0x1e')][_0x89ec('0x1f')](_[_0x89ec('0x20')](_0x16c802,{'raw':!![],'where':{'id':0x1}}))[_0x89ec('0x21')](function(_0x53ab5a){return checkLicense(_0x53ab5a,null);});};exports[_0x89ec('0x22')]=checkLicense;
\ No newline at end of file
+var _0xe3d3=['defaults','checkLicense','util','lodash','moment','./hardware','../environment','../../mysqldb','license','data2','split','createDecipher','aes-256-ctr','format','%s:%s:%s','update','base64','utf8','final','parse','demo','uuid','machineUuid','secrets','gray','add','grayReason','disabled','Breaking\x20license','data1','getUuid','message','2027-01-01T00:00:00.000Z','Demo\x20license','License'];(function(_0x4fc40f,_0x1a66b8){var _0x1ec033=function(_0x4072e2){while(--_0x4072e2){_0x4fc40f['push'](_0x4fc40f['shift']());}};_0x1ec033(++_0x1a66b8);}(_0xe3d3,0x8e));var _0x3e3d=function(_0x36b5e0,_0xc87576){_0x36b5e0=_0x36b5e0-0x0;var _0xaa914e=_0xe3d3[_0x36b5e0];return _0xaa914e;};'use strict';var crypto=require('crypto');var util=require(_0x3e3d('0x0'));var _=require(_0x3e3d('0x1'));var moment=require(_0x3e3d('0x2'));var hardware=require(_0x3e3d('0x3'));var config=require(_0x3e3d('0x4'));var db=require(_0x3e3d('0x5'))['db'];function checkLicense(_0x4c34b3,_0x17d12f){if(_0x4c34b3){try{var _0x4d822c=_0x17d12f||_0x4c34b3[_0x3e3d('0x6')];if(_['isEmpty'](_0x4d822c)){throw new Error('License\x20key\x20value\x20not\x20found');}var _0x14dfcc=_0x4c34b3['data1'];var _0xb78c97=_0x4c34b3[_0x3e3d('0x7')];var _0x162415=_0x14dfcc['split']('-')[0x4];var _0x38c0ae=_0x14dfcc[_0x3e3d('0x8')]('-')[0x0];var _0x4e7651=crypto[_0x3e3d('0x9')](_0x3e3d('0xa'),util[_0x3e3d('0xb')](_0x3e3d('0xc'),_0x162415,_0x14dfcc,_0x38c0ae));var _0x19f5af=_0x4e7651[_0x3e3d('0xd')](_0x4d822c,_0x3e3d('0xe'),_0x3e3d('0xf'));_0x19f5af+=_0x4e7651[_0x3e3d('0x10')](_0x3e3d('0xf'));var _0x175629=JSON[_0x3e3d('0x11')](_0x19f5af);_0x175629[_0x3e3d('0x12')]=![];_0x175629[_0x3e3d('0x13')]=_0x14dfcc;_0x175629[_0x3e3d('0x14')]=hardware['getUuid']();if(_0xb78c97){var _0x22f8ec=crypto[_0x3e3d('0x9')](_0x3e3d('0xa'),config[_0x3e3d('0x15')]['session']);var _0x2ae5ed=_0x22f8ec['update'](_0xb78c97,_0x3e3d('0xe'),'utf8');_0x2ae5ed+=_0x22f8ec[_0x3e3d('0x10')](_0x3e3d('0xf'));_0x175629[_0x3e3d('0x16')]=_0x2ae5ed;_0x175629['deadline']=moment(_0x2ae5ed)[_0x3e3d('0x17')](0x7,'days')[_0x3e3d('0xb')]();_0x175629[_0x3e3d('0x18')]=_0x175629[_0x3e3d('0x13')]!=_0x175629[_0x3e3d('0x14')]?'changed':_0x3e3d('0x19');}return _0x175629;}catch(_0x5aae72){return{'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':'2027-01-01T00:00:00.000Z','chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0x3e3d('0x1a'),'uuid':_0x4c34b3[_0x3e3d('0x1b')],'machineUuid':hardware[_0x3e3d('0x1c')](),'message':_0x5aae72[_0x3e3d('0x1d')],'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}}return{'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x3e3d('0x1e'),'chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0x3e3d('0x1f'),'uuid':_0x4c34b3[_0x3e3d('0x1b')],'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}exports['getLicense']=function(_0x18c437){return db[_0x3e3d('0x20')]['find'](_[_0x3e3d('0x21')](_0x18c437,{'raw':!![],'where':{'id':0x1}}))['then'](function(_0xa1c4fb){return checkLicense(_0xa1c4fb,null);});};exports[_0x3e3d('0x22')]=checkLicense;
\ No newline at end of file
diff --git a/server/config/local.env.js b/server/config/local.env.js
index cb528a5..05d7952 100644
--- a/server/config/local.env.js
+++ b/server/config/local.env.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ef8=['http://localhost:9000','app-id','secret','exports'];(function(_0x6812e1,_0x4a69d3){var _0x356bcf=function(_0x2928fe){while(--_0x2928fe){_0x6812e1['push'](_0x6812e1['shift']());}};_0x356bcf(++_0x4a69d3);}(_0x9ef8,0x17f));var _0x89ef=function(_0x143a91,_0x235332){_0x143a91=_0x143a91-0x0;var _0x1906f5=_0x9ef8[_0x143a91];return _0x1906f5;};'use strict';module[_0x89ef('0x0')]={'DOMAIN':_0x89ef('0x1'),'SESSION_SECRET':'myappanuglar-secret','GOOGLE_ID':_0x89ef('0x2'),'GOOGLE_SECRET':_0x89ef('0x3'),'DEBUG':''};
\ No newline at end of file
+var _0x7834=['app-id','exports'];(function(_0x3626d3,_0x5b527e){var _0x24d837=function(_0x53897d){while(--_0x53897d){_0x3626d3['push'](_0x3626d3['shift']());}};_0x24d837(++_0x5b527e);}(_0x7834,0x13f));var _0x4783=function(_0x40a44b,_0x2b8785){_0x40a44b=_0x40a44b-0x0;var _0x2b656d=_0x7834[_0x40a44b];return _0x2b656d;};'use strict';module[_0x4783('0x0')]={'DOMAIN':'http://localhost:9000','SESSION_SECRET':'myappanuglar-secret','GOOGLE_ID':_0x4783('0x1'),'GOOGLE_SECRET':'secret','DEBUG':''};
\ No newline at end of file
diff --git a/server/config/logger.js b/server/config/logger.js
index 024a279..e317e17 100644
--- a/server/config/logger.js
+++ b/server/config/logger.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9161=['YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','message','exports','Logger','transports','File','%s-%s','error','info','Console','env','debugLevel','moment','winston','log','xcally','format','%s-%s.log','[%s]\x20[%s]\x20%s\x20-\x20%s'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0x9161,0xe0));var _0x1916=function(_0x3a91ec,_0x5eebb0){_0x3a91ec=_0x3a91ec-0x0;var _0x54f06f=_0x9161[_0x3a91ec];return _0x54f06f;};'use strict';var moment=require(_0x1916('0x0'));var winston=require(_0x1916('0x1'));var util=require('util');var path=require('path');var debugLevel='INFO';function filename(_0x497136,_0x1a967f){return path['join']('/var',_0x1916('0x2'),_0x1916('0x3'),util[_0x1916('0x4')](_0x1916('0x5'),_0x497136,_0x1a967f));}function formatter(_0x3e2029,_0x6e420d){return util[_0x1916('0x4')](_0x1916('0x6'),moment()[_0x1916('0x4')](_0x1916('0x7')),_0x6e420d[_0x1916('0x8')][_0x1916('0x9')](),_0x3e2029,_0x6e420d[_0x1916('0xa')]);}module[_0x1916('0xb')]=function(_0x42f250){return new winston[(_0x1916('0xc'))]({'transports':[new winston[(_0x1916('0xd'))][(_0x1916('0xe'))]({'name':util[_0x1916('0x4')](_0x1916('0xf'),_0x42f250,_0x1916('0x10')),'filename':filename(_0x42f250,_0x1916('0x10')),'level':'error','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xbd1fa4){return formatter(_0x42f250,_0xbd1fa4);}}),new winston[(_0x1916('0xd'))]['File']({'name':util[_0x1916('0x4')](_0x1916('0xf'),_0x42f250,_0x1916('0x11')),'filename':filename(_0x42f250,_0x1916('0x11')),'level':_0x1916('0x11'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x453fc6){return formatter(_0x42f250,_0x453fc6);}}),new winston[(_0x1916('0xd'))][(_0x1916('0x12'))]({'level':process[_0x1916('0x13')][_0x1916('0x14')]||debugLevel,'json':![],'formatter':function(_0x38161f){return formatter(_0x42f250,_0x38161f);}})]});};
\ No newline at end of file
+var _0xe6f3=['%s-%s.log','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','level','message','Logger','transports','File','%s-%s','error','info','env','moment','winston','path','join','/var','xcally','format'];(function(_0x4ec520,_0x15fee2){var _0xed49d7=function(_0x3031f2){while(--_0x3031f2){_0x4ec520['push'](_0x4ec520['shift']());}};_0xed49d7(++_0x15fee2);}(_0xe6f3,0x19b));var _0x3e6f=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xe6f3[_0x501510];return _0x1e6ee5;};'use strict';var moment=require(_0x3e6f('0x0'));var winston=require(_0x3e6f('0x1'));var util=require('util');var path=require(_0x3e6f('0x2'));var debugLevel='INFO';function filename(_0x1bfb33,_0x2a3d89){return path[_0x3e6f('0x3')](_0x3e6f('0x4'),'log',_0x3e6f('0x5'),util[_0x3e6f('0x6')](_0x3e6f('0x7'),_0x1bfb33,_0x2a3d89));}function formatter(_0x9a4f19,_0x5edf94){return util[_0x3e6f('0x6')](_0x3e6f('0x8'),moment()['format'](_0x3e6f('0x9')),_0x5edf94[_0x3e6f('0xa')]['toUpperCase'](),_0x9a4f19,_0x5edf94[_0x3e6f('0xb')]);}module['exports']=function(_0x219aef){return new winston[(_0x3e6f('0xc'))]({'transports':[new winston[(_0x3e6f('0xd'))][(_0x3e6f('0xe'))]({'name':util['format'](_0x3e6f('0xf'),_0x219aef,'error'),'filename':filename(_0x219aef,_0x3e6f('0x10')),'level':_0x3e6f('0x10'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x4dd808){return formatter(_0x219aef,_0x4dd808);}}),new winston['transports'][(_0x3e6f('0xe'))]({'name':util[_0x3e6f('0x6')](_0x3e6f('0xf'),_0x219aef,'info'),'filename':filename(_0x219aef,'info'),'level':_0x3e6f('0x11'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xcb4dd){return formatter(_0x219aef,_0xcb4dd);}}),new winston[(_0x3e6f('0xd'))]['Console']({'level':process[_0x3e6f('0x12')]['debugLevel']||debugLevel,'json':![],'formatter':function(_0x1eea28){return formatter(_0x219aef,_0x1eea28);}})]});};
\ No newline at end of file
diff --git a/server/config/pm2/config.js b/server/config/pm2/config.js
index 2a1f34e..7294906 100644
--- a/server/config/pm2/config.js
+++ b/server/config/pm2/config.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe858=['../../services/express/index.js','ami','join','../../services/ami/index.js','agi','../../services/agi/index.js','email','../../services/email/index.js','routing','../../services/routing/index.js','xdr','../../services/xdr/index.js','exports','path','express'];(function(_0x4acfa9,_0x3fa0c9){var _0x3dbae0=function(_0x221bf7){while(--_0x221bf7){_0x4acfa9['push'](_0x4acfa9['shift']());}};_0x3dbae0(++_0x3fa0c9);}(_0xe858,0x1b1));var _0x8e85=function(_0x3d90b4,_0x1e2fc6){_0x3d90b4=_0x3d90b4-0x0;var _0x4c65d3=_0xe858[_0x3d90b4];return _0x4c65d3;};'use strict';var path=require(_0x8e85('0x0'));var os=require('os');var config={'apps':[{'name':_0x8e85('0x1'),'script':path['join'](__dirname,_0x8e85('0x2'))},{'name':_0x8e85('0x3'),'script':path[_0x8e85('0x4')](__dirname,_0x8e85('0x5'))},{'name':_0x8e85('0x6'),'script':path[_0x8e85('0x4')](__dirname,_0x8e85('0x7'))},{'name':_0x8e85('0x8'),'script':path[_0x8e85('0x4')](__dirname,_0x8e85('0x9'))},{'name':_0x8e85('0xa'),'script':path[_0x8e85('0x4')](__dirname,_0x8e85('0xb'))},{'name':_0x8e85('0xc'),'script':path[_0x8e85('0x4')](__dirname,_0x8e85('0xd'))}]};module[_0x8e85('0xe')]=config;
\ No newline at end of file
+var _0xeddd=['join','../../services/express/index.js','../../services/ami/index.js','agi','../../services/agi/index.js','email','../../services/email/index.js','../../services/routing/index.js','xdr','../../services/xdr/index.js','exports','path','express'];(function(_0x38ced4,_0x24263f){var _0x547c07=function(_0x279fc4){while(--_0x279fc4){_0x38ced4['push'](_0x38ced4['shift']());}};_0x547c07(++_0x24263f);}(_0xeddd,0x10f));var _0xdedd=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0xeddd[_0x2064e5];return _0x21a233;};'use strict';var path=require(_0xdedd('0x0'));var os=require('os');var config={'apps':[{'name':_0xdedd('0x1'),'script':path[_0xdedd('0x2')](__dirname,_0xdedd('0x3'))},{'name':'ami','script':path[_0xdedd('0x2')](__dirname,_0xdedd('0x4'))},{'name':_0xdedd('0x5'),'script':path[_0xdedd('0x2')](__dirname,_0xdedd('0x6'))},{'name':_0xdedd('0x7'),'script':path[_0xdedd('0x2')](__dirname,_0xdedd('0x8'))},{'name':'routing','script':path['join'](__dirname,_0xdedd('0x9'))},{'name':_0xdedd('0xa'),'script':path[_0xdedd('0x2')](__dirname,_0xdedd('0xb'))}]};module[_0xdedd('0xc')]=config;
\ No newline at end of file
diff --git a/server/config/pm2/index.js b/server/config/pm2/index.js
index 1297612..f2a2029 100644
--- a/server/config/pm2/index.js
+++ b/server/config/pm2/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7217=['connect','then','start','disconnect','stop','restart','list','describe','delete','dump','saved','pm2','./config'];(function(_0xaabd61,_0x1e1bf7){var _0x353bcd=function(_0xbcf4fb){while(--_0xbcf4fb){_0xaabd61['push'](_0xaabd61['shift']());}};_0x353bcd(++_0x1e1bf7);}(_0x7217,0x19e));var _0x7721=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x7217[_0x297fd3];return _0x2af381;};'use strict';var pm2=require(_0x7721('0x0'));var BPromise=require('bluebird');var config=require(_0x7721('0x1'));function connect(){return new BPromise(function(_0x4170dd,_0x1de988){return pm2[_0x7721('0x2')](function(_0x115ab3){if(_0x115ab3){return _0x1de988(_0x115ab3);}return _0x4170dd('connected');});});};exports['start']=function(_0x472a96){return connect()[_0x7721('0x3')](function(){return new BPromise(function(_0x46415c,_0x3fe47c){return pm2[_0x7721('0x4')](_0x472a96,function(_0xf7ff37,_0x18ab6b){if(_0xf7ff37){return _0x3fe47c(_0xf7ff37);}pm2[_0x7721('0x5')]();return _0x46415c(_0x18ab6b);});});});};exports[_0x7721('0x6')]=function(_0x2f99ed){return connect()[_0x7721('0x3')](function(){return new BPromise(function(_0x2a66cb,_0xfa8835){return pm2[_0x7721('0x6')](_0x2f99ed,function(_0x2c3986,_0x578d59){if(_0x2c3986){return _0xfa8835(_0x2c3986);}pm2[_0x7721('0x5')]();return _0x2a66cb(_0x578d59);});});});};exports[_0x7721('0x7')]=function(_0x8729a6){return connect()[_0x7721('0x3')](function(){return new BPromise(function(_0xa8977c,_0x409b37){return pm2[_0x7721('0x7')](_0x8729a6,function(_0x27b36b,_0x55b4ca){if(_0x27b36b){return _0x409b37(_0x27b36b);}pm2[_0x7721('0x5')]();return _0xa8977c(_0x55b4ca);});});});};exports[_0x7721('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x109900,_0x30da54){return pm2[_0x7721('0x8')](function(_0x2e9752,_0x5069da){if(_0x2e9752){return _0x30da54(_0x2e9752);}pm2[_0x7721('0x5')]();return _0x109900(_0x5069da);});});});};exports[_0x7721('0x9')]=function(_0x534f1b){return connect()['then'](function(){return new BPromise(function(_0x4b183e,_0x5ed54){return pm2[_0x7721('0x9')](_0x534f1b,function(_0x3cc909,_0x32550d){if(_0x3cc909){return _0x5ed54(_0x3cc909);}pm2['disconnect']();return _0x4b183e(_0x32550d);});});});};exports[_0x7721('0xa')]=function(_0x54a838){return connect()[_0x7721('0x3')](function(){return new BPromise(function(_0x5cb0e6,_0xfec626){return pm2[_0x7721('0xa')](_0x54a838,function(_0x3ab5a5,_0x3e140d){if(_0x3ab5a5){return _0xfec626(_0x3ab5a5);}pm2[_0x7721('0x5')]();return _0x5cb0e6(_0x3e140d);});});});};exports[_0x7721('0xb')]=function(){return connect()[_0x7721('0x3')](function(){return new BPromise(function(_0x413263,_0x3b29ac){return pm2[_0x7721('0xb')](function(_0x4ce1db){if(_0x4ce1db){return _0x3b29ac(_0x4ce1db);}return _0x413263(_0x7721('0xc'));});});});};
\ No newline at end of file
+var _0x3e74=['saved','pm2','./config','connected','then','start','disconnect','stop','list','describe','delete','dump'];(function(_0x55a2c2,_0x5aaeea){var _0x42d196=function(_0x4aa875){while(--_0x4aa875){_0x55a2c2['push'](_0x55a2c2['shift']());}};_0x42d196(++_0x5aaeea);}(_0x3e74,0x175));var _0x43e7=function(_0x1373ff,_0xbfe9f){_0x1373ff=_0x1373ff-0x0;var _0x23c5ee=_0x3e74[_0x1373ff];return _0x23c5ee;};'use strict';var pm2=require(_0x43e7('0x0'));var BPromise=require('bluebird');var config=require(_0x43e7('0x1'));function connect(){return new BPromise(function(_0x287a1d,_0x151ad2){return pm2['connect'](function(_0x490ced){if(_0x490ced){return _0x151ad2(_0x490ced);}return _0x287a1d(_0x43e7('0x2'));});});};exports['start']=function(_0x128b0f){return connect()[_0x43e7('0x3')](function(){return new BPromise(function(_0xe78cb7,_0x1c503b){return pm2[_0x43e7('0x4')](_0x128b0f,function(_0x503698,_0x45a0d1){if(_0x503698){return _0x1c503b(_0x503698);}pm2[_0x43e7('0x5')]();return _0xe78cb7(_0x45a0d1);});});});};exports[_0x43e7('0x6')]=function(_0x8528fc){return connect()[_0x43e7('0x3')](function(){return new BPromise(function(_0x516b4d,_0x212c6c){return pm2['stop'](_0x8528fc,function(_0x54948c,_0x39c8bd){if(_0x54948c){return _0x212c6c(_0x54948c);}pm2[_0x43e7('0x5')]();return _0x516b4d(_0x39c8bd);});});});};exports['restart']=function(_0x2803d9){return connect()['then'](function(){return new BPromise(function(_0xf7c520,_0x37302c){return pm2['restart'](_0x2803d9,function(_0x3eb206,_0xc960ea){if(_0x3eb206){return _0x37302c(_0x3eb206);}pm2[_0x43e7('0x5')]();return _0xf7c520(_0xc960ea);});});});};exports[_0x43e7('0x7')]=function(){return connect()['then'](function(){return new BPromise(function(_0x583d85,_0x2fcb36){return pm2[_0x43e7('0x7')](function(_0x44b0bd,_0x51b974){if(_0x44b0bd){return _0x2fcb36(_0x44b0bd);}pm2['disconnect']();return _0x583d85(_0x51b974);});});});};exports[_0x43e7('0x8')]=function(_0x14c146){return connect()[_0x43e7('0x3')](function(){return new BPromise(function(_0x328445,_0x4de324){return pm2['describe'](_0x14c146,function(_0xdf16c,_0x264575){if(_0xdf16c){return _0x4de324(_0xdf16c);}pm2[_0x43e7('0x5')]();return _0x328445(_0x264575);});});});};exports['delete']=function(_0x4b5a6b){return connect()[_0x43e7('0x3')](function(){return new BPromise(function(_0x1ca758,_0x9037d3){return pm2[_0x43e7('0x9')](_0x4b5a6b,function(_0x3776f5,_0x1f24fb){if(_0x3776f5){return _0x9037d3(_0x3776f5);}pm2[_0x43e7('0x5')]();return _0x1ca758(_0x1f24fb);});});});};exports[_0x43e7('0xa')]=function(){return connect()[_0x43e7('0x3')](function(){return new BPromise(function(_0xab63cf,_0x191dd5){return pm2[_0x43e7('0xa')](function(_0x4b5d64){if(_0x4b5d64){return _0x191dd5(_0x4b5d64);}return _0xab63cf(_0x43e7('0xb'));});});});};
\ No newline at end of file
diff --git a/server/config/schedule/chat.js b/server/config/schedule/chat.js
index c47c976..c0ac5ac 100644
--- a/server/config/schedule/chat.js
+++ b/server/config/schedule/chat.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x51a8=['update','system','format','YYYY-MM-DD\x20HH:mm:ss','map','length','emit','chatInteraction:update','catch','error','start','lodash','moment','../../mysqldb','redis','localhost','socket.io-emitter','Setting','find','chatTimeout','then','ChatInteraction','findAll','lastMsgAt','minutes'];(function(_0x574dea,_0x4cf209){var _0x3ed444=function(_0x3423a2){while(--_0x3423a2){_0x574dea['push'](_0x574dea['shift']());}};_0x3ed444(++_0x4cf209);}(_0x51a8,0xec));var _0x851a=function(_0x3fd782,_0x30cb31){_0x3fd782=_0x3fd782-0x0;var _0x1282aa=_0x51a8[_0x3fd782];return _0x1282aa;};'use strict';var _=require(_0x851a('0x0'));var moment=require(_0x851a('0x1'));var Redis=require('ioredis');var db=require(_0x851a('0x2'))['db'];var config=require('../../config/environment');config[_0x851a('0x3')]=_['defaults'](config[_0x851a('0x3')],{'host':_0x851a('0x4'),'port':0x18eb});var io=require(_0x851a('0x5'))(new Redis(config[_0x851a('0x3')]));function closeInteractions(){var _0x2bfa58=0x0;var _0x58a3b6=[];return db[_0x851a('0x6')][_0x851a('0x7')]({'raw':!![],'attributes':['id',_0x851a('0x8')],'where':{'id':0x1}})[_0x851a('0x9')](function(_0x16363c){_0x2bfa58=_0x16363c[_0x851a('0x8')];if(_0x2bfa58){return db[_0x851a('0xa')][_0x851a('0xb')]({'raw':!![],'attributes':['id',_0x851a('0xc')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()['subtract'](_0x16363c[_0x851a('0x8')],_0x851a('0xd'))}}});}else{return[];}})['then'](function(_0x3a3a83){_0x58a3b6=_0x3a3a83;if(_0x2bfa58){return db[_0x851a('0xa')][_0x851a('0xe')]({'closeReason':_0x851a('0xf'),'disposition':'timeout','closed':!![],'closedAt':moment()[_0x851a('0x10')](_0x851a('0x11'))},{'where':{'id':_[_0x851a('0x12')](_0x58a3b6||[],'id')}});}})[_0x851a('0x9')](function(_0x3ef339){for(var _0x45eff7=0x0;_0x45eff7<_0x58a3b6[_0x851a('0x13')];_0x45eff7++){io[_0x851a('0x14')](_0x851a('0x15'),{'id':_0x58a3b6[_0x45eff7]['id'],'closed':!![]});}})[_0x851a('0x16')](function(_0x3e9dd9){console[_0x851a('0x17')](_0x3e9dd9);});}exports[_0x851a('0x18')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
+var _0x7d80=['update','timeout','format','YYYY-MM-DD\x20HH:mm:ss','map','emit','chatInteraction:update','catch','error','start','moment','ioredis','../../mysqldb','../../config/environment','redis','defaults','localhost','chatTimeout','ChatInteraction','findAll','subtract','minutes','then'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0x7d80,0x17a));var _0x07d8=function(_0x472b6a,_0x3a9121){_0x472b6a=_0x472b6a-0x0;var _0x5cda29=_0x7d80[_0x472b6a];return _0x5cda29;};'use strict';var _=require('lodash');var moment=require(_0x07d8('0x0'));var Redis=require(_0x07d8('0x1'));var db=require(_0x07d8('0x2'))['db'];var config=require(_0x07d8('0x3'));config[_0x07d8('0x4')]=_[_0x07d8('0x5')](config['redis'],{'host':_0x07d8('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x07d8('0x4')]));function closeInteractions(){var _0xb83132=0x0;var _0x3e7308=[];return db['Setting']['find']({'raw':!![],'attributes':['id',_0x07d8('0x7')],'where':{'id':0x1}})['then'](function(_0x52c68d){_0xb83132=_0x52c68d['chatTimeout'];if(_0xb83132){return db[_0x07d8('0x8')][_0x07d8('0x9')]({'raw':!![],'attributes':['id','lastMsgAt'],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x07d8('0xa')](_0x52c68d[_0x07d8('0x7')],_0x07d8('0xb'))}}});}else{return[];}})[_0x07d8('0xc')](function(_0x3499a4){_0x3e7308=_0x3499a4;if(_0xb83132){return db[_0x07d8('0x8')][_0x07d8('0xd')]({'closeReason':'system','disposition':_0x07d8('0xe'),'closed':!![],'closedAt':moment()[_0x07d8('0xf')](_0x07d8('0x10'))},{'where':{'id':_[_0x07d8('0x11')](_0x3e7308||[],'id')}});}})[_0x07d8('0xc')](function(_0x14ee4c){for(var _0x1342ba=0x0;_0x1342ba<_0x3e7308['length'];_0x1342ba++){io[_0x07d8('0x12')](_0x07d8('0x13'),{'id':_0x3e7308[_0x1342ba]['id'],'closed':!![]});}})[_0x07d8('0x14')](function(_0x584765){console[_0x07d8('0x15')](_0x584765);});}exports[_0x07d8('0x16')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
diff --git a/server/config/schedule/index.js b/server/config/schedule/index.js
index e8f1e74..dc16c0a 100644
--- a/server/config/schedule/index.js
+++ b/server/config/schedule/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdbd9=['resolve','run\x20job','cron','active','isBetween','startAt','add','start','endAt','update','stop\x20cron','run','util','lodash','moment','cron-job-manager','jayson/promise','../logger','schedule','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','info','Try\x20to\x20send\x20a\x20mail\x20to','email','Smtp','service','MailAccount','host','port','secure','authentication','auth','user','pass','format','\x22%s\x22\x20<%s>','bcc','subtractNumber','join','../../files/reports','savename','basename','extname','zip','existsSync','Sent','message','text','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20â\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','stringify','status','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20â\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','request','then','error','error\x20mail','email\x20sent','catch','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit','subtractUnit\x20null\x20or\x20undefined','subtract','scheduled','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','exec\x20custom\x20report\x20id:%s','no\x20report\x20id','Schedule','name','keys','jobs','map','toString','keyBy','difference','intersection','length','exists','stop','deleteJob','delete\x20cron','toRun','index','my\x20id'];(function(_0x9e76b3,_0x16d357){var _0x4d9a4c=function(_0x2b83d7){while(--_0x2b83d7){_0x9e76b3['push'](_0x9e76b3['shift']());}};_0x4d9a4c(++_0x16d357);}(_0xdbd9,0xc0));var _0x9dbd=function(_0x5dcdb9,_0x34486a){_0x5dcdb9=_0x5dcdb9-0x0;var _0x4d919d=_0xdbd9[_0x5dcdb9];return _0x4d919d;};'use strict';var fs=require('fs');var util=require(_0x9dbd('0x0'));var path=require('path');var _=require(_0x9dbd('0x1'));var moment=require(_0x9dbd('0x2'));var CronJobManager=require(_0x9dbd('0x3'));var jayson=require(_0x9dbd('0x4'));var BPromise=require('bluebird');var logger=require(_0x9dbd('0x5'))(_0x9dbd('0x6'));var db=require(_0x9dbd('0x7'))['db'];var analyticCustomReportController=require(_0x9dbd('0x8'));var analyticDefaultReportController=require(_0x9dbd('0x9'));var client=jayson[_0x9dbd('0xa')]['http']({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x34e9bd,_0x166334){return function(){logger[_0x9dbd('0xb')](_0x9dbd('0xc'),_0x34e9bd[_0x9dbd('0xd')]);var _0x591ef1=!![];var _0x24cf3c={'tls':{'rejectUnauthorized':![]}};if(_0x34e9bd['MailAccount'][_0x9dbd('0xe')][_0x9dbd('0xf')]){_0x24cf3c[_0x9dbd('0xf')]=_0x34e9bd[_0x9dbd('0x10')]['Smtp'][_0x9dbd('0xf')];}else{_0x24cf3c[_0x9dbd('0x11')]=_0x34e9bd[_0x9dbd('0x10')][_0x9dbd('0xe')][_0x9dbd('0x11')];_0x24cf3c[_0x9dbd('0x12')]=_0x34e9bd[_0x9dbd('0x10')][_0x9dbd('0xe')]['port'];_0x24cf3c[_0x9dbd('0x13')]=_0x34e9bd['MailAccount'][_0x9dbd('0xe')][_0x9dbd('0x13')];}if(_0x34e9bd[_0x9dbd('0x10')]['Smtp'][_0x9dbd('0x14')]){_0x24cf3c[_0x9dbd('0x15')]={'user':_0x34e9bd[_0x9dbd('0x10')]['Smtp'][_0x9dbd('0x16')],'pass':_0x34e9bd[_0x9dbd('0x10')]['Smtp'][_0x9dbd('0x17')]};}var _0x21ee82={'account':_0x24cf3c,'message':{'from':util[_0x9dbd('0x18')](_0x9dbd('0x19'),_0x34e9bd['MailAccount']['name'],_0x34e9bd[_0x9dbd('0x10')][_0x9dbd('0xd')]||_0x34e9bd[_0x9dbd('0x10')]['Smtp'][_0x9dbd('0x16')]),'to':_0x34e9bd[_0x9dbd('0xd')],'cc':_0x34e9bd['cc'],'bcc':_0x34e9bd[_0x9dbd('0x1a')],'subject':util[_0x9dbd('0x18')]('Report\x20%s\x20last\x20%s\x20%s',_0x166334['name'],_0x34e9bd[_0x9dbd('0x1b')],_0x34e9bd['subtractUnit'])}};var _0x2ee001=path[_0x9dbd('0x1c')](__dirname,_0x9dbd('0x1d'));var _0x5b36b9=_0x166334[_0x9dbd('0x1e')];var _0x153452=util['format']('%s.%s',path[_0x9dbd('0x1f')](_0x166334[_0x9dbd('0x1e')],path[_0x9dbd('0x20')](_0x166334[_0x9dbd('0x1e')])),_0x9dbd('0x21'));var _0x5748bd=path[_0x9dbd('0x1c')](_0x2ee001,_0x5b36b9);var _0x352c2c=path[_0x9dbd('0x1c')](_0x2ee001,_0x153452);if(fs[_0x9dbd('0x22')](_0x5748bd)){_0x166334['status']=_0x9dbd('0x23');_0x21ee82[_0x9dbd('0x24')]['attachments']=[{'filename':_0x5b36b9,'path':_0x5748bd}];_0x21ee82['message'][_0x9dbd('0x25')]=util['format'](_0x9dbd('0x26'),JSON[_0x9dbd('0x27')](_0x166334,null,0x2));}else if(fs[_0x9dbd('0x22')](_0x352c2c)){_0x166334[_0x9dbd('0x28')]=_0x9dbd('0x23');_0x21ee82[_0x9dbd('0x24')]['attachments']=[{'filename':_0x153452,'path':_0x352c2c}];}else{_0x21ee82[_0x9dbd('0x24')]['text']=_0x9dbd('0x29');if(!_0x34e9bd['sendIfEmpty']){_0x591ef1=![];logger[_0x9dbd('0xb')]('empty\x20file,\x20email\x20not\x20sent');}}if(_0x591ef1){return client[_0x9dbd('0x2a')]('SendMail',_0x21ee82)[_0x9dbd('0x2b')](function(_0x29d9df){if(_0x29d9df['error']){return logger[_0x9dbd('0x2c')](_0x9dbd('0x2d'),JSON[_0x9dbd('0x27')](_0x29d9df));}return logger[_0x9dbd('0xb')](_0x9dbd('0x2e'));})[_0x9dbd('0x2f')](function(_0x48335f){return logger[_0x9dbd('0x2c')](_0x9dbd('0x2d'),JSON[_0x9dbd('0x27')](_0x48335f));});}};}function handleError(){return function(_0x48b331){return logger['error'](JSON[_0x9dbd('0x27')](_0x48b331));};}function handleResult(_0x34a022){return function(_0x391923){logger['info']('data',JSON['stringify'](_0x391923));if(_0x34a022[_0x9dbd('0x10')]&&_0x34a022[_0x9dbd('0x10')][_0x9dbd('0xe')]&&!_[_0x9dbd('0x30')](_0x34a022[_0x9dbd('0xd')])){setTimeout(handleSendEmail(_0x34a022,_0x391923),0x3c*0x3e8);}};}function handleJob(_0x1d63a1){return function(){try{if(_[_0x9dbd('0x30')](_0x1d63a1[_0x9dbd('0x1b')])){return logger[_0x9dbd('0xb')](_0x9dbd('0x31'));}if(_[_0x9dbd('0x30')](_0x1d63a1[_0x9dbd('0x32')])){return logger['info'](_0x9dbd('0x33'));}var _0x291cd5={'startDate':moment()[_0x9dbd('0x34')](_0x1d63a1[_0x9dbd('0x1b')],_0x1d63a1[_0x9dbd('0x32')])[_0x9dbd('0x18')]('YYYY-MM-DD\x20HH:mm:ss'),'endDate':moment()[_0x9dbd('0x18')]('YYYY-MM-DD\x20HH:mm:ss'),'type':_0x9dbd('0x35'),'output':_0x1d63a1[_0x9dbd('0x36')],'name':_0x1d63a1['name']};if(!_[_0x9dbd('0x30')](_0x1d63a1[_0x9dbd('0x37')])){logger[_0x9dbd('0xb')](_0x9dbd('0x38'),_0x1d63a1['DefaultReportId']);return analyticDefaultReportController[_0x9dbd('0x39')]({'id':_0x1d63a1[_0x9dbd('0x37')]},_0x291cd5)[_0x9dbd('0x2b')](handleResult(_0x1d63a1))[_0x9dbd('0x2f')](handleError());}if(!_['isNil'](_0x1d63a1[_0x9dbd('0x3a')])){logger[_0x9dbd('0xb')](_0x9dbd('0x3b'),_0x1d63a1[_0x9dbd('0x3a')]);return analyticCustomReportController[_0x9dbd('0x39')]({'id':_0x1d63a1[_0x9dbd('0x3a')]},_0x291cd5)[_0x9dbd('0x2b')](handleResult(_0x1d63a1))[_0x9dbd('0x2f')](handleError());}}catch(_0x5812dc){logger['error'](JSON[_0x9dbd('0x27')](_0x5812dc));}return logger[_0x9dbd('0xb')](_0x9dbd('0x3c'));};}function getJobs(_0x1957e8){var _0x130916={};if(_0x1957e8){_0x130916['id']=_0x1957e8;}return db[_0x9dbd('0x3d')]['findAll']({'where':_0x130916,'include':[{'model':db[_0x9dbd('0x10')],'attributes':['id',_0x9dbd('0x3e'),'email'],'include':[{'model':db['MailServerOut'],'as':_0x9dbd('0xe')}]}]})[_0x9dbd('0x2b')](function(_0x3183cf){var _0x1a45ee=_[_0x9dbd('0x3f')](manager[_0x9dbd('0x40')]);var _0x163668=_[_0x9dbd('0x41')](_0x3183cf,function(_0x26993d){return _0x26993d['id'][_0x9dbd('0x42')]();});var _0x565d77=_[_0x9dbd('0x43')](_0x3183cf,function(_0x359cac){return _0x359cac['id'][_0x9dbd('0x42')]();});var _0x25b4ba=_0x1957e8?_0x163668:_[_0x9dbd('0x44')](_0x163668,_0x1a45ee);var _0x44a715=_[_0x9dbd('0x45')](_0x163668,_0x1a45ee);var _0x31bd32=_['difference'](_0x1a45ee,_0x163668);var _0x352cea;var _0x1b817f;for(_0x352cea=0x0;_0x352cea<_0x31bd32[_0x9dbd('0x46')]&&!_0x1957e8;_0x352cea+=0x1){_0x1b817f=_0x31bd32[_0x352cea][_0x9dbd('0x42')]();if(manager[_0x9dbd('0x47')](_0x1b817f)){manager[_0x9dbd('0x48')](_0x1b817f);manager[_0x9dbd('0x49')](_0x1b817f);logger[_0x9dbd('0xb')](_0x9dbd('0x4a'),_0x1b817f);}}logger[_0x9dbd('0xb')](_0x9dbd('0x4b'),JSON[_0x9dbd('0x27')](_0x25b4ba));for(_0x352cea=0x0;_0x352cea<_0x25b4ba['length'];_0x352cea+=0x1){_0x1b817f=_0x25b4ba[_0x352cea]['toString']();logger[_0x9dbd('0xb')](_0x9dbd('0x4c'),_0x1b817f);if(_0x1957e8){logger[_0x9dbd('0xb')](_0x9dbd('0x4d'),_0x1957e8);logger[_0x9dbd('0xb')](JSON[_0x9dbd('0x27')](_0x565d77[_0x1b817f]));BPromise[_0x9dbd('0x4e')]()[_0x9dbd('0x2b')](handleJob(_0x565d77[_0x1b817f]));logger['info'](_0x9dbd('0x4f'),_0x565d77[_0x1b817f][_0x9dbd('0x3e')],_0x565d77[_0x1b817f][_0x9dbd('0x50')]);}else if(_0x565d77[_0x1b817f][_0x9dbd('0x50')]&&_0x565d77[_0x1b817f][_0x9dbd('0x51')]&&moment()[_0x9dbd('0x52')](_0x565d77[_0x1b817f][_0x9dbd('0x53')],_0x565d77[_0x1b817f]['endAt'])){manager[_0x9dbd('0x54')](_0x1b817f,_0x565d77[_0x1b817f][_0x9dbd('0x50')],handleJob(_0x565d77[_0x1b817f]));manager[_0x9dbd('0x55')](_0x1b817f);logger[_0x9dbd('0xb')]('add\x20cron',_0x565d77[_0x1b817f]['name'],_0x565d77[_0x1b817f][_0x9dbd('0x50')]);}else if(manager[_0x9dbd('0x47')](_0x1b817f)){manager[_0x9dbd('0x48')](_0x1b817f);manager[_0x9dbd('0x49')](_0x1b817f);logger[_0x9dbd('0xb')]('stop\x20cron',_0x565d77[_0x1b817f][_0x9dbd('0x3e')],_0x565d77[_0x1b817f]['cron']);}}for(_0x352cea=0x0,_0x1b817f;_0x352cea<_0x44a715['length']&&!_0x1957e8;_0x352cea+=0x1){_0x1b817f=_0x44a715[_0x352cea][_0x9dbd('0x42')]();if(manager[_0x9dbd('0x47')](_0x1b817f)){if(_0x565d77[_0x1b817f][_0x9dbd('0x50')]&&_0x565d77[_0x1b817f][_0x9dbd('0x51')]&&moment()[_0x9dbd('0x52')](_0x565d77[_0x1b817f][_0x9dbd('0x53')],_0x565d77[_0x1b817f][_0x9dbd('0x56')])){manager[_0x9dbd('0x57')](_0x1b817f,_0x565d77[_0x1b817f][_0x9dbd('0x50')],handleJob(_0x565d77[_0x1b817f]));logger[_0x9dbd('0xb')]('update\x20cron',_0x565d77[_0x1b817f]['name'],_0x565d77[_0x1b817f]['cron']);}else{manager['stop'](_0x1b817f);manager['deleteJob'](_0x1b817f);logger[_0x9dbd('0xb')](_0x9dbd('0x58'),_0x565d77[_0x1b817f]['name'],_0x565d77[_0x1b817f][_0x9dbd('0x50')]);}}}})[_0x9dbd('0x2f')](function(_0x33a99f){logger[_0x9dbd('0x2c')](JSON[_0x9dbd('0x27')](_0x33a99f));});}exports[_0x9dbd('0x59')]=function(_0x2adde1){return getJobs(_0x2adde1);};exports[_0x9dbd('0x55')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
+var _0x88bf=['start','add\x20cron','exists','stop\x20cron','update','update\x20cron','run','util','path','lodash','moment','cron-job-manager','jayson/promise','bluebird','../logger','schedule','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','client','http','info','Try\x20to\x20send\x20a\x20mail\x20to','MailAccount','Smtp','service','host','port','secure','auth','user','format','\x22%s\x22\x20<%s>','email','bcc','Report\x20%s\x20last\x20%s\x20%s','name','subtractNumber','join','../../files/reports','savename','%s.%s','basename','existsSync','Sent','message','text','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20â\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','status','attachments','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20â\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','request','SendMail','then','error','error\x20mail','stringify','email\x20sent','catch','data','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit','subtractUnit\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','scheduled','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s','CustomReportId','no\x20report\x20id','findAll','MailServerOut','keys','jobs','map','toString','difference','intersection','length','stop','deleteJob','delete\x20cron','toRun','index','my\x20id','resolve','run\x20job','cron','active','isBetween','startAt','endAt','add'];(function(_0x1cdb8e,_0x29b51b){var _0x5ecb94=function(_0x3f0703){while(--_0x3f0703){_0x1cdb8e['push'](_0x1cdb8e['shift']());}};_0x5ecb94(++_0x29b51b);}(_0x88bf,0x1d8));var _0xf88b=function(_0x559499,_0x2ecc11){_0x559499=_0x559499-0x0;var _0x476cb7=_0x88bf[_0x559499];return _0x476cb7;};'use strict';var fs=require('fs');var util=require(_0xf88b('0x0'));var path=require(_0xf88b('0x1'));var _=require(_0xf88b('0x2'));var moment=require(_0xf88b('0x3'));var CronJobManager=require(_0xf88b('0x4'));var jayson=require(_0xf88b('0x5'));var BPromise=require(_0xf88b('0x6'));var logger=require(_0xf88b('0x7'))(_0xf88b('0x8'));var db=require(_0xf88b('0x9'))['db'];var analyticCustomReportController=require(_0xf88b('0xa'));var analyticDefaultReportController=require('../../api/analyticDefaultReport/analyticDefaultReport.controller');var client=jayson[_0xf88b('0xb')][_0xf88b('0xc')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x565a58,_0x3c58aa){return function(){logger[_0xf88b('0xd')](_0xf88b('0xe'),_0x565a58['email']);var _0x44bc12=!![];var _0x2b6f44={'tls':{'rejectUnauthorized':![]}};if(_0x565a58[_0xf88b('0xf')][_0xf88b('0x10')][_0xf88b('0x11')]){_0x2b6f44['service']=_0x565a58[_0xf88b('0xf')]['Smtp'][_0xf88b('0x11')];}else{_0x2b6f44['host']=_0x565a58[_0xf88b('0xf')]['Smtp'][_0xf88b('0x12')];_0x2b6f44[_0xf88b('0x13')]=_0x565a58[_0xf88b('0xf')][_0xf88b('0x10')][_0xf88b('0x13')];_0x2b6f44[_0xf88b('0x14')]=_0x565a58[_0xf88b('0xf')]['Smtp']['secure'];}if(_0x565a58[_0xf88b('0xf')][_0xf88b('0x10')]['authentication']){_0x2b6f44[_0xf88b('0x15')]={'user':_0x565a58[_0xf88b('0xf')][_0xf88b('0x10')][_0xf88b('0x16')],'pass':_0x565a58['MailAccount'][_0xf88b('0x10')]['pass']};}var _0x5d7699={'account':_0x2b6f44,'message':{'from':util[_0xf88b('0x17')](_0xf88b('0x18'),_0x565a58[_0xf88b('0xf')]['name'],_0x565a58[_0xf88b('0xf')]['email']||_0x565a58[_0xf88b('0xf')][_0xf88b('0x10')][_0xf88b('0x16')]),'to':_0x565a58[_0xf88b('0x19')],'cc':_0x565a58['cc'],'bcc':_0x565a58[_0xf88b('0x1a')],'subject':util[_0xf88b('0x17')](_0xf88b('0x1b'),_0x3c58aa[_0xf88b('0x1c')],_0x565a58[_0xf88b('0x1d')],_0x565a58['subtractUnit'])}};var _0x1fac42=path[_0xf88b('0x1e')](__dirname,_0xf88b('0x1f'));var _0x3910e2=_0x3c58aa[_0xf88b('0x20')];var _0x55464b=util['format'](_0xf88b('0x21'),path[_0xf88b('0x22')](_0x3c58aa[_0xf88b('0x20')],path['extname'](_0x3c58aa[_0xf88b('0x20')])),'zip');var _0x52a7f5=path[_0xf88b('0x1e')](_0x1fac42,_0x3910e2);var _0x32c5ec=path[_0xf88b('0x1e')](_0x1fac42,_0x55464b);if(fs[_0xf88b('0x23')](_0x52a7f5)){_0x3c58aa['status']=_0xf88b('0x24');_0x5d7699[_0xf88b('0x25')]['attachments']=[{'filename':_0x3910e2,'path':_0x52a7f5}];_0x5d7699[_0xf88b('0x25')][_0xf88b('0x26')]=util[_0xf88b('0x17')](_0xf88b('0x27'),JSON['stringify'](_0x3c58aa,null,0x2));}else if(fs[_0xf88b('0x23')](_0x32c5ec)){_0x3c58aa[_0xf88b('0x28')]=_0xf88b('0x24');_0x5d7699[_0xf88b('0x25')][_0xf88b('0x29')]=[{'filename':_0x55464b,'path':_0x32c5ec}];}else{_0x5d7699[_0xf88b('0x25')][_0xf88b('0x26')]=_0xf88b('0x2a');if(!_0x565a58['sendIfEmpty']){_0x44bc12=![];logger[_0xf88b('0xd')]('empty\x20file,\x20email\x20not\x20sent');}}if(_0x44bc12){return client[_0xf88b('0x2b')](_0xf88b('0x2c'),_0x5d7699)[_0xf88b('0x2d')](function(_0x33a268){if(_0x33a268[_0xf88b('0x2e')]){return logger['error'](_0xf88b('0x2f'),JSON[_0xf88b('0x30')](_0x33a268));}return logger['info'](_0xf88b('0x31'));})[_0xf88b('0x32')](function(_0x64da61){return logger[_0xf88b('0x2e')](_0xf88b('0x2f'),JSON[_0xf88b('0x30')](_0x64da61));});}};}function handleError(){return function(_0x2b4bc8){return logger[_0xf88b('0x2e')](JSON['stringify'](_0x2b4bc8));};}function handleResult(_0x131f04){return function(_0x422a5f){logger[_0xf88b('0xd')](_0xf88b('0x33'),JSON[_0xf88b('0x30')](_0x422a5f));if(_0x131f04[_0xf88b('0xf')]&&_0x131f04[_0xf88b('0xf')][_0xf88b('0x10')]&&!_[_0xf88b('0x34')](_0x131f04[_0xf88b('0x19')])){setTimeout(handleSendEmail(_0x131f04,_0x422a5f),0x3c*0x3e8);}};}function handleJob(_0x596b74){return function(){try{if(_[_0xf88b('0x34')](_0x596b74['subtractNumber'])){return logger['info'](_0xf88b('0x35'));}if(_[_0xf88b('0x34')](_0x596b74[_0xf88b('0x36')])){return logger[_0xf88b('0xd')](_0xf88b('0x37'));}var _0x573cb2={'startDate':moment()['subtract'](_0x596b74[_0xf88b('0x1d')],_0x596b74['subtractUnit'])[_0xf88b('0x17')](_0xf88b('0x38')),'endDate':moment()['format'](_0xf88b('0x38')),'type':_0xf88b('0x39'),'output':_0x596b74[_0xf88b('0x3a')],'name':_0x596b74[_0xf88b('0x1c')]};if(!_['isNil'](_0x596b74[_0xf88b('0x3b')])){logger[_0xf88b('0xd')](_0xf88b('0x3c'),_0x596b74['DefaultReportId']);return analyticDefaultReportController['runReport']({'id':_0x596b74['DefaultReportId']},_0x573cb2)['then'](handleResult(_0x596b74))[_0xf88b('0x32')](handleError());}if(!_[_0xf88b('0x34')](_0x596b74[_0xf88b('0x3d')])){logger[_0xf88b('0xd')]('exec\x20custom\x20report\x20id:%s',_0x596b74[_0xf88b('0x3d')]);return analyticCustomReportController['runReport']({'id':_0x596b74['CustomReportId']},_0x573cb2)[_0xf88b('0x2d')](handleResult(_0x596b74))[_0xf88b('0x32')](handleError());}}catch(_0x399e38){logger['error'](JSON['stringify'](_0x399e38));}return logger[_0xf88b('0xd')](_0xf88b('0x3e'));};}function getJobs(_0x27b5e7){var _0x8069e3={};if(_0x27b5e7){_0x8069e3['id']=_0x27b5e7;}return db['Schedule'][_0xf88b('0x3f')]({'where':_0x8069e3,'include':[{'model':db[_0xf88b('0xf')],'attributes':['id',_0xf88b('0x1c'),_0xf88b('0x19')],'include':[{'model':db[_0xf88b('0x40')],'as':_0xf88b('0x10')}]}]})[_0xf88b('0x2d')](function(_0x112568){var _0x180c63=_[_0xf88b('0x41')](manager[_0xf88b('0x42')]);var _0x44945d=_[_0xf88b('0x43')](_0x112568,function(_0x5a2eda){return _0x5a2eda['id'][_0xf88b('0x44')]();});var _0x1819ad=_['keyBy'](_0x112568,function(_0x193947){return _0x193947['id'][_0xf88b('0x44')]();});var _0x1c0016=_0x27b5e7?_0x44945d:_[_0xf88b('0x45')](_0x44945d,_0x180c63);var _0x3173ff=_[_0xf88b('0x46')](_0x44945d,_0x180c63);var _0x3fe8d2=_['difference'](_0x180c63,_0x44945d);var _0x268822;var _0x1a5458;for(_0x268822=0x0;_0x268822<_0x3fe8d2[_0xf88b('0x47')]&&!_0x27b5e7;_0x268822+=0x1){_0x1a5458=_0x3fe8d2[_0x268822]['toString']();if(manager['exists'](_0x1a5458)){manager[_0xf88b('0x48')](_0x1a5458);manager[_0xf88b('0x49')](_0x1a5458);logger[_0xf88b('0xd')](_0xf88b('0x4a'),_0x1a5458);}}logger['info'](_0xf88b('0x4b'),JSON[_0xf88b('0x30')](_0x1c0016));for(_0x268822=0x0;_0x268822<_0x1c0016[_0xf88b('0x47')];_0x268822+=0x1){_0x1a5458=_0x1c0016[_0x268822][_0xf88b('0x44')]();logger[_0xf88b('0xd')](_0xf88b('0x4c'),_0x1a5458);if(_0x27b5e7){logger[_0xf88b('0xd')](_0xf88b('0x4d'),_0x27b5e7);logger[_0xf88b('0xd')](JSON[_0xf88b('0x30')](_0x1819ad[_0x1a5458]));BPromise[_0xf88b('0x4e')]()['then'](handleJob(_0x1819ad[_0x1a5458]));logger[_0xf88b('0xd')](_0xf88b('0x4f'),_0x1819ad[_0x1a5458]['name'],_0x1819ad[_0x1a5458]['cron']);}else if(_0x1819ad[_0x1a5458][_0xf88b('0x50')]&&_0x1819ad[_0x1a5458][_0xf88b('0x51')]&&moment()[_0xf88b('0x52')](_0x1819ad[_0x1a5458][_0xf88b('0x53')],_0x1819ad[_0x1a5458][_0xf88b('0x54')])){manager[_0xf88b('0x55')](_0x1a5458,_0x1819ad[_0x1a5458][_0xf88b('0x50')],handleJob(_0x1819ad[_0x1a5458]));manager[_0xf88b('0x56')](_0x1a5458);logger[_0xf88b('0xd')](_0xf88b('0x57'),_0x1819ad[_0x1a5458][_0xf88b('0x1c')],_0x1819ad[_0x1a5458][_0xf88b('0x50')]);}else if(manager[_0xf88b('0x58')](_0x1a5458)){manager[_0xf88b('0x48')](_0x1a5458);manager['deleteJob'](_0x1a5458);logger[_0xf88b('0xd')](_0xf88b('0x59'),_0x1819ad[_0x1a5458][_0xf88b('0x1c')],_0x1819ad[_0x1a5458][_0xf88b('0x50')]);}}for(_0x268822=0x0,_0x1a5458;_0x268822<_0x3173ff[_0xf88b('0x47')]&&!_0x27b5e7;_0x268822+=0x1){_0x1a5458=_0x3173ff[_0x268822][_0xf88b('0x44')]();if(manager[_0xf88b('0x58')](_0x1a5458)){if(_0x1819ad[_0x1a5458][_0xf88b('0x50')]&&_0x1819ad[_0x1a5458]['active']&&moment()['isBetween'](_0x1819ad[_0x1a5458][_0xf88b('0x53')],_0x1819ad[_0x1a5458][_0xf88b('0x54')])){manager[_0xf88b('0x5a')](_0x1a5458,_0x1819ad[_0x1a5458]['cron'],handleJob(_0x1819ad[_0x1a5458]));logger['info'](_0xf88b('0x5b'),_0x1819ad[_0x1a5458]['name'],_0x1819ad[_0x1a5458][_0xf88b('0x50')]);}else{manager['stop'](_0x1a5458);manager[_0xf88b('0x49')](_0x1a5458);logger['info'](_0xf88b('0x59'),_0x1819ad[_0x1a5458]['name'],_0x1819ad[_0x1a5458][_0xf88b('0x50')]);}}}})[_0xf88b('0x32')](function(_0x4da79c){logger['error'](JSON[_0xf88b('0x30')](_0x4da79c));});}exports[_0xf88b('0x5c')]=function(_0x4a67e2){return getJobs(_0x4a67e2);};exports['start']=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
diff --git a/server/config/seedContact.js b/server/config/seedContact.js
index 80a6b01..98920e6 100644
--- a/server/config/seedContact.js
+++ b/server/config/seedContact.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xadb9=['@xcally.com','CmContact','then','log','finished\x20populating','contacts1','destroy','CmHopper','bulkCreate','contacts2','hopper2','util','../mysqldb','Innocenzo','Biondo','innocenzo.biondo','push','now'];(function(_0x103dad,_0x16605e){var _0x2bd05e=function(_0x2bb462){while(--_0x2bb462){_0x103dad['push'](_0x103dad['shift']());}};_0x2bd05e(++_0x16605e);}(_0xadb9,0x13d));var _0x9adb=function(_0x1780ec,_0x3af2fa){_0x1780ec=_0x1780ec-0x0;var _0x5c5663=_0xadb9[_0x1780ec];return _0x5c5663;};'use strict';var util=require(_0x9adb('0x0'));var db=require(_0x9adb('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts['push']({'id':i,'firstName':_0x9adb('0x2')+i,'lastName':_0x9adb('0x3')+i,'phone':0xf879fb460+i,'email':_0x9adb('0x4')+i+'@xcally.com'});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x9adb('0x5')]({'id':i,'active':![],'scheduledat':Date[_0x9adb('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x9adb('0x6')](),'updatedAt':Date[_0x9adb('0x6')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x9adb('0x5')]({'id':i,'firstName':_0x9adb('0x2')+i,'lastName':'Biondo'+i,'phone':0xf879fb460+i,'email':_0x9adb('0x4')+i+_0x9adb('0x7')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x9adb('0x5')]({'id':i,'active':![],'scheduledat':Date[_0x9adb('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x9adb('0x6')](),'updatedAt':Date[_0x9adb('0x6')]()});}db[_0x9adb('0x8')]['destroy']({'where':{}})['then'](function(){return db[_0x9adb('0x8')]['bulkCreate'](contacts);})[_0x9adb('0x9')](function(){console[_0x9adb('0xa')](_0x9adb('0xb'),_0x9adb('0xc'));return db['CmHopper'][_0x9adb('0xd')]({'where':{}});})[_0x9adb('0x9')](function(){return db[_0x9adb('0xe')]['bulkCreate'](hopper);})['then'](function(){console[_0x9adb('0xa')]('finished\x20populating','hopper1');return db[_0x9adb('0x8')][_0x9adb('0xf')](contacts2);})['then'](function(){console[_0x9adb('0xa')]('finished\x20populating',_0x9adb('0x10'));return db[_0x9adb('0xe')][_0x9adb('0xf')](hopper2);})[_0x9adb('0x9')](function(){console[_0x9adb('0xa')](_0x9adb('0xb'),_0x9adb('0x11'));})['catch'](function(_0x95f4a0){console[_0x9adb('0xa')](_0x95f4a0);});
\ No newline at end of file
+var _0x1a07=['destroy','then','CmContact','bulkCreate','log','finished\x20populating','contacts1','CmHopper','contacts2','hopper2','catch','util','../mysqldb','Innocenzo','Biondo','innocenzo.biondo','@xcally.com','now','push'];(function(_0x29c24c,_0x678eea){var _0xb3f79=function(_0x1d570b){while(--_0x1d570b){_0x29c24c['push'](_0x29c24c['shift']());}};_0xb3f79(++_0x678eea);}(_0x1a07,0xc9));var _0x71a0=function(_0x4b3358,_0x5cda77){_0x4b3358=_0x4b3358-0x0;var _0x1ea011=_0x1a07[_0x4b3358];return _0x1ea011;};'use strict';var util=require(_0x71a0('0x0'));var db=require(_0x71a0('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts['push']({'id':i,'firstName':_0x71a0('0x2')+i,'lastName':_0x71a0('0x3')+i,'phone':0xf879fb460+i,'email':_0x71a0('0x4')+i+_0x71a0('0x5')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date[_0x71a0('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date['now'](),'updatedAt':Date[_0x71a0('0x6')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x71a0('0x7')]({'id':i,'firstName':'Innocenzo'+i,'lastName':'Biondo'+i,'phone':0xf879fb460+i,'email':_0x71a0('0x4')+i+'@xcally.com'});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x71a0('0x7')]({'id':i,'active':![],'scheduledat':Date[_0x71a0('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x71a0('0x6')](),'updatedAt':Date[_0x71a0('0x6')]()});}db['CmContact'][_0x71a0('0x8')]({'where':{}})[_0x71a0('0x9')](function(){return db[_0x71a0('0xa')][_0x71a0('0xb')](contacts);})['then'](function(){console[_0x71a0('0xc')](_0x71a0('0xd'),_0x71a0('0xe'));return db[_0x71a0('0xf')]['destroy']({'where':{}});})[_0x71a0('0x9')](function(){return db['CmHopper'][_0x71a0('0xb')](hopper);})[_0x71a0('0x9')](function(){console[_0x71a0('0xc')](_0x71a0('0xd'),'hopper1');return db['CmContact'][_0x71a0('0xb')](contacts2);})[_0x71a0('0x9')](function(){console['log'](_0x71a0('0xd'),_0x71a0('0x10'));return db[_0x71a0('0xf')]['bulkCreate'](hopper2);})[_0x71a0('0x9')](function(){console[_0x71a0('0xc')](_0x71a0('0xd'),_0x71a0('0x11'));})[_0x71a0('0x12')](function(_0x1b7761){console[_0x71a0('0xc')](_0x1b7761);});
\ No newline at end of file
diff --git a/server/config/seedUsers.js b/server/config/seedUsers.js
index 6318af3..e8461a9 100644
--- a/server/config/seedUsers.js
+++ b/server/config/seedUsers.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb1bb=['log','add\x20user','catch','util','../mysqldb','format','%s%s','agent','%s%s@xcally.com','udp','wss','all','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','bulkCreate','then'];(function(_0x5ea4e6,_0x347a0d){var _0x2866c2=function(_0x22c880){while(--_0x22c880){_0x5ea4e6['push'](_0x5ea4e6['shift']());}};_0x2866c2(++_0x347a0d);}(_0xb1bb,0x81));var _0xbb1b=function(_0x4bfd9d,_0x38fe37){_0x4bfd9d=_0x4bfd9d-0x0;var _0x32d808=_0xb1bb[_0x4bfd9d];return _0x32d808;};'use strict';var util=require(_0xbb1b('0x0'));var db=require(_0xbb1b('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util[_0xbb1b('0x2')](_0xbb1b('0x3'),_0xbb1b('0x4'),i),'fullname':util['format']('%s%s','agent',i),'email':util[_0xbb1b('0x2')](_0xbb1b('0x5'),_0xbb1b('0x4'),i),'role':_0xbb1b('0x4'),'password':'password','internal':0xfa0+i,'type':'friend','transport':[_0xbb1b('0x6'),'ws',_0xbb1b('0x7')],'disallow':[_0xbb1b('0x8')],'allow':['ulaw'],'defaultuser':util[_0xbb1b('0x2')]('%s%s',_0xbb1b('0x4'),i),'encryption':_0xbb1b('0x9'),'avpf':'yes','force_avp':'yes','icesupport':_0xbb1b('0x9'),'dtlsenable':_0xbb1b('0x9'),'dtlsverify':'no','dtlscertfile':_0xbb1b('0xa'),'dtlsprivatekey':_0xbb1b('0xb'),'dtlssetup':_0xbb1b('0xc'),'callerid':util[_0xbb1b('0x2')]('\x22%s\x22\x20<%s>',util['format']('%s%s',_0xbb1b('0x4'),i),0xfa0+i)});}db['User'][_0xbb1b('0xd')](users)[_0xbb1b('0xe')](function(){console[_0xbb1b('0xf')](_0xbb1b('0x10'));})[_0xbb1b('0x11')](function(_0x1e954d){console['log'](_0x1e954d);});
\ No newline at end of file
+var _0x5d9a=['agent','password','friend','udp','wss','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','actpass','\x22%s\x22\x20<%s>','User','bulkCreate','then','log','add\x20user','../mysqldb','format','%s%s'];(function(_0x22f97a,_0x5e1b21){var _0x4da5fa=function(_0x6549c9){while(--_0x6549c9){_0x22f97a['push'](_0x22f97a['shift']());}};_0x4da5fa(++_0x5e1b21);}(_0x5d9a,0x1d8));var _0xa5d9=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x5d9a[_0x2dafbe];return _0x58a45a;};'use strict';var util=require('util');var db=require(_0xa5d9('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util[_0xa5d9('0x1')](_0xa5d9('0x2'),_0xa5d9('0x3'),i),'fullname':util[_0xa5d9('0x1')](_0xa5d9('0x2'),_0xa5d9('0x3'),i),'email':util[_0xa5d9('0x1')]('%s%s@xcally.com',_0xa5d9('0x3'),i),'role':'agent','password':_0xa5d9('0x4'),'internal':0xfa0+i,'type':_0xa5d9('0x5'),'transport':[_0xa5d9('0x6'),'ws',_0xa5d9('0x7')],'disallow':[_0xa5d9('0x8')],'allow':[_0xa5d9('0x9')],'defaultuser':util['format'](_0xa5d9('0x2'),_0xa5d9('0x3'),i),'encryption':'yes','avpf':_0xa5d9('0xa'),'force_avp':_0xa5d9('0xa'),'icesupport':_0xa5d9('0xa'),'dtlsenable':_0xa5d9('0xa'),'dtlsverify':'no','dtlscertfile':_0xa5d9('0xb'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':_0xa5d9('0xc'),'callerid':util[_0xa5d9('0x1')](_0xa5d9('0xd'),util['format'](_0xa5d9('0x2'),_0xa5d9('0x3'),i),0xfa0+i)});}db[_0xa5d9('0xe')][_0xa5d9('0xf')](users)[_0xa5d9('0x10')](function(){console[_0xa5d9('0x11')](_0xa5d9('0x12'));})['catch'](function(_0x2495e9){console[_0xa5d9('0x11')](_0x2495e9);});
\ No newline at end of file
diff --git a/server/config/socketio.js b/server/config/socketio.js
index 162fc69..8fd5c6d 100644
--- a/server/config/socketio.js
+++ b/server/config/socketio.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x77e2=['User','role','agent','telephone','UserProfileSection','findOne','then','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','MailQueues','OpenchannelQueues','findAll','Telephones','Trunks','UserProfileResource','resourceId','map','where','Campaign','type','ivr','format','%s:queue:%s','Agents','length','handshake','find','userProfileId','query','MailInteraction','MailInteractions','OpenchannelInteraction','OpenchannelInteractions','user:%s','voice:inbound','VoiceQueue','push','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','Trunk','user','ChatQueue','voice:outbound','getVoiceQueues','getChatQueues','getMailQueues','voice','fax','mail','openchannel','telephone:%s','trunk:%s','campaign:%s:%s','ChatInteractions','removeChatInteractions','emit','removeMailInteractions','user_has_fax_interactions:remove','leave','SmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','catch','join','default','connection','setMaxListeners','address','request','remoteAddress','remotePort','connectedAt','log','SocketIO\x20','nsp','DISCONNECTED','CONNECTED','lodash','util','bluebird','../mysqldb','name'];(function(_0x5e5d9c,_0x5969f0){var _0x5653be=function(_0x1e349e){while(--_0x1e349e){_0x5e5d9c['push'](_0x5e5d9c['shift']());}};_0x5653be(++_0x5969f0);}(_0x77e2,0xa9));var _0x277e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x77e2[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x277e('0x0'));var util=require(_0x277e('0x1'));var BPromise=require(_0x277e('0x2'));var db=require(_0x277e('0x3'))['db'];var config=require('./environment');var queryQueues={'attributes':['id',_0x277e('0x4')],'include':[{'as':'Agents','model':db[_0x277e('0x5')],'attributes':['id',_0x277e('0x4'),_0x277e('0x6')],'raw':!![],'where':{'role':_0x277e('0x7')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x277e('0x4')],'where':{'role':_0x277e('0x8')}};var queryTrunks={'raw':!![],'attributes':['id','name']};var queryAgents={'raw':!![],'attributes':['id',_0x277e('0x4')],'where':{'role':_0x277e('0x7')}};var queryCampaigns={'raw':!![],'attributes':['id',_0x277e('0x4'),'type'],'where':{'type':'ivr'}};function getAssociatedResources(_0x4a6c5e,_0x380f30,_0x36a370){return db[_0x277e('0x9')][_0x277e('0xa')]({'where':{'name':_0x4a6c5e,'userProfileId':_0x380f30},'raw':!![]})[_0x277e('0xb')](function(_0x435e59){if(_0x435e59){if(_0x435e59['autoAssociation']){switch(_0x4a6c5e){case _0x277e('0xc'):case _0x277e('0xd'):case _0x277e('0xe'):case _0x277e('0xf'):case _0x277e('0x10'):case _0x277e('0x11'):return db[_0x36a370][_0x277e('0x12')](queryQueues);case _0x277e('0x13'):return db[_0x36a370][_0x277e('0x12')](queryTelephones);case _0x277e('0x14'):return db[_0x36a370][_0x277e('0x12')](queryTrunks);case'IvrCampaigns':return db[_0x36a370][_0x277e('0x12')](queryCampaigns);}}else{return db[_0x277e('0x15')]['findAll']({'attributes':[_0x277e('0x16')],'where':{'sectionId':_0x435e59['id']},'raw':!![]})[_0x277e('0xb')](function(_0x1f6049){if(_0x1f6049){var _0x307611={'where':{'id':_[_0x277e('0x17')](_0x1f6049,_0x277e('0x16'))},'raw':!![]};switch(_0x36a370){case _0x277e('0x5'):_0x307611[_0x277e('0x18')]['role']=_0x277e('0x8');break;case _0x277e('0x19'):_0x307611[_0x277e('0x18')][_0x277e('0x1a')]=_0x277e('0x1b');break;}return db[_0x36a370][_0x277e('0x12')](_0x307611);}else{return[];}});}}else{return[];}})[_0x277e('0xb')](function(_0x337b21){return _0x337b21;});}function joinOrLeaveQueues(_0xaf032e,_0xe3ee7b,_0x5ee06d,_0x725ddc){_0xaf032e[_0xe3ee7b](util[_0x277e('0x1c')](_0x277e('0x1d'),_0x5ee06d,_0x725ddc[_0x277e('0x4')]));if(_0x725ddc[_0x277e('0x1e')]){for(var _0x5fbf1f=0x0;_0x5fbf1f<_0x725ddc['Agents'][_0x277e('0x1f')];_0x5fbf1f+=0x1){_0xaf032e[_0xe3ee7b](util[_0x277e('0x1c')]('user:%s',_0x725ddc[_0x277e('0x1e')][_0x5fbf1f][_0x277e('0x4')]));}}}function joinOrLeave(_0xc9a171,_0x565cdf,_0x3c3500){var _0x395795;if(_0xc9a171[_0x277e('0x20')]['query']['id']){db[_0x277e('0x5')][_0x277e('0x21')]({'attributes':['id',_0x277e('0x4'),_0x277e('0x6'),_0x277e('0x22')],'where':{'id':_0xc9a171[_0x277e('0x20')][_0x277e('0x23')]['id']},'include':[{'model':db['ChatInteraction'],'as':'ChatInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x277e('0x24')],'as':_0x277e('0x25'),'attributes':['id'],'raw':!![]},{'model':db['FaxInteraction'],'as':'FaxInteractions','attributes':['id'],'raw':!![]},{'model':db['SmsInteraction'],'as':'SmsInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x277e('0x26')],'as':_0x277e('0x27'),'attributes':['id'],'raw':!![]}]})[_0x277e('0xb')](function(_0x4df3c3){if(_0x4df3c3){_0x395795=_0x4df3c3;_0xc9a171[_0x565cdf](util['format'](_0x277e('0x28'),_0x4df3c3['name']));var _0x3f48e7=[];switch(_0x4df3c3['role']){case'admin':_0xc9a171[_0x565cdf](_0x277e('0x29'));_0xc9a171[_0x565cdf]('voice:outbound');if(queryQueues['hasOwnProperty']('include')){delete queryQueues['include'];}_0x3f48e7['push'](db[_0x277e('0x2a')]['findAll'](queryQueues));_0x3f48e7[_0x277e('0x2b')](db['ChatQueue']['findAll'](queryQueues));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x2c')][_0x277e('0x12')](queryQueues));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x2d')]['findAll'](queryQueues));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x2e')][_0x277e('0x12')](queryQueues));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x2f')][_0x277e('0x12')](queryQueues));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x5')][_0x277e('0x12')](queryTelephones));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x30')]['findAll'](queryTrunks));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x19')][_0x277e('0x12')](queryCampaigns));_0x3f48e7[_0x277e('0x2b')](db[_0x277e('0x5')]['findAll'](queryAgents));break;case _0x277e('0x31'):_0xc9a171[_0x565cdf](_0x277e('0x29'));_0xc9a171[_0x565cdf]('voice:outbound');_0x3f48e7[_0x277e('0x2b')](getAssociatedResources(_0x277e('0xc'),_0x4df3c3[_0x277e('0x22')],_0x277e('0x2a')));_0x3f48e7['push'](getAssociatedResources(_0x277e('0xd'),_0x4df3c3[_0x277e('0x22')],_0x277e('0x32')));_0x3f48e7[_0x277e('0x2b')](getAssociatedResources(_0x277e('0xe'),_0x4df3c3['userProfileId'],_0x277e('0x2c')));_0x3f48e7[_0x277e('0x2b')](getAssociatedResources('SmsQueues',_0x4df3c3[_0x277e('0x22')],_0x277e('0x2d')));_0x3f48e7[_0x277e('0x2b')](getAssociatedResources(_0x277e('0x10'),_0x4df3c3[_0x277e('0x22')],_0x277e('0x2e')));_0x3f48e7[_0x277e('0x2b')](getAssociatedResources('OpenchannelQueues',_0x4df3c3['userProfileId'],_0x277e('0x2f')));_0x3f48e7['push'](getAssociatedResources('Telephones',_0x4df3c3[_0x277e('0x22')],'User'));_0x3f48e7[_0x277e('0x2b')](getAssociatedResources('Trunks',_0x4df3c3[_0x277e('0x22')],_0x277e('0x30')));_0x3f48e7['push'](getAssociatedResources('IvrCampaigns',_0x4df3c3['userProfileId'],'Campaign'));_0x3f48e7[_0x277e('0x2b')](db['User'][_0x277e('0x12')](queryAgents));break;case _0x277e('0x7'):_0xc9a171[_0x565cdf](_0x277e('0x29'));_0xc9a171[_0x565cdf](_0x277e('0x33'));_0x3f48e7[_0x277e('0x2b')](_0x4df3c3[_0x277e('0x34')]({'attributes':['id',_0x277e('0x4')]}));_0x3f48e7[_0x277e('0x2b')](_0x4df3c3[_0x277e('0x35')]({'attributes':['id',_0x277e('0x4')]}));_0x3f48e7[_0x277e('0x2b')](_0x4df3c3['getFaxQueues']({'attributes':['id',_0x277e('0x4')]}));_0x3f48e7['push'](_0x4df3c3['getSmsQueues']({'attributes':['id',_0x277e('0x4')]}));_0x3f48e7[_0x277e('0x2b')](_0x4df3c3[_0x277e('0x36')]({'attributes':['id',_0x277e('0x4')]}));_0x3f48e7[_0x277e('0x2b')](_0x4df3c3['getOpenchannelQueues']({'attributes':['id',_0x277e('0x4')]}));break;}return BPromise['all'](_0x3f48e7);}})[_0x277e('0xb')](function(_0x4345a1){if(_0x4345a1&&_0x4345a1['length']){for(var _0x5b7a4d=0x0;_0x5b7a4d<_0x4345a1[_0x277e('0x1f')];_0x5b7a4d+=0x1){for(var _0x41c1ca=0x0;_0x41c1ca<_0x4345a1[_0x5b7a4d][_0x277e('0x1f')];_0x41c1ca+=0x1){switch(_0x5b7a4d){case 0x0:joinOrLeaveQueues(_0xc9a171,_0x565cdf,_0x277e('0x37'),_0x4345a1[_0x5b7a4d][_0x41c1ca]);break;case 0x1:joinOrLeaveQueues(_0xc9a171,_0x565cdf,'chat',_0x4345a1[_0x5b7a4d][_0x41c1ca]);break;case 0x2:joinOrLeaveQueues(_0xc9a171,_0x565cdf,_0x277e('0x38'),_0x4345a1[_0x5b7a4d][_0x41c1ca]);break;case 0x3:joinOrLeaveQueues(_0xc9a171,_0x565cdf,'sms',_0x4345a1[_0x5b7a4d][_0x41c1ca]);break;case 0x4:joinOrLeaveQueues(_0xc9a171,_0x565cdf,_0x277e('0x39'),_0x4345a1[_0x5b7a4d][_0x41c1ca]);break;case 0x5:joinOrLeaveQueues(_0xc9a171,_0x565cdf,_0x277e('0x3a'),_0x4345a1[_0x5b7a4d][_0x41c1ca]);break;case 0x6:_0xc9a171[_0x565cdf](util[_0x277e('0x1c')](_0x277e('0x3b'),_0x4345a1[_0x5b7a4d][_0x41c1ca][_0x277e('0x4')]));break;case 0x7:_0xc9a171[_0x565cdf](util['format'](_0x277e('0x3c'),_0x4345a1[_0x5b7a4d][_0x41c1ca][_0x277e('0x4')]));break;case 0x8:_0xc9a171[_0x565cdf](util[_0x277e('0x1c')](_0x277e('0x3d'),_0x4345a1[_0x5b7a4d][_0x41c1ca][_0x277e('0x1a')],_0x4345a1[_0x5b7a4d][_0x41c1ca][_0x277e('0x4')]));break;case 0x9:_0xc9a171[_0x565cdf](util[_0x277e('0x1c')](_0x277e('0x28'),_0x4345a1[_0x5b7a4d][_0x41c1ca][_0x277e('0x4')]));break;}}}}})[_0x277e('0xb')](function(){if(_0x565cdf==='leave'){var _0x643e7e=_[_0x277e('0x17')](_0x395795[_0x277e('0x3e')],'id');return _0x395795[_0x277e('0x3f')](_0x643e7e)[_0x277e('0xb')](function(){for(var _0x3570b6=0x0;_0x3570b6<_0x643e7e[_0x277e('0x1f')];_0x3570b6+=0x1){_0x3c3500[_0x277e('0x40')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x643e7e[_0x3570b6]),'UserId':Number(_0x395795['id'])});}});}})[_0x277e('0xb')](function(){if(_0x565cdf==='leave'){var _0x1b1272=_[_0x277e('0x17')](_0x395795[_0x277e('0x25')],'id');return _0x395795[_0x277e('0x41')](_0x1b1272)[_0x277e('0xb')](function(){for(var _0x3f9643=0x0;_0x3f9643<_0x1b1272[_0x277e('0x1f')];_0x3f9643+=0x1){_0x3c3500[_0x277e('0x40')]('user_has_mail_interactions:remove',{'MailInteractionId':Number(_0x1b1272[_0x3f9643]),'UserId':Number(_0x395795['id'])});}});}})[_0x277e('0xb')](function(){if(_0x565cdf==='leave'){var _0x34dddd=_[_0x277e('0x17')](_0x395795['FaxInteractions'],'id');return _0x395795['removeFaxInteractions'](_0x34dddd)[_0x277e('0xb')](function(){for(var _0x1f568a=0x0;_0x1f568a<_0x34dddd[_0x277e('0x1f')];_0x1f568a+=0x1){_0x3c3500['emit'](_0x277e('0x42'),{'FaxInteractionId':Number(_0x34dddd[_0x1f568a]),'UserId':Number(_0x395795['id'])});}});}})[_0x277e('0xb')](function(){if(_0x565cdf===_0x277e('0x43')){var _0x3ab1e1=_[_0x277e('0x17')](_0x395795[_0x277e('0x44')],'id');return _0x395795['removeSmsInteractions'](_0x3ab1e1)[_0x277e('0xb')](function(){for(var _0x383127=0x0;_0x383127<_0x3ab1e1[_0x277e('0x1f')];_0x383127+=0x1){_0x3c3500[_0x277e('0x40')](_0x277e('0x45'),{'SmsInteractionId':Number(_0x3ab1e1[_0x383127]),'UserId':Number(_0x395795['id'])});}});}})['then'](function(){if(_0x565cdf===_0x277e('0x43')){var _0x117443=_[_0x277e('0x17')](_0x395795[_0x277e('0x27')],'id');return _0x395795[_0x277e('0x46')](_0x117443)['then'](function(){for(var _0x2cbcb7=0x0;_0x2cbcb7<_0x117443[_0x277e('0x1f')];_0x2cbcb7+=0x1){_0x3c3500[_0x277e('0x40')](_0x277e('0x47'),{'OpenchannelInteractionId':Number(_0x117443[_0x2cbcb7]),'UserId':Number(_0x395795['id'])});}});}})[_0x277e('0x48')](function(_0x2e91a5){_0xc9a171['log'](_0x2e91a5);});}}function onDisconnect(_0x558799,_0x44d448){joinOrLeave(_0x558799,_0x277e('0x43'),_0x44d448);}function onConnect(_0x32cafc){joinOrLeave(_0x32cafc,_0x277e('0x49'));}exports[_0x277e('0x4a')]=function(_0x4c11ae){_0x4c11ae['on'](_0x277e('0x4b'),function(_0x4fdb3c){_0x4fdb3c[_0x277e('0x4c')](0x0);_0x4fdb3c[_0x277e('0x4d')]=_0x4fdb3c[_0x277e('0x4e')][_0x277e('0x4b')][_0x277e('0x4f')]+':'+_0x4fdb3c[_0x277e('0x4e')][_0x277e('0x4b')][_0x277e('0x50')];_0x4fdb3c[_0x277e('0x51')]=new Date();_0x4fdb3c[_0x277e('0x52')]=function(_0xeed4d3){console[_0x277e('0x52')](_0x277e('0x53')+_0x4fdb3c[_0x277e('0x54')]['name']+'['+_0x4fdb3c[_0x277e('0x4d')]+']',_0xeed4d3);};_0x4fdb3c['on']('disconnect',function(){onDisconnect(_0x4fdb3c,_0x4c11ae);_0x4fdb3c[_0x277e('0x52')](_0x277e('0x55'));});onConnect(_0x4fdb3c);_0x4fdb3c[_0x277e('0x52')](_0x277e('0x56'));});};
\ No newline at end of file
+var _0x87c5=['util','bluebird','../mysqldb','./environment','Agents','User','name','role','type','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','MailQueues','OpenchannelQueues','findAll','Telephones','Trunks','IvrCampaigns','UserProfileResource','resourceId','map','where','Campaign','ivr','format','length','user:%s','query','find','userProfileId','ChatInteraction','ChatInteractions','MailInteraction','FaxInteraction','FaxInteractions','SmsInteraction','SmsInteractions','OpenchannelInteractions','admin','voice:inbound','voice:outbound','include','push','FaxQueue','MailQueue','Trunk','user','VoiceQueue','SmsQueue','OpenchannelQueue','getVoiceQueues','getChatQueues','getFaxQueues','getSmsQueues','getMailQueues','all','voice','chat','fax','sms','mail','openchannel','telephone:%s','trunk:%s','campaign:%s:%s','leave','emit','user_has_chat_interactions:remove','MailInteractions','removeMailInteractions','user_has_mail_interactions:remove','user_has_fax_interactions:remove','removeSmsInteractions','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','log','join','address','connection','request','remotePort','SocketIO\x20','nsp','DISCONNECTED','CONNECTED'];(function(_0x7c9fba,_0x10b015){var _0x5cceed=function(_0x4ae29a){while(--_0x4ae29a){_0x7c9fba['push'](_0x7c9fba['shift']());}};_0x5cceed(++_0x10b015);}(_0x87c5,0x1c2));var _0x587c=function(_0x9fab87,_0x4092f6){_0x9fab87=_0x9fab87-0x0;var _0xe9f5b9=_0x87c5[_0x9fab87];return _0xe9f5b9;};'use strict';var _=require('lodash');var util=require(_0x587c('0x0'));var BPromise=require(_0x587c('0x1'));var db=require(_0x587c('0x2'))['db'];var config=require(_0x587c('0x3'));var queryQueues={'attributes':['id','name'],'include':[{'as':_0x587c('0x4'),'model':db[_0x587c('0x5')],'attributes':['id',_0x587c('0x6'),_0x587c('0x7')],'raw':!![],'where':{'role':'agent'},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x587c('0x6')],'where':{'role':'telephone'}};var queryTrunks={'raw':!![],'attributes':['id',_0x587c('0x6')]};var queryAgents={'raw':!![],'attributes':['id',_0x587c('0x6')],'where':{'role':'agent'}};var queryCampaigns={'raw':!![],'attributes':['id',_0x587c('0x6'),_0x587c('0x8')],'where':{'type':'ivr'}};function getAssociatedResources(_0x4d6b92,_0x43eec8,_0x17ecd7){return db[_0x587c('0x9')][_0x587c('0xa')]({'where':{'name':_0x4d6b92,'userProfileId':_0x43eec8},'raw':!![]})[_0x587c('0xb')](function(_0x478843){if(_0x478843){if(_0x478843[_0x587c('0xc')]){switch(_0x4d6b92){case _0x587c('0xd'):case _0x587c('0xe'):case _0x587c('0xf'):case _0x587c('0x10'):case _0x587c('0x11'):case _0x587c('0x12'):return db[_0x17ecd7][_0x587c('0x13')](queryQueues);case _0x587c('0x14'):return db[_0x17ecd7]['findAll'](queryTelephones);case _0x587c('0x15'):return db[_0x17ecd7][_0x587c('0x13')](queryTrunks);case _0x587c('0x16'):return db[_0x17ecd7][_0x587c('0x13')](queryCampaigns);}}else{return db[_0x587c('0x17')][_0x587c('0x13')]({'attributes':[_0x587c('0x18')],'where':{'sectionId':_0x478843['id']},'raw':!![]})['then'](function(_0x329a5d){if(_0x329a5d){var _0x50e0f4={'where':{'id':_[_0x587c('0x19')](_0x329a5d,_0x587c('0x18'))},'raw':!![]};switch(_0x17ecd7){case _0x587c('0x5'):_0x50e0f4[_0x587c('0x1a')][_0x587c('0x7')]='telephone';break;case _0x587c('0x1b'):_0x50e0f4[_0x587c('0x1a')]['type']=_0x587c('0x1c');break;}return db[_0x17ecd7][_0x587c('0x13')](_0x50e0f4);}else{return[];}});}}else{return[];}})[_0x587c('0xb')](function(_0x3d5046){return _0x3d5046;});}function joinOrLeaveQueues(_0x2dba05,_0x2a9c53,_0xb2a3e0,_0x4ecc95){_0x2dba05[_0x2a9c53](util[_0x587c('0x1d')]('%s:queue:%s',_0xb2a3e0,_0x4ecc95[_0x587c('0x6')]));if(_0x4ecc95['Agents']){for(var _0x2b94e4=0x0;_0x2b94e4<_0x4ecc95['Agents'][_0x587c('0x1e')];_0x2b94e4+=0x1){_0x2dba05[_0x2a9c53](util['format'](_0x587c('0x1f'),_0x4ecc95['Agents'][_0x2b94e4]['name']));}}}function joinOrLeave(_0x361397,_0x38883c,_0x2c5314){var _0x273a66;if(_0x361397['handshake'][_0x587c('0x20')]['id']){db[_0x587c('0x5')][_0x587c('0x21')]({'attributes':['id','name',_0x587c('0x7'),_0x587c('0x22')],'where':{'id':_0x361397['handshake']['query']['id']},'include':[{'model':db[_0x587c('0x23')],'as':_0x587c('0x24'),'attributes':['id'],'raw':!![]},{'model':db[_0x587c('0x25')],'as':'MailInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x587c('0x26')],'as':_0x587c('0x27'),'attributes':['id'],'raw':!![]},{'model':db[_0x587c('0x28')],'as':_0x587c('0x29'),'attributes':['id'],'raw':!![]},{'model':db['OpenchannelInteraction'],'as':_0x587c('0x2a'),'attributes':['id'],'raw':!![]}]})[_0x587c('0xb')](function(_0x4fddf1){if(_0x4fddf1){_0x273a66=_0x4fddf1;_0x361397[_0x38883c](util[_0x587c('0x1d')](_0x587c('0x1f'),_0x4fddf1[_0x587c('0x6')]));var _0x489367=[];switch(_0x4fddf1[_0x587c('0x7')]){case _0x587c('0x2b'):_0x361397[_0x38883c](_0x587c('0x2c'));_0x361397[_0x38883c](_0x587c('0x2d'));if(queryQueues['hasOwnProperty'](_0x587c('0x2e'))){delete queryQueues[_0x587c('0x2e')];}_0x489367[_0x587c('0x2f')](db['VoiceQueue'][_0x587c('0x13')](queryQueues));_0x489367[_0x587c('0x2f')](db['ChatQueue'][_0x587c('0x13')](queryQueues));_0x489367['push'](db[_0x587c('0x30')][_0x587c('0x13')](queryQueues));_0x489367[_0x587c('0x2f')](db['SmsQueue'][_0x587c('0x13')](queryQueues));_0x489367['push'](db[_0x587c('0x31')]['findAll'](queryQueues));_0x489367['push'](db['OpenchannelQueue'][_0x587c('0x13')](queryQueues));_0x489367[_0x587c('0x2f')](db['User'][_0x587c('0x13')](queryTelephones));_0x489367['push'](db[_0x587c('0x32')]['findAll'](queryTrunks));_0x489367['push'](db[_0x587c('0x1b')][_0x587c('0x13')](queryCampaigns));_0x489367[_0x587c('0x2f')](db[_0x587c('0x5')]['findAll'](queryAgents));break;case _0x587c('0x33'):_0x361397[_0x38883c](_0x587c('0x2c'));_0x361397[_0x38883c](_0x587c('0x2d'));_0x489367[_0x587c('0x2f')](getAssociatedResources(_0x587c('0xd'),_0x4fddf1[_0x587c('0x22')],_0x587c('0x34')));_0x489367['push'](getAssociatedResources(_0x587c('0xe'),_0x4fddf1['userProfileId'],'ChatQueue'));_0x489367['push'](getAssociatedResources(_0x587c('0xf'),_0x4fddf1['userProfileId'],_0x587c('0x30')));_0x489367[_0x587c('0x2f')](getAssociatedResources('SmsQueues',_0x4fddf1['userProfileId'],_0x587c('0x35')));_0x489367[_0x587c('0x2f')](getAssociatedResources('MailQueues',_0x4fddf1[_0x587c('0x22')],_0x587c('0x31')));_0x489367[_0x587c('0x2f')](getAssociatedResources(_0x587c('0x12'),_0x4fddf1[_0x587c('0x22')],_0x587c('0x36')));_0x489367[_0x587c('0x2f')](getAssociatedResources(_0x587c('0x14'),_0x4fddf1[_0x587c('0x22')],_0x587c('0x5')));_0x489367['push'](getAssociatedResources(_0x587c('0x15'),_0x4fddf1[_0x587c('0x22')],_0x587c('0x32')));_0x489367[_0x587c('0x2f')](getAssociatedResources(_0x587c('0x16'),_0x4fddf1[_0x587c('0x22')],_0x587c('0x1b')));_0x489367[_0x587c('0x2f')](db['User'][_0x587c('0x13')](queryAgents));break;case'agent':_0x361397[_0x38883c](_0x587c('0x2c'));_0x361397[_0x38883c](_0x587c('0x2d'));_0x489367['push'](_0x4fddf1[_0x587c('0x37')]({'attributes':['id',_0x587c('0x6')]}));_0x489367[_0x587c('0x2f')](_0x4fddf1[_0x587c('0x38')]({'attributes':['id','name']}));_0x489367[_0x587c('0x2f')](_0x4fddf1[_0x587c('0x39')]({'attributes':['id',_0x587c('0x6')]}));_0x489367[_0x587c('0x2f')](_0x4fddf1[_0x587c('0x3a')]({'attributes':['id',_0x587c('0x6')]}));_0x489367['push'](_0x4fddf1[_0x587c('0x3b')]({'attributes':['id',_0x587c('0x6')]}));_0x489367[_0x587c('0x2f')](_0x4fddf1['getOpenchannelQueues']({'attributes':['id',_0x587c('0x6')]}));break;}return BPromise[_0x587c('0x3c')](_0x489367);}})[_0x587c('0xb')](function(_0xd6aea9){if(_0xd6aea9&&_0xd6aea9['length']){for(var _0x52fd9c=0x0;_0x52fd9c<_0xd6aea9[_0x587c('0x1e')];_0x52fd9c+=0x1){for(var _0x4e1a71=0x0;_0x4e1a71<_0xd6aea9[_0x52fd9c][_0x587c('0x1e')];_0x4e1a71+=0x1){switch(_0x52fd9c){case 0x0:joinOrLeaveQueues(_0x361397,_0x38883c,_0x587c('0x3d'),_0xd6aea9[_0x52fd9c][_0x4e1a71]);break;case 0x1:joinOrLeaveQueues(_0x361397,_0x38883c,_0x587c('0x3e'),_0xd6aea9[_0x52fd9c][_0x4e1a71]);break;case 0x2:joinOrLeaveQueues(_0x361397,_0x38883c,_0x587c('0x3f'),_0xd6aea9[_0x52fd9c][_0x4e1a71]);break;case 0x3:joinOrLeaveQueues(_0x361397,_0x38883c,_0x587c('0x40'),_0xd6aea9[_0x52fd9c][_0x4e1a71]);break;case 0x4:joinOrLeaveQueues(_0x361397,_0x38883c,_0x587c('0x41'),_0xd6aea9[_0x52fd9c][_0x4e1a71]);break;case 0x5:joinOrLeaveQueues(_0x361397,_0x38883c,_0x587c('0x42'),_0xd6aea9[_0x52fd9c][_0x4e1a71]);break;case 0x6:_0x361397[_0x38883c](util[_0x587c('0x1d')](_0x587c('0x43'),_0xd6aea9[_0x52fd9c][_0x4e1a71][_0x587c('0x6')]));break;case 0x7:_0x361397[_0x38883c](util[_0x587c('0x1d')](_0x587c('0x44'),_0xd6aea9[_0x52fd9c][_0x4e1a71][_0x587c('0x6')]));break;case 0x8:_0x361397[_0x38883c](util[_0x587c('0x1d')](_0x587c('0x45'),_0xd6aea9[_0x52fd9c][_0x4e1a71][_0x587c('0x8')],_0xd6aea9[_0x52fd9c][_0x4e1a71][_0x587c('0x6')]));break;case 0x9:_0x361397[_0x38883c](util['format'](_0x587c('0x1f'),_0xd6aea9[_0x52fd9c][_0x4e1a71][_0x587c('0x6')]));break;}}}}})[_0x587c('0xb')](function(){if(_0x38883c===_0x587c('0x46')){var _0xeec709=_[_0x587c('0x19')](_0x273a66[_0x587c('0x24')],'id');return _0x273a66['removeChatInteractions'](_0xeec709)[_0x587c('0xb')](function(){for(var _0x32da24=0x0;_0x32da24<_0xeec709[_0x587c('0x1e')];_0x32da24+=0x1){_0x2c5314[_0x587c('0x47')](_0x587c('0x48'),{'ChatInteractionId':Number(_0xeec709[_0x32da24]),'UserId':Number(_0x273a66['id'])});}});}})[_0x587c('0xb')](function(){if(_0x38883c===_0x587c('0x46')){var _0x369dc0=_[_0x587c('0x19')](_0x273a66[_0x587c('0x49')],'id');return _0x273a66[_0x587c('0x4a')](_0x369dc0)[_0x587c('0xb')](function(){for(var _0x439cd5=0x0;_0x439cd5<_0x369dc0[_0x587c('0x1e')];_0x439cd5+=0x1){_0x2c5314[_0x587c('0x47')](_0x587c('0x4b'),{'MailInteractionId':Number(_0x369dc0[_0x439cd5]),'UserId':Number(_0x273a66['id'])});}});}})['then'](function(){if(_0x38883c==='leave'){var _0x1a6cab=_[_0x587c('0x19')](_0x273a66[_0x587c('0x27')],'id');return _0x273a66['removeFaxInteractions'](_0x1a6cab)[_0x587c('0xb')](function(){for(var _0x2e2703=0x0;_0x2e2703<_0x1a6cab[_0x587c('0x1e')];_0x2e2703+=0x1){_0x2c5314['emit'](_0x587c('0x4c'),{'FaxInteractionId':Number(_0x1a6cab[_0x2e2703]),'UserId':Number(_0x273a66['id'])});}});}})[_0x587c('0xb')](function(){if(_0x38883c===_0x587c('0x46')){var _0x1876e2=_['map'](_0x273a66[_0x587c('0x29')],'id');return _0x273a66[_0x587c('0x4d')](_0x1876e2)['then'](function(){for(var _0x1acc51=0x0;_0x1acc51<_0x1876e2[_0x587c('0x1e')];_0x1acc51+=0x1){_0x2c5314[_0x587c('0x47')]('user_has_sms_interactions:remove',{'SmsInteractionId':Number(_0x1876e2[_0x1acc51]),'UserId':Number(_0x273a66['id'])});}});}})[_0x587c('0xb')](function(){if(_0x38883c===_0x587c('0x46')){var _0xbf9d27=_[_0x587c('0x19')](_0x273a66['OpenchannelInteractions'],'id');return _0x273a66[_0x587c('0x4e')](_0xbf9d27)['then'](function(){for(var _0x1e1ceb=0x0;_0x1e1ceb<_0xbf9d27[_0x587c('0x1e')];_0x1e1ceb+=0x1){_0x2c5314[_0x587c('0x47')](_0x587c('0x4f'),{'OpenchannelInteractionId':Number(_0xbf9d27[_0x1e1ceb]),'UserId':Number(_0x273a66['id'])});}});}})['catch'](function(_0x464793){_0x361397[_0x587c('0x50')](_0x464793);});}}function onDisconnect(_0x1230d8,_0x52c931){joinOrLeave(_0x1230d8,'leave',_0x52c931);}function onConnect(_0x52854e){joinOrLeave(_0x52854e,_0x587c('0x51'));}exports['default']=function(_0x38e241){_0x38e241['on']('connection',function(_0x5cd341){_0x5cd341['setMaxListeners'](0x0);_0x5cd341[_0x587c('0x52')]=_0x5cd341['request'][_0x587c('0x53')]['remoteAddress']+':'+_0x5cd341[_0x587c('0x54')][_0x587c('0x53')][_0x587c('0x55')];_0x5cd341['connectedAt']=new Date();_0x5cd341['log']=function(_0x1ac6fd){console[_0x587c('0x50')](_0x587c('0x56')+_0x5cd341[_0x587c('0x57')][_0x587c('0x6')]+'['+_0x5cd341[_0x587c('0x52')]+']',_0x1ac6fd);};_0x5cd341['on']('disconnect',function(){onDisconnect(_0x5cd341,_0x38e241);_0x5cd341[_0x587c('0x50')](_0x587c('0x58'));});onConnect(_0x5cd341);_0x5cd341['log'](_0x587c('0x59'));});};
\ No newline at end of file
diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js
index ae3a20f..1ae5f7c 100644
--- a/server/config/triggers/index.js
+++ b/server/config/triggers/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x78db=['toLowerCase','condition','util','jayson/promise','../logger','triggers','client','http','ChatInteraction','newinteraction','Chat','afterUpdate','closedinteraction','ChatMessage','afterCreate','Sms','Fax','FaxInteraction','newmessage','MailInteraction','Mail','MailMessage','OpenchannelInteraction','Openchannel','OpenchannelMessage','request','then','info','Trigger,\x20%s','EventManager','error','code','get','channel','event','direction','UserId','User','name','interface','SIP/%s','catch','opened','changed','closed','find','format','default','length','hasOwnProperty','model','hook','callback'];(function(_0x4259e9,_0x3be572){var _0x348e6d=function(_0x3c3370){while(--_0x3c3370){_0x4259e9['push'](_0x4259e9['shift']());}};_0x348e6d(++_0x3be572);}(_0x78db,0x1aa));var _0xb78d=function(_0x43f489,_0x2b4fea){_0x43f489=_0x43f489-0x0;var _0x4134b4=_0x78db[_0x43f489];return _0x4134b4;};'use strict';var util=require(_0xb78d('0x0'));var db=require('../../mysqldb')['db'];var jayson=require(_0xb78d('0x1'));var logger=require(_0xb78d('0x2'))(_0xb78d('0x3'));var client=jayson[_0xb78d('0x4')][_0xb78d('0x5')]({'port':0x232a});var triggers=[{'channel':'Chat','model':_0xb78d('0x6'),'event':'afterCreate','condition':_0xb78d('0x7'),'callback':afterCreate},{'channel':_0xb78d('0x8'),'model':_0xb78d('0x6'),'event':_0xb78d('0x9'),'condition':_0xb78d('0xa'),'callback':afterUpdate},{'channel':'Chat','model':_0xb78d('0xb'),'event':_0xb78d('0xc'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xb78d('0xd'),'model':'SmsInteraction','event':_0xb78d('0xc'),'condition':_0xb78d('0x7'),'callback':afterCreate},{'channel':'Sms','model':'SmsInteraction','event':_0xb78d('0x9'),'condition':_0xb78d('0xa'),'callback':afterUpdate},{'channel':_0xb78d('0xd'),'model':'SmsMessage','event':_0xb78d('0xc'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xb78d('0xe'),'model':_0xb78d('0xf'),'event':_0xb78d('0xc'),'condition':_0xb78d('0x7'),'callback':afterCreate},{'channel':_0xb78d('0xe'),'model':_0xb78d('0xf'),'event':_0xb78d('0x9'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0xb78d('0xe'),'model':'FaxMessage','event':_0xb78d('0xc'),'condition':_0xb78d('0x10'),'callback':afterCreateMessage},{'channel':'Mail','model':_0xb78d('0x11'),'event':_0xb78d('0xc'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xb78d('0x12'),'model':'MailInteraction','event':'afterUpdate','condition':_0xb78d('0xa'),'callback':afterUpdate},{'channel':_0xb78d('0x12'),'model':_0xb78d('0x13'),'event':_0xb78d('0xc'),'condition':_0xb78d('0x10'),'callback':afterCreateMessage},{'channel':'Openchannel','model':_0xb78d('0x14'),'event':_0xb78d('0xc'),'condition':_0xb78d('0x7'),'callback':afterCreate},{'channel':_0xb78d('0x15'),'model':_0xb78d('0x14'),'event':_0xb78d('0x9'),'condition':_0xb78d('0xa'),'callback':afterUpdate},{'channel':_0xb78d('0x15'),'model':_0xb78d('0x16'),'event':'afterCreate','condition':_0xb78d('0x10'),'callback':afterCreateMessage}];function request(_0x35c6cf){return client[_0xb78d('0x17')]('EventManager',_0x35c6cf)[_0xb78d('0x18')](function(_0x5ad52e){logger[_0xb78d('0x19')](_0xb78d('0x1a'),_0xb78d('0x1b'),_0x5ad52e);if(_0x5ad52e[_0xb78d('0x1c')]){if(_0x5ad52e[_0xb78d('0x1c')][_0xb78d('0x1d')]===0x1f4){logger[_0xb78d('0x1c')]('Trigger,\x20%s',_0xb78d('0x1b'),_0x5ad52e[_0xb78d('0x1c')]);}}})['catch'](function(_0x413dc8){logger[_0xb78d('0x1c')](_0xb78d('0x1a'),_0xb78d('0x1b'),_0x413dc8);});}function afterCreateMessage(_0x4e8670,_0x4c36e5){return function(_0x583acc,_0x5d5c9d){_0x583acc=_0x583acc[_0xb78d('0x1e')]({'plain':!![]});_0x583acc[_0xb78d('0x1f')]=_0x4e8670;_0x583acc[_0xb78d('0x20')]=_0x583acc[_0xb78d('0x21')];if(_0x583acc[_0xb78d('0x22')]){return db[_0xb78d('0x23')]['find']({'where':{'id':_0x583acc[_0xb78d('0x22')]},'attributes':['id',_0xb78d('0x24')],'raw':!![]})['then'](function(_0x42b742){_0x583acc[_0xb78d('0x25')]=util['format'](_0xb78d('0x26'),_0x42b742[_0xb78d('0x24')]);_0x583acc[_0xb78d('0x1f')]=_0x4e8670;return request({'event':'incomingmessage','message':_0x583acc});})[_0xb78d('0x27')](function(_0x4acbdc){console['error'](_0x4acbdc);});}else{return request({'event':'outgoingmessage','message':_0x583acc});}};}function afterCreate(_0x3a2687,_0x56f42f){return function(_0x45f1a5,_0x3cb1a5){_0x45f1a5=_0x45f1a5['get']({'plain':!![]});_0x45f1a5[_0xb78d('0x1f')]=_0x3a2687;_0x45f1a5[_0xb78d('0x20')]=_0xb78d('0x28');return request({'event':_0x56f42f,'message':_0x45f1a5});};}function afterUpdate(_0x2d7017,_0x44896f){return function(_0x3a076b,_0x209835){if(_0x3a076b[_0xb78d('0x29')](_0xb78d('0x2a'))&&_0x3a076b[_0xb78d('0x2a')]){_0x3a076b=_0x3a076b[_0xb78d('0x1e')]({'plain':!![]});_0x3a076b[_0xb78d('0x1f')]=_0x2d7017;_0x3a076b[_0xb78d('0x20')]=_0xb78d('0x2a');if(_0x3a076b[_0xb78d('0x22')]){return db[_0xb78d('0x23')][_0xb78d('0x2b')]({'where':{'id':_0x3a076b[_0xb78d('0x22')]},'attributes':['id',_0xb78d('0x24')],'raw':!![]})[_0xb78d('0x18')](function(_0x2e8f71){_0x3a076b['interface']=util[_0xb78d('0x2c')](_0xb78d('0x26'),_0x2e8f71[_0xb78d('0x24')]);return request({'event':_0x44896f,'message':_0x3a076b});})['catch'](function(_0x4ea70a){console['error'](_0x4ea70a);});}else{return request({'event':_0x44896f,'message':_0x3a076b});}}};}exports[_0xb78d('0x2d')]=function(){for(var _0x5968a3=0x0;_0x5968a3=_0x3bab23['agents']){throw Error(_0xcbe1('0x16'));}_0x402d10(_0x1ab31b);})[_0xcbe1('0x17')](function(_0x3322b6){_0x23c32d(_0x3322b6);});});};
\ No newline at end of file
+var _0x304e=['./license/util','voice','mail','fax','sms','isValidChannel','toLowerCase','includes','clearBlockUser','isUndefined','blockedAt','role','agent','count','then','agents','Maximum\x20login\x20has\x20been\x20reached','catch','lodash','bluebird','../mysqldb'];(function(_0x19ec56,_0xe6589f){var _0x3e2587=function(_0x3f013b){while(--_0x3f013b){_0x19ec56['push'](_0x19ec56['shift']());}};_0x3e2587(++_0xe6589f);}(_0x304e,0x1e0));var _0xe304=function(_0x427189,_0x3b4960){_0x427189=_0x427189-0x0;var _0x356774=_0x304e[_0x427189];return _0x356774;};'use strict';var _=require(_0xe304('0x0'));var BPromise=require(_0xe304('0x1'));var db=require(_0xe304('0x2'))['db'];var util=require(_0xe304('0x3'));var channels=[_0xe304('0x4'),_0xe304('0x5'),'chat',_0xe304('0x6'),_0xe304('0x7'),'openchannel'];exports['getChannels']=function(){return channels;};exports[_0xe304('0x8')]=function(_0x480d5b){_0x480d5b=_0x480d5b[_0xe304('0x9')]();return _[_0xe304('0xa')](channels,_0x480d5b);};exports[_0xe304('0xb')]=function(_0xd3efbe,_0x3f1c7c,_0x40bf10,_0x3fd335){var _0x9e0308={'loginAttempts':_0x3f1c7c,'blocked':_0x40bf10};if(!_[_0xe304('0xc')](_0x3fd335)){_0x9e0308[_0xe304('0xd')]=_0x3fd335;}return _0xd3efbe['updateAttributes'](_0x9e0308);};exports['getLicense']=function(_0x325c53){return new BPromise(function(_0x213934,_0x4cbe57){var _0x12fb93=0x0;if(_0x325c53[_0xe304('0xe')]!==_0xe304('0xf')){_0x213934(_0x325c53);}db['User'][_0xe304('0x10')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x325c53['id']}}})[_0xe304('0x11')](function(_0x3c967c){_0x12fb93=_0x3c967c;return util['getLicense']();})[_0xe304('0x11')](function(_0x58d54c){if(_0x58d54c&&_0x58d54c[_0xe304('0x12')]&&_0x12fb93>=_0x58d54c['agents']){throw Error(_0xe304('0x13'));}_0x213934(_0x325c53);})[_0xe304('0x14')](function(_0x44539d){_0x4cbe57(_0x44539d);});});};
\ No newline at end of file
diff --git a/server/errors/index.js b/server/errors/index.js
index c847b11..3dc894d 100644
--- a/server/errors/index.js
+++ b/server/errors/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2bdd=['status','json','exports','404'];(function(_0x53f964,_0x3b52b8){var _0x17be6c=function(_0x25a732){while(--_0x25a732){_0x53f964['push'](_0x53f964['shift']());}};_0x17be6c(++_0x3b52b8);}(_0x2bdd,0x132));var _0xd2bd=function(_0xb68772,_0x5253ac){_0xb68772=_0xb68772-0x0;var _0x4189bb=_0x2bdd[_0xb68772];return _0x4189bb;};'use strict';module[_0xd2bd('0x0')][0x194]=function pageNotFound(_0x1c34ca,_0x2658ec){var _0x4cdec0=_0xd2bd('0x1');var _0x20d1c8=0x194;var _0x21d253={'status':_0x20d1c8};_0x2658ec[_0xd2bd('0x2')](_0x21d253[_0xd2bd('0x2')]);_0x2658ec['render'](_0x4cdec0,{},function(_0x1ce578,_0x4d7291){if(_0x1ce578){return _0x2658ec[_0xd2bd('0x2')](_0x21d253[_0xd2bd('0x2')])[_0xd2bd('0x3')](_0x21d253);}_0x2658ec['send'](_0x4d7291);});};
\ No newline at end of file
+var _0x80b1=['status','render','json','send','exports','404'];(function(_0x1933db,_0x4b20a1){var _0x22f447=function(_0x5a29a2){while(--_0x5a29a2){_0x1933db['push'](_0x1933db['shift']());}};_0x22f447(++_0x4b20a1);}(_0x80b1,0x64));var _0x180b=function(_0x2cdd4d,_0x394c2f){_0x2cdd4d=_0x2cdd4d-0x0;var _0x55cbc8=_0x80b1[_0x2cdd4d];return _0x55cbc8;};'use strict';module[_0x180b('0x0')][0x194]=function pageNotFound(_0x419c7c,_0x367b7f){var _0xc98dfe=_0x180b('0x1');var _0x36b3ea=0x194;var _0x8edd43={'status':_0x36b3ea};_0x367b7f[_0x180b('0x2')](_0x8edd43[_0x180b('0x2')]);_0x367b7f[_0x180b('0x3')](_0xc98dfe,{},function(_0x2221cd,_0x29e365){if(_0x2221cd){return _0x367b7f[_0x180b('0x2')](_0x8edd43[_0x180b('0x2')])[_0x180b('0x4')](_0x8edd43);}_0x367b7f[_0x180b('0x5')](_0x29e365);});};
\ No newline at end of file
diff --git a/server/mysqldb/index.js b/server/mysqldb/index.js
index e8bae63..4292073 100644
--- a/server/mysqldb/index.js
+++ b/server/mysqldb/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa0a1=['Pause','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','VoiceQueuesLog','Schedule','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','../api/tag/tag.model','Template','../api/template/template.model','Trigger','../api/trigger/trigger.model','Variable','../api/variable/variable.model','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticMetric/analyticMetric.model','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','ZohoAccount','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','../api/intZohoField/intZohoField.model','../api/intZendeskAccount/intZendeskAccount.model','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','../api/intZendeskField/intZendeskField.model','FreshdeskAccount','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','../api/intServicenowAccount/intServicenowAccount.model','../api/intServicenowConfiguration/intServicenowConfiguration.model','../api/intServicenowField/intServicenowField.model','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','Dynamics365Field','Network','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','JscriptyQuestionReport','JscriptySessionReport','SmsQueueReport','SquareReport','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','../api/squareProject/squareProject.model','SquareRecording','SquareMessage','../api/squareMessage/squareMessage.model','Team','../api/team/team.model','../api/license/license.model','Campaign','Migration','../api/attachment/attachment.model','Plugin','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','CmList','UserProfile','../api/userProfile/userProfile.model','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','../api/userProfileResource/userProfileResource.model','hasOne','cascade','UserId','hasMany','VoiceRecording','Recordings','VoiceQueuesRt','VoiceExtension','Extensions','HopperHistory','OpenchannelInteractions','ChatInteractions','SmsInteraction','SmsInteractions','FaxInteraction','MailInteractions','userProfileId','belongsToMany','Groups','Lists','cm_user_has_lists','user_has_teams','user_has_mail_interactions','ChatInteraction','user_has_chat_interactions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','VoiceQueue','VoiceQueues','UserVoiceQueue','MailQueue','MailQueues','SmsQueues','UserSmsQueue','OpenchannelQueue','VoicePrefixes','user_has_voice_prefixes','ChatWebsites','FaxAccounts','MailAccount','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','SquareProjects','user_has_square_projects','VoiceChanSpy','SpiedAgents','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','CmHopper','Hoppers','HopperHistories','HopperBlacks','JscriptySessions','TrunkId','belongsTo','TrunkBackup','TrunkBackupId','IntervalId','mandatoryDispositionPause','voice_queues_has_cm_lists','Agents','Teams','team_has_voice_queues','voice_queues_has_cm_blacklists','ScreenRecording','VoiceMailMessage','mailboxuser','mailbox','QueueCalls','uniqueid','VoiceCallReport','AgentReports','Contact','ContactId','MailAccountId','Imap','Disposition','MailMessage','MailApplication','List','ListId','team_has_mail_queues','MailInteractionId','Account','Owner','ThroughTags','Users','Attachment','Attachments','Interaction','restrict','TagId','MailQueueReport','DashboardItem','Items','Dispositions','FaxAccountId','Answers','Interactions','Messages','mandatoryDispositionPauseId','user_has_fax_accounts','FaxInteractionId','fax_interaction_has_tags','Tags','team_has_fax_queues','SmsAccountId','SmsApplication','SmsInteractionId','sms_interaction_has_tags','OpenchannelAccountId','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','AttachmentId','ChatWebsiteId','ProactiveActions','user_has_chat_websites','Agent','Queue','ChatQueueId','Website','ChatMessage','chat_interaction_has_tags','ChatInteractionId','ChatOfflineMessage','team_has_chat_queues','ChatGroupId','chat_group_has_users','Contacts','HopperFinals','FaxInteractions','Company','CompanyId','cm_contact_has_tags','OwnerId','CampaignId','Condition','All','OneAll','AutomationAllId','Any','OneAny','Action','Actions','AutomationId','Intervals','MailApplications','ChatApplications','SmsApplications','DefaultReportId','mail_interaction_has_tags','AllConditions','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','Fields','CustomReportId','MetricId','Configurations','AccountId','Subjects','SubjectId','Descriptions','DescriptionId','FieldId','Subject','Description','Field','VariableId','SugarcrmAccount','DeskField','int_desk_configuration_has_tags','ZohoField','ZendeskAccount','ZendeskField','int_zendesk_configuration_has_tags','int_freshdesk_configuration_has_tags','int_vtiger_configuration_has_tags','ServicenowAccount','ServicenowConfiguration','ServicenowField','Dynamics365Account','FromId','ToId','SessionId','ProjectId','ChatQueues','FaxQueues','team_has_sms_queues','team_has_openchannel_queues','OpenchannelQueues','campaigns_has_cm_lists','BlackLists','FromMailAccountId','FromAccount','FromUserId','FromAgent','ToAgent','ToMailQueueId','ToAccount','ChatTransferReport','FromChatWebsiteId','ToUserId','ToQueue','ToChatWebsiteId','FromFaxAccountId','ToFaxQueueId','OpenchannelTransferReport','FromOpenchannelAccountId','ToOpenchannelQueueId','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','CustomFields','VoicePrefix','UserProfileSections','Resources','sectionId','exports','path','sequelize','lodash','jstz','defaultsDeep','xcall','xC@LL1234','mysql','utf8mb4','name','utf8','utf8_general_ci','sequelizeHistory','motion2','database','username','password','options','User','../api/user/user.model','VoiceContext','import','../api/voiceContext/voiceContext.model','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','../api/voiceQueue/voiceQueue.model','../api/voiceRecording/voiceRecording.model','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','Trunk','../api/trunk/trunk.model','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserChatQueue','../api/userChatQueue/userChatQueue.model','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','../api/userSmsQueue/userSmsQueue.model','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','MailServerIn','../api/mailServerIn/mailServerIn.model','MailServerOut','../api/mailAccount/mailAccount.model','../api/mailSubstatus/mailSubstatus.model','MailInteraction','../api/mailMessage/mailMessage.model','Dashboard','../api/dashboard/dashboard.model','../api/dashboardItem/dashboardItem.model','FaxAccount','FaxApplication','../api/faxApplication/faxApplication.model','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','OpenchannelApplication','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','../api/cmCompany/cmCompany.model','CmContact','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','CmCustomField','../api/cmCustomField/cmCustomField.model','../api/action/action.model','Automation','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','../api/condition/condition.model','Interval','../api/interval/interval.model'];(function(_0x3753ff,_0x3edc66){var _0x53a7f5=function(_0x256346){while(--_0x256346){_0x3753ff['push'](_0x3753ff['shift']());}};_0x53a7f5(++_0x3edc66);}(_0xa0a1,0x15b));var _0x1a0a=function(_0x22fa62,_0x1b6501){_0x22fa62=_0x22fa62-0x0;var _0x33d9f6=_0xa0a1[_0x22fa62];return _0x33d9f6;};'use strict';var path=require(_0x1a0a('0x0'));var config=require('../config/environment');var Sequelize=require(_0x1a0a('0x1'));var _=require(_0x1a0a('0x2'));var jstz=require(_0x1a0a('0x3'));var timezone=jstz['determine']();config['sequelize']=_[_0x1a0a('0x4')](config[_0x1a0a('0x1')],{'database':'motion2','username':_0x1a0a('0x5'),'password':_0x1a0a('0x6'),'options':{'host':'127.0.0.1','port':0xcea,'dialect':_0x1a0a('0x7'),'dialectOptions':{'charset':_0x1a0a('0x8')},'logging':![],'timezone':timezone[_0x1a0a('0x9')](),'define':{'charset':_0x1a0a('0xa'),'collate':_0x1a0a('0xb')}}});config['sequelizeHistory']=_[_0x1a0a('0x4')](config[_0x1a0a('0xc')],{'database':_0x1a0a('0xd'),'username':'xcall','password':'xC@LL1234','options':{'host':'127.0.0.1','port':0xcea,'dialect':_0x1a0a('0x7'),'dialectOptions':{'charset':_0x1a0a('0x8')},'logging':![],'timezone':timezone[_0x1a0a('0x9')](),'define':{'charset':'utf8','collate':_0x1a0a('0xb')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize'][_0x1a0a('0xe')],config[_0x1a0a('0x1')][_0x1a0a('0xf')],config[_0x1a0a('0x1')][_0x1a0a('0x10')],config[_0x1a0a('0x1')][_0x1a0a('0x11')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelizeHistory'][_0x1a0a('0xe')],config[_0x1a0a('0xc')][_0x1a0a('0xf')],config[_0x1a0a('0xc')][_0x1a0a('0x10')],config['sequelizeHistory'][_0x1a0a('0x11')])};db[_0x1a0a('0x12')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x13'));db['VoiceChanSpy']=db[_0x1a0a('0x1')]['import']('../api/voiceChanSpy/voiceChanSpy.model');db[_0x1a0a('0x14')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x16'));db['VoiceExtension']=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x17'));db[_0x1a0a('0x18')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x19'));db['VoiceQueue']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x1a'));db['VoiceRecording']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x1b'));db['ScreenRecording']=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x1c'));db[_0x1a0a('0x1d')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x1e'));db['VoiceMailMessage']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/voiceMailMessage/voiceMailMessage.model');db['VoiceCallReport']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x1f'));db[_0x1a0a('0x20')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x21'));db[_0x1a0a('0x22')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x23'));db[_0x1a0a('0x24')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x25'));db[_0x1a0a('0x26')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x27'));db[_0x1a0a('0x28')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x29'));db[_0x1a0a('0x2a')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x2b'));db[_0x1a0a('0x2c')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x2d'));db['UserVoiceQueue']=db[_0x1a0a('0x1')]['import']('../api/userVoiceQueue/userVoiceQueue.model');db[_0x1a0a('0x2e')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x2f'));db[_0x1a0a('0x30')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x31'));db[_0x1a0a('0x32')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x33'));db['UserSmsQueue']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x34'));db[_0x1a0a('0x35')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x36'));db[_0x1a0a('0x37')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x38'));db[_0x1a0a('0x39')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/mailServerOut/mailServerOut.model');db['MailAccount']=db['sequelize']['import'](_0x1a0a('0x3a'));db['MailQueue']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/mailQueue/mailQueue.model');db['MailSubstatus']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x3b'));db[_0x1a0a('0x3c')]=db['sequelize'][_0x1a0a('0x15')]('../api/mailInteraction/mailInteraction.model');db['MailMessage']=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x3d'));db['MailApplication']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/mailApplication/mailApplication.model');db['MailQueueReport']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/mailQueueReport/mailQueueReport.model');db[_0x1a0a('0x3e')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x3f'));db['DashboardItem']=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x40'));db[_0x1a0a('0x41')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/faxAccount/faxAccount.model');db[_0x1a0a('0x42')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x43'));db['FaxInteraction']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/faxInteraction/faxInteraction.model');db[_0x1a0a('0x44')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x45'));db[_0x1a0a('0x46')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x47'));db[_0x1a0a('0x48')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x49'));db[_0x1a0a('0x4a')]=db['sequelize']['import']('../api/smsAccount/smsAccount.model');db['SmsApplication']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/smsApplication/smsApplication.model');db['SmsInteraction']=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x4b'));db[_0x1a0a('0x4c')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x4d'));db[_0x1a0a('0x4e')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x4f'));db[_0x1a0a('0x50')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/openchannelAccount/openchannelAccount.model');db[_0x1a0a('0x51')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/openchannelApplication/openchannelApplication.model');db[_0x1a0a('0x52')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x53'));db[_0x1a0a('0x54')]=db['sequelize']['import'](_0x1a0a('0x55'));db['OpenchannelQueue']=db['sequelize'][_0x1a0a('0x15')]('../api/openchannelQueue/openchannelQueue.model');db[_0x1a0a('0x56')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x57'));db[_0x1a0a('0x58')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x59'));db[_0x1a0a('0x5a')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x5b'));db['ChatInteraction']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/chatInteraction/chatInteraction.model');db['ChatMessage']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/chatMessage/chatMessage.model');db['ChatOfflineMessage']=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x5c'));db[_0x1a0a('0x5d')]=db['sequelize'][_0x1a0a('0x15')]('../api/chatQueue/chatQueue.model');db[_0x1a0a('0x5e')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x5f'));db[_0x1a0a('0x60')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x61'));db[_0x1a0a('0x62')]=db['sequelize']['import'](_0x1a0a('0x63'));db[_0x1a0a('0x64')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/cmContact/cmContact.model');db['CmHopper']=db['sequelize'][_0x1a0a('0x15')]('../api/cmHopper/cmHopper.model');db[_0x1a0a('0x65')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x66'));db[_0x1a0a('0x67')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x68'));db[_0x1a0a('0x69')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x6a'));db[_0x1a0a('0x6b')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/reportAgentPreview/reportAgentPreview.model');db[_0x1a0a('0x6c')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x6d'));db['Action']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x6e'));db[_0x1a0a('0x6f')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x70'));db[_0x1a0a('0x71')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x72'));db['Disposition']=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x73'));db['Condition']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x74'));db[_0x1a0a('0x75')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x76'));db[_0x1a0a('0x77')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x78'));db[_0x1a0a('0x79')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x7a'));db[_0x1a0a('0x7b')]=db[_0x1a0a('0x1')]['import']('../api/voiceQueuesLog/voiceQueuesLog.model');db[_0x1a0a('0x7c')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x7d'));db[_0x1a0a('0x7e')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x7f'));db[_0x1a0a('0x80')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x81'));db[_0x1a0a('0x82')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x83'));db[_0x1a0a('0x84')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x85'));db[_0x1a0a('0x86')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x87'));db[_0x1a0a('0x88')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x89'));db[_0x1a0a('0x8a')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x8b'));db[_0x1a0a('0x8c')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x8d'));db[_0x1a0a('0x8e')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/analyticDefaultReport/analyticDefaultReport.model');db[_0x1a0a('0x8f')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x90'));db[_0x1a0a('0x91')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x92'));db[_0x1a0a('0x93')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x94'));db['AnalyticTreeReport']=db['sequelize']['import'](_0x1a0a('0x95'));db[_0x1a0a('0x96')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x97'));db[_0x1a0a('0x98')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0x99'));db[_0x1a0a('0x9a')]=db['sequelize'][_0x1a0a('0x15')]('../api/intSalesforceField/intSalesforceField.model');db['SugarcrmAccount']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x9b'));db[_0x1a0a('0x9c')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x9d'));db[_0x1a0a('0x9e')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0x9f'));db[_0x1a0a('0xa0')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0xa1'));db[_0x1a0a('0xa2')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0xa3'));db['DeskField']=db[_0x1a0a('0x1')]['import']('../api/intDeskField/intDeskField.model');db[_0x1a0a('0xa4')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/intZohoAccount/intZohoAccount.model');db[_0x1a0a('0xa5')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xa6'));db['ZohoField']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xa7'));db['ZendeskAccount']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xa8'));db[_0x1a0a('0xa9')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xaa'));db['ZendeskField']=db[_0x1a0a('0x1')]['import'](_0x1a0a('0xab'));db[_0x1a0a('0xac')]=db['sequelize']['import']('../api/intFreshdeskAccount/intFreshdeskAccount.model');db[_0x1a0a('0xad')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0xae'));db[_0x1a0a('0xaf')]=db['sequelize']['import'](_0x1a0a('0xb0'));db[_0x1a0a('0xb1')]=db['sequelize']['import'](_0x1a0a('0xb2'));db[_0x1a0a('0xb3')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xb4'));db[_0x1a0a('0xb5')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0xb6'));db['ServicenowAccount']=db[_0x1a0a('0x1')]['import'](_0x1a0a('0xb7'));db['ServicenowConfiguration']=db['sequelize']['import'](_0x1a0a('0xb8'));db['ServicenowField']=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0xb9'));db['Dynamics365Account']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xba'));db[_0x1a0a('0xbb')]=db['sequelize'][_0x1a0a('0x15')]('../api/intDynamics365Configuration/intDynamics365Configuration.model');db[_0x1a0a('0xbc')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/intDynamics365Field/intDynamics365Field.model');db['Integration']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0x89'));db[_0x1a0a('0xbd')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xbe'));db[_0x1a0a('0xbf')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xc0'));db[_0x1a0a('0xc1')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xc2'));db[_0x1a0a('0xc3')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xc4'));db[_0x1a0a('0xc5')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/jscriptyQuestionReport/jscriptyQuestionReport.model');db[_0x1a0a('0xc6')]=db['sequelize'][_0x1a0a('0x15')]('../api/jscriptySessionReport/jscriptySessionReport.model');db[_0x1a0a('0xc7')]=db[_0x1a0a('0x1')]['import']('../api/smsQueueReport/smsQueueReport.model');db[_0x1a0a('0xc8')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/squareReport/squareReport.model');db['SquareDetailsReport']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xc9'));db[_0x1a0a('0xca')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0xcb'));db[_0x1a0a('0xcc')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xcd'));db[_0x1a0a('0xce')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xcf'));db[_0x1a0a('0xd0')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xd1'));db[_0x1a0a('0xd2')]=db[_0x1a0a('0x1')]['import']('../api/squareRecording/squareRecording.model');db[_0x1a0a('0xd3')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0xd4'));db[_0x1a0a('0xd5')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xd6'));db['License']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xd7'));db[_0x1a0a('0xd8')]=db[_0x1a0a('0x1')]['import']('../api/campaign/campaign.model');db[_0x1a0a('0xd9')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/migration/migration.model');db['Attachment']=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xda'));db[_0x1a0a('0xdb')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xdc'));db[_0x1a0a('0xdd')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xde'));db['ChatTransferReport']=db['sequelize']['import'](_0x1a0a('0xdf'));db[_0x1a0a('0xe0')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xe1'));db['OpenchannelTransferReport']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/openchannelTransferReport/openchannelTransferReport.model');db[_0x1a0a('0xe2')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xe3'));db[_0x1a0a('0xe4')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/cmList/cmList.model');db['VoicePrefix']=db[_0x1a0a('0x1')][_0x1a0a('0x15')]('../api/voicePrefix/voicePrefix.model');db[_0x1a0a('0xe5')]=db[_0x1a0a('0x1')][_0x1a0a('0x15')](_0x1a0a('0xe6'));db[_0x1a0a('0xe7')]=db[_0x1a0a('0x1')]['import'](_0x1a0a('0xe8'));db[_0x1a0a('0xe9')]=db['sequelize'][_0x1a0a('0x15')](_0x1a0a('0xea'));db[_0x1a0a('0x12')][_0x1a0a('0xeb')](db[_0x1a0a('0x1d')],{'as':_0x1a0a('0x1d'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')][_0x1a0a('0xee')](db[_0x1a0a('0xef')],{'as':_0x1a0a('0xf0'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')][_0x1a0a('0xee')](db[_0x1a0a('0x2c')],{'as':_0x1a0a('0xf1'),'foreignKey':_0x1a0a('0xed')});db['User'][_0x1a0a('0xee')](db[_0x1a0a('0xf2')],{'as':_0x1a0a('0xf3'),'onDelete':_0x1a0a('0xec'),'hooks':!![]});db['User'][_0x1a0a('0xee')](db[_0x1a0a('0x67')],{'as':'HopperFinals','foreignKey':'UserId'});db['User']['hasMany'](db[_0x1a0a('0x69')],{'as':_0x1a0a('0xf4'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')][_0x1a0a('0xee')](db[_0x1a0a('0x6b')],{'as':_0x1a0a('0x6b'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')][_0x1a0a('0xee')](db[_0x1a0a('0x52')],{'as':_0x1a0a('0xf5'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')]['hasMany'](db['ChatInteraction'],{'as':_0x1a0a('0xf6'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')][_0x1a0a('0xee')](db[_0x1a0a('0xf7')],{'as':_0x1a0a('0xf8'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')][_0x1a0a('0xee')](db[_0x1a0a('0xf9')],{'as':'FaxInteractions','foreignKey':_0x1a0a('0xed')});db['User'][_0x1a0a('0xee')](db[_0x1a0a('0x3c')],{'as':_0x1a0a('0xfa'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x12')]['belongsTo'](db[_0x1a0a('0xe5')],{'as':_0x1a0a('0xe5'),'foreignKey':_0x1a0a('0xfb')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x5e')],{'as':_0x1a0a('0xfd'),'through':'chat_group_has_users'});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x64')],{'as':'Contacts','through':'cm_user_has_contacts'});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0xfe'),'through':_0x1a0a('0xff')});db['User'][_0x1a0a('0xfc')](db['Team'],{'through':_0x1a0a('0x100')});db[_0x1a0a('0x12')]['belongsToMany'](db['MailInteraction'],{'as':_0x1a0a('0xfa'),'through':_0x1a0a('0x101')});db[_0x1a0a('0x12')]['belongsToMany'](db[_0x1a0a('0x102')],{'as':'ChatInteractions','through':_0x1a0a('0x103')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0xf9')],{'as':'FaxInteractions','through':_0x1a0a('0x104')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db['SmsInteraction'],{'as':_0x1a0a('0xf8'),'through':_0x1a0a('0x105')});db['User'][_0x1a0a('0xfc')](db[_0x1a0a('0x52')],{'as':_0x1a0a('0xf5'),'through':_0x1a0a('0x106')});db[_0x1a0a('0x12')]['belongsToMany'](db[_0x1a0a('0x107')],{'as':_0x1a0a('0x108'),'through':_0x1a0a('0x109'),'required':![]});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x10a')],{'as':_0x1a0a('0x10b'),'through':_0x1a0a('0x30'),'required':![]});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x5d')],{'as':'ChatQueues','through':'UserChatQueue','required':![],'hooks':!![]});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x46')],{'as':'FaxQueues','through':_0x1a0a('0x32'),'required':![]});db['User'][_0x1a0a('0xfc')](db['SmsQueue'],{'as':_0x1a0a('0x10c'),'through':_0x1a0a('0x10d'),'required':![]});db['User'][_0x1a0a('0xfc')](db[_0x1a0a('0x10e')],{'as':'OpenchannelQueues','through':_0x1a0a('0x35'),'required':![]});db['User']['belongsToMany'](db['CmList'],{'through':_0x1a0a('0xff')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db['VoicePrefix'],{'as':_0x1a0a('0x10f'),'through':_0x1a0a('0x110'),'required':![]});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db['ChatWebsite'],{'as':_0x1a0a('0x111'),'through':'user_has_chat_websites'});db['User'][_0x1a0a('0xfc')](db[_0x1a0a('0x41')],{'as':_0x1a0a('0x112'),'through':'user_has_fax_accounts'});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x113')],{'as':_0x1a0a('0x114'),'through':_0x1a0a('0x115')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0x50')],{'as':_0x1a0a('0x116'),'through':_0x1a0a('0x117')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db['SmsAccount'],{'as':_0x1a0a('0x118'),'through':_0x1a0a('0x119')});db[_0x1a0a('0x12')][_0x1a0a('0xfc')](db[_0x1a0a('0xd0')],{'as':_0x1a0a('0x11a'),'through':_0x1a0a('0x11b')});db[_0x1a0a('0x11c')][_0x1a0a('0xee')](db['VoiceExtension'],{'as':_0x1a0a('0x11d'),'onDelete':'cascade','foreignKey':'ChanSpyId'});db['VoiceContext'][_0x1a0a('0xee')](db[_0x1a0a('0xf2')],{'onDelete':_0x1a0a('0xec')});db['VoiceExtension'][_0x1a0a('0xee')](db[_0x1a0a('0xf2')],{'as':_0x1a0a('0x11e'),'onDelete':_0x1a0a('0xec')});db['VoiceMusicOnHold'][_0x1a0a('0xfc')](db[_0x1a0a('0x7e')],{'as':_0x1a0a('0x11f'),'through':_0x1a0a('0x120')});db[_0x1a0a('0x107')][_0x1a0a('0xee')](db[_0x1a0a('0x2c')],{'as':_0x1a0a('0x121'),'foreignKey':_0x1a0a('0x122')});db[_0x1a0a('0x107')][_0x1a0a('0xee')](db[_0x1a0a('0x123')],{'as':_0x1a0a('0x124'),'foreignKey':_0x1a0a('0x122')});db['VoiceQueue'][_0x1a0a('0xee')](db[_0x1a0a('0x67')],{'as':'HopperFinals','foreignKey':_0x1a0a('0x122')});db['VoiceQueue']['hasMany'](db['CmHopperHistory'],{'as':_0x1a0a('0x125'),'foreignKey':'VoiceQueueId'});db[_0x1a0a('0x107')][_0x1a0a('0xee')](db[_0x1a0a('0x6b')],{'as':_0x1a0a('0x6b'),'foreignKey':'VoiceQueueId'});db[_0x1a0a('0x107')][_0x1a0a('0xee')](db['CmHopperBlack'],{'as':_0x1a0a('0x126'),'foreignKey':_0x1a0a('0x122')});db['VoiceQueue']['hasMany'](db[_0x1a0a('0xc6')],{'as':_0x1a0a('0x127'),'foreignKey':_0x1a0a('0x122')});db[_0x1a0a('0x107')]['belongsTo'](db['Trunk'],{'as':'Trunk','foreignKey':_0x1a0a('0x128')});db[_0x1a0a('0x107')][_0x1a0a('0x129')](db['Trunk'],{'as':_0x1a0a('0x12a'),'foreignKey':_0x1a0a('0x12b')});db[_0x1a0a('0x107')]['belongsTo'](db[_0x1a0a('0x75')],{'as':'Interval','foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x107')][_0x1a0a('0x129')](db[_0x1a0a('0x77')],{'as':_0x1a0a('0x12d'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x1a0a('0x107')][_0x1a0a('0xfc')](db['CmList'],{'as':_0x1a0a('0xfe'),'through':_0x1a0a('0x12e')});db['VoiceQueue'][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x109')});db[_0x1a0a('0x107')]['belongsToMany'](db[_0x1a0a('0xd5')],{'as':_0x1a0a('0x130'),'through':_0x1a0a('0x131')});db[_0x1a0a('0x107')][_0x1a0a('0xfc')](db[_0x1a0a('0xe4')],{'as':'BlackLists','through':_0x1a0a('0x132')});db[_0x1a0a('0xef')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x133')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'as':'User','foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x1d')][_0x1a0a('0xee')](db[_0x1a0a('0x134')],{'as':'Messages','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x135'),'sourceKey':_0x1a0a('0x136')});db[_0x1a0a('0x134')][_0x1a0a('0x129')](db[_0x1a0a('0x1d')],{'foreignKey':_0x1a0a('0x135'),'targetKey':_0x1a0a('0x136')});db['VoiceCallReport'][_0x1a0a('0xee')](db[_0x1a0a('0x24')],{'as':_0x1a0a('0x137'),'foreignKey':_0x1a0a('0x138'),'constraints':![]});db[_0x1a0a('0x139')]['hasMany'](db[_0x1a0a('0x22')],{'as':_0x1a0a('0x13a'),'foreignKey':_0x1a0a('0x138'),'constraints':![]});db[_0x1a0a('0x139')][_0x1a0a('0x129')](db['User'],{'as':_0x1a0a('0x12'),'foreignKey':_0x1a0a('0xed')});db['VoiceCallReport']['belongsTo'](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x37')]['belongsTo'](db[_0x1a0a('0x113')],{'as':'MailAccount','foreignKey':_0x1a0a('0x13d')});db[_0x1a0a('0x39')][_0x1a0a('0x129')](db[_0x1a0a('0x113')],{'as':_0x1a0a('0x113'),'foreignKey':_0x1a0a('0x13d')});db[_0x1a0a('0x113')][_0x1a0a('0xeb')](db[_0x1a0a('0x37')],{'as':_0x1a0a('0x13e'),'onDelete':'cascade'});db[_0x1a0a('0x113')]['hasOne'](db[_0x1a0a('0x39')],{'as':'Smtp','onDelete':_0x1a0a('0xec')});db[_0x1a0a('0x113')][_0x1a0a('0xee')](db[_0x1a0a('0x13f')],{'as':'Dispositions','foreignKey':_0x1a0a('0x13d')});db[_0x1a0a('0x113')][_0x1a0a('0xee')](db[_0x1a0a('0x71')],{'as':'Answers','foreignKey':_0x1a0a('0x13d')});db['MailAccount'][_0x1a0a('0xee')](db[_0x1a0a('0x140')],{'as':'Messages','foreignKey':_0x1a0a('0x13d')});db[_0x1a0a('0x113')][_0x1a0a('0xee')](db[_0x1a0a('0x3c')],{'as':'Interactions'});db[_0x1a0a('0x113')][_0x1a0a('0xee')](db[_0x1a0a('0x141')],{'as':_0x1a0a('0x11e')});db['MailAccount'][_0x1a0a('0x129')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0x113')][_0x1a0a('0x129')](db[_0x1a0a('0x82')],{'as':_0x1a0a('0x82'),'foreignKey':'TemplateId'});db[_0x1a0a('0x113')][_0x1a0a('0x129')](db['Pause'],{'as':_0x1a0a('0x12d'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x1a0a('0x113')]['belongsToMany'](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x115')});db[_0x1a0a('0x10a')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x30')});db[_0x1a0a('0x10a')][_0x1a0a('0xfc')](db[_0x1a0a('0xd5')],{'through':_0x1a0a('0x144'),'as':_0x1a0a('0x130')});db['MailInteraction']['hasMany'](db[_0x1a0a('0x140')],{'as':'Messages','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x145')});db['MailInteraction'][_0x1a0a('0x129')](db[_0x1a0a('0x113')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x13d')});db[_0x1a0a('0x3c')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c')});db['MailInteraction'][_0x1a0a('0x129')](db['User'],{'as':_0x1a0a('0x147'),'foreignKey':'UserId'});db['MailInteraction'][_0x1a0a('0xfc')](db['Tag'],{'through':'mail_interaction_has_tags','as':'Tags'});db['MailInteraction'][_0x1a0a('0xfc')](db['Tag'],{'through':'mail_interaction_has_tags','as':_0x1a0a('0x148')});db[_0x1a0a('0x3c')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x149'),'through':'user_has_mail_interactions','foreignKey':_0x1a0a('0x145')});db[_0x1a0a('0x140')]['hasMany'](db[_0x1a0a('0x14a')],{'as':_0x1a0a('0x14b'),'onDelete':_0x1a0a('0xec')});db[_0x1a0a('0x140')][_0x1a0a('0x129')](db['User'],{'as':_0x1a0a('0x12')});db[_0x1a0a('0x140')][_0x1a0a('0x129')](db['CmContact'],{'onDelete':'cascade','as':_0x1a0a('0x13b')});db['MailMessage'][_0x1a0a('0x129')](db[_0x1a0a('0x3c')],{'as':_0x1a0a('0x14c'),'foreignKey':_0x1a0a('0x145')});db[_0x1a0a('0x140')]['belongsTo'](db[_0x1a0a('0x113')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x13d')});db[_0x1a0a('0x141')][_0x1a0a('0x129')](db['User'],{'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x141')][_0x1a0a('0x129')](db['MailQueue'],{'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x141')][_0x1a0a('0x129')](db[_0x1a0a('0x113')],{'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x141')]['belongsTo'](db[_0x1a0a('0x75')],{'onDelete':_0x1a0a('0x14d'),'foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x141')][_0x1a0a('0x129')](db[_0x1a0a('0x80')],{'onDelete':_0x1a0a('0x14d'),'foreignKey':_0x1a0a('0x14e')});db[_0x1a0a('0x14f')]['belongsTo'](db[_0x1a0a('0x113')],{});db[_0x1a0a('0x14f')][_0x1a0a('0x129')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0x14f')]['belongsTo'](db['CmContact'],{'as':_0x1a0a('0x13b'),'foreignKey':'ContactId'});db[_0x1a0a('0x14f')][_0x1a0a('0x129')](db[_0x1a0a('0x3c')],{});db[_0x1a0a('0x14f')][_0x1a0a('0x129')](db[_0x1a0a('0x140')],{});db[_0x1a0a('0x14f')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{});db[_0x1a0a('0x14f')][_0x1a0a('0x129')](db['MailQueue'],{});db[_0x1a0a('0x3e')]['hasMany'](db[_0x1a0a('0x150')],{'as':_0x1a0a('0x151'),'onDelete':_0x1a0a('0xec')});db[_0x1a0a('0x41')]['hasMany'](db[_0x1a0a('0x13f')],{'as':_0x1a0a('0x152'),'foreignKey':_0x1a0a('0x153')});db[_0x1a0a('0x41')][_0x1a0a('0xee')](db[_0x1a0a('0x71')],{'as':_0x1a0a('0x154'),'foreignKey':'FaxAccountId'});db[_0x1a0a('0x41')][_0x1a0a('0xee')](db['FaxInteraction'],{'as':_0x1a0a('0x155')});db[_0x1a0a('0x41')][_0x1a0a('0xee')](db[_0x1a0a('0x42')],{'as':_0x1a0a('0x11e')});db['FaxAccount']['hasMany'](db['VoiceExtension'],{'as':'Exntensions','onDelete':_0x1a0a('0xec')});db[_0x1a0a('0x41')][_0x1a0a('0xee')](db[_0x1a0a('0x44')],{'as':_0x1a0a('0x156')});db[_0x1a0a('0x41')][_0x1a0a('0x129')](db['Trunk'],{'as':_0x1a0a('0x28')});db['FaxAccount'][_0x1a0a('0x129')](db['CmList'],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0x41')]['belongsTo'](db[_0x1a0a('0x77')],{'as':_0x1a0a('0x12d'),'foreignKey':_0x1a0a('0x157')});db[_0x1a0a('0x41')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x158')});db[_0x1a0a('0x42')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x42')][_0x1a0a('0x129')](db[_0x1a0a('0x46')],{'onDelete':'restrict'});db['FaxApplication'][_0x1a0a('0x129')](db[_0x1a0a('0x41')],{'onDelete':'restrict'});db[_0x1a0a('0x42')]['belongsTo'](db['Tag'],{'onDelete':_0x1a0a('0x14d'),'foreignKey':_0x1a0a('0x14e')});db[_0x1a0a('0xf9')][_0x1a0a('0xee')](db[_0x1a0a('0x44')],{'as':'Messages','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x159')});db[_0x1a0a('0xf9')]['belongsTo'](db[_0x1a0a('0x41')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x153')});db[_0x1a0a('0xf9')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0xf9')]['belongsTo'](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x147'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0xf9')]['belongsToMany'](db['Tag'],{'through':_0x1a0a('0x15a'),'as':_0x1a0a('0x15b')});db[_0x1a0a('0xf9')][_0x1a0a('0xfc')](db['Tag'],{'through':_0x1a0a('0x15a'),'as':_0x1a0a('0x148')});db[_0x1a0a('0xf9')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x149'),'through':_0x1a0a('0x104'),'foreignKey':'FaxInteractionId'});db[_0x1a0a('0x44')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0xec'),'as':_0x1a0a('0x12')});db[_0x1a0a('0x44')][_0x1a0a('0x129')](db[_0x1a0a('0xf9')],{'as':_0x1a0a('0x14c'),'foreignKey':'FaxInteractionId'});db['FaxMessage']['belongsTo'](db[_0x1a0a('0x64')],{'onDelete':'cascade','as':_0x1a0a('0x13b')});db[_0x1a0a('0x44')]['belongsTo'](db['Attachment'],{'as':_0x1a0a('0x14a'),'foreignKey':'AttachmentId'});db[_0x1a0a('0x44')][_0x1a0a('0x129')](db[_0x1a0a('0x41')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x153')});db['FaxQueue'][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x32')});db['FaxQueue'][_0x1a0a('0xfc')](db[_0x1a0a('0xd5')],{'through':_0x1a0a('0x15c'),'as':'Teams'});db[_0x1a0a('0x48')][_0x1a0a('0x129')](db[_0x1a0a('0x41')],{});db[_0x1a0a('0x48')]['belongsTo'](db['CmList'],{'as':'List','foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0x48')]['belongsTo'](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x13b'),'foreignKey':'ContactId'});db['FaxQueueReport']['belongsTo'](db[_0x1a0a('0xf9')],{});db[_0x1a0a('0x48')][_0x1a0a('0x129')](db[_0x1a0a('0x44')],{});db[_0x1a0a('0x48')][_0x1a0a('0x129')](db['User'],{});db[_0x1a0a('0x48')][_0x1a0a('0x129')](db[_0x1a0a('0x46')],{});db['SmsAccount'][_0x1a0a('0xee')](db[_0x1a0a('0x13f')],{'as':'Dispositions','foreignKey':_0x1a0a('0x15d')});db[_0x1a0a('0x4a')][_0x1a0a('0xee')](db[_0x1a0a('0x71')],{'as':_0x1a0a('0x154'),'foreignKey':'SmsAccountId'});db[_0x1a0a('0x4a')]['hasMany'](db[_0x1a0a('0x4c')],{'as':'Messages','foreignKey':_0x1a0a('0x15d')});db[_0x1a0a('0x4a')]['hasMany'](db[_0x1a0a('0xf7')],{'as':_0x1a0a('0x155')});db[_0x1a0a('0x4a')][_0x1a0a('0xee')](db[_0x1a0a('0x15e')],{'as':_0x1a0a('0x11e')});db[_0x1a0a('0x4a')]['belongsTo'](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db['SmsAccount'][_0x1a0a('0x129')](db[_0x1a0a('0x77')],{'as':_0x1a0a('0x12d'),'foreignKey':_0x1a0a('0x157')});db[_0x1a0a('0x4a')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x119')});db['SmsApplication'][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x15e')][_0x1a0a('0x129')](db[_0x1a0a('0x4e')],{'onDelete':'restrict'});db['SmsApplication'][_0x1a0a('0x129')](db[_0x1a0a('0x4a')],{'onDelete':'restrict'});db[_0x1a0a('0x15e')][_0x1a0a('0x129')](db[_0x1a0a('0x75')],{'onDelete':'restrict','foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x15e')]['belongsTo'](db[_0x1a0a('0x80')],{'onDelete':_0x1a0a('0x14d'),'foreignKey':'TagId'});db['SmsInteraction'][_0x1a0a('0xee')](db['SmsMessage'],{'as':_0x1a0a('0x156'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x15f')});db[_0x1a0a('0xf7')][_0x1a0a('0x129')](db['SmsAccount'],{'as':_0x1a0a('0x146'),'foreignKey':'SmsAccountId'});db[_0x1a0a('0xf7')][_0x1a0a('0x129')](db['CmContact'],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0xf7')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x147'),'foreignKey':'UserId'});db[_0x1a0a('0xf7')][_0x1a0a('0xfc')](db[_0x1a0a('0x80')],{'through':'sms_interaction_has_tags','as':_0x1a0a('0x15b')});db[_0x1a0a('0xf7')]['belongsToMany'](db[_0x1a0a('0x80')],{'through':_0x1a0a('0x160'),'as':_0x1a0a('0x148')});db[_0x1a0a('0xf7')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x149'),'through':_0x1a0a('0x105'),'foreignKey':_0x1a0a('0x15f')});db[_0x1a0a('0x4c')]['belongsTo'](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12')});db[_0x1a0a('0x4c')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'onDelete':_0x1a0a('0xec'),'as':'Contact'});db['SmsMessage'][_0x1a0a('0x129')](db[_0x1a0a('0xf7')],{'onDelete':'cascade','as':_0x1a0a('0x14c'),'foreignKey':_0x1a0a('0x15f')});db[_0x1a0a('0x4c')]['belongsTo'](db[_0x1a0a('0x4a')],{'as':_0x1a0a('0x146'),'foreignKey':'SmsAccountId'});db[_0x1a0a('0x4e')]['belongsToMany'](db[_0x1a0a('0x12')],{'as':'Agents','through':_0x1a0a('0x10d'),'foreignKey':'SmsQueueId'});db[_0x1a0a('0x4e')][_0x1a0a('0xfc')](db[_0x1a0a('0xd5')],{'through':'team_has_sms_queues','as':_0x1a0a('0x130')});db[_0x1a0a('0x50')][_0x1a0a('0xee')](db[_0x1a0a('0x13f')],{'as':_0x1a0a('0x152'),'foreignKey':_0x1a0a('0x161')});db['OpenchannelAccount'][_0x1a0a('0xee')](db['CannedAnswer'],{'as':_0x1a0a('0x154'),'foreignKey':'OpenchannelAccountId'});db[_0x1a0a('0x50')][_0x1a0a('0xee')](db[_0x1a0a('0x52')],{'as':_0x1a0a('0x155'),'foreignKey':_0x1a0a('0x161')});db[_0x1a0a('0x50')][_0x1a0a('0xee')](db[_0x1a0a('0x54')],{'as':'Messages','foreignKey':_0x1a0a('0x161')});db[_0x1a0a('0x50')][_0x1a0a('0xee')](db[_0x1a0a('0x51')],{'as':'Applications','foreignKey':_0x1a0a('0x161')});db[_0x1a0a('0x50')]['belongsTo'](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0x50')][_0x1a0a('0x129')](db[_0x1a0a('0x77')],{'as':_0x1a0a('0x12d'),'foreignKey':_0x1a0a('0x157')});db[_0x1a0a('0x50')]['belongsToMany'](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x117')});db[_0x1a0a('0x51')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x51')][_0x1a0a('0x129')](db[_0x1a0a('0x10e')],{'onDelete':'restrict','foreignKey':_0x1a0a('0x162')});db[_0x1a0a('0x51')][_0x1a0a('0x129')](db[_0x1a0a('0x50')],{'onDelete':_0x1a0a('0x14d'),'foreignKey':_0x1a0a('0x161')});db[_0x1a0a('0x51')][_0x1a0a('0x129')](db[_0x1a0a('0x75')],{'onDelete':'restrict','foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x51')][_0x1a0a('0x129')](db[_0x1a0a('0x80')],{'onDelete':_0x1a0a('0x14d'),'foreignKey':'TagId'});db[_0x1a0a('0x52')][_0x1a0a('0xee')](db[_0x1a0a('0x54')],{'as':_0x1a0a('0x156'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x163')});db['OpenchannelInteraction'][_0x1a0a('0x129')](db[_0x1a0a('0x50')],{'as':'Account','foreignKey':_0x1a0a('0x161')});db[_0x1a0a('0x52')]['belongsTo'](db[_0x1a0a('0x64')],{'as':'Contact','foreignKey':'ContactId'});db[_0x1a0a('0x52')]['belongsTo'](db['User'],{'as':_0x1a0a('0x147'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x52')][_0x1a0a('0xfc')](db[_0x1a0a('0x80')],{'through':_0x1a0a('0x164'),'as':_0x1a0a('0x15b')});db[_0x1a0a('0x52')][_0x1a0a('0xfc')](db[_0x1a0a('0x80')],{'through':'openchannel_interaction_has_tags','as':_0x1a0a('0x148')});db['OpenchannelInteraction']['belongsToMany'](db[_0x1a0a('0x12')],{'as':'Users','through':_0x1a0a('0x106'),'foreignKey':_0x1a0a('0x163')});db[_0x1a0a('0x54')][_0x1a0a('0x129')](db['User'],{'onDelete':'cascade','as':_0x1a0a('0x12')});db[_0x1a0a('0x54')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'onDelete':_0x1a0a('0xec'),'as':_0x1a0a('0x13b')});db[_0x1a0a('0x54')][_0x1a0a('0x129')](db['OpenchannelInteraction'],{'onDelete':_0x1a0a('0xec'),'as':_0x1a0a('0x14c'),'foreignKey':_0x1a0a('0x163')});db['OpenchannelMessage']['belongsTo'](db[_0x1a0a('0x14a')],{'as':'Attachment','foreignKey':_0x1a0a('0x165')});db[_0x1a0a('0x54')][_0x1a0a('0x129')](db[_0x1a0a('0x50')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x161')});db[_0x1a0a('0x10e')]['belongsToMany'](db['User'],{'as':_0x1a0a('0x12f'),'through':'UserOpenchannelQueue','foreignKey':_0x1a0a('0x162')});db[_0x1a0a('0x10e')][_0x1a0a('0xfc')](db[_0x1a0a('0xd5')],{'through':'team_has_openchannel_queues','as':_0x1a0a('0x130')});db['ChatWebsite'][_0x1a0a('0xee')](db['Disposition'],{'as':_0x1a0a('0x152'),'foreignKey':'ChatWebsiteId'});db[_0x1a0a('0x56')]['hasMany'](db['CannedAnswer'],{'as':_0x1a0a('0x154'),'foreignKey':_0x1a0a('0x166')});db[_0x1a0a('0x56')][_0x1a0a('0xee')](db[_0x1a0a('0x60')],{'as':_0x1a0a('0x167')});db[_0x1a0a('0x56')][_0x1a0a('0xee')](db['ChatInteraction'],{'as':_0x1a0a('0x155')});db[_0x1a0a('0x56')][_0x1a0a('0xee')](db[_0x1a0a('0x5a')],{'as':'Applications'});db['ChatWebsite'][_0x1a0a('0xee')](db['ChatMessage'],{'as':_0x1a0a('0x156')});db['ChatWebsite']['belongsTo'](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db['ChatWebsite']['belongsTo'](db[_0x1a0a('0x75')],{'as':_0x1a0a('0x75'),'foreignKey':_0x1a0a('0x12c')});db['ChatWebsite']['belongsTo'](db[_0x1a0a('0x77')],{'as':_0x1a0a('0x12d'),'foreignKey':_0x1a0a('0x157')});db[_0x1a0a('0x56')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x168')});db[_0x1a0a('0x58')][_0x1a0a('0x129')](db[_0x1a0a('0x50')],{});db['OpenchannelQueueReport'][_0x1a0a('0x129')](db['CmList'],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0x58')][_0x1a0a('0x129')](db['CmContact'],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x58')]['belongsTo'](db['OpenchannelInteraction'],{});db[_0x1a0a('0x58')][_0x1a0a('0x129')](db['OpenchannelMessage'],{});db[_0x1a0a('0x58')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{});db[_0x1a0a('0x58')][_0x1a0a('0x129')](db[_0x1a0a('0x10e')],{});db[_0x1a0a('0x5a')][_0x1a0a('0x129')](db['User'],{'as':_0x1a0a('0x169'),'foreignKey':_0x1a0a('0xed'),'onDelete':_0x1a0a('0x14d')});db['ChatApplication'][_0x1a0a('0x129')](db[_0x1a0a('0x5d')],{'as':_0x1a0a('0x16a'),'foreignKey':_0x1a0a('0x16b'),'onDelete':_0x1a0a('0x14d')});db['ChatApplication'][_0x1a0a('0x129')](db[_0x1a0a('0x56')],{'as':_0x1a0a('0x16c'),'foreignKey':_0x1a0a('0x166'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x5a')]['belongsTo'](db[_0x1a0a('0x80')],{'onDelete':_0x1a0a('0x14d'),'foreignKey':'TagId'});db['ChatInteraction'][_0x1a0a('0xee')](db[_0x1a0a('0x16d')],{'as':_0x1a0a('0x156'),'onDelete':_0x1a0a('0xec'),'foreignKey':'ChatInteractionId'});db[_0x1a0a('0x102')][_0x1a0a('0x129')](db['ChatWebsite'],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x166')});db[_0x1a0a('0x102')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'as':'Contact','foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x102')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x147'),'foreignKey':'UserId'});db[_0x1a0a('0x102')]['belongsToMany'](db[_0x1a0a('0x80')],{'through':'chat_interaction_has_tags','as':'Tags'});db[_0x1a0a('0x102')][_0x1a0a('0xfc')](db['Tag'],{'through':_0x1a0a('0x16e'),'as':_0x1a0a('0x148')});db[_0x1a0a('0x102')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x149'),'through':_0x1a0a('0x103'),'foreignKey':_0x1a0a('0x16f')});db[_0x1a0a('0x16d')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0xec'),'as':_0x1a0a('0x12')});db['ChatMessage'][_0x1a0a('0x129')](db['CmContact'],{'onDelete':_0x1a0a('0xec'),'as':'Contact','foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x16d')][_0x1a0a('0x129')](db['ChatInteraction'],{'onDelete':_0x1a0a('0xec'),'as':_0x1a0a('0x14c'),'foreignKey':_0x1a0a('0x16f')});db[_0x1a0a('0x16d')][_0x1a0a('0x129')](db[_0x1a0a('0x14a')],{'as':'Attachment','foreignKey':_0x1a0a('0x165')});db[_0x1a0a('0x16d')]['belongsTo'](db[_0x1a0a('0x56')],{'as':_0x1a0a('0x146'),'foreignKey':'ChatWebsiteId'});db[_0x1a0a('0x170')]['belongsTo'](db['CmContact'],{'onDelete':_0x1a0a('0xec'),'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x170')][_0x1a0a('0x129')](db[_0x1a0a('0x56')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x166')});db[_0x1a0a('0x5d')][_0x1a0a('0xfc')](db['User'],{'as':_0x1a0a('0x12f'),'through':'UserChatQueue','hooks':!![]});db[_0x1a0a('0x5d')][_0x1a0a('0xfc')](db[_0x1a0a('0xd5')],{'through':_0x1a0a('0x171'),'as':_0x1a0a('0x130')});db[_0x1a0a('0x5e')][_0x1a0a('0xee')](db[_0x1a0a('0xc1')],{'as':'Messages','foreignKey':_0x1a0a('0x172'),'onDelete':'cascade'});db[_0x1a0a('0x5e')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x121'),'through':_0x1a0a('0x173')});db[_0x1a0a('0x60')]['belongsTo'](db[_0x1a0a('0x56')],{'as':_0x1a0a('0x16c'),'foreignKey':_0x1a0a('0x166')});db[_0x1a0a('0x62')]['hasMany'](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x174'),'foreignKey':'CompanyId'});db[_0x1a0a('0x64')][_0x1a0a('0xee')](db[_0x1a0a('0x123')],{'as':_0x1a0a('0x124'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x64')][_0x1a0a('0xee')](db[_0x1a0a('0x67')],{'as':_0x1a0a('0x175'),'foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x64')][_0x1a0a('0xee')](db[_0x1a0a('0x69')],{'as':'HopperHistories','foreignKey':'ContactId'});db[_0x1a0a('0x64')]['hasMany'](db[_0x1a0a('0x6b')],{'as':'ReportAgentPreview','foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0x64')]['hasMany'](db[_0x1a0a('0xc6')],{'as':_0x1a0a('0x127'),'foreignKey':_0x1a0a('0x13c')});db['CmContact'][_0x1a0a('0xee')](db[_0x1a0a('0x52')],{'as':_0x1a0a('0xf5'),'foreignKey':_0x1a0a('0x13c'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x64')][_0x1a0a('0xee')](db[_0x1a0a('0x102')],{'as':_0x1a0a('0xf6'),'foreignKey':_0x1a0a('0x13c'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x64')]['hasMany'](db['SmsInteraction'],{'as':_0x1a0a('0xf8'),'foreignKey':_0x1a0a('0x13c'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x64')]['hasMany'](db[_0x1a0a('0xf9')],{'as':_0x1a0a('0x176'),'foreignKey':_0x1a0a('0x13c'),'onDelete':'restrict'});db[_0x1a0a('0x64')][_0x1a0a('0xee')](db[_0x1a0a('0x3c')],{'as':_0x1a0a('0xfa'),'foreignKey':_0x1a0a('0x13c'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x64')][_0x1a0a('0x129')](db[_0x1a0a('0x62')],{'as':_0x1a0a('0x177'),'foreignKey':_0x1a0a('0x178')});db[_0x1a0a('0x64')][_0x1a0a('0x129')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':_0x1a0a('0x143'),'onDelete':'cascade'});db[_0x1a0a('0x64')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x149'),'through':'cm_user_has_contacts'});db[_0x1a0a('0x64')]['belongsToMany'](db[_0x1a0a('0x80')],{'as':'Tags','through':_0x1a0a('0x179')});db['CmContact']['belongsToMany'](db[_0x1a0a('0x80')],{'through':_0x1a0a('0x179'),'as':_0x1a0a('0x148')});db[_0x1a0a('0x123')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c'),'onDelete':_0x1a0a('0xec')});db['CmHopper'][_0x1a0a('0x129')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':'ListId','onDelete':_0x1a0a('0xec')});db[_0x1a0a('0x123')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x169'),'foreignKey':_0x1a0a('0xed')});db[_0x1a0a('0x123')]['belongsTo'](db[_0x1a0a('0x107')],{'as':'Queue','foreignKey':_0x1a0a('0x122'),'onDelete':_0x1a0a('0xec')});db[_0x1a0a('0x123')][_0x1a0a('0x129')](db[_0x1a0a('0xd8')],{'as':_0x1a0a('0xd8'),'foreignKey':'CampaignId','onDelete':'cascade'});db[_0x1a0a('0x123')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x147'),'foreignKey':_0x1a0a('0x17a')});db[_0x1a0a('0x65')][_0x1a0a('0x129')](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x13b'),'foreignKey':_0x1a0a('0x13c'),'onDelete':_0x1a0a('0xec')});db['CmHopperBlack']['belongsTo'](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':'ListId','onDelete':'cascade'});db[_0x1a0a('0x65')][_0x1a0a('0x129')](db[_0x1a0a('0x107')],{'as':_0x1a0a('0x16a'),'foreignKey':_0x1a0a('0x122'),'onDelete':'cascade'});db[_0x1a0a('0x65')][_0x1a0a('0x129')](db[_0x1a0a('0xd8')],{'as':'Campaign','foreignKey':_0x1a0a('0x17b'),'onDelete':'cascade'});db['Automation'][_0x1a0a('0xee')](db[_0x1a0a('0x17c')],{'as':{'plural':_0x1a0a('0x17d'),'singular':_0x1a0a('0x17e')},'foreignKey':_0x1a0a('0x17f'),'onDelete':_0x1a0a('0xec'),'hooks':!![]});db[_0x1a0a('0x6f')][_0x1a0a('0xee')](db['Condition'],{'as':{'plural':_0x1a0a('0x180'),'singular':_0x1a0a('0x181')},'foreignKey':'AutomationAnyId','onDelete':_0x1a0a('0xec'),'hooks':!![]});db[_0x1a0a('0x6f')][_0x1a0a('0xee')](db[_0x1a0a('0x182')],{'as':_0x1a0a('0x183'),'foreignKey':_0x1a0a('0x184'),'onDelete':_0x1a0a('0xec'),'hooks':!![]});db[_0x1a0a('0x75')]['hasMany'](db[_0x1a0a('0x75')],{'as':_0x1a0a('0x185'),'foreignKey':'IntervalId','onDelete':'cascade','hooks':!![],'required':![]});db[_0x1a0a('0x75')][_0x1a0a('0xee')](db[_0x1a0a('0xf2')],{'as':'Extensions','foreignKey':_0x1a0a('0x12c'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x75')][_0x1a0a('0xee')](db[_0x1a0a('0x141')],{'as':_0x1a0a('0x186'),'foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x75')][_0x1a0a('0xee')](db[_0x1a0a('0x5a')],{'as':_0x1a0a('0x187'),'foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x75')][_0x1a0a('0xee')](db[_0x1a0a('0x42')],{'as':'FaxApplications','foreignKey':'IntervalId'});db[_0x1a0a('0x75')][_0x1a0a('0xee')](db[_0x1a0a('0x15e')],{'as':_0x1a0a('0x188'),'foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0x7c')][_0x1a0a('0x129')](db['MailAccount'],{});db['Schedule'][_0x1a0a('0x129')](db[_0x1a0a('0x8e')],{'foreignKey':_0x1a0a('0x189')});db['Schedule']['belongsTo'](db[_0x1a0a('0x8c')],{'foreignKey':'CustomReportId'});db[_0x1a0a('0x7e')][_0x1a0a('0xfc')](db[_0x1a0a('0x18')],{'as':'Mohs','through':_0x1a0a('0x120'),'onDelete':_0x1a0a('0x14d')});db[_0x1a0a('0x80')]['belongsToMany'](db[_0x1a0a('0x64')],{'through':_0x1a0a('0x179')});db['Tag'][_0x1a0a('0xfc')](db[_0x1a0a('0x102')],{'through':_0x1a0a('0x16e')});db[_0x1a0a('0x80')]['belongsToMany'](db[_0x1a0a('0x3c')],{'through':_0x1a0a('0x18a')});db[_0x1a0a('0x80')][_0x1a0a('0xfc')](db[_0x1a0a('0xf7')],{'through':'sms_interaction_has_tags'});db[_0x1a0a('0x80')]['belongsToMany'](db[_0x1a0a('0xf9')],{'through':_0x1a0a('0x15a')});db[_0x1a0a('0x80')][_0x1a0a('0xfc')](db['OpenchannelInteraction'],{'through':'openchannel_interaction_has_tags'});db['Trigger'][_0x1a0a('0xee')](db[_0x1a0a('0x17c')],{'as':{'plural':_0x1a0a('0x18b'),'singular':_0x1a0a('0x18c')},'foreignKey':_0x1a0a('0x18d'),'onDelete':'cascade','hooks':!![]});db[_0x1a0a('0x84')][_0x1a0a('0xee')](db[_0x1a0a('0x17c')],{'as':{'plural':_0x1a0a('0x18e'),'singular':_0x1a0a('0x18f')},'foreignKey':_0x1a0a('0x190'),'onDelete':_0x1a0a('0xec'),'hooks':!![]});db[_0x1a0a('0x84')][_0x1a0a('0xee')](db[_0x1a0a('0x182')],{'as':'Actions','foreignKey':_0x1a0a('0x191'),'onDelete':_0x1a0a('0xec'),'hooks':!![]});db[_0x1a0a('0x8c')]['hasMany'](db[_0x1a0a('0x93')],{'as':_0x1a0a('0x192'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x193'),'hooks':!![]});db[_0x1a0a('0x8e')][_0x1a0a('0xee')](db[_0x1a0a('0x93')],{'as':_0x1a0a('0x192'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x189')});db[_0x1a0a('0x91')]['hasMany'](db[_0x1a0a('0x93')],{'as':_0x1a0a('0x192'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x194')});db[_0x1a0a('0x93')][_0x1a0a('0x129')](db[_0x1a0a('0x91')],{'foreignKey':_0x1a0a('0x194')});db[_0x1a0a('0x96')][_0x1a0a('0xee')](db[_0x1a0a('0x98')],{'as':_0x1a0a('0x195'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x196')});db['SalesforceConfiguration'][_0x1a0a('0xee')](db[_0x1a0a('0x9a')],{'as':_0x1a0a('0x197'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0x98')][_0x1a0a('0xee')](db[_0x1a0a('0x9a')],{'as':_0x1a0a('0x199'),'onDelete':'cascade','foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0x98')][_0x1a0a('0xee')](db[_0x1a0a('0x9a')],{'as':'Fields','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x19b')});db['SalesforceConfiguration']['belongsTo'](db[_0x1a0a('0x96')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0x9a')]['hasMany'](db[_0x1a0a('0x9a')],{'as':_0x1a0a('0x19c'),'foreignKey':'SubjectId'});db[_0x1a0a('0x9a')][_0x1a0a('0xee')](db['SalesforceField'],{'as':_0x1a0a('0x19d'),'foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0x9a')][_0x1a0a('0xee')](db['SalesforceField'],{'as':_0x1a0a('0x19e'),'foreignKey':'FieldId'});db[_0x1a0a('0x9a')]['belongsTo'](db['Variable'],{'as':_0x1a0a('0x86'),'foreignKey':_0x1a0a('0x19f')});db[_0x1a0a('0x1a0')][_0x1a0a('0xee')](db[_0x1a0a('0x9c')],{'as':'Configurations','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x196')});db['SugarcrmConfiguration'][_0x1a0a('0xee')](db['SugarcrmField'],{'as':_0x1a0a('0x197'),'onDelete':_0x1a0a('0xec'),'foreignKey':'SubjectId'});db[_0x1a0a('0x9c')][_0x1a0a('0xee')](db[_0x1a0a('0x9e')],{'as':'Descriptions','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0x9c')]['hasMany'](db[_0x1a0a('0x9e')],{'as':'Fields','onDelete':_0x1a0a('0xec'),'foreignKey':'FieldId'});db[_0x1a0a('0x9c')][_0x1a0a('0x129')](db[_0x1a0a('0x1a0')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0x9e')]['hasMany'](db['SugarcrmField'],{'as':_0x1a0a('0x19c'),'foreignKey':'SubjectId'});db[_0x1a0a('0x9e')][_0x1a0a('0xee')](db[_0x1a0a('0x9e')],{'as':_0x1a0a('0x19d'),'foreignKey':_0x1a0a('0x19a')});db['SugarcrmField'][_0x1a0a('0xee')](db[_0x1a0a('0x9e')],{'as':_0x1a0a('0x19e'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0x9e')]['belongsTo'](db[_0x1a0a('0x86')],{'as':_0x1a0a('0x86'),'foreignKey':_0x1a0a('0x19f')});db[_0x1a0a('0xa0')][_0x1a0a('0xee')](db[_0x1a0a('0xa2')],{'as':'Configurations','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x196')});db['DeskConfiguration'][_0x1a0a('0xee')](db[_0x1a0a('0x1a1')],{'as':'Subjects','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xa2')]['hasMany'](db[_0x1a0a('0x1a1')],{'as':_0x1a0a('0x199'),'onDelete':_0x1a0a('0xec'),'foreignKey':'DescriptionId'});db['DeskConfiguration']['hasMany'](db[_0x1a0a('0x1a1')],{'as':'Fields','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xa2')][_0x1a0a('0x129')](db[_0x1a0a('0xa0')],{'as':'Account','foreignKey':'AccountId'});db[_0x1a0a('0xa2')][_0x1a0a('0xfc')](db['Tag'],{'through':_0x1a0a('0x1a2')});db[_0x1a0a('0x1a1')][_0x1a0a('0xee')](db[_0x1a0a('0x1a1')],{'as':'Subject','foreignKey':'SubjectId'});db[_0x1a0a('0x1a1')][_0x1a0a('0xee')](db[_0x1a0a('0x1a1')],{'as':'Description','foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0x1a1')]['hasMany'](db['DeskField'],{'as':_0x1a0a('0x19e'),'foreignKey':_0x1a0a('0x19b')});db['DeskField'][_0x1a0a('0x129')](db[_0x1a0a('0x86')],{'as':_0x1a0a('0x86'),'foreignKey':'VariableId'});db['ZohoAccount']['hasMany'](db[_0x1a0a('0xa5')],{'as':_0x1a0a('0x195'),'onDelete':_0x1a0a('0xec'),'foreignKey':'AccountId'});db['ZohoConfiguration']['hasMany'](db[_0x1a0a('0x1a3')],{'as':_0x1a0a('0x197'),'onDelete':_0x1a0a('0xec'),'foreignKey':'SubjectId'});db[_0x1a0a('0xa5')][_0x1a0a('0xee')](db['ZohoField'],{'as':_0x1a0a('0x199'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0xa5')][_0x1a0a('0xee')](db['ZohoField'],{'as':_0x1a0a('0x192'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xa5')][_0x1a0a('0x129')](db[_0x1a0a('0xa4')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x196')});db['ZohoField'][_0x1a0a('0xee')](db[_0x1a0a('0x1a3')],{'as':_0x1a0a('0x19c'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0x1a3')][_0x1a0a('0xee')](db[_0x1a0a('0x1a3')],{'as':_0x1a0a('0x19d'),'foreignKey':_0x1a0a('0x19a')});db['ZohoField'][_0x1a0a('0xee')](db[_0x1a0a('0x1a3')],{'as':_0x1a0a('0x19e'),'foreignKey':'FieldId'});db[_0x1a0a('0x1a3')][_0x1a0a('0x129')](db[_0x1a0a('0x86')],{'as':'Variable','foreignKey':'VariableId'});db[_0x1a0a('0x1a4')]['hasMany'](db[_0x1a0a('0xa9')],{'as':'Configurations','onDelete':'cascade','foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0xa9')][_0x1a0a('0xee')](db[_0x1a0a('0x1a5')],{'as':_0x1a0a('0x197'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xa9')][_0x1a0a('0xee')](db[_0x1a0a('0x1a5')],{'as':_0x1a0a('0x199'),'foreignKey':_0x1a0a('0x19a')});db['ZendeskConfiguration']['hasMany'](db[_0x1a0a('0x1a5')],{'as':_0x1a0a('0x192'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xa9')][_0x1a0a('0x129')](db[_0x1a0a('0x1a4')],{'as':_0x1a0a('0x146'),'foreignKey':'AccountId'});db['ZendeskConfiguration'][_0x1a0a('0xfc')](db['Tag'],{'through':_0x1a0a('0x1a6')});db['ZendeskField'][_0x1a0a('0xee')](db[_0x1a0a('0x1a5')],{'as':_0x1a0a('0x19c'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0x1a5')]['hasMany'](db['ZendeskField'],{'as':'Description','foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0x1a5')][_0x1a0a('0xee')](db[_0x1a0a('0x1a5')],{'as':_0x1a0a('0x19e'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0x1a5')][_0x1a0a('0x129')](db['Variable'],{'as':'Variable','foreignKey':_0x1a0a('0x19f')});db[_0x1a0a('0xac')]['hasMany'](db[_0x1a0a('0xad')],{'as':_0x1a0a('0x195'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0xad')][_0x1a0a('0xee')](db['FreshdeskField'],{'as':'Subjects','onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xad')][_0x1a0a('0xee')](db['FreshdeskField'],{'as':_0x1a0a('0x199'),'onDelete':'cascade','foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0xad')]['hasMany'](db['FreshdeskField'],{'as':_0x1a0a('0x192'),'onDelete':'cascade','foreignKey':_0x1a0a('0x19b')});db['FreshdeskConfiguration'][_0x1a0a('0x129')](db[_0x1a0a('0xac')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x196')});db['FreshdeskConfiguration'][_0x1a0a('0xfc')](db[_0x1a0a('0x80')],{'through':_0x1a0a('0x1a7')});db['FreshdeskField']['hasMany'](db['FreshdeskField'],{'as':'Subject','foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xaf')][_0x1a0a('0xee')](db[_0x1a0a('0xaf')],{'as':_0x1a0a('0x19d'),'foreignKey':_0x1a0a('0x19a')});db['FreshdeskField'][_0x1a0a('0xee')](db[_0x1a0a('0xaf')],{'as':_0x1a0a('0x19e'),'foreignKey':_0x1a0a('0x19b')});db['FreshdeskField'][_0x1a0a('0x129')](db['Variable'],{'as':_0x1a0a('0x86'),'foreignKey':_0x1a0a('0x19f')});db['VtigerAccount'][_0x1a0a('0xee')](db[_0x1a0a('0xb3')],{'as':_0x1a0a('0x195'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x196')});db['VtigerConfiguration'][_0x1a0a('0xee')](db['VtigerField'],{'as':_0x1a0a('0x197'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xb3')][_0x1a0a('0xee')](db[_0x1a0a('0xb5')],{'as':_0x1a0a('0x199'),'foreignKey':'DescriptionId'});db['VtigerConfiguration']['hasMany'](db[_0x1a0a('0xb5')],{'as':_0x1a0a('0x192'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xb3')]['belongsTo'](db[_0x1a0a('0xb1')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0xb3')][_0x1a0a('0xfc')](db['Tag'],{'through':_0x1a0a('0x1a8')});db[_0x1a0a('0xb5')][_0x1a0a('0xee')](db['VtigerField'],{'as':_0x1a0a('0x19c'),'foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xb5')][_0x1a0a('0xee')](db[_0x1a0a('0xb5')],{'as':_0x1a0a('0x19d'),'foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0xb5')]['hasMany'](db['VtigerField'],{'as':_0x1a0a('0x19e'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xb5')][_0x1a0a('0x129')](db[_0x1a0a('0x86')],{'as':_0x1a0a('0x86'),'foreignKey':_0x1a0a('0x19f')});db[_0x1a0a('0x1a9')]['hasMany'](db[_0x1a0a('0x1aa')],{'as':_0x1a0a('0x195'),'onDelete':_0x1a0a('0xec'),'foreignKey':'AccountId'});db[_0x1a0a('0x1aa')]['hasMany'](db['ServicenowField'],{'as':'Subjects','foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0x1aa')]['hasMany'](db[_0x1a0a('0x1ab')],{'as':_0x1a0a('0x199'),'foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0x1aa')][_0x1a0a('0xee')](db[_0x1a0a('0x1ab')],{'as':_0x1a0a('0x192'),'foreignKey':'FieldId'});db[_0x1a0a('0x1aa')]['belongsTo'](db[_0x1a0a('0x1a9')],{'as':_0x1a0a('0x146'),'foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0x1ab')]['hasMany'](db[_0x1a0a('0x1ab')],{'as':_0x1a0a('0x19c'),'foreignKey':_0x1a0a('0x198')});db['ServicenowField'][_0x1a0a('0xee')](db[_0x1a0a('0x1ab')],{'as':_0x1a0a('0x19d'),'foreignKey':'DescriptionId'});db[_0x1a0a('0x1ab')][_0x1a0a('0xee')](db[_0x1a0a('0x1ab')],{'as':'Field','foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0x1ab')]['belongsTo'](db[_0x1a0a('0x86')],{'as':'Variable','foreignKey':_0x1a0a('0x19f')});db[_0x1a0a('0x1ac')]['hasMany'](db[_0x1a0a('0xbb')],{'as':_0x1a0a('0x195'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x196')});db[_0x1a0a('0xbb')][_0x1a0a('0xee')](db[_0x1a0a('0xbc')],{'as':'Subjects','onDelete':_0x1a0a('0xec'),'foreignKey':'SubjectId'});db[_0x1a0a('0xbb')][_0x1a0a('0xee')](db['Dynamics365Field'],{'as':'Descriptions','onDelete':'cascade','foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0xbb')][_0x1a0a('0xee')](db[_0x1a0a('0xbc')],{'as':_0x1a0a('0x192'),'onDelete':'cascade','foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xbb')][_0x1a0a('0x129')](db[_0x1a0a('0x1ac')],{'as':_0x1a0a('0x146'),'foreignKey':'AccountId'});db[_0x1a0a('0xbc')][_0x1a0a('0xee')](db['Dynamics365Field'],{'as':'Subject','foreignKey':_0x1a0a('0x198')});db[_0x1a0a('0xbc')][_0x1a0a('0xee')](db[_0x1a0a('0xbc')],{'as':_0x1a0a('0x19d'),'foreignKey':_0x1a0a('0x19a')});db[_0x1a0a('0xbc')][_0x1a0a('0xee')](db[_0x1a0a('0xbc')],{'as':_0x1a0a('0x19e'),'foreignKey':_0x1a0a('0x19b')});db[_0x1a0a('0xbc')]['belongsTo'](db[_0x1a0a('0x86')],{'as':_0x1a0a('0x86'),'foreignKey':_0x1a0a('0x19f')});db[_0x1a0a('0xbf')]['belongsTo'](db['ChatWebsite'],{});db[_0x1a0a('0xbf')][_0x1a0a('0x129')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':'ListId'});db['ChatQueueReport']['belongsTo'](db[_0x1a0a('0x64')],{'as':'Contact','foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0xbf')]['belongsTo'](db[_0x1a0a('0x102')],{});db['ChatQueueReport'][_0x1a0a('0x129')](db[_0x1a0a('0x16d')],{});db[_0x1a0a('0xbf')][_0x1a0a('0x129')](db['User'],{});db[_0x1a0a('0xbf')][_0x1a0a('0x129')](db['ChatQueue'],{});db[_0x1a0a('0xc1')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x1ad')});db[_0x1a0a('0xc1')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x1ae')});db['JscriptySessionReport'][_0x1a0a('0xee')](db[_0x1a0a('0xc5')],{'foreignKey':_0x1a0a('0x1af'),'onDelete':_0x1a0a('0xec')});db[_0x1a0a('0xc6')][_0x1a0a('0xee')](db[_0x1a0a('0xc3')],{'foreignKey':'SessionId','onDelete':_0x1a0a('0xec')});db[_0x1a0a('0xc7')][_0x1a0a('0x129')](db[_0x1a0a('0x4a')],{});db[_0x1a0a('0xc7')][_0x1a0a('0x129')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x142'),'foreignKey':'ListId'});db[_0x1a0a('0xc7')]['belongsTo'](db[_0x1a0a('0x64')],{'as':'Contact','foreignKey':_0x1a0a('0x13c')});db[_0x1a0a('0xc7')][_0x1a0a('0x129')](db[_0x1a0a('0xf7')],{});db['SmsQueueReport'][_0x1a0a('0x129')](db['SmsMessage'],{});db[_0x1a0a('0xc7')]['belongsTo'](db[_0x1a0a('0x12')],{});db[_0x1a0a('0xc7')]['belongsTo'](db[_0x1a0a('0x4e')],{});db[_0x1a0a('0xca')][_0x1a0a('0xee')](db[_0x1a0a('0xc6')],{'foreignKey':_0x1a0a('0x1b0')});db[_0x1a0a('0xca')][_0x1a0a('0xee')](db[_0x1a0a('0xc5')],{'foreignKey':_0x1a0a('0x1b0')});db[_0x1a0a('0xca')]['hasMany'](db['JscriptyAnswerReport'],{'foreignKey':'ProjectId'});db[_0x1a0a('0xd0')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':'Users','through':_0x1a0a('0x11b')});db[_0x1a0a('0xd5')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x100')});db[_0x1a0a('0xd5')][_0x1a0a('0xfc')](db['VoiceQueue'],{'through':_0x1a0a('0x131'),'as':'VoiceQueues'});db[_0x1a0a('0xd5')][_0x1a0a('0xfc')](db[_0x1a0a('0x10a')],{'through':'team_has_mail_queues','as':_0x1a0a('0x10b')});db[_0x1a0a('0xd5')]['belongsToMany'](db[_0x1a0a('0x5d')],{'through':_0x1a0a('0x171'),'as':_0x1a0a('0x1b1')});db[_0x1a0a('0xd5')]['belongsToMany'](db['FaxQueue'],{'through':'team_has_fax_queues','as':_0x1a0a('0x1b2')});db[_0x1a0a('0xd5')][_0x1a0a('0xfc')](db[_0x1a0a('0x4e')],{'through':_0x1a0a('0x1b3'),'as':_0x1a0a('0x10c')});db['Team'][_0x1a0a('0xfc')](db[_0x1a0a('0x10e')],{'through':_0x1a0a('0x1b4'),'as':_0x1a0a('0x1b5')});db[_0x1a0a('0xd8')][_0x1a0a('0xee')](db[_0x1a0a('0x123')],{'as':_0x1a0a('0x124'),'foreignKey':_0x1a0a('0x17b')});db[_0x1a0a('0xd8')]['hasMany'](db[_0x1a0a('0x67')],{'as':_0x1a0a('0x175'),'foreignKey':'CampaignId'});db[_0x1a0a('0xd8')]['hasMany'](db[_0x1a0a('0x69')],{'as':_0x1a0a('0x125'),'foreignKey':_0x1a0a('0x17b')});db[_0x1a0a('0xd8')][_0x1a0a('0xee')](db['CmHopperBlack'],{'as':_0x1a0a('0x126'),'foreignKey':_0x1a0a('0x17b')});db[_0x1a0a('0xd8')]['belongsTo'](db[_0x1a0a('0x28')],{'as':_0x1a0a('0x28'),'foreignKey':_0x1a0a('0x128')});db[_0x1a0a('0xd8')][_0x1a0a('0x129')](db[_0x1a0a('0x28')],{'as':'TrunkBackup','foreignKey':_0x1a0a('0x12b')});db['Campaign'][_0x1a0a('0x129')](db[_0x1a0a('0x75')],{'as':'Interval','foreignKey':_0x1a0a('0x12c')});db[_0x1a0a('0xd8')][_0x1a0a('0x129')](db[_0x1a0a('0xd0')],{'as':_0x1a0a('0xd0'),'foreignKey':'SquareProjectId'});db['Campaign']['belongsToMany'](db[_0x1a0a('0xe4')],{'as':'Lists','through':_0x1a0a('0x1b6')});db['Campaign'][_0x1a0a('0xfc')](db[_0x1a0a('0xe4')],{'as':_0x1a0a('0x1b7'),'through':'campaigns_has_cm_blacklists'});db['MailTransferReport'][_0x1a0a('0x129')](db['MailMessage'],{});db[_0x1a0a('0xdd')][_0x1a0a('0x129')](db['MailInteraction'],{});db[_0x1a0a('0xdd')][_0x1a0a('0x129')](db['MailAccount'],{'foreignKey':_0x1a0a('0x1b8'),'as':_0x1a0a('0x1b9')});db[_0x1a0a('0xdd')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'foreignKey':_0x1a0a('0x1ba'),'as':_0x1a0a('0x1bb')});db[_0x1a0a('0xdd')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'foreignKey':'ToUserId','as':_0x1a0a('0x1bc')});db[_0x1a0a('0xdd')][_0x1a0a('0x129')](db[_0x1a0a('0x10a')],{'foreignKey':_0x1a0a('0x1bd'),'as':'ToQueue'});db['MailTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x113')],{'foreignKey':'ToMailAccountId','as':_0x1a0a('0x1be')});db[_0x1a0a('0x1bf')][_0x1a0a('0x129')](db['ChatMessage'],{});db[_0x1a0a('0x1bf')][_0x1a0a('0x129')](db[_0x1a0a('0x102')],{});db[_0x1a0a('0x1bf')][_0x1a0a('0x129')](db[_0x1a0a('0x56')],{'foreignKey':_0x1a0a('0x1c0'),'as':_0x1a0a('0x1b9')});db[_0x1a0a('0x1bf')][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'foreignKey':_0x1a0a('0x1ba'),'as':_0x1a0a('0x1bb')});db['ChatTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'foreignKey':_0x1a0a('0x1c1'),'as':_0x1a0a('0x1bc')});db[_0x1a0a('0x1bf')][_0x1a0a('0x129')](db[_0x1a0a('0x5d')],{'foreignKey':'ToChatQueueId','as':_0x1a0a('0x1c2')});db[_0x1a0a('0x1bf')][_0x1a0a('0x129')](db[_0x1a0a('0x56')],{'foreignKey':_0x1a0a('0x1c3'),'as':_0x1a0a('0x1be')});db[_0x1a0a('0xe0')][_0x1a0a('0x129')](db[_0x1a0a('0x44')],{});db[_0x1a0a('0xe0')]['belongsTo'](db[_0x1a0a('0xf9')],{});db[_0x1a0a('0xe0')]['belongsTo'](db[_0x1a0a('0x41')],{'foreignKey':_0x1a0a('0x1c4'),'as':_0x1a0a('0x1b9')});db['FaxTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'foreignKey':_0x1a0a('0x1ba'),'as':_0x1a0a('0x1bb')});db['FaxTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x12')],{'foreignKey':_0x1a0a('0x1c1'),'as':_0x1a0a('0x1bc')});db['FaxTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x46')],{'foreignKey':_0x1a0a('0x1c5'),'as':_0x1a0a('0x1c2')});db[_0x1a0a('0xe0')][_0x1a0a('0x129')](db[_0x1a0a('0x41')],{'foreignKey':'ToFaxAccountId','as':'ToAccount'});db[_0x1a0a('0x1c6')]['belongsTo'](db[_0x1a0a('0x54')],{});db['OpenchannelTransferReport']['belongsTo'](db['OpenchannelInteraction'],{});db['OpenchannelTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x50')],{'foreignKey':_0x1a0a('0x1c7'),'as':'FromAccount'});db[_0x1a0a('0x1c6')]['belongsTo'](db[_0x1a0a('0x12')],{'foreignKey':_0x1a0a('0x1ba'),'as':'FromAgent'});db[_0x1a0a('0x1c6')]['belongsTo'](db['User'],{'foreignKey':_0x1a0a('0x1c1'),'as':_0x1a0a('0x1bc')});db[_0x1a0a('0x1c6')][_0x1a0a('0x129')](db[_0x1a0a('0x10e')],{'foreignKey':_0x1a0a('0x1c8'),'as':'ToQueue'});db[_0x1a0a('0x1c6')][_0x1a0a('0x129')](db[_0x1a0a('0x50')],{'foreignKey':'ToOpenchannelAccountId','as':'ToAccount'});db['SmsTransferReport'][_0x1a0a('0x129')](db[_0x1a0a('0x4c')],{});db[_0x1a0a('0xe2')][_0x1a0a('0x129')](db[_0x1a0a('0xf7')],{});db[_0x1a0a('0xe2')][_0x1a0a('0x129')](db['SmsAccount'],{'foreignKey':_0x1a0a('0x1c9'),'as':_0x1a0a('0x1b9')});db['SmsTransferReport'][_0x1a0a('0x129')](db['User'],{'foreignKey':_0x1a0a('0x1ba'),'as':_0x1a0a('0x1bb')});db[_0x1a0a('0xe2')]['belongsTo'](db[_0x1a0a('0x12')],{'foreignKey':'ToUserId','as':'ToAgent'});db[_0x1a0a('0xe2')][_0x1a0a('0x129')](db['SmsQueue'],{'foreignKey':_0x1a0a('0x1ca'),'as':'ToQueue'});db['SmsTransferReport'][_0x1a0a('0x129')](db['SmsAccount'],{'foreignKey':_0x1a0a('0x1cb'),'as':'ToAccount'});db[_0x1a0a('0xe4')]['hasMany'](db['Disposition'],{'as':_0x1a0a('0x152'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0xe4')][_0x1a0a('0xee')](db['CmCustomField'],{'as':_0x1a0a('0x1cc'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0xe4')][_0x1a0a('0xee')](db[_0x1a0a('0x64')],{'as':_0x1a0a('0x174'),'onDelete':_0x1a0a('0xec'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0xe4')][_0x1a0a('0xee')](db['CmHopperFinal'],{'as':'HopperFinals','foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0xe4')][_0x1a0a('0xee')](db['CmHopperHistory'],{'as':'HopperHistory','foreignKey':'ListId'});db[_0x1a0a('0xe4')][_0x1a0a('0xee')](db['ReportAgentPreview'],{'as':_0x1a0a('0x6b'),'foreignKey':_0x1a0a('0x143')});db[_0x1a0a('0xe4')]['belongsToMany'](db[_0x1a0a('0x107')],{'as':'Queues','through':_0x1a0a('0x12e')});db[_0x1a0a('0xe4')][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0xff')});db[_0x1a0a('0x1cd')][_0x1a0a('0xee')](db['VoiceExtension'],{'as':_0x1a0a('0xf3'),'onDelete':_0x1a0a('0x14d')});db['VoicePrefix'][_0x1a0a('0xfc')](db[_0x1a0a('0x12')],{'as':_0x1a0a('0x12f'),'through':_0x1a0a('0x110')});db[_0x1a0a('0xe5')][_0x1a0a('0xee')](db['User'],{'as':_0x1a0a('0x149'),'foreignKey':_0x1a0a('0xfb')});db[_0x1a0a('0xe5')]['hasMany'](db[_0x1a0a('0xe7')],{'as':_0x1a0a('0x1ce'),'foreignKey':_0x1a0a('0xfb'),'onDelete':_0x1a0a('0xec')});db[_0x1a0a('0xe7')][_0x1a0a('0xee')](db[_0x1a0a('0xe9')],{'as':_0x1a0a('0x1cf'),'foreignKey':_0x1a0a('0x1d0'),'onDelete':'cascade'});module[_0x1a0a('0x1d1')]={'db':db,'dbH':dbH};
\ No newline at end of file
+var _0x7ee1=['MailServerIn','MailAccountId','MailServerOut','hasOne','Imap','Smtp','Interactions','Applications','ListId','TemplateId','UserMailQueue','MailInteractionId','Account','Owner','mail_interaction_has_tags','Tags','Users','Attachments','restrict','TagId','List','MailQueueReport','Items','Disposition','FaxAccountId','Answers','Exntensions','FaxInteractionId','fax_interaction_has_tags','ThroughTags','Interaction','Attachment','AttachmentId','team_has_fax_queues','FaxQueueReport','Dispositions','SmsAccountId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','user_has_openchannel_accounts','OpenchannelApplication','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','team_has_openchannel_queues','ChatWebsiteId','ChatProactiveAction','ProactiveActions','OpenchannelQueueReport','Agent','Queue','ChatQueueId','Website','ChatInteractionId','chat_interaction_has_tags','team_has_chat_queues','ChatGroupId','CmCompany','CompanyId','OpenchannelInteractions','Company','cm_contact_has_tags','OwnerId','CampaignId','Automation','OneAll','AutomationAllId','Any','AutomationAnyId','Action','Actions','Intervals','MailApplications','SmsApplications','Schedule','DefaultReportId','CustomReportId','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','AnalyticFieldReport','Fields','MetricId','Configurations','AccountId','Descriptions','FieldId','Subject','SubjectId','DescriptionId','Field','VariableId','Subjects','Description','int_desk_configuration_has_tags','int_zendesk_configuration_has_tags','int_freshdesk_configuration_has_tags','int_vtiger_configuration_has_tags','FromId','SessionId','ProjectId','JscriptyProject','team_has_mail_queues','TrunkBackupId','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','FromMailAccountId','FromAccount','FromUserId','FromAgent','ToUserId','ToAgent','ToMailQueueId','ToQueue','ToAccount','FromChatWebsiteId','ChatTransferReport','ToChatQueueId','ToChatWebsiteId','ToFaxQueueId','ToFaxAccountId','OpenchannelTransferReport','FromOpenchannelAccountId','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','CustomFields','Queues','voice_queues_has_cm_lists','UserProfileSection','UserProfileSections','Resources','sectionId','exports','path','jstz','determine','sequelize','motion2','xcall','xC@LL1234','mysql','utf8mb4','utf8','sequelizeHistory','defaultsDeep','127.0.0.1','name','utf8_general_ci','database','username','password','options','import','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceExtension','VoiceMusicOnHold','VoiceQueue','../api/voiceQueue/voiceQueue.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','ScreenRecording','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','VoiceQueueReport','MemberReport','../api/memberReport/memberReport.model','../api/trunk/trunk.model','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','UserChatQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','../api/userSmsQueue/userSmsQueue.model','../api/userOpenchannelQueue/userOpenchannelQueue.model','../api/mailServerOut/mailServerOut.model','MailAccount','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','MailInteraction','../api/mailInteraction/mailInteraction.model','MailMessage','../api/mailMessage/mailMessage.model','MailApplication','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','../api/smsAccount/smsAccount.model','SmsApplication','SmsInteraction','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','../api/openchannelAccount/openchannelAccount.model','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','ChatMessage','../api/chatMessage/chatMessage.model','ChatOfflineMessage','ChatQueue','../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','../api/cmContact/cmContact.model','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','../api/reportAgentPreview/reportAgentPreview.model','CmCustomField','../api/cmCustomField/cmCustomField.model','../api/action/action.model','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','Condition','../api/condition/condition.model','Interval','../api/interval/interval.model','../api/pause/pause.model','Cdr','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','Sound','Tag','../api/tag/tag.model','Template','../api/template/template.model','Trigger','../api/trigger/trigger.model','Variable','../api/variable/variable.model','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','SalesforceField','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intZendeskField/intZendeskField.model','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','Setting','../api/setting/setting.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','../api/squareProject/squareProject.model','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','License','../api/license/license.model','Campaign','../api/campaign/campaign.model','Migration','../api/migration/migration.model','../api/attachment/attachment.model','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','CmList','VoicePrefix','../api/userProfile/userProfile.model','UserProfileResource','User','VoiceMail','cascade','UserId','hasMany','Recordings','VoiceQueuesRt','Extensions','HopperFinals','HopperHistory','ChatInteractions','SmsInteractions','FaxInteractions','belongsTo','UserProfile','userProfileId','belongsToMany','Groups','chat_group_has_users','CmContact','Contacts','cm_user_has_contacts','Lists','cm_user_has_lists','user_has_teams','MailInteractions','user_has_mail_interactions','user_has_chat_interactions','user_has_sms_interactions','user_has_openchannel_interactions','VoiceQueues','MailQueues','ChatQueues','FaxQueues','SmsQueues','UserSmsQueue','OpenchannelQueues','UserOpenchannelQueue','VoicePrefixes','user_has_voice_prefixes','user_has_chat_websites','FaxAccounts','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccount','OpenchannelAccounts','SmsAccount','SmsAccounts','user_has_sms_accounts','SquareProjects','SpiedAgents','ChanSpyId','Sounds','moh_has_sounds','Members','VoiceQueueId','Hoppers','HopperHistories','JscriptySessions','TrunkId','Trunk','TrunkBackup','IntervalId','Pause','mandatoryDispositionPause','mandatoryDispositionPauseId','Agents','Teams','team_has_voice_queues','BlackLists','voice_queues_has_cm_blacklists','Messages','mailbox','mailboxuser','QueueCalls','AgentReports','uniqueid','Contact','ContactId'];(function(_0x47af7d,_0x5e56a2){var _0x277ed3=function(_0xbea742){while(--_0xbea742){_0x47af7d['push'](_0x47af7d['shift']());}};_0x277ed3(++_0x5e56a2);}(_0x7ee1,0x8d));var _0x17ee=function(_0x1c4cbc,_0x2cfb1e){_0x1c4cbc=_0x1c4cbc-0x0;var _0x2659fe=_0x7ee1[_0x1c4cbc];return _0x2659fe;};'use strict';var path=require(_0x17ee('0x0'));var config=require('../config/environment');var Sequelize=require('sequelize');var _=require('lodash');var jstz=require(_0x17ee('0x1'));var timezone=jstz[_0x17ee('0x2')]();config[_0x17ee('0x3')]=_['defaultsDeep'](config[_0x17ee('0x3')],{'database':_0x17ee('0x4'),'username':_0x17ee('0x5'),'password':_0x17ee('0x6'),'options':{'host':'127.0.0.1','port':0xcea,'dialect':_0x17ee('0x7'),'dialectOptions':{'charset':_0x17ee('0x8')},'logging':![],'timezone':timezone['name'](),'define':{'charset':_0x17ee('0x9'),'collate':'utf8_general_ci'}}});config[_0x17ee('0xa')]=_[_0x17ee('0xb')](config[_0x17ee('0xa')],{'database':'motion2','username':'xcall','password':'xC@LL1234','options':{'host':_0x17ee('0xc'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0x17ee('0x8')},'logging':![],'timezone':timezone[_0x17ee('0xd')](),'define':{'charset':_0x17ee('0x9'),'collate':_0x17ee('0xe')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize'][_0x17ee('0xf')],config['sequelize'][_0x17ee('0x10')],config[_0x17ee('0x3')][_0x17ee('0x11')],config[_0x17ee('0x3')][_0x17ee('0x12')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x17ee('0xa')][_0x17ee('0xf')],config[_0x17ee('0xa')][_0x17ee('0x10')],config[_0x17ee('0xa')][_0x17ee('0x11')],config['sequelizeHistory']['options'])};db['User']=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x14'));db[_0x17ee('0x15')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x16'));db[_0x17ee('0x17')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x18'));db[_0x17ee('0x19')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/voiceExtension/voiceExtension.model');db[_0x17ee('0x1a')]=db['sequelize'][_0x17ee('0x13')]('../api/voiceMusicOnHold/voiceMusicOnHold.model');db[_0x17ee('0x1b')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x1c'));db[_0x17ee('0x1d')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x1e'));db[_0x17ee('0x1f')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/screenRecording/screenRecording.model');db['VoiceMail']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x20'));db[_0x17ee('0x21')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x22'));db[_0x17ee('0x23')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x24'));db[_0x17ee('0x25')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x26'));db[_0x17ee('0x27')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/voiceAgentReport/voiceAgentReport.model');db[_0x17ee('0x28')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/voiceQueueReport/voiceQueueReport.model');db[_0x17ee('0x29')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x2a'));db['Trunk']=db[_0x17ee('0x3')]['import'](_0x17ee('0x2b'));db[_0x17ee('0x2c')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x2d'));db[_0x17ee('0x2e')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x2f'));db[_0x17ee('0x30')]=db['sequelize']['import'](_0x17ee('0x31'));db[_0x17ee('0x32')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/userChatQueue/userChatQueue.model');db['UserMailQueue']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x33'));db[_0x17ee('0x34')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x35'));db['UserSmsQueue']=db['sequelize']['import'](_0x17ee('0x36'));db['UserOpenchannelQueue']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x37'));db['MailServerIn']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/mailServerIn/mailServerIn.model');db['MailServerOut']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x38'));db[_0x17ee('0x39')]=db[_0x17ee('0x3')]['import']('../api/mailAccount/mailAccount.model');db[_0x17ee('0x3a')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x3b'));db[_0x17ee('0x3c')]=db[_0x17ee('0x3')]['import']('../api/mailSubstatus/mailSubstatus.model');db[_0x17ee('0x3d')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x3e'));db[_0x17ee('0x3f')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x40'));db[_0x17ee('0x41')]=db[_0x17ee('0x3')]['import']('../api/mailApplication/mailApplication.model');db['MailQueueReport']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x42'));db[_0x17ee('0x43')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x44'));db[_0x17ee('0x45')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x46'));db[_0x17ee('0x47')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x48'));db[_0x17ee('0x49')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/faxApplication/faxApplication.model');db[_0x17ee('0x4a')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x4b'));db[_0x17ee('0x4c')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x4d'));db[_0x17ee('0x4e')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x4f'));db['FaxQueueReport']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/faxQueueReport/faxQueueReport.model');db['SmsAccount']=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x50'));db[_0x17ee('0x51')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/smsApplication/smsApplication.model');db[_0x17ee('0x52')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x53'));db[_0x17ee('0x54')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x55'));db[_0x17ee('0x56')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x57'));db['OpenchannelAccount']=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x58'));db['OpenchannelApplication']=db['sequelize'][_0x17ee('0x13')]('../api/openchannelApplication/openchannelApplication.model');db[_0x17ee('0x59')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x5a'));db[_0x17ee('0x5b')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x5c'));db[_0x17ee('0x5d')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x5e'));db[_0x17ee('0x5f')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x60'));db['OpenchannelQueueReport']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/openchannelQueueReport/openchannelQueueReport.model');db[_0x17ee('0x61')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x62'));db[_0x17ee('0x63')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/chatInteraction/chatInteraction.model');db[_0x17ee('0x64')]=db['sequelize']['import'](_0x17ee('0x65'));db[_0x17ee('0x66')]=db[_0x17ee('0x3')]['import']('../api/chatOfflineMessage/chatOfflineMessage.model');db[_0x17ee('0x67')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x68'));db[_0x17ee('0x69')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x6a'));db['ChatProactiveAction']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/chatProactiveAction/chatProactiveAction.model');db['CmCompany']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/cmCompany/cmCompany.model');db['CmContact']=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x6b'));db[_0x17ee('0x6c')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x6d'));db[_0x17ee('0x6e')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x6f'));db[_0x17ee('0x70')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x71'));db[_0x17ee('0x72')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x73'));db[_0x17ee('0x74')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x75'));db[_0x17ee('0x76')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x77'));db['Action']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x78'));db['Automation']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x79'));db[_0x17ee('0x7a')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x7b'));db['Disposition']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x7c'));db[_0x17ee('0x7d')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x7e'));db[_0x17ee('0x7f')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x80'));db['Pause']=db[_0x17ee('0x3')]['import'](_0x17ee('0x81'));db[_0x17ee('0x82')]=db[_0x17ee('0x3')]['import']('../api/cdr/cdr.model');db[_0x17ee('0x83')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x84'));db['Schedule']=db[_0x17ee('0x3')]['import']('../api/schedule/schedule.model');db[_0x17ee('0x85')]=db[_0x17ee('0x3')]['import']('../api/sound/sound.model');db[_0x17ee('0x86')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x87'));db[_0x17ee('0x88')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x89'));db[_0x17ee('0x8a')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x8b'));db[_0x17ee('0x8c')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x8d'));db[_0x17ee('0x8e')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x8f'));db[_0x17ee('0x90')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x91'));db[_0x17ee('0x92')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x93'));db[_0x17ee('0x94')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0x95'));db['AnalyticExtractedReport']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x96'));db[_0x17ee('0x97')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/analyticMetric/analyticMetric.model');db['AnalyticFieldReport']=db[_0x17ee('0x3')]['import'](_0x17ee('0x98'));db[_0x17ee('0x99')]=db['sequelize']['import'](_0x17ee('0x9a'));db[_0x17ee('0x9b')]=db[_0x17ee('0x3')]['import'](_0x17ee('0x9c'));db[_0x17ee('0x9d')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/intSalesforceConfiguration/intSalesforceConfiguration.model');db[_0x17ee('0x9e')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x9f'));db[_0x17ee('0xa0')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xa1'));db[_0x17ee('0xa2')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model');db[_0x17ee('0xa3')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xa4'));db[_0x17ee('0xa5')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/intDeskAccount/intDeskAccount.model');db[_0x17ee('0xa6')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xa7'));db[_0x17ee('0xa8')]=db[_0x17ee('0x3')]['import'](_0x17ee('0xa9'));db[_0x17ee('0xaa')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xab'));db[_0x17ee('0xac')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xad'));db[_0x17ee('0xae')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xaf'));db[_0x17ee('0xb0')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xb1'));db[_0x17ee('0xb2')]=db[_0x17ee('0x3')]['import'](_0x17ee('0xb3'));db[_0x17ee('0xb4')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xb5'));db[_0x17ee('0xb6')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xb7'));db[_0x17ee('0xb8')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xb9'));db[_0x17ee('0xba')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xbb'));db[_0x17ee('0xbc')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xbd'));db[_0x17ee('0xbe')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/intVtigerConfiguration/intVtigerConfiguration.model');db[_0x17ee('0xbf')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xc0'));db[_0x17ee('0xc1')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xc2'));db[_0x17ee('0xc3')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xc4'));db[_0x17ee('0xc5')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/intServicenowField/intServicenowField.model');db[_0x17ee('0xc6')]=db[_0x17ee('0x3')]['import'](_0x17ee('0xc7'));db[_0x17ee('0xc8')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/intDynamics365Configuration/intDynamics365Configuration.model');db[_0x17ee('0xc9')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xca'));db[_0x17ee('0x8e')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0x8f'));db['Network']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xcb'));db[_0x17ee('0xcc')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xcd'));db[_0x17ee('0xce')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xcf'));db[_0x17ee('0xd0')]=db[_0x17ee('0x3')]['import']('../api/jscriptyAnswerReport/jscriptyAnswerReport.model');db[_0x17ee('0xd1')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xd2'));db[_0x17ee('0xd3')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xd4'));db[_0x17ee('0xd5')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xd6'));db[_0x17ee('0xd7')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xd8'));db[_0x17ee('0xd9')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xda'));db['JscriptyProject']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/jscriptyProject/jscriptyProject.model');db[_0x17ee('0xdb')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xdc'));db[_0x17ee('0xdd')]=db[_0x17ee('0x3')]['import'](_0x17ee('0xde'));db[_0x17ee('0xdf')]=db[_0x17ee('0x3')]['import'](_0x17ee('0xe0'));db['SquareRecording']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xe1'));db[_0x17ee('0xe2')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xe3'));db[_0x17ee('0xe4')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/team/team.model');db[_0x17ee('0xe5')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xe6'));db[_0x17ee('0xe7')]=db['sequelize']['import'](_0x17ee('0xe8'));db[_0x17ee('0xe9')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xea'));db['Attachment']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xeb'));db['Plugin']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xec'));db[_0x17ee('0xed')]=db[_0x17ee('0x3')]['import'](_0x17ee('0xee'));db['ChatTransferReport']=db['sequelize']['import']('../api/chatTransferReport/chatTransferReport.model');db[_0x17ee('0xef')]=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xf0'));db['OpenchannelTransferReport']=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xf1'));db[_0x17ee('0xf2')]=db[_0x17ee('0x3')][_0x17ee('0x13')](_0x17ee('0xf3'));db[_0x17ee('0xf4')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/cmList/cmList.model');db[_0x17ee('0xf5')]=db[_0x17ee('0x3')]['import']('../api/voicePrefix/voicePrefix.model');db['UserProfile']=db['sequelize'][_0x17ee('0x13')](_0x17ee('0xf6'));db['UserProfileSection']=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/userProfileSection/userProfileSection.model');db[_0x17ee('0xf7')]=db[_0x17ee('0x3')][_0x17ee('0x13')]('../api/userProfileResource/userProfileResource.model');db[_0x17ee('0xf8')]['hasOne'](db[_0x17ee('0xf9')],{'as':_0x17ee('0xf9'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db[_0x17ee('0x1d')],{'as':_0x17ee('0xfd'),'foreignKey':'UserId'});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db[_0x17ee('0x2e')],{'as':_0x17ee('0xfe'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0xf8')]['hasMany'](db[_0x17ee('0x19')],{'as':_0x17ee('0xff'),'onDelete':_0x17ee('0xfa'),'hooks':!![]});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db['CmHopperFinal'],{'as':_0x17ee('0x100'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db[_0x17ee('0x72')],{'as':_0x17ee('0x101'),'foreignKey':'UserId'});db['User']['hasMany'](db[_0x17ee('0x74')],{'as':'ReportAgentPreview','foreignKey':_0x17ee('0xfb')});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db[_0x17ee('0x59')],{'as':'OpenchannelInteractions','foreignKey':'UserId'});db[_0x17ee('0xf8')]['hasMany'](db['ChatInteraction'],{'as':_0x17ee('0x102'),'foreignKey':'UserId'});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db['SmsInteraction'],{'as':_0x17ee('0x103'),'foreignKey':'UserId'});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db[_0x17ee('0x4a')],{'as':_0x17ee('0x104'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0xf8')][_0x17ee('0xfc')](db[_0x17ee('0x3d')],{'as':'MailInteractions','foreignKey':_0x17ee('0xfb')});db[_0x17ee('0xf8')][_0x17ee('0x105')](db[_0x17ee('0x106')],{'as':_0x17ee('0x106'),'foreignKey':_0x17ee('0x107')});db['User'][_0x17ee('0x108')](db[_0x17ee('0x69')],{'as':_0x17ee('0x109'),'through':_0x17ee('0x10a')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x10b')],{'as':_0x17ee('0x10c'),'through':_0x17ee('0x10d')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x10e'),'through':_0x17ee('0x10f')});db['User'][_0x17ee('0x108')](db[_0x17ee('0xe4')],{'through':_0x17ee('0x110')});db[_0x17ee('0xf8')]['belongsToMany'](db[_0x17ee('0x3d')],{'as':_0x17ee('0x111'),'through':_0x17ee('0x112')});db[_0x17ee('0xf8')]['belongsToMany'](db[_0x17ee('0x63')],{'as':_0x17ee('0x102'),'through':_0x17ee('0x113')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x4a')],{'as':_0x17ee('0x104'),'through':'user_has_fax_interactions'});db['User'][_0x17ee('0x108')](db[_0x17ee('0x52')],{'as':'SmsInteractions','through':_0x17ee('0x114')});db[_0x17ee('0xf8')]['belongsToMany'](db[_0x17ee('0x59')],{'as':'OpenchannelInteractions','through':_0x17ee('0x115')});db['User'][_0x17ee('0x108')](db[_0x17ee('0x1b')],{'as':_0x17ee('0x116'),'through':'UserVoiceQueue','required':![]});db[_0x17ee('0xf8')]['belongsToMany'](db[_0x17ee('0x3a')],{'as':_0x17ee('0x117'),'through':'UserMailQueue','required':![]});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x67')],{'as':_0x17ee('0x118'),'through':'UserChatQueue','required':![],'hooks':!![]});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x4e')],{'as':_0x17ee('0x119'),'through':_0x17ee('0x34'),'required':![]});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x56')],{'as':_0x17ee('0x11a'),'through':_0x17ee('0x11b'),'required':![]});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x5d')],{'as':_0x17ee('0x11c'),'through':_0x17ee('0x11d'),'required':![]});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0xf4')],{'through':_0x17ee('0x10f')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0xf5')],{'as':_0x17ee('0x11e'),'through':_0x17ee('0x11f'),'required':![]});db['User'][_0x17ee('0x108')](db[_0x17ee('0x5f')],{'as':'ChatWebsites','through':_0x17ee('0x120')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db['FaxAccount'],{'as':_0x17ee('0x121'),'through':_0x17ee('0x122')});db[_0x17ee('0xf8')]['belongsToMany'](db[_0x17ee('0x39')],{'as':_0x17ee('0x123'),'through':_0x17ee('0x124')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0x125')],{'as':_0x17ee('0x126'),'through':'user_has_openchannel_accounts'});db[_0x17ee('0xf8')]['belongsToMany'](db[_0x17ee('0x127')],{'as':_0x17ee('0x128'),'through':_0x17ee('0x129')});db[_0x17ee('0xf8')][_0x17ee('0x108')](db[_0x17ee('0xdf')],{'as':_0x17ee('0x12a'),'through':'user_has_square_projects'});db[_0x17ee('0x15')]['hasMany'](db[_0x17ee('0x19')],{'as':_0x17ee('0x12b'),'onDelete':'cascade','foreignKey':_0x17ee('0x12c')});db['VoiceContext']['hasMany'](db[_0x17ee('0x19')],{'onDelete':_0x17ee('0xfa')});db['VoiceExtension'][_0x17ee('0xfc')](db['VoiceExtension'],{'as':'Applications','onDelete':'cascade'});db[_0x17ee('0x1a')][_0x17ee('0x108')](db[_0x17ee('0x85')],{'as':_0x17ee('0x12d'),'through':_0x17ee('0x12e')});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0x2e')],{'as':_0x17ee('0x12f'),'foreignKey':_0x17ee('0x130')});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0x6c')],{'as':_0x17ee('0x131'),'foreignKey':_0x17ee('0x130')});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0x70')],{'as':'HopperFinals','foreignKey':'VoiceQueueId'});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0x72')],{'as':_0x17ee('0x132'),'foreignKey':_0x17ee('0x130')});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0x74')],{'as':_0x17ee('0x74'),'foreignKey':_0x17ee('0x130')});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0x6e')],{'as':'HopperBlacks','foreignKey':_0x17ee('0x130')});db[_0x17ee('0x1b')][_0x17ee('0xfc')](db[_0x17ee('0xd3')],{'as':_0x17ee('0x133'),'foreignKey':'VoiceQueueId'});db[_0x17ee('0x1b')][_0x17ee('0x105')](db['Trunk'],{'as':'Trunk','foreignKey':_0x17ee('0x134')});db[_0x17ee('0x1b')]['belongsTo'](db[_0x17ee('0x135')],{'as':_0x17ee('0x136'),'foreignKey':'TrunkBackupId'});db['VoiceQueue']['belongsTo'](db[_0x17ee('0x7f')],{'as':_0x17ee('0x7f'),'foreignKey':_0x17ee('0x137')});db[_0x17ee('0x1b')][_0x17ee('0x105')](db[_0x17ee('0x138')],{'as':_0x17ee('0x139'),'foreignKey':_0x17ee('0x13a')});db[_0x17ee('0x1b')][_0x17ee('0x108')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x10e'),'through':'voice_queues_has_cm_lists'});db[_0x17ee('0x1b')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x13b'),'through':'UserVoiceQueue'});db[_0x17ee('0x1b')][_0x17ee('0x108')](db[_0x17ee('0xe4')],{'as':_0x17ee('0x13c'),'through':_0x17ee('0x13d')});db['VoiceQueue']['belongsToMany'](db[_0x17ee('0xf4')],{'as':_0x17ee('0x13e'),'through':_0x17ee('0x13f')});db[_0x17ee('0x1d')][_0x17ee('0x105')](db['User'],{'as':_0x17ee('0xf8'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0x1f')]['belongsTo'](db[_0x17ee('0xf8')],{'as':'User','foreignKey':'UserId'});db[_0x17ee('0xf9')]['hasMany'](db[_0x17ee('0x21')],{'as':_0x17ee('0x140'),'onDelete':'cascade','foreignKey':'mailboxuser','sourceKey':_0x17ee('0x141')});db[_0x17ee('0x21')][_0x17ee('0x105')](db[_0x17ee('0xf9')],{'foreignKey':_0x17ee('0x142'),'targetKey':_0x17ee('0x141')});db[_0x17ee('0x23')][_0x17ee('0xfc')](db['VoiceQueueReport'],{'as':_0x17ee('0x143'),'foreignKey':'uniqueid','constraints':![]});db[_0x17ee('0x23')][_0x17ee('0xfc')](db[_0x17ee('0x27')],{'as':_0x17ee('0x144'),'foreignKey':_0x17ee('0x145'),'constraints':![]});db[_0x17ee('0x23')]['belongsTo'](db['User'],{'as':'User','foreignKey':'UserId'});db[_0x17ee('0x23')][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x148')][_0x17ee('0x105')](db['MailAccount'],{'as':_0x17ee('0x39'),'foreignKey':_0x17ee('0x149')});db[_0x17ee('0x14a')][_0x17ee('0x105')](db['MailAccount'],{'as':_0x17ee('0x39'),'foreignKey':'MailAccountId'});db['MailAccount'][_0x17ee('0x14b')](db[_0x17ee('0x148')],{'as':_0x17ee('0x14c'),'onDelete':'cascade'});db['MailAccount']['hasOne'](db[_0x17ee('0x14a')],{'as':_0x17ee('0x14d'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x39')]['hasMany'](db['Disposition'],{'as':'Dispositions','foreignKey':_0x17ee('0x149')});db[_0x17ee('0x39')][_0x17ee('0xfc')](db[_0x17ee('0x7a')],{'as':'Answers','foreignKey':_0x17ee('0x149')});db[_0x17ee('0x39')]['hasMany'](db['MailMessage'],{'as':_0x17ee('0x140'),'foreignKey':_0x17ee('0x149')});db[_0x17ee('0x39')][_0x17ee('0xfc')](db['MailInteraction'],{'as':_0x17ee('0x14e')});db[_0x17ee('0x39')][_0x17ee('0xfc')](db[_0x17ee('0x41')],{'as':_0x17ee('0x14f')});db['MailAccount'][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':'List','foreignKey':_0x17ee('0x150')});db[_0x17ee('0x39')][_0x17ee('0x105')](db['Template'],{'as':_0x17ee('0x88'),'foreignKey':_0x17ee('0x151')});db[_0x17ee('0x39')][_0x17ee('0x105')](db[_0x17ee('0x138')],{'as':_0x17ee('0x139'),'foreignKey':_0x17ee('0x13a')});db[_0x17ee('0x39')]['belongsToMany'](db[_0x17ee('0xf8')],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x124')});db[_0x17ee('0x3a')][_0x17ee('0x108')](db['User'],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x152')});db[_0x17ee('0x3a')]['belongsToMany'](db[_0x17ee('0xe4')],{'through':'team_has_mail_queues','as':_0x17ee('0x13c')});db[_0x17ee('0x3d')]['hasMany'](db[_0x17ee('0x3f')],{'as':_0x17ee('0x140'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x153')});db[_0x17ee('0x3d')][_0x17ee('0x105')](db[_0x17ee('0x39')],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x149')});db[_0x17ee('0x3d')][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'as':'Contact','foreignKey':'ContactId'});db[_0x17ee('0x3d')][_0x17ee('0x105')](db['User'],{'as':_0x17ee('0x155'),'foreignKey':_0x17ee('0xfb')});db['MailInteraction']['belongsToMany'](db['Tag'],{'through':_0x17ee('0x156'),'as':_0x17ee('0x157')});db['MailInteraction'][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x156'),'as':'ThroughTags'});db[_0x17ee('0x3d')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x158'),'through':_0x17ee('0x112'),'foreignKey':'MailInteractionId'});db['MailMessage'][_0x17ee('0xfc')](db['Attachment'],{'as':_0x17ee('0x159'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x3f')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'as':_0x17ee('0xf8')});db[_0x17ee('0x3f')]['belongsTo'](db[_0x17ee('0x10b')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x146')});db[_0x17ee('0x3f')][_0x17ee('0x105')](db[_0x17ee('0x3d')],{'as':'Interaction','foreignKey':_0x17ee('0x153')});db[_0x17ee('0x3f')][_0x17ee('0x105')](db['MailAccount'],{'as':_0x17ee('0x154'),'foreignKey':'MailAccountId'});db[_0x17ee('0x41')]['belongsTo'](db[_0x17ee('0xf8')],{'onDelete':'restrict'});db[_0x17ee('0x41')][_0x17ee('0x105')](db[_0x17ee('0x3a')],{'onDelete':_0x17ee('0x15a')});db['MailApplication']['belongsTo'](db[_0x17ee('0x39')],{'onDelete':'restrict'});db[_0x17ee('0x41')][_0x17ee('0x105')](db[_0x17ee('0x7f')],{'onDelete':'restrict','foreignKey':_0x17ee('0x137')});db['MailApplication'][_0x17ee('0x105')](db[_0x17ee('0x86')],{'onDelete':_0x17ee('0x15a'),'foreignKey':_0x17ee('0x15b')});db['MailQueueReport'][_0x17ee('0x105')](db[_0x17ee('0x39')],{});db['MailQueueReport'][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150')});db[_0x17ee('0x15d')][_0x17ee('0x105')](db['CmContact'],{'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x15d')][_0x17ee('0x105')](db[_0x17ee('0x3d')],{});db[_0x17ee('0x15d')][_0x17ee('0x105')](db[_0x17ee('0x3f')],{});db[_0x17ee('0x15d')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{});db[_0x17ee('0x15d')]['belongsTo'](db[_0x17ee('0x3a')],{});db[_0x17ee('0x43')][_0x17ee('0xfc')](db[_0x17ee('0x45')],{'as':_0x17ee('0x15e'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x47')][_0x17ee('0xfc')](db[_0x17ee('0x15f')],{'as':'Dispositions','foreignKey':_0x17ee('0x160')});db[_0x17ee('0x47')][_0x17ee('0xfc')](db['CannedAnswer'],{'as':_0x17ee('0x161'),'foreignKey':_0x17ee('0x160')});db[_0x17ee('0x47')]['hasMany'](db['FaxInteraction'],{'as':_0x17ee('0x14e')});db['FaxAccount'][_0x17ee('0xfc')](db[_0x17ee('0x49')],{'as':_0x17ee('0x14f')});db[_0x17ee('0x47')]['hasMany'](db[_0x17ee('0x19')],{'as':_0x17ee('0x162'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x47')]['hasMany'](db[_0x17ee('0x4c')],{'as':_0x17ee('0x140')});db[_0x17ee('0x47')][_0x17ee('0x105')](db[_0x17ee('0x135')],{'as':_0x17ee('0x135')});db[_0x17ee('0x47')][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150')});db['FaxAccount'][_0x17ee('0x105')](db[_0x17ee('0x138')],{'as':_0x17ee('0x139'),'foreignKey':_0x17ee('0x13a')});db[_0x17ee('0x47')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x122')});db[_0x17ee('0x49')]['belongsTo'](db[_0x17ee('0xf8')],{'onDelete':'restrict'});db[_0x17ee('0x49')][_0x17ee('0x105')](db[_0x17ee('0x4e')],{'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x49')][_0x17ee('0x105')](db['FaxAccount'],{'onDelete':_0x17ee('0x15a')});db['FaxApplication'][_0x17ee('0x105')](db[_0x17ee('0x86')],{'onDelete':_0x17ee('0x15a'),'foreignKey':_0x17ee('0x15b')});db[_0x17ee('0x4a')][_0x17ee('0xfc')](db[_0x17ee('0x4c')],{'as':_0x17ee('0x140'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x163')});db['FaxInteraction']['belongsTo'](db[_0x17ee('0x47')],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x160')});db[_0x17ee('0x4a')]['belongsTo'](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x4a')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x155'),'foreignKey':_0x17ee('0xfb')});db['FaxInteraction'][_0x17ee('0x108')](db['Tag'],{'through':_0x17ee('0x164'),'as':_0x17ee('0x157')});db[_0x17ee('0x4a')][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x164'),'as':_0x17ee('0x165')});db[_0x17ee('0x4a')]['belongsToMany'](db[_0x17ee('0xf8')],{'as':'Users','through':'user_has_fax_interactions','foreignKey':_0x17ee('0x163')});db[_0x17ee('0x4c')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'onDelete':'cascade','as':_0x17ee('0xf8')});db[_0x17ee('0x4c')][_0x17ee('0x105')](db[_0x17ee('0x4a')],{'as':_0x17ee('0x166'),'foreignKey':_0x17ee('0x163')});db[_0x17ee('0x4c')][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x146')});db['FaxMessage'][_0x17ee('0x105')](db[_0x17ee('0x167')],{'as':_0x17ee('0x167'),'foreignKey':_0x17ee('0x168')});db['FaxMessage']['belongsTo'](db['FaxAccount'],{'as':'Account','foreignKey':'FaxAccountId'});db['FaxQueue'][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x34')});db['FaxQueue'][_0x17ee('0x108')](db[_0x17ee('0xe4')],{'through':_0x17ee('0x169'),'as':_0x17ee('0x13c')});db['FaxQueueReport'][_0x17ee('0x105')](db['FaxAccount'],{});db[_0x17ee('0x16a')][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150')});db[_0x17ee('0x16a')]['belongsTo'](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x16a')][_0x17ee('0x105')](db[_0x17ee('0x4a')],{});db[_0x17ee('0x16a')][_0x17ee('0x105')](db[_0x17ee('0x4c')],{});db[_0x17ee('0x16a')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{});db[_0x17ee('0x16a')]['belongsTo'](db[_0x17ee('0x4e')],{});db['SmsAccount'][_0x17ee('0xfc')](db[_0x17ee('0x15f')],{'as':_0x17ee('0x16b'),'foreignKey':_0x17ee('0x16c')});db['SmsAccount'][_0x17ee('0xfc')](db['CannedAnswer'],{'as':'Answers','foreignKey':'SmsAccountId'});db['SmsAccount']['hasMany'](db[_0x17ee('0x54')],{'as':_0x17ee('0x140'),'foreignKey':_0x17ee('0x16c')});db[_0x17ee('0x127')][_0x17ee('0xfc')](db[_0x17ee('0x52')],{'as':_0x17ee('0x14e')});db[_0x17ee('0x127')][_0x17ee('0xfc')](db[_0x17ee('0x51')],{'as':_0x17ee('0x14f')});db['SmsAccount'][_0x17ee('0x105')](db['CmList'],{'as':'List','foreignKey':'ListId'});db['SmsAccount'][_0x17ee('0x105')](db[_0x17ee('0x138')],{'as':_0x17ee('0x139'),'foreignKey':_0x17ee('0x13a')});db[_0x17ee('0x127')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':'Agents','through':'user_has_sms_accounts'});db['SmsApplication'][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x51')][_0x17ee('0x105')](db[_0x17ee('0x56')],{'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x51')][_0x17ee('0x105')](db[_0x17ee('0x127')],{'onDelete':'restrict'});db[_0x17ee('0x51')][_0x17ee('0x105')](db[_0x17ee('0x7f')],{'onDelete':_0x17ee('0x15a'),'foreignKey':_0x17ee('0x137')});db['SmsApplication'][_0x17ee('0x105')](db[_0x17ee('0x86')],{'onDelete':_0x17ee('0x15a'),'foreignKey':_0x17ee('0x15b')});db[_0x17ee('0x52')]['hasMany'](db[_0x17ee('0x54')],{'as':_0x17ee('0x140'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x16d')});db[_0x17ee('0x52')][_0x17ee('0x105')](db[_0x17ee('0x127')],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x16c')});db[_0x17ee('0x52')][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db['SmsInteraction']['belongsTo'](db[_0x17ee('0xf8')],{'as':_0x17ee('0x155'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0x52')]['belongsToMany'](db[_0x17ee('0x86')],{'through':_0x17ee('0x16e'),'as':'Tags'});db['SmsInteraction'][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x16e'),'as':_0x17ee('0x165')});db[_0x17ee('0x52')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x158'),'through':'user_has_sms_interactions','foreignKey':_0x17ee('0x16d')});db[_0x17ee('0x54')][_0x17ee('0x105')](db['User'],{'as':'User'});db[_0x17ee('0x54')]['belongsTo'](db[_0x17ee('0x10b')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x146')});db[_0x17ee('0x54')][_0x17ee('0x105')](db[_0x17ee('0x52')],{'onDelete':'cascade','as':_0x17ee('0x166'),'foreignKey':_0x17ee('0x16d')});db['SmsMessage'][_0x17ee('0x105')](db['SmsAccount'],{'as':'Account','foreignKey':_0x17ee('0x16c')});db['SmsQueue'][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x13b'),'through':'UserSmsQueue','foreignKey':_0x17ee('0x16f')});db['SmsQueue'][_0x17ee('0x108')](db[_0x17ee('0xe4')],{'through':_0x17ee('0x170'),'as':'Teams'});db[_0x17ee('0x125')]['hasMany'](db['Disposition'],{'as':'Dispositions','foreignKey':_0x17ee('0x171')});db[_0x17ee('0x125')][_0x17ee('0xfc')](db[_0x17ee('0x7a')],{'as':_0x17ee('0x161'),'foreignKey':_0x17ee('0x171')});db[_0x17ee('0x125')][_0x17ee('0xfc')](db[_0x17ee('0x59')],{'as':_0x17ee('0x14e'),'foreignKey':'OpenchannelAccountId'});db[_0x17ee('0x125')][_0x17ee('0xfc')](db['OpenchannelMessage'],{'as':_0x17ee('0x140'),'foreignKey':_0x17ee('0x171')});db['OpenchannelAccount'][_0x17ee('0xfc')](db['OpenchannelApplication'],{'as':_0x17ee('0x14f'),'foreignKey':_0x17ee('0x171')});db['OpenchannelAccount'][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150')});db[_0x17ee('0x125')][_0x17ee('0x105')](db[_0x17ee('0x138')],{'as':_0x17ee('0x139'),'foreignKey':_0x17ee('0x13a')});db[_0x17ee('0x125')][_0x17ee('0x108')](db['User'],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x172')});db[_0x17ee('0x173')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x173')][_0x17ee('0x105')](db[_0x17ee('0x5d')],{'onDelete':_0x17ee('0x15a'),'foreignKey':_0x17ee('0x174')});db[_0x17ee('0x173')][_0x17ee('0x105')](db[_0x17ee('0x125')],{'onDelete':_0x17ee('0x15a'),'foreignKey':'OpenchannelAccountId'});db[_0x17ee('0x173')]['belongsTo'](db['Interval'],{'onDelete':_0x17ee('0x15a'),'foreignKey':'IntervalId'});db['OpenchannelApplication'][_0x17ee('0x105')](db[_0x17ee('0x86')],{'onDelete':'restrict','foreignKey':_0x17ee('0x15b')});db[_0x17ee('0x59')][_0x17ee('0xfc')](db[_0x17ee('0x5b')],{'as':_0x17ee('0x140'),'onDelete':'cascade','foreignKey':_0x17ee('0x175')});db[_0x17ee('0x59')]['belongsTo'](db['OpenchannelAccount'],{'as':'Account','foreignKey':_0x17ee('0x171')});db[_0x17ee('0x59')]['belongsTo'](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':'ContactId'});db[_0x17ee('0x59')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x155'),'foreignKey':'UserId'});db[_0x17ee('0x59')][_0x17ee('0x108')](db['Tag'],{'through':'openchannel_interaction_has_tags','as':_0x17ee('0x157')});db[_0x17ee('0x59')][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x176'),'as':_0x17ee('0x165')});db['OpenchannelInteraction'][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x158'),'through':_0x17ee('0x115'),'foreignKey':_0x17ee('0x175')});db[_0x17ee('0x5b')]['belongsTo'](db[_0x17ee('0xf8')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0xf8')});db['OpenchannelMessage'][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x146')});db[_0x17ee('0x5b')][_0x17ee('0x105')](db[_0x17ee('0x59')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x166'),'foreignKey':_0x17ee('0x175')});db['OpenchannelMessage'][_0x17ee('0x105')](db[_0x17ee('0x167')],{'as':_0x17ee('0x167'),'foreignKey':_0x17ee('0x168')});db[_0x17ee('0x5b')][_0x17ee('0x105')](db[_0x17ee('0x125')],{'as':_0x17ee('0x154'),'foreignKey':'OpenchannelAccountId'});db[_0x17ee('0x5d')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':'Agents','through':_0x17ee('0x11d'),'foreignKey':_0x17ee('0x174')});db[_0x17ee('0x5d')][_0x17ee('0x108')](db['Team'],{'through':_0x17ee('0x177'),'as':'Teams'});db[_0x17ee('0x5f')]['hasMany'](db[_0x17ee('0x15f')],{'as':_0x17ee('0x16b'),'foreignKey':_0x17ee('0x178')});db[_0x17ee('0x5f')][_0x17ee('0xfc')](db[_0x17ee('0x7a')],{'as':_0x17ee('0x161'),'foreignKey':_0x17ee('0x178')});db['ChatWebsite'][_0x17ee('0xfc')](db[_0x17ee('0x179')],{'as':_0x17ee('0x17a')});db[_0x17ee('0x5f')][_0x17ee('0xfc')](db[_0x17ee('0x63')],{'as':_0x17ee('0x14e')});db[_0x17ee('0x5f')]['hasMany'](db[_0x17ee('0x61')],{'as':_0x17ee('0x14f')});db[_0x17ee('0x5f')][_0x17ee('0xfc')](db[_0x17ee('0x64')],{'as':'Messages'});db[_0x17ee('0x5f')][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':'ListId'});db[_0x17ee('0x5f')]['belongsTo'](db['Interval'],{'as':_0x17ee('0x7f'),'foreignKey':'IntervalId'});db[_0x17ee('0x5f')][_0x17ee('0x105')](db['Pause'],{'as':_0x17ee('0x139'),'foreignKey':_0x17ee('0x13a')});db[_0x17ee('0x5f')][_0x17ee('0x108')](db['User'],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x120')});db[_0x17ee('0x17b')][_0x17ee('0x105')](db[_0x17ee('0x125')],{});db['OpenchannelQueueReport'][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150')});db[_0x17ee('0x17b')]['belongsTo'](db[_0x17ee('0x10b')],{'as':'Contact','foreignKey':_0x17ee('0x147')});db[_0x17ee('0x17b')][_0x17ee('0x105')](db['OpenchannelInteraction'],{});db[_0x17ee('0x17b')][_0x17ee('0x105')](db[_0x17ee('0x5b')],{});db[_0x17ee('0x17b')]['belongsTo'](db[_0x17ee('0xf8')],{});db[_0x17ee('0x17b')][_0x17ee('0x105')](db[_0x17ee('0x5d')],{});db[_0x17ee('0x61')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x17c'),'foreignKey':_0x17ee('0xfb'),'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x61')][_0x17ee('0x105')](db[_0x17ee('0x67')],{'as':_0x17ee('0x17d'),'foreignKey':_0x17ee('0x17e'),'onDelete':_0x17ee('0x15a')});db['ChatApplication'][_0x17ee('0x105')](db[_0x17ee('0x5f')],{'as':_0x17ee('0x17f'),'foreignKey':'ChatWebsiteId','onDelete':_0x17ee('0x15a')});db[_0x17ee('0x61')]['belongsTo'](db['Tag'],{'onDelete':_0x17ee('0x15a'),'foreignKey':'TagId'});db[_0x17ee('0x63')][_0x17ee('0xfc')](db[_0x17ee('0x64')],{'as':'Messages','onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x180')});db[_0x17ee('0x63')][_0x17ee('0x105')](db['ChatWebsite'],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x178')});db[_0x17ee('0x63')][_0x17ee('0x105')](db['CmContact'],{'as':_0x17ee('0x146'),'foreignKey':'ContactId'});db[_0x17ee('0x63')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'as':'Owner','foreignKey':_0x17ee('0xfb')});db['ChatInteraction'][_0x17ee('0x108')](db['Tag'],{'through':_0x17ee('0x181'),'as':_0x17ee('0x157')});db[_0x17ee('0x63')][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x181'),'as':'ThroughTags'});db[_0x17ee('0x63')]['belongsToMany'](db['User'],{'as':_0x17ee('0x158'),'through':'user_has_chat_interactions','foreignKey':_0x17ee('0x180')});db['ChatMessage'][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0xf8')});db[_0x17ee('0x64')][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x64')]['belongsTo'](db[_0x17ee('0x63')],{'onDelete':_0x17ee('0xfa'),'as':_0x17ee('0x166'),'foreignKey':_0x17ee('0x180')});db[_0x17ee('0x64')][_0x17ee('0x105')](db[_0x17ee('0x167')],{'as':'Attachment','foreignKey':_0x17ee('0x168')});db['ChatMessage'][_0x17ee('0x105')](db[_0x17ee('0x5f')],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x178')});db['ChatOfflineMessage'][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'onDelete':'cascade','as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x66')][_0x17ee('0x105')](db[_0x17ee('0x5f')],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x178')});db[_0x17ee('0x67')]['belongsToMany'](db['User'],{'as':_0x17ee('0x13b'),'through':'UserChatQueue','hooks':!![]});db[_0x17ee('0x67')][_0x17ee('0x108')](db['Team'],{'through':_0x17ee('0x182'),'as':_0x17ee('0x13c')});db[_0x17ee('0x69')][_0x17ee('0xfc')](db['ChatInternalMessage'],{'as':'Messages','foreignKey':_0x17ee('0x183'),'onDelete':_0x17ee('0xfa')});db['ChatGroup'][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x12f'),'through':'chat_group_has_users'});db[_0x17ee('0x179')][_0x17ee('0x105')](db[_0x17ee('0x5f')],{'as':_0x17ee('0x17f'),'foreignKey':'ChatWebsiteId'});db[_0x17ee('0x184')]['hasMany'](db[_0x17ee('0x10b')],{'as':'Contacts','foreignKey':_0x17ee('0x185')});db[_0x17ee('0x10b')][_0x17ee('0xfc')](db[_0x17ee('0x6c')],{'as':'Hoppers','foreignKey':_0x17ee('0x147')});db[_0x17ee('0x10b')][_0x17ee('0xfc')](db['CmHopperFinal'],{'as':'HopperFinals','foreignKey':'ContactId'});db['CmContact'][_0x17ee('0xfc')](db[_0x17ee('0x72')],{'as':_0x17ee('0x132'),'foreignKey':_0x17ee('0x147')});db[_0x17ee('0x10b')]['hasMany'](db[_0x17ee('0x74')],{'as':_0x17ee('0x74'),'foreignKey':_0x17ee('0x147')});db['CmContact']['hasMany'](db[_0x17ee('0xd3')],{'as':'JscriptySessions','foreignKey':_0x17ee('0x147')});db[_0x17ee('0x10b')][_0x17ee('0xfc')](db[_0x17ee('0x59')],{'as':_0x17ee('0x186'),'foreignKey':_0x17ee('0x147'),'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x10b')][_0x17ee('0xfc')](db[_0x17ee('0x63')],{'as':_0x17ee('0x102'),'foreignKey':'ContactId','onDelete':_0x17ee('0x15a')});db['CmContact'][_0x17ee('0xfc')](db[_0x17ee('0x52')],{'as':'SmsInteractions','foreignKey':'ContactId','onDelete':_0x17ee('0x15a')});db[_0x17ee('0x10b')][_0x17ee('0xfc')](db[_0x17ee('0x4a')],{'as':'FaxInteractions','foreignKey':'ContactId','onDelete':_0x17ee('0x15a')});db[_0x17ee('0x10b')]['hasMany'](db['MailInteraction'],{'as':'MailInteractions','foreignKey':_0x17ee('0x147'),'onDelete':'restrict'});db[_0x17ee('0x10b')][_0x17ee('0x105')](db['CmCompany'],{'as':_0x17ee('0x187'),'foreignKey':_0x17ee('0x185')});db[_0x17ee('0x10b')][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x10b')]['belongsToMany'](db[_0x17ee('0xf8')],{'as':'Users','through':_0x17ee('0x10d')});db['CmContact'][_0x17ee('0x108')](db['Tag'],{'as':'Tags','through':_0x17ee('0x188')});db[_0x17ee('0x10b')][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x188'),'as':_0x17ee('0x165')});db[_0x17ee('0x6c')]['belongsTo'](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':'ContactId','onDelete':_0x17ee('0xfa')});db['CmHopper'][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x15c'),'foreignKey':_0x17ee('0x150'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x6c')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x17c'),'foreignKey':_0x17ee('0xfb')});db[_0x17ee('0x6c')][_0x17ee('0x105')](db['VoiceQueue'],{'as':_0x17ee('0x17d'),'foreignKey':'VoiceQueueId','onDelete':_0x17ee('0xfa')});db['CmHopper'][_0x17ee('0x105')](db[_0x17ee('0xe7')],{'as':_0x17ee('0xe7'),'foreignKey':'CampaignId','onDelete':_0x17ee('0xfa')});db['CmHopper']['belongsTo'](db[_0x17ee('0xf8')],{'as':_0x17ee('0x155'),'foreignKey':_0x17ee('0x189')});db[_0x17ee('0x6e')][_0x17ee('0x105')](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':_0x17ee('0x147'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x6e')][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':'List','foreignKey':_0x17ee('0x150'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x6e')][_0x17ee('0x105')](db[_0x17ee('0x1b')],{'as':'Queue','foreignKey':'VoiceQueueId','onDelete':_0x17ee('0xfa')});db[_0x17ee('0x6e')]['belongsTo'](db[_0x17ee('0xe7')],{'as':_0x17ee('0xe7'),'foreignKey':_0x17ee('0x18a'),'onDelete':_0x17ee('0xfa')});db[_0x17ee('0x18b')][_0x17ee('0xfc')](db[_0x17ee('0x7d')],{'as':{'plural':'All','singular':_0x17ee('0x18c')},'foreignKey':_0x17ee('0x18d'),'onDelete':_0x17ee('0xfa'),'hooks':!![]});db[_0x17ee('0x18b')][_0x17ee('0xfc')](db[_0x17ee('0x7d')],{'as':{'plural':_0x17ee('0x18e'),'singular':'OneAny'},'foreignKey':_0x17ee('0x18f'),'onDelete':_0x17ee('0xfa'),'hooks':!![]});db[_0x17ee('0x18b')][_0x17ee('0xfc')](db[_0x17ee('0x190')],{'as':_0x17ee('0x191'),'foreignKey':'AutomationId','onDelete':'cascade','hooks':!![]});db[_0x17ee('0x7f')][_0x17ee('0xfc')](db[_0x17ee('0x7f')],{'as':_0x17ee('0x192'),'foreignKey':_0x17ee('0x137'),'onDelete':_0x17ee('0xfa'),'hooks':!![],'required':![]});db[_0x17ee('0x7f')][_0x17ee('0xfc')](db['VoiceExtension'],{'as':'Extensions','foreignKey':_0x17ee('0x137'),'onDelete':_0x17ee('0x15a')});db[_0x17ee('0x7f')]['hasMany'](db[_0x17ee('0x41')],{'as':_0x17ee('0x193'),'foreignKey':_0x17ee('0x137')});db[_0x17ee('0x7f')][_0x17ee('0xfc')](db[_0x17ee('0x61')],{'as':'ChatApplications','foreignKey':_0x17ee('0x137')});db[_0x17ee('0x7f')][_0x17ee('0xfc')](db['FaxApplication'],{'as':'FaxApplications','foreignKey':_0x17ee('0x137')});db['Interval']['hasMany'](db[_0x17ee('0x51')],{'as':_0x17ee('0x194'),'foreignKey':_0x17ee('0x137')});db[_0x17ee('0x195')][_0x17ee('0x105')](db[_0x17ee('0x39')],{});db[_0x17ee('0x195')][_0x17ee('0x105')](db['AnalyticDefaultReport'],{'foreignKey':_0x17ee('0x196')});db[_0x17ee('0x195')][_0x17ee('0x105')](db[_0x17ee('0x92')],{'foreignKey':_0x17ee('0x197')});db[_0x17ee('0x85')][_0x17ee('0x108')](db[_0x17ee('0x1a')],{'as':'Mohs','through':_0x17ee('0x12e'),'onDelete':'restrict'});db[_0x17ee('0x86')]['belongsToMany'](db[_0x17ee('0x10b')],{'through':_0x17ee('0x188')});db['Tag'][_0x17ee('0x108')](db[_0x17ee('0x63')],{'through':_0x17ee('0x181')});db[_0x17ee('0x86')]['belongsToMany'](db[_0x17ee('0x3d')],{'through':_0x17ee('0x156')});db[_0x17ee('0x86')][_0x17ee('0x108')](db[_0x17ee('0x52')],{'through':'sms_interaction_has_tags'});db[_0x17ee('0x86')][_0x17ee('0x108')](db[_0x17ee('0x4a')],{'through':_0x17ee('0x164')});db[_0x17ee('0x86')][_0x17ee('0x108')](db[_0x17ee('0x59')],{'through':_0x17ee('0x176')});db[_0x17ee('0x8a')][_0x17ee('0xfc')](db[_0x17ee('0x7d')],{'as':{'plural':'AllConditions','singular':_0x17ee('0x198')},'foreignKey':_0x17ee('0x199'),'onDelete':_0x17ee('0xfa'),'hooks':!![]});db[_0x17ee('0x8a')]['hasMany'](db[_0x17ee('0x7d')],{'as':{'plural':_0x17ee('0x19a'),'singular':_0x17ee('0x19b')},'foreignKey':_0x17ee('0x19c'),'onDelete':_0x17ee('0xfa'),'hooks':!![]});db[_0x17ee('0x8a')]['hasMany'](db[_0x17ee('0x190')],{'as':'Actions','foreignKey':_0x17ee('0x19d'),'onDelete':_0x17ee('0xfa'),'hooks':!![]});db['AnalyticCustomReport'][_0x17ee('0xfc')](db[_0x17ee('0x19e')],{'as':'Fields','onDelete':'cascade','foreignKey':_0x17ee('0x197'),'hooks':!![]});db['AnalyticDefaultReport'][_0x17ee('0xfc')](db[_0x17ee('0x19e')],{'as':_0x17ee('0x19f'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x196')});db[_0x17ee('0x97')][_0x17ee('0xfc')](db[_0x17ee('0x19e')],{'as':_0x17ee('0x19f'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a0')});db[_0x17ee('0x19e')][_0x17ee('0x105')](db[_0x17ee('0x97')],{'foreignKey':_0x17ee('0x1a0')});db[_0x17ee('0x9b')][_0x17ee('0xfc')](db[_0x17ee('0x9d')],{'as':_0x17ee('0x1a1'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0x9d')][_0x17ee('0xfc')](db[_0x17ee('0x9e')],{'as':'Subjects','onDelete':'cascade','foreignKey':'SubjectId'});db[_0x17ee('0x9d')]['hasMany'](db[_0x17ee('0x9e')],{'as':_0x17ee('0x1a3'),'onDelete':_0x17ee('0xfa'),'foreignKey':'DescriptionId'});db['SalesforceConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0x9e')],{'as':_0x17ee('0x19f'),'onDelete':'cascade','foreignKey':_0x17ee('0x1a4')});db['SalesforceConfiguration'][_0x17ee('0x105')](db['SalesforceAccount'],{'as':_0x17ee('0x154'),'foreignKey':'AccountId'});db[_0x17ee('0x9e')]['hasMany'](db[_0x17ee('0x9e')],{'as':_0x17ee('0x1a5'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0x9e')][_0x17ee('0xfc')](db['SalesforceField'],{'as':'Description','foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0x9e')][_0x17ee('0xfc')](db[_0x17ee('0x9e')],{'as':_0x17ee('0x1a8'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0x9e')][_0x17ee('0x105')](db[_0x17ee('0x8c')],{'as':_0x17ee('0x8c'),'foreignKey':_0x17ee('0x1a9')});db[_0x17ee('0xa0')]['hasMany'](db[_0x17ee('0xa2')],{'as':'Configurations','onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xa2')]['hasMany'](db['SugarcrmField'],{'as':_0x17ee('0x1aa'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xa2')][_0x17ee('0xfc')](db[_0x17ee('0xa3')],{'as':_0x17ee('0x1a3'),'onDelete':'cascade','foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xa2')][_0x17ee('0xfc')](db['SugarcrmField'],{'as':_0x17ee('0x19f'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a4')});db['SugarcrmConfiguration']['belongsTo'](db['SugarcrmAccount'],{'as':'Account','foreignKey':'AccountId'});db[_0x17ee('0xa3')]['hasMany'](db[_0x17ee('0xa3')],{'as':'Subject','foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xa3')][_0x17ee('0xfc')](db[_0x17ee('0xa3')],{'as':_0x17ee('0x1ab'),'foreignKey':'DescriptionId'});db[_0x17ee('0xa3')]['hasMany'](db['SugarcrmField'],{'as':_0x17ee('0x1a8'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xa3')]['belongsTo'](db[_0x17ee('0x8c')],{'as':'Variable','foreignKey':_0x17ee('0x1a9')});db[_0x17ee('0xa5')][_0x17ee('0xfc')](db['DeskConfiguration'],{'as':'Configurations','onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db['DeskConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0xa8')],{'as':'Subjects','onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a6')});db['DeskConfiguration']['hasMany'](db[_0x17ee('0xa8')],{'as':_0x17ee('0x1a3'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xa6')][_0x17ee('0xfc')](db[_0x17ee('0xa8')],{'as':_0x17ee('0x19f'),'onDelete':'cascade','foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xa6')]['belongsTo'](db[_0x17ee('0xa5')],{'as':_0x17ee('0x154'),'foreignKey':'AccountId'});db[_0x17ee('0xa6')][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x1ac')});db['DeskField'][_0x17ee('0xfc')](db[_0x17ee('0xa8')],{'as':_0x17ee('0x1a5'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xa8')][_0x17ee('0xfc')](db[_0x17ee('0xa8')],{'as':_0x17ee('0x1ab'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xa8')][_0x17ee('0xfc')](db[_0x17ee('0xa8')],{'as':_0x17ee('0x1a8'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xa8')]['belongsTo'](db[_0x17ee('0x8c')],{'as':_0x17ee('0x8c'),'foreignKey':'VariableId'});db[_0x17ee('0xaa')][_0x17ee('0xfc')](db['ZohoConfiguration'],{'as':'Configurations','onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xac')]['hasMany'](db[_0x17ee('0xae')],{'as':_0x17ee('0x1aa'),'onDelete':'cascade','foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xac')][_0x17ee('0xfc')](db[_0x17ee('0xae')],{'as':_0x17ee('0x1a3'),'onDelete':_0x17ee('0xfa'),'foreignKey':'DescriptionId'});db[_0x17ee('0xac')][_0x17ee('0xfc')](db['ZohoField'],{'as':_0x17ee('0x19f'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xac')][_0x17ee('0x105')](db[_0x17ee('0xaa')],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xae')][_0x17ee('0xfc')](db[_0x17ee('0xae')],{'as':_0x17ee('0x1a5'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xae')]['hasMany'](db[_0x17ee('0xae')],{'as':_0x17ee('0x1ab'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xae')][_0x17ee('0xfc')](db[_0x17ee('0xae')],{'as':'Field','foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xae')][_0x17ee('0x105')](db[_0x17ee('0x8c')],{'as':_0x17ee('0x8c'),'foreignKey':'VariableId'});db[_0x17ee('0xb0')]['hasMany'](db[_0x17ee('0xb2')],{'as':_0x17ee('0x1a1'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db['ZendeskConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0xb4')],{'as':'Subjects','foreignKey':_0x17ee('0x1a6')});db['ZendeskConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0xb4')],{'as':_0x17ee('0x1a3'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xb2')][_0x17ee('0xfc')](db[_0x17ee('0xb4')],{'as':_0x17ee('0x19f'),'foreignKey':_0x17ee('0x1a4')});db['ZendeskConfiguration'][_0x17ee('0x105')](db[_0x17ee('0xb0')],{'as':'Account','foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xb2')][_0x17ee('0x108')](db[_0x17ee('0x86')],{'through':_0x17ee('0x1ad')});db[_0x17ee('0xb4')][_0x17ee('0xfc')](db[_0x17ee('0xb4')],{'as':_0x17ee('0x1a5'),'foreignKey':'SubjectId'});db[_0x17ee('0xb4')]['hasMany'](db[_0x17ee('0xb4')],{'as':_0x17ee('0x1ab'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xb4')][_0x17ee('0xfc')](db[_0x17ee('0xb4')],{'as':_0x17ee('0x1a8'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xb4')][_0x17ee('0x105')](db[_0x17ee('0x8c')],{'as':_0x17ee('0x8c'),'foreignKey':'VariableId'});db[_0x17ee('0xb6')]['hasMany'](db[_0x17ee('0xb8')],{'as':_0x17ee('0x1a1'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xb8')][_0x17ee('0xfc')](db[_0x17ee('0xba')],{'as':'Subjects','onDelete':'cascade','foreignKey':_0x17ee('0x1a6')});db['FreshdeskConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0xba')],{'as':_0x17ee('0x1a3'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a7')});db['FreshdeskConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0xba')],{'as':'Fields','onDelete':'cascade','foreignKey':_0x17ee('0x1a4')});db['FreshdeskConfiguration'][_0x17ee('0x105')](db[_0x17ee('0xb6')],{'as':'Account','foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xb8')]['belongsToMany'](db['Tag'],{'through':_0x17ee('0x1ae')});db[_0x17ee('0xba')][_0x17ee('0xfc')](db['FreshdeskField'],{'as':'Subject','foreignKey':'SubjectId'});db[_0x17ee('0xba')]['hasMany'](db['FreshdeskField'],{'as':_0x17ee('0x1ab'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xba')][_0x17ee('0xfc')](db[_0x17ee('0xba')],{'as':'Field','foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xba')][_0x17ee('0x105')](db[_0x17ee('0x8c')],{'as':_0x17ee('0x8c'),'foreignKey':_0x17ee('0x1a9')});db[_0x17ee('0xbc')][_0x17ee('0xfc')](db[_0x17ee('0xbe')],{'as':_0x17ee('0x1a1'),'onDelete':_0x17ee('0xfa'),'foreignKey':'AccountId'});db[_0x17ee('0xbe')][_0x17ee('0xfc')](db[_0x17ee('0xbf')],{'as':'Subjects','foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xbe')]['hasMany'](db['VtigerField'],{'as':_0x17ee('0x1a3'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xbe')][_0x17ee('0xfc')](db[_0x17ee('0xbf')],{'as':_0x17ee('0x19f'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xbe')]['belongsTo'](db[_0x17ee('0xbc')],{'as':_0x17ee('0x154'),'foreignKey':'AccountId'});db[_0x17ee('0xbe')]['belongsToMany'](db[_0x17ee('0x86')],{'through':_0x17ee('0x1af')});db[_0x17ee('0xbf')]['hasMany'](db[_0x17ee('0xbf')],{'as':'Subject','foreignKey':_0x17ee('0x1a6')});db['VtigerField'][_0x17ee('0xfc')](db[_0x17ee('0xbf')],{'as':_0x17ee('0x1ab'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xbf')][_0x17ee('0xfc')](db[_0x17ee('0xbf')],{'as':_0x17ee('0x1a8'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xbf')]['belongsTo'](db['Variable'],{'as':_0x17ee('0x8c'),'foreignKey':'VariableId'});db[_0x17ee('0xc1')][_0x17ee('0xfc')](db[_0x17ee('0xc3')],{'as':'Configurations','onDelete':_0x17ee('0xfa'),'foreignKey':'AccountId'});db[_0x17ee('0xc3')]['hasMany'](db[_0x17ee('0xc5')],{'as':_0x17ee('0x1aa'),'foreignKey':_0x17ee('0x1a6')});db['ServicenowConfiguration'][_0x17ee('0xfc')](db[_0x17ee('0xc5')],{'as':_0x17ee('0x1a3'),'foreignKey':'DescriptionId'});db[_0x17ee('0xc3')][_0x17ee('0xfc')](db[_0x17ee('0xc5')],{'as':_0x17ee('0x19f'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xc3')]['belongsTo'](db['ServicenowAccount'],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xc5')][_0x17ee('0xfc')](db[_0x17ee('0xc5')],{'as':_0x17ee('0x1a5'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xc5')]['hasMany'](db[_0x17ee('0xc5')],{'as':_0x17ee('0x1ab'),'foreignKey':'DescriptionId'});db[_0x17ee('0xc5')]['hasMany'](db[_0x17ee('0xc5')],{'as':_0x17ee('0x1a8'),'foreignKey':'FieldId'});db[_0x17ee('0xc5')]['belongsTo'](db['Variable'],{'as':_0x17ee('0x8c'),'foreignKey':_0x17ee('0x1a9')});db[_0x17ee('0xc6')][_0x17ee('0xfc')](db[_0x17ee('0xc8')],{'as':_0x17ee('0x1a1'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xc8')][_0x17ee('0xfc')](db['Dynamics365Field'],{'as':'Subjects','onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xc8')][_0x17ee('0xfc')](db[_0x17ee('0xc9')],{'as':_0x17ee('0x1a3'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xc8')]['hasMany'](db[_0x17ee('0xc9')],{'as':_0x17ee('0x19f'),'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xc8')][_0x17ee('0x105')](db['Dynamics365Account'],{'as':_0x17ee('0x154'),'foreignKey':_0x17ee('0x1a2')});db[_0x17ee('0xc9')]['hasMany'](db[_0x17ee('0xc9')],{'as':_0x17ee('0x1a5'),'foreignKey':_0x17ee('0x1a6')});db[_0x17ee('0xc9')]['hasMany'](db[_0x17ee('0xc9')],{'as':'Description','foreignKey':_0x17ee('0x1a7')});db[_0x17ee('0xc9')][_0x17ee('0xfc')](db[_0x17ee('0xc9')],{'as':_0x17ee('0x1a8'),'foreignKey':_0x17ee('0x1a4')});db[_0x17ee('0xc9')]['belongsTo'](db[_0x17ee('0x8c')],{'as':_0x17ee('0x8c'),'foreignKey':_0x17ee('0x1a9')});db[_0x17ee('0xcc')][_0x17ee('0x105')](db['ChatWebsite'],{});db[_0x17ee('0xcc')][_0x17ee('0x105')](db['CmList'],{'as':'List','foreignKey':'ListId'});db['ChatQueueReport'][_0x17ee('0x105')](db['CmContact'],{'as':'Contact','foreignKey':_0x17ee('0x147')});db[_0x17ee('0xcc')]['belongsTo'](db[_0x17ee('0x63')],{});db[_0x17ee('0xcc')][_0x17ee('0x105')](db[_0x17ee('0x64')],{});db[_0x17ee('0xcc')]['belongsTo'](db[_0x17ee('0xf8')],{});db[_0x17ee('0xcc')][_0x17ee('0x105')](db[_0x17ee('0x67')],{});db['ChatInternalMessage'][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'onDelete':_0x17ee('0xfa'),'foreignKey':_0x17ee('0x1b0')});db[_0x17ee('0xce')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'onDelete':_0x17ee('0xfa'),'foreignKey':'ToId'});db['JscriptySessionReport'][_0x17ee('0xfc')](db[_0x17ee('0xd1')],{'foreignKey':_0x17ee('0x1b1'),'onDelete':_0x17ee('0xfa')});db['JscriptySessionReport'][_0x17ee('0xfc')](db[_0x17ee('0xd0')],{'foreignKey':_0x17ee('0x1b1'),'onDelete':'cascade'});db[_0x17ee('0xd5')][_0x17ee('0x105')](db[_0x17ee('0x127')],{});db['SmsQueueReport'][_0x17ee('0x105')](db[_0x17ee('0xf4')],{'as':'List','foreignKey':'ListId'});db['SmsQueueReport']['belongsTo'](db[_0x17ee('0x10b')],{'as':_0x17ee('0x146'),'foreignKey':'ContactId'});db[_0x17ee('0xd5')]['belongsTo'](db[_0x17ee('0x52')],{});db[_0x17ee('0xd5')][_0x17ee('0x105')](db[_0x17ee('0x54')],{});db[_0x17ee('0xd5')]['belongsTo'](db[_0x17ee('0xf8')],{});db[_0x17ee('0xd5')][_0x17ee('0x105')](db[_0x17ee('0x56')],{});db['JscriptyProject'][_0x17ee('0xfc')](db[_0x17ee('0xd3')],{'foreignKey':_0x17ee('0x1b2')});db[_0x17ee('0x1b3')][_0x17ee('0xfc')](db[_0x17ee('0xd1')],{'foreignKey':_0x17ee('0x1b2')});db[_0x17ee('0x1b3')][_0x17ee('0xfc')](db[_0x17ee('0xd0')],{'foreignKey':_0x17ee('0x1b2')});db[_0x17ee('0xdf')][_0x17ee('0x108')](db['User'],{'as':_0x17ee('0x158'),'through':'user_has_square_projects'});db[_0x17ee('0xe4')]['belongsToMany'](db[_0x17ee('0xf8')],{'as':'Agents','through':'user_has_teams'});db[_0x17ee('0xe4')][_0x17ee('0x108')](db['VoiceQueue'],{'through':_0x17ee('0x13d'),'as':_0x17ee('0x116')});db['Team'][_0x17ee('0x108')](db[_0x17ee('0x3a')],{'through':_0x17ee('0x1b4'),'as':'MailQueues'});db['Team'][_0x17ee('0x108')](db[_0x17ee('0x67')],{'through':_0x17ee('0x182'),'as':'ChatQueues'});db['Team'][_0x17ee('0x108')](db['FaxQueue'],{'through':'team_has_fax_queues','as':_0x17ee('0x119')});db[_0x17ee('0xe4')][_0x17ee('0x108')](db['SmsQueue'],{'through':_0x17ee('0x170'),'as':_0x17ee('0x11a')});db['Team'][_0x17ee('0x108')](db['OpenchannelQueue'],{'through':_0x17ee('0x177'),'as':'OpenchannelQueues'});db[_0x17ee('0xe7')][_0x17ee('0xfc')](db[_0x17ee('0x6c')],{'as':_0x17ee('0x131'),'foreignKey':_0x17ee('0x18a')});db['Campaign'][_0x17ee('0xfc')](db[_0x17ee('0x70')],{'as':_0x17ee('0x100'),'foreignKey':_0x17ee('0x18a')});db[_0x17ee('0xe7')]['hasMany'](db[_0x17ee('0x72')],{'as':'HopperHistories','foreignKey':_0x17ee('0x18a')});db['Campaign'][_0x17ee('0xfc')](db[_0x17ee('0x6e')],{'as':'HopperBlacks','foreignKey':_0x17ee('0x18a')});db[_0x17ee('0xe7')][_0x17ee('0x105')](db['Trunk'],{'as':'Trunk','foreignKey':_0x17ee('0x134')});db['Campaign'][_0x17ee('0x105')](db[_0x17ee('0x135')],{'as':_0x17ee('0x136'),'foreignKey':_0x17ee('0x1b5')});db[_0x17ee('0xe7')][_0x17ee('0x105')](db[_0x17ee('0x7f')],{'as':'Interval','foreignKey':_0x17ee('0x137')});db['Campaign'][_0x17ee('0x105')](db[_0x17ee('0xdf')],{'as':'SquareProject','foreignKey':_0x17ee('0x1b6')});db[_0x17ee('0xe7')][_0x17ee('0x108')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x10e'),'through':_0x17ee('0x1b7')});db['Campaign'][_0x17ee('0x108')](db[_0x17ee('0xf4')],{'as':_0x17ee('0x13e'),'through':_0x17ee('0x1b8')});db[_0x17ee('0xed')][_0x17ee('0x105')](db['MailMessage'],{});db['MailTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x3d')],{});db['MailTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x39')],{'foreignKey':_0x17ee('0x1b9'),'as':_0x17ee('0x1ba')});db[_0x17ee('0xed')]['belongsTo'](db['User'],{'foreignKey':_0x17ee('0x1bb'),'as':_0x17ee('0x1bc')});db[_0x17ee('0xed')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':_0x17ee('0x1bd'),'as':_0x17ee('0x1be')});db[_0x17ee('0xed')]['belongsTo'](db[_0x17ee('0x3a')],{'foreignKey':_0x17ee('0x1bf'),'as':_0x17ee('0x1c0')});db[_0x17ee('0xed')][_0x17ee('0x105')](db[_0x17ee('0x39')],{'foreignKey':'ToMailAccountId','as':_0x17ee('0x1c1')});db['ChatTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x64')],{});db['ChatTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x63')],{});db['ChatTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x5f')],{'foreignKey':_0x17ee('0x1c2'),'as':'FromAccount'});db[_0x17ee('0x1c3')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':'FromUserId','as':_0x17ee('0x1bc')});db['ChatTransferReport'][_0x17ee('0x105')](db['User'],{'foreignKey':_0x17ee('0x1bd'),'as':'ToAgent'});db['ChatTransferReport']['belongsTo'](db[_0x17ee('0x67')],{'foreignKey':_0x17ee('0x1c4'),'as':'ToQueue'});db[_0x17ee('0x1c3')][_0x17ee('0x105')](db[_0x17ee('0x5f')],{'foreignKey':_0x17ee('0x1c5'),'as':_0x17ee('0x1c1')});db[_0x17ee('0xef')][_0x17ee('0x105')](db[_0x17ee('0x4c')],{});db['FaxTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x4a')],{});db[_0x17ee('0xef')][_0x17ee('0x105')](db['FaxAccount'],{'foreignKey':'FromFaxAccountId','as':_0x17ee('0x1ba')});db[_0x17ee('0xef')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':'FromUserId','as':_0x17ee('0x1bc')});db[_0x17ee('0xef')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':_0x17ee('0x1bd'),'as':'ToAgent'});db['FaxTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x4e')],{'foreignKey':_0x17ee('0x1c6'),'as':_0x17ee('0x1c0')});db[_0x17ee('0xef')][_0x17ee('0x105')](db[_0x17ee('0x47')],{'foreignKey':_0x17ee('0x1c7'),'as':'ToAccount'});db[_0x17ee('0x1c8')]['belongsTo'](db[_0x17ee('0x5b')],{});db[_0x17ee('0x1c8')][_0x17ee('0x105')](db[_0x17ee('0x59')],{});db['OpenchannelTransferReport']['belongsTo'](db[_0x17ee('0x125')],{'foreignKey':_0x17ee('0x1c9'),'as':_0x17ee('0x1ba')});db[_0x17ee('0x1c8')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':_0x17ee('0x1bb'),'as':_0x17ee('0x1bc')});db[_0x17ee('0x1c8')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':_0x17ee('0x1bd'),'as':_0x17ee('0x1be')});db[_0x17ee('0x1c8')][_0x17ee('0x105')](db[_0x17ee('0x5d')],{'foreignKey':'ToOpenchannelQueueId','as':_0x17ee('0x1c0')});db[_0x17ee('0x1c8')][_0x17ee('0x105')](db[_0x17ee('0x125')],{'foreignKey':'ToOpenchannelAccountId','as':_0x17ee('0x1c1')});db['SmsTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x54')],{});db[_0x17ee('0xf2')][_0x17ee('0x105')](db[_0x17ee('0x52')],{});db['SmsTransferReport'][_0x17ee('0x105')](db[_0x17ee('0x127')],{'foreignKey':_0x17ee('0x1ca'),'as':_0x17ee('0x1ba')});db[_0x17ee('0xf2')][_0x17ee('0x105')](db[_0x17ee('0xf8')],{'foreignKey':_0x17ee('0x1bb'),'as':_0x17ee('0x1bc')});db[_0x17ee('0xf2')]['belongsTo'](db[_0x17ee('0xf8')],{'foreignKey':_0x17ee('0x1bd'),'as':_0x17ee('0x1be')});db[_0x17ee('0xf2')]['belongsTo'](db['SmsQueue'],{'foreignKey':_0x17ee('0x1cb'),'as':_0x17ee('0x1c0')});db[_0x17ee('0xf2')]['belongsTo'](db['SmsAccount'],{'foreignKey':_0x17ee('0x1cc'),'as':_0x17ee('0x1c1')});db[_0x17ee('0xf4')]['hasMany'](db['Disposition'],{'as':'Dispositions','foreignKey':_0x17ee('0x150')});db[_0x17ee('0xf4')][_0x17ee('0xfc')](db[_0x17ee('0x76')],{'as':_0x17ee('0x1cd'),'foreignKey':_0x17ee('0x150')});db[_0x17ee('0xf4')][_0x17ee('0xfc')](db[_0x17ee('0x10b')],{'as':_0x17ee('0x10c'),'onDelete':_0x17ee('0xfa'),'foreignKey':'ListId'});db[_0x17ee('0xf4')][_0x17ee('0xfc')](db[_0x17ee('0x70')],{'as':_0x17ee('0x100'),'foreignKey':'ListId'});db[_0x17ee('0xf4')]['hasMany'](db[_0x17ee('0x72')],{'as':'HopperHistory','foreignKey':_0x17ee('0x150')});db[_0x17ee('0xf4')][_0x17ee('0xfc')](db['ReportAgentPreview'],{'as':_0x17ee('0x74'),'foreignKey':_0x17ee('0x150')});db[_0x17ee('0xf4')][_0x17ee('0x108')](db[_0x17ee('0x1b')],{'as':_0x17ee('0x1ce'),'through':_0x17ee('0x1cf')});db[_0x17ee('0xf4')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x13b'),'through':_0x17ee('0x10f')});db[_0x17ee('0xf5')]['hasMany'](db[_0x17ee('0x19')],{'as':_0x17ee('0xff'),'onDelete':_0x17ee('0x15a')});db[_0x17ee('0xf5')][_0x17ee('0x108')](db[_0x17ee('0xf8')],{'as':'Agents','through':_0x17ee('0x11f')});db[_0x17ee('0x106')][_0x17ee('0xfc')](db[_0x17ee('0xf8')],{'as':_0x17ee('0x158'),'foreignKey':_0x17ee('0x107')});db[_0x17ee('0x106')][_0x17ee('0xfc')](db[_0x17ee('0x1d0')],{'as':_0x17ee('0x1d1'),'foreignKey':'userProfileId','onDelete':_0x17ee('0xfa')});db[_0x17ee('0x1d0')]['hasMany'](db['UserProfileResource'],{'as':_0x17ee('0x1d2'),'foreignKey':_0x17ee('0x1d3'),'onDelete':'cascade'});module[_0x17ee('0x1d4')]={'db':db,'dbH':dbH};
\ No newline at end of file
diff --git a/server/routes.js b/server/routes.js
index 8421cf7..0a0ba7d 100644
--- a/server/routes.js
+++ b/server/routes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e5c=['./api/cmHopperFinal','./api/cmHopperHistory','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','/api/automations','./api/automation','./api/cannedAnswer','./api/condition','/api/intervals','./api/interval','./api/pause','/api/cdr','/api/voiceQueuesLog','./api/voiceQueuesLog','/api/schedules','/api/sounds','./api/sound','/api/tags','./api/tag','/api/templates','./api/template','/api/triggers','./api/trigger','/api/variables','./api/variable','/api/integrations','./api/integration','/api/analytics/custom_reports','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','./api/intSugarcrmField','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','/api/integrations/zoho/accounts','/api/integrations/zoho/configurations','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','/api/integrations/zendesk/accounts','./api/intZendeskAccount','./api/intZendeskConfiguration','/api/integrations/zendesk/fields','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','./api/intVtigerAccount','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','/api/integrations/servicenow/configurations','./api/intServicenowConfiguration','./api/intServicenowField','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','/api/integrations/dynamics365/fields','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','./api/chatInternalMessage','./api/jscriptyAnswerReport','/api/jscripty/questions/reports','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/sms/reports/queue','/api/square/reports','./api/squareReport','/api/square/details/reports','/api/jscripty/projects','./api/jscriptyProject','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','/api/square/messages','./api/squareMessage','/api/teams','./api/team','/api/license','/api/campaigns','./api/campaign','./api/migration','/api/attachments','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','./api/mailTransferReport','/api/chat/reports/transfer','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','/api/sms/reports/transfer','/api/cm/lists','./api/cmList','/api/voice/prefixes','/api/userProfiles','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/auth/local','./api/authLocal','/api/auth/google','./api/authGoogle','/api/jira','./api/rpc','./api/version','/api/pm2','./api/pm2','static','root','/apidoc','/www','/demo','join','/snippet','snippet','/server/files/plugins','get','route','/index.html','path','express','express-winston','util','./config/environment','./config/logger','api','auth','default','use','logger','format','method','headers','x-forwarded-for','connection','remoteAddress','statusCode','responseTime','user','name','role','body','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','url','device','other','agent_name','./api/user','/api/voice/chanspy','/api/voice/contexts','./api/voiceContext','./api/voiceExtension','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','./api/voiceMail','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','./api/voiceAgentReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','./api/mailAccount','/api/mail/queues','./api/mailQueue','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','/api/mail/applications','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','./api/dashboard','/api/fax/accounts','./api/faxApplication','/api/fax/interactions','/api/fax/messages','./api/faxMessage','/api/fax/queues','./api/faxQueue','./api/faxQueueReport','/api/sms/accounts','./api/smsAccount','/api/sms/applications','./api/smsApplication','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','/api/openchannel/accounts','./api/openchannelAccount','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','/api/openchannel/queues','./api/openchannelQueue','/api/chat/websites','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatInteraction','/api/chat/offline_messages','./api/chatOfflineMessage','./api/chatQueue','/api/chat/groups','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','./api/cmCompany','./api/cmContact','/api/cm/hopper','/api/cm/hopper_black','./api/cmHopperBlack'];(function(_0x1e11b8,_0x463b5c){var _0x5d9f70=function(_0x2ae9ff){while(--_0x2ae9ff){_0x1e11b8['push'](_0x1e11b8['shift']());}};_0x5d9f70(++_0x463b5c);}(_0x3e5c,0x9a));var _0xc3e5=function(_0xa03d9,_0x340724){_0xa03d9=_0xa03d9-0x0;var _0x4d0d41=_0x3e5c[_0xa03d9];return _0x4d0d41;};'use strict';var path=require(_0xc3e5('0x0'));var express=require(_0xc3e5('0x1'));var ewinston=require(_0xc3e5('0x2'));var util=require(_0xc3e5('0x3'));var errors=require('./errors');var config=require(_0xc3e5('0x4'));var logger=require(_0xc3e5('0x5'))(_0xc3e5('0x6'));var authLogger=require(_0xc3e5('0x5'))(_0xc3e5('0x7'));exports[_0xc3e5('0x8')]=function(_0x4cb0db){_0x4cb0db[_0xc3e5('0x9')](ewinston[_0xc3e5('0xa')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x2d6089,_0xcbbec0){return util[_0xc3e5('0xb')]('%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s',_0x2d6089[_0xc3e5('0xc')],_0x2d6089[_0xc3e5('0xd')][_0xc3e5('0xe')]?_0x2d6089[_0xc3e5('0xd')][_0xc3e5('0xe')]:_0x2d6089[_0xc3e5('0xf')][_0xc3e5('0x10')]||_0x2d6089['ip'],_0x2d6089['url'],_0xcbbec0[_0xc3e5('0x11')],_0xcbbec0[_0xc3e5('0x12')],_0x2d6089[_0xc3e5('0x13')]?_0x2d6089[_0xc3e5('0x13')]['id']:null,_0x2d6089['user']?_0x2d6089[_0xc3e5('0x13')][_0xc3e5('0x14')]:null,_0x2d6089[_0xc3e5('0x13')]?_0x2d6089[_0xc3e5('0x13')][_0xc3e5('0x15')]:null);}}));_0x4cb0db[_0xc3e5('0x9')](ewinston['logger']({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x590d80,_0x52cca7){var _0x27c226='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s';if(_0x590d80[_0xc3e5('0x16')]&&_0x590d80[_0xc3e5('0x16')]['device']&&_0x590d80[_0xc3e5('0x16')][_0xc3e5('0x17')]){_0x27c226=_0xc3e5('0x18');}return util[_0xc3e5('0xb')](_0x27c226,_0x590d80[_0xc3e5('0xc')],_0x590d80['headers'][_0xc3e5('0xe')]?_0x590d80[_0xc3e5('0xd')][_0xc3e5('0xe')]:_0x590d80[_0xc3e5('0xf')][_0xc3e5('0x10')]||_0x590d80['ip'],_0x590d80[_0xc3e5('0x19')],_0x52cca7['statusCode'],_0x52cca7[_0xc3e5('0x12')],_0x590d80[_0xc3e5('0x13')]?_0x590d80['user']['id']:null,_0x590d80[_0xc3e5('0x13')]?_0x590d80['user'][_0xc3e5('0x14')]:null,_0x590d80[_0xc3e5('0x13')]?_0x590d80[_0xc3e5('0x13')][_0xc3e5('0x15')]:null,_0x590d80[_0xc3e5('0x16')]&&_0x590d80['body'][_0xc3e5('0x1a')]?_0x590d80[_0xc3e5('0x16')][_0xc3e5('0x1a')]:_0xc3e5('0x1b'),_0x590d80[_0xc3e5('0x16')]&&_0x590d80[_0xc3e5('0x16')][_0xc3e5('0x17')]?_0x590d80['body'][_0xc3e5('0x17')]:'',_0x590d80[_0xc3e5('0x16')]&&_0x590d80[_0xc3e5('0x16')][_0xc3e5('0x1c')]?_0x590d80[_0xc3e5('0x16')][_0xc3e5('0x1c')]:'');},'ignoreRoute':function(_0x2777c4){var _0x45556e=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x45556e['test'](_0x2777c4[_0xc3e5('0x19')]);}}));_0x4cb0db['use']('/api/users',require(_0xc3e5('0x1d')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x1e'),require('./api/voiceChanSpy'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x1f'),require(_0xc3e5('0x20')));_0x4cb0db[_0xc3e5('0x9')]('/api/voice/extensions',require(_0xc3e5('0x21')));_0x4cb0db['use'](_0xc3e5('0x22'),require(_0xc3e5('0x23')));_0x4cb0db[_0xc3e5('0x9')]('/api/voice/queues',require('./api/voiceQueue'));_0x4cb0db['use'](_0xc3e5('0x24'),require(_0xc3e5('0x25')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x26'),require(_0xc3e5('0x27')));_0x4cb0db[_0xc3e5('0x9')]('/api/voice/mails',require(_0xc3e5('0x28')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x29'),require(_0xc3e5('0x2a')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x2b'),require(_0xc3e5('0x2c')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x2d'),require(_0xc3e5('0x2e')));_0x4cb0db[_0xc3e5('0x9')]('/api/voice/agents/reports',require(_0xc3e5('0x2f')));_0x4cb0db['use'](_0xc3e5('0x30'),require(_0xc3e5('0x31')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x32'),require('./api/memberReport'));_0x4cb0db[_0xc3e5('0x9')]('/api/trunks',require('./api/trunk'));_0x4cb0db[_0xc3e5('0x9')]('/api/voice/transfers/reports',require(_0xc3e5('0x33')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x34'),require(_0xc3e5('0x35')));_0x4cb0db[_0xc3e5('0x9')]('/api/mail/accounts',require(_0xc3e5('0x36')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x37'),require(_0xc3e5('0x38')));_0x4cb0db[_0xc3e5('0x9')]('/api/mail/substatuses',require(_0xc3e5('0x39')));_0x4cb0db['use'](_0xc3e5('0x3a'),require(_0xc3e5('0x3b')));_0x4cb0db['use'](_0xc3e5('0x3c'),require('./api/mailMessage'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x3d'),require(_0xc3e5('0x3e')));_0x4cb0db['use'](_0xc3e5('0x3f'),require(_0xc3e5('0x40')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x41'),require(_0xc3e5('0x42')));_0x4cb0db['use']('/api/dashboards/items',require('./api/dashboardItem'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x43'),require('./api/faxAccount'));_0x4cb0db[_0xc3e5('0x9')]('/api/fax/applications',require(_0xc3e5('0x44')));_0x4cb0db['use'](_0xc3e5('0x45'),require('./api/faxInteraction'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x46'),require(_0xc3e5('0x47')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x48'),require(_0xc3e5('0x49')));_0x4cb0db['use']('/api/fax/reports/queue',require(_0xc3e5('0x4a')));_0x4cb0db['use'](_0xc3e5('0x4b'),require(_0xc3e5('0x4c')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x4d'),require(_0xc3e5('0x4e')));_0x4cb0db[_0xc3e5('0x9')]('/api/sms/interactions',require(_0xc3e5('0x4f')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x50'),require(_0xc3e5('0x51')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x52'),require(_0xc3e5('0x53')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x54'),require(_0xc3e5('0x55')));_0x4cb0db['use']('/api/openchannel/applications',require('./api/openchannelApplication'));_0x4cb0db[_0xc3e5('0x9')]('/api/openchannel/interactions',require(_0xc3e5('0x56')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x57'),require(_0xc3e5('0x58')));_0x4cb0db['use'](_0xc3e5('0x59'),require(_0xc3e5('0x5a')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x5b'),require('./api/chatWebsite'));_0x4cb0db['use'](_0xc3e5('0x5c'),require(_0xc3e5('0x5d')));_0x4cb0db['use'](_0xc3e5('0x5e'),require('./api/chatApplication'));_0x4cb0db[_0xc3e5('0x9')]('/api/chat/interactions',require(_0xc3e5('0x5f')));_0x4cb0db['use']('/api/chat/messages',require('./api/chatMessage'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x60'),require(_0xc3e5('0x61')));_0x4cb0db['use']('/api/chat/queues',require(_0xc3e5('0x62')));_0x4cb0db['use'](_0xc3e5('0x63'),require(_0xc3e5('0x64')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x65'),require(_0xc3e5('0x66')));_0x4cb0db[_0xc3e5('0x9')]('/api/cm/companies',require(_0xc3e5('0x67')));_0x4cb0db['use']('/api/cm/contacts',require(_0xc3e5('0x68')));_0x4cb0db['use'](_0xc3e5('0x69'),require('./api/cmHopper'));_0x4cb0db['use'](_0xc3e5('0x6a'),require(_0xc3e5('0x6b')));_0x4cb0db['use']('/api/cm/hopper_final',require(_0xc3e5('0x6c')));_0x4cb0db[_0xc3e5('0x9')]('/api/cm/hopper_history',require(_0xc3e5('0x6d')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x6e'),require(_0xc3e5('0x6f')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x70'),require(_0xc3e5('0x71')));_0x4cb0db['use'](_0xc3e5('0x72'),require(_0xc3e5('0x73')));_0x4cb0db['use']('/api/canned_answers',require(_0xc3e5('0x74')));_0x4cb0db[_0xc3e5('0x9')]('/api/dispositions',require('./api/disposition'));_0x4cb0db['use']('/api/conditions',require(_0xc3e5('0x75')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x76'),require(_0xc3e5('0x77')));_0x4cb0db[_0xc3e5('0x9')]('/api/pauses',require(_0xc3e5('0x78')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x79'),require('./api/cdr'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x7a'),require(_0xc3e5('0x7b')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x7c'),require('./api/schedule'));_0x4cb0db['use'](_0xc3e5('0x7d'),require(_0xc3e5('0x7e')));_0x4cb0db['use'](_0xc3e5('0x7f'),require(_0xc3e5('0x80')));_0x4cb0db['use'](_0xc3e5('0x81'),require(_0xc3e5('0x82')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x83'),require(_0xc3e5('0x84')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x85'),require(_0xc3e5('0x86')));_0x4cb0db['use'](_0xc3e5('0x87'),require(_0xc3e5('0x88')));_0x4cb0db[_0xc3e5('0x9')]('/api/integrations/reports',require('./api/integrationReport'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x89'),require(_0xc3e5('0x8a')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x8b'),require(_0xc3e5('0x8c')));_0x4cb0db['use'](_0xc3e5('0x8d'),require('./api/analyticExtractedReport'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x8e'),require(_0xc3e5('0x8f')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x90'),require(_0xc3e5('0x91')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x92'),require(_0xc3e5('0x93')));_0x4cb0db[_0xc3e5('0x9')]('/api/integrations/salesforce/accounts',require('./api/intSalesforceAccount'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x94'),require(_0xc3e5('0x95')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x96'),require(_0xc3e5('0x97')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x98'),require(_0xc3e5('0x99')));_0x4cb0db['use']('/api/integrations/sugarcrm/configurations',require(_0xc3e5('0x9a')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x9b'),require(_0xc3e5('0x9c')));_0x4cb0db['use'](_0xc3e5('0x9d'),require(_0xc3e5('0x9e')));_0x4cb0db['use'](_0xc3e5('0x9f'),require(_0xc3e5('0xa0')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xa1'),require('./api/intDeskField'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xa2'),require('./api/intZohoAccount'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xa3'),require(_0xc3e5('0xa4')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xa5'),require(_0xc3e5('0xa6')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xa7'),require(_0xc3e5('0xa8')));_0x4cb0db[_0xc3e5('0x9')]('/api/integrations/zendesk/configurations',require(_0xc3e5('0xa9')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xaa'),require(_0xc3e5('0xab')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xac'),require(_0xc3e5('0xad')));_0x4cb0db['use'](_0xc3e5('0xae'),require(_0xc3e5('0xaf')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xb0'),require(_0xc3e5('0xb1')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xb2'),require(_0xc3e5('0xb3')));_0x4cb0db['use']('/api/integrations/vtiger/configurations',require(_0xc3e5('0xb4')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xb5'),require(_0xc3e5('0xb6')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xb7'),require('./api/intServicenowAccount'));_0x4cb0db['use'](_0xc3e5('0xb8'),require(_0xc3e5('0xb9')));_0x4cb0db[_0xc3e5('0x9')]('/api/integrations/servicenow/fields',require(_0xc3e5('0xba')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xbb'),require(_0xc3e5('0xbc')));_0x4cb0db['use'](_0xc3e5('0xbd'),require('./api/intDynamics365Configuration'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xbe'),require('./api/intDynamics365Field'));_0x4cb0db['use'](_0xc3e5('0xbf'),require(_0xc3e5('0xc0')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xc1'),require(_0xc3e5('0xc2')));_0x4cb0db[_0xc3e5('0x9')]('/api/chat/internal/messages',require(_0xc3e5('0xc3')));_0x4cb0db[_0xc3e5('0x9')]('/api/jscripty/answers/reports',require(_0xc3e5('0xc4')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xc5'),require(_0xc3e5('0xc6')));_0x4cb0db['use'](_0xc3e5('0xc7'),require(_0xc3e5('0xc8')));_0x4cb0db['use'](_0xc3e5('0xc9'),require('./api/smsQueueReport'));_0x4cb0db['use'](_0xc3e5('0xca'),require(_0xc3e5('0xcb')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xcc'),require('./api/squareReportDetail'));_0x4cb0db['use'](_0xc3e5('0xcd'),require(_0xc3e5('0xce')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xcf'),require(_0xc3e5('0xd0')));_0x4cb0db['use'](_0xc3e5('0xd1'),require(_0xc3e5('0xd2')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xd3'),require(_0xc3e5('0xd4')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xd5'),require('./api/squareRecording'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xd6'),require(_0xc3e5('0xd7')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xd8'),require(_0xc3e5('0xd9')));_0x4cb0db['use'](_0xc3e5('0xda'),require('./api/license'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xdb'),require(_0xc3e5('0xdc')));_0x4cb0db[_0xc3e5('0x9')]('/api/migrations',require(_0xc3e5('0xdd')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xde'),require(_0xc3e5('0xdf')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xe0'),require(_0xc3e5('0xe1')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xe2'),require(_0xc3e5('0xe3')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xe4'),require('./api/chatTransferReport'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xe5'),require(_0xc3e5('0xe6')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xe7'),require('./api/openchannelTransferReport'));_0x4cb0db['use'](_0xc3e5('0xe8'),require('./api/smsTransferReport'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xe9'),require(_0xc3e5('0xea')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xeb'),require('./api/voicePrefix'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xec'),require('./api/userProfile'));_0x4cb0db['use'](_0xc3e5('0xed'),require(_0xc3e5('0xee')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xef'),require(_0xc3e5('0xf0')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xf1'),require(_0xc3e5('0xf2')));_0x4cb0db['use'](_0xc3e5('0xf3'),require(_0xc3e5('0xf4')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xf5'),require('./api/jira'));_0x4cb0db[_0xc3e5('0x9')]('/api/rpc',require(_0xc3e5('0xf6')));_0x4cb0db[_0xc3e5('0x9')]('/api/version',require(_0xc3e5('0xf7')));_0x4cb0db[_0xc3e5('0x9')]('/api/system',require('./api/system'));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xf8'),require(_0xc3e5('0xf9')));_0x4cb0db[_0xc3e5('0x9')]('/apidoc',express[_0xc3e5('0xfa')](path['join'](config[_0xc3e5('0xfb')],_0xc3e5('0xfc'))));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xfd'),express[_0xc3e5('0xfa')](path['join'](config[_0xc3e5('0xfb')],_0xc3e5('0xfd'))));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0xfe'),express[_0xc3e5('0xfa')](path[_0xc3e5('0xff')](config[_0xc3e5('0xfb')],'/demo')));_0x4cb0db[_0xc3e5('0x9')](_0xc3e5('0x100'),express['static'](path['join'](config[_0xc3e5('0xfb')],_0xc3e5('0x101'),'1.0.14')));_0x4cb0db['use']('/plugins',express[_0xc3e5('0xfa')](path['join'](config[_0xc3e5('0xfb')],_0xc3e5('0x102'))));_0x4cb0db['route']('/:url(api|auth|components|app|bower_components|assets)/*')[_0xc3e5('0x103')](errors[0x194]);_0x4cb0db[_0xc3e5('0x104')]('/*')[_0xc3e5('0x103')](function(_0x395d0f,_0x7efbf8){_0x7efbf8['sendFile'](path['resolve'](_0x4cb0db[_0xc3e5('0x103')]('appPath')+_0xc3e5('0x105')));});};
\ No newline at end of file
+var _0x39cb=['./api/voiceQueuesLog','/api/schedules','./api/schedule','/api/sounds','/api/tags','./api/tag','/api/templates','./api/template','/api/triggers','./api/trigger','/api/variables','./api/variable','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','./api/analyticMetric','/api/analytics/field_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','/api/integrations/sugarcrm/configurations','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','./api/intSugarcrmField','/api/integrations/desk/accounts','./api/intDeskAccount','./api/intDeskConfiguration','/api/integrations/desk/fields','/api/integrations/zoho/configurations','./api/intZohoConfiguration','/api/integrations/zoho/fields','/api/integrations/zendesk/accounts','./api/intZendeskAccount','/api/integrations/zendesk/configurations','./api/intZendeskConfiguration','/api/integrations/zendesk/fields','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','./api/intVtigerAccount','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','/api/integrations/dynamics365/fields','./api/intDynamics365Field','/api/networks','./api/network','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','./api/squareReport','/api/square/details/reports','./api/squareReportDetail','/api/jscripty/projects','./api/jscriptyProject','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','/api/square/messages','./api/squareMessage','./api/team','/api/license','./api/license','/api/campaigns','./api/campaign','/api/migrations','./api/migration','/api/attachments','/api/plugins','./api/plugin','/api/mail/reports/transfer','./api/mailTransferReport','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','./api/openchannelTransferReport','/api/sms/reports/transfer','./api/smsTransferReport','/api/cm/lists','./api/cmList','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/auth/local','/api/auth/google','/api/jira','./api/jira','/api/rpc','/api/version','/api/system','./api/system','/api/pm2','./api/pm2','/apidoc','static','join','/www','root','/demo','/snippet','1.0.14','/plugins','/server/files/plugins','get','route','sendFile','resolve','appPath','express','express-winston','./errors','./config/environment','api','./config/logger','auth','default','logger','format','headers','x-forwarded-for','statusCode','responseTime','user','name','role','use','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','body','device','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','method','connection','remoteAddress','url','other','agent_id','agent_name','test','/api/users','/api/voice/chanspy','./api/voiceChanSpy','/api/voice/contexts','./api/voiceContext','/api/voice/extensions','./api/voiceExtension','./api/voiceMusicOnHold','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','/api/voice/mails','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','./api/voiceDialReport','./api/voiceAgentReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','./api/memberReport','/api/trunks','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailQueue','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','/api/mail/applications','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','/api/dashboards/items','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','/api/fax/applications','./api/faxApplication','/api/fax/interactions','./api/faxInteraction','/api/fax/messages','./api/faxMessage','./api/faxQueue','/api/fax/reports/queue','./api/faxQueueReport','/api/sms/accounts','./api/smsAccount','/api/sms/applications','/api/sms/interactions','./api/smsInteraction','./api/smsMessage','/api/sms/queues','./api/smsQueue','/api/openchannel/accounts','./api/openchannelAccount','/api/openchannel/applications','./api/openchannelApplication','./api/openchannelInteraction','./api/openchannelMessage','/api/openchannel/queues','./api/openchannelQueue','/api/chat/websites','./api/chatWebsite','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','/api/chat/messages','./api/chatMessage','/api/chat/offline_messages','./api/chatOfflineMessage','/api/chat/queues','./api/chatQueue','/api/chat/groups','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','/api/cm/contacts','/api/cm/hopper','./api/cmHopper','./api/cmHopperBlack','./api/cmHopperFinal','./api/cmHopperHistory','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','./api/automation','/api/canned_answers','./api/cannedAnswer','./api/disposition','/api/conditions','./api/condition','/api/intervals','./api/interval','/api/pauses','./api/pause','/api/cdr','./api/cdr','/api/voiceQueuesLog'];(function(_0x59ad1b,_0x54c7a1){var _0x34637d=function(_0x4b30e8){while(--_0x4b30e8){_0x59ad1b['push'](_0x59ad1b['shift']());}};_0x34637d(++_0x54c7a1);}(_0x39cb,0x1bd));var _0xb39c=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x39cb[_0xfae23b];return _0x200640;};'use strict';var path=require('path');var express=require(_0xb39c('0x0'));var ewinston=require(_0xb39c('0x1'));var util=require('util');var errors=require(_0xb39c('0x2'));var config=require(_0xb39c('0x3'));var logger=require('./config/logger')(_0xb39c('0x4'));var authLogger=require(_0xb39c('0x5'))(_0xb39c('0x6'));exports[_0xb39c('0x7')]=function(_0x8a0b3f){_0x8a0b3f['use'](ewinston[_0xb39c('0x8')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x2fc868,_0x40112f){return util[_0xb39c('0x9')]('%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s',_0x2fc868['method'],_0x2fc868[_0xb39c('0xa')][_0xb39c('0xb')]?_0x2fc868[_0xb39c('0xa')][_0xb39c('0xb')]:_0x2fc868['connection']['remoteAddress']||_0x2fc868['ip'],_0x2fc868['url'],_0x40112f[_0xb39c('0xc')],_0x40112f[_0xb39c('0xd')],_0x2fc868[_0xb39c('0xe')]?_0x2fc868[_0xb39c('0xe')]['id']:null,_0x2fc868[_0xb39c('0xe')]?_0x2fc868[_0xb39c('0xe')][_0xb39c('0xf')]:null,_0x2fc868[_0xb39c('0xe')]?_0x2fc868['user'][_0xb39c('0x10')]:null);}}));_0x8a0b3f[_0xb39c('0x11')](ewinston[_0xb39c('0x8')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x5e4caf,_0xf4662a){var _0x40a6d3=_0xb39c('0x12');if(_0x5e4caf[_0xb39c('0x13')]&&_0x5e4caf[_0xb39c('0x13')][_0xb39c('0x14')]&&_0x5e4caf[_0xb39c('0x13')]['agent_id']){_0x40a6d3=_0xb39c('0x15');}return util[_0xb39c('0x9')](_0x40a6d3,_0x5e4caf[_0xb39c('0x16')],_0x5e4caf[_0xb39c('0xa')][_0xb39c('0xb')]?_0x5e4caf[_0xb39c('0xa')][_0xb39c('0xb')]:_0x5e4caf[_0xb39c('0x17')][_0xb39c('0x18')]||_0x5e4caf['ip'],_0x5e4caf[_0xb39c('0x19')],_0xf4662a['statusCode'],_0xf4662a[_0xb39c('0xd')],_0x5e4caf[_0xb39c('0xe')]?_0x5e4caf[_0xb39c('0xe')]['id']:null,_0x5e4caf[_0xb39c('0xe')]?_0x5e4caf['user'][_0xb39c('0xf')]:null,_0x5e4caf[_0xb39c('0xe')]?_0x5e4caf['user'][_0xb39c('0x10')]:null,_0x5e4caf[_0xb39c('0x13')]&&_0x5e4caf[_0xb39c('0x13')]['device']?_0x5e4caf['body'][_0xb39c('0x14')]:_0xb39c('0x1a'),_0x5e4caf[_0xb39c('0x13')]&&_0x5e4caf['body'][_0xb39c('0x1b')]?_0x5e4caf[_0xb39c('0x13')][_0xb39c('0x1b')]:'',_0x5e4caf[_0xb39c('0x13')]&&_0x5e4caf[_0xb39c('0x13')]['agent_name']?_0x5e4caf[_0xb39c('0x13')][_0xb39c('0x1c')]:'');},'ignoreRoute':function(_0x583ee5){var _0x1fd145=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x1fd145[_0xb39c('0x1d')](_0x583ee5[_0xb39c('0x19')]);}}));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x1e'),require('./api/user'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x1f'),require(_0xb39c('0x20')));_0x8a0b3f['use'](_0xb39c('0x21'),require(_0xb39c('0x22')));_0x8a0b3f['use'](_0xb39c('0x23'),require(_0xb39c('0x24')));_0x8a0b3f[_0xb39c('0x11')]('/api/voice/mohs',require(_0xb39c('0x25')));_0x8a0b3f[_0xb39c('0x11')]('/api/voice/queues',require(_0xb39c('0x26')));_0x8a0b3f['use'](_0xb39c('0x27'),require(_0xb39c('0x28')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x29'),require(_0xb39c('0x2a')));_0x8a0b3f['use'](_0xb39c('0x2b'),require('./api/voiceMail'));_0x8a0b3f[_0xb39c('0x11')]('/api/voice/mails/messages',require(_0xb39c('0x2c')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x2d'),require(_0xb39c('0x2e')));_0x8a0b3f['use']('/api/voice/dials/reports',require(_0xb39c('0x2f')));_0x8a0b3f[_0xb39c('0x11')]('/api/voice/agents/reports',require(_0xb39c('0x30')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x31'),require(_0xb39c('0x32')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x33'),require(_0xb39c('0x34')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x35'),require(_0xb39c('0x36')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x37'),require(_0xb39c('0x38')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x39'),require(_0xb39c('0x3a')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x3b'),require(_0xb39c('0x3c')));_0x8a0b3f['use'](_0xb39c('0x3d'),require(_0xb39c('0x3e')));_0x8a0b3f['use']('/api/mail/substatuses',require('./api/mailSubstatus'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x3f'),require(_0xb39c('0x40')));_0x8a0b3f['use'](_0xb39c('0x41'),require(_0xb39c('0x42')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x43'),require(_0xb39c('0x44')));_0x8a0b3f['use'](_0xb39c('0x45'),require(_0xb39c('0x46')));_0x8a0b3f['use'](_0xb39c('0x47'),require('./api/dashboard'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x48'),require(_0xb39c('0x49')));_0x8a0b3f['use'](_0xb39c('0x4a'),require(_0xb39c('0x4b')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x4c'),require(_0xb39c('0x4d')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x4e'),require(_0xb39c('0x4f')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x50'),require(_0xb39c('0x51')));_0x8a0b3f[_0xb39c('0x11')]('/api/fax/queues',require(_0xb39c('0x52')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x53'),require(_0xb39c('0x54')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x55'),require(_0xb39c('0x56')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x57'),require('./api/smsApplication'));_0x8a0b3f['use'](_0xb39c('0x58'),require(_0xb39c('0x59')));_0x8a0b3f['use']('/api/sms/messages',require(_0xb39c('0x5a')));_0x8a0b3f['use'](_0xb39c('0x5b'),require(_0xb39c('0x5c')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x5d'),require(_0xb39c('0x5e')));_0x8a0b3f['use'](_0xb39c('0x5f'),require(_0xb39c('0x60')));_0x8a0b3f['use']('/api/openchannel/interactions',require(_0xb39c('0x61')));_0x8a0b3f['use']('/api/openchannel/messages',require(_0xb39c('0x62')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x63'),require(_0xb39c('0x64')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x65'),require(_0xb39c('0x66')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x67'),require(_0xb39c('0x68')));_0x8a0b3f['use'](_0xb39c('0x69'),require(_0xb39c('0x6a')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x6b'),require(_0xb39c('0x6c')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x6d'),require(_0xb39c('0x6e')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x6f'),require(_0xb39c('0x70')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x71'),require(_0xb39c('0x72')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x73'),require('./api/chatGroup'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x74'),require(_0xb39c('0x75')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x76'),require(_0xb39c('0x77')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x78'),require('./api/cmContact'));_0x8a0b3f['use'](_0xb39c('0x79'),require(_0xb39c('0x7a')));_0x8a0b3f['use']('/api/cm/hopper_black',require(_0xb39c('0x7b')));_0x8a0b3f[_0xb39c('0x11')]('/api/cm/hopper_final',require(_0xb39c('0x7c')));_0x8a0b3f['use']('/api/cm/hopper_history',require(_0xb39c('0x7d')));_0x8a0b3f['use'](_0xb39c('0x7e'),require(_0xb39c('0x7f')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x80'),require(_0xb39c('0x81')));_0x8a0b3f[_0xb39c('0x11')]('/api/automations',require(_0xb39c('0x82')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x83'),require(_0xb39c('0x84')));_0x8a0b3f[_0xb39c('0x11')]('/api/dispositions',require(_0xb39c('0x85')));_0x8a0b3f['use'](_0xb39c('0x86'),require(_0xb39c('0x87')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x88'),require(_0xb39c('0x89')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x8a'),require(_0xb39c('0x8b')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x8c'),require(_0xb39c('0x8d')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x8e'),require(_0xb39c('0x8f')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x90'),require(_0xb39c('0x91')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x92'),require('./api/sound'));_0x8a0b3f['use'](_0xb39c('0x93'),require(_0xb39c('0x94')));_0x8a0b3f['use'](_0xb39c('0x95'),require(_0xb39c('0x96')));_0x8a0b3f['use'](_0xb39c('0x97'),require(_0xb39c('0x98')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x99'),require(_0xb39c('0x9a')));_0x8a0b3f[_0xb39c('0x11')]('/api/integrations',require(_0xb39c('0x9b')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x9c'),require(_0xb39c('0x9d')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x9e'),require(_0xb39c('0x9f')));_0x8a0b3f['use'](_0xb39c('0xa0'),require(_0xb39c('0xa1')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xa2'),require(_0xb39c('0xa3')));_0x8a0b3f['use']('/api/analytics/metrics',require(_0xb39c('0xa4')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xa5'),require('./api/analyticFieldReport'));_0x8a0b3f[_0xb39c('0x11')]('/api/analytics/tree_reports',require(_0xb39c('0xa6')));_0x8a0b3f['use'](_0xb39c('0xa7'),require(_0xb39c('0xa8')));_0x8a0b3f[_0xb39c('0x11')]('/api/integrations/salesforce/configurations',require(_0xb39c('0xa9')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xaa'),require(_0xb39c('0xab')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xac'),require(_0xb39c('0xad')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xae'),require(_0xb39c('0xaf')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xb0'),require(_0xb39c('0xb1')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xb2'),require(_0xb39c('0xb3')));_0x8a0b3f[_0xb39c('0x11')]('/api/integrations/desk/configurations',require(_0xb39c('0xb4')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xb5'),require('./api/intDeskField'));_0x8a0b3f[_0xb39c('0x11')]('/api/integrations/zoho/accounts',require('./api/intZohoAccount'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xb6'),require(_0xb39c('0xb7')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xb8'),require('./api/intZohoField'));_0x8a0b3f['use'](_0xb39c('0xb9'),require(_0xb39c('0xba')));_0x8a0b3f['use'](_0xb39c('0xbb'),require(_0xb39c('0xbc')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xbd'),require(_0xb39c('0xbe')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xbf'),require(_0xb39c('0xc0')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xc1'),require(_0xb39c('0xc2')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xc3'),require(_0xb39c('0xc4')));_0x8a0b3f[_0xb39c('0x11')]('/api/integrations/vtiger/accounts',require(_0xb39c('0xc5')));_0x8a0b3f['use'](_0xb39c('0xc6'),require(_0xb39c('0xc7')));_0x8a0b3f['use'](_0xb39c('0xc8'),require(_0xb39c('0xc9')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xca'),require(_0xb39c('0xcb')));_0x8a0b3f[_0xb39c('0x11')]('/api/integrations/servicenow/configurations',require(_0xb39c('0xcc')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xcd'),require(_0xb39c('0xce')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xcf'),require(_0xb39c('0xd0')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xd1'),require('./api/intDynamics365Configuration'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xd2'),require(_0xb39c('0xd3')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xd4'),require(_0xb39c('0xd5')));_0x8a0b3f[_0xb39c('0x11')]('/api/chat/reports/queue',require(_0xb39c('0xd6')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xd7'),require(_0xb39c('0xd8')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xd9'),require(_0xb39c('0xda')));_0x8a0b3f[_0xb39c('0x11')]('/api/jscripty/questions/reports',require(_0xb39c('0xdb')));_0x8a0b3f['use'](_0xb39c('0xdc'),require(_0xb39c('0xdd')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xde'),require(_0xb39c('0xdf')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xe0'),require(_0xb39c('0xe1')));_0x8a0b3f['use'](_0xb39c('0xe2'),require(_0xb39c('0xe3')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xe4'),require(_0xb39c('0xe5')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xe6'),require(_0xb39c('0xe7')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xe8'),require(_0xb39c('0xe9')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xea'),require(_0xb39c('0xeb')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xec'),require('./api/squareRecording'));_0x8a0b3f['use'](_0xb39c('0xed'),require(_0xb39c('0xee')));_0x8a0b3f[_0xb39c('0x11')]('/api/teams',require(_0xb39c('0xef')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xf0'),require(_0xb39c('0xf1')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xf2'),require(_0xb39c('0xf3')));_0x8a0b3f['use'](_0xb39c('0xf4'),require(_0xb39c('0xf5')));_0x8a0b3f['use'](_0xb39c('0xf6'),require('./api/attachment'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xf7'),require(_0xb39c('0xf8')));_0x8a0b3f['use'](_0xb39c('0xf9'),require(_0xb39c('0xfa')));_0x8a0b3f['use'](_0xb39c('0xfb'),require(_0xb39c('0xfc')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xfd'),require(_0xb39c('0xfe')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0xff'),require(_0xb39c('0x100')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x101'),require(_0xb39c('0x102')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x103'),require(_0xb39c('0x104')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x105'),require(_0xb39c('0x106')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x107'),require(_0xb39c('0x108')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x109'),require(_0xb39c('0x10a')));_0x8a0b3f['use'](_0xb39c('0x10b'),require(_0xb39c('0x10c')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x10d'),require('./api/authLocal'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x10e'),require('./api/authGoogle'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x10f'),require(_0xb39c('0x110')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x111'),require('./api/rpc'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x112'),require('./api/version'));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x113'),require(_0xb39c('0x114')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x115'),require(_0xb39c('0x116')));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x117'),express[_0xb39c('0x118')](path[_0xb39c('0x119')](config['root'],_0xb39c('0x117'))));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x11a'),express[_0xb39c('0x118')](path['join'](config[_0xb39c('0x11b')],_0xb39c('0x11a'))));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x11c'),express['static'](path[_0xb39c('0x119')](config[_0xb39c('0x11b')],_0xb39c('0x11c'))));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x11d'),express[_0xb39c('0x118')](path[_0xb39c('0x119')](config[_0xb39c('0x11b')],'snippet',_0xb39c('0x11e'))));_0x8a0b3f[_0xb39c('0x11')](_0xb39c('0x11f'),express[_0xb39c('0x118')](path[_0xb39c('0x119')](config[_0xb39c('0x11b')],_0xb39c('0x120'))));_0x8a0b3f['route']('/:url(api|auth|components|app|bower_components|assets)/*')[_0xb39c('0x121')](errors[0x194]);_0x8a0b3f[_0xb39c('0x122')]('/*')[_0xb39c('0x121')](function(_0x5e899a,_0x408119){_0x408119[_0xb39c('0x123')](path[_0xb39c('0x124')](_0x8a0b3f[_0xb39c('0x121')](_0xb39c('0x125'))+'/index.html'));});};
\ No newline at end of file
diff --git a/server/rpc/index.js b/server/rpc/index.js
index bd71f59..89c2bd9 100644
--- a/server/rpc/index.js
+++ b/server/rpc/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9417=['../api/faxQueue/faxQueue.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/template/template.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','http','port','rpc','localhost','error','listen','log','../config/triggers','RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','../config/environment','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/mailAccount/mailAccount.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc'];(function(_0x217c2e,_0x358f06){var _0x22b7d8=function(_0x111c48){while(--_0x111c48){_0x217c2e['push'](_0x217c2e['shift']());}};_0x22b7d8(++_0x358f06);}(_0x9417,0xb4));var _0x7941=function(_0x3d5df9,_0x5b3623){_0x3d5df9=_0x3d5df9-0x0;var _0x50ba39=_0x9417[_0x3d5df9];return _0x50ba39;};'use strict';var jayson=require(_0x7941('0x0'));var BPromise=require(_0x7941('0x1'));var _=require(_0x7941('0x2'));var config=require(_0x7941('0x3'));exports['listen']=function(){return new BPromise(function(_0x32968f,_0x240766){var _0x17e465={};_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x5')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x6')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x7')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/voiceRecording/voiceRecording.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x8')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x9')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0xa')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0xb')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0xc')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/userVoiceQueueRt/userVoiceQueueRt.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/mailServerIn/mailServerIn.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0xd')));_0x17e465=_['merge'](_0x17e465,require('../api/mailQueue/mailQueue.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/mailInteraction/mailInteraction.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0xe')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0xf')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x10')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x11')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x12')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x13')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x14')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x15')));_0x17e465=_['merge'](_0x17e465,require('../api/faxQueueReport/faxQueueReport.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/smsAccount/smsAccount.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x16')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/smsMessage/smsMessage.rpc'));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x17')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x18')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x19')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x1a')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x1b')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x1c')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x1d')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x1e')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x1f')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/cmContact/cmContact.rpc'));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x20')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x21')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x22')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x23')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x24')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x25')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x26')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x27')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x28')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x29')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x2a')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x2b')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x2c')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x2d')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/intZendeskAccount/intZendeskAccount.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x2e')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x2f')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/intServicenowAccount/intServicenowAccount.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x30')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x31')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x32')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/squareReport/squareReport.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x33')));_0x17e465=_['merge'](_0x17e465,require(_0x7941('0x34')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x35')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x36')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require('../api/squareMessage/squareMessage.rpc'));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x37')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x38')));_0x17e465=_[_0x7941('0x4')](_0x17e465,require(_0x7941('0x39')));var _0x772541=jayson['server'](_0x17e465)[_0x7941('0x3a')]();var _0x2b5553=config['rpc']['port']||config[_0x7941('0x3b')]+0x1;var _0x403660=config[_0x7941('0x3c')]['ip']||_0x7941('0x3d');_0x772541['on'](_0x7941('0x3e'),function(_0x2a59f6){return _0x240766(_0x2a59f6);});_0x772541[_0x7941('0x3f')](_0x2b5553,_0x403660,function(){console[_0x7941('0x40')]('Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!',_0x403660,_0x2b5553);require(_0x7941('0x41'))['default']();return _0x32968f(_0x7941('0x42')+_0x403660+':'+_0x2b5553);});});};
\ No newline at end of file
+var _0xf3ff=['../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/template/template.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/plugin/plugin.rpc','server','http','rpc','port','localhost','error','default','jayson/promise','lodash','../config/environment','listen','../api/user/user.rpc','merge'];(function(_0x345ce1,_0xfc45bd){var _0xcfe88c=function(_0x365333){while(--_0x365333){_0x345ce1['push'](_0x345ce1['shift']());}};_0xcfe88c(++_0xfc45bd);}(_0xf3ff,0xae));var _0xff3f=function(_0x56ad53,_0x5c9634){_0x56ad53=_0x56ad53-0x0;var _0x413acc=_0xf3ff[_0x56ad53];return _0x413acc;};'use strict';var jayson=require(_0xff3f('0x0'));var BPromise=require('bluebird');var _=require(_0xff3f('0x1'));var config=require(_0xff3f('0x2'));exports[_0xff3f('0x3')]=function(){return new BPromise(function(_0x3772c2,_0x16d95d){var _0x262446={};_0x262446=_['merge'](_0x262446,require(_0xff3f('0x4')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x6')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x7')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/voiceRecording/voiceRecording.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x8')));_0x262446=_['merge'](_0x262446,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x9')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0xa')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0xb')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0xc')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0xd')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0xe')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0xf')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/mailAccount/mailAccount.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x10')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x11')));_0x262446=_['merge'](_0x262446,require('../api/mailMessage/mailMessage.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/mailApplication/mailApplication.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x12')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/faxAccount/faxAccount.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/faxApplication/faxApplication.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/faxInteraction/faxInteraction.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x13')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/faxQueue/faxQueue.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x14')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x15')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x16')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x17')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x18')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x19')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x1a')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x1b')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/openchannelQueue/openchannelQueue.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x1c')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x1d')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/chatMessage/chatMessage.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/chatQueue/chatQueue.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/cmContact/cmContact.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x1e')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x1f')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/cmHopperFinal/cmHopperFinal.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x20')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x21')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x22')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x23')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/sound/sound.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x24')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x25')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x26')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x27')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x28')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x29')));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x2a')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x2b')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x2c')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x2d')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/intServicenowAccount/intServicenowAccount.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x2e')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x2f')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/smsQueueReport/smsQueueReport.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x30')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/squareReportDetail/squareReportDetail.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x31')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/squareProject/squareProject.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/squareRecording/squareRecording.rpc'));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x32')));_0x262446=_[_0xff3f('0x5')](_0x262446,require(_0xff3f('0x33')));_0x262446=_[_0xff3f('0x5')](_0x262446,require('../api/attachment/attachment.rpc'));_0x262446=_['merge'](_0x262446,require(_0xff3f('0x34')));var _0x48fda6=jayson[_0xff3f('0x35')](_0x262446)[_0xff3f('0x36')]();var _0x318de3=config[_0xff3f('0x37')][_0xff3f('0x38')]||config[_0xff3f('0x38')]+0x1;var _0x18f16b=config[_0xff3f('0x37')]['ip']||_0xff3f('0x39');_0x48fda6['on'](_0xff3f('0x3a'),function(_0x24d1dc){return _0x16d95d(_0x24d1dc);});_0x48fda6[_0xff3f('0x3')](_0x318de3,_0x18f16b,function(){console['log']('Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!',_0x18f16b,_0x318de3);require('../config/triggers')[_0xff3f('0x3b')]();return _0x3772c2('RPC\x20listening\x20on\x20'+_0x18f16b+':'+_0x318de3);});});};
\ No newline at end of file
diff --git a/server/services/agi/channel.js b/server/services/agi/channel.js
index 50b2fda..87b09fd 100644
--- a/server/services/agi/channel.js
+++ b/server/services/agi/channel.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa8f8=['HANGUP','setVariable','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber','SAY\x20NUMBER\x20%s\x20%s','sayDigits','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','setPriority','GOTO\x20%s\x20%s\x20%s','GET\x20VARIABLE\x20\x22%s\x22','recordFile','wav','BEEP','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','AGI','wait','WAIT','label','exports','util','lodash','events','EventEmitter','./error','setEncoding','setTimeout','headers','emit','ready','line','toLowerCase','hangup','substring','520-Invalid','search','520\x20End\x20of\x20proper','function','no\x20code','replace','result=','indexOf','substr','startsWith','split','length','match','error','code','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command','write','close','prototype','sync','answer','sendRequest','ANSWER','getData','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','noop','NO\x20MESSAGE','exec','isArray','EXEC\x20%s\x20%s','setExtension','SET\x20EXTENSION\x20%s','SET\x20PRIORITY\x20%s'];(function(_0x55b86a,_0x9f9772){var _0x46f950=function(_0x3113b0){while(--_0x3113b0){_0x55b86a['push'](_0x55b86a['shift']());}};_0x46f950(++_0x9f9772);}(_0xa8f8,0x151));var _0x8a8f=function(_0xee1ec9,_0x2f0599){_0xee1ec9=_0xee1ec9-0x0;var _0x102a53=_0xa8f8[_0xee1ec9];return _0x102a53;};'use strict';var util=require(_0x8a8f('0x0'));var _=require(_0x8a8f('0x1'));var EventEmitter=require(_0x8a8f('0x2'))[_0x8a8f('0x3')];var AGIReply=require('./reply');var AGIError=require(_0x8a8f('0x4'));function AGIChannel(_0x4d8dd3){var _0x5c8f96=this,_0x19bc10=new AGIReply(),_0x36d93c=![],_0x8c7e47={};EventEmitter['call'](_0x5c8f96);_0x4d8dd3[_0x8a8f('0x5')]('utf8');_0x4d8dd3[_0x8a8f('0x6')](0x8*0x3c*0x3c*0x3e8);_0x19bc10['setEncoding']('utf8');_0x19bc10['on'](_0x8a8f('0x7'),function(_0x14c12c){for(var _0x2c1d1c in _0x14c12c){_0x5c8f96[_0x2c1d1c]=_0x14c12c[_0x2c1d1c];}_0x5c8f96[_0x8a8f('0x8')](_0x8a8f('0x9'));});_0x19bc10['on'](_0x8a8f('0xa'),function(_0x5c826a){if(_0x5c826a[_0x8a8f('0xb')]()==_0x8a8f('0xc')){_0x5c8f96[_0x8a8f('0x8')](_0x8a8f('0xc'));return;}if(_0x5c826a[_0x8a8f('0xd')](0x0,0xb)==_0x8a8f('0xe')){_0x36d93c=!![];}if(_0x36d93c){_0x8c7e47['rx']+=_0x5c826a+'\x0a';if(_0x5c826a[_0x8a8f('0xf')](_0x8a8f('0x10'))!=-0x1){_0x36d93c=![];}}else{_0x8c7e47['rx']=_0x5c826a;}if(_0x36d93c){return;}if(typeof _0x8c7e47['cb']==_0x8a8f('0x11')){var _0x57636a=_0x8c7e47['rx'][_0x8a8f('0xd')](0x0,0x3),_0x381d82=null,_0x2b655b=null;_0x57636a=parseInt(_0x57636a);if(isNaN(_0x57636a)){_0x8c7e47['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x8a8f('0x12')});return;}if(_0x57636a!=0xc8){_0x8c7e47['cb'](null,{'code':_0x57636a,'result':-0x1,'extra':'KO'});return;}_0x381d82=_0x8c7e47['rx'][_0x8a8f('0xd')](0x4)[_0x8a8f('0x13')](_0x8a8f('0x14'),'');if(_0x381d82[_0x8a8f('0x15')]('\x20')!=-0x1){_0x381d82=_0x381d82[_0x8a8f('0x16')](0x0,_0x381d82[_0x8a8f('0x15')]('\x20'));}if(_[_0x8a8f('0x17')](_0x381d82,'-1')){_0x381d82=parseInt(_0x381d82);}_0x2b655b=_0x8c7e47['rx'][_0x8a8f('0x18')]('\x20');if(_0x2b655b[_0x8a8f('0x19')]==0x3){_0x2b655b=_0x2b655b[0x2]['substring'](0x1,_0x2b655b[0x2][_0x8a8f('0x19')]-0x1);}else if(_0x2b655b[_0x8a8f('0x19')]>0x3){var _0x15231d=/\((.+)\)/;var _0x5084d4=_0x8c7e47['rx'][_0x8a8f('0x1a')](_0x15231d);if(_0x5084d4){_0x2b655b=_0x5084d4[0x1];}else{_0x2b655b=null;}}else{_0x2b655b=null;}_0x8c7e47['cb'](null,{'code':_0x57636a,'result':_0x381d82,'extra':_0x2b655b});}});_0x4d8dd3['on'](_0x8a8f('0x1b'),function(_0x1e4a92){_0x5c8f96[_0x8a8f('0x8')](_0x8a8f('0x1b'),new AGIError('E_AGI_SOCKET_ERROR',_0x1e4a92[_0x8a8f('0x1c')]));});_0x4d8dd3['on']('close',function(){_0x5c8f96[_0x8a8f('0x8')]('close',new AGIError(_0x8a8f('0x1d')));});_0x4d8dd3['on'](_0x8a8f('0x1e'),function(){_0x5c8f96[_0x8a8f('0x8')](_0x8a8f('0x1e'),new AGIError(_0x8a8f('0x1f')));_0x4d8dd3[_0x8a8f('0x20')]();});_0x4d8dd3[_0x8a8f('0x21')](_0x19bc10);this[_0x8a8f('0x22')]=function(_0x298670,_0x9c1254){var _0x298670=_0x298670||'',_0x9c1254=typeof _0x9c1254==_0x8a8f('0x11')?_0x9c1254:new Function();_0x8c7e47={'tx':_0x298670,'rx':'','cb':_0x9c1254};_0x4d8dd3[_0x8a8f('0x23')](_0x298670+'\x0a');},this[_0x8a8f('0x24')]=function(){_0x4d8dd3[_0x8a8f('0x20')]();};}util['inherits'](AGIChannel,EventEmitter);AGIChannel[_0x8a8f('0x25')]['sendRequest']=function(_0x40fea8){return this[_0x8a8f('0x22')][_0x8a8f('0x26')](this,_0x40fea8);};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x27')]=function(){return this[_0x8a8f('0x28')](_0x8a8f('0x29'));};AGIChannel['prototype'][_0x8a8f('0x2a')]=function(_0x340d11,_0xf4617e,_0x37e336){_0x340d11=_0x340d11===undefined?'beep':_0x340d11;_0xf4617e=_0xf4617e===undefined?'5':_0xf4617e;_0x37e336=_0x37e336===undefined?'1':_0x37e336;return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x2c'),_0x340d11,_0xf4617e*0x3e8,_0x37e336));};AGIChannel['prototype'][_0x8a8f('0x2d')]=function(_0x80729d){_0x80729d=_0x80729d||_0x8a8f('0x2e');return this['sendRequest'](util[_0x8a8f('0x2b')]('VERBOSE\x20\x22%s\x22',_0x80729d));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x2f')]=function(_0x421b81,_0x4d936a){if(_[_0x8a8f('0x30')](_0x4d936a)){return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x31'),_0x421b81,_0x4d936a['join'](',')));}return this['sendRequest'](util['format'](_0x8a8f('0x31'),_0x421b81,_0x4d936a));};AGIChannel[_0x8a8f('0x25')]['setContext']=function(_0x32f2e3){return this['sendRequest'](util[_0x8a8f('0x2b')]('SET\x20CONTEXT\x20%s',_0x32f2e3));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x32')]=function(_0x5ce1b3){return this[_0x8a8f('0x28')](util['format'](_0x8a8f('0x33'),_0x5ce1b3));};AGIChannel[_0x8a8f('0x25')]['setPriority']=function(_0x559c7a){return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x34'),_0x559c7a));};AGIChannel['prototype'][_0x8a8f('0xc')]=function(){return this[_0x8a8f('0x28')](_0x8a8f('0x35'));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x36')]=function(_0x497cca,_0x168335){return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x37'),_0x497cca,_0x168335?_0x168335['toString']()[_0x8a8f('0x13')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x38')]=function(_0x174819,_0x127a3d){return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x39'),_0x174819,_0x127a3d));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x3a')]=function(_0x5d7b88,_0x2484bb){return this['sendRequest'](util[_0x8a8f('0x2b')]('SAY\x20DIGITS\x20%s\x20%s',_0x5d7b88,_0x2484bb));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x3b')]=function(_0x56b8e5,_0x3ce7fa){return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x3c'),_0x56b8e5,_0x3ce7fa));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x3d')]=function(_0x4bea55,_0x183c24,_0x59a633){_0x183c24=_0x183c24||this[_0x8a8f('0x3e')];_0x59a633=_0x59a633||0x1;this['setContext'](_0x4bea55);this[_0x8a8f('0x32')](_0x183c24);this[_0x8a8f('0x3f')](_0x59a633);return this[_0x8a8f('0x2d')](util[_0x8a8f('0x2b')](_0x8a8f('0x40'),_0x4bea55,_0x183c24,_0x59a633));};AGIChannel[_0x8a8f('0x25')]['getVariable']=function(_0x5e2388){return this[_0x8a8f('0x28')](util['format'](_0x8a8f('0x41'),_0x5e2388));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x42')]=function(_0x2a61b6,_0x7a73ff,_0x5af776,_0x2cb2c9,_0x239fef,_0x2e270b){_0x7a73ff=_0x7a73ff||_0x8a8f('0x43');_0x5af776=_0x5af776||'';_0x2cb2c9=_0x2cb2c9===undefined?-0x1:_0x2cb2c9==='-1'?-0x1:_0x2cb2c9*0x3e8;_0x239fef=_0x239fef===undefined?'':'s='+_0x239fef;_0x2e270b=_0x2e270b?_0x8a8f('0x44'):'';return this[_0x8a8f('0x28')](util['format'](_0x8a8f('0x45'),_0x2a61b6,_0x7a73ff,_0x5af776,_0x2cb2c9,_0x2e270b,_0x239fef));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x46')]=function(_0x2caa0f,_0x1e73f8){_0x1e73f8=_0x1e73f8||'';return this[_0x8a8f('0x28')](util[_0x8a8f('0x2b')](_0x8a8f('0x47'),_0x2caa0f,_0x1e73f8));};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x48')]=function(_0x4700ed){return this[_0x8a8f('0x2f')](_0x8a8f('0x49'),_0x4700ed);};AGIChannel[_0x8a8f('0x25')][_0x8a8f('0x4a')]=function(_0x1159e0){return this[_0x8a8f('0x2f')](_0x8a8f('0x4b'),_0x1159e0);};AGIChannel['prototype'][_0x8a8f('0x1b')]=function(_0x923f51,_0x15e54e){this[_0x8a8f('0x2d')](util[_0x8a8f('0x2b')]('ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s',_0x923f51['id'],_0x923f51[_0x8a8f('0x4c')],_0x15e54e));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x8a8f('0x4d')]=AGIChannel;
\ No newline at end of file
+var _0xf5d4=['520-Invalid','520\x20End\x20of\x20proper','function','no\x20code','replace','indexOf','substr','startsWith','length','match','error','close','E_AGI_SOCKET_CLOSE','timeout','destroy','pipe','command','write','inherits','prototype','sendRequest','sync','answer','ANSWER','getData','format','noop','VERBOSE\x20\x22%s\x22','isArray','join','EXEC\x20%s\x20%s','setContext','SET\x20CONTEXT\x20%s','setExtension','SET\x20EXTENSION\x20%s','SET\x20PRIORITY\x20%s','HANGUP','setVariable','SET\x20VARIABLE\x20%s\x20\x22%s\x22','SAY\x20NUMBER\x20%s\x20%s','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','setPriority','getVariable','GET\x20VARIABLE\x20\x22%s\x22','recordFile','wav','BEEP','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','exec','AGI','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','util','lodash','./error','call','setEncoding','utf8','headers','emit','ready','hangup','substring'];(function(_0x173909,_0x3bd449){var _0x45f1ea=function(_0x3b7228){while(--_0x3b7228){_0x173909['push'](_0x173909['shift']());}};_0x45f1ea(++_0x3bd449);}(_0xf5d4,0xcd));var _0x4f5d=function(_0x503f4b,_0x266829){_0x503f4b=_0x503f4b-0x0;var _0x32b7a7=_0xf5d4[_0x503f4b];return _0x32b7a7;};'use strict';var util=require(_0x4f5d('0x0'));var _=require(_0x4f5d('0x1'));var EventEmitter=require('events')['EventEmitter'];var AGIReply=require('./reply');var AGIError=require(_0x4f5d('0x2'));function AGIChannel(_0x11b706){var _0x291763=this,_0x1487d6=new AGIReply(),_0x28a7b7=![],_0x195e05={};EventEmitter[_0x4f5d('0x3')](_0x291763);_0x11b706[_0x4f5d('0x4')](_0x4f5d('0x5'));_0x11b706['setTimeout'](0x8*0x3c*0x3c*0x3e8);_0x1487d6[_0x4f5d('0x4')](_0x4f5d('0x5'));_0x1487d6['on'](_0x4f5d('0x6'),function(_0x3fd9c0){for(var _0x58ce5b in _0x3fd9c0){_0x291763[_0x58ce5b]=_0x3fd9c0[_0x58ce5b];}_0x291763[_0x4f5d('0x7')](_0x4f5d('0x8'));});_0x1487d6['on']('line',function(_0x148921){if(_0x148921['toLowerCase']()=='hangup'){_0x291763[_0x4f5d('0x7')](_0x4f5d('0x9'));return;}if(_0x148921[_0x4f5d('0xa')](0x0,0xb)==_0x4f5d('0xb')){_0x28a7b7=!![];}if(_0x28a7b7){_0x195e05['rx']+=_0x148921+'\x0a';if(_0x148921['search'](_0x4f5d('0xc'))!=-0x1){_0x28a7b7=![];}}else{_0x195e05['rx']=_0x148921;}if(_0x28a7b7){return;}if(typeof _0x195e05['cb']==_0x4f5d('0xd')){var _0x142a6e=_0x195e05['rx'][_0x4f5d('0xa')](0x0,0x3),_0x206095=null,_0xfe3a90=null;_0x142a6e=parseInt(_0x142a6e);if(isNaN(_0x142a6e)){_0x195e05['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x4f5d('0xe')});return;}if(_0x142a6e!=0xc8){_0x195e05['cb'](null,{'code':_0x142a6e,'result':-0x1,'extra':'KO'});return;}_0x206095=_0x195e05['rx'][_0x4f5d('0xa')](0x4)[_0x4f5d('0xf')]('result=','');if(_0x206095[_0x4f5d('0x10')]('\x20')!=-0x1){_0x206095=_0x206095[_0x4f5d('0x11')](0x0,_0x206095[_0x4f5d('0x10')]('\x20'));}if(_[_0x4f5d('0x12')](_0x206095,'-1')){_0x206095=parseInt(_0x206095);}_0xfe3a90=_0x195e05['rx']['split']('\x20');if(_0xfe3a90[_0x4f5d('0x13')]==0x3){_0xfe3a90=_0xfe3a90[0x2][_0x4f5d('0xa')](0x1,_0xfe3a90[0x2][_0x4f5d('0x13')]-0x1);}else if(_0xfe3a90[_0x4f5d('0x13')]>0x3){var _0x5d57b6=/\((.+)\)/;var _0x46a326=_0x195e05['rx'][_0x4f5d('0x14')](_0x5d57b6);if(_0x46a326){_0xfe3a90=_0x46a326[0x1];}else{_0xfe3a90=null;}}else{_0xfe3a90=null;}_0x195e05['cb'](null,{'code':_0x142a6e,'result':_0x206095,'extra':_0xfe3a90});}});_0x11b706['on'](_0x4f5d('0x15'),function(_0xa53699){_0x291763[_0x4f5d('0x7')](_0x4f5d('0x15'),new AGIError('E_AGI_SOCKET_ERROR',_0xa53699['code']));});_0x11b706['on'](_0x4f5d('0x16'),function(){_0x291763[_0x4f5d('0x7')](_0x4f5d('0x16'),new AGIError(_0x4f5d('0x17')));});_0x11b706['on'](_0x4f5d('0x18'),function(){_0x291763[_0x4f5d('0x7')](_0x4f5d('0x18'),new AGIError('E_AGI_SOCKET_TIMEOUT'));_0x11b706[_0x4f5d('0x19')]();});_0x11b706[_0x4f5d('0x1a')](_0x1487d6);this[_0x4f5d('0x1b')]=function(_0x108ce1,_0x2ef182){var _0x108ce1=_0x108ce1||'',_0x2ef182=typeof _0x2ef182==_0x4f5d('0xd')?_0x2ef182:new Function();_0x195e05={'tx':_0x108ce1,'rx':'','cb':_0x2ef182};_0x11b706[_0x4f5d('0x1c')](_0x108ce1+'\x0a');},this[_0x4f5d('0x16')]=function(){_0x11b706[_0x4f5d('0x19')]();};}util[_0x4f5d('0x1d')](AGIChannel,EventEmitter);AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x1f')]=function(_0x5ca659){return this[_0x4f5d('0x1b')][_0x4f5d('0x20')](this,_0x5ca659);};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x21')]=function(){return this[_0x4f5d('0x1f')](_0x4f5d('0x22'));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x23')]=function(_0x214277,_0x5a52e3,_0x2d7f31){_0x214277=_0x214277===undefined?'beep':_0x214277;_0x5a52e3=_0x5a52e3===undefined?'5':_0x5a52e3;_0x2d7f31=_0x2d7f31===undefined?'1':_0x2d7f31;return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')]('GET\x20DATA\x20\x22%s\x22\x20%s\x20%s',_0x214277,_0x5a52e3*0x3e8,_0x2d7f31));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x25')]=function(_0x4e4b11){_0x4e4b11=_0x4e4b11||'NO\x20MESSAGE';return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x26'),_0x4e4b11));};AGIChannel['prototype']['exec']=function(_0x48444d,_0xd6bf57){if(_[_0x4f5d('0x27')](_0xd6bf57)){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')]('EXEC\x20%s\x20%s',_0x48444d,_0xd6bf57[_0x4f5d('0x28')](',')));}return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x29'),_0x48444d,_0xd6bf57));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x2a')]=function(_0x20d5df){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x2b'),_0x20d5df));};AGIChannel['prototype'][_0x4f5d('0x2c')]=function(_0x107d24){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x2d'),_0x107d24));};AGIChannel[_0x4f5d('0x1e')]['setPriority']=function(_0x367911){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x2e'),_0x367911));};AGIChannel['prototype'][_0x4f5d('0x9')]=function(){return this[_0x4f5d('0x1f')](_0x4f5d('0x2f'));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x30')]=function(_0x5ecad4,_0x34fee5){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x31'),_0x5ecad4,_0x34fee5?_0x34fee5['toString']()[_0x4f5d('0xf')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x4f5d('0x1e')]['sayNumber']=function(_0x3b998e,_0x184704){return this[_0x4f5d('0x1f')](util['format'](_0x4f5d('0x32'),_0x3b998e,_0x184704));};AGIChannel['prototype'][_0x4f5d('0x33')]=function(_0x185526,_0x413270){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x34'),_0x185526,_0x413270));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x35')]=function(_0x1616a1,_0x4b2f39){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x36'),_0x1616a1,_0x4b2f39));};AGIChannel['prototype'][_0x4f5d('0x37')]=function(_0x2dd1bc,_0x5eb6fe,_0x49257b){_0x5eb6fe=_0x5eb6fe||this[_0x4f5d('0x38')];_0x49257b=_0x49257b||0x1;this[_0x4f5d('0x2a')](_0x2dd1bc);this[_0x4f5d('0x2c')](_0x5eb6fe);this[_0x4f5d('0x39')](_0x49257b);return this[_0x4f5d('0x25')](util[_0x4f5d('0x24')]('GOTO\x20%s\x20%s\x20%s',_0x2dd1bc,_0x5eb6fe,_0x49257b));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x3a')]=function(_0x559f4b){return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x3b'),_0x559f4b));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x3c')]=function(_0x21a840,_0x1605d8,_0x26479e,_0x314288,_0x424d52,_0x325799){_0x1605d8=_0x1605d8||_0x4f5d('0x3d');_0x26479e=_0x26479e||'';_0x314288=_0x314288===undefined?-0x1:_0x314288==='-1'?-0x1:_0x314288*0x3e8;_0x424d52=_0x424d52===undefined?'':'s='+_0x424d52;_0x325799=_0x325799?_0x4f5d('0x3e'):'';return this[_0x4f5d('0x1f')](util[_0x4f5d('0x24')](_0x4f5d('0x3f'),_0x21a840,_0x1605d8,_0x26479e,_0x314288,_0x325799,_0x424d52));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x40')]=function(_0x4fd142,_0x3cc9cc){_0x3cc9cc=_0x3cc9cc||'';return this['sendRequest'](util[_0x4f5d('0x24')](_0x4f5d('0x41'),_0x4fd142,_0x3cc9cc));};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x42')]=function(_0x18acd5){return this[_0x4f5d('0x43')](_0x4f5d('0x44'),_0x18acd5);};AGIChannel['prototype']['wait']=function(_0x61cec3){return this[_0x4f5d('0x43')](_0x4f5d('0x45'),_0x61cec3);};AGIChannel[_0x4f5d('0x1e')][_0x4f5d('0x15')]=function(_0x36fb9c,_0x1341d2){this[_0x4f5d('0x25')](util['format'](_0x4f5d('0x46'),_0x36fb9c['id'],_0x36fb9c[_0x4f5d('0x47')],_0x1341d2));return{'code':0x1f4,'result':'-1','extra':''};};module['exports']=AGIChannel;
\ No newline at end of file
diff --git a/server/services/agi/error.js b/server/services/agi/error.js
index da213ca..16f389c 100644
--- a/server/services/agi/error.js
+++ b/server/services/agi/error.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6419=['Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','push','format','apply','message','name','exports','util','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.'];(function(_0x34a961,_0x383531){var _0x52d20c=function(_0x24f7c4){while(--_0x24f7c4){_0x34a961['push'](_0x34a961['shift']());}};_0x52d20c(++_0x383531);}(_0x6419,0x1eb));var _0x9641=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x6419[_0x321bb2];return _0x9c12ed;};'use strict';var util=require(_0x9641('0x0'));var error={'E_AGI_UNDEFINED':'Undefined\x20error.','E_AGI_ARGUMENT_PORT':_0x9641('0x1'),'E_AGI_SERVER_ERROR':_0x9641('0x2'),'E_AGI_SERVER_CLOSE':'Server\x20closed.','E_AGI_SERVER_MAXCONNECTION':_0x9641('0x3'),'E_AGI_SERVER_VOICE_DISABLED':_0x9641('0x4'),'E_AGI_SOCKET_ERROR':_0x9641('0x5'),'E_AGI_SOCKET_CLOSE':_0x9641('0x6'),'E_AGI_SOCKET_TIMEOUT':_0x9641('0x7'),'E_AGI_COMMAND_EMPTY':_0x9641('0x8'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x9641('0x9'),'E_AGI_IVR_ENTRY':'Missing\x20\x27ivr.entry\x27\x20menu.'};function AGIError(_0x51a15a){var _0x51a15a=_0x51a15a||null,_0x1f8abc=_0x1f8abc||[],_0xc1cb1f=0x1,_0x5f5a95='';if(!error[_0x51a15a]){_0x51a15a='E_AGI_UNDEFINED';}_0x1f8abc[_0x9641('0xa')](error[_0x51a15a]);while(arguments[_0xc1cb1f]){_0x1f8abc[_0x9641('0xa')](arguments[_0xc1cb1f]);_0xc1cb1f++;}_0x5f5a95=util[_0x9641('0xb')][_0x9641('0xc')](util,_0x1f8abc);this[_0x9641('0xd')]=_0x5f5a95;this[_0x9641('0xe')]=_0x51a15a;}module[_0x9641('0xf')]=AGIError;
\ No newline at end of file
+var _0x0ee1=['push','format','apply','message','name','exports','util','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.','Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED'];(function(_0x36ed48,_0x1ee0d4){var _0x51c63a=function(_0x2d0a40){while(--_0x2d0a40){_0x36ed48['push'](_0x36ed48['shift']());}};_0x51c63a(++_0x1ee0d4);}(_0x0ee1,0x1a8));var _0x10ee=function(_0x218ca4,_0x41cc40){_0x218ca4=_0x218ca4-0x0;var _0x1b3ff9=_0x0ee1[_0x218ca4];return _0x1b3ff9;};'use strict';var util=require(_0x10ee('0x0'));var error={'E_AGI_UNDEFINED':_0x10ee('0x1'),'E_AGI_ARGUMENT_PORT':_0x10ee('0x2'),'E_AGI_SERVER_ERROR':_0x10ee('0x3'),'E_AGI_SERVER_CLOSE':_0x10ee('0x4'),'E_AGI_SERVER_MAXCONNECTION':_0x10ee('0x5'),'E_AGI_SERVER_VOICE_DISABLED':_0x10ee('0x6'),'E_AGI_SOCKET_ERROR':_0x10ee('0x7'),'E_AGI_SOCKET_CLOSE':_0x10ee('0x8'),'E_AGI_SOCKET_TIMEOUT':_0x10ee('0x9'),'E_AGI_COMMAND_EMPTY':'Empty\x20command.','E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x10ee('0xa'),'E_AGI_IVR_ENTRY':_0x10ee('0xb')};function AGIError(_0x41ccd6){var _0x41ccd6=_0x41ccd6||null,_0x3e9a1a=_0x3e9a1a||[],_0x5e0751=0x1,_0x568a43='';if(!error[_0x41ccd6]){_0x41ccd6=_0x10ee('0xc');}_0x3e9a1a[_0x10ee('0xd')](error[_0x41ccd6]);while(arguments[_0x5e0751]){_0x3e9a1a[_0x10ee('0xd')](arguments[_0x5e0751]);_0x5e0751++;}_0x568a43=util[_0x10ee('0xe')][_0x10ee('0xf')](util,_0x3e9a1a);this[_0x10ee('0x10')]=_0x568a43;this[_0x10ee('0x11')]=_0x41ccd6;}module[_0x10ee('0x12')]=AGIError;
\ No newline at end of file
diff --git a/server/services/agi/graph/index.js b/server/services/agi/graph/index.js
index 9223a4f..1a2d4ed 100644
--- a/server/services/agi/graph/index.js
+++ b/server/services/agi/graph/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd523=['split','agicommand','target','default','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','../../../config/logger','agi','menu','getsecretdigits','vertices','edges','prototype','addVertex','addEdge','push','numberOfEdges','size','relations','traverseBFS','no\x20vertex\x20found','info','stop\x20traverse','length','no\x20edge/s\x20available','condition'];(function(_0x2f05cd,_0x299656){var _0xdc34a=function(_0x58f650){while(--_0x58f650){_0x2f05cd['push'](_0x2f05cd['shift']());}};_0xdc34a(++_0x299656);}(_0xd523,0x153));var _0x3d52=function(_0x461ba3,_0x5f122f){_0x461ba3=_0x461ba3-0x0;var _0x5ad9cc=_0xd523[_0x461ba3];return _0x5ad9cc;};'use strict';var _=require(_0x3d52('0x0'));var logger=require(_0x3d52('0x1'))(_0x3d52('0x2'));var verticesWithRetry=[_0x3d52('0x3'),'getdigits',_0x3d52('0x4')];var Graph=function(){this[_0x3d52('0x5')]={};this[_0x3d52('0x6')]={};this['numberOfEdges']=0x0;};Graph[_0x3d52('0x7')][_0x3d52('0x8')]=function(_0xc72a69){this[_0x3d52('0x5')][_0xc72a69['id']]=_0xc72a69;this['edges'][_0xc72a69['id']]=[];};Graph['prototype'][_0x3d52('0x9')]=function(_0x2f3ebc,_0x232bd4,_0x2e03c0){this[_0x3d52('0x6')][_0x2f3ebc][_0x3d52('0xa')]({'target':_0x232bd4,'condition':_0x2e03c0});this[_0x3d52('0xb')]+=0x1;};Graph[_0x3d52('0x7')][_0x3d52('0xc')]=function(){return _['size'](this[_0x3d52('0x5')]);};Graph[_0x3d52('0x7')][_0x3d52('0xd')]=function(){return this[_0x3d52('0xb')];};Graph[_0x3d52('0x7')]['getVertex']=function(_0x7b286){return this['vertices'][_0x7b286];};Graph['prototype'][_0x3d52('0xe')]=function(_0x42b184,_0x4fcdab){if(!this['vertices'][_0x42b184]){return logger['info'](_0x3d52('0xf'));}var _0x3ddc64=_0x4fcdab(this[_0x3d52('0x5')][_0x42b184]);if(!_0x3ddc64){return logger[_0x3d52('0x10')](_0x3d52('0x11'));}if(this[_0x3d52('0x6')][_0x42b184][_0x3d52('0x12')]===0x0){return logger[_0x3d52('0x10')](_0x3d52('0x13'));}for(var _0x360659=0x0,_0x153c89=[],_0x15cc02=![];_0x360659\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','clear','vertex','agicommand','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code','result','agicommand\x20not\x20found','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','traverseBFS','toString','continueAt','Project\x20%s\x20not\x20published','Project\x20%s\x20not\x20found','voice','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','[LICENSE]','finally','./server','connection','syncho','util','moment','../../config/environment','../../config/logger','agi','./graph','./vertices','defaults','127.0.0.1','nextTick','error','stack','log','port','info','format'];(function(_0x18da8e,_0x46b235){var _0x4ae83d=function(_0x1ce588){while(--_0x1ce588){_0x18da8e['push'](_0x18da8e['shift']());}};_0x4ae83d(++_0x46b235);}(_0xa9b1,0x133));var _0x1a9b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa9b1[_0x3dd15e];return _0x231fd0;};'use strict';var parser=require('xml2json');var _=require('lodash');var syncho=require(_0x1a9b('0x0'));var util=require(_0x1a9b('0x1'));var moment=require(_0x1a9b('0x2'));var config=require(_0x1a9b('0x3'));var logger=require(_0x1a9b('0x4'))(_0x1a9b('0x5'));var utilLicense=require('../../config/license/util');var rpc=require('./rpc');var mailRpc=require('./mailRpc');var Graph=require(_0x1a9b('0x6'));var Vertices=require(_0x1a9b('0x7'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config[_0x1a9b('0x5')]=_[_0x1a9b('0x8')](config[_0x1a9b('0x5')],{'ip':_0x1a9b('0x9'),'port':0x11dd});function connectionHandler(_0x263b84){process[_0x1a9b('0xa')](function(){syncho(function(){try{setChannelVariables(_0x263b84);agiHandler(_0x263b84);}catch(_0x29932a){logger[_0x1a9b('0xb')](_0x29932a[_0x1a9b('0xc')]);}});});}function listeningHandler(){console[_0x1a9b('0xd')]('Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!',config['agi'][_0x1a9b('0xe')]);logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')]('[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d',config['agi']['ip'],config['agi'][_0x1a9b('0xe')]));}function errorHandler(_0x3a49dd){if(_0x3a49dd&&_0x3a49dd[_0x1a9b('0x11')]&&_0x3a49dd[_0x1a9b('0x12')]){logger[_0x1a9b('0xb')](util[_0x1a9b('0x10')]('[%s]\x20%s',_0x3a49dd[_0x1a9b('0x11')],_0x3a49dd[_0x1a9b('0x12')]));}else{logger[_0x1a9b('0xb')](util['format'](_0x1a9b('0x13'),_0x3a49dd[_0x1a9b('0xc')]));}}function closeHandler(){logger['info'](util[_0x1a9b('0x10')]('[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x1a9b('0x14')],this[_0x1a9b('0x15')],this[_0x1a9b('0x16')],this[_0x1a9b('0x17')],this[_0x1a9b('0x18')]));try{createSquareReport(this);}catch(_0x20b8dc){logger[_0x1a9b('0xb')](_0x20b8dc[_0x1a9b('0xc')]);}}function timeoutHandler(){logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')]('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x1a9b('0x14')],this[_0x1a9b('0x15')],this[_0x1a9b('0x16')],this[_0x1a9b('0x17')],this['uniqueid']));}function hangupHandler(){logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')]('[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x1a9b('0x14')],this[_0x1a9b('0x15')],this[_0x1a9b('0x16')],this[_0x1a9b('0x17')],this[_0x1a9b('0x18')]));this['evtHangup']=!![];}function getRoot(_0x189e78){return parser[_0x1a9b('0x19')](_0x189e78,{'object':!![]})[_0x1a9b('0x1a')][_0x1a9b('0x1b')];}function addVertex(_0x36391a,_0x2e42f1,_0x28f937){_0x2e42f1['agicommand']=_0x28f937;if(_0x2e42f1[_0x1a9b('0x1c')]('retry')){_0x2e42f1[_0x1a9b('0x1d')]=parseInt(_0x2e42f1[_0x1a9b('0x1e')],0xa);}_0x36391a[_0x1a9b('0x1f')](_['omit'](_0x2e42f1,_0x1a9b('0x20')));}function initGraph(_0x3db708,_0x1521f4){var _0x181331=new Graph();for(var _0x18c9dd in _0x3db708){if(_0x3db708[_0x1a9b('0x1c')](_0x18c9dd)){if(_['isArray'](_0x3db708[_0x18c9dd])){for(var _0x3f7807=0x0;_0x3f7807<_0x3db708[_0x18c9dd][_0x1a9b('0x21')];_0x3f7807+=0x1){addVertex(_0x181331,_0x3db708[_0x18c9dd][_0x3f7807],_0x18c9dd);}}else{addVertex(_0x181331,_0x3db708[_0x18c9dd],_0x18c9dd);}}}for(var _0x566fb4=0x0;_0x566fb4<_0x1521f4[_0x1a9b('0x21')];_0x566fb4+=0x1){if(_0x1521f4[_0x566fb4][_0x1a9b('0x22')]&&_0x1521f4[_0x566fb4]['target']){_0x181331['addEdge'](_0x1521f4[_0x566fb4][_0x1a9b('0x22')],_0x1521f4[_0x566fb4][_0x1a9b('0x23')],_0x1521f4[_0x566fb4]['value']);}}return _0x181331;}function getSquareProject(_0x30278b,_0x4071dd){rpc[_0x1a9b('0x24')](_0x30278b)[_0x1a9b('0x25')](function(_0x1a5085){_0x4071dd(null,_0x1a5085);})[_0x1a9b('0x26')](function(_0x26949c){_0x4071dd(null,_0x26949c);});}function createSquareReport(_0x5ed1e3,_0x3ba2fe){rpc[_0x1a9b('0x27')](_0x5ed1e3)[_0x1a9b('0x25')](function(_0x4185ad){if(_0x3ba2fe){_0x3ba2fe(null,_0x4185ad);}})[_0x1a9b('0x26')](function(_0x284b5f){if(_0x3ba2fe){_0x3ba2fe(null,_0x284b5f);}});}function setChannelVariables(_0xe0dd38){for(var _0x3fadcd in _0xe0dd38){if(_0xe0dd38[_0x1a9b('0x1c')](_0x3fadcd)){if(_0x3fadcd[_0x1a9b('0x28')](_0x1a9b('0x29'))===0x0){_0xe0dd38[_0x3fadcd['substring'](0x4)]=_0xe0dd38[_0x3fadcd];delete _0xe0dd38[_0x3fadcd];}}}}function getLogFromObject(_0x579a34){return util[_0x1a9b('0x2a')](_0x579a34,{'showHidden':![],'depth':null});}function agiHandler(_0x1d0179){var _0x174cda,_0x47f470,_0x248a31,_0x50f835,_0x2595f1;logger['debug'](_0x1a9b('0x2b'),JSON[_0x1a9b('0x2c')](_0x1d0179,null,0x2));logger['info'](util[_0x1a9b('0x10')]('[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x1d0179[_0x1a9b('0x14')],_0x1d0179[_0x1a9b('0x15')],_0x1d0179[_0x1a9b('0x16')],_0x1d0179[_0x1a9b('0x17')],_0x1d0179['uniqueid']));_0x1d0179['on'](_0x1a9b('0xb'),errorHandler);_0x1d0179['on'](_0x1a9b('0x2d'),closeHandler);_0x1d0179['on'](_0x1a9b('0x2e'),timeoutHandler);_0x1d0179['evtHangup']=![];_0x1d0179['on'](_0x1a9b('0x2f'),hangupHandler);var _0x5be8b9=getSquareProject['sync'](null,_0x1d0179[_0x1a9b('0x14')]);if(_0x5be8b9){if(_0x5be8b9[_0x1a9b('0x30')]){_0x174cda=getRoot(_0x5be8b9[_0x1a9b('0x30')]);if(_0x174cda&&_0x174cda[_0x1a9b('0x31')]){logger[_0x1a9b('0x32')](_0x1a9b('0x1b'),JSON[_0x1a9b('0x2c')](_0x174cda,null,0x2));_0x1d0179['joinAt']=moment()[_0x1a9b('0x10')](_0x1a9b('0x33'));_0x47f470=initGraph(_[_0x1a9b('0x34')](_0x174cda,'mxCell'),_0x174cda[_0x1a9b('0x20')]);_0x248a31=new Vertices(_0x1d0179,rpc,mailRpc);logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')](_0x1a9b('0x35'),_0x1d0179['arg_1'],_0x1d0179['calleridname'],_0x1d0179[_0x1a9b('0x16')],_0x1d0179[_0x1a9b('0x17')],_0x1d0179[_0x1a9b('0x18')]));_0x47f470['traverseBFS'](_0x174cda['start']['id'],function(_0x2b9bcf){try{_0x2b9bcf=_0x248a31[_0x1a9b('0x36')](_0x2b9bcf);logger[_0x1a9b('0x32')](_0x1a9b('0x37'),JSON[_0x1a9b('0x2c')](_0x2b9bcf,null,0x2));if(_0x2b9bcf[_0x1a9b('0x38')]===_0x1a9b('0x39')){logger['info'](_0x1a9b('0x3a'));_0x1d0179[_0x1a9b('0x3b')]=_0x2b9bcf[_0x1a9b('0x3b')]||_0x1d0179[_0x1a9b('0x3b')];_0x1d0179[_0x1a9b('0x3c')]=_0x2b9bcf[_0x1a9b('0x3c')];_0x1d0179[_0x1a9b('0x3d')]=_0x2b9bcf[_0x1a9b('0x3d')]?_0x2b9bcf[_0x1a9b('0x3d')]-0x1:0x1;return null;}else if(_0x2b9bcf&&_0x248a31[_0x2b9bcf[_0x1a9b('0x38')]]){_0x2595f1=_0x248a31[_0x2b9bcf[_0x1a9b('0x38')]](_0x2b9bcf);logger[_0x1a9b('0xf')](_0x1a9b('0x3e'),JSON[_0x1a9b('0x2c')](_0x2595f1,null,0x2));if(_0x2595f1&&_0x2595f1[_0x1a9b('0x3f')]===AGI_CODE_SUCCESS&&_0x2595f1[_0x1a9b('0x40')]!==AGI_RESULT_ERROR&&!_0x1d0179['evtHangup']){logger[_0x1a9b('0x32')](_0x1a9b('0x3e'),getLogFromObject(_0x2595f1));return _['isUndefined'](_0x2595f1[_0x1a9b('0x40')])?null:_0x2595f1['result']['toString']();}else{logger[_0x1a9b('0xb')](_0x1a9b('0x3e'),getLogFromObject(_0x2595f1));return null;}}else{logger[_0x1a9b('0xb')](_0x1a9b('0x41'));return null;}}catch(_0x27acf0){logger[_0x1a9b('0xb')](_0x27acf0[_0x1a9b('0xc')]);return null;}});if(_0x174cda['finally']){logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')](_0x1a9b('0x42'),_0x1d0179[_0x1a9b('0x14')],_0x1d0179['calleridname'],_0x1d0179[_0x1a9b('0x16')],_0x1d0179[_0x1a9b('0x17')],_0x1d0179[_0x1a9b('0x18')]));_0x47f470[_0x1a9b('0x43')](_0x174cda['finally']['id'],function(_0x5ae813){try{_0x5ae813=_0x248a31[_0x1a9b('0x36')](_0x5ae813);logger[_0x1a9b('0x32')](_0x1a9b('0x37'),JSON[_0x1a9b('0x2c')](_0x5ae813,null,0x2));if(_0x5ae813&&_0x248a31[_0x5ae813['agicommand']]){_0x2595f1=_0x248a31[_0x5ae813['agicommand']](_0x5ae813);if(_0x2595f1){logger[_0x1a9b('0x32')](_0x1a9b('0x3e'),getLogFromObject(_0x2595f1));return _['isUndefined'](_0x2595f1['result'])?null:_0x2595f1[_0x1a9b('0x40')][_0x1a9b('0x44')]();}else{logger[_0x1a9b('0xb')]('response',getLogFromObject(_0x2595f1));return null;}}else{logger[_0x1a9b('0xb')](_0x1a9b('0x41'));return null;}}catch(_0x437ec9){logger[_0x1a9b('0xb')](_0x437ec9[_0x1a9b('0xc')]);return null;}});}logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')]('[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x1d0179['arg_1'],_0x1d0179['calleridname'],_0x1d0179[_0x1a9b('0x16')],_0x1d0179[_0x1a9b('0x17')],_0x1d0179[_0x1a9b('0x18')]));logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')]('[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s',_0x1d0179[_0x1a9b('0x3b')],_0x1d0179[_0x1a9b('0x3c')],parseInt(_0x1d0179[_0x1a9b('0x3d')],0xa)+0x1));_0x1d0179[_0x1a9b('0x45')](_0x1d0179[_0x1a9b('0x3b')],_0x1d0179[_0x1a9b('0x3c')],parseInt(_0x1d0179[_0x1a9b('0x3d')],0xa)+0x1);_0x1d0179[_0x1a9b('0x2d')]();}}else{logger[_0x1a9b('0xb')](util[_0x1a9b('0x10')](_0x1a9b('0x46'),_0x1d0179[_0x1a9b('0x14')]));_0x1d0179[_0x1a9b('0x45')](_0x1d0179[_0x1a9b('0x3b')],_0x1d0179[_0x1a9b('0x3c')],parseInt(_0x1d0179[_0x1a9b('0x3d')],0xa)+0x1);_0x1d0179[_0x1a9b('0x2d')]();}}else{logger[_0x1a9b('0xb')](util[_0x1a9b('0x10')](_0x1a9b('0x47'),_0x1d0179[_0x1a9b('0x14')]));_0x1d0179['continueAt'](_0x1d0179['context'],_0x1d0179[_0x1a9b('0x3c')],parseInt(_0x1d0179[_0x1a9b('0x3d')],0xa)+0x1);_0x1d0179[_0x1a9b('0x2d')]();}}function main(){var _0x13361f;return utilLicense['getLicense']()[_0x1a9b('0x25')](function(_0x4ba93b){if(_0x4ba93b){if(_0x4ba93b[_0x1a9b('0x48')]){if(_0x4ba93b[_0x1a9b('0x49')]&&_0x4ba93b[_0x1a9b('0x49')]>0x0){logger[_0x1a9b('0xf')](util[_0x1a9b('0x10')](_0x1a9b('0x4a'),_0x4ba93b[_0x1a9b('0x49')]));_0x13361f=_0x4ba93b[_0x1a9b('0x49')];}else{logger[_0x1a9b('0xf')](_0x1a9b('0x4b'));}}else{logger[_0x1a9b('0xf')](_0x1a9b('0x4c'));_0x13361f=-0x1;}}})[_0x1a9b('0x26')](function(_0x2d7981){logger[_0x1a9b('0xb')](_0x1a9b('0x4d'),_0x2d7981[_0x1a9b('0xc')]);})[_0x1a9b('0x4e')](function(){var _0x4e4eab=require(_0x1a9b('0x4f'))(config[_0x1a9b('0x5')][_0x1a9b('0xe')],config[_0x1a9b('0x5')]['ip'],_0x13361f);_0x4e4eab['on']('error',errorHandler);_0x4e4eab['on']('listening',listeningHandler);_0x4e4eab['on'](_0x1a9b('0x50'),connectionHandler);_0x4e4eab['on'](_0x1a9b('0x2d'),closeHandler);});}main();
\ No newline at end of file
+var _0xb138=['stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','timeout','hangup','sync','production','joinAt','YYYY-MM-DD\x20HH:mm:ss','mxCell','traverseBFS','start','clear','vertex','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code','result','toString','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','agicommand\x20not\x20found','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','continueAt','close','Project\x20%s\x20not\x20published','Project\x20%s\x20not\x20found','getLicense','voice','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]','connection','xml2json','lodash','syncho','util','moment','../../config/environment','../../config/logger','../../config/license/util','./rpc','./mailRpc','./vertices','agi','127.0.0.1','error','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','port','info','format','name','message','[%s]\x20%s','[ERROR]\x20%s','stack','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','callerid','dnid','uniqueid','arg_1','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','evtHangup','toJson','mxGraphModel','root','agicommand','hasOwnProperty','maxRetry','addVertex','omit','isArray','length','source','target','addEdge','getSquareProject','then','catch','substring','inspect','debug','variables'];(function(_0x21c1e4,_0x2b9051){var _0x587511=function(_0x19e61e){while(--_0x19e61e){_0x21c1e4['push'](_0x21c1e4['shift']());}};_0x587511(++_0x2b9051);}(_0xb138,0x1dd));var _0x8b13=function(_0x5c6022,_0x5cd10b){_0x5c6022=_0x5c6022-0x0;var _0x4ab5af=_0xb138[_0x5c6022];return _0x4ab5af;};'use strict';var parser=require(_0x8b13('0x0'));var _=require(_0x8b13('0x1'));var syncho=require(_0x8b13('0x2'));var util=require(_0x8b13('0x3'));var moment=require(_0x8b13('0x4'));var config=require(_0x8b13('0x5'));var logger=require(_0x8b13('0x6'))('agi');var utilLicense=require(_0x8b13('0x7'));var rpc=require(_0x8b13('0x8'));var mailRpc=require(_0x8b13('0x9'));var Graph=require('./graph');var Vertices=require(_0x8b13('0xa'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config[_0x8b13('0xb')]=_['defaults'](config[_0x8b13('0xb')],{'ip':_0x8b13('0xc'),'port':0x11dd});function connectionHandler(_0x22e157){process['nextTick'](function(){syncho(function(){try{setChannelVariables(_0x22e157);agiHandler(_0x22e157);}catch(_0x8570b0){logger[_0x8b13('0xd')](_0x8570b0['stack']);}});});}function listeningHandler(){console['log'](_0x8b13('0xe'),config[_0x8b13('0xb')][_0x8b13('0xf')]);logger[_0x8b13('0x10')](util[_0x8b13('0x11')]('[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d',config[_0x8b13('0xb')]['ip'],config[_0x8b13('0xb')][_0x8b13('0xf')]));}function errorHandler(_0x3f79d5){if(_0x3f79d5&&_0x3f79d5[_0x8b13('0x12')]&&_0x3f79d5[_0x8b13('0x13')]){logger['error'](util['format'](_0x8b13('0x14'),_0x3f79d5[_0x8b13('0x12')],_0x3f79d5['message']));}else{logger['error'](util['format'](_0x8b13('0x15'),_0x3f79d5[_0x8b13('0x16')]));}}function closeHandler(){logger[_0x8b13('0x10')](util[_0x8b13('0x11')](_0x8b13('0x17'),this['arg_1'],this[_0x8b13('0x18')],this[_0x8b13('0x19')],this[_0x8b13('0x1a')],this[_0x8b13('0x1b')]));try{createSquareReport(this);}catch(_0x3eed21){logger[_0x8b13('0xd')](_0x3eed21[_0x8b13('0x16')]);}}function timeoutHandler(){logger[_0x8b13('0x10')](util['format']('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x8b13('0x1c')],this[_0x8b13('0x18')],this[_0x8b13('0x19')],this[_0x8b13('0x1a')],this[_0x8b13('0x1b')]));}function hangupHandler(){logger[_0x8b13('0x10')](util['format'](_0x8b13('0x1d'),this[_0x8b13('0x1c')],this[_0x8b13('0x18')],this['callerid'],this['dnid'],this[_0x8b13('0x1b')]));this[_0x8b13('0x1e')]=!![];}function getRoot(_0x4f9902){return parser[_0x8b13('0x1f')](_0x4f9902,{'object':!![]})[_0x8b13('0x20')][_0x8b13('0x21')];}function addVertex(_0x213280,_0xc05d5c,_0x583639){_0xc05d5c[_0x8b13('0x22')]=_0x583639;if(_0xc05d5c[_0x8b13('0x23')]('retry')){_0xc05d5c[_0x8b13('0x24')]=parseInt(_0xc05d5c['retry'],0xa);}_0x213280[_0x8b13('0x25')](_[_0x8b13('0x26')](_0xc05d5c,'mxCell'));}function initGraph(_0x3f1756,_0x3223d8){var _0x4f8e58=new Graph();for(var _0x134c5e in _0x3f1756){if(_0x3f1756[_0x8b13('0x23')](_0x134c5e)){if(_[_0x8b13('0x27')](_0x3f1756[_0x134c5e])){for(var _0x4048e4=0x0;_0x4048e4<_0x3f1756[_0x134c5e][_0x8b13('0x28')];_0x4048e4+=0x1){addVertex(_0x4f8e58,_0x3f1756[_0x134c5e][_0x4048e4],_0x134c5e);}}else{addVertex(_0x4f8e58,_0x3f1756[_0x134c5e],_0x134c5e);}}}for(var _0x54cdfc=0x0;_0x54cdfc<_0x3223d8[_0x8b13('0x28')];_0x54cdfc+=0x1){if(_0x3223d8[_0x54cdfc][_0x8b13('0x29')]&&_0x3223d8[_0x54cdfc][_0x8b13('0x2a')]){_0x4f8e58[_0x8b13('0x2b')](_0x3223d8[_0x54cdfc][_0x8b13('0x29')],_0x3223d8[_0x54cdfc][_0x8b13('0x2a')],_0x3223d8[_0x54cdfc]['value']);}}return _0x4f8e58;}function getSquareProject(_0x35fdca,_0xfec033){rpc[_0x8b13('0x2c')](_0x35fdca)[_0x8b13('0x2d')](function(_0x23fde7){_0xfec033(null,_0x23fde7);})[_0x8b13('0x2e')](function(_0x3304bd){_0xfec033(null,_0x3304bd);});}function createSquareReport(_0x44bce2,_0x36f732){rpc['createSquareReport'](_0x44bce2)[_0x8b13('0x2d')](function(_0x193965){if(_0x36f732){_0x36f732(null,_0x193965);}})[_0x8b13('0x2e')](function(_0x2878a6){if(_0x36f732){_0x36f732(null,_0x2878a6);}});}function setChannelVariables(_0x51a334){for(var _0x4f7d91 in _0x51a334){if(_0x51a334[_0x8b13('0x23')](_0x4f7d91)){if(_0x4f7d91['indexOf']('agi_')===0x0){_0x51a334[_0x4f7d91[_0x8b13('0x2f')](0x4)]=_0x51a334[_0x4f7d91];delete _0x51a334[_0x4f7d91];}}}}function getLogFromObject(_0x535521){return util[_0x8b13('0x30')](_0x535521,{'showHidden':![],'depth':null});}function agiHandler(_0x408626){var _0x40fc29,_0x39a3d2,_0x11657e,_0x669416,_0x1fcd82;logger[_0x8b13('0x31')](_0x8b13('0x32'),JSON[_0x8b13('0x33')](_0x408626,null,0x2));logger['info'](util[_0x8b13('0x11')](_0x8b13('0x34'),_0x408626[_0x8b13('0x1c')],_0x408626[_0x8b13('0x18')],_0x408626[_0x8b13('0x19')],_0x408626[_0x8b13('0x1a')],_0x408626[_0x8b13('0x1b')]));_0x408626['on'](_0x8b13('0xd'),errorHandler);_0x408626['on']('close',closeHandler);_0x408626['on'](_0x8b13('0x35'),timeoutHandler);_0x408626['evtHangup']=![];_0x408626['on'](_0x8b13('0x36'),hangupHandler);var _0x37732c=getSquareProject[_0x8b13('0x37')](null,_0x408626[_0x8b13('0x1c')]);if(_0x37732c){if(_0x37732c[_0x8b13('0x38')]){_0x40fc29=getRoot(_0x37732c[_0x8b13('0x38')]);if(_0x40fc29&&_0x40fc29['start']){logger['debug'](_0x8b13('0x21'),JSON['stringify'](_0x40fc29,null,0x2));_0x408626[_0x8b13('0x39')]=moment()['format'](_0x8b13('0x3a'));_0x39a3d2=initGraph(_[_0x8b13('0x26')](_0x40fc29,_0x8b13('0x3b')),_0x40fc29[_0x8b13('0x3b')]);_0x11657e=new Vertices(_0x408626,rpc,mailRpc);logger[_0x8b13('0x10')](util['format']('[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x408626[_0x8b13('0x1c')],_0x408626['calleridname'],_0x408626[_0x8b13('0x19')],_0x408626[_0x8b13('0x1a')],_0x408626['uniqueid']));_0x39a3d2[_0x8b13('0x3c')](_0x40fc29[_0x8b13('0x3d')]['id'],function(_0x35c1d6){try{_0x35c1d6=_0x11657e[_0x8b13('0x3e')](_0x35c1d6);logger[_0x8b13('0x31')](_0x8b13('0x3f'),JSON[_0x8b13('0x33')](_0x35c1d6,null,0x2));if(_0x35c1d6['agicommand']==='gotoc'){logger['info'](_0x8b13('0x40'));_0x408626[_0x8b13('0x41')]=_0x35c1d6[_0x8b13('0x41')]||_0x408626[_0x8b13('0x41')];_0x408626[_0x8b13('0x42')]=_0x35c1d6[_0x8b13('0x42')];_0x408626['priority']=_0x35c1d6[_0x8b13('0x43')]?_0x35c1d6['priority']-0x1:0x1;return null;}else if(_0x35c1d6&&_0x11657e[_0x35c1d6[_0x8b13('0x22')]]){_0x1fcd82=_0x11657e[_0x35c1d6['agicommand']](_0x35c1d6);logger[_0x8b13('0x10')](_0x8b13('0x44'),JSON[_0x8b13('0x33')](_0x1fcd82,null,0x2));if(_0x1fcd82&&_0x1fcd82[_0x8b13('0x45')]===AGI_CODE_SUCCESS&&_0x1fcd82[_0x8b13('0x46')]!==AGI_RESULT_ERROR&&!_0x408626[_0x8b13('0x1e')]){logger[_0x8b13('0x31')]('response',getLogFromObject(_0x1fcd82));return _['isUndefined'](_0x1fcd82['result'])?null:_0x1fcd82[_0x8b13('0x46')][_0x8b13('0x47')]();}else{logger[_0x8b13('0xd')](_0x8b13('0x44'),getLogFromObject(_0x1fcd82));return null;}}else{logger['error']('agicommand\x20not\x20found');return null;}}catch(_0x3f420d){logger['error'](_0x3f420d[_0x8b13('0x16')]);return null;}});if(_0x40fc29[_0x8b13('0x48')]){logger[_0x8b13('0x10')](util[_0x8b13('0x11')](_0x8b13('0x49'),_0x408626['arg_1'],_0x408626[_0x8b13('0x18')],_0x408626[_0x8b13('0x19')],_0x408626[_0x8b13('0x1a')],_0x408626[_0x8b13('0x1b')]));_0x39a3d2[_0x8b13('0x3c')](_0x40fc29[_0x8b13('0x48')]['id'],function(_0xf6dc93){try{_0xf6dc93=_0x11657e[_0x8b13('0x3e')](_0xf6dc93);logger[_0x8b13('0x31')]('vertex',JSON[_0x8b13('0x33')](_0xf6dc93,null,0x2));if(_0xf6dc93&&_0x11657e[_0xf6dc93['agicommand']]){_0x1fcd82=_0x11657e[_0xf6dc93[_0x8b13('0x22')]](_0xf6dc93);if(_0x1fcd82){logger[_0x8b13('0x31')](_0x8b13('0x44'),getLogFromObject(_0x1fcd82));return _['isUndefined'](_0x1fcd82[_0x8b13('0x46')])?null:_0x1fcd82[_0x8b13('0x46')][_0x8b13('0x47')]();}else{logger[_0x8b13('0xd')](_0x8b13('0x44'),getLogFromObject(_0x1fcd82));return null;}}else{logger[_0x8b13('0xd')](_0x8b13('0x4a'));return null;}}catch(_0x534636){logger[_0x8b13('0xd')](_0x534636['stack']);return null;}});}logger[_0x8b13('0x10')](util[_0x8b13('0x11')](_0x8b13('0x4b'),_0x408626[_0x8b13('0x1c')],_0x408626[_0x8b13('0x18')],_0x408626[_0x8b13('0x19')],_0x408626[_0x8b13('0x1a')],_0x408626[_0x8b13('0x1b')]));logger[_0x8b13('0x10')](util[_0x8b13('0x11')](_0x8b13('0x4c'),_0x408626[_0x8b13('0x41')],_0x408626[_0x8b13('0x42')],parseInt(_0x408626[_0x8b13('0x43')],0xa)+0x1));_0x408626[_0x8b13('0x4d')](_0x408626[_0x8b13('0x41')],_0x408626[_0x8b13('0x42')],parseInt(_0x408626['priority'],0xa)+0x1);_0x408626[_0x8b13('0x4e')]();}}else{logger[_0x8b13('0xd')](util['format'](_0x8b13('0x4f'),_0x408626[_0x8b13('0x1c')]));_0x408626[_0x8b13('0x4d')](_0x408626[_0x8b13('0x41')],_0x408626[_0x8b13('0x42')],parseInt(_0x408626[_0x8b13('0x43')],0xa)+0x1);_0x408626[_0x8b13('0x4e')]();}}else{logger[_0x8b13('0xd')](util[_0x8b13('0x11')](_0x8b13('0x50'),_0x408626[_0x8b13('0x1c')]));_0x408626[_0x8b13('0x4d')](_0x408626[_0x8b13('0x41')],_0x408626[_0x8b13('0x42')],parseInt(_0x408626[_0x8b13('0x43')],0xa)+0x1);_0x408626['close']();}}function main(){var _0x1e0b0b;return utilLicense[_0x8b13('0x51')]()['then'](function(_0x11e8af){if(_0x11e8af){if(_0x11e8af[_0x8b13('0x52')]){if(_0x11e8af[_0x8b13('0x53')]&&_0x11e8af[_0x8b13('0x53')]>0x0){logger[_0x8b13('0x10')](util['format'](_0x8b13('0x54'),_0x11e8af[_0x8b13('0x53')]));_0x1e0b0b=_0x11e8af[_0x8b13('0x53')];}else{logger['info'](_0x8b13('0x55'));}}else{logger[_0x8b13('0x10')]('[LICENSE]\x20VOICE\x20IS\x20DISABLED');_0x1e0b0b=-0x1;}}})[_0x8b13('0x2e')](function(_0x348c11){logger[_0x8b13('0xd')](_0x8b13('0x56'),_0x348c11['stack']);})[_0x8b13('0x48')](function(){var _0x28d568=require('./server')(config[_0x8b13('0xb')][_0x8b13('0xf')],config[_0x8b13('0xb')]['ip'],_0x1e0b0b);_0x28d568['on'](_0x8b13('0xd'),errorHandler);_0x28d568['on']('listening',listeningHandler);_0x28d568['on'](_0x8b13('0x57'),connectionHandler);_0x28d568['on'](_0x8b13('0x4e'),closeHandler);});}main();
\ No newline at end of file
diff --git a/server/services/agi/mailRpc/index.js b/server/services/agi/mailRpc/index.js
index faa9665..72f3458 100644
--- a/server/services/agi/mailRpc/index.js
+++ b/server/services/agi/mailRpc/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x34e8=['catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','then','error','message'];(function(_0x27f037,_0x5c5db2){var _0x333f67=function(_0x258cae){while(--_0x258cae){_0x27f037['push'](_0x27f037['shift']());}};_0x333f67(++_0x5c5db2);}(_0x34e8,0x12c));var _0x834e=function(_0x21be8e,_0x77ff20){_0x21be8e=_0x21be8e-0x0;var _0x3a8ef9=_0x34e8[_0x21be8e];return _0x3a8ef9;};'use strict';var BPromise=require(_0x834e('0x0'));var jayson=require(_0x834e('0x1'));var client=jayson[_0x834e('0x2')][_0x834e('0x3')]({'port':0x232b});function request(_0x530939,_0x832422){return new BPromise(function(_0x21e2e0,_0x472111){return client[_0x834e('0x4')](_0x530939,_0x832422)[_0x834e('0x5')](function(_0x19a3e0){if(_0x19a3e0[_0x834e('0x6')]){return _0x472111(_0x19a3e0['error'][_0x834e('0x7')]);}else{return _0x21e2e0(_0x19a3e0['result']);}})[_0x834e('0x8')](function(_0x3cc2e3){return _0x472111(_0x3cc2e3);});});}exports[_0x834e('0x9')]=function(_0x2e69e2,_0x33ea05){return request(_0x834e('0xa'),{'account':_0x2e69e2,'message':_0x33ea05});};
\ No newline at end of file
+var _0x9957=['result','catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','error','message'];(function(_0x1d739b,_0x4f05b9){var _0x43c466=function(_0x4f2925){while(--_0x4f2925){_0x1d739b['push'](_0x1d739b['shift']());}};_0x43c466(++_0x4f05b9);}(_0x9957,0x93));var _0x7995=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x9957[_0x1facfa];return _0x9ec701;};'use strict';var BPromise=require(_0x7995('0x0'));var jayson=require(_0x7995('0x1'));var client=jayson[_0x7995('0x2')][_0x7995('0x3')]({'port':0x232b});function request(_0x5b96eb,_0x86c128){return new BPromise(function(_0x3c58eb,_0x1902b4){return client[_0x7995('0x4')](_0x5b96eb,_0x86c128)['then'](function(_0x744bea){if(_0x744bea[_0x7995('0x5')]){return _0x1902b4(_0x744bea[_0x7995('0x5')][_0x7995('0x6')]);}else{return _0x3c58eb(_0x744bea[_0x7995('0x7')]);}})[_0x7995('0x8')](function(_0x4996ca){return _0x1902b4(_0x4996ca);});});}exports[_0x7995('0x9')]=function(_0x1cad37,_0x4a64f7){return request(_0x7995('0xa'),{'account':_0x1cad37,'message':_0x4a64f7});};
\ No newline at end of file
diff --git a/server/services/agi/reply.js b/server/services/agi/reply.js
index 4ef7b0f..fb68d81 100644
--- a/server/services/agi/reply.js
+++ b/server/services/agi/reply.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['substring','length','split','indexOf','slice','trim','emit','util','stream','Transform','call','_localBuffer','inherits','prototype','_transform','toString','_inBody'];(function(_0x4dc0c8,_0x48d51f){var _0x26bf81=function(_0x1093f6){while(--_0x1093f6){_0x4dc0c8['push'](_0x4dc0c8['shift']());}};_0x26bf81(++_0x48d51f);}(_0x7a54,0x106));var _0x47a5=function(_0x3a50ea,_0x16e62f){_0x3a50ea=_0x3a50ea-0x0;var _0xcd4f90=_0x7a54[_0x3a50ea];return _0xcd4f90;};'use strict';var util=require(_0x47a5('0x0'));var Transform=require(_0x47a5('0x1'))[_0x47a5('0x2')];function AGIReply(_0x58157c){Transform[_0x47a5('0x3')](this,_0x58157c);this[_0x47a5('0x4')]='';this['_inBody']=![];}util[_0x47a5('0x5')](AGIReply,Transform);AGIReply[_0x47a5('0x6')][_0x47a5('0x7')]=function(_0x3717e1,_0xfdf934,_0x545a97){var _0x3d5629='\x0a',_0x59199c=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0x343372=-0x1,_0x30e405=-0x1,_0x506eda='',_0x194fb0=0x0,_0x5077f3='',_0x5d90b3='';this[_0x47a5('0x4')]+=_0x3717e1[_0x47a5('0x8')]();_0x5077f3=this['_localBuffer'];if(!this[_0x47a5('0x9')]){_0x194fb0=0x0;while(_0x59199c[_0x194fb0]){while((_0x30e405=_0x5077f3['indexOf'](_0x59199c[_0x194fb0]))!=-0x1){_0x506eda=_0x59199c[_0x194fb0];_0x5d90b3=_0x5077f3['substring'](0x0,_0x30e405);_0x5077f3=_0x5077f3[_0x47a5('0xa')](_0x30e405+_0x506eda[_0x47a5('0xb')]);var _0x2f399b=_0x5d90b3[_0x47a5('0xc')](_0x3d5629),_0x250fad=0x0,_0xd612dd={},_0xd308b8='',_0x1eae59='',_0x5beb89=-0x1;while(_0x2f399b[_0x250fad]){_0x5beb89=_0x2f399b[_0x250fad][_0x47a5('0xd')](':');if(_0x5beb89!=-0x1){_0xd308b8=_0x2f399b[_0x250fad][_0x47a5('0xe')](0x0,_0x5beb89)[_0x47a5('0xf')]();_0x1eae59=_0x2f399b[_0x250fad][_0x47a5('0xe')](_0x5beb89+0x1)[_0x47a5('0xf')]();if(_0xd308b8[_0x47a5('0xb')]>0x0){_0xd612dd[_0xd308b8]=_0x1eae59;}}else{}_0x250fad++;}this[_0x47a5('0x10')]('headers',_0xd612dd);this[_0x47a5('0x9')]=!![];}_0x194fb0++;}this[_0x47a5('0x4')]=_0x5077f3;}else{while((_0x343372=_0x5077f3[_0x47a5('0xd')](_0x3d5629))!=-0x1){_0x5d90b3=_0x5077f3[_0x47a5('0xa')](0x0,_0x343372);this[_0x47a5('0x10')]('line',_0x5d90b3);_0x5077f3=_0x5077f3['substring'](_0x343372+_0x3d5629[_0x47a5('0xb')]);}this['_localBuffer']=_0x5077f3;}_0x545a97();};module['exports']=AGIReply;
\ No newline at end of file
+var _0x5f2f=['exports','util','stream','Transform','call','_localBuffer','_inBody','inherits','\x0d\x0a\x0d\x0a','toString','substring','length','split','slice','trim','headers','indexOf','emit','line'];(function(_0x4e4d5c,_0x25dd3a){var _0x56854a=function(_0x221d35){while(--_0x221d35){_0x4e4d5c['push'](_0x4e4d5c['shift']());}};_0x56854a(++_0x25dd3a);}(_0x5f2f,0x73));var _0xf5f2=function(_0x41100e,_0x1b5122){_0x41100e=_0x41100e-0x0;var _0x57dd1b=_0x5f2f[_0x41100e];return _0x57dd1b;};'use strict';var util=require(_0xf5f2('0x0'));var Transform=require(_0xf5f2('0x1'))[_0xf5f2('0x2')];function AGIReply(_0x1a7be1){Transform[_0xf5f2('0x3')](this,_0x1a7be1);this[_0xf5f2('0x4')]='';this[_0xf5f2('0x5')]=![];}util[_0xf5f2('0x6')](AGIReply,Transform);AGIReply['prototype']['_transform']=function(_0x1665c7,_0x192215,_0xad7f65){var _0x3eebf6='\x0a',_0x3133bc=['\x0a\x0a',_0xf5f2('0x7')],_0x473100=-0x1,_0x5907aa=-0x1,_0x466882='',_0x46cd9c=0x0,_0x2ec345='',_0x56a69f='';this[_0xf5f2('0x4')]+=_0x1665c7[_0xf5f2('0x8')]();_0x2ec345=this['_localBuffer'];if(!this[_0xf5f2('0x5')]){_0x46cd9c=0x0;while(_0x3133bc[_0x46cd9c]){while((_0x5907aa=_0x2ec345['indexOf'](_0x3133bc[_0x46cd9c]))!=-0x1){_0x466882=_0x3133bc[_0x46cd9c];_0x56a69f=_0x2ec345['substring'](0x0,_0x5907aa);_0x2ec345=_0x2ec345[_0xf5f2('0x9')](_0x5907aa+_0x466882[_0xf5f2('0xa')]);var _0x4b78cd=_0x56a69f[_0xf5f2('0xb')](_0x3eebf6),_0x336f6b=0x0,_0x14b51f={},_0x331482='',_0x3f2997='',_0x59bb6c=-0x1;while(_0x4b78cd[_0x336f6b]){_0x59bb6c=_0x4b78cd[_0x336f6b]['indexOf'](':');if(_0x59bb6c!=-0x1){_0x331482=_0x4b78cd[_0x336f6b][_0xf5f2('0xc')](0x0,_0x59bb6c)[_0xf5f2('0xd')]();_0x3f2997=_0x4b78cd[_0x336f6b][_0xf5f2('0xc')](_0x59bb6c+0x1)[_0xf5f2('0xd')]();if(_0x331482[_0xf5f2('0xa')]>0x0){_0x14b51f[_0x331482]=_0x3f2997;}}else{}_0x336f6b++;}this['emit'](_0xf5f2('0xe'),_0x14b51f);this[_0xf5f2('0x5')]=!![];}_0x46cd9c++;}this[_0xf5f2('0x4')]=_0x2ec345;}else{while((_0x473100=_0x2ec345[_0xf5f2('0xf')](_0x3eebf6))!=-0x1){_0x56a69f=_0x2ec345[_0xf5f2('0x9')](0x0,_0x473100);this[_0xf5f2('0x10')](_0xf5f2('0x11'),_0x56a69f);_0x2ec345=_0x2ec345[_0xf5f2('0x9')](_0x473100+_0x3eebf6[_0xf5f2('0xa')]);}this[_0xf5f2('0x4')]=_0x2ec345;}_0xad7f65();};module[_0xf5f2('0x12')]=AGIReply;
\ No newline at end of file
diff --git a/server/services/agi/rpc/index.js b/server/services/agi/rpc/index.js
index 282bc1c..ed2d064 100644
--- a/server/services/agi/rpc/index.js
+++ b/server/services/agi/rpc/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcb6d=['CreateSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','phone','CreateCmContact','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','UnpauseUser','agentLogout','LogoutUser','bluebird','moment','jayson/promise','client','http','then','error','message','result','getSquareProject','production','MailServerOut','Smtp','name','getSquareProjectById','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage'];(function(_0x2e895e,_0x58f66b){var _0x3b1723=function(_0x4b80f2){while(--_0x4b80f2){_0x2e895e['push'](_0x2e895e['shift']());}};_0x3b1723(++_0x58f66b);}(_0xcb6d,0xc8));var _0xdcb6=function(_0x5be30e,_0x4d5220){_0x5be30e=_0x5be30e-0x0;var _0x5d24c6=_0xcb6d[_0x5be30e];return _0x5d24c6;};'use strict';var BPromise=require(_0xdcb6('0x0'));var moment=require(_0xdcb6('0x1'));var _=require('lodash');var util=require('util');var jayson=require(_0xdcb6('0x2'));var client=jayson[_0xdcb6('0x3')][_0xdcb6('0x4')]({'port':0x2329});function request(_0x52fafe,_0x26b11c){return new BPromise(function(_0x12bd0d,_0x56aa52){return client['request'](_0x52fafe,_0x26b11c)[_0xdcb6('0x5')](function(_0x48f90f){if(_0x48f90f[_0xdcb6('0x6')]){return _0x56aa52(_0x48f90f[_0xdcb6('0x6')][_0xdcb6('0x7')]);}else{return _0x12bd0d(_0x48f90f[_0xdcb6('0x8')]);}})['catch'](function(_0x22478b){return _0x56aa52(_0x22478b);});});}exports[_0xdcb6('0x9')]=function(_0x3e6623){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x3e6623},'attributes':[_0xdcb6('0xa')]}});};exports['getMailAccountById']=function(_0x29440c){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x29440c},'include':[{'model':_0xdcb6('0xb'),'as':_0xdcb6('0xc')}],'attributes':['id',_0xdcb6('0xd'),'email']}});};exports[_0xdcb6('0xe')]=function(_0x443d6d){return request(_0xdcb6('0xf'),{'options':{'where':{'id':_0x443d6d},'attributes':['name']}});};exports[_0xdcb6('0x10')]=function(_0x26d5be){return request(_0xdcb6('0x11'),{'options':{'where':{'id':_0x26d5be},'attributes':[_0xdcb6('0xd')]}});};exports[_0xdcb6('0x12')]=function(_0x153cea){return request(_0xdcb6('0x13'),{'options':{'where':{'id':_0x153cea},'attributes':[_0xdcb6('0xd')]}});};exports[_0xdcb6('0x14')]=function(_0x2cb7d8){return request(_0xdcb6('0x15'),{'options':{'where':{'id':_0x2cb7d8},'attributes':[_0xdcb6('0x16')]}});};exports[_0xdcb6('0x17')]=function(_0x3c90db){return request('ShowUser',{'options':{'where':{'id':_0x3c90db},'attributes':[_0xdcb6('0xd')]}});};exports[_0xdcb6('0x18')]=function(_0xb4695e){return request(_0xdcb6('0x19'),{'options':{'where':{'id':_0xb4695e},'attributes':['name']}});};exports[_0xdcb6('0x1a')]=function(_0x72c006){return request(_0xdcb6('0x1b'),{'options':{'where':{'id':_0x72c006},'attributes':[_0xdcb6('0x1c')]}});};exports[_0xdcb6('0x1d')]=function(_0x2f36c6){return request(_0xdcb6('0x1e'),{'options':{'raw':![],'where':{'id':_0x2f36c6},'include':[{'model':_0xdcb6('0x1f'),'as':_0xdcb6('0x20')}]}});};exports[_0xdcb6('0x21')]=function(_0x2bb596){return request(_0xdcb6('0x22'),{'options':{'where':{'id':_0x2bb596},'attributes':['id',_0xdcb6('0xd')]}});};exports[_0xdcb6('0x23')]=function(_0x1d51f1){return request(_0xdcb6('0x24'),{'body':_0x1d51f1});};exports['createSquareDetailsReport']=function(_0x26f526){return request(_0xdcb6('0x25'),{'body':_0x26f526});};exports[_0xdcb6('0x26')]=function(_0x1569de){return request(_0xdcb6('0x27'),{'body':_[_0xdcb6('0x28')](_0x1569de,{'project_name':_0x1569de['arg_1'],'prev_project_name':_0x1569de[_0xdcb6('0x29')]||'','is_subproject':_0x1569de[_0xdcb6('0x29')]?!![]:![],'leaveAt':moment()[_0xdcb6('0x2a')](_0xdcb6('0x2b'))})});};exports['createSquareRecording']=function(_0x3f5c3d){return request('CreateSquareRecording',{'body':_0x3f5c3d});};exports[_0xdcb6('0x2c')]=function(_0x1c950e){return request(_0xdcb6('0x2d'),{'body':_0x1c950e});};exports[_0xdcb6('0x2e')]=function(_0x1fe9aa){return request(_0xdcb6('0x2f'),{'options':{'raw':![],'where':{'phone':_0x1fe9aa[_0xdcb6('0x30')],'ListId':_0x1fe9aa['ListId']}}})[_0xdcb6('0x5')](function(_0x46393b){if(_0x46393b){return _0x46393b;}return request(_0xdcb6('0x31'),{'body':_0x1fe9aa});});};exports[_0xdcb6('0x32')]=function(_0x2d1732){return request(_0xdcb6('0x33'),{'options':{'where':{'id':_0x2d1732},'attributes':[_0xdcb6('0xd')]}});};exports[_0xdcb6('0x34')]=function(_0x153a54,_0x1f3704){return request(_0xdcb6('0x35'),{'body':{'interface':_0x1f3704},'options':{'where':_0x153a54}});};exports[_0xdcb6('0x36')]=function(_0x5a098f,_0x131942,_0x536aeb){return request(_0xdcb6('0x37'),{'body':{'type':_0x131942,'uniqueid':_0x536aeb},'options':{'where':_0x5a098f}});};exports['agentUnpause']=function(_0x13b252){return request(_0xdcb6('0x38'),{'body':{},'options':{'where':_0x13b252}});};exports[_0xdcb6('0x39')]=function(_0x313ca8){return request(_0xdcb6('0x3a'),{'body':{},'options':{'where':_0x313ca8}});};
\ No newline at end of file
+var _0x5b3c=['format','YYYY-MM-DD\x20HH:mm:ss','createSquareMessage','CreateSquareMessage','createCmContact','phone','ListId','then','CreateCmContact','getPauseById','ShowPause','LoginUser','agentPause','agentUnpause','UnpauseUser','LogoutUser','bluebird','moment','lodash','util','jayson/promise','client','request','error','message','result','catch','getSquareProject','ShowSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','name','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','ShowUser','getTrunkById','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','createSquareReport','CreateSquareReport','arg_2'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x5b3c,0x1f0));var _0xc5b3=function(_0x2c1d79,_0x2d12a1){_0x2c1d79=_0x2c1d79-0x0;var _0x38c596=_0x5b3c[_0x2c1d79];return _0x38c596;};'use strict';var BPromise=require(_0xc5b3('0x0'));var moment=require(_0xc5b3('0x1'));var _=require(_0xc5b3('0x2'));var util=require(_0xc5b3('0x3'));var jayson=require(_0xc5b3('0x4'));var client=jayson[_0xc5b3('0x5')]['http']({'port':0x2329});function request(_0x3fb5d0,_0x4b6aa2){return new BPromise(function(_0x128127,_0x4ac97d){return client[_0xc5b3('0x6')](_0x3fb5d0,_0x4b6aa2)['then'](function(_0x1191e3){if(_0x1191e3[_0xc5b3('0x7')]){return _0x4ac97d(_0x1191e3[_0xc5b3('0x7')][_0xc5b3('0x8')]);}else{return _0x128127(_0x1191e3[_0xc5b3('0x9')]);}})[_0xc5b3('0xa')](function(_0x4eef26){return _0x4ac97d(_0x4eef26);});});}exports[_0xc5b3('0xb')]=function(_0x219afe){return request(_0xc5b3('0xc'),{'options':{'raw':![],'where':{'name':_0x219afe},'attributes':[_0xc5b3('0xd')]}});};exports[_0xc5b3('0xe')]=function(_0x42a325){return request(_0xc5b3('0xf'),{'options':{'raw':![],'where':{'id':_0x42a325},'include':[{'model':_0xc5b3('0x10'),'as':_0xc5b3('0x11')}],'attributes':['id',_0xc5b3('0x12'),_0xc5b3('0x13')]}});};exports[_0xc5b3('0x14')]=function(_0x834ea7){return request('ShowSquareProject',{'options':{'where':{'id':_0x834ea7},'attributes':[_0xc5b3('0x12')]}});};exports[_0xc5b3('0x15')]=function(_0xb2d08){return request(_0xc5b3('0x16'),{'options':{'where':{'id':_0xb2d08},'attributes':[_0xc5b3('0x12')]}});};exports[_0xc5b3('0x17')]=function(_0x1009e8){return request('ShowVariable',{'options':{'where':{'id':_0x1009e8},'attributes':[_0xc5b3('0x12')]}});};exports[_0xc5b3('0x18')]=function(_0x205b41){return request(_0xc5b3('0x19'),{'options':{'where':{'id':_0x205b41},'attributes':[_0xc5b3('0x1a')]}});};exports['getUserById']=function(_0x9c84ca){return request(_0xc5b3('0x1b'),{'options':{'where':{'id':_0x9c84ca},'attributes':[_0xc5b3('0x12')]}});};exports[_0xc5b3('0x1c')]=function(_0x53467a){return request('ShowTrunk',{'options':{'where':{'id':_0x53467a},'attributes':[_0xc5b3('0x12')]}});};exports[_0xc5b3('0x1d')]=function(_0x5a2ef7){return request(_0xc5b3('0x1e'),{'options':{'where':{'id':_0x5a2ef7},'attributes':[_0xc5b3('0x1f')]}});};exports[_0xc5b3('0x20')]=function(_0x28c88a){return request(_0xc5b3('0x21'),{'options':{'raw':![],'where':{'id':_0x28c88a},'include':[{'model':_0xc5b3('0x22'),'as':_0xc5b3('0x23')}]}});};exports[_0xc5b3('0x24')]=function(_0xfee9f0){return request(_0xc5b3('0x25'),{'options':{'where':{'id':_0xfee9f0},'attributes':['id',_0xc5b3('0x12')]}});};exports[_0xc5b3('0x26')]=function(_0x2b498f){return request(_0xc5b3('0x27'),{'body':_0x2b498f});};exports[_0xc5b3('0x28')]=function(_0x5dd93c){return request('CreateSquareDetailsReport',{'body':_0x5dd93c});};exports[_0xc5b3('0x29')]=function(_0x46c44d){return request(_0xc5b3('0x2a'),{'body':_['merge'](_0x46c44d,{'project_name':_0x46c44d['arg_1'],'prev_project_name':_0x46c44d[_0xc5b3('0x2b')]||'','is_subproject':_0x46c44d[_0xc5b3('0x2b')]?!![]:![],'leaveAt':moment()[_0xc5b3('0x2c')](_0xc5b3('0x2d'))})});};exports['createSquareRecording']=function(_0x40214e){return request('CreateSquareRecording',{'body':_0x40214e});};exports[_0xc5b3('0x2e')]=function(_0x420614){return request(_0xc5b3('0x2f'),{'body':_0x420614});};exports[_0xc5b3('0x30')]=function(_0x55a80f){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x55a80f[_0xc5b3('0x31')],'ListId':_0x55a80f[_0xc5b3('0x32')]}}})[_0xc5b3('0x33')](function(_0x3dd03a){if(_0x3dd03a){return _0x3dd03a;}return request(_0xc5b3('0x34'),{'body':_0x55a80f});});};exports[_0xc5b3('0x35')]=function(_0x52b8e5){return request(_0xc5b3('0x36'),{'options':{'where':{'id':_0x52b8e5},'attributes':[_0xc5b3('0x12')]}});};exports['agentLogin']=function(_0x1a88f7,_0x5aceaf){return request(_0xc5b3('0x37'),{'body':{'interface':_0x5aceaf},'options':{'where':_0x1a88f7}});};exports[_0xc5b3('0x38')]=function(_0x2e8c19,_0x571c30,_0x37805a){return request('PauseUser',{'body':{'type':_0x571c30,'uniqueid':_0x37805a},'options':{'where':_0x2e8c19}});};exports[_0xc5b3('0x39')]=function(_0x3254c4){return request(_0xc5b3('0x3a'),{'body':{},'options':{'where':_0x3254c4}});};exports['agentLogout']=function(_0x4d94c3){return request(_0xc5b3('0x3b'),{'body':{},'options':{'where':_0x4d94c3}});};
\ No newline at end of file
diff --git a/server/services/agi/scripts/aws/index.js b/server/services/agi/scripts/aws/index.js
index 3655dba..c1a1689 100644
--- a/server/services/agi/scripts/aws/index.js
+++ b/server/services/agi/scripts/aws/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8597=['exports','./polly','./lex'];(function(_0x14a8f5,_0x87fe9f){var _0x426e45=function(_0xaebaff){while(--_0xaebaff){_0x14a8f5['push'](_0x14a8f5['shift']());}};_0x426e45(++_0x87fe9f);}(_0x8597,0x187));var _0x7859=function(_0x1fc84d,_0x3f469d){_0x1fc84d=_0x1fc84d-0x0;var _0x2658fa=_0x8597[_0x1fc84d];return _0x2658fa;};var polly=require(_0x7859('0x0'));var lex=require(_0x7859('0x1'));module[_0x7859('0x2')]={'polly':polly,'lex':lex};
\ No newline at end of file
+var _0xd7a0=['./polly','exports'];(function(_0x3238d9,_0x1bcc59){var _0x125660=function(_0x1ff874){while(--_0x1ff874){_0x3238d9['push'](_0x3238d9['shift']());}};_0x125660(++_0x1bcc59);}(_0xd7a0,0x1d0));var _0x0d7a=function(_0x160408,_0x38600c){_0x160408=_0x160408-0x0;var _0x557c8c=_0xd7a0[_0x160408];return _0x557c8c;};var polly=require(_0x0d7a('0x0'));var lex=require('./lex');module[_0x0d7a('0x1')]={'polly':polly,'lex':lex};
\ No newline at end of file
diff --git a/server/services/agi/scripts/aws/lex/index.js b/server/services/agi/scripts/aws/lex/index.js
index 3f0f9b4..929ad11 100644
--- a/server/services/agi/scripts/aws/lex/index.js
+++ b/server/services/agi/scripts/aws/lex/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x24cd=['exports','./lib/api'];(function(_0x35c86f,_0x399bc4){var _0x28c841=function(_0x13a582){while(--_0x13a582){_0x35c86f['push'](_0x35c86f['shift']());}};_0x28c841(++_0x399bc4);}(_0x24cd,0x83));var _0xd24c=function(_0x59fc00,_0x1c8b8c){_0x59fc00=_0x59fc00-0x0;var _0x18e8f7=_0x24cd[_0x59fc00];return _0x18e8f7;};'use strict';var lex=require(_0xd24c('0x0'));module[_0xd24c('0x1')]=function(_0x4dc270,_0x435185,_0x4fcd89,_0x282e8f,_0x30398b,_0x3bd534){return lex(_0x4dc270,_0x435185,_0x4fcd89,_0x282e8f,_0x30398b,_0x3bd534);};
\ No newline at end of file
+var _0xbe02=['./lib/api','exports'];(function(_0x470bfb,_0x389787){var _0x2f5d97=function(_0x3431b4){while(--_0x3431b4){_0x470bfb['push'](_0x470bfb['shift']());}};_0x2f5d97(++_0x389787);}(_0xbe02,0x146));var _0x2be0=function(_0x395832,_0x426546){_0x395832=_0x395832-0x0;var _0x53cbce=_0xbe02[_0x395832];return _0x53cbce;};'use strict';var lex=require(_0x2be0('0x0'));module[_0x2be0('0x1')]=function(_0x20d2b7,_0x9d341f,_0x56973c,_0x26aef6,_0x2b34c2,_0x9eb980){return lex(_0x20d2b7,_0x9d341f,_0x56973c,_0x26aef6,_0x2b34c2,_0x9eb980);};
\ No newline at end of file
diff --git a/server/services/agi/scripts/aws/lex/lib/api.js b/server/services/agi/scripts/aws/lex/lib/api.js
index e103682..d819da4 100644
--- a/server/services/agi/scripts/aws/lex/lib/api.js
+++ b/server/services/agi/scripts/aws/lex/lib/api.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x52ff=['LexRuntime','bluebird','postText','slots','hasOwnProperty'];(function(_0x248c2c,_0xfffcb9){var _0x3f340d=function(_0xcaaa6){while(--_0xcaaa6){_0x248c2c['push'](_0x248c2c['shift']());}};_0x3f340d(++_0xfffcb9);}(_0x52ff,0x173));var _0xf52f=function(_0x1f3378,_0x4876fa){_0x1f3378=_0x1f3378-0x0;var _0x58d48c=_0x52ff[_0x1f3378];return _0x58d48c;};'use strict';var BPromise=require(_0xf52f('0x0'));var AWS=require('aws-sdk');function lexResult(_0x46b7c4,_0x170142){return new BPromise(function(_0x1b8a63,_0x2dcaff){_0x46b7c4[_0xf52f('0x1')](_0x170142,function(_0x415351,_0x223679){if(_0x415351){_0x2dcaff(_0x415351);}if(_0x223679[_0xf52f('0x2')]){for(const _0x210268 in _0x223679[_0xf52f('0x2')]){if(_0x223679[_0xf52f('0x2')][_0xf52f('0x3')](_0x210268)){var _0x25ba78=_0x223679[_0xf52f('0x2')][_0x210268];_0x223679['slot_'+_0x210268]=_0x25ba78;}}}_0x1b8a63(_0x223679);});});}module['exports']=function(_0x12ea65,_0x28e23c,_0x3ed084,_0x21de20,_0x321ef6,_0x55062a){var _0x390b9b=new AWS[(_0xf52f('0x4'))]({'accessKeyId':_0x28e23c,'secretAccessKey':_0x3ed084,'region':_0x21de20});var _0x507410={'botAlias':'$LATEST','botName':_0x55062a,'inputText':_0x321ef6,'userId':_0x12ea65};return lexResult(_0x390b9b,_0x507410);};
\ No newline at end of file
+var _0x0048=['postText','slots','hasOwnProperty','exports','$LATEST','bluebird','aws-sdk'];(function(_0x376b45,_0x5964fb){var _0x2341b3=function(_0x5a7f01){while(--_0x5a7f01){_0x376b45['push'](_0x376b45['shift']());}};_0x2341b3(++_0x5964fb);}(_0x0048,0x1a9));var _0x8004=function(_0x29e2ba,_0x1b171f){_0x29e2ba=_0x29e2ba-0x0;var _0x5c5920=_0x0048[_0x29e2ba];return _0x5c5920;};'use strict';var BPromise=require(_0x8004('0x0'));var AWS=require(_0x8004('0x1'));function lexResult(_0x34561a,_0x1516e3){return new BPromise(function(_0x54c848,_0x1e6ed4){_0x34561a[_0x8004('0x2')](_0x1516e3,function(_0x19692a,_0x19d5e3){if(_0x19692a){_0x1e6ed4(_0x19692a);}if(_0x19d5e3[_0x8004('0x3')]){for(const _0x3facab in _0x19d5e3[_0x8004('0x3')]){if(_0x19d5e3['slots'][_0x8004('0x4')](_0x3facab)){var _0xc0970f=_0x19d5e3['slots'][_0x3facab];_0x19d5e3['slot_'+_0x3facab]=_0xc0970f;}}}_0x54c848(_0x19d5e3);});});}module[_0x8004('0x5')]=function(_0x41a9f8,_0x192adf,_0x373a47,_0x33edbb,_0x5120d5,_0x49797f){var _0x47857e=new AWS['LexRuntime']({'accessKeyId':_0x192adf,'secretAccessKey':_0x373a47,'region':_0x33edbb});var _0xc63245={'botAlias':_0x8004('0x6'),'botName':_0x49797f,'inputText':_0x5120d5,'userId':_0x41a9f8};return lexResult(_0x47857e,_0xc63245);};
\ No newline at end of file
diff --git a/server/services/agi/scripts/aws/polly/index.js b/server/services/agi/scripts/aws/polly/index.js
index 133532a..6366ca5 100644
--- a/server/services/agi/scripts/aws/polly/index.js
+++ b/server/services/agi/scripts/aws/polly/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9766=['./lib/api','exports'];(function(_0x1df060,_0x5ea511){var _0xc24b=function(_0x33258a){while(--_0x33258a){_0x1df060['push'](_0x1df060['shift']());}};_0xc24b(++_0x5ea511);}(_0x9766,0x9a));var _0x6976=function(_0x450bf9,_0x1895de){_0x450bf9=_0x450bf9-0x0;var _0x268350=_0x9766[_0x450bf9];return _0x268350;};'use strict';var polly=require(_0x6976('0x0'));module[_0x6976('0x1')]=function(_0x2003f2,_0x50edf6,_0xe42662,_0x4bdd4c,_0x191d3a,_0x215034,_0x492c7b){return polly(_0x2003f2,_0x50edf6,_0xe42662,_0x4bdd4c,_0x191d3a,_0x215034,_0x492c7b);};
\ No newline at end of file
+var _0xcd67=['./lib/api'];(function(_0x20d8d3,_0x118ad0){var _0x7c229e=function(_0x1a639b){while(--_0x1a639b){_0x20d8d3['push'](_0x20d8d3['shift']());}};_0x7c229e(++_0x118ad0);}(_0xcd67,0x157));var _0x7cd6=function(_0x517368,_0x75136e){_0x517368=_0x517368-0x0;var _0x5e13e7=_0xcd67[_0x517368];return _0x5e13e7;};'use strict';var polly=require(_0x7cd6('0x0'));module['exports']=function(_0x3d81be,_0x33eda9,_0x2f21d4,_0x3fd082,_0x5a2af6,_0x7282a7,_0x2ad151){return polly(_0x3d81be,_0x33eda9,_0x2f21d4,_0x3fd082,_0x5a2af6,_0x7282a7,_0x2ad151);};
\ No newline at end of file
diff --git a/server/services/agi/scripts/aws/polly/lib/api.js b/server/services/agi/scripts/aws/polly/lib/api.js
index 7edb6f0..3d22920 100644
--- a/server/services/agi/scripts/aws/polly/lib/api.js
+++ b/server/services/agi/scripts/aws/polly/lib/api.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb989=['mp3','path','randomstring','aws-sdk','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text'];(function(_0x46a8a4,_0x257ebc){var _0x3c2816=function(_0x26ff54){while(--_0x26ff54){_0x46a8a4['push'](_0x46a8a4['shift']());}};_0x3c2816(++_0x257ebc);}(_0xb989,0xa9));var _0x9b98=function(_0x1e6659,_0x1f860c){_0x1e6659=_0x1e6659-0x0;var _0x4d16e4=_0xb989[_0x1e6659];return _0x4d16e4;};'use strict';var fs=require('fs');var path=require(_0x9b98('0x0'));var BPromise=require('bluebird');var rs=require(_0x9b98('0x1'));var AWS=require(_0x9b98('0x2'));function pollyResult(_0x1c64e5,_0x1c29aa,_0x2a7a80){return new BPromise(function(_0x239ced,_0x6878f0){_0x1c64e5[_0x9b98('0x3')](_0x1c29aa,function(_0x3d73cb,_0xf08391){if(_0x3d73cb){_0x6878f0(_0x3d73cb);}else if(_0xf08391){if(_0xf08391[_0x9b98('0x4')]instanceof Buffer){fs[_0x9b98('0x5')](_0x2a7a80,_0xf08391[_0x9b98('0x4')],function(_0x3ef2a4){if(_0x3ef2a4){_0x6878f0(_0x3ef2a4);}else{_0x239ced();}});}else{_0x6878f0(new Error(_0x9b98('0x6')));}}else{_0x6878f0(new Error(_0x9b98('0x7')));}});});}module[_0x9b98('0x8')]=function(_0x1a2614,_0x13681b,_0x14dc2b,_0x58ef15,_0x522467,_0x210644,_0x313cc5){var _0x5a6803=new AWS[(_0x9b98('0x9'))]({'accessKeyId':_0x1a2614,'secretAccessKey':_0x13681b,'region':_0x14dc2b});var _0x12ecc1={'Text':_0x522467,'TextType':_0x210644||_0x9b98('0xa'),'OutputFormat':_0x9b98('0xb'),'VoiceId':_0x58ef15};return pollyResult(_0x5a6803,_0x12ecc1,_0x313cc5);};
\ No newline at end of file
+var _0xace8=['writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','mp3','path','bluebird','aws-sdk','AudioStream'];(function(_0x471408,_0x51c81e){var _0x12b56a=function(_0x2be234){while(--_0x2be234){_0x471408['push'](_0x471408['shift']());}};_0x12b56a(++_0x51c81e);}(_0xace8,0x1c7));var _0x8ace=function(_0x10cbda,_0x331fd9){_0x10cbda=_0x10cbda-0x0;var _0x10e5d8=_0xace8[_0x10cbda];return _0x10e5d8;};'use strict';var fs=require('fs');var path=require(_0x8ace('0x0'));var BPromise=require(_0x8ace('0x1'));var rs=require('randomstring');var AWS=require(_0x8ace('0x2'));function pollyResult(_0x1b6a18,_0xc9ffcb,_0x43b180){return new BPromise(function(_0x22fe9b,_0x14e4a2){_0x1b6a18['synthesizeSpeech'](_0xc9ffcb,function(_0x277267,_0x5cc88f){if(_0x277267){_0x14e4a2(_0x277267);}else if(_0x5cc88f){if(_0x5cc88f[_0x8ace('0x3')]instanceof Buffer){fs[_0x8ace('0x4')](_0x43b180,_0x5cc88f['AudioStream'],function(_0x576e19){if(_0x576e19){_0x14e4a2(_0x576e19);}else{_0x22fe9b();}});}else{_0x14e4a2(new Error(_0x8ace('0x5')));}}else{_0x14e4a2(new Error(_0x8ace('0x6')));}});});}module[_0x8ace('0x7')]=function(_0x345847,_0x42b59d,_0x4a4f30,_0x2543f2,_0x1163ab,_0x5a7db8,_0x4b770f){var _0x113016=new AWS['Polly']({'accessKeyId':_0x345847,'secretAccessKey':_0x42b59d,'region':_0x4a4f30});var _0x1b7bcd={'Text':_0x1163ab,'TextType':_0x5a7db8||'text','OutputFormat':_0x8ace('0x8'),'VoiceId':_0x2543f2};return pollyResult(_0x113016,_0x1b7bcd,_0x4b770f);};
\ No newline at end of file
diff --git a/server/services/agi/scripts/google/asr/index.js b/server/services/agi/scripts/google/asr/index.js
index b1ba973..a3a8fac 100644
--- a/server/services/agi/scripts/google/asr/index.js
+++ b/server/services/agi/scripts/google/asr/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x86e7=['exports','./lib/api'];(function(_0x53d325,_0x36e4fe){var _0x20649c=function(_0x40df7d){while(--_0x40df7d){_0x53d325['push'](_0x53d325['shift']());}};_0x20649c(++_0x36e4fe);}(_0x86e7,0xf1));var _0x786e=function(_0x5cbf0e,_0x4cd140){_0x5cbf0e=_0x5cbf0e-0x0;var _0x1c76f8=_0x86e7[_0x5cbf0e];return _0x1c76f8;};'use strict';var asr=require(_0x786e('0x0'));module[_0x786e('0x1')]=function(_0x3dd50d,_0x4e7681,_0xfc784f,_0x144d0c){return asr(_0x3dd50d,_0x4e7681,_0xfc784f);};
\ No newline at end of file
+var _0x2a4e=['./lib/api'];(function(_0x3bc078,_0xc9ab94){var _0x11c484=function(_0x265684){while(--_0x265684){_0x3bc078['push'](_0x3bc078['shift']());}};_0x11c484(++_0xc9ab94);}(_0x2a4e,0x1df));var _0xe2a4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2a4e[_0x3dd15e];return _0x231fd0;};'use strict';var asr=require(_0xe2a4('0x0'));module['exports']=function(_0x1564a0,_0x2cd637,_0x1d0e22,_0x2c3239){return asr(_0x1564a0,_0x2cd637,_0x1d0e22);};
\ No newline at end of file
diff --git a/server/services/agi/scripts/google/asr/lib/api.js b/server/services/agi/scripts/google/asr/lib/api.js
index 4d60952..8df601f 100644
--- a/server/services/agi/scripts/google/asr/lib/api.js
+++ b/server/services/agi/scripts/google/asr/lib/api.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7ac6=['exports','length','key\x20should\x20be\x20a\x20string','string','lang\x20should\x20be\x20a\x20string','readFileSync','base64','POST','LINEAR16','8000','url','bluebird','https://speech.googleapis.com'];(function(_0xbfba6,_0x344461){var _0x3c5291=function(_0x37b1f5){while(--_0x37b1f5){_0xbfba6['push'](_0xbfba6['shift']());}};_0x3c5291(++_0x344461);}(_0x7ac6,0x7f));var _0x67ac=function(_0x3b48de,_0x489315){_0x3b48de=_0x3b48de-0x0;var _0x4bdc86=_0x7ac6[_0x3b48de];return _0x4bdc86;};'use strict';var url=require(_0x67ac('0x0'));var BPromise=require(_0x67ac('0x1'));var fs=require('fs');var host=_0x67ac('0x2');module[_0x67ac('0x3')]=function(_0x100530,_0x482335,_0xcbb925){return new BPromise(function(_0x4c544b,_0x16adc1){var _0x2659f2;if(typeof _0x100530!=='string'||_0x100530[_0x67ac('0x4')]===0x0){return _0x16adc1('filepath\x20should\x20be\x20a\x20string');}if(typeof _0x482335!=='string'||_0x482335[_0x67ac('0x4')]===0x0){return _0x16adc1(_0x67ac('0x5'));}if(typeof _0xcbb925!=='undefined'&&(typeof _0xcbb925!==_0x67ac('0x6')||_0xcbb925['length']===0x0)){return _0x16adc1(_0x67ac('0x7'));}try{_0x2659f2=fs[_0x67ac('0x8')](_0x100530)['toString'](_0x67ac('0x9'));}catch(_0x25963f){return _0x16adc1(_0x25963f);}return _0x4c544b({'method':_0x67ac('0xa'),'uri':host+'/v1/speech:recognize?key='+_0x482335,'body':{'config':{'encoding':_0x67ac('0xb'),'sampleRateHertz':_0x67ac('0xc'),'languageCode':_0xcbb925},'audio':{'content':_0x2659f2}},'json':!![]});});};
\ No newline at end of file
+var _0xef8e=['lang\x20should\x20be\x20a\x20string','readFileSync','toString','POST','/v1/speech:recognize?key=','LINEAR16','8000','url','bluebird','exports','filepath\x20should\x20be\x20a\x20string','string','key\x20should\x20be\x20a\x20string'];(function(_0x573752,_0x17ae4){var _0x2cb020=function(_0x33c2c3){while(--_0x33c2c3){_0x573752['push'](_0x573752['shift']());}};_0x2cb020(++_0x17ae4);}(_0xef8e,0x7c));var _0xeef8=function(_0xab01e3,_0x4860c2){_0xab01e3=_0xab01e3-0x0;var _0x5f16de=_0xef8e[_0xab01e3];return _0x5f16de;};'use strict';var url=require(_0xeef8('0x0'));var BPromise=require(_0xeef8('0x1'));var fs=require('fs');var host='https://speech.googleapis.com';module[_0xeef8('0x2')]=function(_0x4dd1ca,_0x190b02,_0x4501f4){return new BPromise(function(_0x40c25c,_0x4496b6){var _0x27628b;if(typeof _0x4dd1ca!=='string'||_0x4dd1ca['length']===0x0){return _0x4496b6(_0xeef8('0x3'));}if(typeof _0x190b02!==_0xeef8('0x4')||_0x190b02['length']===0x0){return _0x4496b6(_0xeef8('0x5'));}if(typeof _0x4501f4!=='undefined'&&(typeof _0x4501f4!=='string'||_0x4501f4['length']===0x0)){return _0x4496b6(_0xeef8('0x6'));}try{_0x27628b=fs[_0xeef8('0x7')](_0x4dd1ca)[_0xeef8('0x8')]('base64');}catch(_0x3b3233){return _0x4496b6(_0x3b3233);}return _0x40c25c({'method':_0xeef8('0x9'),'uri':host+_0xeef8('0xa')+_0x190b02,'body':{'config':{'encoding':_0xeef8('0xb'),'sampleRateHertz':_0xeef8('0xc'),'languageCode':_0x4501f4},'audio':{'content':_0x27628b}},'json':!![]});});};
\ No newline at end of file
diff --git a/server/services/agi/scripts/google/index.js b/server/services/agi/scripts/google/index.js
index cc93d2b..a13841e 100644
--- a/server/services/agi/scripts/google/index.js
+++ b/server/services/agi/scripts/google/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e0=['exports','./asr'];(function(_0x21f9c2,_0x2b3d2a){var _0x3da17f=function(_0x57e2b9){while(--_0x57e2b9){_0x21f9c2['push'](_0x21f9c2['shift']());}};_0x3da17f(++_0x2b3d2a);}(_0x70e0,0x17b));var _0x070e=function(_0x1b9c2e,_0x2890a0){_0x1b9c2e=_0x1b9c2e-0x0;var _0x4df843=_0x70e0[_0x1b9c2e];return _0x4df843;};var asr=require(_0x070e('0x0'));module[_0x070e('0x1')]={'asr':asr};
\ No newline at end of file
+var _0xa9e0=['exports','./asr'];(function(_0x25b6ef,_0xd822){var _0x55baf3=function(_0x15eddd){while(--_0x15eddd){_0x25b6ef['push'](_0x25b6ef['shift']());}};_0x55baf3(++_0xd822);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9df060,_0x253d33){_0x9df060=_0x9df060-0x0;var _0x338dfe=_0xa9e0[_0x9df060];return _0x338dfe;};var asr=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'asr':asr};
\ No newline at end of file
diff --git a/server/services/agi/scripts/index.js b/server/services/agi/scripts/index.js
index 77bfbb9..7958b0e 100644
--- a/server/services/agi/scripts/index.js
+++ b/server/services/agi/scripts/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb10b=['url','parse','randomstring','sox','request-promise','util','querystring','moment','apiai-promise','md5','./aws','./tilde','./sestek','../../../config/logger','agi','https://api.ispeech.org/api/rest','protocol','WHAT_EVER','get','statusCode','error','\x20failed,\x20status\x20code\x20=\x20','statusMessage','request\x20to\x20','createWriteStream','finish','finish\x20download\x20file','close','unlink','download\x20error','pipe','end','https:','data','transcode','wav','error\x20convert','info','finish\x20to\x20convert','start','tmp','.wav','base64','then','readFileSync','toString','googleTTS','resolve','generate','.mp3','goggleTTS\x20path','split','uri','results','alternatives','transcript','join','map','confidence','googleASR\x20transcription','catch','message','googleDialogflow','textRequest','stringify','result','source','resolvedQuery','action','fulfillment','score','status','code','metadata','endConversation','isFallbackIntent','tildeASR','asr','Tilde\x20ASR\x20transcription','awsPolly','polly','chmodSync','777','awsLex','lex','ispeechTTS','format','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','freeform=3','nda','channelData','CustomAction','CustomActionData','AudioFromTts','Data','audiofile','dirName','path','https'];(function(_0x1304c6,_0x6bb485){var _0x2e6654=function(_0x2b623c){while(--_0x2b623c){_0x1304c6['push'](_0x1304c6['shift']());}};_0x2e6654(++_0x6bb485);}(_0xb10b,0x12a));var _0xbb10=function(_0x4e664c,_0x47abb9){_0x4e664c=_0x4e664c-0x0;var _0x5f3913=_0xb10b[_0x4e664c];return _0x5f3913;};'use strict';var fs=require('fs');var path=require(_0xbb10('0x0'));var http=require('http');var https=require(_0xbb10('0x1'));var urlParse=require(_0xbb10('0x2'))[_0xbb10('0x3')];var BPromise=require('bluebird');var rs=require(_0xbb10('0x4'));var sox=require(_0xbb10('0x5'));var rp=require(_0xbb10('0x6'));var util=require(_0xbb10('0x7'));var querystring=require(_0xbb10('0x8'));var moment=require(_0xbb10('0x9'));var tts=require('google-tts-api');var apiai=require(_0xbb10('0xa'));var md5=require(_0xbb10('0xb'));var google=require('./google');var aws=require(_0xbb10('0xc'));var tilde=require(_0xbb10('0xd'));var sestek=require(_0xbb10('0xe'));var logger=require(_0xbb10('0xf'))(_0xbb10('0x10'));var ISPEECH_API=_0xbb10('0x11');function downloadFile(_0x229887,_0xa3adc8){return new BPromise(function(_0x5ab04a,_0x4e47f8){var _0x20bd61=urlParse(_0x229887);var _0x118a74=_0x20bd61[_0xbb10('0x12')]==='https:'?https:http;var _0x408248={'host':_0x20bd61['host'],'path':_0x20bd61[_0xbb10('0x0')],'headers':{'user-agent':_0xbb10('0x13')}};_0x118a74[_0xbb10('0x14')](_0x408248,function(_0x193a27){if(_0x193a27[_0xbb10('0x15')]!==0xc8){logger[_0xbb10('0x16')]('request\x20to\x20'+_0x229887+_0xbb10('0x17')+_0x193a27[_0xbb10('0x15')]+'\x20('+_0x193a27[_0xbb10('0x18')]+')');_0x4e47f8(new Error(_0xbb10('0x19')+_0x229887+_0xbb10('0x17')+_0x193a27[_0xbb10('0x15')]+'\x20('+_0x193a27[_0xbb10('0x18')]+')'));return;}var _0x36b5e8=fs[_0xbb10('0x1a')](_0xa3adc8);_0x36b5e8['on'](_0xbb10('0x1b'),function(){logger['info'](_0xbb10('0x1c'));_0x36b5e8[_0xbb10('0x1d')](_0x5ab04a);});_0x36b5e8['on'](_0xbb10('0x16'),function(_0x42db98){fs[_0xbb10('0x1e')](_0xa3adc8);logger[_0xbb10('0x16')](_0xbb10('0x1f'),_0x42db98);_0x4e47f8(_0x42db98);});_0x193a27[_0xbb10('0x20')](_0x36b5e8);})['on'](_0xbb10('0x16'),function(_0xe1c665){logger['error'](_0xe1c665);_0x4e47f8(_0xe1c665);})[_0xbb10('0x21')]();});}function uploadFile(_0x19f48d){return new BPromise(function(_0x388fab,_0x109908){var _0xdf237d=urlParse(_0x19f48d);var _0x44e563=_0xdf237d['protocol']===_0xbb10('0x22')?https:http;var _0x12ef77={'host':_0xdf237d['host'],'path':_0xdf237d['path'],'headers':{'user-agent':_0xbb10('0x13')}};_0x44e563[_0xbb10('0x14')](_0x12ef77,function(_0x2e911d){if(_0x2e911d[_0xbb10('0x15')]!==0xc8){_0x109908(new Error(_0xbb10('0x19')+_0x19f48d+_0xbb10('0x17')+_0x2e911d[_0xbb10('0x15')]+'\x20('+_0x2e911d[_0xbb10('0x18')]+')'));return;}var _0x7f2377='';_0x2e911d['on'](_0xbb10('0x23'),function(_0x3ba6cd){_0x7f2377+=_0x3ba6cd;});_0x2e911d['on'](_0xbb10('0x21'),function(){_0x388fab(_0x7f2377);});})['on']('error',function(_0x4fedac){_0x109908(_0x4fedac);})['end']();});}function convertFile(_0xc93a04,_0x3c5ae7){return new BPromise(function(_0x2c89b9,_0x4e25ff){var _0x2fdde9=sox[_0xbb10('0x24')](_0xc93a04,_0x3c5ae7,{'sampleRate':0x1f40,'format':_0xbb10('0x25'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x2fdde9['on'](_0xbb10('0x16'),function(_0x1acce9){logger[_0xbb10('0x16')](_0xbb10('0x26'),_0x1acce9);_0x4e25ff(_0x1acce9);});_0x2fdde9['on']('end',function(){logger[_0xbb10('0x27')](_0xbb10('0x28'));_0x2c89b9();});_0x2fdde9[_0xbb10('0x29')]();});}function base64Decode(_0x2e0249,_0x1d30aa){var _0x2ff4c1=path['resolve'](__dirname,_0xbb10('0x2a'),rs['generate'](0x4)+_0xbb10('0x2b'));fs['writeFileSync'](_0x2ff4c1,_0x2e0249,_0xbb10('0x2c'));return convertFile(_0x2ff4c1,_0x1d30aa)[_0xbb10('0x2d')](function(){try{fs[_0xbb10('0x1e')](_0x2ff4c1);fs['chmodSync'](_0x1d30aa,'777');}catch(_0x4c3744){logger[_0xbb10('0x16')](_0x4c3744);}return _0x1d30aa['split']('.')[0x0];});}function base64Encode(_0x359ad4){var _0x37dde7=fs[_0xbb10('0x2e')](_0x359ad4);return new Buffer(_0x37dde7)[_0xbb10('0x2f')](_0xbb10('0x2c'));}exports[_0xbb10('0x30')]=function(_0xf85197,_0x4975f5){var _0x25acb3,_0x1da9c9;return tts(_0xf85197,_0x4975f5||'en',0x1)[_0xbb10('0x2d')](function(_0x8c1ce6){logger[_0xbb10('0x27')](_0x8c1ce6);_0x25acb3=path[_0xbb10('0x31')](__dirname,_0xbb10('0x2a'),rs[_0xbb10('0x32')](0x4)+_0xbb10('0x33'));return downloadFile(_0x8c1ce6,_0x25acb3);})['then'](function(){_0x1da9c9=path[_0xbb10('0x31')](__dirname,_0xbb10('0x2a'),rs[_0xbb10('0x32')](0x4)+_0xbb10('0x2b'));return convertFile(_0x25acb3,_0x1da9c9);})['then'](function(){try{fs[_0xbb10('0x1e')](_0x25acb3);fs['chmodSync'](_0x1da9c9,'777');}catch(_0x3eb3cc){logger[_0xbb10('0x16')](_0x3eb3cc);}logger[_0xbb10('0x27')](_0xbb10('0x34'),_0x1da9c9[_0xbb10('0x35')]('.')[0x0]);return _0x1da9c9[_0xbb10('0x35')]('.')[0x0];});};exports['googleASR']=function(_0x1e5bbd,_0x25d72f,_0x52de31){return google['asr'](_0x1e5bbd,_0x25d72f,_0x52de31)['then'](function(_0x31bee3){logger[_0xbb10('0x27')](_0x31bee3[_0xbb10('0x36')]);return rp(_0x31bee3);})['then'](function(_0x3c0cd7){var _0x3e8538='';var _0x4345f3=0x0;try{fs['unlink'](_0x1e5bbd);}catch(_0x17b6c5){logger[_0xbb10('0x16')](_0x17b6c5);}if(_0x3c0cd7&&_0x3c0cd7[_0xbb10('0x37')]){_0x3e8538=_0x3c0cd7[_0xbb10('0x37')]['map'](function(_0xd238e9){return _0xd238e9&&_0xd238e9[_0xbb10('0x38')][0x0]&&_0xd238e9['alternatives'][0x0][_0xbb10('0x39')]?_0xd238e9[_0xbb10('0x38')][0x0][_0xbb10('0x39')]:'';})[_0xbb10('0x3a')]('\x0a');_0x4345f3=_0x3c0cd7[_0xbb10('0x37')][_0xbb10('0x3b')](function(_0x5f3d67){return _0x5f3d67&&_0x5f3d67[_0xbb10('0x38')][0x0]&&_0x5f3d67[_0xbb10('0x38')][0x0][_0xbb10('0x3c')]?_0x5f3d67[_0xbb10('0x38')][0x0]['confidence']:0x0;})[_0xbb10('0x3a')]('\x0a');}logger[_0xbb10('0x27')](_0xbb10('0x3d'),_0x3e8538);logger[_0xbb10('0x27')]('googleASR\x20confidence',_0x4345f3);return{'transcript':_0x3e8538,'confidence':_0x4345f3};})[_0xbb10('0x3e')](function(_0x202c60){logger['error']('[%s]\x20%s:%s',_0x202c60[_0xbb10('0x15')],_0x202c60['name'],_0x202c60[_0xbb10('0x3f')]);});};exports[_0xbb10('0x40')]=function(_0x4c66d8,_0x366608,_0x1d82bf,_0x474e99){var _0x5cf4f8=apiai(_0x366608,{'language':_0x474e99||'en'});return _0x5cf4f8[_0xbb10('0x41')](_0x1d82bf,{'sessionId':md5(_0x4c66d8)})[_0xbb10('0x2d')](function(_0x3b9fdf){logger[_0xbb10('0x27')](JSON[_0xbb10('0x42')](_0x3b9fdf));return{'source':_0x3b9fdf[_0xbb10('0x43')][_0xbb10('0x44')],'resolvedQuery':_0x3b9fdf[_0xbb10('0x43')][_0xbb10('0x45')],'action':_0x3b9fdf[_0xbb10('0x43')][_0xbb10('0x46')],'actionIncomplete':_0x3b9fdf[_0xbb10('0x43')]['actionIncomplete'],'speech':_0x3b9fdf[_0xbb10('0x43')][_0xbb10('0x47')]['speech'],'score':_0x3b9fdf[_0xbb10('0x43')][_0xbb10('0x48')],'statusCode':_0x3b9fdf[_0xbb10('0x49')][_0xbb10('0x4a')],'endConversation':_0x3b9fdf[_0xbb10('0x43')][_0xbb10('0x4b')][_0xbb10('0x4c')]||![],'isFallbackIntent':_0x3b9fdf['result']['metadata'][_0xbb10('0x4d')]};});};exports[_0xbb10('0x4e')]=function(_0x2b12bd,_0x57d2c0,_0x5f0c12,_0x3cd6f3){return tilde[_0xbb10('0x4f')](_0x2b12bd,_0x57d2c0,_0x5f0c12,_0x3cd6f3)[_0xbb10('0x2d')](function(_0xf820fe){try{fs[_0xbb10('0x1e')](_0x2b12bd);}catch(_0x22b315){logger[_0xbb10('0x16')](_0x22b315);}logger[_0xbb10('0x27')](_0xbb10('0x50'),_0xf820fe[_0xbb10('0x39')]);logger['info']('Tilde\x20ASR\x20confidence',_0xf820fe[_0xbb10('0x3c')]);return _0xf820fe;});};exports[_0xbb10('0x51')]=function(_0x36ab7d,_0xb014b0,_0x36aa7d,_0x440f9e,_0x358e7e,_0x445870){var _0x1c0d8f=path[_0xbb10('0x31')](__dirname,_0xbb10('0x2a'),rs[_0xbb10('0x32')](0x4)+_0xbb10('0x33'));var _0x2e6fd9;return aws[_0xbb10('0x52')](_0x36ab7d,_0xb014b0,_0x36aa7d,_0x440f9e,_0x358e7e,_0x445870,_0x1c0d8f)['then'](function(){_0x2e6fd9=path[_0xbb10('0x31')](__dirname,'tmp',rs[_0xbb10('0x32')](0x4)+_0xbb10('0x2b'));return convertFile(_0x1c0d8f,_0x2e6fd9);})[_0xbb10('0x2d')](function(){try{fs[_0xbb10('0x1e')](_0x1c0d8f);fs[_0xbb10('0x53')](_0x2e6fd9,_0xbb10('0x54'));}catch(_0x2e3326){logger[_0xbb10('0x16')](_0x2e3326);}return _0x2e6fd9[_0xbb10('0x35')]('.')[0x0];});};exports[_0xbb10('0x55')]=function(_0x44a056,_0x1c2dce,_0x1d49e1,_0x3d7e17,_0x4475e1,_0x5de0cc){return aws[_0xbb10('0x56')](_0x44a056,_0x1c2dce,_0x1d49e1,_0x3d7e17,_0x4475e1,_0x5de0cc)[_0xbb10('0x2d')](function(_0x1b83a9){logger[_0xbb10('0x27')](JSON[_0xbb10('0x42')](_0x1b83a9));return _0x1b83a9;});};exports[_0xbb10('0x57')]=function(_0x4bedd0,_0x120bda,_0x4731ce,_0x2909a1){var _0x14fed3=util[_0xbb10('0x58')](_0xbb10('0x59'),ISPEECH_API,_0x4bedd0,encodeURIComponent(_0x120bda),_0x4731ce,_0x2909a1);var _0x175872=path[_0xbb10('0x31')](__dirname,_0xbb10('0x2a'),rs[_0xbb10('0x32')](0x4)+_0xbb10('0x33'));var _0x2a1ce1;return downloadFile(_0x14fed3,_0x175872)[_0xbb10('0x2d')](function(){_0x2a1ce1=path['resolve'](__dirname,'tmp',rs[_0xbb10('0x32')](0x4)+_0xbb10('0x2b'));return convertFile(_0x175872,_0x2a1ce1);})[_0xbb10('0x2d')](function(){try{fs[_0xbb10('0x1e')](_0x175872);fs['chmodSync'](_0x2a1ce1,'777');}catch(_0x79411e){logger[_0xbb10('0x16')](_0x79411e);}return _0x2a1ce1[_0xbb10('0x35')]('.')[0x0];});};exports[_0xbb10('0x5a')]=function(_0x412f13,_0x3e9753,_0x45c0dc,_0x4a5fb9){var _0x117e84=util[_0xbb10('0x58')]('%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s',ISPEECH_API,_0x3e9753,_0x45c0dc,base64Encode(_0x412f13),_0x4a5fb9?util['format']('model=%s',encodeURIComponent(_0x4a5fb9)):_0xbb10('0x5b'));return uploadFile(_0x117e84)[_0xbb10('0x2d')](function(_0x155dc5){return querystring['parse'](_0x155dc5);});};exports['sestekNDA']=function(_0x5846d1,_0x3ebc5f){return sestek[_0xbb10('0x5c')](_0x5846d1,_0x3ebc5f)[_0xbb10('0x2d')](function(_0x4e9fbd){logger[_0xbb10('0x27')](JSON[_0xbb10('0x42')](_0x4e9fbd));var _0x5a6538={'speech':_0x4e9fbd['text'],'action':_0x4e9fbd[_0xbb10('0x5d')]?_0x4e9fbd[_0xbb10('0x5d')][_0xbb10('0x5e')]:undefined,'actiondata':_0x4e9fbd[_0xbb10('0x5d')]?_0x4e9fbd['channelData'][_0xbb10('0x5f')]:undefined};if(_0x4e9fbd[_0xbb10('0x5d')]&&_0x4e9fbd[_0xbb10('0x5d')]['AudioFromTts']){return base64Decode(_0x4e9fbd[_0xbb10('0x5d')][_0xbb10('0x60')][_0xbb10('0x61')],path['resolve'](__dirname,_0xbb10('0x2a'),rs[_0xbb10('0x32')](0x4)+_0xbb10('0x2b')))[_0xbb10('0x2d')](function(_0x5e4a6e){_0x5a6538[_0xbb10('0x62')]=_0x5e4a6e;return _0x5a6538;});}return _0x5a6538;});};exports[_0xbb10('0x63')]=function(){return __dirname;};
\ No newline at end of file
+var _0xa9e0=['text','channelData','CustomAction','AudioFromTts','Data','dirName','path','http','https','bluebird','sox','request-promise','util','querystring','moment','apiai-promise','md5','./google','./sestek','https://api.ispeech.org/api/rest','host','WHAT_EVER','get','statusCode','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','info','finish\x20download\x20file','error','unlink','download\x20error','pipe','end','protocol','https:','data','transcode','error\x20convert','finish\x20to\x20convert','start','resolve','tmp','generate','.wav','base64','then','chmodSync','777','split','readFileSync','googleTTS','.mp3','goggleTTS\x20path','googleASR','asr','uri','results','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','catch','[%s]\x20%s:%s','name','message','googleDialogflow','textRequest','stringify','result','source','resolvedQuery','action','actionIncomplete','fulfillment','speech','score','code','metadata','endConversation','isFallbackIntent','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','awsLex','lex','format','freeform=3','parse','sestekNDA','nda'];(function(_0x2106da,_0x54ead6){var _0x53d793=function(_0x225d19){while(--_0x225d19){_0x2106da['push'](_0x2106da['shift']());}};_0x53d793(++_0x54ead6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x47e7cb,_0x4c1b8d){_0x47e7cb=_0x47e7cb-0x0;var _0x2a8874=_0xa9e0[_0x47e7cb];return _0x2a8874;};'use strict';var fs=require('fs');var path=require(_0x0a9e('0x0'));var http=require(_0x0a9e('0x1'));var https=require(_0x0a9e('0x2'));var urlParse=require('url')['parse'];var BPromise=require(_0x0a9e('0x3'));var rs=require('randomstring');var sox=require(_0x0a9e('0x4'));var rp=require(_0x0a9e('0x5'));var util=require(_0x0a9e('0x6'));var querystring=require(_0x0a9e('0x7'));var moment=require(_0x0a9e('0x8'));var tts=require('google-tts-api');var apiai=require(_0x0a9e('0x9'));var md5=require(_0x0a9e('0xa'));var google=require(_0x0a9e('0xb'));var aws=require('./aws');var tilde=require('./tilde');var sestek=require(_0x0a9e('0xc'));var logger=require('../../../config/logger')('agi');var ISPEECH_API=_0x0a9e('0xd');function downloadFile(_0xf81284,_0x307b3e){return new BPromise(function(_0x3ab53f,_0xfeb75b){var _0xbd1168=urlParse(_0xf81284);var _0x4a4c56=_0xbd1168['protocol']==='https:'?https:http;var _0x4cfe67={'host':_0xbd1168[_0x0a9e('0xe')],'path':_0xbd1168[_0x0a9e('0x0')],'headers':{'user-agent':_0x0a9e('0xf')}};_0x4a4c56[_0x0a9e('0x10')](_0x4cfe67,function(_0x32d742){if(_0x32d742[_0x0a9e('0x11')]!==0xc8){logger['error'](_0x0a9e('0x12')+_0xf81284+_0x0a9e('0x13')+_0x32d742[_0x0a9e('0x11')]+'\x20('+_0x32d742[_0x0a9e('0x14')]+')');_0xfeb75b(new Error(_0x0a9e('0x12')+_0xf81284+_0x0a9e('0x13')+_0x32d742['statusCode']+'\x20('+_0x32d742[_0x0a9e('0x14')]+')'));return;}var _0x5d0880=fs[_0x0a9e('0x15')](_0x307b3e);_0x5d0880['on']('finish',function(){logger[_0x0a9e('0x16')](_0x0a9e('0x17'));_0x5d0880['close'](_0x3ab53f);});_0x5d0880['on'](_0x0a9e('0x18'),function(_0x5a0a06){fs[_0x0a9e('0x19')](_0x307b3e);logger[_0x0a9e('0x18')](_0x0a9e('0x1a'),_0x5a0a06);_0xfeb75b(_0x5a0a06);});_0x32d742[_0x0a9e('0x1b')](_0x5d0880);})['on'](_0x0a9e('0x18'),function(_0x2eb11f){logger[_0x0a9e('0x18')](_0x2eb11f);_0xfeb75b(_0x2eb11f);})[_0x0a9e('0x1c')]();});}function uploadFile(_0x1314ae){return new BPromise(function(_0x112016,_0x1c696a){var _0x105080=urlParse(_0x1314ae);var _0x4bb1e3=_0x105080[_0x0a9e('0x1d')]===_0x0a9e('0x1e')?https:http;var _0x53682f={'host':_0x105080[_0x0a9e('0xe')],'path':_0x105080['path'],'headers':{'user-agent':'WHAT_EVER'}};_0x4bb1e3[_0x0a9e('0x10')](_0x53682f,function(_0x432e56){if(_0x432e56[_0x0a9e('0x11')]!==0xc8){_0x1c696a(new Error(_0x0a9e('0x12')+_0x1314ae+'\x20failed,\x20status\x20code\x20=\x20'+_0x432e56[_0x0a9e('0x11')]+'\x20('+_0x432e56[_0x0a9e('0x14')]+')'));return;}var _0x3b45bc='';_0x432e56['on'](_0x0a9e('0x1f'),function(_0x370d86){_0x3b45bc+=_0x370d86;});_0x432e56['on'](_0x0a9e('0x1c'),function(){_0x112016(_0x3b45bc);});})['on'](_0x0a9e('0x18'),function(_0x5ea472){_0x1c696a(_0x5ea472);})['end']();});}function convertFile(_0x197ec0,_0x3a8e58){return new BPromise(function(_0x40c424,_0x33161b){var _0x526cf3=sox[_0x0a9e('0x20')](_0x197ec0,_0x3a8e58,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x526cf3['on'](_0x0a9e('0x18'),function(_0x5bfb33){logger[_0x0a9e('0x18')](_0x0a9e('0x21'),_0x5bfb33);_0x33161b(_0x5bfb33);});_0x526cf3['on'](_0x0a9e('0x1c'),function(){logger[_0x0a9e('0x16')](_0x0a9e('0x22'));_0x40c424();});_0x526cf3[_0x0a9e('0x23')]();});}function base64Decode(_0x11c3b6,_0x14de77){var _0x5a101a=path[_0x0a9e('0x24')](__dirname,_0x0a9e('0x25'),rs[_0x0a9e('0x26')](0x4)+_0x0a9e('0x27'));fs['writeFileSync'](_0x5a101a,_0x11c3b6,_0x0a9e('0x28'));return convertFile(_0x5a101a,_0x14de77)[_0x0a9e('0x29')](function(){try{fs[_0x0a9e('0x19')](_0x5a101a);fs[_0x0a9e('0x2a')](_0x14de77,_0x0a9e('0x2b'));}catch(_0x563b45){logger[_0x0a9e('0x18')](_0x563b45);}return _0x14de77[_0x0a9e('0x2c')]('.')[0x0];});}function base64Encode(_0x1dbde2){var _0x540530=fs[_0x0a9e('0x2d')](_0x1dbde2);return new Buffer(_0x540530)['toString'](_0x0a9e('0x28'));}exports[_0x0a9e('0x2e')]=function(_0x1122db,_0x33bdb7){var _0x25ce3a,_0x5180f1;return tts(_0x1122db,_0x33bdb7||'en',0x1)[_0x0a9e('0x29')](function(_0x46f0a5){logger[_0x0a9e('0x16')](_0x46f0a5);_0x25ce3a=path[_0x0a9e('0x24')](__dirname,_0x0a9e('0x25'),rs[_0x0a9e('0x26')](0x4)+_0x0a9e('0x2f'));return downloadFile(_0x46f0a5,_0x25ce3a);})[_0x0a9e('0x29')](function(){_0x5180f1=path['resolve'](__dirname,_0x0a9e('0x25'),rs['generate'](0x4)+_0x0a9e('0x27'));return convertFile(_0x25ce3a,_0x5180f1);})[_0x0a9e('0x29')](function(){try{fs[_0x0a9e('0x19')](_0x25ce3a);fs[_0x0a9e('0x2a')](_0x5180f1,'777');}catch(_0x191e91){logger[_0x0a9e('0x18')](_0x191e91);}logger[_0x0a9e('0x16')](_0x0a9e('0x30'),_0x5180f1['split']('.')[0x0]);return _0x5180f1['split']('.')[0x0];});};exports[_0x0a9e('0x31')]=function(_0x5640eb,_0x24936a,_0x3d9717){return google[_0x0a9e('0x32')](_0x5640eb,_0x24936a,_0x3d9717)[_0x0a9e('0x29')](function(_0x4f41ae){logger[_0x0a9e('0x16')](_0x4f41ae[_0x0a9e('0x33')]);return rp(_0x4f41ae);})[_0x0a9e('0x29')](function(_0x533942){var _0x1dbf74='';var _0x1a180b=0x0;try{fs[_0x0a9e('0x19')](_0x5640eb);}catch(_0x4c1c0e){logger['error'](_0x4c1c0e);}if(_0x533942&&_0x533942[_0x0a9e('0x34')]){_0x1dbf74=_0x533942[_0x0a9e('0x34')]['map'](function(_0x2b814e){return _0x2b814e&&_0x2b814e[_0x0a9e('0x35')][0x0]&&_0x2b814e[_0x0a9e('0x35')][0x0][_0x0a9e('0x36')]?_0x2b814e['alternatives'][0x0]['transcript']:'';})[_0x0a9e('0x37')]('\x0a');_0x1a180b=_0x533942[_0x0a9e('0x34')]['map'](function(_0x183991){return _0x183991&&_0x183991[_0x0a9e('0x35')][0x0]&&_0x183991[_0x0a9e('0x35')][0x0]['confidence']?_0x183991[_0x0a9e('0x35')][0x0][_0x0a9e('0x38')]:0x0;})[_0x0a9e('0x37')]('\x0a');}logger[_0x0a9e('0x16')](_0x0a9e('0x39'),_0x1dbf74);logger[_0x0a9e('0x16')](_0x0a9e('0x3a'),_0x1a180b);return{'transcript':_0x1dbf74,'confidence':_0x1a180b};})[_0x0a9e('0x3b')](function(_0x23b089){logger[_0x0a9e('0x18')](_0x0a9e('0x3c'),_0x23b089[_0x0a9e('0x11')],_0x23b089[_0x0a9e('0x3d')],_0x23b089[_0x0a9e('0x3e')]);});};exports[_0x0a9e('0x3f')]=function(_0x4d04c8,_0x52628e,_0x473fdc,_0xb3795a){var _0x405c8f=apiai(_0x52628e,{'language':_0xb3795a||'en'});return _0x405c8f[_0x0a9e('0x40')](_0x473fdc,{'sessionId':md5(_0x4d04c8)})[_0x0a9e('0x29')](function(_0xc9a702){logger[_0x0a9e('0x16')](JSON[_0x0a9e('0x41')](_0xc9a702));return{'source':_0xc9a702[_0x0a9e('0x42')][_0x0a9e('0x43')],'resolvedQuery':_0xc9a702[_0x0a9e('0x42')][_0x0a9e('0x44')],'action':_0xc9a702['result'][_0x0a9e('0x45')],'actionIncomplete':_0xc9a702[_0x0a9e('0x42')][_0x0a9e('0x46')],'speech':_0xc9a702[_0x0a9e('0x42')][_0x0a9e('0x47')][_0x0a9e('0x48')],'score':_0xc9a702[_0x0a9e('0x42')][_0x0a9e('0x49')],'statusCode':_0xc9a702['status'][_0x0a9e('0x4a')],'endConversation':_0xc9a702['result'][_0x0a9e('0x4b')][_0x0a9e('0x4c')]||![],'isFallbackIntent':_0xc9a702[_0x0a9e('0x42')]['metadata'][_0x0a9e('0x4d')]};});};exports[_0x0a9e('0x4e')]=function(_0x4774f4,_0x34aa5a,_0x45c845,_0x37be73){return tilde[_0x0a9e('0x32')](_0x4774f4,_0x34aa5a,_0x45c845,_0x37be73)['then'](function(_0x13f44d){try{fs[_0x0a9e('0x19')](_0x4774f4);}catch(_0x1b5e80){logger[_0x0a9e('0x18')](_0x1b5e80);}logger[_0x0a9e('0x16')](_0x0a9e('0x4f'),_0x13f44d[_0x0a9e('0x36')]);logger[_0x0a9e('0x16')](_0x0a9e('0x50'),_0x13f44d['confidence']);return _0x13f44d;});};exports[_0x0a9e('0x51')]=function(_0x3fe430,_0x4f7240,_0x4ae14b,_0x5ddf84,_0x1adfee,_0x4317e3){var _0x37edaa=path[_0x0a9e('0x24')](__dirname,_0x0a9e('0x25'),rs[_0x0a9e('0x26')](0x4)+_0x0a9e('0x2f'));var _0x375c18;return aws['polly'](_0x3fe430,_0x4f7240,_0x4ae14b,_0x5ddf84,_0x1adfee,_0x4317e3,_0x37edaa)['then'](function(){_0x375c18=path['resolve'](__dirname,_0x0a9e('0x25'),rs[_0x0a9e('0x26')](0x4)+_0x0a9e('0x27'));return convertFile(_0x37edaa,_0x375c18);})['then'](function(){try{fs[_0x0a9e('0x19')](_0x37edaa);fs[_0x0a9e('0x2a')](_0x375c18,'777');}catch(_0x5a88da){logger[_0x0a9e('0x18')](_0x5a88da);}return _0x375c18['split']('.')[0x0];});};exports[_0x0a9e('0x52')]=function(_0x4c3845,_0x2e5e62,_0x3c20b2,_0x439340,_0x53613a,_0x2f82da){return aws[_0x0a9e('0x53')](_0x4c3845,_0x2e5e62,_0x3c20b2,_0x439340,_0x53613a,_0x2f82da)['then'](function(_0x50f687){logger[_0x0a9e('0x16')](JSON[_0x0a9e('0x41')](_0x50f687));return _0x50f687;});};exports['ispeechTTS']=function(_0x145931,_0x5ce9ac,_0x211ef9,_0x523cd2){var _0xe22ccc=util['format']('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x145931,encodeURIComponent(_0x5ce9ac),_0x211ef9,_0x523cd2);var _0x5df0ad=path[_0x0a9e('0x24')](__dirname,'tmp',rs[_0x0a9e('0x26')](0x4)+_0x0a9e('0x2f'));var _0x3cfd00;return downloadFile(_0xe22ccc,_0x5df0ad)[_0x0a9e('0x29')](function(){_0x3cfd00=path[_0x0a9e('0x24')](__dirname,_0x0a9e('0x25'),rs[_0x0a9e('0x26')](0x4)+_0x0a9e('0x27'));return convertFile(_0x5df0ad,_0x3cfd00);})['then'](function(){try{fs[_0x0a9e('0x19')](_0x5df0ad);fs[_0x0a9e('0x2a')](_0x3cfd00,_0x0a9e('0x2b'));}catch(_0x30c491){logger[_0x0a9e('0x18')](_0x30c491);}return _0x3cfd00[_0x0a9e('0x2c')]('.')[0x0];});};exports['ispeechASR']=function(_0x956fbe,_0x26bc80,_0x5239ef,_0x3649cc){var _0x5cc8fb=util[_0x0a9e('0x54')]('%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s',ISPEECH_API,_0x26bc80,_0x5239ef,base64Encode(_0x956fbe),_0x3649cc?util['format']('model=%s',encodeURIComponent(_0x3649cc)):_0x0a9e('0x55'));return uploadFile(_0x5cc8fb)['then'](function(_0x2244d6){return querystring[_0x0a9e('0x56')](_0x2244d6);});};exports[_0x0a9e('0x57')]=function(_0x7be420,_0x1cca9f){return sestek[_0x0a9e('0x58')](_0x7be420,_0x1cca9f)['then'](function(_0x1627a7){logger['info'](JSON[_0x0a9e('0x41')](_0x1627a7));var _0x1f07cb={'speech':_0x1627a7[_0x0a9e('0x59')],'action':_0x1627a7['channelData']?_0x1627a7[_0x0a9e('0x5a')][_0x0a9e('0x5b')]:undefined,'actiondata':_0x1627a7[_0x0a9e('0x5a')]?_0x1627a7[_0x0a9e('0x5a')]['CustomActionData']:undefined};if(_0x1627a7[_0x0a9e('0x5a')]&&_0x1627a7[_0x0a9e('0x5a')]['AudioFromTts']){return base64Decode(_0x1627a7[_0x0a9e('0x5a')][_0x0a9e('0x5c')][_0x0a9e('0x5d')],path[_0x0a9e('0x24')](__dirname,_0x0a9e('0x25'),rs['generate'](0x4)+_0x0a9e('0x27')))[_0x0a9e('0x29')](function(_0x281c7d){_0x1f07cb['audiofile']=_0x281c7d;return _0x1f07cb;});}return _0x1f07cb;});};exports[_0x0a9e('0x5e')]=function(){return __dirname;};
\ No newline at end of file
diff --git a/server/services/agi/scripts/sestek/index.js b/server/services/agi/scripts/sestek/index.js
index 991ba7e..70c5430 100644
--- a/server/services/agi/scripts/sestek/index.js
+++ b/server/services/agi/scripts/sestek/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x259c=['./nda'];(function(_0x3b5e32,_0x1e6275){var _0x3f7670=function(_0x199ba9){while(--_0x199ba9){_0x3b5e32['push'](_0x3b5e32['shift']());}};_0x3f7670(++_0x1e6275);}(_0x259c,0x146));var _0xc259=function(_0x5bac02,_0x3d4be4){_0x5bac02=_0x5bac02-0x0;var _0x4dac6e=_0x259c[_0x5bac02];return _0x4dac6e;};var nda=require(_0xc259('0x0'));module['exports']={'nda':nda};
\ No newline at end of file
+var _0x2ac0=['exports'];(function(_0x384231,_0x50be41){var _0x2480bf=function(_0x1c4838){while(--_0x1c4838){_0x384231['push'](_0x384231['shift']());}};_0x2480bf(++_0x50be41);}(_0x2ac0,0x14b));var _0x02ac=function(_0xedabab,_0x1d8099){_0xedabab=_0xedabab-0x0;var _0x4e8004=_0x2ac0[_0xedabab];return _0x4e8004;};var nda=require('./nda');module[_0x02ac('0x0')]={'nda':nda};
\ No newline at end of file
diff --git a/server/services/agi/scripts/sestek/nda/index.js b/server/services/agi/scripts/sestek/nda/index.js
index b12789a..17c349d 100644
--- a/server/services/agi/scripts/sestek/nda/index.js
+++ b/server/services/agi/scripts/sestek/nda/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5fc3=['body','channelData','ProjectName','ndagenerate_audio','AudioOutputSettings','audio/wav','custom_action','CustomAction','custom_action_data','info','stringify','request-promise','url','agi','POST','resolve','ndauth_url','/token','password','username','then','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','uniqueid','callerid','extension','Bearer\x20','project'];(function(_0x29a2a8,_0x3034ca){var _0x3ba9dd=function(_0x4dc10a){while(--_0x4dc10a){_0x29a2a8['push'](_0x29a2a8['shift']());}};_0x3ba9dd(++_0x3034ca);}(_0x5fc3,0x173));var _0x35fc=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x5fc3[_0x4b369d];return _0x571a98;};'use strict';var rp=require(_0x35fc('0x0'));var url=require(_0x35fc('0x1'));var logger=require('../../../../../config/logger')(_0x35fc('0x2'));module['exports']=function(_0x4aa7cb,_0x8c6f7f){var _0x344bff={'method':_0x35fc('0x3'),'uri':url[_0x35fc('0x4')](_0x8c6f7f[_0x35fc('0x5')],_0x35fc('0x6')),'form':{'grant_type':_0x35fc('0x7'),'username':_0x8c6f7f[_0x35fc('0x8')],'password':_0x8c6f7f['password']},'json':!![]};return rp(_0x344bff)[_0x35fc('0x9')](function(_0x37e35d){var _0x4398ee={'method':_0x35fc('0x3'),'uri':url[_0x35fc('0x4')](_0x8c6f7f['ndassistant_url'],_0x35fc('0xa')),'body':{'type':_0x8c6f7f[_0x35fc('0xb')]||_0x35fc('0xc'),'channelId':_0x35fc('0xd'),'conversation':{'id':_0x4aa7cb[_0x35fc('0xe')]},'from':{'id':_0x4aa7cb[_0x35fc('0xf')],'name':_0x4aa7cb['calleridname']},'recipient':{'id':_0x4aa7cb['dnid'],'name':_0x4aa7cb[_0x35fc('0x10')]},'text':_0x8c6f7f['text'],'channelData':{}},'headers':{'Authorization':_0x35fc('0x11')+_0x37e35d['access_token']},'json':!![]};if(_0x8c6f7f[_0x35fc('0x12')]){_0x4398ee[_0x35fc('0x13')][_0x35fc('0x14')][_0x35fc('0x15')]=_0x8c6f7f['project'];}if(_0x8c6f7f[_0x35fc('0x16')]=='1'){_0x4398ee[_0x35fc('0x13')]['channelData'][_0x35fc('0x17')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x35fc('0x18')};}if(_0x8c6f7f[_0x35fc('0x19')]){_0x4398ee['body'][_0x35fc('0x14')][_0x35fc('0x1a')]=_0x8c6f7f[_0x35fc('0x19')];if(_0x8c6f7f[_0x35fc('0x1b')]){_0x4398ee[_0x35fc('0x13')][_0x35fc('0x14')]['CustomActionData']=_0x8c6f7f[_0x35fc('0x1b')];}}logger[_0x35fc('0x1c')](JSON[_0x35fc('0x1d')](_0x4398ee));return rp(_0x4398ee);});};
\ No newline at end of file
+var _0x50f0=['project','body','channelData','ProjectName','ndagenerate_audio','AudioOutputSettings','audio/wav','custom_action','CustomAction','CustomActionData','custom_action_data','stringify','request-promise','url','agi','exports','POST','ndauth_url','/token','password','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','callerid','calleridname','extension','text'];(function(_0x4dda69,_0x2a0fe4){var _0x9014a9=function(_0x3d2b40){while(--_0x3d2b40){_0x4dda69['push'](_0x4dda69['shift']());}};_0x9014a9(++_0x2a0fe4);}(_0x50f0,0x185));var _0x050f=function(_0x3f2fea,_0x3c4ea8){_0x3f2fea=_0x3f2fea-0x0;var _0x69a4d5=_0x50f0[_0x3f2fea];return _0x69a4d5;};'use strict';var rp=require(_0x050f('0x0'));var url=require(_0x050f('0x1'));var logger=require('../../../../../config/logger')(_0x050f('0x2'));module[_0x050f('0x3')]=function(_0x15de91,_0x37d9e2){var _0x253e39={'method':_0x050f('0x4'),'uri':url['resolve'](_0x37d9e2[_0x050f('0x5')],_0x050f('0x6')),'form':{'grant_type':_0x050f('0x7'),'username':_0x37d9e2['username'],'password':_0x37d9e2['password']},'json':!![]};return rp(_0x253e39)['then'](function(_0x4c536c){var _0x509fa6={'method':_0x050f('0x4'),'uri':url['resolve'](_0x37d9e2[_0x050f('0x8')],_0x050f('0x9')),'body':{'type':_0x37d9e2[_0x050f('0xa')]||_0x050f('0xb'),'channelId':_0x050f('0xc'),'conversation':{'id':_0x15de91['uniqueid']},'from':{'id':_0x15de91[_0x050f('0xd')],'name':_0x15de91[_0x050f('0xe')]},'recipient':{'id':_0x15de91['dnid'],'name':_0x15de91[_0x050f('0xf')]},'text':_0x37d9e2[_0x050f('0x10')],'channelData':{}},'headers':{'Authorization':'Bearer\x20'+_0x4c536c['access_token']},'json':!![]};if(_0x37d9e2[_0x050f('0x11')]){_0x509fa6[_0x050f('0x12')][_0x050f('0x13')][_0x050f('0x14')]=_0x37d9e2[_0x050f('0x11')];}if(_0x37d9e2[_0x050f('0x15')]=='1'){_0x509fa6[_0x050f('0x12')][_0x050f('0x13')][_0x050f('0x16')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x050f('0x17')};}if(_0x37d9e2[_0x050f('0x18')]){_0x509fa6[_0x050f('0x12')][_0x050f('0x13')][_0x050f('0x19')]=_0x37d9e2[_0x050f('0x18')];if(_0x37d9e2['custom_action_data']){_0x509fa6[_0x050f('0x12')][_0x050f('0x13')][_0x050f('0x1a')]=_0x37d9e2[_0x050f('0x1b')];}}logger['info'](JSON[_0x050f('0x1c')](_0x509fa6));return rp(_0x509fa6);});};
\ No newline at end of file
diff --git a/server/services/agi/scripts/tilde/asr/index.js b/server/services/agi/scripts/tilde/asr/index.js
index ef3d91f..14a2012 100644
--- a/server/services/agi/scripts/tilde/asr/index.js
+++ b/server/services/agi/scripts/tilde/asr/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaeb9=['exports'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xaeb9,0x13e));var _0x9aeb=function(_0x54f554,_0x3ed7f1){_0x54f554=_0x54f554-0x0;var _0x3a24ce=_0xaeb9[_0x54f554];return _0x3a24ce;};'use strict';var asr=require('./lib/api');module[_0x9aeb('0x0')]=function(_0x4895be,_0xa23e46,_0x4a790d,_0x1f652b){return asr(_0x4895be,_0xa23e46,_0x4a790d,_0x1f652b);};
\ No newline at end of file
+var _0x5944=['./lib/api','exports'];(function(_0x590707,_0x1be657){var _0x169f36=function(_0x478677){while(--_0x478677){_0x590707['push'](_0x590707['shift']());}};_0x169f36(++_0x1be657);}(_0x5944,0x8c));var _0x4594=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x5944[_0x4243a3];return _0x1b2a33;};'use strict';var asr=require(_0x4594('0x0'));module[_0x4594('0x1')]=function(_0x7ecb38,_0xe2cab0,_0x56f471,_0x29e55d){return asr(_0x7ecb38,_0xe2cab0,_0x56f471,_0x29e55d);};
\ No newline at end of file
diff --git a/server/services/agi/scripts/tilde/asr/lib/api.js b/server/services/agi/scripts/tilde/asr/lib/api.js
index 8186498..508c1f9 100644
--- a/server/services/agi/scripts/tilde/asr/lib/api.js
+++ b/server/services/agi/scripts/tilde/asr/lib/api.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf9d8=['Open\x20Tilde\x20ASR\x20socket','stringify','createReadStream','data','send','close','EOS','Tilde\x20ASR\x20send\x20error','terminate','parse','status','result','final','Tilde\x20ASR\x20hypoteses','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','error','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isObject','open','message','lodash','moment','../../../../../../config/logger','agi','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','createHash','sha1','update','digest','hex'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0xf9d8,0x175));var _0x8f9d=function(_0x176034,_0x507a2d){_0x176034=_0x176034-0x0;var _0x272a49=_0xf9d8[_0x176034];return _0x272a49;};'use strict';var BPromise=require('bluebird');var _=require(_0x8f9d('0x0'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0x8f9d('0x1'));var crypto=require('crypto');var logger=require(_0x8f9d('0x2'))(_0x8f9d('0x3'));module[_0x8f9d('0x4')]=function(_0x342b61,_0x476033,_0x334cee,_0x2b78b1){return new BPromise(function(_0x1b7428,_0x745155){logger[_0x8f9d('0x5')](_0x8f9d('0x6'),_0x2b78b1||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE');var _0x4aa6bb=new WebSocket(_0x2b78b1||_0x8f9d('0x7'),{'perMessageDeflate':![]});var _0x37b71f='';var _0x40d932='0';var _0xd3b3e6='1';var _0x729f3a=_0x8f9d('0x8');function _0x4c9bd4(_0xd845c7){var _0x1dfbfe=crypto[_0x8f9d('0x9')](_0x8f9d('0xa'));_0x1dfbfe[_0x8f9d('0xb')](_0xd845c7);return _0x1dfbfe[_0x8f9d('0xc')](_0x8f9d('0xd'));}function _0x4964d1(){try{logger[_0x8f9d('0x5')](_0x8f9d('0xe'));var _0x3e52e0=moment()['unix']();var _0x338fdf=_0x4c9bd4(_0x3e52e0+_0x476033+_0x334cee);_0x4aa6bb['send'](JSON[_0x8f9d('0xf')]({'appID':_0x476033,'timestamp':_0x3e52e0,'appKey':_0x338fdf}));var _0x3b1a8c=fs[_0x8f9d('0x10')](_0x342b61);_0x3b1a8c['on'](_0x8f9d('0x11'),function(_0x361b72){_0x4aa6bb[_0x8f9d('0x12')](_0x361b72);});_0x3b1a8c['on'](_0x8f9d('0x13'),function(){_0x4aa6bb[_0x8f9d('0x12')](_0x8f9d('0x14'));});}catch(_0x4262fe){logger['error'](_0x8f9d('0x15'),JSON['stringify'](_0x4262fe));_0x4aa6bb[_0x8f9d('0x16')]();}}function _0x29b018(_0x336fd4){try{if(_0x336fd4){var _0xf85f81=JSON[_0x8f9d('0x17')](_0x336fd4);switch(_0xf85f81[_0x8f9d('0x18')]){case 0x0:if(_0xf85f81[_0x8f9d('0x19')]){if(_0xf85f81[_0x8f9d('0x19')][_0x8f9d('0x1a')]){logger[_0x8f9d('0x5')](_0x8f9d('0x1b'),JSON[_0x8f9d('0xf')](_0xf85f81[_0x8f9d('0x19')][_0x8f9d('0x1c')]));_0x37b71f=_0xf85f81[_0x8f9d('0x19')][_0x8f9d('0x1c')][0x0][_0x8f9d('0x1d')];_0x40d932=_0xf85f81[_0x8f9d('0x19')][_0x8f9d('0x1c')][0x0][_0x8f9d('0x1e')];_0xd3b3e6='0';_0x729f3a=_0x8f9d('0x1f');_0x4aa6bb[_0x8f9d('0x16')]();}}break;case 0x1:logger['info'](_0x8f9d('0x8'));_0xd3b3e6='1';_0x729f3a=_0x8f9d('0x8');break;case 0x2:logger[_0x8f9d('0x5')](_0x8f9d('0x20'));_0xd3b3e6='2';_0x729f3a='Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.';break;case 0x9:logger[_0x8f9d('0x5')](_0x8f9d('0x21'));_0xd3b3e6='9';_0x729f3a=_0x8f9d('0x21');break;case 0xa:logger[_0x8f9d('0x5')](_0x8f9d('0x22'));_0xd3b3e6='10';_0x729f3a=_0x8f9d('0x22');break;case 0xb:logger['info'](_0x8f9d('0x23'));_0xd3b3e6='11';_0x729f3a=_0x8f9d('0x23');}}}catch(_0x1cc5b8){logger[_0x8f9d('0x24')](_0x8f9d('0x25'),JSON[_0x8f9d('0xf')](_0x1cc5b8));_0x4aa6bb[_0x8f9d('0x16')]();}}function _0x39b6a4(){logger[_0x8f9d('0x5')](_0x8f9d('0x26'));_0x1b7428({'transcript':_0x37b71f,'confidence':_0x40d932,'status':_0xd3b3e6,'status_message':_0x729f3a});}function _0x417bc1(_0x25d9b0){logger[_0x8f9d('0x24')](_0x8f9d('0x27'));if(!_['isNil'](_0x25d9b0)){logger[_0x8f9d('0x24')](_[_0x8f9d('0x28')](_0x25d9b0)?JSON[_0x8f9d('0xf')](_0x25d9b0):_0x25d9b0);}}_0x4aa6bb['on'](_0x8f9d('0x29'),_0x4964d1);_0x4aa6bb['on'](_0x8f9d('0x2a'),_0x29b018);_0x4aa6bb['on'](_0x8f9d('0x13'),_0x39b6a4);_0x4aa6bb['on'](_0x8f9d('0x24'),_0x417bc1);});};
\ No newline at end of file
+var _0x4f2a=['isNil','isObject','open','message','close','bluebird','lodash','crypto','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','update','digest','hex','unix','send','createReadStream','data','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','parse','result','Tilde\x20ASR\x20hypoteses','stringify','hypotheses','transcript','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket'];(function(_0x2962b4,_0x4b0786){var _0x411b7d=function(_0x363aad){while(--_0x363aad){_0x2962b4['push'](_0x2962b4['shift']());}};_0x411b7d(++_0x4b0786);}(_0x4f2a,0x1c1));var _0xa4f2=function(_0x387dc1,_0x3ba649){_0x387dc1=_0x387dc1-0x0;var _0x17567c=_0x4f2a[_0x387dc1];return _0x17567c;};'use strict';var BPromise=require(_0xa4f2('0x0'));var _=require(_0xa4f2('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require('moment');var crypto=require(_0xa4f2('0x2'));var logger=require('../../../../../../config/logger')('agi');module[_0xa4f2('0x3')]=function(_0x2b82a4,_0x2719ca,_0x4a56fe,_0x1aa185){return new BPromise(function(_0x36d164,_0x22b861){logger[_0xa4f2('0x4')](_0xa4f2('0x5'),_0x1aa185||_0xa4f2('0x6'));var _0x78b9ce=new WebSocket(_0x1aa185||_0xa4f2('0x6'),{'perMessageDeflate':![]});var _0x580040='';var _0x45b36d='0';var _0x52c827='1';var _0x227fb4=_0xa4f2('0x7');function _0x168dce(_0x17a251){var _0x59b519=crypto['createHash']('sha1');_0x59b519[_0xa4f2('0x8')](_0x17a251);return _0x59b519[_0xa4f2('0x9')](_0xa4f2('0xa'));}function _0x105cd9(){try{logger[_0xa4f2('0x4')]('Open\x20Tilde\x20ASR\x20socket');var _0x37b009=moment()[_0xa4f2('0xb')]();var _0x168657=_0x168dce(_0x37b009+_0x2719ca+_0x4a56fe);_0x78b9ce[_0xa4f2('0xc')](JSON['stringify']({'appID':_0x2719ca,'timestamp':_0x37b009,'appKey':_0x168657}));var _0x5869f9=fs[_0xa4f2('0xd')](_0x2b82a4);_0x5869f9['on'](_0xa4f2('0xe'),function(_0x2fc331){_0x78b9ce['send'](_0x2fc331);});_0x5869f9['on']('close',function(){_0x78b9ce[_0xa4f2('0xc')](_0xa4f2('0xf'));});}catch(_0x5610a2){logger[_0xa4f2('0x10')](_0xa4f2('0x11'),JSON['stringify'](_0x5610a2));_0x78b9ce[_0xa4f2('0x12')]();}}function _0x2323a6(_0x399b48){try{if(_0x399b48){var _0x504227=JSON[_0xa4f2('0x13')](_0x399b48);switch(_0x504227['status']){case 0x0:if(_0x504227['result']){if(_0x504227[_0xa4f2('0x14')]['final']){logger[_0xa4f2('0x4')](_0xa4f2('0x15'),JSON[_0xa4f2('0x16')](_0x504227['result']['hypotheses']));_0x580040=_0x504227['result'][_0xa4f2('0x17')][0x0][_0xa4f2('0x18')];_0x45b36d=_0x504227[_0xa4f2('0x14')][_0xa4f2('0x17')][0x0]['likelihood'];_0x52c827='0';_0x227fb4=_0xa4f2('0x19');_0x78b9ce['terminate']();}}break;case 0x1:logger['info'](_0xa4f2('0x7'));_0x52c827='1';_0x227fb4=_0xa4f2('0x7');break;case 0x2:logger[_0xa4f2('0x4')](_0xa4f2('0x1a'));_0x52c827='2';_0x227fb4=_0xa4f2('0x1a');break;case 0x9:logger[_0xa4f2('0x4')](_0xa4f2('0x1b'));_0x52c827='9';_0x227fb4=_0xa4f2('0x1b');break;case 0xa:logger[_0xa4f2('0x4')](_0xa4f2('0x1c'));_0x52c827='10';_0x227fb4=_0xa4f2('0x1c');break;case 0xb:logger[_0xa4f2('0x4')](_0xa4f2('0x1d'));_0x52c827='11';_0x227fb4=_0xa4f2('0x1d');}}}catch(_0x121267){logger[_0xa4f2('0x10')](_0xa4f2('0x1e'),JSON[_0xa4f2('0x16')](_0x121267));_0x78b9ce['terminate']();}}function _0x49c2fc(){logger[_0xa4f2('0x4')](_0xa4f2('0x1f'));_0x36d164({'transcript':_0x580040,'confidence':_0x45b36d,'status':_0x52c827,'status_message':_0x227fb4});}function _0xa60648(_0x322306){logger['error']('Error\x20Tilde\x20ASR\x20socket');if(!_[_0xa4f2('0x20')](_0x322306)){logger[_0xa4f2('0x10')](_[_0xa4f2('0x21')](_0x322306)?JSON[_0xa4f2('0x16')](_0x322306):_0x322306);}}_0x78b9ce['on'](_0xa4f2('0x22'),_0x105cd9);_0x78b9ce['on'](_0xa4f2('0x23'),_0x2323a6);_0x78b9ce['on'](_0xa4f2('0x24'),_0x49c2fc);_0x78b9ce['on'](_0xa4f2('0x10'),_0xa60648);});};
\ No newline at end of file
diff --git a/server/services/agi/scripts/tilde/index.js b/server/services/agi/scripts/tilde/index.js
index 10cb4be..e62ff4d 100644
--- a/server/services/agi/scripts/tilde/index.js
+++ b/server/services/agi/scripts/tilde/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var asr=require('./asr');module['exports']={'asr':asr};
\ No newline at end of file
+var _0xedd9=['exports'];(function(_0x9d3167,_0x1fff8f){var _0x2da615=function(_0x46de0a){while(--_0x46de0a){_0x9d3167['push'](_0x9d3167['shift']());}};_0x2da615(++_0x1fff8f);}(_0xedd9,0xfc));var _0x9edd=function(_0x26ce22,_0x32506d){_0x26ce22=_0x26ce22-0x0;var _0x152b34=_0xedd9[_0x26ce22];return _0x152b34;};var asr=require('./asr');module[_0x9edd('0x0')]={'asr':asr};
\ No newline at end of file
diff --git a/server/services/agi/server.js b/server/services/agi/server.js
index ecbb744..f79a565 100644
--- a/server/services/agi/server.js
+++ b/server/services/agi/server.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe61a=['inherits','exports','util','net','EventEmitter','./channel','127.0.0.1','call','emit','E_AGI_ARGUMENT_PORT','createServer','listen','listening','connection','error','E_AGI_SERVER_VOICE_DISABLED','E_AGI_SERVER_MAXCONNECTION','destroy','E_AGI_SERVER_ERROR','close','E_AGI_SERVER_CLOSE','nextTick'];(function(_0x2f0ed7,_0x2207f5){var _0x5bbea4=function(_0x224b71){while(--_0x224b71){_0x2f0ed7['push'](_0x2f0ed7['shift']());}};_0x5bbea4(++_0x2207f5);}(_0xe61a,0x120));var _0xae61=function(_0xadeeda,_0x3c4990){_0xadeeda=_0xadeeda-0x0;var _0x2853cd=_0xe61a[_0xadeeda];return _0x2853cd;};'use strict';var util=require(_0xae61('0x0'));var net=require(_0xae61('0x1'));var EventEmitter=require('events')[_0xae61('0x2')];var AGIError=require('./error');var AGIChannel=require(_0xae61('0x3'));var AGIServer=function(_0xf0219,_0xe0df28,_0x5db26b){var _0x28ffeb=this,_0xf0219=_0xf0219||0x11dd,_0xe0df28=_0xe0df28||_0xae61('0x4'),_0x4e92f8=null,_0xb9dcc8=0x0;EventEmitter[_0xae61('0x5')](_0x28ffeb);function _0x251fc3(){if(!_0xf0219){_0x28ffeb[_0xae61('0x6')]('error',new AGIError(_0xae61('0x7')));return![];}_0x4e92f8=net[_0xae61('0x8')]();_0x4e92f8[_0xae61('0x9')](_0xf0219,_0xe0df28);_0x4e92f8['on']('listening',function(){_0x28ffeb[_0xae61('0x6')](_0xae61('0xa'));});_0x4e92f8['on'](_0xae61('0xb'),function(_0x579c99){_0x4e92f8['getConnections'](function(_0x4047d0,_0x31d545){if(_0x4047d0){_0x28ffeb[_0xae61('0x6')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x4047d0));}else if(_0x5db26b&&_0x5db26b<0x0){_0x28ffeb['emit'](_0xae61('0xc'),new AGIError(_0xae61('0xd')));_0x579c99['destroy']();}else if(_0x5db26b&&_0x5db26b>0x0&&_0x5db26b<_0x31d545){_0xb9dcc8+=0x1;_0x28ffeb[_0xae61('0x6')](_0xae61('0xc'),new AGIError(_0xae61('0xe'),_0xb9dcc8));_0x579c99[_0xae61('0xf')]();}else{var _0x4456c2=new AGIChannel(_0x579c99);_0x4456c2['on']('ready',function(){_0x28ffeb[_0xae61('0x6')](_0xae61('0xb'),_0x4456c2);});}});});_0x4e92f8['on']('error',function(_0x9f09bf){_0x28ffeb[_0xae61('0x6')](_0xae61('0xc'),new AGIError(_0xae61('0x10'),_0x9f09bf['code']));});_0x4e92f8['on'](_0xae61('0x11'),function(){_0x28ffeb[_0xae61('0x6')](_0xae61('0x11'),new AGIError(_0xae61('0x12')));});}process[_0xae61('0x13')](function(){_0x251fc3();});};util[_0xae61('0x14')](AGIServer,EventEmitter);module[_0xae61('0x15')]=function(_0x2e5991,_0x315f03,_0x17dc96){return new AGIServer(_0x2e5991,_0x315f03,_0x17dc96);};
\ No newline at end of file
+var _0xb78d=['E_AGI_ARGUMENT_PORT','createServer','listening','connection','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','destroy','ready','code','close','nextTick','inherits','exports','util','EventEmitter','./error','./channel','127.0.0.1','emit','error'];(function(_0x119d5a,_0x19b457){var _0x15bff4=function(_0x1b7c78){while(--_0x1b7c78){_0x119d5a['push'](_0x119d5a['shift']());}};_0x15bff4(++_0x19b457);}(_0xb78d,0x14d));var _0xdb78=function(_0x4d5f4f,_0x354d39){_0x4d5f4f=_0x4d5f4f-0x0;var _0x40fc76=_0xb78d[_0x4d5f4f];return _0x40fc76;};'use strict';var util=require(_0xdb78('0x0'));var net=require('net');var EventEmitter=require('events')[_0xdb78('0x1')];var AGIError=require(_0xdb78('0x2'));var AGIChannel=require(_0xdb78('0x3'));var AGIServer=function(_0x5ad0f1,_0x844fee,_0x58518d){var _0x1bab18=this,_0x5ad0f1=_0x5ad0f1||0x11dd,_0x844fee=_0x844fee||_0xdb78('0x4'),_0x3d9909=null,_0x143239=0x0;EventEmitter['call'](_0x1bab18);function _0xd1bdbc(){if(!_0x5ad0f1){_0x1bab18[_0xdb78('0x5')](_0xdb78('0x6'),new AGIError(_0xdb78('0x7')));return![];}_0x3d9909=net[_0xdb78('0x8')]();_0x3d9909['listen'](_0x5ad0f1,_0x844fee);_0x3d9909['on'](_0xdb78('0x9'),function(){_0x1bab18[_0xdb78('0x5')](_0xdb78('0x9'));});_0x3d9909['on'](_0xdb78('0xa'),function(_0x386ef5){_0x3d9909['getConnections'](function(_0x222dbb,_0x31da51){if(_0x222dbb){_0x1bab18[_0xdb78('0x5')](_0xdb78('0x6'),new AGIError(_0xdb78('0xb'),_0x222dbb));}else if(_0x58518d&&_0x58518d<0x0){_0x1bab18[_0xdb78('0x5')](_0xdb78('0x6'),new AGIError(_0xdb78('0xc')));_0x386ef5[_0xdb78('0xd')]();}else if(_0x58518d&&_0x58518d>0x0&&_0x58518d<_0x31da51){_0x143239+=0x1;_0x1bab18[_0xdb78('0x5')](_0xdb78('0x6'),new AGIError('E_AGI_SERVER_MAXCONNECTION',_0x143239));_0x386ef5[_0xdb78('0xd')]();}else{var _0x31a9d2=new AGIChannel(_0x386ef5);_0x31a9d2['on'](_0xdb78('0xe'),function(){_0x1bab18[_0xdb78('0x5')](_0xdb78('0xa'),_0x31a9d2);});}});});_0x3d9909['on'](_0xdb78('0x6'),function(_0x257e66){_0x1bab18['emit'](_0xdb78('0x6'),new AGIError('E_AGI_SERVER_ERROR',_0x257e66[_0xdb78('0xf')]));});_0x3d9909['on']('close',function(){_0x1bab18[_0xdb78('0x5')](_0xdb78('0x10'),new AGIError('E_AGI_SERVER_CLOSE'));});}process[_0xdb78('0x11')](function(){_0xd1bdbc();});};util[_0xdb78('0x12')](AGIServer,EventEmitter);module[_0xdb78('0x13')]=function(_0x576228,_0x9d247a,_0x364a9c){return new AGIServer(_0x576228,_0x9d247a,_0x364a9c);};
\ No newline at end of file
diff --git a/server/services/agi/vertices.js b/server/services/agi/vertices.js
index 09eec9a..e34aa53 100644
--- a/server/services/agi/vertices.js
+++ b/server/services/agi/vertices.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd291=['audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','unlink','SestekNDA\x20Result\x20%s','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','SIP/%s/%s','opts','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','no\x20file\x20audio\x20selected','getSound','file_id','no\x20file\x20audio\x20found','getData','maxdigit','test','extra','mindigit','no\x20variable\x20found','hiddendigitsnum','generate','hiddendigitspos','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','.wav','aws\x20Polly\x20is\x20unreachable','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','message','Amazon\x20Lex\x20ready\x20for\x20fulfillment','Amazon\x20Lex\x20Result\x20%s','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','%s/recordings/%s','%s.%s','beep','NOBEEP','intKey','google\x20%s\x20file\x20created','stringify','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appsecret\x20configured','recordFile','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','context','gotoif','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','IFTIME\x20%s\x20%s','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','login','FIND\x20AGENT\x20%s\x20BY\x20%s','findBy','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','logout','no\x20find\x20by\x20configured','math','operation','no\x20operation\x20configured','isArray','%s[%s]','variable\x20%s[key]\x20set','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','Enter\x20in\x20PAUSE\x20(%s)\x20block','getPause','pause_id','failure','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','getVoiceQueue','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','macro','position','Executed\x20command\x20%s\x20%s','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s/recordings/%s.%s','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sendMail','account_id','getMailAccount','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','user','bcc','subject','Smtp','service','host','secure','authentication','auth','pass','template_id','debug','sendMail\x20message','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','sms_text','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','no\x20variable\x20selected','Enter\x20in\x20START\x20(%s)\x20block','yes','Answer','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','Trying\x20Google\x20TTS\x20%s','googleTTS','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','path','shelljs','randomstring','moment','../../config/logger','agi','../../config/environment','./scripts','/var/opt/motion2/server/files','menu','getdigits','getsecretdigits','rpc','then','prototype','getVoiceQueueById','name','catch','getSquareProject','getSquareProjectById','getSquareOdbc','getSquareOdbcById','dsn','getUserById','getTrunk','getTrunkById','getSoundById','save_name','getMailAccountById','sendMailMessage','mailRpc','getIntervals','getIntervalById','IntervalId','interval','map','format','%s/sounds/converted/%s','getQueryOdbc','open','error','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','label','agicommand','channel','arg_1','callerid','createSquareRecording','uniqueid','calleridname','extension','priority','accountcode','file','createSquareMessage','createCmContact','isEmpty','isNil','lastName','phone','list_id','scheduledAt','callback','Callback\x20scheduled\x20at\x20','toString','callback_priority','agentPause','agent','agentUnpause','agentLogout','agentLogin','%s/%s@from-sip/n','LOCAL','shellCommand','trim','replace','google_tts_language','googleDialogflow','text','dialogflow_language','sestekNDA','ispeechTTS','key','ispeech_tts_language','en-US','speed','ispeechASR','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','aws_lex_region','aws_bot_name','googleASR','google_asr_language','tildeASR','appsecret','uri','includes','hasOwnProperty','isString','replaceAllVariables','split','length','replaceAll','getVariable','getAndSetVariable','setVariable','maxRetry','createSquareDetailsReport','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','timeout','Wait\x20%s\x20seconds\x20before\x20answer','wait','result','no\x20list\x20selected','delay','add','minutes','sync','noop','custom_app','exec','application','options','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','sestektts','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','grammar','MRCPRecog','RECOG_CONFIDENCE()','LUMENVOX_ASR_CONFIDENCE','RECOG_INPUT()','LUMENVOX_ASR_TRANSCRIPT','RECOG_INSTANCE()','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_TRANSCRIPT','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','no\x20odbc\x20database\x20found','no\x20query\x20configured','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','forEach','keys','%s[%s][%s]','dial','Enter\x20in\x20DIAL\x20(%s)\x20block','no\x20user\x20selected','sip_id','no\x20user\x20found','SIP/%s','url','Executed\x20command\x20%s','DIAL','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','speech','Dialogflow\x20is\x20unreachable','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','password','ndassistant_url','bot','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','out'];(function(_0x484cac,_0x30ad3a){var _0x1d6e77=function(_0x4f5f16){while(--_0x4f5f16){_0x484cac['push'](_0x484cac['shift']());}};_0x1d6e77(++_0x30ad3a);}(_0xd291,0xbf));var _0x1d29=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xd291[_0x14add3];return _0x4a174f;};'use strict';var fs=require('fs');var path=require(_0x1d29('0x0'));var util=require('util');var _=require('lodash');var sh=require(_0x1d29('0x1'));var odbc=require('odbc')();var rs=require(_0x1d29('0x2'));var moment=require(_0x1d29('0x3'));var Mustache=require('mustache');var logger=require(_0x1d29('0x4'))(_0x1d29('0x5'));var config=require(_0x1d29('0x6'));var scripts=require(_0x1d29('0x7'));var FILES_PATH=_0x1d29('0x8');var verticesWithRetry=[_0x1d29('0x9'),_0x1d29('0xa'),_0x1d29('0xb')];var AGIVertices=function(_0x1d04a7,_0x8b3e7a,_0x326e27){this['channel']=_0x1d04a7;this[_0x1d29('0xc')]=_0x8b3e7a;this['mailRpc']=_0x326e27;};AGIVertices['prototype']['getVariable']=function(_0x21808e,_0x3332c5){this[_0x1d29('0xc')]['getVariableById'](_0x21808e)[_0x1d29('0xd')](function(_0x594dc5){_0x3332c5(null,_0x594dc5?_0x594dc5['name']:![]);})['catch'](function(_0x46ad5f){_0x3332c5(_0x46ad5f);});};AGIVertices[_0x1d29('0xe')]['getVoiceQueue']=function(_0x49abad,_0x47f659){this[_0x1d29('0xc')][_0x1d29('0xf')](_0x49abad)[_0x1d29('0xd')](function(_0x27d031){_0x47f659(null,_0x27d031?_0x27d031[_0x1d29('0x10')]:![]);})[_0x1d29('0x11')](function(_0xa9edd){_0x47f659(_0xa9edd);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x12')]=function(_0x4fc8c5,_0x32e320){this[_0x1d29('0xc')][_0x1d29('0x13')](_0x4fc8c5)['then'](function(_0x1e57f4){_0x32e320(null,_0x1e57f4?_0x1e57f4['name']:![]);})[_0x1d29('0x11')](function(_0x4bf291){_0x32e320(_0x4bf291);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x14')]=function(_0x89ce44,_0x7f0e48){this[_0x1d29('0xc')][_0x1d29('0x15')](_0x89ce44)[_0x1d29('0xd')](function(_0xc73950){_0x7f0e48(null,_0xc73950?_0xc73950[_0x1d29('0x16')]:![]);})[_0x1d29('0x11')](function(_0xc29e20){_0x7f0e48(_0xc29e20);});};AGIVertices[_0x1d29('0xe')]['getUser']=function(_0x2b0187,_0x24d90b){this[_0x1d29('0xc')][_0x1d29('0x17')](_0x2b0187)[_0x1d29('0xd')](function(_0x468537){_0x24d90b(null,_0x468537?_0x468537[_0x1d29('0x10')]:![]);})['catch'](function(_0x5a444b){_0x24d90b(_0x5a444b);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x18')]=function(_0x1a4403,_0x51b3e8){this[_0x1d29('0xc')][_0x1d29('0x19')](_0x1a4403)[_0x1d29('0xd')](function(_0x4000aa){_0x51b3e8(null,_0x4000aa?_0x4000aa[_0x1d29('0x10')]:![]);})[_0x1d29('0x11')](function(_0xb54052){_0x51b3e8(_0xb54052);});};AGIVertices[_0x1d29('0xe')]['getSound']=function(_0x2f7acf,_0x57863b){var _0x2b0982=this;this[_0x1d29('0xc')][_0x1d29('0x1a')](_0x2f7acf)[_0x1d29('0xd')](function(_0x1c39f4){_0x57863b(null,_0x1c39f4?_0x2b0982['getSoundPath'](_0x1c39f4[_0x1d29('0x1b')]):![]);})[_0x1d29('0x11')](function(_0x498e9f){_0x57863b(_0x498e9f);});};AGIVertices[_0x1d29('0xe')]['getMailAccount']=function(_0x4bcf0d,_0x1582e9){this[_0x1d29('0xc')][_0x1d29('0x1c')](_0x4bcf0d)[_0x1d29('0xd')](function(_0x57eae1){_0x1582e9(null,_0x57eae1?_0x57eae1:![]);})[_0x1d29('0x11')](function(_0x2960fd){_0x1582e9(_0x2960fd);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x1d')]=function(_0xe638e6,_0x22a63a,_0x5b1e53){this[_0x1d29('0x1e')][_0x1d29('0x1d')](_0xe638e6,_0x22a63a)[_0x1d29('0xd')](function(){_0x5b1e53(null);})[_0x1d29('0x11')](function(_0x547746){_0x5b1e53(_0x547746);});};AGIVertices['prototype'][_0x1d29('0x1f')]=function(_0x4d4ca0,_0x15d4a5){this[_0x1d29('0xc')][_0x1d29('0x20')](_0x4d4ca0)[_0x1d29('0xd')](function(_0x4d7ab0){if(_0x4d7ab0){if(_0x4d7ab0[_0x1d29('0x21')]){_0x15d4a5(null,[_0x4d7ab0[_0x1d29('0x22')]]);}else{_0x15d4a5(null,_[_0x1d29('0x23')](_0x4d7ab0['Intervals'],_0x1d29('0x22')));}}else{_0x15d4a5(null,![]);}})['catch'](function(_0x11b53f){_0x15d4a5(_0x11b53f);});};AGIVertices[_0x1d29('0xe')]['getSoundPath']=function(_0x12f910){return util[_0x1d29('0x24')](_0x1d29('0x25'),FILES_PATH,_0x12f910);};AGIVertices[_0x1d29('0xe')][_0x1d29('0x26')]=function(_0x3d0b5b,_0x15e155,_0xe1a747){odbc[_0x1d29('0x27')](_0x3d0b5b,function(_0x2c7b8a){if(_0x2c7b8a){logger[_0x1d29('0x28')]('Error\x20getting\x20ODBC\x20connection\x20%s',_0x2c7b8a);_0xe1a747(_0x2c7b8a);}else{logger[_0x1d29('0x29')](_0x1d29('0x2a'));odbc[_0x1d29('0x2b')](_0x15e155,function(_0x238cb1,_0x1dcc02){if(_0x238cb1){logger[_0x1d29('0x29')](_0x1d29('0x2c'),_0x15e155);_0xe1a747(_0x238cb1);}else{logger[_0x1d29('0x29')](_0x1d29('0x2d'),_0x15e155);odbc[_0x1d29('0x2e')](function(_0x42d39d){if(_0x42d39d){logger[_0x1d29('0x28')](_0x1d29('0x2f'),_0x42d39d);}_0xe1a747(null,_0x1dcc02);});}});}});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x30')]=function(_0x2c796f,_0x3c170a){this[_0x1d29('0xc')][_0x1d29('0x31')](_0x2c796f)[_0x1d29('0xd')](function(_0x4ad66b){_0x3c170a(null,_0x4ad66b?_0x4ad66b:![]);})[_0x1d29('0x11')](function(_0x45ac56){_0x3c170a(_0x45ac56);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x32')]=function(_0x2dc2b2,_0x58919b){this[_0x1d29('0xc')][_0x1d29('0x32')](_0x2dc2b2)[_0x1d29('0xd')](function(_0x4ee690){_0x58919b(null,_0x4ee690);})[_0x1d29('0x11')](function(_0x5206b4){_0x58919b(_0x5206b4);});};AGIVertices[_0x1d29('0xe')]['createSquareDetailsReport']=function(_0x32d223,_0x403347,_0x4e7545){this[_0x1d29('0xc')]['createSquareDetailsReport']({'uniqueid':this['channel']['uniqueid'],'node':_0x32d223[_0x1d29('0x33')],'application':_0x32d223[_0x1d29('0x34')],'data':_0x403347||null,'project_name':this[_0x1d29('0x35')][_0x1d29('0x36')],'callerid':this[_0x1d29('0x35')][_0x1d29('0x37')]})[_0x1d29('0xd')](function(_0x234caa){if(_0x4e7545){_0x4e7545(null,_0x234caa);}})['catch'](function(_0xc73ab6){if(_0x4e7545){_0x4e7545(_0xc73ab6);}});};AGIVertices['prototype'][_0x1d29('0x38')]=function(_0x1cb51d,_0x22a981,_0x1fdecf,_0xa737cd){this[_0x1d29('0xc')][_0x1d29('0x38')]({'uniqueid':this[_0x1d29('0x35')][_0x1d29('0x39')],'callerid':this[_0x1d29('0x35')][_0x1d29('0x37')],'calleridname':this['channel'][_0x1d29('0x3a')],'context':this[_0x1d29('0x35')]['context'],'extension':this[_0x1d29('0x35')][_0x1d29('0x3b')],'priority':this['channel'][_0x1d29('0x3c')],'accountcode':this[_0x1d29('0x35')][_0x1d29('0x3d')],'dnid':this[_0x1d29('0x35')]['dnid'],'projectName':this[_0x1d29('0x35')][_0x1d29('0x36')],'saveName':_0x22a981,'filename':_0x1cb51d[_0x1d29('0x3e')]||_0x22a981,'savePath':_0x1fdecf})['then'](function(_0x1d1062){_0xa737cd(null,_0x1d1062);})[_0x1d29('0x11')](function(_0x3af2ec){_0xa737cd(_0x3af2ec);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x3f')]=function(_0x2aa2e4,_0x175dda,_0x2a4c5b){this[_0x1d29('0xc')]['createSquareMessage']({'uniqueid':this[_0x1d29('0x35')]['uniqueid'],'body':_0x2aa2e4,'direction':_0x175dda})[_0x1d29('0xd')](function(_0xf292d2){if(_0x2a4c5b){_0x2a4c5b(null,_0xf292d2);}})[_0x1d29('0x11')](function(_0x188312){if(_0x2a4c5b){_0x2a4c5b(_0x188312);}});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x40')]=function(_0x2a3634,_0x239cee){this[_0x1d29('0xc')][_0x1d29('0x40')]({'firstName':_[_0x1d29('0x41')](_0x2a3634['name'])||_[_0x1d29('0x42')](_0x2a3634[_0x1d29('0x10')])?'callback_'+Math['random']():_0x2a3634['name'],'lastName':_[_0x1d29('0x41')](_0x2a3634['lastName'])||_[_0x1d29('0x42')](_0x2a3634[_0x1d29('0x43')])?null:_0x2a3634[_0x1d29('0x43')],'phone':_0x2a3634[_0x1d29('0x44')],'ListId':_0x2a3634[_0x1d29('0x45')],'scheduledAt':_0x2a3634[_0x1d29('0x46')],'callbackUniqueid':this[_0x1d29('0x35')]['uniqueid'],'tags':_0x1d29('0x47'),'description':_0x1d29('0x48')+_0x2a3634[_0x1d29('0x46')][_0x1d29('0x49')](),'priority':_0x2a3634[_0x1d29('0x4a')]})[_0x1d29('0xd')](function(_0x233e76){_0x239cee(null,_0x233e76);})[_0x1d29('0x11')](function(_0x3a5fe6){_0x239cee(_0x3a5fe6);});};AGIVertices[_0x1d29('0xe')]['getPause']=function(_0x2da989,_0x58bba8){this[_0x1d29('0xc')]['getPauseById'](_0x2da989)['then'](function(_0x49842f){_0x58bba8(null,_0x49842f?_0x49842f[_0x1d29('0x10')]:![]);})[_0x1d29('0x11')](function(_0x3c78f7){_0x58bba8(_0x3c78f7);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x4b')]=function(_0x58131,_0x177098,_0xfb0a08){var _0x4c0e3e={'role':_0x1d29('0x4c')};_0x4c0e3e[_0x58131]=this[_0x1d29('0x35')][_0x1d29('0x37')];this[_0x1d29('0xc')][_0x1d29('0x4b')](_0x4c0e3e,_0x177098,this[_0x1d29('0x35')][_0x1d29('0x39')])['then'](function(_0x285544){_0xfb0a08(null,_[_0x1d29('0x42')](_0x285544)?![]:!![]);})['catch'](function(_0x2df5c4){logger[_0x1d29('0x28')](_0x2df5c4);_0xfb0a08(null,![]);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x4d')]=function(_0x7ef80a,_0x1d791e){var _0x4aa321={'role':_0x1d29('0x4c')};_0x4aa321[_0x7ef80a]=this[_0x1d29('0x35')][_0x1d29('0x37')];this[_0x1d29('0xc')]['agentUnpause'](_0x4aa321)[_0x1d29('0xd')](function(_0x105b4a){_0x1d791e(null,_[_0x1d29('0x42')](_0x105b4a)?![]:!![]);})['catch'](function(_0x24cde3){logger[_0x1d29('0x28')](_0x24cde3);_0x1d791e(null,![]);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x4e')]=function(_0x253d77,_0x2a772e){var _0x6e5829={'role':_0x1d29('0x4c')};_0x6e5829[_0x253d77]=this[_0x1d29('0x35')][_0x1d29('0x37')];this[_0x1d29('0xc')][_0x1d29('0x4e')](_0x6e5829)[_0x1d29('0xd')](function(_0x46b9fc){_0x2a772e(null,_[_0x1d29('0x42')](_0x46b9fc)?![]:!![]);})[_0x1d29('0x11')](function(_0xf2891c){logger['error'](_0xf2891c);_0x2a772e(null,![]);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x4f')]=function(_0x503000,_0xd55f88){var _0x280001={'role':'agent'};_0x280001[_0x503000]=this[_0x1d29('0x35')][_0x1d29('0x37')];var _0x493328=_0x503000!='internal'?util['format'](_0x1d29('0x50'),_0x1d29('0x51'),this[_0x1d29('0x35')][_0x1d29('0x37')]):undefined;this['rpc']['agentLogin'](_0x280001,_0x493328)[_0x1d29('0xd')](function(_0x4e4e99){_0xd55f88(null,_['isNil'](_0x4e4e99)?![]:!![]);})[_0x1d29('0x11')](function(_0x5587b1){logger['error'](_0x5587b1);_0xd55f88(null,![]);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x52')]=function(_0xebb269,_0x4fcd8a){sh['exec'](_[_0x1d29('0x53')](_0xebb269),function(_0x39a139,_0x148081){var _0x24207c=_0x148081[_0x1d29('0x54')](/(\r\n|\n|\r)/gm,'');_0x4fcd8a(null,_0x24207c);});};AGIVertices[_0x1d29('0xe')]['googleTTS']=function(_0x238234,_0x2f4ad0){scripts['googleTTS'](_0x238234['text'],_0x238234[_0x1d29('0x55')]||'en',0x1)[_0x1d29('0xd')](function(_0x267b2e){_0x2f4ad0(null,_0x267b2e);})[_0x1d29('0x11')](function(_0x2bf69b){_0x2f4ad0(_0x2bf69b);});};AGIVertices['prototype'][_0x1d29('0x56')]=function(_0x5cc5c2,_0xc8b260){scripts[_0x1d29('0x56')](this['channel'][_0x1d29('0x39')],_0x5cc5c2['key'],_0x5cc5c2[_0x1d29('0x57')],_0x5cc5c2[_0x1d29('0x58')]||'en')[_0x1d29('0xd')](function(_0x12fe02){_0xc8b260(null,_0x12fe02);})['catch'](function(_0x37f282){_0xc8b260(_0x37f282);});};AGIVertices['prototype']['sestekNDA']=function(_0x272a9d,_0x185239){scripts[_0x1d29('0x59')](this[_0x1d29('0x35')],_0x272a9d)[_0x1d29('0xd')](function(_0x1540bb){_0x185239(null,_0x1540bb);})[_0x1d29('0x11')](function(_0x1ab730){_0x185239(_0x1ab730);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x5a')]=function(_0x6b0861,_0x472d46){scripts[_0x1d29('0x5a')](_0x6b0861[_0x1d29('0x5b')],_0x6b0861[_0x1d29('0x57')],_0x6b0861[_0x1d29('0x5c')]||_0x1d29('0x5d'),_0x6b0861[_0x1d29('0x5e')])[_0x1d29('0xd')](function(_0x181348){_0x472d46(null,_0x181348);})['catch'](function(_0x25bc53){_0x472d46(_0x25bc53);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x5f')]=function(_0x543e5b,_0x2c28bd,_0x3d067d){scripts['ispeechASR'](_0x2c28bd,_0x543e5b['key'],_0x543e5b['ispeech_asr_language']||'en-US',this[_0x1d29('0x60')](_0x543e5b[_0x1d29('0x61')])?_0x543e5b['model']:undefined)[_0x1d29('0xd')](function(_0x4b0928){_0x3d067d(null,_0x4b0928);})[_0x1d29('0x11')](function(_0x2e06e5){_0x3d067d(_0x2e06e5);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x62')]=function(_0x326ac6,_0x4bf5cf){scripts[_0x1d29('0x62')](_0x326ac6[_0x1d29('0x63')],_0x326ac6[_0x1d29('0x64')],_0x326ac6[_0x1d29('0x65')],_0x326ac6[_0x1d29('0x66')]||_0x1d29('0x67'),_0x326ac6[_0x1d29('0x57')],_0x326ac6[_0x1d29('0x68')]||_0x1d29('0x57'))[_0x1d29('0xd')](function(_0x44f70b){_0x4bf5cf(null,_0x44f70b);})['catch'](function(_0x48da68){_0x4bf5cf(_0x48da68);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x69')]=function(_0x2d04d7,_0x5861dd){scripts['awsLex'](this[_0x1d29('0x35')][_0x1d29('0x39')],_0x2d04d7[_0x1d29('0x63')],_0x2d04d7[_0x1d29('0x64')],_0x2d04d7[_0x1d29('0x6a')],_0x2d04d7[_0x1d29('0x57')],_0x2d04d7[_0x1d29('0x6b')])['then'](function(_0x4c048c){_0x5861dd(null,_0x4c048c);})['catch'](function(_0x381707){_0x5861dd(_0x381707);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x6c')]=function(_0x4b5933,_0x3298d6,_0x3f72ab){scripts[_0x1d29('0x6c')](_0x3298d6,_0x4b5933['key'],_0x4b5933[_0x1d29('0x6d')]||_0x1d29('0x5d'))['then'](function(_0x109461){_0x3f72ab(null,_0x109461);})[_0x1d29('0x11')](function(_0x4daf79){_0x3f72ab(_0x4daf79);});};AGIVertices[_0x1d29('0xe')][_0x1d29('0x6e')]=function(_0x27640e,_0x350077,_0xc44895){scripts[_0x1d29('0x6e')](_0x350077,_0x27640e['appid'],_0x27640e[_0x1d29('0x6f')],_0x27640e[_0x1d29('0x70')])['then'](function(_0x30e965){_0xc44895(null,_0x30e965);})[_0x1d29('0x11')](function(_0x5a5481){_0xc44895(_0x5a5481);});};AGIVertices['prototype']['clear']=function(_0x23c51c){var _0x3483ea=_[_0x1d29('0x71')](verticesWithRetry,_0x23c51c[_0x1d29('0x34')])?_0x23c51c:_['clone'](_0x23c51c);for(var _0x1ce4c9 in _0x3483ea){if(_0x3483ea[_0x1d29('0x72')](_0x1ce4c9)){if(_0x3483ea[_0x1ce4c9]&&_[_0x1d29('0x73')](_0x3483ea[_0x1ce4c9])){_0x3483ea[_0x1ce4c9]=this[_0x1d29('0x74')](_0x3483ea[_0x1ce4c9]);}}}return _0x3483ea;};AGIVertices[_0x1d29('0xe')][_0x1d29('0x74')]=function(_0x45a29c){var _0x36f65b=_0x45a29c[_0x1d29('0x75')]('{');for(var _0x3d3f63=0x1;_0x3d3f63<_0x36f65b[_0x1d29('0x76')];_0x3d3f63+=0x1){var _0x34e095=_0x36f65b[_0x3d3f63][_0x1d29('0x75')]('}');if(_0x34e095['length']>0x1){_0x45a29c=_0x45a29c[_0x1d29('0x77')]('{'+_0x34e095[0x0]+'}',this[_0x1d29('0x35')][_0x1d29('0x78')](_0x34e095[0x0])['extra']||_0x34e095[0x0]);}}if(_0x36f65b['length']===0x1){return _0x45a29c[_0x1d29('0x49')]();}return this[_0x1d29('0x74')](_0x45a29c);};AGIVertices[_0x1d29('0xe')][_0x1d29('0x79')]=function(_0xb9ae8f,_0x345ce7){var _0xb2e1d5=this[_0x1d29('0x35')][_0x1d29('0x78')](_0xb9ae8f);if(_0xb2e1d5['result']===-0x1){return _0xb2e1d5;}logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s',_0x345ce7,_0xb2e1d5['extra']));return this[_0x1d29('0x35')][_0x1d29('0x7a')](_0x345ce7,_0xb2e1d5['extra']);};AGIVertices[_0x1d29('0xe')][_0x1d29('0x60')]=function(_0x1a1447){return _0x1a1447&&_0x1a1447!=='0'&&_0x1a1447!=='-1'&&_0x1a1447!=='';};AGIVertices[_0x1d29('0xe')][_0x1d29('0x7b')]=function(_0x4d6c53){this[_0x1d29('0x7c')]['sync'](this,_0x4d6c53,'-');_0x4d6c53['retry']=_0x4d6c53[_0x1d29('0x7b')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x1d29('0xe')][_0x1d29('0x5')]=function(_0x4c7d8c){logger['info'](util[_0x1d29('0x24')](_0x1d29('0x7d'),_0x4c7d8c['label']));return this[_0x1d29('0x35')][_0x1d29('0x5')]([_0x4c7d8c[_0x1d29('0x7e')],_0x4c7d8c[_0x1d29('0x7f')]]);};AGIVertices[_0x1d29('0xe')][_0x1d29('0x80')]=function(_0x5a06d4){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x81'),_0x5a06d4[_0x1d29('0x33')]));if(this['isConfigured'](_0x5a06d4[_0x1d29('0x82')])){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x83'),_0x5a06d4['timeout']));var _0xfb45fe=this[_0x1d29('0x35')][_0x1d29('0x84')](_0x5a06d4[_0x1d29('0x82')]);if(_0xfb45fe[_0x1d29('0x85')]===-0x1){return _0xfb45fe;}}return this[_0x1d29('0x35')]['answer']();};AGIVertices['prototype'][_0x1d29('0x47')]=function(_0x3c40db){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x3c40db[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x3c40db[_0x1d29('0x45')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x3c40db,_0x1d29('0x86'));}_0x3c40db[_0x1d29('0x46')]=moment();if(this[_0x1d29('0x60')](_0x3c40db[_0x1d29('0x87')])){_0x3c40db[_0x1d29('0x46')]=moment()[_0x1d29('0x88')](_0x3c40db[_0x1d29('0x87')],_0x1d29('0x89'));}if(!this['isConfigured'](_0x3c40db[_0x1d29('0x4a')])){_0x3c40db[_0x1d29('0x4a')]=0x2;}this[_0x1d29('0x40')][_0x1d29('0x8a')](this,_0x3c40db);return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')]('CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s',_0x3c40db[_0x1d29('0x44')],_0x3c40db['list_id'],_0x3c40db[_0x1d29('0x46')]));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x8c')]=function(_0x24487a){logger['info'](util[_0x1d29('0x24')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0x24487a[_0x1d29('0x33')]));var _0x5aa3ae=this[_0x1d29('0x35')][_0x1d29('0x8d')](_0x24487a[_0x1d29('0x8e')],_0x24487a[_0x1d29('0x8f')]);if(_0x5aa3ae['result']===-0x1){return _0x5aa3ae;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')]('Executed\x20command\x20%s\x20%s',_0x24487a[_0x1d29('0x8e')],_0x24487a[_0x1d29('0x8f')]));};AGIVertices[_0x1d29('0xe')]['lumenvoxtts']=function(_0x49a32e){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x90'),_0x49a32e[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x49a32e[_0x1d29('0x57')])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0x91'));}var _0xecaac0='\x22'+_0x49a32e[_0x1d29('0x57')]+'\x22';if(this[_0x1d29('0x60')](_0x49a32e[_0x1d29('0x8f')])){_0xecaac0+=','+_0x49a32e['options'];}var _0xb4ece0=this['channel'][_0x1d29('0x8d')]('MRCPSynth',_0xecaac0);if(_0xb4ece0['result']===-0x1){return _0xb4ece0;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format']('Executed\x20command\x20MRCPSynth\x20%s',_0xecaac0));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x92')]=function(_0x362a8b){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20SESTEKTTS\x20(%s)\x20block',_0x362a8b['label']));if(!this[_0x1d29('0x60')](_0x362a8b[_0x1d29('0x57')])){return this[_0x1d29('0x35')]['noop']('no\x20text\x20configured');}var _0x56890d='\x22'+_0x362a8b['text']+'\x22';if(this[_0x1d29('0x60')](_0x362a8b['options'])){_0x56890d+=','+_0x362a8b[_0x1d29('0x8f')];}var _0x4e2a78=this[_0x1d29('0x35')][_0x1d29('0x8d')](_0x1d29('0x93'),_0x56890d);if(_0x4e2a78[_0x1d29('0x85')]===-0x1){return _0x4e2a78;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x94'),_0x56890d));};AGIVertices['prototype']['lumenvoxasr']=function(_0x22f4f1){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x95'),_0x22f4f1[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x22f4f1[_0x1d29('0x96')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20grammar\x20configured');}var _0x38ffdb=_0x22f4f1['grammar'];if(this[_0x1d29('0x60')](_0x22f4f1[_0x1d29('0x8f')])){_0x38ffdb+=','+_0x22f4f1[_0x1d29('0x8f')];}var _0x5145fd=this[_0x1d29('0x35')]['exec'](_0x1d29('0x97'),_0x38ffdb);if(_0x5145fd[_0x1d29('0x85')]===-0x1){return _0x5145fd;}var _0x4b85d1=this[_0x1d29('0x79')](_0x1d29('0x98'),_0x1d29('0x99'));if(_0x4b85d1[_0x1d29('0x85')]===-0x1){return _0x4b85d1;}var _0x529147=this[_0x1d29('0x79')](_0x1d29('0x9a'),_0x1d29('0x9b'));if(_0x529147[_0x1d29('0x85')]===-0x1){return _0x529147;}var _0x49100a=this[_0x1d29('0x79')](_0x1d29('0x9c'),_0x1d29('0x9d'));if(_0x49100a['result']===-0x1){return _0x49100a;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format'](_0x1d29('0x9e'),_0x38ffdb));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x9f')]=function(_0xe463a4){logger['info'](util['format'](_0x1d29('0xa0'),_0xe463a4['label']));if(!this[_0x1d29('0x60')](_0xe463a4['grammar'])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20grammar\x20configured');}var _0xed0075=_0xe463a4[_0x1d29('0x96')];if(this[_0x1d29('0x60')](_0xe463a4[_0x1d29('0x8f')])){_0xed0075+=','+_0xe463a4[_0x1d29('0x8f')];}var _0x1abed2=this['channel'][_0x1d29('0x8d')](_0x1d29('0x97'),_0xed0075);if(_0x1abed2[_0x1d29('0x85')]===-0x1){return _0x1abed2;}var _0xe7d07d=this[_0x1d29('0x79')](_0x1d29('0x98'),'SESTEK_ASR_CONFIDENCE');if(_0xe7d07d[_0x1d29('0x85')]===-0x1){return _0xe7d07d;}var _0x40d928=this[_0x1d29('0x79')]('RECOG_INPUT()',_0x1d29('0xa1'));if(_0x40d928['result']===-0x1){return _0x40d928;}var _0x130c77=this['getAndSetVariable'](_0x1d29('0x9c'),'SESTEK_ASR_INSTANCE');if(_0x130c77['result']===-0x1){return _0x130c77;}return this['channel'][_0x1d29('0x8b')](util['format'](_0x1d29('0x9e'),_0xed0075));};AGIVertices[_0x1d29('0xe')][_0x1d29('0xa2')]=function(_0xd4878d){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0xa3'),_0xd4878d[_0x1d29('0x33')]));if(!this['isConfigured'](_0xd4878d[_0x1d29('0xa4')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0xd4878d,_0x1d29('0xa5'));}var _0x5c391c=this[_0x1d29('0x14')]['sync'](this,_0xd4878d[_0x1d29('0xa4')]);if(!_0x5c391c){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0xd4878d,_0x1d29('0xa6'));}if(!this[_0x1d29('0x60')](_0xd4878d[_0x1d29('0x2b')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0xd4878d,_0x1d29('0xa7'));}var _0x196144=_0xd4878d[_0x1d29('0x2b')][_0x1d29('0x54')](/(\r\n|\n|\r)/gm,'\x20');this['channel'][_0x1d29('0x8b')](util['format']('query:\x20%s',_0x196144));var _0x329737=this[_0x1d29('0x26')][_0x1d29('0x8a')](this,_0x5c391c,_0x196144);this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0xd4878d,_0x196144);if(!this[_0x1d29('0x60')](_0xd4878d[_0x1d29('0xa8')])){return this['channel'][_0x1d29('0x8b')](_0x1d29('0xa9'));}var _0xbab381=this[_0x1d29('0x78')]['sync'](this,_0xd4878d[_0x1d29('0xa8')]);if(!_0xbab381){return this['channel'][_0x1d29('0x28')](_0xd4878d,'no\x20variable\x20found');}var _0x10d5fb=this;_0x329737[_0x1d29('0xaa')](function(_0x894986,_0x91e83a){Object[_0x1d29('0xab')](_0x894986)[_0x1d29('0xaa')](function(_0x4cca43){_0x10d5fb[_0x1d29('0x35')]['setVariable'](util[_0x1d29('0x24')](_0x1d29('0xac'),_0xbab381,_0x91e83a,_0x4cca43),_0x894986[_0x4cca43]);});});this[_0x1d29('0x35')][_0x1d29('0x7a')](util[_0x1d29('0x24')]('%s_ROWS_COUNT',_0xbab381),_0x329737['length']);return this['channel']['noop'](util[_0x1d29('0x24')]('variable\x20%s\x20set',_0xbab381));};AGIVertices[_0x1d29('0xe')][_0x1d29('0xad')]=function(_0x5daec6){logger['debug'](util[_0x1d29('0x24')](_0x1d29('0xae'),_0x5daec6['label']));if(!this[_0x1d29('0x60')](_0x5daec6['sip_id'])){return this['channel'][_0x1d29('0x28')](_0x5daec6,_0x1d29('0xaf'));}var _0xfa5db1=this['getUser'][_0x1d29('0x8a')](this,_0x5daec6[_0x1d29('0xb0')]);if(!_0xfa5db1){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x5daec6,_0x1d29('0xb1'));}var _0x1ec970=this[_0x1d29('0x35')][_0x1d29('0x8d')]('DIAL',[util['format'](_0x1d29('0xb2'),_0xfa5db1),_0x5daec6[_0x1d29('0x82')],_0x5daec6['opts'],_0x5daec6[_0x1d29('0xb3')]]);if(_0x1ec970[_0x1d29('0x85')]===-0x1){return _0x1ec970;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0xb4'),_0x1d29('0xb5')));};AGIVertices[_0x1d29('0xe')][_0x1d29('0xb6')]=function(_0x2d8752){logger['info'](util[_0x1d29('0x24')](_0x1d29('0xb7'),_0x2d8752[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x2d8752['key'])){return this['channel']['noop'](_0x1d29('0xb8'));}if(!this[_0x1d29('0x60')](_0x2d8752['text'])){return this[_0x1d29('0x35')]['noop']('no\x20text\x20configured');}this[_0x1d29('0x35')]['bot']=!![];this['createSquareDetailsReport'](_0x2d8752);this[_0x1d29('0x3f')](_0x2d8752['text'],'in');this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format'](_0x1d29('0xb9'),_0x2d8752[_0x1d29('0x57')]));var _0x7c56c3=this['googleDialogflow'][_0x1d29('0x8a')](this,_0x2d8752);if(_0x7c56c3){for(var _0x31837a in _0x7c56c3){if(_0x7c56c3[_0x1d29('0x72')](_0x31837a)){this[_0x1d29('0x35')][_0x1d29('0x7a')](util[_0x1d29('0x24')](_0x1d29('0xba'),_0x31837a[_0x1d29('0xbb')]()),_0x7c56c3[_0x31837a]);}}this['createSquareMessage'](_0x7c56c3[_0x1d29('0xbc')],'out');return this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format']('Dialogflow\x20Result\x20%s',_0x7c56c3[_0x1d29('0xbc')]));}return this['channel'][_0x1d29('0x28')](_0x2d8752,_0x1d29('0xbd'));};AGIVertices[_0x1d29('0xe')]['sesteknda']=function(_0x5659da){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20SESTEKNDA\x20(%s)\x20block',_0x5659da[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x5659da['ndauth_url'])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0xbe'));}if(!this[_0x1d29('0x60')](_0x5659da[_0x1d29('0xbf')])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0xc0'));}if(!this[_0x1d29('0x60')](_0x5659da[_0x1d29('0xc1')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20password\x20configured');}if(!this[_0x1d29('0x60')](_0x5659da[_0x1d29('0xc2')])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0x91'));}this[_0x1d29('0x35')][_0x1d29('0xc3')]=!![];this[_0x1d29('0x7c')](_0x5659da);this[_0x1d29('0x3f')](_0x5659da[_0x1d29('0x57')],'in');this['channel'][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0xc4'),_0x5659da['text']));var _0x38fd02=this[_0x1d29('0x59')][_0x1d29('0x8a')](this,_0x5659da);if(_0x38fd02){for(var _0x5686c1 in _0x38fd02){if(_0x38fd02[_0x1d29('0x72')](_0x5686c1)){this[_0x1d29('0x35')]['setVariable'](util['format'](_0x1d29('0xc5'),_0x5686c1[_0x1d29('0xbb')]()),_0x38fd02[_0x5686c1]);}}this[_0x1d29('0x3f')](_0x38fd02['speech'],_0x1d29('0xc6'));if(_0x38fd02[_0x1d29('0xc7')]){this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0xc8'),_0x38fd02[_0x1d29('0xc7')]));var _0x1cb5e7=this[_0x1d29('0x35')][_0x1d29('0xc9')](_0x38fd02[_0x1d29('0xc7')]);try{fs[_0x1d29('0xca')](_0x38fd02[_0x1d29('0xc7')]+'.wav');}catch(_0x129580){logger[_0x1d29('0x28')](_0x129580);}return _0x1cb5e7;}else{return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0xcb'),_0x38fd02[_0x1d29('0xbc')]));}}return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x5659da,'SestekNDA\x20is\x20unreachable');};AGIVertices['prototype']['end']=function(_0x54a690){logger[_0x1d29('0x29')](util['format'](_0x1d29('0xcc'),_0x54a690[_0x1d29('0x33')]));return this['channel'][_0x1d29('0x8b')]('end');};AGIVertices[_0x1d29('0xe')][_0x1d29('0xcd')]=function(_0x483bf9){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0xce'),_0x483bf9['label']));var _0x19a733='';if(_0x483bf9['trunk_id']){if(!this[_0x1d29('0x60')](_0x483bf9[_0x1d29('0xcf')])){return this[_0x1d29('0x35')]['error'](_0x483bf9,_0x1d29('0xd0'));}else{var _0x16c976=parseInt(_0x483bf9[_0x1d29('0xcf')],0xa);if(isNaN(_0x16c976)){_0x19a733=_0x483bf9[_0x1d29('0xcf')];}else{_0x19a733=this['getTrunk'][_0x1d29('0x8a')](this,_0x483bf9[_0x1d29('0xcf')]);if(!_0x19a733){return this['channel'][_0x1d29('0x28')](_0x483bf9,_0x1d29('0xd1'));}}}}else if(_0x483bf9[_0x1d29('0xd2')]){_0x19a733=_0x483bf9[_0x1d29('0xd2')];}else{return this[_0x1d29('0x35')]['error'](_0x483bf9,'no\x20trunk\x20selected');}var _0x529b14=this[_0x1d29('0x35')][_0x1d29('0x8d')](_0x1d29('0xb5'),[util['format'](_0x1d29('0xd3'),_0x19a733,_0x483bf9['phone']),_0x483bf9[_0x1d29('0x82')],_0x483bf9[_0x1d29('0xd4')],_0x483bf9['url']]);if(_0x529b14[_0x1d29('0x85')]===-0x1){return _0x529b14;}return this['channel'][_0x1d29('0x8b')](util['format'](_0x1d29('0xb4'),'DIAL'));};AGIVertices[_0x1d29('0xe')][_0x1d29('0xd5')]=function(_0x5f438e){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0xd6'),_0x5f438e[_0x1d29('0x33')]));return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0xd5'));};AGIVertices[_0x1d29('0xe')][_0x1d29('0xa')]=function(_0x3f1fc1){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0xd7'),_0x3f1fc1[_0x1d29('0x33')]));if(_0x3f1fc1['retry']===0x0){return this['maxRetry'](_0x3f1fc1);}_0x3f1fc1['retry']-=0x1;if(!this[_0x1d29('0x60')](_0x3f1fc1['file_id'])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x3f1fc1,_0x1d29('0xd8'));}var _0xf5b79=this[_0x1d29('0xd9')]['sync'](this,_0x3f1fc1[_0x1d29('0xda')]);if(!_0xf5b79){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x3f1fc1,_0x1d29('0xdb'));}if(!this[_0x1d29('0x60')](_0x3f1fc1['variable_id'])){return this['channel'][_0x1d29('0x28')](_0x1d29('0xa9'));}var _0x47060b=this[_0x1d29('0x35')][_0x1d29('0xdc')](_0xf5b79,_0x3f1fc1['response'],_0x3f1fc1[_0x1d29('0xdd')]);var _0x42cc98=_0x47060b[_0x1d29('0x85')]?_0x47060b[_0x1d29('0x85')][_0x1d29('0x49')]():'';logger[_0x1d29('0x29')](_0x1d29('0xde'),JSON['stringify'](_0x47060b));if(_0x47060b[_0x1d29('0x85')]===-0x1){this[_0x1d29('0x7c')]['sync'](this,_0x3f1fc1,_0x42cc98);return _0x47060b;}else if(_0x47060b[_0x1d29('0xdf')]==='timeout'){_0x47060b[_0x1d29('0x85')]=_0x42cc98[_0x1d29('0x76')]>=parseInt(_0x3f1fc1[_0x1d29('0xe0')])?'x':'i';}else{_0x47060b['result']=_0x42cc98[_0x1d29('0x76')]>=parseInt(_0x3f1fc1['mindigit'])&&_0x42cc98[_0x1d29('0x76')]<=parseInt(_0x3f1fc1[_0x1d29('0xdd')])?'x':'i';}var _0x3f75c4=this[_0x1d29('0x78')]['sync'](this,_0x3f1fc1[_0x1d29('0xa8')]);if(!_0x3f75c4){return this['channel'][_0x1d29('0x28')](_0x3f1fc1,_0x1d29('0xe1'));}this[_0x1d29('0x35')]['setVariable'](_0x3f75c4,_0x42cc98);if(this[_0x1d29('0x60')](_0x3f1fc1[_0x1d29('0xe2')])){var _0x5b6c4=parseInt(_0x3f1fc1[_0x1d29('0xe2')],0xa);var _0x8f57ad=rs[_0x1d29('0xe3')]({'charset':'*','length':_0x5b6c4});var _0x1add23=_0x42cc98[_0x1d29('0x76')];if(_0x1add23>0x0){if(_0x1add23>_0x5b6c4){this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x3f1fc1,_0x3f1fc1[_0x1d29('0xe4')]==='first'?_0x8f57ad+_0x42cc98[_0x1d29('0xe5')](_0x5b6c4):_0x42cc98['substr'](0x0,_0x1add23-_0x5b6c4)+_0x8f57ad);}else{this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x3f1fc1,rs[_0x1d29('0xe3')]({'charset':'*','length':_0x1add23}));}}else{this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x3f1fc1,'');}}else{this[_0x1d29('0x7c')]['sync'](this,_0x3f1fc1,_0x42cc98);}return _0x47060b;};AGIVertices[_0x1d29('0xe')][_0x1d29('0xb')]=function(_0x1a99a7){logger['info'](util[_0x1d29('0x24')](_0x1d29('0xe6'),_0x1a99a7[_0x1d29('0x33')]));return this[_0x1d29('0xa')](_0x1a99a7);};AGIVertices['prototype'][_0x1d29('0xe7')]=function(_0x55b7f8){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0xe8'),_0x55b7f8['label']));this[_0x1d29('0x7c')]['sync'](this,_0x55b7f8,_0x55b7f8[_0x1d29('0xe9')]);return this[_0x1d29('0x35')]['noop'](util[_0x1d29('0x24')](_0x1d29('0xea'),_0x55b7f8[_0x1d29('0xe9')]));};AGIVertices[_0x1d29('0xe')][_0x1d29('0xeb')]=function(_0x575f2f){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0xec'),_0x575f2f['label']));if(!this[_0x1d29('0x60')](_0x575f2f[_0x1d29('0x63')])||!this[_0x1d29('0x60')](_0x575f2f[_0x1d29('0x64')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20valid\x20credentials\x20configured');}if(!this['isConfigured'](_0x575f2f[_0x1d29('0x57')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20text\x20configured');}this[_0x1d29('0x35')]['noop'](util['format'](_0x1d29('0xed'),_0x575f2f[_0x1d29('0x57')]));var _0xcaecd3=this[_0x1d29('0x62')][_0x1d29('0x8a')](this,_0x575f2f);if(_0xcaecd3){this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format'](_0x1d29('0xee'),_0xcaecd3));var _0x1306f6=this[_0x1d29('0x35')][_0x1d29('0xc9')](_0xcaecd3);try{fs[_0x1d29('0xca')](_0xcaecd3+_0x1d29('0xef'));}catch(_0x282c04){logger[_0x1d29('0x28')](_0x282c04);}return _0x1306f6;}return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x575f2f,_0x1d29('0xf0'));};AGIVertices[_0x1d29('0xe')]['awslex']=function(_0x3afd22){logger[_0x1d29('0x29')](util['format'](_0x1d29('0xf1'),_0x3afd22[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x3afd22[_0x1d29('0x63')])||!this['isConfigured'](_0x3afd22[_0x1d29('0x64')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0xf2'));}if(!this['isConfigured'](_0x3afd22[_0x1d29('0x6b')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0xf3'));}if(!this[_0x1d29('0x60')](_0x3afd22[_0x1d29('0x57')])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0x91'));}this[_0x1d29('0x35')][_0x1d29('0xc3')]=!![];this[_0x1d29('0x7c')](_0x3afd22);this[_0x1d29('0x3f')](_0x3afd22[_0x1d29('0x57')],'in');this[_0x1d29('0x35')]['noop'](util[_0x1d29('0x24')](_0x1d29('0xf4'),_0x3afd22['text']));var _0x37fc51=this[_0x1d29('0x69')][_0x1d29('0x8a')](this,_0x3afd22);if(_0x37fc51){for(var _0x45cefb in _0x37fc51){if(_0x37fc51[_0x1d29('0x72')](_0x45cefb)&&_[_0x1d29('0x73')](_0x37fc51[_0x45cefb])){this[_0x1d29('0x35')][_0x1d29('0x7a')](util[_0x1d29('0x24')](_0x1d29('0xf5'),_0x45cefb['toUpperCase']()),_0x37fc51[_0x45cefb]);}}if(_[_0x1d29('0x42')](_0x37fc51[_0x1d29('0xf6')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0xf7'));}else{this[_0x1d29('0x3f')](_0x37fc51[_0x1d29('0xf6')],_0x1d29('0xc6'));return this['channel'][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0xf8'),_0x37fc51[_0x1d29('0xf6')]));}}return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x3afd22,'Amazon\x20Lex\x20is\x20unreachable');};AGIVertices[_0x1d29('0xe')][_0x1d29('0xf9')]=function(_0x12c015){logger['info'](util[_0x1d29('0x24')](_0x1d29('0xfa'),_0x12c015[_0x1d29('0x33')],_0x12c015[_0x1d29('0x82')]));if(!this['isConfigured'](_0x12c015[_0x1d29('0x5b')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20key\x20configured');}var _0x2e8f81=_0x1d29('0xfb');var _0x31c4bf=util['format'](_0x1d29('0xfc'),FILES_PATH,rs[_0x1d29('0xe3')](0x4));var _0x46dc76=util[_0x1d29('0x24')](_0x1d29('0xfd'),_0x31c4bf,_0x2e8f81);var _0x444c6f=!![];if(_0x12c015[_0x1d29('0xfe')]===_0x1d29('0xff')){_0x444c6f=![];}var _0x408427=this[_0x1d29('0x35')]['recordFile'](_0x31c4bf,_0x2e8f81,_0x12c015[_0x1d29('0x100')],_0x12c015[_0x1d29('0x82')],undefined,_0x444c6f);if(_0x408427[_0x1d29('0x85')]!==-0x1){this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format'](_0x1d29('0x101'),_0x46dc76));var _0x266b65=this[_0x1d29('0x6c')][_0x1d29('0x8a')](this,_0x12c015,_0x46dc76);if(_0x266b65){for(var _0x51007d in _0x266b65){if(_0x266b65[_0x1d29('0x72')](_0x51007d)){this[_0x1d29('0x35')]['setVariable'](util[_0x1d29('0x24')]('GOOGLE_ASR_%s',_0x51007d[_0x1d29('0xbb')]()),_0x266b65[_0x51007d]);}}return this[_0x1d29('0x35')]['noop'](util[_0x1d29('0x24')]('GoogleASR\x20Result\x20%s',JSON[_0x1d29('0x102')](_0x266b65)));}}return _0x408427;};AGIVertices[_0x1d29('0xe')][_0x1d29('0x103')]=function(_0x4f0255){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x104'),_0x4f0255[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x4f0255['appid'])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20appid\x20configured');}if(!this[_0x1d29('0x60')](_0x4f0255['appsecret'])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0x105'));}var _0x1f37c9='wav';var _0x530b93=util[_0x1d29('0x24')](_0x1d29('0xfc'),FILES_PATH,rs[_0x1d29('0xe3')](0x4));var _0x22b035=util[_0x1d29('0x24')](_0x1d29('0xfd'),_0x530b93,_0x1f37c9);var _0x1f7741=!![];if(_0x4f0255[_0x1d29('0xfe')]===_0x1d29('0xff')){_0x1f7741=![];}var _0x23cc10=this['channel'][_0x1d29('0x106')](_0x530b93,_0x1f37c9,_0x4f0255[_0x1d29('0x100')],_0x4f0255[_0x1d29('0x82')],undefined,_0x1f7741);if(_0x23cc10['result']!==-0x1){this['channel'][_0x1d29('0x8b')](util['format'](_0x1d29('0x107'),_0x22b035));var _0x395d6c=this[_0x1d29('0x6e')][_0x1d29('0x8a')](this,_0x4f0255,_0x22b035);if(_0x395d6c){for(var _0x5696ca in _0x395d6c){if(_0x395d6c[_0x1d29('0x72')](_0x5696ca)){this[_0x1d29('0x35')][_0x1d29('0x7a')](util[_0x1d29('0x24')](_0x1d29('0x108'),_0x5696ca[_0x1d29('0xbb')]()),_0x395d6c[_0x5696ca]);}}return this['channel'][_0x1d29('0x8b')](util['format']('TildeASR\x20Result\x20%s',JSON[_0x1d29('0x102')](_0x395d6c)));}}return _0x23cc10;};AGIVertices[_0x1d29('0xe')][_0x1d29('0x109')]=function(_0x713f3f){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x10a'),_0x713f3f[_0x1d29('0x33')]));return this['channel'][_0x1d29('0x10b')](_0x713f3f[_0x1d29('0x10c')],_0x713f3f[_0x1d29('0x3b')],_0x713f3f[_0x1d29('0x3c')]);};AGIVertices[_0x1d29('0xe')][_0x1d29('0x10d')]=function(_0x107e36){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x107e36[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x107e36[_0x1d29('0x10e')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x107e36,_0x1d29('0x10f'));}try{var _0x4866fd=eval(_0x107e36[_0x1d29('0x10e')])?_0x1d29('0x110'):_0x1d29('0x111');this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x112'),_0x107e36['condition'],_0x4866fd));return{'code':0xc8,'result':_0x4866fd};}catch(_0x274846){return{'code':0xc8,'result':_0x1d29('0x111')};}};AGIVertices[_0x1d29('0xe')][_0x1d29('0x113')]=function(_0x391faf){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x114'),_0x391faf[_0x1d29('0x33')]));if(!this['isConfigured'](_0x391faf[_0x1d29('0x115')])){return this[_0x1d29('0x35')]['error'](_0x391faf,'no\x20interval\x20configured');}var _0x5552fc=this['getIntervals'][_0x1d29('0x8a')](this,_0x391faf[_0x1d29('0x115')]);if(!_0x5552fc){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x391faf,'no\x20intervals\x20found');}for(var _0x3d0a6c=0x0;_0x3d0a6c<_0x5552fc[_0x1d29('0x76')];_0x3d0a6c+=0x1){var _0x46e5dc=this['channel'][_0x1d29('0x78')](util[_0x1d29('0x24')]('IFTIME(%s?true:false)',_0x5552fc[_0x3d0a6c]));if(_0x46e5dc[_0x1d29('0x85')]===-0x1){return _0x46e5dc;}logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x116'),_0x5552fc[_0x3d0a6c],_0x46e5dc[_0x1d29('0xdf')]));if(_0x46e5dc[_0x1d29('0xdf')]===_0x1d29('0x110')){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x116'),_0x5552fc[_0x3d0a6c],_0x1d29('0x110')));this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x116'),_0x5552fc[_0x3d0a6c],_0x1d29('0x110')));return{'code':0xc8,'result':_0x1d29('0x110')};}else{logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('IFTIME\x20%s\x20%s',_0x5552fc[_0x3d0a6c],'false'));this['channel'][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x116'),_0x5552fc[_0x3d0a6c],'false'));}}return{'code':0xc8,'result':_0x1d29('0x111')};};AGIVertices[_0x1d29('0xe')]['hangup']=function(_0x5e681e){logger['info'](util['format']('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x5e681e['label']));return this[_0x1d29('0x35')]['hangup']();};AGIVertices[_0x1d29('0xe')][_0x1d29('0x117')]=function(_0xa627f5){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x118'),_0xa627f5[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0xa627f5[_0x1d29('0x5b')])){return this['channel']['noop'](_0x1d29('0xb8'));}var _0x57e07c=_0x1d29('0xfb');var _0x47b11f=util[_0x1d29('0x24')](_0x1d29('0xfc'),FILES_PATH,rs[_0x1d29('0xe3')](0x4));var _0x391986=util[_0x1d29('0x24')]('%s.%s',_0x47b11f,_0x57e07c);var _0x1c4397=!![];if(_0xa627f5[_0x1d29('0xfe')]===_0x1d29('0xff')){_0x1c4397=![];}var _0x36e2b1=this[_0x1d29('0x35')]['recordFile'](_0x47b11f,_0x57e07c,_0xa627f5[_0x1d29('0x100')],_0xa627f5[_0x1d29('0x82')],undefined,_0x1c4397);if(_0x36e2b1[_0x1d29('0x85')]!==-0x1){this['channel']['noop'](util['format'](_0x1d29('0x119'),_0x391986));var _0x29a708=this[_0x1d29('0x5f')][_0x1d29('0x8a')](this,_0xa627f5,_0x391986);if(_0x29a708){for(var _0x156459 in _0x29a708){if(_0x29a708[_0x1d29('0x72')](_0x156459)){this[_0x1d29('0x35')]['setVariable'](util[_0x1d29('0x24')]('ISPEECH_ASR_%s',_0x156459['toUpperCase']()),_0x29a708[_0x156459]);}}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x11a'),JSON['stringify'](_0x29a708)));}}return _0x36e2b1;};AGIVertices[_0x1d29('0xe')][_0x1d29('0x11b')]=function(_0x43c3aa){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x11c'),_0x43c3aa[_0x1d29('0x33')]));if(!this['isConfigured'](_0x43c3aa[_0x1d29('0x5b')])){return this[_0x1d29('0x35')][_0x1d29('0x8b')]('no\x20key\x20configured');}if(!this['isConfigured'](_0x43c3aa[_0x1d29('0x57')])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0x91'));}this['channel'][_0x1d29('0x8b')](util['format'](_0x1d29('0x11d'),_0x43c3aa[_0x1d29('0x57')]));var _0x130d96=this[_0x1d29('0x5a')]['sync'](this,_0x43c3aa);if(_0x130d96){this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')]('ispeech\x20%s\x20file\x20created',_0x130d96));var _0x43c80c=this['channel'][_0x1d29('0xc9')](_0x130d96,_0x43c3aa[_0x1d29('0x100')]);try{fs[_0x1d29('0xca')](_0x130d96+_0x1d29('0xef'));}catch(_0x4ba0b6){logger['error'](_0x4ba0b6);}return _0x43c80c;}return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x43c3aa,_0x1d29('0x11e'));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x11f')]=function(_0x272691){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20LOGIN\x20(%s)\x20block',_0x272691['label']));if(!this['isConfigured'](_0x272691['findBy'])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x272691,'no\x20find\x20by\x20configured');}logger['info'](util[_0x1d29('0x24')](_0x1d29('0x120'),this['channel'][_0x1d29('0x37')],_0x272691[_0x1d29('0x121')]));var _0x527f77=this['agentLogin'][_0x1d29('0x8a')](this,_0x272691[_0x1d29('0x121')]);if(_0x527f77){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x122'),this['channel'][_0x1d29('0x37')],_0x272691[_0x1d29('0x121')]));this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x122'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x272691[_0x1d29('0x121')]));return{'code':0xc8,'result':_0x1d29('0x123')};}else{logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x1d29('0x37')],_0x272691['findBy']));this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x124'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x272691[_0x1d29('0x121')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x1d29('0xe')][_0x1d29('0x125')]=function(_0x777613){logger[_0x1d29('0x29')](util['format']('Enter\x20in\x20LOGOUT\x20(%s)\x20block',_0x777613['label']));if(!this[_0x1d29('0x60')](_0x777613[_0x1d29('0x121')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x777613,_0x1d29('0x126'));}logger['info'](util[_0x1d29('0x24')](_0x1d29('0x120'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x777613[_0x1d29('0x121')]));var _0x50e9ad=this['agentLogout'][_0x1d29('0x8a')](this,_0x777613[_0x1d29('0x121')]);if(_0x50e9ad){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x122'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x777613['findBy']));this['channel']['noop'](util[_0x1d29('0x24')](_0x1d29('0x122'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x777613[_0x1d29('0x121')]));return{'code':0xc8,'result':_0x1d29('0x123')};}else{logger[_0x1d29('0x29')](util['format'](_0x1d29('0x124'),this['channel']['callerid'],_0x777613['findBy']));this[_0x1d29('0x35')]['noop'](util[_0x1d29('0x24')](_0x1d29('0x124'),this['channel']['callerid'],_0x777613['findBy']));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x1d29('0xe')][_0x1d29('0x127')]=function(_0x1fca1a){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20MATH\x20(%s)\x20block',_0x1fca1a['label']));if(!this['isConfigured'](_0x1fca1a[_0x1d29('0x128')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x1fca1a,_0x1d29('0x129'));}this[_0x1d29('0x35')]['noop'](util[_0x1d29('0x24')]('math\x20%s',_0x1fca1a[_0x1d29('0x128')]));var _0x56e609=eval(_0x1fca1a['operation']);if(!this[_0x1d29('0x60')](_0x1fca1a[_0x1d29('0xa8')])){return this['channel'][_0x1d29('0x8b')](_0x1d29('0xa9'));}var _0x108e35=this[_0x1d29('0x78')][_0x1d29('0x8a')](this,_0x1fca1a[_0x1d29('0xa8')]);if(!_0x108e35){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x1fca1a,_0x1d29('0xe1'));}if(_[_0x1d29('0x12a')](_0x56e609)){var _0x56c7b6=this;_0x56e609[_0x1d29('0xaa')](function(_0x4ab439,_0x37ea0d){_0x56c7b6['channel'][_0x1d29('0x7a')](util[_0x1d29('0x24')](_0x1d29('0x12b'),_0x108e35,_0x37ea0d),_0x4ab439);});return this['channel'][_0x1d29('0x8b')](util['format'](_0x1d29('0x12c'),_0x108e35));}else{return this[_0x1d29('0x35')][_0x1d29('0x7a')](_0x108e35,_0x56e609);}};AGIVertices['prototype'][_0x1d29('0x9')]=function(_0x56b4ce){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20MENU\x20(%s)\x20block',_0x56b4ce['label']));if(_0x56b4ce['retry']===0x0){return this['maxRetry'](_0x56b4ce);}_0x56b4ce['retry']-=0x1;if(!this[_0x1d29('0x60')](_0x56b4ce[_0x1d29('0xda')])){return this[_0x1d29('0x35')]['error'](_0x56b4ce,_0x1d29('0xd8'));}var _0xf482f8=this[_0x1d29('0xd9')][_0x1d29('0x8a')](this,_0x56b4ce['file_id']);if(!_0xf482f8){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x56b4ce,'no\x20file\x20audio\x20found');}var _0x4d46e7=this[_0x1d29('0x35')]['getData'](_0xf482f8,_0x56b4ce['response'],_0x56b4ce[_0x1d29('0x12d')]);var _0x53080b=_0x4d46e7[_0x1d29('0x85')];if(_0x4d46e7[_0x1d29('0x85')]===-0x1){this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x56b4ce,'-1');return _0x4d46e7;}else if(_0x4d46e7['extra']===_0x1d29('0x82')){_0x4d46e7['result']=_0x4d46e7['result'][_0x1d29('0x76')]>0x0?_0x4d46e7['result']:'t';}else if(_[_0x1d29('0x41')](_0x4d46e7[_0x1d29('0x85')])){_0x4d46e7['result']='#';_0x53080b='#';}if(!this['isConfigured'](_0x56b4ce[_0x1d29('0xa8')])){this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0xa9'));}else{var _0x3b91ad=this['getVariable']['sync'](this,_0x56b4ce[_0x1d29('0xa8')]);if(!_0x3b91ad){return this[_0x1d29('0x35')]['error'](_0x56b4ce,_0x1d29('0xe1'));}this[_0x1d29('0x35')][_0x1d29('0x7a')](_0x3b91ad,_0x53080b);}this['createSquareDetailsReport'][_0x1d29('0x8a')](this,_0x56b4ce,_0x53080b);return _0x4d46e7;};AGIVertices['prototype'][_0x1d29('0x8b')]=function(_0x196edf){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x12e'),_0x196edf[_0x1d29('0x33')]));return this[_0x1d29('0x35')]['noop'](_0x196edf[_0x1d29('0x12f')]||_0x196edf[_0x1d29('0x33')]);};AGIVertices[_0x1d29('0xe')]['pause']=function(_0x14739f){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x130'),_0x14739f[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x14739f[_0x1d29('0x121')])){return this['channel'][_0x1d29('0x28')](_0x14739f,_0x1d29('0x126'));}logger['info'](util[_0x1d29('0x24')](_0x1d29('0x120'),this[_0x1d29('0x35')]['callerid'],_0x14739f[_0x1d29('0x121')]));var _0x131cbe=this[_0x1d29('0x131')][_0x1d29('0x8a')](this,_0x14739f[_0x1d29('0x132')]);var _0x62e46f=this[_0x1d29('0x4b')]['sync'](this,_0x14739f[_0x1d29('0x121')],_0x131cbe);if(_0x62e46f){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x122'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x14739f[_0x1d29('0x121')]));this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')]('AGENT\x20%s\x20FOUND\x20BY',this['channel']['callerid'],_0x14739f[_0x1d29('0x121')]));return{'code':0xc8,'result':_0x1d29('0x123')};}else{logger['info'](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel']['callerid'],_0x14739f[_0x1d29('0x121')]));this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x122'),this[_0x1d29('0x35')]['callerid'],_0x14739f[_0x1d29('0x121')]));return{'code':0xc8,'result':_0x1d29('0x133')};}};AGIVertices[_0x1d29('0xe')]['playback']=function(_0x31742c){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0x31742c[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x31742c[_0x1d29('0xda')])){return this[_0x1d29('0x35')]['error'](_0x31742c,_0x1d29('0xd8'));}var _0x5150c0=this['getSound'][_0x1d29('0x8a')](this,_0x31742c[_0x1d29('0xda')]);if(!_0x5150c0){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x31742c,'no\x20file\x20audio\x20found');}var _0x596a42=this[_0x1d29('0x35')][_0x1d29('0x8d')](_0x1d29('0x134'),[_0x5150c0,_0x31742c['opts']]);if(_0x596a42['result']===-0x1){return _0x596a42;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')]('Executed\x20command\x20%s\x20%s',_0x1d29('0x134'),_0x5150c0));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x135')]=function(_0x5277fb){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x136'),_0x5277fb[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x5277fb[_0x1d29('0x137')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x5277fb,_0x1d29('0x138'));}var _0x362768='';var _0x45e82a=parseInt(_0x5277fb[_0x1d29('0x137')],0xa);if(isNaN(_0x45e82a)){_0x362768=_0x5277fb[_0x1d29('0x137')];}else{_0x362768=this[_0x1d29('0x139')][_0x1d29('0x8a')](this,_0x5277fb[_0x1d29('0x137')]);if(!_0x362768){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x5277fb,_0x1d29('0x13a'));}}var _0x2803df='';if(this['isConfigured'](_0x5277fb[_0x1d29('0xda')])){var _0x240b96=this['getSound'][_0x1d29('0x8a')](this,_0x5277fb['file_id']);if(_0x240b96){_0x2803df=_0x240b96;}}this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x5277fb,_0x362768);if(_0x5277fb['opts'][_0x1d29('0x13b')]('x')<0x0){_0x5277fb[_0x1d29('0xd4')]+='x';}if(_0x5277fb[_0x1d29('0xd4')][_0x1d29('0x13b')]('X')<0x0){_0x5277fb[_0x1d29('0xd4')]+='X';}this[_0x1d29('0x35')][_0x1d29('0x7a')](_0x1d29('0x13c'),_0x362768?_0x362768[_0x1d29('0x13d')]():'');var _0x296fd6=this[_0x1d29('0x35')]['exec'](_0x1d29('0x13e'),[_0x362768,_0x5277fb[_0x1d29('0xd4')],_0x5277fb[_0x1d29('0xb3')],_0x2803df,_0x5277fb[_0x1d29('0x82')],_0x5277fb[_0x1d29('0x5')],_0x5277fb[_0x1d29('0x13f')],_0x5277fb['gosub'],'',_0x5277fb[_0x1d29('0x140')]]);if(_0x296fd6[_0x1d29('0x85')]===-0x1){return _0x296fd6;}return this[_0x1d29('0x35')]['noop'](util[_0x1d29('0x24')](_0x1d29('0x141'),_0x1d29('0x13e'),_0x362768));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x142')]=function(_0x375400){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x143'),_0x375400['label']));var _0x405f28=_0x375400[_0x1d29('0x144')]||'wav';var _0x15afae=util[_0x1d29('0x24')]('%s_%s',this[_0x1d29('0x35')][_0x1d29('0x39')],rs[_0x1d29('0xe3')](0x5));var _0x3f6444=util[_0x1d29('0x24')](_0x1d29('0x145'),FILES_PATH,_0x15afae,_0x405f28);var _0x20a690=util[_0x1d29('0x24')](_0x1d29('0xfc'),FILES_PATH,_0x15afae);this[_0x1d29('0x38')][_0x1d29('0x8a')](this,_0x375400,_0x15afae,_0x3f6444);this[_0x1d29('0x35')]['setVariable']('RECORDING_SAVENAME',_0x15afae);logger[_0x1d29('0x29')](_0x1d29('0x146'),_0x20a690,_0x405f28,_0x375400[_0x1d29('0x147')],_0x375400[_0x1d29('0x82')]);return this[_0x1d29('0x35')]['recordFile'](_0x20a690,_0x405f28,_0x375400[_0x1d29('0x147')],_0x375400['timeout'],undefined,!![]);};AGIVertices[_0x1d29('0xe')][_0x1d29('0x148')]=function(_0xbe03ea){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x149'),_0xbe03ea[_0x1d29('0x33')]));return this[_0x1d29('0x35')][_0x1d29('0x14a')](_0xbe03ea[_0x1d29('0x14b')][_0x1d29('0x54')](/\s+/g,''),_0xbe03ea[_0x1d29('0x147')]);};AGIVertices[_0x1d29('0xe')]['saynumber']=function(_0x5d353f){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x14c'),_0x5d353f[_0x1d29('0x33')]));return this['channel'][_0x1d29('0x14d')](_0x5d353f['number'][_0x1d29('0x54')](/\s+/g,''),_0x5d353f[_0x1d29('0x147')]);};AGIVertices['prototype']['sayphonetic']=function(_0x1c402d){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x14e'),_0x1c402d[_0x1d29('0x33')]));return this[_0x1d29('0x35')]['sayPhonetic'](_0x1c402d[_0x1d29('0x57')],_0x1c402d[_0x1d29('0x147')]);};AGIVertices['prototype'][_0x1d29('0x14f')]=function(_0x2dd57f){logger[_0x1d29('0x29')](util['format']('Enter\x20in\x20SENDMAIL\x20(%s)\x20block',_0x2dd57f[_0x1d29('0x33')]));if(!this['isConfigured'](_0x2dd57f[_0x1d29('0x150')])){return this[_0x1d29('0x35')]['noop']('no\x20mail\x20account\x20configured');}var _0x23da76=this[_0x1d29('0x151')][_0x1d29('0x8a')](this,_0x2dd57f[_0x1d29('0x150')]);if(!_0x23da76||!_0x23da76['Smtp']){return this['channel'][_0x1d29('0x28')](_0x2dd57f,_0x1d29('0x152'));}var _0x22b037={'from':util[_0x1d29('0x24')](_0x1d29('0x153'),_0x23da76[_0x1d29('0x10')],_0x23da76['email']||_0x23da76['Smtp'][_0x1d29('0x154')]),'to':_0x2dd57f['to']||'','cc':_0x2dd57f['cc']||'','bcc':_0x2dd57f[_0x1d29('0x155')]||'','subject':_0x2dd57f[_0x1d29('0x156')],'html':_0x2dd57f[_0x1d29('0x57')],'text':_0x2dd57f[_0x1d29('0x57')]};var _0x496af3={'tls':{'rejectUnauthorized':![]}};if(_0x23da76[_0x1d29('0x157')]['service']){_0x496af3[_0x1d29('0x158')]=_0x23da76['Smtp'][_0x1d29('0x158')];}else{_0x496af3[_0x1d29('0x159')]=_0x23da76['Smtp']['host'];_0x496af3['port']=_0x23da76[_0x1d29('0x157')]['port'];_0x496af3[_0x1d29('0x15a')]=_0x23da76[_0x1d29('0x157')][_0x1d29('0x15a')];}if(_0x23da76[_0x1d29('0x157')][_0x1d29('0x15b')]){_0x496af3[_0x1d29('0x15c')]={'user':_0x23da76[_0x1d29('0x157')][_0x1d29('0x154')],'pass':_0x23da76[_0x1d29('0x157')][_0x1d29('0x15d')]};}if(this[_0x1d29('0x60')](_0x2dd57f[_0x1d29('0x15e')])){}logger[_0x1d29('0x15f')](_0x1d29('0x160'),JSON[_0x1d29('0x102')](_0x22b037));this[_0x1d29('0x7c')]['sync'](this,_0x2dd57f,_0x2dd57f[_0x1d29('0x150')]);this[_0x1d29('0x35')]['noop'](util['format']('Trying\x20SendMail\x20with\x20account\x20%s',_0x23da76[_0x1d29('0x10')]));this[_0x1d29('0x1d')]['sync'](this,_0x496af3,_0x22b037);return this[_0x1d29('0x35')]['noop']('Mail\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices[_0x1d29('0xe')]['sendFax']=function(_0x34d4ea){logger['info'](util[_0x1d29('0x24')](_0x1d29('0x161'),_0x34d4ea[_0x1d29('0x33')]));return this[_0x1d29('0x35')]['noop'](_0x1d29('0x162'));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x163')]=function(_0x414af5){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x164'),_0x414af5[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x414af5[_0x1d29('0x165')])){return this[_0x1d29('0x35')]['noop'](_0x1d29('0x166'));}var _0x457c1b=this[_0x1d29('0x30')][_0x1d29('0x8a')](this,_0x414af5['sms_account_id']);if(!_0x457c1b){return this['channel'][_0x1d29('0x28')](_0x414af5,'no\x20sms\x20account\x20found');}var _0x2ff086={'body':_0x414af5[_0x1d29('0x167')],'phone':_0x414af5['to']||'','SmsAccountId':_0x457c1b['id']};logger['debug']('sendSMS\x20message',JSON[_0x1d29('0x102')](_0x2ff086));this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x414af5,_0x414af5[_0x1d29('0x165')]);this[_0x1d29('0x35')][_0x1d29('0x8b')](util['format'](_0x1d29('0x168'),_0x457c1b[_0x1d29('0x10')]));this[_0x1d29('0x32')]['sync'](this,_0x2ff086);return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0x169'));};AGIVertices['prototype'][_0x1d29('0x16a')]=function(_0xdd40c5){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20SET\x20(%s)\x20block',_0xdd40c5[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0xdd40c5[_0x1d29('0xa8')])){return this[_0x1d29('0x35')]['error'](_0xdd40c5,_0x1d29('0x16b'));}var _0x30bcc8=this[_0x1d29('0x78')][_0x1d29('0x8a')](this,_0xdd40c5[_0x1d29('0xa8')]);if(!_0x30bcc8){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0xdd40c5,_0x1d29('0xe1'));}return this[_0x1d29('0x35')][_0x1d29('0x7a')](_0x30bcc8,_0xdd40c5['variable_value']);};AGIVertices[_0x1d29('0xe')]['start']=function(_0x39d5c7){logger['info'](util[_0x1d29('0x24')](_0x1d29('0x16c'),_0x39d5c7[_0x1d29('0x33')]));this[_0x1d29('0x35')][_0x1d29('0x8b')]('START\x20CALLY\x20SQUARE');if(_0x39d5c7[_0x1d29('0x80')]===_0x1d29('0x16d')){this['channel'][_0x1d29('0x8b')](_0x1d29('0x16e'));return this['channel']['answer']();}return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0x16f'));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x170')]=function(_0x48b5f1){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x171'),_0x48b5f1[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x48b5f1['project_id'])){return this[_0x1d29('0x35')]['error'](_0x48b5f1,'no\x20subproject\x20selected');}var _0x2faa20=this[_0x1d29('0x12')][_0x1d29('0x8a')](this,_0x48b5f1[_0x1d29('0x172')]);if(!this['isConfigured'](_0x2faa20)){return this['channel'][_0x1d29('0x28')](_0x48b5f1,util[_0x1d29('0x24')](_0x1d29('0x173'),_0x48b5f1['project_id']));}if(_0x2faa20===this[_0x1d29('0x35')][_0x1d29('0x36')]){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x48b5f1,'project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project');}this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x48b5f1,_0x2faa20);var _0x4f8b7f=this[_0x1d29('0x35')][_0x1d29('0x8d')](_0x1d29('0x174'),util[_0x1d29('0x24')](_0x1d29('0x175'),config[_0x1d29('0x5')][_0x1d29('0x159')]||_0x1d29('0x176'),_0x2faa20,this[_0x1d29('0x35')][_0x1d29('0x36')]));if(_0x4f8b7f[_0x1d29('0x85')]===-0x1){return _0x4f8b7f;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x141'),'AGI',_0x2faa20));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x177')]=function(_0x18bacc){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x178'),_0x18bacc['label']));var _0x1d909c=this[_0x1d29('0x52')][_0x1d29('0x8a')](this,_0x18bacc[_0x1d29('0x7e')]);this[_0x1d29('0x7c')][_0x1d29('0x8a')](this,_0x18bacc,_0x18bacc[_0x1d29('0x7e')]);if(this[_0x1d29('0x60')](_0x18bacc[_0x1d29('0xa8')])){var _0x29b645=this[_0x1d29('0x78')][_0x1d29('0x8a')](this,_0x18bacc[_0x1d29('0xa8')]);if(_0x29b645){this[_0x1d29('0x35')]['setVariable'](_0x29b645,_0x1d909c);return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x179'),_0x18bacc[_0x1d29('0x7e')],_0x29b645));}}return this['channel']['noop'](util[_0x1d29('0x24')]('sh\x20command:\x20%s\x20result\x20no\x20stored',_0x18bacc[_0x1d29('0x7e')]));};AGIVertices[_0x1d29('0xe')]['tts']=function(_0xb90275){logger[_0x1d29('0x29')](util[_0x1d29('0x24')]('Enter\x20in\x20GOOGLETTS\x20(%s)\x20block',_0xb90275[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0xb90275['text'])){return this[_0x1d29('0x35')][_0x1d29('0x8b')](_0x1d29('0x91'));}this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x17a'),_0xb90275[_0x1d29('0x57')]));var _0x733a5=this[_0x1d29('0x17b')][_0x1d29('0x8a')](this,_0xb90275);if(_0x733a5){this[_0x1d29('0x35')]['noop'](util['format'](_0x1d29('0x17c'),_0x733a5));var _0x12385d=this[_0x1d29('0x35')][_0x1d29('0xc9')](_0x733a5);try{fs['unlink'](_0x733a5+_0x1d29('0xef'));}catch(_0x285b00){logger[_0x1d29('0x28')](_0x285b00);}return _0x12385d;}return this['channel'][_0x1d29('0x28')](_0xb90275,_0x1d29('0x17d'));};AGIVertices[_0x1d29('0xe')][_0x1d29('0x17e')]=function(_0x3b3b99){logger['info'](util[_0x1d29('0x24')](_0x1d29('0x17f'),_0x3b3b99[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x3b3b99[_0x1d29('0x121')])){return this['channel'][_0x1d29('0x28')](_0x3b3b99,'no\x20find\x20by\x20configured');}logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x120'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x3b3b99['findBy']));var _0x4fc5b3=this[_0x1d29('0x4d')]['sync'](this,_0x3b3b99[_0x1d29('0x121')]);if(_0x4fc5b3){logger[_0x1d29('0x29')](util['format'](_0x1d29('0x122'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x3b3b99[_0x1d29('0x121')]));this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x122'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x3b3b99[_0x1d29('0x121')]));return{'code':0xc8,'result':_0x1d29('0x123')};}else{logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x124'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x3b3b99[_0x1d29('0x121')]));this['channel'][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x124'),this[_0x1d29('0x35')][_0x1d29('0x37')],_0x3b3b99[_0x1d29('0x121')]));return{'code':0xc8,'result':_0x1d29('0x133')};}};AGIVertices[_0x1d29('0xe')]['voicemail']=function(_0x3cffbb){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x180'),_0x3cffbb[_0x1d29('0x33')]));var _0x47b856=this['channel'][_0x1d29('0x8d')](_0x1d29('0x181'),[_0x3cffbb['mailbox'],_0x3cffbb[_0x1d29('0x8f')]]);if(_0x47b856['result']===-0x1){return _0x47b856;}return this[_0x1d29('0x35')][_0x1d29('0x8b')](util[_0x1d29('0x24')](_0x1d29('0x141'),'VOICEMAIL',_0x3cffbb[_0x1d29('0x182')]));};AGIVertices['prototype']['vswitch']=function(_0x4425d2){logger[_0x1d29('0x29')](util[_0x1d29('0x24')](_0x1d29('0x183'),_0x4425d2[_0x1d29('0x33')]));if(!this[_0x1d29('0x60')](_0x4425d2[_0x1d29('0xa8')])){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x4425d2,'no\x20variable\x20selected');}var _0x1271da=this[_0x1d29('0x78')][_0x1d29('0x8a')](this,_0x4425d2[_0x1d29('0xa8')]);if(!_0x1271da){return this[_0x1d29('0x35')][_0x1d29('0x28')](_0x4425d2,_0x1d29('0xe1'));}var _0x4bc9e8=this[_0x1d29('0x35')][_0x1d29('0x78')](_0x1271da);return{'code':0xc8,'result':_0x4bc9e8[_0x1d29('0xdf')]?_0x4bc9e8[_0x1d29('0xdf')]:'-'};};String[_0x1d29('0xe')][_0x1d29('0x77')]=function(_0x318241,_0x19ad71){return this[_0x1d29('0x75')](_0x318241)[_0x1d29('0x184')](_0x19ad71);};module[_0x1d29('0x185')]=AGIVertices;
\ No newline at end of file
+var _0xd582=['getTrunk','getTrunkById','getSound','getMailAccount','getMailAccountById','sendMailMessage','getIntervalById','interval','Intervals','format','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','callerid','createSquareRecording','calleridname','extension','priority','dnid','arg_1','file','createSquareMessage','createCmContact','isEmpty','isNil','random','lastName','phone','list_id','callback','Callback\x20scheduled\x20at\x20','scheduledAt','toString','getPauseById','agentPause','agent','agentUnpause','agentLogout','internal','LOCAL','agentLogin','shellCommand','exec','trim','googleTTS','text','google_tts_language','googleDialogflow','key','dialogflow_language','sestekNDA','ispeechTTS','ispeech_tts_language','en-US','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','aws_secret_access_key','aws_lex_region','aws_bot_name','googleASR','tildeASR','appid','appsecret','uri','includes','agicommand','isString','replaceAllVariables','split','length','getAndSetVariable','getVariable','result','extra','setVariable','maxRetry','sync','retry','Enter\x20in\x20AGI\x20(%s)\x20block','label','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','timeout','Wait\x20%s\x20seconds\x20before\x20answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','add','minutes','callback_priority','noop','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','options','Executed\x20command\x20%s\x20%s','no\x20text\x20configured','Executed\x20command\x20MRCPSynth\x20%s','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','MRCPSynth','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','grammar','no\x20grammar\x20configured','RECOG_CONFIDENCE()','RECOG_INPUT()','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','MRCPRecog','SESTEK_ASR_CONFIDENCE','RECOG_INSTANCE()','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20query\x20configured','replace','variable_id','no\x20variable\x20found','forEach','keys','%s[%s][%s]','variable\x20%s\x20set','debug','sip_id','no\x20user\x20selected','no\x20user\x20found','SIP/%s','opts','url','Executed\x20command\x20%s','DIAL','no\x20key\x20configured','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','speech','out','sesteknda','ndauth_url','username','no\x20username\x20configured','no\x20password\x20configured','ndassistant_url','bot','Trying\x20SestekNDA:\x20%s','hasOwnProperty','SESTEK_NDA_%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','unlink','SestekNDA\x20Result\x20%s','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','trunk_id','no\x20trunk\x20selected','trunk_name','SIP/%s/%s','getdigits','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','no\x20variable\x20selected\x20for\x20the\x20result','getData','response','maxdigit','test','mindigit','hiddendigitsnum','hiddendigitspos','substr','generate','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','streamFile','.wav','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','message','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','beep','recordFile','intKey','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','stringify','tildeasr','no\x20appid\x20configured','wav','%s/recordings/%s','%s.%s','NOBEEP','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','context','gotoif','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','getIntervals','no\x20intervals\x20found','IFTIME\x20%s\x20%s','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','login','findBy','no\x20find\x20by\x20configured','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','file_id','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','pause','FIND\x20AGENT\x20%s\x20BY\x20%s','getPause','pause_id','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','getVoiceQueue','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','position','QUEUE','record','%s_%s','RECORDING_SAVENAME','escape_digits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','number','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','Smtp','\x22%s\x22\x20<%s>','email','user','subject','service','host','port','secure','authentication','auth','pass','template_id','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Sms\x20message\x20added\x20to\x20outgoing\x20process','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Answer','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','replaceAll','join','util','shelljs','odbc','randomstring','moment','mustache','../../config/logger','agi','/var/opt/motion2/server/files','menu','getsecretdigits','channel','rpc','mailRpc','prototype','getVariableById','name','getVoiceQueueById','getSquareProject','getSquareProjectById','then','catch','getSquareOdbc','getSquareOdbcById','dsn','getUser','getUserById'];(function(_0x2eee25,_0x53460d){var _0x1cb8c4=function(_0x4dad56){while(--_0x4dad56){_0x2eee25['push'](_0x2eee25['shift']());}};_0x1cb8c4(++_0x53460d);}(_0xd582,0x16c));var _0x2d58=function(_0x225184,_0x40bc8c){_0x225184=_0x225184-0x0;var _0x384c3b=_0xd582[_0x225184];return _0x384c3b;};'use strict';var fs=require('fs');var path=require('path');var util=require(_0x2d58('0x0'));var _=require('lodash');var sh=require(_0x2d58('0x1'));var odbc=require(_0x2d58('0x2'))();var rs=require(_0x2d58('0x3'));var moment=require(_0x2d58('0x4'));var Mustache=require(_0x2d58('0x5'));var logger=require(_0x2d58('0x6'))(_0x2d58('0x7'));var config=require('../../config/environment');var scripts=require('./scripts');var FILES_PATH=_0x2d58('0x8');var verticesWithRetry=[_0x2d58('0x9'),'getdigits',_0x2d58('0xa')];var AGIVertices=function(_0x222d13,_0x40a1a0,_0x3defdd){this[_0x2d58('0xb')]=_0x222d13;this[_0x2d58('0xc')]=_0x40a1a0;this[_0x2d58('0xd')]=_0x3defdd;};AGIVertices[_0x2d58('0xe')]['getVariable']=function(_0x37a9b0,_0x5ef67e){this[_0x2d58('0xc')][_0x2d58('0xf')](_0x37a9b0)['then'](function(_0x367342){_0x5ef67e(null,_0x367342?_0x367342[_0x2d58('0x10')]:![]);})['catch'](function(_0x57bbb2){_0x5ef67e(_0x57bbb2);});};AGIVertices['prototype']['getVoiceQueue']=function(_0xd0468b,_0x209ee5){this['rpc'][_0x2d58('0x11')](_0xd0468b)['then'](function(_0xa7427d){_0x209ee5(null,_0xa7427d?_0xa7427d[_0x2d58('0x10')]:![]);})['catch'](function(_0x1857c3){_0x209ee5(_0x1857c3);});};AGIVertices['prototype'][_0x2d58('0x12')]=function(_0x2a815c,_0x391b7c){this[_0x2d58('0xc')][_0x2d58('0x13')](_0x2a815c)[_0x2d58('0x14')](function(_0x3bca6b){_0x391b7c(null,_0x3bca6b?_0x3bca6b[_0x2d58('0x10')]:![]);})[_0x2d58('0x15')](function(_0x5452c6){_0x391b7c(_0x5452c6);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x16')]=function(_0x57e494,_0x4ff322){this[_0x2d58('0xc')][_0x2d58('0x17')](_0x57e494)[_0x2d58('0x14')](function(_0x44753f){_0x4ff322(null,_0x44753f?_0x44753f[_0x2d58('0x18')]:![]);})['catch'](function(_0x27d8c5){_0x4ff322(_0x27d8c5);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x19')]=function(_0xb44486,_0x50391d){this[_0x2d58('0xc')][_0x2d58('0x1a')](_0xb44486)[_0x2d58('0x14')](function(_0x5571b6){_0x50391d(null,_0x5571b6?_0x5571b6['name']:![]);})[_0x2d58('0x15')](function(_0x541704){_0x50391d(_0x541704);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x1b')]=function(_0x5eb429,_0x19633f){this[_0x2d58('0xc')][_0x2d58('0x1c')](_0x5eb429)[_0x2d58('0x14')](function(_0x2c70ce){_0x19633f(null,_0x2c70ce?_0x2c70ce['name']:![]);})[_0x2d58('0x15')](function(_0x3ef4f8){_0x19633f(_0x3ef4f8);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x1d')]=function(_0x18e794,_0x47d1d1){var _0x1e65c5=this;this[_0x2d58('0xc')]['getSoundById'](_0x18e794)[_0x2d58('0x14')](function(_0x3ba2fa){_0x47d1d1(null,_0x3ba2fa?_0x1e65c5['getSoundPath'](_0x3ba2fa['save_name']):![]);})[_0x2d58('0x15')](function(_0x50943b){_0x47d1d1(_0x50943b);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x1e')]=function(_0x1ff42d,_0x187c84){this[_0x2d58('0xc')][_0x2d58('0x1f')](_0x1ff42d)[_0x2d58('0x14')](function(_0x5feea0){_0x187c84(null,_0x5feea0?_0x5feea0:![]);})[_0x2d58('0x15')](function(_0x554a9e){_0x187c84(_0x554a9e);});};AGIVertices['prototype'][_0x2d58('0x20')]=function(_0x1d2d7b,_0x4a2eb1,_0x197736){this[_0x2d58('0xd')][_0x2d58('0x20')](_0x1d2d7b,_0x4a2eb1)[_0x2d58('0x14')](function(){_0x197736(null);})[_0x2d58('0x15')](function(_0x569557){_0x197736(_0x569557);});};AGIVertices[_0x2d58('0xe')]['getIntervals']=function(_0x57f6b9,_0x1a5610){this['rpc'][_0x2d58('0x21')](_0x57f6b9)[_0x2d58('0x14')](function(_0x7eb2c8){if(_0x7eb2c8){if(_0x7eb2c8['IntervalId']){_0x1a5610(null,[_0x7eb2c8[_0x2d58('0x22')]]);}else{_0x1a5610(null,_['map'](_0x7eb2c8[_0x2d58('0x23')],_0x2d58('0x22')));}}else{_0x1a5610(null,![]);}})['catch'](function(_0x3785f2){_0x1a5610(_0x3785f2);});};AGIVertices[_0x2d58('0xe')]['getSoundPath']=function(_0x14b97d){return util[_0x2d58('0x24')](_0x2d58('0x25'),FILES_PATH,_0x14b97d);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x26')]=function(_0x524927,_0x3c363e,_0x11c796){odbc[_0x2d58('0x27')](_0x524927,function(_0x48638a){if(_0x48638a){logger[_0x2d58('0x28')](_0x2d58('0x29'),_0x48638a);_0x11c796(_0x48638a);}else{logger[_0x2d58('0x2a')](_0x2d58('0x2b'));odbc[_0x2d58('0x2c')](_0x3c363e,function(_0x13b418,_0x33ab0f){if(_0x13b418){logger['info'](_0x2d58('0x2d'),_0x3c363e);_0x11c796(_0x13b418);}else{logger['info'](_0x2d58('0x2e'),_0x3c363e);odbc['close'](function(_0x2236ff){if(_0x2236ff){logger[_0x2d58('0x28')](_0x2d58('0x2f'),_0x2236ff);}_0x11c796(null,_0x33ab0f);});}});}});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x30')]=function(_0x13fe48,_0x706c18){this[_0x2d58('0xc')][_0x2d58('0x31')](_0x13fe48)[_0x2d58('0x14')](function(_0x1710b3){_0x706c18(null,_0x1710b3?_0x1710b3:![]);})[_0x2d58('0x15')](function(_0x3eca1d){_0x706c18(_0x3eca1d);});};AGIVertices[_0x2d58('0xe')]['createSmsMessage']=function(_0x287fb1,_0xe52f4d){this[_0x2d58('0xc')][_0x2d58('0x32')](_0x287fb1)[_0x2d58('0x14')](function(_0x162f4c){_0xe52f4d(null,_0x162f4c);})['catch'](function(_0x50f759){_0xe52f4d(_0x50f759);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x33')]=function(_0x24bbd4,_0x205156,_0x1c079d){this[_0x2d58('0xc')][_0x2d58('0x33')]({'uniqueid':this[_0x2d58('0xb')][_0x2d58('0x34')],'node':_0x24bbd4['label'],'application':_0x24bbd4['agicommand'],'data':_0x205156||null,'project_name':this[_0x2d58('0xb')]['arg_1'],'callerid':this['channel'][_0x2d58('0x35')]})[_0x2d58('0x14')](function(_0x10649f){if(_0x1c079d){_0x1c079d(null,_0x10649f);}})[_0x2d58('0x15')](function(_0xb7d57){if(_0x1c079d){_0x1c079d(_0xb7d57);}});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x36')]=function(_0x57c10e,_0x278405,_0x292cd7,_0x4a88a8){this['rpc'][_0x2d58('0x36')]({'uniqueid':this[_0x2d58('0xb')][_0x2d58('0x34')],'callerid':this[_0x2d58('0xb')][_0x2d58('0x35')],'calleridname':this['channel'][_0x2d58('0x37')],'context':this['channel']['context'],'extension':this[_0x2d58('0xb')][_0x2d58('0x38')],'priority':this[_0x2d58('0xb')][_0x2d58('0x39')],'accountcode':this[_0x2d58('0xb')]['accountcode'],'dnid':this[_0x2d58('0xb')][_0x2d58('0x3a')],'projectName':this[_0x2d58('0xb')][_0x2d58('0x3b')],'saveName':_0x278405,'filename':_0x57c10e[_0x2d58('0x3c')]||_0x278405,'savePath':_0x292cd7})[_0x2d58('0x14')](function(_0x241e86){_0x4a88a8(null,_0x241e86);})[_0x2d58('0x15')](function(_0x3669c4){_0x4a88a8(_0x3669c4);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x3d')]=function(_0x31382b,_0x7b627f,_0x1f2b81){this[_0x2d58('0xc')][_0x2d58('0x3d')]({'uniqueid':this['channel']['uniqueid'],'body':_0x31382b,'direction':_0x7b627f})['then'](function(_0x435cd1){if(_0x1f2b81){_0x1f2b81(null,_0x435cd1);}})['catch'](function(_0x12a378){if(_0x1f2b81){_0x1f2b81(_0x12a378);}});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x3e')]=function(_0x33df61,_0x5cd8a9){this['rpc'][_0x2d58('0x3e')]({'firstName':_[_0x2d58('0x3f')](_0x33df61[_0x2d58('0x10')])||_[_0x2d58('0x40')](_0x33df61[_0x2d58('0x10')])?'callback_'+Math[_0x2d58('0x41')]():_0x33df61['name'],'lastName':_[_0x2d58('0x3f')](_0x33df61[_0x2d58('0x42')])||_[_0x2d58('0x40')](_0x33df61['lastName'])?null:_0x33df61[_0x2d58('0x42')],'phone':_0x33df61[_0x2d58('0x43')],'ListId':_0x33df61[_0x2d58('0x44')],'scheduledAt':_0x33df61['scheduledAt'],'callbackUniqueid':this[_0x2d58('0xb')][_0x2d58('0x34')],'tags':_0x2d58('0x45'),'description':_0x2d58('0x46')+_0x33df61[_0x2d58('0x47')][_0x2d58('0x48')](),'priority':_0x33df61['callback_priority']})[_0x2d58('0x14')](function(_0x429948){_0x5cd8a9(null,_0x429948);})['catch'](function(_0x48e554){_0x5cd8a9(_0x48e554);});};AGIVertices[_0x2d58('0xe')]['getPause']=function(_0x3f2354,_0x38c13e){this[_0x2d58('0xc')][_0x2d58('0x49')](_0x3f2354)[_0x2d58('0x14')](function(_0x2bce4b){_0x38c13e(null,_0x2bce4b?_0x2bce4b[_0x2d58('0x10')]:![]);})[_0x2d58('0x15')](function(_0x4d5210){_0x38c13e(_0x4d5210);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x4a')]=function(_0x3eeac8,_0x32c3fb,_0x270c8b){var _0x3ca28d={'role':_0x2d58('0x4b')};_0x3ca28d[_0x3eeac8]=this[_0x2d58('0xb')]['callerid'];this[_0x2d58('0xc')]['agentPause'](_0x3ca28d,_0x32c3fb,this[_0x2d58('0xb')]['uniqueid'])[_0x2d58('0x14')](function(_0xfed138){_0x270c8b(null,_['isNil'](_0xfed138)?![]:!![]);})[_0x2d58('0x15')](function(_0xd0ba5a){logger['error'](_0xd0ba5a);_0x270c8b(null,![]);});};AGIVertices['prototype'][_0x2d58('0x4c')]=function(_0x2f0625,_0x567845){var _0x44e2cd={'role':_0x2d58('0x4b')};_0x44e2cd[_0x2f0625]=this[_0x2d58('0xb')]['callerid'];this['rpc'][_0x2d58('0x4c')](_0x44e2cd)[_0x2d58('0x14')](function(_0x7067d5){_0x567845(null,_[_0x2d58('0x40')](_0x7067d5)?![]:!![]);})['catch'](function(_0x5ebccd){logger[_0x2d58('0x28')](_0x5ebccd);_0x567845(null,![]);});};AGIVertices['prototype'][_0x2d58('0x4d')]=function(_0x4cd434,_0x3a3cf1){var _0x3d2fa5={'role':_0x2d58('0x4b')};_0x3d2fa5[_0x4cd434]=this[_0x2d58('0xb')][_0x2d58('0x35')];this[_0x2d58('0xc')]['agentLogout'](_0x3d2fa5)['then'](function(_0x44ffbc){_0x3a3cf1(null,_[_0x2d58('0x40')](_0x44ffbc)?![]:!![]);})[_0x2d58('0x15')](function(_0x9b38c4){logger[_0x2d58('0x28')](_0x9b38c4);_0x3a3cf1(null,![]);});};AGIVertices[_0x2d58('0xe')]['agentLogin']=function(_0x2cb00e,_0x27f9c6){var _0x5678e4={'role':_0x2d58('0x4b')};_0x5678e4[_0x2cb00e]=this['channel'][_0x2d58('0x35')];var _0x3a2728=_0x2cb00e!=_0x2d58('0x4e')?util['format']('%s/%s@from-sip/n',_0x2d58('0x4f'),this[_0x2d58('0xb')][_0x2d58('0x35')]):undefined;this[_0x2d58('0xc')][_0x2d58('0x50')](_0x5678e4,_0x3a2728)[_0x2d58('0x14')](function(_0x20a94f){_0x27f9c6(null,_[_0x2d58('0x40')](_0x20a94f)?![]:!![]);})[_0x2d58('0x15')](function(_0x2b44cc){logger['error'](_0x2b44cc);_0x27f9c6(null,![]);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x51')]=function(_0x13c234,_0x2f6820){sh[_0x2d58('0x52')](_[_0x2d58('0x53')](_0x13c234),function(_0x55dd53,_0x2b2580){var _0x19cd97=_0x2b2580['replace'](/(\r\n|\n|\r)/gm,'');_0x2f6820(null,_0x19cd97);});};AGIVertices['prototype'][_0x2d58('0x54')]=function(_0x363680,_0x1d55f0){scripts[_0x2d58('0x54')](_0x363680[_0x2d58('0x55')],_0x363680[_0x2d58('0x56')]||'en',0x1)[_0x2d58('0x14')](function(_0x12d244){_0x1d55f0(null,_0x12d244);})['catch'](function(_0x4c0071){_0x1d55f0(_0x4c0071);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x57')]=function(_0xb042b,_0x259367){scripts[_0x2d58('0x57')](this[_0x2d58('0xb')]['uniqueid'],_0xb042b[_0x2d58('0x58')],_0xb042b[_0x2d58('0x55')],_0xb042b[_0x2d58('0x59')]||'en')['then'](function(_0xff2e35){_0x259367(null,_0xff2e35);})[_0x2d58('0x15')](function(_0x7e344c){_0x259367(_0x7e344c);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x5a')]=function(_0x1992dc,_0x403bd1){scripts[_0x2d58('0x5a')](this['channel'],_0x1992dc)['then'](function(_0x3f998f){_0x403bd1(null,_0x3f998f);})[_0x2d58('0x15')](function(_0x28e5b7){_0x403bd1(_0x28e5b7);});};AGIVertices[_0x2d58('0xe')]['ispeechTTS']=function(_0xec4742,_0x3df0ad){scripts[_0x2d58('0x5b')](_0xec4742['key'],_0xec4742[_0x2d58('0x55')],_0xec4742[_0x2d58('0x5c')]||_0x2d58('0x5d'),_0xec4742[_0x2d58('0x5e')])['then'](function(_0x44ee29){_0x3df0ad(null,_0x44ee29);})[_0x2d58('0x15')](function(_0x2c0fc7){_0x3df0ad(_0x2c0fc7);});};AGIVertices['prototype'][_0x2d58('0x5f')]=function(_0x120485,_0x16ced0,_0x3e91bf){scripts[_0x2d58('0x5f')](_0x16ced0,_0x120485[_0x2d58('0x58')],_0x120485[_0x2d58('0x60')]||_0x2d58('0x5d'),this[_0x2d58('0x61')](_0x120485[_0x2d58('0x62')])?_0x120485[_0x2d58('0x62')]:undefined)[_0x2d58('0x14')](function(_0x3dadc0){_0x3e91bf(null,_0x3dadc0);})['catch'](function(_0x4d6753){_0x3e91bf(_0x4d6753);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x63')]=function(_0x18023c,_0x318df0){scripts['awsPolly'](_0x18023c[_0x2d58('0x64')],_0x18023c['aws_secret_access_key'],_0x18023c[_0x2d58('0x65')],_0x18023c[_0x2d58('0x66')]||_0x2d58('0x67'),_0x18023c[_0x2d58('0x55')],_0x18023c[_0x2d58('0x68')]||_0x2d58('0x55'))[_0x2d58('0x14')](function(_0x5159a6){_0x318df0(null,_0x5159a6);})[_0x2d58('0x15')](function(_0x5c31f0){_0x318df0(_0x5c31f0);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x69')]=function(_0x2acc4b,_0x5a272a){scripts[_0x2d58('0x69')](this[_0x2d58('0xb')][_0x2d58('0x34')],_0x2acc4b['aws_access_key_id'],_0x2acc4b[_0x2d58('0x6a')],_0x2acc4b[_0x2d58('0x6b')],_0x2acc4b['text'],_0x2acc4b[_0x2d58('0x6c')])[_0x2d58('0x14')](function(_0x26d996){_0x5a272a(null,_0x26d996);})[_0x2d58('0x15')](function(_0x26422f){_0x5a272a(_0x26422f);});};AGIVertices['prototype'][_0x2d58('0x6d')]=function(_0x46c4c9,_0x31cc37,_0x18ea16){scripts['googleASR'](_0x31cc37,_0x46c4c9[_0x2d58('0x58')],_0x46c4c9['google_asr_language']||_0x2d58('0x5d'))[_0x2d58('0x14')](function(_0x259d66){_0x18ea16(null,_0x259d66);})[_0x2d58('0x15')](function(_0x11f17d){_0x18ea16(_0x11f17d);});};AGIVertices[_0x2d58('0xe')][_0x2d58('0x6e')]=function(_0x33fbe4,_0x19954b,_0x2f62cb){scripts['tildeASR'](_0x19954b,_0x33fbe4[_0x2d58('0x6f')],_0x33fbe4[_0x2d58('0x70')],_0x33fbe4[_0x2d58('0x71')])['then'](function(_0x295df6){_0x2f62cb(null,_0x295df6);})[_0x2d58('0x15')](function(_0x3dd00b){_0x2f62cb(_0x3dd00b);});};AGIVertices[_0x2d58('0xe')]['clear']=function(_0x548f53){var _0x4d4605=_[_0x2d58('0x72')](verticesWithRetry,_0x548f53[_0x2d58('0x73')])?_0x548f53:_['clone'](_0x548f53);for(var _0x27fd1e in _0x4d4605){if(_0x4d4605['hasOwnProperty'](_0x27fd1e)){if(_0x4d4605[_0x27fd1e]&&_[_0x2d58('0x74')](_0x4d4605[_0x27fd1e])){_0x4d4605[_0x27fd1e]=this[_0x2d58('0x75')](_0x4d4605[_0x27fd1e]);}}}return _0x4d4605;};AGIVertices[_0x2d58('0xe')]['replaceAllVariables']=function(_0x354bb8){var _0x403d1f=_0x354bb8[_0x2d58('0x76')]('{');for(var _0x4da954=0x1;_0x4da954<_0x403d1f[_0x2d58('0x77')];_0x4da954+=0x1){var _0x5324ac=_0x403d1f[_0x4da954][_0x2d58('0x76')]('}');if(_0x5324ac[_0x2d58('0x77')]>0x1){_0x354bb8=_0x354bb8['replaceAll']('{'+_0x5324ac[0x0]+'}',this[_0x2d58('0xb')]['getVariable'](_0x5324ac[0x0])['extra']||_0x5324ac[0x0]);}}if(_0x403d1f[_0x2d58('0x77')]===0x1){return _0x354bb8['toString']();}return this[_0x2d58('0x75')](_0x354bb8);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x78')]=function(_0x3632c6,_0x37b516){var _0x4268eb=this['channel'][_0x2d58('0x79')](_0x3632c6);if(_0x4268eb[_0x2d58('0x7a')]===-0x1){return _0x4268eb;}logger['info'](util[_0x2d58('0x24')]('The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s',_0x37b516,_0x4268eb[_0x2d58('0x7b')]));return this[_0x2d58('0xb')][_0x2d58('0x7c')](_0x37b516,_0x4268eb[_0x2d58('0x7b')]);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x61')]=function(_0x15e038){return _0x15e038&&_0x15e038!=='0'&&_0x15e038!=='-1'&&_0x15e038!=='';};AGIVertices[_0x2d58('0xe')][_0x2d58('0x7d')]=function(_0x4e92a6){this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x4e92a6,'-');_0x4e92a6[_0x2d58('0x7f')]=_0x4e92a6['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices[_0x2d58('0xe')]['agi']=function(_0x4c8749){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x80'),_0x4c8749[_0x2d58('0x81')]));return this['channel'][_0x2d58('0x7')]([_0x4c8749[_0x2d58('0x82')],_0x4c8749[_0x2d58('0x83')]]);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x84')]=function(_0x5e3f78){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x85'),_0x5e3f78[_0x2d58('0x81')]));if(this[_0x2d58('0x61')](_0x5e3f78[_0x2d58('0x86')])){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x87'),_0x5e3f78[_0x2d58('0x86')]));var _0x47d32c=this[_0x2d58('0xb')]['wait'](_0x5e3f78[_0x2d58('0x86')]);if(_0x47d32c[_0x2d58('0x7a')]===-0x1){return _0x47d32c;}}return this[_0x2d58('0xb')][_0x2d58('0x84')]();};AGIVertices['prototype'][_0x2d58('0x45')]=function(_0x1a3a77){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x88'),_0x1a3a77[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x1a3a77[_0x2d58('0x44')])){return this['channel'][_0x2d58('0x28')](_0x1a3a77,_0x2d58('0x89'));}_0x1a3a77[_0x2d58('0x47')]=moment();if(this[_0x2d58('0x61')](_0x1a3a77['delay'])){_0x1a3a77[_0x2d58('0x47')]=moment()[_0x2d58('0x8a')](_0x1a3a77['delay'],_0x2d58('0x8b'));}if(!this[_0x2d58('0x61')](_0x1a3a77['callback_priority'])){_0x1a3a77[_0x2d58('0x8c')]=0x2;}this[_0x2d58('0x3e')][_0x2d58('0x7e')](this,_0x1a3a77);return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x8e'),_0x1a3a77[_0x2d58('0x43')],_0x1a3a77['list_id'],_0x1a3a77['scheduledAt']));};AGIVertices['prototype'][_0x2d58('0x8f')]=function(_0x1fa73c){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x90'),_0x1fa73c[_0x2d58('0x81')]));var _0x4087cb=this['channel'][_0x2d58('0x52')](_0x1fa73c[_0x2d58('0x91')],_0x1fa73c[_0x2d58('0x92')]);if(_0x4087cb['result']===-0x1){return _0x4087cb;}return this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format'](_0x2d58('0x93'),_0x1fa73c[_0x2d58('0x91')],_0x1fa73c['options']));};AGIVertices['prototype']['lumenvoxtts']=function(_0x2ac815){logger['info'](util[_0x2d58('0x24')]('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x2ac815[_0x2d58('0x81')]));if(!this['isConfigured'](_0x2ac815[_0x2d58('0x55')])){return this[_0x2d58('0xb')]['noop'](_0x2d58('0x94'));}var _0x240084='\x22'+_0x2ac815[_0x2d58('0x55')]+'\x22';if(this[_0x2d58('0x61')](_0x2ac815[_0x2d58('0x92')])){_0x240084+=','+_0x2ac815[_0x2d58('0x92')];}var _0x4fb3e5=this[_0x2d58('0xb')][_0x2d58('0x52')]('MRCPSynth',_0x240084);if(_0x4fb3e5[_0x2d58('0x7a')]===-0x1){return _0x4fb3e5;}return this['channel']['noop'](util['format'](_0x2d58('0x95'),_0x240084));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x96')]=function(_0x11b6b1){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x97'),_0x11b6b1[_0x2d58('0x81')]));if(!this['isConfigured'](_0x11b6b1[_0x2d58('0x55')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x94'));}var _0x2f22db='\x22'+_0x11b6b1[_0x2d58('0x55')]+'\x22';if(this[_0x2d58('0x61')](_0x11b6b1['options'])){_0x2f22db+=','+_0x11b6b1[_0x2d58('0x92')];}var _0x1d2e38=this['channel'][_0x2d58('0x52')](_0x2d58('0x98'),_0x2f22db);if(_0x1d2e38[_0x2d58('0x7a')]===-0x1){return _0x1d2e38;}return this[_0x2d58('0xb')]['noop'](util[_0x2d58('0x24')](_0x2d58('0x95'),_0x2f22db));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x99')]=function(_0xc5522){logger['info'](util['format'](_0x2d58('0x9a'),_0xc5522[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0xc5522[_0x2d58('0x9b')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x9c'));}var _0x1a743d=_0xc5522[_0x2d58('0x9b')];if(this[_0x2d58('0x61')](_0xc5522[_0x2d58('0x92')])){_0x1a743d+=','+_0xc5522[_0x2d58('0x92')];}var _0x3fdadc=this[_0x2d58('0xb')][_0x2d58('0x52')]('MRCPRecog',_0x1a743d);if(_0x3fdadc[_0x2d58('0x7a')]===-0x1){return _0x3fdadc;}var _0x46f32c=this[_0x2d58('0x78')](_0x2d58('0x9d'),'LUMENVOX_ASR_CONFIDENCE');if(_0x46f32c[_0x2d58('0x7a')]===-0x1){return _0x46f32c;}var _0x35a088=this['getAndSetVariable'](_0x2d58('0x9e'),_0x2d58('0x9f'));if(_0x35a088[_0x2d58('0x7a')]===-0x1){return _0x35a088;}var _0x551101=this[_0x2d58('0x78')]('RECOG_INSTANCE()',_0x2d58('0xa0'));if(_0x551101[_0x2d58('0x7a')]===-0x1){return _0x551101;}return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xa1'),_0x1a743d));};AGIVertices[_0x2d58('0xe')][_0x2d58('0xa2')]=function(_0xda9ef2){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0xa3'),_0xda9ef2[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0xda9ef2[_0x2d58('0x9b')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x9c'));}var _0x47085d=_0xda9ef2[_0x2d58('0x9b')];if(this[_0x2d58('0x61')](_0xda9ef2['options'])){_0x47085d+=','+_0xda9ef2[_0x2d58('0x92')];}var _0x378a71=this[_0x2d58('0xb')][_0x2d58('0x52')](_0x2d58('0xa4'),_0x47085d);if(_0x378a71[_0x2d58('0x7a')]===-0x1){return _0x378a71;}var _0x36686a=this[_0x2d58('0x78')](_0x2d58('0x9d'),_0x2d58('0xa5'));if(_0x36686a['result']===-0x1){return _0x36686a;}var _0x2cd5a6=this[_0x2d58('0x78')](_0x2d58('0x9e'),'SESTEK_ASR_TRANSCRIPT');if(_0x2cd5a6[_0x2d58('0x7a')]===-0x1){return _0x2cd5a6;}var _0x9bc2a6=this['getAndSetVariable'](_0x2d58('0xa6'),_0x2d58('0xa7'));if(_0x9bc2a6[_0x2d58('0x7a')]===-0x1){return _0x9bc2a6;}return this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xa1'),_0x47085d));};AGIVertices[_0x2d58('0xe')][_0x2d58('0xa8')]=function(_0x4594a0){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0xa9'),_0x4594a0[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x4594a0[_0x2d58('0xaa')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4594a0,'no\x20database\x20selected');}var _0x23516d=this[_0x2d58('0x16')][_0x2d58('0x7e')](this,_0x4594a0[_0x2d58('0xaa')]);if(!_0x23516d){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4594a0,'no\x20odbc\x20database\x20found');}if(!this[_0x2d58('0x61')](_0x4594a0[_0x2d58('0x2c')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4594a0,_0x2d58('0xab'));}var _0x42fd9a=_0x4594a0[_0x2d58('0x2c')][_0x2d58('0xac')](/(\r\n|\n|\r)/gm,'\x20');this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('query:\x20%s',_0x42fd9a));var _0xdabf0b=this[_0x2d58('0x26')]['sync'](this,_0x23516d,_0x42fd9a);this[_0x2d58('0x33')]['sync'](this,_0x4594a0,_0x42fd9a);if(!this['isConfigured'](_0x4594a0[_0x2d58('0xad')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0xa2795d=this[_0x2d58('0x79')][_0x2d58('0x7e')](this,_0x4594a0[_0x2d58('0xad')]);if(!_0xa2795d){return this['channel'][_0x2d58('0x28')](_0x4594a0,_0x2d58('0xae'));}var _0xb42298=this;_0xdabf0b[_0x2d58('0xaf')](function(_0x427088,_0x139561){Object[_0x2d58('0xb0')](_0x427088)[_0x2d58('0xaf')](function(_0x121e99){_0xb42298[_0x2d58('0xb')]['setVariable'](util['format'](_0x2d58('0xb1'),_0xa2795d,_0x139561,_0x121e99),_0x427088[_0x121e99]);});});this[_0x2d58('0xb')][_0x2d58('0x7c')](util[_0x2d58('0x24')]('%s_ROWS_COUNT',_0xa2795d),_0xdabf0b[_0x2d58('0x77')]);return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xb2'),_0xa2795d));};AGIVertices[_0x2d58('0xe')]['dial']=function(_0x107e6d){logger[_0x2d58('0xb3')](util[_0x2d58('0x24')]('Enter\x20in\x20DIAL\x20(%s)\x20block',_0x107e6d[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x107e6d[_0x2d58('0xb4')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x107e6d,_0x2d58('0xb5'));}var _0x1d4923=this[_0x2d58('0x19')][_0x2d58('0x7e')](this,_0x107e6d[_0x2d58('0xb4')]);if(!_0x1d4923){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x107e6d,_0x2d58('0xb6'));}var _0x45ef79=this[_0x2d58('0xb')]['exec']('DIAL',[util['format'](_0x2d58('0xb7'),_0x1d4923),_0x107e6d[_0x2d58('0x86')],_0x107e6d[_0x2d58('0xb8')],_0x107e6d[_0x2d58('0xb9')]]);if(_0x45ef79[_0x2d58('0x7a')]===-0x1){return _0x45ef79;}return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xba'),_0x2d58('0xbb')));};AGIVertices['prototype']['dialogflow']=function(_0x420949){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x420949[_0x2d58('0x81')]));if(!this['isConfigured'](_0x420949[_0x2d58('0x58')])){return this['channel'][_0x2d58('0x8d')](_0x2d58('0xbc'));}if(!this[_0x2d58('0x61')](_0x420949['text'])){return this['channel'][_0x2d58('0x8d')](_0x2d58('0x94'));}this[_0x2d58('0xb')]['bot']=!![];this[_0x2d58('0x33')](_0x420949);this[_0x2d58('0x3d')](_0x420949[_0x2d58('0x55')],'in');this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xbd'),_0x420949[_0x2d58('0x55')]));var _0x4872b2=this[_0x2d58('0x57')][_0x2d58('0x7e')](this,_0x420949);if(_0x4872b2){for(var _0x35120f in _0x4872b2){if(_0x4872b2['hasOwnProperty'](_0x35120f)){this['channel'][_0x2d58('0x7c')](util[_0x2d58('0x24')](_0x2d58('0xbe'),_0x35120f[_0x2d58('0xbf')]()),_0x4872b2[_0x35120f]);}}this['createSquareMessage'](_0x4872b2[_0x2d58('0xc0')],_0x2d58('0xc1'));return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('Dialogflow\x20Result\x20%s',_0x4872b2[_0x2d58('0xc0')]));}return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x420949,'Dialogflow\x20is\x20unreachable');};AGIVertices[_0x2d58('0xe')][_0x2d58('0xc2')]=function(_0x42ef39){logger['info'](util[_0x2d58('0x24')]('Enter\x20in\x20SESTEKNDA\x20(%s)\x20block',_0x42ef39[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x42ef39[_0x2d58('0xc3')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')]('no\x20ndauth\x20url\x20configured');}if(!this[_0x2d58('0x61')](_0x42ef39[_0x2d58('0xc4')])){return this['channel'][_0x2d58('0x8d')](_0x2d58('0xc5'));}if(!this['isConfigured'](_0x42ef39['password'])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0xc6'));}if(!this[_0x2d58('0x61')](_0x42ef39[_0x2d58('0xc7')])){return this['channel']['noop'](_0x2d58('0x94'));}this[_0x2d58('0xb')][_0x2d58('0xc8')]=!![];this[_0x2d58('0x33')](_0x42ef39);this['createSquareMessage'](_0x42ef39[_0x2d58('0x55')],'in');this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xc9'),_0x42ef39[_0x2d58('0x55')]));var _0x2dae3c=this[_0x2d58('0x5a')]['sync'](this,_0x42ef39);if(_0x2dae3c){for(var _0x2745ef in _0x2dae3c){if(_0x2dae3c[_0x2d58('0xca')](_0x2745ef)){this['channel'][_0x2d58('0x7c')](util[_0x2d58('0x24')](_0x2d58('0xcb'),_0x2745ef[_0x2d58('0xbf')]()),_0x2dae3c[_0x2745ef]);}}this['createSquareMessage'](_0x2dae3c[_0x2d58('0xc0')],_0x2d58('0xc1'));if(_0x2dae3c[_0x2d58('0xcc')]){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xcd'),_0x2dae3c['audiofile']));var _0x34fccd=this['channel']['streamFile'](_0x2dae3c[_0x2d58('0xcc')]);try{fs[_0x2d58('0xce')](_0x2dae3c[_0x2d58('0xcc')]+'.wav');}catch(_0x558b1f){logger['error'](_0x558b1f);}return _0x34fccd;}else{return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xcf'),_0x2dae3c[_0x2d58('0xc0')]));}}return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x42ef39,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0x2d58('0xe')][_0x2d58('0xd0')]=function(_0x58ef8f){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0xd1'),_0x58ef8f[_0x2d58('0x81')]));return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0xd0'));};AGIVertices[_0x2d58('0xe')][_0x2d58('0xd2')]=function(_0x4562ef){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block',_0x4562ef[_0x2d58('0x81')]));var _0x2429bc='';if(_0x4562ef[_0x2d58('0xd3')]){if(!this[_0x2d58('0x61')](_0x4562ef[_0x2d58('0xd3')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4562ef,_0x2d58('0xd4'));}else{var _0x309fea=parseInt(_0x4562ef['trunk_id'],0xa);if(isNaN(_0x309fea)){_0x2429bc=_0x4562ef[_0x2d58('0xd3')];}else{_0x2429bc=this[_0x2d58('0x1b')][_0x2d58('0x7e')](this,_0x4562ef['trunk_id']);if(!_0x2429bc){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4562ef,'no\x20trunk\x20found');}}}}else if(_0x4562ef[_0x2d58('0xd5')]){_0x2429bc=_0x4562ef['trunk_name'];}else{return this['channel'][_0x2d58('0x28')](_0x4562ef,_0x2d58('0xd4'));}var _0x18f587=this[_0x2d58('0xb')][_0x2d58('0x52')](_0x2d58('0xbb'),[util[_0x2d58('0x24')](_0x2d58('0xd6'),_0x2429bc,_0x4562ef[_0x2d58('0x43')]),_0x4562ef['timeout'],_0x4562ef[_0x2d58('0xb8')],_0x4562ef[_0x2d58('0xb9')]]);if(_0x18f587['result']===-0x1){return _0x18f587;}return this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xba'),'DIAL'));};AGIVertices['prototype']['finally']=function(_0x151492){logger['info'](util[_0x2d58('0x24')]('Enter\x20in\x20FINALLY\x20(%s)\x20block',_0x151492[_0x2d58('0x81')]));return this[_0x2d58('0xb')][_0x2d58('0x8d')]('finally');};AGIVertices['prototype'][_0x2d58('0xd7')]=function(_0x458d03){logger['info'](util[_0x2d58('0x24')](_0x2d58('0xd8'),_0x458d03[_0x2d58('0x81')]));if(_0x458d03[_0x2d58('0x7f')]===0x0){return this[_0x2d58('0x7d')](_0x458d03);}_0x458d03[_0x2d58('0x7f')]-=0x1;if(!this[_0x2d58('0x61')](_0x458d03['file_id'])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x458d03,_0x2d58('0xd9'));}var _0x4b6fec=this[_0x2d58('0x1d')][_0x2d58('0x7e')](this,_0x458d03['file_id']);if(!_0x4b6fec){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x458d03,_0x2d58('0xda'));}if(!this[_0x2d58('0x61')](_0x458d03['variable_id'])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x2d58('0xdb'));}var _0x8b210=this[_0x2d58('0xb')][_0x2d58('0xdc')](_0x4b6fec,_0x458d03[_0x2d58('0xdd')],_0x458d03[_0x2d58('0xde')]);var _0x4e0680=_0x8b210[_0x2d58('0x7a')]?_0x8b210[_0x2d58('0x7a')][_0x2d58('0x48')]():'';logger['info'](_0x2d58('0xdf'),JSON['stringify'](_0x8b210));if(_0x8b210[_0x2d58('0x7a')]===-0x1){this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x458d03,_0x4e0680);return _0x8b210;}else if(_0x8b210[_0x2d58('0x7b')]===_0x2d58('0x86')){_0x8b210[_0x2d58('0x7a')]=_0x4e0680[_0x2d58('0x77')]>=parseInt(_0x458d03[_0x2d58('0xe0')])?'x':'i';}else{_0x8b210[_0x2d58('0x7a')]=_0x4e0680['length']>=parseInt(_0x458d03[_0x2d58('0xe0')])&&_0x4e0680[_0x2d58('0x77')]<=parseInt(_0x458d03[_0x2d58('0xde')])?'x':'i';}var _0x39ed51=this['getVariable'][_0x2d58('0x7e')](this,_0x458d03[_0x2d58('0xad')]);if(!_0x39ed51){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x458d03,_0x2d58('0xae'));}this[_0x2d58('0xb')][_0x2d58('0x7c')](_0x39ed51,_0x4e0680);if(this[_0x2d58('0x61')](_0x458d03[_0x2d58('0xe1')])){var _0x2df751=parseInt(_0x458d03[_0x2d58('0xe1')],0xa);var _0x249d77=rs['generate']({'charset':'*','length':_0x2df751});var _0x3bffaf=_0x4e0680[_0x2d58('0x77')];if(_0x3bffaf>0x0){if(_0x3bffaf>_0x2df751){this[_0x2d58('0x33')]['sync'](this,_0x458d03,_0x458d03[_0x2d58('0xe2')]==='first'?_0x249d77+_0x4e0680[_0x2d58('0xe3')](_0x2df751):_0x4e0680['substr'](0x0,_0x3bffaf-_0x2df751)+_0x249d77);}else{this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x458d03,rs[_0x2d58('0xe4')]({'charset':'*','length':_0x3bffaf}));}}else{this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x458d03,'');}}else{this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x458d03,_0x4e0680);}return _0x8b210;};AGIVertices[_0x2d58('0xe')][_0x2d58('0xa')]=function(_0x3c1833){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0xe5'),_0x3c1833[_0x2d58('0x81')]));return this['getdigits'](_0x3c1833);};AGIVertices[_0x2d58('0xe')][_0x2d58('0xe6')]=function(_0x2884e3){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0xe7'),_0x2884e3[_0x2d58('0x81')]));this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x2884e3,_0x2884e3[_0x2d58('0xe8')]);return this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format'](_0x2d58('0xe9'),_0x2884e3[_0x2d58('0xe8')]));};AGIVertices['prototype'][_0x2d58('0xea')]=function(_0x2dd1bc){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0xeb'),_0x2dd1bc[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x2dd1bc[_0x2d58('0x64')])||!this[_0x2d58('0x61')](_0x2dd1bc[_0x2d58('0x6a')])){return this['channel'][_0x2d58('0x8d')]('no\x20valid\x20credentials\x20configured');}if(!this[_0x2d58('0x61')](_0x2dd1bc[_0x2d58('0x55')])){return this['channel'][_0x2d58('0x8d')](_0x2d58('0x94'));}this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xec'),_0x2dd1bc['text']));var _0x26083a=this['awsPolly'][_0x2d58('0x7e')](this,_0x2dd1bc);if(_0x26083a){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xed'),_0x26083a));var _0x48dcbd=this[_0x2d58('0xb')][_0x2d58('0xee')](_0x26083a);try{fs['unlink'](_0x26083a+_0x2d58('0xef'));}catch(_0x4ab92e){logger[_0x2d58('0x28')](_0x4ab92e);}return _0x48dcbd;}return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x2dd1bc,_0x2d58('0xf0'));};AGIVertices[_0x2d58('0xe')][_0x2d58('0xf1')]=function(_0xce87a5){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0xf2'),_0xce87a5[_0x2d58('0x81')]));if(!this['isConfigured'](_0xce87a5[_0x2d58('0x64')])||!this[_0x2d58('0x61')](_0xce87a5[_0x2d58('0x6a')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0xf3'));}if(!this[_0x2d58('0x61')](_0xce87a5['aws_bot_name'])){return this['channel'][_0x2d58('0x8d')](_0x2d58('0xf4'));}if(!this[_0x2d58('0x61')](_0xce87a5['text'])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x94'));}this[_0x2d58('0xb')][_0x2d58('0xc8')]=!![];this[_0x2d58('0x33')](_0xce87a5);this['createSquareMessage'](_0xce87a5[_0x2d58('0x55')],'in');this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0xf5'),_0xce87a5[_0x2d58('0x55')]));var _0x4e0ab8=this[_0x2d58('0x69')][_0x2d58('0x7e')](this,_0xce87a5);if(_0x4e0ab8){for(var _0x21178e in _0x4e0ab8){if(_0x4e0ab8[_0x2d58('0xca')](_0x21178e)&&_[_0x2d58('0x74')](_0x4e0ab8[_0x21178e])){this[_0x2d58('0xb')][_0x2d58('0x7c')](util[_0x2d58('0x24')]('AWS_LEX_%s',_0x21178e[_0x2d58('0xbf')]()),_0x4e0ab8[_0x21178e]);}}if(_[_0x2d58('0x40')](_0x4e0ab8[_0x2d58('0xf6')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')]('Amazon\x20Lex\x20ready\x20for\x20fulfillment');}else{this[_0x2d58('0x3d')](_0x4e0ab8[_0x2d58('0xf6')],_0x2d58('0xc1'));return this[_0x2d58('0xb')]['noop'](util[_0x2d58('0x24')]('Amazon\x20Lex\x20Result\x20%s',_0x4e0ab8[_0x2d58('0xf6')]));}}return this[_0x2d58('0xb')][_0x2d58('0x28')](_0xce87a5,'Amazon\x20Lex\x20is\x20unreachable');};AGIVertices[_0x2d58('0xe')][_0x2d58('0xf7')]=function(_0x2f15b6){logger['info'](util[_0x2d58('0x24')](_0x2d58('0xf8'),_0x2f15b6[_0x2d58('0x81')],_0x2f15b6[_0x2d58('0x86')]));if(!this[_0x2d58('0x61')](_0x2f15b6[_0x2d58('0x58')])){return this['channel'][_0x2d58('0x8d')]('no\x20key\x20configured');}var _0x36e3aa='wav';var _0x2b9be2=util[_0x2d58('0x24')]('%s/recordings/%s',FILES_PATH,rs[_0x2d58('0xe4')](0x4));var _0x25d1b9=util['format']('%s.%s',_0x2b9be2,_0x36e3aa);var _0x1232fc=!![];if(_0x2f15b6[_0x2d58('0xf9')]==='NOBEEP'){_0x1232fc=![];}var _0xd21038=this[_0x2d58('0xb')][_0x2d58('0xfa')](_0x2b9be2,_0x36e3aa,_0x2f15b6[_0x2d58('0xfb')],_0x2f15b6[_0x2d58('0x86')],undefined,_0x1232fc);if(_0xd21038[_0x2d58('0x7a')]!==-0x1){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('google\x20%s\x20file\x20created',_0x25d1b9));var _0x5e2e1d=this['googleASR']['sync'](this,_0x2f15b6,_0x25d1b9);if(_0x5e2e1d){for(var _0x33bfea in _0x5e2e1d){if(_0x5e2e1d[_0x2d58('0xca')](_0x33bfea)){this['channel']['setVariable'](util[_0x2d58('0x24')](_0x2d58('0xfc'),_0x33bfea[_0x2d58('0xbf')]()),_0x5e2e1d[_0x33bfea]);}}return this[_0x2d58('0xb')]['noop'](util[_0x2d58('0x24')](_0x2d58('0xfd'),JSON[_0x2d58('0xfe')](_0x5e2e1d)));}}return _0xd21038;};AGIVertices[_0x2d58('0xe')][_0x2d58('0xff')]=function(_0x4d691e){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20TILDEASR\x20(%s)\x20block',_0x4d691e['label']));if(!this['isConfigured'](_0x4d691e[_0x2d58('0x6f')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x100'));}if(!this[_0x2d58('0x61')](_0x4d691e[_0x2d58('0x70')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')]('no\x20appsecret\x20configured');}var _0x48991e=_0x2d58('0x101');var _0x41ddee=util[_0x2d58('0x24')](_0x2d58('0x102'),FILES_PATH,rs[_0x2d58('0xe4')](0x4));var _0x25947f=util['format'](_0x2d58('0x103'),_0x41ddee,_0x48991e);var _0x2f95f0=!![];if(_0x4d691e[_0x2d58('0xf9')]===_0x2d58('0x104')){_0x2f95f0=![];}var _0x40efe0=this[_0x2d58('0xb')][_0x2d58('0xfa')](_0x41ddee,_0x48991e,_0x4d691e[_0x2d58('0xfb')],_0x4d691e['timeout'],undefined,_0x2f95f0);if(_0x40efe0[_0x2d58('0x7a')]!==-0x1){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x105'),_0x25947f));var _0xe0ac5d=this[_0x2d58('0x6e')][_0x2d58('0x7e')](this,_0x4d691e,_0x25947f);if(_0xe0ac5d){for(var _0x51415b in _0xe0ac5d){if(_0xe0ac5d['hasOwnProperty'](_0x51415b)){this['channel'][_0x2d58('0x7c')](util[_0x2d58('0x24')](_0x2d58('0x106'),_0x51415b[_0x2d58('0xbf')]()),_0xe0ac5d[_0x51415b]);}}return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x107'),JSON[_0x2d58('0xfe')](_0xe0ac5d)));}}return _0x40efe0;};AGIVertices['prototype']['gotoc']=function(_0x46e420){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x108'),_0x46e420[_0x2d58('0x81')]));return this[_0x2d58('0xb')][_0x2d58('0x109')](_0x46e420[_0x2d58('0x10a')],_0x46e420[_0x2d58('0x38')],_0x46e420[_0x2d58('0x39')]);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x10b')]=function(_0x451c3c){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x451c3c['label']));if(!this[_0x2d58('0x61')](_0x451c3c[_0x2d58('0x10c')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x451c3c,_0x2d58('0x10d'));}try{var _0xd0dfb3=eval(_0x451c3c[_0x2d58('0x10c')])?_0x2d58('0x10e'):_0x2d58('0x10f');this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x110'),_0x451c3c[_0x2d58('0x10c')],_0xd0dfb3));return{'code':0xc8,'result':_0xd0dfb3};}catch(_0x3aec1a){return{'code':0xc8,'result':_0x2d58('0x10f')};}};AGIVertices[_0x2d58('0xe')][_0x2d58('0x111')]=function(_0x1cbd60){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x112'),_0x1cbd60[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x1cbd60[_0x2d58('0x113')])){return this['channel'][_0x2d58('0x28')](_0x1cbd60,_0x2d58('0x114'));}var _0x5a3fae=this[_0x2d58('0x115')]['sync'](this,_0x1cbd60[_0x2d58('0x113')]);if(!_0x5a3fae){return this[_0x2d58('0xb')]['error'](_0x1cbd60,_0x2d58('0x116'));}for(var _0x2786d2=0x0;_0x2786d2<_0x5a3fae[_0x2d58('0x77')];_0x2786d2+=0x1){var _0x349692=this[_0x2d58('0xb')][_0x2d58('0x79')](util[_0x2d58('0x24')]('IFTIME(%s?true:false)',_0x5a3fae[_0x2786d2]));if(_0x349692[_0x2d58('0x7a')]===-0x1){return _0x349692;}logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x117'),_0x5a3fae[_0x2786d2],_0x349692[_0x2d58('0x7b')]));if(_0x349692[_0x2d58('0x7b')]===_0x2d58('0x10e')){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x117'),_0x5a3fae[_0x2786d2],'true'));this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format']('IFTIME\x20%s\x20%s',_0x5a3fae[_0x2786d2],_0x2d58('0x10e')));return{'code':0xc8,'result':'true'};}else{logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x117'),_0x5a3fae[_0x2786d2],_0x2d58('0x10f')));this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('IFTIME\x20%s\x20%s',_0x5a3fae[_0x2786d2],_0x2d58('0x10f')));}}return{'code':0xc8,'result':'false'};};AGIVertices[_0x2d58('0xe')]['hangup']=function(_0x4736ba){logger['info'](util['format'](_0x2d58('0x118'),_0x4736ba[_0x2d58('0x81')]));return this['channel']['hangup']();};AGIVertices[_0x2d58('0xe')][_0x2d58('0x119')]=function(_0x379c59){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x11a'),_0x379c59['label']));if(!this[_0x2d58('0x61')](_0x379c59[_0x2d58('0x58')])){return this['channel'][_0x2d58('0x8d')]('no\x20key\x20configured');}var _0x1672f3=_0x2d58('0x101');var _0x8059ea=util['format']('%s/recordings/%s',FILES_PATH,rs[_0x2d58('0xe4')](0x4));var _0x3e0e05=util[_0x2d58('0x24')](_0x2d58('0x103'),_0x8059ea,_0x1672f3);var _0x10e04f=!![];if(_0x379c59[_0x2d58('0xf9')]===_0x2d58('0x104')){_0x10e04f=![];}var _0x4af569=this[_0x2d58('0xb')]['recordFile'](_0x8059ea,_0x1672f3,_0x379c59[_0x2d58('0xfb')],_0x379c59['timeout'],undefined,_0x10e04f);if(_0x4af569[_0x2d58('0x7a')]!==-0x1){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x11b'),_0x3e0e05));var _0x5dbd37=this['ispeechASR'][_0x2d58('0x7e')](this,_0x379c59,_0x3e0e05);if(_0x5dbd37){for(var _0x3a2324 in _0x5dbd37){if(_0x5dbd37[_0x2d58('0xca')](_0x3a2324)){this[_0x2d58('0xb')]['setVariable'](util[_0x2d58('0x24')](_0x2d58('0x11c'),_0x3a2324[_0x2d58('0xbf')]()),_0x5dbd37[_0x3a2324]);}}return this['channel']['noop'](util[_0x2d58('0x24')](_0x2d58('0x11d'),JSON['stringify'](_0x5dbd37)));}}return _0x4af569;};AGIVertices[_0x2d58('0xe')][_0x2d58('0x11e')]=function(_0x246898){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block',_0x246898[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x246898[_0x2d58('0x58')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0xbc'));}if(!this[_0x2d58('0x61')](_0x246898[_0x2d58('0x55')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x94'));}this['channel']['noop'](util[_0x2d58('0x24')]('Trying\x20ispeech\x20TTS\x20%s',_0x246898['text']));var _0x2d054d=this[_0x2d58('0x5b')][_0x2d58('0x7e')](this,_0x246898);if(_0x2d054d){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('ispeech\x20%s\x20file\x20created',_0x2d054d));var _0x81bccb=this[_0x2d58('0xb')][_0x2d58('0xee')](_0x2d054d,_0x246898[_0x2d58('0xfb')]);try{fs[_0x2d58('0xce')](_0x2d054d+_0x2d58('0xef'));}catch(_0x38d96a){logger[_0x2d58('0x28')](_0x38d96a);}return _0x81bccb;}return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x246898,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0x2d58('0xe')][_0x2d58('0x11f')]=function(_0x957d4c){logger['info'](util[_0x2d58('0x24')]('Enter\x20in\x20LOGIN\x20(%s)\x20block',_0x957d4c['label']));if(!this['isConfigured'](_0x957d4c[_0x2d58('0x120')])){return this[_0x2d58('0xb')]['error'](_0x957d4c,_0x2d58('0x121'));}logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x2d58('0xb')]['callerid'],_0x957d4c[_0x2d58('0x120')]));var _0x358158=this[_0x2d58('0x50')]['sync'](this,_0x957d4c[_0x2d58('0x120')]);if(_0x358158){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x122'),this['channel'][_0x2d58('0x35')],_0x957d4c['findBy']));this[_0x2d58('0xb')]['noop'](util[_0x2d58('0x24')](_0x2d58('0x122'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x957d4c['findBy']));return{'code':0xc8,'result':_0x2d58('0x123')};}else{logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x124'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x957d4c[_0x2d58('0x120')]));this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x124'),this[_0x2d58('0xb')]['callerid'],_0x957d4c[_0x2d58('0x120')]));return{'code':0xc8,'result':_0x2d58('0x125')};}};AGIVertices['prototype'][_0x2d58('0x126')]=function(_0x12b795){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20LOGOUT\x20(%s)\x20block',_0x12b795[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x12b795[_0x2d58('0x120')])){return this[_0x2d58('0xb')]['error'](_0x12b795,_0x2d58('0x121'));}logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0x2d58('0x35')],_0x12b795[_0x2d58('0x120')]));var _0x21e32e=this[_0x2d58('0x4d')][_0x2d58('0x7e')](this,_0x12b795[_0x2d58('0x120')]);if(_0x21e32e){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x122'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x12b795['findBy']));this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format'](_0x2d58('0x122'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x12b795[_0x2d58('0x120')]));return{'code':0xc8,'result':'success'};}else{logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x124'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x12b795[_0x2d58('0x120')]));this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format'](_0x2d58('0x124'),this[_0x2d58('0xb')]['callerid'],_0x12b795[_0x2d58('0x120')]));return{'code':0xc8,'result':_0x2d58('0x125')};}};AGIVertices[_0x2d58('0xe')][_0x2d58('0x127')]=function(_0x842b5e){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x128'),_0x842b5e[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x842b5e['operation'])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x842b5e,'no\x20operation\x20configured');}this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('math\x20%s',_0x842b5e[_0x2d58('0x129')]));var _0x104ba6=eval(_0x842b5e[_0x2d58('0x129')]);if(!this[_0x2d58('0x61')](_0x842b5e[_0x2d58('0xad')])){return this[_0x2d58('0xb')]['noop'](_0x2d58('0xdb'));}var _0x323389=this[_0x2d58('0x79')][_0x2d58('0x7e')](this,_0x842b5e['variable_id']);if(!_0x323389){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x842b5e,_0x2d58('0xae'));}if(_['isArray'](_0x104ba6)){var _0xf17de8=this;_0x104ba6[_0x2d58('0xaf')](function(_0x59e2ea,_0x51a218){_0xf17de8[_0x2d58('0xb')]['setVariable'](util[_0x2d58('0x24')]('%s[%s]',_0x323389,_0x51a218),_0x59e2ea);});return this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format'](_0x2d58('0x12a'),_0x323389));}else{return this[_0x2d58('0xb')][_0x2d58('0x7c')](_0x323389,_0x104ba6);}};AGIVertices['prototype'][_0x2d58('0x9')]=function(_0x5426f9){logger['info'](util['format'](_0x2d58('0x12b'),_0x5426f9[_0x2d58('0x81')]));if(_0x5426f9[_0x2d58('0x7f')]===0x0){return this[_0x2d58('0x7d')](_0x5426f9);}_0x5426f9['retry']-=0x1;if(!this[_0x2d58('0x61')](_0x5426f9[_0x2d58('0x12c')])){return this[_0x2d58('0xb')]['error'](_0x5426f9,_0x2d58('0xd9'));}var _0x3441b3=this['getSound'][_0x2d58('0x7e')](this,_0x5426f9[_0x2d58('0x12c')]);if(!_0x3441b3){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x5426f9,_0x2d58('0xda'));}var _0x519397=this[_0x2d58('0xb')][_0x2d58('0xdc')](_0x3441b3,_0x5426f9[_0x2d58('0xdd')],_0x5426f9[_0x2d58('0x12d')]);var _0x19ae96=_0x519397[_0x2d58('0x7a')];if(_0x519397[_0x2d58('0x7a')]===-0x1){this['createSquareDetailsReport'][_0x2d58('0x7e')](this,_0x5426f9,'-1');return _0x519397;}else if(_0x519397[_0x2d58('0x7b')]===_0x2d58('0x86')){_0x519397[_0x2d58('0x7a')]=_0x519397['result'][_0x2d58('0x77')]>0x0?_0x519397['result']:'t';}else if(_[_0x2d58('0x3f')](_0x519397[_0x2d58('0x7a')])){_0x519397[_0x2d58('0x7a')]='#';_0x19ae96='#';}if(!this[_0x2d58('0x61')](_0x5426f9[_0x2d58('0xad')])){this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0xdb'));}else{var _0x74e51d=this[_0x2d58('0x79')]['sync'](this,_0x5426f9[_0x2d58('0xad')]);if(!_0x74e51d){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x5426f9,'no\x20variable\x20found');}this[_0x2d58('0xb')]['setVariable'](_0x74e51d,_0x19ae96);}this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x5426f9,_0x19ae96);return _0x519397;};AGIVertices[_0x2d58('0xe')]['noop']=function(_0x978087){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x12e'),_0x978087['label']));return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x978087['output']||_0x978087[_0x2d58('0x81')]);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x12f')]=function(_0x43fb15){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x43fb15[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x43fb15['findBy'])){return this['channel']['error'](_0x43fb15,_0x2d58('0x121'));}logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x130'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x43fb15[_0x2d58('0x120')]));var _0x73782e=this[_0x2d58('0x131')]['sync'](this,_0x43fb15[_0x2d58('0x132')]);var _0x5536b2=this['agentPause'][_0x2d58('0x7e')](this,_0x43fb15[_0x2d58('0x120')],_0x73782e);if(_0x5536b2){logger[_0x2d58('0x2a')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0x2d58('0xb')][_0x2d58('0x35')],_0x43fb15[_0x2d58('0x120')]));this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x122'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x43fb15[_0x2d58('0x120')]));return{'code':0xc8,'result':'success'};}else{logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x124'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x43fb15['findBy']));this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x122'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x43fb15[_0x2d58('0x120')]));return{'code':0xc8,'result':_0x2d58('0x125')};}};AGIVertices[_0x2d58('0xe')]['playback']=function(_0x2e66b3){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x133'),_0x2e66b3[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x2e66b3['file_id'])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x2e66b3,'no\x20file\x20audio\x20selected');}var _0x5ce201=this['getSound']['sync'](this,_0x2e66b3[_0x2d58('0x12c')]);if(!_0x5ce201){return this['channel'][_0x2d58('0x28')](_0x2e66b3,_0x2d58('0xda'));}var _0x34fc22=this[_0x2d58('0xb')]['exec'](_0x2d58('0x134'),[_0x5ce201,_0x2e66b3[_0x2d58('0xb8')]]);if(_0x34fc22[_0x2d58('0x7a')]===-0x1){return _0x34fc22;}return this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x93'),_0x2d58('0x134'),_0x5ce201));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x135')]=function(_0x4fca5c){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x136'),_0x4fca5c['label']));if(!this[_0x2d58('0x61')](_0x4fca5c['queue_id'])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4fca5c,'no\x20queue\x20selected');}var _0x5afc79='';var _0xcbc26f=parseInt(_0x4fca5c[_0x2d58('0x137')],0xa);if(isNaN(_0xcbc26f)){_0x5afc79=_0x4fca5c[_0x2d58('0x137')];}else{_0x5afc79=this[_0x2d58('0x138')][_0x2d58('0x7e')](this,_0x4fca5c['queue_id']);if(!_0x5afc79){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4fca5c,_0x2d58('0x139'));}}var _0x1ffd14='';if(this['isConfigured'](_0x4fca5c[_0x2d58('0x12c')])){var _0x1884fc=this[_0x2d58('0x1d')][_0x2d58('0x7e')](this,_0x4fca5c[_0x2d58('0x12c')]);if(_0x1884fc){_0x1ffd14=_0x1884fc;}}this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x4fca5c,_0x5afc79);if(_0x4fca5c[_0x2d58('0xb8')][_0x2d58('0x13a')]('x')<0x0){_0x4fca5c['opts']+='x';}if(_0x4fca5c[_0x2d58('0xb8')][_0x2d58('0x13a')]('X')<0x0){_0x4fca5c[_0x2d58('0xb8')]+='X';}this[_0x2d58('0xb')][_0x2d58('0x7c')](_0x2d58('0x13b'),_0x5afc79?_0x5afc79[_0x2d58('0x13c')]():'');var _0x173b4f=this[_0x2d58('0xb')][_0x2d58('0x52')]('QUEUE',[_0x5afc79,_0x4fca5c[_0x2d58('0xb8')],_0x4fca5c[_0x2d58('0xb9')],_0x1ffd14,_0x4fca5c[_0x2d58('0x86')],_0x4fca5c[_0x2d58('0x7')],_0x4fca5c['macro'],_0x4fca5c['gosub'],'',_0x4fca5c[_0x2d58('0x13d')]]);if(_0x173b4f[_0x2d58('0x7a')]===-0x1){return _0x173b4f;}return this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')]('Executed\x20command\x20%s\x20%s',_0x2d58('0x13e'),_0x5afc79));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x13f')]=function(_0x56e670){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20RECORD\x20(%s)\x20block',_0x56e670[_0x2d58('0x81')]));var _0x49bfc7=_0x56e670['recordingFormat']||_0x2d58('0x101');var _0x2ee8fc=util[_0x2d58('0x24')](_0x2d58('0x140'),this['channel']['uniqueid'],rs[_0x2d58('0xe4')](0x5));var _0x3aa73e=util[_0x2d58('0x24')]('%s/recordings/%s.%s',FILES_PATH,_0x2ee8fc,_0x49bfc7);var _0x4df3cb=util['format']('%s/recordings/%s',FILES_PATH,_0x2ee8fc);this[_0x2d58('0x36')]['sync'](this,_0x56e670,_0x2ee8fc,_0x3aa73e);this[_0x2d58('0xb')][_0x2d58('0x7c')](_0x2d58('0x141'),_0x2ee8fc);logger[_0x2d58('0x2a')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x4df3cb,_0x49bfc7,_0x56e670[_0x2d58('0x142')],_0x56e670[_0x2d58('0x86')]);return this['channel'][_0x2d58('0xfa')](_0x4df3cb,_0x49bfc7,_0x56e670['escape_digits'],_0x56e670[_0x2d58('0x86')],undefined,!![]);};AGIVertices[_0x2d58('0xe')]['saydigits']=function(_0xc76f4){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x143'),_0xc76f4[_0x2d58('0x81')]));return this[_0x2d58('0xb')][_0x2d58('0x144')](_0xc76f4[_0x2d58('0x145')][_0x2d58('0xac')](/\s+/g,''),_0xc76f4['escape_digits']);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x146')]=function(_0x98e5b8){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x147'),_0x98e5b8[_0x2d58('0x81')]));return this[_0x2d58('0xb')]['sayNumber'](_0x98e5b8[_0x2d58('0x148')][_0x2d58('0xac')](/\s+/g,''),_0x98e5b8['escape_digits']);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x149')]=function(_0x1e6f0e){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x14a'),_0x1e6f0e[_0x2d58('0x81')]));return this[_0x2d58('0xb')]['sayPhonetic'](_0x1e6f0e[_0x2d58('0x55')],_0x1e6f0e[_0x2d58('0x142')]);};AGIVertices['prototype'][_0x2d58('0x14b')]=function(_0x55d4c9){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x14c'),_0x55d4c9[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x55d4c9[_0x2d58('0x14d')])){return this[_0x2d58('0xb')]['noop'](_0x2d58('0x14e'));}var _0x1ca22a=this[_0x2d58('0x1e')]['sync'](this,_0x55d4c9[_0x2d58('0x14d')]);if(!_0x1ca22a||!_0x1ca22a[_0x2d58('0x14f')]){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x55d4c9,'no\x20mail\x20account\x20found');}var _0x232241={'from':util[_0x2d58('0x24')](_0x2d58('0x150'),_0x1ca22a['name'],_0x1ca22a[_0x2d58('0x151')]||_0x1ca22a['Smtp'][_0x2d58('0x152')]),'to':_0x55d4c9['to']||'','cc':_0x55d4c9['cc']||'','bcc':_0x55d4c9['bcc']||'','subject':_0x55d4c9[_0x2d58('0x153')],'html':_0x55d4c9[_0x2d58('0x55')],'text':_0x55d4c9[_0x2d58('0x55')]};var _0x519660={'tls':{'rejectUnauthorized':![]}};if(_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x154')]){_0x519660[_0x2d58('0x154')]=_0x1ca22a['Smtp'][_0x2d58('0x154')];}else{_0x519660[_0x2d58('0x155')]=_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x155')];_0x519660[_0x2d58('0x156')]=_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x156')];_0x519660['secure']=_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x157')];}if(_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x158')]){_0x519660[_0x2d58('0x159')]={'user':_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x152')],'pass':_0x1ca22a[_0x2d58('0x14f')][_0x2d58('0x15a')]};}if(this[_0x2d58('0x61')](_0x55d4c9[_0x2d58('0x15b')])){}logger[_0x2d58('0xb3')](_0x2d58('0x15c'),JSON[_0x2d58('0xfe')](_0x232241));this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x55d4c9,_0x55d4c9['account_id']);this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x15d'),_0x1ca22a['name']));this[_0x2d58('0x20')]['sync'](this,_0x519660,_0x232241);return this[_0x2d58('0xb')][_0x2d58('0x8d')]('Mail\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices[_0x2d58('0xe')]['sendFax']=function(_0xff9f79){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x15e'),_0xff9f79[_0x2d58('0x81')]));return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x15f'));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x160')]=function(_0x4446dd){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x161'),_0x4446dd[_0x2d58('0x81')]));if(!this['isConfigured'](_0x4446dd[_0x2d58('0x162')])){return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x163'));}var _0x1708a8=this['getSmsAccount'][_0x2d58('0x7e')](this,_0x4446dd['sms_account_id']);if(!_0x1708a8){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4446dd,_0x2d58('0x164'));}var _0x4c2b99={'body':_0x4446dd[_0x2d58('0x165')],'phone':_0x4446dd['to']||'','SmsAccountId':_0x1708a8['id']};logger[_0x2d58('0xb3')](_0x2d58('0x166'),JSON[_0x2d58('0xfe')](_0x4c2b99));this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x4446dd,_0x4446dd[_0x2d58('0x162')]);this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')]('Trying\x20SendSMS\x20with\x20account\x20%s',_0x1708a8['name']));this['createSmsMessage'][_0x2d58('0x7e')](this,_0x4c2b99);return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x167'));};AGIVertices[_0x2d58('0xe')]['set']=function(_0x4a1423){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20SET\x20(%s)\x20block',_0x4a1423[_0x2d58('0x81')]));if(!this['isConfigured'](_0x4a1423[_0x2d58('0xad')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x4a1423,_0x2d58('0x168'));}var _0x5b21af=this[_0x2d58('0x79')][_0x2d58('0x7e')](this,_0x4a1423[_0x2d58('0xad')]);if(!_0x5b21af){return this['channel'][_0x2d58('0x28')](_0x4a1423,_0x2d58('0xae'));}return this[_0x2d58('0xb')][_0x2d58('0x7c')](_0x5b21af,_0x4a1423[_0x2d58('0x169')]);};AGIVertices[_0x2d58('0xe')][_0x2d58('0x16a')]=function(_0x26d57b){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x16b'),_0x26d57b[_0x2d58('0x81')]));this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x16c'));if(_0x26d57b[_0x2d58('0x84')]===_0x2d58('0x16d')){this[_0x2d58('0xb')]['noop'](_0x2d58('0x16e'));return this[_0x2d58('0xb')][_0x2d58('0x84')]();}return this[_0x2d58('0xb')][_0x2d58('0x8d')](_0x2d58('0x16f'));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x170')]=function(_0x423878){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x171'),_0x423878['label']));if(!this[_0x2d58('0x61')](_0x423878[_0x2d58('0x172')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x423878,'no\x20subproject\x20selected');}var _0x1ca1de=this['getSquareProject'][_0x2d58('0x7e')](this,_0x423878[_0x2d58('0x172')]);if(!this[_0x2d58('0x61')](_0x1ca1de)){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x423878,util[_0x2d58('0x24')](_0x2d58('0x173'),_0x423878[_0x2d58('0x172')]));}if(_0x1ca1de===this[_0x2d58('0xb')][_0x2d58('0x3b')]){return this['channel'][_0x2d58('0x28')](_0x423878,'project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project');}this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x423878,_0x1ca1de);var _0x2462d5=this[_0x2d58('0xb')]['exec'](_0x2d58('0x174'),util[_0x2d58('0x24')](_0x2d58('0x175'),config[_0x2d58('0x7')][_0x2d58('0x155')]||_0x2d58('0x176'),_0x1ca1de,this['channel'][_0x2d58('0x3b')]));if(_0x2462d5['result']===-0x1){return _0x2462d5;}return this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')]('Executed\x20command\x20%s\x20%s',_0x2d58('0x174'),_0x1ca1de));};AGIVertices[_0x2d58('0xe')]['system']=function(_0x26fcbb){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x177'),_0x26fcbb['label']));var _0x4d1d08=this[_0x2d58('0x51')][_0x2d58('0x7e')](this,_0x26fcbb[_0x2d58('0x82')]);this[_0x2d58('0x33')][_0x2d58('0x7e')](this,_0x26fcbb,_0x26fcbb[_0x2d58('0x82')]);if(this[_0x2d58('0x61')](_0x26fcbb[_0x2d58('0xad')])){var _0x4a4e11=this[_0x2d58('0x79')][_0x2d58('0x7e')](this,_0x26fcbb[_0x2d58('0xad')]);if(_0x4a4e11){this['channel']['setVariable'](_0x4a4e11,_0x4d1d08);return this['channel'][_0x2d58('0x8d')](util['format'](_0x2d58('0x178'),_0x26fcbb['command'],_0x4a4e11));}}return this['channel'][_0x2d58('0x8d')](util['format']('sh\x20command:\x20%s\x20result\x20no\x20stored',_0x26fcbb[_0x2d58('0x82')]));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x179')]=function(_0x361dfb){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x17a'),_0x361dfb[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x361dfb[_0x2d58('0x55')])){return this['channel'][_0x2d58('0x8d')](_0x2d58('0x94'));}this['channel'][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x17b'),_0x361dfb[_0x2d58('0x55')]));var _0x2befb2=this['googleTTS'][_0x2d58('0x7e')](this,_0x361dfb);if(_0x2befb2){this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x17c'),_0x2befb2));var _0xd560f6=this[_0x2d58('0xb')][_0x2d58('0xee')](_0x2befb2);try{fs['unlink'](_0x2befb2+'.wav');}catch(_0x59ee91){logger['error'](_0x59ee91);}return _0xd560f6;}return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x361dfb,_0x2d58('0x17d'));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x17e')]=function(_0x26a63a){logger['info'](util[_0x2d58('0x24')](_0x2d58('0x17f'),_0x26a63a[_0x2d58('0x81')]));if(!this[_0x2d58('0x61')](_0x26a63a[_0x2d58('0x120')])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x26a63a,_0x2d58('0x121'));}logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x130'),this[_0x2d58('0xb')]['callerid'],_0x26a63a[_0x2d58('0x120')]));var _0x5ce44d=this[_0x2d58('0x4c')][_0x2d58('0x7e')](this,_0x26a63a['findBy']);if(_0x5ce44d){logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x122'),this[_0x2d58('0xb')][_0x2d58('0x35')],_0x26a63a[_0x2d58('0x120')]));this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x2d58('0x35')],_0x26a63a[_0x2d58('0x120')]));return{'code':0xc8,'result':_0x2d58('0x123')};}else{logger[_0x2d58('0x2a')](util['format'](_0x2d58('0x124'),this['channel'][_0x2d58('0x35')],_0x26a63a[_0x2d58('0x120')]));this[_0x2d58('0xb')][_0x2d58('0x8d')](util[_0x2d58('0x24')](_0x2d58('0x124'),this['channel'][_0x2d58('0x35')],_0x26a63a[_0x2d58('0x120')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x2d58('0xe')][_0x2d58('0x180')]=function(_0x52d444){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')](_0x2d58('0x181'),_0x52d444['label']));var _0x3a4b4f=this[_0x2d58('0xb')][_0x2d58('0x52')](_0x2d58('0x182'),[_0x52d444[_0x2d58('0x183')],_0x52d444[_0x2d58('0x92')]]);if(_0x3a4b4f[_0x2d58('0x7a')]===-0x1){return _0x3a4b4f;}return this[_0x2d58('0xb')][_0x2d58('0x8d')](util['format'](_0x2d58('0x93'),_0x2d58('0x182'),_0x52d444[_0x2d58('0x183')]));};AGIVertices[_0x2d58('0xe')][_0x2d58('0x184')]=function(_0x2d6dd1){logger[_0x2d58('0x2a')](util[_0x2d58('0x24')]('Enter\x20in\x20SWITCH\x20(%s)\x20block',_0x2d6dd1['label']));if(!this[_0x2d58('0x61')](_0x2d6dd1['variable_id'])){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x2d6dd1,'no\x20variable\x20selected');}var _0x543852=this['getVariable'][_0x2d58('0x7e')](this,_0x2d6dd1[_0x2d58('0xad')]);if(!_0x543852){return this[_0x2d58('0xb')][_0x2d58('0x28')](_0x2d6dd1,_0x2d58('0xae'));}var _0x41e998=this[_0x2d58('0xb')][_0x2d58('0x79')](_0x543852);return{'code':0xc8,'result':_0x41e998[_0x2d58('0x7b')]?_0x41e998[_0x2d58('0x7b')]:'-'};};String[_0x2d58('0xe')][_0x2d58('0x185')]=function(_0x6d6877,_0x632214){return this[_0x2d58('0x76')](_0x6d6877)[_0x2d58('0x186')](_0x632214);};module['exports']=AGIVertices;
\ No newline at end of file
diff --git a/server/services/ami/acw/index.js b/server/services/ami/acw/index.js
index 67317fa..fe1c73e 100644
--- a/server/services/ami/acw/index.js
+++ b/server/services/ami/acw/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7217=['then','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','lastPauseAt','format','YYYY-MM-DD\x20HH:mm:ss','queue','timer','update','uniqueid','[%s][UPDATE][ACWTIME:%s]','catch','[%s][UPDATE][ERRORS:%s]','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','error','finally','[ACW][START]\x20%s','message','stopAcw','saveUnpause','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','stringify','[ACW][STOP]\x20%s','prototype','[ACW][syncAgentConnect]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','linkedid','[%s][HANGUP:LINKEDID]','startAcw','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[ACW][syncHangup]\x20%s','isNil','transfereeuniqueid','secondtransfereruniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','[ACW][syncBlindTransfer]\x20%s','autopause','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','util','moment','../ami','../../../config/logger','acw','../rpc/user','voiceQueues','agents','timers','channels','agentconnect','syncAgentConnect','bind','hanguprequest','syncHangupRequest','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','syncAgentConnectPreview','milliseconds','diff','seconds','interface','ACW','mandatoryDisposition','mandatoryDispositionPause','name','Action','QueuePause','getAgent','info','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause'];(function(_0xb4bbd1,_0x1174b2){var _0x3ba08f=function(_0xf5ba33){while(--_0xf5ba33){_0xb4bbd1['push'](_0xb4bbd1['shift']());}};_0x3ba08f(++_0x1174b2);}(_0x7217,0x19e));var _0x7721=function(_0x1ddedd,_0x485606){_0x1ddedd=_0x1ddedd-0x0;var _0xa3e1ac=_0x7217[_0x1ddedd];return _0xa3e1ac;};'use strict';var util=require(_0x7721('0x0'));var _=require('lodash');var moment=require(_0x7721('0x1'));var ami=require(_0x7721('0x2'));var logger=require(_0x7721('0x3'))(_0x7721('0x4'));var RpcUser=require(_0x7721('0x5'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');function Acw(_0x5bf160){this[_0x7721('0x6')]=_0x5bf160[_0x7721('0x6')];this[_0x7721('0x7')]=_0x5bf160[_0x7721('0x7')];this[_0x7721('0x8')]=_0x5bf160[_0x7721('0x8')];this[_0x7721('0x9')]={};ami['on'](_0x7721('0xa'),this[_0x7721('0xb')][_0x7721('0xc')](this));ami['on'](_0x7721('0xd'),this[_0x7721('0xe')][_0x7721('0xc')](this));ami['on'](_0x7721('0xf'),this[_0x7721('0x10')]['bind'](this));ami['on'](_0x7721('0x11'),this[_0x7721('0x12')][_0x7721('0xc')](this));ami['on'](_0x7721('0x13'),this[_0x7721('0x14')][_0x7721('0xc')](this));ami['on'](_0x7721('0x15'),this[_0x7721('0x16')]['bind'](this));ami['on'](_0x7721('0x17'),this[_0x7721('0x18')]['bind'](this));}function getDiff(_0x109900){var _0x30da54=moment()[_0x7721('0x19')](0x0);var _0x2e9752=moment(_0x109900)['milliseconds'](0x0);return _0x30da54[_0x7721('0x1a')](_0x2e9752,_0x7721('0x1b'));}Acw['prototype']['startAcw']=function(_0x4b183e){try{var _0x5ed54=this;var _0x25a628=this[_0x7721('0x9')][_0x4b183e][_0x7721('0x1c')];var _0x5ed94b=this[_0x7721('0x9')][_0x4b183e]['queue'];var _0x3fc09e=this['voiceQueues'][_0x5ed94b];var _0xfec626=![];var _0x4e96fb=_0x7721('0x1d');if(_0x3fc09e[_0x7721('0x1e')]){if(_0x3fc09e[_0x7721('0x1f')][_0x7721('0x20')]){_0xfec626=!![];_0x4e96fb=_0x3fc09e[_0x7721('0x1f')][_0x7721('0x20')];}}ami[_0x7721('0x21')]({'action':_0x7721('0x22'),'interface':_0x25a628,'paused':!![],'reason':_0x4e96fb})['then'](function(_0x288f7e){if(_0x5ed54[_0x7721('0x7')][_0x25a628]){return RpcUser[_0x7721('0x23')](_0x5ed54[_0x7721('0x7')][_0x25a628]['id'])['then'](function(_0x28f5a6){if(_0x28f5a6&&!_0x28f5a6['voicePause']){logger[_0x7721('0x24')](_0x7721('0x25'),_0x4b183e,_0x25a628,_0x5ed94b);var _0x3e8a4e=_0x5ed54[_0x7721('0x9')][_0x4b183e][_0x7721('0x26')]&&_0x5ed54[_0x7721('0x9')][_0x4b183e][_0x7721('0x27')]?_0x5ed54['channels'][_0x4b183e][_0x7721('0x27')]:_0x4b183e;return RpcUser[_0x7721('0x28')](_0x5ed54[_0x7721('0x7')][_0x25a628],_0x4e96fb,_0x3e8a4e)[_0x7721('0x29')](function(_0x40d550){if(!_0xfec626){_0x5ed54[_0x7721('0x8')][_0x25a628]={};logger[_0x7721('0x24')](_0x7721('0x2a'),_0x4b183e,_0x5ed54[_0x7721('0x6')][_0x5ed94b]['acwTimeout'],_0x25a628,_0x5ed94b);_0x5ed54[_0x7721('0x8')][_0x25a628]['timer']=setTimeout(_0x5ed54['stopAcw'][_0x7721('0xc')](_0x5ed54,_0x25a628),_0x5ed54[_0x7721('0x6')][_0x5ed94b][_0x7721('0x2b')]*0x3e8);_0x5ed54[_0x7721('0x8')][_0x25a628][_0x7721('0x2c')]=moment()[_0x7721('0x2d')](_0x7721('0x2e'));_0x5ed54[_0x7721('0x8')][_0x25a628]['uniqueid']=_0x4b183e;_0x5ed54[_0x7721('0x8')][_0x25a628][_0x7721('0x2f')]=_0x5ed94b;_0x5ed54['timers'][_0x25a628]['updateAcw']=function(){var _0xfde9ec=getDiff(_0x5ed54[_0x7721('0x8')][_0x25a628]['lastPauseAt']);clearTimeout(_0x5ed54[_0x7721('0x8')][_0x25a628][_0x7721('0x30')]);_0x5ed54[_0x7721('0x8')][_0x25a628]['timer']=![];RpcVoiceAgentReport[_0x7721('0x31')]({'acwtime':_0xfde9ec},_0x5ed54[_0x7721('0x8')][_0x25a628][_0x7721('0x32')],_0x25a628)[_0x7721('0x29')](function(_0xc0f3c4){logger['info'](_0x7721('0x33'),_0x4b183e,_0xfde9ec,_0xc0f3c4);})[_0x7721('0x34')](function(_0xb2386d){logger['error'](_0x7721('0x35'),_0x4b183e,_0xb2386d);});delete _0x5ed54[_0x7721('0x8')][_0x25a628];};}});}else{logger['info'](_0x7721('0x36'),_0x4b183e,_0x25a628,_0x5ed94b);}});}})['catch'](function(_0x2d6ba0){logger[_0x7721('0x37')](_0x7721('0x2a'),_0x4b183e,_0x5ed54[_0x7721('0x6')][_0x5ed94b][_0x7721('0x2b')],_0x25a628,_0x5ed94b);})[_0x7721('0x38')](function(){delete _0x5ed54[_0x7721('0x9')][_0x4b183e];});}catch(_0x15545a){logger[_0x7721('0x37')](_0x7721('0x39'),_0x15545a[_0x7721('0x3a')]);}};Acw['prototype'][_0x7721('0x3b')]=function(_0x5e6663){try{var _0x212384=this;if(_0x212384[_0x7721('0x8')][_0x5e6663]){_0x212384[_0x7721('0x8')][_0x5e6663][_0x7721('0x30')]=![];var _0x3968f3=_0x212384[_0x7721('0x8')][_0x5e6663]['uniqueid'];var _0x557c34=_0x212384['timers'][_0x5e6663]['queue'];var _0x18001c=_0x212384[_0x7721('0x6')][_0x557c34][_0x7721('0x2b')];logger[_0x7721('0x24')]('[TIMER][STOP][AGENT:%s]',_0x5e6663);RpcUser[_0x7721('0x3c')](this['agents'][_0x5e6663]);RpcVoiceAgentReport[_0x7721('0x31')]({'acwtime':_0x18001c,'agentacw':!![]},_0x3968f3,_0x5e6663)[_0x7721('0x29')](function(_0x5a278e){logger[_0x7721('0x24')](_0x7721('0x33'),_0x3968f3,_0x18001c,_0x5a278e);})['catch'](function(_0x4d0111){logger[_0x7721('0x37')](_0x7721('0x35'),_0x3968f3,_0x4d0111);});}else{logger[_0x7721('0x37')](_0x7721('0x3d'),_0x5e6663);if(_0x212384['timers']){logger[_0x7721('0x24')](_0x7721('0x3e'),JSON[_0x7721('0x3f')](_0x212384[_0x7721('0x8')]));}}}catch(_0x196051){logger['error'](_0x7721('0x40'),_0x196051['message']);}};Acw[_0x7721('0x41')]['syncAgentConnect']=function(_0x2333b8){try{if(this[_0x7721('0x6')][_0x2333b8[_0x7721('0x2f')]]&&(this['voiceQueues'][_0x2333b8[_0x7721('0x2f')]][_0x7721('0x4')]||this[_0x7721('0x6')][_0x2333b8['queue']][_0x7721('0x1e')])){if(this[_0x7721('0x7')][_0x2333b8[_0x7721('0x1c')]]){this[_0x7721('0x9')][_0x2333b8[_0x7721('0x32')]]={'queue':_0x2333b8[_0x7721('0x2f')],'interface':_0x2333b8[_0x7721('0x1c')],'destlinkedid':_0x2333b8['destlinkedid']};}}}catch(_0x479698){logger[_0x7721('0x37')](_0x7721('0x42'),_0x479698[_0x7721('0x3a')]);}};Acw[_0x7721('0x41')][_0x7721('0x18')]=function(_0x15181b){try{if(this[_0x7721('0x6')][_0x15181b[_0x7721('0x2f')]]&&(this[_0x7721('0x6')][_0x15181b[_0x7721('0x2f')]]['acw']||this['voiceQueues'][_0x15181b[_0x7721('0x2f')]][_0x7721('0x1e')])){if(this[_0x7721('0x7')][_0x15181b[_0x7721('0x1c')]]){this['channels'][_0x15181b[_0x7721('0x32')]]={'queue':_0x15181b[_0x7721('0x2f')],'interface':_0x15181b['interface']};}}}catch(_0x330fac){logger['error'](_0x7721('0x43'),_0x330fac['message']);}};Acw[_0x7721('0x41')][_0x7721('0xe')]=function(_0xf17c40){try{if(this['channels'][_0xf17c40[_0x7721('0x32')]]&&_[_0x7721('0x44')](this['channels'][_0xf17c40[_0x7721('0x32')]][_0x7721('0x26')])){logger[_0x7721('0x24')]('[%s][HANGUP:UNIQUEID]',_0xf17c40[_0x7721('0x32')]);this['startAcw'](_0xf17c40[_0x7721('0x32')]);}else if(this[_0x7721('0x9')][_0xf17c40[_0x7721('0x45')]]&&_[_0x7721('0x44')](this[_0x7721('0x9')][_0xf17c40[_0x7721('0x45')]][_0x7721('0x26')])){logger[_0x7721('0x24')](_0x7721('0x46'),_0xf17c40[_0x7721('0x45')]);this[_0x7721('0x47')](_0xf17c40[_0x7721('0x45')]);}}catch(_0x24b17d){logger[_0x7721('0x37')](_0x7721('0x48'),_0x24b17d['message']);}};Acw[_0x7721('0x41')][_0x7721('0x10')]=function(_0x8e1214){try{if(this[_0x7721('0x9')][_0x8e1214[_0x7721('0x32')]]&&this[_0x7721('0x9')][_0x8e1214[_0x7721('0x32')]]['attended']){logger[_0x7721('0x24')](_0x7721('0x49'),_0x8e1214[_0x7721('0x32')]);this[_0x7721('0x47')](_0x8e1214[_0x7721('0x32')]);}else if(this[_0x7721('0x9')][_0x8e1214[_0x7721('0x45')]]&&this[_0x7721('0x9')][_0x8e1214[_0x7721('0x45')]][_0x7721('0x26')]){logger[_0x7721('0x24')]('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x8e1214[_0x7721('0x45')]);this[_0x7721('0x47')](_0x8e1214[_0x7721('0x45')]);}}catch(_0x2ee3c0){logger[_0x7721('0x37')](_0x7721('0x4a'),_0x2ee3c0[_0x7721('0x3a')]);}};Acw[_0x7721('0x41')][_0x7721('0x14')]=function(_0x287452){try{if(!_[_0x7721('0x4b')](this[_0x7721('0x9')][_0x287452[_0x7721('0x4c')]])){this[_0x7721('0x47')](_0x287452[_0x7721('0x4c')]);if(this['channels'][_0x287452['secondtransfereruniqueid']]){this['channels'][_0x287452[_0x7721('0x4d')]]['attended']=!![];this['channels'][_0x287452['transfertargetuniqueid']]=this['channels'][_0x287452[_0x7721('0x4d')]];delete this[_0x7721('0x9')][_0x287452[_0x7721('0x4d')]];}}else if(!_['isNil'](this[_0x7721('0x9')][_0x287452['transfertargetuniqueid']])){this['startAcw'](_0x287452['transfertargetuniqueid']);if(this[_0x7721('0x9')][_0x287452['origtransfereruniqueid']]){this['channels'][_0x287452['origtransfereruniqueid']][_0x7721('0x26')]=!![];this[_0x7721('0x9')][_0x287452[_0x7721('0x4c')]]=this['channels'][_0x287452[_0x7721('0x4e')]];delete this[_0x7721('0x9')][_0x287452[_0x7721('0x4e')]];}}}catch(_0x168343){logger[_0x7721('0x37')](_0x7721('0x4f'),_0x168343[_0x7721('0x3a')]);}};Acw[_0x7721('0x41')][_0x7721('0x16')]=function(_0x197b73){try{if(this[_0x7721('0x9')][_0x197b73[_0x7721('0x50')]]){logger[_0x7721('0x24')](_0x7721('0x51'),JSON[_0x7721('0x3f')](_0x197b73['transfereruniqueid']));this[_0x7721('0x47')](_0x197b73[_0x7721('0x50')]);}else if(this[_0x7721('0x9')][_0x197b73[_0x7721('0x52')]]){logger['info'](_0x7721('0x53'),JSON[_0x7721('0x3f')](_0x197b73['transfererlinkedid']));this[_0x7721('0x47')](_0x197b73['transfererlinkedid']);}}catch(_0x1f508d){logger[_0x7721('0x37')](_0x7721('0x54'),_0x1f508d[_0x7721('0x3a')]);}};Acw[_0x7721('0x41')][_0x7721('0x12')]=function(_0x3121e0){try{if(this[_0x7721('0x6')][_0x3121e0[_0x7721('0x2f')]]&&this['voiceQueues'][_0x3121e0[_0x7721('0x2f')]][_0x7721('0x55')]===_0x7721('0x56')){if(this[_0x7721('0x7')][_0x3121e0[_0x7721('0x1c')]]){logger[_0x7721('0x24')](_0x7721('0x57'),_0x3121e0['uniqueid'],_0x3121e0[_0x7721('0x1c')],_0x3121e0[_0x7721('0x2f')]);return RpcUser['savePause'](this[_0x7721('0x7')][_0x3121e0['interface']],_0x7721('0x58'),_0x3121e0[_0x7721('0x32')]);}}}catch(_0x4282ba){logger[_0x7721('0x37')](_0x7721('0x59'),_0x4282ba[_0x7721('0x3a')]);}};module[_0x7721('0x5a')]=Acw;
\ No newline at end of file
+var _0xe14d=['agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','syncAgentConnectPreview','milliseconds','diff','seconds','prototype','channels','interface','queue','ACW','mandatoryDisposition','mandatoryDispositionPause','Action','then','getAgent','voicePause','info','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','timer','stopAcw','format','uniqueid','updateAcw','catch','[%s][UPDATE][ERRORS:%s]','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','error','[ACW][START]\x20%s','message','saveUnpause','update','[%s][UPDATE][ACWTIME:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','stringify','[ACW][syncAgentConnect]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','linkedid','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','[ACW][syncHangup]\x20%s','isNil','transfereeuniqueid','startAcw','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[ACW][syncBlindTransfer]\x20%s','autopause','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','util','lodash','moment','../ami','acw','../rpc/user','voiceQueues','agents','timers','agentconnect','syncAgentConnect','bind','hanguprequest','syncHangupRequest','hangup','syncHangup'];(function(_0x497871,_0x43d6b5){var _0x4255fd=function(_0x157fd9){while(--_0x157fd9){_0x497871['push'](_0x497871['shift']());}};_0x4255fd(++_0x43d6b5);}(_0xe14d,0x1ee));var _0xde14=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0xe14d[_0x2d7f0e];return _0x110b07;};'use strict';var util=require(_0xde14('0x0'));var _=require(_0xde14('0x1'));var moment=require(_0xde14('0x2'));var ami=require(_0xde14('0x3'));var logger=require('../../../config/logger')(_0xde14('0x4'));var RpcUser=require(_0xde14('0x5'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');function Acw(_0x1c3e94){this[_0xde14('0x6')]=_0x1c3e94[_0xde14('0x6')];this[_0xde14('0x7')]=_0x1c3e94[_0xde14('0x7')];this[_0xde14('0x8')]=_0x1c3e94['timers'];this['channels']={};ami['on'](_0xde14('0x9'),this[_0xde14('0xa')][_0xde14('0xb')](this));ami['on'](_0xde14('0xc'),this[_0xde14('0xd')][_0xde14('0xb')](this));ami['on'](_0xde14('0xe'),this[_0xde14('0xf')]['bind'](this));ami['on'](_0xde14('0x10'),this[_0xde14('0x11')][_0xde14('0xb')](this));ami['on'](_0xde14('0x12'),this[_0xde14('0x13')][_0xde14('0xb')](this));ami['on'](_0xde14('0x14'),this[_0xde14('0x15')][_0xde14('0xb')](this));ami['on'](_0xde14('0x16'),this[_0xde14('0x17')][_0xde14('0xb')](this));}function getDiff(_0x3521d4){var _0x281c54=moment()[_0xde14('0x18')](0x0);var _0x54c58b=moment(_0x3521d4)['milliseconds'](0x0);return _0x281c54[_0xde14('0x19')](_0x54c58b,_0xde14('0x1a'));}Acw[_0xde14('0x1b')]['startAcw']=function(_0x16aa55){try{var _0x31adb3=this;var _0x257390=this[_0xde14('0x1c')][_0x16aa55][_0xde14('0x1d')];var _0x1b9d4b=this[_0xde14('0x1c')][_0x16aa55][_0xde14('0x1e')];var _0x3cc317=this[_0xde14('0x6')][_0x1b9d4b];var _0x590a8b=![];var _0x3f5fcf=_0xde14('0x1f');if(_0x3cc317[_0xde14('0x20')]){if(_0x3cc317[_0xde14('0x21')]['name']){_0x590a8b=!![];_0x3f5fcf=_0x3cc317[_0xde14('0x21')]['name'];}}ami[_0xde14('0x22')]({'action':'QueuePause','interface':_0x257390,'paused':!![],'reason':_0x3f5fcf})[_0xde14('0x23')](function(_0x30fcf1){if(_0x31adb3[_0xde14('0x7')][_0x257390]){return RpcUser[_0xde14('0x24')](_0x31adb3[_0xde14('0x7')][_0x257390]['id'])[_0xde14('0x23')](function(_0x40b648){if(_0x40b648&&!_0x40b648[_0xde14('0x25')]){logger[_0xde14('0x26')](_0xde14('0x27'),_0x16aa55,_0x257390,_0x1b9d4b);var _0x475f2f=_0x31adb3[_0xde14('0x1c')][_0x16aa55][_0xde14('0x28')]&&_0x31adb3['channels'][_0x16aa55][_0xde14('0x29')]?_0x31adb3[_0xde14('0x1c')][_0x16aa55][_0xde14('0x29')]:_0x16aa55;return RpcUser[_0xde14('0x2a')](_0x31adb3[_0xde14('0x7')][_0x257390],_0x3f5fcf,_0x475f2f)[_0xde14('0x23')](function(_0x310d75){if(!_0x590a8b){_0x31adb3[_0xde14('0x8')][_0x257390]={};logger[_0xde14('0x26')](_0xde14('0x2b'),_0x16aa55,_0x31adb3['voiceQueues'][_0x1b9d4b][_0xde14('0x2c')],_0x257390,_0x1b9d4b);_0x31adb3[_0xde14('0x8')][_0x257390][_0xde14('0x2d')]=setTimeout(_0x31adb3[_0xde14('0x2e')]['bind'](_0x31adb3,_0x257390),_0x31adb3[_0xde14('0x6')][_0x1b9d4b][_0xde14('0x2c')]*0x3e8);_0x31adb3[_0xde14('0x8')][_0x257390]['lastPauseAt']=moment()[_0xde14('0x2f')]('YYYY-MM-DD\x20HH:mm:ss');_0x31adb3[_0xde14('0x8')][_0x257390][_0xde14('0x30')]=_0x16aa55;_0x31adb3[_0xde14('0x8')][_0x257390][_0xde14('0x1e')]=_0x1b9d4b;_0x31adb3[_0xde14('0x8')][_0x257390][_0xde14('0x31')]=function(){var _0xae9dca=getDiff(_0x31adb3[_0xde14('0x8')][_0x257390]['lastPauseAt']);clearTimeout(_0x31adb3[_0xde14('0x8')][_0x257390][_0xde14('0x2d')]);_0x31adb3['timers'][_0x257390][_0xde14('0x2d')]=![];RpcVoiceAgentReport['update']({'acwtime':_0xae9dca},_0x31adb3[_0xde14('0x8')][_0x257390][_0xde14('0x30')],_0x257390)[_0xde14('0x23')](function(_0x21a916){logger[_0xde14('0x26')]('[%s][UPDATE][ACWTIME:%s]',_0x16aa55,_0xae9dca,_0x21a916);})[_0xde14('0x32')](function(_0x57b98b){logger['error'](_0xde14('0x33'),_0x16aa55,_0x57b98b);});delete _0x31adb3[_0xde14('0x8')][_0x257390];};}});}else{logger[_0xde14('0x26')](_0xde14('0x34'),_0x16aa55,_0x257390,_0x1b9d4b);}});}})[_0xde14('0x32')](function(_0xa41c1e){logger[_0xde14('0x35')](_0xde14('0x2b'),_0x16aa55,_0x31adb3[_0xde14('0x6')][_0x1b9d4b]['acwTimeout'],_0x257390,_0x1b9d4b);})['finally'](function(){delete _0x31adb3[_0xde14('0x1c')][_0x16aa55];});}catch(_0x403007){logger[_0xde14('0x35')](_0xde14('0x36'),_0x403007[_0xde14('0x37')]);}};Acw[_0xde14('0x1b')][_0xde14('0x2e')]=function(_0x2b0bc4){try{var _0x2ac7ba=this;if(_0x2ac7ba['timers'][_0x2b0bc4]){_0x2ac7ba[_0xde14('0x8')][_0x2b0bc4]['timer']=![];var _0x4a363c=_0x2ac7ba['timers'][_0x2b0bc4][_0xde14('0x30')];var _0x258759=_0x2ac7ba[_0xde14('0x8')][_0x2b0bc4][_0xde14('0x1e')];var _0x1228d8=_0x2ac7ba[_0xde14('0x6')][_0x258759][_0xde14('0x2c')];logger[_0xde14('0x26')]('[TIMER][STOP][AGENT:%s]',_0x2b0bc4);RpcUser[_0xde14('0x38')](this[_0xde14('0x7')][_0x2b0bc4]);RpcVoiceAgentReport[_0xde14('0x39')]({'acwtime':_0x1228d8,'agentacw':!![]},_0x4a363c,_0x2b0bc4)[_0xde14('0x23')](function(_0x346566){logger[_0xde14('0x26')](_0xde14('0x3a'),_0x4a363c,_0x1228d8,_0x346566);})[_0xde14('0x32')](function(_0x50db0d){logger[_0xde14('0x35')](_0xde14('0x33'),_0x4a363c,_0x50db0d);});}else{logger[_0xde14('0x35')](_0xde14('0x3b'),_0x2b0bc4);if(_0x2ac7ba['timers']){logger['info'](_0xde14('0x3c'),JSON[_0xde14('0x3d')](_0x2ac7ba[_0xde14('0x8')]));}}}catch(_0x171080){logger[_0xde14('0x35')]('[ACW][STOP]\x20%s',_0x171080[_0xde14('0x37')]);}};Acw[_0xde14('0x1b')][_0xde14('0xa')]=function(_0x595fd5){try{if(this[_0xde14('0x6')][_0x595fd5['queue']]&&(this[_0xde14('0x6')][_0x595fd5['queue']][_0xde14('0x4')]||this[_0xde14('0x6')][_0x595fd5[_0xde14('0x1e')]][_0xde14('0x20')])){if(this[_0xde14('0x7')][_0x595fd5[_0xde14('0x1d')]]){this[_0xde14('0x1c')][_0x595fd5[_0xde14('0x30')]]={'queue':_0x595fd5['queue'],'interface':_0x595fd5[_0xde14('0x1d')],'destlinkedid':_0x595fd5['destlinkedid']};}}}catch(_0x430b22){logger['error'](_0xde14('0x3e'),_0x430b22[_0xde14('0x37')]);}};Acw[_0xde14('0x1b')][_0xde14('0x17')]=function(_0x40e7ae){try{if(this[_0xde14('0x6')][_0x40e7ae[_0xde14('0x1e')]]&&(this[_0xde14('0x6')][_0x40e7ae['queue']][_0xde14('0x4')]||this[_0xde14('0x6')][_0x40e7ae[_0xde14('0x1e')]][_0xde14('0x20')])){if(this['agents'][_0x40e7ae[_0xde14('0x1d')]]){this[_0xde14('0x1c')][_0x40e7ae[_0xde14('0x30')]]={'queue':_0x40e7ae[_0xde14('0x1e')],'interface':_0x40e7ae[_0xde14('0x1d')]};}}}catch(_0x19e12c){logger['error'](_0xde14('0x3f'),_0x19e12c['message']);}};Acw[_0xde14('0x1b')][_0xde14('0xd')]=function(_0x48a677){try{if(this[_0xde14('0x1c')][_0x48a677[_0xde14('0x30')]]&&_[_0xde14('0x40')](this[_0xde14('0x1c')][_0x48a677[_0xde14('0x30')]][_0xde14('0x28')])){logger[_0xde14('0x26')]('[%s][HANGUP:UNIQUEID]',_0x48a677[_0xde14('0x30')]);this['startAcw'](_0x48a677[_0xde14('0x30')]);}else if(this[_0xde14('0x1c')][_0x48a677[_0xde14('0x41')]]&&_[_0xde14('0x40')](this[_0xde14('0x1c')][_0x48a677[_0xde14('0x41')]][_0xde14('0x28')])){logger[_0xde14('0x26')](_0xde14('0x42'),_0x48a677[_0xde14('0x41')]);this['startAcw'](_0x48a677[_0xde14('0x41')]);}}catch(_0x1688c6){logger[_0xde14('0x35')](_0xde14('0x43'),_0x1688c6[_0xde14('0x37')]);}};Acw['prototype'][_0xde14('0xf')]=function(_0x4dc2e3){try{if(this[_0xde14('0x1c')][_0x4dc2e3[_0xde14('0x30')]]&&this[_0xde14('0x1c')][_0x4dc2e3[_0xde14('0x30')]][_0xde14('0x28')]){logger['info']('[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]',_0x4dc2e3[_0xde14('0x30')]);this['startAcw'](_0x4dc2e3[_0xde14('0x30')]);}else if(this[_0xde14('0x1c')][_0x4dc2e3[_0xde14('0x41')]]&&this[_0xde14('0x1c')][_0x4dc2e3[_0xde14('0x41')]][_0xde14('0x28')]){logger[_0xde14('0x26')](_0xde14('0x44'),_0x4dc2e3[_0xde14('0x41')]);this['startAcw'](_0x4dc2e3[_0xde14('0x41')]);}}catch(_0x2c972b){logger[_0xde14('0x35')](_0xde14('0x45'),_0x2c972b[_0xde14('0x37')]);}};Acw['prototype'][_0xde14('0x13')]=function(_0x58790d){try{if(!_[_0xde14('0x46')](this[_0xde14('0x1c')][_0x58790d[_0xde14('0x47')]])){this[_0xde14('0x48')](_0x58790d[_0xde14('0x47')]);if(this[_0xde14('0x1c')][_0x58790d[_0xde14('0x49')]]){this[_0xde14('0x1c')][_0x58790d['secondtransfereruniqueid']]['attended']=!![];this['channels'][_0x58790d[_0xde14('0x4a')]]=this['channels'][_0x58790d['secondtransfereruniqueid']];delete this[_0xde14('0x1c')][_0x58790d[_0xde14('0x49')]];}}else if(!_[_0xde14('0x46')](this[_0xde14('0x1c')][_0x58790d[_0xde14('0x4a')]])){this[_0xde14('0x48')](_0x58790d[_0xde14('0x4a')]);if(this[_0xde14('0x1c')][_0x58790d[_0xde14('0x4b')]]){this['channels'][_0x58790d[_0xde14('0x4b')]][_0xde14('0x28')]=!![];this[_0xde14('0x1c')][_0x58790d['transfereeuniqueid']]=this[_0xde14('0x1c')][_0x58790d['origtransfereruniqueid']];delete this[_0xde14('0x1c')][_0x58790d[_0xde14('0x4b')]];}}}catch(_0x40ab83){logger[_0xde14('0x35')](_0xde14('0x4c'),_0x40ab83[_0xde14('0x37')]);}};Acw[_0xde14('0x1b')]['syncBlindTransfer']=function(_0x3a357a){try{if(this[_0xde14('0x1c')][_0x3a357a[_0xde14('0x4d')]]){logger[_0xde14('0x26')](_0xde14('0x4e'),JSON[_0xde14('0x3d')](_0x3a357a[_0xde14('0x4d')]));this['startAcw'](_0x3a357a['transfereruniqueid']);}else if(this[_0xde14('0x1c')][_0x3a357a[_0xde14('0x4f')]]){logger[_0xde14('0x26')]('[%s][BLINDTRANSFER:LINKEDID]',JSON[_0xde14('0x3d')](_0x3a357a[_0xde14('0x4f')]));this[_0xde14('0x48')](_0x3a357a[_0xde14('0x4f')]);}}catch(_0x51e8ca){logger['error'](_0xde14('0x50'),_0x51e8ca[_0xde14('0x37')]);}};Acw[_0xde14('0x1b')][_0xde14('0x11')]=function(_0x136c21){try{if(this[_0xde14('0x6')][_0x136c21[_0xde14('0x1e')]]&&this[_0xde14('0x6')][_0x136c21[_0xde14('0x1e')]][_0xde14('0x51')]===_0xde14('0x52')){if(this[_0xde14('0x7')][_0x136c21[_0xde14('0x1d')]]){logger[_0xde14('0x26')](_0xde14('0x53'),_0x136c21[_0xde14('0x30')],_0x136c21[_0xde14('0x1d')],_0x136c21[_0xde14('0x1e')]);return RpcUser[_0xde14('0x2a')](this[_0xde14('0x7')][_0x136c21[_0xde14('0x1d')]],_0xde14('0x54'),_0x136c21[_0xde14('0x30')]);}}}catch(_0x4809fa){logger[_0xde14('0x35')]('[ACW][syncAgentRingNoAnswer]\x20%s',_0x4809fa[_0xde14('0x37')]);}};module['exports']=Acw;
\ No newline at end of file
diff --git a/server/services/ami/ami.js b/server/services/ami/ami.js
index bfa8234..2dbe5de 100644
--- a/server/services/ami/ami.js
+++ b/server/services/ami/ami.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x856e=['connect','inspect','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','log','exports','asterisk-manager','bluebird','lodash','../../config/logger','ami','../../config/environment','asterisk','port','username','password','keepConnected','promisify','action','error','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','Action','sipshowregistry','actionDeviceStateList','actionSipPeerStatus','sippeerstatus','actionCoreShowChannels','info','once','close'];(function(_0x2fafed,_0x39d302){var _0x4c81c3=function(_0x12cbc3){while(--_0x12cbc3){_0x2fafed['push'](_0x2fafed['shift']());}};_0x4c81c3(++_0x39d302);}(_0x856e,0xfd));var _0xe856=function(_0x1c0991,_0x4f22d2){_0x1c0991=_0x1c0991-0x0;var _0x5034de=_0x856e[_0x1c0991];return _0x5034de;};'use strict';var Manager=require(_0xe856('0x0'));var BPromise=require(_0xe856('0x1'));var moment=require('moment');var util=require('util');var _=require(_0xe856('0x2'));var logger=require(_0xe856('0x3'))(_0xe856('0x4'));var config=require(_0xe856('0x5'));var ami=new Manager(config[_0xe856('0x6')][_0xe856('0x7')],config['asterisk']['ip'],config[_0xe856('0x6')][_0xe856('0x8')],config['asterisk'][_0xe856('0x9')],!![]);ami[_0xe856('0xa')]();ami['Action']=BPromise[_0xe856('0xb')](ami[_0xe856('0xc')]);function error(_0x37f38c){logger[_0xe856('0xd')](util[_0xe856('0xe')](_0xe856('0xf'),config[_0xe856('0x6')][_0xe856('0x8')],config[_0xe856('0x6')]['ip'],config[_0xe856('0x6')][_0xe856('0x7')],util['inspect'](_0x37f38c,![],null)));}function close(){logger[_0xe856('0xd')](util['format'](_0xe856('0x10'),config['asterisk']['username'],config[_0xe856('0x6')]['ip'],config[_0xe856('0x6')][_0xe856('0x7')]));}ami[_0xe856('0x11')]=function(){return function(){return ami[_0xe856('0x12')]({'action':_0xe856('0x13')});};};ami[_0xe856('0x14')]=function(){return function(){return ami['Action']({'action':'devicestatelist'});};};ami[_0xe856('0x15')]=function(){return function(){return ami['Action']({'action':_0xe856('0x16')});};};ami['actionQueueSummary']=function(){return function(){return ami[_0xe856('0x12')]({'action':'queuesummary'});};};ami[_0xe856('0x17')]=function(){return function(){return ami['Action']({'action':'coreshowchannels'});};};function connect(_0x2e1bd3){logger[_0xe856('0x18')](util['format']('Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s',config[_0xe856('0x6')][_0xe856('0x8')],config[_0xe856('0x6')]['ip'],config[_0xe856('0x6')][_0xe856('0x7')]));ami[_0xe856('0x19')]('error',error);ami[_0xe856('0x19')](_0xe856('0x1a'),close);}ami['on'](_0xe856('0x1b'),connect);ami['on']('shutdown',function(_0x4352a3){logger['info'](util['format']('Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s',config['asterisk']['username'],config[_0xe856('0x6')]['ip'],config[_0xe856('0x6')][_0xe856('0x7')],util[_0xe856('0x1c')](_0x4352a3,![],null)));});ami['on'](_0xe856('0x1d'),function(_0x417878){logger['info'](util[_0xe856('0xe')](_0xe856('0x1e'),config[_0xe856('0x6')][_0xe856('0x8')],config['asterisk']['ip'],config[_0xe856('0x6')][_0xe856('0x7')]));return BPromise[_0xe856('0x1f')]()[_0xe856('0x20')](ami['actionSipShowRegistry']())[_0xe856('0x20')](ami[_0xe856('0x14')]())[_0xe856('0x20')](ami[_0xe856('0x15')]())[_0xe856('0x20')](ami['actionQueueSummary']())[_0xe856('0x20')](ami[_0xe856('0x17')]())['catch'](function(_0x52c77e){console[_0xe856('0x21')](_0x52c77e);});});ami['once'](_0xe856('0xd'),error);ami[_0xe856('0x19')](_0xe856('0x1a'),close);module[_0xe856('0x22')]=ami;
\ No newline at end of file
+var _0x4ad8=['info','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','actionSipPeerStatus','catch','log','close','asterisk-manager','moment','util','lodash','../../config/environment','port','asterisk','password','keepConnected','Action','action','error','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','username','inspect','format','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','sipshowregistry','actionDeviceStateList','devicestatelist','sippeerstatus','actionQueueSummary','actionCoreShowChannels','coreshowchannels','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','connect','shutdown'];(function(_0x23eaf2,_0x465cfb){var _0x54efb4=function(_0x5f3727){while(--_0x5f3727){_0x23eaf2['push'](_0x23eaf2['shift']());}};_0x54efb4(++_0x465cfb);}(_0x4ad8,0x1a0));var _0x84ad=function(_0x454ebb,_0x16f1f0){_0x454ebb=_0x454ebb-0x0;var _0xcf5717=_0x4ad8[_0x454ebb];return _0xcf5717;};'use strict';var Manager=require(_0x84ad('0x0'));var BPromise=require('bluebird');var moment=require(_0x84ad('0x1'));var util=require(_0x84ad('0x2'));var _=require(_0x84ad('0x3'));var logger=require('../../config/logger')('ami');var config=require(_0x84ad('0x4'));var ami=new Manager(config['asterisk'][_0x84ad('0x5')],config[_0x84ad('0x6')]['ip'],config[_0x84ad('0x6')]['username'],config[_0x84ad('0x6')][_0x84ad('0x7')],!![]);ami[_0x84ad('0x8')]();ami[_0x84ad('0x9')]=BPromise['promisify'](ami[_0x84ad('0xa')]);function error(_0x3c3ec9){logger[_0x84ad('0xb')](util['format'](_0x84ad('0xc'),config[_0x84ad('0x6')][_0x84ad('0xd')],config[_0x84ad('0x6')]['ip'],config[_0x84ad('0x6')][_0x84ad('0x5')],util[_0x84ad('0xe')](_0x3c3ec9,![],null)));}function close(){logger['error'](util[_0x84ad('0xf')](_0x84ad('0x10'),config[_0x84ad('0x6')][_0x84ad('0xd')],config[_0x84ad('0x6')]['ip'],config[_0x84ad('0x6')][_0x84ad('0x5')]));}ami['actionSipShowRegistry']=function(){return function(){return ami[_0x84ad('0x9')]({'action':_0x84ad('0x11')});};};ami[_0x84ad('0x12')]=function(){return function(){return ami[_0x84ad('0x9')]({'action':_0x84ad('0x13')});};};ami['actionSipPeerStatus']=function(){return function(){return ami[_0x84ad('0x9')]({'action':_0x84ad('0x14')});};};ami[_0x84ad('0x15')]=function(){return function(){return ami[_0x84ad('0x9')]({'action':'queuesummary'});};};ami[_0x84ad('0x16')]=function(){return function(){return ami['Action']({'action':_0x84ad('0x17')});};};function connect(_0x3bd4dc){logger['info'](util[_0x84ad('0xf')](_0x84ad('0x18'),config[_0x84ad('0x6')][_0x84ad('0xd')],config[_0x84ad('0x6')]['ip'],config[_0x84ad('0x6')][_0x84ad('0x5')]));ami[_0x84ad('0x19')](_0x84ad('0xb'),error);ami['once']('close',close);}ami['on'](_0x84ad('0x1a'),connect);ami['on'](_0x84ad('0x1b'),function(_0x2240bc){logger[_0x84ad('0x1c')](util[_0x84ad('0xf')](_0x84ad('0x1d'),config[_0x84ad('0x6')][_0x84ad('0xd')],config[_0x84ad('0x6')]['ip'],config['asterisk'][_0x84ad('0x5')],util[_0x84ad('0xe')](_0x2240bc,![],null)));});ami['on']('fullybooted',function(_0x24d12e){logger['info'](util[_0x84ad('0xf')](_0x84ad('0x1e'),config['asterisk']['username'],config[_0x84ad('0x6')]['ip'],config['asterisk'][_0x84ad('0x5')]));return BPromise[_0x84ad('0x1f')]()[_0x84ad('0x20')](ami['actionSipShowRegistry']())['then'](ami['actionDeviceStateList']())[_0x84ad('0x20')](ami[_0x84ad('0x21')]())[_0x84ad('0x20')](ami[_0x84ad('0x15')]())[_0x84ad('0x20')](ami[_0x84ad('0x16')]())[_0x84ad('0x22')](function(_0x930c47){console[_0x84ad('0x23')](_0x930c47);});});ami[_0x84ad('0x19')](_0x84ad('0xb'),error);ami[_0x84ad('0x19')](_0x84ad('0x24'),close);module['exports']=ami;
\ No newline at end of file
diff --git a/server/services/ami/client.js b/server/services/ami/client.js
index a233002..fda316a 100644
--- a/server/services/ami/client.js
+++ b/server/services/ami/client.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6d57=['http','Request','request','then','debug','rpc','memberReport','error','message','result','jayson/promise','bluebird','../../config/logger','client'];(function(_0x8de54f,_0x271987){var _0x14cba4=function(_0x58ed41){while(--_0x58ed41){_0x8de54f['push'](_0x8de54f['shift']());}};_0x14cba4(++_0x271987);}(_0x6d57,0x6c));var _0x76d5=function(_0x39e152,_0x32a5cd){_0x39e152=_0x39e152-0x0;var _0x2abfeb=_0x6d57[_0x39e152];return _0x2abfeb;};'use strict';var jayson=require(_0x76d5('0x0'));var BPromise=require(_0x76d5('0x1'));var logger=require(_0x76d5('0x2'))('ami');var client=jayson[_0x76d5('0x3')][_0x76d5('0x4')]({'port':0x2329});client[_0x76d5('0x5')]=function(_0x5ab491,_0x4c14e8){return new BPromise(function(_0x1c1be2,_0x1e1676){return client[_0x76d5('0x6')](_0x5ab491,_0x4c14e8)[_0x76d5('0x7')](function(_0x5c4c36){logger[_0x76d5('0x8')](_0x76d5('0x9'),_0x76d5('0xa'),_0x5ab491,_0x4c14e8,_0x5c4c36);if(_0x5c4c36[_0x76d5('0xb')]){logger[_0x76d5('0xb')](_0x76d5('0x9'),_0x76d5('0xa'),_0x5ab491,_0x5c4c36[_0x76d5('0xb')][_0x76d5('0xc')],_0x4c14e8);return _0x1e1676(_0x5c4c36[_0x76d5('0xb')][_0x76d5('0xc')]);}else{return _0x1c1be2(_0x5c4c36[_0x76d5('0xd')]);}})['catch'](function(_0x118d6a){logger[_0x76d5('0xb')]('rpc',_0x76d5('0xa'),_0x5ab491,_0x118d6a,_0x4c14e8);return _0x1e1676(_0x118d6a);});});};module['exports']=client;
\ No newline at end of file
+var _0x6adc=['../../config/logger','ami','client','Request','request','then','rpc','error','message','result','catch','memberReport','exports','jayson/promise'];(function(_0x4dcc2d,_0x422839){var _0x1bbd79=function(_0x173341){while(--_0x173341){_0x4dcc2d['push'](_0x4dcc2d['shift']());}};_0x1bbd79(++_0x422839);}(_0x6adc,0x8b));var _0xc6ad=function(_0x160e1f,_0x1fb425){_0x160e1f=_0x160e1f-0x0;var _0x12f462=_0x6adc[_0x160e1f];return _0x12f462;};'use strict';var jayson=require(_0xc6ad('0x0'));var BPromise=require('bluebird');var logger=require(_0xc6ad('0x1'))(_0xc6ad('0x2'));var client=jayson[_0xc6ad('0x3')]['http']({'port':0x2329});client[_0xc6ad('0x4')]=function(_0x566302,_0x3f44b5){return new BPromise(function(_0x22295b,_0x3906c7){return client[_0xc6ad('0x5')](_0x566302,_0x3f44b5)[_0xc6ad('0x6')](function(_0x3ae751){logger['debug'](_0xc6ad('0x7'),'memberReport',_0x566302,_0x3f44b5,_0x3ae751);if(_0x3ae751[_0xc6ad('0x8')]){logger['error'](_0xc6ad('0x7'),'memberReport',_0x566302,_0x3ae751[_0xc6ad('0x8')][_0xc6ad('0x9')],_0x3f44b5);return _0x3906c7(_0x3ae751[_0xc6ad('0x8')][_0xc6ad('0x9')]);}else{return _0x22295b(_0x3ae751[_0xc6ad('0xa')]);}})[_0xc6ad('0xb')](function(_0x27316a){logger[_0xc6ad('0x8')](_0xc6ad('0x7'),_0xc6ad('0xc'),_0x566302,_0x27316a,_0x3f44b5);return _0x3906c7(_0x27316a);});});};module[_0xc6ad('0xd')]=client;
\ No newline at end of file
diff --git a/server/services/ami/dialer/action.js b/server/services/ami/dialer/action.js
index 3cbf5a9..25afaf0 100644
--- a/server/services/ami/dialer/action.js
+++ b/server/services/ami/dialer/action.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9622=['CampaignId','idHopper','ContactFirstName','starttime','format','callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','prototype','getQueue','exports','util','lodash','moment','isNil','string','voiceQueue','uniqueid','name','Contact','phone','firstName','lastName','number','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','ContactId','ListId','UserId'];(function(_0xd7f9a4,_0x4ec4a8){var _0x54d9f0=function(_0x501580){while(--_0x501580){_0xd7f9a4['push'](_0xd7f9a4['shift']());}};_0x54d9f0(++_0x4ec4a8);}(_0x9622,0x150));var _0x2962=function(_0x3aaf78,_0x27aa1f){_0x3aaf78=_0x3aaf78-0x0;var _0x1c97b7=_0x9622[_0x3aaf78];return _0x1c97b7;};'use strict';var util=require(_0x2962('0x0'));var _=require(_0x2962('0x1'));var moment=require(_0x2962('0x2'));function checkNameSurname(_0xe50529,_0x52fbbe,_0x1292dc){var _0x2730a2='';if(!_[_0x2962('0x3')](_0x52fbbe)&&'string'===typeof _0x52fbbe){_0x2730a2+=_0x52fbbe;}if(!_['isNil'](_0x1292dc)&&_0x2962('0x4')===typeof _0x1292dc){_0x2730a2+='\x20'+_0x1292dc;}if(_0x2730a2!==''){return _0x2730a2;}return _0xe50529;}function Action(_0x5b4990,_0x126f3d,_0x4679a6){this[_0x2962('0x5')]=_0x5b4990;this[_0x2962('0x6')]=_0x4679a6||undefined;this[_0x2962('0x7')]=checkNameSurname(_0x126f3d[_0x2962('0x8')][_0x2962('0x9')],_0x126f3d[_0x2962('0x8')][_0x2962('0xa')],_0x126f3d[_0x2962('0x8')][_0x2962('0xb')]);this[_0x2962('0xc')]=_0x126f3d[_0x2962('0x8')]['phone'];this[_0x2962('0xd')]=_0x5b4990[_0x2962('0x7')];this[_0x2962('0xe')]=_0x126f3d[_0x2962('0xe')]||![];this[_0x2962('0xf')]=_0x5b4990['type'];this['dialQueueTimeout']=_0x5b4990[_0x2962('0x10')]||0x3;this[_0x2962('0x11')]=_0x126f3d[_0x2962('0x11')];this[_0x2962('0x12')]=_0x126f3d['countbusyretry'];this['countcongestionretry']=_0x126f3d[_0x2962('0x13')];this[_0x2962('0x14')]=_0x126f3d[_0x2962('0x14')];this[_0x2962('0x15')]=_0x126f3d[_0x2962('0x15')];this[_0x2962('0x16')]=_0x126f3d[_0x2962('0x16')];this[_0x2962('0x17')]=_0x126f3d[_0x2962('0x17')];this['VoiceQueueId']=_0x126f3d['VoiceQueueId'];this[_0x2962('0x18')]=_0x126f3d[_0x2962('0x18')];this[_0x2962('0x19')]=_0x126f3d['id'];this[_0x2962('0x1a')]=_0x126f3d[_0x2962('0x8')][_0x2962('0xa')]||'';this[_0x2962('0x1b')]=moment()[_0x2962('0x1c')]('YYYY-MM-DD\x20HH:mm:ss');this['callback']=_0x126f3d['callback'];this[_0x2962('0x1d')]=_0x126f3d['callbackuniqueid'];this[_0x2962('0x1e')]=_0x126f3d[_0x2962('0x1e')];this[_0x2962('0x1f')]=_0x126f3d[_0x2962('0x1f')];this[_0x2962('0x20')]='';this[_0x2962('0x21')]='';}Action['prototype'][_0x2962('0x22')]=function(){return util[_0x2962('0x1c')](_0x2962('0x23'),this['name'],this[_0x2962('0x5')][_0x2962('0x24')]>0x0?this[_0x2962('0xc')]['substring'](this[_0x2962('0x5')][_0x2962('0x24')]):this[_0x2962('0xc')]);};Action[_0x2962('0x25')][_0x2962('0x26')]=function(){return this['queue'];};module[_0x2962('0x27')]=Action;
\ No newline at end of file
+var _0xc7d3=['scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','starttime','format','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','prototype','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','substring','getQueue','exports','util','lodash','moment','isNil','string','voiceQueue','uniqueid','name','Contact','phone','lastName','number','queue','active','type','dialQueueTimeout'];(function(_0x2a5ff9,_0x244065){var _0x27bd29=function(_0x51cdee){while(--_0x51cdee){_0x2a5ff9['push'](_0x2a5ff9['shift']());}};_0x27bd29(++_0x244065);}(_0xc7d3,0x6b));var _0x3c7d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc7d3[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0x3c7d('0x0'));var _=require(_0x3c7d('0x1'));var moment=require(_0x3c7d('0x2'));function checkNameSurname(_0x1e4616,_0x8d9cbb,_0x1b2171){var _0x43ec4c='';if(!_[_0x3c7d('0x3')](_0x8d9cbb)&&'string'===typeof _0x8d9cbb){_0x43ec4c+=_0x8d9cbb;}if(!_[_0x3c7d('0x3')](_0x1b2171)&&_0x3c7d('0x4')===typeof _0x1b2171){_0x43ec4c+='\x20'+_0x1b2171;}if(_0x43ec4c!==''){return _0x43ec4c;}return _0x1e4616;}function Action(_0x378164,_0x31fd67,_0x463418){this[_0x3c7d('0x5')]=_0x378164;this[_0x3c7d('0x6')]=_0x463418||undefined;this[_0x3c7d('0x7')]=checkNameSurname(_0x31fd67[_0x3c7d('0x8')][_0x3c7d('0x9')],_0x31fd67[_0x3c7d('0x8')]['firstName'],_0x31fd67[_0x3c7d('0x8')][_0x3c7d('0xa')]);this[_0x3c7d('0xb')]=_0x31fd67[_0x3c7d('0x8')]['phone'];this[_0x3c7d('0xc')]=_0x378164['name'];this[_0x3c7d('0xd')]=_0x31fd67[_0x3c7d('0xd')]||![];this[_0x3c7d('0xe')]=_0x378164[_0x3c7d('0xe')];this[_0x3c7d('0xf')]=_0x378164[_0x3c7d('0xf')]||0x3;this[_0x3c7d('0x10')]=_0x31fd67[_0x3c7d('0x10')];this[_0x3c7d('0x11')]=_0x31fd67[_0x3c7d('0x11')];this[_0x3c7d('0x12')]=_0x31fd67['countcongestionretry'];this[_0x3c7d('0x13')]=_0x31fd67[_0x3c7d('0x13')];this[_0x3c7d('0x14')]=_0x31fd67['ContactId'];this['ListId']=_0x31fd67[_0x3c7d('0x15')];this[_0x3c7d('0x16')]=_0x31fd67[_0x3c7d('0x16')];this[_0x3c7d('0x17')]=_0x31fd67[_0x3c7d('0x17')];this[_0x3c7d('0x18')]=_0x31fd67[_0x3c7d('0x18')];this['idHopper']=_0x31fd67['id'];this['ContactFirstName']=_0x31fd67[_0x3c7d('0x8')]['firstName']||'';this[_0x3c7d('0x19')]=moment()[_0x3c7d('0x1a')](_0x3c7d('0x1b'));this[_0x3c7d('0x1c')]=_0x31fd67[_0x3c7d('0x1c')];this[_0x3c7d('0x1d')]=_0x31fd67[_0x3c7d('0x1d')];this[_0x3c7d('0x1e')]=_0x31fd67[_0x3c7d('0x1e')];this[_0x3c7d('0x1f')]=_0x31fd67[_0x3c7d('0x1f')];this[_0x3c7d('0x20')]='';this[_0x3c7d('0x21')]='';}Action[_0x3c7d('0x22')][_0x3c7d('0x23')]=function(){return util['format'](_0x3c7d('0x24'),this[_0x3c7d('0x7')],this[_0x3c7d('0x5')][_0x3c7d('0x25')]>0x0?this[_0x3c7d('0xb')][_0x3c7d('0x26')](this[_0x3c7d('0x5')][_0x3c7d('0x25')]):this[_0x3c7d('0xb')]);};Action[_0x3c7d('0x22')][_0x3c7d('0x27')]=function(){return this['queue'];};module[_0x3c7d('0x28')]=Action;
\ No newline at end of file
diff --git a/server/services/ami/dialer/agentComplete.js b/server/services/ami/dialer/agentComplete.js
index 4c89541..ee52626 100644
--- a/server/services/ami/dialer/agentComplete.js
+++ b/server/services/ami/dialer/agentComplete.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6eb3=['membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','lodash','moment','milliseconds','seconds','state','statedesc','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','uniqueid','calleridname','name','number','starttime','responsetime','answertime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x6eb3,0x159));var _0x36eb=function(_0x58047f,_0x3fb961){_0x58047f=_0x58047f-0x0;var _0x42a1c2=_0x6eb3[_0x58047f];return _0x42a1c2;};'use strict';var util=require('util');var _=require(_0x36eb('0x0'));var moment=require(_0x36eb('0x1'));function getSeconds(_0x266a62,_0x3677c5){var _0x3cd6e2=moment(_0x266a62)[_0x36eb('0x2')](0x0);var _0xdbdffa=moment(_0x3677c5)['milliseconds'](0x0);return _0x3cd6e2['diff'](_0xdbdffa,_0x36eb('0x3'));}function AgentComplete(_0x3a0318,_0x4a6c42){this[_0x36eb('0x4')]=0x4;this[_0x36eb('0x5')]='Answer';this[_0x36eb('0x6')]=_0x3a0318[_0x36eb('0x6')];this[_0x36eb('0x7')]=_0x3a0318['type'];this['campaigntype']=_0x3a0318[_0x36eb('0x7')]===_0x36eb('0x8')?_0x36eb('0x9'):_0x3a0318[_0x36eb('0x7')];this[_0x36eb('0xa')]=_0x3a0318[_0x36eb('0xa')];this[_0x36eb('0xb')]=_0x3a0318[_0x36eb('0xb')];this[_0x36eb('0xc')]=_0x3a0318[_0x36eb('0xc')];this['countglobal']=_0x3a0318[_0x36eb('0xa')]+_0x3a0318['countcongestionretry']+_0x3a0318[_0x36eb('0xc')];this[_0x36eb('0xd')]=_0x4a6c42[_0x36eb('0xd')];this[_0x36eb('0xe')]=_0x3a0318[_0x36eb('0xf')];this['calleridnum']=_0x3a0318[_0x36eb('0x10')];this[_0x36eb('0x11')]=_0x3a0318['starttime'];this[_0x36eb('0x12')]=_0x3a0318['responsetime'];this['answertime']=_0x3a0318[_0x36eb('0x13')];this['endtime']=moment()[_0x36eb('0x14')](_0x36eb('0x15'));this[_0x36eb('0x16')]=getSeconds(_0x3a0318['responsetime'],_0x3a0318['starttime']);this[_0x36eb('0x17')]=getSeconds(_0x3a0318['answertime'],_0x3a0318[_0x36eb('0x12')]);this[_0x36eb('0x18')]=getSeconds(this['endtime'],_0x3a0318[_0x36eb('0x13')]);this['queue']=_0x4a6c42[_0x36eb('0x9')];this['membername']=_0x4a6c42[_0x36eb('0x19')];this['reason']=_0x4a6c42[_0x36eb('0x1a')];this[_0x36eb('0x1b')]=_0x3a0318['callback'];this[_0x36eb('0x1c')]=_0x3a0318['callbackuniqueid'];this[_0x36eb('0x1d')]=_0x3a0318[_0x36eb('0x1d')];this[_0x36eb('0x1e')]=_0x3a0318[_0x36eb('0x1e')];this[_0x36eb('0x1f')]=_0x3a0318['ContactId'];this[_0x36eb('0x20')]=_0x3a0318['ListId'];this[_0x36eb('0x21')]=_0x3a0318[_0x36eb('0x21')];this[_0x36eb('0x22')]=_0x3a0318[_0x36eb('0x22')];this['CampaignId']=_0x3a0318['CampaignId'];this['originatecalleridnum']=_0x3a0318[_0x36eb('0x23')]||'';this[_0x36eb('0x24')]=_0x3a0318[_0x36eb('0x24')]||'';}module['exports']=AgentComplete;
\ No newline at end of file
+var _0x2842=['state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','answertime','endtime','format','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','moment','milliseconds','seconds'];(function(_0x4eb150,_0x5a2467){var _0x27b4fe=function(_0x355db9){while(--_0x355db9){_0x4eb150['push'](_0x4eb150['shift']());}};_0x27b4fe(++_0x5a2467);}(_0x2842,0x16c));var _0x2284=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x2842[_0x1ac595];return _0x455fff;};'use strict';var util=require(_0x2284('0x0'));var _=require(_0x2284('0x1'));var moment=require(_0x2284('0x2'));function getSeconds(_0x43b52b,_0x490b9b){var _0x425e51=moment(_0x43b52b)['milliseconds'](0x0);var _0x5e5505=moment(_0x490b9b)[_0x2284('0x3')](0x0);return _0x425e51['diff'](_0x5e5505,_0x2284('0x4'));}function AgentComplete(_0x1dc99b,_0x19c028){this[_0x2284('0x5')]=0x4;this[_0x2284('0x6')]=_0x2284('0x7');this[_0x2284('0x8')]=_0x1dc99b[_0x2284('0x8')];this['type']=_0x1dc99b[_0x2284('0x9')];this[_0x2284('0xa')]=_0x1dc99b[_0x2284('0x9')]===_0x2284('0xb')?_0x2284('0xc'):_0x1dc99b[_0x2284('0x9')];this['countbusyretry']=_0x1dc99b[_0x2284('0xd')];this[_0x2284('0xe')]=_0x1dc99b[_0x2284('0xe')];this[_0x2284('0xf')]=_0x1dc99b[_0x2284('0xf')];this[_0x2284('0x10')]=_0x1dc99b[_0x2284('0xd')]+_0x1dc99b[_0x2284('0xe')]+_0x1dc99b[_0x2284('0xf')];this[_0x2284('0x11')]=_0x19c028[_0x2284('0x11')];this[_0x2284('0x12')]=_0x1dc99b[_0x2284('0x13')];this[_0x2284('0x14')]=_0x1dc99b[_0x2284('0x15')];this[_0x2284('0x16')]=_0x1dc99b[_0x2284('0x16')];this[_0x2284('0x17')]=_0x1dc99b[_0x2284('0x17')];this[_0x2284('0x18')]=_0x1dc99b[_0x2284('0x18')];this[_0x2284('0x19')]=moment()[_0x2284('0x1a')]('YYYY-MM-DD\x20HH:mm:ss');this['ringtime']=getSeconds(_0x1dc99b[_0x2284('0x17')],_0x1dc99b[_0x2284('0x16')]);this[_0x2284('0x1b')]=getSeconds(_0x1dc99b[_0x2284('0x18')],_0x1dc99b[_0x2284('0x17')]);this[_0x2284('0x1c')]=getSeconds(this['endtime'],_0x1dc99b[_0x2284('0x18')]);this[_0x2284('0xc')]=_0x19c028['queue'];this[_0x2284('0x1d')]=_0x19c028[_0x2284('0x1d')];this[_0x2284('0x1e')]=_0x19c028[_0x2284('0x1e')];this[_0x2284('0x1f')]=_0x1dc99b[_0x2284('0x1f')];this[_0x2284('0x20')]=_0x1dc99b[_0x2284('0x20')];this[_0x2284('0x21')]=_0x1dc99b['callbackat'];this[_0x2284('0x22')]=_0x1dc99b[_0x2284('0x22')];this['ContactId']=_0x1dc99b[_0x2284('0x23')];this[_0x2284('0x24')]=_0x1dc99b[_0x2284('0x24')];this[_0x2284('0x25')]=_0x1dc99b[_0x2284('0x25')];this['VoiceQueueId']=_0x1dc99b['VoiceQueueId'];this['CampaignId']=_0x1dc99b[_0x2284('0x26')];this['originatecalleridnum']=_0x1dc99b[_0x2284('0x27')]||'';this[_0x2284('0x28')]=_0x1dc99b['originatecalleridname']||'';}module['exports']=AgentComplete;
\ No newline at end of file
diff --git a/server/services/ami/dialer/final.js b/server/services/ami/dialer/final.js
index 7ffe947..4f23080 100644
--- a/server/services/ami/dialer/final.js
+++ b/server/services/ami/dialer/final.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8b0e=['uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countglobal','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','diff','seconds'];(function(_0x4f2221,_0x2e5dd0){var _0x234961=function(_0x5cb7b8){while(--_0x5cb7b8){_0x4f2221['push'](_0x4f2221['shift']());}};_0x234961(++_0x2e5dd0);}(_0x8b0e,0x166));var _0xe8b0=function(_0x599aaf,_0x3d3622){_0x599aaf=_0x599aaf-0x0;var _0xd995f3=_0x8b0e[_0x599aaf];return _0xd995f3;};'use strict';var util=require(_0xe8b0('0x0'));var _=require(_0xe8b0('0x1'));var moment=require(_0xe8b0('0x2'));function getSeconds(_0x164564,_0x36ef98){var _0x1f776b=moment(_0x164564)['milliseconds'](0x0);var _0x2036fd=moment(_0x36ef98)['milliseconds'](0x0);return _0x1f776b[_0xe8b0('0x3')](_0x2036fd,_0xe8b0('0x4'));}function Final(_0x2a0ba1){this[_0xe8b0('0x5')]=_0x2a0ba1[_0xe8b0('0x5')];this[_0xe8b0('0x6')]=_0x2a0ba1[_0xe8b0('0x6')];this[_0xe8b0('0x7')]=_0x2a0ba1['type'];this[_0xe8b0('0x8')]=_0x2a0ba1[_0xe8b0('0x7')]===_0xe8b0('0x9')?_0xe8b0('0xa'):_0x2a0ba1[_0xe8b0('0x7')];this[_0xe8b0('0xb')]=_0x2a0ba1[_0xe8b0('0xb')];this[_0xe8b0('0xc')]=_0x2a0ba1[_0xe8b0('0xc')];this['countnoanswerretry']=_0x2a0ba1['countnoanswerretry'];this[_0xe8b0('0xd')]=_0x2a0ba1[_0xe8b0('0xb')]+_0x2a0ba1[_0xe8b0('0xc')]+_0x2a0ba1['countnoanswerretry'];this[_0xe8b0('0xa')]=_0x2a0ba1[_0xe8b0('0xa')];this[_0xe8b0('0xe')]=_0x2a0ba1[_0xe8b0('0xe')];this[_0xe8b0('0xf')]=_0x2a0ba1[_0xe8b0('0xf')];this[_0xe8b0('0x10')]=_0x2a0ba1['starttime'];this[_0xe8b0('0x11')]=_0x2a0ba1[_0xe8b0('0x11')];this[_0xe8b0('0x12')]=_0x2a0ba1['responsetime'];this[_0xe8b0('0x13')]=_0x2a0ba1['ringtime']||0x0;this['holdtime']=_0x2a0ba1['holdtime']||0x0;this[_0xe8b0('0x14')]=_0x2a0ba1[_0xe8b0('0x14')]||0x0;this['callback']=_0x2a0ba1[_0xe8b0('0x15')];this[_0xe8b0('0x16')]=_0x2a0ba1[_0xe8b0('0x16')];this[_0xe8b0('0x17')]=_0x2a0ba1[_0xe8b0('0x17')];this[_0xe8b0('0x18')]=_0x2a0ba1['recallme'];this['ContactId']=_0x2a0ba1[_0xe8b0('0x19')];this[_0xe8b0('0x1a')]=_0x2a0ba1[_0xe8b0('0x1a')];this[_0xe8b0('0x1b')]=_0x2a0ba1[_0xe8b0('0x1b')];this[_0xe8b0('0x1c')]=_0x2a0ba1[_0xe8b0('0x1c')];this[_0xe8b0('0x1d')]=_0x2a0ba1[_0xe8b0('0x1d')];this[_0xe8b0('0x1e')]=_0x2a0ba1[_0xe8b0('0x1e')]||'';this['originatecalleridname']=_0x2a0ba1[_0xe8b0('0x1f')]||'';}module[_0xe8b0('0x20')]=Final;
\ No newline at end of file
+var _0xe558=['responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countnoanswerretry','countglobal','calleridname','calleridnum','starttime'];(function(_0x20d54d,_0x1adc8e){var _0x516e8b=function(_0x2754e1){while(--_0x2754e1){_0x20d54d['push'](_0x20d54d['shift']());}};_0x516e8b(++_0x1adc8e);}(_0xe558,0x70));var _0x8e55=function(_0x20d834,_0x230d10){_0x20d834=_0x20d834-0x0;var _0x32c6d5=_0xe558[_0x20d834];return _0x32c6d5;};'use strict';var util=require(_0x8e55('0x0'));var _=require(_0x8e55('0x1'));var moment=require(_0x8e55('0x2'));function getSeconds(_0x1888b9,_0x9f3acc){var _0x19ab5a=moment(_0x1888b9)[_0x8e55('0x3')](0x0);var _0x3a5285=moment(_0x9f3acc)[_0x8e55('0x3')](0x0);return _0x19ab5a['diff'](_0x3a5285,_0x8e55('0x4'));}function Final(_0x127fb4){this[_0x8e55('0x5')]=_0x127fb4[_0x8e55('0x5')];this[_0x8e55('0x6')]=_0x127fb4[_0x8e55('0x6')];this['type']=_0x127fb4[_0x8e55('0x7')];this[_0x8e55('0x8')]=_0x127fb4['type']===_0x8e55('0x9')?'queue':_0x127fb4['type'];this[_0x8e55('0xa')]=_0x127fb4['countbusyretry'];this['countcongestionretry']=_0x127fb4['countcongestionretry'];this[_0x8e55('0xb')]=_0x127fb4[_0x8e55('0xb')];this[_0x8e55('0xc')]=_0x127fb4[_0x8e55('0xa')]+_0x127fb4['countcongestionretry']+_0x127fb4[_0x8e55('0xb')];this['queue']=_0x127fb4['queue'];this['calleridname']=_0x127fb4[_0x8e55('0xd')];this['calleridnum']=_0x127fb4[_0x8e55('0xe')];this[_0x8e55('0xf')]=_0x127fb4[_0x8e55('0xf')];this[_0x8e55('0x10')]=_0x127fb4[_0x8e55('0x10')];this[_0x8e55('0x11')]=_0x127fb4[_0x8e55('0x10')];this[_0x8e55('0x12')]=_0x127fb4[_0x8e55('0x12')]||0x0;this[_0x8e55('0x13')]=_0x127fb4[_0x8e55('0x13')]||0x0;this[_0x8e55('0x14')]=_0x127fb4[_0x8e55('0x14')]||0x0;this[_0x8e55('0x15')]=_0x127fb4[_0x8e55('0x15')];this['callbackuniqueid']=_0x127fb4[_0x8e55('0x16')];this[_0x8e55('0x17')]=_0x127fb4[_0x8e55('0x17')];this[_0x8e55('0x18')]=_0x127fb4['recallme'];this[_0x8e55('0x19')]=_0x127fb4[_0x8e55('0x19')];this[_0x8e55('0x1a')]=_0x127fb4[_0x8e55('0x1a')];this[_0x8e55('0x1b')]=_0x127fb4[_0x8e55('0x1b')];this[_0x8e55('0x1c')]=_0x127fb4[_0x8e55('0x1c')];this['CampaignId']=_0x127fb4['CampaignId'];this[_0x8e55('0x1d')]=_0x127fb4[_0x8e55('0x1d')]||'';this[_0x8e55('0x1e')]=_0x127fb4['originatecalleridname']||'';}module[_0x8e55('0x1f')]=Final;
\ No newline at end of file
diff --git a/server/services/ami/dialer/hangup.js b/server/services/ami/dialer/hangup.js
index f8d4e6b..cf5315a 100644
--- a/server/services/ami/dialer/hangup.js
+++ b/server/services/ami/dialer/hangup.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['countglobal','countcongestionretry','countnoanswerretry','uniqueid','name','calleridnum','number','starttime','responsetime','endtime','YYYY-MM-DD\x20HH:mm:ss','talktime','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','seconds','state','statedesc','Answer','type','outbound','queue','countbusyretry'];(function(_0x4cfc1d,_0x2c0927){var _0x1c01a0=function(_0x264a74){while(--_0x264a74){_0x4cfc1d['push'](_0x4cfc1d['shift']());}};_0x1c01a0(++_0x2c0927);}(_0xa9e0,0x123));var _0x0a9e=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0xa9e0[_0xa1e3e3];return _0xc980e9;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function getSeconds(_0x5dd881,_0x550fbc){var _0x18d5c9=moment(_0x5dd881)['milliseconds'](0x0);var _0x333808=moment(_0x550fbc)[_0x0a9e('0x3')](0x0);return _0x18d5c9[_0x0a9e('0x4')](_0x333808,_0x0a9e('0x5'));}function Hangup(_0x981158,_0x57b080){this[_0x0a9e('0x6')]=0x4;this[_0x0a9e('0x7')]=_0x0a9e('0x8');this['scheduledat']=_0x981158['scheduledat'];this[_0x0a9e('0x9')]=_0x981158['type'];this['campaigntype']=_0x981158[_0x0a9e('0x9')]===_0x0a9e('0xa')?_0x0a9e('0xb'):_0x981158[_0x0a9e('0x9')];this[_0x0a9e('0xc')]=_0x981158[_0x0a9e('0xc')];this['countcongestionretry']=_0x981158['countcongestionretry'];this['countnoanswerretry']=_0x981158['countnoanswerretry'];this[_0x0a9e('0xd')]=_0x981158[_0x0a9e('0xc')]+_0x981158[_0x0a9e('0xe')]+_0x981158[_0x0a9e('0xf')];this[_0x0a9e('0x10')]=_0x57b080[_0x0a9e('0x10')];this['calleridname']=_0x981158[_0x0a9e('0x11')];this[_0x0a9e('0x12')]=_0x981158[_0x0a9e('0x13')];this[_0x0a9e('0x14')]=_0x981158[_0x0a9e('0x14')];this[_0x0a9e('0x15')]=_0x981158['responsetime'];this[_0x0a9e('0x16')]=moment()['format'](_0x0a9e('0x17'));this['ringtime']=getSeconds(_0x981158[_0x0a9e('0x15')],_0x981158[_0x0a9e('0x14')]);this['holdtime']=0x0;this[_0x0a9e('0x18')]=getSeconds(this['endtime'],_0x981158[_0x0a9e('0x15')]);this[_0x0a9e('0xb')]=_0x981158[_0x0a9e('0xb')];this[_0x0a9e('0x19')]=_0x0a9e('0x1a');this[_0x0a9e('0x1b')]=_0x57b080[_0x0a9e('0x1c')];this[_0x0a9e('0x1d')]=_0x981158[_0x0a9e('0x1d')];this[_0x0a9e('0x1e')]=_0x981158[_0x0a9e('0x1e')];this[_0x0a9e('0x1f')]=_0x981158['callbackat'];this[_0x0a9e('0x20')]=_0x981158[_0x0a9e('0x20')];this['ContactId']=_0x981158[_0x0a9e('0x21')];this['ListId']=_0x981158['ListId'];this[_0x0a9e('0x22')]=_0x981158[_0x0a9e('0x22')];this[_0x0a9e('0x23')]=_0x981158[_0x0a9e('0x23')];this['CampaignId']=_0x981158[_0x0a9e('0x24')];}module[_0x0a9e('0x25')]=Hangup;
\ No newline at end of file
+var _0x9957=['state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','calleridname','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','holdtime','talktime','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','seconds'];(function(_0x4b4127,_0x40cfa2){var _0x50512f=function(_0x6b4b00){while(--_0x6b4b00){_0x4b4127['push'](_0x4b4127['shift']());}};_0x50512f(++_0x40cfa2);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'use strict';var util=require(_0x7995('0x0'));var _=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));function getSeconds(_0x10a05d,_0x5b96eb){var _0x86c128=moment(_0x10a05d)[_0x7995('0x3')](0x0);var _0x1902b4=moment(_0x5b96eb)[_0x7995('0x3')](0x0);return _0x86c128['diff'](_0x1902b4,_0x7995('0x4'));}function Hangup(_0x1a36d8,_0x137b6b){this[_0x7995('0x5')]=0x4;this[_0x7995('0x6')]=_0x7995('0x7');this['scheduledat']=_0x1a36d8[_0x7995('0x8')];this[_0x7995('0x9')]=_0x1a36d8['type'];this[_0x7995('0xa')]=_0x1a36d8[_0x7995('0x9')]===_0x7995('0xb')?_0x7995('0xc'):_0x1a36d8[_0x7995('0x9')];this[_0x7995('0xd')]=_0x1a36d8[_0x7995('0xd')];this['countcongestionretry']=_0x1a36d8[_0x7995('0xe')];this[_0x7995('0xf')]=_0x1a36d8['countnoanswerretry'];this[_0x7995('0x10')]=_0x1a36d8[_0x7995('0xd')]+_0x1a36d8[_0x7995('0xe')]+_0x1a36d8[_0x7995('0xf')];this[_0x7995('0x11')]=_0x137b6b[_0x7995('0x11')];this[_0x7995('0x12')]=_0x1a36d8['name'];this['calleridnum']=_0x1a36d8[_0x7995('0x13')];this[_0x7995('0x14')]=_0x1a36d8[_0x7995('0x14')];this[_0x7995('0x15')]=_0x1a36d8[_0x7995('0x15')];this[_0x7995('0x16')]=moment()[_0x7995('0x17')](_0x7995('0x18'));this['ringtime']=getSeconds(_0x1a36d8[_0x7995('0x15')],_0x1a36d8['starttime']);this[_0x7995('0x19')]=0x0;this[_0x7995('0x1a')]=getSeconds(this[_0x7995('0x16')],_0x1a36d8[_0x7995('0x15')]);this[_0x7995('0xc')]=_0x1a36d8[_0x7995('0xc')];this['membername']='IVR';this[_0x7995('0x1b')]=_0x137b6b['cause-txt'];this['callback']=_0x1a36d8[_0x7995('0x1c')];this[_0x7995('0x1d')]=_0x1a36d8['callbackuniqueid'];this[_0x7995('0x1e')]=_0x1a36d8['callbackat'];this['recallme']=_0x1a36d8[_0x7995('0x1f')];this[_0x7995('0x20')]=_0x1a36d8[_0x7995('0x20')];this[_0x7995('0x21')]=_0x1a36d8[_0x7995('0x21')];this[_0x7995('0x22')]=_0x1a36d8['UserId'];this[_0x7995('0x23')]=_0x1a36d8[_0x7995('0x23')];this[_0x7995('0x24')]=_0x1a36d8[_0x7995('0x24')];}module[_0x7995('0x25')]=Hangup;
\ No newline at end of file
diff --git a/server/services/ami/dialer/history.js b/server/services/ami/dialer/history.js
index d1f4203..cd0269a 100644
--- a/server/services/ami/dialer/history.js
+++ b/server/services/ami/dialer/history.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbdbb=['callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','exports','util','lodash','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','queue','calleridname','calleridnum','number','starttime','responsetime','endtime','ringtime','holdtime','callback','callbackuniqueid'];(function(_0x2c1dcd,_0x350452){var _0x158ce5=function(_0x5c1c57){while(--_0x5c1c57){_0x2c1dcd['push'](_0x2c1dcd['shift']());}};_0x158ce5(++_0x350452);}(_0xbdbb,0xae));var _0xbbdb=function(_0x471273,_0x1587f1){_0x471273=_0x471273-0x0;var _0x56c63e=_0xbdbb[_0x471273];return _0x56c63e;};'use strict';var util=require(_0xbbdb('0x0'));var _=require(_0xbbdb('0x1'));var moment=require('moment');function getSeconds(_0x5a01f1,_0x5261be){var _0x231a62=moment(_0x5a01f1)['milliseconds'](0x0);var _0x6297bc=moment(_0x5261be)[_0xbbdb('0x2')](0x0);return _0x231a62[_0xbbdb('0x3')](_0x6297bc,_0xbbdb('0x4'));}function History(_0x1fcc21){this['uniqueid']=_0x1fcc21[_0xbbdb('0x5')];this[_0xbbdb('0x6')]=_0x1fcc21[_0xbbdb('0x6')]||undefined;this[_0xbbdb('0x7')]=_0x1fcc21[_0xbbdb('0x7')];this[_0xbbdb('0x8')]=_0x1fcc21['type']==='outbound'?'queue':_0x1fcc21['type'];this[_0xbbdb('0x9')]=_0x1fcc21[_0xbbdb('0x9')];this[_0xbbdb('0xa')]=_0x1fcc21[_0xbbdb('0xa')];this['countnoanswerretry']=_0x1fcc21[_0xbbdb('0xb')];this[_0xbbdb('0xc')]=_0x1fcc21['countbusyretry']+_0x1fcc21[_0xbbdb('0xa')]+_0x1fcc21[_0xbbdb('0xb')];this[_0xbbdb('0xd')]=_0x1fcc21[_0xbbdb('0xd')];this[_0xbbdb('0xe')]=_0x1fcc21['name'];this[_0xbbdb('0xf')]=_0x1fcc21[_0xbbdb('0x10')];this[_0xbbdb('0x11')]=_0x1fcc21[_0xbbdb('0x11')];this['responsetime']=_0x1fcc21[_0xbbdb('0x12')];this[_0xbbdb('0x13')]=_0x1fcc21[_0xbbdb('0x12')];this[_0xbbdb('0x14')]=getSeconds(_0x1fcc21[_0xbbdb('0x12')],_0x1fcc21['starttime']);this[_0xbbdb('0x15')]=0x0;this['talktime']=0x0;this[_0xbbdb('0x16')]=_0x1fcc21['callback'];this['callbackuniqueid']=_0x1fcc21[_0xbbdb('0x17')];this[_0xbbdb('0x18')]=_0x1fcc21[_0xbbdb('0x18')];this[_0xbbdb('0x19')]=_0x1fcc21[_0xbbdb('0x19')];this[_0xbbdb('0x1a')]=_0x1fcc21[_0xbbdb('0x1a')];this[_0xbbdb('0x1b')]=_0x1fcc21[_0xbbdb('0x1b')];this[_0xbbdb('0x1c')]=_0x1fcc21[_0xbbdb('0x1c')];this['VoiceQueueId']=_0x1fcc21[_0xbbdb('0x1d')];this['CampaignId']=_0x1fcc21[_0xbbdb('0x1e')];this[_0xbbdb('0x1f')]=_0x1fcc21[_0xbbdb('0x1f')]||'';this['originatecalleridname']=_0x1fcc21['originatecalleridname']||'';}module[_0xbbdb('0x20')]=History;
\ No newline at end of file
+var _0x0a29=['responsetime','holdtime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridname','util','lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','calleridname','name','calleridnum','starttime'];(function(_0xd4310e,_0x3a7b02){var _0x35e53d=function(_0x176491){while(--_0x176491){_0xd4310e['push'](_0xd4310e['shift']());}};_0x35e53d(++_0x3a7b02);}(_0x0a29,0x12e));var _0x90a2=function(_0x2d1008,_0x10a499){_0x2d1008=_0x2d1008-0x0;var _0x480947=_0x0a29[_0x2d1008];return _0x480947;};'use strict';var util=require(_0x90a2('0x0'));var _=require(_0x90a2('0x1'));var moment=require('moment');function getSeconds(_0x54d874,_0x5ab3ba){var _0x3b561d=moment(_0x54d874)[_0x90a2('0x2')](0x0);var _0x103928=moment(_0x5ab3ba)[_0x90a2('0x2')](0x0);return _0x3b561d['diff'](_0x103928,_0x90a2('0x3'));}function History(_0x18c1e5){this[_0x90a2('0x4')]=_0x18c1e5[_0x90a2('0x4')];this[_0x90a2('0x5')]=_0x18c1e5[_0x90a2('0x5')]||undefined;this['type']=_0x18c1e5[_0x90a2('0x6')];this[_0x90a2('0x7')]=_0x18c1e5[_0x90a2('0x6')]===_0x90a2('0x8')?'queue':_0x18c1e5[_0x90a2('0x6')];this['countbusyretry']=_0x18c1e5[_0x90a2('0x9')];this['countcongestionretry']=_0x18c1e5[_0x90a2('0xa')];this['countnoanswerretry']=_0x18c1e5[_0x90a2('0xb')];this[_0x90a2('0xc')]=_0x18c1e5[_0x90a2('0x9')]+_0x18c1e5[_0x90a2('0xa')]+_0x18c1e5[_0x90a2('0xb')];this['queue']=_0x18c1e5['queue'];this[_0x90a2('0xd')]=_0x18c1e5[_0x90a2('0xe')];this[_0x90a2('0xf')]=_0x18c1e5['number'];this[_0x90a2('0x10')]=_0x18c1e5[_0x90a2('0x10')];this[_0x90a2('0x11')]=_0x18c1e5[_0x90a2('0x11')];this['endtime']=_0x18c1e5[_0x90a2('0x11')];this['ringtime']=getSeconds(_0x18c1e5[_0x90a2('0x11')],_0x18c1e5[_0x90a2('0x10')]);this[_0x90a2('0x12')]=0x0;this['talktime']=0x0;this[_0x90a2('0x13')]=_0x18c1e5[_0x90a2('0x13')];this[_0x90a2('0x14')]=_0x18c1e5[_0x90a2('0x14')];this[_0x90a2('0x15')]=_0x18c1e5[_0x90a2('0x15')];this[_0x90a2('0x16')]=_0x18c1e5['recallme'];this[_0x90a2('0x17')]=_0x18c1e5[_0x90a2('0x17')];this[_0x90a2('0x18')]=_0x18c1e5[_0x90a2('0x18')];this['UserId']=_0x18c1e5[_0x90a2('0x19')];this[_0x90a2('0x1a')]=_0x18c1e5['VoiceQueueId'];this['CampaignId']=_0x18c1e5[_0x90a2('0x1b')];this['originatecalleridnum']=_0x18c1e5['originatecalleridnum']||'';this['originatecalleridname']=_0x18c1e5[_0x90a2('0x1c')]||'';}module['exports']=History;
\ No newline at end of file
diff --git a/server/services/ami/dialer/index.js b/server/services/ami/dialer/index.js
index 253f974..4dc6daf 100644
--- a/server/services/ami/dialer/index.js
+++ b/server/services/ami/dialer/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe91e=['TIMEZONE_UNKNOW','\x20Timezone\x20unknow\x20','isArray','iftime\x20%s,%s','timezones','content','true','command','all','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','progressive','handlePower','dialPowerLevel','Queue','method\x20not\x20recognized','handleIvr','dialGlobalInterval','dialTimezone','[syncQueueSummary]','launchHandleIvr','[syncCampaigns]','pow','replace','random','match','actionOriginate','voiceQueue\x20is\x20undefine','Contact','phone','originate','getCaller','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialQueueTimeout','ACTIVE','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','tags','createdAt','updatedAt','%s%s','XMD-','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdName','XMD-ORIGINATECALLERIDNAME','originatecalleridname','originatecalleridnum','trim','substring','dialCutDigit','SIP/%s/%s%s','from-sip','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','getQueue','response','callProgressDetecting','[callProgressDetecting]\x20','checkRetriveMax','countbusyretry','countcongestionretry','countnoanswerretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','minutes','[rescheduleContact][NoAnswer]','add','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','[callProgressDetecting]','entity\x20is\x20undefine','object','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','dialGlobalMaxRetry','stateGlobal','reason\x200\x20no\x20such\x20number....','createStateFinal','NoAnswer','reason\x203\x20ringing\x20no\x20answer','Busy','countglobal','dialBusyMaxRetry','reason\x205\x20busy','[syncAgentComplete][createHistory][8]','dialCongestionMaxRetry','reason\x208\x20congestion','[syncAgentComplete][createHistory][?]','[moveContactManagedDialer][0]','contact\x20not\x20moved','predictiveIntervalMaxThreshold','round','predictiveIntervalMinThreshold','floor','predictiveIntervalHitRate','check\x20predictive\x20is\x20not\x20undefine','[startMethodPredictive][StartProgressive]','dialPredictiveInterval','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','dialPredictiveOptimization','dropRate','Max\x20Drop\x20','started\x20in\x20predictive\x20at','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','getDataPredictive','startMethodPredictive','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dialPredictiveOptimizationPercentage','abandonmentRate','agentBusyFactor','[getDataPredictive]','Unknown\x20Predictive','getDataPredictiveOld','loggedIn','outboundQueuePauses','[CatchErlangB]','busyFactor','check\x20failure','checkContactBlack','recallme','[booked][checkContactBlack]','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RECALLINQUEUE','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALLFAILEDTIMEOUT','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','limitCalls','temp','dialOrderByScheduledAt','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','Contact.phone','[actionOriginateIvr]\x20','not_inuse','[getContactDialer2]','dialLimitQueue','tryOriginatePredictive','[handlePredictive][limitChannel]','[actionOriginatePredictive]\x20','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','p\x20=\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts\x20=\x20','[busyFactor]','Umin\x20=\x20','exports','util','bluebird','moment','md5','ioredis','../../../config/environment/','dialer','../../../config/logger','booked','predictive','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','./action','./history','./final','./agentComplete','./queueCallerAbandon','./hangup','env','XCALLY_IP_AGI','rrmemory','roundrobin','prototype','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','optionPredictive','startProgressive','queueBooked','queueBookedRR','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','isUndefined','message','AGENTS_NOT_LOGGED','name','\x20AGENTS\x20NOT\x20LOGGED','NOT_ACTIVE','\x20NOT\x20Active','Interval','INTERVAL_IS_NULL','Intervals','\x20INTERVAL_IS_NULL','[ifTime][Action]','Error','milliseconds','seconds','emit','type','outbound','strategy','available','pTalking','sumBillable','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','waiting','dialActive','dialMethod','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','active','callerid','stringify','voice:queue:%s','voice_queue:save','ivr','format','campaign:ivr:%s','campaign:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','merge','startPredictive','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','inspect','stack','length','hasOwnProperty','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','RESCHEDULED_CONTACTS','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Queue:\x20','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','state','statedesc','endtime','starttime','[uniqueid]','clearZombieChannels','[actions]','isNil','Action','status','channel','catch','No\x20such\x20channel','queue','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','countReScheduled','resolve','then','[countReScheduled]\x20','checkIsBlackList','[checkIsBlackList]\x20','checkIsBlackListIvr','averageHandleTime','rescheduleContact','[rescheduleContact]\x20','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','getVoiceQueueRtPauses','moveContactManagedDialer','createHistory','[createHistory]\x20','updateOriginated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','saveInDb','pick','ContactId','ListId','UserId','VoiceQueueId','[emptyContact][createHistory]','[emptyContact]','isSuccess','Success','isTrunkReachable','SIP/%s','reachable','uniqueId','uniqueid','variable','amdstatus','exten','value','outboundAnswerCallsDay','HangupInAMD','AMD','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','dialAMDActive','MACHINE','Machine','membername','amd','[syncMachine][createHistory]','[syncMachine]','HANGUP','[syncHangupInAMDIvr]','[syncMachineIvr][createHistory]','[syncMachineIvr]','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AGI','Unknow','reason','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','YYYY-MM-DD\x20HH:mm:ss','[syncAgentComplete][createHistory]','answertime','queueCallerAbandonCreateState','droptime','responsetime','Drop','dropreason','Abandoned','CALLEREXIT','actionid','locked','stateinterface','push','paused','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','run','idHopper','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','CampaignId','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','syncCampaigns','checkIsTrunkReachable','TrunkBackup','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTime','checkIfTimeIntervals','Failure','\x20Intervals\x20is\x20null\x20','INTERVAL_IS_EMPTY','\x20Intervals\x20is\x20empty\x20'];(function(_0x16bed4,_0x5f3af8){var _0x4431e2=function(_0x563d68){while(--_0x563d68){_0x16bed4['push'](_0x16bed4['shift']());}};_0x4431e2(++_0x5f3af8);}(_0xe91e,0xbd));var _0xee91=function(_0x1d219c,_0x50820a){_0x1d219c=_0x1d219c-0x0;var _0x3d9fde=_0xe91e[_0x1d219c];return _0x3d9fde;};'use strict';var util=require(_0xee91('0x0'));var _=require('lodash');var BPromise=require(_0xee91('0x1'));var uuid=require('uuid');var moment=require(_0xee91('0x2'));var rr=require('rr');var md5=require(_0xee91('0x3'));var Redis=require(_0xee91('0x4'));var config=require(_0xee91('0x5'));var logger=require('../../../config/logger')(_0xee91('0x6'));var loggerBooked=require(_0xee91('0x7'))(_0xee91('0x8'));var loggerPredictive=require(_0xee91('0x7'))(_0xee91('0x9'));var loggerPredictiveCalls=require(_0xee91('0x7'))('predictiveCalls');var loggerSyncQueueSummary=require(_0xee91('0x7'))(_0xee91('0xa'));var ami=require(_0xee91('0xb'));config[_0xee91('0xc')]=_[_0xee91('0xd')](config['redis'],{'host':_0xee91('0xe'),'port':0x18eb});var io=require(_0xee91('0xf'))(new Redis(config[_0xee91('0xc')]));var cmHopper=require(_0xee91('0x10'));var cmHopperFinal=require('../rpc/cmHopperFinal');var cmHopperHistory=require(_0xee91('0x11'));var cmHopperBlack=require(_0xee91('0x12'));var voiceQueueRt=require(_0xee91('0x13'));var Action=require(_0xee91('0x14'));var History=require(_0xee91('0x15'));var Final=require(_0xee91('0x16'));var AgentComplete=require(_0xee91('0x17'));var QueueCallerAbandon=require(_0xee91('0x18'));var Hangup=require(_0xee91('0x19'));var ipAgi=process[_0xee91('0x1a')][_0xee91('0x1b')]||'127.0.0.1';var strategy={'rrmemory':_0xee91('0x1c'),'roundrobin':_0xee91('0x1d')};var Sequence=function(){};Sequence[_0xee91('0x1e')][_0xee91('0x1f')]=function(_0x418ab1){this[_0xee91('0x20')]=this[_0xee91('0x20')]?this[_0xee91('0x20')][_0xee91('0x21')](_0x418ab1):_0x418ab1();};function Dialer(_0xc7c667,_0x3e6dd0){this[_0xee91('0x22')]=new Sequence();this[_0xee91('0x23')]=_0x3e6dd0;this[_0xee91('0x24')]=_0xc7c667[_0xee91('0x24')];this['campaigns']=_0xc7c667[_0xee91('0x25')];this[_0xee91('0x26')]=_0xc7c667[_0xee91('0x26')];this[_0xee91('0x27')]=_0xc7c667[_0xee91('0x27')];this[_0xee91('0x28')]=config['maxNumberOriginate']||0x2;this[_0xee91('0x29')]={};this[_0xee91('0x2a')]={};this[_0xee91('0x2b')]={};this['uniqueId']={};this[_0xee91('0x2c')]={};this['startPredictive']={};this[_0xee91('0x2d')]={};this['ivrOriginated']={};this[_0xee91('0x2e')]={};this[_0xee91('0x2f')]={};ami['on'](_0xee91('0x30'),this[_0xee91('0x31')][_0xee91('0x32')](this));ami['on'](_0xee91('0x33'),this[_0xee91('0x34')][_0xee91('0x32')](this));ami['on']('originateresponse',this[_0xee91('0x35')]['bind'](this));ami['on'](_0xee91('0x36'),this[_0xee91('0x37')][_0xee91('0x32')](this));ami['on'](_0xee91('0x38'),this[_0xee91('0xa')][_0xee91('0x32')](this));ami['on'](_0xee91('0x39'),this[_0xee91('0x3a')][_0xee91('0x32')](this));ami['on'](_0xee91('0x3b'),this[_0xee91('0x3c')][_0xee91('0x32')](this));ami['on'](_0xee91('0x3d'),this[_0xee91('0x3e')]['bind'](this));ami['on'](_0xee91('0x3f'),this[_0xee91('0x40')][_0xee91('0x32')](this));ami['on']('queuestatuscomplete',this[_0xee91('0x41')][_0xee91('0x32')](this));this[_0xee91('0x42')]();this[_0xee91('0x43')]();}function isNotNull(_0x50ca46){return _0x50ca46!==null&&!_[_0xee91('0x44')](_0x50ca46);}function checkIsLoggedIn(_0x51d219,_0x2eefb1){return function(){if(_0x2eefb1<=0x0){_0x51d219[_0xee91('0x45')]=_0xee91('0x46');throw _0x51d219[_0xee91('0x47')]+_0xee91('0x48');}};}function isActive(_0x716025){return _0x716025;}function checkIsActive(_0x5f1ae6,_0x404b49){return function(){if(!isActive(_0x404b49)){_0x5f1ae6['message']=_0xee91('0x49');throw _0x5f1ae6[_0xee91('0x47')]+_0xee91('0x4a');}};}function checkInterval(_0x2036e1){return function(){if(!isNotNull(_0x2036e1[_0xee91('0x4b')])){_0x2036e1['message']=_0xee91('0x4c');throw _0x2036e1[_0xee91('0x47')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x2036e1['Interval'][_0xee91('0x4d')])){_0x2036e1['message']=_0xee91('0x4c');throw _0x2036e1[_0xee91('0x47')]+_0xee91('0x4e');}if(!isNotNull(_['isEmpty'](_0x2036e1[_0xee91('0x4b')]['Intervals']))){_0x2036e1[_0xee91('0x45')]=_0xee91('0x4c');throw _0x2036e1[_0xee91('0x47')]+_0xee91('0x4e');}};}function msgResponse(_0x35e28b,_0xbc4d41,_0x413b08){return{'action':_0x35e28b,'response':_0xbc4d41,'message':_0x413b08,'stack':_0x413b08};}function myreject(_0x1c7c0e){return function(_0x61c0f4){return _0x1c7c0e(msgResponse(_0xee91('0x4f'),_0xee91('0x50'),JSON['stringify'](_0x61c0f4)));};}function getSeconds(_0x26d9d4,_0x3ec8c4){var _0x1d7e00=moment(_0x26d9d4)['milliseconds'](0x0);var _0x46dcc2=moment(_0x3ec8c4)[_0xee91('0x51')](0x0);return _0x1d7e00['diff'](_0x46dcc2,_0xee91('0x52'));}function emit(_0x5cb980,_0x283ca1,_0x431528){io['to'](_0x5cb980)[_0xee91('0x53')](_0x283ca1,_0x431528);}function emitVoiceQueueSummary(_0x3335f6){if(_0x3335f6[_0xee91('0x54')]===_0xee91('0x55')){var _0x232834={'id':_0x3335f6['id'],'name':_0x3335f6[_0xee91('0x47')],'strategy':_0x3335f6[_0xee91('0x56')],'answered':_0x3335f6['answered'],'available':_0x3335f6[_0xee91('0x57')],'loggedIn':_0x3335f6['loggedIn'],'pTalking':_0x3335f6[_0xee91('0x58')],'sumBillable':_0x3335f6[_0xee91('0x59')],'sumDuration':_0x3335f6[_0xee91('0x5a')],'sumHoldTime':_0x3335f6[_0xee91('0x5b')]||0x0,'talking':_0x3335f6[_0xee91('0x5c')],'total':_0x3335f6[_0xee91('0x5d')],'type':_0x3335f6[_0xee91('0x54')],'unmanaged':_0x3335f6[_0xee91('0x5e')],'abandoned':_0x3335f6[_0xee91('0x5f')],'waiting':_0x3335f6[_0xee91('0x60')],'loggedInDb':_0x3335f6['loggedInDb'],'dialActive':_0x3335f6[_0xee91('0x61')],'dialMethod':_0x3335f6[_0xee91('0x62')],'dialOriginateCallerIdName':_0x3335f6['dialOriginateCallerIdName'],'dialOriginateCallerIdNumber':_0x3335f6[_0xee91('0x63')],'dialOriginateTimeout':_0x3335f6[_0xee91('0x64')],'dialPrefix':_0x3335f6[_0xee91('0x65')],'outboundAnswerAgiCallsDay':_0x3335f6[_0xee91('0x66')],'outboundAnswerCallsDay':_0x3335f6['outboundAnswerCallsDay'],'outboundBlacklistCallsDay':_0x3335f6[_0xee91('0x67')],'outboundBusyCallsDay':_0x3335f6[_0xee91('0x68')],'outboundCongestionCallsDay':_0x3335f6['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x3335f6[_0xee91('0x69')],'outboundDropCallsDayCallersExit':_0x3335f6[_0xee91('0x6a')],'outboundDropCallsDayTimeout':_0x3335f6[_0xee91('0x6b')],'outboundNoAnswerCallsDay':_0x3335f6[_0xee91('0x6c')],'outboundNoSuchCallsDay':_0x3335f6['outboundNoSuchCallsDay'],'outboundOriginateFailureCallsDay':_0x3335f6[_0xee91('0x6d')],'outboundReCallsDay':_0x3335f6[_0xee91('0x6e')],'outboundRejectCallsDay':_0x3335f6[_0xee91('0x6f')],'outboundUnknownCallsDay':_0x3335f6[_0xee91('0x70')],'predictiveIntervalAnsweredCalls':_0x3335f6[_0xee91('0x71')],'predictiveIntervalAvgHoldtime':_0x3335f6['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x3335f6[_0xee91('0x72')],'predictiveIntervalDroppedCallsCallersExit':_0x3335f6[_0xee91('0x73')],'predictiveIntervalDroppedCallsTimeout':_0x3335f6[_0xee91('0x74')],'predictiveIntervalErlangCalls':_0x3335f6[_0xee91('0x75')],'predictiveIntervalErlangCallsDroppedCalls':_0x3335f6[_0xee91('0x76')],'predictiveIntervalHitRate':_0x3335f6['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x3335f6['predictiveIntervalMultiplicativeFactor'],'predictiveIntervalPauses':_0x3335f6[_0xee91('0x77')],'predictiveIntervalAvailable':_0x3335f6[_0xee91('0x78')],'predictiveIntervalTotalCalls':_0x3335f6[_0xee91('0x79')],'message':_0x3335f6[_0xee91('0x45')],'originated':_0x3335f6[_0xee91('0x7a')],'erlangCalls':_0x3335f6[_0xee91('0x7b')],'erlangCallToSecond':_0x3335f6[_0xee91('0x7c')],'erlangAbandonmentRate':_0x3335f6[_0xee91('0x7d')],'erlangBusyFactor':_0x3335f6[_0xee91('0x7e')],'startPredictive':_0x3335f6['startPredictive'],'startProgressive':_0x3335f6[_0xee91('0x2d')]};if(_0x3335f6[_0xee91('0x7f')]){_0x232834[_0xee91('0x7f')]={'id':_0x3335f6['Trunk']['id'],'name':_0x3335f6[_0xee91('0x7f')][_0xee91('0x47')],'active':_0x3335f6[_0xee91('0x7f')][_0xee91('0x80')],'callerid':_0x3335f6[_0xee91('0x7f')][_0xee91('0x81')]};}if(_0x3335f6[_0xee91('0x4b')]){_0x232834[_0xee91('0x4b')]={'id':_0x3335f6[_0xee91('0x4b')]['id'],'name':_0x3335f6[_0xee91('0x4b')][_0xee91('0x47')]};}var _0x660ea2=md5(JSON[_0xee91('0x82')](_0x232834));if(_0x3335f6[_0xee91('0x3')]!==_0x660ea2){_0x3335f6[_0xee91('0x3')]=_0x660ea2;emit(util['format'](_0xee91('0x83'),_0x232834[_0xee91('0x47')]),_0xee91('0x84'),_0x232834);}}}function emitCampaignSummary(_0xec7ce9){if(_0xec7ce9[_0xee91('0x54')]===_0xee91('0x85')){emit(util[_0xee91('0x86')](_0xee91('0x87'),_0xec7ce9[_0xee91('0x47')]),_0xee91('0x88'),_0xec7ce9);}}function checkGetDataPredictive(_0x4ab61d){if(isNotNull(_0x4ab61d)){if(!_[_0xee91('0x89')](_0x4ab61d)){loggerPredictive[_0xee91('0x8a')](_0xee91('0x8b'));loggerPredictive['info'](_0xee91('0x8c'),_0x4ab61d[_0xee91('0x79')]);loggerPredictive[_0xee91('0x8a')](_0xee91('0x8d'),_0x4ab61d[_0xee91('0x71')]);loggerPredictive[_0xee91('0x8a')](_0xee91('0x8e'),_0x4ab61d['predictiveIntervalDroppedCallsTimeout']);loggerPredictive['info'](_0xee91('0x8f'),_0x4ab61d['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive[_0xee91('0x8a')](_0xee91('0x90'),_0x4ab61d[_0xee91('0x91')]);loggerPredictive['info']('AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4ab61d[_0xee91('0x72')]);loggerPredictive[_0xee91('0x8a')]('---------------------------');if(_0x4ab61d[_0xee91('0x79')]>0x0){if(!_[_0xee91('0x44')](_0x4ab61d[_0xee91('0x72')])&&_0x4ab61d[_0xee91('0x72')]>0x0){return!![];}else{loggerPredictive[_0xee91('0x8a')](_0xee91('0x92'));}if(!_['isUndefined'](_0x4ab61d[_0xee91('0x91')])&&_0x4ab61d[_0xee91('0x91')]>0x0){return!![];}else{loggerPredictive[_0xee91('0x8a')](_0xee91('0x93'));}}else{loggerPredictive[_0xee91('0x8a')](_0xee91('0x94'));}}else{loggerPredictive['info'](_0xee91('0x95'));}}else{loggerPredictive[_0xee91('0x8a')](_0xee91('0x95'));}return![];}function mergeDataErlangB(_0x2dfa5c){return function(_0xee1819){loggerPredictive[_0xee91('0x8a')](_0xee91('0x96'));loggerPredictive[_0xee91('0x8a')](_0xee91('0x97'),_0xee1819['erlangCalls']);loggerPredictive['info'](_0xee91('0x98'),_0xee1819[_0xee91('0x7c')]);loggerPredictive[_0xee91('0x8a')](_0xee91('0x99'),_0xee1819[_0xee91('0x7d')]);loggerPredictive['info'](_0xee91('0x9a'),_0xee1819[_0xee91('0x7e')]);loggerPredictive[_0xee91('0x8a')](_0xee91('0x99'),_0xee1819['erlangAbandonmentRate']);loggerPredictive[_0xee91('0x8a')](_0xee91('0x9b'));_[_0xee91('0x9c')](_0x2dfa5c,_0xee1819);};}function getDiff(_0x466d7b){var _0x348cdf=moment()[_0xee91('0x51')](0x0);var _0x4293da=moment(_0x466d7b)[_0xee91('0x51')](0x0);return _0x348cdf['diff'](_0x4293da,_0xee91('0x52'));}function ifInterval(_0x29d3ee,_0x21734d){if(_['isUndefined'](_0x21734d)){return![];}if(getDiff(_0x21734d)<_0x29d3ee*0x3c){return!![];}else{return![];}}function freeVariablesPredictive(_0x447904){if(isNotNull(_0x447904)){if(!_['isUndefined'](_0x447904[_0xee91('0x2d')])){_0x447904[_0xee91('0x2d')]=undefined;loggerPredictive[_0xee91('0x8a')](_0x447904[_0xee91('0x47')],'clearing\x20variable\x20start\x20progressive');}if(!_[_0xee91('0x44')](_0x447904['startPredictive'])){_0x447904[_0xee91('0x9d')]=undefined;loggerPredictive[_0xee91('0x8a')](_0x447904[_0xee91('0x47')],_0xee91('0x9e'));}if(!_[_0xee91('0x44')](_0x447904[_0xee91('0x9f')])){clearInterval(_0x447904['handlePredictive']);_0x447904['handlePredictive']=undefined;loggerPredictive[_0xee91('0x8a')](_0x447904[_0xee91('0x47')],_0xee91('0xa0'));}}}function erlangb(_0x40de24,_0x4f8e03){if(_0x4f8e03===0x0){return 0x0;}var _0xdef0e=0x1;for(var _0x340f5b=0x1;_0x340f5b<=_0x4f8e03;_0x340f5b+=0x1){_0xdef0e=0x1+_0xdef0e*_0x340f5b/_0x40de24;}return 0x1/_0xdef0e;}function isVoiceQueueOutbound(_0x4474d3){return _0x4474d3===_0xee91('0x55');}function isNotPreview(_0x304043){return _0x304043!==_0xee91('0x23');}function isCampaignIvr(_0x17245c){return _0x17245c===_0xee91('0x85');}function getCallerId(_0x5722b8,_0x432738,_0x5991ae){if(!_[_0xee91('0x44')](_0x5991ae)&&_0xee91('0xa1')===typeof _0x5991ae&&!_[_0xee91('0x89')](_0x5991ae)){if(!_[_0xee91('0x44')](_0x432738)&&'string'===typeof _0x432738&&!_[_0xee91('0x89')](_0x432738)){return util[_0xee91('0x86')](_0xee91('0xa2'),_0x432738,_0x5991ae);}return util['format']('\x22%s\x22\x20<%s>',_0x5991ae,_0x5991ae);}if(!_[_0xee91('0x44')](_0x5722b8)&&'string'===typeof _0x5722b8&&!_['isEmpty'](_0x5722b8)){return _0x5722b8;}return _0xee91('0xa3');}function loggerCatchQueueSummary(_0x2685dc,_0x1f70a2){return function(_0x11758b){freeVariablesPredictive(_0x1f70a2);emitVoiceQueueSummary(_0x1f70a2);emitCampaignSummary(_0x1f70a2);loggerSyncQueueSummary[_0xee91('0xa4')](_0x2685dc,util[_0xee91('0xa5')](_0x11758b,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x143d6f,_0x573d4e){return function(_0x51bb50){loggerPredictive[_0xee91('0xa4')](_0x573d4e[_0xee91('0x47')],_0x143d6f);loggerPredictive[_0xee91('0xa4')](_0x51bb50[_0xee91('0xa6')]);freeVariablesPredictive(_0x573d4e);};}function loggerCatch(_0x338c0b){return function(_0x527ce4){logger[_0xee91('0xa4')](_0x338c0b,util[_0xee91('0xa5')](_0x527ce4,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x39670c){return _0x39670c&&!_['isUndefined'](_0x39670c)&&_0x39670c[_0xee91('0xa7')]>0x0;}function decremetOriginate(_0x4c0fff){if(!_[_0xee91('0x44')](_0x4c0fff)&&_0x4c0fff!==null){if(_0x4c0fff[_0xee91('0xa8')](_0xee91('0x7a'))){if(_0x4c0fff[_0xee91('0x7a')]>0x0){_0x4c0fff[_0xee91('0x7a')]-=0x1;}else{logger[_0xee91('0xa4')](_0xee91('0xa9'));}}}else{logger[_0xee91('0xa4')](_0xee91('0xaa'));}}function checkContactLowerLimitOriginate(_0x1b3d51,_0x23b1a2,_0x25c53c){if(_0x23b1a2>_0x25c53c){for(var _0x90cf32=0x0;_0x90cf32<_0x23b1a2-_0x25c53c;_0x90cf32+=0x1){decremetOriginate(_0x1b3d51);}}}function loggerGetContactDialer(_0x3480e4,_0x5626a4,_0x16f7a8){return function(_0x49d010){checkContactLowerLimitOriginate(_0x5626a4,_0x16f7a8,0x0);logger[_0xee91('0xa4')](_0x3480e4,util[_0xee91('0xa5')](_0x49d010,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0xdbe401){return function(_0x456738){if(isNotNull(_0x456738)&&isNotNull(_0x456738[0x0])){if(_0x456738[0x0][_0xee91('0xab')]>0x0){_0xdbe401[_0xee91('0x45')]=_0xee91('0xac');logger[_0xee91('0x8a')](_0xee91('0xad')+_0xdbe401[_0xee91('0x47')],_0x456738[0x0]['contactsRescheduled'],_0xee91('0xae'));}else{_0xdbe401['message']=_0xee91('0xaf');logger['info'](_0xee91('0xb0')+_0xdbe401[_0xee91('0x47')]);}}};}function notSendMessagesQueue(_0x204942){if(_0x204942[_0xee91('0xb1')]){freeVariablesPredictive(_0x204942);if(_0x204942[_0xee91('0x7a')]===0x0&&_0x204942[_0xee91('0x5c')]===0x0&&_0x204942[_0xee91('0x60')]===0x0&&(_0x204942[_0xee91('0x58')]||0x0)===0x0){_0x204942[_0xee91('0xb1')]=![];_0x204942[_0xee91('0x57')]=0x0;_0x204942['message']=_0xee91('0x49');loggerSyncQueueSummary[_0xee91('0xa4')](_0xee91('0xb2'),_0x204942[_0xee91('0x47')],'is\x20not\x20active');}else{_0x204942['message']='IS_DISACTIVED';loggerSyncQueueSummary[_0xee91('0xa4')]('[syncQueueSummary]\x20Campaign\x20Queue:\x20',_0x204942[_0xee91('0x47')],'is\x20disactive');}emitVoiceQueueSummary(_0x204942);}}function notSendMessagesCampaign(_0x4ef9f8){if(_0x4ef9f8['sendMessageOneNotActive']){if(_0x4ef9f8[_0xee91('0x7a')]===0x0){_0x4ef9f8[_0xee91('0xb1')]=![];_0x4ef9f8[_0xee91('0x45')]=_0xee91('0x49');loggerSyncQueueSummary['error'](_0xee91('0xb3'),_0x4ef9f8[_0xee91('0x47')],_0xee91('0xb4'));}else{_0x4ef9f8['message']='IS_DISACTIVED';loggerSyncQueueSummary['error'](_0xee91('0xb3'),_0x4ef9f8['name'],'is\x20disactive');}emitCampaignSummary(_0x4ef9f8);}}function createObjHistory(_0x5657bc,_0x59d651,_0x37367c,_0x5bcf0a,_0x541675){_0x5657bc['message']=_0x37367c;var _0x5aed17=new Action(_0x5657bc,_0x59d651);var _0xb5a19e=new History(_0x5aed17);_0xb5a19e[_0xee91('0xb5')]=_0x5bcf0a;_0xb5a19e[_0xee91('0xb6')]=_0x541675;_0xb5a19e[_0xee91('0xb7')]=_0x5aed17[_0xee91('0xb8')];return _0xb5a19e;}Dialer['prototype'][_0xee91('0x43')]=function(){var _0x1272ba=this;setInterval(function(){_0x1272ba['clearZombieChannels'](_0x1272ba['uniqueId'],_0xee91('0xb9'));_0x1272ba[_0xee91('0xba')](_0x1272ba['actions'],_0xee91('0xbb'));},0x32c8);};Dialer[_0xee91('0x1e')]['clearZombieChannels']=function(_0x4f93fa,_0x475992){var _0xe3d048=this;for(var _0x14c8e4 in _0x4f93fa){if(_0x4f93fa[_0xee91('0xa8')](_0x14c8e4)){this['sequence'][_0xee91('0x1f')](function(){if(!_[_0xee91('0xbc')](_0x4f93fa[_0x14c8e4])){return ami[_0xee91('0xbd')]({'action':_0xee91('0xbe'),'channel':_0x4f93fa[_0x14c8e4][_0xee91('0xbf')]})[_0xee91('0xc0')](function(_0x3d31f7){if(_0x3d31f7['message']===_0xee91('0xc1')){setTimeout(function(){if(_0x4f93fa[_0x14c8e4]&&_0x4f93fa[_0x14c8e4][_0xee91('0x54')]!=='ivr'){_0xe3d048['updateOriginated'](_0xe3d048[_0xee91('0x24')][_0x4f93fa[_0x14c8e4][_0xee91('0xc2')]]);logger[_0xee91('0xa4')](_0xee91('0xc3'),_0x475992,_0x14c8e4,_0x4f93fa[_0x14c8e4][_0xee91('0xc2')]);delete _0x4f93fa[_0x14c8e4];}if(_0x4f93fa[_0x14c8e4]&&_0x4f93fa[_0x14c8e4][_0xee91('0x54')]==='ivr'){_0xe3d048['updateOriginated'](_0xe3d048[_0xee91('0x25')][_0x4f93fa[_0x14c8e4][_0xee91('0xc2')]]);logger[_0xee91('0xa4')](_0xee91('0xc4'),_0x475992,_0x14c8e4,_0x4f93fa[_0x14c8e4][_0xee91('0xc2')]);delete _0x4f93fa[_0x14c8e4];}},0x2328);}});}});}}};Dialer[_0xee91('0x1e')][_0xee91('0xc5')]=function(_0x5bda08){return BPromise[_0xee91('0xc6')]()[_0xee91('0xc7')](cmHopper[_0xee91('0xc5')](_0x5bda08))[_0xee91('0xc0')](loggerCatch(_0xee91('0xc8')));};Dialer[_0xee91('0x1e')][_0xee91('0xc9')]=function(_0x28c22a){return BPromise[_0xee91('0xc6')]()['then'](cmHopperBlack[_0xee91('0xc9')](_0x28c22a))[_0xee91('0xc0')](loggerCatch(_0xee91('0xca')));};Dialer[_0xee91('0x1e')][_0xee91('0xcb')]=function(_0x63b0cf){return BPromise[_0xee91('0xc6')]()['then'](cmHopperBlack[_0xee91('0xcb')](_0x63b0cf))[_0xee91('0xc0')](loggerCatch('[checkIsBlackListIvr]\x20'));};Dialer[_0xee91('0x1e')][_0xee91('0xcc')]=function(_0x25a95b){return BPromise['resolve']()[_0xee91('0xc7')](cmHopperHistory['avgHandleTime'](_0x25a95b))['catch'](loggerCatch('[averageHandleTime]\x20'));};Dialer[_0xee91('0x1e')][_0xee91('0xcd')]=function(_0x19b441){return BPromise['resolve']()[_0xee91('0xc7')](cmHopper[_0xee91('0xcd')](_0x19b441))['catch'](loggerCatch(_0xee91('0xce')));};Dialer[_0xee91('0x1e')][_0xee91('0xcf')]=function(_0x562c59,_0x23f8e8,_0x2ca652,_0x16ca49){return BPromise[_0xee91('0xc6')]()['then'](cmHopper[_0xee91('0xcf')](_0x562c59,_0x23f8e8,_0x2ca652,_0x16ca49))[_0xee91('0xc0')](loggerCatch(_0xee91('0xd0')));};Dialer[_0xee91('0x1e')]['getContactDialerIvr']=function(_0x32c81d,_0x4219f3,_0x59f050){return BPromise[_0xee91('0xc6')]()[_0xee91('0xc7')](cmHopper[_0xee91('0xd1')](_0x32c81d,_0x4219f3,_0x59f050))[_0xee91('0xc0')](loggerCatch(_0xee91('0xd0')));};Dialer[_0xee91('0x1e')]['getVoiceQueueRtPauses']=function(_0x5bf64e){return BPromise[_0xee91('0xc6')]()['then'](voiceQueueRt[_0xee91('0xd2')](_0x5bf64e))[_0xee91('0xc0')](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0xee91('0x1e')][_0xee91('0xd3')]=function(_0x2201ee){return BPromise['resolve']()[_0xee91('0xc7')](cmHopper[_0xee91('0xd3')](_0x2201ee))[_0xee91('0xc0')](loggerCatch('[moveContactManagedDialer]\x20'));};Dialer[_0xee91('0x1e')][_0xee91('0xd4')]=function(_0x4fa4f7){return BPromise[_0xee91('0xc6')]()[_0xee91('0xc7')](cmHopperHistory[_0xee91('0xd4')](_0x4fa4f7))[_0xee91('0xc0')](loggerCatch(_0xee91('0xd5')));};Dialer['prototype'][_0xee91('0xd6')]=function(_0x52074d){if(!_[_0xee91('0x44')](_0x52074d)&&_0x52074d!==null){if(_0x52074d['hasOwnProperty'](_0xee91('0x7a'))){if(_0x52074d[_0xee91('0x7a')]>0x0){_0x52074d[_0xee91('0x7a')]-=0x1;}else{logger['error'](_0xee91('0xd7'));}}}else{logger[_0xee91('0xa4')](_0xee91('0xd8'));}};Dialer[_0xee91('0x1e')][_0xee91('0xd9')]=function(_0x1d5ec4,_0x364050){var _0x2cb606=this;return function(_0x3f2aa6){_0x2cb606[_0xee91('0xd6')](_0x364050);logger[_0xee91('0xa4')](_0x1d5ec4,util[_0xee91('0xa5')](_0x3f2aa6,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0xee91('0xda')]=function(_0x30e9d8,_0x2fd1cd,_0xb0c9c7){var _0x58f77e={'state':0x19,'statedesc':'notFound'};this[_0xee91('0xd6')](_0x2fd1cd);this[_0xee91('0xdb')](_[_0xee91('0x9c')](_0x58f77e,_[_0xee91('0xdc')](_0xb0c9c7,[_0xee91('0xdd'),_0xee91('0xde'),_0xee91('0xdf'),_0xee91('0xe0'),'CampaignId'])),_0xee91('0xe1'),_0xee91('0xe2'));logger[_0xee91('0xa4')](_0x30e9d8);};Dialer[_0xee91('0x1e')][_0xee91('0xe3')]=function(_0x13ca83){return _0x13ca83===_0xee91('0xe4');};Dialer[_0xee91('0x1e')][_0xee91('0xe5')]=function(_0x341f67){return!_[_0xee91('0x44')](_0x341f67)&&_0x341f67&&!_[_0xee91('0x44')](_0x341f67[_0xee91('0x47')])&&!_[_0xee91('0x44')](_0x341f67[_0xee91('0x80')])&&_0x341f67['active']&&(this[_0xee91('0x27')][util['format'](_0xee91('0xe6'),_0x341f67[_0xee91('0x47')])][_0xee91('0xbe')]===_0xee91('0xe7')||this['trunks'][util['format'](_0xee91('0xe6'),_0x341f67[_0xee91('0x47')])][_0xee91('0xbe')]==='unmonitored');};Dialer[_0xee91('0x1e')][_0xee91('0xdb')]=function(_0x5301e8,_0x44f6ec,_0x508666){this[_0xee91('0xd4')](_0x5301e8)[_0xee91('0xc0')](loggerCatch(_0x44f6ec));this['moveContactManagedDialer'](_0x5301e8)[_0xee91('0xc0')](loggerCatch(_0x508666));};Dialer[_0xee91('0x1e')][_0xee91('0x3e')]=function(_0xa30036){var _0x2059ad=this[_0xee91('0xe8')][_0xa30036[_0xee91('0xe9')]];var _0x2ebb13;if(!_['isNil'](_0xa30036)&&!_[_0xee91('0xbc')](_0xa30036[_0xee91('0xea')])&&!_[_0xee91('0xbc')](_0xa30036[_0xee91('0xea')][_0xee91('0xeb')])&&_0xa30036[_0xee91('0xec')]==='xcally-motion-dialer'&&_0x2059ad){if(_0x2059ad[_0xee91('0x54')]!==_0xee91('0x85')&&this[_0xee91('0x24')][_0x2059ad['queue']]['dialAMDActive']&&_0xa30036[_0xee91('0xed')]==='HANGUP'){delete this[_0xee91('0xe8')][_0xa30036['uniqueid']];this[_0xee91('0xd6')](this[_0xee91('0x24')][_0x2059ad[_0xee91('0xc2')]]);this[_0xee91('0x24')][_0x2059ad['queue']][_0xee91('0xee')]+=0x1;this['voiceQueues'][_0x2059ad['queue']]['outboundAnswerAgiCallsDay']+=0x1;_0x2ebb13=new Hangup(_0x2059ad,_0xa30036);_0x2ebb13['state']=0x12;_0x2ebb13[_0xee91('0xb6')]=_0xee91('0xef');_0x2ebb13['membername']=_0xee91('0xf0');this['saveInDb'](_0x2ebb13,_0xee91('0xf1'),_0xee91('0xf2'));}if(_0x2059ad[_0xee91('0x54')]!==_0xee91('0x85')&&this['voiceQueues'][_0x2059ad[_0xee91('0xc2')]][_0xee91('0xf3')]&&_0xa30036[_0xee91('0xed')]===_0xee91('0xf4')){delete this[_0xee91('0xe8')][_0xa30036[_0xee91('0xe9')]];this[_0xee91('0xd6')](this[_0xee91('0x24')][_0x2059ad['queue']]);this['voiceQueues'][_0x2059ad[_0xee91('0xc2')]]['outboundAnswerCallsDay']+=0x1;this[_0xee91('0x24')][_0x2059ad[_0xee91('0xc2')]]['outboundAnswerAgiCallsDay']+=0x1;_0x2ebb13=new Hangup(_0x2059ad,_0xa30036);_0x2ebb13[_0xee91('0xb5')]=0x13;_0x2ebb13[_0xee91('0xb6')]=_0xee91('0xf5');_0x2ebb13[_0xee91('0xf6')]=_0xee91('0xf0');_0x2ebb13[_0xee91('0xf7')]=!![];this[_0xee91('0xdb')](_0x2ebb13,_0xee91('0xf8'),_0xee91('0xf9'));}if(_0x2059ad[_0xee91('0x54')]===_0xee91('0x85')&&this[_0xee91('0x25')][_0x2059ad['queue']][_0xee91('0xf3')]&&_0xa30036['value']===_0xee91('0xfa')){delete this[_0xee91('0xe8')][_0xa30036['uniqueid']];this[_0xee91('0xd6')](this[_0xee91('0x25')][_0x2059ad[_0xee91('0xc2')]]);_0x2ebb13=new Hangup(_0x2059ad,_0xa30036);_0x2ebb13[_0xee91('0xb5')]=0x12;_0x2ebb13['statedesc']='HangupInAMD';_0x2ebb13[_0xee91('0xf6')]=_0xee91('0xf0');this[_0xee91('0xdb')](_0x2ebb13,'[syncHangupInAMDIvr][createHistory]',_0xee91('0xfb'));}if(_0x2059ad[_0xee91('0x54')]===_0xee91('0x85')&&this[_0xee91('0x25')][_0x2059ad[_0xee91('0xc2')]][_0xee91('0xf3')]&&_0xa30036[_0xee91('0xed')]===_0xee91('0xf4')){delete this['uniqueId'][_0xa30036[_0xee91('0xe9')]];this[_0xee91('0xd6')](this['campaigns'][_0x2059ad['queue']]);_0x2ebb13=new Hangup(_0x2059ad,_0xa30036);_0x2ebb13[_0xee91('0xb5')]=0x13;_0x2ebb13[_0xee91('0xb6')]=_0xee91('0xf5');_0x2ebb13[_0xee91('0xf6')]=_0xee91('0xf0');_0x2ebb13[_0xee91('0xf7')]=!![];this[_0xee91('0xdb')](_0x2ebb13,_0xee91('0xfc'),_0xee91('0xfd'));}}};Dialer[_0xee91('0x1e')][_0xee91('0x3a')]=function(_0x12c3f0){var _0x365055=this[_0xee91('0xe8')][_0x12c3f0['uniqueid']];var _0x29a63e=this;var _0x2efd9f;if(_0x365055&&_0x365055['type']===_0xee91('0x85')){delete this[_0xee91('0xe8')][_0x12c3f0[_0xee91('0xe9')]];this[_0xee91('0xd6')](this['campaigns'][_0x365055[_0xee91('0xc2')]]);this['campaigns'][_0x365055[_0xee91('0xc2')]][_0xee91('0xfe')]+=0x1;_0x2efd9f=new Hangup(_0x365055,_0x12c3f0);this[_0xee91('0xd4')](_0x2efd9f)['catch'](loggerCatch(_0xee91('0xff')));this[_0xee91('0xd3')](_0x2efd9f)[_0xee91('0xc0')](loggerCatch(_0xee91('0x100')));}if(_0x365055&&_0x365055['type']!==_0xee91('0x85')&&isNotNull(this['voiceQueues'][_0x365055[_0xee91('0xc2')]][_0xee91('0x101')])){delete this[_0xee91('0xe8')][_0x12c3f0['uniqueid']];this[_0xee91('0xd6')](this[_0xee91('0x24')][_0x365055[_0xee91('0xc2')]]);this[_0xee91('0x24')][_0x365055[_0xee91('0xc2')]][_0xee91('0xee')]+=0x1;this[_0xee91('0x24')][_0x365055[_0xee91('0xc2')]][_0xee91('0x66')]+=0x1;_0x2efd9f=new Hangup(_0x365055,_0x12c3f0);_0x2efd9f[_0xee91('0xb5')]=0x10;_0x2efd9f[_0xee91('0xb6')]='AnswerAGI';_0x2efd9f[_0xee91('0xf6')]=_0xee91('0x102');this[_0xee91('0xd4')](_0x2efd9f)[_0xee91('0xc0')](loggerCatch('[syncHangupIvr][createHistory]'));this[_0xee91('0xd3')](_0x2efd9f)[_0xee91('0xc0')](loggerCatch('[syncHangupIvr]'));}if(_0x365055&&_0x365055[_0xee91('0x54')]!==_0xee91('0x85')&&!isNotNull(this['voiceQueues'][_0x365055[_0xee91('0xc2')]][_0xee91('0x101')])){delete this['uniqueId'][_0x12c3f0[_0xee91('0xe9')]];this[_0xee91('0xd6')](this[_0xee91('0x24')][_0x365055['queue']]);this[_0xee91('0x24')][_0x365055[_0xee91('0xc2')]]['outboundUnknownCallsDay']+=0x1;_0x2efd9f=new Hangup(_0x365055,_0x12c3f0);_0x2efd9f[_0xee91('0xb5')]=0xc;_0x2efd9f[_0xee91('0xb6')]=_0x12c3f0['cause-txt'];_0x2efd9f[_0xee91('0xf6')]=_0xee91('0x103');this[_0xee91('0xd4')](_0x2efd9f)[_0xee91('0xc0')](loggerCatch(_0xee91('0xff')));this[_0xee91('0xd3')](_0x2efd9f)['catch'](loggerCatch(_0xee91('0x100')));}};Dialer[_0xee91('0x1e')][_0xee91('0x37')]=function(_0x5a4db8){var _0x59f756=this[_0xee91('0xe8')][_0x5a4db8[_0xee91('0xe9')]];var _0x57ad0e=this;if(this[_0xee91('0x24')][_0x5a4db8[_0xee91('0xc2')]]){if(_0x59f756&&_0x59f756[_0xee91('0x54')]!==_0xee91('0x85')){delete this[_0xee91('0xe8')][_0x5a4db8[_0xee91('0xe9')]];this[_0xee91('0x24')][_0x5a4db8['queue']][_0xee91('0xee')]+=0x1;var _0x2fa8cb=new AgentComplete(_0x59f756,_0x5a4db8);if(_0x5a4db8[_0xee91('0x104')]==='agent'){_0x2fa8cb[_0xee91('0x105')]=this['voiceQueues'][_0x5a4db8[_0xee91('0xc2')]][_0xee91('0x106')]&&this[_0xee91('0x24')][_0x5a4db8[_0xee91('0xc2')]][_0xee91('0x107')]?moment()[_0xee91('0x86')](_0xee91('0x108')):undefined;}this[_0xee91('0xd4')](_0x2fa8cb)[_0xee91('0xc0')](loggerCatch(_0xee91('0x109')));this['moveContactManagedDialer'](_0x2fa8cb)[_0xee91('0xc0')](loggerCatch('[syncAgentComplete]'));}}};Dialer[_0xee91('0x1e')][_0xee91('0x31')]=function(_0x532f64){if(this[_0xee91('0x24')][_0x532f64[_0xee91('0xc2')]]){if(this['uniqueId'][_0x532f64['uniqueid']]&&this[_0xee91('0xe8')][_0x532f64[_0xee91('0xe9')]]['type']!==_0xee91('0x85')){this[_0xee91('0xd6')](this[_0xee91('0x24')][_0x532f64[_0xee91('0xc2')]]);this['uniqueId'][_0x532f64[_0xee91('0xe9')]][_0xee91('0x10a')]=moment()[_0xee91('0x86')](_0xee91('0x108'));}}};Dialer[_0xee91('0x1e')][_0xee91('0x10b')]=function(_0x52c125){this[_0xee91('0xd4')](_0x52c125)[_0xee91('0xc0')](loggerCatch(_0xee91('0x109')));this[_0xee91('0xd3')](_0x52c125)[_0xee91('0xc0')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));};Dialer[_0xee91('0x1e')][_0xee91('0x34')]=function(_0x49cf27){var _0x10803a=this[_0xee91('0xe8')][_0x49cf27['uniqueid']];var _0x112b42=this;if(this['voiceQueues'][_0x49cf27[_0xee91('0xc2')]]){if(_0x10803a&&_0x10803a[_0xee91('0x54')]!==_0xee91('0x85')){delete this[_0xee91('0xe8')][_0x49cf27[_0xee91('0xe9')]];this['updateOriginated'](this[_0xee91('0x24')][_0x49cf27[_0xee91('0xc2')]]);_0x10803a[_0xee91('0x10c')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');var _0x8eb00e=new QueueCallerAbandon(_0x10803a,_0x49cf27);if(getSeconds(_0x10803a[_0xee91('0x10c')],_0x10803a[_0xee91('0x10d')])>=_0x10803a['dialQueueTimeout']){this[_0xee91('0x24')][_0x49cf27['queue']][_0xee91('0x74')]+=0x1;this[_0xee91('0x24')][_0x49cf27[_0xee91('0xc2')]][_0xee91('0x6b')]+=0x1;this[_0xee91('0x24')][_0x49cf27[_0xee91('0xc2')]][_0xee91('0x76')]+=0x1;_0x8eb00e[_0xee91('0xb5')]=0xa;_0x8eb00e[_0xee91('0xb6')]=_0xee91('0x10e');_0x8eb00e[_0xee91('0x10f')]='TIMEOUT';_0x8eb00e[_0xee91('0x105')]=this[_0xee91('0x24')][_0x49cf27[_0xee91('0xc2')]]['dialQueueProject2']?moment()[_0xee91('0x86')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;this[_0xee91('0x10b')](_0x8eb00e);}else{this[_0xee91('0x24')][_0x49cf27['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0xee91('0x24')][_0x49cf27[_0xee91('0xc2')]]['outboundDropCallsDayCallersExit']+=0x1;_0x8eb00e[_0xee91('0xb5')]=0xb;_0x8eb00e[_0xee91('0xb6')]=_0xee91('0x110');_0x8eb00e['dropreason']=_0xee91('0x111');this[_0xee91('0x10b')](_0x8eb00e);}}}};Dialer['prototype']['syncNewExten']=function(_0x3b6e75){if(this[_0xee91('0x2a')][_0x3b6e75[_0xee91('0xe9')]]){this[_0xee91('0x2a')][_0x3b6e75[_0xee91('0xe9')]]['channel']=_0x3b6e75[_0xee91('0xbf')];}if(this['uniqueId'][_0x3b6e75[_0xee91('0xe9')]]){this['uniqueId'][_0x3b6e75['uniqueid']][_0xee91('0xbf')]=_0x3b6e75[_0xee91('0xbf')];}};Dialer[_0xee91('0x1e')][_0xee91('0x40')]=function(_0x1ea157){if(strategy[this[_0xee91('0x24')][this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]][_0xee91('0xc2')]]['strategy']]===_0xee91('0x1d')){if(this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]]&&_['isNil'](this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]][_0xee91('0x113')])&&_0x1ea157[_0xee91('0xbe')]==='1'&&_0x1ea157['paused']==='0'){if(this[_0xee91('0x26')][_0x1ea157['stateinterface']]){if(!this[_0xee91('0x26')][_0x1ea157[_0xee91('0x114')]][_0xee91('0x113')]){this['agents'][_0x1ea157[_0xee91('0x114')]][_0xee91('0x113')]=!![];this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]][_0xee91('0x113')]=!![];this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]]['stateinterface']=_0x1ea157[_0xee91('0x114')];}}}}else if((strategy[this[_0xee91('0x24')][this[_0xee91('0x2a')][_0x1ea157['actionid']]['queue']][_0xee91('0x56')]]||_0xee91('0x1c'))===_0xee91('0x1c')){if(this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]]){if(this[_0xee91('0x26')][_0x1ea157[_0xee91('0x114')]]){this['actions'][_0x1ea157['actionid']][_0xee91('0x114')]=_0x1ea157[_0xee91('0x114')];if(_['isNil'](this[_0xee91('0x2e')][this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]][_0xee91('0xc2')]])){this['queueBooked'][this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]][_0xee91('0xc2')]]=[];}this['queueBooked'][this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]][_0xee91('0xc2')]][_0xee91('0x115')](_[_0xee91('0x9c')](_['pick'](this[_0xee91('0x2a')][_0x1ea157[_0xee91('0x112')]],['idHopper','stateinterface']),{'status':_0x1ea157[_0xee91('0xbe')],'paused':_0x1ea157[_0xee91('0x116')]}));}}}};function unlockQueueStatus(_0x1517be,_0x176a1d){setTimeout(function(){if(_[_0xee91('0x44')](_0x1517be[_0xee91('0x117')])){loggerBooked[_0xee91('0xa4')](_0xee91('0x118'),_0x176a1d);}_0x1517be[_0xee91('0x117')]=!![];loggerBooked[_0xee91('0x8a')](_0xee91('0x119'),_0x176a1d,JSON['stringify'](_[_0xee91('0xdc')](_0x1517be,[_0xee91('0x47'),_0xee91('0x117')])));},0x1f3);}Dialer['prototype'][_0xee91('0x41')]=function(_0xd7f33c){var _0x478430=this;var _0x16db38=_0x478430[_0xee91('0x24')][_0x478430[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]]['queue']];if(strategy[this[_0xee91('0x24')][this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]][_0xee91('0x56')]]===_0xee91('0x1d')){if(this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]]&&this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0x114')]){this[_0xee91('0x23')][_0xee91('0x11a')](this[_0xee91('0x2a')][_0xd7f33c['actionid']][_0xee91('0x11b')],this[_0xee91('0x2a')][_0xd7f33c['actionid']]['stateinterface'])[_0xee91('0xc0')](function(_0xf76bdb){logger[_0xee91('0xa4')](_0xee91('0x11c'),util['inspect'](_0xf76bdb,{'showHidden':![],'depth':null}));})[_0xee91('0x21')](function(){_0x478430['updateOriginated'](_0x478430[_0xee91('0x24')][_0x478430['actions'][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]);_0x478430[_0xee91('0x26')][_0x478430[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]]['stateinterface']][_0xee91('0x113')]=![];delete _0x478430[_0xee91('0x2a')][_0xd7f33c['actionid']];unlockQueueStatus(_0x16db38);});}else{this[_0xee91('0xd6')](this[_0xee91('0x24')][this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]);this[_0xee91('0xcd')]({'active':![],'ContactId':this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xdd')],'ListId':this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xde')],'VoiceQueueId':this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]]['VoiceQueueId']||undefined,'CampaignId':this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]]['CampaignId']||undefined})[_0xee91('0xc0')](loggerCatch(_0xee91('0x11d')));delete this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]];unlockQueueStatus(_0x16db38);}}else if((strategy[this[_0xee91('0x24')][this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]['strategy']]||_0xee91('0x1c'))===_0xee91('0x1c')){var _0x1162b5;if(this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]]&&!_[_0xee91('0x89')](this[_0xee91('0x2e')][this[_0xee91('0x2a')][_0xd7f33c['actionid']][_0xee91('0xc2')]])){if(this['queueBookedRR'][_0x478430[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]){this[_0xee91('0x2f')][_0x478430['actions'][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]=this[_0xee91('0x2f')][this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]?this['queueBookedRR'][this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]:this[_0xee91('0x2e')][this[_0xee91('0x2a')][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]]?this[_0xee91('0x2e')][this['actions'][_0xd7f33c['actionid']]['queue']]['_rr']||0x0:0x0;}this[_0xee91('0x2e')][this['actions'][_0xd7f33c['actionid']][_0xee91('0xc2')]][_0xee91('0x11e')]=this[_0xee91('0x2f')][this['actions'][_0xd7f33c[_0xee91('0x112')]][_0xee91('0xc2')]];for(var _0x306000=0x0;_0x306000=0x0?!![]:![];})[_0xee91('0xc0')](myreject(_0x19c73c)));}}else{_0x1dd4ad[_0xee91('0x115')](ami[_0xee91('0xbd')]({'action':_0xee91('0x13a'),'command':util['format'](_0xee91('0x136'),_0xe0be49,!_[_0xee91('0x44')](config[_0xee91('0x137')][_0x47905d])?_0x47905d:'')})[_0xee91('0xc7')](function(_0x35dd29){return _0x35dd29[_0xee91('0x138')]['indexOf'](_0xee91('0x139'))>=0x0?!![]:![];})[_0xee91('0xc0')](myreject(_0x19c73c)));}BPromise[_0xee91('0x13b')](_0x1dd4ad)[_0xee91('0xc7')](function(_0x102d97){var _0x2726ba=_['some'](_0x102d97);if(_0x2726ba){return _0x2ac53(_0x2726ba);}else{_0x59d242[_0xee91('0x45')]=_0x526b78?_0xee91('0x13c'):_0xee91('0x13d');return _0x19c73c(msgResponse(_0xee91('0x13e'),_0xee91('0x12f'),_0xee91('0x13f')+_0x526b78+'\x20'+_0x1f1393+_0xee91('0x140')+util['inspect'](_0xe0be49,{'showHidden':![],'depth':null})+_0xee91('0x141')+_0x47905d));}})[_0xee91('0xc0')](function(_0x95bc9d){return _0x19c73c(msgResponse(_0xee91('0x12d'),_0xee91('0x12f'),JSON['stringify'](_0x95bc9d)));});});};Dialer[_0xee91('0x1e')]['checkDialMethod']=function(_0x5bd76e){var _0x43bef7=this;return function(){switch(_0x5bd76e[_0xee91('0x62')]){case _0xee91('0x142'):freeVariablesPredictive(_0x5bd76e);_0x43bef7[_0xee91('0x143')](_0x5bd76e,0x1);break;case'power':freeVariablesPredictive(_0x5bd76e);_0x43bef7['handlePower'](_0x5bd76e,_0x5bd76e[_0xee91('0x144')]);break;case _0xee91('0x9'):_0x43bef7[_0xee91('0x9')](_0x5bd76e);break;case'booked':freeVariablesPredictive(_0x5bd76e);_0x43bef7[_0xee91('0x143')](_0x5bd76e,0x1);break;default:freeVariablesPredictive(_0x5bd76e);logger[_0xee91('0xa4')](_0xee91('0x145'),_0x5bd76e[_0xee91('0x47')],_0xee91('0x146'));}};};Dialer[_0xee91('0x1e')]['launchHandleIvr']=function(_0x2c8bb1){var _0x504e6b=this;return function(){_0x504e6b[_0xee91('0x147')](_0x2c8bb1);};};Dialer[_0xee91('0x1e')][_0xee91('0xa')]=function(_0x38228c){var _0x3b92aa=this;if(isNotPreview(_0x38228c['dialMethod'])){if(isVoiceQueueOutbound(_0x38228c[_0xee91('0x54')])&&isActive(_0x38228c[_0xee91('0x61')])){_0x38228c[_0xee91('0xb1')]=!![];BPromise[_0xee91('0xc6')]()[_0xee91('0xc7')](checkIsLoggedIn(_0x38228c,_0x38228c['loggedIn']))[_0xee91('0xc7')](checkIsActive(_0x38228c,_0x38228c['dialActive']))[_0xee91('0xc7')](checkInterval(_0x38228c))['then'](_0x3b92aa['checkIsTrunkReachable'](_0x38228c))[_0xee91('0xc7')](_0x3b92aa['checkIfTime'](_0x38228c[_0xee91('0x148')],_0x38228c[_0xee91('0x149')],_0x38228c[_0xee91('0x47')],_0x38228c))[_0xee91('0xc7')](_0x3b92aa[_0xee91('0x12e')](_0x38228c[_0xee91('0x4b')],_0x38228c[_0xee91('0x149')],_0x38228c['name'],_0x38228c))['then'](_0x3b92aa['checkDialMethod'](_0x38228c))[_0xee91('0xc0')](loggerCatchQueueSummary(_0xee91('0x14a'),_0x38228c));}else{notSendMessagesQueue(_0x38228c);}}else{freeVariablesPredictive(_0x38228c);}};Dialer[_0xee91('0x1e')][_0xee91('0x128')]=function(){var _0x46e94e=this;var _0x288d5e;for(var _0x5a2b12 in this[_0xee91('0x25')]){if(this['campaigns'][_0xee91('0xa8')](_0x5a2b12)){_0x288d5e=this[_0xee91('0x25')][_0x5a2b12];if(isCampaignIvr(_0x288d5e[_0xee91('0x54')])&&isActive(_0x288d5e['active'])){_0x288d5e[_0xee91('0xb1')]=!![];BPromise[_0xee91('0xc6')]()[_0xee91('0xc7')](checkIsActive(_0x288d5e,_0x288d5e[_0xee91('0x80')]))[_0xee91('0xc7')](checkInterval(_0x288d5e))[_0xee91('0xc7')](_0x46e94e[_0xee91('0x129')](_0x288d5e))[_0xee91('0xc7')](_0x46e94e['checkIfTime'](_0x288d5e[_0xee91('0x148')],_0x288d5e[_0xee91('0x149')],_0x288d5e[_0xee91('0x47')],_0x288d5e))[_0xee91('0xc7')](_0x46e94e['checkIfTimeIntervals'](_0x288d5e[_0xee91('0x4b')],_0x288d5e[_0xee91('0x149')],_0x288d5e[_0xee91('0x47')],_0x288d5e))[_0xee91('0xc7')](_0x46e94e[_0xee91('0x14b')](_0x288d5e))[_0xee91('0xc0')](loggerCatchQueueSummary(_0xee91('0x14c'),_0x288d5e));}else{notSendMessagesCampaign(_0x288d5e);}}}};function getCallerIdRandom(_0x52cc28,_0x4efb87){var _0x3516cc,_0xe86f89,_0x5b29e9;if(_0x4efb87<=0x0){_0x4efb87=0x1;}_0x3516cc=new RegExp('\x5cw{0,'+_0x4efb87+'}$');_0xe86f89=Math[_0xee91('0x14d')](0xa,_0x4efb87-0x1);_0x5b29e9=Math[_0xee91('0x14d')](0xa,_0x4efb87)-0x1;return util[_0xee91('0x86')]('%s',_[_0xee91('0x14e')](_0x52cc28,_0x3516cc,_[_0xee91('0x14f')](_0xe86f89,_0x5b29e9)));}function extractCalleridName(_0x4dbcab){var _0x323f48=_0x4dbcab[_0xee91('0x150')](/"(.*?)"/);return _0x323f48?_0x323f48[0x1]:_0x4dbcab;}function extractCalleridNumber(_0x36a17c){var _0x1ffc1c=_0x36a17c[_0xee91('0x150')](/<(.*?)>/);return _0x1ffc1c?_0x1ffc1c[0x1]:_0x36a17c;}Dialer['prototype'][_0xee91('0x151')]=function(_0x461239,_0x2dfc20){var _0x44da12=this;var _0x1a6a24=uuid['v4']();this[_0xee91('0x2a')][_0x1a6a24]=new Action(_0x461239,_0x2dfc20,_0x1a6a24);return new BPromise(function(_0x2666c3,_0x369c91){if(_[_0xee91('0x44')](_0x461239)&&'object'!==typeof _0x461239){return _0x369c91(msgResponse('originate','Failure',_0xee91('0x152')));}if(_[_0xee91('0x44')](_0x2dfc20[_0xee91('0x153')][_0xee91('0x154')])||_0x2dfc20['Contact'][_0xee91('0x154')]===null){return _0x369c91(msgResponse(_0xee91('0x155'),_0xee91('0x12f'),'contact\x20is\x20undefine'));}var _0x2355df={'XMD-CALLERID':_0x44da12[_0xee91('0x2a')][_0x1a6a24][_0xee91('0x156')](),'XMD-AGI':_0x461239[_0xee91('0x101')]?util[_0xee91('0x86')]('\x22agi://%s/square,%s\x22',ipAgi,_0x461239[_0xee91('0x101')]):'NONE','XMD-AGIAFTER':_0x461239[_0xee91('0x106')]?util[_0xee91('0x86')](_0xee91('0x157'),ipAgi,_0x461239[_0xee91('0x106')]):_0xee91('0x158'),'XMD-QUEUE':_0x461239['type']===_0xee91('0x55')?util[_0xee91('0x86')](_0xee91('0x159'),_0x461239[_0xee91('0x47')],_0x461239['dialQueueOptions']||'',_0x461239[_0xee91('0x107')]?'c':'',_0x461239[_0xee91('0x15a')]||0x3):_0xee91('0x158'),'XMD-CONTACTID':_0x2dfc20[_0xee91('0xdd')],'XMD-CDRTYPE':_0xee91('0x6'),'CALLERID(all)':_0x44da12[_0xee91('0x2a')][_0x1a6a24][_0xee91('0x156')](),'XMD-AMD':_0x461239[_0xee91('0xf3')]?_0xee91('0x15b'):_0xee91('0x158'),'XMD-DESTINATION':_0xee91('0x15c')};if(_0x461239['dialAMDActive']){_0x2355df[_0xee91('0x15d')]=_0x461239[_0xee91('0x15e')]||0x9c4;_0x2355df[_0xee91('0x15f')]=_0x461239[_0xee91('0x160')]||0x5dc;_0x2355df[_0xee91('0x161')]=_0x461239['dialAMDAfterGreetingSilence']||0x320;_0x2355df[_0xee91('0x162')]=_0x461239[_0xee91('0x163')]||0x1388;_0x2355df[_0xee91('0x164')]=_0x461239[_0xee91('0x165')]||0x64;_0x2355df[_0xee91('0x166')]=_0x461239['dialAMDBetweenWordsSilence']||0x32;_0x2355df['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x461239['dialAMDMaximumNumberOfWords']||0x3;_0x2355df[_0xee91('0x167')]=_0x461239[_0xee91('0x168')]||0x100;_0x2355df[_0xee91('0x169')]=_0x461239[_0xee91('0x16a')]||0x1388;}if(_0x461239[_0xee91('0x54')]==='outbound'){_0x2355df['XMD-VOICEQUEUEID']=_0x2dfc20[_0xee91('0xe0')];}else{_0x2355df['XMD-CAMPAIGNID']=_0x2dfc20[_0xee91('0x125')];}for(var _0x5258cb in _0x2dfc20[_0xee91('0x153')]){if(_0x2dfc20['Contact'][_0xee91('0xa8')](_0x5258cb)){if(isNotNull(_0x2dfc20[_0xee91('0x153')][_0x5258cb])&&_0x5258cb!=='id'&&_0x5258cb!==_0xee91('0x16b')&&_0x5258cb!==_0xee91('0x16c')&&_0x5258cb!==_0xee91('0x16d')){_0x2355df[util[_0xee91('0x86')](_0xee91('0x16e'),_0xee91('0x16f'),_['toUpper'](_0x5258cb))]=_0x2dfc20[_0xee91('0x153')][_0x5258cb];}}}var _0x2a2efd=_0x44da12[_0xee91('0xe5')](_0x461239[_0xee91('0x7f')])?getCallerId(_0x461239['Trunk']['callerid'],_0x461239['dialOriginateCallerIdName'],_0x461239[_0xee91('0x170')]>0x0?getCallerIdRandom(_0x461239[_0xee91('0x63')],_0x461239[_0xee91('0x170')]):_0x461239['dialOriginateCallerIdNumber']):getCallerId(_['isNil'](_0x461239[_0xee91('0x12a')])?_0x461239[_0xee91('0x7f')][_0xee91('0x81')]:_0x461239[_0xee91('0x12a')][_0xee91('0x81')],_0x461239[_0xee91('0x171')],_0x461239[_0xee91('0x170')]>0x0?getCallerIdRandom(_0x461239[_0xee91('0x63')],_0x461239['dialRandomLastDigitCallerIdNumber']):_0x461239['dialOriginateCallerIdNumber']);if(_0x2a2efd){_0x2355df[_0xee91('0x172')]=_0x44da12[_0xee91('0x2a')][_0x1a6a24][_0xee91('0x173')]=extractCalleridName(_0x2a2efd);_0x2355df['XMD-ORIGINATECALLERIDNUM']=_0x44da12[_0xee91('0x2a')][_0x1a6a24][_0xee91('0x174')]=extractCalleridNumber(_0x2a2efd);}return ami[_0xee91('0xbd')]({'actionid':_0x1a6a24,'action':'originate','channel':_0x44da12[_0xee91('0xe5')](_0x461239['Trunk'])?util[_0xee91('0x86')]('SIP/%s/%s%s',_0x461239['Trunk'][_0xee91('0x47')],isNotNull(_0x461239[_0xee91('0x65')])?_0x461239['dialPrefix'][_0xee91('0x175')]()||'':'',_0x461239['dialCutDigit']>0x0?_0x2dfc20[_0xee91('0x153')][_0xee91('0x154')][_0xee91('0x176')](_0x461239[_0xee91('0x177')]):_0x2dfc20[_0xee91('0x153')][_0xee91('0x154')]):util[_0xee91('0x86')](_0xee91('0x178'),_[_0xee91('0xbc')](_0x461239[_0xee91('0x12a')])?_0x461239['Trunk']['name']:_0x461239[_0xee91('0x12a')][_0xee91('0x47')],isNotNull(_0x461239['dialPrefix'])?_0x461239[_0xee91('0x65')][_0xee91('0x175')]()||'':'',_0x461239[_0xee91('0x177')]>0x0?_0x2dfc20[_0xee91('0x153')][_0xee91('0x154')][_0xee91('0x176')](_0x461239['dialCutDigit']):_0x2dfc20[_0xee91('0x153')]['phone']),'callerid':_0x2a2efd,'Exten':_0xee91('0x15c'),'Context':_0xee91('0x179'),'Priority':'1','variable':_0x2355df,'timeout':(_0x461239[_0xee91('0x64')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1a6a24})[_0xee91('0xc7')](function(_0x1e4f4f){return _0x2666c3(_0x1e4f4f);})[_0xee91('0xc0')](function(_0x228433){_0x461239[_0xee91('0x6d')]+=0x1;var _0x1797b6=new History(_0x44da12[_0xee91('0x2a')][_0x1a6a24]);logger[_0xee91('0xa4')](util['format'](_0xee91('0x17a'),JSON[_0xee91('0x82')](_0x228433)));_0x1797b6[_0xee91('0xb5')]=0xe;_0x1797b6[_0xee91('0xb6')]=_0xee91('0x17b');_0x1797b6[_0xee91('0xb8')]=moment()['format'](_0xee91('0x108'));_0x1797b6[_0xee91('0xb7')]=_0x1797b6[_0xee91('0xb8')];_0x44da12[_0xee91('0xd4')](_0x1797b6)[_0xee91('0xc0')](loggerCatch(_0xee91('0x17c')));_0x44da12['moveContactManagedDialer'](_0x1797b6)[_0xee91('0xc0')](loggerCatch(_0xee91('0x17c')))[_0xee91('0x21')](function(){delete _0x44da12[_0xee91('0x2a')][_0x1a6a24];return _0x369c91(msgResponse(_0xee91('0x155'),_0xee91('0x50'),_0xee91('0x17d')));});});});};Dialer[_0xee91('0x1e')][_0xee91('0x35')]=function(_0x3a4c67){var _0x5704db=this[_0xee91('0x2a')][_0x3a4c67[_0xee91('0x112')]];var _0x38654=this;if(_0x5704db){delete this[_0xee91('0x2a')][_0x3a4c67[_0xee91('0x112')]];_0x5704db[_0xee91('0x10d')]=moment()[_0xee91('0x86')](_0xee91('0x108'));var _0x52c8fc=_0x5704db[_0xee91('0x54')]==='ivr'?this['campaigns'][_0x5704db['queue']]:this[_0xee91('0x24')][_0x5704db[_0xee91('0x17e')]()];if(!this[_0xee91('0xe3')](_0x3a4c67[_0xee91('0x17f')])){this['updateOriginated'](_0x52c8fc);return this[_0xee91('0x180')](_0x5704db,_0x52c8fc,_0x3a4c67)[_0xee91('0xc7')](function(_0x3856ee){})['catch'](loggerCatch(_0xee91('0x181')));}else{this[_0xee91('0xe8')][_0x3a4c67[_0xee91('0xe9')]]=_0x5704db;}}};Dialer[_0xee91('0x1e')][_0xee91('0x182')]=function(_0x43dea6,_0x46def0,_0xe642ce){var _0x45b903=new History(_0x46def0);if(_0x45b903[_0xee91('0x183')]+_0x45b903[_0xee91('0x184')]+_0x45b903['countnoanswerretry']>=_0xe642ce['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x43dea6){case 0x3:if(_0x45b903[_0xee91('0x185')]>=_0xe642ce[_0xee91('0x186')]-0x1){return!![];}else{this[_0xee91('0xcd')]({'active':![],'countnoanswerretry':_0x45b903[_0xee91('0x185')]+=0x1,'scheduledat':moment()['add'](_0xe642ce[_0xee91('0x187')],_0xee91('0x188'))[_0xee91('0x86')](_0xee91('0x108')),'ContactId':_0x45b903[_0xee91('0xdd')],'ListId':_0x45b903[_0xee91('0xde')],'VoiceQueueId':_0x45b903[_0xee91('0xe0')]||undefined,'CampaignId':_0x45b903[_0xee91('0x125')]||undefined})['catch'](loggerCatch(_0xee91('0x189')));}break;case 0x5:if(_0x45b903[_0xee91('0x183')]>=_0xe642ce['dialBusyMaxRetry']-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countbusyretry':_0x45b903['countbusyretry']+=0x1,'scheduledat':moment()[_0xee91('0x18a')](_0xe642ce[_0xee91('0x18b')],'minutes')[_0xee91('0x86')](_0xee91('0x108')),'ContactId':_0x45b903['ContactId'],'ListId':_0x45b903[_0xee91('0xde')],'VoiceQueueId':_0x45b903[_0xee91('0xe0')]||undefined,'CampaignId':_0x45b903['CampaignId']||undefined})['catch'](loggerCatch(_0xee91('0x18c')));}break;case 0x8:if(_0x45b903[_0xee91('0x184')]>=_0xe642ce['dialCongestionMaxRetry']-0x1){return!![];}else{this[_0xee91('0xcd')]({'active':![],'countcongestionretry':_0x45b903['countcongestionretry']+=0x1,'scheduledat':moment()[_0xee91('0x18a')](_0xe642ce[_0xee91('0x18d')],_0xee91('0x188'))[_0xee91('0x86')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x45b903[_0xee91('0xdd')],'ListId':_0x45b903[_0xee91('0xde')],'VoiceQueueId':_0x45b903[_0xee91('0xe0')]||undefined,'CampaignId':_0x45b903[_0xee91('0x125')]||undefined})[_0xee91('0xc0')](loggerCatch('[rescheduleContact]\x20[Congestion]'));}break;default:return!![];}};Dialer[_0xee91('0x1e')][_0xee91('0x180')]=function(_0x51fc1d,_0x1f7998,_0x10b63f){var _0x6bff55=this;var _0x4c7c6f=new History(_0x51fc1d);return new BPromise(function(_0x40170e,_0x383d5a){if(_[_0xee91('0x44')](_0x1f7998)&&'object'!==typeof _0x1f7998){return _0x383d5a(msgResponse(_0xee91('0x18e'),_0xee91('0x12f'),_0xee91('0x18f')));}if(_[_0xee91('0x44')](_0x10b63f)&&_0xee91('0x190')!==typeof _0x10b63f){return _0x383d5a(msgResponse(_0xee91('0x18e'),'Failure',_0xee91('0x191')));}switch(_0x10b63f['reason']){case'0':_0x1f7998[_0xee91('0x192')]+=0x1;_0x4c7c6f[_0xee91('0xb5')]=0x0;_0x4c7c6f['statedesc']=_0xee91('0x193');_0x6bff55[_0xee91('0xd4')](_0x4c7c6f)[_0xee91('0xc0')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x6bff55[_0xee91('0x182')](0x0,_0x51fc1d,_0x1f7998)){if(_0x4c7c6f['countbusyretry']+_0x4c7c6f[_0xee91('0x184')]+_0x4c7c6f['countnoanswerretry']>=_0x1f7998[_0xee91('0x194')]){_0x6bff55[_0xee91('0x195')](_0x4c7c6f,_0x40170e,_0x383d5a,_0xee91('0x196'));}else{_0x6bff55[_0xee91('0x197')](_0x4c7c6f,_0x40170e,_0x383d5a,_0xee91('0x196'));}}break;case'3':_0x1f7998[_0xee91('0x6c')]+=0x1;_0x4c7c6f['state']=0x3;_0x4c7c6f[_0xee91('0xb6')]=_0xee91('0x198');_0x4c7c6f[_0xee91('0x185')]+=0x1;_0x4c7c6f['countglobal']+=0x1;_0x6bff55[_0xee91('0xd4')](_0x4c7c6f)[_0xee91('0xc0')](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x6bff55['checkRetriveMax'](0x3,_0x51fc1d,_0x1f7998)){if(_0x4c7c6f['countnoanswerretry']>=_0x1f7998[_0xee91('0x186')]){_0x6bff55[_0xee91('0x197')](_0x4c7c6f,_0x40170e,_0x383d5a,_0xee91('0x199'));}else{_0x6bff55[_0xee91('0x195')](_0x4c7c6f,_0x40170e,_0x383d5a,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x1f7998[_0xee91('0x68')]+=0x1;_0x4c7c6f[_0xee91('0xb5')]=0x5;_0x4c7c6f['statedesc']=_0xee91('0x19a');_0x4c7c6f[_0xee91('0x183')]+=0x1;_0x4c7c6f[_0xee91('0x19b')]+=0x1;_0x6bff55['createHistory'](_0x4c7c6f)[_0xee91('0xc0')](loggerCatch('[syncAgentComplete][createHistory][5]'));if(_0x6bff55[_0xee91('0x182')](0x5,_0x51fc1d,_0x1f7998)){if(_0x4c7c6f[_0xee91('0x183')]>=_0x1f7998[_0xee91('0x19c')]){_0x6bff55[_0xee91('0x197')](_0x4c7c6f,_0x40170e,_0x383d5a,_0xee91('0x19d'));}else{_0x6bff55[_0xee91('0x195')](_0x4c7c6f,_0x40170e,_0x383d5a,'reason\x205\x20busy');}}break;case'8':_0x1f7998['outboundCongestionCallsDay']+=0x1;_0x4c7c6f[_0xee91('0xb5')]=0x8;_0x4c7c6f[_0xee91('0xb6')]='Congestion';_0x4c7c6f[_0xee91('0x184')]+=0x1;_0x4c7c6f['countglobal']+=0x1;_0x6bff55[_0xee91('0xd4')](_0x4c7c6f)[_0xee91('0xc0')](loggerCatch(_0xee91('0x19e')));if(_0x6bff55[_0xee91('0x182')](0x8,_0x51fc1d,_0x1f7998)){if(_0x4c7c6f[_0xee91('0x184')]>=_0x1f7998[_0xee91('0x19f')]){_0x6bff55[_0xee91('0x197')](_0x4c7c6f,_0x40170e,_0x383d5a,_0xee91('0x1a0'));}else{_0x6bff55[_0xee91('0x195')](_0x4c7c6f,_0x40170e,_0x383d5a,'reason\x208\x20congestion');}}break;default:_0x1f7998[_0xee91('0x70')]+=0x1;_0x4c7c6f[_0xee91('0xb5')]=0xc;_0x4c7c6f[_0xee91('0xb6')]=_0x10b63f[_0xee91('0x104')];_0x6bff55[_0xee91('0xd4')](_0x4c7c6f)[_0xee91('0xc0')](loggerCatch(_0xee91('0x1a1')));if(_0x6bff55[_0xee91('0x182')](_0x10b63f[_0xee91('0x104')],_0x51fc1d,_0x1f7998)){if(_0x4c7c6f[_0xee91('0x183')]+_0x4c7c6f['countcongestionretry']+_0x4c7c6f[_0xee91('0x185')]>=_0x1f7998['dialGlobalMaxRetry']){_0x6bff55['stateGlobal'](_0x4c7c6f,_0x40170e,_0x383d5a,_0x10b63f[_0xee91('0x104')]);}else{_0x6bff55[_0xee91('0x197')](_0x4c7c6f,_0x40170e,_0x383d5a,_0x10b63f[_0xee91('0x104')]);}}}});};Dialer[_0xee91('0x1e')][_0xee91('0x195')]=function(_0x420293,_0x5d3132,_0x2de9b4,_0x1bc280){var _0x5ce014=new Final(_0x420293);_0x5ce014[_0xee91('0xb5')]=0xf;_0x5ce014[_0xee91('0xb6')]='Global';this[_0xee91('0x197')](_0x5ce014,_0x5d3132,_0x2de9b4,_0x1bc280);};Dialer[_0xee91('0x1e')][_0xee91('0x197')]=function(_0x22cdf3,_0x364250,_0x1cbb8e,_0x5bba80){this[_0xee91('0xd3')](_0x22cdf3)['then'](function(_0x3c2db6){return _0x364250(msgResponse(_0xee91('0x18e'),_0xee91('0xe4'),_0x5bba80));})[_0xee91('0xc0')](function(_0x2ef26f){return _0x1cbb8e(msgResponse(_0xee91('0x1a2'),_0xee91('0x12f'),_0xee91('0x1a3')));});};Dialer[_0xee91('0x1e')][_0xee91('0x9')]=function(_0x31a005){var _0x1f4f15=this;var _0x3ecd1a=_0x31a005['dialPredictiveOptimizationPercentage']/0x64;var _0x22099b=_0x31a005[_0xee91('0x6b')]/(_0x31a005[_0xee91('0x6b')]+_0x31a005['outboundAnswerCallsDay']);var _0x2357bd=Math['round'](_0x31a005[_0xee91('0x78')]*(_0x31a005[_0xee91('0x1a4')]/0x64));var _0x572a2f=Math[_0xee91('0x1a5')](_0x31a005[_0xee91('0x78')]*(_0x31a005[_0xee91('0x1a6')]/0x64));var _0xb1b2df=_0x31a005[_0xee91('0x57')]+_0x31a005[_0xee91('0x5c')];var _0x8d2760=Math[_0xee91('0x1a7')](_0x31a005[_0xee91('0x7b')]*_0x31a005['erlangAbandonmentRate']*_0x31a005[_0xee91('0x1a8')]*_0x31a005['predictiveIntervalMultiplicativeFactor']);if(_[_0xee91('0x44')](_0x31a005[_0xee91('0x2d')])){if(!_['isUndefined'](_0x31a005[_0xee91('0x9d')])){_0x31a005[_0xee91('0x9d')]=undefined;loggerPredictive[_0xee91('0xa4')]('[startMethodPredictive][StartProgressive]',_0xee91('0x1a9'));}if(!_[_0xee91('0x44')](_0x31a005['handlePredictive'])){loggerPredictive[_0xee91('0xa4')](_0xee91('0x1aa'),'check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x31a005['handlePredictive']);_0x31a005['handlePredictive']=undefined;}_0x31a005[_0xee91('0x2d')]=moment()[_0xee91('0x86')](_0xee91('0x108'));loggerPredictive['info'](_0x31a005[_0xee91('0x47')],'collection\x20data\x20in\x20progressive\x20at',_0x31a005['startProgressive']);this[_0xee91('0x143')](_0x31a005,0x1);}else if(ifInterval(_0x31a005[_0xee91('0x1ab')],_0x31a005[_0xee91('0x2d')])){this[_0xee91('0x143')](_0x31a005,0x1);loggerPredictiveCalls[_0xee91('0x8a')]('[startMethodPredictive][StartProgressive][Loop]',_0x31a005[_0xee91('0x2d')],_0x31a005[_0xee91('0x47')]);_0x31a005[_0xee91('0x7b')]=0x0;_0x31a005[_0xee91('0x76')]=0x0;}else if(_0x3ecd1a<_0x22099b&&_0x31a005['dialPredictiveOptimization']==='dropRate'){freeVariablesPredictive(_0x31a005);loggerPredictive['info'](_0xee91('0x1ac'),'Dropped\x20calls\x20day',_0x22099b,_0xee91('0x2d'),_0x31a005['name']);}else if(_0x8d2760<_0x31a005[_0xee91('0x76')]&&_0x31a005[_0xee91('0x1ad')]===_0xee91('0x1ae')){freeVariablesPredictive(_0x31a005);loggerPredictive[_0xee91('0x8a')]('[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]',_0xee91('0x1af'),_0x8d2760,'Drop\x20in\x20this\x20interval',_0x31a005[_0xee91('0x76')],'startProgressive',_0x31a005[_0xee91('0x47')]);}else if(!ifInterval(_0x31a005[_0xee91('0x1ab')],_0x31a005[_0xee91('0x2d')])&&_['isUndefined'](_0x31a005['startPredictive'])&&!_[_0xee91('0x44')](_0x31a005[_0xee91('0x2d')])){_0x31a005['startPredictive']=moment()[_0xee91('0x86')](_0xee91('0x108'));loggerPredictive[_0xee91('0x8a')](_0x31a005[_0xee91('0x47')],_0xee91('0x1b0'),_0x31a005[_0xee91('0x9d')]);this[_0xee91('0xcc')](_0x31a005[_0xee91('0x1ab')])[_0xee91('0xc7')](this['getDataPredictive'](_0x31a005))['then'](mergeDataErlangB(_0x31a005))[_0xee91('0xc7')](this['startMethodPredictive'](_0x31a005))[_0xee91('0xc0')](loggerCatchPredictive(_0xee91('0x1b1'),_0x31a005));}else if(!ifInterval(_0x31a005[_0xee91('0x1ab')],_0x31a005[_0xee91('0x9d')])){_0x31a005['predictiveIntervalErlangCallsDroppedCalls']=0x0;_0x31a005[_0xee91('0x9d')]=moment()[_0xee91('0x86')](_0xee91('0x108'));loggerPredictive[_0xee91('0x8a')](_0x31a005['name'],_0xee91('0x1b2'),_0x31a005[_0xee91('0x9d')]);clearInterval(_0x31a005['handlePredictive']);_0x31a005[_0xee91('0x9f')]=undefined;this[_0xee91('0xcc')](_0x31a005[_0xee91('0x1ab')])['then'](this[_0xee91('0x1b3')](_0x31a005))[_0xee91('0xc7')](mergeDataErlangB(_0x31a005))[_0xee91('0xc7')](this[_0xee91('0x1b4')](_0x31a005))['catch'](loggerCatchPredictive(_0xee91('0x1b5'),_0x31a005));}else if(_0x31a005[_0xee91('0x78')]&&_0xb1b2df<_0x31a005[_0xee91('0x78')]-_0x572a2f){freeVariablesPredictive(_0x31a005);loggerPredictive['info'](_0x31a005[_0xee91('0x47')],_0xee91('0x1b6'),_0xb1b2df,_0xee91('0x1b7'),_0x31a005[_0xee91('0x78')],'-',_0x572a2f,'=',_0x31a005[_0xee91('0x78')]-_0x572a2f,')');}else if(_0x31a005[_0xee91('0x78')]&&_0xb1b2df>_0x31a005[_0xee91('0x78')]+_0x2357bd){freeVariablesPredictive(_0x31a005);loggerPredictive[_0xee91('0x8a')](_0x31a005[_0xee91('0x47')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0xb1b2df,_0xee91('0x1b8'),_0x31a005['predictiveIntervalAvailable'],'+',_0x2357bd,'=',_0x31a005[_0xee91('0x78')]+_0x2357bd,')');}};Dialer[_0xee91('0x1e')][_0xee91('0x1b3')]=function(_0x27ad34){var _0x5d1046=this;return function(_0x38d35b){return new BPromise(function(_0x2f1a49,_0x6f3de7){_[_0xee91('0x9c')](_0x27ad34,_0x38d35b[0x0]);if(checkGetDataPredictive(_0x38d35b[0x0])){var _0x423002=_0x27ad34[_0xee91('0x78')]=_0x27ad34[_0xee91('0x5c')]+_0x27ad34[_0xee91('0x57')];var _0x48b129=_0x27ad34[_0xee91('0x1ab')]*0x3c;var _0x522b9b=_0x38d35b[0x0][_0xee91('0x72')]+_0x38d35b[0x0][_0xee91('0x91')];var _0x1d303f=(_0x38d35b[0x0]['predictiveIntervalAnsweredCalls']+_0x38d35b[0x0][_0xee91('0x74')]+_0x38d35b[0x0][_0xee91('0x73')])/_0x38d35b[0x0][_0xee91('0x79')];_0x27ad34['predictiveIntervalHitRate']=_0x1d303f>0x0?_0x1d303f:0x1;switch(_0x27ad34[_0xee91('0x1ad')]){case _0xee91('0x1ae'):var _0x455eb2=_0x27ad34[_0xee91('0x1b9')]/0x64;return _0x5d1046[_0xee91('0x1ba')](_0x423002,_0x48b129,_0x522b9b,_0x1d303f,_0x455eb2)[_0xee91('0xc7')](function(_0x2dac83){return _0x2f1a49(_0x2dac83);});case _0xee91('0x1bb'):var _0x55d0a3=_0x27ad34[_0xee91('0x1b9')]/0x64;return _0x5d1046['busyFactor'](_0x423002,_0x48b129,_0x522b9b,_0x1d303f,_0x55d0a3)[_0xee91('0xc7')](function(_0xbe1a1){return _0x2f1a49(_0xbe1a1);});default:return _0x6f3de7(msgResponse(_0xee91('0x1bc'),_0xee91('0x12f'),_0xee91('0x1bd')));}}else{return _0x6f3de7(msgResponse('[getDataPredictive]',_0xee91('0x12f'),'check\x20failure'));}});};};Dialer[_0xee91('0x1e')][_0xee91('0x1be')]=function(_0x4be520){var _0x1394fa=this;return function(_0x552515){return new BPromise(function(_0x2acf11,_0x17d5a9){_[_0xee91('0x9c')](_0x4be520,_0x552515[0x0]);if(checkGetDataPredictive(_0x552515[0x0])){loggerPredictive[_0xee91('0x8a')](JSON[_0xee91('0x82')](_0x552515[0x0]));if(_0x4be520[_0xee91('0x1ad')]===_0xee91('0x1ae')){return _0x1394fa['getVoiceQueueRtPauses'](_0x4be520['id'])[_0xee91('0xc7')](function(_0x475a03){var _0x50775d=_0x4be520[_0xee91('0x1bf')]-_0x475a03[0x0][_0xee91('0x1c0')];var _0x1a425a=_0x4be520[_0xee91('0x1ab')]*0x3c;var _0x486e08=_0x552515[0x0][_0xee91('0x72')]+_0x552515[0x0][_0xee91('0x91')];var _0x31bf1b=(_0x552515[0x0]['predictiveIntervalAnsweredCalls']+_0x552515[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x552515[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x552515[0x0][_0xee91('0x79')];var _0x504346=_0x4be520[_0xee91('0x1b9')]/0x64;_0x4be520[_0xee91('0x77')]=_0x475a03[0x0]['outboundQueuePauses']||0x0;_0x4be520['predictiveIntervalHitRate']=_0x31bf1b>0x0?_0x31bf1b:0x1;return _0x1394fa['abandonmentRate'](_0x50775d,_0x1a425a,_0x486e08,_0x31bf1b,_0x504346);})[_0xee91('0xc7')](function(_0x26c3cc){return _0x2acf11(_0x26c3cc);})['catch'](function(_0x2550cf){return _0x17d5a9(msgResponse(_0xee91('0x1c1'),_0xee91('0x12f'),JSON[_0xee91('0x82')](_0x2550cf)));});}if(_0x4be520[_0xee91('0x1ad')]===_0xee91('0x1bb')){return _0x1394fa[_0xee91('0xd2')](_0x4be520['id'])[_0xee91('0xc7')](function(_0x5d6307){var _0x4fee5f=_0x4be520[_0xee91('0x1bf')]-_0x5d6307[0x0][_0xee91('0x1c0')];var _0x157653=_0x4be520[_0xee91('0x1ab')]*0x3c;var _0x3684c9=_0x552515[0x0][_0xee91('0x72')]+_0x552515[0x0]['predictiveIntervalAvgHoldtime'];var _0x22ffca=(_0x552515[0x0][_0xee91('0x71')]+_0x552515[0x0][_0xee91('0x74')]+_0x552515[0x0][_0xee91('0x73')])/_0x552515[0x0]['predictiveIntervalTotalCalls'];var _0x195e7e=_0x4be520[_0xee91('0x1b9')]/0x64;_0x4be520['predictiveIntervalPauses']=_0x5d6307[0x0][_0xee91('0x1c0')]||0x0;_0x4be520['predictiveIntervalHitRate']=_0x22ffca>0x0?_0x22ffca:0x1;return _0x1394fa[_0xee91('0x1c2')](_0x4fee5f,_0x157653,_0x3684c9,_0x22ffca,_0x195e7e);})[_0xee91('0xc7')](function(_0x40a03b){return _0x2acf11(_0x40a03b);})['catch'](function(_0x240ec7){return _0x17d5a9(msgResponse('[CatchErlangB]',_0xee91('0x12f'),JSON['stringify'](_0x240ec7)));});}}else{return _0x17d5a9(msgResponse(_0xee91('0x1bc'),_0xee91('0x12f'),_0xee91('0x1c3')));}});};};Dialer[_0xee91('0x1e')]['startMethodPredictive']=function(_0x2bd7e7){var _0x1fa9c9=this;return function(){var _0x321dda=0x0;var _0x4ec549=Math[_0xee91('0x1a7')](_0x2bd7e7[_0xee91('0x7c')]*0x3e8);if(_0x4ec549>0x0){_0x4ec549=_0x4ec549<0x64?0x64:_0x4ec549;loggerPredictive[_0xee91('0x8a')](_0x2bd7e7['name'],'one\x20call\x20every:',_0x4ec549,_0xee91('0x51'));_0x2bd7e7['handlePredictive']=setInterval(function(){_0x1fa9c9[_0xee91('0x9f')](_0x2bd7e7);loggerPredictiveCalls['info']('[handlePredictive]',_0x321dda+=0x1);},_0x4ec549);}else{loggerPredictive[_0xee91('0x8a')](_0x2bd7e7['name'],'fail\x20to\x20scheduled\x20calls');}};};Dialer[_0xee91('0x1e')][_0xee91('0x1c4')]=function(_0x56b268,_0x438db1){var _0x9e6a3e=this;return function(_0x436fa9){if(_[_0xee91('0x89')](_0x436fa9)){if(_[_0xee91('0xbc')](_0x438db1[_0xee91('0xdf')])||!_0x438db1[_0xee91('0x1c5')]){if(_0x56b268[_0xee91('0x62')]===_0xee91('0x8')){_0x56b268['queueStatusComplete']=_[_0xee91('0x44')](_0x56b268[_0xee91('0x117')])?!![]:_0x56b268[_0xee91('0x117')];var _0x541140=uuid['v4']();_0x9e6a3e[_0xee91('0x2a')][_0x541140]=new Action(_0x56b268,_0x438db1,_0x541140);loggerBooked[_0xee91('0x8a')](_0xee91('0x1c6'),_0x541140,'queueStatusComplete:\x20',JSON[_0xee91('0x82')](_0x56b268[_0xee91('0x117')]),'Queue:\x20',_0x56b268[_0xee91('0x47')]);if(_0x56b268['queueStatusComplete']){_0x56b268[_0xee91('0x117')]=![];_0x9e6a3e[_0xee91('0x2e')][_0x9e6a3e['actions'][_0x541140][_0xee91('0xc2')]]=[];ami[_0xee91('0xbd')]({'actionid':_0x541140,'action':'queuestatus','queue':_0x56b268[_0xee91('0x47')]})[_0xee91('0xc0')](function(_0x21dea9){_0x9e6a3e['updateOriginated'](_0x56b268);_0x9e6a3e[_0xee91('0xcd')]({'active':![],'ContactId':_0x9e6a3e[_0xee91('0x2a')][_0x541140][_0xee91('0xdd')],'ListId':_0x9e6a3e[_0xee91('0x2a')][_0x541140][_0xee91('0xde')],'VoiceQueueId':_0x9e6a3e['actions'][_0x541140][_0xee91('0xe0')]||undefined,'CampaignId':_0x9e6a3e[_0xee91('0x2a')][_0x541140]['CampaignId']||undefined})[_0xee91('0xc0')](loggerCatch(_0xee91('0x1c7')));delete _0x9e6a3e[_0xee91('0x2a')][_0x541140];});}else{loggerBooked[_0xee91('0x8a')](_0xee91('0x1c8'),JSON[_0xee91('0x82')](_0x56b268[_0xee91('0x117')]),'Queue:\x20',_0x56b268[_0xee91('0x47')]);_0x9e6a3e[_0xee91('0xd6')](_0x56b268);_0x9e6a3e['rescheduleContact']({'active':![],'ContactId':_0x9e6a3e[_0xee91('0x2a')][_0x541140][_0xee91('0xdd')],'ListId':_0x9e6a3e[_0xee91('0x2a')][_0x541140]['ListId'],'VoiceQueueId':_0x9e6a3e[_0xee91('0x2a')][_0x541140][_0xee91('0xe0')]||undefined,'CampaignId':_0x9e6a3e[_0xee91('0x2a')][_0x541140]['CampaignId']||undefined})['catch'](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x9e6a3e[_0xee91('0x2a')][_0x541140];}}else{return _0x9e6a3e[_0xee91('0x151')](_0x56b268,_0x438db1);}}else{if(getDiff(_0x438db1[_0xee91('0x1c9')])<_0x56b268[_0xee91('0x1ca')]*0x3c){_0x9e6a3e[_0xee91('0x23')][_0xee91('0x11a')](_0x438db1['id'])[_0xee91('0x21')](function(){_0x9e6a3e['updateOriginated'](_0x56b268);});}else{_0x56b268[_0xee91('0x6e')]+=0x1;_0x9e6a3e['updateOriginated'](_0x56b268);if(_0x56b268[_0xee91('0x1cb')]){_0x9e6a3e[_0xee91('0xcd')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x438db1['ContactId'],'ListId':_0x438db1[_0xee91('0xde')],'VoiceQueueId':_0x438db1[_0xee91('0xe0')]||undefined,'CampaignId':_0x438db1[_0xee91('0x125')]||undefined})[_0xee91('0xc0')](loggerCatch(_0xee91('0x1cc')));_0x9e6a3e[_0xee91('0xd4')](createObjHistory(_0x56b268,_0x438db1,_0xee91('0x1cd'),0x17,_0xee91('0x1ce')))[_0xee91('0xc0')](loggerCatch(_0xee91('0x1cf')));}else{_0x9e6a3e[_0xee91('0xdb')](createObjHistory(_0x56b268,_0x438db1,_0xee91('0x1d0'),0x16,'RecallFailedTimeout'),'[Originate][HistoryRecallClose][historyCatch]',_0xee91('0x1d1'));}}}}else{_0x56b268[_0xee91('0x67')]+=0x1;_0x9e6a3e[_0xee91('0xdb')](createObjHistory(_0x56b268,_0x438db1,_0xee91('0x1d2'),0xd,_0xee91('0x1d3')),_0xee91('0x1d4'),_0xee91('0x1d5'));throw'inBlackList';}};};Dialer[_0xee91('0x1e')][_0xee91('0x147')]=function(_0x39337d){var _0x39068a=this;var _0x55b3b3=[];var _0x1a4f73=_0x39337d[_0xee91('0x1d6')]-_0x39337d[_0xee91('0x7a')]-_0x39337d[_0xee91('0x1d7')];emitCampaignSummary(_0x39337d);if(_0x1a4f73>0x0){if(_0x1a4f73>this[_0xee91('0x28')]){_0x1a4f73=this[_0xee91('0x28')];}_0x39337d[_0xee91('0x1d7')]+=_0x1a4f73;this[_0xee91('0xd1')](_0x39337d['id'],_0x1a4f73,_0x39337d[_0xee91('0x1d8')])[_0xee91('0xc7')](function(_0x5564d7){_0x39337d[_0xee91('0x1d7')]-=_0x1a4f73;_0x39337d[_0xee91('0x1d7')]=_0x39337d[_0xee91('0x1d7')]>0x0?_0x39337d['temp']:0x0;if(!checkContactEmpty(_0x5564d7)){_0x39337d[_0xee91('0x45')]=_0xee91('0xaf');logger[_0xee91('0x8a')](_0xee91('0x1d9')+_0x39337d['name']);}else{_0x39337d['originated']+=_0x5564d7['length'];_0x39337d[_0xee91('0x45')]=_0xee91('0x1da');for(var _0x4de5b6=0x0;_0x4de5b6<_0x5564d7[_0xee91('0xa7')];_0x4de5b6+=0x1){_0x39337d[_0xee91('0x1db')]+=0x1;if(_[_0xee91('0xbc')](_0x5564d7[_0x4de5b6])||_[_0xee91('0xbc')](_0x5564d7[_0x4de5b6][_0xee91('0x153')])||_[_0xee91('0xbc')](_0x5564d7[_0x4de5b6]['Contact'][_0xee91('0x154')])){_0x39068a[_0xee91('0xda')](_0xee91('0x1dc'),_0x39337d,_0x5564d7[_0x4de5b6]);}else{_0x39068a[_0xee91('0xcb')](_[_0xee91('0xdc')](_0x5564d7[_0x4de5b6],[_0xee91('0x125'),_0xee91('0x1dd')]))[_0xee91('0xc7')](_0x39068a['checkContactBlack'](_0x39337d,_0x5564d7[_0x4de5b6]))[_0xee91('0xc0')](_0x39068a[_0xee91('0xd9')](_0xee91('0x1de'),_0x39337d));}}}})[_0xee91('0xc0')](loggerGetContactDialer('[getContactCampaign2]',_0x39337d,_0x1a4f73));}};Dialer[_0xee91('0x1e')][_0xee91('0x143')]=function(_0x59792d,_0x55e915){var _0x16701b=this;var _0x2f1a9a=[];var _0x3b7752=_0x55e915>=0x1?_0x55e915:0x1;var _0x3f2ef5=[];if(_0x59792d[_0xee91('0x62')]===_0xee91('0x8')){_0x3b7752=0x1;}var _0x59c4dd=Math[_0xee91('0x1a7')](_0x59792d[_0xee91('0x57')]*_0x3b7752)-_0x59792d[_0xee91('0x7a')]-_0x59792d[_0xee91('0x1d7')];emitVoiceQueueSummary(_0x59792d);if(_0x59792d['dialLimitQueue']>0x0){var _0x5f336c=_0x59792d['dialLimitQueue']-_0x59792d[_0xee91('0x7a')]-_0x59792d[_0xee91('0x5c')]-_0x59792d[_0xee91('0x1d7')]-_0x59792d['pTalking'];if(_0x59c4dd>_0x5f336c){_0x59c4dd=_0x5f336c;}}if(_0x59c4dd>0x0){if(_0x59792d[_0xee91('0x62')]===_0xee91('0x8')){_0x59c4dd=0x1;}if(_0x59c4dd>this[_0xee91('0x28')]){_0x59c4dd=this[_0xee91('0x28')];}_0x59792d[_0xee91('0x1d7')]+=_0x59c4dd;for(var _0x495a0f in this[_0xee91('0x26')]){if(this['agents'][_0xee91('0xa8')](_0x495a0f)){if(this[_0xee91('0x26')][_0x495a0f][_0xee91('0xb5')]===_0xee91('0x1df')&&this[_0xee91('0x26')][_0x495a0f]['status']==='reachable'){_0x2f1a9a[_0xee91('0x115')](this['agents'][_0x495a0f]['id']);}}}this[_0xee91('0xcf')](_0x59792d['id'],_0x2f1a9a,_0x59c4dd,_0x59792d[_0xee91('0x1d8')])[_0xee91('0xc7')](function(_0x65a61b){_0x59792d[_0xee91('0x1d7')]-=_0x59c4dd;_0x59792d[_0xee91('0x1d7')]=_0x59792d[_0xee91('0x1d7')]>0x0?_0x59792d['temp']:0x0;if(!checkContactEmpty(_0x65a61b)){_0x16701b['countReScheduled'](_0x59792d)['then'](sendMessageReschedule(_0x59792d))['catch'](loggerCatch(_0xee91('0xc8')));}else{_0x59792d[_0xee91('0x7a')]+=_0x65a61b[_0xee91('0xa7')];_0x59792d['message']=_0x59792d[_0xee91('0x62')]===_0xee91('0x8')?_0xee91('0x15b'):_0xee91('0x1da');for(var _0x4ab865=0x0;_0x4ab865<_0x65a61b[_0xee91('0xa7')];_0x4ab865+=0x1){if(_['isNil'](_0x65a61b[_0x4ab865])||_[_0xee91('0xbc')](_0x65a61b[_0x4ab865][_0xee91('0x153')])||_[_0xee91('0xbc')](_0x65a61b[_0x4ab865]['Contact'][_0xee91('0x154')])){_0x16701b[_0xee91('0xda')](_0xee91('0x1dc'),_0x59792d,_0x65a61b[_0x4ab865]);}else{_0x16701b[_0xee91('0xc9')](_[_0xee91('0xdc')](_0x65a61b[_0x4ab865],[_0xee91('0xe0'),_0xee91('0x1dd')]))[_0xee91('0xc7')](_0x16701b['checkContactBlack'](_0x59792d,_0x65a61b[_0x4ab865]))[_0xee91('0xc0')](_0x16701b[_0xee91('0xd9')](_0xee91('0x1dc'),_0x59792d));}}}})[_0xee91('0xc0')](loggerGetContactDialer(_0xee91('0x1e0'),_0x59792d,_0x59c4dd));}};Dialer[_0xee91('0x1e')]['handlePredictive']=function(_0x5ef85f){var _0x2614a1=this;if(_0x5ef85f[_0xee91('0x1e1')]>0x0){var _0x3843c4=_0x5ef85f[_0xee91('0x1e1')]-_0x5ef85f[_0xee91('0x7a')]-_0x5ef85f[_0xee91('0x5c')];if(_0x3843c4>0x0){this[_0xee91('0x1e2')](_0x5ef85f);}else{loggerPredictiveCalls[_0xee91('0x8a')](_0xee91('0x1e3'));}}else{this[_0xee91('0x1e2')](_0x5ef85f);}};Dialer[_0xee91('0x1e')][_0xee91('0x1e2')]=function(_0x54bdab){var _0x3c3c65=this;var _0x33a101=[];_0x54bdab['originated']+=0x1;for(var _0x2af941 in this['agents']){if(this[_0xee91('0x26')]['hasOwnProperty'](_0x2af941)){if(this[_0xee91('0x26')][_0x2af941][_0xee91('0xb5')]===_0xee91('0x1df')&&this['agents'][_0x2af941][_0xee91('0xbe')]==='reachable'){_0x33a101[_0xee91('0x115')](this[_0xee91('0x26')][_0x2af941]['id']);}}}this[_0xee91('0xcf')](_0x54bdab['id'],_0x33a101,0x1,_0x54bdab[_0xee91('0x1d8')])[_0xee91('0xc7')](function(_0x50bfa5){if(!checkContactEmpty(_0x50bfa5)){checkContactLowerLimitOriginate(_0x54bdab,0x1,0x0);_0x3c3c65[_0xee91('0xc5')](_0x54bdab)['then'](sendMessageReschedule(_0x54bdab))[_0xee91('0xc0')](loggerCatch(_0xee91('0xc8')));}else{_0x54bdab['message']=_0xee91('0x1da');if(_['isNil'](_0x50bfa5[0x0])||_[_0xee91('0xbc')](_0x50bfa5[0x0][_0xee91('0x153')])||_[_0xee91('0xbc')](_0x50bfa5[0x0][_0xee91('0x153')][_0xee91('0x154')])){_0x3c3c65[_0xee91('0xda')](_0xee91('0x1dc'),_0x54bdab,_0x50bfa5[0x0]);}else{_0x3c3c65[_0xee91('0xc9')](_['pick'](_0x50bfa5[0x0],['VoiceQueueId',_0xee91('0x1dd')]))[_0xee91('0xc7')](_0x3c3c65[_0xee91('0x1c4')](_0x54bdab,_0x50bfa5[0x0]))[_0xee91('0xc0')](_0x3c3c65['loggerHandler'](_0xee91('0x1e4'),_0x54bdab));}}})[_0xee91('0xc0')](loggerGetContactDialer('[getContactDialerPredictive]',_0x54bdab,0x1));emitVoiceQueueSummary(_0x54bdab);};Dialer['prototype'][_0xee91('0x1ba')]=function(_0x36f367,_0x56180c,_0x33a0ae,_0x1490ac,_0x256f8a,_0x27231e){loggerPredictive[_0xee91('0x8a')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0xee91('0x8a')](_0xee91('0x1e5'),_0x36f367);loggerPredictive['info']('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x56180c);loggerPredictive[_0xee91('0x8a')](_0xee91('0x1e6'),_0x33a0ae);loggerPredictive[_0xee91('0x8a')]('P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1490ac);loggerPredictive[_0xee91('0x8a')](_0xee91('0x1e7'),_0x256f8a);loggerPredictive[_0xee91('0x8a')](_0xee91('0x9b'));return new BPromise(function(_0x4b5e63,_0x11c92d){if(_0x36f367<=0x0||isNaN(_0x36f367)){return _0x11c92d(msgResponse('[abandonmentRate]',_0xee91('0x50'),'m\x20=\x20'+_0x36f367));}if(_0x33a0ae<=0x0||isNaN(_0x33a0ae)){return _0x11c92d(msgResponse('[abandonmentRate]',_0xee91('0x50'),'Ts\x20=\x20'+_0x33a0ae));}if(_0x1490ac<=0x0||isNaN(_0x1490ac)){return _0x11c92d(msgResponse(_0xee91('0x1e8'),'Error',_0xee91('0x1e9')+_0x1490ac));}if(_0x56180c<=0x0||isNaN(_0x56180c)){return _0x11c92d(msgResponse(_0xee91('0x1e8'),_0xee91('0x50'),'interval\x20=\x20'+_0x56180c));}if(_0x256f8a<=0x0||isNaN(_0x256f8a)){return _0x11c92d(msgResponse(_0xee91('0x1e8'),_0xee91('0x50'),'Amax\x20=\x20'+_0x256f8a));}_0x27231e=_0x27231e||0x0;var _0x5a3c14=0x1/_0x33a0ae;var _0x2fe543=0x0;var _0x38f7ed=0x0;var _0x2b6ec0=0x0;var _0x194d86=0x0;for(var _0x3784cd=0x0;_0x2b6ec0<_0x256f8a;_0x3784cd+=0x1){_0x38f7ed=_0x3784cd/_0x56180c;_0x2fe543=(_0x1490ac*_0x38f7ed+_0x27231e)/_0x5a3c14;_0x2b6ec0=erlangb(_0x2fe543,_0x36f367);_0x194d86=_0x2fe543/_0x36f367*(0x1-erlangb(_0x2fe543,_0x36f367));}return _0x4b5e63({'erlangCalls':_0x3784cd,'erlangCallToSecond':_0x56180c/_0x3784cd,'erlangAbandonmentRate':_0x2b6ec0,'erlangBusyFactor':_0x194d86});});};Dialer[_0xee91('0x1e')]['busyFactor']=function(_0x39ab69,_0x100925,_0x56444e,_0x146824,_0x2e7242,_0x397fa8){loggerPredictive[_0xee91('0x8a')]('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive[_0xee91('0x8a')](_0xee91('0x1e5'),_0x39ab69);loggerPredictive[_0xee91('0x8a')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x100925);loggerPredictive[_0xee91('0x8a')](_0xee91('0x1e6'),_0x56444e);loggerPredictive[_0xee91('0x8a')](_0xee91('0x1ea'),_0x146824);loggerPredictive[_0xee91('0x8a')](_0xee91('0x1eb'),_0x2e7242);loggerPredictive[_0xee91('0x8a')](_0xee91('0x9b'));return new BPromise(function(_0xf99e6e,_0x26c50c){if(_0x39ab69<=0x0||isNaN(_0x39ab69)){return _0x26c50c(msgResponse('[busyFactor]',_0xee91('0x50'),'m\x20=\x20'+_0x39ab69));}if(_0x56444e<=0x0||isNaN(_0x56444e)){return _0x26c50c(msgResponse('[busyFactor]',_0xee91('0x50'),_0xee91('0x1ec')+_0x56444e));}if(_0x146824<=0x0||isNaN(_0x146824)){return _0x26c50c(msgResponse(_0xee91('0x1ed'),_0xee91('0x50'),_0xee91('0x1e9')+_0x146824));}if(_0x100925<=0x0||isNaN(_0x100925)){return _0x26c50c(msgResponse(_0xee91('0x1ed'),_0xee91('0x50'),'interval\x20=\x20'+_0x100925));}if(_0x2e7242<=0x0||isNaN(_0x2e7242)){return _0x26c50c(msgResponse(_0xee91('0x1ed'),_0xee91('0x50'),_0xee91('0x1ee')+_0x2e7242));}_0x397fa8=_0x397fa8||0x0;var _0x441244=0x1/_0x56444e;var _0x56a658=0x0;var _0x4b5d54=0x0;var _0x52f290=0x0;var _0x2b6ee7=0x0;for(var _0x240ac8=0x0;_0x2b6ee7<_0x2e7242;_0x240ac8+=0x1){_0x4b5d54=_0x240ac8/_0x100925;_0x56a658=(_0x146824*_0x4b5d54+_0x397fa8)/_0x441244;_0x52f290=erlangb(_0x56a658,_0x39ab69);_0x2b6ee7=_0x56a658/_0x39ab69*(0x1-erlangb(_0x56a658,_0x39ab69));}return _0xf99e6e({'erlangCalls':_0x240ac8,'erlangCallToSecond':_0x100925/_0x240ac8,'erlangAbandonmentRate':_0x52f290,'erlangBusyFactor':_0x2b6ee7});});};module[_0xee91('0x1ef')]=Dialer;
\ No newline at end of file
+var _0x5860=['HangupInAMD','membername','AMD','[syncHangupInAMD]','value','MACHINE','Machine','[syncMachine][createHistory]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','amd','[syncMachineIvr][createHistory]','[syncMachineIvr]','ivrAnswerCallsDay','[syncHangupIvr]','dialQueueProject','[syncHangupIvr][createHistory]','cause-txt','Unknow','reason','agent','dialQueueProject2','YYYY-MM-DD\x20HH:mm:ss','[syncAgentComplete]','answertime','[syncAgentComplete][createHistory]','[syncQueueCallerAbandon]\x20[Drop]','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','Drop','dropreason','agiafterat','Abandoned','CALLEREXIT','queueCallerAbandonCreateState','actionid','roundrobin','locked','stateinterface','push','queueStatusComplete','syncQueueStatusComplete','[Catch][Preview][syncQueueStatusComplete]','queueBookedRR','_rr','length','paused','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','run','idHopper','[booked][RR][finaly]','[booked][unlock]','ListId','[unlock][syncQueueStatusComplete]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncCampaigns','checkIsTrunkReachable','TrunkBackup','checkIfTime','ifTime','checkIfTimeIntervals','\x20Intervals\x20is\x20null\x20','\x20Intervals\x20is\x20empty\x20','timezones','TIMEZONE_UNKNOW','Failure','\x20Timezone\x20unknow\x20','isArray','Action','content','indexOf','true','iftime\x20%s,%s','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','Timezone:\x20','checkDialMethod','progressive','handlePower','Queue','launchHandleIvr','handleIvr','dialTimezone','dialGlobalInterval','\x5cw{0,','pow','replace','random','match','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','Contact','getCaller','NONE','\x22agi://%s/square,%s\x22','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialAgiAfterHangupAgent','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','XMD-VOICEQUEUEID','tags','createdAt','updatedAt','%s%s','XMD-','toUpper','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','XMD-ORIGINATECALLERIDNUM','originatecalleridnum','SIP/%s/%s%s','dialCutDigit','substring','trim','dialOriginateTimeout','[originateError]:\x20%s','endtime','[originate][error]','Error','getQueue','[callProgressDetecting]\x20','countbusyretry','countcongestionretry','countnoanswerretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','minutes','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','add','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','[callProgressDetecting]','evt\x20is\x20undefine','dialGlobalMaxRetry','reason\x200\x20no\x20such\x20number....','createStateFinal','NoAnswer','countglobal','checkRetriveMax','reason\x203\x20ringing\x20no\x20answer','[syncAgentComplete][createHistory][5]','stateGlobal','reason\x205\x20busy','outboundCongestionCallsDay','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','check\x20predictive\x20is\x20not\x20undefine','[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dialPredictiveOptimizationPercentage','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','abandonmentRate','outboundQueuePauses','[CatchErlangB]','one\x20call\x20every:','checkContactBlack','recallme','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','dialRecallInQueue','RECALLINQUEUE','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALLFAILEDTIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','dialOrderByScheduledAt','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','Contact.phone','[actionOriginateIvr]\x20','dialLimitQueue','not_inuse','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','emptyContact','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','Ts\x20=\x20','[abandonmentRate]','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','exports','uuid','moment','md5','ioredis','../../../config/environment/','../../../config/logger','dialer','booked','predictive','predictiveCalls','redis','defaults','socket.io-emitter','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','./action','./history','./final','./agentComplete','./queueCallerAbandon','env','XCALLY_IP_AGI','127.0.0.1','rrmemory','prototype','enqueue','tail','finally','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','uniqueId','optionPredictive','startProgressive','ivrOriginated','queueBooked','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','syncAgentComplete','custom:queuesummary','syncQueueSummary','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','loopClearZombieChannels','isUndefined','AGENTS_NOT_LOGGED','name','\x20AGENTS\x20NOT\x20LOGGED','message','NOT_ACTIVE','Interval','Intervals','\x20INTERVAL_IS_NULL','isEmpty','INTERVAL_IS_NULL','[ifTime][Action]','stringify','milliseconds','diff','seconds','emit','type','outbound','strategy','answered','available','loggedIn','pTalking','sumBillable','talking','total','abandoned','waiting','loggedInDb','dialActive','dialMethod','dialOriginateCallerIdName','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangBusyFactor','startPredictive','Trunk','active','callerid','format','voice:queue:%s','voice_queue:save','campaign:ivr:%s','campaign:save','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','clearing\x20variable\x20start\x20progressive','handlePredictive','clearing\x20variable\x20handle\x20predictive','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','inspect','error','stack','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','[getContactDialer2][ReScheduled]','AVAILABLE_CONTACTS_FINISHED','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','IS_DISACTIVED','statedesc','starttime','clearZombieChannels','[uniqueid]','sequence','isNil','status','channel','catch','No\x20such\x20channel','updateOriginated','queue','[Dialer][checkChannel][ivr]','resolve','countReScheduled','[countReScheduled]\x20','then','checkIsBlackList','[checkIsBlackList]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','[rescheduleContact]\x20','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','getVoiceQueueRtPauses','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','hasOwnProperty','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','notFound','merge','pick','ContactId','UserId','VoiceQueueId','CampaignId','[emptyContact][createHistory]','[emptyContact]','isSuccess','isTrunkReachable','SIP/%s','reachable','saveInDb','uniqueid','variable','exten','ivr','dialAMDActive','HANGUP','state'];(function(_0x166742,_0x55520c){var _0xb7814a=function(_0x18feaf){while(--_0x18feaf){_0x166742['push'](_0x166742['shift']());}};_0xb7814a(++_0x55520c);}(_0x5860,0x109));var _0x0586=function(_0x3ab9ee,_0x4a74b8){_0x3ab9ee=_0x3ab9ee-0x0;var _0x82ee88=_0x5860[_0x3ab9ee];return _0x82ee88;};'use strict';var util=require('util');var _=require('lodash');var BPromise=require('bluebird');var uuid=require(_0x0586('0x0'));var moment=require(_0x0586('0x1'));var rr=require('rr');var md5=require(_0x0586('0x2'));var Redis=require(_0x0586('0x3'));var config=require(_0x0586('0x4'));var logger=require(_0x0586('0x5'))(_0x0586('0x6'));var loggerBooked=require('../../../config/logger')(_0x0586('0x7'));var loggerPredictive=require(_0x0586('0x5'))(_0x0586('0x8'));var loggerPredictiveCalls=require(_0x0586('0x5'))(_0x0586('0x9'));var loggerSyncQueueSummary=require('../../../config/logger')('syncQueueSummary');var ami=require('../ami');config[_0x0586('0xa')]=_[_0x0586('0xb')](config[_0x0586('0xa')],{'host':'localhost','port':0x18eb});var io=require(_0x0586('0xc'))(new Redis(config[_0x0586('0xa')]));var cmHopper=require('../rpc/cmHopper');var cmHopperFinal=require(_0x0586('0xd'));var cmHopperHistory=require(_0x0586('0xe'));var cmHopperBlack=require(_0x0586('0xf'));var voiceQueueRt=require(_0x0586('0x10'));var Action=require(_0x0586('0x11'));var History=require(_0x0586('0x12'));var Final=require(_0x0586('0x13'));var AgentComplete=require(_0x0586('0x14'));var QueueCallerAbandon=require(_0x0586('0x15'));var Hangup=require('./hangup');var ipAgi=process[_0x0586('0x16')][_0x0586('0x17')]||_0x0586('0x18');var strategy={'rrmemory':_0x0586('0x19'),'roundrobin':'roundrobin'};var Sequence=function(){};Sequence[_0x0586('0x1a')][_0x0586('0x1b')]=function(_0x27caa4){this['tail']=this['tail']?this[_0x0586('0x1c')][_0x0586('0x1d')](_0x27caa4):_0x27caa4();};function Dialer(_0x28b0e7,_0x84e269){this['sequence']=new Sequence();this[_0x0586('0x1e')]=_0x84e269;this[_0x0586('0x1f')]=_0x28b0e7[_0x0586('0x1f')];this[_0x0586('0x20')]=_0x28b0e7[_0x0586('0x20')];this[_0x0586('0x21')]=_0x28b0e7[_0x0586('0x21')];this[_0x0586('0x22')]=_0x28b0e7[_0x0586('0x22')];this[_0x0586('0x23')]=config[_0x0586('0x23')]||0x2;this['channels']={};this[_0x0586('0x24')]={};this['contactsId']={};this[_0x0586('0x25')]={};this[_0x0586('0x26')]={};this['startPredictive']={};this[_0x0586('0x27')]={};this[_0x0586('0x28')]={};this[_0x0586('0x29')]={};this['queueBookedRR']={};ami['on'](_0x0586('0x2a'),this[_0x0586('0x2b')][_0x0586('0x2c')](this));ami['on'](_0x0586('0x2d'),this[_0x0586('0x2e')]['bind'](this));ami['on'](_0x0586('0x2f'),this[_0x0586('0x30')][_0x0586('0x2c')](this));ami['on']('agentcomplete',this[_0x0586('0x31')][_0x0586('0x2c')](this));ami['on'](_0x0586('0x32'),this[_0x0586('0x33')]['bind'](this));ami['on'](_0x0586('0x34'),this[_0x0586('0x35')][_0x0586('0x2c')](this));ami['on'](_0x0586('0x36'),this[_0x0586('0x37')]['bind'](this));ami['on'](_0x0586('0x38'),this[_0x0586('0x39')][_0x0586('0x2c')](this));ami['on'](_0x0586('0x3a'),this[_0x0586('0x3b')][_0x0586('0x2c')](this));ami['on']('queuestatuscomplete',this['syncQueueStatusComplete']['bind'](this));this['loopCampaigns']();this[_0x0586('0x3c')]();}function isNotNull(_0x37bfb2){return _0x37bfb2!==null&&!_[_0x0586('0x3d')](_0x37bfb2);}function checkIsLoggedIn(_0x2d536e,_0x142cb0){return function(){if(_0x142cb0<=0x0){_0x2d536e['message']=_0x0586('0x3e');throw _0x2d536e[_0x0586('0x3f')]+_0x0586('0x40');}};}function isActive(_0xd2d1b1){return _0xd2d1b1;}function checkIsActive(_0x3be23a,_0x1336ff){return function(){if(!isActive(_0x1336ff)){_0x3be23a[_0x0586('0x41')]=_0x0586('0x42');throw _0x3be23a[_0x0586('0x3f')]+'\x20NOT\x20Active';}};}function checkInterval(_0x200c2e){return function(){if(!isNotNull(_0x200c2e[_0x0586('0x43')])){_0x200c2e['message']='INTERVAL_IS_NULL';throw _0x200c2e[_0x0586('0x3f')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x200c2e[_0x0586('0x43')][_0x0586('0x44')])){_0x200c2e['message']='INTERVAL_IS_NULL';throw _0x200c2e['name']+_0x0586('0x45');}if(!isNotNull(_[_0x0586('0x46')](_0x200c2e['Interval']['Intervals']))){_0x200c2e[_0x0586('0x41')]=_0x0586('0x47');throw _0x200c2e[_0x0586('0x3f')]+_0x0586('0x45');}};}function msgResponse(_0x3afcab,_0x3ce889,_0x4085b7){return{'action':_0x3afcab,'response':_0x3ce889,'message':_0x4085b7,'stack':_0x4085b7};}function myreject(_0x273040){return function(_0x27d52d){return _0x273040(msgResponse(_0x0586('0x48'),'Error',JSON[_0x0586('0x49')](_0x27d52d)));};}function getSeconds(_0x2502c5,_0x5d86e9){var _0x5a2217=moment(_0x2502c5)['milliseconds'](0x0);var _0x47b20a=moment(_0x5d86e9)[_0x0586('0x4a')](0x0);return _0x5a2217[_0x0586('0x4b')](_0x47b20a,_0x0586('0x4c'));}function emit(_0x110940,_0x1c7e53,_0x50c12c){io['to'](_0x110940)[_0x0586('0x4d')](_0x1c7e53,_0x50c12c);}function emitVoiceQueueSummary(_0x4f9f5e){if(_0x4f9f5e[_0x0586('0x4e')]===_0x0586('0x4f')){var _0x230e6e={'id':_0x4f9f5e['id'],'name':_0x4f9f5e['name'],'strategy':_0x4f9f5e[_0x0586('0x50')],'answered':_0x4f9f5e[_0x0586('0x51')],'available':_0x4f9f5e[_0x0586('0x52')],'loggedIn':_0x4f9f5e[_0x0586('0x53')],'pTalking':_0x4f9f5e[_0x0586('0x54')],'sumBillable':_0x4f9f5e[_0x0586('0x55')],'sumDuration':_0x4f9f5e['sumDuration'],'sumHoldTime':_0x4f9f5e['sumHoldTime']||0x0,'talking':_0x4f9f5e[_0x0586('0x56')],'total':_0x4f9f5e[_0x0586('0x57')],'type':_0x4f9f5e[_0x0586('0x4e')],'unmanaged':_0x4f9f5e['unmanaged'],'abandoned':_0x4f9f5e[_0x0586('0x58')],'waiting':_0x4f9f5e[_0x0586('0x59')],'loggedInDb':_0x4f9f5e[_0x0586('0x5a')],'dialActive':_0x4f9f5e[_0x0586('0x5b')],'dialMethod':_0x4f9f5e[_0x0586('0x5c')],'dialOriginateCallerIdName':_0x4f9f5e[_0x0586('0x5d')],'dialOriginateCallerIdNumber':_0x4f9f5e['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x4f9f5e['dialOriginateTimeout'],'dialPrefix':_0x4f9f5e[_0x0586('0x5e')],'outboundAnswerAgiCallsDay':_0x4f9f5e[_0x0586('0x5f')],'outboundAnswerCallsDay':_0x4f9f5e[_0x0586('0x60')],'outboundBlacklistCallsDay':_0x4f9f5e[_0x0586('0x61')],'outboundBusyCallsDay':_0x4f9f5e[_0x0586('0x62')],'outboundCongestionCallsDay':_0x4f9f5e['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x4f9f5e[_0x0586('0x63')],'outboundDropCallsDayCallersExit':_0x4f9f5e[_0x0586('0x64')],'outboundDropCallsDayTimeout':_0x4f9f5e['outboundDropCallsDayTimeout'],'outboundNoAnswerCallsDay':_0x4f9f5e[_0x0586('0x65')],'outboundNoSuchCallsDay':_0x4f9f5e[_0x0586('0x66')],'outboundOriginateFailureCallsDay':_0x4f9f5e[_0x0586('0x67')],'outboundReCallsDay':_0x4f9f5e[_0x0586('0x68')],'outboundRejectCallsDay':_0x4f9f5e[_0x0586('0x69')],'outboundUnknownCallsDay':_0x4f9f5e[_0x0586('0x6a')],'predictiveIntervalAnsweredCalls':_0x4f9f5e[_0x0586('0x6b')],'predictiveIntervalAvgHoldtime':_0x4f9f5e[_0x0586('0x6c')],'predictiveIntervalAvgTalktime':_0x4f9f5e[_0x0586('0x6d')],'predictiveIntervalDroppedCallsCallersExit':_0x4f9f5e[_0x0586('0x6e')],'predictiveIntervalDroppedCallsTimeout':_0x4f9f5e[_0x0586('0x6f')],'predictiveIntervalErlangCalls':_0x4f9f5e[_0x0586('0x70')],'predictiveIntervalErlangCallsDroppedCalls':_0x4f9f5e[_0x0586('0x71')],'predictiveIntervalHitRate':_0x4f9f5e[_0x0586('0x72')],'predictiveIntervalMultiplicativeFactor':_0x4f9f5e[_0x0586('0x73')],'predictiveIntervalPauses':_0x4f9f5e[_0x0586('0x74')],'predictiveIntervalAvailable':_0x4f9f5e[_0x0586('0x75')],'predictiveIntervalTotalCalls':_0x4f9f5e[_0x0586('0x76')],'message':_0x4f9f5e[_0x0586('0x41')],'originated':_0x4f9f5e[_0x0586('0x77')],'erlangCalls':_0x4f9f5e[_0x0586('0x78')],'erlangCallToSecond':_0x4f9f5e[_0x0586('0x79')],'erlangAbandonmentRate':_0x4f9f5e['erlangAbandonmentRate'],'erlangBusyFactor':_0x4f9f5e[_0x0586('0x7a')],'startPredictive':_0x4f9f5e[_0x0586('0x7b')],'startProgressive':_0x4f9f5e[_0x0586('0x27')]};if(_0x4f9f5e['Trunk']){_0x230e6e[_0x0586('0x7c')]={'id':_0x4f9f5e[_0x0586('0x7c')]['id'],'name':_0x4f9f5e[_0x0586('0x7c')][_0x0586('0x3f')],'active':_0x4f9f5e[_0x0586('0x7c')][_0x0586('0x7d')],'callerid':_0x4f9f5e['Trunk'][_0x0586('0x7e')]};}if(_0x4f9f5e[_0x0586('0x43')]){_0x230e6e[_0x0586('0x43')]={'id':_0x4f9f5e[_0x0586('0x43')]['id'],'name':_0x4f9f5e[_0x0586('0x43')][_0x0586('0x3f')]};}var _0x34b027=md5(JSON[_0x0586('0x49')](_0x230e6e));if(_0x4f9f5e[_0x0586('0x2')]!==_0x34b027){_0x4f9f5e[_0x0586('0x2')]=_0x34b027;emit(util[_0x0586('0x7f')](_0x0586('0x80'),_0x230e6e[_0x0586('0x3f')]),_0x0586('0x81'),_0x230e6e);}}}function emitCampaignSummary(_0x3731a6){if(_0x3731a6[_0x0586('0x4e')]==='ivr'){emit(util[_0x0586('0x7f')](_0x0586('0x82'),_0x3731a6[_0x0586('0x3f')]),_0x0586('0x83'),_0x3731a6);}}function checkGetDataPredictive(_0x3ec03c){if(isNotNull(_0x3ec03c)){if(!_['isEmpty'](_0x3ec03c)){loggerPredictive[_0x0586('0x84')](_0x0586('0x85'));loggerPredictive['info'](_0x0586('0x86'),_0x3ec03c[_0x0586('0x76')]);loggerPredictive['info'](_0x0586('0x87'),_0x3ec03c[_0x0586('0x6b')]);loggerPredictive[_0x0586('0x84')](_0x0586('0x88'),_0x3ec03c[_0x0586('0x6f')]);loggerPredictive['info']('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3ec03c[_0x0586('0x6e')]);loggerPredictive['info']('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3ec03c[_0x0586('0x6c')]);loggerPredictive[_0x0586('0x84')](_0x0586('0x89'),_0x3ec03c[_0x0586('0x6d')]);loggerPredictive[_0x0586('0x84')](_0x0586('0x8a'));if(_0x3ec03c['predictiveIntervalTotalCalls']>0x0){if(!_[_0x0586('0x3d')](_0x3ec03c[_0x0586('0x6d')])&&_0x3ec03c['predictiveIntervalAvgTalktime']>0x0){return!![];}else{loggerPredictive[_0x0586('0x84')](_0x0586('0x8b'));}if(!_[_0x0586('0x3d')](_0x3ec03c[_0x0586('0x6c')])&&_0x3ec03c[_0x0586('0x6c')]>0x0){return!![];}else{loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive['info'](_0x0586('0x8c'));}}else{loggerPredictive[_0x0586('0x84')]('History\x20information\x20are\x20empty');}}else{loggerPredictive['info'](_0x0586('0x8d'));}return![];}function mergeDataErlangB(_0x2d8fd9){return function(_0x118ddc){loggerPredictive[_0x0586('0x84')](_0x0586('0x8e'));loggerPredictive[_0x0586('0x84')](_0x0586('0x8f'),_0x118ddc[_0x0586('0x78')]);loggerPredictive[_0x0586('0x84')](_0x0586('0x90'),_0x118ddc[_0x0586('0x79')]);loggerPredictive[_0x0586('0x84')](_0x0586('0x91'),_0x118ddc[_0x0586('0x92')]);loggerPredictive[_0x0586('0x84')](_0x0586('0x93'),_0x118ddc[_0x0586('0x7a')]);loggerPredictive[_0x0586('0x84')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x118ddc['erlangAbandonmentRate']);loggerPredictive['info'](_0x0586('0x8a'));_['merge'](_0x2d8fd9,_0x118ddc);};}function getDiff(_0x144e15){var _0x535cdd=moment()[_0x0586('0x4a')](0x0);var _0x236b72=moment(_0x144e15)[_0x0586('0x4a')](0x0);return _0x535cdd['diff'](_0x236b72,_0x0586('0x4c'));}function ifInterval(_0x2571d7,_0x48f471){if(_[_0x0586('0x3d')](_0x48f471)){return![];}if(getDiff(_0x48f471)<_0x2571d7*0x3c){return!![];}else{return![];}}function freeVariablesPredictive(_0x51b51e){if(isNotNull(_0x51b51e)){if(!_[_0x0586('0x3d')](_0x51b51e[_0x0586('0x27')])){_0x51b51e['startProgressive']=undefined;loggerPredictive['info'](_0x51b51e[_0x0586('0x3f')],_0x0586('0x94'));}if(!_['isUndefined'](_0x51b51e['startPredictive'])){_0x51b51e[_0x0586('0x7b')]=undefined;loggerPredictive[_0x0586('0x84')](_0x51b51e[_0x0586('0x3f')],'clearing\x20variable\x20start\x20predictive');}if(!_[_0x0586('0x3d')](_0x51b51e[_0x0586('0x95')])){clearInterval(_0x51b51e[_0x0586('0x95')]);_0x51b51e[_0x0586('0x95')]=undefined;loggerPredictive[_0x0586('0x84')](_0x51b51e[_0x0586('0x3f')],_0x0586('0x96'));}}}function erlangb(_0x1ee7fd,_0x1ea569){if(_0x1ea569===0x0){return 0x0;}var _0x1a0c04=0x1;for(var _0x19837e=0x1;_0x19837e<=_0x1ea569;_0x19837e+=0x1){_0x1a0c04=0x1+_0x1a0c04*_0x19837e/_0x1ee7fd;}return 0x1/_0x1a0c04;}function isVoiceQueueOutbound(_0x5cf7ea){return _0x5cf7ea===_0x0586('0x4f');}function isNotPreview(_0x171aaf){return _0x171aaf!==_0x0586('0x1e');}function isCampaignIvr(_0xc55899){return _0xc55899==='ivr';}function getCallerId(_0x585866,_0x3a7f9e,_0x170f6a){if(!_[_0x0586('0x3d')](_0x170f6a)&&_0x0586('0x97')===typeof _0x170f6a&&!_[_0x0586('0x46')](_0x170f6a)){if(!_[_0x0586('0x3d')](_0x3a7f9e)&&_0x0586('0x97')===typeof _0x3a7f9e&&!_[_0x0586('0x46')](_0x3a7f9e)){return util[_0x0586('0x7f')](_0x0586('0x98'),_0x3a7f9e,_0x170f6a);}return util['format'](_0x0586('0x98'),_0x170f6a,_0x170f6a);}if(!_[_0x0586('0x3d')](_0x585866)&&_0x0586('0x97')===typeof _0x585866&&!_[_0x0586('0x46')](_0x585866)){return _0x585866;}return _0x0586('0x99');}function loggerCatchQueueSummary(_0x2b9052,_0x47a3cf){return function(_0x1f50bc){freeVariablesPredictive(_0x47a3cf);emitVoiceQueueSummary(_0x47a3cf);emitCampaignSummary(_0x47a3cf);loggerSyncQueueSummary['error'](_0x2b9052,util[_0x0586('0x9a')](_0x1f50bc,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x582d0e,_0x3d5e86){return function(_0x13d81f){loggerPredictive[_0x0586('0x9b')](_0x3d5e86['name'],_0x582d0e);loggerPredictive[_0x0586('0x9b')](_0x13d81f[_0x0586('0x9c')]);freeVariablesPredictive(_0x3d5e86);};}function loggerCatch(_0x171c8a){return function(_0x3a64d2){logger['error'](_0x171c8a,util[_0x0586('0x9a')](_0x3a64d2,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x211a6e){return _0x211a6e&&!_['isUndefined'](_0x211a6e)&&_0x211a6e['length']>0x0;}function decremetOriginate(_0x52200b){if(!_[_0x0586('0x3d')](_0x52200b)&&_0x52200b!==null){if(_0x52200b['hasOwnProperty'](_0x0586('0x77'))){if(_0x52200b[_0x0586('0x77')]>0x0){_0x52200b[_0x0586('0x77')]-=0x1;}else{logger[_0x0586('0x9b')](_0x0586('0x9d'));}}}else{logger[_0x0586('0x9b')](_0x0586('0x9e'));}}function checkContactLowerLimitOriginate(_0x13eaf7,_0x37a24e,_0x15cd38){if(_0x37a24e>_0x15cd38){for(var _0x5c9432=0x0;_0x5c9432<_0x37a24e-_0x15cd38;_0x5c9432+=0x1){decremetOriginate(_0x13eaf7);}}}function loggerGetContactDialer(_0x2f6030,_0x268c1f,_0x4b2849){return function(_0x1b3ebe){checkContactLowerLimitOriginate(_0x268c1f,_0x4b2849,0x0);logger[_0x0586('0x9b')](_0x2f6030,util[_0x0586('0x9a')](_0x1b3ebe,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x227235){return function(_0x4c8282){if(isNotNull(_0x4c8282)&&isNotNull(_0x4c8282[0x0])){if(_0x4c8282[0x0][_0x0586('0x9f')]>0x0){_0x227235['message']='RESCHEDULED_CONTACTS';logger[_0x0586('0x84')](_0x0586('0xa0')+_0x227235['name'],_0x4c8282[0x0][_0x0586('0x9f')],'contacts');}else{_0x227235[_0x0586('0x41')]=_0x0586('0xa1');logger[_0x0586('0x84')]('[getContactDialer2][Empty]'+_0x227235[_0x0586('0x3f')]);}}};}function notSendMessagesQueue(_0x43ae11){if(_0x43ae11[_0x0586('0xa2')]){freeVariablesPredictive(_0x43ae11);if(_0x43ae11['originated']===0x0&&_0x43ae11[_0x0586('0x56')]===0x0&&_0x43ae11[_0x0586('0x59')]===0x0&&(_0x43ae11[_0x0586('0x54')]||0x0)===0x0){_0x43ae11['sendMessageOneNotActive']=![];_0x43ae11['available']=0x0;_0x43ae11[_0x0586('0x41')]='NOT_ACTIVE';loggerSyncQueueSummary[_0x0586('0x9b')](_0x0586('0xa3'),_0x43ae11[_0x0586('0x3f')],_0x0586('0xa4'));}else{_0x43ae11[_0x0586('0x41')]=_0x0586('0xa5');loggerSyncQueueSummary['error'](_0x0586('0xa3'),_0x43ae11[_0x0586('0x3f')],'is\x20disactive');}emitVoiceQueueSummary(_0x43ae11);}}function notSendMessagesCampaign(_0x4acdea){if(_0x4acdea[_0x0586('0xa2')]){if(_0x4acdea[_0x0586('0x77')]===0x0){_0x4acdea[_0x0586('0xa2')]=![];_0x4acdea[_0x0586('0x41')]=_0x0586('0x42');loggerSyncQueueSummary[_0x0586('0x9b')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x4acdea[_0x0586('0x3f')],_0x0586('0xa4'));}else{_0x4acdea['message']=_0x0586('0xa5');loggerSyncQueueSummary[_0x0586('0x9b')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x4acdea['name'],'is\x20disactive');}emitCampaignSummary(_0x4acdea);}}function createObjHistory(_0x17061a,_0x248d79,_0x136423,_0x3d87c4,_0x3554ea){_0x17061a[_0x0586('0x41')]=_0x136423;var _0x15ab6=new Action(_0x17061a,_0x248d79);var _0x250f11=new History(_0x15ab6);_0x250f11['state']=_0x3d87c4;_0x250f11[_0x0586('0xa6')]=_0x3554ea;_0x250f11['endtime']=_0x15ab6[_0x0586('0xa7')];return _0x250f11;}Dialer[_0x0586('0x1a')]['loopClearZombieChannels']=function(){var _0x284695=this;setInterval(function(){_0x284695[_0x0586('0xa8')](_0x284695['uniqueId'],_0x0586('0xa9'));_0x284695[_0x0586('0xa8')](_0x284695['actions'],'[actions]');},0x32c8);};Dialer[_0x0586('0x1a')][_0x0586('0xa8')]=function(_0x470463,_0x3760c3){var _0x14d649=this;for(var _0x2ec3d5 in _0x470463){if(_0x470463['hasOwnProperty'](_0x2ec3d5)){this[_0x0586('0xaa')][_0x0586('0x1b')](function(){if(!_[_0x0586('0xab')](_0x470463[_0x2ec3d5])){return ami['Action']({'action':_0x0586('0xac'),'channel':_0x470463[_0x2ec3d5][_0x0586('0xad')]})[_0x0586('0xae')](function(_0x3d4290){if(_0x3d4290['message']===_0x0586('0xaf')){setTimeout(function(){if(_0x470463[_0x2ec3d5]&&_0x470463[_0x2ec3d5][_0x0586('0x4e')]!=='ivr'){_0x14d649[_0x0586('0xb0')](_0x14d649[_0x0586('0x1f')][_0x470463[_0x2ec3d5][_0x0586('0xb1')]]);logger[_0x0586('0x9b')]('[Dialer][checkChannel]',_0x3760c3,_0x2ec3d5,_0x470463[_0x2ec3d5][_0x0586('0xb1')]);delete _0x470463[_0x2ec3d5];}if(_0x470463[_0x2ec3d5]&&_0x470463[_0x2ec3d5][_0x0586('0x4e')]==='ivr'){_0x14d649[_0x0586('0xb0')](_0x14d649[_0x0586('0x20')][_0x470463[_0x2ec3d5][_0x0586('0xb1')]]);logger[_0x0586('0x9b')](_0x0586('0xb2'),_0x3760c3,_0x2ec3d5,_0x470463[_0x2ec3d5][_0x0586('0xb1')]);delete _0x470463[_0x2ec3d5];}},0x2328);}});}});}}};Dialer[_0x0586('0x1a')]['countReScheduled']=function(_0x523a43){return BPromise[_0x0586('0xb3')]()['then'](cmHopper[_0x0586('0xb4')](_0x523a43))['catch'](loggerCatch(_0x0586('0xb5')));};Dialer[_0x0586('0x1a')]['checkIsBlackList']=function(_0xf1c86e){return BPromise['resolve']()[_0x0586('0xb6')](cmHopperBlack[_0x0586('0xb7')](_0xf1c86e))[_0x0586('0xae')](loggerCatch(_0x0586('0xb8')));};Dialer[_0x0586('0x1a')][_0x0586('0xb9')]=function(_0x48cc11){return BPromise['resolve']()[_0x0586('0xb6')](cmHopperBlack[_0x0586('0xb9')](_0x48cc11))['catch'](loggerCatch(_0x0586('0xba')));};Dialer[_0x0586('0x1a')][_0x0586('0xbb')]=function(_0x2b77c0){return BPromise['resolve']()['then'](cmHopperHistory[_0x0586('0xbc')](_0x2b77c0))['catch'](loggerCatch(_0x0586('0xbd')));};Dialer['prototype'][_0x0586('0xbe')]=function(_0x49b0f8){return BPromise[_0x0586('0xb3')]()['then'](cmHopper[_0x0586('0xbe')](_0x49b0f8))[_0x0586('0xae')](loggerCatch(_0x0586('0xbf')));};Dialer[_0x0586('0x1a')][_0x0586('0xc0')]=function(_0x16717a,_0x38a931,_0x2d6ac3,_0x5c1ed2){return BPromise[_0x0586('0xb3')]()['then'](cmHopper[_0x0586('0xc0')](_0x16717a,_0x38a931,_0x2d6ac3,_0x5c1ed2))['catch'](loggerCatch(_0x0586('0xc1')));};Dialer[_0x0586('0x1a')][_0x0586('0xc2')]=function(_0x5b1750,_0x6776b0,_0x38c7f6){return BPromise[_0x0586('0xb3')]()[_0x0586('0xb6')](cmHopper['getContactDialerIvr'](_0x5b1750,_0x6776b0,_0x38c7f6))[_0x0586('0xae')](loggerCatch(_0x0586('0xc1')));};Dialer['prototype']['getVoiceQueueRtPauses']=function(_0x247368){return BPromise[_0x0586('0xb3')]()[_0x0586('0xb6')](voiceQueueRt[_0x0586('0xc3')](_0x247368))[_0x0586('0xae')](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0x0586('0x1a')][_0x0586('0xc4')]=function(_0x249e8f){return BPromise[_0x0586('0xb3')]()['then'](cmHopper[_0x0586('0xc4')](_0x249e8f))['catch'](loggerCatch(_0x0586('0xc5')));};Dialer[_0x0586('0x1a')]['createHistory']=function(_0x20cb87){return BPromise[_0x0586('0xb3')]()[_0x0586('0xb6')](cmHopperHistory[_0x0586('0xc6')](_0x20cb87))[_0x0586('0xae')](loggerCatch(_0x0586('0xc7')));};Dialer['prototype'][_0x0586('0xb0')]=function(_0x41e318){if(!_[_0x0586('0x3d')](_0x41e318)&&_0x41e318!==null){if(_0x41e318[_0x0586('0xc8')](_0x0586('0x77'))){if(_0x41e318['originated']>0x0){_0x41e318[_0x0586('0x77')]-=0x1;}else{logger['error']('[updateOriginated]\x20object\x20originated\x20is\x20negative');}}}else{logger[_0x0586('0x9b')](_0x0586('0xc9'));}};Dialer[_0x0586('0x1a')][_0x0586('0xca')]=function(_0x178d0b,_0xdf9d28){var _0x5a96d8=this;return function(_0x42a863){_0x5a96d8[_0x0586('0xb0')](_0xdf9d28);logger[_0x0586('0x9b')](_0x178d0b,util[_0x0586('0x9a')](_0x42a863,{'showHidden':![],'depth':null}));};};Dialer[_0x0586('0x1a')]['emptyContact']=function(_0x2591a0,_0x54dc09,_0x2e1bbc){var _0x5a0c90={'state':0x19,'statedesc':_0x0586('0xcb')};this['updateOriginated'](_0x54dc09);this['saveInDb'](_[_0x0586('0xcc')](_0x5a0c90,_[_0x0586('0xcd')](_0x2e1bbc,[_0x0586('0xce'),'ListId',_0x0586('0xcf'),_0x0586('0xd0'),_0x0586('0xd1')])),_0x0586('0xd2'),_0x0586('0xd3'));logger[_0x0586('0x9b')](_0x2591a0);};Dialer[_0x0586('0x1a')][_0x0586('0xd4')]=function(_0x17f1b0){return _0x17f1b0==='Success';};Dialer['prototype'][_0x0586('0xd5')]=function(_0x4de5eb){return!_[_0x0586('0x3d')](_0x4de5eb)&&_0x4de5eb&&!_[_0x0586('0x3d')](_0x4de5eb[_0x0586('0x3f')])&&!_[_0x0586('0x3d')](_0x4de5eb[_0x0586('0x7d')])&&_0x4de5eb[_0x0586('0x7d')]&&(this[_0x0586('0x22')][util['format'](_0x0586('0xd6'),_0x4de5eb['name'])][_0x0586('0xac')]===_0x0586('0xd7')||this['trunks'][util[_0x0586('0x7f')](_0x0586('0xd6'),_0x4de5eb['name'])][_0x0586('0xac')]==='unmonitored');};Dialer[_0x0586('0x1a')][_0x0586('0xd8')]=function(_0x541073,_0x52180c,_0x224eb1){this[_0x0586('0xc6')](_0x541073)[_0x0586('0xae')](loggerCatch(_0x52180c));this[_0x0586('0xc4')](_0x541073)['catch'](loggerCatch(_0x224eb1));};Dialer[_0x0586('0x1a')][_0x0586('0x39')]=function(_0x3fef9e){var _0xc3e9e9=this[_0x0586('0x25')][_0x3fef9e[_0x0586('0xd9')]];var _0x11bf7a;if(!_[_0x0586('0xab')](_0x3fef9e)&&!_[_0x0586('0xab')](_0x3fef9e[_0x0586('0xda')])&&!_['isNil'](_0x3fef9e[_0x0586('0xda')]['amdstatus'])&&_0x3fef9e[_0x0586('0xdb')]==='xcally-motion-dialer'&&_0xc3e9e9){if(_0xc3e9e9[_0x0586('0x4e')]!==_0x0586('0xdc')&&this[_0x0586('0x1f')][_0xc3e9e9['queue']][_0x0586('0xdd')]&&_0x3fef9e['value']===_0x0586('0xde')){delete this[_0x0586('0x25')][_0x3fef9e[_0x0586('0xd9')]];this[_0x0586('0xb0')](this[_0x0586('0x1f')][_0xc3e9e9[_0x0586('0xb1')]]);this[_0x0586('0x1f')][_0xc3e9e9[_0x0586('0xb1')]][_0x0586('0x60')]+=0x1;this[_0x0586('0x1f')][_0xc3e9e9[_0x0586('0xb1')]]['outboundAnswerAgiCallsDay']+=0x1;_0x11bf7a=new Hangup(_0xc3e9e9,_0x3fef9e);_0x11bf7a[_0x0586('0xdf')]=0x12;_0x11bf7a[_0x0586('0xa6')]=_0x0586('0xe0');_0x11bf7a[_0x0586('0xe1')]=_0x0586('0xe2');this[_0x0586('0xd8')](_0x11bf7a,'[syncHangupInAMD][createHistory]',_0x0586('0xe3'));}if(_0xc3e9e9[_0x0586('0x4e')]!==_0x0586('0xdc')&&this[_0x0586('0x1f')][_0xc3e9e9['queue']][_0x0586('0xdd')]&&_0x3fef9e[_0x0586('0xe4')]===_0x0586('0xe5')){delete this[_0x0586('0x25')][_0x3fef9e[_0x0586('0xd9')]];this[_0x0586('0xb0')](this[_0x0586('0x1f')][_0xc3e9e9[_0x0586('0xb1')]]);this[_0x0586('0x1f')][_0xc3e9e9['queue']][_0x0586('0x60')]+=0x1;this[_0x0586('0x1f')][_0xc3e9e9[_0x0586('0xb1')]][_0x0586('0x5f')]+=0x1;_0x11bf7a=new Hangup(_0xc3e9e9,_0x3fef9e);_0x11bf7a[_0x0586('0xdf')]=0x13;_0x11bf7a[_0x0586('0xa6')]=_0x0586('0xe6');_0x11bf7a[_0x0586('0xe1')]=_0x0586('0xe2');_0x11bf7a['amd']=!![];this['saveInDb'](_0x11bf7a,_0x0586('0xe7'),'[syncMachine]');}if(_0xc3e9e9[_0x0586('0x4e')]===_0x0586('0xdc')&&this[_0x0586('0x20')][_0xc3e9e9[_0x0586('0xb1')]]['dialAMDActive']&&_0x3fef9e[_0x0586('0xe4')]===_0x0586('0xde')){delete this[_0x0586('0x25')][_0x3fef9e['uniqueid']];this[_0x0586('0xb0')](this[_0x0586('0x20')][_0xc3e9e9[_0x0586('0xb1')]]);_0x11bf7a=new Hangup(_0xc3e9e9,_0x3fef9e);_0x11bf7a['state']=0x12;_0x11bf7a[_0x0586('0xa6')]='HangupInAMD';_0x11bf7a[_0x0586('0xe1')]=_0x0586('0xe2');this[_0x0586('0xd8')](_0x11bf7a,_0x0586('0xe8'),_0x0586('0xe9'));}if(_0xc3e9e9[_0x0586('0x4e')]===_0x0586('0xdc')&&this[_0x0586('0x20')][_0xc3e9e9[_0x0586('0xb1')]][_0x0586('0xdd')]&&_0x3fef9e[_0x0586('0xe4')]===_0x0586('0xe5')){delete this[_0x0586('0x25')][_0x3fef9e[_0x0586('0xd9')]];this[_0x0586('0xb0')](this['campaigns'][_0xc3e9e9[_0x0586('0xb1')]]);_0x11bf7a=new Hangup(_0xc3e9e9,_0x3fef9e);_0x11bf7a[_0x0586('0xdf')]=0x13;_0x11bf7a['statedesc']=_0x0586('0xe6');_0x11bf7a[_0x0586('0xe1')]=_0x0586('0xe2');_0x11bf7a[_0x0586('0xea')]=!![];this[_0x0586('0xd8')](_0x11bf7a,_0x0586('0xeb'),_0x0586('0xec'));}}};Dialer[_0x0586('0x1a')]['syncHangup']=function(_0x4ee230){var _0x1b7027=this[_0x0586('0x25')][_0x4ee230[_0x0586('0xd9')]];var _0x78ef59=this;var _0x47a3a8;if(_0x1b7027&&_0x1b7027[_0x0586('0x4e')]===_0x0586('0xdc')){delete this[_0x0586('0x25')][_0x4ee230[_0x0586('0xd9')]];this['updateOriginated'](this[_0x0586('0x20')][_0x1b7027[_0x0586('0xb1')]]);this[_0x0586('0x20')][_0x1b7027[_0x0586('0xb1')]][_0x0586('0xed')]+=0x1;_0x47a3a8=new Hangup(_0x1b7027,_0x4ee230);this[_0x0586('0xc6')](_0x47a3a8)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));this[_0x0586('0xc4')](_0x47a3a8)['catch'](loggerCatch(_0x0586('0xee')));}if(_0x1b7027&&_0x1b7027[_0x0586('0x4e')]!=='ivr'&&isNotNull(this['voiceQueues'][_0x1b7027[_0x0586('0xb1')]][_0x0586('0xef')])){delete this[_0x0586('0x25')][_0x4ee230[_0x0586('0xd9')]];this[_0x0586('0xb0')](this[_0x0586('0x1f')][_0x1b7027[_0x0586('0xb1')]]);this[_0x0586('0x1f')][_0x1b7027[_0x0586('0xb1')]][_0x0586('0x60')]+=0x1;this['voiceQueues'][_0x1b7027['queue']]['outboundAnswerAgiCallsDay']+=0x1;_0x47a3a8=new Hangup(_0x1b7027,_0x4ee230);_0x47a3a8[_0x0586('0xdf')]=0x10;_0x47a3a8['statedesc']='AnswerAGI';_0x47a3a8[_0x0586('0xe1')]='AGI';this['createHistory'](_0x47a3a8)[_0x0586('0xae')](loggerCatch(_0x0586('0xf0')));this['moveContactManagedDialer'](_0x47a3a8)[_0x0586('0xae')](loggerCatch(_0x0586('0xee')));}if(_0x1b7027&&_0x1b7027[_0x0586('0x4e')]!=='ivr'&&!isNotNull(this[_0x0586('0x1f')][_0x1b7027['queue']]['dialQueueProject'])){delete this[_0x0586('0x25')][_0x4ee230[_0x0586('0xd9')]];this[_0x0586('0xb0')](this['voiceQueues'][_0x1b7027[_0x0586('0xb1')]]);this[_0x0586('0x1f')][_0x1b7027[_0x0586('0xb1')]][_0x0586('0x6a')]+=0x1;_0x47a3a8=new Hangup(_0x1b7027,_0x4ee230);_0x47a3a8[_0x0586('0xdf')]=0xc;_0x47a3a8[_0x0586('0xa6')]=_0x4ee230[_0x0586('0xf1')];_0x47a3a8[_0x0586('0xe1')]=_0x0586('0xf2');this[_0x0586('0xc6')](_0x47a3a8)[_0x0586('0xae')](loggerCatch(_0x0586('0xf0')));this[_0x0586('0xc4')](_0x47a3a8)[_0x0586('0xae')](loggerCatch(_0x0586('0xee')));}};Dialer[_0x0586('0x1a')][_0x0586('0x31')]=function(_0x556dbe){var _0x26286a=this[_0x0586('0x25')][_0x556dbe[_0x0586('0xd9')]];var _0x419b43=this;if(this[_0x0586('0x1f')][_0x556dbe['queue']]){if(_0x26286a&&_0x26286a[_0x0586('0x4e')]!==_0x0586('0xdc')){delete this[_0x0586('0x25')][_0x556dbe[_0x0586('0xd9')]];this[_0x0586('0x1f')][_0x556dbe['queue']][_0x0586('0x60')]+=0x1;var _0x1d54a8=new AgentComplete(_0x26286a,_0x556dbe);if(_0x556dbe[_0x0586('0xf3')]===_0x0586('0xf4')){_0x1d54a8['agiafterat']=this['voiceQueues'][_0x556dbe[_0x0586('0xb1')]][_0x0586('0xf5')]&&this[_0x0586('0x1f')][_0x556dbe[_0x0586('0xb1')]]['dialAgiAfterHangupAgent']?moment()[_0x0586('0x7f')](_0x0586('0xf6')):undefined;}this['createHistory'](_0x1d54a8)[_0x0586('0xae')](loggerCatch('[syncAgentComplete][createHistory]'));this[_0x0586('0xc4')](_0x1d54a8)[_0x0586('0xae')](loggerCatch(_0x0586('0xf7')));}}};Dialer[_0x0586('0x1a')][_0x0586('0x2b')]=function(_0x58204a){if(this[_0x0586('0x1f')][_0x58204a[_0x0586('0xb1')]]){if(this[_0x0586('0x25')][_0x58204a['uniqueid']]&&this['uniqueId'][_0x58204a[_0x0586('0xd9')]][_0x0586('0x4e')]!==_0x0586('0xdc')){this['updateOriginated'](this[_0x0586('0x1f')][_0x58204a[_0x0586('0xb1')]]);this['uniqueId'][_0x58204a[_0x0586('0xd9')]][_0x0586('0xf8')]=moment()[_0x0586('0x7f')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype']['queueCallerAbandonCreateState']=function(_0x267557){this[_0x0586('0xc6')](_0x267557)[_0x0586('0xae')](loggerCatch(_0x0586('0xf9')));this[_0x0586('0xc4')](_0x267557)[_0x0586('0xae')](loggerCatch(_0x0586('0xfa')));};Dialer['prototype']['syncQueueCallerAbandon']=function(_0x1b0dc2){var _0x240fb1=this['uniqueId'][_0x1b0dc2[_0x0586('0xd9')]];var _0x2c747c=this;if(this[_0x0586('0x1f')][_0x1b0dc2['queue']]){if(_0x240fb1&&_0x240fb1[_0x0586('0x4e')]!=='ivr'){delete this[_0x0586('0x25')][_0x1b0dc2[_0x0586('0xd9')]];this[_0x0586('0xb0')](this[_0x0586('0x1f')][_0x1b0dc2[_0x0586('0xb1')]]);_0x240fb1[_0x0586('0xfb')]=moment()[_0x0586('0x7f')](_0x0586('0xf6'));var _0x4142b3=new QueueCallerAbandon(_0x240fb1,_0x1b0dc2);if(getSeconds(_0x240fb1[_0x0586('0xfb')],_0x240fb1[_0x0586('0xfc')])>=_0x240fb1[_0x0586('0xfd')]){this[_0x0586('0x1f')][_0x1b0dc2[_0x0586('0xb1')]]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0x0586('0x1f')][_0x1b0dc2[_0x0586('0xb1')]][_0x0586('0xfe')]+=0x1;this[_0x0586('0x1f')][_0x1b0dc2[_0x0586('0xb1')]][_0x0586('0x71')]+=0x1;_0x4142b3[_0x0586('0xdf')]=0xa;_0x4142b3[_0x0586('0xa6')]=_0x0586('0xff');_0x4142b3[_0x0586('0x100')]='TIMEOUT';_0x4142b3[_0x0586('0x101')]=this[_0x0586('0x1f')][_0x1b0dc2[_0x0586('0xb1')]]['dialQueueProject2']?moment()[_0x0586('0x7f')](_0x0586('0xf6')):undefined;this['queueCallerAbandonCreateState'](_0x4142b3);}else{this[_0x0586('0x1f')][_0x1b0dc2['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0x0586('0x1f')][_0x1b0dc2[_0x0586('0xb1')]][_0x0586('0x64')]+=0x1;_0x4142b3['state']=0xb;_0x4142b3['statedesc']=_0x0586('0x102');_0x4142b3[_0x0586('0x100')]=_0x0586('0x103');this[_0x0586('0x104')](_0x4142b3);}}}};Dialer['prototype'][_0x0586('0x37')]=function(_0x55e087){if(this['actions'][_0x55e087[_0x0586('0xd9')]]){this[_0x0586('0x24')][_0x55e087[_0x0586('0xd9')]]['channel']=_0x55e087[_0x0586('0xad')];}if(this['uniqueId'][_0x55e087['uniqueid']]){this[_0x0586('0x25')][_0x55e087[_0x0586('0xd9')]][_0x0586('0xad')]=_0x55e087[_0x0586('0xad')];}};Dialer['prototype'][_0x0586('0x3b')]=function(_0x3ac51f){if(strategy[this[_0x0586('0x1f')][this[_0x0586('0x24')][_0x3ac51f[_0x0586('0x105')]][_0x0586('0xb1')]][_0x0586('0x50')]]===_0x0586('0x106')){if(this[_0x0586('0x24')][_0x3ac51f['actionid']]&&_['isNil'](this[_0x0586('0x24')][_0x3ac51f[_0x0586('0x105')]][_0x0586('0x107')])&&_0x3ac51f[_0x0586('0xac')]==='1'&&_0x3ac51f['paused']==='0'){if(this[_0x0586('0x21')][_0x3ac51f['stateinterface']]){if(!this[_0x0586('0x21')][_0x3ac51f[_0x0586('0x108')]][_0x0586('0x107')]){this['agents'][_0x3ac51f[_0x0586('0x108')]]['locked']=!![];this['actions'][_0x3ac51f[_0x0586('0x105')]]['locked']=!![];this['actions'][_0x3ac51f[_0x0586('0x105')]][_0x0586('0x108')]=_0x3ac51f[_0x0586('0x108')];}}}}else if((strategy[this[_0x0586('0x1f')][this[_0x0586('0x24')][_0x3ac51f['actionid']][_0x0586('0xb1')]][_0x0586('0x50')]]||'rrmemory')==='rrmemory'){if(this[_0x0586('0x24')][_0x3ac51f[_0x0586('0x105')]]){if(this[_0x0586('0x21')][_0x3ac51f[_0x0586('0x108')]]){this['actions'][_0x3ac51f[_0x0586('0x105')]]['stateinterface']=_0x3ac51f[_0x0586('0x108')];if(_[_0x0586('0xab')](this['queueBooked'][this[_0x0586('0x24')][_0x3ac51f[_0x0586('0x105')]][_0x0586('0xb1')]])){this[_0x0586('0x29')][this['actions'][_0x3ac51f[_0x0586('0x105')]][_0x0586('0xb1')]]=[];}this[_0x0586('0x29')][this[_0x0586('0x24')][_0x3ac51f[_0x0586('0x105')]]['queue']][_0x0586('0x109')](_['merge'](_[_0x0586('0xcd')](this[_0x0586('0x24')][_0x3ac51f[_0x0586('0x105')]],['idHopper',_0x0586('0x108')]),{'status':_0x3ac51f[_0x0586('0xac')],'paused':_0x3ac51f['paused']}));}}}};function unlockQueueStatus(_0x55d5d7,_0x49ebc4){setTimeout(function(){if(_[_0x0586('0x3d')](_0x55d5d7['queueStatusComplete'])){loggerBooked[_0x0586('0x9b')]('[unlockQueueStatus][undefined]',_0x49ebc4);}_0x55d5d7[_0x0586('0x10a')]=!![];loggerBooked[_0x0586('0x84')]('[booked][unlockQueueStatus]',_0x49ebc4,JSON[_0x0586('0x49')](_[_0x0586('0xcd')](_0x55d5d7,[_0x0586('0x3f'),'queueStatusComplete'])));},0x1f3);}Dialer[_0x0586('0x1a')][_0x0586('0x10b')]=function(_0x18d46f){var _0x4580aa=this;var _0x435ea4=_0x4580aa[_0x0586('0x1f')][_0x4580aa[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]]['queue']];if(strategy[this['voiceQueues'][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]]['queue']]['strategy']]===_0x0586('0x106')){if(this['actions'][_0x18d46f[_0x0586('0x105')]]&&this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0x108')]){this[_0x0586('0x1e')]['run'](this[_0x0586('0x24')][_0x18d46f['actionid']]['idHopper'],this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0x108')])[_0x0586('0xae')](function(_0x2b18ed){logger['error'](_0x0586('0x10c'),util[_0x0586('0x9a')](_0x2b18ed,{'showHidden':![],'depth':null}));})[_0x0586('0x1d')](function(){_0x4580aa[_0x0586('0xb0')](_0x4580aa['voiceQueues'][_0x4580aa[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]]);_0x4580aa[_0x0586('0x21')][_0x4580aa[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0x108')]]['locked']=![];delete _0x4580aa[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]];unlockQueueStatus(_0x435ea4);});}else{this['updateOriginated'](this[_0x0586('0x1f')][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]]['queue']]);this['rescheduleContact']({'active':![],'ContactId':this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xce')],'ListId':this['actions'][_0x18d46f[_0x0586('0x105')]]['ListId'],'VoiceQueueId':this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xd0')]||undefined,'CampaignId':this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]]['CampaignId']||undefined})[_0x0586('0xae')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]];unlockQueueStatus(_0x435ea4);}}else if((strategy[this[_0x0586('0x1f')][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]][_0x0586('0x50')]]||'rrmemory')==='rrmemory'){var _0x2bbd4c;if(this['actions'][_0x18d46f[_0x0586('0x105')]]&&!_[_0x0586('0x46')](this[_0x0586('0x29')][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]])){if(this[_0x0586('0x10d')][_0x4580aa[_0x0586('0x24')][_0x18d46f['actionid']][_0x0586('0xb1')]]){this[_0x0586('0x10d')][_0x4580aa[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]]=this[_0x0586('0x10d')][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]]?this[_0x0586('0x10d')][this['actions'][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]]:this[_0x0586('0x29')][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]]['queue']]?this[_0x0586('0x29')][this[_0x0586('0x24')][_0x18d46f['actionid']][_0x0586('0xb1')]]['_rr']||0x0:0x0;}this[_0x0586('0x29')][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]][_0x0586('0x10e')]=this['queueBookedRR'][this[_0x0586('0x24')][_0x18d46f[_0x0586('0x105')]][_0x0586('0xb1')]];for(var _0xe8ae4c=0x0;_0xe8ae4c=0x0?!![]:![];})[_0x0586('0xae')](myreject(_0x4fff55)));}}else{_0xc81677['push'](ami['Action']({'action':'command','command':util[_0x0586('0x7f')](_0x0586('0x12f'),_0x169f24,!_[_0x0586('0x3d')](config['timezones'][_0x286f54])?_0x286f54:'')})['then'](function(_0x38d862){return _0x38d862['content']['indexOf'](_0x0586('0x12e'))>=0x0?!![]:![];})[_0x0586('0xae')](myreject(_0x4fff55)));}BPromise['all'](_0xc81677)['then'](function(_0x59b07b){var _0x21400b=_['some'](_0x59b07b);if(_0x21400b){return _0x1e3ee6(_0x21400b);}else{_0x496a81[_0x0586('0x41')]=_0x5c23e7?_0x0586('0x130'):_0x0586('0x131');return _0x4fff55(msgResponse(_0x0586('0x132'),_0x0586('0x128'),_0x0586('0x133')+_0x5c23e7+'\x20'+_0x51bbf1+'\x20Interval\x20is\x20overtime:\x20'+util['inspect'](_0x169f24,{'showHidden':![],'depth':null})+_0x0586('0x134')+_0x286f54));}})[_0x0586('0xae')](function(_0x1e3a41){return _0x4fff55(msgResponse(_0x0586('0x122'),'Failure',JSON[_0x0586('0x49')](_0x1e3a41)));});});};Dialer[_0x0586('0x1a')][_0x0586('0x135')]=function(_0x372e43){var _0x53e17d=this;return function(){switch(_0x372e43[_0x0586('0x5c')]){case _0x0586('0x136'):freeVariablesPredictive(_0x372e43);_0x53e17d[_0x0586('0x137')](_0x372e43,0x1);break;case'power':freeVariablesPredictive(_0x372e43);_0x53e17d['handlePower'](_0x372e43,_0x372e43['dialPowerLevel']);break;case'predictive':_0x53e17d[_0x0586('0x8')](_0x372e43);break;case'booked':freeVariablesPredictive(_0x372e43);_0x53e17d[_0x0586('0x137')](_0x372e43,0x1);break;default:freeVariablesPredictive(_0x372e43);logger[_0x0586('0x9b')](_0x0586('0x138'),_0x372e43[_0x0586('0x3f')],'method\x20not\x20recognized');}};};Dialer[_0x0586('0x1a')][_0x0586('0x139')]=function(_0x5c2d1f){var _0x3668e0=this;return function(){_0x3668e0[_0x0586('0x13a')](_0x5c2d1f);};};Dialer[_0x0586('0x1a')][_0x0586('0x33')]=function(_0xca7122){var _0x34f293=this;if(isNotPreview(_0xca7122['dialMethod'])){if(isVoiceQueueOutbound(_0xca7122[_0x0586('0x4e')])&&isActive(_0xca7122[_0x0586('0x5b')])){_0xca7122[_0x0586('0xa2')]=!![];BPromise[_0x0586('0xb3')]()[_0x0586('0xb6')](checkIsLoggedIn(_0xca7122,_0xca7122[_0x0586('0x53')]))[_0x0586('0xb6')](checkIsActive(_0xca7122,_0xca7122[_0x0586('0x5b')]))['then'](checkInterval(_0xca7122))[_0x0586('0xb6')](_0x34f293['checkIsTrunkReachable'](_0xca7122))[_0x0586('0xb6')](_0x34f293[_0x0586('0x121')](_0xca7122['dialGlobalInterval'],_0xca7122[_0x0586('0x13b')],_0xca7122['name'],_0xca7122))[_0x0586('0xb6')](_0x34f293[_0x0586('0x123')](_0xca7122[_0x0586('0x43')],_0xca7122[_0x0586('0x13b')],_0xca7122['name'],_0xca7122))[_0x0586('0xb6')](_0x34f293['checkDialMethod'](_0xca7122))[_0x0586('0xae')](loggerCatchQueueSummary('[syncQueueSummary]',_0xca7122));}else{notSendMessagesQueue(_0xca7122);}}else{freeVariablesPredictive(_0xca7122);}};Dialer[_0x0586('0x1a')][_0x0586('0x11e')]=function(){var _0x2197e9=this;var _0x214ef6;for(var _0x115ac6 in this[_0x0586('0x20')]){if(this['campaigns'][_0x0586('0xc8')](_0x115ac6)){_0x214ef6=this['campaigns'][_0x115ac6];if(isCampaignIvr(_0x214ef6[_0x0586('0x4e')])&&isActive(_0x214ef6[_0x0586('0x7d')])){_0x214ef6[_0x0586('0xa2')]=!![];BPromise[_0x0586('0xb3')]()[_0x0586('0xb6')](checkIsActive(_0x214ef6,_0x214ef6['active']))[_0x0586('0xb6')](checkInterval(_0x214ef6))[_0x0586('0xb6')](_0x2197e9[_0x0586('0x11f')](_0x214ef6))[_0x0586('0xb6')](_0x2197e9['checkIfTime'](_0x214ef6[_0x0586('0x13c')],_0x214ef6['dialTimezone'],_0x214ef6[_0x0586('0x3f')],_0x214ef6))['then'](_0x2197e9[_0x0586('0x123')](_0x214ef6[_0x0586('0x43')],_0x214ef6['dialTimezone'],_0x214ef6[_0x0586('0x3f')],_0x214ef6))['then'](_0x2197e9[_0x0586('0x139')](_0x214ef6))[_0x0586('0xae')](loggerCatchQueueSummary('[syncCampaigns]',_0x214ef6));}else{notSendMessagesCampaign(_0x214ef6);}}}};function getCallerIdRandom(_0x45d1dc,_0x2dc76c){var _0x1656cd,_0x416463,_0x50cc85;if(_0x2dc76c<=0x0){_0x2dc76c=0x1;}_0x1656cd=new RegExp(_0x0586('0x13d')+_0x2dc76c+'}$');_0x416463=Math[_0x0586('0x13e')](0xa,_0x2dc76c-0x1);_0x50cc85=Math[_0x0586('0x13e')](0xa,_0x2dc76c)-0x1;return util[_0x0586('0x7f')]('%s',_[_0x0586('0x13f')](_0x45d1dc,_0x1656cd,_[_0x0586('0x140')](_0x416463,_0x50cc85)));}function extractCalleridName(_0x5e2dfa){var _0x42eb85=_0x5e2dfa[_0x0586('0x141')](/"(.*?)"/);return _0x42eb85?_0x42eb85[0x1]:_0x5e2dfa;}function extractCalleridNumber(_0x2da6fe){var _0x5150d3=_0x2da6fe[_0x0586('0x141')](/<(.*?)>/);return _0x5150d3?_0x5150d3[0x1]:_0x2da6fe;}Dialer[_0x0586('0x1a')][_0x0586('0x142')]=function(_0x428970,_0x51f8d7){var _0x4d64b6=this;var _0xded8da=uuid['v4']();this['actions'][_0xded8da]=new Action(_0x428970,_0x51f8d7,_0xded8da);return new BPromise(function(_0x571f66,_0x112d81){if(_[_0x0586('0x3d')](_0x428970)&&_0x0586('0x143')!==typeof _0x428970){return _0x112d81(msgResponse(_0x0586('0x144'),_0x0586('0x128'),_0x0586('0x145')));}if(_[_0x0586('0x3d')](_0x51f8d7['Contact'][_0x0586('0x146')])||_0x51f8d7[_0x0586('0x147')][_0x0586('0x146')]===null){return _0x112d81(msgResponse(_0x0586('0x144'),_0x0586('0x128'),'contact\x20is\x20undefine'));}var _0x24473e={'XMD-CALLERID':_0x4d64b6[_0x0586('0x24')][_0xded8da][_0x0586('0x148')](),'XMD-AGI':_0x428970[_0x0586('0xef')]?util['format']('\x22agi://%s/square,%s\x22',ipAgi,_0x428970['dialQueueProject']):_0x0586('0x149'),'XMD-AGIAFTER':_0x428970[_0x0586('0xf5')]?util['format'](_0x0586('0x14a'),ipAgi,_0x428970[_0x0586('0xf5')]):'NONE','XMD-QUEUE':_0x428970[_0x0586('0x4e')]===_0x0586('0x4f')?util[_0x0586('0x7f')](_0x0586('0x14b'),_0x428970[_0x0586('0x3f')],_0x428970[_0x0586('0x14c')]||'',_0x428970[_0x0586('0x14d')]?'c':'',_0x428970['dialQueueTimeout']||0x3):'NONE','XMD-CONTACTID':_0x51f8d7[_0x0586('0xce')],'XMD-CDRTYPE':_0x0586('0x6'),'CALLERID(all)':_0x4d64b6[_0x0586('0x24')][_0xded8da]['getCaller'](),'XMD-AMD':_0x428970['dialAMDActive']?'ACTIVE':_0x0586('0x149'),'XMD-DESTINATION':_0x0586('0x14e')};if(_0x428970[_0x0586('0xdd')]){_0x24473e[_0x0586('0x14f')]=_0x428970[_0x0586('0x150')]||0x9c4;_0x24473e[_0x0586('0x151')]=_0x428970[_0x0586('0x152')]||0x5dc;_0x24473e[_0x0586('0x153')]=_0x428970[_0x0586('0x154')]||0x320;_0x24473e[_0x0586('0x155')]=_0x428970[_0x0586('0x156')]||0x1388;_0x24473e[_0x0586('0x157')]=_0x428970[_0x0586('0x158')]||0x64;_0x24473e[_0x0586('0x159')]=_0x428970[_0x0586('0x15a')]||0x32;_0x24473e[_0x0586('0x15b')]=_0x428970[_0x0586('0x15c')]||0x3;_0x24473e[_0x0586('0x15d')]=_0x428970['dialAMDSilenceThreshold']||0x100;_0x24473e['XMD-AMDMAXIMUMWORDLENGTH']=_0x428970['dialAMDMaximumWordLength']||0x1388;}if(_0x428970[_0x0586('0x4e')]===_0x0586('0x4f')){_0x24473e[_0x0586('0x15e')]=_0x51f8d7[_0x0586('0xd0')];}else{_0x24473e['XMD-CAMPAIGNID']=_0x51f8d7[_0x0586('0xd1')];}for(var _0x28bcdf in _0x51f8d7['Contact']){if(_0x51f8d7[_0x0586('0x147')][_0x0586('0xc8')](_0x28bcdf)){if(isNotNull(_0x51f8d7[_0x0586('0x147')][_0x28bcdf])&&_0x28bcdf!=='id'&&_0x28bcdf!==_0x0586('0x15f')&&_0x28bcdf!==_0x0586('0x160')&&_0x28bcdf!==_0x0586('0x161')){_0x24473e[util[_0x0586('0x7f')](_0x0586('0x162'),_0x0586('0x163'),_[_0x0586('0x164')](_0x28bcdf))]=_0x51f8d7[_0x0586('0x147')][_0x28bcdf];}}}var _0x43c63f=_0x4d64b6[_0x0586('0xd5')](_0x428970[_0x0586('0x7c')])?getCallerId(_0x428970[_0x0586('0x7c')][_0x0586('0x7e')],_0x428970[_0x0586('0x5d')],_0x428970[_0x0586('0x165')]>0x0?getCallerIdRandom(_0x428970['dialOriginateCallerIdNumber'],_0x428970[_0x0586('0x165')]):_0x428970[_0x0586('0x166')]):getCallerId(_[_0x0586('0xab')](_0x428970[_0x0586('0x120')])?_0x428970[_0x0586('0x7c')]['callerid']:_0x428970['TrunkBackup'][_0x0586('0x7e')],_0x428970[_0x0586('0x5d')],_0x428970[_0x0586('0x165')]>0x0?getCallerIdRandom(_0x428970['dialOriginateCallerIdNumber'],_0x428970['dialRandomLastDigitCallerIdNumber']):_0x428970[_0x0586('0x166')]);if(_0x43c63f){_0x24473e[_0x0586('0x167')]=_0x4d64b6[_0x0586('0x24')][_0xded8da][_0x0586('0x168')]=extractCalleridName(_0x43c63f);_0x24473e[_0x0586('0x169')]=_0x4d64b6[_0x0586('0x24')][_0xded8da][_0x0586('0x16a')]=extractCalleridNumber(_0x43c63f);}return ami[_0x0586('0x12b')]({'actionid':_0xded8da,'action':'originate','channel':_0x4d64b6[_0x0586('0xd5')](_0x428970[_0x0586('0x7c')])?util[_0x0586('0x7f')](_0x0586('0x16b'),_0x428970[_0x0586('0x7c')][_0x0586('0x3f')],isNotNull(_0x428970[_0x0586('0x5e')])?_0x428970[_0x0586('0x5e')]['trim']()||'':'',_0x428970[_0x0586('0x16c')]>0x0?_0x51f8d7[_0x0586('0x147')][_0x0586('0x146')][_0x0586('0x16d')](_0x428970[_0x0586('0x16c')]):_0x51f8d7[_0x0586('0x147')][_0x0586('0x146')]):util[_0x0586('0x7f')](_0x0586('0x16b'),_['isNil'](_0x428970[_0x0586('0x120')])?_0x428970[_0x0586('0x7c')][_0x0586('0x3f')]:_0x428970['TrunkBackup'][_0x0586('0x3f')],isNotNull(_0x428970[_0x0586('0x5e')])?_0x428970[_0x0586('0x5e')][_0x0586('0x16e')]()||'':'',_0x428970[_0x0586('0x16c')]>0x0?_0x51f8d7['Contact'][_0x0586('0x146')][_0x0586('0x16d')](_0x428970[_0x0586('0x16c')]):_0x51f8d7[_0x0586('0x147')]['phone']),'callerid':_0x43c63f,'Exten':_0x0586('0x14e'),'Context':'from-sip','Priority':'1','variable':_0x24473e,'timeout':(_0x428970[_0x0586('0x16f')]||0x1e)*0x3e8,'async':!![],'channelid':_0xded8da})[_0x0586('0xb6')](function(_0x5e14d3){return _0x571f66(_0x5e14d3);})[_0x0586('0xae')](function(_0x4ac5ba){_0x428970[_0x0586('0x67')]+=0x1;var _0x394bb2=new History(_0x4d64b6[_0x0586('0x24')][_0xded8da]);logger[_0x0586('0x9b')](util['format'](_0x0586('0x170'),JSON[_0x0586('0x49')](_0x4ac5ba)));_0x394bb2[_0x0586('0xdf')]=0xe;_0x394bb2['statedesc']='OriginateError';_0x394bb2[_0x0586('0xa7')]=moment()[_0x0586('0x7f')](_0x0586('0xf6'));_0x394bb2[_0x0586('0x171')]=_0x394bb2['starttime'];_0x4d64b6['createHistory'](_0x394bb2)[_0x0586('0xae')](loggerCatch('[originate][error]'));_0x4d64b6['moveContactManagedDialer'](_0x394bb2)[_0x0586('0xae')](loggerCatch(_0x0586('0x172')))[_0x0586('0x1d')](function(){delete _0x4d64b6[_0x0586('0x24')][_0xded8da];return _0x112d81(msgResponse(_0x0586('0x144'),_0x0586('0x173'),'originate\x20action\x20Error'));});});});};Dialer[_0x0586('0x1a')][_0x0586('0x30')]=function(_0x1e44b8){var _0xa2981d=this[_0x0586('0x24')][_0x1e44b8['actionid']];var _0x5ba9b7=this;if(_0xa2981d){delete this[_0x0586('0x24')][_0x1e44b8[_0x0586('0x105')]];_0xa2981d[_0x0586('0xfc')]=moment()[_0x0586('0x7f')]('YYYY-MM-DD\x20HH:mm:ss');var _0x84abe3=_0xa2981d[_0x0586('0x4e')]===_0x0586('0xdc')?this[_0x0586('0x20')][_0xa2981d['queue']]:this[_0x0586('0x1f')][_0xa2981d[_0x0586('0x174')]()];if(!this['isSuccess'](_0x1e44b8['response'])){this['updateOriginated'](_0x84abe3);return this['callProgressDetecting'](_0xa2981d,_0x84abe3,_0x1e44b8)[_0x0586('0xb6')](function(_0x441141){})[_0x0586('0xae')](loggerCatch(_0x0586('0x175')));}else{this[_0x0586('0x25')][_0x1e44b8[_0x0586('0xd9')]]=_0xa2981d;}}};Dialer[_0x0586('0x1a')]['checkRetriveMax']=function(_0x3d1745,_0x4dd0ea,_0x25e7da){var _0x4dde65=new History(_0x4dd0ea);if(_0x4dde65[_0x0586('0x176')]+_0x4dde65[_0x0586('0x177')]+_0x4dde65[_0x0586('0x178')]>=_0x25e7da['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x3d1745){case 0x3:if(_0x4dde65['countnoanswerretry']>=_0x25e7da[_0x0586('0x179')]-0x1){return!![];}else{this[_0x0586('0xbe')]({'active':![],'countnoanswerretry':_0x4dde65[_0x0586('0x178')]+=0x1,'scheduledat':moment()['add'](_0x25e7da[_0x0586('0x17a')],_0x0586('0x17b'))[_0x0586('0x7f')](_0x0586('0xf6')),'ContactId':_0x4dde65[_0x0586('0xce')],'ListId':_0x4dde65[_0x0586('0x119')],'VoiceQueueId':_0x4dde65[_0x0586('0xd0')]||undefined,'CampaignId':_0x4dde65['CampaignId']||undefined})['catch'](loggerCatch(_0x0586('0x17c')));}break;case 0x5:if(_0x4dde65[_0x0586('0x176')]>=_0x25e7da[_0x0586('0x17d')]-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countbusyretry':_0x4dde65[_0x0586('0x176')]+=0x1,'scheduledat':moment()['add'](_0x25e7da[_0x0586('0x17e')],_0x0586('0x17b'))['format'](_0x0586('0xf6')),'ContactId':_0x4dde65['ContactId'],'ListId':_0x4dde65[_0x0586('0x119')],'VoiceQueueId':_0x4dde65[_0x0586('0xd0')]||undefined,'CampaignId':_0x4dde65[_0x0586('0xd1')]||undefined})[_0x0586('0xae')](loggerCatch(_0x0586('0x17f')));}break;case 0x8:if(_0x4dde65[_0x0586('0x177')]>=_0x25e7da[_0x0586('0x180')]-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countcongestionretry':_0x4dde65[_0x0586('0x177')]+=0x1,'scheduledat':moment()[_0x0586('0x181')](_0x25e7da[_0x0586('0x182')],'minutes')[_0x0586('0x7f')](_0x0586('0xf6')),'ContactId':_0x4dde65['ContactId'],'ListId':_0x4dde65[_0x0586('0x119')],'VoiceQueueId':_0x4dde65[_0x0586('0xd0')]||undefined,'CampaignId':_0x4dde65[_0x0586('0xd1')]||undefined})[_0x0586('0xae')](loggerCatch(_0x0586('0x183')));}break;default:return!![];}};Dialer[_0x0586('0x1a')]['callProgressDetecting']=function(_0x1d8d9d,_0x2f5a26,_0x2dce4e){var _0x3c77ef=this;var _0x5324af=new History(_0x1d8d9d);return new BPromise(function(_0x2f25cb,_0x50e2b3){if(_['isUndefined'](_0x2f5a26)&&'object'!==typeof _0x2f5a26){return _0x50e2b3(msgResponse(_0x0586('0x184'),_0x0586('0x128'),'entity\x20is\x20undefine'));}if(_['isUndefined'](_0x2dce4e)&&_0x0586('0x143')!==typeof _0x2dce4e){return _0x50e2b3(msgResponse(_0x0586('0x184'),_0x0586('0x128'),_0x0586('0x185')));}switch(_0x2dce4e[_0x0586('0xf3')]){case'0':_0x2f5a26[_0x0586('0x66')]+=0x1;_0x5324af[_0x0586('0xdf')]=0x0;_0x5324af['statedesc']='NoSuchNumber';_0x3c77ef[_0x0586('0xc6')](_0x5324af)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x3c77ef['checkRetriveMax'](0x0,_0x1d8d9d,_0x2f5a26)){if(_0x5324af[_0x0586('0x176')]+_0x5324af[_0x0586('0x177')]+_0x5324af[_0x0586('0x178')]>=_0x2f5a26[_0x0586('0x186')]){_0x3c77ef['stateGlobal'](_0x5324af,_0x2f25cb,_0x50e2b3,_0x0586('0x187'));}else{_0x3c77ef[_0x0586('0x188')](_0x5324af,_0x2f25cb,_0x50e2b3,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x2f5a26[_0x0586('0x65')]+=0x1;_0x5324af[_0x0586('0xdf')]=0x3;_0x5324af['statedesc']=_0x0586('0x189');_0x5324af[_0x0586('0x178')]+=0x1;_0x5324af[_0x0586('0x18a')]+=0x1;_0x3c77ef[_0x0586('0xc6')](_0x5324af)['catch'](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x3c77ef[_0x0586('0x18b')](0x3,_0x1d8d9d,_0x2f5a26)){if(_0x5324af[_0x0586('0x178')]>=_0x2f5a26[_0x0586('0x179')]){_0x3c77ef[_0x0586('0x188')](_0x5324af,_0x2f25cb,_0x50e2b3,'reason\x203\x20ringing\x20no\x20answer');}else{_0x3c77ef['stateGlobal'](_0x5324af,_0x2f25cb,_0x50e2b3,_0x0586('0x18c'));}}break;case'5':_0x2f5a26[_0x0586('0x62')]+=0x1;_0x5324af[_0x0586('0xdf')]=0x5;_0x5324af['statedesc']='Busy';_0x5324af[_0x0586('0x176')]+=0x1;_0x5324af['countglobal']+=0x1;_0x3c77ef[_0x0586('0xc6')](_0x5324af)[_0x0586('0xae')](loggerCatch(_0x0586('0x18d')));if(_0x3c77ef[_0x0586('0x18b')](0x5,_0x1d8d9d,_0x2f5a26)){if(_0x5324af['countbusyretry']>=_0x2f5a26[_0x0586('0x17d')]){_0x3c77ef[_0x0586('0x188')](_0x5324af,_0x2f25cb,_0x50e2b3,'reason\x205\x20busy');}else{_0x3c77ef[_0x0586('0x18e')](_0x5324af,_0x2f25cb,_0x50e2b3,_0x0586('0x18f'));}}break;case'8':_0x2f5a26[_0x0586('0x190')]+=0x1;_0x5324af['state']=0x8;_0x5324af[_0x0586('0xa6')]='Congestion';_0x5324af[_0x0586('0x177')]+=0x1;_0x5324af[_0x0586('0x18a')]+=0x1;_0x3c77ef[_0x0586('0xc6')](_0x5324af)[_0x0586('0xae')](loggerCatch(_0x0586('0x191')));if(_0x3c77ef[_0x0586('0x18b')](0x8,_0x1d8d9d,_0x2f5a26)){if(_0x5324af[_0x0586('0x177')]>=_0x2f5a26[_0x0586('0x180')]){_0x3c77ef[_0x0586('0x188')](_0x5324af,_0x2f25cb,_0x50e2b3,_0x0586('0x192'));}else{_0x3c77ef['stateGlobal'](_0x5324af,_0x2f25cb,_0x50e2b3,'reason\x208\x20congestion');}}break;default:_0x2f5a26[_0x0586('0x6a')]+=0x1;_0x5324af[_0x0586('0xdf')]=0xc;_0x5324af['statedesc']=_0x2dce4e[_0x0586('0xf3')];_0x3c77ef[_0x0586('0xc6')](_0x5324af)['catch'](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x3c77ef[_0x0586('0x18b')](_0x2dce4e[_0x0586('0xf3')],_0x1d8d9d,_0x2f5a26)){if(_0x5324af[_0x0586('0x176')]+_0x5324af[_0x0586('0x177')]+_0x5324af[_0x0586('0x178')]>=_0x2f5a26['dialGlobalMaxRetry']){_0x3c77ef['stateGlobal'](_0x5324af,_0x2f25cb,_0x50e2b3,_0x2dce4e['reason']);}else{_0x3c77ef[_0x0586('0x188')](_0x5324af,_0x2f25cb,_0x50e2b3,_0x2dce4e[_0x0586('0xf3')]);}}}});};Dialer[_0x0586('0x1a')][_0x0586('0x18e')]=function(_0x49be25,_0x15ef09,_0x3e404b,_0x3a970d){var _0x15f6e2=new Final(_0x49be25);_0x15f6e2['state']=0xf;_0x15f6e2[_0x0586('0xa6')]=_0x0586('0x193');this[_0x0586('0x188')](_0x15f6e2,_0x15ef09,_0x3e404b,_0x3a970d);};Dialer[_0x0586('0x1a')][_0x0586('0x188')]=function(_0x1e26c6,_0x687e09,_0x236908,_0x58d96c){this['moveContactManagedDialer'](_0x1e26c6)[_0x0586('0xb6')](function(_0x1b24e9){return _0x687e09(msgResponse(_0x0586('0x184'),'Success',_0x58d96c));})[_0x0586('0xae')](function(_0x5640e0){return _0x236908(msgResponse(_0x0586('0x194'),_0x0586('0x128'),_0x0586('0x195')));});};Dialer[_0x0586('0x1a')][_0x0586('0x8')]=function(_0x5830c8){var _0x3bbb40=this;var _0x1afd3f=_0x5830c8['dialPredictiveOptimizationPercentage']/0x64;var _0x144679=_0x5830c8['outboundDropCallsDayTimeout']/(_0x5830c8['outboundDropCallsDayTimeout']+_0x5830c8[_0x0586('0x60')]);var _0xa4db09=Math[_0x0586('0x196')](_0x5830c8[_0x0586('0x75')]*(_0x5830c8[_0x0586('0x197')]/0x64));var _0x1b405f=Math['round'](_0x5830c8[_0x0586('0x75')]*(_0x5830c8[_0x0586('0x198')]/0x64));var _0x8ede6c=_0x5830c8['available']+_0x5830c8[_0x0586('0x56')];var _0x2da74b=Math[_0x0586('0x199')](_0x5830c8[_0x0586('0x78')]*_0x5830c8['erlangAbandonmentRate']*_0x5830c8[_0x0586('0x72')]*_0x5830c8[_0x0586('0x73')]);if(_[_0x0586('0x3d')](_0x5830c8['startProgressive'])){if(!_[_0x0586('0x3d')](_0x5830c8['startPredictive'])){_0x5830c8[_0x0586('0x7b')]=undefined;loggerPredictive['error']('[startMethodPredictive][StartProgressive]',_0x0586('0x19a'));}if(!_['isUndefined'](_0x5830c8[_0x0586('0x95')])){loggerPredictive[_0x0586('0x9b')](_0x0586('0x19b'),_0x0586('0x19c'));clearInterval(_0x5830c8[_0x0586('0x95')]);_0x5830c8[_0x0586('0x95')]=undefined;}_0x5830c8[_0x0586('0x27')]=moment()[_0x0586('0x7f')](_0x0586('0xf6'));loggerPredictive[_0x0586('0x84')](_0x5830c8['name'],_0x0586('0x19d'),_0x5830c8[_0x0586('0x27')]);this['handlePower'](_0x5830c8,0x1);}else if(ifInterval(_0x5830c8[_0x0586('0x19e')],_0x5830c8['startProgressive'])){this[_0x0586('0x137')](_0x5830c8,0x1);loggerPredictiveCalls[_0x0586('0x84')](_0x0586('0x19f'),_0x5830c8[_0x0586('0x27')],_0x5830c8[_0x0586('0x3f')]);_0x5830c8[_0x0586('0x78')]=0x0;_0x5830c8[_0x0586('0x71')]=0x0;}else if(_0x1afd3f<_0x144679&&_0x5830c8[_0x0586('0x1a0')]==='dropRate'){freeVariablesPredictive(_0x5830c8);loggerPredictive[_0x0586('0x84')](_0x0586('0x1a1'),'Dropped\x20calls\x20day',_0x144679,_0x0586('0x27'),_0x5830c8[_0x0586('0x3f')]);}else if(_0x2da74b<_0x5830c8[_0x0586('0x71')]&&_0x5830c8['dialPredictiveOptimization']===_0x0586('0x1a2')){freeVariablesPredictive(_0x5830c8);loggerPredictive['info'](_0x0586('0x1a3'),_0x0586('0x1a4'),_0x2da74b,_0x0586('0x1a5'),_0x5830c8['predictiveIntervalErlangCallsDroppedCalls'],_0x0586('0x27'),_0x5830c8[_0x0586('0x3f')]);}else if(!ifInterval(_0x5830c8[_0x0586('0x19e')],_0x5830c8[_0x0586('0x27')])&&_[_0x0586('0x3d')](_0x5830c8[_0x0586('0x7b')])&&!_[_0x0586('0x3d')](_0x5830c8[_0x0586('0x27')])){_0x5830c8[_0x0586('0x7b')]=moment()[_0x0586('0x7f')](_0x0586('0xf6'));loggerPredictive[_0x0586('0x84')](_0x5830c8['name'],_0x0586('0x1a6'),_0x5830c8[_0x0586('0x7b')]);this[_0x0586('0xbb')](_0x5830c8[_0x0586('0x19e')])[_0x0586('0xb6')](this['getDataPredictive'](_0x5830c8))[_0x0586('0xb6')](mergeDataErlangB(_0x5830c8))['then'](this[_0x0586('0x1a7')](_0x5830c8))[_0x0586('0xae')](loggerCatchPredictive(_0x0586('0x1a8'),_0x5830c8));}else if(!ifInterval(_0x5830c8['dialPredictiveInterval'],_0x5830c8['startPredictive'])){_0x5830c8[_0x0586('0x71')]=0x0;_0x5830c8['startPredictive']=moment()['format'](_0x0586('0xf6'));loggerPredictive['info'](_0x5830c8[_0x0586('0x3f')],_0x0586('0x1a9'),_0x5830c8['startPredictive']);clearInterval(_0x5830c8[_0x0586('0x95')]);_0x5830c8[_0x0586('0x95')]=undefined;this[_0x0586('0xbb')](_0x5830c8['dialPredictiveInterval'])[_0x0586('0xb6')](this['getDataPredictive'](_0x5830c8))[_0x0586('0xb6')](mergeDataErlangB(_0x5830c8))[_0x0586('0xb6')](this[_0x0586('0x1a7')](_0x5830c8))[_0x0586('0xae')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x5830c8));}else if(_0x5830c8[_0x0586('0x75')]&&_0x8ede6c<_0x5830c8['predictiveIntervalAvailable']-_0x1b405f){freeVariablesPredictive(_0x5830c8);loggerPredictive[_0x0586('0x84')](_0x5830c8[_0x0586('0x3f')],_0x0586('0x1aa'),_0x8ede6c,')\x20are\x20less\x20than\x20threshold\x20(',_0x5830c8[_0x0586('0x75')],'-',_0x1b405f,'=',_0x5830c8[_0x0586('0x75')]-_0x1b405f,')');}else if(_0x5830c8[_0x0586('0x75')]&&_0x8ede6c>_0x5830c8[_0x0586('0x75')]+_0xa4db09){freeVariablesPredictive(_0x5830c8);loggerPredictive['info'](_0x5830c8['name'],_0x0586('0x1aa'),_0x8ede6c,_0x0586('0x1ab'),_0x5830c8[_0x0586('0x75')],'+',_0xa4db09,'=',_0x5830c8[_0x0586('0x75')]+_0xa4db09,')');}};Dialer[_0x0586('0x1a')]['getDataPredictive']=function(_0x123023){var _0x44aeb4=this;return function(_0x29d70c){return new BPromise(function(_0x6c56d4,_0x551420){_[_0x0586('0xcc')](_0x123023,_0x29d70c[0x0]);if(checkGetDataPredictive(_0x29d70c[0x0])){var _0x1b3c20=_0x123023[_0x0586('0x75')]=_0x123023['talking']+_0x123023[_0x0586('0x52')];var _0x4443cf=_0x123023[_0x0586('0x19e')]*0x3c;var _0x3b5ea3=_0x29d70c[0x0][_0x0586('0x6d')]+_0x29d70c[0x0][_0x0586('0x6c')];var _0x2864a2=(_0x29d70c[0x0][_0x0586('0x6b')]+_0x29d70c[0x0][_0x0586('0x6f')]+_0x29d70c[0x0][_0x0586('0x6e')])/_0x29d70c[0x0][_0x0586('0x76')];_0x123023[_0x0586('0x72')]=_0x2864a2>0x0?_0x2864a2:0x1;switch(_0x123023['dialPredictiveOptimization']){case _0x0586('0x1a2'):var _0x1dc876=_0x123023[_0x0586('0x1ac')]/0x64;return _0x44aeb4['abandonmentRate'](_0x1b3c20,_0x4443cf,_0x3b5ea3,_0x2864a2,_0x1dc876)[_0x0586('0xb6')](function(_0xe98ff2){return _0x6c56d4(_0xe98ff2);});case'agentBusyFactor':var _0xf599a9=_0x123023['dialPredictiveOptimizationPercentage']/0x64;return _0x44aeb4[_0x0586('0x1ad')](_0x1b3c20,_0x4443cf,_0x3b5ea3,_0x2864a2,_0xf599a9)[_0x0586('0xb6')](function(_0x4b22da){return _0x6c56d4(_0x4b22da);});default:return _0x551420(msgResponse(_0x0586('0x1ae'),_0x0586('0x128'),_0x0586('0x1af')));}}else{return _0x551420(msgResponse(_0x0586('0x1ae'),'Failure',_0x0586('0x1b0')));}});};};Dialer[_0x0586('0x1a')]['getDataPredictiveOld']=function(_0x2b35c5){var _0x27b484=this;return function(_0x57408d){return new BPromise(function(_0x6d6f66,_0x44864f){_[_0x0586('0xcc')](_0x2b35c5,_0x57408d[0x0]);if(checkGetDataPredictive(_0x57408d[0x0])){loggerPredictive[_0x0586('0x84')](JSON[_0x0586('0x49')](_0x57408d[0x0]));if(_0x2b35c5[_0x0586('0x1a0')]===_0x0586('0x1a2')){return _0x27b484[_0x0586('0xc3')](_0x2b35c5['id'])[_0x0586('0xb6')](function(_0x533d64){var _0x47bb5e=_0x2b35c5[_0x0586('0x53')]-_0x533d64[0x0]['outboundQueuePauses'];var _0x456f74=_0x2b35c5[_0x0586('0x19e')]*0x3c;var _0x1feb62=_0x57408d[0x0][_0x0586('0x6d')]+_0x57408d[0x0][_0x0586('0x6c')];var _0x4882bc=(_0x57408d[0x0][_0x0586('0x6b')]+_0x57408d[0x0][_0x0586('0x6f')]+_0x57408d[0x0][_0x0586('0x6e')])/_0x57408d[0x0]['predictiveIntervalTotalCalls'];var _0x2553af=_0x2b35c5[_0x0586('0x1ac')]/0x64;_0x2b35c5['predictiveIntervalPauses']=_0x533d64[0x0]['outboundQueuePauses']||0x0;_0x2b35c5[_0x0586('0x72')]=_0x4882bc>0x0?_0x4882bc:0x1;return _0x27b484[_0x0586('0x1b1')](_0x47bb5e,_0x456f74,_0x1feb62,_0x4882bc,_0x2553af);})[_0x0586('0xb6')](function(_0x428c96){return _0x6d6f66(_0x428c96);})[_0x0586('0xae')](function(_0x5b3748){return _0x44864f(msgResponse('[CatchErlangB]',_0x0586('0x128'),JSON[_0x0586('0x49')](_0x5b3748)));});}if(_0x2b35c5[_0x0586('0x1a0')]==='agentBusyFactor'){return _0x27b484[_0x0586('0xc3')](_0x2b35c5['id'])['then'](function(_0xcef826){var _0x5b11ea=_0x2b35c5[_0x0586('0x53')]-_0xcef826[0x0][_0x0586('0x1b2')];var _0x32b77a=_0x2b35c5[_0x0586('0x19e')]*0x3c;var _0x2773b7=_0x57408d[0x0][_0x0586('0x6d')]+_0x57408d[0x0][_0x0586('0x6c')];var _0x3e6cf4=(_0x57408d[0x0][_0x0586('0x6b')]+_0x57408d[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x57408d[0x0][_0x0586('0x6e')])/_0x57408d[0x0]['predictiveIntervalTotalCalls'];var _0x4a2dc9=_0x2b35c5[_0x0586('0x1ac')]/0x64;_0x2b35c5[_0x0586('0x74')]=_0xcef826[0x0][_0x0586('0x1b2')]||0x0;_0x2b35c5[_0x0586('0x72')]=_0x3e6cf4>0x0?_0x3e6cf4:0x1;return _0x27b484[_0x0586('0x1ad')](_0x5b11ea,_0x32b77a,_0x2773b7,_0x3e6cf4,_0x4a2dc9);})[_0x0586('0xb6')](function(_0x34229e){return _0x6d6f66(_0x34229e);})[_0x0586('0xae')](function(_0xa1ca68){return _0x44864f(msgResponse(_0x0586('0x1b3'),_0x0586('0x128'),JSON[_0x0586('0x49')](_0xa1ca68)));});}}else{return _0x44864f(msgResponse(_0x0586('0x1ae'),_0x0586('0x128'),_0x0586('0x1b0')));}});};};Dialer['prototype'][_0x0586('0x1a7')]=function(_0x1c1d03){var _0x219506=this;return function(){var _0xd9b3ec=0x0;var _0x15c5d8=Math[_0x0586('0x199')](_0x1c1d03['erlangCallToSecond']*0x3e8);if(_0x15c5d8>0x0){_0x15c5d8=_0x15c5d8<0x64?0x64:_0x15c5d8;loggerPredictive[_0x0586('0x84')](_0x1c1d03[_0x0586('0x3f')],_0x0586('0x1b4'),_0x15c5d8,_0x0586('0x4a'));_0x1c1d03[_0x0586('0x95')]=setInterval(function(){_0x219506['handlePredictive'](_0x1c1d03);loggerPredictiveCalls[_0x0586('0x84')]('[handlePredictive]',_0xd9b3ec+=0x1);},_0x15c5d8);}else{loggerPredictive[_0x0586('0x84')](_0x1c1d03[_0x0586('0x3f')],'fail\x20to\x20scheduled\x20calls');}};};Dialer[_0x0586('0x1a')][_0x0586('0x1b5')]=function(_0x38f47f,_0x3eb2f7){var _0x46a16f=this;return function(_0x346b31){if(_[_0x0586('0x46')](_0x346b31)){if(_[_0x0586('0xab')](_0x3eb2f7['UserId'])||!_0x3eb2f7[_0x0586('0x1b6')]){if(_0x38f47f[_0x0586('0x5c')]===_0x0586('0x7')){_0x38f47f[_0x0586('0x10a')]=_[_0x0586('0x3d')](_0x38f47f[_0x0586('0x10a')])?!![]:_0x38f47f[_0x0586('0x10a')];var _0x474d69=uuid['v4']();_0x46a16f[_0x0586('0x24')][_0x474d69]=new Action(_0x38f47f,_0x3eb2f7,_0x474d69);loggerBooked[_0x0586('0x84')]('[booked][checkContactBlack]',_0x474d69,_0x0586('0x1b7'),JSON['stringify'](_0x38f47f['queueStatusComplete']),_0x0586('0x1b8'),_0x38f47f['name']);if(_0x38f47f['queueStatusComplete']){_0x38f47f[_0x0586('0x10a')]=![];_0x46a16f[_0x0586('0x29')][_0x46a16f[_0x0586('0x24')][_0x474d69][_0x0586('0xb1')]]=[];ami[_0x0586('0x12b')]({'actionid':_0x474d69,'action':_0x0586('0x1b9'),'queue':_0x38f47f[_0x0586('0x3f')]})['catch'](function(_0x487521){_0x46a16f[_0x0586('0xb0')](_0x38f47f);_0x46a16f['rescheduleContact']({'active':![],'ContactId':_0x46a16f[_0x0586('0x24')][_0x474d69][_0x0586('0xce')],'ListId':_0x46a16f['actions'][_0x474d69][_0x0586('0x119')],'VoiceQueueId':_0x46a16f[_0x0586('0x24')][_0x474d69]['VoiceQueueId']||undefined,'CampaignId':_0x46a16f[_0x0586('0x24')][_0x474d69]['CampaignId']||undefined})[_0x0586('0xae')](loggerCatch(_0x0586('0x1ba')));delete _0x46a16f['actions'][_0x474d69];});}else{loggerBooked[_0x0586('0x84')](_0x0586('0x1bb'),JSON[_0x0586('0x49')](_0x38f47f[_0x0586('0x10a')]),_0x0586('0x1b8'),_0x38f47f[_0x0586('0x3f')]);_0x46a16f[_0x0586('0xb0')](_0x38f47f);_0x46a16f['rescheduleContact']({'active':![],'ContactId':_0x46a16f[_0x0586('0x24')][_0x474d69][_0x0586('0xce')],'ListId':_0x46a16f['actions'][_0x474d69][_0x0586('0x119')],'VoiceQueueId':_0x46a16f[_0x0586('0x24')][_0x474d69][_0x0586('0xd0')]||undefined,'CampaignId':_0x46a16f['actions'][_0x474d69]['CampaignId']||undefined})[_0x0586('0xae')](loggerCatch(_0x0586('0x1ba')));delete _0x46a16f[_0x0586('0x24')][_0x474d69];}}else{return _0x46a16f[_0x0586('0x142')](_0x38f47f,_0x3eb2f7);}}else{if(getDiff(_0x3eb2f7['scheduledat'])<_0x38f47f['dialRecallMeTimeout']*0x3c){_0x46a16f[_0x0586('0x1e')][_0x0586('0x115')](_0x3eb2f7['id'])[_0x0586('0x1d')](function(){_0x46a16f[_0x0586('0xb0')](_0x38f47f);});}else{_0x38f47f[_0x0586('0x68')]+=0x1;_0x46a16f[_0x0586('0xb0')](_0x38f47f);if(_0x38f47f[_0x0586('0x1bc')]){_0x46a16f['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x3eb2f7[_0x0586('0xce')],'ListId':_0x3eb2f7['ListId'],'VoiceQueueId':_0x3eb2f7[_0x0586('0xd0')]||undefined,'CampaignId':_0x3eb2f7['CampaignId']||undefined})[_0x0586('0xae')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));_0x46a16f[_0x0586('0xc6')](createObjHistory(_0x38f47f,_0x3eb2f7,_0x0586('0x1bd'),0x17,_0x0586('0x1be')))[_0x0586('0xae')](loggerCatch(_0x0586('0x1bf')));}else{_0x46a16f[_0x0586('0xd8')](createObjHistory(_0x38f47f,_0x3eb2f7,_0x0586('0x1c0'),0x16,_0x0586('0x1c1')),_0x0586('0x1c2'),'[Originate][HistoryRecallClose]');}}}}else{_0x38f47f[_0x0586('0x61')]+=0x1;_0x46a16f[_0x0586('0xd8')](createObjHistory(_0x38f47f,_0x3eb2f7,_0x0586('0x1c3'),0xd,_0x0586('0x1c4')),_0x0586('0x1c5'),_0x0586('0x1c6'));throw _0x0586('0x1c7');}};};Dialer['prototype']['handleIvr']=function(_0x5bf245){var _0x17bba9=this;var _0x578554=[];var _0x456006=_0x5bf245[_0x0586('0x1c8')]-_0x5bf245['originated']-_0x5bf245['temp'];emitCampaignSummary(_0x5bf245);if(_0x456006>0x0){if(_0x456006>this[_0x0586('0x23')]){_0x456006=this[_0x0586('0x23')];}_0x5bf245[_0x0586('0x1c9')]+=_0x456006;this['getContactDialerIvr'](_0x5bf245['id'],_0x456006,_0x5bf245[_0x0586('0x1ca')])['then'](function(_0x28c18f){_0x5bf245[_0x0586('0x1c9')]-=_0x456006;_0x5bf245[_0x0586('0x1c9')]=_0x5bf245[_0x0586('0x1c9')]>0x0?_0x5bf245[_0x0586('0x1c9')]:0x0;if(!checkContactEmpty(_0x28c18f)){_0x5bf245[_0x0586('0x41')]=_0x0586('0xa1');logger[_0x0586('0x84')](_0x0586('0x1cb')+_0x5bf245[_0x0586('0x3f')]);}else{_0x5bf245[_0x0586('0x77')]+=_0x28c18f['length'];_0x5bf245['message']=_0x0586('0x1cc');for(var _0x2fd7b8=0x0;_0x2fd7b8<_0x28c18f[_0x0586('0x10f')];_0x2fd7b8+=0x1){_0x5bf245[_0x0586('0x1cd')]+=0x1;if(_[_0x0586('0xab')](_0x28c18f[_0x2fd7b8])||_[_0x0586('0xab')](_0x28c18f[_0x2fd7b8][_0x0586('0x147')])||_[_0x0586('0xab')](_0x28c18f[_0x2fd7b8][_0x0586('0x147')]['phone'])){_0x17bba9['emptyContact'](_0x0586('0x1ce'),_0x5bf245,_0x28c18f[_0x2fd7b8]);}else{_0x17bba9[_0x0586('0xb9')](_[_0x0586('0xcd')](_0x28c18f[_0x2fd7b8],['CampaignId',_0x0586('0x1cf')]))[_0x0586('0xb6')](_0x17bba9[_0x0586('0x1b5')](_0x5bf245,_0x28c18f[_0x2fd7b8]))[_0x0586('0xae')](_0x17bba9[_0x0586('0xca')](_0x0586('0x1d0'),_0x5bf245));}}}})['catch'](loggerGetContactDialer('[getContactCampaign2]',_0x5bf245,_0x456006));}};Dialer[_0x0586('0x1a')][_0x0586('0x137')]=function(_0x37f73f,_0x2ae0f9){var _0x141d76=this;var _0x5f5793=[];var _0x1bb38d=_0x2ae0f9>=0x1?_0x2ae0f9:0x1;var _0x4e01f2=[];if(_0x37f73f[_0x0586('0x5c')]===_0x0586('0x7')){_0x1bb38d=0x1;}var _0x2a2d19=Math[_0x0586('0x199')](_0x37f73f[_0x0586('0x52')]*_0x1bb38d)-_0x37f73f[_0x0586('0x77')]-_0x37f73f[_0x0586('0x1c9')];emitVoiceQueueSummary(_0x37f73f);if(_0x37f73f['dialLimitQueue']>0x0){var _0x229753=_0x37f73f[_0x0586('0x1d1')]-_0x37f73f[_0x0586('0x77')]-_0x37f73f[_0x0586('0x56')]-_0x37f73f[_0x0586('0x1c9')]-_0x37f73f['pTalking'];if(_0x2a2d19>_0x229753){_0x2a2d19=_0x229753;}}if(_0x2a2d19>0x0){if(_0x37f73f[_0x0586('0x5c')]===_0x0586('0x7')){_0x2a2d19=0x1;}if(_0x2a2d19>this[_0x0586('0x23')]){_0x2a2d19=this[_0x0586('0x23')];}_0x37f73f[_0x0586('0x1c9')]+=_0x2a2d19;for(var _0xdc9094 in this[_0x0586('0x21')]){if(this[_0x0586('0x21')]['hasOwnProperty'](_0xdc9094)){if(this[_0x0586('0x21')][_0xdc9094][_0x0586('0xdf')]===_0x0586('0x1d2')&&this[_0x0586('0x21')][_0xdc9094][_0x0586('0xac')]===_0x0586('0xd7')){_0x5f5793[_0x0586('0x109')](this[_0x0586('0x21')][_0xdc9094]['id']);}}}this[_0x0586('0xc0')](_0x37f73f['id'],_0x5f5793,_0x2a2d19,_0x37f73f['dialOrderByScheduledAt'])[_0x0586('0xb6')](function(_0x124e6e){_0x37f73f['temp']-=_0x2a2d19;_0x37f73f[_0x0586('0x1c9')]=_0x37f73f['temp']>0x0?_0x37f73f[_0x0586('0x1c9')]:0x0;if(!checkContactEmpty(_0x124e6e)){_0x141d76[_0x0586('0xb4')](_0x37f73f)[_0x0586('0xb6')](sendMessageReschedule(_0x37f73f))[_0x0586('0xae')](loggerCatch(_0x0586('0xb5')));}else{_0x37f73f[_0x0586('0x77')]+=_0x124e6e[_0x0586('0x10f')];_0x37f73f[_0x0586('0x41')]=_0x37f73f['dialMethod']===_0x0586('0x7')?'ACTIVE':'RUNNING';for(var _0x13bb44=0x0;_0x13bb44<_0x124e6e['length'];_0x13bb44+=0x1){if(_[_0x0586('0xab')](_0x124e6e[_0x13bb44])||_['isNil'](_0x124e6e[_0x13bb44][_0x0586('0x147')])||_[_0x0586('0xab')](_0x124e6e[_0x13bb44][_0x0586('0x147')][_0x0586('0x146')])){_0x141d76['emptyContact'](_0x0586('0x1ce'),_0x37f73f,_0x124e6e[_0x13bb44]);}else{_0x141d76[_0x0586('0xb7')](_['pick'](_0x124e6e[_0x13bb44],[_0x0586('0xd0'),_0x0586('0x1cf')]))[_0x0586('0xb6')](_0x141d76[_0x0586('0x1b5')](_0x37f73f,_0x124e6e[_0x13bb44]))['catch'](_0x141d76['loggerHandler'](_0x0586('0x1ce'),_0x37f73f));}}}})[_0x0586('0xae')](loggerGetContactDialer(_0x0586('0x1d3'),_0x37f73f,_0x2a2d19));}};Dialer[_0x0586('0x1a')]['handlePredictive']=function(_0x3031fa){var _0x55f9de=this;if(_0x3031fa[_0x0586('0x1d1')]>0x0){var _0x51344f=_0x3031fa[_0x0586('0x1d1')]-_0x3031fa[_0x0586('0x77')]-_0x3031fa['talking'];if(_0x51344f>0x0){this[_0x0586('0x1d4')](_0x3031fa);}else{loggerPredictiveCalls[_0x0586('0x84')](_0x0586('0x1d5'));}}else{this[_0x0586('0x1d4')](_0x3031fa);}};Dialer[_0x0586('0x1a')][_0x0586('0x1d4')]=function(_0x4812b5){var _0xe7b24b=this;var _0x420bf8=[];_0x4812b5[_0x0586('0x77')]+=0x1;for(var _0x57e5f4 in this['agents']){if(this[_0x0586('0x21')]['hasOwnProperty'](_0x57e5f4)){if(this['agents'][_0x57e5f4]['state']===_0x0586('0x1d2')&&this[_0x0586('0x21')][_0x57e5f4]['status']===_0x0586('0xd7')){_0x420bf8[_0x0586('0x109')](this[_0x0586('0x21')][_0x57e5f4]['id']);}}}this['getContactDialer'](_0x4812b5['id'],_0x420bf8,0x1,_0x4812b5[_0x0586('0x1ca')])['then'](function(_0x556a39){if(!checkContactEmpty(_0x556a39)){checkContactLowerLimitOriginate(_0x4812b5,0x1,0x0);_0xe7b24b['countReScheduled'](_0x4812b5)[_0x0586('0xb6')](sendMessageReschedule(_0x4812b5))[_0x0586('0xae')](loggerCatch(_0x0586('0xb5')));}else{_0x4812b5['message']=_0x0586('0x1cc');if(_[_0x0586('0xab')](_0x556a39[0x0])||_[_0x0586('0xab')](_0x556a39[0x0][_0x0586('0x147')])||_[_0x0586('0xab')](_0x556a39[0x0][_0x0586('0x147')][_0x0586('0x146')])){_0xe7b24b[_0x0586('0x1d6')](_0x0586('0x1ce'),_0x4812b5,_0x556a39[0x0]);}else{_0xe7b24b[_0x0586('0xb7')](_['pick'](_0x556a39[0x0],[_0x0586('0xd0'),_0x0586('0x1cf')]))[_0x0586('0xb6')](_0xe7b24b['checkContactBlack'](_0x4812b5,_0x556a39[0x0]))[_0x0586('0xae')](_0xe7b24b[_0x0586('0xca')](_0x0586('0x1d7'),_0x4812b5));}}})[_0x0586('0xae')](loggerGetContactDialer(_0x0586('0x1d8'),_0x4812b5,0x1));emitVoiceQueueSummary(_0x4812b5);};Dialer[_0x0586('0x1a')][_0x0586('0x1b1')]=function(_0x10d710,_0x2fadeb,_0x136690,_0x4b531f,_0x277106,_0x4d3d34){loggerPredictive[_0x0586('0x84')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x0586('0x84')](_0x0586('0x1d9'),_0x10d710);loggerPredictive[_0x0586('0x84')](_0x0586('0x1da'),_0x2fadeb);loggerPredictive['info'](_0x0586('0x1db'),_0x136690);loggerPredictive[_0x0586('0x84')](_0x0586('0x1dc'),_0x4b531f);loggerPredictive[_0x0586('0x84')](_0x0586('0x1dd'),_0x277106);loggerPredictive['info'](_0x0586('0x8a'));return new BPromise(function(_0x5a2dcb,_0x29ab58){if(_0x10d710<=0x0||isNaN(_0x10d710)){return _0x29ab58(msgResponse('[abandonmentRate]',_0x0586('0x173'),_0x0586('0x1de')+_0x10d710));}if(_0x136690<=0x0||isNaN(_0x136690)){return _0x29ab58(msgResponse('[abandonmentRate]','Error',_0x0586('0x1df')+_0x136690));}if(_0x4b531f<=0x0||isNaN(_0x4b531f)){return _0x29ab58(msgResponse(_0x0586('0x1e0'),_0x0586('0x173'),_0x0586('0x1e1')+_0x4b531f));}if(_0x2fadeb<=0x0||isNaN(_0x2fadeb)){return _0x29ab58(msgResponse('[abandonmentRate]',_0x0586('0x173'),_0x0586('0x1e2')+_0x2fadeb));}if(_0x277106<=0x0||isNaN(_0x277106)){return _0x29ab58(msgResponse(_0x0586('0x1e0'),_0x0586('0x173'),_0x0586('0x1e3')+_0x277106));}_0x4d3d34=_0x4d3d34||0x0;var _0x116b07=0x1/_0x136690;var _0x20ddf7=0x0;var _0x3db53a=0x0;var _0x3b8922=0x0;var _0x24437e=0x0;for(var _0x27b279=0x0;_0x3b8922<_0x277106;_0x27b279+=0x1){_0x3db53a=_0x27b279/_0x2fadeb;_0x20ddf7=(_0x4b531f*_0x3db53a+_0x4d3d34)/_0x116b07;_0x3b8922=erlangb(_0x20ddf7,_0x10d710);_0x24437e=_0x20ddf7/_0x10d710*(0x1-erlangb(_0x20ddf7,_0x10d710));}return _0x5a2dcb({'erlangCalls':_0x27b279,'erlangCallToSecond':_0x2fadeb/_0x27b279,'erlangAbandonmentRate':_0x3b8922,'erlangBusyFactor':_0x24437e});});};Dialer[_0x0586('0x1a')]['busyFactor']=function(_0x281451,_0xa025f1,_0x2f9a1a,_0xf4a5a9,_0x38ca10,_0x44ef33){loggerPredictive['info'](_0x0586('0x1e4'));loggerPredictive['info'](_0x0586('0x1d9'),_0x281451);loggerPredictive['info']('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xa025f1);loggerPredictive[_0x0586('0x84')]('Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2f9a1a);loggerPredictive[_0x0586('0x84')](_0x0586('0x1dc'),_0xf4a5a9);loggerPredictive[_0x0586('0x84')](_0x0586('0x1e5'),_0x38ca10);loggerPredictive[_0x0586('0x84')]('---------------------------');return new BPromise(function(_0x37440e,_0x5cf30d){if(_0x281451<=0x0||isNaN(_0x281451)){return _0x5cf30d(msgResponse(_0x0586('0x1e6'),_0x0586('0x173'),_0x0586('0x1de')+_0x281451));}if(_0x2f9a1a<=0x0||isNaN(_0x2f9a1a)){return _0x5cf30d(msgResponse(_0x0586('0x1e6'),_0x0586('0x173'),_0x0586('0x1df')+_0x2f9a1a));}if(_0xf4a5a9<=0x0||isNaN(_0xf4a5a9)){return _0x5cf30d(msgResponse(_0x0586('0x1e6'),_0x0586('0x173'),_0x0586('0x1e1')+_0xf4a5a9));}if(_0xa025f1<=0x0||isNaN(_0xa025f1)){return _0x5cf30d(msgResponse(_0x0586('0x1e6'),_0x0586('0x173'),'interval\x20=\x20'+_0xa025f1));}if(_0x38ca10<=0x0||isNaN(_0x38ca10)){return _0x5cf30d(msgResponse(_0x0586('0x1e6'),_0x0586('0x173'),_0x0586('0x1e7')+_0x38ca10));}_0x44ef33=_0x44ef33||0x0;var _0x130140=0x1/_0x2f9a1a;var _0x260015=0x0;var _0x3a5c1d=0x0;var _0x441d3f=0x0;var _0x5648db=0x0;for(var _0x2fd0bd=0x0;_0x5648db<_0x38ca10;_0x2fd0bd+=0x1){_0x3a5c1d=_0x2fd0bd/_0xa025f1;_0x260015=(_0xf4a5a9*_0x3a5c1d+_0x44ef33)/_0x130140;_0x441d3f=erlangb(_0x260015,_0x281451);_0x5648db=_0x260015/_0x281451*(0x1-erlangb(_0x260015,_0x281451));}return _0x37440e({'erlangCalls':_0x2fd0bd,'erlangCallToSecond':_0xa025f1/_0x2fd0bd,'erlangAbandonmentRate':_0x441d3f,'erlangBusyFactor':_0x5648db});});};module[_0x0586('0x1e8')]=Dialer;
\ No newline at end of file
diff --git a/server/services/ami/dialer/queueCallerAbandon.js b/server/services/ami/dialer/queueCallerAbandon.js
index 0f0fa6e..70c7d3c 100644
--- a/server/services/ami/dialer/queueCallerAbandon.js
+++ b/server/services/ami/dialer/queueCallerAbandon.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x77d9=['scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','membername','connectedlinename','reason','callback','callbackat','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x77d9,0x132));var _0x977d=function(_0x54c10d,_0x2f2251){_0x54c10d=_0x54c10d-0x0;var _0x1fa703=_0x77d9[_0x54c10d];return _0x1fa703;};'use strict';var util=require(_0x977d('0x0'));var _=require(_0x977d('0x1'));var moment=require(_0x977d('0x2'));function getSeconds(_0x223336,_0x36903f){var _0x16daf4=moment(_0x223336)[_0x977d('0x3')](0x0);var _0x3fffc8=moment(_0x36903f)['milliseconds'](0x0);return _0x16daf4[_0x977d('0x4')](_0x3fffc8,_0x977d('0x5'));}function QueueCallerAbandon(_0x40f673,_0x246930){this[_0x977d('0x6')]=_0x40f673[_0x977d('0x6')];this['type']=_0x40f673[_0x977d('0x7')];this[_0x977d('0x8')]=_0x40f673[_0x977d('0x7')]===_0x977d('0x9')?_0x977d('0xa'):_0x40f673[_0x977d('0x7')];this[_0x977d('0xb')]=_0x40f673[_0x977d('0xb')];this[_0x977d('0xc')]=_0x40f673[_0x977d('0xc')];this[_0x977d('0xd')]=_0x40f673[_0x977d('0xd')];this[_0x977d('0xe')]=_0x40f673[_0x977d('0xb')]+_0x40f673[_0x977d('0xc')]+_0x40f673[_0x977d('0xd')];this[_0x977d('0xf')]=_0x246930['uniqueid'];this[_0x977d('0x10')]=_0x40f673[_0x977d('0x11')];this[_0x977d('0x12')]=_0x40f673[_0x977d('0x13')];this[_0x977d('0x14')]=_0x40f673['starttime'];this['responsetime']=_0x40f673[_0x977d('0x15')];this[_0x977d('0x16')]=_0x40f673[_0x977d('0x16')];this[_0x977d('0x17')]=this[_0x977d('0x16')];this[_0x977d('0x18')]=getSeconds(_0x40f673[_0x977d('0x15')],_0x40f673[_0x977d('0x14')]);this[_0x977d('0x19')]=getSeconds(this['droptime'],_0x40f673[_0x977d('0x15')]);this['talktime']=0x0;this[_0x977d('0xa')]=_0x246930[_0x977d('0xa')];this[_0x977d('0x1a')]=_0x246930[_0x977d('0x1b')];this[_0x977d('0x1c')]=_0x246930[_0x977d('0x1c')];this[_0x977d('0x1d')]=_0x40f673['callback'];this['callbackuniqueid']=_0x40f673['callbackuniqueid'];this[_0x977d('0x1e')]=_0x40f673[_0x977d('0x1e')];this['recallme']=_0x40f673['recallme'];this['ContactId']=_0x40f673[_0x977d('0x1f')];this[_0x977d('0x20')]=_0x40f673[_0x977d('0x20')];this[_0x977d('0x21')]=_0x40f673[_0x977d('0x21')];this[_0x977d('0x22')]=_0x40f673[_0x977d('0x22')];this['CampaignId']=_0x40f673[_0x977d('0x23')];this[_0x977d('0x24')]=_0x40f673[_0x977d('0x24')]||'';this[_0x977d('0x25')]=_0x40f673['originatecalleridname']||'';}module[_0x977d('0x26')]=QueueCallerAbandon;
\ No newline at end of file
+var _0xd269=['endtime','ringtime','responsetime','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','calleridname','calleridnum','number','starttime','droptime'];(function(_0x1443eb,_0x203408){var _0x2b8810=function(_0x48bc4e){while(--_0x48bc4e){_0x1443eb['push'](_0x1443eb['shift']());}};_0x2b8810(++_0x203408);}(_0xd269,0x1f2));var _0x9d26=function(_0x234f60,_0x4f09b5){_0x234f60=_0x234f60-0x0;var _0x14007a=_0xd269[_0x234f60];return _0x14007a;};'use strict';var util=require(_0x9d26('0x0'));var _=require(_0x9d26('0x1'));var moment=require('moment');function getSeconds(_0x4e58cc,_0x18b82a){var _0x43d17b=moment(_0x4e58cc)[_0x9d26('0x2')](0x0);var _0xe66f3c=moment(_0x18b82a)['milliseconds'](0x0);return _0x43d17b[_0x9d26('0x3')](_0xe66f3c,_0x9d26('0x4'));}function QueueCallerAbandon(_0x218890,_0x222fe4){this['scheduledat']=_0x218890[_0x9d26('0x5')];this['type']=_0x218890[_0x9d26('0x6')];this[_0x9d26('0x7')]=_0x218890[_0x9d26('0x6')]===_0x9d26('0x8')?_0x9d26('0x9'):_0x218890[_0x9d26('0x6')];this[_0x9d26('0xa')]=_0x218890[_0x9d26('0xa')];this[_0x9d26('0xb')]=_0x218890[_0x9d26('0xb')];this[_0x9d26('0xc')]=_0x218890['countnoanswerretry'];this[_0x9d26('0xd')]=_0x218890[_0x9d26('0xa')]+_0x218890[_0x9d26('0xb')]+_0x218890[_0x9d26('0xc')];this[_0x9d26('0xe')]=_0x222fe4[_0x9d26('0xe')];this[_0x9d26('0xf')]=_0x218890['name'];this[_0x9d26('0x10')]=_0x218890[_0x9d26('0x11')];this[_0x9d26('0x12')]=_0x218890['starttime'];this['responsetime']=_0x218890['responsetime'];this[_0x9d26('0x13')]=_0x218890[_0x9d26('0x13')];this[_0x9d26('0x14')]=this[_0x9d26('0x13')];this[_0x9d26('0x15')]=getSeconds(_0x218890[_0x9d26('0x16')],_0x218890['starttime']);this[_0x9d26('0x17')]=getSeconds(this['droptime'],_0x218890['responsetime']);this[_0x9d26('0x18')]=0x0;this['queue']=_0x222fe4[_0x9d26('0x9')];this[_0x9d26('0x19')]=_0x222fe4['connectedlinename'];this[_0x9d26('0x1a')]=_0x222fe4['reason'];this[_0x9d26('0x1b')]=_0x218890['callback'];this[_0x9d26('0x1c')]=_0x218890[_0x9d26('0x1c')];this[_0x9d26('0x1d')]=_0x218890[_0x9d26('0x1d')];this[_0x9d26('0x1e')]=_0x218890[_0x9d26('0x1e')];this[_0x9d26('0x1f')]=_0x218890[_0x9d26('0x1f')];this[_0x9d26('0x20')]=_0x218890[_0x9d26('0x20')];this['UserId']=_0x218890[_0x9d26('0x21')];this['VoiceQueueId']=_0x218890['VoiceQueueId'];this['CampaignId']=_0x218890[_0x9d26('0x22')];this[_0x9d26('0x23')]=_0x218890[_0x9d26('0x23')]||'';this[_0x9d26('0x24')]=_0x218890[_0x9d26('0x24')]||'';}module['exports']=QueueCallerAbandon;
\ No newline at end of file
diff --git a/server/services/ami/fax/action.js b/server/services/ami/fax/action.js
index bc6eb56..1456560 100644
--- a/server/services/ami/fax/action.js
+++ b/server/services/ami/fax/action.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf77a=['headerinfo','path','AttachmentId','util','uniqueid','channel','%s/%s/%s','Trunk','name','fax','localstationid'];(function(_0x3de873,_0x174b5f){var _0x380b8c=function(_0x313dea){while(--_0x313dea){_0x3de873['push'](_0x3de873['shift']());}};_0x380b8c(++_0x174b5f);}(_0xf77a,0xd4));var _0xaf77=function(_0x3be218,_0x4757d8){_0x3be218=_0x3be218-0x0;var _0x3632a6=_0xf77a[_0x3be218];return _0x3632a6;};'use strict';var util=require(_0xaf77('0x0'));var _=require('lodash');var moment=require('moment');function Action(_0x4a0474,_0x39c240,_0xc822d9){this[_0xaf77('0x1')]=_0x4a0474||undefined;this[_0xaf77('0x2')]=util['format'](_0xaf77('0x3'),_0x39c240['tech'],_0x39c240[_0xaf77('0x4')][_0xaf77('0x5')],_0xc822d9[_0xaf77('0x6')]);this[_0xaf77('0x7')]=_0x39c240[_0xaf77('0x7')];this[_0xaf77('0x8')]=_0x39c240[_0xaf77('0x8')];this[_0xaf77('0x9')]=_0xc822d9[_0xaf77('0x9')];this[_0xaf77('0xa')]=_0xc822d9[_0xaf77('0xa')];}module['exports']=Action;
\ No newline at end of file
+var _0x4c93=['util','uniqueid','channel','format','%s/%s/%s','tech','Trunk','name','fax','localstationid','headerinfo','path','AttachmentId','exports'];(function(_0x2f64e0,_0x165629){var _0xb9e8a0=function(_0x25d287){while(--_0x25d287){_0x2f64e0['push'](_0x2f64e0['shift']());}};_0xb9e8a0(++_0x165629);}(_0x4c93,0xfc));var _0x34c9=function(_0x4d4644,_0x15def0){_0x4d4644=_0x4d4644-0x0;var _0x2bbb69=_0x4c93[_0x4d4644];return _0x2bbb69;};'use strict';var util=require(_0x34c9('0x0'));var _=require('lodash');var moment=require('moment');function Action(_0x497024,_0x238c69,_0x4f7f23){this[_0x34c9('0x1')]=_0x497024||undefined;this[_0x34c9('0x2')]=util[_0x34c9('0x3')](_0x34c9('0x4'),_0x238c69[_0x34c9('0x5')],_0x238c69[_0x34c9('0x6')][_0x34c9('0x7')],_0x4f7f23[_0x34c9('0x8')]);this['localstationid']=_0x238c69[_0x34c9('0x9')];this[_0x34c9('0xa')]=_0x238c69[_0x34c9('0xa')];this[_0x34c9('0xb')]=_0x4f7f23[_0x34c9('0xb')];this['AttachmentId']=_0x4f7f23[_0x34c9('0xc')];}module[_0x34c9('0xd')]=Action;
\ No newline at end of file
diff --git a/server/services/ami/fax/index.js b/server/services/ami/fax/index.js
index ae66898..cad82f7 100644
--- a/server/services/ami/fax/index.js
+++ b/server/services/ami/fax/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x454b=['Trunk\x20Reachable','format','path','execute','%s/%s.tif','dir','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','addVariables','ext','isTrunkReachable','isNil','SIP/%s','unmonitored','[Fax][checkTrunk][Trunk\x20not\x20work]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working','[Fax][checkTrunk][Empty\x20Fax]','Empty\x20Fax','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','Is\x20Valid','util','lodash','bluebird','moment','tiff2pdf','./util/gs','../../../config/logger','fax','../ami','./rpcDb','./action','../rpc/faxAccount','../rpc/faxMessage','channels','faxAccounts','trunks','actions','newchannel','syncNewchannel','bind','varset','syncVarSet','syncNewState','newexten','syncNewExten','syncReceiveFax','hangup','syncHangup','originateresponse','syncOriginateResponse','prototype','context','from-voip-provider','hasOwnProperty','exten','localstationid','uniqueid','channel','name','\x20syncNewchannel\x20','variable','value','channelstate','channelstatedesc','operation','status','filename','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','parse','.pdf','application/pdf','then','notify','catch','error','\x20notify\x20','stringify','info','\x20receiveFax\x20','pick','response','reason','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','faxpages','faxstatus','SUCCESS','updateStatus','SENDING\x20FAILED:\x20','SENDING\x20FAILED','execOriginate','FaxAccountId','Fax\x20received','[Fax][execOriginate][failure]','checkAfterSend','checkTrunk','Trunk','isValid'];(function(_0x5442c2,_0x3223cc){var _0x40baac=function(_0x727511){while(--_0x727511){_0x5442c2['push'](_0x5442c2['shift']());}};_0x40baac(++_0x3223cc);}(_0x454b,0x1e4));var _0xb454=function(_0x567bcb,_0x4978c1){_0x567bcb=_0x567bcb-0x0;var _0x4eebc2=_0x454b[_0x567bcb];return _0x4eebc2;};'use strict';var util=require(_0xb454('0x0'));var _=require(_0xb454('0x1'));var BPromise=require(_0xb454('0x2'));var uuid=require('uuid');var moment=require(_0xb454('0x3'));var path=require('path');var tiff2pdf=require(_0xb454('0x4'));var gs=require(_0xb454('0x5'));var logger=require(_0xb454('0x6'))(_0xb454('0x7'));var ami=require(_0xb454('0x8'));var rpcDb=require(_0xb454('0x9'));var Channel=require('./channel');var ut=require('./util/util');var Action=require(_0xb454('0xa'));var faxAccount=require(_0xb454('0xb'));var attachment=require('../rpc/attachment');var faxMessage=require(_0xb454('0xc'));function Fax(_0x474275){this[_0xb454('0xd')]={};this[_0xb454('0xe')]=_0x474275[_0xb454('0xe')];this[_0xb454('0xf')]=_0x474275['trunks'];this[_0xb454('0x10')]={};ami['on'](_0xb454('0x11'),this[_0xb454('0x12')][_0xb454('0x13')](this));ami['on'](_0xb454('0x14'),this[_0xb454('0x15')]['bind'](this));ami['on']('newstate',this[_0xb454('0x16')][_0xb454('0x13')](this));ami['on'](_0xb454('0x17'),this[_0xb454('0x18')][_0xb454('0x13')](this));ami['on']('faxstatus',this['syncFaxStatus'][_0xb454('0x13')](this));ami['on']('receivefax',this[_0xb454('0x19')][_0xb454('0x13')](this));ami['on'](_0xb454('0x1a'),this[_0xb454('0x1b')]['bind'](this));ami['on'](_0xb454('0x1c'),this[_0xb454('0x1d')]['bind'](this));}Fax[_0xb454('0x1e')]['syncNewchannel']=function(_0x4302e8){if(_0x4302e8[_0xb454('0x1f')]===_0xb454('0x20')){for(var _0x57d332 in this[_0xb454('0xe')]){if(this[_0xb454('0xe')][_0xb454('0x21')](_0x57d332)){if(_0x4302e8[_0xb454('0x22')]===this[_0xb454('0xe')][_0x57d332][_0xb454('0x23')]){this[_0xb454('0xd')][_0x4302e8[_0xb454('0x24')]]={};this[_0xb454('0xd')][_0x4302e8['uniqueid']][_0xb454('0x25')]=_0x4302e8[_0xb454('0x25')];this[_0xb454('0xd')][_0x4302e8[_0xb454('0x24')]]['id']=this[_0xb454('0xe')][_0x57d332]['id'];this[_0xb454('0xd')][_0x4302e8[_0xb454('0x24')]][_0xb454('0x26')]=this[_0xb454('0xe')][_0x57d332][_0xb454('0x26')];logger['info'](_0x4302e8[_0xb454('0x24')],_0xb454('0x27'));}}}}if(this[_0xb454('0x10')][_0x4302e8['uniqueid']]){this['channels'][_0x4302e8[_0xb454('0x24')]]={};this[_0xb454('0xd')][_0x4302e8['uniqueid']][_0xb454('0x25')]=_0x4302e8['channel'];logger['info'](_0x4302e8[_0xb454('0x24')],_0xb454('0x27'));}};Fax[_0xb454('0x1e')][_0xb454('0x15')]=function(_0x4e4b2e){if(this[_0xb454('0xd')][_0x4e4b2e['uniqueid']]){for(var _0x44a249 in _0x4e4b2e[_0xb454('0x28')]){if(_0x4e4b2e[_0xb454('0x28')][_0xb454('0x21')](_0x44a249)){this['channels'][_0x4e4b2e['uniqueid']][_0x44a249]=_0x4e4b2e[_0xb454('0x29')];}}}};Fax['prototype'][_0xb454('0x16')]=function(_0x4e67ba){if(this['channels'][_0x4e67ba[_0xb454('0x24')]]){this['channels'][_0x4e67ba[_0xb454('0x24')]][_0xb454('0x2a')]=_0x4e67ba[_0xb454('0x2a')];this[_0xb454('0xd')][_0x4e67ba[_0xb454('0x24')]][_0xb454('0x2b')]=_0x4e67ba[_0xb454('0x2b')];}};Fax[_0xb454('0x1e')][_0xb454('0x18')]=function(_0x5494da){if(this[_0xb454('0xd')][_0x5494da[_0xb454('0x24')]]){for(var _0x5b3163 in _0x5494da[_0xb454('0x28')]){if(_0x5494da['variable'][_0xb454('0x21')](_0x5b3163)){this[_0xb454('0xd')][_0x5494da[_0xb454('0x24')]][_0x5b3163]=_0x5494da['value'];}}}};Fax[_0xb454('0x1e')]['syncFaxStatus']=function(_0x5d810){if(this['channels'][_0x5d810[_0xb454('0x24')]]){this[_0xb454('0xd')][_0x5d810[_0xb454('0x24')]][_0xb454('0x2c')]=_0x5d810[_0xb454('0x2c')];this[_0xb454('0xd')][_0x5d810[_0xb454('0x24')]][_0xb454('0x2d')]=_0x5d810[_0xb454('0x2d')];this['channels'][_0x5d810['uniqueid']][_0xb454('0x23')]=_0x5d810[_0xb454('0x23')];this[_0xb454('0xd')][_0x5d810['uniqueid']][_0xb454('0x2e')]=_0x5d810[_0xb454('0x2e')];logger['info'](_0x5d810[_0xb454('0x24')],'\x20syncFaxStatus\x20');}};Fax[_0xb454('0x1e')]['syncReceiveFax']=function(_0x2306f3){var _0x421916=this;if(this['channels'][_0x2306f3[_0xb454('0x24')]]){var _0x401e76=this['channels'][_0x2306f3['uniqueid']]['id'];this[_0xb454('0xd')][_0x2306f3['uniqueid']][_0xb454('0x2f')]=_0x2306f3[_0xb454('0x2f')];this[_0xb454('0xd')][_0x2306f3[_0xb454('0x24')]][_0xb454('0x30')]=_0x2306f3['pagestransferred'];this[_0xb454('0xd')][_0x2306f3[_0xb454('0x24')]][_0xb454('0x23')]=_0x2306f3[_0xb454('0x23')];this[_0xb454('0xd')][_0x2306f3[_0xb454('0x24')]][_0xb454('0x31')]=_0x2306f3[_0xb454('0x31')];this[_0xb454('0xd')][_0x2306f3[_0xb454('0x24')]][_0xb454('0x32')]=_0x2306f3['transferrate'];this[_0xb454('0xd')][_0x2306f3['uniqueid']][_0xb454('0x2e')]=_0x2306f3[_0xb454('0x2e')];this[_0xb454('0xd')][_0x2306f3[_0xb454('0x24')]][_0xb454('0x33')]=_0x2306f3['calleridnum'];if(this[_0xb454('0xd')][_0x2306f3[_0xb454('0x24')]][_0xb454('0x30')]>0x0){tiff2pdf(_0x2306f3[_0xb454('0x2e')],_0xb454('0x34'),function(_0x2c9ea2){logger['info'](_0x2306f3[_0xb454('0x24')],_0xb454('0x35'),_0x2c9ea2[_0xb454('0x36')]);attachment['create']({'name':path[_0xb454('0x37')](_0x2306f3[_0xb454('0x2e')])[_0xb454('0x26')],'basename':path[_0xb454('0x37')](_0x2306f3[_0xb454('0x2e')])[_0xb454('0x26')]+_0xb454('0x38'),'type':_0xb454('0x39')})[_0xb454('0x3a')](function(_0x633a28){faxAccount[_0xb454('0x3b')](_0x401e76,{'from':_0x2306f3['calleridnum'],'mapKey':_0xb454('0x7'),'body':path['parse'](_0x2306f3['filename'])['name']+_0xb454('0x38'),'AttachmentId':_0x633a28['id']})[_0xb454('0x3c')](function(_0x44c306){logger[_0xb454('0x3d')](_0x2306f3['uniqueid'],_0xb454('0x3e'),JSON['stringify'](_0x44c306));});})[_0xb454('0x3c')](function(_0x5d43e8){logger[_0xb454('0x3d')](_0x2306f3[_0xb454('0x24')],'\x20receiveFax\x20',JSON[_0xb454('0x3f')](_0x5d43e8));});});}logger[_0xb454('0x40')](_0x2306f3['uniqueid'],_0xb454('0x41'));}};Fax['prototype'][_0xb454('0x1d')]=function(_0x40d980){if(this[_0xb454('0x10')][_0x40d980[_0xb454('0x24')]]){_['merge'](this[_0xb454('0xd')][_0x40d980['uniqueid']],_[_0xb454('0x42')](_0x40d980,[_0xb454('0x43'),_0xb454('0x44')]));}};function updateStatus(_0x17828a){if(_0x17828a[_0xb454('0x45')]){faxMessage[_0xb454('0x46')](_0x17828a[_0xb454('0x45')],{'failMessage':_0xb454('0x47')})[_0xb454('0x3a')](function(_0x364a19){ut[_0xb454('0x48')](_0xb454('0x49'),_0x364a19);})[_0xb454('0x3c')](function(_0x16a922){ut['logger']('[Fax][Message][Error][NoUpdate1]',_0x16a922);});}else{ut[_0xb454('0x48')]('[Fax][Message][Error][NoUpdate2]');}}Fax[_0xb454('0x1e')]['updateStatus']=function(_0x11f5bf,_0x4ee75c,_0x4b7f1c){var _0x4b9500=this;var _0x2238fc={};if(_0x4ee75c){_0x2238fc={'read':_0x4ee75c};}else{_0x2238fc={'failMessage':_0x4b7f1c};}if(this[_0xb454('0x10')][_0x11f5bf][_0xb454('0x45')]){faxMessage[_0xb454('0x46')](this['actions'][_0x11f5bf][_0xb454('0x45')],_0x2238fc)['then'](function(_0x1251ce){ut[_0xb454('0x48')](_0xb454('0x4a'),_0x1251ce);})['catch'](function(_0x15d8ac){ut[_0xb454('0x48')](_0xb454('0x4b'),_0x15d8ac);})[_0xb454('0x4c')](function(){delete _0x4b9500['channels'][_0x11f5bf];delete _0x4b9500[_0xb454('0x10')][_0x11f5bf];});}else{ut[_0xb454('0x48')]('[Fax][Message][NoUpdate2]');delete this[_0xb454('0xd')][_0x11f5bf];delete this[_0xb454('0x10')][_0x11f5bf];}};Fax[_0xb454('0x1e')][_0xb454('0x1b')]=function(_0x479062){var _0x1e594a=this;if(this[_0xb454('0xd')][_0x479062[_0xb454('0x24')]]){if(this['actions'][_0x479062[_0xb454('0x24')]]){this[_0xb454('0xd')][_0x479062[_0xb454('0x24')]]['id']=this[_0xb454('0x10')][_0x479062[_0xb454('0x24')]]['id'];this[_0xb454('0xd')][_0x479062[_0xb454('0x24')]]['name']=this['actions'][_0x479062[_0xb454('0x24')]]['name'];}logger[_0xb454('0x40')](_0x479062['uniqueid'],this[_0xb454('0x10')][_0x479062['uniqueid']]?'\x20hangup\x20sendFile\x20':'\x20hangup\x20faxRiceive\x20',JSON[_0xb454('0x3f')](this[_0xb454('0xd')][_0x479062['uniqueid']]));if(this[_0xb454('0x10')][_0x479062[_0xb454('0x24')]]){if(this[_0xb454('0xd')][_0x479062[_0xb454('0x24')]][_0xb454('0x4d')]>0x0&&this[_0xb454('0xd')][_0x479062[_0xb454('0x24')]][_0xb454('0x4e')]===_0xb454('0x4f')){this[_0xb454('0x50')](_0x479062[_0xb454('0x24')],!![]);}else{this[_0xb454('0x50')](_0x479062[_0xb454('0x24')],![],this['channels'][_0x479062[_0xb454('0x24')]]['faxstatusstring']?_0xb454('0x51')+this[_0xb454('0xd')][_0x479062['uniqueid']]['faxstatusstring']:_0xb454('0x52'));}}}};Fax[_0xb454('0x1e')]['send']=function(_0x14b0e8){var _0xacd86e=this;return new BPromise(function(_0x55ac76,_0x5440bc){_0xacd86e[_0xb454('0x53')](_0x14b0e8,_0xacd86e['faxAccounts'][_0x14b0e8[_0xb454('0x54')]])['then'](function(_0x4f6936){ut[_0xb454('0x48')]('[Fax][execOriginate][success]',_0x4f6936);_0x55ac76(ut[_0xb454('0x36')](_0xb454('0x55')));})['catch'](function(_0x5cc7fe){ut[_0xb454('0x48')](_0xb454('0x56'),_0x5cc7fe);updateStatus(_0x14b0e8);_0x5440bc(ut[_0xb454('0x36')]('Fax\x20failed'));});});};Fax['prototype'][_0xb454('0x57')]=function(_0x3399fb){var _0x8e5776=this;return new BPromise(function(_0x38e727,_0x54a6a2){var _0x1adfe5=_0x8e5776[_0xb454('0x58')](_0x8e5776['faxAccounts'][_0x3399fb['FaxAccountId']][_0xb454('0x59')],_0x3399fb);if(_0x1adfe5[_0xb454('0x5a')]){_0x38e727(ut[_0xb454('0x36')](_0xb454('0x5b')));}else{_0x54a6a2(ut[_0xb454('0x36')](_0x1adfe5[_0xb454('0x36')]));}});};function originate(_0x35eba8,_0x399ca1,_0x5465be){return new BPromise(function(_0x2c4d51,_0x280e24){if(_0x5465be){var _0x4acf9a=util[_0xb454('0x5c')]('gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit',path[_0xb454('0x37')](_0x35eba8[_0xb454('0x5d')])[_0xb454('0x26')],_0x35eba8['path']);gs[_0xb454('0x5e')](_0x4acf9a)[_0xb454('0x3a')](function(){_0x35eba8['path']=util[_0xb454('0x5c')](_0xb454('0x5f'),path[_0xb454('0x37')](_0x35eba8['path'])[_0xb454('0x60')],path[_0xb454('0x37')](_0x35eba8[_0xb454('0x5d')])[_0xb454('0x26')]);_0x399ca1[_0xb454('0x61')]=_0x35eba8[_0xb454('0x5d')];ut[_0xb454('0x48')](_0xb454('0x62'),'');ami[_0xb454('0x63')](ut[_0xb454('0x64')](_0x35eba8,_0x399ca1))[_0xb454('0x3a')](function(_0x12b7a4){_0x2c4d51(_0x12b7a4);})[_0xb454('0x3c')](function(_0x5f5267){_0x280e24(_0x5f5267);});})[_0xb454('0x3c')](function(_0xdcc051){_0x280e24(_0xdcc051);});}else{ami[_0xb454('0x63')](ut[_0xb454('0x64')](_0x35eba8,_0x399ca1))[_0xb454('0x3a')](function(_0x4218b5){_0x2c4d51(_0x4218b5);})[_0xb454('0x3c')](function(_0x2649b4){_0x280e24(_0x2649b4);});}});}Fax[_0xb454('0x1e')]['execOriginate']=function(_0x13152e,_0x239d67){var _0x5ab5d8=this;return new BPromise(function(_0x2f638e,_0x52f7cd){var _0x4dd20c=uuid['v4']();var _0x2b7ef3=ut[_0xb454('0x65')](_0x13152e,_0x239d67);_0x5ab5d8['actions'][_0x4dd20c]=new Action(_0x4dd20c,_0x239d67,_0x13152e);var _0x475fae=_0x5ab5d8[_0xb454('0x10')][_0x4dd20c];if(path[_0xb454('0x37')](_0x13152e[_0xb454('0x5d')])[_0xb454('0x66')]===_0xb454('0x38')){originate(_0x475fae,_0x2b7ef3,!![])[_0xb454('0x3a')](function(_0xfc7210){_0x2f638e(_0xfc7210);})[_0xb454('0x3c')](function(_0x37ac08){_0x52f7cd(_0x37ac08);});}else{originate(_0x475fae,_0x2b7ef3,![])[_0xb454('0x3a')](function(_0x1a5f79){_0x2f638e(_0x1a5f79);})[_0xb454('0x3c')](function(_0x3655b8){_0x52f7cd(_0x3655b8);});}});};Fax[_0xb454('0x1e')][_0xb454('0x67')]=function(_0x5d2fe4){return!_[_0xb454('0x68')](_0x5d2fe4)&&!_[_0xb454('0x68')](_0x5d2fe4[_0xb454('0x26')])&&!_['isNil'](_0x5d2fe4['active'])&&_0x5d2fe4['active']&&!_[_0xb454('0x68')](this[_0xb454('0xf')][util[_0xb454('0x5c')](_0xb454('0x69'),_0x5d2fe4[_0xb454('0x26')])])&&!_['isNil'](this['trunks'][util[_0xb454('0x5c')](_0xb454('0x69'),_0x5d2fe4[_0xb454('0x26')])]['status'])&&(this[_0xb454('0xf')][util[_0xb454('0x5c')]('SIP/%s',_0x5d2fe4[_0xb454('0x26')])][_0xb454('0x2d')]==='reachable'||this[_0xb454('0xf')][util[_0xb454('0x5c')](_0xb454('0x69'),_0x5d2fe4[_0xb454('0x26')])][_0xb454('0x2d')]===_0xb454('0x6a'));};Fax['prototype'][_0xb454('0x58')]=function(_0x16bfcd,_0x1a104c){if(!this[_0xb454('0x67')](_0x16bfcd)){ut[_0xb454('0x48')](_0xb454('0x6b'),_[_0xb454('0x68')](_0x16bfcd)?'':_0x16bfcd[_0xb454('0x26')]+_0xb454('0x6c'));return{'isValid':![],'message':_0xb454('0x6d')};}if(_[_0xb454('0x68')](_0x1a104c['fax'])){ut['logger'](_0xb454('0x6e'),JSON[_0xb454('0x3f')](_0x1a104c));return{'isValid':![],'message':_0xb454('0x6f')};}if(_['isNil'](_0x1a104c[_0xb454('0x5d')])){ut['logger'](_0xb454('0x70'),JSON[_0xb454('0x3f')](_0x1a104c));return{'isValid':![],'message':_0xb454('0x71')};}return{'isValid':!![],'message':_0xb454('0x72')};};module['exports']=Fax;
\ No newline at end of file
+var _0x6e27=['addVariables','ext','isTrunkReachable','isNil','active','SIP/%s','reachable','[Fax][checkTrunk][Trunk\x20not\x20work]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working','Empty\x20Fax','exports','lodash','bluebird','uuid','moment','path','tiff2pdf','./util/gs','../../../config/logger','fax','./rpcDb','./channel','./util/util','./action','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','channels','faxAccounts','trunks','newchannel','syncNewchannel','varset','syncVarSet','newstate','bind','newexten','syncNewExten','faxstatus','syncReceiveFax','hangup','syncHangup','syncOriginateResponse','prototype','context','from-voip-provider','hasOwnProperty','uniqueid','channel','name','\x20syncNewchannel\x20','actions','variable','value','syncNewState','channelstate','channelstatedesc','syncFaxStatus','operation','status','localstationid','filename','info','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','application/pdf','then','catch','error','stringify','\x20receiveFax\x20','merge','pick','response','reason','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate2]','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','\x20hangup\x20sendFile\x20','faxpages','SUCCESS','updateStatus','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','send','execOriginate','[Fax][execOriginate][success]','Fax\x20received','[Fax][execOriginate][failure]','checkAfterSend','FaxAccountId','Trunk','isValid','Trunk\x20Reachable','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','format','%s/%s.tif','XMF-PATH','Action','variablesAction'];(function(_0x4fc9a6,_0x2d71a5){var _0x2d19c6=function(_0x32f107){while(--_0x32f107){_0x4fc9a6['push'](_0x4fc9a6['shift']());}};_0x2d19c6(++_0x2d71a5);}(_0x6e27,0x171));var _0x76e2=function(_0x2655a6,_0x1f1920){_0x2655a6=_0x2655a6-0x0;var _0x384a51=_0x6e27[_0x2655a6];return _0x384a51;};'use strict';var util=require('util');var _=require(_0x76e2('0x0'));var BPromise=require(_0x76e2('0x1'));var uuid=require(_0x76e2('0x2'));var moment=require(_0x76e2('0x3'));var path=require(_0x76e2('0x4'));var tiff2pdf=require(_0x76e2('0x5'));var gs=require(_0x76e2('0x6'));var logger=require(_0x76e2('0x7'))(_0x76e2('0x8'));var ami=require('../ami');var rpcDb=require(_0x76e2('0x9'));var Channel=require(_0x76e2('0xa'));var ut=require(_0x76e2('0xb'));var Action=require(_0x76e2('0xc'));var faxAccount=require(_0x76e2('0xd'));var attachment=require(_0x76e2('0xe'));var faxMessage=require(_0x76e2('0xf'));function Fax(_0x2c3af7){this[_0x76e2('0x10')]={};this[_0x76e2('0x11')]=_0x2c3af7[_0x76e2('0x11')];this['trunks']=_0x2c3af7[_0x76e2('0x12')];this['actions']={};ami['on'](_0x76e2('0x13'),this[_0x76e2('0x14')]['bind'](this));ami['on'](_0x76e2('0x15'),this[_0x76e2('0x16')]['bind'](this));ami['on'](_0x76e2('0x17'),this['syncNewState'][_0x76e2('0x18')](this));ami['on'](_0x76e2('0x19'),this[_0x76e2('0x1a')][_0x76e2('0x18')](this));ami['on'](_0x76e2('0x1b'),this['syncFaxStatus'][_0x76e2('0x18')](this));ami['on']('receivefax',this[_0x76e2('0x1c')]['bind'](this));ami['on'](_0x76e2('0x1d'),this[_0x76e2('0x1e')][_0x76e2('0x18')](this));ami['on']('originateresponse',this[_0x76e2('0x1f')]['bind'](this));}Fax[_0x76e2('0x20')][_0x76e2('0x14')]=function(_0x5ba739){if(_0x5ba739[_0x76e2('0x21')]===_0x76e2('0x22')){for(var _0x505547 in this[_0x76e2('0x11')]){if(this[_0x76e2('0x11')][_0x76e2('0x23')](_0x505547)){if(_0x5ba739['exten']===this[_0x76e2('0x11')][_0x505547]['localstationid']){this[_0x76e2('0x10')][_0x5ba739[_0x76e2('0x24')]]={};this[_0x76e2('0x10')][_0x5ba739[_0x76e2('0x24')]][_0x76e2('0x25')]=_0x5ba739[_0x76e2('0x25')];this[_0x76e2('0x10')][_0x5ba739['uniqueid']]['id']=this[_0x76e2('0x11')][_0x505547]['id'];this[_0x76e2('0x10')][_0x5ba739[_0x76e2('0x24')]][_0x76e2('0x26')]=this[_0x76e2('0x11')][_0x505547][_0x76e2('0x26')];logger['info'](_0x5ba739[_0x76e2('0x24')],_0x76e2('0x27'));}}}}if(this[_0x76e2('0x28')][_0x5ba739[_0x76e2('0x24')]]){this[_0x76e2('0x10')][_0x5ba739['uniqueid']]={};this[_0x76e2('0x10')][_0x5ba739[_0x76e2('0x24')]]['channel']=_0x5ba739[_0x76e2('0x25')];logger['info'](_0x5ba739[_0x76e2('0x24')],_0x76e2('0x27'));}};Fax[_0x76e2('0x20')][_0x76e2('0x16')]=function(_0x1ff88a){if(this[_0x76e2('0x10')][_0x1ff88a[_0x76e2('0x24')]]){for(var _0x1718f3 in _0x1ff88a[_0x76e2('0x29')]){if(_0x1ff88a[_0x76e2('0x29')][_0x76e2('0x23')](_0x1718f3)){this[_0x76e2('0x10')][_0x1ff88a[_0x76e2('0x24')]][_0x1718f3]=_0x1ff88a[_0x76e2('0x2a')];}}}};Fax['prototype'][_0x76e2('0x2b')]=function(_0x58cdd4){if(this['channels'][_0x58cdd4[_0x76e2('0x24')]]){this[_0x76e2('0x10')][_0x58cdd4[_0x76e2('0x24')]][_0x76e2('0x2c')]=_0x58cdd4[_0x76e2('0x2c')];this[_0x76e2('0x10')][_0x58cdd4[_0x76e2('0x24')]]['channelstatedesc']=_0x58cdd4[_0x76e2('0x2d')];}};Fax[_0x76e2('0x20')][_0x76e2('0x1a')]=function(_0x3d8051){if(this[_0x76e2('0x10')][_0x3d8051[_0x76e2('0x24')]]){for(var _0x42d1e0 in _0x3d8051[_0x76e2('0x29')]){if(_0x3d8051[_0x76e2('0x29')]['hasOwnProperty'](_0x42d1e0)){this[_0x76e2('0x10')][_0x3d8051[_0x76e2('0x24')]][_0x42d1e0]=_0x3d8051[_0x76e2('0x2a')];}}}};Fax[_0x76e2('0x20')][_0x76e2('0x2e')]=function(_0x41d2de){if(this['channels'][_0x41d2de[_0x76e2('0x24')]]){this['channels'][_0x41d2de[_0x76e2('0x24')]][_0x76e2('0x2f')]=_0x41d2de[_0x76e2('0x2f')];this[_0x76e2('0x10')][_0x41d2de['uniqueid']][_0x76e2('0x30')]=_0x41d2de[_0x76e2('0x30')];this[_0x76e2('0x10')][_0x41d2de['uniqueid']]['localstationid']=_0x41d2de[_0x76e2('0x31')];this[_0x76e2('0x10')][_0x41d2de[_0x76e2('0x24')]][_0x76e2('0x32')]=_0x41d2de[_0x76e2('0x32')];logger[_0x76e2('0x33')](_0x41d2de[_0x76e2('0x24')],_0x76e2('0x34'));}};Fax[_0x76e2('0x20')][_0x76e2('0x1c')]=function(_0x329ebb){var _0x1717e9=this;if(this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]]){var _0x5be9d8=this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]]['id'];this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x35')]=_0x329ebb['remotestationid'];this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x36')]=_0x329ebb['pagestransferred'];this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x31')]=_0x329ebb['localstationid'];this['channels'][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x37')]=_0x329ebb['resolution'];this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x38')]=_0x329ebb[_0x76e2('0x38')];this[_0x76e2('0x10')][_0x329ebb['uniqueid']][_0x76e2('0x32')]=_0x329ebb[_0x76e2('0x32')];this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x39')]=_0x329ebb['calleridnum'];if(this[_0x76e2('0x10')][_0x329ebb[_0x76e2('0x24')]][_0x76e2('0x36')]>0x0){tiff2pdf(_0x329ebb[_0x76e2('0x32')],_0x76e2('0x3a'),function(_0x3d8986){logger[_0x76e2('0x33')](_0x329ebb['uniqueid'],_0x76e2('0x3b'),_0x3d8986[_0x76e2('0x3c')]);attachment[_0x76e2('0x3d')]({'name':path[_0x76e2('0x3e')](_0x329ebb['filename'])[_0x76e2('0x26')],'basename':path[_0x76e2('0x3e')](_0x329ebb['filename'])[_0x76e2('0x26')]+_0x76e2('0x3f'),'type':_0x76e2('0x40')})[_0x76e2('0x41')](function(_0x1be497){faxAccount['notify'](_0x5be9d8,{'from':_0x329ebb[_0x76e2('0x39')],'mapKey':'fax','body':path[_0x76e2('0x3e')](_0x329ebb[_0x76e2('0x32')])['name']+_0x76e2('0x3f'),'AttachmentId':_0x1be497['id']})[_0x76e2('0x42')](function(_0x43d939){logger[_0x76e2('0x43')](_0x329ebb[_0x76e2('0x24')],'\x20notify\x20',JSON[_0x76e2('0x44')](_0x43d939));});})[_0x76e2('0x42')](function(_0x58efaf){logger[_0x76e2('0x43')](_0x329ebb[_0x76e2('0x24')],_0x76e2('0x45'),JSON['stringify'](_0x58efaf));});});}logger[_0x76e2('0x33')](_0x329ebb[_0x76e2('0x24')],'\x20receiveFax\x20');}};Fax[_0x76e2('0x20')][_0x76e2('0x1f')]=function(_0x39bacf){if(this[_0x76e2('0x28')][_0x39bacf[_0x76e2('0x24')]]){_[_0x76e2('0x46')](this[_0x76e2('0x10')][_0x39bacf[_0x76e2('0x24')]],_[_0x76e2('0x47')](_0x39bacf,[_0x76e2('0x48'),_0x76e2('0x49')]));}};function updateStatus(_0x5381b7){if(_0x5381b7[_0x76e2('0x4a')]){faxMessage[_0x76e2('0x4b')](_0x5381b7[_0x76e2('0x4a')],{'failMessage':_0x76e2('0x4c')})[_0x76e2('0x41')](function(_0x5eff01){ut[_0x76e2('0x4d')](_0x76e2('0x4e'),_0x5eff01);})[_0x76e2('0x42')](function(_0x249417){ut[_0x76e2('0x4d')]('[Fax][Message][Error][NoUpdate1]',_0x249417);});}else{ut[_0x76e2('0x4d')](_0x76e2('0x4f'));}}Fax[_0x76e2('0x20')]['updateStatus']=function(_0x3d44ca,_0xa57ecf,_0x46280a){var _0x9e0a2b=this;var _0x5cc6b2={};if(_0xa57ecf){_0x5cc6b2={'read':_0xa57ecf};}else{_0x5cc6b2={'failMessage':_0x46280a};}if(this[_0x76e2('0x28')][_0x3d44ca]['AttachmentId']){faxMessage[_0x76e2('0x4b')](this['actions'][_0x3d44ca][_0x76e2('0x4a')],_0x5cc6b2)[_0x76e2('0x41')](function(_0x101386){ut[_0x76e2('0x4d')]('[Fax][Message][Updated]',_0x101386);})[_0x76e2('0x42')](function(_0x3568ae){ut['logger'](_0x76e2('0x50'),_0x3568ae);})[_0x76e2('0x51')](function(){delete _0x9e0a2b[_0x76e2('0x10')][_0x3d44ca];delete _0x9e0a2b[_0x76e2('0x28')][_0x3d44ca];});}else{ut[_0x76e2('0x4d')](_0x76e2('0x52'));delete this['channels'][_0x3d44ca];delete this[_0x76e2('0x28')][_0x3d44ca];}};Fax[_0x76e2('0x20')][_0x76e2('0x1e')]=function(_0xfa6358){var _0x5f2723=this;if(this[_0x76e2('0x10')][_0xfa6358[_0x76e2('0x24')]]){if(this[_0x76e2('0x28')][_0xfa6358[_0x76e2('0x24')]]){this[_0x76e2('0x10')][_0xfa6358[_0x76e2('0x24')]]['id']=this[_0x76e2('0x28')][_0xfa6358['uniqueid']]['id'];this[_0x76e2('0x10')][_0xfa6358['uniqueid']]['name']=this[_0x76e2('0x28')][_0xfa6358[_0x76e2('0x24')]][_0x76e2('0x26')];}logger[_0x76e2('0x33')](_0xfa6358['uniqueid'],this['actions'][_0xfa6358[_0x76e2('0x24')]]?_0x76e2('0x53'):'\x20hangup\x20faxRiceive\x20',JSON['stringify'](this[_0x76e2('0x10')][_0xfa6358[_0x76e2('0x24')]]));if(this[_0x76e2('0x28')][_0xfa6358[_0x76e2('0x24')]]){if(this[_0x76e2('0x10')][_0xfa6358[_0x76e2('0x24')]][_0x76e2('0x54')]>0x0&&this[_0x76e2('0x10')][_0xfa6358[_0x76e2('0x24')]]['faxstatus']===_0x76e2('0x55')){this[_0x76e2('0x56')](_0xfa6358[_0x76e2('0x24')],!![]);}else{this[_0x76e2('0x56')](_0xfa6358[_0x76e2('0x24')],![],this['channels'][_0xfa6358[_0x76e2('0x24')]][_0x76e2('0x57')]?_0x76e2('0x58')+this[_0x76e2('0x10')][_0xfa6358[_0x76e2('0x24')]][_0x76e2('0x57')]:_0x76e2('0x59'));}}}};Fax[_0x76e2('0x20')][_0x76e2('0x5a')]=function(_0x45cf5e){var _0x32c3c4=this;return new BPromise(function(_0x1fbe48,_0x1e08cd){_0x32c3c4[_0x76e2('0x5b')](_0x45cf5e,_0x32c3c4['faxAccounts'][_0x45cf5e['FaxAccountId']])[_0x76e2('0x41')](function(_0x2409ac){ut['logger'](_0x76e2('0x5c'),_0x2409ac);_0x1fbe48(ut[_0x76e2('0x3c')](_0x76e2('0x5d')));})[_0x76e2('0x42')](function(_0x558720){ut[_0x76e2('0x4d')](_0x76e2('0x5e'),_0x558720);updateStatus(_0x45cf5e);_0x1e08cd(ut[_0x76e2('0x3c')]('Fax\x20failed'));});});};Fax[_0x76e2('0x20')][_0x76e2('0x5f')]=function(_0x2e2c9d){var _0x449b40=this;return new BPromise(function(_0x21ebeb,_0x20985c){var _0x5b545=_0x449b40['checkTrunk'](_0x449b40[_0x76e2('0x11')][_0x2e2c9d[_0x76e2('0x60')]][_0x76e2('0x61')],_0x2e2c9d);if(_0x5b545[_0x76e2('0x62')]){_0x21ebeb(ut['message'](_0x76e2('0x63')));}else{_0x20985c(ut[_0x76e2('0x3c')](_0x5b545['message']));}});};function originate(_0xdbcd08,_0x431db1,_0x235918){return new BPromise(function(_0x1b4764,_0xb641e9){if(_0x235918){var _0x42ca64=util['format'](_0x76e2('0x64'),path[_0x76e2('0x3e')](_0xdbcd08[_0x76e2('0x4')])[_0x76e2('0x26')],_0xdbcd08[_0x76e2('0x4')]);gs[_0x76e2('0x65')](_0x42ca64)[_0x76e2('0x41')](function(){_0xdbcd08[_0x76e2('0x4')]=util[_0x76e2('0x66')](_0x76e2('0x67'),path['parse'](_0xdbcd08[_0x76e2('0x4')])['dir'],path[_0x76e2('0x3e')](_0xdbcd08[_0x76e2('0x4')])[_0x76e2('0x26')]);_0x431db1[_0x76e2('0x68')]=_0xdbcd08[_0x76e2('0x4')];ut[_0x76e2('0x4d')]('Convert\x20pdf\x20to\x20tif','');ami[_0x76e2('0x69')](ut[_0x76e2('0x6a')](_0xdbcd08,_0x431db1))[_0x76e2('0x41')](function(_0x4634ed){_0x1b4764(_0x4634ed);})[_0x76e2('0x42')](function(_0x3e3753){_0xb641e9(_0x3e3753);});})['catch'](function(_0x1d2c52){_0xb641e9(_0x1d2c52);});}else{ami[_0x76e2('0x69')](ut[_0x76e2('0x6a')](_0xdbcd08,_0x431db1))[_0x76e2('0x41')](function(_0x1b012b){_0x1b4764(_0x1b012b);})[_0x76e2('0x42')](function(_0x221040){_0xb641e9(_0x221040);});}});}Fax[_0x76e2('0x20')][_0x76e2('0x5b')]=function(_0x227800,_0x3c2b71){var _0x24c72c=this;return new BPromise(function(_0x5b3d5a,_0x378071){var _0x4ff2cc=uuid['v4']();var _0x2387ff=ut[_0x76e2('0x6b')](_0x227800,_0x3c2b71);_0x24c72c['actions'][_0x4ff2cc]=new Action(_0x4ff2cc,_0x3c2b71,_0x227800);var _0x15ef07=_0x24c72c[_0x76e2('0x28')][_0x4ff2cc];if(path[_0x76e2('0x3e')](_0x227800[_0x76e2('0x4')])[_0x76e2('0x6c')]===_0x76e2('0x3f')){originate(_0x15ef07,_0x2387ff,!![])[_0x76e2('0x41')](function(_0x5b7a3e){_0x5b3d5a(_0x5b7a3e);})[_0x76e2('0x42')](function(_0x2c0db2){_0x378071(_0x2c0db2);});}else{originate(_0x15ef07,_0x2387ff,![])[_0x76e2('0x41')](function(_0x1c9ed5){_0x5b3d5a(_0x1c9ed5);})[_0x76e2('0x42')](function(_0xc92dcf){_0x378071(_0xc92dcf);});}});};Fax[_0x76e2('0x20')][_0x76e2('0x6d')]=function(_0x361df0){return!_['isNil'](_0x361df0)&&!_[_0x76e2('0x6e')](_0x361df0[_0x76e2('0x26')])&&!_['isNil'](_0x361df0[_0x76e2('0x6f')])&&_0x361df0[_0x76e2('0x6f')]&&!_[_0x76e2('0x6e')](this['trunks'][util['format'](_0x76e2('0x70'),_0x361df0[_0x76e2('0x26')])])&&!_[_0x76e2('0x6e')](this[_0x76e2('0x12')][util['format']('SIP/%s',_0x361df0[_0x76e2('0x26')])][_0x76e2('0x30')])&&(this[_0x76e2('0x12')][util[_0x76e2('0x66')](_0x76e2('0x70'),_0x361df0[_0x76e2('0x26')])]['status']===_0x76e2('0x71')||this[_0x76e2('0x12')][util[_0x76e2('0x66')]('SIP/%s',_0x361df0['name'])][_0x76e2('0x30')]==='unmonitored');};Fax[_0x76e2('0x20')]['checkTrunk']=function(_0x1f2a4b,_0x350491){if(!this[_0x76e2('0x6d')](_0x1f2a4b)){ut[_0x76e2('0x4d')](_0x76e2('0x72'),_[_0x76e2('0x6e')](_0x1f2a4b)?'':_0x1f2a4b[_0x76e2('0x26')]+_0x76e2('0x73'));return{'isValid':![],'message':_0x76e2('0x74')};}if(_[_0x76e2('0x6e')](_0x350491['fax'])){ut[_0x76e2('0x4d')]('[Fax][checkTrunk][Empty\x20Fax]',JSON[_0x76e2('0x44')](_0x350491));return{'isValid':![],'message':_0x76e2('0x75')};}if(_[_0x76e2('0x6e')](_0x350491[_0x76e2('0x4')])){ut[_0x76e2('0x4d')]('[Fax][checkTrunk][Empty\x20path]',JSON[_0x76e2('0x44')](_0x350491));return{'isValid':![],'message':'Empty\x20path'};}return{'isValid':!![],'message':'Is\x20Valid'};};module[_0x76e2('0x76')]=Fax;
\ No newline at end of file
diff --git a/server/services/ami/fax/rpcDb.js b/server/services/ami/fax/rpcDb.js
index db1b6b9..0bb9472 100644
--- a/server/services/ami/fax/rpcDb.js
+++ b/server/services/ami/fax/rpcDb.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcf84=['notify','catch','[Notify]\x20','util','../../../config/logger','../rpc/faxAccount','inspect'];(function(_0x1ad279,_0x42d157){var _0x272861=function(_0x3cb41f){while(--_0x3cb41f){_0x1ad279['push'](_0x1ad279['shift']());}};_0x272861(++_0x42d157);}(_0xcf84,0x1e6));var _0x4cf8=function(_0x297e9a,_0x557435){_0x297e9a=_0x297e9a-0x0;var _0x295ecf=_0xcf84[_0x297e9a];return _0x295ecf;};'use strict';var util=require(_0x4cf8('0x0'));var BPromise=require('bluebird');var logger=require(_0x4cf8('0x1'))('preview');var _=require('lodash');var faxAccount=require(_0x4cf8('0x2'));function loggerCatch(_0x48c0b6){return function(_0x34c96e){logger['error'](_0x48c0b6,util[_0x4cf8('0x3')](_0x34c96e,{'showHidden':![],'depth':null}));};}exports[_0x4cf8('0x4')]=function(_0x18250c,_0xef7f07){return BPromise['resolve']()['then'](faxAccount[_0x4cf8('0x4')](_0x18250c,_0xef7f07))[_0x4cf8('0x5')](loggerCatch(_0x4cf8('0x6')));};
\ No newline at end of file
+var _0xbe42=['catch','[Notify]\x20','util','bluebird','../../../config/logger','preview','lodash','../rpc/faxAccount','inspect','notify','resolve','then'];(function(_0x188a93,_0xaf57db){var _0x23b40d=function(_0x599f63){while(--_0x599f63){_0x188a93['push'](_0x188a93['shift']());}};_0x23b40d(++_0xaf57db);}(_0xbe42,0x13a));var _0x2be4=function(_0x173113,_0x316a7c){_0x173113=_0x173113-0x0;var _0x3bea89=_0xbe42[_0x173113];return _0x3bea89;};'use strict';var util=require(_0x2be4('0x0'));var BPromise=require(_0x2be4('0x1'));var logger=require(_0x2be4('0x2'))(_0x2be4('0x3'));var _=require(_0x2be4('0x4'));var faxAccount=require(_0x2be4('0x5'));function loggerCatch(_0x3c8e8f){return function(_0x502f5c){logger['error'](_0x3c8e8f,util[_0x2be4('0x6')](_0x502f5c,{'showHidden':![],'depth':null}));};}exports[_0x2be4('0x7')]=function(_0x2a85bf,_0x525aa2){return BPromise[_0x2be4('0x8')]()[_0x2be4('0x9')](faxAccount['notify'](_0x2a85bf,_0x525aa2))[_0x2be4('0xa')](loggerCatch(_0x2be4('0xb')));};
\ No newline at end of file
diff --git a/server/services/ami/fax/util/gs.js b/server/services/ami/fax/util/gs.js
index 71745e7..6ebe52b 100644
--- a/server/services/ami/fax/util/gs.js
+++ b/server/services/ami/fax/util/gs.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9298=['info','Exec\x20gs','util','../../../../config/logger','bluebird','child_process','exec','execute'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9298,0x1a2));var _0x8929=function(_0x54da05,_0xb3be0c){_0x54da05=_0x54da05-0x0;var _0x595230=_0x9298[_0x54da05];return _0x595230;};'use strict';var util=require(_0x8929('0x0'));var logger=require(_0x8929('0x1'))('fax');var BPromise=require(_0x8929('0x2'));var exec=require(_0x8929('0x3'))[_0x8929('0x4')];exports[_0x8929('0x5')]=function(_0x1d3727){return new BPromise(function(_0xa59e63,_0x4ab6cc){exec(_0x1d3727,function(_0x266043,_0x103245,_0x1fa7b1){logger[_0x8929('0x6')](_0x8929('0x7'),_0x103245);if(_0x266043){logger[_0x8929('0x6')](_0x8929('0x7'),'\x20Error\x20:',util['inspect'](_0x266043,{'showHidden':![],'depth':null}),_0x103245,_0x1fa7b1);_0x4ab6cc(_0x266043);}_0xa59e63(_0x103245);});});};
\ No newline at end of file
+var _0x74e9=['exec','Exec\x20gs','\x20Error\x20:','inspect','util','../../../../config/logger','fax','bluebird','child_process'];(function(_0x54b284,_0x19d746){var _0x22a0cd=function(_0x412ba5){while(--_0x412ba5){_0x54b284['push'](_0x54b284['shift']());}};_0x22a0cd(++_0x19d746);}(_0x74e9,0xdc));var _0x974e=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x74e9[_0x122ef9];return _0x42fba0;};'use strict';var util=require(_0x974e('0x0'));var logger=require(_0x974e('0x1'))(_0x974e('0x2'));var BPromise=require(_0x974e('0x3'));var exec=require(_0x974e('0x4'))[_0x974e('0x5')];exports['execute']=function(_0x2754c3){return new BPromise(function(_0x1a9bde,_0x52a7d3){exec(_0x2754c3,function(_0x2cb986,_0x5deaf9,_0xae2e9){logger['info'](_0x974e('0x6'),_0x5deaf9);if(_0x2cb986){logger['info'](_0x974e('0x6'),_0x974e('0x7'),util[_0x974e('0x8')](_0x2cb986,{'showHidden':![],'depth':null}),_0x5deaf9,_0xae2e9);_0x52a7d3(_0x2cb986);}_0x1a9bde(_0x5deaf9);});});};
\ No newline at end of file
diff --git a/server/services/ami/fax/util/util.js b/server/services/ami/fax/util/util.js
index 74e679b..067772f 100644
--- a/server/services/ami/fax/util/util.js
+++ b/server/services/ami/fax/util/util.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb621=['inspect','addVariables','ecm','headerinfo','minrate','format','\x22%s\x22','modem','gateway','t38timeout','localstationid','path','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','uniqueid','util','lodash','fax','logger','info'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb621,0xe1));var _0x1b62=function(_0x42e1d3,_0x82b7bd){_0x42e1d3=_0x42e1d3-0x0;var _0x28725b=_0xb621[_0x42e1d3];return _0x28725b;};'use strict';var util=require(_0x1b62('0x0'));var _=require(_0x1b62('0x1'));var moment=require('moment');var logger=require('../../../../config/logger')(_0x1b62('0x2'));exports['message']=function(_0x1f2ad9){return{'message':_0x1f2ad9};};exports[_0x1b62('0x3')]=function(_0x3c5a58,_0x4c3f86){logger[_0x1b62('0x4')](_0x3c5a58,util[_0x1b62('0x5')](_0x4c3f86,{'showHidden':![],'depth':null}));};exports[_0x1b62('0x6')]=function(_0x516367,_0x3a781a){var _0x17c06a={'XMF-ECM':_0x3a781a[_0x1b62('0x7')],'XMF-HEADERINFO':_0x3a781a[_0x1b62('0x8')],'XMF-MINRATE':_0x3a781a[_0x1b62('0x9')],'XMF-MAXRATE':_0x3a781a['maxrate'],'XMF-MODEM':util[_0x1b62('0xa')](_0x1b62('0xb'),_0x3a781a[_0x1b62('0xc')]),'XMF-GATEWAY':_0x3a781a[_0x1b62('0xd')],'XMF-FAXDETECT':_0x3a781a['faxdetect'],'XMF-T38TIMEOUT':_0x3a781a[_0x1b62('0xe')],'XMF-LOCALSTATIONID':_0x3a781a[_0x1b62('0xf')],'XMF-PATH':_0x516367[_0x1b62('0x10')]};return _0x17c06a;};exports['variablesAction']=function(_0x3fb110,_0x221b8b){return{'actionid':_0x3fb110['uniqueid'],'action':_0x1b62('0x11'),'channel':_0x3fb110[_0x1b62('0x12')],'Exten':_0x1b62('0x13'),'Context':_0x1b62('0x14'),'Priority':'1','callerid':util[_0x1b62('0xa')](_0x1b62('0x15'),_0x3fb110['headerinfo']?_0x3fb110[_0x1b62('0x8')]:'',_0x3fb110['localstationid']),'variable':_0x221b8b,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x3fb110[_0x1b62('0x16')]};};
\ No newline at end of file
+var _0x4ee8=['minrate','maxrate','format','gateway','faxdetect','t38timeout','path','variablesAction','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','headerinfo','localstationid','util','lodash','../../../../config/logger','fax','message','logger','info','inspect','addVariables'];(function(_0x3dafa,_0x44428b){var _0x2aa5e9=function(_0x3ce27b){while(--_0x3ce27b){_0x3dafa['push'](_0x3dafa['shift']());}};_0x2aa5e9(++_0x44428b);}(_0x4ee8,0x15f));var _0x84ee=function(_0x44bcb0,_0x235aa9){_0x44bcb0=_0x44bcb0-0x0;var _0xfaf881=_0x4ee8[_0x44bcb0];return _0xfaf881;};'use strict';var util=require(_0x84ee('0x0'));var _=require(_0x84ee('0x1'));var moment=require('moment');var logger=require(_0x84ee('0x2'))(_0x84ee('0x3'));exports[_0x84ee('0x4')]=function(_0x3eda52){return{'message':_0x3eda52};};exports[_0x84ee('0x5')]=function(_0x1e967c,_0x37b385){logger[_0x84ee('0x6')](_0x1e967c,util[_0x84ee('0x7')](_0x37b385,{'showHidden':![],'depth':null}));};exports[_0x84ee('0x8')]=function(_0x55c6e9,_0x3a462e){var _0x32f817={'XMF-ECM':_0x3a462e['ecm'],'XMF-HEADERINFO':_0x3a462e['headerinfo'],'XMF-MINRATE':_0x3a462e[_0x84ee('0x9')],'XMF-MAXRATE':_0x3a462e[_0x84ee('0xa')],'XMF-MODEM':util[_0x84ee('0xb')]('\x22%s\x22',_0x3a462e['modem']),'XMF-GATEWAY':_0x3a462e[_0x84ee('0xc')],'XMF-FAXDETECT':_0x3a462e[_0x84ee('0xd')],'XMF-T38TIMEOUT':_0x3a462e[_0x84ee('0xe')],'XMF-LOCALSTATIONID':_0x3a462e['localstationid'],'XMF-PATH':_0x55c6e9[_0x84ee('0xf')]};return _0x32f817;};exports[_0x84ee('0x10')]=function(_0x160da6,_0x4ea33b){return{'actionid':_0x160da6['uniqueid'],'action':_0x84ee('0x11'),'channel':_0x160da6[_0x84ee('0x12')],'Exten':_0x84ee('0x13'),'Context':_0x84ee('0x14'),'Priority':'1','callerid':util[_0x84ee('0xb')](_0x84ee('0x15'),_0x160da6[_0x84ee('0x16')]?_0x160da6['headerinfo']:'',_0x160da6[_0x84ee('0x17')]),'variable':_0x4ea33b,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x160da6['uniqueid']};};
\ No newline at end of file
diff --git a/server/services/ami/index.js b/server/services/ami/index.js
index ac62417..6084a96 100644
--- a/server/services/ami/index.js
+++ b/server/services/ami/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5d7d=['then','getAgents','initAgents','initTelephones','getTrunks','initTrunks','getVoiceQueues','initVoiceQueues','initTriggers','getTemplates','initTemplates','getZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','getVtigerAccounts','initVtigerAccounts','getServicenowAccounts','initServicenowAccounts','getCampaigns','initCampaigns','getVoiceExtensions','initVoiceExtensions','getFaxAccounts','initFaxAccounts','initVoiceQueueReports','getVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','log','moment','./server','./report','./acw','./trigger','./dialer','./preview','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/trunk','./rpc/cmHopperHistory','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/freshdesk','./rpc/integrations/desk','./rpc/integrations/vtiger','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','get','hour','resolve'];(function(_0x2d6ab7,_0x3c4802){var _0x1d4b78=function(_0x4eae69){while(--_0x4eae69){_0x2d6ab7['push'](_0x2d6ab7['shift']());}};_0x1d4b78(++_0x3c4802);}(_0x5d7d,0x199));var _0xd5d7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5d7d[_0x3dd15e];return _0x231fd0;};'use strict';var BPromise=require('bluebird');var util=require('util');var moment=require(_0xd5d7('0x0'));var server=require(_0xd5d7('0x1'));var Realtime=require('./realtime');var Report=require(_0xd5d7('0x2'));var Acw=require(_0xd5d7('0x3'));var Trigger=require(_0xd5d7('0x4'));var Dialer=require(_0xd5d7('0x5'));var Preview=require(_0xd5d7('0x6'));var Fax=require('./fax');var user=require(_0xd5d7('0x7'));var voiceQueue=require(_0xd5d7('0x8'));var voiceQueueReport=require(_0xd5d7('0x9'));var voiceCallReport=require('./rpc/voiceCallReport');var trunk=require(_0xd5d7('0xa'));var trigger=require('./rpc/trigger');var template=require('./rpc/template');var cmHopperHistory=require(_0xd5d7('0xb'));var campaign=require(_0xd5d7('0xc'));var voiceExtension=require(_0xd5d7('0xd'));var faxAccount=require(_0xd5d7('0xe'));var zendesk=require(_0xd5d7('0xf'));var salesforce=require(_0xd5d7('0x10'));var sugarcrm=require('./rpc/integrations/sugarcrm');var freshdesk=require(_0xd5d7('0x11'));var desk=require(_0xd5d7('0x12'));var zoho=require('./rpc/integrations/zoho');var vtiger=require(_0xd5d7('0x13'));var servicenow=require(_0xd5d7('0x14'));var dynamics365=require(_0xd5d7('0x15'));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=!![];var initP=!![];function ifMidnight(){if(moment()[_0xd5d7('0x16')]('hour')===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()['get'](_0xd5d7('0x17'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0xd5d7('0x18')]()[_0xd5d7('0x19')](user[_0xd5d7('0x1a')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x1b')]())['then'](user['getTelephones']())['then'](realtime[_0xd5d7('0x1c')]())[_0xd5d7('0x19')](trunk[_0xd5d7('0x1d')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x1e')]())['then'](voiceQueue[_0xd5d7('0x1f')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x20')]())[_0xd5d7('0x19')](trigger['getTriggers']())[_0xd5d7('0x19')](realtime[_0xd5d7('0x21')]())[_0xd5d7('0x19')](template[_0xd5d7('0x22')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x23')]())['then'](zendesk[_0xd5d7('0x24')]())[_0xd5d7('0x19')](realtime['initZendeskAccounts']())[_0xd5d7('0x19')](salesforce[_0xd5d7('0x25')]())['then'](realtime[_0xd5d7('0x26')]())[_0xd5d7('0x19')](sugarcrm[_0xd5d7('0x27')]())['then'](realtime[_0xd5d7('0x28')]())[_0xd5d7('0x19')](freshdesk[_0xd5d7('0x29')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x2a')]())[_0xd5d7('0x19')](desk[_0xd5d7('0x2b')]())['then'](realtime['initDeskAccounts']())[_0xd5d7('0x19')](zoho['getZohoAccounts']())['then'](realtime['initZohoAccounts']())[_0xd5d7('0x19')](vtiger[_0xd5d7('0x2c')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x2d')]())[_0xd5d7('0x19')](servicenow[_0xd5d7('0x2e')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x2f')]())[_0xd5d7('0x19')](dynamics365['getDynamics365Accounts']())['then'](realtime['initDynamics365Accounts']())['then'](campaign[_0xd5d7('0x30')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x31')]())['then'](voiceExtension[_0xd5d7('0x32')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x33')]())[_0xd5d7('0x19')](faxAccount[_0xd5d7('0x34')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x35')]())['then'](function(){return realtime;});}function initParams(){return BPromise[_0xd5d7('0x18')]()['then'](voiceQueueReport['getVoiceQueueReports']())['then'](realtime[_0xd5d7('0x36')]())[_0xd5d7('0x19')](cmHopperHistory[_0xd5d7('0x37')]())[_0xd5d7('0x19')](realtime['initVoiceQueueHopperHistory']())[_0xd5d7('0x19')](cmHopperHistory[_0xd5d7('0x38')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x39')]())['then'](voiceCallReport[_0xd5d7('0x3a')]())[_0xd5d7('0x19')](realtime[_0xd5d7('0x3b')]())['then'](function(_0x8130bf){})[_0xd5d7('0x3c')](function(_0x68669c){console[_0xd5d7('0x3d')](_0x68669c);});}function main(){return server['listen'](realtime,preview,fax)[_0xd5d7('0x19')](function(_0x473436){return initRealtime();})['then'](function(){return initParams();})[_0xd5d7('0x19')](function(){report['sync']();setInterval(initRealtime,0x1388);})[_0xd5d7('0x3c')](function(_0x26ea59){console[_0xd5d7('0x3d')](_0x26ea59);});}main();
\ No newline at end of file
+var _0x788e=['./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trigger','./rpc/cmHopperHistory','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/servicenow','hour','get','resolve','then','getAgents','initAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','getTriggers','initTriggers','getTemplates','initZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','initDeskAccounts','initZohoAccounts','getVtigerAccounts','initVtigerAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','initCampaigns','getVoiceExtensions','initVoiceExtensions','initFaxAccounts','getVoiceQueueReports','initVoiceQueueReports','initVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','listen','bluebird','util','moment','./server','./acw','./dialer','./fax'];(function(_0x428d55,_0x4e5e47){var _0x4ba5fc=function(_0x216dcd){while(--_0x216dcd){_0x428d55['push'](_0x428d55['shift']());}};_0x4ba5fc(++_0x4e5e47);}(_0x788e,0x185));var _0xe788=function(_0x4c02b3,_0x134ce4){_0x4c02b3=_0x4c02b3-0x0;var _0x431212=_0x788e[_0x4c02b3];return _0x431212;};'use strict';var BPromise=require(_0xe788('0x0'));var util=require(_0xe788('0x1'));var moment=require(_0xe788('0x2'));var server=require(_0xe788('0x3'));var Realtime=require('./realtime');var Report=require('./report');var Acw=require(_0xe788('0x4'));var Trigger=require('./trigger');var Dialer=require(_0xe788('0x5'));var Preview=require('./preview');var Fax=require(_0xe788('0x6'));var user=require(_0xe788('0x7'));var voiceQueue=require(_0xe788('0x8'));var voiceQueueReport=require(_0xe788('0x9'));var voiceCallReport=require(_0xe788('0xa'));var trunk=require('./rpc/trunk');var trigger=require(_0xe788('0xb'));var template=require('./rpc/template');var cmHopperHistory=require(_0xe788('0xc'));var campaign=require('./rpc/campaign');var voiceExtension=require(_0xe788('0xd'));var faxAccount=require(_0xe788('0xe'));var zendesk=require(_0xe788('0xf'));var salesforce=require(_0xe788('0x10'));var sugarcrm=require(_0xe788('0x11'));var freshdesk=require('./rpc/integrations/freshdesk');var desk=require(_0xe788('0x12'));var zoho=require(_0xe788('0x13'));var vtiger=require(_0xe788('0x14'));var servicenow=require(_0xe788('0x15'));var dynamics365=require('./rpc/integrations/dynamics365');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=!![];var initP=!![];function ifMidnight(){if(moment()['get'](_0xe788('0x16'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0xe788('0x17')](_0xe788('0x16'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0xe788('0x18')]()[_0xe788('0x19')](user[_0xe788('0x1a')]())[_0xe788('0x19')](realtime[_0xe788('0x1b')]())[_0xe788('0x19')](user[_0xe788('0x1c')]())[_0xe788('0x19')](realtime[_0xe788('0x1d')]())['then'](trunk[_0xe788('0x1e')]())[_0xe788('0x19')](realtime[_0xe788('0x1f')]())[_0xe788('0x19')](voiceQueue[_0xe788('0x20')]())[_0xe788('0x19')](realtime['initVoiceQueues']())[_0xe788('0x19')](trigger[_0xe788('0x21')]())[_0xe788('0x19')](realtime[_0xe788('0x22')]())[_0xe788('0x19')](template[_0xe788('0x23')]())['then'](realtime['initTemplates']())['then'](zendesk['getZendeskAccounts']())[_0xe788('0x19')](realtime[_0xe788('0x24')]())[_0xe788('0x19')](salesforce[_0xe788('0x25')]())['then'](realtime[_0xe788('0x26')]())[_0xe788('0x19')](sugarcrm[_0xe788('0x27')]())[_0xe788('0x19')](realtime[_0xe788('0x28')]())[_0xe788('0x19')](freshdesk[_0xe788('0x29')]())[_0xe788('0x19')](realtime[_0xe788('0x2a')]())[_0xe788('0x19')](desk[_0xe788('0x2b')]())[_0xe788('0x19')](realtime[_0xe788('0x2c')]())[_0xe788('0x19')](zoho['getZohoAccounts']())[_0xe788('0x19')](realtime[_0xe788('0x2d')]())['then'](vtiger[_0xe788('0x2e')]())[_0xe788('0x19')](realtime[_0xe788('0x2f')]())[_0xe788('0x19')](servicenow[_0xe788('0x30')]())['then'](realtime[_0xe788('0x31')]())[_0xe788('0x19')](dynamics365[_0xe788('0x32')]())[_0xe788('0x19')](realtime[_0xe788('0x33')]())[_0xe788('0x19')](campaign[_0xe788('0x34')]())[_0xe788('0x19')](realtime[_0xe788('0x35')]())[_0xe788('0x19')](voiceExtension[_0xe788('0x36')]())[_0xe788('0x19')](realtime[_0xe788('0x37')]())[_0xe788('0x19')](faxAccount['getFaxAccounts']())[_0xe788('0x19')](realtime[_0xe788('0x38')]())[_0xe788('0x19')](function(){return realtime;});}function initParams(){return BPromise[_0xe788('0x18')]()[_0xe788('0x19')](voiceQueueReport[_0xe788('0x39')]())['then'](realtime[_0xe788('0x3a')]())[_0xe788('0x19')](cmHopperHistory['getVoiceQueueHopperHistory']())[_0xe788('0x19')](realtime[_0xe788('0x3b')]())[_0xe788('0x19')](cmHopperHistory[_0xe788('0x3c')]())[_0xe788('0x19')](realtime[_0xe788('0x3d')]())[_0xe788('0x19')](voiceCallReport[_0xe788('0x3e')]())[_0xe788('0x19')](realtime[_0xe788('0x3f')]())[_0xe788('0x19')](function(_0x14ad82){})[_0xe788('0x40')](function(_0x1a6b18){console['log'](_0x1a6b18);});}function main(){return server[_0xe788('0x41')](realtime,preview,fax)[_0xe788('0x19')](function(_0xcd77ea){return initRealtime();})[_0xe788('0x19')](function(){return initParams();})[_0xe788('0x19')](function(){report['sync']();setInterval(initRealtime,0x1388);})['catch'](function(_0x444cf7){console['log'](_0x444cf7);});}main();
\ No newline at end of file
diff --git a/server/services/ami/model/agent.js b/server/services/ami/model/agent.js
index 106ee16..bd5019e 100644
--- a/server/services/ami/model/agent.js
+++ b/server/services/ami/model/agent.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcb5c=['voiceStatusTime','stringify','emit','user:save','exports','lodash','util','moment','md5','ioredis','defaults','redis','localhost','socket.io-emitter','name','email','accountcode','fullname','state','unknown','status','phone','mobile','interface','online','voiceStatus','voiceStatusQueue','onhold','local','toLowerCase','not_inuse','idle','talking','statePause','toNumber','format','stateTime'];(function(_0xd1d19a,_0x1933f0){var _0x52a79d=function(_0x5199e2){while(--_0x5199e2){_0xd1d19a['push'](_0xd1d19a['shift']());}};_0x52a79d(++_0x1933f0);}(_0xcb5c,0x99));var _0xccb5=function(_0xa12b58,_0x4af9f5){_0xa12b58=_0xa12b58-0x0;var _0x28f867=_0xcb5c[_0xa12b58];return _0x28f867;};'use strict';var _=require(_0xccb5('0x0'));var util=require(_0xccb5('0x1'));var moment=require(_0xccb5('0x2'));var md5=require(_0xccb5('0x3'));var Redis=require(_0xccb5('0x4'));var config=require('../../../config/environment');config['redis']=_[_0xccb5('0x5')](config[_0xccb5('0x6')],{'host':_0xccb5('0x7'),'port':0x18eb});var io=require(_0xccb5('0x8'))(new Redis(config['redis']));function Agent(_0x53ec66){this['id']=_0x53ec66['id']||0x0;this['name']=_0x53ec66[_0xccb5('0x9')]||'';this[_0xccb5('0xa')]=_0x53ec66[_0xccb5('0xa')]||'';this['accountcode']=_0x53ec66[_0xccb5('0xb')]||'';this[_0xccb5('0xc')]=_0x53ec66[_0xccb5('0xc')]||'';this[_0xccb5('0xd')]=_0xccb5('0xe');this['stateTime']=0x0;this[_0xccb5('0xf')]=_0xccb5('0xe');this['address']='';this[_0xccb5('0x10')]='';this[_0xccb5('0x11')]='';this[_0xccb5('0x12')]='';this[_0xccb5('0x13')]=_0x53ec66['online']||![];this[_0xccb5('0x14')]=_0xccb5('0xe');this['voiceStatusTime']=0x0;this['voiceStatusCallerIdNumber']='';this[_0xccb5('0x15')]='';this[_0xccb5('0x16')]=![];this[_0xccb5('0x17')]=![];this[_0xccb5('0x3')]='';}Agent['prototype']['updateStatusRealtime']=function(_0x587582){var _0x25d219;if(_0x587582&&_0x587582[_0xccb5('0xd')]){_0x25d219=_0x587582[_0xccb5('0xd')][_0xccb5('0x18')]();switch(_0x25d219){case _0xccb5('0x19'):_0x25d219=_0xccb5('0x1a');break;case'inuse':_0x25d219=_0xccb5('0x1b');break;}}if(_0x25d219&&this[_0xccb5('0x14')]!==_0x25d219||_0x587582[_0xccb5('0x1c')]){this['voiceStatusTime']=_[_0xccb5('0x1d')](moment()[_0xccb5('0x1e')]('x'));}if(_0x25d219){this[_0xccb5('0x14')]=_0x25d219;}var _0x5cd521={'id':this['id'],'name':this[_0xccb5('0x9')],'email':this[_0xccb5('0xa')],'accountcode':this[_0xccb5('0xb')],'fullname':this[_0xccb5('0xc')],'state':this[_0xccb5('0xd')],'stateTime':this[_0xccb5('0x1f')],'status':this[_0xccb5('0xf')],'address':this['address'],'online':this[_0xccb5('0x13')],'voiceStatus':this['voiceStatus'],'voiceStatusTime':this[_0xccb5('0x20')],'voiceStatusCallerIdNumber':this['voiceStatusCallerIdNumber'],'voiceStatusQueue':this[_0xccb5('0x15')],'interface':this[_0xccb5('0x12')],'onhold':this[_0xccb5('0x16')]};var _0x1d0374=md5(JSON[_0xccb5('0x21')](_0x5cd521));if(this[_0xccb5('0x3')]!==_0x1d0374){this[_0xccb5('0x3')]=_0x1d0374;io['to'](util[_0xccb5('0x1e')]('user:%s',_0x5cd521[_0xccb5('0x9')]))[_0xccb5('0x22')](_0xccb5('0x23'),_0x5cd521);}};module[_0xccb5('0x24')]=Agent;
\ No newline at end of file
+var _0x7bf4=['local','prototype','updateStatusRealtime','toLowerCase','not_inuse','idle','inuse','talking','statePause','voiceStatusQueue','stringify','format','user:%s','user:save','exports','util','moment','md5','ioredis','../../../config/environment','redis','name','email','accountcode','fullname','state','unknown','stateTime','status','address','phone','mobile','interface','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','onhold'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x7bf4,0xcd));var _0x47bf=function(_0x2a5ae0,_0x22d93d){_0x2a5ae0=_0x2a5ae0-0x0;var _0x3b35c9=_0x7bf4[_0x2a5ae0];return _0x3b35c9;};'use strict';var _=require('lodash');var util=require(_0x47bf('0x0'));var moment=require(_0x47bf('0x1'));var md5=require(_0x47bf('0x2'));var Redis=require(_0x47bf('0x3'));var config=require(_0x47bf('0x4'));config[_0x47bf('0x5')]=_['defaults'](config[_0x47bf('0x5')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x47bf('0x5')]));function Agent(_0x2567a6){this['id']=_0x2567a6['id']||0x0;this[_0x47bf('0x6')]=_0x2567a6[_0x47bf('0x6')]||'';this[_0x47bf('0x7')]=_0x2567a6['email']||'';this[_0x47bf('0x8')]=_0x2567a6[_0x47bf('0x8')]||'';this['fullname']=_0x2567a6[_0x47bf('0x9')]||'';this[_0x47bf('0xa')]=_0x47bf('0xb');this[_0x47bf('0xc')]=0x0;this[_0x47bf('0xd')]=_0x47bf('0xb');this[_0x47bf('0xe')]='';this[_0x47bf('0xf')]='';this[_0x47bf('0x10')]='';this[_0x47bf('0x11')]='';this[_0x47bf('0x12')]=_0x2567a6[_0x47bf('0x12')]||![];this[_0x47bf('0x13')]=_0x47bf('0xb');this[_0x47bf('0x14')]=0x0;this[_0x47bf('0x15')]='';this['voiceStatusQueue']='';this[_0x47bf('0x16')]=![];this[_0x47bf('0x17')]=![];this[_0x47bf('0x2')]='';}Agent[_0x47bf('0x18')][_0x47bf('0x19')]=function(_0xf78eb5){var _0x247a76;if(_0xf78eb5&&_0xf78eb5[_0x47bf('0xa')]){_0x247a76=_0xf78eb5[_0x47bf('0xa')][_0x47bf('0x1a')]();switch(_0x247a76){case _0x47bf('0x1b'):_0x247a76=_0x47bf('0x1c');break;case _0x47bf('0x1d'):_0x247a76=_0x47bf('0x1e');break;}}if(_0x247a76&&this[_0x47bf('0x13')]!==_0x247a76||_0xf78eb5[_0x47bf('0x1f')]){this['voiceStatusTime']=_['toNumber'](moment()['format']('x'));}if(_0x247a76){this['voiceStatus']=_0x247a76;}var _0x4ed04b={'id':this['id'],'name':this[_0x47bf('0x6')],'email':this[_0x47bf('0x7')],'accountcode':this['accountcode'],'fullname':this['fullname'],'state':this['state'],'stateTime':this[_0x47bf('0xc')],'status':this['status'],'address':this['address'],'online':this['online'],'voiceStatus':this[_0x47bf('0x13')],'voiceStatusTime':this[_0x47bf('0x14')],'voiceStatusCallerIdNumber':this[_0x47bf('0x15')],'voiceStatusQueue':this[_0x47bf('0x20')],'interface':this[_0x47bf('0x11')],'onhold':this[_0x47bf('0x16')]};var _0x17a185=md5(JSON[_0x47bf('0x21')](_0x4ed04b));if(this['md5']!==_0x17a185){this['md5']=_0x17a185;io['to'](util[_0x47bf('0x22')](_0x47bf('0x23'),_0x4ed04b[_0x47bf('0x6')]))['emit'](_0x47bf('0x24'),_0x4ed04b);}};module[_0x47bf('0x25')]=Agent;
\ No newline at end of file
diff --git a/server/services/ami/model/campaign.js b/server/services/ami/model/campaign.js
index 48037df..b379cb8 100644
--- a/server/services/ami/model/campaign.js
+++ b/server/services/ami/model/campaign.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4ea3=['campaign','temp','message','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','name','type'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x4ea3,0x70));var _0x34ea=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x4ea3[_0x1ac595];return _0x455fff;};'use strict';function Campaign(_0x26a5bf){this['id']=_0x26a5bf['id']||0x0;this[_0x34ea('0x0')]=_0x26a5bf[_0x34ea('0x0')]||'';this[_0x34ea('0x1')]=_0x26a5bf['type']||_0x34ea('0x2');this['originated']=0x0;this[_0x34ea('0x3')]=0x0;this['ivrAnswerCallsDay']=0x0;this['ivrTotalCallsDays']=0x0;this[_0x34ea('0x4')]='';this[_0x34ea('0x5')]=!![];this[_0x34ea('0x6')]=_0x26a5bf[_0x34ea('0x6')];this[_0x34ea('0x7')]=_0x26a5bf[_0x34ea('0x7')];this[_0x34ea('0x8')]=_0x26a5bf['dialTimezone']||null;this[_0x34ea('0x9')]=_0x26a5bf[_0x34ea('0x9')]?_0x26a5bf[_0x34ea('0x9')]:null;this['dialOriginateCallerIdName']=_0x26a5bf[_0x34ea('0xa')];this[_0x34ea('0xb')]=_0x26a5bf['dialOriginateCallerIdNumber'];this['dialOriginateTimeout']=_0x26a5bf[_0x34ea('0xc')]||0x1e;this[_0x34ea('0xd')]=_0x26a5bf[_0x34ea('0xd')];this['dialCongestionRetryFrequency']=_0x26a5bf[_0x34ea('0xe')];this[_0x34ea('0xf')]=_0x26a5bf[_0x34ea('0xf')];this[_0x34ea('0x10')]=_0x26a5bf[_0x34ea('0x10')];this[_0x34ea('0x11')]=_0x26a5bf[_0x34ea('0x11')];this[_0x34ea('0x12')]=_0x26a5bf[_0x34ea('0x12')];this[_0x34ea('0x13')]=_0x26a5bf[_0x34ea('0x13')];this['dialOrderByScheduledAt']=_0x26a5bf[_0x34ea('0x14')]||_0x34ea('0x15');this[_0x34ea('0x16')]=_0x26a5bf[_0x34ea('0x16')]||undefined;this[_0x34ea('0x17')]=_0x26a5bf['dialRandomLastDigitCallerIdNumber']||undefined;this[_0x34ea('0x18')]=_0x26a5bf[_0x34ea('0x18')]||undefined;this[_0x34ea('0x19')]=_0x26a5bf[_0x34ea('0x19')]?_0x26a5bf['TrunkBackup']:undefined;this[_0x34ea('0x1a')]=_0x26a5bf[_0x34ea('0x1a')]?_0x26a5bf[_0x34ea('0x1a')]:undefined;this['Interval']=_0x26a5bf[_0x34ea('0x1b')]?_0x26a5bf[_0x34ea('0x1b')]:undefined;this[_0x34ea('0x1c')]=_0x26a5bf[_0x34ea('0x1c')]?_0x26a5bf['SquareProject']:undefined;this[_0x34ea('0x1d')]=_0x26a5bf[_0x34ea('0x1c')]?_0x26a5bf[_0x34ea('0x1c')][_0x34ea('0x0')]:undefined;this['dialAMDActive']=_0x26a5bf['dialAMDActive']||![];this[_0x34ea('0x1e')]=_0x26a5bf[_0x34ea('0x1e')];this[_0x34ea('0x1f')]=_0x26a5bf['dialAMDGreeting'];this['dialAMDAfterGreetingSilence']=_0x26a5bf[_0x34ea('0x20')];this[_0x34ea('0x21')]=_0x26a5bf[_0x34ea('0x21')];this[_0x34ea('0x22')]=_0x26a5bf[_0x34ea('0x22')];this[_0x34ea('0x23')]=_0x26a5bf['dialAMDBetweenWordsSilence'];this[_0x34ea('0x24')]=_0x26a5bf[_0x34ea('0x24')];this[_0x34ea('0x25')]=_0x26a5bf[_0x34ea('0x25')];this['dialAMDMaximumWordLength']=_0x26a5bf['dialAMDMaximumWordLength'];}module['exports']=Campaign;
\ No newline at end of file
+var _0x6c76=['dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialOrderByScheduledAt','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','ivrAnswerCallsDay','ivrTotalCallsDays','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber'];(function(_0x1b2b88,_0x14d65b){var _0x11d8c9=function(_0x4fdc20){while(--_0x4fdc20){_0x1b2b88['push'](_0x1b2b88['shift']());}};_0x11d8c9(++_0x14d65b);}(_0x6c76,0x184));var _0x66c7=function(_0x2685c4,_0x113da3){_0x2685c4=_0x2685c4-0x0;var _0x5f414c=_0x6c76[_0x2685c4];return _0x5f414c;};'use strict';function Campaign(_0x4d4f77){this['id']=_0x4d4f77['id']||0x0;this[_0x66c7('0x0')]=_0x4d4f77[_0x66c7('0x0')]||'';this['type']=_0x4d4f77[_0x66c7('0x1')]||_0x66c7('0x2');this['originated']=0x0;this['temp']=0x0;this[_0x66c7('0x3')]=0x0;this[_0x66c7('0x4')]=0x0;this['message']='';this[_0x66c7('0x5')]=!![];this[_0x66c7('0x6')]=_0x4d4f77['active'];this[_0x66c7('0x7')]=_0x4d4f77['limitCalls'];this['dialTimezone']=_0x4d4f77[_0x66c7('0x8')]||null;this[_0x66c7('0x9')]=_0x4d4f77[_0x66c7('0x9')]?_0x4d4f77['dialGlobalInterval']:null;this[_0x66c7('0xa')]=_0x4d4f77[_0x66c7('0xa')];this[_0x66c7('0xb')]=_0x4d4f77[_0x66c7('0xb')];this['dialOriginateTimeout']=_0x4d4f77[_0x66c7('0xc')]||0x1e;this[_0x66c7('0xd')]=_0x4d4f77[_0x66c7('0xd')];this[_0x66c7('0xe')]=_0x4d4f77[_0x66c7('0xe')];this[_0x66c7('0xf')]=_0x4d4f77[_0x66c7('0xf')];this['dialBusyRetryFrequency']=_0x4d4f77[_0x66c7('0x10')];this[_0x66c7('0x11')]=_0x4d4f77[_0x66c7('0x11')];this[_0x66c7('0x12')]=_0x4d4f77[_0x66c7('0x12')];this[_0x66c7('0x13')]=_0x4d4f77[_0x66c7('0x13')];this[_0x66c7('0x14')]=_0x4d4f77[_0x66c7('0x14')]||'DESC';this[_0x66c7('0x15')]=_0x4d4f77['dialPrefix']||undefined;this[_0x66c7('0x16')]=_0x4d4f77[_0x66c7('0x16')]||undefined;this[_0x66c7('0x17')]=_0x4d4f77[_0x66c7('0x17')]||undefined;this[_0x66c7('0x18')]=_0x4d4f77['TrunkBackup']?_0x4d4f77['TrunkBackup']:undefined;this['Trunk']=_0x4d4f77['Trunk']?_0x4d4f77[_0x66c7('0x19')]:undefined;this[_0x66c7('0x1a')]=_0x4d4f77['Interval']?_0x4d4f77['Interval']:undefined;this[_0x66c7('0x1b')]=_0x4d4f77[_0x66c7('0x1b')]?_0x4d4f77[_0x66c7('0x1b')]:undefined;this[_0x66c7('0x1c')]=_0x4d4f77['SquareProject']?_0x4d4f77['SquareProject'][_0x66c7('0x0')]:undefined;this[_0x66c7('0x1d')]=_0x4d4f77[_0x66c7('0x1d')]||![];this[_0x66c7('0x1e')]=_0x4d4f77[_0x66c7('0x1e')];this[_0x66c7('0x1f')]=_0x4d4f77['dialAMDGreeting'];this[_0x66c7('0x20')]=_0x4d4f77[_0x66c7('0x20')];this['dialAMDTotalAnalysisTime']=_0x4d4f77[_0x66c7('0x21')];this[_0x66c7('0x22')]=_0x4d4f77[_0x66c7('0x22')];this[_0x66c7('0x23')]=_0x4d4f77['dialAMDBetweenWordsSilence'];this[_0x66c7('0x24')]=_0x4d4f77[_0x66c7('0x24')];this['dialAMDSilenceThreshold']=_0x4d4f77[_0x66c7('0x25')];this[_0x66c7('0x26')]=_0x4d4f77[_0x66c7('0x26')];}module[_0x66c7('0x27')]=Campaign;
\ No newline at end of file
diff --git a/server/services/ami/model/channel.js b/server/services/ami/model/channel.js
index d4aceed..2de1115 100644
--- a/server/services/ami/model/channel.js
+++ b/server/services/ami/model/channel.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x414f=['context','uniqueid','linkedid','exten','answertime','unmanaged','abandoned','lastapplication','billableseconds','holdtime','type','tag','disposition','monitor','monitorFilename','queue','transferconnectedlinenum','mohtime','exports','starttime','destinationchannel','calleridnum','connectedlinenum','connectedlinename','accountcode'];(function(_0x349d2b,_0x59f15b){var _0x5951d8=function(_0x590fca){while(--_0x590fca){_0x349d2b['push'](_0x349d2b['shift']());}};_0x5951d8(++_0x59f15b);}(_0x414f,0x13f));var _0xf414=function(_0x890db7,_0x4dcf2c){_0x890db7=_0x890db7-0x0;var _0x46412=_0x414f[_0x890db7];return _0x46412;};'use strict';function Channel(){this[_0xf414('0x0')]=null;this['channel']='';this[_0xf414('0x1')]='';this[_0xf414('0x2')]=0x0;this['calleridname']='';this[_0xf414('0x3')]=undefined;this[_0xf414('0x4')]=undefined;this[_0xf414('0x5')]=0x0;this[_0xf414('0x6')]='';this[_0xf414('0x7')]=0x0;this[_0xf414('0x8')]=0x0;this[_0xf414('0x9')]=0x0;this['answered']=![];this[_0xf414('0xa')]=null;this['endtime']=null;this[_0xf414('0xb')]=![];this[_0xf414('0xc')]=![];this[_0xf414('0xd')]='';this['lastdata']='';this['duration']=0x0;this[_0xf414('0xe')]=0x0;this[_0xf414('0xf')]=0x0;this[_0xf414('0x10')]=null;this[_0xf414('0x11')]=null;this[_0xf414('0x12')]=null;this[_0xf414('0x13')]=![];this[_0xf414('0x14')]=null;this[_0xf414('0x15')]=null;this['monitors']=[];this['transfercalleridnum']=undefined;this[_0xf414('0x16')]=undefined;this[_0xf414('0x17')]=0x0;}module[_0xf414('0x18')]=Channel;
\ No newline at end of file
+var _0x905a=['linkedid','exten','answered','answertime','endtime','unmanaged','abandoned','lastapplication','duration','holdtime','disposition','monitor','queue','transferconnectedlinenum','mohtime','starttime','destinationchannel','connectedlinenum','connectedlinename','accountcode','context','uniqueid'];(function(_0x32b52f,_0x5a726d){var _0x3ceef8=function(_0x21c592){while(--_0x21c592){_0x32b52f['push'](_0x32b52f['shift']());}};_0x3ceef8(++_0x5a726d);}(_0x905a,0xeb));var _0xa905=function(_0xed8a38,_0x46b615){_0xed8a38=_0xed8a38-0x0;var _0x498b7e=_0x905a[_0xed8a38];return _0x498b7e;};'use strict';function Channel(){this[_0xa905('0x0')]=null;this['channel']='';this[_0xa905('0x1')]='';this['calleridnum']=0x0;this['calleridname']='';this[_0xa905('0x2')]=undefined;this[_0xa905('0x3')]=undefined;this[_0xa905('0x4')]=0x0;this[_0xa905('0x5')]='';this[_0xa905('0x6')]=0x0;this[_0xa905('0x7')]=0x0;this[_0xa905('0x8')]=0x0;this[_0xa905('0x9')]=![];this[_0xa905('0xa')]=null;this[_0xa905('0xb')]=null;this[_0xa905('0xc')]=![];this[_0xa905('0xd')]=![];this[_0xa905('0xe')]='';this['lastdata']='';this[_0xa905('0xf')]=0x0;this['billableseconds']=0x0;this[_0xa905('0x10')]=0x0;this['type']=null;this['tag']=null;this[_0xa905('0x11')]=null;this[_0xa905('0x12')]=![];this['monitorFilename']=null;this[_0xa905('0x13')]=null;this['monitors']=[];this['transfercalleridnum']=undefined;this[_0xa905('0x14')]=undefined;this[_0xa905('0x15')]=0x0;}module['exports']=Channel;
\ No newline at end of file
diff --git a/server/services/ami/model/deskAccount.js b/server/services/ami/model/deskAccount.js
index 08b2b92..4224817 100644
--- a/server/services/ami/model/deskAccount.js
+++ b/server/services/ami/model/deskAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf8fc=['exports','name','username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret','type','serverUrl','Configurations'];(function(_0x41cc38,_0xe74996){var _0x41f3fa=function(_0x579a3f){while(--_0x579a3f){_0x41cc38['push'](_0x41cc38['shift']());}};_0x41f3fa(++_0xe74996);}(_0xf8fc,0x69));var _0xcf8f=function(_0x556bb1,_0x34830d){_0x556bb1=_0x556bb1-0x0;var _0x45455f=_0xf8fc[_0x556bb1];return _0x45455f;};'use strict';function DeskAccount(_0x29e526){this['id']=_0x29e526['id']||0x0;this[_0xcf8f('0x0')]=_0x29e526['name']||'';this[_0xcf8f('0x1')]=_0x29e526[_0xcf8f('0x1')]||'';this[_0xcf8f('0x2')]=_0x29e526[_0xcf8f('0x2')]||'';this[_0xcf8f('0x3')]=_0x29e526[_0xcf8f('0x3')]||'';this[_0xcf8f('0x4')]=_0x29e526[_0xcf8f('0x4')]||'';this[_0xcf8f('0x5')]=_0x29e526[_0xcf8f('0x5')]||'';this[_0xcf8f('0x6')]=_0x29e526['consumerSecret']||'';this['token']=_0x29e526[_0xcf8f('0x7')]||'';this[_0xcf8f('0x8')]=_0x29e526[_0xcf8f('0x8')]||'';this[_0xcf8f('0x9')]=_0x29e526[_0xcf8f('0x9')]||'';this[_0xcf8f('0xa')]=_0x29e526[_0xcf8f('0xa')]||'';this[_0xcf8f('0xb')]=_0x29e526[_0xcf8f('0xb')]||{};}module[_0xcf8f('0xc')]=DeskAccount;
\ No newline at end of file
+var _0x2fc5=['username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret','type','serverUrl','Configurations','name'];(function(_0x3382e5,_0x4bfaa8){var _0x5efe1a=function(_0x78eb1e){while(--_0x78eb1e){_0x3382e5['push'](_0x3382e5['shift']());}};_0x5efe1a(++_0x4bfaa8);}(_0x2fc5,0x167));var _0x52fc=function(_0xa3fadc,_0xd1e16){_0xa3fadc=_0xa3fadc-0x0;var _0x23ecb8=_0x2fc5[_0xa3fadc];return _0x23ecb8;};'use strict';function DeskAccount(_0x51f9b7){this['id']=_0x51f9b7['id']||0x0;this[_0x52fc('0x0')]=_0x51f9b7[_0x52fc('0x0')]||'';this[_0x52fc('0x1')]=_0x51f9b7[_0x52fc('0x1')]||'';this[_0x52fc('0x2')]=_0x51f9b7['remoteUri']||'';this[_0x52fc('0x3')]=_0x51f9b7[_0x52fc('0x3')]||'';this['password']=_0x51f9b7[_0x52fc('0x4')]||'';this[_0x52fc('0x5')]=_0x51f9b7[_0x52fc('0x5')]||'';this['consumerSecret']=_0x51f9b7[_0x52fc('0x6')]||'';this[_0x52fc('0x7')]=_0x51f9b7['token']||'';this[_0x52fc('0x8')]=_0x51f9b7[_0x52fc('0x8')]||'';this[_0x52fc('0x9')]=_0x51f9b7[_0x52fc('0x9')]||'';this[_0x52fc('0xa')]=_0x51f9b7[_0x52fc('0xa')]||'';this['Configurations']=_0x51f9b7[_0x52fc('0xb')]||{};}module['exports']=DeskAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/dynamics365Account.js b/server/services/ami/model/dynamics365Account.js
index bb16e24..181c62f 100644
--- a/server/services/ami/model/dynamics365Account.js
+++ b/server/services/ami/model/dynamics365Account.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xda17=['password','remoteUri','tenantId','clientId','clientSecret','serverUrl','Configurations','exports','name','username'];(function(_0x7e2eb0,_0x17cd58){var _0xd92de4=function(_0x5d005b){while(--_0x5d005b){_0x7e2eb0['push'](_0x7e2eb0['shift']());}};_0xd92de4(++_0x17cd58);}(_0xda17,0x1de));var _0x7da1=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0xda17[_0x1035c1];return _0x308d67;};'use strict';function Dynamics365Account(_0x1ef334){this['id']=_0x1ef334['id']||0x0;this[_0x7da1('0x0')]=_0x1ef334['name']||'';this[_0x7da1('0x1')]=_0x1ef334['username']||'';this[_0x7da1('0x2')]=_0x1ef334['password']||'';this['remoteUri']=_0x1ef334[_0x7da1('0x3')]||'';this[_0x7da1('0x4')]=_0x1ef334['tenantId']||'';this[_0x7da1('0x5')]=_0x1ef334[_0x7da1('0x5')]||'';this[_0x7da1('0x6')]=_0x1ef334[_0x7da1('0x6')]||{};this[_0x7da1('0x7')]=_0x1ef334[_0x7da1('0x7')]||'';this['Configurations']=_0x1ef334[_0x7da1('0x8')]||{};}module[_0x7da1('0x9')]=Dynamics365Account;
\ No newline at end of file
+var _0x02e3=['serverUrl','exports','name','username','password','remoteUri','tenantId','clientSecret'];(function(_0x5a2b2b,_0x3c4351){var _0x3e875c=function(_0x5ba22f){while(--_0x5ba22f){_0x5a2b2b['push'](_0x5a2b2b['shift']());}};_0x3e875c(++_0x3c4351);}(_0x02e3,0x7a));var _0x302e=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x02e3[_0x321bb2];return _0x9c12ed;};'use strict';function Dynamics365Account(_0x34c77d){this['id']=_0x34c77d['id']||0x0;this[_0x302e('0x0')]=_0x34c77d[_0x302e('0x0')]||'';this[_0x302e('0x1')]=_0x34c77d[_0x302e('0x1')]||'';this[_0x302e('0x2')]=_0x34c77d[_0x302e('0x2')]||'';this[_0x302e('0x3')]=_0x34c77d[_0x302e('0x3')]||'';this[_0x302e('0x4')]=_0x34c77d['tenantId']||'';this['clientId']=_0x34c77d['clientId']||'';this[_0x302e('0x5')]=_0x34c77d[_0x302e('0x5')]||{};this[_0x302e('0x6')]=_0x34c77d[_0x302e('0x6')]||'';this['Configurations']=_0x34c77d['Configurations']||{};}module[_0x302e('0x7')]=Dynamics365Account;
\ No newline at end of file
diff --git a/server/services/ami/model/faxAccount.js b/server/services/ami/model/faxAccount.js
index c485e19..a738cdc 100644
--- a/server/services/ami/model/faxAccount.js
+++ b/server/services/ami/model/faxAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcea2=['t38timeout','tech','SIP','Trunk','ListId','key','name','description','ecm','headerinfo','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect'];(function(_0xffa099,_0xd933e4){var _0x236970=function(_0x371741){while(--_0x371741){_0xffa099['push'](_0xffa099['shift']());}};_0x236970(++_0xd933e4);}(_0xcea2,0x15a));var _0x2cea=function(_0x4b7895,_0x3c4f5d){_0x4b7895=_0x4b7895-0x0;var _0x264180=_0xcea2[_0x4b7895];return _0x264180;};'use strict';function FaxAccount(_0x205edd){this['id']=_0x205edd['id']||0x0;this['name']=_0x205edd[_0x2cea('0x0')]||'';this['description']=_0x205edd[_0x2cea('0x1')];this[_0x2cea('0x2')]=_0x205edd[_0x2cea('0x2')];this['headerinfo']=_0x205edd[_0x2cea('0x3')];this[_0x2cea('0x4')]=_0x205edd[_0x2cea('0x4')];this['minrate']=_0x205edd[_0x2cea('0x5')]||0x960;this['maxrate']=_0x205edd[_0x2cea('0x6')]||0x3840;this[_0x2cea('0x7')]=_0x205edd[_0x2cea('0x7')]||_0x2cea('0x8');this[_0x2cea('0x9')]=_0x205edd[_0x2cea('0x9')]||'no';this['faxdetect']=_0x205edd[_0x2cea('0xa')]||'no';this[_0x2cea('0xb')]=_0x205edd[_0x2cea('0xb')]||0x1388;this[_0x2cea('0xc')]=_0x205edd[_0x2cea('0xc')]||_0x2cea('0xd');this[_0x2cea('0xe')]=_0x205edd[_0x2cea('0xe')]?_0x205edd['Trunk']:undefined;this['ListId']=_0x205edd[_0x2cea('0xf')];this[_0x2cea('0x10')]=_0x205edd['key'];}module['exports']=FaxAccount;
\ No newline at end of file
+var _0xf109=['headerinfo','localstationid','minrate','maxrate','modem','gateway','faxdetect','t38timeout','tech','SIP','Trunk','ListId','key','exports','name','ecm'];(function(_0x2b91c5,_0x3b6db5){var _0xbd5531=function(_0x54783d){while(--_0x54783d){_0x2b91c5['push'](_0x2b91c5['shift']());}};_0xbd5531(++_0x3b6db5);}(_0xf109,0xce));var _0x9f10=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xf109[_0x42cae2];return _0x5f256f;};'use strict';function FaxAccount(_0x4debcd){this['id']=_0x4debcd['id']||0x0;this[_0x9f10('0x0')]=_0x4debcd[_0x9f10('0x0')]||'';this['description']=_0x4debcd['description'];this['ecm']=_0x4debcd[_0x9f10('0x1')];this[_0x9f10('0x2')]=_0x4debcd[_0x9f10('0x2')];this[_0x9f10('0x3')]=_0x4debcd[_0x9f10('0x3')];this[_0x9f10('0x4')]=_0x4debcd[_0x9f10('0x4')]||0x960;this[_0x9f10('0x5')]=_0x4debcd[_0x9f10('0x5')]||0x3840;this[_0x9f10('0x6')]=_0x4debcd[_0x9f10('0x6')]||'v17,v27,v29';this[_0x9f10('0x7')]=_0x4debcd[_0x9f10('0x7')]||'no';this[_0x9f10('0x8')]=_0x4debcd[_0x9f10('0x8')]||'no';this[_0x9f10('0x9')]=_0x4debcd['t38timeout']||0x1388;this[_0x9f10('0xa')]=_0x4debcd[_0x9f10('0xa')]||_0x9f10('0xb');this['Trunk']=_0x4debcd['Trunk']?_0x4debcd[_0x9f10('0xc')]:undefined;this[_0x9f10('0xd')]=_0x4debcd[_0x9f10('0xd')];this['key']=_0x4debcd[_0x9f10('0xe')];}module[_0x9f10('0xf')]=FaxAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/freshdeskAccount.js b/server/services/ami/model/freshdeskAccount.js
index 4ba2229..d306d9d 100644
--- a/server/services/ami/model/freshdeskAccount.js
+++ b/server/services/ami/model/freshdeskAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf9f7=['name','username','apiKey','remoteUri','serverUrl','Configurations','exports'];(function(_0x157a8a,_0x34d072){var _0x5bf33f=function(_0x4fc182){while(--_0x4fc182){_0x157a8a['push'](_0x157a8a['shift']());}};_0x5bf33f(++_0x34d072);}(_0xf9f7,0xd9));var _0x7f9f=function(_0xfbdbd1,_0x2dc9d9){_0xfbdbd1=_0xfbdbd1-0x0;var _0x3e55b7=_0xf9f7[_0xfbdbd1];return _0x3e55b7;};'use strict';function FreshdeskAccount(_0x289664){this['id']=_0x289664['id']||0x0;this[_0x7f9f('0x0')]=_0x289664['name']||'';this[_0x7f9f('0x1')]=_0x289664[_0x7f9f('0x1')]||'';this[_0x7f9f('0x2')]=_0x289664['token']||'';this[_0x7f9f('0x3')]=_0x289664[_0x7f9f('0x3')]||'';this[_0x7f9f('0x4')]=_0x289664[_0x7f9f('0x4')]||'';this[_0x7f9f('0x5')]=_0x289664[_0x7f9f('0x5')]||{};}module[_0x7f9f('0x6')]=FreshdeskAccount;
\ No newline at end of file
+var _0xc2f9=['name','apiKey','serverUrl','Configurations','exports'];(function(_0x5a3cf0,_0x160a68){var _0x5a64ee=function(_0x34cd1d){while(--_0x34cd1d){_0x5a3cf0['push'](_0x5a3cf0['shift']());}};_0x5a64ee(++_0x160a68);}(_0xc2f9,0x145));var _0x9c2f=function(_0x49ef52,_0x232641){_0x49ef52=_0x49ef52-0x0;var _0x6e0399=_0xc2f9[_0x49ef52];return _0x6e0399;};'use strict';function FreshdeskAccount(_0x4eb4ea){this['id']=_0x4eb4ea['id']||0x0;this['name']=_0x4eb4ea[_0x9c2f('0x0')]||'';this['username']=_0x4eb4ea['username']||'';this[_0x9c2f('0x1')]=_0x4eb4ea['token']||'';this['remoteUri']=_0x4eb4ea['remoteUri']||'';this[_0x9c2f('0x2')]=_0x4eb4ea[_0x9c2f('0x2')]||'';this[_0x9c2f('0x3')]=_0x4eb4ea['Configurations']||{};}module[_0x9c2f('0x4')]=FreshdeskAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/queueReport.js b/server/services/ami/model/queueReport.js
index 3882f61..71bc25a 100644
--- a/server/services/ami/model/queueReport.js
+++ b/server/services/ami/model/queueReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x19b4=['variables','exports','type','uniqueid','calleridnum','queue','queuecallerleaveAt','position','queuecallerabandon','queuecallerabandonAt','queuecallercomplete','queuecallerexit','originalposition','connectedlinenum','connectedlinename','accountcode','context','exten','priority','assigned'];(function(_0x2f70d3,_0x2c9011){var _0x3bb541=function(_0x1d6738){while(--_0x1d6738){_0x2f70d3['push'](_0x2f70d3['shift']());}};_0x3bb541(++_0x2c9011);}(_0x19b4,0xa2));var _0x419b=function(_0x18f2c5,_0x5452ec){_0x18f2c5=_0x18f2c5-0x0;var _0x2a321d=_0x19b4[_0x18f2c5];return _0x2a321d;};'use strict';function QueueReport(){this[_0x419b('0x0')]='inbound';this[_0x419b('0x1')]='';this[_0x419b('0x2')]='';this['calleridname']='';this[_0x419b('0x3')]='';this['queuecallerjoinAt']=null;this[_0x419b('0x4')]=null;this[_0x419b('0x5')]=0x1;this['count']=0x1;this[_0x419b('0x6')]=![];this[_0x419b('0x7')]=null;this[_0x419b('0x8')]=![];this['queuecallercompleteAt']=null;this[_0x419b('0x9')]=![];this['queuecallerexitAt']=null;this[_0x419b('0xa')]=0x1;this['channel']='';this[_0x419b('0xb')]='';this[_0x419b('0xc')]='';this[_0x419b('0xd')]='';this[_0x419b('0xe')]='';this[_0x419b('0xf')]='';this[_0x419b('0x10')]='';this['holdtime']=0x0;this[_0x419b('0x11')]=![];this['lastAssignedTo']='';this['mohtime']=0x0;this[_0x419b('0x12')]={};}module[_0x419b('0x13')]=QueueReport;
\ No newline at end of file
+var _0x3790=['queuecallerleaveAt','position','queuecallerabandon','queuecallercomplete','queuecallercompleteAt','queuecallerexitAt','originalposition','channel','connectedlinename','accountcode','context','priority','holdtime','lastAssignedTo','variables','exports','inbound','uniqueid','calleridnum','calleridname','queuecallerjoinAt'];(function(_0x16719d,_0x14b344){var _0x211e99=function(_0x3de301){while(--_0x3de301){_0x16719d['push'](_0x16719d['shift']());}};_0x211e99(++_0x14b344);}(_0x3790,0xa3));var _0x0379=function(_0x1e14c4,_0x15378b){_0x1e14c4=_0x1e14c4-0x0;var _0x52e33b=_0x3790[_0x1e14c4];return _0x52e33b;};'use strict';function QueueReport(){this['type']=_0x0379('0x0');this[_0x0379('0x1')]='';this[_0x0379('0x2')]='';this[_0x0379('0x3')]='';this['queue']='';this[_0x0379('0x4')]=null;this[_0x0379('0x5')]=null;this[_0x0379('0x6')]=0x1;this['count']=0x1;this[_0x0379('0x7')]=![];this['queuecallerabandonAt']=null;this[_0x0379('0x8')]=![];this[_0x0379('0x9')]=null;this['queuecallerexit']=![];this[_0x0379('0xa')]=null;this[_0x0379('0xb')]=0x1;this[_0x0379('0xc')]='';this['connectedlinenum']='';this[_0x0379('0xd')]='';this[_0x0379('0xe')]='';this[_0x0379('0xf')]='';this['exten']='';this[_0x0379('0x10')]='';this[_0x0379('0x11')]=0x0;this['assigned']=![];this[_0x0379('0x12')]='';this['mohtime']=0x0;this[_0x0379('0x13')]={};}module[_0x0379('0x14')]=QueueReport;
\ No newline at end of file
diff --git a/server/services/ami/model/salesforceAccount.js b/server/services/ami/model/salesforceAccount.js
index ba62d83..0f3dee3 100644
--- a/server/services/ami/model/salesforceAccount.js
+++ b/server/services/ami/model/salesforceAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x56b0=['integrationTab','serverUrl','Configurations','exports','name','username','remoteUri','password','clientId','clientSecret','securityToken','type'];(function(_0x19c5f2,_0x44ed13){var _0xb94caf=function(_0x1b3522){while(--_0x1b3522){_0x19c5f2['push'](_0x19c5f2['shift']());}};_0xb94caf(++_0x44ed13);}(_0x56b0,0x1f0));var _0x056b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x56b0[_0x3dd15e];return _0x231fd0;};'use strict';function SalesforceAccount(_0x1e446c){this['id']=_0x1e446c['id']||0x0;this['name']=_0x1e446c[_0x056b('0x0')]||'';this['username']=_0x1e446c[_0x056b('0x1')]||'';this[_0x056b('0x2')]=_0x1e446c[_0x056b('0x2')]||'';this[_0x056b('0x3')]=_0x1e446c['password']||'';this[_0x056b('0x4')]=_0x1e446c[_0x056b('0x4')]||'';this[_0x056b('0x5')]=_0x1e446c[_0x056b('0x5')]||'';this[_0x056b('0x6')]=_0x1e446c[_0x056b('0x6')]||'';this[_0x056b('0x7')]=_0x1e446c[_0x056b('0x7')]||_0x056b('0x8');this[_0x056b('0x9')]=_0x1e446c['serverUrl']||'';this[_0x056b('0xa')]=_0x1e446c[_0x056b('0xa')]||{};}module[_0x056b('0xb')]=SalesforceAccount;
\ No newline at end of file
+var _0xf292=['clientSecret','securityToken','type','integrationTab','serverUrl','Configurations','name','username','remoteUri','password','clientId'];(function(_0x588346,_0x54e1a4){var _0x43f4fb=function(_0x4ab7bd){while(--_0x4ab7bd){_0x588346['push'](_0x588346['shift']());}};_0x43f4fb(++_0x54e1a4);}(_0xf292,0x150));var _0x2f29=function(_0x556927,_0x34b53f){_0x556927=_0x556927-0x0;var _0x5f1235=_0xf292[_0x556927];return _0x5f1235;};'use strict';function SalesforceAccount(_0x1ac639){this['id']=_0x1ac639['id']||0x0;this[_0x2f29('0x0')]=_0x1ac639[_0x2f29('0x0')]||'';this[_0x2f29('0x1')]=_0x1ac639[_0x2f29('0x1')]||'';this[_0x2f29('0x2')]=_0x1ac639[_0x2f29('0x2')]||'';this[_0x2f29('0x3')]=_0x1ac639[_0x2f29('0x3')]||'';this[_0x2f29('0x4')]=_0x1ac639[_0x2f29('0x4')]||'';this[_0x2f29('0x5')]=_0x1ac639[_0x2f29('0x5')]||'';this['securityToken']=_0x1ac639[_0x2f29('0x6')]||'';this[_0x2f29('0x7')]=_0x1ac639[_0x2f29('0x7')]||_0x2f29('0x8');this[_0x2f29('0x9')]=_0x1ac639[_0x2f29('0x9')]||'';this[_0x2f29('0xa')]=_0x1ac639[_0x2f29('0xa')]||{};}module['exports']=SalesforceAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/servicenowAccount.js b/server/services/ami/model/servicenowAccount.js
index ba5e9dc..6e5aa50 100644
--- a/server/services/ami/model/servicenowAccount.js
+++ b/server/services/ami/model/servicenowAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdf27=['name','username','password','remoteUri','serverUrl','Configurations','exports'];(function(_0xc2a91a,_0x1c7b57){var _0x2fe58f=function(_0x5c6dac){while(--_0x5c6dac){_0xc2a91a['push'](_0xc2a91a['shift']());}};_0x2fe58f(++_0x1c7b57);}(_0xdf27,0x181));var _0x7df2=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xdf27[_0x2dafbe];return _0x58a45a;};'use strict';function ServicenowAccount(_0x145e0a){this['id']=_0x145e0a['id']||0x0;this[_0x7df2('0x0')]=_0x145e0a['name']||'';this[_0x7df2('0x1')]=_0x145e0a['username']||'';this['password']=_0x145e0a[_0x7df2('0x2')]||'';this[_0x7df2('0x3')]=_0x145e0a['remoteUri']||'';this[_0x7df2('0x4')]=_0x145e0a['serverUrl']||'';this[_0x7df2('0x5')]=_0x145e0a[_0x7df2('0x5')]||{};}module[_0x7df2('0x6')]=ServicenowAccount;
\ No newline at end of file
+var _0x9f4d=['name','username','password','remoteUri','serverUrl','Configurations','exports'];(function(_0x430fc3,_0x3f688d){var _0xdfb2d3=function(_0x4b1a43){while(--_0x4b1a43){_0x430fc3['push'](_0x430fc3['shift']());}};_0xdfb2d3(++_0x3f688d);}(_0x9f4d,0xc4));var _0xd9f4=function(_0xac0d3,_0x3d1441){_0xac0d3=_0xac0d3-0x0;var _0x277107=_0x9f4d[_0xac0d3];return _0x277107;};'use strict';function ServicenowAccount(_0x1cca1c){this['id']=_0x1cca1c['id']||0x0;this[_0xd9f4('0x0')]=_0x1cca1c[_0xd9f4('0x0')]||'';this[_0xd9f4('0x1')]=_0x1cca1c['username']||'';this[_0xd9f4('0x2')]=_0x1cca1c[_0xd9f4('0x2')]||'';this[_0xd9f4('0x3')]=_0x1cca1c[_0xd9f4('0x3')]||'';this[_0xd9f4('0x4')]=_0x1cca1c['serverUrl']||'';this[_0xd9f4('0x5')]=_0x1cca1c[_0xd9f4('0x5')]||{};}module[_0xd9f4('0x6')]=ServicenowAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/sugarcrmAccount.js b/server/services/ami/model/sugarcrmAccount.js
index 511bfb2..a30a742 100644
--- a/server/services/ami/model/sugarcrmAccount.js
+++ b/server/services/ami/model/sugarcrmAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaaae=['exports','name','username','password','remoteUri','serverUrl','Configurations'];(function(_0x17155c,_0x285cd2){var _0x2ba192=function(_0x189ee3){while(--_0x189ee3){_0x17155c['push'](_0x17155c['shift']());}};_0x2ba192(++_0x285cd2);}(_0xaaae,0xd3));var _0xeaaa=function(_0x5ec3e2,_0x353747){_0x5ec3e2=_0x5ec3e2-0x0;var _0x3b772e=_0xaaae[_0x5ec3e2];return _0x3b772e;};'use strict';function SugarcrmAccount(_0x4c14f0){this['id']=_0x4c14f0['id']||0x0;this[_0xeaaa('0x0')]=_0x4c14f0[_0xeaaa('0x0')]||'';this[_0xeaaa('0x1')]=_0x4c14f0[_0xeaaa('0x1')]||'';this[_0xeaaa('0x2')]=_0x4c14f0['password']||'';this['remoteUri']=_0x4c14f0[_0xeaaa('0x3')]||'';this[_0xeaaa('0x4')]=_0x4c14f0[_0xeaaa('0x4')]||'';this[_0xeaaa('0x5')]=_0x4c14f0[_0xeaaa('0x5')]||{};}module[_0xeaaa('0x6')]=SugarcrmAccount;
\ No newline at end of file
+var _0xbb49=['password','serverUrl','Configurations','exports','name','username'];(function(_0x31e584,_0x4d9f7f){var _0x5686d0=function(_0x1f9e99){while(--_0x1f9e99){_0x31e584['push'](_0x31e584['shift']());}};_0x5686d0(++_0x4d9f7f);}(_0xbb49,0x148));var _0x9bb4=function(_0x4dafab,_0x20f927){_0x4dafab=_0x4dafab-0x0;var _0x4969af=_0xbb49[_0x4dafab];return _0x4969af;};'use strict';function SugarcrmAccount(_0x37e3c7){this['id']=_0x37e3c7['id']||0x0;this[_0x9bb4('0x0')]=_0x37e3c7[_0x9bb4('0x0')]||'';this[_0x9bb4('0x1')]=_0x37e3c7[_0x9bb4('0x1')]||'';this[_0x9bb4('0x2')]=_0x37e3c7[_0x9bb4('0x2')]||'';this['remoteUri']=_0x37e3c7['remoteUri']||'';this['serverUrl']=_0x37e3c7[_0x9bb4('0x3')]||'';this[_0x9bb4('0x4')]=_0x37e3c7['Configurations']||{};}module[_0x9bb4('0x5')]=SugarcrmAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/telephone.js b/server/services/ami/model/telephone.js
index f117339..09918b0 100644
--- a/server/services/ami/model/telephone.js
+++ b/server/services/ami/model/telephone.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdd92=['name','accountcode','state','status','unknown','address'];(function(_0x462ed1,_0x18b3a7){var _0x3337e1=function(_0x3d13ad){while(--_0x3d13ad){_0x462ed1['push'](_0x462ed1['shift']());}};_0x3337e1(++_0x18b3a7);}(_0xdd92,0x66));var _0x2dd9=function(_0x1928c9,_0x13a6d1){_0x1928c9=_0x1928c9-0x0;var _0x51b5fb=_0xdd92[_0x1928c9];return _0x51b5fb;};'use strict';function Telephone(_0x109a1a){this['id']=_0x109a1a['id']||0x0;this[_0x2dd9('0x0')]=_0x109a1a[_0x2dd9('0x0')]||'';this[_0x2dd9('0x1')]=_0x109a1a[_0x2dd9('0x1')]||'';this[_0x2dd9('0x2')]='unknown';this['stateTime']=0x0;this[_0x2dd9('0x3')]=_0x2dd9('0x4');this[_0x2dd9('0x5')]='';}module['exports']=Telephone;
\ No newline at end of file
+var _0xcd05=['accountcode','state','stateTime','status','address','name'];(function(_0x3159c0,_0x592776){var _0x12411f=function(_0x3b7d17){while(--_0x3b7d17){_0x3159c0['push'](_0x3159c0['shift']());}};_0x12411f(++_0x592776);}(_0xcd05,0xe9));var _0x5cd0=function(_0x9edfd5,_0x286486){_0x9edfd5=_0x9edfd5-0x0;var _0x330738=_0xcd05[_0x9edfd5];return _0x330738;};'use strict';function Telephone(_0x5026a1){this['id']=_0x5026a1['id']||0x0;this[_0x5cd0('0x0')]=_0x5026a1[_0x5cd0('0x0')]||'';this[_0x5cd0('0x1')]=_0x5026a1['accountcode']||'';this[_0x5cd0('0x2')]='unknown';this[_0x5cd0('0x3')]=0x0;this[_0x5cd0('0x4')]='unknown';this[_0x5cd0('0x5')]='';}module['exports']=Telephone;
\ No newline at end of file
diff --git a/server/services/ami/model/template.js b/server/services/ami/model/template.js
index ef3a582..3de899e 100644
--- a/server/services/ami/model/template.js
+++ b/server/services/ami/model/template.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb332=['exports','name','html'];(function(_0x7a0ec2,_0xa75285){var _0xb23bde=function(_0x51f6cd){while(--_0x51f6cd){_0x7a0ec2['push'](_0x7a0ec2['shift']());}};_0xb23bde(++_0xa75285);}(_0xb332,0xd9));var _0x2b33=function(_0x1a0600,_0x41feef){_0x1a0600=_0x1a0600-0x0;var _0x734670=_0xb332[_0x1a0600];return _0x734670;};'use strict';function template(_0x5c61f0){this['id']=_0x5c61f0['id']||0x0;this['name']=_0x5c61f0[_0x2b33('0x0')]||'';this[_0x2b33('0x1')]=_0x5c61f0['html']||'';}module[_0x2b33('0x2')]=template;
\ No newline at end of file
+var _0x4c4e=['name','html'];(function(_0x1668c4,_0xf8c4b2){var _0x5d09fb=function(_0x1054c9){while(--_0x1054c9){_0x1668c4['push'](_0x1668c4['shift']());}};_0x5d09fb(++_0xf8c4b2);}(_0x4c4e,0x152));var _0xe4c4=function(_0x38aa36,_0xe5ed0a){_0x38aa36=_0x38aa36-0x0;var _0x119150=_0x4c4e[_0x38aa36];return _0x119150;};'use strict';function template(_0x55f220){this['id']=_0x55f220['id']||0x0;this['name']=_0x55f220[_0xe4c4('0x0')]||'';this[_0xe4c4('0x1')]=_0x55f220[_0xe4c4('0x1')]||'';}module['exports']=template;
\ No newline at end of file
diff --git a/server/services/ami/model/trigger.js b/server/services/ami/model/trigger.js
index 8e786a9..5da194c 100644
--- a/server/services/ami/model/trigger.js
+++ b/server/services/ami/model/trigger.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x72ae=['name','channel','status','AllConditions','AnyConditions','Actions','exports'];(function(_0x14f277,_0x37c53a){var _0x1aa5fc=function(_0x1f36ad){while(--_0x1f36ad){_0x14f277['push'](_0x14f277['shift']());}};_0x1aa5fc(++_0x37c53a);}(_0x72ae,0x10a));var _0xe72a=function(_0x4f1791,_0x55678b){_0x4f1791=_0x4f1791-0x0;var _0x13ed11=_0x72ae[_0x4f1791];return _0x13ed11;};'use strict';function Trigger(_0x4cb1ca){this['id']=_0x4cb1ca['id']||0x0;this[_0xe72a('0x0')]=_0x4cb1ca[_0xe72a('0x0')]||'';this[_0xe72a('0x1')]=_0x4cb1ca['channel']||'voice';this[_0xe72a('0x2')]=_0x4cb1ca[_0xe72a('0x2')]||![];this[_0xe72a('0x3')]=_0x4cb1ca[_0xe72a('0x3')]||[];this[_0xe72a('0x4')]=_0x4cb1ca[_0xe72a('0x4')]||[];this[_0xe72a('0x5')]=_0x4cb1ca[_0xe72a('0x5')]||[];}module[_0xe72a('0x6')]=Trigger;
\ No newline at end of file
+var _0x82bd=['voice','status','AllConditions','AnyConditions','Actions','name','channel'];(function(_0x262f42,_0x4a6ca0){var _0x2b0712=function(_0x406fb8){while(--_0x406fb8){_0x262f42['push'](_0x262f42['shift']());}};_0x2b0712(++_0x4a6ca0);}(_0x82bd,0x1d3));var _0xd82b=function(_0x1895b7,_0x21fbc7){_0x1895b7=_0x1895b7-0x0;var _0x1aecdc=_0x82bd[_0x1895b7];return _0x1aecdc;};'use strict';function Trigger(_0x1aae7c){this['id']=_0x1aae7c['id']||0x0;this[_0xd82b('0x0')]=_0x1aae7c[_0xd82b('0x0')]||'';this[_0xd82b('0x1')]=_0x1aae7c['channel']||_0xd82b('0x2');this[_0xd82b('0x3')]=_0x1aae7c['status']||![];this['AllConditions']=_0x1aae7c[_0xd82b('0x4')]||[];this[_0xd82b('0x5')]=_0x1aae7c[_0xd82b('0x5')]||[];this[_0xd82b('0x6')]=_0x1aae7c['Actions']||[];}module['exports']=Trigger;
\ No newline at end of file
diff --git a/server/services/ami/model/trunk.js b/server/services/ami/model/trunk.js
index 071c94f..d6f1a4f 100644
--- a/server/services/ami/model/trunk.js
+++ b/server/services/ami/model/trunk.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa359=['address','exports','active','name','state','unknown','stateTime','status','registry','indexOf','split','host','port','domain','domainport','refresh','stateRegistry'];(function(_0x5bb7f0,_0x823d20){var _0x502458=function(_0x19f27e){while(--_0x19f27e){_0x5bb7f0['push'](_0x5bb7f0['shift']());}};_0x502458(++_0x823d20);}(_0xa359,0xce));var _0x9a35=function(_0x233835,_0x5ee406){_0x233835=_0x233835-0x0;var _0x2dc287=_0xa359[_0x233835];return _0x2dc287;};'use strict';function Trunk(_0x1e359e){this['id']=_0x1e359e['id']||0x0;this[_0x9a35('0x0')]=_0x1e359e['active']||![];this[_0x9a35('0x1')]=_0x1e359e[_0x9a35('0x1')]||'';this[_0x9a35('0x2')]=_0x9a35('0x3');this[_0x9a35('0x4')]=0x0;this[_0x9a35('0x5')]=_0x9a35('0x3');this[_0x9a35('0x6')]=_0x1e359e[_0x9a35('0x6')]&&_0x1e359e['registry'][_0x9a35('0x7')](':')?_0x1e359e['registry'][_0x9a35('0x8')](':')[0x0]:'';this[_0x9a35('0x9')]='';this[_0x9a35('0xa')]='';this[_0x9a35('0xb')]='';this[_0x9a35('0xc')]='';this[_0x9a35('0xd')]='';this[_0x9a35('0xe')]=_0x9a35('0x3');this['registrationtime']='';this[_0x9a35('0xf')]='';}module[_0x9a35('0x10')]=Trunk;
\ No newline at end of file
+var _0x9534=['name','state','stateTime','status','registry','indexOf','split','host','port','domainport','stateRegistry','unknown','registrationtime','address','exports','active'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x9534,0x17f));var _0x4953=function(_0x2e80b3,_0x6b2568){_0x2e80b3=_0x2e80b3-0x0;var _0x3d19a4=_0x9534[_0x2e80b3];return _0x3d19a4;};'use strict';function Trunk(_0x2f8a17){this['id']=_0x2f8a17['id']||0x0;this[_0x4953('0x0')]=_0x2f8a17[_0x4953('0x0')]||![];this[_0x4953('0x1')]=_0x2f8a17['name']||'';this[_0x4953('0x2')]='unknown';this[_0x4953('0x3')]=0x0;this[_0x4953('0x4')]='unknown';this[_0x4953('0x5')]=_0x2f8a17['registry']&&_0x2f8a17[_0x4953('0x5')][_0x4953('0x6')](':')?_0x2f8a17['registry'][_0x4953('0x7')](':')[0x0]:'';this[_0x4953('0x8')]='';this[_0x4953('0x9')]='';this['domain']='';this[_0x4953('0xa')]='';this['refresh']='';this[_0x4953('0xb')]=_0x4953('0xc');this[_0x4953('0xd')]='';this[_0x4953('0xe')]='';}module[_0x4953('0xf')]=Trunk;
\ No newline at end of file
diff --git a/server/services/ami/model/voiceExtension.js b/server/services/ami/model/voiceExtension.js
index 0f409a5..d14acd2 100644
--- a/server/services/ami/model/voiceExtension.js
+++ b/server/services/ami/model/voiceExtension.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2a6b=['recordingFormat','none','mandatoryDisposition','exten'];(function(_0x32f7d7,_0x54231b){var _0x133d09=function(_0x41a7ab){while(--_0x41a7ab){_0x32f7d7['push'](_0x32f7d7['shift']());}};_0x133d09(++_0x54231b);}(_0x2a6b,0x1af));var _0xb2a6=function(_0xfa9c7b,_0x183c75){_0xfa9c7b=_0xfa9c7b-0x0;var _0x1069a6=_0x2a6b[_0xfa9c7b];return _0x1069a6;};'use strict';function voiceExtension(_0x5adb3d){this['id']=_0x5adb3d['id']||0x0;this['exten']=_0x5adb3d[_0xb2a6('0x0')]||'';this[_0xb2a6('0x1')]=_0x5adb3d[_0xb2a6('0x1')]||_0xb2a6('0x2');this[_0xb2a6('0x3')]=_0x5adb3d['mandatoryDisposition']||![];}module['exports']=voiceExtension;
\ No newline at end of file
+var _0x32af=['exten','recordingFormat','none','mandatoryDisposition','exports'];(function(_0x2bb66c,_0x36c6c6){var _0x1e0f98=function(_0x1e3412){while(--_0x1e3412){_0x2bb66c['push'](_0x2bb66c['shift']());}};_0x1e0f98(++_0x36c6c6);}(_0x32af,0xd2));var _0xf32a=function(_0x329ca3,_0x531613){_0x329ca3=_0x329ca3-0x0;var _0x183333=_0x32af[_0x329ca3];return _0x183333;};'use strict';function voiceExtension(_0x57da1f){this['id']=_0x57da1f['id']||0x0;this[_0xf32a('0x0')]=_0x57da1f[_0xf32a('0x0')]||'';this[_0xf32a('0x1')]=_0x57da1f['recordingFormat']||_0xf32a('0x2');this['mandatoryDisposition']=_0x57da1f[_0xf32a('0x3')]||![];}module[_0xf32a('0x4')]=voiceExtension;
\ No newline at end of file
diff --git a/server/services/ami/model/voiceQueue.js b/server/services/ami/model/voiceQueue.js
index 64a6484..c8a0880 100644
--- a/server/services/ami/model/voiceQueue.js
+++ b/server/services/ami/model/voiceQueue.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x58e8=['dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCallToSecond','erlangBusyFactor','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','unknown','not_inuse','inuse','busy','unavailable','ringing','ringinuse','onhold','wav49','gsm','rrmemory','roundrobin','name','monitor_format','type','inbound','waiting','talking','total','answered','sumDuration','sumBillable','abandoned','available','acw','acwTimeout','sendMessageOneNotActive','message','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry'];(function(_0x2b87e1,_0x640b73){var _0x174e54=function(_0x1f5d85){while(--_0x1f5d85){_0x2b87e1['push'](_0x2b87e1['shift']());}};_0x174e54(++_0x640b73);}(_0x58e8,0x1e0));var _0x858e=function(_0x6711d1,_0x2ed05c){_0x6711d1=_0x6711d1-0x0;var _0x5733b8=_0x58e8[_0x6711d1];return _0x5733b8;};'use strict';var statusDesc=[_0x858e('0x0'),_0x858e('0x1'),_0x858e('0x2'),_0x858e('0x3'),'invalid',_0x858e('0x4'),_0x858e('0x5'),_0x858e('0x6'),_0x858e('0x7')];var monitorFormat={'wav':'wav','wav49':_0x858e('0x8'),'gsm':_0x858e('0x9')};var strategy={'rrmemory':_0x858e('0xa'),'roundrobin':_0x858e('0xb')};function VoiceQueue(_0xa70309){this['id']=_0xa70309['id']||0x0;this[_0x858e('0xc')]=_0xa70309['name']||'';this['monitor_format']=_0xa70309[_0x858e('0xd')]||'';this[_0x858e('0xe')]=_0xa70309['type']||_0x858e('0xf');this[_0x858e('0x10')]=0x0;this[_0x858e('0x11')]=0x0;this[_0x858e('0x12')]=0x0;this[_0x858e('0x13')]=0x0;this[_0x858e('0x14')]=0x0;this['sumHoldTime']=0x0;this[_0x858e('0x15')]=0x0;this['unmanaged']=0x0;this[_0x858e('0x16')]=0x0;this['loggedIn']=0x0;this[_0x858e('0x17')]=0x0;this[_0x858e('0x18')]=_0xa70309[_0x858e('0x18')]||![];this[_0x858e('0x19')]=_0xa70309[_0x858e('0x19')]||0xa;this['autopause']=_0xa70309['autopause']||'no';this[_0x858e('0x1a')]=!![];this[_0x858e('0x1b')]='';this[_0x858e('0x1c')]=0x0;this[_0x858e('0x1d')]=0x0;this['dialTimezone']=_0xa70309[_0x858e('0x1e')]||null;this[_0x858e('0x1f')]=_0xa70309[_0x858e('0x1f')]?_0xa70309[_0x858e('0x1f')]:null;this[_0x858e('0x20')]=_0xa70309[_0x858e('0x20')];this[_0x858e('0x21')]=_0xa70309[_0x858e('0x21')]||'progressive';this['dialLimitChannel']=_0xa70309['dialLimitChannel']||0x0;this[_0x858e('0x22')]=_0xa70309[_0x858e('0x22')]||0x0;this[_0x858e('0x23')]=_0xa70309[_0x858e('0x23')]||0x1;this[_0x858e('0x24')]=_0xa70309[_0x858e('0x24')]||'dropRate';this[_0x858e('0x25')]=_0xa70309[_0x858e('0x25')]||0.03;this[_0x858e('0x26')]=_0xa70309[_0x858e('0x26')]||0x258;this[_0x858e('0x27')]=_0xa70309[_0x858e('0x27')]||'anonymous';this[_0x858e('0x28')]=_0xa70309[_0x858e('0x28')]||'anonymous';this['dialOriginateTimeout']=_0xa70309['dialOriginateTimeout']||0x1e;this[_0x858e('0x29')]=_0xa70309[_0x858e('0x29')]||'tTxX';this[_0x858e('0x2a')]=_0xa70309[_0x858e('0x2a')]||0x3;this[_0x858e('0x2b')]=_0xa70309['dialQueueProject']||undefined;this[_0x858e('0x2c')]=_0xa70309[_0x858e('0x2c')]||0x3;this[_0x858e('0x2d')]=_0xa70309[_0x858e('0x2d')]||0x96;this[_0x858e('0x2e')]=_0xa70309[_0x858e('0x2e')]||0x3;this[_0x858e('0x2f')]=_0xa70309[_0x858e('0x2f')]||0x96;this[_0x858e('0x30')]=_0xa70309[_0x858e('0x30')]||0x3;this['dialNoAnswerRetryFrequency']=_0xa70309[_0x858e('0x31')]||0x96;this['dialGlobalMaxRetry']=_0xa70309['dialGlobalMaxRetry']||0x4;this[_0x858e('0x32')]=_0xa70309['Trunk']?_0xa70309[_0x858e('0x32')]:undefined;this['TrunkBackup']=_0xa70309[_0x858e('0x33')]?_0xa70309['TrunkBackup']:undefined;this[_0x858e('0x34')]=_0xa70309[_0x858e('0x34')]||undefined;this[_0x858e('0x35')]=_0xa70309[_0x858e('0x35')]?_0xa70309[_0x858e('0x35')]:undefined;this['dialOrderByScheduledAt']=_0xa70309[_0x858e('0x36')]||'DESC';this[_0x858e('0x37')]=_0xa70309[_0x858e('0x37')]||undefined;this[_0x858e('0x38')]=_0xa70309[_0x858e('0x38')]||undefined;this[_0x858e('0x39')]=strategy[_0xa70309[_0x858e('0x39')]]||_0x858e('0xa');this[_0x858e('0x3a')]=!![];this[_0x858e('0x3b')]=_0xa70309['dialAMDActive']||![];this[_0x858e('0x3c')]=_0xa70309['dialAMDInitialSilence'];this[_0x858e('0x3d')]=_0xa70309[_0x858e('0x3d')];this['dialAMDAfterGreetingSilence']=_0xa70309[_0x858e('0x3e')];this['dialAMDTotalAnalysisTime']=_0xa70309[_0x858e('0x3f')];this['dialAMDMinWordLength']=_0xa70309[_0x858e('0x40')];this[_0x858e('0x41')]=_0xa70309['dialAMDBetweenWordsSilence'];this[_0x858e('0x42')]=_0xa70309[_0x858e('0x42')];this[_0x858e('0x43')]=_0xa70309[_0x858e('0x43')];this['dialAMDMaximumWordLength']=_0xa70309[_0x858e('0x44')];this[_0x858e('0x45')]=0x0;this[_0x858e('0x46')]=0x0;this['timeout']=_0xa70309[_0x858e('0x47')];this[_0x858e('0x48')]=0x0;this[_0x858e('0x49')]=0x0;this[_0x858e('0x4a')]=0x0;this['outboundBusyCallsDay']=0x0;this[_0x858e('0x4b')]=0x0;this['outboundNoSuchCallsDay']=0x0;this[_0x858e('0x4c')]=0x0;this[_0x858e('0x4d')]=0x0;this[_0x858e('0x4e')]=0x0;this[_0x858e('0x4f')]=0x0;this[_0x858e('0x50')]=0x0;this[_0x858e('0x51')]=0x0;this[_0x858e('0x52')]=0x0;this[_0x858e('0x53')]=undefined;this[_0x858e('0x54')]=undefined;this[_0x858e('0x55')]=undefined;this[_0x858e('0x56')]=1.05;this['predictiveIntervalTotalCalls']=0x0;this[_0x858e('0x57')]=0x0;this['predictiveIntervalDroppedCallsCallersExit']=0x0;this['predictiveIntervalDroppedCallsTimeout']=0x0;this[_0x858e('0x58')]=0x0;this[_0x858e('0x59')]=0x0;this['predictiveIntervalPauses']=0x0;this[_0x858e('0x5a')]=0x0;this[_0x858e('0x5b')]=_0xa70309[_0x858e('0x5c')]||0x14;this[_0x858e('0x5d')]=_0xa70309[_0x858e('0x5c')]||0xa;this[_0x858e('0x5e')]=0x0;this[_0x858e('0x5f')]=0x0;this[_0x858e('0x60')]=0x1;this['erlangCalls']=0x0;this[_0x858e('0x61')]=0x0;this['erlangAbandonmentRate']=0x0;this[_0x858e('0x62')]=0x0;this['dialRecallMeTimeout']=_0xa70309['dialRecallMeTimeout']||0x1e;this[_0x858e('0x63')]=_0xa70309[_0x858e('0x63')]||![];this[_0x858e('0x64')]=_0xa70309['dialQueueProject2']||undefined;this[_0x858e('0x65')]=_0xa70309[_0x858e('0x65')]||![];this[_0x858e('0x66')]=_0xa70309[_0x858e('0x66')]||![];this[_0x858e('0xd')]=monitorFormat[_0xa70309[_0x858e('0xd')]]?monitorFormat[_0xa70309['monitor_format']]:undefined;this['mandatoryDisposition']=_0xa70309[_0x858e('0x67')]||![];this[_0x858e('0x68')]=_0xa70309['mandatoryDispositionPause']?_0xa70309[_0x858e('0x68')]:undefined;}module['exports']=VoiceQueue;
\ No newline at end of file
+var _0x68b7=['inbound','waiting','talking','total','sumBillable','unmanaged','abandoned','available','acwTimeout','autopause','sendMessageOneNotActive','message','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayTimeout','outboundReCallsDay','startPredictive','handlePredictive','predictiveIntervalTotalCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalPauses','dialPredictiveIntervalMaxThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialAgiAfterHangupClient','mandatoryDisposition','mandatoryDispositionPause','exports','unknown','inuse','unavailable','ringinuse','wav49','rrmemory','roundrobin','name','monitor_format','type'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x68b7,0x11f));var _0x768b=function(_0x1046c4,_0x416702){_0x1046c4=_0x1046c4-0x0;var _0x33dc91=_0x68b7[_0x1046c4];return _0x33dc91;};'use strict';var statusDesc=[_0x768b('0x0'),'not_inuse',_0x768b('0x1'),'busy','invalid',_0x768b('0x2'),'ringing',_0x768b('0x3'),'onhold'];var monitorFormat={'wav':'wav','wav49':_0x768b('0x4'),'gsm':'gsm'};var strategy={'rrmemory':_0x768b('0x5'),'roundrobin':_0x768b('0x6')};function VoiceQueue(_0x233c29){this['id']=_0x233c29['id']||0x0;this[_0x768b('0x7')]=_0x233c29[_0x768b('0x7')]||'';this[_0x768b('0x8')]=_0x233c29[_0x768b('0x8')]||'';this[_0x768b('0x9')]=_0x233c29[_0x768b('0x9')]||_0x768b('0xa');this[_0x768b('0xb')]=0x0;this[_0x768b('0xc')]=0x0;this[_0x768b('0xd')]=0x0;this['answered']=0x0;this['sumDuration']=0x0;this['sumHoldTime']=0x0;this[_0x768b('0xe')]=0x0;this[_0x768b('0xf')]=0x0;this[_0x768b('0x10')]=0x0;this['loggedIn']=0x0;this[_0x768b('0x11')]=0x0;this['acw']=_0x233c29['acw']||![];this[_0x768b('0x12')]=_0x233c29[_0x768b('0x12')]||0xa;this[_0x768b('0x13')]=_0x233c29[_0x768b('0x13')]||'no';this[_0x768b('0x14')]=!![];this[_0x768b('0x15')]='';this['originated']=0x0;this[_0x768b('0x16')]=0x0;this['dialTimezone']=_0x233c29[_0x768b('0x17')]||null;this[_0x768b('0x18')]=_0x233c29[_0x768b('0x18')]?_0x233c29['dialGlobalInterval']:null;this[_0x768b('0x19')]=_0x233c29['dialActive'];this[_0x768b('0x1a')]=_0x233c29[_0x768b('0x1a')]||_0x768b('0x1b');this[_0x768b('0x1c')]=_0x233c29[_0x768b('0x1c')]||0x0;this[_0x768b('0x1d')]=_0x233c29[_0x768b('0x1d')]||0x0;this[_0x768b('0x1e')]=_0x233c29['dialPowerLevel']||0x1;this[_0x768b('0x1f')]=_0x233c29[_0x768b('0x1f')]||_0x768b('0x20');this[_0x768b('0x21')]=_0x233c29['dialPredictiveOptimizationPercentage']||0.03;this[_0x768b('0x22')]=_0x233c29[_0x768b('0x22')]||0x258;this[_0x768b('0x23')]=_0x233c29[_0x768b('0x23')]||'anonymous';this[_0x768b('0x24')]=_0x233c29['dialOriginateCallerIdNumber']||'anonymous';this[_0x768b('0x25')]=_0x233c29[_0x768b('0x25')]||0x1e;this[_0x768b('0x26')]=_0x233c29[_0x768b('0x26')]||'tTxX';this['dialQueueTimeout']=_0x233c29[_0x768b('0x27')]||0x3;this[_0x768b('0x28')]=_0x233c29['dialQueueProject']||undefined;this[_0x768b('0x29')]=_0x233c29[_0x768b('0x29')]||0x3;this[_0x768b('0x2a')]=_0x233c29['dialCongestionRetryFrequency']||0x96;this[_0x768b('0x2b')]=_0x233c29[_0x768b('0x2b')]||0x3;this[_0x768b('0x2c')]=_0x233c29['dialBusyRetryFrequency']||0x96;this['dialNoAnswerMaxRetry']=_0x233c29[_0x768b('0x2d')]||0x3;this[_0x768b('0x2e')]=_0x233c29[_0x768b('0x2e')]||0x96;this[_0x768b('0x2f')]=_0x233c29[_0x768b('0x2f')]||0x4;this['Trunk']=_0x233c29['Trunk']?_0x233c29[_0x768b('0x30')]:undefined;this[_0x768b('0x31')]=_0x233c29[_0x768b('0x31')]?_0x233c29['TrunkBackup']:undefined;this['dialPrefix']=_0x233c29[_0x768b('0x32')]||undefined;this['Interval']=_0x233c29[_0x768b('0x33')]?_0x233c29['Interval']:undefined;this[_0x768b('0x34')]=_0x233c29[_0x768b('0x34')]||_0x768b('0x35');this[_0x768b('0x36')]=_0x233c29[_0x768b('0x36')]||undefined;this[_0x768b('0x37')]=_0x233c29[_0x768b('0x37')]||undefined;this[_0x768b('0x38')]=strategy[_0x233c29[_0x768b('0x38')]]||_0x768b('0x5');this[_0x768b('0x39')]=!![];this[_0x768b('0x3a')]=_0x233c29[_0x768b('0x3a')]||![];this['dialAMDInitialSilence']=_0x233c29[_0x768b('0x3b')];this[_0x768b('0x3c')]=_0x233c29['dialAMDGreeting'];this[_0x768b('0x3d')]=_0x233c29['dialAMDAfterGreetingSilence'];this[_0x768b('0x3e')]=_0x233c29[_0x768b('0x3e')];this[_0x768b('0x3f')]=_0x233c29[_0x768b('0x3f')];this['dialAMDBetweenWordsSilence']=_0x233c29[_0x768b('0x40')];this[_0x768b('0x41')]=_0x233c29[_0x768b('0x41')];this[_0x768b('0x42')]=_0x233c29[_0x768b('0x42')];this[_0x768b('0x43')]=_0x233c29[_0x768b('0x43')];this[_0x768b('0x44')]=0x0;this['pTalking']=0x0;this['timeout']=_0x233c29['timeout'];this['outboundAnswerCallsDay']=0x0;this[_0x768b('0x45')]=0x0;this[_0x768b('0x46')]=0x0;this[_0x768b('0x47')]=0x0;this[_0x768b('0x48')]=0x0;this[_0x768b('0x49')]=0x0;this[_0x768b('0x4a')]=0x0;this[_0x768b('0x4b')]=0x0;this[_0x768b('0x4c')]=0x0;this['outboundDropCallsDayCallersExit']=0x0;this[_0x768b('0x4d')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x768b('0x4e')]=0x0;this['startProgressive']=undefined;this[_0x768b('0x4f')]=undefined;this[_0x768b('0x50')]=undefined;this['predictiveIntervalMultiplicativeFactor']=1.05;this[_0x768b('0x51')]=0x0;this['predictiveIntervalAnsweredCalls']=0x0;this[_0x768b('0x52')]=0x0;this[_0x768b('0x53')]=0x0;this[_0x768b('0x54')]=0x0;this['predictiveIntervalAvgTalktime']=0x0;this[_0x768b('0x55')]=0x0;this['predictiveIntervalAvailable']=0x0;this['predictiveIntervalMaxThreshold']=_0x233c29[_0x768b('0x56')]||0x14;this['predictiveIntervalMinThreshold']=_0x233c29['dialPredictiveIntervalMaxThreshold']||0xa;this[_0x768b('0x57')]=0x0;this[_0x768b('0x58')]=0x0;this[_0x768b('0x59')]=0x1;this[_0x768b('0x5a')]=0x0;this['erlangCallToSecond']=0x0;this[_0x768b('0x5b')]=0x0;this[_0x768b('0x5c')]=0x0;this[_0x768b('0x5d')]=_0x233c29[_0x768b('0x5d')]||0x1e;this[_0x768b('0x5e')]=_0x233c29[_0x768b('0x5e')]||![];this['dialQueueProject2']=_0x233c29['dialQueueProject2']||undefined;this['dialAgiAfterHangupClient']=_0x233c29[_0x768b('0x5f')]||![];this['dialAgiAfterHangupAgent']=_0x233c29['dialAgiAfterHangupAgent']||![];this[_0x768b('0x8')]=monitorFormat[_0x233c29[_0x768b('0x8')]]?monitorFormat[_0x233c29[_0x768b('0x8')]]:undefined;this[_0x768b('0x60')]=_0x233c29[_0x768b('0x60')]||![];this[_0x768b('0x61')]=_0x233c29[_0x768b('0x61')]?_0x233c29[_0x768b('0x61')]:undefined;}module[_0x768b('0x62')]=VoiceQueue;
\ No newline at end of file
diff --git a/server/services/ami/model/vtigerAccount.js b/server/services/ami/model/vtigerAccount.js
index 3dda03b..43b1b22 100644
--- a/server/services/ami/model/vtigerAccount.js
+++ b/server/services/ami/model/vtigerAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3261=['remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x5b0f19,_0x2afab1){var _0x2a9e9d=function(_0x22e808){while(--_0x22e808){_0x5b0f19['push'](_0x5b0f19['shift']());}};_0x2a9e9d(++_0x2afab1);}(_0x3261,0x7c));var _0x1326=function(_0x3634ab,_0x479b0a){_0x3634ab=_0x3634ab-0x0;var _0x2bd730=_0x3261[_0x3634ab];return _0x2bd730;};'use strict';function VtigerAccount(_0x3a1daf){this['id']=_0x3a1daf['id']||0x0;this[_0x1326('0x0')]=_0x3a1daf[_0x1326('0x0')]||'';this[_0x1326('0x1')]=_0x3a1daf['username']||'';this['accessKey']=_0x3a1daf['accessKey']||'';this[_0x1326('0x2')]=_0x3a1daf['remoteUri']||'';this[_0x1326('0x3')]=_0x3a1daf[_0x1326('0x3')]||'';this['Configurations']=_0x3a1daf[_0x1326('0x4')]||{};}module[_0x1326('0x5')]=VtigerAccount;
\ No newline at end of file
+var _0x0d05=['username','accessKey','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x1351d3,_0x1f679d){var _0x28d14d=function(_0x4c5482){while(--_0x4c5482){_0x1351d3['push'](_0x1351d3['shift']());}};_0x28d14d(++_0x1f679d);}(_0x0d05,0xed));var _0x50d0=function(_0x1a1222,_0x11619d){_0x1a1222=_0x1a1222-0x0;var _0x5267c8=_0x0d05[_0x1a1222];return _0x5267c8;};'use strict';function VtigerAccount(_0x3bbc11){this['id']=_0x3bbc11['id']||0x0;this[_0x50d0('0x0')]=_0x3bbc11[_0x50d0('0x0')]||'';this[_0x50d0('0x1')]=_0x3bbc11[_0x50d0('0x1')]||'';this['accessKey']=_0x3bbc11[_0x50d0('0x2')]||'';this['remoteUri']=_0x3bbc11[_0x50d0('0x3')]||'';this[_0x50d0('0x4')]=_0x3bbc11[_0x50d0('0x4')]||'';this[_0x50d0('0x5')]=_0x3bbc11[_0x50d0('0x5')]||{};}module[_0x50d0('0x6')]=VtigerAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/zendeskAccount.js b/server/services/ami/model/zendeskAccount.js
index 509ba82..4d96dae 100644
--- a/server/services/ami/model/zendeskAccount.js
+++ b/server/services/ami/model/zendeskAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8889=['Configurations','exports','name','username','password','token','authType','integrationTab','serverUrl'];(function(_0x2ac2a4,_0x2ad5cd){var _0x596193=function(_0x1a9756){while(--_0x1a9756){_0x2ac2a4['push'](_0x2ac2a4['shift']());}};_0x596193(++_0x2ad5cd);}(_0x8889,0x16a));var _0x9888=function(_0x4f8043,_0x3f26a0){_0x4f8043=_0x4f8043-0x0;var _0x5d71b5=_0x8889[_0x4f8043];return _0x5d71b5;};'use strict';function ZendeskAccount(_0x240182){this['id']=_0x240182['id']||0x0;this[_0x9888('0x0')]=_0x240182[_0x9888('0x0')]||'';this[_0x9888('0x1')]=_0x240182[_0x9888('0x1')]||'';this[_0x9888('0x2')]=_0x240182[_0x9888('0x2')]||'';this[_0x9888('0x3')]=_0x240182[_0x9888('0x3')]||'';this['remoteUri']=_0x240182['remoteUri']||'';this[_0x9888('0x4')]=_0x240182[_0x9888('0x4')]||'';this['type']=_0x240182['type']||_0x9888('0x5');this[_0x9888('0x6')]=_0x240182[_0x9888('0x6')]||'';this[_0x9888('0x7')]=_0x240182['Configurations']||{};}module[_0x9888('0x8')]=ZendeskAccount;
\ No newline at end of file
+var _0xc405=['username','password','token','authType','type','integrationTab','serverUrl','Configurations','exports','name'];(function(_0x24e0c9,_0x284109){var _0x4448f0=function(_0x576980){while(--_0x576980){_0x24e0c9['push'](_0x24e0c9['shift']());}};_0x4448f0(++_0x284109);}(_0xc405,0x153));var _0x5c40=function(_0x5b1aed,_0x322c17){_0x5b1aed=_0x5b1aed-0x0;var _0x26add8=_0xc405[_0x5b1aed];return _0x26add8;};'use strict';function ZendeskAccount(_0x4b3f0f){this['id']=_0x4b3f0f['id']||0x0;this[_0x5c40('0x0')]=_0x4b3f0f[_0x5c40('0x0')]||'';this['username']=_0x4b3f0f[_0x5c40('0x1')]||'';this[_0x5c40('0x2')]=_0x4b3f0f['password']||'';this[_0x5c40('0x3')]=_0x4b3f0f[_0x5c40('0x3')]||'';this['remoteUri']=_0x4b3f0f['remoteUri']||'';this[_0x5c40('0x4')]=_0x4b3f0f[_0x5c40('0x4')]||'';this[_0x5c40('0x5')]=_0x4b3f0f['type']||_0x5c40('0x6');this[_0x5c40('0x7')]=_0x4b3f0f['serverUrl']||'';this[_0x5c40('0x8')]=_0x4b3f0f[_0x5c40('0x8')]||{};}module[_0x5c40('0x9')]=ZendeskAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/zohoAccount.js b/server/services/ami/model/zohoAccount.js
index 97c7500..b0c82f3 100644
--- a/server/services/ami/model/zohoAccount.js
+++ b/server/services/ami/model/zohoAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd117=['serverUrl','exports','name','authToken','host','Configurations'];(function(_0x1fc00f,_0x499386){var _0x238548=function(_0x2eebd6){while(--_0x2eebd6){_0x1fc00f['push'](_0x1fc00f['shift']());}};_0x238548(++_0x499386);}(_0xd117,0x182));var _0x7d11=function(_0x20ef64,_0x4a8fe9){_0x20ef64=_0x20ef64-0x0;var _0x3707d8=_0xd117[_0x20ef64];return _0x3707d8;};'use strict';function ZohoAccount(_0x1bf8f0){this['id']=_0x1bf8f0['id']||0x0;this[_0x7d11('0x0')]=_0x1bf8f0[_0x7d11('0x0')]||'';this[_0x7d11('0x1')]=_0x1bf8f0[_0x7d11('0x1')]||'';this[_0x7d11('0x2')]=_0x1bf8f0[_0x7d11('0x2')]||'';this[_0x7d11('0x3')]=_0x1bf8f0[_0x7d11('0x3')]||{};this[_0x7d11('0x4')]=_0x1bf8f0[_0x7d11('0x4')]||'';}module[_0x7d11('0x5')]=ZohoAccount;
\ No newline at end of file
+var _0xdbf5=['name','authToken','host','Configurations','serverUrl','exports'];(function(_0x4e0dc9,_0x2ec350){var _0x52d218=function(_0x1df0d4){while(--_0x1df0d4){_0x4e0dc9['push'](_0x4e0dc9['shift']());}};_0x52d218(++_0x2ec350);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x4b427e,_0x44e9ba){_0x4b427e=_0x4b427e-0x0;var _0x3a7142=_0xdbf5[_0x4b427e];return _0x3a7142;};'use strict';function ZohoAccount(_0xc2af80){this['id']=_0xc2af80['id']||0x0;this[_0x5dbf('0x0')]=_0xc2af80['name']||'';this['authToken']=_0xc2af80[_0x5dbf('0x1')]||'';this[_0x5dbf('0x2')]=_0xc2af80[_0x5dbf('0x2')]||'';this[_0x5dbf('0x3')]=_0xc2af80[_0x5dbf('0x3')]||{};this[_0x5dbf('0x4')]=_0xc2af80[_0x5dbf('0x4')]||'';}module[_0x5dbf('0x5')]=ZohoAccount;
\ No newline at end of file
diff --git a/server/services/ami/preview/action.js b/server/services/ami/preview/action.js
index 2439904..0ab34d0 100644
--- a/server/services/ami/preview/action.js
+++ b/server/services/ami/preview/action.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7de3=['Contact','active','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','prototype','\x22%s\x22\x20<%s>','exports','lodash','moment','string','isNil','uniqueid','idContact','queue','name','type','campaigntype','dialAnswer','membername','Agent','channelAgent','format','calleridname','phone'];(function(_0x93f387,_0x15dd62){var _0x3635fe=function(_0x48f6a9){while(--_0x48f6a9){_0x93f387['push'](_0x93f387['shift']());}};_0x3635fe(++_0x15dd62);}(_0x7de3,0x10f));var _0x37de=function(_0x543084,_0x4337f5){_0x543084=_0x543084-0x0;var _0x306a57=_0x7de3[_0x543084];return _0x306a57;};'use strict';var util=require('util');var _=require(_0x37de('0x0'));var moment=require(_0x37de('0x1'));function checkNameSurname(_0x300691,_0x49303a,_0x39fda8){var _0x22e86f='';if(!_['isNil'](_0x49303a)&&_0x37de('0x2')===typeof _0x49303a){_0x22e86f+=_0x49303a;}if(!_[_0x37de('0x3')](_0x39fda8)&&'string'===typeof _0x39fda8){_0x22e86f+='\x20'+_0x39fda8;}if(_0x22e86f!==''){return _0x22e86f;}return _0x300691;}function Action(_0x3dde74,_0x170a11,_0x2db099,_0x29780f,_0xc5dd04){this[_0x37de('0x4')]=_0x2db099||undefined;this[_0x37de('0x5')]=_0x3dde74['id'];this[_0x37de('0x6')]=_0x170a11[_0x37de('0x7')];this['type']=_0x170a11[_0x37de('0x8')];this[_0x37de('0x9')]=_0x37de('0x6');this[_0x37de('0xa')]=![];this[_0x37de('0xb')]=_[_0x37de('0x3')](_0x3dde74['Agent'])?undefined:_0x3dde74[_0x37de('0xc')][_0x37de('0x7')];this[_0x37de('0xd')]=this['membername']?util[_0x37de('0xe')]('SIP/%s',this['membername']):_0x29780f||undefined;this[_0x37de('0xf')]=checkNameSurname(_0x3dde74['Contact'][_0x37de('0x10')],_0x3dde74[_0x37de('0x11')]['firstName'],_0x3dde74[_0x37de('0x11')]['lastName']);this['active']=_0x3dde74[_0x37de('0x12')]||![];this['calleridnum']=_0x3dde74[_0x37de('0x11')][_0x37de('0x10')];this[_0x37de('0x13')]=_0x3dde74['scheduledat'];this['countbusyretry']=_0x3dde74[_0x37de('0x14')]||0x0;this[_0x37de('0x15')]=_0x3dde74[_0x37de('0x15')]||0x0;this[_0x37de('0x16')]=_0x3dde74[_0x37de('0x16')]||0x0;this[_0x37de('0x17')]=(_0x3dde74[_0x37de('0x14')]||0x0)+(_0x3dde74[_0x37de('0x15')]||0x0)+(_0x3dde74['countnoanswerretry']||0x0);this[_0x37de('0x18')]=_0x3dde74[_0x37de('0x18')];this[_0x37de('0x19')]=_0x3dde74[_0x37de('0x19')];this[_0x37de('0x1a')]=_0x3dde74[_0x37de('0x1a')];this['recallme']=_0x3dde74['recallme'];this[_0x37de('0x1b')]=_0x3dde74[_0x37de('0x1b')];this[_0x37de('0x1c')]=_0x3dde74['ListId'];this[_0x37de('0x1d')]=_[_0x37de('0x3')](_0x3dde74[_0x37de('0xc')])?_0x3dde74[_0x37de('0x1d')]:_0x3dde74[_0x37de('0xc')]['id'];this[_0x37de('0x1e')]=_0x3dde74[_0x37de('0x1e')];this[_0x37de('0x1f')]='';this[_0x37de('0x20')]='';}Action[_0x37de('0x21')]['getCaller']=function(){return util[_0x37de('0xe')](_0x37de('0x22'),this[_0x37de('0xf')],this['number']);};module[_0x37de('0x23')]=Action;
\ No newline at end of file
+var _0x24db=['UserId','VoiceQueueId','originatecalleridnum','getCaller','\x22%s\x22\x20<%s>','calleridname','number','exports','util','lodash','moment','isNil','string','name','type','campaigntype','queue','dialAnswer','membername','Agent','channelAgent','format','SIP/%s','Contact','phone','lastName','active','calleridnum','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','callback','callbackuniqueid','callbackat','ContactId','ListId'];(function(_0x447931,_0xb1481a){var _0x1880b9=function(_0xb64953){while(--_0xb64953){_0x447931['push'](_0x447931['shift']());}};_0x1880b9(++_0xb1481a);}(_0x24db,0x112));var _0xb24d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x24db[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0xb24d('0x0'));var _=require(_0xb24d('0x1'));var moment=require(_0xb24d('0x2'));function checkNameSurname(_0x589a0b,_0xcd5d46,_0x1bd14c){var _0x2b2a05='';if(!_[_0xb24d('0x3')](_0xcd5d46)&&_0xb24d('0x4')===typeof _0xcd5d46){_0x2b2a05+=_0xcd5d46;}if(!_['isNil'](_0x1bd14c)&&_0xb24d('0x4')===typeof _0x1bd14c){_0x2b2a05+='\x20'+_0x1bd14c;}if(_0x2b2a05!==''){return _0x2b2a05;}return _0x589a0b;}function Action(_0x8b2f30,_0x1bf477,_0x1c5955,_0x20de26,_0x2671ab){this['uniqueid']=_0x1c5955||undefined;this['idContact']=_0x8b2f30['id'];this['queue']=_0x1bf477[_0xb24d('0x5')];this[_0xb24d('0x6')]=_0x1bf477['type'];this[_0xb24d('0x7')]=_0xb24d('0x8');this[_0xb24d('0x9')]=![];this[_0xb24d('0xa')]=_['isNil'](_0x8b2f30[_0xb24d('0xb')])?undefined:_0x8b2f30[_0xb24d('0xb')][_0xb24d('0x5')];this[_0xb24d('0xc')]=this[_0xb24d('0xa')]?util[_0xb24d('0xd')](_0xb24d('0xe'),this[_0xb24d('0xa')]):_0x20de26||undefined;this['calleridname']=checkNameSurname(_0x8b2f30[_0xb24d('0xf')][_0xb24d('0x10')],_0x8b2f30['Contact']['firstName'],_0x8b2f30[_0xb24d('0xf')][_0xb24d('0x11')]);this['active']=_0x8b2f30[_0xb24d('0x12')]||![];this[_0xb24d('0x13')]=_0x8b2f30[_0xb24d('0xf')][_0xb24d('0x10')];this['scheduledat']=_0x8b2f30[_0xb24d('0x14')];this[_0xb24d('0x15')]=_0x8b2f30['countbusyretry']||0x0;this[_0xb24d('0x16')]=_0x8b2f30[_0xb24d('0x16')]||0x0;this[_0xb24d('0x17')]=_0x8b2f30['countnoanswerretry']||0x0;this[_0xb24d('0x18')]=(_0x8b2f30[_0xb24d('0x15')]||0x0)+(_0x8b2f30['countcongestionretry']||0x0)+(_0x8b2f30['countnoanswerretry']||0x0);this[_0xb24d('0x19')]=_0x8b2f30['callback'];this['callbackuniqueid']=_0x8b2f30[_0xb24d('0x1a')];this['callbackat']=_0x8b2f30[_0xb24d('0x1b')];this['recallme']=_0x8b2f30['recallme'];this[_0xb24d('0x1c')]=_0x8b2f30[_0xb24d('0x1c')];this[_0xb24d('0x1d')]=_0x8b2f30[_0xb24d('0x1d')];this[_0xb24d('0x1e')]=_[_0xb24d('0x3')](_0x8b2f30[_0xb24d('0xb')])?_0x8b2f30[_0xb24d('0x1e')]:_0x8b2f30[_0xb24d('0xb')]['id'];this[_0xb24d('0x1f')]=_0x8b2f30['VoiceQueueId'];this[_0xb24d('0x20')]='';this['originatecalleridname']='';}Action['prototype'][_0xb24d('0x21')]=function(){return util[_0xb24d('0xd')](_0xb24d('0x22'),this[_0xb24d('0x23')],this[_0xb24d('0x24')]);};module[_0xb24d('0x25')]=Action;
\ No newline at end of file
diff --git a/server/services/ami/preview/index.js b/server/services/ami/preview/index.js
index 449b648..8876ce5 100644
--- a/server/services/ami/preview/index.js
+++ b/server/services/ami/preview/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x291d=['startPredictive','startProgressive','Trunk','active','callerid','Interval','format','voice:queue:%s','sendMessageOneNotActive','originated','paused','NOT_ACTIVE','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','IS_DISACTIVED','syncCampaigns','hasOwnProperty','preview','booked','clearZombieChannels','setMessage','recallMe','clearZombieChannel','enqueue','isNil','actions','info','[clearZombieChannels][talking]','Queue','originated:\x20','stringify','pTalking:\x20','queue','dialAnswer','contactId','UserId','VoiceQueueId','ListId','Action','status','channel','No\x20such\x20channel','updateOriginated','decrementTalkink','[clearZombieChannel]','[Dialer][checkChannel][pTalking][Preview]','loggerError','[Dialer][checkChannel][Preview]','[action]','size','getContactRecallMe','then','length','getDiff','scheduledat','run','logger2','[RecallMe]','catch','starttime','YYYY-MM-DD\x20HH:mm:ss','RecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryRecallClose]','createCustomerFinal','[getContactRecallMe]','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','ACTIVE','callProgressDetectingCustomer','totalGlobal','logCustomer','NoSuchNumber','dialGlobalMaxRetry','cloneAction','Global','[callProgressDetectingCustomer][logNoSuchGlobal]','linkedid','ANSWER','responsetime','uniqueid','emit','custom:agentconnect','buildObj','connect','acw','custom:agentConnectPreview','buildAcw','custom:agentcomplete','complete','[16]','countglobal','Answer','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','talktime','sumBillable','[syncHangup][talking][decrement]','countbusyretry','Busy','[callProgressDetectingCustomer][logBusy]','dialBusyMaxRetry','rescheduleContact','scheduledAt','dialBusyRetryFrequency','unlockAgent','activeContact','NOANSWER','countnoanswerretry','NoAnswer','[callProgressDetectingCustomer][logNoAnswer]','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','CONGESTION','outboundCongestionCallsDay','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','CANCEL','AgentReject','unlockContact','idContact','disableContact','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','dialstatus','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','callProgressDetectingAgent','isUndefined','object','reason','logAgent','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','[callProgressDetectingAgent][logNoAnswer]','Congestion','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[originated][decrement][callProgressDetectingAgent]','\x20Queue','checkInBlack','Contact','Contact\x20is\x20undefined','lookAgent','isEmpty','[Preview][execCall][success]','Queue:\x20','\x20IdHopper:\x20','custom:agentcalled','called','Call\x20failed','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','SIP/%s','reachable','unmonitored','execRun','pick','unlock','recallme','validateContact','isValid','checkIsBlackList','Contact.phone','[Preview][checkIsBlackList]','[Preview][getContactPreview]','Agent','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20work]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','\x20Trunk\x20Backup\x20is\x20not\x20active','Trunk\x20not\x20work','[Preview][validateContact][Campaign\x20Active]','Is\x20Valid','execCall','SIP/%s/%s%s','dialCutDigit','phone','substring','trim','getCallerIdRandom','dialOriginateCallerIdNumber','dialRandomLastDigitCallerIdNumber','extractCalleridName','originatecalleridnum','extractCalleridNumber','addVariables','merge','toLowerVariables','variablesAction','OriginateError','syncOriginateResponse','actionid','isFailure','[callProgressDetectingAgent][logAnswer]','cause','[syncHangup][talking][cause]','statedesc','dialQueueProject','channelstate','transfer','[syncHangup][talking][transfer]','destlinkedid','addVariable','variables','keys','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','lodash','bluebird','md5','ioredis','../../../config/environment','../../../config/logger','actionPreview','./rpcDb','./util/util','defaults','redis','localhost','socket.io-emitter','prototype','tail','finally','sequence','campaignsPreview','voiceQueues','trunks','agents','clockClearZombieChannels','originateresponse','hangup','syncHangup','bind','hanguprequest','syncHangupRequest','dialend','syncDialEnd','newexten','syncNewExten','varset','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopCampaigns','type','outbound','name','strategy','answered','available','loggedIn','pTalking','sumDuration','sumHoldTime','talking','total','abandoned','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor'];(function(_0x1d5a32,_0x47974a){var _0x361ca0=function(_0x287d62){while(--_0x287d62){_0x1d5a32['push'](_0x1d5a32['shift']());}};_0x361ca0(++_0x47974a);}(_0x291d,0xe0));var _0xd291=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0x291d[_0x2b10c6];return _0x3789d2;};'use strict';var util=require(_0xd291('0x0'));var _=require(_0xd291('0x1'));var BPromise=require(_0xd291('0x2'));var uuid=require('uuid');var moment=require('moment');var md5=require(_0xd291('0x3'));var Redis=require(_0xd291('0x4'));var config=require(_0xd291('0x5'));var logger=require('../../../config/logger')('preview');var loggerAction=require(_0xd291('0x6'))(_0xd291('0x7'));var ami=require('../ami');var rpcDb=require(_0xd291('0x8'));var Action=require('./action');var ut=require(_0xd291('0x9'));config['redis']=_[_0xd291('0xa')](config[_0xd291('0xb')],{'host':_0xd291('0xc'),'port':0x18eb});var io=require(_0xd291('0xd'))(new Redis(config[_0xd291('0xb')]));var Sequence=function(){};Sequence[_0xd291('0xe')]['enqueue']=function(_0x35037e){this[_0xd291('0xf')]=this[_0xd291('0xf')]?this[_0xd291('0xf')][_0xd291('0x10')](_0x35037e):_0x35037e();};function Preview(_0x3e1bc0){this[_0xd291('0x11')]=new Sequence();this[_0xd291('0x12')]=_0x3e1bc0[_0xd291('0x13')];this[_0xd291('0x14')]=_0x3e1bc0['trunks'];this['actions']={};this[_0xd291('0x15')]=_0x3e1bc0['agents'];this[_0xd291('0x16')]=0x0;ami['on'](_0xd291('0x17'),this['syncOriginateResponse']['bind'](this));ami['on'](_0xd291('0x18'),this[_0xd291('0x19')][_0xd291('0x1a')](this));ami['on'](_0xd291('0x1b'),this[_0xd291('0x1c')][_0xd291('0x1a')](this));ami['on'](_0xd291('0x1d'),this[_0xd291('0x1e')][_0xd291('0x1a')](this));ami['on'](_0xd291('0x1f'),this[_0xd291('0x20')][_0xd291('0x1a')](this));ami['on'](_0xd291('0x21'),this[_0xd291('0x22')]['bind'](this));ami['on'](_0xd291('0x23'),this[_0xd291('0x24')]['bind'](this));ami['on'](_0xd291('0x25'),this[_0xd291('0x26')]['bind'](this));this[_0xd291('0x27')](this[_0xd291('0x12')]);}function emit(_0x584d56,_0xe575f8,_0x1428c9){io['to'](_0x584d56)['emit'](_0xe575f8,_0x1428c9);}function emitCampaignPreview(_0x5298db){if(_0x5298db[_0xd291('0x28')]===_0xd291('0x29')){var _0x2e8304={'id':_0x5298db['id'],'name':_0x5298db[_0xd291('0x2a')],'strategy':_0x5298db[_0xd291('0x2b')],'answered':_0x5298db[_0xd291('0x2c')],'available':_0x5298db[_0xd291('0x2d')],'loggedIn':_0x5298db[_0xd291('0x2e')],'pTalking':_0x5298db[_0xd291('0x2f')],'sumBillable':_0x5298db['sumBillable'],'sumDuration':_0x5298db[_0xd291('0x30')],'sumHoldTime':_0x5298db[_0xd291('0x31')]||0x0,'talking':_0x5298db[_0xd291('0x32')],'total':_0x5298db[_0xd291('0x33')],'type':_0x5298db[_0xd291('0x28')],'unmanaged':_0x5298db['unmanaged'],'abandoned':_0x5298db[_0xd291('0x34')],'waiting':_0x5298db['waiting'],'loggedInDb':_0x5298db['loggedInDb'],'dialActive':_0x5298db[_0xd291('0x35')],'dialMethod':_0x5298db[_0xd291('0x36')],'dialOriginateCallerIdName':_0x5298db[_0xd291('0x37')],'dialOriginateCallerIdNumber':_0x5298db['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x5298db[_0xd291('0x38')],'dialPrefix':_0x5298db[_0xd291('0x39')],'outboundAnswerAgiCallsDay':_0x5298db[_0xd291('0x3a')],'outboundAnswerCallsDay':_0x5298db[_0xd291('0x3b')],'outboundBlacklistCallsDay':_0x5298db[_0xd291('0x3c')],'outboundBusyCallsDay':_0x5298db[_0xd291('0x3d')],'outboundCongestionCallsDay':_0x5298db['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x5298db[_0xd291('0x3e')],'outboundDropCallsDayCallersExit':_0x5298db[_0xd291('0x3f')],'outboundDropCallsDayTimeout':_0x5298db['outboundDropCallsDayTimeout'],'outboundNoAnswerCallsDay':_0x5298db[_0xd291('0x40')],'outboundNoSuchCallsDay':_0x5298db[_0xd291('0x41')],'outboundOriginateFailureCallsDay':_0x5298db[_0xd291('0x42')],'outboundReCallsDay':_0x5298db[_0xd291('0x43')],'outboundRejectCallsDay':_0x5298db['outboundRejectCallsDay'],'outboundUnknownCallsDay':_0x5298db[_0xd291('0x44')],'predictiveIntervalAnsweredCalls':_0x5298db[_0xd291('0x45')],'predictiveIntervalAvgHoldtime':_0x5298db[_0xd291('0x46')],'predictiveIntervalAvgTalktime':_0x5298db[_0xd291('0x47')],'predictiveIntervalDroppedCallsCallersExit':_0x5298db[_0xd291('0x48')],'predictiveIntervalDroppedCallsTimeout':_0x5298db['predictiveIntervalDroppedCallsTimeout'],'predictiveIntervalErlangCalls':_0x5298db[_0xd291('0x49')],'predictiveIntervalErlangCallsDroppedCalls':_0x5298db[_0xd291('0x4a')],'predictiveIntervalHitRate':_0x5298db[_0xd291('0x4b')],'predictiveIntervalMultiplicativeFactor':_0x5298db[_0xd291('0x4c')],'predictiveIntervalPauses':_0x5298db[_0xd291('0x4d')],'predictiveIntervalAvailable':_0x5298db[_0xd291('0x4e')],'predictiveIntervalTotalCalls':_0x5298db[_0xd291('0x4f')],'message':_0x5298db[_0xd291('0x50')],'originated':_0x5298db['originated'],'erlangCalls':_0x5298db[_0xd291('0x51')],'erlangCallToSecond':_0x5298db[_0xd291('0x52')],'erlangAbandonmentRate':_0x5298db[_0xd291('0x53')],'erlangBusyFactor':_0x5298db[_0xd291('0x54')],'startPredictive':_0x5298db[_0xd291('0x55')],'startProgressive':_0x5298db[_0xd291('0x56')]};if(_0x5298db[_0xd291('0x57')]){_0x2e8304['Trunk']={'id':_0x5298db[_0xd291('0x57')]['id'],'name':_0x5298db[_0xd291('0x57')][_0xd291('0x2a')],'active':_0x5298db[_0xd291('0x57')][_0xd291('0x58')],'callerid':_0x5298db['Trunk'][_0xd291('0x59')]};}if(_0x5298db[_0xd291('0x5a')]){_0x2e8304[_0xd291('0x5a')]={'id':_0x5298db[_0xd291('0x5a')]['id'],'name':_0x5298db['Interval'][_0xd291('0x2a')]};}var _0x37aa17=md5(JSON['stringify'](_0x2e8304));if(_0x5298db[_0xd291('0x3')]!==_0x37aa17){_0x5298db['md5']=_0x37aa17;emit(util[_0xd291('0x5b')]('voice:queue:%s',_0x2e8304[_0xd291('0x2a')]),'voice_queue:save',_0x2e8304);}}}function emitVoiceQueueChannelRemove(_0x5ebc08){emit(util[_0xd291('0x5b')](_0xd291('0x5c'),_0x5ebc08[_0xd291('0x2a')]),'voice_queue_channel:remove',_0x5ebc08);}function notSendMessagesQueue(_0x459b9e){if(_0x459b9e[_0xd291('0x5d')]){if(_0x459b9e[_0xd291('0x5e')]===0x0&&_0x459b9e[_0xd291('0x2f')]===0x0){_0x459b9e['sendMessageOneNotActive']=![];_0x459b9e[_0xd291('0x2d')]=0x0;_0x459b9e[_0xd291('0x5f')]=0x0;_0x459b9e[_0xd291('0x50')]=_0xd291('0x60');ut[_0xd291('0x61')](_0xd291('0x62'),_0x459b9e[_0xd291('0x2a')]+_0xd291('0x63'));}else{_0x459b9e[_0xd291('0x50')]=_0xd291('0x64');ut['logger'](_0xd291('0x62'),_0x459b9e[_0xd291('0x2a')]+'\x20is\x20disactive');}emitCampaignPreview(_0x459b9e);}}Preview[_0xd291('0xe')][_0xd291('0x27')]=function(){var _0x1721b4=this;setInterval(function(){_0x1721b4[_0xd291('0x65')]();},0x7cf);};Preview[_0xd291('0xe')]['syncCampaigns']=function(){var _0x5ca0d0=this['campaignsPreview'];this[_0xd291('0x16')]+=0x1;for(var _0x108135 in _0x5ca0d0){if(_0x5ca0d0[_0xd291('0x66')](_0x108135)&&(_0x5ca0d0[_0x108135][_0xd291('0x36')]===_0xd291('0x67')||_0x5ca0d0[_0x108135][_0xd291('0x36')]===_0xd291('0x68'))&&_0x5ca0d0[_0x108135][_0xd291('0x28')]===_0xd291('0x29')){if(this['clockClearZombieChannels']>0x7){this[_0xd291('0x16')]=0x0;this[_0xd291('0x69')]();}}if(_0x5ca0d0[_0xd291('0x66')](_0x108135)&&_0x5ca0d0[_0x108135]['dialMethod']===_0xd291('0x67')&&_0x5ca0d0[_0x108135][_0xd291('0x28')]===_0xd291('0x29')){if(_0x5ca0d0[_0x108135][_0xd291('0x35')]){this[_0xd291('0x6a')](_0x5ca0d0[_0x108135]);this[_0xd291('0x6b')](_0x5ca0d0[_0x108135]);}else{notSendMessagesQueue(_0x5ca0d0[_0x108135]);}}}};Preview[_0xd291('0xe')][_0xd291('0x6c')]=function(_0x4ebda5){var _0x4c8f25=this;this[_0xd291('0x11')][_0xd291('0x6d')](function(){if(!_[_0xd291('0x6e')](_0x4c8f25[_0xd291('0x6f')][_0x4ebda5])){loggerAction[_0xd291('0x70')](_0xd291('0x71'),_0x4ebda5,_0xd291('0x72'),_0x4c8f25[_0xd291('0x6f')][_0x4ebda5]['queue'],_0xd291('0x73'),JSON[_0xd291('0x74')](_0x4c8f25[_0xd291('0x12')][_0x4c8f25[_0xd291('0x6f')][_0x4ebda5]['queue']][_0xd291('0x5e')]),_0xd291('0x75'),JSON[_0xd291('0x74')](_0x4c8f25[_0xd291('0x12')][_0x4c8f25[_0xd291('0x6f')][_0x4ebda5][_0xd291('0x76')]][_0xd291('0x2f')]),JSON['stringify'](_0x4c8f25[_0xd291('0x6f')][_0x4ebda5][_0xd291('0x77')]),JSON[_0xd291('0x74')](_['pick'](_0x4c8f25['actions'][_0x4ebda5],[_0xd291('0x78'),_0xd291('0x79'),_0xd291('0x7a'),_0xd291('0x7b')])));return ami[_0xd291('0x7c')]({'action':_0xd291('0x7d'),'channel':_0x4c8f25[_0xd291('0x6f')][_0x4ebda5][_0xd291('0x7e')]})['catch'](function(_0x49910f){if(_0x49910f[_0xd291('0x50')]===_0xd291('0x7f')){setTimeout(function(){if(_0x4c8f25['actions'][_0x4ebda5]){ut[_0xd291('0x80')](_0x4c8f25[_0xd291('0x12')][_0x4c8f25[_0xd291('0x6f')][_0x4ebda5][_0xd291('0x76')]],'[clearZombieChannel]');if(_0x4c8f25[_0xd291('0x6f')][_0x4ebda5][_0xd291('0x77')]===!![]){ut[_0xd291('0x81')](_0x4c8f25[_0xd291('0x12')][_0x4c8f25[_0xd291('0x6f')][_0x4ebda5]['queue']],_0xd291('0x82'));ut['loggerError'](_0xd291('0x83')+_0x4ebda5,_0x4c8f25[_0xd291('0x6f')][_0x4ebda5][_0xd291('0x76')]);}ut[_0xd291('0x84')](_0xd291('0x85')+_0x4ebda5,_0x4c8f25['actions'][_0x4ebda5][_0xd291('0x76')]);delete _0x4c8f25['actions'][_0x4ebda5];}},0x2328);}});}});};Preview[_0xd291('0xe')][_0xd291('0x69')]=function(){var _0x338364=this;loggerAction[_0xd291('0x70')](_0xd291('0x86'),_[_0xd291('0x87')](this[_0xd291('0x6f')]));for(var _0x43c422 in this[_0xd291('0x6f')]){if(_0x338364[_0xd291('0x6f')]['hasOwnProperty'](_0x43c422)){_0x338364[_0xd291('0x6c')](_0x43c422);}}};Preview[_0xd291('0xe')][_0xd291('0x6b')]=function(_0x470369){var _0x20101f=this;rpcDb[_0xd291('0x88')](_0x470369['id'],ut['agentReadyId'](this[_0xd291('0x15')]))[_0xd291('0x89')](function(_0x38303c){if(!_[_0xd291('0x6e')](_0x38303c)){for(var _0x2d2631=0x0;_0x2d2631<_0x38303c[_0xd291('0x8a')];_0x2d2631+=0x1){if(ut[_0xd291('0x8b')](_0x38303c[_0x2d2631][_0xd291('0x8c')])<_0x470369['dialRecallMeTimeout']*0x3c){_0x20101f[_0xd291('0x8d')](_0x38303c[_0x2d2631]['id'])['then'](ut[_0xd291('0x8e')](_0xd291('0x8f')))[_0xd291('0x90')](ut[_0xd291('0x8e')](_0xd291('0x8f')));}else{var _0x527376=new Action(_0x38303c[_0x2d2631],_0x470369);_0x527376[_0xd291('0x91')]=moment()[_0xd291('0x5b')](_0xd291('0x92'));_0x470369[_0xd291('0x43')]+=0x1;ut['logCustomer'](_0x527376,0x17,_0xd291('0x93'));if(_0x470369['dialRecallInQueue']){rpcDb[_0xd291('0x94')](ut[_0xd291('0x95')](_0x38303c[_0x2d2631]));rpcDb['createCustomerHistory'](_0x527376,'[HistoryDialRecallInQueue][historyCatch]');}else{ut['logCustomer'](_0x527376,0x16,'RecallFailedTimeout');rpcDb[_0xd291('0x96')](_0x527376,_0xd291('0x97'));rpcDb[_0xd291('0x98')](_0x527376,'[HistoryRecallClose]');}}}}})['catch'](ut['logger2'](_0xd291('0x99')));};Preview[_0xd291('0xe')][_0xd291('0x6a')]=function(_0x2a68cf){_0x2a68cf['sendMessageOneNotActive']=!![];if(ut['IsNotLoggedIn'](_0x2a68cf[_0xd291('0x2e')])){_0x2a68cf['message']=_0xd291('0x9a');}else if(!ut[_0xd291('0x9b')](_0x2a68cf[_0xd291('0x35')])){_0x2a68cf[_0xd291('0x50')]=_0xd291('0x60');}else if(!this[_0xd291('0x9c')](_0x2a68cf[_0xd291('0x57')])){if(!this[_0xd291('0x9c')](_0x2a68cf[_0xd291('0x9d')])){_0x2a68cf['message']='TRUNK_IS_NOT_REACHABLE';}else{_0x2a68cf[_0xd291('0x50')]=_0xd291('0x9e');}}else{_0x2a68cf[_0xd291('0x50')]='ACTIVE';}emitCampaignPreview(_0x2a68cf);};Preview[_0xd291('0xe')][_0xd291('0x9f')]=function(_0x597df9,_0x2de9a3,_0x27bc75){var _0x22add5=this;var _0x213025=this[_0xd291('0x6f')][_0x2de9a3];var _0x51f1cc=this[_0xd291('0x12')][_0x213025[_0xd291('0x76')]];var _0xf0348d;if(_0x51f1cc){switch(_0x27bc75){case'1':_0x51f1cc[_0xd291('0x41')]+=0x1;_0x213025['countglobal']=ut[_0xd291('0xa0')](_0x213025);ut[_0xd291('0xa1')](_0x213025,0x0,_0xd291('0xa2'));rpcDb[_0xd291('0x96')](_0x213025,'[callProgressDetectingCustomer][logNoSuch]');if(ut[_0xd291('0xa0')](_0x213025)>=_0x51f1cc[_0xd291('0xa3')]){_0xf0348d=ut[_0xd291('0xa4')](_0x213025,0xf,_0xd291('0xa5'));rpcDb[_0xd291('0x98')](_0xf0348d,_0xd291('0xa6'));}else{rpcDb[_0xd291('0x98')](_0x213025,'[callProgressDetectingCustomer][logNoSuchGlobal]');}delete this[_0xd291('0x6f')][_0x597df9[_0xd291('0xa7')]];break;case _0xd291('0xa8'):var _0x2b1689=moment()[_0xd291('0x5b')]('YYYY-MM-DD\x20HH:mm:ss');_0x213025[_0xd291('0xa9')]=_0x2b1689;_0x213025['answertime']=_0x2b1689;_0x213025[_0xd291('0x77')]=!![];_0x51f1cc[_0xd291('0x2f')]+=0x1;logger[_0xd291('0x70')]('[syncHangup][talking][increment]',_0x213025[_0xd291('0xaa')],'\x20Queue',_0x51f1cc[_0xd291('0x2a')],_0xd291('0x75'),_0x51f1cc[_0xd291('0x2f')]);ami[_0xd291('0xab')](_0xd291('0xac'),ut[_0xd291('0xad')](_0x213025,_0xd291('0xae')));if(_0x51f1cc[_0xd291('0xaf')]){ami['emit'](_0xd291('0xb0'),ut[_0xd291('0xb1')](_0x213025));}break;case'16':ami[_0xd291('0xab')](_0xd291('0xb2'),ut['buildObj'](_0x213025,_0xd291('0xb3')));emitVoiceQueueChannelRemove(ut[_0xd291('0xad')](_0x213025,'complete'));_0x51f1cc[_0xd291('0x3b')]+=0x1;_0x51f1cc['total']+=0x1;_0x51f1cc[_0xd291('0x2c')]+=0x1;ut['decrementTalkink'](_0x51f1cc,_0xd291('0xb4'));_0x213025[_0xd291('0xb5')]=ut[_0xd291('0xa0')](_0x213025);ut['logCustomer'](_0x213025,0x4,_0xd291('0xb6'));rpcDb['createCustomerHistory'](_0x213025,'[callProgressDetectingCustomer][logAnswer]');rpcDb[_0xd291('0x98')](_0x213025,_0xd291('0xb7'));rpcDb[_0xd291('0xb8')](_0x213025);_0x51f1cc[_0xd291('0x30')]+=_0x213025[_0xd291('0xb9')];_0x51f1cc[_0xd291('0xba')]+=_0x213025[_0xd291('0xb9')];logger[_0xd291('0x70')](_0xd291('0xbb'),_0x213025['uniqueid'],'\x20Queue',_0x51f1cc[_0xd291('0x2a')],_0xd291('0x75'),_0x51f1cc[_0xd291('0x2f')]);delete this[_0xd291('0x6f')][_0x597df9['linkedid']];break;case'BUSY':_0x51f1cc[_0xd291('0x3d')]+=0x1;_0x213025[_0xd291('0xbc')]+=0x1;_0x213025[_0xd291('0xb5')]=ut['totalGlobal'](_0x213025);ut[_0xd291('0xa1')](_0x213025,0x5,_0xd291('0xbd'));rpcDb[_0xd291('0x96')](_0x213025,_0xd291('0xbe'));if(ut[_0xd291('0xa0')](_0x213025)>=_0x51f1cc[_0xd291('0xa3')]){_0xf0348d=ut['cloneAction'](_0x213025,0xf,_0xd291('0xa5'));rpcDb[_0xd291('0x98')](_0xf0348d,'[callProgressDetectingCustomer][logBusyGlobal]');}else{if(_0x213025[_0xd291('0xbc')]>=_0x51f1cc[_0xd291('0xbf')]){rpcDb['createCustomerFinal'](_0x213025,_0xd291('0xbe'));}else{rpcDb[_0xd291('0xc0')](ut[_0xd291('0xc1')](_0x213025,_0xd291('0xbc'),_0x51f1cc[_0xd291('0xc2')]),_0x213025[_0xd291('0xc3')],_0x213025[_0xd291('0xc4')]);}}break;case _0xd291('0xc5'):_0x51f1cc[_0xd291('0x40')]+=0x1;_0x213025[_0xd291('0xc6')]+=0x1;_0x213025[_0xd291('0xb5')]=ut[_0xd291('0xa0')](_0x213025);ut[_0xd291('0xa1')](_0x213025,0x3,_0xd291('0xc7'));rpcDb[_0xd291('0x96')](_0x213025,_0xd291('0xc8'));if(ut[_0xd291('0xa0')](_0x213025)>=_0x51f1cc[_0xd291('0xa3')]){_0xf0348d=ut['cloneAction'](_0x213025,0xf,_0xd291('0xa5'));rpcDb[_0xd291('0x98')](_0xf0348d,'[callProgressDetectingCustomer][logNoAnswerGlobal]');}else{if(_0x213025['countnoanswerretry']>=_0x51f1cc[_0xd291('0xc9')]){rpcDb[_0xd291('0x98')](_0x213025,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb['rescheduleContact'](ut[_0xd291('0xc1')](_0x213025,_0xd291('0xc6'),_0x51f1cc[_0xd291('0xca')]),_0x213025['unlockAgent'],_0x213025['activeContact']);}}break;case _0xd291('0xcb'):_0x51f1cc[_0xd291('0xcc')]+=0x1;_0x213025['countcongestionretry']+=0x1;_0x213025[_0xd291('0xb5')]=ut[_0xd291('0xa0')](_0x213025);ut[_0xd291('0xa1')](_0x213025,0x8,'Congestion');rpcDb[_0xd291('0x96')](_0x213025,_0xd291('0xcd'));if(ut[_0xd291('0xa0')](_0x213025)>=_0x51f1cc['dialGlobalMaxRetry']){_0xf0348d=ut[_0xd291('0xa4')](_0x213025,0xf,_0xd291('0xa5'));rpcDb['createCustomerFinal'](_0xf0348d,_0xd291('0xce'));}else{if(_0x213025['countcongestionretry']>=_0x51f1cc['dialCongestionMaxRetry']){rpcDb[_0xd291('0x98')](_0x213025,_0xd291('0xcd'));}else{rpcDb[_0xd291('0xc0')](ut['scheduledAt'](_0x213025,'countcongestionretry',_0x51f1cc[_0xd291('0xc2')]),_0x213025[_0xd291('0xc3')],_0x213025[_0xd291('0xc4')]);}}break;case _0xd291('0xcf'):_0x51f1cc['outboundRejectCallsDay']+=0x1;_0x213025[_0xd291('0xb5')]=ut[_0xd291('0xa0')](_0x213025);ut[_0xd291('0xa1')](_0x213025,0x14,_0xd291('0xd0'));rpcDb[_0xd291('0x96')](_0x213025,'[syncHangupRequest][logAgentReject]');if(_0x213025[_0xd291('0xc3')]){rpcDb[_0xd291('0xd1')](_0x213025[_0xd291('0xd2')]);}if(_0x213025[_0xd291('0xc4')]){rpcDb[_0xd291('0xd3')](_0x213025['idContact']);}break;default:if(_0x213025['dialAnswer']){ut[_0xd291('0x81')](_0x51f1cc,_0xd291('0xd4'));ut[_0xd291('0x84')](_0xd291('0xd5')+_0x51f1cc[_0xd291('0x2a')],_0x597df9);}_0x51f1cc[_0xd291('0x44')]+=0x1;_0x213025[_0xd291('0xb5')]=ut[_0xd291('0xa0')](_0x213025);ut[_0xd291('0xa1')](_0x213025,0xc,_0x597df9['cause-txt']||_0x597df9[_0xd291('0xd6')]);rpcDb[_0xd291('0x96')](_0x213025,'[callProgressDetectingCustomer][logUnknown]');if(ut[_0xd291('0xa0')](_0x213025)>=_0x51f1cc[_0xd291('0xa3')]){_0xf0348d=ut[_0xd291('0xa4')](_0x213025,0xf,_0xd291('0xa5'));rpcDb[_0xd291('0x98')](_0xf0348d,'[callProgressDetectingCustomer][logUnknownGlobal]');}else{rpcDb[_0xd291('0x98')](_0x213025,_0xd291('0xd7'));}delete this[_0xd291('0x6f')][_0x597df9[_0xd291('0xa7')]];}if(!(_0x213025[_0xd291('0x77')]&&_0x27bc75==='16')){ut[_0xd291('0x80')](_0x51f1cc,_0xd291('0xd8'));logger['info'](_0xd291('0xd9'),_0x213025['uniqueid'],'\x20Queue',_0x51f1cc[_0xd291('0x2a')],_0xd291('0x73'),_0x51f1cc[_0xd291('0x5e')]);}if(_0x27bc75!==_0xd291('0xa8')){delete this['actions'][_0x597df9[_0xd291('0xa7')]];delete this['actions'][_0x597df9['destlinkedid']];}}};Preview[_0xd291('0xe')][_0xd291('0xda')]=function(_0x44a3f9,_0x5ce8a5,_0x1446f4){if(_[_0xd291('0xdb')](_0x5ce8a5)&&'object'!==typeof _0x5ce8a5){return;}if(_['isUndefined'](_0x1446f4)&&_0xd291('0xdc')!==typeof _0x1446f4){return;}switch(_0x1446f4[_0xd291('0xdd')]){case'0':ut[_0xd291('0xde')](_0x44a3f9,0x0,'NoSuchNumber');rpcDb[_0xd291('0xdf')](_0x44a3f9,_0xd291('0xe0'));break;case'3':ut[_0xd291('0xde')](_0x44a3f9,0x3,'NoAnswer');rpcDb[_0xd291('0xdf')](_0x44a3f9,_0xd291('0xe1'));break;case'5':ut['logAgent'](_0x44a3f9,0x5,_0xd291('0xbd'));rpcDb['createAgentHistory'](_0x44a3f9,'[callProgressDetectingAgent][logBusy]');break;case'8':ut['logAgent'](_0x44a3f9,0x8,_0xd291('0xe2'));rpcDb[_0xd291('0xdf')](_0x44a3f9,_0xd291('0xe3'));break;case'22':ut[_0xd291('0xde')](_0x44a3f9,0x16,_0xd291('0xe4'));rpcDb[_0xd291('0xdf')](_0x44a3f9,_0xd291('0xe5'));break;default:ut['logAgent'](_0x44a3f9,0xc,_0x1446f4[_0xd291('0xdd')]);rpcDb[_0xd291('0xdf')](_0x44a3f9,_0xd291('0xe3'));}ut['updateOriginated'](_0x5ce8a5,'[callProgressDetectingAgent]');logger[_0xd291('0x70')](_0xd291('0xe6'),_0x44a3f9[_0xd291('0xaa')],_0xd291('0xe7'),_0x5ce8a5[_0xd291('0x2a')],'originated:\x20',_0x5ce8a5[_0xd291('0x5e')]);delete this[_0xd291('0x6f')][_0x44a3f9[_0xd291('0xaa')]];};Preview[_0xd291('0xe')][_0xd291('0xe8')]=function(_0x33b330,_0x5df407,_0x114d22,_0x1390e4,_0x1d21fe){var _0x765c9b=this;return new BPromise(function(_0x3d23d8,_0x5356a4){if(_[_0xd291('0x6e')](_0x5df407)||_['isNil'](_0x5df407[_0xd291('0xe9')])||_[_0xd291('0x6e')](_0x5df407[_0xd291('0xe9')]['phone'])||_['isNil'](_0x5df407[_0xd291('0x7a')])){_0x5356a4(ut['message'](_0xd291('0xea'),_0x1390e4,_0x1d21fe));return;}var _0x318c02=uuid['v4']();var _0x112696=_0x765c9b[_0xd291('0x12')][_0x5df407[_0xd291('0x72')][_0xd291('0x2a')]];var _0x427359=_0x114d22?_0x765c9b[_0xd291('0x15')][_0x114d22]['id']:undefined;_0x765c9b[_0xd291('0x6f')][_0x318c02]=new Action(_0x5df407,_0x112696,_0x318c02,_0x114d22,_0x427359);var _0xf04610=_0x765c9b[_0xd291('0x6f')][_0x318c02];_0xf04610[_0xd291('0xc3')]=_0x1390e4;_0xf04610[_0xd291('0xc4')]=_0x1d21fe;_0xf04610[_0xd291('0xeb')]=_0x114d22;if(_[_0xd291('0xec')](_0x33b330)){_0x765c9b['execCall'](_0xf04610,_0x112696,_0x5df407,_0x114d22)['then'](function(_0x17bf78){logger[_0xd291('0x70')](_0xd291('0xed'),_0xd291('0xee')+_0xf04610['queue']+_0xd291('0xef')+_0xf04610[_0xd291('0xd2')],JSON['stringify'](_0x17bf78));ami['emit'](_0xd291('0xf0'),ut[_0xd291('0xad')](_0xf04610,_0xd291('0xf1')));_0x3d23d8(ut[_0xd291('0x50')]('Calling'));})[_0xd291('0x90')](function(_0x67963){ut[_0xd291('0x61')]('[Preview][execCall][failure]',_0x67963);_0x5356a4(ut[_0xd291('0x50')](_0xd291('0xf2'),_0x1390e4,_0x1d21fe));});}else{_0x112696[_0xd291('0x3c')]+=0x1;ut['logBlacklist'](_0xf04610);rpcDb[_0xd291('0xf3')](_0xf04610,_0xd291('0xf4'));delete _0x765c9b[_0xd291('0x6f')][_0x318c02];_0x5356a4(ut[_0xd291('0x50')](_0xd291('0xf5'),_0x1390e4,_0x1d21fe));}});};Preview[_0xd291('0xe')][_0xd291('0x9c')]=function(_0x1ce343){return!_[_0xd291('0x6e')](_0x1ce343)&&!_[_0xd291('0x6e')](_0x1ce343[_0xd291('0x2a')])&&!_['isNil'](_0x1ce343[_0xd291('0x58')])&&_0x1ce343['active']&&!_[_0xd291('0x6e')](this[_0xd291('0x14')][util[_0xd291('0x5b')](_0xd291('0xf6'),_0x1ce343[_0xd291('0x2a')])])&&!_[_0xd291('0x6e')](this['trunks'][util[_0xd291('0x5b')](_0xd291('0xf6'),_0x1ce343[_0xd291('0x2a')])][_0xd291('0x7d')])&&(this[_0xd291('0x14')][util[_0xd291('0x5b')](_0xd291('0xf6'),_0x1ce343[_0xd291('0x2a')])][_0xd291('0x7d')]===_0xd291('0xf7')||this[_0xd291('0x14')][util['format'](_0xd291('0xf6'),_0x1ce343[_0xd291('0x2a')])]['status']===_0xd291('0xf8'));};Preview[_0xd291('0xe')][_0xd291('0x8d')]=function(_0x254a71,_0x1cad78){var _0x1e4c79=this;return new BPromise(function(_0x28d94d,_0x68e5d9){_0x1e4c79[_0xd291('0xf9')](_0x254a71,_0x1cad78)[_0xd291('0x89')](function(_0x10d703){_0x28d94d(_[_0xd291('0xfa')](_0x10d703,[_0xd291('0x50')]));})[_0xd291('0x90')](function(_0x53d137){if(_0x53d137[_0xd291('0xfb')]){rpcDb[_0xd291('0xd1')](_0x254a71);}if(_0x53d137[_0xd291('0x58')]){rpcDb['disableContact'](_0x254a71);}_0x68e5d9(_[_0xd291('0xfa')](_0x53d137,['message']));});});};Preview[_0xd291('0xe')]['execRun']=function(_0x3b91ec,_0x31e56c){var _0x4fb5a5=this;return new BPromise(function(_0x3595a6,_0x59de51){var _0x2bd9a7,_0x36e434;rpcDb['getContactPreview'](_0x3b91ec)[_0xd291('0x89')](function(_0x36793f){if(!_[_0xd291('0x6e')](_0x36793f[0x0])){_0x36e434=_0x36793f[0x0][_0xd291('0xfc')]?![]:!![];_0x2bd9a7=_0x36793f[0x0][_0xd291('0xfc')]?!![]:![];_0x2bd9a7=_0x31e56c?!![]:_0x2bd9a7;}var _0x2f1945=_0x4fb5a5[_0xd291('0xfd')](_0x36793f);if(_0x2f1945[_0xd291('0xfe')]){rpcDb[_0xd291('0xff')](_['pick'](_0x36793f[0x0],['VoiceQueueId',_0xd291('0x100')]))[_0xd291('0x89')](function(_0x3ec939){_0x4fb5a5[_0xd291('0xe8')](_0x3ec939,_0x36793f[0x0],_0x31e56c,_0x36e434,_0x2bd9a7)[_0xd291('0x89')](function(_0x3cfa04){_0x3595a6(_0x3cfa04);})['catch'](function(_0x32358d){_0x59de51(_0x32358d);});})[_0xd291('0x90')](function(_0x4ed0af){ut[_0xd291('0x61')](_0xd291('0x101'),_0x4ed0af);_0x59de51(ut['message']('Call\x20unsuccessful',_0x36e434,_0x2bd9a7));});}else{_0x59de51(ut[_0xd291('0x50')](_0x2f1945[_0xd291('0x50')],_0x36e434,_0x2bd9a7));}})[_0xd291('0x90')](function(_0x299a42){ut[_0xd291('0x61')](_0xd291('0x102'),_0x299a42);_0x59de51(ut[_0xd291('0x50')]('Call\x20unsuccessful',![],!![]));});});};Preview[_0xd291('0xe')][_0xd291('0xfd')]=function(_0x12652a){if(_[_0xd291('0x6e')](_0x12652a)||_[_0xd291('0xec')](_0x12652a)||!_[_0xd291('0x6e')](_0x12652a[0x0][_0xd291('0x103')])&&_[_0xd291('0x6e')](_0x12652a[0x0]['Agent'][_0xd291('0x2a')])){ut[_0xd291('0x61')]('[Preview][validateContact][Empty\x20Contact]',_0x12652a);return{'isValid':![],'message':_0xd291('0x104')};}var _0x499b2a=this[_0xd291('0x12')][_0x12652a[0x0][_0xd291('0x72')][_0xd291('0x2a')]];_0x499b2a['message']=_0xd291('0x9e');if(_['isNil'](_0x499b2a)){ut[_0xd291('0x61')](_0xd291('0x105'),_0x499b2a);return{'isValid':![],'message':_0xd291('0x106')};}if(!this[_0xd291('0x9c')](_0x499b2a[_0xd291('0x57')])){ut[_0xd291('0x61')](_0xd291('0x107'),_0xd291('0x108')+_0x499b2a[_0xd291('0x2a')]+_0xd291('0x109'));if(!this[_0xd291('0x9c')](_0x499b2a[_0xd291('0x9d')])){ut[_0xd291('0x61')](_0xd291('0x107'),_0x499b2a[_0xd291('0x2a')]+_0xd291('0x10a'));return{'isValid':![],'message':_0xd291('0x10b')};}}if(!ut[_0xd291('0x9b')](_0x499b2a[_0xd291('0x35')])){ut[_0xd291('0x61')](_0xd291('0x10c'),_0x499b2a[_0xd291('0x2a')]+'\x20Not\x20Active');return{'isValid':![],'message':_0xd291('0x108')+_0x499b2a['name']+'\x20Not\x20Active'};}return{'isValid':!![],'message':_0xd291('0x10d')};};Preview[_0xd291('0xe')][_0xd291('0x10e')]=function(_0x2a04ac,_0x2ee76b,_0x37556c,_0x3e58c1){var _0x3ad387=this;return new BPromise(function(_0x25c05b,_0x129f27){var _0x14993a=_0x2a04ac[_0xd291('0xaa')];var _0xee7d64=_0x3ad387['isTrunkReachable'](_0x2ee76b[_0xd291('0x57')])?util[_0xd291('0x5b')](_0xd291('0x10f'),_0x2ee76b['Trunk'][_0xd291('0x2a')],_[_0xd291('0x6e')](_0x2ee76b['dialPrefix'])?'':_0x2ee76b['dialPrefix']['trim']()||'',_0x2ee76b[_0xd291('0x110')]>0x0?_0x37556c['Contact'][_0xd291('0x111')][_0xd291('0x112')](_0x2ee76b[_0xd291('0x110')]):_0x37556c[_0xd291('0xe9')][_0xd291('0x111')]):util[_0xd291('0x5b')]('SIP/%s/%s%s',_[_0xd291('0x6e')](_0x2ee76b[_0xd291('0x9d')])?_0x2ee76b[_0xd291('0x57')][_0xd291('0x2a')]:_0x2ee76b[_0xd291('0x9d')][_0xd291('0x2a')],_[_0xd291('0x6e')](_0x2ee76b[_0xd291('0x39')])?'':_0x2ee76b['dialPrefix'][_0xd291('0x113')]()||'',_0x2ee76b[_0xd291('0x110')]>0x0?_0x37556c['Contact'][_0xd291('0x111')]['substring'](_0x2ee76b['dialCutDigit']):_0x37556c[_0xd291('0xe9')][_0xd291('0x111')]);var _0x1075a7=_0x3ad387['isTrunkReachable'](_0x2ee76b[_0xd291('0x57')])?ut['getCallerId'](_0x2ee76b[_0xd291('0x57')][_0xd291('0x59')],_0x2ee76b[_0xd291('0x37')],_0x2ee76b['dialRandomLastDigitCallerIdNumber']>0x0?ut[_0xd291('0x114')](_0x2ee76b[_0xd291('0x115')],_0x2ee76b['dialRandomLastDigitCallerIdNumber']):_0x2ee76b['dialOriginateCallerIdNumber']):ut['getCallerId'](_[_0xd291('0x6e')](_0x2ee76b[_0xd291('0x9d')])?_0x2ee76b[_0xd291('0x57')]['callerid']:_0x2ee76b['TrunkBackup']['callerid'],_0x2ee76b['dialOriginateCallerIdName'],_0x2ee76b[_0xd291('0x116')]>0x0?ut[_0xd291('0x114')](_0x2ee76b['dialOriginateCallerIdNumber'],_0x2ee76b[_0xd291('0x116')]):_0x2ee76b[_0xd291('0x115')]);if(_0x1075a7){_0x2a04ac['originatecalleridname']=ut[_0xd291('0x117')](_0x1075a7);_0x2a04ac[_0xd291('0x118')]=ut[_0xd291('0x119')](_0x1075a7);}var _0x43df9b=ut[_0xd291('0x11a')](_0x2ee76b,_0x37556c,_0xee7d64,_0x1075a7,_0x14993a,_0x2a04ac);_[_0xd291('0x11b')](_0x2a04ac,ut[_0xd291('0x11c')](_0x43df9b));_0x2a04ac[_0xd291('0x91')]=moment()[_0xd291('0x5b')](_0xd291('0x92'));ami[_0xd291('0x7c')](ut[_0xd291('0x11d')](_0x2a04ac,_0x2ee76b,_0x43df9b,_0x2a04ac[_0xd291('0xc4')],_0x3e58c1))['then'](function(_0xce086e){_0x2ee76b[_0xd291('0x5e')]+=0x1;logger[_0xd291('0x70')]('[originated][increment]',_0x14993a,_0xd291('0xe7'),_0x2ee76b[_0xd291('0x2a')],_0xd291('0x73'),_0x2ee76b[_0xd291('0x5e')]);_0x25c05b(_0xce086e);})[_0xd291('0x90')](function(_0x22e6d2){ut[_0xd291('0xde')](_0x2a04ac,0xe,_0xd291('0x11e'));rpcDb[_0xd291('0xdf')](_0x2a04ac,'[originateFailure][logOriginateFailure]');_0x129f27(_0x22e6d2);});});};Preview[_0xd291('0xe')][_0xd291('0x20')]=function(_0x5d7442){if(this[_0xd291('0x6f')][_0x5d7442['linkedid']]){this[_0xd291('0x6f')][_0x5d7442['linkedid']][_0xd291('0x7e')]=_0x5d7442[_0xd291('0x7e')];}};Preview['prototype'][_0xd291('0x11f')]=function(_0xdfd854){var _0x33c730=this;var _0x3b8332=this[_0xd291('0x6f')][_0xdfd854[_0xd291('0x120')]];if(_0x3b8332){if(_0x3b8332[_0xd291('0xeb')]&&this[_0xd291('0x15')][_0x3b8332[_0xd291('0xeb')]]){ut['logLookAgent'](_0x3b8332,this[_0xd291('0x15')][_0x3b8332[_0xd291('0xeb')]][_0xd291('0x2a')],this[_0xd291('0x15')][_0x3b8332[_0xd291('0xeb')]]['id']);}var _0x537858=_['clone'](_0x3b8332);_0x537858[_0xd291('0xa9')]=moment()[_0xd291('0x5b')]('YYYY-MM-DD\x20HH:mm:ss');var _0x3d35c7=_0x33c730[_0xd291('0x12')][_0x3b8332[_0xd291('0x76')]];if(ut[_0xd291('0x121')](_0xdfd854['response'])){if(_0x3b8332[_0xd291('0xc3')]){rpcDb[_0xd291('0xd1')](_0x3b8332['idContact']);}if(_0x3b8332[_0xd291('0xc4')]){rpcDb['disableContact'](_0x3b8332[_0xd291('0xd2')]);}ami[_0xd291('0xab')]('custom:agentringnoanswer',ut[_0xd291('0xad')](_0x3b8332,'rejected'));this[_0xd291('0xda')](_0x537858,_0x3d35c7,_0xdfd854);}else{_0x3b8332[_0xd291('0x91')]=moment()[_0xd291('0x5b')](_0xd291('0x92'));ut['logAgent'](_0x537858,0x4,_0xd291('0xb6'));rpcDb['createAgentHistory'](_0x537858,_0xd291('0x122'));}}};Preview['prototype'][_0xd291('0x19')]=function(_0x283fe6){var _0x2a764e=this;var _0x21bb92=this[_0xd291('0x6f')][_0x283fe6['linkedid']];var _0x47081a;if(_0x21bb92){_0x47081a=this[_0xd291('0x12')][_0x21bb92[_0xd291('0x76')]];logger[_0xd291('0x70')]('[syncHangup][talking]',_0x283fe6[_0xd291('0xa7')],'\x20Queue',_0x47081a[_0xd291('0x2a')],_0xd291('0x75'),_0x47081a[_0xd291('0x2f')]);}if(this[_0xd291('0x6f')][_0x283fe6[_0xd291('0xa7')]]&&_0x283fe6[_0xd291('0xa7')]!==_0x283fe6[_0xd291('0xaa')]){if(_0x283fe6[_0xd291('0x123')]==='16'&&this[_0xd291('0x6f')][_0x283fe6['linkedid']]['dialAnswer']){this[_0xd291('0x9f')](_0x283fe6,_0x283fe6[_0xd291('0xa7')],_0x283fe6[_0xd291('0x123')]);}else if(this['actions'][_0x283fe6[_0xd291('0xa7')]]['dialAnswer']){logger[_0xd291('0x70')](_0xd291('0x124'),_0x283fe6[_0xd291('0xa7')],_0x283fe6[_0xd291('0x123')],_0xd291('0xe7'),_0x47081a[_0xd291('0x2a')],_0xd291('0x75'),_0x47081a[_0xd291('0x2f')]);this[_0xd291('0x9f')](_0x283fe6,_0x283fe6['linkedid'],_0x283fe6[_0xd291('0x123')]);}}else if(_0x21bb92&&_[_0xd291('0x6e')](_0x21bb92[_0xd291('0x125')])&&_0x47081a[_0xd291('0x126')]&&_0x283fe6[_0xd291('0xa7')]===_0x283fe6[_0xd291('0xaa')]&&_[_0xd291('0x6e')](_0x283fe6[_0xd291('0xdd')])&&_0x283fe6[_0xd291('0x123')]==='16'&&_0x283fe6[_0xd291('0x127')]==='6'&&_[_0xd291('0xdb')](_0x21bb92[_0xd291('0x128')])){if(_0x21bb92['unlockAgent']){rpcDb[_0xd291('0xd1')](_0x21bb92[_0xd291('0xd2')]);}if(_0x21bb92['activeContact']){rpcDb['disableContact'](_0x21bb92[_0xd291('0xd2')]);}_0x283fe6[_0xd291('0xdd')]='22';this[_0xd291('0xda')](_0x21bb92,_0x47081a,_0x283fe6);}else if(_0x21bb92&&_0x21bb92['transfer']){if(_0x283fe6[_0xd291('0x123')]==='16'&&this[_0xd291('0x6f')][_0x283fe6[_0xd291('0xa7')]][_0xd291('0x77')]){logger[_0xd291('0x70')](_0xd291('0x129'),_0x283fe6['linkedid'],_0x283fe6[_0xd291('0x123')],_0xd291('0xe7'),_0x47081a[_0xd291('0x2a')],_0xd291('0x75'),_0x47081a[_0xd291('0x2f')]);this[_0xd291('0x9f')](_0x283fe6,_0x283fe6['linkedid'],_0x283fe6[_0xd291('0x123')]);}else if(this['actions'][_0x283fe6['linkedid']]['dialAnswer']){logger[_0xd291('0x70')](_0xd291('0x124'),_0x283fe6[_0xd291('0xa7')],_0x283fe6[_0xd291('0x123')],'\x20Queue',_0x47081a[_0xd291('0x2a')],'pTalking:\x20',_0x47081a[_0xd291('0x2f')]);this['callProgressDetectingCustomer'](_0x283fe6,_0x283fe6[_0xd291('0xa7')],_0x283fe6['cause']);}}};Preview[_0xd291('0xe')]['syncDialEnd']=function(_0x5626ca){if(this[_0xd291('0x6f')][_0x5626ca['destlinkedid']]&&_0x5626ca[_0xd291('0x12a')]!==_0x5626ca['destuniqueid']){this[_0xd291('0x9f')](_0x5626ca,_0x5626ca['destlinkedid'],_0x5626ca[_0xd291('0xd6')]);}};Preview['prototype']['syncHangupRequest']=function(_0x416e5f){if(this[_0xd291('0x6f')][_0x416e5f[_0xd291('0xa7')]]&&_0x416e5f['linkedid']!==_0x416e5f[_0xd291('0xaa')]&&!this[_0xd291('0x6f')][_0x416e5f[_0xd291('0xa7')]][_0xd291('0x77')]){if(_0x416e5f[_0xd291('0x123')]==='1'){this[_0xd291('0x9f')](_0x416e5f,_0x416e5f[_0xd291('0xa7')],_0x416e5f[_0xd291('0x123')]);}}};Preview[_0xd291('0xe')][_0xd291('0x12b')]=function(_0x5c1586,_0x196ae1,_0x4475e5){if(this[_0xd291('0x6f')][_0x5c1586]){if(_[_0xd291('0x6e')](this[_0xd291('0x6f')][_0x5c1586][_0xd291('0x12c')])){this[_0xd291('0x6f')][_0x5c1586]['variables']={};}this[_0xd291('0x6f')][_0x5c1586]['variables'][_0x196ae1]=_0x4475e5;}};Preview[_0xd291('0xe')][_0xd291('0x22')]=function(_0x572c69){try{if(!_[_0xd291('0x6e')](_0x572c69)){if(ut['filterKey'](_[_0xd291('0x12d')](_0x572c69['variable'])[0x0])){this[_0xd291('0x12b')](_0x572c69[_0xd291('0xaa')],_['keys'](_0x572c69['variable'])[0x0],_0x572c69[_0xd291('0x12e')]);}}}catch(_0x3f63b6){logger[_0xd291('0x12f')](_0xd291('0x130'),util[_0xd291('0x131')](_0x3f63b6,{'showHidden':![],'depth':null}));}};Preview[_0xd291('0xe')][_0xd291('0x24')]=function(_0x4b0cd2){if(_0x4b0cd2){if(this[_0xd291('0x6f')][_0x4b0cd2[_0xd291('0x132')]]){this[_0xd291('0x6f')][_0x4b0cd2[_0xd291('0x132')]][_0xd291('0x128')]=!![];}}};Preview[_0xd291('0xe')][_0xd291('0x26')]=function(_0x151b91){if(_0x151b91){if(this[_0xd291('0x6f')][_0x151b91[_0xd291('0x133')]]){this[_0xd291('0x6f')][_0x151b91[_0xd291('0x133')]]['transfer']=!![];}}};module[_0xd291('0x134')]=Preview;
\ No newline at end of file
+var _0x068f=['CONGESTION','countcongestionretry','Congestion','dialCongestionMaxRetry','[callProgressDetectingCustomer][logCongestion]','AgentReject','[syncHangupRequest][logAgentReject]','unlockContact','idContact','disableContact','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','cause-txt','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','isUndefined','object','reason','NoSuchNumber','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','[callProgressDetectingAgent][logNoAnswer]','logAgent','[callProgressDetectingAgent][logCongestion]','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','isEmpty','execCall','[Preview][execCall][success]','custom:agentcalled','called','Calling','Call\x20failed','logBlacklist','[Blacklist][error]','Contact\x20in\x20black\x20List','active','SIP/%s','unmonitored','run','execRun','unlock','getContactPreview','recallme','validateContact','isValid','Call\x20unsuccessful','[Preview][getContactPreview]','Agent','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20work]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','\x20Trunk\x20Backup\x20is\x20not\x20active','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','Is\x20Valid','phone','substring','dialCutDigit','getCallerId','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','originatecalleridname','extractCalleridName','extractCalleridNumber','addVariables','merge','toLowerVariables','variablesAction','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','channel','actionid','lookAgent','logLookAgent','custom:agentringnoanswer','rejected','syncHangup','cause','statedesc','dialQueueProject','channelstate','transfer','[syncHangup][talking][transfer]','dialstatus','addVariable','variables','variable','keys','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','lodash','bluebird','md5','ioredis','../../../config/environment','../../../config/logger','../ami','./rpcDb','./action','./util/util','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','sequence','campaignsPreview','voiceQueues','trunks','actions','agents','clockClearZombieChannels','originateresponse','syncOriginateResponse','bind','hanguprequest','syncHangupRequest','dialend','syncDialEnd','newexten','syncNewExten','varset','syncVarSet','syncAttendedTransfer','blindtransfer','syncBlindTransfer','emit','type','outbound','strategy','available','loggedIn','pTalking','sumBillable','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','waiting','loggedInDb','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','originated','erlangCalls','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','name','callerid','Interval','stringify','format','voice:queue:%s','voice_queue:save','sendMessageOneNotActive','paused','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','IS_DISACTIVED','\x20is\x20disactive','syncCampaigns','hasOwnProperty','preview','booked','clearZombieChannels','setMessage','recallMe','isNil','info','[clearZombieChannels][talking]','Queue','queue','originated:\x20','pTalking:\x20','dialAnswer','pick','UserId','VoiceQueueId','ListId','Action','status','catch','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','loggerError','[Dialer][checkChannel][pTalking][Preview]','size','getContactRecallMe','agentReadyId','length','getDiff','dialRecallMeTimeout','then','logger2','[RecallMe]','starttime','YYYY-MM-DD\x20HH:mm:ss','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','[HistoryRecallClose]','[getContactRecallMe]','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','ACTIVE','callProgressDetectingCustomer','countglobal','totalGlobal','[callProgressDetectingCustomer][logNoSuch]','dialGlobalMaxRetry','cloneAction','Global','createCustomerFinal','[callProgressDetectingCustomer][logNoSuchGlobal]','linkedid','ANSWER','responsetime','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','custom:agentconnect','buildObj','connect','custom:agentConnectPreview','custom:agentcomplete','complete','answered','decrementTalkink','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','talktime','[syncHangup][talking][decrement]','BUSY','countbusyretry','Busy','[callProgressDetectingCustomer][logBusy]','[callProgressDetectingCustomer][logBusyGlobal]','rescheduleContact','scheduledAt','dialBusyRetryFrequency','unlockAgent','activeContact','NOANSWER','countnoanswerretry','[callProgressDetectingCustomer][logNoAnswer]','[callProgressDetectingCustomer][logNoAnswerGlobal]','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency'];(function(_0x4fc9e6,_0xc51915){var _0x551d28=function(_0x1a603b){while(--_0x1a603b){_0x4fc9e6['push'](_0x4fc9e6['shift']());}};_0x551d28(++_0xc51915);}(_0x068f,0x1a1));var _0xf068=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0x068f[_0x178e48];return _0x440d7e;};'use strict';var util=require(_0xf068('0x0'));var _=require(_0xf068('0x1'));var BPromise=require(_0xf068('0x2'));var uuid=require('uuid');var moment=require('moment');var md5=require(_0xf068('0x3'));var Redis=require(_0xf068('0x4'));var config=require(_0xf068('0x5'));var logger=require(_0xf068('0x6'))('preview');var loggerAction=require(_0xf068('0x6'))('actionPreview');var ami=require(_0xf068('0x7'));var rpcDb=require(_0xf068('0x8'));var Action=require(_0xf068('0x9'));var ut=require(_0xf068('0xa'));config[_0xf068('0xb')]=_[_0xf068('0xc')](config['redis'],{'host':_0xf068('0xd'),'port':0x18eb});var io=require(_0xf068('0xe'))(new Redis(config[_0xf068('0xb')]));var Sequence=function(){};Sequence[_0xf068('0xf')][_0xf068('0x10')]=function(_0x580395){this[_0xf068('0x11')]=this[_0xf068('0x11')]?this[_0xf068('0x11')][_0xf068('0x12')](_0x580395):_0x580395();};function Preview(_0x22c863){this[_0xf068('0x13')]=new Sequence();this[_0xf068('0x14')]=_0x22c863[_0xf068('0x15')];this['trunks']=_0x22c863[_0xf068('0x16')];this[_0xf068('0x17')]={};this[_0xf068('0x18')]=_0x22c863[_0xf068('0x18')];this[_0xf068('0x19')]=0x0;ami['on'](_0xf068('0x1a'),this[_0xf068('0x1b')][_0xf068('0x1c')](this));ami['on']('hangup',this['syncHangup'][_0xf068('0x1c')](this));ami['on'](_0xf068('0x1d'),this[_0xf068('0x1e')][_0xf068('0x1c')](this));ami['on'](_0xf068('0x1f'),this[_0xf068('0x20')][_0xf068('0x1c')](this));ami['on'](_0xf068('0x21'),this[_0xf068('0x22')][_0xf068('0x1c')](this));ami['on'](_0xf068('0x23'),this[_0xf068('0x24')][_0xf068('0x1c')](this));ami['on']('attendedtransfer',this[_0xf068('0x25')][_0xf068('0x1c')](this));ami['on'](_0xf068('0x26'),this[_0xf068('0x27')][_0xf068('0x1c')](this));this['loopCampaigns'](this[_0xf068('0x14')]);}function emit(_0x2a6750,_0x4ec4b1,_0x1d7256){io['to'](_0x2a6750)[_0xf068('0x28')](_0x4ec4b1,_0x1d7256);}function emitCampaignPreview(_0x3b2603){if(_0x3b2603[_0xf068('0x29')]===_0xf068('0x2a')){var _0x3df738={'id':_0x3b2603['id'],'name':_0x3b2603['name'],'strategy':_0x3b2603[_0xf068('0x2b')],'answered':_0x3b2603['answered'],'available':_0x3b2603[_0xf068('0x2c')],'loggedIn':_0x3b2603[_0xf068('0x2d')],'pTalking':_0x3b2603[_0xf068('0x2e')],'sumBillable':_0x3b2603[_0xf068('0x2f')],'sumDuration':_0x3b2603[_0xf068('0x30')],'sumHoldTime':_0x3b2603[_0xf068('0x31')]||0x0,'talking':_0x3b2603[_0xf068('0x32')],'total':_0x3b2603[_0xf068('0x33')],'type':_0x3b2603[_0xf068('0x29')],'unmanaged':_0x3b2603[_0xf068('0x34')],'abandoned':_0x3b2603[_0xf068('0x35')],'waiting':_0x3b2603[_0xf068('0x36')],'loggedInDb':_0x3b2603[_0xf068('0x37')],'dialActive':_0x3b2603[_0xf068('0x38')],'dialMethod':_0x3b2603[_0xf068('0x39')],'dialOriginateCallerIdName':_0x3b2603[_0xf068('0x3a')],'dialOriginateCallerIdNumber':_0x3b2603[_0xf068('0x3b')],'dialOriginateTimeout':_0x3b2603[_0xf068('0x3c')],'dialPrefix':_0x3b2603[_0xf068('0x3d')],'outboundAnswerAgiCallsDay':_0x3b2603['outboundAnswerAgiCallsDay'],'outboundAnswerCallsDay':_0x3b2603[_0xf068('0x3e')],'outboundBlacklistCallsDay':_0x3b2603['outboundBlacklistCallsDay'],'outboundBusyCallsDay':_0x3b2603[_0xf068('0x3f')],'outboundCongestionCallsDay':_0x3b2603[_0xf068('0x40')],'outboundDropCallsDayACS':_0x3b2603[_0xf068('0x41')],'outboundDropCallsDayCallersExit':_0x3b2603[_0xf068('0x42')],'outboundDropCallsDayTimeout':_0x3b2603[_0xf068('0x43')],'outboundNoAnswerCallsDay':_0x3b2603[_0xf068('0x44')],'outboundNoSuchCallsDay':_0x3b2603[_0xf068('0x45')],'outboundOriginateFailureCallsDay':_0x3b2603['outboundOriginateFailureCallsDay'],'outboundReCallsDay':_0x3b2603[_0xf068('0x46')],'outboundRejectCallsDay':_0x3b2603[_0xf068('0x47')],'outboundUnknownCallsDay':_0x3b2603[_0xf068('0x48')],'predictiveIntervalAnsweredCalls':_0x3b2603[_0xf068('0x49')],'predictiveIntervalAvgHoldtime':_0x3b2603[_0xf068('0x4a')],'predictiveIntervalAvgTalktime':_0x3b2603['predictiveIntervalAvgTalktime'],'predictiveIntervalDroppedCallsCallersExit':_0x3b2603[_0xf068('0x4b')],'predictiveIntervalDroppedCallsTimeout':_0x3b2603[_0xf068('0x4c')],'predictiveIntervalErlangCalls':_0x3b2603['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x3b2603[_0xf068('0x4d')],'predictiveIntervalHitRate':_0x3b2603['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x3b2603['predictiveIntervalMultiplicativeFactor'],'predictiveIntervalPauses':_0x3b2603[_0xf068('0x4e')],'predictiveIntervalAvailable':_0x3b2603[_0xf068('0x4f')],'predictiveIntervalTotalCalls':_0x3b2603[_0xf068('0x50')],'message':_0x3b2603[_0xf068('0x51')],'originated':_0x3b2603[_0xf068('0x52')],'erlangCalls':_0x3b2603[_0xf068('0x53')],'erlangCallToSecond':_0x3b2603['erlangCallToSecond'],'erlangAbandonmentRate':_0x3b2603[_0xf068('0x54')],'erlangBusyFactor':_0x3b2603[_0xf068('0x55')],'startPredictive':_0x3b2603[_0xf068('0x56')],'startProgressive':_0x3b2603[_0xf068('0x57')]};if(_0x3b2603['Trunk']){_0x3df738[_0xf068('0x58')]={'id':_0x3b2603[_0xf068('0x58')]['id'],'name':_0x3b2603[_0xf068('0x58')][_0xf068('0x59')],'active':_0x3b2603[_0xf068('0x58')]['active'],'callerid':_0x3b2603[_0xf068('0x58')][_0xf068('0x5a')]};}if(_0x3b2603[_0xf068('0x5b')]){_0x3df738[_0xf068('0x5b')]={'id':_0x3b2603[_0xf068('0x5b')]['id'],'name':_0x3b2603[_0xf068('0x5b')][_0xf068('0x59')]};}var _0x2ae740=md5(JSON[_0xf068('0x5c')](_0x3df738));if(_0x3b2603[_0xf068('0x3')]!==_0x2ae740){_0x3b2603[_0xf068('0x3')]=_0x2ae740;emit(util[_0xf068('0x5d')](_0xf068('0x5e'),_0x3df738[_0xf068('0x59')]),_0xf068('0x5f'),_0x3df738);}}}function emitVoiceQueueChannelRemove(_0x1812cc){emit(util['format']('voice:queue:%s',_0x1812cc[_0xf068('0x59')]),'voice_queue_channel:remove',_0x1812cc);}function notSendMessagesQueue(_0x45df46){if(_0x45df46[_0xf068('0x60')]){if(_0x45df46[_0xf068('0x52')]===0x0&&_0x45df46[_0xf068('0x2e')]===0x0){_0x45df46['sendMessageOneNotActive']=![];_0x45df46[_0xf068('0x2c')]=0x0;_0x45df46[_0xf068('0x61')]=0x0;_0x45df46[_0xf068('0x51')]='NOT_ACTIVE';ut[_0xf068('0x62')](_0xf068('0x63'),_0x45df46[_0xf068('0x59')]+_0xf068('0x64'));}else{_0x45df46['message']=_0xf068('0x65');ut[_0xf068('0x62')](_0xf068('0x63'),_0x45df46[_0xf068('0x59')]+_0xf068('0x66'));}emitCampaignPreview(_0x45df46);}}Preview[_0xf068('0xf')]['loopCampaigns']=function(){var _0xfdd9ee=this;setInterval(function(){_0xfdd9ee[_0xf068('0x67')]();},0x7cf);};Preview[_0xf068('0xf')][_0xf068('0x67')]=function(){var _0x26b68f=this[_0xf068('0x14')];this[_0xf068('0x19')]+=0x1;for(var _0x54f1f9 in _0x26b68f){if(_0x26b68f[_0xf068('0x68')](_0x54f1f9)&&(_0x26b68f[_0x54f1f9]['dialMethod']===_0xf068('0x69')||_0x26b68f[_0x54f1f9][_0xf068('0x39')]===_0xf068('0x6a'))&&_0x26b68f[_0x54f1f9][_0xf068('0x29')]===_0xf068('0x2a')){if(this[_0xf068('0x19')]>0x7){this[_0xf068('0x19')]=0x0;this[_0xf068('0x6b')]();}}if(_0x26b68f['hasOwnProperty'](_0x54f1f9)&&_0x26b68f[_0x54f1f9][_0xf068('0x39')]===_0xf068('0x69')&&_0x26b68f[_0x54f1f9][_0xf068('0x29')]===_0xf068('0x2a')){if(_0x26b68f[_0x54f1f9][_0xf068('0x38')]){this[_0xf068('0x6c')](_0x26b68f[_0x54f1f9]);this[_0xf068('0x6d')](_0x26b68f[_0x54f1f9]);}else{notSendMessagesQueue(_0x26b68f[_0x54f1f9]);}}}};Preview[_0xf068('0xf')]['clearZombieChannel']=function(_0x1b3b72){var _0x3d99a1=this;this['sequence'][_0xf068('0x10')](function(){if(!_[_0xf068('0x6e')](_0x3d99a1[_0xf068('0x17')][_0x1b3b72])){loggerAction[_0xf068('0x6f')](_0xf068('0x70'),_0x1b3b72,_0xf068('0x71'),_0x3d99a1[_0xf068('0x17')][_0x1b3b72][_0xf068('0x72')],_0xf068('0x73'),JSON[_0xf068('0x5c')](_0x3d99a1['campaignsPreview'][_0x3d99a1[_0xf068('0x17')][_0x1b3b72]['queue']][_0xf068('0x52')]),_0xf068('0x74'),JSON['stringify'](_0x3d99a1['campaignsPreview'][_0x3d99a1[_0xf068('0x17')][_0x1b3b72][_0xf068('0x72')]][_0xf068('0x2e')]),JSON[_0xf068('0x5c')](_0x3d99a1[_0xf068('0x17')][_0x1b3b72][_0xf068('0x75')]),JSON[_0xf068('0x5c')](_[_0xf068('0x76')](_0x3d99a1[_0xf068('0x17')][_0x1b3b72],['contactId',_0xf068('0x77'),_0xf068('0x78'),_0xf068('0x79')])));return ami[_0xf068('0x7a')]({'action':_0xf068('0x7b'),'channel':_0x3d99a1['actions'][_0x1b3b72]['channel']})[_0xf068('0x7c')](function(_0x21bbeb){if(_0x21bbeb['message']===_0xf068('0x7d')){setTimeout(function(){if(_0x3d99a1['actions'][_0x1b3b72]){ut[_0xf068('0x7e')](_0x3d99a1[_0xf068('0x14')][_0x3d99a1[_0xf068('0x17')][_0x1b3b72][_0xf068('0x72')]],_0xf068('0x7f'));if(_0x3d99a1['actions'][_0x1b3b72]['dialAnswer']===!![]){ut['decrementTalkink'](_0x3d99a1[_0xf068('0x14')][_0x3d99a1[_0xf068('0x17')][_0x1b3b72][_0xf068('0x72')]],_0xf068('0x7f'));ut[_0xf068('0x80')](_0xf068('0x81')+_0x1b3b72,_0x3d99a1[_0xf068('0x17')][_0x1b3b72]['queue']);}ut[_0xf068('0x80')]('[Dialer][checkChannel][Preview]'+_0x1b3b72,_0x3d99a1[_0xf068('0x17')][_0x1b3b72][_0xf068('0x72')]);delete _0x3d99a1['actions'][_0x1b3b72];}},0x2328);}});}});};Preview[_0xf068('0xf')]['clearZombieChannels']=function(){var _0x506d89=this;loggerAction[_0xf068('0x6f')]('[action]',_[_0xf068('0x82')](this['actions']));for(var _0x5ebe13 in this[_0xf068('0x17')]){if(_0x506d89[_0xf068('0x17')][_0xf068('0x68')](_0x5ebe13)){_0x506d89['clearZombieChannel'](_0x5ebe13);}}};Preview[_0xf068('0xf')][_0xf068('0x6d')]=function(_0x33d511){var _0x16ebee=this;rpcDb[_0xf068('0x83')](_0x33d511['id'],ut[_0xf068('0x84')](this[_0xf068('0x18')]))['then'](function(_0x27ea70){if(!_['isNil'](_0x27ea70)){for(var _0xaf2ed2=0x0;_0xaf2ed2<_0x27ea70[_0xf068('0x85')];_0xaf2ed2+=0x1){if(ut[_0xf068('0x86')](_0x27ea70[_0xaf2ed2]['scheduledat'])<_0x33d511[_0xf068('0x87')]*0x3c){_0x16ebee['run'](_0x27ea70[_0xaf2ed2]['id'])[_0xf068('0x88')](ut[_0xf068('0x89')](_0xf068('0x8a')))[_0xf068('0x7c')](ut[_0xf068('0x89')](_0xf068('0x8a')));}else{var _0x1a501f=new Action(_0x27ea70[_0xaf2ed2],_0x33d511);_0x1a501f[_0xf068('0x8b')]=moment()[_0xf068('0x5d')](_0xf068('0x8c'));_0x33d511[_0xf068('0x46')]+=0x1;ut[_0xf068('0x8d')](_0x1a501f,0x17,_0xf068('0x8e'));if(_0x33d511[_0xf068('0x8f')]){rpcDb[_0xf068('0x90')](ut['createBody'](_0x27ea70[_0xaf2ed2]));rpcDb[_0xf068('0x91')](_0x1a501f,_0xf068('0x92'));}else{ut[_0xf068('0x8d')](_0x1a501f,0x16,'RecallFailedTimeout');rpcDb[_0xf068('0x91')](_0x1a501f,_0xf068('0x93'));rpcDb['createCustomerFinal'](_0x1a501f,'[HistoryRecallClose]');}}}}})['catch'](ut[_0xf068('0x89')](_0xf068('0x94')));};Preview['prototype'][_0xf068('0x6c')]=function(_0x459530){_0x459530[_0xf068('0x60')]=!![];if(ut['IsNotLoggedIn'](_0x459530[_0xf068('0x2d')])){_0x459530[_0xf068('0x51')]=_0xf068('0x95');}else if(!ut[_0xf068('0x96')](_0x459530[_0xf068('0x38')])){_0x459530[_0xf068('0x51')]='NOT_ACTIVE';}else if(!this[_0xf068('0x97')](_0x459530['Trunk'])){if(!this[_0xf068('0x97')](_0x459530[_0xf068('0x98')])){_0x459530['message']='TRUNK_IS_NOT_REACHABLE';}else{_0x459530[_0xf068('0x51')]=_0xf068('0x99');}}else{_0x459530[_0xf068('0x51')]=_0xf068('0x99');}emitCampaignPreview(_0x459530);};Preview[_0xf068('0xf')][_0xf068('0x9a')]=function(_0x386d48,_0x4c41d3,_0x427d56){var _0x128569=this;var _0x159bbc=this[_0xf068('0x17')][_0x4c41d3];var _0x674417=this[_0xf068('0x14')][_0x159bbc[_0xf068('0x72')]];var _0x188fb3;if(_0x674417){switch(_0x427d56){case'1':_0x674417[_0xf068('0x45')]+=0x1;_0x159bbc[_0xf068('0x9b')]=ut[_0xf068('0x9c')](_0x159bbc);ut['logCustomer'](_0x159bbc,0x0,'NoSuchNumber');rpcDb[_0xf068('0x91')](_0x159bbc,_0xf068('0x9d'));if(ut[_0xf068('0x9c')](_0x159bbc)>=_0x674417[_0xf068('0x9e')]){_0x188fb3=ut[_0xf068('0x9f')](_0x159bbc,0xf,_0xf068('0xa0'));rpcDb[_0xf068('0xa1')](_0x188fb3,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{rpcDb['createCustomerFinal'](_0x159bbc,_0xf068('0xa2'));}delete this[_0xf068('0x17')][_0x386d48[_0xf068('0xa3')]];break;case _0xf068('0xa4'):var _0x5256fc=moment()[_0xf068('0x5d')](_0xf068('0x8c'));_0x159bbc[_0xf068('0xa5')]=_0x5256fc;_0x159bbc[_0xf068('0xa6')]=_0x5256fc;_0x159bbc[_0xf068('0x75')]=!![];_0x674417[_0xf068('0x2e')]+=0x1;logger[_0xf068('0x6f')](_0xf068('0xa7'),_0x159bbc[_0xf068('0xa8')],_0xf068('0xa9'),_0x674417['name'],_0xf068('0x74'),_0x674417[_0xf068('0x2e')]);ami[_0xf068('0x28')](_0xf068('0xaa'),ut[_0xf068('0xab')](_0x159bbc,_0xf068('0xac')));if(_0x674417['acw']){ami[_0xf068('0x28')](_0xf068('0xad'),ut['buildAcw'](_0x159bbc));}break;case'16':ami[_0xf068('0x28')](_0xf068('0xae'),ut[_0xf068('0xab')](_0x159bbc,_0xf068('0xaf')));emitVoiceQueueChannelRemove(ut[_0xf068('0xab')](_0x159bbc,'complete'));_0x674417['outboundAnswerCallsDay']+=0x1;_0x674417['total']+=0x1;_0x674417[_0xf068('0xb0')]+=0x1;ut[_0xf068('0xb1')](_0x674417,_0xf068('0xb2'));_0x159bbc[_0xf068('0x9b')]=ut['totalGlobal'](_0x159bbc);ut[_0xf068('0x8d')](_0x159bbc,0x4,_0xf068('0xb3'));rpcDb['createCustomerHistory'](_0x159bbc,_0xf068('0xb4'));rpcDb[_0xf068('0xa1')](_0x159bbc,_0xf068('0xb5'));rpcDb[_0xf068('0xb6')](_0x159bbc);_0x674417[_0xf068('0x30')]+=_0x159bbc[_0xf068('0xb7')];_0x674417['sumBillable']+=_0x159bbc[_0xf068('0xb7')];logger[_0xf068('0x6f')](_0xf068('0xb8'),_0x159bbc[_0xf068('0xa8')],_0xf068('0xa9'),_0x674417[_0xf068('0x59')],_0xf068('0x74'),_0x674417[_0xf068('0x2e')]);delete this['actions'][_0x386d48[_0xf068('0xa3')]];break;case _0xf068('0xb9'):_0x674417[_0xf068('0x3f')]+=0x1;_0x159bbc[_0xf068('0xba')]+=0x1;_0x159bbc[_0xf068('0x9b')]=ut[_0xf068('0x9c')](_0x159bbc);ut[_0xf068('0x8d')](_0x159bbc,0x5,_0xf068('0xbb'));rpcDb[_0xf068('0x91')](_0x159bbc,_0xf068('0xbc'));if(ut[_0xf068('0x9c')](_0x159bbc)>=_0x674417[_0xf068('0x9e')]){_0x188fb3=ut[_0xf068('0x9f')](_0x159bbc,0xf,_0xf068('0xa0'));rpcDb[_0xf068('0xa1')](_0x188fb3,_0xf068('0xbd'));}else{if(_0x159bbc[_0xf068('0xba')]>=_0x674417['dialBusyMaxRetry']){rpcDb[_0xf068('0xa1')](_0x159bbc,_0xf068('0xbc'));}else{rpcDb[_0xf068('0xbe')](ut[_0xf068('0xbf')](_0x159bbc,'countbusyretry',_0x674417[_0xf068('0xc0')]),_0x159bbc[_0xf068('0xc1')],_0x159bbc[_0xf068('0xc2')]);}}break;case _0xf068('0xc3'):_0x674417['outboundNoAnswerCallsDay']+=0x1;_0x159bbc[_0xf068('0xc4')]+=0x1;_0x159bbc['countglobal']=ut[_0xf068('0x9c')](_0x159bbc);ut[_0xf068('0x8d')](_0x159bbc,0x3,'NoAnswer');rpcDb[_0xf068('0x91')](_0x159bbc,_0xf068('0xc5'));if(ut[_0xf068('0x9c')](_0x159bbc)>=_0x674417[_0xf068('0x9e')]){_0x188fb3=ut[_0xf068('0x9f')](_0x159bbc,0xf,_0xf068('0xa0'));rpcDb[_0xf068('0xa1')](_0x188fb3,_0xf068('0xc6'));}else{if(_0x159bbc['countnoanswerretry']>=_0x674417[_0xf068('0xc7')]){rpcDb[_0xf068('0xa1')](_0x159bbc,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb[_0xf068('0xbe')](ut[_0xf068('0xbf')](_0x159bbc,_0xf068('0xc4'),_0x674417[_0xf068('0xc8')]),_0x159bbc['unlockAgent'],_0x159bbc['activeContact']);}}break;case _0xf068('0xc9'):_0x674417[_0xf068('0x40')]+=0x1;_0x159bbc[_0xf068('0xca')]+=0x1;_0x159bbc[_0xf068('0x9b')]=ut[_0xf068('0x9c')](_0x159bbc);ut[_0xf068('0x8d')](_0x159bbc,0x8,_0xf068('0xcb'));rpcDb[_0xf068('0x91')](_0x159bbc,'[callProgressDetectingCustomer][logCongestion]');if(ut[_0xf068('0x9c')](_0x159bbc)>=_0x674417['dialGlobalMaxRetry']){_0x188fb3=ut[_0xf068('0x9f')](_0x159bbc,0xf,_0xf068('0xa0'));rpcDb[_0xf068('0xa1')](_0x188fb3,'[callProgressDetectingCustomer][logCongestionGlobal]');}else{if(_0x159bbc[_0xf068('0xca')]>=_0x674417[_0xf068('0xcc')]){rpcDb[_0xf068('0xa1')](_0x159bbc,_0xf068('0xcd'));}else{rpcDb[_0xf068('0xbe')](ut[_0xf068('0xbf')](_0x159bbc,_0xf068('0xca'),_0x674417[_0xf068('0xc0')]),_0x159bbc[_0xf068('0xc1')],_0x159bbc[_0xf068('0xc2')]);}}break;case'CANCEL':_0x674417[_0xf068('0x47')]+=0x1;_0x159bbc['countglobal']=ut['totalGlobal'](_0x159bbc);ut[_0xf068('0x8d')](_0x159bbc,0x14,_0xf068('0xce'));rpcDb[_0xf068('0x91')](_0x159bbc,_0xf068('0xcf'));if(_0x159bbc[_0xf068('0xc1')]){rpcDb[_0xf068('0xd0')](_0x159bbc[_0xf068('0xd1')]);}if(_0x159bbc[_0xf068('0xc2')]){rpcDb[_0xf068('0xd2')](_0x159bbc['idContact']);}break;default:if(_0x159bbc[_0xf068('0x75')]){ut[_0xf068('0xb1')](_0x674417,_0xf068('0xd3'));ut[_0xf068('0x80')](_0xf068('0xd4')+_0x674417[_0xf068('0x59')],_0x386d48);}_0x674417['outboundUnknownCallsDay']+=0x1;_0x159bbc['countglobal']=ut[_0xf068('0x9c')](_0x159bbc);ut[_0xf068('0x8d')](_0x159bbc,0xc,_0x386d48[_0xf068('0xd5')]||_0x386d48['dialstatus']);rpcDb[_0xf068('0x91')](_0x159bbc,_0xf068('0xd6'));if(ut[_0xf068('0x9c')](_0x159bbc)>=_0x674417['dialGlobalMaxRetry']){_0x188fb3=ut[_0xf068('0x9f')](_0x159bbc,0xf,_0xf068('0xa0'));rpcDb['createCustomerFinal'](_0x188fb3,_0xf068('0xd7'));}else{rpcDb[_0xf068('0xa1')](_0x159bbc,_0xf068('0xd7'));}delete this['actions'][_0x386d48['linkedid']];}if(!(_0x159bbc['dialAnswer']&&_0x427d56==='16')){ut[_0xf068('0x7e')](_0x674417,_0xf068('0xd8'));logger[_0xf068('0x6f')](_0xf068('0xd9'),_0x159bbc[_0xf068('0xa8')],_0xf068('0xa9'),_0x674417['name'],_0xf068('0x73'),_0x674417[_0xf068('0x52')]);}if(_0x427d56!==_0xf068('0xa4')){delete this['actions'][_0x386d48[_0xf068('0xa3')]];delete this['actions'][_0x386d48[_0xf068('0xda')]];}}};Preview[_0xf068('0xf')][_0xf068('0xdb')]=function(_0x34a190,_0x437af8,_0x5a2694){if(_[_0xf068('0xdc')](_0x437af8)&&_0xf068('0xdd')!==typeof _0x437af8){return;}if(_[_0xf068('0xdc')](_0x5a2694)&&'object'!==typeof _0x5a2694){return;}switch(_0x5a2694[_0xf068('0xde')]){case'0':ut['logAgent'](_0x34a190,0x0,_0xf068('0xdf'));rpcDb[_0xf068('0xe0')](_0x34a190,_0xf068('0xe1'));break;case'3':ut['logAgent'](_0x34a190,0x3,'NoAnswer');rpcDb[_0xf068('0xe0')](_0x34a190,_0xf068('0xe2'));break;case'5':ut[_0xf068('0xe3')](_0x34a190,0x5,_0xf068('0xbb'));rpcDb[_0xf068('0xe0')](_0x34a190,'[callProgressDetectingAgent][logBusy]');break;case'8':ut[_0xf068('0xe3')](_0x34a190,0x8,'Congestion');rpcDb['createAgentHistory'](_0x34a190,_0xf068('0xe4'));break;case'22':ut[_0xf068('0xe3')](_0x34a190,0x16,'AnswerAGI');rpcDb[_0xf068('0xe0')](_0x34a190,_0xf068('0xe5'));break;default:ut['logAgent'](_0x34a190,0xc,_0x5a2694[_0xf068('0xde')]);rpcDb['createAgentHistory'](_0x34a190,_0xf068('0xe4'));}ut['updateOriginated'](_0x437af8,_0xf068('0xe6'));logger['info'](_0xf068('0xe7'),_0x34a190[_0xf068('0xa8')],_0xf068('0xa9'),_0x437af8[_0xf068('0x59')],'originated:\x20',_0x437af8[_0xf068('0x52')]);delete this[_0xf068('0x17')][_0x34a190[_0xf068('0xa8')]];};Preview[_0xf068('0xf')][_0xf068('0xe8')]=function(_0x395d61,_0x46a277,_0x5c9b24,_0x21fee5,_0x91f7da){var _0x4060a6=this;return new BPromise(function(_0x2284fc,_0x170c83){if(_['isNil'](_0x46a277)||_[_0xf068('0x6e')](_0x46a277[_0xf068('0xe9')])||_[_0xf068('0x6e')](_0x46a277[_0xf068('0xe9')]['phone'])||_['isNil'](_0x46a277[_0xf068('0x78')])){_0x170c83(ut[_0xf068('0x51')]('Contact\x20is\x20undefined',_0x21fee5,_0x91f7da));return;}var _0x502534=uuid['v4']();var _0x1c4941=_0x4060a6[_0xf068('0x14')][_0x46a277[_0xf068('0x71')][_0xf068('0x59')]];var _0x4a1f77=_0x5c9b24?_0x4060a6[_0xf068('0x18')][_0x5c9b24]['id']:undefined;_0x4060a6[_0xf068('0x17')][_0x502534]=new Action(_0x46a277,_0x1c4941,_0x502534,_0x5c9b24,_0x4a1f77);var _0x358229=_0x4060a6[_0xf068('0x17')][_0x502534];_0x358229['unlockAgent']=_0x21fee5;_0x358229['activeContact']=_0x91f7da;_0x358229['lookAgent']=_0x5c9b24;if(_[_0xf068('0xea')](_0x395d61)){_0x4060a6[_0xf068('0xeb')](_0x358229,_0x1c4941,_0x46a277,_0x5c9b24)[_0xf068('0x88')](function(_0x375a31){logger[_0xf068('0x6f')](_0xf068('0xec'),'Queue:\x20'+_0x358229[_0xf068('0x72')]+'\x20IdHopper:\x20'+_0x358229['idContact'],JSON[_0xf068('0x5c')](_0x375a31));ami[_0xf068('0x28')](_0xf068('0xed'),ut[_0xf068('0xab')](_0x358229,_0xf068('0xee')));_0x2284fc(ut[_0xf068('0x51')](_0xf068('0xef')));})[_0xf068('0x7c')](function(_0x33aa68){ut[_0xf068('0x62')]('[Preview][execCall][failure]',_0x33aa68);_0x170c83(ut[_0xf068('0x51')](_0xf068('0xf0'),_0x21fee5,_0x91f7da));});}else{_0x1c4941['outboundBlacklistCallsDay']+=0x1;ut[_0xf068('0xf1')](_0x358229);rpcDb['createHistory'](_0x358229,_0xf068('0xf2'));delete _0x4060a6[_0xf068('0x17')][_0x502534];_0x170c83(ut['message'](_0xf068('0xf3'),_0x21fee5,_0x91f7da));}});};Preview[_0xf068('0xf')]['isTrunkReachable']=function(_0x3ca5aa){return!_[_0xf068('0x6e')](_0x3ca5aa)&&!_['isNil'](_0x3ca5aa['name'])&&!_[_0xf068('0x6e')](_0x3ca5aa[_0xf068('0xf4')])&&_0x3ca5aa[_0xf068('0xf4')]&&!_['isNil'](this['trunks'][util['format']('SIP/%s',_0x3ca5aa[_0xf068('0x59')])])&&!_[_0xf068('0x6e')](this[_0xf068('0x16')][util[_0xf068('0x5d')]('SIP/%s',_0x3ca5aa['name'])][_0xf068('0x7b')])&&(this[_0xf068('0x16')][util[_0xf068('0x5d')](_0xf068('0xf5'),_0x3ca5aa[_0xf068('0x59')])][_0xf068('0x7b')]==='reachable'||this[_0xf068('0x16')][util[_0xf068('0x5d')]('SIP/%s',_0x3ca5aa[_0xf068('0x59')])][_0xf068('0x7b')]===_0xf068('0xf6'));};Preview[_0xf068('0xf')][_0xf068('0xf7')]=function(_0x16ddf5,_0x15c53d){var _0xd381d4=this;return new BPromise(function(_0x1593b2,_0xceb552){_0xd381d4[_0xf068('0xf8')](_0x16ddf5,_0x15c53d)[_0xf068('0x88')](function(_0x462212){_0x1593b2(_[_0xf068('0x76')](_0x462212,['message']));})['catch'](function(_0x3b17b0){if(_0x3b17b0[_0xf068('0xf9')]){rpcDb[_0xf068('0xd0')](_0x16ddf5);}if(_0x3b17b0[_0xf068('0xf4')]){rpcDb[_0xf068('0xd2')](_0x16ddf5);}_0xceb552(_[_0xf068('0x76')](_0x3b17b0,[_0xf068('0x51')]));});});};Preview[_0xf068('0xf')][_0xf068('0xf8')]=function(_0x170b54,_0x133482){var _0x25ec31=this;return new BPromise(function(_0x23cc3a,_0x30c923){var _0x12bc5b,_0x428268;rpcDb[_0xf068('0xfa')](_0x170b54)[_0xf068('0x88')](function(_0x40289d){if(!_[_0xf068('0x6e')](_0x40289d[0x0])){_0x428268=_0x40289d[0x0][_0xf068('0xfb')]?![]:!![];_0x12bc5b=_0x40289d[0x0][_0xf068('0xfb')]?!![]:![];_0x12bc5b=_0x133482?!![]:_0x12bc5b;}var _0x3bb884=_0x25ec31[_0xf068('0xfc')](_0x40289d);if(_0x3bb884[_0xf068('0xfd')]){rpcDb['checkIsBlackList'](_['pick'](_0x40289d[0x0],['VoiceQueueId','Contact.phone']))[_0xf068('0x88')](function(_0x51daf7){_0x25ec31[_0xf068('0xe8')](_0x51daf7,_0x40289d[0x0],_0x133482,_0x428268,_0x12bc5b)[_0xf068('0x88')](function(_0x1bdb28){_0x23cc3a(_0x1bdb28);})['catch'](function(_0x1b6560){_0x30c923(_0x1b6560);});})[_0xf068('0x7c')](function(_0x372765){ut['logger']('[Preview][checkIsBlackList]',_0x372765);_0x30c923(ut[_0xf068('0x51')](_0xf068('0xfe'),_0x428268,_0x12bc5b));});}else{_0x30c923(ut[_0xf068('0x51')](_0x3bb884[_0xf068('0x51')],_0x428268,_0x12bc5b));}})['catch'](function(_0x3c6ec3){ut[_0xf068('0x62')](_0xf068('0xff'),_0x3c6ec3);_0x30c923(ut[_0xf068('0x51')](_0xf068('0xfe'),![],!![]));});});};Preview[_0xf068('0xf')][_0xf068('0xfc')]=function(_0x534053){if(_[_0xf068('0x6e')](_0x534053)||_['isEmpty'](_0x534053)||!_['isNil'](_0x534053[0x0][_0xf068('0x100')])&&_['isNil'](_0x534053[0x0][_0xf068('0x100')][_0xf068('0x59')])){ut[_0xf068('0x62')](_0xf068('0x101'),_0x534053);return{'isValid':![],'message':_0xf068('0x102')};}var _0x2f3d34=this[_0xf068('0x14')][_0x534053[0x0][_0xf068('0x71')]['name']];_0x2f3d34[_0xf068('0x51')]=_0xf068('0x99');if(_[_0xf068('0x6e')](_0x2f3d34)){ut[_0xf068('0x62')](_0xf068('0x103'),_0x2f3d34);return{'isValid':![],'message':_0xf068('0x104')};}if(!this[_0xf068('0x97')](_0x2f3d34[_0xf068('0x58')])){ut['logger'](_0xf068('0x105'),_0xf068('0x106')+_0x2f3d34['name']+_0xf068('0x107'));if(!this[_0xf068('0x97')](_0x2f3d34['TrunkBackup'])){ut[_0xf068('0x62')](_0xf068('0x105'),_0x2f3d34[_0xf068('0x59')]+_0xf068('0x108'));return{'isValid':![],'message':'Trunk\x20not\x20work'};}}if(!ut['isActive'](_0x2f3d34[_0xf068('0x38')])){ut[_0xf068('0x62')](_0xf068('0x109'),_0x2f3d34[_0xf068('0x59')]+_0xf068('0x10a'));return{'isValid':![],'message':'campaign\x20Name:\x20'+_0x2f3d34['name']+_0xf068('0x10a')};}return{'isValid':!![],'message':_0xf068('0x10b')};};Preview['prototype'][_0xf068('0xeb')]=function(_0x5c640f,_0x47401d,_0x3987af,_0x1ba096){var _0x444115=this;return new BPromise(function(_0x58ce1a,_0x493281){var _0xccbc06=_0x5c640f[_0xf068('0xa8')];var _0x3258e7=_0x444115[_0xf068('0x97')](_0x47401d[_0xf068('0x58')])?util[_0xf068('0x5d')]('SIP/%s/%s%s',_0x47401d['Trunk'][_0xf068('0x59')],_[_0xf068('0x6e')](_0x47401d[_0xf068('0x3d')])?'':_0x47401d['dialPrefix']['trim']()||'',_0x47401d['dialCutDigit']>0x0?_0x3987af[_0xf068('0xe9')][_0xf068('0x10c')][_0xf068('0x10d')](_0x47401d[_0xf068('0x10e')]):_0x3987af[_0xf068('0xe9')][_0xf068('0x10c')]):util[_0xf068('0x5d')]('SIP/%s/%s%s',_['isNil'](_0x47401d[_0xf068('0x98')])?_0x47401d[_0xf068('0x58')]['name']:_0x47401d['TrunkBackup'][_0xf068('0x59')],_[_0xf068('0x6e')](_0x47401d['dialPrefix'])?'':_0x47401d[_0xf068('0x3d')]['trim']()||'',_0x47401d['dialCutDigit']>0x0?_0x3987af[_0xf068('0xe9')][_0xf068('0x10c')][_0xf068('0x10d')](_0x47401d[_0xf068('0x10e')]):_0x3987af[_0xf068('0xe9')]['phone']);var _0x52248d=_0x444115[_0xf068('0x97')](_0x47401d[_0xf068('0x58')])?ut[_0xf068('0x10f')](_0x47401d[_0xf068('0x58')][_0xf068('0x5a')],_0x47401d['dialOriginateCallerIdName'],_0x47401d[_0xf068('0x110')]>0x0?ut['getCallerIdRandom'](_0x47401d[_0xf068('0x3b')],_0x47401d[_0xf068('0x110')]):_0x47401d[_0xf068('0x3b')]):ut[_0xf068('0x10f')](_[_0xf068('0x6e')](_0x47401d[_0xf068('0x98')])?_0x47401d[_0xf068('0x58')]['callerid']:_0x47401d[_0xf068('0x98')][_0xf068('0x5a')],_0x47401d[_0xf068('0x3a')],_0x47401d[_0xf068('0x110')]>0x0?ut[_0xf068('0x111')](_0x47401d[_0xf068('0x3b')],_0x47401d[_0xf068('0x110')]):_0x47401d['dialOriginateCallerIdNumber']);if(_0x52248d){_0x5c640f[_0xf068('0x112')]=ut[_0xf068('0x113')](_0x52248d);_0x5c640f['originatecalleridnum']=ut[_0xf068('0x114')](_0x52248d);}var _0x23900d=ut[_0xf068('0x115')](_0x47401d,_0x3987af,_0x3258e7,_0x52248d,_0xccbc06,_0x5c640f);_[_0xf068('0x116')](_0x5c640f,ut[_0xf068('0x117')](_0x23900d));_0x5c640f[_0xf068('0x8b')]=moment()['format'](_0xf068('0x8c'));ami['Action'](ut[_0xf068('0x118')](_0x5c640f,_0x47401d,_0x23900d,_0x5c640f[_0xf068('0xc2')],_0x1ba096))[_0xf068('0x88')](function(_0x48dc67){_0x47401d[_0xf068('0x52')]+=0x1;logger[_0xf068('0x6f')](_0xf068('0x119'),_0xccbc06,'\x20Queue',_0x47401d[_0xf068('0x59')],_0xf068('0x73'),_0x47401d[_0xf068('0x52')]);_0x58ce1a(_0x48dc67);})['catch'](function(_0x51e130){ut[_0xf068('0xe3')](_0x5c640f,0xe,_0xf068('0x11a'));rpcDb['createAgentHistory'](_0x5c640f,_0xf068('0x11b'));_0x493281(_0x51e130);});});};Preview[_0xf068('0xf')][_0xf068('0x22')]=function(_0x494fc3){if(this[_0xf068('0x17')][_0x494fc3[_0xf068('0xa3')]]){this['actions'][_0x494fc3[_0xf068('0xa3')]][_0xf068('0x11c')]=_0x494fc3[_0xf068('0x11c')];}};Preview[_0xf068('0xf')]['syncOriginateResponse']=function(_0x37bda7){var _0x58b0d4=this;var _0xde0be7=this[_0xf068('0x17')][_0x37bda7[_0xf068('0x11d')]];if(_0xde0be7){if(_0xde0be7[_0xf068('0x11e')]&&this[_0xf068('0x18')][_0xde0be7[_0xf068('0x11e')]]){ut[_0xf068('0x11f')](_0xde0be7,this['agents'][_0xde0be7[_0xf068('0x11e')]][_0xf068('0x59')],this['agents'][_0xde0be7[_0xf068('0x11e')]]['id']);}var _0x38d262=_['clone'](_0xde0be7);_0x38d262['responsetime']=moment()[_0xf068('0x5d')](_0xf068('0x8c'));var _0x43a0d7=_0x58b0d4[_0xf068('0x14')][_0xde0be7['queue']];if(ut['isFailure'](_0x37bda7['response'])){if(_0xde0be7[_0xf068('0xc1')]){rpcDb[_0xf068('0xd0')](_0xde0be7[_0xf068('0xd1')]);}if(_0xde0be7[_0xf068('0xc2')]){rpcDb['disableContact'](_0xde0be7[_0xf068('0xd1')]);}ami['emit'](_0xf068('0x120'),ut[_0xf068('0xab')](_0xde0be7,_0xf068('0x121')));this[_0xf068('0xdb')](_0x38d262,_0x43a0d7,_0x37bda7);}else{_0xde0be7[_0xf068('0x8b')]=moment()['format'](_0xf068('0x8c'));ut[_0xf068('0xe3')](_0x38d262,0x4,'Answer');rpcDb[_0xf068('0xe0')](_0x38d262,'[callProgressDetectingAgent][logAnswer]');}}};Preview['prototype'][_0xf068('0x122')]=function(_0x4fb942){var _0x436cfa=this;var _0x42f825=this[_0xf068('0x17')][_0x4fb942['linkedid']];var _0x51d25a;if(_0x42f825){_0x51d25a=this[_0xf068('0x14')][_0x42f825[_0xf068('0x72')]];logger[_0xf068('0x6f')]('[syncHangup][talking]',_0x4fb942[_0xf068('0xa3')],_0xf068('0xa9'),_0x51d25a['name'],_0xf068('0x74'),_0x51d25a[_0xf068('0x2e')]);}if(this[_0xf068('0x17')][_0x4fb942[_0xf068('0xa3')]]&&_0x4fb942[_0xf068('0xa3')]!==_0x4fb942[_0xf068('0xa8')]){if(_0x4fb942[_0xf068('0x123')]==='16'&&this[_0xf068('0x17')][_0x4fb942[_0xf068('0xa3')]][_0xf068('0x75')]){this[_0xf068('0x9a')](_0x4fb942,_0x4fb942[_0xf068('0xa3')],_0x4fb942[_0xf068('0x123')]);}else if(this[_0xf068('0x17')][_0x4fb942[_0xf068('0xa3')]][_0xf068('0x75')]){logger[_0xf068('0x6f')]('[syncHangup][talking][cause]',_0x4fb942[_0xf068('0xa3')],_0x4fb942[_0xf068('0x123')],_0xf068('0xa9'),_0x51d25a[_0xf068('0x59')],'pTalking:\x20',_0x51d25a[_0xf068('0x2e')]);this[_0xf068('0x9a')](_0x4fb942,_0x4fb942[_0xf068('0xa3')],_0x4fb942[_0xf068('0x123')]);}}else if(_0x42f825&&_[_0xf068('0x6e')](_0x42f825[_0xf068('0x124')])&&_0x51d25a[_0xf068('0x125')]&&_0x4fb942['linkedid']===_0x4fb942['uniqueid']&&_[_0xf068('0x6e')](_0x4fb942[_0xf068('0xde')])&&_0x4fb942[_0xf068('0x123')]==='16'&&_0x4fb942[_0xf068('0x126')]==='6'&&_['isUndefined'](_0x42f825[_0xf068('0x127')])){if(_0x42f825['unlockAgent']){rpcDb['unlockContact'](_0x42f825[_0xf068('0xd1')]);}if(_0x42f825[_0xf068('0xc2')]){rpcDb[_0xf068('0xd2')](_0x42f825[_0xf068('0xd1')]);}_0x4fb942[_0xf068('0xde')]='22';this[_0xf068('0xdb')](_0x42f825,_0x51d25a,_0x4fb942);}else if(_0x42f825&&_0x42f825[_0xf068('0x127')]){if(_0x4fb942[_0xf068('0x123')]==='16'&&this[_0xf068('0x17')][_0x4fb942['linkedid']][_0xf068('0x75')]){logger[_0xf068('0x6f')](_0xf068('0x128'),_0x4fb942[_0xf068('0xa3')],_0x4fb942[_0xf068('0x123')],_0xf068('0xa9'),_0x51d25a[_0xf068('0x59')],'pTalking:\x20',_0x51d25a[_0xf068('0x2e')]);this[_0xf068('0x9a')](_0x4fb942,_0x4fb942[_0xf068('0xa3')],_0x4fb942[_0xf068('0x123')]);}else if(this[_0xf068('0x17')][_0x4fb942[_0xf068('0xa3')]]['dialAnswer']){logger[_0xf068('0x6f')]('[syncHangup][talking][cause]',_0x4fb942[_0xf068('0xa3')],_0x4fb942[_0xf068('0x123')],_0xf068('0xa9'),_0x51d25a[_0xf068('0x59')],_0xf068('0x74'),_0x51d25a['pTalking']);this[_0xf068('0x9a')](_0x4fb942,_0x4fb942[_0xf068('0xa3')],_0x4fb942['cause']);}}};Preview[_0xf068('0xf')][_0xf068('0x20')]=function(_0x11a8bc){if(this[_0xf068('0x17')][_0x11a8bc[_0xf068('0xda')]]&&_0x11a8bc[_0xf068('0xda')]!==_0x11a8bc['destuniqueid']){this[_0xf068('0x9a')](_0x11a8bc,_0x11a8bc[_0xf068('0xda')],_0x11a8bc[_0xf068('0x129')]);}};Preview['prototype']['syncHangupRequest']=function(_0x1641e3){if(this[_0xf068('0x17')][_0x1641e3[_0xf068('0xa3')]]&&_0x1641e3[_0xf068('0xa3')]!==_0x1641e3['uniqueid']&&!this['actions'][_0x1641e3[_0xf068('0xa3')]][_0xf068('0x75')]){if(_0x1641e3[_0xf068('0x123')]==='1'){this[_0xf068('0x9a')](_0x1641e3,_0x1641e3[_0xf068('0xa3')],_0x1641e3['cause']);}}};Preview[_0xf068('0xf')][_0xf068('0x12a')]=function(_0x230671,_0x3804b6,_0x209f73){if(this[_0xf068('0x17')][_0x230671]){if(_[_0xf068('0x6e')](this['actions'][_0x230671][_0xf068('0x12b')])){this['actions'][_0x230671]['variables']={};}this[_0xf068('0x17')][_0x230671][_0xf068('0x12b')][_0x3804b6]=_0x209f73;}};Preview[_0xf068('0xf')][_0xf068('0x24')]=function(_0xac0f4f){try{if(!_[_0xf068('0x6e')](_0xac0f4f)){if(ut['filterKey'](_['keys'](_0xac0f4f[_0xf068('0x12c')])[0x0])){this[_0xf068('0x12a')](_0xac0f4f[_0xf068('0xa8')],_[_0xf068('0x12d')](_0xac0f4f[_0xf068('0x12c')])[0x0],_0xac0f4f[_0xf068('0x12e')]);}}}catch(_0x3dc7eb){logger[_0xf068('0x12f')](_0xf068('0x130'),util[_0xf068('0x131')](_0x3dc7eb,{'showHidden':![],'depth':null}));}};Preview[_0xf068('0xf')][_0xf068('0x25')]=function(_0x4f2373){if(_0x4f2373){if(this[_0xf068('0x17')][_0x4f2373[_0xf068('0x132')]]){this[_0xf068('0x17')][_0x4f2373[_0xf068('0x132')]][_0xf068('0x127')]=!![];}}};Preview['prototype']['syncBlindTransfer']=function(_0x5f4455){if(_0x5f4455){if(this[_0xf068('0x17')][_0x5f4455[_0xf068('0x133')]]){this['actions'][_0x5f4455[_0xf068('0x133')]][_0xf068('0x127')]=!![];}}};module[_0xf068('0x134')]=Preview;
\ No newline at end of file
diff --git a/server/services/ami/preview/rpcDb.js b/server/services/ami/preview/rpcDb.js
index 3771b59..796fc0c 100644
--- a/server/services/ami/preview/rpcDb.js
+++ b/server/services/ami/preview/rpcDb.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x23ca=['[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','active','[rescheduleContact]\x20','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','queue','queuecallerjoinAt','answertime','queuecallercomplete','queuecallercompleteAt','membername','context','from-sip','exten','xcally-motion-preview','holdtime','lastAssignedTo','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','preview','lodash','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','error','inspect','resolve','then','createHistory','catch','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview'];(function(_0x24674c,_0x1188dc){var _0x1d0cbd=function(_0x44dbf8){while(--_0x44dbf8){_0x24674c['push'](_0x24674c['shift']());}};_0x1d0cbd(++_0x1188dc);}(_0x23ca,0x1e4));var _0xa23c=function(_0x8e90c8,_0x4f5a3b){_0x8e90c8=_0x8e90c8-0x0;var _0x435cbc=_0x23ca[_0x8e90c8];return _0x435cbc;};'use strict';var util=require(_0xa23c('0x0'));var BPromise=require(_0xa23c('0x1'));var logger=require(_0xa23c('0x2'))(_0xa23c('0x3'));var _=require(_0xa23c('0x4'));var cmHopper=require('../rpc/cmHopper');var cmHopperFinal=require(_0xa23c('0x5'));var cmHopperHistory=require(_0xa23c('0x6'));var cmHopperBlack=require(_0xa23c('0x7'));var voiceQueueRt=require('../rpc/voiceQueueRt');var agentReportPreview=require(_0xa23c('0x8'));var voiceQueueReport=require(_0xa23c('0x9'));function loggerCatch(_0x52ec68){return function(_0x374d82){logger[_0xa23c('0xa')](_0x52ec68,util[_0xa23c('0xb')](_0x374d82,{'showHidden':![],'depth':null}));};}function create(_0x218749){return BPromise[_0xa23c('0xc')]()[_0xa23c('0xd')](cmHopperHistory[_0xa23c('0xe')](_0x218749))[_0xa23c('0xf')](loggerCatch('[createHistory]\x20'));}function createAgent(_0x5864bb){return BPromise['resolve']()[_0xa23c('0xd')](agentReportPreview[_0xa23c('0xe')](_0x5864bb))['catch'](loggerCatch('[createHistory]\x20'));}function moveContact(_0x18bf4a){return BPromise[_0xa23c('0xc')]()[_0xa23c('0xd')](cmHopper[_0xa23c('0x10')](_0x18bf4a,!![]))[_0xa23c('0xf')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0xa23c('0x11')]=function(_0x2b42d4){return BPromise['resolve']()[_0xa23c('0xd')](cmHopperBlack[_0xa23c('0x11')](_0x2b42d4))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x12')));};exports[_0xa23c('0x13')]=function(_0x461840){return BPromise[_0xa23c('0xc')]()[_0xa23c('0xd')](cmHopper[_0xa23c('0x13')](_0x461840))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x14')));};exports[_0xa23c('0xe')]=function(_0x553c7b,_0x127fdb){create(_0x553c7b)[_0xa23c('0xf')](loggerCatch(_0x127fdb));moveContact(_0x553c7b)[_0xa23c('0xf')](loggerCatch(_0x127fdb));};exports[_0xa23c('0x15')]=function(_0x2befe9,_0x21d0f5){createAgent(_0x2befe9)[_0xa23c('0xf')](loggerCatch(_0x21d0f5));};exports[_0xa23c('0x16')]=function(_0x2f7280,_0x3f17a0){create(_0x2f7280)['catch'](loggerCatch(_0x3f17a0));};exports[_0xa23c('0x17')]=function(_0x1c3fbd,_0x462b7b){moveContact(_0x1c3fbd)[_0xa23c('0xf')](loggerCatch(_0x462b7b));};exports[_0xa23c('0x18')]=function(_0x2e4002,_0x1e38e4,_0x3a8c27){if(_0x1e38e4){_0x2e4002['UserId']=null;}if(_0x3a8c27){_0x2e4002[_0xa23c('0x19')]=![];}return BPromise[_0xa23c('0xc')]()[_0xa23c('0xd')](cmHopper[_0xa23c('0x18')](_0x2e4002))['catch'](loggerCatch(_0xa23c('0x1a')));};exports['countReScheduled']=function(_0x308039){return BPromise[_0xa23c('0xc')]()[_0xa23c('0xd')](cmHopper['countReScheduled'](_0x308039))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x1b')));};exports[_0xa23c('0x1c')]=function(_0x2d108b){return BPromise[_0xa23c('0xc')]()['then'](cmHopper[_0xa23c('0x1c')]({'UserId':null},_0x2d108b,0x1))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x1d')));};exports[_0xa23c('0x1e')]=function(_0x33b213){return BPromise['resolve']()[_0xa23c('0xd')](cmHopper['unlockContact']({'active':![]},_0x33b213,0x1))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x1f')));};exports[_0xa23c('0x20')]=function(_0x108900){var _0x3eb574={};_0x3eb574[_0xa23c('0x21')]=_0x108900['type'];_0x3eb574[_0xa23c('0x22')]=_0x108900[_0xa23c('0x22')];_0x3eb574[_0xa23c('0x23')]=_0x108900[_0xa23c('0x23')];_0x3eb574['calleridname']=_0x108900['calleridname'];_0x3eb574['queue']=_0x108900[_0xa23c('0x24')];_0x3eb574[_0xa23c('0x25')]=_0x108900[_0xa23c('0x26')];_0x3eb574['queuecallerleaveAt']=_0x108900[_0xa23c('0x26')];_0x3eb574[_0xa23c('0x27')]=0x1;_0x3eb574[_0xa23c('0x28')]=_0x108900['endtime'];_0x3eb574['connectedlinename']=_0x108900[_0xa23c('0x29')];_0x3eb574[_0xa23c('0x2a')]=_0xa23c('0x2b');_0x3eb574[_0xa23c('0x2c')]=_0xa23c('0x2d');_0x3eb574[_0xa23c('0x2e')]=0x0;_0x3eb574['assigned']=0x1;_0x3eb574[_0xa23c('0x2f')]=_0x108900[_0xa23c('0x29')];_0x3eb574[_0xa23c('0x30')]=_0xa23c('0x31');return BPromise[_0xa23c('0xc')]()[_0xa23c('0xd')](voiceQueueReport[_0xa23c('0x32')](_0x3eb574))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x33')));};exports[_0xa23c('0x34')]=function(_0x17719a,_0x297a62){return BPromise['resolve']()['then'](cmHopper['getContactRecallMe'](_0x17719a,_0x297a62))['catch'](loggerCatch(_0xa23c('0x35')));};exports[_0xa23c('0x36')]=function(_0x5d2f52){return BPromise['resolve']()[_0xa23c('0xd')](cmHopper[_0xa23c('0x18')](_0x5d2f52,!![],!![]))[_0xa23c('0xf')](loggerCatch(_0xa23c('0x37')));};
\ No newline at end of file
+var _0xea7a=['unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','answertime','queuecallerleaveAt','queuecallercompleteAt','connectedlinename','membername','context','from-sip','xcally-motion-preview','assigned','lastAssignedTo','queuecallerexitreason','COMPLETED','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','inspect','resolve','then','createHistory','catch','[createHistory]\x20','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createCustomerHistory','createCustomerFinal','UserId','active','rescheduleContact','[rescheduleContact]\x20','countReScheduled'];(function(_0x550db8,_0x1d1295){var _0x3d022d=function(_0x4dc693){while(--_0x4dc693){_0x550db8['push'](_0x550db8['shift']());}};_0x3d022d(++_0x1d1295);}(_0xea7a,0x15f));var _0xaea7=function(_0x554032,_0x3e4764){_0x554032=_0x554032-0x0;var _0x978161=_0xea7a[_0x554032];return _0x978161;};'use strict';var util=require(_0xaea7('0x0'));var BPromise=require(_0xaea7('0x1'));var logger=require(_0xaea7('0x2'))('preview');var _=require('lodash');var cmHopper=require(_0xaea7('0x3'));var cmHopperFinal=require(_0xaea7('0x4'));var cmHopperHistory=require(_0xaea7('0x5'));var cmHopperBlack=require(_0xaea7('0x6'));var voiceQueueRt=require('../rpc/voiceQueueRt');var agentReportPreview=require(_0xaea7('0x7'));var voiceQueueReport=require(_0xaea7('0x8'));function loggerCatch(_0x3cc899){return function(_0x39dd97){logger['error'](_0x3cc899,util[_0xaea7('0x9')](_0x39dd97,{'showHidden':![],'depth':null}));};}function create(_0x4a7af6){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopperHistory[_0xaea7('0xc')](_0x4a7af6))[_0xaea7('0xd')](loggerCatch(_0xaea7('0xe')));}function createAgent(_0x455cf7){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](agentReportPreview[_0xaea7('0xc')](_0x455cf7))[_0xaea7('0xd')](loggerCatch(_0xaea7('0xe')));}function moveContact(_0x303fc1){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper[_0xaea7('0xf')](_0x303fc1,!![]))[_0xaea7('0xd')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0xaea7('0x10')]=function(_0x5f88fe){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopperBlack[_0xaea7('0x10')](_0x5f88fe))[_0xaea7('0xd')](loggerCatch(_0xaea7('0x11')));};exports[_0xaea7('0x12')]=function(_0x23bc5c){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper[_0xaea7('0x12')](_0x23bc5c))['catch'](loggerCatch(_0xaea7('0x13')));};exports['createHistory']=function(_0x11bced,_0x5cc23c){create(_0x11bced)[_0xaea7('0xd')](loggerCatch(_0x5cc23c));moveContact(_0x11bced)[_0xaea7('0xd')](loggerCatch(_0x5cc23c));};exports['createAgentHistory']=function(_0x753809,_0x39a044){createAgent(_0x753809)[_0xaea7('0xd')](loggerCatch(_0x39a044));};exports[_0xaea7('0x14')]=function(_0x21f6df,_0x2a972e){create(_0x21f6df)['catch'](loggerCatch(_0x2a972e));};exports[_0xaea7('0x15')]=function(_0xd8f014,_0x173fae){moveContact(_0xd8f014)[_0xaea7('0xd')](loggerCatch(_0x173fae));};exports['rescheduleContact']=function(_0x2866e0,_0x10864e,_0x258520){if(_0x10864e){_0x2866e0[_0xaea7('0x16')]=null;}if(_0x258520){_0x2866e0[_0xaea7('0x17')]=![];}return BPromise[_0xaea7('0xa')]()['then'](cmHopper[_0xaea7('0x18')](_0x2866e0))[_0xaea7('0xd')](loggerCatch(_0xaea7('0x19')));};exports[_0xaea7('0x1a')]=function(_0x39eb48){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper['countReScheduled'](_0x39eb48))[_0xaea7('0xd')](loggerCatch('[countReScheduled]\x20'));};exports[_0xaea7('0x1b')]=function(_0x480665){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper[_0xaea7('0x1b')]({'UserId':null},_0x480665,0x1))['catch'](loggerCatch(_0xaea7('0x1c')));};exports[_0xaea7('0x1d')]=function(_0x5256a4){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper['unlockContact']({'active':![]},_0x5256a4,0x1))[_0xaea7('0xd')](loggerCatch(_0xaea7('0x1e')));};exports[_0xaea7('0x1f')]=function(_0x2706c8){var _0x17b3ee={};_0x17b3ee[_0xaea7('0x20')]=_0x2706c8['type'];_0x17b3ee[_0xaea7('0x21')]=_0x2706c8[_0xaea7('0x21')];_0x17b3ee[_0xaea7('0x22')]=_0x2706c8[_0xaea7('0x22')];_0x17b3ee['calleridname']=_0x2706c8[_0xaea7('0x23')];_0x17b3ee[_0xaea7('0x24')]=_0x2706c8[_0xaea7('0x24')];_0x17b3ee['queuecallerjoinAt']=_0x2706c8[_0xaea7('0x25')];_0x17b3ee[_0xaea7('0x26')]=_0x2706c8[_0xaea7('0x25')];_0x17b3ee['queuecallercomplete']=0x1;_0x17b3ee[_0xaea7('0x27')]=_0x2706c8['endtime'];_0x17b3ee[_0xaea7('0x28')]=_0x2706c8[_0xaea7('0x29')];_0x17b3ee[_0xaea7('0x2a')]=_0xaea7('0x2b');_0x17b3ee['exten']=_0xaea7('0x2c');_0x17b3ee['holdtime']=0x0;_0x17b3ee[_0xaea7('0x2d')]=0x1;_0x17b3ee[_0xaea7('0x2e')]=_0x2706c8[_0xaea7('0x29')];_0x17b3ee[_0xaea7('0x2f')]=_0xaea7('0x30');return BPromise['resolve']()[_0xaea7('0xb')](voiceQueueReport['create'](_0x17b3ee))[_0xaea7('0xd')](loggerCatch(_0xaea7('0x31')));};exports[_0xaea7('0x32')]=function(_0x1ae552,_0x55be20){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper[_0xaea7('0x32')](_0x1ae552,_0x55be20))[_0xaea7('0xd')](loggerCatch(_0xaea7('0x33')));};exports[_0xaea7('0x34')]=function(_0x413a27){return BPromise[_0xaea7('0xa')]()[_0xaea7('0xb')](cmHopper[_0xaea7('0x18')](_0x413a27,!![],!![]))[_0xaea7('0xd')](loggerCatch(_0xaea7('0x35')));};
\ No newline at end of file
diff --git a/server/services/ami/preview/util/util.js b/server/services/ami/preview/util/util.js
index 9b1b0a6..1dc3d5c 100644
--- a/server/services/ami/preview/util/util.js
+++ b/server/services/ami/preview/util/util.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1b3d=['filterKey','type','dialAnswer','callback','callbackat','recallme','sipcallid','xmd-listid','xmd-dialoptions','xmd-dialchannel','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agi','rtpaudioqosrttbridged','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','bridgepeer','pow','replace','random','extractCalleridName','match','extractCalleridNumber','util','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','milliseconds','diff','seconds','error','inspect','logger','info','loggerError','message','getCallerId','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','isNil','addVariables','Queue','name','calleridnum','dialer','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','dialQueueProject2','originatecalleridnum','originatecalleridname','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','tags','createdAt','updatedAt','%s%s','toLowerVariables','toLower','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','starttime','endtime','logAgent','responsetime','ringtime','logLookAgent','membername','UserId','logCustomer','talktime','answertime','isFailure','Failure','variablesAction','RECALL','calleridname','BOOKED','uniqueid','originate','channelAgent','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','cloneAction','clone','Global','scheduledAt','scheduledat','add','minutes','ContactId','ListId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','buildObj','lastevent','queue','interface','not_inuse','reachable','push','getDiff'];(function(_0x29a29f,_0x155ce7){var _0x443ea3=function(_0xe0dd24){while(--_0xe0dd24){_0x29a29f['push'](_0x29a29f['shift']());}};_0x443ea3(++_0x155ce7);}(_0x1b3d,0x9f));var _0xd1b3=function(_0x16e747,_0xf73eaf){_0x16e747=_0x16e747-0x0;var _0x49c89f=_0x1b3d[_0x16e747];return _0x49c89f;};'use strict';var util=require(_0xd1b3('0x0'));var _=require(_0xd1b3('0x1'));var moment=require(_0xd1b3('0x2'));var logger=require(_0xd1b3('0x3'))(_0xd1b3('0x4'));var ipAgi=process[_0xd1b3('0x5')][_0xd1b3('0x6')]||'127.0.0.1';function getSeconds(_0x8bb41f,_0x444b4f){var _0x3cb90d=moment(_0x8bb41f)[_0xd1b3('0x7')](0x0);var _0x35ff13=moment(_0x444b4f)['milliseconds'](0x0);return _0x3cb90d[_0xd1b3('0x8')](_0x35ff13,_0xd1b3('0x9'));}exports['loggerCatch']=function(_0x4a6f71){return function(_0x57d5bc){logger[_0xd1b3('0xa')](_0x4a6f71,util[_0xd1b3('0xb')](_0x57d5bc,{'showHidden':![],'depth':null}));};};exports[_0xd1b3('0xc')]=function(_0xb4626d,_0x39e120){logger[_0xd1b3('0xd')](_0xb4626d,util[_0xd1b3('0xb')](_0x39e120,{'showHidden':![],'depth':null}));};exports[_0xd1b3('0xe')]=function(_0x58b627,_0xd73055){logger[_0xd1b3('0xa')](_0x58b627,util[_0xd1b3('0xb')](_0xd73055,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0x46eb01){return function(_0x5a1a3d){logger[_0xd1b3('0xd')](_0x46eb01,util[_0xd1b3('0xb')](_0x5a1a3d,{'showHidden':![],'depth':null}));};};exports[_0xd1b3('0xf')]=function(_0x169ca1,_0x2c3206,_0x4fc681){return{'message':_0x169ca1,'unlock':_0x2c3206,'active':_0x4fc681};};exports[_0xd1b3('0x10')]=function(_0x4bcdef,_0x40c033,_0x43c190){if(!_[_0xd1b3('0x11')](_0x43c190)&&_0xd1b3('0x12')===typeof _0x43c190&&!_['isEmpty'](_0x43c190)){if(!_['isUndefined'](_0x40c033)&&_0xd1b3('0x12')===typeof _0x40c033&&!_[_0xd1b3('0x13')](_0x40c033)){return util[_0xd1b3('0x14')](_0xd1b3('0x15'),_0x40c033,_0x43c190);}return util[_0xd1b3('0x14')](_0xd1b3('0x15'),_0x43c190,_0x43c190);}if(!_['isUndefined'](_0x4bcdef)&&'string'===typeof _0x4bcdef&&!_[_0xd1b3('0x13')](_0x4bcdef)){return _0x4bcdef;}return _0xd1b3('0x16');};exports[_0xd1b3('0x17')]=function(_0x4cdf6d){if(_[_0xd1b3('0x18')](_0x4cdf6d)){return![];}return _0x4cdf6d;};exports[_0xd1b3('0x19')]=function(_0x3c79fa,_0xb74846,_0x52bbca,_0x1ecd0b,_0x308fdd,_0x591d80){var _0xc4cd5c={'XMD-QUEUE':_0xb74846['Queue']?_0xb74846[_0xd1b3('0x1a')][_0xd1b3('0x1b')]:'','XMD-CALLERID':_0x1ecd0b,'XMD-CALLERID-PREVIEW':_0x591d80?util[_0xd1b3('0x14')](_0xd1b3('0x15'),_0x591d80['calleridname'],_0x591d80[_0xd1b3('0x1c')]):_0x1ecd0b,'XMD-DIALID':_0x308fdd,'XMD-CONTACTID':_0xb74846['ContactId'],'XMD-CDRTYPE':_0xd1b3('0x1d'),'CALLERID(all)':_0x1ecd0b,'XMD-VOICEQUEUEID':_0xb74846[_0xd1b3('0x1e')],'XMD-DIALCHANNEL':_0x52bbca,'XMD-DIALTIMEOUT':_0x3c79fa[_0xd1b3('0x1f')]||0x1e,'XMD-DIALOPTIONS':util[_0xd1b3('0x14')](_0xd1b3('0x20'),_0x3c79fa['dialQueueProject2']?'g':'',_[_0xd1b3('0x13')](_0x3c79fa[_0xd1b3('0x21')])?'':_0xd1b3('0x22')),'XMD-DIALURL':_0x3c79fa[_0xd1b3('0x23')]||'','XMD-AGI':_0x3c79fa[_0xd1b3('0x24')]?util[_0xd1b3('0x14')](_0xd1b3('0x25'),ipAgi,_0x3c79fa[_0xd1b3('0x24')]):_0xd1b3('0x26'),'XMD-AGIAFTER':_0x3c79fa[_0xd1b3('0x27')]?util[_0xd1b3('0x14')](_0xd1b3('0x25'),ipAgi,_0x3c79fa['dialQueueProject2']):_0xd1b3('0x26'),'XMD-ORIGINATECALLERIDNUM':_0x591d80?_0x591d80[_0xd1b3('0x28')]:'','XMD-ORIGINATECALLERIDNAME':_0x591d80?_0x591d80[_0xd1b3('0x29')]:'','XMD-DESTINATION':_0xd1b3('0x2a')};if(!_['isEmpty'](_0x3c79fa[_0xd1b3('0x21')])){_0xc4cd5c[util[_0xd1b3('0x14')]('%s',_0xd1b3('0x2b'))]=_0x3c79fa[_0xd1b3('0x21')];_0xc4cd5c[util[_0xd1b3('0x14')]('%s',_0xd1b3('0x2c'))]=_0x308fdd;}if(_0xb74846&&_0xb74846[_0xd1b3('0x2d')]){for(var _0x4d6aaf in _0xb74846[_0xd1b3('0x2d')]){if(_0xb74846['Contact'][_0xd1b3('0x2e')](_0x4d6aaf)){if(!_[_0xd1b3('0x18')](_0xb74846[_0xd1b3('0x2d')][_0x4d6aaf])&&_0x4d6aaf!=='id'&&_0x4d6aaf!==_0xd1b3('0x2f')&&_0x4d6aaf!==_0xd1b3('0x30')&&_0x4d6aaf!==_0xd1b3('0x31')){_0xc4cd5c[util[_0xd1b3('0x14')](_0xd1b3('0x32'),'XMD-',_['toUpper'](_0x4d6aaf))]=_0xb74846[_0xd1b3('0x2d')][_0x4d6aaf];}}}}return _0xc4cd5c;};exports[_0xd1b3('0x33')]=function(_0x11d7ec){var _0x2c5c1b={};for(var _0x394ead in _0x11d7ec){if(_0x11d7ec[_0xd1b3('0x2e')](_0x394ead)){_0x2c5c1b[util[_0xd1b3('0x14')]('%s',_[_0xd1b3('0x34')](_0x394ead))]=_0x11d7ec[_0x394ead];}}return{'variables':_0x2c5c1b};};exports['updateOriginated']=function(_0x2c6b6b,_0x8bb0d3){if(!_[_0xd1b3('0x18')](_0x2c6b6b)){if(_0x2c6b6b[_0xd1b3('0x2e')]('originated')){if(_0x2c6b6b[_0xd1b3('0x35')]>0x0){_0x2c6b6b[_0xd1b3('0x35')]-=0x1;}else{logger[_0xd1b3('0xa')](_0xd1b3('0x36'),_0x8bb0d3);}}}else{logger[_0xd1b3('0xa')](_0xd1b3('0x37'),_0x8bb0d3);}};exports[_0xd1b3('0x38')]=function(_0x27f1ce){var _0x249220=moment()[_0xd1b3('0x14')](_0xd1b3('0x39'));_0x27f1ce[_0xd1b3('0x3a')]=0xd;_0x27f1ce[_0xd1b3('0x3b')]='Blacklist';_0x27f1ce[_0xd1b3('0x3c')]=_0x249220;_0x27f1ce['responsetime']=_0x249220;_0x27f1ce[_0xd1b3('0x3d')]=_0x249220;};exports[_0xd1b3('0x3e')]=function(_0x208327,_0x56ac2b,_0x4fbf85){var _0x5df109=moment()[_0xd1b3('0x14')](_0xd1b3('0x39'));_0x208327[_0xd1b3('0x3a')]=_0x56ac2b;_0x208327[_0xd1b3('0x3b')]=_0x4fbf85;_0x208327[_0xd1b3('0x3f')]=_0x5df109;_0x208327[_0xd1b3('0x40')]=getSeconds(_0x208327[_0xd1b3('0x3f')],_0x208327['starttime']);};exports[_0xd1b3('0x41')]=function(_0x374bbe,_0x37736c,_0x507223){_0x374bbe[_0xd1b3('0x42')]=_0x37736c;_0x374bbe[_0xd1b3('0x43')]=_0x507223;};exports[_0xd1b3('0x44')]=function(_0x4a24ec,_0x2598f3,_0x75a9a){var _0x3d15ef=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x4a24ec[_0xd1b3('0x3a')]=_0x2598f3;_0x4a24ec['statedesc']=_0x75a9a;_0x4a24ec[_0xd1b3('0x3f')]=_0x4a24ec['responsetime']?_0x4a24ec['responsetime']:_0x3d15ef;_0x4a24ec[_0xd1b3('0x3d')]=_0x4a24ec[_0xd1b3('0x3d')]?_0x4a24ec[_0xd1b3('0x3d')]:_0x3d15ef;_0x4a24ec[_0xd1b3('0x40')]=getSeconds(_0x4a24ec[_0xd1b3('0x3f')]||0x0,_0x4a24ec['starttime']||0x0);_0x4a24ec[_0xd1b3('0x45')]=_0x4a24ec[_0xd1b3('0x46')]?getSeconds(_0x4a24ec[_0xd1b3('0x3d')],_0x4a24ec[_0xd1b3('0x46')]):0x0;};exports[_0xd1b3('0x47')]=function(_0x21ccd2){return _0x21ccd2===_0xd1b3('0x48');};exports[_0xd1b3('0x49')]=function(_0x181053,_0x3f7aa8,_0x335fa3,_0x56205c,_0x51ccf1){var _0x3fb3c2=_0x56205c?_0xd1b3('0x4a'):_0x181053[_0xd1b3('0x4b')];_0x3fb3c2=_0x51ccf1?_0xd1b3('0x4c'):_0x3fb3c2;return{'actionid':_0x181053[_0xd1b3('0x4d')],'action':_0xd1b3('0x4e'),'channel':_0x181053[_0xd1b3('0x4f')],'callerid':util[_0xd1b3('0x14')](_0xd1b3('0x15'),_0x3fb3c2,_0x181053[_0xd1b3('0x1c')]),'Exten':_0xd1b3('0x2a'),'Context':'from-sip','Priority':'1','variable':_0x335fa3,'timeout':(_0x3f7aa8['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x181053[_0xd1b3('0x4d')]};};exports[_0xd1b3('0x50')]=function(_0x1ee552){return _0x1ee552[_0xd1b3('0x51')]+_0x1ee552[_0xd1b3('0x52')]+_0x1ee552[_0xd1b3('0x53')];};exports[_0xd1b3('0x54')]=function(_0x206c85){var _0x5e7e22=_[_0xd1b3('0x55')](_0x206c85);_0x5e7e22['state']=0xf;_0x5e7e22[_0xd1b3('0x3b')]=_0xd1b3('0x56');return _0x5e7e22;};exports[_0xd1b3('0x57')]=function(_0x49919b,_0x54ff1d,_0x15fb64){var _0x5c78df={};_0x5c78df[_0x54ff1d]=_0x49919b[_0x54ff1d];_0x5c78df['active']=![];_0x5c78df[_0xd1b3('0x58')]=moment()[_0xd1b3('0x59')](_0x15fb64,_0xd1b3('0x5a'))[_0xd1b3('0x14')](_0xd1b3('0x39'));_0x5c78df[_0xd1b3('0x5b')]=_0x49919b['ContactId'];_0x5c78df[_0xd1b3('0x5c')]=_0x49919b['ListId'];_0x5c78df[_0xd1b3('0x1e')]=_0x49919b['VoiceQueueId']||undefined;return _0x5c78df;};exports[_0xd1b3('0x5d')]=function(_0x280769,_0x2de512){if(!_[_0xd1b3('0x18')](_0x280769)){if(_0x280769[_0xd1b3('0x5e')]>0x0){_0x280769[_0xd1b3('0x5e')]-=0x1;}else{logger[_0xd1b3('0xa')](_0x2de512,_0xd1b3('0x5f'));}}else{logger[_0xd1b3('0xa')](_0x2de512,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0xd1b3('0x60')]=function(_0x30bfd9){if(_0x30bfd9<=0x0){return!![];}return![];};exports[_0xd1b3('0x61')]=function(_0x25f9cf,_0x26fc93){_0x25f9cf[_0xd1b3('0x62')]=_0x26fc93;_0x25f9cf[_0xd1b3('0x1b')]=_0x25f9cf[_0xd1b3('0x63')];_0x25f9cf[_0xd1b3('0x64')]=_0x25f9cf['channelAgent'];return _0x25f9cf;};exports['buildAcw']=function(_0x57bbe0){var _0xc77b07={};_0xc77b07[_0xd1b3('0x63')]=_0x57bbe0[_0xd1b3('0x63')];_0xc77b07['interface']=_0x57bbe0[_0xd1b3('0x4f')];_0xc77b07[_0xd1b3('0x4d')]=_0x57bbe0['uniqueid'];return _0xc77b07;};exports['agentReadyId']=function(_0x2a9fa0){var _0x110dcf=[];for(var _0x462699 in _0x2a9fa0){if(_0x2a9fa0[_0xd1b3('0x2e')](_0x462699)){if(!_[_0xd1b3('0x18')](_0x2a9fa0[_0x462699])&&_0x2a9fa0[_0x462699]['state']===_0xd1b3('0x65')&&_0x2a9fa0[_0x462699]['status']===_0xd1b3('0x66')){_0x110dcf[_0xd1b3('0x67')](_0x2a9fa0[_0x462699]['id']);}}}return _0x110dcf;};exports[_0xd1b3('0x68')]=function(_0x920b25){var _0x249613=moment()[_0xd1b3('0x7')](0x0);var _0x40cc92=moment(_0x920b25)[_0xd1b3('0x7')](0x0);return _0x249613[_0xd1b3('0x8')](_0x40cc92,_0xd1b3('0x9'));};exports['createBody']=function(_0x29c30c){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x29c30c['ContactId'],'ListId':_0x29c30c[_0xd1b3('0x5c')],'VoiceQueueId':_0x29c30c[_0xd1b3('0x1e')]||undefined,'CampaignId':_0x29c30c['CampaignId']||undefined};};exports[_0xd1b3('0x69')]=function(_0x4df6df){if(_0x4df6df===_0xd1b3('0x4d')||_0x4df6df==='idContact'||_0x4df6df===_0xd1b3('0x63')||_0x4df6df===_0xd1b3('0x6a')||_0x4df6df==='campaigntype'||_0x4df6df===_0xd1b3('0x6b')||_0x4df6df===_0xd1b3('0x42')||_0x4df6df===_0xd1b3('0x4f')||_0x4df6df===_0xd1b3('0x4b')||_0x4df6df==='active'||_0x4df6df==='calleridnum'||_0x4df6df===_0xd1b3('0x58')||_0x4df6df===_0xd1b3('0x51')||_0x4df6df===_0xd1b3('0x52')||_0x4df6df===_0xd1b3('0x53')||_0x4df6df==='countglobal'||_0x4df6df===_0xd1b3('0x6c')||_0x4df6df==='callbackuniqueid'||_0x4df6df===_0xd1b3('0x6d')||_0x4df6df===_0xd1b3('0x6e')||_0x4df6df===_0xd1b3('0x5b')||_0x4df6df==='ListId'||_0x4df6df===_0xd1b3('0x43')||_0x4df6df===_0xd1b3('0x1e')||_0x4df6df===_0xd1b3('0x6f')||_0x4df6df==='xmd-voicequeueid'||_0x4df6df==='xmd-queue'||_0x4df6df==='xmd-phone'||_0x4df6df===_0xd1b3('0x70')||_0x4df6df==='xmd-dialurl'||_0x4df6df==='xmd-dialtimeout'||_0x4df6df===_0xd1b3('0x71')||_0x4df6df==='xmd-dialid'||_0x4df6df===_0xd1b3('0x72')||_0x4df6df===_0xd1b3('0x73')||_0x4df6df===_0xd1b3('0x74')||_0x4df6df===_0xd1b3('0x75')||_0x4df6df==='xmd-agiafter'||_0x4df6df===_0xd1b3('0x76')||_0x4df6df==='rtpaudioqos'||_0x4df6df==='rtpaudioqosbridged'||_0x4df6df==='rtpaudioqosjitter'||_0x4df6df==='rtpaudioqosjitterbridged'||_0x4df6df==='rtpaudioqosloss'||_0x4df6df==='rtpaudioqoslossbridged'||_0x4df6df==='rtpaudioqosrtt'||_0x4df6df===_0xd1b3('0x77')||_0x4df6df===_0xd1b3('0x78')||_0x4df6df===_0xd1b3('0x79')||_0x4df6df===_0xd1b3('0x7a')||_0x4df6df===_0xd1b3('0x7b')||_0x4df6df===_0xd1b3('0x7c')||_0x4df6df==='rtpaudioqoslossbridged'||_0x4df6df==='rtpaudioqosrtt'||_0x4df6df===_0xd1b3('0x77')||_0x4df6df===_0xd1b3('0x7d')||_0x4df6df==='bridgepvtcallid'||_0x4df6df===_0xd1b3('0x3a')||_0x4df6df===_0xd1b3('0x3b')){return![];}return!![];};exports['getCallerIdRandom']=function(_0x206880,_0x423d4a){var _0x948ac9,_0x150141,_0xb9b33a;if(_0x423d4a<=0x0){_0x423d4a=0x1;}_0x948ac9=new RegExp('\x5cw{0,'+_0x423d4a+'}$');_0x150141=Math[_0xd1b3('0x7e')](0xa,_0x423d4a-0x1);_0xb9b33a=Math[_0xd1b3('0x7e')](0xa,_0x423d4a)-0x1;return util['format']('%s',_[_0xd1b3('0x7f')](_0x206880,_0x948ac9,_[_0xd1b3('0x80')](_0x150141,_0xb9b33a)));};exports[_0xd1b3('0x81')]=function(_0x64a88c){var _0x3642d=_0x64a88c[_0xd1b3('0x82')](/"(.*?)"/);return _0x3642d?_0x3642d[0x1]:_0x64a88c;};exports[_0xd1b3('0x83')]=function(_0x93be41){var _0x455769=_0x93be41[_0xd1b3('0x82')](/<(.*?)>/);return _0x455769?_0x455769[0x1]:_0x93be41;};
\ No newline at end of file
+var _0x82d4=['xmd-agiafter','xmd-agi','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosrtt','rtpaudioqosloss','rtpaudioqoslossbridged','bridgepeer','bridgepvtcallid','getCallerIdRandom','pow','replace','random','match','util','moment','../../../../config/logger','env','127.0.0.1','milliseconds','diff','loggerCatch','error','inspect','info','loggerError','logger2','message','getCallerId','string','isEmpty','isUndefined','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','Queue','name','calleridnum','ContactId','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','\x22agi://%s/square,%s\x22','dialQueueProject','NONE','originatecalleridnum','originatecalleridname','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','isNil','createdAt','updatedAt','XMD-','toLowerVariables','hasOwnProperty','toLower','originated','[updateOriginated]\x20is\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','Blacklist','starttime','responsetime','endtime','logAgent','ringtime','logLookAgent','membername','talktime','answertime','isFailure','Failure','variablesAction','calleridname','BOOKED','channelAgent','xcally-motion-preview','from-sip','timeout','uniqueid','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','cloneAction','clone','Global','scheduledAt','active','scheduledat','minutes','ListId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','buildObj','lastevent','queue','interface','agentReadyId','not_inuse','status','reachable','getDiff','seconds','createBody','CampaignId','idContact','type','campaigntype','countglobal','UserId','sipcallid','xmd-queue','xmd-phone','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-cdrtype','xmd-callerid'];(function(_0x30ed1a,_0xd81aa3){var _0x2415f4=function(_0x5f3b98){while(--_0x5f3b98){_0x30ed1a['push'](_0x30ed1a['shift']());}};_0x2415f4(++_0xd81aa3);}(_0x82d4,0x115));var _0x482d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x82d4[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0x482d('0x0'));var _=require('lodash');var moment=require(_0x482d('0x1'));var logger=require(_0x482d('0x2'))('preview');var ipAgi=process[_0x482d('0x3')]['XCALLY_IP_AGI']||_0x482d('0x4');function getSeconds(_0x1e119b,_0x2ad95c){var _0x18504f=moment(_0x1e119b)[_0x482d('0x5')](0x0);var _0x406caa=moment(_0x2ad95c)[_0x482d('0x5')](0x0);return _0x18504f[_0x482d('0x6')](_0x406caa,'seconds');}exports[_0x482d('0x7')]=function(_0xcdf3d5){return function(_0x22393f){logger[_0x482d('0x8')](_0xcdf3d5,util[_0x482d('0x9')](_0x22393f,{'showHidden':![],'depth':null}));};};exports['logger']=function(_0x3e7646,_0x22cda2){logger[_0x482d('0xa')](_0x3e7646,util[_0x482d('0x9')](_0x22cda2,{'showHidden':![],'depth':null}));};exports[_0x482d('0xb')]=function(_0x200825,_0x15e54d){logger[_0x482d('0x8')](_0x200825,util[_0x482d('0x9')](_0x15e54d,{'showHidden':![],'depth':null}));};exports[_0x482d('0xc')]=function(_0x190ae9){return function(_0x2743e3){logger['info'](_0x190ae9,util[_0x482d('0x9')](_0x2743e3,{'showHidden':![],'depth':null}));};};exports[_0x482d('0xd')]=function(_0x3a7f19,_0x398564,_0x174c5f){return{'message':_0x3a7f19,'unlock':_0x398564,'active':_0x174c5f};};exports[_0x482d('0xe')]=function(_0xcdf6c2,_0x485ede,_0x2d2dc8){if(!_['isUndefined'](_0x2d2dc8)&&_0x482d('0xf')===typeof _0x2d2dc8&&!_[_0x482d('0x10')](_0x2d2dc8)){if(!_[_0x482d('0x11')](_0x485ede)&&_0x482d('0xf')===typeof _0x485ede&&!_[_0x482d('0x10')](_0x485ede)){return util[_0x482d('0x12')]('\x22%s\x22\x20<%s>',_0x485ede,_0x2d2dc8);}return util[_0x482d('0x12')](_0x482d('0x13'),_0x2d2dc8,_0x2d2dc8);}if(!_[_0x482d('0x11')](_0xcdf6c2)&&_0x482d('0xf')===typeof _0xcdf6c2&&!_[_0x482d('0x10')](_0xcdf6c2)){return _0xcdf6c2;}return _0x482d('0x14');};exports['isActive']=function(_0x363d83){if(_['isNil'](_0x363d83)){return![];}return _0x363d83;};exports['addVariables']=function(_0x223d93,_0x350503,_0x42c196,_0x4c09f3,_0x29c382,_0x2450c0){var _0x35b076={'XMD-QUEUE':_0x350503['Queue']?_0x350503[_0x482d('0x15')][_0x482d('0x16')]:'','XMD-CALLERID':_0x4c09f3,'XMD-CALLERID-PREVIEW':_0x2450c0?util[_0x482d('0x12')](_0x482d('0x13'),_0x2450c0['calleridname'],_0x2450c0[_0x482d('0x17')]):_0x4c09f3,'XMD-DIALID':_0x29c382,'XMD-CONTACTID':_0x350503[_0x482d('0x18')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x4c09f3,'XMD-VOICEQUEUEID':_0x350503[_0x482d('0x19')],'XMD-DIALCHANNEL':_0x42c196,'XMD-DIALTIMEOUT':_0x223d93[_0x482d('0x1a')]||0x1e,'XMD-DIALOPTIONS':util[_0x482d('0x12')](_0x482d('0x1b'),_0x223d93[_0x482d('0x1c')]?'g':'',_[_0x482d('0x10')](_0x223d93[_0x482d('0x1d')])?'':_0x482d('0x1e')),'XMD-DIALURL':_0x223d93[_0x482d('0x1f')]||'','XMD-AGI':_0x223d93['dialQueueProject']?util[_0x482d('0x12')](_0x482d('0x20'),ipAgi,_0x223d93[_0x482d('0x21')]):'NONE','XMD-AGIAFTER':_0x223d93[_0x482d('0x1c')]?util[_0x482d('0x12')]('\x22agi://%s/square,%s\x22',ipAgi,_0x223d93[_0x482d('0x1c')]):_0x482d('0x22'),'XMD-ORIGINATECALLERIDNUM':_0x2450c0?_0x2450c0[_0x482d('0x23')]:'','XMD-ORIGINATECALLERIDNAME':_0x2450c0?_0x2450c0[_0x482d('0x24')]:'','XMD-DESTINATION':'xcally-motion-preview'};if(!_[_0x482d('0x10')](_0x223d93[_0x482d('0x1d')])){_0x35b076[util[_0x482d('0x12')]('%s',_0x482d('0x25'))]=_0x223d93[_0x482d('0x1d')];_0x35b076[util[_0x482d('0x12')]('%s',_0x482d('0x26'))]=_0x29c382;}if(_0x350503&&_0x350503[_0x482d('0x27')]){for(var _0x162fa7 in _0x350503[_0x482d('0x27')]){if(_0x350503['Contact']['hasOwnProperty'](_0x162fa7)){if(!_[_0x482d('0x28')](_0x350503[_0x482d('0x27')][_0x162fa7])&&_0x162fa7!=='id'&&_0x162fa7!=='tags'&&_0x162fa7!==_0x482d('0x29')&&_0x162fa7!==_0x482d('0x2a')){_0x35b076[util[_0x482d('0x12')]('%s%s',_0x482d('0x2b'),_['toUpper'](_0x162fa7))]=_0x350503[_0x482d('0x27')][_0x162fa7];}}}}return _0x35b076;};exports[_0x482d('0x2c')]=function(_0x374dae){var _0x3f2da3={};for(var _0x281450 in _0x374dae){if(_0x374dae[_0x482d('0x2d')](_0x281450)){_0x3f2da3[util[_0x482d('0x12')]('%s',_[_0x482d('0x2e')](_0x281450))]=_0x374dae[_0x281450];}}return{'variables':_0x3f2da3};};exports['updateOriginated']=function(_0x79233b,_0x34adbd){if(!_['isNil'](_0x79233b)){if(_0x79233b[_0x482d('0x2d')]('originated')){if(_0x79233b[_0x482d('0x2f')]>0x0){_0x79233b[_0x482d('0x2f')]-=0x1;}else{logger['error']('[updateOriginated]\x20object\x20originated\x20is\x20negative',_0x34adbd);}}}else{logger[_0x482d('0x8')](_0x482d('0x30'),_0x34adbd);}};exports['logBlacklist']=function(_0x4210a2){var _0x584aff=moment()['format'](_0x482d('0x31'));_0x4210a2[_0x482d('0x32')]=0xd;_0x4210a2[_0x482d('0x33')]=_0x482d('0x34');_0x4210a2[_0x482d('0x35')]=_0x584aff;_0x4210a2[_0x482d('0x36')]=_0x584aff;_0x4210a2[_0x482d('0x37')]=_0x584aff;};exports[_0x482d('0x38')]=function(_0x3bae83,_0x4f6289,_0xc0dc04){var _0x92bb67=moment()[_0x482d('0x12')](_0x482d('0x31'));_0x3bae83[_0x482d('0x32')]=_0x4f6289;_0x3bae83[_0x482d('0x33')]=_0xc0dc04;_0x3bae83['responsetime']=_0x92bb67;_0x3bae83[_0x482d('0x39')]=getSeconds(_0x3bae83[_0x482d('0x36')],_0x3bae83[_0x482d('0x35')]);};exports[_0x482d('0x3a')]=function(_0x4b9b55,_0x530830,_0x51d403){_0x4b9b55[_0x482d('0x3b')]=_0x530830;_0x4b9b55['UserId']=_0x51d403;};exports['logCustomer']=function(_0x233f21,_0x475da7,_0x45186a){var _0x3bba24=moment()['format'](_0x482d('0x31'));_0x233f21[_0x482d('0x32')]=_0x475da7;_0x233f21['statedesc']=_0x45186a;_0x233f21['responsetime']=_0x233f21[_0x482d('0x36')]?_0x233f21[_0x482d('0x36')]:_0x3bba24;_0x233f21['endtime']=_0x233f21[_0x482d('0x37')]?_0x233f21[_0x482d('0x37')]:_0x3bba24;_0x233f21['ringtime']=getSeconds(_0x233f21[_0x482d('0x36')]||0x0,_0x233f21[_0x482d('0x35')]||0x0);_0x233f21[_0x482d('0x3c')]=_0x233f21[_0x482d('0x3d')]?getSeconds(_0x233f21[_0x482d('0x37')],_0x233f21['answertime']):0x0;};exports[_0x482d('0x3e')]=function(_0xcd76b0){return _0xcd76b0===_0x482d('0x3f');};exports[_0x482d('0x40')]=function(_0x336946,_0x57b925,_0x173a7d,_0x44b23f,_0x5092a4){var _0x3c2f60=_0x44b23f?'RECALL':_0x336946[_0x482d('0x41')];_0x3c2f60=_0x5092a4?_0x482d('0x42'):_0x3c2f60;return{'actionid':_0x336946['uniqueid'],'action':'originate','channel':_0x336946[_0x482d('0x43')],'callerid':util[_0x482d('0x12')](_0x482d('0x13'),_0x3c2f60,_0x336946[_0x482d('0x17')]),'Exten':_0x482d('0x44'),'Context':_0x482d('0x45'),'Priority':'1','variable':_0x173a7d,'timeout':(_0x57b925[_0x482d('0x46')]||0x1e)*0x3e8,'async':!![],'channelid':_0x336946[_0x482d('0x47')]};};exports[_0x482d('0x48')]=function(_0x11b84d){return _0x11b84d[_0x482d('0x49')]+_0x11b84d[_0x482d('0x4a')]+_0x11b84d[_0x482d('0x4b')];};exports[_0x482d('0x4c')]=function(_0x4ef7ca){var _0x3da2ca=_[_0x482d('0x4d')](_0x4ef7ca);_0x3da2ca[_0x482d('0x32')]=0xf;_0x3da2ca['statedesc']=_0x482d('0x4e');return _0x3da2ca;};exports[_0x482d('0x4f')]=function(_0x36685b,_0x29a0fb,_0x1dd2eb){var _0x353171={};_0x353171[_0x29a0fb]=_0x36685b[_0x29a0fb];_0x353171[_0x482d('0x50')]=![];_0x353171[_0x482d('0x51')]=moment()['add'](_0x1dd2eb,_0x482d('0x52'))[_0x482d('0x12')]('YYYY-MM-DD\x20HH:mm:ss');_0x353171[_0x482d('0x18')]=_0x36685b[_0x482d('0x18')];_0x353171[_0x482d('0x53')]=_0x36685b['ListId'];_0x353171['VoiceQueueId']=_0x36685b[_0x482d('0x19')]||undefined;return _0x353171;};exports[_0x482d('0x54')]=function(_0x118db1,_0x55c38d){if(!_['isNil'](_0x118db1)){if(_0x118db1[_0x482d('0x55')]>0x0){_0x118db1[_0x482d('0x55')]-=0x1;}else{logger['error'](_0x55c38d,_0x482d('0x56'));}}else{logger[_0x482d('0x8')](_0x55c38d,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0x482d('0x57')]=function(_0x19fb1c){if(_0x19fb1c<=0x0){return!![];}return![];};exports[_0x482d('0x58')]=function(_0x374599,_0x40095a){_0x374599[_0x482d('0x59')]=_0x40095a;_0x374599['name']=_0x374599[_0x482d('0x5a')];_0x374599['interface']=_0x374599['channelAgent'];return _0x374599;};exports['buildAcw']=function(_0x45e2c0){var _0x10600f={};_0x10600f[_0x482d('0x5a')]=_0x45e2c0[_0x482d('0x5a')];_0x10600f[_0x482d('0x5b')]=_0x45e2c0[_0x482d('0x43')];_0x10600f[_0x482d('0x47')]=_0x45e2c0[_0x482d('0x47')];return _0x10600f;};exports[_0x482d('0x5c')]=function(_0x1808ea){var _0x17f7dd=[];for(var _0x14ee59 in _0x1808ea){if(_0x1808ea[_0x482d('0x2d')](_0x14ee59)){if(!_['isNil'](_0x1808ea[_0x14ee59])&&_0x1808ea[_0x14ee59][_0x482d('0x32')]===_0x482d('0x5d')&&_0x1808ea[_0x14ee59][_0x482d('0x5e')]===_0x482d('0x5f')){_0x17f7dd['push'](_0x1808ea[_0x14ee59]['id']);}}}return _0x17f7dd;};exports[_0x482d('0x60')]=function(_0x3ac042){var _0x4ced18=moment()[_0x482d('0x5')](0x0);var _0x251670=moment(_0x3ac042)['milliseconds'](0x0);return _0x4ced18[_0x482d('0x6')](_0x251670,_0x482d('0x61'));};exports[_0x482d('0x62')]=function(_0x2f3ccc){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x2f3ccc[_0x482d('0x18')],'ListId':_0x2f3ccc[_0x482d('0x53')],'VoiceQueueId':_0x2f3ccc[_0x482d('0x19')]||undefined,'CampaignId':_0x2f3ccc[_0x482d('0x63')]||undefined};};exports['filterKey']=function(_0xbfca6f){if(_0xbfca6f==='uniqueid'||_0xbfca6f===_0x482d('0x64')||_0xbfca6f==='queue'||_0xbfca6f===_0x482d('0x65')||_0xbfca6f===_0x482d('0x66')||_0xbfca6f==='dialAnswer'||_0xbfca6f==='membername'||_0xbfca6f==='channelAgent'||_0xbfca6f===_0x482d('0x41')||_0xbfca6f===_0x482d('0x50')||_0xbfca6f===_0x482d('0x17')||_0xbfca6f===_0x482d('0x51')||_0xbfca6f==='countbusyretry'||_0xbfca6f===_0x482d('0x4a')||_0xbfca6f===_0x482d('0x4b')||_0xbfca6f===_0x482d('0x67')||_0xbfca6f==='callback'||_0xbfca6f==='callbackuniqueid'||_0xbfca6f==='callbackat'||_0xbfca6f==='recallme'||_0xbfca6f==='ContactId'||_0xbfca6f===_0x482d('0x53')||_0xbfca6f===_0x482d('0x68')||_0xbfca6f===_0x482d('0x19')||_0xbfca6f===_0x482d('0x69')||_0xbfca6f==='xmd-voicequeueid'||_0xbfca6f===_0x482d('0x6a')||_0xbfca6f===_0x482d('0x6b')||_0xbfca6f===_0x482d('0x6c')||_0xbfca6f===_0x482d('0x6d')||_0xbfca6f===_0x482d('0x6e')||_0xbfca6f===_0x482d('0x6f')||_0xbfca6f===_0x482d('0x70')||_0xbfca6f===_0x482d('0x71')||_0xbfca6f==='xmd-contactid'||_0xbfca6f===_0x482d('0x72')||_0xbfca6f===_0x482d('0x73')||_0xbfca6f===_0x482d('0x74')||_0xbfca6f===_0x482d('0x75')||_0xbfca6f==='rtpaudioqos'||_0xbfca6f===_0x482d('0x76')||_0xbfca6f===_0x482d('0x77')||_0xbfca6f===_0x482d('0x78')||_0xbfca6f==='rtpaudioqosloss'||_0xbfca6f==='rtpaudioqoslossbridged'||_0xbfca6f===_0x482d('0x79')||_0xbfca6f==='rtpaudioqosrttbridged'||_0xbfca6f==='rtpaudioqos'||_0xbfca6f===_0x482d('0x76')||_0xbfca6f==='rtpaudioqosjitter'||_0xbfca6f===_0x482d('0x78')||_0xbfca6f===_0x482d('0x7a')||_0xbfca6f===_0x482d('0x7b')||_0xbfca6f==='rtpaudioqosrtt'||_0xbfca6f==='rtpaudioqosrttbridged'||_0xbfca6f===_0x482d('0x7c')||_0xbfca6f===_0x482d('0x7d')||_0xbfca6f==='state'||_0xbfca6f==='statedesc'){return![];}return!![];};exports[_0x482d('0x7e')]=function(_0x5b329c,_0x45407a){var _0x23c681,_0x5f5477,_0xafe637;if(_0x45407a<=0x0){_0x45407a=0x1;}_0x23c681=new RegExp('\x5cw{0,'+_0x45407a+'}$');_0x5f5477=Math['pow'](0xa,_0x45407a-0x1);_0xafe637=Math[_0x482d('0x7f')](0xa,_0x45407a)-0x1;return util[_0x482d('0x12')]('%s',_[_0x482d('0x80')](_0x5b329c,_0x23c681,_[_0x482d('0x81')](_0x5f5477,_0xafe637)));};exports['extractCalleridName']=function(_0xba50e3){var _0x3ce7d1=_0xba50e3[_0x482d('0x82')](/"(.*?)"/);return _0x3ce7d1?_0x3ce7d1[0x1]:_0xba50e3;};exports['extractCalleridNumber']=function(_0x32c7d3){var _0x52704d=_0x32c7d3[_0x482d('0x82')](/<(.*?)>/);return _0x52704d?_0x52704d[0x1]:_0x32c7d3;};
\ No newline at end of file
diff --git a/server/services/ami/properties.js b/server/services/ami/properties.js
index ee99df6..b5b0c15 100644
--- a/server/services/ami/properties.js
+++ b/server/services/ami/properties.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x826a=['voicequeuechannelhangup','voicequeuechannelredirect','string','boolean','queueremove','reload','voicequeuechannel','voicechannel'];(function(_0x4921d5,_0x2e52c5){var _0x25a0fe=function(_0x31acfd){while(--_0x31acfd){_0x4921d5['push'](_0x4921d5['shift']());}};_0x25a0fe(++_0x2e52c5);}(_0x826a,0x1aa));var _0xa826=function(_0x57e382,_0x4a5402){_0x57e382=_0x57e382-0x0;var _0x256782=_0x826a[_0x57e382];return _0x256782;};'use strict';exports['queueadd']={'queue':{'type':_0xa826('0x0'),'required':!![]},'interface':{'type':'string','required':!![]},'membername':{'type':_0xa826('0x0'),'required':!![]},'penalty':{'type':'number','required':![]},'paused':{'type':_0xa826('0x1'),'required':![]}};exports[_0xa826('0x2')]={'queue':{'type':_0xa826('0x0'),'required':!![]},'interface':{'type':_0xa826('0x0'),'required':!![]}};exports['queuepause']={'interface':{'type':_0xa826('0x0'),'required':!![]},'paused':{'type':_0xa826('0x1')},'reason':{'type':_0xa826('0x0'),'required':![]}};exports[_0xa826('0x3')]={'module':{'type':_0xa826('0x0'),'required':![]}};exports[_0xa826('0x4')]={'uniqueid':{'type':_0xa826('0x0'),'required':!![]}};exports[_0xa826('0x5')]={'uniqueid':{'type':_0xa826('0x0'),'required':!![]},'filename':{'type':_0xa826('0x0')},'format':{'type':_0xa826('0x0')},'mixmonitorid':{'type':_0xa826('0x0')}};exports[_0xa826('0x6')]={'uniqueid':{'type':_0xa826('0x0'),'required':!![]}};exports[_0xa826('0x7')]={'uniqueid':{'type':_0xa826('0x0'),'required':!![]},'exten':{'type':'string','required':!![]},'context':{'type':_0xa826('0x0')}};
\ No newline at end of file
+var _0xa786=['boolean','queueremove','reload','voicequeuechannel','voicechannel','voicequeuechannelhangup','voicequeuechannelredirect','string','number'];(function(_0x8a611,_0xc085ab){var _0x53ba19=function(_0x23b298){while(--_0x23b298){_0x8a611['push'](_0x8a611['shift']());}};_0x53ba19(++_0xc085ab);}(_0xa786,0x1d2));var _0x6a78=function(_0x11b09c,_0x4f3f76){_0x11b09c=_0x11b09c-0x0;var _0x16c044=_0xa786[_0x11b09c];return _0x16c044;};'use strict';exports['queueadd']={'queue':{'type':'string','required':!![]},'interface':{'type':_0x6a78('0x0'),'required':!![]},'membername':{'type':_0x6a78('0x0'),'required':!![]},'penalty':{'type':_0x6a78('0x1'),'required':![]},'paused':{'type':_0x6a78('0x2'),'required':![]}};exports[_0x6a78('0x3')]={'queue':{'type':_0x6a78('0x0'),'required':!![]},'interface':{'type':_0x6a78('0x0'),'required':!![]}};exports['queuepause']={'interface':{'type':_0x6a78('0x0'),'required':!![]},'paused':{'type':_0x6a78('0x2')},'reason':{'type':_0x6a78('0x0'),'required':![]}};exports[_0x6a78('0x4')]={'module':{'type':_0x6a78('0x0'),'required':![]}};exports[_0x6a78('0x5')]={'uniqueid':{'type':_0x6a78('0x0'),'required':!![]}};exports[_0x6a78('0x6')]={'uniqueid':{'type':_0x6a78('0x0'),'required':!![]},'filename':{'type':_0x6a78('0x0')},'format':{'type':_0x6a78('0x0')},'mixmonitorid':{'type':_0x6a78('0x0')}};exports[_0x6a78('0x7')]={'uniqueid':{'type':_0x6a78('0x0'),'required':!![]}};exports[_0x6a78('0x8')]={'uniqueid':{'type':_0x6a78('0x0'),'required':!![]},'exten':{'type':_0x6a78('0x0'),'required':!![]},'context':{'type':_0x6a78('0x0')}};
\ No newline at end of file
diff --git a/server/services/ami/realtime/index.js b/server/services/ami/realtime/index.js
index 5e403f1..d3525f2 100644
--- a/server/services/ami/realtime/index.js
+++ b/server/services/ami/realtime/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6e65=['format','total','answered','sumHoldTime','isEmpty','ivrTotalCallsDays','ivrAnswerCallsDay','unmanaged','abandoned','sumBillable','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayCallersExit','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','length','isNil','isUndefined','initVoiceQueues','initTriggers','triggers','initZendeskAccounts','initFreshdeskAccounts','initZohoAccounts','initDeskAccounts','initSugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','initDynamics365Accounts','initVoiceQueueReports','groupBy','uniqueid','queue','queuecallerexit','queuecallerabandon','queuecallerleaveAt','diff','queuecallerjoinAt','seconds','sumDuration','queuecallercompleteAt','queuecallerabandonAt','queuecallerexitAt','queuecallercomplete','initVoiceCallReports','disposition','ANSWERED','duration','billableseconds','initCampaigns','campaigns','initVoiceExtensions','voiceExtensions','initCampaignHopperHistory','exports','bluebird','lodash','moment','../model/agent','../model/telephone','../model/trigger','../model/template','../model/campaign','../model/voiceExtension','../model/salesforceAccount','../model/freshdeskAccount','../model/zohoAccount','../model/deskAccount','../model/dynamics365Account','agents','telephones','trunks','voiceQueues','templates','outbound','channels','timers','zendeskAccounts','salesforceAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','faxAccounts','hasOwnProperty','mapKeys','SIP/%s','name','interface'];(function(_0x3ddedd,_0x505959){var _0x52c66b=function(_0x4cdbcb){while(--_0x4cdbcb){_0x3ddedd['push'](_0x3ddedd['shift']());}};_0x52c66b(++_0x505959);}(_0x6e65,0x1c5));var _0x56e6=function(_0x1c28d2,_0x1e77f7){_0x1c28d2=_0x1c28d2-0x0;var _0x5aa5b3=_0x6e65[_0x1c28d2];return _0x5aa5b3;};'use strict';var BPromise=require(_0x56e6('0x0'));var util=require('util');var _=require(_0x56e6('0x1'));var moment=require(_0x56e6('0x2'));var Agent=require(_0x56e6('0x3'));var Telephone=require(_0x56e6('0x4'));var Trunk=require('../model/trunk');var VoiceQueue=require('../model/voiceQueue');var Trigger=require(_0x56e6('0x5'));var Template=require(_0x56e6('0x6'));var Campaign=require(_0x56e6('0x7'));var VoiceExtension=require(_0x56e6('0x8'));var ZendeskAccount=require('../model/zendeskAccount');var SalesforceAccount=require(_0x56e6('0x9'));var FreshdeskAccount=require(_0x56e6('0xa'));var SugarcrmAccount=require('../model/sugarcrmAccount');var ZohoAccount=require(_0x56e6('0xb'));var DeskAccount=require(_0x56e6('0xc'));var VtigerAccount=require('../model/vtigerAccount');var ServicenowAccount=require('../model/servicenowAccount');var Dynamics365Account=require(_0x56e6('0xd'));var FaxAccount=require('../model/faxAccount');var Realtime=function(){this[_0x56e6('0xe')]={};this[_0x56e6('0xf')]={};this[_0x56e6('0x10')]={};this[_0x56e6('0x11')]={};this['triggers']={};this['campaigns']={};this[_0x56e6('0x12')]={};this[_0x56e6('0x13')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this[_0x56e6('0x14')]={};this['queueChannels']={};this['outboundChannels']={};this[_0x56e6('0x15')]={};this[_0x56e6('0x16')]={};this[_0x56e6('0x17')]={};this[_0x56e6('0x18')]={};this[_0x56e6('0x19')]={};this[_0x56e6('0x1a')]={};this[_0x56e6('0x1b')]={};this[_0x56e6('0x1c')]={};this[_0x56e6('0x1d')]={};this[_0x56e6('0x1e')]={};this[_0x56e6('0x1f')]={};};function freeIsNotKey(_0x34ba27,_0x2e7546,_0x3c39f0){var _0x535d4c=_['mapKeys'](_0x34ba27,function(_0x3590c3,_0x4fb53e){return _0x3590c3[_0x3c39f0];});for(var _0x5a8a7b in _0x2e7546){if(_0x2e7546[_0x56e6('0x20')](_0x5a8a7b)){if(!_0x535d4c[_0x5a8a7b]){delete _0x2e7546[_0x5a8a7b];}}}}function freeIsNotKeySip(_0x3ae6a1,_0x4baa02){var _0x4497d9=_[_0x56e6('0x21')](_0x3ae6a1,function(_0x484b20,_0x555a3a){return util['format'](_0x56e6('0x22'),_0x484b20[_0x56e6('0x23')]);});for(var _0x815366 in _0x4baa02){if(_0x4baa02['hasOwnProperty'](_0x815366)){if(!_0x4497d9[_0x815366]){delete _0x4baa02[_0x815366];}}}}function freeIsNotKeyAgent(_0x5c4205,_0x11fae2){var _0x31f4d7=_['mapKeys'](_0x5c4205,function(_0x56677c,_0x26d8dd){var _0x384afe=_['isNil'](_0x56677c[_0x56e6('0x24')])?util[_0x56e6('0x25')]('SIP/%s',_0x56677c[_0x56e6('0x23')]):_0x56677c[_0x56e6('0x24')];return _0x384afe;});for(var _0xbe57ad in _0x11fae2){if(_0x11fae2[_0x56e6('0x20')](_0xbe57ad)){if(!_0x31f4d7[_0xbe57ad]){delete _0x11fae2[_0xbe57ad];}}}}function clearVoiceCallReports(_0x4f518c){_0x4f518c[_0x56e6('0x26')]=0x0;_0x4f518c[_0x56e6('0x27')]=0x0;_0x4f518c[_0x56e6('0x28')]=0x0;_0x4f518c['sumDuration']=0x0;_0x4f518c['sumBillable']=0x0;}function clearCampaigns(_0xc2f160){if(!_[_0x56e6('0x29')](_0xc2f160)){for(var _0x3ce665 in _0xc2f160){if(_0xc2f160[_0x56e6('0x20')](_0x3ce665)){_0xc2f160[_0x3ce665][_0x56e6('0x2a')]=0x0;_0xc2f160[_0x3ce665][_0x56e6('0x2b')]=0x0;}}}}function clearVoiceQueues(_0x4adac9){if(!_['isEmpty'](_0x4adac9)){for(var _0x284949 in _0x4adac9){if(_0x4adac9['hasOwnProperty'](_0x284949)){_0x4adac9[_0x284949]['total']=0x0;_0x4adac9[_0x284949][_0x56e6('0x27')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x2c')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x2d')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x28')]=0x0;_0x4adac9[_0x284949]['sumDuration']=0x0;_0x4adac9[_0x284949][_0x56e6('0x2e')]=0x0;_0x4adac9[_0x284949]['outboundAnswerAgiCallsDay']=0x0;_0x4adac9[_0x284949]['outboundNoAnswerCallsDay']=0x0;_0x4adac9[_0x284949][_0x56e6('0x2f')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x30')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x31')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x32')]=0x0;_0x4adac9[_0x284949]['outboundDropCallsDayTimeout']=0x0;_0x4adac9[_0x284949][_0x56e6('0x33')]=0x0;_0x4adac9[_0x284949]['outboundBlacklistCallsDay']=0x0;_0x4adac9[_0x284949][_0x56e6('0x34')]=0x0;_0x4adac9[_0x284949]['outboundRejectCallsDay']=0x0;_0x4adac9[_0x284949][_0x56e6('0x35')]=0x0;_0x4adac9[_0x284949]['outboundAnswerAgiCallsDay']=0x0;_0x4adac9[_0x284949][_0x56e6('0x36')]=0x0;_0x4adac9[_0x284949][_0x56e6('0x37')]=!![];}}}}Realtime[_0x56e6('0x38')][_0x56e6('0x39')]=function(_0x3861fc,_0x353476){for(var _0x78b264 in _0x353476){if(_0x3861fc[_0x56e6('0x20')](_0x78b264)){_0x3861fc[_0x78b264]=_0x353476[_0x78b264];}}};Realtime[_0x56e6('0x38')]['initAgents']=function(){var _0x5cc074=this;return function(_0x3462fd){if(_0x3462fd){freeIsNotKeyAgent(_0x3462fd,_0x5cc074['agents']);for(var _0xb8f0f5=0x0,_0x263537={},_0xa0fcd9={};_0xb8f0f5<_0x3462fd[_0x56e6('0x3a')];_0xb8f0f5+=0x1){_0x263537=_0x3462fd[_0xb8f0f5];var _0x55f2cc=_[_0x56e6('0x3b')](_0x263537['interface'])?util['format'](_0x56e6('0x22'),_0x263537['name']):_0x263537[_0x56e6('0x24')];if(_[_0x56e6('0x3c')](_0x5cc074['agents'][_0x55f2cc])){_0x5cc074['agents'][_0x55f2cc]=new Agent(_0x263537);}else{_0x5cc074[_0x56e6('0x39')](_0x5cc074[_0x56e6('0xe')][_0x55f2cc],_0x263537);}}}return _0x5cc074[_0x56e6('0xe')];};};Realtime[_0x56e6('0x38')]['initTelephones']=function(){var _0x1134da=this;return function(_0x1b00ca){if(_0x1b00ca){freeIsNotKeySip(_0x1b00ca,_0x1134da[_0x56e6('0xf')]);for(var _0x389f7b=0x0,_0x2281e1={},_0x1c8bdc={};_0x389f7b<_0x1b00ca[_0x56e6('0x3a')];_0x389f7b+=0x1){_0x2281e1=_0x1b00ca[_0x389f7b];if(_[_0x56e6('0x3c')](_0x1134da[_0x56e6('0xf')][util['format']('SIP/%s',_0x2281e1['name'])])){_0x1134da[_0x56e6('0xf')][util[_0x56e6('0x25')](_0x56e6('0x22'),_0x2281e1[_0x56e6('0x23')])]=new Telephone(_0x2281e1);}else{_0x1134da[_0x56e6('0x39')](_0x1134da['telephones'][util[_0x56e6('0x25')](_0x56e6('0x22'),_0x2281e1[_0x56e6('0x23')])],_0x2281e1);}}}return _0x1134da[_0x56e6('0xf')];};};Realtime['prototype']['initTrunks']=function(){var _0x29ef94=this;return function(_0x4fb7a2){if(_0x4fb7a2){freeIsNotKeySip(_0x4fb7a2,_0x29ef94['trunks']);for(var _0x42e1a5=0x0,_0x531426={},_0x201ee0={};_0x42e1a5<_0x4fb7a2[_0x56e6('0x3a')];_0x42e1a5+=0x1){_0x531426=_0x4fb7a2[_0x42e1a5];if(_[_0x56e6('0x3c')](_0x29ef94[_0x56e6('0x10')][util['format'](_0x56e6('0x22'),_0x531426['name'])])){_0x29ef94[_0x56e6('0x10')][util[_0x56e6('0x25')](_0x56e6('0x22'),_0x531426[_0x56e6('0x23')])]=new Trunk(_0x531426);}else{_0x29ef94[_0x56e6('0x39')](_0x29ef94[_0x56e6('0x10')][util[_0x56e6('0x25')](_0x56e6('0x22'),_0x531426[_0x56e6('0x23')])],_0x531426);}}}return _0x29ef94['trunks'];};};Realtime[_0x56e6('0x38')][_0x56e6('0x3d')]=function(){var _0x1bd523=this;return function(_0x5ba1e8){if(_0x5ba1e8){freeIsNotKey(_0x5ba1e8,_0x1bd523[_0x56e6('0x11')],'name');for(var _0x9715f5=0x0,_0x2f7704={},_0x24bada={};_0x9715f5<_0x5ba1e8['length'];_0x9715f5+=0x1){_0x2f7704=_0x5ba1e8[_0x9715f5];if(_[_0x56e6('0x3c')](_0x1bd523[_0x56e6('0x11')][_0x2f7704[_0x56e6('0x23')]])){_0x1bd523['voiceQueues'][_0x2f7704[_0x56e6('0x23')]]=new VoiceQueue(_0x2f7704);}else{_0x1bd523['mergeFromDatabase'](_0x1bd523[_0x56e6('0x11')][_0x2f7704[_0x56e6('0x23')]],_0x2f7704);}}}return _0x1bd523['voiceQueues'];};};Realtime[_0x56e6('0x38')][_0x56e6('0x3e')]=function(){var _0x11c7b2=this;return function(_0x217766){if(_0x217766){freeIsNotKey(_0x217766,_0x11c7b2['triggers'],'id');for(var _0x202ad1=0x0,_0x395577={},_0x4f5364={};_0x202ad1<_0x217766[_0x56e6('0x3a')];_0x202ad1+=0x1){_0x395577=_0x217766[_0x202ad1];if(_[_0x56e6('0x3c')](_0x11c7b2[_0x56e6('0x3f')][_0x395577['id']])){_0x11c7b2['triggers'][_0x395577['id']]=new Trigger(_0x395577);}else{_0x11c7b2[_0x56e6('0x39')](_0x11c7b2[_0x56e6('0x3f')][_0x395577['id']],_0x395577);}}}return _0x11c7b2[_0x56e6('0x3f')];};};Realtime[_0x56e6('0x38')]['initTemplates']=function(){var _0x118b7c=this;return function(_0x2af679){if(_0x2af679){freeIsNotKey(_0x2af679,_0x118b7c[_0x56e6('0x12')],'id');for(var _0x8f18c5=0x0,_0x32ad3b={},_0x549176={};_0x8f18c5<_0x2af679[_0x56e6('0x3a')];_0x8f18c5+=0x1){_0x32ad3b=_0x2af679[_0x8f18c5];if(_['isUndefined'](_0x118b7c[_0x56e6('0x12')][_0x32ad3b['id']])){_0x118b7c['templates'][_0x32ad3b['id']]=new Template(_0x32ad3b);}else{_0x118b7c[_0x56e6('0x39')](_0x118b7c['templates'][_0x32ad3b['id']],_0x32ad3b);}}}return _0x118b7c[_0x56e6('0x12')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x40')]=function(){var _0x3fb2b5=this;return function(_0x2100c1){if(_0x2100c1){freeIsNotKey(_0x2100c1,_0x3fb2b5[_0x56e6('0x16')],'id');for(var _0x5c2a21=0x0,_0x524799={},_0x3789be={};_0x5c2a21<_0x2100c1[_0x56e6('0x3a')];_0x5c2a21+=0x1){_0x524799=_0x2100c1[_0x5c2a21];if(_[_0x56e6('0x3c')](_0x3fb2b5[_0x56e6('0x16')][_0x524799['id']])){_0x3fb2b5[_0x56e6('0x16')][_0x524799['id']]=new ZendeskAccount(_0x524799);}else{_0x3fb2b5[_0x56e6('0x39')](_0x3fb2b5[_0x56e6('0x16')][_0x524799['id']],_0x524799);}}}return _0x3fb2b5[_0x56e6('0x16')];};};Realtime[_0x56e6('0x38')]['initSalesforceAccounts']=function(){var _0x548982=this;return function(_0x2b67ee){if(_0x2b67ee){freeIsNotKey(_0x2b67ee,_0x548982[_0x56e6('0x17')],'id');for(var _0x4bace0=0x0,_0x48b32e={},_0xe00bec={};_0x4bace0<_0x2b67ee[_0x56e6('0x3a')];_0x4bace0+=0x1){_0x48b32e=_0x2b67ee[_0x4bace0];if(_[_0x56e6('0x3c')](_0x548982['salesforceAccounts'][_0x48b32e['id']])){_0x548982[_0x56e6('0x17')][_0x48b32e['id']]=new SalesforceAccount(_0x48b32e);}else{_0x548982['mergeFromDatabase'](_0x548982[_0x56e6('0x17')][_0x48b32e['id']],_0x48b32e);}}}return _0x548982[_0x56e6('0x17')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x41')]=function(){var _0x2351a1=this;return function(_0x5a8e56){if(_0x5a8e56){freeIsNotKey(_0x5a8e56,_0x2351a1[_0x56e6('0x19')],'id');for(var _0x34c073=0x0,_0x31bece={},_0x15cbf2={};_0x34c073<_0x5a8e56[_0x56e6('0x3a')];_0x34c073+=0x1){_0x31bece=_0x5a8e56[_0x34c073];if(_['isUndefined'](_0x2351a1[_0x56e6('0x19')][_0x31bece['id']])){_0x2351a1[_0x56e6('0x19')][_0x31bece['id']]=new FreshdeskAccount(_0x31bece);}else{_0x2351a1[_0x56e6('0x39')](_0x2351a1[_0x56e6('0x19')][_0x31bece['id']],_0x31bece);}}}return _0x2351a1[_0x56e6('0x19')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x42')]=function(){var _0x840dcc=this;return function(_0xe03dee){if(_0xe03dee){freeIsNotKey(_0xe03dee,_0x840dcc[_0x56e6('0x1a')],'id');for(var _0x508bbf=0x0,_0x15a683={},_0x104645={};_0x508bbf<_0xe03dee[_0x56e6('0x3a')];_0x508bbf+=0x1){_0x15a683=_0xe03dee[_0x508bbf];if(_[_0x56e6('0x3c')](_0x840dcc['zohoAccounts'][_0x15a683['id']])){_0x840dcc[_0x56e6('0x1a')][_0x15a683['id']]=new ZohoAccount(_0x15a683);}else{_0x840dcc[_0x56e6('0x39')](_0x840dcc[_0x56e6('0x1a')][_0x15a683['id']],_0x15a683);}}}return _0x840dcc[_0x56e6('0x1a')];};};Realtime['prototype'][_0x56e6('0x43')]=function(){var _0x33ea1d=this;return function(_0x486c53){if(_0x486c53){freeIsNotKey(_0x486c53,_0x33ea1d[_0x56e6('0x1b')],'id');for(var _0x53d6a8=0x0,_0x1bfd79={},_0x3ad2d9={};_0x53d6a8<_0x486c53[_0x56e6('0x3a')];_0x53d6a8+=0x1){_0x1bfd79=_0x486c53[_0x53d6a8];if(_[_0x56e6('0x3c')](_0x33ea1d[_0x56e6('0x1b')][_0x1bfd79['id']])){_0x33ea1d[_0x56e6('0x1b')][_0x1bfd79['id']]=new DeskAccount(_0x1bfd79);}else{_0x33ea1d[_0x56e6('0x39')](_0x33ea1d[_0x56e6('0x1b')][_0x1bfd79['id']],_0x1bfd79);}}}return _0x33ea1d['deskAccounts'];};};Realtime[_0x56e6('0x38')][_0x56e6('0x44')]=function(){var _0x3cd2eb=this;return function(_0x362537){if(_0x362537){freeIsNotKey(_0x362537,_0x3cd2eb[_0x56e6('0x18')],'id');for(var _0x3979b0=0x0,_0x1602a3={},_0x1ed0f2={};_0x3979b0<_0x362537[_0x56e6('0x3a')];_0x3979b0+=0x1){_0x1602a3=_0x362537[_0x3979b0];if(_[_0x56e6('0x3c')](_0x3cd2eb[_0x56e6('0x18')][_0x1602a3['id']])){_0x3cd2eb['sugarcrmAccounts'][_0x1602a3['id']]=new SugarcrmAccount(_0x1602a3);}else{_0x3cd2eb[_0x56e6('0x39')](_0x3cd2eb[_0x56e6('0x18')][_0x1602a3['id']],_0x1602a3);}}}return _0x3cd2eb['sugarcrmAccounts'];};};Realtime[_0x56e6('0x38')][_0x56e6('0x45')]=function(){var _0x15e09f=this;return function(_0x515cdb){if(_0x515cdb){freeIsNotKey(_0x515cdb,_0x15e09f['vtigerAccounts'],'id');for(var _0x1a92a1=0x0,_0x3b7cdf={},_0x3d6e6c={};_0x1a92a1<_0x515cdb['length'];_0x1a92a1+=0x1){_0x3b7cdf=_0x515cdb[_0x1a92a1];if(_[_0x56e6('0x3c')](_0x15e09f['vtigerAccounts'][_0x3b7cdf['id']])){_0x15e09f[_0x56e6('0x1c')][_0x3b7cdf['id']]=new VtigerAccount(_0x3b7cdf);}else{_0x15e09f[_0x56e6('0x39')](_0x15e09f[_0x56e6('0x1c')][_0x3b7cdf['id']],_0x3b7cdf);}}}return _0x15e09f[_0x56e6('0x1c')];};};Realtime['prototype'][_0x56e6('0x46')]=function(){var _0x54e786=this;return function(_0xb72275){if(_0xb72275){freeIsNotKey(_0xb72275,_0x54e786['servicenowAccounts'],'id');for(var _0x22ccc6=0x0,_0x21606d={},_0x2c82bf={};_0x22ccc6<_0xb72275[_0x56e6('0x3a')];_0x22ccc6+=0x1){_0x21606d=_0xb72275[_0x22ccc6];if(_[_0x56e6('0x3c')](_0x54e786[_0x56e6('0x1d')][_0x21606d['id']])){_0x54e786['servicenowAccounts'][_0x21606d['id']]=new ServicenowAccount(_0x21606d);}else{_0x54e786[_0x56e6('0x39')](_0x54e786[_0x56e6('0x1d')][_0x21606d['id']],_0x21606d);}}}return _0x54e786[_0x56e6('0x1d')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x47')]=function(){var _0x2f314b=this;return function(_0x8d96fd){if(_0x8d96fd){freeIsNotKey(_0x8d96fd,_0x2f314b[_0x56e6('0x1e')],'id');for(var _0x27a530=0x0,_0x16d36a={},_0xe27713={};_0x27a530<_0x8d96fd['length'];_0x27a530+=0x1){_0x16d36a=_0x8d96fd[_0x27a530];if(_[_0x56e6('0x3c')](_0x2f314b[_0x56e6('0x1e')][_0x16d36a['id']])){_0x2f314b[_0x56e6('0x1e')][_0x16d36a['id']]=new Dynamics365Account(_0x16d36a);}else{_0x2f314b[_0x56e6('0x39')](_0x2f314b[_0x56e6('0x1e')][_0x16d36a['id']],_0x16d36a);}}}return _0x2f314b[_0x56e6('0x1e')];};};Realtime[_0x56e6('0x38')]['initVoiceQueueHopperHistory']=function(){var _0x32feed=this;return function(_0x38a86c){for(var _0x13238a=0x0;_0x13238a<_0x38a86c['length'];_0x13238a+=0x1){_['merge'](_0x32feed['voiceQueues'][_0x38a86c[_0x13238a][_0x56e6('0x23')]],_0x38a86c[_0x13238a]);}return _0x32feed[_0x56e6('0x11')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x48')]=function(){var _0x1a400d=this;return function(_0x38de6b){clearVoiceQueues(_0x1a400d['voiceQueues']);if(_0x38de6b){_0x38de6b=_[_0x56e6('0x49')](_0x38de6b,_0x56e6('0x4a'));for(var _0x2f6b5b in _0x38de6b){if(_0x38de6b['hasOwnProperty'](_0x2f6b5b)){var _0x322cb9={};for(var _0x2022ad=0x0;_0x2022ad<_0x38de6b[_0x2f6b5b]['length'];_0x2022ad+=0x1){var _0x3aa089=_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x4b')];if(_0x1a400d[_0x56e6('0x11')][_0x3aa089]){if(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x4c')]){_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x2c')]+=0x1;}if(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x4d')]){_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x2d')]+=0x1;}_0x1a400d['voiceQueues'][_0x3aa089][_0x56e6('0x28')]+=moment(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x4e')])[_0x56e6('0x4f')](moment(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x50')]),_0x56e6('0x51'))||0x0;if(_0x2022ad===_0x38de6b[_0x2f6b5b][_0x56e6('0x3a')]-0x1){_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x52')]+=moment(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x53')]||_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x54')]||_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x55')])[_0x56e6('0x4f')](moment(_0x38de6b[_0x2f6b5b][_0x2022ad]['queuecallerjoinAt']),_0x56e6('0x51'))||0x0;_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x26')]+=0x1;if(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x56')]){_0x1a400d['voiceQueues'][_0x3aa089]['answered']+=0x1;_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x2e')]+=moment(_0x38de6b[_0x2f6b5b][_0x2022ad][_0x56e6('0x53')])[_0x56e6('0x4f')](moment(_0x38de6b[_0x2f6b5b][_0x2022ad]['queuecallerleaveAt']),_0x56e6('0x51'))||0x0;}}else{_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x52')]+=_0x1a400d[_0x56e6('0x11')][_0x3aa089][_0x56e6('0x28')]||0x0;}}}}}}return _0x1a400d[_0x56e6('0x11')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x57')]=function(){var _0x5d197a=this;return function(_0x424123){clearVoiceCallReports(_0x5d197a[_0x56e6('0x13')]);if(_0x424123){for(var _0x432163=0x0;_0x432163<_0x424123['length'];_0x432163+=0x1){_0x5d197a['outbound']['total']+=0x1;_0x5d197a['outbound'][_0x56e6('0x52')]+=_0x424123[_0x432163]['duration'];if(_0x424123[_0x432163][_0x56e6('0x58')]===_0x56e6('0x59')){_0x5d197a[_0x56e6('0x13')][_0x56e6('0x27')]+=0x1;_0x5d197a[_0x56e6('0x13')][_0x56e6('0x28')]+=_0x424123[_0x432163][_0x56e6('0x5a')]-_0x424123[_0x432163][_0x56e6('0x5b')]||0x0;_0x5d197a['outbound'][_0x56e6('0x2e')]+=_0x424123[_0x432163]['billableseconds'];}}}return _0x5d197a[_0x56e6('0x13')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x5c')]=function(){var _0xdbcc81=this;return function(_0x5b5f48){if(_0x5b5f48){freeIsNotKey(_0x5b5f48,_0xdbcc81[_0x56e6('0x5d')],_0x56e6('0x23'));for(var _0x274a52=0x0,_0x358d09={};_0x274a52<_0x5b5f48[_0x56e6('0x3a')];_0x274a52+=0x1){_0x358d09=_0x5b5f48[_0x274a52];if(_[_0x56e6('0x3c')](_0xdbcc81['campaigns'][_0x358d09['name']])){_0xdbcc81[_0x56e6('0x5d')][_0x358d09['name']]=new Campaign(_0x358d09);}else{_0xdbcc81['mergeFromDatabase'](_0xdbcc81['campaigns'][_0x358d09[_0x56e6('0x23')]],_0x358d09);}}}return _0xdbcc81['campaigns'];};};Realtime['prototype'][_0x56e6('0x5e')]=function(){var _0x132eba=this;return function(_0x50249e){if(_0x50249e){freeIsNotKey(_0x50249e,_0x132eba['voiceExtensions'],'id');for(var _0xd1c29d=0x0,_0x29964d={};_0xd1c29d<_0x50249e[_0x56e6('0x3a')];_0xd1c29d+=0x1){_0x29964d=_0x50249e[_0xd1c29d];if(_['isUndefined'](_0x132eba[_0x56e6('0x5f')][_0x29964d['id']])){_0x132eba[_0x56e6('0x5f')][_0x29964d['id']]=new VoiceExtension(_0x29964d);}else{_0x132eba[_0x56e6('0x39')](_0x132eba[_0x56e6('0x5f')][_0x29964d['id']],_0x29964d);}}}return _0x132eba[_0x56e6('0x5f')];};};Realtime[_0x56e6('0x38')][_0x56e6('0x60')]=function(){var _0x1341f8=this;return function(_0x42ad2e){clearCampaigns(_0x1341f8[_0x56e6('0x5d')]);for(var _0x510bc4=0x0;_0x510bc4<_0x42ad2e['length'];_0x510bc4+=0x1){_['merge'](_0x1341f8[_0x56e6('0x5d')][_0x42ad2e[_0x510bc4][_0x56e6('0x23')]],_0x42ad2e[_0x510bc4]);}return _0x1341f8[_0x56e6('0x5d')];};};Realtime[_0x56e6('0x38')]['initFaxAccounts']=function(){var _0x442a81=this;return function(_0x57ed4d){if(_0x57ed4d){freeIsNotKey(_0x57ed4d,_0x442a81[_0x56e6('0x1f')],'id');for(var _0x5b4d44=0x0,_0x5bc880={},_0x50cb78={};_0x5b4d44<_0x57ed4d[_0x56e6('0x3a')];_0x5b4d44+=0x1){_0x5bc880=_0x57ed4d[_0x5b4d44];if(_[_0x56e6('0x3c')](_0x442a81[_0x56e6('0x1f')][_0x5bc880['id']])){_0x442a81['faxAccounts'][_0x5bc880['id']]=new FaxAccount(_0x5bc880);}else{_0x442a81[_0x56e6('0x39')](_0x442a81[_0x56e6('0x1f')][_0x5bc880['id']],_0x5bc880);}}}return _0x442a81['faxAccounts'];};};module[_0x56e6('0x61')]=Realtime;
\ No newline at end of file
+var _0xb28a=['outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundReCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','isUndefined','initTelephones','initTrunks','length','trunks','initVoiceQueues','initTriggers','triggers','initTemplates','initZendeskAccounts','zendeskAccounts','initZohoAccounts','initDeskAccounts','initSugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','servicenowAccounts','initDynamics365Accounts','dynamics365Accounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','groupBy','uniqueid','queuecallerabandon','queuecallerleaveAt','diff','queuecallerjoinAt','seconds','sumDuration','queuecallercompleteAt','queuecallerabandonAt','initVoiceCallReports','duration','disposition','ANSWERED','billableseconds','initVoiceExtensions','initCampaignHopperHistory','initFaxAccounts','exports','util','lodash','../model/agent','../model/trigger','../model/template','../model/campaign','../model/voiceExtension','../model/zendeskAccount','../model/salesforceAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/faxAccount','agents','telephones','voiceQueues','campaigns','templates','outbound','voiceExtensions','channels','queueChannels','outboundChannels','timers','salesforceAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','faxAccounts','mapKeys','hasOwnProperty','format','name','isNil','interface','SIP/%s','total','sumHoldTime','sumBillable','ivrTotalCallsDays','ivrAnswerCallsDay','answered','unmanaged','abandoned','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay'];(function(_0x37bab4,_0x4fa85e){var _0x336d20=function(_0xdd4ab8){while(--_0xdd4ab8){_0x37bab4['push'](_0x37bab4['shift']());}};_0x336d20(++_0x4fa85e);}(_0xb28a,0x166));var _0xab28=function(_0x546687,_0x3fb7fb){_0x546687=_0x546687-0x0;var _0x2ba3cd=_0xb28a[_0x546687];return _0x2ba3cd;};'use strict';var BPromise=require('bluebird');var util=require(_0xab28('0x0'));var _=require(_0xab28('0x1'));var moment=require('moment');var Agent=require(_0xab28('0x2'));var Telephone=require('../model/telephone');var Trunk=require('../model/trunk');var VoiceQueue=require('../model/voiceQueue');var Trigger=require(_0xab28('0x3'));var Template=require(_0xab28('0x4'));var Campaign=require(_0xab28('0x5'));var VoiceExtension=require(_0xab28('0x6'));var ZendeskAccount=require(_0xab28('0x7'));var SalesforceAccount=require(_0xab28('0x8'));var FreshdeskAccount=require(_0xab28('0x9'));var SugarcrmAccount=require(_0xab28('0xa'));var ZohoAccount=require('../model/zohoAccount');var DeskAccount=require('../model/deskAccount');var VtigerAccount=require(_0xab28('0xb'));var ServicenowAccount=require(_0xab28('0xc'));var Dynamics365Account=require(_0xab28('0xd'));var FaxAccount=require(_0xab28('0xe'));var Realtime=function(){this[_0xab28('0xf')]={};this[_0xab28('0x10')]={};this['trunks']={};this[_0xab28('0x11')]={};this['triggers']={};this[_0xab28('0x12')]={};this[_0xab28('0x13')]={};this[_0xab28('0x14')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0xab28('0x15')]={};this[_0xab28('0x16')]={};this[_0xab28('0x17')]={};this[_0xab28('0x18')]={};this[_0xab28('0x19')]={};this['zendeskAccounts']={};this[_0xab28('0x1a')]={};this[_0xab28('0x1b')]={};this[_0xab28('0x1c')]={};this[_0xab28('0x1d')]={};this[_0xab28('0x1e')]={};this[_0xab28('0x1f')]={};this['servicenowAccounts']={};this['dynamics365Accounts']={};this[_0xab28('0x20')]={};};function freeIsNotKey(_0x3d133e,_0x14e8b4,_0xaaeb24){var _0x53c5c7=_[_0xab28('0x21')](_0x3d133e,function(_0x4912fa,_0x2be1a4){return _0x4912fa[_0xaaeb24];});for(var _0x54f79b in _0x14e8b4){if(_0x14e8b4[_0xab28('0x22')](_0x54f79b)){if(!_0x53c5c7[_0x54f79b]){delete _0x14e8b4[_0x54f79b];}}}}function freeIsNotKeySip(_0x2b0b5c,_0x3d60e4){var _0x4005fd=_[_0xab28('0x21')](_0x2b0b5c,function(_0x1a7b05,_0x397097){return util[_0xab28('0x23')]('SIP/%s',_0x1a7b05[_0xab28('0x24')]);});for(var _0x18af35 in _0x3d60e4){if(_0x3d60e4[_0xab28('0x22')](_0x18af35)){if(!_0x4005fd[_0x18af35]){delete _0x3d60e4[_0x18af35];}}}}function freeIsNotKeyAgent(_0x170a80,_0x2f6541){var _0x1d1690=_[_0xab28('0x21')](_0x170a80,function(_0x56d797,_0x116c2c){var _0x4ec564=_[_0xab28('0x25')](_0x56d797[_0xab28('0x26')])?util['format'](_0xab28('0x27'),_0x56d797[_0xab28('0x24')]):_0x56d797[_0xab28('0x26')];return _0x4ec564;});for(var _0x46a24b in _0x2f6541){if(_0x2f6541[_0xab28('0x22')](_0x46a24b)){if(!_0x1d1690[_0x46a24b]){delete _0x2f6541[_0x46a24b];}}}}function clearVoiceCallReports(_0x350055){_0x350055[_0xab28('0x28')]=0x0;_0x350055['answered']=0x0;_0x350055[_0xab28('0x29')]=0x0;_0x350055['sumDuration']=0x0;_0x350055[_0xab28('0x2a')]=0x0;}function clearCampaigns(_0x2e6359){if(!_['isEmpty'](_0x2e6359)){for(var _0x3928f0 in _0x2e6359){if(_0x2e6359['hasOwnProperty'](_0x3928f0)){_0x2e6359[_0x3928f0][_0xab28('0x2b')]=0x0;_0x2e6359[_0x3928f0][_0xab28('0x2c')]=0x0;}}}}function clearVoiceQueues(_0x3d8c60){if(!_['isEmpty'](_0x3d8c60)){for(var _0x24a692 in _0x3d8c60){if(_0x3d8c60[_0xab28('0x22')](_0x24a692)){_0x3d8c60[_0x24a692]['total']=0x0;_0x3d8c60[_0x24a692][_0xab28('0x2d')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x2e')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x2f')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x29')]=0x0;_0x3d8c60[_0x24a692]['sumDuration']=0x0;_0x3d8c60[_0x24a692][_0xab28('0x2a')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x30')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x31')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x32')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x33')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x34')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x35')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x36')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x37')]=0x0;_0x3d8c60[_0x24a692][_0xab28('0x38')]=0x0;_0x3d8c60[_0x24a692]['outboundOriginateFailureCallsDay']=0x0;_0x3d8c60[_0x24a692]['outboundRejectCallsDay']=0x0;_0x3d8c60[_0x24a692][_0xab28('0x39')]=0x0;_0x3d8c60[_0x24a692]['outboundAnswerAgiCallsDay']=0x0;_0x3d8c60[_0x24a692]['outboundAnswerCallsDay']=0x0;_0x3d8c60[_0x24a692][_0xab28('0x3a')]=!![];}}}}Realtime[_0xab28('0x3b')][_0xab28('0x3c')]=function(_0xd5c809,_0x3639e1){for(var _0x1911fa in _0x3639e1){if(_0xd5c809['hasOwnProperty'](_0x1911fa)){_0xd5c809[_0x1911fa]=_0x3639e1[_0x1911fa];}}};Realtime[_0xab28('0x3b')][_0xab28('0x3d')]=function(){var _0x348cb5=this;return function(_0x5ae750){if(_0x5ae750){freeIsNotKeyAgent(_0x5ae750,_0x348cb5[_0xab28('0xf')]);for(var _0x59430f=0x0,_0x2a62b1={},_0x267aaa={};_0x59430f<_0x5ae750['length'];_0x59430f+=0x1){_0x2a62b1=_0x5ae750[_0x59430f];var _0x3dd7d6=_[_0xab28('0x25')](_0x2a62b1[_0xab28('0x26')])?util[_0xab28('0x23')](_0xab28('0x27'),_0x2a62b1[_0xab28('0x24')]):_0x2a62b1['interface'];if(_[_0xab28('0x3e')](_0x348cb5[_0xab28('0xf')][_0x3dd7d6])){_0x348cb5['agents'][_0x3dd7d6]=new Agent(_0x2a62b1);}else{_0x348cb5[_0xab28('0x3c')](_0x348cb5[_0xab28('0xf')][_0x3dd7d6],_0x2a62b1);}}}return _0x348cb5[_0xab28('0xf')];};};Realtime[_0xab28('0x3b')][_0xab28('0x3f')]=function(){var _0xd4984c=this;return function(_0x2d3ba7){if(_0x2d3ba7){freeIsNotKeySip(_0x2d3ba7,_0xd4984c[_0xab28('0x10')]);for(var _0x51aefa=0x0,_0x207ac3={},_0x23e496={};_0x51aefa<_0x2d3ba7['length'];_0x51aefa+=0x1){_0x207ac3=_0x2d3ba7[_0x51aefa];if(_[_0xab28('0x3e')](_0xd4984c[_0xab28('0x10')][util['format'](_0xab28('0x27'),_0x207ac3[_0xab28('0x24')])])){_0xd4984c[_0xab28('0x10')][util[_0xab28('0x23')](_0xab28('0x27'),_0x207ac3[_0xab28('0x24')])]=new Telephone(_0x207ac3);}else{_0xd4984c[_0xab28('0x3c')](_0xd4984c['telephones'][util[_0xab28('0x23')](_0xab28('0x27'),_0x207ac3['name'])],_0x207ac3);}}}return _0xd4984c[_0xab28('0x10')];};};Realtime[_0xab28('0x3b')][_0xab28('0x40')]=function(){var _0x86b83b=this;return function(_0x22b5af){if(_0x22b5af){freeIsNotKeySip(_0x22b5af,_0x86b83b['trunks']);for(var _0x16c441=0x0,_0x5bf681={},_0x4cbf58={};_0x16c441<_0x22b5af[_0xab28('0x41')];_0x16c441+=0x1){_0x5bf681=_0x22b5af[_0x16c441];if(_[_0xab28('0x3e')](_0x86b83b[_0xab28('0x42')][util[_0xab28('0x23')](_0xab28('0x27'),_0x5bf681['name'])])){_0x86b83b['trunks'][util[_0xab28('0x23')]('SIP/%s',_0x5bf681[_0xab28('0x24')])]=new Trunk(_0x5bf681);}else{_0x86b83b['mergeFromDatabase'](_0x86b83b['trunks'][util[_0xab28('0x23')](_0xab28('0x27'),_0x5bf681[_0xab28('0x24')])],_0x5bf681);}}}return _0x86b83b[_0xab28('0x42')];};};Realtime[_0xab28('0x3b')][_0xab28('0x43')]=function(){var _0x53c232=this;return function(_0x4dd187){if(_0x4dd187){freeIsNotKey(_0x4dd187,_0x53c232[_0xab28('0x11')],'name');for(var _0x406b8a=0x0,_0x5917f6={},_0x93bd97={};_0x406b8a<_0x4dd187['length'];_0x406b8a+=0x1){_0x5917f6=_0x4dd187[_0x406b8a];if(_['isUndefined'](_0x53c232[_0xab28('0x11')][_0x5917f6['name']])){_0x53c232['voiceQueues'][_0x5917f6['name']]=new VoiceQueue(_0x5917f6);}else{_0x53c232[_0xab28('0x3c')](_0x53c232['voiceQueues'][_0x5917f6[_0xab28('0x24')]],_0x5917f6);}}}return _0x53c232[_0xab28('0x11')];};};Realtime[_0xab28('0x3b')][_0xab28('0x44')]=function(){var _0x51243e=this;return function(_0x249a71){if(_0x249a71){freeIsNotKey(_0x249a71,_0x51243e[_0xab28('0x45')],'id');for(var _0x3c7e5b=0x0,_0x1192fc={},_0xa4e9a1={};_0x3c7e5b<_0x249a71['length'];_0x3c7e5b+=0x1){_0x1192fc=_0x249a71[_0x3c7e5b];if(_[_0xab28('0x3e')](_0x51243e[_0xab28('0x45')][_0x1192fc['id']])){_0x51243e['triggers'][_0x1192fc['id']]=new Trigger(_0x1192fc);}else{_0x51243e[_0xab28('0x3c')](_0x51243e['triggers'][_0x1192fc['id']],_0x1192fc);}}}return _0x51243e['triggers'];};};Realtime[_0xab28('0x3b')][_0xab28('0x46')]=function(){var _0x5672eb=this;return function(_0x39a4ef){if(_0x39a4ef){freeIsNotKey(_0x39a4ef,_0x5672eb['templates'],'id');for(var _0x1d1407=0x0,_0x46c0dd={},_0x40911b={};_0x1d1407<_0x39a4ef[_0xab28('0x41')];_0x1d1407+=0x1){_0x46c0dd=_0x39a4ef[_0x1d1407];if(_['isUndefined'](_0x5672eb[_0xab28('0x13')][_0x46c0dd['id']])){_0x5672eb['templates'][_0x46c0dd['id']]=new Template(_0x46c0dd);}else{_0x5672eb['mergeFromDatabase'](_0x5672eb[_0xab28('0x13')][_0x46c0dd['id']],_0x46c0dd);}}}return _0x5672eb['templates'];};};Realtime[_0xab28('0x3b')][_0xab28('0x47')]=function(){var _0x4ada8a=this;return function(_0x3e037d){if(_0x3e037d){freeIsNotKey(_0x3e037d,_0x4ada8a[_0xab28('0x48')],'id');for(var _0x49bc36=0x0,_0x41dd3d={},_0x586167={};_0x49bc36<_0x3e037d[_0xab28('0x41')];_0x49bc36+=0x1){_0x41dd3d=_0x3e037d[_0x49bc36];if(_[_0xab28('0x3e')](_0x4ada8a[_0xab28('0x48')][_0x41dd3d['id']])){_0x4ada8a[_0xab28('0x48')][_0x41dd3d['id']]=new ZendeskAccount(_0x41dd3d);}else{_0x4ada8a[_0xab28('0x3c')](_0x4ada8a[_0xab28('0x48')][_0x41dd3d['id']],_0x41dd3d);}}}return _0x4ada8a[_0xab28('0x48')];};};Realtime[_0xab28('0x3b')]['initSalesforceAccounts']=function(){var _0x39c5b4=this;return function(_0x1b9cad){if(_0x1b9cad){freeIsNotKey(_0x1b9cad,_0x39c5b4[_0xab28('0x1a')],'id');for(var _0x12da9c=0x0,_0xc7b341={},_0x46202b={};_0x12da9c<_0x1b9cad[_0xab28('0x41')];_0x12da9c+=0x1){_0xc7b341=_0x1b9cad[_0x12da9c];if(_[_0xab28('0x3e')](_0x39c5b4[_0xab28('0x1a')][_0xc7b341['id']])){_0x39c5b4[_0xab28('0x1a')][_0xc7b341['id']]=new SalesforceAccount(_0xc7b341);}else{_0x39c5b4[_0xab28('0x3c')](_0x39c5b4['salesforceAccounts'][_0xc7b341['id']],_0xc7b341);}}}return _0x39c5b4[_0xab28('0x1a')];};};Realtime['prototype']['initFreshdeskAccounts']=function(){var _0xfef4b9=this;return function(_0x46352d){if(_0x46352d){freeIsNotKey(_0x46352d,_0xfef4b9[_0xab28('0x1c')],'id');for(var _0x51ba1f=0x0,_0x51da7f={},_0x13265a={};_0x51ba1f<_0x46352d[_0xab28('0x41')];_0x51ba1f+=0x1){_0x51da7f=_0x46352d[_0x51ba1f];if(_[_0xab28('0x3e')](_0xfef4b9[_0xab28('0x1c')][_0x51da7f['id']])){_0xfef4b9[_0xab28('0x1c')][_0x51da7f['id']]=new FreshdeskAccount(_0x51da7f);}else{_0xfef4b9[_0xab28('0x3c')](_0xfef4b9[_0xab28('0x1c')][_0x51da7f['id']],_0x51da7f);}}}return _0xfef4b9[_0xab28('0x1c')];};};Realtime[_0xab28('0x3b')][_0xab28('0x49')]=function(){var _0x275e9c=this;return function(_0x311261){if(_0x311261){freeIsNotKey(_0x311261,_0x275e9c[_0xab28('0x1d')],'id');for(var _0x150ee2=0x0,_0x1937cb={},_0x2d99b1={};_0x150ee2<_0x311261[_0xab28('0x41')];_0x150ee2+=0x1){_0x1937cb=_0x311261[_0x150ee2];if(_[_0xab28('0x3e')](_0x275e9c[_0xab28('0x1d')][_0x1937cb['id']])){_0x275e9c[_0xab28('0x1d')][_0x1937cb['id']]=new ZohoAccount(_0x1937cb);}else{_0x275e9c[_0xab28('0x3c')](_0x275e9c[_0xab28('0x1d')][_0x1937cb['id']],_0x1937cb);}}}return _0x275e9c[_0xab28('0x1d')];};};Realtime[_0xab28('0x3b')][_0xab28('0x4a')]=function(){var _0x7cc703=this;return function(_0x1e2b50){if(_0x1e2b50){freeIsNotKey(_0x1e2b50,_0x7cc703['deskAccounts'],'id');for(var _0x2ad92b=0x0,_0x45518e={},_0x124e62={};_0x2ad92b<_0x1e2b50['length'];_0x2ad92b+=0x1){_0x45518e=_0x1e2b50[_0x2ad92b];if(_[_0xab28('0x3e')](_0x7cc703['deskAccounts'][_0x45518e['id']])){_0x7cc703[_0xab28('0x1e')][_0x45518e['id']]=new DeskAccount(_0x45518e);}else{_0x7cc703[_0xab28('0x3c')](_0x7cc703['deskAccounts'][_0x45518e['id']],_0x45518e);}}}return _0x7cc703['deskAccounts'];};};Realtime[_0xab28('0x3b')][_0xab28('0x4b')]=function(){var _0x59422a=this;return function(_0x63f569){if(_0x63f569){freeIsNotKey(_0x63f569,_0x59422a['sugarcrmAccounts'],'id');for(var _0x5142fc=0x0,_0x12b8d8={},_0x2223af={};_0x5142fc<_0x63f569[_0xab28('0x41')];_0x5142fc+=0x1){_0x12b8d8=_0x63f569[_0x5142fc];if(_['isUndefined'](_0x59422a[_0xab28('0x1b')][_0x12b8d8['id']])){_0x59422a[_0xab28('0x1b')][_0x12b8d8['id']]=new SugarcrmAccount(_0x12b8d8);}else{_0x59422a[_0xab28('0x3c')](_0x59422a[_0xab28('0x1b')][_0x12b8d8['id']],_0x12b8d8);}}}return _0x59422a[_0xab28('0x1b')];};};Realtime[_0xab28('0x3b')][_0xab28('0x4c')]=function(){var _0x4a622f=this;return function(_0x124573){if(_0x124573){freeIsNotKey(_0x124573,_0x4a622f[_0xab28('0x1f')],'id');for(var _0x8b9fa3=0x0,_0x7c046d={},_0x21b1a6={};_0x8b9fa3<_0x124573[_0xab28('0x41')];_0x8b9fa3+=0x1){_0x7c046d=_0x124573[_0x8b9fa3];if(_[_0xab28('0x3e')](_0x4a622f['vtigerAccounts'][_0x7c046d['id']])){_0x4a622f[_0xab28('0x1f')][_0x7c046d['id']]=new VtigerAccount(_0x7c046d);}else{_0x4a622f[_0xab28('0x3c')](_0x4a622f['vtigerAccounts'][_0x7c046d['id']],_0x7c046d);}}}return _0x4a622f[_0xab28('0x1f')];};};Realtime['prototype'][_0xab28('0x4d')]=function(){var _0x47a4dd=this;return function(_0x2452ee){if(_0x2452ee){freeIsNotKey(_0x2452ee,_0x47a4dd[_0xab28('0x4e')],'id');for(var _0x2a2f69=0x0,_0x54ab8c={},_0x3fbbd4={};_0x2a2f69<_0x2452ee[_0xab28('0x41')];_0x2a2f69+=0x1){_0x54ab8c=_0x2452ee[_0x2a2f69];if(_[_0xab28('0x3e')](_0x47a4dd['servicenowAccounts'][_0x54ab8c['id']])){_0x47a4dd['servicenowAccounts'][_0x54ab8c['id']]=new ServicenowAccount(_0x54ab8c);}else{_0x47a4dd['mergeFromDatabase'](_0x47a4dd['servicenowAccounts'][_0x54ab8c['id']],_0x54ab8c);}}}return _0x47a4dd['servicenowAccounts'];};};Realtime[_0xab28('0x3b')][_0xab28('0x4f')]=function(){var _0xd77dd1=this;return function(_0x216d8e){if(_0x216d8e){freeIsNotKey(_0x216d8e,_0xd77dd1[_0xab28('0x50')],'id');for(var _0x51a68c=0x0,_0x27a9fa={},_0x337b3d={};_0x51a68c<_0x216d8e[_0xab28('0x41')];_0x51a68c+=0x1){_0x27a9fa=_0x216d8e[_0x51a68c];if(_[_0xab28('0x3e')](_0xd77dd1[_0xab28('0x50')][_0x27a9fa['id']])){_0xd77dd1['dynamics365Accounts'][_0x27a9fa['id']]=new Dynamics365Account(_0x27a9fa);}else{_0xd77dd1[_0xab28('0x3c')](_0xd77dd1['dynamics365Accounts'][_0x27a9fa['id']],_0x27a9fa);}}}return _0xd77dd1[_0xab28('0x50')];};};Realtime['prototype'][_0xab28('0x51')]=function(){var _0x212b87=this;return function(_0x43aede){for(var _0x79e8a5=0x0;_0x79e8a5<_0x43aede[_0xab28('0x41')];_0x79e8a5+=0x1){_[_0xab28('0x52')](_0x212b87[_0xab28('0x11')][_0x43aede[_0x79e8a5][_0xab28('0x24')]],_0x43aede[_0x79e8a5]);}return _0x212b87['voiceQueues'];};};Realtime[_0xab28('0x3b')][_0xab28('0x53')]=function(){var _0x5ce9d0=this;return function(_0x46d287){clearVoiceQueues(_0x5ce9d0[_0xab28('0x11')]);if(_0x46d287){_0x46d287=_[_0xab28('0x54')](_0x46d287,_0xab28('0x55'));for(var _0x2c27ae in _0x46d287){if(_0x46d287[_0xab28('0x22')](_0x2c27ae)){var _0x1dea1d={};for(var _0x9f84c3=0x0;_0x9f84c3<_0x46d287[_0x2c27ae]['length'];_0x9f84c3+=0x1){var _0x5ba005=_0x46d287[_0x2c27ae][_0x9f84c3]['queue'];if(_0x5ce9d0[_0xab28('0x11')][_0x5ba005]){if(_0x46d287[_0x2c27ae][_0x9f84c3]['queuecallerexit']){_0x5ce9d0['voiceQueues'][_0x5ba005][_0xab28('0x2e')]+=0x1;}if(_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x56')]){_0x5ce9d0[_0xab28('0x11')][_0x5ba005][_0xab28('0x2f')]+=0x1;}_0x5ce9d0[_0xab28('0x11')][_0x5ba005][_0xab28('0x29')]+=moment(_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x57')])[_0xab28('0x58')](moment(_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x59')]),_0xab28('0x5a'))||0x0;if(_0x9f84c3===_0x46d287[_0x2c27ae][_0xab28('0x41')]-0x1){_0x5ce9d0[_0xab28('0x11')][_0x5ba005][_0xab28('0x5b')]+=moment(_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x5c')]||_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x5d')]||_0x46d287[_0x2c27ae][_0x9f84c3]['queuecallerexitAt'])[_0xab28('0x58')](moment(_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x59')]),_0xab28('0x5a'))||0x0;_0x5ce9d0[_0xab28('0x11')][_0x5ba005]['total']+=0x1;if(_0x46d287[_0x2c27ae][_0x9f84c3]['queuecallercomplete']){_0x5ce9d0[_0xab28('0x11')][_0x5ba005][_0xab28('0x2d')]+=0x1;_0x5ce9d0['voiceQueues'][_0x5ba005][_0xab28('0x2a')]+=moment(_0x46d287[_0x2c27ae][_0x9f84c3][_0xab28('0x5c')])[_0xab28('0x58')](moment(_0x46d287[_0x2c27ae][_0x9f84c3]['queuecallerleaveAt']),'seconds')||0x0;}}else{_0x5ce9d0['voiceQueues'][_0x5ba005][_0xab28('0x5b')]+=_0x5ce9d0[_0xab28('0x11')][_0x5ba005]['sumHoldTime']||0x0;}}}}}}return _0x5ce9d0['voiceQueues'];};};Realtime[_0xab28('0x3b')][_0xab28('0x5e')]=function(){var _0x795882=this;return function(_0x217ecd){clearVoiceCallReports(_0x795882[_0xab28('0x14')]);if(_0x217ecd){for(var _0x3cc368=0x0;_0x3cc368<_0x217ecd['length'];_0x3cc368+=0x1){_0x795882[_0xab28('0x14')][_0xab28('0x28')]+=0x1;_0x795882[_0xab28('0x14')][_0xab28('0x5b')]+=_0x217ecd[_0x3cc368][_0xab28('0x5f')];if(_0x217ecd[_0x3cc368][_0xab28('0x60')]===_0xab28('0x61')){_0x795882['outbound'][_0xab28('0x2d')]+=0x1;_0x795882['outbound'][_0xab28('0x29')]+=_0x217ecd[_0x3cc368]['duration']-_0x217ecd[_0x3cc368][_0xab28('0x62')]||0x0;_0x795882[_0xab28('0x14')][_0xab28('0x2a')]+=_0x217ecd[_0x3cc368][_0xab28('0x62')];}}}return _0x795882['outbound'];};};Realtime['prototype']['initCampaigns']=function(){var _0x5dcb54=this;return function(_0x25e0a3){if(_0x25e0a3){freeIsNotKey(_0x25e0a3,_0x5dcb54[_0xab28('0x12')],_0xab28('0x24'));for(var _0x108dc1=0x0,_0x14498a={};_0x108dc1<_0x25e0a3[_0xab28('0x41')];_0x108dc1+=0x1){_0x14498a=_0x25e0a3[_0x108dc1];if(_['isUndefined'](_0x5dcb54[_0xab28('0x12')][_0x14498a[_0xab28('0x24')]])){_0x5dcb54[_0xab28('0x12')][_0x14498a[_0xab28('0x24')]]=new Campaign(_0x14498a);}else{_0x5dcb54[_0xab28('0x3c')](_0x5dcb54[_0xab28('0x12')][_0x14498a[_0xab28('0x24')]],_0x14498a);}}}return _0x5dcb54[_0xab28('0x12')];};};Realtime[_0xab28('0x3b')][_0xab28('0x63')]=function(){var _0x2a71c3=this;return function(_0x100a35){if(_0x100a35){freeIsNotKey(_0x100a35,_0x2a71c3[_0xab28('0x15')],'id');for(var _0xf83acf=0x0,_0x2a59ee={};_0xf83acf<_0x100a35[_0xab28('0x41')];_0xf83acf+=0x1){_0x2a59ee=_0x100a35[_0xf83acf];if(_[_0xab28('0x3e')](_0x2a71c3['voiceExtensions'][_0x2a59ee['id']])){_0x2a71c3[_0xab28('0x15')][_0x2a59ee['id']]=new VoiceExtension(_0x2a59ee);}else{_0x2a71c3['mergeFromDatabase'](_0x2a71c3[_0xab28('0x15')][_0x2a59ee['id']],_0x2a59ee);}}}return _0x2a71c3[_0xab28('0x15')];};};Realtime[_0xab28('0x3b')][_0xab28('0x64')]=function(){var _0x57c9a5=this;return function(_0x38c17d){clearCampaigns(_0x57c9a5[_0xab28('0x12')]);for(var _0x2e43ec=0x0;_0x2e43ec<_0x38c17d[_0xab28('0x41')];_0x2e43ec+=0x1){_[_0xab28('0x52')](_0x57c9a5[_0xab28('0x12')][_0x38c17d[_0x2e43ec][_0xab28('0x24')]],_0x38c17d[_0x2e43ec]);}return _0x57c9a5[_0xab28('0x12')];};};Realtime[_0xab28('0x3b')][_0xab28('0x65')]=function(){var _0x5a2dab=this;return function(_0x4a972d){if(_0x4a972d){freeIsNotKey(_0x4a972d,_0x5a2dab['faxAccounts'],'id');for(var _0x483daf=0x0,_0x36a86d={},_0x58ac31={};_0x483daf<_0x4a972d['length'];_0x483daf+=0x1){_0x36a86d=_0x4a972d[_0x483daf];if(_[_0xab28('0x3e')](_0x5a2dab['faxAccounts'][_0x36a86d['id']])){_0x5a2dab['faxAccounts'][_0x36a86d['id']]=new FaxAccount(_0x36a86d);}else{_0x5a2dab[_0xab28('0x3c')](_0x5a2dab[_0xab28('0x20')][_0x36a86d['id']],_0x36a86d);}}}return _0x5a2dab[_0xab28('0x20')];};};module[_0xab28('0x66')]=Realtime;
\ No newline at end of file
diff --git a/server/services/ami/report/index.js b/server/services/ami/report/index.js
index 010ff93..2677c93 100644
--- a/server/services/ami/report/index.js
+++ b/server/services/ami/report/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xeaee=['create','match','destination','exten','type','lastapplication','queue','lastdata','context','callerid','from-sip','xcally-motion-preview','calleridpreview','calleridnum','destinationchannel','channel','originatecalleridnum','disposition','ANSWERED','connectedlinenum','\x22%s\x22\x20<%s>','calleridname','monitor','monitors','monitorFilename','filename','createdAt','connectedlinename','membername','xcally-motion-dialer','forEach','startsWith','Local','substring','indexOf','mobile','phone','lastIndexOf','SIP/%s','exports','util','../../../config/logger','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','agents','telephones','prototype','sync','realtime','xdr','disabled','custom:voiceQueueReport','voiceQueueReport','custom:voiceCallReport','voiceCallReport','bind','custom:voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','isNil','accountcode','name','length','assigned','lastAssignedTo','interface','format','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt'];(function(_0x1030ce,_0xbe3f74){var _0x3367fd=function(_0x387153){while(--_0x387153){_0x1030ce['push'](_0x1030ce['shift']());}};_0x3367fd(++_0xbe3f74);}(_0xeaee,0x130));var _0xeeae=function(_0x333b5b,_0x8f0fce){_0x333b5b=_0x333b5b-0x0;var _0x132ce3=_0xeaee[_0x333b5b];return _0x132ce3;};'use strict';var BPromise=require('bluebird');var _=require('lodash');var moment=require('moment');var util=require(_0xeeae('0x0'));var config=require('../../../config/environment');var logger=require(_0xeeae('0x1'))('ami');var ami=require(_0xeeae('0x2'));var RpcVoiceAgentReport=require(_0xeeae('0x3'));var RpcVoiceCallReport=require(_0xeeae('0x4'));var RpcVoiceDialReport=require(_0xeeae('0x5'));var RpcMemberReport=require(_0xeeae('0x6'));var RpcVoiceQueueReport=require(_0xeeae('0x7'));var RpcVoiceRecording=require(_0xeeae('0x8'));var RpcVoiceTransferReport=require(_0xeeae('0x9'));var VoiceQueueReport=require(_0xeeae('0xa'));var VoiceCallReport=require(_0xeeae('0xb'));var VoiceAgentReport=require(_0xeeae('0xc'));var VoiceDialReport=require(_0xeeae('0xd'));var UserReport=require('./userReport');function Report(_0x5eab92){this['realtime']=_0x5eab92;this[_0xeeae('0xe')]=_0x5eab92[_0xeeae('0xe')];this[_0xeeae('0xf')]=_0x5eab92[_0xeeae('0xf')];}Report[_0xeeae('0x10')][_0xeeae('0x11')]=function(_0x54d6a2){var _0x335ea9=new VoiceQueueReport(this[_0xeeae('0x12')]);var _0x431461=new VoiceAgentReport(this[_0xeeae('0x12')]);var _0x240ea7=new VoiceDialReport(this[_0xeeae('0x12')]);var _0x4b0cea=new VoiceCallReport(this['realtime']);var _0x23b7be=new UserReport(this[_0xeeae('0x12')]);if(config[_0xeeae('0x13')]&&config['xdr'][_0xeeae('0x14')]){ami['on'](_0xeeae('0x15'),this[_0xeeae('0x16')]['bind'](this));ami['on'](_0xeeae('0x17'),this[_0xeeae('0x18')][_0xeeae('0x19')](this));ami['on'](_0xeeae('0x1a'),this['voiceAgentReport'][_0xeeae('0x19')](this));ami['on'](_0xeeae('0x1b'),this[_0xeeae('0x1c')]['bind'](this));ami['on'](_0xeeae('0x1d'),this[_0xeeae('0x1e')][_0xeeae('0x19')](this));ami['on'](_0xeeae('0x1f'),this[_0xeeae('0x20')][_0xeeae('0x19')](this));}};Report[_0xeeae('0x10')][_0xeeae('0x21')]=function(_0x387b45){var _0x2afa12=undefined;_0x2afa12=_[_0xeeae('0x22')](this[_0xeeae('0xe')],function(_0x718b94){return _0x718b94['accountcode']==_0x387b45||_0x718b94['name']==_0x387b45;});if(_[_0xeeae('0x23')](_0x2afa12)){var _0x3d2e72=_[_0xeeae('0x22')](this[_0xeeae('0xf')],function(_0x1524c4){return _0x1524c4[_0xeeae('0x24')]==_0x387b45||_0x1524c4[_0xeeae('0x25')]==_0x387b45;});if(_0x3d2e72){_0x2afa12=_['find'](this[_0xeeae('0xe')],function(_0x4d27aa){return _0x4d27aa['interface']==util['format']('SIP/%s',_0x3d2e72['name']);});}}return _0x2afa12;};Report[_0xeeae('0x10')][_0xeeae('0x16')]=function(_0x4e53a2){for(var _0x6d403=0x0;_0x6d403<_0x4e53a2[_0xeeae('0x26')];_0x6d403+=0x1){var _0xf2d6f2=this[_0xeeae('0x21')](_0x4e53a2[_0x6d403]['connectedlinenum']);if(_0xf2d6f2){_0x4e53a2[_0x6d403]['accountcode']=_0xf2d6f2[_0xeeae('0x24')];_0x4e53a2[_0x6d403][_0xeeae('0x27')]=!![];_0x4e53a2[_0x6d403][_0xeeae('0x28')]=_0xf2d6f2[_0xeeae('0x25')];_0x4e53a2[_0x6d403][_0xeeae('0x29')]=_['isNil'](_0xf2d6f2['interface'])?util[_0xeeae('0x2a')]('SIP/%s',_0xf2d6f2['name']):_0xf2d6f2[_0xeeae('0x29')];if(_0x4e53a2[_0x6d403][_0xeeae('0x2b')]){_0x4e53a2[_0x6d403][_0xeeae('0x2c')]=moment()[_0xeeae('0x2a')](_0xeeae('0x2d'));}if(_0x4e53a2[_0x6d403][_0xeeae('0x2e')]){_0x4e53a2[_0x6d403][_0xeeae('0x2f')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}RpcMemberReport[_0xeeae('0x16')](_0x4e53a2[_0x6d403]);}RpcVoiceQueueReport[_0xeeae('0x30')](_0x4e53a2[_0x6d403]);}};function extractCalleridNumber(_0x50a7ce){var _0x5cd8b5=_0x50a7ce[_0xeeae('0x31')](/<(.*?)>/);return _0x5cd8b5?_0x5cd8b5[0x1]:_0x50a7ce;}Report[_0xeeae('0x10')]['voiceCallReport']=function(_0x4e2ecc){_0x4e2ecc[_0xeeae('0x32')]=_0x4e2ecc[_0xeeae('0x32')]||_0x4e2ecc[_0xeeae('0x33')];if(_0x4e2ecc[_0xeeae('0x34')]=='dialer'){_0x4e2ecc[_0xeeae('0x35')]=_0xeeae('0x36');_0x4e2ecc[_0xeeae('0x37')]=_0x4e2ecc['queue'];if(_0x4e2ecc[_0xeeae('0x38')]=='from-voip-provider'){_0x4e2ecc[_0xeeae('0x24')]='';_0x4e2ecc[_0xeeae('0x32')]=extractCalleridNumber(_0x4e2ecc[_0xeeae('0x39')]);}else if(_0x4e2ecc[_0xeeae('0x38')]==_0xeeae('0x3a')){if(_0x4e2ecc[_0xeeae('0x32')]==_0xeeae('0x3b')){_0x4e2ecc[_0xeeae('0x32')]=extractCalleridNumber(_0x4e2ecc[_0xeeae('0x3c')]);_0x4e2ecc[_0xeeae('0x3d')]=_0x4e2ecc['originatecalleridnum'];_0x4e2ecc[_0xeeae('0x3e')]=[_0x4e2ecc[_0xeeae('0x3f')],_0x4e2ecc[_0xeeae('0x3f')]=_0x4e2ecc[_0xeeae('0x3e')]][0x0];_0x4e2ecc['callerid']=_0x4e2ecc[_0xeeae('0x3c')];}else{_0x4e2ecc[_0xeeae('0x32')]=_0x4e2ecc[_0xeeae('0x3d')];_0x4e2ecc[_0xeeae('0x3d')]=_0x4e2ecc[_0xeeae('0x40')];if(_0x4e2ecc[_0xeeae('0x41')]==_0xeeae('0x42')){_0x4e2ecc[_0xeeae('0x24')]=_0x4e2ecc[_0xeeae('0x43')];}else{_0x4e2ecc[_0xeeae('0x24')]='';}}}}else{_0x4e2ecc['callerid']=util[_0xeeae('0x2a')](_0xeeae('0x44'),_0x4e2ecc[_0xeeae('0x45')],_0x4e2ecc[_0xeeae('0x3d')]);}RpcVoiceCallReport[_0xeeae('0x30')](_0x4e2ecc);if(_0x4e2ecc[_0xeeae('0x46')]){for(var _0x35a544=0x0;_0x35a544<_0x4e2ecc[_0xeeae('0x47')][_0xeeae('0x26')];_0x35a544+=0x1){_0x4e2ecc[_0xeeae('0x48')]=_0x4e2ecc[_0xeeae('0x47')][_0x35a544][_0xeeae('0x49')];_0x4e2ecc['createdAt']=_0x4e2ecc[_0xeeae('0x47')][_0x35a544][_0xeeae('0x4a')];if(_0x4e2ecc[_0xeeae('0x33')]=='xcally-motion-preview'){_0x4e2ecc['calleridnum']=_0x4e2ecc['connectedlinenum'];_0x4e2ecc['calleridname']=_0x4e2ecc['connectedlinename'];_0x4e2ecc[_0xeeae('0x43')]=_0x4e2ecc['accountcode'];_0x4e2ecc[_0xeeae('0x4b')]=_0x4e2ecc[_0xeeae('0x4c')];_0x4e2ecc[_0xeeae('0x33')]=_0x4e2ecc['originatecalleridnum'];}else if(_0x4e2ecc['exten']==_0xeeae('0x4d')){_0x4e2ecc[_0xeeae('0x3d')]=_0x4e2ecc[_0xeeae('0x32')];_0x4e2ecc[_0xeeae('0x33')]=_0x4e2ecc[_0xeeae('0x40')];}RpcVoiceRecording[_0xeeae('0x30')](_0x4e2ecc);}}};Report[_0xeeae('0x10')]['voiceAgentReport']=function(_0x4267ab){if(_['isArray'](_0x4267ab)){_0x4267ab[_0xeeae('0x4e')](function(_0x1a9f7f){RpcVoiceAgentReport[_0xeeae('0x30')](_0x1a9f7f);});}else{RpcVoiceAgentReport[_0xeeae('0x30')](_0x4267ab);}};Report[_0xeeae('0x10')][_0xeeae('0x1c')]=function(_0x4e3d9f){RpcVoiceDialReport[_0xeeae('0x30')](_0x4e3d9f);var _0x2283a5=undefined;var _0x58c3e4=_0x4e3d9f[_0xeeae('0x3f')];if(_[_0xeeae('0x4f')](_0x58c3e4,_0xeeae('0x50'))){var _0x369e4f=_0x58c3e4[_0xeeae('0x51')](_0x58c3e4[_0xeeae('0x52')]('/')+0x1,_0x58c3e4['indexOf']('@'));_0x2283a5=_['find'](this[_0xeeae('0xe')],function(_0x24e1f3){return _0x24e1f3[_0xeeae('0x53')]==_0x369e4f||_0x24e1f3[_0xeeae('0x54')]==_0x369e4f||_0x24e1f3[_0xeeae('0x24')]==_0x369e4f;});}else{var _0x369e4f=_0x58c3e4['substring'](_0x58c3e4['indexOf']('/')+0x1,_0x58c3e4[_0xeeae('0x55')]('-'));_0x2283a5=this[_0xeeae('0x21')](_0x369e4f);}if(_0x2283a5){_0x4e3d9f[_0xeeae('0x29')]=_[_0xeeae('0x23')](_0x2283a5[_0xeeae('0x29')])?util[_0xeeae('0x2a')](_0xeeae('0x56'),_0x2283a5[_0xeeae('0x25')]):_0x2283a5[_0xeeae('0x29')];_0x4e3d9f[_0xeeae('0x4c')]=_0x2283a5[_0xeeae('0x25')];_0x4e3d9f[_0xeeae('0x24')]=_0x2283a5[_0xeeae('0x24')];RpcMemberReport[_0xeeae('0x1c')](_0x4e3d9f);}};Report[_0xeeae('0x10')][_0xeeae('0x1e')]=function(_0x4281e6){RpcVoiceTransferReport['blindTransfer'](_0x4281e6);};Report['prototype'][_0xeeae('0x20')]=function(_0x2e4b2f){RpcVoiceTransferReport['attendedTransfer'](_0x2e4b2f);};module[_0xeeae('0x57')]=Report;
\ No newline at end of file
+var _0x5663=['../../../config/logger','ami','../ami','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceTransferReport','./voiceCallReport','./voiceAgentReport','./userReport','agents','telephones','sync','realtime','xdr','custom:voiceQueueReport','voiceQueueReport','bind','voiceCallReport','voiceAgentReport','voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','prototype','findAgent','find','name','isNil','accountcode','interface','format','SIP/%s','assigned','lastAssignedTo','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitAt','create','match','destination','exten','lastapplication','queue','lastdata','context','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridnum','originatecalleridnum','destinationchannel','channel','calleridpreview','connectedlinenum','calleridname','monitor','monitors','filename','createdAt','connectedlinename','membername','xcally-motion-dialer','isArray','forEach','startsWith','Local','indexOf','mobile','substring','lastIndexOf','exports','moment','util'];(function(_0x29386b,_0x546068){var _0x38520c=function(_0x3e1eaa){while(--_0x3e1eaa){_0x29386b['push'](_0x29386b['shift']());}};_0x38520c(++_0x546068);}(_0x5663,0x17a));var _0x3566=function(_0x256ffb,_0x19f08f){_0x256ffb=_0x256ffb-0x0;var _0x3c9a19=_0x5663[_0x256ffb];return _0x3c9a19;};'use strict';var BPromise=require('bluebird');var _=require('lodash');var moment=require(_0x3566('0x0'));var util=require(_0x3566('0x1'));var config=require('../../../config/environment');var logger=require(_0x3566('0x2'))(_0x3566('0x3'));var ami=require(_0x3566('0x4'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0x3566('0x5'));var RpcVoiceDialReport=require(_0x3566('0x6'));var RpcMemberReport=require(_0x3566('0x7'));var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require('../rpc/voiceRecording');var RpcVoiceTransferReport=require(_0x3566('0x8'));var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require(_0x3566('0x9'));var VoiceAgentReport=require(_0x3566('0xa'));var VoiceDialReport=require('./voiceDialReport');var UserReport=require(_0x3566('0xb'));function Report(_0x32b114){this['realtime']=_0x32b114;this[_0x3566('0xc')]=_0x32b114[_0x3566('0xc')];this['telephones']=_0x32b114[_0x3566('0xd')];}Report['prototype'][_0x3566('0xe')]=function(_0x4410b8){var _0x3aad07=new VoiceQueueReport(this[_0x3566('0xf')]);var _0x1cdfa9=new VoiceAgentReport(this[_0x3566('0xf')]);var _0x365633=new VoiceDialReport(this[_0x3566('0xf')]);var _0x1e1923=new VoiceCallReport(this['realtime']);var _0x21c57e=new UserReport(this[_0x3566('0xf')]);if(config[_0x3566('0x10')]&&config['xdr']['disabled']){ami['on'](_0x3566('0x11'),this[_0x3566('0x12')][_0x3566('0x13')](this));ami['on']('custom:voiceCallReport',this[_0x3566('0x14')]['bind'](this));ami['on']('custom:voiceAgentReport',this[_0x3566('0x15')][_0x3566('0x13')](this));ami['on']('custom:voiceDialReport',this[_0x3566('0x16')][_0x3566('0x13')](this));ami['on'](_0x3566('0x17'),this[_0x3566('0x18')]['bind'](this));ami['on'](_0x3566('0x19'),this[_0x3566('0x1a')][_0x3566('0x13')](this));}};Report[_0x3566('0x1b')][_0x3566('0x1c')]=function(_0x185b0f){var _0x597fc6=undefined;_0x597fc6=_[_0x3566('0x1d')](this['agents'],function(_0x4dd893){return _0x4dd893['accountcode']==_0x185b0f||_0x4dd893[_0x3566('0x1e')]==_0x185b0f;});if(_[_0x3566('0x1f')](_0x597fc6)){var _0x599030=_[_0x3566('0x1d')](this['telephones'],function(_0x348e6a){return _0x348e6a[_0x3566('0x20')]==_0x185b0f||_0x348e6a[_0x3566('0x1e')]==_0x185b0f;});if(_0x599030){_0x597fc6=_[_0x3566('0x1d')](this[_0x3566('0xc')],function(_0x599380){return _0x599380[_0x3566('0x21')]==util[_0x3566('0x22')](_0x3566('0x23'),_0x599030['name']);});}}return _0x597fc6;};Report[_0x3566('0x1b')][_0x3566('0x12')]=function(_0x4048b2){for(var _0x1b9999=0x0;_0x1b9999<_0x4048b2['length'];_0x1b9999+=0x1){var _0x5f0f6c=this[_0x3566('0x1c')](_0x4048b2[_0x1b9999]['connectedlinenum']);if(_0x5f0f6c){_0x4048b2[_0x1b9999][_0x3566('0x20')]=_0x5f0f6c[_0x3566('0x20')];_0x4048b2[_0x1b9999][_0x3566('0x24')]=!![];_0x4048b2[_0x1b9999][_0x3566('0x25')]=_0x5f0f6c[_0x3566('0x1e')];_0x4048b2[_0x1b9999][_0x3566('0x21')]=_[_0x3566('0x1f')](_0x5f0f6c['interface'])?util[_0x3566('0x22')]('SIP/%s',_0x5f0f6c[_0x3566('0x1e')]):_0x5f0f6c[_0x3566('0x21')];if(_0x4048b2[_0x1b9999]['queuecallercomplete']){_0x4048b2[_0x1b9999][_0x3566('0x26')]=moment()[_0x3566('0x22')](_0x3566('0x27'));}if(_0x4048b2[_0x1b9999]['queuecallerexit']){_0x4048b2[_0x1b9999][_0x3566('0x28')]=moment()[_0x3566('0x22')](_0x3566('0x27'));}RpcMemberReport[_0x3566('0x12')](_0x4048b2[_0x1b9999]);}RpcVoiceQueueReport[_0x3566('0x29')](_0x4048b2[_0x1b9999]);}};function extractCalleridNumber(_0x5a01b4){var _0xd8acd1=_0x5a01b4[_0x3566('0x2a')](/<(.*?)>/);return _0xd8acd1?_0xd8acd1[0x1]:_0x5a01b4;}Report[_0x3566('0x1b')][_0x3566('0x14')]=function(_0x52ff61){_0x52ff61[_0x3566('0x2b')]=_0x52ff61['destination']||_0x52ff61[_0x3566('0x2c')];if(_0x52ff61['type']=='dialer'){_0x52ff61[_0x3566('0x2d')]=_0x3566('0x2e');_0x52ff61[_0x3566('0x2f')]=_0x52ff61[_0x3566('0x2e')];if(_0x52ff61[_0x3566('0x30')]==_0x3566('0x31')){_0x52ff61['accountcode']='';_0x52ff61[_0x3566('0x2b')]=extractCalleridNumber(_0x52ff61[_0x3566('0x32')]);}else if(_0x52ff61['context']==_0x3566('0x33')){if(_0x52ff61[_0x3566('0x2b')]==_0x3566('0x34')){_0x52ff61['destination']=extractCalleridNumber(_0x52ff61['calleridpreview']);_0x52ff61[_0x3566('0x35')]=_0x52ff61[_0x3566('0x36')];_0x52ff61[_0x3566('0x37')]=[_0x52ff61['channel'],_0x52ff61[_0x3566('0x38')]=_0x52ff61[_0x3566('0x37')]][0x0];_0x52ff61[_0x3566('0x32')]=_0x52ff61[_0x3566('0x39')];}else{_0x52ff61[_0x3566('0x2b')]=_0x52ff61[_0x3566('0x35')];_0x52ff61[_0x3566('0x35')]=_0x52ff61[_0x3566('0x36')];if(_0x52ff61['disposition']=='ANSWERED'){_0x52ff61['accountcode']=_0x52ff61[_0x3566('0x3a')];}else{_0x52ff61[_0x3566('0x20')]='';}}}}else{_0x52ff61[_0x3566('0x32')]=util['format']('\x22%s\x22\x20<%s>',_0x52ff61[_0x3566('0x3b')],_0x52ff61['calleridnum']);}RpcVoiceCallReport[_0x3566('0x29')](_0x52ff61);if(_0x52ff61[_0x3566('0x3c')]){for(var _0x57ff83=0x0;_0x57ff83<_0x52ff61[_0x3566('0x3d')]['length'];_0x57ff83+=0x1){_0x52ff61['monitorFilename']=_0x52ff61[_0x3566('0x3d')][_0x57ff83][_0x3566('0x3e')];_0x52ff61[_0x3566('0x3f')]=_0x52ff61[_0x3566('0x3d')][_0x57ff83][_0x3566('0x3f')];if(_0x52ff61[_0x3566('0x2c')]=='xcally-motion-preview'){_0x52ff61['calleridnum']=_0x52ff61[_0x3566('0x3a')];_0x52ff61['calleridname']=_0x52ff61[_0x3566('0x40')];_0x52ff61['connectedlinenum']=_0x52ff61[_0x3566('0x20')];_0x52ff61[_0x3566('0x40')]=_0x52ff61[_0x3566('0x41')];_0x52ff61[_0x3566('0x2c')]=_0x52ff61[_0x3566('0x36')];}else if(_0x52ff61[_0x3566('0x2c')]==_0x3566('0x42')){_0x52ff61[_0x3566('0x35')]=_0x52ff61['destination'];_0x52ff61[_0x3566('0x2c')]=_0x52ff61[_0x3566('0x36')];}RpcVoiceRecording[_0x3566('0x29')](_0x52ff61);}}};Report[_0x3566('0x1b')][_0x3566('0x15')]=function(_0x2642ef){if(_[_0x3566('0x43')](_0x2642ef)){_0x2642ef[_0x3566('0x44')](function(_0x631156){RpcVoiceAgentReport[_0x3566('0x29')](_0x631156);});}else{RpcVoiceAgentReport[_0x3566('0x29')](_0x2642ef);}};Report[_0x3566('0x1b')]['voiceDialReport']=function(_0x440b69){RpcVoiceDialReport[_0x3566('0x29')](_0x440b69);var _0xc1610d=undefined;var _0x4ae085=_0x440b69[_0x3566('0x38')];if(_[_0x3566('0x45')](_0x4ae085,_0x3566('0x46'))){var _0x1bb9e6=_0x4ae085['substring'](_0x4ae085[_0x3566('0x47')]('/')+0x1,_0x4ae085['indexOf']('@'));_0xc1610d=_[_0x3566('0x1d')](this[_0x3566('0xc')],function(_0x3e749c){return _0x3e749c[_0x3566('0x48')]==_0x1bb9e6||_0x3e749c['phone']==_0x1bb9e6||_0x3e749c[_0x3566('0x20')]==_0x1bb9e6;});}else{var _0x1bb9e6=_0x4ae085[_0x3566('0x49')](_0x4ae085[_0x3566('0x47')]('/')+0x1,_0x4ae085[_0x3566('0x4a')]('-'));_0xc1610d=this[_0x3566('0x1c')](_0x1bb9e6);}if(_0xc1610d){_0x440b69[_0x3566('0x21')]=_[_0x3566('0x1f')](_0xc1610d[_0x3566('0x21')])?util[_0x3566('0x22')](_0x3566('0x23'),_0xc1610d[_0x3566('0x1e')]):_0xc1610d[_0x3566('0x21')];_0x440b69['membername']=_0xc1610d['name'];_0x440b69[_0x3566('0x20')]=_0xc1610d[_0x3566('0x20')];RpcMemberReport[_0x3566('0x16')](_0x440b69);}};Report['prototype'][_0x3566('0x18')]=function(_0x1c73e5){RpcVoiceTransferReport['blindTransfer'](_0x1c73e5);};Report[_0x3566('0x1b')][_0x3566('0x1a')]=function(_0xc26cd3){RpcVoiceTransferReport[_0x3566('0x1a')](_0xc26cd3);};module[_0x3566('0x4b')]=Report;
\ No newline at end of file
diff --git a/server/services/ami/report/userReport.js b/server/services/ami/report/userReport.js
index 7107b93..3bb6dd5 100644
--- a/server/services/ami/report/userReport.js
+++ b/server/services/ami/report/userReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7114=['accountcode','[syncDeviceState][UserReport]','peerstatus','registered','peer','status','address','telephone:save','[syncPeerStatus][UserReport]','lodash','moment','bluebird','util','ioredis','../../../config/environment','../../../config/logger','defaults','redis','localhost','socket.io-emitter','trunks','agents','telephones','syncRegistry','bind','devicestatechange','syncDeviceState','syncPeerStatus','loopSyncRealTimeShow','resolve','then','actionSipShowRegistry','actionSipPeerStatus','[loopSyncRealTimeShow]','inspect','prototype','actionDeviceStateList','catch','isNotNull','isUndefined','emit','username','stateRegistry','state','omit','actionid','format','trunk:%s','name','trunk:save','error','[syncRegistry][UserReport]','device','local','inuse','toLowerCase','stateTime','toNumber','updateStatusRealtime','telephone:%s','startsWith','Queue','Local','substring','indexOf','find','phone'];(function(_0x5ebd6e,_0x46633e){var _0x3cbde1=function(_0x5fe20e){while(--_0x5fe20e){_0x5ebd6e['push'](_0x5ebd6e['shift']());}};_0x3cbde1(++_0x46633e);}(_0x7114,0x158));var _0x4711=function(_0x2ccca7,_0x54e416){_0x2ccca7=_0x2ccca7-0x0;var _0x5780d3=_0x7114[_0x2ccca7];return _0x5780d3;};'use strict';var _=require(_0x4711('0x0'));var moment=require(_0x4711('0x1'));var BPromise=require(_0x4711('0x2'));var util=require(_0x4711('0x3'));var Redis=require(_0x4711('0x4'));var config=require(_0x4711('0x5'));var logger=require(_0x4711('0x6'))('ami');var ami=require('../ami');config['redis']=_[_0x4711('0x7')](config[_0x4711('0x8')],{'host':_0x4711('0x9'),'port':0x18eb});var io=require(_0x4711('0xa'))(new Redis(config['redis']));function UserReport(_0xfdb98a){this[_0x4711('0xb')]=_0xfdb98a[_0x4711('0xb')];this[_0x4711('0xc')]=_0xfdb98a[_0x4711('0xc')];this[_0x4711('0xd')]=_0xfdb98a[_0x4711('0xd')];ami['on']('registryentry',this[_0x4711('0xe')]['bind'](this));ami['on']('registry',this['syncRegistry'][_0x4711('0xf')](this));ami['on'](_0x4711('0x10'),this[_0x4711('0x11')]['bind'](this));ami['on']('peerstatus',this[_0x4711('0x12')][_0x4711('0xf')](this));this[_0x4711('0x13')]();return BPromise[_0x4711('0x14')]()[_0x4711('0x15')](ami[_0x4711('0x16')]())[_0x4711('0x15')](ami['actionDeviceStateList']())['then'](ami[_0x4711('0x17')]())['catch'](loggerCatch(_0x4711('0x18')));}function loggerCatch(_0x2bfc48){return function(_0x119c7b){logger['error'](_0x2bfc48,util[_0x4711('0x19')](_0x119c7b,{'showHidden':![],'depth':null}));};}UserReport[_0x4711('0x1a')][_0x4711('0x13')]=function(){setInterval(function(){BPromise['resolve']()[_0x4711('0x15')](ami['actionSipShowRegistry']())['then'](ami[_0x4711('0x1b')]())[_0x4711('0x15')](ami[_0x4711('0x17')]())[_0x4711('0x1c')](loggerCatch(_0x4711('0x18')));},0x32c8);};UserReport[_0x4711('0x1a')][_0x4711('0x1d')]=function(_0x3c3ae0){return _0x3c3ae0!==null&&!_[_0x4711('0x1e')](_0x3c3ae0);};UserReport[_0x4711('0x1a')]['emit']=function(_0x376391,_0x3474ba,_0x376c61){io['to'](_0x376391)[_0x4711('0x1f')](_0x3474ba,_0x376c61);};UserReport['prototype'][_0x4711('0xe')]=function(_0x21b935){try{if(this['isNotNull'](_0x21b935)){var _0x543990=_['find'](this[_0x4711('0xb')],{'registry':_0x21b935[_0x4711('0x20')]});if(_0x543990){_0x21b935[_0x4711('0x21')]=_0x21b935[_0x4711('0x22')];_['merge'](_0x543990,_[_0x4711('0x23')](_0x21b935,['event',_0x4711('0x24'),_0x4711('0x20'),_0x4711('0x22')]));this['emit'](util[_0x4711('0x25')](_0x4711('0x26'),_0x543990[_0x4711('0x27')]),_0x4711('0x28'),_0x543990);}}}catch(_0x587ab3){logger[_0x4711('0x29')](_0x4711('0x2a'),util['inspect'](_0x587ab3,{'showHidden':![],'depth':null}));}};UserReport[_0x4711('0x1a')][_0x4711('0x11')]=function(_0x5befd3){try{if(this[_0x4711('0x1d')](_0x5befd3)){if(this[_0x4711('0xc')][_0x5befd3[_0x4711('0x2b')]]){if(!this[_0x4711('0xc')][_0x5befd3[_0x4711('0x2b')]][_0x4711('0x2c')]||_0x5befd3[_0x4711('0x22')]['toLowerCase']()==_0x4711('0x2d')){this[_0x4711('0xc')][_0x5befd3['device']][_0x4711('0x2c')]=![];if(this[_0x4711('0xc')][_0x5befd3[_0x4711('0x2b')]]['state']!==_0x5befd3['state'][_0x4711('0x2e')]()){this[_0x4711('0xc')][_0x5befd3[_0x4711('0x2b')]][_0x4711('0x2f')]=_[_0x4711('0x30')](moment()[_0x4711('0x25')]('x'));}this[_0x4711('0xc')][_0x5befd3[_0x4711('0x2b')]][_0x4711('0x22')]=_0x5befd3[_0x4711('0x22')]['toLowerCase']();this['agents'][_0x5befd3[_0x4711('0x2b')]][_0x4711('0x31')](_0x5befd3);}}else if(this['telephones'][_0x5befd3[_0x4711('0x2b')]]){if(this['telephones'][_0x5befd3['device']][_0x4711('0x22')]!==_0x5befd3[_0x4711('0x22')]['toLowerCase']()){this[_0x4711('0xd')][_0x5befd3[_0x4711('0x2b')]][_0x4711('0x2f')]=_[_0x4711('0x30')](moment()[_0x4711('0x25')]('x'));}this[_0x4711('0xd')][_0x5befd3[_0x4711('0x2b')]][_0x4711('0x22')]=_0x5befd3[_0x4711('0x22')][_0x4711('0x2e')]();this[_0x4711('0x1f')](util[_0x4711('0x25')](_0x4711('0x32'),this['telephones'][_0x5befd3['device']]['name']),'telephone:save',this[_0x4711('0xd')][_0x5befd3[_0x4711('0x2b')]]);}else if(this['trunks'][_0x5befd3[_0x4711('0x2b')]]){if(this['trunks'][_0x5befd3['device']]['state']!==_0x5befd3['state'][_0x4711('0x2e')]()){this[_0x4711('0xb')][_0x5befd3['device']][_0x4711('0x2f')]=_['toNumber'](moment()[_0x4711('0x25')]('x'));}this['trunks'][_0x5befd3[_0x4711('0x2b')]]['state']=_0x5befd3[_0x4711('0x22')][_0x4711('0x2e')]();this[_0x4711('0x1f')](util[_0x4711('0x25')](_0x4711('0x26'),this['trunks'][_0x5befd3['device']]['name']),_0x4711('0x28'),this[_0x4711('0xb')][_0x5befd3['device']]);}else if(_[_0x4711('0x33')](_0x5befd3[_0x4711('0x2b')],_0x4711('0x34'))){}else if(_['startsWith'](_0x5befd3[_0x4711('0x2b')],_0x4711('0x35'))){var _0x2fb963=_0x5befd3[_0x4711('0x2b')];var _0x354db1=_0x2fb963[_0x4711('0x36')](_0x2fb963[_0x4711('0x37')]('/')+0x1,_0x2fb963['indexOf']('@'));var _0xb9cafc=_[_0x4711('0x38')](this[_0x4711('0xc')],function(_0x4ba90c){return _0x4ba90c['mobile']==_0x354db1||_0x4ba90c[_0x4711('0x39')]==_0x354db1||_0x4ba90c[_0x4711('0x3a')]==_0x354db1;});if(_0xb9cafc){if(_0xb9cafc[_0x4711('0x22')]!==_0x5befd3[_0x4711('0x22')][_0x4711('0x2e')]()){_0xb9cafc[_0x4711('0x2f')]=_[_0x4711('0x30')](moment()[_0x4711('0x25')]('x'));}_0xb9cafc['state']=_0x5befd3[_0x4711('0x22')][_0x4711('0x2e')]();_0xb9cafc[_0x4711('0x2c')]=!![];_0xb9cafc['updateStatusRealtime'](_0x5befd3);}}else{}}}catch(_0x17b1d2){logger['error'](_0x4711('0x3b'),util[_0x4711('0x19')](_0x17b1d2,{'showHidden':![],'depth':null}));}};UserReport[_0x4711('0x1a')][_0x4711('0x12')]=function(_0x42dcb6){try{if(this[_0x4711('0x1d')](_0x42dcb6)&&this[_0x4711('0x1d')](_0x42dcb6[_0x4711('0x3c')])){if(this[_0x4711('0xc')][_0x42dcb6['peer']]){if(!this['agents'][_0x42dcb6['peer']][_0x4711('0x2c')]||_0x42dcb6[_0x4711('0x3c')][_0x4711('0x2e')]()==_0x4711('0x3d')){this['agents'][_0x42dcb6['peer']][_0x4711('0x2c')]=![];this[_0x4711('0xc')][_0x42dcb6[_0x4711('0x3e')]][_0x4711('0x3f')]=_0x42dcb6['peerstatus'][_0x4711('0x2e')]();this[_0x4711('0xc')][_0x42dcb6[_0x4711('0x3e')]][_0x4711('0x40')]=_0x42dcb6[_0x4711('0x40')];this[_0x4711('0xc')][_0x42dcb6['peer']]['updateStatusRealtime'](_0x42dcb6);}}else if(this[_0x4711('0xd')][_0x42dcb6[_0x4711('0x3e')]]){this[_0x4711('0xd')][_0x42dcb6['peer']][_0x4711('0x3f')]=_0x42dcb6['peerstatus'][_0x4711('0x2e')]();this[_0x4711('0xd')][_0x42dcb6[_0x4711('0x3e')]][_0x4711('0x40')]=_0x42dcb6[_0x4711('0x40')];this[_0x4711('0x1f')](util[_0x4711('0x25')](_0x4711('0x32'),this['telephones'][_0x42dcb6['peer']][_0x4711('0x27')]),_0x4711('0x41'),this['telephones'][_0x42dcb6[_0x4711('0x3e')]]);}else if(this[_0x4711('0xb')][_0x42dcb6[_0x4711('0x3e')]]){this[_0x4711('0xb')][_0x42dcb6[_0x4711('0x3e')]]['status']=_0x42dcb6[_0x4711('0x3c')][_0x4711('0x2e')]();this['trunks'][_0x42dcb6[_0x4711('0x3e')]]['address']=_0x42dcb6[_0x4711('0x40')];this['emit'](util[_0x4711('0x25')](_0x4711('0x26'),this[_0x4711('0xb')][_0x42dcb6[_0x4711('0x3e')]]['name']),_0x4711('0x28'),this['trunks'][_0x42dcb6[_0x4711('0x3e')]]);}else{}}}catch(_0x44cf88){logger[_0x4711('0x29')](_0x4711('0x42'),util[_0x4711('0x19')](_0x44cf88,{'showHidden':![],'depth':null}));}};module['exports']=UserReport;
\ No newline at end of file
+var _0x07e2=['toLowerCase','updateStatusRealtime','name','Queue','startsWith','Local','find','mobile','phone','accountcode','[syncDeviceState][UserReport]','peer','registered','address','status','telephone:save','lodash','bluebird','ioredis','../../../config/environment','ami','../ami','redis','localhost','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','bind','registry','syncDeviceState','peerstatus','syncPeerStatus','loopSyncRealTimeShow','resolve','then','actionDeviceStateList','[loopSyncRealTimeShow]','inspect','prototype','actionSipShowRegistry','actionSipPeerStatus','catch','isNotNull','emit','username','stateRegistry','state','merge','omit','event','format','trunk:%s','trunk:save','error','[syncRegistry][UserReport]','device','local','inuse','stateTime','toNumber'];(function(_0x352c13,_0x1a91cb){var _0x5b48e8=function(_0x1afcc2){while(--_0x1afcc2){_0x352c13['push'](_0x352c13['shift']());}};_0x5b48e8(++_0x1a91cb);}(_0x07e2,0x10c));var _0x207e=function(_0x4734b1,_0x3a40df){_0x4734b1=_0x4734b1-0x0;var _0x5bc908=_0x07e2[_0x4734b1];return _0x5bc908;};'use strict';var _=require(_0x207e('0x0'));var moment=require('moment');var BPromise=require(_0x207e('0x1'));var util=require('util');var Redis=require(_0x207e('0x2'));var config=require(_0x207e('0x3'));var logger=require('../../../config/logger')(_0x207e('0x4'));var ami=require(_0x207e('0x5'));config[_0x207e('0x6')]=_['defaults'](config[_0x207e('0x6')],{'host':_0x207e('0x7'),'port':0x18eb});var io=require(_0x207e('0x8'))(new Redis(config['redis']));function UserReport(_0x369457){this[_0x207e('0x9')]=_0x369457[_0x207e('0x9')];this[_0x207e('0xa')]=_0x369457[_0x207e('0xa')];this[_0x207e('0xb')]=_0x369457[_0x207e('0xb')];ami['on'](_0x207e('0xc'),this[_0x207e('0xd')][_0x207e('0xe')](this));ami['on'](_0x207e('0xf'),this[_0x207e('0xd')]['bind'](this));ami['on']('devicestatechange',this[_0x207e('0x10')]['bind'](this));ami['on'](_0x207e('0x11'),this[_0x207e('0x12')][_0x207e('0xe')](this));this[_0x207e('0x13')]();return BPromise[_0x207e('0x14')]()[_0x207e('0x15')](ami['actionSipShowRegistry']())[_0x207e('0x15')](ami[_0x207e('0x16')]())[_0x207e('0x15')](ami['actionSipPeerStatus']())['catch'](loggerCatch(_0x207e('0x17')));}function loggerCatch(_0x1ae20c){return function(_0x2bd74c){logger['error'](_0x1ae20c,util[_0x207e('0x18')](_0x2bd74c,{'showHidden':![],'depth':null}));};}UserReport[_0x207e('0x19')][_0x207e('0x13')]=function(){setInterval(function(){BPromise[_0x207e('0x14')]()[_0x207e('0x15')](ami[_0x207e('0x1a')]())[_0x207e('0x15')](ami[_0x207e('0x16')]())[_0x207e('0x15')](ami[_0x207e('0x1b')]())[_0x207e('0x1c')](loggerCatch(_0x207e('0x17')));},0x32c8);};UserReport[_0x207e('0x19')][_0x207e('0x1d')]=function(_0x51da49){return _0x51da49!==null&&!_['isUndefined'](_0x51da49);};UserReport['prototype']['emit']=function(_0x5b2db7,_0x8564a9,_0x1b4afb){io['to'](_0x5b2db7)[_0x207e('0x1e')](_0x8564a9,_0x1b4afb);};UserReport['prototype'][_0x207e('0xd')]=function(_0x226185){try{if(this['isNotNull'](_0x226185)){var _0xd2438f=_['find'](this[_0x207e('0x9')],{'registry':_0x226185[_0x207e('0x1f')]});if(_0xd2438f){_0x226185[_0x207e('0x20')]=_0x226185[_0x207e('0x21')];_[_0x207e('0x22')](_0xd2438f,_[_0x207e('0x23')](_0x226185,[_0x207e('0x24'),'actionid',_0x207e('0x1f'),'state']));this[_0x207e('0x1e')](util[_0x207e('0x25')](_0x207e('0x26'),_0xd2438f['name']),_0x207e('0x27'),_0xd2438f);}}}catch(_0x5a7dcc){logger[_0x207e('0x28')](_0x207e('0x29'),util[_0x207e('0x18')](_0x5a7dcc,{'showHidden':![],'depth':null}));}};UserReport[_0x207e('0x19')][_0x207e('0x10')]=function(_0x21550e){try{if(this[_0x207e('0x1d')](_0x21550e)){if(this[_0x207e('0xa')][_0x21550e[_0x207e('0x2a')]]){if(!this[_0x207e('0xa')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x2b')]||_0x21550e['state']['toLowerCase']()==_0x207e('0x2c')){this['agents'][_0x21550e[_0x207e('0x2a')]][_0x207e('0x2b')]=![];if(this[_0x207e('0xa')][_0x21550e['device']][_0x207e('0x21')]!==_0x21550e[_0x207e('0x21')]['toLowerCase']()){this[_0x207e('0xa')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x2d')]=_[_0x207e('0x2e')](moment()[_0x207e('0x25')]('x'));}this[_0x207e('0xa')][_0x21550e['device']][_0x207e('0x21')]=_0x21550e[_0x207e('0x21')][_0x207e('0x2f')]();this[_0x207e('0xa')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x30')](_0x21550e);}}else if(this[_0x207e('0xb')][_0x21550e['device']]){if(this[_0x207e('0xb')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x21')]!==_0x21550e[_0x207e('0x21')][_0x207e('0x2f')]()){this[_0x207e('0xb')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x2d')]=_[_0x207e('0x2e')](moment()['format']('x'));}this['telephones'][_0x21550e['device']][_0x207e('0x21')]=_0x21550e[_0x207e('0x21')][_0x207e('0x2f')]();this[_0x207e('0x1e')](util[_0x207e('0x25')]('telephone:%s',this[_0x207e('0xb')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x31')]),'telephone:save',this[_0x207e('0xb')][_0x21550e[_0x207e('0x2a')]]);}else if(this['trunks'][_0x21550e[_0x207e('0x2a')]]){if(this['trunks'][_0x21550e[_0x207e('0x2a')]][_0x207e('0x21')]!==_0x21550e[_0x207e('0x21')][_0x207e('0x2f')]()){this[_0x207e('0x9')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x2d')]=_['toNumber'](moment()['format']('x'));}this[_0x207e('0x9')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x21')]=_0x21550e[_0x207e('0x21')]['toLowerCase']();this[_0x207e('0x1e')](util['format'](_0x207e('0x26'),this[_0x207e('0x9')][_0x21550e[_0x207e('0x2a')]][_0x207e('0x31')]),_0x207e('0x27'),this[_0x207e('0x9')][_0x21550e[_0x207e('0x2a')]]);}else if(_['startsWith'](_0x21550e[_0x207e('0x2a')],_0x207e('0x32'))){}else if(_[_0x207e('0x33')](_0x21550e[_0x207e('0x2a')],_0x207e('0x34'))){var _0x13ec5=_0x21550e['device'];var _0x326bfa=_0x13ec5['substring'](_0x13ec5['indexOf']('/')+0x1,_0x13ec5['indexOf']('@'));var _0x5d2643=_[_0x207e('0x35')](this[_0x207e('0xa')],function(_0x27b21b){return _0x27b21b[_0x207e('0x36')]==_0x326bfa||_0x27b21b[_0x207e('0x37')]==_0x326bfa||_0x27b21b[_0x207e('0x38')]==_0x326bfa;});if(_0x5d2643){if(_0x5d2643['state']!==_0x21550e[_0x207e('0x21')][_0x207e('0x2f')]()){_0x5d2643['stateTime']=_[_0x207e('0x2e')](moment()[_0x207e('0x25')]('x'));}_0x5d2643[_0x207e('0x21')]=_0x21550e['state']['toLowerCase']();_0x5d2643[_0x207e('0x2b')]=!![];_0x5d2643[_0x207e('0x30')](_0x21550e);}}else{}}}catch(_0x5724a9){logger['error'](_0x207e('0x39'),util[_0x207e('0x18')](_0x5724a9,{'showHidden':![],'depth':null}));}};UserReport[_0x207e('0x19')]['syncPeerStatus']=function(_0x1c02d6){try{if(this['isNotNull'](_0x1c02d6)&&this[_0x207e('0x1d')](_0x1c02d6[_0x207e('0x11')])){if(this['agents'][_0x1c02d6['peer']]){if(!this[_0x207e('0xa')][_0x1c02d6[_0x207e('0x3a')]]['local']||_0x1c02d6['peerstatus']['toLowerCase']()==_0x207e('0x3b')){this['agents'][_0x1c02d6['peer']][_0x207e('0x2b')]=![];this[_0x207e('0xa')][_0x1c02d6[_0x207e('0x3a')]]['status']=_0x1c02d6[_0x207e('0x11')][_0x207e('0x2f')]();this[_0x207e('0xa')][_0x1c02d6[_0x207e('0x3a')]][_0x207e('0x3c')]=_0x1c02d6['address'];this['agents'][_0x1c02d6[_0x207e('0x3a')]][_0x207e('0x30')](_0x1c02d6);}}else if(this['telephones'][_0x1c02d6[_0x207e('0x3a')]]){this[_0x207e('0xb')][_0x1c02d6[_0x207e('0x3a')]][_0x207e('0x3d')]=_0x1c02d6[_0x207e('0x11')][_0x207e('0x2f')]();this[_0x207e('0xb')][_0x1c02d6[_0x207e('0x3a')]]['address']=_0x1c02d6[_0x207e('0x3c')];this[_0x207e('0x1e')](util['format']('telephone:%s',this[_0x207e('0xb')][_0x1c02d6['peer']][_0x207e('0x31')]),_0x207e('0x3e'),this[_0x207e('0xb')][_0x1c02d6[_0x207e('0x3a')]]);}else if(this['trunks'][_0x1c02d6['peer']]){this[_0x207e('0x9')][_0x1c02d6['peer']][_0x207e('0x3d')]=_0x1c02d6[_0x207e('0x11')][_0x207e('0x2f')]();this[_0x207e('0x9')][_0x1c02d6['peer']][_0x207e('0x3c')]=_0x1c02d6[_0x207e('0x3c')];this[_0x207e('0x1e')](util['format'](_0x207e('0x26'),this[_0x207e('0x9')][_0x1c02d6[_0x207e('0x3a')]]['name']),'trunk:save',this['trunks'][_0x1c02d6[_0x207e('0x3a')]]);}else{}}}catch(_0x2b13b1){logger[_0x207e('0x28')]('[syncPeerStatus][UserReport]',util[_0x207e('0x18')](_0x2b13b1,{'showHidden':![],'depth':null}));}};module['exports']=UserReport;
\ No newline at end of file
diff --git a/server/services/ami/report/voiceAgentReport.js b/server/services/ami/report/voiceAgentReport.js
index 13e8780..49f597e 100644
--- a/server/services/ami/report/voiceAgentReport.js
+++ b/server/services/ami/report/voiceAgentReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfa4d=['agentacw','acwtime','acwTimeout','interface','custom:agentcomplete','syncVarSet','keys','variable','value','[syncVarSet][VoiceAgentReport]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','includes','custom:voiceAgentReport','values','[syncHangup][VoiceAgentReport]','transfereeuniqueid','origtransfereruniqueid','diff','secondtransfereruniqueid','[syncAttendedTransfer][VoiceAgentReport]','agentconnectAt','seconds','channel','onhold','lastIndexOf','[syncMusicOnHoldStop][VoiceAgentReport]','exports','moment','util','ioredis','../../../config/environment','../../../config/logger','ami','../ami','redis','defaults','voiceQueues','agents','agentcalled','bind','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','syncAgentComplete','varset','syncHangup','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','syncAgentCalled','uniqueid','channels','destuniqueid','format','YYYY-MM-DD\x20HH:mm:ss','variables','queue','type','inbound','privilege','custom:agentcalled','user:%s','membername','[syncAgentCalled][VoiceAgentReport]','syncAgentConnect','hasOwnProperty','connect','holdtime','connectedlinenum','connectedlinename','destchannelstate','destchannelstatedesc','pick','destconnectedlinenum','user:agentconnect','custom:agentconnect','agentcomplete','agentringnoanswerAt','reason','answered_elsewhere','lastevent','answeredelsewheredestinationuniqueid','answeredelsewheremembername','custom:agentansweredelsewhere','error','[syncAgentConnect][VoiceAgentReport]','inspect','rejected','abandoned','[syncQueueCallerAbandon][VoiceAgentReport]','agentcompleteAt','complete','talktime','transfer','agent','acw'];(function(_0x1587d1,_0x2a069c){var _0x1cb058=function(_0x373127){while(--_0x373127){_0x1587d1['push'](_0x1587d1['shift']());}};_0x1cb058(++_0x2a069c);}(_0xfa4d,0xa4));var _0xdfa4=function(_0x5c3f4e,_0x40a1a9){_0x5c3f4e=_0x5c3f4e-0x0;var _0x27798b=_0xfa4d[_0x5c3f4e];return _0x27798b;};'use strict';var _=require('lodash');var moment=require(_0xdfa4('0x0'));var util=require(_0xdfa4('0x1'));var Redis=require(_0xdfa4('0x2'));var config=require(_0xdfa4('0x3'));var logger=require(_0xdfa4('0x4'))(_0xdfa4('0x5'));var ami=require(_0xdfa4('0x6'));config[_0xdfa4('0x7')]=_[_0xdfa4('0x8')](config[_0xdfa4('0x7')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function VoiceAgentReport(_0x1da5cc){this['channels']={};this['voiceQueues']=_0x1da5cc[_0xdfa4('0x9')];this[_0xdfa4('0xa')]=_0x1da5cc[_0xdfa4('0xa')];this['variables']={};ami['on'](_0xdfa4('0xb'),this['syncAgentCalled'][_0xdfa4('0xc')](this));ami['on']('agentconnect',this['syncAgentConnect']['bind'](this));ami['on'](_0xdfa4('0xd'),this[_0xdfa4('0xe')][_0xdfa4('0xc')](this));ami['on'](_0xdfa4('0xf'),this[_0xdfa4('0x10')][_0xdfa4('0xc')](this));ami['on']('agentcomplete',this[_0xdfa4('0x11')][_0xdfa4('0xc')](this));ami['on'](_0xdfa4('0x12'),this['syncVarSet'][_0xdfa4('0xc')](this));ami['on']('hangup',this[_0xdfa4('0x13')][_0xdfa4('0xc')](this));ami['on']('musiconholdstart',this[_0xdfa4('0x14')][_0xdfa4('0xc')](this));ami['on'](_0xdfa4('0x15'),this[_0xdfa4('0x16')][_0xdfa4('0xc')](this));ami['on'](_0xdfa4('0x17'),this[_0xdfa4('0x18')][_0xdfa4('0xc')](this));ami['on'](_0xdfa4('0x19'),this[_0xdfa4('0x1a')][_0xdfa4('0xc')](this));}VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x1c')]=function(_0x15979a,_0x592b25,_0x2e92dc){io['to'](_0x15979a)[_0xdfa4('0x1c')](_0x592b25,_0x2e92dc);};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x1d')]=function(_0xad8401){return _0xad8401!==null&&!_[_0xdfa4('0x1e')](_0xad8401);};VoiceAgentReport['prototype'][_0xdfa4('0x1f')]=function(_0x3a5efd){try{if(this[_0xdfa4('0x1d')](_0x3a5efd)){if(_[_0xdfa4('0x1e')](this['channels'][_0x3a5efd[_0xdfa4('0x20')]])){this[_0xdfa4('0x21')][_0x3a5efd[_0xdfa4('0x20')]]={};}if(_['isUndefined'](this['channels'][_0x3a5efd[_0xdfa4('0x20')]][_0x3a5efd[_0xdfa4('0x22')]])){this['channels'][_0x3a5efd[_0xdfa4('0x20')]][_0x3a5efd[_0xdfa4('0x22')]]={'agentcalledAt':moment()[_0xdfa4('0x23')](_0xdfa4('0x24')),'lastevent':'called','variables':this[_0xdfa4('0x25')][_0x3a5efd[_0xdfa4('0x20')]],'type':this[_0xdfa4('0x9')][_0x3a5efd[_0xdfa4('0x26')]]?this[_0xdfa4('0x9')][_0x3a5efd[_0xdfa4('0x26')]][_0xdfa4('0x27')]||_0xdfa4('0x28'):_0xdfa4('0x28')};}_['merge'](this[_0xdfa4('0x21')][_0x3a5efd[_0xdfa4('0x20')]][_0x3a5efd['destuniqueid']],_['omit'](_0x3a5efd,['event',_0xdfa4('0x29')]));ami[_0xdfa4('0x1c')](_0xdfa4('0x2a'),this[_0xdfa4('0x21')][_0x3a5efd[_0xdfa4('0x20')]][_0x3a5efd[_0xdfa4('0x22')]]);this['emit'](util[_0xdfa4('0x23')](_0xdfa4('0x2b'),_0x3a5efd[_0xdfa4('0x2c')]),'user:called',this[_0xdfa4('0x21')][_0x3a5efd[_0xdfa4('0x20')]][_0x3a5efd[_0xdfa4('0x22')]]);}}catch(_0x5efe5b){logger['error'](_0xdfa4('0x2d'),util['inspect'](_0x5efe5b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x2e')]=function(_0x209d4c){try{if(this[_0xdfa4('0x1d')](_0x209d4c)){if(this['channels'][_0x209d4c[_0xdfa4('0x20')]]){for(var _0x419d1a in this['channels'][_0x209d4c[_0xdfa4('0x20')]]){if(this['channels'][_0x209d4c['uniqueid']][_0xdfa4('0x2f')](_0x419d1a)){if(_0x209d4c[_0xdfa4('0x22')]===_0x419d1a){this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['agentconnectAt']=moment()[_0xdfa4('0x23')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['lastevent']=_0xdfa4('0x30');this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['holdtime']=_0x209d4c[_0xdfa4('0x31')];this[_0xdfa4('0x21')][_0x209d4c['uniqueid']][_0x419d1a][_0xdfa4('0x32')]=_0x209d4c[_0xdfa4('0x32')];this['channels'][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['connectedlinename']=_0x209d4c[_0xdfa4('0x33')];this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['destchannelstate']=_0x209d4c[_0xdfa4('0x34')];this[_0xdfa4('0x21')][_0x209d4c['uniqueid']][_0x419d1a]['destchannelstatedesc']=_0x209d4c[_0xdfa4('0x35')];_['merge'](this[_0xdfa4('0xa')][_0x209d4c['interface']],_[_0xdfa4('0x36')](_0x209d4c,['queue',_0xdfa4('0x37')]));this[_0xdfa4('0x1c')](util[_0xdfa4('0x23')](_0xdfa4('0x2b'),_0x209d4c[_0xdfa4('0x2c')]),_0xdfa4('0x38'),this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x209d4c[_0xdfa4('0x22')]]);ami[_0xdfa4('0x1c')](_0xdfa4('0x39'),this['channels'][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]);}else if(!this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['agentringnoanswer']&&!this[_0xdfa4('0x21')][_0x209d4c['uniqueid']][_0x419d1a][_0xdfa4('0x3a')]){this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]['agentringnoanswer']=!![];this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a][_0xdfa4('0x3b')]=moment()[_0xdfa4('0x23')](_0xdfa4('0x24'));this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a][_0xdfa4('0x3c')]=_0xdfa4('0x3d');this['channels'][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a][_0xdfa4('0x3e')]=_0xdfa4('0x3d');this['channels'][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a][_0xdfa4('0x3f')]=_0x209d4c[_0xdfa4('0x22')];this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a][_0xdfa4('0x40')]=_0x209d4c[_0xdfa4('0x2c')];ami[_0xdfa4('0x1c')](_0xdfa4('0x41'),this[_0xdfa4('0x21')][_0x209d4c[_0xdfa4('0x20')]][_0x419d1a]);}}}}}}catch(_0x2da709){logger[_0xdfa4('0x42')](_0xdfa4('0x43'),util[_0xdfa4('0x44')](_0x2da709,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0xe')]=function(_0x4947bc){try{if(this['isNotNull'](_0x4947bc)){if(this[_0xdfa4('0x21')][_0x4947bc[_0xdfa4('0x20')]]&&this['channels'][_0x4947bc[_0xdfa4('0x20')]][_0x4947bc[_0xdfa4('0x22')]]){this[_0xdfa4('0x21')][_0x4947bc[_0xdfa4('0x20')]][_0x4947bc[_0xdfa4('0x22')]]['agentringnoanswer']=!![];this[_0xdfa4('0x21')][_0x4947bc[_0xdfa4('0x20')]][_0x4947bc[_0xdfa4('0x22')]][_0xdfa4('0x3b')]=moment()[_0xdfa4('0x23')](_0xdfa4('0x24'));this[_0xdfa4('0x21')][_0x4947bc['uniqueid']][_0x4947bc['destuniqueid']]['reason']=_0xdfa4('0x45');this[_0xdfa4('0x21')][_0x4947bc['uniqueid']][_0x4947bc[_0xdfa4('0x22')]][_0xdfa4('0x3e')]='rejected';ami[_0xdfa4('0x1c')]('custom:agentringnoanswer',this[_0xdfa4('0x21')][_0x4947bc[_0xdfa4('0x20')]][_0x4947bc[_0xdfa4('0x22')]]);}}}catch(_0x1ac705){logger[_0xdfa4('0x42')]('[syncAgentRingNoAnswer][VoiceAgentReport]',util['inspect'](_0x1ac705,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['syncQueueCallerAbandon']=function(_0x64f45a){try{if(this['isNotNull'](_0x64f45a)){if(this[_0xdfa4('0x21')][_0x64f45a['uniqueid']]){for(var _0x5e9efd in this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]]){if(this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0xdfa4('0x2f')](_0x5e9efd)&&!this['channels'][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd][_0xdfa4('0xd')]&&!this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd][_0xdfa4('0x3a')]){this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd]['agentringnoanswer']=!![];this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd][_0xdfa4('0x3b')]=moment()[_0xdfa4('0x23')](_0xdfa4('0x24'));this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd][_0xdfa4('0x3c')]=_0xdfa4('0x46');this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd][_0xdfa4('0x3e')]=_0xdfa4('0x46');ami['emit']('custom:agentqueuecallerabandon',this[_0xdfa4('0x21')][_0x64f45a[_0xdfa4('0x20')]][_0x5e9efd]);}}}}}catch(_0x532ccb){logger[_0xdfa4('0x42')](_0xdfa4('0x47'),util['inspect'](_0x532ccb,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x11')]=function(_0x4f9f42){try{if(this['isNotNull'](_0x4f9f42)){if(this[_0xdfa4('0x21')][_0x4f9f42['uniqueid']]){for(var _0x4e6e6d in this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]]){if(this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]]['hasOwnProperty'](_0x4e6e6d)){if(this['channels'][_0x4f9f42['uniqueid']][_0x4e6e6d]['agentconnectAt']&&!this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d][_0xdfa4('0x3a')]){this['channels'][_0x4f9f42['uniqueid']][_0x4e6e6d]['agentcomplete']=!![];this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d][_0xdfa4('0x48')]=moment()[_0xdfa4('0x23')](_0xdfa4('0x24'));this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d][_0xdfa4('0x3e')]=_0xdfa4('0x49');this[_0xdfa4('0x21')][_0x4f9f42['uniqueid']][_0x4e6e6d]['talktime']=_0x4f9f42[_0xdfa4('0x4a')];this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d]['reason']=_0x4f9f42[_0xdfa4('0x3c')]==_0xdfa4('0x4b')?_0xdfa4('0x4c'):_0x4f9f42[_0xdfa4('0x3c')];if(this[_0xdfa4('0x9')][_0x4f9f42[_0xdfa4('0x26')]]&&this[_0xdfa4('0x9')][_0x4f9f42[_0xdfa4('0x26')]][_0xdfa4('0x4d')]){this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d][_0xdfa4('0x4e')]=!![];this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d][_0xdfa4('0x4f')]=this['voiceQueues'][_0x4f9f42['queue']][_0xdfa4('0x50')];}this['agents'][_0x4f9f42[_0xdfa4('0x51')]]=_['omit'](this['agents'][_0x4f9f42[_0xdfa4('0x51')]],[_0xdfa4('0x26'),'destconnectedlinenum']);this['emit'](util[_0xdfa4('0x23')](_0xdfa4('0x2b'),_0x4f9f42['membername']),'user:agentcomplete',this['channels'][_0x4f9f42['uniqueid']][_0x4e6e6d]);ami[_0xdfa4('0x1c')](_0xdfa4('0x52'),this[_0xdfa4('0x21')][_0x4f9f42[_0xdfa4('0x20')]][_0x4e6e6d]);}}}}}}catch(_0x20a03b){logger[_0xdfa4('0x42')]('[syncAgentComplete][VoiceAgentReport]',util['inspect'](_0x20a03b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x53')]=function(_0x1a7394){try{if(this['isNotNull'](_0x1a7394)){this['addVariable'](_0x1a7394[_0xdfa4('0x20')],_[_0xdfa4('0x54')](_0x1a7394[_0xdfa4('0x55')])[0x0],_0x1a7394[_0xdfa4('0x56')]);if(this[_0xdfa4('0x21')][_0x1a7394['uniqueid']]){for(var _0x241900 in this[_0xdfa4('0x21')][_0x1a7394['uniqueid']]){if(this[_0xdfa4('0x21')][_0x1a7394[_0xdfa4('0x20')]]['hasOwnProperty'](_0x241900)){if(_[_0xdfa4('0x1e')](this['channels'][_0x1a7394['uniqueid']][_0x241900][_0xdfa4('0x25')])){this['channels'][_0x1a7394[_0xdfa4('0x20')]][_0x241900]['variables']={};}this[_0xdfa4('0x21')][_0x1a7394[_0xdfa4('0x20')]][_0x241900]['variables']=this[_0xdfa4('0x25')][_0x1a7394[_0xdfa4('0x20')]];}}}}}catch(_0x4689b7){logger[_0xdfa4('0x42')](_0xdfa4('0x57'),util[_0xdfa4('0x44')](_0x4689b7,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')]['addVariable']=function(_0x3ffad4,_0x2199de,_0x59e62b){var _0x5b2b7e=[_0xdfa4('0x58'),_0xdfa4('0x59'),_0xdfa4('0x5a'),_0xdfa4('0x5b'),_0xdfa4('0x5c'),_0xdfa4('0x5d'),_0xdfa4('0x5e'),_0xdfa4('0x5f'),'sipcallid',_0xdfa4('0x60'),_0xdfa4('0x61'),'bridgepvtcallid',_0xdfa4('0x62'),_0xdfa4('0x63'),_0xdfa4('0x64'),_0xdfa4('0x65'),_0xdfa4('0x2c'),_0xdfa4('0x66'),_0xdfa4('0x67')];if(!_[_0xdfa4('0x68')](_0x2199de)&&!_[_0xdfa4('0x69')](_0x5b2b7e,_0x2199de)){if(_[_0xdfa4('0x1e')](this[_0xdfa4('0x25')][_0x3ffad4])){this[_0xdfa4('0x25')][_0x3ffad4]={};}this[_0xdfa4('0x25')][_0x3ffad4][_0x2199de]=_0x59e62b;}};VoiceAgentReport['prototype'][_0xdfa4('0x13')]=function(_0x24c7f3){try{if(this[_0xdfa4('0x1d')](_0x24c7f3)){if(this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]]){for(var _0x5be5e7 in this['channels'][_0x24c7f3[_0xdfa4('0x20')]]){if(this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]][_0xdfa4('0x2f')](_0x5be5e7)){if(this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]][_0x5be5e7][_0xdfa4('0x3c')]==_0xdfa4('0x4b')&&this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]][_0x5be5e7][_0xdfa4('0x3a')]){this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]][_0x5be5e7][_0xdfa4('0x48')]=moment()['format'](_0xdfa4('0x24'));}}}ami[_0xdfa4('0x1c')](_0xdfa4('0x6a'),_[_0xdfa4('0x6b')](this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]]));delete this[_0xdfa4('0x21')][_0x24c7f3[_0xdfa4('0x20')]];}if(this[_0xdfa4('0x25')][_0x24c7f3[_0xdfa4('0x20')]]){delete this['variables'][_0x24c7f3['uniqueid']];}}}catch(_0x45ef89){logger['error'](_0xdfa4('0x6c'),util[_0xdfa4('0x44')](_0x45ef89,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xdfa4('0x18')]=function(_0x39f384){try{if(this['isNotNull'](_0x39f384)){if(this['channels'][_0x39f384[_0xdfa4('0x6d')]]){for(var _0x253979 in this['channels'][_0x39f384[_0xdfa4('0x6d')]]){if(this['channels'][_0x39f384[_0xdfa4('0x6d')]][_0xdfa4('0x2f')](_0x253979)){if(_0x39f384[_0xdfa4('0x6e')]===_0x253979){var _0x35c896=moment();this['channels'][_0x39f384[_0xdfa4('0x6d')]][_0x253979][_0xdfa4('0x3a')]=!![];this['channels'][_0x39f384[_0xdfa4('0x6d')]][_0x253979][_0xdfa4('0x48')]=moment()[_0xdfa4('0x23')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xdfa4('0x21')][_0x39f384['transfereeuniqueid']][_0x253979][_0xdfa4('0x3c')]='transfer';this[_0xdfa4('0x21')][_0x39f384[_0xdfa4('0x6d')]][_0x253979][_0xdfa4('0x3e')]=_0xdfa4('0x49');this[_0xdfa4('0x21')][_0x39f384[_0xdfa4('0x6d')]][_0x253979]['talktime']=_0x35c896[_0xdfa4('0x6f')](this['channels'][_0x39f384[_0xdfa4('0x6d')]][_0x253979]['agentconnectAt'],'seconds');}}}}if(this[_0xdfa4('0x21')][_0x39f384[_0xdfa4('0x70')]]){var _0x1980a9=this[_0xdfa4('0x21')][_0x39f384['secondtransfereruniqueid']];this[_0xdfa4('0x21')][_0x39f384[_0xdfa4('0x70')]]=this['channels'][_0x39f384[_0xdfa4('0x6d')]];this[_0xdfa4('0x21')][_0x39f384[_0xdfa4('0x6d')]]=_0x1980a9;}}}catch(_0x5aaf22){logger[_0xdfa4('0x42')](_0xdfa4('0x71'),util[_0xdfa4('0x44')](_0x5aaf22,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x1a')]=function(_0x367760){try{if(this[_0xdfa4('0x1d')](_0x367760)){if(this[_0xdfa4('0x21')][_0x367760[_0xdfa4('0x6d')]]){for(var _0x4ac9e6 in this['channels'][_0x367760[_0xdfa4('0x6d')]]){if(this[_0xdfa4('0x21')][_0x367760[_0xdfa4('0x6d')]]['hasOwnProperty'](_0x4ac9e6)){if(_0x367760['transfereruniqueid']===_0x4ac9e6){var _0x51a017=moment();this['channels'][_0x367760[_0xdfa4('0x6d')]][_0x4ac9e6][_0xdfa4('0x3a')]=!![];this['channels'][_0x367760[_0xdfa4('0x6d')]][_0x4ac9e6][_0xdfa4('0x48')]=_0x51a017;this[_0xdfa4('0x21')][_0x367760[_0xdfa4('0x6d')]][_0x4ac9e6][_0xdfa4('0x3c')]='transfer';this['channels'][_0x367760[_0xdfa4('0x6d')]][_0x4ac9e6]['lastevent']='complete';this[_0xdfa4('0x21')][_0x367760['transfereeuniqueid']][_0x4ac9e6]['talktime']=_0x51a017['diff'](this[_0xdfa4('0x21')][_0x367760[_0xdfa4('0x6d')]][_0x4ac9e6][_0xdfa4('0x72')],_0xdfa4('0x73'));}}}}}}catch(_0x5c8bfb){logger[_0xdfa4('0x42')]('[syncBlindTransfer][VoiceAgentReport]',util[_0xdfa4('0x44')](_0x5c8bfb,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x14')]=function(_0x40c1cc){var _0x514ad6='';try{if(this['isNotNull'](_0x40c1cc)){if(_0x40c1cc[_0xdfa4('0x74')]){_0x514ad6=_0x40c1cc[_0xdfa4('0x74')]['substring'](0x0,_0x40c1cc['channel']['lastIndexOf']('-'));if(this[_0xdfa4('0xa')][_0x514ad6]){this['agents'][_0x514ad6][_0xdfa4('0x75')]=!![];}}}}catch(_0x47eddc){logger['error']('[syncMusicOnHoldStart][VoiceAgentReport]',util[_0xdfa4('0x44')](_0x47eddc,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xdfa4('0x1b')][_0xdfa4('0x16')]=function(_0x3b70ec){var _0x2141b9='';try{if(this['isNotNull'](_0x3b70ec)){if(_0x3b70ec[_0xdfa4('0x74')]){_0x2141b9=_0x3b70ec[_0xdfa4('0x74')]['substring'](0x0,_0x3b70ec[_0xdfa4('0x74')][_0xdfa4('0x76')]('-'));if(this[_0xdfa4('0xa')][_0x2141b9]){this['agents'][_0x2141b9][_0xdfa4('0x75')]=![];}}}}catch(_0x23c161){logger[_0xdfa4('0x42')](_0xdfa4('0x77'),util[_0xdfa4('0x44')](_0x23c161,{'showHidden':![],'depth':null}));}};module[_0xdfa4('0x78')]=VoiceAgentReport;
\ No newline at end of file
+var _0x78ea=['keys','[syncVarSet][VoiceAgentReport]','rtpaudioqosbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrttbridged','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','includes','custom:voiceAgentReport','values','[syncHangup][VoiceAgentReport]','transfereeuniqueid','origtransfereruniqueid','complete','diff','secondtransfereruniqueid','[syncAttendedTransfer][VoiceAgentReport]','transfereruniqueid','[syncBlindTransfer][VoiceAgentReport]','channel','substring','lastIndexOf','[syncMusicOnHoldStart][VoiceAgentReport]','onhold','[syncMusicOnHoldStop][VoiceAgentReport]','exports','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','voiceQueues','agents','variables','agentcalled','syncAgentCalled','bind','syncAgentConnect','agentringnoanswer','queuecallerabandon','agentcomplete','syncAgentComplete','syncVarSet','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','emit','prototype','isNotNull','isUndefined','uniqueid','channels','destuniqueid','YYYY-MM-DD\x20HH:mm:ss','called','queue','type','inbound','omit','event','format','user:%s','user:called','error','[syncAgentCalled][VoiceAgentReport]','inspect','hasOwnProperty','agentconnectAt','lastevent','connect','holdtime','connectedlinenum','connectedlinename','destchannelstatedesc','interface','pick','destconnectedlinenum','membername','custom:agentconnect','agentringnoanswerAt','reason','answered_elsewhere','custom:agentansweredelsewhere','syncAgentRingNoAnswer','rejected','custom:agentringnoanswer','[syncAgentRingNoAnswer][VoiceAgentReport]','syncQueueCallerAbandon','abandoned','[syncQueueCallerAbandon][VoiceAgentReport]','agentcompleteAt','talktime','transfer','agent','acwtime','acwTimeout','user:agentcomplete','custom:agentcomplete'];(function(_0x5739ca,_0x526362){var _0x495859=function(_0x53d50a){while(--_0x53d50a){_0x5739ca['push'](_0x5739ca['shift']());}};_0x495859(++_0x526362);}(_0x78ea,0x188));var _0xa78e=function(_0x314cd1,_0x33679e){_0x314cd1=_0x314cd1-0x0;var _0x2a0846=_0x78ea[_0x314cd1];return _0x2a0846;};'use strict';var _=require(_0xa78e('0x0'));var moment=require(_0xa78e('0x1'));var util=require(_0xa78e('0x2'));var Redis=require(_0xa78e('0x3'));var config=require(_0xa78e('0x4'));var logger=require(_0xa78e('0x5'))(_0xa78e('0x6'));var ami=require('../ami');config[_0xa78e('0x7')]=_[_0xa78e('0x8')](config[_0xa78e('0x7')],{'host':_0xa78e('0x9'),'port':0x18eb});var io=require(_0xa78e('0xa'))(new Redis(config[_0xa78e('0x7')]));function VoiceAgentReport(_0x146465){this['channels']={};this[_0xa78e('0xb')]=_0x146465[_0xa78e('0xb')];this[_0xa78e('0xc')]=_0x146465[_0xa78e('0xc')];this[_0xa78e('0xd')]={};ami['on'](_0xa78e('0xe'),this[_0xa78e('0xf')][_0xa78e('0x10')](this));ami['on']('agentconnect',this[_0xa78e('0x11')][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x12'),this['syncAgentRingNoAnswer'][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x13'),this['syncQueueCallerAbandon'][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x14'),this[_0xa78e('0x15')][_0xa78e('0x10')](this));ami['on']('varset',this[_0xa78e('0x16')][_0xa78e('0x10')](this));ami['on']('hangup',this[_0xa78e('0x17')][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x18'),this[_0xa78e('0x19')][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x1a'),this[_0xa78e('0x1b')][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x1c'),this[_0xa78e('0x1d')][_0xa78e('0x10')](this));ami['on'](_0xa78e('0x1e'),this[_0xa78e('0x1f')][_0xa78e('0x10')](this));}VoiceAgentReport['prototype'][_0xa78e('0x20')]=function(_0x3f2189,_0x841e67,_0x2d2d56){io['to'](_0x3f2189)[_0xa78e('0x20')](_0x841e67,_0x2d2d56);};VoiceAgentReport[_0xa78e('0x21')]['isNotNull']=function(_0xd50cad){return _0xd50cad!==null&&!_['isUndefined'](_0xd50cad);};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0xf')]=function(_0x4a778b){try{if(this[_0xa78e('0x22')](_0x4a778b)){if(_[_0xa78e('0x23')](this['channels'][_0x4a778b[_0xa78e('0x24')]])){this['channels'][_0x4a778b[_0xa78e('0x24')]]={};}if(_[_0xa78e('0x23')](this[_0xa78e('0x25')][_0x4a778b[_0xa78e('0x24')]][_0x4a778b[_0xa78e('0x26')]])){this[_0xa78e('0x25')][_0x4a778b[_0xa78e('0x24')]][_0x4a778b['destuniqueid']]={'agentcalledAt':moment()['format'](_0xa78e('0x27')),'lastevent':_0xa78e('0x28'),'variables':this[_0xa78e('0xd')][_0x4a778b[_0xa78e('0x24')]],'type':this[_0xa78e('0xb')][_0x4a778b['queue']]?this[_0xa78e('0xb')][_0x4a778b[_0xa78e('0x29')]][_0xa78e('0x2a')]||_0xa78e('0x2b'):_0xa78e('0x2b')};}_['merge'](this[_0xa78e('0x25')][_0x4a778b['uniqueid']][_0x4a778b[_0xa78e('0x26')]],_[_0xa78e('0x2c')](_0x4a778b,[_0xa78e('0x2d'),'privilege']));ami[_0xa78e('0x20')]('custom:agentcalled',this['channels'][_0x4a778b[_0xa78e('0x24')]][_0x4a778b['destuniqueid']]);this[_0xa78e('0x20')](util[_0xa78e('0x2e')](_0xa78e('0x2f'),_0x4a778b['membername']),_0xa78e('0x30'),this['channels'][_0x4a778b[_0xa78e('0x24')]][_0x4a778b[_0xa78e('0x26')]]);}}catch(_0x28b363){logger[_0xa78e('0x31')](_0xa78e('0x32'),util[_0xa78e('0x33')](_0x28b363,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x11')]=function(_0x4b9523){try{if(this['isNotNull'](_0x4b9523)){if(this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]]){for(var _0x191c52 in this['channels'][_0x4b9523[_0xa78e('0x24')]]){if(this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0xa78e('0x34')](_0x191c52)){if(_0x4b9523['destuniqueid']===_0x191c52){this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x35')]=moment()[_0xa78e('0x2e')](_0xa78e('0x27'));this['channels'][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x36')]=_0xa78e('0x37');this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x38')]=_0x4b9523[_0xa78e('0x38')];this['channels'][_0x4b9523['uniqueid']][_0x191c52][_0xa78e('0x39')]=_0x4b9523[_0xa78e('0x39')];this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52]['connectedlinename']=_0x4b9523[_0xa78e('0x3a')];this['channels'][_0x4b9523[_0xa78e('0x24')]][_0x191c52]['destchannelstate']=_0x4b9523['destchannelstate'];this['channels'][_0x4b9523[_0xa78e('0x24')]][_0x191c52]['destchannelstatedesc']=_0x4b9523[_0xa78e('0x3b')];_['merge'](this[_0xa78e('0xc')][_0x4b9523[_0xa78e('0x3c')]],_[_0xa78e('0x3d')](_0x4b9523,[_0xa78e('0x29'),_0xa78e('0x3e')]));this[_0xa78e('0x20')](util[_0xa78e('0x2e')]('user:%s',_0x4b9523[_0xa78e('0x3f')]),'user:agentconnect',this['channels'][_0x4b9523[_0xa78e('0x24')]][_0x4b9523['destuniqueid']]);ami[_0xa78e('0x20')](_0xa78e('0x40'),this[_0xa78e('0x25')][_0x4b9523['uniqueid']][_0x191c52]);}else if(!this['channels'][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x12')]&&!this[_0xa78e('0x25')][_0x4b9523['uniqueid']][_0x191c52][_0xa78e('0x14')]){this[_0xa78e('0x25')][_0x4b9523['uniqueid']][_0x191c52][_0xa78e('0x12')]=!![];this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x41')]=moment()[_0xa78e('0x2e')](_0xa78e('0x27'));this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x42')]=_0xa78e('0x43');this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52][_0xa78e('0x36')]='answered_elsewhere';this[_0xa78e('0x25')][_0x4b9523[_0xa78e('0x24')]][_0x191c52]['answeredelsewheredestinationuniqueid']=_0x4b9523[_0xa78e('0x26')];this[_0xa78e('0x25')][_0x4b9523['uniqueid']][_0x191c52]['answeredelsewheremembername']=_0x4b9523[_0xa78e('0x3f')];ami[_0xa78e('0x20')](_0xa78e('0x44'),this['channels'][_0x4b9523[_0xa78e('0x24')]][_0x191c52]);}}}}}}catch(_0x16f766){logger[_0xa78e('0x31')]('[syncAgentConnect][VoiceAgentReport]',util[_0xa78e('0x33')](_0x16f766,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x45')]=function(_0xb5fedc){try{if(this[_0xa78e('0x22')](_0xb5fedc)){if(this[_0xa78e('0x25')][_0xb5fedc[_0xa78e('0x24')]]&&this[_0xa78e('0x25')][_0xb5fedc[_0xa78e('0x24')]][_0xb5fedc['destuniqueid']]){this['channels'][_0xb5fedc[_0xa78e('0x24')]][_0xb5fedc[_0xa78e('0x26')]][_0xa78e('0x12')]=!![];this[_0xa78e('0x25')][_0xb5fedc[_0xa78e('0x24')]][_0xb5fedc[_0xa78e('0x26')]]['agentringnoanswerAt']=moment()[_0xa78e('0x2e')](_0xa78e('0x27'));this[_0xa78e('0x25')][_0xb5fedc[_0xa78e('0x24')]][_0xb5fedc[_0xa78e('0x26')]][_0xa78e('0x42')]=_0xa78e('0x46');this[_0xa78e('0x25')][_0xb5fedc[_0xa78e('0x24')]][_0xb5fedc[_0xa78e('0x26')]][_0xa78e('0x36')]=_0xa78e('0x46');ami['emit'](_0xa78e('0x47'),this[_0xa78e('0x25')][_0xb5fedc[_0xa78e('0x24')]][_0xb5fedc[_0xa78e('0x26')]]);}}}catch(_0x4cf843){logger[_0xa78e('0x31')](_0xa78e('0x48'),util[_0xa78e('0x33')](_0x4cf843,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x49')]=function(_0x18be55){try{if(this[_0xa78e('0x22')](_0x18be55)){if(this[_0xa78e('0x25')][_0x18be55['uniqueid']]){for(var _0x192b1f in this[_0xa78e('0x25')][_0x18be55[_0xa78e('0x24')]]){if(this[_0xa78e('0x25')][_0x18be55[_0xa78e('0x24')]][_0xa78e('0x34')](_0x192b1f)&&!this[_0xa78e('0x25')][_0x18be55['uniqueid']][_0x192b1f][_0xa78e('0x12')]&&!this['channels'][_0x18be55['uniqueid']][_0x192b1f][_0xa78e('0x14')]){this[_0xa78e('0x25')][_0x18be55[_0xa78e('0x24')]][_0x192b1f]['agentringnoanswer']=!![];this[_0xa78e('0x25')][_0x18be55[_0xa78e('0x24')]][_0x192b1f][_0xa78e('0x41')]=moment()[_0xa78e('0x2e')](_0xa78e('0x27'));this[_0xa78e('0x25')][_0x18be55[_0xa78e('0x24')]][_0x192b1f]['reason']=_0xa78e('0x4a');this[_0xa78e('0x25')][_0x18be55['uniqueid']][_0x192b1f]['lastevent']='abandoned';ami[_0xa78e('0x20')]('custom:agentqueuecallerabandon',this['channels'][_0x18be55['uniqueid']][_0x192b1f]);}}}}}catch(_0x56c392){logger['error'](_0xa78e('0x4b'),util['inspect'](_0x56c392,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x15')]=function(_0x3a8c71){try{if(this[_0xa78e('0x22')](_0x3a8c71)){if(this['channels'][_0x3a8c71[_0xa78e('0x24')]]){for(var _0x316200 in this['channels'][_0x3a8c71[_0xa78e('0x24')]]){if(this[_0xa78e('0x25')][_0x3a8c71['uniqueid']]['hasOwnProperty'](_0x316200)){if(this[_0xa78e('0x25')][_0x3a8c71['uniqueid']][_0x316200][_0xa78e('0x35')]&&!this['channels'][_0x3a8c71[_0xa78e('0x24')]][_0x316200]['agentcomplete']){this[_0xa78e('0x25')][_0x3a8c71[_0xa78e('0x24')]][_0x316200][_0xa78e('0x14')]=!![];this[_0xa78e('0x25')][_0x3a8c71[_0xa78e('0x24')]][_0x316200][_0xa78e('0x4c')]=moment()[_0xa78e('0x2e')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x3a8c71[_0xa78e('0x24')]][_0x316200][_0xa78e('0x36')]='complete';this[_0xa78e('0x25')][_0x3a8c71['uniqueid']][_0x316200][_0xa78e('0x4d')]=_0x3a8c71[_0xa78e('0x4d')];this[_0xa78e('0x25')][_0x3a8c71[_0xa78e('0x24')]][_0x316200][_0xa78e('0x42')]=_0x3a8c71[_0xa78e('0x42')]==_0xa78e('0x4e')?_0xa78e('0x4f'):_0x3a8c71[_0xa78e('0x42')];if(this[_0xa78e('0xb')][_0x3a8c71[_0xa78e('0x29')]]&&this['voiceQueues'][_0x3a8c71[_0xa78e('0x29')]]['acw']){this[_0xa78e('0x25')][_0x3a8c71[_0xa78e('0x24')]][_0x316200]['agentacw']=!![];this[_0xa78e('0x25')][_0x3a8c71[_0xa78e('0x24')]][_0x316200][_0xa78e('0x50')]=this['voiceQueues'][_0x3a8c71['queue']][_0xa78e('0x51')];}this[_0xa78e('0xc')][_0x3a8c71[_0xa78e('0x3c')]]=_[_0xa78e('0x2c')](this['agents'][_0x3a8c71['interface']],[_0xa78e('0x29'),_0xa78e('0x3e')]);this[_0xa78e('0x20')](util[_0xa78e('0x2e')]('user:%s',_0x3a8c71[_0xa78e('0x3f')]),_0xa78e('0x52'),this[_0xa78e('0x25')][_0x3a8c71[_0xa78e('0x24')]][_0x316200]);ami[_0xa78e('0x20')](_0xa78e('0x53'),this[_0xa78e('0x25')][_0x3a8c71['uniqueid']][_0x316200]);}}}}}}catch(_0x15447b){logger[_0xa78e('0x31')]('[syncAgentComplete][VoiceAgentReport]',util[_0xa78e('0x33')](_0x15447b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x16')]=function(_0x3e47e4){try{if(this[_0xa78e('0x22')](_0x3e47e4)){this['addVariable'](_0x3e47e4[_0xa78e('0x24')],_[_0xa78e('0x54')](_0x3e47e4['variable'])[0x0],_0x3e47e4['value']);if(this[_0xa78e('0x25')][_0x3e47e4[_0xa78e('0x24')]]){for(var _0x1d73b2 in this['channels'][_0x3e47e4[_0xa78e('0x24')]]){if(this[_0xa78e('0x25')][_0x3e47e4[_0xa78e('0x24')]][_0xa78e('0x34')](_0x1d73b2)){if(_[_0xa78e('0x23')](this[_0xa78e('0x25')][_0x3e47e4[_0xa78e('0x24')]][_0x1d73b2][_0xa78e('0xd')])){this[_0xa78e('0x25')][_0x3e47e4[_0xa78e('0x24')]][_0x1d73b2]['variables']={};}this[_0xa78e('0x25')][_0x3e47e4[_0xa78e('0x24')]][_0x1d73b2]['variables']=this['variables'][_0x3e47e4[_0xa78e('0x24')]];}}}}}catch(_0x21a286){logger[_0xa78e('0x31')](_0xa78e('0x55'),util[_0xa78e('0x33')](_0x21a286,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')]['addVariable']=function(_0x223baf,_0x5bb537,_0x51cd65){var _0x1c9b9d=['rtpaudioqos',_0xa78e('0x56'),'rtpaudioqosjitter','rtpaudioqosjitterbridged',_0xa78e('0x57'),_0xa78e('0x58'),'rtpaudioqosrtt',_0xa78e('0x59'),'sipcallid',_0xa78e('0x5a'),_0xa78e('0x5b'),_0xa78e('0x5c'),_0xa78e('0x5d'),_0xa78e('0x5e'),_0xa78e('0x5f'),_0xa78e('0x60'),'membername',_0xa78e('0x61'),_0xa78e('0x62')];if(!_[_0xa78e('0x63')](_0x5bb537)&&!_[_0xa78e('0x64')](_0x1c9b9d,_0x5bb537)){if(_['isUndefined'](this['variables'][_0x223baf])){this[_0xa78e('0xd')][_0x223baf]={};}this[_0xa78e('0xd')][_0x223baf][_0x5bb537]=_0x51cd65;}};VoiceAgentReport['prototype'][_0xa78e('0x17')]=function(_0x4e9b98){try{if(this['isNotNull'](_0x4e9b98)){if(this[_0xa78e('0x25')][_0x4e9b98[_0xa78e('0x24')]]){for(var _0x1aae95 in this[_0xa78e('0x25')][_0x4e9b98[_0xa78e('0x24')]]){if(this[_0xa78e('0x25')][_0x4e9b98[_0xa78e('0x24')]][_0xa78e('0x34')](_0x1aae95)){if(this['channels'][_0x4e9b98[_0xa78e('0x24')]][_0x1aae95][_0xa78e('0x42')]==_0xa78e('0x4e')&&this[_0xa78e('0x25')][_0x4e9b98[_0xa78e('0x24')]][_0x1aae95][_0xa78e('0x14')]){this[_0xa78e('0x25')][_0x4e9b98[_0xa78e('0x24')]][_0x1aae95]['agentcompleteAt']=moment()[_0xa78e('0x2e')](_0xa78e('0x27'));}}}ami[_0xa78e('0x20')](_0xa78e('0x65'),_[_0xa78e('0x66')](this['channels'][_0x4e9b98[_0xa78e('0x24')]]));delete this['channels'][_0x4e9b98['uniqueid']];}if(this['variables'][_0x4e9b98['uniqueid']]){delete this[_0xa78e('0xd')][_0x4e9b98[_0xa78e('0x24')]];}}}catch(_0x2039ec){logger[_0xa78e('0x31')](_0xa78e('0x67'),util[_0xa78e('0x33')](_0x2039ec,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x1d')]=function(_0x5f4341){try{if(this[_0xa78e('0x22')](_0x5f4341)){if(this['channels'][_0x5f4341[_0xa78e('0x68')]]){for(var _0x1a026d in this['channels'][_0x5f4341[_0xa78e('0x68')]]){if(this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x68')]][_0xa78e('0x34')](_0x1a026d)){if(_0x5f4341[_0xa78e('0x69')]===_0x1a026d){var _0x27c705=moment();this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x68')]][_0x1a026d][_0xa78e('0x14')]=!![];this[_0xa78e('0x25')][_0x5f4341['transfereeuniqueid']][_0x1a026d][_0xa78e('0x4c')]=moment()['format'](_0xa78e('0x27'));this['channels'][_0x5f4341[_0xa78e('0x68')]][_0x1a026d]['reason']=_0xa78e('0x4e');this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x68')]][_0x1a026d][_0xa78e('0x36')]=_0xa78e('0x6a');this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x68')]][_0x1a026d][_0xa78e('0x4d')]=_0x27c705[_0xa78e('0x6b')](this[_0xa78e('0x25')][_0x5f4341['transfereeuniqueid']][_0x1a026d][_0xa78e('0x35')],'seconds');}}}}if(this['channels'][_0x5f4341[_0xa78e('0x6c')]]){var _0x2b5090=this[_0xa78e('0x25')][_0x5f4341['secondtransfereruniqueid']];this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x6c')]]=this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x68')]];this[_0xa78e('0x25')][_0x5f4341[_0xa78e('0x68')]]=_0x2b5090;}}}catch(_0xcc7c5b){logger['error'](_0xa78e('0x6d'),util[_0xa78e('0x33')](_0xcc7c5b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x1f')]=function(_0x21a085){try{if(this[_0xa78e('0x22')](_0x21a085)){if(this[_0xa78e('0x25')][_0x21a085[_0xa78e('0x68')]]){for(var _0xde4b15 in this[_0xa78e('0x25')][_0x21a085['transfereeuniqueid']]){if(this[_0xa78e('0x25')][_0x21a085[_0xa78e('0x68')]][_0xa78e('0x34')](_0xde4b15)){if(_0x21a085[_0xa78e('0x6e')]===_0xde4b15){var _0x3f8241=moment();this[_0xa78e('0x25')][_0x21a085['transfereeuniqueid']][_0xde4b15][_0xa78e('0x14')]=!![];this[_0xa78e('0x25')][_0x21a085['transfereeuniqueid']][_0xde4b15][_0xa78e('0x4c')]=_0x3f8241;this[_0xa78e('0x25')][_0x21a085[_0xa78e('0x68')]][_0xde4b15][_0xa78e('0x42')]='transfer';this[_0xa78e('0x25')][_0x21a085[_0xa78e('0x68')]][_0xde4b15][_0xa78e('0x36')]=_0xa78e('0x6a');this[_0xa78e('0x25')][_0x21a085[_0xa78e('0x68')]][_0xde4b15][_0xa78e('0x4d')]=_0x3f8241[_0xa78e('0x6b')](this[_0xa78e('0x25')][_0x21a085[_0xa78e('0x68')]][_0xde4b15][_0xa78e('0x35')],'seconds');}}}}}}catch(_0x23b50a){logger['error'](_0xa78e('0x6f'),util[_0xa78e('0x33')](_0x23b50a,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')]['syncMusicOnHoldStart']=function(_0x52c668){var _0x2112ee='';try{if(this[_0xa78e('0x22')](_0x52c668)){if(_0x52c668[_0xa78e('0x70')]){_0x2112ee=_0x52c668['channel'][_0xa78e('0x71')](0x0,_0x52c668[_0xa78e('0x70')][_0xa78e('0x72')]('-'));if(this[_0xa78e('0xc')][_0x2112ee]){this[_0xa78e('0xc')][_0x2112ee]['onhold']=!![];}}}}catch(_0x1338cb){logger[_0xa78e('0x31')](_0xa78e('0x73'),util[_0xa78e('0x33')](_0x1338cb,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xa78e('0x21')][_0xa78e('0x1b')]=function(_0x29b7dc){var _0x53001c='';try{if(this[_0xa78e('0x22')](_0x29b7dc)){if(_0x29b7dc['channel']){_0x53001c=_0x29b7dc['channel'][_0xa78e('0x71')](0x0,_0x29b7dc[_0xa78e('0x70')][_0xa78e('0x72')]('-'));if(this[_0xa78e('0xc')][_0x53001c]){this['agents'][_0x53001c][_0xa78e('0x74')]=![];}}}}catch(_0x3cfe74){logger[_0xa78e('0x31')](_0xa78e('0x75'),util[_0xa78e('0x33')](_0x3cfe74,{'showHidden':![],'depth':null}));}};module[_0xa78e('0x76')]=VoiceAgentReport;
\ No newline at end of file
diff --git a/server/services/ami/report/voiceCallReport.js b/server/services/ami/report/voiceCallReport.js
index 9f9fa14..5375092 100644
--- a/server/services/ami/report/voiceCallReport.js
+++ b/server/services/ami/report/voiceCallReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf187=['subtract','duration','seconds','YYYY-MM-DD\x20HH:mm:ss','includes','startsWith','cdr(','match','queue','[syncNewExten][VoiceCallReport]','answered','answertime','starttime','holdtime','diff','calleridnum','connectedlinenum','destinationchannel','UserId','membername','[syncNewState][VoiceCallReport]','monitor','replace','.wav49','.WAV','find','monitors','isNil','rec','variable','mixmonitor_filename','syncMixMonitorFilename','value','xmd-phone','xmd-callerid','callerid','xmd-cdrtype','type','xmd-queue','xmd-originatecalleridnum','xmd-destination','destination','xmd-callerid-preview','calleridpreview','xmcs-queue','sipcallid','parse','sipcalllinkedid','[syncVarSet][VoiceCallReport]','endtime','billableseconds','omit','user:agentcomplete','[syncHangup][VoiceCallReport]','transfereeuniqueid','transferconnectedlinenum','transfertargetcalleridnum','secondtransfereruniqueid','transfertargetuniqueid','transfercalleridnum','origtransferercalleridnum','origtransfereruniqueid','[syncAttendedTransfer][VoiceCallReport]','extension','transfererchannel','[syncBlindTransfer][VoiceCallReport]','mohstarttime','[syncMusicOnHoldStart][VoiceCallReport]','mohtime','milliseconds','exports','lodash','moment','util','path','ioredis','../../../config/environment','../../../config/logger','ami','not_inuse','inuse','busy','invalid','unavailable','ringing','onhold','set','dial','playback','voicemail','NO\x20ANSWER','FAILED','defaults','socket.io-emitter','redis','channels','agents','syncNewExten','bind','newchannel','newstate','syncNewState','syncVarSet','hangup','syncHangup','newcallerid','syncNewCallerId','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','syncMusicOnHoldStop','resolve','then','catch','log','prototype','isNotNull','isUndefined','uniqueid','merge','pick','keys','error','[syncNewCallerId][VoiceCallReport]','inspect','syncNewChannel','linkedid','OutgoingSpoolFailed','format','disposition','toNumber','channelstate','context','from-sip','channel','split','emit','user:%s','name','accountcode','exten','[syncNewChannel][VoiceCallReport]','application','toLowerCase','applicationdata','appdata'];(function(_0x1f17f8,_0x524a04){var _0x544741=function(_0x266e28){while(--_0x266e28){_0x1f17f8['push'](_0x1f17f8['shift']());}};_0x544741(++_0x524a04);}(_0xf187,0xdc));var _0x7f18=function(_0xc3a7b1,_0x352267){_0xc3a7b1=_0xc3a7b1-0x0;var _0x3bf76d=_0xf187[_0xc3a7b1];return _0x3bf76d;};'use strict';var BPromise=require('bluebird');var _=require(_0x7f18('0x0'));var moment=require(_0x7f18('0x1'));var util=require(_0x7f18('0x2'));var path=require(_0x7f18('0x3'));var Redis=require(_0x7f18('0x4'));var config=require(_0x7f18('0x5'));var logger=require(_0x7f18('0x6'))(_0x7f18('0x7'));var ami=require('../ami');var Channel=require('../model/channel');var statusDesc=['unknown',_0x7f18('0x8'),_0x7f18('0x9'),_0x7f18('0xa'),_0x7f18('0xb'),_0x7f18('0xc'),_0x7f18('0xd'),'ringinuse',_0x7f18('0xe')];var applications=[_0x7f18('0xf'),'queue','agi',_0x7f18('0x10'),_0x7f18('0x11'),_0x7f18('0x12')];var dispositions=[_0x7f18('0x13'),'FAILED',_0x7f18('0x14'),_0x7f18('0x13'),_0x7f18('0x13'),_0x7f18('0x13'),'ANSWERED','BUSY',_0x7f18('0x14'),_0x7f18('0x14'),_0x7f18('0x14')];var actions={};config['redis']=_[_0x7f18('0x15')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x7f18('0x16'))(new Redis(config[_0x7f18('0x17')]));function VoiceCallReport(_0x2dec63){this[_0x7f18('0x18')]=_0x2dec63[_0x7f18('0x18')];this[_0x7f18('0x19')]=_0x2dec63[_0x7f18('0x19')];ami['on']('coreshowchannel',this[_0x7f18('0x1a')][_0x7f18('0x1b')](this));ami['on']('newexten',this['syncNewExten'][_0x7f18('0x1b')](this));ami['on'](_0x7f18('0x1c'),this['syncNewChannel'][_0x7f18('0x1b')](this));ami['on'](_0x7f18('0x1d'),this[_0x7f18('0x1e')][_0x7f18('0x1b')](this));ami['on']('varset',this[_0x7f18('0x1f')]['bind'](this));ami['on'](_0x7f18('0x20'),this[_0x7f18('0x21')][_0x7f18('0x1b')](this));ami['on'](_0x7f18('0x22'),this[_0x7f18('0x23')]['bind'](this));ami['on'](_0x7f18('0x24'),this[_0x7f18('0x25')][_0x7f18('0x1b')](this));ami['on'](_0x7f18('0x26'),this[_0x7f18('0x27')][_0x7f18('0x1b')](this));ami['on'](_0x7f18('0x28'),this[_0x7f18('0x29')][_0x7f18('0x1b')](this));ami['on']('musiconholdstop',this[_0x7f18('0x2a')]['bind'](this));return BPromise[_0x7f18('0x2b')]()[_0x7f18('0x2c')](ami['actionCoreShowChannels']())[_0x7f18('0x2d')](function(_0x5d45dc){console[_0x7f18('0x2e')](_0x5d45dc);});}VoiceCallReport[_0x7f18('0x2f')][_0x7f18('0x30')]=function(_0x547add){return _0x547add!==null&&!_[_0x7f18('0x31')](_0x547add);};VoiceCallReport[_0x7f18('0x2f')]['emit']=function(_0x48c305,_0x1f9c98,_0x47ebad){io['to'](_0x48c305)['emit'](_0x1f9c98,_0x47ebad);};VoiceCallReport['prototype'][_0x7f18('0x23')]=function(_0x49c0b7){try{if(this[_0x7f18('0x30')](_0x49c0b7)){if(_0x49c0b7[_0x7f18('0x32')]===_0x49c0b7['linkedid']){if(!_[_0x7f18('0x31')](this[_0x7f18('0x18')][_0x49c0b7[_0x7f18('0x32')]])){_[_0x7f18('0x33')](this[_0x7f18('0x18')][_0x49c0b7[_0x7f18('0x32')]],_[_0x7f18('0x34')](_0x49c0b7,_[_0x7f18('0x35')](this[_0x7f18('0x18')][_0x49c0b7[_0x7f18('0x32')]])));}}}}catch(_0x533db9){logger[_0x7f18('0x36')](_0x7f18('0x37'),util[_0x7f18('0x38')](_0x533db9,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')][_0x7f18('0x39')]=function(_0x2deeb9){try{if(this[_0x7f18('0x30')](_0x2deeb9)){if(_0x2deeb9['uniqueid']===_0x2deeb9[_0x7f18('0x3a')]&&_0x2deeb9['channel']!=_0x7f18('0x3b')){if(_[_0x7f18('0x31')](this['channels'][_0x2deeb9[_0x7f18('0x32')]])){this[_0x7f18('0x18')][_0x2deeb9[_0x7f18('0x32')]]=new Channel();this['channels'][_0x2deeb9[_0x7f18('0x32')]]['starttime']=moment()[_0x7f18('0x3c')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x2deeb9[_0x7f18('0x32')]][_0x7f18('0x3d')]=dispositions[_[_0x7f18('0x3e')](_0x2deeb9[_0x7f18('0x3f')])];_['merge'](this['channels'][_0x2deeb9['uniqueid']],_[_0x7f18('0x34')](_0x2deeb9,_[_0x7f18('0x35')](this[_0x7f18('0x18')][_0x2deeb9['uniqueid']])));if(_0x2deeb9[_0x7f18('0x40')]===_0x7f18('0x41')){if(this[_0x7f18('0x19')][_0x2deeb9[_0x7f18('0x42')]['split']('-')[0x0]]){this[_0x7f18('0x19')][_0x2deeb9[_0x7f18('0x42')][_0x7f18('0x43')]('-')[0x0]]['destconnectedlinenum']=_0x2deeb9['exten'];this[_0x7f18('0x44')](util[_0x7f18('0x3c')](_0x7f18('0x45'),this[_0x7f18('0x19')][_0x2deeb9['channel']['split']('-')[0x0]][_0x7f18('0x46')]),'user:agentconnect',{'destaccountcode':this['agents'][_0x2deeb9[_0x7f18('0x42')]['split']('-')[0x0]][_0x7f18('0x47')],'destconnectedlinenum':_0x2deeb9[_0x7f18('0x48')]});}}}}}}catch(_0x1dbf68){logger[_0x7f18('0x36')](_0x7f18('0x49'),util[_0x7f18('0x38')](_0x1dbf68,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncNewExten']=function(_0x1ac9d1){try{if(this[_0x7f18('0x30')](_0x1ac9d1)){if(_0x1ac9d1[_0x7f18('0x32')]===_0x1ac9d1[_0x7f18('0x3a')]&&_0x1ac9d1[_0x7f18('0x48')]!='h'&&_0x1ac9d1[_0x7f18('0x42')]!='OutgoingSpoolFailed'){_0x1ac9d1['application']=_0x1ac9d1[_0x7f18('0x4a')][_0x7f18('0x4b')]();_0x1ac9d1[_0x7f18('0x4c')]=(_0x1ac9d1[_0x7f18('0x4d')]||_0x1ac9d1[_0x7f18('0x4c')])['toLowerCase']();if(_[_0x7f18('0x31')](this[_0x7f18('0x18')][_0x1ac9d1[_0x7f18('0x32')]])){this[_0x7f18('0x18')][_0x1ac9d1[_0x7f18('0x32')]]=new Channel();this['channels'][_0x1ac9d1[_0x7f18('0x32')]]['starttime']=_0x1ac9d1['duration']?moment()[_0x7f18('0x4e')](moment['duration'](_0x1ac9d1[_0x7f18('0x4f')])[_0x7f18('0x50')](),'seconds')['format'](_0x7f18('0x51')):moment()[_0x7f18('0x3c')](_0x7f18('0x51'));this[_0x7f18('0x18')][_0x1ac9d1['uniqueid']][_0x7f18('0x3d')]=_0x7f18('0x13');}_[_0x7f18('0x33')](this[_0x7f18('0x18')][_0x1ac9d1[_0x7f18('0x32')]],_['pick'](_0x1ac9d1,_['keys'](this['channels'][_0x1ac9d1[_0x7f18('0x32')]])));if(_[_0x7f18('0x52')](applications,_0x1ac9d1['application'])){this[_0x7f18('0x18')][_0x1ac9d1[_0x7f18('0x32')]]['lastapplication']=_0x1ac9d1[_0x7f18('0x4a')];this['channels'][_0x1ac9d1[_0x7f18('0x32')]]['lastdata']=_0x1ac9d1[_0x7f18('0x4c')];if(_0x1ac9d1[_0x7f18('0x4a')]===_0x7f18('0xf')&&_[_0x7f18('0x53')](_0x1ac9d1['applicationdata'],_0x7f18('0x54'))){var _0x2806df=_0x1ac9d1[_0x7f18('0x4c')][_0x7f18('0x43')]('=');var _0x38b241=_0x2806df[0x0][_0x7f18('0x55')](/cdr\((.*)\)/);if(_0x38b241){this[_0x7f18('0x18')][_0x1ac9d1[_0x7f18('0x32')]][_0x38b241[0x1]]=_0x2806df[0x1];}}else if(_0x1ac9d1[_0x7f18('0x4a')]===_0x7f18('0x56')){this[_0x7f18('0x18')][_0x1ac9d1[_0x7f18('0x32')]][_0x7f18('0x56')]=_0x1ac9d1[_0x7f18('0x4c')][_0x7f18('0x43')](',')[0x0];}}}}}catch(_0x25e76b){logger[_0x7f18('0x36')](_0x7f18('0x57'),util['inspect'](_0x25e76b,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')][_0x7f18('0x1e')]=function(_0x12c7f5){try{if(this[_0x7f18('0x30')](_0x12c7f5)){if(_0x12c7f5['uniqueid']!==_0x12c7f5[_0x7f18('0x3a')]){if(this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]]){if(_0x12c7f5['channelstate']==='6'){if(!this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]]['answered']){var _0x3b6c6b=moment();this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]][_0x7f18('0x58')]=!![];this[_0x7f18('0x18')][_0x12c7f5['linkedid']][_0x7f18('0x59')]=_0x3b6c6b[_0x7f18('0x3c')](_0x7f18('0x51'));if(this[_0x7f18('0x18')][_0x12c7f5['linkedid']][_0x7f18('0x5a')]){this['channels'][_0x12c7f5[_0x7f18('0x3a')]][_0x7f18('0x5b')]=_0x3b6c6b[_0x7f18('0x5c')](this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]][_0x7f18('0x5a')],_0x7f18('0x50'));}}this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]][_0x7f18('0x3a')]=_0x12c7f5[_0x7f18('0x32')];if(_0x12c7f5[_0x7f18('0x5d')]!=='xcally-motion-preview'){this[_0x7f18('0x18')][_0x12c7f5['linkedid']][_0x7f18('0x5e')]=_0x12c7f5[_0x7f18('0x5d')];}this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]]['connectedlinename']=_0x12c7f5['calleridname'];this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]][_0x7f18('0x5f')]=_0x12c7f5[_0x7f18('0x42')];this[_0x7f18('0x18')][_0x12c7f5['linkedid']]['disposition']=dispositions[_['toNumber'](_0x12c7f5[_0x7f18('0x3f')])];if(this['agents'][_0x12c7f5['channel']['split']('-')[0x0]]){this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x3a')]][_0x7f18('0x60')]=this[_0x7f18('0x19')][_0x12c7f5['channel'][_0x7f18('0x43')]('-')[0x0]]['id'];this[_0x7f18('0x18')][_0x12c7f5['linkedid']][_0x7f18('0x61')]=this[_0x7f18('0x19')][_0x12c7f5[_0x7f18('0x42')]['split']('-')[0x0]][_0x7f18('0x46')];}}}}else{if(this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x32')]]){if(_0x12c7f5[_0x7f18('0x3f')]==='6'){if(this[_0x7f18('0x19')][_0x12c7f5[_0x7f18('0x42')][_0x7f18('0x43')]('-')[0x0]]){this['channels'][_0x12c7f5[_0x7f18('0x32')]][_0x7f18('0x60')]=this['agents'][_0x12c7f5['channel'][_0x7f18('0x43')]('-')[0x0]]['id'];this[_0x7f18('0x18')][_0x12c7f5[_0x7f18('0x32')]][_0x7f18('0x61')]=this[_0x7f18('0x19')][_0x12c7f5[_0x7f18('0x42')][_0x7f18('0x43')]('-')[0x0]][_0x7f18('0x46')];}}}}}}catch(_0x24b73c){logger[_0x7f18('0x36')](_0x7f18('0x62'),util['inspect'](_0x24b73c,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')]['syncMixMonitorFilename']=function(_0x3dbc6a,_0x3607e8){if(this[_0x7f18('0x18')][_0x3dbc6a]){this[_0x7f18('0x18')][_0x3dbc6a][_0x7f18('0x63')]=!![];if(_['endsWith'](_0x3607e8,'.wav49')){_0x3607e8=_0x3607e8[_0x7f18('0x64')](_0x7f18('0x65'),_0x7f18('0x66'));}this[_0x7f18('0x18')][_0x3dbc6a]['monitorFilename']=_0x3607e8;var _0x507567=_[_0x7f18('0x67')](this[_0x7f18('0x18')][_0x3dbc6a][_0x7f18('0x68')],{'filename':_0x3607e8});if(_[_0x7f18('0x69')](_0x507567)){this[_0x7f18('0x18')][_0x3dbc6a][_0x7f18('0x68')]['push']({'filename':_0x3607e8,'createdAt':moment()['format'](_0x7f18('0x51')),'mixmonitorid':'','status':_0x7f18('0x6a')});}}};VoiceCallReport[_0x7f18('0x2f')]['syncVarSet']=function(_0x209250){try{if(this[_0x7f18('0x30')](_0x209250)){if(this[_0x7f18('0x18')][_0x209250[_0x7f18('0x32')]]&&_0x209250[_0x7f18('0x42')]!='OutgoingSpoolFailed'){if(this['isNotNull'](_0x209250['variable'])){if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x6c')])){this[_0x7f18('0x6d')](_0x209250['uniqueid'],_0x209250[_0x7f18('0x6e')]);}else if(this[_0x7f18('0x30')](_0x209250['variable'][_0x7f18('0x6f')])){this['channels'][_0x209250[_0x7f18('0x32')]][_0x7f18('0x5d')]=_0x209250['value'];}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x70')])){this[_0x7f18('0x18')][_0x209250['uniqueid']][_0x7f18('0x71')]=_0x209250['value'];}else if(this['isNotNull'](_0x209250['variable'][_0x7f18('0x72')])){this['channels'][_0x209250[_0x7f18('0x32')]][_0x7f18('0x73')]=_0x209250[_0x7f18('0x6e')];}else if(this['isNotNull'](_0x209250[_0x7f18('0x6b')][_0x7f18('0x74')])){this[_0x7f18('0x18')][_0x209250[_0x7f18('0x32')]][_0x7f18('0x56')]=_0x209250[_0x7f18('0x6e')][_0x7f18('0x43')](',')[0x0];}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x75')])){this[_0x7f18('0x18')][_0x209250[_0x7f18('0x32')]]['originatecalleridnum']=_0x209250[_0x7f18('0x6e')];}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x76')])){this[_0x7f18('0x18')][_0x209250[_0x7f18('0x32')]][_0x7f18('0x77')]=_0x209250['value'];}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x78')])){this[_0x7f18('0x18')][_0x209250[_0x7f18('0x32')]][_0x7f18('0x79')]=_0x209250[_0x7f18('0x6e')];}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x7a')])){this['channels'][_0x209250[_0x7f18('0x32')]]['queue']=_0x209250[_0x7f18('0x6e')];}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x7b')])){this[_0x7f18('0x18')][_0x209250['uniqueid']]['sipcalluniqueid']=_0x209250[_0x7f18('0x6e')];}}}else if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')][_0x7f18('0x6c')])){if(_0x209250['value']){var _0xd5e838=path[_0x7f18('0x7c')](_0x209250[_0x7f18('0x6e')])['name'];this[_0x7f18('0x6d')](_0xd5e838,_0x209250[_0x7f18('0x6e')]);}}else if(this[_0x7f18('0x18')][_0x209250['linkedid']]){if(this[_0x7f18('0x30')](_0x209250[_0x7f18('0x6b')])){if(this['isNotNull'](_0x209250[_0x7f18('0x6b')][_0x7f18('0x7b')])){this[_0x7f18('0x18')][_0x209250[_0x7f18('0x3a')]][_0x7f18('0x7d')]=_0x209250[_0x7f18('0x6e')];}}}}}catch(_0x1c041f){logger[_0x7f18('0x36')](_0x7f18('0x7e'),util[_0x7f18('0x38')](_0x1c041f,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7f18('0x21')]=function(_0x56e9ac){try{if(this['isNotNull'](_0x56e9ac)){if(this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]]){var _0x357cc0=moment();this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]][_0x7f18('0x7f')]=_0x357cc0[_0x7f18('0x3c')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x7f18('0x18')][_0x56e9ac['uniqueid']][_0x7f18('0x4f')]=_0x357cc0[_0x7f18('0x5c')](this[_0x7f18('0x18')][_0x56e9ac['uniqueid']][_0x7f18('0x5a')],_0x7f18('0x50'));if(this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]][_0x7f18('0x58')]){this['channels'][_0x56e9ac[_0x7f18('0x32')]][_0x7f18('0x80')]=_0x357cc0['diff'](this['channels'][_0x56e9ac[_0x7f18('0x32')]][_0x7f18('0x59')],_0x7f18('0x50'));this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]]['holdtime']=this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]]['duration']-this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]][_0x7f18('0x80')];}if(_0x56e9ac[_0x7f18('0x40')]===_0x7f18('0x41')){if(this[_0x7f18('0x19')][_0x56e9ac[_0x7f18('0x42')][_0x7f18('0x43')]('-')[0x0]]){this['agents'][_0x56e9ac[_0x7f18('0x42')][_0x7f18('0x43')]('-')[0x0]]=_[_0x7f18('0x81')](this[_0x7f18('0x19')][_0x56e9ac[_0x7f18('0x42')][_0x7f18('0x43')]('-')[0x0]],['destconnectedlinenum']);this[_0x7f18('0x44')](util[_0x7f18('0x3c')](_0x7f18('0x45'),this[_0x7f18('0x19')][_0x56e9ac[_0x7f18('0x42')]['split']('-')[0x0]][_0x7f18('0x46')]),_0x7f18('0x82'),{'destaccountcode':this[_0x7f18('0x19')][_0x56e9ac[_0x7f18('0x42')]['split']('-')[0x0]][_0x7f18('0x47')]});}}ami[_0x7f18('0x44')]('custom:voiceCallReport',this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]]);delete this[_0x7f18('0x18')][_0x56e9ac[_0x7f18('0x32')]];}}}catch(_0x10b688){logger[_0x7f18('0x36')](_0x7f18('0x83'),util[_0x7f18('0x38')](_0x10b688,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')]['syncAttendedTransfer']=function(_0x1d5370){try{if(this['isNotNull'](_0x1d5370)){if(this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x84')]]){this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x84')]]['transfercalleridnum']=_0x1d5370['origtransferercalleridnum'];this['channels'][_0x1d5370['transfereeuniqueid']][_0x7f18('0x85')]=_0x1d5370[_0x7f18('0x86')];if(this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x87')]]){var _0x53e64c=this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x87')]];this['channels'][_0x1d5370['secondtransfereruniqueid']]=this[_0x7f18('0x18')][_0x1d5370['transfereeuniqueid']];this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x84')]]=_0x53e64c;}}else if(this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x88')]]){this[_0x7f18('0x18')][_0x1d5370['transfertargetuniqueid']][_0x7f18('0x89')]=_0x1d5370[_0x7f18('0x8a')];this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x88')]]['transferconnectedlinenum']=_0x1d5370[_0x7f18('0x86')];if(this['channels'][_0x1d5370[_0x7f18('0x8b')]]){var _0x53e64c=this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x8b')]];this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x8b')]]=this[_0x7f18('0x18')][_0x1d5370[_0x7f18('0x88')]];this['channels'][_0x1d5370[_0x7f18('0x88')]]=_0x53e64c;}}}}catch(_0x14ec78){logger[_0x7f18('0x36')](_0x7f18('0x8c'),util['inspect'](_0x14ec78,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')]['syncBlindTransfer']=function(_0x138d94){try{if(this[_0x7f18('0x30')](_0x138d94)){if(this['channels'][_0x138d94[_0x7f18('0x84')]]){this[_0x7f18('0x18')][_0x138d94['transfereeuniqueid']]['transfercalleridnum']=_0x138d94['transfereecalleridnum'];this['channels'][_0x138d94[_0x7f18('0x84')]][_0x7f18('0x85')]=_0x138d94[_0x7f18('0x8d')];this['syncHangup']({'event':'BlindTransfer','uniqueid':_0x138d94['transfereeuniqueid'],'context':_0x138d94[_0x7f18('0x40')],'channel':_0x138d94[_0x7f18('0x8e')]});}}}catch(_0x8e4475){logger[_0x7f18('0x36')](_0x7f18('0x8f'),util[_0x7f18('0x38')](_0x8e4475,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')][_0x7f18('0x29')]=function(_0xc8e01a){try{if(this['isNotNull'](_0xc8e01a)){if(this[_0x7f18('0x18')][_0xc8e01a[_0x7f18('0x32')]]){if(!_['isNil'](this[_0x7f18('0x18')][_0xc8e01a[_0x7f18('0x32')]][_0x7f18('0x59')])){this[_0x7f18('0x18')][_0xc8e01a['uniqueid']][_0x7f18('0x90')]=moment()[_0x7f18('0x3c')](_0x7f18('0x51'));}}}}catch(_0x6ee958){logger[_0x7f18('0x36')](_0x7f18('0x91'),util[_0x7f18('0x38')](_0x6ee958,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7f18('0x2f')][_0x7f18('0x2a')]=function(_0x424e57){try{if(this[_0x7f18('0x30')](_0x424e57)){if(this['channels'][_0x424e57[_0x7f18('0x32')]]){if(!_[_0x7f18('0x69')](this['channels'][_0x424e57[_0x7f18('0x32')]]['mohstarttime'])){this[_0x7f18('0x18')][_0x424e57[_0x7f18('0x32')]][_0x7f18('0x92')]+=moment()[_0x7f18('0x93')](0x0)[_0x7f18('0x5c')](this[_0x7f18('0x18')][_0x424e57['uniqueid']][_0x7f18('0x90')],_0x7f18('0x50'));delete this[_0x7f18('0x18')][_0x424e57['uniqueid']]['mohstarttime'];}}}}catch(_0x15e9b8){logger[_0x7f18('0x36')]('[syncMusicOnHoldStop][VoiceCallReport]',util[_0x7f18('0x38')](_0x15e9b8,{'showHidden':![],'depth':null}));}};module[_0x7f18('0x94')]=VoiceCallReport;
\ No newline at end of file
+var _0x706c=['not_inuse','inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','set','agi','dial','playback','voicemail','NO\x20ANSWER','FAILED','ANSWERED','BUSY','redis','defaults','localhost','socket.io-emitter','channels','agents','coreshowchannel','syncNewExten','bind','newexten','newchannel','newstate','syncNewState','varset','syncVarSet','syncNewCallerId','attendedtransfer','syncAttendedTransfer','blindtransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','resolve','then','actionCoreShowChannels','catch','prototype','isNotNull','isUndefined','uniqueid','merge','keys','error','[syncNewCallerId][VoiceCallReport]','inspect','syncNewChannel','linkedid','channel','OutgoingSpoolFailed','starttime','format','disposition','toNumber','channelstate','context','from-sip','split','destconnectedlinenum','exten','emit','user:%s','name','user:agentconnect','accountcode','[syncNewChannel][VoiceCallReport]','application','toLowerCase','applicationdata','appdata','subtract','duration','seconds','YYYY-MM-DD\x20HH:mm:ss','pick','lastapplication','lastdata','startsWith','cdr(','match','queue','[syncNewExten][VoiceCallReport]','answered','diff','xcally-motion-preview','connectedlinename','calleridname','destinationchannel','UserId','membername','[syncNewState][VoiceCallReport]','syncMixMonitorFilename','monitor','endsWith','.wav49','replace','monitorFilename','find','monitors','push','rec','variable','value','calleridnum','xmd-callerid','callerid','type','xmd-queue','xmd-originatecalleridnum','originatecalleridnum','xmd-destination','destination','xmd-callerid-preview','calleridpreview','xmcs-queue','sipcallid','sipcalluniqueid','mixmonitor_filename','parse','[syncVarSet][VoiceCallReport]','syncHangup','billableseconds','answertime','omit','[syncHangup][VoiceCallReport]','transfercalleridnum','origtransferercalleridnum','transfereeuniqueid','transferconnectedlinenum','transfertargetcalleridnum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[syncAttendedTransfer][VoiceCallReport]','syncBlindTransfer','BlindTransfer','[syncBlindTransfer][VoiceCallReport]','mohstarttime','[syncMusicOnHoldStart][VoiceCallReport]','syncMusicOnHoldStop','mohtime','milliseconds','[syncMusicOnHoldStop][VoiceCallReport]','exports','bluebird','moment','util','ioredis','../../../config/logger','ami','../model/channel','unknown'];(function(_0x27c335,_0x740a6){var _0x18ed37=function(_0x46e250){while(--_0x46e250){_0x27c335['push'](_0x27c335['shift']());}};_0x18ed37(++_0x740a6);}(_0x706c,0x1d2));var _0xc706=function(_0x525d78,_0x14175d){_0x525d78=_0x525d78-0x0;var _0x4c203d=_0x706c[_0x525d78];return _0x4c203d;};'use strict';var BPromise=require(_0xc706('0x0'));var _=require('lodash');var moment=require(_0xc706('0x1'));var util=require(_0xc706('0x2'));var path=require('path');var Redis=require(_0xc706('0x3'));var config=require('../../../config/environment');var logger=require(_0xc706('0x4'))(_0xc706('0x5'));var ami=require('../ami');var Channel=require(_0xc706('0x6'));var statusDesc=[_0xc706('0x7'),_0xc706('0x8'),_0xc706('0x9'),_0xc706('0xa'),_0xc706('0xb'),_0xc706('0xc'),_0xc706('0xd'),_0xc706('0xe'),_0xc706('0xf')];var applications=[_0xc706('0x10'),'queue',_0xc706('0x11'),_0xc706('0x12'),_0xc706('0x13'),_0xc706('0x14')];var dispositions=[_0xc706('0x15'),_0xc706('0x16'),_0xc706('0x16'),_0xc706('0x15'),_0xc706('0x15'),_0xc706('0x15'),_0xc706('0x17'),_0xc706('0x18'),'FAILED',_0xc706('0x16'),_0xc706('0x16')];var actions={};config[_0xc706('0x19')]=_[_0xc706('0x1a')](config[_0xc706('0x19')],{'host':_0xc706('0x1b'),'port':0x18eb});var io=require(_0xc706('0x1c'))(new Redis(config[_0xc706('0x19')]));function VoiceCallReport(_0x5ef17a){this['channels']=_0x5ef17a[_0xc706('0x1d')];this[_0xc706('0x1e')]=_0x5ef17a[_0xc706('0x1e')];ami['on'](_0xc706('0x1f'),this[_0xc706('0x20')][_0xc706('0x21')](this));ami['on'](_0xc706('0x22'),this['syncNewExten'][_0xc706('0x21')](this));ami['on'](_0xc706('0x23'),this['syncNewChannel'][_0xc706('0x21')](this));ami['on'](_0xc706('0x24'),this[_0xc706('0x25')][_0xc706('0x21')](this));ami['on'](_0xc706('0x26'),this[_0xc706('0x27')][_0xc706('0x21')](this));ami['on']('hangup',this['syncHangup'][_0xc706('0x21')](this));ami['on']('newcallerid',this[_0xc706('0x28')][_0xc706('0x21')](this));ami['on'](_0xc706('0x29'),this[_0xc706('0x2a')]['bind'](this));ami['on'](_0xc706('0x2b'),this['syncBlindTransfer']['bind'](this));ami['on'](_0xc706('0x2c'),this[_0xc706('0x2d')][_0xc706('0x21')](this));ami['on'](_0xc706('0x2e'),this['syncMusicOnHoldStop']['bind'](this));return BPromise[_0xc706('0x2f')]()[_0xc706('0x30')](ami[_0xc706('0x31')]())[_0xc706('0x32')](function(_0x4e8e41){console['log'](_0x4e8e41);});}VoiceCallReport[_0xc706('0x33')][_0xc706('0x34')]=function(_0x5447c3){return _0x5447c3!==null&&!_[_0xc706('0x35')](_0x5447c3);};VoiceCallReport[_0xc706('0x33')]['emit']=function(_0x3badce,_0x2a28e9,_0x2dbea9){io['to'](_0x3badce)['emit'](_0x2a28e9,_0x2dbea9);};VoiceCallReport[_0xc706('0x33')][_0xc706('0x28')]=function(_0x186c46){try{if(this[_0xc706('0x34')](_0x186c46)){if(_0x186c46[_0xc706('0x36')]===_0x186c46['linkedid']){if(!_[_0xc706('0x35')](this[_0xc706('0x1d')][_0x186c46[_0xc706('0x36')]])){_[_0xc706('0x37')](this['channels'][_0x186c46[_0xc706('0x36')]],_['pick'](_0x186c46,_[_0xc706('0x38')](this['channels'][_0x186c46[_0xc706('0x36')]])));}}}}catch(_0x6d20f8){logger[_0xc706('0x39')](_0xc706('0x3a'),util[_0xc706('0x3b')](_0x6d20f8,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x3c')]=function(_0x437ba0){try{if(this['isNotNull'](_0x437ba0)){if(_0x437ba0[_0xc706('0x36')]===_0x437ba0[_0xc706('0x3d')]&&_0x437ba0[_0xc706('0x3e')]!=_0xc706('0x3f')){if(_[_0xc706('0x35')](this[_0xc706('0x1d')][_0x437ba0[_0xc706('0x36')]])){this['channels'][_0x437ba0[_0xc706('0x36')]]=new Channel();this['channels'][_0x437ba0[_0xc706('0x36')]][_0xc706('0x40')]=moment()[_0xc706('0x41')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x437ba0[_0xc706('0x36')]][_0xc706('0x42')]=dispositions[_[_0xc706('0x43')](_0x437ba0[_0xc706('0x44')])];_[_0xc706('0x37')](this[_0xc706('0x1d')][_0x437ba0['uniqueid']],_['pick'](_0x437ba0,_[_0xc706('0x38')](this[_0xc706('0x1d')][_0x437ba0[_0xc706('0x36')]])));if(_0x437ba0[_0xc706('0x45')]===_0xc706('0x46')){if(this['agents'][_0x437ba0[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]]){this[_0xc706('0x1e')][_0x437ba0['channel'][_0xc706('0x47')]('-')[0x0]][_0xc706('0x48')]=_0x437ba0[_0xc706('0x49')];this[_0xc706('0x4a')](util['format'](_0xc706('0x4b'),this[_0xc706('0x1e')][_0x437ba0[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]][_0xc706('0x4c')]),_0xc706('0x4d'),{'destaccountcode':this[_0xc706('0x1e')][_0x437ba0[_0xc706('0x3e')]['split']('-')[0x0]][_0xc706('0x4e')],'destconnectedlinenum':_0x437ba0[_0xc706('0x49')]});}}}}}}catch(_0x569d4b){logger[_0xc706('0x39')](_0xc706('0x4f'),util['inspect'](_0x569d4b,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x20')]=function(_0x30683c){try{if(this[_0xc706('0x34')](_0x30683c)){if(_0x30683c[_0xc706('0x36')]===_0x30683c[_0xc706('0x3d')]&&_0x30683c[_0xc706('0x49')]!='h'&&_0x30683c[_0xc706('0x3e')]!=_0xc706('0x3f')){_0x30683c['application']=_0x30683c[_0xc706('0x50')][_0xc706('0x51')]();_0x30683c[_0xc706('0x52')]=(_0x30683c[_0xc706('0x53')]||_0x30683c[_0xc706('0x52')])['toLowerCase']();if(_[_0xc706('0x35')](this[_0xc706('0x1d')][_0x30683c[_0xc706('0x36')]])){this[_0xc706('0x1d')][_0x30683c[_0xc706('0x36')]]=new Channel();this[_0xc706('0x1d')][_0x30683c['uniqueid']]['starttime']=_0x30683c['duration']?moment()[_0xc706('0x54')](moment[_0xc706('0x55')](_0x30683c['duration'])[_0xc706('0x56')](),'seconds')['format'](_0xc706('0x57')):moment()[_0xc706('0x41')](_0xc706('0x57'));this[_0xc706('0x1d')][_0x30683c[_0xc706('0x36')]][_0xc706('0x42')]='NO\x20ANSWER';}_[_0xc706('0x37')](this[_0xc706('0x1d')][_0x30683c[_0xc706('0x36')]],_[_0xc706('0x58')](_0x30683c,_[_0xc706('0x38')](this['channels'][_0x30683c[_0xc706('0x36')]])));if(_['includes'](applications,_0x30683c[_0xc706('0x50')])){this[_0xc706('0x1d')][_0x30683c['uniqueid']][_0xc706('0x59')]=_0x30683c['application'];this[_0xc706('0x1d')][_0x30683c[_0xc706('0x36')]][_0xc706('0x5a')]=_0x30683c['applicationdata'];if(_0x30683c['application']===_0xc706('0x10')&&_[_0xc706('0x5b')](_0x30683c[_0xc706('0x52')],_0xc706('0x5c'))){var _0x4ad521=_0x30683c['applicationdata']['split']('=');var _0x1706a2=_0x4ad521[0x0][_0xc706('0x5d')](/cdr\((.*)\)/);if(_0x1706a2){this['channels'][_0x30683c[_0xc706('0x36')]][_0x1706a2[0x1]]=_0x4ad521[0x1];}}else if(_0x30683c[_0xc706('0x50')]===_0xc706('0x5e')){this[_0xc706('0x1d')][_0x30683c[_0xc706('0x36')]]['queue']=_0x30683c[_0xc706('0x52')][_0xc706('0x47')](',')[0x0];}}}}}catch(_0x422c9a){logger[_0xc706('0x39')](_0xc706('0x5f'),util[_0xc706('0x3b')](_0x422c9a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')]['syncNewState']=function(_0x1d7bf7){try{if(this[_0xc706('0x34')](_0x1d7bf7)){if(_0x1d7bf7[_0xc706('0x36')]!==_0x1d7bf7['linkedid']){if(this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]]){if(_0x1d7bf7[_0xc706('0x44')]==='6'){if(!this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]][_0xc706('0x60')]){var _0x387e6a=moment();this[_0xc706('0x1d')][_0x1d7bf7['linkedid']][_0xc706('0x60')]=!![];this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]]['answertime']=_0x387e6a[_0xc706('0x41')](_0xc706('0x57'));if(this[_0xc706('0x1d')][_0x1d7bf7['linkedid']][_0xc706('0x40')]){this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]]['holdtime']=_0x387e6a[_0xc706('0x61')](this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]][_0xc706('0x40')],_0xc706('0x56'));}}this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]][_0xc706('0x3d')]=_0x1d7bf7[_0xc706('0x36')];if(_0x1d7bf7['calleridnum']!==_0xc706('0x62')){this['channels'][_0x1d7bf7[_0xc706('0x3d')]]['connectedlinenum']=_0x1d7bf7['calleridnum'];}this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]][_0xc706('0x63')]=_0x1d7bf7[_0xc706('0x64')];this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]][_0xc706('0x65')]=_0x1d7bf7[_0xc706('0x3e')];this[_0xc706('0x1d')][_0x1d7bf7['linkedid']][_0xc706('0x42')]=dispositions[_[_0xc706('0x43')](_0x1d7bf7[_0xc706('0x44')])];if(this[_0xc706('0x1e')][_0x1d7bf7[_0xc706('0x3e')]['split']('-')[0x0]]){this[_0xc706('0x1d')][_0x1d7bf7['linkedid']][_0xc706('0x66')]=this[_0xc706('0x1e')][_0x1d7bf7[_0xc706('0x3e')]['split']('-')[0x0]]['id'];this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x3d')]]['membername']=this[_0xc706('0x1e')][_0x1d7bf7[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]][_0xc706('0x4c')];}}}}else{if(this[_0xc706('0x1d')][_0x1d7bf7['uniqueid']]){if(_0x1d7bf7['channelstate']==='6'){if(this[_0xc706('0x1e')][_0x1d7bf7[_0xc706('0x3e')]['split']('-')[0x0]]){this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x36')]]['UserId']=this['agents'][_0x1d7bf7[_0xc706('0x3e')]['split']('-')[0x0]]['id'];this[_0xc706('0x1d')][_0x1d7bf7[_0xc706('0x36')]][_0xc706('0x67')]=this[_0xc706('0x1e')][_0x1d7bf7[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]][_0xc706('0x4c')];}}}}}}catch(_0x58327f){logger[_0xc706('0x39')](_0xc706('0x68'),util['inspect'](_0x58327f,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x69')]=function(_0x413e02,_0x1ce3f3){if(this[_0xc706('0x1d')][_0x413e02]){this['channels'][_0x413e02][_0xc706('0x6a')]=!![];if(_[_0xc706('0x6b')](_0x1ce3f3,_0xc706('0x6c'))){_0x1ce3f3=_0x1ce3f3[_0xc706('0x6d')]('.wav49','.WAV');}this['channels'][_0x413e02][_0xc706('0x6e')]=_0x1ce3f3;var _0x3cbe88=_[_0xc706('0x6f')](this[_0xc706('0x1d')][_0x413e02][_0xc706('0x70')],{'filename':_0x1ce3f3});if(_['isNil'](_0x3cbe88)){this[_0xc706('0x1d')][_0x413e02][_0xc706('0x70')][_0xc706('0x71')]({'filename':_0x1ce3f3,'createdAt':moment()['format'](_0xc706('0x57')),'mixmonitorid':'','status':_0xc706('0x72')});}}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x27')]=function(_0x41fa78){try{if(this[_0xc706('0x34')](_0x41fa78)){if(this['channels'][_0x41fa78[_0xc706('0x36')]]&&_0x41fa78[_0xc706('0x3e')]!=_0xc706('0x3f')){if(this['isNotNull'](_0x41fa78[_0xc706('0x73')])){if(this[_0xc706('0x34')](_0x41fa78[_0xc706('0x73')]['mixmonitor_filename'])){this[_0xc706('0x69')](_0x41fa78[_0xc706('0x36')],_0x41fa78[_0xc706('0x74')]);}else if(this[_0xc706('0x34')](_0x41fa78[_0xc706('0x73')]['xmd-phone'])){this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x36')]][_0xc706('0x75')]=_0x41fa78[_0xc706('0x74')];}else if(this[_0xc706('0x34')](_0x41fa78[_0xc706('0x73')][_0xc706('0x76')])){this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x36')]][_0xc706('0x77')]=_0x41fa78[_0xc706('0x74')];}else if(this['isNotNull'](_0x41fa78['variable']['xmd-cdrtype'])){this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x36')]][_0xc706('0x78')]=_0x41fa78[_0xc706('0x74')];}else if(this[_0xc706('0x34')](_0x41fa78[_0xc706('0x73')][_0xc706('0x79')])){this[_0xc706('0x1d')][_0x41fa78['uniqueid']]['queue']=_0x41fa78['value'][_0xc706('0x47')](',')[0x0];}else if(this[_0xc706('0x34')](_0x41fa78['variable'][_0xc706('0x7a')])){this['channels'][_0x41fa78[_0xc706('0x36')]][_0xc706('0x7b')]=_0x41fa78[_0xc706('0x74')];}else if(this['isNotNull'](_0x41fa78[_0xc706('0x73')][_0xc706('0x7c')])){this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x36')]][_0xc706('0x7d')]=_0x41fa78[_0xc706('0x74')];}else if(this[_0xc706('0x34')](_0x41fa78['variable'][_0xc706('0x7e')])){this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x36')]][_0xc706('0x7f')]=_0x41fa78[_0xc706('0x74')];}else if(this[_0xc706('0x34')](_0x41fa78[_0xc706('0x73')][_0xc706('0x80')])){this[_0xc706('0x1d')][_0x41fa78['uniqueid']][_0xc706('0x5e')]=_0x41fa78[_0xc706('0x74')];}else if(this['isNotNull'](_0x41fa78[_0xc706('0x73')][_0xc706('0x81')])){this[_0xc706('0x1d')][_0x41fa78['uniqueid']][_0xc706('0x82')]=_0x41fa78[_0xc706('0x74')];}}}else if(this['isNotNull'](_0x41fa78[_0xc706('0x73')][_0xc706('0x83')])){if(_0x41fa78[_0xc706('0x74')]){var _0x184b47=path[_0xc706('0x84')](_0x41fa78[_0xc706('0x74')])[_0xc706('0x4c')];this[_0xc706('0x69')](_0x184b47,_0x41fa78['value']);}}else if(this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x3d')]]){if(this[_0xc706('0x34')](_0x41fa78[_0xc706('0x73')])){if(this['isNotNull'](_0x41fa78[_0xc706('0x73')][_0xc706('0x81')])){this[_0xc706('0x1d')][_0x41fa78[_0xc706('0x3d')]]['sipcalllinkedid']=_0x41fa78['value'];}}}}}catch(_0x39f240){logger[_0xc706('0x39')](_0xc706('0x85'),util[_0xc706('0x3b')](_0x39f240,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x86')]=function(_0x7eb5f){try{if(this['isNotNull'](_0x7eb5f)){if(this[_0xc706('0x1d')][_0x7eb5f['uniqueid']]){var _0x4d91ae=moment();this['channels'][_0x7eb5f[_0xc706('0x36')]]['endtime']=_0x4d91ae[_0xc706('0x41')](_0xc706('0x57'));this[_0xc706('0x1d')][_0x7eb5f[_0xc706('0x36')]]['duration']=_0x4d91ae[_0xc706('0x61')](this['channels'][_0x7eb5f[_0xc706('0x36')]]['starttime'],_0xc706('0x56'));if(this[_0xc706('0x1d')][_0x7eb5f['uniqueid']][_0xc706('0x60')]){this[_0xc706('0x1d')][_0x7eb5f[_0xc706('0x36')]][_0xc706('0x87')]=_0x4d91ae[_0xc706('0x61')](this[_0xc706('0x1d')][_0x7eb5f[_0xc706('0x36')]][_0xc706('0x88')],_0xc706('0x56'));this[_0xc706('0x1d')][_0x7eb5f[_0xc706('0x36')]]['holdtime']=this[_0xc706('0x1d')][_0x7eb5f[_0xc706('0x36')]][_0xc706('0x55')]-this['channels'][_0x7eb5f[_0xc706('0x36')]][_0xc706('0x87')];}if(_0x7eb5f[_0xc706('0x45')]===_0xc706('0x46')){if(this[_0xc706('0x1e')][_0x7eb5f[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]]){this[_0xc706('0x1e')][_0x7eb5f[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]]=_[_0xc706('0x89')](this['agents'][_0x7eb5f[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]],['destconnectedlinenum']);this[_0xc706('0x4a')](util[_0xc706('0x41')](_0xc706('0x4b'),this[_0xc706('0x1e')][_0x7eb5f[_0xc706('0x3e')][_0xc706('0x47')]('-')[0x0]][_0xc706('0x4c')]),'user:agentcomplete',{'destaccountcode':this[_0xc706('0x1e')][_0x7eb5f['channel'][_0xc706('0x47')]('-')[0x0]][_0xc706('0x4e')]});}}ami[_0xc706('0x4a')]('custom:voiceCallReport',this['channels'][_0x7eb5f[_0xc706('0x36')]]);delete this[_0xc706('0x1d')][_0x7eb5f[_0xc706('0x36')]];}}}catch(_0x5ef3e6){logger[_0xc706('0x39')](_0xc706('0x8a'),util[_0xc706('0x3b')](_0x5ef3e6,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x2a')]=function(_0x3931e4){try{if(this['isNotNull'](_0x3931e4)){if(this['channels'][_0x3931e4['transfereeuniqueid']]){this[_0xc706('0x1d')][_0x3931e4['transfereeuniqueid']][_0xc706('0x8b')]=_0x3931e4[_0xc706('0x8c')];this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x8d')]][_0xc706('0x8e')]=_0x3931e4[_0xc706('0x8f')];if(this['channels'][_0x3931e4['secondtransfereruniqueid']]){var _0x48b477=this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x90')]];this['channels'][_0x3931e4['secondtransfereruniqueid']]=this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x8d')]];this[_0xc706('0x1d')][_0x3931e4['transfereeuniqueid']]=_0x48b477;}}else if(this['channels'][_0x3931e4['transfertargetuniqueid']]){this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x91')]][_0xc706('0x8b')]=_0x3931e4[_0xc706('0x8c')];this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x91')]][_0xc706('0x8e')]=_0x3931e4[_0xc706('0x8f')];if(this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x92')]]){var _0x48b477=this[_0xc706('0x1d')][_0x3931e4[_0xc706('0x92')]];this[_0xc706('0x1d')][_0x3931e4['origtransfereruniqueid']]=this['channels'][_0x3931e4['transfertargetuniqueid']];this['channels'][_0x3931e4[_0xc706('0x91')]]=_0x48b477;}}}}catch(_0x1f3d23){logger[_0xc706('0x39')](_0xc706('0x93'),util[_0xc706('0x3b')](_0x1f3d23,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x94')]=function(_0x1e811b){try{if(this[_0xc706('0x34')](_0x1e811b)){if(this[_0xc706('0x1d')][_0x1e811b[_0xc706('0x8d')]]){this['channels'][_0x1e811b['transfereeuniqueid']][_0xc706('0x8b')]=_0x1e811b['transfereecalleridnum'];this[_0xc706('0x1d')][_0x1e811b[_0xc706('0x8d')]][_0xc706('0x8e')]=_0x1e811b['extension'];this[_0xc706('0x86')]({'event':_0xc706('0x95'),'uniqueid':_0x1e811b['transfereeuniqueid'],'context':_0x1e811b['context'],'channel':_0x1e811b['transfererchannel']});}}}catch(_0x8171da){logger[_0xc706('0x39')](_0xc706('0x96'),util[_0xc706('0x3b')](_0x8171da,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x2d')]=function(_0xbf1973){try{if(this[_0xc706('0x34')](_0xbf1973)){if(this['channels'][_0xbf1973[_0xc706('0x36')]]){if(!_['isNil'](this[_0xc706('0x1d')][_0xbf1973[_0xc706('0x36')]][_0xc706('0x88')])){this[_0xc706('0x1d')][_0xbf1973[_0xc706('0x36')]][_0xc706('0x97')]=moment()[_0xc706('0x41')](_0xc706('0x57'));}}}}catch(_0x401553){logger['error'](_0xc706('0x98'),util[_0xc706('0x3b')](_0x401553,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0xc706('0x33')][_0xc706('0x99')]=function(_0xfe2cd2){try{if(this[_0xc706('0x34')](_0xfe2cd2)){if(this[_0xc706('0x1d')][_0xfe2cd2[_0xc706('0x36')]]){if(!_['isNil'](this[_0xc706('0x1d')][_0xfe2cd2['uniqueid']][_0xc706('0x97')])){this[_0xc706('0x1d')][_0xfe2cd2[_0xc706('0x36')]][_0xc706('0x9a')]+=moment()[_0xc706('0x9b')](0x0)[_0xc706('0x61')](this[_0xc706('0x1d')][_0xfe2cd2[_0xc706('0x36')]][_0xc706('0x97')],'seconds');delete this[_0xc706('0x1d')][_0xfe2cd2[_0xc706('0x36')]][_0xc706('0x97')];}}}}catch(_0x25c2ea){logger[_0xc706('0x39')](_0xc706('0x9c'),util[_0xc706('0x3b')](_0x25c2ea,{'showHidden':![],'depth':null}));}};module[_0xc706('0x9d')]=VoiceCallReport;
\ No newline at end of file
diff --git a/server/services/ami/report/voiceDialReport.js b/server/services/ami/report/voiceDialReport.js
index 1ca9b7f..bfd3db4 100644
--- a/server/services/ami/report/voiceDialReport.js
+++ b/server/services/ami/report/voiceDialReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfef2=['lastevent','custom:dialconnect','[syncDialEnd][VoiceDialReport]','addVariable','keys','variable','value','[syncVarSet][VoiceDialReport]','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqosrtt','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','membername','memberrealtime','includes','endtime','diff','starttime','seconds','complete','total','answered','billableseconds','outbound','holdtime','sumDuration','duration','voice_outbound:save','voice_outbound_channel:remove','exports','lodash','util','ioredis','../../../config/environment','ami','../ami','defaults','redis','localhost','channels','variables','dialbegin','syncDialBegin','bind','dialend','varset','syncVarSet','hangup','syncHangup','prototype','isNotNull','isUndefined','uniqueid','format','YYYY-MM-DD\x20HH:mm:ss','channel','substring','lastIndexOf','omit','event','privilege','emit','voice:outbound','voice_outbound_channel:save','custom:dialbegin','error','inspect','syncDialEnd','dialstatus','ANSWER','connectedlinenum','connectedlinename','answertime'];(function(_0x799277,_0x574d5f){var _0x56d41f=function(_0x5e009e){while(--_0x5e009e){_0x799277['push'](_0x799277['shift']());}};_0x56d41f(++_0x574d5f);}(_0xfef2,0x1a9));var _0x2fef=function(_0xb4947e,_0x39de27){_0xb4947e=_0xb4947e-0x0;var _0x2af6df=_0xfef2[_0xb4947e];return _0x2af6df;};'use strict';var _=require(_0x2fef('0x0'));var moment=require('moment');var util=require(_0x2fef('0x1'));var Redis=require(_0x2fef('0x2'));var config=require(_0x2fef('0x3'));var logger=require('../../../config/logger')(_0x2fef('0x4'));var ami=require(_0x2fef('0x5'));config['redis']=_[_0x2fef('0x6')](config[_0x2fef('0x7')],{'host':_0x2fef('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x2fef('0x7')]));function VoiceDialReport(_0x54aad0){this[_0x2fef('0x9')]=_0x54aad0['outboundChannels'];this['outbound']=_0x54aad0['outbound'];this[_0x2fef('0xa')]={};ami['on'](_0x2fef('0xb'),this[_0x2fef('0xc')][_0x2fef('0xd')](this));ami['on'](_0x2fef('0xe'),this['syncDialEnd'][_0x2fef('0xd')](this));ami['on'](_0x2fef('0xf'),this[_0x2fef('0x10')]['bind'](this));ami['on'](_0x2fef('0x11'),this[_0x2fef('0x12')][_0x2fef('0xd')](this));}VoiceDialReport[_0x2fef('0x13')][_0x2fef('0x14')]=function(_0x428360){return _0x428360!==null&&!_[_0x2fef('0x15')](_0x428360);};VoiceDialReport[_0x2fef('0x13')]['emit']=function(_0x35f83d,_0x52fdf0,_0x45bd77){io['to'](_0x35f83d)['emit'](_0x52fdf0,_0x45bd77);};VoiceDialReport[_0x2fef('0x13')][_0x2fef('0xc')]=function(_0x1f33a7){try{if(this['isNotNull'](_0x1f33a7)){if(this[_0x2fef('0x9')][_0x1f33a7[_0x2fef('0x16')]]){_['merge'](this[_0x2fef('0x9')][_0x1f33a7['uniqueid']],{'starttime':moment()[_0x2fef('0x17')](_0x2fef('0x18')),'lastevent':'called','interface':_0x1f33a7[_0x2fef('0x19')][_0x2fef('0x1a')](0x0,_0x1f33a7[_0x2fef('0x19')][_0x2fef('0x1b')]('-')),'membername':_0x1f33a7[_0x2fef('0x19')]['substring'](_0x1f33a7[_0x2fef('0x19')][_0x2fef('0x1b')]('/')+0x1,_0x1f33a7[_0x2fef('0x19')][_0x2fef('0x1b')]('-'))},_[_0x2fef('0x1c')](_0x1f33a7,[_0x2fef('0x1d'),_0x2fef('0x1e')]));this[_0x2fef('0x1f')](_0x2fef('0x20'),_0x2fef('0x21'),this[_0x2fef('0x9')][_0x1f33a7[_0x2fef('0x16')]]);ami[_0x2fef('0x1f')](_0x2fef('0x22'),this[_0x2fef('0x9')][_0x1f33a7[_0x2fef('0x16')]]);}}}catch(_0x19ccbd){logger[_0x2fef('0x23')]('[syncDialBegin][VoiceDialReport]',util[_0x2fef('0x24')](_0x19ccbd,{'showHidden':![],'depth':null}));}};VoiceDialReport['prototype'][_0x2fef('0x25')]=function(_0x559b6a){try{if(this[_0x2fef('0x14')](_0x559b6a)){if(this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]]){this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]][_0x2fef('0x26')]=_0x559b6a[_0x2fef('0x26')];if(_0x559b6a[_0x2fef('0x26')]===_0x2fef('0x27')){this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]][_0x2fef('0x28')]=_0x559b6a[_0x2fef('0x28')];this['channels'][_0x559b6a[_0x2fef('0x16')]]['connectedlinename']=_0x559b6a[_0x2fef('0x29')];this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]][_0x2fef('0x2a')]=moment()[_0x2fef('0x17')](_0x2fef('0x18'));this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]][_0x2fef('0x2b')]='connect';ami[_0x2fef('0x1f')](_0x2fef('0x2c'),this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]]);}this[_0x2fef('0x1f')](_0x2fef('0x20'),_0x2fef('0x21'),this[_0x2fef('0x9')][_0x559b6a[_0x2fef('0x16')]]);}}}catch(_0x1bebb4){logger[_0x2fef('0x23')](_0x2fef('0x2d'),util['inspect'](_0x1bebb4,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x2fef('0x13')][_0x2fef('0x10')]=function(_0x4eebc9){try{if(this[_0x2fef('0x14')](_0x4eebc9)){this[_0x2fef('0x2e')](_0x4eebc9[_0x2fef('0x16')],_[_0x2fef('0x2f')](_0x4eebc9[_0x2fef('0x30')])[0x0],_0x4eebc9[_0x2fef('0x31')]);if(this['isNotNull'](_0x4eebc9[_0x2fef('0x30')])&&this['isNotNull'](_0x4eebc9[_0x2fef('0x30')]['outboundrouteid'])){if(_[_0x2fef('0x15')](this[_0x2fef('0x9')][_0x4eebc9[_0x2fef('0x16')]])){this[_0x2fef('0x9')][_0x4eebc9[_0x2fef('0x16')]]={'routeId':_0x4eebc9[_0x2fef('0x31')],'variables':this[_0x2fef('0xa')][_0x4eebc9[_0x2fef('0x16')]]};this[_0x2fef('0x1f')](_0x2fef('0x20'),_0x2fef('0x21'),this['channels'][_0x4eebc9[_0x2fef('0x16')]]);}}}}catch(_0x4f2241){logger[_0x2fef('0x23')](_0x2fef('0x32'),util[_0x2fef('0x24')](_0x4f2241,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x2fef('0x13')][_0x2fef('0x2e')]=function(_0xe2eff3,_0x5bf509,_0x217b2a){var _0x4fbc7d=[_0x2fef('0x33'),'rtpaudioqosbridged',_0x2fef('0x34'),'rtpaudioqosjitterbridged',_0x2fef('0x35'),'rtpaudioqoslossbridged',_0x2fef('0x36'),'rtpaudioqosrttbridged','sipcallid',_0x2fef('0x37'),_0x2fef('0x38'),'bridgepvtcallid',_0x2fef('0x39'),_0x2fef('0x3a'),_0x2fef('0x3b'),'memberlastcall',_0x2fef('0x3c'),'memberpenalty',_0x2fef('0x3d')];if(!_['isNil'](_0x5bf509)&&!_[_0x2fef('0x3e')](_0x4fbc7d,_0x5bf509)){if(_[_0x2fef('0x15')](this[_0x2fef('0xa')][_0xe2eff3])){this[_0x2fef('0xa')][_0xe2eff3]={};}this[_0x2fef('0xa')][_0xe2eff3][_0x5bf509]=_0x217b2a;}};VoiceDialReport['prototype']['syncHangup']=function(_0x3ebfd6){try{if(this[_0x2fef('0x14')](_0x3ebfd6)){if(this['channels'][_0x3ebfd6[_0x2fef('0x16')]]){this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x3f')]=moment()[_0x2fef('0x17')](_0x2fef('0x18'));this['channels'][_0x3ebfd6[_0x2fef('0x16')]]['duration']=moment(this['channels'][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x3f')])[_0x2fef('0x40')](this['channels'][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x41')],_0x2fef('0x42'));this[_0x2fef('0x9')][_0x3ebfd6['uniqueid']][_0x2fef('0x2b')]=_0x2fef('0x43');this['outbound'][_0x2fef('0x44')]+=0x1;if(this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]]['answertime']){this['outbound'][_0x2fef('0x45')]+=0x1;this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]]['holdtime']=moment(this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]]['answertime'])[_0x2fef('0x40')](this[_0x2fef('0x9')][_0x3ebfd6['uniqueid']]['starttime'],_0x2fef('0x42'));this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x46')]=moment(this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x3f')])['diff'](this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]]['answertime'],_0x2fef('0x42'));this[_0x2fef('0x47')]['sumHoldTime']+=this['channels'][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x48')]||0x0;this['outbound']['sumBillable']+=this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x46')];}this[_0x2fef('0x47')][_0x2fef('0x49')]+=this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]][_0x2fef('0x4a')];ami['emit']('custom:voiceDialReport',this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]]);ami[_0x2fef('0x1f')]('custom:dialend',this[_0x2fef('0x9')][_0x3ebfd6['uniqueid']]);this[_0x2fef('0x1f')](_0x2fef('0x20'),_0x2fef('0x4b'),this['outbound']);this['emit'](_0x2fef('0x20'),_0x2fef('0x4c'),this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]]);delete this[_0x2fef('0x9')][_0x3ebfd6[_0x2fef('0x16')]];}if(this[_0x2fef('0xa')][_0x3ebfd6[_0x2fef('0x16')]]){delete this[_0x2fef('0xa')][_0x3ebfd6[_0x2fef('0x16')]];}}}catch(_0x54167e){logger[_0x2fef('0x23')]('[syncHangup][VoiceDialReport]',util['inspect'](_0x54167e,{'showHidden':![],'depth':null}));}};module[_0x2fef('0x4d')]=VoiceDialReport;
\ No newline at end of file
+var _0x2a38=['rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberlastcall','membername','memberpenalty','isNil','includes','endtime','seconds','complete','total','answertime','answered','billableseconds','diff','sumHoldTime','sumBillable','sumDuration','duration','custom:voiceDialReport','custom:dialend','voice_outbound:save','voice_outbound_channel:remove','[syncHangup][VoiceDialReport]','exports','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','../ami','redis','defaults','localhost','channels','outboundChannels','outbound','variables','bind','dialend','syncDialEnd','varset','syncVarSet','syncHangup','isNotNull','isUndefined','prototype','emit','syncDialBegin','uniqueid','merge','format','YYYY-MM-DD\x20HH:mm:ss','called','channel','lastIndexOf','substring','omit','event','privilege','voice:outbound','voice_outbound_channel:save','custom:dialbegin','dialstatus','ANSWER','connectedlinename','lastevent','connect','error','[syncDialEnd][VoiceDialReport]','inspect','addVariable','keys','variable','value','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged'];(function(_0x2f7c45,_0x3060d6){var _0x457bd1=function(_0x130410){while(--_0x130410){_0x2f7c45['push'](_0x2f7c45['shift']());}};_0x457bd1(++_0x3060d6);}(_0x2a38,0xce));var _0x82a3=function(_0x2593f9,_0x1dcece){_0x2593f9=_0x2593f9-0x0;var _0x1117eb=_0x2a38[_0x2593f9];return _0x1117eb;};'use strict';var _=require(_0x82a3('0x0'));var moment=require(_0x82a3('0x1'));var util=require(_0x82a3('0x2'));var Redis=require(_0x82a3('0x3'));var config=require(_0x82a3('0x4'));var logger=require(_0x82a3('0x5'))('ami');var ami=require(_0x82a3('0x6'));config[_0x82a3('0x7')]=_[_0x82a3('0x8')](config[_0x82a3('0x7')],{'host':_0x82a3('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x82a3('0x7')]));function VoiceDialReport(_0x454d13){this[_0x82a3('0xa')]=_0x454d13[_0x82a3('0xb')];this['outbound']=_0x454d13[_0x82a3('0xc')];this[_0x82a3('0xd')]={};ami['on']('dialbegin',this['syncDialBegin'][_0x82a3('0xe')](this));ami['on'](_0x82a3('0xf'),this[_0x82a3('0x10')]['bind'](this));ami['on'](_0x82a3('0x11'),this[_0x82a3('0x12')][_0x82a3('0xe')](this));ami['on']('hangup',this[_0x82a3('0x13')][_0x82a3('0xe')](this));}VoiceDialReport['prototype'][_0x82a3('0x14')]=function(_0x196a01){return _0x196a01!==null&&!_[_0x82a3('0x15')](_0x196a01);};VoiceDialReport[_0x82a3('0x16')]['emit']=function(_0x5aca8b,_0x3ad0f2,_0xb12581){io['to'](_0x5aca8b)[_0x82a3('0x17')](_0x3ad0f2,_0xb12581);};VoiceDialReport['prototype'][_0x82a3('0x18')]=function(_0x2c7778){try{if(this[_0x82a3('0x14')](_0x2c7778)){if(this['channels'][_0x2c7778[_0x82a3('0x19')]]){_[_0x82a3('0x1a')](this['channels'][_0x2c7778[_0x82a3('0x19')]],{'starttime':moment()[_0x82a3('0x1b')](_0x82a3('0x1c')),'lastevent':_0x82a3('0x1d'),'interface':_0x2c7778[_0x82a3('0x1e')]['substring'](0x0,_0x2c7778[_0x82a3('0x1e')][_0x82a3('0x1f')]('-')),'membername':_0x2c7778['channel'][_0x82a3('0x20')](_0x2c7778[_0x82a3('0x1e')][_0x82a3('0x1f')]('/')+0x1,_0x2c7778['channel'][_0x82a3('0x1f')]('-'))},_[_0x82a3('0x21')](_0x2c7778,[_0x82a3('0x22'),_0x82a3('0x23')]));this['emit'](_0x82a3('0x24'),_0x82a3('0x25'),this[_0x82a3('0xa')][_0x2c7778['uniqueid']]);ami[_0x82a3('0x17')](_0x82a3('0x26'),this['channels'][_0x2c7778[_0x82a3('0x19')]]);}}}catch(_0x27c2ad){logger['error']('[syncDialBegin][VoiceDialReport]',util['inspect'](_0x27c2ad,{'showHidden':![],'depth':null}));}};VoiceDialReport['prototype']['syncDialEnd']=function(_0x11ed7d){try{if(this['isNotNull'](_0x11ed7d)){if(this['channels'][_0x11ed7d['uniqueid']]){this[_0x82a3('0xa')][_0x11ed7d[_0x82a3('0x19')]][_0x82a3('0x27')]=_0x11ed7d['dialstatus'];if(_0x11ed7d['dialstatus']===_0x82a3('0x28')){this['channels'][_0x11ed7d[_0x82a3('0x19')]]['connectedlinenum']=_0x11ed7d['connectedlinenum'];this[_0x82a3('0xa')][_0x11ed7d[_0x82a3('0x19')]][_0x82a3('0x29')]=_0x11ed7d[_0x82a3('0x29')];this[_0x82a3('0xa')][_0x11ed7d['uniqueid']]['answertime']=moment()[_0x82a3('0x1b')](_0x82a3('0x1c'));this['channels'][_0x11ed7d['uniqueid']][_0x82a3('0x2a')]=_0x82a3('0x2b');ami[_0x82a3('0x17')]('custom:dialconnect',this['channels'][_0x11ed7d[_0x82a3('0x19')]]);}this[_0x82a3('0x17')](_0x82a3('0x24'),'voice_outbound_channel:save',this[_0x82a3('0xa')][_0x11ed7d['uniqueid']]);}}}catch(_0x339984){logger[_0x82a3('0x2c')](_0x82a3('0x2d'),util[_0x82a3('0x2e')](_0x339984,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x82a3('0x16')]['syncVarSet']=function(_0x858e2){try{if(this['isNotNull'](_0x858e2)){this[_0x82a3('0x2f')](_0x858e2[_0x82a3('0x19')],_[_0x82a3('0x30')](_0x858e2[_0x82a3('0x31')])[0x0],_0x858e2[_0x82a3('0x32')]);if(this[_0x82a3('0x14')](_0x858e2[_0x82a3('0x31')])&&this[_0x82a3('0x14')](_0x858e2[_0x82a3('0x31')]['outboundrouteid'])){if(_['isUndefined'](this[_0x82a3('0xa')][_0x858e2['uniqueid']])){this[_0x82a3('0xa')][_0x858e2[_0x82a3('0x19')]]={'routeId':_0x858e2[_0x82a3('0x32')],'variables':this[_0x82a3('0xd')][_0x858e2[_0x82a3('0x19')]]};this[_0x82a3('0x17')](_0x82a3('0x24'),_0x82a3('0x25'),this[_0x82a3('0xa')][_0x858e2['uniqueid']]);}}}}catch(_0x4bfd85){logger['error']('[syncVarSet][VoiceDialReport]',util['inspect'](_0x4bfd85,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x82a3('0x16')][_0x82a3('0x2f')]=function(_0x518583,_0x364666,_0x21f73b){var _0x3846af=[_0x82a3('0x33'),_0x82a3('0x34'),_0x82a3('0x35'),_0x82a3('0x36'),_0x82a3('0x37'),_0x82a3('0x38'),_0x82a3('0x39'),_0x82a3('0x3a'),_0x82a3('0x3b'),_0x82a3('0x3c'),_0x82a3('0x3d'),_0x82a3('0x3e'),_0x82a3('0x3f'),'memberdynamic','memberinterface',_0x82a3('0x40'),_0x82a3('0x41'),_0x82a3('0x42'),'memberrealtime'];if(!_[_0x82a3('0x43')](_0x364666)&&!_[_0x82a3('0x44')](_0x3846af,_0x364666)){if(_[_0x82a3('0x15')](this[_0x82a3('0xd')][_0x518583])){this[_0x82a3('0xd')][_0x518583]={};}this[_0x82a3('0xd')][_0x518583][_0x364666]=_0x21f73b;}};VoiceDialReport['prototype'][_0x82a3('0x13')]=function(_0x340511){try{if(this[_0x82a3('0x14')](_0x340511)){if(this[_0x82a3('0xa')][_0x340511['uniqueid']]){this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x45')]=moment()[_0x82a3('0x1b')](_0x82a3('0x1c'));this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]]['duration']=moment(this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x45')])['diff'](this['channels'][_0x340511['uniqueid']]['starttime'],_0x82a3('0x46'));this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x2a')]=_0x82a3('0x47');this[_0x82a3('0xc')][_0x82a3('0x48')]+=0x1;if(this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x49')]){this[_0x82a3('0xc')][_0x82a3('0x4a')]+=0x1;this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]]['holdtime']=moment(this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x49')])['diff'](this['channels'][_0x340511['uniqueid']]['starttime'],_0x82a3('0x46'));this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x4b')]=moment(this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x45')])[_0x82a3('0x4c')](this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x49')],_0x82a3('0x46'));this[_0x82a3('0xc')][_0x82a3('0x4d')]+=this['channels'][_0x340511[_0x82a3('0x19')]]['holdtime']||0x0;this[_0x82a3('0xc')][_0x82a3('0x4e')]+=this['channels'][_0x340511[_0x82a3('0x19')]][_0x82a3('0x4b')];}this[_0x82a3('0xc')][_0x82a3('0x4f')]+=this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]][_0x82a3('0x50')];ami[_0x82a3('0x17')](_0x82a3('0x51'),this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]]);ami[_0x82a3('0x17')](_0x82a3('0x52'),this[_0x82a3('0xa')][_0x340511['uniqueid']]);this[_0x82a3('0x17')]('voice:outbound',_0x82a3('0x53'),this[_0x82a3('0xc')]);this['emit'](_0x82a3('0x24'),_0x82a3('0x54'),this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]]);delete this[_0x82a3('0xa')][_0x340511[_0x82a3('0x19')]];}if(this[_0x82a3('0xd')][_0x340511['uniqueid']]){delete this['variables'][_0x340511[_0x82a3('0x19')]];}}}catch(_0x46c4af){logger[_0x82a3('0x2c')](_0x82a3('0x55'),util['inspect'](_0x46c4af,{'showHidden':![],'depth':null}));}};module[_0x82a3('0x56')]=VoiceDialReport;
\ No newline at end of file
diff --git a/server/services/ami/report/voiceQueueReport.js b/server/services/ami/report/voiceQueueReport.js
index b59d221..057e90e 100644
--- a/server/services/ami/report/voiceQueueReport.js
+++ b/server/services/ami/report/voiceQueueReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0974=['queueposition','EXITWITHKEY','[syncVarSet][VoiceQueueReport]','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqoslossbridged','rtpaudioqosrtt','sipuri','bridgepvtcallid','membercalls','memberdynamic','memberlastcall','memberpenalty','memberrealtime','includes','length','sumDuration','milliseconds','diff','answered','lastevent','custom:voiceQueueReport','[syncHangup][VoiceQueueReport]','transfereeuniqueid','transferexten','transferuniqueid','secondtransfereruniqueid','switch','transfertargetuniqueid','origtransfererexten','ATTENDEDTRANSFER','ATTENDED','origtransfereruniqueid','[syncAttendedTransfer][VoiceQueueReport]','transfertype','BLIND','extension','[syncBlindTransfer][VoiceQueueReport]','mohstarttime','[syncMusicOnHoldStart][VoiceQueueReport]','[syncMusicOnHoldStop][VoiceQueueReport]','exports','lodash','moment','bluebird','md5','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/queueReport','redis','defaults','socket.io-emitter','prototype','enqueue','tail','finally','sequence','queueReports','agents','queueChannels','voiceQueues','flagQueueSummary','campaigns','variables','queuesummary','syncQueueSummary','bind','syncQueueSummaryComplete','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','syncAgentConnect','varset','hangup','syncHangup','fullybooted','syncFullyBooted','syncMusicOnHoldStart','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueSummary','loopQueueShow','isUndefined','isEmpty','hasOwnProperty','originated','pTalking','waiting','unlockRR','channels','isNil','Action','message','No\x20such\x20channel','error','[voiceQueueReport][checkVariables]','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','inspect','emit','emitVoiceQueueChannelSave','format','voice:queue:%s','name','voice_queue_channel:save','voice_queue_channel:remove','type','strategy','available','sumBillable','sumHoldTime','talking','total','unmanaged','abandoned','Trunk','active','callerid','Interval','stringify','clearZombieChannels','queues','catch','[queues]','then','isNotNull','queue','callers','toNumber','loggedIn','loggedin','emitVoiceQueueSummary','custom:queuesummary','[syncQueueSummary][VoiceQueueReport]','uniqueid','inbound','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','count','merge','pick','push','[syncQueueCallerJoin][VoiceQueueReport]','last','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','queuecallerexitreason','ABANDONED','lastAssignedTo','[syncQueueCallerAbandon][VoiceQueueReport]','queuecallerleaveAt','connectedlinenum','connectedlinename','[syncQueueCallerLeave][VoiceQueueReport]','COMPLETEDBYAGENT','[syncAgentConnect][VoiceQueueReport]','assigned','membername','queuecallerexit','queuecallerexitAt','transfer','reason','COMPLETED','startsWith','channel','toLowerCase','local/','linkedid','add','seconds','FORWARDTRANSFER','destexten','COMPLETEDBY','toUpperCase','[syncAgentComplete][VoiceQueueReport]','syncVarSet','keys','variable','value','queuestatus','CONTINUE'];(function(_0x15a53d,_0x30ec02){var _0x2c8b14=function(_0x2a8469){while(--_0x2a8469){_0x15a53d['push'](_0x15a53d['shift']());}};_0x2c8b14(++_0x30ec02);}(_0x0974,0xf2));var _0x4097=function(_0x48a916,_0x10f39b){_0x48a916=_0x48a916-0x0;var _0x55ed28=_0x0974[_0x48a916];return _0x55ed28;};'use strict';var _=require(_0x4097('0x0'));var moment=require(_0x4097('0x1'));var BPromise=require(_0x4097('0x2'));var util=require('util');var md5=require(_0x4097('0x3'));var Redis=require(_0x4097('0x4'));var config=require(_0x4097('0x5'));var logger=require(_0x4097('0x6'))(_0x4097('0x7'));var ami=require(_0x4097('0x8'));var QueueReport=require(_0x4097('0x9'));config[_0x4097('0xa')]=_[_0x4097('0xb')](config[_0x4097('0xa')],{'host':'localhost','port':0x18eb});var io=require(_0x4097('0xc'))(new Redis(config['redis']));var Sequence=function(){};Sequence[_0x4097('0xd')][_0x4097('0xe')]=function(_0x551554){this[_0x4097('0xf')]=this[_0x4097('0xf')]?this[_0x4097('0xf')][_0x4097('0x10')](_0x551554):_0x551554();};function VoiceQueueReport(_0x4ae33d){this[_0x4097('0x11')]=new Sequence();this[_0x4097('0x12')]={};this[_0x4097('0x13')]=_0x4ae33d['agents'];this['channels']=_0x4ae33d[_0x4097('0x14')];this[_0x4097('0x15')]=_0x4ae33d[_0x4097('0x15')];this[_0x4097('0x16')]=!![];this['campaigns']=_0x4ae33d[_0x4097('0x17')];this[_0x4097('0x18')]={};ami['on'](_0x4097('0x19'),this[_0x4097('0x1a')][_0x4097('0x1b')](this));ami['on']('queuesummarycomplete',this[_0x4097('0x1c')][_0x4097('0x1b')](this));ami['on'](_0x4097('0x1d'),this[_0x4097('0x1e')][_0x4097('0x1b')](this));ami['on'](_0x4097('0x1f'),this[_0x4097('0x20')]['bind'](this));ami['on'](_0x4097('0x21'),this[_0x4097('0x22')][_0x4097('0x1b')](this));ami['on'](_0x4097('0x23'),this[_0x4097('0x24')][_0x4097('0x1b')](this));ami['on']('agentconnect',this[_0x4097('0x25')][_0x4097('0x1b')](this));ami['on'](_0x4097('0x26'),this['syncVarSet']['bind'](this));ami['on'](_0x4097('0x27'),this[_0x4097('0x28')][_0x4097('0x1b')](this));ami['on'](_0x4097('0x29'),this[_0x4097('0x2a')]['bind'](this));ami['on']('musiconholdstart',this[_0x4097('0x2b')]['bind'](this));ami['on']('musiconholdstop',this[_0x4097('0x2c')]['bind'](this));ami['on'](_0x4097('0x2d'),this[_0x4097('0x2e')]['bind'](this));ami['on'](_0x4097('0x2f'),this[_0x4097('0x30')]['bind'](this));this[_0x4097('0x31')]();this[_0x4097('0x32')]();}function isNotNull(_0x54503e){return _0x54503e!==null&&!_[_0x4097('0x33')](_0x54503e);}function clearChannels(_0x13ccf7){if(!_[_0x4097('0x34')](_0x13ccf7)){for(var _0x1932ce in _0x13ccf7){if(_0x13ccf7[_0x4097('0x35')](_0x1932ce)){delete _0x13ccf7[_0x1932ce];}}}}function clearCampaigns(_0x1f4f2d){if(!_[_0x4097('0x34')](_0x1f4f2d)){for(var _0x56b6b3 in _0x1f4f2d){if(_0x1f4f2d[_0x4097('0x35')](_0x56b6b3)){_0x1f4f2d[_0x56b6b3][_0x4097('0x36')]=0x0;}}}}function clearVoiceQueues(_0x252bc3){if(!_[_0x4097('0x34')](_0x252bc3)){for(var _0x1e3f40 in _0x252bc3){if(_0x252bc3[_0x4097('0x35')](_0x1e3f40)){_0x252bc3[_0x1e3f40][_0x4097('0x36')]=0x0;_0x252bc3[_0x1e3f40]['talking']=0x0;_0x252bc3[_0x1e3f40][_0x4097('0x37')]=0x0;_0x252bc3[_0x1e3f40][_0x4097('0x38')]=0x0;_0x252bc3[_0x1e3f40]['queueStatusComplete']=!![];}}}}function clearAgentBooked(_0x3e68a2){if(!_['isEmpty'](_0x3e68a2)){for(var _0xbf94f2 in _0x3e68a2){if(_0x3e68a2[_0x4097('0x35')](_0xbf94f2)){_0x3e68a2[_0xbf94f2][_0x4097('0x39')]=!![];}}}}VoiceQueueReport[_0x4097('0xd')]['clearZombieChannels']=function(){var _0x5039e5=this;for(var _0xf7fd5b in this[_0x4097('0x3a')]){if(this[_0x4097('0x3a')][_0x4097('0x35')](_0xf7fd5b)&&!this[_0x4097('0x3a')][_0xf7fd5b]['switch']){this[_0x4097('0x11')][_0x4097('0xe')](function(){if(!_[_0x4097('0x3b')](_0x5039e5['channels'][_0xf7fd5b])){return ami[_0x4097('0x3c')]({'action':'status','channel':_0x5039e5['channels'][_0xf7fd5b]['channel']})['catch'](function(_0x1a8ac5){if(_0x1a8ac5[_0x4097('0x3d')]===_0x4097('0x3e')){setTimeout(function(){if(_0x5039e5[_0x4097('0x3a')][_0xf7fd5b]){delete _0x5039e5['channels'][_0xf7fd5b];logger[_0x4097('0x3f')]('[voiceQueueReport][checkChannel]',_0xf7fd5b);}if(_0x5039e5[_0x4097('0x12')][_0xf7fd5b]){delete _0x5039e5[_0x4097('0x12')][_0xf7fd5b];logger[_0x4097('0x3f')]('[voiceQueueReport][checkQueueReport]',_0xf7fd5b);}if(_0x5039e5[_0x4097('0x18')][_0xf7fd5b]){delete _0x5039e5['variables'][_0xf7fd5b];logger[_0x4097('0x3f')](_0x4097('0x40'),_0xf7fd5b);}},0x1f40);}});}});}}};VoiceQueueReport['prototype'][_0x4097('0x2a')]=function(){logger[_0x4097('0x3f')](_0x4097('0x41'));clearChannels(this[_0x4097('0x3a')]);this[_0x4097('0x42')](this['queueReports']);clearAgentBooked(this[_0x4097('0x13')]);clearVoiceQueues(this[_0x4097('0x15')]);clearCampaigns(this[_0x4097('0x17')]);};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x42')]=function(_0x20ff82){var _0x4e9fc3=this;if(!_[_0x4097('0x34')](_0x20ff82)){for(var _0x5a91ad in _0x20ff82){if(_0x20ff82[_0x4097('0x35')](_0x5a91ad)){_0x4e9fc3[_0x4097('0x43')](_0x20ff82[_0x5a91ad]);delete _0x20ff82[_0x5a91ad];}}}};function loggerCatch(_0xdbabf1){return function(_0x39a545){logger[_0x4097('0x3f')](_0xdbabf1,util[_0x4097('0x44')](_0x39a545,{'showHidden':![],'depth':null}));};}VoiceQueueReport[_0x4097('0xd')][_0x4097('0x45')]=function(_0x31dcf3,_0x26f57b,_0x477b4b){io['to'](_0x31dcf3)[_0x4097('0x45')](_0x26f57b,_0x477b4b);};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x46')]=function(_0x2f9d50){this['emit'](util[_0x4097('0x47')](_0x4097('0x48'),_0x2f9d50[_0x4097('0x49')]),_0x4097('0x4a'),_0x2f9d50);};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x43')]=function(_0x2a33ec){this['emit'](util[_0x4097('0x47')](_0x4097('0x48'),_0x2a33ec[_0x4097('0x49')]),_0x4097('0x4b'),_0x2a33ec);};VoiceQueueReport[_0x4097('0xd')]['emitVoiceQueueSummary']=function(_0x2224d2){if(_0x2224d2[_0x4097('0x4c')]==='inbound'){var _0x281972={'id':_0x2224d2['id'],'name':_0x2224d2[_0x4097('0x49')],'strategy':_0x2224d2[_0x4097('0x4d')],'answered':_0x2224d2['answered'],'available':_0x2224d2[_0x4097('0x4e')],'loggedIn':_0x2224d2['loggedIn'],'pTalking':_0x2224d2[_0x4097('0x37')],'sumBillable':_0x2224d2[_0x4097('0x4f')],'sumDuration':_0x2224d2['sumDuration'],'sumHoldTime':_0x2224d2[_0x4097('0x50')]||0x0,'talking':_0x2224d2[_0x4097('0x51')],'total':_0x2224d2[_0x4097('0x52')],'type':_0x2224d2[_0x4097('0x4c')],'unmanaged':_0x2224d2[_0x4097('0x53')],'abandoned':_0x2224d2[_0x4097('0x54')],'waiting':_0x2224d2[_0x4097('0x38')]};if(_0x2224d2[_0x4097('0x55')]){_0x281972[_0x4097('0x55')]={'id':_0x2224d2[_0x4097('0x55')]['id'],'name':_0x2224d2[_0x4097('0x55')][_0x4097('0x49')],'active':_0x2224d2[_0x4097('0x55')][_0x4097('0x56')],'callerid':_0x2224d2['Trunk'][_0x4097('0x57')]};}if(_0x2224d2['Interval']){_0x281972['Interval']={'id':_0x2224d2[_0x4097('0x58')]['id'],'name':_0x2224d2[_0x4097('0x58')][_0x4097('0x49')]};}var _0x306711=md5(JSON[_0x4097('0x59')](_0x281972));if(_0x2224d2['md5']!==_0x306711){_0x2224d2[_0x4097('0x3')]=_0x306711;this['emit'](util['format'](_0x4097('0x48'),_0x281972[_0x4097('0x49')]),'voice_queue:save',_0x281972);}}};VoiceQueueReport[_0x4097('0xd')]['isNotNull']=function(_0x1a7faf){return _0x1a7faf!==null&&!_[_0x4097('0x33')](_0x1a7faf);};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x32')]=function(){var _0x19fee9=this;setInterval(function(){_0x19fee9[_0x4097('0x5a')]();ami['Action']({'action':_0x4097('0x5b')})[_0x4097('0x5c')](loggerCatch(_0x4097('0x5d')));},0x2710);};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x31')]=function(){var _0x4f2a4b=this;setInterval(function(){if(_0x4f2a4b['flagQueueSummary']){return ami[_0x4097('0x3c')]({'action':_0x4097('0x19')})[_0x4097('0x5e')](function(_0x420c3a){_0x4f2a4b['flagQueueSummary']=![];})[_0x4097('0x5c')](loggerCatch('[queuesummary]'));}},0x3e8);};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x1a')]=function(_0x49c8fd){try{if(this[_0x4097('0x5f')](_0x49c8fd)&&this[_0x4097('0x5f')](_0x49c8fd[_0x4097('0x60')])){if(this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]]){var _0x29c458=_['countBy'](this['channels'],_0x4097('0x60'))[_0x49c8fd[_0x4097('0x60')]]||0x0;var _0x396788=_0x29c458-_0x49c8fd[_0x4097('0x61')];if(this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x38')]!==_[_0x4097('0x62')](_0x49c8fd[_0x4097('0x61')])||this[_0x4097('0x15')][_0x49c8fd['queue']][_0x4097('0x63')]!==_[_0x4097('0x62')](_0x49c8fd[_0x4097('0x64')])||this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x4e')]!==_[_0x4097('0x62')](_0x49c8fd[_0x4097('0x4e')])||this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x51')]!==_0x396788){this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x38')]=_[_0x4097('0x62')](_0x49c8fd[_0x4097('0x61')]);this['voiceQueues'][_0x49c8fd['queue']]['loggedIn']=_[_0x4097('0x62')](_0x49c8fd[_0x4097('0x64')]);this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x4e')]=_[_0x4097('0x62')](_0x49c8fd[_0x4097('0x4e')]);this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x51')]=_0x396788>0x0?_0x396788:0x0;this[_0x4097('0x15')][_0x49c8fd['queue']]['talking']=this[_0x4097('0x15')][_0x49c8fd['queue']][_0x4097('0x51')]>_[_0x4097('0x62')](_0x49c8fd['loggedin'])?_['toNumber'](_0x49c8fd['loggedin']):this[_0x4097('0x15')][_0x49c8fd[_0x4097('0x60')]][_0x4097('0x51')];this[_0x4097('0x65')](this[_0x4097('0x15')][_0x49c8fd['queue']]);}ami[_0x4097('0x45')](_0x4097('0x66'),this['voiceQueues'][_0x49c8fd[_0x4097('0x60')]]);}}}catch(_0x50652e){logger['error'](_0x4097('0x67'),util['inspect'](_0x50652e,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x1c')]=function(_0x57bc44){this[_0x4097('0x16')]=!![];};VoiceQueueReport[_0x4097('0xd')]['syncNewExten']=function(_0x2ba80e){};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x1e')]=function(_0xd27c4c){try{if(this[_0x4097('0x5f')](_0xd27c4c)){if(_['isUndefined'](this[_0x4097('0x12')][_0xd27c4c[_0x4097('0x68')]])){this[_0x4097('0x12')][_0xd27c4c[_0x4097('0x68')]]=[];this[_0x4097('0x3a')][_0xd27c4c[_0x4097('0x68')]]={};}var _0x318b85=new QueueReport();_0x318b85[_0x4097('0x49')]=_0xd27c4c[_0x4097('0x60')];_0x318b85['type']=this[_0x4097('0x15')][_0x318b85[_0x4097('0x49')]]&&this[_0x4097('0x15')][_0x318b85['name']][_0x4097('0x4c')]?this[_0x4097('0x15')][_0x318b85[_0x4097('0x49')]][_0x4097('0x4c')]||_0x4097('0x69'):_0x4097('0x69');_0x318b85[_0x4097('0x60')]=_0xd27c4c['queue'];_0x318b85[_0x4097('0x6a')]=moment()['format'](_0x4097('0x6b'));_0x318b85['position']=_0xd27c4c['position'];_0x318b85['count']=_0xd27c4c[_0x4097('0x6c')];_[_0x4097('0x6d')](_0x318b85,_[_0x4097('0x6e')](_0xd27c4c,_['keys'](_0x318b85)));this[_0x4097('0x12')][_0xd27c4c[_0x4097('0x68')]][_0x4097('0x6f')](_0x318b85);this[_0x4097('0x3a')][_0xd27c4c[_0x4097('0x68')]]=_0x318b85;this[_0x4097('0x46')](_0x318b85);}}catch(_0x5adf2e){logger[_0x4097('0x3f')](_0x4097('0x70'),util[_0x4097('0x44')](_0x5adf2e,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')]['syncQueueCallerAbandon']=function(_0x437991){try{if(this[_0x4097('0x5f')](_0x437991)){if(this['queueReports'][_0x437991[_0x4097('0x68')]]){var _0xf81976=_[_0x4097('0x71')](this[_0x4097('0x12')][_0x437991[_0x4097('0x68')]]);_0xf81976[_0x4097('0x72')]=![];_0xf81976[_0x4097('0x73')]=null;_0xf81976['holdtime']=_0x437991[_0x4097('0x74')];_0xf81976[_0x4097('0x75')]=_0x437991[_0x4097('0x75')];_0xf81976[_0x4097('0x1f')]=!![];_0xf81976[_0x4097('0x76')]=moment()[_0x4097('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0xf81976[_0x4097('0x77')]=_0x4097('0x78');_0xf81976[_0x4097('0x79')]=null;this['channels'][_0x437991[_0x4097('0x68')]]=_0xf81976;this[_0x4097('0x43')](_0xf81976);}}}catch(_0x590ea1){logger[_0x4097('0x3f')](_0x4097('0x7a'),util['inspect'](_0x590ea1,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x22')]=function(_0x17e04f){try{if(this['isNotNull'](_0x17e04f)){if(this['queueReports'][_0x17e04f['uniqueid']]){var _0x34a36a=_['last'](this['queueReports'][_0x17e04f['uniqueid']]);_0x34a36a[_0x4097('0x7b')]=moment()['format'](_0x4097('0x6b'));_0x34a36a['connectedlinenum']=_0x17e04f[_0x4097('0x7c')];_0x34a36a[_0x4097('0x7d')]=_0x17e04f['connectedlinename'];this[_0x4097('0x3a')][_0x17e04f[_0x4097('0x68')]]=_0x34a36a;this[_0x4097('0x46')](_0x34a36a);}}}catch(_0x3a9301){logger[_0x4097('0x3f')](_0x4097('0x7e'),util[_0x4097('0x44')](_0x3a9301,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x25')]=function(_0x106459){try{if(this[_0x4097('0x5f')](_0x106459)){if(this[_0x4097('0x12')][_0x106459[_0x4097('0x68')]]){var _0x3321f4=_[_0x4097('0x71')](this[_0x4097('0x12')][_0x106459['uniqueid']]);_0x3321f4['queuecallercomplete']=!![];_0x3321f4[_0x4097('0x77')]=_0x4097('0x7f');}}}catch(_0x2b8ac3){logger[_0x4097('0x3f')](_0x4097('0x80'),util[_0x4097('0x44')](_0x2b8ac3,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x24')]=function(_0x489c39){try{if(this[_0x4097('0x5f')](_0x489c39)){if(this['queueReports'][_0x489c39[_0x4097('0x68')]]){var _0x3628e1=_[_0x4097('0x71')](this[_0x4097('0x12')][_0x489c39[_0x4097('0x68')]]);_0x3628e1['queuecallerabandon']=![];_0x3628e1[_0x4097('0x76')]=null;_0x3628e1[_0x4097('0x81')]=!![];_0x3628e1[_0x4097('0x79')]=_0x489c39[_0x4097('0x82')];_0x3628e1[_0x4097('0x74')]=_0x489c39['holdtime'];_0x3628e1[_0x4097('0x72')]=!![];_0x3628e1[_0x4097('0x83')]=![];_0x3628e1[_0x4097('0x84')]=null;if(!_0x3628e1[_0x4097('0x85')]){if(_0x489c39[_0x4097('0x86')]==_0x4097('0x85')){_0x3628e1[_0x4097('0x77')]=_0x4097('0x87');}else{if(_[_0x4097('0x88')](_0x489c39[_0x4097('0x89')][_0x4097('0x8a')](),_0x4097('0x8b'))){if(this['queueReports'][_0x489c39[_0x4097('0x8c')]]){var _0x4dcbdf=_[_0x4097('0x71')](this[_0x4097('0x12')][_0x489c39['linkedid']]);_0x4dcbdf[_0x4097('0x72')]=![];_0x4dcbdf['queuecallerexit']=!![];_0x4dcbdf[_0x4097('0x84')]=moment(_0x3628e1[_0x4097('0x6a')])[_0x4097('0x8d')](_0x489c39[_0x4097('0x74')],_0x4097('0x8e'))[_0x4097('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0x4dcbdf[_0x4097('0x77')]=_0x4097('0x8f');_0x4dcbdf[_0x4097('0x85')]=!![];_0x4dcbdf['transfertype']='FORWARD';_0x4dcbdf['transferexten']=_0x489c39[_0x4097('0x90')];_0x4dcbdf['transferuniqueid']=_0x489c39[_0x4097('0x68')];var _0x3111ca=this[_0x4097('0x12')][_0x489c39['linkedid']];this[_0x4097('0x12')][_0x489c39[_0x4097('0x8c')]]=this[_0x4097('0x12')][_0x489c39['uniqueid']];this[_0x4097('0x12')][_0x489c39[_0x4097('0x68')]]=_0x3111ca;}}else{_0x3628e1[_0x4097('0x77')]=_0x4097('0x91')+_0x489c39[_0x4097('0x86')][_0x4097('0x92')]();}}}this[_0x4097('0x3a')][_0x489c39['uniqueid']]=_0x3628e1;this[_0x4097('0x43')](_0x3628e1);}}}catch(_0x103903){logger[_0x4097('0x3f')](_0x4097('0x93'),util[_0x4097('0x44')](_0x103903,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x94')]=function(_0x375681){try{if(this['isNotNull'](_0x375681)){this['addVariable'](_0x375681[_0x4097('0x68')],_[_0x4097('0x95')](_0x375681[_0x4097('0x96')])[0x0],_0x375681[_0x4097('0x97')]);if(this[_0x4097('0x12')][_0x375681['uniqueid']]){var _0x3b9693=_[_0x4097('0x71')](this[_0x4097('0x12')][_0x375681[_0x4097('0x68')]]);if(_0x3b9693){if(this[_0x4097('0x5f')](_0x375681['variable'])&&this[_0x4097('0x5f')](_0x375681[_0x4097('0x96')][_0x4097('0x98')])){switch(_0x375681[_0x4097('0x97')]){case _0x4097('0x99'):_0x3b9693[_0x4097('0x83')]=![];_0x3b9693[_0x4097('0x84')]=null;break;default:_0x3b9693[_0x4097('0x83')]=!![];_0x3b9693['queuecallerexitAt']=moment()[_0x4097('0x47')](_0x4097('0x6b'));_0x3b9693[_0x4097('0x7b')]=moment()[_0x4097('0x47')](_0x4097('0x6b'));}_0x3b9693[_0x4097('0x1f')]=![];_0x3b9693[_0x4097('0x76')]=null;_0x3b9693[_0x4097('0x77')]=_0x375681['value'];this[_0x4097('0x3a')][_0x375681['uniqueid']]=_0x3b9693;this[_0x4097('0x43')](_0x3b9693);}else if(this[_0x4097('0x5f')](_0x375681[_0x4097('0x96')])&&this[_0x4097('0x5f')](_0x375681['variable'][_0x4097('0x9a')])){if(!_0x3b9693['queuecallerabandon']){_0x3b9693['queuecallerexit']=!![];_0x3b9693[_0x4097('0x84')]=moment()[_0x4097('0x47')](_0x4097('0x6b'));_0x3b9693[_0x4097('0x77')]=_0x4097('0x9b');_0x3b9693[_0x4097('0x7b')]=moment()['format'](_0x4097('0x6b'));this[_0x4097('0x3a')][_0x375681[_0x4097('0x68')]]=_0x3b9693;}}_0x3b9693[_0x4097('0x18')]=this[_0x4097('0x18')][_0x375681[_0x4097('0x68')]];}}}}catch(_0x4e9a57){logger['error'](_0x4097('0x9c'),util[_0x4097('0x44')](_0x4e9a57,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x4097('0xd')][_0x4097('0x9d')]=function(_0x4cbab5,_0x5dc70e,_0x42b8a5){var _0x3caf82=[_0x4097('0x9e'),_0x4097('0x9f'),_0x4097('0xa0'),'rtpaudioqosjitterbridged','rtpaudioqosloss',_0x4097('0xa1'),_0x4097('0xa2'),'rtpaudioqosrttbridged','sipcallid',_0x4097('0xa3'),'bridgepeer',_0x4097('0xa4'),_0x4097('0xa5'),_0x4097('0xa6'),'memberinterface',_0x4097('0xa7'),_0x4097('0x82'),_0x4097('0xa8'),_0x4097('0xa9')];if(!_[_0x4097('0x3b')](_0x5dc70e)&&!_[_0x4097('0xaa')](_0x3caf82,_0x5dc70e)){if(_['isUndefined'](this[_0x4097('0x18')][_0x4cbab5])){this[_0x4097('0x18')][_0x4cbab5]={};}this['variables'][_0x4cbab5][_0x5dc70e]=_0x42b8a5;}};VoiceQueueReport['prototype'][_0x4097('0x28')]=function(_0x2aa331){try{if(this['isNotNull'](_0x2aa331)){if(this['queueReports'][_0x2aa331[_0x4097('0x68')]]){for(var _0x165499=0x0,_0x430ba4={};_0x1654990x0?_0x31134c:0x0;this[_0x391a('0x14')][_0x5a0109[_0x391a('0x65')]]['talking']=this[_0x391a('0x14')][_0x5a0109['queue']][_0x391a('0x36')]>_[_0x391a('0x68')](_0x5a0109['loggedin'])?_[_0x391a('0x68')](_0x5a0109[_0x391a('0x69')]):this[_0x391a('0x14')][_0x5a0109['queue']][_0x391a('0x36')];this[_0x391a('0x6a')](this[_0x391a('0x14')][_0x5a0109[_0x391a('0x65')]]);}ami[_0x391a('0x48')](_0x391a('0x6b'),this['voiceQueues'][_0x5a0109[_0x391a('0x65')]]);}}}catch(_0x390152){logger[_0x391a('0x42')](_0x391a('0x6c'),util[_0x391a('0x47')](_0x390152,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueSummaryComplete']=function(_0x25d1a5){this['flagQueueSummary']=!![];};VoiceQueueReport[_0x391a('0xd')][_0x391a('0x6d')]=function(_0x287aa0){};VoiceQueueReport[_0x391a('0xd')][_0x391a('0x1c')]=function(_0x27aed1){try{if(this[_0x391a('0x64')](_0x27aed1)){if(_[_0x391a('0x32')](this[_0x391a('0x11')][_0x27aed1[_0x391a('0x6e')]])){this['queueReports'][_0x27aed1[_0x391a('0x6e')]]=[];this['channels'][_0x27aed1[_0x391a('0x6e')]]={};}var _0x5f3347=new QueueReport();_0x5f3347[_0x391a('0x4a')]=_0x27aed1[_0x391a('0x65')];_0x5f3347[_0x391a('0x4d')]=this['voiceQueues'][_0x5f3347[_0x391a('0x4a')]]&&this[_0x391a('0x14')][_0x5f3347[_0x391a('0x4a')]][_0x391a('0x4d')]?this[_0x391a('0x14')][_0x5f3347[_0x391a('0x4a')]][_0x391a('0x4d')]||_0x391a('0x4e'):_0x391a('0x4e');_0x5f3347['queue']=_0x27aed1['queue'];_0x5f3347[_0x391a('0x6f')]=moment()[_0x391a('0x4c')]('YYYY-MM-DD\x20HH:mm:ss');_0x5f3347[_0x391a('0x70')]=_0x27aed1[_0x391a('0x70')];_0x5f3347[_0x391a('0x71')]=_0x27aed1[_0x391a('0x71')];_[_0x391a('0x72')](_0x5f3347,_[_0x391a('0x73')](_0x27aed1,_[_0x391a('0x74')](_0x5f3347)));this[_0x391a('0x11')][_0x27aed1['uniqueid']][_0x391a('0x75')](_0x5f3347);this[_0x391a('0x3a')][_0x27aed1['uniqueid']]=_0x5f3347;this[_0x391a('0x49')](_0x5f3347);}}catch(_0x3b6f99){logger[_0x391a('0x42')](_0x391a('0x76'),util[_0x391a('0x47')](_0x3b6f99,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueCallerAbandon']=function(_0x56817d){try{if(this[_0x391a('0x64')](_0x56817d)){if(this['queueReports'][_0x56817d[_0x391a('0x6e')]]){var _0x1733bb=_['last'](this[_0x391a('0x11')][_0x56817d['uniqueid']]);_0x1733bb['queuecallercomplete']=![];_0x1733bb['queuecallercompleteAt']=null;_0x1733bb[_0x391a('0x77')]=_0x56817d[_0x391a('0x77')];_0x1733bb['originalposition']=_0x56817d[_0x391a('0x78')];_0x1733bb['queuecallerabandon']=!![];_0x1733bb['queuecallerabandonAt']=moment()[_0x391a('0x4c')](_0x391a('0x79'));_0x1733bb[_0x391a('0x7a')]=_0x391a('0x7b');_0x1733bb[_0x391a('0x7c')]=null;this[_0x391a('0x3a')][_0x56817d[_0x391a('0x6e')]]=_0x1733bb;this['emitVoiceQueueChannelRemove'](_0x1733bb);}}}catch(_0x553cfb){logger[_0x391a('0x42')](_0x391a('0x7d'),util[_0x391a('0x47')](_0x553cfb,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x391a('0xd')][_0x391a('0x1f')]=function(_0x3edc1e){try{if(this['isNotNull'](_0x3edc1e)){if(this[_0x391a('0x11')][_0x3edc1e[_0x391a('0x6e')]]){var _0x2e65ed=_[_0x391a('0x7e')](this[_0x391a('0x11')][_0x3edc1e[_0x391a('0x6e')]]);_0x2e65ed[_0x391a('0x7f')]=moment()[_0x391a('0x4c')](_0x391a('0x79'));_0x2e65ed[_0x391a('0x80')]=_0x3edc1e[_0x391a('0x80')];_0x2e65ed['connectedlinename']=_0x3edc1e[_0x391a('0x81')];this['channels'][_0x3edc1e[_0x391a('0x6e')]]=_0x2e65ed;this[_0x391a('0x49')](_0x2e65ed);}}}catch(_0x4539f2){logger[_0x391a('0x42')](_0x391a('0x82'),util[_0x391a('0x47')](_0x4539f2,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x391a('0xd')][_0x391a('0x23')]=function(_0x43238c){try{if(this[_0x391a('0x64')](_0x43238c)){if(this[_0x391a('0x11')][_0x43238c[_0x391a('0x6e')]]){var _0x504377=_['last'](this[_0x391a('0x11')][_0x43238c[_0x391a('0x6e')]]);_0x504377[_0x391a('0x83')]=!![];_0x504377[_0x391a('0x7a')]='COMPLETEDBYAGENT';}}}catch(_0x591f7d){logger['error'](_0x391a('0x84'),util[_0x391a('0x47')](_0x591f7d,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x391a('0xd')][_0x391a('0x21')]=function(_0x58e0c2){try{if(this['isNotNull'](_0x58e0c2)){if(this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x6e')]]){var _0x1007c7=_[_0x391a('0x7e')](this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x6e')]]);_0x1007c7[_0x391a('0x1d')]=![];_0x1007c7['queuecallerabandonAt']=null;_0x1007c7[_0x391a('0x85')]=!![];_0x1007c7[_0x391a('0x7c')]=_0x58e0c2[_0x391a('0x86')];_0x1007c7[_0x391a('0x77')]=_0x58e0c2[_0x391a('0x77')];_0x1007c7[_0x391a('0x83')]=!![];_0x1007c7[_0x391a('0x87')]=![];_0x1007c7[_0x391a('0x88')]=null;if(!_0x1007c7[_0x391a('0x89')]){if(_0x58e0c2[_0x391a('0x8a')]=='transfer'){_0x1007c7[_0x391a('0x7a')]=_0x391a('0x8b');}else{if(_[_0x391a('0x8c')](_0x58e0c2['channel'][_0x391a('0x8d')](),'local/')){if(this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x8e')]]){var _0x255190=_['last'](this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x8e')]]);_0x255190[_0x391a('0x83')]=![];_0x255190['queuecallerexit']=!![];_0x255190[_0x391a('0x88')]=moment(_0x1007c7[_0x391a('0x6f')])[_0x391a('0x8f')](_0x58e0c2[_0x391a('0x77')],'seconds')[_0x391a('0x4c')](_0x391a('0x79'));_0x255190[_0x391a('0x7a')]='FORWARDTRANSFER';_0x255190['transfer']=!![];_0x255190[_0x391a('0x90')]=_0x391a('0x91');_0x255190[_0x391a('0x92')]=_0x58e0c2['destexten'];_0x255190[_0x391a('0x93')]=_0x58e0c2[_0x391a('0x6e')];var _0x59f586=this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x8e')]];this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x8e')]]=this[_0x391a('0x11')][_0x58e0c2[_0x391a('0x6e')]];this['queueReports'][_0x58e0c2[_0x391a('0x6e')]]=_0x59f586;}}else{_0x1007c7[_0x391a('0x7a')]=_0x391a('0x94')+_0x58e0c2[_0x391a('0x8a')]['toUpperCase']();}}}this[_0x391a('0x3a')][_0x58e0c2[_0x391a('0x6e')]]=_0x1007c7;this['emitVoiceQueueChannelRemove'](_0x1007c7);}}}catch(_0x4476a7){logger[_0x391a('0x42')](_0x391a('0x95'),util['inspect'](_0x4476a7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x391a('0xd')][_0x391a('0x25')]=function(_0x272c6a){try{if(this[_0x391a('0x64')](_0x272c6a)){this[_0x391a('0x96')](_0x272c6a[_0x391a('0x6e')],_[_0x391a('0x74')](_0x272c6a['variable'])[0x0],_0x272c6a[_0x391a('0x97')]);if(this[_0x391a('0x11')][_0x272c6a[_0x391a('0x6e')]]){var _0x49c347=_['last'](this['queueReports'][_0x272c6a[_0x391a('0x6e')]]);if(_0x49c347){if(this[_0x391a('0x64')](_0x272c6a[_0x391a('0x98')])&&this[_0x391a('0x64')](_0x272c6a['variable']['queuestatus'])){switch(_0x272c6a['value']){case _0x391a('0x99'):_0x49c347[_0x391a('0x87')]=![];_0x49c347[_0x391a('0x88')]=null;break;default:_0x49c347['queuecallerexit']=!![];_0x49c347['queuecallerexitAt']=moment()[_0x391a('0x4c')]('YYYY-MM-DD\x20HH:mm:ss');_0x49c347[_0x391a('0x7f')]=moment()[_0x391a('0x4c')]('YYYY-MM-DD\x20HH:mm:ss');}_0x49c347[_0x391a('0x1d')]=![];_0x49c347['queuecallerabandonAt']=null;_0x49c347['queuecallerexitreason']=_0x272c6a[_0x391a('0x97')];this[_0x391a('0x3a')][_0x272c6a[_0x391a('0x6e')]]=_0x49c347;this[_0x391a('0x46')](_0x49c347);}else if(this['isNotNull'](_0x272c6a[_0x391a('0x98')])&&this[_0x391a('0x64')](_0x272c6a[_0x391a('0x98')][_0x391a('0x9a')])){if(!_0x49c347['queuecallerabandon']){_0x49c347[_0x391a('0x87')]=!![];_0x49c347[_0x391a('0x88')]=moment()[_0x391a('0x4c')](_0x391a('0x79'));_0x49c347['queuecallerexitreason']='EXITWITHKEY';_0x49c347[_0x391a('0x7f')]=moment()[_0x391a('0x4c')](_0x391a('0x79'));this['channels'][_0x272c6a[_0x391a('0x6e')]]=_0x49c347;}}_0x49c347['variables']=this[_0x391a('0x16')][_0x272c6a['uniqueid']];}}}}catch(_0x1b63b0){logger[_0x391a('0x42')](_0x391a('0x9b'),util[_0x391a('0x47')](_0x1b63b0,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x391a('0x96')]=function(_0x34d1e6,_0x4fdb88,_0x403882){var _0x471077=[_0x391a('0x9c'),_0x391a('0x9d'),_0x391a('0x9e'),_0x391a('0x9f'),_0x391a('0xa0'),_0x391a('0xa1'),_0x391a('0xa2'),_0x391a('0xa3'),_0x391a('0xa4'),_0x391a('0xa5'),_0x391a('0xa6'),_0x391a('0xa7'),_0x391a('0xa8'),_0x391a('0xa9'),_0x391a('0xaa'),_0x391a('0xab'),'membername',_0x391a('0xac'),'memberrealtime'];if(!_[_0x391a('0x3d')](_0x4fdb88)&&!_[_0x391a('0xad')](_0x471077,_0x4fdb88)){if(_['isUndefined'](this[_0x391a('0x16')][_0x34d1e6])){this[_0x391a('0x16')][_0x34d1e6]={};}this[_0x391a('0x16')][_0x34d1e6][_0x4fdb88]=_0x403882;}};VoiceQueueReport[_0x391a('0xd')]['syncHangup']=function(_0xc0b57){try{if(this['isNotNull'](_0xc0b57)){if(this[_0x391a('0x11')][_0xc0b57[_0x391a('0x6e')]]){for(var _0x464a63=0x0,_0x43b977={};_0x464a63=0x0?moment(_0x3606d3[_0x9ca8('0x15')])['diff'](_0x3606d3[_0x9ca8('0x14')],_0x9ca8('0x16')):null,'data1':_0x9ca8('0x17'),'data2':_0x3606d3[_0x9ca8('0x10')],'data3':_0x3606d3['exten'],'data4':_0x3606d3[_0x9ca8('0x18')]||null,'role':'agent','internal':_0x3606d3['accountcode']?_[_0x9ca8('0x11')](_0x3606d3['accountcode']):undefined,'uniqueid':_0x3606d3[_0x9ca8('0x12')]},'log':'CreateMemberReport'});};
\ No newline at end of file
+var _0x3fc1=['CreateMemberReport','voice','lastAssignedTo','isNil','format','SIP/%s','interface','TALKING','queuecallerleaveAt','diff','seconds','inbound','calleridnum','exten','queue','agent','accountcode','toNumber','uniqueid','voiceDialReport','Request','membername','starttime','endtime','outbound','dialstring','moment','util','../client','voiceQueueReport','queuecallercompleteAt','queuecallerexitAt'];(function(_0x431cde,_0x4777a8){var _0x80bd5=function(_0x17fb16){while(--_0x17fb16){_0x431cde['push'](_0x431cde['shift']());}};_0x80bd5(++_0x4777a8);}(_0x3fc1,0x13a));var _0x13fc=function(_0x244656,_0x2d71fb){_0x244656=_0x244656-0x0;var _0x303a0f=_0x3fc1[_0x244656];return _0x303a0f;};'use strict';var moment=require(_0x13fc('0x0'));var _=require('lodash');var util=require(_0x13fc('0x1'));var client=require(_0x13fc('0x2'));exports[_0x13fc('0x3')]=function(_0x53535b){var _0x25fee=_0x53535b[_0x13fc('0x4')]||_0x53535b[_0x13fc('0x5')];return client['Request'](_0x13fc('0x6'),{'body':{'channel':_0x13fc('0x7'),'membername':_0x53535b[_0x13fc('0x8')],'interface':_[_0x13fc('0x9')](_0x53535b['interface'])?util[_0x13fc('0xa')](_0x13fc('0xb'),_0x53535b[_0x13fc('0x8')]):_0x53535b[_0x13fc('0xc')],'type':_0x13fc('0xd'),'enterAt':_0x53535b[_0x13fc('0xe')],'exitAt':_0x25fee,'duration':moment(_0x25fee)[_0x13fc('0xf')](_0x53535b['queuecallerleaveAt'],_0x13fc('0x10')),'data1':_0x13fc('0x11'),'data2':_0x53535b[_0x13fc('0x12')],'data3':_0x53535b[_0x13fc('0x13')],'data4':null,'data5':_0x53535b[_0x13fc('0x14')],'role':_0x13fc('0x15'),'internal':_0x53535b[_0x13fc('0x16')]?_[_0x13fc('0x17')](_0x53535b[_0x13fc('0x16')]):undefined,'uniqueid':_0x53535b[_0x13fc('0x18')]},'log':_0x13fc('0x6')});};exports[_0x13fc('0x19')]=function(_0x3392cf){return client[_0x13fc('0x1a')](_0x13fc('0x6'),{'body':{'channel':'voice','membername':_0x3392cf[_0x13fc('0x1b')],'interface':_0x3392cf[_0x13fc('0xc')],'type':'TALKING','enterAt':_0x3392cf[_0x13fc('0x1c')],'exitAt':_0x3392cf[_0x13fc('0x1d')],'duration':moment(_0x3392cf[_0x13fc('0x1d')])[_0x13fc('0xf')](_0x3392cf[_0x13fc('0x1c')],_0x13fc('0x10'))>=0x0?moment(_0x3392cf['endtime'])[_0x13fc('0xf')](_0x3392cf[_0x13fc('0x1c')],_0x13fc('0x10')):null,'data1':_0x13fc('0x1e'),'data2':_0x3392cf[_0x13fc('0x16')],'data3':_0x3392cf[_0x13fc('0x13')],'data4':_0x3392cf[_0x13fc('0x1f')]||null,'role':_0x13fc('0x15'),'internal':_0x3392cf[_0x13fc('0x16')]?_[_0x13fc('0x17')](_0x3392cf[_0x13fc('0x16')]):undefined,'uniqueid':_0x3392cf['uniqueid']},'log':_0x13fc('0x6')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/template.js b/server/services/ami/rpc/template.js
index aac4596..10bc243 100644
--- a/server/services/ami/rpc/template.js
+++ b/server/services/ami/rpc/template.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6095=['GetTemplate','name','html','getTemplates','Request'];(function(_0x3547e1,_0x423be5){var _0xb9349=function(_0x50d682){while(--_0x50d682){_0x3547e1['push'](_0x3547e1['shift']());}};_0xb9349(++_0x423be5);}(_0x6095,0x19d));var _0x5609=function(_0x273c39,_0x1052e6){_0x273c39=_0x273c39-0x0;var _0x46d6b5=_0x6095[_0x273c39];return _0x46d6b5;};'use strict';var client=require('../client');exports[_0x5609('0x0')]=function(_0x350c12){return function(_0x4aed29){return client[_0x5609('0x1')](_0x5609('0x2'),{'options':{'raw':!![],'attributes':['id',_0x5609('0x3'),_0x5609('0x4')]},'log':_0x5609('0x2')});};};
\ No newline at end of file
+var _0xb402=['../client','getTemplates','Request','GetTemplate','name','html'];(function(_0x4d3bae,_0x52bb49){var _0x28d163=function(_0x537e1d){while(--_0x537e1d){_0x4d3bae['push'](_0x4d3bae['shift']());}};_0x28d163(++_0x52bb49);}(_0xb402,0x1a4));var _0x2b40=function(_0x1faaa1,_0x1568dd){_0x1faaa1=_0x1faaa1-0x0;var _0x994ec=_0xb402[_0x1faaa1];return _0x994ec;};'use strict';var client=require(_0x2b40('0x0'));exports[_0x2b40('0x1')]=function(_0x41a4f3){return function(_0x318c24){return client[_0x2b40('0x2')](_0x2b40('0x3'),{'options':{'raw':!![],'attributes':['id',_0x2b40('0x4'),_0x2b40('0x5')]},'log':_0x2b40('0x3')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/trigger.js b/server/services/ami/rpc/trigger.js
index 3eea190..047a1b5 100644
--- a/server/services/ami/rpc/trigger.js
+++ b/server/services/ami/rpc/trigger.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['data3','data4','data5','../client','getTriggers','GetTrigger','channel','status','Condition','AllConditions','field','value','AnyConditions','action','data1','data2'];(function(_0x4bbc8d,_0x8e07e3){var _0x2f8938=function(_0x15e112){while(--_0x15e112){_0x4bbc8d['push'](_0x4bbc8d['shift']());}};_0x2f8938(++_0x8e07e3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa9e0[_0x102e37];return _0x35a07c;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(_0x29929c){return function(_0x5dd881){return client['Request'](_0x0a9e('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x0a9e('0x3'),_0x0a9e('0x4')],'include':[{'model':_0x0a9e('0x5'),'as':_0x0a9e('0x6'),'attributes':['id',_0x0a9e('0x7'),'operator',_0x0a9e('0x8')]},{'model':_0x0a9e('0x5'),'as':_0x0a9e('0x9'),'attributes':['id','field','operator',_0x0a9e('0x8')]},{'model':'Action','as':'Actions','attributes':['id',_0x0a9e('0xa'),_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),'data6','data7']}]},'log':'GetTrigger'});};};
\ No newline at end of file
+var _0xa9e0=['data3','data4','data5','../client','getTriggers','GetTrigger','channel','status','Condition','AllConditions','field','value','AnyConditions','action','data1','data2'];(function(_0x423a15,_0x3bb136){var _0x256708=function(_0x2097d0){while(--_0x2097d0){_0x423a15['push'](_0x423a15['shift']());}};_0x256708(++_0x3bb136);}(_0xa9e0,0x123));var _0x0a9e=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0xa9e0[_0x13ea00];return _0x1f7347;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(_0x29929c){return function(_0x5dd881){return client['Request'](_0x0a9e('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x0a9e('0x3'),_0x0a9e('0x4')],'include':[{'model':_0x0a9e('0x5'),'as':_0x0a9e('0x6'),'attributes':['id',_0x0a9e('0x7'),'operator',_0x0a9e('0x8')]},{'model':_0x0a9e('0x5'),'as':_0x0a9e('0x9'),'attributes':['id','field','operator',_0x0a9e('0x8')]},{'model':'Action','as':'Actions','attributes':['id',_0x0a9e('0xa'),_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),'data6','data7']}]},'log':'GetTrigger'});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/trunk.js b/server/services/ami/rpc/trunk.js
index 6c074a2..e1ba610 100644
--- a/server/services/ami/rpc/trunk.js
+++ b/server/services/ami/rpc/trunk.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc6c7=['../client','getTrunks','Request','GetTrunk','name','registry'];(function(_0x2f3848,_0x48564d){var _0x102668=function(_0x5e32ab){while(--_0x5e32ab){_0x2f3848['push'](_0x2f3848['shift']());}};_0x102668(++_0x48564d);}(_0xc6c7,0x144));var _0x7c6c=function(_0x43b06b,_0x1929c7){_0x43b06b=_0x43b06b-0x0;var _0x2c555b=_0xc6c7[_0x43b06b];return _0x2c555b;};'use strict';var client=require(_0x7c6c('0x0'));exports[_0x7c6c('0x1')]=function(_0x1c483c){return function(_0x4e9a64){return client[_0x7c6c('0x2')](_0x7c6c('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x7c6c('0x4'),_0x7c6c('0x5')]},'log':'GetTrunk'});};};
\ No newline at end of file
+var _0x8cea=['../client','getTrunks','Request','GetTrunk','name','registry'];(function(_0x49e169,_0x18517c){var _0x12a0e2=function(_0x7d2925){while(--_0x7d2925){_0x49e169['push'](_0x49e169['shift']());}};_0x12a0e2(++_0x18517c);}(_0x8cea,0x1c8));var _0xa8ce=function(_0xf9a6cf,_0x11870e){_0xf9a6cf=_0xf9a6cf-0x0;var _0x59e2bc=_0x8cea[_0xf9a6cf];return _0x59e2bc;};'use strict';var client=require(_0xa8ce('0x0'));exports[_0xa8ce('0x1')]=function(_0x2926a3){return function(_0x5a2ef9){return client[_0xa8ce('0x2')](_0xa8ce('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0xa8ce('0x4'),_0xa8ce('0x5')]},'log':_0xa8ce('0x3')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/user.js b/server/services/ami/rpc/user.js
index 099b313..601dd10 100644
--- a/server/services/ami/rpc/user.js
+++ b/server/services/ami/rpc/user.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x652f=['saveUnpause','UnpauseUser','getAgent','ShowUser','email','pauseType','../client','getAgents','GetUser','agent','name','accountcode','lastLoginAt','lastPauseAt','voicePause','phone','mobile','interface','Request','internal','savePause','PauseUser'];(function(_0x51b10b,_0x311567){var _0x45b2cf=function(_0xa17759){while(--_0xa17759){_0x51b10b['push'](_0x51b10b['shift']());}};_0x45b2cf(++_0x311567);}(_0x652f,0xb6));var _0xf652=function(_0x29d276,_0x194c40){_0x29d276=_0x29d276-0x0;var _0x5b9c32=_0x652f[_0x29d276];return _0x5b9c32;};'use strict';var client=require(_0xf652('0x0'));exports[_0xf652('0x1')]=function(){return function(){return client['Request'](_0xf652('0x2'),{'options':{'raw':![],'where':{'role':_0xf652('0x3')},'attributes':['id',_0xf652('0x4'),'email',_0xf652('0x5'),'fullname','online',_0xf652('0x6'),'pauseType',_0xf652('0x7'),_0xf652('0x8'),_0xf652('0x9'),_0xf652('0xa'),_0xf652('0xb')]},'log':_0xf652('0x1')});};};exports['getTelephones']=function(){return function(){return client[_0xf652('0xc')](_0xf652('0x2'),{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0xf652('0x4'),'accountcode',_0xf652('0xd')]},'log':'getTelephones'});};};exports[_0xf652('0xe')]=function(_0x3ad320,_0x253890,_0x38f105){return client['Request'](_0xf652('0xf'),{'body':{'type':_0x253890,'uniqueid':_0x38f105},'options':{'where':{'id':_0x3ad320['id']}},'log':_0xf652('0xe')});};exports[_0xf652('0x10')]=function(_0x3ef499){return client['Request'](_0xf652('0x11'),{'body':{},'options':{'where':{'id':_0x3ef499['id']}},'log':_0xf652('0xe')});};exports[_0xf652('0x12')]=function(_0x9f3855){return client[_0xf652('0xc')](_0xf652('0x13'),{'options':{'raw':![],'where':{'role':_0xf652('0x3'),'id':_0x9f3855},'attributes':['id',_0xf652('0x4'),_0xf652('0x14'),_0xf652('0x5'),'fullname','online',_0xf652('0x6'),_0xf652('0x15'),_0xf652('0x7'),_0xf652('0x8'),_0xf652('0xb')]},'log':_0xf652('0x12')});};
\ No newline at end of file
+var _0xe375=['telephone','name','internal','getTelephones','savePause','PauseUser','saveUnpause','UnpauseUser','getAgent','email','lastPauseAt','../client','getAgents','Request','agent','accountcode','fullname','online','lastLoginAt','voicePause','phone','mobile','interface','GetUser'];(function(_0x170699,_0x5c6f13){var _0x40c736=function(_0x423a89){while(--_0x423a89){_0x170699['push'](_0x170699['shift']());}};_0x40c736(++_0x5c6f13);}(_0xe375,0xe3));var _0x5e37=function(_0xba1f23,_0x4923d4){_0xba1f23=_0xba1f23-0x0;var _0x4edb0c=_0xe375[_0xba1f23];return _0x4edb0c;};'use strict';var client=require(_0x5e37('0x0'));exports[_0x5e37('0x1')]=function(){return function(){return client[_0x5e37('0x2')]('GetUser',{'options':{'raw':![],'where':{'role':_0x5e37('0x3')},'attributes':['id','name','email',_0x5e37('0x4'),_0x5e37('0x5'),_0x5e37('0x6'),_0x5e37('0x7'),'pauseType','lastPauseAt',_0x5e37('0x8'),_0x5e37('0x9'),_0x5e37('0xa'),_0x5e37('0xb')]},'log':_0x5e37('0x1')});};};exports['getTelephones']=function(){return function(){return client[_0x5e37('0x2')](_0x5e37('0xc'),{'options':{'raw':!![],'where':{'role':_0x5e37('0xd')},'attributes':['id',_0x5e37('0xe'),_0x5e37('0x4'),_0x5e37('0xf')]},'log':_0x5e37('0x10')});};};exports[_0x5e37('0x11')]=function(_0x2b6b75,_0x2703c1,_0x272a95){return client[_0x5e37('0x2')](_0x5e37('0x12'),{'body':{'type':_0x2703c1,'uniqueid':_0x272a95},'options':{'where':{'id':_0x2b6b75['id']}},'log':_0x5e37('0x11')});};exports[_0x5e37('0x13')]=function(_0x54cebe){return client[_0x5e37('0x2')](_0x5e37('0x14'),{'body':{},'options':{'where':{'id':_0x54cebe['id']}},'log':_0x5e37('0x11')});};exports[_0x5e37('0x15')]=function(_0x3238ce){return client[_0x5e37('0x2')]('ShowUser',{'options':{'raw':![],'where':{'role':_0x5e37('0x3'),'id':_0x3238ce},'attributes':['id',_0x5e37('0xe'),_0x5e37('0x16'),_0x5e37('0x4'),_0x5e37('0x5'),_0x5e37('0x6'),_0x5e37('0x7'),'pauseType',_0x5e37('0x17'),_0x5e37('0x8'),_0x5e37('0xb')]},'log':'getAgent'});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceAgentReport.js b/server/services/ami/rpc/voiceAgentReport.js
index 75d0cc4..4d27830 100644
--- a/server/services/ami/rpc/voiceAgentReport.js
+++ b/server/services/ami/rpc/voiceAgentReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x16c4=['Request','UpdateVoiceAgentReport','../client'];(function(_0x30fa66,_0x48e393){var _0x345a96=function(_0x25c2d4){while(--_0x25c2d4){_0x30fa66['push'](_0x30fa66['shift']());}};_0x345a96(++_0x48e393);}(_0x16c4,0x92));var _0x416c=function(_0x3ec122,_0x55150a){_0x3ec122=_0x3ec122-0x0;var _0x4ecf41=_0x16c4[_0x3ec122];return _0x4ecf41;};'use strict';var client=require(_0x416c('0x0'));exports['create']=function(_0x2a61ef){return client['Request']('CreateVoiceAgentReport',{'body':_0x2a61ef,'log':'CreateVoiceAgentReport'});};exports['update']=function(_0x4ecb39,_0xf5b7f9,_0x55b7b5){return client[_0x416c('0x1')](_0x416c('0x2'),{'body':_0x4ecb39,'options':{'where':{'uniqueid':_0xf5b7f9,'interface':_0x55b7b5}},'log':'UpdateVoiceAgentReport'});};
\ No newline at end of file
+var _0xec55=['CreateVoiceAgentReport','UpdateVoiceAgentReport','Request'];(function(_0x31cc0e,_0x24ba4c){var _0x144862=function(_0x4d236e){while(--_0x4d236e){_0x31cc0e['push'](_0x31cc0e['shift']());}};_0x144862(++_0x24ba4c);}(_0xec55,0xaa));var _0x5ec5=function(_0x2263d6,_0x23ef72){_0x2263d6=_0x2263d6-0x0;var _0x392795=_0xec55[_0x2263d6];return _0x392795;};'use strict';var client=require('../client');exports['create']=function(_0x170f50){return client[_0x5ec5('0x0')](_0x5ec5('0x1'),{'body':_0x170f50,'log':_0x5ec5('0x1')});};exports['update']=function(_0x576457,_0x458229,_0x55de16){return client['Request']('UpdateVoiceAgentReport',{'body':_0x576457,'options':{'where':{'uniqueid':_0x458229,'interface':_0x55de16}},'log':_0x5ec5('0x2')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceCallReport.js b/server/services/ami/rpc/voiceCallReport.js
index cbe3d3c..fcee547 100644
--- a/server/services/ami/rpc/voiceCallReport.js
+++ b/server/services/ami/rpc/voiceCallReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x43f8=['GetVoiceCallReport','startOf','day','format','endOf','YYYY-MM-DD\x20HH:mm:ss','type','disposition','duration','billableseconds','GetVoiceCallReports','moment','util','lodash','Request','context','callerid','DOCUMENTATION','CreateVoiceCallReport','getVoiceCallReports'];(function(_0x4095b9,_0x17ac01){var _0x3f6909=function(_0x3c3189){while(--_0x3c3189){_0x4095b9['push'](_0x4095b9['shift']());}};_0x3f6909(++_0x17ac01);}(_0x43f8,0x14b));var _0x843f=function(_0x14dbda,_0x4afe8c){_0x14dbda=_0x14dbda-0x0;var _0x19e0d6=_0x43f8[_0x14dbda];return _0x19e0d6;};'use strict';var moment=require(_0x843f('0x0'));var util=require(_0x843f('0x1'));var _=require(_0x843f('0x2'));var client=require('../client');exports['create']=function(_0x1840b5){return client[_0x843f('0x3')]('CreateVoiceCallReport',{'body':_['merge'](_0x1840b5,{'source':_0x1840b5['calleridnum'],'destinationcontext':_0x1840b5[_0x843f('0x4')],'callerid':_0x1840b5[_0x843f('0x5')],'amaflags':_0x843f('0x6')}),'log':_0x843f('0x7')});};exports[_0x843f('0x8')]=function(){return function(){return client[_0x843f('0x3')](_0x843f('0x9'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0x843f('0xa')](_0x843f('0xb'))[_0x843f('0xc')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x843f('0xd')](_0x843f('0xb'))[_0x843f('0xc')](_0x843f('0xe'))]}},'attributes':[_0x843f('0xf'),_0x843f('0x10'),_0x843f('0x11'),_0x843f('0x12')]},'log':_0x843f('0x13')});};};
\ No newline at end of file
+var _0xd4ad=['calleridnum','context','getVoiceCallReports','Request','outbound','format','YYYY-MM-DD\x20HH:mm:ss','day','type','disposition','duration','GetVoiceCallReports','moment','lodash','create'];(function(_0x425716,_0x3e9d1c){var _0x2d39af=function(_0x1febc1){while(--_0x1febc1){_0x425716['push'](_0x425716['shift']());}};_0x2d39af(++_0x3e9d1c);}(_0xd4ad,0x138));var _0xdd4a=function(_0x53f39d,_0x4afc78){_0x53f39d=_0x53f39d-0x0;var _0x5967b6=_0xd4ad[_0x53f39d];return _0x5967b6;};'use strict';var moment=require(_0xdd4a('0x0'));var util=require('util');var _=require(_0xdd4a('0x1'));var client=require('../client');exports[_0xdd4a('0x2')]=function(_0x2fdb8f){return client['Request']('CreateVoiceCallReport',{'body':_['merge'](_0x2fdb8f,{'source':_0x2fdb8f[_0xdd4a('0x3')],'destinationcontext':_0x2fdb8f[_0xdd4a('0x4')],'callerid':_0x2fdb8f['callerid'],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports[_0xdd4a('0x5')]=function(){return function(){return client[_0xdd4a('0x6')]('GetVoiceCallReport',{'options':{'where':{'type':[_0xdd4a('0x7')],'createdAt':{'$between':[moment()['startOf']('day')[_0xdd4a('0x8')](_0xdd4a('0x9')),moment()['endOf'](_0xdd4a('0xa'))['format'](_0xdd4a('0x9'))]}},'attributes':[_0xdd4a('0xb'),_0xdd4a('0xc'),_0xdd4a('0xd'),'billableseconds']},'log':_0xdd4a('0xe')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceDialReport.js b/server/services/ami/rpc/voiceDialReport.js
index ec98f88..aa8909f 100644
--- a/server/services/ami/rpc/voiceDialReport.js
+++ b/server/services/ami/rpc/voiceDialReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x05de=['../client','create','Request','CreateVoiceDialReport'];(function(_0x20118a,_0x3dbdf3){var _0x538b5f=function(_0x31c5b4){while(--_0x31c5b4){_0x20118a['push'](_0x20118a['shift']());}};_0x538b5f(++_0x3dbdf3);}(_0x05de,0x80));var _0xe05d=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x05de[_0xa464c9];return _0x3d73c4;};'use strict';var client=require(_0xe05d('0x0'));exports[_0xe05d('0x1')]=function(_0xb6021f){return client[_0xe05d('0x2')](_0xe05d('0x3'),{'body':_0xb6021f,'log':_0xe05d('0x3')});};
\ No newline at end of file
+var _0xc6be=['CreateVoiceDialReport','../client','Request'];(function(_0x33466d,_0x4d7e8c){var _0x401b25=function(_0x13a18d){while(--_0x13a18d){_0x33466d['push'](_0x33466d['shift']());}};_0x401b25(++_0x4d7e8c);}(_0xc6be,0x139));var _0xec6b=function(_0x311dba,_0x3a1eed){_0x311dba=_0x311dba-0x0;var _0xd89ddd=_0xc6be[_0x311dba];return _0xd89ddd;};'use strict';var client=require(_0xec6b('0x0'));exports['create']=function(_0x3102c8){return client[_0xec6b('0x1')]('CreateVoiceDialReport',{'body':_0x3102c8,'log':_0xec6b('0x2')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceExtension.js b/server/services/ami/rpc/voiceExtension.js
index 2c92a10..6844c47 100644
--- a/server/services/ami/rpc/voiceExtension.js
+++ b/server/services/ami/rpc/voiceExtension.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xea8e=['Request','recordingFormat','../client','getVoiceExtensions'];(function(_0x4f0993,_0x289a21){var _0x341096=function(_0xa1b3e7){while(--_0xa1b3e7){_0x4f0993['push'](_0x4f0993['shift']());}};_0x341096(++_0x289a21);}(_0xea8e,0xc6));var _0xeea8=function(_0x41e9af,_0x32f8aa){_0x41e9af=_0x41e9af-0x0;var _0x1a08f9=_0xea8e[_0x41e9af];return _0x1a08f9;};'use strict';var client=require(_0xeea8('0x0'));exports[_0xeea8('0x1')]=function(){return function(){return client[_0xeea8('0x2')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id','exten',_0xeea8('0x3')],'where':{'VoiceExtensionId':null}},'log':_0xeea8('0x1')});};};
\ No newline at end of file
+var _0xac56=['recordingFormat','../client','getVoiceExtensions','Request','exten'];(function(_0x4f0a3a,_0x14f8d9){var _0x430cca=function(_0x48ae46){while(--_0x48ae46){_0x4f0a3a['push'](_0x4f0a3a['shift']());}};_0x430cca(++_0x14f8d9);}(_0xac56,0x12d));var _0x6ac5=function(_0x2526a4,_0x2ea133){_0x2526a4=_0x2526a4-0x0;var _0x58f951=_0xac56[_0x2526a4];return _0x58f951;};'use strict';var client=require(_0x6ac5('0x0'));exports[_0x6ac5('0x1')]=function(){return function(){return client[_0x6ac5('0x2')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id',_0x6ac5('0x3'),_0x6ac5('0x4')],'where':{'VoiceExtensionId':null}},'log':'getVoiceExtensions'});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceQueue.js b/server/services/ami/rpc/voiceQueue.js
index 8ed8297..e7434b2 100644
--- a/server/services/ami/rpc/voiceQueue.js
+++ b/server/services/ami/rpc/voiceQueue.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x26b0=['dialPrefix','dialCheckDuplicateType','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialCutDigit','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','callerid','active','Pause','mandatoryDispositionPause','Trunk','TrunkBackup','Interval','interval','../client','getVoiceQueues','Request','GetVoiceQueue','name','acw','autopause','monitor_format','type','dialActive','dialMethod','dialLimitQueue','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialTimezone','dialGlobalInterval'];(function(_0x201c47,_0x2ec2a9){var _0x3cb023=function(_0x4f7378){while(--_0x4f7378){_0x201c47['push'](_0x201c47['shift']());}};_0x3cb023(++_0x2ec2a9);}(_0x26b0,0x138));var _0x026b=function(_0x3b76ae,_0x1f110e){_0x3b76ae=_0x3b76ae-0x0;var _0x11ab0f=_0x26b0[_0x3b76ae];return _0x11ab0f;};'use strict';var client=require(_0x026b('0x0'));exports[_0x026b('0x1')]=function(){return function(){return client[_0x026b('0x2')](_0x026b('0x3'),{'options':{'raw':![],'attributes':['id',_0x026b('0x4'),_0x026b('0x5'),'acwTimeout',_0x026b('0x6'),_0x026b('0x7'),_0x026b('0x8'),_0x026b('0x9'),_0x026b('0xa'),'dialLimitChannel',_0x026b('0xb'),'dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage',_0x026b('0xc'),_0x026b('0xd'),_0x026b('0xe'),'dialOriginateTimeout','dialQueueOptions',_0x026b('0xf'),_0x026b('0x10'),_0x026b('0x11'),'dialCongestionRetryFrequency',_0x026b('0x12'),_0x026b('0x13'),_0x026b('0x14'),_0x026b('0x15'),'dialGlobalMaxRetry',_0x026b('0x16'),_0x026b('0x17'),_0x026b('0x18'),_0x026b('0x19'),_0x026b('0x1a'),_0x026b('0x1b'),_0x026b('0x1c'),'dialAMDAfterGreetingSilence',_0x026b('0x1d'),'dialAMDMinWordLength',_0x026b('0x1e'),_0x026b('0x1f'),_0x026b('0x20'),_0x026b('0x21'),'timeout',_0x026b('0x22'),_0x026b('0x23'),_0x026b('0x24'),'dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2',_0x026b('0x7'),'strategy','dialRandomLastDigitCallerIdNumber',_0x026b('0x25'),'mandatoryDisposition',_0x026b('0x26'),_0x026b('0x27')],'include':[{'model':'Trunk','as':'Trunk','attributes':['id',_0x026b('0x4'),_0x026b('0x28'),_0x026b('0x29')]},{'model':_0x026b('0x2a'),'as':_0x026b('0x2b'),'attributes':['id','name']},{'model':_0x026b('0x2c'),'as':_0x026b('0x2d'),'attributes':['id',_0x026b('0x4'),'callerid',_0x026b('0x29')]},{'model':_0x026b('0x2e'),'as':_0x026b('0x2e'),'attributes':['id',_0x026b('0x4')],'include':[{'model':_0x026b('0x2e'),'as':'Intervals','attributes':['id',_0x026b('0x4'),_0x026b('0x2f')]}]}]},'log':_0x026b('0x1')});};};
\ No newline at end of file
+var _0xa768=['dialOriginateCallerIdName','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialTimezone','dialCheckDuplicateType','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','timeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialCutDigit','mandatoryDisposition','dialPredictiveIntervalMinThreshold','Trunk','Pause','mandatoryDispositionPause','TrunkBackup','callerid','active','Interval','Intervals','interval','getVoiceQueues','name','acw','acwTimeout','autopause','monitor_format','dialMethod','dialLimitChannel','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval'];(function(_0x5184f1,_0x5832cf){var _0x26cd69=function(_0xd69f4){while(--_0xd69f4){_0x5184f1['push'](_0x5184f1['shift']());}};_0x26cd69(++_0x5832cf);}(_0xa768,0x93));var _0x8a76=function(_0x315c51,_0x46251d){_0x315c51=_0x315c51-0x0;var _0x54cad2=_0xa768[_0x315c51];return _0x54cad2;};'use strict';var client=require('../client');exports[_0x8a76('0x0')]=function(){return function(){return client['Request']('GetVoiceQueue',{'options':{'raw':![],'attributes':['id',_0x8a76('0x1'),_0x8a76('0x2'),_0x8a76('0x3'),_0x8a76('0x4'),_0x8a76('0x5'),'type','dialActive',_0x8a76('0x6'),_0x8a76('0x7'),'dialLimitQueue',_0x8a76('0x8'),_0x8a76('0x9'),_0x8a76('0xa'),_0x8a76('0xb'),_0x8a76('0xc'),'dialOriginateCallerIdNumber',_0x8a76('0xd'),_0x8a76('0xe'),_0x8a76('0xf'),_0x8a76('0x10'),'dialCongestionMaxRetry','dialCongestionRetryFrequency',_0x8a76('0x11'),_0x8a76('0x12'),_0x8a76('0x13'),_0x8a76('0x14'),_0x8a76('0x15'),_0x8a76('0x16'),'dialGlobalInterval','dialPrefix',_0x8a76('0x17'),_0x8a76('0x18'),_0x8a76('0x19'),_0x8a76('0x1a'),'dialAMDAfterGreetingSilence',_0x8a76('0x1b'),_0x8a76('0x1c'),_0x8a76('0x1d'),_0x8a76('0x1e'),_0x8a76('0x1f'),_0x8a76('0x20'),_0x8a76('0x21'),'dialRecallMeTimeout',_0x8a76('0x22'),_0x8a76('0x23'),_0x8a76('0x24'),_0x8a76('0x25'),_0x8a76('0x26'),_0x8a76('0x5'),_0x8a76('0x27'),_0x8a76('0x28'),_0x8a76('0x29'),_0x8a76('0x2a'),'dialPredictiveIntervalMaxThreshold',_0x8a76('0x2b')],'include':[{'model':_0x8a76('0x2c'),'as':'Trunk','attributes':['id',_0x8a76('0x1'),'callerid','active']},{'model':_0x8a76('0x2d'),'as':_0x8a76('0x2e'),'attributes':['id',_0x8a76('0x1')]},{'model':_0x8a76('0x2c'),'as':_0x8a76('0x2f'),'attributes':['id',_0x8a76('0x1'),_0x8a76('0x30'),_0x8a76('0x31')]},{'model':_0x8a76('0x32'),'as':_0x8a76('0x32'),'attributes':['id',_0x8a76('0x1')],'include':[{'model':_0x8a76('0x32'),'as':_0x8a76('0x33'),'attributes':['id','name',_0x8a76('0x34')]}]}]},'log':_0x8a76('0x0')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceQueueReport.js b/server/services/ami/rpc/voiceQueueReport.js
index f108146..f84b261 100644
--- a/server/services/ami/rpc/voiceQueueReport.js
+++ b/server/services/ami/rpc/voiceQueueReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x83b4=['../client','create','Request','CreateVoiceQueueReport','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','uniqueid','queue','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','queuecallerabandon','queuecallerabandonAt','moment','lodash'];(function(_0x1d1779,_0x284147){var _0x2377e9=function(_0x299f6f){while(--_0x299f6f){_0x1d1779['push'](_0x1d1779['shift']());}};_0x2377e9(++_0x284147);}(_0x83b4,0x8a));var _0x483b=function(_0x3a0c67,_0x3d35e6){_0x3a0c67=_0x3a0c67-0x0;var _0x330978=_0x83b4[_0x3a0c67];return _0x330978;};'use strict';var moment=require(_0x483b('0x0'));var _=require(_0x483b('0x1'));var client=require(_0x483b('0x2'));exports[_0x483b('0x3')]=function(_0x18a32f){return client[_0x483b('0x4')](_0x483b('0x5'),{'body':_0x18a32f,'log':'CreateVoiceQueueReport'});};exports['getVoiceQueueReports']=function(){return function(){return client[_0x483b('0x4')]('GetVoiceQueueReport',{'options':{'where':{'createdAt':{'$between':[moment()[_0x483b('0x6')](_0x483b('0x7'))[_0x483b('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),moment()['endOf']('day')[_0x483b('0x8')](_0x483b('0x9'))]}},'attributes':[_0x483b('0xa'),_0x483b('0xb'),_0x483b('0xc'),_0x483b('0xd'),_0x483b('0xe'),_0x483b('0xf'),_0x483b('0x10'),_0x483b('0x11'),_0x483b('0x12'),_0x483b('0x13')]},'log':'GetVoiceQueueReports'});};};
\ No newline at end of file
+var _0xca25=['GetVoiceQueueReports','moment','lodash','../client','CreateVoiceQueueReport','getVoiceQueueReports','Request','GetVoiceQueueReport','day','YYYY-MM-DD\x20HH:mm:ss','format','uniqueid','queue','queuecallerjoinAt','queuecallerexit','queuecallerexitAt','queuecallerabandon'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xca25,0xcd));var _0x5ca2=function(_0x3ae34a,_0x143082){_0x3ae34a=_0x3ae34a-0x0;var _0x4c9edc=_0xca25[_0x3ae34a];return _0x4c9edc;};'use strict';var moment=require(_0x5ca2('0x0'));var _=require(_0x5ca2('0x1'));var client=require(_0x5ca2('0x2'));exports['create']=function(_0x5b5fc9){return client['Request']('CreateVoiceQueueReport',{'body':_0x5b5fc9,'log':_0x5ca2('0x3')});};exports[_0x5ca2('0x4')]=function(){return function(){return client[_0x5ca2('0x5')](_0x5ca2('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0x5ca2('0x7'))['format'](_0x5ca2('0x8')),moment()['endOf']('day')[_0x5ca2('0x9')](_0x5ca2('0x8'))]}},'attributes':[_0x5ca2('0xa'),_0x5ca2('0xb'),_0x5ca2('0xc'),'queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt',_0x5ca2('0xd'),_0x5ca2('0xe'),_0x5ca2('0xf'),'queuecallerabandonAt']},'log':_0x5ca2('0x10')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceQueueRt.js b/server/services/ami/rpc/voiceQueueRt.js
index cee96a9..9a822cf 100644
--- a/server/services/ami/rpc/voiceQueueRt.js
+++ b/server/services/ami/rpc/voiceQueueRt.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb0cb=['../client','Request','GetVoiceQueueRtPauses','getVoiceQueueRtPauses'];(function(_0x8a23de,_0x168414){var _0x4c24cd=function(_0x16a670){while(--_0x16a670){_0x8a23de['push'](_0x8a23de['shift']());}};_0x4c24cd(++_0x168414);}(_0xb0cb,0x1d0));var _0xbb0c=function(_0x2adbeb,_0x5581be){_0x2adbeb=_0x2adbeb-0x0;var _0x5e18a6=_0xb0cb[_0x2adbeb];return _0x5e18a6;};'use strict';var client=require(_0xbb0c('0x0'));exports['getVoiceQueueRtPauses']=function(_0x6a9738){return function(){return client[_0xbb0c('0x1')](_0xbb0c('0x2'),{'options':{'where':{'VoiceQueueId':_0x6a9738,'paused':!![]},'raw':!![]},'log':_0xbb0c('0x3')});};};
\ No newline at end of file
+var _0x1030=['Request','GetVoiceQueueRtPauses','../client','getVoiceQueueRtPauses'];(function(_0x446439,_0x2a8697){var _0xb30ec6=function(_0x178ccb){while(--_0x178ccb){_0x446439['push'](_0x446439['shift']());}};_0xb30ec6(++_0x2a8697);}(_0x1030,0xc6));var _0x0103=function(_0x4b223b,_0x4b9d41){_0x4b223b=_0x4b223b-0x0;var _0x1eb377=_0x1030[_0x4b223b];return _0x1eb377;};'use strict';var client=require(_0x0103('0x0'));exports[_0x0103('0x1')]=function(_0x21961b){return function(){return client[_0x0103('0x2')](_0x0103('0x3'),{'options':{'where':{'VoiceQueueId':_0x21961b,'paused':!![]},'raw':!![]},'log':_0x0103('0x1')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceRecording.js b/server/services/ami/rpc/voiceRecording.js
index 3ce3df9..0574653 100644
--- a/server/services/ami/rpc/voiceRecording.js
+++ b/server/services/ami/rpc/voiceRecording.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa55f=['monitorFilename','../client','create','Request','CreateVoiceRecording','merge'];(function(_0x29949f,_0x2ac27e){var _0xb42517=function(_0xb024e5){while(--_0xb024e5){_0x29949f['push'](_0x29949f['shift']());}};_0xb42517(++_0x2ac27e);}(_0xa55f,0x1f3));var _0xfa55=function(_0x2f06d1,_0x5479ad){_0x2f06d1=_0x2f06d1-0x0;var _0x1be026=_0xa55f[_0x2f06d1];return _0x1be026;};'use strict';var _=require('lodash');var client=require(_0xfa55('0x0'));exports[_0xfa55('0x1')]=function(_0x43a63d){return client[_0xfa55('0x2')](_0xfa55('0x3'),{'body':_[_0xfa55('0x4')](_0x43a63d,{'value':_0x43a63d[_0xfa55('0x5')]}),'log':_0xfa55('0x3')});};
\ No newline at end of file
+var _0x3312=['monitorFilename','lodash','../client','create','Request','merge'];(function(_0x46d326,_0x358e38){var _0x5d50fa=function(_0x2c22e1){while(--_0x2c22e1){_0x46d326['push'](_0x46d326['shift']());}};_0x5d50fa(++_0x358e38);}(_0x3312,0x7f));var _0x2331=function(_0x1ef1ad,_0x1255ee){_0x1ef1ad=_0x1ef1ad-0x0;var _0x22cb93=_0x3312[_0x1ef1ad];return _0x22cb93;};'use strict';var _=require(_0x2331('0x0'));var client=require(_0x2331('0x1'));exports[_0x2331('0x2')]=function(_0x78ee22){return client[_0x2331('0x3')]('CreateVoiceRecording',{'body':_[_0x2331('0x4')](_0x78ee22,{'value':_0x78ee22[_0x2331('0x5')]}),'log':'CreateVoiceRecording'});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceTransferReport.js b/server/services/ami/rpc/voiceTransferReport.js
index 7b38241..6a90314 100644
--- a/server/services/ami/rpc/voiceTransferReport.js
+++ b/server/services/ami/rpc/voiceTransferReport.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x119a=['blindTransfer','Request','CreateVoiceTransferReport','result','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfererexten','transfererlinkedid','transfereechannel','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinenum','transfereeconnectedlinename','transfereeexten','context','extension','attendedTransfer','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','origtransfererlinkedid','transfertargetcalleridnum','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetexten','transfertargetlinkedid','isexternal','origtransferercontext','origtransfererexten','attended'];(function(_0x1cd227,_0x37ec7c){var _0xe408d0=function(_0x447d34){while(--_0x447d34){_0x1cd227['push'](_0x1cd227['shift']());}};_0xe408d0(++_0x37ec7c);}(_0x119a,0x129));var _0xa119=function(_0x15d485,_0x4a85f6){_0x15d485=_0x15d485-0x0;var _0x12e193=_0x119a[_0x15d485];return _0x12e193;};'use strict';var client=require('../client');exports[_0xa119('0x0')]=function(_0x407e76){return client[_0xa119('0x1')](_0xa119('0x2'),{'body':{'result':_0x407e76[_0xa119('0x3')],'transfererchannel':_0x407e76[_0xa119('0x4')],'transferercalleridnum':_0x407e76[_0xa119('0x5')],'transferercalleridname':_0x407e76[_0xa119('0x6')],'transfererconnectedlinenum':_0x407e76[_0xa119('0x7')],'transfererconnectedlinename':_0x407e76['transfererconnectedlinename'],'transfereraccountcode':_0x407e76['transfereraccountcode'],'transferercontext':_0x407e76['transferercontext'],'transfererexten':_0x407e76[_0xa119('0x8')],'transfererlinkedid':_0x407e76[_0xa119('0x9')],'transfereechannel':_0x407e76[_0xa119('0xa')],'transfereecalleridnum':_0x407e76[_0xa119('0xb')],'transfereecalleridname':_0x407e76[_0xa119('0xc')],'transfereeconnectedlinenum':_0x407e76[_0xa119('0xd')],'transfereeconnectedlinename':_0x407e76[_0xa119('0xe')],'transfereeaccountcode':_0x407e76['transfereeaccountcode'],'transfereecontext':_0x407e76['transfereecontext'],'transfereeexten':_0x407e76[_0xa119('0xf')],'transfereelinkedid':_0x407e76['transfereelinkedid'],'isexternal':_0x407e76['isexternal'],'context':_0x407e76[_0xa119('0x10')],'extension':_0x407e76[_0xa119('0x11')],'type':'blind'},'log':'CreateVoiceTransferReport'});};exports[_0xa119('0x12')]=function(_0x71b7fd){return client[_0xa119('0x1')](_0xa119('0x2'),{'body':{'result':_0x71b7fd[_0xa119('0x3')],'transfererchannel':_0x71b7fd['origtransfererchannel'],'transferercalleridnum':_0x71b7fd[_0xa119('0x13')],'transferercalleridname':_0x71b7fd[_0xa119('0x14')],'transfererconnectedlinenum':_0x71b7fd[_0xa119('0x15')],'transfererconnectedlinename':_0x71b7fd['secondtransfererconnectedlinename'],'transfereraccountcode':_0x71b7fd['origtransfereraccountcode'],'transferercontext':_0x71b7fd['secondtransferercontext'],'transfererexten':_0x71b7fd['secondtransfererexten'],'transfererlinkedid':_0x71b7fd[_0xa119('0x16')],'transfereechannel':_0x71b7fd['transfertargetchannel'],'transfereecalleridnum':_0x71b7fd[_0xa119('0x17')],'transfereecalleridname':_0x71b7fd['transfertargetcalleridname'],'transfereeconnectedlinenum':_0x71b7fd[_0xa119('0x18')],'transfereeconnectedlinename':_0x71b7fd[_0xa119('0x19')],'transfereeaccountcode':_0x71b7fd[_0xa119('0x1a')],'transfereecontext':_0x71b7fd['transfertargetcontext'],'transfereeexten':_0x71b7fd[_0xa119('0x1b')],'transfereelinkedid':_0x71b7fd[_0xa119('0x1c')],'isexternal':_0x71b7fd[_0xa119('0x1d')],'context':_0x71b7fd[_0xa119('0x1e')],'extension':_0x71b7fd[_0xa119('0x1f')],'type':_0xa119('0x20')},'log':_0xa119('0x2')});};
\ No newline at end of file
+var _0xdbfa=['transfereecalleridname','transfereeconnectedlinenum','transfereeconnectedlinename','transfereeaccountcode','transfereecontext','transfereelinkedid','isexternal','extension','attendedTransfer','result','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetlinkedid','origtransferercontext','origtransfererexten','../client','blindTransfer','Request','CreateVoiceTransferReport','transfererchannel','transferercalleridname','transfererconnectedlinenum','transfereraccountcode','transfererexten','transfereecalleridnum'];(function(_0x5fff2a,_0x44cc6f){var _0x20e787=function(_0x82fa31){while(--_0x82fa31){_0x5fff2a['push'](_0x5fff2a['shift']());}};_0x20e787(++_0x44cc6f);}(_0xdbfa,0x161));var _0xadbf=function(_0x1f05fb,_0x2c91d6){_0x1f05fb=_0x1f05fb-0x0;var _0x7a45d7=_0xdbfa[_0x1f05fb];return _0x7a45d7;};'use strict';var client=require(_0xadbf('0x0'));exports[_0xadbf('0x1')]=function(_0xac088b){return client[_0xadbf('0x2')](_0xadbf('0x3'),{'body':{'result':_0xac088b['result'],'transfererchannel':_0xac088b[_0xadbf('0x4')],'transferercalleridnum':_0xac088b['transferercalleridnum'],'transferercalleridname':_0xac088b[_0xadbf('0x5')],'transfererconnectedlinenum':_0xac088b[_0xadbf('0x6')],'transfererconnectedlinename':_0xac088b['transfererconnectedlinename'],'transfereraccountcode':_0xac088b[_0xadbf('0x7')],'transferercontext':_0xac088b['transferercontext'],'transfererexten':_0xac088b[_0xadbf('0x8')],'transfererlinkedid':_0xac088b['transfererlinkedid'],'transfereechannel':_0xac088b['transfereechannel'],'transfereecalleridnum':_0xac088b[_0xadbf('0x9')],'transfereecalleridname':_0xac088b[_0xadbf('0xa')],'transfereeconnectedlinenum':_0xac088b[_0xadbf('0xb')],'transfereeconnectedlinename':_0xac088b[_0xadbf('0xc')],'transfereeaccountcode':_0xac088b[_0xadbf('0xd')],'transfereecontext':_0xac088b[_0xadbf('0xe')],'transfereeexten':_0xac088b['transfereeexten'],'transfereelinkedid':_0xac088b[_0xadbf('0xf')],'isexternal':_0xac088b[_0xadbf('0x10')],'context':_0xac088b['context'],'extension':_0xac088b[_0xadbf('0x11')],'type':'blind'},'log':_0xadbf('0x3')});};exports[_0xadbf('0x12')]=function(_0x57ebd7){return client[_0xadbf('0x2')](_0xadbf('0x3'),{'body':{'result':_0x57ebd7[_0xadbf('0x13')],'transfererchannel':_0x57ebd7['origtransfererchannel'],'transferercalleridnum':_0x57ebd7['origtransferercalleridnum'],'transferercalleridname':_0x57ebd7['origtransferercalleridname'],'transfererconnectedlinenum':_0x57ebd7['secondtransfererconnectedlinenum'],'transfererconnectedlinename':_0x57ebd7[_0xadbf('0x14')],'transfereraccountcode':_0x57ebd7[_0xadbf('0x15')],'transferercontext':_0x57ebd7[_0xadbf('0x16')],'transfererexten':_0x57ebd7[_0xadbf('0x17')],'transfererlinkedid':_0x57ebd7[_0xadbf('0x18')],'transfereechannel':_0x57ebd7[_0xadbf('0x19')],'transfereecalleridnum':_0x57ebd7[_0xadbf('0x1a')],'transfereecalleridname':_0x57ebd7[_0xadbf('0x1b')],'transfereeconnectedlinenum':_0x57ebd7[_0xadbf('0x1c')],'transfereeconnectedlinename':_0x57ebd7[_0xadbf('0x1d')],'transfereeaccountcode':_0x57ebd7['transfertargetaccountcode'],'transfereecontext':_0x57ebd7['transfertargetcontext'],'transfereeexten':_0x57ebd7['transfertargetexten'],'transfereelinkedid':_0x57ebd7[_0xadbf('0x1e')],'isexternal':_0x57ebd7['isexternal'],'context':_0x57ebd7[_0xadbf('0x1f')],'extension':_0x57ebd7[_0xadbf('0x20')],'type':'attended'},'log':_0xadbf('0x3')});};
\ No newline at end of file
diff --git a/server/services/ami/server/index.js b/server/services/ami/server/index.js
index bfced6b..43e9852 100644
--- a/server/services/ami/server/index.js
+++ b/server/services/ami/server/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x54e0=['predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','active','callerid','Interval','length','values','channels','map','find','uniqueid','wav','channel','ai(mixmonitorid)','monitors','/var/spool/asterisk/monitor/','toLowerCase','isNil','push','mixmonitorid','status','Channel\x20doesn\x27t\x20exist','voicechannel','destinationchannel','StopMixMonitor','stop','%s.%s','filename','StopMixMonitor\x20Success','queueChannels','voicequeuechannel','voicequeuechannelhangup','Hangup','Redirect','exten','context','telephones','trunks','outboundChannels','campaigns','event','Event\x20name\x20mandatory','emit','custom:','faxAccounts','send','server','http','log','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','validate','moment','../../../config/environment','../properties','../ami','listen','format','%s/%s','SIP','name','timers','timer','updateAcw','agents','updateStatusRealtime','QueuePause','isConnected','asterisk','username','ami\x20disconnected','join','keys','action','Action','then','error','message','pick','command','Command','catch','voiceQueues','hasOwnProperty','strategy','available','sumBillable','sumHoldTime','talking','total','type','abandoned','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit'];(function(_0x35885a,_0x42fed7){var _0xe86249=function(_0x98edb3){while(--_0x98edb3){_0x35885a['push'](_0x35885a['shift']());}};_0xe86249(++_0x42fed7);}(_0x54e0,0xc6));var _0x054e=function(_0x506cfa,_0x42613a){_0x506cfa=_0x506cfa-0x0;var _0x1771f9=_0x54e0[_0x506cfa];return _0x1771f9;};'use strict';var _=require(_0x054e('0x0'));var util=require(_0x054e('0x1'));var jayson=require('jayson/promise');var schema=require(_0x054e('0x2'));var BPromise=require('bluebird');var moment=require(_0x054e('0x3'));var config=require(_0x054e('0x4'));var properties=require(_0x054e('0x5'));var ami=require(_0x054e('0x6'));exports[_0x054e('0x7')]=function(_0x2572fe,_0x560e1b,_0x2b0769){return new BPromise(function(_0x5f78e7,_0x5b51f0){var _0x13199c={'QueuePause':function(_0x4a8048){return new Promise(function(_0xf44554,_0xe8b292){var _0x101a7e=util[_0x054e('0x8')](_0x054e('0x9'),_0x054e('0xa'),_0x4a8048[_0x054e('0xb')]);if(_0x2572fe[_0x054e('0xc')]&&_0x2572fe[_0x054e('0xc')][_0x101a7e]&&_0x2572fe['timers'][_0x101a7e][_0x054e('0xd')]){_0x2572fe[_0x054e('0xc')][_0x101a7e][_0x054e('0xe')]();}if(_0x2572fe[_0x054e('0xf')][_0x101a7e]){_0x2572fe[_0x054e('0xf')][_0x101a7e][_0x054e('0x10')]({'statePause':_0x4a8048['pause']?!![]:![]});}_0xf44554({'code':0xc8,'message':_0x054e('0x11')});});},'Reload':function(_0x53df84){var _0x131e9c=this;return new Promise(function(_0x35bb17,_0x2877a6){if(ami[_0x054e('0x12')]()==![]){return _0x2877a6(_0x131e9c['error'](0x1f4,[config[_0x054e('0x13')]['ip'],config['asterisk'][_0x054e('0x14')],_0x054e('0x15')][_0x054e('0x16')]('\x20')));}_0x53df84=_['pick'](_0x53df84,_[_0x054e('0x17')](properties['module']));_0x53df84[_0x054e('0x18')]='Reload';return ami[_0x054e('0x19')](_0x53df84)[_0x054e('0x1a')](function(_0x256fea){_0x35bb17({'code':0xc8,'message':_0x256fea['message']});})['catch'](function(_0x331d6f){_0x2877a6(_0x131e9c[_0x054e('0x1b')](0x1f5,_0x331d6f[_0x054e('0x1c')]));});});},'Command':function(_0x1aac44){var _0x48958a=this;return new Promise(function(_0x54fcce,_0x342254){if(ami[_0x054e('0x12')]()==![]){return _0x342254(_0x48958a[_0x054e('0x1b')](0x1f4,[config[_0x054e('0x13')]['ip'],config[_0x054e('0x13')][_0x054e('0x14')],_0x054e('0x15')][_0x054e('0x16')]('\x20')));}_0x1aac44=_[_0x054e('0x1d')](_0x1aac44,_0x054e('0x1e'));_0x1aac44[_0x054e('0x18')]=_0x054e('0x1f');return ami[_0x054e('0x19')](_0x1aac44)['then'](function(_0x76f76c){_0x54fcce({'code':0xc8,'message':_0x76f76c['content']});})[_0x054e('0x20')](function(_0x55d87e){_0x342254(_0x48958a[_0x054e('0x1b')](0x1f5,_0x55d87e[_0x054e('0x1c')]));});});},'VoiceQueues':function(_0x386ae6){return new Promise(function(_0x303648,_0x4c74e9){var _0x4dbfdd=[];for(var _0x325fb1 in _0x2572fe[_0x054e('0x21')]){if(_0x2572fe[_0x054e('0x21')][_0x054e('0x22')](_0x325fb1)){var _0x465ebc=_0x2572fe[_0x054e('0x21')][_0x325fb1];var _0x128155={'id':_0x465ebc['id'],'name':_0x465ebc[_0x054e('0xb')],'strategy':_0x465ebc[_0x054e('0x23')],'answered':_0x465ebc['answered'],'available':_0x465ebc[_0x054e('0x24')],'loggedIn':_0x465ebc['loggedIn'],'pTalking':_0x465ebc['pTalking'],'sumBillable':_0x465ebc[_0x054e('0x25')],'sumDuration':_0x465ebc['sumDuration'],'sumHoldTime':_0x465ebc[_0x054e('0x26')]||0x0,'talking':_0x465ebc[_0x054e('0x27')],'total':_0x465ebc[_0x054e('0x28')],'type':_0x465ebc[_0x054e('0x29')],'unmanaged':_0x465ebc['unmanaged'],'abandoned':_0x465ebc[_0x054e('0x2a')],'waiting':_0x465ebc['waiting'],'loggedInDb':_0x465ebc['loggedInDb']};if(_0x465ebc[_0x054e('0x29')]===_0x054e('0x2b')){_0x128155[_0x054e('0x2c')]=_0x465ebc['dialActive'];_0x128155[_0x054e('0x2d')]=_0x465ebc[_0x054e('0x2d')];_0x128155[_0x054e('0x2e')]=_0x465ebc[_0x054e('0x2e')];_0x128155[_0x054e('0x2f')]=_0x465ebc[_0x054e('0x2f')];_0x128155['dialOriginateTimeout']=_0x465ebc[_0x054e('0x30')];_0x128155[_0x054e('0x31')]=_0x465ebc[_0x054e('0x31')];_0x128155[_0x054e('0x32')]=_0x465ebc[_0x054e('0x32')];_0x128155[_0x054e('0x33')]=_0x465ebc['outboundAnswerCallsDay'];_0x128155[_0x054e('0x34')]=_0x465ebc['outboundBlacklistCallsDay'];_0x128155[_0x054e('0x35')]=_0x465ebc[_0x054e('0x35')];_0x128155[_0x054e('0x36')]=_0x465ebc[_0x054e('0x36')];_0x128155['outboundDropCallsDayACS']=_0x465ebc[_0x054e('0x37')];_0x128155['outboundDropCallsDayCallersExit']=_0x465ebc[_0x054e('0x38')];_0x128155[_0x054e('0x39')]=_0x465ebc[_0x054e('0x39')];_0x128155[_0x054e('0x3a')]=_0x465ebc[_0x054e('0x3a')];_0x128155[_0x054e('0x3b')]=_0x465ebc[_0x054e('0x3b')];_0x128155[_0x054e('0x3c')]=_0x465ebc[_0x054e('0x3c')];_0x128155[_0x054e('0x3d')]=_0x465ebc[_0x054e('0x3d')];_0x128155[_0x054e('0x3e')]=_0x465ebc['outboundRejectCallsDay'];_0x128155['outboundUnknownCallsDay']=_0x465ebc[_0x054e('0x3f')];_0x128155[_0x054e('0x40')]=_0x465ebc[_0x054e('0x40')];_0x128155[_0x054e('0x41')]=_0x465ebc['predictiveIntervalAvgHoldtime'];_0x128155[_0x054e('0x42')]=_0x465ebc[_0x054e('0x42')];_0x128155[_0x054e('0x43')]=_0x465ebc['predictiveIntervalDroppedCallsCallersExit'];_0x128155[_0x054e('0x44')]=_0x465ebc[_0x054e('0x44')];_0x128155[_0x054e('0x45')]=_0x465ebc['predictiveIntervalErlangCalls'];_0x128155[_0x054e('0x46')]=_0x465ebc[_0x054e('0x46')];_0x128155[_0x054e('0x47')]=_0x465ebc['predictiveIntervalHitRate'];_0x128155[_0x054e('0x48')]=_0x465ebc['predictiveIntervalMultiplicativeFactor'];_0x128155[_0x054e('0x49')]=_0x465ebc[_0x054e('0x49')];_0x128155[_0x054e('0x4a')]=_0x465ebc[_0x054e('0x4a')];_0x128155[_0x054e('0x4b')]=_0x465ebc[_0x054e('0x4b')];_0x128155['message']=_0x465ebc[_0x054e('0x1c')];_0x128155['originated']=_0x465ebc[_0x054e('0x4c')];_0x128155[_0x054e('0x4d')]=_0x465ebc[_0x054e('0x4d')];_0x128155['erlangCallToSecond']=_0x465ebc[_0x054e('0x4e')];_0x128155[_0x054e('0x4f')]=_0x465ebc[_0x054e('0x4f')];_0x128155[_0x054e('0x50')]=_0x465ebc[_0x054e('0x50')];_0x128155[_0x054e('0x51')]=_0x465ebc[_0x054e('0x51')];_0x128155[_0x054e('0x52')]=_0x465ebc[_0x054e('0x52')];}if(_0x465ebc[_0x054e('0x53')]){_0x128155[_0x054e('0x53')]={'id':_0x465ebc[_0x054e('0x53')]['id'],'name':_0x465ebc[_0x054e('0x53')][_0x054e('0xb')],'active':_0x465ebc[_0x054e('0x53')][_0x054e('0x54')],'callerid':_0x465ebc['Trunk'][_0x054e('0x55')]};}if(_0x465ebc[_0x054e('0x56')]){_0x128155[_0x054e('0x56')]={'id':_0x465ebc[_0x054e('0x56')]['id'],'name':_0x465ebc[_0x054e('0x56')][_0x054e('0xb')]};}_0x4dbfdd['push'](_0x128155);}}_0x303648({'count':_0x4dbfdd[_0x054e('0x57')],'rows':_0x4dbfdd});});},'VoiceChannels':function(_0x175e5a){return new Promise(function(_0xee82ae,_0x5640d2){var _0x4cce3d=_[_0x054e('0x58')](_0x2572fe[_0x054e('0x59')]);_0xee82ae({'count':_0x4cce3d[_0x054e('0x57')],'rows':_0x4cce3d});});},'VoiceChannelMixMonitor':function(_0x1b5e02){var _0x14efb7=this;return new Promise(function(_0x19dcae,_0x155517){if(ami[_0x054e('0x12')]()==![]){return _0x155517(_0x14efb7[_0x054e('0x1b')](0x1f4,[config[_0x054e('0x13')]['ip'],config[_0x054e('0x13')][_0x054e('0x14')],'ami\x20disconnected'][_0x054e('0x16')]('\x20')));}var _0x43fb31=schema(properties['voicechannel'])['validate'](_0x1b5e02);if(_0x43fb31[_0x054e('0x57')]>0x0){return _0x155517(_0x14efb7['error'](0x1f4,_[_0x054e('0x5a')](_0x43fb31,_0x054e('0x1c'))[_0x054e('0x16')](',\x20')));}var _0x46f29f=_[_0x054e('0x5b')](_0x2572fe[_0x054e('0x59')],{'uniqueid':_0x1b5e02[_0x054e('0x5c')]});if(_0x46f29f&&_0x46f29f['channel']){var _0x5d3176=util[_0x054e('0x8')]('%s.%s',_0x1b5e02['filename']||_0x1b5e02[_0x054e('0x5c')],_0x1b5e02[_0x054e('0x8')]||_0x054e('0x5d'));return ami['Action']({'action':'MixMonitor','channel':_0x46f29f[_0x054e('0x5e')],'file':_0x5d3176,'options':_0x054e('0x5f')})[_0x054e('0x1a')](function(_0x63840e){var _0x162b1a=_['find'](_0x46f29f[_0x054e('0x60')],{'filename':_0x054e('0x61')+_0x5d3176[_0x054e('0x62')]()});if(_[_0x054e('0x63')](_0x162b1a)){_0x46f29f[_0x054e('0x60')][_0x054e('0x64')]({'filename':_0x054e('0x61')+_0x5d3176[_0x054e('0x62')](),'createdAt':moment()[_0x054e('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':_0x63840e[_0x054e('0x65')],'status':'rec'});}else{_0x162b1a['mixmonitorid']=_0x63840e[_0x054e('0x65')];_0x162b1a[_0x054e('0x66')]='rec';}_0x19dcae({'code':0xc8,'message':[_0x1b5e02[_0x054e('0x5c')],'MixMonitor\x20Success',_0x63840e[_0x054e('0x65')]]['join']('\x20'),'mixmonitorid':_0x63840e[_0x054e('0x65')]});})[_0x054e('0x20')](function(_0x32763f){_0x155517(_0x14efb7['error'](0x1f5,[_0x1b5e02[_0x054e('0x5c')],_0x32763f[_0x054e('0x1c')]['toLowerCase']()]['join']('\x20')));});}else{return _0x155517(_0x14efb7[_0x054e('0x1b')](0x1f5,_0x054e('0x67')));}});},'VoiceChannelStopMixMonitor':function(_0x4e15d3){var _0x4bff55=this;return new Promise(function(_0x22833b,_0x3725fc){if(ami[_0x054e('0x12')]()==![]){return _0x3725fc(_0x4bff55[_0x054e('0x1b')](0x1f4,[config[_0x054e('0x13')]['ip'],config[_0x054e('0x13')][_0x054e('0x14')],_0x054e('0x15')]['join']('\x20')));}var _0xda877e=schema(properties[_0x054e('0x68')])[_0x054e('0x2')](_0x4e15d3);if(_0xda877e[_0x054e('0x57')]>0x0){return _0x3725fc(_0x4bff55['error'](0x1f4,_['map'](_0xda877e,'message')[_0x054e('0x16')](',\x20')));}var _0x2cbbf9=_[_0x054e('0x5b')](_0x2572fe['channels'],{'uniqueid':_0x4e15d3[_0x054e('0x5c')]});if(_0x2cbbf9){return BPromise['resolve']()[_0x054e('0x1a')](function(){if(_0x2cbbf9[_0x054e('0x5e')]){return ami[_0x054e('0x19')]({'action':'StopMixMonitor','channel':_0x2cbbf9[_0x054e('0x5e')],'mixmonitorid':_0x4e15d3[_0x054e('0x65')]})['catch'](function(_0x502423){});}})[_0x054e('0x1a')](function(){if(_0x2cbbf9[_0x054e('0x69')]){return ami[_0x054e('0x19')]({'action':_0x054e('0x6a'),'channel':_0x2cbbf9[_0x054e('0x69')],'mixmonitorid':_0x4e15d3[_0x054e('0x65')]})[_0x054e('0x20')](function(_0x1ae2c9){});}})[_0x054e('0x1a')](function(_0x3c98b5){var _0x133acb=_['find'](_0x2cbbf9[_0x054e('0x60')],{'mixmonitorid':_0x4e15d3[_0x054e('0x65')]});if(_0x133acb){_0x133acb[_0x054e('0x66')]=_0x054e('0x6b');}})['then'](function(){var _0x2bb7d5=util[_0x054e('0x8')](_0x054e('0x6c'),_0x4e15d3[_0x054e('0x6d')]||_0x4e15d3[_0x054e('0x5c')],_0x4e15d3[_0x054e('0x8')]||_0x054e('0x5d'));var _0x3cce2f=_[_0x054e('0x5b')](_0x2cbbf9[_0x054e('0x60')],{'filename':_0x054e('0x61')+_0x2bb7d5[_0x054e('0x62')]()});if(_0x3cce2f){_0x3cce2f[_0x054e('0x66')]=_0x054e('0x6b');}})[_0x054e('0x1a')](function(){_0x22833b({'code':0xc8,'message':[_0x4e15d3['uniqueid'],_0x054e('0x6e')][_0x054e('0x16')]('\x20')});})[_0x054e('0x20')](function(_0x1b4280){_0x3725fc(_0x4bff55[_0x054e('0x1b')](0x1f5,[_0x4e15d3[_0x054e('0x5c')],_0x1b4280['message']['toLowerCase']()][_0x054e('0x16')]('\x20')));});}else{return _0x3725fc(_0x4bff55[_0x054e('0x1b')](0x1f5,_0x054e('0x67')));}});},'VoiceQueuesChannels':function(_0x214ac5){return new Promise(function(_0x31eb16,_0x383b28){var _0x4ad28f=_[_0x054e('0x58')](_0x2572fe[_0x054e('0x6f')]);_0x31eb16({'count':_0x4ad28f[_0x054e('0x57')],'rows':_0x4ad28f});});},'VoiceQueuesChannel':function(_0x21a576){var _0x270bc6=this;return new Promise(function(_0x5caed6,_0x27db69){var _0xd2c499=schema(properties[_0x054e('0x70')])[_0x054e('0x2')](_0x21a576);if(_0xd2c499[_0x054e('0x57')]>0x0){return _0x27db69(_0x270bc6[_0x054e('0x1b')](0x1f4,_[_0x054e('0x5a')](_0xd2c499,_0x054e('0x1c'))['join'](',\x20')));}var _0x4ab329=_[_0x054e('0x5b')](_0x2572fe[_0x054e('0x6f')],{'uniqueid':_0x21a576[_0x054e('0x5c')]});if(_0x4ab329){_0x5caed6(_0x4ab329);}else{return _0x27db69(_0x270bc6['error'](0x1f5,_0x054e('0x67')));}});},'VoiceQueuesChannelHangup':function(_0x76427f){var _0xeff746=this;return new Promise(function(_0x31a269,_0x5edd43){if(ami['isConnected']()==![]){return _0x5edd43(_0xeff746['error'](0x1f4,[config['asterisk']['ip'],config[_0x054e('0x13')][_0x054e('0x14')],_0x054e('0x15')][_0x054e('0x16')]('\x20')));}var _0x54cf46=schema(properties[_0x054e('0x71')])[_0x054e('0x2')](_0x76427f);if(_0x54cf46[_0x054e('0x57')]>0x0){return _0x5edd43(_0xeff746['error'](0x1f4,_['map'](_0x54cf46,_0x054e('0x1c'))[_0x054e('0x16')](',\x20')));}var _0xe2e201=_[_0x054e('0x5b')](_0x2572fe['queueChannels'],{'uniqueid':_0x76427f[_0x054e('0x5c')]});if(_0xe2e201&&_0xe2e201['channel']){return ami[_0x054e('0x19')]({'action':_0x054e('0x72'),'channel':_0xe2e201['channel']})[_0x054e('0x1a')](function(_0x4e929f){_0x31a269({'code':0xc8,'message':[_0x76427f['uniqueid'],_0x4e929f[_0x054e('0x1c')][_0x054e('0x62')]()][_0x054e('0x16')]('\x20')});})[_0x054e('0x20')](function(_0x3833b4){_0x5edd43(_0xeff746[_0x054e('0x1b')](0x1f5,[_0x76427f[_0x054e('0x5c')],_0x3833b4[_0x054e('0x1c')][_0x054e('0x62')]()][_0x054e('0x16')]('\x20')));});}else{return _0x5edd43(_0xeff746[_0x054e('0x1b')](0x1f5,_0x054e('0x67')));}});},'VoiceQueuesChannelRedirect':function(_0x81674){var _0x5292ee=this;return new Promise(function(_0x42cca3,_0x3d6cbb){if(ami[_0x054e('0x12')]()==![]){return _0x3d6cbb(_0x5292ee[_0x054e('0x1b')](0x1f4,[config['asterisk']['ip'],config[_0x054e('0x13')]['username'],_0x054e('0x15')]['join']('\x20')));}var _0x5696e4=schema(properties['voicequeuechannelredirect'])[_0x054e('0x2')](_0x81674);if(_0x5696e4[_0x054e('0x57')]>0x0){return _0x3d6cbb(_0x5292ee[_0x054e('0x1b')](0x1f4,_[_0x054e('0x5a')](_0x5696e4,_0x054e('0x1c'))[_0x054e('0x16')](',\x20')));}var _0x344f50=_['find'](_0x2572fe[_0x054e('0x6f')],{'uniqueid':_0x81674['uniqueid']});if(_0x344f50&&_0x344f50['channel']){return ami[_0x054e('0x19')]({'action':_0x054e('0x73'),'channel':_0x344f50[_0x054e('0x5e')],'exten':_0x81674[_0x054e('0x74')],'context':_0x81674[_0x054e('0x75')]||_0x344f50[_0x054e('0x75')],'priority':0x1})[_0x054e('0x1a')](function(_0xbcc58e){_0x42cca3({'code':0xc8,'message':[_0x81674[_0x054e('0x5c')],_0xbcc58e[_0x054e('0x1c')][_0x054e('0x62')]()][_0x054e('0x16')]('\x20')});})[_0x054e('0x20')](function(_0xb9787d){_0x3d6cbb(_0x5292ee[_0x054e('0x1b')](0x1f5,[_0x81674[_0x054e('0x5c')],_0xb9787d['message'][_0x054e('0x62')]()]['join']('\x20')));});}else{return _0x3d6cbb(_0x5292ee['error'](0x1f5,_0x054e('0x67')));}});},'Agents':function(_0x35ad10){return new Promise(function(_0x583987,_0x196a6a){var _0x4135ed=_[_0x054e('0x58')](_0x2572fe[_0x054e('0xf')]);_0x583987({'count':_0x4135ed[_0x054e('0x57')],'rows':_0x4135ed});});},'Telephones':function(_0x58bbeb){return new Promise(function(_0x1c4a93,_0xbb2b29){var _0x376c51=_['values'](_0x2572fe[_0x054e('0x76')]);_0x1c4a93({'count':_0x376c51[_0x054e('0x57')],'rows':_0x376c51});});},'Trunks':function(_0x3ead59){return new Promise(function(_0x36044b,_0x35231a){var _0x52c619=_['values'](_0x2572fe[_0x054e('0x77')]);_0x36044b({'count':_0x52c619[_0x054e('0x57')],'rows':_0x52c619});});},'OutboundChannels':function(_0x1d3a8a){return new Promise(function(_0x5a2361,_0x2d5b28){var _0x95c066=_['values'](_0x2572fe[_0x054e('0x78')]);_0x5a2361({'count':_0x95c066[_0x054e('0x57')],'rows':_0x95c066});});},'Outbound':function(_0x51589b){return new Promise(function(_0x280943,_0xb2fa7c){_0x280943(_0x2572fe[_0x054e('0x2b')]);});},'Campaigns':function(_0x2933e7){return new Promise(function(_0x303faa,_0x37d79b){var _0x138449=_[_0x054e('0x58')](_0x2572fe[_0x054e('0x79')]);_0x303faa({'count':_0x138449[_0x054e('0x57')],'rows':_0x138449});});},'VoiceQueuesPreview':function(_0x4ad243){var _0x1a9ab8=this;return new Promise(function(_0x562f05,_0x273493){_0x560e1b['run'](_0x4ad243['id'])[_0x054e('0x1a')](function(_0x1a8185){_0x562f05({'code':0xc8,'message':_0x1a8185[_0x054e('0x1c')]});})[_0x054e('0x20')](function(_0x124a9e){_0x273493(_0x1a9ab8['error'](0x1f4,_0x124a9e[_0x054e('0x1c')]));});});},'EventManager':function(_0x20676c){var _0x5b88bd=this;return new Promise(function(_0x5f3444,_0x4e73d3){if(!_0x20676c[_0x054e('0x7a')]){return _0x4e73d3(_0x5b88bd['error'](0x1f4,_0x054e('0x7b')));}ami[_0x054e('0x7c')](_0x054e('0x7d')+_0x20676c[_0x054e('0x7a')],_0x20676c[_0x054e('0x1c')]);_0x5f3444({'code':0xc8,'message':_0x20676c});});},'FaxAccounts':function(_0x1a7592){return new Promise(function(_0x27f493,_0x4969b0){var _0x434154=_[_0x054e('0x58')](_0x2572fe[_0x054e('0x7e')]);_0x27f493({'count':_0x434154[_0x054e('0x57')],'rows':_0x434154});});},'SendFax':function(_0x5badb2){var _0x4da57d=this;return new Promise(function(_0x29f7b2,_0x2c1319){_0x2b0769[_0x054e('0x7f')](_0x5badb2)['then'](function(_0x30b3ab){_0x29f7b2({'code':0xc8,'message':_0x30b3ab[_0x054e('0x1c')]});})[_0x054e('0x20')](function(_0x2ad4de){_0x2c1319(_0x4da57d[_0x054e('0x1b')](0x1f4,_0x2ad4de[_0x054e('0x1c')]));});});},'CheckAfterSend':function(_0x25d004){var _0x50c43c=this;return new Promise(function(_0x2b8526,_0x4014bc){_0x2b0769['checkAfterSend'](_0x25d004)[_0x054e('0x1a')](function(_0x13b2fc){_0x2b8526({'code':0xc8,'message':_0x13b2fc[_0x054e('0x1c')]});})[_0x054e('0x20')](function(_0xea414c){_0x4014bc(_0x50c43c[_0x054e('0x1b')](0x1f4,_0xea414c[_0x054e('0x1c')]));});});}};var _0x40f5be=jayson[_0x054e('0x80')](_0x13199c)[_0x054e('0x81')]();_0x40f5be['on'](_0x054e('0x1b'),function(_0x4b986c){return _0x5b51f0(_0x4b986c);});_0x40f5be[_0x054e('0x7')](0x232a,'127.0.0.1',function(){console[_0x054e('0x82')](_0x054e('0x83'),0x232a);return _0x5f78e7(_0x054e('0x84')+0x232a);});});};
\ No newline at end of file
+var _0xd56e=['send','checkAfterSend','listen','127.0.0.1','log','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','jayson/promise','moment','../properties','format','%s/%s','SIP','timers','timer','updateAcw','agents','updateStatusRealtime','pause','QueuePause','isConnected','error','asterisk','username','join','keys','module','action','Reload','Action','then','catch','message','ami\x20disconnected','pick','command','Command','voiceQueues','name','strategy','answered','available','loggedIn','sumDuration','talking','type','unmanaged','abandoned','waiting','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','active','callerid','Interval','push','length','values','voicechannel','validate','map','channels','uniqueid','channel','wav','MixMonitor','ai(mixmonitorid)','find','monitors','/var/spool/asterisk/monitor/','isNil','toLowerCase','YYYY-MM-DD\x20HH:mm:ss','rec','mixmonitorid','status','Channel\x20doesn\x27t\x20exist','resolve','StopMixMonitor','destinationchannel','stop','%s.%s','filename','StopMixMonitor\x20Success','queueChannels','voicequeuechannel','Hangup','voicequeuechannelredirect','Redirect','context','trunks','outboundChannels','campaigns','run','event','Event\x20name\x20mandatory','custom:'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xd56e,0x195));var _0xed56=function(_0x3afb70,_0x305017){_0x3afb70=_0x3afb70-0x0;var _0x5c20b4=_0xd56e[_0x3afb70];return _0x5c20b4;};'use strict';var _=require(_0xed56('0x0'));var util=require('util');var jayson=require(_0xed56('0x1'));var schema=require('validate');var BPromise=require('bluebird');var moment=require(_0xed56('0x2'));var config=require('../../../config/environment');var properties=require(_0xed56('0x3'));var ami=require('../ami');exports['listen']=function(_0x5dfd6c,_0x262c2f,_0x31e2a1){return new BPromise(function(_0x883005,_0x133c57){var _0x183076={'QueuePause':function(_0x51eb10){return new Promise(function(_0x529715,_0xdd5125){var _0x1b9c52=util[_0xed56('0x4')](_0xed56('0x5'),_0xed56('0x6'),_0x51eb10['name']);if(_0x5dfd6c[_0xed56('0x7')]&&_0x5dfd6c[_0xed56('0x7')][_0x1b9c52]&&_0x5dfd6c[_0xed56('0x7')][_0x1b9c52][_0xed56('0x8')]){_0x5dfd6c[_0xed56('0x7')][_0x1b9c52][_0xed56('0x9')]();}if(_0x5dfd6c[_0xed56('0xa')][_0x1b9c52]){_0x5dfd6c[_0xed56('0xa')][_0x1b9c52][_0xed56('0xb')]({'statePause':_0x51eb10[_0xed56('0xc')]?!![]:![]});}_0x529715({'code':0xc8,'message':_0xed56('0xd')});});},'Reload':function(_0x22ae81){var _0x49405b=this;return new Promise(function(_0x199d25,_0x297401){if(ami[_0xed56('0xe')]()==![]){return _0x297401(_0x49405b[_0xed56('0xf')](0x1f4,[config[_0xed56('0x10')]['ip'],config[_0xed56('0x10')][_0xed56('0x11')],'ami\x20disconnected'][_0xed56('0x12')]('\x20')));}_0x22ae81=_['pick'](_0x22ae81,_[_0xed56('0x13')](properties[_0xed56('0x14')]));_0x22ae81[_0xed56('0x15')]=_0xed56('0x16');return ami[_0xed56('0x17')](_0x22ae81)[_0xed56('0x18')](function(_0x49fe5d){_0x199d25({'code':0xc8,'message':_0x49fe5d['message']});})[_0xed56('0x19')](function(_0x4c34bd){_0x297401(_0x49405b[_0xed56('0xf')](0x1f5,_0x4c34bd[_0xed56('0x1a')]));});});},'Command':function(_0x52801c){var _0x39151d=this;return new Promise(function(_0x44884d,_0xb2ffc6){if(ami[_0xed56('0xe')]()==![]){return _0xb2ffc6(_0x39151d['error'](0x1f4,[config[_0xed56('0x10')]['ip'],config[_0xed56('0x10')][_0xed56('0x11')],_0xed56('0x1b')][_0xed56('0x12')]('\x20')));}_0x52801c=_[_0xed56('0x1c')](_0x52801c,_0xed56('0x1d'));_0x52801c[_0xed56('0x15')]=_0xed56('0x1e');return ami['Action'](_0x52801c)[_0xed56('0x18')](function(_0x3d3cfe){_0x44884d({'code':0xc8,'message':_0x3d3cfe['content']});})['catch'](function(_0x46e35d){_0xb2ffc6(_0x39151d[_0xed56('0xf')](0x1f5,_0x46e35d[_0xed56('0x1a')]));});});},'VoiceQueues':function(_0x608c82){return new Promise(function(_0x4def52,_0x61e48c){var _0x5301c8=[];for(var _0x49968c in _0x5dfd6c[_0xed56('0x1f')]){if(_0x5dfd6c[_0xed56('0x1f')]['hasOwnProperty'](_0x49968c)){var _0x2c32ab=_0x5dfd6c[_0xed56('0x1f')][_0x49968c];var _0x5c663a={'id':_0x2c32ab['id'],'name':_0x2c32ab[_0xed56('0x20')],'strategy':_0x2c32ab[_0xed56('0x21')],'answered':_0x2c32ab[_0xed56('0x22')],'available':_0x2c32ab[_0xed56('0x23')],'loggedIn':_0x2c32ab[_0xed56('0x24')],'pTalking':_0x2c32ab['pTalking'],'sumBillable':_0x2c32ab['sumBillable'],'sumDuration':_0x2c32ab[_0xed56('0x25')],'sumHoldTime':_0x2c32ab['sumHoldTime']||0x0,'talking':_0x2c32ab[_0xed56('0x26')],'total':_0x2c32ab['total'],'type':_0x2c32ab[_0xed56('0x27')],'unmanaged':_0x2c32ab[_0xed56('0x28')],'abandoned':_0x2c32ab[_0xed56('0x29')],'waiting':_0x2c32ab[_0xed56('0x2a')],'loggedInDb':_0x2c32ab['loggedInDb']};if(_0x2c32ab[_0xed56('0x27')]==='outbound'){_0x5c663a[_0xed56('0x2b')]=_0x2c32ab[_0xed56('0x2b')];_0x5c663a[_0xed56('0x2c')]=_0x2c32ab[_0xed56('0x2c')];_0x5c663a['dialOriginateCallerIdName']=_0x2c32ab[_0xed56('0x2d')];_0x5c663a[_0xed56('0x2e')]=_0x2c32ab[_0xed56('0x2e')];_0x5c663a[_0xed56('0x2f')]=_0x2c32ab[_0xed56('0x2f')];_0x5c663a['dialPrefix']=_0x2c32ab['dialPrefix'];_0x5c663a[_0xed56('0x30')]=_0x2c32ab[_0xed56('0x30')];_0x5c663a[_0xed56('0x31')]=_0x2c32ab[_0xed56('0x31')];_0x5c663a[_0xed56('0x32')]=_0x2c32ab[_0xed56('0x32')];_0x5c663a[_0xed56('0x33')]=_0x2c32ab['outboundBusyCallsDay'];_0x5c663a[_0xed56('0x34')]=_0x2c32ab[_0xed56('0x34')];_0x5c663a[_0xed56('0x35')]=_0x2c32ab[_0xed56('0x35')];_0x5c663a[_0xed56('0x36')]=_0x2c32ab['outboundDropCallsDayCallersExit'];_0x5c663a[_0xed56('0x37')]=_0x2c32ab[_0xed56('0x37')];_0x5c663a[_0xed56('0x38')]=_0x2c32ab[_0xed56('0x38')];_0x5c663a[_0xed56('0x39')]=_0x2c32ab[_0xed56('0x39')];_0x5c663a['outboundOriginateFailureCallsDay']=_0x2c32ab[_0xed56('0x3a')];_0x5c663a[_0xed56('0x3b')]=_0x2c32ab['outboundReCallsDay'];_0x5c663a['outboundRejectCallsDay']=_0x2c32ab[_0xed56('0x3c')];_0x5c663a[_0xed56('0x3d')]=_0x2c32ab[_0xed56('0x3d')];_0x5c663a[_0xed56('0x3e')]=_0x2c32ab[_0xed56('0x3e')];_0x5c663a[_0xed56('0x3f')]=_0x2c32ab[_0xed56('0x3f')];_0x5c663a[_0xed56('0x40')]=_0x2c32ab[_0xed56('0x40')];_0x5c663a[_0xed56('0x41')]=_0x2c32ab[_0xed56('0x41')];_0x5c663a['predictiveIntervalDroppedCallsTimeout']=_0x2c32ab[_0xed56('0x42')];_0x5c663a[_0xed56('0x43')]=_0x2c32ab['predictiveIntervalErlangCalls'];_0x5c663a[_0xed56('0x44')]=_0x2c32ab[_0xed56('0x44')];_0x5c663a[_0xed56('0x45')]=_0x2c32ab[_0xed56('0x45')];_0x5c663a[_0xed56('0x46')]=_0x2c32ab[_0xed56('0x46')];_0x5c663a['predictiveIntervalPauses']=_0x2c32ab[_0xed56('0x47')];_0x5c663a[_0xed56('0x48')]=_0x2c32ab['predictiveIntervalAvailable'];_0x5c663a[_0xed56('0x49')]=_0x2c32ab['predictiveIntervalTotalCalls'];_0x5c663a[_0xed56('0x1a')]=_0x2c32ab[_0xed56('0x1a')];_0x5c663a[_0xed56('0x4a')]=_0x2c32ab[_0xed56('0x4a')];_0x5c663a[_0xed56('0x4b')]=_0x2c32ab[_0xed56('0x4b')];_0x5c663a[_0xed56('0x4c')]=_0x2c32ab[_0xed56('0x4c')];_0x5c663a[_0xed56('0x4d')]=_0x2c32ab['erlangAbandonmentRate'];_0x5c663a[_0xed56('0x4e')]=_0x2c32ab[_0xed56('0x4e')];_0x5c663a[_0xed56('0x4f')]=_0x2c32ab[_0xed56('0x4f')];_0x5c663a['startProgressive']=_0x2c32ab[_0xed56('0x50')];}if(_0x2c32ab[_0xed56('0x51')]){_0x5c663a[_0xed56('0x51')]={'id':_0x2c32ab[_0xed56('0x51')]['id'],'name':_0x2c32ab[_0xed56('0x51')][_0xed56('0x20')],'active':_0x2c32ab[_0xed56('0x51')][_0xed56('0x52')],'callerid':_0x2c32ab['Trunk'][_0xed56('0x53')]};}if(_0x2c32ab[_0xed56('0x54')]){_0x5c663a['Interval']={'id':_0x2c32ab['Interval']['id'],'name':_0x2c32ab[_0xed56('0x54')]['name']};}_0x5301c8[_0xed56('0x55')](_0x5c663a);}}_0x4def52({'count':_0x5301c8[_0xed56('0x56')],'rows':_0x5301c8});});},'VoiceChannels':function(_0x59e3d2){return new Promise(function(_0x24cea2,_0x333fa7){var _0x596b4b=_[_0xed56('0x57')](_0x5dfd6c['channels']);_0x24cea2({'count':_0x596b4b[_0xed56('0x56')],'rows':_0x596b4b});});},'VoiceChannelMixMonitor':function(_0x3fb8c0){var _0x1ba735=this;return new Promise(function(_0x22233d,_0x50bac6){if(ami[_0xed56('0xe')]()==![]){return _0x50bac6(_0x1ba735['error'](0x1f4,[config['asterisk']['ip'],config[_0xed56('0x10')][_0xed56('0x11')],'ami\x20disconnected'][_0xed56('0x12')]('\x20')));}var _0x3474ed=schema(properties[_0xed56('0x58')])[_0xed56('0x59')](_0x3fb8c0);if(_0x3474ed['length']>0x0){return _0x50bac6(_0x1ba735[_0xed56('0xf')](0x1f4,_[_0xed56('0x5a')](_0x3474ed,_0xed56('0x1a'))[_0xed56('0x12')](',\x20')));}var _0x45a35d=_['find'](_0x5dfd6c[_0xed56('0x5b')],{'uniqueid':_0x3fb8c0[_0xed56('0x5c')]});if(_0x45a35d&&_0x45a35d[_0xed56('0x5d')]){var _0x194397=util[_0xed56('0x4')]('%s.%s',_0x3fb8c0['filename']||_0x3fb8c0[_0xed56('0x5c')],_0x3fb8c0[_0xed56('0x4')]||_0xed56('0x5e'));return ami['Action']({'action':_0xed56('0x5f'),'channel':_0x45a35d[_0xed56('0x5d')],'file':_0x194397,'options':_0xed56('0x60')})[_0xed56('0x18')](function(_0x5b2d16){var _0x4f4500=_[_0xed56('0x61')](_0x45a35d[_0xed56('0x62')],{'filename':_0xed56('0x63')+_0x194397['toLowerCase']()});if(_[_0xed56('0x64')](_0x4f4500)){_0x45a35d['monitors'][_0xed56('0x55')]({'filename':_0xed56('0x63')+_0x194397[_0xed56('0x65')](),'createdAt':moment()['format'](_0xed56('0x66')),'mixmonitorid':_0x5b2d16['mixmonitorid'],'status':_0xed56('0x67')});}else{_0x4f4500['mixmonitorid']=_0x5b2d16[_0xed56('0x68')];_0x4f4500[_0xed56('0x69')]=_0xed56('0x67');}_0x22233d({'code':0xc8,'message':[_0x3fb8c0[_0xed56('0x5c')],'MixMonitor\x20Success',_0x5b2d16['mixmonitorid']][_0xed56('0x12')]('\x20'),'mixmonitorid':_0x5b2d16[_0xed56('0x68')]});})[_0xed56('0x19')](function(_0x1bec2a){_0x50bac6(_0x1ba735[_0xed56('0xf')](0x1f5,[_0x3fb8c0[_0xed56('0x5c')],_0x1bec2a['message']['toLowerCase']()][_0xed56('0x12')]('\x20')));});}else{return _0x50bac6(_0x1ba735[_0xed56('0xf')](0x1f5,_0xed56('0x6a')));}});},'VoiceChannelStopMixMonitor':function(_0x4ebb52){var _0x2c2e45=this;return new Promise(function(_0x32ddd6,_0x3b74fc){if(ami[_0xed56('0xe')]()==![]){return _0x3b74fc(_0x2c2e45[_0xed56('0xf')](0x1f4,[config[_0xed56('0x10')]['ip'],config['asterisk']['username'],'ami\x20disconnected'][_0xed56('0x12')]('\x20')));}var _0x502abd=schema(properties['voicechannel'])[_0xed56('0x59')](_0x4ebb52);if(_0x502abd[_0xed56('0x56')]>0x0){return _0x3b74fc(_0x2c2e45[_0xed56('0xf')](0x1f4,_[_0xed56('0x5a')](_0x502abd,_0xed56('0x1a'))[_0xed56('0x12')](',\x20')));}var _0x1c8000=_[_0xed56('0x61')](_0x5dfd6c['channels'],{'uniqueid':_0x4ebb52['uniqueid']});if(_0x1c8000){return BPromise[_0xed56('0x6b')]()[_0xed56('0x18')](function(){if(_0x1c8000[_0xed56('0x5d')]){return ami[_0xed56('0x17')]({'action':_0xed56('0x6c'),'channel':_0x1c8000['channel'],'mixmonitorid':_0x4ebb52[_0xed56('0x68')]})[_0xed56('0x19')](function(_0x18833c){});}})[_0xed56('0x18')](function(){if(_0x1c8000[_0xed56('0x6d')]){return ami[_0xed56('0x17')]({'action':_0xed56('0x6c'),'channel':_0x1c8000[_0xed56('0x6d')],'mixmonitorid':_0x4ebb52[_0xed56('0x68')]})[_0xed56('0x19')](function(_0x444010){});}})[_0xed56('0x18')](function(_0x6a5cb9){var _0x41a5a2=_[_0xed56('0x61')](_0x1c8000[_0xed56('0x62')],{'mixmonitorid':_0x4ebb52['mixmonitorid']});if(_0x41a5a2){_0x41a5a2[_0xed56('0x69')]=_0xed56('0x6e');}})[_0xed56('0x18')](function(){var _0x4cbf82=util['format'](_0xed56('0x6f'),_0x4ebb52[_0xed56('0x70')]||_0x4ebb52[_0xed56('0x5c')],_0x4ebb52[_0xed56('0x4')]||_0xed56('0x5e'));var _0x2b8cca=_[_0xed56('0x61')](_0x1c8000[_0xed56('0x62')],{'filename':_0xed56('0x63')+_0x4cbf82[_0xed56('0x65')]()});if(_0x2b8cca){_0x2b8cca[_0xed56('0x69')]=_0xed56('0x6e');}})[_0xed56('0x18')](function(){_0x32ddd6({'code':0xc8,'message':[_0x4ebb52[_0xed56('0x5c')],_0xed56('0x71')][_0xed56('0x12')]('\x20')});})[_0xed56('0x19')](function(_0x3f15c4){_0x3b74fc(_0x2c2e45[_0xed56('0xf')](0x1f5,[_0x4ebb52[_0xed56('0x5c')],_0x3f15c4[_0xed56('0x1a')][_0xed56('0x65')]()][_0xed56('0x12')]('\x20')));});}else{return _0x3b74fc(_0x2c2e45[_0xed56('0xf')](0x1f5,_0xed56('0x6a')));}});},'VoiceQueuesChannels':function(_0x5b49cd){return new Promise(function(_0x3c61e3,_0xd6217c){var _0x35732c=_[_0xed56('0x57')](_0x5dfd6c[_0xed56('0x72')]);_0x3c61e3({'count':_0x35732c[_0xed56('0x56')],'rows':_0x35732c});});},'VoiceQueuesChannel':function(_0x39c1ce){var _0x2e61f0=this;return new Promise(function(_0x39dbd2,_0x2dd445){var _0x62f3f7=schema(properties[_0xed56('0x73')])[_0xed56('0x59')](_0x39c1ce);if(_0x62f3f7[_0xed56('0x56')]>0x0){return _0x2dd445(_0x2e61f0[_0xed56('0xf')](0x1f4,_[_0xed56('0x5a')](_0x62f3f7,_0xed56('0x1a'))[_0xed56('0x12')](',\x20')));}var _0x5ae7c6=_['find'](_0x5dfd6c[_0xed56('0x72')],{'uniqueid':_0x39c1ce[_0xed56('0x5c')]});if(_0x5ae7c6){_0x39dbd2(_0x5ae7c6);}else{return _0x2dd445(_0x2e61f0[_0xed56('0xf')](0x1f5,_0xed56('0x6a')));}});},'VoiceQueuesChannelHangup':function(_0x2c2fc8){var _0x277388=this;return new Promise(function(_0x4e035e,_0x5041c5){if(ami[_0xed56('0xe')]()==![]){return _0x5041c5(_0x277388[_0xed56('0xf')](0x1f4,[config[_0xed56('0x10')]['ip'],config[_0xed56('0x10')]['username'],_0xed56('0x1b')][_0xed56('0x12')]('\x20')));}var _0x5eac10=schema(properties['voicequeuechannelhangup'])[_0xed56('0x59')](_0x2c2fc8);if(_0x5eac10[_0xed56('0x56')]>0x0){return _0x5041c5(_0x277388[_0xed56('0xf')](0x1f4,_['map'](_0x5eac10,_0xed56('0x1a'))[_0xed56('0x12')](',\x20')));}var _0x3d0028=_['find'](_0x5dfd6c[_0xed56('0x72')],{'uniqueid':_0x2c2fc8[_0xed56('0x5c')]});if(_0x3d0028&&_0x3d0028[_0xed56('0x5d')]){return ami['Action']({'action':_0xed56('0x74'),'channel':_0x3d0028[_0xed56('0x5d')]})[_0xed56('0x18')](function(_0x154b59){_0x4e035e({'code':0xc8,'message':[_0x2c2fc8['uniqueid'],_0x154b59['message'][_0xed56('0x65')]()][_0xed56('0x12')]('\x20')});})['catch'](function(_0x5d2394){_0x5041c5(_0x277388['error'](0x1f5,[_0x2c2fc8[_0xed56('0x5c')],_0x5d2394['message'][_0xed56('0x65')]()]['join']('\x20')));});}else{return _0x5041c5(_0x277388[_0xed56('0xf')](0x1f5,_0xed56('0x6a')));}});},'VoiceQueuesChannelRedirect':function(_0x5f574d){var _0x1ea092=this;return new Promise(function(_0x2054b1,_0x27066e){if(ami[_0xed56('0xe')]()==![]){return _0x27066e(_0x1ea092['error'](0x1f4,[config['asterisk']['ip'],config[_0xed56('0x10')]['username'],_0xed56('0x1b')][_0xed56('0x12')]('\x20')));}var _0x46a945=schema(properties[_0xed56('0x75')])[_0xed56('0x59')](_0x5f574d);if(_0x46a945[_0xed56('0x56')]>0x0){return _0x27066e(_0x1ea092[_0xed56('0xf')](0x1f4,_[_0xed56('0x5a')](_0x46a945,_0xed56('0x1a'))[_0xed56('0x12')](',\x20')));}var _0x39226f=_[_0xed56('0x61')](_0x5dfd6c[_0xed56('0x72')],{'uniqueid':_0x5f574d[_0xed56('0x5c')]});if(_0x39226f&&_0x39226f[_0xed56('0x5d')]){return ami['Action']({'action':_0xed56('0x76'),'channel':_0x39226f[_0xed56('0x5d')],'exten':_0x5f574d['exten'],'context':_0x5f574d[_0xed56('0x77')]||_0x39226f[_0xed56('0x77')],'priority':0x1})[_0xed56('0x18')](function(_0x309bb1){_0x2054b1({'code':0xc8,'message':[_0x5f574d[_0xed56('0x5c')],_0x309bb1['message'][_0xed56('0x65')]()]['join']('\x20')});})['catch'](function(_0x53c968){_0x27066e(_0x1ea092[_0xed56('0xf')](0x1f5,[_0x5f574d['uniqueid'],_0x53c968['message'][_0xed56('0x65')]()][_0xed56('0x12')]('\x20')));});}else{return _0x27066e(_0x1ea092[_0xed56('0xf')](0x1f5,_0xed56('0x6a')));}});},'Agents':function(_0x3ec9ce){return new Promise(function(_0x105cf1,_0x20a6ce){var _0x1076ac=_[_0xed56('0x57')](_0x5dfd6c['agents']);_0x105cf1({'count':_0x1076ac[_0xed56('0x56')],'rows':_0x1076ac});});},'Telephones':function(_0xfde670){return new Promise(function(_0x2281c3,_0x475563){var _0x31a911=_[_0xed56('0x57')](_0x5dfd6c['telephones']);_0x2281c3({'count':_0x31a911[_0xed56('0x56')],'rows':_0x31a911});});},'Trunks':function(_0x57708b){return new Promise(function(_0x135227,_0x2a9db9){var _0x4ca0a2=_['values'](_0x5dfd6c[_0xed56('0x78')]);_0x135227({'count':_0x4ca0a2['length'],'rows':_0x4ca0a2});});},'OutboundChannels':function(_0x1f7b2a){return new Promise(function(_0x121172,_0x5bfbab){var _0x43e803=_[_0xed56('0x57')](_0x5dfd6c[_0xed56('0x79')]);_0x121172({'count':_0x43e803[_0xed56('0x56')],'rows':_0x43e803});});},'Outbound':function(_0x79242d){return new Promise(function(_0x1b0498,_0x4ac0a5){_0x1b0498(_0x5dfd6c['outbound']);});},'Campaigns':function(_0x5c42d0){return new Promise(function(_0x7ac755,_0x2d366d){var _0x4190ec=_[_0xed56('0x57')](_0x5dfd6c[_0xed56('0x7a')]);_0x7ac755({'count':_0x4190ec[_0xed56('0x56')],'rows':_0x4190ec});});},'VoiceQueuesPreview':function(_0x9e634a){var _0x5f30c8=this;return new Promise(function(_0x3f29b8,_0x4d6ee5){_0x262c2f[_0xed56('0x7b')](_0x9e634a['id'])['then'](function(_0x51ab08){_0x3f29b8({'code':0xc8,'message':_0x51ab08['message']});})[_0xed56('0x19')](function(_0x5bd21e){_0x4d6ee5(_0x5f30c8[_0xed56('0xf')](0x1f4,_0x5bd21e[_0xed56('0x1a')]));});});},'EventManager':function(_0x5200e4){var _0x5dc43d=this;return new Promise(function(_0x1e9495,_0x6b988a){if(!_0x5200e4[_0xed56('0x7c')]){return _0x6b988a(_0x5dc43d[_0xed56('0xf')](0x1f4,_0xed56('0x7d')));}ami['emit'](_0xed56('0x7e')+_0x5200e4[_0xed56('0x7c')],_0x5200e4['message']);_0x1e9495({'code':0xc8,'message':_0x5200e4});});},'FaxAccounts':function(_0x15bfde){return new Promise(function(_0x3b3eb4,_0xb05651){var _0x274b7b=_[_0xed56('0x57')](_0x5dfd6c['faxAccounts']);_0x3b3eb4({'count':_0x274b7b[_0xed56('0x56')],'rows':_0x274b7b});});},'SendFax':function(_0x18a585){var _0x213852=this;return new Promise(function(_0x4ed931,_0x1e65f7){_0x31e2a1[_0xed56('0x7f')](_0x18a585)[_0xed56('0x18')](function(_0x79acf2){_0x4ed931({'code':0xc8,'message':_0x79acf2[_0xed56('0x1a')]});})['catch'](function(_0x1b3b1d){_0x1e65f7(_0x213852['error'](0x1f4,_0x1b3b1d[_0xed56('0x1a')]));});});},'CheckAfterSend':function(_0x30c600){var _0x33f6f7=this;return new Promise(function(_0x114a83,_0x59ca04){_0x31e2a1[_0xed56('0x80')](_0x30c600)[_0xed56('0x18')](function(_0x1a75c4){_0x114a83({'code':0xc8,'message':_0x1a75c4[_0xed56('0x1a')]});})['catch'](function(_0xca332d){_0x59ca04(_0x33f6f7['error'](0x1f4,_0xca332d[_0xed56('0x1a')]));});});}};var _0xc4fa20=jayson['server'](_0x183076)['http']();_0xc4fa20['on'](_0xed56('0xf'),function(_0x1a1eae){return _0x133c57(_0x1a1eae);});_0xc4fa20[_0xed56('0x81')](0x232a,_0xed56('0x82'),function(){console[_0xed56('0x83')](_0xed56('0x84'),0x232a);return _0x883005('RPC\x20listening\x20on\x20port:'+0x232a);});});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/cmContact/index.js b/server/services/ami/trigger/cmContact/index.js
index f640ed9..00090ad 100644
--- a/server/services/ami/trigger/cmContact/index.js
+++ b/server/services/ami/trigger/cmContact/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6923=['Error\x20creating\x20contact','util','lodash','ioredis','../../../../config/environment','../../../../config/logger','trigger','redis','defaults','localhost','socket.io-emitter','stringify','emit','data2','calleridnum','isNil','firstName','calleridname','','uniqueid','destcalleridname','phone','destcalleridnum','resolve','then','showContact','xmd-contactid2','format','user:%s','name','trigger:%s','toLowerCase','merge','data1','action','catch','error'];(function(_0x4d3a2b,_0x32a224){var _0xdd32c8=function(_0x18f96f){while(--_0x18f96f){_0x4d3a2b['push'](_0x4d3a2b['shift']());}};_0xdd32c8(++_0x32a224);}(_0x6923,0x104));var _0x3692=function(_0x55f87a,_0x516100){_0x55f87a=_0x55f87a-0x0;var _0x3a4058=_0x6923[_0x55f87a];return _0x3a4058;};'use strict';var BPromise=require('bluebird');var util=require(_0x3692('0x0'));var _=require(_0x3692('0x1'));var Redis=require(_0x3692('0x2'));var config=require(_0x3692('0x3'));var logger=require(_0x3692('0x4'))(_0x3692('0x5'));var cmContactRpc=require('../../rpc/cmContact');config[_0x3692('0x6')]=_[_0x3692('0x7')](config['redis'],{'host':_0x3692('0x8'),'port':0x18eb});var io=require(_0x3692('0x9'))(new Redis(config[_0x3692('0x6')]));function emit(_0x2f77f1,_0x414c3c,_0x69808){logger['info'](_0x2f77f1,_0x414c3c,JSON[_0x3692('0xa')](_0x69808));io['to'](_0x2f77f1)[_0x3692('0xb')](_0x414c3c,_0x69808);}exports['exec']=function(_0x319c59,_0x17b5ca,_0x2e2c19){_0x2e2c19['autoCreate']=0x0;if(_0x17b5ca[_0x3692('0xc')]&&parseInt(_0x17b5ca[_0x3692('0xc')],0xa)){var _0x3dc2ea={'ListId':parseInt(_0x17b5ca['data1'],0xa),'phone':_0x2e2c19[_0x3692('0xd')]};if(_[_0x3692('0xe')](_0x2e2c19['routeId'])){_0x3dc2ea[_0x3692('0xf')]=_0x2e2c19[_0x3692('0x10')]&&_0x2e2c19['calleridname']!==_0x3692('0x11')?_0x2e2c19['calleridname']:_0x2e2c19[_0x3692('0xd')]||_0x2e2c19[_0x3692('0x12')];}else{_0x3dc2ea[_0x3692('0xf')]=_0x2e2c19[_0x3692('0x13')]&&_0x2e2c19[_0x3692('0x13')]!==''?_0x2e2c19['destcalleridname']:_0x2e2c19['destcalleridnum']||_0x2e2c19[_0x3692('0x12')];_0x3dc2ea[_0x3692('0x14')]=_0x2e2c19[_0x3692('0x13')]&&_0x2e2c19['destcalleridname']!==''?_0x2e2c19['destcalleridname']:_0x2e2c19[_0x3692('0x15')]||_0x2e2c19[_0x3692('0x12')];}BPromise[_0x3692('0x16')]()[_0x3692('0x17')](cmContactRpc[_0x3692('0x18')]({'where':_['omit'](_0x3dc2ea,[_0x3692('0xf')])}))[_0x3692('0x17')](function(_0x504d78){if(_0x504d78){_0x2e2c19[_0x3692('0x19')]=_0x504d78['id'];emit(util[_0x3692('0x1a')](_0x3692('0x1b'),_0x319c59[_0x3692('0x1c')]),util[_0x3692('0x1a')](_0x3692('0x1d'),_0x17b5ca['action'][_0x3692('0x1e')]()),_[_0x3692('0x1f')](_0x2e2c19,{'ListId':parseInt(_0x17b5ca[_0x3692('0x20')],0xa)}));return;}else{return BPromise[_0x3692('0x16')]()[_0x3692('0x17')](cmContactRpc['createContact'](_0x3dc2ea));}})[_0x3692('0x17')](function(_0x46665f){if(_0x46665f){_0x2e2c19[_0x3692('0x19')]=_0x46665f['id'];emit(util[_0x3692('0x1a')](_0x3692('0x1b'),_0x319c59[_0x3692('0x1c')]),util[_0x3692('0x1a')](_0x3692('0x1d'),_0x17b5ca[_0x3692('0x21')][_0x3692('0x1e')]()),_[_0x3692('0x1f')](_0x2e2c19,{'ListId':parseInt(_0x17b5ca[_0x3692('0x20')],0xa)}));}})[_0x3692('0x22')](function(_0x37cbfc){logger[_0x3692('0x23')](_0x3692('0x24'),JSON[_0x3692('0xa')](_0x37cbfc));});}else{if(_0x319c59){emit(util[_0x3692('0x1a')](_0x3692('0x1b'),_0x319c59['name']),util[_0x3692('0x1a')]('trigger:%s',_0x17b5ca[_0x3692('0x21')]['toLowerCase']()),_['merge']({'ListId':parseInt(_0x17b5ca[_0x3692('0x20')],0xa)},_0x2e2c19));}}};
\ No newline at end of file
+var _0x892c=['omit','xmd-contactid2','user:%s','name','format','trigger:%s','action','merge','createContact','toLowerCase','error','Error\x20creating\x20contact','bluebird','util','lodash','../../../../config/environment','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','info','emit','exec','data2','data1','isNil','routeId','firstName','calleridname','calleridnum','uniqueid','destcalleridname','','destcalleridnum','phone','resolve','then'];(function(_0x1f9f37,_0x18776e){var _0x21c080=function(_0x4acb93){while(--_0x4acb93){_0x1f9f37['push'](_0x1f9f37['shift']());}};_0x21c080(++_0x18776e);}(_0x892c,0x162));var _0xc892=function(_0x8f6a2c,_0x435996){_0x8f6a2c=_0x8f6a2c-0x0;var _0x42a718=_0x892c[_0x8f6a2c];return _0x42a718;};'use strict';var BPromise=require(_0xc892('0x0'));var util=require(_0xc892('0x1'));var _=require(_0xc892('0x2'));var Redis=require('ioredis');var config=require(_0xc892('0x3'));var logger=require(_0xc892('0x4'))('trigger');var cmContactRpc=require('../../rpc/cmContact');config[_0xc892('0x5')]=_[_0xc892('0x6')](config[_0xc892('0x5')],{'host':_0xc892('0x7'),'port':0x18eb});var io=require(_0xc892('0x8'))(new Redis(config[_0xc892('0x5')]));function emit(_0x58720f,_0x3def1f,_0x41b19c){logger[_0xc892('0x9')](_0x58720f,_0x3def1f,JSON['stringify'](_0x41b19c));io['to'](_0x58720f)[_0xc892('0xa')](_0x3def1f,_0x41b19c);}exports[_0xc892('0xb')]=function(_0x374097,_0x54c59a,_0x4d5edc){_0x4d5edc['autoCreate']=0x0;if(_0x54c59a['data2']&&parseInt(_0x54c59a[_0xc892('0xc')],0xa)){var _0x1ec773={'ListId':parseInt(_0x54c59a[_0xc892('0xd')],0xa),'phone':_0x4d5edc['calleridnum']};if(_[_0xc892('0xe')](_0x4d5edc[_0xc892('0xf')])){_0x1ec773[_0xc892('0x10')]=_0x4d5edc[_0xc892('0x11')]&&_0x4d5edc[_0xc892('0x11')]!==''?_0x4d5edc[_0xc892('0x11')]:_0x4d5edc[_0xc892('0x12')]||_0x4d5edc[_0xc892('0x13')];}else{_0x1ec773[_0xc892('0x10')]=_0x4d5edc[_0xc892('0x14')]&&_0x4d5edc[_0xc892('0x14')]!==_0xc892('0x15')?_0x4d5edc[_0xc892('0x14')]:_0x4d5edc[_0xc892('0x16')]||_0x4d5edc['uniqueid'];_0x1ec773[_0xc892('0x17')]=_0x4d5edc[_0xc892('0x14')]&&_0x4d5edc[_0xc892('0x14')]!==_0xc892('0x15')?_0x4d5edc[_0xc892('0x14')]:_0x4d5edc['destcalleridnum']||_0x4d5edc[_0xc892('0x13')];}BPromise[_0xc892('0x18')]()[_0xc892('0x19')](cmContactRpc['showContact']({'where':_[_0xc892('0x1a')](_0x1ec773,[_0xc892('0x10')])}))[_0xc892('0x19')](function(_0x298784){if(_0x298784){_0x4d5edc[_0xc892('0x1b')]=_0x298784['id'];emit(util['format'](_0xc892('0x1c'),_0x374097[_0xc892('0x1d')]),util[_0xc892('0x1e')](_0xc892('0x1f'),_0x54c59a[_0xc892('0x20')]['toLowerCase']()),_[_0xc892('0x21')](_0x4d5edc,{'ListId':parseInt(_0x54c59a[_0xc892('0xd')],0xa)}));return;}else{return BPromise[_0xc892('0x18')]()['then'](cmContactRpc[_0xc892('0x22')](_0x1ec773));}})[_0xc892('0x19')](function(_0x31e960){if(_0x31e960){_0x4d5edc[_0xc892('0x1b')]=_0x31e960['id'];emit(util[_0xc892('0x1e')](_0xc892('0x1c'),_0x374097['name']),util[_0xc892('0x1e')](_0xc892('0x1f'),_0x54c59a[_0xc892('0x20')][_0xc892('0x23')]()),_['merge'](_0x4d5edc,{'ListId':parseInt(_0x54c59a[_0xc892('0xd')],0xa)}));}})['catch'](function(_0x76921c){logger[_0xc892('0x24')](_0xc892('0x25'),JSON['stringify'](_0x76921c));});}else{if(_0x374097){emit(util[_0xc892('0x1e')](_0xc892('0x1c'),_0x374097[_0xc892('0x1d')]),util[_0xc892('0x1e')](_0xc892('0x1f'),_0x54c59a[_0xc892('0x20')][_0xc892('0x23')]()),_['merge']({'ListId':parseInt(_0x54c59a['data1'],0xa)},_0x4d5edc));}}};
\ No newline at end of file
diff --git a/server/services/ami/trigger/index.js b/server/services/ami/trigger/index.js
index 79d84e7..290ba5f 100644
--- a/server/services/ami/trigger/index.js
+++ b/server/services/ami/trigger/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x008d=['windowWidth','data5','800','windowHeight','data6','winApplication','winArguments','format','user:%s','name','trigger:%s:%s','action','jscripty','trigger:%s','exec','integration','queue','routeId','urlforward','query','search','every','AllConditions','checkConditions','channel','AnyConditions','some','field','chat','ChatWebsiteId','operator','upperFirst','AccountId','interaction','event','value','agent','membername','lastevent','exports','util','lodash','url','mustache','ioredis','./urlforward','./integration','./cmContact','./script','../../../config/environment','../../../config/logger','trigger','../ami','redis','defaults','localhost','socket.io-emitter','popup','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','accounts','custom:agentcalled','syncCustomEvent','custom:agentconnect','custom:agentringnoanswer','bind','custom:queuecallerabandon','custom:dialbegin','syncAgentDial','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','prototype','emit','clone','checkTriggers','interface','hasOwnProperty','status','checkTrigger','merge','variables','Actions','length','toLowerCase','contactmanager','motionbar','browser','data1','data2','html','render','template\x20not\x20found','uri','buildUri','data3','isNil','data4','uriLocation'];(function(_0x333fc8,_0x2b292c){var _0x432439=function(_0x5501b6){while(--_0x5501b6){_0x333fc8['push'](_0x333fc8['shift']());}};_0x432439(++_0x2b292c);}(_0x008d,0x9b));var _0xd008=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0x008d[_0x46698a];return _0x356db0;};'use strict';var util=require(_0xd008('0x0'));var _=require(_0xd008('0x1'));var url=require(_0xd008('0x2'));var Mustache=require(_0xd008('0x3'));var Redis=require(_0xd008('0x4'));var urlforward=require(_0xd008('0x5'));var integration=require(_0xd008('0x6'));var cmContact=require(_0xd008('0x7'));var script=require(_0xd008('0x8'));var cmContactRpc=require('../rpc/cmContact');var config=require(_0xd008('0x9'));var logger=require(_0xd008('0xa'))(_0xd008('0xb'));var ami=require(_0xd008('0xc'));config[_0xd008('0xd')]=_[_0xd008('0xe')](config[_0xd008('0xd')],{'host':_0xd008('0xf'),'port':0x18eb});var io=require(_0xd008('0x10'))(new Redis(config['redis']));var operators={'equals':function(_0x39ec1a,_0x4fc9bb){return _0x39ec1a==_0x4fc9bb;},'not_equals':function(_0x2066ab,_0x4b2b38){return _0x2066ab!=_0x4b2b38;}};var barAndWebActions=[_0xd008('0x11'),_0xd008('0x2'),_0xd008('0x12')];function Trigger(_0x50301f){this['triggers']=_0x50301f[_0xd008('0x13')];this[_0xd008('0x14')]=_0x50301f[_0xd008('0x14')];this[_0xd008('0x15')]=_0x50301f[_0xd008('0x15')];this['templates']=_0x50301f[_0xd008('0x16')];this[_0xd008('0x17')]=_0x50301f[_0xd008('0x17')];this[_0xd008('0x18')]=_0x50301f['zendeskAccounts'];this[_0xd008('0x19')]=_0x50301f[_0xd008('0x19')];this[_0xd008('0x1a')]=_0x50301f[_0xd008('0x1a')];this[_0xd008('0x1b')]=_0x50301f['sugarcrmAccounts'];this['zohoAccounts']=_0x50301f[_0xd008('0x1c')];this[_0xd008('0x1d')]=_0x50301f[_0xd008('0x1d')];this[_0xd008('0x1e')]=_0x50301f[_0xd008('0x1e')];this['servicenowAccounts']=_0x50301f[_0xd008('0x1f')];this['dynamics365Accounts']=_0x50301f[_0xd008('0x20')];this[_0xd008('0x21')]={'zendesk':this[_0xd008('0x18')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0xd008('0x19')],'sugarcrm':this[_0xd008('0x1b')],'zoho':this[_0xd008('0x1c')],'desk':this[_0xd008('0x1d')],'vtiger':this[_0xd008('0x1e')],'servicenow':this[_0xd008('0x1f')],'dynamics365':this[_0xd008('0x20')]};ami['on'](_0xd008('0x22'),this[_0xd008('0x23')]['bind'](this));ami['on'](_0xd008('0x24'),this['syncCustomEvent']['bind'](this));ami['on'](_0xd008('0x25'),this['syncCustomEvent']['bind'](this));ami['on']('custom:agentcomplete',this[_0xd008('0x23')][_0xd008('0x26')](this));ami['on'](_0xd008('0x27'),this['syncCustomEvent'][_0xd008('0x26')](this));ami['on'](_0xd008('0x28'),this['syncAgentDial'][_0xd008('0x26')](this));ami['on']('custom:dialconnect',this[_0xd008('0x29')][_0xd008('0x26')](this));ami['on'](_0xd008('0x2a'),this['syncAgentDial'][_0xd008('0x26')](this));ami['on'](_0xd008('0x2b'),this[_0xd008('0x23')]['bind'](this));ami['on'](_0xd008('0x2c'),this[_0xd008('0x23')]['bind'](this));ami['on']('custom:incomingmessage',this[_0xd008('0x23')][_0xd008('0x26')](this));ami['on'](_0xd008('0x2d'),this[_0xd008('0x23')][_0xd008('0x26')](this));ami['on'](_0xd008('0x2e'),this[_0xd008('0x23')][_0xd008('0x26')](this));ami['on'](_0xd008('0x2f'),this[_0xd008('0x23')][_0xd008('0x26')](this));}Trigger[_0xd008('0x30')]['emit']=function(_0x30cae1,_0xe2d6f1,_0x5a1cb2){logger['info'](_0x30cae1,_0xe2d6f1,JSON['stringify'](_0x5a1cb2));io['to'](_0x30cae1)[_0xd008('0x31')](_0xe2d6f1,_0x5a1cb2);};Trigger[_0xd008('0x30')]['syncCustomEvent']=function(_0x3b2c8b){var _0x3d2e7f=_[_0xd008('0x32')](_0x3b2c8b);this[_0xd008('0x33')](_0x3d2e7f);};Trigger['prototype'][_0xd008('0x29')]=function(_0x10f51c){if(this[_0xd008('0x14')][_0x10f51c[_0xd008('0x34')]]){this[_0xd008('0x23')](_0x10f51c);}};Trigger[_0xd008('0x30')][_0xd008('0x33')]=function(_0x19019a){var _0x3833fa;for(var _0x25affc in this[_0xd008('0x13')]){if(this[_0xd008('0x13')][_0xd008('0x35')](_0x25affc)){if(this[_0xd008('0x13')][_0x25affc][_0xd008('0x36')]){_0x3833fa=this[_0xd008('0x37')](this[_0xd008('0x13')][_0x25affc],_0x19019a);if(_0x3833fa){_[_0xd008('0x38')](_0x19019a,_0x19019a[_0xd008('0x39')]);for(var _0x49d1ad=0x0,_0x2c6cbc,_0x31e76e,_0x4bcb43;_0x49d1ad0x0){_0xf3cadc=_[_0x019d('0x2d')](_0x16c08c,_0x477d0f);}return _0xf3cadc;}function getCustomFields(_0x4dd173,_0x5f470e){var _0x174346=[];var _0x231e33={'custom_fields':{}};if(_0x4dd173['length']>0x0){_[_0x019d('0x2e')](_0x4dd173,function(_0x11a0d3){if(_0x11a0d3[_0x019d('0x2f')]===_0x019d('0x30')&&_0x11a0d3[_0x019d('0x31')]&&!_0x11a0d3[_0x019d('0x32')]){_0x231e33[_0x11a0d3[_0x019d('0x31')][_0x019d('0x33')]()]=_0x11a0d3[_0x019d('0x34')][_0x019d('0x24')]();}else if(_0x11a0d3[_0x019d('0x2f')]===_0x019d('0x30')&&_0x11a0d3[_0x019d('0x35')]&&_0x11a0d3[_0x019d('0x32')]){_0x231e33[_0x019d('0x36')][_0x11a0d3['idField']]=_0x11a0d3[_0x019d('0x34')][_0x019d('0x24')]();}else if(_0x11a0d3['type']===_0x019d('0x37')&&_0x11a0d3['variableName']&&_0x11a0d3[_0x019d('0x35')]&&_0x11a0d3[_0x019d('0x32')]){_0x5f470e[_0x11a0d3[_0x019d('0x38')]]&&(_0x231e33['custom_fields'][_0x11a0d3['idField']]=_0x5f470e[_0x11a0d3[_0x019d('0x38')]][_0x019d('0x24')]());}else if(_0x11a0d3[_0x019d('0x2f')]===_0x019d('0x39')&&_0x11a0d3[_0x019d('0x3a')]&&_0x11a0d3[_0x019d('0x3a')][_0x019d('0x3b')]&&_0x11a0d3['idField']&&_0x11a0d3[_0x019d('0x32')]){_0x5f470e[_0x11a0d3[_0x019d('0x3a')]['name'][_0x019d('0x33')]()]&&(_0x231e33[_0x019d('0x36')][_0x11a0d3[_0x019d('0x35')]]=_0x5f470e[_0x11a0d3[_0x019d('0x3a')]['name'][_0x019d('0x33')]()][_0x019d('0x24')]());}});}if(_0x231e33['priority']){_0x231e33[_0x019d('0x3c')]=Number(_0x231e33[_0x019d('0x3c')]);}return _0x231e33;}function getTicket(_0x57d5a0,_0x1e7e56,_0x4776f6,_0x42a8aa,_0x432a72){logger[_0x019d('0x16')](_0x019d('0x3d'));var _0x9d1c8b=_['merge']({'subject':intUtil[_0x019d('0x3e')](_0x42a8aa[_0x019d('0x3f')],_0x432a72,'\x20'),'type':_0x019d('0x40'),'status':_0x019d('0x41'),'labels':[_0x019d('0x42'),_0x019d('0x43'),_0x019d('0x44')]['concat'](getTags(_0x42a8aa[_0x019d('0x45')],_0x019d('0x3b'))),'description':intUtil[_0x019d('0x3e')](_0x42a8aa[_0x019d('0x46')],_0x432a72,'\x0a'),'_links':{'assigned_user':{'href':util[_0x019d('0xe')](_0x019d('0x47'),_0x1e7e56['id']),'class':_0x019d('0x48')}},'message':{'direction':'in','body':intUtil[_0x019d('0x3e')](_0x42a8aa[_0x019d('0x46')],_0x432a72,'\x0a')}},getCustomFields(_0x42a8aa['Fields'],_0x432a72));return request({'uri':util[_0x019d('0xe')]('%s/customers/%d/cases',_0x57d5a0[_0x019d('0x10')],_0x4776f6['id']),'method':_0x019d('0x2a'),'body':_0x9d1c8b});}exports[_0x019d('0x49')]=function(_0x3c89f1,_0x42a02c,_0x244c03,_0x2081d2,_0x1c43e8,_0x5350b7){var _0x32d19c,_0x30340b;_0x5350b7[_0x019d('0x10')]=intUtil['stripTrailingSlash'](_0x5350b7[_0x019d('0x10')]);_0x5350b7['serverUrl']=intUtil[_0x019d('0x4a')](_0x5350b7[_0x019d('0x4b')]);if(_0x1c43e8&&_0x1c43e8['monitor_format']){logger[_0x019d('0x16')](_0x019d('0x4c'),_0x019d('0x4d'));_0x42a02c[_0x019d('0x4e')]=util[_0x019d('0xe')](_0x019d('0x4f'),_0x5350b7[_0x019d('0x4b')],_0x42a02c[_0x019d('0x50')],md5(_0x42a02c[_0x019d('0x50')]));}else{_0x42a02c[_0x019d('0x4e')]='';}headers['Authorization']=getAuth(_0x5350b7);return getUser(_0x5350b7,_0x2081d2[_0x019d('0x51')])[_0x019d('0x14')](function(_0x3f3daa){_0x32d19c=_0x3f3daa;logger[_0x019d('0x16')]('The\x20User\x20ID\x20is:',_0x32d19c['id']);return getEndUser(_0x5350b7,_0x42a02c[_0x019d('0x52')],_0x42a02c[_0x019d('0x53')]);})[_0x019d('0x14')](function(_0x3254a0){_0x30340b=_0x3254a0;logger[_0x019d('0x16')]('The\x20Enduser\x20ID\x20is:',_0x30340b['id']);return getTicket(_0x5350b7,_0x32d19c,_0x30340b,_0x244c03,_0x42a02c);})[_0x019d('0x14')](function(_0x2a6f5c){if(_0x2a6f5c){logger[_0x019d('0x16')](_0x019d('0x54'));logger[_0x019d('0x16')]('The\x20Ticket\x20ID\x20is:',_0x2a6f5c['id']);switch(_0x5350b7[_0x019d('0x2f')]){case _0x019d('0x55'):logger[_0x019d('0x16')](_0x019d('0x4c'),_0x019d('0x56'));emit(util[_0x019d('0xe')](_0x019d('0x57'),_0x2081d2['name']),'trigger:desk:display',{'recordId':_0x2a6f5c['id']});break;case _0x019d('0x58'):logger['info'](_0x019d('0x4c'),_0x019d('0x59'));emit(util['format'](_0x019d('0x57'),_0x2081d2[_0x019d('0x3b')]),_0x019d('0x5a'),{'uri':util['format']('https://xcally.desk.com/web/agent/case/%d',_0x2a6f5c['id'])});break;default:logger[_0x019d('0x5b')](_0x019d('0x4c'),'Desk\x20account\x20type\x20not\x20recognized');}}})[_0x019d('0x5c')](function(_0x3cffc7){console[_0x019d('0x5b')](_0x3cffc7);logger[_0x019d('0x5b')]('[QUEUE]',JSON[_0x019d('0x1b')](_0x3cffc7));});};exports[_0x019d('0x5d')]=function(_0xb8325a,_0x57e23c,_0x5cb5fa,_0x5e3041,_0x50047c,_0x52b9a4,_0x213b29){var _0x2bdf9d,_0x259f8a;_0x52b9a4[_0x019d('0x10')]=intUtil['stripTrailingSlash'](_0x52b9a4[_0x019d('0x10')]);_0x52b9a4[_0x019d('0x4b')]=intUtil['stripTrailingSlash'](_0x52b9a4[_0x019d('0x4b')]);if(_0x213b29&&_0x213b29[_0x019d('0x5e')]&&_0x213b29[_0x019d('0x5e')]!==_0x019d('0x5f')){logger[_0x019d('0x16')](_0x019d('0x60'),_0x019d('0x4d'));_0x57e23c[_0x019d('0x4e')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x52b9a4['serverUrl'],_0x57e23c[_0x019d('0x50')],md5(_0x57e23c[_0x019d('0x50')]));}headers[_0x019d('0x61')]=getAuth(_0x52b9a4);return getUser(_0x52b9a4,_0x5e3041[_0x019d('0x51')])[_0x019d('0x14')](function(_0x7069f){_0x2bdf9d=_0x7069f;logger['info'](_0x019d('0x62'),_0x2bdf9d['id']);return getEndUser(_0x52b9a4,_0x57e23c['destcalleridname'],_0x57e23c[_0x019d('0x63')]);})[_0x019d('0x14')](function(_0x34ed04){_0x259f8a=_0x34ed04;logger[_0x019d('0x16')](_0x019d('0x64'),_0x259f8a['id']);return getTicket(_0x52b9a4,_0x2bdf9d,_0x259f8a,_0x5cb5fa,_0x57e23c);})[_0x019d('0x14')](function(_0x5d34d7){if(_0x5d34d7){logger[_0x019d('0x16')](_0x019d('0x54'));logger[_0x019d('0x16')](_0x019d('0x65'),_0x5d34d7['id']);switch(_0x52b9a4[_0x019d('0x2f')]){case _0x019d('0x55'):logger['info']('[QUEUE]',_0x019d('0x56'));emit(util[_0x019d('0xe')](_0x019d('0x57'),_0x5e3041[_0x019d('0x3b')]),_0x019d('0x66'),{'recordId':_0x5d34d7['id']});break;case _0x019d('0x58'):logger[_0x019d('0x16')](_0x019d('0x4c'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x019d('0xe')](_0x019d('0x57'),_0x5e3041[_0x019d('0x3b')]),_0x019d('0x5a'),{'uri':util[_0x019d('0xe')]('%s/agent/tickets/%s',_0x52b9a4[_0x019d('0x10')],_0x5d34d7['id'])});break;default:logger['error'](_0x019d('0x60'),_0x019d('0x67'));}}})[_0x019d('0x5c')](function(_0x5aec15){logger[_0x019d('0x5b')](_0x019d('0x60'),JSON[_0x019d('0x1b')](_0x5aec15));});};exports[_0x019d('0x68')]=function(_0x5f58df,_0x34d66f,_0x709c76,_0x5338fc,_0x4df9e4,_0x107266){var _0x52dcb9,_0x4aa0ef;_0x107266[_0x019d('0x10')]=intUtil[_0x019d('0x4a')](_0x107266[_0x019d('0x10')]);_0x107266[_0x019d('0x4b')]=intUtil[_0x019d('0x4a')](_0x107266[_0x019d('0x4b')]);if(_0x4df9e4&&_0x4df9e4[_0x019d('0x69')]){logger[_0x019d('0x16')](_0x019d('0x6a'),_0x019d('0x4d'));_0x34d66f[_0x019d('0x4e')]=util[_0x019d('0xe')](_0x019d('0x4f'),_0x107266['serverUrl'],_0x34d66f[_0x019d('0x50')],md5(_0x34d66f[_0x019d('0x50')]));}else{_0x34d66f[_0x019d('0x4e')]='';}headers['Authorization']=getAuth(_0x107266);return getUser(_0x107266)['then'](function(_0x593bf3){_0x52dcb9=_0x593bf3;logger[_0x019d('0x16')](_0x019d('0x62'),_0x52dcb9['id']);return getEndUser(_0x107266,_0x34d66f[_0x019d('0x52')],_0x34d66f[_0x019d('0x53')]);})[_0x019d('0x14')](function(_0x58cbfa){_0x4aa0ef=_0x58cbfa;logger[_0x019d('0x16')](_0x019d('0x64'),_0x4aa0ef['id']);return getTicket(_0x107266,_0x52dcb9,_0x4aa0ef,_0x709c76,_0x34d66f);})[_0x019d('0x14')](function(_0x88deca){if(_0x88deca){logger['info']('Ticket\x20created!');logger[_0x019d('0x16')](_0x019d('0x65'),_0x88deca['id']);}})[_0x019d('0x5c')](function(_0x556dc4){logger[_0x019d('0x5b')](_0x019d('0x6a'),JSON[_0x019d('0x1b')](_0x556dc4));});};
\ No newline at end of file
+var _0xf999=['find','_embedded','entries','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','format','debug','[HTTP]','stringify','GET','authType','basic','%s:%s','username','password','token','%s/token:%s','Basic\x20%s','toString','base64','Searching\x20enduser\x20with\x20phone','%s/customers/search','total_entries','Enduser\x20found!','%s/customers','POST','length','map','string','nameField','customField','toLowerCase','content','type','custom_fields','variable','variableName','idField','customVariable','Variable','name','priority','Creating\x20new\x20ticket...','merge','getString','Subjects','phone','new','xCALLY','Motion','CTI','concat','Tags','Descriptions','/api/v2/users/%d','user','Fields','%s/customers/%d/cases','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','Authorization','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Ticket\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','trigger:desk:display','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://xcally.desk.com/web/agent/case/%d','error','Desk\x20account\x20type\x20not\x20recognized','outbound','recordingFormat','[OUTBOUND]','destcalleridname','destcalleridnum','Ticket\x20created!','%s/agent/tickets/%s','catch','abandoned','[ABANDONED]','The\x20Enduser\x20ID\x20is:','lodash','request-promise','md5','util','ioredis','../../../../config/environment','../../../../config/logger','desk','redis','defaults','socket.io-emitter','emit','application/json','validateEmail','info','Getting\x20agent\x20with\x20email','%s/users','remoteUri','then'];(function(_0x385ee2,_0xc1d73d){var _0x39c093=function(_0x59a148){while(--_0x59a148){_0x385ee2['push'](_0x385ee2['shift']());}};_0x39c093(++_0xc1d73d);}(_0xf999,0x143));var _0x9f99=function(_0x542cbc,_0x86b409){_0x542cbc=_0x542cbc-0x0;var _0x1e83c0=_0xf999[_0x542cbc];return _0x1e83c0;};'use strict';var _=require(_0x9f99('0x0'));var rp=require(_0x9f99('0x1'));var md5=require(_0x9f99('0x2'));var util=require(_0x9f99('0x3'));var Redis=require(_0x9f99('0x4'));var intUtil=require('./util');var config=require(_0x9f99('0x5'));var logger=require(_0x9f99('0x6'))(_0x9f99('0x7'));config[_0x9f99('0x8')]=_[_0x9f99('0x9')](config[_0x9f99('0x8')],{'host':'localhost','port':0x18eb});var io=require(_0x9f99('0xa'))(new Redis(config[_0x9f99('0x8')]));function emit(_0x8d86d5,_0x18e115,_0x186054){io['to'](_0x8d86d5)[_0x9f99('0xb')](_0x18e115,_0x186054);}var headers={'Content-Type':_0x9f99('0xc'),'Accept':_0x9f99('0xc')};function getUser(_0x284346,_0x8f7985){if(intUtil[_0x9f99('0xd')](_0x8f7985)===!![]){logger[_0x9f99('0xe')](_0x9f99('0xf'),_0x8f7985);return request({'uri':util['format'](_0x9f99('0x10'),_0x284346[_0x9f99('0x11')])})[_0x9f99('0x12')](function(_0x549d90){if(_0x549d90['total_entries']){return _[_0x9f99('0x13')](_0x549d90[_0x9f99('0x14')][_0x9f99('0x15')],{'email':_0x8f7985});}})[_0x9f99('0x12')](function(_0x26a74d){if(_0x26a74d){logger[_0x9f99('0xe')](_0x9f99('0x16'));return _0x26a74d;}else{logger[_0x9f99('0xe')](_0x9f99('0x17'));return request({'uri':util['format'](_0x9f99('0x18'),_0x284346[_0x9f99('0x11')])});}});}else{logger[_0x9f99('0xe')](_0x9f99('0x19'));return request({'uri':util[_0x9f99('0x1a')](_0x9f99('0x18'),_0x284346[_0x9f99('0x11')])});}}function request(_0x310824){logger[_0x9f99('0x1b')](_0x9f99('0x1c'),JSON[_0x9f99('0x1d')](_0x310824));return rp(_[_0x9f99('0x9')](_0x310824,{'method':_0x9f99('0x1e'),'headers':headers,'json':!![]}));}function getAuth(_0x582292){var _0x11fd48;if(_0x582292[_0x9f99('0x1f')]===_0x9f99('0x20')){_0x11fd48=util[_0x9f99('0x1a')](_0x9f99('0x21'),_0x582292[_0x9f99('0x22')],_0x582292[_0x9f99('0x23')]);}else if(_0x582292[_0x9f99('0x1f')]===_0x9f99('0x24')){_0x11fd48=util['format'](_0x9f99('0x25'),_0x582292[_0x9f99('0x22')],_0x582292[_0x9f99('0x24')]);}return util[_0x9f99('0x1a')](_0x9f99('0x26'),new Buffer(_0x11fd48)[_0x9f99('0x27')](_0x9f99('0x28')));}function getEndUser(_0x26411e,_0x2679c1,_0x3fe6b1){logger[_0x9f99('0xe')](_0x9f99('0x29'),_0x3fe6b1);return request({'uri':util[_0x9f99('0x1a')](_0x9f99('0x2a'),_0x26411e[_0x9f99('0x11')]),'qs':{'phone':_0x3fe6b1}})[_0x9f99('0x12')](function(_0x48aa34){if(_0x48aa34[_0x9f99('0x2b')]){logger['info'](_0x9f99('0x2c'));return _0x48aa34[_0x9f99('0x14')]['entries'][0x0];}else{logger['info']('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util[_0x9f99('0x1a')](_0x9f99('0x2d'),_0x26411e[_0x9f99('0x11')]),'method':_0x9f99('0x2e'),'body':{'first_name':_0x2679c1,'title':_0x2679c1,'phone_numbers':[{'type':'work','value':_0x3fe6b1}]}});}});}function getTags(_0x3620a8,_0x5a83f3){var _0x55ae17=[];if(_0x3620a8&&_0x3620a8[_0x9f99('0x2f')]>0x0){_0x55ae17=_[_0x9f99('0x30')](_0x3620a8,_0x5a83f3);}return _0x55ae17;}function getCustomFields(_0x222cbe,_0xd8d95){var _0x565616=[];var _0x46cf32={'custom_fields':{}};if(_0x222cbe[_0x9f99('0x2f')]>0x0){_['forEach'](_0x222cbe,function(_0xf19e68){if(_0xf19e68['type']===_0x9f99('0x31')&&_0xf19e68[_0x9f99('0x32')]&&!_0xf19e68[_0x9f99('0x33')]){_0x46cf32[_0xf19e68['nameField'][_0x9f99('0x34')]()]=_0xf19e68[_0x9f99('0x35')][_0x9f99('0x27')]();}else if(_0xf19e68[_0x9f99('0x36')]===_0x9f99('0x31')&&_0xf19e68['idField']&&_0xf19e68[_0x9f99('0x33')]){_0x46cf32[_0x9f99('0x37')][_0xf19e68['idField']]=_0xf19e68['content'][_0x9f99('0x27')]();}else if(_0xf19e68['type']===_0x9f99('0x38')&&_0xf19e68[_0x9f99('0x39')]&&_0xf19e68['idField']&&_0xf19e68['customField']){_0xd8d95[_0xf19e68[_0x9f99('0x39')]]&&(_0x46cf32[_0x9f99('0x37')][_0xf19e68[_0x9f99('0x3a')]]=_0xd8d95[_0xf19e68[_0x9f99('0x39')]][_0x9f99('0x27')]());}else if(_0xf19e68['type']===_0x9f99('0x3b')&&_0xf19e68[_0x9f99('0x3c')]&&_0xf19e68[_0x9f99('0x3c')]['name']&&_0xf19e68['idField']&&_0xf19e68[_0x9f99('0x33')]){_0xd8d95[_0xf19e68['Variable'][_0x9f99('0x3d')][_0x9f99('0x34')]()]&&(_0x46cf32[_0x9f99('0x37')][_0xf19e68['idField']]=_0xd8d95[_0xf19e68[_0x9f99('0x3c')]['name'][_0x9f99('0x34')]()][_0x9f99('0x27')]());}});}if(_0x46cf32[_0x9f99('0x3e')]){_0x46cf32[_0x9f99('0x3e')]=Number(_0x46cf32[_0x9f99('0x3e')]);}return _0x46cf32;}function getTicket(_0x5fed0d,_0x4abf7a,_0x4eb3bb,_0x5ee1d0,_0x31351d){logger[_0x9f99('0xe')](_0x9f99('0x3f'));var _0x3250f6=_[_0x9f99('0x40')]({'subject':intUtil[_0x9f99('0x41')](_0x5ee1d0[_0x9f99('0x42')],_0x31351d,'\x20'),'type':_0x9f99('0x43'),'status':_0x9f99('0x44'),'labels':[_0x9f99('0x45'),_0x9f99('0x46'),_0x9f99('0x47')][_0x9f99('0x48')](getTags(_0x5ee1d0[_0x9f99('0x49')],'name')),'description':intUtil['getString'](_0x5ee1d0[_0x9f99('0x4a')],_0x31351d,'\x0a'),'_links':{'assigned_user':{'href':util['format'](_0x9f99('0x4b'),_0x4abf7a['id']),'class':_0x9f99('0x4c')}},'message':{'direction':'in','body':intUtil[_0x9f99('0x41')](_0x5ee1d0[_0x9f99('0x4a')],_0x31351d,'\x0a')}},getCustomFields(_0x5ee1d0[_0x9f99('0x4d')],_0x31351d));return request({'uri':util[_0x9f99('0x1a')](_0x9f99('0x4e'),_0x5fed0d['remoteUri'],_0x4eb3bb['id']),'method':_0x9f99('0x2e'),'body':_0x3250f6});}exports[_0x9f99('0x4f')]=function(_0x53842a,_0x306bcd,_0x42036b,_0x5359d3,_0x483ffe,_0x3e66a0){var _0x3de987,_0x15e11d;_0x3e66a0[_0x9f99('0x11')]=intUtil[_0x9f99('0x50')](_0x3e66a0[_0x9f99('0x11')]);_0x3e66a0[_0x9f99('0x51')]=intUtil[_0x9f99('0x50')](_0x3e66a0[_0x9f99('0x51')]);if(_0x483ffe&&_0x483ffe[_0x9f99('0x52')]){logger[_0x9f99('0xe')](_0x9f99('0x53'),_0x9f99('0x54'));_0x306bcd['recordingURL']=util[_0x9f99('0x1a')](_0x9f99('0x55'),_0x3e66a0['serverUrl'],_0x306bcd[_0x9f99('0x56')],md5(_0x306bcd[_0x9f99('0x56')]));}else{_0x306bcd[_0x9f99('0x57')]='';}headers[_0x9f99('0x58')]=getAuth(_0x3e66a0);return getUser(_0x3e66a0,_0x5359d3['email'])[_0x9f99('0x12')](function(_0xe438c1){_0x3de987=_0xe438c1;logger[_0x9f99('0xe')](_0x9f99('0x59'),_0x3de987['id']);return getEndUser(_0x3e66a0,_0x306bcd[_0x9f99('0x5a')],_0x306bcd[_0x9f99('0x5b')]);})['then'](function(_0x2d9fce){_0x15e11d=_0x2d9fce;logger[_0x9f99('0xe')]('The\x20Enduser\x20ID\x20is:',_0x15e11d['id']);return getTicket(_0x3e66a0,_0x3de987,_0x15e11d,_0x42036b,_0x306bcd);})[_0x9f99('0x12')](function(_0x2be345){if(_0x2be345){logger[_0x9f99('0xe')]('Ticket\x20created!');logger[_0x9f99('0xe')](_0x9f99('0x5c'),_0x2be345['id']);switch(_0x3e66a0[_0x9f99('0x36')]){case _0x9f99('0x5d'):logger[_0x9f99('0xe')](_0x9f99('0x53'),_0x9f99('0x5e'));emit(util[_0x9f99('0x1a')]('user:%s',_0x5359d3[_0x9f99('0x3d')]),_0x9f99('0x5f'),{'recordId':_0x2be345['id']});break;case _0x9f99('0x60'):logger[_0x9f99('0xe')]('[QUEUE]',_0x9f99('0x61'));emit(util[_0x9f99('0x1a')](_0x9f99('0x62'),_0x5359d3[_0x9f99('0x3d')]),_0x9f99('0x63'),{'uri':util[_0x9f99('0x1a')](_0x9f99('0x64'),_0x2be345['id'])});break;default:logger[_0x9f99('0x65')](_0x9f99('0x53'),_0x9f99('0x66'));}}})['catch'](function(_0x10674f){console[_0x9f99('0x65')](_0x10674f);logger[_0x9f99('0x65')](_0x9f99('0x53'),JSON['stringify'](_0x10674f));});};exports[_0x9f99('0x67')]=function(_0x5c3641,_0x8d9995,_0x3fe640,_0x193959,_0x4ae948,_0x5881d2,_0x498c71){var _0x5c3f2f,_0x591b96;_0x5881d2[_0x9f99('0x11')]=intUtil[_0x9f99('0x50')](_0x5881d2[_0x9f99('0x11')]);_0x5881d2[_0x9f99('0x51')]=intUtil['stripTrailingSlash'](_0x5881d2['serverUrl']);if(_0x498c71&&_0x498c71[_0x9f99('0x68')]&&_0x498c71[_0x9f99('0x68')]!=='none'){logger[_0x9f99('0xe')](_0x9f99('0x69'),_0x9f99('0x54'));_0x8d9995[_0x9f99('0x57')]=util[_0x9f99('0x1a')](_0x9f99('0x55'),_0x5881d2['serverUrl'],_0x8d9995['uniqueid'],md5(_0x8d9995[_0x9f99('0x56')]));}headers['Authorization']=getAuth(_0x5881d2);return getUser(_0x5881d2,_0x193959['email'])[_0x9f99('0x12')](function(_0x39de35){_0x5c3f2f=_0x39de35;logger[_0x9f99('0xe')]('The\x20User\x20ID\x20is:',_0x5c3f2f['id']);return getEndUser(_0x5881d2,_0x8d9995[_0x9f99('0x6a')],_0x8d9995[_0x9f99('0x6b')]);})[_0x9f99('0x12')](function(_0x1243bb){_0x591b96=_0x1243bb;logger[_0x9f99('0xe')]('The\x20Enduser\x20ID\x20is:',_0x591b96['id']);return getTicket(_0x5881d2,_0x5c3f2f,_0x591b96,_0x3fe640,_0x8d9995);})[_0x9f99('0x12')](function(_0x189f82){if(_0x189f82){logger[_0x9f99('0xe')](_0x9f99('0x6c'));logger[_0x9f99('0xe')](_0x9f99('0x5c'),_0x189f82['id']);switch(_0x5881d2[_0x9f99('0x36')]){case _0x9f99('0x5d'):logger[_0x9f99('0xe')](_0x9f99('0x53'),_0x9f99('0x5e'));emit(util[_0x9f99('0x1a')](_0x9f99('0x62'),_0x193959[_0x9f99('0x3d')]),'trigger:desk:display',{'recordId':_0x189f82['id']});break;case _0x9f99('0x60'):logger[_0x9f99('0xe')]('[QUEUE]',_0x9f99('0x61'));emit(util[_0x9f99('0x1a')](_0x9f99('0x62'),_0x193959['name']),_0x9f99('0x63'),{'uri':util[_0x9f99('0x1a')](_0x9f99('0x6d'),_0x5881d2[_0x9f99('0x11')],_0x189f82['id'])});break;default:logger['error'](_0x9f99('0x69'),_0x9f99('0x66'));}}})[_0x9f99('0x6e')](function(_0x4749a5){logger[_0x9f99('0x65')](_0x9f99('0x69'),JSON[_0x9f99('0x1d')](_0x4749a5));});};exports[_0x9f99('0x6f')]=function(_0x41932f,_0xa84a60,_0x4c9104,_0x310dd7,_0x1cc367,_0x1bddb5){var _0xd55eea,_0x305911;_0x1bddb5[_0x9f99('0x11')]=intUtil[_0x9f99('0x50')](_0x1bddb5['remoteUri']);_0x1bddb5['serverUrl']=intUtil[_0x9f99('0x50')](_0x1bddb5['serverUrl']);if(_0x1cc367&&_0x1cc367['monitor_format']){logger[_0x9f99('0xe')](_0x9f99('0x70'),_0x9f99('0x54'));_0xa84a60[_0x9f99('0x57')]=util[_0x9f99('0x1a')](_0x9f99('0x55'),_0x1bddb5['serverUrl'],_0xa84a60['uniqueid'],md5(_0xa84a60[_0x9f99('0x56')]));}else{_0xa84a60['recordingURL']='';}headers[_0x9f99('0x58')]=getAuth(_0x1bddb5);return getUser(_0x1bddb5)[_0x9f99('0x12')](function(_0xac5f2b){_0xd55eea=_0xac5f2b;logger[_0x9f99('0xe')](_0x9f99('0x59'),_0xd55eea['id']);return getEndUser(_0x1bddb5,_0xa84a60[_0x9f99('0x5a')],_0xa84a60[_0x9f99('0x5b')]);})[_0x9f99('0x12')](function(_0x535056){_0x305911=_0x535056;logger[_0x9f99('0xe')](_0x9f99('0x71'),_0x305911['id']);return getTicket(_0x1bddb5,_0xd55eea,_0x305911,_0x4c9104,_0xa84a60);})[_0x9f99('0x12')](function(_0x1df72a){if(_0x1df72a){logger[_0x9f99('0xe')](_0x9f99('0x6c'));logger['info'](_0x9f99('0x5c'),_0x1df72a['id']);}})['catch'](function(_0xff0ab1){logger[_0x9f99('0x65')](_0x9f99('0x70'),JSON[_0x9f99('0x1d')](_0xff0ab1));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/dynamics365.js b/server/services/ami/trigger/integration/dynamics365.js
index ba635f0..5ede81c 100644
--- a/server/services/ami/trigger/integration/dynamics365.js
+++ b/server/services/ami/trigger/integration/dynamics365.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfb8c=['phonecall','phonecalls','/contacts(','callDirection','queue','ticketId','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','format','user:%s','emit','trigger:browser:url','remoteUri','stripTrailingSlash','serverUrl','abandoned','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','recordingFormat','none','[OUTBOUND]','recordingURL',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Dynamics365\x20integration','inspect','lodash','bluebird','request-promise','util','./util','md5','../../../../config/logger','dynamics365','../../../../config/environment','redis','socket.io-emitter','POST','clientId','username','password','clientSecret','then','access_token','catch','error','toUpperCase','message','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','4.0','validateEmail','email','userEmail','length','internalemailaddress','isdisabled','info',']\x20Agent\x20found\x20','systemuserid','userId','toLowerCase','outbound','/systemusers(','Bearer\x20','headers','odata-entityid','substring','lastIndexOf','enduserId','value','destcalleridnum','calleridnum','telephone1',']\x20Enduser\x20Created!','type','string','nameField','customField','indexOf','content','incident','incidents','assign','getString','Subjects','Descriptions','Fields','ticketType'];(function(_0xf0330b,_0x814253){var _0x538518=function(_0x9c7d43){while(--_0x9c7d43){_0xf0330b['push'](_0xf0330b['shift']());}};_0x538518(++_0x814253);}(_0xfb8c,0x14d));var _0xcfb8=function(_0x71c0ea,_0x3334e7){_0x71c0ea=_0x71c0ea-0x0;var _0x4e825a=_0xfb8c[_0x71c0ea];return _0x4e825a;};'use strict';var _=require(_0xcfb8('0x0'));var BPromise=require(_0xcfb8('0x1'));var rp=require(_0xcfb8('0x2'));var util=require(_0xcfb8('0x3'));var intUtil=require(_0xcfb8('0x4'));var md5=require(_0xcfb8('0x5'));var Redis=require('ioredis');var logger=require(_0xcfb8('0x6'))(_0xcfb8('0x7'));var config=require(_0xcfb8('0x8'));config[_0xcfb8('0x9')]=_['defaults'](config[_0xcfb8('0x9')],{'host':'localhost','port':0x18eb});var io=require(_0xcfb8('0xa'))(new Redis(config[_0xcfb8('0x9')]));function getAuthToken(_0x4db632,_0x3262b1,_0x10a406){var _0x39318a={'method':_0xcfb8('0xb'),'uri':_0x3262b1,'form':{'client_id':_0x4db632[_0xcfb8('0xc')],'resource':_0x4db632['remoteUri'],'username':_0x4db632[_0xcfb8('0xd')],'password':_0x4db632[_0xcfb8('0xe')],'grant_type':_0xcfb8('0xe'),'client_secret':_0x4db632[_0xcfb8('0xf')]},'json':!![]};return rp(_0x39318a)[_0xcfb8('0x10')](function(_0x1875a1){return _0x1875a1[_0xcfb8('0x11')];})[_0xcfb8('0x12')](function(_0x1bdf0b){logger[_0xcfb8('0x13')]('['+[_0x10a406[_0xcfb8('0x14')]()]+']\x20Wrong\x20credentials!');return _0x1bdf0b[_0xcfb8('0x15')];});}function getUser(_0x933c48,_0x5cdc30,_0x21d9e6,_0x657134,_0x33b509,_0x4d8d1c){return new BPromise(function(_0x1ed351,_0x17c555){return getAuthToken(_0x5cdc30,_0x657134,_0x4d8d1c)[_0xcfb8('0x10')](function(_0x2e7f8d){var _0x17993a={'method':_0xcfb8('0x16'),'uri':_0x33b509+_0xcfb8('0x17'),'headers':{'Authorization':'Bearer\x20'+_0x2e7f8d,'OData-Version':_0xcfb8('0x18')},'json':!![]};return rp(_0x17993a);})[_0xcfb8('0x10')](function(_0x10745b){var _0x1541d5=_0x10745b['value'];var _0x521cb6=![];var _0x26f0c4=null;if(!_['isNil'](_0x21d9e6)){if(intUtil[_0xcfb8('0x19')](_0x21d9e6[_0xcfb8('0x1a')])){_0x933c48[_0xcfb8('0x1b')]=_0x21d9e6['email'];for(_0x26f0c4=0x0;_0x26f0c4<_0x1541d5[_0xcfb8('0x1c')];_0x26f0c4++){if(_0x1541d5[_0x26f0c4][_0xcfb8('0x1d')]===_0x21d9e6['email']&&!_0x1541d5[_0x26f0c4][_0xcfb8('0x1e')]){_0x521cb6=!![];logger[_0xcfb8('0x1f')]('['+[_0x4d8d1c[_0xcfb8('0x14')]()]+_0xcfb8('0x20')+_0x1541d5[_0x26f0c4][_0xcfb8('0x21')]+'!');_0x933c48[_0xcfb8('0x22')]=_0x1541d5[_0x26f0c4][_0xcfb8('0x21')];}}}}if(!_0x521cb6){logger[_0xcfb8('0x1f')]('['+[_0x4d8d1c['toUpperCase']()]+']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');_0x933c48[_0xcfb8('0x1b')]=_0x5cdc30[_0xcfb8('0xd')];for(_0x26f0c4=0x0;_0x26f0c4<_0x1541d5['length'];_0x26f0c4++){if(_0x1541d5[_0x26f0c4][_0xcfb8('0x1d')]===_0x5cdc30['username']){_0x933c48[_0xcfb8('0x22')]=_0x1541d5[_0x26f0c4][_0xcfb8('0x21')];}}}_0x1ed351(_0x933c48);})[_0xcfb8('0x12')](function(_0x4123be){_0x17c555(_0x4123be[_0xcfb8('0x15')]);});});}function createEndUser(_0x33df8a,_0x2d6ec9,_0x11a687,_0x27ba93,_0x5ae74b,_0x1e867d){return new BPromise(function(_0x1a8332,_0x3b3243){return getAuthToken(_0x2d6ec9,_0x11a687,_0x1e867d)[_0xcfb8('0x10')](function(_0x22ed98){var _0x4991e8=_0x1e867d[_0xcfb8('0x23')]()===_0xcfb8('0x24')?_0x5ae74b['destcalleridnum']:_0x5ae74b['calleridnum'];var _0x3dcd1e={'method':_0xcfb8('0xb'),'uri':_0x27ba93+'contacts','body':{'telephone1':_0x4991e8,'fullname':_0x4991e8,'firstname':_0x4991e8,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0xcfb8('0x25')+_0x33df8a[_0xcfb8('0x22')]+')'},'headers':{'Authorization':_0xcfb8('0x26')+_0x22ed98,'OData-Version':_0xcfb8('0x18')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x3dcd1e);})[_0xcfb8('0x10')](function(_0x441ed9){var _0xca577f=_0x441ed9[_0xcfb8('0x27')][_0xcfb8('0x28')];var _0x1df354=_0xca577f[_0xcfb8('0x29')](_0xca577f[_0xcfb8('0x2a')]('(')+0x1,_0xca577f[_0xcfb8('0x2a')](')'));_0x33df8a[_0xcfb8('0x2b')]=_0x1df354;_0x1a8332(_0x33df8a);})[_0xcfb8('0x12')](function(_0x8ddd97){_0x3b3243(_0x8ddd97[_0xcfb8('0x15')]);});});}function getEndUser(_0x22761e,_0x8d2842,_0x4fce27,_0x2de4de,_0x2ce83b,_0x4246e0){return new BPromise(function(_0x121093,_0x302c35){return getAuthToken(_0x8d2842,_0x4fce27,_0x4246e0)['then'](function(_0x12b20a){var _0x4ff2c2={'method':'GET','uri':_0x2de4de+'contacts?$select=telephone1','headers':{'Authorization':'Bearer\x20'+_0x12b20a,'If-None-Match':null,'OData-Version':_0xcfb8('0x18')},'json':!![]};return rp(_0x4ff2c2);})[_0xcfb8('0x10')](function(_0x861ec9){var _0x5391f3=null;if(_0x861ec9){var _0x423070=_0x861ec9[_0xcfb8('0x2c')];var _0x568577=![];for(_0x5391f3=0x0;_0x5391f3<_0x423070['length'];_0x5391f3++){var _0x467afd=_0x4246e0['toLowerCase']()===_0xcfb8('0x24')?_0x2ce83b[_0xcfb8('0x2d')]:_0x2ce83b[_0xcfb8('0x2e')];if(_0x423070[_0x5391f3][_0xcfb8('0x2f')]===_0x467afd){_0x568577=!![];_0x22761e[_0xcfb8('0x2b')]=_0x423070[_0x5391f3]['contactid'];}}if(_0x568577){_0x121093(_0x22761e);}else{return createEndUser(_0x22761e,_0x8d2842,_0x4fce27,_0x2de4de,_0x2ce83b,_0x4246e0)['then'](function(_0x4419ad){logger[_0xcfb8('0x1f')]('['+[_0x4246e0[_0xcfb8('0x14')]()]+']\x20Enduser\x20created!',_0x4419ad[_0xcfb8('0x2b')]);_0x121093(_0x4419ad);});}}else{return createEndUser(_0x22761e,_0x8d2842,_0x4fce27,_0x2de4de,_0x2ce83b,_0x4246e0)[_0xcfb8('0x10')](function(_0x5b0d3f){logger[_0xcfb8('0x1f')]('['+[_0x4246e0[_0xcfb8('0x14')]()]+_0xcfb8('0x30'),_0x5b0d3f[_0xcfb8('0x2b')]);_0x121093(_0x5b0d3f);});}});});}function getCustomFields(_0x3eba66,_0x2c298c,_0x34fd7a){var _0x4eb2bc={};if(_0x3eba66[_0xcfb8('0x1c')]>0x0){_['forEach'](_0x3eba66,function(_0x547229){if(_0x547229[_0xcfb8('0x31')]===_0xcfb8('0x32')&&_0x547229[_0xcfb8('0x33')]&&!_0x547229[_0xcfb8('0x34')]){var _0x32d56f=_0x547229['idField'][_0xcfb8('0x23')]();var _0x5a9ecb=_0x32d56f[_0xcfb8('0x29')](0x0,_0x32d56f[_0xcfb8('0x35')]('_'));var _0x3adecc=_0x32d56f[_0xcfb8('0x29')](_0x32d56f[_0xcfb8('0x35')]('_')+0x1);if(_0x5a9ecb===_0x34fd7a){_0x4eb2bc[_0x3adecc]=_0x547229[_0xcfb8('0x36')];}}});}return _0x4eb2bc;}function getTicket(_0x76c060,_0x323f06,_0x57661e,_0x56e1dc,_0x2b8798,_0x5894c5,_0x51fd82){return new BPromise(function(_0x53e56b,_0x278d55){var _0x58d3f8;return getAuthToken(_0x323f06,_0x57661e,_0x51fd82)['then'](function(_0x49c5fa){if(_0x5894c5['ticketType']===_0xcfb8('0x37')){_0x58d3f8={'method':_0xcfb8('0xb'),'uri':_0x56e1dc+_0xcfb8('0x38'),'body':Object[_0xcfb8('0x39')]({},{'title':intUtil[_0xcfb8('0x3a')](_0x5894c5[_0xcfb8('0x3b')],_0x2b8798,'\x20'),'description':intUtil[_0xcfb8('0x3a')](_0x5894c5[_0xcfb8('0x3c')],_0x2b8798,'\x0a'),'customerid_contact@odata.bind':'/contacts('+_0x76c060[_0xcfb8('0x2b')]+')','ownerid@odata.bind':_0xcfb8('0x25')+_0x76c060[_0xcfb8('0x22')]+')','caseorigincode':'1'},getCustomFields(_0x5894c5[_0xcfb8('0x3d')],_0x2b8798,_0x5894c5['ticketType'])),'headers':{'Authorization':_0xcfb8('0x26')+_0x49c5fa,'OData-Version':_0xcfb8('0x18')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x5894c5[_0xcfb8('0x3e')]===_0xcfb8('0x3f')){_0x58d3f8={'method':_0xcfb8('0xb'),'uri':_0x56e1dc+_0xcfb8('0x40'),'body':Object[_0xcfb8('0x39')]({},{'subject':intUtil[_0xcfb8('0x3a')](_0x5894c5[_0xcfb8('0x3b')],_0x2b8798,'\x20'),'phonenumber':String(_0x2b8798[_0xcfb8('0x2e')]),'description':intUtil[_0xcfb8('0x3a')](_0x5894c5[_0xcfb8('0x3c')],_0x2b8798,'\x0a'),'regardingobjectid_contact@odata.bind':_0xcfb8('0x41')+_0x76c060[_0xcfb8('0x2b')]+')','ownerid@odata.bind':_0xcfb8('0x25')+_0x76c060[_0xcfb8('0x22')]+')','directioncode':_0x76c060[_0xcfb8('0x42')]==='queue'?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0xcfb8('0x25')+_0x76c060[_0xcfb8('0x22')]+')','participationtypemask':_0x76c060['callDirection']===_0xcfb8('0x43')?0x2:0x1},{'partyid_contact@odata.bind':_0xcfb8('0x41')+_0x76c060['enduserId']+')','participationtypemask':_0x76c060[_0xcfb8('0x42')]==='queue'?0x1:0x2}]},getCustomFields(_0x5894c5['Fields'],_0x2b8798,_0x5894c5[_0xcfb8('0x3e')])),'headers':{'Authorization':'Bearer\x20'+_0x49c5fa,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x58d3f8);})[_0xcfb8('0x10')](function(_0x43228b){var _0x130c79=_0x43228b['headers'][_0xcfb8('0x28')];var _0x35560d=_0x130c79[_0xcfb8('0x29')](_0x130c79[_0xcfb8('0x2a')]('(')+0x1,_0x130c79['lastIndexOf'](')'));_0x76c060[_0xcfb8('0x44')]=_0x35560d;_0x53e56b(_0x76c060);})['catch'](function(_0xbf8bb0){_0x278d55(_0xbf8bb0[_0xcfb8('0x15')]);});});}function emit(_0x58ec9a,_0x27625c,_0x2b8fce,_0x28048e){var _0x5e5f0b={'uri':util['format'](_0xcfb8('0x45'),_0x58ec9a,_0x2b8fce,_0x28048e)};io['to'](util[_0xcfb8('0x46')](_0xcfb8('0x47'),_0x27625c))[_0xcfb8('0x48')](_0xcfb8('0x49'),_0x5e5f0b);}exports['cs']=function(_0x2a2d4e,_0x17f1d1,_0x105341,_0x4e9a17,_0x2371a4,_0x2f1811,_0x562677,_0x481fc2){var _0x47fd01={};_0x2f1811[_0xcfb8('0x4a')]=intUtil[_0xcfb8('0x4b')](_0x2f1811[_0xcfb8('0x4a')]);_0x2f1811[_0xcfb8('0x4c')]=intUtil[_0xcfb8('0x4b')](_0x2f1811[_0xcfb8('0x4c')]);_0x47fd01[_0xcfb8('0x42')]=_0x481fc2==='queue'||_0x481fc2===_0xcfb8('0x4d')?'queue':_0xcfb8('0x24');var _0x314873=util['format'](_0xcfb8('0x4e'),_0x2f1811[_0xcfb8('0x4a')]);var _0x1a9294=util[_0xcfb8('0x46')](_0xcfb8('0x4f'),_0x2f1811[_0xcfb8('0x50')]);var _0x170c6e=util['format'](_0xcfb8('0x51'),_0x2f1811[_0xcfb8('0x4c')],_0x17f1d1[_0xcfb8('0x52')],md5(_0x17f1d1['uniqueid']));if(_0x2371a4&&_0x2371a4[_0xcfb8('0x53')]){logger['info'](_0xcfb8('0x54'),'Recording\x20is\x20enabled!');_0x17f1d1['recordingURL']=_0x170c6e;}else if(_0x562677&&_0x562677[_0xcfb8('0x55')]&&_0x562677[_0xcfb8('0x55')]!==_0xcfb8('0x56')){logger[_0xcfb8('0x1f')](_0xcfb8('0x57'),'Recording\x20is\x20enabled!');_0x17f1d1[_0xcfb8('0x58')]=_0x170c6e;}else{_0x17f1d1[_0xcfb8('0x58')]='';}return getUser(_0x47fd01,_0x2f1811,_0x4e9a17,_0x1a9294,_0x314873,_0x481fc2)[_0xcfb8('0x10')](function(_0x3328f4){logger[_0xcfb8('0x1f')]('['+_0x481fc2[_0xcfb8('0x14')]()+_0xcfb8('0x59'),_0x3328f4['userId']);logger[_0xcfb8('0x1f')]('['+_0x481fc2['toUpperCase']()+_0xcfb8('0x5a'),_0x3328f4['userEmail']);return getEndUser(_0x3328f4,_0x2f1811,_0x1a9294,_0x314873,_0x17f1d1,_0x481fc2);})['then'](function(_0x2bc8b3){logger['info']('['+_0x481fc2[_0xcfb8('0x14')]()+_0xcfb8('0x5b'),_0x2bc8b3[_0xcfb8('0x2b')]);logger[_0xcfb8('0x1f')]('['+_0x481fc2[_0xcfb8('0x14')]()+_0xcfb8('0x5c'),_0x17f1d1[_0xcfb8('0x2e')]);return getTicket(_0x2bc8b3,_0x2f1811,_0x1a9294,_0x314873,_0x17f1d1,_0x105341,_0x481fc2);})[_0xcfb8('0x10')](function(_0x26b1d8){logger[_0xcfb8('0x1f')](util[_0xcfb8('0x46')]('['+_0x481fc2[_0xcfb8('0x14')]()+_0xcfb8('0x5d'),_0x105341[_0xcfb8('0x3e')],_0x26b1d8[_0xcfb8('0x44')]));logger[_0xcfb8('0x1f')](util[_0xcfb8('0x46')]('['+_0x481fc2['toUpperCase']()+_0xcfb8('0x5e'),_0x481fc2));if(_0x481fc2!==_0xcfb8('0x4d')){logger[_0xcfb8('0x1f')]('['+_0x481fc2['toUpperCase']()+']',_0xcfb8('0x5f'));emit(_0x2f1811[_0xcfb8('0x4a')],_0x4e9a17[_0xcfb8('0x60')],_0x105341[_0xcfb8('0x3e')],_0x26b1d8[_0xcfb8('0x44')]);}})[_0xcfb8('0x12')](function(_0x4c33a1){logger['error']('['+_0x481fc2[_0xcfb8('0x14')]()+_0xcfb8('0x61'),util[_0xcfb8('0x62')](_0x4c33a1,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x9956=['error',']\x20Wrong\x20credentials!','message','GET','Bearer\x20','4.0','then','value','isNil','validateEmail','email','userEmail','length','internalemailaddress','isdisabled','info','toUpperCase','userId','systemuserid',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','outbound','destcalleridnum','/systemusers(','headers','odata-entityid','substring','lastIndexOf','enduserId','toLowerCase','telephone1','contactid',']\x20Enduser\x20created!',']\x20Enduser\x20Created!','type','customField','indexOf','content','ticketType','assign','getString','Subjects','phonecall','phonecalls','calleridnum','Descriptions','/contacts(','callDirection','queue','Fields','ticketId','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','trigger:browser:url','stripTrailingSlash','serverUrl','abandoned','format','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s',']\x20Error\x20running\x20Dynamics365\x20integration','inspect','lodash','request-promise','util','./util','ioredis','../../../../config/logger','../../../../config/environment','defaults','socket.io-emitter','POST','clientId','remoteUri','username','password','clientSecret','access_token','catch'];(function(_0x5b285c,_0x9e144a){var _0x1cd193=function(_0x65042e){while(--_0x65042e){_0x5b285c['push'](_0x5b285c['shift']());}};_0x1cd193(++_0x9e144a);}(_0x9956,0x1b6));var _0x6995=function(_0x926fc6,_0x5f3673){_0x926fc6=_0x926fc6-0x0;var _0x23bc9a=_0x9956[_0x926fc6];return _0x23bc9a;};'use strict';var _=require(_0x6995('0x0'));var BPromise=require('bluebird');var rp=require(_0x6995('0x1'));var util=require(_0x6995('0x2'));var intUtil=require(_0x6995('0x3'));var md5=require('md5');var Redis=require(_0x6995('0x4'));var logger=require(_0x6995('0x5'))('dynamics365');var config=require(_0x6995('0x6'));config['redis']=_[_0x6995('0x7')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x6995('0x8'))(new Redis(config['redis']));function getAuthToken(_0x488f9e,_0x41824d,_0x55b225){var _0x482ba6={'method':_0x6995('0x9'),'uri':_0x41824d,'form':{'client_id':_0x488f9e[_0x6995('0xa')],'resource':_0x488f9e[_0x6995('0xb')],'username':_0x488f9e[_0x6995('0xc')],'password':_0x488f9e['password'],'grant_type':_0x6995('0xd'),'client_secret':_0x488f9e[_0x6995('0xe')]},'json':!![]};return rp(_0x482ba6)['then'](function(_0x5d247a){return _0x5d247a[_0x6995('0xf')];})[_0x6995('0x10')](function(_0x4fa77d){logger[_0x6995('0x11')]('['+[_0x55b225['toUpperCase']()]+_0x6995('0x12'));return _0x4fa77d[_0x6995('0x13')];});}function getUser(_0x910354,_0x536806,_0x8797b0,_0x595d0d,_0x2ad985,_0x56ddc3){return new BPromise(function(_0x47b240,_0x4e10e8){return getAuthToken(_0x536806,_0x595d0d,_0x56ddc3)['then'](function(_0x235584){var _0x31059e={'method':_0x6995('0x14'),'uri':_0x2ad985+'systemusers?$select=internalemailaddress,isdisabled,systemuserid','headers':{'Authorization':_0x6995('0x15')+_0x235584,'OData-Version':_0x6995('0x16')},'json':!![]};return rp(_0x31059e);})[_0x6995('0x17')](function(_0x446d98){var _0x154a41=_0x446d98[_0x6995('0x18')];var _0x42e28b=![];var _0x4d57aa=null;if(!_[_0x6995('0x19')](_0x8797b0)){if(intUtil[_0x6995('0x1a')](_0x8797b0[_0x6995('0x1b')])){_0x910354[_0x6995('0x1c')]=_0x8797b0['email'];for(_0x4d57aa=0x0;_0x4d57aa<_0x154a41[_0x6995('0x1d')];_0x4d57aa++){if(_0x154a41[_0x4d57aa][_0x6995('0x1e')]===_0x8797b0[_0x6995('0x1b')]&&!_0x154a41[_0x4d57aa][_0x6995('0x1f')]){_0x42e28b=!![];logger[_0x6995('0x20')]('['+[_0x56ddc3[_0x6995('0x21')]()]+']\x20Agent\x20found\x20'+_0x154a41[_0x4d57aa]['systemuserid']+'!');_0x910354[_0x6995('0x22')]=_0x154a41[_0x4d57aa][_0x6995('0x23')];}}}}if(!_0x42e28b){logger[_0x6995('0x20')]('['+[_0x56ddc3[_0x6995('0x21')]()]+_0x6995('0x24'));_0x910354[_0x6995('0x1c')]=_0x536806[_0x6995('0xc')];for(_0x4d57aa=0x0;_0x4d57aa<_0x154a41[_0x6995('0x1d')];_0x4d57aa++){if(_0x154a41[_0x4d57aa][_0x6995('0x1e')]===_0x536806[_0x6995('0xc')]){_0x910354[_0x6995('0x22')]=_0x154a41[_0x4d57aa][_0x6995('0x23')];}}}_0x47b240(_0x910354);})[_0x6995('0x10')](function(_0x55c484){_0x4e10e8(_0x55c484[_0x6995('0x13')]);});});}function createEndUser(_0x1967aa,_0x41b29f,_0x35050d,_0x5b567c,_0x2e4b33,_0x5e9f90){return new BPromise(function(_0x240604,_0x1a1095){return getAuthToken(_0x41b29f,_0x35050d,_0x5e9f90)[_0x6995('0x17')](function(_0x2226bc){var _0x464943=_0x5e9f90['toLowerCase']()===_0x6995('0x25')?_0x2e4b33[_0x6995('0x26')]:_0x2e4b33['calleridnum'];var _0x539ad5={'method':_0x6995('0x9'),'uri':_0x5b567c+'contacts','body':{'telephone1':_0x464943,'fullname':_0x464943,'firstname':_0x464943,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x6995('0x27')+_0x1967aa[_0x6995('0x22')]+')'},'headers':{'Authorization':_0x6995('0x15')+_0x2226bc,'OData-Version':_0x6995('0x16')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x539ad5);})[_0x6995('0x17')](function(_0x2b37eb){var _0x85aee8=_0x2b37eb[_0x6995('0x28')][_0x6995('0x29')];var _0x25cf5a=_0x85aee8[_0x6995('0x2a')](_0x85aee8[_0x6995('0x2b')]('(')+0x1,_0x85aee8[_0x6995('0x2b')](')'));_0x1967aa[_0x6995('0x2c')]=_0x25cf5a;_0x240604(_0x1967aa);})['catch'](function(_0x307580){_0x1a1095(_0x307580['message']);});});}function getEndUser(_0x159fd9,_0x27e82a,_0x5d62f6,_0x33a8f5,_0x39968f,_0x526101){return new BPromise(function(_0x4997c8,_0x331375){return getAuthToken(_0x27e82a,_0x5d62f6,_0x526101)[_0x6995('0x17')](function(_0x17c851){var _0x5e87b1={'method':_0x6995('0x14'),'uri':_0x33a8f5+'contacts?$select=telephone1','headers':{'Authorization':'Bearer\x20'+_0x17c851,'If-None-Match':null,'OData-Version':_0x6995('0x16')},'json':!![]};return rp(_0x5e87b1);})[_0x6995('0x17')](function(_0x37e159){var _0x5d7d86=null;if(_0x37e159){var _0x5125c4=_0x37e159['value'];var _0x54dc48=![];for(_0x5d7d86=0x0;_0x5d7d86<_0x5125c4[_0x6995('0x1d')];_0x5d7d86++){var _0x249028=_0x526101[_0x6995('0x2d')]()===_0x6995('0x25')?_0x39968f[_0x6995('0x26')]:_0x39968f['calleridnum'];if(_0x5125c4[_0x5d7d86][_0x6995('0x2e')]===_0x249028){_0x54dc48=!![];_0x159fd9[_0x6995('0x2c')]=_0x5125c4[_0x5d7d86][_0x6995('0x2f')];}}if(_0x54dc48){_0x4997c8(_0x159fd9);}else{return createEndUser(_0x159fd9,_0x27e82a,_0x5d62f6,_0x33a8f5,_0x39968f,_0x526101)[_0x6995('0x17')](function(_0x49d67a){logger['info']('['+[_0x526101[_0x6995('0x21')]()]+_0x6995('0x30'),_0x49d67a[_0x6995('0x2c')]);_0x4997c8(_0x49d67a);});}}else{return createEndUser(_0x159fd9,_0x27e82a,_0x5d62f6,_0x33a8f5,_0x39968f,_0x526101)['then'](function(_0x44ac56){logger[_0x6995('0x20')]('['+[_0x526101[_0x6995('0x21')]()]+_0x6995('0x31'),_0x44ac56[_0x6995('0x2c')]);_0x4997c8(_0x44ac56);});}});});}function getCustomFields(_0xf2a8ae,_0x22629d,_0x19374e){var _0xb0ed9f={};if(_0xf2a8ae[_0x6995('0x1d')]>0x0){_['forEach'](_0xf2a8ae,function(_0x3e4837){if(_0x3e4837[_0x6995('0x32')]==='string'&&_0x3e4837['nameField']&&!_0x3e4837[_0x6995('0x33')]){var _0xa14835=_0x3e4837['idField']['toLowerCase']();var _0x1f5225=_0xa14835[_0x6995('0x2a')](0x0,_0xa14835[_0x6995('0x34')]('_'));var _0x405eed=_0xa14835[_0x6995('0x2a')](_0xa14835[_0x6995('0x34')]('_')+0x1);if(_0x1f5225===_0x19374e){_0xb0ed9f[_0x405eed]=_0x3e4837[_0x6995('0x35')];}}});}return _0xb0ed9f;}function getTicket(_0x903fb8,_0x4cf7b9,_0x28776c,_0x1b5532,_0x479899,_0x5203d2,_0x1a40aa){return new BPromise(function(_0x1700b1,_0x4e3989){var _0x3992a5;return getAuthToken(_0x4cf7b9,_0x28776c,_0x1a40aa)[_0x6995('0x17')](function(_0x242a26){if(_0x5203d2[_0x6995('0x36')]==='incident'){_0x3992a5={'method':'POST','uri':_0x1b5532+'incidents','body':Object[_0x6995('0x37')]({},{'title':intUtil[_0x6995('0x38')](_0x5203d2[_0x6995('0x39')],_0x479899,'\x20'),'description':intUtil[_0x6995('0x38')](_0x5203d2['Descriptions'],_0x479899,'\x0a'),'customerid_contact@odata.bind':'/contacts('+_0x903fb8[_0x6995('0x2c')]+')','ownerid@odata.bind':_0x6995('0x27')+_0x903fb8[_0x6995('0x22')]+')','caseorigincode':'1'},getCustomFields(_0x5203d2['Fields'],_0x479899,_0x5203d2[_0x6995('0x36')])),'headers':{'Authorization':_0x6995('0x15')+_0x242a26,'OData-Version':_0x6995('0x16')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x5203d2['ticketType']===_0x6995('0x3a')){_0x3992a5={'method':_0x6995('0x9'),'uri':_0x1b5532+_0x6995('0x3b'),'body':Object[_0x6995('0x37')]({},{'subject':intUtil[_0x6995('0x38')](_0x5203d2[_0x6995('0x39')],_0x479899,'\x20'),'phonenumber':String(_0x479899[_0x6995('0x3c')]),'description':intUtil[_0x6995('0x38')](_0x5203d2[_0x6995('0x3d')],_0x479899,'\x0a'),'regardingobjectid_contact@odata.bind':_0x6995('0x3e')+_0x903fb8[_0x6995('0x2c')]+')','ownerid@odata.bind':_0x6995('0x27')+_0x903fb8[_0x6995('0x22')]+')','directioncode':_0x903fb8[_0x6995('0x3f')]===_0x6995('0x40')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0x6995('0x27')+_0x903fb8['userId']+')','participationtypemask':_0x903fb8['callDirection']===_0x6995('0x40')?0x2:0x1},{'partyid_contact@odata.bind':_0x6995('0x3e')+_0x903fb8[_0x6995('0x2c')]+')','participationtypemask':_0x903fb8['callDirection']===_0x6995('0x40')?0x1:0x2}]},getCustomFields(_0x5203d2[_0x6995('0x41')],_0x479899,_0x5203d2['ticketType'])),'headers':{'Authorization':_0x6995('0x15')+_0x242a26,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x3992a5);})[_0x6995('0x17')](function(_0x7ec553){var _0x37c4af=_0x7ec553[_0x6995('0x28')][_0x6995('0x29')];var _0x1866a8=_0x37c4af['substring'](_0x37c4af[_0x6995('0x2b')]('(')+0x1,_0x37c4af[_0x6995('0x2b')](')'));_0x903fb8[_0x6995('0x42')]=_0x1866a8;_0x1700b1(_0x903fb8);})[_0x6995('0x10')](function(_0x2ba57b){_0x4e3989(_0x2ba57b[_0x6995('0x13')]);});});}function emit(_0xe23d59,_0x67718e,_0x3c2239,_0x64d4d5){var _0x4180c7={'uri':util['format'](_0x6995('0x43'),_0xe23d59,_0x3c2239,_0x64d4d5)};io['to'](util['format'](_0x6995('0x44'),_0x67718e))['emit'](_0x6995('0x45'),_0x4180c7);}exports['cs']=function(_0x494b85,_0x11ffa1,_0x39812b,_0x5c62a6,_0x4dfc0d,_0x5d1ee6,_0x5a4949,_0x50d791){var _0x551f3b={};_0x5d1ee6[_0x6995('0xb')]=intUtil[_0x6995('0x46')](_0x5d1ee6['remoteUri']);_0x5d1ee6[_0x6995('0x47')]=intUtil['stripTrailingSlash'](_0x5d1ee6['serverUrl']);_0x551f3b['callDirection']=_0x50d791===_0x6995('0x40')||_0x50d791===_0x6995('0x48')?_0x6995('0x40'):_0x6995('0x25');var _0x59a1b8=util[_0x6995('0x49')](_0x6995('0x4a'),_0x5d1ee6['remoteUri']);var _0x596253=util[_0x6995('0x49')](_0x6995('0x4b'),_0x5d1ee6[_0x6995('0x4c')]);var _0xd2662c=util[_0x6995('0x49')](_0x6995('0x4d'),_0x5d1ee6['serverUrl'],_0x11ffa1[_0x6995('0x4e')],md5(_0x11ffa1['uniqueid']));if(_0x4dfc0d&&_0x4dfc0d[_0x6995('0x4f')]){logger[_0x6995('0x20')](_0x6995('0x50'),_0x6995('0x51'));_0x11ffa1[_0x6995('0x52')]=_0xd2662c;}else if(_0x5a4949&&_0x5a4949['recordingFormat']&&_0x5a4949[_0x6995('0x53')]!==_0x6995('0x54')){logger[_0x6995('0x20')](_0x6995('0x55'),_0x6995('0x51'));_0x11ffa1[_0x6995('0x52')]=_0xd2662c;}else{_0x11ffa1[_0x6995('0x52')]='';}return getUser(_0x551f3b,_0x5d1ee6,_0x5c62a6,_0x596253,_0x59a1b8,_0x50d791)[_0x6995('0x17')](function(_0x5b5073){logger[_0x6995('0x20')]('['+_0x50d791['toUpperCase']()+_0x6995('0x56'),_0x5b5073[_0x6995('0x22')]);logger[_0x6995('0x20')]('['+_0x50d791['toUpperCase']()+']\x20The\x20User\x20email\x20is:',_0x5b5073[_0x6995('0x1c')]);return getEndUser(_0x5b5073,_0x5d1ee6,_0x596253,_0x59a1b8,_0x11ffa1,_0x50d791);})[_0x6995('0x17')](function(_0x5d7c33){logger[_0x6995('0x20')]('['+_0x50d791[_0x6995('0x21')]()+']\x20The\x20Enduser\x20ID\x20is:',_0x5d7c33[_0x6995('0x2c')]);logger[_0x6995('0x20')]('['+_0x50d791['toUpperCase']()+']\x20The\x20Enduser\x20phone\x20is:',_0x11ffa1[_0x6995('0x3c')]);return getTicket(_0x5d7c33,_0x5d1ee6,_0x596253,_0x59a1b8,_0x11ffa1,_0x39812b,_0x50d791);})[_0x6995('0x17')](function(_0x260664){logger['info'](util[_0x6995('0x49')]('['+_0x50d791['toUpperCase']()+_0x6995('0x57'),_0x39812b['ticketType'],_0x260664[_0x6995('0x42')]));logger[_0x6995('0x20')](util[_0x6995('0x49')]('['+_0x50d791['toUpperCase']()+_0x6995('0x58'),_0x50d791));if(_0x50d791!==_0x6995('0x48')){logger['info']('['+_0x50d791['toUpperCase']()+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x5d1ee6[_0x6995('0xb')],_0x5c62a6['name'],_0x39812b[_0x6995('0x36')],_0x260664['ticketId']);}})[_0x6995('0x10')](function(_0x5b6394){logger[_0x6995('0x11')]('['+_0x50d791[_0x6995('0x21')]()+_0x6995('0x59'),util[_0x6995('0x5a')](_0x5b6394,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/freshdesk.js b/server/services/ami/trigger/integration/freshdesk.js
index 1581c1a..5c2e9fb 100644
--- a/server/services/ami/trigger/integration/freshdesk.js
+++ b/server/services/ami/trigger/integration/freshdesk.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbaa0=['email','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','catch','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','abandoned','[ABANDONED]','error','lodash','md5','ioredis','./util','../../../../config/environment','../../../../config/logger','freshdesk','defaults','redis','localhost','socket.io-emitter','emit','Creating\x20new\x20ticket...','merge','format','Caller\x20-\x20%s','calleridname','calleridnum','getString','Descriptions',' ','Tags','name','Fields','custom_fields','mapValues','keyBy','value','%s/api/v2/tickets','remoteUri','then','info','Ticket\x20created!','length','Agent\x20found!','find','contact','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20found!','POST','Enduser\x20created.','apiKey','toString','base64','[HTTP]','stringify','GET','forEach','nameField','toLowerCase','content','type','idField','push','variableName','customField','Variable','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization'];(function(_0x234dba,_0x90cebf){var _0x151855=function(_0x47a66d){while(--_0x47a66d){_0x234dba['push'](_0x234dba['shift']());}};_0x151855(++_0x90cebf);}(_0xbaa0,0x1c5));var _0x0baa=function(_0x24d276,_0x285728){_0x24d276=_0x24d276-0x0;var _0x1fb8df=_0xbaa0[_0x24d276];return _0x1fb8df;};'use strict';var _=require(_0x0baa('0x0'));var rp=require('request-promise');var md5=require(_0x0baa('0x1'));var util=require('util');var Redis=require(_0x0baa('0x2'));var intUtil=require(_0x0baa('0x3'));var config=require(_0x0baa('0x4'));var logger=require(_0x0baa('0x5'))(_0x0baa('0x6'));config['redis']=_[_0x0baa('0x7')](config[_0x0baa('0x8')],{'host':_0x0baa('0x9'),'port':0x18eb});var io=require(_0x0baa('0xa'))(new Redis(config['redis']));var headers={'Content-Type':'application/json','Accept':'application/json'};function emit(_0x4938ee,_0x7dd3,_0x5ed5e1){io['to'](_0x4938ee)[_0x0baa('0xb')](_0x7dd3,_0x5ed5e1);}function getTicket(_0x5ccc7b,_0x1a4c07,_0x1026eb,_0x35c3ba,_0x8a3e50){logger['info'](_0x0baa('0xc'));var _0x29db5d=_[_0x0baa('0xd')]({'responder_id':_0x1a4c07['id'],'requester_id':_0x1026eb['id'],'name':util[_0x0baa('0xe')](_0x0baa('0xf'),_0x8a3e50[_0x0baa('0x10')]),'phone':_0x8a3e50[_0x0baa('0x11')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0x0baa('0x12')](_0x35c3ba['Subjects'],_0x8a3e50,'\x20'),'description':intUtil[_0x0baa('0x12')](_0x35c3ba[_0x0baa('0x13')],_0x8a3e50,_0x0baa('0x14')),'tags':getTags(_0x35c3ba[_0x0baa('0x15')],_0x0baa('0x16'))},getCustomFields(_0x35c3ba[_0x0baa('0x17')],_0x8a3e50));_0x29db5d[_0x0baa('0x18')]=_[_0x0baa('0x19')](_[_0x0baa('0x1a')](_0x29db5d['custom_fields'],'id'),_0x0baa('0x1b'));return request({'uri':util['format'](_0x0baa('0x1c'),_0x5ccc7b[_0x0baa('0x1d')]),'method':'POST','body':_0x29db5d})[_0x0baa('0x1e')](function(_0x212a03){logger[_0x0baa('0x1f')](_0x0baa('0x20'));return _0x212a03;});}function getUser(_0x3efc41,_0x17262a){if(intUtil['validateEmail'](_0x17262a)){return request({'uri':util[_0x0baa('0xe')]('%s/api/v2/agents',_0x3efc41[_0x0baa('0x1d')]),'qs':{'email':_0x17262a}})[_0x0baa('0x1e')](function(_0x4ce79e){if(_0x4ce79e[_0x0baa('0x21')]){logger['info'](_0x0baa('0x22'));return _[_0x0baa('0x23')](_0x4ce79e,function(_0x3aa4ff){return _0x3aa4ff[_0x0baa('0x24')]['email']===_0x17262a;});}else{logger[_0x0baa('0x1f')](_0x0baa('0x25'));return request({'uri':util[_0x0baa('0xe')](_0x0baa('0x26'),_0x3efc41[_0x0baa('0x1d')])})[_0x0baa('0x1e')](function(_0x3d7a22){logger[_0x0baa('0x1f')](_0x0baa('0x27'));return _0x3d7a22;});}});}else{logger[_0x0baa('0x1f')]('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util['format'](_0x0baa('0x26'),_0x3efc41[_0x0baa('0x1d')])})[_0x0baa('0x1e')](function(_0x9dc941){logger[_0x0baa('0x1f')](_0x0baa('0x27'));return _0x9dc941;});}}function getEndUser(_0x313129,_0x52e601,_0x543b1f){logger[_0x0baa('0x1f')](_0x0baa('0x28'),_0x543b1f);return request({'uri':util[_0x0baa('0xe')](_0x0baa('0x29'),_0x313129[_0x0baa('0x1d')]),'qs':{'phone':_0x543b1f}})[_0x0baa('0x1e')](function(_0x139be9){if(_0x139be9['length']){logger['info'](_0x0baa('0x2a'));return _[_0x0baa('0x23')](_0x139be9,{'phone':_0x543b1f});}else{logger[_0x0baa('0x1f')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util['format'](_0x0baa('0x29'),_0x313129[_0x0baa('0x1d')]),'method':_0x0baa('0x2b'),'body':{'name':_0x52e601,'phone':_0x543b1f}})[_0x0baa('0x1e')](function(_0x13f5e6){logger[_0x0baa('0x1f')](_0x0baa('0x2c'));return _0x13f5e6;});}});}function getAuth(_0x553c0c){return util['format']('Basic\x20%s',new Buffer(_0x553c0c[_0x0baa('0x2d')]+':X')[_0x0baa('0x2e')](_0x0baa('0x2f')));}function request(_0xd2d2bd){logger['debug'](_0x0baa('0x30'),JSON[_0x0baa('0x31')](_0xd2d2bd));return rp(_['defaults'](_0xd2d2bd,{'method':_0x0baa('0x32'),'headers':headers,'json':!![]}));}function getTags(_0x16066f,_0x699824){var _0x950fcf=[];if(_0x16066f&&_0x16066f[_0x0baa('0x21')]>0x0){_0x950fcf=_['map'](_0x16066f,_0x699824);}return _0x950fcf;}function getCustomFields(_0x46dea1,_0x46422b){var _0x544b00=[];var _0x42801a={'custom_fields':[]};if(_0x46dea1['length']>0x0){_[_0x0baa('0x33')](_0x46dea1,function(_0x3030eb){if(_0x3030eb['type']==='string'&&_0x3030eb['nameField']&&!_0x3030eb['customField']){_0x42801a[_0x3030eb[_0x0baa('0x34')][_0x0baa('0x35')]()]=_0x3030eb[_0x0baa('0x36')][_0x0baa('0x2e')]();}else if(_0x3030eb[_0x0baa('0x37')]==='string'&&_0x3030eb[_0x0baa('0x38')]&&_0x3030eb['customField']){_0x42801a[_0x0baa('0x18')][_0x0baa('0x39')]({'id':_0x3030eb[_0x0baa('0x38')],'value':_0x3030eb[_0x0baa('0x36')]['toString']()});}else if(_0x3030eb[_0x0baa('0x37')]==='variable'&&_0x3030eb[_0x0baa('0x3a')]&&_0x3030eb['idField']&&_0x3030eb[_0x0baa('0x3b')]){_0x46422b[_0x3030eb[_0x0baa('0x3a')]]&&_0x42801a[_0x0baa('0x18')][_0x0baa('0x39')]({'id':_0x3030eb[_0x0baa('0x38')],'value':_0x46422b[_0x3030eb[_0x0baa('0x3a')]][_0x0baa('0x2e')]()});}else if(_0x3030eb[_0x0baa('0x37')]==='customVariable'&&_0x3030eb[_0x0baa('0x3c')]&&_0x3030eb[_0x0baa('0x3c')][_0x0baa('0x16')]&&_0x3030eb[_0x0baa('0x38')]&&_0x3030eb[_0x0baa('0x3b')]){_0x46422b[_0x3030eb[_0x0baa('0x3c')][_0x0baa('0x16')]['toLowerCase']()]&&_0x42801a[_0x0baa('0x18')]['push']({'id':_0x3030eb[_0x0baa('0x38')],'value':_0x46422b[_0x3030eb[_0x0baa('0x3c')][_0x0baa('0x16')][_0x0baa('0x35')]()][_0x0baa('0x2e')]()});}});}return _0x42801a;}exports['queue']=function(_0x342c0d,_0x3a6b88,_0x43365b,_0x2492eb,_0x41d2a3,_0xc6f0a5){var _0x4d3f78,_0x1a260f;_0xc6f0a5[_0x0baa('0x1d')]=intUtil[_0x0baa('0x3d')](_0xc6f0a5[_0x0baa('0x1d')]);_0xc6f0a5[_0x0baa('0x3e')]=intUtil[_0x0baa('0x3d')](_0xc6f0a5[_0x0baa('0x3e')]);if(_0x41d2a3&&_0x41d2a3[_0x0baa('0x3f')]){logger[_0x0baa('0x1f')](_0x0baa('0x40'),'Recording\x20is\x20enabled!');_0x3a6b88[_0x0baa('0x41')]=util[_0x0baa('0xe')](_0x0baa('0x42'),_0xc6f0a5[_0x0baa('0x3e')],_0x3a6b88[_0x0baa('0x43')],md5(_0x3a6b88[_0x0baa('0x43')]));}else{_0x3a6b88[_0x0baa('0x41')]='';}headers[_0x0baa('0x44')]=getAuth(_0xc6f0a5);return getUser(_0xc6f0a5,_0x2492eb[_0x0baa('0x45')])[_0x0baa('0x1e')](function(_0x41b56e){_0x4d3f78=_0x41b56e;logger[_0x0baa('0x1f')](_0x0baa('0x46'),_0x4d3f78['id']);return getEndUser(_0xc6f0a5,_0x3a6b88[_0x0baa('0x10')],_0x3a6b88[_0x0baa('0x11')]);})['then'](function(_0x220803){_0x1a260f=_0x220803;logger[_0x0baa('0x1f')](_0x0baa('0x47'),_0x1a260f['id']);return getTicket(_0xc6f0a5,_0x4d3f78,_0x1a260f,_0x43365b,_0x3a6b88);})[_0x0baa('0x1e')](function(_0x511c66){if(_0x511c66&&_0x511c66['id']){logger[_0x0baa('0x1f')]('Ticket\x20created!');logger[_0x0baa('0x1f')]('The\x20Ticket\x20ID\x20is:',_0x511c66['id']);logger[_0x0baa('0x1f')](_0x0baa('0x40'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x0baa('0xe')](_0x0baa('0x48'),_0x2492eb[_0x0baa('0x16')]),_0x0baa('0x49'),{'uri':util[_0x0baa('0xe')](_0x0baa('0x4a'),_0xc6f0a5[_0x0baa('0x1d')],_0x511c66['id'])});}})[_0x0baa('0x4b')](function(_0x1d83a3){logger['error'](_0x0baa('0x40'),JSON[_0x0baa('0x31')](_0x1d83a3));});};exports['outbound']=function(_0xa4b751,_0x223ad4,_0x47a8ef,_0x41ad2f,_0x28fa3c,_0x965c48,_0x1d62bc){var _0x59a2e7,_0x8a9c5;_0x965c48[_0x0baa('0x1d')]=intUtil['stripTrailingSlash'](_0x965c48[_0x0baa('0x1d')]);_0x965c48[_0x0baa('0x3e')]=intUtil['stripTrailingSlash'](_0x965c48[_0x0baa('0x3e')]);if(_0x1d62bc&&_0x1d62bc[_0x0baa('0x4c')]&&_0x1d62bc[_0x0baa('0x4c')]!==_0x0baa('0x4d')){logger[_0x0baa('0x1f')](_0x0baa('0x4e'),_0x0baa('0x4f'));_0x223ad4[_0x0baa('0x41')]=util[_0x0baa('0xe')](_0x0baa('0x42'),_0x965c48[_0x0baa('0x3e')],_0x223ad4[_0x0baa('0x43')],md5(_0x223ad4[_0x0baa('0x43')]));}headers['Authorization']=getAuth(_0x965c48);return getUser(_0x965c48,_0x41ad2f[_0x0baa('0x45')])[_0x0baa('0x1e')](function(_0x11876e){_0x59a2e7=_0x11876e;logger[_0x0baa('0x1f')](_0x0baa('0x46'),_0x59a2e7['id']);return getEndUser(_0x965c48,_0x223ad4[_0x0baa('0x50')],_0x223ad4[_0x0baa('0x51')]);})['then'](function(_0x4b8a3f){_0x8a9c5=_0x4b8a3f;logger[_0x0baa('0x1f')]('The\x20Enduser\x20ID\x20is:',_0x8a9c5['id']);return getTicket(_0x965c48,_0x59a2e7,_0x8a9c5,_0x47a8ef,_0x223ad4);})['then'](function(_0x43ff51){if(_0x43ff51&&_0x43ff51['id']){logger[_0x0baa('0x1f')]('Ticket\x20created!');logger[_0x0baa('0x1f')](_0x0baa('0x52'),_0x43ff51['id']);logger['info'](_0x0baa('0x4e'),_0x0baa('0x53'));emit(util[_0x0baa('0xe')](_0x0baa('0x48'),_0x41ad2f['name']),'trigger:browser:url',{'uri':util['format']('%s/helpdesk/tickets/%d',_0x965c48[_0x0baa('0x1d')],_0x43ff51['id'])});}})['catch'](function(_0x4e4d77){logger['error']('[OUTBOUND]',JSON[_0x0baa('0x31')](_0x4e4d77));});};exports[_0x0baa('0x54')]=function(_0x2c9b0e,_0x61d3f2,_0x375b46,_0x44b4d2,_0x43f866,_0x153afa){var _0x4d33ea,_0x10b904;_0x153afa[_0x0baa('0x1d')]=intUtil[_0x0baa('0x3d')](_0x153afa[_0x0baa('0x1d')]);_0x153afa[_0x0baa('0x3e')]=intUtil['stripTrailingSlash'](_0x153afa['serverUrl']);if(_0x43f866&&_0x43f866[_0x0baa('0x3f')]){logger[_0x0baa('0x1f')](_0x0baa('0x55'),_0x0baa('0x4f'));_0x61d3f2[_0x0baa('0x41')]=util['format'](_0x0baa('0x42'),_0x153afa['serverUrl'],_0x61d3f2[_0x0baa('0x43')],md5(_0x61d3f2[_0x0baa('0x43')]));}else{_0x61d3f2[_0x0baa('0x41')]='';}headers['Authorization']=getAuth(_0x153afa);return getUser(_0x153afa,'')['then'](function(_0x20f6c7){_0x4d33ea=_0x20f6c7;logger[_0x0baa('0x1f')]('The\x20User\x20ID\x20is:',_0x4d33ea['id']);return getEndUser(_0x153afa,_0x61d3f2[_0x0baa('0x10')],_0x61d3f2[_0x0baa('0x11')]);})['then'](function(_0x463a51){_0x10b904=_0x463a51;logger[_0x0baa('0x1f')]('The\x20Enduser\x20ID\x20is:',_0x10b904['id']);return getTicket(_0x153afa,_0x4d33ea,_0x10b904,_0x375b46,_0x61d3f2);})['then'](function(_0x563a75){if(_0x563a75){logger['info'](_0x0baa('0x20'));logger[_0x0baa('0x1f')](_0x0baa('0x52'),_0x563a75['id']);}})[_0x0baa('0x4b')](function(_0x189eb6){logger[_0x0baa('0x56')](_0x0baa('0x55'),JSON[_0x0baa('0x31')](_0x189eb6));});};
\ No newline at end of file
+var _0x2115=['recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridnum','error','abandoned','[ABANDONED]','lodash','request-promise','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','freshdesk','redis','defaults','socket.io-emitter','application/json','emit','info','merge','format','Caller\x20-\x20%s','calleridnum','Subjects','getString','Descriptions',' ','Fields','custom_fields','keyBy','value','%s/api/v2/tickets','remoteUri','POST','then','Ticket\x20created!','%s/api/v2/agents','length','Agent\x20found!','find','contact','email','%s/api/v2/agents/me','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20created.','Basic\x20%s','apiKey','toString','base64','[HTTP]','stringify','map','forEach','type','string','nameField','customField','toLowerCase','content','push','idField','variableName','customVariable','Variable','name','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/helpdesk/tickets/%d','catch'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2115,0x16c));var _0x5211=function(_0x4996d5,_0x123daf){_0x4996d5=_0x4996d5-0x0;var _0x4793f9=_0x2115[_0x4996d5];return _0x4793f9;};'use strict';var _=require(_0x5211('0x0'));var rp=require(_0x5211('0x1'));var md5=require(_0x5211('0x2'));var util=require(_0x5211('0x3'));var Redis=require(_0x5211('0x4'));var intUtil=require(_0x5211('0x5'));var config=require(_0x5211('0x6'));var logger=require(_0x5211('0x7'))(_0x5211('0x8'));config[_0x5211('0x9')]=_[_0x5211('0xa')](config[_0x5211('0x9')],{'host':'localhost','port':0x18eb});var io=require(_0x5211('0xb'))(new Redis(config[_0x5211('0x9')]));var headers={'Content-Type':_0x5211('0xc'),'Accept':_0x5211('0xc')};function emit(_0x2d4372,_0x5bbdbf,_0x5b4f0b){io['to'](_0x2d4372)[_0x5211('0xd')](_0x5bbdbf,_0x5b4f0b);}function getTicket(_0x278240,_0x5becbb,_0x316e33,_0xfa7d36,_0x16fed2){logger[_0x5211('0xe')]('Creating\x20new\x20ticket...');var _0x40b862=_[_0x5211('0xf')]({'responder_id':_0x5becbb['id'],'requester_id':_0x316e33['id'],'name':util[_0x5211('0x10')](_0x5211('0x11'),_0x16fed2['calleridname']),'phone':_0x16fed2[_0x5211('0x12')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil['getString'](_0xfa7d36[_0x5211('0x13')],_0x16fed2,'\x20'),'description':intUtil[_0x5211('0x14')](_0xfa7d36[_0x5211('0x15')],_0x16fed2,_0x5211('0x16')),'tags':getTags(_0xfa7d36['Tags'],'name')},getCustomFields(_0xfa7d36[_0x5211('0x17')],_0x16fed2));_0x40b862[_0x5211('0x18')]=_['mapValues'](_[_0x5211('0x19')](_0x40b862[_0x5211('0x18')],'id'),_0x5211('0x1a'));return request({'uri':util[_0x5211('0x10')](_0x5211('0x1b'),_0x278240[_0x5211('0x1c')]),'method':_0x5211('0x1d'),'body':_0x40b862})[_0x5211('0x1e')](function(_0x3043d7){logger['info'](_0x5211('0x1f'));return _0x3043d7;});}function getUser(_0x38ad26,_0x4251f6){if(intUtil['validateEmail'](_0x4251f6)){return request({'uri':util[_0x5211('0x10')](_0x5211('0x20'),_0x38ad26['remoteUri']),'qs':{'email':_0x4251f6}})[_0x5211('0x1e')](function(_0x582e29){if(_0x582e29[_0x5211('0x21')]){logger['info'](_0x5211('0x22'));return _[_0x5211('0x23')](_0x582e29,function(_0x291544){return _0x291544[_0x5211('0x24')][_0x5211('0x25')]===_0x4251f6;});}else{logger[_0x5211('0xe')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return request({'uri':util['format'](_0x5211('0x26'),_0x38ad26['remoteUri'])})[_0x5211('0x1e')](function(_0x4bd3d7){logger[_0x5211('0xe')](_0x5211('0x27'));return _0x4bd3d7;});}});}else{logger[_0x5211('0xe')](_0x5211('0x28'));return request({'uri':util['format'](_0x5211('0x26'),_0x38ad26['remoteUri'])})[_0x5211('0x1e')](function(_0xb188a){logger['info'](_0x5211('0x27'));return _0xb188a;});}}function getEndUser(_0x161d00,_0x1c74da,_0x245ef7){logger[_0x5211('0xe')](_0x5211('0x29'),_0x245ef7);return request({'uri':util['format']('%s/api/v2/contacts',_0x161d00[_0x5211('0x1c')]),'qs':{'phone':_0x245ef7}})['then'](function(_0x706efe){if(_0x706efe[_0x5211('0x21')]){logger[_0x5211('0xe')]('Enduser\x20found!');return _['find'](_0x706efe,{'phone':_0x245ef7});}else{logger[_0x5211('0xe')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util['format'](_0x5211('0x2a'),_0x161d00[_0x5211('0x1c')]),'method':_0x5211('0x1d'),'body':{'name':_0x1c74da,'phone':_0x245ef7}})['then'](function(_0xf10d00){logger[_0x5211('0xe')](_0x5211('0x2b'));return _0xf10d00;});}});}function getAuth(_0x2ca75c){return util[_0x5211('0x10')](_0x5211('0x2c'),new Buffer(_0x2ca75c[_0x5211('0x2d')]+':X')[_0x5211('0x2e')](_0x5211('0x2f')));}function request(_0x4eef11){logger['debug'](_0x5211('0x30'),JSON[_0x5211('0x31')](_0x4eef11));return rp(_['defaults'](_0x4eef11,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0xf91461,_0x143f09){var _0x50eb0f=[];if(_0xf91461&&_0xf91461[_0x5211('0x21')]>0x0){_0x50eb0f=_[_0x5211('0x32')](_0xf91461,_0x143f09);}return _0x50eb0f;}function getCustomFields(_0x40e243,_0x58d72b){var _0x1be493=[];var _0xf96ee9={'custom_fields':[]};if(_0x40e243[_0x5211('0x21')]>0x0){_[_0x5211('0x33')](_0x40e243,function(_0x43d226){if(_0x43d226[_0x5211('0x34')]===_0x5211('0x35')&&_0x43d226[_0x5211('0x36')]&&!_0x43d226[_0x5211('0x37')]){_0xf96ee9[_0x43d226['nameField'][_0x5211('0x38')]()]=_0x43d226[_0x5211('0x39')][_0x5211('0x2e')]();}else if(_0x43d226['type']===_0x5211('0x35')&&_0x43d226['idField']&&_0x43d226[_0x5211('0x37')]){_0xf96ee9[_0x5211('0x18')][_0x5211('0x3a')]({'id':_0x43d226[_0x5211('0x3b')],'value':_0x43d226['content'][_0x5211('0x2e')]()});}else if(_0x43d226[_0x5211('0x34')]==='variable'&&_0x43d226[_0x5211('0x3c')]&&_0x43d226['idField']&&_0x43d226[_0x5211('0x37')]){_0x58d72b[_0x43d226[_0x5211('0x3c')]]&&_0xf96ee9[_0x5211('0x18')][_0x5211('0x3a')]({'id':_0x43d226[_0x5211('0x3b')],'value':_0x58d72b[_0x43d226[_0x5211('0x3c')]]['toString']()});}else if(_0x43d226[_0x5211('0x34')]===_0x5211('0x3d')&&_0x43d226[_0x5211('0x3e')]&&_0x43d226['Variable'][_0x5211('0x3f')]&&_0x43d226[_0x5211('0x3b')]&&_0x43d226[_0x5211('0x37')]){_0x58d72b[_0x43d226[_0x5211('0x3e')][_0x5211('0x3f')][_0x5211('0x38')]()]&&_0xf96ee9['custom_fields'][_0x5211('0x3a')]({'id':_0x43d226[_0x5211('0x3b')],'value':_0x58d72b[_0x43d226[_0x5211('0x3e')][_0x5211('0x3f')][_0x5211('0x38')]()][_0x5211('0x2e')]()});}});}return _0xf96ee9;}exports[_0x5211('0x40')]=function(_0x344394,_0x37ab88,_0x579a9d,_0x1a8dda,_0x45a483,_0xeb61e9){var _0xfdc41b,_0x5cd8c0;_0xeb61e9[_0x5211('0x1c')]=intUtil[_0x5211('0x41')](_0xeb61e9['remoteUri']);_0xeb61e9[_0x5211('0x42')]=intUtil[_0x5211('0x41')](_0xeb61e9[_0x5211('0x42')]);if(_0x45a483&&_0x45a483[_0x5211('0x43')]){logger['info'](_0x5211('0x44'),'Recording\x20is\x20enabled!');_0x37ab88[_0x5211('0x45')]=util['format'](_0x5211('0x46'),_0xeb61e9[_0x5211('0x42')],_0x37ab88['uniqueid'],md5(_0x37ab88[_0x5211('0x47')]));}else{_0x37ab88['recordingURL']='';}headers[_0x5211('0x48')]=getAuth(_0xeb61e9);return getUser(_0xeb61e9,_0x1a8dda[_0x5211('0x25')])[_0x5211('0x1e')](function(_0x2b6d03){_0xfdc41b=_0x2b6d03;logger[_0x5211('0xe')](_0x5211('0x49'),_0xfdc41b['id']);return getEndUser(_0xeb61e9,_0x37ab88[_0x5211('0x4a')],_0x37ab88[_0x5211('0x12')]);})[_0x5211('0x1e')](function(_0x13a8da){_0x5cd8c0=_0x13a8da;logger[_0x5211('0xe')](_0x5211('0x4b'),_0x5cd8c0['id']);return getTicket(_0xeb61e9,_0xfdc41b,_0x5cd8c0,_0x579a9d,_0x37ab88);})[_0x5211('0x1e')](function(_0x4f494b){if(_0x4f494b&&_0x4f494b['id']){logger[_0x5211('0xe')]('Ticket\x20created!');logger[_0x5211('0xe')](_0x5211('0x4c'),_0x4f494b['id']);logger[_0x5211('0xe')]('[QUEUE]',_0x5211('0x4d'));emit(util[_0x5211('0x10')]('user:%s',_0x1a8dda[_0x5211('0x3f')]),_0x5211('0x4e'),{'uri':util[_0x5211('0x10')](_0x5211('0x4f'),_0xeb61e9[_0x5211('0x1c')],_0x4f494b['id'])});}})[_0x5211('0x50')](function(_0x2d2b02){logger['error'](_0x5211('0x44'),JSON[_0x5211('0x31')](_0x2d2b02));});};exports['outbound']=function(_0x57ca51,_0x262baf,_0x2c3de9,_0x5b3011,_0x3ec0f3,_0x53cd32,_0x25938f){var _0x48fe39,_0x2c86be;_0x53cd32['remoteUri']=intUtil[_0x5211('0x41')](_0x53cd32['remoteUri']);_0x53cd32[_0x5211('0x42')]=intUtil[_0x5211('0x41')](_0x53cd32[_0x5211('0x42')]);if(_0x25938f&&_0x25938f['recordingFormat']&&_0x25938f[_0x5211('0x51')]!==_0x5211('0x52')){logger['info'](_0x5211('0x53'),_0x5211('0x54'));_0x262baf[_0x5211('0x45')]=util[_0x5211('0x10')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x53cd32['serverUrl'],_0x262baf[_0x5211('0x47')],md5(_0x262baf[_0x5211('0x47')]));}headers[_0x5211('0x48')]=getAuth(_0x53cd32);return getUser(_0x53cd32,_0x5b3011[_0x5211('0x25')])[_0x5211('0x1e')](function(_0x2da6e1){_0x48fe39=_0x2da6e1;logger[_0x5211('0xe')](_0x5211('0x49'),_0x48fe39['id']);return getEndUser(_0x53cd32,_0x262baf['destcalleridname'],_0x262baf[_0x5211('0x55')]);})[_0x5211('0x1e')](function(_0x45919d){_0x2c86be=_0x45919d;logger[_0x5211('0xe')](_0x5211('0x4b'),_0x2c86be['id']);return getTicket(_0x53cd32,_0x48fe39,_0x2c86be,_0x2c3de9,_0x262baf);})[_0x5211('0x1e')](function(_0x913f04){if(_0x913f04&&_0x913f04['id']){logger[_0x5211('0xe')](_0x5211('0x1f'));logger[_0x5211('0xe')](_0x5211('0x4c'),_0x913f04['id']);logger[_0x5211('0xe')]('[OUTBOUND]',_0x5211('0x4d'));emit(util[_0x5211('0x10')]('user:%s',_0x5b3011[_0x5211('0x3f')]),_0x5211('0x4e'),{'uri':util[_0x5211('0x10')]('%s/helpdesk/tickets/%d',_0x53cd32[_0x5211('0x1c')],_0x913f04['id'])});}})['catch'](function(_0x6d8306){logger[_0x5211('0x56')]('[OUTBOUND]',JSON[_0x5211('0x31')](_0x6d8306));});};exports[_0x5211('0x57')]=function(_0x5e6117,_0x27081c,_0x1ff0e4,_0x293914,_0x2f9a93,_0x3f6356){var _0x5859fd,_0x40a66a;_0x3f6356[_0x5211('0x1c')]=intUtil[_0x5211('0x41')](_0x3f6356['remoteUri']);_0x3f6356['serverUrl']=intUtil['stripTrailingSlash'](_0x3f6356[_0x5211('0x42')]);if(_0x2f9a93&&_0x2f9a93[_0x5211('0x43')]){logger[_0x5211('0xe')](_0x5211('0x58'),_0x5211('0x54'));_0x27081c[_0x5211('0x45')]=util['format'](_0x5211('0x46'),_0x3f6356['serverUrl'],_0x27081c[_0x5211('0x47')],md5(_0x27081c[_0x5211('0x47')]));}else{_0x27081c[_0x5211('0x45')]='';}headers[_0x5211('0x48')]=getAuth(_0x3f6356);return getUser(_0x3f6356,'')[_0x5211('0x1e')](function(_0x312282){_0x5859fd=_0x312282;logger[_0x5211('0xe')](_0x5211('0x49'),_0x5859fd['id']);return getEndUser(_0x3f6356,_0x27081c[_0x5211('0x4a')],_0x27081c['calleridnum']);})['then'](function(_0x4f348b){_0x40a66a=_0x4f348b;logger[_0x5211('0xe')](_0x5211('0x4b'),_0x40a66a['id']);return getTicket(_0x3f6356,_0x5859fd,_0x40a66a,_0x1ff0e4,_0x27081c);})[_0x5211('0x1e')](function(_0x17af25){if(_0x17af25){logger[_0x5211('0xe')](_0x5211('0x1f'));logger[_0x5211('0xe')](_0x5211('0x4c'),_0x17af25['id']);}})[_0x5211('0x50')](function(_0x1ac3cf){logger[_0x5211('0x56')]('[ABANDONED]',JSON['stringify'](_0x1ac3cf));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/index.js b/server/services/ami/trigger/integration/index.js
index c10cd05..efb045f 100644
--- a/server/services/ami/trigger/integration/index.js
+++ b/server/services/ami/trigger/integration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0451=['./zoho','./desk','./vtiger','./servicenow','./dynamics365','zendesk','salesforce','sugarcrm','freshdesk','zoho','desk','dynamics365','exec','data1','toLowerCase','data2','Configurations','queue','routeId','EVENT\x20UNKNOWN','abandoned','vtiger','log','../../../../config/logger','error','%s\x20configuration\x20#%s\x20not\x20found','data3','[EXEC]','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./salesforce','./sugarcrm','./freshdesk'];(function(_0x2a3c4d,_0x9c6b37){var _0x55c390=function(_0x4871cf){while(--_0x4871cf){_0x2a3c4d['push'](_0x2a3c4d['shift']());}};_0x55c390(++_0x9c6b37);}(_0x0451,0xcc));var _0x1045=function(_0x3f560e,_0x289aa8){_0x3f560e=_0x3f560e-0x0;var _0x5bf213=_0x0451[_0x3f560e];return _0x5bf213;};'use strict';var _=require(_0x1045('0x0'));var util=require(_0x1045('0x1'));var zendesk=require(_0x1045('0x2'));var salesforce=require(_0x1045('0x3'));var sugarcrm=require(_0x1045('0x4'));var freshdesk=require(_0x1045('0x5'));var zoho=require(_0x1045('0x6'));var desk=require(_0x1045('0x7'));var vtiger=require(_0x1045('0x8'));var servicenow=require(_0x1045('0x9'));var dynamics365=require(_0x1045('0xa'));var integrations=[_0x1045('0xb'),_0x1045('0xc'),_0x1045('0xd'),_0x1045('0xe'),_0x1045('0xf'),_0x1045('0x10'),'vtiger','servicenow',_0x1045('0x11')];exports[_0x1045('0x12')]=function(_0x12afc8,_0x5c0d57,_0x303ec6,_0x2a6414,_0x1ca6c4,_0x395b94){if(_0x303ec6){if(_['includes'](integrations,_0x12afc8[_0x1045('0x13')][_0x1045('0x14')]())){try{var _0x3c992d=null;var _0x15d6b5='';var _0x21f908=_0x303ec6[_0x12afc8[_0x1045('0x13')][_0x1045('0x14')]()];if(_0x21f908){var _0x34c698=_0x21f908[_0x12afc8[_0x1045('0x15')]];if(_0x34c698){var _0x4c2cc0=_['find'](_0x34c698[_0x1045('0x16')],{'id':parseInt(_0x12afc8['data3'],0xa)});if(_0x4c2cc0){if(_0x2a6414){if(_0x1ca6c4&&_0x5c0d57[_0x1045('0x17')]){_0x15d6b5=_0x1045('0x17');}else if(_0x5c0d57[_0x1045('0x18')]){_0x15d6b5='outbound';}else{console['log'](_0x1045('0x19'),_0x5c0d57);}}else{_0x15d6b5=_0x1045('0x1a');}switch(_0x12afc8[_0x1045('0x13')][_0x1045('0x14')]()){case _0x1045('0xb'):zendesk[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case _0x1045('0xc'):salesforce[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case'sugarcrm':sugarcrm[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case _0x1045('0xe'):freshdesk[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case'zoho':zoho[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case _0x1045('0x10'):desk[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case _0x1045('0x1b'):vtiger[_0x15d6b5](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94);break;case'servicenow':servicenow['cs'](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94,_0x15d6b5);break;case _0x1045('0x11'):dynamics365['cs'](_0x12afc8,_0x5c0d57,_0x4c2cc0,_0x2a6414,_0x1ca6c4,_0x34c698,_0x395b94,_0x15d6b5);break;default:console[_0x1045('0x1c')]('unknown\x20integration');}}else{_0x3c992d=require(_0x1045('0x1d'))(_0x12afc8[_0x1045('0x13')][_0x1045('0x14')]());_0x3c992d[_0x1045('0x1e')]('[EXEC]',util['format'](_0x1045('0x1f'),_0x12afc8[_0x1045('0x13')][_0x1045('0x14')](),_0x12afc8[_0x1045('0x20')]));}}else{_0x3c992d=require(_0x1045('0x1d'))(_0x12afc8[_0x1045('0x13')][_0x1045('0x14')]());_0x3c992d[_0x1045('0x1e')](_0x1045('0x21'),util['format'](_0x1045('0x22'),_0x12afc8['data1']['toLowerCase'](),_0x12afc8[_0x1045('0x15')]));}}else{}}catch(_0x2e92b4){console[_0x1045('0x1e')](_0x2e92b4);}}}};
\ No newline at end of file
+var _0x6f37=['toLowerCase','Configurations','data3','queue','outbound','log','abandoned','salesforce','vtiger','dynamics365','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20account\x20#%s\x20not\x20found','data2','lodash','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./zoho','./desk','./vtiger','./dynamics365','zendesk','sugarcrm','freshdesk','zoho','desk','servicenow','data1'];(function(_0x5a3348,_0x108f3d){var _0x190597=function(_0x10428c){while(--_0x10428c){_0x5a3348['push'](_0x5a3348['shift']());}};_0x190597(++_0x108f3d);}(_0x6f37,0x1ed));var _0x76f3=function(_0x3af6d3,_0xd6ff2e){_0x3af6d3=_0x3af6d3-0x0;var _0xf0c5a8=_0x6f37[_0x3af6d3];return _0xf0c5a8;};'use strict';var _=require(_0x76f3('0x0'));var util=require(_0x76f3('0x1'));var zendesk=require(_0x76f3('0x2'));var salesforce=require(_0x76f3('0x3'));var sugarcrm=require(_0x76f3('0x4'));var freshdesk=require(_0x76f3('0x5'));var zoho=require(_0x76f3('0x6'));var desk=require(_0x76f3('0x7'));var vtiger=require(_0x76f3('0x8'));var servicenow=require('./servicenow');var dynamics365=require(_0x76f3('0x9'));var integrations=[_0x76f3('0xa'),'salesforce',_0x76f3('0xb'),_0x76f3('0xc'),_0x76f3('0xd'),_0x76f3('0xe'),'vtiger',_0x76f3('0xf'),'dynamics365'];exports['exec']=function(_0x5e63af,_0x2e0bc1,_0x581ef2,_0x5e35e2,_0x3fa0f8,_0x42ab54){if(_0x581ef2){if(_['includes'](integrations,_0x5e63af[_0x76f3('0x10')][_0x76f3('0x11')]())){try{var _0x1c4f5e=null;var _0x4b9d63='';var _0x1f1001=_0x581ef2[_0x5e63af[_0x76f3('0x10')][_0x76f3('0x11')]()];if(_0x1f1001){var _0x5502f8=_0x1f1001[_0x5e63af['data2']];if(_0x5502f8){var _0xd92236=_['find'](_0x5502f8[_0x76f3('0x12')],{'id':parseInt(_0x5e63af[_0x76f3('0x13')],0xa)});if(_0xd92236){if(_0x5e35e2){if(_0x3fa0f8&&_0x2e0bc1[_0x76f3('0x14')]){_0x4b9d63='queue';}else if(_0x2e0bc1['routeId']){_0x4b9d63=_0x76f3('0x15');}else{console[_0x76f3('0x16')]('EVENT\x20UNKNOWN',_0x2e0bc1);}}else{_0x4b9d63=_0x76f3('0x17');}switch(_0x5e63af[_0x76f3('0x10')][_0x76f3('0x11')]()){case _0x76f3('0xa'):zendesk[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0x18'):salesforce[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0xb'):sugarcrm[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0xc'):freshdesk[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0xd'):zoho[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0xe'):desk[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0x19'):vtiger[_0x4b9d63](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54);break;case _0x76f3('0xf'):servicenow['cs'](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54,_0x4b9d63);break;case _0x76f3('0x1a'):dynamics365['cs'](_0x5e63af,_0x2e0bc1,_0xd92236,_0x5e35e2,_0x3fa0f8,_0x5502f8,_0x42ab54,_0x4b9d63);break;default:console[_0x76f3('0x16')](_0x76f3('0x1b'));}}else{_0x1c4f5e=require(_0x76f3('0x1c'))(_0x5e63af[_0x76f3('0x10')][_0x76f3('0x11')]());_0x1c4f5e[_0x76f3('0x1d')](_0x76f3('0x1e'),util[_0x76f3('0x1f')]('%s\x20configuration\x20#%s\x20not\x20found',_0x5e63af[_0x76f3('0x10')][_0x76f3('0x11')](),_0x5e63af[_0x76f3('0x13')]));}}else{_0x1c4f5e=require('../../../../config/logger')(_0x5e63af['data1'][_0x76f3('0x11')]());_0x1c4f5e[_0x76f3('0x1d')]('[EXEC]',util['format'](_0x76f3('0x20'),_0x5e63af[_0x76f3('0x10')][_0x76f3('0x11')](),_0x5e63af[_0x76f3('0x21')]));}}else{}}catch(_0x7c741a){console[_0x76f3('0x1d')](_0x7c741a);}}}};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/salesforce.js b/server/services/ami/trigger/integration/salesforce.js
index 1fe3fe8..92c4288 100644
--- a/server/services/ami/trigger/integration/salesforce.js
+++ b/server/services/ami/trigger/integration/salesforce.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c44=['username','Connection\x20established.','serverUrl','stripTrailingSlash','monitor_format','Recording\x20is\x20enabled!','format','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','email','calleridname','calleridnum','Fields','queue','[QUEUE]\x20Ticket\x20%s\x20created','user:%s','trigger:salesforce:display','newTab','trigger:browser:url','%s/%s/e','instanceUrl','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','[QUEUE]','stringify','outbound','recordingFormat','none','[OUTBOUND]','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','Salesforce\x20account\x20type\x20not\x20recognized','catch','abandoned','isNil','[ABANDONED]\x20Ticket\x20%s\x20created.','[ABANDONED]\x20Integration\x20account\x20type\x20%s.','[ABANDONED]','moment','bluebird','md5','jsforce','util','ioredis','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','emit','ticketType','Task','utc','getString','Descriptions','WhoId','Case','assign','Subjects','ContactId','sobject','create','find','then','length','Email','info','Agent\x20%s\x20found.','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','resolve','user_id','display_name','identity','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','contact_lead','Contact','execute','Lead','contact','lead','Phone','Name','Enduser\x20with\x20phone\x20%s\x20found.','Enduser\x20with\x20phone\x20%s\x20not\x20found.','','Caller\x20-\x20%s','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','Company','upperFirst','forEach','type','string','idField','content','variable','variableName','customVariable','Variable','name','toLowerCase','toString','concat','securityToken','Connection','remoteUri','clientId','clientSecret','login'];(function(_0x2d0260,_0x5f0291){var _0x1f44fe=function(_0x1866db){while(--_0x1866db){_0x2d0260['push'](_0x2d0260['shift']());}};_0x1f44fe(++_0x5f0291);}(_0x9c44,0x178));var _0x49c4=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0x9c44[_0x3ff085];return _0x2b68c3;};'use strict';var _=require('lodash');var rp=require('request-promise');var moment=require(_0x49c4('0x0'));var BPromise=require(_0x49c4('0x1'));var md5=require(_0x49c4('0x2'));var jsforce=require(_0x49c4('0x3'));var util=require(_0x49c4('0x4'));var Redis=require(_0x49c4('0x5'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x49c4('0x6'))('salesforce');config[_0x49c4('0x7')]=_[_0x49c4('0x8')](config[_0x49c4('0x7')],{'host':_0x49c4('0x9'),'port':0x18eb});var io=require(_0x49c4('0xa'))(new Redis(config['redis']));function emit(_0x11c586,_0x42e4f8,_0x1d13fb){io['to'](_0x11c586)[_0x49c4('0xb')](_0x42e4f8,_0x1d13fb);}function getTicket(_0x4c7d3a,_0x5ab4a3,_0x451ea6,_0x313e73,_0x58cad7,_0xb611a1,_0x459d09,_0x4adb3c){var _0x536d42={};if(_0x313e73[_0x49c4('0xc')]===_0x49c4('0xd')){_0x536d42=Object['assign']({},{'OwnerId':_0x5ab4a3['id'],'ActivityDate':moment[_0x49c4('0xe')](),'IsReminderSet':![],'IsRecurrence':![],'Subject':intUtil[_0x49c4('0xf')](_0x313e73['Subjects'],_0x58cad7,'\x20'),'Description':intUtil[_0x49c4('0xf')](_0x313e73[_0x49c4('0x10')],_0x58cad7,'\x0a')},getCustomFields(_0xb611a1,_0x58cad7));if(_0x451ea6){_0x536d42[_0x49c4('0x11')]=_0x451ea6['id'];}}else if(_0x313e73[_0x49c4('0xc')]===_0x49c4('0x12')){_0x536d42=Object[_0x49c4('0x13')]({},{'OwnerId':_0x5ab4a3['id'],'Subject':intUtil[_0x49c4('0xf')](_0x313e73[_0x49c4('0x14')],_0x58cad7,'\x20'),'Description':intUtil['getString'](_0x313e73[_0x49c4('0x10')],_0x58cad7,'\x0a')},getCustomFields(_0xb611a1,_0x58cad7));if(_0x451ea6){_0x536d42[_0x49c4('0x15')]=_0x451ea6['id'];}}return _0x459d09[_0x49c4('0x16')](_0x313e73[_0x49c4('0xc')])[_0x49c4('0x17')](_0x536d42);}function getUser(_0x53e3a2,_0x44e607,_0x2891f4){if(!_['isNil'](_0x44e607)&&intUtil['validateEmail'](_0x44e607)){var _0x3c782d={'Email':_0x44e607};var _0x2f82d5={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x2891f4[_0x49c4('0x16')]('User')[_0x49c4('0x18')](_0x3c782d,_0x2f82d5)['execute']()[_0x49c4('0x19')](function(_0x1806c2){if(_0x1806c2[_0x49c4('0x1a')]){var _0x291526=_[_0x49c4('0x18')](_0x1806c2,function(_0x41078c){return _0x41078c[_0x49c4('0x1b')]===_0x44e607;});if(_0x291526){logger[_0x49c4('0x1c')](_0x49c4('0x1d'),_0x44e607);return BPromise['resolve']({'id':_0x291526['Id'],'name':_0x291526['Name']});}}else{logger['info'](_0x49c4('0x1e'),_0x44e607);return _0x2891f4['identity']()['then'](function(_0x2263ae){return BPromise[_0x49c4('0x1f')]({'id':_0x2263ae[_0x49c4('0x20')],'name':_0x2263ae[_0x49c4('0x21')]});});}});}else{logger['info']('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x44e607);return _0x2891f4[_0x49c4('0x22')]()[_0x49c4('0x19')](function(_0x565423){return BPromise[_0x49c4('0x1f')]({'id':_0x565423[_0x49c4('0x20')],'name':_0x565423[_0x49c4('0x21')]});});}}function getEndUser(_0xa7a826,_0x531d92,_0x543ea2,_0x449960,_0x53c199){var _0x3800b7={'Phone':_0x449960};var _0x3852b2={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x49c4('0x1f')]()[_0x49c4('0x19')](function(){if(_0x531d92['ticketType']===_0x49c4('0xd')){logger[_0x49c4('0x1c')](_0x49c4('0x23'),_0x449960,_0x531d92[_0x49c4('0x24')]);switch(_0x531d92[_0x49c4('0x24')]){case _0x49c4('0x25'):return _0x53c199[_0x49c4('0x16')](_0x49c4('0x26'))[_0x49c4('0x18')](_0x3800b7,_0x3852b2)[_0x49c4('0x27')]()[_0x49c4('0x19')](function(_0x4ea6ea){if(_0x4ea6ea&&_0x4ea6ea['length']){return _0x4ea6ea;}else{return _0x53c199['sobject'](_0x49c4('0x28'))[_0x49c4('0x18')](_0x3800b7,_0x3852b2);}});case _0x49c4('0x29'):return _0x53c199[_0x49c4('0x16')](_0x49c4('0x26'))['find'](_0x3800b7,_0x3852b2)[_0x49c4('0x27')]();case _0x49c4('0x2a'):return _0x53c199[_0x49c4('0x16')](_0x49c4('0x28'))['find'](_0x3800b7,_0x3852b2);default:return null;}}else if(_0x531d92['ticketType']===_0x49c4('0x12')){logger[_0x49c4('0x1c')](_0x49c4('0x23'),_0x449960,_0x49c4('0x29'));return _0x53c199[_0x49c4('0x16')]('Contact')[_0x49c4('0x18')](_0x3800b7,_0x3852b2)[_0x49c4('0x27')]();}})[_0x49c4('0x19')](function(_0x512d02){if(_0x512d02&&_0x512d02['length']){var _0x85dce2=_[_0x49c4('0x18')](_0x512d02,function(_0x3bec0a){return _0x3bec0a[_0x49c4('0x2b')]===_0x449960;});if(_0x85dce2){return BPromise[_0x49c4('0x1f')]({'id':_0x85dce2['Id'],'name':_0x85dce2[_0x49c4('0x2c')],'phone':_0x85dce2[_0x49c4('0x2b')]});}}})[_0x49c4('0x19')](function(_0x3209cd){if(_0x3209cd){logger['info'](_0x49c4('0x2d'),_0x449960);return BPromise['resolve'](_0x3209cd);}else{logger[_0x49c4('0x1c')](_0x49c4('0x2e'),_0x449960);var _0x2625a6={'LastName':_0x543ea2!==_0x49c4('0x2f')?_0x543ea2:util['format'](_0x49c4('0x30'),_0x449960),'Phone':_0x449960};if(_0x531d92[_0x49c4('0x31')]){if(_0x531d92[_0x49c4('0x31')]==='contact'){logger[_0x49c4('0x1c')](_0x49c4('0x32'),_0x449960,_0x531d92[_0x49c4('0x31')]);}else if(_0x531d92[_0x49c4('0x31')]===_0x49c4('0x2a')&&_0x531d92[_0x49c4('0xc')]===_0x49c4('0xd')){logger[_0x49c4('0x1c')](_0x49c4('0x32'),_0x449960,_0x531d92[_0x49c4('0x31')]);_0x2625a6[_0x49c4('0x33')]='No\x20Company';}else{return null;}}return _0x53c199[_0x49c4('0x16')](_[_0x49c4('0x34')](_0x531d92[_0x49c4('0x31')]))[_0x49c4('0x17')](_0x2625a6);}});}function getCustomFields(_0x41ad28,_0x29dd5d){var _0x1be62d={};if(_0x41ad28[_0x49c4('0x1a')]>0x0){_[_0x49c4('0x35')](_0x41ad28,function(_0x2668ed){if(_0x2668ed[_0x49c4('0x36')]===_0x49c4('0x37')&&_0x2668ed[_0x49c4('0x38')]){_0x1be62d[_0x2668ed['idField']]=_0x2668ed[_0x49c4('0x39')]['toString']();}else if(_0x2668ed[_0x49c4('0x36')]===_0x49c4('0x3a')&&_0x2668ed[_0x49c4('0x3b')]&&_0x2668ed[_0x49c4('0x38')]){_0x29dd5d[_0x2668ed[_0x49c4('0x3b')]]&&(_0x1be62d[_0x2668ed[_0x49c4('0x38')]]=_0x29dd5d[_0x2668ed['variableName']]['toString']());}else if(_0x2668ed[_0x49c4('0x36')]===_0x49c4('0x3c')&&_0x2668ed[_0x49c4('0x3d')]&&_0x2668ed[_0x49c4('0x3d')]['name']&&_0x2668ed[_0x49c4('0x38')]){_0x29dd5d[_0x2668ed[_0x49c4('0x3d')][_0x49c4('0x3e')][_0x49c4('0x3f')]()]&&(_0x1be62d[_0x2668ed[_0x49c4('0x38')]]=_0x29dd5d[_0x2668ed[_0x49c4('0x3d')][_0x49c4('0x3e')][_0x49c4('0x3f')]()][_0x49c4('0x40')]());}});}return _0x1be62d;}function getConnection(_0x5640d3){var _0x2ad771=_0x5640d3['password'][_0x49c4('0x41')](_0x5640d3[_0x49c4('0x42')]);var _0x301def=new jsforce[(_0x49c4('0x43'))]({'oauth2':{'loginUrl':_0x5640d3[_0x49c4('0x44')]||'https://login.salesforce.com','clientId':_0x5640d3[_0x49c4('0x45')],'clientSecret':_0x5640d3[_0x49c4('0x46')]}});return _0x301def[_0x49c4('0x47')](_0x5640d3[_0x49c4('0x48')],_0x2ad771)[_0x49c4('0x19')](function(){logger[_0x49c4('0x1c')](_0x49c4('0x49'));return _0x301def;});}exports['queue']=function(_0x3bac1b,_0x5cfff9,_0x3f7379,_0x906d3,_0x29fe65,_0x27adfe){var _0x2d8087,_0x30bea5,_0x2c6be1,_0x506c71;_0x27adfe[_0x49c4('0x4a')]=intUtil[_0x49c4('0x4b')](_0x27adfe['serverUrl']);_0x27adfe[_0x49c4('0x44')]=intUtil[_0x49c4('0x4b')](_0x27adfe[_0x49c4('0x44')]);if(_0x29fe65&&_0x29fe65[_0x49c4('0x4c')]){logger['info']('[QUEUE]',_0x49c4('0x4d'));_0x5cfff9['recordingURL']=util[_0x49c4('0x4e')](_0x49c4('0x4f'),_0x27adfe[_0x49c4('0x4a')],_0x5cfff9[_0x49c4('0x50')],md5(_0x5cfff9[_0x49c4('0x50')]));}else{_0x5cfff9[_0x49c4('0x51')]='';}return getConnection(_0x27adfe)[_0x49c4('0x19')](function(_0x563f0b){_0x506c71=_0x563f0b;return getUser(_0x27adfe,_0x906d3[_0x49c4('0x52')],_0x506c71);})[_0x49c4('0x19')](function(_0x3936d3){_0x2d8087=_0x3936d3;return getEndUser(_0x27adfe,_0x3f7379,_0x5cfff9[_0x49c4('0x53')],_0x5cfff9[_0x49c4('0x54')],_0x506c71);})[_0x49c4('0x19')](function(_0x156748){_0x30bea5=_0x156748;return getTicket(_0x27adfe,_0x2d8087,_0x30bea5,_0x3f7379,_0x5cfff9,_0x3f7379[_0x49c4('0x55')],_0x506c71,_0x49c4('0x56'));})[_0x49c4('0x19')](function(_0x5b822f){_0x2c6be1=_0x5b822f;logger['info'](_0x49c4('0x57'),_0x2c6be1['id']);logger[_0x49c4('0x1c')]('[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.',_0x2c6be1['id'],_0x906d3['name'],_0x27adfe[_0x49c4('0x36')]);switch(_0x27adfe['type']){case'integrationTab':emit(util[_0x49c4('0x4e')](_0x49c4('0x58'),_0x906d3[_0x49c4('0x3e')]),_0x49c4('0x59'),{'recordId':_0x2c6be1['id']});break;case _0x49c4('0x5a'):emit(util[_0x49c4('0x4e')](_0x49c4('0x58'),_0x906d3['name']),_0x49c4('0x5b'),{'uri':util[_0x49c4('0x4e')](_0x49c4('0x5c'),_0x506c71[_0x49c4('0x5d')],_0x2c6be1['id'])});break;default:logger[_0x49c4('0x5e')](_0x49c4('0x5f'));}})['catch'](function(_0x5c7ddd){logger[_0x49c4('0x5e')](_0x49c4('0x60'),JSON[_0x49c4('0x61')](_0x5c7ddd));});};exports[_0x49c4('0x62')]=function(_0x23288e,_0x6b2592,_0xc2033f,_0x58dc5f,_0x45d715,_0x33c9a6,_0x4ba4eb){var _0x42928c,_0x53690f,_0x2f966c,_0x147ebd;_0x33c9a6[_0x49c4('0x4a')]=intUtil[_0x49c4('0x4b')](_0x33c9a6[_0x49c4('0x4a')]);_0x33c9a6[_0x49c4('0x44')]=intUtil[_0x49c4('0x4b')](_0x33c9a6[_0x49c4('0x44')]);if(_0x4ba4eb&&_0x4ba4eb['recordingFormat']&&_0x4ba4eb[_0x49c4('0x63')]!==_0x49c4('0x64')){logger['info'](_0x49c4('0x65'),_0x49c4('0x4d'));_0x6b2592['recordingURL']=util[_0x49c4('0x4e')](_0x49c4('0x4f'),_0x33c9a6['serverUrl'],_0x6b2592['uniqueid'],md5(_0x6b2592['uniqueid']));}return getConnection(_0x33c9a6)['then'](function(_0xc43386){_0x147ebd=_0xc43386;return getUser(_0x33c9a6,_0x58dc5f['email'],_0x147ebd);})[_0x49c4('0x19')](function(_0x32f344){_0x42928c=_0x32f344;return getEndUser(_0x33c9a6,_0xc2033f,_0x6b2592['destcalleridname'],_0x6b2592[_0x49c4('0x66')],_0x147ebd);})[_0x49c4('0x19')](function(_0x5ac9f0){_0x53690f=_0x5ac9f0;return getTicket(_0x33c9a6,_0x42928c,_0x53690f,_0xc2033f,_0x6b2592,_0xc2033f[_0x49c4('0x55')],_0x147ebd,_0x49c4('0x62'));})[_0x49c4('0x19')](function(_0x35f46f){_0x2f966c=_0x35f46f;logger['info'](_0x49c4('0x67'),_0x2f966c['id']);logger[_0x49c4('0x1c')](_0x49c4('0x68'),_0x2f966c['id'],_0x58dc5f[_0x49c4('0x3e')],_0x33c9a6['type']);switch(_0x33c9a6[_0x49c4('0x36')]){case'integrationTab':emit(util['format']('user:%s',_0x58dc5f['name']),_0x49c4('0x59'),{'recordId':_0x2f966c['id']});break;case _0x49c4('0x5a'):emit(util[_0x49c4('0x4e')](_0x49c4('0x58'),_0x58dc5f['name']),'trigger:browser:url',{'uri':util[_0x49c4('0x4e')](_0x49c4('0x5c'),_0x147ebd[_0x49c4('0x5d')],_0x2f966c['id'])});break;default:logger[_0x49c4('0x5e')](_0x49c4('0x65'),_0x49c4('0x69'));}})[_0x49c4('0x6a')](function(_0x3b949d){logger['error'](_0x49c4('0x65'),JSON['stringify'](_0x3b949d));});};exports[_0x49c4('0x6b')]=function(_0x264902,_0x1a5d4c,_0x1ea1b4,_0x3a1c81,_0x2e062f,_0x13d657){var _0x3feb0b,_0x13d951,_0x1743d0,_0x1e3911;_0x13d657[_0x49c4('0x4a')]=intUtil[_0x49c4('0x4b')](_0x13d657[_0x49c4('0x4a')]);_0x13d657[_0x49c4('0x44')]=intUtil[_0x49c4('0x4b')](_0x13d657[_0x49c4('0x44')]);if(_0x2e062f&&_0x2e062f[_0x49c4('0x4c')]){logger['info']('[ABANDONED]',_0x49c4('0x4d'));_0x1a5d4c[_0x49c4('0x51')]=util['format'](_0x49c4('0x4f'),_0x13d657[_0x49c4('0x4a')],_0x1a5d4c[_0x49c4('0x50')],md5(_0x1a5d4c[_0x49c4('0x50')]));}else{_0x1a5d4c['recordingURL']='';}return getConnection(_0x13d657)['then'](function(_0x4a85d4){_0x1e3911=_0x4a85d4;if(!_[_0x49c4('0x6c')](_0x3a1c81)){return getUser(_0x13d657,_0x3a1c81[_0x49c4('0x3e')],_0x1e3911);}else{return getUser(_0x13d657,null,_0x1e3911);}})[_0x49c4('0x19')](function(_0x2f4289){_0x3feb0b=_0x2f4289;return getEndUser(_0x13d657,_0x1ea1b4,_0x1a5d4c[_0x49c4('0x53')],_0x1a5d4c[_0x49c4('0x54')],_0x1e3911);})[_0x49c4('0x19')](function(_0x3692a4){_0x13d951=_0x3692a4;return getTicket(_0x13d657,_0x3feb0b,_0x13d951,_0x1ea1b4,_0x1a5d4c,_0x1ea1b4[_0x49c4('0x55')],_0x1e3911);})['then'](function(_0x363b2e){_0x1743d0=_0x363b2e;logger[_0x49c4('0x1c')](_0x49c4('0x6d'),_0x1743d0['id']);logger['info'](_0x49c4('0x6e'),_0x13d657[_0x49c4('0x36')]);})[_0x49c4('0x6a')](function(_0xb6031b){logger[_0x49c4('0x5e')](_0x49c4('0x6f'),JSON[_0x49c4('0x61')](_0xb6031b));});};
\ No newline at end of file
+var _0xd8b0=['Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','resolve','user_id','display_name','info','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','Lead','contact','lead','Contact','Name','Enduser\x20with\x20phone\x20%s\x20found.','Caller\x20-\x20%s','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','No\x20Company','upperFirst','forEach','type','string','idField','content','toString','variableName','Variable','name','toLowerCase','password','remoteUri','https://login.salesforce.com','clientId','login','username','Connection\x20established.','queue','serverUrl','stripTrailingSlash','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','calleridname','Fields','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','user:%s','format','trigger:browser:url','%s/%s/e','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','catch','stringify','outbound','recordingFormat','none','email','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','newTab','instanceUrl','error','[OUTBOUND]','monitor_format','[ABANDONED]','[ABANDONED]\x20Ticket\x20%s\x20created.','[ABANDONED]\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','jsforce','util','ioredis','./util','../../../../config/environment','redis','defaults','socket.io-emitter','emit','ticketType','Task','assign','utc','getString','Subjects','Descriptions','WhoId','Case','ContactId','sobject','isNil','validateEmail','find','execute','then','length','Agent\x20%s\x20found.'];(function(_0x512c83,_0x42a67a){var _0x1f7f25=function(_0x1e656c){while(--_0x1e656c){_0x512c83['push'](_0x512c83['shift']());}};_0x1f7f25(++_0x42a67a);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0x0d8b('0x0'));var rp=require(_0x0d8b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var md5=require('md5');var jsforce=require(_0x0d8b('0x2'));var util=require(_0x0d8b('0x3'));var Redis=require(_0x0d8b('0x4'));var intUtil=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var logger=require('../../../../config/logger')('salesforce');config[_0x0d8b('0x7')]=_[_0x0d8b('0x8')](config[_0x0d8b('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x0d8b('0x9'))(new Redis(config[_0x0d8b('0x7')]));function emit(_0x58e4e2,_0x129310,_0x348e65){io['to'](_0x58e4e2)[_0x0d8b('0xa')](_0x129310,_0x348e65);}function getTicket(_0x1f4800,_0x28ff7f,_0x1cac62,_0x2c5e9e,_0x28f87c,_0x48fa16,_0x3c4bfa,_0x4e0269){var _0x4225c4={};if(_0x2c5e9e[_0x0d8b('0xb')]===_0x0d8b('0xc')){_0x4225c4=Object[_0x0d8b('0xd')]({},{'OwnerId':_0x28ff7f['id'],'ActivityDate':moment[_0x0d8b('0xe')](),'IsReminderSet':![],'IsRecurrence':![],'Subject':intUtil[_0x0d8b('0xf')](_0x2c5e9e[_0x0d8b('0x10')],_0x28f87c,'\x20'),'Description':intUtil[_0x0d8b('0xf')](_0x2c5e9e[_0x0d8b('0x11')],_0x28f87c,'\x0a')},getCustomFields(_0x48fa16,_0x28f87c));if(_0x1cac62){_0x4225c4[_0x0d8b('0x12')]=_0x1cac62['id'];}}else if(_0x2c5e9e[_0x0d8b('0xb')]===_0x0d8b('0x13')){_0x4225c4=Object[_0x0d8b('0xd')]({},{'OwnerId':_0x28ff7f['id'],'Subject':intUtil[_0x0d8b('0xf')](_0x2c5e9e['Subjects'],_0x28f87c,'\x20'),'Description':intUtil[_0x0d8b('0xf')](_0x2c5e9e[_0x0d8b('0x11')],_0x28f87c,'\x0a')},getCustomFields(_0x48fa16,_0x28f87c));if(_0x1cac62){_0x4225c4[_0x0d8b('0x14')]=_0x1cac62['id'];}}return _0x3c4bfa[_0x0d8b('0x15')](_0x2c5e9e[_0x0d8b('0xb')])['create'](_0x4225c4);}function getUser(_0x106a01,_0x4586c2,_0x2fd0fc){if(!_[_0x0d8b('0x16')](_0x4586c2)&&intUtil[_0x0d8b('0x17')](_0x4586c2)){var _0x18dd2d={'Email':_0x4586c2};var _0x264b39={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x2fd0fc[_0x0d8b('0x15')]('User')[_0x0d8b('0x18')](_0x18dd2d,_0x264b39)[_0x0d8b('0x19')]()[_0x0d8b('0x1a')](function(_0x143372){if(_0x143372[_0x0d8b('0x1b')]){var _0x5b709c=_[_0x0d8b('0x18')](_0x143372,function(_0x352c17){return _0x352c17['Email']===_0x4586c2;});if(_0x5b709c){logger['info'](_0x0d8b('0x1c'),_0x4586c2);return BPromise['resolve']({'id':_0x5b709c['Id'],'name':_0x5b709c['Name']});}}else{logger['info'](_0x0d8b('0x1d'),_0x4586c2);return _0x2fd0fc[_0x0d8b('0x1e')]()[_0x0d8b('0x1a')](function(_0x38efc8){return BPromise[_0x0d8b('0x1f')]({'id':_0x38efc8[_0x0d8b('0x20')],'name':_0x38efc8[_0x0d8b('0x21')]});});}});}else{logger[_0x0d8b('0x22')](_0x0d8b('0x1d'),_0x4586c2);return _0x2fd0fc['identity']()[_0x0d8b('0x1a')](function(_0x4463ee){return BPromise['resolve']({'id':_0x4463ee[_0x0d8b('0x20')],'name':_0x4463ee['display_name']});});}}function getEndUser(_0x3dd149,_0x234bdd,_0xa2af02,_0x4fe6f9,_0x59a905){var _0x28f639={'Phone':_0x4fe6f9};var _0x3ef745={'Id':!![],'Name':!![],'Phone':!![]};return BPromise['resolve']()[_0x0d8b('0x1a')](function(){if(_0x234bdd['ticketType']===_0x0d8b('0xc')){logger['info'](_0x0d8b('0x23'),_0x4fe6f9,_0x234bdd['moduleSearch']);switch(_0x234bdd[_0x0d8b('0x24')]){case'contact_lead':return _0x59a905[_0x0d8b('0x15')]('Contact')[_0x0d8b('0x18')](_0x28f639,_0x3ef745)[_0x0d8b('0x19')]()[_0x0d8b('0x1a')](function(_0x56120a){if(_0x56120a&&_0x56120a['length']){return _0x56120a;}else{return _0x59a905['sobject'](_0x0d8b('0x25'))['find'](_0x28f639,_0x3ef745);}});case _0x0d8b('0x26'):return _0x59a905['sobject']('Contact')[_0x0d8b('0x18')](_0x28f639,_0x3ef745)[_0x0d8b('0x19')]();case _0x0d8b('0x27'):return _0x59a905[_0x0d8b('0x15')](_0x0d8b('0x25'))[_0x0d8b('0x18')](_0x28f639,_0x3ef745);default:return null;}}else if(_0x234bdd[_0x0d8b('0xb')]===_0x0d8b('0x13')){logger['info'](_0x0d8b('0x23'),_0x4fe6f9,_0x0d8b('0x26'));return _0x59a905['sobject'](_0x0d8b('0x28'))[_0x0d8b('0x18')](_0x28f639,_0x3ef745)[_0x0d8b('0x19')]();}})['then'](function(_0x113318){if(_0x113318&&_0x113318[_0x0d8b('0x1b')]){var _0x206157=_[_0x0d8b('0x18')](_0x113318,function(_0x933e01){return _0x933e01['Phone']===_0x4fe6f9;});if(_0x206157){return BPromise[_0x0d8b('0x1f')]({'id':_0x206157['Id'],'name':_0x206157[_0x0d8b('0x29')],'phone':_0x206157['Phone']});}}})[_0x0d8b('0x1a')](function(_0x3cc3ee){if(_0x3cc3ee){logger[_0x0d8b('0x22')](_0x0d8b('0x2a'),_0x4fe6f9);return BPromise[_0x0d8b('0x1f')](_0x3cc3ee);}else{logger['info']('Enduser\x20with\x20phone\x20%s\x20not\x20found.',_0x4fe6f9);var _0x41b4f9={'LastName':_0xa2af02!==''?_0xa2af02:util['format'](_0x0d8b('0x2b'),_0x4fe6f9),'Phone':_0x4fe6f9};if(_0x234bdd[_0x0d8b('0x2c')]){if(_0x234bdd[_0x0d8b('0x2c')]===_0x0d8b('0x26')){logger[_0x0d8b('0x22')](_0x0d8b('0x2d'),_0x4fe6f9,_0x234bdd['moduleCreate']);}else if(_0x234bdd[_0x0d8b('0x2c')]===_0x0d8b('0x27')&&_0x234bdd[_0x0d8b('0xb')]===_0x0d8b('0xc')){logger[_0x0d8b('0x22')](_0x0d8b('0x2d'),_0x4fe6f9,_0x234bdd[_0x0d8b('0x2c')]);_0x41b4f9['Company']=_0x0d8b('0x2e');}else{return null;}}return _0x59a905[_0x0d8b('0x15')](_[_0x0d8b('0x2f')](_0x234bdd[_0x0d8b('0x2c')]))['create'](_0x41b4f9);}});}function getCustomFields(_0xe0bf42,_0x4b4bde){var _0x37b26c={};if(_0xe0bf42[_0x0d8b('0x1b')]>0x0){_[_0x0d8b('0x30')](_0xe0bf42,function(_0x26ac10){if(_0x26ac10[_0x0d8b('0x31')]===_0x0d8b('0x32')&&_0x26ac10[_0x0d8b('0x33')]){_0x37b26c[_0x26ac10[_0x0d8b('0x33')]]=_0x26ac10[_0x0d8b('0x34')][_0x0d8b('0x35')]();}else if(_0x26ac10['type']==='variable'&&_0x26ac10['variableName']&&_0x26ac10['idField']){_0x4b4bde[_0x26ac10['variableName']]&&(_0x37b26c[_0x26ac10[_0x0d8b('0x33')]]=_0x4b4bde[_0x26ac10[_0x0d8b('0x36')]][_0x0d8b('0x35')]());}else if(_0x26ac10['type']==='customVariable'&&_0x26ac10[_0x0d8b('0x37')]&&_0x26ac10[_0x0d8b('0x37')][_0x0d8b('0x38')]&&_0x26ac10['idField']){_0x4b4bde[_0x26ac10[_0x0d8b('0x37')][_0x0d8b('0x38')]['toLowerCase']()]&&(_0x37b26c[_0x26ac10['idField']]=_0x4b4bde[_0x26ac10[_0x0d8b('0x37')]['name'][_0x0d8b('0x39')]()]['toString']());}});}return _0x37b26c;}function getConnection(_0x53f643){var _0x30ccee=_0x53f643[_0x0d8b('0x3a')]['concat'](_0x53f643['securityToken']);var _0x59b8e9=new jsforce['Connection']({'oauth2':{'loginUrl':_0x53f643[_0x0d8b('0x3b')]||_0x0d8b('0x3c'),'clientId':_0x53f643[_0x0d8b('0x3d')],'clientSecret':_0x53f643['clientSecret']}});return _0x59b8e9[_0x0d8b('0x3e')](_0x53f643[_0x0d8b('0x3f')],_0x30ccee)[_0x0d8b('0x1a')](function(){logger[_0x0d8b('0x22')](_0x0d8b('0x40'));return _0x59b8e9;});}exports[_0x0d8b('0x41')]=function(_0x11d22b,_0x1d5067,_0x384a5e,_0x1f2077,_0x44d54b,_0x820885){var _0x84ef1c,_0x3e569b,_0x570af8,_0xdfcf32;_0x820885[_0x0d8b('0x42')]=intUtil[_0x0d8b('0x43')](_0x820885[_0x0d8b('0x42')]);_0x820885['remoteUri']=intUtil[_0x0d8b('0x43')](_0x820885['remoteUri']);if(_0x44d54b&&_0x44d54b['monitor_format']){logger[_0x0d8b('0x22')](_0x0d8b('0x44'),_0x0d8b('0x45'));_0x1d5067[_0x0d8b('0x46')]=util['format'](_0x0d8b('0x47'),_0x820885[_0x0d8b('0x42')],_0x1d5067[_0x0d8b('0x48')],md5(_0x1d5067[_0x0d8b('0x48')]));}else{_0x1d5067[_0x0d8b('0x46')]='';}return getConnection(_0x820885)['then'](function(_0x5c0824){_0xdfcf32=_0x5c0824;return getUser(_0x820885,_0x1f2077['email'],_0xdfcf32);})['then'](function(_0x368ede){_0x84ef1c=_0x368ede;return getEndUser(_0x820885,_0x384a5e,_0x1d5067[_0x0d8b('0x49')],_0x1d5067['calleridnum'],_0xdfcf32);})['then'](function(_0x44c5c1){_0x3e569b=_0x44c5c1;return getTicket(_0x820885,_0x84ef1c,_0x3e569b,_0x384a5e,_0x1d5067,_0x384a5e[_0x0d8b('0x4a')],_0xdfcf32,'queue');})['then'](function(_0x900906){_0x570af8=_0x900906;logger[_0x0d8b('0x22')](_0x0d8b('0x4b'),_0x570af8['id']);logger[_0x0d8b('0x22')](_0x0d8b('0x4c'),_0x570af8['id'],_0x1f2077['name'],_0x820885[_0x0d8b('0x31')]);switch(_0x820885[_0x0d8b('0x31')]){case'integrationTab':emit(util['format'](_0x0d8b('0x4d'),_0x1f2077[_0x0d8b('0x38')]),'trigger:salesforce:display',{'recordId':_0x570af8['id']});break;case'newTab':emit(util[_0x0d8b('0x4e')](_0x0d8b('0x4d'),_0x1f2077[_0x0d8b('0x38')]),_0x0d8b('0x4f'),{'uri':util['format'](_0x0d8b('0x50'),_0xdfcf32['instanceUrl'],_0x570af8['id'])});break;default:logger['error'](_0x0d8b('0x51'));}})[_0x0d8b('0x52')](function(_0x54aa03){logger['error'](_0x0d8b('0x44'),JSON[_0x0d8b('0x53')](_0x54aa03));});};exports[_0x0d8b('0x54')]=function(_0x2c1eb0,_0x3afc3a,_0xb66e76,_0x3978e5,_0x3bead7,_0x5418d8,_0x24a859){var _0x37dc9f,_0x3a3d33,_0x3c7efb,_0x3fb9ea;_0x5418d8[_0x0d8b('0x42')]=intUtil[_0x0d8b('0x43')](_0x5418d8[_0x0d8b('0x42')]);_0x5418d8[_0x0d8b('0x3b')]=intUtil['stripTrailingSlash'](_0x5418d8[_0x0d8b('0x3b')]);if(_0x24a859&&_0x24a859[_0x0d8b('0x55')]&&_0x24a859[_0x0d8b('0x55')]!==_0x0d8b('0x56')){logger[_0x0d8b('0x22')]('[OUTBOUND]',_0x0d8b('0x45'));_0x3afc3a[_0x0d8b('0x46')]=util[_0x0d8b('0x4e')](_0x0d8b('0x47'),_0x5418d8[_0x0d8b('0x42')],_0x3afc3a['uniqueid'],md5(_0x3afc3a['uniqueid']));}return getConnection(_0x5418d8)[_0x0d8b('0x1a')](function(_0x291b83){_0x3fb9ea=_0x291b83;return getUser(_0x5418d8,_0x3978e5[_0x0d8b('0x57')],_0x3fb9ea);})[_0x0d8b('0x1a')](function(_0x5a70bd){_0x37dc9f=_0x5a70bd;return getEndUser(_0x5418d8,_0xb66e76,_0x3afc3a[_0x0d8b('0x58')],_0x3afc3a[_0x0d8b('0x59')],_0x3fb9ea);})[_0x0d8b('0x1a')](function(_0x5952dd){_0x3a3d33=_0x5952dd;return getTicket(_0x5418d8,_0x37dc9f,_0x3a3d33,_0xb66e76,_0x3afc3a,_0xb66e76[_0x0d8b('0x4a')],_0x3fb9ea,'outbound');})[_0x0d8b('0x1a')](function(_0x3ed63e){_0x3c7efb=_0x3ed63e;logger[_0x0d8b('0x22')](_0x0d8b('0x5a'),_0x3c7efb['id']);logger[_0x0d8b('0x22')](_0x0d8b('0x5b'),_0x3c7efb['id'],_0x3978e5['name'],_0x5418d8[_0x0d8b('0x31')]);switch(_0x5418d8['type']){case _0x0d8b('0x5c'):emit(util[_0x0d8b('0x4e')](_0x0d8b('0x4d'),_0x3978e5[_0x0d8b('0x38')]),'trigger:salesforce:display',{'recordId':_0x3c7efb['id']});break;case _0x0d8b('0x5d'):emit(util[_0x0d8b('0x4e')](_0x0d8b('0x4d'),_0x3978e5[_0x0d8b('0x38')]),_0x0d8b('0x4f'),{'uri':util[_0x0d8b('0x4e')](_0x0d8b('0x50'),_0x3fb9ea[_0x0d8b('0x5e')],_0x3c7efb['id'])});break;default:logger[_0x0d8b('0x5f')](_0x0d8b('0x60'),'Salesforce\x20account\x20type\x20not\x20recognized');}})['catch'](function(_0x6388ae){logger[_0x0d8b('0x5f')]('[OUTBOUND]',JSON[_0x0d8b('0x53')](_0x6388ae));});};exports['abandoned']=function(_0x5cc960,_0x22ee20,_0x1c4e96,_0x4f4b4d,_0x587128,_0x1900e3){var _0x1c007b,_0x70e4b2,_0x435090,_0x2ab72b;_0x1900e3[_0x0d8b('0x42')]=intUtil[_0x0d8b('0x43')](_0x1900e3['serverUrl']);_0x1900e3[_0x0d8b('0x3b')]=intUtil['stripTrailingSlash'](_0x1900e3[_0x0d8b('0x3b')]);if(_0x587128&&_0x587128[_0x0d8b('0x61')]){logger[_0x0d8b('0x22')](_0x0d8b('0x62'),'Recording\x20is\x20enabled!');_0x22ee20[_0x0d8b('0x46')]=util['format'](_0x0d8b('0x47'),_0x1900e3[_0x0d8b('0x42')],_0x22ee20[_0x0d8b('0x48')],md5(_0x22ee20[_0x0d8b('0x48')]));}else{_0x22ee20[_0x0d8b('0x46')]='';}return getConnection(_0x1900e3)[_0x0d8b('0x1a')](function(_0x3e927c){_0x2ab72b=_0x3e927c;if(!_[_0x0d8b('0x16')](_0x4f4b4d)){return getUser(_0x1900e3,_0x4f4b4d[_0x0d8b('0x38')],_0x2ab72b);}else{return getUser(_0x1900e3,null,_0x2ab72b);}})[_0x0d8b('0x1a')](function(_0x4eb07e){_0x1c007b=_0x4eb07e;return getEndUser(_0x1900e3,_0x1c4e96,_0x22ee20[_0x0d8b('0x49')],_0x22ee20['calleridnum'],_0x2ab72b);})[_0x0d8b('0x1a')](function(_0x106e9e){_0x70e4b2=_0x106e9e;return getTicket(_0x1900e3,_0x1c007b,_0x70e4b2,_0x1c4e96,_0x22ee20,_0x1c4e96['Fields'],_0x2ab72b);})[_0x0d8b('0x1a')](function(_0x56e03c){_0x435090=_0x56e03c;logger[_0x0d8b('0x22')](_0x0d8b('0x63'),_0x435090['id']);logger[_0x0d8b('0x22')](_0x0d8b('0x64'),_0x1900e3[_0x0d8b('0x31')]);})[_0x0d8b('0x52')](function(_0x3a073b){logger[_0x0d8b('0x5f')]('[ABANDONED]',JSON[_0x0d8b('0x53')](_0x3a073b));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/servicenow.js b/server/services/ami/trigger/integration/servicenow.js
index b4ffe3e..b0103a0 100644
--- a/server/services/ami/trigger/integration/servicenow.js
+++ b/server/services/ami/trigger/integration/servicenow.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0328=['active','true','userId','adminEmail','error','endUserNumber','user','then','],\x20EndUser\x20schema','endUserId','sys_user?sysparm_query=phone%3D','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','forEach','type','string','idField','toLowerCase','content','customField','toString','variable','variableName','customVariable','Variable','name','outbound','POST','assign','getString','Subjects','Descriptions',']\x20POST\x20incident\x20entity\x20schema','number',']\x20getTicket\x20crm','label','?sysparm_query=name%3D','label_entry','incident','Incident\x20-\x20','ticketNumber','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','format','user:%s','trigger:browser:url','username','password','sysparm_display_value=true','remoteUri','serverUrl','stripTrailingSlash','email','destcalleridnum','callDirection','abandoned','queue','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','ticketId',']\x20Error\x20running\x20ServiceNow\x20integration','lodash','bluebird','request-promise','util','md5','ioredis','./util','../../../../config/logger','servicenow','redis','GET','sys_user?sysparm_query=user_name%3Dadmin','length','adminId','result','sys_id','info','toUpperCase','],\x20getAdminUser\x20crm','catch','message','],\x20getUser\x20input\x20crm','sys_user?sysparm_query=email%3D','userEmail','],\x20getUser\x20rp\x20obj','],\x20getUser\x20entity'];(function(_0x29d915,_0x54a040){var _0x160f86=function(_0x237dfa){while(--_0x237dfa){_0x29d915['push'](_0x29d915['shift']());}};_0x160f86(++_0x54a040);}(_0x0328,0x172));var _0x8032=function(_0x41ca3c,_0x5bab71){_0x41ca3c=_0x41ca3c-0x0;var _0x2f36a6=_0x0328[_0x41ca3c];return _0x2f36a6;};'use strict';var _=require(_0x8032('0x0'));var Promise=require(_0x8032('0x1'));var rp=require(_0x8032('0x2'));var util=require(_0x8032('0x3'));var md5=require(_0x8032('0x4'));var Redis=require(_0x8032('0x5'));var intUtil=require(_0x8032('0x6'));var config=require('../../../../config/environment');var logger=require(_0x8032('0x7'))(_0x8032('0x8'));config[_0x8032('0x9')]=_['defaults'](config[_0x8032('0x9')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x8032('0x9')]));function getAdminUser(_0x1e7e46,_0x5951b1,_0x389071,_0x4e4d4e,_0x3e7e5b,_0x484b9e){return new Promise(function(_0x175df3,_0x5dbf0f){var _0x1253df={'method':_0x8032('0xa'),'uri':_0x4e4d4e+_0x8032('0xb')+'&'+_0x3e7e5b+'&'+_0x484b9e,'auth':_0x5951b1,'json':!![]};return rp(_0x1253df)['then'](function(_0x17ba16){if(_0x17ba16['result'][_0x8032('0xc')]>0x0){_0x389071[_0x8032('0xd')]=_0x17ba16[_0x8032('0xe')][0x0][_0x8032('0xf')];}logger[_0x8032('0x10')]('['+[_0x1e7e46[_0x8032('0x11')]()]+_0x8032('0x12'),_0x389071);_0x175df3(_0x389071);})[_0x8032('0x13')](function(_0x4ea3ed){logger['error']('['+[_0x1e7e46[_0x8032('0x11')]()]+']',_0x4ea3ed[_0x8032('0x14')]);_0x5dbf0f(_0x4ea3ed[_0x8032('0x14')]);});});}function getUser(_0x5b7ff9,_0x147a17,_0x14a9ba,_0x46c55f,_0xb239fe){return function(_0x28f3f2){logger[_0x8032('0x10')]('['+[_0x5b7ff9[_0x8032('0x11')]()]+_0x8032('0x15'),_0x28f3f2);return new Promise(function(_0x53cc86,_0x1fe483){if(intUtil['validateEmail'](_0x28f3f2['userEmail'])){var _0x337e73={'method':_0x8032('0xa'),'uri':_0x14a9ba+_0x8032('0x16')+_0x28f3f2[_0x8032('0x17')]+'&'+_0x46c55f+'&'+_0xb239fe,'auth':_0x147a17,'json':!![]};logger[_0x8032('0x10')]('['+[_0x5b7ff9[_0x8032('0x11')]()]+_0x8032('0x18'),_0x337e73);return rp(_0x337e73)['then'](function(_0x2869bb){logger[_0x8032('0x10')]('['+[_0x5b7ff9[_0x8032('0x11')]()]+_0x8032('0x19'),_0x2869bb);if(_0x2869bb['result'][_0x8032('0xc')]>0x0&&String(_0x2869bb['result'][0x0][_0x8032('0x1a')])===_0x8032('0x1b')){_0x28f3f2[_0x8032('0x1c')]=_0x2869bb[_0x8032('0xe')][0x0]['sys_id'];}else{_0x28f3f2[_0x8032('0x1c')]=_0x28f3f2[_0x8032('0xd')];_0x28f3f2[_0x8032('0x17')]=_0x28f3f2[_0x8032('0x1d')];}logger[_0x8032('0x10')]('['+[_0x5b7ff9[_0x8032('0x11')]()]+'],\x20getUser\x20crm',_0x28f3f2);_0x53cc86(_0x28f3f2);})[_0x8032('0x13')](function(_0x2051e7){logger[_0x8032('0x1e')]('['+[_0x5b7ff9[_0x8032('0x11')]()]+']',_0x2051e7[_0x8032('0x14')]);_0x1fe483(_0x2051e7[_0x8032('0x14')]);});}else{logger[_0x8032('0x10')]('['+[_0x5b7ff9[_0x8032('0x11')]()]+']\x20using\x20admin\x20profile');_0x28f3f2[_0x8032('0x1c')]=_0x28f3f2[_0x8032('0xd')];_0x28f3f2[_0x8032('0x17')]=_0x28f3f2[_0x8032('0x1d')];_0x53cc86(_0x28f3f2);}});};}function createEndUser(_0x4d7f5b,_0x15c0d1,_0x3e4e24,_0x4c91a1,_0x3113ae){logger[_0x8032('0x10')]('['+[_0x4d7f5b[_0x8032('0x11')]()]+'],\x20createEndUser\x20input\x20crm',_0x3e4e24);return new Promise(function(_0x2f32ea,_0x29554d){var _0x18dc49={'method':'POST','uri':_0x4c91a1+'sys_user?'+_0x3113ae,'body':{'user_name':_0x3e4e24[_0x8032('0x1f')],'roles':_0x8032('0x20'),'first_name':_0x3e4e24[_0x8032('0x1f')],'active':_0x8032('0x1b'),'date_format':'System','phone':_0x3e4e24[_0x8032('0x1f')]},'auth':_0x15c0d1,'json':!![]};return rp(_0x18dc49)[_0x8032('0x21')](function(_0x4a0a18){logger[_0x8032('0x10')]('['+[_0x4d7f5b[_0x8032('0x11')]()]+_0x8032('0x22'),_0x4a0a18['result']);_0x3e4e24[_0x8032('0x23')]=_0x4a0a18[_0x8032('0xe')][_0x8032('0xf')];_0x2f32ea(_0x3e4e24);})['catch'](function(_0x2536b3){logger[_0x8032('0x1e')]('['+[_0x4d7f5b[_0x8032('0x11')]()]+']',_0x2536b3['message']);_0x29554d(_0x2536b3[_0x8032('0x14')]);});});}function getEndUser(_0x215f44,_0x426e8a,_0x10a565,_0x50c058,_0x1fe6e8){return function(_0x57d8e8){logger['info']('['+[_0x215f44[_0x8032('0x11')]()]+'],\x20getEndUser\x20input\x20crm',_0x57d8e8);return new Promise(function(_0xe873fe,_0x2af0d9){var _0xcdb782={'method':_0x8032('0xa'),'uri':_0x10a565+_0x8032('0x24')+_0x57d8e8[_0x8032('0x1f')]+'&'+_0x50c058+'&'+_0x1fe6e8,'auth':_0x426e8a,'json':!![]};return rp(_0xcdb782)['then'](function(_0x5e5182){if(_0x5e5182['result']['length']>0x0){_0x57d8e8['endUserId']=_0x5e5182[_0x8032('0xe')][0x0]['sys_id'];logger['info']('['+[_0x215f44['toUpperCase']()]+_0x8032('0x25'),_0x57d8e8);_0xe873fe(_0x57d8e8);}else{return createEndUser(_0x215f44,_0x426e8a,_0x57d8e8,_0x10a565,_0x50c058)['then'](function(_0x3eb36a){logger['info']('['+[_0x215f44[_0x8032('0x11')]()]+_0x8032('0x26'),_0x3eb36a);_0xe873fe(_0x3eb36a);});}})[_0x8032('0x13')](function(_0x18b087){logger['error']('['+[_0x215f44[_0x8032('0x11')]()]+']',_0x18b087[_0x8032('0x14')]);_0x2af0d9(_0x18b087[_0x8032('0x14')]);});});};}function getCustomFields(_0x243199,_0x36dffa){var _0x5f2a7b={};if(_0x243199['length']>0x0){_[_0x8032('0x27')](_0x243199,function(_0x13ad4d){if(_0x13ad4d[_0x8032('0x28')]===_0x8032('0x29')&&_0x13ad4d['nameField']&&!_0x13ad4d['customField']){_0x5f2a7b[_0x13ad4d[_0x8032('0x2a')][_0x8032('0x2b')]()]=_0x13ad4d[_0x8032('0x2c')]['toString']();}else if(_0x13ad4d[_0x8032('0x28')]===_0x8032('0x29')&&_0x13ad4d[_0x8032('0x2a')]&&_0x13ad4d[_0x8032('0x2d')]){_0x5f2a7b[_0x13ad4d[_0x8032('0x2a')][_0x8032('0x2b')]()]=_0x13ad4d[_0x8032('0x2c')][_0x8032('0x2e')]();}else if(_0x13ad4d[_0x8032('0x28')]===_0x8032('0x2f')&&_0x13ad4d[_0x8032('0x30')]&&_0x13ad4d[_0x8032('0x2a')]&&_0x13ad4d[_0x8032('0x2d')]){_0x5f2a7b[_0x13ad4d[_0x8032('0x2a')]['toLowerCase']()]=_0x36dffa[_0x13ad4d[_0x8032('0x30')]][_0x8032('0x2e')]();}else if(_0x13ad4d['type']===_0x8032('0x31')&&_0x13ad4d['Variable']&&_0x13ad4d[_0x8032('0x32')][_0x8032('0x33')]&&_0x13ad4d[_0x8032('0x2a')]&&_0x13ad4d[_0x8032('0x2d')]){_0x5f2a7b[_0x13ad4d[_0x8032('0x2a')]['toLowerCase']()]=_0x36dffa[_0x13ad4d[_0x8032('0x32')][_0x8032('0x33')][_0x8032('0x2b')]()][_0x8032('0x2e')]();}});}return _0x5f2a7b;}function getTicket(_0xa68ea8,_0x1d30bf,_0x157b09,_0x1d82a8,_0x59897f,_0x467755){return function(_0x1a83c0){logger[_0x8032('0x10')]('['+[_0xa68ea8[_0x8032('0x11')]()]+']\x20getTicket\x20input\x20crm',_0x1a83c0);return new Promise(function(_0x4e806c,_0x1b114c){var _0x417899=_0xa68ea8[_0x8032('0x2b')]()===_0x8032('0x34')?_0x1a83c0[_0x8032('0x1c')]:_0x1a83c0[_0x8032('0x23')];var _0x27929f={'method':_0x8032('0x35'),'uri':_0x157b09+'incident'+'?'+_0x467755,'body':Object[_0x8032('0x36')]({},{'active':'true','caller_id':_0x417899,'assigned_to':_0x1a83c0['userId'],'short_description':intUtil[_0x8032('0x37')](_0x1d82a8[_0x8032('0x38')],_0x59897f,'\x20'),'description':intUtil[_0x8032('0x37')](_0x1d82a8[_0x8032('0x39')],_0x59897f,'\x0a')},getCustomFields(_0x1d82a8['Fields'],_0x59897f)),'auth':_0x1d30bf,'json':!![]};return rp(_0x27929f)[_0x8032('0x21')](function(_0x2f84ff){logger['info']('['+[_0xa68ea8[_0x8032('0x11')]()]+_0x8032('0x3a'),_0x2f84ff['result']);_0x1a83c0['ticketId']=_0x2f84ff['result'][_0x8032('0xf')];_0x1a83c0['ticketNumber']=_0x2f84ff[_0x8032('0xe')][_0x8032('0x3b')];logger[_0x8032('0x10')]('['+[_0xa68ea8[_0x8032('0x11')]()]+_0x8032('0x3c'),_0x1a83c0);_0x4e806c(_0x1a83c0);})['catch'](function(_0x421838){logger[_0x8032('0x1e')]('['+[_0xa68ea8[_0x8032('0x11')]()]+']',_0x421838[_0x8032('0x14')]);_0x1b114c(_0x421838[_0x8032('0x14')]);});});};}function createRemoteTag(_0x4adac3,_0x237af3,_0x4c99b7,_0x28d540){return new Promise(function(_0x48847b,_0x5bc0a6){var _0x16a74a={'method':_0x8032('0x35'),'uri':_0x4c99b7+_0x8032('0x3d')+'?'+_0x28d540,'body':{'short_description':_0x4adac3,'global':!![],'active':!![],'name':_0x4adac3},'auth':_0x237af3,'json':!![]};return rp(_0x16a74a)[_0x8032('0x21')](function(_0x1b37af){var _0x555e67=_0x1b37af['result'][_0x8032('0xf')];_0x48847b(_0x555e67);});});}function getRemoteTag(_0x2804ff,_0x1a20bf,_0x3603f7,_0x3d6f84,_0x5d161d){return new Promise(function(_0x230dfc,_0x375a2d){var _0x163389={'method':_0x8032('0xa'),'uri':_0x3603f7+_0x8032('0x3d')+_0x8032('0x3e')+_0x2804ff+'&'+_0x3d6f84,'auth':_0x1a20bf,'json':!![]};return rp(_0x163389)[_0x8032('0x21')](function(_0x2bf723){if(_0x2bf723[_0x8032('0xe')]['length']>0x0){var _0x6661b0=_0x2bf723[_0x8032('0xe')][0x0][_0x8032('0xf')];_0x230dfc(_0x6661b0);}else{return createRemoteTag(_0x2804ff,_0x1a20bf,_0x3603f7,_0x3d6f84)[_0x8032('0x21')](function(_0x2d8118){_0x230dfc(_0x2d8118);});}});});}function assignTagToIncident(_0x179bc3,_0x587867,_0x255c26,_0x587364,_0x30576d){return new Promise(function(_0x4e5bdd,_0x421921){var _0x5b8ea={'method':_0x8032('0x35'),'uri':_0x255c26+_0x8032('0x3f')+'?'+_0x30576d,'body':{'label':_0x179bc3,'table':_0x8032('0x40'),'id_type':'Incident','table_key':_0x587364['ticketId'],'title':_0x8032('0x41')+_0x587364[_0x8032('0x42')],'id_display':_0x587364[_0x8032('0x42')]},'auth':_0x587867,'json':!![]};return rp(_0x5b8ea)[_0x8032('0x21')](function(_0x2e9368){_0x4e5bdd();})[_0x8032('0x13')](function(){_0x4e5bdd();});});}function manageTags(_0x2b9f6b,_0x12d84f,_0x56d67e,_0x41c2ca,_0x9067c8,_0x4d8633,_0x27c8ac){return new Promise(function(_0x5f65c1,_0x195f08){var _0x2f6068=[];_0x12d84f[_0x8032('0x27')](function(_0x5c2a83){_0x2f6068[_0x8032('0x43')](getRemoteTag(_0x5c2a83,_0x56d67e,_0x41c2ca,_0x4d8633,_0x27c8ac));});return Promise[_0x8032('0x44')](_0x2f6068)['then'](function(_0xf16311){if(_0xf16311['length']){logger[_0x8032('0x10')]('['+[_0x2b9f6b[_0x8032('0x11')]()]+_0x8032('0x45'),_0xf16311);var _0x4b01c3=[];_0xf16311[_0x8032('0x27')](function(_0x1c863e){_0x4b01c3['push'](assignTagToIncident(_0x1c863e,_0x56d67e,_0x41c2ca,_0x9067c8,_0x4d8633));});return Promise[_0x8032('0x44')](_0x4b01c3)[_0x8032('0x21')](function(){_0x5f65c1();})[_0x8032('0x13')](function(){_0x5f65c1();});}else{_0x5f65c1();}});});}function getTags(_0x139644,_0x49057d,_0x1e9d93,_0xafbac,_0x2b35ab,_0x7b8ab3){return function(_0x15f660){return new Promise(function(_0x2f9693,_0x7a03b){var _0xfb2f2e=[];var _0x4515b4=_0xafbac[_0x8032('0x46')];if(_0x4515b4&&_0x4515b4['length']>0x0){_0xfb2f2e=_[_0x8032('0x47')](_0x4515b4,'name');}if(_0xfb2f2e['length']>0x0){return manageTags(_0x139644,_0xfb2f2e,_0x49057d,_0x1e9d93,_0x15f660,_0x2b35ab,_0x7b8ab3)[_0x8032('0x21')](function(){_0x2f9693(_0x15f660);});}else{_0x2f9693(_0x15f660);}});};}function emit(_0x38a3f5,_0x4150ae,_0x2a263b){var _0x4e1dc7=_0x8032('0x48')+'%26sysparm_record_row%3D1%26sysparm_record_rows%3D39'+_0x8032('0x49')+_0x8032('0x4a');var _0x4b7581={'uri':_0x38a3f5+'/nav_to.do?uri=incident.do?sys_id%3D'+_0x2a263b+_0x4e1dc7};io['to'](util[_0x8032('0x4b')](_0x8032('0x4c'),_0x4150ae))['emit'](_0x8032('0x4d'),_0x4b7581);}exports['cs']=function(_0x596476,_0x158a85,_0x52ccac,_0x1cb8f7,_0x48509b,_0x538e5d,_0x8c3957,_0x56b3a2){var _0x11e5f5={};var _0x28261c={'user':_0x538e5d[_0x8032('0x4e')],'pass':_0x538e5d[_0x8032('0x4f')]};var _0xbf08f0='sysparm_limit=1';var _0x263594=_0x8032('0x50');_0x538e5d[_0x8032('0x51')]=intUtil['stripTrailingSlash'](_0x538e5d[_0x8032('0x51')]);_0x538e5d[_0x8032('0x52')]=intUtil[_0x8032('0x53')](_0x538e5d['serverUrl']);var _0x17aef3=util[_0x8032('0x4b')]('%s/api/now/table/',_0x538e5d[_0x8032('0x51')]);_0x11e5f5[_0x8032('0x17')]=!_['isNil'](_0x1cb8f7)?_0x1cb8f7[_0x8032('0x54')]:null;_0x11e5f5[_0x8032('0x1d')]=_0x538e5d[_0x8032('0x54')];_0x11e5f5['endUserNumber']=_0x56b3a2['toLowerCase']()===_0x8032('0x34')?_0x158a85[_0x8032('0x55')]:_0x158a85['calleridnum'];_0x11e5f5[_0x8032('0x56')]=_0x56b3a2==='queue'||_0x56b3a2===_0x8032('0x57')?_0x8032('0x58'):_0x8032('0x34');var _0x5d1e2b=util['format'](_0x8032('0x59'),_0x538e5d[_0x8032('0x52')],_0x158a85[_0x8032('0x5a')],md5(_0x158a85['uniqueid']));if(_0x48509b&&_0x48509b['monitor_format']){logger['info']('[QUEUE]',_0x8032('0x5b'));_0x158a85[_0x8032('0x5c')]=_0x5d1e2b;}else if(_0x8c3957&&_0x8c3957['recordingFormat']&&_0x8c3957[_0x8032('0x5d')]!==_0x8032('0x5e')){logger[_0x8032('0x10')](_0x8032('0x5f'),_0x8032('0x5b'));_0x158a85[_0x8032('0x5c')]=_0x5d1e2b;}else{_0x158a85[_0x8032('0x5c')]='';}return getAdminUser(_0x56b3a2,_0x28261c,_0x11e5f5,_0x17aef3,_0x263594,_0xbf08f0)['then'](getUser(_0x56b3a2,_0x28261c,_0x17aef3,_0x263594,_0xbf08f0))[_0x8032('0x21')](getEndUser(_0x56b3a2,_0x28261c,_0x17aef3,_0x263594,_0xbf08f0))[_0x8032('0x21')](getTicket(_0x56b3a2,_0x28261c,_0x17aef3,_0x52ccac,_0x158a85,_0x263594))['then'](function(_0x23ec78){logger[_0x8032('0x10')](util[_0x8032('0x4b')](_0x8032('0x60'),_0x23ec78[_0x8032('0x61')]));logger[_0x8032('0x10')](util[_0x8032('0x4b')]('call\x20direction:\x20%s',_0x56b3a2));if(_0x56b3a2!==_0x8032('0x57')){logger['info']('['+[_0x56b3a2[_0x8032('0x11')]()]+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x538e5d['remoteUri'],_0x1cb8f7[_0x8032('0x33')],_0x23ec78[_0x8032('0x61')]);}})['catch'](function(_0x87e1fa){logger['error']('['+[_0x56b3a2[_0x8032('0x11')]()]+_0x8032('0x62'),util['inspect'](_0x87e1fa,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x503a=['servicenow','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','length','result','sys_id','],\x20getAdminUser\x20crm','catch','error','toUpperCase','message','info','],\x20getUser\x20input\x20crm','validateEmail','userEmail','],\x20getUser\x20rp\x20obj','then','],\x20getUser\x20entity','userId','adminId','adminEmail',']\x20using\x20admin\x20profile','],\x20createEndUser\x20input\x20crm','sys_user?','endUserNumber','user','true','System','],\x20EndUser\x20schema','endUserId','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','forEach','nameField','customField','idField','toLowerCase','content','toString','type','string','variable','variableName','customVariable','Variable','name','outbound','POST','incident','getString','Subjects','Descriptions','Fields','ticketNumber','number',']\x20getTicket\x20crm','label','?sysparm_query=name%3D','Incident','ticketId','Incident\x20-\x20','push',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','all','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','emit','username','sysparm_limit=1','stripTrailingSlash','serverUrl','remoteUri','isNil','email','destcalleridnum','calleridnum','callDirection','queue','uniqueid','monitor_format','[QUEUE]','recordingFormat','[OUTBOUND]','Recording\x20is\x20enabled!','recordingURL','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s','abandoned','Displaying\x20call\x20in\x20a\x20new\x20tab...','inspect','lodash','bluebird','util','ioredis','./util','../../../../config/environment','../../../../config/logger'];(function(_0x489b87,_0xd51c93){var _0x1823b6=function(_0x451c70){while(--_0x451c70){_0x489b87['push'](_0x489b87['shift']());}};_0x1823b6(++_0xd51c93);}(_0x503a,0x19d));var _0xa503=function(_0x118653,_0x50ef26){_0x118653=_0x118653-0x0;var _0xc11fa6=_0x503a[_0x118653];return _0xc11fa6;};'use strict';var _=require(_0xa503('0x0'));var Promise=require(_0xa503('0x1'));var rp=require('request-promise');var util=require(_0xa503('0x2'));var md5=require('md5');var Redis=require(_0xa503('0x3'));var intUtil=require(_0xa503('0x4'));var config=require(_0xa503('0x5'));var logger=require(_0xa503('0x6'))(_0xa503('0x7'));config['redis']=_['defaults'](config['redis'],{'host':_0xa503('0x8'),'port':0x18eb});var io=require(_0xa503('0x9'))(new Redis(config['redis']));function getAdminUser(_0x4428de,_0x18a066,_0x35cca2,_0x3c696b,_0x26ce16,_0x38bbff){return new Promise(function(_0xf6d07e,_0x5e7c0d){var _0x467e60={'method':_0xa503('0xa'),'uri':_0x3c696b+_0xa503('0xb')+'&'+_0x26ce16+'&'+_0x38bbff,'auth':_0x18a066,'json':!![]};return rp(_0x467e60)['then'](function(_0x18cf59){if(_0x18cf59['result'][_0xa503('0xc')]>0x0){_0x35cca2['adminId']=_0x18cf59[_0xa503('0xd')][0x0][_0xa503('0xe')];}logger['info']('['+[_0x4428de['toUpperCase']()]+_0xa503('0xf'),_0x35cca2);_0xf6d07e(_0x35cca2);})[_0xa503('0x10')](function(_0x3f4a7a){logger[_0xa503('0x11')]('['+[_0x4428de[_0xa503('0x12')]()]+']',_0x3f4a7a[_0xa503('0x13')]);_0x5e7c0d(_0x3f4a7a[_0xa503('0x13')]);});});}function getUser(_0x654334,_0x3ae1b0,_0x3e81b7,_0x3cbfb6,_0x36f98d){return function(_0x2af966){logger[_0xa503('0x14')]('['+[_0x654334['toUpperCase']()]+_0xa503('0x15'),_0x2af966);return new Promise(function(_0x2a9557,_0x23ecee){if(intUtil[_0xa503('0x16')](_0x2af966[_0xa503('0x17')])){var _0x5aae98={'method':_0xa503('0xa'),'uri':_0x3e81b7+'sys_user?sysparm_query=email%3D'+_0x2af966[_0xa503('0x17')]+'&'+_0x3cbfb6+'&'+_0x36f98d,'auth':_0x3ae1b0,'json':!![]};logger[_0xa503('0x14')]('['+[_0x654334[_0xa503('0x12')]()]+_0xa503('0x18'),_0x5aae98);return rp(_0x5aae98)[_0xa503('0x19')](function(_0x2d1d40){logger[_0xa503('0x14')]('['+[_0x654334[_0xa503('0x12')]()]+_0xa503('0x1a'),_0x2d1d40);if(_0x2d1d40[_0xa503('0xd')][_0xa503('0xc')]>0x0&&String(_0x2d1d40[_0xa503('0xd')][0x0]['active'])==='true'){_0x2af966[_0xa503('0x1b')]=_0x2d1d40[_0xa503('0xd')][0x0][_0xa503('0xe')];}else{_0x2af966[_0xa503('0x1b')]=_0x2af966[_0xa503('0x1c')];_0x2af966['userEmail']=_0x2af966[_0xa503('0x1d')];}logger[_0xa503('0x14')]('['+[_0x654334[_0xa503('0x12')]()]+'],\x20getUser\x20crm',_0x2af966);_0x2a9557(_0x2af966);})[_0xa503('0x10')](function(_0x22c7ec){logger['error']('['+[_0x654334[_0xa503('0x12')]()]+']',_0x22c7ec['message']);_0x23ecee(_0x22c7ec[_0xa503('0x13')]);});}else{logger[_0xa503('0x14')]('['+[_0x654334[_0xa503('0x12')]()]+_0xa503('0x1e'));_0x2af966['userId']=_0x2af966['adminId'];_0x2af966[_0xa503('0x17')]=_0x2af966[_0xa503('0x1d')];_0x2a9557(_0x2af966);}});};}function createEndUser(_0xe8e0bc,_0x1c2790,_0x37dee2,_0x404733,_0x57f92b){logger[_0xa503('0x14')]('['+[_0xe8e0bc[_0xa503('0x12')]()]+_0xa503('0x1f'),_0x37dee2);return new Promise(function(_0x36b7ae,_0x4fc65a){var _0x37aba7={'method':'POST','uri':_0x404733+_0xa503('0x20')+_0x57f92b,'body':{'user_name':_0x37dee2[_0xa503('0x21')],'roles':_0xa503('0x22'),'first_name':_0x37dee2[_0xa503('0x21')],'active':_0xa503('0x23'),'date_format':_0xa503('0x24'),'phone':_0x37dee2[_0xa503('0x21')]},'auth':_0x1c2790,'json':!![]};return rp(_0x37aba7)['then'](function(_0x365d55){logger[_0xa503('0x14')]('['+[_0xe8e0bc[_0xa503('0x12')]()]+_0xa503('0x25'),_0x365d55[_0xa503('0xd')]);_0x37dee2[_0xa503('0x26')]=_0x365d55[_0xa503('0xd')][_0xa503('0xe')];_0x36b7ae(_0x37dee2);})[_0xa503('0x10')](function(_0x4bb9b1){logger[_0xa503('0x11')]('['+[_0xe8e0bc['toUpperCase']()]+']',_0x4bb9b1['message']);_0x4fc65a(_0x4bb9b1[_0xa503('0x13')]);});});}function getEndUser(_0xb52b66,_0x207bcb,_0x42ebe4,_0x1026c2,_0x53bab6){return function(_0x1aba55){logger['info']('['+[_0xb52b66['toUpperCase']()]+_0xa503('0x27'),_0x1aba55);return new Promise(function(_0x36f091,_0x2019b9){var _0x354116={'method':_0xa503('0xa'),'uri':_0x42ebe4+_0xa503('0x28')+_0x1aba55[_0xa503('0x21')]+'&'+_0x1026c2+'&'+_0x53bab6,'auth':_0x207bcb,'json':!![]};return rp(_0x354116)[_0xa503('0x19')](function(_0x4eaf4c){if(_0x4eaf4c[_0xa503('0xd')][_0xa503('0xc')]>0x0){_0x1aba55[_0xa503('0x26')]=_0x4eaf4c[_0xa503('0xd')][0x0]['sys_id'];logger[_0xa503('0x14')]('['+[_0xb52b66[_0xa503('0x12')]()]+'],\x20getEndUser\x20crm',_0x1aba55);_0x36f091(_0x1aba55);}else{return createEndUser(_0xb52b66,_0x207bcb,_0x1aba55,_0x42ebe4,_0x1026c2)[_0xa503('0x19')](function(_0x587375){logger[_0xa503('0x14')]('['+[_0xb52b66[_0xa503('0x12')]()]+'],\x20createEndUser\x20crm',_0x587375);_0x36f091(_0x587375);});}})[_0xa503('0x10')](function(_0x38ae58){logger['error']('['+[_0xb52b66[_0xa503('0x12')]()]+']',_0x38ae58[_0xa503('0x13')]);_0x2019b9(_0x38ae58[_0xa503('0x13')]);});});};}function getCustomFields(_0x354394,_0x3e87ee){var _0x144877={};if(_0x354394[_0xa503('0xc')]>0x0){_[_0xa503('0x29')](_0x354394,function(_0xef12c1){if(_0xef12c1['type']==='string'&&_0xef12c1[_0xa503('0x2a')]&&!_0xef12c1[_0xa503('0x2b')]){_0x144877[_0xef12c1[_0xa503('0x2c')][_0xa503('0x2d')]()]=_0xef12c1[_0xa503('0x2e')][_0xa503('0x2f')]();}else if(_0xef12c1[_0xa503('0x30')]===_0xa503('0x31')&&_0xef12c1['idField']&&_0xef12c1[_0xa503('0x2b')]){_0x144877[_0xef12c1[_0xa503('0x2c')][_0xa503('0x2d')]()]=_0xef12c1['content'][_0xa503('0x2f')]();}else if(_0xef12c1[_0xa503('0x30')]===_0xa503('0x32')&&_0xef12c1['variableName']&&_0xef12c1[_0xa503('0x2c')]&&_0xef12c1[_0xa503('0x2b')]){_0x144877[_0xef12c1[_0xa503('0x2c')]['toLowerCase']()]=_0x3e87ee[_0xef12c1[_0xa503('0x33')]][_0xa503('0x2f')]();}else if(_0xef12c1[_0xa503('0x30')]===_0xa503('0x34')&&_0xef12c1[_0xa503('0x35')]&&_0xef12c1[_0xa503('0x35')]['name']&&_0xef12c1[_0xa503('0x2c')]&&_0xef12c1[_0xa503('0x2b')]){_0x144877[_0xef12c1[_0xa503('0x2c')]['toLowerCase']()]=_0x3e87ee[_0xef12c1[_0xa503('0x35')][_0xa503('0x36')][_0xa503('0x2d')]()][_0xa503('0x2f')]();}});}return _0x144877;}function getTicket(_0x3b7348,_0xe4be70,_0x168bcf,_0x22a37a,_0x57dcbb,_0x485005){return function(_0x4c8018){logger[_0xa503('0x14')]('['+[_0x3b7348['toUpperCase']()]+']\x20getTicket\x20input\x20crm',_0x4c8018);return new Promise(function(_0x441316,_0x4e2fa3){var _0x13772c=_0x3b7348[_0xa503('0x2d')]()===_0xa503('0x37')?_0x4c8018[_0xa503('0x1b')]:_0x4c8018[_0xa503('0x26')];var _0x3cbb45={'method':_0xa503('0x38'),'uri':_0x168bcf+_0xa503('0x39')+'?'+_0x485005,'body':Object['assign']({},{'active':_0xa503('0x23'),'caller_id':_0x13772c,'assigned_to':_0x4c8018[_0xa503('0x1b')],'short_description':intUtil[_0xa503('0x3a')](_0x22a37a[_0xa503('0x3b')],_0x57dcbb,'\x20'),'description':intUtil[_0xa503('0x3a')](_0x22a37a[_0xa503('0x3c')],_0x57dcbb,'\x0a')},getCustomFields(_0x22a37a[_0xa503('0x3d')],_0x57dcbb)),'auth':_0xe4be70,'json':!![]};return rp(_0x3cbb45)[_0xa503('0x19')](function(_0x29651c){logger['info']('['+[_0x3b7348[_0xa503('0x12')]()]+']\x20POST\x20incident\x20entity\x20schema',_0x29651c[_0xa503('0xd')]);_0x4c8018['ticketId']=_0x29651c[_0xa503('0xd')][_0xa503('0xe')];_0x4c8018[_0xa503('0x3e')]=_0x29651c[_0xa503('0xd')][_0xa503('0x3f')];logger[_0xa503('0x14')]('['+[_0x3b7348[_0xa503('0x12')]()]+_0xa503('0x40'),_0x4c8018);_0x441316(_0x4c8018);})[_0xa503('0x10')](function(_0x32fd71){logger['error']('['+[_0x3b7348[_0xa503('0x12')]()]+']',_0x32fd71[_0xa503('0x13')]);_0x4e2fa3(_0x32fd71[_0xa503('0x13')]);});});};}function createRemoteTag(_0x4e31f8,_0x4bbe99,_0x540c32,_0x4a430b){return new Promise(function(_0x300c7a,_0x4c7281){var _0x59460f={'method':_0xa503('0x38'),'uri':_0x540c32+'label'+'?'+_0x4a430b,'body':{'short_description':_0x4e31f8,'global':!![],'active':!![],'name':_0x4e31f8},'auth':_0x4bbe99,'json':!![]};return rp(_0x59460f)['then'](function(_0x5436de){var _0x203f35=_0x5436de[_0xa503('0xd')][_0xa503('0xe')];_0x300c7a(_0x203f35);});});}function getRemoteTag(_0x8a8b44,_0x540b27,_0x583122,_0x2a9ece,_0x514782){return new Promise(function(_0x45be02,_0x457545){var _0x4cf02c={'method':_0xa503('0xa'),'uri':_0x583122+_0xa503('0x41')+_0xa503('0x42')+_0x8a8b44+'&'+_0x2a9ece,'auth':_0x540b27,'json':!![]};return rp(_0x4cf02c)[_0xa503('0x19')](function(_0x4ecfd2){if(_0x4ecfd2[_0xa503('0xd')]['length']>0x0){var _0x163090=_0x4ecfd2[_0xa503('0xd')][0x0][_0xa503('0xe')];_0x45be02(_0x163090);}else{return createRemoteTag(_0x8a8b44,_0x540b27,_0x583122,_0x2a9ece)[_0xa503('0x19')](function(_0x345f78){_0x45be02(_0x345f78);});}});});}function assignTagToIncident(_0x240df6,_0x3cf32d,_0x184b0a,_0x3a5cb0,_0x45b2fe){return new Promise(function(_0x15fcef,_0x27784a){var _0x3a839d={'method':'POST','uri':_0x184b0a+'label_entry'+'?'+_0x45b2fe,'body':{'label':_0x240df6,'table':_0xa503('0x39'),'id_type':_0xa503('0x43'),'table_key':_0x3a5cb0[_0xa503('0x44')],'title':_0xa503('0x45')+_0x3a5cb0[_0xa503('0x3e')],'id_display':_0x3a5cb0[_0xa503('0x3e')]},'auth':_0x3cf32d,'json':!![]};return rp(_0x3a839d)[_0xa503('0x19')](function(_0x39ee8a){_0x15fcef();})[_0xa503('0x10')](function(){_0x15fcef();});});}function manageTags(_0x26b45a,_0x2e6727,_0xb3d7f2,_0x371ea4,_0x300e02,_0x243f6a,_0x5813f8){return new Promise(function(_0x50fc13,_0x14b341){var _0x537531=[];_0x2e6727[_0xa503('0x29')](function(_0x14938f){_0x537531[_0xa503('0x46')](getRemoteTag(_0x14938f,_0xb3d7f2,_0x371ea4,_0x243f6a,_0x5813f8));});return Promise['all'](_0x537531)['then'](function(_0x4ce70c){if(_0x4ce70c['length']){logger['info']('['+[_0x26b45a[_0xa503('0x12')]()]+_0xa503('0x47'),_0x4ce70c);var _0x15beac=[];_0x4ce70c[_0xa503('0x29')](function(_0x375cc4){_0x15beac['push'](assignTagToIncident(_0x375cc4,_0xb3d7f2,_0x371ea4,_0x300e02,_0x243f6a));});return Promise[_0xa503('0x48')](_0x15beac)[_0xa503('0x19')](function(){_0x50fc13();})[_0xa503('0x10')](function(){_0x50fc13();});}else{_0x50fc13();}});});}function getTags(_0xb7e2ef,_0x39441c,_0x2b3f4c,_0x3a8e14,_0x130539,_0x3098c1){return function(_0x291628){return new Promise(function(_0x18c3c0,_0x3d00d8){var _0x37b8c5=[];var _0x2c1b22=_0x3a8e14[_0xa503('0x49')];if(_0x2c1b22&&_0x2c1b22[_0xa503('0xc')]>0x0){_0x37b8c5=_[_0xa503('0x4a')](_0x2c1b22,_0xa503('0x36'));}if(_0x37b8c5['length']>0x0){return manageTags(_0xb7e2ef,_0x37b8c5,_0x39441c,_0x2b3f4c,_0x291628,_0x130539,_0x3098c1)[_0xa503('0x19')](function(){_0x18c3c0(_0x291628);});}else{_0x18c3c0(_0x291628);}});};}function emit(_0x33d0d1,_0x360603,_0x1f8f55){var _0x34ab96=_0xa503('0x4b')+_0xa503('0x4c')+_0xa503('0x4d')+_0xa503('0x4e');var _0x37a913={'uri':_0x33d0d1+_0xa503('0x4f')+_0x1f8f55+_0x34ab96};io['to'](util[_0xa503('0x50')]('user:%s',_0x360603))[_0xa503('0x51')]('trigger:browser:url',_0x37a913);}exports['cs']=function(_0x45b5f9,_0x2a0887,_0x13cc87,_0x2420b4,_0x113052,_0x1c77ed,_0x558592,_0x29cb78){var _0x399c21={};var _0x2d9bb6={'user':_0x1c77ed[_0xa503('0x52')],'pass':_0x1c77ed['password']};var _0x13e012=_0xa503('0x53');var _0x28864a='sysparm_display_value=true';_0x1c77ed['remoteUri']=intUtil[_0xa503('0x54')](_0x1c77ed['remoteUri']);_0x1c77ed[_0xa503('0x55')]=intUtil[_0xa503('0x54')](_0x1c77ed[_0xa503('0x55')]);var _0x54b922=util[_0xa503('0x50')]('%s/api/now/table/',_0x1c77ed[_0xa503('0x56')]);_0x399c21['userEmail']=!_[_0xa503('0x57')](_0x2420b4)?_0x2420b4[_0xa503('0x58')]:null;_0x399c21[_0xa503('0x1d')]=_0x1c77ed[_0xa503('0x58')];_0x399c21['endUserNumber']=_0x29cb78[_0xa503('0x2d')]()===_0xa503('0x37')?_0x2a0887[_0xa503('0x59')]:_0x2a0887[_0xa503('0x5a')];_0x399c21[_0xa503('0x5b')]=_0x29cb78==='queue'||_0x29cb78==='abandoned'?_0xa503('0x5c'):_0xa503('0x37');var _0x1bf855=util[_0xa503('0x50')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x1c77ed[_0xa503('0x55')],_0x2a0887[_0xa503('0x5d')],md5(_0x2a0887[_0xa503('0x5d')]));if(_0x113052&&_0x113052[_0xa503('0x5e')]){logger[_0xa503('0x14')](_0xa503('0x5f'),'Recording\x20is\x20enabled!');_0x2a0887['recordingURL']=_0x1bf855;}else if(_0x558592&&_0x558592[_0xa503('0x60')]&&_0x558592['recordingFormat']!=='none'){logger['info'](_0xa503('0x61'),_0xa503('0x62'));_0x2a0887[_0xa503('0x63')]=_0x1bf855;}else{_0x2a0887[_0xa503('0x63')]='';}return getAdminUser(_0x29cb78,_0x2d9bb6,_0x399c21,_0x54b922,_0x28864a,_0x13e012)[_0xa503('0x19')](getUser(_0x29cb78,_0x2d9bb6,_0x54b922,_0x28864a,_0x13e012))[_0xa503('0x19')](getEndUser(_0x29cb78,_0x2d9bb6,_0x54b922,_0x28864a,_0x13e012))[_0xa503('0x19')](getTicket(_0x29cb78,_0x2d9bb6,_0x54b922,_0x13cc87,_0x2a0887,_0x28864a))['then'](function(_0x286e40){logger[_0xa503('0x14')](util[_0xa503('0x50')](_0xa503('0x64'),_0x286e40[_0xa503('0x44')]));logger['info'](util[_0xa503('0x50')](_0xa503('0x65'),_0x29cb78));if(_0x29cb78!==_0xa503('0x66')){logger['info']('['+[_0x29cb78[_0xa503('0x12')]()]+']',_0xa503('0x67'));emit(_0x1c77ed['remoteUri'],_0x2420b4[_0xa503('0x36')],_0x286e40[_0xa503('0x44')]);}})[_0xa503('0x10')](function(_0x557e8b){logger[_0xa503('0x11')]('['+[_0x29cb78[_0xa503('0x12')]()]+']\x20Error\x20running\x20ServiceNow\x20integration',util[_0xa503('0x68')](_0x557e8b,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/sugarcrm.js b/server/services/ami/trigger/integration/sugarcrm.js
index 01a3a37..6298a3e 100644
--- a/server/services/ami/trigger/integration/sugarcrm.js
+++ b/server/services/ami/trigger/integration/sugarcrm.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd091=['%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','catch','error','recordingFormat','none','destcalleridname','Fields','Outbound','contacts','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','Inbound','lodash','request-promise','bluebird','md5','ioredis','../../../../config/logger','sugarcrm','redis','defaults','localhost','socket.io-emitter','POST','Creating\x20new\x20ticket...','name','getString','Subjects','assigned_user_id','description','Descriptions','date_start','toISOString','slice','duration_hours','duration_minutes','parent_id','parent_type','Contacts','direction','length','forEach','variableName','push','idField','set_entry','JSON','Calls','format','Basic\x20%s','apiKey','toString','base64','get_server_info','stringify','isNil','info','Getting\x20agent\x20with\x20name','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','user_name','then','entry_list','find','name_value_list','value','Agent\x20found!','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','user_id','get_entry_list','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','first_name','','Enduser\x20created.','debug','merge','map','string','nameField','toLowerCase','content','customField','type','custom_fields','customVariable','Variable','username','PLAIN','set_relationship','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','users','version','charAt'];(function(_0x3955f0,_0x1b7306){var _0x36d5f4=function(_0x3bac38){while(--_0x3bac38){_0x3955f0['push'](_0x3955f0['shift']());}};_0x36d5f4(++_0x1b7306);}(_0xd091,0x16c));var _0x1d09=function(_0x165924,_0x2ebad5){_0x165924=_0x165924-0x0;var _0x194a9a=_0xd091[_0x165924];return _0x194a9a;};'use strict';var _=require(_0x1d09('0x0'));var rp=require(_0x1d09('0x1'));var BPromise=require(_0x1d09('0x2'));var md5=require(_0x1d09('0x3'));var util=require('util');var Redis=require(_0x1d09('0x4'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x1d09('0x5'))(_0x1d09('0x6'));config[_0x1d09('0x7')]=_[_0x1d09('0x8')](config['redis'],{'host':_0x1d09('0x9'),'port':0x18eb});var io=require(_0x1d09('0xa'))(new Redis(config[_0x1d09('0x7')]));var def={'method':_0x1d09('0xb'),'json':!![]};function emit(_0x5a18e3,_0x2fbc34,_0x4b1510){io['to'](_0x5a18e3)['emit'](_0x2fbc34,_0x4b1510);}function getTicket(_0x4e7b88,_0x26143f,_0x16ac43,_0xe7aded,_0x3c17e9,_0x4cb339,_0xf5f70,_0x2520e5){logger['info'](_0x1d09('0xc'));var _0x11b349=new Date();var _0x28b77d=[{'name':_0x1d09('0xd'),'value':intUtil[_0x1d09('0xe')](_0xe7aded[_0x1d09('0xf')],_0x3c17e9,'\x20')},{'name':_0x1d09('0x10'),'value':_0x26143f['id']},{'name':'created_by','value':_0x26143f['id']},{'name':_0x1d09('0x11'),'value':intUtil[_0x1d09('0xe')](_0xe7aded[_0x1d09('0x12')],_0x3c17e9,'\x0a')},{'name':_0x1d09('0x13'),'value':_0x11b349[_0x1d09('0x14')]()[_0x1d09('0x15')](0x0,0x13)['replace']('T','\x20')},{'name':_0x1d09('0x16'),'value':'0'},{'name':_0x1d09('0x17'),'value':'15'},{'name':_0x1d09('0x18'),'value':_0x16ac43['id']},{'name':_0x1d09('0x19'),'value':_0x1d09('0x1a')},{'name':'parent_name','value':_0x16ac43[_0x1d09('0xd')]},{'name':_0x1d09('0x1b'),'value':_0x2520e5}];if(_0x4cb339[_0x1d09('0x1c')]){_[_0x1d09('0x1d')](_0x4cb339,function(_0x2d16f9){if(_0x3c17e9[_0x2d16f9[_0x1d09('0x1e')]]){_0x28b77d[_0x1d09('0x1f')]({'name':_0x2d16f9[_0x1d09('0x20')],'value':_0x3c17e9[_0x2d16f9[_0x1d09('0x1e')]]});}});}return request({'form':{'method':_0x1d09('0x21'),'input_type':_0x1d09('0x22'),'response_type':_0x1d09('0x22'),'rest_data':JSON['stringify']({'session':_0xf5f70['id'],'module_name':_0x1d09('0x23'),'name_value_list':_0x28b77d})}});}function getAuth(_0x2554dd){return util[_0x1d09('0x24')](_0x1d09('0x25'),new Buffer(_0x2554dd[_0x1d09('0x26')]+':X')[_0x1d09('0x27')](_0x1d09('0x28')));}function getServerInfo(_0x54676a){return request({'form':{'method':_0x1d09('0x29'),'input_type':'JSON','response_type':_0x1d09('0x22'),'rest_data':JSON[_0x1d09('0x2a')]({'session':_0x54676a['id']})}});}function getUser(_0x13c51d,_0x145d70,_0x1368ab){if(!_[_0x1d09('0x2b')](_0x145d70)){logger[_0x1d09('0x2c')](_0x1d09('0x2d'),_0x145d70);return request({'form':{'method':'get_entry_list','input_type':_0x1d09('0x22'),'response_type':_0x1d09('0x22'),'rest_data':JSON['stringify']({'session':_0x1368ab['id'],'module_name':_0x1d09('0x2e'),'query':util['format'](_0x1d09('0x2f'),_0x145d70),'order_by':'','offset':'0','select_fields':['id',_0x1d09('0xd'),_0x1d09('0x30')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x1d09('0x31')](function(_0x425376){if(_0x425376[_0x1d09('0x32')]['length']){var _0x1c31d2=_[_0x1d09('0x33')](_0x425376[_0x1d09('0x32')],function(_0x2ae5aa){return _0x2ae5aa[_0x1d09('0x34')][_0x1d09('0x30')][_0x1d09('0x35')]===_0x145d70;});if(_0x1c31d2){logger[_0x1d09('0x2c')](_0x1d09('0x36'));return BPromise[_0x1d09('0x37')]({'id':_0x1c31d2[_0x1d09('0x34')]['id'][_0x1d09('0x35')],'name':_0x1c31d2['name_value_list'][_0x1d09('0xd')][_0x1d09('0x35')]});}}logger['info'](_0x1d09('0x38'));return BPromise[_0x1d09('0x37')]({'id':_0x1368ab['name_value_list']['user_id'][_0x1d09('0x35')],'name':_0x1368ab['name_value_list'][_0x1d09('0x30')][_0x1d09('0x35')]});});}else{logger[_0x1d09('0x2c')](_0x1d09('0x39'));return BPromise[_0x1d09('0x37')]({'id':_0x1368ab[_0x1d09('0x34')][_0x1d09('0x3a')]['value'],'name':_0x1368ab[_0x1d09('0x34')][_0x1d09('0x30')][_0x1d09('0x35')]});}}function getEndUser(_0x41e162,_0x2420bf,_0x3a960c,_0x372f9d){logger[_0x1d09('0x2c')]('Searching\x20enduser\x20with\x20phone',_0x3a960c);return request({'form':{'method':_0x1d09('0x3b'),'input_type':_0x1d09('0x22'),'response_type':_0x1d09('0x22'),'rest_data':JSON['stringify']({'session':_0x372f9d['id'],'module_name':_0x1d09('0x1a'),'query':util[_0x1d09('0x24')](_0x1d09('0x3c'),_0x3a960c),'order_by':'','offset':'0','select_fields':['id',_0x1d09('0xd'),_0x1d09('0x3d')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x26761e){if(_0x26761e[_0x1d09('0x32')]['length']){var _0x1d0e83=_['find'](_0x26761e[_0x1d09('0x32')],function(_0x7d79fd){return _0x7d79fd[_0x1d09('0x34')][_0x1d09('0x3d')][_0x1d09('0x35')]===_0x3a960c;});if(_0x1d0e83){logger[_0x1d09('0x2c')](_0x1d09('0x3e'));return BPromise[_0x1d09('0x37')]({'id':_0x1d0e83[_0x1d09('0x34')]['id'][_0x1d09('0x35')],'name':_0x1d0e83['name_value_list'][_0x1d09('0xd')][_0x1d09('0x35')],'phone':_0x1d0e83['name_value_list'][_0x1d09('0x3d')][_0x1d09('0x35')]});}}else{logger[_0x1d09('0x2c')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'form':{'method':_0x1d09('0x21'),'input_type':_0x1d09('0x22'),'response_type':'JSON','rest_data':JSON['stringify']({'session':_0x372f9d['id'],'module_name':'Contacts','name_value_list':[{'name':_0x1d09('0x3f'),'value':_0x2420bf!==_0x1d09('0x40')?_0x2420bf:util[_0x1d09('0x24')]('Caller\x20-\x20%s',_0x3a960c)},{'name':_0x1d09('0x3d'),'value':_0x3a960c}]})}})[_0x1d09('0x31')](function(_0x2d32b2){logger[_0x1d09('0x2c')](_0x1d09('0x41'));return BPromise[_0x1d09('0x37')]({'id':_0x2d32b2['id'],'name':_0x2d32b2[_0x1d09('0x32')][_0x1d09('0x3f')][_0x1d09('0x35')],'phone':_0x2d32b2[_0x1d09('0x32')][_0x1d09('0x3d')][_0x1d09('0x35')]});});}});}function request(_0x562fd0){logger[_0x1d09('0x42')]('[HTTP]',JSON[_0x1d09('0x2a')](_0x562fd0));return rp(_[_0x1d09('0x43')](def,_0x562fd0));}function getTags(_0x5858ec,_0x326230){var _0x4d5e1e=[];if(_0x5858ec&&_0x5858ec[_0x1d09('0x1c')]>0x0){_0x4d5e1e=_[_0x1d09('0x44')](_0x5858ec,_0x326230);}return _0x4d5e1e;}function getCustomFields(_0x4b97db,_0x2a9ba7){var _0x591f0d=[];var _0x411056={'custom_fields':[]};if(_0x4b97db[_0x1d09('0x1c')]>0x0){_[_0x1d09('0x1d')](_0x4b97db,function(_0x322deb){if(_0x322deb['type']===_0x1d09('0x45')&&_0x322deb[_0x1d09('0x46')]&&!_0x322deb['customField']){_0x411056[_0x322deb[_0x1d09('0x46')][_0x1d09('0x47')]()]=_0x322deb[_0x1d09('0x48')][_0x1d09('0x27')]();}else if(_0x322deb['type']===_0x1d09('0x45')&&_0x322deb[_0x1d09('0x20')]&&_0x322deb[_0x1d09('0x49')]){_0x411056['custom_fields'][_0x1d09('0x1f')]({'id':_0x322deb[_0x1d09('0x20')],'value':_0x322deb[_0x1d09('0x48')][_0x1d09('0x27')]()});}else if(_0x322deb[_0x1d09('0x4a')]==='variable'&&_0x322deb[_0x1d09('0x1e')]&&_0x322deb[_0x1d09('0x20')]&&_0x322deb['customField']){_0x2a9ba7[_0x322deb['variableName']]&&_0x411056[_0x1d09('0x4b')][_0x1d09('0x1f')]({'id':_0x322deb[_0x1d09('0x20')],'value':_0x2a9ba7[_0x322deb[_0x1d09('0x1e')]][_0x1d09('0x27')]()});}else if(_0x322deb[_0x1d09('0x4a')]===_0x1d09('0x4c')&&_0x322deb[_0x1d09('0x4d')]&&_0x322deb['Variable'][_0x1d09('0xd')]&&_0x322deb['idField']&&_0x322deb[_0x1d09('0x49')]){_0x2a9ba7[_0x322deb['Variable'][_0x1d09('0xd')]['toLowerCase']()]&&_0x411056[_0x1d09('0x4b')]['push']({'id':_0x322deb['idField'],'value':_0x2a9ba7[_0x322deb[_0x1d09('0x4d')][_0x1d09('0xd')][_0x1d09('0x47')]()][_0x1d09('0x27')]()});}});}return _0x411056;}function getConnection(_0x208fa5){return request({'method':'POST','form':{'method':'login','input_type':_0x1d09('0x22'),'response_type':'JSON','rest_data':JSON[_0x1d09('0x2a')]({'user_auth':{'user_name':_0x208fa5[_0x1d09('0x4e')],'password':_0x208fa5['password'],'encryption':_0x1d09('0x4f')},'application':'xCALLY\x20Motion\x20integration'})}})[_0x1d09('0x31')](function(_0x546763){var _0x35c30c=_0x546763;if(_0x35c30c['id']){def['sessionID']=_0x35c30c['id'];return BPromise[_0x1d09('0x37')](_0x35c30c);}else{throw new Error(util[_0x1d09('0x24')]('Account\x20%d\x20is\x20not\x20valid',_0x208fa5['id']));}});}function setRelationship(_0x592493,_0x1a03b5,_0x12cf3c,_0x139d13){return request({'form':{'method':_0x1d09('0x50'),'input_type':_0x1d09('0x22'),'response_type':_0x1d09('0x22'),'rest_data':JSON[_0x1d09('0x2a')]({'session':_0x592493['id'],'module_name':_0x1d09('0x23'),'module_id':_0x12cf3c['id'],'link_field_name':_0x139d13,'related_ids':[_0x1a03b5['id']]})}});}exports['queue']=function(_0x43746f,_0x3ab849,_0xb1ab71,_0x405e48,_0x331c03,_0x39bd69){var _0x525781,_0xf35b2a,_0x1ae991,_0x1e2051;_0x39bd69[_0x1d09('0x51')]=intUtil[_0x1d09('0x52')](_0x39bd69['remoteUri']);_0x39bd69[_0x1d09('0x53')]=intUtil['stripTrailingSlash'](_0x39bd69[_0x1d09('0x53')]);def[_0x1d09('0x54')]=util[_0x1d09('0x24')](_0x1d09('0x55'),_0x39bd69[_0x1d09('0x51')]);if(_0x331c03&&_0x331c03[_0x1d09('0x56')]){logger[_0x1d09('0x2c')](_0x1d09('0x57'),_0x1d09('0x58'));_0x3ab849[_0x1d09('0x59')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x39bd69[_0x1d09('0x53')],_0x3ab849[_0x1d09('0x5a')],md5(_0x3ab849[_0x1d09('0x5a')]));}else{_0x3ab849[_0x1d09('0x59')]='';}return getConnection(_0x39bd69)['then'](function(_0x1fb3ef){_0x1e2051=_0x1fb3ef;return getUser(_0x39bd69,_0x405e48[_0x1d09('0xd')],_0x1e2051);})[_0x1d09('0x31')](function(_0x333b30){_0x525781=_0x333b30;logger[_0x1d09('0x2c')](_0x1d09('0x5b'),_0x525781['id']);return getEndUser(_0x39bd69,_0x3ab849[_0x1d09('0x5c')],_0x3ab849[_0x1d09('0x5d')],_0x1e2051);})[_0x1d09('0x31')](function(_0x345fba){_0xf35b2a=_0x345fba;logger[_0x1d09('0x2c')](_0x1d09('0x5e'),_0xf35b2a['id']);return getTicket(_0x39bd69,_0x525781,_0xf35b2a,_0xb1ab71,_0x3ab849,_0xb1ab71['Fields'],_0x1e2051,'Inbound');})['then'](function(_0x3d9610){_0x1ae991=_0x3d9610;logger[_0x1d09('0x2c')](_0x1d09('0x5f'));logger['info'](_0x1d09('0x60'),_0x1ae991['id']);return setRelationship(_0x1e2051,_0x525781,_0x1ae991,_0x1d09('0x61'));})[_0x1d09('0x31')](function(){return setRelationship(_0x1e2051,_0xf35b2a,_0x1ae991,'contacts');})[_0x1d09('0x31')](function(){return getServerInfo(_0x1e2051);})[_0x1d09('0x31')](function(_0x5217c3){var _0x209e1f=parseInt(_0x5217c3[_0x1d09('0x62')][_0x1d09('0x63')](0x0));var _0x34a354=util[_0x1d09('0x24')](_0x1d09('0x64'),_0x39bd69[_0x1d09('0x51')],_0x1ae991['id']);if(_0x209e1f>0x6){_0x34a354=util[_0x1d09('0x24')]('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x39bd69[_0x1d09('0x51')],_0x1ae991['id']);}logger['info'](_0x1d09('0x57'),_0x1d09('0x65'));emit(util[_0x1d09('0x24')](_0x1d09('0x66'),_0x405e48[_0x1d09('0xd')]),_0x1d09('0x67'),{'uri':_0x34a354});})[_0x1d09('0x68')](function(_0x232219){logger[_0x1d09('0x69')](_0x1d09('0x57'),JSON[_0x1d09('0x2a')](_0x232219));});};exports['outbound']=function(_0xe897f,_0x195971,_0x2af26a,_0x3aebb9,_0x3b3180,_0x13d849,_0x155949){var _0x1b8fee,_0x79f8ae,_0x4ad541,_0x202762;_0x13d849[_0x1d09('0x51')]=intUtil['stripTrailingSlash'](_0x13d849[_0x1d09('0x51')]);_0x13d849[_0x1d09('0x53')]=intUtil[_0x1d09('0x52')](_0x13d849[_0x1d09('0x53')]);def[_0x1d09('0x54')]=util[_0x1d09('0x24')](_0x1d09('0x55'),_0x13d849[_0x1d09('0x51')]);if(_0x155949&&_0x155949[_0x1d09('0x6a')]&&_0x155949[_0x1d09('0x6a')]!==_0x1d09('0x6b')){logger[_0x1d09('0x2c')]('[OUTBOUND]',_0x1d09('0x58'));_0x195971['recordingURL']=util[_0x1d09('0x24')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x13d849[_0x1d09('0x53')],_0x195971[_0x1d09('0x5a')],md5(_0x195971[_0x1d09('0x5a')]));}return getConnection(_0x13d849)[_0x1d09('0x31')](function(_0x4b5264){_0x202762=_0x4b5264;return getUser(_0x13d849,_0x3aebb9['name'],_0x202762);})['then'](function(_0x1d0960){_0x1b8fee=_0x1d0960;logger[_0x1d09('0x2c')](_0x1d09('0x5b'),_0x1b8fee['id']);return getEndUser(_0x13d849,_0x195971[_0x1d09('0x6c')],_0x195971['destcalleridnum'],_0x202762);})[_0x1d09('0x31')](function(_0x4fbceb){_0x79f8ae=_0x4fbceb;logger['info'](_0x1d09('0x5e'),_0x79f8ae['id']);return getTicket(_0x13d849,_0x1b8fee,_0x79f8ae,_0x2af26a,_0x195971,_0x2af26a[_0x1d09('0x6d')],_0x202762,_0x1d09('0x6e'));})[_0x1d09('0x31')](function(_0x4dd0e9){_0x4ad541=_0x4dd0e9;logger['info'](_0x1d09('0x5f'));logger[_0x1d09('0x2c')](_0x1d09('0x60'),_0x4ad541['id']);return setRelationship(_0x202762,_0x1b8fee,_0x4ad541,_0x1d09('0x61'));})[_0x1d09('0x31')](function(){return setRelationship(_0x202762,_0x79f8ae,_0x4ad541,_0x1d09('0x6f'));})['then'](function(){return getServerInfo(_0x202762);})[_0x1d09('0x31')](function(_0x5ce35e){var _0x17e329=parseInt(_0x5ce35e[_0x1d09('0x62')][_0x1d09('0x63')](0x0));var _0x42fab6=util[_0x1d09('0x24')](_0x1d09('0x64'),_0x13d849[_0x1d09('0x51')],_0x4ad541['id']);if(_0x17e329>0x6){_0x42fab6=util[_0x1d09('0x24')](_0x1d09('0x70'),_0x13d849[_0x1d09('0x51')],_0x4ad541['id']);}logger[_0x1d09('0x2c')](_0x1d09('0x71'),_0x1d09('0x65'));emit(util[_0x1d09('0x24')](_0x1d09('0x66'),_0x3aebb9[_0x1d09('0xd')]),_0x1d09('0x67'),{'uri':_0x42fab6});})['catch'](function(_0x5fc211){logger['error'](_0x1d09('0x71'),JSON[_0x1d09('0x2a')](_0x5fc211));});};exports['abandoned']=function(_0x379be7,_0x2ff0e6,_0x1dc268,_0x271150,_0x6022a9,_0x57e772){var _0x5851e3,_0xe05dde,_0x2a9d21,_0x5666ab;_0x57e772[_0x1d09('0x51')]=intUtil['stripTrailingSlash'](_0x57e772[_0x1d09('0x51')]);_0x57e772[_0x1d09('0x53')]=intUtil[_0x1d09('0x52')](_0x57e772[_0x1d09('0x53')]);def[_0x1d09('0x54')]=util['format'](_0x1d09('0x55'),_0x57e772[_0x1d09('0x51')]);if(_0x6022a9&&_0x6022a9['monitor_format']){logger['info']('[ABANDONED]',_0x1d09('0x58'));_0x2ff0e6[_0x1d09('0x59')]=util[_0x1d09('0x24')](_0x1d09('0x72'),_0x57e772[_0x1d09('0x53')],_0x2ff0e6['uniqueid'],md5(_0x2ff0e6[_0x1d09('0x5a')]));}else{_0x2ff0e6[_0x1d09('0x59')]='';}return getConnection(_0x57e772)[_0x1d09('0x31')](function(_0x1c6b91){_0x5666ab=_0x1c6b91;if(!_['isNil'](_0x271150)){return getUser(_0x57e772,_0x271150[_0x1d09('0xd')],_0x5666ab);}else{return getUser(_0x57e772,null,_0x5666ab);}})[_0x1d09('0x31')](function(_0x3387a5){_0x5851e3=_0x3387a5;logger[_0x1d09('0x2c')]('The\x20User\x20ID\x20is:',_0x5851e3['id']);return getEndUser(_0x57e772,_0x2ff0e6[_0x1d09('0x5c')],_0x2ff0e6['calleridnum'],_0x5666ab);})['then'](function(_0x5341e1){_0xe05dde=_0x5341e1;logger[_0x1d09('0x2c')](_0x1d09('0x5e'),_0xe05dde['id']);return getTicket(_0x57e772,_0x5851e3,_0xe05dde,_0x1dc268,_0x2ff0e6,_0x1dc268[_0x1d09('0x6d')],_0x5666ab,_0x1d09('0x73'));})[_0x1d09('0x31')](function(_0x551ba1){_0x2a9d21=_0x551ba1;logger[_0x1d09('0x2c')](_0x1d09('0x5f'));logger[_0x1d09('0x2c')](_0x1d09('0x60'),_0x2a9d21['id']);return setRelationship(_0x5666ab,_0x5851e3,_0x2a9d21,'users');})[_0x1d09('0x31')](function(){return setRelationship(_0x5666ab,_0xe05dde,_0x2a9d21,_0x1d09('0x6f'));})[_0x1d09('0x31')](function(){return getServerInfo(_0x5666ab);})['catch'](function(_0x5a244e){logger[_0x1d09('0x69')]('[ABANDONED]',JSON[_0x1d09('0x2a')](_0x5a244e));});};
\ No newline at end of file
+var _0xbf30=['socket.io-emitter','emit','info','Creating\x20new\x20ticket...','name','getString','assigned_user_id','created_by','description','Descriptions','date_start','toISOString','slice','replace','duration_hours','duration_minutes','parent_id','parent_type','direction','length','forEach','variableName','push','idField','JSON','Calls','format','Basic\x20%s','apiKey','toString','base64','get_server_info','stringify','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','user_name','then','entry_list','name_value_list','value','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','resolve','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','Contacts','find','Enduser\x20found!','phone_home','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','set_entry','first_name','Caller\x20-\x20%s','Enduser\x20created.','debug','[HTTP]','merge','map','string','nameField','customField','toLowerCase','content','type','custom_fields','variable','customVariable','Variable','POST','username','PLAIN','xCALLY\x20Motion\x20integration','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','queue','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Inbound','The\x20Ticket\x20ID\x20is:','users','contacts','version','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','user:%s','trigger:browser:url','catch','error','recordingFormat','none','[OUTBOUND]','recordingURL','uniqueid','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','Fields','Outbound','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','abandoned','monitor_format','isNil','lodash','request-promise','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','sugarcrm','redis'];(function(_0x38db88,_0xb296c5){var _0x31c018=function(_0x5c1fed){while(--_0x5c1fed){_0x38db88['push'](_0x38db88['shift']());}};_0x31c018(++_0xb296c5);}(_0xbf30,0x1e2));var _0x0bf3=function(_0x476b2a,_0x3b1641){_0x476b2a=_0x476b2a-0x0;var _0x2e0ee3=_0xbf30[_0x476b2a];return _0x2e0ee3;};'use strict';var _=require(_0x0bf3('0x0'));var rp=require(_0x0bf3('0x1'));var BPromise=require('bluebird');var md5=require(_0x0bf3('0x2'));var util=require(_0x0bf3('0x3'));var Redis=require(_0x0bf3('0x4'));var intUtil=require(_0x0bf3('0x5'));var config=require(_0x0bf3('0x6'));var logger=require(_0x0bf3('0x7'))(_0x0bf3('0x8'));config[_0x0bf3('0x9')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x0bf3('0xa'))(new Redis(config[_0x0bf3('0x9')]));var def={'method':'POST','json':!![]};function emit(_0x29f911,_0x2c8d8b,_0x57887a){io['to'](_0x29f911)[_0x0bf3('0xb')](_0x2c8d8b,_0x57887a);}function getTicket(_0x27c8b0,_0xb219c8,_0x35e5ba,_0x4edd68,_0x4c223b,_0x310e47,_0x3bd659,_0x43e24f){logger[_0x0bf3('0xc')](_0x0bf3('0xd'));var _0x4a112c=new Date();var _0xfce39f=[{'name':_0x0bf3('0xe'),'value':intUtil[_0x0bf3('0xf')](_0x4edd68['Subjects'],_0x4c223b,'\x20')},{'name':_0x0bf3('0x10'),'value':_0xb219c8['id']},{'name':_0x0bf3('0x11'),'value':_0xb219c8['id']},{'name':_0x0bf3('0x12'),'value':intUtil[_0x0bf3('0xf')](_0x4edd68[_0x0bf3('0x13')],_0x4c223b,'\x0a')},{'name':_0x0bf3('0x14'),'value':_0x4a112c[_0x0bf3('0x15')]()[_0x0bf3('0x16')](0x0,0x13)[_0x0bf3('0x17')]('T','\x20')},{'name':_0x0bf3('0x18'),'value':'0'},{'name':_0x0bf3('0x19'),'value':'15'},{'name':_0x0bf3('0x1a'),'value':_0x35e5ba['id']},{'name':_0x0bf3('0x1b'),'value':'Contacts'},{'name':'parent_name','value':_0x35e5ba[_0x0bf3('0xe')]},{'name':_0x0bf3('0x1c'),'value':_0x43e24f}];if(_0x310e47[_0x0bf3('0x1d')]){_[_0x0bf3('0x1e')](_0x310e47,function(_0x2682d8){if(_0x4c223b[_0x2682d8[_0x0bf3('0x1f')]]){_0xfce39f[_0x0bf3('0x20')]({'name':_0x2682d8[_0x0bf3('0x21')],'value':_0x4c223b[_0x2682d8[_0x0bf3('0x1f')]]});}});}return request({'form':{'method':'set_entry','input_type':_0x0bf3('0x22'),'response_type':_0x0bf3('0x22'),'rest_data':JSON['stringify']({'session':_0x3bd659['id'],'module_name':_0x0bf3('0x23'),'name_value_list':_0xfce39f})}});}function getAuth(_0x36c2ab){return util[_0x0bf3('0x24')](_0x0bf3('0x25'),new Buffer(_0x36c2ab[_0x0bf3('0x26')]+':X')[_0x0bf3('0x27')](_0x0bf3('0x28')));}function getServerInfo(_0x553fc3){return request({'form':{'method':_0x0bf3('0x29'),'input_type':_0x0bf3('0x22'),'response_type':'JSON','rest_data':JSON[_0x0bf3('0x2a')]({'session':_0x553fc3['id']})}});}function getUser(_0x48f1b8,_0x41e572,_0x352064){if(!_['isNil'](_0x41e572)){logger[_0x0bf3('0xc')]('Getting\x20agent\x20with\x20name',_0x41e572);return request({'form':{'method':'get_entry_list','input_type':_0x0bf3('0x22'),'response_type':_0x0bf3('0x22'),'rest_data':JSON['stringify']({'session':_0x352064['id'],'module_name':'Employees','query':util[_0x0bf3('0x24')](_0x0bf3('0x2b'),_0x41e572),'order_by':'','offset':'0','select_fields':['id',_0x0bf3('0xe'),_0x0bf3('0x2c')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x0bf3('0x2d')](function(_0x278e9f){if(_0x278e9f[_0x0bf3('0x2e')][_0x0bf3('0x1d')]){var _0x49eac0=_['find'](_0x278e9f['entry_list'],function(_0x507d03){return _0x507d03[_0x0bf3('0x2f')]['user_name'][_0x0bf3('0x30')]===_0x41e572;});if(_0x49eac0){logger[_0x0bf3('0xc')](_0x0bf3('0x31'));return BPromise['resolve']({'id':_0x49eac0[_0x0bf3('0x2f')]['id']['value'],'name':_0x49eac0[_0x0bf3('0x2f')][_0x0bf3('0xe')]['value']});}}logger[_0x0bf3('0xc')](_0x0bf3('0x32'));return BPromise[_0x0bf3('0x33')]({'id':_0x352064[_0x0bf3('0x2f')][_0x0bf3('0x34')][_0x0bf3('0x30')],'name':_0x352064[_0x0bf3('0x2f')]['user_name'][_0x0bf3('0x30')]});});}else{logger[_0x0bf3('0xc')](_0x0bf3('0x35'));return BPromise['resolve']({'id':_0x352064[_0x0bf3('0x2f')][_0x0bf3('0x34')][_0x0bf3('0x30')],'name':_0x352064[_0x0bf3('0x2f')][_0x0bf3('0x2c')][_0x0bf3('0x30')]});}}function getEndUser(_0x1ac351,_0x2374cb,_0x4f0d65,_0x1c4225){logger[_0x0bf3('0xc')](_0x0bf3('0x36'),_0x4f0d65);return request({'form':{'method':'get_entry_list','input_type':_0x0bf3('0x22'),'response_type':'JSON','rest_data':JSON[_0x0bf3('0x2a')]({'session':_0x1c4225['id'],'module_name':_0x0bf3('0x37'),'query':util[_0x0bf3('0x24')]('contacts.phone_home\x20=\x20\x22%s\x22',_0x4f0d65),'order_by':'','offset':'0','select_fields':['id',_0x0bf3('0xe'),'phone_home'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x18ff35){if(_0x18ff35[_0x0bf3('0x2e')]['length']){var _0x15def6=_[_0x0bf3('0x38')](_0x18ff35[_0x0bf3('0x2e')],function(_0x5492fd){return _0x5492fd['name_value_list']['phone_home']['value']===_0x4f0d65;});if(_0x15def6){logger['info'](_0x0bf3('0x39'));return BPromise[_0x0bf3('0x33')]({'id':_0x15def6['name_value_list']['id'][_0x0bf3('0x30')],'name':_0x15def6[_0x0bf3('0x2f')][_0x0bf3('0xe')][_0x0bf3('0x30')],'phone':_0x15def6[_0x0bf3('0x2f')][_0x0bf3('0x3a')]['value']});}}else{logger[_0x0bf3('0xc')](_0x0bf3('0x3b'));return request({'form':{'method':_0x0bf3('0x3c'),'input_type':_0x0bf3('0x22'),'response_type':_0x0bf3('0x22'),'rest_data':JSON[_0x0bf3('0x2a')]({'session':_0x1c4225['id'],'module_name':_0x0bf3('0x37'),'name_value_list':[{'name':_0x0bf3('0x3d'),'value':_0x2374cb!==''?_0x2374cb:util['format'](_0x0bf3('0x3e'),_0x4f0d65)},{'name':_0x0bf3('0x3a'),'value':_0x4f0d65}]})}})[_0x0bf3('0x2d')](function(_0x475d8c){logger['info'](_0x0bf3('0x3f'));return BPromise['resolve']({'id':_0x475d8c['id'],'name':_0x475d8c[_0x0bf3('0x2e')][_0x0bf3('0x3d')][_0x0bf3('0x30')],'phone':_0x475d8c['entry_list'][_0x0bf3('0x3a')]['value']});});}});}function request(_0x4f4553){logger[_0x0bf3('0x40')](_0x0bf3('0x41'),JSON[_0x0bf3('0x2a')](_0x4f4553));return rp(_[_0x0bf3('0x42')](def,_0x4f4553));}function getTags(_0x43fa51,_0xd20c25){var _0x3c3870=[];if(_0x43fa51&&_0x43fa51[_0x0bf3('0x1d')]>0x0){_0x3c3870=_[_0x0bf3('0x43')](_0x43fa51,_0xd20c25);}return _0x3c3870;}function getCustomFields(_0xa3e80a,_0x81bd04){var _0x15edd6=[];var _0x34ad8f={'custom_fields':[]};if(_0xa3e80a['length']>0x0){_['forEach'](_0xa3e80a,function(_0xbd8290){if(_0xbd8290['type']===_0x0bf3('0x44')&&_0xbd8290[_0x0bf3('0x45')]&&!_0xbd8290[_0x0bf3('0x46')]){_0x34ad8f[_0xbd8290[_0x0bf3('0x45')][_0x0bf3('0x47')]()]=_0xbd8290[_0x0bf3('0x48')][_0x0bf3('0x27')]();}else if(_0xbd8290[_0x0bf3('0x49')]==='string'&&_0xbd8290[_0x0bf3('0x21')]&&_0xbd8290[_0x0bf3('0x46')]){_0x34ad8f[_0x0bf3('0x4a')][_0x0bf3('0x20')]({'id':_0xbd8290[_0x0bf3('0x21')],'value':_0xbd8290[_0x0bf3('0x48')][_0x0bf3('0x27')]()});}else if(_0xbd8290['type']===_0x0bf3('0x4b')&&_0xbd8290[_0x0bf3('0x1f')]&&_0xbd8290['idField']&&_0xbd8290['customField']){_0x81bd04[_0xbd8290[_0x0bf3('0x1f')]]&&_0x34ad8f[_0x0bf3('0x4a')]['push']({'id':_0xbd8290['idField'],'value':_0x81bd04[_0xbd8290['variableName']][_0x0bf3('0x27')]()});}else if(_0xbd8290['type']===_0x0bf3('0x4c')&&_0xbd8290['Variable']&&_0xbd8290[_0x0bf3('0x4d')][_0x0bf3('0xe')]&&_0xbd8290[_0x0bf3('0x21')]&&_0xbd8290[_0x0bf3('0x46')]){_0x81bd04[_0xbd8290[_0x0bf3('0x4d')]['name'][_0x0bf3('0x47')]()]&&_0x34ad8f[_0x0bf3('0x4a')][_0x0bf3('0x20')]({'id':_0xbd8290['idField'],'value':_0x81bd04[_0xbd8290[_0x0bf3('0x4d')][_0x0bf3('0xe')][_0x0bf3('0x47')]()][_0x0bf3('0x27')]()});}});}return _0x34ad8f;}function getConnection(_0x41d641){return request({'method':_0x0bf3('0x4e'),'form':{'method':'login','input_type':_0x0bf3('0x22'),'response_type':_0x0bf3('0x22'),'rest_data':JSON['stringify']({'user_auth':{'user_name':_0x41d641[_0x0bf3('0x4f')],'password':_0x41d641['password'],'encryption':_0x0bf3('0x50')},'application':_0x0bf3('0x51')})}})['then'](function(_0x4a47b7){var _0x501487=_0x4a47b7;if(_0x501487['id']){def[_0x0bf3('0x52')]=_0x501487['id'];return BPromise[_0x0bf3('0x33')](_0x501487);}else{throw new Error(util['format'](_0x0bf3('0x53'),_0x41d641['id']));}});}function setRelationship(_0x337dc6,_0x47aba4,_0x4e179e,_0x24aedb){return request({'form':{'method':_0x0bf3('0x54'),'input_type':_0x0bf3('0x22'),'response_type':_0x0bf3('0x22'),'rest_data':JSON[_0x0bf3('0x2a')]({'session':_0x337dc6['id'],'module_name':_0x0bf3('0x23'),'module_id':_0x4e179e['id'],'link_field_name':_0x24aedb,'related_ids':[_0x47aba4['id']]})}});}exports[_0x0bf3('0x55')]=function(_0xd797da,_0x41e6bf,_0x417cc2,_0x5a11ee,_0x5c8e7f,_0x458b27){var _0x37721f,_0x26257e,_0x552f77,_0x168587;_0x458b27[_0x0bf3('0x56')]=intUtil[_0x0bf3('0x57')](_0x458b27['remoteUri']);_0x458b27[_0x0bf3('0x58')]=intUtil[_0x0bf3('0x57')](_0x458b27[_0x0bf3('0x58')]);def[_0x0bf3('0x59')]=util[_0x0bf3('0x24')](_0x0bf3('0x5a'),_0x458b27[_0x0bf3('0x56')]);if(_0x5c8e7f&&_0x5c8e7f['monitor_format']){logger[_0x0bf3('0xc')](_0x0bf3('0x5b'),_0x0bf3('0x5c'));_0x41e6bf['recordingURL']=util[_0x0bf3('0x24')](_0x0bf3('0x5d'),_0x458b27[_0x0bf3('0x58')],_0x41e6bf['uniqueid'],md5(_0x41e6bf['uniqueid']));}else{_0x41e6bf['recordingURL']='';}return getConnection(_0x458b27)[_0x0bf3('0x2d')](function(_0x47e87e){_0x168587=_0x47e87e;return getUser(_0x458b27,_0x5a11ee['name'],_0x168587);})[_0x0bf3('0x2d')](function(_0x4170d1){_0x37721f=_0x4170d1;logger[_0x0bf3('0xc')]('The\x20User\x20ID\x20is:',_0x37721f['id']);return getEndUser(_0x458b27,_0x41e6bf[_0x0bf3('0x5e')],_0x41e6bf[_0x0bf3('0x5f')],_0x168587);})[_0x0bf3('0x2d')](function(_0xe4f49e){_0x26257e=_0xe4f49e;logger[_0x0bf3('0xc')](_0x0bf3('0x60'),_0x26257e['id']);return getTicket(_0x458b27,_0x37721f,_0x26257e,_0x417cc2,_0x41e6bf,_0x417cc2['Fields'],_0x168587,_0x0bf3('0x61'));})[_0x0bf3('0x2d')](function(_0x1f59c9){_0x552f77=_0x1f59c9;logger[_0x0bf3('0xc')]('Ticket\x20created!');logger[_0x0bf3('0xc')](_0x0bf3('0x62'),_0x552f77['id']);return setRelationship(_0x168587,_0x37721f,_0x552f77,_0x0bf3('0x63'));})[_0x0bf3('0x2d')](function(){return setRelationship(_0x168587,_0x26257e,_0x552f77,_0x0bf3('0x64'));})['then'](function(){return getServerInfo(_0x168587);})[_0x0bf3('0x2d')](function(_0x25ba2e){var _0x3ae4b9=parseInt(_0x25ba2e[_0x0bf3('0x65')][_0x0bf3('0x66')](0x0));var _0x3f4730=util[_0x0bf3('0x24')](_0x0bf3('0x67'),_0x458b27[_0x0bf3('0x56')],_0x552f77['id']);if(_0x3ae4b9>0x6){_0x3f4730=util['format'](_0x0bf3('0x68'),_0x458b27[_0x0bf3('0x56')],_0x552f77['id']);}logger[_0x0bf3('0xc')](_0x0bf3('0x5b'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x0bf3('0x24')](_0x0bf3('0x69'),_0x5a11ee[_0x0bf3('0xe')]),_0x0bf3('0x6a'),{'uri':_0x3f4730});})[_0x0bf3('0x6b')](function(_0x121242){logger[_0x0bf3('0x6c')]('[QUEUE]',JSON[_0x0bf3('0x2a')](_0x121242));});};exports['outbound']=function(_0x5cd4d5,_0x4320c0,_0x4717fa,_0x236f82,_0x1bd5e9,_0x6146c8,_0x26fc54){var _0x5132db,_0xedd1bb,_0x3c26e9,_0x5d554f;_0x6146c8[_0x0bf3('0x56')]=intUtil[_0x0bf3('0x57')](_0x6146c8['remoteUri']);_0x6146c8['serverUrl']=intUtil[_0x0bf3('0x57')](_0x6146c8[_0x0bf3('0x58')]);def['uri']=util['format'](_0x0bf3('0x5a'),_0x6146c8[_0x0bf3('0x56')]);if(_0x26fc54&&_0x26fc54[_0x0bf3('0x6d')]&&_0x26fc54[_0x0bf3('0x6d')]!==_0x0bf3('0x6e')){logger[_0x0bf3('0xc')](_0x0bf3('0x6f'),_0x0bf3('0x5c'));_0x4320c0[_0x0bf3('0x70')]=util[_0x0bf3('0x24')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x6146c8[_0x0bf3('0x58')],_0x4320c0[_0x0bf3('0x71')],md5(_0x4320c0[_0x0bf3('0x71')]));}return getConnection(_0x6146c8)[_0x0bf3('0x2d')](function(_0x40cb36){_0x5d554f=_0x40cb36;return getUser(_0x6146c8,_0x236f82[_0x0bf3('0xe')],_0x5d554f);})[_0x0bf3('0x2d')](function(_0x564ad9){_0x5132db=_0x564ad9;logger[_0x0bf3('0xc')](_0x0bf3('0x72'),_0x5132db['id']);return getEndUser(_0x6146c8,_0x4320c0[_0x0bf3('0x73')],_0x4320c0[_0x0bf3('0x74')],_0x5d554f);})[_0x0bf3('0x2d')](function(_0x3976a8){_0xedd1bb=_0x3976a8;logger[_0x0bf3('0xc')](_0x0bf3('0x60'),_0xedd1bb['id']);return getTicket(_0x6146c8,_0x5132db,_0xedd1bb,_0x4717fa,_0x4320c0,_0x4717fa[_0x0bf3('0x75')],_0x5d554f,_0x0bf3('0x76'));})['then'](function(_0x2f8d82){_0x3c26e9=_0x2f8d82;logger[_0x0bf3('0xc')]('Ticket\x20created!');logger[_0x0bf3('0xc')](_0x0bf3('0x62'),_0x3c26e9['id']);return setRelationship(_0x5d554f,_0x5132db,_0x3c26e9,_0x0bf3('0x63'));})[_0x0bf3('0x2d')](function(){return setRelationship(_0x5d554f,_0xedd1bb,_0x3c26e9,_0x0bf3('0x64'));})[_0x0bf3('0x2d')](function(){return getServerInfo(_0x5d554f);})['then'](function(_0x2123f5){var _0x1e4cae=parseInt(_0x2123f5[_0x0bf3('0x65')][_0x0bf3('0x66')](0x0));var _0x46dbac=util[_0x0bf3('0x24')](_0x0bf3('0x67'),_0x6146c8['remoteUri'],_0x3c26e9['id']);if(_0x1e4cae>0x6){_0x46dbac=util[_0x0bf3('0x24')](_0x0bf3('0x68'),_0x6146c8[_0x0bf3('0x56')],_0x3c26e9['id']);}logger[_0x0bf3('0xc')]('[OUTBOUND]',_0x0bf3('0x77'));emit(util[_0x0bf3('0x24')](_0x0bf3('0x69'),_0x236f82[_0x0bf3('0xe')]),_0x0bf3('0x6a'),{'uri':_0x46dbac});})[_0x0bf3('0x6b')](function(_0x322a2e){logger['error'](_0x0bf3('0x6f'),JSON[_0x0bf3('0x2a')](_0x322a2e));});};exports[_0x0bf3('0x78')]=function(_0x4e5531,_0x1b7565,_0x97e255,_0x24bce3,_0x355b32,_0x46315b){var _0x59d79d,_0x37063d,_0xfd423a,_0x13c853;_0x46315b['remoteUri']=intUtil[_0x0bf3('0x57')](_0x46315b['remoteUri']);_0x46315b[_0x0bf3('0x58')]=intUtil[_0x0bf3('0x57')](_0x46315b[_0x0bf3('0x58')]);def[_0x0bf3('0x59')]=util['format'](_0x0bf3('0x5a'),_0x46315b[_0x0bf3('0x56')]);if(_0x355b32&&_0x355b32[_0x0bf3('0x79')]){logger[_0x0bf3('0xc')]('[ABANDONED]',_0x0bf3('0x5c'));_0x1b7565[_0x0bf3('0x70')]=util[_0x0bf3('0x24')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x46315b[_0x0bf3('0x58')],_0x1b7565[_0x0bf3('0x71')],md5(_0x1b7565[_0x0bf3('0x71')]));}else{_0x1b7565[_0x0bf3('0x70')]='';}return getConnection(_0x46315b)[_0x0bf3('0x2d')](function(_0x4b6f36){_0x13c853=_0x4b6f36;if(!_[_0x0bf3('0x7a')](_0x24bce3)){return getUser(_0x46315b,_0x24bce3[_0x0bf3('0xe')],_0x13c853);}else{return getUser(_0x46315b,null,_0x13c853);}})[_0x0bf3('0x2d')](function(_0x24f3ef){_0x59d79d=_0x24f3ef;logger[_0x0bf3('0xc')](_0x0bf3('0x72'),_0x59d79d['id']);return getEndUser(_0x46315b,_0x1b7565[_0x0bf3('0x5e')],_0x1b7565[_0x0bf3('0x5f')],_0x13c853);})[_0x0bf3('0x2d')](function(_0x4f804d){_0x37063d=_0x4f804d;logger[_0x0bf3('0xc')](_0x0bf3('0x60'),_0x37063d['id']);return getTicket(_0x46315b,_0x59d79d,_0x37063d,_0x97e255,_0x1b7565,_0x97e255[_0x0bf3('0x75')],_0x13c853,'Inbound');})[_0x0bf3('0x2d')](function(_0x49ae10){_0xfd423a=_0x49ae10;logger['info']('Ticket\x20created!');logger['info'](_0x0bf3('0x62'),_0xfd423a['id']);return setRelationship(_0x13c853,_0x59d79d,_0xfd423a,_0x0bf3('0x63'));})[_0x0bf3('0x2d')](function(){return setRelationship(_0x13c853,_0x37063d,_0xfd423a,_0x0bf3('0x64'));})[_0x0bf3('0x2d')](function(){return getServerInfo(_0x13c853);})[_0x0bf3('0x6b')](function(_0x31a465){logger['error']('[ABANDONED]',JSON['stringify'](_0x31a465));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/util.js b/server/services/ami/trigger/integration/util.js
index c250a4e..d64cdd5 100644
--- a/server/services/ami/trigger/integration/util.js
+++ b/server/services/ami/trigger/integration/util.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8c87=['slice','substring','lastIndexOf','isNil','test','lodash','util','sortBy','string','push','content','type','variableName','toString','customVariable','Variable','name','toLowerCase','key','format','%s:\x20%s','keyContent','keyType','join'];(function(_0x3fb9dd,_0x174fff){var _0x20136a=function(_0x480081){while(--_0x480081){_0x3fb9dd['push'](_0x3fb9dd['shift']());}};_0x20136a(++_0x174fff);}(_0x8c87,0x1e5));var _0x78c8=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0x8c87[_0x4154a6];return _0x3b2786;};'use strict';var _=require(_0x78c8('0x0'));var util=require(_0x78c8('0x1'));exports['getString']=function(_0x1d3df9,_0x41df47,_0x3e0df5){var _0x41cc7b=[];if(_0x1d3df9['length']>0x0){var _0x2c7391=_[_0x78c8('0x2')](_0x1d3df9,['id']);for(var _0x1c538a=0x0;_0x1c538a<_0x2c7391['length'];_0x1c538a++){var _0x4731f0=_0x2c7391[_0x1c538a];if(_0x4731f0['type']===_0x78c8('0x3')){_0x41cc7b[_0x78c8('0x4')](_0x4731f0[_0x78c8('0x5')]);}else if(_0x4731f0[_0x78c8('0x6')]==='variable'&&_0x4731f0[_0x78c8('0x7')]){_0x41df47[_0x4731f0['variableName']]&&_0x41cc7b['push'](_0x41df47[_0x4731f0[_0x78c8('0x7')]][_0x78c8('0x8')]());}else if(_0x4731f0[_0x78c8('0x6')]===_0x78c8('0x9')&&_0x4731f0[_0x78c8('0xa')]&&_0x4731f0[_0x78c8('0xa')][_0x78c8('0xb')]){_0x41df47[_0x4731f0[_0x78c8('0xa')][_0x78c8('0xb')][_0x78c8('0xc')]()]&&_0x41cc7b[_0x78c8('0x4')](_0x41df47[_0x4731f0[_0x78c8('0xa')][_0x78c8('0xb')][_0x78c8('0xc')]()][_0x78c8('0x8')]());}else if(_0x4731f0[_0x78c8('0x6')]==='keyValue'){if(_0x4731f0['keyType']===_0x78c8('0x3')&&_0x4731f0[_0x78c8('0xd')]){_0x41cc7b[_0x78c8('0x4')](util[_0x78c8('0xe')](_0x78c8('0xf'),_0x4731f0[_0x78c8('0xd')],_0x4731f0[_0x78c8('0x10')]));}else if(_0x4731f0[_0x78c8('0x11')]==='variable'&&_0x4731f0[_0x78c8('0x7')]&&_0x4731f0[_0x78c8('0xd')]){_0x41df47[_0x4731f0[_0x78c8('0x7')]]&&_0x41cc7b[_0x78c8('0x4')](util[_0x78c8('0xe')]('%s:\x20%s',_0x4731f0[_0x78c8('0xd')],_0x41df47[_0x4731f0[_0x78c8('0x7')]]));}else if(_0x4731f0[_0x78c8('0x11')]===_0x78c8('0x9')&&_0x4731f0[_0x78c8('0xa')]&&_0x4731f0[_0x78c8('0xa')]['name']&&_0x4731f0['key']){_0x41df47[_0x4731f0['Variable']['name'][_0x78c8('0xc')]()]&&_0x41cc7b[_0x78c8('0x4')](util[_0x78c8('0xe')]('%s:\x20%s',_0x4731f0[_0x78c8('0xd')],_0x41df47[_0x4731f0[_0x78c8('0xa')][_0x78c8('0xb')][_0x78c8('0xc')]()]));}}}}return _0x41cc7b[_0x78c8('0x12')](_0x3e0df5);};exports['stripTrailingSlash']=function(_0x1859ad){var _0x291369=_0x1859ad[_0x78c8('0x13')](-0x1);if(_0x291369==='/'){_0x1859ad=_0x1859ad[_0x78c8('0x14')](0x0,_0x1859ad[_0x78c8('0x15')](_0x291369));}return _0x1859ad;};exports['validateEmail']=function(_0x214b8f){if(!_[_0x78c8('0x16')](_0x214b8f)&&_0x214b8f!==''){var _0xec8ae8=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0xec8ae8[_0x78c8('0x17')](String(_0x214b8f)[_0x78c8('0xc')]());}else{return![];}};
\ No newline at end of file
+var _0xd377=['%s:\x20%s','keyContent','join','substring','lastIndexOf','isNil','lodash','util','getString','sortBy','string','type','variable','variableName','push','customVariable','Variable','name','toLowerCase','toString','keyValue','keyType','key','format'];(function(_0x2636db,_0x36701d){var _0x485039=function(_0x473e36){while(--_0x473e36){_0x2636db['push'](_0x2636db['shift']());}};_0x485039(++_0x36701d);}(_0xd377,0x19e));var _0x7d37=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xd377[_0x21a9d9];return _0x46adce;};'use strict';var _=require(_0x7d37('0x0'));var util=require(_0x7d37('0x1'));exports[_0x7d37('0x2')]=function(_0x29e833,_0x2a6013,_0x56edbc){var _0x5a3edd=[];if(_0x29e833['length']>0x0){var _0xa72edf=_[_0x7d37('0x3')](_0x29e833,['id']);for(var _0x58f028=0x0;_0x58f028<_0xa72edf['length'];_0x58f028++){var _0x5a7cbf=_0xa72edf[_0x58f028];if(_0x5a7cbf['type']===_0x7d37('0x4')){_0x5a3edd['push'](_0x5a7cbf['content']);}else if(_0x5a7cbf[_0x7d37('0x5')]===_0x7d37('0x6')&&_0x5a7cbf[_0x7d37('0x7')]){_0x2a6013[_0x5a7cbf[_0x7d37('0x7')]]&&_0x5a3edd[_0x7d37('0x8')](_0x2a6013[_0x5a7cbf[_0x7d37('0x7')]]['toString']());}else if(_0x5a7cbf[_0x7d37('0x5')]===_0x7d37('0x9')&&_0x5a7cbf[_0x7d37('0xa')]&&_0x5a7cbf[_0x7d37('0xa')][_0x7d37('0xb')]){_0x2a6013[_0x5a7cbf[_0x7d37('0xa')]['name'][_0x7d37('0xc')]()]&&_0x5a3edd[_0x7d37('0x8')](_0x2a6013[_0x5a7cbf[_0x7d37('0xa')]['name'][_0x7d37('0xc')]()][_0x7d37('0xd')]());}else if(_0x5a7cbf['type']===_0x7d37('0xe')){if(_0x5a7cbf[_0x7d37('0xf')]===_0x7d37('0x4')&&_0x5a7cbf[_0x7d37('0x10')]){_0x5a3edd[_0x7d37('0x8')](util[_0x7d37('0x11')](_0x7d37('0x12'),_0x5a7cbf[_0x7d37('0x10')],_0x5a7cbf[_0x7d37('0x13')]));}else if(_0x5a7cbf[_0x7d37('0xf')]==='variable'&&_0x5a7cbf[_0x7d37('0x7')]&&_0x5a7cbf[_0x7d37('0x10')]){_0x2a6013[_0x5a7cbf[_0x7d37('0x7')]]&&_0x5a3edd[_0x7d37('0x8')](util[_0x7d37('0x11')](_0x7d37('0x12'),_0x5a7cbf[_0x7d37('0x10')],_0x2a6013[_0x5a7cbf['variableName']]));}else if(_0x5a7cbf[_0x7d37('0xf')]===_0x7d37('0x9')&&_0x5a7cbf[_0x7d37('0xa')]&&_0x5a7cbf[_0x7d37('0xa')]['name']&&_0x5a7cbf[_0x7d37('0x10')]){_0x2a6013[_0x5a7cbf[_0x7d37('0xa')]['name'][_0x7d37('0xc')]()]&&_0x5a3edd[_0x7d37('0x8')](util[_0x7d37('0x11')](_0x7d37('0x12'),_0x5a7cbf[_0x7d37('0x10')],_0x2a6013[_0x5a7cbf[_0x7d37('0xa')][_0x7d37('0xb')][_0x7d37('0xc')]()]));}}}}return _0x5a3edd[_0x7d37('0x14')](_0x56edbc);};exports['stripTrailingSlash']=function(_0x3c6092){var _0xb18e3a=_0x3c6092['slice'](-0x1);if(_0xb18e3a==='/'){_0x3c6092=_0x3c6092[_0x7d37('0x15')](0x0,_0x3c6092[_0x7d37('0x16')](_0xb18e3a));}return _0x3c6092;};exports['validateEmail']=function(_0xcaf61c){if(!_[_0x7d37('0x17')](_0xcaf61c)&&_0xcaf61c!==''){var _0x5607f8=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x5607f8['test'](String(_0xcaf61c)[_0x7d37('0xc')]());}else{return![];}};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/vtiger.js b/server/services/ami/trigger/integration/vtiger.js
index 59b2047..efddf82 100644
--- a/server/services/ami/trigger/integration/vtiger.js
+++ b/server/services/ami/trigger/integration/vtiger.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6c50=['stringify','then','success','error','catch','[vTiger],\x20%s,\x20%s,\x20%s','createTicket','validateEmail','GET','%s/webservice.php','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','result','Agent\x20found!','email1','first_name','last_name','resolve','statusCode','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','username','getUser','query','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','length','Enduser\x20found!','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','Enduser\x20created.','phone','getEndUser','accessKey','getchallenge','token','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','stripTrailingSlash','monitor_format','[QUEUE]','recordingURL','serverUrl','uniqueid','email','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','outbound','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','Fields','user:%s','Recording\x20is\x20enabled!','calleridnum','[ABANDONED]','lodash','request-promise','bluebird','md5','ioredis','../../../../config/environment','../../../../config/logger','vTiger','redis','defaults','localhost','socket.io-emitter','emit','type','content','variable','variableName','idField','toString','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','getString','Subjects','Descriptions','POST','format','remoteUri','create','admin','sessionName','HelpDesk'];(function(_0x4d06d8,_0xbbb8a7){var _0x3e8f00=function(_0x5f42d2){while(--_0x5f42d2){_0x4d06d8['push'](_0x4d06d8['shift']());}};_0x3e8f00(++_0xbbb8a7);}(_0x6c50,0xa4));var _0x06c5=function(_0x388c7b,_0x381243){_0x388c7b=_0x388c7b-0x0;var _0x1af124=_0x6c50[_0x388c7b];return _0x1af124;};'use strict';var _=require(_0x06c5('0x0'));var rp=require(_0x06c5('0x1'));var BPromise=require(_0x06c5('0x2'));var md5=require(_0x06c5('0x3'));var util=require('util');var Redis=require(_0x06c5('0x4'));var intUtil=require('./util');var config=require(_0x06c5('0x5'));var logger=require(_0x06c5('0x6'))(_0x06c5('0x7'));config[_0x06c5('0x8')]=_[_0x06c5('0x9')](config[_0x06c5('0x8')],{'host':_0x06c5('0xa'),'port':0x18eb});var io=require(_0x06c5('0xb'))(new Redis(config[_0x06c5('0x8')]));function emit(_0x17c636,_0x154b0a,_0x546ae5){io['to'](_0x17c636)[_0x06c5('0xc')](_0x154b0a,_0x546ae5);}function getCustomFields(_0x222e05,_0x3010af){var _0x18f1e9={};if(_0x222e05['length']>0x0){_['forEach'](_0x222e05,function(_0x5ea57c){if(_0x5ea57c[_0x06c5('0xd')]==='string'&&_0x5ea57c['idField']){_0x18f1e9[_0x5ea57c['idField']]=_0x5ea57c[_0x06c5('0xe')]['toString']();}else if(_0x5ea57c[_0x06c5('0xd')]===_0x06c5('0xf')&&_0x5ea57c[_0x06c5('0x10')]&&_0x5ea57c['idField']&&_0x3010af[_0x5ea57c[_0x06c5('0x10')]]){_0x18f1e9[_0x5ea57c[_0x06c5('0x11')]]=_0x3010af[_0x5ea57c[_0x06c5('0x10')]][_0x06c5('0x12')]();}else if(_0x5ea57c['type']==='customVariable'&&_0x5ea57c[_0x06c5('0x13')]&&_0x5ea57c[_0x06c5('0x13')][_0x06c5('0x14')]&&_0x5ea57c['idField']&&_0x3010af[_0x5ea57c[_0x06c5('0x13')][_0x06c5('0x14')]['toLowerCase']()]){_0x18f1e9[_0x5ea57c[_0x06c5('0x11')]]=_0x3010af[_0x5ea57c[_0x06c5('0x13')][_0x06c5('0x14')][_0x06c5('0x15')]()][_0x06c5('0x12')]();}});}return _0x18f1e9;}function createTicket(_0x36b9e9,_0x44d14e,_0x18a070,_0x1393f5,_0x2b93ba,_0x30dc0f,_0x46471b){logger[_0x06c5('0x16')](_0x06c5('0x17'));var _0x32cf97=_[_0x06c5('0x18')]({'parent_id':'','assigned_user_id':_0x44d14e['id'],'ticketpriorities':_0x06c5('0x19'),'ticketstatus':'Open','ticket_title':intUtil[_0x06c5('0x1a')](_0x1393f5[_0x06c5('0x1b')],_0x2b93ba,'\x20'),'description':intUtil[_0x06c5('0x1a')](_0x1393f5[_0x06c5('0x1c')],_0x2b93ba,'\x0a'),'contact_id':_0x18a070['id']},getCustomFields(_0x30dc0f,_0x2b93ba));var _0xa3659b={'method':_0x06c5('0x1d'),'uri':util[_0x06c5('0x1e')]('%s/webservice.php',_0x36b9e9[_0x06c5('0x1f')]),'form':{'operation':_0x06c5('0x20'),'username':_0x06c5('0x21'),'sessionName':_0x46471b[_0x06c5('0x22')],'elementType':_0x06c5('0x23'),'element':JSON[_0x06c5('0x24')](_0x32cf97)},'json':!![]};return request(_0xa3659b)[_0x06c5('0x25')](function(_0x51f2a6){if(_0x51f2a6[_0x06c5('0x26')]){return BPromise['resolve']({'id':_0x51f2a6['result']['id']});}else{throw new Error(util['format']('Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s',JSON[_0x06c5('0x24')](_0x51f2a6[_0x06c5('0x27')])));}})[_0x06c5('0x28')](function(_0xc73475){var _0x2ead19=_0xc73475['statusCode']||0x1f4;logger[_0x06c5('0x27')](_0x06c5('0x29'),_0x06c5('0x2a'),_0x2ead19,JSON[_0x06c5('0x24')](_0xc73475));});}function getUser(_0x2f8ac9,_0x4d4d04,_0x38f6a7){if(intUtil[_0x06c5('0x2b')](_0x4d4d04)){logger[_0x06c5('0x16')]('Getting\x20agent\x20with\x20email',_0x4d4d04);return request({'method':_0x06c5('0x2c'),'uri':util[_0x06c5('0x1e')](_0x06c5('0x2d'),_0x2f8ac9['remoteUri']),'qs':{'operation':'query','username':'admin','sessionName':_0x38f6a7[_0x06c5('0x22')],'query':util['format'](_0x06c5('0x2e'),_0x4d4d04)},'json':!![]})['then'](function(_0xb849b5){if(_0xb849b5['success']&&_0xb849b5[_0x06c5('0x2f')]['length']){logger['info'](_0x06c5('0x30'));return BPromise['resolve']({'id':_0xb849b5['result'][0x0]['id'],'email':_0xb849b5[_0x06c5('0x2f')][0x0][_0x06c5('0x31')],'name':_0xb849b5[_0x06c5('0x2f')][0x0][_0x06c5('0x32')]+'\x20'+_0xb849b5[_0x06c5('0x2f')][_0x06c5('0x33')]});}else{logger[_0x06c5('0x16')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x06c5('0x34')]({'id':_0x38f6a7['userId'],'email':_0x2f8ac9['username'],'name':_0x06c5('0x21')});}})[_0x06c5('0x28')](function(_0x418e28){var _0x31bd7f=_0x418e28[_0x06c5('0x35')]||0x1f4;logger[_0x06c5('0x27')](_0x06c5('0x29'),'getUser',_0x31bd7f,JSON['stringify'](_0x418e28));});}else{logger[_0x06c5('0x16')](_0x06c5('0x36'));return BPromise['resolve']({'id':_0x38f6a7['userId'],'email':_0x2f8ac9[_0x06c5('0x37')],'name':_0x06c5('0x21')})[_0x06c5('0x28')](function(_0x503d3f){var _0x44b651=_0x503d3f[_0x06c5('0x35')]||0x1f4;logger[_0x06c5('0x27')]('[vTiger],\x20%s,\x20%s,\x20%s',_0x06c5('0x38'),_0x44b651,JSON[_0x06c5('0x24')](_0x503d3f));});}}function getEndUser(_0x596fcb,_0x5783db,_0x283eba,_0x5ed093){logger[_0x06c5('0x16')]('Searching\x20end\x20user\x20with\x20phone',_0x283eba);return request({'method':_0x06c5('0x2c'),'uri':util[_0x06c5('0x1e')](_0x06c5('0x2d'),_0x596fcb[_0x06c5('0x1f')]),'qs':{'operation':_0x06c5('0x39'),'username':_0x06c5('0x21'),'sessionName':_0x5ed093[_0x06c5('0x22')],'query':util['format'](_0x06c5('0x3a'),_0x283eba,_0x283eba,_0x283eba,_0x283eba,_0x283eba)},'json':!![]})['then'](function(_0x521189){if(_0x521189[_0x06c5('0x26')]&&_0x521189[_0x06c5('0x2f')][_0x06c5('0x3b')]){logger[_0x06c5('0x16')](_0x06c5('0x3c'));return BPromise[_0x06c5('0x34')]({'id':_0x521189[_0x06c5('0x2f')][0x0]['id'],'name':_0x521189['result'][0x0]['firstname']+'\x20'+_0x521189['result'][0x0][_0x06c5('0x3d')],'phone':_0x283eba});}else{logger['info'](_0x06c5('0x3e'));return request({'method':_0x06c5('0x1d'),'uri':util[_0x06c5('0x1e')]('%s/webservice.php',_0x596fcb[_0x06c5('0x1f')]),'form':{'operation':_0x06c5('0x20'),'sessionName':_0x5ed093[_0x06c5('0x22')],'elementType':_0x06c5('0x3f'),'element':JSON[_0x06c5('0x24')]({'lastname':_0x5783db,'phone':_0x283eba,'assigned_user_id':'\x20'})},'json':!![]})['then'](function(_0x1a2014){logger[_0x06c5('0x16')](_0x06c5('0x40'));return BPromise['resolve']({'id':_0x1a2014[_0x06c5('0x2f')]['id'],'name':_0x1a2014[_0x06c5('0x2f')]['lastname'],'phone':_0x1a2014[_0x06c5('0x2f')][_0x06c5('0x41')]});})[_0x06c5('0x28')](function(_0x58583d){var _0x31a67b=_0x58583d[_0x06c5('0x35')]||0x1f4;logger[_0x06c5('0x27')](_0x06c5('0x29'),_0x06c5('0x42'),_0x31a67b,JSON['stringify'](_0x58583d));});}});}function getConnection(_0x336c7f){var _0x3bf9db=_0x336c7f[_0x06c5('0x37')];var _0x2ca58c=_0x336c7f[_0x06c5('0x43')];return request({'method':_0x06c5('0x2c'),'uri':util['format'](_0x06c5('0x2d'),_0x336c7f['remoteUri']),'qs':{'operation':_0x06c5('0x44'),'username':_0x3bf9db},'json':!![]})['then'](function(_0x5855a2){if(_0x5855a2[_0x06c5('0x26')]){return request({'method':_0x06c5('0x1d'),'uri':util['format'](_0x06c5('0x2d'),_0x336c7f['remoteUri']),'form':{'operation':'login','username':_0x06c5('0x21'),'accessKey':md5(_0x5855a2[_0x06c5('0x2f')][_0x06c5('0x45')]+_0x2ca58c)},'json':!![]});}})[_0x06c5('0x25')](function(_0x2757f5){if(_0x2757f5[_0x06c5('0x26')]){return BPromise[_0x06c5('0x34')](_0x2757f5[_0x06c5('0x2f')]);}else{throw new Error(util[_0x06c5('0x1e')](_0x06c5('0x46'),_0x336c7f['id']));}})[_0x06c5('0x28')](function(_0x4fedcd){var _0x3bc5c1=_0x4fedcd[_0x06c5('0x35')]||0x1f4;logger['error'](_0x06c5('0x29'),_0x06c5('0x47'),_0x3bc5c1,JSON[_0x06c5('0x24')](_0x4fedcd));});}function request(_0x247d1a){logger['info'](_0x06c5('0x48'),JSON['stringify'](_0x247d1a));return rp(_0x247d1a);}exports[_0x06c5('0x49')]=function(_0x5abdd0,_0x5c9f3f,_0x2e719c,_0x4372e6,_0x3714c5,_0x325488){var _0x1a3d83,_0x5cfac8,_0x452d4b,_0x4e248c;_0x325488['remoteUri']=intUtil[_0x06c5('0x4a')](_0x325488['remoteUri']);if(_0x3714c5&&_0x3714c5[_0x06c5('0x4b')]){logger[_0x06c5('0x16')](_0x06c5('0x4c'),'Recording\x20is\x20enabled!');_0x5c9f3f[_0x06c5('0x4d')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x325488[_0x06c5('0x4e')],_0x5c9f3f[_0x06c5('0x4f')],md5(_0x5c9f3f[_0x06c5('0x4f')]));}else{_0x5c9f3f[_0x06c5('0x4d')]='';}return getConnection(_0x325488)[_0x06c5('0x25')](function(_0x3e82f0){_0x4e248c=_0x3e82f0;return getUser(_0x325488,_0x4372e6[_0x06c5('0x50')],_0x4e248c);})[_0x06c5('0x25')](function(_0x1cfcc6){_0x1a3d83=_0x1cfcc6;logger[_0x06c5('0x16')](_0x06c5('0x51'),_0x1a3d83['id']);return getEndUser(_0x325488,_0x5c9f3f[_0x06c5('0x52')],_0x5c9f3f['calleridnum'],_0x4e248c);})[_0x06c5('0x25')](function(_0x1e012d){_0x5cfac8=_0x1e012d;logger['info'](_0x06c5('0x53'),_0x5cfac8['id']);return createTicket(_0x325488,_0x1a3d83,_0x5cfac8,_0x2e719c,_0x5c9f3f,_0x2e719c['Fields'],_0x4e248c);})[_0x06c5('0x25')](function(_0xa68091){_0x452d4b=_0xa68091;logger['info'](_0x06c5('0x54'));logger['info'](_0x06c5('0x55'),_0x452d4b['id']);var _0xe764df=util[_0x06c5('0x1e')](_0x06c5('0x56'),_0x325488[_0x06c5('0x1f')],_[_0x06c5('0x57')](_0x452d4b['id'],'x')[0x1]);logger['info'](_0x06c5('0x4c'),_0x06c5('0x58'));emit(util['format']('user:%s',_0x4372e6[_0x06c5('0x14')]),_0x06c5('0x59'),{'uri':_0xe764df});})['catch'](function(_0x406661){logger['error']('[QUEUE]',JSON['stringify'](_0x406661));});};exports[_0x06c5('0x5a')]=function(_0x15373b,_0x2974a6,_0x496029,_0x3bb4ac,_0x209d9d,_0x4a8874,_0x1fdaa8){var _0x4d1274,_0x26c877,_0x435e18,_0x458e1e;_0x4a8874['remoteUri']=intUtil['stripTrailingSlash'](_0x4a8874['remoteUri']);_0x4a8874[_0x06c5('0x4e')]=intUtil[_0x06c5('0x4a')](_0x4a8874['serverUrl']);if(_0x1fdaa8&&_0x1fdaa8[_0x06c5('0x5b')]&&_0x1fdaa8[_0x06c5('0x5b')]!==_0x06c5('0x5c')){logger[_0x06c5('0x16')](_0x06c5('0x5d'),'Recording\x20is\x20enabled!');_0x2974a6[_0x06c5('0x4d')]=util[_0x06c5('0x1e')](_0x06c5('0x5e'),_0x4a8874[_0x06c5('0x4e')],_0x2974a6[_0x06c5('0x4f')],md5(_0x2974a6[_0x06c5('0x4f')]));}return getConnection(_0x4a8874)[_0x06c5('0x25')](function(_0x557919){_0x458e1e=_0x557919;return getUser(_0x4a8874,_0x3bb4ac[_0x06c5('0x50')],_0x458e1e);})[_0x06c5('0x25')](function(_0x13dc07){_0x4d1274=_0x13dc07;logger[_0x06c5('0x16')]('The\x20User\x20ID\x20is:',_0x4d1274['id']);return getEndUser(_0x4a8874,_0x2974a6['destcalleridname'],_0x2974a6['destcalleridnum'],_0x458e1e);})[_0x06c5('0x25')](function(_0x12975b){_0x26c877=_0x12975b;logger['info'](_0x06c5('0x53'),_0x26c877['id']);return createTicket(_0x4a8874,_0x4d1274,_0x26c877,_0x496029,_0x2974a6,_0x496029[_0x06c5('0x5f')],_0x458e1e);})[_0x06c5('0x25')](function(_0x510ba2){_0x435e18=_0x510ba2;logger[_0x06c5('0x16')](_0x06c5('0x54'));logger[_0x06c5('0x16')](_0x06c5('0x55'),_0x435e18['id']);var _0x146c47=util[_0x06c5('0x1e')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x4a8874[_0x06c5('0x1f')],_[_0x06c5('0x57')](_0x435e18['id'],'x')[0x1]);logger[_0x06c5('0x16')]('[OUTBOUND]',_0x06c5('0x58'));emit(util['format'](_0x06c5('0x60'),_0x3bb4ac[_0x06c5('0x14')]),_0x06c5('0x59'),{'uri':_0x146c47});})[_0x06c5('0x28')](function(_0x5a0e85){logger[_0x06c5('0x27')](_0x06c5('0x5d'),JSON['stringify'](_0x5a0e85));});};exports['abandoned']=function(_0x3c7684,_0x5f580b,_0x3e22bc,_0x2e5d4d,_0x1248ad,_0x132aaf){var _0x681cd7,_0x2c67c7,_0x1a1daf,_0x2521e4;_0x132aaf[_0x06c5('0x1f')]=intUtil[_0x06c5('0x4a')](_0x132aaf['remoteUri']);_0x132aaf['serverUrl']=intUtil[_0x06c5('0x4a')](_0x132aaf['serverUrl']);if(_0x1248ad&&_0x1248ad[_0x06c5('0x4b')]){logger[_0x06c5('0x16')]('[ABANDONED]',_0x06c5('0x61'));_0x5f580b[_0x06c5('0x4d')]=util['format'](_0x06c5('0x5e'),_0x132aaf['serverUrl'],_0x5f580b[_0x06c5('0x4f')],md5(_0x5f580b[_0x06c5('0x4f')]));}else{_0x5f580b[_0x06c5('0x4d')]='';}return getConnection(_0x132aaf)['then'](function(_0x577b96){_0x2521e4=_0x577b96;return getUser(_0x132aaf,'',_0x2521e4);})['then'](function(_0x3e891f){_0x681cd7=_0x3e891f;logger[_0x06c5('0x16')](_0x06c5('0x51'),_0x681cd7['id']);return getEndUser(_0x132aaf,_0x5f580b[_0x06c5('0x52')],_0x5f580b[_0x06c5('0x62')],_0x2521e4);})[_0x06c5('0x25')](function(_0x2a5f60){_0x2c67c7=_0x2a5f60;logger[_0x06c5('0x16')]('The\x20Enduser\x20ID\x20is:',_0x2c67c7['id']);return createTicket(_0x132aaf,_0x681cd7,_0x2c67c7,_0x3e22bc,_0x5f580b,_0x3e22bc[_0x06c5('0x5f')],_0x2521e4);})[_0x06c5('0x25')](function(_0x4bb8d2){_0x1a1daf=_0x4bb8d2;logger[_0x06c5('0x16')](_0x06c5('0x54'));logger['info']('The\x20Ticket\x20ID\x20is:',_0x1a1daf['id']);})[_0x06c5('0x28')](function(_0x32da68){logger[_0x06c5('0x27')](_0x06c5('0x63'),JSON[_0x06c5('0x24')](_0x32da68));});};
\ No newline at end of file
+var _0xc368=['serverUrl','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','Fields','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','outbound','stripTrailingSlash','recordingFormat','[OUTBOUND]','destcalleridname','destcalleridnum','user:%s','trigger:browser:url','abandoned','monitor_format','[ABANDONED]','calleridname','calleridnum','request-promise','md5','util','ioredis','./util','../../../../config/environment','vTiger','redis','defaults','emit','forEach','string','idField','content','toString','type','variable','variableName','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','getString','Subjects','Descriptions','POST','admin','sessionName','HelpDesk','stringify','then','resolve','format','error','catch','[vTiger],\x20%s,\x20%s,\x20%s','validateEmail','Getting\x20agent\x20with\x20email','%s/webservice.php','remoteUri','query','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','success','result','length','Agent\x20found!','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','username','getUser','statusCode','GET','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','create','Enduser\x20created.','phone','getEndUser','accessKey','token','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s'];(function(_0x23e7c1,_0x35110c){var _0x1add43=function(_0x238918){while(--_0x238918){_0x23e7c1['push'](_0x23e7c1['shift']());}};_0x1add43(++_0x35110c);}(_0xc368,0x7b));var _0x8c36=function(_0x17e791,_0x5ec760){_0x17e791=_0x17e791-0x0;var _0xf1fd39=_0xc368[_0x17e791];return _0xf1fd39;};'use strict';var _=require('lodash');var rp=require(_0x8c36('0x0'));var BPromise=require('bluebird');var md5=require(_0x8c36('0x1'));var util=require(_0x8c36('0x2'));var Redis=require(_0x8c36('0x3'));var intUtil=require(_0x8c36('0x4'));var config=require(_0x8c36('0x5'));var logger=require('../../../../config/logger')(_0x8c36('0x6'));config[_0x8c36('0x7')]=_[_0x8c36('0x8')](config[_0x8c36('0x7')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x8c36('0x7')]));function emit(_0x384867,_0x3e76be,_0x26bad1){io['to'](_0x384867)[_0x8c36('0x9')](_0x3e76be,_0x26bad1);}function getCustomFields(_0x207021,_0x569f29){var _0x5bfbdd={};if(_0x207021['length']>0x0){_[_0x8c36('0xa')](_0x207021,function(_0x28854e){if(_0x28854e['type']===_0x8c36('0xb')&&_0x28854e[_0x8c36('0xc')]){_0x5bfbdd[_0x28854e[_0x8c36('0xc')]]=_0x28854e[_0x8c36('0xd')][_0x8c36('0xe')]();}else if(_0x28854e[_0x8c36('0xf')]===_0x8c36('0x10')&&_0x28854e[_0x8c36('0x11')]&&_0x28854e[_0x8c36('0xc')]&&_0x569f29[_0x28854e[_0x8c36('0x11')]]){_0x5bfbdd[_0x28854e[_0x8c36('0xc')]]=_0x569f29[_0x28854e[_0x8c36('0x11')]][_0x8c36('0xe')]();}else if(_0x28854e[_0x8c36('0xf')]==='customVariable'&&_0x28854e[_0x8c36('0x12')]&&_0x28854e['Variable'][_0x8c36('0x13')]&&_0x28854e[_0x8c36('0xc')]&&_0x569f29[_0x28854e[_0x8c36('0x12')][_0x8c36('0x13')][_0x8c36('0x14')]()]){_0x5bfbdd[_0x28854e[_0x8c36('0xc')]]=_0x569f29[_0x28854e[_0x8c36('0x12')][_0x8c36('0x13')][_0x8c36('0x14')]()]['toString']();}});}return _0x5bfbdd;}function createTicket(_0x2be9b0,_0x46ae6e,_0x47832a,_0x2d5e5b,_0x3ef5ba,_0x5e5162,_0x15100f){logger[_0x8c36('0x15')](_0x8c36('0x16'));var _0x137d5c=_[_0x8c36('0x17')]({'parent_id':'','assigned_user_id':_0x46ae6e['id'],'ticketpriorities':_0x8c36('0x18'),'ticketstatus':_0x8c36('0x19'),'ticket_title':intUtil[_0x8c36('0x1a')](_0x2d5e5b[_0x8c36('0x1b')],_0x3ef5ba,'\x20'),'description':intUtil[_0x8c36('0x1a')](_0x2d5e5b[_0x8c36('0x1c')],_0x3ef5ba,'\x0a'),'contact_id':_0x47832a['id']},getCustomFields(_0x5e5162,_0x3ef5ba));var _0x14ee6b={'method':_0x8c36('0x1d'),'uri':util['format']('%s/webservice.php',_0x2be9b0['remoteUri']),'form':{'operation':'create','username':_0x8c36('0x1e'),'sessionName':_0x15100f[_0x8c36('0x1f')],'elementType':_0x8c36('0x20'),'element':JSON[_0x8c36('0x21')](_0x137d5c)},'json':!![]};return request(_0x14ee6b)[_0x8c36('0x22')](function(_0x27c0df){if(_0x27c0df['success']){return BPromise[_0x8c36('0x23')]({'id':_0x27c0df['result']['id']});}else{throw new Error(util[_0x8c36('0x24')]('Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s',JSON[_0x8c36('0x21')](_0x27c0df[_0x8c36('0x25')])));}})[_0x8c36('0x26')](function(_0x1010c8){var _0x50aa48=_0x1010c8['statusCode']||0x1f4;logger[_0x8c36('0x25')](_0x8c36('0x27'),'createTicket',_0x50aa48,JSON['stringify'](_0x1010c8));});}function getUser(_0x418663,_0x2b5a8c,_0x502fa3){if(intUtil[_0x8c36('0x28')](_0x2b5a8c)){logger[_0x8c36('0x15')](_0x8c36('0x29'),_0x2b5a8c);return request({'method':'GET','uri':util['format'](_0x8c36('0x2a'),_0x418663[_0x8c36('0x2b')]),'qs':{'operation':_0x8c36('0x2c'),'username':_0x8c36('0x1e'),'sessionName':_0x502fa3[_0x8c36('0x1f')],'query':util[_0x8c36('0x24')](_0x8c36('0x2d'),_0x2b5a8c)},'json':!![]})[_0x8c36('0x22')](function(_0xda4e74){if(_0xda4e74[_0x8c36('0x2e')]&&_0xda4e74[_0x8c36('0x2f')][_0x8c36('0x30')]){logger[_0x8c36('0x15')](_0x8c36('0x31'));return BPromise[_0x8c36('0x23')]({'id':_0xda4e74[_0x8c36('0x2f')][0x0]['id'],'email':_0xda4e74[_0x8c36('0x2f')][0x0]['email1'],'name':_0xda4e74['result'][0x0]['first_name']+'\x20'+_0xda4e74[_0x8c36('0x2f')][_0x8c36('0x32')]});}else{logger[_0x8c36('0x15')](_0x8c36('0x33'));return BPromise[_0x8c36('0x23')]({'id':_0x502fa3[_0x8c36('0x34')],'email':_0x418663[_0x8c36('0x35')],'name':'admin'});}})[_0x8c36('0x26')](function(_0x59a4e6){var _0x3def90=_0x59a4e6['statusCode']||0x1f4;logger[_0x8c36('0x25')](_0x8c36('0x27'),_0x8c36('0x36'),_0x3def90,JSON['stringify'](_0x59a4e6));});}else{logger[_0x8c36('0x15')](_0x8c36('0x33'));return BPromise[_0x8c36('0x23')]({'id':_0x502fa3[_0x8c36('0x34')],'email':_0x418663[_0x8c36('0x35')],'name':_0x8c36('0x1e')})[_0x8c36('0x26')](function(_0x334b02){var _0x75b797=_0x334b02[_0x8c36('0x37')]||0x1f4;logger[_0x8c36('0x25')](_0x8c36('0x27'),_0x8c36('0x36'),_0x75b797,JSON[_0x8c36('0x21')](_0x334b02));});}}function getEndUser(_0x250bf7,_0x17d846,_0x292b5f,_0x5109c2){logger[_0x8c36('0x15')]('Searching\x20end\x20user\x20with\x20phone',_0x292b5f);return request({'method':_0x8c36('0x38'),'uri':util[_0x8c36('0x24')](_0x8c36('0x2a'),_0x250bf7[_0x8c36('0x2b')]),'qs':{'operation':'query','username':'admin','sessionName':_0x5109c2[_0x8c36('0x1f')],'query':util[_0x8c36('0x24')](_0x8c36('0x39'),_0x292b5f,_0x292b5f,_0x292b5f,_0x292b5f,_0x292b5f)},'json':!![]})['then'](function(_0x4f6f06){if(_0x4f6f06[_0x8c36('0x2e')]&&_0x4f6f06['result']['length']){logger[_0x8c36('0x15')](_0x8c36('0x3a'));return BPromise[_0x8c36('0x23')]({'id':_0x4f6f06[_0x8c36('0x2f')][0x0]['id'],'name':_0x4f6f06[_0x8c36('0x2f')][0x0][_0x8c36('0x3b')]+'\x20'+_0x4f6f06[_0x8c36('0x2f')][0x0][_0x8c36('0x3c')],'phone':_0x292b5f});}else{logger[_0x8c36('0x15')](_0x8c36('0x3d'));return request({'method':'POST','uri':util[_0x8c36('0x24')](_0x8c36('0x2a'),_0x250bf7[_0x8c36('0x2b')]),'form':{'operation':_0x8c36('0x3e'),'sessionName':_0x5109c2[_0x8c36('0x1f')],'elementType':'Contacts','element':JSON[_0x8c36('0x21')]({'lastname':_0x17d846,'phone':_0x292b5f,'assigned_user_id':'\x20'})},'json':!![]})[_0x8c36('0x22')](function(_0x31699c){logger[_0x8c36('0x15')](_0x8c36('0x3f'));return BPromise[_0x8c36('0x23')]({'id':_0x31699c['result']['id'],'name':_0x31699c[_0x8c36('0x2f')][_0x8c36('0x3c')],'phone':_0x31699c[_0x8c36('0x2f')][_0x8c36('0x40')]});})[_0x8c36('0x26')](function(_0x393fd0){var _0xf230cb=_0x393fd0['statusCode']||0x1f4;logger[_0x8c36('0x25')](_0x8c36('0x27'),_0x8c36('0x41'),_0xf230cb,JSON[_0x8c36('0x21')](_0x393fd0));});}});}function getConnection(_0x2b3e58){var _0x381060=_0x2b3e58[_0x8c36('0x35')];var _0x2d1626=_0x2b3e58[_0x8c36('0x42')];return request({'method':_0x8c36('0x38'),'uri':util[_0x8c36('0x24')](_0x8c36('0x2a'),_0x2b3e58['remoteUri']),'qs':{'operation':'getchallenge','username':_0x381060},'json':!![]})[_0x8c36('0x22')](function(_0x476b51){if(_0x476b51[_0x8c36('0x2e')]){return request({'method':_0x8c36('0x1d'),'uri':util['format'](_0x8c36('0x2a'),_0x2b3e58[_0x8c36('0x2b')]),'form':{'operation':'login','username':'admin','accessKey':md5(_0x476b51['result'][_0x8c36('0x43')]+_0x2d1626)},'json':!![]});}})[_0x8c36('0x22')](function(_0x3297f1){if(_0x3297f1[_0x8c36('0x2e')]){return BPromise[_0x8c36('0x23')](_0x3297f1[_0x8c36('0x2f')]);}else{throw new Error(util['format'](_0x8c36('0x44'),_0x2b3e58['id']));}})[_0x8c36('0x26')](function(_0x337bb2){var _0x355113=_0x337bb2['statusCode']||0x1f4;logger['error']('[vTiger],\x20%s,\x20%s,\x20%s',_0x8c36('0x45'),_0x355113,JSON[_0x8c36('0x21')](_0x337bb2));});}function request(_0x2fc48b){logger[_0x8c36('0x15')](_0x8c36('0x46'),JSON[_0x8c36('0x21')](_0x2fc48b));return rp(_0x2fc48b);}exports[_0x8c36('0x47')]=function(_0xd2b403,_0x2c9d63,_0x4e0635,_0x4cba50,_0x41a120,_0x4aef20){var _0x5b0910,_0x9955bc,_0x5049f5,_0x273dcd;_0x4aef20[_0x8c36('0x2b')]=intUtil['stripTrailingSlash'](_0x4aef20[_0x8c36('0x2b')]);if(_0x41a120&&_0x41a120['monitor_format']){logger[_0x8c36('0x15')](_0x8c36('0x48'),_0x8c36('0x49'));_0x2c9d63['recordingURL']=util[_0x8c36('0x24')](_0x8c36('0x4a'),_0x4aef20[_0x8c36('0x4b')],_0x2c9d63[_0x8c36('0x4c')],md5(_0x2c9d63[_0x8c36('0x4c')]));}else{_0x2c9d63[_0x8c36('0x4d')]='';}return getConnection(_0x4aef20)[_0x8c36('0x22')](function(_0x5905c0){_0x273dcd=_0x5905c0;return getUser(_0x4aef20,_0x4cba50[_0x8c36('0x4e')],_0x273dcd);})['then'](function(_0x4a35a2){_0x5b0910=_0x4a35a2;logger['info'](_0x8c36('0x4f'),_0x5b0910['id']);return getEndUser(_0x4aef20,_0x2c9d63['calleridname'],_0x2c9d63['calleridnum'],_0x273dcd);})[_0x8c36('0x22')](function(_0x176794){_0x9955bc=_0x176794;logger[_0x8c36('0x15')](_0x8c36('0x50'),_0x9955bc['id']);return createTicket(_0x4aef20,_0x5b0910,_0x9955bc,_0x4e0635,_0x2c9d63,_0x4e0635[_0x8c36('0x51')],_0x273dcd);})['then'](function(_0x499bb3){_0x5049f5=_0x499bb3;logger['info'](_0x8c36('0x52'));logger[_0x8c36('0x15')]('The\x20Ticket\x20ID\x20is:',_0x5049f5['id']);var _0x214068=util[_0x8c36('0x24')](_0x8c36('0x53'),_0x4aef20[_0x8c36('0x2b')],_[_0x8c36('0x54')](_0x5049f5['id'],'x')[0x1]);logger[_0x8c36('0x15')](_0x8c36('0x48'),_0x8c36('0x55'));emit(util[_0x8c36('0x24')]('user:%s',_0x4cba50['name']),'trigger:browser:url',{'uri':_0x214068});})[_0x8c36('0x26')](function(_0x377d99){logger[_0x8c36('0x25')](_0x8c36('0x48'),JSON[_0x8c36('0x21')](_0x377d99));});};exports[_0x8c36('0x56')]=function(_0x4d1891,_0x55d2c7,_0x5b2406,_0x102a93,_0x2bd9ce,_0x62e70,_0x5cbb2b){var _0xe59f9b,_0x51c797,_0x11acb3,_0xdab5e6;_0x62e70[_0x8c36('0x2b')]=intUtil[_0x8c36('0x57')](_0x62e70[_0x8c36('0x2b')]);_0x62e70['serverUrl']=intUtil[_0x8c36('0x57')](_0x62e70['serverUrl']);if(_0x5cbb2b&&_0x5cbb2b[_0x8c36('0x58')]&&_0x5cbb2b[_0x8c36('0x58')]!=='none'){logger[_0x8c36('0x15')](_0x8c36('0x59'),_0x8c36('0x49'));_0x55d2c7['recordingURL']=util[_0x8c36('0x24')](_0x8c36('0x4a'),_0x62e70[_0x8c36('0x4b')],_0x55d2c7[_0x8c36('0x4c')],md5(_0x55d2c7['uniqueid']));}return getConnection(_0x62e70)[_0x8c36('0x22')](function(_0x3ae9b7){_0xdab5e6=_0x3ae9b7;return getUser(_0x62e70,_0x102a93['email'],_0xdab5e6);})[_0x8c36('0x22')](function(_0x1bfe8c){_0xe59f9b=_0x1bfe8c;logger[_0x8c36('0x15')]('The\x20User\x20ID\x20is:',_0xe59f9b['id']);return getEndUser(_0x62e70,_0x55d2c7[_0x8c36('0x5a')],_0x55d2c7[_0x8c36('0x5b')],_0xdab5e6);})['then'](function(_0x2f851f){_0x51c797=_0x2f851f;logger[_0x8c36('0x15')](_0x8c36('0x50'),_0x51c797['id']);return createTicket(_0x62e70,_0xe59f9b,_0x51c797,_0x5b2406,_0x55d2c7,_0x5b2406[_0x8c36('0x51')],_0xdab5e6);})['then'](function(_0x427a22){_0x11acb3=_0x427a22;logger['info'](_0x8c36('0x52'));logger[_0x8c36('0x15')]('The\x20Ticket\x20ID\x20is:',_0x11acb3['id']);var _0x27b88d=util[_0x8c36('0x24')](_0x8c36('0x53'),_0x62e70[_0x8c36('0x2b')],_[_0x8c36('0x54')](_0x11acb3['id'],'x')[0x1]);logger[_0x8c36('0x15')](_0x8c36('0x59'),_0x8c36('0x55'));emit(util['format'](_0x8c36('0x5c'),_0x102a93[_0x8c36('0x13')]),_0x8c36('0x5d'),{'uri':_0x27b88d});})['catch'](function(_0x481920){logger[_0x8c36('0x25')](_0x8c36('0x59'),JSON[_0x8c36('0x21')](_0x481920));});};exports[_0x8c36('0x5e')]=function(_0x5da31f,_0x291a1f,_0x25c124,_0x7f1a0f,_0x5af061,_0x29581d){var _0x5d732,_0x4023ba,_0x25a1ff,_0xa3e8b4;_0x29581d['remoteUri']=intUtil[_0x8c36('0x57')](_0x29581d[_0x8c36('0x2b')]);_0x29581d[_0x8c36('0x4b')]=intUtil['stripTrailingSlash'](_0x29581d[_0x8c36('0x4b')]);if(_0x5af061&&_0x5af061[_0x8c36('0x5f')]){logger[_0x8c36('0x15')](_0x8c36('0x60'),_0x8c36('0x49'));_0x291a1f[_0x8c36('0x4d')]=util[_0x8c36('0x24')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x29581d['serverUrl'],_0x291a1f['uniqueid'],md5(_0x291a1f[_0x8c36('0x4c')]));}else{_0x291a1f[_0x8c36('0x4d')]='';}return getConnection(_0x29581d)[_0x8c36('0x22')](function(_0x243743){_0xa3e8b4=_0x243743;return getUser(_0x29581d,'',_0xa3e8b4);})[_0x8c36('0x22')](function(_0x3a08ed){_0x5d732=_0x3a08ed;logger[_0x8c36('0x15')](_0x8c36('0x4f'),_0x5d732['id']);return getEndUser(_0x29581d,_0x291a1f[_0x8c36('0x61')],_0x291a1f[_0x8c36('0x62')],_0xa3e8b4);})[_0x8c36('0x22')](function(_0x31eb60){_0x4023ba=_0x31eb60;logger[_0x8c36('0x15')](_0x8c36('0x50'),_0x4023ba['id']);return createTicket(_0x29581d,_0x5d732,_0x4023ba,_0x25c124,_0x291a1f,_0x25c124[_0x8c36('0x51')],_0xa3e8b4);})[_0x8c36('0x22')](function(_0xc75ca1){_0x25a1ff=_0xc75ca1;logger[_0x8c36('0x15')]('Ticket\x20created!');logger[_0x8c36('0x15')]('The\x20Ticket\x20ID\x20is:',_0x25a1ff['id']);})['catch'](function(_0x319bfe){logger['error'](_0x8c36('0x60'),JSON[_0x8c36('0x21')](_0x319bfe));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/zendesk.js b/server/services/ami/trigger/integration/zendesk.js
index 700bf40..e6a1b2c 100644
--- a/server/services/ami/trigger/integration/zendesk.js
+++ b/server/services/ami/trigger/integration/zendesk.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x74a4=['The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/agent/tickets/%s','catch','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','email','destcalleridname','destcalleridnum','integrationTab','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','error','Zendesk\x20account\x20type\x20not\x20recognized','abandoned','calleridnum','[ABANDONED]\x20Error\x20running\x20Zendesk\x20integration','lodash','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','defaults','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri','POST','merge','Tags','name','getString','Descriptions','Fields','then','Ticket\x20created!','ticket','validateEmail','Getting\x20agent\x20with\x20email','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','find','results','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','Searching\x20enduser\x20with\x20phone','type:user\x20role:end-user\x20phone:%s','length','first','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','end-user','Caller\x20-\x20%s','username','authType','token','Basic\x20%s','toString','stringify','GET','forEach','type','string','customField','toLowerCase','content','idField','push','variable','variableName','customVariable','Variable','custom_fields','queue','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','uniqueid','Authorization'];(function(_0x53abe5,_0x33a9e5){var _0xc1c37e=function(_0xd53c6e){while(--_0xd53c6e){_0x53abe5['push'](_0x53abe5['shift']());}};_0xc1c37e(++_0x33a9e5);}(_0x74a4,0xe4));var _0x474a=function(_0x4e2d1b,_0xf6ad94){_0x4e2d1b=_0x4e2d1b-0x0;var _0x50ff18=_0x74a4[_0x4e2d1b];return _0x50ff18;};'use strict';var _=require(_0x474a('0x0'));var rp=require('request-promise');var md5=require(_0x474a('0x1'));var util=require(_0x474a('0x2'));var Redis=require(_0x474a('0x3'));var intUtil=require(_0x474a('0x4'));var config=require(_0x474a('0x5'));var logger=require(_0x474a('0x6'))('zendesk');config[_0x474a('0x7')]=_[_0x474a('0x8')](config[_0x474a('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x474a('0x9'))(new Redis(config[_0x474a('0x7')]));function emit(_0xc6cbb3,_0xccba87,_0x3d5bb7){io['to'](_0xc6cbb3)[_0x474a('0xa')](_0xccba87,_0x3d5bb7);}var headers={'Content-Type':'application/json','Accept':_0x474a('0xb')};function getTicket(_0x5ac2e8,_0x5e4a9e,_0xb35378,_0x343082,_0x85d715){logger[_0x474a('0xc')](_0x474a('0xd'));return request({'uri':util[_0x474a('0xe')](_0x474a('0xf'),_0x5ac2e8[_0x474a('0x10')]),'method':_0x474a('0x11'),'body':{'ticket':_[_0x474a('0x12')]({'requester_id':_0xb35378['id'],'submitter_id':_0x5e4a9e?_0x5e4a9e['id']:undefined,'assignee_id':_0x5e4a9e?_0x5e4a9e['id']:undefined,'tags':getTags(_0x343082[_0x474a('0x13')],_0x474a('0x14')),'subject':intUtil[_0x474a('0x15')](_0x343082['Subjects'],_0x85d715,'\x20'),'description':intUtil[_0x474a('0x15')](_0x343082[_0x474a('0x16')],_0x85d715,'\x0a'),'comment':{'public':![],'body':intUtil[_0x474a('0x15')](_0x343082[_0x474a('0x16')],_0x85d715,'\x0a')}},getCustomFields(_0x343082[_0x474a('0x17')],_0x85d715))}})[_0x474a('0x18')](function(_0x565980){logger['info'](_0x474a('0x19'));return _0x565980[_0x474a('0x1a')];});}function getUser(_0x3cea3f,_0x224198){if(intUtil[_0x474a('0x1b')](_0x224198)){logger[_0x474a('0xc')](_0x474a('0x1c'),_0x224198);return request({'uri':util[_0x474a('0xe')]('%s/search.json',_0x3cea3f['remoteUri']),'qs':{'query':util[_0x474a('0xe')](_0x474a('0x1d'),_0x224198)}})['then'](function(_0x4804a5){if(_0x4804a5[_0x474a('0x1e')]){logger[_0x474a('0xc')](_0x474a('0x1f'));return _[_0x474a('0x20')](_0x4804a5[_0x474a('0x21')],{'email':_0x224198,'role':_0x474a('0x22')});}else{logger[_0x474a('0xc')](_0x474a('0x23'));return request({'uri':util[_0x474a('0xe')](_0x474a('0x24'),_0x3cea3f['remoteUri'])})[_0x474a('0x18')](function(_0xffed9b){logger[_0x474a('0xc')](_0x474a('0x25'));return _0xffed9b['user'];});}});}else{logger[_0x474a('0xc')](_0x474a('0x23'));return request({'uri':util[_0x474a('0xe')](_0x474a('0x24'),_0x3cea3f['remoteUri'])})['then'](function(_0x5ee66e){logger[_0x474a('0xc')](_0x474a('0x25'));return _0x5ee66e[_0x474a('0x26')];});}}function getEndUser(_0x27a8cb,_0x5ee31a,_0x4cba80){logger['info'](_0x474a('0x27'),_0x4cba80);return request({'uri':util['format']('%s/search.json',_0x27a8cb[_0x474a('0x10')]),'qs':{'query':util[_0x474a('0xe')](_0x474a('0x28'),_0x4cba80)}})['then'](function(_0x59a624){var _0x1a6969;if(_0x59a624[_0x474a('0x21')][_0x474a('0x29')]){_0x59a624[_0x474a('0x21')]=_['filter'](_0x59a624[_0x474a('0x21')],{'suspended':![],'role':'end-user'});if(_0x59a624[_0x474a('0x21')][_0x474a('0x29')]){_0x1a6969=_[_0x474a('0x2a')](_0x59a624[_0x474a('0x21')]);}}if(_0x1a6969){logger['info']('Enduser\x20found!');return _0x1a6969;}else{logger[_0x474a('0xc')](_0x474a('0x2b'));return request({'uri':util['format'](_0x474a('0x2c'),_0x27a8cb[_0x474a('0x10')]),'method':_0x474a('0x11'),'body':{'user':{'role':_0x474a('0x2d'),'name':util[_0x474a('0xe')](_0x474a('0x2e'),_0x5ee31a||_0x4cba80),'phone':_0x4cba80}}})[_0x474a('0x18')](function(_0x364915){logger[_0x474a('0xc')]('Enduser\x20created.');return _0x364915[_0x474a('0x26')];});}});}function getAuth(_0x2070df){var _0x3de00c;if(_0x2070df['authType']==='password'){_0x3de00c=util['format']('%s:%s',_0x2070df[_0x474a('0x2f')],_0x2070df['password']);}else if(_0x2070df[_0x474a('0x30')]===_0x474a('0x31')){_0x3de00c=util[_0x474a('0xe')]('%s/token:%s',_0x2070df[_0x474a('0x2f')],_0x2070df[_0x474a('0x31')]);}return util[_0x474a('0xe')](_0x474a('0x32'),new Buffer(_0x3de00c)[_0x474a('0x33')]('base64'));}function request(_0x1bbe91){logger['debug']('[HTTP]',JSON[_0x474a('0x34')](_0x1bbe91));return rp(_[_0x474a('0x8')](_0x1bbe91,{'method':_0x474a('0x35'),'headers':headers,'json':!![]}));}function getTags(_0x3d4953,_0x9d80be){var _0x57fd70=[];if(_0x3d4953&&_0x3d4953[_0x474a('0x29')]>0x0){_0x57fd70=_['map'](_0x3d4953,_0x9d80be);}return _0x57fd70;}function getCustomFields(_0x966bb2,_0x5e0672){var _0x3c4740=[];var _0x12d85e={'custom_fields':[]};if(_0x966bb2['length']>0x0){_[_0x474a('0x36')](_0x966bb2,function(_0xf2ecaf){if(_0xf2ecaf[_0x474a('0x37')]===_0x474a('0x38')&&_0xf2ecaf['nameField']&&!_0xf2ecaf[_0x474a('0x39')]){_0x12d85e[_0xf2ecaf['nameField'][_0x474a('0x3a')]()]=_0xf2ecaf[_0x474a('0x3b')][_0x474a('0x33')]();}else if(_0xf2ecaf[_0x474a('0x37')]===_0x474a('0x38')&&_0xf2ecaf[_0x474a('0x3c')]&&_0xf2ecaf[_0x474a('0x39')]){_0x12d85e['custom_fields'][_0x474a('0x3d')]({'id':_0xf2ecaf[_0x474a('0x3c')],'value':_0xf2ecaf[_0x474a('0x3b')]['toString']()});}else if(_0xf2ecaf[_0x474a('0x37')]===_0x474a('0x3e')&&_0xf2ecaf[_0x474a('0x3f')]&&_0xf2ecaf[_0x474a('0x3c')]&&_0xf2ecaf[_0x474a('0x39')]){_0x5e0672[_0xf2ecaf['variableName']]&&_0x12d85e['custom_fields']['push']({'id':_0xf2ecaf[_0x474a('0x3c')],'value':_0x5e0672[_0xf2ecaf[_0x474a('0x3f')]]['toString']()});}else if(_0xf2ecaf[_0x474a('0x37')]===_0x474a('0x40')&&_0xf2ecaf[_0x474a('0x41')]&&_0xf2ecaf[_0x474a('0x41')]['name']&&_0xf2ecaf['idField']&&_0xf2ecaf[_0x474a('0x39')]){_0x5e0672[_0xf2ecaf[_0x474a('0x41')]['name'][_0x474a('0x3a')]()]&&_0x12d85e[_0x474a('0x42')][_0x474a('0x3d')]({'id':_0xf2ecaf[_0x474a('0x3c')],'value':_0x5e0672[_0xf2ecaf[_0x474a('0x41')][_0x474a('0x14')]['toLowerCase']()][_0x474a('0x33')]()});}});}return _0x12d85e;}exports[_0x474a('0x43')]=function(_0x370ac5,_0x3c4c8a,_0x41c236,_0x36f07f,_0x1f80ab,_0x3a0838){var _0x15819f,_0x152777;_0x3a0838[_0x474a('0x10')]=intUtil[_0x474a('0x44')](_0x3a0838['remoteUri']);_0x3a0838[_0x474a('0x45')]=intUtil[_0x474a('0x44')](_0x3a0838[_0x474a('0x45')]);if(_0x1f80ab&&_0x1f80ab[_0x474a('0x46')]){logger[_0x474a('0xc')]('[QUEUE]',_0x474a('0x47'));_0x3c4c8a[_0x474a('0x48')]=util[_0x474a('0xe')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3a0838[_0x474a('0x45')],_0x3c4c8a[_0x474a('0x49')],md5(_0x3c4c8a[_0x474a('0x49')]));}else{_0x3c4c8a[_0x474a('0x48')]='';}headers[_0x474a('0x4a')]=getAuth(_0x3a0838);return getUser(_0x3a0838,_0x36f07f['email'])[_0x474a('0x18')](function(_0xf7c575){_0x15819f=_0xf7c575;logger[_0x474a('0xc')](_0x474a('0x4b'),_0x15819f['id']);return getEndUser(_0x3a0838,_0x3c4c8a[_0x474a('0x4c')],_0x3c4c8a['calleridnum']);})[_0x474a('0x18')](function(_0x37ef76){_0x152777=_0x37ef76;logger['info'](_0x474a('0x4d'),_0x152777['id']);return getTicket(_0x3a0838,_0x15819f,_0x152777,_0x41c236,_0x3c4c8a);})[_0x474a('0x18')](function(_0x28c975){if(_0x28c975){logger['info'](_0x474a('0x4e'),_0x28c975['id']);switch(_0x3a0838[_0x474a('0x37')]){case'integrationTab':logger[_0x474a('0xc')](_0x474a('0x4f'),'Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x474a('0xe')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x3a0838['remoteUri'],_0x15819f['id'],_0x28c975['id']),'method':'POST'});case'newTab':logger[_0x474a('0xc')](_0x474a('0x4f'),_0x474a('0x50'));emit(util[_0x474a('0xe')]('user:%s',_0x36f07f[_0x474a('0x14')]),_0x474a('0x51'),{'uri':util['format'](_0x474a('0x52'),_0x3a0838[_0x474a('0x10')],_0x28c975['id'])});break;default:logger['error']('[QUEUE]','Zendesk\x20account\x20type\x20not\x20recognized');}}})[_0x474a('0x53')](function(_0x4a65fb){logger['error'](_0x474a('0x54'),util[_0x474a('0x55')](_0x4a65fb,{'showHidden':!![],'depth':null}));});};exports[_0x474a('0x56')]=function(_0x28f5f6,_0x6cd071,_0x78d1d8,_0x1d5911,_0x436488,_0x3d5e42,_0x48fa59){var _0x49322f,_0x42a5f4;_0x3d5e42[_0x474a('0x10')]=intUtil[_0x474a('0x44')](_0x3d5e42[_0x474a('0x10')]);_0x3d5e42[_0x474a('0x45')]=intUtil[_0x474a('0x44')](_0x3d5e42['serverUrl']);if(_0x48fa59&&_0x48fa59['recordingFormat']&&_0x48fa59['recordingFormat']!==_0x474a('0x57')){logger[_0x474a('0xc')](_0x474a('0x58'),_0x474a('0x47'));_0x6cd071[_0x474a('0x48')]=util[_0x474a('0xe')](_0x474a('0x59'),_0x3d5e42[_0x474a('0x45')],_0x6cd071['uniqueid'],md5(_0x6cd071[_0x474a('0x49')]));}headers['Authorization']=getAuth(_0x3d5e42);return getUser(_0x3d5e42,_0x1d5911[_0x474a('0x5a')])['then'](function(_0x45225d){_0x49322f=_0x45225d;logger['info'](_0x474a('0x4b'),_0x49322f['id']);return getEndUser(_0x3d5e42,_0x6cd071[_0x474a('0x5b')],_0x6cd071[_0x474a('0x5c')]);})[_0x474a('0x18')](function(_0x447f9b){_0x42a5f4=_0x447f9b;logger[_0x474a('0xc')](_0x474a('0x4d'),_0x42a5f4['id']);return getTicket(_0x3d5e42,_0x49322f,_0x42a5f4,_0x78d1d8,_0x6cd071);})[_0x474a('0x18')](function(_0x1afae8){if(_0x1afae8){logger['info'](_0x474a('0x4e'),_0x1afae8['id']);switch(_0x3d5e42[_0x474a('0x37')]){case _0x474a('0x5d'):logger[_0x474a('0xc')](_0x474a('0x58'),'Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x474a('0xe')](_0x474a('0x5e'),_0x3d5e42[_0x474a('0x10')],_0x49322f['id'],_0x1afae8['id']),'method':_0x474a('0x11')});case _0x474a('0x5f'):logger[_0x474a('0xc')]('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x474a('0xe')]('user:%s',_0x1d5911['name']),'trigger:browser:url',{'uri':util[_0x474a('0xe')]('%s/agent/tickets/%s',_0x3d5e42[_0x474a('0x10')],_0x1afae8['id'])});break;default:logger[_0x474a('0x60')](_0x474a('0x58'),_0x474a('0x61'));}}})[_0x474a('0x53')](function(_0x1cebf1){logger[_0x474a('0x60')]('[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration',util[_0x474a('0x55')](_0x1cebf1,{'showHidden':!![],'depth':null}));});};exports[_0x474a('0x62')]=function(_0x2c869f,_0x586889,_0x16fab3,_0x1094ce,_0x2105d7,_0x563cdd){var _0x167b61,_0x3c45b2;_0x563cdd[_0x474a('0x10')]=intUtil[_0x474a('0x44')](_0x563cdd['remoteUri']);_0x563cdd['serverUrl']=intUtil[_0x474a('0x44')](_0x563cdd[_0x474a('0x45')]);if(_0x2105d7&&_0x2105d7[_0x474a('0x46')]){logger[_0x474a('0xc')]('[ABANDONED]',_0x474a('0x47'));_0x586889[_0x474a('0x48')]=util[_0x474a('0xe')](_0x474a('0x59'),_0x563cdd[_0x474a('0x45')],_0x586889['uniqueid'],md5(_0x586889[_0x474a('0x49')]));}else{_0x586889[_0x474a('0x48')]='';}headers[_0x474a('0x4a')]=getAuth(_0x563cdd);return getUser(_0x563cdd)[_0x474a('0x18')](function(_0x3a9b9f){_0x167b61=_0x3a9b9f;logger['info'](_0x474a('0x4b'),_0x167b61['id']);return getEndUser(_0x563cdd,_0x586889[_0x474a('0x4c')],_0x586889[_0x474a('0x63')]);})['then'](function(_0x5cd4ed){_0x3c45b2=_0x5cd4ed;logger[_0x474a('0xc')](_0x474a('0x4d'),_0x3c45b2['id']);return getTicket(_0x563cdd,_0x167b61,_0x3c45b2,_0x16fab3,_0x586889);})[_0x474a('0x18')](function(_0x497e6f){if(_0x497e6f){logger[_0x474a('0xc')]('The\x20Ticket\x20ID\x20is:',_0x497e6f['id']);}})[_0x474a('0x53')](function(_0x2b20dd){logger[_0x474a('0x60')](_0x474a('0x64'),util['inspect'](_0x2b20dd,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0xe0b1=['Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','Caller\x20-\x20%s','Enduser\x20created.','authType','password','%s:%s','username','token','%s/token:%s','Basic\x20%s','toString','base64','debug','map','forEach','type','string','customField','nameField','toLowerCase','idField','custom_fields','push','content','variableName','customVariable','Variable','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','POST','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/agent/tickets/%s','error','Zendesk\x20account\x20type\x20not\x20recognized','catch','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','recordingFormat','none','[OUTBOUND]','destcalleridnum','%s/channels/voice/agents/%d/tickets/%d/display.json','abandoned','[ABANDONED]\x20Error\x20running\x20Zendesk\x20integration','lodash','request-promise','./util','../../../../config/environment','../../../../config/logger','redis','defaults','socket.io-emitter','emit','application/json','info','format','%s/tickets.json','remoteUri','merge','name','Subjects','getString','Descriptions','Fields','Ticket\x20created!','ticket','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','then','count','Agent\x20found!','find','results','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','Searching\x20enduser\x20with\x20phone','length','filter','end-user'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe0b1,0x10c));var _0x1e0b=function(_0x479509,_0x1daf8a){_0x479509=_0x479509-0x0;var _0x382da8=_0xe0b1[_0x479509];return _0x382da8;};'use strict';var _=require(_0x1e0b('0x0'));var rp=require(_0x1e0b('0x1'));var md5=require('md5');var util=require('util');var Redis=require('ioredis');var intUtil=require(_0x1e0b('0x2'));var config=require(_0x1e0b('0x3'));var logger=require(_0x1e0b('0x4'))('zendesk');config[_0x1e0b('0x5')]=_[_0x1e0b('0x6')](config[_0x1e0b('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x1e0b('0x7'))(new Redis(config['redis']));function emit(_0x41dbcd,_0x18eb33,_0x28f7fc){io['to'](_0x41dbcd)[_0x1e0b('0x8')](_0x18eb33,_0x28f7fc);}var headers={'Content-Type':_0x1e0b('0x9'),'Accept':_0x1e0b('0x9')};function getTicket(_0xf816a8,_0x2f713f,_0x24803d,_0x19074e,_0x5001e0){logger[_0x1e0b('0xa')]('Creating\x20new\x20ticket...');return request({'uri':util[_0x1e0b('0xb')](_0x1e0b('0xc'),_0xf816a8[_0x1e0b('0xd')]),'method':'POST','body':{'ticket':_[_0x1e0b('0xe')]({'requester_id':_0x24803d['id'],'submitter_id':_0x2f713f?_0x2f713f['id']:undefined,'assignee_id':_0x2f713f?_0x2f713f['id']:undefined,'tags':getTags(_0x19074e['Tags'],_0x1e0b('0xf')),'subject':intUtil['getString'](_0x19074e[_0x1e0b('0x10')],_0x5001e0,'\x20'),'description':intUtil[_0x1e0b('0x11')](_0x19074e[_0x1e0b('0x12')],_0x5001e0,'\x0a'),'comment':{'public':![],'body':intUtil['getString'](_0x19074e[_0x1e0b('0x12')],_0x5001e0,'\x0a')}},getCustomFields(_0x19074e[_0x1e0b('0x13')],_0x5001e0))}})['then'](function(_0x439736){logger[_0x1e0b('0xa')](_0x1e0b('0x14'));return _0x439736[_0x1e0b('0x15')];});}function getUser(_0x1b8e3e,_0x248b80){if(intUtil[_0x1e0b('0x16')](_0x248b80)){logger[_0x1e0b('0xa')](_0x1e0b('0x17'),_0x248b80);return request({'uri':util['format'](_0x1e0b('0x18'),_0x1b8e3e['remoteUri']),'qs':{'query':util[_0x1e0b('0xb')]('type:user\x20role:agent\x20email:%s',_0x248b80)}})[_0x1e0b('0x19')](function(_0x42b7b9){if(_0x42b7b9[_0x1e0b('0x1a')]){logger[_0x1e0b('0xa')](_0x1e0b('0x1b'));return _[_0x1e0b('0x1c')](_0x42b7b9[_0x1e0b('0x1d')],{'email':_0x248b80,'role':'agent'});}else{logger['info'](_0x1e0b('0x1e'));return request({'uri':util[_0x1e0b('0xb')](_0x1e0b('0x1f'),_0x1b8e3e[_0x1e0b('0xd')])})['then'](function(_0x483272){logger['info'](_0x1e0b('0x20'));return _0x483272[_0x1e0b('0x21')];});}});}else{logger[_0x1e0b('0xa')](_0x1e0b('0x1e'));return request({'uri':util[_0x1e0b('0xb')](_0x1e0b('0x1f'),_0x1b8e3e[_0x1e0b('0xd')])})[_0x1e0b('0x19')](function(_0x5ac997){logger['info']('Admin\x20account\x20selected.');return _0x5ac997[_0x1e0b('0x21')];});}}function getEndUser(_0x29c19a,_0x3dc8de,_0x6dfa12){logger[_0x1e0b('0xa')](_0x1e0b('0x22'),_0x6dfa12);return request({'uri':util['format'](_0x1e0b('0x18'),_0x29c19a[_0x1e0b('0xd')]),'qs':{'query':util[_0x1e0b('0xb')]('type:user\x20role:end-user\x20phone:%s',_0x6dfa12)}})['then'](function(_0x33b1b5){var _0x298ecb;if(_0x33b1b5[_0x1e0b('0x1d')][_0x1e0b('0x23')]){_0x33b1b5[_0x1e0b('0x1d')]=_[_0x1e0b('0x24')](_0x33b1b5[_0x1e0b('0x1d')],{'suspended':![],'role':_0x1e0b('0x25')});if(_0x33b1b5[_0x1e0b('0x1d')][_0x1e0b('0x23')]){_0x298ecb=_['first'](_0x33b1b5[_0x1e0b('0x1d')]);}}if(_0x298ecb){logger[_0x1e0b('0xa')](_0x1e0b('0x26'));return _0x298ecb;}else{logger[_0x1e0b('0xa')](_0x1e0b('0x27'));return request({'uri':util[_0x1e0b('0xb')](_0x1e0b('0x28'),_0x29c19a[_0x1e0b('0xd')]),'method':'POST','body':{'user':{'role':_0x1e0b('0x25'),'name':util[_0x1e0b('0xb')](_0x1e0b('0x29'),_0x3dc8de||_0x6dfa12),'phone':_0x6dfa12}}})[_0x1e0b('0x19')](function(_0x2f2f82){logger[_0x1e0b('0xa')](_0x1e0b('0x2a'));return _0x2f2f82[_0x1e0b('0x21')];});}});}function getAuth(_0x3bcaae){var _0x1fdeb1;if(_0x3bcaae[_0x1e0b('0x2b')]===_0x1e0b('0x2c')){_0x1fdeb1=util['format'](_0x1e0b('0x2d'),_0x3bcaae[_0x1e0b('0x2e')],_0x3bcaae[_0x1e0b('0x2c')]);}else if(_0x3bcaae[_0x1e0b('0x2b')]===_0x1e0b('0x2f')){_0x1fdeb1=util[_0x1e0b('0xb')](_0x1e0b('0x30'),_0x3bcaae[_0x1e0b('0x2e')],_0x3bcaae[_0x1e0b('0x2f')]);}return util[_0x1e0b('0xb')](_0x1e0b('0x31'),new Buffer(_0x1fdeb1)[_0x1e0b('0x32')](_0x1e0b('0x33')));}function request(_0x18702c){logger[_0x1e0b('0x34')]('[HTTP]',JSON['stringify'](_0x18702c));return rp(_[_0x1e0b('0x6')](_0x18702c,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0x54564c,_0x545b7d){var _0xdd92f3=[];if(_0x54564c&&_0x54564c[_0x1e0b('0x23')]>0x0){_0xdd92f3=_[_0x1e0b('0x35')](_0x54564c,_0x545b7d);}return _0xdd92f3;}function getCustomFields(_0x245b38,_0x1c1b89){var _0x25de58=[];var _0x35d348={'custom_fields':[]};if(_0x245b38[_0x1e0b('0x23')]>0x0){_[_0x1e0b('0x36')](_0x245b38,function(_0x72a142){if(_0x72a142[_0x1e0b('0x37')]===_0x1e0b('0x38')&&_0x72a142['nameField']&&!_0x72a142[_0x1e0b('0x39')]){_0x35d348[_0x72a142[_0x1e0b('0x3a')][_0x1e0b('0x3b')]()]=_0x72a142['content'][_0x1e0b('0x32')]();}else if(_0x72a142[_0x1e0b('0x37')]===_0x1e0b('0x38')&&_0x72a142[_0x1e0b('0x3c')]&&_0x72a142[_0x1e0b('0x39')]){_0x35d348[_0x1e0b('0x3d')][_0x1e0b('0x3e')]({'id':_0x72a142[_0x1e0b('0x3c')],'value':_0x72a142[_0x1e0b('0x3f')]['toString']()});}else if(_0x72a142[_0x1e0b('0x37')]==='variable'&&_0x72a142[_0x1e0b('0x40')]&&_0x72a142[_0x1e0b('0x3c')]&&_0x72a142[_0x1e0b('0x39')]){_0x1c1b89[_0x72a142[_0x1e0b('0x40')]]&&_0x35d348['custom_fields'][_0x1e0b('0x3e')]({'id':_0x72a142['idField'],'value':_0x1c1b89[_0x72a142[_0x1e0b('0x40')]][_0x1e0b('0x32')]()});}else if(_0x72a142[_0x1e0b('0x37')]===_0x1e0b('0x41')&&_0x72a142['Variable']&&_0x72a142[_0x1e0b('0x42')][_0x1e0b('0xf')]&&_0x72a142['idField']&&_0x72a142[_0x1e0b('0x39')]){_0x1c1b89[_0x72a142[_0x1e0b('0x42')][_0x1e0b('0xf')][_0x1e0b('0x3b')]()]&&_0x35d348['custom_fields'][_0x1e0b('0x3e')]({'id':_0x72a142[_0x1e0b('0x3c')],'value':_0x1c1b89[_0x72a142[_0x1e0b('0x42')][_0x1e0b('0xf')][_0x1e0b('0x3b')]()][_0x1e0b('0x32')]()});}});}return _0x35d348;}exports['queue']=function(_0x3a7532,_0x46a7aa,_0x1a0736,_0x5076e6,_0x3470ba,_0x570611){var _0x200cb4,_0x6d5800;_0x570611[_0x1e0b('0xd')]=intUtil[_0x1e0b('0x43')](_0x570611['remoteUri']);_0x570611[_0x1e0b('0x44')]=intUtil[_0x1e0b('0x43')](_0x570611[_0x1e0b('0x44')]);if(_0x3470ba&&_0x3470ba[_0x1e0b('0x45')]){logger['info'](_0x1e0b('0x46'),_0x1e0b('0x47'));_0x46a7aa[_0x1e0b('0x48')]=util[_0x1e0b('0xb')](_0x1e0b('0x49'),_0x570611['serverUrl'],_0x46a7aa[_0x1e0b('0x4a')],md5(_0x46a7aa[_0x1e0b('0x4a')]));}else{_0x46a7aa[_0x1e0b('0x48')]='';}headers[_0x1e0b('0x4b')]=getAuth(_0x570611);return getUser(_0x570611,_0x5076e6[_0x1e0b('0x4c')])[_0x1e0b('0x19')](function(_0x26f725){_0x200cb4=_0x26f725;logger[_0x1e0b('0xa')](_0x1e0b('0x4d'),_0x200cb4['id']);return getEndUser(_0x570611,_0x46a7aa[_0x1e0b('0x4e')],_0x46a7aa[_0x1e0b('0x4f')]);})[_0x1e0b('0x19')](function(_0xc38c9c){_0x6d5800=_0xc38c9c;logger[_0x1e0b('0xa')](_0x1e0b('0x50'),_0x6d5800['id']);return getTicket(_0x570611,_0x200cb4,_0x6d5800,_0x1a0736,_0x46a7aa);})[_0x1e0b('0x19')](function(_0x1cddcd){if(_0x1cddcd){logger[_0x1e0b('0xa')](_0x1e0b('0x51'),_0x1cddcd['id']);switch(_0x570611['type']){case _0x1e0b('0x52'):logger[_0x1e0b('0xa')](_0x1e0b('0x46'),_0x1e0b('0x53'));return request({'uri':util[_0x1e0b('0xb')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x570611[_0x1e0b('0xd')],_0x200cb4['id'],_0x1cddcd['id']),'method':_0x1e0b('0x54')});case _0x1e0b('0x55'):logger['info'](_0x1e0b('0x46'),_0x1e0b('0x56'));emit(util[_0x1e0b('0xb')](_0x1e0b('0x57'),_0x5076e6[_0x1e0b('0xf')]),_0x1e0b('0x58'),{'uri':util[_0x1e0b('0xb')](_0x1e0b('0x59'),_0x570611[_0x1e0b('0xd')],_0x1cddcd['id'])});break;default:logger[_0x1e0b('0x5a')](_0x1e0b('0x46'),_0x1e0b('0x5b'));}}})[_0x1e0b('0x5c')](function(_0x50f10){logger[_0x1e0b('0x5a')](_0x1e0b('0x5d'),util[_0x1e0b('0x5e')](_0x50f10,{'showHidden':!![],'depth':null}));});};exports['outbound']=function(_0x408633,_0xa43633,_0xc1e7df,_0x56fb38,_0x37b1b2,_0x4d2b3e,_0x2561c3){var _0x74e318,_0x3b748c;_0x4d2b3e[_0x1e0b('0xd')]=intUtil[_0x1e0b('0x43')](_0x4d2b3e[_0x1e0b('0xd')]);_0x4d2b3e[_0x1e0b('0x44')]=intUtil[_0x1e0b('0x43')](_0x4d2b3e[_0x1e0b('0x44')]);if(_0x2561c3&&_0x2561c3[_0x1e0b('0x5f')]&&_0x2561c3['recordingFormat']!==_0x1e0b('0x60')){logger['info'](_0x1e0b('0x61'),_0x1e0b('0x47'));_0xa43633[_0x1e0b('0x48')]=util['format'](_0x1e0b('0x49'),_0x4d2b3e[_0x1e0b('0x44')],_0xa43633['uniqueid'],md5(_0xa43633[_0x1e0b('0x4a')]));}headers['Authorization']=getAuth(_0x4d2b3e);return getUser(_0x4d2b3e,_0x56fb38[_0x1e0b('0x4c')])['then'](function(_0x3fca6c){_0x74e318=_0x3fca6c;logger[_0x1e0b('0xa')](_0x1e0b('0x4d'),_0x74e318['id']);return getEndUser(_0x4d2b3e,_0xa43633['destcalleridname'],_0xa43633[_0x1e0b('0x62')]);})[_0x1e0b('0x19')](function(_0x444174){_0x3b748c=_0x444174;logger[_0x1e0b('0xa')](_0x1e0b('0x50'),_0x3b748c['id']);return getTicket(_0x4d2b3e,_0x74e318,_0x3b748c,_0xc1e7df,_0xa43633);})['then'](function(_0x69aecd){if(_0x69aecd){logger[_0x1e0b('0xa')](_0x1e0b('0x51'),_0x69aecd['id']);switch(_0x4d2b3e['type']){case _0x1e0b('0x52'):logger[_0x1e0b('0xa')]('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent...');return request({'uri':util['format'](_0x1e0b('0x63'),_0x4d2b3e['remoteUri'],_0x74e318['id'],_0x69aecd['id']),'method':_0x1e0b('0x54')});case'newTab':logger[_0x1e0b('0xa')](_0x1e0b('0x61'),_0x1e0b('0x56'));emit(util[_0x1e0b('0xb')](_0x1e0b('0x57'),_0x56fb38[_0x1e0b('0xf')]),_0x1e0b('0x58'),{'uri':util['format'](_0x1e0b('0x59'),_0x4d2b3e[_0x1e0b('0xd')],_0x69aecd['id'])});break;default:logger[_0x1e0b('0x5a')](_0x1e0b('0x61'),_0x1e0b('0x5b'));}}})['catch'](function(_0x3faa41){logger[_0x1e0b('0x5a')]('[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration',util['inspect'](_0x3faa41,{'showHidden':!![],'depth':null}));});};exports[_0x1e0b('0x64')]=function(_0x2a9972,_0x27d773,_0x908699,_0x4a4223,_0x1d060e,_0x3a878e){var _0x378a79,_0x1b5747;_0x3a878e[_0x1e0b('0xd')]=intUtil[_0x1e0b('0x43')](_0x3a878e[_0x1e0b('0xd')]);_0x3a878e[_0x1e0b('0x44')]=intUtil[_0x1e0b('0x43')](_0x3a878e[_0x1e0b('0x44')]);if(_0x1d060e&&_0x1d060e[_0x1e0b('0x45')]){logger['info']('[ABANDONED]',_0x1e0b('0x47'));_0x27d773['recordingURL']=util[_0x1e0b('0xb')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3a878e[_0x1e0b('0x44')],_0x27d773['uniqueid'],md5(_0x27d773[_0x1e0b('0x4a')]));}else{_0x27d773[_0x1e0b('0x48')]='';}headers[_0x1e0b('0x4b')]=getAuth(_0x3a878e);return getUser(_0x3a878e)[_0x1e0b('0x19')](function(_0x197728){_0x378a79=_0x197728;logger['info'](_0x1e0b('0x4d'),_0x378a79['id']);return getEndUser(_0x3a878e,_0x27d773[_0x1e0b('0x4e')],_0x27d773[_0x1e0b('0x4f')]);})[_0x1e0b('0x19')](function(_0x71442e){_0x1b5747=_0x71442e;logger['info'](_0x1e0b('0x50'),_0x1b5747['id']);return getTicket(_0x3a878e,_0x378a79,_0x1b5747,_0x908699,_0x27d773);})[_0x1e0b('0x19')](function(_0x7edb72){if(_0x7edb72){logger[_0x1e0b('0xa')]('The\x20Ticket\x20ID\x20is:',_0x7edb72['id']);}})[_0x1e0b('0x5c')](function(_0xcaf74d){logger['error'](_0x1e0b('0x65'),util[_0x1e0b('0x5e')](_0xcaf74d,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/zoho.js b/server/services/ami/trigger/integration/zoho.js
index 5cc47de..f8f45a6 100644
--- a/server/services/ami/trigger/integration/zoho.js
+++ b/server/services/ami/trigger/integration/zoho.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3358=['Call\x20Duration','utc','endtime','diff','LEADID','SEMODULE','Leads','','hasOwnProperty','%s ','encodeXML','
','POST','host','authToken','toJson','response','result','recorddetail','info','Call\x20created!','GET','AllUsers','crmapi','then','users','log','zoho\x20data\x20users','user','isArrayLikeObject','isNil','Standard','active','Using\x20the\x20admin\x20account!','find','Administrator','zoho\x20user','error','stringify','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','The\x20failing\x20result\x20is','https://crm.%s/crm/private/json/Contacts/searchRecords','((Phone:%s))','Enduser\x20found\x20in\x20Contacts!','Contacts','row','length','val','content','https://crm.%s/crm/private/json/Leads/searchRecords','https://crm.%s/crm/private/xml/Leads/insertRecords','%s %s %s |
','parse','Enduser\x20created.','https://crm.%s/crm/private/json/Leads/getRecordById','Error\x20on\x20Lead\x20creation:\x20','Error\x20on\x20Lead\x20retrieve:\x20','debug','[HTTP]','forEach','type','string','idField','toString','variable','variableName','customVariable','Variable','name','toLowerCase','indexOf','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','CONTACTID','The\x20Call\x20ID\x20is:','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://crm.%s/crm/EntityInfo.do?module=Calls&id=%s','catch','recordingFormat','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','Outbound','[ABANDONED]','calleridname','lodash','request-promise','md5','./util','xml2json','entities','ioredis','../../../../config/environment','../../../../config/logger','zoho','defaults','redis','localhost','socket.io-emitter','emit','application/json','inbound','outbound','starttime','format','YYYY-MM-DD\x20HH:mm:ss','getString','Subjects','Descriptions','Fields','lastevent','called','Called','complete','connect','Answered','Call\x20Result','Rejected','abandoned','Abandoned','talktime'];(function(_0x567b0d,_0x23d62f){var _0x390ed2=function(_0x30b456){while(--_0x30b456){_0x567b0d['push'](_0x567b0d['shift']());}};_0x390ed2(++_0x23d62f);}(_0x3358,0x16b));var _0x8335=function(_0x9f94e1,_0x21455c){_0x9f94e1=_0x9f94e1-0x0;var _0x575738=_0x3358[_0x9f94e1];return _0x575738;};'use strict';var _=require(_0x8335('0x0'));var rp=require(_0x8335('0x1'));var md5=require(_0x8335('0x2'));var util=require('util');var intUtil=require(_0x8335('0x3'));var parser=require(_0x8335('0x4'));var entities=require(_0x8335('0x5'));var moment=require('moment');var Redis=require(_0x8335('0x6'));var config=require(_0x8335('0x7'));var logger=require(_0x8335('0x8'))(_0x8335('0x9'));config['redis']=_[_0x8335('0xa')](config[_0x8335('0xb')],{'host':_0x8335('0xc'),'port':0x18eb});var io=require(_0x8335('0xd'))(new Redis(config[_0x8335('0xb')]));function emit(_0x5e2278,_0x2c57d7,_0x2c0691){io['to'](_0x5e2278)[_0x8335('0xe')](_0x2c57d7,_0x2c0691);}var headers={'Content-Type':_0x8335('0xf'),'Accept':'application/json'};function getCall(_0xf57bff,_0x3efd26,_0x258b06,_0x40284d,_0x4e48fc,_0x4889d1){logger['info']('Creating\x20new\x20call...');var _0x1eb10c=_['merge']({'SMOWNERID':_0x3efd26['id'],'Call Type':_0x4889d1||_0x8335('0x10'),'Call Start Time':(_0x4889d1===_0x8335('0x11')?_0x4e48fc[_0x8335('0x12')]:_0x4e48fc['agentcalledAt'])||moment()[_0x8335('0x13')](_0x8335('0x14')),'Subject':intUtil[_0x8335('0x15')](_0x40284d[_0x8335('0x16')],_0x4e48fc,'\x20'),'Description':intUtil[_0x8335('0x15')](_0x40284d[_0x8335('0x17')],_0x4e48fc,'\x0a')},getCustomFields(_0x40284d[_0x8335('0x18')],_0x4e48fc));switch(_0x4e48fc[_0x8335('0x19')]){case _0x8335('0x1a'):_0x1eb10c['Call\x20Result']=_0x8335('0x1b');break;case _0x8335('0x1c'):case _0x8335('0x1d'):_0x1eb10c['Call\x20Result']=_0x8335('0x1e');break;case'rejected':_0x1eb10c[_0x8335('0x1f')]=_0x8335('0x20');break;case _0x8335('0x21'):_0x1eb10c[_0x8335('0x1f')]=_0x8335('0x22');break;default:}if(_0x4e48fc[_0x8335('0x23')]){_0x1eb10c[_0x8335('0x24')]=moment[_0x8335('0x25')](parseInt(_0x4e48fc['talktime'])*0x3e8)[_0x8335('0x13')]('mm:ss');}else if(_0x4e48fc['answertime']&&_0x4e48fc[_0x8335('0x26')]){_0x1eb10c[_0x8335('0x24')]=moment[_0x8335('0x25')](moment(_0x4e48fc['endtime'],_0x8335('0x14'))[_0x8335('0x27')](moment(_0x4e48fc['starttime'],'YYYY-MM-DD\x20HH:mm:ss')))[_0x8335('0x13')]('mm:ss');}if(_0x258b06['CONTACTID']){_0x1eb10c['CONTACTID']=_0x258b06['CONTACTID'];}else if(_0x258b06[_0x8335('0x28')]){_0x1eb10c[_0x8335('0x29')]=_0x8335('0x2a');_0x1eb10c['SEID']=_0x258b06['LEADID'];}var _0x5af877=_0x8335('0x2b');for(var _0x461beb in _0x1eb10c){if(_0x1eb10c[_0x8335('0x2c')](_0x461beb)){_0x5af877+=util[_0x8335('0x13')](_0x8335('0x2d'),entities[_0x8335('0x2e')](_0x461beb),entities['encodeXML'](_0x1eb10c[_0x461beb]));}}_0x5af877+=_0x8335('0x2f');return request({'method':_0x8335('0x30'),'uri':util[_0x8335('0x13')]('https://crm.%s/crm/private/xml/Calls/insertRecords',_0xf57bff[_0x8335('0x31')]),'qs':{'authtoken':_0xf57bff[_0x8335('0x32')],'scope':'crmapi','xmlData':_0x5af877},'json':!![]})['then'](function(_0xadc51d){_0xadc51d=JSON['parse'](parser[_0x8335('0x33')](_0xadc51d));if(_0xadc51d[_0x8335('0x34')]){if(_0xadc51d['response'][_0x8335('0x35')]&&_0xadc51d['response'][_0x8335('0x35')][_0x8335('0x36')]){logger[_0x8335('0x37')](_0x8335('0x38'));return{'id':_0xadc51d['response'][_0x8335('0x35')][_0x8335('0x36')]['FL'][0x0]['$t']};}}throw new Error('Error\x20on\x20call\x20creation:\x20'+JSON['stringify'](_0xadc51d));});}function getUser(_0x2e9e21,_0x513d5c){return request({'method':_0x8335('0x39'),'uri':util[_0x8335('0x13')]('https://crm.%s/crm/private/json/Users/getUsers',_0x2e9e21[_0x8335('0x31')]),'qs':{'type':_0x8335('0x3a'),'authtoken':_0x2e9e21[_0x8335('0x32')],'scope':_0x8335('0x3b')},'json':!![]})[_0x8335('0x3c')](function(_0xc54906){if(_0xc54906[_0x8335('0x3d')]&&_0xc54906[_0x8335('0x3d')]['user']){var _0x5015e1;console[_0x8335('0x3e')](_0x8335('0x3f'),_0xc54906['users'][_0x8335('0x40')]);if(_[_0x8335('0x41')](_0xc54906[_0x8335('0x3d')]['user'])){console[_0x8335('0x3e')](_0x8335('0x3f'),_0xc54906[_0x8335('0x3d')][_0x8335('0x40')]);if(!_[_0x8335('0x42')](_0x513d5c)){_0x5015e1=_['find'](_0xc54906[_0x8335('0x3d')][_0x8335('0x40')],{'email':_0x513d5c,'profile':_0x8335('0x43'),'status':_0x8335('0x44')});}if(!_['isNil'](_0x5015e1)){logger[_0x8335('0x37')]('Agent\x20found!');}else{logger[_0x8335('0x37')](_0x8335('0x45'));_0x5015e1=_[_0x8335('0x46')](_0xc54906[_0x8335('0x3d')]['user'],{'profile':_0x8335('0x47')});}console[_0x8335('0x3e')](_0x8335('0x48'),_0x5015e1);return _0x5015e1;}else{if(_0xc54906[_0x8335('0x3d')][_0x8335('0x40')]['profile']===_0x8335('0x47')){logger[_0x8335('0x37')](_0x8335('0x45'));_0x5015e1=_0xc54906['users'][_0x8335('0x40')];return _0x5015e1;}else{logger[_0x8335('0x49')]('The\x20failing\x20result\x20is',JSON[_0x8335('0x4a')](_0xc54906));throw new Error(_0x8335('0x4b')+JSON['stringify'](_0xc54906));}}}else{logger[_0x8335('0x49')](_0x8335('0x4c'),JSON[_0x8335('0x4a')](_0xc54906));throw new Error(_0x8335('0x4b')+JSON[_0x8335('0x4a')](_0xc54906));}});}function getEndUser(_0x3fbe34,_0x54e63f,_0x366441){logger[_0x8335('0x37')]('Searching\x20enduser\x20with\x20phone',_0x366441);return request({'method':'GET','uri':util[_0x8335('0x13')](_0x8335('0x4d'),_0x3fbe34[_0x8335('0x31')]),'qs':{'authtoken':_0x3fbe34[_0x8335('0x32')],'scope':_0x8335('0x3b'),'criteria':util['format'](_0x8335('0x4e'),_0x366441)},'json':!![]})[_0x8335('0x3c')](function(_0x2d44ec){if(_0x2d44ec['response']&&_0x2d44ec[_0x8335('0x34')][_0x8335('0x35')]){logger[_0x8335('0x37')](_0x8335('0x4f'));var _0x2c5e66={};var _0x552934=_0x2d44ec[_0x8335('0x34')][_0x8335('0x35')][_0x8335('0x50')][_0x8335('0x51')]['no']?_0x2d44ec[_0x8335('0x34')][_0x8335('0x35')][_0x8335('0x50')]['row']['FL']:_0x2d44ec['response'][_0x8335('0x35')][_0x8335('0x50')]['row'][0x0]['FL'];for(var _0x13a22d=0x0,_0x2d69a5=_0x552934[_0x8335('0x52')];_0x13a22d<_0x2d69a5;_0x13a22d++){_0x2c5e66[_0x552934[_0x13a22d][_0x8335('0x53')]]=_0x552934[_0x13a22d][_0x8335('0x54')];}return _0x2c5e66;}else{return request({'method':'GET','uri':util['format'](_0x8335('0x55'),_0x3fbe34[_0x8335('0x31')]),'qs':{'authtoken':_0x3fbe34[_0x8335('0x32')],'scope':_0x8335('0x3b'),'criteria':util[_0x8335('0x13')](_0x8335('0x4e'),_0x366441)},'json':!![]})[_0x8335('0x3c')](function(_0x4387ba){if(_0x4387ba[_0x8335('0x34')]&&_0x4387ba[_0x8335('0x34')][_0x8335('0x35')]){logger[_0x8335('0x37')]('Enduser\x20found\x20in\x20Leads!');var _0x1480de={};var _0x41ba12=_0x4387ba['response'][_0x8335('0x35')]['Leads'][_0x8335('0x51')]['no']?_0x4387ba[_0x8335('0x34')][_0x8335('0x35')][_0x8335('0x2a')][_0x8335('0x51')]['FL']:_0x4387ba[_0x8335('0x34')]['result'][_0x8335('0x2a')][_0x8335('0x51')][0x0]['FL'];for(var _0x2db620=0x0,_0x507128=_0x41ba12['length'];_0x2db620<_0x507128;_0x2db620++){_0x1480de[_0x41ba12[_0x2db620]['val']]=_0x41ba12[_0x2db620][_0x8335('0x54')];}return _0x1480de;}else{logger[_0x8335('0x37')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');_0x54e63f=getName(_0x54e63f);return request({'method':_0x8335('0x30'),'uri':util[_0x8335('0x13')](_0x8335('0x56'),_0x3fbe34[_0x8335('0x31')]),'qs':{'authtoken':_0x3fbe34[_0x8335('0x32')],'scope':_0x8335('0x3b'),'xmlData':util[_0x8335('0x13')](_0x8335('0x57'),entities[_0x8335('0x2e')](_0x54e63f[0x0]),entities[_0x8335('0x2e')](_0x54e63f[0x1]),_0x366441)},'json':!![]})[_0x8335('0x3c')](function(_0x2c61cf){_0x2c61cf=JSON[_0x8335('0x58')](parser[_0x8335('0x33')](_0x2c61cf));if(_0x2c61cf['response']){if(_0x2c61cf[_0x8335('0x34')][_0x8335('0x35')]&&_0x2c61cf['response'][_0x8335('0x35')]['recorddetail']){logger[_0x8335('0x37')](_0x8335('0x59'));return request({'method':'GET','uri':util[_0x8335('0x13')](_0x8335('0x5a'),_0x3fbe34[_0x8335('0x31')]),'qs':{'authtoken':_0x3fbe34[_0x8335('0x32')],'scope':_0x8335('0x3b'),'id':_0x2c61cf[_0x8335('0x34')][_0x8335('0x35')][_0x8335('0x36')]['FL'][0x0]['$t']},'json':!![]});}}throw new Error(_0x8335('0x5b')+JSON[_0x8335('0x4a')](_0x2c61cf));})[_0x8335('0x3c')](function(_0x37dfa6){if(_0x37dfa6[_0x8335('0x34')]){if(_0x37dfa6[_0x8335('0x34')][_0x8335('0x35')]){var _0x3a5d75={};for(var _0x400c68=0x0,_0x4c8ebe=_0x37dfa6[_0x8335('0x34')][_0x8335('0x35')][_0x8335('0x2a')]['row']['FL'][_0x8335('0x52')];_0x400c68<_0x4c8ebe;_0x400c68++){_0x3a5d75[_0x37dfa6[_0x8335('0x34')][_0x8335('0x35')][_0x8335('0x2a')]['row']['FL'][_0x400c68][_0x8335('0x53')]]=_0x37dfa6[_0x8335('0x34')]['result'][_0x8335('0x2a')][_0x8335('0x51')]['FL'][_0x400c68][_0x8335('0x54')];}return _0x3a5d75;}}throw new Error(_0x8335('0x5c')+JSON[_0x8335('0x4a')](_0x37dfa6));});}});}});}function request(_0x30068b){logger[_0x8335('0x5d')](_0x8335('0x5e'),JSON[_0x8335('0x4a')](_0x30068b));return rp(_0x30068b);}function getCustomFields(_0x2291c8,_0x4fd0df){var _0x3fc31a={};if(_0x2291c8['length']>0x0){_[_0x8335('0x5f')](_0x2291c8,function(_0x52edba){if(_0x52edba[_0x8335('0x60')]===_0x8335('0x61')&&_0x52edba[_0x8335('0x62')]){_0x3fc31a[_0x52edba[_0x8335('0x62')]]=_0x52edba[_0x8335('0x54')][_0x8335('0x63')]();}else if(_0x52edba[_0x8335('0x60')]===_0x8335('0x64')&&_0x52edba[_0x8335('0x65')]&&_0x52edba[_0x8335('0x62')]&&_0x4fd0df[_0x52edba['variableName']]){_0x3fc31a[_0x52edba[_0x8335('0x62')]]=_0x4fd0df[_0x52edba[_0x8335('0x65')]][_0x8335('0x63')]();}else if(_0x52edba[_0x8335('0x60')]===_0x8335('0x66')&&_0x52edba[_0x8335('0x67')]&&_0x52edba['Variable'][_0x8335('0x68')]&&_0x52edba[_0x8335('0x62')]&&_0x4fd0df[_0x52edba['Variable'][_0x8335('0x68')][_0x8335('0x69')]()]){_0x3fc31a[_0x52edba[_0x8335('0x62')]]=_0x4fd0df[_0x52edba['Variable'][_0x8335('0x68')][_0x8335('0x69')]()][_0x8335('0x63')]();}});}return _0x3fc31a;}function getName(_0x2c814b){if(_0x2c814b[_0x8335('0x6a')]('\x20')>0x0){var _0x482fe3=_0x2c814b['split'](/ (.+)/);if(_0x482fe3[0x1]){return _0x482fe3;}}return[_0x2c814b,_0x2c814b];}exports[_0x8335('0x6b')]=function(_0x2605d3,_0x180b58,_0x3f3c9e,_0xd4bc73,_0x18deb0,_0x238b21){var _0x418ff1,_0x1e6591;_0x238b21[_0x8335('0x31')]=intUtil['stripTrailingSlash'](_0x238b21[_0x8335('0x31')]);_0x238b21[_0x8335('0x6c')]=intUtil[_0x8335('0x6d')](_0x238b21['serverUrl']);if(_0x18deb0&&_0x18deb0[_0x8335('0x6e')]){logger[_0x8335('0x37')](_0x8335('0x6f'),_0x8335('0x70'));_0x180b58['recordingURL']=util[_0x8335('0x13')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x238b21[_0x8335('0x6c')],_0x180b58[_0x8335('0x71')],md5(_0x180b58['uniqueid']));}else{_0x180b58[_0x8335('0x72')]='';}return getUser(_0x238b21,_0xd4bc73[_0x8335('0x73')])[_0x8335('0x3c')](function(_0x5a51d5){_0x418ff1=_0x5a51d5;logger[_0x8335('0x37')](_0x8335('0x74'),_0x418ff1['id']);return getEndUser(_0x238b21,_0x180b58['calleridname'],_0x180b58[_0x8335('0x75')]);})['then'](function(_0x29241e){_0x1e6591=_0x29241e;logger[_0x8335('0x37')](_0x8335('0x76'),_0x1e6591[_0x8335('0x77')]||_0x1e6591[_0x8335('0x28')]);return getCall(_0x238b21,_0x418ff1,_0x1e6591,_0x3f3c9e,_0x180b58,'Inbound');})[_0x8335('0x3c')](function(_0x4f570f){if(_0x4f570f){logger[_0x8335('0x37')](_0x8335('0x78'),_0x4f570f['id']);logger[_0x8335('0x37')]('[QUEUE]',_0x8335('0x79'));emit(util[_0x8335('0x13')](_0x8335('0x7a'),_0xd4bc73['name']),_0x8335('0x7b'),{'uri':util[_0x8335('0x13')](_0x8335('0x7c'),_0x238b21[_0x8335('0x31')],_0x4f570f['id'])});}})[_0x8335('0x7d')](function(_0x3b063d){logger[_0x8335('0x49')](_0x8335('0x6f'),JSON[_0x8335('0x4a')](_0x3b063d));});};exports[_0x8335('0x11')]=function(_0x91554b,_0x42c5b8,_0x4b3de6,_0x5eaeae,_0x367013,_0x267865,_0x2653b1){var _0x183e5b,_0x16835e;_0x267865[_0x8335('0x31')]=intUtil[_0x8335('0x6d')](_0x267865[_0x8335('0x31')]);_0x267865[_0x8335('0x6c')]=intUtil[_0x8335('0x6d')](_0x267865[_0x8335('0x6c')]);if(_0x2653b1&&_0x2653b1[_0x8335('0x7e')]&&_0x2653b1[_0x8335('0x7e')]!=='none'){logger['info'](_0x8335('0x7f'),'Recording\x20is\x20enabled!');_0x42c5b8[_0x8335('0x72')]=util[_0x8335('0x13')](_0x8335('0x80'),_0x267865['serverUrl'],_0x42c5b8[_0x8335('0x71')],md5(_0x42c5b8['uniqueid']));}return getUser(_0x267865,_0x5eaeae[_0x8335('0x73')])[_0x8335('0x3c')](function(_0x18d220){_0x183e5b=_0x18d220;logger[_0x8335('0x37')](_0x8335('0x74'),_0x183e5b['id']);return getEndUser(_0x267865,_0x42c5b8[_0x8335('0x81')],_0x42c5b8['destcalleridnum']);})[_0x8335('0x3c')](function(_0x4a6f56){_0x16835e=_0x4a6f56;logger[_0x8335('0x37')](_0x8335('0x76'),_0x16835e[_0x8335('0x77')]||_0x16835e[_0x8335('0x28')]);return getCall(_0x267865,_0x183e5b,_0x16835e,_0x4b3de6,_0x42c5b8,_0x8335('0x82'));})[_0x8335('0x3c')](function(_0x87d339){if(_0x87d339){logger[_0x8335('0x37')](_0x8335('0x78'),_0x87d339['id']);logger[_0x8335('0x37')](_0x8335('0x7f'),_0x8335('0x79'));emit(util[_0x8335('0x13')](_0x8335('0x7a'),_0x5eaeae[_0x8335('0x68')]),'trigger:browser:url',{'uri':util[_0x8335('0x13')]('https://crm.%s/crm/EntityInfo.do?module=Calls&id=%s',_0x267865[_0x8335('0x31')],_0x87d339['id'])});}})['catch'](function(_0x259829){logger['error'](_0x8335('0x7f'),JSON[_0x8335('0x4a')](_0x259829));});};exports['abandoned']=function(_0x478bbc,_0x59ea62,_0x32e3c1,_0x117164,_0x4ed90b,_0x5c7956){var _0x3a9ab9,_0x57f445;_0x5c7956[_0x8335('0x31')]=intUtil[_0x8335('0x6d')](_0x5c7956[_0x8335('0x31')]);_0x5c7956['serverUrl']=intUtil[_0x8335('0x6d')](_0x5c7956[_0x8335('0x6c')]);if(_0x4ed90b&&_0x4ed90b[_0x8335('0x6e')]){logger[_0x8335('0x37')](_0x8335('0x83'),_0x8335('0x70'));_0x59ea62[_0x8335('0x72')]=util['format'](_0x8335('0x80'),_0x5c7956[_0x8335('0x6c')],_0x59ea62[_0x8335('0x71')],md5(_0x59ea62[_0x8335('0x71')]));}else{_0x59ea62[_0x8335('0x72')]='';}return getUser(_0x5c7956)['then'](function(_0x57d432){_0x3a9ab9=_0x57d432;logger['info'](_0x8335('0x74'),_0x3a9ab9['id']);return getEndUser(_0x5c7956,_0x59ea62[_0x8335('0x84')],_0x59ea62[_0x8335('0x75')]);})[_0x8335('0x3c')](function(_0x10b9a0){_0x57f445=_0x10b9a0;logger['info']('The\x20Enduser\x20ID\x20is:',_0x57f445[_0x8335('0x77')]||_0x57f445[_0x8335('0x28')]);return getCall(_0x5c7956,_0x3a9ab9,_0x57f445,_0x32e3c1,_0x59ea62,'Inbound');})[_0x8335('0x3c')](function(_0x53f4a3){if(_0x53f4a3){logger[_0x8335('0x37')](_0x8335('0x78'),_0x53f4a3['id']);}})[_0x8335('0x7d')](function(_0x417887){logger[_0x8335('0x49')](_0x8335('0x83'),JSON[_0x8335('0x4a')](_0x417887));});};
\ No newline at end of file
+var _0xf05f=['idField','toString','variable','variableName','customVariable','Variable','name','toLowerCase','split','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','uniqueid','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Call\x20ID\x20is:','[QUEUE]','user:%s','trigger:browser:url','catch','recordingFormat','none','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','[OUTBOUND]','https://crm.%s/crm/EntityInfo.do?module=Calls&id=%s','abandoned','[ABANDONED]','Inbound','lodash','md5','util','entities','moment','ioredis','zoho','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Creating\x20new\x20call...','inbound','outbound','starttime','agentcalledAt','format','YYYY-MM-DD\x20HH:mm:ss','Subjects','getString','Descriptions','Fields','called','Call\x20Result','Called','complete','connect','Answered','Rejected','Abandoned','talktime','Call\x20Duration','mm:ss','answertime','endtime','utc','diff','CONTACTID','LEADID','Leads','SEID','','hasOwnProperty','encodeXML','
','POST','authToken','crmapi','then','parse','toJson','response','result','recorddetail','Call\x20created!','stringify','https://crm.%s/crm/private/json/Users/getUsers','host','AllUsers','users','user','zoho\x20data\x20users','isArrayLikeObject','log','isNil','find','active','Agent\x20found!','Using\x20the\x20admin\x20account!','Administrator','zoho\x20user','profile','error','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','Searching\x20enduser\x20with\x20phone','GET','https://crm.%s/crm/private/json/Contacts/searchRecords','Enduser\x20found\x20in\x20Contacts!','Contacts','row','length','val','https://crm.%s/crm/private/json/Leads/searchRecords','((Phone:%s))','content','https://crm.%s/crm/private/xml/Leads/insertRecords','%s %s %s |
','Enduser\x20created.','Error\x20on\x20Lead\x20creation:\x20','Error\x20on\x20Lead\x20retrieve:\x20','debug','[HTTP]','forEach','type','string'];(function(_0x27158d,_0x19ed77){var _0xb8f43f=function(_0x1b66b2){while(--_0x1b66b2){_0x27158d['push'](_0x27158d['shift']());}};_0xb8f43f(++_0x19ed77);}(_0xf05f,0xa5));var _0xff05=function(_0x1fd8af,_0x19c908){_0x1fd8af=_0x1fd8af-0x0;var _0x44ac2a=_0xf05f[_0x1fd8af];return _0x44ac2a;};'use strict';var _=require(_0xff05('0x0'));var rp=require('request-promise');var md5=require(_0xff05('0x1'));var util=require(_0xff05('0x2'));var intUtil=require('./util');var parser=require('xml2json');var entities=require(_0xff05('0x3'));var moment=require(_0xff05('0x4'));var Redis=require(_0xff05('0x5'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0xff05('0x6'));config[_0xff05('0x7')]=_[_0xff05('0x8')](config[_0xff05('0x7')],{'host':_0xff05('0x9'),'port':0x18eb});var io=require(_0xff05('0xa'))(new Redis(config[_0xff05('0x7')]));function emit(_0x17ea36,_0x2d9d48,_0x30f84b){io['to'](_0x17ea36)[_0xff05('0xb')](_0x2d9d48,_0x30f84b);}var headers={'Content-Type':_0xff05('0xc'),'Accept':_0xff05('0xc')};function getCall(_0x5e1f63,_0x592f8b,_0x3ae391,_0x5a5358,_0x1a1fc6,_0x5e8177){logger[_0xff05('0xd')](_0xff05('0xe'));var _0xc51e8c=_['merge']({'SMOWNERID':_0x592f8b['id'],'Call Type':_0x5e8177||_0xff05('0xf'),'Call Start Time':(_0x5e8177===_0xff05('0x10')?_0x1a1fc6[_0xff05('0x11')]:_0x1a1fc6[_0xff05('0x12')])||moment()[_0xff05('0x13')](_0xff05('0x14')),'Subject':intUtil['getString'](_0x5a5358[_0xff05('0x15')],_0x1a1fc6,'\x20'),'Description':intUtil[_0xff05('0x16')](_0x5a5358[_0xff05('0x17')],_0x1a1fc6,'\x0a')},getCustomFields(_0x5a5358[_0xff05('0x18')],_0x1a1fc6));switch(_0x1a1fc6['lastevent']){case _0xff05('0x19'):_0xc51e8c[_0xff05('0x1a')]=_0xff05('0x1b');break;case _0xff05('0x1c'):case _0xff05('0x1d'):_0xc51e8c[_0xff05('0x1a')]=_0xff05('0x1e');break;case'rejected':_0xc51e8c[_0xff05('0x1a')]=_0xff05('0x1f');break;case'abandoned':_0xc51e8c[_0xff05('0x1a')]=_0xff05('0x20');break;default:}if(_0x1a1fc6[_0xff05('0x21')]){_0xc51e8c[_0xff05('0x22')]=moment['utc'](parseInt(_0x1a1fc6['talktime'])*0x3e8)['format'](_0xff05('0x23'));}else if(_0x1a1fc6[_0xff05('0x24')]&&_0x1a1fc6[_0xff05('0x25')]){_0xc51e8c[_0xff05('0x22')]=moment[_0xff05('0x26')](moment(_0x1a1fc6[_0xff05('0x25')],_0xff05('0x14'))[_0xff05('0x27')](moment(_0x1a1fc6['starttime'],_0xff05('0x14'))))[_0xff05('0x13')](_0xff05('0x23'));}if(_0x3ae391['CONTACTID']){_0xc51e8c[_0xff05('0x28')]=_0x3ae391['CONTACTID'];}else if(_0x3ae391[_0xff05('0x29')]){_0xc51e8c['SEMODULE']=_0xff05('0x2a');_0xc51e8c[_0xff05('0x2b')]=_0x3ae391[_0xff05('0x29')];}var _0xd79eb1=_0xff05('0x2c');for(var _0x4fc388 in _0xc51e8c){if(_0xc51e8c[_0xff05('0x2d')](_0x4fc388)){_0xd79eb1+=util[_0xff05('0x13')]('%s ',entities[_0xff05('0x2e')](_0x4fc388),entities['encodeXML'](_0xc51e8c[_0x4fc388]));}}_0xd79eb1+=_0xff05('0x2f');return request({'method':_0xff05('0x30'),'uri':util['format']('https://crm.%s/crm/private/xml/Calls/insertRecords',_0x5e1f63['host']),'qs':{'authtoken':_0x5e1f63[_0xff05('0x31')],'scope':_0xff05('0x32'),'xmlData':_0xd79eb1},'json':!![]})[_0xff05('0x33')](function(_0x491e20){_0x491e20=JSON[_0xff05('0x34')](parser[_0xff05('0x35')](_0x491e20));if(_0x491e20[_0xff05('0x36')]){if(_0x491e20['response'][_0xff05('0x37')]&&_0x491e20['response'][_0xff05('0x37')][_0xff05('0x38')]){logger[_0xff05('0xd')](_0xff05('0x39'));return{'id':_0x491e20[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x38')]['FL'][0x0]['$t']};}}throw new Error('Error\x20on\x20call\x20creation:\x20'+JSON[_0xff05('0x3a')](_0x491e20));});}function getUser(_0x5bdb3a,_0x48ed9b){return request({'method':'GET','uri':util['format'](_0xff05('0x3b'),_0x5bdb3a[_0xff05('0x3c')]),'qs':{'type':_0xff05('0x3d'),'authtoken':_0x5bdb3a[_0xff05('0x31')],'scope':'crmapi'},'json':!![]})[_0xff05('0x33')](function(_0x156fe6){if(_0x156fe6['users']&&_0x156fe6[_0xff05('0x3e')][_0xff05('0x3f')]){var _0x1d110d;console['log'](_0xff05('0x40'),_0x156fe6[_0xff05('0x3e')][_0xff05('0x3f')]);if(_[_0xff05('0x41')](_0x156fe6[_0xff05('0x3e')][_0xff05('0x3f')])){console[_0xff05('0x42')](_0xff05('0x40'),_0x156fe6[_0xff05('0x3e')][_0xff05('0x3f')]);if(!_[_0xff05('0x43')](_0x48ed9b)){_0x1d110d=_[_0xff05('0x44')](_0x156fe6['users'][_0xff05('0x3f')],{'email':_0x48ed9b,'profile':'Standard','status':_0xff05('0x45')});}if(!_[_0xff05('0x43')](_0x1d110d)){logger[_0xff05('0xd')](_0xff05('0x46'));}else{logger[_0xff05('0xd')](_0xff05('0x47'));_0x1d110d=_['find'](_0x156fe6['users']['user'],{'profile':_0xff05('0x48')});}console[_0xff05('0x42')](_0xff05('0x49'),_0x1d110d);return _0x1d110d;}else{if(_0x156fe6[_0xff05('0x3e')]['user'][_0xff05('0x4a')]===_0xff05('0x48')){logger[_0xff05('0xd')](_0xff05('0x47'));_0x1d110d=_0x156fe6['users'][_0xff05('0x3f')];return _0x1d110d;}else{logger[_0xff05('0x4b')](_0xff05('0x4c'),JSON[_0xff05('0x3a')](_0x156fe6));throw new Error(_0xff05('0x4d')+JSON[_0xff05('0x3a')](_0x156fe6));}}}else{logger[_0xff05('0x4b')](_0xff05('0x4c'),JSON['stringify'](_0x156fe6));throw new Error('Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20'+JSON[_0xff05('0x3a')](_0x156fe6));}});}function getEndUser(_0x174f29,_0x409457,_0x57e87c){logger['info'](_0xff05('0x4e'),_0x57e87c);return request({'method':_0xff05('0x4f'),'uri':util[_0xff05('0x13')](_0xff05('0x50'),_0x174f29[_0xff05('0x3c')]),'qs':{'authtoken':_0x174f29['authToken'],'scope':'crmapi','criteria':util[_0xff05('0x13')]('((Phone:%s))',_0x57e87c)},'json':!![]})['then'](function(_0x3b2786){if(_0x3b2786[_0xff05('0x36')]&&_0x3b2786['response'][_0xff05('0x37')]){logger['info'](_0xff05('0x51'));var _0x317b2f={};var _0x2d1115=_0x3b2786[_0xff05('0x36')]['result'][_0xff05('0x52')][_0xff05('0x53')]['no']?_0x3b2786[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x52')][_0xff05('0x53')]['FL']:_0x3b2786[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x52')][_0xff05('0x53')][0x0]['FL'];for(var _0x127ae8=0x0,_0x135fd9=_0x2d1115[_0xff05('0x54')];_0x127ae8<_0x135fd9;_0x127ae8++){_0x317b2f[_0x2d1115[_0x127ae8][_0xff05('0x55')]]=_0x2d1115[_0x127ae8]['content'];}return _0x317b2f;}else{return request({'method':_0xff05('0x4f'),'uri':util[_0xff05('0x13')](_0xff05('0x56'),_0x174f29[_0xff05('0x3c')]),'qs':{'authtoken':_0x174f29[_0xff05('0x31')],'scope':_0xff05('0x32'),'criteria':util[_0xff05('0x13')](_0xff05('0x57'),_0x57e87c)},'json':!![]})[_0xff05('0x33')](function(_0xd8b6c9){if(_0xd8b6c9['response']&&_0xd8b6c9[_0xff05('0x36')]['result']){logger[_0xff05('0xd')]('Enduser\x20found\x20in\x20Leads!');var _0x38b943={};var _0x2bad63=_0xd8b6c9['response'][_0xff05('0x37')]['Leads']['row']['no']?_0xd8b6c9[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x2a')]['row']['FL']:_0xd8b6c9[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x2a')][_0xff05('0x53')][0x0]['FL'];for(var _0x421b53=0x0,_0x8a69ff=_0x2bad63[_0xff05('0x54')];_0x421b53<_0x8a69ff;_0x421b53++){_0x38b943[_0x2bad63[_0x421b53][_0xff05('0x55')]]=_0x2bad63[_0x421b53][_0xff05('0x58')];}return _0x38b943;}else{logger['info']('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');_0x409457=getName(_0x409457);return request({'method':'POST','uri':util[_0xff05('0x13')](_0xff05('0x59'),_0x174f29[_0xff05('0x3c')]),'qs':{'authtoken':_0x174f29[_0xff05('0x31')],'scope':'crmapi','xmlData':util[_0xff05('0x13')](_0xff05('0x5a'),entities['encodeXML'](_0x409457[0x0]),entities[_0xff05('0x2e')](_0x409457[0x1]),_0x57e87c)},'json':!![]})[_0xff05('0x33')](function(_0x272e94){_0x272e94=JSON[_0xff05('0x34')](parser[_0xff05('0x35')](_0x272e94));if(_0x272e94[_0xff05('0x36')]){if(_0x272e94[_0xff05('0x36')][_0xff05('0x37')]&&_0x272e94[_0xff05('0x36')]['result'][_0xff05('0x38')]){logger[_0xff05('0xd')](_0xff05('0x5b'));return request({'method':_0xff05('0x4f'),'uri':util['format']('https://crm.%s/crm/private/json/Leads/getRecordById',_0x174f29['host']),'qs':{'authtoken':_0x174f29[_0xff05('0x31')],'scope':'crmapi','id':_0x272e94[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x38')]['FL'][0x0]['$t']},'json':!![]});}}throw new Error(_0xff05('0x5c')+JSON[_0xff05('0x3a')](_0x272e94));})[_0xff05('0x33')](function(_0x1671c2){if(_0x1671c2[_0xff05('0x36')]){if(_0x1671c2[_0xff05('0x36')][_0xff05('0x37')]){var _0x554066={};for(var _0x4c3150=0x0,_0x339506=_0x1671c2[_0xff05('0x36')]['result'][_0xff05('0x2a')][_0xff05('0x53')]['FL'][_0xff05('0x54')];_0x4c3150<_0x339506;_0x4c3150++){_0x554066[_0x1671c2[_0xff05('0x36')]['result'][_0xff05('0x2a')]['row']['FL'][_0x4c3150]['val']]=_0x1671c2[_0xff05('0x36')][_0xff05('0x37')][_0xff05('0x2a')]['row']['FL'][_0x4c3150]['content'];}return _0x554066;}}throw new Error(_0xff05('0x5d')+JSON[_0xff05('0x3a')](_0x1671c2));});}});}});}function request(_0xf560a5){logger[_0xff05('0x5e')](_0xff05('0x5f'),JSON[_0xff05('0x3a')](_0xf560a5));return rp(_0xf560a5);}function getCustomFields(_0x20e616,_0x3d1eb7){var _0x107230={};if(_0x20e616[_0xff05('0x54')]>0x0){_[_0xff05('0x60')](_0x20e616,function(_0x19b0aa){if(_0x19b0aa[_0xff05('0x61')]===_0xff05('0x62')&&_0x19b0aa[_0xff05('0x63')]){_0x107230[_0x19b0aa[_0xff05('0x63')]]=_0x19b0aa[_0xff05('0x58')][_0xff05('0x64')]();}else if(_0x19b0aa[_0xff05('0x61')]===_0xff05('0x65')&&_0x19b0aa[_0xff05('0x66')]&&_0x19b0aa[_0xff05('0x63')]&&_0x3d1eb7[_0x19b0aa[_0xff05('0x66')]]){_0x107230[_0x19b0aa[_0xff05('0x63')]]=_0x3d1eb7[_0x19b0aa['variableName']][_0xff05('0x64')]();}else if(_0x19b0aa['type']===_0xff05('0x67')&&_0x19b0aa[_0xff05('0x68')]&&_0x19b0aa[_0xff05('0x68')]['name']&&_0x19b0aa[_0xff05('0x63')]&&_0x3d1eb7[_0x19b0aa['Variable'][_0xff05('0x69')][_0xff05('0x6a')]()]){_0x107230[_0x19b0aa[_0xff05('0x63')]]=_0x3d1eb7[_0x19b0aa['Variable'][_0xff05('0x69')][_0xff05('0x6a')]()]['toString']();}});}return _0x107230;}function getName(_0x431b1a){if(_0x431b1a['indexOf']('\x20')>0x0){var _0x3df414=_0x431b1a[_0xff05('0x6b')](/ (.+)/);if(_0x3df414[0x1]){return _0x3df414;}}return[_0x431b1a,_0x431b1a];}exports['queue']=function(_0x4b4063,_0x504340,_0x4c385f,_0xc24499,_0x428882,_0x3812f4){var _0x1f859e,_0x45f417;_0x3812f4['host']=intUtil[_0xff05('0x6c')](_0x3812f4['host']);_0x3812f4['serverUrl']=intUtil[_0xff05('0x6c')](_0x3812f4[_0xff05('0x6d')]);if(_0x428882&&_0x428882[_0xff05('0x6e')]){logger[_0xff05('0xd')]('[QUEUE]',_0xff05('0x6f'));_0x504340[_0xff05('0x70')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3812f4[_0xff05('0x6d')],_0x504340[_0xff05('0x71')],md5(_0x504340[_0xff05('0x71')]));}else{_0x504340[_0xff05('0x70')]='';}return getUser(_0x3812f4,_0xc24499[_0xff05('0x72')])[_0xff05('0x33')](function(_0x382e64){_0x1f859e=_0x382e64;logger[_0xff05('0xd')](_0xff05('0x73'),_0x1f859e['id']);return getEndUser(_0x3812f4,_0x504340[_0xff05('0x74')],_0x504340[_0xff05('0x75')]);})[_0xff05('0x33')](function(_0x4efadd){_0x45f417=_0x4efadd;logger[_0xff05('0xd')](_0xff05('0x76'),_0x45f417['CONTACTID']||_0x45f417['LEADID']);return getCall(_0x3812f4,_0x1f859e,_0x45f417,_0x4c385f,_0x504340,'Inbound');})[_0xff05('0x33')](function(_0x4052e7){if(_0x4052e7){logger[_0xff05('0xd')](_0xff05('0x77'),_0x4052e7['id']);logger[_0xff05('0xd')](_0xff05('0x78'),'Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xff05('0x13')](_0xff05('0x79'),_0xc24499[_0xff05('0x69')]),_0xff05('0x7a'),{'uri':util[_0xff05('0x13')]('https://crm.%s/crm/EntityInfo.do?module=Calls&id=%s',_0x3812f4[_0xff05('0x3c')],_0x4052e7['id'])});}})[_0xff05('0x7b')](function(_0x168e4f){logger['error']('[QUEUE]',JSON[_0xff05('0x3a')](_0x168e4f));});};exports[_0xff05('0x10')]=function(_0x4398d4,_0x80ce1e,_0x5ef646,_0x58acb4,_0x717223,_0xcdda1c,_0x415bcf){var _0x184482,_0x5bdcc4;_0xcdda1c[_0xff05('0x3c')]=intUtil[_0xff05('0x6c')](_0xcdda1c[_0xff05('0x3c')]);_0xcdda1c[_0xff05('0x6d')]=intUtil['stripTrailingSlash'](_0xcdda1c[_0xff05('0x6d')]);if(_0x415bcf&&_0x415bcf[_0xff05('0x7c')]&&_0x415bcf['recordingFormat']!==_0xff05('0x7d')){logger[_0xff05('0xd')]('[OUTBOUND]',_0xff05('0x6f'));_0x80ce1e['recordingURL']=util[_0xff05('0x13')](_0xff05('0x7e'),_0xcdda1c[_0xff05('0x6d')],_0x80ce1e['uniqueid'],md5(_0x80ce1e[_0xff05('0x71')]));}return getUser(_0xcdda1c,_0x58acb4[_0xff05('0x72')])[_0xff05('0x33')](function(_0x11f741){_0x184482=_0x11f741;logger['info']('The\x20User\x20ID\x20is:',_0x184482['id']);return getEndUser(_0xcdda1c,_0x80ce1e['destcalleridname'],_0x80ce1e['destcalleridnum']);})[_0xff05('0x33')](function(_0x1fdd8a){_0x5bdcc4=_0x1fdd8a;logger[_0xff05('0xd')](_0xff05('0x76'),_0x5bdcc4[_0xff05('0x28')]||_0x5bdcc4[_0xff05('0x29')]);return getCall(_0xcdda1c,_0x184482,_0x5bdcc4,_0x5ef646,_0x80ce1e,'Outbound');})[_0xff05('0x33')](function(_0x140168){if(_0x140168){logger[_0xff05('0xd')]('The\x20Call\x20ID\x20is:',_0x140168['id']);logger['info'](_0xff05('0x7f'),'Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util['format'](_0xff05('0x79'),_0x58acb4[_0xff05('0x69')]),_0xff05('0x7a'),{'uri':util['format'](_0xff05('0x80'),_0xcdda1c[_0xff05('0x3c')],_0x140168['id'])});}})['catch'](function(_0x3cfceb){logger[_0xff05('0x4b')](_0xff05('0x7f'),JSON['stringify'](_0x3cfceb));});};exports[_0xff05('0x81')]=function(_0x436e8b,_0xb4860f,_0xb20c4f,_0x2e399a,_0x41c13c,_0x3aadc6){var _0x42123c,_0x1c4d5c;_0x3aadc6['host']=intUtil[_0xff05('0x6c')](_0x3aadc6[_0xff05('0x3c')]);_0x3aadc6[_0xff05('0x6d')]=intUtil[_0xff05('0x6c')](_0x3aadc6[_0xff05('0x6d')]);if(_0x41c13c&&_0x41c13c[_0xff05('0x6e')]){logger['info'](_0xff05('0x82'),_0xff05('0x6f'));_0xb4860f[_0xff05('0x70')]=util[_0xff05('0x13')](_0xff05('0x7e'),_0x3aadc6['serverUrl'],_0xb4860f['uniqueid'],md5(_0xb4860f[_0xff05('0x71')]));}else{_0xb4860f[_0xff05('0x70')]='';}return getUser(_0x3aadc6)[_0xff05('0x33')](function(_0x357fae){_0x42123c=_0x357fae;logger[_0xff05('0xd')](_0xff05('0x73'),_0x42123c['id']);return getEndUser(_0x3aadc6,_0xb4860f[_0xff05('0x74')],_0xb4860f[_0xff05('0x75')]);})[_0xff05('0x33')](function(_0x428732){_0x1c4d5c=_0x428732;logger[_0xff05('0xd')](_0xff05('0x76'),_0x1c4d5c[_0xff05('0x28')]||_0x1c4d5c[_0xff05('0x29')]);return getCall(_0x3aadc6,_0x42123c,_0x1c4d5c,_0xb20c4f,_0xb4860f,_0xff05('0x83'));})[_0xff05('0x33')](function(_0x264dad){if(_0x264dad){logger['info']('The\x20Call\x20ID\x20is:',_0x264dad['id']);}})['catch'](function(_0x4e12c9){logger[_0xff05('0x4b')](_0xff05('0x82'),JSON[_0xff05('0x3a')](_0x4e12c9));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/script/index.js b/server/services/ami/trigger/script/index.js
index 0ddaecd..886a490 100644
--- a/server/services/ami/trigger/script/index.js
+++ b/server/services/ami/trigger/script/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['mustache','trigger','exec','data2','Script','data3','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs'];(function(_0xa167ae,_0xbe41ad){var _0x3844c7=function(_0x13b594){while(--_0x13b594){_0xa167ae['push'](_0xa167ae['shift']());}};_0x3844c7(++_0xbe41ad);}(_0x7a54,0x106));var _0x47a5=function(_0x17c552,_0x34afa1){_0x17c552=_0x17c552-0x0;var _0x9f3423=_0x7a54[_0x17c552];return _0x9f3423;};'use strict';var util=require(_0x47a5('0x0'));var sh=require(_0x47a5('0x1'));var Mustache=require(_0x47a5('0x2'));var logger=require('../../../../config/logger')(_0x47a5('0x3'));exports[_0x47a5('0x4')]=function(_0x4880bf,_0x5f7f12){var _0x11bf85=_0x4880bf[_0x47a5('0x5')]?_0x4880bf[_0x47a5('0x5')]:_0x47a5('0x6');var _0x545a97=_0x4880bf[_0x47a5('0x7')]?Mustache['render'](_0x4880bf[_0x47a5('0x7')],_0x5f7f12):_0x5f7f12;sh[_0x47a5('0x4')](_0x545a97,function(_0x506eda,_0x194fb0,_0x5077f3){if(_0x506eda!==0x0){logger['error'](util['format'](_0x47a5('0x8'),_0x11bf85,_0x545a97,_0x506eda,_0x5077f3));}else{logger[_0x47a5('0x9')](util['format'](_0x47a5('0xa'),_0x11bf85,_0x545a97,_0x194fb0));}});};
\ No newline at end of file
+var _0x7a54=['mustache','trigger','exec','data2','Script','data3','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs'];(function(_0x30747b,_0x576675){var _0x251d59=function(_0x1c055a){while(--_0x1c055a){_0x30747b['push'](_0x30747b['shift']());}};_0x251d59(++_0x576675);}(_0x7a54,0x106));var _0x47a5=function(_0x9a3d96,_0x38dfd9){_0x9a3d96=_0x9a3d96-0x0;var _0x295e0d=_0x7a54[_0x9a3d96];return _0x295e0d;};'use strict';var util=require(_0x47a5('0x0'));var sh=require(_0x47a5('0x1'));var Mustache=require(_0x47a5('0x2'));var logger=require('../../../../config/logger')(_0x47a5('0x3'));exports[_0x47a5('0x4')]=function(_0x4880bf,_0x5f7f12){var _0x11bf85=_0x4880bf[_0x47a5('0x5')]?_0x4880bf[_0x47a5('0x5')]:_0x47a5('0x6');var _0x545a97=_0x4880bf[_0x47a5('0x7')]?Mustache['render'](_0x4880bf[_0x47a5('0x7')],_0x5f7f12):_0x5f7f12;sh[_0x47a5('0x4')](_0x545a97,function(_0x506eda,_0x194fb0,_0x5077f3){if(_0x506eda!==0x0){logger['error'](util['format'](_0x47a5('0x8'),_0x11bf85,_0x545a97,_0x506eda,_0x5077f3));}else{logger[_0x47a5('0x9')](util['format'](_0x47a5('0xa'),_0x11bf85,_0x545a97,_0x194fb0));}});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/urlforward/index.js b/server/services/ami/trigger/urlforward/index.js
index b7aec17..686350f 100644
--- a/server/services/ami/trigger/urlforward/index.js
+++ b/server/services/ami/trigger/urlforward/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x72a1=['catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','statusCode','util','mustache','trigger','exec','toUpperCase','data2','headers','data6','parse','error','stack','data1','GET','POST','PUT','data7','render','body','info','format','stringify','isNil',',\x20request\x20body:\x20','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x72a1,0x1ce));var _0x172a=function(_0x54d368,_0x84cbbb){_0x54d368=_0x54d368-0x0;var _0x1a2696=_0x72a1[_0x54d368];return _0x1a2696;};'use strict';var rp=require('request-promise');var util=require(_0x172a('0x0'));var _=require('lodash');var Mustache=require(_0x172a('0x1'));var logger=require('../../../../config/logger')(_0x172a('0x2'));exports[_0x172a('0x3')]=function(_0x123500,_0x5bb037){var _0x3598a9,_0x556535;var _0x189579={'method':_0x123500['data1'][_0x172a('0x4')](),'uri':encodeURI(Mustache['render'](_0x123500[_0x172a('0x5')],_0x5bb037)),'json':!![],'resolveWithFullResponse':!![]};try{_0x189579[_0x172a('0x6')]=_0x123500[_0x172a('0x7')]?JSON[_0x172a('0x8')](Mustache['render'](_0x123500[_0x172a('0x7')],_0x5bb037)):{};}catch(_0x4928a6){logger[_0x172a('0x9')](_0x4928a6[_0x172a('0xa')]);}switch(_0x123500[_0x172a('0xb')]['toUpperCase']()){case _0x172a('0xc'):_0x189579['qs']=_0x5bb037;break;case _0x172a('0xd'):case _0x172a('0xe'):_0x3598a9={};if(_0x123500[_0x172a('0xf')]){_0x3598a9=Mustache[_0x172a('0x10')](_0x123500['data7'],_0x5bb037);}else{_0x3598a9=_0x5bb037;}_0x189579[_0x172a('0x11')]=JSON[_0x172a('0x8')](_0x3598a9);break;}logger[_0x172a('0x12')](util[_0x172a('0x13')]('%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s',_0x123500[_0x172a('0xb')],_0x123500[_0x172a('0x5')],JSON[_0x172a('0x14')](_0x189579)));rp(_0x189579)['then'](function(_0x27c548){_0x3598a9=!_[_0x172a('0x15')](_0x3598a9)?_0x172a('0x16')+_0x3598a9:'';_0x556535=typeof _0x27c548[_0x172a('0x11')]==='object'?JSON[_0x172a('0x14')](_0x27c548[_0x172a('0x11')]):_0x27c548['body'];logger[_0x172a('0x12')](util['format'](_0x172a('0x17'),_0x123500[_0x172a('0xb')],_0x123500[_0x172a('0x5')],_0x27c548['statusCode'],_0x556535));})[_0x172a('0x18')](function(_0x232c5b){logger[_0x172a('0x9')](util[_0x172a('0x13')](_0x172a('0x19'),_0x123500[_0x172a('0xb')],_0x123500[_0x172a('0x5')],_0x232c5b[_0x172a('0x1a')],_0x232c5b['name'],_0x232c5b['message']));});};
\ No newline at end of file
+var _0x2fc9=['parse','render','stack','data1','toUpperCase','POST','PUT','data7','body','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify','isNil',',\x20request\x20body:\x20','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','error','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','name','util','lodash','mustache','../../../../config/logger','trigger','exec','data2','headers','data6'];(function(_0x405441,_0x363bcc){var _0x3f386e=function(_0x35bcd3){while(--_0x35bcd3){_0x405441['push'](_0x405441['shift']());}};_0x3f386e(++_0x363bcc);}(_0x2fc9,0xc2));var _0x92fc=function(_0x4a53d,_0x58a95e){_0x4a53d=_0x4a53d-0x0;var _0x27410e=_0x2fc9[_0x4a53d];return _0x27410e;};'use strict';var rp=require('request-promise');var util=require(_0x92fc('0x0'));var _=require(_0x92fc('0x1'));var Mustache=require(_0x92fc('0x2'));var logger=require(_0x92fc('0x3'))(_0x92fc('0x4'));exports[_0x92fc('0x5')]=function(_0x460229,_0x4267ab){var _0x2307a2,_0x2872f5;var _0x2acc55={'method':_0x460229['data1']['toUpperCase'](),'uri':encodeURI(Mustache['render'](_0x460229[_0x92fc('0x6')],_0x4267ab)),'json':!![],'resolveWithFullResponse':!![]};try{_0x2acc55[_0x92fc('0x7')]=_0x460229[_0x92fc('0x8')]?JSON[_0x92fc('0x9')](Mustache[_0x92fc('0xa')](_0x460229[_0x92fc('0x8')],_0x4267ab)):{};}catch(_0x2805f4){logger['error'](_0x2805f4[_0x92fc('0xb')]);}switch(_0x460229[_0x92fc('0xc')][_0x92fc('0xd')]()){case'GET':_0x2acc55['qs']=_0x4267ab;break;case _0x92fc('0xe'):case _0x92fc('0xf'):_0x2307a2={};if(_0x460229[_0x92fc('0x10')]){_0x2307a2=Mustache['render'](_0x460229['data7'],_0x4267ab);}else{_0x2307a2=_0x4267ab;}_0x2acc55[_0x92fc('0x11')]=JSON[_0x92fc('0x9')](_0x2307a2);break;}logger['info'](util[_0x92fc('0x12')](_0x92fc('0x13'),_0x460229[_0x92fc('0xc')],_0x460229[_0x92fc('0x6')],JSON[_0x92fc('0x14')](_0x2acc55)));rp(_0x2acc55)['then'](function(_0x4007c8){_0x2307a2=!_[_0x92fc('0x15')](_0x2307a2)?_0x92fc('0x16')+_0x2307a2:'';_0x2872f5=typeof _0x4007c8[_0x92fc('0x11')]==='object'?JSON['stringify'](_0x4007c8[_0x92fc('0x11')]):_0x4007c8[_0x92fc('0x11')];logger['info'](util[_0x92fc('0x12')](_0x92fc('0x17'),_0x460229[_0x92fc('0xc')],_0x460229['data2'],_0x4007c8[_0x92fc('0x18')],_0x2872f5));})[_0x92fc('0x19')](function(_0x3a1071){logger[_0x92fc('0x1a')](util[_0x92fc('0x12')](_0x92fc('0x1b'),_0x460229[_0x92fc('0xc')],_0x460229[_0x92fc('0x6')],_0x3a1071['statusCode'],_0x3a1071[_0x92fc('0x1c')],_0x3a1071['message']));});};
\ No newline at end of file
diff --git a/server/services/email/client.js b/server/services/email/client.js
index 2c65c74..4dbad6b 100644
--- a/server/services/email/client.js
+++ b/server/services/email/client.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf822=['routing','client','http','Request','request','rpc','error','message','result','catch','exports','jayson/promise','../../config/logger'];(function(_0x56e32e,_0x9eb2f6){var _0x2a757b=function(_0x50b7bc){while(--_0x50b7bc){_0x56e32e['push'](_0x56e32e['shift']());}};_0x2a757b(++_0x9eb2f6);}(_0xf822,0x19e));var _0x2f82=function(_0x3e856b,_0x22f865){_0x3e856b=_0x3e856b-0x0;var _0x66b5f7=_0xf822[_0x3e856b];return _0x66b5f7;};'use strict';var jayson=require(_0x2f82('0x0'));var BPromise=require('bluebird');var logger=require(_0x2f82('0x1'))(_0x2f82('0x2'));var client=jayson[_0x2f82('0x3')][_0x2f82('0x4')]({'port':0x2329});client[_0x2f82('0x5')]=function(_0x260206,_0x48a05c){return new BPromise(function(_0x12e2d7,_0xd4688e){return client[_0x2f82('0x6')](_0x260206,_0x48a05c)['then'](function(_0x360c8f){logger['debug'](_0x2f82('0x7'),_0x2f82('0x2'),_0x260206,_0x48a05c,_0x360c8f);if(_0x360c8f[_0x2f82('0x8')]){logger[_0x2f82('0x8')](_0x2f82('0x7'),_0x2f82('0x2'),_0x260206,_0x360c8f['error'][_0x2f82('0x9')],_0x48a05c);return _0xd4688e(_0x360c8f[_0x2f82('0x8')][_0x2f82('0x9')]);}else{return _0x12e2d7(_0x360c8f[_0x2f82('0xa')]);}})[_0x2f82('0xb')](function(_0x439143){logger['error']('rpc',_0x2f82('0x2'),_0x260206,_0x439143,_0x48a05c);return _0xd4688e(_0x439143);});});};module[_0x2f82('0xc')]=client;
\ No newline at end of file
+var _0xaefc=['message','result','catch','routing','exports','jayson/promise','bluebird','../../config/logger','client','http','then','rpc','error'];(function(_0x3d4193,_0x358e7c){var _0x16b6ac=function(_0x30dab7){while(--_0x30dab7){_0x3d4193['push'](_0x3d4193['shift']());}};_0x16b6ac(++_0x358e7c);}(_0xaefc,0xc8));var _0xcaef=function(_0x57ac32,_0xd63c46){_0x57ac32=_0x57ac32-0x0;var _0x5f2c41=_0xaefc[_0x57ac32];return _0x5f2c41;};'use strict';var jayson=require(_0xcaef('0x0'));var BPromise=require(_0xcaef('0x1'));var logger=require(_0xcaef('0x2'))('routing');var client=jayson[_0xcaef('0x3')][_0xcaef('0x4')]({'port':0x2329});client['Request']=function(_0x575523,_0x37a134){return new BPromise(function(_0x46a35e,_0x5f160f){return client['request'](_0x575523,_0x37a134)[_0xcaef('0x5')](function(_0x4471a1){logger['debug'](_0xcaef('0x6'),'routing',_0x575523,_0x37a134,_0x4471a1);if(_0x4471a1['error']){logger[_0xcaef('0x7')](_0xcaef('0x6'),'routing',_0x575523,_0x4471a1[_0xcaef('0x7')][_0xcaef('0x8')],_0x37a134);return _0x5f160f(_0x4471a1['error'][_0xcaef('0x8')]);}else{return _0x46a35e(_0x4471a1[_0xcaef('0x9')]);}})[_0xcaef('0xa')](function(_0x1c490c){logger[_0xcaef('0x7')](_0xcaef('0x6'),_0xcaef('0xb'),_0x575523,_0x1c490c,_0x37a134);return _0x5f160f(_0x1c490c);});});};module[_0xcaef('0xc')]=client;
\ No newline at end of file
diff --git a/server/services/email/index.js b/server/services/email/index.js
index 977ba27..922afb3 100644
--- a/server/services/email/index.js
+++ b/server/services/email/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x404b=['resolve','then','getMailAccounts','initMailAccounts','refresh','catch','log','bluebird','./server','./realtime','./lib/email','./rpc/mailAccount'];(function(_0x39609a,_0x28a563){var _0xecd92=function(_0x57241a){while(--_0x57241a){_0x39609a['push'](_0x39609a['shift']());}};_0xecd92(++_0x28a563);}(_0x404b,0x14b));var _0xb404=function(_0x143ce6,_0x46e089){_0x143ce6=_0x143ce6-0x0;var _0x33ed64=_0x404b[_0x143ce6];return _0x33ed64;};'use strict';var BPromise=require(_0xb404('0x0'));var server=require(_0xb404('0x1'));var Realtime=require(_0xb404('0x2'));var EmailChannel=require(_0xb404('0x3'));var mailAccount=require(_0xb404('0x4'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise[_0xb404('0x5')]()[_0xb404('0x6')](mailAccount[_0xb404('0x7')]())[_0xb404('0x6')](realtime[_0xb404('0x8')]())['then'](function(){email[_0xb404('0x9')](realtime['mailAccounts']);return realtime;});}function main(){return server['listen'](realtime,email)[_0xb404('0x6')](function(_0x5e0375){return initRealtime();})[_0xb404('0x6')](function(_0xa3a76b){return setInterval(initRealtime,0x2710);})[_0xb404('0xa')](function(_0x11def7){console[_0xb404('0xb')](_0x11def7);});}main();
\ No newline at end of file
+var _0x5e6a=['./realtime','./lib/email','./rpc/mailAccount','then','refresh','catch','log','./server'];(function(_0x510e40,_0x451340){var _0x5745d3=function(_0x457301){while(--_0x457301){_0x510e40['push'](_0x510e40['shift']());}};_0x5745d3(++_0x451340);}(_0x5e6a,0xb7));var _0xa5e6=function(_0x4d82e4,_0x3cf5be){_0x4d82e4=_0x4d82e4-0x0;var _0x3a3c8b=_0x5e6a[_0x4d82e4];return _0x3a3c8b;};'use strict';var BPromise=require('bluebird');var server=require(_0xa5e6('0x0'));var Realtime=require(_0xa5e6('0x1'));var EmailChannel=require(_0xa5e6('0x2'));var mailAccount=require(_0xa5e6('0x3'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise['resolve']()[_0xa5e6('0x4')](mailAccount['getMailAccounts']())[_0xa5e6('0x4')](realtime['initMailAccounts']())[_0xa5e6('0x4')](function(){email[_0xa5e6('0x5')](realtime['mailAccounts']);return realtime;});}function main(){return server['listen'](realtime,email)['then'](function(_0x206f58){return initRealtime();})['then'](function(_0x191661){return setInterval(initRealtime,0x2710);})[_0xa5e6('0x6')](function(_0x7115a8){console[_0xa5e6('0x7')](_0x7115a8);});}main();
\ No newline at end of file
diff --git a/server/services/email/lib/email.js b/server/services/email/lib/email.js
index a23a79a..06be556 100644
--- a/server/services/email/lib/email.js
+++ b/server/services/email/lib/email.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd943=['handleImapError','status','disabled','handleImapBox','connected','messages','total','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','lastName','from','notify','info','error','Mail\x20not\x20accepted\x20from\x20routing\x20%s','lastSync','sendMail','smtp','send','verifySmtp','Smtp','verify','then','catch','exports','lodash','moment','bluebird','md5','../../../config/environment','../../../config/logger','email','redis','defaults','socket.io-emitter','../rpc/mailAccount','mailAccounts','imapAccounts','prototype','name','key','active','Imap','messageStatus','isNil','stringify','emit','mailAccount:update','refresh','hasOwnProperty','box','bind','handleImapEmail','handleImapEnd'];(function(_0x218c1f,_0x3577e2){var _0x529bc7=function(_0x424c28){while(--_0x424c28){_0x218c1f['push'](_0x218c1f['shift']());}};_0x529bc7(++_0x3577e2);}(_0xd943,0x15d));var _0x3d94=function(_0x1ae265,_0x1a8383){_0x1ae265=_0x1ae265-0x0;var _0x3b2f23=_0xd943[_0x1ae265];return _0x3b2f23;};'use strict';var _=require(_0x3d94('0x0'));var moment=require(_0x3d94('0x1'));var BPromise=require(_0x3d94('0x2'));var md5=require(_0x3d94('0x3'));var Redis=require('ioredis');var config=require(_0x3d94('0x4'));var logger=require(_0x3d94('0x5'))(_0x3d94('0x6'));config[_0x3d94('0x7')]=_[_0x3d94('0x8')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x3d94('0x9'))(new Redis(config['redis']));var EmailImap=require('./imap');var EmailSmtp=require('./smtp');var mailAccount=require(_0x3d94('0xa'));var md5Accounts={};function EmailChannel(_0x35d36a){logger['info']('start\x20email\x20channel');this[_0x3d94('0xb')]=_0x35d36a[_0x3d94('0xb')];this[_0x3d94('0xc')]={};this['smtp']=new EmailSmtp();}EmailChannel[_0x3d94('0xd')]['emit']=function(_0x39e2fa){var _0x301536=this['mailAccounts'][_0x39e2fa];var _0x1897de={'id':_0x301536['id'],'name':_0x301536[_0x3d94('0xe')],'key':_0x301536[_0x3d94('0xf')],'active':_0x301536[_0x3d94('0x10')],'Imap':{'status':_0x301536[_0x3d94('0x11')]['status'],'messageStatus':_0x301536[_0x3d94('0x11')][_0x3d94('0x12')],'total':_0x301536[_0x3d94('0x11')]['total']}};if(_[_0x3d94('0x13')](md5Accounts[_0x39e2fa])){md5Accounts[_0x39e2fa]={};}var _0x29608d=md5(JSON[_0x3d94('0x14')](_0x1897de));if(md5Accounts[_0x39e2fa]['md5']!==_0x29608d){md5Accounts[_0x39e2fa][_0x3d94('0x3')]=_0x29608d;io[_0x3d94('0x15')](_0x3d94('0x16'),_0x1897de);}};EmailChannel[_0x3d94('0xd')][_0x3d94('0x17')]=function(_0xd8efaa){for(var _0x31c6e8 in _0xd8efaa){if(_0xd8efaa[_0x3d94('0x18')](_0x31c6e8)){if(_0xd8efaa[_0x31c6e8]['Imap']&&_0xd8efaa[_0x31c6e8][_0x3d94('0x10')]){var _0x1a9315=_0xd8efaa[_0x31c6e8][_0x3d94('0x11')];if(!this[_0x3d94('0xc')][_0x3d94('0x18')](_0x1a9315['id'])){this[_0x3d94('0xc')][_0x1a9315['id']]=new EmailImap(_0x1a9315,_0xd8efaa[_0x31c6e8][_0x3d94('0x6')]);this['imapAccounts'][_0x1a9315['id']]['on'](_0x3d94('0x19'),this['handleImapBox'][_0x3d94('0x1a')](this,_0x31c6e8));this[_0x3d94('0xc')][_0x1a9315['id']]['on'](_0x3d94('0x6'),this[_0x3d94('0x1b')][_0x3d94('0x1a')](this,_0x31c6e8));this['imapAccounts'][_0x1a9315['id']]['on']('end',this[_0x3d94('0x1c')][_0x3d94('0x1a')](this,_0x31c6e8));this[_0x3d94('0xc')][_0x1a9315['id']]['on']('error',this[_0x3d94('0x1d')][_0x3d94('0x1a')](this,_0x31c6e8));}}else{if(_[_0x3d94('0x13')](this[_0x3d94('0xb')][_0x31c6e8][_0x3d94('0x11')])){this[_0x3d94('0xb')][_0x31c6e8][_0x3d94('0x11')]={};}this[_0x3d94('0xb')][_0x31c6e8][_0x3d94('0x11')][_0x3d94('0x1e')]=_0x3d94('0x1f');this[_0x3d94('0xb')][_0x31c6e8][_0x3d94('0x11')][_0x3d94('0x12')]='';this[_0x3d94('0x15')](_0x31c6e8);}}}};EmailChannel['prototype'][_0x3d94('0x20')]=function(_0x558fd2,_0x28a698){if(this[_0x3d94('0xb')][_0x558fd2]){this[_0x3d94('0xb')][_0x558fd2][_0x3d94('0x11')][_0x3d94('0x1e')]=_0x3d94('0x21');this[_0x3d94('0xb')][_0x558fd2]['Imap']['messageStatus']=_0x28a698[_0x3d94('0xe')];if(_0x28a698['messages']){this['mailAccounts'][_0x558fd2][_0x3d94('0x11')]['total']=_0x28a698[_0x3d94('0x22')][_0x3d94('0x23')];}return this[_0x3d94('0x15')](_0x558fd2);}};EmailChannel['prototype'][_0x3d94('0x1b')]=function(_0x4c1237,_0x3d4994){logger['info'](_0x3d94('0x24'),_0x3d4994[_0x3d94('0x25')],_0x3d4994[_0x3d94('0x26')],_0x3d4994[_0x3d94('0x27')],_0x4c1237);if(this['mailAccounts'][_0x4c1237]){return mailAccount[_0x3d94('0x28')](_0x4c1237,_0x3d4994)['then'](function(_0x1f9559){if(_0x1f9559){logger[_0x3d94('0x29')]('Mail\x20accepted\x20from\x20routing');}})['catch'](function(_0x24bffe){logger[_0x3d94('0x2a')](_0x3d94('0x2b'),JSON['stringify'](_0x24bffe));});}};EmailChannel[_0x3d94('0xd')][_0x3d94('0x1c')]=function(_0x5426bd){if(this[_0x3d94('0xb')][_0x5426bd]&&this[_0x3d94('0xb')][_0x5426bd][_0x3d94('0x11')]){if(this[_0x3d94('0xc')][this[_0x3d94('0xb')][_0x5426bd]['Imap']['id']]){delete this[_0x3d94('0xc')][this[_0x3d94('0xb')][_0x5426bd][_0x3d94('0x11')]['id']];}this[_0x3d94('0xb')][_0x5426bd][_0x3d94('0x11')][_0x3d94('0x2c')]=moment();this['emit'](_0x5426bd);}};EmailChannel['prototype'][_0x3d94('0x1d')]=function(_0x3e4d64,_0x1c1b25){if(this[_0x3d94('0xb')][_0x3e4d64]){this[_0x3d94('0xb')][_0x3e4d64][_0x3d94('0x11')][_0x3d94('0x1e')]=_0x3d94('0x2a');this[_0x3d94('0xb')][_0x3e4d64][_0x3d94('0x11')]['messageStatus']=_0x1c1b25;return this[_0x3d94('0x15')](_0x3e4d64);}};EmailChannel[_0x3d94('0xd')][_0x3d94('0x2d')]=function(_0xcc289a,_0x525d90){return this[_0x3d94('0x2e')][_0x3d94('0x2f')](_0xcc289a,_0x525d90);};EmailChannel[_0x3d94('0xd')][_0x3d94('0x30')]=function(_0x22b7d2){var _0x4b5a1a=this;if(this[_0x3d94('0xb')][_0x22b7d2['id']]){if(_[_0x3d94('0x13')](this[_0x3d94('0xb')][_0x22b7d2['id']]['Smtp'])){this['mailAccounts'][_0x22b7d2['id']]['Smtp']={};}this['mailAccounts'][_0x22b7d2['id']][_0x3d94('0x31')][_0x3d94('0x2c')]=moment();return new BPromise(function(_0x2ebcb1,_0x146ccb){return _0x4b5a1a[_0x3d94('0x2e')][_0x3d94('0x32')](_0x22b7d2)[_0x3d94('0x33')](function(_0x5b6a17){_0x4b5a1a['mailAccounts'][_0x22b7d2['id']][_0x3d94('0x31')][_0x3d94('0x1e')]='verified';_0x4b5a1a[_0x3d94('0xb')][_0x22b7d2['id']]['Smtp'][_0x3d94('0x12')]='';_0x4b5a1a[_0x3d94('0x15')](_0x22b7d2['id']);_0x2ebcb1(_0x5b6a17);})[_0x3d94('0x34')](function(_0xacfc44){_0x4b5a1a[_0x3d94('0xb')][_0x22b7d2['id']]['Smtp'][_0x3d94('0x1e')]=_0x3d94('0x2a');_0x4b5a1a[_0x3d94('0xb')][_0x22b7d2['id']]['Smtp'][_0x3d94('0x12')]=_0xacfc44;_0x4b5a1a['emit'](_0x22b7d2['id']);_0x146ccb(_0xacfc44);});});}return this['smtp'][_0x3d94('0x32')](_0x22b7d2);};module[_0x3d94('0x35')]=EmailChannel;
\ No newline at end of file
+var _0x5464=['emit','name','key','active','Imap','md5','prototype','hasOwnProperty','email','box','handleImapBox','bind','handleImapEmail','end','handleImapEnd','error','handleImapError','isNil','status','disabled','connected','total','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','from','then','Mail\x20accepted\x20from\x20routing','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','stringify','send','verifySmtp','Smtp','verify','verified','messageStatus','exports','lodash','moment','bluebird','ioredis','../../../config/logger','redis','defaults','localhost','./smtp','../rpc/mailAccount','info','start\x20email\x20channel','mailAccounts','imapAccounts','smtp'];(function(_0x488ca1,_0xf6858e){var _0x4dd0a4=function(_0x40fb65){while(--_0x40fb65){_0x488ca1['push'](_0x488ca1['shift']());}};_0x4dd0a4(++_0xf6858e);}(_0x5464,0x15d));var _0x4546=function(_0x245cf2,_0x11d6f8){_0x245cf2=_0x245cf2-0x0;var _0x3ced68=_0x5464[_0x245cf2];return _0x3ced68;};'use strict';var _=require(_0x4546('0x0'));var moment=require(_0x4546('0x1'));var BPromise=require(_0x4546('0x2'));var md5=require('md5');var Redis=require(_0x4546('0x3'));var config=require('../../../config/environment');var logger=require(_0x4546('0x4'))('email');config[_0x4546('0x5')]=_[_0x4546('0x6')](config[_0x4546('0x5')],{'host':_0x4546('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var EmailImap=require('./imap');var EmailSmtp=require(_0x4546('0x8'));var mailAccount=require(_0x4546('0x9'));var md5Accounts={};function EmailChannel(_0x1a76c1){logger[_0x4546('0xa')](_0x4546('0xb'));this[_0x4546('0xc')]=_0x1a76c1[_0x4546('0xc')];this[_0x4546('0xd')]={};this[_0x4546('0xe')]=new EmailSmtp();}EmailChannel['prototype'][_0x4546('0xf')]=function(_0x8a15e2){var _0x3d082a=this['mailAccounts'][_0x8a15e2];var _0x1f82c9={'id':_0x3d082a['id'],'name':_0x3d082a[_0x4546('0x10')],'key':_0x3d082a[_0x4546('0x11')],'active':_0x3d082a[_0x4546('0x12')],'Imap':{'status':_0x3d082a['Imap']['status'],'messageStatus':_0x3d082a[_0x4546('0x13')]['messageStatus'],'total':_0x3d082a['Imap']['total']}};if(_['isNil'](md5Accounts[_0x8a15e2])){md5Accounts[_0x8a15e2]={};}var _0x598516=md5(JSON['stringify'](_0x1f82c9));if(md5Accounts[_0x8a15e2][_0x4546('0x14')]!==_0x598516){md5Accounts[_0x8a15e2]['md5']=_0x598516;io[_0x4546('0xf')]('mailAccount:update',_0x1f82c9);}};EmailChannel[_0x4546('0x15')]['refresh']=function(_0x3741f2){for(var _0x18bc09 in _0x3741f2){if(_0x3741f2[_0x4546('0x16')](_0x18bc09)){if(_0x3741f2[_0x18bc09][_0x4546('0x13')]&&_0x3741f2[_0x18bc09][_0x4546('0x12')]){var _0x15e09e=_0x3741f2[_0x18bc09]['Imap'];if(!this['imapAccounts']['hasOwnProperty'](_0x15e09e['id'])){this[_0x4546('0xd')][_0x15e09e['id']]=new EmailImap(_0x15e09e,_0x3741f2[_0x18bc09][_0x4546('0x17')]);this[_0x4546('0xd')][_0x15e09e['id']]['on'](_0x4546('0x18'),this[_0x4546('0x19')][_0x4546('0x1a')](this,_0x18bc09));this[_0x4546('0xd')][_0x15e09e['id']]['on'](_0x4546('0x17'),this[_0x4546('0x1b')][_0x4546('0x1a')](this,_0x18bc09));this['imapAccounts'][_0x15e09e['id']]['on'](_0x4546('0x1c'),this[_0x4546('0x1d')]['bind'](this,_0x18bc09));this[_0x4546('0xd')][_0x15e09e['id']]['on'](_0x4546('0x1e'),this[_0x4546('0x1f')][_0x4546('0x1a')](this,_0x18bc09));}}else{if(_[_0x4546('0x20')](this[_0x4546('0xc')][_0x18bc09]['Imap'])){this[_0x4546('0xc')][_0x18bc09][_0x4546('0x13')]={};}this['mailAccounts'][_0x18bc09][_0x4546('0x13')][_0x4546('0x21')]=_0x4546('0x22');this[_0x4546('0xc')][_0x18bc09][_0x4546('0x13')]['messageStatus']='';this[_0x4546('0xf')](_0x18bc09);}}}};EmailChannel[_0x4546('0x15')][_0x4546('0x19')]=function(_0x48fc36,_0x4c1dad){if(this[_0x4546('0xc')][_0x48fc36]){this[_0x4546('0xc')][_0x48fc36][_0x4546('0x13')][_0x4546('0x21')]=_0x4546('0x23');this[_0x4546('0xc')][_0x48fc36][_0x4546('0x13')]['messageStatus']=_0x4c1dad[_0x4546('0x10')];if(_0x4c1dad['messages']){this[_0x4546('0xc')][_0x48fc36][_0x4546('0x13')]['total']=_0x4c1dad['messages'][_0x4546('0x24')];}return this['emit'](_0x48fc36);}};EmailChannel[_0x4546('0x15')][_0x4546('0x1b')]=function(_0x480d8e,_0x5f0226){logger[_0x4546('0xa')](_0x4546('0x25'),_0x5f0226[_0x4546('0x26')],_0x5f0226['lastName'],_0x5f0226[_0x4546('0x27')],_0x480d8e);if(this[_0x4546('0xc')][_0x480d8e]){return mailAccount['notify'](_0x480d8e,_0x5f0226)[_0x4546('0x28')](function(_0x4f5f36){if(_0x4f5f36){logger[_0x4546('0xa')](_0x4546('0x29'));}})[_0x4546('0x2a')](function(_0x2ce37f){logger['error'](_0x4546('0x2b'),JSON[_0x4546('0x2c')](_0x2ce37f));});}};EmailChannel[_0x4546('0x15')][_0x4546('0x1d')]=function(_0x1487fd){if(this[_0x4546('0xc')][_0x1487fd]&&this['mailAccounts'][_0x1487fd][_0x4546('0x13')]){if(this[_0x4546('0xd')][this['mailAccounts'][_0x1487fd]['Imap']['id']]){delete this[_0x4546('0xd')][this[_0x4546('0xc')][_0x1487fd]['Imap']['id']];}this[_0x4546('0xc')][_0x1487fd][_0x4546('0x13')]['lastSync']=moment();this['emit'](_0x1487fd);}};EmailChannel[_0x4546('0x15')][_0x4546('0x1f')]=function(_0x18458b,_0xf73ed2){if(this[_0x4546('0xc')][_0x18458b]){this[_0x4546('0xc')][_0x18458b]['Imap'][_0x4546('0x21')]=_0x4546('0x1e');this['mailAccounts'][_0x18458b][_0x4546('0x13')]['messageStatus']=_0xf73ed2;return this[_0x4546('0xf')](_0x18458b);}};EmailChannel[_0x4546('0x15')]['sendMail']=function(_0x5d9f18,_0x104d56){return this[_0x4546('0xe')][_0x4546('0x2d')](_0x5d9f18,_0x104d56);};EmailChannel['prototype'][_0x4546('0x2e')]=function(_0x3f7ddb){var _0x24eb6d=this;if(this[_0x4546('0xc')][_0x3f7ddb['id']]){if(_[_0x4546('0x20')](this[_0x4546('0xc')][_0x3f7ddb['id']][_0x4546('0x2f')])){this[_0x4546('0xc')][_0x3f7ddb['id']]['Smtp']={};}this[_0x4546('0xc')][_0x3f7ddb['id']][_0x4546('0x2f')]['lastSync']=moment();return new BPromise(function(_0x4d9816,_0x3bafee){return _0x24eb6d[_0x4546('0xe')][_0x4546('0x30')](_0x3f7ddb)[_0x4546('0x28')](function(_0xa9029e){_0x24eb6d['mailAccounts'][_0x3f7ddb['id']][_0x4546('0x2f')][_0x4546('0x21')]=_0x4546('0x31');_0x24eb6d[_0x4546('0xc')][_0x3f7ddb['id']][_0x4546('0x2f')][_0x4546('0x32')]='';_0x24eb6d[_0x4546('0xf')](_0x3f7ddb['id']);_0x4d9816(_0xa9029e);})[_0x4546('0x2a')](function(_0x247fd3){_0x24eb6d['mailAccounts'][_0x3f7ddb['id']][_0x4546('0x2f')][_0x4546('0x21')]=_0x4546('0x1e');_0x24eb6d[_0x4546('0xc')][_0x3f7ddb['id']][_0x4546('0x2f')][_0x4546('0x32')]=_0x247fd3;_0x24eb6d[_0x4546('0xf')](_0x3f7ddb['id']);_0x3bafee(_0x247fd3);});});}return this[_0x4546('0xe')][_0x4546('0x30')](_0x3f7ddb);};module[_0x4546('0x33')]=EmailChannel;
\ No newline at end of file
diff --git a/server/services/email/lib/imap.js b/server/services/email/lib/imap.js
index ec88c32..df7b6bf 100644
--- a/server/services/email/lib/imap.js
+++ b/server/services/email/lib/imap.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac7f=['UNSEEN','handleReadUnseen','length','fetch','message','handleFetchMessage','handleFetchEnd','closeBox','handleMessageBody','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','parser','handleFetchError','textCode','hasOwnProperty','exports','path','imap','lodash','randomstring','simpleParser','iconv','Iconv','events','EventEmitter','./utils','email','mailbox','account','getAccount','once','bind','end','handleEnd','error','handleError','connect','connTimeout','authTimeout','isNil','service','authentication','user','password','host','port','tls','getHost','anonymous@xcally.com','prototype','openBox','handleOpenBox','emit','box','handleCloseBox','readUnseen'];(function(_0x1a732e,_0x1d683a){var _0x3d1808=function(_0x5dbd58){while(--_0x5dbd58){_0x1a732e['push'](_0x1a732e['shift']());}};_0x3d1808(++_0x1d683a);}(_0xac7f,0x1e2));var _0xfac7=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xac7f[_0x2b4411];return _0x8e41ef;};'use strict';var fs=require('fs');var path=require(_0xfac7('0x0'));var util=require('util');var Imap=require(_0xfac7('0x1'));var _=require(_0xfac7('0x2'));var rs=require(_0xfac7('0x3'));var simpleParser=require('mailparser')[_0xfac7('0x4')];var Iconv=require(_0xfac7('0x5'))[_0xfac7('0x6')];var EventEmitter=require(_0xfac7('0x7'))[_0xfac7('0x8')];var utils=require(_0xfac7('0x9'));var logger=require('../../../config/logger')(_0xfac7('0xa'));function EmailImap(_0x5be533,_0x100c9c){this[_0xfac7('0xb')]='INBOX';this[_0xfac7('0xc')]=this[_0xfac7('0xd')](_0x5be533,_0x100c9c);this[_0xfac7('0x1')]=new Imap(this['account']);this[_0xfac7('0x1')][_0xfac7('0xe')]('ready',this['handleReady'][_0xfac7('0xf')](this));this[_0xfac7('0x1')][_0xfac7('0xe')](_0xfac7('0x10'),this[_0xfac7('0x11')]['bind'](this));this[_0xfac7('0x1')]['on'](_0xfac7('0x12'),this[_0xfac7('0x13')][_0xfac7('0xf')](this));this[_0xfac7('0x1')][_0xfac7('0x14')]();}util['inherits'](EmailImap,EventEmitter);EmailImap['prototype'][_0xfac7('0xd')]=function(_0x5a3a06,_0x32d8c6){var _0x3858b0={'connTimeout':_0x5a3a06['connTimeout']?_0x5a3a06[_0xfac7('0x15')]*0x3e8:0x2710,'authTimeout':_0x5a3a06[_0xfac7('0x16')]?_0x5a3a06['authTimeout']*0x3e8:0x1388};if(_[_0xfac7('0x17')](_0x5a3a06[_0xfac7('0x18')])){if(_0x5a3a06[_0xfac7('0x19')]){_0x3858b0[_0xfac7('0x1a')]=_0x5a3a06['user'];_0x3858b0[_0xfac7('0x1b')]=_0x5a3a06[_0xfac7('0x1b')];}_0x3858b0[_0xfac7('0x1c')]=_0x5a3a06[_0xfac7('0x1c')];_0x3858b0[_0xfac7('0x1d')]=_0x5a3a06[_0xfac7('0x1d')]||0x3e1;if(_0x5a3a06[_0xfac7('0x1e')]){_0x3858b0[_0xfac7('0x1e')]=!![];}else{_0x3858b0[_0xfac7('0x1e')]=![];_0x3858b0['autotls']='required';}}else{_0x3858b0[_0xfac7('0x1a')]=_0x5a3a06[_0xfac7('0x1a')];_0x3858b0['password']=_0x5a3a06[_0xfac7('0x1b')];_0x3858b0[_0xfac7('0x1c')]=utils[_0xfac7('0x1f')](_0x5a3a06[_0xfac7('0x18')]);_0x3858b0[_0xfac7('0x1d')]=0x3e1;_0x3858b0[_0xfac7('0x1e')]=!![];}_0x3858b0[_0xfac7('0xa')]=_0x32d8c6||_0x5a3a06[_0xfac7('0x1a')]||_0xfac7('0x20');return _0x3858b0;};EmailImap[_0xfac7('0x21')]['handleReady']=function(){this[_0xfac7('0x1')][_0xfac7('0x22')](this[_0xfac7('0xb')],![],this[_0xfac7('0x23')][_0xfac7('0xf')](this));};EmailImap['prototype'][_0xfac7('0x23')]=function(_0xdf60cc,_0x2aa0a0){if(_0xdf60cc){this[_0xfac7('0x13')](_0xdf60cc,!![]);}else{this[_0xfac7('0x24')](_0xfac7('0x25'),_0x2aa0a0);this['readUnseen']();}};EmailImap[_0xfac7('0x21')][_0xfac7('0x26')]=function(_0x5b2cc0){if(_0x5b2cc0){this[_0xfac7('0x13')](_0x5b2cc0,!![]);}else{this[_0xfac7('0x1')][_0xfac7('0x10')]();}};EmailImap[_0xfac7('0x21')][_0xfac7('0x27')]=function(){this[_0xfac7('0x1')]['search']([_0xfac7('0x28')],this['handleReadUnseen'][_0xfac7('0xf')](this));};EmailImap['prototype'][_0xfac7('0x29')]=function(_0x32fb2c,_0x1b5418){if(_0x32fb2c){this['handleError'](_0x32fb2c,!![]);}else{if(_0x1b5418[_0xfac7('0x2a')]){try{var _0x10e017=this[_0xfac7('0x1')][_0xfac7('0x2b')](_0x1b5418,{'bodies':'','markSeen':!![]});_0x10e017['on'](_0xfac7('0x2c'),this[_0xfac7('0x2d')][_0xfac7('0xf')](this));_0x10e017[_0xfac7('0xe')](_0xfac7('0x12'),this['handleFetchError'][_0xfac7('0xf')](this));_0x10e017[_0xfac7('0xe')]('end',this[_0xfac7('0x2e')][_0xfac7('0xf')](this));}catch(_0x15b71b){logger[_0xfac7('0x12')](_0x15b71b);}}else{this[_0xfac7('0x1')][_0xfac7('0x2f')](!![],this[_0xfac7('0x26')]['bind'](this));}}};EmailImap['prototype'][_0xfac7('0x2d')]=function(_0x51ec48,_0x48845f){_0x51ec48['on']('body',this[_0xfac7('0x30')][_0xfac7('0xf')](this));_0x51ec48[_0xfac7('0xe')](_0xfac7('0x31'),this[_0xfac7('0x32')]['bind'](this));_0x51ec48[_0xfac7('0xe')](_0xfac7('0x10'),this[_0xfac7('0x33')]['bind'](this));};EmailImap[_0xfac7('0x21')]['handleMessageBody']=function(_0x1f72a7,_0x4444c1){simpleParser(_0x1f72a7,{'Iconv':Iconv},this[_0xfac7('0x34')][_0xfac7('0xf')](this));};EmailImap[_0xfac7('0x21')][_0xfac7('0x32')]=function(_0x2e23c6){};EmailImap[_0xfac7('0x21')][_0xfac7('0x33')]=function(){};EmailImap[_0xfac7('0x21')][_0xfac7('0x34')]=function(_0x212e6f,_0x1923cd){if(_0x212e6f){logger[_0xfac7('0x12')](_0x212e6f);}else{var _0x2df195=this;utils[_0xfac7('0x35')](this['account'],_0x1923cd,function(_0x5eb225){_0x2df195[_0xfac7('0x24')]('email',_0x5eb225);});}};EmailImap[_0xfac7('0x21')][_0xfac7('0x2e')]=function(){this['imap'][_0xfac7('0x2f')](!![],this[_0xfac7('0x26')][_0xfac7('0xf')](this));};EmailImap[_0xfac7('0x21')][_0xfac7('0x36')]=function(_0x58792b){this['handleError'](_0x58792b);this[_0xfac7('0x1')]['closeBox'](!![],this['handleCloseBox'][_0xfac7('0xf')](this));};EmailImap[_0xfac7('0x21')][_0xfac7('0x11')]=function(){this[_0xfac7('0x24')](_0xfac7('0x10'));};EmailImap[_0xfac7('0x21')][_0xfac7('0x13')]=function(_0x357e86,_0xee71b4){logger['error']('handleError',this['account']['email'],JSON['stringify'](_0x357e86));var _0x4c20c6='';if(_0x357e86){if(_0x357e86[_0xfac7('0x37')]){_0x4c20c6=_0x357e86['textCode'];}else{for(var _0xbe4c55 in _0x357e86){if(_0x357e86[_0xfac7('0x38')](_0xbe4c55)){_0x4c20c6+=_['upperFirst'](_0xbe4c55)+':\x20'+_0x357e86[_0xbe4c55]+'\x0a';}}}}if(_0xee71b4){this[_0xfac7('0x1')][_0xfac7('0x10')]();}else{this[_0xfac7('0x24')](_0xfac7('0x12'),_0x4c20c6);this[_0xfac7('0x24')]('end');}};module[_0xfac7('0x39')]=EmailImap;
\ No newline at end of file
+var _0x6345=['INBOX','getAccount','once','ready','handleReady','end','bind','error','handleError','connect','inherits','connTimeout','authTimeout','authentication','password','host','port','tls','autotls','required','user','anonymous@xcally.com','openBox','handleOpenBox','prototype','emit','box','readUnseen','handleCloseBox','UNSEEN','message','handleFetchMessage','handleFetchEnd','closeBox','body','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','account','handleEnd','stringify','textCode','hasOwnProperty','upperFirst','exports','path','imap','randomstring','mailparser','simpleParser','iconv','Iconv','events','EventEmitter','./utils','../../../config/logger','email','mailbox'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x6345,0xa4));var _0x5634=function(_0x4f983e,_0x3f0344){_0x4f983e=_0x4f983e-0x0;var _0x2569ed=_0x6345[_0x4f983e];return _0x2569ed;};'use strict';var fs=require('fs');var path=require(_0x5634('0x0'));var util=require('util');var Imap=require(_0x5634('0x1'));var _=require('lodash');var rs=require(_0x5634('0x2'));var simpleParser=require(_0x5634('0x3'))[_0x5634('0x4')];var Iconv=require(_0x5634('0x5'))[_0x5634('0x6')];var EventEmitter=require(_0x5634('0x7'))[_0x5634('0x8')];var utils=require(_0x5634('0x9'));var logger=require(_0x5634('0xa'))(_0x5634('0xb'));function EmailImap(_0x478efa,_0xb7b27c){this[_0x5634('0xc')]=_0x5634('0xd');this['account']=this[_0x5634('0xe')](_0x478efa,_0xb7b27c);this[_0x5634('0x1')]=new Imap(this['account']);this[_0x5634('0x1')][_0x5634('0xf')](_0x5634('0x10'),this[_0x5634('0x11')]['bind'](this));this['imap'][_0x5634('0xf')](_0x5634('0x12'),this['handleEnd'][_0x5634('0x13')](this));this['imap']['on'](_0x5634('0x14'),this[_0x5634('0x15')][_0x5634('0x13')](this));this[_0x5634('0x1')][_0x5634('0x16')]();}util[_0x5634('0x17')](EmailImap,EventEmitter);EmailImap['prototype'][_0x5634('0xe')]=function(_0x36ab07,_0x457e0f){var _0x20146f={'connTimeout':_0x36ab07['connTimeout']?_0x36ab07[_0x5634('0x18')]*0x3e8:0x2710,'authTimeout':_0x36ab07[_0x5634('0x19')]?_0x36ab07['authTimeout']*0x3e8:0x1388};if(_['isNil'](_0x36ab07['service'])){if(_0x36ab07[_0x5634('0x1a')]){_0x20146f['user']=_0x36ab07['user'];_0x20146f['password']=_0x36ab07[_0x5634('0x1b')];}_0x20146f[_0x5634('0x1c')]=_0x36ab07['host'];_0x20146f[_0x5634('0x1d')]=_0x36ab07[_0x5634('0x1d')]||0x3e1;if(_0x36ab07[_0x5634('0x1e')]){_0x20146f['tls']=!![];}else{_0x20146f[_0x5634('0x1e')]=![];_0x20146f[_0x5634('0x1f')]=_0x5634('0x20');}}else{_0x20146f[_0x5634('0x21')]=_0x36ab07['user'];_0x20146f[_0x5634('0x1b')]=_0x36ab07[_0x5634('0x1b')];_0x20146f[_0x5634('0x1c')]=utils['getHost'](_0x36ab07['service']);_0x20146f[_0x5634('0x1d')]=0x3e1;_0x20146f[_0x5634('0x1e')]=!![];}_0x20146f[_0x5634('0xb')]=_0x457e0f||_0x36ab07[_0x5634('0x21')]||_0x5634('0x22');return _0x20146f;};EmailImap['prototype'][_0x5634('0x11')]=function(){this[_0x5634('0x1')][_0x5634('0x23')](this['mailbox'],![],this[_0x5634('0x24')][_0x5634('0x13')](this));};EmailImap[_0x5634('0x25')]['handleOpenBox']=function(_0x24a921,_0x4c68fe){if(_0x24a921){this[_0x5634('0x15')](_0x24a921,!![]);}else{this[_0x5634('0x26')](_0x5634('0x27'),_0x4c68fe);this[_0x5634('0x28')]();}};EmailImap[_0x5634('0x25')][_0x5634('0x29')]=function(_0x1bab33){if(_0x1bab33){this[_0x5634('0x15')](_0x1bab33,!![]);}else{this[_0x5634('0x1')]['end']();}};EmailImap['prototype'][_0x5634('0x28')]=function(){this[_0x5634('0x1')]['search']([_0x5634('0x2a')],this['handleReadUnseen'][_0x5634('0x13')](this));};EmailImap[_0x5634('0x25')]['handleReadUnseen']=function(_0x46f164,_0x51f53a){if(_0x46f164){this['handleError'](_0x46f164,!![]);}else{if(_0x51f53a['length']){try{var _0x34010f=this['imap']['fetch'](_0x51f53a,{'bodies':'','markSeen':!![]});_0x34010f['on'](_0x5634('0x2b'),this[_0x5634('0x2c')][_0x5634('0x13')](this));_0x34010f[_0x5634('0xf')](_0x5634('0x14'),this['handleFetchError'][_0x5634('0x13')](this));_0x34010f[_0x5634('0xf')](_0x5634('0x12'),this[_0x5634('0x2d')]['bind'](this));}catch(_0x310342){logger[_0x5634('0x14')](_0x310342);}}else{this[_0x5634('0x1')][_0x5634('0x2e')](!![],this[_0x5634('0x29')]['bind'](this));}}};EmailImap[_0x5634('0x25')][_0x5634('0x2c')]=function(_0xe451f9,_0x1387e9){_0xe451f9['on'](_0x5634('0x2f'),this['handleMessageBody']['bind'](this));_0xe451f9['once'](_0x5634('0x30'),this[_0x5634('0x31')][_0x5634('0x13')](this));_0xe451f9[_0x5634('0xf')](_0x5634('0x12'),this[_0x5634('0x32')][_0x5634('0x13')](this));};EmailImap[_0x5634('0x25')]['handleMessageBody']=function(_0x460b4e,_0x5826c2){simpleParser(_0x460b4e,{'Iconv':Iconv},this[_0x5634('0x33')]['bind'](this));};EmailImap['prototype'][_0x5634('0x31')]=function(_0x2c4426){};EmailImap[_0x5634('0x25')]['handleMessageEnd']=function(){};EmailImap[_0x5634('0x25')][_0x5634('0x33')]=function(_0x152037,_0x109190){if(_0x152037){logger[_0x5634('0x14')](_0x152037);}else{var _0x1ee8d9=this;utils['parser'](this[_0x5634('0x34')],_0x109190,function(_0x4f22b8){_0x1ee8d9[_0x5634('0x26')](_0x5634('0xb'),_0x4f22b8);});}};EmailImap[_0x5634('0x25')][_0x5634('0x2d')]=function(){this[_0x5634('0x1')][_0x5634('0x2e')](!![],this['handleCloseBox']['bind'](this));};EmailImap['prototype']['handleFetchError']=function(_0x5a183f){this[_0x5634('0x15')](_0x5a183f);this[_0x5634('0x1')][_0x5634('0x2e')](!![],this['handleCloseBox'][_0x5634('0x13')](this));};EmailImap[_0x5634('0x25')][_0x5634('0x35')]=function(){this[_0x5634('0x26')](_0x5634('0x12'));};EmailImap[_0x5634('0x25')]['handleError']=function(_0x4fc1bd,_0x10086b){logger[_0x5634('0x14')](_0x5634('0x15'),this[_0x5634('0x34')][_0x5634('0xb')],JSON[_0x5634('0x36')](_0x4fc1bd));var _0x28a9c1='';if(_0x4fc1bd){if(_0x4fc1bd[_0x5634('0x37')]){_0x28a9c1=_0x4fc1bd[_0x5634('0x37')];}else{for(var _0x299383 in _0x4fc1bd){if(_0x4fc1bd[_0x5634('0x38')](_0x299383)){_0x28a9c1+=_[_0x5634('0x39')](_0x299383)+':\x20'+_0x4fc1bd[_0x299383]+'\x0a';}}}}if(_0x10086b){this['imap'][_0x5634('0x12')]();}else{this[_0x5634('0x26')](_0x5634('0x14'),_0x28a9c1);this[_0x5634('0x26')]('end');}};module[_0x5634('0x3a')]=EmailImap;
\ No newline at end of file
diff --git a/server/services/email/lib/smtp.js b/server/services/email/lib/smtp.js
index e1a20de..55c655c 100644
--- a/server/services/email/lib/smtp.js
+++ b/server/services/email/lib/smtp.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8249=['verify','Not\x20verifired','exports','nodemailer','bluebird','prototype','createTransport','use','sendMail','toString'];(function(_0x448309,_0x4b28a9){var _0x3de530=function(_0x2918dc){while(--_0x2918dc){_0x448309['push'](_0x448309['shift']());}};_0x3de530(++_0x4b28a9);}(_0x8249,0x1ed));var _0x9824=function(_0xfd495c,_0x4a3c1a){_0xfd495c=_0xfd495c-0x0;var _0x561dd8=_0x8249[_0xfd495c];return _0x561dd8;};'use strict';var nodemailer=require(_0x9824('0x0'));var BPromise=require(_0x9824('0x1'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0x9824('0x2')]['send']=function(_0x5a4e4b,_0x32e541){return new BPromise(function(_0x3bd4f0,_0x3ebfdd){var _0x3710e6=nodemailer[_0x9824('0x3')](_0x5a4e4b);_0x3710e6[_0x9824('0x4')]('compile',inlineBase64());_0x3710e6[_0x9824('0x5')](_0x32e541,function(_0x1bad43,_0x1261a8){if(_0x1bad43){_0x3ebfdd(_0x1bad43[_0x9824('0x6')]());}else{_0x3bd4f0(_0x1261a8);}});});};EmailSmtp[_0x9824('0x2')][_0x9824('0x7')]=function(_0x1baec5){return new BPromise(function(_0x27773b,_0x16c1d7){var _0x82606b=nodemailer[_0x9824('0x3')](_0x1baec5);_0x82606b[_0x9824('0x7')](function(_0x9de811,_0x51404b){if(_0x9de811){_0x16c1d7(_0x9de811['toString']());}else{if(_0x51404b){_0x27773b(_0x51404b);}else{_0x16c1d7(_0x9824('0x8'));}}});});};module[_0x9824('0x9')]=EmailSmtp;
\ No newline at end of file
+var _0xfecf=['send','use','compile','toString','verify','createTransport','Not\x20verifired','nodemailer','bluebird','prototype'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xfecf,0x1d3));var _0xffec=function(_0x5749ed,_0x21dc67){_0x5749ed=_0x5749ed-0x0;var _0x1e66b1=_0xfecf[_0x5749ed];return _0x1e66b1;};'use strict';var nodemailer=require(_0xffec('0x0'));var BPromise=require(_0xffec('0x1'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0xffec('0x2')][_0xffec('0x3')]=function(_0x3a590a,_0x45375c){return new BPromise(function(_0x2c6cde,_0x486fc8){var _0x50d7c5=nodemailer['createTransport'](_0x3a590a);_0x50d7c5[_0xffec('0x4')](_0xffec('0x5'),inlineBase64());_0x50d7c5['sendMail'](_0x45375c,function(_0x2cd24a,_0x22cc9a){if(_0x2cd24a){_0x486fc8(_0x2cd24a[_0xffec('0x6')]());}else{_0x2c6cde(_0x22cc9a);}});});};EmailSmtp['prototype'][_0xffec('0x7')]=function(_0x40ac18){return new BPromise(function(_0x40558a,_0x2daac1){var _0x44f10f=nodemailer[_0xffec('0x8')](_0x40ac18);_0x44f10f['verify'](function(_0x1adb35,_0x575a50){if(_0x1adb35){_0x2daac1(_0x1adb35['toString']());}else{if(_0x575a50){_0x40558a(_0x575a50);}else{_0x2daac1(_0xffec('0x9'));}}});});};module['exports']=EmailSmtp;
\ No newline at end of file
diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js
index 3ebe83f..2e15e0a 100644
--- a/server/services/email/lib/utils.js
+++ b/server/services/email/lib/utils.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b38=['node-tnef','../../../config/logger','value','address','generate','@xcally.com','head','name','split','length','slice','join','isEmpty','anonymous','html','body','textAsHtml','Empty\x20message ','Attachments','Title','getHost','imap.gmail.com','yahoo','imap-mail.outlook.com','outlook365','127.0.0.1','lodash','moment','randomstring','path','util'];(function(_0x2dadb9,_0x42cfe6){var _0x2f0097=function(_0x21163f){while(--_0x21163f){_0x2dadb9['push'](_0x2dadb9['shift']());}};_0x2f0097(++_0x42cfe6);}(_0x2b38,0x19f));var _0x82b3=function(_0x3d1520,_0x4a74df){_0x3d1520=_0x3d1520-0x0;var _0x177de7=_0x2b38[_0x3d1520];return _0x177de7;};'use strict';var _=require(_0x82b3('0x0'));var moment=require(_0x82b3('0x1'));var random=require(_0x82b3('0x2'));var fs=require('fs');var path=require(_0x82b3('0x3'));var util=require(_0x82b3('0x4'));var tnef=require(_0x82b3('0x5'));var logger=require(_0x82b3('0x6'))('email');var config=require('../../../config/environment');function getAddress(_0x55865b){var _0x445528=_['head'](_0x55865b[_0x82b3('0x7')]);return _0x445528&&_0x445528['address']?_0x445528[_0x82b3('0x8')]:'anonymous'+random[_0x82b3('0x9')](0x6)+_0x82b3('0xa');}function getFirstName(_0x137784){var _0x353ae3=_[_0x82b3('0xb')](_0x137784[_0x82b3('0x7')]);if(_0x353ae3&&_0x353ae3[_0x82b3('0xc')]){var _0x56d98d=_0x353ae3[_0x82b3('0xc')][_0x82b3('0xd')](/\s+/);return _0x56d98d[_0x82b3('0xe')]?_0x56d98d[_0x82b3('0xf')](0x0,-0x1)[_0x82b3('0x10')]('\x20'):_0x353ae3[_0x82b3('0xc')];}return'Anonymous';}function getLastName(_0x4da455){var _0x43ec46=_[_0x82b3('0xb')](_0x4da455[_0x82b3('0x7')]);if(_0x43ec46&&_0x43ec46[_0x82b3('0xc')]){var _0x209bd1=_0x43ec46[_0x82b3('0xc')][_0x82b3('0xd')](/\s+/);return _0x209bd1['length']>0x1?_0x209bd1['pop']():'';}return'';}function getMails(_0x1d0992,_0x5621a4){var _0x3b8734='';for(var _0x102550=0x0;_0x102550<_0x5621a4['value'][_0x82b3('0xe')];_0x102550+=0x1){if(_0x5621a4['value'][_0x102550]['address']!==_0x1d0992){if(!_[_0x82b3('0x11')](_0x3b8734)){_0x3b8734+=',';}_0x3b8734+=_0x5621a4[_0x82b3('0x7')][_0x102550]['name']||_0x5621a4[_0x82b3('0x7')][_0x102550][_0x82b3('0x8')]||'';_0x3b8734+='\x20<';_0x3b8734+=_0x5621a4[_0x82b3('0x7')][_0x102550][_0x82b3('0x8')]?_0x5621a4[_0x82b3('0x7')][_0x102550][_0x82b3('0x8')]:_0x82b3('0x12')+random[_0x82b3('0x9')](0x6)+_0x82b3('0xa');_0x3b8734+='>';}}return _0x3b8734;}function parseEmail(_0xd06afd,_0x430e88,_0x4575fb){if(_0x430e88[_0x82b3('0x13')]){var _0x4e18fb=/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-